diff --git a/example-projects/hapi-fhir-base-example-embedded-ws/pom.xml b/example-projects/hapi-fhir-base-example-embedded-ws/pom.xml index 8b515c6a208..b0ce65c51ef 100644 --- a/example-projects/hapi-fhir-base-example-embedded-ws/pom.xml +++ b/example-projects/hapi-fhir-base-example-embedded-ws/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../../pom.xml diff --git a/example-projects/hapi-fhir-standalone-overlay-example/pom.xml b/example-projects/hapi-fhir-standalone-overlay-example/pom.xml index ba54e7e947c..4c7f0893243 100644 --- a/example-projects/hapi-fhir-standalone-overlay-example/pom.xml +++ b/example-projects/hapi-fhir-standalone-overlay-example/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../../pom.xml hapi-fhir-standalone-overlay-example diff --git a/examples/pom.xml b/examples/pom.xml index 5c9b74052b2..a49e403d39a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 2a6e9753524..81f3d326f7b 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 7d398328723..631e58482b9 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base-test-mindeps-client/pom.xml b/hapi-fhir-base-test-mindeps-client/pom.xml index 5740c7fdcbc..e4e1c4804d9 100644 --- a/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-base-test-mindeps-server/pom.xml b/hapi-fhir-base-test-mindeps-server/pom.xml index 890919bef04..0042dfe694b 100644 --- a/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 6a7019de185..88c8c07e95b 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index 3d68cdcca53..6e1c90f3784 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index 47ad404db53..c9afaea68c1 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index e0b0dd632bf..d0035502922 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index 0910c8cd8a3..4a7c93867ca 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 5d62a66d16c..8157f3f025e 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index f15ad8dc135..ee37f7bae34 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml @@ -26,42 +26,42 @@ ca.uhn.hapi.fhir hapi-fhir-base - 3.0.0-SNAPSHOT + 3.0.0 ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 3.0.0-SNAPSHOT + 3.0.0 true ca.uhn.hapi.fhir hapi-fhir-structures-dstu2.1 - 3.0.0-SNAPSHOT + 3.0.0 true ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 3.0.0-SNAPSHOT + 3.0.0 true ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 3.0.0-SNAPSHOT + 3.0.0 true ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 3.0.0-SNAPSHOT + 3.0.0 true ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 3.0.0-SNAPSHOT + 3.0.0 true diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/CCDAConverter.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/CCDAConverter.java index 45d3c1fe8ec..16e7ac9e3f0 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/CCDAConverter.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/CCDAConverter.java @@ -105,7 +105,7 @@ import org.hl7.fhir.dstu3.model.ResourceFactory; import org.hl7.fhir.dstu3.utils.NarrativeGenerator; import org.hl7.fhir.dstu3.utils.ToolingExtensions; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.utilities.ucum.UcumService; +import org.fhir.ucum.UcumService; import org.w3c.dom.Element; /** @@ -260,7 +260,7 @@ public class CCDAConverter { r.setText(new Narrative()); if (r.getText().getDiv() == null) { r.getText().setStatus(NarrativeStatus.GENERATED); -// new NarrativeGenerator("", "", context).generate(r); + new NarrativeGenerator("", "", context).generate(r); } r.setMeta(new Meta().setLastUpdatedElement(InstantType.now())); r.setId(id); diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/Convert.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/Convert.java index 70a070b5264..1b6d74ef750 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/Convert.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/Convert.java @@ -86,7 +86,7 @@ import org.hl7.fhir.dstu3.model.Type; import org.hl7.fhir.utilities.CommaSeparatedStringBuilder; import org.hl7.fhir.utilities.OIDUtils; import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.utilities.ucum.UcumService; +import org.fhir.ucum.UcumService; import org.w3c.dom.Element; import org.w3c.dom.Node; diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor30.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor30.java index 146e718b7c5..083b29ad3e8 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor30.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor30.java @@ -20,7 +20,6 @@ package org.hl7.fhir.convertors; * #L% */ - import org.hl7.fhir.exceptions.FHIRException; public interface VersionConvertorAdvisor30 { diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor40.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor40.java index d6aceef0b7e..26caa364286 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor40.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertorAdvisor40.java @@ -20,7 +20,6 @@ package org.hl7.fhir.convertors; * #L% */ - import org.hl7.fhir.exceptions.FHIRException; public interface VersionConvertorAdvisor40 { diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_30.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_30.java index 7fe7ee0e0d9..4c309c11849 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_30.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_30.java @@ -20,7 +20,6 @@ package org.hl7.fhir.convertors; * #L% */ - import java.util.ArrayList; import java.util.List; diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_40.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_40.java index 4668800b156..742c9aac7a7 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_40.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_40.java @@ -20,7 +20,6 @@ package org.hl7.fhir.convertors; * #L% */ - import java.util.ArrayList; import java.util.List; @@ -29,28 +28,20 @@ import org.hl7.fhir.instance.model.CodeableConcept; import org.hl7.fhir.instance.model.Reference; import org.hl7.fhir.instance.utils.ToolingExtensions; import org.hl7.fhir.r4.conformance.ProfileUtilities; -import org.hl7.fhir.r4.model.Annotation; +import org.hl7.fhir.r4.model.*; import org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent; import org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority; -import org.hl7.fhir.r4.model.ConceptMap; -import org.hl7.fhir.r4.model.ContactDetail; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; import org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent; import org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus; -import org.hl7.fhir.r4.model.Dosage; -import org.hl7.fhir.r4.model.ElementDefinition; import org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent; -import org.hl7.fhir.r4.model.Enumeration; import org.hl7.fhir.r4.model.Immunization.ImmunizationPractitionerComponent; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.r4.model.Timing.EventTiming; -import org.hl7.fhir.r4.model.UriType; import org.hl7.fhir.r4.terminologies.CodeSystemUtilities; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; @@ -96,683 +87,90 @@ public class VersionConvertor_10_40 { this.advisor = advisor; } - public void copyElement(org.hl7.fhir.instance.model.Element src, org.hl7.fhir.r4.model.Element tgt) throws FHIRException { - tgt.setId(src.getId()); - for (org.hl7.fhir.instance.model.Extension e : src.getExtension()) { - tgt.addExtension(convertExtension(e)); - } - } - - public void copyElement(org.hl7.fhir.r4.model.Element src, org.hl7.fhir.instance.model.Element tgt) throws FHIRException { - tgt.setId(src.getId()); - for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { - tgt.addExtension(convertExtension(e)); - } - } - - public void copyElement(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.instance.model.Element tgt) throws FHIRException { - tgt.setId(src.getId()); - for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { - tgt.addExtension(convertExtension(e)); - } - } - - public void copyBackboneElement(org.hl7.fhir.instance.model.BackboneElement src, org.hl7.fhir.r4.model.BackboneElement tgt) throws FHIRException { - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.Extension e : src.getModifierExtension()) { - tgt.addModifierExtension(convertExtension(e)); - } - } - - public void copyBackboneElement(org.hl7.fhir.r4.model.BackboneElement src, org.hl7.fhir.instance.model.BackboneElement tgt) throws FHIRException { - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Extension e : src.getModifierExtension()) { - tgt.addModifierExtension(convertExtension(e)); - } - } - - public org.hl7.fhir.r4.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.instance.model.Base64BinaryType src) throws FHIRException { - org.hl7.fhir.r4.model.Base64BinaryType tgt = new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.r4.model.Base64BinaryType src) throws FHIRException { - org.hl7.fhir.instance.model.Base64BinaryType tgt = new org.hl7.fhir.instance.model.Base64BinaryType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.BooleanType convertBoolean(org.hl7.fhir.instance.model.BooleanType src) throws FHIRException { - org.hl7.fhir.r4.model.BooleanType tgt = new org.hl7.fhir.r4.model.BooleanType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.BooleanType convertBoolean(org.hl7.fhir.r4.model.BooleanType src) throws FHIRException { - org.hl7.fhir.instance.model.BooleanType tgt = new org.hl7.fhir.instance.model.BooleanType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.CodeType convertCode(org.hl7.fhir.instance.model.CodeType src) throws FHIRException { - org.hl7.fhir.r4.model.CodeType tgt = new org.hl7.fhir.r4.model.CodeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException { - org.hl7.fhir.instance.model.CodeType tgt = new org.hl7.fhir.instance.model.CodeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.UriType convertCodeToUri(org.hl7.fhir.instance.model.CodeType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.CodeType convertUriToCode(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.instance.model.CodeType tgt = new org.hl7.fhir.instance.model.CodeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.DateType convertDate(org.hl7.fhir.instance.model.DateType src) throws FHIRException { - org.hl7.fhir.r4.model.DateType tgt = new org.hl7.fhir.r4.model.DateType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.DateType convertDate(org.hl7.fhir.instance.model.DateTimeType src) throws FHIRException { - org.hl7.fhir.r4.model.DateType tgt = new org.hl7.fhir.r4.model.DateType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.DateType convertDate(org.hl7.fhir.r4.model.DateType src) throws FHIRException { - org.hl7.fhir.instance.model.DateType tgt = new org.hl7.fhir.instance.model.DateType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.DateType convertDate(org.hl7.fhir.r4.model.DateTimeType src) throws FHIRException { - org.hl7.fhir.instance.model.DateType tgt = new org.hl7.fhir.instance.model.DateType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.DateTimeType convertDateTime(org.hl7.fhir.instance.model.DateTimeType src) throws FHIRException { - org.hl7.fhir.r4.model.DateTimeType tgt = new org.hl7.fhir.r4.model.DateTimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.DateTimeType convertDateTime(org.hl7.fhir.r4.model.DateTimeType src) throws FHIRException { - org.hl7.fhir.instance.model.DateTimeType tgt = new org.hl7.fhir.instance.model.DateTimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.DecimalType convertDecimal(org.hl7.fhir.instance.model.DecimalType src) throws FHIRException { - org.hl7.fhir.r4.model.DecimalType tgt = new org.hl7.fhir.r4.model.DecimalType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.DecimalType convertDecimal(org.hl7.fhir.r4.model.DecimalType src) throws FHIRException { - org.hl7.fhir.instance.model.DecimalType tgt = new org.hl7.fhir.instance.model.DecimalType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.instance.model.IdType src) throws FHIRException { - org.hl7.fhir.r4.model.IdType tgt = new org.hl7.fhir.r4.model.IdType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.IdType convertId(org.hl7.fhir.r4.model.IdType src) throws FHIRException { - org.hl7.fhir.instance.model.IdType tgt = new org.hl7.fhir.instance.model.IdType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.InstantType convertInstant(org.hl7.fhir.instance.model.InstantType src) throws FHIRException { - org.hl7.fhir.r4.model.InstantType tgt = new org.hl7.fhir.r4.model.InstantType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.InstantType convertInstant(org.hl7.fhir.r4.model.InstantType src) throws FHIRException { - org.hl7.fhir.instance.model.InstantType tgt = new org.hl7.fhir.instance.model.InstantType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.IntegerType convertInteger(org.hl7.fhir.instance.model.IntegerType src) throws FHIRException { - org.hl7.fhir.r4.model.IntegerType tgt = new org.hl7.fhir.r4.model.IntegerType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.IntegerType convertInteger(org.hl7.fhir.r4.model.IntegerType src) throws FHIRException { - org.hl7.fhir.instance.model.IntegerType tgt = new org.hl7.fhir.instance.model.IntegerType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.MarkdownType convertMarkdown(org.hl7.fhir.instance.model.MarkdownType src) throws FHIRException { - org.hl7.fhir.r4.model.MarkdownType tgt = new org.hl7.fhir.r4.model.MarkdownType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.MarkdownType convertMarkdown(org.hl7.fhir.r4.model.MarkdownType src) throws FHIRException { - org.hl7.fhir.instance.model.MarkdownType tgt = new org.hl7.fhir.instance.model.MarkdownType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.OidType convertOid(org.hl7.fhir.instance.model.OidType src) throws FHIRException { - org.hl7.fhir.r4.model.OidType tgt = new org.hl7.fhir.r4.model.OidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.OidType convertOid(org.hl7.fhir.r4.model.OidType src) throws FHIRException { - org.hl7.fhir.instance.model.OidType tgt = new org.hl7.fhir.instance.model.OidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.PositiveIntType convertPositiveInt(org.hl7.fhir.instance.model.PositiveIntType src) throws FHIRException { - org.hl7.fhir.r4.model.PositiveIntType tgt = new org.hl7.fhir.r4.model.PositiveIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.PositiveIntType convertPositiveInt(org.hl7.fhir.r4.model.PositiveIntType src) throws FHIRException { - org.hl7.fhir.instance.model.PositiveIntType tgt = new org.hl7.fhir.instance.model.PositiveIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.StringType convertString(org.hl7.fhir.instance.model.StringType src) throws FHIRException { - org.hl7.fhir.r4.model.StringType tgt = new org.hl7.fhir.r4.model.StringType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.StringType convertString(org.hl7.fhir.r4.model.StringType src) throws FHIRException { - org.hl7.fhir.instance.model.StringType tgt = new org.hl7.fhir.instance.model.StringType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.TimeType convertTime(org.hl7.fhir.instance.model.TimeType src) throws FHIRException { - org.hl7.fhir.r4.model.TimeType tgt = new org.hl7.fhir.r4.model.TimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.TimeType convertTime(org.hl7.fhir.r4.model.TimeType src) throws FHIRException { - org.hl7.fhir.instance.model.TimeType tgt = new org.hl7.fhir.instance.model.TimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.instance.model.UnsignedIntType src) throws FHIRException { - org.hl7.fhir.r4.model.UnsignedIntType tgt = new org.hl7.fhir.r4.model.UnsignedIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.r4.model.UnsignedIntType src) throws FHIRException { - org.hl7.fhir.instance.model.UnsignedIntType tgt = new org.hl7.fhir.instance.model.UnsignedIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.instance.model.UriType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.instance.model.UriType tgt = new org.hl7.fhir.instance.model.UriType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.UuidType convertUuid(org.hl7.fhir.instance.model.UuidType src) throws FHIRException { - org.hl7.fhir.r4.model.UuidType tgt = new org.hl7.fhir.r4.model.UuidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.instance.model.UuidType convertUuid(org.hl7.fhir.r4.model.UuidType src) throws FHIRException { - org.hl7.fhir.instance.model.UuidType tgt = new org.hl7.fhir.instance.model.UuidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public org.hl7.fhir.r4.model.Extension convertExtension(org.hl7.fhir.instance.model.Extension src) throws FHIRException { + public org.hl7.fhir.r4.model.Account convertAccount(org.hl7.fhir.instance.model.Account src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r4.model.Extension tgt = new org.hl7.fhir.r4.model.Extension(); - copyElement(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public org.hl7.fhir.instance.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Extension tgt = new org.hl7.fhir.instance.model.Extension(); - copyElement(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public org.hl7.fhir.r4.model.Narrative convertNarrative(org.hl7.fhir.instance.model.Narrative src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Narrative tgt = new org.hl7.fhir.r4.model.Narrative(); - copyElement(src, tgt); - tgt.setStatus(convertNarrativeStatus(src.getStatus())); - tgt.setDiv(src.getDiv()); - return tgt; - } - - public org.hl7.fhir.instance.model.Narrative convertNarrative(org.hl7.fhir.r4.model.Narrative src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Narrative tgt = new org.hl7.fhir.instance.model.Narrative(); - copyElement(src, tgt); - tgt.setStatus(convertNarrativeStatus(src.getStatus())); - tgt.setDiv(src.getDiv()); - return tgt; - } - - public org.hl7.fhir.r4.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.instance.model.Narrative.NarrativeStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GENERATED: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.GENERATED; - case EXTENSIONS: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EXTENSIONS; - case ADDITIONAL: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.ADDITIONAL; - case EMPTY: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EMPTY; - default: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.r4.model.Narrative.NarrativeStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GENERATED: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.GENERATED; - case EXTENSIONS: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.EXTENSIONS; - case ADDITIONAL: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.ADDITIONAL; - case EMPTY: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.EMPTY; - default: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Annotation convertAnnotation(org.hl7.fhir.instance.model.Annotation src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Annotation tgt = new org.hl7.fhir.r4.model.Annotation(); - copyElement(src, tgt); - tgt.setAuthor(convertType(src.getAuthor())); - tgt.setTime(src.getTime()); - tgt.setText(src.getText()); - return tgt; - } - - public org.hl7.fhir.instance.model.Annotation convertAnnotation(org.hl7.fhir.r4.model.Annotation src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Annotation tgt = new org.hl7.fhir.instance.model.Annotation(); - copyElement(src, tgt); - tgt.setAuthor(convertType(src.getAuthor())); - tgt.setTime(src.getTime()); - tgt.setText(src.getText()); - return tgt; - } - - public org.hl7.fhir.r4.model.Attachment convertAttachment(org.hl7.fhir.instance.model.Attachment src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Attachment tgt = new org.hl7.fhir.r4.model.Attachment(); - copyElement(src, tgt); - tgt.setContentType(src.getContentType()); - tgt.setLanguage(src.getLanguage()); - tgt.setData(src.getData()); - tgt.setUrl(src.getUrl()); - tgt.setSize(src.getSize()); - tgt.setHash(src.getHash()); - tgt.setTitle(src.getTitle()); - tgt.setCreation(src.getCreation()); - return tgt; - } - - public org.hl7.fhir.instance.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Attachment tgt = new org.hl7.fhir.instance.model.Attachment(); - copyElement(src, tgt); - tgt.setContentType(src.getContentType()); - tgt.setLanguage(src.getLanguage()); - tgt.setData(src.getData()); - tgt.setUrl(src.getUrl()); - tgt.setSize(src.getSize()); - tgt.setHash(src.getHash()); - tgt.setTitle(src.getTitle()); - tgt.setCreation(src.getCreation()); - return tgt; - } - - public org.hl7.fhir.r4.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.instance.model.CodeableConcept src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CodeableConcept tgt = new org.hl7.fhir.r4.model.CodeableConcept(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.Coding t : src.getCoding()) - tgt.addCoding(convertCoding(t)); - tgt.setText(src.getText()); - return tgt; - } - - public org.hl7.fhir.instance.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.r4.model.CodeableConcept src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.CodeableConcept tgt = new org.hl7.fhir.instance.model.CodeableConcept(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Coding t : src.getCoding()) - tgt.addCoding(convertCoding(t)); - tgt.setText(src.getText()); - return tgt; - } - - public org.hl7.fhir.r4.model.Coding convertCoding(org.hl7.fhir.instance.model.Coding src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Coding tgt = new org.hl7.fhir.r4.model.Coding(); - copyElement(src, tgt); - tgt.setSystem(src.getSystem()); - tgt.setVersion(src.getVersion()); - tgt.setCode(src.getCode()); - tgt.setDisplay(src.getDisplay()); - tgt.setUserSelected(src.getUserSelected()); - return tgt; - } - - public org.hl7.fhir.instance.model.Coding convertCoding(org.hl7.fhir.r4.model.Coding src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Coding tgt = new org.hl7.fhir.instance.model.Coding(); - copyElement(src, tgt); - tgt.setSystem(src.getSystem()); - tgt.setVersion(src.getVersion()); - tgt.setCode(src.getCode()); - tgt.setDisplay(src.getDisplay()); - tgt.setUserSelected(src.getUserSelected()); - return tgt; - } - - - - public org.hl7.fhir.r4.model.Identifier convertIdentifier(org.hl7.fhir.instance.model.Identifier src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Identifier tgt = new org.hl7.fhir.r4.model.Identifier(); - copyElement(src, tgt); - tgt.setUse(convertIdentifierUse(src.getUse())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setSystem(src.getSystem()); - tgt.setValue(src.getValue()); - tgt.setPeriod(convertPeriod(src.getPeriod())); - tgt.setAssigner(convertReference(src.getAssigner())); - return tgt; - } - - public org.hl7.fhir.instance.model.Identifier convertIdentifier(org.hl7.fhir.r4.model.Identifier src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Identifier tgt = new org.hl7.fhir.instance.model.Identifier(); - copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertIdentifierUse(src.getUse())); + org.hl7.fhir.r4.model.Account tgt = new org.hl7.fhir.r4.model.Account(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasName()) + tgt.setName(src.getName()); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasAssigner()) - tgt.setAssigner(convertReference(src.getAssigner())); + tgt.setStatus(convertAccountStatus(src.getStatus())); + tgt.setActive(convertPeriod(src.getActivePeriod())); + tgt.setBalance(convertMoney(src.getBalance())); +// tgt.setCoveragePeriod(convertPeriod(src.getCoveragePeriod())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setOwner(convertReference(src.getOwner())); + tgt.setDescription(src.getDescription()); return tgt; } - public org.hl7.fhir.r4.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.instance.model.Identifier.IdentifierUse src) throws FHIRException { + public org.hl7.fhir.instance.model.Account convertAccount(org.hl7.fhir.r4.model.Account src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Account tgt = new org.hl7.fhir.instance.model.Account(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setName(src.getName()); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setStatus(convertAccountStatus(src.getStatus())); + tgt.setActivePeriod(convertPeriod(src.getActive())); + tgt.setBalance(convertMoney(src.getBalance())); +// tgt.setCoveragePeriod(convertPeriod(src.getCoveragePeriod())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setOwner(convertReference(src.getOwner())); + tgt.setDescription(src.getDescription()); + return tgt; + } + + public org.hl7.fhir.r4.model.Account.AccountStatus convertAccountStatus(org.hl7.fhir.instance.model.Account.AccountStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case USUAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.USUAL; - case OFFICIAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.OFFICIAL; - case TEMP: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.TEMP; - case SECONDARY: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.SECONDARY; - default: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.NULL; + case ACTIVE: return org.hl7.fhir.r4.model.Account.AccountStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.r4.model.Account.AccountStatus.INACTIVE; + default: return org.hl7.fhir.r4.model.Account.AccountStatus.NULL; } } - public org.hl7.fhir.instance.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.r4.model.Identifier.IdentifierUse src) throws FHIRException { + public org.hl7.fhir.instance.model.Account.AccountStatus convertAccountStatus(org.hl7.fhir.r4.model.Account.AccountStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case USUAL: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.USUAL; - case OFFICIAL: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.OFFICIAL; - case TEMP: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.TEMP; - case SECONDARY: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.SECONDARY; - default: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.NULL; + case ACTIVE: return org.hl7.fhir.instance.model.Account.AccountStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.instance.model.Account.AccountStatus.INACTIVE; + default: return org.hl7.fhir.instance.model.Account.AccountStatus.NULL; } } - public org.hl7.fhir.r4.model.Period convertPeriod(org.hl7.fhir.instance.model.Period src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Period tgt = new org.hl7.fhir.r4.model.Period(); - copyElement(src, tgt); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - return tgt; - } - - public org.hl7.fhir.instance.model.Period convertPeriod(org.hl7.fhir.r4.model.Period src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Period tgt = new org.hl7.fhir.instance.model.Period(); - copyElement(src, tgt); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - return tgt; - } - - public org.hl7.fhir.r4.model.Quantity convertQuantity(org.hl7.fhir.instance.model.Quantity src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Quantity tgt = new org.hl7.fhir.r4.model.Quantity(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.Quantity convertQuantity(org.hl7.fhir.r4.model.Quantity src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Quantity tgt = new org.hl7.fhir.instance.model.Quantity(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.instance.model.Quantity.QuantityComparator src) throws FHIRException { + public org.hl7.fhir.r4.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.instance.model.ProcessRequest.ActionList src) throws FHIRException { if (src == null) return null; switch (src) { - case LESS_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_THAN; - case LESS_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_OR_EQUAL; - case GREATER_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; - case GREATER_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_THAN; - default: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.NULL; + case CANCEL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.CANCEL; + case POLL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.POLL; + case REPROCESS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.REPROCESS; + case STATUS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.STATUS; + default: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.NULL; } } - public org.hl7.fhir.instance.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.r4.model.Quantity.QuantityComparator src) throws FHIRException { + public org.hl7.fhir.instance.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.r4.model.ProcessRequest.ActionList src) throws FHIRException { if (src == null) return null; switch (src) { - case LESS_THAN: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.LESS_THAN; - case LESS_OR_EQUAL: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.LESS_OR_EQUAL; - case GREATER_OR_EQUAL: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; - case GREATER_THAN: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.GREATER_THAN; - default: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.NULL; + case CANCEL: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.CANCEL; + case POLL: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.POLL; + case REPROCESS: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.REPROCESS; + case STATUS: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.STATUS; + default: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.NULL; } } - public org.hl7.fhir.r4.model.Range convertRange(org.hl7.fhir.instance.model.Range src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Range tgt = new org.hl7.fhir.r4.model.Range(); - copyElement(src, tgt); - tgt.setLow(convertSimpleQuantity(src.getLow())); - tgt.setHigh(convertSimpleQuantity(src.getHigh())); - return tgt; - } - - public org.hl7.fhir.instance.model.Range convertRange(org.hl7.fhir.r4.model.Range src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Range tgt = new org.hl7.fhir.instance.model.Range(); - copyElement(src, tgt); - tgt.setLow(convertSimpleQuantity(src.getLow())); - tgt.setHigh(convertSimpleQuantity(src.getHigh())); - return tgt; - } - - public org.hl7.fhir.r4.model.Ratio convertRatio(org.hl7.fhir.instance.model.Ratio src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Ratio tgt = new org.hl7.fhir.r4.model.Ratio(); - copyElement(src, tgt); - tgt.setNumerator(convertQuantity(src.getNumerator())); - tgt.setDenominator(convertQuantity(src.getDenominator())); - return tgt; - } - - public org.hl7.fhir.instance.model.Ratio convertRatio(org.hl7.fhir.r4.model.Ratio src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Ratio tgt = new org.hl7.fhir.instance.model.Ratio(); - copyElement(src, tgt); - tgt.setNumerator(convertQuantity(src.getNumerator())); - tgt.setDenominator(convertQuantity(src.getDenominator())); - return tgt; - } - - public org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.instance.model.Reference src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); - copyElement(src, tgt); - tgt.setReference(src.getReference()); - tgt.setDisplay(src.getDisplay()); - return tgt; - } - - public org.hl7.fhir.instance.model.Reference convertReference(org.hl7.fhir.r4.model.Reference src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Reference tgt = new org.hl7.fhir.instance.model.Reference(); - copyElement(src, tgt); - tgt.setReference(src.getReference()); - tgt.setDisplay(src.getDisplay()); - return tgt; - } - - public org.hl7.fhir.r4.model.SampledData convertSampledData(org.hl7.fhir.instance.model.SampledData src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.SampledData tgt = new org.hl7.fhir.r4.model.SampledData(); - copyElement(src, tgt); - tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); - tgt.setPeriod(src.getPeriod()); - tgt.setFactor(src.getFactor()); - tgt.setLowerLimit(src.getLowerLimit()); - tgt.setUpperLimit(src.getUpperLimit()); - tgt.setDimensions(src.getDimensions()); - tgt.setData(src.getData()); - return tgt; - } - - public org.hl7.fhir.instance.model.SampledData convertSampledData(org.hl7.fhir.r4.model.SampledData src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.SampledData tgt = new org.hl7.fhir.instance.model.SampledData(); - copyElement(src, tgt); - tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); - tgt.setPeriod(src.getPeriod()); - tgt.setFactor(src.getFactor()); - tgt.setLowerLimit(src.getLowerLimit()); - tgt.setUpperLimit(src.getUpperLimit()); - tgt.setDimensions(src.getDimensions()); - tgt.setData(src.getData()); - return tgt; - } - - public org.hl7.fhir.r4.model.Signature convertSignature(org.hl7.fhir.instance.model.Signature src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Signature tgt = new org.hl7.fhir.r4.model.Signature(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - tgt.setWhen(src.getWhen()); - tgt.setWho(convertType(src.getWho())); - tgt.setContentType(src.getContentType()); - tgt.setBlob(src.getBlob()); - return tgt; - } - - public org.hl7.fhir.instance.model.Signature convertSignature(org.hl7.fhir.r4.model.Signature src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Signature tgt = new org.hl7.fhir.instance.model.Signature(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - tgt.setWhen(src.getWhen()); - tgt.setWho(convertType(src.getWho())); - tgt.setContentType(src.getContentType()); - tgt.setBlob(src.getBlob()); - return tgt; - } - public org.hl7.fhir.r4.model.Address convertAddress(org.hl7.fhir.instance.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -811,6 +209,28 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.Address.AddressType convertAddressType(org.hl7.fhir.instance.model.Address.AddressType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case POSTAL: return org.hl7.fhir.r4.model.Address.AddressType.POSTAL; + case PHYSICAL: return org.hl7.fhir.r4.model.Address.AddressType.PHYSICAL; + case BOTH: return org.hl7.fhir.r4.model.Address.AddressType.BOTH; + default: return org.hl7.fhir.r4.model.Address.AddressType.NULL; + } + } + + public org.hl7.fhir.instance.model.Address.AddressType convertAddressType(org.hl7.fhir.r4.model.Address.AddressType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case POSTAL: return org.hl7.fhir.instance.model.Address.AddressType.POSTAL; + case PHYSICAL: return org.hl7.fhir.instance.model.Address.AddressType.PHYSICAL; + case BOTH: return org.hl7.fhir.instance.model.Address.AddressType.BOTH; + default: return org.hl7.fhir.instance.model.Address.AddressType.NULL; + } + } + public org.hl7.fhir.r4.model.Address.AddressUse convertAddressUse(org.hl7.fhir.instance.model.Address.AddressUse src) throws FHIRException { if (src == null) return null; @@ -835,28 +255,2726 @@ public class VersionConvertor_10_40 { } } - public org.hl7.fhir.r4.model.Address.AddressType convertAddressType(org.hl7.fhir.instance.model.Address.AddressType src) throws FHIRException { + public org.hl7.fhir.r4.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.instance.model.Enumerations.AdministrativeGender src) throws FHIRException { if (src == null) return null; switch (src) { - case POSTAL: return org.hl7.fhir.r4.model.Address.AddressType.POSTAL; - case PHYSICAL: return org.hl7.fhir.r4.model.Address.AddressType.PHYSICAL; - case BOTH: return org.hl7.fhir.r4.model.Address.AddressType.BOTH; - default: return org.hl7.fhir.r4.model.Address.AddressType.NULL; + case MALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.MALE; + case FEMALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.FEMALE; + case OTHER: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.OTHER; + case UNKNOWN: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.UNKNOWN; + default: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.NULL; } } - public org.hl7.fhir.instance.model.Address.AddressType convertAddressType(org.hl7.fhir.r4.model.Address.AddressType src) throws FHIRException { + public org.hl7.fhir.instance.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender src) throws FHIRException { if (src == null) return null; switch (src) { - case POSTAL: return org.hl7.fhir.instance.model.Address.AddressType.POSTAL; - case PHYSICAL: return org.hl7.fhir.instance.model.Address.AddressType.PHYSICAL; - case BOTH: return org.hl7.fhir.instance.model.Address.AddressType.BOTH; - default: return org.hl7.fhir.instance.model.Address.AddressType.NULL; + case MALE: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.MALE; + case FEMALE: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.FEMALE; + case OTHER: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.OTHER; + case UNKNOWN: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.UNKNOWN; + default: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.NULL; } } + public org.hl7.fhir.r4.model.Age convertAge(org.hl7.fhir.instance.model.Age src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Age tgt = new org.hl7.fhir.r4.model.Age(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.Age convertAge(org.hl7.fhir.r4.model.Age src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Age tgt = new org.hl7.fhir.instance.model.Age(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.instance.model.Contract.ActorComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); + copyElement(src, tgt); + tgt.setActor(convertReference(src.getEntity())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.ActorComponent convertAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.ActorComponent tgt = new org.hl7.fhir.instance.model.Contract.ActorComponent(); + copyElement(src, tgt); + tgt.setEntity(convertReference(src.getActor())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.instance.model.ElementDefinition.AggregationMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONTAINED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.CONTAINED; + case REFERENCED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.REFERENCED; + case BUNDLED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.BUNDLED; + default: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.NULL; + } + } + + public org.hl7.fhir.instance.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.r4.model.ElementDefinition.AggregationMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONTAINED: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.CONTAINED; + case REFERENCED: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.REFERENCED; + case BUNDLED: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.BUNDLED; + default: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.NULL; + } + } + + public org.hl7.fhir.r4.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.instance.model.Patient.AnimalComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Patient.AnimalComponent tgt = new org.hl7.fhir.r4.model.Patient.AnimalComponent(); + copyElement(src, tgt); + tgt.setSpecies(convertCodeableConcept(src.getSpecies())); + tgt.setBreed(convertCodeableConcept(src.getBreed())); + tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); + return tgt; + } + + public org.hl7.fhir.instance.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.r4.model.Patient.AnimalComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Patient.AnimalComponent tgt = new org.hl7.fhir.instance.model.Patient.AnimalComponent(); + copyElement(src, tgt); + tgt.setSpecies(convertCodeableConcept(src.getSpecies())); + tgt.setBreed(convertCodeableConcept(src.getBreed())); + tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); + return tgt; + } + + public org.hl7.fhir.r4.model.Annotation convertAnnotation(org.hl7.fhir.instance.model.Annotation src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Annotation tgt = new org.hl7.fhir.r4.model.Annotation(); + copyElement(src, tgt); + tgt.setAuthor(convertType(src.getAuthor())); + tgt.setTime(src.getTime()); + tgt.setText(src.getText()); + return tgt; + } + + public org.hl7.fhir.instance.model.Annotation convertAnnotation(org.hl7.fhir.r4.model.Annotation src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Annotation tgt = new org.hl7.fhir.instance.model.Annotation(); + copyElement(src, tgt); + tgt.setAuthor(convertType(src.getAuthor())); + tgt.setTime(src.getTime()); + tgt.setText(src.getText()); + return tgt; + } + + public org.hl7.fhir.r4.model.Appointment convertAppointment(org.hl7.fhir.instance.model.Appointment src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Appointment tgt = new org.hl7.fhir.r4.model.Appointment(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertAppointmentStatus(src.getStatus())); + if (src.hasType()) + tgt.addServiceType(convertCodeableConcept(src.getType())); +// tgt.setReason(convertCodeableConcept(src.getReason())); + tgt.setPriority(src.getPriority()); + tgt.setDescription(src.getDescription()); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + tgt.setMinutesDuration(src.getMinutesDuration()); + for (org.hl7.fhir.instance.model.Reference t : src.getSlot()) + tgt.addSlot(convertReference(t)); + tgt.setComment(src.getComment()); + for (org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) + tgt.addParticipant(convertAppointmentParticipantComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Appointment convertAppointment(org.hl7.fhir.r4.model.Appointment src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Appointment tgt = new org.hl7.fhir.instance.model.Appointment(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertAppointmentStatus(src.getStatus())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) + tgt.setType(convertCodeableConcept(t)); +// tgt.setReason(convertCodeableConcept(src.getReason())); + tgt.setPriority(src.getPriority()); + tgt.setDescription(src.getDescription()); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + tgt.setMinutesDuration(src.getMinutesDuration()); + for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) + tgt.addSlot(convertReference(t)); + tgt.setComment(src.getComment()); + for (org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) + tgt.addParticipant(convertAppointmentParticipantComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + tgt.setActor(convertReference(src.getActor())); + tgt.setRequired(convertParticipantRequired(src.getRequired())); + tgt.setStatus(convertParticipationStatus(src.getStatus())); + return tgt; + } + + public org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + tgt.setActor(convertReference(src.getActor())); + tgt.setRequired(convertParticipantRequired(src.getRequired())); + tgt.setStatus(convertParticipationStatus(src.getStatus())); + return tgt; + } + + public org.hl7.fhir.r4.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.instance.model.AppointmentResponse src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AppointmentResponse tgt = new org.hl7.fhir.r4.model.AppointmentResponse(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setAppointment(convertReference(src.getAppointment())); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getParticipantType()) + tgt.addParticipantType(convertCodeableConcept(t)); + tgt.setActor(convertReference(src.getActor())); + tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); + tgt.setComment(src.getComment()); + return tgt; + } + + public org.hl7.fhir.instance.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.r4.model.AppointmentResponse src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AppointmentResponse tgt = new org.hl7.fhir.instance.model.AppointmentResponse(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setAppointment(convertReference(src.getAppointment())); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) + tgt.addParticipantType(convertCodeableConcept(t)); + tgt.setActor(convertReference(src.getActor())); + tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); + tgt.setComment(src.getComment()); + return tgt; + } + + public org.hl7.fhir.r4.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.instance.model.Appointment.AppointmentStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PROPOSED; + case PENDING: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PENDING; + case BOOKED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.BOOKED; + case ARRIVED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ARRIVED; + case FULFILLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.FULFILLED; + case CANCELLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.CANCELLED; + case NOSHOW: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NOSHOW; + default: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.r4.model.Appointment.AppointmentStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.PROPOSED; + case PENDING: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.PENDING; + case BOOKED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.BOOKED; + case ARRIVED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.ARRIVED; + case FULFILLED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.FULFILLED; + case CANCELLED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.CANCELLED; + case NOSHOW: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.NOSHOW; + default: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.instance.model.TestScript.AssertionDirectionType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESPONSE: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.RESPONSE; + case REQUEST: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.REQUEST; + default: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.NULL; + } + } + + public org.hl7.fhir.instance.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.r4.model.TestScript.AssertionDirectionType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESPONSE: return org.hl7.fhir.instance.model.TestScript.AssertionDirectionType.RESPONSE; + case REQUEST: return org.hl7.fhir.instance.model.TestScript.AssertionDirectionType.REQUEST; + default: return org.hl7.fhir.instance.model.TestScript.AssertionDirectionType.NULL; + } + } + + public org.hl7.fhir.r4.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.instance.model.TestScript.AssertionOperatorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EQUALS; + case NOTEQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEQUALS; + case IN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.IN; + case NOTIN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTIN; + case GREATERTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.GREATERTHAN; + case LESSTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.LESSTHAN; + case EMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EMPTY; + case NOTEMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEMPTY; + case CONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.CONTAINS; + case NOTCONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTCONTAINS; + default: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NULL; + } + } + + public org.hl7.fhir.instance.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.r4.model.TestScript.AssertionOperatorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUALS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.EQUALS; + case NOTEQUALS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTEQUALS; + case IN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.IN; + case NOTIN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTIN; + case GREATERTHAN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.GREATERTHAN; + case LESSTHAN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.LESSTHAN; + case EMPTY: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.EMPTY; + case NOTEMPTY: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTEMPTY; + case CONTAINS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.CONTAINS; + case NOTCONTAINS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTCONTAINS; + default: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NULL; + } + } + + public org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OKAY: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.OKAY; + case CREATED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CREATED; + case NOCONTENT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOCONTENT; + case NOTMODIFIED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTMODIFIED; + case BAD: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.BAD; + case FORBIDDEN: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.FORBIDDEN; + case NOTFOUND: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTFOUND; + case METHODNOTALLOWED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; + case CONFLICT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CONFLICT; + case GONE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.GONE; + case PRECONDITIONFAILED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; + case UNPROCESSABLE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; + default: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NULL; + } + } + + public org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OKAY: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.OKAY; + case CREATED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.CREATED; + case NOCONTENT: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NOCONTENT; + case NOTMODIFIED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NOTMODIFIED; + case BAD: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.BAD; + case FORBIDDEN: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.FORBIDDEN; + case NOTFOUND: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NOTFOUND; + case METHODNOTALLOWED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; + case CONFLICT: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.CONFLICT; + case GONE: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.GONE; + case PRECONDITIONFAILED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; + case UNPROCESSABLE: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; + default: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NULL; + } + } + + public org.hl7.fhir.r4.model.Attachment convertAttachment(org.hl7.fhir.instance.model.Attachment src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Attachment tgt = new org.hl7.fhir.r4.model.Attachment(); + copyElement(src, tgt); + tgt.setContentType(src.getContentType()); + tgt.setLanguage(src.getLanguage()); + tgt.setData(src.getData()); + tgt.setUrl(src.getUrl()); + tgt.setSize(src.getSize()); + tgt.setHash(src.getHash()); + tgt.setTitle(src.getTitle()); + tgt.setCreation(src.getCreation()); + return tgt; + } + + public org.hl7.fhir.instance.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Attachment tgt = new org.hl7.fhir.instance.model.Attachment(); + copyElement(src, tgt); + tgt.setContentType(src.getContentType()); + tgt.setLanguage(src.getLanguage()); + tgt.setData(src.getData()); + tgt.setUrl(src.getUrl()); + tgt.setSize(src.getSize()); + tgt.setHash(src.getHash()); + tgt.setTitle(src.getTitle()); + tgt.setCreation(src.getCreation()); + return tgt; + } + + public org.hl7.fhir.r4.model.AuditEvent convertAuditEvent(org.hl7.fhir.instance.model.AuditEvent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AuditEvent tgt = new org.hl7.fhir.r4.model.AuditEvent(); + copyDomainResource(src, tgt); + if (src.hasEvent()) { + tgt.setType(convertCoding(src.getEvent().getType())); + for (org.hl7.fhir.instance.model.Coding t : src.getEvent().getSubtype()) + tgt.addSubtype(convertCoding(t)); + tgt.setAction(convertAuditEventAction(src.getEvent().getAction())); + tgt.setRecorded(src.getEvent().getDateTime()); + tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome())); + tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc()); + for (org.hl7.fhir.instance.model.Coding t : src.getEvent().getPurposeOfEvent()) + tgt.addPurposeOfEvent().addCoding(convertCoding(t)); + } + for (org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent t : src.getParticipant()) + tgt.addAgent(convertAuditEventAgentComponent(t)); + tgt.setSource(convertAuditEventSourceComponent(src.getSource())); + for (org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent t : src.getObject()) + tgt.addEntity(convertAuditEventEntityComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.AuditEvent convertAuditEvent(org.hl7.fhir.r4.model.AuditEvent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AuditEvent tgt = new org.hl7.fhir.instance.model.AuditEvent(); + copyDomainResource(src, tgt); + tgt.getEvent().setType(convertCoding(src.getType())); + for (org.hl7.fhir.r4.model.Coding t : src.getSubtype()) + tgt.getEvent().addSubtype(convertCoding(t)); + tgt.getEvent().setAction(convertAuditEventAction(src.getAction())); + tgt.getEvent().setDateTime(src.getRecorded()); + tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome())); + tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) + for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) + tgt.getEvent().addPurposeOfEvent(convertCoding(cc)); + for (org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent t : src.getAgent()) + tgt.addParticipant(convertAuditEventAgentComponent(t)); + tgt.setSource(convertAuditEventSourceComponent(src.getSource())); + for (org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent t : src.getEntity()) + tgt.addObject(convertAuditEventEntityComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.instance.model.AuditEvent.AuditEventAction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case C: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.C; + case R: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.R; + case U: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.U; + case D: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.D; + case E: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.E; + default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.NULL; + } + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.r4.model.AuditEvent.AuditEventAction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case C: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.C; + case R: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.R; + case U: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.U; + case D: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.D; + case E: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.E; + default: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.NULL; + } + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + tgt.setReference(convertReference(src.getReference())); + tgt.setUserId(convertIdentifier(src.getUserId())); + tgt.setAltId(src.getAltId()); + tgt.setName(src.getName()); + tgt.setRequestor(src.getRequestor()); + tgt.setLocation(convertReference(src.getLocation())); + for (org.hl7.fhir.instance.model.UriType t : src.getPolicy()) + tgt.addPolicy(t.getValue()); + tgt.setMedia(convertCoding(src.getMedia())); + tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); + for (org.hl7.fhir.instance.model.Coding t : src.getPurposeOfUse()) + tgt.addPurposeOfUse().addCoding(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + tgt.setReference(convertReference(src.getReference())); + tgt.setUserId(convertIdentifier(src.getUserId())); + tgt.setAltId(src.getAltId()); + tgt.setName(src.getName()); + tgt.setRequestor(src.getRequestor()); + tgt.setLocation(convertReference(src.getLocation())); + for (org.hl7.fhir.r4.model.UriType t : src.getPolicy()) + tgt.addPolicy(t.getValue()); + tgt.setMedia(convertCoding(src.getMedia())); + tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfUse()) + for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) + tgt.addPurposeOfUse(convertCoding(cc)); + return tgt; + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent(); + copyElement(src, tgt); + tgt.setAddress(src.getAddress()); + tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); + return tgt; + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent(); + copyElement(src, tgt); + tgt.setAddress(src.getAddress()); + tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); + return tgt; + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setReference(convertReference(src.getReference())); + tgt.setType(convertCoding(src.getType())); + tgt.setRole(convertCoding(src.getRole())); + tgt.setLifecycle(convertCoding(src.getLifecycle())); + for (org.hl7.fhir.instance.model.Coding t : src.getSecurityLabel()) + tgt.addSecurityLabel(convertCoding(t)); + tgt.setName(src.getName()); + tgt.setDescription(src.getDescription()); + tgt.setQuery(src.getQuery()); + for (org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) + tgt.addDetail(convertAuditEventEntityDetailComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setReference(convertReference(src.getReference())); + tgt.setType(convertCoding(src.getType())); + tgt.setRole(convertCoding(src.getRole())); + tgt.setLifecycle(convertCoding(src.getLifecycle())); + for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) + tgt.addSecurityLabel(convertCoding(t)); + tgt.setName(src.getName()); + tgt.setDescription(src.getDescription()); + tgt.setQuery(src.getQuery()); + for (org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) + tgt.addDetail(convertAuditEventEntityDetailComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setValue(new Base64BinaryType(src.getValue())); + return tgt; + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setValue((src.getValueBase64BinaryType().getValue())); + return tgt; + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case _0: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._0; + case _4: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._4; + case _8: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._8; + case _12: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._12; + default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome.NULL; + } + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case _0: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._0; + case _4: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._4; + case _8: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._8; + case _12: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._12; + default: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome.NULL; + } + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case _1: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._1; + case _2: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._2; + case _3: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._3; + case _4: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._4; + case _5: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._5; + default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType.NULL; + } + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case _1: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._1; + case _2: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._2; + case _3: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._3; + case _4: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._4; + case _5: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._5; + default: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType.NULL; + } + } + + public org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); + copyElement(src, tgt); + tgt.setSite(src.getSite()); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + for (org.hl7.fhir.instance.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent(); + copyElement(src, tgt); + tgt.setSite(src.getSite()); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + for (org.hl7.fhir.r4.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.instance.model.Base64BinaryType src) throws FHIRException { + org.hl7.fhir.r4.model.Base64BinaryType tgt = new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.r4.model.Base64BinaryType src) throws FHIRException { + org.hl7.fhir.instance.model.Base64BinaryType tgt = new org.hl7.fhir.instance.model.Base64BinaryType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.Basic convertBasic(org.hl7.fhir.instance.model.Basic src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Basic tgt = new org.hl7.fhir.r4.model.Basic(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setCreated(src.getCreated()); + tgt.setAuthor(convertReference(src.getAuthor())); + return tgt; + } + + public org.hl7.fhir.instance.model.Basic convertBasic(org.hl7.fhir.r4.model.Basic src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Basic tgt = new org.hl7.fhir.instance.model.Basic(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setCreated(src.getCreated()); + tgt.setAuthor(convertReference(src.getAuthor())); + return tgt; + } + + public org.hl7.fhir.r4.model.Binary convertBinary(org.hl7.fhir.instance.model.Binary src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary(); + copyResource(src, tgt); + tgt.setContentType(src.getContentType()); + tgt.setContent(src.getContent()); + return tgt; + } + + public org.hl7.fhir.instance.model.Binary convertBinary(org.hl7.fhir.r4.model.Binary src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Binary tgt = new org.hl7.fhir.instance.model.Binary(); + copyResource(src, tgt); + tgt.setContentType(src.getContentType()); + tgt.setContent(src.getContent()); + return tgt; + } + + public org.hl7.fhir.r4.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.instance.model.Enumerations.BindingStrength src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUIRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.REQUIRED; + case EXTENSIBLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXTENSIBLE; + case PREFERRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.PREFERRED; + case EXAMPLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXAMPLE; + default: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.NULL; + } + } + + public org.hl7.fhir.instance.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.r4.model.Enumerations.BindingStrength src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUIRED: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.REQUIRED; + case EXTENSIBLE: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.EXTENSIBLE; + case PREFERRED: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.PREFERRED; + case EXAMPLE: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.EXAMPLE; + default: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.NULL; + } + } + + public org.hl7.fhir.r4.model.BooleanType convertBoolean(org.hl7.fhir.instance.model.BooleanType src) throws FHIRException { + org.hl7.fhir.r4.model.BooleanType tgt = new org.hl7.fhir.r4.model.BooleanType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.BooleanType convertBoolean(org.hl7.fhir.r4.model.BooleanType src) throws FHIRException { + org.hl7.fhir.instance.model.BooleanType tgt = new org.hl7.fhir.instance.model.BooleanType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle convertBundle(org.hl7.fhir.instance.model.Bundle src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Bundle tgt = new org.hl7.fhir.r4.model.Bundle(); + copyResource(src, tgt); + tgt.setType(convertBundleType(src.getType())); + if (src.hasTotal()) + tgt.setTotal(src.getTotal()); + for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) + tgt.addLink(convertBundleLinkComponent(t)); + for (org.hl7.fhir.instance.model.Bundle.BundleEntryComponent t : src.getEntry()) + tgt.addEntry(convertBundleEntryComponent(t)); + tgt.setSignature(convertSignature(src.getSignature())); + return tgt; + } + + public org.hl7.fhir.instance.model.Bundle convertBundle(org.hl7.fhir.r4.model.Bundle src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Bundle tgt = new org.hl7.fhir.instance.model.Bundle(); + copyResource(src, tgt); + tgt.setType(convertBundleType(src.getType())); + if (src.hasTotal()) + tgt.setTotal(src.getTotal()); + for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) + tgt.addLink(convertBundleLinkComponent(t)); + for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent t : src.getEntry()) + tgt.addEntry(convertBundleEntryComponent(t)); + if (src.hasSignature()) + tgt.setSignature(convertSignature(src.getSignature())); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) + tgt.addLink(convertBundleLinkComponent(t)); + tgt.setFullUrl(src.getFullUrl()); + tgt.setResource(convertResource(src.getResource())); + tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); + tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); + tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); + return tgt; + } + + public org.hl7.fhir.instance.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + if (advisor.ignoreEntry(src)) + return null; + + org.hl7.fhir.instance.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) + tgt.addLink(convertBundleLinkComponent(t)); + tgt.setFullUrl(src.getFullUrl()); + org.hl7.fhir.instance.model.Resource res = advisor.convertR2(src.getResource()); + if (res == null) + res = convertResource(src.getResource()); + tgt.setResource(res); + if (src.hasSearch()) + tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); + if (src.hasRequest()) + tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); + if (src.hasResponse()) + tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent(); + copyElement(src, tgt); + tgt.setMethod(convertHTTPVerb(src.getMethod())); + tgt.setUrl(src.getUrl()); + tgt.setIfNoneMatch(src.getIfNoneMatch()); + tgt.setIfModifiedSince(src.getIfModifiedSince()); + tgt.setIfMatch(src.getIfMatch()); + tgt.setIfNoneExist(src.getIfNoneExist()); + return tgt; + } + + public org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent(); + copyElement(src, tgt); + tgt.setMethod(convertHTTPVerb(src.getMethod())); + tgt.setUrl(src.getUrl()); + tgt.setIfNoneMatch(src.getIfNoneMatch()); + tgt.setIfModifiedSince(src.getIfModifiedSince()); + tgt.setIfMatch(src.getIfMatch()); + tgt.setIfNoneExist(src.getIfNoneExist()); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent(); + copyElement(src, tgt); + tgt.setStatus(src.getStatus()); + tgt.setLocation(src.getLocation()); + tgt.setEtag(src.getEtag()); + tgt.setLastModified(src.getLastModified()); + return tgt; + } + + public org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent(); + copyElement(src, tgt); + tgt.setStatus(src.getStatus()); + tgt.setLocation(src.getLocation()); + tgt.setEtag(src.getEtag()); + tgt.setLastModified(src.getLastModified()); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent(); + copyElement(src, tgt); + tgt.setMode(convertSearchEntryMode(src.getMode())); + tgt.setScore(src.getScore()); + return tgt; + } + + public org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent(); + copyElement(src, tgt); + tgt.setMode(convertSearchEntryMode(src.getMode())); + tgt.setScore(src.getScore()); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.instance.model.Bundle.BundleLinkComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); + copyElement(src, tgt); + tgt.setRelation(src.getRelation()); + tgt.setUrl(src.getUrl()); + return tgt; + } + + public org.hl7.fhir.instance.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r4.model.Bundle.BundleLinkComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleLinkComponent(); + copyElement(src, tgt); + tgt.setRelation(src.getRelation()); + tgt.setUrl(src.getUrl()); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.BundleType convertBundleType(org.hl7.fhir.instance.model.Bundle.BundleType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DOCUMENT: return org.hl7.fhir.r4.model.Bundle.BundleType.DOCUMENT; + case MESSAGE: return org.hl7.fhir.r4.model.Bundle.BundleType.MESSAGE; + case TRANSACTION: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION; + case TRANSACTIONRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTIONRESPONSE; + case BATCH: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCH; + case BATCHRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCHRESPONSE; + case HISTORY: return org.hl7.fhir.r4.model.Bundle.BundleType.HISTORY; + case SEARCHSET: return org.hl7.fhir.r4.model.Bundle.BundleType.SEARCHSET; + case COLLECTION: return org.hl7.fhir.r4.model.Bundle.BundleType.COLLECTION; + default: return org.hl7.fhir.r4.model.Bundle.BundleType.NULL; + } + } + + public org.hl7.fhir.instance.model.Bundle.BundleType convertBundleType(org.hl7.fhir.r4.model.Bundle.BundleType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DOCUMENT: return org.hl7.fhir.instance.model.Bundle.BundleType.DOCUMENT; + case MESSAGE: return org.hl7.fhir.instance.model.Bundle.BundleType.MESSAGE; + case TRANSACTION: return org.hl7.fhir.instance.model.Bundle.BundleType.TRANSACTION; + case TRANSACTIONRESPONSE: return org.hl7.fhir.instance.model.Bundle.BundleType.TRANSACTIONRESPONSE; + case BATCH: return org.hl7.fhir.instance.model.Bundle.BundleType.BATCH; + case BATCHRESPONSE: return org.hl7.fhir.instance.model.Bundle.BundleType.BATCHRESPONSE; + case HISTORY: return org.hl7.fhir.instance.model.Bundle.BundleType.HISTORY; + case SEARCHSET: return org.hl7.fhir.instance.model.Bundle.BundleType.SEARCHSET; + case COLLECTION: return org.hl7.fhir.instance.model.Bundle.BundleType.COLLECTION; + default: return org.hl7.fhir.instance.model.Bundle.BundleType.NULL; + } + } + + public org.hl7.fhir.r4.model.CarePlan convertCarePlan(org.hl7.fhir.instance.model.CarePlan src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CarePlan tgt = new org.hl7.fhir.r4.model.CarePlan(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setStatus(convertCarePlanStatus(src.getStatus())); + tgt.setContext(convertReference(src.getContext())); + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.instance.model.Reference t : src.getAuthor()) + tgt.addAuthor(convertReference(t)); +// tgt.setModified(src.getModified()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCategory()) + tgt.addCategory(convertCodeableConcept(t)); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.Reference t : src.getAddresses()) + tgt.addAddresses(convertReference(t)); +// for (org.hl7.fhir.instance.model.Reference t : src.getSupport()) +// tgt.addSupport(convertReference(t)); +// for (org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent t : src.getRelatedPlan()) +// tgt.addRelatedPlan(convertCarePlanRelatedPlanComponent(t)); +// for (org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent t : src.getParticipant()) +// tgt.addParticipant(convertCarePlanParticipantComponent(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getGoal()) + tgt.addGoal(convertReference(t)); + for (org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) + tgt.addActivity(convertCarePlanActivityComponent(t)); +// tgt.setNote(convertAnnotation(src.getNote())); + return tgt; + } + + public org.hl7.fhir.instance.model.CarePlan convertCarePlan(org.hl7.fhir.r4.model.CarePlan src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.CarePlan tgt = new org.hl7.fhir.instance.model.CarePlan(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setStatus(convertCarePlanStatus(src.getStatus())); + tgt.setContext(convertReference(src.getContext())); + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) + tgt.addAuthor(convertReference(t)); +// tgt.setModified(src.getModified()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) + tgt.addCategory(convertCodeableConcept(t)); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.Reference t : src.getAddresses()) + tgt.addAddresses(convertReference(t)); +// for (org.hl7.fhir.r4.model.Reference t : src.getSupport()) +// tgt.addSupport(convertReference(t)); +// for (org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent t : src.getRelatedPlan()) +// tgt.addRelatedPlan(convertCarePlanRelatedPlanComponent(t)); +// for (org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent t : src.getParticipant()) +// tgt.addParticipant(convertCarePlanParticipantComponent(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) + tgt.addGoal(convertReference(t)); + for (org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) + tgt.addActivity(convertCarePlanActivityComponent(t)); +// tgt.setNote(convertAnnotation(src.getNote())); + return tgt; + } + +// public org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent convertCarePlanParticipantComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent(); +// copyElement(src, tgt); +// tgt.setRole(convertCodeableConcept(src.getRole())); +// tgt.setMember(convertReference(src.getMember())); +// return tgt; +// } +// +// public org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent convertCarePlanParticipantComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent(); +// copyElement(src, tgt); +// tgt.setRole(convertCodeableConcept(src.getRole())); +// tgt.setMember(convertReference(src.getMember())); +// return tgt; +// } +// + public org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent(); + copyElement(src, tgt); +// for (org.hl7.fhir.instance.model.Reference t : src.getActionResulting()) +// tgt.addActionResulting(convertReference(t)); + for (org.hl7.fhir.instance.model.Annotation t : src.getProgress()) + tgt.addProgress(convertAnnotation(t)); + tgt.setReference(convertReference(src.getReference())); + tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); + return tgt; + } + + public org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent(); + copyElement(src, tgt); +// for (org.hl7.fhir.r4.model.Reference t : src.getActionResulting()) +// tgt.addActionResulting(convertReference(t)); + for (org.hl7.fhir.r4.model.Annotation t : src.getProgress()) + tgt.addProgress(convertAnnotation(t)); + tgt.setReference(convertReference(src.getReference())); + tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); + return tgt; + } + + public org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent(); + copyElement(src, tgt); +// tgt.setKind().add(convertCodeableConcept(src.getCategory())); + tgt.setCode(convertCodeableConcept(src.getCode())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReasonCode()) + tgt.addReasonCode(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getReasonReference()) + tgt.addReasonReference(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getGoal()) + tgt.addGoal(convertReference(t)); + tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); +// tgt.setStatusReason(convertCodeableConcept(src.getStatusReason())); + tgt.setProhibited(src.getProhibited()); + tgt.setScheduled(convertType(src.getScheduled())); + tgt.setLocation(convertReference(src.getLocation())); + for (org.hl7.fhir.instance.model.Reference t : src.getPerformer()) + tgt.addPerformer(convertReference(t)); + tgt.setProduct(convertType(src.getProduct())); + tgt.setDailyAmount(convertSimpleQuantity(src.getDailyAmount())); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setDescription(src.getDescription()); + return tgt; + } + + public org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent(); + copyElement(src, tgt); + // tgt.setCategory(convertCodeableConcept(src.getKind())); + tgt.setCode(convertCodeableConcept(src.getCode())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) + tgt.addReasonCode(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) + tgt.addReasonReference(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) + tgt.addGoal(convertReference(t)); + tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); +// tgt.setStatusReason(convertCodeableConcept(src.getStatusReason())); + tgt.setProhibited(src.getProhibited()); + tgt.setScheduled(convertType(src.getScheduled())); + tgt.setLocation(convertReference(src.getLocation())); + for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) + tgt.addPerformer(convertReference(t)); + tgt.setProduct(convertType(src.getProduct())); + tgt.setDailyAmount(convertSimpleQuantity(src.getDailyAmount())); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setDescription(src.getDescription()); + return tgt; + } + + public org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTSTARTED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED; + case SCHEDULED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED; + case INPROGRESS: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED; + default: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTSTARTED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.NOTSTARTED; + case SCHEDULED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.SCHEDULED; + case INPROGRESS: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.CANCELLED; + default: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.instance.model.CarePlan.CarePlanStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT; + case DRAFT: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.CANCELLED; + default: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { +// case PROPOSED: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.PROPOSED; + case DRAFT: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.CANCELLED; + default: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.instance.model.ClinicalImpression src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ClinicalImpression tgt = new org.hl7.fhir.r4.model.ClinicalImpression(); + copyDomainResource(src, tgt); + tgt.setSubject(convertReference(src.getPatient())); + tgt.setAssessor(convertReference(src.getAssessor())); + tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + tgt.setPrevious(convertReference(src.getPrevious())); + for (org.hl7.fhir.instance.model.Reference t : src.getProblem()) + tgt.addProblem(convertReference(t)); +// for (org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent t : src.getInvestigations()) +// tgt.addInvestigations(convertClinicalImpressionInvestigationsComponent(t)); + tgt.addProtocol(src.getProtocol()); + tgt.setSummary(src.getSummary()); + for (org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) + tgt.addFinding(convertClinicalImpressionFindingComponent(t)); + if (src.hasPrognosis()) + tgt.addPrognosisCodeableConcept ().setText(src.getPrognosis()); +// for (org.hl7.fhir.instance.model.Reference t : src.getPlan()) +// tgt.addPlan(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getAction()) + tgt.addAction(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.r4.model.ClinicalImpression src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ClinicalImpression tgt = new org.hl7.fhir.instance.model.ClinicalImpression(); + copyDomainResource(src, tgt); + tgt.setPatient(convertReference(src.getSubject())); + tgt.setAssessor(convertReference(src.getAssessor())); + tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + tgt.setPrevious(convertReference(src.getPrevious())); + for (org.hl7.fhir.r4.model.Reference t : src.getProblem()) + tgt.addProblem(convertReference(t)); +// for (org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent t : src.getInvestigations()) +// tgt.addInvestigations(convertClinicalImpressionInvestigationsComponent(t)); + for (UriType t : src.getProtocol()) + tgt.setProtocol(t.asStringValue()); + tgt.setSummary(src.getSummary()); + for (org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) + tgt.addFinding(convertClinicalImpressionFindingComponent(t)); + tgt.setPrognosis(src.getPrognosisCodeableConceptFirstRep().getText()); +// for (org.hl7.fhir.r4.model.Reference t : src.getPlan()) +// tgt.addPlan(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getAction()) + tgt.addAction(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent(); + copyElement(src, tgt); + tgt.setItem(convertCodeableConcept(src.getItem())); +// tgt.setCause(src.getCause()); + return tgt; + } + + public org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent(); + copyElement(src, tgt); + if (src.hasItemCodeableConcept()) + try { + tgt.setItem(convertCodeableConcept(src.getItemCodeableConcept())); + } catch (org.hl7.fhir.exceptions.FHIRException e) { + } +// tgt.setCause(src.getCause()); + return tgt; + } + + public org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT; + case COMPLETED: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.CodeType convertCode(org.hl7.fhir.instance.model.CodeType src) throws FHIRException { + org.hl7.fhir.r4.model.CodeType tgt = new org.hl7.fhir.r4.model.CodeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException { + org.hl7.fhir.instance.model.CodeType tgt = new org.hl7.fhir.instance.model.CodeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.r4.model.CodeSystem src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent(); + copyElement(src, tgt); + tgt.setSystem(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setCaseSensitive(src.getCaseSensitive()); + + for (ConceptDefinitionComponent cc : src.getConcept()) + tgt.addConcept(convertCodeSystemConcept(src, cc)); + return tgt; + } + +public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent convertCodeSystemConcept(CodeSystem cs, ConceptDefinitionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent(); + copyElement(src, tgt); + tgt.setAbstract(CodeSystemUtilities.isNotSelectable(cs, src)); + tgt.setCode(src.getCode()); + tgt.setDefinition(src.getDefinition()); + tgt.setDisplay(src.getDisplay()); + + for (ConceptDefinitionComponent cc : src.getConcept()) + tgt.addConcept(convertCodeSystemConcept(cs, cc)); + for (ConceptDefinitionDesignationComponent cc : src.getDesignation()) + tgt.addDesignation(convertCodeSystemDesignation(cc)); + return tgt; + } + +public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent convertCodeSystemDesignation(ConceptDefinitionDesignationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent(); + copyElement(src, tgt); + tgt.setUse(convertCoding(src.getUse())); + tgt.setLanguage(src.getLanguage()); + tgt.setValue(src.getValue()); + + return tgt; + } + + public org.hl7.fhir.r4.model.UriType convertCodeToUri(org.hl7.fhir.instance.model.CodeType src) throws FHIRException { + org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.instance.model.CodeableConcept src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CodeableConcept tgt = new org.hl7.fhir.r4.model.CodeableConcept(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.Coding t : src.getCoding()) + tgt.addCoding(convertCoding(t)); + tgt.setText(src.getText()); + return tgt; + } + + public org.hl7.fhir.instance.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.r4.model.CodeableConcept src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.CodeableConcept tgt = new org.hl7.fhir.instance.model.CodeableConcept(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Coding t : src.getCoding()) + tgt.addCoding(convertCoding(t)); + tgt.setText(src.getText()); + return tgt; + } + + public org.hl7.fhir.r4.model.UsageContext convertCodeableConceptToUsageContext(org.hl7.fhir.instance.model.CodeableConcept t) throws FHIRException { + org.hl7.fhir.r4.model.UsageContext result = new org.hl7.fhir.r4.model.UsageContext(); + // todo: set type.. + result.setValue(convertCodeableConcept(t)); + return result; + } + + public org.hl7.fhir.r4.model.Coding convertCoding(org.hl7.fhir.instance.model.Coding src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Coding tgt = new org.hl7.fhir.r4.model.Coding(); + copyElement(src, tgt); + tgt.setSystem(src.getSystem()); + tgt.setVersion(src.getVersion()); + tgt.setCode(src.getCode()); + tgt.setDisplay(src.getDisplay()); + tgt.setUserSelected(src.getUserSelected()); + return tgt; + } + + public org.hl7.fhir.instance.model.Coding convertCoding(org.hl7.fhir.r4.model.Coding src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Coding tgt = new org.hl7.fhir.instance.model.Coding(); + copyElement(src, tgt); + tgt.setSystem(src.getSystem()); + tgt.setVersion(src.getVersion()); + tgt.setCode(src.getCode()); + tgt.setDisplay(src.getDisplay()); + tgt.setUserSelected(src.getUserSelected()); + return tgt; + } + + public org.hl7.fhir.r4.model.Communication convertCommunication(org.hl7.fhir.instance.model.Communication src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Communication tgt = new org.hl7.fhir.r4.model.Communication(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.addCategory(convertCodeableConcept(src.getCategory())); + tgt.setSender(convertReference(src.getSender())); + for (org.hl7.fhir.instance.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + for (org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent t : src.getPayload()) + tgt.addPayload(convertCommunicationPayloadComponent(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getMedium()) + tgt.addMedium(convertCodeableConcept(t)); + tgt.setStatus(convertCommunicationStatus(src.getStatus())); + tgt.setContext(convertReference(src.getEncounter())); + tgt.setSent(src.getSent()); + tgt.setReceived(src.getReceived()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) + tgt.addReasonCode(convertCodeableConcept(t)); + tgt.setSubject(convertReference(src.getSubject())); + return tgt; + } + + public org.hl7.fhir.instance.model.Communication convertCommunication(org.hl7.fhir.r4.model.Communication src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Communication tgt = new org.hl7.fhir.instance.model.Communication(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep())); + tgt.setSender(convertReference(src.getSender())); + for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + for (org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent t : src.getPayload()) + tgt.addPayload(convertCommunicationPayloadComponent(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMedium()) + tgt.addMedium(convertCodeableConcept(t)); + tgt.setStatus(convertCommunicationStatus(src.getStatus())); + tgt.setEncounter(convertReference(src.getContext())); + tgt.setSent(src.getSent()); + tgt.setReceived(src.getReceived()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) + tgt.addReason(convertCodeableConcept(t)); + tgt.setSubject(convertReference(src.getSubject())); + return tgt; + } + + public org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.r4.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.instance.model.CommunicationRequest src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CommunicationRequest tgt = new org.hl7.fhir.r4.model.CommunicationRequest(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.addCategory(convertCodeableConcept(src.getCategory())); + tgt.setSender(convertReference(src.getSender())); + for (org.hl7.fhir.instance.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + for (org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) + tgt.addPayload(convertCommunicationRequestPayloadComponent(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getMedium()) + tgt.addMedium(convertCodeableConcept(t)); + tgt.getRequester().setAgent(convertReference(src.getRequester())); + tgt.setStatus(convertCommunicationRequestStatus(src.getStatus())); + tgt.setContext(convertReference(src.getEncounter())); + tgt.setOccurrence(convertType(src.getScheduled())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) + tgt.addReasonCode(convertCodeableConcept(t)); + tgt.setAuthoredOn(src.getRequestedOn()); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setPriority(convertPriorityCode(src.getPriority())); + return tgt; + } + + public org.hl7.fhir.instance.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.r4.model.CommunicationRequest src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.CommunicationRequest tgt = new org.hl7.fhir.instance.model.CommunicationRequest(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep())); + tgt.setSender(convertReference(src.getSender())); + for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + for (org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) + tgt.addPayload(convertCommunicationRequestPayloadComponent(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMedium()) + tgt.addMedium(convertCodeableConcept(t)); + tgt.setRequester(convertReference(src.getRequester().getAgent())); + tgt.setStatus(convertCommunicationRequestStatus(src.getStatus())); + tgt.setEncounter(convertReference(src.getContext())); + tgt.setScheduled(convertType(src.getOccurrence())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) + tgt.addReason(convertCodeableConcept(t)); + tgt.setRequestedOn(src.getAuthoredOn()); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setPriority(convertPriorityCode(src.getPriority())); + return tgt; + } + + public org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.DRAFT; + case PLANNED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case REQUESTED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case RECEIVED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case ACCEPTED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case INPROGRESS: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; + case SUSPENDED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; + case REJECTED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR; +// case FAILED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.FAILED; + default: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.PROPOSED; +// case PLANNED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.PLANNED; +// case REQUESTED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.REQUESTED; +// case RECEIVED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.RECEIVED; +// case ACCEPTED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.ACCEPTED; + case ACTIVE: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; + case SUSPENDED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.REJECTED; +// case FAILED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.FAILED; + default: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.instance.model.Communication.CommunicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.COMPLETED; + case SUSPENDED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.SUSPENDED; + case REJECTED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ENTEREDINERROR; + case FAILED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ABORTED; + default: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.r4.model.Communication.CommunicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.COMPLETED; + case SUSPENDED: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.SUSPENDED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.REJECTED; + case ABORTED: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.FAILED; + default: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Composition convertComposition(org.hl7.fhir.instance.model.Composition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Composition tgt = new org.hl7.fhir.r4.model.Composition(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setClass_(convertCodeableConcept(src.getClass_())); + tgt.setTitle(src.getTitle()); + tgt.setStatus(convertCompositionStatus(src.getStatus())); + try { + tgt.setConfidentiality(org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.fromCode(src.getConfidentiality())); + } catch (org.hl7.fhir.exceptions.FHIRException e) { + throw new FHIRException(e); + } + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.instance.model.Reference t : src.getAuthor()) + tgt.addAuthor(convertReference(t)); + for (org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent t : src.getAttester()) + tgt.addAttester(convertCompositionAttesterComponent(t)); + tgt.setCustodian(convertReference(src.getCustodian())); + for (org.hl7.fhir.instance.model.Composition.CompositionEventComponent t : src.getEvent()) + tgt.addEvent(convertCompositionEventComponent(t)); + tgt.setEncounter(convertReference(src.getEncounter())); + for (org.hl7.fhir.instance.model.Composition.SectionComponent t : src.getSection()) + tgt.addSection(convertSectionComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Composition convertComposition(org.hl7.fhir.r4.model.Composition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Composition tgt = new org.hl7.fhir.instance.model.Composition(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setClass_(convertCodeableConcept(src.getClass_())); + tgt.setTitle(src.getTitle()); + tgt.setStatus(convertCompositionStatus(src.getStatus())); + tgt.setConfidentiality(src.getConfidentiality().toCode()); + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) + tgt.addAuthor(convertReference(t)); + for (org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent t : src.getAttester()) + tgt.addAttester(convertCompositionAttesterComponent(t)); + tgt.setCustodian(convertReference(src.getCustodian())); + for (org.hl7.fhir.r4.model.Composition.CompositionEventComponent t : src.getEvent()) + tgt.addEvent(convertCompositionEventComponent(t)); + tgt.setEncounter(convertReference(src.getEncounter())); + for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) + tgt.addSection(convertSectionComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.instance.model.Composition.CompositionAttestationMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PERSONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PERSONAL; + case PROFESSIONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PROFESSIONAL; + case LEGAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.LEGAL; + case OFFICIAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.OFFICIAL; + default: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.NULL; + } + } + + public org.hl7.fhir.instance.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.r4.model.Composition.CompositionAttestationMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PERSONAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.PERSONAL; + case PROFESSIONAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.PROFESSIONAL; + case LEGAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.LEGAL; + case OFFICIAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.OFFICIAL; + default: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.NULL; + } + } + + public org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.Enumeration t : src.getMode()) + tgt.addMode(convertCompositionAttestationMode(t.getValue())); + tgt.setTime(src.getTime()); + tgt.setParty(convertReference(src.getParty())); + return tgt; + } + + public org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Enumeration t : src.getMode()) + tgt.addMode(convertCompositionAttestationMode(t.getValue())); + tgt.setTime(src.getTime()); + tgt.setParty(convertReference(src.getParty())); + return tgt; + } + + public org.hl7.fhir.r4.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.instance.model.Composition.CompositionEventComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionEventComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCode()) + tgt.addCode(convertCodeableConcept(t)); + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.instance.model.Reference t : src.getDetail()) + tgt.addDetail(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.r4.model.Composition.CompositionEventComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.instance.model.Composition.CompositionEventComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) + tgt.addCode(convertCodeableConcept(t)); + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) + tgt.addDetail(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.instance.model.Composition.CompositionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRELIMINARY: return org.hl7.fhir.r4.model.Composition.CompositionStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.Composition.CompositionStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.Composition.CompositionStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Composition.CompositionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Composition.CompositionStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.r4.model.Composition.CompositionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRELIMINARY: return org.hl7.fhir.instance.model.Composition.CompositionStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.instance.model.Composition.CompositionStatus.FINAL; + case AMENDED: return org.hl7.fhir.instance.model.Composition.CompositionStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Composition.CompositionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.Composition.CompositionStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.r4.model.ConceptMap convertConceptMap(org.hl7.fhir.instance.model.ConceptMap src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) + tgt.addContact(convertConceptMapContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgt.addJurisdiction(convertCodeableConcept(t)); + else + tgt.addUseContext(convertCodeableConceptToUsageContext(t)); + tgt.setPurpose(src.getRequirements()); + tgt.setCopyright(src.getCopyright()); + tgt.setSource(convertType(src.getSource())); + tgt.setTarget(convertType(src.getTarget())); + for (org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent t : src.getElement()) { + List ws = convertSourceElementComponent(t); + for (SourceElementComponentWrapper w : ws) + getGroup(tgt, w.source, w.target).addElement(w.comp); + } + return tgt; + } + + public org.hl7.fhir.instance.model.ConceptMap convertConceptMap(org.hl7.fhir.r4.model.ConceptMap src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ConceptMap tgt = new org.hl7.fhir.instance.model.ConceptMap(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertConceptMapContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) + if (t.hasValueCodeableConcept()) + tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) + tgt.addUseContext(convertCodeableConcept(t)); + tgt.setRequirements(src.getPurpose()); + tgt.setCopyright(src.getCopyright()); + tgt.setSource(convertType(src.getSource())); + tgt.setTarget(convertType(src.getTarget())); + for (org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup()) + for (org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent t : g.getElement()) + tgt.addElement(convertSourceElementComponent(t, g)); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertConceptMapContactComponent(org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent convertConceptMapContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUIVALENT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; + case EQUAL: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUAL; + case WIDER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER; + case SUBSUMES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SUBSUMES; + case NARROWER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER; + case SPECIALIZES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; + case INEXACT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.INEXACT; + case UNMATCHED: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED; + case DISJOINT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT; + default: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL; + } + } + + public org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUIVALENT: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; + case EQUAL: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.EQUAL; + case WIDER: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.WIDER; + case SUBSUMES: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.SUBSUMES; + case NARROWER: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.NARROWER; + case SPECIALIZES: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; + case INEXACT: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.INEXACT; + case UNMATCHED: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.UNMATCHED; + case DISJOINT: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.DISJOINT; + default: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.NULL; + } + } + + public org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); + copyElement(src, tgt); + tgt.setCode(src.getCode()); + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent(); + copyElement(src, tgt); + tgt.setCode(src.getCode()); + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); + copyElement(src, tgt); + tgt.setLanguage(src.getLanguage()); + tgt.setUse(convertCoding(src.getUse())); + tgt.setValue(src.getValue()); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent(); + copyElement(src, tgt); + tgt.setLanguage(src.getLanguage()); + tgt.setUse(convertCoding(src.getUse())); + tgt.setValue(src.getValue()); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); + copyElement(src, tgt); + tgt.setSystem(src.getSystem()); + tgt.setVersion(src.getVersion()); + for (org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) + tgt.addConcept(convertConceptReferenceComponent(t)); + for (org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) + tgt.addFilter(convertConceptSetFilterComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent(); + copyElement(src, tgt); + tgt.setSystem(src.getSystem()); + tgt.setVersion(src.getVersion()); + for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) + tgt.addConcept(convertConceptReferenceComponent(t)); + for (org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) + tgt.addFilter(convertConceptSetFilterComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); + copyElement(src, tgt); + tgt.setProperty(src.getProperty()); + tgt.setOp(convertFilterOperator(src.getOp())); + tgt.setValue(src.getValue()); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent(); + copyElement(src, tgt); + tgt.setProperty(src.getProperty()); + tgt.setOp(convertFilterOperator(src.getOp())); + tgt.setValue(src.getValue()); + return tgt; + } + + public org.hl7.fhir.r4.model.Condition convertCondition(org.hl7.fhir.instance.model.Condition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Condition tgt = new org.hl7.fhir.r4.model.Condition(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getPatient())); + tgt.setContext(convertReference(src.getEncounter())); + tgt.setAsserter(convertReference(src.getAsserter())); + if (src.hasDateRecorded()) + tgt.setAssertedDate(src.getDateRecorded()); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.addCategory(convertCodeableConcept(src.getCategory())); + try { + tgt.setClinicalStatus(org.hl7.fhir.r4.model.Condition.ConditionClinicalStatus.fromCode(src.getClinicalStatus())); + } catch (org.hl7.fhir.exceptions.FHIRException e) { + throw new FHIRException(e); + } + tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus())); + tgt.setSeverity(convertCodeableConcept(src.getSeverity())); + tgt.setOnset(convertType(src.getOnset())); + tgt.setAbatement(convertType(src.getAbatement())); + tgt.addStage(convertConditionStageComponent(src.getStage())); + for (org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) + tgt.addEvidence(convertConditionEvidenceComponent(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getBodySite()) + tgt.addBodySite(convertCodeableConcept(t)); +// tgt.setNotes(src.getNotes()); + return tgt; + } + + public org.hl7.fhir.instance.model.Condition convertCondition(org.hl7.fhir.r4.model.Condition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Condition tgt = new org.hl7.fhir.instance.model.Condition(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setPatient(convertReference(src.getSubject())); + tgt.setEncounter(convertReference(src.getContext())); + tgt.setAsserter(convertReference(src.getAsserter())); + if (src.hasAssertedDate()) + tgt.setDateRecorded(src.getAssertedDate()); + tgt.setCode(convertCodeableConcept(src.getCode())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) + tgt.setCategory(convertCodeableConcept(t)); + tgt.setClinicalStatus(src.getClinicalStatus().toCode()); + tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus())); + tgt.setSeverity(convertCodeableConcept(src.getSeverity())); + tgt.setOnset(convertType(src.getOnset())); + tgt.setAbatement(convertType(src.getAbatement())); + tgt.setStage(convertConditionStageComponent(src.getStageFirstRep())); + for (org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) + tgt.addEvidence(convertConditionEvidenceComponent(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getBodySite()) + tgt.addBodySite(convertCodeableConcept(t)); +// tgt.setNotes(src.getNotes()); + return tgt; + } + + public org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent(); + copyElement(src, tgt); + tgt.addCode(convertCodeableConcept(src.getCode())); + for (org.hl7.fhir.instance.model.Reference t : src.getDetail()) + tgt.addDetail(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept cc : src.getCode()) + tgt.setCode(convertCodeableConcept(cc)); + for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) + tgt.addDetail(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.instance.model.Condition.ConditionStageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionStageComponent(); + copyElement(src, tgt); + tgt.setSummary(convertCodeableConcept(src.getSummary())); + for (org.hl7.fhir.instance.model.Reference t : src.getAssessment()) + tgt.addAssessment(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.r4.model.Condition.ConditionStageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.instance.model.Condition.ConditionStageComponent(); + copyElement(src, tgt); + tgt.setSummary(convertCodeableConcept(src.getSummary())); + for (org.hl7.fhir.r4.model.Reference t : src.getAssessment()) + tgt.addAssessment(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROVISIONAL: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.PROVISIONAL; + case DIFFERENTIAL: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.DIFFERENTIAL; + case CONFIRMED: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.CONFIRMED; + case REFUTED: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.REFUTED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROVISIONAL: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.PROVISIONAL; + case DIFFERENTIAL: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.DIFFERENTIAL; + case CONFIRMED: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.CONFIRMED; + case REFUTED: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.REFUTED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.UNKNOWN; + default: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTSUPPORTED: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED; + case SINGLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE; + case MULTIPLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE; + default: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTSUPPORTED: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.NOTSUPPORTED; + case SINGLE: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.SINGLE; + case MULTIPLE: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.MULTIPLE; + default: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement convertConformance(org.hl7.fhir.instance.model.Conformance src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent t : src.getContact()) + tgt.addContact(convertConformanceContactComponent(t)); + tgt.setDescription(src.getDescription()); + tgt.setPurpose(src.getRequirements()); + tgt.setCopyright(src.getCopyright()); + tgt.setKind(convertConformanceStatementKind(src.getKind())); + tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware())); + tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); + tgt.setFhirVersion(src.getFhirVersion()); + tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); + for (org.hl7.fhir.instance.model.CodeType t : src.getFormat()) + tgt.addFormat(t.getValue()); + for (org.hl7.fhir.instance.model.Reference t : src.getProfile()) + tgt.addProfile(convertReference(t)); + for (org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent t : src.getRest()) + tgt.addRest(convertConformanceRestComponent(t)); + for (org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent t : src.getMessaging()) + tgt.addMessaging(convertConformanceMessagingComponent(t)); + for (org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent t : src.getDocument()) + tgt.addDocument(convertConformanceDocumentComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance convertConformance(org.hl7.fhir.r4.model.CapabilityStatement src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance tgt = new org.hl7.fhir.instance.model.Conformance(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertConformanceContactComponent(t)); + tgt.setDescription(src.getDescription()); + tgt.setRequirements(src.getPurpose()); + tgt.setCopyright(src.getCopyright()); + tgt.setKind(convertConformanceStatementKind(src.getKind())); + tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware())); + if (src.hasImplementation()) + tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); + tgt.setFhirVersion(src.getFhirVersion()); + tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); + for (org.hl7.fhir.r4.model.CodeType t : src.getFormat()) + tgt.addFormat(t.getValue()); + for (org.hl7.fhir.r4.model.Reference t : src.getProfile()) + tgt.addProfile(convertReference(t)); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest()) + tgt.addRest(convertConformanceRestComponent(t)); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging()) + tgt.addMessaging(convertConformanceMessagingComponent(t)); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument()) + tgt.addDocument(convertConformanceDocumentComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertConformanceContactComponent(org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent(); + copyElement(src, tgt); + tgt.setMode(convertDocumentMode(src.getMode())); + tgt.setDocumentation(src.getDocumentation()); + tgt.setProfile(convertReference(src.getProfile())); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent(); + copyElement(src, tgt); + tgt.setMode(convertDocumentMode(src.getMode())); + tgt.setDocumentation(src.getDocumentation()); + tgt.setProfile(convertReference(src.getProfile())); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode convertConformanceEventMode(org.hl7.fhir.instance.model.Conformance.ConformanceEventMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case SENDER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.SENDER; + case RECEIVER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.RECEIVER; + default: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceEventMode convertConformanceEventMode(org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case SENDER: return org.hl7.fhir.instance.model.Conformance.ConformanceEventMode.SENDER; + case RECEIVER: return org.hl7.fhir.instance.model.Conformance.ConformanceEventMode.RECEIVER; + default: return org.hl7.fhir.instance.model.Conformance.ConformanceEventMode.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent(); + copyElement(src, tgt); + tgt.setDescription(src.getDescription()); + tgt.setUrl(src.getUrl()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent(); + copyElement(src, tgt); + tgt.setDescription(src.getDescription()); + tgt.setUrl(src.getUrl()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) + tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); + tgt.setReliableCache(src.getReliableCache()); + tgt.setDocumentation(src.getDocumentation()); + for (org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) + tgt.addEvent(convertConformanceMessagingEventComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) + tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); + tgt.setReliableCache(src.getReliableCache()); + tgt.setDocumentation(src.getDocumentation()); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) + tgt.addEvent(convertConformanceMessagingEventComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); + copyElement(src, tgt); + tgt.setProtocol(convertCoding(src.getProtocol())); + tgt.setAddress(src.getAddress()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent(); + copyElement(src, tgt); + tgt.setProtocol(convertCoding(src.getProtocol())); + tgt.setAddress(src.getAddress()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent(); + copyElement(src, tgt); + tgt.setCode(convertCoding(src.getCode())); + tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); + tgt.setMode(convertConformanceEventMode(src.getMode())); + tgt.setFocus(src.getFocus()); + tgt.setRequest(convertReference(src.getRequest())); + tgt.setResponse(convertReference(src.getResponse())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent(); + copyElement(src, tgt); + tgt.setCode(convertCoding(src.getCode())); + tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); + tgt.setMode(convertConformanceEventMode(src.getMode())); + tgt.setFocus(src.getFocus()); + tgt.setRequest(convertReference(src.getRequest())); + tgt.setResponse(convertReference(src.getResponse())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.r4.model.Enumerations.PublicationStatus convertConformanceResourceStatus(org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE; + case RETIRED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED; + default: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus convertConformanceResourceStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.ACTIVE; + case RETIRED: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.RETIRED; + default: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent convertConformanceRestComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent(); + copyElement(src, tgt); + tgt.setMode(convertRestfulConformanceMode(src.getMode())); + tgt.setDocumentation(src.getDocumentation()); + tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); + for (org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent t : src.getResource()) + tgt.addResource(convertConformanceRestResourceComponent(t)); + for (org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent t : src.getInteraction()) + tgt.addInteraction(convertSystemInteractionComponent(t)); + if (src.getTransactionMode() == org.hl7.fhir.instance.model.Conformance.TransactionMode.BATCH || src.getTransactionMode() == org.hl7.fhir.instance.model.Conformance.TransactionMode.BOTH) + tgt.addInteraction().setCode(SystemRestfulInteraction.BATCH); + for (org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) + tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); + for (org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent t : src.getOperation()) + tgt.addOperation(convertConformanceRestOperationComponent(t)); + for (org.hl7.fhir.instance.model.UriType t : src.getCompartment()) + tgt.addCompartment(t.getValue()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent(); + copyElement(src, tgt); + tgt.setMode(convertRestfulConformanceMode(src.getMode())); + tgt.setDocumentation(src.getDocumentation()); + tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) + tgt.addResource(convertConformanceRestResourceComponent(t)); + boolean batch = false; + boolean transaction = false; + for (org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) { + if (t.getCode().equals(SystemRestfulInteraction.BATCH)) + batch = true; + else + tgt.addInteraction(convertSystemInteractionComponent(t)); + if (t.getCode().equals(SystemRestfulInteraction.TRANSACTION)) + transaction = true; + } + if (batch) + tgt.setTransactionMode(transaction ? org.hl7.fhir.instance.model.Conformance.TransactionMode.BOTH : org.hl7.fhir.instance.model.Conformance.TransactionMode.BATCH); + else + tgt.setTransactionMode(transaction ? org.hl7.fhir.instance.model.Conformance.TransactionMode.TRANSACTION : org.hl7.fhir.instance.model.Conformance.TransactionMode.NOTSUPPORTED); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) + tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) + tgt.addOperation(convertConformanceRestOperationComponent(t)); + for (org.hl7.fhir.r4.model.UriType t : src.getCompartment()) + tgt.addCompartment(t.getValue()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setDefinition(convertReference(src.getDefinition())); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setDefinition(convertReference(src.getDefinition())); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setProfile(convertReference(src.getProfile())); + for (org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent t : src.getInteraction()) + tgt.addInteraction(convertResourceInteractionComponent(t)); + tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); + tgt.setReadHistory(src.getReadHistory()); + tgt.setUpdateCreate(src.getUpdateCreate()); + tgt.setConditionalCreate(src.getConditionalCreate()); + tgt.setConditionalUpdate(src.getConditionalUpdate()); + tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); + for (org.hl7.fhir.instance.model.StringType t : src.getSearchInclude()) + tgt.addSearchInclude(t.getValue()); + for (org.hl7.fhir.instance.model.StringType t : src.getSearchRevInclude()) + tgt.addSearchRevInclude(t.getValue()); + for (org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) + tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); + for (org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) + tgt.addInteraction(convertResourceInteractionComponent(t)); + tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); + tgt.setReadHistory(src.getReadHistory()); + tgt.setUpdateCreate(src.getUpdateCreate()); + tgt.setConditionalCreate(src.getConditionalCreate()); + tgt.setConditionalUpdate(src.getConditionalUpdate()); + tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); + for (org.hl7.fhir.r4.model.StringType t : src.getSearchInclude()) + tgt.addSearchInclude(t.getValue()); + for (org.hl7.fhir.r4.model.StringType t : src.getSearchRevInclude()) + tgt.addSearchRevInclude(t.getValue()); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) + tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setDefinition(src.getDefinition()); + tgt.setType(convertSearchParamType(src.getType())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setDefinition(src.getDefinition()); + tgt.setType(convertSearchParamType(src.getType())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setBlob(src.getBlob()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setBlob(src.getBlob()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); + copyElement(src, tgt); + tgt.setCors(src.getCors()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getService()) + tgt.addService(convertCodeableConcept(t)); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate()) + tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent(); + copyElement(src, tgt); + tgt.setCors(src.getCors()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) + tgt.addService(convertCodeableConcept(t)); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) + tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setVersion(src.getVersion()); + tgt.setReleaseDate(src.getReleaseDate()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setVersion(src.getVersion()); + tgt.setReleaseDate(src.getReleaseDate()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind convertConformanceStatementKind(org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.INSTANCE; + case CAPABILITY: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY; + case REQUIREMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS; + default: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind convertConformanceStatementKind(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INSTANCE: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.INSTANCE; + case CAPABILITY: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.CAPABILITY; + case REQUIREMENTS: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.REQUIREMENTS; + default: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.NULL; + } + } + + public org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ERROR: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.ERROR; + case WARNING: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.WARNING; + default: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.NULL; + } + } + + public org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ERROR: return org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity.ERROR; + case WARNING: return org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity.WARNING; + default: return org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity.NULL; + } + } + + public org.hl7.fhir.r4.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.instance.model.Patient.ContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Patient.ContactComponent tgt = new org.hl7.fhir.r4.model.Patient.ContactComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRelationship()) + tgt.addRelationship(convertCodeableConcept(t)); + tgt.setName(convertHumanName(src.getName())); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + tgt.setAddress(convertAddress(src.getAddress())); + tgt.setGender(convertAdministrativeGender(src.getGender())); + tgt.setOrganization(convertReference(src.getOrganization())); + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public org.hl7.fhir.instance.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.r4.model.Patient.ContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Patient.ContactComponent tgt = new org.hl7.fhir.instance.model.Patient.ContactComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRelationship()) + tgt.addRelationship(convertCodeableConcept(t)); + tgt.setName(convertHumanName(src.getName())); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + tgt.setAddress(convertAddress(src.getAddress())); + tgt.setGender(convertAdministrativeGender(src.getGender())); + tgt.setOrganization(convertReference(src.getOrganization())); + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + public org.hl7.fhir.r4.model.ContactPoint convertContactPoint(org.hl7.fhir.instance.model.ContactPoint src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -939,6 +3057,1278 @@ public class VersionConvertor_10_40 { } } + public org.hl7.fhir.r4.model.TestScript.ContentType convertContentType(org.hl7.fhir.instance.model.TestScript.ContentType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case XML: return org.hl7.fhir.r4.model.TestScript.ContentType.XML; + case JSON: return org.hl7.fhir.r4.model.TestScript.ContentType.JSON; + default: return org.hl7.fhir.r4.model.TestScript.ContentType.NULL; + } + } + + public org.hl7.fhir.instance.model.TestScript.ContentType convertContentType(org.hl7.fhir.r4.model.TestScript.ContentType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case XML: return org.hl7.fhir.instance.model.TestScript.ContentType.XML; + case JSON: return org.hl7.fhir.instance.model.TestScript.ContentType.JSON; + default: return org.hl7.fhir.instance.model.TestScript.ContentType.NULL; + } + } + + public org.hl7.fhir.r4.model.Contract convertContract(org.hl7.fhir.instance.model.Contract src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract tgt = new org.hl7.fhir.r4.model.Contract(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setIssued(src.getIssued()); + tgt.setApplies(convertPeriod(src.getApplies())); + for (org.hl7.fhir.instance.model.Reference t : src.getSubject()) + tgt.addSubject(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getAuthority()) + tgt.addAuthority(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getDomain()) + tgt.addDomain(convertReference(t)); + tgt.setType(convertCodeableConcept(src.getType())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getSubType()) + tgt.addSubType(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.Contract.SignatoryComponent t : src.getSigner()) + tgt.addSigner(convertSignatoryComponent(t)); + for (org.hl7.fhir.instance.model.Contract.TermComponent t : src.getTerm()) + tgt.addTerm(convertTermComponent(t)); + for (org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) + tgt.addFriendly(convertFriendlyLanguageComponent(t)); + for (org.hl7.fhir.instance.model.Contract.LegalLanguageComponent t : src.getLegal()) + tgt.addLegal(convertLegalLanguageComponent(t)); + for (org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent t : src.getRule()) + tgt.setRule(convertComputableLanguageComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract convertContract(org.hl7.fhir.r4.model.Contract src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract tgt = new org.hl7.fhir.instance.model.Contract(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setIssued(src.getIssued()); + tgt.setApplies(convertPeriod(src.getApplies())); + for (org.hl7.fhir.r4.model.Reference t : src.getSubject()) + tgt.addSubject(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getAuthority()) + tgt.addAuthority(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getDomain()) + tgt.addDomain(convertReference(t)); + tgt.setType(convertCodeableConcept(src.getType())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubType()) + tgt.addSubType(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Contract.SignatoryComponent t : src.getSigner()) + tgt.addSigner(convertSignatoryComponent(t)); + for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getTerm()) + tgt.addTerm(convertTermComponent(t)); + for (org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) + tgt.addFriendly(convertFriendlyLanguageComponent(t)); + for (org.hl7.fhir.r4.model.Contract.LegalLanguageComponent t : src.getLegal()) + tgt.addLegal(convertLegalLanguageComponent(t)); + if (src.hasRule()) + tgt.addRule(convertComputableLanguageComponent(src.getRule())); + return tgt; + } + + public org.hl7.fhir.r4.model.Count convertCount(org.hl7.fhir.instance.model.Count src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Count tgt = new org.hl7.fhir.r4.model.Count(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.Count convertCount(org.hl7.fhir.r4.model.Count src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Count tgt = new org.hl7.fhir.instance.model.Count(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition convertDataElement(org.hl7.fhir.instance.model.DataElement src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); + copyDomainResource(src, tgt); + if (src.hasUrl()) + tgt.setUrl(src.getUrl().replace("/DataElement/", "/StructureDefinition/de-")); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setVersion(src.getVersion()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.DataElement.DataElementContactComponent t : src.getContact()) + tgt.addContact(convertDataElementContactComponent(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgt.addJurisdiction(convertCodeableConcept(t)); + else + tgt.addUseContext(convertCodeableConceptToUsageContext(t)); + tgt.setCopyright(src.getCopyright()); +// tgt.setStringency(convertDataElementStringency(src.getStringency())); + for (org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent t : src.getMapping()) + tgt.addMapping(convertDataElementMappingComponent(t)); + List slicePaths = new ArrayList(); + for (org.hl7.fhir.instance.model.ElementDefinition t : src.getElement()) { + if (t.hasSlicing()) + slicePaths.add(t.getPath()); + tgt.getSnapshot().addElement(convertElementDefinition(t, slicePaths)); + } + tgt.setKind(StructureDefinitionKind.LOGICAL); + tgt.setAbstract(false); + tgt.setType(tgt.getName()); + tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/Element"); + tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertDataElementContactComponent(org.hl7.fhir.instance.model.DataElement.DataElementContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DataElement.DataElementContactComponent convertDataElementContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.instance.model.DataElement.DataElementContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertDataElementMappingComponent(org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); + copyElement(src, tgt); + tgt.setIdentity(src.getIdentity()); + tgt.setUri(src.getUri()); + tgt.setName(src.getName()); + tgt.setComment(src.getComments()); + return tgt; + } + + public org.hl7.fhir.r4.model.DateType convertDate(org.hl7.fhir.instance.model.DateType src) throws FHIRException { + org.hl7.fhir.r4.model.DateType tgt = new org.hl7.fhir.r4.model.DateType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.DateType convertDate(org.hl7.fhir.instance.model.DateTimeType src) throws FHIRException { + org.hl7.fhir.r4.model.DateType tgt = new org.hl7.fhir.r4.model.DateType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.DateType convertDate(org.hl7.fhir.r4.model.DateType src) throws FHIRException { + org.hl7.fhir.instance.model.DateType tgt = new org.hl7.fhir.instance.model.DateType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.DateType convertDate(org.hl7.fhir.r4.model.DateTimeType src) throws FHIRException { + org.hl7.fhir.instance.model.DateType tgt = new org.hl7.fhir.instance.model.DateType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + +// public org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent convertCarePlanRelatedPlanComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent(); +// copyElement(src, tgt); +// tgt.setCode(convertCarePlanRelationship(src.getCode())); +// tgt.setPlan(convertReference(src.getPlan())); +// return tgt; +// } + +// public org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent convertCarePlanRelatedPlanComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent(); +// copyElement(src, tgt); +// tgt.setCode(convertCarePlanRelationship(src.getCode())); +// tgt.setPlan(convertReference(src.getPlan())); +// return tgt; +// } + +// public org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship convertCarePlanRelationship(org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship src) throws FHIRException { +// if (src == null) +// return null; +// switch (src) { +// case INCLUDES: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.INCLUDES; +// case REPLACES: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.REPLACES; +// case FULFILLS: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.FULFILLS; +// default: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.NULL; +// } +// } + +// public org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship convertCarePlanRelationship(org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship src) throws FHIRException { +// if (src == null) +// return null; +// switch (src) { +// case INCLUDES: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.INCLUDES; +// case REPLACES: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.REPLACES; +// case FULFILLS: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.FULFILLS; +// default: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.NULL; +// } +// } + + public org.hl7.fhir.r4.model.DateTimeType convertDateTime(org.hl7.fhir.instance.model.DateTimeType src) throws FHIRException { + org.hl7.fhir.r4.model.DateTimeType tgt = new org.hl7.fhir.r4.model.DateTimeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.DateTimeType convertDateTime(org.hl7.fhir.r4.model.DateTimeType src) throws FHIRException { + org.hl7.fhir.instance.model.DateTimeType tgt = new org.hl7.fhir.instance.model.DateTimeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.MON; + case TUE: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.TUE; + case WED: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.WED; + case THU: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.THU; + case FRI: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.FRI; + case SAT: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SAT; + case SUN: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SUN; + default: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.NULL; + } + } + + public org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.MON; + case TUE: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.TUE; + case WED: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.WED; + case THU: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.THU; + case FRI: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.FRI; + case SAT: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.SAT; + case SUN: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.SUN; + default: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.NULL; + } + } + + public org.hl7.fhir.r4.model.DecimalType convertDecimal(org.hl7.fhir.instance.model.DecimalType src) throws FHIRException { + org.hl7.fhir.r4.model.DecimalType tgt = new org.hl7.fhir.r4.model.DecimalType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.DecimalType convertDecimal(org.hl7.fhir.r4.model.DecimalType src) throws FHIRException { + org.hl7.fhir.instance.model.DecimalType tgt = new org.hl7.fhir.instance.model.DecimalType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.instance.model.DetectedIssue src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DetectedIssue tgt = new org.hl7.fhir.r4.model.DetectedIssue(); + copyDomainResource(src, tgt); + tgt.setPatient(convertReference(src.getPatient())); + tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); + for (org.hl7.fhir.instance.model.Reference t : src.getImplicated()) + tgt.addImplicated(convertReference(t)); + tgt.setDetail(src.getDetail()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setAuthor(convertReference(src.getAuthor())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setReference(src.getReference()); + for (org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) + tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.r4.model.DetectedIssue src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DetectedIssue tgt = new org.hl7.fhir.instance.model.DetectedIssue(); + copyDomainResource(src, tgt); + tgt.setPatient(convertReference(src.getPatient())); + tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); + for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) + tgt.addImplicated(convertReference(t)); + tgt.setDetail(src.getDetail()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setAuthor(convertReference(src.getAuthor())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setReference(src.getReference()); + for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) + tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent(); + copyElement(src, tgt); + tgt.setAction(convertCodeableConcept(src.getAction())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setAuthor(convertReference(src.getAuthor())); + return tgt; + } + + public org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent(); + copyElement(src, tgt); + tgt.setAction(convertCodeableConcept(src.getAction())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setAuthor(convertReference(src.getAuthor())); + return tgt; + } + +// public org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent convertClinicalImpressionInvestigationsComponent(org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent(); +// copyElement(src, tgt); +// tgt.setCode(convertCodeableConcept(src.getCode())); +// for (org.hl7.fhir.instance.model.Reference t : src.getItem()) +// tgt.addItem(convertReference(t)); +// return tgt; +// } +// +// public org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent convertClinicalImpressionInvestigationsComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent tgt = new org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent(); +// copyElement(src, tgt); +// tgt.setCode(convertCodeableConcept(src.getCode())); +// for (org.hl7.fhir.r4.model.Reference t : src.getItem()) +// tgt.addItem(convertReference(t)); +// return tgt; +// } + + public org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HIGH: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.HIGH; + case MODERATE: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.MODERATE; + case LOW: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.LOW; + default: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.NULL; + } + } + + public org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HIGH: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.HIGH; + case MODERATE: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.MODERATE; + case LOW: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.LOW; + default: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.NULL; + } + } + + public org.hl7.fhir.r4.model.Device convertDevice(org.hl7.fhir.instance.model.Device src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Device tgt = new org.hl7.fhir.r4.model.Device(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setUdi((new org.hl7.fhir.r4.model.Device.DeviceUdiComponent()).setDeviceIdentifier(src.getUdi())); + tgt.setStatus(convertDeviceStatus(src.getStatus())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setLotNumber(src.getLotNumber()); + tgt.setManufacturer(src.getManufacturer()); + tgt.setManufactureDate(src.getManufactureDate()); + tgt.setExpirationDate(src.getExpiry()); + tgt.setModel(src.getModel()); + tgt.setVersion(src.getVersion()); + tgt.setPatient(convertReference(src.getPatient())); + tgt.setOwner(convertReference(src.getOwner())); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + tgt.setLocation(convertReference(src.getLocation())); + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.instance.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Device convertDevice(org.hl7.fhir.r4.model.Device src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Device tgt = new org.hl7.fhir.instance.model.Device(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasUdi()) + tgt.setUdi(src.getUdi().getDeviceIdentifier()); + tgt.setStatus(convertDeviceStatus(src.getStatus())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setLotNumber(src.getLotNumber()); + tgt.setManufacturer(src.getManufacturer()); + tgt.setManufactureDate(src.getManufactureDate()); + tgt.setExpiry(src.getExpirationDate()); + tgt.setModel(src.getModel()); + tgt.setVersion(src.getVersion()); + tgt.setPatient(convertReference(src.getPatient())); + tgt.setOwner(convertReference(src.getOwner())); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + tgt.setLocation(convertReference(src.getLocation())); + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.instance.model.DeviceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DeviceComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent(); + copyDomainResource(src, tgt); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.addIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setLastSystemChange(src.getLastSystemChange()); + tgt.setSource(convertReference(src.getSource())); + tgt.setParent(convertReference(src.getParent())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getOperationalStatus()) + tgt.addOperationalStatus(convertCodeableConcept(t)); + tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); + tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); + for (org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) + tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); + tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); + return tgt; + } + + public org.hl7.fhir.instance.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.r4.model.DeviceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DeviceComponent tgt = new org.hl7.fhir.instance.model.DeviceComponent(); + copyDomainResource(src, tgt); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep())); + tgt.setLastSystemChange(src.getLastSystemChange()); + tgt.setSource(convertReference(src.getSource())); + tgt.setParent(convertReference(src.getParent())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOperationalStatus()) + tgt.addOperationalStatus(convertCodeableConcept(t)); + tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); + tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); + for (org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) + tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); + tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); + return tgt; + } + + public org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); + copyElement(src, tgt); + tgt.setSpecType(convertCodeableConcept(src.getSpecType())); + tgt.setComponentId(convertIdentifier(src.getComponentId())); + tgt.setProductionSpec(src.getProductionSpec()); + return tgt; + } + + public org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); + copyElement(src, tgt); + tgt.setSpecType(convertCodeableConcept(src.getSpecType())); + tgt.setComponentId(convertIdentifier(src.getComponentId())); + tgt.setProductionSpec(src.getProductionSpec()); + return tgt; + } + + public org.hl7.fhir.r4.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.instance.model.DeviceMetric src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DeviceMetric tgt = new org.hl7.fhir.r4.model.DeviceMetric(); + copyDomainResource(src, tgt); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.addIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setUnit(convertCodeableConcept(src.getUnit())); + tgt.setSource(convertReference(src.getSource())); + tgt.setParent(convertReference(src.getParent())); + tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); + tgt.setColor(convertDeviceMetricColor(src.getColor())); + tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); + tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); + for (org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) + tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.r4.model.DeviceMetric src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DeviceMetric tgt = new org.hl7.fhir.instance.model.DeviceMetric(); + copyDomainResource(src, tgt); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep())); + tgt.setUnit(convertCodeableConcept(src.getUnit())); + tgt.setSource(convertReference(src.getSource())); + tgt.setParent(convertReference(src.getParent())); + tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); + tgt.setColor(convertDeviceMetricColor(src.getColor())); + tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); + tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); + for (org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) + tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent(); + copyElement(src, tgt); + tgt.setType(convertDeviceMetricCalibrationType(src.getType())); + tgt.setState(convertDeviceMetricCalibrationState(src.getState())); + tgt.setTime(src.getTime()); + return tgt; + } + + public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent(); + copyElement(src, tgt); + tgt.setType(convertDeviceMetricCalibrationType(src.getType())); + tgt.setState(convertDeviceMetricCalibrationState(src.getState())); + tgt.setTime(src.getTime()); + return tgt; + } + + public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTCALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; + case CALIBRATIONREQUIRED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; + case CALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; + case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NULL; + } + } + + public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTCALIBRATED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; + case CALIBRATIONREQUIRED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; + case CALIBRATED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; + case UNSPECIFIED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; + default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.NULL; + } + } + + public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; + case OFFSET: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; + case GAIN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; + case TWOPOINT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.NULL; + } + } + + public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UNSPECIFIED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; + case OFFSET: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; + case GAIN: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; + case TWOPOINT: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; + default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.NULL; + } + } + + public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MEASUREMENT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; + case SETTING: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.SETTING; + case CALCULATION: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.CALCULATION; + case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.NULL; + } + } + + public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MEASUREMENT: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; + case SETTING: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.SETTING; + case CALCULATION: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.CALCULATION; + case UNSPECIFIED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; + default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.NULL; + } + } + + public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BLACK: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLACK; + case RED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.RED; + case GREEN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.GREEN; + case YELLOW: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.YELLOW; + case BLUE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLUE; + case MAGENTA: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.MAGENTA; + case CYAN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.CYAN; + case WHITE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.WHITE; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.NULL; + } + } + + public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BLACK: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.BLACK; + case RED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.RED; + case GREEN: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.GREEN; + case YELLOW: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.YELLOW; + case BLUE: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.BLUE; + case MAGENTA: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.MAGENTA; + case CYAN: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.CYAN; + case WHITE: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.WHITE; + default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.NULL; + } + } + + public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ON: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.ON; + case OFF: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; + case STANDBY: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ON: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.ON; + case OFF: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; + case STANDBY: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; + default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Device.FHIRDeviceStatus convertDeviceStatus(org.hl7.fhir.instance.model.Device.DeviceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AVAILABLE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ACTIVE; + case NOTAVAILABLE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Device.DeviceStatus convertDeviceStatus(org.hl7.fhir.r4.model.Device.FHIRDeviceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.instance.model.Device.DeviceStatus.AVAILABLE; + case INACTIVE: return org.hl7.fhir.instance.model.Device.DeviceStatus.NOTAVAILABLE; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Device.DeviceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.Device.DeviceStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.instance.model.DeviceUseStatement src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DeviceUseStatement tgt = new org.hl7.fhir.r4.model.DeviceUseStatement(); + copyDomainResource(src, tgt); + if (src.hasBodySiteCodeableConcept()) + tgt.setBodySite(convertCodeableConcept(src.getBodySiteCodeableConcept())); + tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); + tgt.setDevice(convertReference(src.getDevice())); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getIndication()) + tgt.addIndication(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.StringType t : src.getNotes()) + tgt.addNote().setText(t.getValue()); + tgt.setRecordedOn(src.getRecordedOn()); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setTiming(convertType(src.getTiming())); + return tgt; + } + + public org.hl7.fhir.instance.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.r4.model.DeviceUseStatement src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DeviceUseStatement tgt = new org.hl7.fhir.instance.model.DeviceUseStatement(); + copyDomainResource(src, tgt); + tgt.setBodySite(convertType(src.getBodySite())); + tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); + tgt.setDevice(convertReference(src.getDevice())); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getIndication()) + tgt.addIndication(convertCodeableConcept(t)); + for (Annotation t : src.getNote()) + tgt.addNotes(t.getText()); + tgt.setRecordedOn(src.getRecordedOn()); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setTiming(convertType(src.getTiming())); + return tgt; + } + + public org.hl7.fhir.r4.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.instance.model.DiagnosticReport src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DiagnosticReport tgt = new org.hl7.fhir.r4.model.DiagnosticReport(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); + tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setContext(convertReference(src.getEncounter())); + tgt.setEffective(convertType(src.getEffective())); + tgt.setIssued(src.getIssued()); +// tgt.setPerformer(convertReference(src.getPerformer())); +// for (org.hl7.fhir.instance.model.Reference t : src.getRequest()) +// tgt.addRequest(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getSpecimen()) + tgt.addSpecimen(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getResult()) + tgt.addResult(convertReference(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getImagingStudy()) + tgt.addImagingStudy(convertReference(t)); + for (org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) + tgt.addImage(convertDiagnosticReportImageComponent(t)); + tgt.setConclusion(src.getConclusion()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCodedDiagnosis()) + tgt.addCodedDiagnosis(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.Attachment t : src.getPresentedForm()) + tgt.addPresentedForm(convertAttachment(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DiagnosticReport tgt = new org.hl7.fhir.instance.model.DiagnosticReport(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); + tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setEncounter(convertReference(src.getContext())); + tgt.setEffective(convertType(src.getEffective())); + tgt.setIssued(src.getIssued()); +// tgt.setPerformer(convertReference(src.getPerformer())); +// for (org.hl7.fhir.r4.model.Reference t : src.getRequest()) +// tgt.addRequest(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) + tgt.addSpecimen(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getResult()) + tgt.addResult(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getImagingStudy()) + tgt.addImagingStudy(convertReference(t)); + for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) + tgt.addImage(convertDiagnosticReportImageComponent(t)); + tgt.setConclusion(src.getConclusion()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCodedDiagnosis()) + tgt.addCodedDiagnosis(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm()) + tgt.addPresentedForm(convertAttachment(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent(); + copyElement(src, tgt); + tgt.setComment(src.getComment()); + tgt.setLink(convertReference(src.getLink())); + return tgt; + } + + public org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent(); + copyElement(src, tgt); + tgt.setComment(src.getComment()); + tgt.setLink(convertReference(src.getLink())); + return tgt; + } + + public org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; + case PARTIAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; + case FINAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.FINAL; + case CORRECTED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; + case APPENDED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; + case PARTIAL: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; + case FINAL: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.FINAL; + case CORRECTED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; + case APPENDED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; + case CANCELLED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.instance.model.Media.DigitalMediaType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PHOTO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.PHOTO; + case VIDEO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.VIDEO; + case AUDIO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.AUDIO; + default: return org.hl7.fhir.r4.model.Media.DigitalMediaType.NULL; + } + } + + public org.hl7.fhir.instance.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.r4.model.Media.DigitalMediaType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PHOTO: return org.hl7.fhir.instance.model.Media.DigitalMediaType.PHOTO; + case VIDEO: return org.hl7.fhir.instance.model.Media.DigitalMediaType.VIDEO; + case AUDIO: return org.hl7.fhir.instance.model.Media.DigitalMediaType.AUDIO; + default: return org.hl7.fhir.instance.model.Media.DigitalMediaType.NULL; + } + } + + public org.hl7.fhir.r4.model.Distance convertDistance(org.hl7.fhir.instance.model.Distance src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Distance tgt = new org.hl7.fhir.r4.model.Distance(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.Distance convertDistance(org.hl7.fhir.r4.model.Distance src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Distance tgt = new org.hl7.fhir.instance.model.Distance(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + private ReferredDocumentStatus convertDocStatus(CodeableConcept cc) { + if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "preliminary")) + return ReferredDocumentStatus.PRELIMINARY; + if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "final")) + return ReferredDocumentStatus.FINAL; + if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "amended")) + return ReferredDocumentStatus.AMENDED; + if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "entered-in-error")) + return ReferredDocumentStatus.ENTEREDINERROR; + + return null; + } + + private CodeableConcept convertDocStatus(ReferredDocumentStatus docStatus) { + CodeableConcept cc = new CodeableConcept (); + switch (docStatus) { + case AMENDED: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("amended"); break; + case ENTEREDINERROR: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("entered-in-error"); break; + case FINAL: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("final"); break; + case PRELIMINARY: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("preliminary"); break; + default: return null; + } + return cc; + } + + public org.hl7.fhir.r4.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.instance.model.DocumentManifest src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentManifest tgt = new org.hl7.fhir.r4.model.DocumentManifest(); + copyDomainResource(src, tgt); + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.instance.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setCreated(src.getCreated()); + tgt.setSource(src.getSource()); + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentManifestRelatedComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentManifest tgt = new org.hl7.fhir.instance.model.DocumentManifest(); + copyDomainResource(src, tgt); + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setCreated(src.getCreated()); + tgt.setSource(src.getSource()); + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentManifestRelatedComponent(t)); + return tgt; + } + + + + public org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.instance.model.Conformance.DocumentMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRODUCER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.PRODUCER; + case CONSUMER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.CONSUMER; + default: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.DocumentMode convertDocumentMode(org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRODUCER: return org.hl7.fhir.instance.model.Conformance.DocumentMode.PRODUCER; + case CONSUMER: return org.hl7.fhir.instance.model.Conformance.DocumentMode.CONSUMER; + default: return org.hl7.fhir.instance.model.Conformance.DocumentMode.NULL; + } + } + + public org.hl7.fhir.r4.model.DocumentReference convertDocumentReference(org.hl7.fhir.instance.model.DocumentReference src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentReference tgt = new org.hl7.fhir.r4.model.DocumentReference(); + copyDomainResource(src, tgt); + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setClass_(convertCodeableConcept(src.getClass_())); + tgt.setCustodian(convertReference(src.getCustodian())); + tgt.setAuthenticator(convertReference(src.getAuthenticator())); + tgt.setCreated(src.getCreated()); + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + tgt.setDocStatus(convertDocStatus(src.getDocStatus())); + for (org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) + tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getSecurityLabel()) + tgt.addSecurityLabel(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) + tgt.addContent(convertDocumentReferenceContentComponent(t)); + tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentReference convertDocumentReference(org.hl7.fhir.r4.model.DocumentReference src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentReference tgt = new org.hl7.fhir.instance.model.DocumentReference(); + copyDomainResource(src, tgt); + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setClass_(convertCodeableConcept(src.getClass_())); + tgt.setCustodian(convertReference(src.getCustodian())); + tgt.setAuthenticator(convertReference(src.getAuthenticator())); + tgt.setCreated(src.getCreated()); + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + tgt.setDocStatus(convertDocStatus(src.getDocStatus())); + for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) + tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) + tgt.addSecurityLabel(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) + tgt.addContent(convertDocumentReferenceContentComponent(t)); + tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); + return tgt; + } + + public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent(); + copyElement(src, tgt); + tgt.setAttachment(convertAttachment(src.getAttachment())); + for (org.hl7.fhir.instance.model.Coding t : src.getFormat()) + tgt.setFormat(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent(); + copyElement(src, tgt); + tgt.setAttachment(convertAttachment(src.getAttachment())); + tgt.addFormat(convertCoding(src.getFormat())); + return tgt; + } + + public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent(); + copyElement(src, tgt); + tgt.setEncounter(convertReference(src.getEncounter())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getEvent()) + tgt.addEvent(convertCodeableConcept(t)); + tgt.setPeriod(convertPeriod(src.getPeriod())); + tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); + tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); + tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); + for (org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent(); + copyElement(src, tgt); + tgt.setEncounter(convertReference(src.getEncounter())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getEvent()) + tgt.addEvent(convertCodeableConcept(t)); + tgt.setPeriod(convertPeriod(src.getPeriod())); + tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); + tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); + tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); + for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent(); + copyElement(src, tgt); + tgt.setCode(convertDocumentRelationshipType(src.getCode())); + tgt.setTarget(convertReference(src.getTarget())); + return tgt; + } + + public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent(); + copyElement(src, tgt); + tgt.setCode(convertDocumentRelationshipType(src.getCode())); + tgt.setTarget(convertReference(src.getTarget())); + return tgt; + } + + public org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.CURRENT; + case SUPERSEDED: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.CURRENT; + case SUPERSEDED: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACES: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.REPLACES; + case TRANSFORMS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; + case SIGNS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.SIGNS; + case APPENDS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.APPENDS; + default: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.NULL; + } + } + + public org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACES: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.REPLACES; + case TRANSFORMS: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; + case SIGNS: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.SIGNS; + case APPENDS: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.APPENDS; + default: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.NULL; + } + } + + public org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.instance.model.Duration src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Duration tgt = new org.hl7.fhir.instance.model.Duration(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + public org.hl7.fhir.r4.model.ElementDefinition convertElementDefinition(org.hl7.fhir.instance.model.ElementDefinition src, List slicePaths) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -1065,22 +4455,99 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { - if (src == null) + public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case XMLATTR: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XMLATTR; - default: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.NULL; - } + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent(); + copyElement(src, tgt); + tgt.setPath(src.getPath()); + tgt.setMin(src.getMin()); + tgt.setMax(src.getMax()); + return tgt; } - public org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { - if (src == null) + public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case XMLATTR: return org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation.XMLATTR; - default: return org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation.NULL; - } + org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent(); + copyElement(src, tgt); + tgt.setPath(src.getPath()); + tgt.setMin(src.getMin()); + tgt.setMax(src.getMax()); + return tgt; + } + + public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent(); + copyElement(src, tgt); + tgt.setStrength(convertBindingStrength(src.getStrength())); + tgt.setDescription(src.getDescription()); + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent(); + copyElement(src, tgt); + tgt.setStrength(convertBindingStrength(src.getStrength())); + tgt.setDescription(src.getDescription()); + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent(); + copyElement(src, tgt); + tgt.setKey(src.getKey()); + tgt.setRequirements(src.getRequirements()); + tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); + tgt.setHuman(src.getHuman()); + tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); + tgt.setXpath(src.getXpath()); + return tgt; + } + + public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent(); + copyElement(src, tgt); + tgt.setKey(src.getKey()); + tgt.setRequirements(src.getRequirements()); + tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); + tgt.setHuman(src.getHuman()); + if (src.hasExpression()) + ToolingExtensions.addStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); + tgt.setXpath(src.getXpath()); + return tgt; + } + + public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent(); + copyElement(src, tgt); + tgt.setIdentity(src.getIdentity()); + tgt.setLanguage(src.getLanguage()); + tgt.setMap(src.getMap()); + return tgt; + } + + public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent(); + copyElement(src, tgt); + tgt.setIdentity(src.getIdentity()); + tgt.setLanguage(src.getLanguage()); + tgt.setMap(src.getMap()); + return tgt; } public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException { @@ -1109,50 +4576,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.instance.model.ElementDefinition.SlicingRules src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLOSED: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.CLOSED; - case OPEN: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPEN; - case OPENATEND: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPENATEND; - default: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.NULL; - } - } - - public org.hl7.fhir.instance.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.r4.model.ElementDefinition.SlicingRules src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLOSED: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.CLOSED; - case OPEN: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.OPEN; - case OPENATEND: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.OPENATEND; - default: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.NULL; - } - } - - public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent(); - copyElement(src, tgt); - tgt.setPath(src.getPath()); - tgt.setMin(src.getMin()); - tgt.setMax(src.getMax()); - return tgt; - } - - public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBaseComponent(); - copyElement(src, tgt); - tgt.setPath(src.getPath()); - tgt.setMin(src.getMin()); - tgt.setMax(src.getMax()); - return tgt; - } - public org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent convertElementDefinitionTypeComponent(org.hl7.fhir.instance.model.ElementDefinition.TypeRefComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -1185,5011 +4608,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.instance.model.ElementDefinition.AggregationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONTAINED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.CONTAINED; - case REFERENCED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.REFERENCED; - case BUNDLED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.BUNDLED; - default: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.NULL; - } - } - - public org.hl7.fhir.instance.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.r4.model.ElementDefinition.AggregationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONTAINED: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.CONTAINED; - case REFERENCED: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.REFERENCED; - case BUNDLED: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.BUNDLED; - default: return org.hl7.fhir.instance.model.ElementDefinition.AggregationMode.NULL; - } - } - - public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent(); - copyElement(src, tgt); - tgt.setKey(src.getKey()); - tgt.setRequirements(src.getRequirements()); - tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); - tgt.setHuman(src.getHuman()); - tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); - tgt.setXpath(src.getXpath()); - return tgt; - } - - public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionConstraintComponent(); - copyElement(src, tgt); - tgt.setKey(src.getKey()); - tgt.setRequirements(src.getRequirements()); - tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); - tgt.setHuman(src.getHuman()); - if (src.hasExpression()) - ToolingExtensions.addStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); - tgt.setXpath(src.getXpath()); - return tgt; - } - - public org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ERROR: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.ERROR; - case WARNING: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.WARNING; - default: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.NULL; - } - } - - public org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ERROR: return org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity.ERROR; - case WARNING: return org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity.WARNING; - default: return org.hl7.fhir.instance.model.ElementDefinition.ConstraintSeverity.NULL; - } - } - - public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent(); - copyElement(src, tgt); - tgt.setStrength(convertBindingStrength(src.getStrength())); - tgt.setDescription(src.getDescription()); - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionBindingComponent(); - copyElement(src, tgt); - tgt.setStrength(convertBindingStrength(src.getStrength())); - tgt.setDescription(src.getDescription()); - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public org.hl7.fhir.r4.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.instance.model.Enumerations.BindingStrength src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.REQUIRED; - case EXTENSIBLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXTENSIBLE; - case PREFERRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.PREFERRED; - case EXAMPLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXAMPLE; - default: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.NULL; - } - } - - public org.hl7.fhir.instance.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.r4.model.Enumerations.BindingStrength src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.REQUIRED; - case EXTENSIBLE: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.EXTENSIBLE; - case PREFERRED: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.PREFERRED; - case EXAMPLE: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.EXAMPLE; - default: return org.hl7.fhir.instance.model.Enumerations.BindingStrength.NULL; - } - } - - public org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent(); - copyElement(src, tgt); - tgt.setIdentity(src.getIdentity()); - tgt.setLanguage(src.getLanguage()); - tgt.setMap(src.getMap()); - return tgt; - } - - public org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.instance.model.ElementDefinition.ElementDefinitionMappingComponent(); - copyElement(src, tgt); - tgt.setIdentity(src.getIdentity()); - tgt.setLanguage(src.getLanguage()); - tgt.setMap(src.getMap()); - return tgt; - } - - public org.hl7.fhir.r4.model.HumanName convertHumanName(org.hl7.fhir.instance.model.HumanName src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.HumanName tgt = new org.hl7.fhir.r4.model.HumanName(); - copyElement(src, tgt); - tgt.setUse(convertNameUse(src.getUse())); - tgt.setText(src.getText()); - for (org.hl7.fhir.instance.model.StringType t : src.getFamily()) - tgt.setFamily(t.getValue()); - for (org.hl7.fhir.instance.model.StringType t : src.getGiven()) - tgt.addGiven(t.getValue()); - for (org.hl7.fhir.instance.model.StringType t : src.getPrefix()) - tgt.addPrefix(t.getValue()); - for (org.hl7.fhir.instance.model.StringType t : src.getSuffix()) - tgt.addSuffix(t.getValue()); - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public org.hl7.fhir.instance.model.HumanName convertHumanName(org.hl7.fhir.r4.model.HumanName src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.HumanName tgt = new org.hl7.fhir.instance.model.HumanName(); - copyElement(src, tgt); - tgt.setUse(convertNameUse(src.getUse())); - tgt.setText(src.getText()); - if (src.hasFamily()) - tgt.addFamily(src.getFamily()); - for (org.hl7.fhir.r4.model.StringType t : src.getGiven()) - tgt.addGiven(t.getValue()); - for (org.hl7.fhir.r4.model.StringType t : src.getPrefix()) - tgt.addPrefix(t.getValue()); - for (org.hl7.fhir.r4.model.StringType t : src.getSuffix()) - tgt.addSuffix(t.getValue()); - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public org.hl7.fhir.r4.model.HumanName.NameUse convertNameUse(org.hl7.fhir.instance.model.HumanName.NameUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case USUAL: return org.hl7.fhir.r4.model.HumanName.NameUse.USUAL; - case OFFICIAL: return org.hl7.fhir.r4.model.HumanName.NameUse.OFFICIAL; - case TEMP: return org.hl7.fhir.r4.model.HumanName.NameUse.TEMP; - case NICKNAME: return org.hl7.fhir.r4.model.HumanName.NameUse.NICKNAME; - case ANONYMOUS: return org.hl7.fhir.r4.model.HumanName.NameUse.ANONYMOUS; - case OLD: return org.hl7.fhir.r4.model.HumanName.NameUse.OLD; - case MAIDEN: return org.hl7.fhir.r4.model.HumanName.NameUse.MAIDEN; - default: return org.hl7.fhir.r4.model.HumanName.NameUse.NULL; - } - } - - public org.hl7.fhir.instance.model.HumanName.NameUse convertNameUse(org.hl7.fhir.r4.model.HumanName.NameUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case USUAL: return org.hl7.fhir.instance.model.HumanName.NameUse.USUAL; - case OFFICIAL: return org.hl7.fhir.instance.model.HumanName.NameUse.OFFICIAL; - case TEMP: return org.hl7.fhir.instance.model.HumanName.NameUse.TEMP; - case NICKNAME: return org.hl7.fhir.instance.model.HumanName.NameUse.NICKNAME; - case ANONYMOUS: return org.hl7.fhir.instance.model.HumanName.NameUse.ANONYMOUS; - case OLD: return org.hl7.fhir.instance.model.HumanName.NameUse.OLD; - case MAIDEN: return org.hl7.fhir.instance.model.HumanName.NameUse.MAIDEN; - default: return org.hl7.fhir.instance.model.HumanName.NameUse.NULL; - } - } - - public org.hl7.fhir.r4.model.Meta convertMeta(org.hl7.fhir.instance.model.Meta src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Meta tgt = new org.hl7.fhir.r4.model.Meta(); - copyElement(src, tgt); - tgt.setVersionId(src.getVersionId()); - tgt.setLastUpdated(src.getLastUpdated()); - for (org.hl7.fhir.instance.model.UriType t : src.getProfile()) - tgt.addProfile(t.getValue()); - for (org.hl7.fhir.instance.model.Coding t : src.getSecurity()) - tgt.addSecurity(convertCoding(t)); - for (org.hl7.fhir.instance.model.Coding t : src.getTag()) - tgt.addTag(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Meta convertMeta(org.hl7.fhir.r4.model.Meta src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Meta tgt = new org.hl7.fhir.instance.model.Meta(); - copyElement(src, tgt); - tgt.setVersionId(src.getVersionId()); - tgt.setLastUpdated(src.getLastUpdated()); - for (org.hl7.fhir.r4.model.UriType t : src.getProfile()) - tgt.addProfile(t.getValue()); - for (org.hl7.fhir.r4.model.Coding t : src.getSecurity()) - tgt.addSecurity(convertCoding(t)); - for (org.hl7.fhir.r4.model.Coding t : src.getTag()) - tgt.addTag(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Timing convertTiming(org.hl7.fhir.instance.model.Timing src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Timing tgt = new org.hl7.fhir.r4.model.Timing(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.DateTimeType t : src.getEvent()) - tgt.addEvent(t.getValue()); - tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public org.hl7.fhir.instance.model.Timing convertTiming(org.hl7.fhir.r4.model.Timing src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Timing tgt = new org.hl7.fhir.instance.model.Timing(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.DateTimeType t : src.getEvent()) - tgt.addEvent(t.getValue()); - tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public org.hl7.fhir.r4.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.instance.model.Timing.TimingRepeatComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.r4.model.Timing.TimingRepeatComponent(); - copyElement(src, tgt); - tgt.setBounds(convertType(src.getBounds())); - tgt.setCount(src.getCount()); - tgt.setDuration(src.getDuration()); - tgt.setDurationMax(src.getDurationMax()); - tgt.setDurationUnit(convertUnitsOfTime(src.getDurationUnits())); - tgt.setFrequency(src.getFrequency()); - tgt.setFrequencyMax(src.getFrequencyMax()); - tgt.setPeriod(src.getPeriod()); - tgt.setPeriodMax(src.getPeriodMax()); - tgt.setPeriodUnit(convertUnitsOfTime(src.getPeriodUnits())); - tgt.addWhen(convertEventTiming(src.getWhen())); - return tgt; - } - - public org.hl7.fhir.instance.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.r4.model.Timing.TimingRepeatComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.instance.model.Timing.TimingRepeatComponent(); - copyElement(src, tgt); - tgt.setBounds(convertType(src.getBounds())); - tgt.setCount(src.getCount()); - tgt.setDuration(src.getDuration()); - tgt.setDurationMax(src.getDurationMax()); - tgt.setDurationUnits(convertUnitsOfTime(src.getDurationUnit())); - tgt.setFrequency(src.getFrequency()); - tgt.setFrequencyMax(src.getFrequencyMax()); - tgt.setPeriod(src.getPeriod()); - tgt.setPeriodMax(src.getPeriodMax()); - tgt.setPeriodUnits(convertUnitsOfTime(src.getPeriodUnit())); - for (Enumeration t : src.getWhen()) - tgt.setWhen(convertEventTiming(t.getValue())); - return tgt; - } - - public org.hl7.fhir.r4.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.instance.model.Timing.UnitsOfTime src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case S: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.S; - case MIN: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MIN; - case H: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.H; - case D: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.D; - case WK: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.WK; - case MO: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MO; - case A: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.A; - default: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.NULL; - } - } - - public org.hl7.fhir.instance.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.r4.model.Timing.UnitsOfTime src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case S: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.S; - case MIN: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.MIN; - case H: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.H; - case D: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.D; - case WK: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.WK; - case MO: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.MO; - case A: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.A; - default: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.NULL; - } - } - - public org.hl7.fhir.r4.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.instance.model.Timing.EventTiming src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HS: return org.hl7.fhir.r4.model.Timing.EventTiming.HS; - case WAKE: return org.hl7.fhir.r4.model.Timing.EventTiming.WAKE; - case C: return org.hl7.fhir.r4.model.Timing.EventTiming.C; - case CM: return org.hl7.fhir.r4.model.Timing.EventTiming.CM; - case CD: return org.hl7.fhir.r4.model.Timing.EventTiming.CD; - case CV: return org.hl7.fhir.r4.model.Timing.EventTiming.CV; - case AC: return org.hl7.fhir.r4.model.Timing.EventTiming.AC; - case ACM: return org.hl7.fhir.r4.model.Timing.EventTiming.ACM; - case ACD: return org.hl7.fhir.r4.model.Timing.EventTiming.ACD; - case ACV: return org.hl7.fhir.r4.model.Timing.EventTiming.ACV; - case PC: return org.hl7.fhir.r4.model.Timing.EventTiming.PC; - case PCM: return org.hl7.fhir.r4.model.Timing.EventTiming.PCM; - case PCD: return org.hl7.fhir.r4.model.Timing.EventTiming.PCD; - case PCV: return org.hl7.fhir.r4.model.Timing.EventTiming.PCV; - default: return org.hl7.fhir.r4.model.Timing.EventTiming.NULL; - } - } - - public org.hl7.fhir.instance.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.r4.model.Timing.EventTiming src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HS: return org.hl7.fhir.instance.model.Timing.EventTiming.HS; - case WAKE: return org.hl7.fhir.instance.model.Timing.EventTiming.WAKE; - case C: return org.hl7.fhir.instance.model.Timing.EventTiming.C; - case CM: return org.hl7.fhir.instance.model.Timing.EventTiming.CM; - case CD: return org.hl7.fhir.instance.model.Timing.EventTiming.CD; - case CV: return org.hl7.fhir.instance.model.Timing.EventTiming.CV; - case AC: return org.hl7.fhir.instance.model.Timing.EventTiming.AC; - case ACM: return org.hl7.fhir.instance.model.Timing.EventTiming.ACM; - case ACD: return org.hl7.fhir.instance.model.Timing.EventTiming.ACD; - case ACV: return org.hl7.fhir.instance.model.Timing.EventTiming.ACV; - case PC: return org.hl7.fhir.instance.model.Timing.EventTiming.PC; - case PCM: return org.hl7.fhir.instance.model.Timing.EventTiming.PCM; - case PCD: return org.hl7.fhir.instance.model.Timing.EventTiming.PCD; - case PCV: return org.hl7.fhir.instance.model.Timing.EventTiming.PCV; - default: return org.hl7.fhir.instance.model.Timing.EventTiming.NULL; - } - } - - public org.hl7.fhir.r4.model.Age convertAge(org.hl7.fhir.instance.model.Age src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Age tgt = new org.hl7.fhir.r4.model.Age(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.Age convertAge(org.hl7.fhir.r4.model.Age src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Age tgt = new org.hl7.fhir.instance.model.Age(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Count convertCount(org.hl7.fhir.instance.model.Count src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Count tgt = new org.hl7.fhir.r4.model.Count(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.Count convertCount(org.hl7.fhir.r4.model.Count src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Count tgt = new org.hl7.fhir.instance.model.Count(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Distance convertDistance(org.hl7.fhir.instance.model.Distance src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Distance tgt = new org.hl7.fhir.r4.model.Distance(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.Distance convertDistance(org.hl7.fhir.r4.model.Distance src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Distance tgt = new org.hl7.fhir.instance.model.Distance(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.instance.model.Duration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Duration tgt = new org.hl7.fhir.instance.model.Duration(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Money convertMoney(org.hl7.fhir.instance.model.Money src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Money tgt = new org.hl7.fhir.r4.model.Money(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Money tgt = new org.hl7.fhir.instance.model.Money(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.instance.model.SimpleQuantity src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.SimpleQuantity tgt = new org.hl7.fhir.r4.model.SimpleQuantity(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.SimpleQuantity tgt = new org.hl7.fhir.instance.model.SimpleQuantity(); - copyElement(src, tgt); - tgt.setValue(src.getValue()); - tgt.setComparator(convertQuantityComparator(src.getComparator())); - tgt.setUnit(src.getUnit()); - tgt.setSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.instance.model.Type src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - if (src instanceof org.hl7.fhir.instance.model.Base64BinaryType) - return convertBase64Binary((org.hl7.fhir.instance.model.Base64BinaryType) src); - if (src instanceof org.hl7.fhir.instance.model.BooleanType) - return convertBoolean((org.hl7.fhir.instance.model.BooleanType) src); - if (src instanceof org.hl7.fhir.instance.model.CodeType) - return convertCode((org.hl7.fhir.instance.model.CodeType) src); - if (src instanceof org.hl7.fhir.instance.model.DateType) - return convertDate((org.hl7.fhir.instance.model.DateType) src); - if (src instanceof org.hl7.fhir.instance.model.DateTimeType) - return convertDateTime((org.hl7.fhir.instance.model.DateTimeType) src); - if (src instanceof org.hl7.fhir.instance.model.DecimalType) - return convertDecimal((org.hl7.fhir.instance.model.DecimalType) src); - if (src instanceof org.hl7.fhir.instance.model.IdType) - return convertId((org.hl7.fhir.instance.model.IdType) src); - if (src instanceof org.hl7.fhir.instance.model.InstantType) - return convertInstant((org.hl7.fhir.instance.model.InstantType) src); - if (src instanceof org.hl7.fhir.instance.model.IntegerType) - return convertInteger((org.hl7.fhir.instance.model.IntegerType) src); - if (src instanceof org.hl7.fhir.instance.model.MarkdownType) - return convertMarkdown((org.hl7.fhir.instance.model.MarkdownType) src); - if (src instanceof org.hl7.fhir.instance.model.OidType) - return convertOid((org.hl7.fhir.instance.model.OidType) src); - if (src instanceof org.hl7.fhir.instance.model.PositiveIntType) - return convertPositiveInt((org.hl7.fhir.instance.model.PositiveIntType) src); - if (src instanceof org.hl7.fhir.instance.model.StringType) - return convertString((org.hl7.fhir.instance.model.StringType) src); - if (src instanceof org.hl7.fhir.instance.model.TimeType) - return convertTime((org.hl7.fhir.instance.model.TimeType) src); - if (src instanceof org.hl7.fhir.instance.model.UnsignedIntType) - return convertUnsignedInt((org.hl7.fhir.instance.model.UnsignedIntType) src); - if (src instanceof org.hl7.fhir.instance.model.UriType) - return convertUri((org.hl7.fhir.instance.model.UriType) src); - if (src instanceof org.hl7.fhir.instance.model.UuidType) - return convertUuid((org.hl7.fhir.instance.model.UuidType) src); - if (src instanceof org.hl7.fhir.instance.model.Extension) - return convertExtension((org.hl7.fhir.instance.model.Extension) src); - if (src instanceof org.hl7.fhir.instance.model.Narrative) - return convertNarrative((org.hl7.fhir.instance.model.Narrative) src); - if (src instanceof org.hl7.fhir.instance.model.Annotation) - return convertAnnotation((org.hl7.fhir.instance.model.Annotation) src); - if (src instanceof org.hl7.fhir.instance.model.Attachment) - return convertAttachment((org.hl7.fhir.instance.model.Attachment) src); - if (src instanceof org.hl7.fhir.instance.model.CodeableConcept) - return convertCodeableConcept((org.hl7.fhir.instance.model.CodeableConcept) src); - if (src instanceof org.hl7.fhir.instance.model.Coding) - return convertCoding((org.hl7.fhir.instance.model.Coding) src); - if (src instanceof org.hl7.fhir.instance.model.Identifier) - return convertIdentifier((org.hl7.fhir.instance.model.Identifier) src); - if (src instanceof org.hl7.fhir.instance.model.Period) - return convertPeriod((org.hl7.fhir.instance.model.Period) src); - if (src instanceof org.hl7.fhir.instance.model.Quantity) - return convertQuantity((org.hl7.fhir.instance.model.Quantity) src); - if (src instanceof org.hl7.fhir.instance.model.Range) - return convertRange((org.hl7.fhir.instance.model.Range) src); - if (src instanceof org.hl7.fhir.instance.model.Ratio) - return convertRatio((org.hl7.fhir.instance.model.Ratio) src); - if (src instanceof org.hl7.fhir.instance.model.Reference) - return convertReference((org.hl7.fhir.instance.model.Reference) src); - if (src instanceof org.hl7.fhir.instance.model.SampledData) - return convertSampledData((org.hl7.fhir.instance.model.SampledData) src); - if (src instanceof org.hl7.fhir.instance.model.Signature) - return convertSignature((org.hl7.fhir.instance.model.Signature) src); - if (src instanceof org.hl7.fhir.instance.model.Address) - return convertAddress((org.hl7.fhir.instance.model.Address) src); - if (src instanceof org.hl7.fhir.instance.model.ContactPoint) - return convertContactPoint((org.hl7.fhir.instance.model.ContactPoint) src); - if (src instanceof org.hl7.fhir.instance.model.ElementDefinition) - return convertElementDefinition((org.hl7.fhir.instance.model.ElementDefinition) src, new ArrayList()); - if (src instanceof org.hl7.fhir.instance.model.HumanName) - return convertHumanName((org.hl7.fhir.instance.model.HumanName) src); - if (src instanceof org.hl7.fhir.instance.model.Meta) - return convertMeta((org.hl7.fhir.instance.model.Meta) src); - if (src instanceof org.hl7.fhir.instance.model.Timing) - return convertTiming((org.hl7.fhir.instance.model.Timing) src); - if (src instanceof org.hl7.fhir.instance.model.Age) - return convertAge((org.hl7.fhir.instance.model.Age) src); - if (src instanceof org.hl7.fhir.instance.model.Count) - return convertCount((org.hl7.fhir.instance.model.Count) src); - if (src instanceof org.hl7.fhir.instance.model.Distance) - return convertDistance((org.hl7.fhir.instance.model.Distance) src); - if (src instanceof org.hl7.fhir.instance.model.Duration) - return convertDuration((org.hl7.fhir.instance.model.Duration) src); - if (src instanceof org.hl7.fhir.instance.model.Money) - return convertMoney((org.hl7.fhir.instance.model.Money) src); - if (src instanceof org.hl7.fhir.instance.model.SimpleQuantity) - return convertSimpleQuantity((org.hl7.fhir.instance.model.SimpleQuantity) src); - throw new Error("Unknown type "+src.fhirType()); - } - - public org.hl7.fhir.instance.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - if (src instanceof org.hl7.fhir.r4.model.Base64BinaryType) - return convertBase64Binary((org.hl7.fhir.r4.model.Base64BinaryType) src); - if (src instanceof org.hl7.fhir.r4.model.BooleanType) - return convertBoolean((org.hl7.fhir.r4.model.BooleanType) src); - if (src instanceof org.hl7.fhir.r4.model.CodeType) - return convertCode((org.hl7.fhir.r4.model.CodeType) src); - if (src instanceof org.hl7.fhir.r4.model.DateType) - return convertDate((org.hl7.fhir.r4.model.DateType) src); - if (src instanceof org.hl7.fhir.r4.model.DateTimeType) - return convertDateTime((org.hl7.fhir.r4.model.DateTimeType) src); - if (src instanceof org.hl7.fhir.r4.model.DecimalType) - return convertDecimal((org.hl7.fhir.r4.model.DecimalType) src); - if (src instanceof org.hl7.fhir.r4.model.IdType) - return convertId((org.hl7.fhir.r4.model.IdType) src); - if (src instanceof org.hl7.fhir.r4.model.InstantType) - return convertInstant((org.hl7.fhir.r4.model.InstantType) src); - if (src instanceof org.hl7.fhir.r4.model.IntegerType) - return convertInteger((org.hl7.fhir.r4.model.IntegerType) src); - if (src instanceof org.hl7.fhir.r4.model.MarkdownType) - return convertMarkdown((org.hl7.fhir.r4.model.MarkdownType) src); - if (src instanceof org.hl7.fhir.r4.model.OidType) - return convertOid((org.hl7.fhir.r4.model.OidType) src); - if (src instanceof org.hl7.fhir.r4.model.PositiveIntType) - return convertPositiveInt((org.hl7.fhir.r4.model.PositiveIntType) src); - if (src instanceof org.hl7.fhir.r4.model.StringType) - return convertString((org.hl7.fhir.r4.model.StringType) src); - if (src instanceof org.hl7.fhir.r4.model.TimeType) - return convertTime((org.hl7.fhir.r4.model.TimeType) src); - if (src instanceof org.hl7.fhir.r4.model.UnsignedIntType) - return convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src); - if (src instanceof org.hl7.fhir.r4.model.UriType) - return convertUri((org.hl7.fhir.r4.model.UriType) src); - if (src instanceof org.hl7.fhir.r4.model.UuidType) - return convertUuid((org.hl7.fhir.r4.model.UuidType) src); - if (src instanceof org.hl7.fhir.r4.model.Extension) - return convertExtension((org.hl7.fhir.r4.model.Extension) src); - if (src instanceof org.hl7.fhir.r4.model.Narrative) - return convertNarrative((org.hl7.fhir.r4.model.Narrative) src); - if (src instanceof org.hl7.fhir.r4.model.Annotation) - return convertAnnotation((org.hl7.fhir.r4.model.Annotation) src); - if (src instanceof org.hl7.fhir.r4.model.Attachment) - return convertAttachment((org.hl7.fhir.r4.model.Attachment) src); - if (src instanceof org.hl7.fhir.r4.model.CodeableConcept) - return convertCodeableConcept((org.hl7.fhir.r4.model.CodeableConcept) src); - if (src instanceof org.hl7.fhir.r4.model.Coding) - return convertCoding((org.hl7.fhir.r4.model.Coding) src); - if (src instanceof org.hl7.fhir.r4.model.Identifier) - return convertIdentifier((org.hl7.fhir.r4.model.Identifier) src); - if (src instanceof org.hl7.fhir.r4.model.Period) - return convertPeriod((org.hl7.fhir.r4.model.Period) src); - if (src instanceof org.hl7.fhir.r4.model.Quantity) - return convertQuantity((org.hl7.fhir.r4.model.Quantity) src); - if (src instanceof org.hl7.fhir.r4.model.Range) - return convertRange((org.hl7.fhir.r4.model.Range) src); - if (src instanceof org.hl7.fhir.r4.model.Ratio) - return convertRatio((org.hl7.fhir.r4.model.Ratio) src); - if (src instanceof org.hl7.fhir.r4.model.Reference) - return convertReference((org.hl7.fhir.r4.model.Reference) src); - if (src instanceof org.hl7.fhir.r4.model.SampledData) - return convertSampledData((org.hl7.fhir.r4.model.SampledData) src); - if (src instanceof org.hl7.fhir.r4.model.Signature) - return convertSignature((org.hl7.fhir.r4.model.Signature) src); - if (src instanceof org.hl7.fhir.r4.model.Address) - return convertAddress((org.hl7.fhir.r4.model.Address) src); - if (src instanceof org.hl7.fhir.r4.model.ContactPoint) - return convertContactPoint((org.hl7.fhir.r4.model.ContactPoint) src); - if (src instanceof org.hl7.fhir.r4.model.ElementDefinition) - return convertElementDefinition((org.hl7.fhir.r4.model.ElementDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.HumanName) - return convertHumanName((org.hl7.fhir.r4.model.HumanName) src); - if (src instanceof org.hl7.fhir.r4.model.Meta) - return convertMeta((org.hl7.fhir.r4.model.Meta) src); - if (src instanceof org.hl7.fhir.r4.model.Timing) - return convertTiming((org.hl7.fhir.r4.model.Timing) src); - if (src instanceof org.hl7.fhir.r4.model.Age) - return convertAge((org.hl7.fhir.r4.model.Age) src); - if (src instanceof org.hl7.fhir.r4.model.Count) - return convertCount((org.hl7.fhir.r4.model.Count) src); - if (src instanceof org.hl7.fhir.r4.model.Distance) - return convertDistance((org.hl7.fhir.r4.model.Distance) src); - if (src instanceof org.hl7.fhir.r4.model.Duration) - return convertDuration((org.hl7.fhir.r4.model.Duration) src); - if (src instanceof org.hl7.fhir.r4.model.Money) - return convertMoney((org.hl7.fhir.r4.model.Money) src); - if (src instanceof org.hl7.fhir.r4.model.SimpleQuantity) - return convertSimpleQuantity((org.hl7.fhir.r4.model.SimpleQuantity) src); - throw new Error("Unknown type "+src.fhirType()); - } - - public void copyDomainResource(org.hl7.fhir.instance.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException { - copyResource(src, tgt); - tgt.setText(convertNarrative(src.getText())); - for (org.hl7.fhir.instance.model.Resource t : src.getContained()) - tgt.addContained(convertResource(t)); - for (org.hl7.fhir.instance.model.Extension t : src.getExtension()) - tgt.addExtension(convertExtension(t)); - for (org.hl7.fhir.instance.model.Extension t : src.getModifierExtension()) - tgt.addModifierExtension(convertExtension(t)); - } - public void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.instance.model.DomainResource tgt) throws FHIRException { - copyResource(src, tgt); - tgt.setText(convertNarrative(src.getText())); - for (org.hl7.fhir.r4.model.Resource t : src.getContained()) - tgt.addContained(convertResource(t)); - for (org.hl7.fhir.r4.model.Extension t : src.getExtension()) - tgt.addExtension(convertExtension(t)); - for (org.hl7.fhir.r4.model.Extension t : src.getModifierExtension()) - tgt.addModifierExtension(convertExtension(t)); - } - - public org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.instance.model.Parameters src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Parameters tgt = new org.hl7.fhir.r4.model.Parameters(); - copyResource(src, tgt); - for (org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent t : src.getParameter()) - tgt.addParameter(convertParametersParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Parameters convertParameters(org.hl7.fhir.r4.model.Parameters src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Parameters tgt = new org.hl7.fhir.instance.model.Parameters(); - copyResource(src, tgt); - for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getParameter()) - tgt.addParameter(convertParametersParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setValue(convertType(src.getValue())); - tgt.setResource(convertResource(src.getResource())); - for (org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent t : src.getPart()) - tgt.addPart(convertParametersParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setValue(convertType(src.getValue())); - tgt.setResource(convertResource(src.getResource())); - for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getPart()) - tgt.addPart(convertParametersParameterComponent(t)); - return tgt; - } - - public void copyResource(org.hl7.fhir.instance.model.Resource src, org.hl7.fhir.r4.model.Resource tgt) throws FHIRException { - tgt.setId(src.getId()); - tgt.setMeta(convertMeta(src.getMeta())); - tgt.setImplicitRules(src.getImplicitRules()); - tgt.setLanguage(src.getLanguage()); - } - public void copyResource(org.hl7.fhir.r4.model.Resource src, org.hl7.fhir.instance.model.Resource tgt) throws FHIRException { - tgt.setId(src.getId()); - if (src.hasMeta()) - tgt.setMeta(convertMeta(src.getMeta())); - if (src.hasImplicitRules()) - tgt.setImplicitRules(src.getImplicitRules()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - } - - public org.hl7.fhir.r4.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.instance.model.Enumerations.AdministrativeGender src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.MALE; - case FEMALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.FEMALE; - case OTHER: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.OTHER; - case UNKNOWN: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.UNKNOWN; - default: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.NULL; - } - } - - public org.hl7.fhir.instance.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MALE: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.MALE; - case FEMALE: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.FEMALE; - case OTHER: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.OTHER; - case UNKNOWN: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.UNKNOWN; - default: return org.hl7.fhir.instance.model.Enumerations.AdministrativeGender.NULL; - } - } - - public org.hl7.fhir.r4.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.instance.model.Enumerations.SearchParamType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NUMBER: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NUMBER; - case DATE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.DATE; - case STRING: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.STRING; - case TOKEN: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.TOKEN; - case REFERENCE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.REFERENCE; - case COMPOSITE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.COMPOSITE; - case QUANTITY: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.QUANTITY; - case URI: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.URI; - default: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NULL; - } - } - - public org.hl7.fhir.instance.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.r4.model.Enumerations.SearchParamType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NUMBER: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.NUMBER; - case DATE: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.DATE; - case STRING: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.STRING; - case TOKEN: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.TOKEN; - case REFERENCE: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.REFERENCE; - case COMPOSITE: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.COMPOSITE; - case QUANTITY: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.QUANTITY; - case URI: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.URI; - default: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.NULL; - } - } - - public org.hl7.fhir.r4.model.Account convertAccount(org.hl7.fhir.instance.model.Account src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Account tgt = new org.hl7.fhir.r4.model.Account(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setStatus(convertAccountStatus(src.getStatus())); - tgt.setActive(convertPeriod(src.getActivePeriod())); - tgt.setBalance(convertMoney(src.getBalance())); -// tgt.setCoveragePeriod(convertPeriod(src.getCoveragePeriod())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setOwner(convertReference(src.getOwner())); - tgt.setDescription(src.getDescription()); - return tgt; - } - - public org.hl7.fhir.instance.model.Account convertAccount(org.hl7.fhir.r4.model.Account src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Account tgt = new org.hl7.fhir.instance.model.Account(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setName(src.getName()); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setStatus(convertAccountStatus(src.getStatus())); - tgt.setActivePeriod(convertPeriod(src.getActive())); - tgt.setBalance(convertMoney(src.getBalance())); -// tgt.setCoveragePeriod(convertPeriod(src.getCoveragePeriod())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setOwner(convertReference(src.getOwner())); - tgt.setDescription(src.getDescription()); - return tgt; - } - - public org.hl7.fhir.r4.model.Account.AccountStatus convertAccountStatus(org.hl7.fhir.instance.model.Account.AccountStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Account.AccountStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.r4.model.Account.AccountStatus.INACTIVE; - default: return org.hl7.fhir.r4.model.Account.AccountStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Account.AccountStatus convertAccountStatus(org.hl7.fhir.r4.model.Account.AccountStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.instance.model.Account.AccountStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.instance.model.Account.AccountStatus.INACTIVE; - default: return org.hl7.fhir.instance.model.Account.AccountStatus.NULL; - } - } - - - public org.hl7.fhir.r4.model.Appointment convertAppointment(org.hl7.fhir.instance.model.Appointment src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Appointment tgt = new org.hl7.fhir.r4.model.Appointment(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertAppointmentStatus(src.getStatus())); - if (src.hasType()) - tgt.addServiceType(convertCodeableConcept(src.getType())); -// tgt.setReason(convertCodeableConcept(src.getReason())); - tgt.setPriority(src.getPriority()); - tgt.setDescription(src.getDescription()); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - tgt.setMinutesDuration(src.getMinutesDuration()); - for (org.hl7.fhir.instance.model.Reference t : src.getSlot()) - tgt.addSlot(convertReference(t)); - tgt.setComment(src.getComment()); - for (org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) - tgt.addParticipant(convertAppointmentParticipantComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Appointment convertAppointment(org.hl7.fhir.r4.model.Appointment src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Appointment tgt = new org.hl7.fhir.instance.model.Appointment(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertAppointmentStatus(src.getStatus())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) - tgt.setType(convertCodeableConcept(t)); -// tgt.setReason(convertCodeableConcept(src.getReason())); - tgt.setPriority(src.getPriority()); - tgt.setDescription(src.getDescription()); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - tgt.setMinutesDuration(src.getMinutesDuration()); - for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) - tgt.addSlot(convertReference(t)); - tgt.setComment(src.getComment()); - for (org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) - tgt.addParticipant(convertAppointmentParticipantComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.instance.model.Appointment.AppointmentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PROPOSED; - case PENDING: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PENDING; - case BOOKED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.BOOKED; - case ARRIVED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ARRIVED; - case FULFILLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.FULFILLED; - case CANCELLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.CANCELLED; - case NOSHOW: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NOSHOW; - default: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.r4.model.Appointment.AppointmentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.PROPOSED; - case PENDING: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.PENDING; - case BOOKED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.BOOKED; - case ARRIVED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.ARRIVED; - case FULFILLED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.FULFILLED; - case CANCELLED: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.CANCELLED; - case NOSHOW: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.NOSHOW; - default: return org.hl7.fhir.instance.model.Appointment.AppointmentStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - tgt.setActor(convertReference(src.getActor())); - tgt.setRequired(convertParticipantRequired(src.getRequired())); - tgt.setStatus(convertParticipationStatus(src.getStatus())); - return tgt; - } - - public org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.instance.model.Appointment.AppointmentParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - tgt.setActor(convertReference(src.getActor())); - tgt.setRequired(convertParticipantRequired(src.getRequired())); - tgt.setStatus(convertParticipationStatus(src.getStatus())); - return tgt; - } - - public org.hl7.fhir.r4.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.instance.model.Appointment.ParticipantRequired src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.REQUIRED; - case OPTIONAL: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.OPTIONAL; - case INFORMATIONONLY: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.INFORMATIONONLY; - default: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.NULL; - } - } - - public org.hl7.fhir.instance.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.r4.model.Appointment.ParticipantRequired src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.REQUIRED; - case OPTIONAL: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.OPTIONAL; - case INFORMATIONONLY: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.INFORMATIONONLY; - default: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.NULL; - } - } - - public org.hl7.fhir.r4.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.instance.model.Appointment.ParticipationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACCEPTED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NEEDSACTION; - default: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.r4.model.Appointment.ParticipationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACCEPTED: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.NEEDSACTION; - default: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.instance.model.AppointmentResponse src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AppointmentResponse tgt = new org.hl7.fhir.r4.model.AppointmentResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setAppointment(convertReference(src.getAppointment())); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getParticipantType()) - tgt.addParticipantType(convertCodeableConcept(t)); - tgt.setActor(convertReference(src.getActor())); - tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); - tgt.setComment(src.getComment()); - return tgt; - } - - private org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus src) { - if (src == null) - return null; - switch (src) { - case ACCEPTED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.TENTATIVE; - case INPROCESS: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; - case COMPLETED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; - case NEEDSACTION: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; - default: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NULL; - } - } - - private org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus src) { - if (src == null) - return null; - switch (src) { - case ACCEPTED: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; - default: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.r4.model.AppointmentResponse src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AppointmentResponse tgt = new org.hl7.fhir.instance.model.AppointmentResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setAppointment(convertReference(src.getAppointment())); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) - tgt.addParticipantType(convertCodeableConcept(t)); - tgt.setActor(convertReference(src.getActor())); - tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); - tgt.setComment(src.getComment()); - return tgt; - } - - public org.hl7.fhir.r4.model.AuditEvent convertAuditEvent(org.hl7.fhir.instance.model.AuditEvent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AuditEvent tgt = new org.hl7.fhir.r4.model.AuditEvent(); - copyDomainResource(src, tgt); - if (src.hasEvent()) { - tgt.setType(convertCoding(src.getEvent().getType())); - for (org.hl7.fhir.instance.model.Coding t : src.getEvent().getSubtype()) - tgt.addSubtype(convertCoding(t)); - tgt.setAction(convertAuditEventAction(src.getEvent().getAction())); - tgt.setRecorded(src.getEvent().getDateTime()); - tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome())); - tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc()); - for (org.hl7.fhir.instance.model.Coding t : src.getEvent().getPurposeOfEvent()) - tgt.addPurposeOfEvent().addCoding(convertCoding(t)); - } - for (org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent t : src.getParticipant()) - tgt.addAgent(convertAuditEventAgentComponent(t)); - tgt.setSource(convertAuditEventSourceComponent(src.getSource())); - for (org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent t : src.getObject()) - tgt.addEntity(convertAuditEventEntityComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.AuditEvent convertAuditEvent(org.hl7.fhir.r4.model.AuditEvent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AuditEvent tgt = new org.hl7.fhir.instance.model.AuditEvent(); - copyDomainResource(src, tgt); - tgt.getEvent().setType(convertCoding(src.getType())); - for (org.hl7.fhir.r4.model.Coding t : src.getSubtype()) - tgt.getEvent().addSubtype(convertCoding(t)); - tgt.getEvent().setAction(convertAuditEventAction(src.getAction())); - tgt.getEvent().setDateTime(src.getRecorded()); - tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome())); - tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) - for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) - tgt.getEvent().addPurposeOfEvent(convertCoding(cc)); - for (org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent t : src.getAgent()) - tgt.addParticipant(convertAuditEventAgentComponent(t)); - tgt.setSource(convertAuditEventSourceComponent(src.getSource())); - for (org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent t : src.getEntity()) - tgt.addObject(convertAuditEventEntityComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.instance.model.AuditEvent.AuditEventAction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case C: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.C; - case R: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.R; - case U: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.U; - case D: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.D; - case E: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.E; - default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.NULL; - } - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.r4.model.AuditEvent.AuditEventAction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case C: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.C; - case R: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.R; - case U: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.U; - case D: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.D; - case E: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.E; - default: return org.hl7.fhir.instance.model.AuditEvent.AuditEventAction.NULL; - } - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case _0: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._0; - case _4: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._4; - case _8: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._8; - case _12: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._12; - default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome.NULL; - } - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case _0: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._0; - case _4: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._4; - case _8: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._8; - case _12: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome._12; - default: return org.hl7.fhir.instance.model.AuditEvent.AuditEventOutcome.NULL; - } - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - tgt.setReference(convertReference(src.getReference())); - tgt.setUserId(convertIdentifier(src.getUserId())); - tgt.setAltId(src.getAltId()); - tgt.setName(src.getName()); - tgt.setRequestor(src.getRequestor()); - tgt.setLocation(convertReference(src.getLocation())); - for (org.hl7.fhir.instance.model.UriType t : src.getPolicy()) - tgt.addPolicy(t.getValue()); - tgt.setMedia(convertCoding(src.getMedia())); - tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); - for (org.hl7.fhir.instance.model.Coding t : src.getPurposeOfUse()) - tgt.addPurposeOfUse().addCoding(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - tgt.setReference(convertReference(src.getReference())); - tgt.setUserId(convertIdentifier(src.getUserId())); - tgt.setAltId(src.getAltId()); - tgt.setName(src.getName()); - tgt.setRequestor(src.getRequestor()); - tgt.setLocation(convertReference(src.getLocation())); - for (org.hl7.fhir.r4.model.UriType t : src.getPolicy()) - tgt.addPolicy(t.getValue()); - tgt.setMedia(convertCoding(src.getMedia())); - tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfUse()) - for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) - tgt.addPurposeOfUse(convertCoding(cc)); - return tgt; - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent(); - copyElement(src, tgt); - tgt.setAddress(src.getAddress()); - tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); - return tgt; - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkComponent(); - copyElement(src, tgt); - tgt.setAddress(src.getAddress()); - tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); - return tgt; - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case _1: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._1; - case _2: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._2; - case _3: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._3; - case _4: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._4; - case _5: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._5; - default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType.NULL; - } - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case _1: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._1; - case _2: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._2; - case _3: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._3; - case _4: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._4; - case _5: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType._5; - default: return org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantNetworkType.NULL; - } - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); - copyElement(src, tgt); - tgt.setSite(src.getSite()); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - for (org.hl7.fhir.instance.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent(); - copyElement(src, tgt); - tgt.setSite(src.getSite()); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - for (org.hl7.fhir.r4.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setReference(convertReference(src.getReference())); - tgt.setType(convertCoding(src.getType())); - tgt.setRole(convertCoding(src.getRole())); - tgt.setLifecycle(convertCoding(src.getLifecycle())); - for (org.hl7.fhir.instance.model.Coding t : src.getSecurityLabel()) - tgt.addSecurityLabel(convertCoding(t)); - tgt.setName(src.getName()); - tgt.setDescription(src.getDescription()); - tgt.setQuery(src.getQuery()); - for (org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) - tgt.addDetail(convertAuditEventEntityDetailComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setReference(convertReference(src.getReference())); - tgt.setType(convertCoding(src.getType())); - tgt.setRole(convertCoding(src.getRole())); - tgt.setLifecycle(convertCoding(src.getLifecycle())); - for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) - tgt.addSecurityLabel(convertCoding(t)); - tgt.setName(src.getName()); - tgt.setDescription(src.getDescription()); - tgt.setQuery(src.getQuery()); - for (org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) - tgt.addDetail(convertAuditEventEntityDetailComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.Basic convertBasic(org.hl7.fhir.instance.model.Basic src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Basic tgt = new org.hl7.fhir.r4.model.Basic(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setCreated(src.getCreated()); - tgt.setAuthor(convertReference(src.getAuthor())); - return tgt; - } - - public org.hl7.fhir.instance.model.Basic convertBasic(org.hl7.fhir.r4.model.Basic src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Basic tgt = new org.hl7.fhir.instance.model.Basic(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setCreated(src.getCreated()); - tgt.setAuthor(convertReference(src.getAuthor())); - return tgt; - } - - public org.hl7.fhir.r4.model.Binary convertBinary(org.hl7.fhir.instance.model.Binary src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary(); - copyResource(src, tgt); - tgt.setContentType(src.getContentType()); - tgt.setContent(src.getContent()); - return tgt; - } - - public org.hl7.fhir.instance.model.Binary convertBinary(org.hl7.fhir.r4.model.Binary src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Binary tgt = new org.hl7.fhir.instance.model.Binary(); - copyResource(src, tgt); - tgt.setContentType(src.getContentType()); - tgt.setContent(src.getContent()); - return tgt; - } - - public org.hl7.fhir.r4.model.Bundle convertBundle(org.hl7.fhir.instance.model.Bundle src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Bundle tgt = new org.hl7.fhir.r4.model.Bundle(); - copyResource(src, tgt); - tgt.setType(convertBundleType(src.getType())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) - tgt.addLink(convertBundleLinkComponent(t)); - for (org.hl7.fhir.instance.model.Bundle.BundleEntryComponent t : src.getEntry()) - tgt.addEntry(convertBundleEntryComponent(t)); - tgt.setSignature(convertSignature(src.getSignature())); - return tgt; - } - - public org.hl7.fhir.instance.model.Bundle convertBundle(org.hl7.fhir.r4.model.Bundle src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Bundle tgt = new org.hl7.fhir.instance.model.Bundle(); - copyResource(src, tgt); - tgt.setType(convertBundleType(src.getType())); - if (src.hasTotal()) - tgt.setTotal(src.getTotal()); - for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) - tgt.addLink(convertBundleLinkComponent(t)); - for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent t : src.getEntry()) - tgt.addEntry(convertBundleEntryComponent(t)); - if (src.hasSignature()) - tgt.setSignature(convertSignature(src.getSignature())); - return tgt; - } - - public org.hl7.fhir.r4.model.Bundle.BundleType convertBundleType(org.hl7.fhir.instance.model.Bundle.BundleType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DOCUMENT: return org.hl7.fhir.r4.model.Bundle.BundleType.DOCUMENT; - case MESSAGE: return org.hl7.fhir.r4.model.Bundle.BundleType.MESSAGE; - case TRANSACTION: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION; - case TRANSACTIONRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTIONRESPONSE; - case BATCH: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCH; - case BATCHRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCHRESPONSE; - case HISTORY: return org.hl7.fhir.r4.model.Bundle.BundleType.HISTORY; - case SEARCHSET: return org.hl7.fhir.r4.model.Bundle.BundleType.SEARCHSET; - case COLLECTION: return org.hl7.fhir.r4.model.Bundle.BundleType.COLLECTION; - default: return org.hl7.fhir.r4.model.Bundle.BundleType.NULL; - } - } - - public org.hl7.fhir.instance.model.Bundle.BundleType convertBundleType(org.hl7.fhir.r4.model.Bundle.BundleType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DOCUMENT: return org.hl7.fhir.instance.model.Bundle.BundleType.DOCUMENT; - case MESSAGE: return org.hl7.fhir.instance.model.Bundle.BundleType.MESSAGE; - case TRANSACTION: return org.hl7.fhir.instance.model.Bundle.BundleType.TRANSACTION; - case TRANSACTIONRESPONSE: return org.hl7.fhir.instance.model.Bundle.BundleType.TRANSACTIONRESPONSE; - case BATCH: return org.hl7.fhir.instance.model.Bundle.BundleType.BATCH; - case BATCHRESPONSE: return org.hl7.fhir.instance.model.Bundle.BundleType.BATCHRESPONSE; - case HISTORY: return org.hl7.fhir.instance.model.Bundle.BundleType.HISTORY; - case SEARCHSET: return org.hl7.fhir.instance.model.Bundle.BundleType.SEARCHSET; - case COLLECTION: return org.hl7.fhir.instance.model.Bundle.BundleType.COLLECTION; - default: return org.hl7.fhir.instance.model.Bundle.BundleType.NULL; - } - } - - public org.hl7.fhir.r4.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.instance.model.Bundle.BundleLinkComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); - copyElement(src, tgt); - tgt.setRelation(src.getRelation()); - tgt.setUrl(src.getUrl()); - return tgt; - } - - public org.hl7.fhir.instance.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r4.model.Bundle.BundleLinkComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleLinkComponent(); - copyElement(src, tgt); - tgt.setRelation(src.getRelation()); - tgt.setUrl(src.getUrl()); - return tgt; - } - - public org.hl7.fhir.r4.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) - tgt.addLink(convertBundleLinkComponent(t)); - tgt.setFullUrl(src.getFullUrl()); - tgt.setResource(convertResource(src.getResource())); - tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); - tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); - tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); - return tgt; - } - - public org.hl7.fhir.instance.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - if (advisor.ignoreEntry(src)) - return null; - - org.hl7.fhir.instance.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) - tgt.addLink(convertBundleLinkComponent(t)); - tgt.setFullUrl(src.getFullUrl()); - org.hl7.fhir.instance.model.Resource res = advisor.convertR2(src.getResource()); - if (res == null) - res = convertResource(src.getResource()); - tgt.setResource(res); - if (src.hasSearch()) - tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); - if (src.hasRequest()) - tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); - if (src.hasResponse()) - tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); - return tgt; - } - - public org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent(); - copyElement(src, tgt); - tgt.setMode(convertSearchEntryMode(src.getMode())); - tgt.setScore(src.getScore()); - return tgt; - } - - public org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntrySearchComponent(); - copyElement(src, tgt); - tgt.setMode(convertSearchEntryMode(src.getMode())); - tgt.setScore(src.getScore()); - return tgt; - } - - public org.hl7.fhir.r4.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.instance.model.Bundle.SearchEntryMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MATCH: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.MATCH; - case INCLUDE: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.INCLUDE; - case OUTCOME: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.OUTCOME; - default: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.NULL; - } - } - - public org.hl7.fhir.instance.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.r4.model.Bundle.SearchEntryMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MATCH: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.MATCH; - case INCLUDE: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.INCLUDE; - case OUTCOME: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.OUTCOME; - default: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.NULL; - } - } - - public org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent(); - copyElement(src, tgt); - tgt.setMethod(convertHTTPVerb(src.getMethod())); - tgt.setUrl(src.getUrl()); - tgt.setIfNoneMatch(src.getIfNoneMatch()); - tgt.setIfModifiedSince(src.getIfModifiedSince()); - tgt.setIfMatch(src.getIfMatch()); - tgt.setIfNoneExist(src.getIfNoneExist()); - return tgt; - } - - public org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryRequestComponent(); - copyElement(src, tgt); - tgt.setMethod(convertHTTPVerb(src.getMethod())); - tgt.setUrl(src.getUrl()); - tgt.setIfNoneMatch(src.getIfNoneMatch()); - tgt.setIfModifiedSince(src.getIfModifiedSince()); - tgt.setIfMatch(src.getIfMatch()); - tgt.setIfNoneExist(src.getIfNoneExist()); - return tgt; - } - - public org.hl7.fhir.r4.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.instance.model.Bundle.HTTPVerb src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GET: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.GET; - case POST: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST; - case PUT: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT; - case DELETE: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.DELETE; - default: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.NULL; - } - } - - public org.hl7.fhir.instance.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.r4.model.Bundle.HTTPVerb src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GET: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.GET; - case POST: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.POST; - case PUT: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.PUT; - case DELETE: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.DELETE; - default: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.NULL; - } - } - - public org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent(); - copyElement(src, tgt); - tgt.setStatus(src.getStatus()); - tgt.setLocation(src.getLocation()); - tgt.setEtag(src.getEtag()); - tgt.setLastModified(src.getLastModified()); - return tgt; - } - - public org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent(); - copyElement(src, tgt); - tgt.setStatus(src.getStatus()); - tgt.setLocation(src.getLocation()); - tgt.setEtag(src.getEtag()); - tgt.setLastModified(src.getLastModified()); - return tgt; - } - - public org.hl7.fhir.r4.model.CarePlan convertCarePlan(org.hl7.fhir.instance.model.CarePlan src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CarePlan tgt = new org.hl7.fhir.r4.model.CarePlan(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setStatus(convertCarePlanStatus(src.getStatus())); - tgt.setContext(convertReference(src.getContext())); - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.instance.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); -// tgt.setModified(src.getModified()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCategory()) - tgt.addCategory(convertCodeableConcept(t)); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.Reference t : src.getAddresses()) - tgt.addAddresses(convertReference(t)); -// for (org.hl7.fhir.instance.model.Reference t : src.getSupport()) -// tgt.addSupport(convertReference(t)); -// for (org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent t : src.getRelatedPlan()) -// tgt.addRelatedPlan(convertCarePlanRelatedPlanComponent(t)); -// for (org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent t : src.getParticipant()) -// tgt.addParticipant(convertCarePlanParticipantComponent(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getGoal()) - tgt.addGoal(convertReference(t)); - for (org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) - tgt.addActivity(convertCarePlanActivityComponent(t)); -// tgt.setNote(convertAnnotation(src.getNote())); - return tgt; - } - - public org.hl7.fhir.instance.model.CarePlan convertCarePlan(org.hl7.fhir.r4.model.CarePlan src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.CarePlan tgt = new org.hl7.fhir.instance.model.CarePlan(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setStatus(convertCarePlanStatus(src.getStatus())); - tgt.setContext(convertReference(src.getContext())); - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); -// tgt.setModified(src.getModified()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) - tgt.addCategory(convertCodeableConcept(t)); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.Reference t : src.getAddresses()) - tgt.addAddresses(convertReference(t)); -// for (org.hl7.fhir.r4.model.Reference t : src.getSupport()) -// tgt.addSupport(convertReference(t)); -// for (org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent t : src.getRelatedPlan()) -// tgt.addRelatedPlan(convertCarePlanRelatedPlanComponent(t)); -// for (org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent t : src.getParticipant()) -// tgt.addParticipant(convertCarePlanParticipantComponent(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) - tgt.addGoal(convertReference(t)); - for (org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) - tgt.addActivity(convertCarePlanActivityComponent(t)); -// tgt.setNote(convertAnnotation(src.getNote())); - return tgt; - } - - public org.hl7.fhir.r4.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.instance.model.CarePlan.CarePlanStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT; - case DRAFT: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.CANCELLED; - default: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { -// case PROPOSED: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.PROPOSED; - case DRAFT: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.CANCELLED; - default: return org.hl7.fhir.instance.model.CarePlan.CarePlanStatus.NULL; - } - } - -// public org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent convertCarePlanRelatedPlanComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent(); -// copyElement(src, tgt); -// tgt.setCode(convertCarePlanRelationship(src.getCode())); -// tgt.setPlan(convertReference(src.getPlan())); -// return tgt; -// } - -// public org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent convertCarePlanRelatedPlanComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanRelatedPlanComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanRelatedPlanComponent(); -// copyElement(src, tgt); -// tgt.setCode(convertCarePlanRelationship(src.getCode())); -// tgt.setPlan(convertReference(src.getPlan())); -// return tgt; -// } - -// public org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship convertCarePlanRelationship(org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship src) throws FHIRException { -// if (src == null) -// return null; -// switch (src) { -// case INCLUDES: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.INCLUDES; -// case REPLACES: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.REPLACES; -// case FULFILLS: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.FULFILLS; -// default: return org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship.NULL; -// } -// } - -// public org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship convertCarePlanRelationship(org.hl7.fhir.r4.model.CarePlan.CarePlanRelationship src) throws FHIRException { -// if (src == null) -// return null; -// switch (src) { -// case INCLUDES: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.INCLUDES; -// case REPLACES: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.REPLACES; -// case FULFILLS: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.FULFILLS; -// default: return org.hl7.fhir.instance.model.CarePlan.CarePlanRelationship.NULL; -// } -// } - -// public org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent convertCarePlanParticipantComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent(); -// copyElement(src, tgt); -// tgt.setRole(convertCodeableConcept(src.getRole())); -// tgt.setMember(convertReference(src.getMember())); -// return tgt; -// } -// -// public org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent convertCarePlanParticipantComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanParticipantComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanParticipantComponent(); -// copyElement(src, tgt); -// tgt.setRole(convertCodeableConcept(src.getRole())); -// tgt.setMember(convertReference(src.getMember())); -// return tgt; -// } -// - public org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent(); - copyElement(src, tgt); -// for (org.hl7.fhir.instance.model.Reference t : src.getActionResulting()) -// tgt.addActionResulting(convertReference(t)); - for (org.hl7.fhir.instance.model.Annotation t : src.getProgress()) - tgt.addProgress(convertAnnotation(t)); - tgt.setReference(convertReference(src.getReference())); - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - return tgt; - } - - public org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanActivityComponent(); - copyElement(src, tgt); -// for (org.hl7.fhir.r4.model.Reference t : src.getActionResulting()) -// tgt.addActionResulting(convertReference(t)); - for (org.hl7.fhir.r4.model.Annotation t : src.getProgress()) - tgt.addProgress(convertAnnotation(t)); - tgt.setReference(convertReference(src.getReference())); - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - return tgt; - } - - public org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent(); - copyElement(src, tgt); - tgt.setCategory(convertCodeableConcept(src.getCategory())); - tgt.setCode(convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReasonCode()) - tgt.addReasonCode(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getReasonReference()) - tgt.addReasonReference(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getGoal()) - tgt.addGoal(convertReference(t)); - tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); -// tgt.setStatusReason(convertCodeableConcept(src.getStatusReason())); - tgt.setProhibited(src.getProhibited()); - tgt.setScheduled(convertType(src.getScheduled())); - tgt.setLocation(convertReference(src.getLocation())); - for (org.hl7.fhir.instance.model.Reference t : src.getPerformer()) - tgt.addPerformer(convertReference(t)); - tgt.setProduct(convertType(src.getProduct())); - tgt.setDailyAmount(convertSimpleQuantity(src.getDailyAmount())); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setDescription(src.getDescription()); - return tgt; - } - - public org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.instance.model.CarePlan.CarePlanActivityDetailComponent(); - copyElement(src, tgt); - tgt.setCategory(convertCodeableConcept(src.getCategory())); - tgt.setCode(convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) - tgt.addReasonCode(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) - tgt.addReasonReference(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) - tgt.addGoal(convertReference(t)); - tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); -// tgt.setStatusReason(convertCodeableConcept(src.getStatusReason())); - tgt.setProhibited(src.getProhibited()); - tgt.setScheduled(convertType(src.getScheduled())); - tgt.setLocation(convertReference(src.getLocation())); - for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) - tgt.addPerformer(convertReference(t)); - tgt.setProduct(convertType(src.getProduct())); - tgt.setDailyAmount(convertSimpleQuantity(src.getDailyAmount())); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setDescription(src.getDescription()); - return tgt; - } - - public org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSTARTED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED; - case SCHEDULED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED; - case INPROGRESS: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED; - default: return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSTARTED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.NOTSTARTED; - case SCHEDULED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.SCHEDULED; - case INPROGRESS: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.CANCELLED; - default: return org.hl7.fhir.instance.model.CarePlan.CarePlanActivityStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.instance.model.ClinicalImpression src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ClinicalImpression tgt = new org.hl7.fhir.r4.model.ClinicalImpression(); - copyDomainResource(src, tgt); - tgt.setSubject(convertReference(src.getPatient())); - tgt.setAssessor(convertReference(src.getAssessor())); - tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - tgt.setPrevious(convertReference(src.getPrevious())); - for (org.hl7.fhir.instance.model.Reference t : src.getProblem()) - tgt.addProblem(convertReference(t)); -// for (org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent t : src.getInvestigations()) -// tgt.addInvestigations(convertClinicalImpressionInvestigationsComponent(t)); - tgt.addProtocol(src.getProtocol()); - tgt.setSummary(src.getSummary()); - for (org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) - tgt.addFinding(convertClinicalImpressionFindingComponent(t)); - if (src.hasPrognosis()) - tgt.addPrognosisCodeableConcept ().setText(src.getPrognosis()); -// for (org.hl7.fhir.instance.model.Reference t : src.getPlan()) -// tgt.addPlan(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getAction()) - tgt.addAction(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.r4.model.ClinicalImpression src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ClinicalImpression tgt = new org.hl7.fhir.instance.model.ClinicalImpression(); - copyDomainResource(src, tgt); - tgt.setPatient(convertReference(src.getSubject())); - tgt.setAssessor(convertReference(src.getAssessor())); - tgt.setStatus(convertClinicalImpressionStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - tgt.setPrevious(convertReference(src.getPrevious())); - for (org.hl7.fhir.r4.model.Reference t : src.getProblem()) - tgt.addProblem(convertReference(t)); -// for (org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent t : src.getInvestigations()) -// tgt.addInvestigations(convertClinicalImpressionInvestigationsComponent(t)); - for (UriType t : src.getProtocol()) - tgt.setProtocol(t.asStringValue()); - tgt.setSummary(src.getSummary()); - for (org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) - tgt.addFinding(convertClinicalImpressionFindingComponent(t)); - tgt.setPrognosis(src.getPrognosisCodeableConceptFirstRep().getText()); -// for (org.hl7.fhir.r4.model.Reference t : src.getPlan()) -// tgt.addPlan(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getAction()) - tgt.addAction(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT; - case COMPLETED: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionStatus.NULL; - } - } - -// public org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent convertClinicalImpressionInvestigationsComponent(org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent(); -// copyElement(src, tgt); -// tgt.setCode(convertCodeableConcept(src.getCode())); -// for (org.hl7.fhir.instance.model.Reference t : src.getItem()) -// tgt.addItem(convertReference(t)); -// return tgt; -// } -// -// public org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent convertClinicalImpressionInvestigationsComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent tgt = new org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionInvestigationsComponent(); -// copyElement(src, tgt); -// tgt.setCode(convertCodeableConcept(src.getCode())); -// for (org.hl7.fhir.r4.model.Reference t : src.getItem()) -// tgt.addItem(convertReference(t)); -// return tgt; -// } - - public org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent(); - copyElement(src, tgt); - tgt.setItem(convertCodeableConcept(src.getItem())); -// tgt.setCause(src.getCause()); - return tgt; - } - - public org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.instance.model.ClinicalImpression.ClinicalImpressionFindingComponent(); - copyElement(src, tgt); - if (src.hasItemCodeableConcept()) - try { - tgt.setItem(convertCodeableConcept(src.getItemCodeableConcept())); - } catch (org.hl7.fhir.exceptions.FHIRException e) { - } -// tgt.setCause(src.getCause()); - return tgt; - } - - public org.hl7.fhir.r4.model.Communication convertCommunication(org.hl7.fhir.instance.model.Communication src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Communication tgt = new org.hl7.fhir.r4.model.Communication(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.addCategory(convertCodeableConcept(src.getCategory())); - tgt.setSender(convertReference(src.getSender())); - for (org.hl7.fhir.instance.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - for (org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent t : src.getPayload()) - tgt.addPayload(convertCommunicationPayloadComponent(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getMedium()) - tgt.addMedium(convertCodeableConcept(t)); - tgt.setStatus(convertCommunicationStatus(src.getStatus())); - tgt.setContext(convertReference(src.getEncounter())); - tgt.setSent(src.getSent()); - tgt.setReceived(src.getReceived()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) - tgt.addReasonCode(convertCodeableConcept(t)); - tgt.setSubject(convertReference(src.getSubject())); - return tgt; - } - - public org.hl7.fhir.instance.model.Communication convertCommunication(org.hl7.fhir.r4.model.Communication src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Communication tgt = new org.hl7.fhir.instance.model.Communication(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep())); - tgt.setSender(convertReference(src.getSender())); - for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - for (org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent t : src.getPayload()) - tgt.addPayload(convertCommunicationPayloadComponent(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMedium()) - tgt.addMedium(convertCodeableConcept(t)); - tgt.setStatus(convertCommunicationStatus(src.getStatus())); - tgt.setEncounter(convertReference(src.getContext())); - tgt.setSent(src.getSent()); - tgt.setReceived(src.getReceived()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(convertCodeableConcept(t)); - tgt.setSubject(convertReference(src.getSubject())); - return tgt; - } - - public org.hl7.fhir.r4.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.instance.model.Communication.CommunicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.COMPLETED; - case SUSPENDED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.SUSPENDED; - case REJECTED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ENTEREDINERROR; - case FAILED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ABORTED; - default: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.r4.model.Communication.CommunicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.COMPLETED; - case SUSPENDED: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.SUSPENDED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.REJECTED; - case ABORTED: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.FAILED; - default: return org.hl7.fhir.instance.model.Communication.CommunicationStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.instance.model.Communication.CommunicationPayloadComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.r4.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.instance.model.CommunicationRequest src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CommunicationRequest tgt = new org.hl7.fhir.r4.model.CommunicationRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.addCategory(convertCodeableConcept(src.getCategory())); - tgt.setSender(convertReference(src.getSender())); - for (org.hl7.fhir.instance.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - for (org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) - tgt.addPayload(convertCommunicationRequestPayloadComponent(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getMedium()) - tgt.addMedium(convertCodeableConcept(t)); - tgt.getRequester().setAgent(convertReference(src.getRequester())); - tgt.setStatus(convertCommunicationRequestStatus(src.getStatus())); - tgt.setContext(convertReference(src.getEncounter())); - tgt.setOccurrence(convertType(src.getScheduled())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) - tgt.addReasonCode(convertCodeableConcept(t)); - tgt.setAuthoredOn(src.getRequestedOn()); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setPriority(convertPriorityCode(src.getPriority())); - return tgt; - } - - private org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.instance.model.CodeableConcept priority) { - for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) - return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE; - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) - return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT; - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) - return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT; - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) - return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP; - } - return null; - } - - public org.hl7.fhir.instance.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.r4.model.CommunicationRequest src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.CommunicationRequest tgt = new org.hl7.fhir.instance.model.CommunicationRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep())); - tgt.setSender(convertReference(src.getSender())); - for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - for (org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) - tgt.addPayload(convertCommunicationRequestPayloadComponent(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMedium()) - tgt.addMedium(convertCodeableConcept(t)); - tgt.setRequester(convertReference(src.getRequester().getAgent())); - tgt.setStatus(convertCommunicationRequestStatus(src.getStatus())); - tgt.setEncounter(convertReference(src.getContext())); - tgt.setScheduled(convertType(src.getOccurrence())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(convertCodeableConcept(t)); - tgt.setRequestedOn(src.getAuthoredOn()); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setPriority(convertPriorityCode(src.getPriority())); - return tgt; - } - - private org.hl7.fhir.instance.model.CodeableConcept convertPriorityCode(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority priority) { - org.hl7.fhir.instance.model.CodeableConcept cc = new org.hl7.fhir.instance.model.CodeableConcept(); - switch (priority) { - case ROUTINE: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("routine"); break; - case URGENT: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("urgent"); break; - case STAT: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("stat"); break; - case ASAP: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("asap"); break; - default: return null; - } - return cc; - } - - public org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.DRAFT; - case PLANNED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case REQUESTED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case RECEIVED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case ACCEPTED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case INPROGRESS: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; - case SUSPENDED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; - case REJECTED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR; -// case FAILED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.FAILED; - default: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.PROPOSED; -// case PLANNED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.PLANNED; -// case REQUESTED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.REQUESTED; -// case RECEIVED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.RECEIVED; -// case ACCEPTED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.ACCEPTED; - case ACTIVE: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; - case SUSPENDED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.REJECTED; -// case FAILED: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.FAILED; - default: return org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.instance.model.CommunicationRequest.CommunicationRequestPayloadComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.r4.model.Composition convertComposition(org.hl7.fhir.instance.model.Composition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Composition tgt = new org.hl7.fhir.r4.model.Composition(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setClass_(convertCodeableConcept(src.getClass_())); - tgt.setTitle(src.getTitle()); - tgt.setStatus(convertCompositionStatus(src.getStatus())); - try { - tgt.setConfidentiality(org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.fromCode(src.getConfidentiality())); - } catch (org.hl7.fhir.exceptions.FHIRException e) { - throw new FHIRException(e); - } - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.instance.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - for (org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent t : src.getAttester()) - tgt.addAttester(convertCompositionAttesterComponent(t)); - tgt.setCustodian(convertReference(src.getCustodian())); - for (org.hl7.fhir.instance.model.Composition.CompositionEventComponent t : src.getEvent()) - tgt.addEvent(convertCompositionEventComponent(t)); - tgt.setEncounter(convertReference(src.getEncounter())); - for (org.hl7.fhir.instance.model.Composition.SectionComponent t : src.getSection()) - tgt.addSection(convertSectionComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Composition convertComposition(org.hl7.fhir.r4.model.Composition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Composition tgt = new org.hl7.fhir.instance.model.Composition(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setClass_(convertCodeableConcept(src.getClass_())); - tgt.setTitle(src.getTitle()); - tgt.setStatus(convertCompositionStatus(src.getStatus())); - tgt.setConfidentiality(src.getConfidentiality().toCode()); - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - for (org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent t : src.getAttester()) - tgt.addAttester(convertCompositionAttesterComponent(t)); - tgt.setCustodian(convertReference(src.getCustodian())); - for (org.hl7.fhir.r4.model.Composition.CompositionEventComponent t : src.getEvent()) - tgt.addEvent(convertCompositionEventComponent(t)); - tgt.setEncounter(convertReference(src.getEncounter())); - for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) - tgt.addSection(convertSectionComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.instance.model.Composition.CompositionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRELIMINARY: return org.hl7.fhir.r4.model.Composition.CompositionStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.Composition.CompositionStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.Composition.CompositionStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Composition.CompositionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Composition.CompositionStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.r4.model.Composition.CompositionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRELIMINARY: return org.hl7.fhir.instance.model.Composition.CompositionStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.instance.model.Composition.CompositionStatus.FINAL; - case AMENDED: return org.hl7.fhir.instance.model.Composition.CompositionStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Composition.CompositionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.Composition.CompositionStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.Enumeration t : src.getMode()) - tgt.addMode(convertCompositionAttestationMode(t.getValue())); - tgt.setTime(src.getTime()); - tgt.setParty(convertReference(src.getParty())); - return tgt; - } - - public org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.instance.model.Composition.CompositionAttesterComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Enumeration t : src.getMode()) - tgt.addMode(convertCompositionAttestationMode(t.getValue())); - tgt.setTime(src.getTime()); - tgt.setParty(convertReference(src.getParty())); - return tgt; - } - - public org.hl7.fhir.r4.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.instance.model.Composition.CompositionAttestationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PERSONAL; - case PROFESSIONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PROFESSIONAL; - case LEGAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.LEGAL; - case OFFICIAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.OFFICIAL; - default: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.NULL; - } - } - - public org.hl7.fhir.instance.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.r4.model.Composition.CompositionAttestationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSONAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.PERSONAL; - case PROFESSIONAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.PROFESSIONAL; - case LEGAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.LEGAL; - case OFFICIAL: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.OFFICIAL; - default: return org.hl7.fhir.instance.model.Composition.CompositionAttestationMode.NULL; - } - } - - public org.hl7.fhir.r4.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.instance.model.Composition.CompositionEventComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionEventComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.instance.model.Reference t : src.getDetail()) - tgt.addDetail(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.r4.model.Composition.CompositionEventComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.instance.model.Composition.CompositionEventComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) - tgt.addDetail(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.instance.model.Composition.SectionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); - copyElement(src, tgt); - tgt.setTitle(src.getTitle()); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setText(convertNarrative(src.getText())); - try { - tgt.setMode(org.hl7.fhir.r4.model.Composition.SectionMode.fromCode(src.getMode())); - } catch (org.hl7.fhir.exceptions.FHIRException e) { - throw new FHIRException(e); - } - tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); - for (org.hl7.fhir.instance.model.Reference t : src.getEntry()) - tgt.addEntry(convertReference(t)); - tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); - for (org.hl7.fhir.instance.model.Composition.SectionComponent t : src.getSection()) - tgt.addSection(convertSectionComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.r4.model.Composition.SectionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Composition.SectionComponent tgt = new org.hl7.fhir.instance.model.Composition.SectionComponent(); - copyElement(src, tgt); - tgt.setTitle(src.getTitle()); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setText(convertNarrative(src.getText())); - tgt.setMode(src.getMode().toCode()); - tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); - for (org.hl7.fhir.r4.model.Reference t : src.getEntry()) - tgt.addEntry(convertReference(t)); - tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); - for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) - tgt.addSection(convertSectionComponent(t)); - return tgt; - } - - private class SourceElementComponentWrapper { - public SourceElementComponentWrapper(SourceElementComponent comp, String source, String target) { - super(); - this.source = source; - this.target = target; - this.comp = comp; - } - private String source; - private String target; - private org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent comp; - - } - - public org.hl7.fhir.r4.model.ConceptMap convertConceptMap(org.hl7.fhir.instance.model.ConceptMap src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) - tgt.addContact(convertConceptMapContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgt.addJurisdiction(convertCodeableConcept(t)); - else - tgt.addUseContext(convertCodeableConceptToUsageContext(t)); - tgt.setPurpose(src.getRequirements()); - tgt.setCopyright(src.getCopyright()); - tgt.setSource(convertType(src.getSource())); - tgt.setTarget(convertType(src.getTarget())); - for (org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent t : src.getElement()) { - List ws = convertSourceElementComponent(t); - for (SourceElementComponentWrapper w : ws) - getGroup(tgt, w.source, w.target).addElement(w.comp); - } - return tgt; - } - - public org.hl7.fhir.r4.model.UsageContext convertCodeableConceptToUsageContext(org.hl7.fhir.instance.model.CodeableConcept t) throws FHIRException { - org.hl7.fhir.r4.model.UsageContext result = new org.hl7.fhir.r4.model.UsageContext(); - // todo: set type.. - result.setValue(convertCodeableConcept(t)); - return result; - } - - - private ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) { - for (ConceptMapGroupComponent grp : map.getGroup()) { - if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts)) - return grp; - } - ConceptMapGroupComponent grp = map.addGroup(); - grp.setSource(srcs); - grp.setTarget(tgts); - return grp; - } - - - public org.hl7.fhir.instance.model.ConceptMap convertConceptMap(org.hl7.fhir.r4.model.ConceptMap src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ConceptMap tgt = new org.hl7.fhir.instance.model.ConceptMap(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertConceptMapContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - if (t.hasValueCodeableConcept()) - tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addUseContext(convertCodeableConcept(t)); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); - tgt.setSource(convertType(src.getSource())); - tgt.setTarget(convertType(src.getTarget())); - for (org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup()) - for (org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent t : g.getElement()) - tgt.addElement(convertSourceElementComponent(t, g)); - return tgt; - } - - public org.hl7.fhir.r4.model.Enumerations.PublicationStatus convertConformanceResourceStatus(org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE; - case RETIRED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED; - default: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus convertConformanceResourceStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.ACTIVE; - case RETIRED: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.RETIRED; - default: return org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.ContactDetail convertConceptMapContactComponent(org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent convertConceptMapContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.ConceptMapContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public List convertSourceElementComponent(org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent src) throws FHIRException { - List res = new ArrayList(); - if (src == null || src.isEmpty()) - return res; - for (org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent t : src.getTarget()) { - org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); - copyElement(src, tgt); - tgt.setCode(src.getCode()); - tgt.addTarget(convertTargetElementComponent(t)); - res.add(new SourceElementComponentWrapper(tgt, src.getCodeSystem(), t.getCodeSystem())); - } - return res; - } - - public org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent(); - copyElement(src, tgt); - tgt.setCodeSystem(g.getSource()); - tgt.setCode(src.getCode()); - for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t, g)); - return tgt; - } - - public org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); - copyElement(src, tgt); - tgt.setCode(src.getCode()); - tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); - tgt.setComment(src.getComments()); - for (org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); - for (org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent(); - copyElement(src, tgt); - tgt.setCodeSystem(g.getTarget()); - tgt.setCode(src.getCode()); - tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); - tgt.setComments(src.getComment()); - for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); - for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUIVALENT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; - case EQUAL: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUAL; - case WIDER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER; - case SUBSUMES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SUBSUMES; - case NARROWER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER; - case SPECIALIZES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; - case INEXACT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.INEXACT; - case UNMATCHED: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED; - case DISJOINT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT; - default: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL; - } - } - - public org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUIVALENT: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; - case EQUAL: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.EQUAL; - case WIDER: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.WIDER; - case SUBSUMES: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.SUBSUMES; - case NARROWER: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.NARROWER; - case SPECIALIZES: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; - case INEXACT: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.INEXACT; - case UNMATCHED: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.UNMATCHED; - case DISJOINT: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.DISJOINT; - default: return org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence.NULL; - } - } - - public org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); - copyElement(src, tgt); - tgt.setProperty(src.getElement()); - tgt.setSystem(src.getCodeSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent(); - copyElement(src, tgt); - tgt.setElement(src.getProperty()); - tgt.setCodeSystem(src.getSystem()); - tgt.setCode(src.getCode()); - return tgt; - } - - public org.hl7.fhir.r4.model.Condition convertCondition(org.hl7.fhir.instance.model.Condition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Condition tgt = new org.hl7.fhir.r4.model.Condition(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getPatient())); - tgt.setContext(convertReference(src.getEncounter())); - tgt.setAsserter(convertReference(src.getAsserter())); - if (src.hasDateRecorded()) - tgt.setAssertedDate(src.getDateRecorded()); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.addCategory(convertCodeableConcept(src.getCategory())); - try { - tgt.setClinicalStatus(org.hl7.fhir.r4.model.Condition.ConditionClinicalStatus.fromCode(src.getClinicalStatus())); - } catch (org.hl7.fhir.exceptions.FHIRException e) { - throw new FHIRException(e); - } - tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus())); - tgt.setSeverity(convertCodeableConcept(src.getSeverity())); - tgt.setOnset(convertType(src.getOnset())); - tgt.setAbatement(convertType(src.getAbatement())); - tgt.addStage(convertConditionStageComponent(src.getStage())); - for (org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) - tgt.addEvidence(convertConditionEvidenceComponent(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getBodySite()) - tgt.addBodySite(convertCodeableConcept(t)); -// tgt.setNotes(src.getNotes()); - return tgt; - } - - public org.hl7.fhir.instance.model.Condition convertCondition(org.hl7.fhir.r4.model.Condition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Condition tgt = new org.hl7.fhir.instance.model.Condition(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setPatient(convertReference(src.getSubject())); - tgt.setEncounter(convertReference(src.getContext())); - tgt.setAsserter(convertReference(src.getAsserter())); - if (src.hasAssertedDate()) - tgt.setDateRecorded(src.getAssertedDate()); - tgt.setCode(convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) - tgt.setCategory(convertCodeableConcept(t)); - tgt.setClinicalStatus(src.getClinicalStatus().toCode()); - tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus())); - tgt.setSeverity(convertCodeableConcept(src.getSeverity())); - tgt.setOnset(convertType(src.getOnset())); - tgt.setAbatement(convertType(src.getAbatement())); - tgt.setStage(convertConditionStageComponent(src.getStageFirstRep())); - for (org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) - tgt.addEvidence(convertConditionEvidenceComponent(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getBodySite()) - tgt.addBodySite(convertCodeableConcept(t)); -// tgt.setNotes(src.getNotes()); - return tgt; - } - - public org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROVISIONAL: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.PROVISIONAL; - case DIFFERENTIAL: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.DIFFERENTIAL; - case CONFIRMED: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.CONFIRMED; - case REFUTED: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.REFUTED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROVISIONAL: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.PROVISIONAL; - case DIFFERENTIAL: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.DIFFERENTIAL; - case CONFIRMED: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.CONFIRMED; - case REFUTED: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.REFUTED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.UNKNOWN; - default: return org.hl7.fhir.instance.model.Condition.ConditionVerificationStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.instance.model.Condition.ConditionStageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionStageComponent(); - copyElement(src, tgt); - tgt.setSummary(convertCodeableConcept(src.getSummary())); - for (org.hl7.fhir.instance.model.Reference t : src.getAssessment()) - tgt.addAssessment(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.r4.model.Condition.ConditionStageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.instance.model.Condition.ConditionStageComponent(); - copyElement(src, tgt); - tgt.setSummary(convertCodeableConcept(src.getSummary())); - for (org.hl7.fhir.r4.model.Reference t : src.getAssessment()) - tgt.addAssessment(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent(); - copyElement(src, tgt); - tgt.addCode(convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.instance.model.Reference t : src.getDetail()) - tgt.addDetail(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.instance.model.Condition.ConditionEvidenceComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept cc : src.getCode()) - tgt.setCode(convertCodeableConcept(cc)); - for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) - tgt.addDetail(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement convertConformance(org.hl7.fhir.instance.model.Conformance src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent t : src.getContact()) - tgt.addContact(convertConformanceContactComponent(t)); - tgt.setDescription(src.getDescription()); - tgt.setPurpose(src.getRequirements()); - tgt.setCopyright(src.getCopyright()); - tgt.setKind(convertConformanceStatementKind(src.getKind())); - tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware())); - tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); - tgt.setFhirVersion(src.getFhirVersion()); - tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); - for (org.hl7.fhir.instance.model.CodeType t : src.getFormat()) - tgt.addFormat(t.getValue()); - for (org.hl7.fhir.instance.model.Reference t : src.getProfile()) - tgt.addProfile(convertReference(t)); - for (org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent t : src.getRest()) - tgt.addRest(convertConformanceRestComponent(t)); - for (org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent t : src.getMessaging()) - tgt.addMessaging(convertConformanceMessagingComponent(t)); - for (org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent t : src.getDocument()) - tgt.addDocument(convertConformanceDocumentComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance convertConformance(org.hl7.fhir.r4.model.CapabilityStatement src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance tgt = new org.hl7.fhir.instance.model.Conformance(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertConformanceContactComponent(t)); - tgt.setDescription(src.getDescription()); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); - tgt.setKind(convertConformanceStatementKind(src.getKind())); - tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware())); - if (src.hasImplementation()) - tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation())); - tgt.setFhirVersion(src.getFhirVersion()); - tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown())); - for (org.hl7.fhir.r4.model.CodeType t : src.getFormat()) - tgt.addFormat(t.getValue()); - for (org.hl7.fhir.r4.model.Reference t : src.getProfile()) - tgt.addProfile(convertReference(t)); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest()) - tgt.addRest(convertConformanceRestComponent(t)); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging()) - tgt.addMessaging(convertConformanceMessagingComponent(t)); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument()) - tgt.addDocument(convertConformanceDocumentComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind convertConformanceStatementKind(org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.INSTANCE; - case CAPABILITY: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY; - case REQUIREMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS; - default: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind convertConformanceStatementKind(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INSTANCE: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.INSTANCE; - case CAPABILITY: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.CAPABILITY; - case REQUIREMENTS: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.REQUIREMENTS; - default: return org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.instance.model.Conformance.UnknownContentCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NO: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NO; - case EXTENSIONS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.EXTENSIONS; - case ELEMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.ELEMENTS; - case BOTH: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.BOTH; - default: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NO: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.NO; - case EXTENSIONS: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.EXTENSIONS; - case ELEMENTS: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.ELEMENTS; - case BOTH: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.BOTH; - default: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.NULL; - } - } - - public org.hl7.fhir.r4.model.ContactDetail convertConformanceContactComponent(org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setVersion(src.getVersion()); - tgt.setReleaseDate(src.getReleaseDate()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceSoftwareComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setVersion(src.getVersion()); - tgt.setReleaseDate(src.getReleaseDate()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent(); - copyElement(src, tgt); - tgt.setDescription(src.getDescription()); - tgt.setUrl(src.getUrl()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceImplementationComponent(); - copyElement(src, tgt); - tgt.setDescription(src.getDescription()); - tgt.setUrl(src.getUrl()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent convertConformanceRestComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent(); - copyElement(src, tgt); - tgt.setMode(convertRestfulConformanceMode(src.getMode())); - tgt.setDocumentation(src.getDocumentation()); - tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); - for (org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent t : src.getResource()) - tgt.addResource(convertConformanceRestResourceComponent(t)); - for (org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent t : src.getInteraction()) - tgt.addInteraction(convertSystemInteractionComponent(t)); - if (src.getTransactionMode() == org.hl7.fhir.instance.model.Conformance.TransactionMode.BATCH || src.getTransactionMode() == org.hl7.fhir.instance.model.Conformance.TransactionMode.BOTH) - tgt.addInteraction().setCode(SystemRestfulInteraction.BATCH); - for (org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) - tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); - for (org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent t : src.getOperation()) - tgt.addOperation(convertConformanceRestOperationComponent(t)); - for (org.hl7.fhir.instance.model.UriType t : src.getCompartment()) - tgt.addCompartment(t.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent(); - copyElement(src, tgt); - tgt.setMode(convertRestfulConformanceMode(src.getMode())); - tgt.setDocumentation(src.getDocumentation()); - tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) - tgt.addResource(convertConformanceRestResourceComponent(t)); - boolean batch = false; - boolean transaction = false; - for (org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) { - if (t.getCode().equals(SystemRestfulInteraction.BATCH)) - batch = true; - else - tgt.addInteraction(convertSystemInteractionComponent(t)); - if (t.getCode().equals(SystemRestfulInteraction.TRANSACTION)) - transaction = true; - } - if (batch) - tgt.setTransactionMode(transaction ? org.hl7.fhir.instance.model.Conformance.TransactionMode.BOTH : org.hl7.fhir.instance.model.Conformance.TransactionMode.BATCH); - else - tgt.setTransactionMode(transaction ? org.hl7.fhir.instance.model.Conformance.TransactionMode.TRANSACTION : org.hl7.fhir.instance.model.Conformance.TransactionMode.NOTSUPPORTED); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) - tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) - tgt.addOperation(convertConformanceRestOperationComponent(t)); - for (org.hl7.fhir.r4.model.UriType t : src.getCompartment()) - tgt.addCompartment(t.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode convertRestfulConformanceMode(org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLIENT: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.CLIENT; - case SERVER: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.SERVER; - default: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode convertRestfulConformanceMode(org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLIENT: return org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode.CLIENT; - case SERVER: return org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode.SERVER; - default: return org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode.NULL; - } - } - - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); - copyElement(src, tgt); - tgt.setCors(src.getCors()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getService()) - tgt.addService(convertCodeableConcept(t)); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate()) - tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityComponent(); - copyElement(src, tgt); - tgt.setCors(src.getCors()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) - tgt.addService(convertCodeableConcept(t)); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) - tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setBlob(src.getBlob()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestSecurityCertificateComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setBlob(src.getBlob()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setProfile(convertReference(src.getProfile())); - for (org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent t : src.getInteraction()) - tgt.addInteraction(convertResourceInteractionComponent(t)); - tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); - tgt.setReadHistory(src.getReadHistory()); - tgt.setUpdateCreate(src.getUpdateCreate()); - tgt.setConditionalCreate(src.getConditionalCreate()); - tgt.setConditionalUpdate(src.getConditionalUpdate()); - tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); - for (org.hl7.fhir.instance.model.StringType t : src.getSearchInclude()) - tgt.addSearchInclude(t.getValue()); - for (org.hl7.fhir.instance.model.StringType t : src.getSearchRevInclude()) - tgt.addSearchRevInclude(t.getValue()); - for (org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) - tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - for (org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) - tgt.addInteraction(convertResourceInteractionComponent(t)); - tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); - tgt.setReadHistory(src.getReadHistory()); - tgt.setUpdateCreate(src.getUpdateCreate()); - tgt.setConditionalCreate(src.getConditionalCreate()); - tgt.setConditionalUpdate(src.getConditionalUpdate()); - tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); - for (org.hl7.fhir.r4.model.StringType t : src.getSearchInclude()) - tgt.addSearchInclude(t.getValue()); - for (org.hl7.fhir.r4.model.StringType t : src.getSearchRevInclude()) - tgt.addSearchRevInclude(t.getValue()); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) - tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOVERSION: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION; - case VERSIONED: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED; - case VERSIONEDUPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE; - default: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOVERSION: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.NOVERSION; - case VERSIONED: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.VERSIONED; - case VERSIONEDUPDATE: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.VERSIONEDUPDATE; - default: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSUPPORTED: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED; - case SINGLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE; - case MULTIPLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE; - default: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSUPPORTED: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.NOTSUPPORTED; - case SINGLE: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.SINGLE; - case MULTIPLE: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.MULTIPLE; - default: return org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent(); - copyElement(src, tgt); - tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent tgt = new org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent(); - copyElement(src, tgt); - tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case READ: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.READ; - case VREAD: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.VREAD; - case UPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.UPDATE; - case DELETE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.DELETE; - case HISTORYINSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE; - case HISTORYTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE; - case CREATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.CREATE; - case SEARCHTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE; - default: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case READ: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.READ; - case VREAD: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.VREAD; - case UPDATE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.UPDATE; - case DELETE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.DELETE; - case HISTORYINSTANCE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.HISTORYINSTANCE; - case HISTORYTYPE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.HISTORYTYPE; - case CREATE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.CREATE; - case SEARCHTYPE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.SEARCHTYPE; - default: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setDefinition(src.getDefinition()); - tgt.setType(convertSearchParamType(src.getType())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setDefinition(src.getDefinition()); - tgt.setType(convertSearchParamType(src.getType())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent(); - copyElement(src, tgt); - tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent tgt = new org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent(); - copyElement(src, tgt); - tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case TRANSACTION: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION; - case SEARCHSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM; - case HISTORYSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM; - default: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case TRANSACTION: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.TRANSACTION; - case SEARCHSYSTEM: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.SEARCHSYSTEM; - case HISTORYSYSTEM: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.HISTORYSYSTEM; - default: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setDefinition(convertReference(src.getDefinition())); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceRestOperationComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setDefinition(convertReference(src.getDefinition())); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) - tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); - tgt.setReliableCache(src.getReliableCache()); - tgt.setDocumentation(src.getDocumentation()); - for (org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) - tgt.addEvent(convertConformanceMessagingEventComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceMessagingComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) - tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); - tgt.setReliableCache(src.getReliableCache()); - tgt.setDocumentation(src.getDocumentation()); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) - tgt.addEvent(convertConformanceMessagingEventComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); - copyElement(src, tgt); - tgt.setProtocol(convertCoding(src.getProtocol())); - tgt.setAddress(src.getAddress()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEndpointComponent(); - copyElement(src, tgt); - tgt.setProtocol(convertCoding(src.getProtocol())); - tgt.setAddress(src.getAddress()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent(); - copyElement(src, tgt); - tgt.setCode(convertCoding(src.getCode())); - tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); - tgt.setMode(convertConformanceEventMode(src.getMode())); - tgt.setFocus(src.getFocus()); - tgt.setRequest(convertReference(src.getRequest())); - tgt.setResponse(convertReference(src.getResponse())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceMessagingEventComponent(); - copyElement(src, tgt); - tgt.setCode(convertCoding(src.getCode())); - tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); - tgt.setMode(convertConformanceEventMode(src.getMode())); - tgt.setFocus(src.getFocus()); - tgt.setRequest(convertReference(src.getRequest())); - tgt.setResponse(convertReference(src.getResponse())); - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONSEQUENCE: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE; - case CURRENCY: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY; - case NOTIFICATION: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION; - default: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONSEQUENCE: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.CONSEQUENCE; - case CURRENCY: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.CURRENCY; - case NOTIFICATION: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.NOTIFICATION; - default: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode convertConformanceEventMode(org.hl7.fhir.instance.model.Conformance.ConformanceEventMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SENDER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.SENDER; - case RECEIVER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.RECEIVER; - default: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceEventMode convertConformanceEventMode(org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SENDER: return org.hl7.fhir.instance.model.Conformance.ConformanceEventMode.SENDER; - case RECEIVER: return org.hl7.fhir.instance.model.Conformance.ConformanceEventMode.RECEIVER; - default: return org.hl7.fhir.instance.model.Conformance.ConformanceEventMode.NULL; - } - } - - public org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent(); - copyElement(src, tgt); - tgt.setMode(convertDocumentMode(src.getMode())); - tgt.setDocumentation(src.getDocumentation()); - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - public org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent tgt = new org.hl7.fhir.instance.model.Conformance.ConformanceDocumentComponent(); - copyElement(src, tgt); - tgt.setMode(convertDocumentMode(src.getMode())); - tgt.setDocumentation(src.getDocumentation()); - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - public org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.instance.model.Conformance.DocumentMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRODUCER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.PRODUCER; - case CONSUMER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.CONSUMER; - default: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.NULL; - } - } - - public org.hl7.fhir.instance.model.Conformance.DocumentMode convertDocumentMode(org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRODUCER: return org.hl7.fhir.instance.model.Conformance.DocumentMode.PRODUCER; - case CONSUMER: return org.hl7.fhir.instance.model.Conformance.DocumentMode.CONSUMER; - default: return org.hl7.fhir.instance.model.Conformance.DocumentMode.NULL; - } - } - - public org.hl7.fhir.r4.model.Contract convertContract(org.hl7.fhir.instance.model.Contract src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract tgt = new org.hl7.fhir.r4.model.Contract(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setIssued(src.getIssued()); - tgt.setApplies(convertPeriod(src.getApplies())); - for (org.hl7.fhir.instance.model.Reference t : src.getSubject()) - tgt.addSubject(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getAuthority()) - tgt.addAuthority(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getDomain()) - tgt.addDomain(convertReference(t)); - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getSubType()) - tgt.addSubType(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.Contract.SignatoryComponent t : src.getSigner()) - tgt.addSigner(convertSignatoryComponent(t)); - for (org.hl7.fhir.instance.model.Contract.TermComponent t : src.getTerm()) - tgt.addTerm(convertTermComponent(t)); - for (org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) - tgt.addFriendly(convertFriendlyLanguageComponent(t)); - for (org.hl7.fhir.instance.model.Contract.LegalLanguageComponent t : src.getLegal()) - tgt.addLegal(convertLegalLanguageComponent(t)); - for (org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent t : src.getRule()) - tgt.setRule(convertComputableLanguageComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract convertContract(org.hl7.fhir.r4.model.Contract src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract tgt = new org.hl7.fhir.instance.model.Contract(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setIssued(src.getIssued()); - tgt.setApplies(convertPeriod(src.getApplies())); - for (org.hl7.fhir.r4.model.Reference t : src.getSubject()) - tgt.addSubject(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthority()) - tgt.addAuthority(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getDomain()) - tgt.addDomain(convertReference(t)); - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubType()) - tgt.addSubType(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Contract.SignatoryComponent t : src.getSigner()) - tgt.addSigner(convertSignatoryComponent(t)); - for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getTerm()) - tgt.addTerm(convertTermComponent(t)); - for (org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) - tgt.addFriendly(convertFriendlyLanguageComponent(t)); - for (org.hl7.fhir.r4.model.Contract.LegalLanguageComponent t : src.getLegal()) - tgt.addLegal(convertLegalLanguageComponent(t)); - if (src.hasRule()) - tgt.addRule(convertComputableLanguageComponent(src.getRule())); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.instance.model.Contract.ActorComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); - copyElement(src, tgt); - tgt.setActor(convertReference(src.getEntity())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.ActorComponent convertAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.ActorComponent tgt = new org.hl7.fhir.instance.model.Contract.ActorComponent(); - copyElement(src, tgt); - tgt.setEntity(convertReference(src.getActor())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.instance.model.Contract.SignatoryComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.r4.model.Contract.SignatoryComponent(); - copyElement(src, tgt); - tgt.setType(convertCoding(src.getType())); - tgt.setParty(convertReference(src.getParty())); - if (src.hasSignature()) - tgt.addSignature(new org.hl7.fhir.r4.model.Signature().setBlob(src.getSignature().getBytes())); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.r4.model.Contract.SignatoryComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.instance.model.Contract.SignatoryComponent(); - copyElement(src, tgt); - tgt.setType(convertCoding(src.getType())); - tgt.setParty(convertReference(src.getParty())); - for (org.hl7.fhir.r4.model.Signature t : src.getSignature()) - tgt.setSignature(Base64.encodeBase64String(t.getBlob())); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.instance.model.Contract.ValuedItemComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); - copyElement(src, tgt); - tgt.setEntity(convertType(src.getEntity())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setEffectiveTime(src.getEffectiveTime()); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - tgt.setFactor(src.getFactor()); - tgt.setPoints(src.getPoints()); - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.instance.model.Contract.ValuedItemComponent(); - copyElement(src, tgt); - tgt.setEntity(convertType(src.getEntity())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setEffectiveTime(src.getEffectiveTime()); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - tgt.setFactor(src.getFactor()); - tgt.setPoints(src.getPoints()); - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.instance.model.Contract.TermComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.TermComponent tgt = new org.hl7.fhir.r4.model.Contract.TermComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setIssued(src.getIssued()); - tgt.setApplies(convertPeriod(src.getApplies())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setSubType(convertCodeableConcept(src.getSubType())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getAction()) - tgt.addAction(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getActionReason()) - tgt.addActionReason(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.Contract.TermActorComponent t : src.getActor()) - tgt.addAgent(convertTermAgentComponent(t)); - for (org.hl7.fhir.instance.model.Contract.TermComponent t : src.getGroup()) - tgt.addGroup(convertTermComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.r4.model.Contract.TermComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.TermComponent tgt = new org.hl7.fhir.instance.model.Contract.TermComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setIssued(src.getIssued()); - tgt.setApplies(convertPeriod(src.getApplies())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setSubType(convertCodeableConcept(src.getSubType())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAction()) - tgt.addAction(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getActionReason()) - tgt.addActionReason(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Contract.AgentComponent t : src.getAgent()) - tgt.addActor(convertTermAgentComponent(t)); - for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getGroup()) - tgt.addGroup(convertTermComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.AgentComponent convertTermAgentComponent(org.hl7.fhir.instance.model.Contract.TermActorComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); - copyElement(src, tgt); - tgt.setActor(convertReference(src.getEntity())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.TermActorComponent convertTermAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.TermActorComponent tgt = new org.hl7.fhir.instance.model.Contract.TermActorComponent(); - copyElement(src, tgt); - tgt.setEntity(convertReference(src.getActor())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.instance.model.Contract.TermValuedItemComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); - copyElement(src, tgt); - tgt.setEntity(convertType(src.getEntity())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setEffectiveTime(src.getEffectiveTime()); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - tgt.setFactor(src.getFactor()); - tgt.setPoints(src.getPoints()); - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.TermValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.TermValuedItemComponent tgt = new org.hl7.fhir.instance.model.Contract.TermValuedItemComponent(); - copyElement(src, tgt); - tgt.setEntity(convertType(src.getEntity())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setEffectiveTime(src.getEffectiveTime()); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - tgt.setFactor(src.getFactor()); - tgt.setPoints(src.getPoints()); - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.instance.model.Contract.LegalLanguageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.LegalLanguageComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.r4.model.Contract.LegalLanguageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.instance.model.Contract.LegalLanguageComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.instance.model.Contract.ComputableLanguageComponent(); - copyElement(src, tgt); - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - - public org.hl7.fhir.r4.model.StructureDefinition convertDataElement(org.hl7.fhir.instance.model.DataElement src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl().replace("/DataElement/", "/StructureDefinition/de-")); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setVersion(src.getVersion()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.DataElement.DataElementContactComponent t : src.getContact()) - tgt.addContact(convertDataElementContactComponent(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgt.addJurisdiction(convertCodeableConcept(t)); - else - tgt.addUseContext(convertCodeableConceptToUsageContext(t)); - tgt.setCopyright(src.getCopyright()); -// tgt.setStringency(convertDataElementStringency(src.getStringency())); - for (org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent t : src.getMapping()) - tgt.addMapping(convertDataElementMappingComponent(t)); - List slicePaths = new ArrayList(); - for (org.hl7.fhir.instance.model.ElementDefinition t : src.getElement()) { - if (t.hasSlicing()) - slicePaths.add(t.getPath()); - tgt.getSnapshot().addElement(convertElementDefinition(t, slicePaths)); - } - tgt.setKind(StructureDefinitionKind.LOGICAL); - tgt.setAbstract(false); - tgt.setType(tgt.getName()); - tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/Element"); - tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); - return tgt; - } - -// public org.hl7.fhir.instance.model.DataElement convertDataElement(org.hl7.fhir.r4.model.DataElement src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.DataElement tgt = new org.hl7.fhir.instance.model.DataElement(); -// copyDomainResource(src, tgt); -// tgt.setUrl(src.getUrl()); -// for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) -// tgt.addIdentifier(convertIdentifier(t)); -// tgt.setVersion(src.getVersion()); -// tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); -// if (src.hasExperimental()) -// tgt.setExperimental(src.getExperimental()); -// tgt.setPublisher(src.getPublisher()); -// if (src.hasDate()) -// tgt.setDate(src.getDate()); -// tgt.setName(src.getName()); -// for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) -// tgt.addContact(convertDataElementContactComponent(t)); -// for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) -// if (t.hasValueCodeableConcept()) -// tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); -// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) -// tgt.addUseContext(convertCodeableConcept(t)); -// tgt.setCopyright(src.getCopyright()); -// tgt.setStringency(convertDataElementStringency(src.getStringency())); -// for (org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent t : src.getMapping()) -// tgt.addMapping(convertDataElementMappingComponent(t)); -// for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) -// tgt.addElement(convertElementDefinition(t)); -// return tgt; -// } - -// public org.hl7.fhir.r4.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.instance.model.DataElement.DataElementStringency src) throws FHIRException { -// if (src == null) -// return null; -// switch (src) { -// case COMPARABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.COMPARABLE; -// case FULLYSPECIFIED: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FULLYSPECIFIED; -// case EQUIVALENT: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.EQUIVALENT; -// case CONVERTABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.CONVERTABLE; -// case SCALEABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.SCALEABLE; -// case FLEXIBLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FLEXIBLE; -// default: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.NULL; -// } -// } -// -// public org.hl7.fhir.instance.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.r4.model.DataElement.DataElementStringency src) throws FHIRException { -// if (src == null) -// return null; -// switch (src) { -// case COMPARABLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.COMPARABLE; -// case FULLYSPECIFIED: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.FULLYSPECIFIED; -// case EQUIVALENT: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.EQUIVALENT; -// case CONVERTABLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.CONVERTABLE; -// case SCALEABLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.SCALEABLE; -// case FLEXIBLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.FLEXIBLE; -// default: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.NULL; -// } -// } - - public org.hl7.fhir.r4.model.ContactDetail convertDataElementContactComponent(org.hl7.fhir.instance.model.DataElement.DataElementContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DataElement.DataElementContactComponent convertDataElementContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.instance.model.DataElement.DataElementContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertDataElementMappingComponent(org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); - copyElement(src, tgt); - tgt.setIdentity(src.getIdentity()); - tgt.setUri(src.getUri()); - tgt.setName(src.getName()); - tgt.setComment(src.getComments()); - return tgt; - } - -// public org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent(); -// copyElement(src, tgt); -// tgt.setIdentity(src.getIdentity()); -// tgt.setUri(src.getUri()); -// tgt.setName(src.getName()); -// tgt.setComments(src.getComment()); -// return tgt; -// } - - public org.hl7.fhir.r4.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.instance.model.DetectedIssue src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DetectedIssue tgt = new org.hl7.fhir.r4.model.DetectedIssue(); - copyDomainResource(src, tgt); - tgt.setPatient(convertReference(src.getPatient())); - tgt.setCategory(convertCodeableConcept(src.getCategory())); - tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); - for (org.hl7.fhir.instance.model.Reference t : src.getImplicated()) - tgt.addImplicated(convertReference(t)); - tgt.setDetail(src.getDetail()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setAuthor(convertReference(src.getAuthor())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setReference(src.getReference()); - for (org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) - tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.r4.model.DetectedIssue src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DetectedIssue tgt = new org.hl7.fhir.instance.model.DetectedIssue(); - copyDomainResource(src, tgt); - tgt.setPatient(convertReference(src.getPatient())); - tgt.setCategory(convertCodeableConcept(src.getCategory())); - tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); - for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) - tgt.addImplicated(convertReference(t)); - tgt.setDetail(src.getDetail()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setAuthor(convertReference(src.getAuthor())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setReference(src.getReference()); - for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) - tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HIGH: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.HIGH; - case MODERATE: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.MODERATE; - case LOW: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.LOW; - default: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.NULL; - } - } - - public org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HIGH: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.HIGH; - case MODERATE: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.MODERATE; - case LOW: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.LOW; - default: return org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueSeverity.NULL; - } - } - - public org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent(); - copyElement(src, tgt); - tgt.setAction(convertCodeableConcept(src.getAction())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setAuthor(convertReference(src.getAuthor())); - return tgt; - } - - public org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.instance.model.DetectedIssue.DetectedIssueMitigationComponent(); - copyElement(src, tgt); - tgt.setAction(convertCodeableConcept(src.getAction())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setAuthor(convertReference(src.getAuthor())); - return tgt; - } - - public org.hl7.fhir.r4.model.Device convertDevice(org.hl7.fhir.instance.model.Device src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Device tgt = new org.hl7.fhir.r4.model.Device(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setUdi((new org.hl7.fhir.r4.model.Device.DeviceUdiComponent()).setDeviceIdentifier(src.getUdi())); - tgt.setStatus(convertDeviceStatus(src.getStatus())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setLotNumber(src.getLotNumber()); - tgt.setManufacturer(src.getManufacturer()); - tgt.setManufactureDate(src.getManufactureDate()); - tgt.setExpirationDate(src.getExpiry()); - tgt.setModel(src.getModel()); - tgt.setVersion(src.getVersion()); - tgt.setPatient(convertReference(src.getPatient())); - tgt.setOwner(convertReference(src.getOwner())); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - tgt.setLocation(convertReference(src.getLocation())); - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.instance.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Device convertDevice(org.hl7.fhir.r4.model.Device src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Device tgt = new org.hl7.fhir.instance.model.Device(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasUdi()) - tgt.setUdi(src.getUdi().getDeviceIdentifier()); - tgt.setStatus(convertDeviceStatus(src.getStatus())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setLotNumber(src.getLotNumber()); - tgt.setManufacturer(src.getManufacturer()); - tgt.setManufactureDate(src.getManufactureDate()); - tgt.setExpiry(src.getExpirationDate()); - tgt.setModel(src.getModel()); - tgt.setVersion(src.getVersion()); - tgt.setPatient(convertReference(src.getPatient())); - tgt.setOwner(convertReference(src.getOwner())); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - tgt.setLocation(convertReference(src.getLocation())); - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Device.FHIRDeviceStatus convertDeviceStatus(org.hl7.fhir.instance.model.Device.DeviceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AVAILABLE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ACTIVE; - case NOTAVAILABLE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Device.DeviceStatus convertDeviceStatus(org.hl7.fhir.r4.model.Device.FHIRDeviceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.instance.model.Device.DeviceStatus.AVAILABLE; - case INACTIVE: return org.hl7.fhir.instance.model.Device.DeviceStatus.NOTAVAILABLE; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Device.DeviceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.Device.DeviceStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.instance.model.DeviceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DeviceComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent(); - copyDomainResource(src, tgt); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setLastSystemChange(src.getLastSystemChange()); - tgt.setSource(convertReference(src.getSource())); - tgt.setParent(convertReference(src.getParent())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getOperationalStatus()) - tgt.addOperationalStatus(convertCodeableConcept(t)); - tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); - tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); - for (org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) - tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); - tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); - return tgt; - } - - public org.hl7.fhir.instance.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.r4.model.DeviceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DeviceComponent tgt = new org.hl7.fhir.instance.model.DeviceComponent(); - copyDomainResource(src, tgt); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setLastSystemChange(src.getLastSystemChange()); - tgt.setSource(convertReference(src.getSource())); - tgt.setParent(convertReference(src.getParent())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOperationalStatus()) - tgt.addOperationalStatus(convertCodeableConcept(t)); - tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); - tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); - for (org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) - tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); - tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); - return tgt; - } - - public org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OTHER: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OTHER; - case CHEMICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; - case ELECTRICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; - case IMPEDANCE: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; - case NUCLEAR: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; - case OPTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OPTICAL; - case THERMAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.THERMAL; - case BIOLOGICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; - case MECHANICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; - case ACOUSTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; - case MANUAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MANUAL; - default: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NULL; - } - } - - public org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OTHER: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.OTHER; - case CHEMICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; - case ELECTRICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; - case IMPEDANCE: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; - case NUCLEAR: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; - case OPTICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.OPTICAL; - case THERMAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.THERMAL; - case BIOLOGICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; - case MECHANICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; - case ACOUSTICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; - case MANUAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.MANUAL; - default: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); - copyElement(src, tgt); - tgt.setSpecType(convertCodeableConcept(src.getSpecType())); - tgt.setComponentId(convertIdentifier(src.getComponentId())); - tgt.setProductionSpec(src.getProductionSpec()); - return tgt; - } - - public org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.instance.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); - copyElement(src, tgt); - tgt.setSpecType(convertCodeableConcept(src.getSpecType())); - tgt.setComponentId(convertIdentifier(src.getComponentId())); - tgt.setProductionSpec(src.getProductionSpec()); - return tgt; - } - - public org.hl7.fhir.r4.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.instance.model.DeviceMetric src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DeviceMetric tgt = new org.hl7.fhir.r4.model.DeviceMetric(); - copyDomainResource(src, tgt); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setUnit(convertCodeableConcept(src.getUnit())); - tgt.setSource(convertReference(src.getSource())); - tgt.setParent(convertReference(src.getParent())); - tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); - tgt.setColor(convertDeviceMetricColor(src.getColor())); - tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); - tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); - for (org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) - tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.r4.model.DeviceMetric src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DeviceMetric tgt = new org.hl7.fhir.instance.model.DeviceMetric(); - copyDomainResource(src, tgt); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setUnit(convertCodeableConcept(src.getUnit())); - tgt.setSource(convertReference(src.getSource())); - tgt.setParent(convertReference(src.getParent())); - tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); - tgt.setColor(convertDeviceMetricColor(src.getColor())); - tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); - tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); - for (org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) - tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ON: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.ON; - case OFF: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; - case STANDBY: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ON: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.ON; - case OFF: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; - case STANDBY: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; - default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BLACK: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLACK; - case RED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.RED; - case GREEN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.GREEN; - case YELLOW: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.YELLOW; - case BLUE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLUE; - case MAGENTA: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.MAGENTA; - case CYAN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.CYAN; - case WHITE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.WHITE; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.NULL; - } - } - - public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BLACK: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.BLACK; - case RED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.RED; - case GREEN: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.GREEN; - case YELLOW: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.YELLOW; - case BLUE: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.BLUE; - case MAGENTA: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.MAGENTA; - case CYAN: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.CYAN; - case WHITE: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.WHITE; - default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricColor.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MEASUREMENT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; - case SETTING: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.SETTING; - case CALCULATION: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.CALCULATION; - case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.NULL; - } - } - - public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MEASUREMENT: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; - case SETTING: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.SETTING; - case CALCULATION: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.CALCULATION; - case UNSPECIFIED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; - default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCategory.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent(); - copyElement(src, tgt); - tgt.setType(convertDeviceMetricCalibrationType(src.getType())); - tgt.setState(convertDeviceMetricCalibrationState(src.getState())); - tgt.setTime(src.getTime()); - return tgt; - } - - public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationComponent(); - copyElement(src, tgt); - tgt.setType(convertDeviceMetricCalibrationType(src.getType())); - tgt.setState(convertDeviceMetricCalibrationState(src.getState())); - tgt.setTime(src.getTime()); - return tgt; - } - - public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; - case OFFSET: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; - case GAIN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; - case TWOPOINT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.NULL; - } - } - - public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case UNSPECIFIED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; - case OFFSET: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; - case GAIN: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; - case TWOPOINT: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; - default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationType.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTCALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; - case CALIBRATIONREQUIRED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; - case CALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; - case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NULL; - } - } - - public org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTCALIBRATED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; - case CALIBRATIONREQUIRED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; - case CALIBRATED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; - case UNSPECIFIED: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; - default: return org.hl7.fhir.instance.model.DeviceMetric.DeviceMetricCalibrationState.NULL; - } - } - - public org.hl7.fhir.r4.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.instance.model.DeviceUseStatement src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DeviceUseStatement tgt = new org.hl7.fhir.r4.model.DeviceUseStatement(); - copyDomainResource(src, tgt); - if (src.hasBodySiteCodeableConcept()) - tgt.setBodySite(convertCodeableConcept(src.getBodySiteCodeableConcept())); - tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); - tgt.setDevice(convertReference(src.getDevice())); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getIndication()) - tgt.addIndication(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.StringType t : src.getNotes()) - tgt.addNote().setText(t.getValue()); - tgt.setRecordedOn(src.getRecordedOn()); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setTiming(convertType(src.getTiming())); - return tgt; - } - - public org.hl7.fhir.instance.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.r4.model.DeviceUseStatement src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DeviceUseStatement tgt = new org.hl7.fhir.instance.model.DeviceUseStatement(); - copyDomainResource(src, tgt); - tgt.setBodySite(convertType(src.getBodySite())); - tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); - tgt.setDevice(convertReference(src.getDevice())); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getIndication()) - tgt.addIndication(convertCodeableConcept(t)); - for (Annotation t : src.getNote()) - tgt.addNotes(t.getText()); - tgt.setRecordedOn(src.getRecordedOn()); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setTiming(convertType(src.getTiming())); - return tgt; - } - -// public org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus convertDiagnosticOrderStatus(org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus src) throws FHIRException { -// if (src ==/* null || src.isEmpty()*/) -// return null; -// switch (src) { -// case PROPOSED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.PROPOSED; -// case DRAFT: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.DRAFT; -// case PLANNED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.PLANNED; -// case REQUESTED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.REQUESTED; -// case RECEIVED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.RECEIVED; -// case ACCEPTED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.ACCEPTED; -// case INPROGRESS: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.INPROGRESS; -// case REVIEW: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.REVIEW; -// case COMPLETED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.COMPLETED; -// case CANCELLED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.CANCELLED; -// case SUSPENDED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.SUSPENDED; -// case REJECTED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.REJECTED; -// case FAILED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.FAILED; -// default: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.NULL; -// } -// } -// -// public org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus convertDiagnosticOrderStatus(org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus src) throws FHIRException { -// if (src ==/* null || src.isEmpty()*/) -// return null; -// switch (src) { -// case PROPOSED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.PROPOSED; -// case DRAFT: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.DRAFT; -// case PLANNED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.PLANNED; -// case REQUESTED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.REQUESTED; -// case RECEIVED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.RECEIVED; -// case ACCEPTED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.ACCEPTED; -// case INPROGRESS: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.INPROGRESS; -// case REVIEW: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.REVIEW; -// case COMPLETED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.COMPLETED; -// case CANCELLED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.CANCELLED; -// case SUSPENDED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.SUSPENDED; -// case REJECTED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.REJECTED; -// case FAILED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.FAILED; -// default: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.NULL; -// } -// } - - - public org.hl7.fhir.r4.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.instance.model.DiagnosticReport src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DiagnosticReport tgt = new org.hl7.fhir.r4.model.DiagnosticReport(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); - tgt.setCategory(convertCodeableConcept(src.getCategory())); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setContext(convertReference(src.getEncounter())); - tgt.setEffective(convertType(src.getEffective())); - tgt.setIssued(src.getIssued()); -// tgt.setPerformer(convertReference(src.getPerformer())); -// for (org.hl7.fhir.instance.model.Reference t : src.getRequest()) -// tgt.addRequest(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getSpecimen()) - tgt.addSpecimen(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getResult()) - tgt.addResult(convertReference(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getImagingStudy()) - tgt.addImagingStudy(convertReference(t)); - for (org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) - tgt.addImage(convertDiagnosticReportImageComponent(t)); - tgt.setConclusion(src.getConclusion()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCodedDiagnosis()) - tgt.addCodedDiagnosis(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.Attachment t : src.getPresentedForm()) - tgt.addPresentedForm(convertAttachment(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DiagnosticReport tgt = new org.hl7.fhir.instance.model.DiagnosticReport(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); - tgt.setCategory(convertCodeableConcept(src.getCategory())); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setEncounter(convertReference(src.getContext())); - tgt.setEffective(convertType(src.getEffective())); - tgt.setIssued(src.getIssued()); -// tgt.setPerformer(convertReference(src.getPerformer())); -// for (org.hl7.fhir.r4.model.Reference t : src.getRequest()) -// tgt.addRequest(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) - tgt.addSpecimen(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getResult()) - tgt.addResult(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getImagingStudy()) - tgt.addImagingStudy(convertReference(t)); - for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) - tgt.addImage(convertDiagnosticReportImageComponent(t)); - tgt.setConclusion(src.getConclusion()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCodedDiagnosis()) - tgt.addCodedDiagnosis(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm()) - tgt.addPresentedForm(convertAttachment(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; - case PARTIAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; - case FINAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.FINAL; - case CORRECTED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; - case APPENDED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; - case PARTIAL: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; - case FINAL: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.FINAL; - case CORRECTED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; - case APPENDED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; - case CANCELLED: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent(); - copyElement(src, tgt); - tgt.setComment(src.getComment()); - tgt.setLink(convertReference(src.getLink())); - return tgt; - } - - public org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.instance.model.DiagnosticReport.DiagnosticReportImageComponent(); - copyElement(src, tgt); - tgt.setComment(src.getComment()); - tgt.setLink(convertReference(src.getLink())); - return tgt; - } - - public org.hl7.fhir.r4.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.instance.model.DocumentManifest src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentManifest tgt = new org.hl7.fhir.r4.model.DocumentManifest(); - copyDomainResource(src, tgt); - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.instance.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.instance.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - tgt.setCreated(src.getCreated()); - tgt.setSource(src.getSource()); - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) - tgt.addContent(convertDocumentManifestContentComponent(t)); - for (org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentManifest tgt = new org.hl7.fhir.instance.model.DocumentManifest(); - copyDomainResource(src, tgt); - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - tgt.setCreated(src.getCreated()); - tgt.setSource(src.getSource()); - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) - tgt.addContent(convertDocumentManifestContentComponent(t)); - for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.CURRENT; - case SUPERSEDED: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.CURRENT; - case SUPERSEDED: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent(); - copyElement(src, tgt); - tgt.setP(convertType(src.getP())); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestContentComponent tgt = new org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestContentComponent(); - copyElement(src, tgt); - tgt.setP(convertType(src.getP())); - return tgt; - } - - public org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.instance.model.DocumentManifest.DocumentManifestRelatedComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public org.hl7.fhir.r4.model.DocumentReference convertDocumentReference(org.hl7.fhir.instance.model.DocumentReference src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentReference tgt = new org.hl7.fhir.r4.model.DocumentReference(); - copyDomainResource(src, tgt); - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setClass_(convertCodeableConcept(src.getClass_())); - for (org.hl7.fhir.instance.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - tgt.setCustodian(convertReference(src.getCustodian())); - tgt.setAuthenticator(convertReference(src.getAuthenticator())); - tgt.setCreated(src.getCreated()); - tgt.setIndexed(src.getIndexed()); - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - tgt.setDocStatus(convertDocStatus(src.getDocStatus())); - for (org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) - tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getSecurityLabel()) - tgt.addSecurityLabel(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) - tgt.addContent(convertDocumentReferenceContentComponent(t)); - tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); - return tgt; - } - - private ReferredDocumentStatus convertDocStatus(CodeableConcept cc) { - if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "preliminary")) - return ReferredDocumentStatus.PRELIMINARY; - if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "final")) - return ReferredDocumentStatus.FINAL; - if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "amended")) - return ReferredDocumentStatus.AMENDED; - if (hasConcept(cc, "http://hl7.org/fhir/composition-status", "entered-in-error")) - return ReferredDocumentStatus.ENTEREDINERROR; - - return null; - } - - private CodeableConcept convertDocStatus(ReferredDocumentStatus docStatus) { - CodeableConcept cc = new CodeableConcept (); - switch (docStatus) { - case AMENDED: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("amended"); break; - case ENTEREDINERROR: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("entered-in-error"); break; - case FINAL: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("final"); break; - case PRELIMINARY: cc.addCoding(). setSystem("http://hl7.org/fhir/composition-status").setCode("preliminary"); break; - default: return null; - } - return cc; - } - - public org.hl7.fhir.instance.model.DocumentReference convertDocumentReference(org.hl7.fhir.r4.model.DocumentReference src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentReference tgt = new org.hl7.fhir.instance.model.DocumentReference(); - copyDomainResource(src, tgt); - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setClass_(convertCodeableConcept(src.getClass_())); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - tgt.setCustodian(convertReference(src.getCustodian())); - tgt.setAuthenticator(convertReference(src.getAuthenticator())); - tgt.setCreated(src.getCreated()); - tgt.setIndexed(src.getIndexed()); - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - tgt.setDocStatus(convertDocStatus(src.getDocStatus())); - for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) - tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) - tgt.addSecurityLabel(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) - tgt.addContent(convertDocumentReferenceContentComponent(t)); - tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); - return tgt; - } - - - public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent(); - copyElement(src, tgt); - tgt.setCode(convertDocumentRelationshipType(src.getCode())); - tgt.setTarget(convertReference(src.getTarget())); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceRelatesToComponent(); - copyElement(src, tgt); - tgt.setCode(convertDocumentRelationshipType(src.getCode())); - tgt.setTarget(convertReference(src.getTarget())); - return tgt; - } - - public org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REPLACES: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.REPLACES; - case TRANSFORMS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; - case SIGNS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.SIGNS; - case APPENDS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.APPENDS; - default: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.NULL; - } - } - - public org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REPLACES: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.REPLACES; - case TRANSFORMS: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; - case SIGNS: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.SIGNS; - case APPENDS: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.APPENDS; - default: return org.hl7.fhir.instance.model.DocumentReference.DocumentRelationshipType.NULL; - } - } - - public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent(); - copyElement(src, tgt); - tgt.setAttachment(convertAttachment(src.getAttachment())); - for (org.hl7.fhir.instance.model.Coding t : src.getFormat()) - tgt.setFormat(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContentComponent(); - copyElement(src, tgt); - tgt.setAttachment(convertAttachment(src.getAttachment())); - tgt.addFormat(convertCoding(src.getFormat())); - return tgt; - } - - public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent(); - copyElement(src, tgt); - tgt.setEncounter(convertReference(src.getEncounter())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getEvent()) - tgt.addEvent(convertCodeableConcept(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); - tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); - tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); - tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); - for (org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextComponent(); - copyElement(src, tgt); - tgt.setEncounter(convertReference(src.getEncounter())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getEvent()) - tgt.addEvent(convertCodeableConcept(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); - tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); - tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); - tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); - for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public org.hl7.fhir.r4.model.Encounter convertEncounter(org.hl7.fhir.instance.model.Encounter src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6258,34 +4676,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Encounter.EncounterStatus convertEncounterState(org.hl7.fhir.instance.model.Encounter.EncounterState src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.PLANNED; - case ARRIVED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ARRIVED; - case INPROGRESS: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.INPROGRESS; - case ONLEAVE: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ONLEAVE; - case FINISHED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED; - case CANCELLED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.CANCELLED; - default: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Encounter.EncounterState convertEncounterState(org.hl7.fhir.r4.model.Encounter.EncounterStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.instance.model.Encounter.EncounterState.PLANNED; - case ARRIVED: return org.hl7.fhir.instance.model.Encounter.EncounterState.ARRIVED; - case INPROGRESS: return org.hl7.fhir.instance.model.Encounter.EncounterState.INPROGRESS; - case ONLEAVE: return org.hl7.fhir.instance.model.Encounter.EncounterState.ONLEAVE; - case FINISHED: return org.hl7.fhir.instance.model.Encounter.EncounterState.FINISHED; - case CANCELLED: return org.hl7.fhir.instance.model.Encounter.EncounterState.CANCELLED; - default: return org.hl7.fhir.instance.model.Encounter.EncounterState.NULL; - } - } - public org.hl7.fhir.r4.model.Coding convertEncounterClass(org.hl7.fhir.instance.model.Encounter.EncounterClass src) throws FHIRException { if (src == null) return null; @@ -6317,50 +4707,6 @@ public class VersionConvertor_10_40 { return org.hl7.fhir.instance.model.Encounter.EncounterClass.NULL; } -// public org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent convertEncounterStatusHistoryComponent(org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent(); -// copyElement(src, tgt); -// tgt.setStatus(convertEncounterState(src.getStatus())); -// tgt.setPeriod(convertPeriod(src.getPeriod())); -// return tgt; -// } - -// public org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent convertEncounterStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent tgt = new org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent(); -// copyElement(src, tgt); -// tgt.setStatus(convertEncounterState(src.getStatus())); -// tgt.setPeriod(convertPeriod(src.getPeriod())); -// return tgt; -// } - - public org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); - tgt.setIndividual(convertReference(src.getIndividual())); - return tgt; - } - - public org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); - tgt.setIndividual(convertReference(src.getIndividual())); - return tgt; - } - public org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.instance.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6447,6 +4793,58 @@ public class VersionConvertor_10_40 { } } + public org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + tgt.setPeriod(convertPeriod(src.getPeriod())); + tgt.setIndividual(convertReference(src.getIndividual())); + return tgt; + } + + public org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.instance.model.Encounter.EncounterParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + tgt.setPeriod(convertPeriod(src.getPeriod())); + tgt.setIndividual(convertReference(src.getIndividual())); + return tgt; + } + + public org.hl7.fhir.r4.model.Encounter.EncounterStatus convertEncounterState(org.hl7.fhir.instance.model.Encounter.EncounterState src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.PLANNED; + case ARRIVED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ARRIVED; + case INPROGRESS: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.INPROGRESS; + case ONLEAVE: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ONLEAVE; + case FINISHED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED; + case CANCELLED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.CANCELLED; + default: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Encounter.EncounterState convertEncounterState(org.hl7.fhir.r4.model.Encounter.EncounterStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.instance.model.Encounter.EncounterState.PLANNED; + case ARRIVED: return org.hl7.fhir.instance.model.Encounter.EncounterState.ARRIVED; + case INPROGRESS: return org.hl7.fhir.instance.model.Encounter.EncounterState.INPROGRESS; + case ONLEAVE: return org.hl7.fhir.instance.model.Encounter.EncounterState.ONLEAVE; + case FINISHED: return org.hl7.fhir.instance.model.Encounter.EncounterState.FINISHED; + case CANCELLED: return org.hl7.fhir.instance.model.Encounter.EncounterState.CANCELLED; + default: return org.hl7.fhir.instance.model.Encounter.EncounterState.NULL; + } + } + public org.hl7.fhir.r4.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.instance.model.EnrollmentRequest src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6605,6 +5003,115 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.instance.model.Timing.EventTiming src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HS: return org.hl7.fhir.r4.model.Timing.EventTiming.HS; + case WAKE: return org.hl7.fhir.r4.model.Timing.EventTiming.WAKE; + case C: return org.hl7.fhir.r4.model.Timing.EventTiming.C; + case CM: return org.hl7.fhir.r4.model.Timing.EventTiming.CM; + case CD: return org.hl7.fhir.r4.model.Timing.EventTiming.CD; + case CV: return org.hl7.fhir.r4.model.Timing.EventTiming.CV; + case AC: return org.hl7.fhir.r4.model.Timing.EventTiming.AC; + case ACM: return org.hl7.fhir.r4.model.Timing.EventTiming.ACM; + case ACD: return org.hl7.fhir.r4.model.Timing.EventTiming.ACD; + case ACV: return org.hl7.fhir.r4.model.Timing.EventTiming.ACV; + case PC: return org.hl7.fhir.r4.model.Timing.EventTiming.PC; + case PCM: return org.hl7.fhir.r4.model.Timing.EventTiming.PCM; + case PCD: return org.hl7.fhir.r4.model.Timing.EventTiming.PCD; + case PCV: return org.hl7.fhir.r4.model.Timing.EventTiming.PCV; + default: return org.hl7.fhir.r4.model.Timing.EventTiming.NULL; + } + } + + public org.hl7.fhir.instance.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.r4.model.Timing.EventTiming src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HS: return org.hl7.fhir.instance.model.Timing.EventTiming.HS; + case WAKE: return org.hl7.fhir.instance.model.Timing.EventTiming.WAKE; + case C: return org.hl7.fhir.instance.model.Timing.EventTiming.C; + case CM: return org.hl7.fhir.instance.model.Timing.EventTiming.CM; + case CD: return org.hl7.fhir.instance.model.Timing.EventTiming.CD; + case CV: return org.hl7.fhir.instance.model.Timing.EventTiming.CV; + case AC: return org.hl7.fhir.instance.model.Timing.EventTiming.AC; + case ACM: return org.hl7.fhir.instance.model.Timing.EventTiming.ACM; + case ACD: return org.hl7.fhir.instance.model.Timing.EventTiming.ACD; + case ACV: return org.hl7.fhir.instance.model.Timing.EventTiming.ACV; + case PC: return org.hl7.fhir.instance.model.Timing.EventTiming.PC; + case PCM: return org.hl7.fhir.instance.model.Timing.EventTiming.PCM; + case PCD: return org.hl7.fhir.instance.model.Timing.EventTiming.PCD; + case PCV: return org.hl7.fhir.instance.model.Timing.EventTiming.PCV; + default: return org.hl7.fhir.instance.model.Timing.EventTiming.NULL; + } + } + + public org.hl7.fhir.r4.model.Extension convertExtension(org.hl7.fhir.instance.model.Extension src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Extension tgt = new org.hl7.fhir.r4.model.Extension(); + copyElement(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public org.hl7.fhir.instance.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Extension tgt = new org.hl7.fhir.instance.model.Extension(); + copyElement(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESOURCE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.RESOURCE; + case DATATYPE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.DATATYPE; + case EXTENSION: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.EXTENSION; + default: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.NULL; + } + } + + public org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESOURCE: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.RESOURCE; + case DATATYPE: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.DATATYPE; + case EXTENSION: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.EXTENSION; + default: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.NULL; + } + } + + public org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PARTIAL: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; + case COMPLETED: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; + case HEALTHUNKNOWN: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; + default: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PARTIAL: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; + case COMPLETED: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; + case HEALTHUNKNOWN: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; + default: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; + } + } public org.hl7.fhir.r4.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.instance.model.FamilyMemberHistory src) throws FHIRException { if (src == null || src.isEmpty()) @@ -6652,30 +5159,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PARTIAL: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; - case COMPLETED: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; - case HEALTHUNKNOWN: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; - default: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PARTIAL: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; - case COMPLETED: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; - case HEALTHUNKNOWN: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; - default: return org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; - } - } - public org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent convertFamilyMemberHistoryConditionComponent(org.hl7.fhir.instance.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6700,6 +5183,34 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.instance.model.ValueSet.FilterOperator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUAL: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.EQUAL; + case ISA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISA; + case ISNOTA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISNOTA; + case REGEX: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.REGEX; + case IN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.IN; + case NOTIN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NOTIN; + default: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NULL; + } + } + + public org.hl7.fhir.instance.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.r4.model.ValueSet.FilterOperator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUAL: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.EQUAL; + case ISA: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.ISA; + case ISNOTA: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.ISNOTA; + case REGEX: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.REGEX; + case IN: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.IN; + case NOTIN: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.NOTIN; + default: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.NULL; + } + } + public org.hl7.fhir.r4.model.Flag convertFlag(org.hl7.fhir.instance.model.Flag src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6707,7 +5218,7 @@ public class VersionConvertor_10_40 { copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); - tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.addCategory(convertCodeableConcept(src.getCategory())); tgt.setStatus(convertFlagStatus(src.getStatus())); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setSubject(convertReference(src.getSubject())); @@ -6724,7 +5235,7 @@ public class VersionConvertor_10_40 { copyDomainResource(src, tgt); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); - tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep())); tgt.setStatus(convertFlagStatus(src.getStatus())); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setSubject(convertReference(src.getSubject())); @@ -6756,6 +5267,24 @@ public class VersionConvertor_10_40 { } } + public org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.instance.model.Contract.FriendlyLanguageComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + public org.hl7.fhir.r4.model.Group convertGroup(org.hl7.fhir.instance.model.Group src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6794,34 +5323,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Group.GroupType convertGroupType(org.hl7.fhir.instance.model.Group.GroupType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSON: return org.hl7.fhir.r4.model.Group.GroupType.PERSON; - case ANIMAL: return org.hl7.fhir.r4.model.Group.GroupType.ANIMAL; - case PRACTITIONER: return org.hl7.fhir.r4.model.Group.GroupType.PRACTITIONER; - case DEVICE: return org.hl7.fhir.r4.model.Group.GroupType.DEVICE; - case MEDICATION: return org.hl7.fhir.r4.model.Group.GroupType.MEDICATION; - case SUBSTANCE: return org.hl7.fhir.r4.model.Group.GroupType.SUBSTANCE; - default: return org.hl7.fhir.r4.model.Group.GroupType.NULL; - } - } - - public org.hl7.fhir.instance.model.Group.GroupType convertGroupType(org.hl7.fhir.r4.model.Group.GroupType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSON: return org.hl7.fhir.instance.model.Group.GroupType.PERSON; - case ANIMAL: return org.hl7.fhir.instance.model.Group.GroupType.ANIMAL; - case PRACTITIONER: return org.hl7.fhir.instance.model.Group.GroupType.PRACTITIONER; - case DEVICE: return org.hl7.fhir.instance.model.Group.GroupType.DEVICE; - case MEDICATION: return org.hl7.fhir.instance.model.Group.GroupType.MEDICATION; - case SUBSTANCE: return org.hl7.fhir.instance.model.Group.GroupType.SUBSTANCE; - default: return org.hl7.fhir.instance.model.Group.GroupType.NULL; - } - } - public org.hl7.fhir.r4.model.Group.GroupCharacteristicComponent convertGroupCharacteristicComponent(org.hl7.fhir.instance.model.Group.GroupCharacteristicComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6868,6 +5369,182 @@ public class VersionConvertor_10_40 { return tgt; } +// public org.hl7.fhir.instance.model.DataElement convertDataElement(org.hl7.fhir.r4.model.DataElement src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.DataElement tgt = new org.hl7.fhir.instance.model.DataElement(); +// copyDomainResource(src, tgt); +// tgt.setUrl(src.getUrl()); +// for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) +// tgt.addIdentifier(convertIdentifier(t)); +// tgt.setVersion(src.getVersion()); +// tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); +// if (src.hasExperimental()) +// tgt.setExperimental(src.getExperimental()); +// tgt.setPublisher(src.getPublisher()); +// if (src.hasDate()) +// tgt.setDate(src.getDate()); +// tgt.setName(src.getName()); +// for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) +// tgt.addContact(convertDataElementContactComponent(t)); +// for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) +// if (t.hasValueCodeableConcept()) +// tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); +// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) +// tgt.addUseContext(convertCodeableConcept(t)); +// tgt.setCopyright(src.getCopyright()); +// tgt.setStringency(convertDataElementStringency(src.getStringency())); +// for (org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent t : src.getMapping()) +// tgt.addMapping(convertDataElementMappingComponent(t)); +// for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) +// tgt.addElement(convertElementDefinition(t)); +// return tgt; +// } + +// public org.hl7.fhir.r4.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.instance.model.DataElement.DataElementStringency src) throws FHIRException { +// if (src == null) +// return null; +// switch (src) { +// case COMPARABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.COMPARABLE; +// case FULLYSPECIFIED: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FULLYSPECIFIED; +// case EQUIVALENT: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.EQUIVALENT; +// case CONVERTABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.CONVERTABLE; +// case SCALEABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.SCALEABLE; +// case FLEXIBLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FLEXIBLE; +// default: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.NULL; +// } +// } +// +// public org.hl7.fhir.instance.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.r4.model.DataElement.DataElementStringency src) throws FHIRException { +// if (src == null) +// return null; +// switch (src) { +// case COMPARABLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.COMPARABLE; +// case FULLYSPECIFIED: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.FULLYSPECIFIED; +// case EQUIVALENT: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.EQUIVALENT; +// case CONVERTABLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.CONVERTABLE; +// case SCALEABLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.SCALEABLE; +// case FLEXIBLE: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.FLEXIBLE; +// default: return org.hl7.fhir.instance.model.DataElement.DataElementStringency.NULL; +// } +// } + + public org.hl7.fhir.r4.model.Group.GroupType convertGroupType(org.hl7.fhir.instance.model.Group.GroupType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PERSON: return org.hl7.fhir.r4.model.Group.GroupType.PERSON; + case ANIMAL: return org.hl7.fhir.r4.model.Group.GroupType.ANIMAL; + case PRACTITIONER: return org.hl7.fhir.r4.model.Group.GroupType.PRACTITIONER; + case DEVICE: return org.hl7.fhir.r4.model.Group.GroupType.DEVICE; + case MEDICATION: return org.hl7.fhir.r4.model.Group.GroupType.MEDICATION; + case SUBSTANCE: return org.hl7.fhir.r4.model.Group.GroupType.SUBSTANCE; + default: return org.hl7.fhir.r4.model.Group.GroupType.NULL; + } + } + + public org.hl7.fhir.instance.model.Group.GroupType convertGroupType(org.hl7.fhir.r4.model.Group.GroupType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PERSON: return org.hl7.fhir.instance.model.Group.GroupType.PERSON; + case ANIMAL: return org.hl7.fhir.instance.model.Group.GroupType.ANIMAL; + case PRACTITIONER: return org.hl7.fhir.instance.model.Group.GroupType.PRACTITIONER; + case DEVICE: return org.hl7.fhir.instance.model.Group.GroupType.DEVICE; + case MEDICATION: return org.hl7.fhir.instance.model.Group.GroupType.MEDICATION; + case SUBSTANCE: return org.hl7.fhir.instance.model.Group.GroupType.SUBSTANCE; + default: return org.hl7.fhir.instance.model.Group.GroupType.NULL; + } + } + + public org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REFERENCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.REFERENCE; + case INCLUSION: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.INCLUSION; + default: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.NULL; + } + } + +// public org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.instance.model.DataElement.DataElementMappingComponent(); +// copyElement(src, tgt); +// tgt.setIdentity(src.getIdentity()); +// tgt.setUri(src.getUri()); +// tgt.setName(src.getName()); +// tgt.setComments(src.getComment()); +// return tgt; +// } + + public org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REFERENCE: return org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType.REFERENCE; + case INCLUSION: return org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType.INCLUSION; + default: return org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType.NULL; + } + } + + public org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PAGE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.PAGE; + case EXAMPLE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.EXAMPLE; + case LIST: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.LIST; + case INCLUDE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.INCLUDE; + case DIRECTORY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DIRECTORY; + case DICTIONARY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DICTIONARY; + case TOC: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.TOC; + case RESOURCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.RESOURCE; + default: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.NULL; + } + } + + public org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PAGE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.PAGE; + case EXAMPLE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.EXAMPLE; + case LIST: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.LIST; + case INCLUDE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.INCLUDE; + case DIRECTORY: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.DIRECTORY; + case DICTIONARY: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.DICTIONARY; + case TOC: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.TOC; + case RESOURCE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.RESOURCE; + default: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.NULL; + } + } + + public org.hl7.fhir.r4.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.instance.model.Bundle.HTTPVerb src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case GET: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.GET; + case POST: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST; + case PUT: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT; + case DELETE: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.DELETE; + default: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.NULL; + } + } + + public org.hl7.fhir.instance.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.r4.model.Bundle.HTTPVerb src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case GET: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.GET; + case POST: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.POST; + case PUT: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.PUT; + case DELETE: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.DELETE; + default: return org.hl7.fhir.instance.model.Bundle.HTTPVerb.NULL; + } + } + public org.hl7.fhir.r4.model.HealthcareService convertHealthcareService(org.hl7.fhir.instance.model.HealthcareService src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -6984,36 +5661,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.MON; - case TUE: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.TUE; - case WED: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.WED; - case THU: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.THU; - case FRI: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.FRI; - case SAT: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SAT; - case SUN: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SUN; - default: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.NULL; - } - } - - public org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.MON; - case TUE: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.TUE; - case WED: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.WED; - case THU: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.THU; - case FRI: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.FRI; - case SAT: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.SAT; - case SUN: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.SUN; - default: return org.hl7.fhir.instance.model.HealthcareService.DaysOfWeek.NULL; - } - } - public org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.instance.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7034,6 +5681,138 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.HumanName convertHumanName(org.hl7.fhir.instance.model.HumanName src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.HumanName tgt = new org.hl7.fhir.r4.model.HumanName(); + copyElement(src, tgt); + tgt.setUse(convertNameUse(src.getUse())); + tgt.setText(src.getText()); + for (org.hl7.fhir.instance.model.StringType t : src.getFamily()) + tgt.setFamily(t.getValue()); + for (org.hl7.fhir.instance.model.StringType t : src.getGiven()) + tgt.addGiven(t.getValue()); + for (org.hl7.fhir.instance.model.StringType t : src.getPrefix()) + tgt.addPrefix(t.getValue()); + for (org.hl7.fhir.instance.model.StringType t : src.getSuffix()) + tgt.addSuffix(t.getValue()); + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public org.hl7.fhir.instance.model.HumanName convertHumanName(org.hl7.fhir.r4.model.HumanName src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.HumanName tgt = new org.hl7.fhir.instance.model.HumanName(); + copyElement(src, tgt); + tgt.setUse(convertNameUse(src.getUse())); + tgt.setText(src.getText()); + if (src.hasFamily()) + tgt.addFamily(src.getFamily()); + for (org.hl7.fhir.r4.model.StringType t : src.getGiven()) + tgt.addGiven(t.getValue()); + for (org.hl7.fhir.r4.model.StringType t : src.getPrefix()) + tgt.addPrefix(t.getValue()); + for (org.hl7.fhir.r4.model.StringType t : src.getSuffix()) + tgt.addSuffix(t.getValue()); + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.instance.model.IdType src) throws FHIRException { + org.hl7.fhir.r4.model.IdType tgt = new org.hl7.fhir.r4.model.IdType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.IdType convertId(org.hl7.fhir.r4.model.IdType src) throws FHIRException { + org.hl7.fhir.instance.model.IdType tgt = new org.hl7.fhir.instance.model.IdType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.Identifier convertIdentifier(org.hl7.fhir.instance.model.Identifier src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Identifier tgt = new org.hl7.fhir.r4.model.Identifier(); + copyElement(src, tgt); + tgt.setUse(convertIdentifierUse(src.getUse())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setSystem(src.getSystem()); + tgt.setValue(src.getValue()); + tgt.setPeriod(convertPeriod(src.getPeriod())); + tgt.setAssigner(convertReference(src.getAssigner())); + return tgt; + } + + public org.hl7.fhir.instance.model.Identifier convertIdentifier(org.hl7.fhir.r4.model.Identifier src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Identifier tgt = new org.hl7.fhir.instance.model.Identifier(); + copyElement(src, tgt); + if (src.hasUse()) + tgt.setUse(convertIdentifierUse(src.getUse())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasAssigner()) + tgt.setAssigner(convertReference(src.getAssigner())); + return tgt; + } + + public org.hl7.fhir.r4.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.instance.model.Identifier.IdentifierUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case USUAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.USUAL; + case OFFICIAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.OFFICIAL; + case TEMP: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.TEMP; + case SECONDARY: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.SECONDARY; + default: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.NULL; + } + } + + public org.hl7.fhir.instance.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.r4.model.Identifier.IdentifierUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case USUAL: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.USUAL; + case OFFICIAL: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.OFFICIAL; + case TEMP: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.TEMP; + case SECONDARY: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.SECONDARY; + default: return org.hl7.fhir.instance.model.Identifier.IdentifierUse.NULL; + } + } + + public org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LEVEL1: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL1; + case LEVEL2: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL2; + case LEVEL3: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL3; + case LEVEL4: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL4; + default: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.NULL; + } + } + + public org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LEVEL1: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL1; + case LEVEL2: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL2; + case LEVEL3: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL3; + case LEVEL4: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL4; + default: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.NULL; + } + } + // public org.hl7.fhir.r4.model.ImagingObjectSelection convertImagingObjectSelection(org.hl7.fhir.instance.model.ImagingObjectSelection src) throws FHIRException { // if (src == null || src.isEmpty()) // return null; @@ -7217,30 +5996,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ONLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.ONLINE; - case OFFLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.OFFLINE; - case NEARLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NEARLINE; - case UNAVAILABLE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; - default: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NULL; - } - } - - public org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ONLINE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.ONLINE; - case OFFLINE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.OFFLINE; - case NEARLINE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.NEARLINE; - case UNAVAILABLE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; - default: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.NULL; - } - } - public org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesComponent convertImagingStudySeriesComponent(org.hl7.fhir.instance.model.ImagingStudy.ImagingStudySeriesComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7377,38 +6132,6 @@ public class VersionConvertor_10_40 { return tgt; } - private org.hl7.fhir.r4.model.Reference getPerformer(List practitioner) { - for (ImmunizationPractitionerComponent p : practitioner) { - if (hasConcept(p.getRole(), "http://hl7.org/fhir/v2/0443", "AP")) - return p.getActor(); - } - return null; - } - - private org.hl7.fhir.r4.model.Reference getRequester(List practitioner) { - for (ImmunizationPractitionerComponent p : practitioner) { - if (hasConcept(p.getRole(), "http://hl7.org/fhir/v2/0443", "OP")) - return p.getActor(); - } - return null; - } - - private boolean hasConcept(org.hl7.fhir.r4.model.CodeableConcept cc, String system, String code) { - for (org.hl7.fhir.r4.model.Coding c : cc.getCoding()) { - if (system.equals(c.getSystem()) && code.equals(c.getCode())) - return true; - } - return false; - } - - private boolean hasConcept(org.hl7.fhir.instance.model.CodeableConcept cc, String system, String code) { - for (org.hl7.fhir.instance.model.Coding c : cc.getCoding()) { - if (system.equals(c.getSystem()) && code.equals(c.getCode())) - return true; - } - return false; - } - public org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.instance.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7445,6 +6168,48 @@ public class VersionConvertor_10_40 { return tgt; } +// public org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus convertDiagnosticOrderStatus(org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus src) throws FHIRException { +// if (src ==/* null || src.isEmpty()*/) +// return null; +// switch (src) { +// case PROPOSED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.PROPOSED; +// case DRAFT: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.DRAFT; +// case PLANNED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.PLANNED; +// case REQUESTED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.REQUESTED; +// case RECEIVED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.RECEIVED; +// case ACCEPTED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.ACCEPTED; +// case INPROGRESS: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.INPROGRESS; +// case REVIEW: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.REVIEW; +// case COMPLETED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.COMPLETED; +// case CANCELLED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.CANCELLED; +// case SUSPENDED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.SUSPENDED; +// case REJECTED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.REJECTED; +// case FAILED: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.FAILED; +// default: return org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus.NULL; +// } +// } +// +// public org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus convertDiagnosticOrderStatus(org.hl7.fhir.r4.model.DiagnosticRequest.DiagnosticRequestStatus src) throws FHIRException { +// if (src ==/* null || src.isEmpty()*/) +// return null; +// switch (src) { +// case PROPOSED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.PROPOSED; +// case DRAFT: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.DRAFT; +// case PLANNED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.PLANNED; +// case REQUESTED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.REQUESTED; +// case RECEIVED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.RECEIVED; +// case ACCEPTED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.ACCEPTED; +// case INPROGRESS: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.INPROGRESS; +// case REVIEW: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.REVIEW; +// case COMPLETED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.COMPLETED; +// case CANCELLED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.CANCELLED; +// case SUSPENDED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.SUSPENDED; +// case REJECTED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.REJECTED; +// case FAILED: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.FAILED; +// default: return org.hl7.fhir.instance.model.DiagnosticOrder.DiagnosticOrderStatus.NULL; +// } +// } + public org.hl7.fhir.instance.model.Immunization.ImmunizationReactionComponent convertImmunizationReactionComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationReactionComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7457,40 +6222,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent(); - copyElement(src, tgt); - tgt.setDoseSequence(src.getDoseSequence()); - tgt.setDescription(src.getDescription()); - tgt.setAuthority(convertReference(src.getAuthority())); - tgt.setSeries(src.getSeries()); - tgt.setSeriesDoses(src.getSeriesDoses()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getTargetDisease()) - tgt.addTargetDisease(convertCodeableConcept(t)); - tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); - tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); - return tgt; - } - - public org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent(); - copyElement(src, tgt); - tgt.setDoseSequence(src.getDoseSequence()); - tgt.setDescription(src.getDescription()); - tgt.setAuthority(convertReference(src.getAuthority())); - tgt.setSeries(src.getSeries()); - tgt.setSeriesDoses(src.getSeriesDoses()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTargetDisease()) - tgt.addTargetDisease(convertCodeableConcept(t)); - tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); - tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); - return tgt; - } - public org.hl7.fhir.r4.model.ImmunizationRecommendation convertImmunizationRecommendation(org.hl7.fhir.instance.model.ImmunizationRecommendation src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7601,6 +6332,40 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent(); + copyElement(src, tgt); + tgt.setDoseSequence(src.getDoseSequence()); + tgt.setDescription(src.getDescription()); + tgt.setAuthority(convertReference(src.getAuthority())); + tgt.setSeries(src.getSeries()); + tgt.setSeriesDoses(src.getSeriesDoses()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getTargetDisease()) + tgt.addTargetDisease(convertCodeableConcept(t)); + tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); + tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); + return tgt; + } + + public org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.instance.model.Immunization.ImmunizationVaccinationProtocolComponent(); + copyElement(src, tgt); + tgt.setDoseSequence(src.getDoseSequence()); + tgt.setDescription(src.getDescription()); + tgt.setAuthority(convertReference(src.getAuthority())); + tgt.setSeries(src.getSeries()); + tgt.setSeriesDoses(src.getSeriesDoses()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTargetDisease()) + tgt.addTargetDisease(convertCodeableConcept(t)); + tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); + tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); + return tgt; + } + public org.hl7.fhir.r4.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.instance.model.ImplementationGuide src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7715,24 +6480,24 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { - if (src == null) + public org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case REFERENCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.REFERENCE; - case INCLUSION: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.INCLUSION; - default: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.NULL; - } + org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setProfile(convertReference(src.getProfile())); + return tgt; } - public org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { - if (src == null) + public org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case REFERENCE: return org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType.REFERENCE; - case INCLUSION: return org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType.INCLUSION; - default: return org.hl7.fhir.instance.model.ImplementationGuide.GuideDependencyType.NULL; - } + org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent(); + copyElement(src, tgt); + tgt.setType(src.getType()); + tgt.setProfile(convertReference(src.getProfile())); + return tgt; } public org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException { @@ -7790,26 +6555,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - public org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuideGlobalComponent(); - copyElement(src, tgt); - tgt.setType(src.getType()); - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - public org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.instance.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -7846,38 +6591,348 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + public org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability src) throws FHIRException { if (src == null) return null; switch (src) { - case PAGE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.PAGE; - case EXAMPLE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.EXAMPLE; - case LIST: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.LIST; - case INCLUDE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.INCLUDE; - case DIRECTORY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DIRECTORY; - case DICTIONARY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DICTIONARY; - case TOC: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.TOC; - case RESOURCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.RESOURCE; - default: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.NULL; + case ONLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.ONLINE; + case OFFLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.OFFLINE; + case NEARLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NEARLINE; + case UNAVAILABLE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; + default: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NULL; } } - public org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + public org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability src) throws FHIRException { if (src == null) return null; switch (src) { - case PAGE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.PAGE; - case EXAMPLE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.EXAMPLE; - case LIST: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.LIST; - case INCLUDE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.INCLUDE; - case DIRECTORY: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.DIRECTORY; - case DICTIONARY: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.DICTIONARY; - case TOC: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.TOC; - case RESOURCE: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.RESOURCE; - default: return org.hl7.fhir.instance.model.ImplementationGuide.GuidePageKind.NULL; + case ONLINE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.ONLINE; + case OFFLINE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.OFFLINE; + case NEARLINE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.NEARLINE; + case UNAVAILABLE: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; + default: return org.hl7.fhir.instance.model.ImagingStudy.InstanceAvailability.NULL; } } + public org.hl7.fhir.r4.model.InstantType convertInstant(org.hl7.fhir.instance.model.InstantType src) throws FHIRException { + org.hl7.fhir.r4.model.InstantType tgt = new org.hl7.fhir.r4.model.InstantType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.InstantType convertInstant(org.hl7.fhir.r4.model.InstantType src) throws FHIRException { + org.hl7.fhir.instance.model.InstantType tgt = new org.hl7.fhir.instance.model.InstantType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.IntegerType convertInteger(org.hl7.fhir.instance.model.IntegerType src) throws FHIRException { + org.hl7.fhir.r4.model.IntegerType tgt = new org.hl7.fhir.r4.model.IntegerType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.IntegerType convertInteger(org.hl7.fhir.r4.model.IntegerType src) throws FHIRException { + org.hl7.fhir.instance.model.IntegerType tgt = new org.hl7.fhir.instance.model.IntegerType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case FATAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.FATAL; + case ERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.ERROR; + case WARNING: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.WARNING; + case INFORMATION: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.INFORMATION; + default: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.NULL; + } + } + + public org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case FATAL: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.FATAL; + case ERROR: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.ERROR; + case WARNING: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.WARNING; + case INFORMATION: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.INFORMATION; + default: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.NULL; + } + } + + public org.hl7.fhir.r4.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.instance.model.OperationOutcome.IssueType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVALID; + case STRUCTURE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.STRUCTURE; + case REQUIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.REQUIRED; + case VALUE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.VALUE; + case INVARIANT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVARIANT; + case SECURITY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SECURITY; + case LOGIN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOGIN; + case UNKNOWN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.UNKNOWN; + case EXPIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXPIRED; + case FORBIDDEN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.FORBIDDEN; + case SUPPRESSED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SUPPRESSED; + case PROCESSING: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.PROCESSING; + case NOTSUPPORTED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTSUPPORTED; + case DUPLICATE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.DUPLICATE; + case NOTFOUND: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTFOUND; + case TOOLONG: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOLONG; + case CODEINVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CODEINVALID; + case EXTENSION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXTENSION; + case TOOCOSTLY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOCOSTLY; + case BUSINESSRULE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.BUSINESSRULE; + case CONFLICT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CONFLICT; + case INCOMPLETE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INCOMPLETE; + case TRANSIENT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TRANSIENT; + case LOCKERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOCKERROR; + case NOSTORE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOSTORE; + case EXCEPTION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXCEPTION; + case TIMEOUT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TIMEOUT; + case THROTTLED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.THROTTLED; + case INFORMATIONAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INFORMATIONAL; + default: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NULL; + } + } + +// public org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent convertEncounterStatusHistoryComponent(org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent(); +// copyElement(src, tgt); +// tgt.setStatus(convertEncounterState(src.getStatus())); +// tgt.setPeriod(convertPeriod(src.getPeriod())); +// return tgt; +// } + +// public org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent convertEncounterStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.EncounterStatusHistoryComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent tgt = new org.hl7.fhir.instance.model.Encounter.EncounterStatusHistoryComponent(); +// copyElement(src, tgt); +// tgt.setStatus(convertEncounterState(src.getStatus())); +// tgt.setPeriod(convertPeriod(src.getPeriod())); +// return tgt; +// } + + public org.hl7.fhir.instance.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.r4.model.OperationOutcome.IssueType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INVALID: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVALID; + case STRUCTURE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.STRUCTURE; + case REQUIRED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.REQUIRED; + case VALUE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.VALUE; + case INVARIANT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVARIANT; + case SECURITY: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.SECURITY; + case LOGIN: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.LOGIN; + case UNKNOWN: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.UNKNOWN; + case EXPIRED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.EXPIRED; + case FORBIDDEN: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.FORBIDDEN; + case SUPPRESSED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.SUPPRESSED; + case PROCESSING: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.PROCESSING; + case NOTSUPPORTED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NOTSUPPORTED; + case DUPLICATE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.DUPLICATE; + case NOTFOUND: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NOTFOUND; + case TOOLONG: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TOOLONG; + case CODEINVALID: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.CODEINVALID; + case EXTENSION: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.EXTENSION; + case TOOCOSTLY: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TOOCOSTLY; + case BUSINESSRULE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.BUSINESSRULE; + case CONFLICT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.CONFLICT; + case INCOMPLETE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INCOMPLETE; + case TRANSIENT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TRANSIENT; + case LOCKERROR: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.LOCKERROR; + case NOSTORE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NOSTORE; + case EXCEPTION: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.EXCEPTION; + case TIMEOUT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TIMEOUT; + case THROTTLED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.THROTTLED; + case INFORMATIONAL: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INFORMATIONAL; + default: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NULL; + } + } + + public org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent(); + copyElement(src, tgt); + tgt.setSequenceLinkId(src.getSequenceLinkId()); + return tgt; + } + + public org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent(); + copyElement(src, tgt); + tgt.setSequenceLinkId(src.getSequenceLinkId()); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.instance.model.Contract.LegalLanguageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.LegalLanguageComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.r4.model.Contract.LegalLanguageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.instance.model.Contract.LegalLanguageComponent(); + copyElement(src, tgt); + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public org.hl7.fhir.r4.model.Patient.LinkType convertLinkType(org.hl7.fhir.instance.model.Patient.LinkType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACE: return org.hl7.fhir.r4.model.Patient.LinkType.REPLACEDBY; + case REFER: return org.hl7.fhir.r4.model.Patient.LinkType.REFER; + case SEEALSO: return org.hl7.fhir.r4.model.Patient.LinkType.SEEALSO; + default: return org.hl7.fhir.r4.model.Patient.LinkType.NULL; + } + } + + public org.hl7.fhir.instance.model.Patient.LinkType convertLinkType(org.hl7.fhir.r4.model.Patient.LinkType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACEDBY: return org.hl7.fhir.instance.model.Patient.LinkType.REPLACE; + case REPLACES: return org.hl7.fhir.instance.model.Patient.LinkType.REPLACE; + case REFER: return org.hl7.fhir.instance.model.Patient.LinkType.REFER; + case SEEALSO: return org.hl7.fhir.instance.model.Patient.LinkType.SEEALSO; + default: return org.hl7.fhir.instance.model.Patient.LinkType.NULL; + } + } + + public org.hl7.fhir.r4.model.ListResource convertList(org.hl7.fhir.instance.model.List_ src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ListResource tgt = new org.hl7.fhir.r4.model.ListResource(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setTitle(src.getTitle()); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setSource(convertReference(src.getSource())); + tgt.setEncounter(convertReference(src.getEncounter())); + tgt.setStatus(convertListStatus(src.getStatus())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); + tgt.setMode(convertListMode(src.getMode())); + if (src.hasNote()) + tgt.addNote(new org.hl7.fhir.r4.model.Annotation().setText(src.getNote())); + for (org.hl7.fhir.instance.model.List_.ListEntryComponent t : src.getEntry()) + tgt.addEntry(convertListEntry(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.List_ convertList(org.hl7.fhir.r4.model.ListResource src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.List_ tgt = new org.hl7.fhir.instance.model.List_(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setTitle(src.getTitle()); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setSource(convertReference(src.getSource())); + tgt.setEncounter(convertReference(src.getEncounter())); + tgt.setStatus(convertListStatus(src.getStatus())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); + tgt.setMode(convertListMode(src.getMode())); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.setNote(t.getText()); + for (org.hl7.fhir.r4.model.ListResource.ListEntryComponent t : src.getEntry()) + tgt.addEntry(convertListEntry(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ListResource.ListEntryComponent convertListEntry(org.hl7.fhir.instance.model.List_.ListEntryComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ListResource.ListEntryComponent tgt = new org.hl7.fhir.r4.model.ListResource.ListEntryComponent(); + copyBackboneElement(src, tgt); + tgt.setFlag(convertCodeableConcept(src.getFlag())); + tgt.setDeleted(src.getDeleted()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setItem(convertReference(src.getItem())); + return tgt; + } + + public org.hl7.fhir.instance.model.List_.ListEntryComponent convertListEntry(org.hl7.fhir.r4.model.ListResource.ListEntryComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.List_.ListEntryComponent tgt = new org.hl7.fhir.instance.model.List_.ListEntryComponent(); + copyBackboneElement(src, tgt); + tgt.setFlag(convertCodeableConcept(src.getFlag())); + tgt.setDeleted(src.getDeleted()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setItem(convertReference(src.getItem())); + return tgt; + } + + public org.hl7.fhir.r4.model.ListResource.ListMode convertListMode(org.hl7.fhir.instance.model.List_.ListMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case WORKING: return org.hl7.fhir.r4.model.ListResource.ListMode.WORKING; + case SNAPSHOT: return org.hl7.fhir.r4.model.ListResource.ListMode.SNAPSHOT; + case CHANGES: return org.hl7.fhir.r4.model.ListResource.ListMode.CHANGES; + default: return org.hl7.fhir.r4.model.ListResource.ListMode.NULL; + } + } + + public org.hl7.fhir.instance.model.List_.ListMode convertListMode(org.hl7.fhir.r4.model.ListResource.ListMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case WORKING: return org.hl7.fhir.instance.model.List_.ListMode.WORKING; + case SNAPSHOT: return org.hl7.fhir.instance.model.List_.ListMode.SNAPSHOT; + case CHANGES: return org.hl7.fhir.instance.model.List_.ListMode.CHANGES; + default: return org.hl7.fhir.instance.model.List_.ListMode.NULL; + } + } + + public org.hl7.fhir.r4.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.instance.model.List_.ListStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.r4.model.ListResource.ListStatus.CURRENT; + case RETIRED: return org.hl7.fhir.r4.model.ListResource.ListStatus.RETIRED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.ListResource.ListStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.ListResource.ListStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.List_.ListStatus convertListStatus(org.hl7.fhir.r4.model.ListResource.ListStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.instance.model.List_.ListStatus.CURRENT; + case RETIRED: return org.hl7.fhir.instance.model.List_.ListStatus.RETIRED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.List_.ListStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.List_.ListStatus.NULL; + } + } public org.hl7.fhir.r4.model.Location convertLocation(org.hl7.fhir.instance.model.Location src) throws FHIRException { if (src == null || src.isEmpty()) @@ -7923,28 +6978,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.instance.model.Location.LocationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.Location.LocationStatus.SUSPENDED; - case INACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.INACTIVE; - default: return org.hl7.fhir.r4.model.Location.LocationStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.r4.model.Location.LocationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.instance.model.Location.LocationStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.instance.model.Location.LocationStatus.SUSPENDED; - case INACTIVE: return org.hl7.fhir.instance.model.Location.LocationStatus.INACTIVE; - default: return org.hl7.fhir.instance.model.Location.LocationStatus.NULL; - } - } - public org.hl7.fhir.r4.model.Location.LocationMode convertLocationMode(org.hl7.fhir.instance.model.Location.LocationMode src) throws FHIRException { if (src == null) return null; @@ -7987,6 +7020,78 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.instance.model.Location.LocationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.Location.LocationStatus.SUSPENDED; + case INACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.INACTIVE; + default: return org.hl7.fhir.r4.model.Location.LocationStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.r4.model.Location.LocationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.instance.model.Location.LocationStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.instance.model.Location.LocationStatus.SUSPENDED; + case INACTIVE: return org.hl7.fhir.instance.model.Location.LocationStatus.INACTIVE; + default: return org.hl7.fhir.instance.model.Location.LocationStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.MarkdownType convertMarkdown(org.hl7.fhir.instance.model.MarkdownType src) throws FHIRException { + org.hl7.fhir.r4.model.MarkdownType tgt = new org.hl7.fhir.r4.model.MarkdownType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.MarkdownType convertMarkdown(org.hl7.fhir.r4.model.MarkdownType src) throws FHIRException { + org.hl7.fhir.instance.model.MarkdownType tgt = new org.hl7.fhir.instance.model.MarkdownType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OTHER: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OTHER; + case CHEMICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; + case ELECTRICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; + case IMPEDANCE: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; + case NUCLEAR: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; + case OPTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OPTICAL; + case THERMAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.THERMAL; + case BIOLOGICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; + case MECHANICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; + case ACOUSTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; + case MANUAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MANUAL; + default: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NULL; + } + } + + public org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OTHER: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.OTHER; + case CHEMICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; + case ELECTRICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; + case IMPEDANCE: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; + case NUCLEAR: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; + case OPTICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.OPTICAL; + case THERMAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.THERMAL; + case BIOLOGICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; + case MECHANICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; + case ACOUSTICAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; + case MANUAL: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.MANUAL; + default: return org.hl7.fhir.instance.model.DeviceComponent.MeasmntPrinciple.NULL; + } + } + public org.hl7.fhir.r4.model.Media convertMedia(org.hl7.fhir.instance.model.Media src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -8029,28 +7134,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.instance.model.Media.DigitalMediaType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PHOTO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.PHOTO; - case VIDEO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.VIDEO; - case AUDIO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.AUDIO; - default: return org.hl7.fhir.r4.model.Media.DigitalMediaType.NULL; - } - } - - public org.hl7.fhir.instance.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.r4.model.Media.DigitalMediaType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PHOTO: return org.hl7.fhir.instance.model.Media.DigitalMediaType.PHOTO; - case VIDEO: return org.hl7.fhir.instance.model.Media.DigitalMediaType.VIDEO; - case AUDIO: return org.hl7.fhir.instance.model.Media.DigitalMediaType.AUDIO; - default: return org.hl7.fhir.instance.model.Media.DigitalMediaType.NULL; - } - } - public org.hl7.fhir.r4.model.Medication convertMedication(org.hl7.fhir.instance.model.Medication src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -8077,6 +7160,1128 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.instance.model.MedicationDispense src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MedicationDispense tgt = new org.hl7.fhir.r4.model.MedicationDispense(); + copyDomainResource(src, tgt); + tgt.addIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setStatus(convertMedicationDispenseStatus(src.getStatus())); + tgt.setMedication(convertType(src.getMedication())); + tgt.setSubject(convertReference(src.getPatient())); +// tgt.setDispenser(convertReference(src.getDispenser())); + for (org.hl7.fhir.instance.model.Reference t : src.getAuthorizingPrescription()) + tgt.addAuthorizingPrescription(convertReference(t)); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setDaysSupply(convertSimpleQuantity(src.getDaysSupply())); + tgt.setWhenPrepared(src.getWhenPrepared()); + tgt.setWhenHandedOver(src.getWhenHandedOver()); + tgt.setDestination(convertReference(src.getDestination())); + for (org.hl7.fhir.instance.model.Reference t : src.getReceiver()) + tgt.addReceiver(convertReference(t)); + if (src.hasNote()) + tgt.addNote().setText(src.getNote()); + for (org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) + tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); + tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution())); + return tgt; + } + + public org.hl7.fhir.instance.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.r4.model.MedicationDispense src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MedicationDispense tgt = new org.hl7.fhir.instance.model.MedicationDispense(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep())); + tgt.setStatus(convertMedicationDispenseStatus(src.getStatus())); + tgt.setMedication(convertType(src.getMedication())); + tgt.setPatient(convertReference(src.getSubject())); +// tgt.setDispenser(convertReference(src.getDispenser())); + for (org.hl7.fhir.r4.model.Reference t : src.getAuthorizingPrescription()) + tgt.addAuthorizingPrescription(convertReference(t)); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setDaysSupply(convertSimpleQuantity(src.getDaysSupply())); + tgt.setWhenPrepared(src.getWhenPrepared()); + tgt.setWhenHandedOver(src.getWhenHandedOver()); + tgt.setDestination(convertReference(src.getDestination())); + for (org.hl7.fhir.r4.model.Reference t : src.getReceiver()) + tgt.addReceiver(convertReference(t)); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.setNote(t.getText()); + for (org.hl7.fhir.r4.model.Dosage t : src.getDosageInstruction()) + tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); + tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution())); + return tgt; + } + + public org.hl7.fhir.r4.model.Dosage convertMedicationDispenseDosageInstructionComponent(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); + copyElement(src, tgt); + tgt.setText(src.getText()); +// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); + tgt.setTiming(convertTiming(src.getTiming())); + tgt.setAsNeeded(convertType(src.getAsNeeded())); + if (src.hasSiteCodeableConcept()) + tgt.setSite(convertCodeableConcept(src.getSiteCodeableConcept())); + tgt.setRoute(convertCodeableConcept(src.getRoute())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + tgt.setDose(convertType(src.getDose())); + tgt.setRate(convertType(src.getRate())); + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + return tgt; + } + + public org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent convertMedicationDispenseDosageInstructionComponent(Dosage src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent tgt = new org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent(); + copyElement(src, tgt); + tgt.setText(src.getText()); +// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); + tgt.setTiming(convertTiming(src.getTiming())); + tgt.setAsNeeded(convertType(src.getAsNeeded())); + tgt.setSite(convertType(src.getSite())); + tgt.setRoute(convertCodeableConcept(src.getRoute())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + tgt.setDose(convertType(src.getDose())); + tgt.setRate(convertType(src.getRate())); + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + return tgt; + } + + public org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.STOPPED; + default: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.STOPPED; + default: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); + copyElement(src, tgt); + tgt.setType(convertCodeableConcept(src.getType())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) + tgt.addReason(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getResponsibleParty()) + tgt.addResponsibleParty(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); + copyElement(src, tgt); + tgt.setType(convertCodeableConcept(src.getType())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) + tgt.addReason(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getResponsibleParty()) + tgt.addResponsibleParty(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Dosage convertMedicationOrderDosageInstructionComponent(org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); + copyElement(src, tgt); + tgt.setText(src.getText()); +// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); + tgt.setTiming(convertTiming(src.getTiming())); + tgt.setAsNeeded(convertType(src.getAsNeeded())); + if (src.hasSiteCodeableConcept()) + tgt.setSite(convertCodeableConcept(src.getSiteCodeableConcept())); + tgt.setRoute(convertCodeableConcept(src.getRoute())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + tgt.setDose(convertType(src.getDose())); + tgt.setRate(convertType(src.getRate())); + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + return tgt; + } + + public org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent convertMedicationOrderDosageInstructionComponent(org.hl7.fhir.r4.model.Dosage src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent tgt = new org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent(); + copyElement(src, tgt); + tgt.setText(src.getText()); +// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); + tgt.setTiming(convertTiming(src.getTiming())); + tgt.setAsNeeded(convertType(src.getAsNeeded())); + tgt.setSite(convertType(src.getSite())); + tgt.setRoute(convertCodeableConcept(src.getRoute())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + tgt.setDose(convertType(src.getDose())); + tgt.setRate(convertType(src.getRate())); + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + return tgt; + } + + public org.hl7.fhir.r4.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.instance.model.Medication.MedicationPackageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageComponent(); + copyElement(src, tgt); + tgt.setContainer(convertCodeableConcept(src.getContainer())); + for (org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent t : src.getContent()) + tgt.addContent(convertMedicationPackageContentComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.instance.model.Medication.MedicationPackageComponent(); + copyElement(src, tgt); + tgt.setContainer(convertCodeableConcept(src.getContainer())); + for (org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent t : src.getContent()) + tgt.addContent(convertMedicationPackageContentComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent(); + copyElement(src, tgt); + tgt.setItem(convertType(src.getItem())); + tgt.setAmount(convertSimpleQuantity(src.getAmount())); + return tgt; + } + + public org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent(); + copyElement(src, tgt); + if (src.hasItemReference()) + tgt.setItem((org.hl7.fhir.instance.model.Reference) convertType(src.getItem())); + tgt.setAmount(convertSimpleQuantity(src.getAmount())); + return tgt; + } + + public org.hl7.fhir.r4.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.instance.model.MedicationStatement src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MedicationStatement tgt = new org.hl7.fhir.r4.model.MedicationStatement(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertMedicationStatementStatus(src.getStatus())); + tgt.setMedication(convertType(src.getMedication())); + tgt.setSubject(convertReference(src.getPatient())); + tgt.setEffective(convertType(src.getEffective())); + tgt.setInformationSource(convertReference(src.getInformationSource())); + for (org.hl7.fhir.instance.model.Reference t : src.getSupportingInformation()) + tgt.addDerivedFrom(convertReference(t)); + if (src.hasDateAsserted()) + tgt.setDateAsserted(src.getDateAsserted()); +// tgt.getNotTakenElement().setValueAsString(src.getWasNotTaken() ? "Y" : "N"); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReasonNotTaken()) + tgt.addReasonNotTaken(convertCodeableConcept(t)); +// tgt.setReasonForUse(convertType(src.getReasonForUse())); + if (src.hasNote()) + tgt.addNote().setText(src.getNote()); + for (org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) + tgt.addDosage(convertMedicationStatementDosageComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MedicationStatement tgt = new org.hl7.fhir.instance.model.MedicationStatement(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertMedicationStatementStatus(src.getStatus())); + tgt.setMedication(convertType(src.getMedication())); + tgt.setPatient(convertReference(src.getSubject())); + tgt.setEffective(convertType(src.getEffective())); + tgt.setInformationSource(convertReference(src.getInformationSource())); + for (org.hl7.fhir.r4.model.Reference t : src.getDerivedFrom()) + tgt.addSupportingInformation(convertReference(t)); + if (src.hasDateAsserted()) + tgt.setDateAsserted(src.getDateAsserted()); +// tgt.setWasNotTaken("Y".equals(src.getNotTakenElement().getValueAsString())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonNotTaken()) + tgt.addReasonNotTaken(convertCodeableConcept(t)); +// tgt.setReasonForUse(convertType(src.getReasonForUse())); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.setNote(t.getText()); + for (org.hl7.fhir.r4.model.Dosage t : src.getDosage()) + tgt.addDosage(convertMedicationStatementDosageComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Dosage convertMedicationStatementDosageComponent(org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); + copyElement(src, tgt); + tgt.setText(src.getText()); + tgt.setTiming(convertTiming(src.getTiming())); + tgt.setAsNeeded(convertType(src.getAsNeeded())); + if (src.hasSiteCodeableConcept()) + tgt.setSite(convertCodeableConcept(src.getSiteCodeableConcept())); + tgt.setRoute(convertCodeableConcept(src.getRoute())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); +// tgt.setQuantity(convertType(src.getQuantity())); + tgt.setRate(convertType(src.getRate())); + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + return tgt; + } + + public org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent convertMedicationStatementDosageComponent(org.hl7.fhir.r4.model.Dosage src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent tgt = new org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent(); + copyElement(src, tgt); + tgt.setText(src.getText()); + tgt.setTiming(convertTiming(src.getTiming())); + tgt.setAsNeeded(convertType(src.getAsNeeded())); + tgt.setSite(convertType(src.getSite())); + tgt.setRoute(convertCodeableConcept(src.getRoute())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); +// tgt.setQuantity(convertType(src.getQuantity())); + tgt.setRate(convertType(src.getRate())); + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + return tgt; + } + + public org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR; + case INTENDED: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.INTENDED; + default: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR; + case INTENDED: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.INTENDED; + default: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setTarget(convertReference(src.getTarget())); + tgt.setEndpoint(src.getEndpoint()); + return tgt; + } + + public org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setTarget(convertReference(src.getTarget())); + tgt.setEndpoint(src.getEndpoint()); + return tgt; + } + + public org.hl7.fhir.r4.model.MessageHeader convertMessageHeader(org.hl7.fhir.instance.model.MessageHeader src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MessageHeader tgt = new org.hl7.fhir.r4.model.MessageHeader(); + copyDomainResource(src, tgt); + tgt.setTimestamp(src.getTimestamp()); + tgt.setEvent(convertCoding(src.getEvent())); + tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse())); + tgt.setSource(convertMessageSourceComponent(src.getSource())); + for (org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) + tgt.addDestination(convertMessageDestinationComponent(t)); + tgt.setEnterer(convertReference(src.getEnterer())); + tgt.setAuthor(convertReference(src.getAuthor())); + tgt.setResponsible(convertReference(src.getResponsible())); + tgt.setReason(convertCodeableConcept(src.getReason())); + for (org.hl7.fhir.instance.model.Reference t : src.getData()) + tgt.addFocus(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.MessageHeader convertMessageHeader(org.hl7.fhir.r4.model.MessageHeader src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MessageHeader tgt = new org.hl7.fhir.instance.model.MessageHeader(); + copyDomainResource(src, tgt); + tgt.setTimestamp(src.getTimestamp()); + tgt.setEvent(convertCoding(src.getEvent())); + tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse())); + tgt.setSource(convertMessageSourceComponent(src.getSource())); + for (org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) + tgt.addDestination(convertMessageDestinationComponent(t)); + tgt.setEnterer(convertReference(src.getEnterer())); + tgt.setAuthor(convertReference(src.getAuthor())); + tgt.setResponsible(convertReference(src.getResponsible())); + tgt.setReason(convertCodeableConcept(src.getReason())); + for (org.hl7.fhir.r4.model.Reference t : src.getFocus()) + tgt.addData(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); + copyElement(src, tgt); + tgt.setIdentifier(src.getIdentifier()); + tgt.setCode(convertResponseType(src.getCode())); + tgt.setDetails(convertReference(src.getDetails())); + return tgt; + } + + public org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent(); + copyElement(src, tgt); + tgt.setIdentifier(src.getIdentifier()); + tgt.setCode(convertResponseType(src.getCode())); + tgt.setDetails(convertReference(src.getDetails())); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONSEQUENCE: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE; + case CURRENCY: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY; + case NOTIFICATION: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION; + default: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONSEQUENCE: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.CONSEQUENCE; + case CURRENCY: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.CURRENCY; + case NOTIFICATION: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.NOTIFICATION; + default: return org.hl7.fhir.instance.model.Conformance.MessageSignificanceCategory.NULL; + } + } + + public org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setSoftware(src.getSoftware()); + tgt.setVersion(src.getVersion()); + tgt.setContact(convertContactPoint(src.getContact())); + tgt.setEndpoint(src.getEndpoint()); + return tgt; + } + + public org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setSoftware(src.getSoftware()); + tgt.setVersion(src.getVersion()); + tgt.setContact(convertContactPoint(src.getContact())); + tgt.setEndpoint(src.getEndpoint()); + return tgt; + } + + public org.hl7.fhir.r4.model.Meta convertMeta(org.hl7.fhir.instance.model.Meta src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Meta tgt = new org.hl7.fhir.r4.model.Meta(); + copyElement(src, tgt); + tgt.setVersionId(src.getVersionId()); + tgt.setLastUpdated(src.getLastUpdated()); + for (org.hl7.fhir.instance.model.UriType t : src.getProfile()) + tgt.addProfile(t.getValue()); + for (org.hl7.fhir.instance.model.Coding t : src.getSecurity()) + tgt.addSecurity(convertCoding(t)); + for (org.hl7.fhir.instance.model.Coding t : src.getTag()) + tgt.addTag(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Meta convertMeta(org.hl7.fhir.r4.model.Meta src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Meta tgt = new org.hl7.fhir.instance.model.Meta(); + copyElement(src, tgt); + tgt.setVersionId(src.getVersionId()); + tgt.setLastUpdated(src.getLastUpdated()); + for (org.hl7.fhir.r4.model.UriType t : src.getProfile()) + tgt.addProfile(t.getValue()); + for (org.hl7.fhir.r4.model.Coding t : src.getSecurity()) + tgt.addSecurity(convertCoding(t)); + for (org.hl7.fhir.r4.model.Coding t : src.getTag()) + tgt.addTag(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Money convertMoney(org.hl7.fhir.instance.model.Money src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Money tgt = new org.hl7.fhir.r4.model.Money(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Money tgt = new org.hl7.fhir.instance.model.Money(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.r4.model.HumanName.NameUse convertNameUse(org.hl7.fhir.instance.model.HumanName.NameUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case USUAL: return org.hl7.fhir.r4.model.HumanName.NameUse.USUAL; + case OFFICIAL: return org.hl7.fhir.r4.model.HumanName.NameUse.OFFICIAL; + case TEMP: return org.hl7.fhir.r4.model.HumanName.NameUse.TEMP; + case NICKNAME: return org.hl7.fhir.r4.model.HumanName.NameUse.NICKNAME; + case ANONYMOUS: return org.hl7.fhir.r4.model.HumanName.NameUse.ANONYMOUS; + case OLD: return org.hl7.fhir.r4.model.HumanName.NameUse.OLD; + case MAIDEN: return org.hl7.fhir.r4.model.HumanName.NameUse.MAIDEN; + default: return org.hl7.fhir.r4.model.HumanName.NameUse.NULL; + } + } + + public org.hl7.fhir.instance.model.HumanName.NameUse convertNameUse(org.hl7.fhir.r4.model.HumanName.NameUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case USUAL: return org.hl7.fhir.instance.model.HumanName.NameUse.USUAL; + case OFFICIAL: return org.hl7.fhir.instance.model.HumanName.NameUse.OFFICIAL; + case TEMP: return org.hl7.fhir.instance.model.HumanName.NameUse.TEMP; + case NICKNAME: return org.hl7.fhir.instance.model.HumanName.NameUse.NICKNAME; + case ANONYMOUS: return org.hl7.fhir.instance.model.HumanName.NameUse.ANONYMOUS; + case OLD: return org.hl7.fhir.instance.model.HumanName.NameUse.OLD; + case MAIDEN: return org.hl7.fhir.instance.model.HumanName.NameUse.MAIDEN; + default: return org.hl7.fhir.instance.model.HumanName.NameUse.NULL; + } + } + + public org.hl7.fhir.r4.model.NamingSystem convertNamingSystem(org.hl7.fhir.instance.model.NamingSystem src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem(); + copyDomainResource(src, tgt); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + tgt.setKind(convertNamingSystemType(src.getKind())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) + tgt.addContact(convertNamingSystemContactComponent(t)); + tgt.setResponsible(src.getResponsible()); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgt.addJurisdiction(convertCodeableConcept(t)); + else + tgt.addUseContext(convertCodeableConceptToUsageContext(t)); + tgt.setUsage(src.getUsage()); + for (org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) + tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); + tgt.setReplacedBy(convertReference(src.getReplacedBy())); + return tgt; + } + + public org.hl7.fhir.instance.model.NamingSystem convertNamingSystem(org.hl7.fhir.r4.model.NamingSystem src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.NamingSystem tgt = new org.hl7.fhir.instance.model.NamingSystem(); + copyDomainResource(src, tgt); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + tgt.setKind(convertNamingSystemType(src.getKind())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertNamingSystemContactComponent(t)); + tgt.setResponsible(src.getResponsible()); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) + if (t.hasValueCodeableConcept()) + tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) + tgt.addUseContext(convertCodeableConcept(t)); + tgt.setUsage(src.getUsage()); + for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) + tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); + tgt.setReplacedBy(convertReference(src.getReplacedBy())); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertNamingSystemContactComponent(org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent convertNamingSystemContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OID; + case UUID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.UUID; + case URI: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.URI; + case OTHER: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OTHER; + default: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.NULL; + } + } + + public org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OID: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.OID; + case UUID: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.UUID; + case URI: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.URI; + case OTHER: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.OTHER; + default: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.NULL; + } + } + + public org.hl7.fhir.r4.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.instance.model.NamingSystem.NamingSystemType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CODESYSTEM: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.CODESYSTEM; + case IDENTIFIER: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.IDENTIFIER; + case ROOT: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.ROOT; + default: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.NULL; + } + } + + public org.hl7.fhir.instance.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.r4.model.NamingSystem.NamingSystemType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CODESYSTEM: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.CODESYSTEM; + case IDENTIFIER: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.IDENTIFIER; + case ROOT: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.ROOT; + default: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.NULL; + } + } + + public org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent(); + copyElement(src, tgt); + tgt.setType(convertNamingSystemIdentifierType(src.getType())); + tgt.setValue(src.getValue()); + tgt.setPreferred(src.getPreferred()); + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent(); + copyElement(src, tgt); + tgt.setType(convertNamingSystemIdentifierType(src.getType())); + tgt.setValue(src.getValue()); + tgt.setPreferred(src.getPreferred()); + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public org.hl7.fhir.r4.model.Narrative convertNarrative(org.hl7.fhir.instance.model.Narrative src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Narrative tgt = new org.hl7.fhir.r4.model.Narrative(); + copyElement(src, tgt); + tgt.setStatus(convertNarrativeStatus(src.getStatus())); + tgt.setDiv(src.getDiv()); + return tgt; + } + + public org.hl7.fhir.instance.model.Narrative convertNarrative(org.hl7.fhir.r4.model.Narrative src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Narrative tgt = new org.hl7.fhir.instance.model.Narrative(); + copyElement(src, tgt); + tgt.setStatus(convertNarrativeStatus(src.getStatus())); + tgt.setDiv(src.getDiv()); + return tgt; + } + + public org.hl7.fhir.r4.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.instance.model.Narrative.NarrativeStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case GENERATED: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.GENERATED; + case EXTENSIONS: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EXTENSIONS; + case ADDITIONAL: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.ADDITIONAL; + case EMPTY: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EMPTY; + default: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.r4.model.Narrative.NarrativeStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case GENERATED: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.GENERATED; + case EXTENSIONS: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.EXTENSIONS; + case ADDITIONAL: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.ADDITIONAL; + case EMPTY: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.EMPTY; + default: return org.hl7.fhir.instance.model.Narrative.NarrativeStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Observation convertObservation(org.hl7.fhir.instance.model.Observation src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Observation tgt = new org.hl7.fhir.r4.model.Observation(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertObservationStatus(src.getStatus())); + tgt.addCategory(convertCodeableConcept(src.getCategory())); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setContext(convertReference(src.getEncounter())); + tgt.setEffective(convertType(src.getEffective())); + tgt.setIssued(src.getIssued()); + for (org.hl7.fhir.instance.model.Reference t : src.getPerformer()) + tgt.addPerformer(convertReference(t)); + tgt.setValue(convertType(src.getValue())); + tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); + tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); + tgt.setComment(src.getComments()); + tgt.setBodySite(convertCodeableConcept(src.getBodySite())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + tgt.setSpecimen(convertReference(src.getSpecimen())); + tgt.setDevice(convertReference(src.getDevice())); + for (org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) + tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); + for (org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent t : src.getRelated()) + tgt.addRelated(convertObservationRelatedComponent(t)); + for (org.hl7.fhir.instance.model.Observation.ObservationComponentComponent t : src.getComponent()) + tgt.addComponent(convertObservationComponentComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Observation convertObservation(org.hl7.fhir.r4.model.Observation src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Observation tgt = new org.hl7.fhir.instance.model.Observation(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setStatus(convertObservationStatus(src.getStatus())); + for (org.hl7.fhir.r4.model.CodeableConcept c : src.getCategory()) + tgt.setCategory(convertCodeableConcept(c)); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setSubject(convertReference(src.getSubject())); + tgt.setEncounter(convertReference(src.getContext())); + tgt.setEffective(convertType(src.getEffective())); + tgt.setIssued(src.getIssued()); + for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) + tgt.addPerformer(convertReference(t)); + tgt.setValue(convertType(src.getValue())); + tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); + tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); + tgt.setComments(src.getComment()); + tgt.setBodySite(convertCodeableConcept(src.getBodySite())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + tgt.setSpecimen(convertReference(src.getSpecimen())); + tgt.setDevice(convertReference(src.getDevice())); + for (org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) + tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); + for (org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent t : src.getRelated()) + tgt.addRelated(convertObservationRelatedComponent(t)); + for (org.hl7.fhir.r4.model.Observation.ObservationComponentComponent t : src.getComponent()) + tgt.addComponent(convertObservationComponentComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.instance.model.Observation.ObservationComponentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationComponentComponent(); + copyElement(src, tgt); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setValue(convertType(src.getValue())); + tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); + for (org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) + tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.r4.model.Observation.ObservationComponentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationComponentComponent(); + copyElement(src, tgt); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setValue(convertType(src.getValue())); + tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); + for (org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) + tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent(); + copyElement(src, tgt); + tgt.setLow(convertSimpleQuantity(src.getLow())); + tgt.setHigh(convertSimpleQuantity(src.getHigh())); + tgt.setType(convertCodeableConcept(src.getMeaning())); + tgt.setAge(convertRange(src.getAge())); + tgt.setText(src.getText()); + return tgt; + } + + public org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent(); + copyElement(src, tgt); + tgt.setLow(convertSimpleQuantity(src.getLow())); + tgt.setHigh(convertSimpleQuantity(src.getHigh())); +// for (org.hl7.fhir.r4.model.CodeableConcept c : src.getMeaning()) + tgt.setMeaning(convertCodeableConcept(src.getType())); + tgt.setAge(convertRange(src.getAge())); + tgt.setText(src.getText()); + return tgt; + } + + public org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent(); + copyElement(src, tgt); + tgt.setType(convertObservationRelationshipType(src.getType())); + tgt.setTarget(convertReference(src.getTarget())); + return tgt; + } + + public org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent(); + copyElement(src, tgt); + tgt.setType(convertObservationRelationshipType(src.getType())); + tgt.setTarget(convertReference(src.getTarget())); + return tgt; + } + + public org.hl7.fhir.r4.model.Observation.ObservationRelationshipType convertObservationRelationshipType(org.hl7.fhir.instance.model.Observation.ObservationRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HASMEMBER: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.HASMEMBER; + case DERIVEDFROM: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.DERIVEDFROM; + case SEQUELTO: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.SEQUELTO; + case REPLACES: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.REPLACES; + case QUALIFIEDBY: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.QUALIFIEDBY; + case INTERFEREDBY: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.INTERFEREDBY; + default: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.NULL; + } + } + + public org.hl7.fhir.instance.model.Observation.ObservationRelationshipType convertObservationRelationshipType(org.hl7.fhir.r4.model.Observation.ObservationRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HASMEMBER: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.HASMEMBER; + case DERIVEDFROM: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.DERIVEDFROM; + case SEQUELTO: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.SEQUELTO; + case REPLACES: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.REPLACES; + case QUALIFIEDBY: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.QUALIFIEDBY; + case INTERFEREDBY: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.INTERFEREDBY; + default: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.NULL; + } + } + + public org.hl7.fhir.r4.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.instance.model.Observation.ObservationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.r4.model.Observation.ObservationStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.Observation.ObservationStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.AMENDED; + case CANCELLED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Observation.ObservationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Observation.ObservationStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Observation.ObservationStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.r4.model.Observation.ObservationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.instance.model.Observation.ObservationStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.instance.model.Observation.ObservationStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.instance.model.Observation.ObservationStatus.FINAL; + case AMENDED: return org.hl7.fhir.instance.model.Observation.ObservationStatus.AMENDED; + case CANCELLED: return org.hl7.fhir.instance.model.Observation.ObservationStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Observation.ObservationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.instance.model.Observation.ObservationStatus.UNKNOWN; + default: return org.hl7.fhir.instance.model.Observation.ObservationStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.OidType convertOid(org.hl7.fhir.instance.model.OidType src) throws FHIRException { + org.hl7.fhir.r4.model.OidType tgt = new org.hl7.fhir.r4.model.OidType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.OidType convertOid(org.hl7.fhir.r4.model.OidType src) throws FHIRException { + org.hl7.fhir.instance.model.OidType tgt = new org.hl7.fhir.instance.model.OidType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.instance.model.OperationDefinition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + tgt.setKind(convertOperationKind(src.getKind())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) + tgt.addContact(convertOperationDefinitionContactComponent(t)); + tgt.setDescription(src.getDescription()); + tgt.setPurpose(src.getRequirements()); + if (src.hasIdempotent()) + tgt.setIdempotent(src.getIdempotent()); + tgt.setCode(src.getCode()); + tgt.setComment(src.getNotes()); + tgt.setBase(convertReference(src.getBase())); + tgt.setSystem(src.getSystem()); + for (org.hl7.fhir.instance.model.CodeType t : src.getType()) + tgt.addResource(t.getValue()); + tgt.setType(tgt.hasResource()); + tgt.setInstance(src.getInstance()); + for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) + tgt.addParameter(convertOperationDefinitionParameterComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.r4.model.OperationDefinition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.OperationDefinition tgt = new org.hl7.fhir.instance.model.OperationDefinition(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + tgt.setKind(convertOperationKind(src.getKind())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertOperationDefinitionContactComponent(t)); + tgt.setDescription(src.getDescription()); + tgt.setRequirements(src.getPurpose()); + tgt.setIdempotent(src.getIdempotent()); + tgt.setCode(src.getCode()); + tgt.setNotes(src.getComment()); + if (src.hasBase()) + tgt.setBase(convertReference(src.getBase())); + tgt.setSystem(src.getSystem()); + if (src.getType()) + for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) + tgt.addType(t.getValue()); + tgt.setInstance(src.getInstance()); + for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) + tgt.addParameter(convertOperationDefinitionParameterComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertOperationDefinitionContactComponent(org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent convertOperationDefinitionContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); + copyElement(src, tgt); + tgt.setStrength(convertBindingStrength(src.getStrength())); + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); + copyElement(src, tgt); + tgt.setStrength(convertBindingStrength(src.getStrength())); + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setUse(convertOperationParameterUse(src.getUse())); + tgt.setMin(src.getMin()); + tgt.setMax(src.getMax()); + tgt.setDocumentation(src.getDocumentation()); + tgt.setType(src.getType()); + tgt.setProfile(convertReference(src.getProfile())); + tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding())); + for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart()) + tgt.addPart(convertOperationDefinitionParameterComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setUse(convertOperationParameterUse(src.getUse())); + tgt.setMin(src.getMin()); + tgt.setMax(src.getMax()); + tgt.setDocumentation(src.getDocumentation()); + if (src.hasSearchType()) { + tgt.setType(src.getSearchType().toCode()); + tgt.setType("string"); + } else + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); + if (src.hasBinding()) + tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding())); + for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart()) + tgt.addPart(convertOperationDefinitionParameterComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.instance.model.OperationDefinition.OperationKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OPERATION: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.OPERATION; + case QUERY: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.QUERY; + default: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.NULL; + } + } + // public org.hl7.fhir.r4.model.Medication.MedicationProductComponent convertMedicationProductComponent(org.hl7.fhir.instance.model.Medication.MedicationProductComponent src) throws FHIRException { // if (src == null || src.isEmpty()) // return null; @@ -8144,191 +8349,158 @@ public class VersionConvertor_10_40 { // return tgt; // } - public org.hl7.fhir.r4.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.instance.model.Medication.MedicationPackageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageComponent(); - copyElement(src, tgt); - tgt.setContainer(convertCodeableConcept(src.getContainer())); - for (org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent t : src.getContent()) - tgt.addContent(convertMedicationPackageContentComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.instance.model.Medication.MedicationPackageComponent(); - copyElement(src, tgt); - tgt.setContainer(convertCodeableConcept(src.getContainer())); - for (org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent t : src.getContent()) - tgt.addContent(convertMedicationPackageContentComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent(); - copyElement(src, tgt); - tgt.setItem(convertType(src.getItem())); - tgt.setAmount(convertSimpleQuantity(src.getAmount())); - return tgt; - } - - public org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.instance.model.Medication.MedicationPackageContentComponent(); - copyElement(src, tgt); - if (src.hasItemReference()) - tgt.setItem((org.hl7.fhir.instance.model.Reference) convertType(src.getItem())); - tgt.setAmount(convertSimpleQuantity(src.getAmount())); - return tgt; - } - - public org.hl7.fhir.r4.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.instance.model.MedicationDispense src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.MedicationDispense tgt = new org.hl7.fhir.r4.model.MedicationDispense(); - copyDomainResource(src, tgt); - tgt.addIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setStatus(convertMedicationDispenseStatus(src.getStatus())); - tgt.setMedication(convertType(src.getMedication())); - tgt.setSubject(convertReference(src.getPatient())); -// tgt.setDispenser(convertReference(src.getDispenser())); - for (org.hl7.fhir.instance.model.Reference t : src.getAuthorizingPrescription()) - tgt.addAuthorizingPrescription(convertReference(t)); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setDaysSupply(convertSimpleQuantity(src.getDaysSupply())); - tgt.setWhenPrepared(src.getWhenPrepared()); - tgt.setWhenHandedOver(src.getWhenHandedOver()); - tgt.setDestination(convertReference(src.getDestination())); - for (org.hl7.fhir.instance.model.Reference t : src.getReceiver()) - tgt.addReceiver(convertReference(t)); - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); - for (org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) - tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); - tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution())); - return tgt; - } - - public org.hl7.fhir.instance.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.r4.model.MedicationDispense src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.MedicationDispense tgt = new org.hl7.fhir.instance.model.MedicationDispense(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep())); - tgt.setStatus(convertMedicationDispenseStatus(src.getStatus())); - tgt.setMedication(convertType(src.getMedication())); - tgt.setPatient(convertReference(src.getSubject())); -// tgt.setDispenser(convertReference(src.getDispenser())); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthorizingPrescription()) - tgt.addAuthorizingPrescription(convertReference(t)); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - tgt.setDaysSupply(convertSimpleQuantity(src.getDaysSupply())); - tgt.setWhenPrepared(src.getWhenPrepared()); - tgt.setWhenHandedOver(src.getWhenHandedOver()); - tgt.setDestination(convertReference(src.getDestination())); - for (org.hl7.fhir.r4.model.Reference t : src.getReceiver()) - tgt.addReceiver(convertReference(t)); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.setNote(t.getText()); - for (org.hl7.fhir.r4.model.Dosage t : src.getDosageInstruction()) - tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); - tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution())); - return tgt; - } - - public org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException { + public org.hl7.fhir.instance.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.r4.model.OperationDefinition.OperationKind src) throws FHIRException { if (src == null) return null; switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.STOPPED; - default: return org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus.NULL; + case OPERATION: return org.hl7.fhir.instance.model.OperationDefinition.OperationKind.OPERATION; + case QUERY: return org.hl7.fhir.instance.model.OperationDefinition.OperationKind.QUERY; + default: return org.hl7.fhir.instance.model.OperationDefinition.OperationKind.NULL; } } - public org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException { + public org.hl7.fhir.r4.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.instance.model.OperationOutcome src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.OperationOutcome tgt = new org.hl7.fhir.r4.model.OperationOutcome(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent t : src.getIssue()) + tgt.addIssue(convertOperationOutcomeIssueComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.r4.model.OperationOutcome src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.OperationOutcome tgt = new org.hl7.fhir.instance.model.OperationOutcome(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent t : src.getIssue()) + tgt.addIssue(convertOperationOutcomeIssueComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent(); + copyElement(src, tgt); + tgt.setSeverity(convertIssueSeverity(src.getSeverity())); + tgt.setCode(convertIssueType(src.getCode())); + tgt.setDetails(convertCodeableConcept(src.getDetails())); + tgt.setDiagnostics(src.getDiagnostics()); + for (org.hl7.fhir.instance.model.StringType t : src.getLocation()) + tgt.addLocation(t.getValue()); + return tgt; + } + + public org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent(); + copyElement(src, tgt); + tgt.setSeverity(convertIssueSeverity(src.getSeverity())); + tgt.setCode(convertIssueType(src.getCode())); + tgt.setDetails(convertCodeableConcept(src.getDetails())); + tgt.setDiagnostics(src.getDiagnostics()); + for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) + tgt.addLocation(t.getValue()); + return tgt; + } + + public org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse src) throws FHIRException { if (src == null) return null; switch (src) { - case INPROGRESS: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.STOPPED; - default: return org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseStatus.NULL; + case IN: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.IN; + case OUT: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.OUT; + default: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.NULL; } } - public org.hl7.fhir.r4.model.Dosage convertMedicationDispenseDosageInstructionComponent(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent src) throws FHIRException { + public org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case IN: return org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse.IN; + case OUT: return org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse.OUT; + default: return org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse.NULL; + } + } + + public org.hl7.fhir.r4.model.Organization convertOrganization(org.hl7.fhir.instance.model.Organization src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); - copyElement(src, tgt); - tgt.setText(src.getText()); -// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); - tgt.setTiming(convertTiming(src.getTiming())); - tgt.setAsNeeded(convertType(src.getAsNeeded())); - if (src.hasSiteCodeableConcept()) - tgt.setSite(convertCodeableConcept(src.getSiteCodeableConcept())); - tgt.setRoute(convertCodeableConcept(src.getRoute())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - tgt.setDose(convertType(src.getDose())); - tgt.setRate(convertType(src.getRate())); - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + org.hl7.fhir.r4.model.Organization tgt = new org.hl7.fhir.r4.model.Organization(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setActive(src.getActive()); + tgt.addType(convertCodeableConcept(src.getType())); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + for (org.hl7.fhir.instance.model.Address t : src.getAddress()) + tgt.addAddress(convertAddress(t)); + tgt.setPartOf(convertReference(src.getPartOf())); + for (org.hl7.fhir.instance.model.Organization.OrganizationContactComponent t : src.getContact()) + tgt.addContact(convertOrganizationContactComponent(t)); return tgt; } - public org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent convertMedicationDispenseDosageInstructionComponent(Dosage src) throws FHIRException { + public org.hl7.fhir.instance.model.Organization convertOrganization(org.hl7.fhir.r4.model.Organization src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent tgt = new org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseDosageInstructionComponent(); - copyElement(src, tgt); - tgt.setText(src.getText()); -// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); - tgt.setTiming(convertTiming(src.getTiming())); - tgt.setAsNeeded(convertType(src.getAsNeeded())); - tgt.setSite(convertType(src.getSite())); - tgt.setRoute(convertCodeableConcept(src.getRoute())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - tgt.setDose(convertType(src.getDose())); - tgt.setRate(convertType(src.getRate())); - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + org.hl7.fhir.instance.model.Organization tgt = new org.hl7.fhir.instance.model.Organization(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setActive(src.getActive()); + tgt.setType(convertCodeableConcept(src.getTypeFirstRep())); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + for (org.hl7.fhir.r4.model.Address t : src.getAddress()) + tgt.addAddress(convertAddress(t)); + tgt.setPartOf(convertReference(src.getPartOf())); + for (org.hl7.fhir.r4.model.Organization.OrganizationContactComponent t : src.getContact()) + tgt.addContact(convertOrganizationContactComponent(t)); return tgt; } - public org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { + public org.hl7.fhir.r4.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.instance.model.Organization.OrganizationContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); + org.hl7.fhir.r4.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r4.model.Organization.OrganizationContactComponent(); copyElement(src, tgt); - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getResponsibleParty()) - tgt.addResponsibleParty(convertReference(t)); + tgt.setPurpose(convertCodeableConcept(src.getPurpose())); + tgt.setName(convertHumanName(src.getName())); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + tgt.setAddress(convertAddress(src.getAddress())); return tgt; } - public org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { + public org.hl7.fhir.instance.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r4.model.Organization.OrganizationContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); + org.hl7.fhir.instance.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.instance.model.Organization.OrganizationContactComponent(); copyElement(src, tgt); - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getResponsibleParty()) - tgt.addResponsibleParty(convertReference(t)); + tgt.setPurpose(convertCodeableConcept(src.getPurpose())); + tgt.setName(convertHumanName(src.getName())); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + tgt.setAddress(convertAddress(src.getAddress())); + return tgt; + } + + public org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); + copyElement(src, tgt); + tgt.setProperty(src.getElement()); + tgt.setSystem(src.getCodeSystem()); + tgt.setCode(src.getCode()); return tgt; } @@ -8420,40 +8592,24 @@ public class VersionConvertor_10_40 { // } // } - public org.hl7.fhir.r4.model.Dosage convertMedicationOrderDosageInstructionComponent(org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent src) throws FHIRException { + public org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); + org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent(); copyElement(src, tgt); - tgt.setText(src.getText()); -// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); - tgt.setTiming(convertTiming(src.getTiming())); - tgt.setAsNeeded(convertType(src.getAsNeeded())); - if (src.hasSiteCodeableConcept()) - tgt.setSite(convertCodeableConcept(src.getSiteCodeableConcept())); - tgt.setRoute(convertCodeableConcept(src.getRoute())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - tgt.setDose(convertType(src.getDose())); - tgt.setRate(convertType(src.getRate())); - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + tgt.setElement(src.getProperty()); + tgt.setCodeSystem(src.getSystem()); + tgt.setCode(src.getCode()); return tgt; } - public org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent convertMedicationOrderDosageInstructionComponent(org.hl7.fhir.r4.model.Dosage src) throws FHIRException { + public org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.instance.model.Parameters src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent tgt = new org.hl7.fhir.instance.model.MedicationOrder.MedicationOrderDosageInstructionComponent(); - copyElement(src, tgt); - tgt.setText(src.getText()); -// tgt.setAdditionalInstructions(convertCodeableConcept(src.getAdditionalInstructions())); - tgt.setTiming(convertTiming(src.getTiming())); - tgt.setAsNeeded(convertType(src.getAsNeeded())); - tgt.setSite(convertType(src.getSite())); - tgt.setRoute(convertCodeableConcept(src.getRoute())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - tgt.setDose(convertType(src.getDose())); - tgt.setRate(convertType(src.getRate())); - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + org.hl7.fhir.r4.model.Parameters tgt = new org.hl7.fhir.r4.model.Parameters(); + copyResource(src, tgt); + for (org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent t : src.getParameter()) + tgt.addParameter(convertParametersParameterComponent(t)); return tgt; } @@ -8503,1003 +8659,114 @@ public class VersionConvertor_10_40 { // return tgt; // } - public org.hl7.fhir.r4.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.instance.model.MedicationStatement src) throws FHIRException { + public org.hl7.fhir.instance.model.Parameters convertParameters(org.hl7.fhir.r4.model.Parameters src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r4.model.MedicationStatement tgt = new org.hl7.fhir.r4.model.MedicationStatement(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertMedicationStatementStatus(src.getStatus())); - tgt.setMedication(convertType(src.getMedication())); - tgt.setSubject(convertReference(src.getPatient())); - tgt.setEffective(convertType(src.getEffective())); - tgt.setInformationSource(convertReference(src.getInformationSource())); - for (org.hl7.fhir.instance.model.Reference t : src.getSupportingInformation()) - tgt.addDerivedFrom(convertReference(t)); - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); -// tgt.getNotTakenElement().setValueAsString(src.getWasNotTaken() ? "Y" : "N"); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReasonNotTaken()) - tgt.addReasonNotTaken(convertCodeableConcept(t)); -// tgt.setReasonForUse(convertType(src.getReasonForUse())); - if (src.hasNote()) - tgt.addNote().setText(src.getNote()); - for (org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) - tgt.addDosage(convertMedicationStatementDosageComponent(t)); + org.hl7.fhir.instance.model.Parameters tgt = new org.hl7.fhir.instance.model.Parameters(); + copyResource(src, tgt); + for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getParameter()) + tgt.addParameter(convertParametersParameterComponent(t)); return tgt; } - public org.hl7.fhir.instance.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException { + public org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.instance.model.MedicationStatement tgt = new org.hl7.fhir.instance.model.MedicationStatement(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertMedicationStatementStatus(src.getStatus())); - tgt.setMedication(convertType(src.getMedication())); - tgt.setPatient(convertReference(src.getSubject())); - tgt.setEffective(convertType(src.getEffective())); - tgt.setInformationSource(convertReference(src.getInformationSource())); - for (org.hl7.fhir.r4.model.Reference t : src.getDerivedFrom()) - tgt.addSupportingInformation(convertReference(t)); - if (src.hasDateAsserted()) - tgt.setDateAsserted(src.getDateAsserted()); -// tgt.setWasNotTaken("Y".equals(src.getNotTakenElement().getValueAsString())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonNotTaken()) - tgt.addReasonNotTaken(convertCodeableConcept(t)); -// tgt.setReasonForUse(convertType(src.getReasonForUse())); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.setNote(t.getText()); - for (org.hl7.fhir.r4.model.Dosage t : src.getDosage()) - tgt.addDosage(convertMedicationStatementDosageComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR; - case INTENDED: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.INTENDED; - default: return org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR; - case INTENDED: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.INTENDED; - default: return org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Dosage convertMedicationStatementDosageComponent(org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); - copyElement(src, tgt); - tgt.setText(src.getText()); - tgt.setTiming(convertTiming(src.getTiming())); - tgt.setAsNeeded(convertType(src.getAsNeeded())); - if (src.hasSiteCodeableConcept()) - tgt.setSite(convertCodeableConcept(src.getSiteCodeableConcept())); - tgt.setRoute(convertCodeableConcept(src.getRoute())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); -// tgt.setQuantity(convertType(src.getQuantity())); - tgt.setRate(convertType(src.getRate())); - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); - return tgt; - } - - public org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent convertMedicationStatementDosageComponent(org.hl7.fhir.r4.model.Dosage src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent tgt = new org.hl7.fhir.instance.model.MedicationStatement.MedicationStatementDosageComponent(); - copyElement(src, tgt); - tgt.setText(src.getText()); - tgt.setTiming(convertTiming(src.getTiming())); - tgt.setAsNeeded(convertType(src.getAsNeeded())); - tgt.setSite(convertType(src.getSite())); - tgt.setRoute(convertCodeableConcept(src.getRoute())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); -// tgt.setQuantity(convertType(src.getQuantity())); - tgt.setRate(convertType(src.getRate())); - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); - return tgt; - } - - public org.hl7.fhir.r4.model.MessageHeader convertMessageHeader(org.hl7.fhir.instance.model.MessageHeader src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.MessageHeader tgt = new org.hl7.fhir.r4.model.MessageHeader(); - copyDomainResource(src, tgt); - tgt.setTimestamp(src.getTimestamp()); - tgt.setEvent(convertCoding(src.getEvent())); - tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse())); - tgt.setSource(convertMessageSourceComponent(src.getSource())); - for (org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) - tgt.addDestination(convertMessageDestinationComponent(t)); - tgt.setEnterer(convertReference(src.getEnterer())); - tgt.setAuthor(convertReference(src.getAuthor())); - tgt.setResponsible(convertReference(src.getResponsible())); - tgt.setReason(convertCodeableConcept(src.getReason())); - for (org.hl7.fhir.instance.model.Reference t : src.getData()) - tgt.addFocus(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.MessageHeader convertMessageHeader(org.hl7.fhir.r4.model.MessageHeader src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.MessageHeader tgt = new org.hl7.fhir.instance.model.MessageHeader(); - copyDomainResource(src, tgt); - tgt.setTimestamp(src.getTimestamp()); - tgt.setEvent(convertCoding(src.getEvent())); - tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse())); - tgt.setSource(convertMessageSourceComponent(src.getSource())); - for (org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) - tgt.addDestination(convertMessageDestinationComponent(t)); - tgt.setEnterer(convertReference(src.getEnterer())); - tgt.setAuthor(convertReference(src.getAuthor())); - tgt.setResponsible(convertReference(src.getResponsible())); - tgt.setReason(convertCodeableConcept(src.getReason())); - for (org.hl7.fhir.r4.model.Reference t : src.getFocus()) - tgt.addData(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); - copyElement(src, tgt); - tgt.setIdentifier(src.getIdentifier()); - tgt.setCode(convertResponseType(src.getCode())); - tgt.setDetails(convertReference(src.getDetails())); - return tgt; - } - - public org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.instance.model.MessageHeader.MessageHeaderResponseComponent(); - copyElement(src, tgt); - tgt.setIdentifier(src.getIdentifier()); - tgt.setCode(convertResponseType(src.getCode())); - tgt.setDetails(convertReference(src.getDetails())); - return tgt; - } - - public org.hl7.fhir.r4.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.instance.model.MessageHeader.ResponseType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OK: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.OK; - case TRANSIENTERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.TRANSIENTERROR; - case FATALERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.FATALERROR; - default: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.NULL; - } - } - - public org.hl7.fhir.instance.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.r4.model.MessageHeader.ResponseType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OK: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.OK; - case TRANSIENTERROR: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.TRANSIENTERROR; - case FATALERROR: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.FATALERROR; - default: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.NULL; - } - } - - public org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent(); + org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); copyElement(src, tgt); tgt.setName(src.getName()); - tgt.setSoftware(src.getSoftware()); - tgt.setVersion(src.getVersion()); - tgt.setContact(convertContactPoint(src.getContact())); - tgt.setEndpoint(src.getEndpoint()); - return tgt; - } - - public org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.instance.model.MessageHeader.MessageSourceComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setSoftware(src.getSoftware()); - tgt.setVersion(src.getVersion()); - tgt.setContact(convertContactPoint(src.getContact())); - tgt.setEndpoint(src.getEndpoint()); - return tgt; - } - - public org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setTarget(convertReference(src.getTarget())); - tgt.setEndpoint(src.getEndpoint()); - return tgt; - } - - public org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.instance.model.MessageHeader.MessageDestinationComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setTarget(convertReference(src.getTarget())); - tgt.setEndpoint(src.getEndpoint()); - return tgt; - } - - public org.hl7.fhir.r4.model.NamingSystem convertNamingSystem(org.hl7.fhir.instance.model.NamingSystem src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem(); - copyDomainResource(src, tgt); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - tgt.setKind(convertNamingSystemType(src.getKind())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) - tgt.addContact(convertNamingSystemContactComponent(t)); - tgt.setResponsible(src.getResponsible()); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgt.addJurisdiction(convertCodeableConcept(t)); - else - tgt.addUseContext(convertCodeableConceptToUsageContext(t)); - tgt.setUsage(src.getUsage()); - for (org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) - tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); - tgt.setReplacedBy(convertReference(src.getReplacedBy())); - return tgt; - } - - public org.hl7.fhir.instance.model.NamingSystem convertNamingSystem(org.hl7.fhir.r4.model.NamingSystem src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.NamingSystem tgt = new org.hl7.fhir.instance.model.NamingSystem(); - copyDomainResource(src, tgt); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - tgt.setKind(convertNamingSystemType(src.getKind())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertNamingSystemContactComponent(t)); - tgt.setResponsible(src.getResponsible()); - tgt.setType(convertCodeableConcept(src.getType())); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - if (t.hasValueCodeableConcept()) - tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addUseContext(convertCodeableConcept(t)); - tgt.setUsage(src.getUsage()); - for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) - tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); - tgt.setReplacedBy(convertReference(src.getReplacedBy())); - return tgt; - } - - public org.hl7.fhir.r4.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.instance.model.NamingSystem.NamingSystemType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CODESYSTEM: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.CODESYSTEM; - case IDENTIFIER: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.IDENTIFIER; - case ROOT: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.ROOT; - default: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemType.NULL; - } - } - - public org.hl7.fhir.instance.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.r4.model.NamingSystem.NamingSystemType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CODESYSTEM: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.CODESYSTEM; - case IDENTIFIER: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.IDENTIFIER; - case ROOT: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.ROOT; - default: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemType.NULL; - } - } - - public org.hl7.fhir.r4.model.ContactDetail convertNamingSystemContactComponent(org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent convertNamingSystemContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.instance.model.NamingSystem.NamingSystemContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent(); - copyElement(src, tgt); - tgt.setType(convertNamingSystemIdentifierType(src.getType())); - tgt.setValue(src.getValue()); - tgt.setPreferred(src.getPreferred()); - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent(); - copyElement(src, tgt); - tgt.setType(convertNamingSystemIdentifierType(src.getType())); - tgt.setValue(src.getValue()); - tgt.setPreferred(src.getPreferred()); - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OID; - case UUID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.UUID; - case URI: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.URI; - case OTHER: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OTHER; - default: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.NULL; - } - } - - public org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OID: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.OID; - case UUID: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.UUID; - case URI: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.URI; - case OTHER: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.OTHER; - default: return org.hl7.fhir.instance.model.NamingSystem.NamingSystemIdentifierType.NULL; - } - } - - public org.hl7.fhir.r4.model.Observation convertObservation(org.hl7.fhir.instance.model.Observation src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Observation tgt = new org.hl7.fhir.r4.model.Observation(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertObservationStatus(src.getStatus())); - tgt.addCategory(convertCodeableConcept(src.getCategory())); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setContext(convertReference(src.getEncounter())); - tgt.setEffective(convertType(src.getEffective())); - tgt.setIssued(src.getIssued()); - for (org.hl7.fhir.instance.model.Reference t : src.getPerformer()) - tgt.addPerformer(convertReference(t)); tgt.setValue(convertType(src.getValue())); - tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); - tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); - tgt.setComment(src.getComments()); - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - tgt.setSpecimen(convertReference(src.getSpecimen())); - tgt.setDevice(convertReference(src.getDevice())); - for (org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) - tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); - for (org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent t : src.getRelated()) - tgt.addRelated(convertObservationRelatedComponent(t)); - for (org.hl7.fhir.instance.model.Observation.ObservationComponentComponent t : src.getComponent()) - tgt.addComponent(convertObservationComponentComponent(t)); + tgt.setResource(convertResource(src.getResource())); + for (org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent t : src.getPart()) + tgt.addPart(convertParametersParameterComponent(t)); return tgt; } - public org.hl7.fhir.instance.model.Observation convertObservation(org.hl7.fhir.r4.model.Observation src) throws FHIRException { + public org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.instance.model.Observation tgt = new org.hl7.fhir.instance.model.Observation(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setStatus(convertObservationStatus(src.getStatus())); - for (org.hl7.fhir.r4.model.CodeableConcept c : src.getCategory()) - tgt.setCategory(convertCodeableConcept(c)); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setEncounter(convertReference(src.getContext())); - tgt.setEffective(convertType(src.getEffective())); - tgt.setIssued(src.getIssued()); - for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) - tgt.addPerformer(convertReference(t)); + org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.instance.model.Parameters.ParametersParameterComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); tgt.setValue(convertType(src.getValue())); - tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); - tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); - tgt.setComments(src.getComment()); - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - tgt.setSpecimen(convertReference(src.getSpecimen())); - tgt.setDevice(convertReference(src.getDevice())); - for (org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) - tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); - for (org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent t : src.getRelated()) - tgt.addRelated(convertObservationRelatedComponent(t)); - for (org.hl7.fhir.r4.model.Observation.ObservationComponentComponent t : src.getComponent()) - tgt.addComponent(convertObservationComponentComponent(t)); + tgt.setResource(convertResource(src.getResource())); + for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getPart()) + tgt.addPart(convertParametersParameterComponent(t)); return tgt; } - public org.hl7.fhir.r4.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.instance.model.Observation.ObservationStatus src) throws FHIRException { + public org.hl7.fhir.r4.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.instance.model.Appointment.ParticipantRequired src) throws FHIRException { if (src == null) return null; switch (src) { - case REGISTERED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.r4.model.Observation.ObservationStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.Observation.ObservationStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.AMENDED; - case CANCELLED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Observation.ObservationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Observation.ObservationStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Observation.ObservationStatus.NULL; + case REQUIRED: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.REQUIRED; + case OPTIONAL: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.OPTIONAL; + case INFORMATIONONLY: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.INFORMATIONONLY; + default: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.NULL; } } - public org.hl7.fhir.instance.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.r4.model.Observation.ObservationStatus src) throws FHIRException { + public org.hl7.fhir.instance.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.r4.model.Appointment.ParticipantRequired src) throws FHIRException { if (src == null) return null; switch (src) { - case REGISTERED: return org.hl7.fhir.instance.model.Observation.ObservationStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.instance.model.Observation.ObservationStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.instance.model.Observation.ObservationStatus.FINAL; - case AMENDED: return org.hl7.fhir.instance.model.Observation.ObservationStatus.AMENDED; - case CANCELLED: return org.hl7.fhir.instance.model.Observation.ObservationStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Observation.ObservationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.instance.model.Observation.ObservationStatus.UNKNOWN; - default: return org.hl7.fhir.instance.model.Observation.ObservationStatus.NULL; + case REQUIRED: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.REQUIRED; + case OPTIONAL: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.OPTIONAL; + case INFORMATIONONLY: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.INFORMATIONONLY; + default: return org.hl7.fhir.instance.model.Appointment.ParticipantRequired.NULL; } } - public org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent(); - copyElement(src, tgt); - tgt.setLow(convertSimpleQuantity(src.getLow())); - tgt.setHigh(convertSimpleQuantity(src.getHigh())); - tgt.setType(convertCodeableConcept(src.getMeaning())); - tgt.setAge(convertRange(src.getAge())); - tgt.setText(src.getText()); - return tgt; - } - - public org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent(); - copyElement(src, tgt); - tgt.setLow(convertSimpleQuantity(src.getLow())); - tgt.setHigh(convertSimpleQuantity(src.getHigh())); -// for (org.hl7.fhir.r4.model.CodeableConcept c : src.getMeaning()) - tgt.setMeaning(convertCodeableConcept(src.getType())); - tgt.setAge(convertRange(src.getAge())); - tgt.setText(src.getText()); - return tgt; - } - - public org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent(); - copyElement(src, tgt); - tgt.setType(convertObservationRelationshipType(src.getType())); - tgt.setTarget(convertReference(src.getTarget())); - return tgt; - } - - public org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.r4.model.Observation.ObservationRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationRelatedComponent(); - copyElement(src, tgt); - tgt.setType(convertObservationRelationshipType(src.getType())); - tgt.setTarget(convertReference(src.getTarget())); - return tgt; - } - - public org.hl7.fhir.r4.model.Observation.ObservationRelationshipType convertObservationRelationshipType(org.hl7.fhir.instance.model.Observation.ObservationRelationshipType src) throws FHIRException { + private org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus src) { if (src == null) return null; switch (src) { - case HASMEMBER: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.HASMEMBER; - case DERIVEDFROM: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.DERIVEDFROM; - case SEQUELTO: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.SEQUELTO; - case REPLACES: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.REPLACES; - case QUALIFIEDBY: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.QUALIFIEDBY; - case INTERFEREDBY: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.INTERFEREDBY; - default: return org.hl7.fhir.r4.model.Observation.ObservationRelationshipType.NULL; + case ACCEPTED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.TENTATIVE; + case INPROCESS: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; + case COMPLETED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; + case NEEDSACTION: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; + default: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NULL; } } - public org.hl7.fhir.instance.model.Observation.ObservationRelationshipType convertObservationRelationshipType(org.hl7.fhir.r4.model.Observation.ObservationRelationshipType src) throws FHIRException { + private org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus src) { if (src == null) return null; switch (src) { - case HASMEMBER: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.HASMEMBER; - case DERIVEDFROM: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.DERIVEDFROM; - case SEQUELTO: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.SEQUELTO; - case REPLACES: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.REPLACES; - case QUALIFIEDBY: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.QUALIFIEDBY; - case INTERFEREDBY: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.INTERFEREDBY; - default: return org.hl7.fhir.instance.model.Observation.ObservationRelationshipType.NULL; + case ACCEPTED: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; + default: return org.hl7.fhir.instance.model.AppointmentResponse.ParticipantStatus.NULL; } } - public org.hl7.fhir.r4.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.instance.model.Observation.ObservationComponentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationComponentComponent(); - copyElement(src, tgt); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setValue(convertType(src.getValue())); - tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); - for (org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) - tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.r4.model.Observation.ObservationComponentComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationComponentComponent(); - copyElement(src, tgt); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setValue(convertType(src.getValue())); - tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); - for (org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) - tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.instance.model.OperationDefinition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - tgt.setKind(convertOperationKind(src.getKind())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) - tgt.addContact(convertOperationDefinitionContactComponent(t)); - tgt.setDescription(src.getDescription()); - tgt.setPurpose(src.getRequirements()); - if (src.hasIdempotent()) - tgt.setIdempotent(src.getIdempotent()); - tgt.setCode(src.getCode()); - tgt.setComment(src.getNotes()); - tgt.setBase(convertReference(src.getBase())); - tgt.setSystem(src.getSystem()); - for (org.hl7.fhir.instance.model.CodeType t : src.getType()) - tgt.addResource(t.getValue()); - tgt.setType(tgt.hasResource()); - tgt.setInstance(src.getInstance()); - for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) - tgt.addParameter(convertOperationDefinitionParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.r4.model.OperationDefinition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.OperationDefinition tgt = new org.hl7.fhir.instance.model.OperationDefinition(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - tgt.setKind(convertOperationKind(src.getKind())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertOperationDefinitionContactComponent(t)); - tgt.setDescription(src.getDescription()); - tgt.setRequirements(src.getPurpose()); - tgt.setIdempotent(src.getIdempotent()); - tgt.setCode(src.getCode()); - tgt.setNotes(src.getComment()); - if (src.hasBase()) - tgt.setBase(convertReference(src.getBase())); - tgt.setSystem(src.getSystem()); - if (src.getType()) - for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) - tgt.addType(t.getValue()); - tgt.setInstance(src.getInstance()); - for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) - tgt.addParameter(convertOperationDefinitionParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.instance.model.OperationDefinition.OperationKind src) throws FHIRException { + public org.hl7.fhir.r4.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.instance.model.Appointment.ParticipationStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case OPERATION: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.OPERATION; - case QUERY: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.QUERY; - default: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.NULL; + case ACCEPTED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NEEDSACTION; + default: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NULL; } } - public org.hl7.fhir.instance.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.r4.model.OperationDefinition.OperationKind src) throws FHIRException { + public org.hl7.fhir.instance.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.r4.model.Appointment.ParticipationStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case OPERATION: return org.hl7.fhir.instance.model.OperationDefinition.OperationKind.OPERATION; - case QUERY: return org.hl7.fhir.instance.model.OperationDefinition.OperationKind.QUERY; - default: return org.hl7.fhir.instance.model.OperationDefinition.OperationKind.NULL; + case ACCEPTED: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.NEEDSACTION; + default: return org.hl7.fhir.instance.model.Appointment.ParticipationStatus.NULL; } } - public org.hl7.fhir.r4.model.ContactDetail convertOperationDefinitionContactComponent(org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent convertOperationDefinitionContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setUse(convertOperationParameterUse(src.getUse())); - tgt.setMin(src.getMin()); - tgt.setMax(src.getMax()); - tgt.setDocumentation(src.getDocumentation()); - tgt.setType(src.getType()); - tgt.setProfile(convertReference(src.getProfile())); - tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding())); - for (org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart()) - tgt.addPart(convertOperationDefinitionParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setUse(convertOperationParameterUse(src.getUse())); - tgt.setMin(src.getMin()); - tgt.setMax(src.getMax()); - tgt.setDocumentation(src.getDocumentation()); - if (src.hasSearchType()) { - tgt.setType(src.getSearchType().toCode()); - tgt.setType("string"); - } else - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - if (src.hasBinding()) - tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding())); - for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart()) - tgt.addPart(convertOperationDefinitionParameterComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case IN: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.IN; - case OUT: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.OUT; - default: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.NULL; - } - } - - public org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case IN: return org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse.IN; - case OUT: return org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse.OUT; - default: return org.hl7.fhir.instance.model.OperationDefinition.OperationParameterUse.NULL; - } - } - - public org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); - copyElement(src, tgt); - tgt.setStrength(convertBindingStrength(src.getStrength())); - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.instance.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); - copyElement(src, tgt); - tgt.setStrength(convertBindingStrength(src.getStrength())); - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.instance.model.OperationOutcome src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.OperationOutcome tgt = new org.hl7.fhir.r4.model.OperationOutcome(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent t : src.getIssue()) - tgt.addIssue(convertOperationOutcomeIssueComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.r4.model.OperationOutcome src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.OperationOutcome tgt = new org.hl7.fhir.instance.model.OperationOutcome(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent t : src.getIssue()) - tgt.addIssue(convertOperationOutcomeIssueComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent(); - copyElement(src, tgt); - tgt.setSeverity(convertIssueSeverity(src.getSeverity())); - tgt.setCode(convertIssueType(src.getCode())); - tgt.setDetails(convertCodeableConcept(src.getDetails())); - tgt.setDiagnostics(src.getDiagnostics()); - for (org.hl7.fhir.instance.model.StringType t : src.getLocation()) - tgt.addLocation(t.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.instance.model.OperationOutcome.OperationOutcomeIssueComponent(); - copyElement(src, tgt); - tgt.setSeverity(convertIssueSeverity(src.getSeverity())); - tgt.setCode(convertIssueType(src.getCode())); - tgt.setDetails(convertCodeableConcept(src.getDetails())); - tgt.setDiagnostics(src.getDiagnostics()); - for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) - tgt.addLocation(t.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case FATAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.FATAL; - case ERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.ERROR; - case WARNING: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.WARNING; - case INFORMATION: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.INFORMATION; - default: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.NULL; - } - } - - public org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case FATAL: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.FATAL; - case ERROR: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.ERROR; - case WARNING: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.WARNING; - case INFORMATION: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.INFORMATION; - default: return org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity.NULL; - } - } - - public org.hl7.fhir.r4.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.instance.model.OperationOutcome.IssueType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVALID; - case STRUCTURE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.STRUCTURE; - case REQUIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.REQUIRED; - case VALUE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.VALUE; - case INVARIANT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVARIANT; - case SECURITY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SECURITY; - case LOGIN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOGIN; - case UNKNOWN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.UNKNOWN; - case EXPIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXPIRED; - case FORBIDDEN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.FORBIDDEN; - case SUPPRESSED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SUPPRESSED; - case PROCESSING: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.PROCESSING; - case NOTSUPPORTED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTSUPPORTED; - case DUPLICATE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.DUPLICATE; - case NOTFOUND: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTFOUND; - case TOOLONG: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOLONG; - case CODEINVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CODEINVALID; - case EXTENSION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXTENSION; - case TOOCOSTLY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOCOSTLY; - case BUSINESSRULE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.BUSINESSRULE; - case CONFLICT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CONFLICT; - case INCOMPLETE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INCOMPLETE; - case TRANSIENT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TRANSIENT; - case LOCKERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOCKERROR; - case NOSTORE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOSTORE; - case EXCEPTION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXCEPTION; - case TIMEOUT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TIMEOUT; - case THROTTLED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.THROTTLED; - case INFORMATIONAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INFORMATIONAL; - default: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NULL; - } - } - - public org.hl7.fhir.instance.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.r4.model.OperationOutcome.IssueType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INVALID: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVALID; - case STRUCTURE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.STRUCTURE; - case REQUIRED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.REQUIRED; - case VALUE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.VALUE; - case INVARIANT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVARIANT; - case SECURITY: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.SECURITY; - case LOGIN: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.LOGIN; - case UNKNOWN: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.UNKNOWN; - case EXPIRED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.EXPIRED; - case FORBIDDEN: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.FORBIDDEN; - case SUPPRESSED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.SUPPRESSED; - case PROCESSING: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.PROCESSING; - case NOTSUPPORTED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NOTSUPPORTED; - case DUPLICATE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.DUPLICATE; - case NOTFOUND: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NOTFOUND; - case TOOLONG: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TOOLONG; - case CODEINVALID: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.CODEINVALID; - case EXTENSION: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.EXTENSION; - case TOOCOSTLY: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TOOCOSTLY; - case BUSINESSRULE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.BUSINESSRULE; - case CONFLICT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.CONFLICT; - case INCOMPLETE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INCOMPLETE; - case TRANSIENT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TRANSIENT; - case LOCKERROR: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.LOCKERROR; - case NOSTORE: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NOSTORE; - case EXCEPTION: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.EXCEPTION; - case TIMEOUT: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.TIMEOUT; - case THROTTLED: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.THROTTLED; - case INFORMATIONAL: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.INFORMATIONAL; - default: return org.hl7.fhir.instance.model.OperationOutcome.IssueType.NULL; - } - } - - - public org.hl7.fhir.r4.model.Organization convertOrganization(org.hl7.fhir.instance.model.Organization src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Organization tgt = new org.hl7.fhir.r4.model.Organization(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setActive(src.getActive()); - tgt.addType(convertCodeableConcept(src.getType())); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - for (org.hl7.fhir.instance.model.Address t : src.getAddress()) - tgt.addAddress(convertAddress(t)); - tgt.setPartOf(convertReference(src.getPartOf())); - for (org.hl7.fhir.instance.model.Organization.OrganizationContactComponent t : src.getContact()) - tgt.addContact(convertOrganizationContactComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Organization convertOrganization(org.hl7.fhir.r4.model.Organization src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Organization tgt = new org.hl7.fhir.instance.model.Organization(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setActive(src.getActive()); - tgt.setType(convertCodeableConcept(src.getTypeFirstRep())); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - for (org.hl7.fhir.r4.model.Address t : src.getAddress()) - tgt.addAddress(convertAddress(t)); - tgt.setPartOf(convertReference(src.getPartOf())); - for (org.hl7.fhir.r4.model.Organization.OrganizationContactComponent t : src.getContact()) - tgt.addContact(convertOrganizationContactComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.instance.model.Organization.OrganizationContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r4.model.Organization.OrganizationContactComponent(); - copyElement(src, tgt); - tgt.setPurpose(convertCodeableConcept(src.getPurpose())); - tgt.setName(convertHumanName(src.getName())); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - tgt.setAddress(convertAddress(src.getAddress())); - return tgt; - } - - public org.hl7.fhir.instance.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r4.model.Organization.OrganizationContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.instance.model.Organization.OrganizationContactComponent(); - copyElement(src, tgt); - tgt.setPurpose(convertCodeableConcept(src.getPurpose())); - tgt.setName(convertHumanName(src.getName())); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - tgt.setAddress(convertAddress(src.getAddress())); - return tgt; - } - - public org.hl7.fhir.r4.model.Patient convertPatient(org.hl7.fhir.instance.model.Patient src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -9568,62 +8835,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.instance.model.Patient.ContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Patient.ContactComponent tgt = new org.hl7.fhir.r4.model.Patient.ContactComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRelationship()) - tgt.addRelationship(convertCodeableConcept(t)); - tgt.setName(convertHumanName(src.getName())); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - tgt.setAddress(convertAddress(src.getAddress())); - tgt.setGender(convertAdministrativeGender(src.getGender())); - tgt.setOrganization(convertReference(src.getOrganization())); - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public org.hl7.fhir.instance.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.r4.model.Patient.ContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Patient.ContactComponent tgt = new org.hl7.fhir.instance.model.Patient.ContactComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRelationship()) - tgt.addRelationship(convertCodeableConcept(t)); - tgt.setName(convertHumanName(src.getName())); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - tgt.setAddress(convertAddress(src.getAddress())); - tgt.setGender(convertAdministrativeGender(src.getGender())); - tgt.setOrganization(convertReference(src.getOrganization())); - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public org.hl7.fhir.r4.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.instance.model.Patient.AnimalComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Patient.AnimalComponent tgt = new org.hl7.fhir.r4.model.Patient.AnimalComponent(); - copyElement(src, tgt); - tgt.setSpecies(convertCodeableConcept(src.getSpecies())); - tgt.setBreed(convertCodeableConcept(src.getBreed())); - tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); - return tgt; - } - - public org.hl7.fhir.instance.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.r4.model.Patient.AnimalComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Patient.AnimalComponent tgt = new org.hl7.fhir.instance.model.Patient.AnimalComponent(); - copyElement(src, tgt); - tgt.setSpecies(convertCodeableConcept(src.getSpecies())); - tgt.setBreed(convertCodeableConcept(src.getBreed())); - tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); - return tgt; - } - public org.hl7.fhir.r4.model.Patient.PatientCommunicationComponent convertPatientCommunicationComponent(org.hl7.fhir.instance.model.Patient.PatientCommunicationComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -9664,30 +8875,26 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Patient.LinkType convertLinkType(org.hl7.fhir.instance.model.Patient.LinkType src) throws FHIRException { - if (src == null) + public org.hl7.fhir.r4.model.Period convertPeriod(org.hl7.fhir.instance.model.Period src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case REPLACE: return org.hl7.fhir.r4.model.Patient.LinkType.REPLACEDBY; - case REFER: return org.hl7.fhir.r4.model.Patient.LinkType.REFER; - case SEEALSO: return org.hl7.fhir.r4.model.Patient.LinkType.SEEALSO; - default: return org.hl7.fhir.r4.model.Patient.LinkType.NULL; - } + org.hl7.fhir.r4.model.Period tgt = new org.hl7.fhir.r4.model.Period(); + copyElement(src, tgt); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + return tgt; } - public org.hl7.fhir.instance.model.Patient.LinkType convertLinkType(org.hl7.fhir.r4.model.Patient.LinkType src) throws FHIRException { - if (src == null) + public org.hl7.fhir.instance.model.Period convertPeriod(org.hl7.fhir.r4.model.Period src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case REPLACEDBY: return org.hl7.fhir.instance.model.Patient.LinkType.REPLACE; - case REPLACES: return org.hl7.fhir.instance.model.Patient.LinkType.REPLACE; - case REFER: return org.hl7.fhir.instance.model.Patient.LinkType.REFER; - case SEEALSO: return org.hl7.fhir.instance.model.Patient.LinkType.SEEALSO; - default: return org.hl7.fhir.instance.model.Patient.LinkType.NULL; - } + org.hl7.fhir.instance.model.Period tgt = new org.hl7.fhir.instance.model.Period(); + copyElement(src, tgt); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + return tgt; } - public org.hl7.fhir.r4.model.Person convertPerson(org.hl7.fhir.instance.model.Person src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -9754,28 +8961,16 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LEVEL1: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL1; - case LEVEL2: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL2; - case LEVEL3: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL3; - case LEVEL4: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL4; - default: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.NULL; - } + public org.hl7.fhir.r4.model.PositiveIntType convertPositiveInt(org.hl7.fhir.instance.model.PositiveIntType src) throws FHIRException { + org.hl7.fhir.r4.model.PositiveIntType tgt = new org.hl7.fhir.r4.model.PositiveIntType(src.getValue()); + copyElement(src, tgt); + return tgt; } - public org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LEVEL1: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL1; - case LEVEL2: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL2; - case LEVEL3: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL3; - case LEVEL4: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.LEVEL4; - default: return org.hl7.fhir.instance.model.Person.IdentityAssuranceLevel.NULL; - } + public org.hl7.fhir.instance.model.PositiveIntType convertPositiveInt(org.hl7.fhir.r4.model.PositiveIntType src) throws FHIRException { + org.hl7.fhir.instance.model.PositiveIntType tgt = new org.hl7.fhir.instance.model.PositiveIntType(src.getValue()); + copyElement(src, tgt); + return tgt; } public org.hl7.fhir.r4.model.Practitioner convertPractitioner(org.hl7.fhir.instance.model.Practitioner src) throws FHIRException { @@ -9832,40 +9027,6 @@ public class VersionConvertor_10_40 { return tgt; } -// public org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent convertPractitionerPractitionerRoleComponent(org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent tgt = new org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent(); -// copyElement(src, tgt); -// tgt.setOrganization(convertReference(src.getManagingOrganization())); -// tgt.setCode(convertCodeableConcept(src.getRole())); -// for (org.hl7.fhir.instance.model.CodeableConcept t : src.getSpecialty()) -// tgt.addSpecialty(convertCodeableConcept(t)); -// tgt.setPeriod(convertPeriod(src.getPeriod())); -// for (org.hl7.fhir.instance.model.Reference t : src.getLocation()) -// tgt.addLocation(convertReference(t)); -// for (org.hl7.fhir.instance.model.Reference t : src.getHealthcareService()) -// tgt.addHealthcareService(convertReference(t)); -// return tgt; -// } - -// public org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent convertPractitionerPractitionerRoleComponent(org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent src) throws FHIRException { -// if (src == null || src.isEmpty()) -// return null; -// org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent tgt = new org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent(); -// copyElement(src, tgt); -// tgt.setManagingOrganization(convertReference(src.getOrganization())); -// tgt.setRole(convertCodeableConcept(src.getCode())); -// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialty()) -// tgt.addSpecialty(convertCodeableConcept(t)); -// tgt.setPeriod(convertPeriod(src.getPeriod())); -// for (org.hl7.fhir.r4.model.Reference t : src.getLocation()) -// tgt.addLocation(convertReference(t)); -// for (org.hl7.fhir.r4.model.Reference t : src.getHealthcareService()) -// tgt.addHealthcareService(convertReference(t)); -// return tgt; -// } - public org.hl7.fhir.r4.model.Practitioner.PractitionerQualificationComponent convertPractitionerQualificationComponent(org.hl7.fhir.instance.model.Practitioner.PractitionerQualificationComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -9892,6 +9053,32 @@ public class VersionConvertor_10_40 { return tgt; } + private org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.instance.model.CodeableConcept priority) { + for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) + return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE; + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) + return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT; + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) + return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT; + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) + return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP; + } + return null; + } + + private org.hl7.fhir.instance.model.CodeableConcept convertPriorityCode(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority priority) { + org.hl7.fhir.instance.model.CodeableConcept cc = new org.hl7.fhir.instance.model.CodeableConcept(); + switch (priority) { + case ROUTINE: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("routine"); break; + case URGENT: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("urgent"); break; + case STAT: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("stat"); break; + case ASAP: cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("asap"); break; + default: return null; + } + return cc; + } + public org.hl7.fhir.r4.model.Procedure convertProcedure(org.hl7.fhir.instance.model.Procedure src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -9968,28 +9155,24 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.instance.model.Procedure.ProcedureStatus src) throws FHIRException { - if (src == null) + public org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.INPROGRESS; - case ABORTED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ABORTED; - case COMPLETED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.NULL; - } + org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent(); + copyElement(src, tgt); + tgt.setAction(convertCodeableConcept(src.getAction())); + tgt.setManipulated(convertReference(src.getManipulated())); + return tgt; } - public org.hl7.fhir.instance.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.r4.model.Procedure.ProcedureStatus src) throws FHIRException { - if (src == null) + public org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.INPROGRESS; - case ABORTED: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.ABORTED; - case COMPLETED: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.NULL; - } + org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent(); + copyElement(src, tgt); + tgt.setAction(convertCodeableConcept(src.getAction())); + tgt.setManipulated(convertReference(src.getManipulated())); + return tgt; } public org.hl7.fhir.r4.model.Procedure.ProcedurePerformerComponent convertProcedurePerformerComponent(org.hl7.fhir.instance.model.Procedure.ProcedurePerformerComponent src) throws FHIRException { @@ -10012,26 +9195,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent(); - copyElement(src, tgt); - tgt.setAction(convertCodeableConcept(src.getAction())); - tgt.setManipulated(convertReference(src.getManipulated())); - return tgt; - } - - public org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.instance.model.Procedure.ProcedureFocalDeviceComponent(); - copyElement(src, tgt); - tgt.setAction(convertCodeableConcept(src.getAction())); - tgt.setManipulated(convertReference(src.getManipulated())); - return tgt; - } - public org.hl7.fhir.r4.model.ProcedureRequest convertProcedureRequest(org.hl7.fhir.instance.model.ProcedureRequest src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10083,6 +9246,30 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority convertProcedureRequestPriority(org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ROUTINE: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.URGENT; + case STAT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.STAT; + case ASAP: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ASAP; + default: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.NULL; + } + } + + public org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority convertProcedureRequestPriority(org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ROUTINE: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.URGENT; + case STAT: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.STAT; + case ASAP: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.ASAP; + default: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.NULL; + } + } + public org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException { if (src == null) return null; @@ -10119,73 +9306,48 @@ public class VersionConvertor_10_40 { } } - public org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority convertProcedureRequestPriority(org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority src) throws FHIRException { + public org.hl7.fhir.r4.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.instance.model.Procedure.ProcedureStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case ROUTINE: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.URGENT; - case STAT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.STAT; - case ASAP: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ASAP; - default: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.NULL; + case INPROGRESS: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.INPROGRESS; + case ABORTED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ABORTED; + case COMPLETED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.NULL; } } - public org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority convertProcedureRequestPriority(org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority src) throws FHIRException { + public org.hl7.fhir.instance.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.r4.model.Procedure.ProcedureStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case ROUTINE: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.URGENT; - case STAT: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.STAT; - case ASAP: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.ASAP; - default: return org.hl7.fhir.instance.model.ProcedureRequest.ProcedureRequestPriority.NULL; + case INPROGRESS: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.INPROGRESS; + case ABORTED: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.ABORTED; + case COMPLETED: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.ENTEREDINERROR; + default: return org.hl7.fhir.instance.model.Procedure.ProcedureStatus.NULL; } } - - public org.hl7.fhir.r4.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.instance.model.ProcessRequest.ActionList src) throws FHIRException { + public org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { if (src == null) return null; switch (src) { - case CANCEL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.CANCEL; - case POLL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.POLL; - case REPROCESS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.REPROCESS; - case STATUS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.STATUS; - default: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.NULL; + case XMLATTR: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XMLATTR; + default: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.NULL; } } - public org.hl7.fhir.instance.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.r4.model.ProcessRequest.ActionList src) throws FHIRException { + public org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { if (src == null) return null; switch (src) { - case CANCEL: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.CANCEL; - case POLL: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.POLL; - case REPROCESS: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.REPROCESS; - case STATUS: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.STATUS; - default: return org.hl7.fhir.instance.model.ProcessRequest.ActionList.NULL; + case XMLATTR: return org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation.XMLATTR; + default: return org.hl7.fhir.instance.model.ElementDefinition.PropertyRepresentation.NULL; } } - public org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent(); - copyElement(src, tgt); - tgt.setSequenceLinkId(src.getSequenceLinkId()); - return tgt; - } - - public org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.instance.model.ProcessRequest.ItemsComponent(); - copyElement(src, tgt); - tgt.setSequenceLinkId(src.getSequenceLinkId()); - return tgt; - } - public org.hl7.fhir.r4.model.Provenance convertProvenance(org.hl7.fhir.instance.model.Provenance src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10193,13 +9355,7 @@ public class VersionConvertor_10_40 { copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Reference t : src.getTarget()) tgt.addTarget(convertReference(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setRecorded(src.getRecorded()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) - for (org.hl7.fhir.instance.model.Coding tc : t.getCoding()) - tgt.addReason(convertCoding(tc)); - for (org.hl7.fhir.instance.model.Coding t : src.getActivity().getCoding()) - tgt.setActivity(convertCoding(t)); tgt.setLocation(convertReference(src.getLocation())); for (org.hl7.fhir.instance.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); @@ -10219,11 +9375,7 @@ public class VersionConvertor_10_40 { copyDomainResource(src, tgt); for (org.hl7.fhir.r4.model.Reference t : src.getTarget()) tgt.addTarget(convertReference(t)); - tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setRecorded(src.getRecorded()); - for (org.hl7.fhir.r4.model.Coding t : src.getReason()) - tgt.addReason().addCoding(convertCoding(t)); - tgt.setActivity(new org.hl7.fhir.instance.model.CodeableConcept().addCoding(convertCoding(src.getActivity()))); tgt.setLocation(convertReference(src.getLocation())); for (org.hl7.fhir.r4.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); @@ -10306,6 +9458,56 @@ public class VersionConvertor_10_40 { } } + public org.hl7.fhir.r4.model.Quantity convertQuantity(org.hl7.fhir.instance.model.Quantity src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Quantity tgt = new org.hl7.fhir.r4.model.Quantity(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.Quantity convertQuantity(org.hl7.fhir.r4.model.Quantity src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Quantity tgt = new org.hl7.fhir.instance.model.Quantity(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.r4.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.instance.model.Quantity.QuantityComparator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LESS_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_THAN; + case LESS_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_OR_EQUAL; + case GREATER_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; + case GREATER_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_THAN; + default: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.NULL; + } + } + + public org.hl7.fhir.instance.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.r4.model.Quantity.QuantityComparator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LESS_THAN: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.LESS_THAN; + case LESS_OR_EQUAL: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.LESS_OR_EQUAL; + case GREATER_OR_EQUAL: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; + case GREATER_THAN: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.GREATER_THAN; + default: return org.hl7.fhir.instance.model.Quantity.QuantityComparator.NULL; + } + } + public org.hl7.fhir.r4.model.Questionnaire convertQuestionnaire(org.hl7.fhir.instance.model.Questionnaire src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10368,48 +9570,6 @@ public class VersionConvertor_10_40 { tgt.addTelecom(convertContactPoint(src)); return tgt; } - - private static org.hl7.fhir.r4.model.Enumerations.PublicationStatus convertQuestionnaireStatus(org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT; - case PUBLISHED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE; - case RETIRED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED; - default: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL; - } - } - - private static org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus convertQuestionnaireStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.PUBLISHED; - case RETIRED: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.RETIRED; - default: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireQuestionComponent(org.hl7.fhir.instance.model.Questionnaire.QuestionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); - copyElement(src, tgt); - tgt.setLinkId(src.getLinkId()); - for (org.hl7.fhir.instance.model.Coding t : src.getConcept()) - tgt.addCode(convertCoding(t)); - tgt.setText(src.getText()); - tgt.setType(convertQuestionnaireQuestionType(src.getType())); - tgt.setRequired(src.getRequired()); - tgt.setRepeats(src.getRepeats()); - tgt.setOptions(convertReference(src.getOptions())); - for (org.hl7.fhir.instance.model.Coding t : src.getOption()) - tgt.addOption().setValue(convertCoding(t)); - for (org.hl7.fhir.instance.model.Questionnaire.GroupComponent t : src.getGroup()) - tgt.addItem(convertQuestionnaireGroupComponent(t)); - return tgt; - } public org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireGroupComponent(org.hl7.fhir.instance.model.Questionnaire.GroupComponent src) throws FHIRException { if (src == null || src.isEmpty()) @@ -10449,6 +9609,76 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent convertQuestionnaireItemToGroup(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent(); + copyElement(src, tgt); + tgt.setLinkId(src.getLinkId()); + tgt.setText(src.getText()); + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) + if (t.hasAnswer()) + tgt.addQuestion(convertQuestionnaireItemToQuestion(t)); + else + tgt.addGroup(convertQuestionnaireItemToGroup(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent convertQuestionnaireItemToQuestion(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent(); + copyElement(src, tgt); + tgt.setLinkId(src.getLinkId()); + tgt.setText(src.getText()); + for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) + tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Questionnaire.AnswerFormat convertQuestionnaireItemType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BOOLEAN: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.BOOLEAN; + case DECIMAL: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.DECIMAL; + case INTEGER: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.INTEGER; + case DATE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.DATE; + case DATETIME: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.DATETIME; + case TIME: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.TIME; + case STRING: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.STRING; + case TEXT: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.TEXT; + case URL: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.URL; + case CHOICE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.CHOICE; + case OPENCHOICE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.OPENCHOICE; + case ATTACHMENT: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.ATTACHMENT; + case REFERENCE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.REFERENCE; + case QUANTITY: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.QUANTITY; + default: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.NULL; + } + } + + public org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireQuestionComponent(org.hl7.fhir.instance.model.Questionnaire.QuestionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); + copyElement(src, tgt); + tgt.setLinkId(src.getLinkId()); + for (org.hl7.fhir.instance.model.Coding t : src.getConcept()) + tgt.addCode(convertCoding(t)); + tgt.setText(src.getText()); + tgt.setType(convertQuestionnaireQuestionType(src.getType())); + tgt.setRequired(src.getRequired()); + tgt.setRepeats(src.getRepeats()); + tgt.setOptions(convertReference(src.getOptions())); + for (org.hl7.fhir.instance.model.Coding t : src.getOption()) + tgt.addOption().setValue(convertCoding(t)); + for (org.hl7.fhir.instance.model.Questionnaire.GroupComponent t : src.getGroup()) + tgt.addItem(convertQuestionnaireGroupComponent(t)); + return tgt; + } + public org.hl7.fhir.instance.model.Questionnaire.QuestionComponent convertQuestionnaireQuestionComponent(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10497,28 +9727,6 @@ public class VersionConvertor_10_40 { } } - public org.hl7.fhir.instance.model.Questionnaire.AnswerFormat convertQuestionnaireItemType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BOOLEAN: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.BOOLEAN; - case DECIMAL: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.DECIMAL; - case INTEGER: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.INTEGER; - case DATE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.DATE; - case DATETIME: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.DATETIME; - case TIME: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.TIME; - case STRING: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.STRING; - case TEXT: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.TEXT; - case URL: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.URL; - case CHOICE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.CHOICE; - case OPENCHOICE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.OPENCHOICE; - case ATTACHMENT: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.ATTACHMENT; - case REFERENCE: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.REFERENCE; - case QUANTITY: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.QUANTITY; - default: return org.hl7.fhir.instance.model.Questionnaire.AnswerFormat.NULL; - } - } - public org.hl7.fhir.r4.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.instance.model.QuestionnaireResponse src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10558,29 +9766,6 @@ public class VersionConvertor_10_40 { return tgt; } - - public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; - case AMENDED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; - default: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; - case AMENDED: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; - default: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; - } - } - public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseGroupComponent(org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10596,46 +9781,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseQuestionComponent(org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); - copyElement(src, tgt); - tgt.setLinkId(src.getLinkId()); - tgt.setText(src.getText()); - for (org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) - tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent convertQuestionnaireItemToGroup(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent(); - copyElement(src, tgt); - tgt.setLinkId(src.getLinkId()); - tgt.setText(src.getText()); - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) - if (t.hasAnswer()) - tgt.addQuestion(convertQuestionnaireItemToQuestion(t)); - else - tgt.addGroup(convertQuestionnaireItemToGroup(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent convertQuestionnaireItemToQuestion(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent(); - copyElement(src, tgt); - tgt.setLinkId(src.getLinkId()); - tgt.setText(src.getText()); - for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) - tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); - return tgt; - } - public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionAnswerComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10658,6 +9803,148 @@ public class VersionConvertor_10_40 { return tgt; } + public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseQuestionComponent(org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); + copyElement(src, tgt); + tgt.setLinkId(src.getLinkId()); + tgt.setText(src.getText()); + for (org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) + tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; + case AMENDED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; + default: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; + case AMENDED: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; + default: return org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Range convertRange(org.hl7.fhir.instance.model.Range src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Range tgt = new org.hl7.fhir.r4.model.Range(); + copyElement(src, tgt); + tgt.setLow(convertSimpleQuantity(src.getLow())); + tgt.setHigh(convertSimpleQuantity(src.getHigh())); + return tgt; + } + + public org.hl7.fhir.instance.model.Range convertRange(org.hl7.fhir.r4.model.Range src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Range tgt = new org.hl7.fhir.instance.model.Range(); + copyElement(src, tgt); + tgt.setLow(convertSimpleQuantity(src.getLow())); + tgt.setHigh(convertSimpleQuantity(src.getHigh())); + return tgt; + } + + public org.hl7.fhir.r4.model.Ratio convertRatio(org.hl7.fhir.instance.model.Ratio src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Ratio tgt = new org.hl7.fhir.r4.model.Ratio(); + copyElement(src, tgt); + tgt.setNumerator(convertQuantity(src.getNumerator())); + tgt.setDenominator(convertQuantity(src.getDenominator())); + return tgt; + } + + public org.hl7.fhir.instance.model.Ratio convertRatio(org.hl7.fhir.r4.model.Ratio src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Ratio tgt = new org.hl7.fhir.instance.model.Ratio(); + copyElement(src, tgt); + tgt.setNumerator(convertQuantity(src.getNumerator())); + tgt.setDenominator(convertQuantity(src.getDenominator())); + return tgt; + } + + public org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.instance.model.Reference src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); + copyElement(src, tgt); + tgt.setReference(src.getReference()); + tgt.setDisplay(src.getDisplay()); + return tgt; + } + + public org.hl7.fhir.instance.model.Reference convertReference(org.hl7.fhir.r4.model.Reference src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Reference tgt = new org.hl7.fhir.instance.model.Reference(); + copyElement(src, tgt); + tgt.setReference(src.getReference()); + tgt.setDisplay(src.getDisplay()); + return tgt; + } + +// public org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent convertPractitionerPractitionerRoleComponent(org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent tgt = new org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent(); +// copyElement(src, tgt); +// tgt.setOrganization(convertReference(src.getManagingOrganization())); +// tgt.setCode(convertCodeableConcept(src.getRole())); +// for (org.hl7.fhir.instance.model.CodeableConcept t : src.getSpecialty()) +// tgt.addSpecialty(convertCodeableConcept(t)); +// tgt.setPeriod(convertPeriod(src.getPeriod())); +// for (org.hl7.fhir.instance.model.Reference t : src.getLocation()) +// tgt.addLocation(convertReference(t)); +// for (org.hl7.fhir.instance.model.Reference t : src.getHealthcareService()) +// tgt.addHealthcareService(convertReference(t)); +// return tgt; +// } + +// public org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent convertPractitionerPractitionerRoleComponent(org.hl7.fhir.r4.model.Practitioner.PractitionerRoleComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent tgt = new org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent(); +// copyElement(src, tgt); +// tgt.setManagingOrganization(convertReference(src.getOrganization())); +// tgt.setRole(convertCodeableConcept(src.getCode())); +// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialty()) +// tgt.addSpecialty(convertCodeableConcept(t)); +// tgt.setPeriod(convertPeriod(src.getPeriod())); +// for (org.hl7.fhir.r4.model.Reference t : src.getLocation()) +// tgt.addLocation(convertReference(t)); +// for (org.hl7.fhir.r4.model.Reference t : src.getHealthcareService()) +// tgt.addHealthcareService(convertReference(t)); +// return tgt; +// } + + private org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority convertReferralPriorityCode(CodeableConcept priority) { + for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) + return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) + return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.URGENT; + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) + return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.STAT; + if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) + return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ASAP; + } + return null; + } + public org.hl7.fhir.r4.model.ProcedureRequest convertReferralRequest(org.hl7.fhir.instance.model.ReferralRequest src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -10678,21 +9965,6 @@ public class VersionConvertor_10_40 { return tgt; } - private org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority convertReferralPriorityCode(CodeableConcept priority) { - for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) - return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) - return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.URGENT; - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) - return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.STAT; - if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) - return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ASAP; - } - return null; - } - - public org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus convertReferralStatus(org.hl7.fhir.instance.model.ReferralRequest.ReferralStatus src) throws FHIRException { if (src == null) return null; @@ -10753,1998 +10025,6 @@ public class VersionConvertor_10_40 { return tgt; } - public org.hl7.fhir.r4.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.instance.model.RiskAssessment src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.RiskAssessment tgt = new org.hl7.fhir.r4.model.RiskAssessment(); - copyDomainResource(src, tgt); - tgt.setSubject(convertReference(src.getSubject())); -// tgt.setDate(src.getDate()); - tgt.setCondition(convertReference(src.getCondition())); - tgt.setContext(convertReference(src.getEncounter())); - tgt.setPerformer(convertReference(src.getPerformer())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - for (org.hl7.fhir.instance.model.Reference t : src.getBasis()) - tgt.addBasis(convertReference(t)); - for (org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) - tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); - tgt.setMitigation(src.getMitigation()); - return tgt; - } - - public org.hl7.fhir.instance.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.r4.model.RiskAssessment src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.RiskAssessment tgt = new org.hl7.fhir.instance.model.RiskAssessment(); - copyDomainResource(src, tgt); - tgt.setSubject(convertReference(src.getSubject())); -// tgt.setDateElement(src.getOccurrenceDateTimeType()); - tgt.setCondition(convertReference(src.getCondition())); - tgt.setEncounter(convertReference(src.getContext())); - tgt.setPerformer(convertReference(src.getPerformer())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setMethod(convertCodeableConcept(src.getMethod())); - for (org.hl7.fhir.r4.model.Reference t : src.getBasis()) - tgt.addBasis(convertReference(t)); - for (org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) - tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); - tgt.setMitigation(src.getMitigation()); - return tgt; - } - - public org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent tgt = new org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent(); - copyElement(src, tgt); - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - tgt.setProbability(convertType(src.getProbability())); - tgt.setRelativeRisk(src.getRelativeRisk()); - tgt.setWhen(convertType(src.getWhen())); - tgt.setRationale(src.getRationale()); - return tgt; - } - - public org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent tgt = new org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent(); - copyElement(src, tgt); - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - tgt.setProbability(convertType(src.getProbability())); - tgt.setRelativeRisk(src.getRelativeRisk()); - tgt.setWhen(convertType(src.getWhen())); - tgt.setRationale(src.getRationale()); - return tgt; - } - - public org.hl7.fhir.r4.model.Schedule convertSchedule(org.hl7.fhir.instance.model.Schedule src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Schedule tgt = new org.hl7.fhir.r4.model.Schedule(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getType()) - tgt.addServiceType(convertCodeableConcept(t)); - tgt.addActor(convertReference(src.getActor())); - tgt.setPlanningHorizon(convertPeriod(src.getPlanningHorizon())); - tgt.setComment(src.getComment()); - return tgt; - } - - public org.hl7.fhir.instance.model.Schedule convertSchedule(org.hl7.fhir.r4.model.Schedule src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Schedule tgt = new org.hl7.fhir.instance.model.Schedule(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) - tgt.addType(convertCodeableConcept(t)); - tgt.setActor(convertReference(src.getActorFirstRep())); - tgt.setPlanningHorizon(convertPeriod(src.getPlanningHorizon())); - tgt.setComment(src.getComment()); - return tgt; - } - - public org.hl7.fhir.r4.model.SearchParameter convertSearchParameter(org.hl7.fhir.instance.model.SearchParameter src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) - tgt.addContact(convertSearchParameterContactComponent(t)); - tgt.setPurpose(src.getRequirements()); - tgt.setCode(src.getCode()); - tgt.addBase(src.getBase()); - tgt.setType(convertSearchParamType(src.getType())); - tgt.setDescription(src.getDescription()); - tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); - tgt.setXpath(src.getXpath()); - tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); - for (org.hl7.fhir.instance.model.CodeType t : src.getTarget()) - tgt.addTarget(t.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.SearchParameter convertSearchParameter(org.hl7.fhir.r4.model.SearchParameter src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.SearchParameter tgt = new org.hl7.fhir.instance.model.SearchParameter(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertSearchParameterContactComponent(t)); - tgt.setRequirements(src.getPurpose()); - tgt.setCode(src.getCode()); - for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) - tgt.setBase(t.asStringValue()); - tgt.setType(convertSearchParamType(src.getType())); - tgt.setDescription(src.getDescription()); - org.hl7.fhir.instance.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); - tgt.setXpath(src.getXpath()); - tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); - for (org.hl7.fhir.r4.model.CodeType t : src.getTarget()) - tgt.addTarget(t.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.instance.model.SearchParameter.XPathUsageType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NORMAL: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL; - case PHONETIC: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.PHONETIC; - case NEARBY: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NEARBY; - case DISTANCE: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.DISTANCE; - case OTHER: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.OTHER; - default: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NULL; - } - } - - public org.hl7.fhir.instance.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NORMAL: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.NORMAL; - case PHONETIC: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.PHONETIC; - case NEARBY: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.NEARBY; - case DISTANCE: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.DISTANCE; - case OTHER: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.OTHER; - default: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.NULL; - } - } - - public org.hl7.fhir.r4.model.ContactDetail convertSearchParameterContactComponent(org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent convertSearchParameterContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Slot convertSlot(org.hl7.fhir.instance.model.Slot src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Slot tgt = new org.hl7.fhir.r4.model.Slot(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasType()) - tgt.addServiceType(convertCodeableConcept(src.getType())); - tgt.setSchedule(convertReference(src.getSchedule())); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - tgt.setOverbooked(src.getOverbooked()); - tgt.setComment(src.getComment()); - return tgt; - } - - public org.hl7.fhir.instance.model.Slot convertSlot(org.hl7.fhir.r4.model.Slot src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Slot tgt = new org.hl7.fhir.instance.model.Slot(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) - tgt.setType(convertCodeableConcept(t)); - tgt.setSchedule(convertReference(src.getSchedule())); - tgt.setStart(src.getStart()); - tgt.setEnd(src.getEnd()); - tgt.setOverbooked(src.getOverbooked()); - tgt.setComment(src.getComment()); - return tgt; - } - - public org.hl7.fhir.r4.model.Slot.SlotStatus convertSlotStatus(org.hl7.fhir.instance.model.Slot.SlotStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BUSY: return org.hl7.fhir.r4.model.Slot.SlotStatus.BUSY; - case FREE: return org.hl7.fhir.r4.model.Slot.SlotStatus.FREE; - case BUSYUNAVAILABLE: return org.hl7.fhir.r4.model.Slot.SlotStatus.BUSYUNAVAILABLE; - case BUSYTENTATIVE: return org.hl7.fhir.r4.model.Slot.SlotStatus.BUSYTENTATIVE; - default: return org.hl7.fhir.r4.model.Slot.SlotStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Slot.SlotStatus convertSlotStatus(org.hl7.fhir.r4.model.Slot.SlotStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BUSY: return org.hl7.fhir.instance.model.Slot.SlotStatus.BUSY; - case FREE: return org.hl7.fhir.instance.model.Slot.SlotStatus.FREE; - case BUSYUNAVAILABLE: return org.hl7.fhir.instance.model.Slot.SlotStatus.BUSYUNAVAILABLE; - case BUSYTENTATIVE: return org.hl7.fhir.instance.model.Slot.SlotStatus.BUSYTENTATIVE; - default: return org.hl7.fhir.instance.model.Slot.SlotStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.instance.model.StructureDefinition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setTitle(src.getDisplay()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) - tgt.addContact(convertStructureDefinitionContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgt.addJurisdiction(convertCodeableConcept(t)); - else - tgt.addUseContext(convertCodeableConceptToUsageContext(t)); - tgt.setPurpose(src.getRequirements()); - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.instance.model.Coding t : src.getCode()) - tgt.addKeyword(convertCoding(t)); - tgt.setFhirVersion(src.getFhirVersion()); - for (org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) - tgt.addMapping(convertStructureDefinitionMappingComponent(t)); - tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId())); - tgt.setAbstract(src.getAbstract()); - tgt.setContextType(convertExtensionContext(src.getContextType())); - for (org.hl7.fhir.instance.model.StringType t : src.getContext()) - tgt.addContext(t.getValue()); - if (src.hasConstrainedType()) - tgt.setType(src.getConstrainedType()); - else if (src.getSnapshot().hasElement()) - tgt.setType(src.getSnapshot().getElement().get(0).getPath()); - else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains(".")) - tgt.setType(src.getDifferential().getElement().get(0).getPath()); - else - tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); - tgt.setBaseDefinition(src.getBase()); - tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); - tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); - tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); - if (tgt.hasSnapshot()) - tgt.getSnapshot().getElementFirstRep().getType().clear(); - if (tgt.hasDifferential()) - tgt.getDifferential().getElementFirstRep().getType().clear(); - if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getId())) { - tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); - tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/"+tgt.getType()); -// for (ElementDefinition ed : tgt.getSnapshot().getElement()) { -// ed.setPath(ed.getPath().replace(tgt.getType()+".", tgt.getId()+".")); -// } -// for (ElementDefinition ed : tgt.getDifferential().getElement()) { -// ed.setPath(ed.getPath().replace(tgt.getType()+".", tgt.getId()+".")); -// } - tgt.setType(tgt.getId()); - } - return tgt; - } - - public org.hl7.fhir.instance.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.r4.model.StructureDefinition src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.StructureDefinition tgt = new org.hl7.fhir.instance.model.StructureDefinition(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setDisplay(src.getTitle()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertStructureDefinitionContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - if (t.hasValueCodeableConcept()) - tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addUseContext(convertCodeableConcept(t)); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) - tgt.addCode(convertCoding(t)); - tgt.setFhirVersion(src.getFhirVersion()); - for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) - tgt.addMapping(convertStructureDefinitionMappingComponent(t)); - tgt.setKind(convertStructureDefinitionKind(src.getKind())); - tgt.setAbstract(src.getAbstract()); - tgt.setContextType(convertExtensionContext(src.getContextType())); - for (org.hl7.fhir.r4.model.StringType t : src.getContext()) - tgt.addContext(t.getValue()); - tgt.setConstrainedType(src.getType()); - tgt.setBase(src.getBaseDefinition()); - tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); - tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); - if (tgt.hasBase()) { - if (tgt.hasDifferential()) - tgt.getDifferential().getElement().get(0).addType().setCode(tail(tgt.getBase())); - if (tgt.hasSnapshot()) - tgt.getSnapshot().getElement().get(0).addType().setCode(tail(tgt.getBase())); - } - return tgt; - } - - private String tail(String base) { - return base.substring(base.lastIndexOf("/")+1); - } - - public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind src, String dtName) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DATATYPE: - if (Utilities.existsInList(dtName, "boolean", "integer", "decimal", "base64Binary", "instant", "string", "uri", "date", "dateTime", "time", "code", "oid", "uuid", "id", "unsignedInt", "positiveInt", "markdown", "xhtml")) - return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE; - else - return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.COMPLEXTYPE; - case RESOURCE: return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.RESOURCE; - case LOGICAL: return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.LOGICAL; - default: return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.NULL; - } - } - - public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRIMITIVETYPE: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.DATATYPE; - case COMPLEXTYPE: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.DATATYPE; - case RESOURCE: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.RESOURCE; - case LOGICAL: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.LOGICAL; - default: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.NULL; - } - } - - public org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESOURCE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.RESOURCE; - case DATATYPE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.DATATYPE; - case EXTENSION: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.EXTENSION; - default: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.NULL; - } - } - - public org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESOURCE: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.RESOURCE; - case DATATYPE: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.DATATYPE; - case EXTENSION: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.EXTENSION; - default: return org.hl7.fhir.instance.model.StructureDefinition.ExtensionContext.NULL; - } - } - - public org.hl7.fhir.r4.model.ContactDetail convertStructureDefinitionContactComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent convertStructureDefinitionContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); - copyElement(src, tgt); - tgt.setIdentity(src.getIdentity()); - tgt.setUri(src.getUri()); - tgt.setName(src.getName()); - tgt.setComment(src.getComments()); - return tgt; - } - - public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent(); - copyElement(src, tgt); - tgt.setIdentity(src.getIdentity()); - tgt.setUri(src.getUri()); - tgt.setName(src.getName()); - tgt.setComments(src.getComment()); - return tgt; - } - - public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent(); - copyElement(src, tgt); - List slicePaths = new ArrayList(); - for (org.hl7.fhir.instance.model.ElementDefinition t : src.getElement()) { - if (t.hasSlicing()) - slicePaths.add(t.getPath()); - tgt.addElement(convertElementDefinition(t, slicePaths)); - } - return tgt; - } - - public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) - tgt.addElement(convertElementDefinition(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent(); - copyElement(src, tgt); - List slicePaths = new ArrayList(); - for (org.hl7.fhir.instance.model.ElementDefinition t : src.getElement()) { - if (t.hasSlicing()) - slicePaths.add(t.getPath()); - tgt.addElement(convertElementDefinition(t, slicePaths)); - } - return tgt; - } - - public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) - tgt.addElement(convertElementDefinition(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Subscription convertSubscription(org.hl7.fhir.instance.model.Subscription src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Subscription tgt = new org.hl7.fhir.r4.model.Subscription(); - copyDomainResource(src, tgt); - tgt.setCriteria(src.getCriteria()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - tgt.setReason(src.getReason()); - tgt.setStatus(convertSubscriptionStatus(src.getStatus())); - tgt.setError(src.getError()); - tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); - tgt.setEnd(src.getEnd()); - for (org.hl7.fhir.instance.model.Coding t : src.getTag()) - tgt.addTag(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Subscription convertSubscription(org.hl7.fhir.r4.model.Subscription src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Subscription tgt = new org.hl7.fhir.instance.model.Subscription(); - copyDomainResource(src, tgt); - tgt.setCriteria(src.getCriteria()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - tgt.setReason(src.getReason()); - tgt.setStatus(convertSubscriptionStatus(src.getStatus())); - tgt.setError(src.getError()); - tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); - tgt.setEnd(src.getEnd()); - for (org.hl7.fhir.r4.model.Coding t : src.getTag()) - tgt.addTag(convertCoding(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.instance.model.Subscription.SubscriptionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUESTED: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.REQUESTED; - case ACTIVE: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ACTIVE; - case ERROR: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ERROR; - case OFF: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.OFF; - default: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r4.model.Subscription.SubscriptionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUESTED: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.REQUESTED; - case ACTIVE: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.ACTIVE; - case ERROR: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.ERROR; - case OFF: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.OFF; - default: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent(); - copyElement(src, tgt); - tgt.setType(convertSubscriptionChannelType(src.getType())); - tgt.setEndpoint(src.getEndpoint()); - tgt.setPayload(src.getPayload()); - tgt.addHeader(src.getHeader()); - return tgt; - } - - public org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent(); - copyElement(src, tgt); - tgt.setType(convertSubscriptionChannelType(src.getType())); - tgt.setEndpoint(src.getEndpoint()); - tgt.setPayload(src.getPayload()); - if (src.hasHeader()) - tgt.setHeaderElement(convertString(src.getHeader().get(0))); - return tgt; - } - - public org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESTHOOK: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.RESTHOOK; - case WEBSOCKET: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.WEBSOCKET; - case EMAIL: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.EMAIL; - case SMS: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.SMS; - case MESSAGE: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.MESSAGE; - default: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.NULL; - } - } - - public org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESTHOOK: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.RESTHOOK; - case WEBSOCKET: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.WEBSOCKET; - case EMAIL: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.EMAIL; - case SMS: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.SMS; - case MESSAGE: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.MESSAGE; - default: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.NULL; - } - } - - public org.hl7.fhir.r4.model.Substance convertSubstance(org.hl7.fhir.instance.model.Substance src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Substance tgt = new org.hl7.fhir.r4.model.Substance(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCategory()) - tgt.addCategory(convertCodeableConcept(t)); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent t : src.getInstance()) - tgt.addInstance(convertSubstanceInstanceComponent(t)); - for (org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) - tgt.addIngredient(convertSubstanceIngredientComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.Substance convertSubstance(org.hl7.fhir.r4.model.Substance src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Substance tgt = new org.hl7.fhir.instance.model.Substance(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) - tgt.addCategory(convertCodeableConcept(t)); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) - tgt.addInstance(convertSubstanceInstanceComponent(t)); - for (org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) - tgt.addIngredient(convertSubstanceIngredientComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent tgt = new org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setExpiry(src.getExpiry()); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - return tgt; - } - - public org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent tgt = new org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent(); - copyElement(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setExpiry(src.getExpiry()); - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - return tgt; - } - - public org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent(); - copyElement(src, tgt); - tgt.setQuantity(convertRatio(src.getQuantity())); - tgt.setSubstance(convertReference(src.getSubstance())); - return tgt; - } - - public org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent(); - copyElement(src, tgt); - tgt.setQuantity(convertRatio(src.getQuantity())); -// tgt.setSubstance(convertReference(src.getSubstance())); - return tgt; - } - - public org.hl7.fhir.r4.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.instance.model.SupplyDelivery src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.SupplyDelivery tgt = new org.hl7.fhir.r4.model.SupplyDelivery(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setStatus(convertSupplyDeliveryStatus(src.getStatus())); - tgt.setPatient(convertReference(src.getPatient())); - tgt.setType(convertCodeableConcept(src.getType())); -// tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); -// tgt.setSuppliedItem(convertReference(src.getSuppliedItem())); - tgt.setSupplier(convertReference(src.getSupplier())); -// tgt.setWhenPrepared(convertPeriod(src.getWhenPrepared())); -// tgt.setTime(src.getTime()); - tgt.setDestination(convertReference(src.getDestination())); - for (org.hl7.fhir.instance.model.Reference t : src.getReceiver()) - tgt.addReceiver(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.r4.model.SupplyDelivery src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.SupplyDelivery tgt = new org.hl7.fhir.instance.model.SupplyDelivery(); - copyDomainResource(src, tgt); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setStatus(convertSupplyDeliveryStatus(src.getStatus())); - tgt.setPatient(convertReference(src.getPatient())); - tgt.setType(convertCodeableConcept(src.getType())); -// tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); -// tgt.setSuppliedItem(convertReference(src.getSuppliedItem())); - tgt.setSupplier(convertReference(src.getSupplier())); -// tgt.setWhenPrepared(convertPeriod(src.getWhenPrepared())); -// tgt.setTime(src.getTime()); - tgt.setDestination(convertReference(src.getDestination())); - for (org.hl7.fhir.r4.model.Reference t : src.getReceiver()) - tgt.addReceiver(convertReference(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus convertSupplyDeliveryStatus(org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.COMPLETED; - case ABANDONED: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.ABANDONED; - default: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus convertSupplyDeliveryStatus(org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.COMPLETED; - case ABANDONED: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.ABANDONED; - default: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.instance.model.SupplyRequest src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.SupplyRequest tgt = new org.hl7.fhir.r4.model.SupplyRequest(); - copyDomainResource(src, tgt); -// tgt.setPatient(convertReference(src.getPatient())); -// tgt.setSource(convertReference(src.getSource())); -// if (src.hasDate()) -// tgt.setDate(src.getDate()); -// tgt.setIdentifier(convertIdentifier(src.getIdentifier())); -// tgt.setStatus(convertSupplyRequestStatus(src.getStatus())); -// tgt.setKind(convertCodeableConcept(src.getKind())); -// tgt.getOrderedItem().setItem(convertReference(src.getOrderedItem())); -// for (org.hl7.fhir.instance.model.Reference t : src.getSupplier()) -// tgt.addSupplier(convertReference(t)); -// tgt.setReason(convertType(src.getReason())); -// tgt.setWhen(convertSupplyRequestWhenComponent(src.getWhen())); - return tgt; - } - - public org.hl7.fhir.instance.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.r4.model.SupplyRequest src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.SupplyRequest tgt = new org.hl7.fhir.instance.model.SupplyRequest(); -// copyDomainResource(src, tgt); -// tgt.setPatient(convertReference(src.getPatient())); -// tgt.setSource(convertReference(src.getSource())); -// if (src.hasDate()) -// tgt.setDate(src.getDate()); -// tgt.setIdentifier(convertIdentifier(src.getIdentifier())); -// tgt.setStatus(convertSupplyRequestStatus(src.getStatus())); -// tgt.setKind(convertCodeableConcept(src.getKind())); -// tgt.setOrderedItem(convertReference(src.getOrderedItem().getItemReference())); -// for (org.hl7.fhir.r4.model.Reference t : src.getSupplier()) -// tgt.addSupplier(convertReference(t)); -// tgt.setReason(convertType(src.getReason())); -// tgt.setWhen(convertSupplyRequestWhenComponent(src.getWhen())); - return tgt; - } - - public org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUESTED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.COMPLETED; - case FAILED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.CANCELLED; - case CANCELLED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.CANCELLED; - default: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.REQUESTED; - case COMPLETED: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.CANCELLED; - default: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.TestScript convertTestScript(org.hl7.fhir.instance.model.TestScript src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript tgt = new org.hl7.fhir.r4.model.TestScript(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent t : src.getContact()) - tgt.addContact(convertTestScriptContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgt.addJurisdiction(convertCodeableConcept(t)); - else - tgt.addUseContext(convertCodeableConceptToUsageContext(t)); - tgt.setPurpose(src.getRequirements()); - tgt.setCopyright(src.getCopyright()); - tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); - for (org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent t : src.getFixture()) - tgt.addFixture(convertTestScriptFixtureComponent(t)); - for (org.hl7.fhir.instance.model.Reference t : src.getProfile()) - tgt.addProfile(convertReference(t)); - for (org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent t : src.getVariable()) - tgt.addVariable(convertTestScriptVariableComponent(t)); - tgt.setSetup(convertTestScriptSetupComponent(src.getSetup())); - for (org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent t : src.getTest()) - tgt.addTest(convertTestScriptTestComponent(t)); - tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown())); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript convertTestScript(org.hl7.fhir.r4.model.TestScript src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript tgt = new org.hl7.fhir.instance.model.TestScript(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertTestScriptContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - if (t.hasValueCodeableConcept()) - tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addUseContext(convertCodeableConcept(t)); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); - tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); - for (org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent t : src.getFixture()) - tgt.addFixture(convertTestScriptFixtureComponent(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getProfile()) - tgt.addProfile(convertReference(t)); - for (org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent t : src.getVariable()) - tgt.addVariable(convertTestScriptVariableComponent(t)); - tgt.setSetup(convertTestScriptSetupComponent(src.getSetup())); - for (org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent t : src.getTest()) - tgt.addTest(convertTestScriptTestComponent(t)); - tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown())); - return tgt; - } - - public org.hl7.fhir.r4.model.ContactDetail convertTestScriptContactComponent(org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink()) - tgt.addLink(convertTestScriptMetadataLinkComponent(t)); - for (org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability()) - tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink()) - tgt.addLink(convertTestScriptMetadataLinkComponent(t)); - for (org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability()) - tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent(); - copyElement(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setDescription(src.getDescription()); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent(); - copyElement(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.setDescription(src.getDescription()); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); - copyElement(src, tgt); - tgt.setRequired(src.getRequired()); - tgt.setValidated(src.getValidated()); - tgt.setDescription(src.getDescription()); - tgt.setDestination(src.getDestination()); - for (org.hl7.fhir.instance.model.UriType t : src.getLink()) - tgt.addLink(t.getValue()); - tgt.setCapabilities(convertReference(src.getConformance())); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent(); - copyElement(src, tgt); - tgt.setRequired(src.getRequired()); - tgt.setValidated(src.getValidated()); - tgt.setDescription(src.getDescription()); - tgt.setDestination(src.getDestination()); - for (org.hl7.fhir.r4.model.UriType t : src.getLink()) - tgt.addLink(t.getValue()); - tgt.setConformance(convertReference(src.getCapabilities())); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); - copyElement(src, tgt); - tgt.setAutocreate(src.getAutocreate()); - tgt.setAutodelete(src.getAutodelete()); - tgt.setResource(convertReference(src.getResource())); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent(); - copyElement(src, tgt); - tgt.setAutocreate(src.getAutocreate()); - tgt.setAutodelete(src.getAutodelete()); - tgt.setResource(convertReference(src.getResource())); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setHeaderField(src.getHeaderField()); - tgt.setPath(src.getPath()); - tgt.setSourceId(src.getSourceId()); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setHeaderField(src.getHeaderField()); - tgt.setPath(src.getPath()); - tgt.setSourceId(src.getSourceId()); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent t : src.getAction()) - tgt.addAction(convertSetupActionComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.TestScript.SetupActionComponent t : src.getAction()) - tgt.addAction(convertSetupActionComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionComponent(); - copyElement(src, tgt); - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent convertSetupActionComponent(org.hl7.fhir.r4.model.TestScript.SetupActionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent(); - copyElement(src, tgt); - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent(); - copyElement(src, tgt); - tgt.setType(convertCoding(src.getType())); - tgt.setResource(src.getResource()); - tgt.setLabel(src.getLabel()); - tgt.setDescription(src.getDescription()); - tgt.setAccept(convertContentType(src.getAccept())); - tgt.setContentType(convertContentType(src.getContentType())); - tgt.setDestination(src.getDestination()); - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - tgt.setParams(src.getParams()); - for (org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) - tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); - tgt.setResponseId(src.getResponseId()); - tgt.setSourceId(src.getSourceId()); - tgt.setTargetId(src.getTargetId()); - tgt.setUrl(src.getUrl()); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent(); - copyElement(src, tgt); - tgt.setType(convertCoding(src.getType())); - tgt.setResource(src.getResource()); - tgt.setLabel(src.getLabel()); - tgt.setDescription(src.getDescription()); - tgt.setAccept(convertContentType(src.getAccept())); - tgt.setContentType(convertContentType(src.getContentType())); - tgt.setDestination(src.getDestination()); - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - tgt.setParams(src.getParams()); - for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) - tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); - tgt.setResponseId(src.getResponseId()); - tgt.setSourceId(src.getSourceId()); - tgt.setTargetId(src.getTargetId()); - tgt.setUrl(src.getUrl()); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.ContentType convertContentType(org.hl7.fhir.instance.model.TestScript.ContentType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case XML: return org.hl7.fhir.r4.model.TestScript.ContentType.XML; - case JSON: return org.hl7.fhir.r4.model.TestScript.ContentType.JSON; - default: return org.hl7.fhir.r4.model.TestScript.ContentType.NULL; - } - } - - public org.hl7.fhir.instance.model.TestScript.ContentType convertContentType(org.hl7.fhir.r4.model.TestScript.ContentType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case XML: return org.hl7.fhir.instance.model.TestScript.ContentType.XML; - case JSON: return org.hl7.fhir.instance.model.TestScript.ContentType.JSON; - default: return org.hl7.fhir.instance.model.TestScript.ContentType.NULL; - } - } - - public org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent(); - copyElement(src, tgt); - tgt.setField(src.getField()); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent(); - copyElement(src, tgt); - tgt.setField(src.getField()); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent(); - copyElement(src, tgt); - tgt.setLabel(src.getLabel()); - tgt.setDescription(src.getDescription()); - tgt.setDirection(convertAssertionDirectionType(src.getDirection())); - tgt.setCompareToSourceId(src.getCompareToSourceId()); - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - tgt.setContentType(convertContentType(src.getContentType())); - tgt.setHeaderField(src.getHeaderField()); - tgt.setMinimumId(src.getMinimumId()); - tgt.setNavigationLinks(src.getNavigationLinks()); - tgt.setOperator(convertAssertionOperatorType(src.getOperator())); - tgt.setPath(src.getPath()); - tgt.setResource(src.getResource()); - tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); - tgt.setResponseCode(src.getResponseCode()); - tgt.setSourceId(src.getSourceId()); - tgt.setValidateProfileId(src.getValidateProfileId()); - tgt.setValue(src.getValue()); - tgt.setWarningOnly(src.getWarningOnly()); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent(); - copyElement(src, tgt); - tgt.setLabel(src.getLabel()); - tgt.setDescription(src.getDescription()); - tgt.setDirection(convertAssertionDirectionType(src.getDirection())); - tgt.setCompareToSourceId(src.getCompareToSourceId()); - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - tgt.setContentType(convertContentType(src.getContentType())); - tgt.setHeaderField(src.getHeaderField()); - tgt.setMinimumId(src.getMinimumId()); - tgt.setNavigationLinks(src.getNavigationLinks()); - tgt.setOperator(convertAssertionOperatorType(src.getOperator())); - tgt.setPath(src.getPath()); - tgt.setResource(src.getResource()); - tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); - tgt.setResponseCode(src.getResponseCode()); - tgt.setSourceId(src.getSourceId()); - tgt.setValidateProfileId(src.getValidateProfileId()); - tgt.setValue(src.getValue()); - tgt.setWarningOnly(src.getWarningOnly()); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.instance.model.TestScript.AssertionDirectionType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESPONSE: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.RESPONSE; - case REQUEST: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.REQUEST; - default: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.NULL; - } - } - - public org.hl7.fhir.instance.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.r4.model.TestScript.AssertionDirectionType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESPONSE: return org.hl7.fhir.instance.model.TestScript.AssertionDirectionType.RESPONSE; - case REQUEST: return org.hl7.fhir.instance.model.TestScript.AssertionDirectionType.REQUEST; - default: return org.hl7.fhir.instance.model.TestScript.AssertionDirectionType.NULL; - } - } - - public org.hl7.fhir.r4.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.instance.model.TestScript.AssertionOperatorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EQUALS; - case NOTEQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEQUALS; - case IN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.IN; - case NOTIN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTIN; - case GREATERTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.GREATERTHAN; - case LESSTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.LESSTHAN; - case EMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EMPTY; - case NOTEMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEMPTY; - case CONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.CONTAINS; - case NOTCONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTCONTAINS; - default: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NULL; - } - } - - public org.hl7.fhir.instance.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.r4.model.TestScript.AssertionOperatorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUALS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.EQUALS; - case NOTEQUALS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTEQUALS; - case IN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.IN; - case NOTIN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTIN; - case GREATERTHAN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.GREATERTHAN; - case LESSTHAN: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.LESSTHAN; - case EMPTY: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.EMPTY; - case NOTEMPTY: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTEMPTY; - case CONTAINS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.CONTAINS; - case NOTCONTAINS: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NOTCONTAINS; - default: return org.hl7.fhir.instance.model.TestScript.AssertionOperatorType.NULL; - } - } - - public org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OKAY: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.OKAY; - case CREATED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CREATED; - case NOCONTENT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOCONTENT; - case NOTMODIFIED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTMODIFIED; - case BAD: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.BAD; - case FORBIDDEN: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.FORBIDDEN; - case NOTFOUND: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTFOUND; - case METHODNOTALLOWED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; - case CONFLICT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CONFLICT; - case GONE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.GONE; - case PRECONDITIONFAILED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; - case UNPROCESSABLE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; - default: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NULL; - } - } - - public org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OKAY: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.OKAY; - case CREATED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.CREATED; - case NOCONTENT: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NOCONTENT; - case NOTMODIFIED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NOTMODIFIED; - case BAD: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.BAD; - case FORBIDDEN: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.FORBIDDEN; - case NOTFOUND: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NOTFOUND; - case METHODNOTALLOWED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; - case CONFLICT: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.CONFLICT; - case GONE: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.GONE; - case PRECONDITIONFAILED: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; - case UNPROCESSABLE: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; - default: return org.hl7.fhir.instance.model.TestScript.AssertionResponseTypes.NULL; - } - } - - - public org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent t : src.getAction()) - tgt.addAction(convertTestActionComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) - tgt.addAction(convertTestActionComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestActionComponent(); - copyElement(src, tgt); - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent convertTestActionComponent(org.hl7.fhir.r4.model.TestScript.TestActionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent(); - copyElement(src, tgt); - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent t : src.getAction()) - tgt.addAction(convertTeardownActionComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.TestScript.TeardownActionComponent t : src.getAction()) - tgt.addAction(convertTeardownActionComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TeardownActionComponent(); - copyElement(src, tgt); - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - return tgt; - } - - public org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.r4.model.TestScript.TeardownActionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent(); - copyElement(src, tgt); - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.r4.model.CodeSystem src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent(); - copyElement(src, tgt); - tgt.setSystem(src.getUrl()); - tgt.setVersion(src.getVersion()); - tgt.setCaseSensitive(src.getCaseSensitive()); - - for (ConceptDefinitionComponent cc : src.getConcept()) - tgt.addConcept(convertCodeSystemConcept(src, cc)); - return tgt; - } - -public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent convertCodeSystemConcept(CodeSystem cs, ConceptDefinitionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent(); - copyElement(src, tgt); - tgt.setAbstract(CodeSystemUtilities.isNotSelectable(cs, src)); - tgt.setCode(src.getCode()); - tgt.setDefinition(src.getDefinition()); - tgt.setDisplay(src.getDisplay()); - - for (ConceptDefinitionComponent cc : src.getConcept()) - tgt.addConcept(convertCodeSystemConcept(cs, cc)); - for (ConceptDefinitionDesignationComponent cc : src.getDesignation()) - tgt.addDesignation(convertCodeSystemDesignation(cc)); - return tgt; - } - -public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent convertCodeSystemDesignation(ConceptDefinitionDesignationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent(); - copyElement(src, tgt); - tgt.setUse(convertCoding(src.getUse())); - tgt.setLanguage(src.getLanguage()); - tgt.setValue(src.getValue()); - - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet convertValueSet(org.hl7.fhir.instance.model.ValueSet src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - tgt.addIdentifier(convertIdentifier(src.getIdentifier())); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent t : src.getContact()) - tgt.addContact(convertValueSetContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgt.addJurisdiction(convertCodeableConcept(t)); - else - tgt.addUseContext(convertCodeableConceptToUsageContext(t)); - tgt.setImmutable(src.getImmutable()); - tgt.setPurpose(src.getRequirements()); - tgt.setCopyright(src.getCopyright()); - tgt.setExtensible(src.getExtensible()); - if (src.hasCompose()) { - tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); - tgt.getCompose().setLockedDate(src.getLockedDate()); - } - if (src.hasCodeSystem() && advisor != null) { - org.hl7.fhir.r4.model.CodeSystem tgtcs = new org.hl7.fhir.r4.model.CodeSystem(); - copyDomainResource(src, tgtcs); - tgtcs.setUrl(src.getCodeSystem().getSystem()); - tgtcs.setIdentifier(convertIdentifier(src.getIdentifier())); - tgtcs.setVersion(src.getCodeSystem().getVersion()); - tgtcs.setName(src.getName()+" Code System"); - tgtcs.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgtcs.setExperimental(src.getExperimental()); - tgtcs.setPublisher(src.getPublisher()); - for (org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent t : src.getContact()) - tgtcs.addContact(convertValueSetContactComponent(t)); - if (src.hasDate()) - tgtcs.setDate(src.getDate()); - tgtcs.setDescription(src.getDescription()); - for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) - if (isJurisdiction(t)) - tgtcs.addJurisdiction(convertCodeableConcept(t)); - else - tgtcs.addUseContext(convertCodeableConceptToUsageContext(t)); - tgtcs.setPurpose(src.getRequirements()); - tgtcs.setCopyright(src.getCopyright()); - tgtcs.setContent(CodeSystemContentMode.COMPLETE); - tgtcs.setCaseSensitive(src.getCodeSystem().getCaseSensitive()); - for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent cs : src.getCodeSystem().getConcept()) - processConcept(tgtcs.getConcept(), cs, tgtcs); - advisor.handleCodeSystem(tgtcs, tgt); - tgt.setUserData("r2-cs", tgtcs); - tgt.getCompose().addInclude().setSystem(tgtcs.getUrl()); - } - tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); - return tgt; - } - - private void processConcept(List concepts, org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent cs, CodeSystem tgtcs) throws FHIRException { - org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent ct = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent(); - concepts.add(ct); - ct.setCode(cs.getCode()); - ct.setDisplay(cs.getDisplay()); - ct.setDefinition(cs.getDefinition()); - if (cs.getAbstract()) - CodeSystemUtilities.setNotSelectable(tgtcs, ct); - for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) { - org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent(); - cst.setLanguage(csd.getLanguage()); - cst.setUse(convertCoding(csd.getUse())); - cst.setValue(csd.getValue()); - } - - for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent csc : cs.getConcept()) - processConcept(ct.getConcept(), csc, tgtcs); - } - - private void processConcept(List concepts, ConceptDefinitionComponent cs, CodeSystem srcCS) throws FHIRException { - org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent ct = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent(); - concepts.add(ct); - ct.setCode(cs.getCode()); - ct.setDisplay(cs.getDisplay()); - ct.setDefinition(cs.getDefinition()); - if (CodeSystemUtilities.isNotSelectable(srcCS, cs)) - ct.setAbstract(true); - for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) { - org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent(); - cst.setLanguage(csd.getLanguage()); - cst.setUse(convertCoding(csd.getUse())); - cst.setValue(csd.getValue()); - } - - for (ConceptDefinitionComponent csc : cs.getConcept()) - processConcept(ct.getConcept(), csc, srcCS); - } - - public org.hl7.fhir.instance.model.ValueSet convertValueSet(org.hl7.fhir.r4.model.ValueSet src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet tgt = new org.hl7.fhir.instance.model.ValueSet(); - copyDomainResource(src, tgt); - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Identifier i : src.getIdentifier()) - tgt.setIdentifier(convertIdentifier(i)); - tgt.setVersion(src.getVersion()); - tgt.setName(src.getName()); - tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - tgt.setPublisher(src.getPublisher()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertValueSetContactComponent(t)); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setLockedDate(src.getCompose().getLockedDate()); - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - if (t.hasValueCodeableConcept()) - tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addUseContext(convertCodeableConcept(t)); - tgt.setImmutable(src.getImmutable()); - tgt.setRequirements(src.getPurpose()); - tgt.setCopyright(src.getCopyright()); - tgt.setExtensible(src.getExtensible()); - org.hl7.fhir.r4.model.CodeSystem srcCS = (CodeSystem) src.getUserData("r2-cs"); - if (srcCS == null) - srcCS = advisor.getCodeSystem(src); - if (srcCS != null) { - tgt.getCodeSystem().setSystem(srcCS.getUrl()); - tgt.getCodeSystem().setVersion(srcCS.getVersion()); - tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive()); - for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) - processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS); - - } - tgt.setCompose(convertValueSetComposeComponent(src.getCompose(), srcCS == null ? null : srcCS.getUrl())); - tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); - return tgt; - } - - private static boolean isJurisdiction(CodeableConcept t) { - return t.hasCoding() && ("http://unstats.un.org/unsd/methods/m49/m49.htm".equals(t.getCoding().get(0).getSystem()) || "urn:iso:std:iso:3166".equals(t.getCoding().get(0).getSystem()) - || "https://www.usps.com/".equals(t.getCoding().get(0).getSystem())); - } - - - public org.hl7.fhir.r4.model.ContactDetail convertValueSetContactComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent convertValueSetContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.instance.model.UriType t : src.getImport()) - tgt.addInclude().addValueSet(t.getValue()); - for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getInclude()) - tgt.addInclude(convertConceptSetComponent(t)); - for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getExclude()) - tgt.addExclude(convertConceptSetComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent src, String noSystem) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent t : src.getInclude()) { - for (org.hl7.fhir.r4.model.UriType ti : t.getValueSet()) - tgt.addImport(ti.getValue()); - if (noSystem == null || !t.getSystem().equals(noSystem)) - tgt.addInclude(convertConceptSetComponent(t)); - } - for (org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent t : src.getExclude()) - tgt.addExclude(convertConceptSetComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); - copyElement(src, tgt); - tgt.setSystem(src.getSystem()); - tgt.setVersion(src.getVersion()); - for (org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) - tgt.addConcept(convertConceptReferenceComponent(t)); - for (org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) - tgt.addFilter(convertConceptSetFilterComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent(); - copyElement(src, tgt); - tgt.setSystem(src.getSystem()); - tgt.setVersion(src.getVersion()); - for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) - tgt.addConcept(convertConceptReferenceComponent(t)); - for (org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) - tgt.addFilter(convertConceptSetFilterComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); - copyElement(src, tgt); - tgt.setCode(src.getCode()); - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptReferenceComponent(); - copyElement(src, tgt); - tgt.setCode(src.getCode()); - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); - copyElement(src, tgt); - tgt.setLanguage(src.getLanguage()); - tgt.setUse(convertCoding(src.getUse())); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent(); - copyElement(src, tgt); - tgt.setLanguage(src.getLanguage()); - tgt.setUse(convertCoding(src.getUse())); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); - copyElement(src, tgt); - tgt.setProperty(src.getProperty()); - tgt.setOp(convertFilterOperator(src.getOp())); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ConceptSetFilterComponent(); - copyElement(src, tgt); - tgt.setProperty(src.getProperty()); - tgt.setOp(convertFilterOperator(src.getOp())); - tgt.setValue(src.getValue()); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.instance.model.ValueSet.FilterOperator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUAL: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.EQUAL; - case ISA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISA; - case ISNOTA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISNOTA; - case REGEX: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.REGEX; - case IN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.IN; - case NOTIN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NOTIN; - default: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NULL; - } - } - - public org.hl7.fhir.instance.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.r4.model.ValueSet.FilterOperator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUAL: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.EQUAL; - case ISA: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.ISA; - case ISNOTA: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.ISNOTA; - case REGEX: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.REGEX; - case IN: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.IN; - case NOTIN: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.NOTIN; - default: return org.hl7.fhir.instance.model.ValueSet.FilterOperator.NULL; - } - } - - public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent(); - copyElement(src, tgt); - tgt.setIdentifier(src.getIdentifier()); - tgt.setTimestamp(src.getTimestamp()); - tgt.setTotal(src.getTotal()); - tgt.setOffset(src.getOffset()); - for (org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) - tgt.addParameter(convertValueSetExpansionParameterComponent(t)); - for (org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) - tgt.addContains(convertValueSetExpansionContainsComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent(); - copyElement(src, tgt); - tgt.setIdentifier(src.getIdentifier()); - tgt.setTimestamp(src.getTimestamp()); - tgt.setTotal(src.getTotal()); - tgt.setOffset(src.getOffset()); - for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) - tgt.addParameter(convertValueSetExpansionParameterComponent(t)); - for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) - tgt.addContains(convertValueSetExpansionContainsComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent(); - copyElement(src, tgt); - tgt.setName(src.getName()); - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent(); - copyElement(src, tgt); - tgt.setSystem(src.getSystem()); - tgt.setAbstract(src.getAbstract()); - tgt.setVersion(src.getVersion()); - tgt.setCode(src.getCode()); - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) - tgt.addContains(convertValueSetExpansionContainsComponent(t)); - return tgt; - } - - public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent(); - copyElement(src, tgt); - tgt.setSystem(src.getSystem()); - tgt.setAbstract(src.getAbstract()); - tgt.setVersion(src.getVersion()); - tgt.setCode(src.getCode()); - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) - tgt.addContains(convertValueSetExpansionContainsComponent(t)); - return tgt; - } - - public org.hl7.fhir.r4.model.ListResource convertList(org.hl7.fhir.instance.model.List_ src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ListResource tgt = new org.hl7.fhir.r4.model.ListResource(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setTitle(src.getTitle()); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setSource(convertReference(src.getSource())); - tgt.setEncounter(convertReference(src.getEncounter())); - tgt.setStatus(convertListStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); - tgt.setMode(convertListMode(src.getMode())); - if (src.hasNote()) - tgt.addNote(new org.hl7.fhir.r4.model.Annotation().setText(src.getNote())); - for (org.hl7.fhir.instance.model.List_.ListEntryComponent t : src.getEntry()) - tgt.addEntry(convertListEntry(t)); - return tgt; - } - - - public org.hl7.fhir.r4.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.instance.model.List_.ListStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.r4.model.ListResource.ListStatus.CURRENT; - case RETIRED: return org.hl7.fhir.r4.model.ListResource.ListStatus.RETIRED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ListResource.ListStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ListResource.ListStatus.NULL; - } - } - - public org.hl7.fhir.r4.model.ListResource.ListMode convertListMode(org.hl7.fhir.instance.model.List_.ListMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case WORKING: return org.hl7.fhir.r4.model.ListResource.ListMode.WORKING; - case SNAPSHOT: return org.hl7.fhir.r4.model.ListResource.ListMode.SNAPSHOT; - case CHANGES: return org.hl7.fhir.r4.model.ListResource.ListMode.CHANGES; - default: return org.hl7.fhir.r4.model.ListResource.ListMode.NULL; - } - } - - public org.hl7.fhir.r4.model.ListResource.ListEntryComponent convertListEntry(org.hl7.fhir.instance.model.List_.ListEntryComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.ListResource.ListEntryComponent tgt = new org.hl7.fhir.r4.model.ListResource.ListEntryComponent(); - copyBackboneElement(src, tgt); - tgt.setFlag(convertCodeableConcept(src.getFlag())); - tgt.setDeleted(src.getDeleted()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setItem(convertReference(src.getItem())); - return tgt; - } - - public org.hl7.fhir.instance.model.List_ convertList(org.hl7.fhir.r4.model.ListResource src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.List_ tgt = new org.hl7.fhir.instance.model.List_(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - tgt.setTitle(src.getTitle()); - tgt.setCode(convertCodeableConcept(src.getCode())); - tgt.setSubject(convertReference(src.getSubject())); - tgt.setSource(convertReference(src.getSource())); - tgt.setEncounter(convertReference(src.getEncounter())); - tgt.setStatus(convertListStatus(src.getStatus())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); - tgt.setMode(convertListMode(src.getMode())); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.setNote(t.getText()); - for (org.hl7.fhir.r4.model.ListResource.ListEntryComponent t : src.getEntry()) - tgt.addEntry(convertListEntry(t)); - return tgt; - } - - - public org.hl7.fhir.instance.model.List_.ListStatus convertListStatus(org.hl7.fhir.r4.model.ListResource.ListStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.instance.model.List_.ListStatus.CURRENT; - case RETIRED: return org.hl7.fhir.instance.model.List_.ListStatus.RETIRED; - case ENTEREDINERROR: return org.hl7.fhir.instance.model.List_.ListStatus.ENTEREDINERROR; - default: return org.hl7.fhir.instance.model.List_.ListStatus.NULL; - } - } - - public org.hl7.fhir.instance.model.List_.ListMode convertListMode(org.hl7.fhir.r4.model.ListResource.ListMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case WORKING: return org.hl7.fhir.instance.model.List_.ListMode.WORKING; - case SNAPSHOT: return org.hl7.fhir.instance.model.List_.ListMode.SNAPSHOT; - case CHANGES: return org.hl7.fhir.instance.model.List_.ListMode.CHANGES; - default: return org.hl7.fhir.instance.model.List_.ListMode.NULL; - } - } - - public org.hl7.fhir.instance.model.List_.ListEntryComponent convertListEntry(org.hl7.fhir.r4.model.ListResource.ListEntryComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.instance.model.List_.ListEntryComponent tgt = new org.hl7.fhir.instance.model.List_.ListEntryComponent(); - copyBackboneElement(src, tgt); - tgt.setFlag(convertCodeableConcept(src.getFlag())); - tgt.setDeleted(src.getDeleted()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - tgt.setItem(convertReference(src.getItem())); - return tgt; - } - - - public org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.instance.model.Resource src) throws FHIRException { if (src == null || src.isEmpty()) return null; @@ -13039,4 +10319,2653 @@ public org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponen throw new Error("Unknown resource "+src.fhirType()); } + public org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent(); + copyElement(src, tgt); + tgt.setCode(convertTypeRestfulInteraction(src.getCode())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent tgt = new org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent(); + copyElement(src, tgt); + tgt.setCode(convertTypeRestfulInteraction(src.getCode())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOVERSION: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION; + case VERSIONED: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED; + case VERSIONEDUPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE; + default: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOVERSION: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.NOVERSION; + case VERSIONED: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.VERSIONED; + case VERSIONEDUPDATE: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.VERSIONEDUPDATE; + default: return org.hl7.fhir.instance.model.Conformance.ResourceVersionPolicy.NULL; + } + } + + public org.hl7.fhir.r4.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.instance.model.MessageHeader.ResponseType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OK: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.OK; + case TRANSIENTERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.TRANSIENTERROR; + case FATALERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.FATALERROR; + default: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.NULL; + } + } + + public org.hl7.fhir.instance.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.r4.model.MessageHeader.ResponseType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OK: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.OK; + case TRANSIENTERROR: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.TRANSIENTERROR; + case FATALERROR: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.FATALERROR; + default: return org.hl7.fhir.instance.model.MessageHeader.ResponseType.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode convertRestfulConformanceMode(org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLIENT: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.CLIENT; + case SERVER: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.SERVER; + default: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode convertRestfulConformanceMode(org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLIENT: return org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode.CLIENT; + case SERVER: return org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode.SERVER; + default: return org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode.NULL; + } + } + + public org.hl7.fhir.r4.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.instance.model.RiskAssessment src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.RiskAssessment tgt = new org.hl7.fhir.r4.model.RiskAssessment(); + copyDomainResource(src, tgt); + tgt.setSubject(convertReference(src.getSubject())); +// tgt.setDate(src.getDate()); + tgt.setCondition(convertReference(src.getCondition())); + tgt.setContext(convertReference(src.getEncounter())); + tgt.setPerformer(convertReference(src.getPerformer())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + for (org.hl7.fhir.instance.model.Reference t : src.getBasis()) + tgt.addBasis(convertReference(t)); + for (org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) + tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); + tgt.setMitigation(src.getMitigation()); + return tgt; + } + + public org.hl7.fhir.instance.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.r4.model.RiskAssessment src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.RiskAssessment tgt = new org.hl7.fhir.instance.model.RiskAssessment(); + copyDomainResource(src, tgt); + tgt.setSubject(convertReference(src.getSubject())); +// tgt.setDateElement(src.getOccurrenceDateTimeType()); + tgt.setCondition(convertReference(src.getCondition())); + tgt.setEncounter(convertReference(src.getContext())); + tgt.setPerformer(convertReference(src.getPerformer())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setMethod(convertCodeableConcept(src.getMethod())); + for (org.hl7.fhir.r4.model.Reference t : src.getBasis()) + tgt.addBasis(convertReference(t)); + for (org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) + tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); + tgt.setMitigation(src.getMitigation()); + return tgt; + } + + public org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent tgt = new org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent(); + copyElement(src, tgt); + tgt.setOutcome(convertCodeableConcept(src.getOutcome())); + tgt.setProbability(convertType(src.getProbability())); + tgt.setRelativeRisk(src.getRelativeRisk()); + tgt.setWhen(convertType(src.getWhen())); + tgt.setRationale(src.getRationale()); + return tgt; + } + + public org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent tgt = new org.hl7.fhir.instance.model.RiskAssessment.RiskAssessmentPredictionComponent(); + copyElement(src, tgt); + tgt.setOutcome(convertCodeableConcept(src.getOutcome())); + tgt.setProbability(convertType(src.getProbability())); + tgt.setRelativeRisk(src.getRelativeRisk()); + tgt.setWhen(convertType(src.getWhen())); + tgt.setRationale(src.getRationale()); + return tgt; + } + + public org.hl7.fhir.r4.model.SampledData convertSampledData(org.hl7.fhir.instance.model.SampledData src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.SampledData tgt = new org.hl7.fhir.r4.model.SampledData(); + copyElement(src, tgt); + tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); + tgt.setPeriod(src.getPeriod()); + tgt.setFactor(src.getFactor()); + tgt.setLowerLimit(src.getLowerLimit()); + tgt.setUpperLimit(src.getUpperLimit()); + tgt.setDimensions(src.getDimensions()); + tgt.setData(src.getData()); + return tgt; + } + + public org.hl7.fhir.instance.model.SampledData convertSampledData(org.hl7.fhir.r4.model.SampledData src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.SampledData tgt = new org.hl7.fhir.instance.model.SampledData(); + copyElement(src, tgt); + tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); + tgt.setPeriod(src.getPeriod()); + tgt.setFactor(src.getFactor()); + tgt.setLowerLimit(src.getLowerLimit()); + tgt.setUpperLimit(src.getUpperLimit()); + tgt.setDimensions(src.getDimensions()); + tgt.setData(src.getData()); + return tgt; + } + + public org.hl7.fhir.r4.model.Schedule convertSchedule(org.hl7.fhir.instance.model.Schedule src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Schedule tgt = new org.hl7.fhir.r4.model.Schedule(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getType()) + tgt.addServiceType(convertCodeableConcept(t)); + tgt.addActor(convertReference(src.getActor())); + tgt.setPlanningHorizon(convertPeriod(src.getPlanningHorizon())); + tgt.setComment(src.getComment()); + return tgt; + } + + public org.hl7.fhir.instance.model.Schedule convertSchedule(org.hl7.fhir.r4.model.Schedule src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Schedule tgt = new org.hl7.fhir.instance.model.Schedule(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) + tgt.addType(convertCodeableConcept(t)); + tgt.setActor(convertReference(src.getActorFirstRep())); + tgt.setPlanningHorizon(convertPeriod(src.getPlanningHorizon())); + tgt.setComment(src.getComment()); + return tgt; + } + + public org.hl7.fhir.r4.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.instance.model.Bundle.SearchEntryMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MATCH: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.MATCH; + case INCLUDE: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.INCLUDE; + case OUTCOME: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.OUTCOME; + default: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.NULL; + } + } + + public org.hl7.fhir.instance.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.r4.model.Bundle.SearchEntryMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MATCH: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.MATCH; + case INCLUDE: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.INCLUDE; + case OUTCOME: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.OUTCOME; + default: return org.hl7.fhir.instance.model.Bundle.SearchEntryMode.NULL; + } + } + + public org.hl7.fhir.r4.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.instance.model.Enumerations.SearchParamType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NUMBER: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NUMBER; + case DATE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.DATE; + case STRING: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.STRING; + case TOKEN: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.TOKEN; + case REFERENCE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.REFERENCE; + case COMPOSITE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.COMPOSITE; + case QUANTITY: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.QUANTITY; + case URI: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.URI; + default: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NULL; + } + } + + public org.hl7.fhir.instance.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.r4.model.Enumerations.SearchParamType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NUMBER: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.NUMBER; + case DATE: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.DATE; + case STRING: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.STRING; + case TOKEN: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.TOKEN; + case REFERENCE: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.REFERENCE; + case COMPOSITE: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.COMPOSITE; + case QUANTITY: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.QUANTITY; + case URI: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.URI; + default: return org.hl7.fhir.instance.model.Enumerations.SearchParamType.NULL; + } + } + + public org.hl7.fhir.r4.model.SearchParameter convertSearchParameter(org.hl7.fhir.instance.model.SearchParameter src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) + tgt.addContact(convertSearchParameterContactComponent(t)); + tgt.setPurpose(src.getRequirements()); + tgt.setCode(src.getCode()); + tgt.addBase(src.getBase()); + tgt.setType(convertSearchParamType(src.getType())); + tgt.setDescription(src.getDescription()); + tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); + tgt.setXpath(src.getXpath()); + tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); + for (org.hl7.fhir.instance.model.CodeType t : src.getTarget()) + tgt.addTarget(t.getValue()); + return tgt; + } + + public org.hl7.fhir.instance.model.SearchParameter convertSearchParameter(org.hl7.fhir.r4.model.SearchParameter src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.SearchParameter tgt = new org.hl7.fhir.instance.model.SearchParameter(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertSearchParameterContactComponent(t)); + tgt.setRequirements(src.getPurpose()); + tgt.setCode(src.getCode()); + for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) + tgt.setBase(t.asStringValue()); + tgt.setType(convertSearchParamType(src.getType())); + tgt.setDescription(src.getDescription()); + org.hl7.fhir.instance.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); + tgt.setXpath(src.getXpath()); + tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); + for (org.hl7.fhir.r4.model.CodeType t : src.getTarget()) + tgt.addTarget(t.getValue()); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertSearchParameterContactComponent(org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent convertSearchParameterContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.instance.model.SearchParameter.SearchParameterContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.instance.model.Composition.SectionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); + copyElement(src, tgt); + tgt.setTitle(src.getTitle()); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setText(convertNarrative(src.getText())); + try { + tgt.setMode(org.hl7.fhir.r4.model.Composition.SectionMode.fromCode(src.getMode())); + } catch (org.hl7.fhir.exceptions.FHIRException e) { + throw new FHIRException(e); + } + tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); + for (org.hl7.fhir.instance.model.Reference t : src.getEntry()) + tgt.addEntry(convertReference(t)); + tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); + for (org.hl7.fhir.instance.model.Composition.SectionComponent t : src.getSection()) + tgt.addSection(convertSectionComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.r4.model.Composition.SectionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Composition.SectionComponent tgt = new org.hl7.fhir.instance.model.Composition.SectionComponent(); + copyElement(src, tgt); + tgt.setTitle(src.getTitle()); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setText(convertNarrative(src.getText())); + tgt.setMode(src.getMode().toCode()); + tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); + for (org.hl7.fhir.r4.model.Reference t : src.getEntry()) + tgt.addEntry(convertReference(t)); + tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); + for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) + tgt.addSection(convertSectionComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent(); + copyElement(src, tgt); + tgt.setLabel(src.getLabel()); + tgt.setDescription(src.getDescription()); + tgt.setDirection(convertAssertionDirectionType(src.getDirection())); + tgt.setCompareToSourceId(src.getCompareToSourceId()); + tgt.setCompareToSourcePath(src.getCompareToSourcePath()); + tgt.setContentType(convertContentType(src.getContentType())); + tgt.setHeaderField(src.getHeaderField()); + tgt.setMinimumId(src.getMinimumId()); + tgt.setNavigationLinks(src.getNavigationLinks()); + tgt.setOperator(convertAssertionOperatorType(src.getOperator())); + tgt.setPath(src.getPath()); + tgt.setResource(src.getResource()); + tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); + tgt.setResponseCode(src.getResponseCode()); + tgt.setSourceId(src.getSourceId()); + tgt.setValidateProfileId(src.getValidateProfileId()); + tgt.setValue(src.getValue()); + tgt.setWarningOnly(src.getWarningOnly()); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionAssertComponent(); + copyElement(src, tgt); + tgt.setLabel(src.getLabel()); + tgt.setDescription(src.getDescription()); + tgt.setDirection(convertAssertionDirectionType(src.getDirection())); + tgt.setCompareToSourceId(src.getCompareToSourceId()); + tgt.setCompareToSourcePath(src.getCompareToSourcePath()); + tgt.setContentType(convertContentType(src.getContentType())); + tgt.setHeaderField(src.getHeaderField()); + tgt.setMinimumId(src.getMinimumId()); + tgt.setNavigationLinks(src.getNavigationLinks()); + tgt.setOperator(convertAssertionOperatorType(src.getOperator())); + tgt.setPath(src.getPath()); + tgt.setResource(src.getResource()); + tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); + tgt.setResponseCode(src.getResponseCode()); + tgt.setSourceId(src.getSourceId()); + tgt.setValidateProfileId(src.getValidateProfileId()); + tgt.setValue(src.getValue()); + tgt.setWarningOnly(src.getWarningOnly()); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionComponent(); + copyElement(src, tgt); + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent convertSetupActionComponent(org.hl7.fhir.r4.model.TestScript.SetupActionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent(); + copyElement(src, tgt); + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent(); + copyElement(src, tgt); + tgt.setType(convertCoding(src.getType())); + tgt.setResource(src.getResource()); + tgt.setLabel(src.getLabel()); + tgt.setDescription(src.getDescription()); + tgt.setAccept(convertContentType(src.getAccept())); + tgt.setContentType(convertContentType(src.getContentType())); + tgt.setDestination(src.getDestination()); + tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); + tgt.setParams(src.getParams()); + for (org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) + tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); + tgt.setResponseId(src.getResponseId()); + tgt.setSourceId(src.getSourceId()); + tgt.setTargetId(src.getTargetId()); + tgt.setUrl(src.getUrl()); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationComponent(); + copyElement(src, tgt); + tgt.setType(convertCoding(src.getType())); + tgt.setResource(src.getResource()); + tgt.setLabel(src.getLabel()); + tgt.setDescription(src.getDescription()); + tgt.setAccept(convertContentType(src.getAccept())); + tgt.setContentType(convertContentType(src.getContentType())); + tgt.setDestination(src.getDestination()); + tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); + tgt.setParams(src.getParams()); + for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) + tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); + tgt.setResponseId(src.getResponseId()); + tgt.setSourceId(src.getSourceId()); + tgt.setTargetId(src.getTargetId()); + tgt.setUrl(src.getUrl()); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent(); + copyElement(src, tgt); + tgt.setField(src.getField()); + tgt.setValue(src.getValue()); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent(); + copyElement(src, tgt); + tgt.setField(src.getField()); + tgt.setValue(src.getValue()); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.instance.model.Contract.SignatoryComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.r4.model.Contract.SignatoryComponent(); + copyElement(src, tgt); + tgt.setType(convertCoding(src.getType())); + tgt.setParty(convertReference(src.getParty())); + if (src.hasSignature()) + tgt.addSignature(new org.hl7.fhir.r4.model.Signature().setBlob(src.getSignature().getBytes())); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.r4.model.Contract.SignatoryComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.instance.model.Contract.SignatoryComponent(); + copyElement(src, tgt); + tgt.setType(convertCoding(src.getType())); + tgt.setParty(convertReference(src.getParty())); + for (org.hl7.fhir.r4.model.Signature t : src.getSignature()) + tgt.setSignature(Base64.encodeBase64String(t.getBlob())); + return tgt; + } + + public org.hl7.fhir.r4.model.Signature convertSignature(org.hl7.fhir.instance.model.Signature src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Signature tgt = new org.hl7.fhir.r4.model.Signature(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + tgt.setWhen(src.getWhen()); + tgt.setWho(convertType(src.getWho())); + tgt.setContentType(src.getContentType()); + tgt.setBlob(src.getBlob()); + return tgt; + } + + public org.hl7.fhir.instance.model.Signature convertSignature(org.hl7.fhir.r4.model.Signature src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Signature tgt = new org.hl7.fhir.instance.model.Signature(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + tgt.setWhen(src.getWhen()); + tgt.setWho(convertType(src.getWho())); + tgt.setContentType(src.getContentType()); + tgt.setBlob(src.getBlob()); + return tgt; + } + + public org.hl7.fhir.r4.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.instance.model.SimpleQuantity src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.SimpleQuantity tgt = new org.hl7.fhir.r4.model.SimpleQuantity(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.instance.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.SimpleQuantity tgt = new org.hl7.fhir.instance.model.SimpleQuantity(); + copyElement(src, tgt); + tgt.setValue(src.getValue()); + tgt.setComparator(convertQuantityComparator(src.getComparator())); + tgt.setUnit(src.getUnit()); + tgt.setSystem(src.getSystem()); + tgt.setCode(src.getCode()); + return tgt; + } + + public org.hl7.fhir.r4.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.instance.model.ElementDefinition.SlicingRules src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLOSED: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.CLOSED; + case OPEN: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPEN; + case OPENATEND: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPENATEND; + default: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.NULL; + } + } + + public org.hl7.fhir.instance.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.r4.model.ElementDefinition.SlicingRules src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLOSED: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.CLOSED; + case OPEN: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.OPEN; + case OPENATEND: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.OPENATEND; + default: return org.hl7.fhir.instance.model.ElementDefinition.SlicingRules.NULL; + } + } + + public org.hl7.fhir.r4.model.Slot convertSlot(org.hl7.fhir.instance.model.Slot src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Slot tgt = new org.hl7.fhir.r4.model.Slot(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasType()) + tgt.addServiceType(convertCodeableConcept(src.getType())); + tgt.setSchedule(convertReference(src.getSchedule())); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + tgt.setOverbooked(src.getOverbooked()); + tgt.setComment(src.getComment()); + return tgt; + } + + public org.hl7.fhir.instance.model.Slot convertSlot(org.hl7.fhir.r4.model.Slot src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Slot tgt = new org.hl7.fhir.instance.model.Slot(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) + tgt.setType(convertCodeableConcept(t)); + tgt.setSchedule(convertReference(src.getSchedule())); + tgt.setStart(src.getStart()); + tgt.setEnd(src.getEnd()); + tgt.setOverbooked(src.getOverbooked()); + tgt.setComment(src.getComment()); + return tgt; + } + + public org.hl7.fhir.r4.model.Slot.SlotStatus convertSlotStatus(org.hl7.fhir.instance.model.Slot.SlotStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BUSY: return org.hl7.fhir.r4.model.Slot.SlotStatus.BUSY; + case FREE: return org.hl7.fhir.r4.model.Slot.SlotStatus.FREE; + case BUSYUNAVAILABLE: return org.hl7.fhir.r4.model.Slot.SlotStatus.BUSYUNAVAILABLE; + case BUSYTENTATIVE: return org.hl7.fhir.r4.model.Slot.SlotStatus.BUSYTENTATIVE; + default: return org.hl7.fhir.r4.model.Slot.SlotStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Slot.SlotStatus convertSlotStatus(org.hl7.fhir.r4.model.Slot.SlotStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BUSY: return org.hl7.fhir.instance.model.Slot.SlotStatus.BUSY; + case FREE: return org.hl7.fhir.instance.model.Slot.SlotStatus.FREE; + case BUSYUNAVAILABLE: return org.hl7.fhir.instance.model.Slot.SlotStatus.BUSYUNAVAILABLE; + case BUSYTENTATIVE: return org.hl7.fhir.instance.model.Slot.SlotStatus.BUSYTENTATIVE; + default: return org.hl7.fhir.instance.model.Slot.SlotStatus.NULL; + } + } + + public List convertSourceElementComponent(org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent src) throws FHIRException { + List res = new ArrayList(); + if (src == null || src.isEmpty()) + return res; + for (org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent t : src.getTarget()) { + org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); + copyElement(src, tgt); + tgt.setCode(src.getCode()); + tgt.addTarget(convertTargetElementComponent(t)); + res.add(new SourceElementComponentWrapper(tgt, src.getCodeSystem(), t.getCodeSystem())); + } + return res; + } + + public org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.SourceElementComponent(); + copyElement(src, tgt); + tgt.setCodeSystem(g.getSource()); + tgt.setCode(src.getCode()); + for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) + tgt.addTarget(convertTargetElementComponent(t, g)); + return tgt; + } + + public org.hl7.fhir.r4.model.StringType convertString(org.hl7.fhir.instance.model.StringType src) throws FHIRException { + org.hl7.fhir.r4.model.StringType tgt = new org.hl7.fhir.r4.model.StringType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.StringType convertString(org.hl7.fhir.r4.model.StringType src) throws FHIRException { + org.hl7.fhir.instance.model.StringType tgt = new org.hl7.fhir.instance.model.StringType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.instance.model.StructureDefinition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setTitle(src.getDisplay()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) + tgt.addContact(convertStructureDefinitionContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgt.addJurisdiction(convertCodeableConcept(t)); + else + tgt.addUseContext(convertCodeableConceptToUsageContext(t)); + tgt.setPurpose(src.getRequirements()); + tgt.setCopyright(src.getCopyright()); + for (org.hl7.fhir.instance.model.Coding t : src.getCode()) + tgt.addKeyword(convertCoding(t)); + tgt.setFhirVersion(src.getFhirVersion()); + for (org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) + tgt.addMapping(convertStructureDefinitionMappingComponent(t)); + tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId())); + tgt.setAbstract(src.getAbstract()); + tgt.setContextType(convertExtensionContext(src.getContextType())); + for (org.hl7.fhir.instance.model.StringType t : src.getContext()) + tgt.addContext(t.getValue()); + if (src.hasConstrainedType()) + tgt.setType(src.getConstrainedType()); + else if (src.getSnapshot().hasElement()) + tgt.setType(src.getSnapshot().getElement().get(0).getPath()); + else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains(".")) + tgt.setType(src.getDifferential().getElement().get(0).getPath()); + else + tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); + tgt.setBaseDefinition(src.getBase()); + tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); + tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); + tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); + if (tgt.hasSnapshot()) + tgt.getSnapshot().getElementFirstRep().getType().clear(); + if (tgt.hasDifferential()) + tgt.getDifferential().getElementFirstRep().getType().clear(); + if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getId())) { + tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); + tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/"+tgt.getType()); +// for (ElementDefinition ed : tgt.getSnapshot().getElement()) { +// ed.setPath(ed.getPath().replace(tgt.getType()+".", tgt.getId()+".")); +// } +// for (ElementDefinition ed : tgt.getDifferential().getElement()) { +// ed.setPath(ed.getPath().replace(tgt.getType()+".", tgt.getId()+".")); +// } + tgt.setType(tgt.getId()); + } + return tgt; + } + + public org.hl7.fhir.instance.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.r4.model.StructureDefinition src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.StructureDefinition tgt = new org.hl7.fhir.instance.model.StructureDefinition(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setDisplay(src.getTitle()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertStructureDefinitionContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) + if (t.hasValueCodeableConcept()) + tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) + tgt.addUseContext(convertCodeableConcept(t)); + tgt.setRequirements(src.getPurpose()); + tgt.setCopyright(src.getCopyright()); + for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) + tgt.addCode(convertCoding(t)); + tgt.setFhirVersion(src.getFhirVersion()); + for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) + tgt.addMapping(convertStructureDefinitionMappingComponent(t)); + tgt.setKind(convertStructureDefinitionKind(src.getKind())); + tgt.setAbstract(src.getAbstract()); + tgt.setContextType(convertExtensionContext(src.getContextType())); + for (org.hl7.fhir.r4.model.StringType t : src.getContext()) + tgt.addContext(t.getValue()); + tgt.setConstrainedType(src.getType()); + tgt.setBase(src.getBaseDefinition()); + tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); + tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential())); + if (tgt.hasBase()) { + if (tgt.hasDifferential()) + tgt.getDifferential().getElement().get(0).addType().setCode(tail(tgt.getBase())); + if (tgt.hasSnapshot()) + tgt.getSnapshot().getElement().get(0).addType().setCode(tail(tgt.getBase())); + } + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertStructureDefinitionContactComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent convertStructureDefinitionContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent(); + copyElement(src, tgt); + List slicePaths = new ArrayList(); + for (org.hl7.fhir.instance.model.ElementDefinition t : src.getElement()) { + if (t.hasSlicing()) + slicePaths.add(t.getPath()); + tgt.addElement(convertElementDefinition(t, slicePaths)); + } + return tgt; + } + + public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionDifferentialComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) + tgt.addElement(convertElementDefinition(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind src, String dtName) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DATATYPE: + if (Utilities.existsInList(dtName, "boolean", "integer", "decimal", "base64Binary", "instant", "string", "uri", "date", "dateTime", "time", "code", "oid", "uuid", "id", "unsignedInt", "positiveInt", "markdown", "xhtml")) + return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE; + else + return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.COMPLEXTYPE; + case RESOURCE: return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.RESOURCE; + case LOGICAL: return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.LOGICAL; + default: return org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind.NULL; + } + } + + public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRIMITIVETYPE: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.DATATYPE; + case COMPLEXTYPE: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.DATATYPE; + case RESOURCE: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.RESOURCE; + case LOGICAL: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.LOGICAL; + default: return org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionKind.NULL; + } + } + + public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); + copyElement(src, tgt); + tgt.setIdentity(src.getIdentity()); + tgt.setUri(src.getUri()); + tgt.setName(src.getName()); + tgt.setComment(src.getComments()); + return tgt; + } + + public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionMappingComponent(); + copyElement(src, tgt); + tgt.setIdentity(src.getIdentity()); + tgt.setUri(src.getUri()); + tgt.setName(src.getName()); + tgt.setComments(src.getComment()); + return tgt; + } + + public org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent(); + copyElement(src, tgt); + List slicePaths = new ArrayList(); + for (org.hl7.fhir.instance.model.ElementDefinition t : src.getElement()) { + if (t.hasSlicing()) + slicePaths.add(t.getPath()); + tgt.addElement(convertElementDefinition(t, slicePaths)); + } + return tgt; + } + + public org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt = new org.hl7.fhir.instance.model.StructureDefinition.StructureDefinitionSnapshotComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) + tgt.addElement(convertElementDefinition(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Subscription convertSubscription(org.hl7.fhir.instance.model.Subscription src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Subscription tgt = new org.hl7.fhir.r4.model.Subscription(); + copyDomainResource(src, tgt); + tgt.setCriteria(src.getCriteria()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + tgt.setReason(src.getReason()); + tgt.setStatus(convertSubscriptionStatus(src.getStatus())); + tgt.setError(src.getError()); + tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); + tgt.setEnd(src.getEnd()); + for (org.hl7.fhir.instance.model.Coding t : src.getTag()) + tgt.addTag(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Subscription convertSubscription(org.hl7.fhir.r4.model.Subscription src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Subscription tgt = new org.hl7.fhir.instance.model.Subscription(); + copyDomainResource(src, tgt); + tgt.setCriteria(src.getCriteria()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + tgt.setReason(src.getReason()); + tgt.setStatus(convertSubscriptionStatus(src.getStatus())); + tgt.setError(src.getError()); + tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); + tgt.setEnd(src.getEnd()); + for (org.hl7.fhir.r4.model.Coding t : src.getTag()) + tgt.addTag(convertCoding(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent(); + copyElement(src, tgt); + tgt.setType(convertSubscriptionChannelType(src.getType())); + tgt.setEndpoint(src.getEndpoint()); + tgt.setPayload(src.getPayload()); + tgt.addHeader(src.getHeader()); + return tgt; + } + + public org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.instance.model.Subscription.SubscriptionChannelComponent(); + copyElement(src, tgt); + tgt.setType(convertSubscriptionChannelType(src.getType())); + tgt.setEndpoint(src.getEndpoint()); + tgt.setPayload(src.getPayload()); + if (src.hasHeader()) + tgt.setHeaderElement(convertString(src.getHeader().get(0))); + return tgt; + } + + public org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESTHOOK: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.RESTHOOK; + case WEBSOCKET: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.WEBSOCKET; + case EMAIL: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.EMAIL; + case SMS: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.SMS; + case MESSAGE: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.MESSAGE; + default: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.NULL; + } + } + + public org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESTHOOK: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.RESTHOOK; + case WEBSOCKET: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.WEBSOCKET; + case EMAIL: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.EMAIL; + case SMS: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.SMS; + case MESSAGE: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.MESSAGE; + default: return org.hl7.fhir.instance.model.Subscription.SubscriptionChannelType.NULL; + } + } + + public org.hl7.fhir.r4.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.instance.model.Subscription.SubscriptionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUESTED: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.REQUESTED; + case ACTIVE: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ACTIVE; + case ERROR: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ERROR; + case OFF: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.OFF; + default: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r4.model.Subscription.SubscriptionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUESTED: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.REQUESTED; + case ACTIVE: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.ACTIVE; + case ERROR: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.ERROR; + case OFF: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.OFF; + default: return org.hl7.fhir.instance.model.Subscription.SubscriptionStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.Substance convertSubstance(org.hl7.fhir.instance.model.Substance src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Substance tgt = new org.hl7.fhir.r4.model.Substance(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getCategory()) + tgt.addCategory(convertCodeableConcept(t)); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent t : src.getInstance()) + tgt.addInstance(convertSubstanceInstanceComponent(t)); + for (org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) + tgt.addIngredient(convertSubstanceIngredientComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Substance convertSubstance(org.hl7.fhir.r4.model.Substance src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Substance tgt = new org.hl7.fhir.instance.model.Substance(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) + tgt.addCategory(convertCodeableConcept(t)); + tgt.setCode(convertCodeableConcept(src.getCode())); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) + tgt.addInstance(convertSubstanceInstanceComponent(t)); + for (org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) + tgt.addIngredient(convertSubstanceIngredientComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent(); + copyElement(src, tgt); + tgt.setQuantity(convertRatio(src.getQuantity())); + tgt.setSubstance(convertReference(src.getSubstance())); + return tgt; + } + + public org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.instance.model.Substance.SubstanceIngredientComponent(); + copyElement(src, tgt); + tgt.setQuantity(convertRatio(src.getQuantity())); +// tgt.setSubstance(convertReference(src.getSubstance())); + return tgt; + } + + public org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent tgt = new org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setExpiry(src.getExpiry()); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + return tgt; + } + + public org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent tgt = new org.hl7.fhir.instance.model.Substance.SubstanceInstanceComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setExpiry(src.getExpiry()); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + return tgt; + } + + public org.hl7.fhir.r4.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.instance.model.SupplyDelivery src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.SupplyDelivery tgt = new org.hl7.fhir.r4.model.SupplyDelivery(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setStatus(convertSupplyDeliveryStatus(src.getStatus())); + tgt.setPatient(convertReference(src.getPatient())); + tgt.setType(convertCodeableConcept(src.getType())); +// tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); +// tgt.setSuppliedItem(convertReference(src.getSuppliedItem())); + tgt.setSupplier(convertReference(src.getSupplier())); +// tgt.setWhenPrepared(convertPeriod(src.getWhenPrepared())); +// tgt.setTime(src.getTime()); + tgt.setDestination(convertReference(src.getDestination())); + for (org.hl7.fhir.instance.model.Reference t : src.getReceiver()) + tgt.addReceiver(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.r4.model.SupplyDelivery src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.SupplyDelivery tgt = new org.hl7.fhir.instance.model.SupplyDelivery(); + copyDomainResource(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setStatus(convertSupplyDeliveryStatus(src.getStatus())); + tgt.setPatient(convertReference(src.getPatient())); + tgt.setType(convertCodeableConcept(src.getType())); +// tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); +// tgt.setSuppliedItem(convertReference(src.getSuppliedItem())); + tgt.setSupplier(convertReference(src.getSupplier())); +// tgt.setWhenPrepared(convertPeriod(src.getWhenPrepared())); +// tgt.setTime(src.getTime()); + tgt.setDestination(convertReference(src.getDestination())); + for (org.hl7.fhir.r4.model.Reference t : src.getReceiver()) + tgt.addReceiver(convertReference(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus convertSupplyDeliveryStatus(org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.COMPLETED; + case ABANDONED: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.ABANDONED; + default: return org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus convertSupplyDeliveryStatus(org.hl7.fhir.r4.model.SupplyDelivery.SupplyDeliveryStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.COMPLETED; + case ABANDONED: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.ABANDONED; + default: return org.hl7.fhir.instance.model.SupplyDelivery.SupplyDeliveryStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.instance.model.SupplyRequest src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.SupplyRequest tgt = new org.hl7.fhir.r4.model.SupplyRequest(); + copyDomainResource(src, tgt); +// tgt.setPatient(convertReference(src.getPatient())); +// tgt.setSource(convertReference(src.getSource())); +// if (src.hasDate()) +// tgt.setDate(src.getDate()); +// tgt.setIdentifier(convertIdentifier(src.getIdentifier())); +// tgt.setStatus(convertSupplyRequestStatus(src.getStatus())); +// tgt.setKind(convertCodeableConcept(src.getKind())); +// tgt.getOrderedItem().setItem(convertReference(src.getOrderedItem())); +// for (org.hl7.fhir.instance.model.Reference t : src.getSupplier()) +// tgt.addSupplier(convertReference(t)); +// tgt.setReason(convertType(src.getReason())); +// tgt.setWhen(convertSupplyRequestWhenComponent(src.getWhen())); + return tgt; + } + + public org.hl7.fhir.instance.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.r4.model.SupplyRequest src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.SupplyRequest tgt = new org.hl7.fhir.instance.model.SupplyRequest(); +// copyDomainResource(src, tgt); +// tgt.setPatient(convertReference(src.getPatient())); +// tgt.setSource(convertReference(src.getSource())); +// if (src.hasDate()) +// tgt.setDate(src.getDate()); +// tgt.setIdentifier(convertIdentifier(src.getIdentifier())); +// tgt.setStatus(convertSupplyRequestStatus(src.getStatus())); +// tgt.setKind(convertCodeableConcept(src.getKind())); +// tgt.setOrderedItem(convertReference(src.getOrderedItem().getItemReference())); +// for (org.hl7.fhir.r4.model.Reference t : src.getSupplier()) +// tgt.addSupplier(convertReference(t)); +// tgt.setReason(convertType(src.getReason())); +// tgt.setWhen(convertSupplyRequestWhenComponent(src.getWhen())); + return tgt; + } + + public org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUESTED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.COMPLETED; + case FAILED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.CANCELLED; + case CANCELLED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.CANCELLED; + default: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.NULL; + } + } + + public org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.REQUESTED; + case COMPLETED: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.CANCELLED; + default: return org.hl7.fhir.instance.model.SupplyRequest.SupplyRequestStatus.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent(); + copyElement(src, tgt); + tgt.setCode(convertSystemRestfulInteraction(src.getCode())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent tgt = new org.hl7.fhir.instance.model.Conformance.SystemInteractionComponent(); + copyElement(src, tgt); + tgt.setCode(convertSystemRestfulInteraction(src.getCode())); + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case TRANSACTION: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION; + case SEARCHSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM; + case HISTORYSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM; + default: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case TRANSACTION: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.TRANSACTION; + case SEARCHSYSTEM: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.SEARCHSYSTEM; + case HISTORYSYSTEM: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.HISTORYSYSTEM; + default: return org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction.NULL; + } + } + + public org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); + copyElement(src, tgt); + tgt.setCode(src.getCode()); + tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); + tgt.setComment(src.getComments()); + for (org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) + tgt.addDependsOn(convertOtherElementComponent(t)); + for (org.hl7.fhir.instance.model.ConceptMap.OtherElementComponent t : src.getProduct()) + tgt.addProduct(convertOtherElementComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.instance.model.ConceptMap.TargetElementComponent(); + copyElement(src, tgt); + tgt.setCodeSystem(g.getTarget()); + tgt.setCode(src.getCode()); + tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); + tgt.setComments(src.getComment()); + for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) + tgt.addDependsOn(convertOtherElementComponent(t)); + for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct()) + tgt.addProduct(convertOtherElementComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TeardownActionComponent(); + copyElement(src, tgt); + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.r4.model.TestScript.TeardownActionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent(); + copyElement(src, tgt); + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.AgentComponent convertTermAgentComponent(org.hl7.fhir.instance.model.Contract.TermActorComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); + copyElement(src, tgt); + tgt.setActor(convertReference(src.getEntity())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.TermActorComponent convertTermAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.TermActorComponent tgt = new org.hl7.fhir.instance.model.Contract.TermActorComponent(); + copyElement(src, tgt); + tgt.setEntity(convertReference(src.getActor())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.instance.model.Contract.TermComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.TermComponent tgt = new org.hl7.fhir.r4.model.Contract.TermComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setIssued(src.getIssued()); + tgt.setApplies(convertPeriod(src.getApplies())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setSubType(convertCodeableConcept(src.getSubType())); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getAction()) + tgt.addAction(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getActionReason()) + tgt.addActionReason(convertCodeableConcept(t)); + for (org.hl7.fhir.instance.model.Contract.TermActorComponent t : src.getActor()) + tgt.addAgent(convertTermAgentComponent(t)); + for (org.hl7.fhir.instance.model.Contract.TermComponent t : src.getGroup()) + tgt.addGroup(convertTermComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.r4.model.Contract.TermComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.TermComponent tgt = new org.hl7.fhir.instance.model.Contract.TermComponent(); + copyElement(src, tgt); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setIssued(src.getIssued()); + tgt.setApplies(convertPeriod(src.getApplies())); + tgt.setType(convertCodeableConcept(src.getType())); + tgt.setSubType(convertCodeableConcept(src.getSubType())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAction()) + tgt.addAction(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getActionReason()) + tgt.addActionReason(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Contract.AgentComponent t : src.getAgent()) + tgt.addActor(convertTermAgentComponent(t)); + for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getGroup()) + tgt.addGroup(convertTermComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.instance.model.Contract.TermValuedItemComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); + copyElement(src, tgt); + tgt.setEntity(convertType(src.getEntity())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setEffectiveTime(src.getEffectiveTime()); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + tgt.setFactor(src.getFactor()); + tgt.setPoints(src.getPoints()); + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.TermValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.TermValuedItemComponent tgt = new org.hl7.fhir.instance.model.Contract.TermValuedItemComponent(); + copyElement(src, tgt); + tgt.setEntity(convertType(src.getEntity())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setEffectiveTime(src.getEffectiveTime()); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + tgt.setFactor(src.getFactor()); + tgt.setPoints(src.getPoints()); + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestActionComponent(); + copyElement(src, tgt); + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent convertTestActionComponent(org.hl7.fhir.r4.model.TestScript.TestActionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent(); + copyElement(src, tgt); + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript convertTestScript(org.hl7.fhir.instance.model.TestScript src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript tgt = new org.hl7.fhir.r4.model.TestScript(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent t : src.getContact()) + tgt.addContact(convertTestScriptContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgt.addJurisdiction(convertCodeableConcept(t)); + else + tgt.addUseContext(convertCodeableConceptToUsageContext(t)); + tgt.setPurpose(src.getRequirements()); + tgt.setCopyright(src.getCopyright()); + tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); + for (org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent t : src.getFixture()) + tgt.addFixture(convertTestScriptFixtureComponent(t)); + for (org.hl7.fhir.instance.model.Reference t : src.getProfile()) + tgt.addProfile(convertReference(t)); + for (org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent t : src.getVariable()) + tgt.addVariable(convertTestScriptVariableComponent(t)); + tgt.setSetup(convertTestScriptSetupComponent(src.getSetup())); + for (org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent t : src.getTest()) + tgt.addTest(convertTestScriptTestComponent(t)); + tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown())); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript convertTestScript(org.hl7.fhir.r4.model.TestScript src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript tgt = new org.hl7.fhir.instance.model.TestScript(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertTestScriptContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) + if (t.hasValueCodeableConcept()) + tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) + tgt.addUseContext(convertCodeableConcept(t)); + tgt.setRequirements(src.getPurpose()); + tgt.setCopyright(src.getCopyright()); + tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); + for (org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent t : src.getFixture()) + tgt.addFixture(convertTestScriptFixtureComponent(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getProfile()) + tgt.addProfile(convertReference(t)); + for (org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent t : src.getVariable()) + tgt.addVariable(convertTestScriptVariableComponent(t)); + tgt.setSetup(convertTestScriptSetupComponent(src.getSetup())); + for (org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent t : src.getTest()) + tgt.addTest(convertTestScriptTestComponent(t)); + tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown())); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertTestScriptContactComponent(org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); + copyElement(src, tgt); + tgt.setAutocreate(src.getAutocreate()); + tgt.setAutodelete(src.getAutodelete()); + tgt.setResource(convertReference(src.getResource())); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptFixtureComponent(); + copyElement(src, tgt); + tgt.setAutocreate(src.getAutocreate()); + tgt.setAutodelete(src.getAutodelete()); + tgt.setResource(convertReference(src.getResource())); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); + copyElement(src, tgt); + tgt.setRequired(src.getRequired()); + tgt.setValidated(src.getValidated()); + tgt.setDescription(src.getDescription()); + tgt.setDestination(src.getDestination()); + for (org.hl7.fhir.instance.model.UriType t : src.getLink()) + tgt.addLink(t.getValue()); + tgt.setCapabilities(convertReference(src.getConformance())); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent(); + copyElement(src, tgt); + tgt.setRequired(src.getRequired()); + tgt.setValidated(src.getValidated()); + tgt.setDescription(src.getDescription()); + tgt.setDestination(src.getDestination()); + for (org.hl7.fhir.r4.model.UriType t : src.getLink()) + tgt.addLink(t.getValue()); + tgt.setConformance(convertReference(src.getCapabilities())); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink()) + tgt.addLink(convertTestScriptMetadataLinkComponent(t)); + for (org.hl7.fhir.instance.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability()) + tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink()) + tgt.addLink(convertTestScriptMetadataLinkComponent(t)); + for (org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability()) + tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent(); + copyElement(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setDescription(src.getDescription()); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptMetadataLinkComponent(); + copyElement(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.setDescription(src.getDescription()); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.TestScript.TestScriptSetupActionComponent t : src.getAction()) + tgt.addAction(convertSetupActionComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptSetupComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.TestScript.SetupActionComponent t : src.getAction()) + tgt.addAction(convertSetupActionComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.TestScript.TestScriptTeardownActionComponent t : src.getAction()) + tgt.addAction(convertTeardownActionComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTeardownComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.TestScript.TeardownActionComponent t : src.getAction()) + tgt.addAction(convertTeardownActionComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.TestScript.TestScriptTestActionComponent t : src.getAction()) + tgt.addAction(convertTestActionComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptTestComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) + tgt.addAction(convertTestActionComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setHeaderField(src.getHeaderField()); + tgt.setPath(src.getPath()); + tgt.setSourceId(src.getSourceId()); + return tgt; + } + + public org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.instance.model.TestScript.TestScriptVariableComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setHeaderField(src.getHeaderField()); + tgt.setPath(src.getPath()); + tgt.setSourceId(src.getSourceId()); + return tgt; + } + + public org.hl7.fhir.r4.model.TimeType convertTime(org.hl7.fhir.instance.model.TimeType src) throws FHIRException { + org.hl7.fhir.r4.model.TimeType tgt = new org.hl7.fhir.r4.model.TimeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.TimeType convertTime(org.hl7.fhir.r4.model.TimeType src) throws FHIRException { + org.hl7.fhir.instance.model.TimeType tgt = new org.hl7.fhir.instance.model.TimeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.Timing convertTiming(org.hl7.fhir.instance.model.Timing src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Timing tgt = new org.hl7.fhir.r4.model.Timing(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.DateTimeType t : src.getEvent()) + tgt.addEvent(t.getValue()); + tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); + tgt.setCode(convertCodeableConcept(src.getCode())); + return tgt; + } + + public org.hl7.fhir.instance.model.Timing convertTiming(org.hl7.fhir.r4.model.Timing src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Timing tgt = new org.hl7.fhir.instance.model.Timing(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.DateTimeType t : src.getEvent()) + tgt.addEvent(t.getValue()); + tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); + tgt.setCode(convertCodeableConcept(src.getCode())); + return tgt; + } + + public org.hl7.fhir.r4.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.instance.model.Timing.TimingRepeatComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.r4.model.Timing.TimingRepeatComponent(); + copyElement(src, tgt); + tgt.setBounds(convertType(src.getBounds())); + tgt.setCount(src.getCount()); + tgt.setDuration(src.getDuration()); + tgt.setDurationMax(src.getDurationMax()); + tgt.setDurationUnit(convertUnitsOfTime(src.getDurationUnits())); + tgt.setFrequency(src.getFrequency()); + tgt.setFrequencyMax(src.getFrequencyMax()); + tgt.setPeriod(src.getPeriod()); + tgt.setPeriodMax(src.getPeriodMax()); + tgt.setPeriodUnit(convertUnitsOfTime(src.getPeriodUnits())); + tgt.addWhen(convertEventTiming(src.getWhen())); + return tgt; + } + + public org.hl7.fhir.instance.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.r4.model.Timing.TimingRepeatComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.instance.model.Timing.TimingRepeatComponent(); + copyElement(src, tgt); + tgt.setBounds(convertType(src.getBounds())); + tgt.setCount(src.getCount()); + tgt.setDuration(src.getDuration()); + tgt.setDurationMax(src.getDurationMax()); + tgt.setDurationUnits(convertUnitsOfTime(src.getDurationUnit())); + tgt.setFrequency(src.getFrequency()); + tgt.setFrequencyMax(src.getFrequencyMax()); + tgt.setPeriod(src.getPeriod()); + tgt.setPeriodMax(src.getPeriodMax()); + tgt.setPeriodUnits(convertUnitsOfTime(src.getPeriodUnit())); + for (Enumeration t : src.getWhen()) + tgt.setWhen(convertEventTiming(t.getValue())); + return tgt; + } + + public org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.instance.model.Type src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + if (src instanceof org.hl7.fhir.instance.model.Base64BinaryType) + return convertBase64Binary((org.hl7.fhir.instance.model.Base64BinaryType) src); + if (src instanceof org.hl7.fhir.instance.model.BooleanType) + return convertBoolean((org.hl7.fhir.instance.model.BooleanType) src); + if (src instanceof org.hl7.fhir.instance.model.CodeType) + return convertCode((org.hl7.fhir.instance.model.CodeType) src); + if (src instanceof org.hl7.fhir.instance.model.DateType) + return convertDate((org.hl7.fhir.instance.model.DateType) src); + if (src instanceof org.hl7.fhir.instance.model.DateTimeType) + return convertDateTime((org.hl7.fhir.instance.model.DateTimeType) src); + if (src instanceof org.hl7.fhir.instance.model.DecimalType) + return convertDecimal((org.hl7.fhir.instance.model.DecimalType) src); + if (src instanceof org.hl7.fhir.instance.model.IdType) + return convertId((org.hl7.fhir.instance.model.IdType) src); + if (src instanceof org.hl7.fhir.instance.model.InstantType) + return convertInstant((org.hl7.fhir.instance.model.InstantType) src); + if (src instanceof org.hl7.fhir.instance.model.IntegerType) + return convertInteger((org.hl7.fhir.instance.model.IntegerType) src); + if (src instanceof org.hl7.fhir.instance.model.MarkdownType) + return convertMarkdown((org.hl7.fhir.instance.model.MarkdownType) src); + if (src instanceof org.hl7.fhir.instance.model.OidType) + return convertOid((org.hl7.fhir.instance.model.OidType) src); + if (src instanceof org.hl7.fhir.instance.model.PositiveIntType) + return convertPositiveInt((org.hl7.fhir.instance.model.PositiveIntType) src); + if (src instanceof org.hl7.fhir.instance.model.StringType) + return convertString((org.hl7.fhir.instance.model.StringType) src); + if (src instanceof org.hl7.fhir.instance.model.TimeType) + return convertTime((org.hl7.fhir.instance.model.TimeType) src); + if (src instanceof org.hl7.fhir.instance.model.UnsignedIntType) + return convertUnsignedInt((org.hl7.fhir.instance.model.UnsignedIntType) src); + if (src instanceof org.hl7.fhir.instance.model.UriType) + return convertUri((org.hl7.fhir.instance.model.UriType) src); + if (src instanceof org.hl7.fhir.instance.model.UuidType) + return convertUuid((org.hl7.fhir.instance.model.UuidType) src); + if (src instanceof org.hl7.fhir.instance.model.Extension) + return convertExtension((org.hl7.fhir.instance.model.Extension) src); + if (src instanceof org.hl7.fhir.instance.model.Narrative) + return convertNarrative((org.hl7.fhir.instance.model.Narrative) src); + if (src instanceof org.hl7.fhir.instance.model.Annotation) + return convertAnnotation((org.hl7.fhir.instance.model.Annotation) src); + if (src instanceof org.hl7.fhir.instance.model.Attachment) + return convertAttachment((org.hl7.fhir.instance.model.Attachment) src); + if (src instanceof org.hl7.fhir.instance.model.CodeableConcept) + return convertCodeableConcept((org.hl7.fhir.instance.model.CodeableConcept) src); + if (src instanceof org.hl7.fhir.instance.model.Coding) + return convertCoding((org.hl7.fhir.instance.model.Coding) src); + if (src instanceof org.hl7.fhir.instance.model.Identifier) + return convertIdentifier((org.hl7.fhir.instance.model.Identifier) src); + if (src instanceof org.hl7.fhir.instance.model.Period) + return convertPeriod((org.hl7.fhir.instance.model.Period) src); + if (src instanceof org.hl7.fhir.instance.model.Quantity) + return convertQuantity((org.hl7.fhir.instance.model.Quantity) src); + if (src instanceof org.hl7.fhir.instance.model.Range) + return convertRange((org.hl7.fhir.instance.model.Range) src); + if (src instanceof org.hl7.fhir.instance.model.Ratio) + return convertRatio((org.hl7.fhir.instance.model.Ratio) src); + if (src instanceof org.hl7.fhir.instance.model.Reference) + return convertReference((org.hl7.fhir.instance.model.Reference) src); + if (src instanceof org.hl7.fhir.instance.model.SampledData) + return convertSampledData((org.hl7.fhir.instance.model.SampledData) src); + if (src instanceof org.hl7.fhir.instance.model.Signature) + return convertSignature((org.hl7.fhir.instance.model.Signature) src); + if (src instanceof org.hl7.fhir.instance.model.Address) + return convertAddress((org.hl7.fhir.instance.model.Address) src); + if (src instanceof org.hl7.fhir.instance.model.ContactPoint) + return convertContactPoint((org.hl7.fhir.instance.model.ContactPoint) src); + if (src instanceof org.hl7.fhir.instance.model.ElementDefinition) + return convertElementDefinition((org.hl7.fhir.instance.model.ElementDefinition) src, new ArrayList()); + if (src instanceof org.hl7.fhir.instance.model.HumanName) + return convertHumanName((org.hl7.fhir.instance.model.HumanName) src); + if (src instanceof org.hl7.fhir.instance.model.Meta) + return convertMeta((org.hl7.fhir.instance.model.Meta) src); + if (src instanceof org.hl7.fhir.instance.model.Timing) + return convertTiming((org.hl7.fhir.instance.model.Timing) src); + if (src instanceof org.hl7.fhir.instance.model.Age) + return convertAge((org.hl7.fhir.instance.model.Age) src); + if (src instanceof org.hl7.fhir.instance.model.Count) + return convertCount((org.hl7.fhir.instance.model.Count) src); + if (src instanceof org.hl7.fhir.instance.model.Distance) + return convertDistance((org.hl7.fhir.instance.model.Distance) src); + if (src instanceof org.hl7.fhir.instance.model.Duration) + return convertDuration((org.hl7.fhir.instance.model.Duration) src); + if (src instanceof org.hl7.fhir.instance.model.Money) + return convertMoney((org.hl7.fhir.instance.model.Money) src); + if (src instanceof org.hl7.fhir.instance.model.SimpleQuantity) + return convertSimpleQuantity((org.hl7.fhir.instance.model.SimpleQuantity) src); + throw new Error("Unknown type "+src.fhirType()); + } + + public org.hl7.fhir.instance.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + if (src instanceof org.hl7.fhir.r4.model.Base64BinaryType) + return convertBase64Binary((org.hl7.fhir.r4.model.Base64BinaryType) src); + if (src instanceof org.hl7.fhir.r4.model.BooleanType) + return convertBoolean((org.hl7.fhir.r4.model.BooleanType) src); + if (src instanceof org.hl7.fhir.r4.model.CodeType) + return convertCode((org.hl7.fhir.r4.model.CodeType) src); + if (src instanceof org.hl7.fhir.r4.model.DateType) + return convertDate((org.hl7.fhir.r4.model.DateType) src); + if (src instanceof org.hl7.fhir.r4.model.DateTimeType) + return convertDateTime((org.hl7.fhir.r4.model.DateTimeType) src); + if (src instanceof org.hl7.fhir.r4.model.DecimalType) + return convertDecimal((org.hl7.fhir.r4.model.DecimalType) src); + if (src instanceof org.hl7.fhir.r4.model.IdType) + return convertId((org.hl7.fhir.r4.model.IdType) src); + if (src instanceof org.hl7.fhir.r4.model.InstantType) + return convertInstant((org.hl7.fhir.r4.model.InstantType) src); + if (src instanceof org.hl7.fhir.r4.model.IntegerType) + return convertInteger((org.hl7.fhir.r4.model.IntegerType) src); + if (src instanceof org.hl7.fhir.r4.model.MarkdownType) + return convertMarkdown((org.hl7.fhir.r4.model.MarkdownType) src); + if (src instanceof org.hl7.fhir.r4.model.OidType) + return convertOid((org.hl7.fhir.r4.model.OidType) src); + if (src instanceof org.hl7.fhir.r4.model.PositiveIntType) + return convertPositiveInt((org.hl7.fhir.r4.model.PositiveIntType) src); + if (src instanceof org.hl7.fhir.r4.model.StringType) + return convertString((org.hl7.fhir.r4.model.StringType) src); + if (src instanceof org.hl7.fhir.r4.model.TimeType) + return convertTime((org.hl7.fhir.r4.model.TimeType) src); + if (src instanceof org.hl7.fhir.r4.model.UnsignedIntType) + return convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src); + if (src instanceof org.hl7.fhir.r4.model.UriType) + return convertUri((org.hl7.fhir.r4.model.UriType) src); + if (src instanceof org.hl7.fhir.r4.model.UuidType) + return convertUuid((org.hl7.fhir.r4.model.UuidType) src); + if (src instanceof org.hl7.fhir.r4.model.Extension) + return convertExtension((org.hl7.fhir.r4.model.Extension) src); + if (src instanceof org.hl7.fhir.r4.model.Narrative) + return convertNarrative((org.hl7.fhir.r4.model.Narrative) src); + if (src instanceof org.hl7.fhir.r4.model.Annotation) + return convertAnnotation((org.hl7.fhir.r4.model.Annotation) src); + if (src instanceof org.hl7.fhir.r4.model.Attachment) + return convertAttachment((org.hl7.fhir.r4.model.Attachment) src); + if (src instanceof org.hl7.fhir.r4.model.CodeableConcept) + return convertCodeableConcept((org.hl7.fhir.r4.model.CodeableConcept) src); + if (src instanceof org.hl7.fhir.r4.model.Coding) + return convertCoding((org.hl7.fhir.r4.model.Coding) src); + if (src instanceof org.hl7.fhir.r4.model.Identifier) + return convertIdentifier((org.hl7.fhir.r4.model.Identifier) src); + if (src instanceof org.hl7.fhir.r4.model.Period) + return convertPeriod((org.hl7.fhir.r4.model.Period) src); + if (src instanceof org.hl7.fhir.r4.model.Quantity) + return convertQuantity((org.hl7.fhir.r4.model.Quantity) src); + if (src instanceof org.hl7.fhir.r4.model.Range) + return convertRange((org.hl7.fhir.r4.model.Range) src); + if (src instanceof org.hl7.fhir.r4.model.Ratio) + return convertRatio((org.hl7.fhir.r4.model.Ratio) src); + if (src instanceof org.hl7.fhir.r4.model.Reference) + return convertReference((org.hl7.fhir.r4.model.Reference) src); + if (src instanceof org.hl7.fhir.r4.model.SampledData) + return convertSampledData((org.hl7.fhir.r4.model.SampledData) src); + if (src instanceof org.hl7.fhir.r4.model.Signature) + return convertSignature((org.hl7.fhir.r4.model.Signature) src); + if (src instanceof org.hl7.fhir.r4.model.Address) + return convertAddress((org.hl7.fhir.r4.model.Address) src); + if (src instanceof org.hl7.fhir.r4.model.ContactPoint) + return convertContactPoint((org.hl7.fhir.r4.model.ContactPoint) src); + if (src instanceof org.hl7.fhir.r4.model.ElementDefinition) + return convertElementDefinition((org.hl7.fhir.r4.model.ElementDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.HumanName) + return convertHumanName((org.hl7.fhir.r4.model.HumanName) src); + if (src instanceof org.hl7.fhir.r4.model.Meta) + return convertMeta((org.hl7.fhir.r4.model.Meta) src); + if (src instanceof org.hl7.fhir.r4.model.Timing) + return convertTiming((org.hl7.fhir.r4.model.Timing) src); + if (src instanceof org.hl7.fhir.r4.model.Age) + return convertAge((org.hl7.fhir.r4.model.Age) src); + if (src instanceof org.hl7.fhir.r4.model.Count) + return convertCount((org.hl7.fhir.r4.model.Count) src); + if (src instanceof org.hl7.fhir.r4.model.Distance) + return convertDistance((org.hl7.fhir.r4.model.Distance) src); + if (src instanceof org.hl7.fhir.r4.model.Duration) + return convertDuration((org.hl7.fhir.r4.model.Duration) src); + if (src instanceof org.hl7.fhir.r4.model.Money) + return convertMoney((org.hl7.fhir.r4.model.Money) src); + if (src instanceof org.hl7.fhir.r4.model.SimpleQuantity) + return convertSimpleQuantity((org.hl7.fhir.r4.model.SimpleQuantity) src); + throw new Error("Unknown type "+src.fhirType()); + } + + public org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case READ: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.READ; + case VREAD: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.VREAD; + case UPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.UPDATE; + case DELETE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.DELETE; + case HISTORYINSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE; + case HISTORYTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE; + case CREATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.CREATE; + case SEARCHTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE; + default: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case READ: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.READ; + case VREAD: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.VREAD; + case UPDATE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.UPDATE; + case DELETE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.DELETE; + case HISTORYINSTANCE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.HISTORYINSTANCE; + case HISTORYTYPE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.HISTORYTYPE; + case CREATE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.CREATE; + case SEARCHTYPE: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.SEARCHTYPE; + default: return org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction.NULL; + } + } + + public org.hl7.fhir.r4.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.instance.model.Timing.UnitsOfTime src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case S: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.S; + case MIN: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MIN; + case H: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.H; + case D: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.D; + case WK: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.WK; + case MO: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MO; + case A: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.A; + default: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.NULL; + } + } + + public org.hl7.fhir.instance.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.r4.model.Timing.UnitsOfTime src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case S: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.S; + case MIN: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.MIN; + case H: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.H; + case D: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.D; + case WK: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.WK; + case MO: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.MO; + case A: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.A; + default: return org.hl7.fhir.instance.model.Timing.UnitsOfTime.NULL; + } + } + + public org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.instance.model.Conformance.UnknownContentCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NO: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NO; + case EXTENSIONS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.EXTENSIONS; + case ELEMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.ELEMENTS; + case BOTH: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.BOTH; + default: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NULL; + } + } + + public org.hl7.fhir.instance.model.Conformance.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NO: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.NO; + case EXTENSIONS: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.EXTENSIONS; + case ELEMENTS: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.ELEMENTS; + case BOTH: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.BOTH; + default: return org.hl7.fhir.instance.model.Conformance.UnknownContentCode.NULL; + } + } + + public org.hl7.fhir.r4.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.instance.model.UnsignedIntType src) throws FHIRException { + org.hl7.fhir.r4.model.UnsignedIntType tgt = new org.hl7.fhir.r4.model.UnsignedIntType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.r4.model.UnsignedIntType src) throws FHIRException { + org.hl7.fhir.instance.model.UnsignedIntType tgt = new org.hl7.fhir.instance.model.UnsignedIntType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.instance.model.UriType src) throws FHIRException { + org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { + org.hl7.fhir.instance.model.UriType tgt = new org.hl7.fhir.instance.model.UriType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.CodeType convertUriToCode(org.hl7.fhir.r4.model.UriType src) throws FHIRException { + org.hl7.fhir.instance.model.CodeType tgt = new org.hl7.fhir.instance.model.CodeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.UuidType convertUuid(org.hl7.fhir.instance.model.UuidType src) throws FHIRException { + org.hl7.fhir.r4.model.UuidType tgt = new org.hl7.fhir.r4.model.UuidType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.instance.model.UuidType convertUuid(org.hl7.fhir.r4.model.UuidType src) throws FHIRException { + org.hl7.fhir.instance.model.UuidType tgt = new org.hl7.fhir.instance.model.UuidType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet convertValueSet(org.hl7.fhir.instance.model.ValueSet src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + tgt.addIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent t : src.getContact()) + tgt.addContact(convertValueSetContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgt.addJurisdiction(convertCodeableConcept(t)); + else + tgt.addUseContext(convertCodeableConceptToUsageContext(t)); + tgt.setImmutable(src.getImmutable()); + tgt.setPurpose(src.getRequirements()); + tgt.setCopyright(src.getCopyright()); + tgt.setExtensible(src.getExtensible()); + if (src.hasCompose()) { + tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); + tgt.getCompose().setLockedDate(src.getLockedDate()); + } + if (src.hasCodeSystem() && advisor != null) { + org.hl7.fhir.r4.model.CodeSystem tgtcs = new org.hl7.fhir.r4.model.CodeSystem(); + copyDomainResource(src, tgtcs); + tgtcs.setUrl(src.getCodeSystem().getSystem()); + tgtcs.setIdentifier(convertIdentifier(src.getIdentifier())); + tgtcs.setVersion(src.getCodeSystem().getVersion()); + tgtcs.setName(src.getName()+" Code System"); + tgtcs.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgtcs.setExperimental(src.getExperimental()); + tgtcs.setPublisher(src.getPublisher()); + for (org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent t : src.getContact()) + tgtcs.addContact(convertValueSetContactComponent(t)); + if (src.hasDate()) + tgtcs.setDate(src.getDate()); + tgtcs.setDescription(src.getDescription()); + for (org.hl7.fhir.instance.model.CodeableConcept t : src.getUseContext()) + if (isJurisdiction(t)) + tgtcs.addJurisdiction(convertCodeableConcept(t)); + else + tgtcs.addUseContext(convertCodeableConceptToUsageContext(t)); + tgtcs.setPurpose(src.getRequirements()); + tgtcs.setCopyright(src.getCopyright()); + tgtcs.setContent(CodeSystemContentMode.COMPLETE); + tgtcs.setCaseSensitive(src.getCodeSystem().getCaseSensitive()); + for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent cs : src.getCodeSystem().getConcept()) + processConcept(tgtcs.getConcept(), cs, tgtcs); + advisor.handleCodeSystem(tgtcs, tgt); + tgt.setUserData("r2-cs", tgtcs); + tgt.getCompose().addInclude().setSystem(tgtcs.getUrl()); + } + tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet convertValueSet(org.hl7.fhir.r4.model.ValueSet src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet tgt = new org.hl7.fhir.instance.model.ValueSet(); + copyDomainResource(src, tgt); + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.r4.model.Identifier i : src.getIdentifier()) + tgt.setIdentifier(convertIdentifier(i)); + tgt.setVersion(src.getVersion()); + tgt.setName(src.getName()); + tgt.setStatus(convertConformanceResourceStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + tgt.setPublisher(src.getPublisher()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertValueSetContactComponent(t)); + if (src.hasDate()) + tgt.setDate(src.getDate()); + tgt.setLockedDate(src.getCompose().getLockedDate()); + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) + if (t.hasValueCodeableConcept()) + tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) + tgt.addUseContext(convertCodeableConcept(t)); + tgt.setImmutable(src.getImmutable()); + tgt.setRequirements(src.getPurpose()); + tgt.setCopyright(src.getCopyright()); + tgt.setExtensible(src.getExtensible()); + org.hl7.fhir.r4.model.CodeSystem srcCS = (CodeSystem) src.getUserData("r2-cs"); + if (srcCS == null) + srcCS = advisor.getCodeSystem(src); + if (srcCS != null) { + tgt.getCodeSystem().setSystem(srcCS.getUrl()); + tgt.getCodeSystem().setVersion(srcCS.getVersion()); + tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive()); + for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) + processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS); + + } + tgt.setCompose(convertValueSetComposeComponent(src.getCompose(), srcCS == null ? null : srcCS.getUrl())); + tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.UriType t : src.getImport()) + tgt.addInclude().addValueSet(t.getValue()); + for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getInclude()) + tgt.addInclude(convertConceptSetComponent(t)); + for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getExclude()) + tgt.addExclude(convertConceptSetComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetComposeComponent src, String noSystem) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent t : src.getInclude()) { + for (org.hl7.fhir.r4.model.UriType ti : t.getValueSet()) + tgt.addImport(ti.getValue()); + if (noSystem == null || !t.getSystem().equals(noSystem)) + tgt.addInclude(convertConceptSetComponent(t)); + } + for (org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent t : src.getExclude()) + tgt.addExclude(convertConceptSetComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ContactDetail convertValueSetContactComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent convertValueSetContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetContactComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent(); + copyElement(src, tgt); + tgt.setIdentifier(src.getIdentifier()); + tgt.setTimestamp(src.getTimestamp()); + tgt.setTotal(src.getTotal()); + tgt.setOffset(src.getOffset()); + for (org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) + tgt.addParameter(convertValueSetExpansionParameterComponent(t)); + for (org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) + tgt.addContains(convertValueSetExpansionContainsComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionComponent(); + copyElement(src, tgt); + tgt.setIdentifier(src.getIdentifier()); + tgt.setTimestamp(src.getTimestamp()); + tgt.setTotal(src.getTotal()); + tgt.setOffset(src.getOffset()); + for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) + tgt.addParameter(convertValueSetExpansionParameterComponent(t)); + for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) + tgt.addContains(convertValueSetExpansionContainsComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent(); + copyElement(src, tgt); + tgt.setSystem(src.getSystem()); + tgt.setAbstract(src.getAbstract()); + tgt.setVersion(src.getVersion()); + tgt.setCode(src.getCode()); + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) + tgt.addContains(convertValueSetExpansionContainsComponent(t)); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionContainsComponent(); + copyElement(src, tgt); + tgt.setSystem(src.getSystem()); + tgt.setAbstract(src.getAbstract()); + tgt.setVersion(src.getVersion()); + tgt.setCode(src.getCode()); + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) + tgt.addContains(convertValueSetExpansionContainsComponent(t)); + return tgt; + } + + public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent(); + copyElement(src, tgt); + tgt.setName(src.getName()); + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.instance.model.Contract.ValuedItemComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); + copyElement(src, tgt); + tgt.setEntity(convertType(src.getEntity())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setEffectiveTime(src.getEffectiveTime()); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + tgt.setFactor(src.getFactor()); + tgt.setPoints(src.getPoints()); + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public org.hl7.fhir.instance.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { + if (src == null || src.isEmpty()) + return null; + org.hl7.fhir.instance.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.instance.model.Contract.ValuedItemComponent(); + copyElement(src, tgt); + tgt.setEntity(convertType(src.getEntity())); + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + tgt.setEffectiveTime(src.getEffectiveTime()); + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + tgt.setFactor(src.getFactor()); + tgt.setPoints(src.getPoints()); + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public org.hl7.fhir.r4.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.instance.model.SearchParameter.XPathUsageType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NORMAL: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL; + case PHONETIC: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.PHONETIC; + case NEARBY: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NEARBY; + case DISTANCE: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.DISTANCE; + case OTHER: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.OTHER; + default: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NULL; + } + } + + public org.hl7.fhir.instance.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NORMAL: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.NORMAL; + case PHONETIC: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.PHONETIC; + case NEARBY: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.NEARBY; + case DISTANCE: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.DISTANCE; + case OTHER: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.OTHER; + default: return org.hl7.fhir.instance.model.SearchParameter.XPathUsageType.NULL; + } + } + + public void copyBackboneElement(org.hl7.fhir.instance.model.BackboneElement src, org.hl7.fhir.r4.model.BackboneElement tgt) throws FHIRException { + copyElement(src, tgt); + for (org.hl7.fhir.instance.model.Extension e : src.getModifierExtension()) { + tgt.addModifierExtension(convertExtension(e)); + } + } + + public void copyBackboneElement(org.hl7.fhir.r4.model.BackboneElement src, org.hl7.fhir.instance.model.BackboneElement tgt) throws FHIRException { + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Extension e : src.getModifierExtension()) { + tgt.addModifierExtension(convertExtension(e)); + } + } + + public void copyDomainResource(org.hl7.fhir.instance.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException { + copyResource(src, tgt); + tgt.setText(convertNarrative(src.getText())); + for (org.hl7.fhir.instance.model.Resource t : src.getContained()) + tgt.addContained(convertResource(t)); + for (org.hl7.fhir.instance.model.Extension t : src.getExtension()) + tgt.addExtension(convertExtension(t)); + for (org.hl7.fhir.instance.model.Extension t : src.getModifierExtension()) + tgt.addModifierExtension(convertExtension(t)); + } + + public void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.instance.model.DomainResource tgt) throws FHIRException { + copyResource(src, tgt); + tgt.setText(convertNarrative(src.getText())); + for (org.hl7.fhir.r4.model.Resource t : src.getContained()) + tgt.addContained(convertResource(t)); + for (org.hl7.fhir.r4.model.Extension t : src.getExtension()) + tgt.addExtension(convertExtension(t)); + for (org.hl7.fhir.r4.model.Extension t : src.getModifierExtension()) + tgt.addModifierExtension(convertExtension(t)); + } + + public void copyElement(org.hl7.fhir.instance.model.Element src, org.hl7.fhir.r4.model.Element tgt) throws FHIRException { + tgt.setId(src.getId()); + for (org.hl7.fhir.instance.model.Extension e : src.getExtension()) { + tgt.addExtension(convertExtension(e)); + } + } + + public void copyElement(org.hl7.fhir.r4.model.Element src, org.hl7.fhir.instance.model.Element tgt) throws FHIRException { + tgt.setId(src.getId()); + for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { + tgt.addExtension(convertExtension(e)); + } + } + + public void copyElement(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.instance.model.Element tgt) throws FHIRException { + tgt.setId(src.getId()); + for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { + tgt.addExtension(convertExtension(e)); + } + } + + public void copyResource(org.hl7.fhir.instance.model.Resource src, org.hl7.fhir.r4.model.Resource tgt) throws FHIRException { + tgt.setId(src.getId()); + tgt.setMeta(convertMeta(src.getMeta())); + tgt.setImplicitRules(src.getImplicitRules()); + tgt.setLanguage(src.getLanguage()); + } + + public void copyResource(org.hl7.fhir.r4.model.Resource src, org.hl7.fhir.instance.model.Resource tgt) throws FHIRException { + tgt.setId(src.getId()); + if (src.hasMeta()) + tgt.setMeta(convertMeta(src.getMeta())); + if (src.hasImplicitRules()) + tgt.setImplicitRules(src.getImplicitRules()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + } + + private ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) { + for (ConceptMapGroupComponent grp : map.getGroup()) { + if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts)) + return grp; + } + ConceptMapGroupComponent grp = map.addGroup(); + grp.setSource(srcs); + grp.setTarget(tgts); + return grp; + } + + private org.hl7.fhir.r4.model.Reference getPerformer(List practitioner) { + for (ImmunizationPractitionerComponent p : practitioner) { + if (hasConcept(p.getRole(), "http://hl7.org/fhir/v2/0443", "AP")) + return p.getActor(); + } + return null; + } + + private org.hl7.fhir.r4.model.Reference getRequester(List practitioner) { + for (ImmunizationPractitionerComponent p : practitioner) { + if (hasConcept(p.getRole(), "http://hl7.org/fhir/v2/0443", "OP")) + return p.getActor(); + } + return null; + } + + private boolean hasConcept(org.hl7.fhir.r4.model.CodeableConcept cc, String system, String code) { + for (org.hl7.fhir.r4.model.Coding c : cc.getCoding()) { + if (system.equals(c.getSystem()) && code.equals(c.getCode())) + return true; + } + return false; + } + + private boolean hasConcept(org.hl7.fhir.instance.model.CodeableConcept cc, String system, String code) { + for (org.hl7.fhir.instance.model.Coding c : cc.getCoding()) { + if (system.equals(c.getSystem()) && code.equals(c.getCode())) + return true; + } + return false; + } + + private void processConcept(List concepts, org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent cs, CodeSystem tgtcs) throws FHIRException { + org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent ct = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent(); + concepts.add(ct); + ct.setCode(cs.getCode()); + ct.setDisplay(cs.getDisplay()); + ct.setDefinition(cs.getDefinition()); + if (cs.getAbstract()) + CodeSystemUtilities.setNotSelectable(tgtcs, ct); + for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) { + org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent(); + cst.setLanguage(csd.getLanguage()); + cst.setUse(convertCoding(csd.getUse())); + cst.setValue(csd.getValue()); + } + + for (org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent csc : cs.getConcept()) + processConcept(ct.getConcept(), csc, tgtcs); + } + + private void processConcept(List concepts, ConceptDefinitionComponent cs, CodeSystem srcCS) throws FHIRException { + org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent ct = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionComponent(); + concepts.add(ct); + ct.setCode(cs.getCode()); + ct.setDisplay(cs.getDisplay()); + ct.setDefinition(cs.getDefinition()); + if (CodeSystemUtilities.isNotSelectable(srcCS, cs)) + ct.setAbstract(true); + for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) { + org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.instance.model.ValueSet.ConceptDefinitionDesignationComponent(); + cst.setLanguage(csd.getLanguage()); + cst.setUse(convertCoding(csd.getUse())); + cst.setValue(csd.getValue()); + } + + for (ConceptDefinitionComponent csc : cs.getConcept()) + processConcept(ct.getConcept(), csc, srcCS); + } + + private String tail(String base) { + return base.substring(base.lastIndexOf("/")+1); + } + + private static org.hl7.fhir.r4.model.Enumerations.PublicationStatus convertQuestionnaireStatus(org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT; + case PUBLISHED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE; + case RETIRED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED; + default: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL; + } + } + + private static org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus convertQuestionnaireStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.PUBLISHED; + case RETIRED: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.RETIRED; + default: return org.hl7.fhir.instance.model.Questionnaire.QuestionnaireStatus.NULL; + } + } + + private static boolean isJurisdiction(CodeableConcept t) { + return t.hasCoding() && ("http://unstats.un.org/unsd/methods/m49/m49.htm".equals(t.getCoding().get(0).getSystem()) || "urn:iso:std:iso:3166".equals(t.getCoding().get(0).getSystem()) + || "https://www.usps.com/".equals(t.getCoding().get(0).getSystem())); + } + + private class SourceElementComponentWrapper { + private String source; + private String target; + private org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent comp; + public SourceElementComponentWrapper(SourceElementComponent comp, String source, String target) { + super(); + this.source = source; + this.target = target; + this.comp = comp; + } + + } + } diff --git a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_30_40.java b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_30_40.java index ae24e4462b7..b00aa74a166 100644 --- a/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_30_40.java +++ b/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/VersionConvertor_30_40.java @@ -20,8 +20,8 @@ package org.hl7.fhir.convertors; * #L% */ - import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.Base64BinaryType; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; @@ -60,2756 +60,34 @@ import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; public class VersionConvertor_30_40 { - private static void copyElement(org.hl7.fhir.dstu3.model.Element src, org.hl7.fhir.r4.model.Element tgt) throws FHIRException { - if (src.hasId()) - tgt.setId(src.getId()); - for (org.hl7.fhir.dstu3.model.Extension e : src.getExtension()) { - tgt.addExtension(convertExtension(e)); - } - } - - private static void copyElement(org.hl7.fhir.r4.model.Element src, org.hl7.fhir.dstu3.model.Element tgt) throws FHIRException { - if (src.hasId()) - tgt.setId(src.getId()); - for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { - tgt.addExtension(convertExtension(e)); - } - } - - private static void copyBackboneElement(org.hl7.fhir.dstu3.model.BackboneElement src, org.hl7.fhir.r4.model.BackboneElement tgt) throws FHIRException { - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.Extension e : src.getModifierExtension()) { - tgt.addModifierExtension(convertExtension(e)); - } - } - - private static void copyBackboneElement(org.hl7.fhir.r4.model.BackboneElement src, org.hl7.fhir.dstu3.model.BackboneElement tgt) throws FHIRException { - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Extension e : src.getModifierExtension()) { - tgt.addModifierExtension(convertExtension(e)); - } - } - - public static org.hl7.fhir.r4.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.dstu3.model.Base64BinaryType src) throws FHIRException { - org.hl7.fhir.r4.model.Base64BinaryType tgt = new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.r4.model.Base64BinaryType src) throws FHIRException { - org.hl7.fhir.dstu3.model.Base64BinaryType tgt = new org.hl7.fhir.dstu3.model.Base64BinaryType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.BooleanType convertBoolean(org.hl7.fhir.dstu3.model.BooleanType src) throws FHIRException { - org.hl7.fhir.r4.model.BooleanType tgt = new org.hl7.fhir.r4.model.BooleanType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.BooleanType convertBoolean(org.hl7.fhir.r4.model.BooleanType src) throws FHIRException { - org.hl7.fhir.dstu3.model.BooleanType tgt = new org.hl7.fhir.dstu3.model.BooleanType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.CodeType convertCode(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException { - org.hl7.fhir.r4.model.CodeType tgt = new org.hl7.fhir.r4.model.CodeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException { - org.hl7.fhir.dstu3.model.CodeType tgt = new org.hl7.fhir.dstu3.model.CodeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.DateType convertDate(org.hl7.fhir.dstu3.model.DateType src) throws FHIRException { - org.hl7.fhir.r4.model.DateType tgt = new org.hl7.fhir.r4.model.DateType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DateType convertDate(org.hl7.fhir.r4.model.DateType src) throws FHIRException { - org.hl7.fhir.dstu3.model.DateType tgt = new org.hl7.fhir.dstu3.model.DateType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.DateTimeType convertDateTime(org.hl7.fhir.dstu3.model.DateTimeType src) throws FHIRException { - org.hl7.fhir.r4.model.DateTimeType tgt = new org.hl7.fhir.r4.model.DateTimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DateTimeType convertDateTime(org.hl7.fhir.r4.model.DateTimeType src) throws FHIRException { - org.hl7.fhir.dstu3.model.DateTimeType tgt = new org.hl7.fhir.dstu3.model.DateTimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.DecimalType convertDecimal(org.hl7.fhir.dstu3.model.DecimalType src) throws FHIRException { - org.hl7.fhir.r4.model.DecimalType tgt = new org.hl7.fhir.r4.model.DecimalType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DecimalType convertDecimal(org.hl7.fhir.r4.model.DecimalType src) throws FHIRException { - org.hl7.fhir.dstu3.model.DecimalType tgt = new org.hl7.fhir.dstu3.model.DecimalType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.dstu3.model.IdType src) throws FHIRException { - org.hl7.fhir.r4.model.IdType tgt = new org.hl7.fhir.r4.model.IdType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.IdType convertId(org.hl7.fhir.r4.model.IdType src) throws FHIRException { - org.hl7.fhir.dstu3.model.IdType tgt = new org.hl7.fhir.dstu3.model.IdType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.InstantType convertInstant(org.hl7.fhir.dstu3.model.InstantType src) throws FHIRException { - org.hl7.fhir.r4.model.InstantType tgt = new org.hl7.fhir.r4.model.InstantType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.InstantType convertInstant(org.hl7.fhir.r4.model.InstantType src) throws FHIRException { - org.hl7.fhir.dstu3.model.InstantType tgt = new org.hl7.fhir.dstu3.model.InstantType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.IntegerType convertInteger(org.hl7.fhir.dstu3.model.IntegerType src) throws FHIRException { - org.hl7.fhir.r4.model.IntegerType tgt = new org.hl7.fhir.r4.model.IntegerType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.IntegerType convertInteger(org.hl7.fhir.r4.model.IntegerType src) throws FHIRException { - org.hl7.fhir.dstu3.model.IntegerType tgt = new org.hl7.fhir.dstu3.model.IntegerType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.MarkdownType convertMarkdown(org.hl7.fhir.dstu3.model.MarkdownType src) throws FHIRException { - org.hl7.fhir.r4.model.MarkdownType tgt = new org.hl7.fhir.r4.model.MarkdownType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.MarkdownType convertMarkdown(org.hl7.fhir.r4.model.MarkdownType src) throws FHIRException { - org.hl7.fhir.dstu3.model.MarkdownType tgt = new org.hl7.fhir.dstu3.model.MarkdownType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.OidType convertOid(org.hl7.fhir.dstu3.model.OidType src) throws FHIRException { - org.hl7.fhir.r4.model.OidType tgt = new org.hl7.fhir.r4.model.OidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.OidType convertOid(org.hl7.fhir.r4.model.OidType src) throws FHIRException { - org.hl7.fhir.dstu3.model.OidType tgt = new org.hl7.fhir.dstu3.model.OidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.PositiveIntType convertPositiveInt(org.hl7.fhir.dstu3.model.PositiveIntType src) throws FHIRException { - org.hl7.fhir.r4.model.PositiveIntType tgt = new org.hl7.fhir.r4.model.PositiveIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PositiveIntType convertPositiveInt(org.hl7.fhir.r4.model.PositiveIntType src) throws FHIRException { - org.hl7.fhir.dstu3.model.PositiveIntType tgt = new org.hl7.fhir.dstu3.model.PositiveIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.StringType convertString(org.hl7.fhir.dstu3.model.StringType src) throws FHIRException { - org.hl7.fhir.r4.model.StringType tgt = new org.hl7.fhir.r4.model.StringType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.StringType convertString(org.hl7.fhir.r4.model.StringType src) throws FHIRException { - org.hl7.fhir.dstu3.model.StringType tgt = new org.hl7.fhir.dstu3.model.StringType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.TimeType convertTime(org.hl7.fhir.dstu3.model.TimeType src) throws FHIRException { - org.hl7.fhir.r4.model.TimeType tgt = new org.hl7.fhir.r4.model.TimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TimeType convertTime(org.hl7.fhir.r4.model.TimeType src) throws FHIRException { - org.hl7.fhir.dstu3.model.TimeType tgt = new org.hl7.fhir.dstu3.model.TimeType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.dstu3.model.UnsignedIntType src) throws FHIRException { - org.hl7.fhir.r4.model.UnsignedIntType tgt = new org.hl7.fhir.r4.model.UnsignedIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.r4.model.UnsignedIntType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UnsignedIntType tgt = new org.hl7.fhir.dstu3.model.UnsignedIntType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UriType tgt = new org.hl7.fhir.dstu3.model.UriType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.UuidType convertUuid(org.hl7.fhir.dstu3.model.UuidType src) throws FHIRException { - org.hl7.fhir.r4.model.UuidType tgt = new org.hl7.fhir.r4.model.UuidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.UuidType convertUuid(org.hl7.fhir.r4.model.UuidType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UuidType tgt = new org.hl7.fhir.dstu3.model.UuidType(src.getValue()); - copyElement(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.Extension convertExtension(org.hl7.fhir.dstu3.model.Extension src) throws FHIRException { + public static org.hl7.fhir.r4.model.Claim.AccidentComponent convertAccidentComponent(org.hl7.fhir.dstu3.model.Claim.AccidentComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Extension tgt = new org.hl7.fhir.r4.model.Extension(); + org.hl7.fhir.r4.model.Claim.AccidentComponent tgt = new org.hl7.fhir.r4.model.Claim.AccidentComponent(); copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Extension tgt = new org.hl7.fhir.dstu3.model.Extension(); - copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Narrative convertNarrative(org.hl7.fhir.dstu3.model.Narrative src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Narrative tgt = new org.hl7.fhir.r4.model.Narrative(); - copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(convertNarrativeStatus(src.getStatus())); - if (src.hasDiv()) - tgt.setDiv(src.getDiv()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Narrative convertNarrative(org.hl7.fhir.r4.model.Narrative src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Narrative tgt = new org.hl7.fhir.dstu3.model.Narrative(); - copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(convertNarrativeStatus(src.getStatus())); - if (src.hasDiv()) - tgt.setDiv(src.getDiv()); - return tgt; - } - - private static org.hl7.fhir.r4.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GENERATED: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.GENERATED; - case EXTENSIONS: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EXTENSIONS; - case ADDITIONAL: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.ADDITIONAL; - case EMPTY: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EMPTY; - default: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.r4.model.Narrative.NarrativeStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GENERATED: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED; - case EXTENSIONS: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.EXTENSIONS; - case ADDITIONAL: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.ADDITIONAL; - case EMPTY: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.EMPTY; - default: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.Age convertAge(org.hl7.fhir.dstu3.model.Age src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Age tgt = new org.hl7.fhir.r4.model.Age(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Age convertAge(org.hl7.fhir.r4.model.Age src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Age tgt = new org.hl7.fhir.dstu3.model.Age(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.Annotation convertAnnotation(org.hl7.fhir.dstu3.model.Annotation src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Annotation tgt = new org.hl7.fhir.r4.model.Annotation(); - copyElement(src, tgt); - if (src.hasAuthor()) - tgt.setAuthor(convertType(src.getAuthor())); - if (src.hasTime()) - tgt.setTime(src.getTime()); - if (src.hasText()) - tgt.setText(src.getText()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Annotation convertAnnotation(org.hl7.fhir.r4.model.Annotation src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Annotation tgt = new org.hl7.fhir.dstu3.model.Annotation(); - copyElement(src, tgt); - if (src.hasAuthor()) - tgt.setAuthor(convertType(src.getAuthor())); - if (src.hasTime()) - tgt.setTime(src.getTime()); - if (src.hasText()) - tgt.setText(src.getText()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Attachment convertAttachment(org.hl7.fhir.dstu3.model.Attachment src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Attachment tgt = new org.hl7.fhir.r4.model.Attachment(); - copyElement(src, tgt); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasData()) - tgt.setData(src.getData()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasSize()) - tgt.setSize(src.getSize()); - if (src.hasHash()) - tgt.setHash(src.getHash()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasCreation()) - tgt.setCreation(src.getCreation()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Attachment tgt = new org.hl7.fhir.dstu3.model.Attachment(); - copyElement(src, tgt); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasData()) - tgt.setData(src.getData()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasSize()) - tgt.setSize(src.getSize()); - if (src.hasHash()) - tgt.setHash(src.getHash()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasCreation()) - tgt.setCreation(src.getCreation()); - return tgt; - } - - public static org.hl7.fhir.r4.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CodeableConcept tgt = new org.hl7.fhir.r4.model.CodeableConcept(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.Coding t : src.getCoding()) - tgt.addCoding(convertCoding(t)); - if (src.hasText()) - tgt.setText(src.getText()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.r4.model.CodeableConcept src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CodeableConcept tgt = new org.hl7.fhir.dstu3.model.CodeableConcept(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Coding t : src.getCoding()) - tgt.addCoding(convertCoding(t)); - if (src.hasText()) - tgt.setText(src.getText()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Coding convertCoding(org.hl7.fhir.dstu3.model.Coding src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Coding tgt = new org.hl7.fhir.r4.model.Coding(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasUserSelected()) - tgt.setUserSelected(src.getUserSelected()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Coding convertCoding(org.hl7.fhir.r4.model.Coding src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Coding tgt = new org.hl7.fhir.dstu3.model.Coding(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasUserSelected()) - tgt.setUserSelected(src.getUserSelected()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Count convertCount(org.hl7.fhir.dstu3.model.Count src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Count tgt = new org.hl7.fhir.r4.model.Count(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Count convertCount(org.hl7.fhir.r4.model.Count src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Count tgt = new org.hl7.fhir.dstu3.model.Count(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.Distance convertDistance(org.hl7.fhir.dstu3.model.Distance src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Distance tgt = new org.hl7.fhir.r4.model.Distance(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Distance convertDistance(org.hl7.fhir.r4.model.Distance src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Distance tgt = new org.hl7.fhir.dstu3.model.Distance(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.dstu3.model.Duration src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Duration tgt = new org.hl7.fhir.dstu3.model.Duration(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Identifier tgt = new org.hl7.fhir.r4.model.Identifier(); - copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertIdentifierUse(src.getUse())); + if (src.hasDate()) + tgt.setDate(src.getDate()); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasAssigner()) - tgt.setAssigner(convertReference(src.getAssigner())); + if (src.hasLocation()) + tgt.setLocation(convertType(src.getLocation())); return tgt; } - public static org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.r4.model.Identifier src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Claim.AccidentComponent convertAccidentComponent(org.hl7.fhir.r4.model.Claim.AccidentComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier(); + org.hl7.fhir.dstu3.model.Claim.AccidentComponent tgt = new org.hl7.fhir.dstu3.model.Claim.AccidentComponent(); copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertIdentifierUse(src.getUse())); + if (src.hasDate()) + tgt.setDate(src.getDate()); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasAssigner()) - tgt.setAssigner(convertReference(src.getAssigner())); + if (src.hasLocation()) + tgt.setLocation(convertType(src.getLocation())); return tgt; } - private static org.hl7.fhir.r4.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.dstu3.model.Identifier.IdentifierUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case USUAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.USUAL; - case OFFICIAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.OFFICIAL; - case TEMP: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.TEMP; - case SECONDARY: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.SECONDARY; - default: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.r4.model.Identifier.IdentifierUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case USUAL: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.USUAL; - case OFFICIAL: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.OFFICIAL; - case TEMP: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.TEMP; - case SECONDARY: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.SECONDARY; - default: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.NULL; - } -} - - public static org.hl7.fhir.r4.model.Money convertMoney(org.hl7.fhir.dstu3.model.Money src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Money tgt = new org.hl7.fhir.r4.model.Money(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Money tgt = new org.hl7.fhir.dstu3.model.Money(); - copyQuantity(src, tgt); - return tgt; - } - - public static org.hl7.fhir.r4.model.Period convertPeriod(org.hl7.fhir.dstu3.model.Period src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Period tgt = new org.hl7.fhir.r4.model.Period(); - copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Period convertPeriod(org.hl7.fhir.r4.model.Period src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Period tgt = new org.hl7.fhir.dstu3.model.Period(); - copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - return tgt; - } - - public static void copyQuantity(org.hl7.fhir.dstu3.model.Quantity src, org.hl7.fhir.r4.model.Quantity tgt) throws FHIRException { - if (src == null || tgt == null) - return; - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasComparator()) - tgt.setComparator(convertQuantityComparator(src.getComparator())); - if (src.hasUnit()) - tgt.setUnit(src.getUnit()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - } - - public static void copyQuantity(org.hl7.fhir.r4.model.Quantity src, org.hl7.fhir.dstu3.model.Quantity tgt) throws FHIRException { - if (src == null || tgt == null) - return; - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasComparator()) - tgt.setComparator(convertQuantityComparator(src.getComparator())); - if (src.hasUnit()) - tgt.setUnit(src.getUnit()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); -} - - public static org.hl7.fhir.r4.model.Quantity convertQuantity(org.hl7.fhir.dstu3.model.Quantity src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Quantity tgt = new org.hl7.fhir.r4.model.Quantity(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasComparator()) - tgt.setComparator(convertQuantityComparator(src.getComparator())); - if (src.hasUnit()) - tgt.setUnit(src.getUnit()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Quantity convertQuantity(org.hl7.fhir.r4.model.Quantity src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Quantity tgt = new org.hl7.fhir.dstu3.model.Quantity(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasComparator()) - tgt.setComparator(convertQuantityComparator(src.getComparator())); - if (src.hasUnit()) - tgt.setUnit(src.getUnit()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - return tgt; - } - - private static org.hl7.fhir.r4.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.dstu3.model.Quantity.QuantityComparator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LESS_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_THAN; - case LESS_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_OR_EQUAL; - case GREATER_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; - case GREATER_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_THAN; - default: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.r4.model.Quantity.QuantityComparator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LESS_THAN: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.LESS_THAN; - case LESS_OR_EQUAL: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.LESS_OR_EQUAL; - case GREATER_OR_EQUAL: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; - case GREATER_THAN: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.GREATER_THAN; - default: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.NULL; - } -} - - public static org.hl7.fhir.r4.model.Range convertRange(org.hl7.fhir.dstu3.model.Range src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Range tgt = new org.hl7.fhir.r4.model.Range(); - copyElement(src, tgt); - if (src.hasLow()) - tgt.setLow(convertSimpleQuantity(src.getLow())); - if (src.hasHigh()) - tgt.setHigh(convertSimpleQuantity(src.getHigh())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Range convertRange(org.hl7.fhir.r4.model.Range src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Range tgt = new org.hl7.fhir.dstu3.model.Range(); - copyElement(src, tgt); - if (src.hasLow()) - tgt.setLow(convertSimpleQuantity(src.getLow())); - if (src.hasHigh()) - tgt.setHigh(convertSimpleQuantity(src.getHigh())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Ratio convertRatio(org.hl7.fhir.dstu3.model.Ratio src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Ratio tgt = new org.hl7.fhir.r4.model.Ratio(); - copyElement(src, tgt); - if (src.hasNumerator()) - tgt.setNumerator(convertQuantity(src.getNumerator())); - if (src.hasDenominator()) - tgt.setDenominator(convertQuantity(src.getDenominator())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Ratio convertRatio(org.hl7.fhir.r4.model.Ratio src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Ratio tgt = new org.hl7.fhir.dstu3.model.Ratio(); - copyElement(src, tgt); - if (src.hasNumerator()) - tgt.setNumerator(convertQuantity(src.getNumerator())); - if (src.hasDenominator()) - tgt.setDenominator(convertQuantity(src.getDenominator())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); - copyElement(src, tgt); - if (src.hasReference()) - tgt.setReference(src.getReference()); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Reference convertReference(org.hl7.fhir.r4.model.Reference src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Reference tgt = new org.hl7.fhir.dstu3.model.Reference(); - copyElement(src, tgt); - if (src.hasReference()) - tgt.setReference(src.getReference()); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - return tgt; - } - - public static org.hl7.fhir.r4.model.SampledData convertSampledData(org.hl7.fhir.dstu3.model.SampledData src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.SampledData tgt = new org.hl7.fhir.r4.model.SampledData(); - copyElement(src, tgt); - if (src.hasOrigin()) - tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); - if (src.hasPeriod()) - tgt.setPeriod(src.getPeriod()); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasLowerLimit()) - tgt.setLowerLimit(src.getLowerLimit()); - if (src.hasUpperLimit()) - tgt.setUpperLimit(src.getUpperLimit()); - if (src.hasDimensions()) - tgt.setDimensions(src.getDimensions()); - if (src.hasData()) - tgt.setData(src.getData()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.SampledData convertSampledData(org.hl7.fhir.r4.model.SampledData src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.SampledData tgt = new org.hl7.fhir.dstu3.model.SampledData(); - copyElement(src, tgt); - if (src.hasOrigin()) - tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); - if (src.hasPeriod()) - tgt.setPeriod(src.getPeriod()); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasLowerLimit()) - tgt.setLowerLimit(src.getLowerLimit()); - if (src.hasUpperLimit()) - tgt.setUpperLimit(src.getUpperLimit()); - if (src.hasDimensions()) - tgt.setDimensions(src.getDimensions()); - if (src.hasData()) - tgt.setData(src.getData()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Signature convertSignature(org.hl7.fhir.dstu3.model.Signature src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Signature tgt = new org.hl7.fhir.r4.model.Signature(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - if (src.hasWhen()) - tgt.setWhen(src.getWhen()); - if (src.hasWho()) - tgt.setWho(convertType(src.getWho())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertType(src.getOnBehalfOf())); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); - if (src.hasBlob()) - tgt.setBlob(src.getBlob()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Signature convertSignature(org.hl7.fhir.r4.model.Signature src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Signature tgt = new org.hl7.fhir.dstu3.model.Signature(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - if (src.hasWhen()) - tgt.setWhen(src.getWhen()); - if (src.hasWho()) - tgt.setWho(convertType(src.getWho())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertType(src.getOnBehalfOf())); - if (src.hasContentType()) - tgt.setContentType(src.getContentType()); - if (src.hasBlob()) - tgt.setBlob(src.getBlob()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Address tgt = new org.hl7.fhir.r4.model.Address(); - copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertAddressUse(src.getUse())); - if (src.hasType()) - tgt.setType(convertAddressType(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getLine()) - tgt.addLine(t.getValue()); - if (src.hasCity()) - tgt.setCity(src.getCity()); - if (src.hasDistrict()) - tgt.setDistrict(src.getDistrict()); - if (src.hasState()) - tgt.setState(src.getState()); - if (src.hasPostalCode()) - tgt.setPostalCode(src.getPostalCode()); - if (src.hasCountry()) - tgt.setCountry(src.getCountry()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Address convertAddress(org.hl7.fhir.r4.model.Address src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Address tgt = new org.hl7.fhir.dstu3.model.Address(); - copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertAddressUse(src.getUse())); - if (src.hasType()) - tgt.setType(convertAddressType(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - for (org.hl7.fhir.r4.model.StringType t : src.getLine()) - tgt.addLine(t.getValue()); - if (src.hasCity()) - tgt.setCity(src.getCity()); - if (src.hasDistrict()) - tgt.setDistrict(src.getDistrict()); - if (src.hasState()) - tgt.setState(src.getState()); - if (src.hasPostalCode()) - tgt.setPostalCode(src.getPostalCode()); - if (src.hasCountry()) - tgt.setCountry(src.getCountry()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Address.AddressUse convertAddressUse(org.hl7.fhir.dstu3.model.Address.AddressUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HOME: return org.hl7.fhir.r4.model.Address.AddressUse.HOME; - case WORK: return org.hl7.fhir.r4.model.Address.AddressUse.WORK; - case TEMP: return org.hl7.fhir.r4.model.Address.AddressUse.TEMP; - case OLD: return org.hl7.fhir.r4.model.Address.AddressUse.OLD; - default: return org.hl7.fhir.r4.model.Address.AddressUse.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Address.AddressUse convertAddressUse(org.hl7.fhir.r4.model.Address.AddressUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HOME: return org.hl7.fhir.dstu3.model.Address.AddressUse.HOME; - case WORK: return org.hl7.fhir.dstu3.model.Address.AddressUse.WORK; - case TEMP: return org.hl7.fhir.dstu3.model.Address.AddressUse.TEMP; - case OLD: return org.hl7.fhir.dstu3.model.Address.AddressUse.OLD; - default: return org.hl7.fhir.dstu3.model.Address.AddressUse.NULL; - } -} - - private static org.hl7.fhir.r4.model.Address.AddressType convertAddressType(org.hl7.fhir.dstu3.model.Address.AddressType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case POSTAL: return org.hl7.fhir.r4.model.Address.AddressType.POSTAL; - case PHYSICAL: return org.hl7.fhir.r4.model.Address.AddressType.PHYSICAL; - case BOTH: return org.hl7.fhir.r4.model.Address.AddressType.BOTH; - default: return org.hl7.fhir.r4.model.Address.AddressType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Address.AddressType convertAddressType(org.hl7.fhir.r4.model.Address.AddressType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case POSTAL: return org.hl7.fhir.dstu3.model.Address.AddressType.POSTAL; - case PHYSICAL: return org.hl7.fhir.dstu3.model.Address.AddressType.PHYSICAL; - case BOTH: return org.hl7.fhir.dstu3.model.Address.AddressType.BOTH; - default: return org.hl7.fhir.dstu3.model.Address.AddressType.NULL; - } -} - - public static org.hl7.fhir.r4.model.ContactDetail convertContactDetail(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ContactDetail convertContactDetail(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ContactPoint convertContactPoint(org.hl7.fhir.dstu3.model.ContactPoint src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ContactPoint tgt = new org.hl7.fhir.r4.model.ContactPoint(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(convertContactPointSystem(src.getSystem())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasUse()) - tgt.setUse(convertContactPointUse(src.getUse())); - if (src.hasRank()) - tgt.setRank(src.getRank()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ContactPoint convertContactPoint(org.hl7.fhir.r4.model.ContactPoint src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ContactPoint tgt = new org.hl7.fhir.dstu3.model.ContactPoint(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(convertContactPointSystem(src.getSystem())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasUse()) - tgt.setUse(convertContactPointUse(src.getUse())); - if (src.hasRank()) - tgt.setRank(src.getRank()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - private static org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem convertContactPointSystem(org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PHONE: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.PHONE; - case FAX: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.FAX; - case EMAIL: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.EMAIL; - case PAGER: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.PAGER; - case URL: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.URL; - case SMS: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.SMS; - case OTHER: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.OTHER; - default: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem convertContactPointSystem(org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PHONE: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.PHONE; - case FAX: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.FAX; - case EMAIL: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.EMAIL; - case PAGER: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.PAGER; - case URL: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.URL; - case SMS: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.SMS; - case OTHER: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.OTHER; - default: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.NULL; - } -} - - private static org.hl7.fhir.r4.model.ContactPoint.ContactPointUse convertContactPointUse(org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HOME: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.HOME; - case WORK: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.WORK; - case TEMP: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.TEMP; - case OLD: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.OLD; - case MOBILE: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.MOBILE; - default: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse convertContactPointUse(org.hl7.fhir.r4.model.ContactPoint.ContactPointUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HOME: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.HOME; - case WORK: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.WORK; - case TEMP: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.TEMP; - case OLD: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.OLD; - case MOBILE: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.MOBILE; - default: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.NULL; - } -} - - public static org.hl7.fhir.r4.model.Contributor convertContributor(org.hl7.fhir.dstu3.model.Contributor src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contributor tgt = new org.hl7.fhir.r4.model.Contributor(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertContributorType(src.getType())); - if (src.hasName()) - tgt.setName(src.getName()); - for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contributor convertContributor(org.hl7.fhir.r4.model.Contributor src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contributor tgt = new org.hl7.fhir.dstu3.model.Contributor(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertContributorType(src.getType())); - if (src.hasName()) - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.Contributor.ContributorType convertContributorType(org.hl7.fhir.dstu3.model.Contributor.ContributorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AUTHOR: return org.hl7.fhir.r4.model.Contributor.ContributorType.AUTHOR; - case EDITOR: return org.hl7.fhir.r4.model.Contributor.ContributorType.EDITOR; - case REVIEWER: return org.hl7.fhir.r4.model.Contributor.ContributorType.REVIEWER; - case ENDORSER: return org.hl7.fhir.r4.model.Contributor.ContributorType.ENDORSER; - default: return org.hl7.fhir.r4.model.Contributor.ContributorType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Contributor.ContributorType convertContributorType(org.hl7.fhir.r4.model.Contributor.ContributorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AUTHOR: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.AUTHOR; - case EDITOR: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.EDITOR; - case REVIEWER: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.REVIEWER; - case ENDORSER: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.ENDORSER; - default: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.NULL; - } -} - - public static org.hl7.fhir.r4.model.DataRequirement convertDataRequirement(org.hl7.fhir.dstu3.model.DataRequirement src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DataRequirement tgt = new org.hl7.fhir.r4.model.DataRequirement(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) - tgt.addProfile(t.getValue()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getMustSupport()) - tgt.addMustSupport(t.getValue()); - for (org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementCodeFilterComponent t : src.getCodeFilter()) - tgt.addCodeFilter(convertDataRequirementCodeFilterComponent(t)); - for (org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementDateFilterComponent t : src.getDateFilter()) - tgt.addDateFilter(convertDataRequirementDateFilterComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DataRequirement convertDataRequirement(org.hl7.fhir.r4.model.DataRequirement src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DataRequirement tgt = new org.hl7.fhir.dstu3.model.DataRequirement(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - for (org.hl7.fhir.r4.model.UriType t : src.getProfile()) - tgt.addProfile(t.getValue()); - for (org.hl7.fhir.r4.model.StringType t : src.getMustSupport()) - tgt.addMustSupport(t.getValue()); - for (org.hl7.fhir.r4.model.DataRequirement.DataRequirementCodeFilterComponent t : src.getCodeFilter()) - tgt.addCodeFilter(convertDataRequirementCodeFilterComponent(t)); - for (org.hl7.fhir.r4.model.DataRequirement.DataRequirementDateFilterComponent t : src.getDateFilter()) - tgt.addDateFilter(convertDataRequirementDateFilterComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.DataRequirement.DataRequirementCodeFilterComponent convertDataRequirementCodeFilterComponent(org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementCodeFilterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DataRequirement.DataRequirementCodeFilterComponent tgt = new org.hl7.fhir.r4.model.DataRequirement.DataRequirementCodeFilterComponent(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasValueSet()) - tgt.setValueSet(convertType(src.getValueSet())); - for (org.hl7.fhir.dstu3.model.CodeType t : src.getValueCode()) - tgt.addValueCode(t.getValue()); - for (org.hl7.fhir.dstu3.model.Coding t : src.getValueCoding()) - tgt.addValueCoding(convertCoding(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getValueCodeableConcept()) - tgt.addValueCodeableConcept(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementCodeFilterComponent convertDataRequirementCodeFilterComponent(org.hl7.fhir.r4.model.DataRequirement.DataRequirementCodeFilterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementCodeFilterComponent tgt = new org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementCodeFilterComponent(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasValueSet()) - tgt.setValueSet(convertType(src.getValueSet())); - for (org.hl7.fhir.r4.model.CodeType t : src.getValueCode()) - tgt.addValueCode(t.getValue()); - for (org.hl7.fhir.r4.model.Coding t : src.getValueCoding()) - tgt.addValueCoding(convertCoding(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getValueCodeableConcept()) - tgt.addValueCodeableConcept(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.DataRequirement.DataRequirementDateFilterComponent convertDataRequirementDateFilterComponent(org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementDateFilterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DataRequirement.DataRequirementDateFilterComponent tgt = new org.hl7.fhir.r4.model.DataRequirement.DataRequirementDateFilterComponent(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementDateFilterComponent convertDataRequirementDateFilterComponent(org.hl7.fhir.r4.model.DataRequirement.DataRequirementDateFilterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementDateFilterComponent tgt = new org.hl7.fhir.dstu3.model.DataRequirement.DataRequirementDateFilterComponent(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Dosage convertDosage(org.hl7.fhir.dstu3.model.Dosage src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasText()) - tgt.setText(src.getText()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAdditionalInstruction()) - tgt.addAdditionalInstruction(convertCodeableConcept(t)); - if (src.hasPatientInstruction()) - tgt.setPatientInstruction(src.getPatientInstruction()); - if (src.hasTiming()) - tgt.setTiming(convertTiming(src.getTiming())); - if (src.hasAsNeeded()) - tgt.setAsNeeded(convertType(src.getAsNeeded())); - if (src.hasSite()) - tgt.setSite(convertCodeableConcept(src.getSite())); - if (src.hasRoute()) - tgt.setRoute(convertCodeableConcept(src.getRoute())); - if (src.hasMethod()) - tgt.setMethod(convertCodeableConcept(src.getMethod())); - if (src.hasDose()) - tgt.setDose(convertType(src.getDose())); - if (src.hasMaxDosePerPeriod()) - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); - if (src.hasMaxDosePerAdministration()) - tgt.setMaxDosePerAdministration(convertSimpleQuantity(src.getMaxDosePerAdministration())); - if (src.hasMaxDosePerLifetime()) - tgt.setMaxDosePerLifetime(convertSimpleQuantity(src.getMaxDosePerLifetime())); - if (src.hasRate()) - tgt.setRate(convertType(src.getRate())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Dosage convertDosage(org.hl7.fhir.r4.model.Dosage src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Dosage tgt = new org.hl7.fhir.dstu3.model.Dosage(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasText()) - tgt.setText(src.getText()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAdditionalInstruction()) - tgt.addAdditionalInstruction(convertCodeableConcept(t)); - if (src.hasPatientInstruction()) - tgt.setPatientInstruction(src.getPatientInstruction()); - if (src.hasTiming()) - tgt.setTiming(convertTiming(src.getTiming())); - if (src.hasAsNeeded()) - tgt.setAsNeeded(convertType(src.getAsNeeded())); - if (src.hasSite()) - tgt.setSite(convertCodeableConcept(src.getSite())); - if (src.hasRoute()) - tgt.setRoute(convertCodeableConcept(src.getRoute())); - if (src.hasMethod()) - tgt.setMethod(convertCodeableConcept(src.getMethod())); - if (src.hasDose()) - tgt.setDose(convertType(src.getDose())); - if (src.hasMaxDosePerPeriod()) - tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); - if (src.hasMaxDosePerAdministration()) - tgt.setMaxDosePerAdministration(convertSimpleQuantity(src.getMaxDosePerAdministration())); - if (src.hasMaxDosePerLifetime()) - tgt.setMaxDosePerLifetime(convertSimpleQuantity(src.getMaxDosePerLifetime())); - if (src.hasRate()) - tgt.setRate(convertType(src.getRate())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ElementDefinition convertElementDefinition(org.hl7.fhir.dstu3.model.ElementDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition tgt = new org.hl7.fhir.r4.model.ElementDefinition(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - for (org.hl7.fhir.dstu3.model.Enumeration t : src.getRepresentation()) - tgt.addRepresentation(convertPropertyRepresentation(t.getValue())); - if (src.hasSliceName()) - tgt.setSliceName(src.getSliceName()); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) - tgt.addCode(convertCoding(t)); - if (src.hasSlicing()) - tgt.setSlicing(convertElementDefinitionSlicingComponent(src.getSlicing())); - if (src.hasShort()) - tgt.setShort(src.getShort()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasRequirements()) - tgt.setRequirements(src.getRequirements()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) - tgt.addAlias(t.getValue()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasBase()) - tgt.setBase(convertElementDefinitionBaseComponent(src.getBase())); - if (src.hasContentReference()) - tgt.setContentReference(src.getContentReference()); - for (org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent t : src.getType()) - tgt.addType(convertTypeRefComponent(t)); - if (src.hasDefaultValue()) - tgt.setDefaultValue(convertType(src.getDefaultValue())); - if (src.hasMeaningWhenMissing()) - tgt.setMeaningWhenMissing(src.getMeaningWhenMissing()); - if (src.hasOrderMeaning()) - tgt.setOrderMeaning(src.getOrderMeaning()); - if (src.hasFixed()) - tgt.setFixed(convertType(src.getFixed())); - if (src.hasPattern()) - tgt.setPattern(convertType(src.getPattern())); - for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent t : src.getExample()) - tgt.addExample(convertElementDefinitionExampleComponent(t)); - if (src.hasMinValue()) - tgt.setMinValue(convertType(src.getMinValue())); - if (src.hasMaxValue()) - tgt.setMaxValue(convertType(src.getMaxValue())); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); - for (org.hl7.fhir.dstu3.model.IdType t : src.getCondition()) - tgt.addCondition(t.getValue()); - for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent t : src.getConstraint()) - tgt.addConstraint(convertElementDefinitionConstraintComponent(t)); - if (src.hasMustSupport()) - tgt.setMustSupport(src.getMustSupport()); - if (src.hasIsModifier()) - tgt.setIsModifier(src.getIsModifier()); - if (src.hasIsSummary()) - tgt.setIsSummary(src.getIsSummary()); - if (src.hasBinding()) - tgt.setBinding(convertElementDefinitionBindingComponent(src.getBinding())); - for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent t : src.getMapping()) - tgt.addMapping(convertElementDefinitionMappingComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition convertElementDefinition(org.hl7.fhir.r4.model.ElementDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition tgt = new org.hl7.fhir.dstu3.model.ElementDefinition(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - for (org.hl7.fhir.r4.model.Enumeration t : src.getRepresentation()) - tgt.addRepresentation(convertPropertyRepresentation(t.getValue())); - if (src.hasSliceName()) - tgt.setSliceName(src.getSliceName()); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - for (org.hl7.fhir.r4.model.Coding t : src.getCode()) - tgt.addCode(convertCoding(t)); - if (src.hasSlicing()) - tgt.setSlicing(convertElementDefinitionSlicingComponent(src.getSlicing())); - if (src.hasShort()) - tgt.setShort(src.getShort()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasRequirements()) - tgt.setRequirements(src.getRequirements()); - for (org.hl7.fhir.r4.model.StringType t : src.getAlias()) - tgt.addAlias(t.getValue()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasBase()) - tgt.setBase(convertElementDefinitionBaseComponent(src.getBase())); - if (src.hasContentReference()) - tgt.setContentReference(src.getContentReference()); - for (org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent t : src.getType()) - tgt.addType(convertTypeRefComponent(t)); - if (src.hasDefaultValue()) - tgt.setDefaultValue(convertType(src.getDefaultValue())); - if (src.hasMeaningWhenMissing()) - tgt.setMeaningWhenMissing(src.getMeaningWhenMissing()); - if (src.hasOrderMeaning()) - tgt.setOrderMeaning(src.getOrderMeaning()); - if (src.hasFixed()) - tgt.setFixed(convertType(src.getFixed())); - if (src.hasPattern()) - tgt.setPattern(convertType(src.getPattern())); - for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent t : src.getExample()) - tgt.addExample(convertElementDefinitionExampleComponent(t)); - if (src.hasMinValue()) - tgt.setMinValue(convertType(src.getMinValue())); - if (src.hasMaxValue()) - tgt.setMaxValue(convertType(src.getMaxValue())); - if (src.hasMaxLength()) - tgt.setMaxLength(src.getMaxLength()); - for (org.hl7.fhir.r4.model.IdType t : src.getCondition()) - tgt.addCondition(t.getValue()); - for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent t : src.getConstraint()) - tgt.addConstraint(convertElementDefinitionConstraintComponent(t)); - if (src.hasMustSupport()) - tgt.setMustSupport(src.getMustSupport()); - if (src.hasIsModifier()) - tgt.setIsModifier(src.getIsModifier()); - if (src.hasIsSummary()) - tgt.setIsSummary(src.getIsSummary()); - if (src.hasBinding()) - tgt.setBinding(convertElementDefinitionBindingComponent(src.getBinding())); - for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent t : src.getMapping()) - tgt.addMapping(convertElementDefinitionMappingComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case XMLATTR: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XMLATTR; - case XMLTEXT: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XMLTEXT; - case TYPEATTR: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.TYPEATTR; - case CDATEXT: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.CDATEXT; - case XHTML: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XHTML; - default: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case XMLATTR: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.XMLATTR; - case XMLTEXT: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.XMLTEXT; - case TYPEATTR: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.TYPEATTR; - case CDATEXT: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.CDATEXT; - case XHTML: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.XHTML; - default: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.NULL; - } -} - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent t : src.getDiscriminator()) - tgt.addDiscriminator(convertElementDefinitionSlicingDiscriminatorComponent(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOrdered()) - tgt.setOrdered(src.getOrdered()); - if (src.hasRules()) - tgt.setRules(convertSlicingRules(src.getRules())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent t : src.getDiscriminator()) - tgt.addDiscriminator(convertElementDefinitionSlicingDiscriminatorComponent(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasOrdered()) - tgt.setOrdered(src.getOrdered()); - if (src.hasRules()) - tgt.setRules(convertSlicingRules(src.getRules())); - return tgt; - } - - private static org.hl7.fhir.r4.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLOSED: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.CLOSED; - case OPEN: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPEN; - case OPENATEND: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPENATEND; - default: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.r4.model.ElementDefinition.SlicingRules src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLOSED: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.CLOSED; - case OPEN: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.OPEN; - case OPENATEND: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.OPENATEND; - default: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.NULL; - } -} - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent convertElementDefinitionSlicingDiscriminatorComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertDiscriminatorType(src.getType())); - if (src.hasPath()) - tgt.setPath(src.getPath()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent convertElementDefinitionSlicingDiscriminatorComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertDiscriminatorType(src.getType())); - if (src.hasPath()) - tgt.setPath(src.getPath()); - return tgt; - } - - private static org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType convertDiscriminatorType(org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case VALUE: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.VALUE; - case EXISTS: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.EXISTS; - case PATTERN: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.PATTERN; - case TYPE: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.TYPE; - case PROFILE: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.PROFILE; - default: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType convertDiscriminatorType(org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case VALUE: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.VALUE; - case EXISTS: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.EXISTS; - case PATTERN: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.PATTERN; - case TYPE: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.TYPE; - case PROFILE: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.PROFILE; - default: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.NULL; - } -} - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent(); - copyElement(src, tgt); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent convertTypeRefComponent(org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); - if (src.hasTargetProfile()) - tgt.setTargetProfile(src.getTargetProfile()); - for (org.hl7.fhir.dstu3.model.Enumeration t : src.getAggregation()) - tgt.addAggregation(convertAggregationMode(t.getValue())); - if (src.hasVersioning()) - tgt.setVersioning(convertReferenceVersionRules(src.getVersioning())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent convertTypeRefComponent(org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); - if (src.hasTargetProfile()) - tgt.setTargetProfile(src.getTargetProfile()); - for (org.hl7.fhir.r4.model.Enumeration t : src.getAggregation()) - tgt.addAggregation(convertAggregationMode(t.getValue())); - if (src.hasVersioning()) - tgt.setVersioning(convertReferenceVersionRules(src.getVersioning())); - return tgt; - } - - private static org.hl7.fhir.r4.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONTAINED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.CONTAINED; - case REFERENCED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.REFERENCED; - case BUNDLED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.BUNDLED; - default: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.r4.model.ElementDefinition.AggregationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONTAINED: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.CONTAINED; - case REFERENCED: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.REFERENCED; - case BUNDLED: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.BUNDLED; - default: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.NULL; - } -} - - private static org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules convertReferenceVersionRules(org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EITHER: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.EITHER; - case INDEPENDENT: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.INDEPENDENT; - case SPECIFIC: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.SPECIFIC; - default: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules convertReferenceVersionRules(org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EITHER: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.EITHER; - case INDEPENDENT: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.INDEPENDENT; - case SPECIFIC: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.SPECIFIC; - default: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.NULL; - } -} - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent convertElementDefinitionExampleComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent convertElementDefinitionExampleComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent(); - copyElement(src, tgt); - if (src.hasKey()) - tgt.setKey(src.getKey()); - if (src.hasRequirements()) - tgt.setRequirements(src.getRequirements()); - if (src.hasSeverity()) - tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); - if (src.hasHuman()) - tgt.setHuman(src.getHuman()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); - if (src.hasSource()) - tgt.setSource(src.getSource()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent(); - copyElement(src, tgt); - if (src.hasKey()) - tgt.setKey(src.getKey()); - if (src.hasRequirements()) - tgt.setRequirements(src.getRequirements()); - if (src.hasSeverity()) - tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); - if (src.hasHuman()) - tgt.setHuman(src.getHuman()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasXpath()) - tgt.setXpath(src.getXpath()); - if (src.hasSource()) - tgt.setSource(src.getSource()); - return tgt; - } - - private static org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ERROR: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.ERROR; - case WARNING: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.WARNING; - default: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ERROR: return org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity.ERROR; - case WARNING: return org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity.WARNING; - default: return org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity.NULL; - } -} - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent(); - copyElement(src, tgt); - if (src.hasStrength()) - tgt.setStrength(convertBindingStrength(src.getStrength())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasValueSet()) - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent(); - copyElement(src, tgt); - if (src.hasStrength()) - tgt.setStrength(convertBindingStrength(src.getStrength())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasValueSet()) - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.dstu3.model.Enumerations.BindingStrength src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.REQUIRED; - case EXTENSIBLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXTENSIBLE; - case PREFERRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.PREFERRED; - case EXAMPLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXAMPLE; - default: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.r4.model.Enumerations.BindingStrength src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.REQUIRED; - case EXTENSIBLE: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.EXTENSIBLE; - case PREFERRED: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.PREFERRED; - case EXAMPLE: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.EXAMPLE; - default: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.NULL; - } -} - - public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent(); - copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasMap()) - tgt.setMap(src.getMap()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent(); - copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasMap()) - tgt.setMap(src.getMap()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - return tgt; - } - - public static org.hl7.fhir.r4.model.HumanName convertHumanName(org.hl7.fhir.dstu3.model.HumanName src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.HumanName tgt = new org.hl7.fhir.r4.model.HumanName(); - copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertNameUse(src.getUse())); - if (src.hasText()) - tgt.setText(src.getText()); - if (src.hasFamily()) - tgt.setFamily(src.getFamily()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getGiven()) - tgt.addGiven(t.getValue()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getPrefix()) - tgt.addPrefix(t.getValue()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getSuffix()) - tgt.addSuffix(t.getValue()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.HumanName convertHumanName(org.hl7.fhir.r4.model.HumanName src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.HumanName tgt = new org.hl7.fhir.dstu3.model.HumanName(); - copyElement(src, tgt); - if (src.hasUse()) - tgt.setUse(convertNameUse(src.getUse())); - if (src.hasText()) - tgt.setText(src.getText()); - if (src.hasFamily()) - tgt.setFamily(src.getFamily()); - for (org.hl7.fhir.r4.model.StringType t : src.getGiven()) - tgt.addGiven(t.getValue()); - for (org.hl7.fhir.r4.model.StringType t : src.getPrefix()) - tgt.addPrefix(t.getValue()); - for (org.hl7.fhir.r4.model.StringType t : src.getSuffix()) - tgt.addSuffix(t.getValue()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - private static org.hl7.fhir.r4.model.HumanName.NameUse convertNameUse(org.hl7.fhir.dstu3.model.HumanName.NameUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case USUAL: return org.hl7.fhir.r4.model.HumanName.NameUse.USUAL; - case OFFICIAL: return org.hl7.fhir.r4.model.HumanName.NameUse.OFFICIAL; - case TEMP: return org.hl7.fhir.r4.model.HumanName.NameUse.TEMP; - case NICKNAME: return org.hl7.fhir.r4.model.HumanName.NameUse.NICKNAME; - case ANONYMOUS: return org.hl7.fhir.r4.model.HumanName.NameUse.ANONYMOUS; - case OLD: return org.hl7.fhir.r4.model.HumanName.NameUse.OLD; - case MAIDEN: return org.hl7.fhir.r4.model.HumanName.NameUse.MAIDEN; - default: return org.hl7.fhir.r4.model.HumanName.NameUse.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.HumanName.NameUse convertNameUse(org.hl7.fhir.r4.model.HumanName.NameUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case USUAL: return org.hl7.fhir.dstu3.model.HumanName.NameUse.USUAL; - case OFFICIAL: return org.hl7.fhir.dstu3.model.HumanName.NameUse.OFFICIAL; - case TEMP: return org.hl7.fhir.dstu3.model.HumanName.NameUse.TEMP; - case NICKNAME: return org.hl7.fhir.dstu3.model.HumanName.NameUse.NICKNAME; - case ANONYMOUS: return org.hl7.fhir.dstu3.model.HumanName.NameUse.ANONYMOUS; - case OLD: return org.hl7.fhir.dstu3.model.HumanName.NameUse.OLD; - case MAIDEN: return org.hl7.fhir.dstu3.model.HumanName.NameUse.MAIDEN; - default: return org.hl7.fhir.dstu3.model.HumanName.NameUse.NULL; - } -} - - public static org.hl7.fhir.r4.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Meta tgt = new org.hl7.fhir.r4.model.Meta(); - copyElement(src, tgt); - if (src.hasVersionId()) - tgt.setVersionId(src.getVersionId()); - if (src.hasLastUpdated()) - tgt.setLastUpdated(src.getLastUpdated()); - for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) - tgt.addProfile(t.getValue()); - for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) - tgt.addSecurity(convertCoding(t)); - for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) - tgt.addTag(convertCoding(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Meta convertMeta(org.hl7.fhir.r4.model.Meta src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Meta tgt = new org.hl7.fhir.dstu3.model.Meta(); - copyElement(src, tgt); - if (src.hasVersionId()) - tgt.setVersionId(src.getVersionId()); - if (src.hasLastUpdated()) - tgt.setLastUpdated(src.getLastUpdated()); - for (org.hl7.fhir.r4.model.UriType t : src.getProfile()) - tgt.addProfile(t.getValue()); - for (org.hl7.fhir.r4.model.Coding t : src.getSecurity()) - tgt.addSecurity(convertCoding(t)); - for (org.hl7.fhir.r4.model.Coding t : src.getTag()) - tgt.addTag(convertCoding(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ParameterDefinition convertParameterDefinition(org.hl7.fhir.dstu3.model.ParameterDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ParameterDefinition tgt = new org.hl7.fhir.r4.model.ParameterDefinition(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasUse()) - tgt.setUse(convertParameterUse(src.getUse())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ParameterDefinition convertParameterDefinition(org.hl7.fhir.r4.model.ParameterDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ParameterDefinition tgt = new org.hl7.fhir.dstu3.model.ParameterDefinition(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasUse()) - tgt.setUse(convertParameterUse(src.getUse())); - if (src.hasMin()) - tgt.setMin(src.getMin()); - if (src.hasMax()) - tgt.setMax(src.getMax()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - private static org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse convertParameterUse(org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case IN: return org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse.IN; - case OUT: return org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse.OUT; - default: return org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse convertParameterUse(org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case IN: return org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse.IN; - case OUT: return org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse.OUT; - default: return org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse.NULL; - } -} - - public static org.hl7.fhir.r4.model.RelatedArtifact convertRelatedArtifact(org.hl7.fhir.dstu3.model.RelatedArtifact src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.RelatedArtifact tgt = new org.hl7.fhir.r4.model.RelatedArtifact(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertRelatedArtifactType(src.getType())); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasCitation()) - tgt.setCitation(src.getCitation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasDocument()) - tgt.setDocument(convertAttachment(src.getDocument())); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.RelatedArtifact convertRelatedArtifact(org.hl7.fhir.r4.model.RelatedArtifact src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.RelatedArtifact tgt = new org.hl7.fhir.dstu3.model.RelatedArtifact(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertRelatedArtifactType(src.getType())); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasCitation()) - tgt.setCitation(src.getCitation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasDocument()) - tgt.setDocument(convertAttachment(src.getDocument())); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - return tgt; - } - - private static org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType convertRelatedArtifactType(org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DOCUMENTATION: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DOCUMENTATION; - case JUSTIFICATION: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.JUSTIFICATION; - case CITATION: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.CITATION; - case PREDECESSOR: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR; - case SUCCESSOR: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR; - case DERIVEDFROM: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM; - case DEPENDSON: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DEPENDSON; - case COMPOSEDOF: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF; - default: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType convertRelatedArtifactType(org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DOCUMENTATION: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DOCUMENTATION; - case JUSTIFICATION: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.JUSTIFICATION; - case CITATION: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.CITATION; - case PREDECESSOR: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR; - case SUCCESSOR: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR; - case DERIVEDFROM: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM; - case DEPENDSON: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DEPENDSON; - case COMPOSEDOF: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF; - default: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.NULL; - } -} - - public static org.hl7.fhir.r4.model.Timing convertTiming(org.hl7.fhir.dstu3.model.Timing src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Timing tgt = new org.hl7.fhir.r4.model.Timing(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.DateTimeType t : src.getEvent()) - tgt.addEvent(t.getValue()); - if (src.hasRepeat()) - tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Timing convertTiming(org.hl7.fhir.r4.model.Timing src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Timing tgt = new org.hl7.fhir.dstu3.model.Timing(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.DateTimeType t : src.getEvent()) - tgt.addEvent(t.getValue()); - if (src.hasRepeat()) - tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.r4.model.Timing.TimingRepeatComponent(); - copyElement(src, tgt); - if (src.hasBounds()) - tgt.setBounds(convertType(src.getBounds())); - if (src.hasCount()) - tgt.setCount(src.getCount()); - if (src.hasCountMax()) - tgt.setCountMax(src.getCountMax()); - if (src.hasDuration()) - tgt.setDuration(src.getDuration()); - if (src.hasDurationMax()) - tgt.setDurationMax(src.getDurationMax()); - if (src.hasDurationUnit()) - tgt.setDurationUnit(convertUnitsOfTime(src.getDurationUnit())); - if (src.hasFrequency()) - tgt.setFrequency(src.getFrequency()); - if (src.hasFrequencyMax()) - tgt.setFrequencyMax(src.getFrequencyMax()); - if (src.hasPeriod()) - tgt.setPeriod(src.getPeriod()); - if (src.hasPeriodMax()) - tgt.setPeriodMax(src.getPeriodMax()); - if (src.hasPeriodUnit()) - tgt.setPeriodUnit(convertUnitsOfTime(src.getPeriodUnit())); - for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDayOfWeek()) - tgt.addDayOfWeek(convertDayOfWeek(t.getValue())); - for (org.hl7.fhir.dstu3.model.TimeType t : src.getTimeOfDay()) - tgt.addTimeOfDay(t.getValue()); - for (org.hl7.fhir.dstu3.model.Enumeration t : src.getWhen()) - tgt.addWhen(convertEventTiming(t.getValue())); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.r4.model.Timing.TimingRepeatComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent(); - copyElement(src, tgt); - if (src.hasBounds()) - tgt.setBounds(convertType(src.getBounds())); - if (src.hasCount()) - tgt.setCount(src.getCount()); - if (src.hasCountMax()) - tgt.setCountMax(src.getCountMax()); - if (src.hasDuration()) - tgt.setDuration(src.getDuration()); - if (src.hasDurationMax()) - tgt.setDurationMax(src.getDurationMax()); - if (src.hasDurationUnit()) - tgt.setDurationUnit(convertUnitsOfTime(src.getDurationUnit())); - if (src.hasFrequency()) - tgt.setFrequency(src.getFrequency()); - if (src.hasFrequencyMax()) - tgt.setFrequencyMax(src.getFrequencyMax()); - if (src.hasPeriod()) - tgt.setPeriod(src.getPeriod()); - if (src.hasPeriodMax()) - tgt.setPeriodMax(src.getPeriodMax()); - if (src.hasPeriodUnit()) - tgt.setPeriodUnit(convertUnitsOfTime(src.getPeriodUnit())); - for (org.hl7.fhir.r4.model.Enumeration t : src.getDayOfWeek()) - tgt.addDayOfWeek(convertDayOfWeek(t.getValue())); - for (org.hl7.fhir.r4.model.TimeType t : src.getTimeOfDay()) - tgt.addTimeOfDay(t.getValue()); - for (org.hl7.fhir.r4.model.Enumeration t : src.getWhen()) - tgt.addWhen(convertEventTiming(t.getValue())); - if (src.hasOffset()) - tgt.setOffset(src.getOffset()); - return tgt; - } - - private static org.hl7.fhir.r4.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.dstu3.model.Timing.UnitsOfTime src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case S: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.S; - case MIN: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MIN; - case H: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.H; - case D: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.D; - case WK: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.WK; - case MO: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MO; - case A: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.A; - default: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.r4.model.Timing.UnitsOfTime src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case S: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.S; - case MIN: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.MIN; - case H: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.H; - case D: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.D; - case WK: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.WK; - case MO: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.MO; - case A: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.A; - default: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.NULL; - } -} - - private static org.hl7.fhir.r4.model.Timing.DayOfWeek convertDayOfWeek(org.hl7.fhir.dstu3.model.Timing.DayOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.r4.model.Timing.DayOfWeek.MON; - case TUE: return org.hl7.fhir.r4.model.Timing.DayOfWeek.TUE; - case WED: return org.hl7.fhir.r4.model.Timing.DayOfWeek.WED; - case THU: return org.hl7.fhir.r4.model.Timing.DayOfWeek.THU; - case FRI: return org.hl7.fhir.r4.model.Timing.DayOfWeek.FRI; - case SAT: return org.hl7.fhir.r4.model.Timing.DayOfWeek.SAT; - case SUN: return org.hl7.fhir.r4.model.Timing.DayOfWeek.SUN; - default: return org.hl7.fhir.r4.model.Timing.DayOfWeek.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Timing.DayOfWeek convertDayOfWeek(org.hl7.fhir.r4.model.Timing.DayOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.MON; - case TUE: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.TUE; - case WED: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.WED; - case THU: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.THU; - case FRI: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.FRI; - case SAT: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.SAT; - case SUN: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.SUN; - default: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.NULL; - } -} - - private static org.hl7.fhir.r4.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.dstu3.model.Timing.EventTiming src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MORN: return org.hl7.fhir.r4.model.Timing.EventTiming.MORN; - case AFT: return org.hl7.fhir.r4.model.Timing.EventTiming.AFT; - case EVE: return org.hl7.fhir.r4.model.Timing.EventTiming.EVE; - case NIGHT: return org.hl7.fhir.r4.model.Timing.EventTiming.NIGHT; - case PHS: return org.hl7.fhir.r4.model.Timing.EventTiming.PHS; - case HS: return org.hl7.fhir.r4.model.Timing.EventTiming.HS; - case WAKE: return org.hl7.fhir.r4.model.Timing.EventTiming.WAKE; - case C: return org.hl7.fhir.r4.model.Timing.EventTiming.C; - case CM: return org.hl7.fhir.r4.model.Timing.EventTiming.CM; - case CD: return org.hl7.fhir.r4.model.Timing.EventTiming.CD; - case CV: return org.hl7.fhir.r4.model.Timing.EventTiming.CV; - case AC: return org.hl7.fhir.r4.model.Timing.EventTiming.AC; - case ACM: return org.hl7.fhir.r4.model.Timing.EventTiming.ACM; - case ACD: return org.hl7.fhir.r4.model.Timing.EventTiming.ACD; - case ACV: return org.hl7.fhir.r4.model.Timing.EventTiming.ACV; - case PC: return org.hl7.fhir.r4.model.Timing.EventTiming.PC; - case PCM: return org.hl7.fhir.r4.model.Timing.EventTiming.PCM; - case PCD: return org.hl7.fhir.r4.model.Timing.EventTiming.PCD; - case PCV: return org.hl7.fhir.r4.model.Timing.EventTiming.PCV; - default: return org.hl7.fhir.r4.model.Timing.EventTiming.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.r4.model.Timing.EventTiming src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MORN: return org.hl7.fhir.dstu3.model.Timing.EventTiming.MORN; - case AFT: return org.hl7.fhir.dstu3.model.Timing.EventTiming.AFT; - case EVE: return org.hl7.fhir.dstu3.model.Timing.EventTiming.EVE; - case NIGHT: return org.hl7.fhir.dstu3.model.Timing.EventTiming.NIGHT; - case PHS: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PHS; - case HS: return org.hl7.fhir.dstu3.model.Timing.EventTiming.HS; - case WAKE: return org.hl7.fhir.dstu3.model.Timing.EventTiming.WAKE; - case C: return org.hl7.fhir.dstu3.model.Timing.EventTiming.C; - case CM: return org.hl7.fhir.dstu3.model.Timing.EventTiming.CM; - case CD: return org.hl7.fhir.dstu3.model.Timing.EventTiming.CD; - case CV: return org.hl7.fhir.dstu3.model.Timing.EventTiming.CV; - case AC: return org.hl7.fhir.dstu3.model.Timing.EventTiming.AC; - case ACM: return org.hl7.fhir.dstu3.model.Timing.EventTiming.ACM; - case ACD: return org.hl7.fhir.dstu3.model.Timing.EventTiming.ACD; - case ACV: return org.hl7.fhir.dstu3.model.Timing.EventTiming.ACV; - case PC: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PC; - case PCM: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PCM; - case PCD: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PCD; - case PCV: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PCV; - default: return org.hl7.fhir.dstu3.model.Timing.EventTiming.NULL; - } -} - - public static org.hl7.fhir.r4.model.TriggerDefinition convertTriggerDefinition(org.hl7.fhir.dstu3.model.TriggerDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TriggerDefinition tgt = new org.hl7.fhir.r4.model.TriggerDefinition(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertTriggerType(src.getType())); - if (src.hasEventName()) - tgt.setEventName(src.getEventName()); - if (src.hasEventTiming()) - tgt.setEventTiming(convertType(src.getEventTiming())); - if (src.hasEventData()) - tgt.setEventData(convertDataRequirement(src.getEventData())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TriggerDefinition convertTriggerDefinition(org.hl7.fhir.r4.model.TriggerDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TriggerDefinition tgt = new org.hl7.fhir.dstu3.model.TriggerDefinition(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertTriggerType(src.getType())); - if (src.hasEventName()) - tgt.setEventName(src.getEventName()); - if (src.hasEventTiming()) - tgt.setEventTiming(convertType(src.getEventTiming())); - if (src.hasEventData()) - tgt.setEventData(convertDataRequirement(src.getEventData())); - return tgt; - } - - private static org.hl7.fhir.r4.model.TriggerDefinition.TriggerType convertTriggerType(org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NAMEDEVENT: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.NAMEDEVENT; - case PERIODIC: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.PERIODIC; - case DATAADDED: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.DATAADDED; - case DATAMODIFIED: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.DATAMODIFIED; - case DATAREMOVED: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.DATAREMOVED; - case DATAACCESSED: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.DATAACCESSED; - case DATAACCESSENDED: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.DATAACCESSENDED; - default: return org.hl7.fhir.r4.model.TriggerDefinition.TriggerType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType convertTriggerType(org.hl7.fhir.r4.model.TriggerDefinition.TriggerType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NAMEDEVENT: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.NAMEDEVENT; - case PERIODIC: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.PERIODIC; - case DATAADDED: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.DATAADDED; - case DATAMODIFIED: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.DATAMODIFIED; - case DATAREMOVED: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.DATAREMOVED; - case DATAACCESSED: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.DATAACCESSED; - case DATAACCESSENDED: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.DATAACCESSENDED; - default: return org.hl7.fhir.dstu3.model.TriggerDefinition.TriggerType.NULL; - } -} - - public static org.hl7.fhir.r4.model.UsageContext convertUsageContext(org.hl7.fhir.dstu3.model.UsageContext src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.UsageContext tgt = new org.hl7.fhir.r4.model.UsageContext(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCoding(src.getCode())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.UsageContext convertUsageContext(org.hl7.fhir.r4.model.UsageContext src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.UsageContext tgt = new org.hl7.fhir.dstu3.model.UsageContext(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCoding(src.getCode())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.r4.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.dstu3.model.SimpleQuantity src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.SimpleQuantity tgt = new org.hl7.fhir.r4.model.SimpleQuantity(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasComparator()) - tgt.setComparator(convertQuantityComparator(src.getComparator())); - if (src.hasUnit()) - tgt.setUnit(src.getUnit()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.SimpleQuantity tgt = new org.hl7.fhir.dstu3.model.SimpleQuantity(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasComparator()) - tgt.setComparator(convertQuantityComparator(src.getComparator())); - if (src.hasUnit()) - tgt.setUnit(src.getUnit()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException { - if (src == null) - return null; - if (src instanceof org.hl7.fhir.dstu3.model.Base64BinaryType) - return convertBase64Binary((org.hl7.fhir.dstu3.model.Base64BinaryType) src); - if (src instanceof org.hl7.fhir.dstu3.model.BooleanType) - return convertBoolean((org.hl7.fhir.dstu3.model.BooleanType) src); - if (src instanceof org.hl7.fhir.dstu3.model.CodeType) - return convertCode((org.hl7.fhir.dstu3.model.CodeType) src); - if (src instanceof org.hl7.fhir.dstu3.model.DateType) - return convertDate((org.hl7.fhir.dstu3.model.DateType) src); - if (src instanceof org.hl7.fhir.dstu3.model.DateTimeType) - return convertDateTime((org.hl7.fhir.dstu3.model.DateTimeType) src); - if (src instanceof org.hl7.fhir.dstu3.model.DecimalType) - return convertDecimal((org.hl7.fhir.dstu3.model.DecimalType) src); - if (src instanceof org.hl7.fhir.dstu3.model.IdType) - return convertId((org.hl7.fhir.dstu3.model.IdType) src); - if (src instanceof org.hl7.fhir.dstu3.model.InstantType) - return convertInstant((org.hl7.fhir.dstu3.model.InstantType) src); - if (src instanceof org.hl7.fhir.dstu3.model.IntegerType) - return convertInteger((org.hl7.fhir.dstu3.model.IntegerType) src); - if (src instanceof org.hl7.fhir.dstu3.model.MarkdownType) - return convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src); - if (src instanceof org.hl7.fhir.dstu3.model.OidType) - return convertOid((org.hl7.fhir.dstu3.model.OidType) src); - if (src instanceof org.hl7.fhir.dstu3.model.PositiveIntType) - return convertPositiveInt((org.hl7.fhir.dstu3.model.PositiveIntType) src); - if (src instanceof org.hl7.fhir.dstu3.model.StringType) - return convertString((org.hl7.fhir.dstu3.model.StringType) src); - if (src instanceof org.hl7.fhir.dstu3.model.TimeType) - return convertTime((org.hl7.fhir.dstu3.model.TimeType) src); - if (src instanceof org.hl7.fhir.dstu3.model.UnsignedIntType) - return convertUnsignedInt((org.hl7.fhir.dstu3.model.UnsignedIntType) src); - if (src instanceof org.hl7.fhir.dstu3.model.UriType) - return convertUri((org.hl7.fhir.dstu3.model.UriType) src); - if (src instanceof org.hl7.fhir.dstu3.model.UuidType) - return convertUuid((org.hl7.fhir.dstu3.model.UuidType) src); - if (src instanceof org.hl7.fhir.dstu3.model.Extension) - return convertExtension((org.hl7.fhir.dstu3.model.Extension) src); - if (src instanceof org.hl7.fhir.dstu3.model.Narrative) - return convertNarrative((org.hl7.fhir.dstu3.model.Narrative) src); - if (src instanceof org.hl7.fhir.dstu3.model.Age) - return convertAge((org.hl7.fhir.dstu3.model.Age) src); - if (src instanceof org.hl7.fhir.dstu3.model.Annotation) - return convertAnnotation((org.hl7.fhir.dstu3.model.Annotation) src); - if (src instanceof org.hl7.fhir.dstu3.model.Attachment) - return convertAttachment((org.hl7.fhir.dstu3.model.Attachment) src); - if (src instanceof org.hl7.fhir.dstu3.model.CodeableConcept) - return convertCodeableConcept((org.hl7.fhir.dstu3.model.CodeableConcept) src); - if (src instanceof org.hl7.fhir.dstu3.model.Coding) - return convertCoding((org.hl7.fhir.dstu3.model.Coding) src); - if (src instanceof org.hl7.fhir.dstu3.model.Count) - return convertCount((org.hl7.fhir.dstu3.model.Count) src); - if (src instanceof org.hl7.fhir.dstu3.model.Distance) - return convertDistance((org.hl7.fhir.dstu3.model.Distance) src); - if (src instanceof org.hl7.fhir.dstu3.model.Duration) - return convertDuration((org.hl7.fhir.dstu3.model.Duration) src); - if (src instanceof org.hl7.fhir.dstu3.model.Identifier) - return convertIdentifier((org.hl7.fhir.dstu3.model.Identifier) src); - if (src instanceof org.hl7.fhir.dstu3.model.Money) - return convertMoney((org.hl7.fhir.dstu3.model.Money) src); - if (src instanceof org.hl7.fhir.dstu3.model.Period) - return convertPeriod((org.hl7.fhir.dstu3.model.Period) src); - if (src instanceof org.hl7.fhir.dstu3.model.Quantity) - return convertQuantity((org.hl7.fhir.dstu3.model.Quantity) src); - if (src instanceof org.hl7.fhir.dstu3.model.Range) - return convertRange((org.hl7.fhir.dstu3.model.Range) src); - if (src instanceof org.hl7.fhir.dstu3.model.Ratio) - return convertRatio((org.hl7.fhir.dstu3.model.Ratio) src); - if (src instanceof org.hl7.fhir.dstu3.model.Reference) - return convertReference((org.hl7.fhir.dstu3.model.Reference) src); - if (src instanceof org.hl7.fhir.dstu3.model.SampledData) - return convertSampledData((org.hl7.fhir.dstu3.model.SampledData) src); - if (src instanceof org.hl7.fhir.dstu3.model.Signature) - return convertSignature((org.hl7.fhir.dstu3.model.Signature) src); - if (src instanceof org.hl7.fhir.dstu3.model.Address) - return convertAddress((org.hl7.fhir.dstu3.model.Address) src); - if (src instanceof org.hl7.fhir.dstu3.model.ContactDetail) - return convertContactDetail((org.hl7.fhir.dstu3.model.ContactDetail) src); - if (src instanceof org.hl7.fhir.dstu3.model.ContactPoint) - return convertContactPoint((org.hl7.fhir.dstu3.model.ContactPoint) src); - if (src instanceof org.hl7.fhir.dstu3.model.Contributor) - return convertContributor((org.hl7.fhir.dstu3.model.Contributor) src); - if (src instanceof org.hl7.fhir.dstu3.model.DataRequirement) - return convertDataRequirement((org.hl7.fhir.dstu3.model.DataRequirement) src); - if (src instanceof org.hl7.fhir.dstu3.model.Dosage) - return convertDosage((org.hl7.fhir.dstu3.model.Dosage) src); - if (src instanceof org.hl7.fhir.dstu3.model.ElementDefinition) - return convertElementDefinition((org.hl7.fhir.dstu3.model.ElementDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.HumanName) - return convertHumanName((org.hl7.fhir.dstu3.model.HumanName) src); - if (src instanceof org.hl7.fhir.dstu3.model.Meta) - return convertMeta((org.hl7.fhir.dstu3.model.Meta) src); - if (src instanceof org.hl7.fhir.dstu3.model.ParameterDefinition) - return convertParameterDefinition((org.hl7.fhir.dstu3.model.ParameterDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.RelatedArtifact) - return convertRelatedArtifact((org.hl7.fhir.dstu3.model.RelatedArtifact) src); - if (src instanceof org.hl7.fhir.dstu3.model.Timing) - return convertTiming((org.hl7.fhir.dstu3.model.Timing) src); - if (src instanceof org.hl7.fhir.dstu3.model.TriggerDefinition) - return convertTriggerDefinition((org.hl7.fhir.dstu3.model.TriggerDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.UsageContext) - return convertUsageContext((org.hl7.fhir.dstu3.model.UsageContext) src); - if (src instanceof org.hl7.fhir.dstu3.model.SimpleQuantity) - return convertSimpleQuantity((org.hl7.fhir.dstu3.model.SimpleQuantity) src); - throw new Error("Unknown type "+src.fhirType()); - } - - public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException { - if (src == null) - return null; - if (src instanceof org.hl7.fhir.r4.model.Base64BinaryType) - return convertBase64Binary((org.hl7.fhir.r4.model.Base64BinaryType) src); - if (src instanceof org.hl7.fhir.r4.model.BooleanType) - return convertBoolean((org.hl7.fhir.r4.model.BooleanType) src); - if (src instanceof org.hl7.fhir.r4.model.CodeType) - return convertCode((org.hl7.fhir.r4.model.CodeType) src); - if (src instanceof org.hl7.fhir.r4.model.DateType) - return convertDate((org.hl7.fhir.r4.model.DateType) src); - if (src instanceof org.hl7.fhir.r4.model.DateTimeType) - return convertDateTime((org.hl7.fhir.r4.model.DateTimeType) src); - if (src instanceof org.hl7.fhir.r4.model.DecimalType) - return convertDecimal((org.hl7.fhir.r4.model.DecimalType) src); - if (src instanceof org.hl7.fhir.r4.model.IdType) - return convertId((org.hl7.fhir.r4.model.IdType) src); - if (src instanceof org.hl7.fhir.r4.model.InstantType) - return convertInstant((org.hl7.fhir.r4.model.InstantType) src); - if (src instanceof org.hl7.fhir.r4.model.IntegerType) - return convertInteger((org.hl7.fhir.r4.model.IntegerType) src); - if (src instanceof org.hl7.fhir.r4.model.MarkdownType) - return convertMarkdown((org.hl7.fhir.r4.model.MarkdownType) src); - if (src instanceof org.hl7.fhir.r4.model.OidType) - return convertOid((org.hl7.fhir.r4.model.OidType) src); - if (src instanceof org.hl7.fhir.r4.model.PositiveIntType) - return convertPositiveInt((org.hl7.fhir.r4.model.PositiveIntType) src); - if (src instanceof org.hl7.fhir.r4.model.StringType) - return convertString((org.hl7.fhir.r4.model.StringType) src); - if (src instanceof org.hl7.fhir.r4.model.TimeType) - return convertTime((org.hl7.fhir.r4.model.TimeType) src); - if (src instanceof org.hl7.fhir.r4.model.UnsignedIntType) - return convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src); - if (src instanceof org.hl7.fhir.r4.model.UriType) - return convertUri((org.hl7.fhir.r4.model.UriType) src); - if (src instanceof org.hl7.fhir.r4.model.UuidType) - return convertUuid((org.hl7.fhir.r4.model.UuidType) src); - if (src instanceof org.hl7.fhir.r4.model.Extension) - return convertExtension((org.hl7.fhir.r4.model.Extension) src); - if (src instanceof org.hl7.fhir.r4.model.Narrative) - return convertNarrative((org.hl7.fhir.r4.model.Narrative) src); - if (src instanceof org.hl7.fhir.r4.model.Age) - return convertAge((org.hl7.fhir.r4.model.Age) src); - if (src instanceof org.hl7.fhir.r4.model.Annotation) - return convertAnnotation((org.hl7.fhir.r4.model.Annotation) src); - if (src instanceof org.hl7.fhir.r4.model.Attachment) - return convertAttachment((org.hl7.fhir.r4.model.Attachment) src); - if (src instanceof org.hl7.fhir.r4.model.CodeableConcept) - return convertCodeableConcept((org.hl7.fhir.r4.model.CodeableConcept) src); - if (src instanceof org.hl7.fhir.r4.model.Coding) - return convertCoding((org.hl7.fhir.r4.model.Coding) src); - if (src instanceof org.hl7.fhir.r4.model.Count) - return convertCount((org.hl7.fhir.r4.model.Count) src); - if (src instanceof org.hl7.fhir.r4.model.Distance) - return convertDistance((org.hl7.fhir.r4.model.Distance) src); - if (src instanceof org.hl7.fhir.r4.model.Duration) - return convertDuration((org.hl7.fhir.r4.model.Duration) src); - if (src instanceof org.hl7.fhir.r4.model.Identifier) - return convertIdentifier((org.hl7.fhir.r4.model.Identifier) src); - if (src instanceof org.hl7.fhir.r4.model.Money) - return convertMoney((org.hl7.fhir.r4.model.Money) src); - if (src instanceof org.hl7.fhir.r4.model.Period) - return convertPeriod((org.hl7.fhir.r4.model.Period) src); - if (src instanceof org.hl7.fhir.r4.model.Quantity) - return convertQuantity((org.hl7.fhir.r4.model.Quantity) src); - if (src instanceof org.hl7.fhir.r4.model.Range) - return convertRange((org.hl7.fhir.r4.model.Range) src); - if (src instanceof org.hl7.fhir.r4.model.Ratio) - return convertRatio((org.hl7.fhir.r4.model.Ratio) src); - if (src instanceof org.hl7.fhir.r4.model.Reference) - return convertReference((org.hl7.fhir.r4.model.Reference) src); - if (src instanceof org.hl7.fhir.r4.model.SampledData) - return convertSampledData((org.hl7.fhir.r4.model.SampledData) src); - if (src instanceof org.hl7.fhir.r4.model.Signature) - return convertSignature((org.hl7.fhir.r4.model.Signature) src); - if (src instanceof org.hl7.fhir.r4.model.Address) - return convertAddress((org.hl7.fhir.r4.model.Address) src); - if (src instanceof org.hl7.fhir.r4.model.ContactDetail) - return convertContactDetail((org.hl7.fhir.r4.model.ContactDetail) src); - if (src instanceof org.hl7.fhir.r4.model.ContactPoint) - return convertContactPoint((org.hl7.fhir.r4.model.ContactPoint) src); - if (src instanceof org.hl7.fhir.r4.model.Contributor) - return convertContributor((org.hl7.fhir.r4.model.Contributor) src); - if (src instanceof org.hl7.fhir.r4.model.DataRequirement) - return convertDataRequirement((org.hl7.fhir.r4.model.DataRequirement) src); - if (src instanceof org.hl7.fhir.r4.model.Dosage) - return convertDosage((org.hl7.fhir.r4.model.Dosage) src); - if (src instanceof org.hl7.fhir.r4.model.ElementDefinition) - return convertElementDefinition((org.hl7.fhir.r4.model.ElementDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.HumanName) - return convertHumanName((org.hl7.fhir.r4.model.HumanName) src); - if (src instanceof org.hl7.fhir.r4.model.Meta) - return convertMeta((org.hl7.fhir.r4.model.Meta) src); - if (src instanceof org.hl7.fhir.r4.model.ParameterDefinition) - return convertParameterDefinition((org.hl7.fhir.r4.model.ParameterDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.RelatedArtifact) - return convertRelatedArtifact((org.hl7.fhir.r4.model.RelatedArtifact) src); - if (src instanceof org.hl7.fhir.r4.model.Timing) - return convertTiming((org.hl7.fhir.r4.model.Timing) src); - if (src instanceof org.hl7.fhir.r4.model.TriggerDefinition) - return convertTriggerDefinition((org.hl7.fhir.r4.model.TriggerDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.UsageContext) - return convertUsageContext((org.hl7.fhir.r4.model.UsageContext) src); - if (src instanceof org.hl7.fhir.r4.model.SimpleQuantity) - return convertSimpleQuantity((org.hl7.fhir.r4.model.SimpleQuantity) src); - throw new Error("Unknown type "+src.fhirType()); - } - - private static void copyDomainResource(org.hl7.fhir.dstu3.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException { - copyResource(src, tgt); - if (src.hasText()) - tgt.setText(convertNarrative(src.getText())); - for (org.hl7.fhir.dstu3.model.Resource t : src.getContained()) - tgt.addContained(convertResource(t)); - for (org.hl7.fhir.dstu3.model.Extension t : src.getExtension()) - tgt.addExtension(convertExtension(t)); - for (org.hl7.fhir.dstu3.model.Extension t : src.getModifierExtension()) - tgt.addModifierExtension(convertExtension(t)); - } - private static void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu3.model.DomainResource tgt) throws FHIRException { - copyResource(src, tgt); - if (src.hasText()) - tgt.setText(convertNarrative(src.getText())); - for (org.hl7.fhir.r4.model.Resource t : src.getContained()) - tgt.addContained(convertResource(t)); - for (org.hl7.fhir.r4.model.Extension t : src.getExtension()) - tgt.addExtension(convertExtension(t)); - for (org.hl7.fhir.r4.model.Extension t : src.getModifierExtension()) - tgt.addModifierExtension(convertExtension(t)); - } - public static org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.dstu3.model.Parameters src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Parameters tgt = new org.hl7.fhir.r4.model.Parameters(); - copyResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent t : src.getParameter()) - tgt.addParameter(convertParametersParameterComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Parameters convertParameters(org.hl7.fhir.r4.model.Parameters src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Parameters tgt = new org.hl7.fhir.dstu3.model.Parameters(); - copyResource(src, tgt); - for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getParameter()) - tgt.addParameter(convertParametersParameterComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - if (src.hasResource()) - tgt.setResource(convertResource(src.getResource())); - for (org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent t : src.getPart()) - tgt.addPart(convertParametersParameterComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - if (src.hasResource()) - tgt.setResource(convertResource(src.getResource())); - for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getPart()) - tgt.addPart(convertParametersParameterComponent(t)); - return tgt; - } - - private static void copyResource(org.hl7.fhir.dstu3.model.Resource src, org.hl7.fhir.r4.model.Resource tgt) throws FHIRException { - if (src.hasId()) - tgt.setId(src.getId()); - if (src.hasMeta()) - tgt.setMeta(convertMeta(src.getMeta())); - if (src.hasImplicitRules()) - tgt.setImplicitRules(src.getImplicitRules()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - } - private static void copyResource(org.hl7.fhir.r4.model.Resource src, org.hl7.fhir.dstu3.model.Resource tgt) throws FHIRException { - if (src.hasId()) - tgt.setId(src.getId()); - if (src.hasMeta()) - tgt.setMeta(convertMeta(src.getMeta())); - if (src.hasImplicitRules()) - tgt.setImplicitRules(src.getImplicitRules()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - } public static org.hl7.fhir.r4.model.Account convertAccount(org.hl7.fhir.dstu3.model.Account src) throws FHIRException { if (src == null) return null; @@ -2896,58 +174,150 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.Account.CoverageComponent convertCoverageComponent(org.hl7.fhir.dstu3.model.Account.CoverageComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent convertActionAssertRuleComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Account.CoverageComponent tgt = new org.hl7.fhir.r4.model.Account.CoverageComponent(); + org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent(); copyElement(src, tgt); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasPriority()) - tgt.setPriority(src.getPriority()); + if (src.hasRuleId()) + tgt.setRuleId(src.getRuleId()); + for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent t : src.getParam()) + tgt.addParam(convertActionAssertRuleParamComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.Account.CoverageComponent convertCoverageComponent(org.hl7.fhir.r4.model.Account.CoverageComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent convertActionAssertRuleComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Account.CoverageComponent tgt = new org.hl7.fhir.dstu3.model.Account.CoverageComponent(); + org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent(); copyElement(src, tgt); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasPriority()) - tgt.setPriority(src.getPriority()); + if (src.hasRuleId()) + tgt.setRuleId(src.getRuleId()); + for (org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent t : src.getParam()) + tgt.addParam(convertActionAssertRuleParamComponent(t)); return tgt; } - public static org.hl7.fhir.r4.model.Account.GuarantorComponent convertGuarantorComponent(org.hl7.fhir.dstu3.model.Account.GuarantorComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent convertActionAssertRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Account.GuarantorComponent tgt = new org.hl7.fhir.r4.model.Account.GuarantorComponent(); + org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent(); copyElement(src, tgt); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - if (src.hasOnHold()) - tgt.setOnHold(src.getOnHold()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); return tgt; } - public static org.hl7.fhir.dstu3.model.Account.GuarantorComponent convertGuarantorComponent(org.hl7.fhir.r4.model.Account.GuarantorComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent convertActionAssertRuleParamComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Account.GuarantorComponent tgt = new org.hl7.fhir.dstu3.model.Account.GuarantorComponent(); + org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent(); copyElement(src, tgt); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - if (src.hasOnHold()) - tgt.setOnHold(src.getOnHold()); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); return tgt; } + public static org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent convertActionAssertRulesetComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent(); + copyElement(src, tgt); + if (src.hasRulesetId()) + tgt.setRulesetId(src.getRulesetId()); + for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent t : src.getRule()) + tgt.addRule(convertActionAssertRulesetRuleComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent convertActionAssertRulesetComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent(); + copyElement(src, tgt); + if (src.hasRulesetId()) + tgt.setRulesetId(src.getRulesetId()); + for (org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent t : src.getRule()) + tgt.addRule(convertActionAssertRulesetRuleComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent convertActionAssertRulesetRuleComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent(); + copyElement(src, tgt); + if (src.hasRuleId()) + tgt.setRuleId(src.getRuleId()); + for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent t : src.getParam()) + tgt.addParam(convertActionAssertRulesetRuleParamComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent convertActionAssertRulesetRuleComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent(); + copyElement(src, tgt); + if (src.hasRuleId()) + tgt.setRuleId(src.getRuleId()); + for (org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent t : src.getParam()) + tgt.addParam(convertActionAssertRulesetRuleParamComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent convertActionAssertRulesetRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent convertActionAssertRulesetRuleParamComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + private static org.hl7.fhir.r4.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.dstu3.model.ProcessRequest.ActionList src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CANCEL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.CANCEL; + case POLL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.POLL; + case REPROCESS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.REPROCESS; + case STATUS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.STATUS; + default: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.r4.model.ProcessRequest.ActionList src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CANCEL: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.CANCEL; + case POLL: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.POLL; + case REPROCESS: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.REPROCESS; + case STATUS: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.STATUS; + default: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.NULL; + } +} + public static org.hl7.fhir.r4.model.ActivityDefinition convertActivityDefinition(org.hl7.fhir.dstu3.model.ActivityDefinition src) throws FHIRException { if (src == null) return null; @@ -3100,29 +470,37 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Enumerations.PublicationStatus convertPublicationStatus(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent convertActivityDefinitionDynamicValueComponent(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE; - case RETIRED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED; - case UNKNOWN: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL; + org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); + copyElement(src, tgt); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasPath()) + tgt.setPath(src.getPath()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasExpression()) + tgt.setExpression(src.getExpression()); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus convertPublicationStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent convertActivityDefinitionDynamicValueComponent(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.ACTIVE; - case RETIRED: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.RETIRED; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.NULL; + org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); + copyElement(src, tgt); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasPath()) + tgt.setPath(src.getPath()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasExpression()) + tgt.setExpression(src.getExpression()); + return tgt; } -} private static org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind convertActivityDefinitionKind(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind src) throws FHIRException { if (src == null) @@ -3421,38 +799,194 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent convertActivityDefinitionDynamicValueComponent(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); + org.hl7.fhir.r4.model.Address tgt = new org.hl7.fhir.r4.model.Address(); copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); + if (src.hasUse()) + tgt.setUse(convertAddressUse(src.getUse())); + if (src.hasType()) + tgt.setType(convertAddressType(src.getType())); + if (src.hasText()) + tgt.setText(src.getText()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getLine()) + tgt.addLine(t.getValue()); + if (src.hasCity()) + tgt.setCity(src.getCity()); + if (src.hasDistrict()) + tgt.setDistrict(src.getDistrict()); + if (src.hasState()) + tgt.setState(src.getState()); + if (src.hasPostalCode()) + tgt.setPostalCode(src.getPostalCode()); + if (src.hasCountry()) + tgt.setCountry(src.getCountry()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; } - public static org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent convertActivityDefinitionDynamicValueComponent(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Address convertAddress(org.hl7.fhir.r4.model.Address src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent(); + org.hl7.fhir.dstu3.model.Address tgt = new org.hl7.fhir.dstu3.model.Address(); copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); + if (src.hasUse()) + tgt.setUse(convertAddressUse(src.getUse())); + if (src.hasType()) + tgt.setType(convertAddressType(src.getType())); + if (src.hasText()) + tgt.setText(src.getText()); + for (org.hl7.fhir.r4.model.StringType t : src.getLine()) + tgt.addLine(t.getValue()); + if (src.hasCity()) + tgt.setCity(src.getCity()); + if (src.hasDistrict()) + tgt.setDistrict(src.getDistrict()); + if (src.hasState()) + tgt.setState(src.getState()); + if (src.hasPostalCode()) + tgt.setPostalCode(src.getPostalCode()); + if (src.hasCountry()) + tgt.setCountry(src.getCountry()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; } + private static org.hl7.fhir.r4.model.Address.AddressType convertAddressType(org.hl7.fhir.dstu3.model.Address.AddressType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case POSTAL: return org.hl7.fhir.r4.model.Address.AddressType.POSTAL; + case PHYSICAL: return org.hl7.fhir.r4.model.Address.AddressType.PHYSICAL; + case BOTH: return org.hl7.fhir.r4.model.Address.AddressType.BOTH; + default: return org.hl7.fhir.r4.model.Address.AddressType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Address.AddressType convertAddressType(org.hl7.fhir.r4.model.Address.AddressType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case POSTAL: return org.hl7.fhir.dstu3.model.Address.AddressType.POSTAL; + case PHYSICAL: return org.hl7.fhir.dstu3.model.Address.AddressType.PHYSICAL; + case BOTH: return org.hl7.fhir.dstu3.model.Address.AddressType.BOTH; + default: return org.hl7.fhir.dstu3.model.Address.AddressType.NULL; + } +} + + private static org.hl7.fhir.r4.model.Address.AddressUse convertAddressUse(org.hl7.fhir.dstu3.model.Address.AddressUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HOME: return org.hl7.fhir.r4.model.Address.AddressUse.HOME; + case WORK: return org.hl7.fhir.r4.model.Address.AddressUse.WORK; + case TEMP: return org.hl7.fhir.r4.model.Address.AddressUse.TEMP; + case OLD: return org.hl7.fhir.r4.model.Address.AddressUse.OLD; + default: return org.hl7.fhir.r4.model.Address.AddressUse.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Address.AddressUse convertAddressUse(org.hl7.fhir.r4.model.Address.AddressUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HOME: return org.hl7.fhir.dstu3.model.Address.AddressUse.HOME; + case WORK: return org.hl7.fhir.dstu3.model.Address.AddressUse.WORK; + case TEMP: return org.hl7.fhir.dstu3.model.Address.AddressUse.TEMP; + case OLD: return org.hl7.fhir.dstu3.model.Address.AddressUse.OLD; + default: return org.hl7.fhir.dstu3.model.Address.AddressUse.NULL; + } +} + + private static org.hl7.fhir.r4.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.MALE; + case FEMALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.FEMALE; + case OTHER: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.OTHER; + case UNKNOWN: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.UNKNOWN; + default: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MALE: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.MALE; + case FEMALE: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.FEMALE; + case OTHER: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.OTHER; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.NULL; + } +} + + public static org.hl7.fhir.r4.model.Age convertAge(org.hl7.fhir.dstu3.model.Age src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Age tgt = new org.hl7.fhir.r4.model.Age(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Age convertAge(org.hl7.fhir.r4.model.Age src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Age tgt = new org.hl7.fhir.dstu3.model.Age(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.dstu3.model.Contract.AgentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.AgentComponent tgt = new org.hl7.fhir.dstu3.model.Contract.AgentComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + private static org.hl7.fhir.r4.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONTAINED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.CONTAINED; + case REFERENCED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.REFERENCED; + case BUNDLED: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.BUNDLED; + default: return org.hl7.fhir.r4.model.ElementDefinition.AggregationMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode convertAggregationMode(org.hl7.fhir.r4.model.ElementDefinition.AggregationMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONTAINED: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.CONTAINED; + case REFERENCED: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.REFERENCED; + case BUNDLED: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.BUNDLED; + default: return org.hl7.fhir.dstu3.model.ElementDefinition.AggregationMode.NULL; + } +} + public static org.hl7.fhir.r4.model.AllergyIntolerance convertAllergyIntolerance(org.hl7.fhir.dstu3.model.AllergyIntolerance src) throws FHIRException { if (src == null) return null; @@ -3529,72 +1063,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus convertAllergyIntoleranceClinicalStatus(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.INACTIVE; - case RESOLVED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.RESOLVED; - default: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus convertAllergyIntoleranceClinicalStatus(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.INACTIVE; - case RESOLVED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.RESOLVED; - default: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus convertAllergyIntoleranceVerificationStatus(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case UNCONFIRMED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.UNCONFIRMED; - case CONFIRMED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.CONFIRMED; - case REFUTED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.REFUTED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus convertAllergyIntoleranceVerificationStatus(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case UNCONFIRMED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.UNCONFIRMED; - case CONFIRMED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.CONFIRMED; - case REFUTED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.REFUTED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType convertAllergyIntoleranceType(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ALLERGY: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.ALLERGY; - case INTOLERANCE: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.INTOLERANCE; - default: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType convertAllergyIntoleranceType(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ALLERGY: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.ALLERGY; - case INTOLERANCE: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.INTOLERANCE; - default: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.NULL; - } -} - private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCategory convertAllergyIntoleranceCategory(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCategory src) throws FHIRException { if (src == null) return null; @@ -3619,6 +1087,28 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus convertAllergyIntoleranceClinicalStatus(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.INACTIVE; + case RESOLVED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.RESOLVED; + default: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus convertAllergyIntoleranceClinicalStatus(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.INACTIVE; + case RESOLVED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.RESOLVED; + default: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL; + } +} + private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceCriticality convertAllergyIntoleranceCriticality(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality src) throws FHIRException { if (src == null) return null; @@ -3707,6 +1197,106 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType convertAllergyIntoleranceType(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ALLERGY: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.ALLERGY; + case INTOLERANCE: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.INTOLERANCE; + default: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType convertAllergyIntoleranceType(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ALLERGY: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.ALLERGY; + case INTOLERANCE: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.INTOLERANCE; + default: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType.NULL; + } +} + + private static org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus convertAllergyIntoleranceVerificationStatus(org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UNCONFIRMED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.UNCONFIRMED; + case CONFIRMED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.CONFIRMED; + case REFUTED: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.REFUTED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus convertAllergyIntoleranceVerificationStatus(org.hl7.fhir.r4.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UNCONFIRMED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.UNCONFIRMED; + case CONFIRMED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.CONFIRMED; + case REFUTED: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.REFUTED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.dstu3.model.Patient.AnimalComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Patient.AnimalComponent tgt = new org.hl7.fhir.r4.model.Patient.AnimalComponent(); + copyElement(src, tgt); + if (src.hasSpecies()) + tgt.setSpecies(convertCodeableConcept(src.getSpecies())); + if (src.hasBreed()) + tgt.setBreed(convertCodeableConcept(src.getBreed())); + if (src.hasGenderStatus()) + tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.r4.model.Patient.AnimalComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Patient.AnimalComponent tgt = new org.hl7.fhir.dstu3.model.Patient.AnimalComponent(); + copyElement(src, tgt); + if (src.hasSpecies()) + tgt.setSpecies(convertCodeableConcept(src.getSpecies())); + if (src.hasBreed()) + tgt.setBreed(convertCodeableConcept(src.getBreed())); + if (src.hasGenderStatus()) + tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Annotation convertAnnotation(org.hl7.fhir.dstu3.model.Annotation src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Annotation tgt = new org.hl7.fhir.r4.model.Annotation(); + copyElement(src, tgt); + if (src.hasAuthor()) + tgt.setAuthor(convertType(src.getAuthor())); + if (src.hasTime()) + tgt.setTime(src.getTime()); + if (src.hasText()) + tgt.setText(src.getText()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Annotation convertAnnotation(org.hl7.fhir.r4.model.Annotation src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Annotation tgt = new org.hl7.fhir.dstu3.model.Annotation(); + copyElement(src, tgt); + if (src.hasAuthor()) + tgt.setAuthor(convertType(src.getAuthor())); + if (src.hasTime()) + tgt.setTime(src.getTime()); + if (src.hasText()) + tgt.setText(src.getText()); + return tgt; + } + public static org.hl7.fhir.r4.model.Appointment convertAppointment(org.hl7.fhir.dstu3.model.Appointment src) throws FHIRException { if (src == null) return null; @@ -3803,38 +1393,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PROPOSED; - case PENDING: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PENDING; - case BOOKED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.BOOKED; - case ARRIVED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ARRIVED; - case FULFILLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.FULFILLED; - case CANCELLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.CANCELLED; - case NOSHOW: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NOSHOW; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.r4.model.Appointment.AppointmentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.PROPOSED; - case PENDING: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.PENDING; - case BOOKED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.BOOKED; - case ARRIVED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.ARRIVED; - case FULFILLED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.FULFILLED; - case CANCELLED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.CANCELLED; - case NOSHOW: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.NOSHOW; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent src) throws FHIRException { if (src == null) return null; @@ -3867,52 +1425,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.REQUIRED; - case OPTIONAL: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.OPTIONAL; - case INFORMATIONONLY: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.INFORMATIONONLY; - default: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.r4.model.Appointment.ParticipantRequired src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUIRED: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.REQUIRED; - case OPTIONAL: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.OPTIONAL; - case INFORMATIONONLY: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.INFORMATIONONLY; - default: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.NULL; - } -} - - private static org.hl7.fhir.r4.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACCEPTED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NEEDSACTION; - default: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.r4.model.Appointment.ParticipationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACCEPTED: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.NEEDSACTION; - default: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.dstu3.model.AppointmentResponse src) throws FHIRException { if (src == null) return null; @@ -3961,30 +1473,184 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case ACCEPTED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; - default: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NULL; + case PROPOSED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PROPOSED; + case PENDING: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PENDING; + case BOOKED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.BOOKED; + case ARRIVED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ARRIVED; + case FULFILLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.FULFILLED; + case CANCELLED: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.CANCELLED; + case NOSHOW: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NOSHOW; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.r4.model.Appointment.AppointmentStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.PROPOSED; + case PENDING: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.PENDING; + case BOOKED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.BOOKED; + case ARRIVED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.ARRIVED; + case FULFILLED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.FULFILLED; + case CANCELLED: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.CANCELLED; + case NOSHOW: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.NOSHOW; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.NULL; } } - private static org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType src) throws FHIRException { if (src == null) return null; switch (src) { - case ACCEPTED: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.ACCEPTED; - case DECLINED: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.DECLINED; - case TENTATIVE: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.TENTATIVE; - case NEEDSACTION: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; - default: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.NULL; + case RESPONSE: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.RESPONSE; + case REQUEST: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.REQUEST; + default: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.NULL; } } + private static org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.r4.model.TestScript.AssertionDirectionType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RESPONSE: return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.RESPONSE; + case REQUEST: return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.REQUEST; + default: return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.NULL; + } +} + + private static org.hl7.fhir.r4.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EQUALS; + case NOTEQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEQUALS; + case IN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.IN; + case NOTIN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTIN; + case GREATERTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.GREATERTHAN; + case LESSTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.LESSTHAN; + case EMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EMPTY; + case NOTEMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEMPTY; + case CONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.CONTAINS; + case NOTCONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTCONTAINS; + case EVAL: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EVAL; + default: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.r4.model.TestScript.AssertionOperatorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUALS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EQUALS; + case NOTEQUALS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEQUALS; + case IN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.IN; + case NOTIN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTIN; + case GREATERTHAN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.GREATERTHAN; + case LESSTHAN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.LESSTHAN; + case EMPTY: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EMPTY; + case NOTEMPTY: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEMPTY; + case CONTAINS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.CONTAINS; + case NOTCONTAINS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTCONTAINS; + case EVAL: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EVAL; + default: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NULL; + } +} + + private static org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OKAY: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.OKAY; + case CREATED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CREATED; + case NOCONTENT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOCONTENT; + case NOTMODIFIED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTMODIFIED; + case BAD: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.BAD; + case FORBIDDEN: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.FORBIDDEN; + case NOTFOUND: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTFOUND; + case METHODNOTALLOWED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; + case CONFLICT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CONFLICT; + case GONE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.GONE; + case PRECONDITIONFAILED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; + case UNPROCESSABLE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; + default: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OKAY: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.OKAY; + case CREATED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CREATED; + case NOCONTENT: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOCONTENT; + case NOTMODIFIED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTMODIFIED; + case BAD: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.BAD; + case FORBIDDEN: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.FORBIDDEN; + case NOTFOUND: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTFOUND; + case METHODNOTALLOWED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; + case CONFLICT: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CONFLICT; + case GONE: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.GONE; + case PRECONDITIONFAILED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; + case UNPROCESSABLE: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; + default: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NULL; + } +} + + public static org.hl7.fhir.r4.model.Attachment convertAttachment(org.hl7.fhir.dstu3.model.Attachment src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Attachment tgt = new org.hl7.fhir.r4.model.Attachment(); + copyElement(src, tgt); + if (src.hasContentType()) + tgt.setContentType(src.getContentType()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasData()) + tgt.setData(src.getData()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + if (src.hasSize()) + tgt.setSize(src.getSize()); + if (src.hasHash()) + tgt.setHash(src.getHash()); + if (src.hasTitle()) + tgt.setTitle(src.getTitle()); + if (src.hasCreation()) + tgt.setCreation(src.getCreation()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Attachment tgt = new org.hl7.fhir.dstu3.model.Attachment(); + copyElement(src, tgt); + if (src.hasContentType()) + tgt.setContentType(src.getContentType()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasData()) + tgt.setData(src.getData()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + if (src.hasSize()) + tgt.setSize(src.getSize()); + if (src.hasHash()) + tgt.setHash(src.getHash()); + if (src.hasTitle()) + tgt.setTitle(src.getTitle()); + if (src.hasCreation()) + tgt.setCreation(src.getCreation()); + return tgt; + } + public static org.hl7.fhir.r4.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu3.model.AuditEvent src) throws FHIRException { if (src == null) return null; @@ -4067,30 +1733,6 @@ public class VersionConvertor_30_40 { } } - private static org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case _0: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._0; - case _4: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._4; - case _8: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._8; - case _12: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._12; - default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case _0: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._0; - case _4: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._4; - case _8: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._8; - case _12: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._12; - default: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome.NULL; - } -} - public static org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException { if (src == null) return null; @@ -4201,34 +1843,6 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); - copyElement(src, tgt); - if (src.hasSite()) - tgt.setSite(src.getSite()); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - for (org.hl7.fhir.dstu3.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent(); - copyElement(src, tgt); - if (src.hasSite()) - tgt.setSite(src.getSite()); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - for (org.hl7.fhir.r4.model.Coding t : src.getType()) - tgt.addType(convertCoding(t)); - return tgt; - } - public static org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException { if (src == null) return null; @@ -4293,7 +1907,7 @@ public class VersionConvertor_30_40 { if (src.hasType()) tgt.setType(src.getType()); if (src.hasValue()) - tgt.setValue(src.getValue()); + tgt.setValue(new Base64BinaryType(src.getValue())); return tgt; } @@ -4304,8 +1918,70 @@ public class VersionConvertor_30_40 { copyElement(src, tgt); if (src.hasType()) tgt.setType(src.getType()); - if (src.hasValue()) - tgt.setValue(src.getValue()); + return tgt; + } + + private static org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case _0: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._0; + case _4: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._4; + case _8: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._8; + case _12: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._12; + default: return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case _0: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._0; + case _4: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._4; + case _8: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._8; + case _12: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._12; + default: return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome.NULL; + } +} + + public static org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); + copyElement(src, tgt); + if (src.hasSite()) + tgt.setSite(src.getSite()); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + for (org.hl7.fhir.dstu3.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent(); + copyElement(src, tgt); + if (src.hasSite()) + tgt.setSite(src.getSite()); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + for (org.hl7.fhir.r4.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.dstu3.model.Base64BinaryType src) throws FHIRException { + org.hl7.fhir.r4.model.Base64BinaryType tgt = new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Base64BinaryType convertBase64Binary(org.hl7.fhir.r4.model.Base64BinaryType src) throws FHIRException { + org.hl7.fhir.dstu3.model.Base64BinaryType tgt = new org.hl7.fhir.dstu3.model.Base64BinaryType(src.getValue()); + copyElement(src, tgt); return tgt; } @@ -4345,6 +2021,86 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent convertBenefitComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasAllowed()) + tgt.setAllowed(convertType(src.getAllowed())); + if (src.hasUsed()) + tgt.setUsed(convertType(src.getUsed())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent convertBenefitComponent(org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasAllowed()) + tgt.setAllowed(convertType(src.getAllowed())); + if (src.hasUsed()) + tgt.setUsed(convertType(src.getUsed())); + return tgt; + } + + public static org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent convertBenefitsComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent(); + copyElement(src, tgt); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasSubCategory()) + tgt.setSubCategory(convertCodeableConcept(src.getSubCategory())); + if (src.hasExcluded()) + tgt.setExcluded(src.getExcluded()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasNetwork()) + tgt.setNetwork(convertCodeableConcept(src.getNetwork())); + if (src.hasUnit()) + tgt.setUnit(convertCodeableConcept(src.getUnit())); + if (src.hasTerm()) + tgt.setTerm(convertCodeableConcept(src.getTerm())); + for (org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent t : src.getFinancial()) + tgt.addFinancial(convertBenefitComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent convertBenefitsComponent(org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent(); + copyElement(src, tgt); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasSubCategory()) + tgt.setSubCategory(convertCodeableConcept(src.getSubCategory())); + if (src.hasExcluded()) + tgt.setExcluded(src.getExcluded()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasNetwork()) + tgt.setNetwork(convertCodeableConcept(src.getNetwork())); + if (src.hasUnit()) + tgt.setUnit(convertCodeableConcept(src.getUnit())); + if (src.hasTerm()) + tgt.setTerm(convertCodeableConcept(src.getTerm())); + for (org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent t : src.getFinancial()) + tgt.addFinancial(convertBenefitComponent(t)); + return tgt; + } + public static org.hl7.fhir.r4.model.Binary convertBinary(org.hl7.fhir.dstu3.model.Binary src) throws FHIRException { if (src == null) return null; @@ -4373,6 +2129,30 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.dstu3.model.Enumerations.BindingStrength src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUIRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.REQUIRED; + case EXTENSIBLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXTENSIBLE; + case PREFERRED: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.PREFERRED; + case EXAMPLE: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXAMPLE; + default: return org.hl7.fhir.r4.model.Enumerations.BindingStrength.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Enumerations.BindingStrength convertBindingStrength(org.hl7.fhir.r4.model.Enumerations.BindingStrength src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUIRED: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.REQUIRED; + case EXTENSIBLE: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.EXTENSIBLE; + case PREFERRED: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.PREFERRED; + case EXAMPLE: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.EXAMPLE; + default: return org.hl7.fhir.dstu3.model.Enumerations.BindingStrength.NULL; + } +} + public static org.hl7.fhir.r4.model.BodyStructure convertBodySite(org.hl7.fhir.dstu3.model.BodySite src) throws FHIRException { if (src == null) return null; @@ -4417,6 +2197,18 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.BooleanType convertBoolean(org.hl7.fhir.dstu3.model.BooleanType src) throws FHIRException { + org.hl7.fhir.r4.model.BooleanType tgt = new org.hl7.fhir.r4.model.BooleanType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.BooleanType convertBoolean(org.hl7.fhir.r4.model.BooleanType src) throws FHIRException { + org.hl7.fhir.dstu3.model.BooleanType tgt = new org.hl7.fhir.dstu3.model.BooleanType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + public static org.hl7.fhir.r4.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException { if (src == null) return null; @@ -4457,64 +2249,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Bundle.BundleType convertBundleType(org.hl7.fhir.dstu3.model.Bundle.BundleType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DOCUMENT: return org.hl7.fhir.r4.model.Bundle.BundleType.DOCUMENT; - case MESSAGE: return org.hl7.fhir.r4.model.Bundle.BundleType.MESSAGE; - case TRANSACTION: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION; - case TRANSACTIONRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTIONRESPONSE; - case BATCH: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCH; - case BATCHRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCHRESPONSE; - case HISTORY: return org.hl7.fhir.r4.model.Bundle.BundleType.HISTORY; - case SEARCHSET: return org.hl7.fhir.r4.model.Bundle.BundleType.SEARCHSET; - case COLLECTION: return org.hl7.fhir.r4.model.Bundle.BundleType.COLLECTION; - default: return org.hl7.fhir.r4.model.Bundle.BundleType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Bundle.BundleType convertBundleType(org.hl7.fhir.r4.model.Bundle.BundleType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DOCUMENT: return org.hl7.fhir.dstu3.model.Bundle.BundleType.DOCUMENT; - case MESSAGE: return org.hl7.fhir.dstu3.model.Bundle.BundleType.MESSAGE; - case TRANSACTION: return org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTION; - case TRANSACTIONRESPONSE: return org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTIONRESPONSE; - case BATCH: return org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCH; - case BATCHRESPONSE: return org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCHRESPONSE; - case HISTORY: return org.hl7.fhir.dstu3.model.Bundle.BundleType.HISTORY; - case SEARCHSET: return org.hl7.fhir.dstu3.model.Bundle.BundleType.SEARCHSET; - case COLLECTION: return org.hl7.fhir.dstu3.model.Bundle.BundleType.COLLECTION; - default: return org.hl7.fhir.dstu3.model.Bundle.BundleType.NULL; - } -} - - public static org.hl7.fhir.r4.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); - copyElement(src, tgt); - if (src.hasRelation()) - tgt.setRelation(src.getRelation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r4.model.Bundle.BundleLinkComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); - copyElement(src, tgt); - if (src.hasRelation()) - tgt.setRelation(src.getRelation()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - return tgt; - } - public static org.hl7.fhir.r4.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src) throws FHIRException { if (src == null) return null; @@ -4555,52 +2289,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent(); - copyElement(src, tgt); - if (src.hasMode()) - tgt.setMode(convertSearchEntryMode(src.getMode())); - if (src.hasScore()) - tgt.setScore(src.getScore()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent(); - copyElement(src, tgt); - if (src.hasMode()) - tgt.setMode(convertSearchEntryMode(src.getMode())); - if (src.hasScore()) - tgt.setScore(src.getScore()); - return tgt; - } - - private static org.hl7.fhir.r4.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MATCH: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.MATCH; - case INCLUDE: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.INCLUDE; - case OUTCOME: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.OUTCOME; - default: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.r4.model.Bundle.SearchEntryMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MATCH: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.MATCH; - case INCLUDE: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.INCLUDE; - case OUTCOME: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.OUTCOME; - default: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.NULL; - } -} - public static org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { if (src == null) return null; @@ -4641,30 +2329,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GET: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.GET; - case POST: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST; - case PUT: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT; - case DELETE: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.DELETE; - default: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.r4.model.Bundle.HTTPVerb src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GET: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.GET; - case POST: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.POST; - case PUT: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.PUT; - case DELETE: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.DELETE; - default: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.NULL; - } -} - public static org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { if (src == null) return null; @@ -4701,6 +2365,88 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent(); + copyElement(src, tgt); + if (src.hasMode()) + tgt.setMode(convertSearchEntryMode(src.getMode())); + if (src.hasScore()) + tgt.setScore(src.getScore()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent(); + copyElement(src, tgt); + if (src.hasMode()) + tgt.setMode(convertSearchEntryMode(src.getMode())); + if (src.hasScore()) + tgt.setScore(src.getScore()); + return tgt; + } + + public static org.hl7.fhir.r4.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); + copyElement(src, tgt); + if (src.hasRelation()) + tgt.setRelation(src.getRelation()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r4.model.Bundle.BundleLinkComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); + copyElement(src, tgt); + if (src.hasRelation()) + tgt.setRelation(src.getRelation()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + return tgt; + } + + private static org.hl7.fhir.r4.model.Bundle.BundleType convertBundleType(org.hl7.fhir.dstu3.model.Bundle.BundleType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DOCUMENT: return org.hl7.fhir.r4.model.Bundle.BundleType.DOCUMENT; + case MESSAGE: return org.hl7.fhir.r4.model.Bundle.BundleType.MESSAGE; + case TRANSACTION: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION; + case TRANSACTIONRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTIONRESPONSE; + case BATCH: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCH; + case BATCHRESPONSE: return org.hl7.fhir.r4.model.Bundle.BundleType.BATCHRESPONSE; + case HISTORY: return org.hl7.fhir.r4.model.Bundle.BundleType.HISTORY; + case SEARCHSET: return org.hl7.fhir.r4.model.Bundle.BundleType.SEARCHSET; + case COLLECTION: return org.hl7.fhir.r4.model.Bundle.BundleType.COLLECTION; + default: return org.hl7.fhir.r4.model.Bundle.BundleType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Bundle.BundleType convertBundleType(org.hl7.fhir.r4.model.Bundle.BundleType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DOCUMENT: return org.hl7.fhir.dstu3.model.Bundle.BundleType.DOCUMENT; + case MESSAGE: return org.hl7.fhir.dstu3.model.Bundle.BundleType.MESSAGE; + case TRANSACTION: return org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTION; + case TRANSACTIONRESPONSE: return org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTIONRESPONSE; + case BATCH: return org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCH; + case BATCHRESPONSE: return org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCHRESPONSE; + case HISTORY: return org.hl7.fhir.dstu3.model.Bundle.BundleType.HISTORY; + case SEARCHSET: return org.hl7.fhir.dstu3.model.Bundle.BundleType.SEARCHSET; + case COLLECTION: return org.hl7.fhir.dstu3.model.Bundle.BundleType.COLLECTION; + default: return org.hl7.fhir.dstu3.model.Bundle.BundleType.NULL; + } +} + public static org.hl7.fhir.r4.model.CapabilityStatement convertCapabilityStatement(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException { if (src == null) return null; @@ -4825,77 +2571,31 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind convertCapabilityStatementKind(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException { + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent convertCapabilityStatementDocumentComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case INSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.INSTANCE; - case CAPABILITY: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY; - case REQUIREMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS; - default: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind convertCapabilityStatementKind(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INSTANCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.INSTANCE; - case CAPABILITY: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY; - case REQUIREMENTS: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.NULL; - } -} - - private static org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NO: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NO; - case EXTENSIONS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.EXTENSIONS; - case ELEMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.ELEMENTS; - case BOTH: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.BOTH; - default: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NO: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NO; - case EXTENSIONS: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.EXTENSIONS; - case ELEMENTS: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.ELEMENTS; - case BOTH: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.BOTH; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NULL; - } -} - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertCapabilityStatementSoftwareComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasMode()) + tgt.setMode(convertDocumentMode(src.getMode())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); return tgt; } - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertCapabilityStatementSoftwareComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent convertCapabilityStatementDocumentComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasReleaseDate()) - tgt.setReleaseDate(src.getReleaseDate()); + if (src.hasMode()) + tgt.setMode(convertDocumentMode(src.getMode())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); return tgt; } @@ -4923,6 +2623,156 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind convertCapabilityStatementKind(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.INSTANCE; + case CAPABILITY: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY; + case REQUIREMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS; + default: return org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind convertCapabilityStatementKind(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INSTANCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.INSTANCE; + case CAPABILITY: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY; + case REQUIREMENTS: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.NULL; + } +} + + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent convertCapabilityStatementMessagingComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) + tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); + if (src.hasReliableCache()) + tgt.setReliableCache(src.getReliableCache()); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) + tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); + for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) + tgt.addEvent(convertCapabilityStatementMessagingEventComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent convertCapabilityStatementMessagingComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) + tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); + if (src.hasReliableCache()) + tgt.setReliableCache(src.getReliableCache()); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) + tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) + tgt.addEvent(convertCapabilityStatementMessagingEventComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertCapabilityStatementMessagingEndpointComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); + copyElement(src, tgt); + if (src.hasProtocol()) + tgt.setProtocol(convertCoding(src.getProtocol())); + if (src.hasAddress()) + tgt.setAddress(src.getAddress()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertCapabilityStatementMessagingEndpointComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); + copyElement(src, tgt); + if (src.hasProtocol()) + tgt.setProtocol(convertCoding(src.getProtocol())); + if (src.hasAddress()) + tgt.setAddress(src.getAddress()); + return tgt; + } + + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertCapabilityStatementMessagingEventComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertCoding(src.getCode())); + if (src.hasCategory()) + tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); + if (src.hasMode()) + tgt.setMode(convertEventCapabilityMode(src.getMode())); + if (src.hasFocus()) + tgt.setFocus(src.getFocus()); + if (src.hasRequest()) + tgt.setRequest(convertReference(src.getRequest())); + if (src.hasResponse()) + tgt.setResponse(convertReference(src.getResponse())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertCapabilityStatementMessagingEventComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertCoding(src.getCode())); + if (src.hasCategory()) + tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); + if (src.hasMode()) + tgt.setMode(convertEventCapabilityMode(src.getMode())); + if (src.hasFocus()) + tgt.setFocus(src.getFocus()); + if (src.hasRequest()) + tgt.setRequest(convertReference(src.getRequest())); + if (src.hasResponse()) + tgt.setResponse(convertReference(src.getResponse())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent convertCapabilityStatementMessagingSupportedMessageComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); + copyElement(src, tgt); + if (src.hasMode()) + tgt.setMode(convertEventCapabilityMode(src.getMode())); + if (src.hasDefinition()) + tgt.setDefinition(convertReference(src.getDefinition())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent convertCapabilityStatementMessagingSupportedMessageComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); + copyElement(src, tgt); + if (src.hasMode()) + tgt.setMode(convertEventCapabilityMode(src.getMode())); + if (src.hasDefinition()) + tgt.setDefinition(convertReference(src.getDefinition())); + return tgt; + } + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent convertCapabilityStatementRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException { if (src == null) return null; @@ -4971,79 +2821,27 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode convertRestfulCapabilityMode(org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException { + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertCapabilityStatementRestOperationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case CLIENT: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.CLIENT; - case SERVER: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.SERVER; - default: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode convertRestfulCapabilityMode(org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CLIENT: return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.CLIENT; - case SERVER: return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.SERVER; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.NULL; - } -} - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertCapabilityStatementRestSecurityComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) - tgt.addService(convertCodeableConcept(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) - tgt.addCertificate(convertCapabilityStatementRestSecurityCertificateComponent(t)); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasDefinition()) + tgt.setDefinition(convertReference(src.getDefinition())); return tgt; } - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertCapabilityStatementRestSecurityComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertCapabilityStatementRestOperationComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); copyElement(src, tgt); - if (src.hasCors()) - tgt.setCors(src.getCors()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) - tgt.addService(convertCodeableConcept(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) - tgt.addCertificate(convertCapabilityStatementRestSecurityCertificateComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertCapabilityStatementRestSecurityCertificateComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBlob()) - tgt.setBlob(src.getBlob()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertCapabilityStatementRestSecurityCertificateComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasBlob()) - tgt.setBlob(src.getBlob()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasDefinition()) + tgt.setDefinition(convertReference(src.getDefinition())); return tgt; } @@ -5123,158 +2921,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOVERSION: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION; - case VERSIONED: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED; - case VERSIONEDUPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE; - default: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOVERSION: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION; - case VERSIONED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED; - case VERSIONEDUPDATE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NULL; - } -} - - private static org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus convertConditionalReadStatus(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSUPPORTED: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.NOTSUPPORTED; - case MODIFIEDSINCE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.MODIFIEDSINCE; - case NOTMATCH: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.NOTMATCH; - case FULLSUPPORT: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.FULLSUPPORT; - default: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus convertConditionalReadStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSUPPORTED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.NOTSUPPORTED; - case MODIFIEDSINCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.MODIFIEDSINCE; - case NOTMATCH: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.NOTMATCH; - case FULLSUPPORT: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.FULLSUPPORT; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSUPPORTED: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED; - case SINGLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE; - case MULTIPLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE; - default: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTSUPPORTED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED; - case SINGLE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE; - case MULTIPLE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy convertReferenceHandlingPolicy(org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LITERAL: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.LITERAL; - case LOGICAL: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.LOGICAL; - case RESOLVES: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.RESOLVES; - case ENFORCED: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.ENFORCED; - case LOCAL: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.LOCAL; - default: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy convertReferenceHandlingPolicy(org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LITERAL: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.LITERAL; - case LOGICAL: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.LOGICAL; - case RESOLVES: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.RESOLVES; - case ENFORCED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.ENFORCED; - case LOCAL: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.LOCAL; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.NULL; - } -} - - public static org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertTypeRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - private static org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case READ: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.READ; - case VREAD: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.VREAD; - case UPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.UPDATE; - case PATCH: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.PATCH; - case DELETE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.DELETE; - case HISTORYINSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE; - case HISTORYTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE; - case CREATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.CREATE; - case SEARCHTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE; - default: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case READ: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.READ; - case VREAD: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.VREAD; - case UPDATE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.UPDATE; - case PATCH: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.PATCH; - case DELETE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.DELETE; - case HISTORYINSTANCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE; - case HISTORYTYPE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE; - case CREATE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.CREATE; - case SEARCHTYPE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.NULL; - } -} - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent convertCapabilityStatementRestResourceSearchParamComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent src) throws FHIRException { if (src == null) return null; @@ -5307,328 +2953,90 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.dstu3.model.Enumerations.SearchParamType src) throws FHIRException { + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertCapabilityStatementRestSecurityCertificateComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case NUMBER: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NUMBER; - case DATE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.DATE; - case STRING: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.STRING; - case TOKEN: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.TOKEN; - case REFERENCE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.REFERENCE; - case COMPOSITE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.COMPOSITE; - case QUANTITY: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.QUANTITY; - case URI: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.URI; - default: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.r4.model.Enumerations.SearchParamType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NUMBER: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.NUMBER; - case DATE: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.DATE; - case STRING: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.STRING; - case TOKEN: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.TOKEN; - case REFERENCE: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.REFERENCE; - case COMPOSITE: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.COMPOSITE; - case QUANTITY: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.QUANTITY; - case URI: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.URI; - default: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.NULL; - } -} - - public static org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent(); + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasBlob()) + tgt.setBlob(src.getBlob()); return tgt; } - public static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertCapabilityStatementRestSecurityCertificateComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent(); + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertSystemRestfulInteraction(src.getCode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasBlob()) + tgt.setBlob(src.getBlob()); return tgt; } - private static org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException { + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertCapabilityStatementRestSecurityComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case TRANSACTION: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION; - case BATCH: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.BATCH; - case SEARCHSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM; - case HISTORYSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM; - default: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.NULL; + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); + copyElement(src, tgt); + if (src.hasCors()) + tgt.setCors(src.getCors()); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) + tgt.addService(convertCodeableConcept(t)); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) + tgt.addCertificate(convertCapabilityStatementRestSecurityCertificateComponent(t)); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertCapabilityStatementRestSecurityComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case TRANSACTION: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION; - case BATCH: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.BATCH; - case SEARCHSYSTEM: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM; - case HISTORYSYSTEM: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.NULL; + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); + copyElement(src, tgt); + if (src.hasCors()) + tgt.setCors(src.getCors()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) + tgt.addService(convertCodeableConcept(t)); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) + tgt.addCertificate(convertCapabilityStatementRestSecurityCertificateComponent(t)); + return tgt; } -} - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertCapabilityStatementRestOperationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertCapabilityStatementSoftwareComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); + org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); copyElement(src, tgt); if (src.hasName()) tgt.setName(src.getName()); - if (src.hasDefinition()) - tgt.setDefinition(convertReference(src.getDefinition())); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + if (src.hasReleaseDate()) + tgt.setReleaseDate(src.getReleaseDate()); return tgt; } - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertCapabilityStatementRestOperationComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertCapabilityStatementSoftwareComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent(); + org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); copyElement(src, tgt); if (src.hasName()) tgt.setName(src.getName()); - if (src.hasDefinition()) - tgt.setDefinition(convertReference(src.getDefinition())); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + if (src.hasReleaseDate()) + tgt.setReleaseDate(src.getReleaseDate()); return tgt; } - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent convertCapabilityStatementMessagingComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) - tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) - tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); - for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) - tgt.addEvent(convertCapabilityStatementMessagingEventComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent convertCapabilityStatementMessagingComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) - tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); - if (src.hasReliableCache()) - tgt.setReliableCache(src.getReliableCache()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent t : src.getSupportedMessage()) - tgt.addSupportedMessage(convertCapabilityStatementMessagingSupportedMessageComponent(t)); - for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) - tgt.addEvent(convertCapabilityStatementMessagingEventComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertCapabilityStatementMessagingEndpointComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); - copyElement(src, tgt); - if (src.hasProtocol()) - tgt.setProtocol(convertCoding(src.getProtocol())); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertCapabilityStatementMessagingEndpointComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); - copyElement(src, tgt); - if (src.hasProtocol()) - tgt.setProtocol(convertCoding(src.getProtocol())); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); - return tgt; - } - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent convertCapabilityStatementMessagingSupportedMessageComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); - copyElement(src, tgt); - if (src.hasMode()) - tgt.setMode(convertEventCapabilityMode(src.getMode())); - if (src.hasDefinition()) - tgt.setDefinition(convertReference(src.getDefinition())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent convertCapabilityStatementMessagingSupportedMessageComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); - copyElement(src, tgt); - if (src.hasMode()) - tgt.setMode(convertEventCapabilityMode(src.getMode())); - if (src.hasDefinition()) - tgt.setDefinition(convertReference(src.getDefinition())); - return tgt; - } - - private static org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode convertEventCapabilityMode(org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SENDER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.SENDER; - case RECEIVER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.RECEIVER; - default: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode convertEventCapabilityMode(org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SENDER: return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.SENDER; - case RECEIVER: return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.RECEIVER; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.NULL; - } -} - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertCapabilityStatementMessagingEventComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCoding(src.getCode())); - if (src.hasCategory()) - tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); - if (src.hasMode()) - tgt.setMode(convertEventCapabilityMode(src.getMode())); - if (src.hasFocus()) - tgt.setFocus(src.getFocus()); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasResponse()) - tgt.setResponse(convertReference(src.getResponse())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertCapabilityStatementMessagingEventComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCoding(src.getCode())); - if (src.hasCategory()) - tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); - if (src.hasMode()) - tgt.setMode(convertEventCapabilityMode(src.getMode())); - if (src.hasFocus()) - tgt.setFocus(src.getFocus()); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasResponse()) - tgt.setResponse(convertReference(src.getResponse())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - private static org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONSEQUENCE: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE; - case CURRENCY: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY; - case NOTIFICATION: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION; - default: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CONSEQUENCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE; - case CURRENCY: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY; - case NOTIFICATION: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NULL; - } -} - - public static org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent convertCapabilityStatementDocumentComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent(); - copyElement(src, tgt); - if (src.hasMode()) - tgt.setMode(convertDocumentMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent convertCapabilityStatementDocumentComponent(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent(); - copyElement(src, tgt); - if (src.hasMode()) - tgt.setMode(convertDocumentMode(src.getMode())); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - private static org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRODUCER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.PRODUCER; - case CONSUMER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.CONSUMER; - default: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRODUCER: return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.PRODUCER; - case CONSUMER: return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.CONSUMER; - default: return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.NULL; - } -} - public static org.hl7.fhir.r4.model.CarePlan convertCarePlan(org.hl7.fhir.dstu3.model.CarePlan src) throws FHIRException { if (src == null) return null; @@ -5725,60 +3133,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.SUSPENDED; - case COMPLETED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ENTEREDINERROR; - case CANCELLED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.CANCELLED; - case UNKNOWN: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.SUSPENDED; - case COMPLETED: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.ENTEREDINERROR; - case CANCELLED: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.CANCELLED; - case UNKNOWN: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.CarePlan.CarePlanIntent convertCarePlanIntent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSAL: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.PROPOSAL; - case PLAN: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.PLAN; - case ORDER: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.ORDER; - case OPTION: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.OPTION; - default: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent convertCarePlanIntent(org.hl7.fhir.r4.model.CarePlan.CarePlanIntent src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PROPOSAL: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.PROPOSAL; - case PLAN: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.PLAN; - case ORDER: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.ORDER; - case OPTION: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.OPTION; - default: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.NULL; - } -} - public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent src) throws FHIRException { if (src == null) return null; @@ -5820,8 +3174,8 @@ public class VersionConvertor_30_40 { return null; org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent(); copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); +// if (src.hasCategory()) +// tgt.setKind(convertCodeableConcept(src.getCategory())); if (src.hasDefinition()) tgt.setDefinition(convertReference(src.getDefinition())); if (src.hasCode()) @@ -5860,8 +3214,8 @@ public class VersionConvertor_30_40 { return null; org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent(); copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); +// if (src.hasKind()) +// tgt.setCategory(convertCodeableConcept(src.getKind())); if (src.hasDefinition()) tgt.setDefinition(convertReference(src.getDefinition())); if (src.hasCode()) @@ -5925,6 +3279,60 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.CarePlan.CarePlanIntent convertCarePlanIntent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSAL: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.PROPOSAL; + case PLAN: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.PLAN; + case ORDER: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.ORDER; + case OPTION: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.OPTION; + default: return org.hl7.fhir.r4.model.CarePlan.CarePlanIntent.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent convertCarePlanIntent(org.hl7.fhir.r4.model.CarePlan.CarePlanIntent src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSAL: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.PROPOSAL; + case PLAN: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.PLAN; + case ORDER: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.ORDER; + case OPTION: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.OPTION; + default: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent.NULL; + } +} + + private static org.hl7.fhir.r4.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.SUSPENDED; + case COMPLETED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ENTEREDINERROR; + case CANCELLED: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.CANCELLED; + case UNKNOWN: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.SUSPENDED; + case COMPLETED: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.ENTEREDINERROR; + case CANCELLED: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.CANCELLED; + case UNKNOWN: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.CareTeam convertCareTeam(org.hl7.fhir.dstu3.model.CareTeam src) throws FHIRException { if (src == null) return null; @@ -5989,31 +3397,41 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CareTeam.CareTeamStatus convertCareTeamStatus(org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.Claim.CareTeamComponent convertCareTeamComponent(org.hl7.fhir.dstu3.model.Claim.CareTeamComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.PROPOSED; - case ACTIVE: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.SUSPENDED; - case INACTIVE: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.NULL; + org.hl7.fhir.r4.model.Claim.CareTeamComponent tgt = new org.hl7.fhir.r4.model.Claim.CareTeamComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasProvider()) + tgt.setProvider(convertReference(src.getProvider())); + if (src.hasResponsible()) + tgt.setResponsible(src.getResponsible()); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasQualification()) + tgt.setQualification(convertCodeableConcept(src.getQualification())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus convertCareTeamStatus(org.hl7.fhir.r4.model.CareTeam.CareTeamStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Claim.CareTeamComponent convertCareTeamComponent(org.hl7.fhir.r4.model.Claim.CareTeamComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.PROPOSED; - case ACTIVE: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.SUSPENDED; - case INACTIVE: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.NULL; + org.hl7.fhir.dstu3.model.Claim.CareTeamComponent tgt = new org.hl7.fhir.dstu3.model.Claim.CareTeamComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasProvider()) + tgt.setProvider(convertReference(src.getProvider())); + if (src.hasResponsible()) + tgt.setResponsible(src.getResponsible()); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasQualification()) + tgt.setQualification(convertCodeableConcept(src.getQualification())); + return tgt; } -} public static org.hl7.fhir.r4.model.CareTeam.CareTeamParticipantComponent convertCareTeamParticipantComponent(org.hl7.fhir.dstu3.model.CareTeam.CareTeamParticipantComponent src) throws FHIRException { if (src == null) @@ -6047,6 +3465,32 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.CareTeam.CareTeamStatus convertCareTeamStatus(org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.PROPOSED; + case ACTIVE: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.SUSPENDED; + case INACTIVE: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.CareTeam.CareTeamStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus convertCareTeamStatus(org.hl7.fhir.r4.model.CareTeam.CareTeamStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.PROPOSED; + case ACTIVE: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.SUSPENDED; + case INACTIVE: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.CareTeam.CareTeamStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.ChargeItem convertChargeItem(org.hl7.fhir.dstu3.model.ChargeItem src) throws FHIRException { if (src == null) return null; @@ -6155,6 +3599,30 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent convertChargeItemParticipantComponent(org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent tgt = new org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent(); + copyElement(src, tgt); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent convertChargeItemParticipantComponent(org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent tgt = new org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent(); + copyElement(src, tgt); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + return tgt; + } + private static org.hl7.fhir.r4.model.ChargeItem.ChargeItemStatus convertChargeItemStatus(org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemStatus src) throws FHIRException { if (src == null) return null; @@ -6185,30 +3653,6 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent convertChargeItemParticipantComponent(org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent tgt = new org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent(); - copyElement(src, tgt); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent convertChargeItemParticipantComponent(org.hl7.fhir.r4.model.ChargeItem.ChargeItemParticipantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent tgt = new org.hl7.fhir.dstu3.model.ChargeItem.ChargeItemParticipantComponent(); - copyElement(src, tgt); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - return tgt; - } - public static org.hl7.fhir.r4.model.Claim convertClaim(org.hl7.fhir.dstu3.model.Claim src) throws FHIRException { if (src == null) return null; @@ -6369,952 +3813,27 @@ public class VersionConvertor_30_40 { } } - private static org.hl7.fhir.r4.model.Claim.Use convertUse(org.hl7.fhir.dstu3.model.Claim.Use src) throws FHIRException { + public static org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case COMPLETE: return org.hl7.fhir.r4.model.Claim.Use.COMPLETE; - case PROPOSED: return org.hl7.fhir.r4.model.Claim.Use.PROPOSED; - case EXPLORATORY: return org.hl7.fhir.r4.model.Claim.Use.EXPLORATORY; - case OTHER: return org.hl7.fhir.r4.model.Claim.Use.OTHER; - default: return org.hl7.fhir.r4.model.Claim.Use.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Claim.Use convertUse(org.hl7.fhir.r4.model.Claim.Use src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case COMPLETE: return org.hl7.fhir.dstu3.model.Claim.Use.COMPLETE; - case PROPOSED: return org.hl7.fhir.dstu3.model.Claim.Use.PROPOSED; - case EXPLORATORY: return org.hl7.fhir.dstu3.model.Claim.Use.EXPLORATORY; - case OTHER: return org.hl7.fhir.dstu3.model.Claim.Use.OTHER; - default: return org.hl7.fhir.dstu3.model.Claim.Use.NULL; - } -} - - public static org.hl7.fhir.r4.model.Claim.RelatedClaimComponent convertRelatedClaimComponent(org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.RelatedClaimComponent tgt = new org.hl7.fhir.r4.model.Claim.RelatedClaimComponent(); + org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent(); copyElement(src, tgt); - if (src.hasClaim()) - tgt.setClaim(convertReference(src.getClaim())); - if (src.hasRelationship()) - tgt.setRelationship(convertCodeableConcept(src.getRelationship())); - if (src.hasReference()) - tgt.setReference(convertIdentifier(src.getReference())); + if (src.hasClass_()) + tgt.setClass_(convertCoding(src.getClass_())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; } - public static org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent convertRelatedClaimComponent(org.hl7.fhir.r4.model.Claim.RelatedClaimComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent tgt = new org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent(); + org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent(); copyElement(src, tgt); - if (src.hasClaim()) - tgt.setClaim(convertReference(src.getClaim())); - if (src.hasRelationship()) - tgt.setRelationship(convertCodeableConcept(src.getRelationship())); - if (src.hasReference()) - tgt.setReference(convertIdentifier(src.getReference())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.PayeeComponent convertPayeeComponent(org.hl7.fhir.dstu3.model.Claim.PayeeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.PayeeComponent tgt = new org.hl7.fhir.r4.model.Claim.PayeeComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasResourceType()) - tgt.setResource(convertCoding(src.getResourceType())); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.PayeeComponent convertPayeeComponent(org.hl7.fhir.r4.model.Claim.PayeeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.PayeeComponent tgt = new org.hl7.fhir.dstu3.model.Claim.PayeeComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasResource()) - tgt.setResourceType(convertCoding(src.getResource())); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.CareTeamComponent convertCareTeamComponent(org.hl7.fhir.dstu3.model.Claim.CareTeamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.CareTeamComponent tgt = new org.hl7.fhir.r4.model.Claim.CareTeamComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasQualification()) - tgt.setQualification(convertCodeableConcept(src.getQualification())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.CareTeamComponent convertCareTeamComponent(org.hl7.fhir.r4.model.Claim.CareTeamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.CareTeamComponent tgt = new org.hl7.fhir.dstu3.model.Claim.CareTeamComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasQualification()) - tgt.setQualification(convertCodeableConcept(src.getQualification())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.SpecialConditionComponent convertSpecialConditionComponent(org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.SpecialConditionComponent tgt = new org.hl7.fhir.r4.model.Claim.SpecialConditionComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent convertSpecialConditionComponent(org.hl7.fhir.r4.model.Claim.SpecialConditionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent tgt = new org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.Claim.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDiagnosis()) - tgt.setDiagnosis(convertType(src.getDiagnosis())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPackageCode()) - tgt.setPackageCode(convertCodeableConcept(src.getPackageCode())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.Claim.DiagnosisComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDiagnosis()) - tgt.setDiagnosis(convertType(src.getDiagnosis())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPackageCode()) - tgt.setPackageCode(convertCodeableConcept(src.getPackageCode())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.ProcedureComponent convertProcedureComponent(org.hl7.fhir.dstu3.model.Claim.ProcedureComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.ProcedureComponent tgt = new org.hl7.fhir.r4.model.Claim.ProcedureComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasProcedure()) - tgt.setProcedure(convertType(src.getProcedure())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.ProcedureComponent convertProcedureComponent(org.hl7.fhir.r4.model.Claim.ProcedureComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.ProcedureComponent tgt = new org.hl7.fhir.dstu3.model.Claim.ProcedureComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasProcedure()) - tgt.setProcedure(convertType(src.getProcedure())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.dstu3.model.Claim.InsuranceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.InsuranceComponent tgt = new org.hl7.fhir.r4.model.Claim.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasFocal()) - tgt.setFocal(src.getFocal()); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasBusinessArrangement()) - tgt.setBusinessArrangement(src.getBusinessArrangement()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getPreAuthRef()) - tgt.addPreAuthRef(t.getValue()); - if (src.hasClaimResponse()) - tgt.setClaimResponse(convertReference(src.getClaimResponse())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.r4.model.Claim.InsuranceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.InsuranceComponent tgt = new org.hl7.fhir.dstu3.model.Claim.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasFocal()) - tgt.setFocal(src.getFocal()); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasBusinessArrangement()) - tgt.setBusinessArrangement(src.getBusinessArrangement()); - for (org.hl7.fhir.r4.model.StringType t : src.getPreAuthRef()) - tgt.addPreAuthRef(t.getValue()); - if (src.hasClaimResponse()) - tgt.setClaimResponse(convertReference(src.getClaimResponse())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.AccidentComponent convertAccidentComponent(org.hl7.fhir.dstu3.model.Claim.AccidentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.AccidentComponent tgt = new org.hl7.fhir.r4.model.Claim.AccidentComponent(); - copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.AccidentComponent convertAccidentComponent(org.hl7.fhir.r4.model.Claim.AccidentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.AccidentComponent tgt = new org.hl7.fhir.dstu3.model.Claim.AccidentComponent(); - copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.ItemComponent convertItemComponent(org.hl7.fhir.dstu3.model.Claim.ItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.ItemComponent tgt = new org.hl7.fhir.r4.model.Claim.ItemComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getCareTeamLinkId()) - tgt.addCareTeamLinkId(t.getValue()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getDiagnosisLinkId()) - tgt.addDiagnosisLinkId(t.getValue()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getProcedureLinkId()) - tgt.addProcedureLinkId(t.getValue()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getInformationLinkId()) - tgt.addInformationLinkId(t.getValue()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasServiced()) - tgt.setServiced(convertType(src.getServiced())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - if (src.hasBodySite()) - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubSite()) - tgt.addSubSite(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEncounter()) - tgt.addEncounter(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Claim.DetailComponent t : src.getDetail()) - tgt.addDetail(convertDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.ItemComponent convertItemComponent(org.hl7.fhir.r4.model.Claim.ItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.ItemComponent tgt = new org.hl7.fhir.dstu3.model.Claim.ItemComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getCareTeamLinkId()) - tgt.addCareTeamLinkId(t.getValue()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getDiagnosisLinkId()) - tgt.addDiagnosisLinkId(t.getValue()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getProcedureLinkId()) - tgt.addProcedureLinkId(t.getValue()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getInformationLinkId()) - tgt.addInformationLinkId(t.getValue()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasServiced()) - tgt.setServiced(convertType(src.getServiced())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - if (src.hasBodySite()) - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubSite()) - tgt.addSubSite(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getEncounter()) - tgt.addEncounter(convertReference(t)); - for (org.hl7.fhir.r4.model.Claim.DetailComponent t : src.getDetail()) - tgt.addDetail(convertDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.DetailComponent convertDetailComponent(org.hl7.fhir.dstu3.model.Claim.DetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.DetailComponent tgt = new org.hl7.fhir.r4.model.Claim.DetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Claim.SubDetailComponent t : src.getSubDetail()) - tgt.addSubDetail(convertSubDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.DetailComponent convertDetailComponent(org.hl7.fhir.r4.model.Claim.DetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.DetailComponent tgt = new org.hl7.fhir.dstu3.model.Claim.DetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - for (org.hl7.fhir.r4.model.Claim.SubDetailComponent t : src.getSubDetail()) - tgt.addSubDetail(convertSubDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Claim.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.dstu3.model.Claim.SubDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Claim.SubDetailComponent tgt = new org.hl7.fhir.r4.model.Claim.SubDetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Claim.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.r4.model.Claim.SubDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Claim.SubDetailComponent tgt = new org.hl7.fhir.dstu3.model.Claim.SubDetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse convertClaimResponse(org.hl7.fhir.dstu3.model.ClaimResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse tgt = new org.hl7.fhir.r4.model.ClaimResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertClaimResponseStatus(src.getStatus())); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasPayeeType()) - tgt.setPayeeType(convertCodeableConcept(src.getPayeeType())); - for (org.hl7.fhir.dstu3.model.ClaimResponse.ItemComponent t : src.getItem()) - tgt.addItem(convertItemComponent(t)); - for (org.hl7.fhir.dstu3.model.ClaimResponse.AddedItemComponent t : src.getAddItem()) - tgt.addAddItem(convertAddedItemComponent(t)); - for (org.hl7.fhir.dstu3.model.ClaimResponse.ErrorComponent t : src.getError()) - tgt.addError(convertErrorComponent(t)); - if (src.hasTotalCost()) - tgt.setTotalCost(convertMoney(src.getTotalCost())); - if (src.hasUnallocDeductable()) - tgt.setUnallocDeductable(convertMoney(src.getUnallocDeductable())); - if (src.hasTotalBenefit()) - tgt.setTotalBenefit(convertMoney(src.getTotalBenefit())); - if (src.hasPayment()) - tgt.setPayment(convertPaymentComponent(src.getPayment())); - if (src.hasReserved()) - tgt.setReserved(convertCoding(src.getReserved())); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.dstu3.model.ClaimResponse.NoteComponent t : src.getProcessNote()) - tgt.addProcessNote(convertNoteComponent(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getCommunicationRequest()) - tgt.addCommunicationRequest(convertReference(t)); - for (org.hl7.fhir.dstu3.model.ClaimResponse.InsuranceComponent t : src.getInsurance()) - tgt.addInsurance(convertInsuranceComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse convertClaimResponse(org.hl7.fhir.r4.model.ClaimResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse tgt = new org.hl7.fhir.dstu3.model.ClaimResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertClaimResponseStatus(src.getStatus())); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasPayeeType()) - tgt.setPayeeType(convertCodeableConcept(src.getPayeeType())); - for (org.hl7.fhir.r4.model.ClaimResponse.ItemComponent t : src.getItem()) - tgt.addItem(convertItemComponent(t)); - for (org.hl7.fhir.r4.model.ClaimResponse.AddedItemComponent t : src.getAddItem()) - tgt.addAddItem(convertAddedItemComponent(t)); - for (org.hl7.fhir.r4.model.ClaimResponse.ErrorComponent t : src.getError()) - tgt.addError(convertErrorComponent(t)); - if (src.hasTotalCost()) - tgt.setTotalCost(convertMoney(src.getTotalCost())); - if (src.hasUnallocDeductable()) - tgt.setUnallocDeductable(convertMoney(src.getUnallocDeductable())); - if (src.hasTotalBenefit()) - tgt.setTotalBenefit(convertMoney(src.getTotalBenefit())); - if (src.hasPayment()) - tgt.setPayment(convertPaymentComponent(src.getPayment())); - if (src.hasReserved()) - tgt.setReserved(convertCoding(src.getReserved())); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.r4.model.ClaimResponse.NoteComponent t : src.getProcessNote()) - tgt.addProcessNote(convertNoteComponent(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getCommunicationRequest()) - tgt.addCommunicationRequest(convertReference(t)); - for (org.hl7.fhir.r4.model.ClaimResponse.InsuranceComponent t : src.getInsurance()) - tgt.addInsurance(convertInsuranceComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus convertClaimResponseStatus(org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus convertClaimResponseStatus(org.hl7.fhir.r4.model.ClaimResponse.ClaimResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.ClaimResponse.ClaimResponseStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.ClaimResponse.ItemComponent convertItemComponent(org.hl7.fhir.dstu3.model.ClaimResponse.ItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.ItemComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.ItemComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.dstu3.model.ClaimResponse.ItemDetailComponent t : src.getDetail()) - tgt.addDetail(convertItemDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.ItemComponent convertItemComponent(org.hl7.fhir.r4.model.ClaimResponse.ItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.ItemComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.ItemComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.r4.model.ClaimResponse.ItemDetailComponent t : src.getDetail()) - tgt.addDetail(convertItemDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent convertAdjudicationComponent(org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent convertAdjudicationComponent(org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.ItemDetailComponent convertItemDetailComponent(org.hl7.fhir.dstu3.model.ClaimResponse.ItemDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.ItemDetailComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.ItemDetailComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.dstu3.model.ClaimResponse.SubDetailComponent t : src.getSubDetail()) - tgt.addSubDetail(convertSubDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.ItemDetailComponent convertItemDetailComponent(org.hl7.fhir.r4.model.ClaimResponse.ItemDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.ItemDetailComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.ItemDetailComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.r4.model.ClaimResponse.SubDetailComponent t : src.getSubDetail()) - tgt.addSubDetail(convertSubDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.dstu3.model.ClaimResponse.SubDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.SubDetailComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.SubDetailComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.r4.model.ClaimResponse.SubDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.SubDetailComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.SubDetailComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.AddedItemComponent convertAddedItemComponent(org.hl7.fhir.dstu3.model.ClaimResponse.AddedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.AddedItemComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.AddedItemComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getSequenceLinkId()) - tgt.addSequenceLinkId(t.getValue()); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - if (src.hasFee()) - tgt.setFee(convertMoney(src.getFee())); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.AddedItemComponent convertAddedItemComponent(org.hl7.fhir.r4.model.ClaimResponse.AddedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.AddedItemComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.AddedItemComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getSequenceLinkId()) - tgt.addSequenceLinkId(t.getValue()); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - if (src.hasFee()) - tgt.setFee(convertMoney(src.getFee())); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ClaimResponse.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - return tgt; - } - - - public static org.hl7.fhir.r4.model.ClaimResponse.ErrorComponent convertErrorComponent(org.hl7.fhir.dstu3.model.ClaimResponse.ErrorComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.ErrorComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.ErrorComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - if (src.hasDetailSequenceLinkId()) - tgt.setDetailSequenceLinkId(src.getDetailSequenceLinkId()); - if (src.hasSubdetailSequenceLinkId()) - tgt.setSubdetailSequenceLinkId(src.getSubdetailSequenceLinkId()); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.ErrorComponent convertErrorComponent(org.hl7.fhir.r4.model.ClaimResponse.ErrorComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.ErrorComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.ErrorComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - if (src.hasDetailSequenceLinkId()) - tgt.setDetailSequenceLinkId(src.getDetailSequenceLinkId()); - if (src.hasSubdetailSequenceLinkId()) - tgt.setSubdetailSequenceLinkId(src.getSubdetailSequenceLinkId()); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.PaymentComponent convertPaymentComponent(org.hl7.fhir.dstu3.model.ClaimResponse.PaymentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.PaymentComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.PaymentComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAdjustment()) - tgt.setAdjustment(convertMoney(src.getAdjustment())); - if (src.hasAdjustmentReason()) - tgt.setAdjustmentReason(convertCodeableConcept(src.getAdjustmentReason())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.PaymentComponent convertPaymentComponent(org.hl7.fhir.r4.model.ClaimResponse.PaymentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.PaymentComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.PaymentComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAdjustment()) - tgt.setAdjustment(convertMoney(src.getAdjustment())); - if (src.hasAdjustmentReason()) - tgt.setAdjustmentReason(convertCodeableConcept(src.getAdjustmentReason())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.NoteComponent convertNoteComponent(org.hl7.fhir.dstu3.model.ClaimResponse.NoteComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.NoteComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.NoteComponent(); - copyElement(src, tgt); - if (src.hasNumber()) - tgt.setNumber(src.getNumber()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - if (src.hasLanguage()) - tgt.setLanguage(convertCodeableConcept(src.getLanguage())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.NoteComponent convertNoteComponent(org.hl7.fhir.r4.model.ClaimResponse.NoteComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.NoteComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.NoteComponent(); - copyElement(src, tgt); - if (src.hasNumber()) - tgt.setNumber(src.getNumber()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - if (src.hasLanguage()) - tgt.setLanguage(convertCodeableConcept(src.getLanguage())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ClaimResponse.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.dstu3.model.ClaimResponse.InsuranceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ClaimResponse.InsuranceComponent tgt = new org.hl7.fhir.r4.model.ClaimResponse.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasFocal()) - tgt.setFocal(src.getFocal()); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasBusinessArrangement()) - tgt.setBusinessArrangement(src.getBusinessArrangement()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getPreAuthRef()) - tgt.addPreAuthRef(t.getValue()); - if (src.hasClaimResponse()) - tgt.setClaimResponse(convertReference(src.getClaimResponse())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ClaimResponse.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.r4.model.ClaimResponse.InsuranceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClaimResponse.InsuranceComponent tgt = new org.hl7.fhir.dstu3.model.ClaimResponse.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasFocal()) - tgt.setFocal(src.getFocal()); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasBusinessArrangement()) - tgt.setBusinessArrangement(src.getBusinessArrangement()); - for (org.hl7.fhir.r4.model.StringType t : src.getPreAuthRef()) - tgt.addPreAuthRef(t.getValue()); - if (src.hasClaimResponse()) - tgt.setClaimResponse(convertReference(src.getClaimResponse())); + if (src.hasClass_()) + tgt.setClass_(convertCoding(src.getClass_())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; } @@ -7410,27 +3929,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT; - case COMPLETED: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.NULL; + org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent(); + copyElement(src, tgt); + if (src.hasItem()) + tgt.setItem(convertType(src.getItem())); + if (src.hasBasis()) + tgt.setBasis(src.getBasis()); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT; - case COMPLETED: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.NULL; + org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent(); + copyElement(src, tgt); + if (src.hasItem()) + tgt.setItem(convertType(src.getItem())); + if (src.hasBasis()) + tgt.setBasis(src.getBasis()); + return tgt; } -} public static org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationComponent convertClinicalImpressionInvestigationComponent(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionInvestigationComponent src) throws FHIRException { if (src == null) @@ -7456,27 +3977,37 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent(); + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT; + case COMPLETED: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT; + case COMPLETED: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.CodeType convertCode(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException { + org.hl7.fhir.r4.model.CodeType tgt = new org.hl7.fhir.r4.model.CodeType(src.getValue()); copyElement(src, tgt); - if (src.hasItem()) - tgt.setItem(convertType(src.getItem())); - if (src.hasBasis()) - tgt.setBasis(src.getBasis()); return tgt; } - public static org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent(); + public static org.hl7.fhir.dstu3.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException { + org.hl7.fhir.dstu3.model.CodeType tgt = new org.hl7.fhir.dstu3.model.CodeType(src.getValue()); copyElement(src, tgt); - if (src.hasItem()) - tgt.setItem(convertType(src.getItem())); - if (src.hasBasis()) - tgt.setBasis(src.getBasis()); return tgt; } @@ -7596,30 +4127,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning convertCodeSystemHierarchyMeaning(org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GROUPEDBY: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.GROUPEDBY; - case ISA: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.ISA; - case PARTOF: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.PARTOF; - case CLASSIFIEDWITH: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.CLASSIFIEDWITH; - default: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning convertCodeSystemHierarchyMeaning(org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case GROUPEDBY: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.GROUPEDBY; - case ISA: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.ISA; - case PARTOF: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.PARTOF; - case CLASSIFIEDWITH: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.CLASSIFIEDWITH; - default: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.NULL; - } -} - private static org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode convertCodeSystemContentMode(org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode src) throws FHIRException { if (src == null) return null; @@ -7676,189 +4183,87 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CodeSystem.FilterOperator convertFilterOperator(org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator src) throws FHIRException { + private static org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning convertCodeSystemHierarchyMeaning(org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning src) throws FHIRException { if (src == null) return null; switch (src) { - case EQUAL: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.EQUAL; - case ISA: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.ISA; - case DESCENDENTOF: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.DESCENDENTOF; - case ISNOTA: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.ISNOTA; - case REGEX: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.REGEX; - case IN: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.IN; - case NOTIN: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.NOTIN; - case GENERALIZES: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.GENERALIZES; - case EXISTS: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.EXISTS; - default: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.NULL; + case GROUPEDBY: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.GROUPEDBY; + case ISA: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.ISA; + case PARTOF: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.PARTOF; + case CLASSIFIEDWITH: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.CLASSIFIEDWITH; + default: return org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning.NULL; } } - private static org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator convertFilterOperator(org.hl7.fhir.r4.model.CodeSystem.FilterOperator src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning convertCodeSystemHierarchyMeaning(org.hl7.fhir.r4.model.CodeSystem.CodeSystemHierarchyMeaning src) throws FHIRException { if (src == null) return null; switch (src) { - case EQUAL: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.EQUAL; - case ISA: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.ISA; - case DESCENDENTOF: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.DESCENDENTOF; - case ISNOTA: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.ISNOTA; - case REGEX: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.REGEX; - case IN: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.IN; - case NOTIN: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.NOTIN; - case GENERALIZES: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.GENERALIZES; - case EXISTS: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.EXISTS; - default: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.NULL; + case GROUPEDBY: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.GROUPEDBY; + case ISA: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.ISA; + case PARTOF: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.PARTOF; + case CLASSIFIEDWITH: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.CLASSIFIEDWITH; + default: return org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning.NULL; } } - public static org.hl7.fhir.r4.model.CodeSystem.PropertyComponent convertPropertyComponent(org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.PropertyComponent(); + org.hl7.fhir.r4.model.CodeableConcept tgt = new org.hl7.fhir.r4.model.CodeableConcept(); copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasType()) - tgt.setType(convertPropertyType(src.getType())); + for (org.hl7.fhir.dstu3.model.Coding t : src.getCoding()) + tgt.addCoding(convertCoding(t)); + if (src.hasText()) + tgt.setText(src.getText()); return tgt; } - public static org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent convertPropertyComponent(org.hl7.fhir.r4.model.CodeSystem.PropertyComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.r4.model.CodeableConcept src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent(); + org.hl7.fhir.dstu3.model.CodeableConcept tgt = new org.hl7.fhir.dstu3.model.CodeableConcept(); copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasType()) - tgt.setType(convertPropertyType(src.getType())); + for (org.hl7.fhir.r4.model.Coding t : src.getCoding()) + tgt.addCoding(convertCoding(t)); + if (src.hasText()) + tgt.setText(src.getText()); return tgt; } - private static org.hl7.fhir.r4.model.CodeSystem.PropertyType convertPropertyType(org.hl7.fhir.dstu3.model.CodeSystem.PropertyType src) throws FHIRException { + public static org.hl7.fhir.r4.model.Coding convertCoding(org.hl7.fhir.dstu3.model.Coding src) throws FHIRException { if (src == null) return null; - switch (src) { - case CODE: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.CODE; - case CODING: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.CODING; - case STRING: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.STRING; - case INTEGER: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.INTEGER; - case BOOLEAN: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.BOOLEAN; - case DATETIME: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.DATETIME; - default: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CodeSystem.PropertyType convertPropertyType(org.hl7.fhir.r4.model.CodeSystem.PropertyType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CODE: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.CODE; - case CODING: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.CODING; - case STRING: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.STRING; - case INTEGER: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.INTEGER; - case BOOLEAN: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.BOOLEAN; - case DATETIME: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.DATETIME; - default: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.NULL; - } -} - - public static org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent convertConceptDefinitionComponent(org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent(); + org.hl7.fhir.r4.model.Coding tgt = new org.hl7.fhir.r4.model.Coding(); copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); if (src.hasCode()) tgt.setCode(src.getCode()); if (src.hasDisplay()) tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); - for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent t : src.getProperty()) - tgt.addProperty(convertConceptPropertyComponent(t)); - for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent t : src.getConcept()) - tgt.addConcept(convertConceptDefinitionComponent(t)); + if (src.hasUserSelected()) + tgt.setUserSelected(src.getUserSelected()); return tgt; } - public static org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent convertConceptDefinitionComponent(org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Coding convertCoding(org.hl7.fhir.r4.model.Coding src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent(); + org.hl7.fhir.dstu3.model.Coding tgt = new org.hl7.fhir.dstu3.model.Coding(); copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); if (src.hasCode()) tgt.setCode(src.getCode()); if (src.hasDisplay()) tgt.setDisplay(src.getDisplay()); - if (src.hasDefinition()) - tgt.setDefinition(src.getDefinition()); - for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); - for (org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent t : src.getProperty()) - tgt.addProperty(convertConceptPropertyComponent(t)); - for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent t : src.getConcept()) - tgt.addConcept(convertConceptDefinitionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent convertConceptDefinitionDesignationComponent(org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent convertConceptDefinitionDesignationComponent(org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent convertConceptPropertyComponent(org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent convertConceptPropertyComponent(org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasUserSelected()) + tgt.setUserSelected(src.getUserSelected()); return tgt; } @@ -7958,36 +4363,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.dstu3.model.Communication.CommunicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PREPARATION: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.PREPARATION; - case INPROGRESS: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.INPROGRESS; - case SUSPENDED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.SUSPENDED; - case ABORTED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ABORTED; - case COMPLETED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.r4.model.Communication.CommunicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PREPARATION: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.PREPARATION; - case INPROGRESS: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.INPROGRESS; - case SUSPENDED: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.SUSPENDED; - case ABORTED: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.ABORTED; - case COMPLETED: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent src) throws FHIRException { if (src == null) return null; @@ -8008,6 +4383,30 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertCommunicationPriority(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ROUTINE: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE; + case URGENT: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT; + case ASAP: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP; + case STAT: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT; + default: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority convertCommunicationPriority(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ROUTINE: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ROUTINE; + case URGENT: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.URGENT; + case ASAP: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ASAP; + case STAT: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.STAT; + default: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.NULL; + } +} + public static org.hl7.fhir.r4.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.dstu3.model.CommunicationRequest src) throws FHIRException { if (src == null) return null; @@ -8104,60 +4503,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertCommunicationPriority(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ROUTINE: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE; - case URGENT: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT; - case ASAP: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP; - case STAT: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT; - default: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority convertCommunicationPriority(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ROUTINE: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ROUTINE; - case URGENT: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.URGENT; - case ASAP: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ASAP; - case STAT: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.STAT; - default: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.NULL; - } -} - public static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException { if (src == null) return null; @@ -8202,6 +4547,92 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.dstu3.model.Communication.CommunicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PREPARATION: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.PREPARATION; + case INPROGRESS: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.INPROGRESS; + case SUSPENDED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.SUSPENDED; + case ABORTED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ABORTED; + case COMPLETED: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Communication.CommunicationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.r4.model.Communication.CommunicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PREPARATION: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.PREPARATION; + case INPROGRESS: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.INPROGRESS; + case SUSPENDED: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.SUSPENDED; + case ABORTED: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.ABORTED; + case COMPLETED: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode convertCompartmentCode(org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PATIENT: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.PATIENT; + case ENCOUNTER: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.ENCOUNTER; + case RELATEDPERSON: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.RELATEDPERSON; + case PRACTITIONER: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.PRACTITIONER; + case DEVICE: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.DEVICE; + default: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode convertCompartmentCode(org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PATIENT: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.PATIENT; + case ENCOUNTER: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.ENCOUNTER; + case RELATEDPERSON: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.RELATEDPERSON; + case PRACTITIONER: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.PRACTITIONER; + case DEVICE: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.DEVICE; + default: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.NULL; + } +} + public static org.hl7.fhir.r4.model.CompartmentDefinition convertCompartmentDefinition(org.hl7.fhir.dstu3.model.CompartmentDefinition src) throws FHIRException { if (src == null) return null; @@ -8278,32 +4709,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType convertCompartmentType(org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PATIENT: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.PATIENT; - case ENCOUNTER: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.ENCOUNTER; - case RELATEDPERSON: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.RELATEDPERSON; - case PRACTITIONER: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.PRACTITIONER; - case DEVICE: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.DEVICE; - default: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType convertCompartmentType(org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PATIENT: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.PATIENT; - case ENCOUNTER: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.ENCOUNTER; - case RELATEDPERSON: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.RELATEDPERSON; - case PRACTITIONER: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.PRACTITIONER; - case DEVICE: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.DEVICE; - default: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.NULL; - } -} - public static org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent convertCompartmentDefinitionResourceComponent(org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentDefinitionResourceComponent src) throws FHIRException { if (src == null) return null; @@ -8332,6 +4737,32 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType convertCompartmentType(org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PATIENT: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.PATIENT; + case ENCOUNTER: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.ENCOUNTER; + case RELATEDPERSON: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.RELATEDPERSON; + case PRACTITIONER: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.PRACTITIONER; + case DEVICE: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.DEVICE; + default: return org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType convertCompartmentType(org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PATIENT: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.PATIENT; + case ENCOUNTER: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.ENCOUNTER; + case RELATEDPERSON: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.RELATEDPERSON; + case PRACTITIONER: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.PRACTITIONER; + case DEVICE: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.DEVICE; + default: return org.hl7.fhir.dstu3.model.CompartmentDefinition.CompartmentType.NULL; + } +} + public static org.hl7.fhir.r4.model.Composition convertComposition(org.hl7.fhir.dstu3.model.Composition src) throws FHIRException { if (src == null) return null; @@ -8408,55 +4839,27 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.dstu3.model.Composition.CompositionStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode src) throws FHIRException { if (src == null) return null; switch (src) { - case PRELIMINARY: return org.hl7.fhir.r4.model.Composition.CompositionStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.Composition.CompositionStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.Composition.CompositionStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Composition.CompositionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Composition.CompositionStatus.NULL; + case PERSONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PERSONAL; + case PROFESSIONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PROFESSIONAL; + case LEGAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.LEGAL; + case OFFICIAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.OFFICIAL; + default: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.NULL; } } - private static org.hl7.fhir.dstu3.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.r4.model.Composition.CompositionStatus src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.r4.model.Composition.CompositionAttestationMode src) throws FHIRException { if (src == null) return null; switch (src) { - case PRELIMINARY: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.FINAL; - case AMENDED: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.Composition.DocumentConfidentiality convertDocumentConfidentiality(org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case U: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.U; - case L: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.L; - case M: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.M; - case N: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.N; - case R: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.R; - case V: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.V; - default: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality convertDocumentConfidentiality(org.hl7.fhir.r4.model.Composition.DocumentConfidentiality src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case U: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.U; - case L: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.L; - case M: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.M; - case N: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.N; - case R: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.R; - case V: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.V; - default: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.NULL; + case PERSONAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.PERSONAL; + case PROFESSIONAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.PROFESSIONAL; + case LEGAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.LEGAL; + case OFFICIAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.OFFICIAL; + default: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.NULL; } } @@ -8488,78 +4891,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PERSONAL; - case PROFESSIONAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PROFESSIONAL; - case LEGAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.LEGAL; - case OFFICIAL: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.OFFICIAL; - default: return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.r4.model.Composition.CompositionAttestationMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSONAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.PERSONAL; - case PROFESSIONAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.PROFESSIONAL; - case LEGAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.LEGAL; - case OFFICIAL: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.OFFICIAL; - default: return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.NULL; - } -} - - public static org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent convertCompositionRelatesToComponent(org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertDocumentRelationshipType(src.getCode())); - if (src.hasTarget()) - tgt.setTarget(convertType(src.getTarget())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent convertCompositionRelatesToComponent(org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent tgt = new org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertDocumentRelationshipType(src.getCode())); - if (src.hasTarget()) - tgt.setTarget(convertType(src.getTarget())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Composition.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REPLACES: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.REPLACES; - case TRANSFORMS: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.TRANSFORMS; - case SIGNS: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.SIGNS; - case APPENDS: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.APPENDS; - default: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.r4.model.Composition.DocumentRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REPLACES: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.REPLACES; - case TRANSFORMS: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.TRANSFORMS; - case SIGNS: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.SIGNS; - case APPENDS: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.APPENDS; - default: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.NULL; - } -} - public static org.hl7.fhir.r4.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent src) throws FHIRException { if (src == null) return null; @@ -8588,76 +4919,142 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu3.model.Composition.SectionComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent convertCompositionRelatesToComponent(org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); + org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent(); copyElement(src, tgt); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasText()) - tgt.setText(convertNarrative(src.getText())); - if (src.hasMode()) - tgt.setMode(convertSectionMode(src.getMode())); - if (src.hasOrderedBy()) - tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEntry()) - tgt.addEntry(convertReference(t)); - if (src.hasEmptyReason()) - tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); - for (org.hl7.fhir.dstu3.model.Composition.SectionComponent t : src.getSection()) - tgt.addSection(convertSectionComponent(t)); + tgt.setCode(convertDocumentRelationshipType(src.getCode())); + if (src.hasTarget()) + tgt.setTarget(convertType(src.getTarget())); return tgt; } - public static org.hl7.fhir.dstu3.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.r4.model.Composition.SectionComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent convertCompositionRelatesToComponent(org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu3.model.Composition.SectionComponent(); + org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent tgt = new org.hl7.fhir.dstu3.model.Composition.CompositionRelatesToComponent(); copyElement(src, tgt); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasText()) - tgt.setText(convertNarrative(src.getText())); - if (src.hasMode()) - tgt.setMode(convertSectionMode(src.getMode())); - if (src.hasOrderedBy()) - tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); - for (org.hl7.fhir.r4.model.Reference t : src.getEntry()) - tgt.addEntry(convertReference(t)); - if (src.hasEmptyReason()) - tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); - for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) - tgt.addSection(convertSectionComponent(t)); + tgt.setCode(convertDocumentRelationshipType(src.getCode())); + if (src.hasTarget()) + tgt.setTarget(convertType(src.getTarget())); return tgt; } - private static org.hl7.fhir.r4.model.Composition.SectionMode convertSectionMode(org.hl7.fhir.dstu3.model.Composition.SectionMode src) throws FHIRException { + private static org.hl7.fhir.r4.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.dstu3.model.Composition.CompositionStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case WORKING: return org.hl7.fhir.r4.model.Composition.SectionMode.WORKING; - case SNAPSHOT: return org.hl7.fhir.r4.model.Composition.SectionMode.SNAPSHOT; - case CHANGES: return org.hl7.fhir.r4.model.Composition.SectionMode.CHANGES; - default: return org.hl7.fhir.r4.model.Composition.SectionMode.NULL; + case PRELIMINARY: return org.hl7.fhir.r4.model.Composition.CompositionStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.Composition.CompositionStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.Composition.CompositionStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Composition.CompositionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Composition.CompositionStatus.NULL; } } - private static org.hl7.fhir.dstu3.model.Composition.SectionMode convertSectionMode(org.hl7.fhir.r4.model.Composition.SectionMode src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.r4.model.Composition.CompositionStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case WORKING: return org.hl7.fhir.dstu3.model.Composition.SectionMode.WORKING; - case SNAPSHOT: return org.hl7.fhir.dstu3.model.Composition.SectionMode.SNAPSHOT; - case CHANGES: return org.hl7.fhir.dstu3.model.Composition.SectionMode.CHANGES; - default: return org.hl7.fhir.dstu3.model.Composition.SectionMode.NULL; + case PRELIMINARY: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.FINAL; + case AMENDED: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.NULL; } } + public static org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent(); + copyElement(src, tgt); + if (src.hasContent()) + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent(); + copyElement(src, tgt); + if (src.hasContent()) + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public static org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent convertConceptDefinitionComponent(org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + if (src.hasDefinition()) + tgt.setDefinition(src.getDefinition()); + for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); + for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent t : src.getProperty()) + tgt.addProperty(convertConceptPropertyComponent(t)); + for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent t : src.getConcept()) + tgt.addConcept(convertConceptDefinitionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent convertConceptDefinitionComponent(org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + if (src.hasDefinition()) + tgt.setDefinition(src.getDefinition()); + for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertConceptDefinitionDesignationComponent(t)); + for (org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent t : src.getProperty()) + tgt.addProperty(convertConceptPropertyComponent(t)); + for (org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent t : src.getConcept()) + tgt.addConcept(convertConceptDefinitionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent convertConceptDefinitionDesignationComponent(org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent convertConceptDefinitionDesignationComponent(org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + public static org.hl7.fhir.r4.model.ConceptMap convertConceptMap(org.hl7.fhir.dstu3.model.ConceptMap src) throws FHIRException { if (src == null) return null; @@ -8746,6 +5143,42 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RELATEDTO: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.RELATEDTO; + case EQUIVALENT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; + case EQUAL: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUAL; + case WIDER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER; + case SUBSUMES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SUBSUMES; + case NARROWER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER; + case SPECIALIZES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; + case INEXACT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.INEXACT; + case UNMATCHED: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED; + case DISJOINT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT; + default: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RELATEDTO: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.RELATEDTO; + case EQUIVALENT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; + case EQUAL: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUAL; + case WIDER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.WIDER; + case SUBSUMES: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SUBSUMES; + case NARROWER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NARROWER; + case SPECIALIZES: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; + case INEXACT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.INEXACT; + case UNMATCHED: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED; + case DISJOINT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.DISJOINT; + default: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NULL; + } +} + public static org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { if (src == null) return null; @@ -8786,142 +5219,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasEquivalence()) - tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); - if (src.hasComment()) - tgt.setComment(src.getComment()); - for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); - for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - if (src.hasEquivalence()) - tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); - if (src.hasComment()) - tgt.setComment(src.getComment()); - for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); - for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RELATEDTO: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.RELATEDTO; - case EQUIVALENT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; - case EQUAL: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUAL; - case WIDER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER; - case SUBSUMES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SUBSUMES; - case NARROWER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER; - case SPECIALIZES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; - case INEXACT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.INEXACT; - case UNMATCHED: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED; - case DISJOINT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT; - default: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RELATEDTO: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.RELATEDTO; - case EQUIVALENT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUIVALENT; - case EQUAL: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUAL; - case WIDER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.WIDER; - case SUBSUMES: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SUBSUMES; - case NARROWER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NARROWER; - case SPECIALIZES: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SPECIALIZES; - case INEXACT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.INEXACT; - case UNMATCHED: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED; - case DISJOINT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.DISJOINT; - default: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NULL; - } -} - - public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); - copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); - copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - return tgt; - } - public static org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedComponent convertConceptMapGroupUnmappedComponent(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedComponent src) throws FHIRException { if (src == null) return null; @@ -8976,6 +5273,150 @@ public class VersionConvertor_30_40 { } } + public static org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent convertConceptPropertyComponent(org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent convertConceptPropertyComponent(org.hl7.fhir.r4.model.CodeSystem.ConceptPropertyComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptPropertyComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); + copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) + tgt.addConcept(convertConceptReferenceComponent(t)); + for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) + tgt.addFilter(convertConceptSetFilterComponent(t)); + for (org.hl7.fhir.dstu3.model.UriType t : src.getValueSet()) + tgt.addValueSet(t.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); + copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) + tgt.addConcept(convertConceptReferenceComponent(t)); + for (org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) + tgt.addFilter(convertConceptSetFilterComponent(t)); + for (org.hl7.fhir.r4.model.UriType t : src.getValueSet()) + tgt.addValueSet(t.getValue()); + return tgt; + } + + public static org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); + copyElement(src, tgt); + if (src.hasProperty()) + tgt.setProperty(src.getProperty()); + if (src.hasOp()) + tgt.setOp(convertFilterOperator(src.getOp())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); + copyElement(src, tgt); + if (src.hasProperty()) + tgt.setProperty(src.getProperty()); + if (src.hasOp()) + tgt.setOp(convertFilterOperator(src.getOp())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + public static org.hl7.fhir.r4.model.Condition convertCondition(org.hl7.fhir.dstu3.model.Condition src) throws FHIRException { if (src == null) return null; @@ -9082,6 +5523,54 @@ public class VersionConvertor_30_40 { } } + public static org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) + tgt.addCode(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getDetail()) + tgt.addDetail(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) + tgt.addCode(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) + tgt.addDetail(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionStageComponent(); + copyElement(src, tgt); + if (src.hasSummary()) + tgt.setSummary(convertCodeableConcept(src.getSummary())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getAssessment()) + tgt.addAssessment(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.r4.model.Condition.ConditionStageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent(); + copyElement(src, tgt); + if (src.hasSummary()) + tgt.setSummary(convertCodeableConcept(src.getSummary())); + for (org.hl7.fhir.r4.model.Reference t : src.getAssessment()) + tgt.addAssessment(convertReference(t)); + return tgt; + } + private static org.hl7.fhir.r4.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus src) throws FHIRException { if (src == null) return null; @@ -9110,53 +5599,51 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionStageComponent(); - copyElement(src, tgt); - if (src.hasSummary()) - tgt.setSummary(convertCodeableConcept(src.getSummary())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAssessment()) - tgt.addAssessment(convertReference(t)); - return tgt; + switch (src) { + case NOTSUPPORTED: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED; + case SINGLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE; + case MULTIPLE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE; + default: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.r4.model.Condition.ConditionStageComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent(); - copyElement(src, tgt); - if (src.hasSummary()) - tgt.setSummary(convertCodeableConcept(src.getSummary())); - for (org.hl7.fhir.r4.model.Reference t : src.getAssessment()) - tgt.addAssessment(convertReference(t)); - return tgt; + switch (src) { + case NOTSUPPORTED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED; + case SINGLE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE; + case MULTIPLE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NULL; } +} - public static org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus convertConditionalReadStatus(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getDetail()) - tgt.addDetail(convertReference(t)); - return tgt; + switch (src) { + case NOTSUPPORTED: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.NOTSUPPORTED; + case MODIFIEDSINCE: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.MODIFIEDSINCE; + case NOTMATCH: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.NOTMATCH; + case FULLSUPPORT: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.FULLSUPPORT; + default: return org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus convertConditionalReadStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalReadStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) - tgt.addDetail(convertReference(t)); - return tgt; + switch (src) { + case NOTSUPPORTED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.NOTSUPPORTED; + case MODIFIEDSINCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.MODIFIEDSINCE; + case NOTMATCH: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.NOTMATCH; + case FULLSUPPORT: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.FULLSUPPORT; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalReadStatus.NULL; } +} public static org.hl7.fhir.r4.model.Consent convertConsent(org.hl7.fhir.dstu3.model.Consent src) throws FHIRException { if (src == null) @@ -9246,6 +5733,54 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.Consent.ConsentDataMeaning convertConsentDataMeaning(org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INSTANCE: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.INSTANCE; + case RELATED: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.RELATED; + case DEPENDENTS: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.DEPENDENTS; + case AUTHOREDBY: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.AUTHOREDBY; + default: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning convertConsentDataMeaning(org.hl7.fhir.r4.model.Consent.ConsentDataMeaning src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INSTANCE: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.INSTANCE; + case RELATED: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.RELATED; + case DEPENDENTS: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.DEPENDENTS; + case AUTHOREDBY: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.AUTHOREDBY; + default: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.NULL; + } +} + + public static org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent(); + copyElement(src, tgt); + if (src.hasAuthority()) + tgt.setAuthority(src.getAuthority()); + if (src.hasUri()) + tgt.setUri(src.getUri()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent(); + copyElement(src, tgt); + if (src.hasAuthority()) + tgt.setAuthority(src.getAuthority()); + if (src.hasUri()) + tgt.setUri(src.getUri()); + return tgt; + } + private static org.hl7.fhir.r4.model.Consent.ConsentState convertConsentState(org.hl7.fhir.dstu3.model.Consent.ConsentState src) throws FHIRException { if (src == null) return null; @@ -9273,6 +5808,3393 @@ public class VersionConvertor_30_40 { default: return org.hl7.fhir.dstu3.model.Consent.ConsentState.NULL; } } + + private static org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ERROR: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.ERROR; + case WARNING: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.WARNING; + default: return org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity convertConstraintSeverity(org.hl7.fhir.r4.model.ElementDefinition.ConstraintSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ERROR: return org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity.ERROR; + case WARNING: return org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity.WARNING; + default: return org.hl7.fhir.dstu3.model.ElementDefinition.ConstraintSeverity.NULL; + } +} + + public static org.hl7.fhir.r4.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.dstu3.model.Patient.ContactComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Patient.ContactComponent tgt = new org.hl7.fhir.r4.model.Patient.ContactComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRelationship()) + tgt.addRelationship(convertCodeableConcept(t)); + if (src.hasName()) + tgt.setName(convertHumanName(src.getName())); + for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + if (src.hasAddress()) + tgt.setAddress(convertAddress(src.getAddress())); + if (src.hasGender()) + tgt.setGender(convertAdministrativeGender(src.getGender())); + if (src.hasOrganization()) + tgt.setOrganization(convertReference(src.getOrganization())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.r4.model.Patient.ContactComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Patient.ContactComponent tgt = new org.hl7.fhir.dstu3.model.Patient.ContactComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRelationship()) + tgt.addRelationship(convertCodeableConcept(t)); + if (src.hasName()) + tgt.setName(convertHumanName(src.getName())); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + if (src.hasAddress()) + tgt.setAddress(convertAddress(src.getAddress())); + if (src.hasGender()) + tgt.setGender(convertAdministrativeGender(src.getGender())); + if (src.hasOrganization()) + tgt.setOrganization(convertReference(src.getOrganization())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ContactDetail convertContactDetail(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ContactDetail convertContactDetail(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) + tgt.addTelecom(convertContactPoint(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.ContactPoint convertContactPoint(org.hl7.fhir.dstu3.model.ContactPoint src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ContactPoint tgt = new org.hl7.fhir.r4.model.ContactPoint(); + copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(convertContactPointSystem(src.getSystem())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasUse()) + tgt.setUse(convertContactPointUse(src.getUse())); + if (src.hasRank()) + tgt.setRank(src.getRank()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ContactPoint convertContactPoint(org.hl7.fhir.r4.model.ContactPoint src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ContactPoint tgt = new org.hl7.fhir.dstu3.model.ContactPoint(); + copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(convertContactPointSystem(src.getSystem())); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasUse()) + tgt.setUse(convertContactPointUse(src.getUse())); + if (src.hasRank()) + tgt.setRank(src.getRank()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + private static org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem convertContactPointSystem(org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PHONE: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.PHONE; + case FAX: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.FAX; + case EMAIL: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.EMAIL; + case PAGER: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.PAGER; + case URL: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.URL; + case SMS: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.SMS; + case OTHER: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.OTHER; + default: return org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem convertContactPointSystem(org.hl7.fhir.r4.model.ContactPoint.ContactPointSystem src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PHONE: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.PHONE; + case FAX: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.FAX; + case EMAIL: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.EMAIL; + case PAGER: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.PAGER; + case URL: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.URL; + case SMS: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.SMS; + case OTHER: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.OTHER; + default: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem.NULL; + } +} + + private static org.hl7.fhir.r4.model.ContactPoint.ContactPointUse convertContactPointUse(org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HOME: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.HOME; + case WORK: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.WORK; + case TEMP: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.TEMP; + case OLD: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.OLD; + case MOBILE: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.MOBILE; + default: return org.hl7.fhir.r4.model.ContactPoint.ContactPointUse.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse convertContactPointUse(org.hl7.fhir.r4.model.ContactPoint.ContactPointUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HOME: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.HOME; + case WORK: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.WORK; + case TEMP: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.TEMP; + case OLD: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.OLD; + case MOBILE: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.MOBILE; + default: return org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse.NULL; + } +} + + private static org.hl7.fhir.r4.model.TestScript.ContentType convertContentType(org.hl7.fhir.dstu3.model.TestScript.ContentType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case XML: return org.hl7.fhir.r4.model.TestScript.ContentType.XML; + case JSON: return org.hl7.fhir.r4.model.TestScript.ContentType.JSON; + case TTL: return org.hl7.fhir.r4.model.TestScript.ContentType.TTL; + case NONE: return org.hl7.fhir.r4.model.TestScript.ContentType.NONE; + default: return org.hl7.fhir.r4.model.TestScript.ContentType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.TestScript.ContentType convertContentType(org.hl7.fhir.r4.model.TestScript.ContentType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case XML: return org.hl7.fhir.dstu3.model.TestScript.ContentType.XML; + case JSON: return org.hl7.fhir.dstu3.model.TestScript.ContentType.JSON; + case TTL: return org.hl7.fhir.dstu3.model.TestScript.ContentType.TTL; + case NONE: return org.hl7.fhir.dstu3.model.TestScript.ContentType.NONE; + default: return org.hl7.fhir.dstu3.model.TestScript.ContentType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Contract convertContract(org.hl7.fhir.dstu3.model.Contract src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract tgt = new org.hl7.fhir.r4.model.Contract(); + copyDomainResource(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasStatus()) + tgt.setStatus(convertContractStatus(src.getStatus())); + if (src.hasIssued()) + tgt.setIssued(src.getIssued()); + if (src.hasApplies()) + tgt.setApplies(convertPeriod(src.getApplies())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getSubject()) + tgt.addSubject(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthority()) + tgt.addAuthority(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getDomain()) + tgt.addDomain(convertReference(t)); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubType()) + tgt.addSubType(convertCodeableConcept(t)); + if (src.hasContentDerivative()) + tgt.setContentDerivative(convertCodeableConcept(src.getContentDerivative())); + for (org.hl7.fhir.dstu3.model.Contract.SignatoryComponent t : src.getSigner()) + tgt.addSigner(convertSignatoryComponent(t)); + for (org.hl7.fhir.dstu3.model.Contract.TermComponent t : src.getTerm()) + tgt.addTerm(convertTermComponent(t)); + for (org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) + tgt.addFriendly(convertFriendlyLanguageComponent(t)); + for (org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent t : src.getLegal()) + tgt.addLegal(convertLegalLanguageComponent(t)); + for (org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent t : src.getRule()) + tgt.setRule(convertComputableLanguageComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract convertContract(org.hl7.fhir.r4.model.Contract src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract tgt = new org.hl7.fhir.dstu3.model.Contract(); + copyDomainResource(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasStatus()) + tgt.setStatus(convertContractStatus(src.getStatus())); + if (src.hasIssued()) + tgt.setIssued(src.getIssued()); + if (src.hasApplies()) + tgt.setApplies(convertPeriod(src.getApplies())); + for (org.hl7.fhir.r4.model.Reference t : src.getSubject()) + tgt.addSubject(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getAuthority()) + tgt.addAuthority(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getDomain()) + tgt.addDomain(convertReference(t)); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubType()) + tgt.addSubType(convertCodeableConcept(t)); + if (src.hasContentDerivative()) + tgt.setContentDerivative(convertCodeableConcept(src.getContentDerivative())); + for (org.hl7.fhir.r4.model.Contract.SignatoryComponent t : src.getSigner()) + tgt.addSigner(convertSignatoryComponent(t)); + for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getTerm()) + tgt.addTerm(convertTermComponent(t)); + for (org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) + tgt.addFriendly(convertFriendlyLanguageComponent(t)); + for (org.hl7.fhir.r4.model.Contract.LegalLanguageComponent t : src.getLegal()) + tgt.addLegal(convertLegalLanguageComponent(t)); + if (src.hasRule()) + tgt.addRule(convertComputableLanguageComponent(src.getRule())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Contract.ContractStatus convertContractStatus(org.hl7.fhir.dstu3.model.Contract.ContractStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AMENDED: return org.hl7.fhir.r4.model.Contract.ContractStatus.AMENDED; + case APPENDED: return org.hl7.fhir.r4.model.Contract.ContractStatus.APPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.Contract.ContractStatus.CANCELLED; + case DISPUTED: return org.hl7.fhir.r4.model.Contract.ContractStatus.DISPUTED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Contract.ContractStatus.ENTEREDINERROR; + case EXECUTABLE: return org.hl7.fhir.r4.model.Contract.ContractStatus.EXECUTABLE; + case EXECUTED: return org.hl7.fhir.r4.model.Contract.ContractStatus.EXECUTED; + case NEGOTIABLE: return org.hl7.fhir.r4.model.Contract.ContractStatus.NEGOTIABLE; + case OFFERED: return org.hl7.fhir.r4.model.Contract.ContractStatus.OFFERED; + case POLICY: return org.hl7.fhir.r4.model.Contract.ContractStatus.POLICY; + case REJECTED: return org.hl7.fhir.r4.model.Contract.ContractStatus.REJECTED; + case RENEWED: return org.hl7.fhir.r4.model.Contract.ContractStatus.RENEWED; + case REVOKED: return org.hl7.fhir.r4.model.Contract.ContractStatus.REVOKED; + case RESOLVED: return org.hl7.fhir.r4.model.Contract.ContractStatus.RESOLVED; + case TERMINATED: return org.hl7.fhir.r4.model.Contract.ContractStatus.TERMINATED; + default: return org.hl7.fhir.r4.model.Contract.ContractStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Contract.ContractStatus convertContractStatus(org.hl7.fhir.r4.model.Contract.ContractStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AMENDED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.AMENDED; + case APPENDED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.APPENDED; + case CANCELLED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.CANCELLED; + case DISPUTED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.DISPUTED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.ENTEREDINERROR; + case EXECUTABLE: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.EXECUTABLE; + case EXECUTED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.EXECUTED; + case NEGOTIABLE: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.NEGOTIABLE; + case OFFERED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.OFFERED; + case POLICY: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.POLICY; + case REJECTED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.REJECTED; + case RENEWED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.RENEWED; + case REVOKED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.REVOKED; + case RESOLVED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.RESOLVED; + case TERMINATED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.TERMINATED; + default: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Contributor convertContributor(org.hl7.fhir.dstu3.model.Contributor src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contributor tgt = new org.hl7.fhir.r4.model.Contributor(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertContributorType(src.getType())); + if (src.hasName()) + tgt.setName(src.getName()); + for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) + tgt.addContact(convertContactDetail(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contributor convertContributor(org.hl7.fhir.r4.model.Contributor src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contributor tgt = new org.hl7.fhir.dstu3.model.Contributor(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertContributorType(src.getType())); + if (src.hasName()) + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) + tgt.addContact(convertContactDetail(t)); + return tgt; + } + + private static org.hl7.fhir.r4.model.Contributor.ContributorType convertContributorType(org.hl7.fhir.dstu3.model.Contributor.ContributorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AUTHOR: return org.hl7.fhir.r4.model.Contributor.ContributorType.AUTHOR; + case EDITOR: return org.hl7.fhir.r4.model.Contributor.ContributorType.EDITOR; + case REVIEWER: return org.hl7.fhir.r4.model.Contributor.ContributorType.REVIEWER; + case ENDORSER: return org.hl7.fhir.r4.model.Contributor.ContributorType.ENDORSER; + default: return org.hl7.fhir.r4.model.Contributor.ContributorType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Contributor.ContributorType convertContributorType(org.hl7.fhir.r4.model.Contributor.ContributorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AUTHOR: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.AUTHOR; + case EDITOR: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.EDITOR; + case REVIEWER: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.REVIEWER; + case ENDORSER: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.ENDORSER; + default: return org.hl7.fhir.dstu3.model.Contributor.ContributorType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Count convertCount(org.hl7.fhir.dstu3.model.Count src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Count tgt = new org.hl7.fhir.r4.model.Count(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Count convertCount(org.hl7.fhir.r4.model.Count src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Count tgt = new org.hl7.fhir.dstu3.model.Count(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.Coverage convertCoverage(org.hl7.fhir.dstu3.model.Coverage src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Coverage tgt = new org.hl7.fhir.r4.model.Coverage(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertCoverageStatus(src.getStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasPolicyHolder()) + tgt.setPolicyHolder(convertReference(src.getPolicyHolder())); + if (src.hasSubscriber()) + tgt.setSubscriber(convertReference(src.getSubscriber())); + if (src.hasSubscriberId()) + tgt.setSubscriberId(src.getSubscriberId()); + if (src.hasBeneficiary()) + tgt.setBeneficiary(convertReference(src.getBeneficiary())); + if (src.hasRelationship()) + tgt.setRelationship(convertCodeableConcept(src.getRelationship())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getPayor()) + tgt.addPayor(convertReference(t)); + if (src.hasGrouping()) + tgt.setGrouping(convertGroupComponent(src.getGrouping())); + if (src.hasDependent()) + tgt.setDependent(src.getDependent()); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasOrder()) + tgt.setOrder(src.getOrder()); + if (src.hasNetwork()) + tgt.setNetwork(src.getNetwork()); + for (org.hl7.fhir.dstu3.model.Reference t : src.getContract()) + tgt.addContract(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Coverage convertCoverage(org.hl7.fhir.r4.model.Coverage src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Coverage tgt = new org.hl7.fhir.dstu3.model.Coverage(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertCoverageStatus(src.getStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasPolicyHolder()) + tgt.setPolicyHolder(convertReference(src.getPolicyHolder())); + if (src.hasSubscriber()) + tgt.setSubscriber(convertReference(src.getSubscriber())); + if (src.hasSubscriberId()) + tgt.setSubscriberId(src.getSubscriberId()); + if (src.hasBeneficiary()) + tgt.setBeneficiary(convertReference(src.getBeneficiary())); + if (src.hasRelationship()) + tgt.setRelationship(convertCodeableConcept(src.getRelationship())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.r4.model.Reference t : src.getPayor()) + tgt.addPayor(convertReference(t)); + if (src.hasGrouping()) + tgt.setGrouping(convertGroupComponent(src.getGrouping())); + if (src.hasDependent()) + tgt.setDependent(src.getDependent()); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasOrder()) + tgt.setOrder(src.getOrder()); + if (src.hasNetwork()) + tgt.setNetwork(src.getNetwork()); + for (org.hl7.fhir.r4.model.Reference t : src.getContract()) + tgt.addContract(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Account.CoverageComponent convertCoverageComponent(org.hl7.fhir.dstu3.model.Account.CoverageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Account.CoverageComponent tgt = new org.hl7.fhir.r4.model.Account.CoverageComponent(); + copyElement(src, tgt); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasPriority()) + tgt.setPriority(src.getPriority()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Account.CoverageComponent convertCoverageComponent(org.hl7.fhir.r4.model.Account.CoverageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Account.CoverageComponent tgt = new org.hl7.fhir.dstu3.model.Account.CoverageComponent(); + copyElement(src, tgt); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasPriority()) + tgt.setPriority(src.getPriority()); + return tgt; + } + + private static org.hl7.fhir.r4.model.Coverage.CoverageStatus convertCoverageStatus(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.ACTIVE; + case CANCELLED: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.CANCELLED; + case DRAFT: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.DRAFT; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Coverage.CoverageStatus convertCoverageStatus(org.hl7.fhir.r4.model.Coverage.CoverageStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.ACTIVE; + case CANCELLED: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.CANCELLED; + case DRAFT: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.DRAFT; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.StructureDefinition convertDataElement(org.hl7.fhir.dstu3.model.DataElement src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); + copyDomainResource(src, tgt); + if (src.hasUrl()) + tgt.setUrl(src.getUrl().replace("/DataElement/", "/StructureDefinition/de-")); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + if (src.hasStatus()) + tgt.setStatus(convertPublicationStatus(src.getStatus())); + if (src.hasExperimental()) + tgt.setExperimental(src.getExperimental()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasPublisher()) + tgt.setPublisher(src.getPublisher()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasTitle()) + tgt.setTitle(src.getTitle()); + for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) + tgt.addContact(convertContactDetail(t)); + for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) + tgt.addUseContext(convertUsageContext(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) + tgt.addJurisdiction(convertCodeableConcept(t)); + if (src.hasCopyright()) + tgt.setCopyright(src.getCopyright()); +// if (src.hasStringency()) +// tgt.setStringency(convertDataElementStringency(src.getStringency())); + for (org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping()) + tgt.addMapping(convertDataElementMappingComponent(t)); + for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) + tgt.getSnapshot().addElement(convertElementDefinition(t)); + tgt.setKind(StructureDefinitionKind.LOGICAL); + tgt.setAbstract(false); + tgt.setType(tgt.getName()); + tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/Element"); + tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); + return tgt; + } + + public static org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertDataElementMappingComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); + copyElement(src, tgt); + if (src.hasIdentity()) + tgt.setIdentity(src.getIdentity()); + if (src.hasUri()) + tgt.setUri(src.getUri()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + return tgt; + } + + public static org.hl7.fhir.r4.model.DateType convertDate(org.hl7.fhir.dstu3.model.DateType src) throws FHIRException { + org.hl7.fhir.r4.model.DateType tgt = new org.hl7.fhir.r4.model.DateType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DateType convertDate(org.hl7.fhir.r4.model.DateType src) throws FHIRException { + org.hl7.fhir.dstu3.model.DateType tgt = new org.hl7.fhir.dstu3.model.DateType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.DateTimeType convertDateTime(org.hl7.fhir.dstu3.model.DateTimeType src) throws FHIRException { + org.hl7.fhir.r4.model.DateTimeType tgt = new org.hl7.fhir.r4.model.DateTimeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DateTimeType convertDateTime(org.hl7.fhir.r4.model.DateTimeType src) throws FHIRException { + org.hl7.fhir.dstu3.model.DateTimeType tgt = new org.hl7.fhir.dstu3.model.DateTimeType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + private static org.hl7.fhir.r4.model.Timing.DayOfWeek convertDayOfWeek(org.hl7.fhir.dstu3.model.Timing.DayOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.r4.model.Timing.DayOfWeek.MON; + case TUE: return org.hl7.fhir.r4.model.Timing.DayOfWeek.TUE; + case WED: return org.hl7.fhir.r4.model.Timing.DayOfWeek.WED; + case THU: return org.hl7.fhir.r4.model.Timing.DayOfWeek.THU; + case FRI: return org.hl7.fhir.r4.model.Timing.DayOfWeek.FRI; + case SAT: return org.hl7.fhir.r4.model.Timing.DayOfWeek.SAT; + case SUN: return org.hl7.fhir.r4.model.Timing.DayOfWeek.SUN; + default: return org.hl7.fhir.r4.model.Timing.DayOfWeek.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Timing.DayOfWeek convertDayOfWeek(org.hl7.fhir.r4.model.Timing.DayOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.MON; + case TUE: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.TUE; + case WED: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.WED; + case THU: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.THU; + case FRI: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.FRI; + case SAT: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.SAT; + case SUN: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.SUN; + default: return org.hl7.fhir.dstu3.model.Timing.DayOfWeek.NULL; + } +} + + private static org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.MON; + case TUE: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.TUE; + case WED: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.WED; + case THU: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.THU; + case FRI: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.FRI; + case SAT: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SAT; + case SUN: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SUN; + default: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.MON; + case TUE: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.TUE; + case WED: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.WED; + case THU: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.THU; + case FRI: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.FRI; + case SAT: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.SAT; + case SUN: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.SUN; + default: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.NULL; + } +} + + private static org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.MON; + case TUE: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.TUE; + case WED: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.WED; + case THU: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.THU; + case FRI: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.FRI; + case SAT: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.SAT; + case SUN: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.SUN; + default: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MON: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.MON; + case TUE: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.TUE; + case WED: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.WED; + case THU: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.THU; + case FRI: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.FRI; + case SAT: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.SAT; + case SUN: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.SUN; + default: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.NULL; + } +} + + public static org.hl7.fhir.r4.model.DecimalType convertDecimal(org.hl7.fhir.dstu3.model.DecimalType src) throws FHIRException { + org.hl7.fhir.r4.model.DecimalType tgt = new org.hl7.fhir.r4.model.DecimalType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DecimalType convertDecimal(org.hl7.fhir.r4.model.DecimalType src) throws FHIRException { + org.hl7.fhir.dstu3.model.DecimalType tgt = new org.hl7.fhir.dstu3.model.DecimalType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent convertDesignationExcludeComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertDesignationExcludeDesignationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent convertDesignationExcludeComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertDesignationExcludeDesignationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent convertDesignationExcludeDesignationComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent convertDesignationExcludeDesignationComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent convertDesignationIncludeComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertDesignationIncludeDesignationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent convertDesignationIncludeComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent t : src.getDesignation()) + tgt.addDesignation(convertDesignationIncludeDesignationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent convertDesignationIncludeDesignationComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent convertDesignationIncludeDesignationComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent(); + copyElement(src, tgt); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasUse()) + tgt.setUse(convertCoding(src.getUse())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Claim.DetailComponent convertDetailComponent(org.hl7.fhir.dstu3.model.Claim.DetailComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Claim.DetailComponent tgt = new org.hl7.fhir.r4.model.Claim.DetailComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasRevenue()) + tgt.setRevenue(convertCodeableConcept(src.getRevenue())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasService()) + tgt.setService(convertCodeableConcept(src.getService())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) + tgt.addModifier(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) + tgt.addProgramCode(convertCodeableConcept(t)); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) + tgt.addUdi(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Claim.SubDetailComponent t : src.getSubDetail()) + tgt.addSubDetail(convertSubDetailComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Claim.DetailComponent convertDetailComponent(org.hl7.fhir.r4.model.Claim.DetailComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Claim.DetailComponent tgt = new org.hl7.fhir.dstu3.model.Claim.DetailComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasRevenue()) + tgt.setRevenue(convertCodeableConcept(src.getRevenue())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasService()) + tgt.setService(convertCodeableConcept(src.getService())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) + tgt.addModifier(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) + tgt.addProgramCode(convertCodeableConcept(t)); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) + tgt.addUdi(convertReference(t)); + for (org.hl7.fhir.r4.model.Claim.SubDetailComponent t : src.getSubDetail()) + tgt.addSubDetail(convertSubDetailComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.dstu3.model.DetectedIssue src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DetectedIssue tgt = new org.hl7.fhir.r4.model.DetectedIssue(); + copyDomainResource(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasStatus()) + tgt.setStatus(convertDetectedIssueStatus(src.getStatus())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasSeverity()) + tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasAuthor()) + tgt.setAuthor(convertReference(src.getAuthor())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) + tgt.addImplicated(convertReference(t)); + if (src.hasDetail()) + tgt.setDetail(src.getDetail()); + if (src.hasReference()) + tgt.setReference(src.getReference()); + for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) + tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.r4.model.DetectedIssue src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DetectedIssue tgt = new org.hl7.fhir.dstu3.model.DetectedIssue(); + copyDomainResource(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasStatus()) + tgt.setStatus(convertDetectedIssueStatus(src.getStatus())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasSeverity()) + tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasAuthor()) + tgt.setAuthor(convertReference(src.getAuthor())); + for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) + tgt.addImplicated(convertReference(t)); + if (src.hasDetail()) + tgt.setDetail(src.getDetail()); + if (src.hasReference()) + tgt.setReference(src.getReference()); + for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) + tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent(); + copyElement(src, tgt); + if (src.hasAction()) + tgt.setAction(convertCodeableConcept(src.getAction())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasAuthor()) + tgt.setAuthor(convertReference(src.getAuthor())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent(); + copyElement(src, tgt); + if (src.hasAction()) + tgt.setAction(convertCodeableConcept(src.getAction())); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasAuthor()) + tgt.setAuthor(convertReference(src.getAuthor())); + return tgt; + } + + private static org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HIGH: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.HIGH; + case MODERATE: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.MODERATE; + case LOW: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.LOW; + default: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case HIGH: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.HIGH; + case MODERATE: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.MODERATE; + case LOW: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.LOW; + default: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.NULL; + } +} + + private static org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus convertDetectedIssueStatus(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.CORRECTED; + case CANCELLED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus convertDetectedIssueStatus(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.FINAL; + case AMENDED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.CORRECTED; + case CANCELLED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Device convertDevice(org.hl7.fhir.dstu3.model.Device src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Device tgt = new org.hl7.fhir.r4.model.Device(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasUdi()) + tgt.setUdi(convertDeviceUdiComponent(src.getUdi())); + if (src.hasStatus()) + tgt.setStatus(convertFHIRDeviceStatus(src.getStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasLotNumber()) + tgt.setLotNumber(src.getLotNumber()); + if (src.hasManufacturer()) + tgt.setManufacturer(src.getManufacturer()); + if (src.hasManufactureDate()) + tgt.setManufactureDate(src.getManufactureDate()); + if (src.hasExpirationDate()) + tgt.setExpirationDate(src.getExpirationDate()); + if (src.hasModel()) + tgt.setModel(src.getModel()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasOwner()) + tgt.setOwner(convertReference(src.getOwner())); + for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + if (src.hasLocation()) + tgt.setLocation(convertReference(src.getLocation())); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSafety()) + tgt.addSafety(convertCodeableConcept(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Device convertDevice(org.hl7.fhir.r4.model.Device src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Device tgt = new org.hl7.fhir.dstu3.model.Device(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasUdi()) + tgt.setUdi(convertDeviceUdiComponent(src.getUdi())); + if (src.hasStatus()) + tgt.setStatus(convertFHIRDeviceStatus(src.getStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasLotNumber()) + tgt.setLotNumber(src.getLotNumber()); + if (src.hasManufacturer()) + tgt.setManufacturer(src.getManufacturer()); + if (src.hasManufactureDate()) + tgt.setManufactureDate(src.getManufactureDate()); + if (src.hasExpirationDate()) + tgt.setExpirationDate(src.getExpirationDate()); + if (src.hasModel()) + tgt.setModel(src.getModel()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasOwner()) + tgt.setOwner(convertReference(src.getOwner())); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + if (src.hasLocation()) + tgt.setLocation(convertReference(src.getLocation())); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSafety()) + tgt.addSafety(convertCodeableConcept(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.dstu3.model.DeviceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent(); + copyDomainResource(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasLastSystemChange()) + tgt.setLastSystemChange(src.getLastSystemChange()); + if (src.hasSource()) + tgt.setSource(convertReference(src.getSource())); + if (src.hasParent()) + tgt.setParent(convertReference(src.getParent())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getOperationalStatus()) + tgt.addOperationalStatus(convertCodeableConcept(t)); + if (src.hasParameterGroup()) + tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); + if (src.hasMeasurementPrinciple()) + tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); + for (org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) + tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); + if (src.hasLanguageCode()) + tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.r4.model.DeviceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceComponent tgt = new org.hl7.fhir.dstu3.model.DeviceComponent(); + copyDomainResource(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasLastSystemChange()) + tgt.setLastSystemChange(src.getLastSystemChange()); + if (src.hasSource()) + tgt.setSource(convertReference(src.getSource())); + if (src.hasParent()) + tgt.setParent(convertReference(src.getParent())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOperationalStatus()) + tgt.addOperationalStatus(convertCodeableConcept(t)); + if (src.hasParameterGroup()) + tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); + if (src.hasMeasurementPrinciple()) + tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); + for (org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) + tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); + if (src.hasLanguageCode()) + tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); + return tgt; + } + + public static org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); + copyElement(src, tgt); + if (src.hasSpecType()) + tgt.setSpecType(convertCodeableConcept(src.getSpecType())); + if (src.hasComponentId()) + tgt.setComponentId(convertIdentifier(src.getComponentId())); + if (src.hasProductionSpec()) + tgt.setProductionSpec(src.getProductionSpec()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); + copyElement(src, tgt); + if (src.hasSpecType()) + tgt.setSpecType(convertCodeableConcept(src.getSpecType())); + if (src.hasComponentId()) + tgt.setComponentId(convertIdentifier(src.getComponentId())); + if (src.hasProductionSpec()) + tgt.setProductionSpec(src.getProductionSpec()); + return tgt; + } + + public static org.hl7.fhir.r4.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.dstu3.model.DeviceMetric src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceMetric tgt = new org.hl7.fhir.r4.model.DeviceMetric(); + copyDomainResource(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasUnit()) + tgt.setUnit(convertCodeableConcept(src.getUnit())); + if (src.hasSource()) + tgt.setSource(convertReference(src.getSource())); + if (src.hasParent()) + tgt.setParent(convertReference(src.getParent())); + if (src.hasOperationalStatus()) + tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); + if (src.hasColor()) + tgt.setColor(convertDeviceMetricColor(src.getColor())); + if (src.hasCategory()) + tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); + if (src.hasMeasurementPeriod()) + tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); + for (org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) + tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.r4.model.DeviceMetric src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceMetric tgt = new org.hl7.fhir.dstu3.model.DeviceMetric(); + copyDomainResource(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasUnit()) + tgt.setUnit(convertCodeableConcept(src.getUnit())); + if (src.hasSource()) + tgt.setSource(convertReference(src.getSource())); + if (src.hasParent()) + tgt.setParent(convertReference(src.getParent())); + if (src.hasOperationalStatus()) + tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); + if (src.hasColor()) + tgt.setColor(convertDeviceMetricColor(src.getColor())); + if (src.hasCategory()) + tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); + if (src.hasMeasurementPeriod()) + tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); + for (org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) + tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertDeviceMetricCalibrationType(src.getType())); + if (src.hasState()) + tgt.setState(convertDeviceMetricCalibrationState(src.getState())); + if (src.hasTime()) + tgt.setTime(src.getTime()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertDeviceMetricCalibrationType(src.getType())); + if (src.hasState()) + tgt.setState(convertDeviceMetricCalibrationState(src.getState())); + if (src.hasTime()) + tgt.setTime(src.getTime()); + return tgt; + } + + private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTCALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; + case CALIBRATIONREQUIRED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; + case CALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; + case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOTCALIBRATED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; + case CALIBRATIONREQUIRED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; + case CALIBRATED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; + case UNSPECIFIED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; + default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.NULL; + } +} + + private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; + case OFFSET: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; + case GAIN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; + case TWOPOINT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UNSPECIFIED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; + case OFFSET: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; + case GAIN: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; + case TWOPOINT: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; + default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.NULL; + } +} + + private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MEASUREMENT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; + case SETTING: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.SETTING; + case CALCULATION: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.CALCULATION; + case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MEASUREMENT: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; + case SETTING: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.SETTING; + case CALCULATION: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.CALCULATION; + case UNSPECIFIED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; + default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.NULL; + } +} + + private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BLACK: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLACK; + case RED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.RED; + case GREEN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.GREEN; + case YELLOW: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.YELLOW; + case BLUE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLUE; + case MAGENTA: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.MAGENTA; + case CYAN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.CYAN; + case WHITE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.WHITE; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BLACK: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.BLACK; + case RED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.RED; + case GREEN: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.GREEN; + case YELLOW: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.YELLOW; + case BLUE: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.BLUE; + case MAGENTA: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.MAGENTA; + case CYAN: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.CYAN; + case WHITE: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.WHITE; + default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.NULL; + } +} + + private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ON: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.ON; + case OFF: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; + case STANDBY: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ON: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.ON; + case OFF: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; + case STANDBY: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.dstu3.model.DeviceRequest src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceRequest tgt = new org.hl7.fhir.r4.model.DeviceRequest(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getDefinition()) + tgt.addDefinition(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) + tgt.addBasedOn(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getPriorRequest()) + tgt.addPriorRequest(convertReference(t)); + if (src.hasGroupIdentifier()) + tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier())); + if (src.hasStatus()) + tgt.setStatus(convertDeviceRequestStatus(src.getStatus())); + if (src.hasIntent()) + tgt.setIntent(convertCodeableConcept(src.getIntent())); + if (src.hasPriority()) + tgt.setPriority(convertRequestPriority(src.getPriority())); + if (src.hasCode()) + tgt.setCode(convertType(src.getCode())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasContext()) + tgt.setContext(convertReference(src.getContext())); + if (src.hasOccurrence()) + tgt.setOccurrence(convertType(src.getOccurrence())); + if (src.hasAuthoredOn()) + tgt.setAuthoredOn(src.getAuthoredOn()); + if (src.hasRequester()) + tgt.setRequester(convertDeviceRequestRequesterComponent(src.getRequester())); + if (src.hasPerformerType()) + tgt.setPerformerType(convertCodeableConcept(src.getPerformerType())); + if (src.hasPerformer()) + tgt.setPerformer(convertReference(src.getPerformer())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) + tgt.addReasonCode(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) + tgt.addReasonReference(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInfo()) + tgt.addSupportingInfo(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getRelevantHistory()) + tgt.addRelevantHistory(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.r4.model.DeviceRequest src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceRequest tgt = new org.hl7.fhir.dstu3.model.DeviceRequest(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getDefinition()) + tgt.addDefinition(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) + tgt.addBasedOn(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getPriorRequest()) + tgt.addPriorRequest(convertReference(t)); + if (src.hasGroupIdentifier()) + tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier())); + if (src.hasStatus()) + tgt.setStatus(convertDeviceRequestStatus(src.getStatus())); + if (src.hasIntent()) + tgt.setIntent(convertCodeableConcept(src.getIntent())); + if (src.hasPriority()) + tgt.setPriority(convertRequestPriority(src.getPriority())); + if (src.hasCode()) + tgt.setCode(convertType(src.getCode())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasContext()) + tgt.setContext(convertReference(src.getContext())); + if (src.hasOccurrence()) + tgt.setOccurrence(convertType(src.getOccurrence())); + if (src.hasAuthoredOn()) + tgt.setAuthoredOn(src.getAuthoredOn()); + if (src.hasRequester()) + tgt.setRequester(convertDeviceRequestRequesterComponent(src.getRequester())); + if (src.hasPerformerType()) + tgt.setPerformerType(convertCodeableConcept(src.getPerformerType())); + if (src.hasPerformer()) + tgt.setPerformer(convertReference(src.getPerformer())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) + tgt.addReasonCode(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) + tgt.addReasonReference(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInfo()) + tgt.addSupportingInfo(convertReference(t)); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getRelevantHistory()) + tgt.addRelevantHistory(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent convertDeviceRequestRequesterComponent(org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent tgt = new org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent(); + copyElement(src, tgt); + if (src.hasAgent()) + tgt.setAgent(convertReference(src.getAgent())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent convertDeviceRequestRequesterComponent(org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent tgt = new org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent(); + copyElement(src, tgt); + if (src.hasAgent()) + tgt.setAgent(convertReference(src.getAgent())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } + + private static org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus convertDeviceRequestStatus(org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus convertDeviceRequestStatus(org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Device.DeviceUdiComponent convertDeviceUdiComponent(org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Device.DeviceUdiComponent tgt = new org.hl7.fhir.r4.model.Device.DeviceUdiComponent(); + copyElement(src, tgt); + if (src.hasDeviceIdentifier()) + tgt.setDeviceIdentifier(src.getDeviceIdentifier()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasJurisdiction()) + tgt.setJurisdiction(src.getJurisdiction()); + if (src.hasCarrierHRF()) + tgt.setCarrierHRF(src.getCarrierHRF()); + if (src.hasCarrierAIDC()) + tgt.setCarrierAIDC(src.getCarrierAIDC()); + if (src.hasIssuer()) + tgt.setIssuer(src.getIssuer()); + if (src.hasEntryType()) + tgt.setEntryType(convertUDIEntryType(src.getEntryType())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent convertDeviceUdiComponent(org.hl7.fhir.r4.model.Device.DeviceUdiComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent tgt = new org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent(); + copyElement(src, tgt); + if (src.hasDeviceIdentifier()) + tgt.setDeviceIdentifier(src.getDeviceIdentifier()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasJurisdiction()) + tgt.setJurisdiction(src.getJurisdiction()); + if (src.hasCarrierHRF()) + tgt.setCarrierHRF(src.getCarrierHRF()); + if (src.hasCarrierAIDC()) + tgt.setCarrierAIDC(src.getCarrierAIDC()); + if (src.hasIssuer()) + tgt.setIssuer(src.getIssuer()); + if (src.hasEntryType()) + tgt.setEntryType(convertUDIEntryType(src.getEntryType())); + return tgt; + } + + public static org.hl7.fhir.r4.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.dstu3.model.DeviceUseStatement src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DeviceUseStatement tgt = new org.hl7.fhir.r4.model.DeviceUseStatement(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertDeviceUseStatementStatus(src.getStatus())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasWhenUsed()) + tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); + if (src.hasTiming()) + tgt.setTiming(convertType(src.getTiming())); + if (src.hasRecordedOn()) + tgt.setRecordedOn(src.getRecordedOn()); + if (src.hasSource()) + tgt.setSource(convertReference(src.getSource())); + if (src.hasDevice()) + tgt.setDevice(convertReference(src.getDevice())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getIndication()) + tgt.addIndication(convertCodeableConcept(t)); + if (src.hasBodySite()) + tgt.setBodySite(convertCodeableConcept(src.getBodySite())); + for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.r4.model.DeviceUseStatement src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DeviceUseStatement tgt = new org.hl7.fhir.dstu3.model.DeviceUseStatement(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertDeviceUseStatementStatus(src.getStatus())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasWhenUsed()) + tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); + if (src.hasTiming()) + tgt.setTiming(convertType(src.getTiming())); + if (src.hasRecordedOn()) + tgt.setRecordedOn(src.getRecordedOn()); + if (src.hasSource()) + tgt.setSource(convertReference(src.getSource())); + if (src.hasDevice()) + tgt.setDevice(convertReference(src.getDevice())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getIndication()) + tgt.addIndication(convertCodeableConcept(t)); + if (src.hasBodySite()) + tgt.setBodySite(convertCodeableConcept(src.getBodySite())); + for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) + tgt.addNote(convertAnnotation(t)); + return tgt; + } + + private static org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus convertDeviceUseStatementStatus(org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.ENTEREDINERROR; + case INTENDED: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.INTENDED; + case STOPPED: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.STOPPED; + case ONHOLD: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.ONHOLD; + default: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus convertDeviceUseStatementStatus(org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.ACTIVE; + case COMPLETED: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.ENTEREDINERROR; + case INTENDED: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.INTENDED; + case STOPPED: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.STOPPED; + case ONHOLD: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.ONHOLD; + default: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Claim.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Claim.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.Claim.DiagnosisComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasDiagnosis()) + tgt.setDiagnosis(convertType(src.getDiagnosis())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + if (src.hasPackageCode()) + tgt.setPackageCode(convertCodeableConcept(src.getPackageCode())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.Claim.DiagnosisComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.Claim.DiagnosisComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasDiagnosis()) + tgt.setDiagnosis(convertType(src.getDiagnosis())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + if (src.hasPackageCode()) + tgt.setPackageCode(convertCodeableConcept(src.getPackageCode())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Encounter.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.Encounter.DiagnosisComponent(); + copyElement(src, tgt); + if (src.hasCondition()) + tgt.setCondition(convertReference(src.getCondition())); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasRank()) + tgt.setRank(src.getRank()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.Encounter.DiagnosisComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent(); + copyElement(src, tgt); + if (src.hasCondition()) + tgt.setCondition(convertReference(src.getCondition())); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasRank()) + tgt.setRank(src.getRank()); + return tgt; + } + + public static org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent(); + copyElement(src, tgt); + if (src.hasCondition()) + tgt.setCondition(convertReference(src.getCondition())); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasRank()) + tgt.setRank(src.getRank()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent(); + copyElement(src, tgt); + if (src.hasCondition()) + tgt.setCondition(convertReference(src.getCondition())); + if (src.hasRole()) + tgt.setRole(convertCodeableConcept(src.getRole())); + if (src.hasRank()) + tgt.setRank(src.getRank()); + return tgt; + } + + public static org.hl7.fhir.r4.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.dstu3.model.DiagnosticReport src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DiagnosticReport tgt = new org.hl7.fhir.r4.model.DiagnosticReport(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) + tgt.addBasedOn(convertReference(t)); + if (src.hasStatus()) + tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasContext()) + tgt.setContext(convertReference(src.getContext())); + if (src.hasEffective()) + tgt.setEffective(convertType(src.getEffective())); + if (src.hasIssued()) + tgt.setIssued(src.getIssued()); +// for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent t : src.getPerformer()) +// tgt.addPerformer(convertDiagnosticReportPerformerComponent(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getSpecimen()) + tgt.addSpecimen(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getResult()) + tgt.addResult(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getImagingStudy()) + tgt.addImagingStudy(convertReference(t)); + for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) + tgt.addImage(convertDiagnosticReportImageComponent(t)); + if (src.hasConclusion()) + tgt.setConclusion(src.getConclusion()); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) + tgt.addCodedDiagnosis(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.Attachment t : src.getPresentedForm()) + tgt.addPresentedForm(convertAttachment(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DiagnosticReport tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) + tgt.addBasedOn(convertReference(t)); + if (src.hasStatus()) + tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasContext()) + tgt.setContext(convertReference(src.getContext())); + if (src.hasEffective()) + tgt.setEffective(convertType(src.getEffective())); + if (src.hasIssued()) + tgt.setIssued(src.getIssued()); +// for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent t : src.getPerformer()) +// tgt.addPerformer(convertDiagnosticReportPerformerComponent(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) + tgt.addSpecimen(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getResult()) + tgt.addResult(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getImagingStudy()) + tgt.addImagingStudy(convertReference(t)); + for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) + tgt.addImage(convertDiagnosticReportImageComponent(t)); + if (src.hasConclusion()) + tgt.setConclusion(src.getConclusion()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCodedDiagnosis()) + tgt.addCodedDiagnosis(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm()) + tgt.addPresentedForm(convertAttachment(t)); + return tgt; + } + +// public static org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent convertDiagnosticReportPerformerComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent(); +// copyElement(src, tgt); +// if (src.hasRole()) +// tgt.setRole(convertCodeableConcept(src.getRole())); +// if (src.hasActor()) +// tgt.setActor(convertReference(src.getActor())); +// return tgt; +// } +// +// public static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent convertDiagnosticReportPerformerComponent(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent(); +// copyElement(src, tgt); +// if (src.hasRole()) +// tgt.setRole(convertCodeableConcept(src.getRole())); +// if (src.hasActor()) +// tgt.setActor(convertReference(src.getActor())); +// return tgt; +// } +// + public static org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent(); + copyElement(src, tgt); + if (src.hasComment()) + tgt.setComment(src.getComment()); + if (src.hasLink()) + tgt.setLink(convertReference(src.getLink())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent(); + copyElement(src, tgt); + if (src.hasComment()) + tgt.setComment(src.getComment()); + if (src.hasLink()) + tgt.setLink(convertReference(src.getLink())); + return tgt; + } + + private static org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; + case PARTIAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; + case PRELIMINARY: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; + case APPENDED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; + case PARTIAL: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; + case PRELIMINARY: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.FINAL; + case AMENDED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; + case APPENDED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; + case CANCELLED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.dstu3.model.Media.DigitalMediaType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PHOTO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.PHOTO; + case VIDEO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.VIDEO; + case AUDIO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.AUDIO; + default: return org.hl7.fhir.r4.model.Media.DigitalMediaType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.r4.model.Media.DigitalMediaType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PHOTO: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.PHOTO; + case VIDEO: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.VIDEO; + case AUDIO: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.AUDIO; + default: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.NULL; + } +} + + private static org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType convertDiscriminatorType(org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case VALUE: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.VALUE; + case EXISTS: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.EXISTS; + case PATTERN: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.PATTERN; + case TYPE: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.TYPE; + case PROFILE: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.PROFILE; + default: return org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType convertDiscriminatorType(org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case VALUE: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.VALUE; + case EXISTS: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.EXISTS; + case PATTERN: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.PATTERN; + case TYPE: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.TYPE; + case PROFILE: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.PROFILE; + default: return org.hl7.fhir.dstu3.model.ElementDefinition.DiscriminatorType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Distance convertDistance(org.hl7.fhir.dstu3.model.Distance src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Distance tgt = new org.hl7.fhir.r4.model.Distance(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Distance convertDistance(org.hl7.fhir.r4.model.Distance src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Distance tgt = new org.hl7.fhir.dstu3.model.Distance(); + copyQuantity(src, tgt); + return tgt; + } + + private static org.hl7.fhir.r4.model.Composition.DocumentConfidentiality convertDocumentConfidentiality(org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case U: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.U; + case L: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.L; + case M: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.M; + case N: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.N; + case R: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.R; + case V: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.V; + default: return org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality convertDocumentConfidentiality(org.hl7.fhir.r4.model.Composition.DocumentConfidentiality src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case U: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.U; + case L: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.L; + case M: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.M; + case N: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.N; + case R: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.R; + case V: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.V; + default: return org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.NULL; + } +} + + public static org.hl7.fhir.r4.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.dstu3.model.DocumentManifest src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentManifest tgt = new org.hl7.fhir.r4.model.DocumentManifest(); + copyDomainResource(src, tgt); + if (src.hasMasterIdentifier()) + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasCreated()) + tgt.setCreated(src.getCreated()); + for (org.hl7.fhir.dstu3.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + if (src.hasSource()) + tgt.setSource(src.getSource()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentManifestRelatedComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentManifest tgt = new org.hl7.fhir.dstu3.model.DocumentManifest(); + copyDomainResource(src, tgt); + if (src.hasMasterIdentifier()) + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasCreated()) + tgt.setCreated(src.getCreated()); + for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) + tgt.addRecipient(convertReference(t)); + if (src.hasSource()) + tgt.setSource(src.getSource()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentManifestRelatedComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasRef()) + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasRef()) + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + private static org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRODUCER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.PRODUCER; + case CONSUMER: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.CONSUMER; + default: return org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.r4.model.CapabilityStatement.DocumentMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PRODUCER: return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.PRODUCER; + case CONSUMER: return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.CONSUMER; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.NULL; + } +} + + public static org.hl7.fhir.r4.model.DocumentReference convertDocumentReference(org.hl7.fhir.dstu3.model.DocumentReference src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentReference tgt = new org.hl7.fhir.r4.model.DocumentReference(); + copyDomainResource(src, tgt); + if (src.hasMasterIdentifier()) + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + if (src.hasDocStatus()) + tgt.setDocStatus(convertReferredDocumentStatus(src.getDocStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasClass_()) + tgt.setClass_(convertCodeableConcept(src.getClass_())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasCreated()) + tgt.setCreated(src.getCreated()); + if (src.hasAuthenticator()) + tgt.setAuthenticator(convertReference(src.getAuthenticator())); + if (src.hasCustodian()) + tgt.setCustodian(convertReference(src.getCustodian())); + for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) + tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSecurityLabel()) + tgt.addSecurityLabel(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) + tgt.addContent(convertDocumentReferenceContentComponent(t)); + if (src.hasContext()) + tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentReference convertDocumentReference(org.hl7.fhir.r4.model.DocumentReference src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentReference tgt = new org.hl7.fhir.dstu3.model.DocumentReference(); + copyDomainResource(src, tgt); + if (src.hasMasterIdentifier()) + tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); + if (src.hasDocStatus()) + tgt.setDocStatus(convertReferredDocumentStatus(src.getDocStatus())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasClass_()) + tgt.setClass_(convertCodeableConcept(src.getClass_())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + if (src.hasCreated()) + tgt.setCreated(src.getCreated()); + if (src.hasAuthenticator()) + tgt.setAuthenticator(convertReference(src.getAuthenticator())); + if (src.hasCustodian()) + tgt.setCustodian(convertReference(src.getCustodian())); + for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) + tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) + tgt.addSecurityLabel(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) + tgt.addContent(convertDocumentReferenceContentComponent(t)); + if (src.hasContext()) + tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); + return tgt; + } + + public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent(); + copyElement(src, tgt); + if (src.hasAttachment()) + tgt.setAttachment(convertAttachment(src.getAttachment())); + if (src.hasFormat()) + tgt.setFormat(convertCoding(src.getFormat())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent(); + copyElement(src, tgt); + if (src.hasAttachment()) + tgt.setAttachment(convertAttachment(src.getAttachment())); + if (src.hasFormat()) + tgt.setFormat(convertCoding(src.getFormat())); + return tgt; + } + + public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent(); + copyElement(src, tgt); + if (src.hasEncounter()) + tgt.setEncounter(convertReference(src.getEncounter())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getEvent()) + tgt.addEvent(convertCodeableConcept(t)); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasFacilityType()) + tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); + if (src.hasPracticeSetting()) + tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); + if (src.hasSourcePatientInfo()) + tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); + for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent(); + copyElement(src, tgt); + if (src.hasEncounter()) + tgt.setEncounter(convertReference(src.getEncounter())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getEvent()) + tgt.addEvent(convertCodeableConcept(t)); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasFacilityType()) + tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); + if (src.hasPracticeSetting()) + tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); + if (src.hasSourcePatientInfo()) + tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); + for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) + tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasRef()) + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasRef()) + tgt.setRef(convertReference(src.getRef())); + return tgt; + } + + public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertDocumentRelationshipType(src.getCode())); + if (src.hasTarget()) + tgt.setTarget(convertReference(src.getTarget())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertDocumentRelationshipType(src.getCode())); + if (src.hasTarget()) + tgt.setTarget(convertReference(src.getTarget())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.CURRENT; + case SUPERSEDED: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.CURRENT; + case SUPERSEDED: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.Composition.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACES: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.REPLACES; + case TRANSFORMS: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.TRANSFORMS; + case SIGNS: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.SIGNS; + case APPENDS: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.APPENDS; + default: return org.hl7.fhir.r4.model.Composition.DocumentRelationshipType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.r4.model.Composition.DocumentRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACES: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.REPLACES; + case TRANSFORMS: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.TRANSFORMS; + case SIGNS: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.SIGNS; + case APPENDS: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.APPENDS; + default: return org.hl7.fhir.dstu3.model.Composition.DocumentRelationshipType.NULL; + } +} + + private static org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACES: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.REPLACES; + case TRANSFORMS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; + case SIGNS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.SIGNS; + case APPENDS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.APPENDS; + default: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACES: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.REPLACES; + case TRANSFORMS: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; + case SIGNS: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.SIGNS; + case APPENDS: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.APPENDS; + default: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Dosage convertDosage(org.hl7.fhir.dstu3.model.Dosage src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasText()) + tgt.setText(src.getText()); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAdditionalInstruction()) + tgt.addAdditionalInstruction(convertCodeableConcept(t)); + if (src.hasPatientInstruction()) + tgt.setPatientInstruction(src.getPatientInstruction()); + if (src.hasTiming()) + tgt.setTiming(convertTiming(src.getTiming())); + if (src.hasAsNeeded()) + tgt.setAsNeeded(convertType(src.getAsNeeded())); + if (src.hasSite()) + tgt.setSite(convertCodeableConcept(src.getSite())); + if (src.hasRoute()) + tgt.setRoute(convertCodeableConcept(src.getRoute())); + if (src.hasMethod()) + tgt.setMethod(convertCodeableConcept(src.getMethod())); + if (src.hasDose()) + tgt.setDose(convertType(src.getDose())); + if (src.hasMaxDosePerPeriod()) + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + if (src.hasMaxDosePerAdministration()) + tgt.setMaxDosePerAdministration(convertSimpleQuantity(src.getMaxDosePerAdministration())); + if (src.hasMaxDosePerLifetime()) + tgt.setMaxDosePerLifetime(convertSimpleQuantity(src.getMaxDosePerLifetime())); + if (src.hasRate()) + tgt.setRate(convertType(src.getRate())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Dosage convertDosage(org.hl7.fhir.r4.model.Dosage src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Dosage tgt = new org.hl7.fhir.dstu3.model.Dosage(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasText()) + tgt.setText(src.getText()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAdditionalInstruction()) + tgt.addAdditionalInstruction(convertCodeableConcept(t)); + if (src.hasPatientInstruction()) + tgt.setPatientInstruction(src.getPatientInstruction()); + if (src.hasTiming()) + tgt.setTiming(convertTiming(src.getTiming())); + if (src.hasAsNeeded()) + tgt.setAsNeeded(convertType(src.getAsNeeded())); + if (src.hasSite()) + tgt.setSite(convertCodeableConcept(src.getSite())); + if (src.hasRoute()) + tgt.setRoute(convertCodeableConcept(src.getRoute())); + if (src.hasMethod()) + tgt.setMethod(convertCodeableConcept(src.getMethod())); + if (src.hasDose()) + tgt.setDose(convertType(src.getDose())); + if (src.hasMaxDosePerPeriod()) + tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod())); + if (src.hasMaxDosePerAdministration()) + tgt.setMaxDosePerAdministration(convertSimpleQuantity(src.getMaxDosePerAdministration())); + if (src.hasMaxDosePerLifetime()) + tgt.setMaxDosePerLifetime(convertSimpleQuantity(src.getMaxDosePerLifetime())); + if (src.hasRate()) + tgt.setRate(convertType(src.getRate())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.dstu3.model.Duration src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Duration tgt = new org.hl7.fhir.dstu3.model.Duration(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition convertElementDefinition(org.hl7.fhir.dstu3.model.ElementDefinition src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition tgt = new org.hl7.fhir.r4.model.ElementDefinition(); + copyElement(src, tgt); + if (src.hasPath()) + tgt.setPath(src.getPath()); + for (org.hl7.fhir.dstu3.model.Enumeration t : src.getRepresentation()) + tgt.addRepresentation(convertPropertyRepresentation(t.getValue())); + if (src.hasSliceName()) + tgt.setSliceName(src.getSliceName()); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) + tgt.addCode(convertCoding(t)); + if (src.hasSlicing()) + tgt.setSlicing(convertElementDefinitionSlicingComponent(src.getSlicing())); + if (src.hasShort()) + tgt.setShort(src.getShort()); + if (src.hasDefinition()) + tgt.setDefinition(src.getDefinition()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + if (src.hasRequirements()) + tgt.setRequirements(src.getRequirements()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) + tgt.addAlias(t.getValue()); + if (src.hasMin()) + tgt.setMin(src.getMin()); + if (src.hasMax()) + tgt.setMax(src.getMax()); + if (src.hasBase()) + tgt.setBase(convertElementDefinitionBaseComponent(src.getBase())); + if (src.hasContentReference()) + tgt.setContentReference(src.getContentReference()); + for (org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent t : src.getType()) + tgt.addType(convertTypeRefComponent(t)); + if (src.hasDefaultValue()) + tgt.setDefaultValue(convertType(src.getDefaultValue())); + if (src.hasMeaningWhenMissing()) + tgt.setMeaningWhenMissing(src.getMeaningWhenMissing()); + if (src.hasOrderMeaning()) + tgt.setOrderMeaning(src.getOrderMeaning()); + if (src.hasFixed()) + tgt.setFixed(convertType(src.getFixed())); + if (src.hasPattern()) + tgt.setPattern(convertType(src.getPattern())); + for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent t : src.getExample()) + tgt.addExample(convertElementDefinitionExampleComponent(t)); + if (src.hasMinValue()) + tgt.setMinValue(convertType(src.getMinValue())); + if (src.hasMaxValue()) + tgt.setMaxValue(convertType(src.getMaxValue())); + if (src.hasMaxLength()) + tgt.setMaxLength(src.getMaxLength()); + for (org.hl7.fhir.dstu3.model.IdType t : src.getCondition()) + tgt.addCondition(t.getValue()); + for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent t : src.getConstraint()) + tgt.addConstraint(convertElementDefinitionConstraintComponent(t)); + if (src.hasMustSupport()) + tgt.setMustSupport(src.getMustSupport()); + if (src.hasIsModifier()) + tgt.setIsModifier(src.getIsModifier()); + if (src.hasIsSummary()) + tgt.setIsSummary(src.getIsSummary()); + if (src.hasBinding()) + tgt.setBinding(convertElementDefinitionBindingComponent(src.getBinding())); + for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent t : src.getMapping()) + tgt.addMapping(convertElementDefinitionMappingComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition convertElementDefinition(org.hl7.fhir.r4.model.ElementDefinition src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition tgt = new org.hl7.fhir.dstu3.model.ElementDefinition(); + copyElement(src, tgt); + if (src.hasPath()) + tgt.setPath(src.getPath()); + for (org.hl7.fhir.r4.model.Enumeration t : src.getRepresentation()) + tgt.addRepresentation(convertPropertyRepresentation(t.getValue())); + if (src.hasSliceName()) + tgt.setSliceName(src.getSliceName()); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + for (org.hl7.fhir.r4.model.Coding t : src.getCode()) + tgt.addCode(convertCoding(t)); + if (src.hasSlicing()) + tgt.setSlicing(convertElementDefinitionSlicingComponent(src.getSlicing())); + if (src.hasShort()) + tgt.setShort(src.getShort()); + if (src.hasDefinition()) + tgt.setDefinition(src.getDefinition()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + if (src.hasRequirements()) + tgt.setRequirements(src.getRequirements()); + for (org.hl7.fhir.r4.model.StringType t : src.getAlias()) + tgt.addAlias(t.getValue()); + if (src.hasMin()) + tgt.setMin(src.getMin()); + if (src.hasMax()) + tgt.setMax(src.getMax()); + if (src.hasBase()) + tgt.setBase(convertElementDefinitionBaseComponent(src.getBase())); + if (src.hasContentReference()) + tgt.setContentReference(src.getContentReference()); + for (org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent t : src.getType()) + tgt.addType(convertTypeRefComponent(t)); + if (src.hasDefaultValue()) + tgt.setDefaultValue(convertType(src.getDefaultValue())); + if (src.hasMeaningWhenMissing()) + tgt.setMeaningWhenMissing(src.getMeaningWhenMissing()); + if (src.hasOrderMeaning()) + tgt.setOrderMeaning(src.getOrderMeaning()); + if (src.hasFixed()) + tgt.setFixed(convertType(src.getFixed())); + if (src.hasPattern()) + tgt.setPattern(convertType(src.getPattern())); + for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent t : src.getExample()) + tgt.addExample(convertElementDefinitionExampleComponent(t)); + if (src.hasMinValue()) + tgt.setMinValue(convertType(src.getMinValue())); + if (src.hasMaxValue()) + tgt.setMaxValue(convertType(src.getMaxValue())); + if (src.hasMaxLength()) + tgt.setMaxLength(src.getMaxLength()); + for (org.hl7.fhir.r4.model.IdType t : src.getCondition()) + tgt.addCondition(t.getValue()); + for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent t : src.getConstraint()) + tgt.addConstraint(convertElementDefinitionConstraintComponent(t)); + if (src.hasMustSupport()) + tgt.setMustSupport(src.getMustSupport()); + if (src.hasIsModifier()) + tgt.setIsModifier(src.getIsModifier()); + if (src.hasIsSummary()) + tgt.setIsSummary(src.getIsSummary()); + if (src.hasBinding()) + tgt.setBinding(convertElementDefinitionBindingComponent(src.getBinding())); + for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent t : src.getMapping()) + tgt.addMapping(convertElementDefinitionMappingComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent(); + copyElement(src, tgt); + if (src.hasPath()) + tgt.setPath(src.getPath()); + if (src.hasMin()) + tgt.setMin(src.getMin()); + if (src.hasMax()) + tgt.setMax(src.getMax()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent convertElementDefinitionBaseComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBaseComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBaseComponent(); + copyElement(src, tgt); + if (src.hasPath()) + tgt.setPath(src.getPath()); + if (src.hasMin()) + tgt.setMin(src.getMin()); + if (src.hasMax()) + tgt.setMax(src.getMax()); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent(); + copyElement(src, tgt); + if (src.hasStrength()) + tgt.setStrength(convertBindingStrength(src.getStrength())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasValueSet()) + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent(); + copyElement(src, tgt); + if (src.hasStrength()) + tgt.setStrength(convertBindingStrength(src.getStrength())); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasValueSet()) + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent(); + copyElement(src, tgt); + if (src.hasKey()) + tgt.setKey(src.getKey()); + if (src.hasRequirements()) + tgt.setRequirements(src.getRequirements()); + if (src.hasSeverity()) + tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); + if (src.hasHuman()) + tgt.setHuman(src.getHuman()); + if (src.hasExpression()) + tgt.setExpression(src.getExpression()); + if (src.hasXpath()) + tgt.setXpath(src.getXpath()); + if (src.hasSource()) + tgt.setSource(src.getSource()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent(); + copyElement(src, tgt); + if (src.hasKey()) + tgt.setKey(src.getKey()); + if (src.hasRequirements()) + tgt.setRequirements(src.getRequirements()); + if (src.hasSeverity()) + tgt.setSeverity(convertConstraintSeverity(src.getSeverity())); + if (src.hasHuman()) + tgt.setHuman(src.getHuman()); + if (src.hasExpression()) + tgt.setExpression(src.getExpression()); + if (src.hasXpath()) + tgt.setXpath(src.getXpath()); + if (src.hasSource()) + tgt.setSource(src.getSource()); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent convertElementDefinitionExampleComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent(); + copyElement(src, tgt); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent convertElementDefinitionExampleComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionExampleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionExampleComponent(); + copyElement(src, tgt); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent(); + copyElement(src, tgt); + if (src.hasIdentity()) + tgt.setIdentity(src.getIdentity()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasMap()) + tgt.setMap(src.getMap()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent(); + copyElement(src, tgt); + if (src.hasIdentity()) + tgt.setIdentity(src.getIdentity()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + if (src.hasMap()) + tgt.setMap(src.getMap()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent t : src.getDiscriminator()) + tgt.addDiscriminator(convertElementDefinitionSlicingDiscriminatorComponent(t)); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasOrdered()) + tgt.setOrdered(src.getOrdered()); + if (src.hasRules()) + tgt.setRules(convertSlicingRules(src.getRules())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent t : src.getDiscriminator()) + tgt.addDiscriminator(convertElementDefinitionSlicingDiscriminatorComponent(t)); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasOrdered()) + tgt.setOrdered(src.getOrdered()); + if (src.hasRules()) + tgt.setRules(convertSlicingRules(src.getRules())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent convertElementDefinitionSlicingDiscriminatorComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertDiscriminatorType(src.getType())); + if (src.hasPath()) + tgt.setPath(src.getPath()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent convertElementDefinitionSlicingDiscriminatorComponent(org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertDiscriminatorType(src.getType())); + if (src.hasPath()) + tgt.setPath(src.getPath()); + return tgt; + } + + public static org.hl7.fhir.r4.model.EligibilityRequest convertEligibilityRequest(org.hl7.fhir.dstu3.model.EligibilityRequest src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EligibilityRequest tgt = new org.hl7.fhir.r4.model.EligibilityRequest(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEligibilityRequestStatus(src.getStatus())); + if (src.hasPriority()) + tgt.setPriority(convertCodeableConcept(src.getPriority())); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasServiced()) + tgt.setServiced(convertType(src.getServiced())); + if (src.hasCreated()) + tgt.setCreated(src.getCreated()); + if (src.hasEnterer()) + tgt.setEnterer(convertReference(src.getEnterer())); + if (src.hasProvider()) + tgt.setProvider(convertReference(src.getProvider())); + if (src.hasOrganization()) + tgt.setOrganization(convertReference(src.getOrganization())); + if (src.hasInsurer()) + tgt.setInsurer(convertReference(src.getInsurer())); + if (src.hasFacility()) + tgt.setFacility(convertReference(src.getFacility())); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasBusinessArrangement()) + tgt.setBusinessArrangement(src.getBusinessArrangement()); + if (src.hasBenefitCategory()) + tgt.setBenefitCategory(convertCodeableConcept(src.getBenefitCategory())); + if (src.hasBenefitSubCategory()) + tgt.setBenefitSubCategory(convertCodeableConcept(src.getBenefitSubCategory())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EligibilityRequest convertEligibilityRequest(org.hl7.fhir.r4.model.EligibilityRequest src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EligibilityRequest tgt = new org.hl7.fhir.dstu3.model.EligibilityRequest(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEligibilityRequestStatus(src.getStatus())); + if (src.hasPriority()) + tgt.setPriority(convertCodeableConcept(src.getPriority())); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasServiced()) + tgt.setServiced(convertType(src.getServiced())); + if (src.hasCreated()) + tgt.setCreated(src.getCreated()); + if (src.hasEnterer()) + tgt.setEnterer(convertReference(src.getEnterer())); + if (src.hasProvider()) + tgt.setProvider(convertReference(src.getProvider())); + if (src.hasOrganization()) + tgt.setOrganization(convertReference(src.getOrganization())); + if (src.hasInsurer()) + tgt.setInsurer(convertReference(src.getInsurer())); + if (src.hasFacility()) + tgt.setFacility(convertReference(src.getFacility())); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasBusinessArrangement()) + tgt.setBusinessArrangement(src.getBusinessArrangement()); + if (src.hasBenefitCategory()) + tgt.setBenefitCategory(convertCodeableConcept(src.getBenefitCategory())); + if (src.hasBenefitSubCategory()) + tgt.setBenefitSubCategory(convertCodeableConcept(src.getBenefitSubCategory())); + return tgt; + } + + private static org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus convertEligibilityRequestStatus(org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.ACTIVE; + case CANCELLED: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.CANCELLED; + case DRAFT: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.DRAFT; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus convertEligibilityRequestStatus(org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.ACTIVE; + case CANCELLED: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.CANCELLED; + case DRAFT: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.DRAFT; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Encounter convertEncounter(org.hl7.fhir.dstu3.model.Encounter src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Encounter tgt = new org.hl7.fhir.r4.model.Encounter(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEncounterStatus(src.getStatus())); + for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) + tgt.addStatusHistory(convertStatusHistoryComponent(t)); + if (src.hasClass_()) + tgt.setClass_(convertCoding(src.getClass_())); + for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) + tgt.addClassHistory(convertClassHistoryComponent(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + if (src.hasPriority()) + tgt.setPriority(convertCodeableConcept(src.getPriority())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getEpisodeOfCare()) + tgt.addEpisodeOfCare(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getIncomingReferral()) + tgt.addIncomingReferral(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent t : src.getParticipant()) + tgt.addParticipant(convertEncounterParticipantComponent(t)); + if (src.hasAppointment()) + tgt.setAppointment(convertReference(src.getAppointment())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasLength()) + tgt.setLength(convertDuration(src.getLength())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) + tgt.addReason(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) + tgt.addDiagnosis(convertDiagnosisComponent(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) + tgt.addAccount(convertReference(t)); + if (src.hasHospitalization()) + tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization())); + for (org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent t : src.getLocation()) + tgt.addLocation(convertEncounterLocationComponent(t)); + if (src.hasServiceProvider()) + tgt.setServiceProvider(convertReference(src.getServiceProvider())); + if (src.hasPartOf()) + tgt.setPartOf(convertReference(src.getPartOf())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Encounter convertEncounter(org.hl7.fhir.r4.model.Encounter src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Encounter tgt = new org.hl7.fhir.dstu3.model.Encounter(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEncounterStatus(src.getStatus())); + for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) + tgt.addStatusHistory(convertStatusHistoryComponent(t)); + if (src.hasClass_()) + tgt.setClass_(convertCoding(src.getClass_())); + for (org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) + tgt.addClassHistory(convertClassHistoryComponent(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + if (src.hasPriority()) + tgt.setPriority(convertCodeableConcept(src.getPriority())); + if (src.hasSubject()) + tgt.setSubject(convertReference(src.getSubject())); + for (org.hl7.fhir.r4.model.Reference t : src.getEpisodeOfCare()) + tgt.addEpisodeOfCare(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getIncomingReferral()) + tgt.addIncomingReferral(convertReference(t)); + for (org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent t : src.getParticipant()) + tgt.addParticipant(convertEncounterParticipantComponent(t)); + if (src.hasAppointment()) + tgt.setAppointment(convertReference(src.getAppointment())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasLength()) + tgt.setLength(convertDuration(src.getLength())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) + tgt.addReason(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) + tgt.addDiagnosis(convertDiagnosisComponent(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) + tgt.addAccount(convertReference(t)); + if (src.hasHospitalization()) + tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization())); + for (org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent t : src.getLocation()) + tgt.addLocation(convertEncounterLocationComponent(t)); + if (src.hasServiceProvider()) + tgt.setServiceProvider(convertReference(src.getServiceProvider())); + if (src.hasPartOf()) + tgt.setPartOf(convertReference(src.getPartOf())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent(); + copyElement(src, tgt); + if (src.hasPreAdmissionIdentifier()) + tgt.setPreAdmissionIdentifier(convertIdentifier(src.getPreAdmissionIdentifier())); + if (src.hasOrigin()) + tgt.setOrigin(convertReference(src.getOrigin())); + if (src.hasAdmitSource()) + tgt.setAdmitSource(convertCodeableConcept(src.getAdmitSource())); + if (src.hasReAdmission()) + tgt.setReAdmission(convertCodeableConcept(src.getReAdmission())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getDietPreference()) + tgt.addDietPreference(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialCourtesy()) + tgt.addSpecialCourtesy(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialArrangement()) + tgt.addSpecialArrangement(convertCodeableConcept(t)); + if (src.hasDestination()) + tgt.setDestination(convertReference(src.getDestination())); + if (src.hasDischargeDisposition()) + tgt.setDischargeDisposition(convertCodeableConcept(src.getDischargeDisposition())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent(); + copyElement(src, tgt); + if (src.hasPreAdmissionIdentifier()) + tgt.setPreAdmissionIdentifier(convertIdentifier(src.getPreAdmissionIdentifier())); + if (src.hasOrigin()) + tgt.setOrigin(convertReference(src.getOrigin())); + if (src.hasAdmitSource()) + tgt.setAdmitSource(convertCodeableConcept(src.getAdmitSource())); + if (src.hasReAdmission()) + tgt.setReAdmission(convertCodeableConcept(src.getReAdmission())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getDietPreference()) + tgt.addDietPreference(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialCourtesy()) + tgt.addSpecialCourtesy(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialArrangement()) + tgt.addSpecialArrangement(convertCodeableConcept(t)); + if (src.hasDestination()) + tgt.setDestination(convertReference(src.getDestination())); + if (src.hasDischargeDisposition()) + tgt.setDischargeDisposition(convertCodeableConcept(src.getDischargeDisposition())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent convertEncounterLocationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent(); + copyElement(src, tgt); + if (src.hasLocation()) + tgt.setLocation(convertReference(src.getLocation())); + if (src.hasStatus()) + tgt.setStatus(convertEncounterLocationStatus(src.getStatus())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent convertEncounterLocationComponent(org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent(); + copyElement(src, tgt); + if (src.hasLocation()) + tgt.setLocation(convertReference(src.getLocation())); + if (src.hasStatus()) + tgt.setStatus(convertEncounterLocationStatus(src.getStatus())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus convertEncounterLocationStatus(org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.PLANNED; + case ACTIVE: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.ACTIVE; + case RESERVED: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.RESERVED; + case COMPLETED: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.COMPLETED; + default: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus convertEncounterLocationStatus(org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.PLANNED; + case ACTIVE: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.ACTIVE; + case RESERVED: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.RESERVED; + case COMPLETED: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.COMPLETED; + default: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasIndividual()) + tgt.setIndividual(convertReference(src.getIndividual())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasIndividual()) + tgt.setIndividual(convertReference(src.getIndividual())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Encounter.EncounterStatus convertEncounterStatus(org.hl7.fhir.dstu3.model.Encounter.EncounterStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.PLANNED; + case ARRIVED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ARRIVED; + case TRIAGED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.TRIAGED; + case INPROGRESS: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.INPROGRESS; + case ONLEAVE: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ONLEAVE; + case FINISHED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED; + case CANCELLED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Encounter.EncounterStatus convertEncounterStatus(org.hl7.fhir.r4.model.Encounter.EncounterStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.PLANNED; + case ARRIVED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ARRIVED; + case TRIAGED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.TRIAGED; + case INPROGRESS: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.INPROGRESS; + case ONLEAVE: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ONLEAVE; + case FINISHED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.FINISHED; + case CANCELLED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Endpoint convertEndpoint(org.hl7.fhir.dstu3.model.Endpoint src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Endpoint tgt = new org.hl7.fhir.r4.model.Endpoint(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEndpointStatus(src.getStatus())); + if (src.hasConnectionType()) + tgt.setConnectionType(convertCoding(src.getConnectionType())); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasManagingOrganization()) + tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); + for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPayloadType()) + tgt.addPayloadType(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) + tgt.addPayloadMimeType(t.getValue()); + if (src.hasAddress()) + tgt.setAddress(src.getAddress()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) + tgt.addHeader(t.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Endpoint convertEndpoint(org.hl7.fhir.r4.model.Endpoint src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Endpoint tgt = new org.hl7.fhir.dstu3.model.Endpoint(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEndpointStatus(src.getStatus())); + if (src.hasConnectionType()) + tgt.setConnectionType(convertCoding(src.getConnectionType())); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasManagingOrganization()) + tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); + for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) + tgt.addContact(convertContactPoint(t)); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPayloadType()) + tgt.addPayloadType(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeType t : src.getPayloadMimeType()) + tgt.addPayloadMimeType(t.getValue()); + if (src.hasAddress()) + tgt.setAddress(src.getAddress()); + for (org.hl7.fhir.r4.model.StringType t : src.getHeader()) + tgt.addHeader(t.getValue()); + return tgt; + } + + private static org.hl7.fhir.r4.model.Endpoint.EndpointStatus convertEndpointStatus(org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.SUSPENDED; + case ERROR: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.ERROR; + case OFF: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.OFF; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.ENTEREDINERROR; + case TEST: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.TEST; + default: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus convertEndpointStatus(org.hl7.fhir.r4.model.Endpoint.EndpointStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.SUSPENDED; + case ERROR: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.ERROR; + case OFF: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.OFF; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.ENTEREDINERROR; + case TEST: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.TEST; + default: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.dstu3.model.EpisodeOfCare src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EpisodeOfCare tgt = new org.hl7.fhir.r4.model.EpisodeOfCare(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); + for (org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent t : src.getStatusHistory()) + tgt.addStatusHistory(convertEpisodeOfCareStatusHistoryComponent(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent t : src.getDiagnosis()) + tgt.addDiagnosis(convertDiagnosisComponent(t)); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasManagingOrganization()) + tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getReferralRequest()) + tgt.addReferralRequest(convertReference(t)); + if (src.hasCareManager()) + tgt.setCareManager(convertReference(src.getCareManager())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getTeam()) + tgt.addTeam(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) + tgt.addAccount(convertReference(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.r4.model.EpisodeOfCare src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EpisodeOfCare tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare(); + copyDomainResource(src, tgt); + for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) + tgt.addIdentifier(convertIdentifier(t)); + if (src.hasStatus()) + tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); + for (org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent t : src.getStatusHistory()) + tgt.addStatusHistory(convertEpisodeOfCareStatusHistoryComponent(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) + tgt.addType(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent t : src.getDiagnosis()) + tgt.addDiagnosis(convertDiagnosisComponent(t)); + if (src.hasPatient()) + tgt.setPatient(convertReference(src.getPatient())); + if (src.hasManagingOrganization()) + tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + for (org.hl7.fhir.r4.model.Reference t : src.getReferralRequest()) + tgt.addReferralRequest(convertReference(t)); + if (src.hasCareManager()) + tgt.setCareManager(convertReference(src.getCareManager())); + for (org.hl7.fhir.r4.model.Reference t : src.getTeam()) + tgt.addTeam(convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) + tgt.addAccount(convertReference(t)); + return tgt; + } + + private static org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus convertEpisodeOfCareStatus(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.PLANNED; + case WAITLIST: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.WAITLIST; + case ACTIVE: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.ACTIVE; + case ONHOLD: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.ONHOLD; + case FINISHED: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.FINISHED; + case CANCELLED: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus convertEpisodeOfCareStatus(org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PLANNED: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.PLANNED; + case WAITLIST: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.WAITLIST; + case ACTIVE: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ACTIVE; + case ONHOLD: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ONHOLD; + case FINISHED: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.FINISHED; + case CANCELLED: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt = new org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); + copyElement(src, tgt); + if (src.hasStatus()) + tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); + copyElement(src, tgt); + if (src.hasStatus()) + tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } // // public static org.hl7.fhir.r4.model.Consent.ConsentActorComponent convertConsentActorComponent(org.hl7.fhir.dstu3.model.Consent.ConsentActorComponent src) throws FHIRException { // if (src == null) @@ -9298,27 +9220,23 @@ public class VersionConvertor_30_40 { // return tgt; // } - public static org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent convertErrorsComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent(); + org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent(); copyElement(src, tgt); - if (src.hasAuthority()) - tgt.setAuthority(src.getAuthority()); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); return tgt; } - public static org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent convertErrorsComponent(org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent(); + org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent(); copyElement(src, tgt); - if (src.hasAuthority()) - tgt.setAuthority(src.getAuthority()); - if (src.hasUri()) - tgt.setUri(src.getUri()); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); return tgt; } // @@ -9346,27 +9264,23 @@ public class VersionConvertor_30_40 { // return tgt; // } - private static org.hl7.fhir.r4.model.Consent.ConsentDataMeaning convertConsentDataMeaning(org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning src) throws FHIRException { + private static org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode convertEventCapabilityMode(org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException { if (src == null) return null; switch (src) { - case INSTANCE: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.INSTANCE; - case RELATED: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.RELATED; - case DEPENDENTS: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.DEPENDENTS; - case AUTHOREDBY: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.AUTHOREDBY; - default: return org.hl7.fhir.r4.model.Consent.ConsentDataMeaning.NULL; + case SENDER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.SENDER; + case RECEIVER: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.RECEIVER; + default: return org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode.NULL; } } - private static org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning convertConsentDataMeaning(org.hl7.fhir.r4.model.Consent.ConsentDataMeaning src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode convertEventCapabilityMode(org.hl7.fhir.r4.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException { if (src == null) return null; switch (src) { - case INSTANCE: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.INSTANCE; - case RELATED: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.RELATED; - case DEPENDENTS: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.DEPENDENTS; - case AUTHOREDBY: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.AUTHOREDBY; - default: return org.hl7.fhir.dstu3.model.Consent.ConsentDataMeaning.NULL; + case SENDER: return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.SENDER; + case RECEIVER: return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.RECEIVER; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.NULL; } } @@ -9494,3238 +9408,60 @@ public class VersionConvertor_30_40 { // return tgt; // } - public static org.hl7.fhir.r4.model.Contract convertContract(org.hl7.fhir.dstu3.model.Contract src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract tgt = new org.hl7.fhir.r4.model.Contract(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertContractStatus(src.getStatus())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); - if (src.hasApplies()) - tgt.setApplies(convertPeriod(src.getApplies())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getSubject()) - tgt.addSubject(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthority()) - tgt.addAuthority(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getDomain()) - tgt.addDomain(convertReference(t)); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubType()) - tgt.addSubType(convertCodeableConcept(t)); - if (src.hasContentDerivative()) - tgt.setContentDerivative(convertCodeableConcept(src.getContentDerivative())); - for (org.hl7.fhir.dstu3.model.Contract.SignatoryComponent t : src.getSigner()) - tgt.addSigner(convertSignatoryComponent(t)); - for (org.hl7.fhir.dstu3.model.Contract.TermComponent t : src.getTerm()) - tgt.addTerm(convertTermComponent(t)); - for (org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) - tgt.addFriendly(convertFriendlyLanguageComponent(t)); - for (org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent t : src.getLegal()) - tgt.addLegal(convertLegalLanguageComponent(t)); - for (org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent t : src.getRule()) - tgt.setRule(convertComputableLanguageComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract convertContract(org.hl7.fhir.r4.model.Contract src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract tgt = new org.hl7.fhir.dstu3.model.Contract(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertContractStatus(src.getStatus())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); - if (src.hasApplies()) - tgt.setApplies(convertPeriod(src.getApplies())); - for (org.hl7.fhir.r4.model.Reference t : src.getSubject()) - tgt.addSubject(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthority()) - tgt.addAuthority(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getDomain()) - tgt.addDomain(convertReference(t)); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubType()) - tgt.addSubType(convertCodeableConcept(t)); - if (src.hasContentDerivative()) - tgt.setContentDerivative(convertCodeableConcept(src.getContentDerivative())); - for (org.hl7.fhir.r4.model.Contract.SignatoryComponent t : src.getSigner()) - tgt.addSigner(convertSignatoryComponent(t)); - for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getTerm()) - tgt.addTerm(convertTermComponent(t)); - for (org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) - tgt.addFriendly(convertFriendlyLanguageComponent(t)); - for (org.hl7.fhir.r4.model.Contract.LegalLanguageComponent t : src.getLegal()) - tgt.addLegal(convertLegalLanguageComponent(t)); - if (src.hasRule()) - tgt.addRule(convertComputableLanguageComponent(src.getRule())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Contract.ContractStatus convertContractStatus(org.hl7.fhir.dstu3.model.Contract.ContractStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.dstu3.model.Timing.EventTiming src) throws FHIRException { if (src == null) return null; switch (src) { - case AMENDED: return org.hl7.fhir.r4.model.Contract.ContractStatus.AMENDED; - case APPENDED: return org.hl7.fhir.r4.model.Contract.ContractStatus.APPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.Contract.ContractStatus.CANCELLED; - case DISPUTED: return org.hl7.fhir.r4.model.Contract.ContractStatus.DISPUTED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Contract.ContractStatus.ENTEREDINERROR; - case EXECUTABLE: return org.hl7.fhir.r4.model.Contract.ContractStatus.EXECUTABLE; - case EXECUTED: return org.hl7.fhir.r4.model.Contract.ContractStatus.EXECUTED; - case NEGOTIABLE: return org.hl7.fhir.r4.model.Contract.ContractStatus.NEGOTIABLE; - case OFFERED: return org.hl7.fhir.r4.model.Contract.ContractStatus.OFFERED; - case POLICY: return org.hl7.fhir.r4.model.Contract.ContractStatus.POLICY; - case REJECTED: return org.hl7.fhir.r4.model.Contract.ContractStatus.REJECTED; - case RENEWED: return org.hl7.fhir.r4.model.Contract.ContractStatus.RENEWED; - case REVOKED: return org.hl7.fhir.r4.model.Contract.ContractStatus.REVOKED; - case RESOLVED: return org.hl7.fhir.r4.model.Contract.ContractStatus.RESOLVED; - case TERMINATED: return org.hl7.fhir.r4.model.Contract.ContractStatus.TERMINATED; - default: return org.hl7.fhir.r4.model.Contract.ContractStatus.NULL; + case MORN: return org.hl7.fhir.r4.model.Timing.EventTiming.MORN; + case AFT: return org.hl7.fhir.r4.model.Timing.EventTiming.AFT; + case EVE: return org.hl7.fhir.r4.model.Timing.EventTiming.EVE; + case NIGHT: return org.hl7.fhir.r4.model.Timing.EventTiming.NIGHT; + case PHS: return org.hl7.fhir.r4.model.Timing.EventTiming.PHS; + case HS: return org.hl7.fhir.r4.model.Timing.EventTiming.HS; + case WAKE: return org.hl7.fhir.r4.model.Timing.EventTiming.WAKE; + case C: return org.hl7.fhir.r4.model.Timing.EventTiming.C; + case CM: return org.hl7.fhir.r4.model.Timing.EventTiming.CM; + case CD: return org.hl7.fhir.r4.model.Timing.EventTiming.CD; + case CV: return org.hl7.fhir.r4.model.Timing.EventTiming.CV; + case AC: return org.hl7.fhir.r4.model.Timing.EventTiming.AC; + case ACM: return org.hl7.fhir.r4.model.Timing.EventTiming.ACM; + case ACD: return org.hl7.fhir.r4.model.Timing.EventTiming.ACD; + case ACV: return org.hl7.fhir.r4.model.Timing.EventTiming.ACV; + case PC: return org.hl7.fhir.r4.model.Timing.EventTiming.PC; + case PCM: return org.hl7.fhir.r4.model.Timing.EventTiming.PCM; + case PCD: return org.hl7.fhir.r4.model.Timing.EventTiming.PCD; + case PCV: return org.hl7.fhir.r4.model.Timing.EventTiming.PCV; + default: return org.hl7.fhir.r4.model.Timing.EventTiming.NULL; } } - private static org.hl7.fhir.dstu3.model.Contract.ContractStatus convertContractStatus(org.hl7.fhir.r4.model.Contract.ContractStatus src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Timing.EventTiming convertEventTiming(org.hl7.fhir.r4.model.Timing.EventTiming src) throws FHIRException { if (src == null) return null; switch (src) { - case AMENDED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.AMENDED; - case APPENDED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.APPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.CANCELLED; - case DISPUTED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.DISPUTED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.ENTEREDINERROR; - case EXECUTABLE: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.EXECUTABLE; - case EXECUTED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.EXECUTED; - case NEGOTIABLE: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.NEGOTIABLE; - case OFFERED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.OFFERED; - case POLICY: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.POLICY; - case REJECTED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.REJECTED; - case RENEWED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.RENEWED; - case REVOKED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.REVOKED; - case RESOLVED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.RESOLVED; - case TERMINATED: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.TERMINATED; - default: return org.hl7.fhir.dstu3.model.Contract.ContractStatus.NULL; + case MORN: return org.hl7.fhir.dstu3.model.Timing.EventTiming.MORN; + case AFT: return org.hl7.fhir.dstu3.model.Timing.EventTiming.AFT; + case EVE: return org.hl7.fhir.dstu3.model.Timing.EventTiming.EVE; + case NIGHT: return org.hl7.fhir.dstu3.model.Timing.EventTiming.NIGHT; + case PHS: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PHS; + case HS: return org.hl7.fhir.dstu3.model.Timing.EventTiming.HS; + case WAKE: return org.hl7.fhir.dstu3.model.Timing.EventTiming.WAKE; + case C: return org.hl7.fhir.dstu3.model.Timing.EventTiming.C; + case CM: return org.hl7.fhir.dstu3.model.Timing.EventTiming.CM; + case CD: return org.hl7.fhir.dstu3.model.Timing.EventTiming.CD; + case CV: return org.hl7.fhir.dstu3.model.Timing.EventTiming.CV; + case AC: return org.hl7.fhir.dstu3.model.Timing.EventTiming.AC; + case ACM: return org.hl7.fhir.dstu3.model.Timing.EventTiming.ACM; + case ACD: return org.hl7.fhir.dstu3.model.Timing.EventTiming.ACD; + case ACV: return org.hl7.fhir.dstu3.model.Timing.EventTiming.ACV; + case PC: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PC; + case PCM: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PCM; + case PCD: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PCD; + case PCV: return org.hl7.fhir.dstu3.model.Timing.EventTiming.PCV; + default: return org.hl7.fhir.dstu3.model.Timing.EventTiming.NULL; } } - public static org.hl7.fhir.r4.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.dstu3.model.Contract.AgentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.AgentComponent tgt = new org.hl7.fhir.dstu3.model.Contract.AgentComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.dstu3.model.Contract.SignatoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.r4.model.Contract.SignatoryComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - for (org.hl7.fhir.dstu3.model.Signature t : src.getSignature()) - tgt.addSignature(convertSignature(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.r4.model.Contract.SignatoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.dstu3.model.Contract.SignatoryComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - for (org.hl7.fhir.r4.model.Signature t : src.getSignature()) - tgt.addSignature(convertSignature(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); - copyElement(src, tgt); - if (src.hasEntity()) - tgt.setEntity(convertType(src.getEntity())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasEffectiveTime()) - tgt.setEffectiveTime(src.getEffectiveTime()); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasPoints()) - tgt.setPoints(src.getPoints()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent(); - copyElement(src, tgt); - if (src.hasEntity()) - tgt.setEntity(convertType(src.getEntity())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasEffectiveTime()) - tgt.setEffectiveTime(src.getEffectiveTime()); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasPoints()) - tgt.setPoints(src.getPoints()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.dstu3.model.Contract.TermComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.TermComponent tgt = new org.hl7.fhir.r4.model.Contract.TermComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); - if (src.hasApplies()) - tgt.setApplies(convertPeriod(src.getApplies())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSubType()) - tgt.setSubType(convertCodeableConcept(src.getSubType())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAction()) - tgt.addAction(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getActionReason()) - tgt.addActionReason(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Contract.TermAgentComponent t : src.getAgent()) - tgt.addAgent(convertTermAgentComponent(t)); - for (org.hl7.fhir.dstu3.model.Contract.TermComponent t : src.getGroup()) - tgt.addGroup(convertTermComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.r4.model.Contract.TermComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.TermComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); - if (src.hasApplies()) - tgt.setApplies(convertPeriod(src.getApplies())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSubType()) - tgt.setSubType(convertCodeableConcept(src.getSubType())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAction()) - tgt.addAction(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getActionReason()) - tgt.addActionReason(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Contract.AgentComponent t : src.getAgent()) - tgt.addAgent(convertTermAgentComponent(t)); - for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getGroup()) - tgt.addGroup(convertTermComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.AgentComponent convertTermAgentComponent(org.hl7.fhir.dstu3.model.Contract.TermAgentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.TermAgentComponent convertTermAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.TermAgentComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermAgentComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) - tgt.addRole(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); - copyElement(src, tgt); - if (src.hasEntity()) - tgt.setEntity(convertType(src.getEntity())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasEffectiveTime()) - tgt.setEffectiveTime(src.getEffectiveTime()); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasPoints()) - tgt.setPoints(src.getPoints()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent(); - copyElement(src, tgt); - if (src.hasEntity()) - tgt.setEntity(convertType(src.getEntity())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasEffectiveTime()) - tgt.setEffectiveTime(src.getEffectiveTime()); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasPoints()) - tgt.setPoints(src.getPoints()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent(); - copyElement(src, tgt); - if (src.hasContent()) - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent(); - copyElement(src, tgt); - if (src.hasContent()) - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.LegalLanguageComponent(); - copyElement(src, tgt); - if (src.hasContent()) - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.r4.model.Contract.LegalLanguageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent(); - copyElement(src, tgt); - if (src.hasContent()) - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent(); - copyElement(src, tgt); - if (src.hasContent()) - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.r4.model.Contract.ComputableLanguageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent(); - copyElement(src, tgt); - if (src.hasContent()) - tgt.setContent(convertType(src.getContent())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Coverage convertCoverage(org.hl7.fhir.dstu3.model.Coverage src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Coverage tgt = new org.hl7.fhir.r4.model.Coverage(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertCoverageStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasPolicyHolder()) - tgt.setPolicyHolder(convertReference(src.getPolicyHolder())); - if (src.hasSubscriber()) - tgt.setSubscriber(convertReference(src.getSubscriber())); - if (src.hasSubscriberId()) - tgt.setSubscriberId(src.getSubscriberId()); - if (src.hasBeneficiary()) - tgt.setBeneficiary(convertReference(src.getBeneficiary())); - if (src.hasRelationship()) - tgt.setRelationship(convertCodeableConcept(src.getRelationship())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getPayor()) - tgt.addPayor(convertReference(t)); - if (src.hasGrouping()) - tgt.setGrouping(convertGroupComponent(src.getGrouping())); - if (src.hasDependent()) - tgt.setDependent(src.getDependent()); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasOrder()) - tgt.setOrder(src.getOrder()); - if (src.hasNetwork()) - tgt.setNetwork(src.getNetwork()); - for (org.hl7.fhir.dstu3.model.Reference t : src.getContract()) - tgt.addContract(convertReference(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Coverage convertCoverage(org.hl7.fhir.r4.model.Coverage src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Coverage tgt = new org.hl7.fhir.dstu3.model.Coverage(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertCoverageStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasPolicyHolder()) - tgt.setPolicyHolder(convertReference(src.getPolicyHolder())); - if (src.hasSubscriber()) - tgt.setSubscriber(convertReference(src.getSubscriber())); - if (src.hasSubscriberId()) - tgt.setSubscriberId(src.getSubscriberId()); - if (src.hasBeneficiary()) - tgt.setBeneficiary(convertReference(src.getBeneficiary())); - if (src.hasRelationship()) - tgt.setRelationship(convertCodeableConcept(src.getRelationship())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r4.model.Reference t : src.getPayor()) - tgt.addPayor(convertReference(t)); - if (src.hasGrouping()) - tgt.setGrouping(convertGroupComponent(src.getGrouping())); - if (src.hasDependent()) - tgt.setDependent(src.getDependent()); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasOrder()) - tgt.setOrder(src.getOrder()); - if (src.hasNetwork()) - tgt.setNetwork(src.getNetwork()); - for (org.hl7.fhir.r4.model.Reference t : src.getContract()) - tgt.addContract(convertReference(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.Coverage.CoverageStatus convertCoverageStatus(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Coverage.CoverageStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Coverage.CoverageStatus convertCoverageStatus(org.hl7.fhir.r4.model.Coverage.CoverageStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.Coverage.GroupComponent convertGroupComponent(org.hl7.fhir.dstu3.model.Coverage.GroupComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Coverage.GroupComponent tgt = new org.hl7.fhir.r4.model.Coverage.GroupComponent(); - copyElement(src, tgt); - if (src.hasGroup()) - tgt.setGroup(src.getGroup()); - if (src.hasGroupDisplay()) - tgt.setGroupDisplay(src.getGroupDisplay()); - if (src.hasSubGroup()) - tgt.setSubGroup(src.getSubGroup()); - if (src.hasSubGroupDisplay()) - tgt.setSubGroupDisplay(src.getSubGroupDisplay()); - if (src.hasPlan()) - tgt.setPlan(src.getPlan()); - if (src.hasPlanDisplay()) - tgt.setPlanDisplay(src.getPlanDisplay()); - if (src.hasSubPlan()) - tgt.setSubPlan(src.getSubPlan()); - if (src.hasSubPlanDisplay()) - tgt.setSubPlanDisplay(src.getSubPlanDisplay()); - if (src.hasClass_()) - tgt.setClass_(src.getClass_()); - if (src.hasClassDisplay()) - tgt.setClassDisplay(src.getClassDisplay()); - if (src.hasSubClass()) - tgt.setSubClass(src.getSubClass()); - if (src.hasSubClassDisplay()) - tgt.setSubClassDisplay(src.getSubClassDisplay()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Coverage.GroupComponent convertGroupComponent(org.hl7.fhir.r4.model.Coverage.GroupComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Coverage.GroupComponent tgt = new org.hl7.fhir.dstu3.model.Coverage.GroupComponent(); - copyElement(src, tgt); - if (src.hasGroup()) - tgt.setGroup(src.getGroup()); - if (src.hasGroupDisplay()) - tgt.setGroupDisplay(src.getGroupDisplay()); - if (src.hasSubGroup()) - tgt.setSubGroup(src.getSubGroup()); - if (src.hasSubGroupDisplay()) - tgt.setSubGroupDisplay(src.getSubGroupDisplay()); - if (src.hasPlan()) - tgt.setPlan(src.getPlan()); - if (src.hasPlanDisplay()) - tgt.setPlanDisplay(src.getPlanDisplay()); - if (src.hasSubPlan()) - tgt.setSubPlan(src.getSubPlan()); - if (src.hasSubPlanDisplay()) - tgt.setSubPlanDisplay(src.getSubPlanDisplay()); - if (src.hasClass_()) - tgt.setClass_(src.getClass_()); - if (src.hasClassDisplay()) - tgt.setClassDisplay(src.getClassDisplay()); - if (src.hasSubClass()) - tgt.setSubClass(src.getSubClass()); - if (src.hasSubClassDisplay()) - tgt.setSubClassDisplay(src.getSubClassDisplay()); - return tgt; - } - - public static org.hl7.fhir.r4.model.StructureDefinition convertDataElement(org.hl7.fhir.dstu3.model.DataElement src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl().replace("/DataElement/", "/StructureDefinition/de-")); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); -// if (src.hasStringency()) -// tgt.setStringency(convertDataElementStringency(src.getStringency())); - for (org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping()) - tgt.addMapping(convertDataElementMappingComponent(t)); - for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) - tgt.getSnapshot().addElement(convertElementDefinition(t)); - tgt.setKind(StructureDefinitionKind.LOGICAL); - tgt.setAbstract(false); - tgt.setType(tgt.getName()); - tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/Element"); - tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); - return tgt; - } - -// public static org.hl7.fhir.dstu3.model.DataElement convertDataElement(org.hl7.fhir.r4.model.DataElement src) throws FHIRException { -// if (src == null) -// return null; -// org.hl7.fhir.dstu3.model.DataElement tgt = new org.hl7.fhir.dstu3.model.DataElement(); -// copyDomainResource(src, tgt); -// if (src.hasUrl()) -// tgt.setUrl(src.getUrl()); -// for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) -// tgt.addIdentifier(convertIdentifier(t)); -// if (src.hasVersion()) -// tgt.setVersion(src.getVersion()); -// if (src.hasStatus()) -// tgt.setStatus(convertPublicationStatus(src.getStatus())); -// if (src.hasExperimental()) -// tgt.setExperimental(src.getExperimental()); -// if (src.hasDate()) -// tgt.setDate(src.getDate()); -// if (src.hasPublisher()) -// tgt.setPublisher(src.getPublisher()); -// if (src.hasName()) -// tgt.setName(src.getName()); -// if (src.hasTitle()) -// tgt.setTitle(src.getTitle()); -// for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) -// tgt.addContact(convertContactDetail(t)); -// for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) -// tgt.addUseContext(convertUsageContext(t)); -// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) -// tgt.addJurisdiction(convertCodeableConcept(t)); -// if (src.hasCopyright()) -// tgt.setCopyright(src.getCopyright()); -// if (src.hasStringency()) -// tgt.setStringency(convertDataElementStringency(src.getStringency())); -// for (org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent t : src.getMapping()) -// tgt.addMapping(convertDataElementMappingComponent(t)); -// for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) -// tgt.addElement(convertElementDefinition(t)); -// return tgt; -// } - -// private static org.hl7.fhir.r4.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.dstu3.model.DataElement.DataElementStringency src) throws FHIRException { -// if (src == null) -// return null; -// switch (src) { -// case COMPARABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.COMPARABLE; -// case FULLYSPECIFIED: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FULLYSPECIFIED; -// case EQUIVALENT: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.EQUIVALENT; -// case CONVERTABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.CONVERTABLE; -// case SCALEABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.SCALEABLE; -// case FLEXIBLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FLEXIBLE; -// default: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.NULL; -// } -//} -// -// private static org.hl7.fhir.dstu3.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.r4.model.DataElement.DataElementStringency src) throws FHIRException { -// if (src == null) -// return null; -// switch (src) { -// case COMPARABLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.COMPARABLE; -// case FULLYSPECIFIED: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.FULLYSPECIFIED; -// case EQUIVALENT: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.EQUIVALENT; -// case CONVERTABLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.CONVERTABLE; -// case SCALEABLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.SCALEABLE; -// case FLEXIBLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.FLEXIBLE; -// default: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.NULL; -// } -//} - - public static org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertDataElementMappingComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); - copyElement(src, tgt); - if (src.hasIdentity()) - tgt.setIdentity(src.getIdentity()); - if (src.hasUri()) - tgt.setUri(src.getUri()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - return tgt; - } - -// public static org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent src) throws FHIRException { -// if (src == null) -// return null; -// org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent(); -// copyElement(src, tgt); -// if (src.hasIdentity()) -// tgt.setIdentity(src.getIdentity()); -// if (src.hasUri()) -// tgt.setUri(src.getUri()); -// if (src.hasName()) -// tgt.setName(src.getName()); -// if (src.hasComment()) -// tgt.setComment(src.getComment()); -// return tgt; -// } - - public static org.hl7.fhir.r4.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.dstu3.model.DetectedIssue src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DetectedIssue tgt = new org.hl7.fhir.r4.model.DetectedIssue(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertDetectedIssueStatus(src.getStatus())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasSeverity()) - tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAuthor()) - tgt.setAuthor(convertReference(src.getAuthor())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) - tgt.addImplicated(convertReference(t)); - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - if (src.hasReference()) - tgt.setReference(src.getReference()); - for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) - tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.r4.model.DetectedIssue src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DetectedIssue tgt = new org.hl7.fhir.dstu3.model.DetectedIssue(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertDetectedIssueStatus(src.getStatus())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasSeverity()) - tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity())); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAuthor()) - tgt.setAuthor(convertReference(src.getAuthor())); - for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) - tgt.addImplicated(convertReference(t)); - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - if (src.hasReference()) - tgt.setReference(src.getReference()); - for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) - tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus convertDetectedIssueStatus(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.CORRECTED; - case CANCELLED: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus convertDetectedIssueStatus(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.FINAL; - case AMENDED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.CORRECTED; - case CANCELLED: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HIGH: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.HIGH; - case MODERATE: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.MODERATE; - case LOW: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.LOW; - default: return org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case HIGH: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.HIGH; - case MODERATE: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.MODERATE; - case LOW: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.LOW; - default: return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.NULL; - } -} - - public static org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent(); - copyElement(src, tgt); - if (src.hasAction()) - tgt.setAction(convertCodeableConcept(src.getAction())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAuthor()) - tgt.setAuthor(convertReference(src.getAuthor())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent(); - copyElement(src, tgt); - if (src.hasAction()) - tgt.setAction(convertCodeableConcept(src.getAction())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAuthor()) - tgt.setAuthor(convertReference(src.getAuthor())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Device convertDevice(org.hl7.fhir.dstu3.model.Device src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Device tgt = new org.hl7.fhir.r4.model.Device(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasUdi()) - tgt.setUdi(convertDeviceUdiComponent(src.getUdi())); - if (src.hasStatus()) - tgt.setStatus(convertFHIRDeviceStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasManufacturer()) - tgt.setManufacturer(src.getManufacturer()); - if (src.hasManufactureDate()) - tgt.setManufactureDate(src.getManufactureDate()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); - if (src.hasModel()) - tgt.setModel(src.getModel()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasOwner()) - tgt.setOwner(convertReference(src.getOwner())); - for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - if (src.hasLocation()) - tgt.setLocation(convertReference(src.getLocation())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSafety()) - tgt.addSafety(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Device convertDevice(org.hl7.fhir.r4.model.Device src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Device tgt = new org.hl7.fhir.dstu3.model.Device(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasUdi()) - tgt.setUdi(convertDeviceUdiComponent(src.getUdi())); - if (src.hasStatus()) - tgt.setStatus(convertFHIRDeviceStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasManufacturer()) - tgt.setManufacturer(src.getManufacturer()); - if (src.hasManufactureDate()) - tgt.setManufactureDate(src.getManufactureDate()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); - if (src.hasModel()) - tgt.setModel(src.getModel()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasOwner()) - tgt.setOwner(convertReference(src.getOwner())); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - if (src.hasLocation()) - tgt.setLocation(convertReference(src.getLocation())); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSafety()) - tgt.addSafety(convertCodeableConcept(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.Device.FHIRDeviceStatus convertFHIRDeviceStatus(org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus convertFHIRDeviceStatus(org.hl7.fhir.r4.model.Device.FHIRDeviceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.Device.DeviceUdiComponent convertDeviceUdiComponent(org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Device.DeviceUdiComponent tgt = new org.hl7.fhir.r4.model.Device.DeviceUdiComponent(); - copyElement(src, tgt); - if (src.hasDeviceIdentifier()) - tgt.setDeviceIdentifier(src.getDeviceIdentifier()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasJurisdiction()) - tgt.setJurisdiction(src.getJurisdiction()); - if (src.hasCarrierHRF()) - tgt.setCarrierHRF(src.getCarrierHRF()); - if (src.hasCarrierAIDC()) - tgt.setCarrierAIDC(src.getCarrierAIDC()); - if (src.hasIssuer()) - tgt.setIssuer(src.getIssuer()); - if (src.hasEntryType()) - tgt.setEntryType(convertUDIEntryType(src.getEntryType())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent convertDeviceUdiComponent(org.hl7.fhir.r4.model.Device.DeviceUdiComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent tgt = new org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent(); - copyElement(src, tgt); - if (src.hasDeviceIdentifier()) - tgt.setDeviceIdentifier(src.getDeviceIdentifier()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasJurisdiction()) - tgt.setJurisdiction(src.getJurisdiction()); - if (src.hasCarrierHRF()) - tgt.setCarrierHRF(src.getCarrierHRF()); - if (src.hasCarrierAIDC()) - tgt.setCarrierAIDC(src.getCarrierAIDC()); - if (src.hasIssuer()) - tgt.setIssuer(src.getIssuer()); - if (src.hasEntryType()) - tgt.setEntryType(convertUDIEntryType(src.getEntryType())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Device.UDIEntryType convertUDIEntryType(org.hl7.fhir.dstu3.model.Device.UDIEntryType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BARCODE: return org.hl7.fhir.r4.model.Device.UDIEntryType.BARCODE; - case RFID: return org.hl7.fhir.r4.model.Device.UDIEntryType.RFID; - case MANUAL: return org.hl7.fhir.r4.model.Device.UDIEntryType.MANUAL; - case CARD: return org.hl7.fhir.r4.model.Device.UDIEntryType.CARD; - case SELFREPORTED: return org.hl7.fhir.r4.model.Device.UDIEntryType.SELFREPORTED; - case UNKNOWN: return org.hl7.fhir.r4.model.Device.UDIEntryType.UNKNOWN; - default: return org.hl7.fhir.r4.model.Device.UDIEntryType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Device.UDIEntryType convertUDIEntryType(org.hl7.fhir.r4.model.Device.UDIEntryType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BARCODE: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.BARCODE; - case RFID: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.RFID; - case MANUAL: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.MANUAL; - case CARD: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.CARD; - case SELFREPORTED: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.SELFREPORTED; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.NULL; - } -} - - public static org.hl7.fhir.r4.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.dstu3.model.DeviceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLastSystemChange()) - tgt.setLastSystemChange(src.getLastSystemChange()); - if (src.hasSource()) - tgt.setSource(convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(convertReference(src.getParent())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getOperationalStatus()) - tgt.addOperationalStatus(convertCodeableConcept(t)); - if (src.hasParameterGroup()) - tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); - if (src.hasMeasurementPrinciple()) - tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); - for (org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) - tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); - if (src.hasLanguageCode()) - tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.r4.model.DeviceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceComponent tgt = new org.hl7.fhir.dstu3.model.DeviceComponent(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLastSystemChange()) - tgt.setLastSystemChange(src.getLastSystemChange()); - if (src.hasSource()) - tgt.setSource(convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(convertReference(src.getParent())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOperationalStatus()) - tgt.addOperationalStatus(convertCodeableConcept(t)); - if (src.hasParameterGroup()) - tgt.setParameterGroup(convertCodeableConcept(src.getParameterGroup())); - if (src.hasMeasurementPrinciple()) - tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple())); - for (org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) - tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t)); - if (src.hasLanguageCode()) - tgt.setLanguageCode(convertCodeableConcept(src.getLanguageCode())); - return tgt; - } - - private static org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OTHER: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OTHER; - case CHEMICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; - case ELECTRICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; - case IMPEDANCE: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; - case NUCLEAR: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; - case OPTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OPTICAL; - case THERMAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.THERMAL; - case BIOLOGICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; - case MECHANICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; - case ACOUSTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; - case MANUAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MANUAL; - default: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OTHER: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.OTHER; - case CHEMICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; - case ELECTRICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; - case IMPEDANCE: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; - case NUCLEAR: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; - case OPTICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.OPTICAL; - case THERMAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.THERMAL; - case BIOLOGICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; - case MECHANICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; - case ACOUSTICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; - case MANUAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.MANUAL; - default: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.NULL; - } -} - - public static org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); - copyElement(src, tgt); - if (src.hasSpecType()) - tgt.setSpecType(convertCodeableConcept(src.getSpecType())); - if (src.hasComponentId()) - tgt.setComponentId(convertIdentifier(src.getComponentId())); - if (src.hasProductionSpec()) - tgt.setProductionSpec(src.getProductionSpec()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.r4.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent(); - copyElement(src, tgt); - if (src.hasSpecType()) - tgt.setSpecType(convertCodeableConcept(src.getSpecType())); - if (src.hasComponentId()) - tgt.setComponentId(convertIdentifier(src.getComponentId())); - if (src.hasProductionSpec()) - tgt.setProductionSpec(src.getProductionSpec()); - return tgt; - } - - public static org.hl7.fhir.r4.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.dstu3.model.DeviceMetric src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceMetric tgt = new org.hl7.fhir.r4.model.DeviceMetric(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasUnit()) - tgt.setUnit(convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(convertReference(src.getParent())); - if (src.hasOperationalStatus()) - tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); - if (src.hasColor()) - tgt.setColor(convertDeviceMetricColor(src.getColor())); - if (src.hasCategory()) - tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); - for (org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) - tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.r4.model.DeviceMetric src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceMetric tgt = new org.hl7.fhir.dstu3.model.DeviceMetric(); - copyDomainResource(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasUnit()) - tgt.setUnit(convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(convertReference(src.getParent())); - if (src.hasOperationalStatus()) - tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus())); - if (src.hasColor()) - tgt.setColor(convertDeviceMetricColor(src.getColor())); - if (src.hasCategory()) - tgt.setCategory(convertDeviceMetricCategory(src.getCategory())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod())); - for (org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) - tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ON: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.ON; - case OFF: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; - case STANDBY: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ON: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.ON; - case OFF: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.OFF; - case STANDBY: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BLACK: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLACK; - case RED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.RED; - case GREEN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.GREEN; - case YELLOW: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.YELLOW; - case BLUE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.BLUE; - case MAGENTA: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.MAGENTA; - case CYAN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.CYAN; - case WHITE: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.WHITE; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricColor src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BLACK: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.BLACK; - case RED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.RED; - case GREEN: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.GREEN; - case YELLOW: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.YELLOW; - case BLUE: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.BLUE; - case MAGENTA: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.MAGENTA; - case CYAN: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.CYAN; - case WHITE: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.WHITE; - default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.NULL; - } -} - - private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MEASUREMENT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; - case SETTING: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.SETTING; - case CALCULATION: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.CALCULATION; - case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MEASUREMENT: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT; - case SETTING: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.SETTING; - case CALCULATION: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.CALCULATION; - case UNSPECIFIED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED; - default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.NULL; - } -} - - public static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertDeviceMetricCalibrationType(src.getType())); - if (src.hasState()) - tgt.setState(convertDeviceMetricCalibrationState(src.getState())); - if (src.hasTime()) - tgt.setTime(src.getTime()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertDeviceMetricCalibrationType(src.getType())); - if (src.hasState()) - tgt.setState(convertDeviceMetricCalibrationState(src.getState())); - if (src.hasTime()) - tgt.setTime(src.getTime()); - return tgt; - } - - private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; - case OFFSET: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; - case GAIN: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; - case TWOPOINT: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case UNSPECIFIED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED; - case OFFSET: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET; - case GAIN: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.GAIN; - case TWOPOINT: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT; - default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.NULL; - } -} - - private static org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTCALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; - case CALIBRATIONREQUIRED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; - case CALIBRATED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; - case UNSPECIFIED: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; - default: return org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NOTCALIBRATED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED; - case CALIBRATIONREQUIRED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED; - case CALIBRATED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED; - case UNSPECIFIED: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED; - default: return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.NULL; - } -} - - public static org.hl7.fhir.r4.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.dstu3.model.DeviceRequest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceRequest tgt = new org.hl7.fhir.r4.model.DeviceRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getDefinition()) - tgt.addDefinition(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) - tgt.addBasedOn(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getPriorRequest()) - tgt.addPriorRequest(convertReference(t)); - if (src.hasGroupIdentifier()) - tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertDeviceRequestStatus(src.getStatus())); - if (src.hasIntent()) - tgt.setIntent(convertCodeableConcept(src.getIntent())); - if (src.hasPriority()) - tgt.setPriority(convertRequestPriority(src.getPriority())); - if (src.hasCode()) - tgt.setCode(convertType(src.getCode())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasOccurrence()) - tgt.setOccurrence(convertType(src.getOccurrence())); - if (src.hasAuthoredOn()) - tgt.setAuthoredOn(src.getAuthoredOn()); - if (src.hasRequester()) - tgt.setRequester(convertDeviceRequestRequesterComponent(src.getRequester())); - if (src.hasPerformerType()) - tgt.setPerformerType(convertCodeableConcept(src.getPerformerType())); - if (src.hasPerformer()) - tgt.setPerformer(convertReference(src.getPerformer())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) - tgt.addReasonCode(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) - tgt.addReasonReference(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInfo()) - tgt.addSupportingInfo(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getRelevantHistory()) - tgt.addRelevantHistory(convertReference(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.r4.model.DeviceRequest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceRequest tgt = new org.hl7.fhir.dstu3.model.DeviceRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getDefinition()) - tgt.addDefinition(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) - tgt.addBasedOn(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getPriorRequest()) - tgt.addPriorRequest(convertReference(t)); - if (src.hasGroupIdentifier()) - tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertDeviceRequestStatus(src.getStatus())); - if (src.hasIntent()) - tgt.setIntent(convertCodeableConcept(src.getIntent())); - if (src.hasPriority()) - tgt.setPriority(convertRequestPriority(src.getPriority())); - if (src.hasCode()) - tgt.setCode(convertType(src.getCode())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasOccurrence()) - tgt.setOccurrence(convertType(src.getOccurrence())); - if (src.hasAuthoredOn()) - tgt.setAuthoredOn(src.getAuthoredOn()); - if (src.hasRequester()) - tgt.setRequester(convertDeviceRequestRequesterComponent(src.getRequester())); - if (src.hasPerformerType()) - tgt.setPerformerType(convertCodeableConcept(src.getPerformerType())); - if (src.hasPerformer()) - tgt.setPerformer(convertReference(src.getPerformer())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) - tgt.addReasonCode(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) - tgt.addReasonReference(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInfo()) - tgt.addSupportingInfo(convertReference(t)); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getRelevantHistory()) - tgt.addRelevantHistory(convertReference(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus convertDeviceRequestStatus(org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus convertDeviceRequestStatus(org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.DeviceRequest.RequestPriority convertRequestPriority(org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ROUTINE: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.URGENT; - case ASAP: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.ASAP; - case STAT: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.STAT; - default: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority convertRequestPriority(org.hl7.fhir.r4.model.DeviceRequest.RequestPriority src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ROUTINE: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.URGENT; - case ASAP: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.ASAP; - case STAT: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.STAT; - default: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.NULL; - } -} - - public static org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent convertDeviceRequestRequesterComponent(org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent tgt = new org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent(); - copyElement(src, tgt); - if (src.hasAgent()) - tgt.setAgent(convertReference(src.getAgent())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent convertDeviceRequestRequesterComponent(org.hl7.fhir.r4.model.DeviceRequest.DeviceRequestRequesterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent tgt = new org.hl7.fhir.dstu3.model.DeviceRequest.DeviceRequestRequesterComponent(); - copyElement(src, tgt); - if (src.hasAgent()) - tgt.setAgent(convertReference(src.getAgent())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); - return tgt; - } - - public static org.hl7.fhir.r4.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.dstu3.model.DeviceUseStatement src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DeviceUseStatement tgt = new org.hl7.fhir.r4.model.DeviceUseStatement(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertDeviceUseStatementStatus(src.getStatus())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasWhenUsed()) - tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - if (src.hasRecordedOn()) - tgt.setRecordedOn(src.getRecordedOn()); - if (src.hasSource()) - tgt.setSource(convertReference(src.getSource())); - if (src.hasDevice()) - tgt.setDevice(convertReference(src.getDevice())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getIndication()) - tgt.addIndication(convertCodeableConcept(t)); - if (src.hasBodySite()) - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.r4.model.DeviceUseStatement src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DeviceUseStatement tgt = new org.hl7.fhir.dstu3.model.DeviceUseStatement(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertDeviceUseStatementStatus(src.getStatus())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasWhenUsed()) - tgt.setWhenUsed(convertPeriod(src.getWhenUsed())); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - if (src.hasRecordedOn()) - tgt.setRecordedOn(src.getRecordedOn()); - if (src.hasSource()) - tgt.setSource(convertReference(src.getSource())); - if (src.hasDevice()) - tgt.setDevice(convertReference(src.getDevice())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getIndication()) - tgt.addIndication(convertCodeableConcept(t)); - if (src.hasBodySite()) - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus convertDeviceUseStatementStatus(org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.ENTEREDINERROR; - case INTENDED: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.INTENDED; - case STOPPED: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.STOPPED; - case ONHOLD: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.ONHOLD; - default: return org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus convertDeviceUseStatementStatus(org.hl7.fhir.r4.model.DeviceUseStatement.DeviceUseStatementStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.ACTIVE; - case COMPLETED: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.ENTEREDINERROR; - case INTENDED: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.INTENDED; - case STOPPED: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.STOPPED; - case ONHOLD: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.ONHOLD; - default: return org.hl7.fhir.dstu3.model.DeviceUseStatement.DeviceUseStatementStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.dstu3.model.DiagnosticReport src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DiagnosticReport tgt = new org.hl7.fhir.r4.model.DiagnosticReport(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) - tgt.addBasedOn(convertReference(t)); - if (src.hasStatus()) - tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasEffective()) - tgt.setEffective(convertType(src.getEffective())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); -// for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent t : src.getPerformer()) -// tgt.addPerformer(convertDiagnosticReportPerformerComponent(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getSpecimen()) - tgt.addSpecimen(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getResult()) - tgt.addResult(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getImagingStudy()) - tgt.addImagingStudy(convertReference(t)); - for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) - tgt.addImage(convertDiagnosticReportImageComponent(t)); - if (src.hasConclusion()) - tgt.setConclusion(src.getConclusion()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) - tgt.addCodedDiagnosis(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Attachment t : src.getPresentedForm()) - tgt.addPresentedForm(convertAttachment(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DiagnosticReport tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) - tgt.addBasedOn(convertReference(t)); - if (src.hasStatus()) - tgt.setStatus(convertDiagnosticReportStatus(src.getStatus())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasEffective()) - tgt.setEffective(convertType(src.getEffective())); - if (src.hasIssued()) - tgt.setIssued(src.getIssued()); -// for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent t : src.getPerformer()) -// tgt.addPerformer(convertDiagnosticReportPerformerComponent(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) - tgt.addSpecimen(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getResult()) - tgt.addResult(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getImagingStudy()) - tgt.addImagingStudy(convertReference(t)); - for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) - tgt.addImage(convertDiagnosticReportImageComponent(t)); - if (src.hasConclusion()) - tgt.setConclusion(src.getConclusion()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCodedDiagnosis()) - tgt.addCodedDiagnosis(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm()) - tgt.addPresentedForm(convertAttachment(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; - case PARTIAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; - case PRELIMINARY: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; - case APPENDED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED; - case PARTIAL: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL; - case PRELIMINARY: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.FINAL; - case AMENDED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED; - case APPENDED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.APPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.NULL; - } -} - -// public static org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent convertDiagnosticReportPerformerComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent src) throws FHIRException { -// if (src == null) -// return null; -// org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent(); -// copyElement(src, tgt); -// if (src.hasRole()) -// tgt.setRole(convertCodeableConcept(src.getRole())); -// if (src.hasActor()) -// tgt.setActor(convertReference(src.getActor())); -// return tgt; -// } -// -// public static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent convertDiagnosticReportPerformerComponent(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent src) throws FHIRException { -// if (src == null) -// return null; -// org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportPerformerComponent(); -// copyElement(src, tgt); -// if (src.hasRole()) -// tgt.setRole(convertCodeableConcept(src.getRole())); -// if (src.hasActor()) -// tgt.setActor(convertReference(src.getActor())); -// return tgt; -// } -// - public static org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent(); - copyElement(src, tgt); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasLink()) - tgt.setLink(convertReference(src.getLink())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent(); - copyElement(src, tgt); - if (src.hasComment()) - tgt.setComment(src.getComment()); - if (src.hasLink()) - tgt.setLink(convertReference(src.getLink())); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.dstu3.model.DocumentManifest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentManifest tgt = new org.hl7.fhir.r4.model.DocumentManifest(); - copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - if (src.hasSource()) - tgt.setSource(src.getSource()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) - tgt.addContent(convertDocumentManifestContentComponent(t)); - for (org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentManifest tgt = new org.hl7.fhir.dstu3.model.DocumentManifest(); - copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) - tgt.addRecipient(convertReference(t)); - if (src.hasSource()) - tgt.setSource(src.getSource()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) - tgt.addContent(convertDocumentManifestContentComponent(t)); - for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.CURRENT; - case SUPERSEDED: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.CURRENT; - case SUPERSEDED: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.SUPERSEDED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent(); - copyElement(src, tgt); - if (src.hasP()) - tgt.setP(convertType(src.getP())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent(); - copyElement(src, tgt); - if (src.hasP()) - tgt.setP(convertType(src.getP())); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentReference convertDocumentReference(org.hl7.fhir.dstu3.model.DocumentReference src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentReference tgt = new org.hl7.fhir.r4.model.DocumentReference(); - copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - if (src.hasDocStatus()) - tgt.setDocStatus(convertReferredDocumentStatus(src.getDocStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasClass_()) - tgt.setClass_(convertCodeableConcept(src.getClass_())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasIndexed()) - tgt.setIndexed(src.getIndexed()); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - if (src.hasAuthenticator()) - tgt.setAuthenticator(convertReference(src.getAuthenticator())); - if (src.hasCustodian()) - tgt.setCustodian(convertReference(src.getCustodian())); - for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) - tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSecurityLabel()) - tgt.addSecurityLabel(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) - tgt.addContent(convertDocumentReferenceContentComponent(t)); - if (src.hasContext()) - tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentReference convertDocumentReference(org.hl7.fhir.r4.model.DocumentReference src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentReference tgt = new org.hl7.fhir.dstu3.model.DocumentReference(); - copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); - if (src.hasDocStatus()) - tgt.setDocStatus(convertReferredDocumentStatus(src.getDocStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasClass_()) - tgt.setClass_(convertCodeableConcept(src.getClass_())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasIndexed()) - tgt.setIndexed(src.getIndexed()); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) - tgt.addAuthor(convertReference(t)); - if (src.hasAuthenticator()) - tgt.setAuthenticator(convertReference(src.getAuthenticator())); - if (src.hasCustodian()) - tgt.setCustodian(convertReference(src.getCustodian())); - for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) - tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) - tgt.addSecurityLabel(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) - tgt.addContent(convertDocumentReferenceContentComponent(t)); - if (src.hasContext()) - tgt.setContext(convertDocumentReferenceContextComponent(src.getContext())); - return tgt; - } - - private static org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus convertReferredDocumentStatus(org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRELIMINARY: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus convertReferredDocumentStatus(org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PRELIMINARY: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.FINAL; - case AMENDED: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertDocumentRelationshipType(src.getCode())); - if (src.hasTarget()) - tgt.setTarget(convertReference(src.getTarget())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertDocumentRelationshipType(src.getCode())); - if (src.hasTarget()) - tgt.setTarget(convertReference(src.getTarget())); - return tgt; - } - - private static org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REPLACES: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.REPLACES; - case TRANSFORMS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; - case SIGNS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.SIGNS; - case APPENDS: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.APPENDS; - default: return org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.r4.model.DocumentReference.DocumentRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REPLACES: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.REPLACES; - case TRANSFORMS: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.TRANSFORMS; - case SIGNS: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.SIGNS; - case APPENDS: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.APPENDS; - default: return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.NULL; - } -} - - - public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent(); - copyElement(src, tgt); - if (src.hasAttachment()) - tgt.setAttachment(convertAttachment(src.getAttachment())); - if (src.hasFormat()) - tgt.setFormat(convertCoding(src.getFormat())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent(); - copyElement(src, tgt); - if (src.hasAttachment()) - tgt.setAttachment(convertAttachment(src.getAttachment())); - if (src.hasFormat()) - tgt.setFormat(convertCoding(src.getFormat())); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent(); - copyElement(src, tgt); - if (src.hasEncounter()) - tgt.setEncounter(convertReference(src.getEncounter())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getEvent()) - tgt.addEvent(convertCodeableConcept(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasFacilityType()) - tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); - if (src.hasPracticeSetting()) - tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); - if (src.hasSourcePatientInfo()) - tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); - for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent(); - copyElement(src, tgt); - if (src.hasEncounter()) - tgt.setEncounter(convertReference(src.getEncounter())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getEvent()) - tgt.addEvent(convertCodeableConcept(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasFacilityType()) - tgt.setFacilityType(convertCodeableConcept(src.getFacilityType())); - if (src.hasPracticeSetting()) - tgt.setPracticeSetting(convertCodeableConcept(src.getPracticeSetting())); - if (src.hasSourcePatientInfo()) - tgt.setSourcePatientInfo(convertReference(src.getSourcePatientInfo())); - for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.r4.model.EligibilityRequest convertEligibilityRequest(org.hl7.fhir.dstu3.model.EligibilityRequest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EligibilityRequest tgt = new org.hl7.fhir.r4.model.EligibilityRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEligibilityRequestStatus(src.getStatus())); - if (src.hasPriority()) - tgt.setPriority(convertCodeableConcept(src.getPriority())); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasServiced()) - tgt.setServiced(convertType(src.getServiced())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasEnterer()) - tgt.setEnterer(convertReference(src.getEnterer())); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasFacility()) - tgt.setFacility(convertReference(src.getFacility())); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasBusinessArrangement()) - tgt.setBusinessArrangement(src.getBusinessArrangement()); - if (src.hasBenefitCategory()) - tgt.setBenefitCategory(convertCodeableConcept(src.getBenefitCategory())); - if (src.hasBenefitSubCategory()) - tgt.setBenefitSubCategory(convertCodeableConcept(src.getBenefitSubCategory())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EligibilityRequest convertEligibilityRequest(org.hl7.fhir.r4.model.EligibilityRequest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EligibilityRequest tgt = new org.hl7.fhir.dstu3.model.EligibilityRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEligibilityRequestStatus(src.getStatus())); - if (src.hasPriority()) - tgt.setPriority(convertCodeableConcept(src.getPriority())); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasServiced()) - tgt.setServiced(convertType(src.getServiced())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasEnterer()) - tgt.setEnterer(convertReference(src.getEnterer())); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasFacility()) - tgt.setFacility(convertReference(src.getFacility())); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasBusinessArrangement()) - tgt.setBusinessArrangement(src.getBusinessArrangement()); - if (src.hasBenefitCategory()) - tgt.setBenefitCategory(convertCodeableConcept(src.getBenefitCategory())); - if (src.hasBenefitSubCategory()) - tgt.setBenefitSubCategory(convertCodeableConcept(src.getBenefitSubCategory())); - return tgt; - } - - private static org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus convertEligibilityRequestStatus(org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus convertEligibilityRequestStatus(org.hl7.fhir.r4.model.EligibilityRequest.EligibilityRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.EligibilityRequest.EligibilityRequestStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.EligibilityResponse convertEligibilityResponse(org.hl7.fhir.dstu3.model.EligibilityResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EligibilityResponse tgt = new org.hl7.fhir.r4.model.EligibilityResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEligibilityResponseStatus(src.getStatus())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasInforce()) - tgt.setInforce(src.getInforce()); - for (org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent t : src.getInsurance()) - tgt.addInsurance(convertInsuranceComponent(t)); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent t : src.getError()) - tgt.addError(convertErrorsComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EligibilityResponse convertEligibilityResponse(org.hl7.fhir.r4.model.EligibilityResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EligibilityResponse tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEligibilityResponseStatus(src.getStatus())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasInforce()) - tgt.setInforce(src.getInforce()); - for (org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent t : src.getInsurance()) - tgt.addInsurance(convertInsuranceComponent(t)); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent t : src.getError()) - tgt.addError(convertErrorsComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus convertEligibilityResponseStatus(org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus convertEligibilityResponseStatus(org.hl7.fhir.r4.model.EligibilityResponse.EligibilityResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.EligibilityResponse.EligibilityResponseStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasContract()) - tgt.setContract(convertReference(src.getContract())); - for (org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent t : src.getBenefitBalance()) - tgt.addBenefitBalance(convertBenefitsComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - if (src.hasContract()) - tgt.setContract(convertReference(src.getContract())); - for (org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent t : src.getBenefitBalance()) - tgt.addBenefitBalance(convertBenefitsComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent convertBenefitsComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasSubCategory()) - tgt.setSubCategory(convertCodeableConcept(src.getSubCategory())); - if (src.hasExcluded()) - tgt.setExcluded(src.getExcluded()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasNetwork()) - tgt.setNetwork(convertCodeableConcept(src.getNetwork())); - if (src.hasUnit()) - tgt.setUnit(convertCodeableConcept(src.getUnit())); - if (src.hasTerm()) - tgt.setTerm(convertCodeableConcept(src.getTerm())); - for (org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent t : src.getFinancial()) - tgt.addFinancial(convertBenefitComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent convertBenefitsComponent(org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasSubCategory()) - tgt.setSubCategory(convertCodeableConcept(src.getSubCategory())); - if (src.hasExcluded()) - tgt.setExcluded(src.getExcluded()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasNetwork()) - tgt.setNetwork(convertCodeableConcept(src.getNetwork())); - if (src.hasUnit()) - tgt.setUnit(convertCodeableConcept(src.getUnit())); - if (src.hasTerm()) - tgt.setTerm(convertCodeableConcept(src.getTerm())); - for (org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent t : src.getFinancial()) - tgt.addFinancial(convertBenefitComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent convertBenefitComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAllowed()) - tgt.setAllowed(convertType(src.getAllowed())); - if (src.hasUsed()) - tgt.setUsed(convertType(src.getUsed())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent convertBenefitComponent(org.hl7.fhir.r4.model.EligibilityResponse.BenefitComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAllowed()) - tgt.setAllowed(convertType(src.getAllowed())); - if (src.hasUsed()) - tgt.setUsed(convertType(src.getUsed())); - return tgt; - } - - public static org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent convertErrorsComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent convertErrorsComponent(org.hl7.fhir.r4.model.EligibilityResponse.ErrorsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.ErrorsComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter convertEncounter(org.hl7.fhir.dstu3.model.Encounter src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter tgt = new org.hl7.fhir.r4.model.Encounter(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEncounterStatus(src.getStatus())); - for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); - if (src.hasClass_()) - tgt.setClass_(convertCoding(src.getClass_())); - for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPriority()) - tgt.setPriority(convertCodeableConcept(src.getPriority())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEpisodeOfCare()) - tgt.addEpisodeOfCare(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getIncomingReferral()) - tgt.addIncomingReferral(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent t : src.getParticipant()) - tgt.addParticipant(convertEncounterParticipantComponent(t)); - if (src.hasAppointment()) - tgt.setAppointment(convertReference(src.getAppointment())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasLength()) - tgt.setLength(convertDuration(src.getLength())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) - tgt.addDiagnosis(convertDiagnosisComponent(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) - tgt.addAccount(convertReference(t)); - if (src.hasHospitalization()) - tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization())); - for (org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent t : src.getLocation()) - tgt.addLocation(convertEncounterLocationComponent(t)); - if (src.hasServiceProvider()) - tgt.setServiceProvider(convertReference(src.getServiceProvider())); - if (src.hasPartOf()) - tgt.setPartOf(convertReference(src.getPartOf())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter convertEncounter(org.hl7.fhir.r4.model.Encounter src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter tgt = new org.hl7.fhir.dstu3.model.Encounter(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEncounterStatus(src.getStatus())); - for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); - if (src.hasClass_()) - tgt.setClass_(convertCoding(src.getClass_())); - for (org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPriority()) - tgt.setPriority(convertCodeableConcept(src.getPriority())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - for (org.hl7.fhir.r4.model.Reference t : src.getEpisodeOfCare()) - tgt.addEpisodeOfCare(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getIncomingReferral()) - tgt.addIncomingReferral(convertReference(t)); - for (org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent t : src.getParticipant()) - tgt.addParticipant(convertEncounterParticipantComponent(t)); - if (src.hasAppointment()) - tgt.setAppointment(convertReference(src.getAppointment())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasLength()) - tgt.setLength(convertDuration(src.getLength())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) - tgt.addDiagnosis(convertDiagnosisComponent(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) - tgt.addAccount(convertReference(t)); - if (src.hasHospitalization()) - tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization())); - for (org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent t : src.getLocation()) - tgt.addLocation(convertEncounterLocationComponent(t)); - if (src.hasServiceProvider()) - tgt.setServiceProvider(convertReference(src.getServiceProvider())); - if (src.hasPartOf()) - tgt.setPartOf(convertReference(src.getPartOf())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Encounter.EncounterStatus convertEncounterStatus(org.hl7.fhir.dstu3.model.Encounter.EncounterStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.PLANNED; - case ARRIVED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ARRIVED; - case TRIAGED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.TRIAGED; - case INPROGRESS: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.INPROGRESS; - case ONLEAVE: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ONLEAVE; - case FINISHED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED; - case CANCELLED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Encounter.EncounterStatus convertEncounterStatus(org.hl7.fhir.r4.model.Encounter.EncounterStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.PLANNED; - case ARRIVED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ARRIVED; - case TRIAGED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.TRIAGED; - case INPROGRESS: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.INPROGRESS; - case ONLEAVE: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ONLEAVE; - case FINISHED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.FINISHED; - case CANCELLED: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent(); - copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(convertEncounterStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent(); - copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(convertEncounterStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent(); - copyElement(src, tgt); - if (src.hasClass_()) - tgt.setClass_(convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent(); - copyElement(src, tgt); - if (src.hasClass_()) - tgt.setClass_(convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasIndividual()) - tgt.setIndividual(convertReference(src.getIndividual())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasIndividual()) - tgt.setIndividual(convertReference(src.getIndividual())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.Encounter.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasCondition()) - tgt.setCondition(convertReference(src.getCondition())); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRank(src.getRank()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.Encounter.DiagnosisComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasCondition()) - tgt.setCondition(convertReference(src.getCondition())); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRank(src.getRank()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent(); - copyElement(src, tgt); - if (src.hasPreAdmissionIdentifier()) - tgt.setPreAdmissionIdentifier(convertIdentifier(src.getPreAdmissionIdentifier())); - if (src.hasOrigin()) - tgt.setOrigin(convertReference(src.getOrigin())); - if (src.hasAdmitSource()) - tgt.setAdmitSource(convertCodeableConcept(src.getAdmitSource())); - if (src.hasReAdmission()) - tgt.setReAdmission(convertCodeableConcept(src.getReAdmission())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getDietPreference()) - tgt.addDietPreference(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialCourtesy()) - tgt.addSpecialCourtesy(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialArrangement()) - tgt.addSpecialArrangement(convertCodeableConcept(t)); - if (src.hasDestination()) - tgt.setDestination(convertReference(src.getDestination())); - if (src.hasDischargeDisposition()) - tgt.setDischargeDisposition(convertCodeableConcept(src.getDischargeDisposition())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent(); - copyElement(src, tgt); - if (src.hasPreAdmissionIdentifier()) - tgt.setPreAdmissionIdentifier(convertIdentifier(src.getPreAdmissionIdentifier())); - if (src.hasOrigin()) - tgt.setOrigin(convertReference(src.getOrigin())); - if (src.hasAdmitSource()) - tgt.setAdmitSource(convertCodeableConcept(src.getAdmitSource())); - if (src.hasReAdmission()) - tgt.setReAdmission(convertCodeableConcept(src.getReAdmission())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getDietPreference()) - tgt.addDietPreference(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialCourtesy()) - tgt.addSpecialCourtesy(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialArrangement()) - tgt.addSpecialArrangement(convertCodeableConcept(t)); - if (src.hasDestination()) - tgt.setDestination(convertReference(src.getDestination())); - if (src.hasDischargeDisposition()) - tgt.setDischargeDisposition(convertCodeableConcept(src.getDischargeDisposition())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent convertEncounterLocationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent(); - copyElement(src, tgt); - if (src.hasLocation()) - tgt.setLocation(convertReference(src.getLocation())); - if (src.hasStatus()) - tgt.setStatus(convertEncounterLocationStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent convertEncounterLocationComponent(org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent(); - copyElement(src, tgt); - if (src.hasLocation()) - tgt.setLocation(convertReference(src.getLocation())); - if (src.hasStatus()) - tgt.setStatus(convertEncounterLocationStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - private static org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus convertEncounterLocationStatus(org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.PLANNED; - case ACTIVE: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.ACTIVE; - case RESERVED: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.RESERVED; - case COMPLETED: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.COMPLETED; - default: return org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus convertEncounterLocationStatus(org.hl7.fhir.r4.model.Encounter.EncounterLocationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.PLANNED; - case ACTIVE: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.ACTIVE; - case RESERVED: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.RESERVED; - case COMPLETED: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.COMPLETED; - default: return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.Endpoint convertEndpoint(org.hl7.fhir.dstu3.model.Endpoint src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Endpoint tgt = new org.hl7.fhir.r4.model.Endpoint(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEndpointStatus(src.getStatus())); - if (src.hasConnectionType()) - tgt.setConnectionType(convertCoding(src.getConnectionType())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasManagingOrganization()) - tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); - for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) - tgt.addPayloadMimeType(t.getValue()); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) - tgt.addHeader(t.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Endpoint convertEndpoint(org.hl7.fhir.r4.model.Endpoint src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Endpoint tgt = new org.hl7.fhir.dstu3.model.Endpoint(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEndpointStatus(src.getStatus())); - if (src.hasConnectionType()) - tgt.setConnectionType(convertCoding(src.getConnectionType())); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasManagingOrganization()) - tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) - tgt.addContact(convertContactPoint(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeType t : src.getPayloadMimeType()) - tgt.addPayloadMimeType(t.getValue()); - if (src.hasAddress()) - tgt.setAddress(src.getAddress()); - for (org.hl7.fhir.r4.model.StringType t : src.getHeader()) - tgt.addHeader(t.getValue()); - return tgt; - } - - private static org.hl7.fhir.r4.model.Endpoint.EndpointStatus convertEndpointStatus(org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.SUSPENDED; - case ERROR: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.ERROR; - case OFF: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.OFF; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.ENTEREDINERROR; - case TEST: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.TEST; - default: return org.hl7.fhir.r4.model.Endpoint.EndpointStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus convertEndpointStatus(org.hl7.fhir.r4.model.Endpoint.EndpointStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.SUSPENDED; - case ERROR: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.ERROR; - case OFF: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.OFF; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.ENTEREDINERROR; - case TEST: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.TEST; - default: return org.hl7.fhir.dstu3.model.Endpoint.EndpointStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.dstu3.model.EnrollmentRequest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EnrollmentRequest tgt = new org.hl7.fhir.r4.model.EnrollmentRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEnrollmentRequestStatus(src.getStatus())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasSubject()) - tgt.setCandidate(convertReference(src.getSubject())); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.r4.model.EnrollmentRequest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EnrollmentRequest tgt = new org.hl7.fhir.dstu3.model.EnrollmentRequest(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEnrollmentRequestStatus(src.getStatus())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasCandidate()) - tgt.setSubject(convertReference(src.getCandidate())); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - return tgt; - } - - private static org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus convertEnrollmentRequestStatus(org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus convertEnrollmentRequestStatus(org.hl7.fhir.r4.model.EnrollmentRequest.EnrollmentRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.EnrollmentRequest.EnrollmentRequestStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.dstu3.model.EnrollmentResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EnrollmentResponse tgt = new org.hl7.fhir.r4.model.EnrollmentResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEnrollmentResponseStatus(src.getStatus())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.r4.model.EnrollmentResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EnrollmentResponse tgt = new org.hl7.fhir.dstu3.model.EnrollmentResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEnrollmentResponseStatus(src.getStatus())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - return tgt; - } - - private static org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus convertEnrollmentResponseStatus(org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus convertEnrollmentResponseStatus(org.hl7.fhir.r4.model.EnrollmentResponse.EnrollmentResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.EnrollmentResponse.EnrollmentResponseStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.dstu3.model.EpisodeOfCare src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EpisodeOfCare tgt = new org.hl7.fhir.r4.model.EpisodeOfCare(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); - for (org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertEpisodeOfCareStatusHistoryComponent(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent t : src.getDiagnosis()) - tgt.addDiagnosis(convertDiagnosisComponent(t)); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasManagingOrganization()) - tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getReferralRequest()) - tgt.addReferralRequest(convertReference(t)); - if (src.hasCareManager()) - tgt.setCareManager(convertReference(src.getCareManager())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getTeam()) - tgt.addTeam(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) - tgt.addAccount(convertReference(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.r4.model.EpisodeOfCare src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EpisodeOfCare tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); - for (org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertEpisodeOfCareStatusHistoryComponent(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent t : src.getDiagnosis()) - tgt.addDiagnosis(convertDiagnosisComponent(t)); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasManagingOrganization()) - tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r4.model.Reference t : src.getReferralRequest()) - tgt.addReferralRequest(convertReference(t)); - if (src.hasCareManager()) - tgt.setCareManager(convertReference(src.getCareManager())); - for (org.hl7.fhir.r4.model.Reference t : src.getTeam()) - tgt.addTeam(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) - tgt.addAccount(convertReference(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus convertEpisodeOfCareStatus(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.PLANNED; - case WAITLIST: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.WAITLIST; - case ACTIVE: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.ACTIVE; - case ONHOLD: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.ONHOLD; - case FINISHED: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.FINISHED; - case CANCELLED: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus convertEpisodeOfCareStatus(org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PLANNED: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.PLANNED; - case WAITLIST: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.WAITLIST; - case ACTIVE: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ACTIVE; - case ONHOLD: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ONHOLD; - case FINISHED: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.FINISHED; - case CANCELLED: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt = new org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); - copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.r4.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); - copyElement(src, tgt); - if (src.hasStatus()) - tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasCondition()) - tgt.setCondition(convertReference(src.getCondition())); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRank(src.getRank()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasCondition()) - tgt.setCondition(convertReference(src.getCondition())); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRank(src.getRank()); - return tgt; - } - public static org.hl7.fhir.r4.model.ExpansionProfile convertExpansionProfile(org.hl7.fhir.dstu3.model.ExpansionProfile src) throws FHIRException { if (src == null) return null; @@ -12834,6 +9570,54 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent convertExpansionProfileDesignationComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent(); + copyElement(src, tgt); + if (src.hasInclude()) + tgt.setInclude(convertDesignationIncludeComponent(src.getInclude())); + if (src.hasExclude()) + tgt.setExclude(convertDesignationExcludeComponent(src.getExclude())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent convertExpansionProfileDesignationComponent(org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent(); + copyElement(src, tgt); + if (src.hasInclude()) + tgt.setInclude(convertDesignationIncludeComponent(src.getInclude())); + if (src.hasExclude()) + tgt.setExclude(convertDesignationExcludeComponent(src.getExclude())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent convertExpansionProfileExcludedSystemComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent(); + copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent convertExpansionProfileExcludedSystemComponent(org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent(); + copyElement(src, tgt); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasVersion()) + tgt.setVersion(src.getVersion()); + return tgt; + } + public static org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileFixedVersionComponent convertExpansionProfileFixedVersionComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileFixedVersionComponent src) throws FHIRException { if (src == null) return null; @@ -12862,1137 +9646,121 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode convertSystemVersionProcessingMode(org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode src) throws FHIRException { + public static org.hl7.fhir.r4.model.Extension convertExtension(org.hl7.fhir.dstu3.model.Extension src) throws FHIRException { if (src == null) return null; - switch (src) { - case DEFAULT: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.DEFAULT; - case CHECK: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.CHECK; - case OVERRIDE: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.OVERRIDE; - default: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode convertSystemVersionProcessingMode(org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DEFAULT: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.DEFAULT; - case CHECK: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.CHECK; - case OVERRIDE: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.OVERRIDE; - default: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.NULL; - } -} - - public static org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent convertExpansionProfileExcludedSystemComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent(); + org.hl7.fhir.r4.model.Extension tgt = new org.hl7.fhir.r4.model.Extension(); copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent convertExpansionProfileExcludedSystemComponent(org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileExcludedSystemComponent(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent convertExpansionProfileDesignationComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent(); - copyElement(src, tgt); - if (src.hasInclude()) - tgt.setInclude(convertDesignationIncludeComponent(src.getInclude())); - if (src.hasExclude()) - tgt.setExclude(convertDesignationExcludeComponent(src.getExclude())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent convertExpansionProfileDesignationComponent(org.hl7.fhir.r4.model.ExpansionProfile.ExpansionProfileDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.ExpansionProfileDesignationComponent(); - copyElement(src, tgt); - if (src.hasInclude()) - tgt.setInclude(convertDesignationIncludeComponent(src.getInclude())); - if (src.hasExclude()) - tgt.setExclude(convertDesignationExcludeComponent(src.getExclude())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent convertDesignationIncludeComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertDesignationIncludeDesignationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent convertDesignationIncludeComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertDesignationIncludeDesignationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent convertDesignationIncludeDesignationComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent convertDesignationIncludeDesignationComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationIncludeDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationIncludeDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent convertDesignationExcludeComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertDesignationExcludeDesignationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent convertDesignationExcludeComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertDesignationExcludeDesignationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent convertDesignationExcludeDesignationComponent(org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent tgt = new org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent convertDesignationExcludeDesignationComponent(org.hl7.fhir.r4.model.ExpansionProfile.DesignationExcludeDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ExpansionProfile.DesignationExcludeDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit convertExplanationOfBenefit(org.hl7.fhir.dstu3.model.ExplanationOfBenefit src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertExplanationOfBenefitStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubType()) - tgt.addSubType(convertCodeableConcept(t)); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasBillablePeriod()) - tgt.setBillablePeriod(convertPeriod(src.getBillablePeriod())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasEnterer()) - tgt.setEnterer(convertReference(src.getEnterer())); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasReferral()) - tgt.setReferral(convertReference(src.getReferral())); - if (src.hasFacility()) - tgt.setFacility(convertReference(src.getFacility())); - if (src.hasClaim()) - tgt.setClaim(convertReference(src.getClaim())); - if (src.hasClaimResponse()) - tgt.setClaimResponse(convertReference(src.getClaimResponse())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.RelatedClaimComponent t : src.getRelated()) - tgt.addRelated(convertRelatedClaimComponent(t)); - if (src.hasPrescription()) - tgt.setPrescription(convertReference(src.getPrescription())); - if (src.hasOriginalPrescription()) - tgt.setOriginalPrescription(convertReference(src.getOriginalPrescription())); - if (src.hasPayee()) - tgt.setPayee(convertPayeeComponent(src.getPayee())); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SupportingInformationComponent t : src.getInformation()) - tgt.addInformation(convertSupportingInformationComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.CareTeamComponent t : src.getCareTeam()) - tgt.addCareTeam(convertCareTeamComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DiagnosisComponent t : src.getDiagnosis()) - tgt.addDiagnosis(convertDiagnosisComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ProcedureComponent t : src.getProcedure()) - tgt.addProcedure(convertProcedureComponent(t)); - if (src.hasPrecedence()) - tgt.setPrecedence(src.getPrecedence()); - if (src.hasInsurance()) - tgt.setInsurance(convertInsuranceComponent(src.getInsurance())); - if (src.hasAccident()) - tgt.setAccident(convertAccidentComponent(src.getAccident())); - if (src.hasEmploymentImpacted()) - tgt.setEmploymentImpacted(convertPeriod(src.getEmploymentImpacted())); - if (src.hasHospitalization()) - tgt.setHospitalization(convertPeriod(src.getHospitalization())); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent t : src.getItem()) - tgt.addItem(convertItemComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemComponent t : src.getAddItem()) - tgt.addAddItem(convertAddedItemComponent(t)); - if (src.hasTotalCost()) - tgt.setTotalCost(convertMoney(src.getTotalCost())); - if (src.hasUnallocDeductable()) - tgt.setUnallocDeductable(convertMoney(src.getUnallocDeductable())); - if (src.hasTotalBenefit()) - tgt.setTotalBenefit(convertMoney(src.getTotalBenefit())); - if (src.hasPayment()) - tgt.setPayment(convertPaymentComponent(src.getPayment())); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.NoteComponent t : src.getProcessNote()) - tgt.addProcessNote(convertNoteComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitBalanceComponent t : src.getBenefitBalance()) - tgt.addBenefitBalance(convertBenefitBalanceComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit convertExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertExplanationOfBenefitStatus(src.getStatus())); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubType()) - tgt.addSubType(convertCodeableConcept(t)); - if (src.hasPatient()) - tgt.setPatient(convertReference(src.getPatient())); - if (src.hasBillablePeriod()) - tgt.setBillablePeriod(convertPeriod(src.getBillablePeriod())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasEnterer()) - tgt.setEnterer(convertReference(src.getEnterer())); - if (src.hasInsurer()) - tgt.setInsurer(convertReference(src.getInsurer())); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasReferral()) - tgt.setReferral(convertReference(src.getReferral())); - if (src.hasFacility()) - tgt.setFacility(convertReference(src.getFacility())); - if (src.hasClaim()) - tgt.setClaim(convertReference(src.getClaim())); - if (src.hasClaimResponse()) - tgt.setClaimResponse(convertReference(src.getClaimResponse())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.RelatedClaimComponent t : src.getRelated()) - tgt.addRelated(convertRelatedClaimComponent(t)); - if (src.hasPrescription()) - tgt.setPrescription(convertReference(src.getPrescription())); - if (src.hasOriginalPrescription()) - tgt.setOriginalPrescription(convertReference(src.getOriginalPrescription())); - if (src.hasPayee()) - tgt.setPayee(convertPayeeComponent(src.getPayee())); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent t : src.getInformation()) - tgt.addInformation(convertSupportingInformationComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent t : src.getCareTeam()) - tgt.addCareTeam(convertCareTeamComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent t : src.getDiagnosis()) - tgt.addDiagnosis(convertDiagnosisComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent t : src.getProcedure()) - tgt.addProcedure(convertProcedureComponent(t)); - if (src.hasPrecedence()) - tgt.setPrecedence(src.getPrecedence()); - if (src.hasInsurance()) - tgt.setInsurance(convertInsuranceComponent(src.getInsurance())); - if (src.hasAccident()) - tgt.setAccident(convertAccidentComponent(src.getAccident())); - if (src.hasEmploymentImpacted()) - tgt.setEmploymentImpacted(convertPeriod(src.getEmploymentImpacted())); - if (src.hasHospitalization()) - tgt.setHospitalization(convertPeriod(src.getHospitalization())); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent t : src.getItem()) - tgt.addItem(convertItemComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemComponent t : src.getAddItem()) - tgt.addAddItem(convertAddedItemComponent(t)); - if (src.hasTotalCost()) - tgt.setTotalCost(convertMoney(src.getTotalCost())); - if (src.hasUnallocDeductable()) - tgt.setUnallocDeductable(convertMoney(src.getUnallocDeductable())); - if (src.hasTotalBenefit()) - tgt.setTotalBenefit(convertMoney(src.getTotalBenefit())); - if (src.hasPayment()) - tgt.setPayment(convertPaymentComponent(src.getPayment())); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.NoteComponent t : src.getProcessNote()) - tgt.addProcessNote(convertNoteComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent t : src.getBenefitBalance()) - tgt.addBenefitBalance(convertBenefitBalanceComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus convertExplanationOfBenefitStatus(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus convertExplanationOfBenefitStatus(org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.RelatedClaimComponent convertRelatedClaimComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.RelatedClaimComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.RelatedClaimComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.RelatedClaimComponent(); - copyElement(src, tgt); - if (src.hasClaim()) - tgt.setClaim(convertReference(src.getClaim())); - if (src.hasRelationship()) - tgt.setRelationship(convertCodeableConcept(src.getRelationship())); - if (src.hasReference()) - tgt.setReference(convertIdentifier(src.getReference())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.RelatedClaimComponent convertRelatedClaimComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.RelatedClaimComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.RelatedClaimComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.RelatedClaimComponent(); - copyElement(src, tgt); - if (src.hasClaim()) - tgt.setClaim(convertReference(src.getClaim())); - if (src.hasRelationship()) - tgt.setRelationship(convertCodeableConcept(src.getRelationship())); - if (src.hasReference()) - tgt.setReference(convertIdentifier(src.getReference())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.PayeeComponent convertPayeeComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PayeeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.PayeeComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.PayeeComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasResourceType()) - tgt.setResource(convertCoding(src.getResourceType().getCodingFirstRep())); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PayeeComponent convertPayeeComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.PayeeComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PayeeComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PayeeComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasParty()) - tgt.setParty(convertReference(src.getParty())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent convertSupportingInformationComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SupportingInformationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); if (src.hasValue()) tgt.setValue(convertType(src.getValue())); - if (src.hasReason()) - tgt.setReason(convertCoding(src.getReason())); return tgt; } - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SupportingInformationComponent convertSupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SupportingInformationComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SupportingInformationComponent(); + org.hl7.fhir.dstu3.model.Extension tgt = new org.hl7.fhir.dstu3.model.Extension(); copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); if (src.hasValue()) tgt.setValue(convertType(src.getValue())); - if (src.hasReason()) - tgt.setReason(convertCoding(src.getReason())); return tgt; } - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent convertCareTeamComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.CareTeamComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasQualification()) - tgt.setQualification(convertCodeableConcept(src.getQualification())); - return tgt; + switch (src) { + case RESOURCE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.RESOURCE; + case DATATYPE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.DATATYPE; + case EXTENSION: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.EXTENSION; + default: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.NULL; } +} - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.CareTeamComponent convertCareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.CareTeamComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.CareTeamComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasProvider()) - tgt.setProvider(convertReference(src.getProvider())); - if (src.hasResponsible()) - tgt.setResponsible(src.getResponsible()); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - if (src.hasQualification()) - tgt.setQualification(convertCodeableConcept(src.getQualification())); - return tgt; + switch (src) { + case RESOURCE: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.RESOURCE; + case DATATYPE: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.DATATYPE; + case EXTENSION: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.EXTENSION; + default: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.NULL; } +} - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DiagnosisComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.Device.FHIRDeviceStatus convertFHIRDeviceStatus(org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDiagnosis()) - tgt.setDiagnosis(convertType(src.getDiagnosis())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPackageCode()) - tgt.setPackageCode(convertCodeableConcept(src.getPackageCode())); - return tgt; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Device.FHIRDeviceStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus convertFHIRDeviceStatus(org.hl7.fhir.r4.model.Device.FHIRDeviceStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DiagnosisComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDiagnosis()) - tgt.setDiagnosis(convertType(src.getDiagnosis())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) - tgt.addType(convertCodeableConcept(t)); - if (src.hasPackageCode()) - tgt.setPackageCode(convertCodeableConcept(src.getPackageCode())); - return tgt; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.NULL; } +} - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent convertProcedureComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ProcedureComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus convertFHIRSubstanceStatus(org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasProcedure()) - tgt.setProcedure(convertType(src.getProcedure())); - return tgt; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ProcedureComponent convertProcedureComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus convertFHIRSubstanceStatus(org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ProcedureComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ProcedureComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasProcedure()) - tgt.setProcedure(convertType(src.getProcedure())); - return tgt; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.NULL; } +} - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.InsuranceComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.InsuranceComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - for (org.hl7.fhir.dstu3.model.StringType t : src.getPreAuthRef()) - tgt.addPreAuthRef(t.getValue()); - return tgt; + switch (src) { + case PARTIAL: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; + case COMPLETED: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; + case HEALTHUNKNOWN: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; + default: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.InsuranceComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.InsuranceComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.InsuranceComponent(); - copyElement(src, tgt); - if (src.hasCoverage()) - tgt.setCoverage(convertReference(src.getCoverage())); - for (org.hl7.fhir.r4.model.StringType t : src.getPreAuthRef()) - tgt.addPreAuthRef(t.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.AccidentComponent convertAccidentComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AccidentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.AccidentComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.AccidentComponent(); - copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AccidentComponent convertAccidentComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AccidentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AccidentComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AccidentComponent(); - copyElement(src, tgt); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent convertItemComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getCareTeamLinkId()) - tgt.addCareTeamLinkId(t.getValue()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getDiagnosisLinkId()) - tgt.addDiagnosisLinkId(t.getValue()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getProcedureLinkId()) - tgt.addProcedureLinkId(t.getValue()); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getInformationLinkId()) - tgt.addInformationLinkId(t.getValue()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasServiced()) - tgt.setServiced(convertType(src.getServiced())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - if (src.hasBodySite()) - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubSite()) - tgt.addSubSite(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEncounter()) - tgt.addEncounter(convertReference(t)); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DetailComponent t : src.getDetail()) - tgt.addDetail(convertDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent convertItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getCareTeamLinkId()) - tgt.addCareTeamLinkId(t.getValue()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getDiagnosisLinkId()) - tgt.addDiagnosisLinkId(t.getValue()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getProcedureLinkId()) - tgt.addProcedureLinkId(t.getValue()); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getInformationLinkId()) - tgt.addInformationLinkId(t.getValue()); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasServiced()) - tgt.setServiced(convertType(src.getServiced())); - if (src.hasLocation()) - tgt.setLocation(convertType(src.getLocation())); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - if (src.hasBodySite()) - tgt.setBodySite(convertCodeableConcept(src.getBodySite())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubSite()) - tgt.addSubSite(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getEncounter()) - tgt.addEncounter(convertReference(t)); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.DetailComponent t : src.getDetail()) - tgt.addDetail(convertDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent convertAdjudicationComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent convertAdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.DetailComponent convertDetailComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.DetailComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.DetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SubDetailComponent t : src.getSubDetail()) - tgt.addSubDetail(convertSubDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DetailComponent convertDetailComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.DetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DetailComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.DetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.SubDetailComponent t : src.getSubDetail()) - tgt.addSubDetail(convertSubDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SubDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.SubDetailComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.SubDetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SubDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SubDetailComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SubDetailComponent(); - copyElement(src, tgt); - if (src.hasSequence()) - tgt.setSequence(src.getSequence()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasRevenue()) - tgt.setRevenue(convertCodeableConcept(src.getRevenue())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasService()) - tgt.setService(convertCodeableConcept(src.getService())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) - tgt.addModifier(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) - tgt.addProgramCode(convertCodeableConcept(t)); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasUnitPrice()) - tgt.setUnitPrice(convertMoney(src.getUnitPrice())); - if (src.hasFactor()) - tgt.setFactor(src.getFactor()); - if (src.hasNet()) - tgt.setNet(convertMoney(src.getNet())); - for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) - tgt.addUdi(convertReference(t)); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) - tgt.addNoteNumber(t.getValue()); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) - tgt.addAdjudication(convertAdjudicationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemComponent convertAddedItemComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemComponent(); - copyElement(src, tgt); -// for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getSequenceLinkId()) -// tgt.addSequenceLinkId(t.getValue()); -// if (src.hasRevenue()) -// tgt.setRevenue(convertCodeableConcept(src.getRevenue())); -// if (src.hasCategory()) -// tgt.setCategory(convertCodeableConcept(src.getCategory())); -// if (src.hasService()) -// tgt.setService(convertCodeableConcept(src.getService())); -// for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) -// tgt.addModifier(convertCodeableConcept(t)); -// if (src.hasFee()) -// tgt.setFee(convertMoney(src.getFee())); -// for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) -// tgt.addNoteNumber(t.getValue()); -// for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) -// tgt.addAdjudication(convertAdjudicationComponent(t)); -// for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemsDetailComponent t : src.getDetail()) -// tgt.addDetail(convertAddedItemsDetailComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemComponent convertAddedItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.PositiveIntType t : src.getSequenceLinkId()) - tgt.addSequenceLinkId(t.getValue()); -// if (src.hasRevenue()) -// tgt.setRevenue(convertCodeableConcept(src.getRevenue())); -// if (src.hasCategory()) -// tgt.setCategory(convertCodeableConcept(src.getCategory())); -// if (src.hasService()) -// tgt.setService(convertCodeableConcept(src.getService())); -// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) -// tgt.addModifier(convertCodeableConcept(t)); -// if (src.hasFee()) -// tgt.setFee(convertMoney(src.getFee())); -// for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) -// tgt.addNoteNumber(t.getValue()); -// for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) -// tgt.addAdjudication(convertAdjudicationComponent(t)); -// for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemsDetailComponent t : src.getDetail()) -// tgt.addDetail(convertAddedItemsDetailComponent(t)); - return tgt; - } - -// public static org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemsDetailComponent convertAddedItemsDetailComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemsDetailComponent src) throws FHIRException { -// if (src == null) -// return null; -// org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemsDetailComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemsDetailComponent(); -// copyElement(src, tgt); -// if (src.hasRevenue()) -// tgt.setRevenue(convertCodeableConcept(src.getRevenue())); -// if (src.hasCategory()) -// tgt.setCategory(convertCodeableConcept(src.getCategory())); -// if (src.hasService()) -// tgt.setService(convertCodeableConcept(src.getService())); -// for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) -// tgt.addModifier(convertCodeableConcept(t)); -// if (src.hasFee()) -// tgt.setFee(convertMoney(src.getFee())); -// for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getNoteNumber()) -// tgt.addNoteNumber(t.getValue()); -// for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) -// tgt.addAdjudication(convertAdjudicationComponent(t)); -// return tgt; -// } - -// public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemsDetailComponent convertAddedItemsDetailComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AddedItemsDetailComponent src) throws FHIRException { -// if (src == null) -// return null; -// org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemsDetailComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.AddedItemsDetailComponent(); -// copyElement(src, tgt); -// if (src.hasRevenue()) -// tgt.setRevenue(convertCodeableConcept(src.getRevenue())); -// if (src.hasCategory()) -// tgt.setCategory(convertCodeableConcept(src.getCategory())); -// if (src.hasService()) -// tgt.setService(convertCodeableConcept(src.getService())); -// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) -// tgt.addModifier(convertCodeableConcept(t)); -// if (src.hasFee()) -// tgt.setFee(convertMoney(src.getFee())); -// for (org.hl7.fhir.r4.model.PositiveIntType t : src.getNoteNumber()) -// tgt.addNoteNumber(t.getValue()); -// for (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent t : src.getAdjudication()) -// tgt.addAdjudication(convertAdjudicationComponent(t)); -// return tgt; -// } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent convertPaymentComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PaymentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAdjustment()) - tgt.setAdjustment(convertMoney(src.getAdjustment())); - if (src.hasAdjustmentReason()) - tgt.setAdjustmentReason(convertCodeableConcept(src.getAdjustmentReason())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PaymentComponent convertPaymentComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PaymentComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.PaymentComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAdjustment()) - tgt.setAdjustment(convertMoney(src.getAdjustment())); - if (src.hasAdjustmentReason()) - tgt.setAdjustmentReason(convertCodeableConcept(src.getAdjustmentReason())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.NoteComponent convertNoteComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.NoteComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.NoteComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.NoteComponent(); - copyElement(src, tgt); - if (src.hasNumber()) - tgt.setNumber(src.getNumber()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - if (src.hasLanguage()) - tgt.setLanguage(convertCodeableConcept(src.getLanguage())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.NoteComponent convertNoteComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.NoteComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.NoteComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.NoteComponent(); - copyElement(src, tgt); - if (src.hasNumber()) - tgt.setNumber(src.getNumber()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - if (src.hasLanguage()) - tgt.setLanguage(convertCodeableConcept(src.getLanguage())); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent convertBenefitBalanceComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitBalanceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasSubCategory()) - tgt.setSubCategory(convertCodeableConcept(src.getSubCategory())); - if (src.hasExcluded()) - tgt.setExcluded(src.getExcluded()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasNetwork()) - tgt.setNetwork(convertCodeableConcept(src.getNetwork())); - if (src.hasUnit()) - tgt.setUnit(convertCodeableConcept(src.getUnit())); - if (src.hasTerm()) - tgt.setTerm(convertCodeableConcept(src.getTerm())); - for (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitComponent t : src.getFinancial()) - tgt.addFinancial(convertBenefitComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitBalanceComponent convertBenefitBalanceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitBalanceComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitBalanceComponent(); - copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasSubCategory()) - tgt.setSubCategory(convertCodeableConcept(src.getSubCategory())); - if (src.hasExcluded()) - tgt.setExcluded(src.getExcluded()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasNetwork()) - tgt.setNetwork(convertCodeableConcept(src.getNetwork())); - if (src.hasUnit()) - tgt.setUnit(convertCodeableConcept(src.getUnit())); - if (src.hasTerm()) - tgt.setTerm(convertCodeableConcept(src.getTerm())); - for (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent t : src.getFinancial()) - tgt.addFinancial(convertBenefitComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent convertBenefitComponent(org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent tgt = new org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAllowed()) - tgt.setAllowed(convertType(src.getAllowed())); - if (src.hasUsed()) - tgt.setUsed(convertType(src.getUsed())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitComponent convertBenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitComponent tgt = new org.hl7.fhir.dstu3.model.ExplanationOfBenefit.BenefitComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasAllowed()) - tgt.setAllowed(convertType(src.getAllowed())); - if (src.hasUsed()) - tgt.setUsed(convertType(src.getUsed())); - return tgt; + switch (src) { + case PARTIAL: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; + case COMPLETED: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; + case HEALTHUNKNOWN: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; + default: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; } +} public static org.hl7.fhir.r4.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.dstu3.model.FamilyMemberHistory src) throws FHIRException { if (src == null) @@ -14078,54 +9846,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PARTIAL: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; - case COMPLETED: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; - case HEALTHUNKNOWN: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; - default: return org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PARTIAL: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL; - case COMPLETED: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR; - case HEALTHUNKNOWN: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN; - default: return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.MALE; - case FEMALE: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.FEMALE; - case OTHER: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.OTHER; - case UNKNOWN: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.UNKNOWN; - default: return org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender convertAdministrativeGender(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MALE: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.MALE; - case FEMALE: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.FEMALE; - case OTHER: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.OTHER; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.NULL; - } -} - public static org.hl7.fhir.r4.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent convertFamilyMemberHistoryConditionComponent(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent src) throws FHIRException { if (src == null) return null; @@ -14158,6 +9878,74 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.CodeSystem.FilterOperator convertFilterOperator(org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUAL: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.EQUAL; + case ISA: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.ISA; + case DESCENDENTOF: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.DESCENDENTOF; + case ISNOTA: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.ISNOTA; + case REGEX: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.REGEX; + case IN: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.IN; + case NOTIN: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.NOTIN; + case GENERALIZES: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.GENERALIZES; + case EXISTS: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.EXISTS; + default: return org.hl7.fhir.r4.model.CodeSystem.FilterOperator.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator convertFilterOperator(org.hl7.fhir.r4.model.CodeSystem.FilterOperator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUAL: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.EQUAL; + case ISA: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.ISA; + case DESCENDENTOF: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.DESCENDENTOF; + case ISNOTA: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.ISNOTA; + case REGEX: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.REGEX; + case IN: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.IN; + case NOTIN: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.NOTIN; + case GENERALIZES: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.GENERALIZES; + case EXISTS: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.EXISTS; + default: return org.hl7.fhir.dstu3.model.CodeSystem.FilterOperator.NULL; + } +} + + private static org.hl7.fhir.r4.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUAL: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.EQUAL; + case ISA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISA; + case DESCENDENTOF: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.DESCENDENTOF; + case ISNOTA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISNOTA; + case REGEX: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.REGEX; + case IN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.IN; + case NOTIN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NOTIN; + case GENERALIZES: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.GENERALIZES; + case EXISTS: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.EXISTS; + default: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.r4.model.ValueSet.FilterOperator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQUAL: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EQUAL; + case ISA: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISA; + case DESCENDENTOF: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.DESCENDENTOF; + case ISNOTA: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISNOTA; + case REGEX: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.REGEX; + case IN: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.IN; + case NOTIN: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NOTIN; + case GENERALIZES: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.GENERALIZES; + case EXISTS: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EXISTS; + default: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NULL; + } +} + public static org.hl7.fhir.r4.model.Flag convertFlag(org.hl7.fhir.dstu3.model.Flag src) throws FHIRException { if (src == null) return null; @@ -14168,7 +9956,7 @@ public class VersionConvertor_30_40 { if (src.hasStatus()) tgt.setStatus(convertFlagStatus(src.getStatus())); if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.addCategory(convertCodeableConcept(src.getCategory())); if (src.hasCode()) tgt.setCode(convertCodeableConcept(src.getCode())); if (src.hasSubject()) @@ -14182,6 +9970,74 @@ public class VersionConvertor_30_40 { return tgt; } +// public static org.hl7.fhir.dstu3.model.DataElement convertDataElement(org.hl7.fhir.r4.model.DataElement src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.dstu3.model.DataElement tgt = new org.hl7.fhir.dstu3.model.DataElement(); +// copyDomainResource(src, tgt); +// if (src.hasUrl()) +// tgt.setUrl(src.getUrl()); +// for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) +// tgt.addIdentifier(convertIdentifier(t)); +// if (src.hasVersion()) +// tgt.setVersion(src.getVersion()); +// if (src.hasStatus()) +// tgt.setStatus(convertPublicationStatus(src.getStatus())); +// if (src.hasExperimental()) +// tgt.setExperimental(src.getExperimental()); +// if (src.hasDate()) +// tgt.setDate(src.getDate()); +// if (src.hasPublisher()) +// tgt.setPublisher(src.getPublisher()); +// if (src.hasName()) +// tgt.setName(src.getName()); +// if (src.hasTitle()) +// tgt.setTitle(src.getTitle()); +// for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) +// tgt.addContact(convertContactDetail(t)); +// for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) +// tgt.addUseContext(convertUsageContext(t)); +// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) +// tgt.addJurisdiction(convertCodeableConcept(t)); +// if (src.hasCopyright()) +// tgt.setCopyright(src.getCopyright()); +// if (src.hasStringency()) +// tgt.setStringency(convertDataElementStringency(src.getStringency())); +// for (org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent t : src.getMapping()) +// tgt.addMapping(convertDataElementMappingComponent(t)); +// for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) +// tgt.addElement(convertElementDefinition(t)); +// return tgt; +// } + +// private static org.hl7.fhir.r4.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.dstu3.model.DataElement.DataElementStringency src) throws FHIRException { +// if (src == null) +// return null; +// switch (src) { +// case COMPARABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.COMPARABLE; +// case FULLYSPECIFIED: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FULLYSPECIFIED; +// case EQUIVALENT: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.EQUIVALENT; +// case CONVERTABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.CONVERTABLE; +// case SCALEABLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.SCALEABLE; +// case FLEXIBLE: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.FLEXIBLE; +// default: return org.hl7.fhir.r4.model.DataElement.DataElementStringency.NULL; +// } +//} +// +// private static org.hl7.fhir.dstu3.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.r4.model.DataElement.DataElementStringency src) throws FHIRException { +// if (src == null) +// return null; +// switch (src) { +// case COMPARABLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.COMPARABLE; +// case FULLYSPECIFIED: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.FULLYSPECIFIED; +// case EQUIVALENT: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.EQUIVALENT; +// case CONVERTABLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.CONVERTABLE; +// case SCALEABLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.SCALEABLE; +// case FLEXIBLE: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.FLEXIBLE; +// default: return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.NULL; +// } +//} + public static org.hl7.fhir.dstu3.model.Flag convertFlag(org.hl7.fhir.r4.model.Flag src) throws FHIRException { if (src == null) return null; @@ -14192,7 +10048,7 @@ public class VersionConvertor_30_40 { if (src.hasStatus()) tgt.setStatus(convertFlagStatus(src.getStatus())); if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); + tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep())); if (src.hasCode()) tgt.setCode(convertCodeableConcept(src.getCode())); if (src.hasSubject()) @@ -14206,6 +10062,22 @@ public class VersionConvertor_30_40 { return tgt; } +// public static org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.r4.model.DataElement.DataElementMappingComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent(); +// copyElement(src, tgt); +// if (src.hasIdentity()) +// tgt.setIdentity(src.getIdentity()); +// if (src.hasUri()) +// tgt.setUri(src.getUri()); +// if (src.hasName()) +// tgt.setName(src.getName()); +// if (src.hasComment()) +// tgt.setComment(src.getComment()); +// return tgt; +// } + private static org.hl7.fhir.r4.model.Flag.FlagStatus convertFlagStatus(org.hl7.fhir.dstu3.model.Flag.FlagStatus src) throws FHIRException { if (src == null) return null; @@ -14228,6 +10100,26 @@ public class VersionConvertor_30_40 { } } + public static org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent(); + copyElement(src, tgt); + if (src.hasContent()) + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.r4.model.Contract.FriendlyLanguageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent(); + copyElement(src, tgt); + if (src.hasContent()) + tgt.setContent(convertType(src.getContent())); + return tgt; + } + public static org.hl7.fhir.r4.model.Goal convertGoal(org.hl7.fhir.dstu3.model.Goal src) throws FHIRException { if (src == null) return null; @@ -14374,6 +10266,30 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule convertGraphCompartmentRule(org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case IDENTICAL: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.IDENTICAL; + case MATCHING: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.MATCHING; + case DIFFERENT: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.DIFFERENT; + case CUSTOM: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.CUSTOM; + default: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule convertGraphCompartmentRule(org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case IDENTICAL: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.IDENTICAL; + case MATCHING: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.MATCHING; + case DIFFERENT: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.DIFFERENT; + case CUSTOM: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.CUSTOM; + default: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.NULL; + } +} + public static org.hl7.fhir.r4.model.GraphDefinition convertGraphDefinition(org.hl7.fhir.dstu3.model.GraphDefinition src) throws FHIRException { if (src == null) return null; @@ -14490,38 +10406,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent convertGraphDefinitionLinkTargetComponent(org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); - for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) - tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); - for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) - tgt.addLink(convertGraphDefinitionLinkComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent convertGraphDefinitionLinkTargetComponent(org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(src.getProfile()); - for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) - tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); - for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) - tgt.addLink(convertGraphDefinitionLinkComponent(t)); - return tgt; - } - public static org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent convertGraphDefinitionLinkTargetCompartmentComponent(org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent src) throws FHIRException { if (src == null) return null; @@ -14554,55 +10438,37 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode convertCompartmentCode(org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode src) throws FHIRException { + public static org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent convertGraphDefinitionLinkTargetComponent(org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PATIENT: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.PATIENT; - case ENCOUNTER: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.ENCOUNTER; - case RELATEDPERSON: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.RELATEDPERSON; - case PRACTITIONER: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.PRACTITIONER; - case DEVICE: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.DEVICE; - default: return org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode.NULL; + org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(src.getProfile()); + for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) + tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); + for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) + tgt.addLink(convertGraphDefinitionLinkComponent(t)); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode convertCompartmentCode(org.hl7.fhir.r4.model.GraphDefinition.CompartmentCode src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent convertGraphDefinitionLinkTargetComponent(org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PATIENT: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.PATIENT; - case ENCOUNTER: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.ENCOUNTER; - case RELATEDPERSON: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.RELATEDPERSON; - case PRACTITIONER: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.PRACTITIONER; - case DEVICE: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.DEVICE; - default: return org.hl7.fhir.dstu3.model.GraphDefinition.CompartmentCode.NULL; + org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(src.getProfile()); + for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) + tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); + for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) + tgt.addLink(convertGraphDefinitionLinkComponent(t)); + return tgt; } -} - - private static org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule convertGraphCompartmentRule(org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case IDENTICAL: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.IDENTICAL; - case MATCHING: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.MATCHING; - case DIFFERENT: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.DIFFERENT; - case CUSTOM: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.CUSTOM; - default: return org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule convertGraphCompartmentRule(org.hl7.fhir.r4.model.GraphDefinition.GraphCompartmentRule src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case IDENTICAL: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.IDENTICAL; - case MATCHING: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.MATCHING; - case DIFFERENT: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.DIFFERENT; - case CUSTOM: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.CUSTOM; - default: return org.hl7.fhir.dstu3.model.GraphDefinition.GraphCompartmentRule.NULL; - } -} public static org.hl7.fhir.r4.model.Group convertGroup(org.hl7.fhir.dstu3.model.Group src) throws FHIRException { if (src == null) @@ -14656,34 +10522,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Group.GroupType convertGroupType(org.hl7.fhir.dstu3.model.Group.GroupType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSON: return org.hl7.fhir.r4.model.Group.GroupType.PERSON; - case ANIMAL: return org.hl7.fhir.r4.model.Group.GroupType.ANIMAL; - case PRACTITIONER: return org.hl7.fhir.r4.model.Group.GroupType.PRACTITIONER; - case DEVICE: return org.hl7.fhir.r4.model.Group.GroupType.DEVICE; - case MEDICATION: return org.hl7.fhir.r4.model.Group.GroupType.MEDICATION; - case SUBSTANCE: return org.hl7.fhir.r4.model.Group.GroupType.SUBSTANCE; - default: return org.hl7.fhir.r4.model.Group.GroupType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Group.GroupType convertGroupType(org.hl7.fhir.r4.model.Group.GroupType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PERSON: return org.hl7.fhir.dstu3.model.Group.GroupType.PERSON; - case ANIMAL: return org.hl7.fhir.dstu3.model.Group.GroupType.ANIMAL; - case PRACTITIONER: return org.hl7.fhir.dstu3.model.Group.GroupType.PRACTITIONER; - case DEVICE: return org.hl7.fhir.dstu3.model.Group.GroupType.DEVICE; - case MEDICATION: return org.hl7.fhir.dstu3.model.Group.GroupType.MEDICATION; - case SUBSTANCE: return org.hl7.fhir.dstu3.model.Group.GroupType.SUBSTANCE; - default: return org.hl7.fhir.dstu3.model.Group.GroupType.NULL; - } -} - public static org.hl7.fhir.r4.model.Group.GroupCharacteristicComponent convertGroupCharacteristicComponent(org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent src) throws FHIRException { if (src == null) return null; @@ -14716,6 +10554,70 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.Coverage.GroupComponent convertGroupComponent(org.hl7.fhir.dstu3.model.Coverage.GroupComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Coverage.GroupComponent tgt = new org.hl7.fhir.r4.model.Coverage.GroupComponent(); + copyElement(src, tgt); + if (src.hasGroup()) + tgt.setGroup(src.getGroup()); + if (src.hasGroupDisplay()) + tgt.setGroupDisplay(src.getGroupDisplay()); + if (src.hasSubGroup()) + tgt.setSubGroup(src.getSubGroup()); + if (src.hasSubGroupDisplay()) + tgt.setSubGroupDisplay(src.getSubGroupDisplay()); + if (src.hasPlan()) + tgt.setPlan(src.getPlan()); + if (src.hasPlanDisplay()) + tgt.setPlanDisplay(src.getPlanDisplay()); + if (src.hasSubPlan()) + tgt.setSubPlan(src.getSubPlan()); + if (src.hasSubPlanDisplay()) + tgt.setSubPlanDisplay(src.getSubPlanDisplay()); + if (src.hasClass_()) + tgt.setClass_(src.getClass_()); + if (src.hasClassDisplay()) + tgt.setClassDisplay(src.getClassDisplay()); + if (src.hasSubClass()) + tgt.setSubClass(src.getSubClass()); + if (src.hasSubClassDisplay()) + tgt.setSubClassDisplay(src.getSubClassDisplay()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Coverage.GroupComponent convertGroupComponent(org.hl7.fhir.r4.model.Coverage.GroupComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Coverage.GroupComponent tgt = new org.hl7.fhir.dstu3.model.Coverage.GroupComponent(); + copyElement(src, tgt); + if (src.hasGroup()) + tgt.setGroup(src.getGroup()); + if (src.hasGroupDisplay()) + tgt.setGroupDisplay(src.getGroupDisplay()); + if (src.hasSubGroup()) + tgt.setSubGroup(src.getSubGroup()); + if (src.hasSubGroupDisplay()) + tgt.setSubGroupDisplay(src.getSubGroupDisplay()); + if (src.hasPlan()) + tgt.setPlan(src.getPlan()); + if (src.hasPlanDisplay()) + tgt.setPlanDisplay(src.getPlanDisplay()); + if (src.hasSubPlan()) + tgt.setSubPlan(src.getSubPlan()); + if (src.hasSubPlanDisplay()) + tgt.setSubPlanDisplay(src.getSubPlanDisplay()); + if (src.hasClass_()) + tgt.setClass_(src.getClass_()); + if (src.hasClassDisplay()) + tgt.setClassDisplay(src.getClassDisplay()); + if (src.hasSubClass()) + tgt.setSubClass(src.getSubClass()); + if (src.hasSubClassDisplay()) + tgt.setSubClassDisplay(src.getSubClassDisplay()); + return tgt; + } + public static org.hl7.fhir.r4.model.Group.GroupMemberComponent convertGroupMemberComponent(org.hl7.fhir.dstu3.model.Group.GroupMemberComponent src) throws FHIRException { if (src == null) return null; @@ -14744,103 +10646,135 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.GuidanceResponse convertGuidanceResponse(org.hl7.fhir.dstu3.model.GuidanceResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.GuidanceResponse tgt = new org.hl7.fhir.r4.model.GuidanceResponse(); - copyDomainResource(src, tgt); - if (src.hasRequestId()) - tgt.setRequestId(src.getRequestId()); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasModule()) - tgt.setModule(convertReference(src.getModule())); - if (src.hasStatus()) - tgt.setStatus(convertGuidanceResponseStatus(src.getStatus())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasOccurrenceDateTime()) - tgt.setOccurrenceDateTime(src.getOccurrenceDateTime()); - if (src.hasPerformer()) - tgt.setPerformer(convertReference(src.getPerformer())); - if (src.hasReason()) - tgt.setReason(convertType(src.getReason())); - for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEvaluationMessage()) - tgt.addEvaluationMessage(convertReference(t)); - if (src.hasOutputParameters()) - tgt.setOutputParameters(convertReference(src.getOutputParameters())); - if (src.hasResult()) - tgt.setResult(convertReference(src.getResult())); - for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getDataRequirement()) - tgt.addDataRequirement(convertDataRequirement(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.GuidanceResponse convertGuidanceResponse(org.hl7.fhir.r4.model.GuidanceResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.GuidanceResponse tgt = new org.hl7.fhir.dstu3.model.GuidanceResponse(); - copyDomainResource(src, tgt); - if (src.hasRequestId()) - tgt.setRequestId(src.getRequestId()); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasModule()) - tgt.setModule(convertReference(src.getModule())); - if (src.hasStatus()) - tgt.setStatus(convertGuidanceResponseStatus(src.getStatus())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasOccurrenceDateTime()) - tgt.setOccurrenceDateTime(src.getOccurrenceDateTime()); - if (src.hasPerformer()) - tgt.setPerformer(convertReference(src.getPerformer())); - if (src.hasReason()) - tgt.setReason(convertType(src.getReason())); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getEvaluationMessage()) - tgt.addEvaluationMessage(convertReference(t)); - if (src.hasOutputParameters()) - tgt.setOutputParameters(convertReference(src.getOutputParameters())); - if (src.hasResult()) - tgt.setResult(convertReference(src.getResult())); - for (org.hl7.fhir.r4.model.DataRequirement t : src.getDataRequirement()) - tgt.addDataRequirement(convertDataRequirement(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus convertGuidanceResponseStatus(org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.Group.GroupType convertGroupType(org.hl7.fhir.dstu3.model.Group.GroupType src) throws FHIRException { if (src == null) return null; switch (src) { - case SUCCESS: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.SUCCESS; - case DATAREQUESTED: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.DATAREQUESTED; - case DATAREQUIRED: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.DATAREQUIRED; - case INPROGRESS: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.INPROGRESS; - case FAILURE: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.FAILURE; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus.NULL; + case PERSON: return org.hl7.fhir.r4.model.Group.GroupType.PERSON; + case ANIMAL: return org.hl7.fhir.r4.model.Group.GroupType.ANIMAL; + case PRACTITIONER: return org.hl7.fhir.r4.model.Group.GroupType.PRACTITIONER; + case DEVICE: return org.hl7.fhir.r4.model.Group.GroupType.DEVICE; + case MEDICATION: return org.hl7.fhir.r4.model.Group.GroupType.MEDICATION; + case SUBSTANCE: return org.hl7.fhir.r4.model.Group.GroupType.SUBSTANCE; + default: return org.hl7.fhir.r4.model.Group.GroupType.NULL; } } - private static org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus convertGuidanceResponseStatus(org.hl7.fhir.r4.model.GuidanceResponse.GuidanceResponseStatus src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Group.GroupType convertGroupType(org.hl7.fhir.r4.model.Group.GroupType src) throws FHIRException { if (src == null) return null; switch (src) { - case SUCCESS: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.SUCCESS; - case DATAREQUESTED: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.DATAREQUESTED; - case DATAREQUIRED: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.DATAREQUIRED; - case INPROGRESS: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.INPROGRESS; - case FAILURE: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.FAILURE; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.GuidanceResponse.GuidanceResponseStatus.NULL; + case PERSON: return org.hl7.fhir.dstu3.model.Group.GroupType.PERSON; + case ANIMAL: return org.hl7.fhir.dstu3.model.Group.GroupType.ANIMAL; + case PRACTITIONER: return org.hl7.fhir.dstu3.model.Group.GroupType.PRACTITIONER; + case DEVICE: return org.hl7.fhir.dstu3.model.Group.GroupType.DEVICE; + case MEDICATION: return org.hl7.fhir.dstu3.model.Group.GroupType.MEDICATION; + case SUBSTANCE: return org.hl7.fhir.dstu3.model.Group.GroupType.SUBSTANCE; + default: return org.hl7.fhir.dstu3.model.Group.GroupType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Account.GuarantorComponent convertGuarantorComponent(org.hl7.fhir.dstu3.model.Account.GuarantorComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Account.GuarantorComponent tgt = new org.hl7.fhir.r4.model.Account.GuarantorComponent(); + copyElement(src, tgt); + if (src.hasParty()) + tgt.setParty(convertReference(src.getParty())); + if (src.hasOnHold()) + tgt.setOnHold(src.getOnHold()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Account.GuarantorComponent convertGuarantorComponent(org.hl7.fhir.r4.model.Account.GuarantorComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Account.GuarantorComponent tgt = new org.hl7.fhir.dstu3.model.Account.GuarantorComponent(); + copyElement(src, tgt); + if (src.hasParty()) + tgt.setParty(convertReference(src.getParty())); + if (src.hasOnHold()) + tgt.setOnHold(src.getOnHold()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + private static org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REFERENCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.REFERENCE; + case INCLUSION: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.INCLUSION; + default: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REFERENCE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.REFERENCE; + case INCLUSION: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.INCLUSION; + default: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.NULL; + } +} + + private static org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PAGE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.PAGE; + case EXAMPLE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.EXAMPLE; + case LIST: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.LIST; + case INCLUDE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.INCLUDE; + case DIRECTORY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DIRECTORY; + case DICTIONARY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DICTIONARY; + case TOC: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.TOC; + case RESOURCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.RESOURCE; + default: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PAGE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.PAGE; + case EXAMPLE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.EXAMPLE; + case LIST: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.LIST; + case INCLUDE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.INCLUDE; + case DIRECTORY: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DIRECTORY; + case DICTIONARY: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DICTIONARY; + case TOC: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.TOC; + case RESOURCE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.RESOURCE; + default: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.NULL; + } +} + + private static org.hl7.fhir.r4.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case GET: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.GET; + case POST: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST; + case PUT: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT; + case DELETE: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.DELETE; + default: return org.hl7.fhir.r4.model.Bundle.HTTPVerb.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.r4.model.Bundle.HTTPVerb src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case GET: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.GET; + case POST: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.POST; + case PUT: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.PUT; + case DELETE: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.DELETE; + default: return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.NULL; } } @@ -14988,36 +10922,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.MON; - case TUE: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.TUE; - case WED: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.WED; - case THU: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.THU; - case FRI: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.FRI; - case SAT: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SAT; - case SUN: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.SUN; - default: return org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.MON; - case TUE: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.TUE; - case WED: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.WED; - case THU: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.THU; - case FRI: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.FRI; - case SAT: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.SAT; - case SUN: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.SUN; - default: return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.NULL; - } -} - public static org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException { if (src == null) return null; @@ -15042,6 +10946,150 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.HumanName convertHumanName(org.hl7.fhir.dstu3.model.HumanName src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.HumanName tgt = new org.hl7.fhir.r4.model.HumanName(); + copyElement(src, tgt); + if (src.hasUse()) + tgt.setUse(convertNameUse(src.getUse())); + if (src.hasText()) + tgt.setText(src.getText()); + if (src.hasFamily()) + tgt.setFamily(src.getFamily()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getGiven()) + tgt.addGiven(t.getValue()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getPrefix()) + tgt.addPrefix(t.getValue()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getSuffix()) + tgt.addSuffix(t.getValue()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.HumanName convertHumanName(org.hl7.fhir.r4.model.HumanName src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.HumanName tgt = new org.hl7.fhir.dstu3.model.HumanName(); + copyElement(src, tgt); + if (src.hasUse()) + tgt.setUse(convertNameUse(src.getUse())); + if (src.hasText()) + tgt.setText(src.getText()); + if (src.hasFamily()) + tgt.setFamily(src.getFamily()); + for (org.hl7.fhir.r4.model.StringType t : src.getGiven()) + tgt.addGiven(t.getValue()); + for (org.hl7.fhir.r4.model.StringType t : src.getPrefix()) + tgt.addPrefix(t.getValue()); + for (org.hl7.fhir.r4.model.StringType t : src.getSuffix()) + tgt.addSuffix(t.getValue()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.dstu3.model.IdType src) throws FHIRException { + org.hl7.fhir.r4.model.IdType tgt = new org.hl7.fhir.r4.model.IdType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.IdType convertId(org.hl7.fhir.r4.model.IdType src) throws FHIRException { + org.hl7.fhir.dstu3.model.IdType tgt = new org.hl7.fhir.dstu3.model.IdType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Identifier tgt = new org.hl7.fhir.r4.model.Identifier(); + copyElement(src, tgt); + if (src.hasUse()) + tgt.setUse(convertIdentifierUse(src.getUse())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasAssigner()) + tgt.setAssigner(convertReference(src.getAssigner())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.r4.model.Identifier src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier(); + copyElement(src, tgt); + if (src.hasUse()) + tgt.setUse(convertIdentifierUse(src.getUse())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + if (src.hasAssigner()) + tgt.setAssigner(convertReference(src.getAssigner())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.dstu3.model.Identifier.IdentifierUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case USUAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.USUAL; + case OFFICIAL: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.OFFICIAL; + case TEMP: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.TEMP; + case SECONDARY: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.SECONDARY; + default: return org.hl7.fhir.r4.model.Identifier.IdentifierUse.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Identifier.IdentifierUse convertIdentifierUse(org.hl7.fhir.r4.model.Identifier.IdentifierUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case USUAL: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.USUAL; + case OFFICIAL: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.OFFICIAL; + case TEMP: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.TEMP; + case SECONDARY: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.SECONDARY; + default: return org.hl7.fhir.dstu3.model.Identifier.IdentifierUse.NULL; + } +} + + private static org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LEVEL1: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL1; + case LEVEL2: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL2; + case LEVEL3: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL3; + case LEVEL4: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL4; + default: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LEVEL1: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL1; + case LEVEL2: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL2; + case LEVEL3: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL3; + case LEVEL4: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL4; + default: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.NULL; + } +} + public static org.hl7.fhir.r4.model.ImagingManifest convertImagingManifest(org.hl7.fhir.dstu3.model.ImagingManifest src) throws FHIRException { if (src == null) return null; @@ -15082,90 +11130,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.ImagingManifest.StudyComponent convertStudyComponent(org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ImagingManifest.StudyComponent tgt = new org.hl7.fhir.r4.model.ImagingManifest.StudyComponent(); - copyElement(src, tgt); - if (src.hasUid()) - tgt.setUid(src.getUid()); - if (src.hasImagingStudy()) - tgt.setImagingStudy(convertReference(src.getImagingStudy())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) - tgt.addEndpoint(convertReference(t)); - for (org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent t : src.getSeries()) - tgt.addSeries(convertSeriesComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent convertStudyComponent(org.hl7.fhir.r4.model.ImagingManifest.StudyComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent tgt = new org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent(); - copyElement(src, tgt); - if (src.hasUid()) - tgt.setUid(src.getUid()); - if (src.hasImagingStudy()) - tgt.setImagingStudy(convertReference(src.getImagingStudy())); - for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) - tgt.addEndpoint(convertReference(t)); - for (org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent t : src.getSeries()) - tgt.addSeries(convertSeriesComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent convertSeriesComponent(org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent tgt = new org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent(); - copyElement(src, tgt); - if (src.hasUid()) - tgt.setUid(src.getUid()); - for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) - tgt.addEndpoint(convertReference(t)); - for (org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent t : src.getInstance()) - tgt.addInstance(convertInstanceComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent convertSeriesComponent(org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent tgt = new org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent(); - copyElement(src, tgt); - if (src.hasUid()) - tgt.setUid(src.getUid()); - for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) - tgt.addEndpoint(convertReference(t)); - for (org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent t : src.getInstance()) - tgt.addInstance(convertInstanceComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent convertInstanceComponent(org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent tgt = new org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent(); - copyElement(src, tgt); - if (src.hasSopClass()) - tgt.setSopClass(src.getSopClass()); - if (src.hasUid()) - tgt.setUid(src.getUid()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent convertInstanceComponent(org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent tgt = new org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent(); - copyElement(src, tgt); - if (src.hasSopClass()) - tgt.setSopClass(src.getSopClass()); - if (src.hasUid()) - tgt.setUid(src.getUid()); - return tgt; - } - public static org.hl7.fhir.r4.model.ImagingStudy convertImagingStudy(org.hl7.fhir.dstu3.model.ImagingStudy src) throws FHIRException { if (src == null) return null; @@ -15258,30 +11222,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ONLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.ONLINE; - case OFFLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.OFFLINE; - case NEARLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NEARLINE; - case UNAVAILABLE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; - default: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ONLINE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.ONLINE; - case OFFLINE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.OFFLINE; - case NEARLINE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.NEARLINE; - case UNAVAILABLE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; - default: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.NULL; - } -} - public static org.hl7.fhir.r4.model.ImagingStudy.ImagingStudySeriesComponent convertImagingStudySeriesComponent(org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent src) throws FHIRException { if (src == null) return null; @@ -15478,25 +11418,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Immunization.ImmunizationStatus convertImmunizationStatus(org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case COMPLETED: return org.hl7.fhir.r4.model.Immunization.ImmunizationStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Immunization.ImmunizationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Immunization.ImmunizationStatus.NULL; + org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent tgt = new org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) + tgt.addReason(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven()) + tgt.addReasonNotGiven(convertCodeableConcept(t)); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus convertImmunizationStatus(org.hl7.fhir.r4.model.Immunization.ImmunizationStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case COMPLETED: return org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.NULL; + org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) + tgt.addReason(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonNotGiven()) + tgt.addReasonNotGiven(convertCodeableConcept(t)); + return tgt; } -} public static org.hl7.fhir.r4.model.Immunization.ImmunizationPractitionerComponent convertImmunizationPractitionerComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationPractitionerComponent src) throws FHIRException { if (src == null) @@ -15522,30 +11466,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent tgt = new org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven()) - tgt.addReasonNotGiven(convertCodeableConcept(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonNotGiven()) - tgt.addReasonNotGiven(convertCodeableConcept(t)); - return tgt; - } - public static org.hl7.fhir.r4.model.Immunization.ImmunizationReactionComponent convertImmunizationReactionComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent src) throws FHIRException { if (src == null) return null; @@ -15574,54 +11494,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent(); - copyElement(src, tgt); - if (src.hasDoseSequence()) - tgt.setDoseSequence(src.getDoseSequence()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasAuthority()) - tgt.setAuthority(convertReference(src.getAuthority())); - if (src.hasSeries()) - tgt.setSeries(src.getSeries()); - if (src.hasSeriesDoses()) - tgt.setSeriesDoses(src.getSeriesDoses()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTargetDisease()) - tgt.addTargetDisease(convertCodeableConcept(t)); - if (src.hasDoseStatus()) - tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); - if (src.hasDoseStatusReason()) - tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent(); - copyElement(src, tgt); - if (src.hasDoseSequence()) - tgt.setDoseSequence(src.getDoseSequence()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasAuthority()) - tgt.setAuthority(convertReference(src.getAuthority())); - if (src.hasSeries()) - tgt.setSeries(src.getSeries()); - if (src.hasSeriesDoses()) - tgt.setSeriesDoses(src.getSeriesDoses()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTargetDisease()) - tgt.addTargetDisease(convertCodeableConcept(t)); - if (src.hasDoseStatus()) - tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); - if (src.hasDoseStatusReason()) - tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); - return tgt; - } - public static org.hl7.fhir.r4.model.ImmunizationRecommendation convertImmunizationRecommendation(org.hl7.fhir.dstu3.model.ImmunizationRecommendation src) throws FHIRException { if (src == null) return null; @@ -15758,6 +11630,74 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.Immunization.ImmunizationStatus convertImmunizationStatus(org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case COMPLETED: return org.hl7.fhir.r4.model.Immunization.ImmunizationStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Immunization.ImmunizationStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Immunization.ImmunizationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus convertImmunizationStatus(org.hl7.fhir.r4.model.Immunization.ImmunizationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case COMPLETED: return org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent(); + copyElement(src, tgt); + if (src.hasDoseSequence()) + tgt.setDoseSequence(src.getDoseSequence()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasAuthority()) + tgt.setAuthority(convertReference(src.getAuthority())); + if (src.hasSeries()) + tgt.setSeries(src.getSeries()); + if (src.hasSeriesDoses()) + tgt.setSeriesDoses(src.getSeriesDoses()); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTargetDisease()) + tgt.addTargetDisease(convertCodeableConcept(t)); + if (src.hasDoseStatus()) + tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); + if (src.hasDoseStatusReason()) + tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.r4.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent(); + copyElement(src, tgt); + if (src.hasDoseSequence()) + tgt.setDoseSequence(src.getDoseSequence()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasAuthority()) + tgt.setAuthority(convertReference(src.getAuthority())); + if (src.hasSeries()) + tgt.setSeries(src.getSeries()); + if (src.hasSeriesDoses()) + tgt.setSeriesDoses(src.getSeriesDoses()); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTargetDisease()) + tgt.addTargetDisease(convertCodeableConcept(t)); + if (src.hasDoseStatus()) + tgt.setDoseStatus(convertCodeableConcept(src.getDoseStatus())); + if (src.hasDoseStatusReason()) + tgt.setDoseStatusReason(convertCodeableConcept(src.getDoseStatusReason())); + return tgt; + } + public static org.hl7.fhir.r4.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.dstu3.model.ImplementationGuide src) throws FHIRException { if (src == null) return null; @@ -15870,25 +11810,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { + public static org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case REFERENCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.REFERENCE; - case INCLUSION: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.INCLUSION; - default: return org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType.NULL; + org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.r4.model.ImplementationGuide.GuideDependencyType src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case REFERENCE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.REFERENCE; - case INCLUSION: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.INCLUSION; - default: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.NULL; + org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); + return tgt; } -} public static org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException { if (src == null) @@ -15958,30 +11902,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(src.getType()); - if (src.hasProfile()) - tgt.setProfile(convertReference(src.getProfile())); - return tgt; - } - public static org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException { if (src == null) return null; @@ -16026,158 +11946,408 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + private static org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability src) throws FHIRException { if (src == null) return null; switch (src) { - case PAGE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.PAGE; - case EXAMPLE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.EXAMPLE; - case LIST: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.LIST; - case INCLUDE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.INCLUDE; - case DIRECTORY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DIRECTORY; - case DICTIONARY: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.DICTIONARY; - case TOC: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.TOC; - case RESOURCE: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.RESOURCE; - default: return org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind.NULL; + case ONLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.ONLINE; + case OFFLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.OFFLINE; + case NEARLINE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NEARLINE; + case UNAVAILABLE: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; + default: return org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability.NULL; } } - private static org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.r4.model.ImplementationGuide.GuidePageKind src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.r4.model.ImagingStudy.InstanceAvailability src) throws FHIRException { if (src == null) return null; switch (src) { - case PAGE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.PAGE; - case EXAMPLE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.EXAMPLE; - case LIST: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.LIST; - case INCLUDE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.INCLUDE; - case DIRECTORY: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DIRECTORY; - case DICTIONARY: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DICTIONARY; - case TOC: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.TOC; - case RESOURCE: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.RESOURCE; - default: return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.NULL; + case ONLINE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.ONLINE; + case OFFLINE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.OFFLINE; + case NEARLINE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.NEARLINE; + case UNAVAILABLE: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.UNAVAILABLE; + default: return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.NULL; } } - public static org.hl7.fhir.r4.model.Library convertLibrary(org.hl7.fhir.dstu3.model.Library src) throws FHIRException { + public static org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent convertInstanceComponent(org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Library tgt = new org.hl7.fhir.r4.model.Library(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); - if (src.hasEffectivePeriod()) - tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod())); - for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTopic()) - tgt.addTopic(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) - tgt.addContributor(convertContributor(t)); - for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) - tgt.addRelatedArtifact(convertRelatedArtifact(t)); - for (org.hl7.fhir.dstu3.model.ParameterDefinition t : src.getParameter()) - tgt.addParameter(convertParameterDefinition(t)); - for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getDataRequirement()) - tgt.addDataRequirement(convertDataRequirement(t)); - for (org.hl7.fhir.dstu3.model.Attachment t : src.getContent()) - tgt.addContent(convertAttachment(t)); + org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent tgt = new org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent(); + copyElement(src, tgt); + if (src.hasSopClass()) + tgt.setSopClass(src.getSopClass()); + if (src.hasUid()) + tgt.setUid(src.getUid()); return tgt; } - public static org.hl7.fhir.dstu3.model.Library convertLibrary(org.hl7.fhir.r4.model.Library src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent convertInstanceComponent(org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Library tgt = new org.hl7.fhir.dstu3.model.Library(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); - if (src.hasEffectivePeriod()) - tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod())); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic()) - tgt.addTopic(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Contributor t : src.getContributor()) - tgt.addContributor(convertContributor(t)); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) - tgt.addRelatedArtifact(convertRelatedArtifact(t)); - for (org.hl7.fhir.r4.model.ParameterDefinition t : src.getParameter()) - tgt.addParameter(convertParameterDefinition(t)); - for (org.hl7.fhir.r4.model.DataRequirement t : src.getDataRequirement()) - tgt.addDataRequirement(convertDataRequirement(t)); - for (org.hl7.fhir.r4.model.Attachment t : src.getContent()) - tgt.addContent(convertAttachment(t)); + org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent tgt = new org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent(); + copyElement(src, tgt); + if (src.hasSopClass()) + tgt.setSopClass(src.getSopClass()); + if (src.hasUid()) + tgt.setUid(src.getUid()); return tgt; } + public static org.hl7.fhir.r4.model.InstantType convertInstant(org.hl7.fhir.dstu3.model.InstantType src) throws FHIRException { + org.hl7.fhir.r4.model.InstantType tgt = new org.hl7.fhir.r4.model.InstantType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.InstantType convertInstant(org.hl7.fhir.r4.model.InstantType src) throws FHIRException { + org.hl7.fhir.dstu3.model.InstantType tgt = new org.hl7.fhir.dstu3.model.InstantType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.Claim.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.dstu3.model.Claim.InsuranceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Claim.InsuranceComponent tgt = new org.hl7.fhir.r4.model.Claim.InsuranceComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasFocal()) + tgt.setFocal(src.getFocal()); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasBusinessArrangement()) + tgt.setBusinessArrangement(src.getBusinessArrangement()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getPreAuthRef()) + tgt.addPreAuthRef(t.getValue()); + if (src.hasClaimResponse()) + tgt.setClaimResponse(convertReference(src.getClaimResponse())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Claim.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.r4.model.Claim.InsuranceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Claim.InsuranceComponent tgt = new org.hl7.fhir.dstu3.model.Claim.InsuranceComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasFocal()) + tgt.setFocal(src.getFocal()); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasBusinessArrangement()) + tgt.setBusinessArrangement(src.getBusinessArrangement()); + for (org.hl7.fhir.r4.model.StringType t : src.getPreAuthRef()) + tgt.addPreAuthRef(t.getValue()); + if (src.hasClaimResponse()) + tgt.setClaimResponse(convertReference(src.getClaimResponse())); + return tgt; + } + + public static org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent tgt = new org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent(); + copyElement(src, tgt); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasContract()) + tgt.setContract(convertReference(src.getContract())); + for (org.hl7.fhir.dstu3.model.EligibilityResponse.BenefitsComponent t : src.getBenefitBalance()) + tgt.addBenefitBalance(convertBenefitsComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent convertInsuranceComponent(org.hl7.fhir.r4.model.EligibilityResponse.InsuranceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent tgt = new org.hl7.fhir.dstu3.model.EligibilityResponse.InsuranceComponent(); + copyElement(src, tgt); + if (src.hasCoverage()) + tgt.setCoverage(convertReference(src.getCoverage())); + if (src.hasContract()) + tgt.setContract(convertReference(src.getContract())); + for (org.hl7.fhir.r4.model.EligibilityResponse.BenefitsComponent t : src.getBenefitBalance()) + tgt.addBenefitBalance(convertBenefitsComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.IntegerType convertInteger(org.hl7.fhir.dstu3.model.IntegerType src) throws FHIRException { + org.hl7.fhir.r4.model.IntegerType tgt = new org.hl7.fhir.r4.model.IntegerType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.IntegerType convertInteger(org.hl7.fhir.r4.model.IntegerType src) throws FHIRException { + org.hl7.fhir.dstu3.model.IntegerType tgt = new org.hl7.fhir.dstu3.model.IntegerType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + private static org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case FATAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.FATAL; + case ERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.ERROR; + case WARNING: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.WARNING; + case INFORMATION: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.INFORMATION; + default: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case FATAL: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.FATAL; + case ERROR: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.ERROR; + case WARNING: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.WARNING; + case INFORMATION: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.INFORMATION; + default: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.NULL; + } +} + + private static org.hl7.fhir.r4.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVALID; + case STRUCTURE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.STRUCTURE; + case REQUIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.REQUIRED; + case VALUE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.VALUE; + case INVARIANT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVARIANT; + case SECURITY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SECURITY; + case LOGIN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOGIN; + case UNKNOWN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.UNKNOWN; + case EXPIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXPIRED; + case FORBIDDEN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.FORBIDDEN; + case SUPPRESSED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SUPPRESSED; + case PROCESSING: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.PROCESSING; + case NOTSUPPORTED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTSUPPORTED; + case DUPLICATE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.DUPLICATE; + case NOTFOUND: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTFOUND; + case TOOLONG: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOLONG; + case CODEINVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CODEINVALID; + case EXTENSION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXTENSION; + case TOOCOSTLY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOCOSTLY; + case BUSINESSRULE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.BUSINESSRULE; + case CONFLICT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CONFLICT; + case INCOMPLETE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INCOMPLETE; + case TRANSIENT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TRANSIENT; + case LOCKERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOCKERROR; + case NOSTORE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOSTORE; + case EXCEPTION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXCEPTION; + case TIMEOUT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TIMEOUT; + case THROTTLED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.THROTTLED; + case INFORMATIONAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INFORMATIONAL; + default: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.r4.model.OperationOutcome.IssueType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INVALID: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INVALID; + case STRUCTURE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.STRUCTURE; + case REQUIRED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.REQUIRED; + case VALUE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.VALUE; + case INVARIANT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INVARIANT; + case SECURITY: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.SECURITY; + case LOGIN: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.LOGIN; + case UNKNOWN: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.UNKNOWN; + case EXPIRED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXPIRED; + case FORBIDDEN: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.FORBIDDEN; + case SUPPRESSED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.SUPPRESSED; + case PROCESSING: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.PROCESSING; + case NOTSUPPORTED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTSUPPORTED; + case DUPLICATE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.DUPLICATE; + case NOTFOUND: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTFOUND; + case TOOLONG: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TOOLONG; + case CODEINVALID: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.CODEINVALID; + case EXTENSION: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXTENSION; + case TOOCOSTLY: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TOOCOSTLY; + case BUSINESSRULE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.BUSINESSRULE; + case CONFLICT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.CONFLICT; + case INCOMPLETE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INCOMPLETE; + case TRANSIENT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TRANSIENT; + case LOCKERROR: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.LOCKERROR; + case NOSTORE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOSTORE; + case EXCEPTION: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXCEPTION; + case TIMEOUT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TIMEOUT; + case THROTTLED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.THROTTLED; + case INFORMATIONAL: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INFORMATIONAL; + default: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Claim.ItemComponent convertItemComponent(org.hl7.fhir.dstu3.model.Claim.ItemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Claim.ItemComponent tgt = new org.hl7.fhir.r4.model.Claim.ItemComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getCareTeamLinkId()) + tgt.addCareTeamLinkId(t.getValue()); + for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getDiagnosisLinkId()) + tgt.addDiagnosisLinkId(t.getValue()); + for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getProcedureLinkId()) + tgt.addProcedureLinkId(t.getValue()); + for (org.hl7.fhir.dstu3.model.PositiveIntType t : src.getInformationLinkId()) + tgt.addInformationLinkId(t.getValue()); + if (src.hasRevenue()) + tgt.setRevenue(convertCodeableConcept(src.getRevenue())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasService()) + tgt.setService(convertCodeableConcept(src.getService())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) + tgt.addModifier(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) + tgt.addProgramCode(convertCodeableConcept(t)); + if (src.hasServiced()) + tgt.setServiced(convertType(src.getServiced())); + if (src.hasLocation()) + tgt.setLocation(convertType(src.getLocation())); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) + tgt.addUdi(convertReference(t)); + if (src.hasBodySite()) + tgt.setBodySite(convertCodeableConcept(src.getBodySite())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubSite()) + tgt.addSubSite(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getEncounter()) + tgt.addEncounter(convertReference(t)); + for (org.hl7.fhir.dstu3.model.Claim.DetailComponent t : src.getDetail()) + tgt.addDetail(convertDetailComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Claim.ItemComponent convertItemComponent(org.hl7.fhir.r4.model.Claim.ItemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Claim.ItemComponent tgt = new org.hl7.fhir.dstu3.model.Claim.ItemComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + for (org.hl7.fhir.r4.model.PositiveIntType t : src.getCareTeamLinkId()) + tgt.addCareTeamLinkId(t.getValue()); + for (org.hl7.fhir.r4.model.PositiveIntType t : src.getDiagnosisLinkId()) + tgt.addDiagnosisLinkId(t.getValue()); + for (org.hl7.fhir.r4.model.PositiveIntType t : src.getProcedureLinkId()) + tgt.addProcedureLinkId(t.getValue()); + for (org.hl7.fhir.r4.model.PositiveIntType t : src.getInformationLinkId()) + tgt.addInformationLinkId(t.getValue()); + if (src.hasRevenue()) + tgt.setRevenue(convertCodeableConcept(src.getRevenue())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasService()) + tgt.setService(convertCodeableConcept(src.getService())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) + tgt.addModifier(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) + tgt.addProgramCode(convertCodeableConcept(t)); + if (src.hasServiced()) + tgt.setServiced(convertType(src.getServiced())); + if (src.hasLocation()) + tgt.setLocation(convertType(src.getLocation())); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) + tgt.addUdi(convertReference(t)); + if (src.hasBodySite()) + tgt.setBodySite(convertCodeableConcept(src.getBodySite())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSubSite()) + tgt.addSubSite(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getEncounter()) + tgt.addEncounter(convertReference(t)); + for (org.hl7.fhir.r4.model.Claim.DetailComponent t : src.getDetail()) + tgt.addDetail(convertDetailComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent(); + copyElement(src, tgt); + if (src.hasSequenceLinkId()) + tgt.setSequenceLinkId(src.getSequenceLinkId()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent(); + copyElement(src, tgt); + if (src.hasSequenceLinkId()) + tgt.setSequenceLinkId(src.getSequenceLinkId()); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.r4.model.Contract.LegalLanguageComponent(); + copyElement(src, tgt); + if (src.hasContent()) + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.r4.model.Contract.LegalLanguageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent(); + copyElement(src, tgt); + if (src.hasContent()) + tgt.setContent(convertType(src.getContent())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Patient.LinkType convertLinkType(org.hl7.fhir.dstu3.model.Patient.LinkType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACEDBY: return org.hl7.fhir.r4.model.Patient.LinkType.REPLACEDBY; + case REPLACES: return org.hl7.fhir.r4.model.Patient.LinkType.REPLACES; + case REFER: return org.hl7.fhir.r4.model.Patient.LinkType.REFER; + case SEEALSO: return org.hl7.fhir.r4.model.Patient.LinkType.SEEALSO; + default: return org.hl7.fhir.r4.model.Patient.LinkType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Patient.LinkType convertLinkType(org.hl7.fhir.r4.model.Patient.LinkType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REPLACEDBY: return org.hl7.fhir.dstu3.model.Patient.LinkType.REPLACEDBY; + case REPLACES: return org.hl7.fhir.dstu3.model.Patient.LinkType.REPLACES; + case REFER: return org.hl7.fhir.dstu3.model.Patient.LinkType.REFER; + case SEEALSO: return org.hl7.fhir.dstu3.model.Patient.LinkType.SEEALSO; + default: return org.hl7.fhir.dstu3.model.Patient.LinkType.NULL; + } +} + public static org.hl7.fhir.r4.model.Linkage convertLinkage(org.hl7.fhir.dstu3.model.Linkage src) throws FHIRException { if (src == null) return null; @@ -16320,50 +12490,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.dstu3.model.ListResource.ListStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.r4.model.ListResource.ListStatus.CURRENT; - case RETIRED: return org.hl7.fhir.r4.model.ListResource.ListStatus.RETIRED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ListResource.ListStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ListResource.ListStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.r4.model.ListResource.ListStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CURRENT: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.CURRENT; - case RETIRED: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.RETIRED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.ListResource.ListMode convertListMode(org.hl7.fhir.dstu3.model.ListResource.ListMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case WORKING: return org.hl7.fhir.r4.model.ListResource.ListMode.WORKING; - case SNAPSHOT: return org.hl7.fhir.r4.model.ListResource.ListMode.SNAPSHOT; - case CHANGES: return org.hl7.fhir.r4.model.ListResource.ListMode.CHANGES; - default: return org.hl7.fhir.r4.model.ListResource.ListMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ListResource.ListMode convertListMode(org.hl7.fhir.r4.model.ListResource.ListMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case WORKING: return org.hl7.fhir.dstu3.model.ListResource.ListMode.WORKING; - case SNAPSHOT: return org.hl7.fhir.dstu3.model.ListResource.ListMode.SNAPSHOT; - case CHANGES: return org.hl7.fhir.dstu3.model.ListResource.ListMode.CHANGES; - default: return org.hl7.fhir.dstu3.model.ListResource.ListMode.NULL; - } -} - public static org.hl7.fhir.r4.model.ListResource.ListEntryComponent convertListEntryComponent(org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent src) throws FHIRException { if (src == null) return null; @@ -16396,6 +12522,50 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.ListResource.ListMode convertListMode(org.hl7.fhir.dstu3.model.ListResource.ListMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case WORKING: return org.hl7.fhir.r4.model.ListResource.ListMode.WORKING; + case SNAPSHOT: return org.hl7.fhir.r4.model.ListResource.ListMode.SNAPSHOT; + case CHANGES: return org.hl7.fhir.r4.model.ListResource.ListMode.CHANGES; + default: return org.hl7.fhir.r4.model.ListResource.ListMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ListResource.ListMode convertListMode(org.hl7.fhir.r4.model.ListResource.ListMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case WORKING: return org.hl7.fhir.dstu3.model.ListResource.ListMode.WORKING; + case SNAPSHOT: return org.hl7.fhir.dstu3.model.ListResource.ListMode.SNAPSHOT; + case CHANGES: return org.hl7.fhir.dstu3.model.ListResource.ListMode.CHANGES; + default: return org.hl7.fhir.dstu3.model.ListResource.ListMode.NULL; + } +} + + private static org.hl7.fhir.r4.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.dstu3.model.ListResource.ListStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.r4.model.ListResource.ListStatus.CURRENT; + case RETIRED: return org.hl7.fhir.r4.model.ListResource.ListStatus.RETIRED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.ListResource.ListStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.ListResource.ListStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.r4.model.ListResource.ListStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CURRENT: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.CURRENT; + case RETIRED: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.RETIRED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.ListResource.ListStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.Location convertLocation(org.hl7.fhir.dstu3.model.Location src) throws FHIRException { if (src == null) return null; @@ -16472,28 +12642,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.dstu3.model.Location.LocationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.Location.LocationStatus.SUSPENDED; - case INACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.INACTIVE; - default: return org.hl7.fhir.r4.model.Location.LocationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.r4.model.Location.LocationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.Location.LocationStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.Location.LocationStatus.SUSPENDED; - case INACTIVE: return org.hl7.fhir.dstu3.model.Location.LocationStatus.INACTIVE; - default: return org.hl7.fhir.dstu3.model.Location.LocationStatus.NULL; - } -} - private static org.hl7.fhir.r4.model.Location.LocationMode convertLocationMode(org.hl7.fhir.dstu3.model.Location.LocationMode src) throws FHIRException { if (src == null) return null; @@ -16542,6 +12690,78 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.dstu3.model.Location.LocationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.Location.LocationStatus.SUSPENDED; + case INACTIVE: return org.hl7.fhir.r4.model.Location.LocationStatus.INACTIVE; + default: return org.hl7.fhir.r4.model.Location.LocationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.r4.model.Location.LocationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.Location.LocationStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.Location.LocationStatus.SUSPENDED; + case INACTIVE: return org.hl7.fhir.dstu3.model.Location.LocationStatus.INACTIVE; + default: return org.hl7.fhir.dstu3.model.Location.LocationStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.MarkdownType convertMarkdown(org.hl7.fhir.dstu3.model.MarkdownType src) throws FHIRException { + org.hl7.fhir.r4.model.MarkdownType tgt = new org.hl7.fhir.r4.model.MarkdownType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.MarkdownType convertMarkdown(org.hl7.fhir.r4.model.MarkdownType src) throws FHIRException { + org.hl7.fhir.dstu3.model.MarkdownType tgt = new org.hl7.fhir.dstu3.model.MarkdownType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + private static org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OTHER: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OTHER; + case CHEMICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; + case ELECTRICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; + case IMPEDANCE: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; + case NUCLEAR: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; + case OPTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.OPTICAL; + case THERMAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.THERMAL; + case BIOLOGICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; + case MECHANICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; + case ACOUSTICAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; + case MANUAL: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.MANUAL; + default: return org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.r4.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OTHER: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.OTHER; + case CHEMICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.CHEMICAL; + case ELECTRICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL; + case IMPEDANCE: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE; + case NUCLEAR: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.NUCLEAR; + case OPTICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.OPTICAL; + case THERMAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.THERMAL; + case BIOLOGICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL; + case MECHANICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.MECHANICAL; + case ACOUSTICAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL; + case MANUAL: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.MANUAL; + default: return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.NULL; + } +} + public static org.hl7.fhir.r4.model.Measure convertMeasure(org.hl7.fhir.dstu3.model.Measure src) throws FHIRException { if (src == null) return null; @@ -16806,38 +13026,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent convertMeasureSupplementalDataComponent(org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUsage()) - tgt.addUsage(convertCodeableConcept(t)); - if (src.hasCriteria()) - tgt.setCriteria(src.getCriteria()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent convertMeasureSupplementalDataComponent(org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent tgt = new org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent(); - copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getUsage()) - tgt.addUsage(convertCodeableConcept(t)); - if (src.hasCriteria()) - tgt.setCriteria(src.getCriteria()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - return tgt; - } - public static org.hl7.fhir.r4.model.MeasureReport convertMeasureReport(org.hl7.fhir.dstu3.model.MeasureReport src) throws FHIRException { if (src == null) return null; @@ -16894,50 +13082,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus convertMeasureReportStatus(org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case COMPLETE: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.COMPLETE; - case PENDING: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.PENDING; - case ERROR: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.ERROR; - default: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus convertMeasureReportStatus(org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case COMPLETE: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.COMPLETE; - case PENDING: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.PENDING; - case ERROR: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.ERROR; - default: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.MeasureReport.MeasureReportType convertMeasureReportType(org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INDIVIDUAL: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.INDIVIDUAL; - case PATIENTLIST: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.PATIENTLIST; - case SUMMARY: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.SUMMARY; - default: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType convertMeasureReportType(org.hl7.fhir.r4.model.MeasureReport.MeasureReportType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INDIVIDUAL: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.INDIVIDUAL; - case PATIENTLIST: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.PATIENTLIST; - case SUMMARY: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.SUMMARY; - default: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.NULL; - } -} - public static org.hl7.fhir.r4.model.MeasureReport.MeasureReportGroupComponent convertMeasureReportGroupComponent(org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportGroupComponent src) throws FHIRException { if (src == null) return null; @@ -17026,63 +13170,79 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent convertStratifierGroupComponent(org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus convertMeasureReportStatus(org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent tgt = new org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - for (org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent t : src.getPopulation()) - tgt.addPopulation(convertStratifierGroupPopulationComponent(t)); - if (src.hasMeasureScore()) - tgt.setMeasureScore(src.getMeasureScore()); - return tgt; + switch (src) { + case COMPLETE: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.COMPLETE; + case PENDING: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.PENDING; + case ERROR: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.ERROR; + default: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent convertStratifierGroupComponent(org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus convertMeasureReportStatus(org.hl7.fhir.r4.model.MeasureReport.MeasureReportStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent tgt = new org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(src.getValue()); - for (org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent t : src.getPopulation()) - tgt.addPopulation(convertStratifierGroupPopulationComponent(t)); - if (src.hasMeasureScore()) - tgt.setMeasureScore(src.getMeasureScore()); - return tgt; + switch (src) { + case COMPLETE: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.COMPLETE; + case PENDING: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.PENDING; + case ERROR: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.ERROR; + default: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportStatus.NULL; } +} - public static org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent convertStratifierGroupPopulationComponent(org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.MeasureReport.MeasureReportType convertMeasureReportType(org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent tgt = new org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent(); + switch (src) { + case INDIVIDUAL: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.INDIVIDUAL; + case PATIENTLIST: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.PATIENTLIST; + case SUMMARY: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.SUMMARY; + default: return org.hl7.fhir.r4.model.MeasureReport.MeasureReportType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType convertMeasureReportType(org.hl7.fhir.r4.model.MeasureReport.MeasureReportType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INDIVIDUAL: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.INDIVIDUAL; + case PATIENTLIST: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.PATIENTLIST; + case SUMMARY: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.SUMMARY; + default: return org.hl7.fhir.dstu3.model.MeasureReport.MeasureReportType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent convertMeasureSupplementalDataComponent(org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent(); copyElement(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasCount()) - tgt.setCount(src.getCount()); - if (src.hasPatients()) - tgt.setPatients(convertReference(src.getPatients())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUsage()) + tgt.addUsage(convertCodeableConcept(t)); + if (src.hasCriteria()) + tgt.setCriteria(src.getCriteria()); + if (src.hasPath()) + tgt.setPath(src.getPath()); return tgt; } - public static org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent convertStratifierGroupPopulationComponent(org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent convertMeasureSupplementalDataComponent(org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent tgt = new org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent(); + org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent tgt = new org.hl7.fhir.dstu3.model.Measure.MeasureSupplementalDataComponent(); copyElement(src, tgt); if (src.hasIdentifier()) tgt.setIdentifier(convertIdentifier(src.getIdentifier())); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasCount()) - tgt.setCount(src.getCount()); - if (src.hasPatients()) - tgt.setPatients(convertReference(src.getPatients())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getUsage()) + tgt.addUsage(convertCodeableConcept(t)); + if (src.hasCriteria()) + tgt.setCriteria(src.getCriteria()); + if (src.hasPath()) + tgt.setPath(src.getPath()); return tgt; } @@ -17174,28 +13334,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.dstu3.model.Media.DigitalMediaType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PHOTO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.PHOTO; - case VIDEO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.VIDEO; - case AUDIO: return org.hl7.fhir.r4.model.Media.DigitalMediaType.AUDIO; - default: return org.hl7.fhir.r4.model.Media.DigitalMediaType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.r4.model.Media.DigitalMediaType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PHOTO: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.PHOTO; - case VIDEO: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.VIDEO; - case AUDIO: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.AUDIO; - default: return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.NULL; - } -} - public static org.hl7.fhir.r4.model.Medication convertMedication(org.hl7.fhir.dstu3.model.Medication src) throws FHIRException { if (src == null) return null; @@ -17248,132 +13386,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Medication.MedicationStatus convertMedicationStatus(org.hl7.fhir.dstu3.model.Medication.MedicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Medication.MedicationStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.r4.model.Medication.MedicationStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Medication.MedicationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Medication.MedicationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Medication.MedicationStatus convertMedicationStatus(org.hl7.fhir.r4.model.Medication.MedicationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent convertMedicationIngredientComponent(org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent(); - copyElement(src, tgt); - if (src.hasItem()) - tgt.setItem(convertType(src.getItem())); - if (src.hasIsActive()) - tgt.setIsActive(src.getIsActive()); - if (src.hasAmount()) - tgt.setAmount(convertRatio(src.getAmount())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent convertMedicationIngredientComponent(org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent(); - copyElement(src, tgt); - if (src.hasItem()) - tgt.setItem(convertType(src.getItem())); - if (src.hasIsActive()) - tgt.setIsActive(src.getIsActive()); - if (src.hasAmount()) - tgt.setAmount(convertRatio(src.getAmount())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageComponent(); - copyElement(src, tgt); - if (src.hasContainer()) - tgt.setContainer(convertCodeableConcept(src.getContainer())); - for (org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent t : src.getContent()) - tgt.addContent(convertMedicationPackageContentComponent(t)); - for (org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent t : src.getBatch()) - tgt.addBatch(convertMedicationPackageBatchComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent(); - copyElement(src, tgt); - if (src.hasContainer()) - tgt.setContainer(convertCodeableConcept(src.getContainer())); - for (org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent t : src.getContent()) - tgt.addContent(convertMedicationPackageContentComponent(t)); - for (org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent t : src.getBatch()) - tgt.addBatch(convertMedicationPackageBatchComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent(); - copyElement(src, tgt); - if (src.hasItem()) - tgt.setItem(convertType(src.getItem())); - if (src.hasAmount()) - tgt.setAmount(convertSimpleQuantity(src.getAmount())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent(); - copyElement(src, tgt); - if (src.hasItem()) - tgt.setItem(convertType(src.getItem())); - if (src.hasAmount()) - tgt.setAmount(convertSimpleQuantity(src.getAmount())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent convertMedicationPackageBatchComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent(); - copyElement(src, tgt); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent convertMedicationPackageBatchComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent(); - copyElement(src, tgt); - if (src.hasLotNumber()) - tgt.setLotNumber(src.getLotNumber()); - if (src.hasExpirationDate()) - tgt.setExpirationDate(src.getExpirationDate()); - return tgt; - } - public static org.hl7.fhir.r4.model.MedicationAdministration convertMedicationAdministration(org.hl7.fhir.dstu3.model.MedicationAdministration src) throws FHIRException { if (src == null) return null; @@ -17470,58 +13482,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.STOPPED; - case UNKNOWN: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus convertMedicationAdministrationStatus(org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.STOPPED; - case UNKNOWN: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent convertMedicationAdministrationPerformerComponent(org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent convertMedicationAdministrationPerformerComponent(org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); - return tgt; - } - public static org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationDosageComponent convertMedicationAdministrationDosageComponent(org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationDosageComponent src) throws FHIRException { if (src == null) return null; @@ -17562,6 +13522,58 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent convertMedicationAdministrationPerformerComponent(org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent convertMedicationAdministrationPerformerComponent(org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } + + private static org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.STOPPED; + case UNKNOWN: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus convertMedicationAdministrationStatus(org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.STOPPED; + case UNKNOWN: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.dstu3.model.MedicationDispense src) throws FHIRException { if (src == null) return null; @@ -17674,6 +13686,30 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent convertMedicationDispensePerformerComponent(org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent tgt = new org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent convertMedicationDispensePerformerComponent(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } + private static org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException { if (src == null) return null; @@ -17702,30 +13738,6 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent convertMedicationDispensePerformerComponent(org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent tgt = new org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent convertMedicationDispensePerformerComponent(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispensePerformerComponent(); - copyElement(src, tgt); - if (src.hasActor()) - tgt.setActor(convertReference(src.getActor())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); - return tgt; - } - public static org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { if (src == null) return null; @@ -17758,6 +13770,110 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent convertMedicationIngredientComponent(org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent(); + copyElement(src, tgt); + if (src.hasItem()) + tgt.setItem(convertType(src.getItem())); + if (src.hasIsActive()) + tgt.setIsActive(src.getIsActive()); + if (src.hasAmount()) + tgt.setAmount(convertRatio(src.getAmount())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent convertMedicationIngredientComponent(org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationIngredientComponent(); + copyElement(src, tgt); + if (src.hasItem()) + tgt.setItem(convertType(src.getItem())); + if (src.hasIsActive()) + tgt.setIsActive(src.getIsActive()); + if (src.hasAmount()) + tgt.setAmount(convertRatio(src.getAmount())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent convertMedicationPackageBatchComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent(); + copyElement(src, tgt); + if (src.hasLotNumber()) + tgt.setLotNumber(src.getLotNumber()); + if (src.hasExpirationDate()) + tgt.setExpirationDate(src.getExpirationDate()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent convertMedicationPackageBatchComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent(); + copyElement(src, tgt); + if (src.hasLotNumber()) + tgt.setLotNumber(src.getLotNumber()); + if (src.hasExpirationDate()) + tgt.setExpirationDate(src.getExpirationDate()); + return tgt; + } + + public static org.hl7.fhir.r4.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageComponent(); + copyElement(src, tgt); + if (src.hasContainer()) + tgt.setContainer(convertCodeableConcept(src.getContainer())); + for (org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent t : src.getContent()) + tgt.addContent(convertMedicationPackageContentComponent(t)); + for (org.hl7.fhir.dstu3.model.Medication.MedicationPackageBatchComponent t : src.getBatch()) + tgt.addBatch(convertMedicationPackageBatchComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent(); + copyElement(src, tgt); + if (src.hasContainer()) + tgt.setContainer(convertCodeableConcept(src.getContainer())); + for (org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent t : src.getContent()) + tgt.addContent(convertMedicationPackageContentComponent(t)); + for (org.hl7.fhir.r4.model.Medication.MedicationPackageBatchComponent t : src.getBatch()) + tgt.addBatch(convertMedicationPackageBatchComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent(); + copyElement(src, tgt); + if (src.hasItem()) + tgt.setItem(convertType(src.getItem())); + if (src.hasAmount()) + tgt.setAmount(convertSimpleQuantity(src.getAmount())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.r4.model.Medication.MedicationPackageContentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent(); + copyElement(src, tgt); + if (src.hasItem()) + tgt.setItem(convertType(src.getItem())); + if (src.hasAmount()) + tgt.setAmount(convertSimpleQuantity(src.getAmount())); + return tgt; + } + public static org.hl7.fhir.r4.model.MedicationRequest convertMedicationRequest(org.hl7.fhir.dstu3.model.MedicationRequest src) throws FHIRException { if (src == null) return null; @@ -17775,8 +13891,6 @@ public class VersionConvertor_30_40 { tgt.setStatus(convertMedicationRequestStatus(src.getStatus())); if (src.hasIntent()) tgt.setIntent(convertMedicationRequestIntent(src.getIntent())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); if (src.hasPriority()) tgt.setPriority(convertMedicationRequestPriority(src.getPriority())); if (src.hasMedication()) @@ -17831,8 +13945,6 @@ public class VersionConvertor_30_40 { tgt.setStatus(convertMedicationRequestStatus(src.getStatus())); if (src.hasIntent()) tgt.setIntent(convertMedicationRequestIntent(src.getIntent())); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); if (src.hasPriority()) tgt.setPriority(convertMedicationRequestPriority(src.getPriority())); if (src.hasMedication()) @@ -17870,37 +13982,41 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus convertMedicationRequestStatus(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent convertMedicationRequestDispenseRequestComponent(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.ACTIVE; - case ONHOLD: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.ONHOLD; - case CANCELLED: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.STOPPED; - case DRAFT: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.DRAFT; - case UNKNOWN: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.NULL; + org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent tgt = new org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent(); + copyElement(src, tgt); + if (src.hasValidityPeriod()) + tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod())); + if (src.hasNumberOfRepeatsAllowed()) + tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasExpectedSupplyDuration()) + tgt.setExpectedSupplyDuration(convertDuration(src.getExpectedSupplyDuration())); + if (src.hasPerformer()) + tgt.setPerformer(convertReference(src.getPerformer())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus convertMedicationRequestStatus(org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent convertMedicationRequestDispenseRequestComponent(org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.ACTIVE; - case ONHOLD: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.ONHOLD; - case CANCELLED: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.STOPPED; - case DRAFT: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.DRAFT; - case UNKNOWN: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.NULL; + org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent tgt = new org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent(); + copyElement(src, tgt); + if (src.hasValidityPeriod()) + tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod())); + if (src.hasNumberOfRepeatsAllowed()) + tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasExpectedSupplyDuration()) + tgt.setExpectedSupplyDuration(convertDuration(src.getExpectedSupplyDuration())); + if (src.hasPerformer()) + tgt.setPerformer(convertReference(src.getPerformer())); + return tgt; } -} private static org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestIntent convertMedicationRequestIntent(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestIntent src) throws FHIRException { if (src == null) @@ -17974,41 +14090,37 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent convertMedicationRequestDispenseRequestComponent(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus convertMedicationRequestStatus(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent tgt = new org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent(); - copyElement(src, tgt); - if (src.hasValidityPeriod()) - tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod())); - if (src.hasNumberOfRepeatsAllowed()) - tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasExpectedSupplyDuration()) - tgt.setExpectedSupplyDuration(convertDuration(src.getExpectedSupplyDuration())); - if (src.hasPerformer()) - tgt.setPerformer(convertReference(src.getPerformer())); - return tgt; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.ACTIVE; + case ONHOLD: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.ONHOLD; + case CANCELLED: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.STOPPED; + case DRAFT: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.DRAFT; + case UNKNOWN: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus.NULL; } +} - public static org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent convertMedicationRequestDispenseRequestComponent(org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestDispenseRequestComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus convertMedicationRequestStatus(org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent tgt = new org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestDispenseRequestComponent(); - copyElement(src, tgt); - if (src.hasValidityPeriod()) - tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod())); - if (src.hasNumberOfRepeatsAllowed()) - tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed()); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasExpectedSupplyDuration()) - tgt.setExpectedSupplyDuration(convertDuration(src.getExpectedSupplyDuration())); - if (src.hasPerformer()) - tgt.setPerformer(convertReference(src.getPerformer())); - return tgt; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.ACTIVE; + case ONHOLD: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.ONHOLD; + case CANCELLED: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.STOPPED; + case DRAFT: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.DRAFT; + case UNKNOWN: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus.NULL; } +} public static org.hl7.fhir.r4.model.MedicationRequest.MedicationRequestSubstitutionComponent convertMedicationRequestSubstitutionComponent(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestSubstitutionComponent src) throws FHIRException { if (src == null) @@ -18174,6 +14286,28 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.Medication.MedicationStatus convertMedicationStatus(org.hl7.fhir.dstu3.model.Medication.MedicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.r4.model.Medication.MedicationStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.r4.model.Medication.MedicationStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Medication.MedicationStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Medication.MedicationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Medication.MedicationStatus convertMedicationStatus(org.hl7.fhir.r4.model.Medication.MedicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACTIVE: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.ACTIVE; + case INACTIVE: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.INACTIVE; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Medication.MedicationStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.MessageDefinition convertMessageDefinition(org.hl7.fhir.dstu3.model.MessageDefinition src) throws FHIRException { if (src == null) return null; @@ -18215,8 +14349,6 @@ public class VersionConvertor_30_40 { tgt.addParent(convertReference(t)); for (org.hl7.fhir.dstu3.model.Reference t : src.getReplaces()) tgt.addReplaces(convertReference(t)); - if (src.hasEvent()) - tgt.setEvent(convertCoding(src.getEvent())); if (src.hasCategory()) tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); for (org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionFocusComponent t : src.getFocus()) @@ -18269,8 +14401,6 @@ public class VersionConvertor_30_40 { tgt.addParent(convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getReplaces()) tgt.addReplaces(convertReference(t)); - if (src.hasEvent()) - tgt.setEvent(convertCoding(src.getEvent())); if (src.hasCategory()) tgt.setCategory(convertMessageSignificanceCategory(src.getCategory())); for (org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionFocusComponent t : src.getFocus()) @@ -18282,27 +14412,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory src) throws FHIRException { + public static org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent convertMessageDefinitionAllowedResponseComponent(org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case CONSEQUENCE: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.CONSEQUENCE; - case CURRENCY: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.CURRENCY; - case NOTIFICATION: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.NOTIFICATION; - default: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.NULL; + org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent tgt = new org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent(); + copyElement(src, tgt); + if (src.hasMessage()) + tgt.setMessage(convertReference(src.getMessage())); + if (src.hasSituation()) + tgt.setSituation(src.getSituation()); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent convertMessageDefinitionAllowedResponseComponent(org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case CONSEQUENCE: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.CONSEQUENCE; - case CURRENCY: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.CURRENCY; - case NOTIFICATION: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.NOTIFICATION; - default: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.NULL; + org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent(); + copyElement(src, tgt); + if (src.hasMessage()) + tgt.setMessage(convertReference(src.getMessage())); + if (src.hasSituation()) + tgt.setSituation(src.getSituation()); + return tgt; } -} public static org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionFocusComponent convertMessageDefinitionFocusComponent(org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionFocusComponent src) throws FHIRException { if (src == null) @@ -18336,27 +14468,31 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent convertMessageDefinitionAllowedResponseComponent(org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent tgt = new org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent(); + org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); copyElement(src, tgt); - if (src.hasMessage()) - tgt.setMessage(convertReference(src.getMessage())); - if (src.hasSituation()) - tgt.setSituation(src.getSituation()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasTarget()) + tgt.setTarget(convertReference(src.getTarget())); + if (src.hasEndpoint()) + tgt.setEndpoint(src.getEndpoint()); return tgt; } - public static org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent convertMessageDefinitionAllowedResponseComponent(org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageDefinition.MessageDefinitionAllowedResponseComponent(); + org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent(); copyElement(src, tgt); - if (src.hasMessage()) - tgt.setMessage(convertReference(src.getMessage())); - if (src.hasSituation()) - tgt.setSituation(src.getSituation()); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasTarget()) + tgt.setTarget(convertReference(src.getTarget())); + if (src.hasEndpoint()) + tgt.setEndpoint(src.getEndpoint()); return tgt; } @@ -18420,34 +14556,78 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); + org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTarget()) - tgt.setTarget(convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasIdentifier()) + tgt.setIdentifier(src.getIdentifier()); + if (src.hasCode()) + tgt.setCode(convertResponseType(src.getCode())); + if (src.hasDetails()) + tgt.setDetails(convertReference(src.getDetails())); return tgt; } - public static org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent(); + org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTarget()) - tgt.setTarget(convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasIdentifier()) + tgt.setIdentifier(src.getIdentifier()); + if (src.hasCode()) + tgt.setCode(convertResponseType(src.getCode())); + if (src.hasDetails()) + tgt.setDetails(convertReference(src.getDetails())); return tgt; } + private static org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONSEQUENCE: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE; + case CURRENCY: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY; + case NOTIFICATION: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION; + default: return org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.r4.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONSEQUENCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE; + case CURRENCY: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY; + case NOTIFICATION: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NULL; + } +} + + private static org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONSEQUENCE: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.CONSEQUENCE; + case CURRENCY: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.CURRENCY; + case NOTIFICATION: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.NOTIFICATION; + default: return org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.r4.model.MessageDefinition.MessageSignificanceCategory src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CONSEQUENCE: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.CONSEQUENCE; + case CURRENCY: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.CURRENCY; + case NOTIFICATION: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.NOTIFICATION; + default: return org.hl7.fhir.dstu3.model.MessageDefinition.MessageSignificanceCategory.NULL; + } +} + public static org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent src) throws FHIRException { if (src == null) return null; @@ -18484,53 +14664,85 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); + org.hl7.fhir.r4.model.Meta tgt = new org.hl7.fhir.r4.model.Meta(); copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); - if (src.hasCode()) - tgt.setCode(convertResponseType(src.getCode())); - if (src.hasDetails()) - tgt.setDetails(convertReference(src.getDetails())); + if (src.hasVersionId()) + tgt.setVersionId(src.getVersionId()); + if (src.hasLastUpdated()) + tgt.setLastUpdated(src.getLastUpdated()); + for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) + tgt.addProfile(t.getValue()); + for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) + tgt.addSecurity(convertCoding(t)); + for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) + tgt.addTag(convertCoding(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Meta convertMeta(org.hl7.fhir.r4.model.Meta src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent(); + org.hl7.fhir.dstu3.model.Meta tgt = new org.hl7.fhir.dstu3.model.Meta(); copyElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(src.getIdentifier()); - if (src.hasCode()) - tgt.setCode(convertResponseType(src.getCode())); - if (src.hasDetails()) - tgt.setDetails(convertReference(src.getDetails())); + if (src.hasVersionId()) + tgt.setVersionId(src.getVersionId()); + if (src.hasLastUpdated()) + tgt.setLastUpdated(src.getLastUpdated()); + for (org.hl7.fhir.r4.model.UriType t : src.getProfile()) + tgt.addProfile(t.getValue()); + for (org.hl7.fhir.r4.model.Coding t : src.getSecurity()) + tgt.addSecurity(convertCoding(t)); + for (org.hl7.fhir.r4.model.Coding t : src.getTag()) + tgt.addTag(convertCoding(t)); return tgt; } - private static org.hl7.fhir.r4.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.dstu3.model.MessageHeader.ResponseType src) throws FHIRException { + public static org.hl7.fhir.r4.model.Money convertMoney(org.hl7.fhir.dstu3.model.Money src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Money tgt = new org.hl7.fhir.r4.model.Money(); + copyQuantity(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Money tgt = new org.hl7.fhir.dstu3.model.Money(); + copyQuantity(src, tgt); + return tgt; + } + + private static org.hl7.fhir.r4.model.HumanName.NameUse convertNameUse(org.hl7.fhir.dstu3.model.HumanName.NameUse src) throws FHIRException { if (src == null) return null; switch (src) { - case OK: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.OK; - case TRANSIENTERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.TRANSIENTERROR; - case FATALERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.FATALERROR; - default: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.NULL; + case USUAL: return org.hl7.fhir.r4.model.HumanName.NameUse.USUAL; + case OFFICIAL: return org.hl7.fhir.r4.model.HumanName.NameUse.OFFICIAL; + case TEMP: return org.hl7.fhir.r4.model.HumanName.NameUse.TEMP; + case NICKNAME: return org.hl7.fhir.r4.model.HumanName.NameUse.NICKNAME; + case ANONYMOUS: return org.hl7.fhir.r4.model.HumanName.NameUse.ANONYMOUS; + case OLD: return org.hl7.fhir.r4.model.HumanName.NameUse.OLD; + case MAIDEN: return org.hl7.fhir.r4.model.HumanName.NameUse.MAIDEN; + default: return org.hl7.fhir.r4.model.HumanName.NameUse.NULL; } } - private static org.hl7.fhir.dstu3.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.r4.model.MessageHeader.ResponseType src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.HumanName.NameUse convertNameUse(org.hl7.fhir.r4.model.HumanName.NameUse src) throws FHIRException { if (src == null) return null; switch (src) { - case OK: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.OK; - case TRANSIENTERROR: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.TRANSIENTERROR; - case FATALERROR: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.FATALERROR; - default: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.NULL; + case USUAL: return org.hl7.fhir.dstu3.model.HumanName.NameUse.USUAL; + case OFFICIAL: return org.hl7.fhir.dstu3.model.HumanName.NameUse.OFFICIAL; + case TEMP: return org.hl7.fhir.dstu3.model.HumanName.NameUse.TEMP; + case NICKNAME: return org.hl7.fhir.dstu3.model.HumanName.NameUse.NICKNAME; + case ANONYMOUS: return org.hl7.fhir.dstu3.model.HumanName.NameUse.ANONYMOUS; + case OLD: return org.hl7.fhir.dstu3.model.HumanName.NameUse.OLD; + case MAIDEN: return org.hl7.fhir.dstu3.model.HumanName.NameUse.MAIDEN; + default: return org.hl7.fhir.dstu3.model.HumanName.NameUse.NULL; } } @@ -18606,6 +14818,30 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OID; + case UUID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.UUID; + case URI: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.URI; + case OTHER: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OTHER; + default: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OID: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.OID; + case UUID: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.UUID; + case URI: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.URI; + case OTHER: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.OTHER; + default: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.NULL; + } +} + private static org.hl7.fhir.r4.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType src) throws FHIRException { if (src == null) return null; @@ -18664,27 +14900,51 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { + public static org.hl7.fhir.r4.model.Narrative convertNarrative(org.hl7.fhir.dstu3.model.Narrative src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Narrative tgt = new org.hl7.fhir.r4.model.Narrative(); + copyElement(src, tgt); + if (src.hasStatus()) + tgt.setStatus(convertNarrativeStatus(src.getStatus())); + if (src.hasDiv()) + tgt.setDiv(src.getDiv()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Narrative convertNarrative(org.hl7.fhir.r4.model.Narrative src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Narrative tgt = new org.hl7.fhir.dstu3.model.Narrative(); + copyElement(src, tgt); + if (src.hasStatus()) + tgt.setStatus(convertNarrativeStatus(src.getStatus())); + if (src.hasDiv()) + tgt.setDiv(src.getDiv()); + return tgt; + } + + private static org.hl7.fhir.r4.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case OID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OID; - case UUID: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.UUID; - case URI: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.URI; - case OTHER: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.OTHER; - default: return org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType.NULL; + case GENERATED: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.GENERATED; + case EXTENSIONS: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EXTENSIONS; + case ADDITIONAL: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.ADDITIONAL; + case EMPTY: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.EMPTY; + default: return org.hl7.fhir.r4.model.Narrative.NarrativeStatus.NULL; } } - private static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.r4.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus convertNarrativeStatus(org.hl7.fhir.r4.model.Narrative.NarrativeStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case OID: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.OID; - case UUID: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.UUID; - case URI: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.URI; - case OTHER: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.OTHER; - default: return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.NULL; + case GENERATED: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED; + case EXTENSIONS: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.EXTENSIONS; + case ADDITIONAL: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.ADDITIONAL; + case EMPTY: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.EMPTY; + default: return org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.NULL; } } @@ -18752,39 +15012,85 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus convertNutritionOrderStatus(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.PROPOSED; - case DRAFT: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.DRAFT; - case PLANNED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.PLANNED; - case REQUESTED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.REQUESTED; - case ACTIVE: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.ACTIVE; - case ONHOLD: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.NULL; + org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt = new org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); + copyElement(src, tgt); + if (src.hasSchedule()) + tgt.setSchedule(convertTiming(src.getSchedule())); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasRate()) + tgt.setRate(convertType(src.getRate())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus convertNutritionOrderStatus(org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PROPOSED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.PROPOSED; - case DRAFT: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.DRAFT; - case PLANNED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.PLANNED; - case REQUESTED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.REQUESTED; - case ACTIVE: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.ACTIVE; - case ONHOLD: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.ONHOLD; - case COMPLETED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.COMPLETED; - case CANCELLED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.NULL; + org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt = new org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); + copyElement(src, tgt); + if (src.hasSchedule()) + tgt.setSchedule(convertTiming(src.getSchedule())); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasRate()) + tgt.setRate(convertType(src.getRate())); + return tgt; + } + + public static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent convertNutritionOrderEnteralFormulaComponent(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent tgt = new org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent(); + copyElement(src, tgt); + if (src.hasBaseFormulaType()) + tgt.setBaseFormulaType(convertCodeableConcept(src.getBaseFormulaType())); + if (src.hasBaseFormulaProductName()) + tgt.setBaseFormulaProductName(src.getBaseFormulaProductName()); + if (src.hasAdditiveType()) + tgt.setAdditiveType(convertCodeableConcept(src.getAdditiveType())); + if (src.hasAdditiveProductName()) + tgt.setAdditiveProductName(src.getAdditiveProductName()); + if (src.hasCaloricDensity()) + tgt.setCaloricDensity(convertSimpleQuantity(src.getCaloricDensity())); + if (src.hasRouteofAdministration()) + tgt.setRouteofAdministration(convertCodeableConcept(src.getRouteofAdministration())); + for (org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent t : src.getAdministration()) + tgt.addAdministration(convertNutritionOrderEnteralFormulaAdministrationComponent(t)); + if (src.hasMaxVolumeToDeliver()) + tgt.setMaxVolumeToDeliver(convertSimpleQuantity(src.getMaxVolumeToDeliver())); + if (src.hasAdministrationInstruction()) + tgt.setAdministrationInstruction(src.getAdministrationInstruction()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent convertNutritionOrderEnteralFormulaComponent(org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent tgt = new org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent(); + copyElement(src, tgt); + if (src.hasBaseFormulaType()) + tgt.setBaseFormulaType(convertCodeableConcept(src.getBaseFormulaType())); + if (src.hasBaseFormulaProductName()) + tgt.setBaseFormulaProductName(src.getBaseFormulaProductName()); + if (src.hasAdditiveType()) + tgt.setAdditiveType(convertCodeableConcept(src.getAdditiveType())); + if (src.hasAdditiveProductName()) + tgt.setAdditiveProductName(src.getAdditiveProductName()); + if (src.hasCaloricDensity()) + tgt.setCaloricDensity(convertSimpleQuantity(src.getCaloricDensity())); + if (src.hasRouteofAdministration()) + tgt.setRouteofAdministration(convertCodeableConcept(src.getRouteofAdministration())); + for (org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent t : src.getAdministration()) + tgt.addAdministration(convertNutritionOrderEnteralFormulaAdministrationComponent(t)); + if (src.hasMaxVolumeToDeliver()) + tgt.setMaxVolumeToDeliver(convertSimpleQuantity(src.getMaxVolumeToDeliver())); + if (src.hasAdministrationInstruction()) + tgt.setAdministrationInstruction(src.getAdministrationInstruction()); + return tgt; } -} public static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderOralDietComponent convertNutritionOrderOralDietComponent(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderOralDietComponent src) throws FHIRException { if (src == null) @@ -18874,6 +15180,40 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus convertNutritionOrderStatus(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.PROPOSED; + case DRAFT: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.DRAFT; + case PLANNED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.PLANNED; + case REQUESTED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.REQUESTED; + case ACTIVE: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.ACTIVE; + case ONHOLD: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus convertNutritionOrderStatus(org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PROPOSED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.PROPOSED; + case DRAFT: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.DRAFT; + case PLANNED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.PLANNED; + case REQUESTED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.REQUESTED; + case ACTIVE: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.ACTIVE; + case ONHOLD: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.ONHOLD; + case COMPLETED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.COMPLETED; + case CANCELLED: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderSupplementComponent convertNutritionOrderSupplementComponent(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderSupplementComponent src) throws FHIRException { if (src == null) return null; @@ -18910,86 +15250,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent convertNutritionOrderEnteralFormulaComponent(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent tgt = new org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent(); - copyElement(src, tgt); - if (src.hasBaseFormulaType()) - tgt.setBaseFormulaType(convertCodeableConcept(src.getBaseFormulaType())); - if (src.hasBaseFormulaProductName()) - tgt.setBaseFormulaProductName(src.getBaseFormulaProductName()); - if (src.hasAdditiveType()) - tgt.setAdditiveType(convertCodeableConcept(src.getAdditiveType())); - if (src.hasAdditiveProductName()) - tgt.setAdditiveProductName(src.getAdditiveProductName()); - if (src.hasCaloricDensity()) - tgt.setCaloricDensity(convertSimpleQuantity(src.getCaloricDensity())); - if (src.hasRouteofAdministration()) - tgt.setRouteofAdministration(convertCodeableConcept(src.getRouteofAdministration())); - for (org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent t : src.getAdministration()) - tgt.addAdministration(convertNutritionOrderEnteralFormulaAdministrationComponent(t)); - if (src.hasMaxVolumeToDeliver()) - tgt.setMaxVolumeToDeliver(convertSimpleQuantity(src.getMaxVolumeToDeliver())); - if (src.hasAdministrationInstruction()) - tgt.setAdministrationInstruction(src.getAdministrationInstruction()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent convertNutritionOrderEnteralFormulaComponent(org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent tgt = new org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaComponent(); - copyElement(src, tgt); - if (src.hasBaseFormulaType()) - tgt.setBaseFormulaType(convertCodeableConcept(src.getBaseFormulaType())); - if (src.hasBaseFormulaProductName()) - tgt.setBaseFormulaProductName(src.getBaseFormulaProductName()); - if (src.hasAdditiveType()) - tgt.setAdditiveType(convertCodeableConcept(src.getAdditiveType())); - if (src.hasAdditiveProductName()) - tgt.setAdditiveProductName(src.getAdditiveProductName()); - if (src.hasCaloricDensity()) - tgt.setCaloricDensity(convertSimpleQuantity(src.getCaloricDensity())); - if (src.hasRouteofAdministration()) - tgt.setRouteofAdministration(convertCodeableConcept(src.getRouteofAdministration())); - for (org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent t : src.getAdministration()) - tgt.addAdministration(convertNutritionOrderEnteralFormulaAdministrationComponent(t)); - if (src.hasMaxVolumeToDeliver()) - tgt.setMaxVolumeToDeliver(convertSimpleQuantity(src.getMaxVolumeToDeliver())); - if (src.hasAdministrationInstruction()) - tgt.setAdministrationInstruction(src.getAdministrationInstruction()); - return tgt; - } - - public static org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt = new org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); - copyElement(src, tgt); - if (src.hasSchedule()) - tgt.setSchedule(convertTiming(src.getSchedule())); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasRate()) - tgt.setRate(convertType(src.getRate())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.r4.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt = new org.hl7.fhir.dstu3.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); - copyElement(src, tgt); - if (src.hasSchedule()) - tgt.setSchedule(convertTiming(src.getSchedule())); - if (src.hasQuantity()) - tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); - if (src.hasRate()) - tgt.setRate(convertType(src.getRate())); - return tgt; - } - public static org.hl7.fhir.r4.model.Observation convertObservation(org.hl7.fhir.dstu3.model.Observation src) throws FHIRException { if (src == null) return null; @@ -19090,37 +15350,41 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.dstu3.model.Observation.ObservationStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.r4.model.Observation.ObservationStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.Observation.ObservationStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.CORRECTED; - case CANCELLED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Observation.ObservationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Observation.ObservationStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Observation.ObservationStatus.NULL; + org.hl7.fhir.r4.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationComponentComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + if (src.hasDataAbsentReason()) + tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); + if (src.hasInterpretation()) + tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); + for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) + tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.r4.model.Observation.ObservationStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.r4.model.Observation.ObservationComponentComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.FINAL; - case AMENDED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.CORRECTED; - case CANCELLED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.NULL; + org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + if (src.hasDataAbsentReason()) + tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); + if (src.hasInterpretation()) + tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); + for (org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) + tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); + return tgt; } -} public static org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException { if (src == null) @@ -19214,39 +15478,47 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.dstu3.model.Observation.ObservationStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.r4.model.Observation.ObservationComponentComponent(); + switch (src) { + case REGISTERED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.r4.model.Observation.ObservationStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.Observation.ObservationStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.CORRECTED; + case CANCELLED: return org.hl7.fhir.r4.model.Observation.ObservationStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Observation.ObservationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Observation.ObservationStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Observation.ObservationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.r4.model.Observation.ObservationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.FINAL; + case AMENDED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.CORRECTED; + case CANCELLED: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.OidType convertOid(org.hl7.fhir.dstu3.model.OidType src) throws FHIRException { + org.hl7.fhir.r4.model.OidType tgt = new org.hl7.fhir.r4.model.OidType(src.getValue()); copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - if (src.hasDataAbsentReason()) - tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); - if (src.hasInterpretation()) - tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); - for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) - tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.r4.model.Observation.ObservationComponentComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent(); + public static org.hl7.fhir.dstu3.model.OidType convertOid(org.hl7.fhir.r4.model.OidType src) throws FHIRException { + org.hl7.fhir.dstu3.model.OidType tgt = new org.hl7.fhir.dstu3.model.OidType(src.getValue()); copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(convertCodeableConcept(src.getCode())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - if (src.hasDataAbsentReason()) - tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); - if (src.hasInterpretation()) - tgt.setInterpretation(convertCodeableConcept(src.getInterpretation())); - for (org.hl7.fhir.r4.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) - tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); return tgt; } @@ -19358,25 +15630,53 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind src) throws FHIRException { + public static org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent convertOperationDefinitionOverloadComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case OPERATION: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.OPERATION; - case QUERY: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.QUERY; - default: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.NULL; + org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.StringType t : src.getParameterName()) + tgt.addParameterName(t.getValue()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.r4.model.OperationDefinition.OperationKind src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent convertOperationDefinitionOverloadComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case OPERATION: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.OPERATION; - case QUERY: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.QUERY; - default: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.NULL; + org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.StringType t : src.getParameterName()) + tgt.addParameterName(t.getValue()); + if (src.hasComment()) + tgt.setComment(src.getComment()); + return tgt; + } + + public static org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); + copyElement(src, tgt); + if (src.hasStrength()) + tgt.setStrength(convertBindingStrength(src.getStrength())); + if (src.hasValueSet()) + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); + copyElement(src, tgt); + if (src.hasStrength()) + tgt.setStrength(convertBindingStrength(src.getStrength())); + if (src.hasValueSet()) + tgt.setValueSet(convertType(src.getValueSet())); + return tgt; } -} public static org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException { if (src == null) @@ -19434,74 +15734,26 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse src) throws FHIRException { + private static org.hl7.fhir.r4.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind src) throws FHIRException { if (src == null) return null; switch (src) { - case IN: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.IN; - case OUT: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.OUT; - default: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.NULL; + case OPERATION: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.OPERATION; + case QUERY: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.QUERY; + default: return org.hl7.fhir.r4.model.OperationDefinition.OperationKind.NULL; } } - private static org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.r4.model.OperationDefinition.OperationKind src) throws FHIRException { if (src == null) return null; switch (src) { - case IN: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.IN; - case OUT: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.OUT; - default: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.NULL; + case OPERATION: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.OPERATION; + case QUERY: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.QUERY; + default: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.NULL; } } - public static org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); - copyElement(src, tgt); - if (src.hasStrength()) - tgt.setStrength(convertBindingStrength(src.getStrength())); - if (src.hasValueSet()) - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent(); - copyElement(src, tgt); - if (src.hasStrength()) - tgt.setStrength(convertBindingStrength(src.getStrength())); - if (src.hasValueSet()) - tgt.setValueSet(convertType(src.getValueSet())); - return tgt; - } - - public static org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent convertOperationDefinitionOverloadComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.StringType t : src.getParameterName()) - tgt.addParameterName(t.getValue()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent convertOperationDefinitionOverloadComponent(org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionOverloadComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionOverloadComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.StringType t : src.getParameterName()) - tgt.addParameterName(t.getValue()); - if (src.hasComment()) - tgt.setComment(src.getComment()); - return tgt; - } - public static org.hl7.fhir.r4.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.dstu3.model.OperationOutcome src) throws FHIRException { if (src == null) return null; @@ -19562,101 +15814,23 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity src) throws FHIRException { + private static org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse src) throws FHIRException { if (src == null) return null; switch (src) { - case FATAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.FATAL; - case ERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.ERROR; - case WARNING: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.WARNING; - case INFORMATION: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.INFORMATION; - default: return org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity.NULL; + case IN: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.IN; + case OUT: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.OUT; + default: return org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse.NULL; } } - private static org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.r4.model.OperationDefinition.OperationParameterUse src) throws FHIRException { if (src == null) return null; switch (src) { - case FATAL: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.FATAL; - case ERROR: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.ERROR; - case WARNING: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.WARNING; - case INFORMATION: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.INFORMATION; - default: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.NULL; - } -} - - private static org.hl7.fhir.r4.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVALID; - case STRUCTURE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.STRUCTURE; - case REQUIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.REQUIRED; - case VALUE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.VALUE; - case INVARIANT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INVARIANT; - case SECURITY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SECURITY; - case LOGIN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOGIN; - case UNKNOWN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.UNKNOWN; - case EXPIRED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXPIRED; - case FORBIDDEN: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.FORBIDDEN; - case SUPPRESSED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.SUPPRESSED; - case PROCESSING: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.PROCESSING; - case NOTSUPPORTED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTSUPPORTED; - case DUPLICATE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.DUPLICATE; - case NOTFOUND: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOTFOUND; - case TOOLONG: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOLONG; - case CODEINVALID: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CODEINVALID; - case EXTENSION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXTENSION; - case TOOCOSTLY: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TOOCOSTLY; - case BUSINESSRULE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.BUSINESSRULE; - case CONFLICT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.CONFLICT; - case INCOMPLETE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INCOMPLETE; - case TRANSIENT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TRANSIENT; - case LOCKERROR: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.LOCKERROR; - case NOSTORE: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NOSTORE; - case EXCEPTION: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.EXCEPTION; - case TIMEOUT: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.TIMEOUT; - case THROTTLED: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.THROTTLED; - case INFORMATIONAL: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.INFORMATIONAL; - default: return org.hl7.fhir.r4.model.OperationOutcome.IssueType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.r4.model.OperationOutcome.IssueType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case INVALID: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INVALID; - case STRUCTURE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.STRUCTURE; - case REQUIRED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.REQUIRED; - case VALUE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.VALUE; - case INVARIANT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INVARIANT; - case SECURITY: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.SECURITY; - case LOGIN: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.LOGIN; - case UNKNOWN: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.UNKNOWN; - case EXPIRED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXPIRED; - case FORBIDDEN: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.FORBIDDEN; - case SUPPRESSED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.SUPPRESSED; - case PROCESSING: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.PROCESSING; - case NOTSUPPORTED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTSUPPORTED; - case DUPLICATE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.DUPLICATE; - case NOTFOUND: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTFOUND; - case TOOLONG: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TOOLONG; - case CODEINVALID: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.CODEINVALID; - case EXTENSION: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXTENSION; - case TOOCOSTLY: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TOOCOSTLY; - case BUSINESSRULE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.BUSINESSRULE; - case CONFLICT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.CONFLICT; - case INCOMPLETE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INCOMPLETE; - case TRANSIENT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TRANSIENT; - case LOCKERROR: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.LOCKERROR; - case NOSTORE: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOSTORE; - case EXCEPTION: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXCEPTION; - case TIMEOUT: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TIMEOUT; - case THROTTLED: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.THROTTLED; - case INFORMATIONAL: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INFORMATIONAL; - default: return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NULL; + case IN: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.IN; + case OUT: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.OUT; + default: return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.NULL; } } @@ -19748,6 +15922,248 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); + copyElement(src, tgt); + if (src.hasProperty()) + tgt.setProperty(src.getProperty()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); + copyElement(src, tgt); + if (src.hasProperty()) + tgt.setProperty(src.getProperty()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + return tgt; + } + + public static org.hl7.fhir.r4.model.Task.ParameterComponent convertParameterComponent(org.hl7.fhir.dstu3.model.Task.ParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Task.ParameterComponent tgt = new org.hl7.fhir.r4.model.Task.ParameterComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Task.ParameterComponent convertParameterComponent(org.hl7.fhir.r4.model.Task.ParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Task.ParameterComponent tgt = new org.hl7.fhir.dstu3.model.Task.ParameterComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.r4.model.ParameterDefinition convertParameterDefinition(org.hl7.fhir.dstu3.model.ParameterDefinition src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ParameterDefinition tgt = new org.hl7.fhir.r4.model.ParameterDefinition(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasUse()) + tgt.setUse(convertParameterUse(src.getUse())); + if (src.hasMin()) + tgt.setMin(src.getMin()); + if (src.hasMax()) + tgt.setMax(src.getMax()); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ParameterDefinition convertParameterDefinition(org.hl7.fhir.r4.model.ParameterDefinition src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ParameterDefinition tgt = new org.hl7.fhir.dstu3.model.ParameterDefinition(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasUse()) + tgt.setUse(convertParameterUse(src.getUse())); + if (src.hasMin()) + tgt.setMin(src.getMin()); + if (src.hasMax()) + tgt.setMax(src.getMax()); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + if (src.hasType()) + tgt.setType(src.getType()); + if (src.hasProfile()) + tgt.setProfile(convertReference(src.getProfile())); + return tgt; + } + + private static org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse convertParameterUse(org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case IN: return org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse.IN; + case OUT: return org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse.OUT; + default: return org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse convertParameterUse(org.hl7.fhir.r4.model.ParameterDefinition.ParameterUse src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case IN: return org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse.IN; + case OUT: return org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse.OUT; + default: return org.hl7.fhir.dstu3.model.ParameterDefinition.ParameterUse.NULL; + } +} + + public static org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.dstu3.model.Parameters src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Parameters tgt = new org.hl7.fhir.r4.model.Parameters(); + copyResource(src, tgt); + for (org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent t : src.getParameter()) + tgt.addParameter(convertParametersParameterComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Parameters convertParameters(org.hl7.fhir.r4.model.Parameters src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Parameters tgt = new org.hl7.fhir.dstu3.model.Parameters(); + copyResource(src, tgt); + for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getParameter()) + tgt.addParameter(convertParametersParameterComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + if (src.hasResource()) + tgt.setResource(convertResource(src.getResource())); + for (org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent t : src.getPart()) + tgt.addPart(convertParametersParameterComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + if (src.hasResource()) + tgt.setResource(convertResource(src.getResource())); + for (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent t : src.getPart()) + tgt.addPart(convertParametersParameterComponent(t)); + return tgt; + } + + private static org.hl7.fhir.r4.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUIRED: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.REQUIRED; + case OPTIONAL: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.OPTIONAL; + case INFORMATIONONLY: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.INFORMATIONONLY; + default: return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.r4.model.Appointment.ParticipantRequired src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUIRED: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.REQUIRED; + case OPTIONAL: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.OPTIONAL; + case INFORMATIONONLY: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.INFORMATIONONLY; + default: return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.NULL; + } +} + + private static org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACCEPTED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; + default: return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACCEPTED: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.NEEDSACTION; + default: return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACCEPTED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NEEDSACTION; + default: return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.r4.model.Appointment.ParticipationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ACCEPTED: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.ACCEPTED; + case DECLINED: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.DECLINED; + case TENTATIVE: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.TENTATIVE; + case NEEDSACTION: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.NEEDSACTION; + default: return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.Patient convertPatient(org.hl7.fhir.dstu3.model.Patient src) throws FHIRException { if (src == null) return null; @@ -19832,78 +16248,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.dstu3.model.Patient.ContactComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Patient.ContactComponent tgt = new org.hl7.fhir.r4.model.Patient.ContactComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRelationship()) - tgt.addRelationship(convertCodeableConcept(t)); - if (src.hasName()) - tgt.setName(convertHumanName(src.getName())); - for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - if (src.hasAddress()) - tgt.setAddress(convertAddress(src.getAddress())); - if (src.hasGender()) - tgt.setGender(convertAdministrativeGender(src.getGender())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.r4.model.Patient.ContactComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Patient.ContactComponent tgt = new org.hl7.fhir.dstu3.model.Patient.ContactComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRelationship()) - tgt.addRelationship(convertCodeableConcept(t)); - if (src.hasName()) - tgt.setName(convertHumanName(src.getName())); - for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) - tgt.addTelecom(convertContactPoint(t)); - if (src.hasAddress()) - tgt.setAddress(convertAddress(src.getAddress())); - if (src.hasGender()) - tgt.setGender(convertAdministrativeGender(src.getGender())); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.dstu3.model.Patient.AnimalComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Patient.AnimalComponent tgt = new org.hl7.fhir.r4.model.Patient.AnimalComponent(); - copyElement(src, tgt); - if (src.hasSpecies()) - tgt.setSpecies(convertCodeableConcept(src.getSpecies())); - if (src.hasBreed()) - tgt.setBreed(convertCodeableConcept(src.getBreed())); - if (src.hasGenderStatus()) - tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.r4.model.Patient.AnimalComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Patient.AnimalComponent tgt = new org.hl7.fhir.dstu3.model.Patient.AnimalComponent(); - copyElement(src, tgt); - if (src.hasSpecies()) - tgt.setSpecies(convertCodeableConcept(src.getSpecies())); - if (src.hasBreed()) - tgt.setBreed(convertCodeableConcept(src.getBreed())); - if (src.hasGenderStatus()) - tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus())); - return tgt; - } - public static org.hl7.fhir.r4.model.Patient.PatientCommunicationComponent convertPatientCommunicationComponent(org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent src) throws FHIRException { if (src == null) return null; @@ -19952,29 +16296,33 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Patient.LinkType convertLinkType(org.hl7.fhir.dstu3.model.Patient.LinkType src) throws FHIRException { + public static org.hl7.fhir.r4.model.Claim.PayeeComponent convertPayeeComponent(org.hl7.fhir.dstu3.model.Claim.PayeeComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case REPLACEDBY: return org.hl7.fhir.r4.model.Patient.LinkType.REPLACEDBY; - case REPLACES: return org.hl7.fhir.r4.model.Patient.LinkType.REPLACES; - case REFER: return org.hl7.fhir.r4.model.Patient.LinkType.REFER; - case SEEALSO: return org.hl7.fhir.r4.model.Patient.LinkType.SEEALSO; - default: return org.hl7.fhir.r4.model.Patient.LinkType.NULL; + org.hl7.fhir.r4.model.Claim.PayeeComponent tgt = new org.hl7.fhir.r4.model.Claim.PayeeComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasResourceType()) + tgt.setResource(convertCoding(src.getResourceType())); + if (src.hasParty()) + tgt.setParty(convertReference(src.getParty())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Patient.LinkType convertLinkType(org.hl7.fhir.r4.model.Patient.LinkType src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Claim.PayeeComponent convertPayeeComponent(org.hl7.fhir.r4.model.Claim.PayeeComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case REPLACEDBY: return org.hl7.fhir.dstu3.model.Patient.LinkType.REPLACEDBY; - case REPLACES: return org.hl7.fhir.dstu3.model.Patient.LinkType.REPLACES; - case REFER: return org.hl7.fhir.dstu3.model.Patient.LinkType.REFER; - case SEEALSO: return org.hl7.fhir.dstu3.model.Patient.LinkType.SEEALSO; - default: return org.hl7.fhir.dstu3.model.Patient.LinkType.NULL; + org.hl7.fhir.dstu3.model.Claim.PayeeComponent tgt = new org.hl7.fhir.dstu3.model.Claim.PayeeComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasResource()) + tgt.setResourceType(convertCoding(src.getResource())); + if (src.hasParty()) + tgt.setParty(convertReference(src.getParty())); + return tgt; } -} public static org.hl7.fhir.r4.model.PaymentNotice convertPaymentNotice(org.hl7.fhir.dstu3.model.PaymentNotice src) throws FHIRException { if (src == null) @@ -20056,167 +16404,27 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.PaymentReconciliation convertPaymentReconciliation(org.hl7.fhir.dstu3.model.PaymentReconciliation src) throws FHIRException { + public static org.hl7.fhir.r4.model.Period convertPeriod(org.hl7.fhir.dstu3.model.Period src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.PaymentReconciliation tgt = new org.hl7.fhir.r4.model.PaymentReconciliation(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertPaymentReconciliationStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - for (org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent t : src.getDetail()) - tgt.addDetail(convertDetailsComponent(t)); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - if (src.hasTotal()) - tgt.setTotal(convertMoney(src.getTotal())); - for (org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent t : src.getProcessNote()) - tgt.addProcessNote(convertNotesComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PaymentReconciliation convertPaymentReconciliation(org.hl7.fhir.r4.model.PaymentReconciliation src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PaymentReconciliation tgt = new org.hl7.fhir.dstu3.model.PaymentReconciliation(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertPaymentReconciliationStatus(src.getStatus())); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - for (org.hl7.fhir.r4.model.PaymentReconciliation.DetailsComponent t : src.getDetail()) - tgt.addDetail(convertDetailsComponent(t)); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - if (src.hasTotal()) - tgt.setTotal(convertMoney(src.getTotal())); - for (org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent t : src.getProcessNote()) - tgt.addProcessNote(convertNotesComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus convertPaymentReconciliationStatus(org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus convertPaymentReconciliationStatus(org.hl7.fhir.r4.model.PaymentReconciliation.PaymentReconciliationStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.PaymentReconciliation.PaymentReconciliationStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.PaymentReconciliation.DetailsComponent convertDetailsComponent(org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PaymentReconciliation.DetailsComponent tgt = new org.hl7.fhir.r4.model.PaymentReconciliation.DetailsComponent(); + org.hl7.fhir.r4.model.Period tgt = new org.hl7.fhir.r4.model.Period(); copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasResponse()) - tgt.setResponse(convertReference(src.getResponse())); - if (src.hasSubmitter()) - tgt.setSubmitter(convertReference(src.getSubmitter())); - if (src.hasPayee()) - tgt.setPayee(convertReference(src.getPayee())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); + if (src.hasStart()) + tgt.setStart(src.getStart()); + if (src.hasEnd()) + tgt.setEnd(src.getEnd()); return tgt; } - public static org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent convertDetailsComponent(org.hl7.fhir.r4.model.PaymentReconciliation.DetailsComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Period convertPeriod(org.hl7.fhir.r4.model.Period src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent tgt = new org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent(); + org.hl7.fhir.dstu3.model.Period tgt = new org.hl7.fhir.dstu3.model.Period(); copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasResponse()) - tgt.setResponse(convertReference(src.getResponse())); - if (src.hasSubmitter()) - tgt.setSubmitter(convertReference(src.getSubmitter())); - if (src.hasPayee()) - tgt.setPayee(convertReference(src.getPayee())); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasAmount()) - tgt.setAmount(convertMoney(src.getAmount())); - return tgt; - } - - public static org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent convertNotesComponent(org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent tgt = new org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent convertNotesComponent(org.hl7.fhir.r4.model.PaymentReconciliation.NotesComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent tgt = new org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); + if (src.hasStart()) + tgt.setStart(src.getStart()); + if (src.hasEnd()) + tgt.setEnd(src.getEnd()); return tgt; } @@ -20300,641 +16508,15 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LEVEL1: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL1; - case LEVEL2: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL2; - case LEVEL3: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL3; - case LEVEL4: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.LEVEL4; - default: return org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.r4.model.Person.IdentityAssuranceLevel src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case LEVEL1: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL1; - case LEVEL2: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL2; - case LEVEL3: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL3; - case LEVEL4: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL4; - default: return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.NULL; - } -} - - public static org.hl7.fhir.r4.model.PlanDefinition convertPlanDefinition(org.hl7.fhir.dstu3.model.PlanDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition tgt = new org.hl7.fhir.r4.model.PlanDefinition(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); - if (src.hasEffectivePeriod()) - tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod())); - for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTopic()) - tgt.addTopic(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) - tgt.addContributor(convertContributor(t)); - for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) - tgt.addRelatedArtifact(convertRelatedArtifact(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getLibrary()) - tgt.addLibrary(convertReference(t)); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent t : src.getGoal()) - tgt.addGoal(convertPlanDefinitionGoalComponent(t)); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) - tgt.addAction(convertPlanDefinitionActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition convertPlanDefinition(org.hl7.fhir.r4.model.PlanDefinition src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition tgt = new org.hl7.fhir.dstu3.model.PlanDefinition(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); - if (src.hasEffectivePeriod()) - tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod())); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic()) - tgt.addTopic(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Contributor t : src.getContributor()) - tgt.addContributor(convertContributor(t)); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) - tgt.addRelatedArtifact(convertRelatedArtifact(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getLibrary()) - tgt.addLibrary(convertReference(t)); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent t : src.getGoal()) - tgt.addGoal(convertPlanDefinitionGoalComponent(t)); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) - tgt.addAction(convertPlanDefinitionActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent convertPlanDefinitionGoalComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent(); + public static org.hl7.fhir.r4.model.PositiveIntType convertPositiveInt(org.hl7.fhir.dstu3.model.PositiveIntType src) throws FHIRException { + org.hl7.fhir.r4.model.PositiveIntType tgt = new org.hl7.fhir.r4.model.PositiveIntType(src.getValue()); copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasDescription()) - tgt.setDescription(convertCodeableConcept(src.getDescription())); - if (src.hasPriority()) - tgt.setPriority(convertCodeableConcept(src.getPriority())); - if (src.hasStart()) - tgt.setStart(convertCodeableConcept(src.getStart())); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAddresses()) - tgt.addAddresses(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getDocumentation()) - tgt.addDocumentation(convertRelatedArtifact(t)); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent t : src.getTarget()) - tgt.addTarget(convertPlanDefinitionGoalTargetComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent convertPlanDefinitionGoalComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent(); + public static org.hl7.fhir.dstu3.model.PositiveIntType convertPositiveInt(org.hl7.fhir.r4.model.PositiveIntType src) throws FHIRException { + org.hl7.fhir.dstu3.model.PositiveIntType tgt = new org.hl7.fhir.dstu3.model.PositiveIntType(src.getValue()); copyElement(src, tgt); - if (src.hasCategory()) - tgt.setCategory(convertCodeableConcept(src.getCategory())); - if (src.hasDescription()) - tgt.setDescription(convertCodeableConcept(src.getDescription())); - if (src.hasPriority()) - tgt.setPriority(convertCodeableConcept(src.getPriority())); - if (src.hasStart()) - tgt.setStart(convertCodeableConcept(src.getStart())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAddresses()) - tgt.addAddresses(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getDocumentation()) - tgt.addDocumentation(convertRelatedArtifact(t)); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent t : src.getTarget()) - tgt.addTarget(convertPlanDefinitionGoalTargetComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent convertPlanDefinitionGoalTargetComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent(); - copyElement(src, tgt); - if (src.hasMeasure()) - tgt.setMeasure(convertCodeableConcept(src.getMeasure())); - if (src.hasDetail()) - tgt.setDetail(convertType(src.getDetail())); - if (src.hasDue()) - tgt.setDue(convertDuration(src.getDue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent convertPlanDefinitionGoalTargetComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent(); - copyElement(src, tgt); - if (src.hasMeasure()) - tgt.setMeasure(convertCodeableConcept(src.getMeasure())); - if (src.hasDetail()) - tgt.setDetail(convertType(src.getDetail())); - if (src.hasDue()) - tgt.setDue(convertDuration(src.getDue())); - return tgt; - } - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent convertPlanDefinitionActionComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getDocumentation()) - tgt.addDocumentation(convertRelatedArtifact(t)); - for (org.hl7.fhir.dstu3.model.IdType t : src.getGoalId()) - tgt.addGoalId(t.getValue()); - for (org.hl7.fhir.dstu3.model.TriggerDefinition t : src.getTriggerDefinition()) - tgt.addTriggerDefinition(convertTriggerDefinition(t)); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent t : src.getCondition()) - tgt.addCondition(convertPlanDefinitionActionConditionComponent(t)); - for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getInput()) - tgt.addInput(convertDataRequirement(t)); - for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getOutput()) - tgt.addOutput(convertDataRequirement(t)); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent t : src.getRelatedAction()) - tgt.addRelatedAction(convertPlanDefinitionActionRelatedActionComponent(t)); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent t : src.getParticipant()) - tgt.addParticipant(convertPlanDefinitionActionParticipantComponent(t)); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasGroupingBehavior()) - tgt.setGroupingBehavior(convertActionGroupingBehavior(src.getGroupingBehavior())); - if (src.hasSelectionBehavior()) - tgt.setSelectionBehavior(convertActionSelectionBehavior(src.getSelectionBehavior())); - if (src.hasRequiredBehavior()) - tgt.setRequiredBehavior(convertActionRequiredBehavior(src.getRequiredBehavior())); - if (src.hasPrecheckBehavior()) - tgt.setPrecheckBehavior(convertActionPrecheckBehavior(src.getPrecheckBehavior())); - if (src.hasCardinalityBehavior()) - tgt.setCardinalityBehavior(convertActionCardinalityBehavior(src.getCardinalityBehavior())); - if (src.hasDefinition()) - tgt.setDefinition(convertReference(src.getDefinition())); - if (src.hasTransform()) - tgt.setTransform(convertReference(src.getTransform())); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent t : src.getDynamicValue()) - tgt.addDynamicValue(convertPlanDefinitionActionDynamicValueComponent(t)); - for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) - tgt.addAction(convertPlanDefinitionActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent convertPlanDefinitionActionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) - tgt.addReason(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getDocumentation()) - tgt.addDocumentation(convertRelatedArtifact(t)); - for (org.hl7.fhir.r4.model.IdType t : src.getGoalId()) - tgt.addGoalId(t.getValue()); - for (org.hl7.fhir.r4.model.TriggerDefinition t : src.getTriggerDefinition()) - tgt.addTriggerDefinition(convertTriggerDefinition(t)); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent t : src.getCondition()) - tgt.addCondition(convertPlanDefinitionActionConditionComponent(t)); - for (org.hl7.fhir.r4.model.DataRequirement t : src.getInput()) - tgt.addInput(convertDataRequirement(t)); - for (org.hl7.fhir.r4.model.DataRequirement t : src.getOutput()) - tgt.addOutput(convertDataRequirement(t)); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent t : src.getRelatedAction()) - tgt.addRelatedAction(convertPlanDefinitionActionRelatedActionComponent(t)); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent t : src.getParticipant()) - tgt.addParticipant(convertPlanDefinitionActionParticipantComponent(t)); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasGroupingBehavior()) - tgt.setGroupingBehavior(convertActionGroupingBehavior(src.getGroupingBehavior())); - if (src.hasSelectionBehavior()) - tgt.setSelectionBehavior(convertActionSelectionBehavior(src.getSelectionBehavior())); - if (src.hasRequiredBehavior()) - tgt.setRequiredBehavior(convertActionRequiredBehavior(src.getRequiredBehavior())); - if (src.hasPrecheckBehavior()) - tgt.setPrecheckBehavior(convertActionPrecheckBehavior(src.getPrecheckBehavior())); - if (src.hasCardinalityBehavior()) - tgt.setCardinalityBehavior(convertActionCardinalityBehavior(src.getCardinalityBehavior())); - if (src.hasDefinition()) - tgt.setDefinition(convertReference(src.getDefinition())); - if (src.hasTransform()) - tgt.setTransform(convertReference(src.getTransform())); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent t : src.getDynamicValue()) - tgt.addDynamicValue(convertPlanDefinitionActionDynamicValueComponent(t)); - for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) - tgt.addAction(convertPlanDefinitionActionComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior convertActionGroupingBehavior(org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case VISUALGROUP: return org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.VISUALGROUP; - case LOGICALGROUP: return org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.LOGICALGROUP; - case SENTENCEGROUP: return org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.SENTENCEGROUP; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior convertActionGroupingBehavior(org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case VISUALGROUP: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.VISUALGROUP; - case LOGICALGROUP: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.LOGICALGROUP; - case SENTENCEGROUP: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.SENTENCEGROUP; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior convertActionSelectionBehavior(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ANY: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ANY; - case ALL: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ALL; - case ALLORNONE: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ALLORNONE; - case EXACTLYONE: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.EXACTLYONE; - case ATMOSTONE: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ATMOSTONE; - case ONEORMORE: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ONEORMORE; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior convertActionSelectionBehavior(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ANY: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ANY; - case ALL: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ALL; - case ALLORNONE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ALLORNONE; - case EXACTLYONE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.EXACTLYONE; - case ATMOSTONE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ATMOSTONE; - case ONEORMORE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ONEORMORE; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior convertActionRequiredBehavior(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MUST: return org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.MUST; - case COULD: return org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.COULD; - case MUSTUNLESSDOCUMENTED: return org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior convertActionRequiredBehavior(org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MUST: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.MUST; - case COULD: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.COULD; - case MUSTUNLESSDOCUMENTED: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior convertActionPrecheckBehavior(org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case YES: return org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior.YES; - case NO: return org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior.NO; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior convertActionPrecheckBehavior(org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case YES: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior.YES; - case NO: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior.NO; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior convertActionCardinalityBehavior(org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SINGLE: return org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior.SINGLE; - case MULTIPLE: return org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior.MULTIPLE; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior convertActionCardinalityBehavior(org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SINGLE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior.SINGLE; - case MULTIPLE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior.MULTIPLE; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior.NULL; - } -} - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent convertPlanDefinitionActionConditionComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent(); - copyElement(src, tgt); - if (src.hasKind()) - tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent convertPlanDefinitionActionConditionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent(); - copyElement(src, tgt); - if (src.hasKind()) - tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - return tgt; - } - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind convertActionConditionKind(org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case APPLICABILITY: return org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.APPLICABILITY; - case START: return org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.START; - case STOP: return org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.STOP; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind convertActionConditionKind(org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case APPLICABILITY: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.APPLICABILITY; - case START: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.START; - case STOP: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.STOP; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.NULL; - } -} - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent convertPlanDefinitionActionRelatedActionComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); - copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); - if (src.hasRelationship()) - tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); - if (src.hasOffset()) - tgt.setOffset(convertType(src.getOffset())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent convertPlanDefinitionActionRelatedActionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); - copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); - if (src.hasRelationship()) - tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); - if (src.hasOffset()) - tgt.setOffset(convertType(src.getOffset())); - return tgt; - } - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType convertActionRelationshipType(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BEFORESTART: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.BEFORESTART; - case BEFORE: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.BEFORE; - case BEFOREEND: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.BEFOREEND; - case CONCURRENTWITHSTART: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHSTART; - case CONCURRENT: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.CONCURRENT; - case CONCURRENTWITHEND: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHEND; - case AFTERSTART: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.AFTERSTART; - case AFTER: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.AFTER; - case AFTEREND: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.AFTEREND; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType convertActionRelationshipType(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BEFORESTART: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.BEFORESTART; - case BEFORE: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.BEFORE; - case BEFOREEND: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.BEFOREEND; - case CONCURRENTWITHSTART: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHSTART; - case CONCURRENT: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.CONCURRENT; - case CONCURRENTWITHEND: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHEND; - case AFTERSTART: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.AFTERSTART; - case AFTER: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.AFTER; - case AFTEREND: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.AFTEREND; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.NULL; - } -} - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent convertPlanDefinitionActionParticipantComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertActionParticipantType(src.getType())); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent convertPlanDefinitionActionParticipantComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertActionParticipantType(src.getType())); - if (src.hasRole()) - tgt.setRole(convertCodeableConcept(src.getRole())); - return tgt; - } - - private static org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType convertActionParticipantType(org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PATIENT: return org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.PATIENT; - case PRACTITIONER: return org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.PRACTITIONER; - case RELATEDPERSON: return org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.RELATEDPERSON; - default: return org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType convertActionParticipantType(org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PATIENT: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.PATIENT; - case PRACTITIONER: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.PRACTITIONER; - case RELATEDPERSON: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.RELATEDPERSON; - default: return org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.NULL; - } -} - - public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent convertPlanDefinitionActionDynamicValueComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); - copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent convertPlanDefinitionActionDynamicValueComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); - copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); return tgt; } @@ -21130,36 +16712,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.MON; - case TUE: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.TUE; - case WED: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.WED; - case THU: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.THU; - case FRI: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.FRI; - case SAT: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.SAT; - case SUN: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.SUN; - default: return org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.r4.model.PractitionerRole.DaysOfWeek src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MON: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.MON; - case TUE: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.TUE; - case WED: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.WED; - case THU: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.THU; - case FRI: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.FRI; - case SAT: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.SAT; - case SUN: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.SUN; - default: return org.hl7.fhir.dstu3.model.PractitionerRole.DaysOfWeek.NULL; - } -} - public static org.hl7.fhir.r4.model.PractitionerRole.PractitionerRoleNotAvailableComponent convertPractitionerRoleNotAvailableComponent(org.hl7.fhir.dstu3.model.PractitionerRole.PractitionerRoleNotAvailableComponent src) throws FHIRException { if (src == null) return null; @@ -21304,35 +16856,57 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.Claim.ProcedureComponent convertProcedureComponent(org.hl7.fhir.dstu3.model.Claim.ProcedureComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PREPARATION: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.PREPARATION; - case INPROGRESS: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.INPROGRESS; - case SUSPENDED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.SUSPENDED; - case ABORTED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ABORTED; - case COMPLETED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.NULL; + org.hl7.fhir.r4.model.Claim.ProcedureComponent tgt = new org.hl7.fhir.r4.model.Claim.ProcedureComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasProcedure()) + tgt.setProcedure(convertType(src.getProcedure())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.r4.model.Procedure.ProcedureStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Claim.ProcedureComponent convertProcedureComponent(org.hl7.fhir.r4.model.Claim.ProcedureComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case PREPARATION: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.PREPARATION; - case INPROGRESS: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.INPROGRESS; - case SUSPENDED: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.SUSPENDED; - case ABORTED: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.ABORTED; - case COMPLETED: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.NULL; + org.hl7.fhir.dstu3.model.Claim.ProcedureComponent tgt = new org.hl7.fhir.dstu3.model.Claim.ProcedureComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasDate()) + tgt.setDate(src.getDate()); + if (src.hasProcedure()) + tgt.setProcedure(convertType(src.getProcedure())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent(); + copyElement(src, tgt); + if (src.hasAction()) + tgt.setAction(convertCodeableConcept(src.getAction())); + if (src.hasManipulated()) + tgt.setManipulated(convertReference(src.getManipulated())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent(); + copyElement(src, tgt); + if (src.hasAction()) + tgt.setAction(convertCodeableConcept(src.getAction())); + if (src.hasManipulated()) + tgt.setManipulated(convertReference(src.getManipulated())); + return tgt; } -} public static org.hl7.fhir.r4.model.Procedure.ProcedurePerformerComponent convertProcedurePerformerComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent src) throws FHIRException { if (src == null) @@ -21362,30 +16936,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent(); - copyElement(src, tgt); - if (src.hasAction()) - tgt.setAction(convertCodeableConcept(src.getAction())); - if (src.hasManipulated()) - tgt.setManipulated(convertReference(src.getManipulated())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.r4.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent(); - copyElement(src, tgt); - if (src.hasAction()) - tgt.setAction(convertCodeableConcept(src.getAction())); - if (src.hasManipulated()) - tgt.setManipulated(convertReference(src.getManipulated())); - return tgt; - } - public static org.hl7.fhir.r4.model.ProcedureRequest convertProcedureRequest(org.hl7.fhir.dstu3.model.ProcedureRequest src) throws FHIRException { if (src == null) return null; @@ -21506,36 +17056,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.NULL; - } -} - private static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestIntent convertProcedureRequestIntent(org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestIntent src) throws FHIRException { if (src == null) return null; @@ -21616,6 +17136,66 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PREPARATION: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.PREPARATION; + case INPROGRESS: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.INPROGRESS; + case SUSPENDED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.SUSPENDED; + case ABORTED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ABORTED; + case COMPLETED: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Procedure.ProcedureStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.r4.model.Procedure.ProcedureStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PREPARATION: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.PREPARATION; + case INPROGRESS: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.INPROGRESS; + case SUSPENDED: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.SUSPENDED; + case ABORTED: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.ABORTED; + case COMPLETED: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.ProcessRequest convertProcessRequest(org.hl7.fhir.dstu3.model.ProcessRequest src) throws FHIRException { if (src == null) return null; @@ -21716,166 +17296,92 @@ public class VersionConvertor_30_40 { } } - private static org.hl7.fhir.r4.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.dstu3.model.ProcessRequest.ActionList src) throws FHIRException { + public static org.hl7.fhir.r4.model.CodeSystem.PropertyComponent convertPropertyComponent(org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case CANCEL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.CANCEL; - case POLL: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.POLL; - case REPROCESS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.REPROCESS; - case STATUS: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.STATUS; - default: return org.hl7.fhir.r4.model.ProcessRequest.ActionList.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ProcessRequest.ActionList convertActionList(org.hl7.fhir.r4.model.ProcessRequest.ActionList src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case CANCEL: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.CANCEL; - case POLL: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.POLL; - case REPROCESS: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.REPROCESS; - case STATUS: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.STATUS; - default: return org.hl7.fhir.dstu3.model.ProcessRequest.ActionList.NULL; - } -} - - public static org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.r4.model.ProcessRequest.ItemsComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent tgt = new org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent(); - copyElement(src, tgt); - if (src.hasSequenceLinkId()) - tgt.setSequenceLinkId(src.getSequenceLinkId()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ProcessResponse convertProcessResponse(org.hl7.fhir.dstu3.model.ProcessResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ProcessResponse tgt = new org.hl7.fhir.r4.model.ProcessResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertProcessResponseStatus(src.getStatus())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseProcessNoteComponent t : src.getProcessNote()) - tgt.addProcessNote(convertProcessResponseProcessNoteComponent(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getError()) - tgt.addError(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getCommunicationRequest()) - tgt.addCommunicationRequest(convertReference(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ProcessResponse convertProcessResponse(org.hl7.fhir.r4.model.ProcessResponse src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ProcessResponse tgt = new org.hl7.fhir.dstu3.model.ProcessResponse(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatus(convertProcessResponseStatus(src.getStatus())); - if (src.hasCreated()) - tgt.setCreated(src.getCreated()); - if (src.hasOrganization()) - tgt.setOrganization(convertReference(src.getOrganization())); - if (src.hasRequest()) - tgt.setRequest(convertReference(src.getRequest())); - if (src.hasOutcome()) - tgt.setOutcome(convertCodeableConcept(src.getOutcome())); - if (src.hasDisposition()) - tgt.setDisposition(src.getDisposition()); - if (src.hasRequestProvider()) - tgt.setRequestProvider(convertReference(src.getRequestProvider())); - if (src.hasRequestOrganization()) - tgt.setRequestOrganization(convertReference(src.getRequestOrganization())); - if (src.hasForm()) - tgt.setForm(convertCodeableConcept(src.getForm())); - for (org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseProcessNoteComponent t : src.getProcessNote()) - tgt.addProcessNote(convertProcessResponseProcessNoteComponent(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getError()) - tgt.addError(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getCommunicationRequest()) - tgt.addCommunicationRequest(convertReference(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus convertProcessResponseStatus(org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus convertProcessResponseStatus(org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseStatus.NULL; - } -} - - public static org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseProcessNoteComponent convertProcessResponseProcessNoteComponent(org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseProcessNoteComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseProcessNoteComponent tgt = new org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseProcessNoteComponent(); + org.hl7.fhir.r4.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.r4.model.CodeSystem.PropertyComponent(); copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasUri()) + tgt.setUri(src.getUri()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); + tgt.setType(convertPropertyType(src.getType())); return tgt; } - public static org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseProcessNoteComponent convertProcessResponseProcessNoteComponent(org.hl7.fhir.r4.model.ProcessResponse.ProcessResponseProcessNoteComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent convertPropertyComponent(org.hl7.fhir.r4.model.CodeSystem.PropertyComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseProcessNoteComponent tgt = new org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseProcessNoteComponent(); + org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent tgt = new org.hl7.fhir.dstu3.model.CodeSystem.PropertyComponent(); copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasUri()) + tgt.setUri(src.getUri()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasText()) - tgt.setText(src.getText()); + tgt.setType(convertPropertyType(src.getType())); return tgt; } + private static org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case XMLATTR: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XMLATTR; + case XMLTEXT: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XMLTEXT; + case TYPEATTR: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.TYPEATTR; + case CDATEXT: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.CDATEXT; + case XHTML: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.XHTML; + default: return org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation convertPropertyRepresentation(org.hl7.fhir.r4.model.ElementDefinition.PropertyRepresentation src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case XMLATTR: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.XMLATTR; + case XMLTEXT: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.XMLTEXT; + case TYPEATTR: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.TYPEATTR; + case CDATEXT: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.CDATEXT; + case XHTML: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.XHTML; + default: return org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation.NULL; + } +} + + private static org.hl7.fhir.r4.model.CodeSystem.PropertyType convertPropertyType(org.hl7.fhir.dstu3.model.CodeSystem.PropertyType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CODE: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.CODE; + case CODING: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.CODING; + case STRING: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.STRING; + case INTEGER: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.INTEGER; + case BOOLEAN: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.BOOLEAN; + case DATETIME: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.DATETIME; + default: return org.hl7.fhir.r4.model.CodeSystem.PropertyType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CodeSystem.PropertyType convertPropertyType(org.hl7.fhir.r4.model.CodeSystem.PropertyType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CODE: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.CODE; + case CODING: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.CODING; + case STRING: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.STRING; + case INTEGER: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.INTEGER; + case BOOLEAN: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.BOOLEAN; + case DATETIME: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.DATETIME; + default: return org.hl7.fhir.dstu3.model.CodeSystem.PropertyType.NULL; + } +} + public static org.hl7.fhir.r4.model.Provenance convertProvenance(org.hl7.fhir.dstu3.model.Provenance src) throws FHIRException { if (src == null) return null; @@ -21883,18 +17389,12 @@ public class VersionConvertor_30_40 { copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Reference t : src.getTarget()) tgt.addTarget(convertReference(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); if (src.hasRecorded()) tgt.setRecorded(src.getRecorded()); for (org.hl7.fhir.dstu3.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); if (src.hasLocation()) tgt.setLocation(convertReference(src.getLocation())); - for (org.hl7.fhir.dstu3.model.Coding t : src.getReason()) - tgt.addReason(convertCoding(t)); - if (src.hasActivity()) - tgt.setActivity(convertCoding(src.getActivity())); for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.addAgent(convertProvenanceAgentComponent(t)); for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent t : src.getEntity()) @@ -21911,18 +17411,12 @@ public class VersionConvertor_30_40 { copyDomainResource(src, tgt); for (org.hl7.fhir.r4.model.Reference t : src.getTarget()) tgt.addTarget(convertReference(t)); - if (src.hasPeriod()) - tgt.setPeriod(convertPeriod(src.getPeriod())); if (src.hasRecorded()) tgt.setRecorded(src.getRecorded()); for (org.hl7.fhir.r4.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); if (src.hasLocation()) tgt.setLocation(convertReference(src.getLocation())); - for (org.hl7.fhir.r4.model.Coding t : src.getReason()) - tgt.addReason(convertCoding(t)); - if (src.hasActivity()) - tgt.setActivity(convertCoding(src.getActivity())); for (org.hl7.fhir.r4.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.addAgent(convertProvenanceAgentComponent(t)); for (org.hl7.fhir.r4.model.Provenance.ProvenanceEntityComponent t : src.getEntity()) @@ -21943,8 +17437,6 @@ public class VersionConvertor_30_40 { tgt.setWho(convertType(src.getWho())); if (src.hasOnBehalfOf()) tgt.setOnBehalfOf(convertType(src.getOnBehalfOf())); - if (src.hasRelatedAgentType()) - tgt.setRelatedAgentType(convertCodeableConcept(src.getRelatedAgentType())); return tgt; } @@ -21959,8 +17451,6 @@ public class VersionConvertor_30_40 { tgt.setWho(convertType(src.getWho())); if (src.hasOnBehalfOf()) tgt.setOnBehalfOf(convertType(src.getOnBehalfOf())); - if (src.hasRelatedAgentType()) - tgt.setRelatedAgentType(convertCodeableConcept(src.getRelatedAgentType())); return tgt; } @@ -22018,6 +17508,112 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.Enumerations.PublicationStatus convertPublicationStatus(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE; + case RETIRED: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED; + case UNKNOWN: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus convertPublicationStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.ACTIVE; + case RETIRED: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.RETIRED; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.NULL; + } +} + + private static org.hl7.fhir.r4.model.Sequence.QualityType convertQualityType(org.hl7.fhir.dstu3.model.Sequence.QualityType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INDEL: return org.hl7.fhir.r4.model.Sequence.QualityType.INDEL; + case SNP: return org.hl7.fhir.r4.model.Sequence.QualityType.SNP; + case UNKNOWN: return org.hl7.fhir.r4.model.Sequence.QualityType.UNKNOWN; + default: return org.hl7.fhir.r4.model.Sequence.QualityType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Sequence.QualityType convertQualityType(org.hl7.fhir.r4.model.Sequence.QualityType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INDEL: return org.hl7.fhir.dstu3.model.Sequence.QualityType.INDEL; + case SNP: return org.hl7.fhir.dstu3.model.Sequence.QualityType.SNP; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Sequence.QualityType.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Sequence.QualityType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Quantity convertQuantity(org.hl7.fhir.dstu3.model.Quantity src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Quantity tgt = new org.hl7.fhir.r4.model.Quantity(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasComparator()) + tgt.setComparator(convertQuantityComparator(src.getComparator())); + if (src.hasUnit()) + tgt.setUnit(src.getUnit()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Quantity convertQuantity(org.hl7.fhir.r4.model.Quantity src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Quantity tgt = new org.hl7.fhir.dstu3.model.Quantity(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasComparator()) + tgt.setComparator(convertQuantityComparator(src.getComparator())); + if (src.hasUnit()) + tgt.setUnit(src.getUnit()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + return tgt; + } + + private static org.hl7.fhir.r4.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.dstu3.model.Quantity.QuantityComparator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LESS_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_THAN; + case LESS_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.LESS_OR_EQUAL; + case GREATER_OR_EQUAL: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; + case GREATER_THAN: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.GREATER_THAN; + default: return org.hl7.fhir.r4.model.Quantity.QuantityComparator.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Quantity.QuantityComparator convertQuantityComparator(org.hl7.fhir.r4.model.Quantity.QuantityComparator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LESS_THAN: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.LESS_THAN; + case LESS_OR_EQUAL: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.LESS_OR_EQUAL; + case GREATER_OR_EQUAL: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.GREATER_OR_EQUAL; + case GREATER_THAN: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.GREATER_THAN; + default: return org.hl7.fhir.dstu3.model.Quantity.QuantityComparator.NULL; + } +} + public static org.hl7.fhir.r4.model.Questionnaire convertQuestionnaire(org.hl7.fhir.dstu3.model.Questionnaire src) throws FHIRException { if (src == null) return null; @@ -22194,6 +17790,54 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent convertQuestionnaireItemEnableWhenComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); + copyElement(src, tgt); + if (src.hasQuestion()) + tgt.setQuestion(src.getQuestion()); + if (src.hasHasAnswer()) + tgt.setHasAnswer(src.getHasAnswer()); + if (src.hasAnswer()) + tgt.setAnswer(convertType(src.getAnswer())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent convertQuestionnaireItemEnableWhenComponent(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); + copyElement(src, tgt); + if (src.hasQuestion()) + tgt.setQuestion(src.getQuestion()); + if (src.hasHasAnswer()) + tgt.setHasAnswer(src.getHasAnswer()); + if (src.hasAnswer()) + tgt.setAnswer(convertType(src.getAnswer())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent convertQuestionnaireItemOptionComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent convertQuestionnaireItemOptionComponent(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + private static org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType convertQuestionnaireItemType(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType src) throws FHIRException { if (src == null) return null; @@ -22244,54 +17888,6 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent convertQuestionnaireItemEnableWhenComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); - copyElement(src, tgt); - if (src.hasQuestion()) - tgt.setQuestion(src.getQuestion()); - if (src.hasHasAnswer()) - tgt.setHasAnswer(src.getHasAnswer()); - if (src.hasAnswer()) - tgt.setAnswer(convertType(src.getAnswer())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent convertQuestionnaireItemEnableWhenComponent(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemEnableWhenComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent(); - copyElement(src, tgt); - if (src.hasQuestion()) - tgt.setQuestion(src.getQuestion()); - if (src.hasHasAnswer()) - tgt.setHasAnswer(src.getHasAnswer()); - if (src.hasAnswer()) - tgt.setAnswer(convertType(src.getAnswer())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent convertQuestionnaireItemOptionComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent convertQuestionnaireItemOptionComponent(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemOptionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent(); - copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - public static org.hl7.fhir.r4.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.dstu3.model.QuestionnaireResponse src) throws FHIRException { if (src == null) return null; @@ -22352,31 +17948,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; - case AMENDED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.STOPPED; - default: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; + org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) + tgt.addItem(convertQuestionnaireResponseItemComponent(t)); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case INPROGRESS: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; - case COMPLETED: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; - case AMENDED: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.ENTEREDINERROR; - case STOPPED: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.STOPPED; - default: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; + org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) + tgt.addItem(convertQuestionnaireResponseItemComponent(t)); + return tgt; } -} public static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseItemComponent(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException { if (src == null) @@ -22418,30 +18012,168 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); + switch (src) { + case INPROGRESS: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; + case AMENDED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.STOPPED; + default: return org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case INPROGRESS: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS; + case COMPLETED: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED; + case AMENDED: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.ENTEREDINERROR; + case STOPPED: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.STOPPED; + default: return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Range convertRange(org.hl7.fhir.dstu3.model.Range src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Range tgt = new org.hl7.fhir.r4.model.Range(); copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) - tgt.addItem(convertQuestionnaireResponseItemComponent(t)); + if (src.hasLow()) + tgt.setLow(convertSimpleQuantity(src.getLow())); + if (src.hasHigh()) + tgt.setHigh(convertSimpleQuantity(src.getHigh())); return tgt; } - public static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Range convertRange(org.hl7.fhir.r4.model.Range src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); + org.hl7.fhir.dstu3.model.Range tgt = new org.hl7.fhir.dstu3.model.Range(); copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) - tgt.addItem(convertQuestionnaireResponseItemComponent(t)); + if (src.hasLow()) + tgt.setLow(convertSimpleQuantity(src.getLow())); + if (src.hasHigh()) + tgt.setHigh(convertSimpleQuantity(src.getHigh())); return tgt; } + public static org.hl7.fhir.r4.model.Ratio convertRatio(org.hl7.fhir.dstu3.model.Ratio src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Ratio tgt = new org.hl7.fhir.r4.model.Ratio(); + copyElement(src, tgt); + if (src.hasNumerator()) + tgt.setNumerator(convertQuantity(src.getNumerator())); + if (src.hasDenominator()) + tgt.setDenominator(convertQuantity(src.getDenominator())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Ratio convertRatio(org.hl7.fhir.r4.model.Ratio src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Ratio tgt = new org.hl7.fhir.dstu3.model.Ratio(); + copyElement(src, tgt); + if (src.hasNumerator()) + tgt.setNumerator(convertQuantity(src.getNumerator())); + if (src.hasDenominator()) + tgt.setDenominator(convertQuantity(src.getDenominator())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); + copyElement(src, tgt); + if (src.hasReference()) + tgt.setReference(src.getReference()); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Reference convertReference(org.hl7.fhir.r4.model.Reference src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Reference tgt = new org.hl7.fhir.dstu3.model.Reference(); + copyElement(src, tgt); + if (src.hasReference()) + tgt.setReference(src.getReference()); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + return tgt; + } + + private static org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy convertReferenceHandlingPolicy(org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LITERAL: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.LITERAL; + case LOGICAL: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.LOGICAL; + case RESOLVES: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.RESOLVES; + case ENFORCED: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.ENFORCED; + case LOCAL: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.LOCAL; + default: return org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy convertReferenceHandlingPolicy(org.hl7.fhir.r4.model.CapabilityStatement.ReferenceHandlingPolicy src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case LITERAL: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.LITERAL; + case LOGICAL: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.LOGICAL; + case RESOLVES: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.RESOLVES; + case ENFORCED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.ENFORCED; + case LOCAL: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.LOCAL; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ReferenceHandlingPolicy.NULL; + } +} + + private static org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules convertReferenceVersionRules(org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EITHER: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.EITHER; + case INDEPENDENT: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.INDEPENDENT; + case SPECIFIC: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.SPECIFIC; + default: return org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules convertReferenceVersionRules(org.hl7.fhir.r4.model.ElementDefinition.ReferenceVersionRules src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EITHER: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.EITHER; + case INDEPENDENT: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.INDEPENDENT; + case SPECIFIC: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.SPECIFIC; + default: return org.hl7.fhir.dstu3.model.ElementDefinition.ReferenceVersionRules.NULL; + } +} + + private static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority convertReferralPriority(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case ROUTINE: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.URGENT; + case ASAP: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ASAP; + case STAT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.STAT; + default: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.NULL; + } +} + public static org.hl7.fhir.r4.model.ProcedureRequest convertReferralRequest(org.hl7.fhir.dstu3.model.ReferralRequest src) throws FHIRException { if (src == null) return null; @@ -22488,6 +18220,17 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestRequesterComponent convertReferralRequestRequesterComponent(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestRequesterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestRequesterComponent tgt = new org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestRequesterComponent(); + copyElement(src, tgt); + if (src.hasAgent()) + tgt.setAgent(convertReference(src.getAgent())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + return tgt; + } private static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus convertReferralRequestStatus(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus src) throws FHIRException { if (src == null) @@ -22504,31 +18247,129 @@ public class VersionConvertor_30_40 { } } - private static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority convertReferralPriority(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority src) throws FHIRException { + private static org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus convertReferredDocumentStatus(org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case ROUTINE: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.URGENT; - case ASAP: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.ASAP; - case STAT: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.STAT; - default: return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestPriority.NULL; + case PRELIMINARY: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus.NULL; } } - - public static org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestRequesterComponent convertReferralRequestRequesterComponent(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestRequesterComponent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus convertReferredDocumentStatus(org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestRequesterComponent tgt = new org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestRequesterComponent(); + switch (src) { + case PRELIMINARY: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.FINAL; + case AMENDED: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.AMENDED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.RelatedArtifact convertRelatedArtifact(org.hl7.fhir.dstu3.model.RelatedArtifact src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.RelatedArtifact tgt = new org.hl7.fhir.r4.model.RelatedArtifact(); copyElement(src, tgt); - if (src.hasAgent()) - tgt.setAgent(convertReference(src.getAgent())); - if (src.hasOnBehalfOf()) - tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf())); + if (src.hasType()) + tgt.setType(convertRelatedArtifactType(src.getType())); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + if (src.hasCitation()) + tgt.setCitation(src.getCitation()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + if (src.hasDocument()) + tgt.setDocument(convertAttachment(src.getDocument())); + if (src.hasResource()) + tgt.setResource(convertReference(src.getResource())); return tgt; } + public static org.hl7.fhir.dstu3.model.RelatedArtifact convertRelatedArtifact(org.hl7.fhir.r4.model.RelatedArtifact src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.RelatedArtifact tgt = new org.hl7.fhir.dstu3.model.RelatedArtifact(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertRelatedArtifactType(src.getType())); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + if (src.hasCitation()) + tgt.setCitation(src.getCitation()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + if (src.hasDocument()) + tgt.setDocument(convertAttachment(src.getDocument())); + if (src.hasResource()) + tgt.setResource(convertReference(src.getResource())); + return tgt; + } + + private static org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType convertRelatedArtifactType(org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DOCUMENTATION: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DOCUMENTATION; + case JUSTIFICATION: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.JUSTIFICATION; + case CITATION: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.CITATION; + case PREDECESSOR: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR; + case SUCCESSOR: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR; + case DERIVEDFROM: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM; + case DEPENDSON: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.DEPENDSON; + case COMPOSEDOF: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF; + default: return org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType convertRelatedArtifactType(org.hl7.fhir.r4.model.RelatedArtifact.RelatedArtifactType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DOCUMENTATION: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DOCUMENTATION; + case JUSTIFICATION: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.JUSTIFICATION; + case CITATION: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.CITATION; + case PREDECESSOR: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.PREDECESSOR; + case SUCCESSOR: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.SUCCESSOR; + case DERIVEDFROM: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DERIVEDFROM; + case DEPENDSON: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.DEPENDSON; + case COMPOSEDOF: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.COMPOSEDOF; + default: return org.hl7.fhir.dstu3.model.RelatedArtifact.RelatedArtifactType.NULL; + } +} + + public static org.hl7.fhir.r4.model.Claim.RelatedClaimComponent convertRelatedClaimComponent(org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Claim.RelatedClaimComponent tgt = new org.hl7.fhir.r4.model.Claim.RelatedClaimComponent(); + copyElement(src, tgt); + if (src.hasClaim()) + tgt.setClaim(convertReference(src.getClaim())); + if (src.hasRelationship()) + tgt.setRelationship(convertCodeableConcept(src.getRelationship())); + if (src.hasReference()) + tgt.setReference(convertIdentifier(src.getReference())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent convertRelatedClaimComponent(org.hl7.fhir.r4.model.Claim.RelatedClaimComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent tgt = new org.hl7.fhir.dstu3.model.Claim.RelatedClaimComponent(); + copyElement(src, tgt); + if (src.hasClaim()) + tgt.setClaim(convertReference(src.getClaim())); + if (src.hasRelationship()) + tgt.setRelationship(convertCodeableConcept(src.getRelationship())); + if (src.hasReference()) + tgt.setReference(convertIdentifier(src.getReference())); + return tgt; + } public static org.hl7.fhir.r4.model.RelatedPerson convertRelatedPerson(org.hl7.fhir.dstu3.model.RelatedPerson src) throws FHIRException { if (src == null) @@ -22590,484 +18431,77 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.RequestGroup convertRequestGroup(org.hl7.fhir.dstu3.model.RequestGroup src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.RequestGroup tgt = new org.hl7.fhir.r4.model.RequestGroup(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getDefinition()) - tgt.addDefinition(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) - tgt.addBasedOn(convertReference(t)); - for (org.hl7.fhir.dstu3.model.Reference t : src.getReplaces()) - tgt.addReplaces(convertReference(t)); - if (src.hasGroupIdentifier()) - tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertRequestStatus(src.getStatus())); - if (src.hasIntent()) - tgt.setIntent(convertRequestIntent(src.getIntent())); - if (src.hasPriority()) - tgt.setPriority(convertRequestPriority(src.getPriority())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasAuthoredOn()) - tgt.setAuthoredOn(src.getAuthoredOn()); - if (src.hasAuthor()) - tgt.setAuthor(convertReference(src.getAuthor())); - if (src.hasReason()) - tgt.setReason(convertType(src.getReason())); - for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) - tgt.addAction(convertRequestGroupActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.RequestGroup convertRequestGroup(org.hl7.fhir.r4.model.RequestGroup src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.RequestGroup tgt = new org.hl7.fhir.dstu3.model.RequestGroup(); - copyDomainResource(src, tgt); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getDefinition()) - tgt.addDefinition(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) - tgt.addBasedOn(convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getReplaces()) - tgt.addReplaces(convertReference(t)); - if (src.hasGroupIdentifier()) - tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier())); - if (src.hasStatus()) - tgt.setStatus(convertRequestStatus(src.getStatus())); - if (src.hasIntent()) - tgt.setIntent(convertRequestIntent(src.getIntent())); - if (src.hasPriority()) - tgt.setPriority(convertRequestPriority(src.getPriority())); - if (src.hasSubject()) - tgt.setSubject(convertReference(src.getSubject())); - if (src.hasContext()) - tgt.setContext(convertReference(src.getContext())); - if (src.hasAuthoredOn()) - tgt.setAuthoredOn(src.getAuthoredOn()); - if (src.hasAuthor()) - tgt.setAuthor(convertReference(src.getAuthor())); - if (src.hasReason()) - tgt.setReason(convertType(src.getReason())); - for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) - tgt.addNote(convertAnnotation(t)); - for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) - tgt.addAction(convertRequestGroupActionComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.RequestGroup.RequestPriority convertRequestPriority(org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority src) throws FHIRException { + private static org.hl7.fhir.r4.model.Sequence.RepositoryType convertRepositoryType(org.hl7.fhir.dstu3.model.Sequence.RepositoryType src) throws FHIRException { if (src == null) return null; switch (src) { - case ROUTINE: return org.hl7.fhir.r4.model.RequestGroup.RequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.r4.model.RequestGroup.RequestPriority.URGENT; - case ASAP: return org.hl7.fhir.r4.model.RequestGroup.RequestPriority.ASAP; - case STAT: return org.hl7.fhir.r4.model.RequestGroup.RequestPriority.STAT; - default: return org.hl7.fhir.r4.model.RequestGroup.RequestPriority.NULL; + case DIRECTLINK: return org.hl7.fhir.r4.model.Sequence.RepositoryType.DIRECTLINK; + case OPENAPI: return org.hl7.fhir.r4.model.Sequence.RepositoryType.OPENAPI; + case LOGIN: return org.hl7.fhir.r4.model.Sequence.RepositoryType.LOGIN; + case OAUTH: return org.hl7.fhir.r4.model.Sequence.RepositoryType.OAUTH; + case OTHER: return org.hl7.fhir.r4.model.Sequence.RepositoryType.OTHER; + default: return org.hl7.fhir.r4.model.Sequence.RepositoryType.NULL; } } - private static org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority convertRequestPriority(org.hl7.fhir.r4.model.RequestGroup.RequestPriority src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Sequence.RepositoryType convertRepositoryType(org.hl7.fhir.r4.model.Sequence.RepositoryType src) throws FHIRException { if (src == null) return null; switch (src) { - case ROUTINE: return org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority.URGENT; - case ASAP: return org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority.ASAP; - case STAT: return org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority.STAT; - default: return org.hl7.fhir.dstu3.model.RequestGroup.RequestPriority.NULL; + case DIRECTLINK: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.DIRECTLINK; + case OPENAPI: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OPENAPI; + case LOGIN: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.LOGIN; + case OAUTH: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OAUTH; + case OTHER: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OTHER; + default: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.NULL; } } - - private static org.hl7.fhir.r4.model.RequestGroup.RequestStatus convertRequestStatus(org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.DeviceRequest.RequestPriority convertRequestPriority(org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority src) throws FHIRException { if (src == null) return null; switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.RequestGroup.RequestStatus.NULL; + case ROUTINE: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.URGENT; + case ASAP: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.ASAP; + case STAT: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.STAT; + default: return org.hl7.fhir.r4.model.DeviceRequest.RequestPriority.NULL; } } - private static org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus convertRequestStatus(org.hl7.fhir.r4.model.RequestGroup.RequestStatus src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority convertRequestPriority(org.hl7.fhir.r4.model.DeviceRequest.RequestPriority src) throws FHIRException { if (src == null) return null; switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.RequestGroup.RequestStatus.NULL; + case ROUTINE: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.URGENT; + case ASAP: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.ASAP; + case STAT: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.STAT; + default: return org.hl7.fhir.dstu3.model.DeviceRequest.RequestPriority.NULL; } } - private static org.hl7.fhir.r4.model.RequestGroup.RequestIntent convertRequestIntent(org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent src) throws FHIRException { + private static org.hl7.fhir.r4.model.SupplyRequest.RequestPriority convertRequestPriority(org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority src) throws FHIRException { if (src == null) return null; switch (src) { - case PROPOSAL: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.PROPOSAL; - case PLAN: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.PLAN; - case ORDER: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.ORDER; - case ORIGINALORDER: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.ORIGINALORDER; - case REFLEXORDER: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.REFLEXORDER; - case FILLERORDER: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.FILLERORDER; - case INSTANCEORDER: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.INSTANCEORDER; - case OPTION: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.OPTION; - default: return org.hl7.fhir.r4.model.RequestGroup.RequestIntent.NULL; + case ROUTINE: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.URGENT; + case ASAP: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.ASAP; + case STAT: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.STAT; + default: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.NULL; } } - private static org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent convertRequestIntent(org.hl7.fhir.r4.model.RequestGroup.RequestIntent src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority convertRequestPriority(org.hl7.fhir.r4.model.SupplyRequest.RequestPriority src) throws FHIRException { if (src == null) return null; switch (src) { - case PROPOSAL: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.PROPOSAL; - case PLAN: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.PLAN; - case ORDER: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.ORDER; - case ORIGINALORDER: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.ORIGINALORDER; - case REFLEXORDER: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.REFLEXORDER; - case FILLERORDER: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.FILLERORDER; - case INSTANCEORDER: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.INSTANCEORDER; - case OPTION: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.OPTION; - default: return org.hl7.fhir.dstu3.model.RequestGroup.RequestIntent.NULL; - } -} - - public static org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent convertRequestGroupActionComponent(org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent tgt = new org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getDocumentation()) - tgt.addDocumentation(convertRelatedArtifact(t)); - for (org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionConditionComponent t : src.getCondition()) - tgt.addCondition(convertRequestGroupActionConditionComponent(t)); - for (org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionRelatedActionComponent t : src.getRelatedAction()) - tgt.addRelatedAction(convertRequestGroupActionRelatedActionComponent(t)); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getParticipant()) - tgt.addParticipant(convertReference(t)); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasGroupingBehavior()) - tgt.setGroupingBehavior(convertActionGroupingBehavior(src.getGroupingBehavior())); - if (src.hasSelectionBehavior()) - tgt.setSelectionBehavior(convertActionSelectionBehavior(src.getSelectionBehavior())); - if (src.hasRequiredBehavior()) - tgt.setRequiredBehavior(convertActionRequiredBehavior(src.getRequiredBehavior())); - if (src.hasPrecheckBehavior()) - tgt.setPrecheckBehavior(convertActionPrecheckBehavior(src.getPrecheckBehavior())); - if (src.hasCardinalityBehavior()) - tgt.setCardinalityBehavior(convertActionCardinalityBehavior(src.getCardinalityBehavior())); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - for (org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) - tgt.addAction(convertRequestGroupActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionComponent convertRequestGroupActionComponent(org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionComponent tgt = new org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasTextEquivalent()) - tgt.setTextEquivalent(src.getTextEquivalent()); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) - tgt.addCode(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getDocumentation()) - tgt.addDocumentation(convertRelatedArtifact(t)); - for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent t : src.getCondition()) - tgt.addCondition(convertRequestGroupActionConditionComponent(t)); - for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent t : src.getRelatedAction()) - tgt.addRelatedAction(convertRequestGroupActionRelatedActionComponent(t)); - if (src.hasTiming()) - tgt.setTiming(convertType(src.getTiming())); - for (org.hl7.fhir.r4.model.Reference t : src.getParticipant()) - tgt.addParticipant(convertReference(t)); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasGroupingBehavior()) - tgt.setGroupingBehavior(convertActionGroupingBehavior(src.getGroupingBehavior())); - if (src.hasSelectionBehavior()) - tgt.setSelectionBehavior(convertActionSelectionBehavior(src.getSelectionBehavior())); - if (src.hasRequiredBehavior()) - tgt.setRequiredBehavior(convertActionRequiredBehavior(src.getRequiredBehavior())); - if (src.hasPrecheckBehavior()) - tgt.setPrecheckBehavior(convertActionPrecheckBehavior(src.getPrecheckBehavior())); - if (src.hasCardinalityBehavior()) - tgt.setCardinalityBehavior(convertActionCardinalityBehavior(src.getCardinalityBehavior())); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) - tgt.addAction(convertRequestGroupActionComponent(t)); - return tgt; - } - - private static org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior convertActionGroupingBehavior(org.hl7.fhir.dstu3.model.RequestGroup.ActionGroupingBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case VISUALGROUP: return org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.VISUALGROUP; - case LOGICALGROUP: return org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.LOGICALGROUP; - case SENTENCEGROUP: return org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.SENTENCEGROUP; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionGroupingBehavior convertActionGroupingBehavior(org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case VISUALGROUP: return org.hl7.fhir.dstu3.model.RequestGroup.ActionGroupingBehavior.VISUALGROUP; - case LOGICALGROUP: return org.hl7.fhir.dstu3.model.RequestGroup.ActionGroupingBehavior.LOGICALGROUP; - case SENTENCEGROUP: return org.hl7.fhir.dstu3.model.RequestGroup.ActionGroupingBehavior.SENTENCEGROUP; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionGroupingBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior convertActionSelectionBehavior(org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ANY: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ANY; - case ALL: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ALL; - case ALLORNONE: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ALLORNONE; - case EXACTLYONE: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.EXACTLYONE; - case ATMOSTONE: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ATMOSTONE; - case ONEORMORE: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ONEORMORE; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior convertActionSelectionBehavior(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ANY: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.ANY; - case ALL: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.ALL; - case ALLORNONE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.ALLORNONE; - case EXACTLYONE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.EXACTLYONE; - case ATMOSTONE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.ATMOSTONE; - case ONEORMORE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.ONEORMORE; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionSelectionBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior convertActionRequiredBehavior(org.hl7.fhir.dstu3.model.RequestGroup.ActionRequiredBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MUST: return org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.MUST; - case COULD: return org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.COULD; - case MUSTUNLESSDOCUMENTED: return org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionRequiredBehavior convertActionRequiredBehavior(org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MUST: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRequiredBehavior.MUST; - case COULD: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRequiredBehavior.COULD; - case MUSTUNLESSDOCUMENTED: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRequiredBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior convertActionPrecheckBehavior(org.hl7.fhir.dstu3.model.RequestGroup.ActionPrecheckBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case YES: return org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior.YES; - case NO: return org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior.NO; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionPrecheckBehavior convertActionPrecheckBehavior(org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case YES: return org.hl7.fhir.dstu3.model.RequestGroup.ActionPrecheckBehavior.YES; - case NO: return org.hl7.fhir.dstu3.model.RequestGroup.ActionPrecheckBehavior.NO; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionPrecheckBehavior.NULL; - } -} - - private static org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior convertActionCardinalityBehavior(org.hl7.fhir.dstu3.model.RequestGroup.ActionCardinalityBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SINGLE: return org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior.SINGLE; - case MULTIPLE: return org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior.MULTIPLE; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionCardinalityBehavior convertActionCardinalityBehavior(org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SINGLE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionCardinalityBehavior.SINGLE; - case MULTIPLE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionCardinalityBehavior.MULTIPLE; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionCardinalityBehavior.NULL; - } -} - - - public static org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent convertRequestGroupActionConditionComponent(org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionConditionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent tgt = new org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent(); - copyElement(src, tgt); - if (src.hasKind()) - tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionConditionComponent convertRequestGroupActionConditionComponent(org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionConditionComponent tgt = new org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionConditionComponent(); - copyElement(src, tgt); - if (src.hasKind()) - tgt.setKind(convertActionConditionKind(src.getKind())); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - return tgt; - } - - private static org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind convertActionConditionKind(org.hl7.fhir.dstu3.model.RequestGroup.ActionConditionKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case APPLICABILITY: return org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.APPLICABILITY; - case START: return org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.START; - case STOP: return org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.STOP; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionConditionKind convertActionConditionKind(org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case APPLICABILITY: return org.hl7.fhir.dstu3.model.RequestGroup.ActionConditionKind.APPLICABILITY; - case START: return org.hl7.fhir.dstu3.model.RequestGroup.ActionConditionKind.START; - case STOP: return org.hl7.fhir.dstu3.model.RequestGroup.ActionConditionKind.STOP; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionConditionKind.NULL; - } -} - - - public static org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent convertRequestGroupActionRelatedActionComponent(org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionRelatedActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent tgt = new org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent(); - copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); - if (src.hasRelationship()) - tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); - if (src.hasOffset()) - tgt.setOffset(convertType(src.getOffset())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionRelatedActionComponent convertRequestGroupActionRelatedActionComponent(org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionRelatedActionComponent tgt = new org.hl7.fhir.dstu3.model.RequestGroup.RequestGroupActionRelatedActionComponent(); - copyElement(src, tgt); - if (src.hasActionId()) - tgt.setActionId(src.getActionId()); - if (src.hasRelationship()) - tgt.setRelationship(convertActionRelationshipType(src.getRelationship())); - if (src.hasOffset()) - tgt.setOffset(convertType(src.getOffset())); - return tgt; - } - - private static org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType convertActionRelationshipType(org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BEFORESTART: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.BEFORESTART; - case BEFORE: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.BEFORE; - case BEFOREEND: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.BEFOREEND; - case CONCURRENTWITHSTART: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.CONCURRENTWITHSTART; - case CONCURRENT: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.CONCURRENT; - case CONCURRENTWITHEND: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.CONCURRENTWITHEND; - case AFTERSTART: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.AFTERSTART; - case AFTER: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.AFTER; - case AFTEREND: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.AFTEREND; - default: return org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType convertActionRelationshipType(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case BEFORESTART: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.BEFORESTART; - case BEFORE: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.BEFORE; - case BEFOREEND: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.BEFOREEND; - case CONCURRENTWITHSTART: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.CONCURRENTWITHSTART; - case CONCURRENT: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.CONCURRENT; - case CONCURRENTWITHEND: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.CONCURRENTWITHEND; - case AFTERSTART: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.AFTERSTART; - case AFTER: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.AFTER; - case AFTEREND: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.AFTEREND; - default: return org.hl7.fhir.dstu3.model.RequestGroup.ActionRelationshipType.NULL; + case ROUTINE: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.ROUTINE; + case URGENT: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.URGENT; + case ASAP: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.ASAP; + case STAT: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.STAT; + default: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.NULL; } } @@ -23167,34 +18601,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus convertResearchStudyStatus(org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.DRAFT; - case INPROGRESS: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.INPROGRESS; - case SUSPENDED: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.SUSPENDED; - case STOPPED: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.STOPPED; - case COMPLETED: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus convertResearchStudyStatus(org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.DRAFT; - case INPROGRESS: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.INPROGRESS; - case SUSPENDED: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.SUSPENDED; - case STOPPED: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.STOPPED; - case COMPLETED: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyArmComponent convertResearchStudyArmComponent(org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyArmComponent src) throws FHIRException { if (src == null) return null; @@ -23223,6 +18629,34 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus convertResearchStudyStatus(org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.DRAFT; + case INPROGRESS: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.INPROGRESS; + case SUSPENDED: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.SUSPENDED; + case STOPPED: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.STOPPED; + case COMPLETED: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus convertResearchStudyStatus(org.hl7.fhir.r4.model.ResearchStudy.ResearchStudyStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.DRAFT; + case INPROGRESS: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.INPROGRESS; + case SUSPENDED: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.SUSPENDED; + case STOPPED: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.STOPPED; + case COMPLETED: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.ResearchStudy.ResearchStudyStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.ResearchSubject convertResearchSubject(org.hl7.fhir.dstu3.model.ResearchSubject src) throws FHIRException { if (src == null) return null; @@ -23299,6 +18733,518 @@ public class VersionConvertor_30_40 { } } + public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException { + if (src == null) + return null; + if (src instanceof org.hl7.fhir.dstu3.model.Parameters) + return convertParameters((org.hl7.fhir.dstu3.model.Parameters) src); + if (src instanceof org.hl7.fhir.dstu3.model.Account) + return convertAccount((org.hl7.fhir.dstu3.model.Account) src); + if (src instanceof org.hl7.fhir.dstu3.model.ActivityDefinition) + return convertActivityDefinition((org.hl7.fhir.dstu3.model.ActivityDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.AllergyIntolerance) + return convertAllergyIntolerance((org.hl7.fhir.dstu3.model.AllergyIntolerance) src); + if (src instanceof org.hl7.fhir.dstu3.model.Appointment) + return convertAppointment((org.hl7.fhir.dstu3.model.Appointment) src); + if (src instanceof org.hl7.fhir.dstu3.model.AppointmentResponse) + return convertAppointmentResponse((org.hl7.fhir.dstu3.model.AppointmentResponse) src); + if (src instanceof org.hl7.fhir.dstu3.model.AuditEvent) + return convertAuditEvent((org.hl7.fhir.dstu3.model.AuditEvent) src); + if (src instanceof org.hl7.fhir.dstu3.model.Basic) + return convertBasic((org.hl7.fhir.dstu3.model.Basic) src); + if (src instanceof org.hl7.fhir.dstu3.model.Binary) + return convertBinary((org.hl7.fhir.dstu3.model.Binary) src); + if (src instanceof org.hl7.fhir.dstu3.model.BodySite) + return convertBodySite((org.hl7.fhir.dstu3.model.BodySite) src); + if (src instanceof org.hl7.fhir.dstu3.model.Bundle) + return convertBundle((org.hl7.fhir.dstu3.model.Bundle) src); + if (src instanceof org.hl7.fhir.dstu3.model.CapabilityStatement) + return convertCapabilityStatement((org.hl7.fhir.dstu3.model.CapabilityStatement) src); + if (src instanceof org.hl7.fhir.dstu3.model.CarePlan) + return convertCarePlan((org.hl7.fhir.dstu3.model.CarePlan) src); + if (src instanceof org.hl7.fhir.dstu3.model.CareTeam) + return convertCareTeam((org.hl7.fhir.dstu3.model.CareTeam) src); + if (src instanceof org.hl7.fhir.dstu3.model.ChargeItem) + return convertChargeItem((org.hl7.fhir.dstu3.model.ChargeItem) src); + if (src instanceof org.hl7.fhir.dstu3.model.Claim) + return convertClaim((org.hl7.fhir.dstu3.model.Claim) src); + if (src instanceof org.hl7.fhir.dstu3.model.ClinicalImpression) + return convertClinicalImpression((org.hl7.fhir.dstu3.model.ClinicalImpression) src); + if (src instanceof org.hl7.fhir.dstu3.model.CodeSystem) + return convertCodeSystem((org.hl7.fhir.dstu3.model.CodeSystem) src); + if (src instanceof org.hl7.fhir.dstu3.model.Communication) + return convertCommunication((org.hl7.fhir.dstu3.model.Communication) src); + if (src instanceof org.hl7.fhir.dstu3.model.CommunicationRequest) + return convertCommunicationRequest((org.hl7.fhir.dstu3.model.CommunicationRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.CompartmentDefinition) + return convertCompartmentDefinition((org.hl7.fhir.dstu3.model.CompartmentDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.Composition) + return convertComposition((org.hl7.fhir.dstu3.model.Composition) src); + if (src instanceof org.hl7.fhir.dstu3.model.ConceptMap) + return convertConceptMap((org.hl7.fhir.dstu3.model.ConceptMap) src); + if (src instanceof org.hl7.fhir.dstu3.model.Condition) + return convertCondition((org.hl7.fhir.dstu3.model.Condition) src); + if (src instanceof org.hl7.fhir.dstu3.model.Consent) + return convertConsent((org.hl7.fhir.dstu3.model.Consent) src); + if (src instanceof org.hl7.fhir.dstu3.model.Contract) + return convertContract((org.hl7.fhir.dstu3.model.Contract) src); + if (src instanceof org.hl7.fhir.dstu3.model.Coverage) + return convertCoverage((org.hl7.fhir.dstu3.model.Coverage) src); + if (src instanceof org.hl7.fhir.dstu3.model.DataElement) + return convertDataElement((org.hl7.fhir.dstu3.model.DataElement) src); + if (src instanceof org.hl7.fhir.dstu3.model.DetectedIssue) + return convertDetectedIssue((org.hl7.fhir.dstu3.model.DetectedIssue) src); + if (src instanceof org.hl7.fhir.dstu3.model.Device) + return convertDevice((org.hl7.fhir.dstu3.model.Device) src); + if (src instanceof org.hl7.fhir.dstu3.model.DeviceComponent) + return convertDeviceComponent((org.hl7.fhir.dstu3.model.DeviceComponent) src); + if (src instanceof org.hl7.fhir.dstu3.model.DeviceMetric) + return convertDeviceMetric((org.hl7.fhir.dstu3.model.DeviceMetric) src); + if (src instanceof org.hl7.fhir.dstu3.model.DeviceRequest) + return convertDeviceRequest((org.hl7.fhir.dstu3.model.DeviceRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.DeviceUseStatement) + return convertDeviceUseStatement((org.hl7.fhir.dstu3.model.DeviceUseStatement) src); + if (src instanceof org.hl7.fhir.dstu3.model.DiagnosticReport) + return convertDiagnosticReport((org.hl7.fhir.dstu3.model.DiagnosticReport) src); + if (src instanceof org.hl7.fhir.dstu3.model.DocumentManifest) + return convertDocumentManifest((org.hl7.fhir.dstu3.model.DocumentManifest) src); + if (src instanceof org.hl7.fhir.dstu3.model.DocumentReference) + return convertDocumentReference((org.hl7.fhir.dstu3.model.DocumentReference) src); + if (src instanceof org.hl7.fhir.dstu3.model.EligibilityRequest) + return convertEligibilityRequest((org.hl7.fhir.dstu3.model.EligibilityRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.Encounter) + return convertEncounter((org.hl7.fhir.dstu3.model.Encounter) src); + if (src instanceof org.hl7.fhir.dstu3.model.Endpoint) + return convertEndpoint((org.hl7.fhir.dstu3.model.Endpoint) src); + if (src instanceof org.hl7.fhir.dstu3.model.EpisodeOfCare) + return convertEpisodeOfCare((org.hl7.fhir.dstu3.model.EpisodeOfCare) src); + if (src instanceof org.hl7.fhir.dstu3.model.ExpansionProfile) + return convertExpansionProfile((org.hl7.fhir.dstu3.model.ExpansionProfile) src); + if (src instanceof org.hl7.fhir.dstu3.model.FamilyMemberHistory) + return convertFamilyMemberHistory((org.hl7.fhir.dstu3.model.FamilyMemberHistory) src); + if (src instanceof org.hl7.fhir.dstu3.model.Flag) + return convertFlag((org.hl7.fhir.dstu3.model.Flag) src); + if (src instanceof org.hl7.fhir.dstu3.model.Goal) + return convertGoal((org.hl7.fhir.dstu3.model.Goal) src); + if (src instanceof org.hl7.fhir.dstu3.model.GraphDefinition) + return convertGraphDefinition((org.hl7.fhir.dstu3.model.GraphDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.Group) + return convertGroup((org.hl7.fhir.dstu3.model.Group) src); + if (src instanceof org.hl7.fhir.dstu3.model.HealthcareService) + return convertHealthcareService((org.hl7.fhir.dstu3.model.HealthcareService) src); + if (src instanceof org.hl7.fhir.dstu3.model.ImagingManifest) + return convertImagingManifest((org.hl7.fhir.dstu3.model.ImagingManifest) src); + if (src instanceof org.hl7.fhir.dstu3.model.ImagingStudy) + return convertImagingStudy((org.hl7.fhir.dstu3.model.ImagingStudy) src); + if (src instanceof org.hl7.fhir.dstu3.model.Immunization) + return convertImmunization((org.hl7.fhir.dstu3.model.Immunization) src); + if (src instanceof org.hl7.fhir.dstu3.model.ImmunizationRecommendation) + return convertImmunizationRecommendation((org.hl7.fhir.dstu3.model.ImmunizationRecommendation) src); + if (src instanceof org.hl7.fhir.dstu3.model.ImplementationGuide) + return convertImplementationGuide((org.hl7.fhir.dstu3.model.ImplementationGuide) src); + if (src instanceof org.hl7.fhir.dstu3.model.Linkage) + return convertLinkage((org.hl7.fhir.dstu3.model.Linkage) src); + if (src instanceof org.hl7.fhir.dstu3.model.ListResource) + return convertList((org.hl7.fhir.dstu3.model.ListResource) src); + if (src instanceof org.hl7.fhir.dstu3.model.Location) + return convertLocation((org.hl7.fhir.dstu3.model.Location) src); + if (src instanceof org.hl7.fhir.dstu3.model.Measure) + return convertMeasure((org.hl7.fhir.dstu3.model.Measure) src); + if (src instanceof org.hl7.fhir.dstu3.model.MeasureReport) + return convertMeasureReport((org.hl7.fhir.dstu3.model.MeasureReport) src); + if (src instanceof org.hl7.fhir.dstu3.model.Media) + return convertMedia((org.hl7.fhir.dstu3.model.Media) src); + if (src instanceof org.hl7.fhir.dstu3.model.Medication) + return convertMedication((org.hl7.fhir.dstu3.model.Medication) src); + if (src instanceof org.hl7.fhir.dstu3.model.MedicationAdministration) + return convertMedicationAdministration((org.hl7.fhir.dstu3.model.MedicationAdministration) src); + if (src instanceof org.hl7.fhir.dstu3.model.MedicationDispense) + return convertMedicationDispense((org.hl7.fhir.dstu3.model.MedicationDispense) src); + if (src instanceof org.hl7.fhir.dstu3.model.MedicationRequest) + return convertMedicationRequest((org.hl7.fhir.dstu3.model.MedicationRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.MedicationStatement) + return convertMedicationStatement((org.hl7.fhir.dstu3.model.MedicationStatement) src); + if (src instanceof org.hl7.fhir.dstu3.model.MessageDefinition) + return convertMessageDefinition((org.hl7.fhir.dstu3.model.MessageDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.MessageHeader) + return convertMessageHeader((org.hl7.fhir.dstu3.model.MessageHeader) src); + if (src instanceof org.hl7.fhir.dstu3.model.NamingSystem) + return convertNamingSystem((org.hl7.fhir.dstu3.model.NamingSystem) src); + if (src instanceof org.hl7.fhir.dstu3.model.NutritionOrder) + return convertNutritionOrder((org.hl7.fhir.dstu3.model.NutritionOrder) src); + if (src instanceof org.hl7.fhir.dstu3.model.Observation) + return convertObservation((org.hl7.fhir.dstu3.model.Observation) src); + if (src instanceof org.hl7.fhir.dstu3.model.OperationDefinition) + return convertOperationDefinition((org.hl7.fhir.dstu3.model.OperationDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.OperationOutcome) + return convertOperationOutcome((org.hl7.fhir.dstu3.model.OperationOutcome) src); + if (src instanceof org.hl7.fhir.dstu3.model.Organization) + return convertOrganization((org.hl7.fhir.dstu3.model.Organization) src); + if (src instanceof org.hl7.fhir.dstu3.model.Patient) + return convertPatient((org.hl7.fhir.dstu3.model.Patient) src); + if (src instanceof org.hl7.fhir.dstu3.model.PaymentNotice) + return convertPaymentNotice((org.hl7.fhir.dstu3.model.PaymentNotice) src); + if (src instanceof org.hl7.fhir.dstu3.model.Person) + return convertPerson((org.hl7.fhir.dstu3.model.Person) src); + if (src instanceof org.hl7.fhir.dstu3.model.Practitioner) + return convertPractitioner((org.hl7.fhir.dstu3.model.Practitioner) src); + if (src instanceof org.hl7.fhir.dstu3.model.PractitionerRole) + return convertPractitionerRole((org.hl7.fhir.dstu3.model.PractitionerRole) src); + if (src instanceof org.hl7.fhir.dstu3.model.Procedure) + return convertProcedure((org.hl7.fhir.dstu3.model.Procedure) src); + if (src instanceof org.hl7.fhir.dstu3.model.ProcedureRequest) + return convertProcedureRequest((org.hl7.fhir.dstu3.model.ProcedureRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.ProcessRequest) + return convertProcessRequest((org.hl7.fhir.dstu3.model.ProcessRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.Provenance) + return convertProvenance((org.hl7.fhir.dstu3.model.Provenance) src); + if (src instanceof org.hl7.fhir.dstu3.model.Questionnaire) + return convertQuestionnaire((org.hl7.fhir.dstu3.model.Questionnaire) src); + if (src instanceof org.hl7.fhir.dstu3.model.QuestionnaireResponse) + return convertQuestionnaireResponse((org.hl7.fhir.dstu3.model.QuestionnaireResponse) src); + if (src instanceof org.hl7.fhir.dstu3.model.ReferralRequest) + return convertReferralRequest((org.hl7.fhir.dstu3.model.ReferralRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.RelatedPerson) + return convertRelatedPerson((org.hl7.fhir.dstu3.model.RelatedPerson) src); + if (src instanceof org.hl7.fhir.dstu3.model.ResearchStudy) + return convertResearchStudy((org.hl7.fhir.dstu3.model.ResearchStudy) src); + if (src instanceof org.hl7.fhir.dstu3.model.ResearchSubject) + return convertResearchSubject((org.hl7.fhir.dstu3.model.ResearchSubject) src); + if (src instanceof org.hl7.fhir.dstu3.model.RiskAssessment) + return convertRiskAssessment((org.hl7.fhir.dstu3.model.RiskAssessment) src); + if (src instanceof org.hl7.fhir.dstu3.model.Schedule) + return convertSchedule((org.hl7.fhir.dstu3.model.Schedule) src); + if (src instanceof org.hl7.fhir.dstu3.model.SearchParameter) + return convertSearchParameter((org.hl7.fhir.dstu3.model.SearchParameter) src); + if (src instanceof org.hl7.fhir.dstu3.model.Sequence) + return convertSequence((org.hl7.fhir.dstu3.model.Sequence) src); + if (src instanceof org.hl7.fhir.dstu3.model.Slot) + return convertSlot((org.hl7.fhir.dstu3.model.Slot) src); + if (src instanceof org.hl7.fhir.dstu3.model.Specimen) + return convertSpecimen((org.hl7.fhir.dstu3.model.Specimen) src); + if (src instanceof org.hl7.fhir.dstu3.model.StructureDefinition) + return convertStructureDefinition((org.hl7.fhir.dstu3.model.StructureDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.StructureMap) + return convertStructureMap((org.hl7.fhir.dstu3.model.StructureMap) src); + if (src instanceof org.hl7.fhir.dstu3.model.Subscription) + return convertSubscription((org.hl7.fhir.dstu3.model.Subscription) src); + if (src instanceof org.hl7.fhir.dstu3.model.Substance) + return convertSubstance((org.hl7.fhir.dstu3.model.Substance) src); + if (src instanceof org.hl7.fhir.dstu3.model.SupplyDelivery) + return convertSupplyDelivery((org.hl7.fhir.dstu3.model.SupplyDelivery) src); + if (src instanceof org.hl7.fhir.dstu3.model.SupplyRequest) + return convertSupplyRequest((org.hl7.fhir.dstu3.model.SupplyRequest) src); + if (src instanceof org.hl7.fhir.dstu3.model.Task) + return convertTask((org.hl7.fhir.dstu3.model.Task) src); + if (src instanceof org.hl7.fhir.dstu3.model.TestReport) + return convertTestReport((org.hl7.fhir.dstu3.model.TestReport) src); + if (src instanceof org.hl7.fhir.dstu3.model.TestScript) + return convertTestScript((org.hl7.fhir.dstu3.model.TestScript) src); + if (src instanceof org.hl7.fhir.dstu3.model.ValueSet) + return convertValueSet((org.hl7.fhir.dstu3.model.ValueSet) src); + if (src instanceof org.hl7.fhir.dstu3.model.VisionPrescription) + return convertVisionPrescription((org.hl7.fhir.dstu3.model.VisionPrescription) src); + throw new Error("Unknown resource "+src.fhirType()); + } + + public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException { + if (src == null) + return null; + if (src instanceof org.hl7.fhir.r4.model.Parameters) + return convertParameters((org.hl7.fhir.r4.model.Parameters) src); + if (src instanceof org.hl7.fhir.r4.model.Account) + return convertAccount((org.hl7.fhir.r4.model.Account) src); + if (src instanceof org.hl7.fhir.r4.model.ActivityDefinition) + return convertActivityDefinition((org.hl7.fhir.r4.model.ActivityDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.AllergyIntolerance) + return convertAllergyIntolerance((org.hl7.fhir.r4.model.AllergyIntolerance) src); + if (src instanceof org.hl7.fhir.r4.model.Appointment) + return convertAppointment((org.hl7.fhir.r4.model.Appointment) src); + if (src instanceof org.hl7.fhir.r4.model.AppointmentResponse) + return convertAppointmentResponse((org.hl7.fhir.r4.model.AppointmentResponse) src); + if (src instanceof org.hl7.fhir.r4.model.AuditEvent) + return convertAuditEvent((org.hl7.fhir.r4.model.AuditEvent) src); + if (src instanceof org.hl7.fhir.r4.model.Basic) + return convertBasic((org.hl7.fhir.r4.model.Basic) src); + if (src instanceof org.hl7.fhir.r4.model.Binary) + return convertBinary((org.hl7.fhir.r4.model.Binary) src); + if (src instanceof org.hl7.fhir.r4.model.BodyStructure) + return convertBodySite((org.hl7.fhir.r4.model.BodyStructure) src); + if (src instanceof org.hl7.fhir.r4.model.Bundle) + return convertBundle((org.hl7.fhir.r4.model.Bundle) src); + if (src instanceof org.hl7.fhir.r4.model.CapabilityStatement) + return convertCapabilityStatement((org.hl7.fhir.r4.model.CapabilityStatement) src); + if (src instanceof org.hl7.fhir.r4.model.CarePlan) + return convertCarePlan((org.hl7.fhir.r4.model.CarePlan) src); + if (src instanceof org.hl7.fhir.r4.model.CareTeam) + return convertCareTeam((org.hl7.fhir.r4.model.CareTeam) src); + if (src instanceof org.hl7.fhir.r4.model.ChargeItem) + return convertChargeItem((org.hl7.fhir.r4.model.ChargeItem) src); + if (src instanceof org.hl7.fhir.r4.model.Claim) + return convertClaim((org.hl7.fhir.r4.model.Claim) src); + if (src instanceof org.hl7.fhir.r4.model.ClinicalImpression) + return convertClinicalImpression((org.hl7.fhir.r4.model.ClinicalImpression) src); + if (src instanceof org.hl7.fhir.r4.model.CodeSystem) + return convertCodeSystem((org.hl7.fhir.r4.model.CodeSystem) src); + if (src instanceof org.hl7.fhir.r4.model.Communication) + return convertCommunication((org.hl7.fhir.r4.model.Communication) src); + if (src instanceof org.hl7.fhir.r4.model.CommunicationRequest) + return convertCommunicationRequest((org.hl7.fhir.r4.model.CommunicationRequest) src); + if (src instanceof org.hl7.fhir.r4.model.CompartmentDefinition) + return convertCompartmentDefinition((org.hl7.fhir.r4.model.CompartmentDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.Composition) + return convertComposition((org.hl7.fhir.r4.model.Composition) src); + if (src instanceof org.hl7.fhir.r4.model.ConceptMap) + return convertConceptMap((org.hl7.fhir.r4.model.ConceptMap) src); + if (src instanceof org.hl7.fhir.r4.model.Condition) + return convertCondition((org.hl7.fhir.r4.model.Condition) src); + if (src instanceof org.hl7.fhir.r4.model.Consent) + return convertConsent((org.hl7.fhir.r4.model.Consent) src); + if (src instanceof org.hl7.fhir.r4.model.Contract) + return convertContract((org.hl7.fhir.r4.model.Contract) src); + if (src instanceof org.hl7.fhir.r4.model.Coverage) + return convertCoverage((org.hl7.fhir.r4.model.Coverage) src); + if (src instanceof org.hl7.fhir.r4.model.DetectedIssue) + return convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue) src); + if (src instanceof org.hl7.fhir.r4.model.Device) + return convertDevice((org.hl7.fhir.r4.model.Device) src); + if (src instanceof org.hl7.fhir.r4.model.DeviceComponent) + return convertDeviceComponent((org.hl7.fhir.r4.model.DeviceComponent) src); + if (src instanceof org.hl7.fhir.r4.model.DeviceMetric) + return convertDeviceMetric((org.hl7.fhir.r4.model.DeviceMetric) src); + if (src instanceof org.hl7.fhir.r4.model.DeviceRequest) + return convertDeviceRequest((org.hl7.fhir.r4.model.DeviceRequest) src); + if (src instanceof org.hl7.fhir.r4.model.DeviceUseStatement) + return convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement) src); + if (src instanceof org.hl7.fhir.r4.model.DiagnosticReport) + return convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport) src); + if (src instanceof org.hl7.fhir.r4.model.DocumentManifest) + return convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src); + if (src instanceof org.hl7.fhir.r4.model.DocumentReference) + return convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference) src); + if (src instanceof org.hl7.fhir.r4.model.EligibilityRequest) + return convertEligibilityRequest((org.hl7.fhir.r4.model.EligibilityRequest) src); + if (src instanceof org.hl7.fhir.r4.model.Encounter) + return convertEncounter((org.hl7.fhir.r4.model.Encounter) src); + if (src instanceof org.hl7.fhir.r4.model.Endpoint) + return convertEndpoint((org.hl7.fhir.r4.model.Endpoint) src); + if (src instanceof org.hl7.fhir.r4.model.EpisodeOfCare) + return convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare) src); + if (src instanceof org.hl7.fhir.r4.model.ExpansionProfile) + return convertExpansionProfile((org.hl7.fhir.r4.model.ExpansionProfile) src); + if (src instanceof org.hl7.fhir.r4.model.FamilyMemberHistory) + return convertFamilyMemberHistory((org.hl7.fhir.r4.model.FamilyMemberHistory) src); + if (src instanceof org.hl7.fhir.r4.model.Flag) + return convertFlag((org.hl7.fhir.r4.model.Flag) src); + if (src instanceof org.hl7.fhir.r4.model.Goal) + return convertGoal((org.hl7.fhir.r4.model.Goal) src); + if (src instanceof org.hl7.fhir.r4.model.GraphDefinition) + return convertGraphDefinition((org.hl7.fhir.r4.model.GraphDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.Group) + return convertGroup((org.hl7.fhir.r4.model.Group) src); + if (src instanceof org.hl7.fhir.r4.model.HealthcareService) + return convertHealthcareService((org.hl7.fhir.r4.model.HealthcareService) src); + if (src instanceof org.hl7.fhir.r4.model.ImagingManifest) + return convertImagingManifest((org.hl7.fhir.r4.model.ImagingManifest) src); + if (src instanceof org.hl7.fhir.r4.model.ImagingStudy) + return convertImagingStudy((org.hl7.fhir.r4.model.ImagingStudy) src); + if (src instanceof org.hl7.fhir.r4.model.Immunization) + return convertImmunization((org.hl7.fhir.r4.model.Immunization) src); + if (src instanceof org.hl7.fhir.r4.model.ImmunizationRecommendation) + return convertImmunizationRecommendation((org.hl7.fhir.r4.model.ImmunizationRecommendation) src); + if (src instanceof org.hl7.fhir.r4.model.ImplementationGuide) + return convertImplementationGuide((org.hl7.fhir.r4.model.ImplementationGuide) src); + if (src instanceof org.hl7.fhir.r4.model.Linkage) + return convertLinkage((org.hl7.fhir.r4.model.Linkage) src); + if (src instanceof org.hl7.fhir.r4.model.ListResource) + return convertList((org.hl7.fhir.r4.model.ListResource) src); + if (src instanceof org.hl7.fhir.r4.model.Location) + return convertLocation((org.hl7.fhir.r4.model.Location) src); + if (src instanceof org.hl7.fhir.r4.model.Measure) + return convertMeasure((org.hl7.fhir.r4.model.Measure) src); + if (src instanceof org.hl7.fhir.r4.model.MeasureReport) + return convertMeasureReport((org.hl7.fhir.r4.model.MeasureReport) src); + if (src instanceof org.hl7.fhir.r4.model.Media) + return convertMedia((org.hl7.fhir.r4.model.Media) src); + if (src instanceof org.hl7.fhir.r4.model.Medication) + return convertMedication((org.hl7.fhir.r4.model.Medication) src); + if (src instanceof org.hl7.fhir.r4.model.MedicationAdministration) + return convertMedicationAdministration((org.hl7.fhir.r4.model.MedicationAdministration) src); + if (src instanceof org.hl7.fhir.r4.model.MedicationDispense) + return convertMedicationDispense((org.hl7.fhir.r4.model.MedicationDispense) src); + if (src instanceof org.hl7.fhir.r4.model.MedicationRequest) + return convertMedicationRequest((org.hl7.fhir.r4.model.MedicationRequest) src); + if (src instanceof org.hl7.fhir.r4.model.MedicationStatement) + return convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement) src); + if (src instanceof org.hl7.fhir.r4.model.MessageDefinition) + return convertMessageDefinition((org.hl7.fhir.r4.model.MessageDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.MessageHeader) + return convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader) src); + if (src instanceof org.hl7.fhir.r4.model.NamingSystem) + return convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem) src); + if (src instanceof org.hl7.fhir.r4.model.NutritionOrder) + return convertNutritionOrder((org.hl7.fhir.r4.model.NutritionOrder) src); + if (src instanceof org.hl7.fhir.r4.model.Observation) + return convertObservation((org.hl7.fhir.r4.model.Observation) src); + if (src instanceof org.hl7.fhir.r4.model.OperationDefinition) + return convertOperationDefinition((org.hl7.fhir.r4.model.OperationDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.OperationOutcome) + return convertOperationOutcome((org.hl7.fhir.r4.model.OperationOutcome) src); + if (src instanceof org.hl7.fhir.r4.model.Organization) + return convertOrganization((org.hl7.fhir.r4.model.Organization) src); + if (src instanceof org.hl7.fhir.r4.model.Patient) + return convertPatient((org.hl7.fhir.r4.model.Patient) src); + if (src instanceof org.hl7.fhir.r4.model.PaymentNotice) + return convertPaymentNotice((org.hl7.fhir.r4.model.PaymentNotice) src); + if (src instanceof org.hl7.fhir.r4.model.Person) + return convertPerson((org.hl7.fhir.r4.model.Person) src); + if (src instanceof org.hl7.fhir.r4.model.Practitioner) + return convertPractitioner((org.hl7.fhir.r4.model.Practitioner) src); + if (src instanceof org.hl7.fhir.r4.model.PractitionerRole) + return convertPractitionerRole((org.hl7.fhir.r4.model.PractitionerRole) src); + if (src instanceof org.hl7.fhir.r4.model.Procedure) + return convertProcedure((org.hl7.fhir.r4.model.Procedure) src); + if (src instanceof org.hl7.fhir.r4.model.ProcedureRequest) + return convertProcedureRequest((org.hl7.fhir.r4.model.ProcedureRequest) src); + if (src instanceof org.hl7.fhir.r4.model.ProcessRequest) + return convertProcessRequest((org.hl7.fhir.r4.model.ProcessRequest) src); + if (src instanceof org.hl7.fhir.r4.model.Provenance) + return convertProvenance((org.hl7.fhir.r4.model.Provenance) src); + if (src instanceof org.hl7.fhir.r4.model.Questionnaire) + return convertQuestionnaire((org.hl7.fhir.r4.model.Questionnaire) src); + if (src instanceof org.hl7.fhir.r4.model.QuestionnaireResponse) + return convertQuestionnaireResponse((org.hl7.fhir.r4.model.QuestionnaireResponse) src); + if (src instanceof org.hl7.fhir.r4.model.RelatedPerson) + return convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson) src); + if (src instanceof org.hl7.fhir.r4.model.ResearchStudy) + return convertResearchStudy((org.hl7.fhir.r4.model.ResearchStudy) src); + if (src instanceof org.hl7.fhir.r4.model.ResearchSubject) + return convertResearchSubject((org.hl7.fhir.r4.model.ResearchSubject) src); + if (src instanceof org.hl7.fhir.r4.model.RiskAssessment) + return convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment) src); + if (src instanceof org.hl7.fhir.r4.model.Schedule) + return convertSchedule((org.hl7.fhir.r4.model.Schedule) src); + if (src instanceof org.hl7.fhir.r4.model.SearchParameter) + return convertSearchParameter((org.hl7.fhir.r4.model.SearchParameter) src); + if (src instanceof org.hl7.fhir.r4.model.Sequence) + return convertSequence((org.hl7.fhir.r4.model.Sequence) src); + if (src instanceof org.hl7.fhir.r4.model.Slot) + return convertSlot((org.hl7.fhir.r4.model.Slot) src); + if (src instanceof org.hl7.fhir.r4.model.Specimen) + return convertSpecimen((org.hl7.fhir.r4.model.Specimen) src); + if (src instanceof org.hl7.fhir.r4.model.StructureDefinition) + return convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.StructureMap) + return convertStructureMap((org.hl7.fhir.r4.model.StructureMap) src); + if (src instanceof org.hl7.fhir.r4.model.Subscription) + return convertSubscription((org.hl7.fhir.r4.model.Subscription) src); + if (src instanceof org.hl7.fhir.r4.model.Substance) + return convertSubstance((org.hl7.fhir.r4.model.Substance) src); + if (src instanceof org.hl7.fhir.r4.model.SupplyDelivery) + return convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery) src); + if (src instanceof org.hl7.fhir.r4.model.SupplyRequest) + return convertSupplyRequest((org.hl7.fhir.r4.model.SupplyRequest) src); + if (src instanceof org.hl7.fhir.r4.model.Task) + return convertTask((org.hl7.fhir.r4.model.Task) src); + if (src instanceof org.hl7.fhir.r4.model.TestReport) + return convertTestReport((org.hl7.fhir.r4.model.TestReport) src); + if (src instanceof org.hl7.fhir.r4.model.TestScript) + return convertTestScript((org.hl7.fhir.r4.model.TestScript) src); + if (src instanceof org.hl7.fhir.r4.model.ValueSet) + return convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); + if (src instanceof org.hl7.fhir.r4.model.VisionPrescription) + return convertVisionPrescription((org.hl7.fhir.r4.model.VisionPrescription) src); + throw new Error("Unknown resource "+src.fhirType()); + } + + public static org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertTypeRestfulInteraction(src.getCode())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertTypeRestfulInteraction(src.getCode())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + private static org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOVERSION: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION; + case VERSIONED: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED; + case VERSIONEDUPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE; + default: return org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.r4.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NOVERSION: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION; + case VERSIONED: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED; + case VERSIONEDUPDATE: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NULL; + } +} + + private static org.hl7.fhir.r4.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.dstu3.model.MessageHeader.ResponseType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OK: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.OK; + case TRANSIENTERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.TRANSIENTERROR; + case FATALERROR: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.FATALERROR; + default: return org.hl7.fhir.r4.model.MessageHeader.ResponseType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.r4.model.MessageHeader.ResponseType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case OK: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.OK; + case TRANSIENTERROR: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.TRANSIENTERROR; + case FATALERROR: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.FATALERROR; + default: return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.NULL; + } +} + + private static org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode convertRestfulCapabilityMode(org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLIENT: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.CLIENT; + case SERVER: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.SERVER; + default: return org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode convertRestfulCapabilityMode(org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLIENT: return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.CLIENT; + case SERVER: return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.SERVER; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.NULL; + } +} + public static org.hl7.fhir.r4.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.dstu3.model.RiskAssessment src) throws FHIRException { if (src == null) return null; @@ -23379,38 +19325,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus convertRiskAssessmentStatus(org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.FINAL; - case AMENDED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.CORRECTED; - case CANCELLED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus convertRiskAssessmentStatus(org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REGISTERED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.REGISTERED; - case PRELIMINARY: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.PRELIMINARY; - case FINAL: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.FINAL; - case AMENDED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.AMENDED; - case CORRECTED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.CORRECTED; - case CANCELLED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.CANCELLED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException { if (src == null) return null; @@ -23451,6 +19365,154 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus convertRiskAssessmentStatus(org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.FINAL; + case AMENDED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.CORRECTED; + case CANCELLED: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus convertRiskAssessmentStatus(org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REGISTERED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.REGISTERED; + case PRELIMINARY: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.PRELIMINARY; + case FINAL: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.FINAL; + case AMENDED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.AMENDED; + case CORRECTED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.CORRECTED; + case CANCELLED: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.CANCELLED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.TestScript.RuleParamComponent convertRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.RuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.RuleParamComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent convertRuleParamComponent(org.hl7.fhir.r4.model.TestScript.RuleParamComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent convertRulesetRuleComponent(org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent(); + copyElement(src, tgt); + if (src.hasRuleId()) + tgt.setRuleId(src.getRuleId()); + for (org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent t : src.getParam()) + tgt.addParam(convertRulesetRuleParamComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent convertRulesetRuleComponent(org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent(); + copyElement(src, tgt); + if (src.hasRuleId()) + tgt.setRuleId(src.getRuleId()); + for (org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent t : src.getParam()) + tgt.addParam(convertRulesetRuleParamComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent convertRulesetRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent convertRulesetRuleParamComponent(org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.r4.model.SampledData convertSampledData(org.hl7.fhir.dstu3.model.SampledData src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.SampledData tgt = new org.hl7.fhir.r4.model.SampledData(); + copyElement(src, tgt); + if (src.hasOrigin()) + tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); + if (src.hasPeriod()) + tgt.setPeriod(src.getPeriod()); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasLowerLimit()) + tgt.setLowerLimit(src.getLowerLimit()); + if (src.hasUpperLimit()) + tgt.setUpperLimit(src.getUpperLimit()); + if (src.hasDimensions()) + tgt.setDimensions(src.getDimensions()); + if (src.hasData()) + tgt.setData(src.getData()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.SampledData convertSampledData(org.hl7.fhir.r4.model.SampledData src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.SampledData tgt = new org.hl7.fhir.dstu3.model.SampledData(); + copyElement(src, tgt); + if (src.hasOrigin()) + tgt.setOrigin(convertSimpleQuantity(src.getOrigin())); + if (src.hasPeriod()) + tgt.setPeriod(src.getPeriod()); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasLowerLimit()) + tgt.setLowerLimit(src.getLowerLimit()); + if (src.hasUpperLimit()) + tgt.setUpperLimit(src.getUpperLimit()); + if (src.hasDimensions()) + tgt.setDimensions(src.getDimensions()); + if (src.hasData()) + tgt.setData(src.getData()); + return tgt; + } + public static org.hl7.fhir.r4.model.Schedule convertSchedule(org.hl7.fhir.dstu3.model.Schedule src) throws FHIRException { if (src == null) return null; @@ -23499,6 +19561,130 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.SearchParameter.SearchComparator convertSearchComparator(org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQ: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.EQ; + case NE: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.NE; + case GT: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.GT; + case LT: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.LT; + case GE: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.GE; + case LE: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.LE; + case SA: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.SA; + case EB: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.EB; + case AP: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.AP; + default: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator convertSearchComparator(org.hl7.fhir.r4.model.SearchParameter.SearchComparator src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case EQ: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.EQ; + case NE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.NE; + case GT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.GT; + case LT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.LT; + case GE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.GE; + case LE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.LE; + case SA: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.SA; + case EB: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.EB; + case AP: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.AP; + default: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.NULL; + } +} + + private static org.hl7.fhir.r4.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MATCH: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.MATCH; + case INCLUDE: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.INCLUDE; + case OUTCOME: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.OUTCOME; + default: return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.r4.model.Bundle.SearchEntryMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MATCH: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.MATCH; + case INCLUDE: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.INCLUDE; + case OUTCOME: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.OUTCOME; + default: return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.NULL; + } +} + + private static org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode convertSearchModifierCode(org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MISSING: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.MISSING; + case EXACT: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.EXACT; + case CONTAINS: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.CONTAINS; + case NOT: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.NOT; + case TEXT: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.TEXT; + case IN: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.IN; + case NOTIN: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.NOTIN; + case BELOW: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.BELOW; + case ABOVE: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.ABOVE; + case TYPE: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.TYPE; + default: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode convertSearchModifierCode(org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case MISSING: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.MISSING; + case EXACT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.EXACT; + case CONTAINS: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.CONTAINS; + case NOT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.NOT; + case TEXT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.TEXT; + case IN: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.IN; + case NOTIN: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.NOTIN; + case BELOW: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.BELOW; + case ABOVE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.ABOVE; + case TYPE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.TYPE; + default: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.NULL; + } +} + + private static org.hl7.fhir.r4.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.dstu3.model.Enumerations.SearchParamType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NUMBER: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NUMBER; + case DATE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.DATE; + case STRING: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.STRING; + case TOKEN: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.TOKEN; + case REFERENCE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.REFERENCE; + case COMPOSITE: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.COMPOSITE; + case QUANTITY: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.QUANTITY; + case URI: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.URI; + default: return org.hl7.fhir.r4.model.Enumerations.SearchParamType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Enumerations.SearchParamType convertSearchParamType(org.hl7.fhir.r4.model.Enumerations.SearchParamType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NUMBER: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.NUMBER; + case DATE: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.DATE; + case STRING: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.STRING; + case TOKEN: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.TOKEN; + case REFERENCE: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.REFERENCE; + case COMPOSITE: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.COMPOSITE; + case QUANTITY: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.QUANTITY; + case URI: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.URI; + default: return org.hl7.fhir.dstu3.model.Enumerations.SearchParamType.NULL; + } +} + public static org.hl7.fhir.r4.model.SearchParameter convertSearchParameter(org.hl7.fhir.dstu3.model.SearchParameter src) throws FHIRException { if (src == null) return null; @@ -23611,102 +19797,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NORMAL: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL; - case PHONETIC: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.PHONETIC; - case NEARBY: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NEARBY; - case DISTANCE: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.DISTANCE; - case OTHER: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.OTHER; - default: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NORMAL: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NORMAL; - case PHONETIC: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.PHONETIC; - case NEARBY: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NEARBY; - case DISTANCE: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.DISTANCE; - case OTHER: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.OTHER; - default: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NULL; - } -} - - private static org.hl7.fhir.r4.model.SearchParameter.SearchComparator convertSearchComparator(org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQ: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.EQ; - case NE: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.NE; - case GT: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.GT; - case LT: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.LT; - case GE: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.GE; - case LE: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.LE; - case SA: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.SA; - case EB: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.EB; - case AP: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.AP; - default: return org.hl7.fhir.r4.model.SearchParameter.SearchComparator.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator convertSearchComparator(org.hl7.fhir.r4.model.SearchParameter.SearchComparator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQ: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.EQ; - case NE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.NE; - case GT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.GT; - case LT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.LT; - case GE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.GE; - case LE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.LE; - case SA: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.SA; - case EB: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.EB; - case AP: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.AP; - default: return org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator.NULL; - } -} - - private static org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode convertSearchModifierCode(org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MISSING: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.MISSING; - case EXACT: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.EXACT; - case CONTAINS: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.CONTAINS; - case NOT: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.NOT; - case TEXT: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.TEXT; - case IN: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.IN; - case NOTIN: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.NOTIN; - case BELOW: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.BELOW; - case ABOVE: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.ABOVE; - case TYPE: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.TYPE; - default: return org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode convertSearchModifierCode(org.hl7.fhir.r4.model.SearchParameter.SearchModifierCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case MISSING: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.MISSING; - case EXACT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.EXACT; - case CONTAINS: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.CONTAINS; - case NOT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.NOT; - case TEXT: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.TEXT; - case IN: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.IN; - case NOTIN: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.NOTIN; - case BELOW: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.BELOW; - case ABOVE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.ABOVE; - case TYPE: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.TYPE; - default: return org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode.NULL; - } -} - public static org.hl7.fhir.r4.model.SearchParameter.SearchParameterComponentComponent convertSearchParameterComponentComponent(org.hl7.fhir.dstu3.model.SearchParameter.SearchParameterComponentComponent src) throws FHIRException { if (src == null) return null; @@ -23731,6 +19821,76 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu3.model.Composition.SectionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); + copyElement(src, tgt); + if (src.hasTitle()) + tgt.setTitle(src.getTitle()); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasText()) + tgt.setText(convertNarrative(src.getText())); + if (src.hasMode()) + tgt.setMode(convertSectionMode(src.getMode())); + if (src.hasOrderedBy()) + tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getEntry()) + tgt.addEntry(convertReference(t)); + if (src.hasEmptyReason()) + tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); + for (org.hl7.fhir.dstu3.model.Composition.SectionComponent t : src.getSection()) + tgt.addSection(convertSectionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.r4.model.Composition.SectionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu3.model.Composition.SectionComponent(); + copyElement(src, tgt); + if (src.hasTitle()) + tgt.setTitle(src.getTitle()); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasText()) + tgt.setText(convertNarrative(src.getText())); + if (src.hasMode()) + tgt.setMode(convertSectionMode(src.getMode())); + if (src.hasOrderedBy()) + tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); + for (org.hl7.fhir.r4.model.Reference t : src.getEntry()) + tgt.addEntry(convertReference(t)); + if (src.hasEmptyReason()) + tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason())); + for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) + tgt.addSection(convertSectionComponent(t)); + return tgt; + } + + private static org.hl7.fhir.r4.model.Composition.SectionMode convertSectionMode(org.hl7.fhir.dstu3.model.Composition.SectionMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case WORKING: return org.hl7.fhir.r4.model.Composition.SectionMode.WORKING; + case SNAPSHOT: return org.hl7.fhir.r4.model.Composition.SectionMode.SNAPSHOT; + case CHANGES: return org.hl7.fhir.r4.model.Composition.SectionMode.CHANGES; + default: return org.hl7.fhir.r4.model.Composition.SectionMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Composition.SectionMode convertSectionMode(org.hl7.fhir.r4.model.Composition.SectionMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case WORKING: return org.hl7.fhir.dstu3.model.Composition.SectionMode.WORKING; + case SNAPSHOT: return org.hl7.fhir.dstu3.model.Composition.SectionMode.SNAPSHOT; + case CHANGES: return org.hl7.fhir.dstu3.model.Composition.SectionMode.CHANGES; + default: return org.hl7.fhir.dstu3.model.Composition.SectionMode.NULL; + } +} + public static org.hl7.fhir.r4.model.Sequence convertSequence(org.hl7.fhir.dstu3.model.Sequence src) throws FHIRException { if (src == null) return null; @@ -23807,116 +19967,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Sequence.SequenceType convertSequenceType(org.hl7.fhir.dstu3.model.Sequence.SequenceType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AA: return org.hl7.fhir.r4.model.Sequence.SequenceType.AA; - case DNA: return org.hl7.fhir.r4.model.Sequence.SequenceType.DNA; - case RNA: return org.hl7.fhir.r4.model.Sequence.SequenceType.RNA; - default: return org.hl7.fhir.r4.model.Sequence.SequenceType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Sequence.SequenceType convertSequenceType(org.hl7.fhir.r4.model.Sequence.SequenceType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AA: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.AA; - case DNA: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.DNA; - case RNA: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.RNA; - default: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.NULL; - } -} - - public static org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent convertSequenceReferenceSeqComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent tgt = new org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent(); - copyElement(src, tgt); - if (src.hasChromosome()) - tgt.setChromosome(convertCodeableConcept(src.getChromosome())); - if (src.hasGenomeBuild()) - tgt.setGenomeBuild(src.getGenomeBuild()); - if (src.hasReferenceSeqId()) - tgt.setReferenceSeqId(convertCodeableConcept(src.getReferenceSeqId())); - if (src.hasReferenceSeqPointer()) - tgt.setReferenceSeqPointer(convertReference(src.getReferenceSeqPointer())); - if (src.hasReferenceSeqString()) - tgt.setReferenceSeqString(src.getReferenceSeqString()); - if (src.hasStrand()) - tgt.setStrand(src.getStrand()); - if (src.hasWindowStart()) - tgt.setWindowStart(src.getWindowStart()); - if (src.hasWindowEnd()) - tgt.setWindowEnd(src.getWindowEnd()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent convertSequenceReferenceSeqComponent(org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent(); - copyElement(src, tgt); - if (src.hasChromosome()) - tgt.setChromosome(convertCodeableConcept(src.getChromosome())); - if (src.hasGenomeBuild()) - tgt.setGenomeBuild(src.getGenomeBuild()); - if (src.hasReferenceSeqId()) - tgt.setReferenceSeqId(convertCodeableConcept(src.getReferenceSeqId())); - if (src.hasReferenceSeqPointer()) - tgt.setReferenceSeqPointer(convertReference(src.getReferenceSeqPointer())); - if (src.hasReferenceSeqString()) - tgt.setReferenceSeqString(src.getReferenceSeqString()); - if (src.hasStrand()) - tgt.setStrand(src.getStrand()); - if (src.hasWindowStart()) - tgt.setWindowStart(src.getWindowStart()); - if (src.hasWindowEnd()) - tgt.setWindowEnd(src.getWindowEnd()); - return tgt; - } - - public static org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent convertSequenceVariantComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent(); - copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasObservedAllele()) - tgt.setObservedAllele(src.getObservedAllele()); - if (src.hasReferenceAllele()) - tgt.setReferenceAllele(src.getReferenceAllele()); - if (src.hasCigar()) - tgt.setCigar(src.getCigar()); - if (src.hasVariantPointer()) - tgt.setVariantPointer(convertReference(src.getVariantPointer())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent convertSequenceVariantComponent(org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent(); - copyElement(src, tgt); - if (src.hasStart()) - tgt.setStart(src.getStart()); - if (src.hasEnd()) - tgt.setEnd(src.getEnd()); - if (src.hasObservedAllele()) - tgt.setObservedAllele(src.getObservedAllele()); - if (src.hasReferenceAllele()) - tgt.setReferenceAllele(src.getReferenceAllele()); - if (src.hasCigar()) - tgt.setCigar(src.getCigar()); - if (src.hasVariantPointer()) - tgt.setVariantPointer(convertReference(src.getVariantPointer())); - return tgt; - } - public static org.hl7.fhir.r4.model.Sequence.SequenceQualityComponent convertSequenceQualityComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent src) throws FHIRException { if (src == null) return null; @@ -23989,27 +20039,53 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Sequence.QualityType convertQualityType(org.hl7.fhir.dstu3.model.Sequence.QualityType src) throws FHIRException { + public static org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent convertSequenceReferenceSeqComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case INDEL: return org.hl7.fhir.r4.model.Sequence.QualityType.INDEL; - case SNP: return org.hl7.fhir.r4.model.Sequence.QualityType.SNP; - case UNKNOWN: return org.hl7.fhir.r4.model.Sequence.QualityType.UNKNOWN; - default: return org.hl7.fhir.r4.model.Sequence.QualityType.NULL; + org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent tgt = new org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent(); + copyElement(src, tgt); + if (src.hasChromosome()) + tgt.setChromosome(convertCodeableConcept(src.getChromosome())); + if (src.hasGenomeBuild()) + tgt.setGenomeBuild(src.getGenomeBuild()); + if (src.hasReferenceSeqId()) + tgt.setReferenceSeqId(convertCodeableConcept(src.getReferenceSeqId())); + if (src.hasReferenceSeqPointer()) + tgt.setReferenceSeqPointer(convertReference(src.getReferenceSeqPointer())); + if (src.hasReferenceSeqString()) + tgt.setReferenceSeqString(src.getReferenceSeqString()); + if (src.hasStrand()) + tgt.setStrand(src.getStrand()); + if (src.hasWindowStart()) + tgt.setWindowStart(src.getWindowStart()); + if (src.hasWindowEnd()) + tgt.setWindowEnd(src.getWindowEnd()); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Sequence.QualityType convertQualityType(org.hl7.fhir.r4.model.Sequence.QualityType src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent convertSequenceReferenceSeqComponent(org.hl7.fhir.r4.model.Sequence.SequenceReferenceSeqComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case INDEL: return org.hl7.fhir.dstu3.model.Sequence.QualityType.INDEL; - case SNP: return org.hl7.fhir.dstu3.model.Sequence.QualityType.SNP; - case UNKNOWN: return org.hl7.fhir.dstu3.model.Sequence.QualityType.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.Sequence.QualityType.NULL; + org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent(); + copyElement(src, tgt); + if (src.hasChromosome()) + tgt.setChromosome(convertCodeableConcept(src.getChromosome())); + if (src.hasGenomeBuild()) + tgt.setGenomeBuild(src.getGenomeBuild()); + if (src.hasReferenceSeqId()) + tgt.setReferenceSeqId(convertCodeableConcept(src.getReferenceSeqId())); + if (src.hasReferenceSeqPointer()) + tgt.setReferenceSeqPointer(convertReference(src.getReferenceSeqPointer())); + if (src.hasReferenceSeqString()) + tgt.setReferenceSeqString(src.getReferenceSeqString()); + if (src.hasStrand()) + tgt.setStrand(src.getStrand()); + if (src.hasWindowStart()) + tgt.setWindowStart(src.getWindowStart()); + if (src.hasWindowEnd()) + tgt.setWindowEnd(src.getWindowEnd()); + return tgt; } -} public static org.hl7.fhir.r4.model.Sequence.SequenceRepositoryComponent convertSequenceRepositoryComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent src) throws FHIRException { if (src == null) @@ -24051,148 +20127,542 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Sequence.RepositoryType convertRepositoryType(org.hl7.fhir.dstu3.model.Sequence.RepositoryType src) throws FHIRException { + private static org.hl7.fhir.r4.model.Sequence.SequenceType convertSequenceType(org.hl7.fhir.dstu3.model.Sequence.SequenceType src) throws FHIRException { if (src == null) return null; switch (src) { - case DIRECTLINK: return org.hl7.fhir.r4.model.Sequence.RepositoryType.DIRECTLINK; - case OPENAPI: return org.hl7.fhir.r4.model.Sequence.RepositoryType.OPENAPI; - case LOGIN: return org.hl7.fhir.r4.model.Sequence.RepositoryType.LOGIN; - case OAUTH: return org.hl7.fhir.r4.model.Sequence.RepositoryType.OAUTH; - case OTHER: return org.hl7.fhir.r4.model.Sequence.RepositoryType.OTHER; - default: return org.hl7.fhir.r4.model.Sequence.RepositoryType.NULL; + case AA: return org.hl7.fhir.r4.model.Sequence.SequenceType.AA; + case DNA: return org.hl7.fhir.r4.model.Sequence.SequenceType.DNA; + case RNA: return org.hl7.fhir.r4.model.Sequence.SequenceType.RNA; + default: return org.hl7.fhir.r4.model.Sequence.SequenceType.NULL; } } - private static org.hl7.fhir.dstu3.model.Sequence.RepositoryType convertRepositoryType(org.hl7.fhir.r4.model.Sequence.RepositoryType src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Sequence.SequenceType convertSequenceType(org.hl7.fhir.r4.model.Sequence.SequenceType src) throws FHIRException { if (src == null) return null; switch (src) { - case DIRECTLINK: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.DIRECTLINK; - case OPENAPI: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OPENAPI; - case LOGIN: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.LOGIN; - case OAUTH: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OAUTH; - case OTHER: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OTHER; - default: return org.hl7.fhir.dstu3.model.Sequence.RepositoryType.NULL; + case AA: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.AA; + case DNA: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.DNA; + case RNA: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.RNA; + default: return org.hl7.fhir.dstu3.model.Sequence.SequenceType.NULL; } } - public static org.hl7.fhir.r4.model.ServiceDefinition convertServiceDefinition(org.hl7.fhir.dstu3.model.ServiceDefinition src) throws FHIRException { + public static org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent convertSequenceVariantComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.ServiceDefinition tgt = new org.hl7.fhir.r4.model.ServiceDefinition(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); - if (src.hasEffectivePeriod()) - tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod())); - for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTopic()) - tgt.addTopic(convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) - tgt.addContributor(convertContributor(t)); - for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) - tgt.addRelatedArtifact(convertRelatedArtifact(t)); - for (org.hl7.fhir.dstu3.model.TriggerDefinition t : src.getTrigger()) - tgt.addTrigger(convertTriggerDefinition(t)); - for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getDataRequirement()) - tgt.addDataRequirement(convertDataRequirement(t)); - if (src.hasOperationDefinition()) - tgt.setOperationDefinition(convertReference(src.getOperationDefinition())); + org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent(); + copyElement(src, tgt); + if (src.hasStart()) + tgt.setStart(src.getStart()); + if (src.hasEnd()) + tgt.setEnd(src.getEnd()); + if (src.hasObservedAllele()) + tgt.setObservedAllele(src.getObservedAllele()); + if (src.hasReferenceAllele()) + tgt.setReferenceAllele(src.getReferenceAllele()); + if (src.hasCigar()) + tgt.setCigar(src.getCigar()); + if (src.hasVariantPointer()) + tgt.setVariantPointer(convertReference(src.getVariantPointer())); return tgt; } - public static org.hl7.fhir.dstu3.model.ServiceDefinition convertServiceDefinition(org.hl7.fhir.r4.model.ServiceDefinition src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent convertSequenceVariantComponent(org.hl7.fhir.r4.model.Sequence.SequenceVariantComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.ServiceDefinition tgt = new org.hl7.fhir.dstu3.model.ServiceDefinition(); - copyDomainResource(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(convertIdentifier(t)); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasTitle()) - tgt.setTitle(src.getTitle()); - if (src.hasStatus()) - tgt.setStatus(convertPublicationStatus(src.getStatus())); - if (src.hasExperimental()) - tgt.setExperimental(src.getExperimental()); - if (src.hasDate()) - tgt.setDate(src.getDate()); - if (src.hasPublisher()) - tgt.setPublisher(src.getPublisher()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasPurpose()) - tgt.setPurpose(src.getPurpose()); - if (src.hasUsage()) - tgt.setUsage(src.getUsage()); - if (src.hasApprovalDate()) - tgt.setApprovalDate(src.getApprovalDate()); - if (src.hasLastReviewDate()) - tgt.setLastReviewDate(src.getLastReviewDate()); - if (src.hasEffectivePeriod()) - tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod())); - for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) - tgt.addUseContext(convertUsageContext(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) - tgt.addJurisdiction(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic()) - tgt.addTopic(convertCodeableConcept(t)); - for (org.hl7.fhir.r4.model.Contributor t : src.getContributor()) - tgt.addContributor(convertContributor(t)); - for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) - tgt.addContact(convertContactDetail(t)); - if (src.hasCopyright()) - tgt.setCopyright(src.getCopyright()); - for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) - tgt.addRelatedArtifact(convertRelatedArtifact(t)); - for (org.hl7.fhir.r4.model.TriggerDefinition t : src.getTrigger()) - tgt.addTrigger(convertTriggerDefinition(t)); - for (org.hl7.fhir.r4.model.DataRequirement t : src.getDataRequirement()) - tgt.addDataRequirement(convertDataRequirement(t)); - if (src.hasOperationDefinition()) - tgt.setOperationDefinition(convertReference(src.getOperationDefinition())); + org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent(); + copyElement(src, tgt); + if (src.hasStart()) + tgt.setStart(src.getStart()); + if (src.hasEnd()) + tgt.setEnd(src.getEnd()); + if (src.hasObservedAllele()) + tgt.setObservedAllele(src.getObservedAllele()); + if (src.hasReferenceAllele()) + tgt.setReferenceAllele(src.getReferenceAllele()); + if (src.hasCigar()) + tgt.setCigar(src.getCigar()); + if (src.hasVariantPointer()) + tgt.setVariantPointer(convertReference(src.getVariantPointer())); return tgt; } + public static org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent convertSeriesComponent(org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent tgt = new org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent(); + copyElement(src, tgt); + if (src.hasUid()) + tgt.setUid(src.getUid()); + for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) + tgt.addEndpoint(convertReference(t)); + for (org.hl7.fhir.dstu3.model.ImagingManifest.InstanceComponent t : src.getInstance()) + tgt.addInstance(convertInstanceComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent convertSeriesComponent(org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent tgt = new org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent(); + copyElement(src, tgt); + if (src.hasUid()) + tgt.setUid(src.getUid()); + for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) + tgt.addEndpoint(convertReference(t)); + for (org.hl7.fhir.r4.model.ImagingManifest.InstanceComponent t : src.getInstance()) + tgt.addInstance(convertInstanceComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent(); + copyElement(src, tgt); + if (src.hasResult()) + tgt.setResult(convertTestReportActionResult(src.getResult())); + if (src.hasMessage()) + tgt.setMessage(src.getMessage()); + if (src.hasDetail()) + tgt.setDetail(src.getDetail()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent(); + copyElement(src, tgt); + if (src.hasResult()) + tgt.setResult(convertTestReportActionResult(src.getResult())); + if (src.hasMessage()) + tgt.setMessage(src.getMessage()); + if (src.hasDetail()) + tgt.setDetail(src.getDetail()); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent(); + copyElement(src, tgt); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasDirection()) + tgt.setDirection(convertAssertionDirectionType(src.getDirection())); + if (src.hasCompareToSourceId()) + tgt.setCompareToSourceId(src.getCompareToSourceId()); + if (src.hasCompareToSourceExpression()) + tgt.setCompareToSourceExpression(src.getCompareToSourceExpression()); + if (src.hasCompareToSourcePath()) + tgt.setCompareToSourcePath(src.getCompareToSourcePath()); + if (src.hasContentType()) + tgt.setContentType(convertContentType(src.getContentType())); + if (src.hasExpression()) + tgt.setExpression(src.getExpression()); + if (src.hasHeaderField()) + tgt.setHeaderField(src.getHeaderField()); + if (src.hasMinimumId()) + tgt.setMinimumId(src.getMinimumId()); + if (src.hasNavigationLinks()) + tgt.setNavigationLinks(src.getNavigationLinks()); + if (src.hasOperator()) + tgt.setOperator(convertAssertionOperatorType(src.getOperator())); + if (src.hasPath()) + tgt.setPath(src.getPath()); + if (src.hasRequestMethod()) + tgt.setRequestMethod(convertTestScriptRequestMethodCode(src.getRequestMethod())); + if (src.hasRequestURL()) + tgt.setRequestURL(src.getRequestURL()); + if (src.hasResource()) + tgt.setResource(src.getResource()); + if (src.hasResponse()) + tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); + if (src.hasResponseCode()) + tgt.setResponseCode(src.getResponseCode()); + if (src.hasRule()) + tgt.setRule(convertActionAssertRuleComponent(src.getRule())); + if (src.hasRuleset()) + tgt.setRuleset(convertActionAssertRulesetComponent(src.getRuleset())); + if (src.hasSourceId()) + tgt.setSourceId(src.getSourceId()); + if (src.hasValidateProfileId()) + tgt.setValidateProfileId(src.getValidateProfileId()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasWarningOnly()) + tgt.setWarningOnly(src.getWarningOnly()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent(); + copyElement(src, tgt); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasDirection()) + tgt.setDirection(convertAssertionDirectionType(src.getDirection())); + if (src.hasCompareToSourceId()) + tgt.setCompareToSourceId(src.getCompareToSourceId()); + if (src.hasCompareToSourceExpression()) + tgt.setCompareToSourceExpression(src.getCompareToSourceExpression()); + if (src.hasCompareToSourcePath()) + tgt.setCompareToSourcePath(src.getCompareToSourcePath()); + if (src.hasContentType()) + tgt.setContentType(convertContentType(src.getContentType())); + if (src.hasExpression()) + tgt.setExpression(src.getExpression()); + if (src.hasHeaderField()) + tgt.setHeaderField(src.getHeaderField()); + if (src.hasMinimumId()) + tgt.setMinimumId(src.getMinimumId()); + if (src.hasNavigationLinks()) + tgt.setNavigationLinks(src.getNavigationLinks()); + if (src.hasOperator()) + tgt.setOperator(convertAssertionOperatorType(src.getOperator())); + if (src.hasPath()) + tgt.setPath(src.getPath()); + if (src.hasRequestMethod()) + tgt.setRequestMethod(convertTestScriptRequestMethodCode(src.getRequestMethod())); + if (src.hasRequestURL()) + tgt.setRequestURL(src.getRequestURL()); + if (src.hasResource()) + tgt.setResource(src.getResource()); + if (src.hasResponse()) + tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); + if (src.hasResponseCode()) + tgt.setResponseCode(src.getResponseCode()); + if (src.hasRule()) + tgt.setRule(convertActionAssertRuleComponent(src.getRule())); + if (src.hasRuleset()) + tgt.setRuleset(convertActionAssertRulesetComponent(src.getRuleset())); + if (src.hasSourceId()) + tgt.setSourceId(src.getSourceId()); + if (src.hasValidateProfileId()) + tgt.setValidateProfileId(src.getValidateProfileId()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasWarningOnly()) + tgt.setWarningOnly(src.getWarningOnly()); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestReport.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestReport.SetupActionComponent tgt = new org.hl7.fhir.r4.model.TestReport.SetupActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.r4.model.TestReport.SetupActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.r4.model.TestScript.SetupActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent tgt = new org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent(); + copyElement(src, tgt); + if (src.hasResult()) + tgt.setResult(convertTestReportActionResult(src.getResult())); + if (src.hasMessage()) + tgt.setMessage(src.getMessage()); + if (src.hasDetail()) + tgt.setDetail(src.getDetail()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent(); + copyElement(src, tgt); + if (src.hasResult()) + tgt.setResult(convertTestReportActionResult(src.getResult())); + if (src.hasMessage()) + tgt.setMessage(src.getMessage()); + if (src.hasDetail()) + tgt.setDetail(src.getDetail()); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCoding(src.getType())); + if (src.hasResource()) + tgt.setResource(src.getResource()); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasAccept()) + tgt.setAccept(convertContentType(src.getAccept())); + if (src.hasContentType()) + tgt.setContentType(convertContentType(src.getContentType())); + if (src.hasDestination()) + tgt.setDestination(src.getDestination()); + if (src.hasEncodeRequestUrl()) + tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); + if (src.hasOrigin()) + tgt.setOrigin(src.getOrigin()); + if (src.hasParams()) + tgt.setParams(src.getParams()); + for (org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) + tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); + if (src.hasRequestId()) + tgt.setRequestId(src.getRequestId()); + if (src.hasResponseId()) + tgt.setResponseId(src.getResponseId()); + if (src.hasSourceId()) + tgt.setSourceId(src.getSourceId()); + if (src.hasTargetId()) + tgt.setTargetId(src.getTargetId()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCoding(src.getType())); + if (src.hasResource()) + tgt.setResource(src.getResource()); + if (src.hasLabel()) + tgt.setLabel(src.getLabel()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasAccept()) + tgt.setAccept(convertContentType(src.getAccept())); + if (src.hasContentType()) + tgt.setContentType(convertContentType(src.getContentType())); + if (src.hasDestination()) + tgt.setDestination(src.getDestination()); + if (src.hasEncodeRequestUrl()) + tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); + if (src.hasOrigin()) + tgt.setOrigin(src.getOrigin()); + if (src.hasParams()) + tgt.setParams(src.getParams()); + for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) + tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); + if (src.hasRequestId()) + tgt.setRequestId(src.getRequestId()); + if (src.hasResponseId()) + tgt.setResponseId(src.getResponseId()); + if (src.hasSourceId()) + tgt.setSourceId(src.getSourceId()); + if (src.hasTargetId()) + tgt.setTargetId(src.getTargetId()); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent(); + copyElement(src, tgt); + if (src.hasField()) + tgt.setField(src.getField()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent(); + copyElement(src, tgt); + if (src.hasField()) + tgt.setField(src.getField()); + if (src.hasValue()) + tgt.setValue(src.getValue()); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.dstu3.model.Contract.SignatoryComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.r4.model.Contract.SignatoryComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCoding(src.getType())); + if (src.hasParty()) + tgt.setParty(convertReference(src.getParty())); + for (org.hl7.fhir.dstu3.model.Signature t : src.getSignature()) + tgt.addSignature(convertSignature(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.r4.model.Contract.SignatoryComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.dstu3.model.Contract.SignatoryComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCoding(src.getType())); + if (src.hasParty()) + tgt.setParty(convertReference(src.getParty())); + for (org.hl7.fhir.r4.model.Signature t : src.getSignature()) + tgt.addSignature(convertSignature(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Signature convertSignature(org.hl7.fhir.dstu3.model.Signature src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Signature tgt = new org.hl7.fhir.r4.model.Signature(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + if (src.hasWhen()) + tgt.setWhen(src.getWhen()); + if (src.hasWho()) + tgt.setWho(convertType(src.getWho())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertType(src.getOnBehalfOf())); + if (src.hasContentType()) + tgt.setContentType(src.getContentType()); + if (src.hasBlob()) + tgt.setBlob(src.getBlob()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Signature convertSignature(org.hl7.fhir.r4.model.Signature src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Signature tgt = new org.hl7.fhir.dstu3.model.Signature(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Coding t : src.getType()) + tgt.addType(convertCoding(t)); + if (src.hasWhen()) + tgt.setWhen(src.getWhen()); + if (src.hasWho()) + tgt.setWho(convertType(src.getWho())); + if (src.hasOnBehalfOf()) + tgt.setOnBehalfOf(convertType(src.getOnBehalfOf())); + if (src.hasContentType()) + tgt.setContentType(src.getContentType()); + if (src.hasBlob()) + tgt.setBlob(src.getBlob()); + return tgt; + } + + public static org.hl7.fhir.r4.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.dstu3.model.SimpleQuantity src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.SimpleQuantity tgt = new org.hl7.fhir.r4.model.SimpleQuantity(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasComparator()) + tgt.setComparator(convertQuantityComparator(src.getComparator())); + if (src.hasUnit()) + tgt.setUnit(src.getUnit()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.SimpleQuantity tgt = new org.hl7.fhir.dstu3.model.SimpleQuantity(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasComparator()) + tgt.setComparator(convertQuantityComparator(src.getComparator())); + if (src.hasUnit()) + tgt.setUnit(src.getUnit()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + return tgt; + } + + private static org.hl7.fhir.r4.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLOSED: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.CLOSED; + case OPEN: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPEN; + case OPENATEND: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.OPENATEND; + default: return org.hl7.fhir.r4.model.ElementDefinition.SlicingRules.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules convertSlicingRules(org.hl7.fhir.r4.model.ElementDefinition.SlicingRules src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case CLOSED: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.CLOSED; + case OPEN: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.OPEN; + case OPENATEND: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.OPENATEND; + default: return org.hl7.fhir.dstu3.model.ElementDefinition.SlicingRules.NULL; + } +} + public static org.hl7.fhir.r4.model.Slot convertSlot(org.hl7.fhir.dstu3.model.Slot src) throws FHIRException { if (src == null) return null; @@ -24279,6 +20749,74 @@ public class VersionConvertor_30_40 { } } + public static org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) + tgt.addTarget(convertTargetElementComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) + tgt.addTarget(convertTargetElementComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Claim.SpecialConditionComponent convertSpecialConditionComponent(org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Claim.SpecialConditionComponent tgt = new org.hl7.fhir.r4.model.Claim.SpecialConditionComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasTiming()) + tgt.setTiming(convertType(src.getTiming())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + if (src.hasReason()) + tgt.setReason(convertCodeableConcept(src.getReason())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent convertSpecialConditionComponent(org.hl7.fhir.r4.model.Claim.SpecialConditionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent tgt = new org.hl7.fhir.dstu3.model.Claim.SpecialConditionComponent(); + copyElement(src, tgt); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasTiming()) + tgt.setTiming(convertType(src.getTiming())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + if (src.hasReason()) + tgt.setReason(convertCodeableConcept(src.getReason())); + return tgt; + } + public static org.hl7.fhir.r4.model.Specimen convertSpecimen(org.hl7.fhir.dstu3.model.Specimen src) throws FHIRException { if (src == null) return null; @@ -24343,30 +20881,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Specimen.SpecimenStatus convertSpecimenStatus(org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AVAILABLE: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.AVAILABLE; - case UNAVAILABLE: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.UNAVAILABLE; - case UNSATISFACTORY: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.UNSATISFACTORY; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus convertSpecimenStatus(org.hl7.fhir.r4.model.Specimen.SpecimenStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case AVAILABLE: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.AVAILABLE; - case UNAVAILABLE: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.UNAVAILABLE; - case UNSATISFACTORY: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.UNSATISFACTORY; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.Specimen.SpecimenCollectionComponent convertSpecimenCollectionComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenCollectionComponent src) throws FHIRException { if (src == null) return null; @@ -24403,38 +20917,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent convertSpecimenProcessingComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent(); - copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasProcedure()) - tgt.setProcedure(convertCodeableConcept(src.getProcedure())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getAdditive()) - tgt.addAdditive(convertReference(t)); - if (src.hasTime()) - tgt.setTime(convertType(src.getTime())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent convertSpecimenProcessingComponent(org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent(); - copyElement(src, tgt); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasProcedure()) - tgt.setProcedure(convertCodeableConcept(src.getProcedure())); - for (org.hl7.fhir.r4.model.Reference t : src.getAdditive()) - tgt.addAdditive(convertReference(t)); - if (src.hasTime()) - tgt.setTime(convertType(src.getTime())); - return tgt; - } - public static org.hl7.fhir.r4.model.Specimen.SpecimenContainerComponent convertSpecimenContainerComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent src) throws FHIRException { if (src == null) return null; @@ -24475,6 +20957,158 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent convertSpecimenProcessingComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent(); + copyElement(src, tgt); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasProcedure()) + tgt.setProcedure(convertCodeableConcept(src.getProcedure())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getAdditive()) + tgt.addAdditive(convertReference(t)); + if (src.hasTime()) + tgt.setTime(convertType(src.getTime())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent convertSpecimenProcessingComponent(org.hl7.fhir.r4.model.Specimen.SpecimenProcessingComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent tgt = new org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent(); + copyElement(src, tgt); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + if (src.hasProcedure()) + tgt.setProcedure(convertCodeableConcept(src.getProcedure())); + for (org.hl7.fhir.r4.model.Reference t : src.getAdditive()) + tgt.addAdditive(convertReference(t)); + if (src.hasTime()) + tgt.setTime(convertType(src.getTime())); + return tgt; + } + + private static org.hl7.fhir.r4.model.Specimen.SpecimenStatus convertSpecimenStatus(org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AVAILABLE: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.AVAILABLE; + case UNAVAILABLE: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.UNAVAILABLE; + case UNSATISFACTORY: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.UNSATISFACTORY; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Specimen.SpecimenStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus convertSpecimenStatus(org.hl7.fhir.r4.model.Specimen.SpecimenStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case AVAILABLE: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.AVAILABLE; + case UNAVAILABLE: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.UNAVAILABLE; + case UNSATISFACTORY: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.UNSATISFACTORY; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Specimen.SpecimenStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent(); + copyElement(src, tgt); + if (src.hasStatus()) + tgt.setStatus(convertEncounterStatus(src.getStatus())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent(); + copyElement(src, tgt); + if (src.hasStatus()) + tgt.setStatus(convertEncounterStatus(src.getStatus())); + if (src.hasPeriod()) + tgt.setPeriod(convertPeriod(src.getPeriod())); + return tgt; + } + + public static org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent convertStratifierGroupComponent(org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent tgt = new org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + for (org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent t : src.getPopulation()) + tgt.addPopulation(convertStratifierGroupPopulationComponent(t)); + if (src.hasMeasureScore()) + tgt.setMeasureScore(src.getMeasureScore()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent convertStratifierGroupComponent(org.hl7.fhir.r4.model.MeasureReport.StratifierGroupComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent tgt = new org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + for (org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent t : src.getPopulation()) + tgt.addPopulation(convertStratifierGroupPopulationComponent(t)); + if (src.hasMeasureScore()) + tgt.setMeasureScore(src.getMeasureScore()); + return tgt; + } + + public static org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent convertStratifierGroupPopulationComponent(org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent tgt = new org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasCount()) + tgt.setCount(src.getCount()); + if (src.hasPatients()) + tgt.setPatients(convertReference(src.getPatients())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent convertStratifierGroupPopulationComponent(org.hl7.fhir.r4.model.MeasureReport.StratifierGroupPopulationComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent tgt = new org.hl7.fhir.dstu3.model.MeasureReport.StratifierGroupPopulationComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); + if (src.hasCount()) + tgt.setCount(src.getCount()); + if (src.hasPatients()) + tgt.setPatients(convertReference(src.getPatients())); + return tgt; + } + + public static org.hl7.fhir.r4.model.StringType convertString(org.hl7.fhir.dstu3.model.StringType src) throws FHIRException { + org.hl7.fhir.r4.model.StringType tgt = new org.hl7.fhir.r4.model.StringType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.StringType convertString(org.hl7.fhir.r4.model.StringType src) throws FHIRException { + org.hl7.fhir.dstu3.model.StringType tgt = new org.hl7.fhir.dstu3.model.StringType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + public static org.hl7.fhir.r4.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.dstu3.model.StructureDefinition src) throws FHIRException { if (src == null) return null; @@ -24603,6 +21237,26 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) + tgt.addElement(convertElementDefinition(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) + tgt.addElement(convertElementDefinition(t)); + return tgt; + } + private static org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind src) throws FHIRException { if (src == null) return null; @@ -24627,48 +21281,6 @@ public class VersionConvertor_30_40 { } } - private static org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESOURCE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.RESOURCE; - case DATATYPE: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.DATATYPE; - case EXTENSION: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.EXTENSION; - default: return org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.r4.model.StructureDefinition.ExtensionContext src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case RESOURCE: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.RESOURCE; - case DATATYPE: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.DATATYPE; - case EXTENSION: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.EXTENSION; - default: return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.NULL; - } -} - - private static org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule convertTypeDerivationRule(org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SPECIALIZATION: return org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION; - case CONSTRAINT: return org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT; - default: return org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule convertTypeDerivationRule(org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SPECIALIZATION: return org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION; - case CONSTRAINT: return org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.CONSTRAINT; - default: return org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.NULL; - } -} - public static org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException { if (src == null) return null; @@ -24721,26 +21333,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) - tgt.addElement(convertElementDefinition(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.ElementDefinition t : src.getElement()) - tgt.addElement(convertElementDefinition(t)); - return tgt; - } - public static org.hl7.fhir.r4.model.StructureMap convertStructureMap(org.hl7.fhir.dstu3.model.StructureMap src) throws FHIRException { if (src == null) return null; @@ -24829,59 +21421,23 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent convertStructureMapStructureComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent(); - copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasMode()) - tgt.setMode(convertStructureMapModelMode(src.getMode())); - if (src.hasAlias()) - tgt.setAlias(src.getAlias()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent convertStructureMapStructureComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent(); - copyElement(src, tgt); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - if (src.hasMode()) - tgt.setMode(convertStructureMapModelMode(src.getMode())); - if (src.hasAlias()) - tgt.setAlias(src.getAlias()); - if (src.hasDocumentation()) - tgt.setDocumentation(src.getDocumentation()); - return tgt; - } - - private static org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode convertStructureMapModelMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode src) throws FHIRException { + private static org.hl7.fhir.r4.model.StructureMap.StructureMapContextType convertStructureMapContextType(org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType src) throws FHIRException { if (src == null) return null; switch (src) { - case SOURCE: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.SOURCE; - case QUERIED: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.QUERIED; - case TARGET: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.TARGET; - case PRODUCED: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.PRODUCED; - default: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.NULL; + case TYPE: return org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.TYPE; + case VARIABLE: return org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.VARIABLE; + default: return org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.NULL; } } - private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode convertStructureMapModelMode(org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType convertStructureMapContextType(org.hl7.fhir.r4.model.StructureMap.StructureMapContextType src) throws FHIRException { if (src == null) return null; switch (src) { - case SOURCE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.SOURCE; - case QUERIED: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.QUERIED; - case TARGET: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.TARGET; - case PRODUCED: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.PRODUCED; - default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.NULL; + case TYPE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.TYPE; + case VARIABLE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.VARIABLE; + default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.NULL; } } @@ -24925,28 +21481,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode convertStructureMapGroupTypeMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NONE: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.NONE; - case TYPES: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.TYPES; - case TYPEANDTYPES: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES; - default: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode convertStructureMapGroupTypeMode(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case NONE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.NONE; - case TYPES: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.TYPES; - case TYPEANDTYPES: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES; - default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.NULL; - } -} - public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupInputComponent convertStructureMapGroupInputComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent src) throws FHIRException { if (src == null) return null; @@ -24979,26 +21513,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode convertStructureMapInputMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SOURCE: return org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode.SOURCE; - case TARGET: return org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode.TARGET; - default: return org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode convertStructureMapInputMode(org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case SOURCE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.SOURCE; - case TARGET: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.TARGET; - default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.NULL; - } -} - public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleComponent convertStructureMapGroupRuleComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent src) throws FHIRException { if (src == null) return null; @@ -25039,6 +21553,30 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent convertStructureMapGroupRuleDependentComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + for (org.hl7.fhir.dstu3.model.StringType t : src.getVariable()) + tgt.addVariable(t.getValue()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent convertStructureMapGroupRuleDependentComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + for (org.hl7.fhir.r4.model.StringType t : src.getVariable()) + tgt.addVariable(t.getValue()); + return tgt; + } + public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent convertStructureMapGroupRuleSourceComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent src) throws FHIRException { if (src == null) return null; @@ -25095,32 +21633,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode convertStructureMapSourceListMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case FIRST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.FIRST; - case NOTFIRST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.NOTFIRST; - case LAST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.LAST; - case NOTLAST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.NOTLAST; - case ONLYONE: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.ONLYONE; - default: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode convertStructureMapSourceListMode(org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case FIRST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.FIRST; - case NOTFIRST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NOTFIRST; - case LAST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.LAST; - case NOTLAST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NOTLAST; - case ONLYONE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.ONLYONE; - default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NULL; - } -} - public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetComponent convertStructureMapGroupRuleTargetComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent src) throws FHIRException { if (src == null) return null; @@ -25169,26 +21681,150 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.StructureMap.StructureMapContextType convertStructureMapContextType(org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType src) throws FHIRException { + public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent convertStructureMapGroupRuleTargetParameterComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent convertStructureMapGroupRuleTargetParameterComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent(); + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + private static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode convertStructureMapGroupTypeMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode src) throws FHIRException { if (src == null) return null; switch (src) { - case TYPE: return org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.TYPE; - case VARIABLE: return org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.VARIABLE; - default: return org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.NULL; + case NONE: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.NONE; + case TYPES: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.TYPES; + case TYPEANDTYPES: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES; + default: return org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode.NULL; } } - private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType convertStructureMapContextType(org.hl7.fhir.r4.model.StructureMap.StructureMapContextType src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode convertStructureMapGroupTypeMode(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode src) throws FHIRException { if (src == null) return null; switch (src) { - case TYPE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.TYPE; - case VARIABLE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.VARIABLE; - default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.NULL; + case NONE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.NONE; + case TYPES: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.TYPES; + case TYPEANDTYPES: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES; + default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.NULL; } } + private static org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode convertStructureMapInputMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case SOURCE: return org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode.SOURCE; + case TARGET: return org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode.TARGET; + default: return org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode convertStructureMapInputMode(org.hl7.fhir.r4.model.StructureMap.StructureMapInputMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case SOURCE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.SOURCE; + case TARGET: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.TARGET; + default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.NULL; + } +} + + private static org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode convertStructureMapModelMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case SOURCE: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.SOURCE; + case QUERIED: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.QUERIED; + case TARGET: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.TARGET; + case PRODUCED: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.PRODUCED; + default: return org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode convertStructureMapModelMode(org.hl7.fhir.r4.model.StructureMap.StructureMapModelMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case SOURCE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.SOURCE; + case QUERIED: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.QUERIED; + case TARGET: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.TARGET; + case PRODUCED: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.PRODUCED; + default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.NULL; + } +} + + private static org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode convertStructureMapSourceListMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case FIRST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.FIRST; + case NOTFIRST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.NOTFIRST; + case LAST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.LAST; + case NOTLAST: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.NOTLAST; + case ONLYONE: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.ONLYONE; + default: return org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode convertStructureMapSourceListMode(org.hl7.fhir.r4.model.StructureMap.StructureMapSourceListMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case FIRST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.FIRST; + case NOTFIRST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NOTFIRST; + case LAST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.LAST; + case NOTLAST: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NOTLAST; + case ONLYONE: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.ONLYONE; + default: return org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NULL; + } +} + + public static org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent convertStructureMapStructureComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent(); + copyElement(src, tgt); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + if (src.hasMode()) + tgt.setMode(convertStructureMapModelMode(src.getMode())); + if (src.hasAlias()) + tgt.setAlias(src.getAlias()); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent convertStructureMapStructureComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapStructureComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent(); + copyElement(src, tgt); + if (src.hasUrl()) + tgt.setUrl(src.getUrl()); + if (src.hasMode()) + tgt.setMode(convertStructureMapModelMode(src.getMode())); + if (src.hasAlias()) + tgt.setAlias(src.getAlias()); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + private static org.hl7.fhir.r4.model.StructureMap.StructureMapTargetListMode convertStructureMapTargetListMode(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode src) throws FHIRException { if (src == null) return null; @@ -25263,47 +21899,95 @@ public class VersionConvertor_30_40 { } } - public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent convertStructureMapGroupRuleTargetParameterComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.ImagingManifest.StudyComponent convertStudyComponent(org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent(); + org.hl7.fhir.r4.model.ImagingManifest.StudyComponent tgt = new org.hl7.fhir.r4.model.ImagingManifest.StudyComponent(); copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasUid()) + tgt.setUid(src.getUid()); + if (src.hasImagingStudy()) + tgt.setImagingStudy(convertReference(src.getImagingStudy())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) + tgt.addEndpoint(convertReference(t)); + for (org.hl7.fhir.dstu3.model.ImagingManifest.SeriesComponent t : src.getSeries()) + tgt.addSeries(convertSeriesComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent convertStructureMapGroupRuleTargetParameterComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleTargetParameterComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent convertStudyComponent(org.hl7.fhir.r4.model.ImagingManifest.StudyComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent(); + org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent tgt = new org.hl7.fhir.dstu3.model.ImagingManifest.StudyComponent(); copyElement(src, tgt); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasUid()) + tgt.setUid(src.getUid()); + if (src.hasImagingStudy()) + tgt.setImagingStudy(convertReference(src.getImagingStudy())); + for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) + tgt.addEndpoint(convertReference(t)); + for (org.hl7.fhir.r4.model.ImagingManifest.SeriesComponent t : src.getSeries()) + tgt.addSeries(convertSeriesComponent(t)); return tgt; } - public static org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent convertStructureMapGroupRuleDependentComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Claim.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.dstu3.model.Claim.SubDetailComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent(); + org.hl7.fhir.r4.model.Claim.SubDetailComponent tgt = new org.hl7.fhir.r4.model.Claim.SubDetailComponent(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - for (org.hl7.fhir.dstu3.model.StringType t : src.getVariable()) - tgt.addVariable(t.getValue()); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasRevenue()) + tgt.setRevenue(convertCodeableConcept(src.getRevenue())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasService()) + tgt.setService(convertCodeableConcept(src.getService())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier()) + tgt.addModifier(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getProgramCode()) + tgt.addProgramCode(convertCodeableConcept(t)); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + for (org.hl7.fhir.dstu3.model.Reference t : src.getUdi()) + tgt.addUdi(convertReference(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent convertStructureMapGroupRuleDependentComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleDependentComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Claim.SubDetailComponent convertSubDetailComponent(org.hl7.fhir.r4.model.Claim.SubDetailComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent(); + org.hl7.fhir.dstu3.model.Claim.SubDetailComponent tgt = new org.hl7.fhir.dstu3.model.Claim.SubDetailComponent(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - for (org.hl7.fhir.r4.model.StringType t : src.getVariable()) - tgt.addVariable(t.getValue()); + if (src.hasSequence()) + tgt.setSequence(src.getSequence()); + if (src.hasRevenue()) + tgt.setRevenue(convertCodeableConcept(src.getRevenue())); + if (src.hasCategory()) + tgt.setCategory(convertCodeableConcept(src.getCategory())); + if (src.hasService()) + tgt.setService(convertCodeableConcept(src.getService())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getModifier()) + tgt.addModifier(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProgramCode()) + tgt.addProgramCode(convertCodeableConcept(t)); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + for (org.hl7.fhir.r4.model.Reference t : src.getUdi()) + tgt.addUdi(convertReference(t)); return tgt; } @@ -25355,30 +22039,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUESTED: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.REQUESTED; - case ACTIVE: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ACTIVE; - case ERROR: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ERROR; - case OFF: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.OFF; - default: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r4.model.Subscription.SubscriptionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case REQUESTED: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.REQUESTED; - case ACTIVE: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.ACTIVE; - case ERROR: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.ERROR; - case OFF: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.OFF; - default: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent src) throws FHIRException { if (src == null) return null; @@ -25437,6 +22097,30 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUESTED: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.REQUESTED; + case ACTIVE: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ACTIVE; + case ERROR: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ERROR; + case OFF: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.OFF; + default: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r4.model.Subscription.SubscriptionStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case REQUESTED: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.REQUESTED; + case ACTIVE: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.ACTIVE; + case ERROR: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.ERROR; + case OFF: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.OFF; + default: return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.NULL; + } +} + public static org.hl7.fhir.r4.model.Substance convertSubstance(org.hl7.fhir.dstu3.model.Substance src) throws FHIRException { if (src == null) return null; @@ -25481,27 +22165,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus convertFHIRSubstanceStatus(org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus src) throws FHIRException { + public static org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus.NULL; + org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent(); + copyElement(src, tgt); + if (src.hasQuantity()) + tgt.setQuantity(convertRatio(src.getQuantity())); + if (src.hasSubstance()) + tgt.setSubstance(convertType(src.getSubstance())); + return tgt; } -} - private static org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus convertFHIRSubstanceStatus(org.hl7.fhir.r4.model.Substance.FHIRSubstanceStatus src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent src) throws FHIRException { if (src == null) return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.ACTIVE; - case INACTIVE: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.INACTIVE; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Substance.FHIRSubstanceStatus.NULL; + org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent(); + copyElement(src, tgt); + if (src.hasQuantity()) + tgt.setQuantity(convertRatio(src.getQuantity())); + if (src.hasSubstance()) + tgt.setSubstance(convertType(src.getSubstance())); + return tgt; } -} public static org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent src) throws FHIRException { if (src == null) @@ -25531,30 +22217,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent(); - copyElement(src, tgt); - if (src.hasQuantity()) - tgt.setQuantity(convertRatio(src.getQuantity())); - if (src.hasSubstance()) - tgt.setSubstance(convertType(src.getSubstance())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent(); - copyElement(src, tgt); - if (src.hasQuantity()) - tgt.setQuantity(convertRatio(src.getQuantity())); - if (src.hasSubstance()) - tgt.setSubstance(convertType(src.getSubstance())); - return tgt; - } - public static org.hl7.fhir.r4.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.dstu3.model.SupplyDelivery src) throws FHIRException { if (src == null) return null; @@ -25727,61 +22389,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.SupplyRequest.RequestPriority convertRequestPriority(org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ROUTINE: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.URGENT; - case ASAP: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.ASAP; - case STAT: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.STAT; - default: return org.hl7.fhir.r4.model.SupplyRequest.RequestPriority.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority convertRequestPriority(org.hl7.fhir.r4.model.SupplyRequest.RequestPriority src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ROUTINE: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.ROUTINE; - case URGENT: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.URGENT; - case ASAP: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.ASAP; - case STAT: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.STAT; - default: return org.hl7.fhir.dstu3.model.SupplyRequest.RequestPriority.NULL; - } -} - - - private static org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.UNKNOWN; - default: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.DRAFT; - case ACTIVE: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.ACTIVE; - case SUSPENDED: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.SUSPENDED; - case CANCELLED: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.CANCELLED; - case COMPLETED: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.ENTEREDINERROR; - case UNKNOWN: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.UNKNOWN; - default: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestOrderedItemComponent convertSupplyRequestOrderedItemComponent(org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestOrderedItemComponent src) throws FHIRException { if (src == null) return null; @@ -25830,6 +22437,146 @@ public class VersionConvertor_30_40 { return tgt; } + private static org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.UNKNOWN; + default: return org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus convertSupplyRequestStatus(org.hl7.fhir.r4.model.SupplyRequest.SupplyRequestStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.DRAFT; + case ACTIVE: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.ACTIVE; + case SUSPENDED: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.SUSPENDED; + case CANCELLED: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.CANCELLED; + case COMPLETED: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.ENTEREDINERROR; + case UNKNOWN: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertSystemRestfulInteraction(src.getCode())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.r4.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertSystemRestfulInteraction(src.getCode())); + if (src.hasDocumentation()) + tgt.setDocumentation(src.getDocumentation()); + return tgt; + } + + private static org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case TRANSACTION: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION; + case BATCH: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.BATCH; + case SEARCHSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM; + case HISTORYSYSTEM: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM; + default: return org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case TRANSACTION: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION; + case BATCH: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.BATCH; + case SEARCHSYSTEM: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM; + case HISTORYSYSTEM: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.NULL; + } +} + + private static org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode convertSystemVersionProcessingMode(org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DEFAULT: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.DEFAULT; + case CHECK: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.CHECK; + case OVERRIDE: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.OVERRIDE; + default: return org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode convertSystemVersionProcessingMode(org.hl7.fhir.r4.model.ExpansionProfile.SystemVersionProcessingMode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DEFAULT: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.DEFAULT; + case CHECK: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.CHECK; + case OVERRIDE: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.OVERRIDE; + default: return org.hl7.fhir.dstu3.model.ExpansionProfile.SystemVersionProcessingMode.NULL; + } +} + + public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + if (src.hasEquivalence()) + tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); + if (src.hasComment()) + tgt.setComment(src.getComment()); + for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) + tgt.addDependsOn(convertOtherElementComponent(t)); + for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct()) + tgt.addProduct(convertOtherElementComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasDisplay()) + tgt.setDisplay(src.getDisplay()); + if (src.hasEquivalence()) + tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); + if (src.hasComment()) + tgt.setComment(src.getComment()); + for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) + tgt.addDependsOn(convertOtherElementComponent(t)); + for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct()) + tgt.addProduct(convertOtherElementComponent(t)); + return tgt; + } + public static org.hl7.fhir.r4.model.Task convertTask(org.hl7.fhir.dstu3.model.Task src) throws FHIRException { if (src == null) return null; @@ -25877,8 +22624,6 @@ public class VersionConvertor_30_40 { tgt.addPerformerType(convertCodeableConcept(t)); if (src.hasOwner()) tgt.setOwner(convertReference(src.getOwner())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(convertAnnotation(t)); for (org.hl7.fhir.dstu3.model.Reference t : src.getRelevantHistory()) @@ -25939,8 +22684,6 @@ public class VersionConvertor_30_40 { tgt.addPerformerType(convertCodeableConcept(t)); if (src.hasOwner()) tgt.setOwner(convertReference(src.getOwner())); - if (src.hasReason()) - tgt.setReason(convertCodeableConcept(src.getReason())); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(convertAnnotation(t)); for (org.hl7.fhir.r4.model.Reference t : src.getRelevantHistory()) @@ -25954,46 +22697,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.Task.TaskStatus convertTaskStatus(org.hl7.fhir.dstu3.model.Task.TaskStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.r4.model.Task.TaskStatus.DRAFT; - case REQUESTED: return org.hl7.fhir.r4.model.Task.TaskStatus.REQUESTED; - case RECEIVED: return org.hl7.fhir.r4.model.Task.TaskStatus.RECEIVED; - case ACCEPTED: return org.hl7.fhir.r4.model.Task.TaskStatus.ACCEPTED; - case REJECTED: return org.hl7.fhir.r4.model.Task.TaskStatus.REJECTED; - case READY: return org.hl7.fhir.r4.model.Task.TaskStatus.READY; - case CANCELLED: return org.hl7.fhir.r4.model.Task.TaskStatus.CANCELLED; - case INPROGRESS: return org.hl7.fhir.r4.model.Task.TaskStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.r4.model.Task.TaskStatus.ONHOLD; - case FAILED: return org.hl7.fhir.r4.model.Task.TaskStatus.FAILED; - case COMPLETED: return org.hl7.fhir.r4.model.Task.TaskStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.Task.TaskStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.Task.TaskStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.Task.TaskStatus convertTaskStatus(org.hl7.fhir.r4.model.Task.TaskStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DRAFT: return org.hl7.fhir.dstu3.model.Task.TaskStatus.DRAFT; - case REQUESTED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.REQUESTED; - case RECEIVED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.RECEIVED; - case ACCEPTED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.ACCEPTED; - case REJECTED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.REJECTED; - case READY: return org.hl7.fhir.dstu3.model.Task.TaskStatus.READY; - case CANCELLED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.CANCELLED; - case INPROGRESS: return org.hl7.fhir.dstu3.model.Task.TaskStatus.INPROGRESS; - case ONHOLD: return org.hl7.fhir.dstu3.model.Task.TaskStatus.ONHOLD; - case FAILED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.FAILED; - case COMPLETED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.COMPLETED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Task.TaskStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.Task.TaskStatus.NULL; - } -} - private static org.hl7.fhir.r4.model.Task.TaskIntent convertTaskIntent(org.hl7.fhir.dstu3.model.Task.TaskIntent src) throws FHIRException { if (src == null) return null; @@ -26026,6 +22729,30 @@ public class VersionConvertor_30_40 { } } + public static org.hl7.fhir.r4.model.Task.TaskOutputComponent convertTaskOutputComponent(org.hl7.fhir.dstu3.model.Task.TaskOutputComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Task.TaskOutputComponent tgt = new org.hl7.fhir.r4.model.Task.TaskOutputComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Task.TaskOutputComponent convertTaskOutputComponent(org.hl7.fhir.r4.model.Task.TaskOutputComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Task.TaskOutputComponent tgt = new org.hl7.fhir.dstu3.model.Task.TaskOutputComponent(); + copyElement(src, tgt); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + private static org.hl7.fhir.r4.model.Task.TaskPriority convertTaskPriority(org.hl7.fhir.dstu3.model.Task.TaskPriority src) throws FHIRException { if (src == null) return null; @@ -26102,51 +22829,255 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.Task.ParameterComponent convertParameterComponent(org.hl7.fhir.dstu3.model.Task.ParameterComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.Task.TaskStatus convertTaskStatus(org.hl7.fhir.dstu3.model.Task.TaskStatus src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Task.ParameterComponent tgt = new org.hl7.fhir.r4.model.Task.ParameterComponent(); + switch (src) { + case DRAFT: return org.hl7.fhir.r4.model.Task.TaskStatus.DRAFT; + case REQUESTED: return org.hl7.fhir.r4.model.Task.TaskStatus.REQUESTED; + case RECEIVED: return org.hl7.fhir.r4.model.Task.TaskStatus.RECEIVED; + case ACCEPTED: return org.hl7.fhir.r4.model.Task.TaskStatus.ACCEPTED; + case REJECTED: return org.hl7.fhir.r4.model.Task.TaskStatus.REJECTED; + case READY: return org.hl7.fhir.r4.model.Task.TaskStatus.READY; + case CANCELLED: return org.hl7.fhir.r4.model.Task.TaskStatus.CANCELLED; + case INPROGRESS: return org.hl7.fhir.r4.model.Task.TaskStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.r4.model.Task.TaskStatus.ONHOLD; + case FAILED: return org.hl7.fhir.r4.model.Task.TaskStatus.FAILED; + case COMPLETED: return org.hl7.fhir.r4.model.Task.TaskStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.Task.TaskStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.Task.TaskStatus.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Task.TaskStatus convertTaskStatus(org.hl7.fhir.r4.model.Task.TaskStatus src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DRAFT: return org.hl7.fhir.dstu3.model.Task.TaskStatus.DRAFT; + case REQUESTED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.REQUESTED; + case RECEIVED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.RECEIVED; + case ACCEPTED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.ACCEPTED; + case REJECTED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.REJECTED; + case READY: return org.hl7.fhir.dstu3.model.Task.TaskStatus.READY; + case CANCELLED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.CANCELLED; + case INPROGRESS: return org.hl7.fhir.dstu3.model.Task.TaskStatus.INPROGRESS; + case ONHOLD: return org.hl7.fhir.dstu3.model.Task.TaskStatus.ONHOLD; + case FAILED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.FAILED; + case COMPLETED: return org.hl7.fhir.dstu3.model.Task.TaskStatus.COMPLETED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.Task.TaskStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.Task.TaskStatus.NULL; + } +} + + public static org.hl7.fhir.r4.model.TestReport.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestReport.TeardownActionComponent tgt = new org.hl7.fhir.r4.model.TestReport.TeardownActionComponent(); copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); return tgt; } - public static org.hl7.fhir.dstu3.model.Task.ParameterComponent convertParameterComponent(org.hl7.fhir.r4.model.Task.ParameterComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.r4.model.TestReport.TeardownActionComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Task.ParameterComponent tgt = new org.hl7.fhir.dstu3.model.Task.ParameterComponent(); + org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent(); copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); return tgt; } - public static org.hl7.fhir.r4.model.Task.TaskOutputComponent convertTaskOutputComponent(org.hl7.fhir.dstu3.model.Task.TaskOutputComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.Task.TaskOutputComponent tgt = new org.hl7.fhir.r4.model.Task.TaskOutputComponent(); + org.hl7.fhir.r4.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TeardownActionComponent(); copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); return tgt; } - public static org.hl7.fhir.dstu3.model.Task.TaskOutputComponent convertTaskOutputComponent(org.hl7.fhir.r4.model.Task.TaskOutputComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.r4.model.TestScript.TeardownActionComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.Task.TaskOutputComponent tgt = new org.hl7.fhir.dstu3.model.Task.TaskOutputComponent(); + org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent(); copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.AgentComponent convertTermAgentComponent(org.hl7.fhir.dstu3.model.Contract.TermAgentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.AgentComponent tgt = new org.hl7.fhir.r4.model.Contract.AgentComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.TermAgentComponent convertTermAgentComponent(org.hl7.fhir.r4.model.Contract.AgentComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.TermAgentComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermAgentComponent(); + copyElement(src, tgt); + if (src.hasActor()) + tgt.setActor(convertReference(src.getActor())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) + tgt.addRole(convertCodeableConcept(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.dstu3.model.Contract.TermComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.TermComponent tgt = new org.hl7.fhir.r4.model.Contract.TermComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasIssued()) + tgt.setIssued(src.getIssued()); + if (src.hasApplies()) + tgt.setApplies(convertPeriod(src.getApplies())); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); + if (src.hasSubType()) + tgt.setSubType(convertCodeableConcept(src.getSubType())); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAction()) + tgt.addAction(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getActionReason()) + tgt.addActionReason(convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.Contract.TermAgentComponent t : src.getAgent()) + tgt.addAgent(convertTermAgentComponent(t)); + for (org.hl7.fhir.dstu3.model.Contract.TermComponent t : src.getGroup()) + tgt.addGroup(convertTermComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.r4.model.Contract.TermComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.TermComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermComponent(); + copyElement(src, tgt); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasIssued()) + tgt.setIssued(src.getIssued()); + if (src.hasApplies()) + tgt.setApplies(convertPeriod(src.getApplies())); + if (src.hasType()) + tgt.setType(convertCodeableConcept(src.getType())); + if (src.hasSubType()) + tgt.setSubType(convertCodeableConcept(src.getSubType())); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAction()) + tgt.addAction(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.CodeableConcept t : src.getActionReason()) + tgt.addActionReason(convertCodeableConcept(t)); + for (org.hl7.fhir.r4.model.Contract.AgentComponent t : src.getAgent()) + tgt.addAgent(convertTermAgentComponent(t)); + for (org.hl7.fhir.r4.model.Contract.TermComponent t : src.getGroup()) + tgt.addGroup(convertTermComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); + copyElement(src, tgt); + if (src.hasEntity()) + tgt.setEntity(convertType(src.getEntity())); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasEffectiveTime()) + tgt.setEffectiveTime(src.getEffectiveTime()); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasPoints()) + tgt.setPoints(src.getPoints()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent(); + copyElement(src, tgt); + if (src.hasEntity()) + tgt.setEntity(convertType(src.getEntity())); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasEffectiveTime()) + tgt.setEffectiveTime(src.getEffectiveTime()); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasPoints()) + tgt.setPoints(src.getPoints()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestReport.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestReport.TestActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestReport.TestActionComponent tgt = new org.hl7.fhir.r4.model.TestReport.TestActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestReport.TestActionComponent convertTestActionComponent(org.hl7.fhir.r4.model.TestReport.TestActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestReport.TestActionComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TestActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestScript.TestActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.r4.model.TestScript.TestActionComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestActionComponent(); + copyElement(src, tgt); + if (src.hasOperation()) + tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); + if (src.hasAssert()) + tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); return tgt; } @@ -26214,51 +23145,29 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.TestReport.TestReportStatus convertTestReportStatus(org.hl7.fhir.dstu3.model.TestReport.TestReportStatus src) throws FHIRException { + private static org.hl7.fhir.r4.model.TestReport.TestReportActionResult convertTestReportActionResult(org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult src) throws FHIRException { if (src == null) return null; switch (src) { - case COMPLETED: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.COMPLETED; - case INPROGRESS: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.INPROGRESS; - case WAITING: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.WAITING; - case STOPPED: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.STOPPED; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.NULL; + case PASS: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.PASS; + case SKIP: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.SKIP; + case FAIL: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.FAIL; + case WARNING: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.WARNING; + case ERROR: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.ERROR; + default: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.NULL; } } - private static org.hl7.fhir.dstu3.model.TestReport.TestReportStatus convertTestReportStatus(org.hl7.fhir.r4.model.TestReport.TestReportStatus src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult convertTestReportActionResult(org.hl7.fhir.r4.model.TestReport.TestReportActionResult src) throws FHIRException { if (src == null) return null; switch (src) { - case COMPLETED: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.COMPLETED; - case INPROGRESS: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.INPROGRESS; - case WAITING: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.WAITING; - case STOPPED: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.STOPPED; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.NULL; - } -} - - private static org.hl7.fhir.r4.model.TestReport.TestReportResult convertTestReportResult(org.hl7.fhir.dstu3.model.TestReport.TestReportResult src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PASS: return org.hl7.fhir.r4.model.TestReport.TestReportResult.PASS; - case FAIL: return org.hl7.fhir.r4.model.TestReport.TestReportResult.FAIL; - case PENDING: return org.hl7.fhir.r4.model.TestReport.TestReportResult.PENDING; - default: return org.hl7.fhir.r4.model.TestReport.TestReportResult.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.TestReport.TestReportResult convertTestReportResult(org.hl7.fhir.r4.model.TestReport.TestReportResult src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case PASS: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.PASS; - case FAIL: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.FAIL; - case PENDING: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.PENDING; - default: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.NULL; + case PASS: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.PASS; + case SKIP: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.SKIP; + case FAIL: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.FAIL; + case WARNING: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.WARNING; + case ERROR: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.ERROR; + default: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.NULL; } } @@ -26312,6 +23221,28 @@ public class VersionConvertor_30_40 { } } + private static org.hl7.fhir.r4.model.TestReport.TestReportResult convertTestReportResult(org.hl7.fhir.dstu3.model.TestReport.TestReportResult src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PASS: return org.hl7.fhir.r4.model.TestReport.TestReportResult.PASS; + case FAIL: return org.hl7.fhir.r4.model.TestReport.TestReportResult.FAIL; + case PENDING: return org.hl7.fhir.r4.model.TestReport.TestReportResult.PENDING; + default: return org.hl7.fhir.r4.model.TestReport.TestReportResult.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.TestReport.TestReportResult convertTestReportResult(org.hl7.fhir.r4.model.TestReport.TestReportResult src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case PASS: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.PASS; + case FAIL: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.FAIL; + case PENDING: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.PENDING; + default: return org.hl7.fhir.dstu3.model.TestReport.TestReportResult.NULL; + } +} + public static org.hl7.fhir.r4.model.TestReport.TestReportSetupComponent convertTestReportSetupComponent(org.hl7.fhir.dstu3.model.TestReport.TestReportSetupComponent src) throws FHIRException { if (src == null) return null; @@ -26332,109 +23263,49 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.TestReport.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestReport.SetupActionComponent tgt = new org.hl7.fhir.r4.model.TestReport.SetupActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.r4.model.TestReport.SetupActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.SetupActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent tgt = new org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent(); - copyElement(src, tgt); - if (src.hasResult()) - tgt.setResult(convertTestReportActionResult(src.getResult())); - if (src.hasMessage()) - tgt.setMessage(src.getMessage()); - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.r4.model.TestReport.SetupActionOperationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.SetupActionOperationComponent(); - copyElement(src, tgt); - if (src.hasResult()) - tgt.setResult(convertTestReportActionResult(src.getResult())); - if (src.hasMessage()) - tgt.setMessage(src.getMessage()); - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); - return tgt; - } - - private static org.hl7.fhir.r4.model.TestReport.TestReportActionResult convertTestReportActionResult(org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult src) throws FHIRException { + private static org.hl7.fhir.r4.model.TestReport.TestReportStatus convertTestReportStatus(org.hl7.fhir.dstu3.model.TestReport.TestReportStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case PASS: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.PASS; - case SKIP: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.SKIP; - case FAIL: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.FAIL; - case WARNING: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.WARNING; - case ERROR: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.ERROR; - default: return org.hl7.fhir.r4.model.TestReport.TestReportActionResult.NULL; + case COMPLETED: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.COMPLETED; + case INPROGRESS: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.INPROGRESS; + case WAITING: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.WAITING; + case STOPPED: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.STOPPED; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.TestReport.TestReportStatus.NULL; } } - private static org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult convertTestReportActionResult(org.hl7.fhir.r4.model.TestReport.TestReportActionResult src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.TestReport.TestReportStatus convertTestReportStatus(org.hl7.fhir.r4.model.TestReport.TestReportStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case PASS: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.PASS; - case SKIP: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.SKIP; - case FAIL: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.FAIL; - case WARNING: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.WARNING; - case ERROR: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.ERROR; - default: return org.hl7.fhir.dstu3.model.TestReport.TestReportActionResult.NULL; + case COMPLETED: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.COMPLETED; + case INPROGRESS: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.INPROGRESS; + case WAITING: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.WAITING; + case STOPPED: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.STOPPED; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.TestReport.TestReportStatus.NULL; } } - public static org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent convertTestReportTeardownComponent(org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent(); + org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent tgt = new org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent(); copyElement(src, tgt); - if (src.hasResult()) - tgt.setResult(convertTestReportActionResult(src.getResult())); - if (src.hasMessage()) - tgt.setMessage(src.getMessage()); - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); + for (org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent t : src.getAction()) + tgt.addAction(convertTeardownActionComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.r4.model.TestReport.SetupActionAssertComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent convertTestReportTeardownComponent(org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.SetupActionAssertComponent(); + org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent(); copyElement(src, tgt); - if (src.hasResult()) - tgt.setResult(convertTestReportActionResult(src.getResult())); - if (src.hasMessage()) - tgt.setMessage(src.getMessage()); - if (src.hasDetail()) - tgt.setDetail(src.getDetail()); + for (org.hl7.fhir.r4.model.TestReport.TeardownActionComponent t : src.getAction()) + tgt.addAction(convertTeardownActionComponent(t)); return tgt; } @@ -26466,70 +23337,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.TestReport.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestReport.TestActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestReport.TestActionComponent tgt = new org.hl7.fhir.r4.model.TestReport.TestActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestReport.TestActionComponent convertTestActionComponent(org.hl7.fhir.r4.model.TestReport.TestActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestReport.TestActionComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TestActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent convertTestReportTeardownComponent(org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent tgt = new org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent t : src.getAction()) - tgt.addAction(convertTeardownActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent convertTestReportTeardownComponent(org.hl7.fhir.r4.model.TestReport.TestReportTeardownComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TestReportTeardownComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.TestReport.TeardownActionComponent t : src.getAction()) - tgt.addAction(convertTeardownActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestReport.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestReport.TeardownActionComponent tgt = new org.hl7.fhir.r4.model.TestReport.TeardownActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.r4.model.TestReport.TeardownActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent tgt = new org.hl7.fhir.dstu3.model.TestReport.TeardownActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - return tgt; - } - public static org.hl7.fhir.r4.model.TestScript convertTestScript(org.hl7.fhir.dstu3.model.TestScript src) throws FHIRException { if (src == null) return null; @@ -26650,30 +23457,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent convertTestScriptOriginComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent(); - copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); - if (src.hasProfile()) - tgt.setProfile(convertCoding(src.getProfile())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent convertTestScriptOriginComponent(org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent(); - copyElement(src, tgt); - if (src.hasIndex()) - tgt.setIndex(src.getIndex()); - if (src.hasProfile()) - tgt.setProfile(convertCoding(src.getProfile())); - return tgt; - } - public static org.hl7.fhir.r4.model.TestScript.TestScriptDestinationComponent convertTestScriptDestinationComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent src) throws FHIRException { if (src == null) return null; @@ -26698,6 +23481,78 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); + copyElement(src, tgt); + if (src.hasAutocreate()) + tgt.setAutocreate(src.getAutocreate()); + if (src.hasAutodelete()) + tgt.setAutodelete(src.getAutodelete()); + if (src.hasResource()) + tgt.setResource(convertReference(src.getResource())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent(); + copyElement(src, tgt); + if (src.hasAutocreate()) + tgt.setAutocreate(src.getAutocreate()); + if (src.hasAutodelete()) + tgt.setAutodelete(src.getAutodelete()); + if (src.hasResource()) + tgt.setResource(convertReference(src.getResource())); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); + copyElement(src, tgt); + if (src.hasRequired()) + tgt.setRequired(src.getRequired()); + if (src.hasValidated()) + tgt.setValidated(src.getValidated()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) + tgt.addOrigin(t.getValue()); + if (src.hasDestination()) + tgt.setDestination(src.getDestination()); + for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) + tgt.addLink(t.getValue()); + if (src.hasCapabilities()) + tgt.setCapabilities(convertReference(src.getCapabilities())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent(); + copyElement(src, tgt); + if (src.hasRequired()) + tgt.setRequired(src.getRequired()); + if (src.hasValidated()) + tgt.setValidated(src.getValidated()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.IntegerType t : src.getOrigin()) + tgt.addOrigin(t.getValue()); + if (src.hasDestination()) + tgt.setDestination(src.getDestination()); + for (org.hl7.fhir.r4.model.UriType t : src.getLink()) + tgt.addLink(t.getValue()); + if (src.hasCapabilities()) + tgt.setCapabilities(convertReference(src.getCapabilities())); + return tgt; + } + public static org.hl7.fhir.r4.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent src) throws FHIRException { if (src == null) return null; @@ -26746,75 +23601,171 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent convertTestScriptOriginComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); + org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent(); copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) - tgt.addOrigin(t.getValue()); - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); - for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) - tgt.addLink(t.getValue()); - if (src.hasCapabilities()) - tgt.setCapabilities(convertReference(src.getCapabilities())); + if (src.hasIndex()) + tgt.setIndex(src.getIndex()); + if (src.hasProfile()) + tgt.setProfile(convertCoding(src.getProfile())); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent convertTestScriptOriginComponent(org.hl7.fhir.r4.model.TestScript.TestScriptOriginComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent(); + org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent(); copyElement(src, tgt); - if (src.hasRequired()) - tgt.setRequired(src.getRequired()); - if (src.hasValidated()) - tgt.setValidated(src.getValidated()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.IntegerType t : src.getOrigin()) - tgt.addOrigin(t.getValue()); - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); - for (org.hl7.fhir.r4.model.UriType t : src.getLink()) - tgt.addLink(t.getValue()); - if (src.hasCapabilities()) - tgt.setCapabilities(convertReference(src.getCapabilities())); + if (src.hasIndex()) + tgt.setIndex(src.getIndex()); + if (src.hasProfile()) + tgt.setProfile(convertCoding(src.getProfile())); return tgt; } - public static org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { + private static org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode convertTestScriptRequestMethodCode(org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); + switch (src) { + case DELETE: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.DELETE; + case GET: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.GET; + case OPTIONS: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.OPTIONS; + case PATCH: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.PATCH; + case POST: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.POST; + case PUT: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.PUT; + default: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode convertTestScriptRequestMethodCode(org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case DELETE: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.DELETE; + case GET: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.GET; + case OPTIONS: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.OPTIONS; + case PATCH: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.PATCH; + case POST: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.POST; + case PUT: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.PUT; + default: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.NULL; + } +} + + public static org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent convertTestScriptRuleComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent(); copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); if (src.hasResource()) tgt.setResource(convertReference(src.getResource())); + for (org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent t : src.getParam()) + tgt.addParam(convertRuleParamComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent convertTestScriptRuleComponent(org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent(); + org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent(); copyElement(src, tgt); - if (src.hasAutocreate()) - tgt.setAutocreate(src.getAutocreate()); - if (src.hasAutodelete()) - tgt.setAutodelete(src.getAutodelete()); if (src.hasResource()) tgt.setResource(convertReference(src.getResource())); + for (org.hl7.fhir.r4.model.TestScript.RuleParamComponent t : src.getParam()) + tgt.addParam(convertRuleParamComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent convertTestScriptRulesetComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent(); + copyElement(src, tgt); + if (src.hasResource()) + tgt.setResource(convertReference(src.getResource())); + for (org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent t : src.getRule()) + tgt.addRule(convertRulesetRuleComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent convertTestScriptRulesetComponent(org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent(); + copyElement(src, tgt); + if (src.hasResource()) + tgt.setResource(convertReference(src.getResource())); + for (org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent t : src.getRule()) + tgt.addRule(convertRulesetRuleComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent t : src.getAction()) + tgt.addAction(convertSetupActionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.TestScript.SetupActionComponent t : src.getAction()) + tgt.addAction(convertSetupActionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent t : src.getAction()) + tgt.addAction(convertTeardownActionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent(); + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.TestScript.TeardownActionComponent t : src.getAction()) + tgt.addAction(convertTeardownActionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) + tgt.addAction(convertTestActionComponent(t)); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasDescription()) + tgt.setDescription(src.getDescription()); + for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) + tgt.addAction(convertTestActionComponent(t)); return tgt; } @@ -26866,745 +23817,583 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent convertTestScriptRuleComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent(); + public static org.hl7.fhir.r4.model.TimeType convertTime(org.hl7.fhir.dstu3.model.TimeType src) throws FHIRException { + org.hl7.fhir.r4.model.TimeType tgt = new org.hl7.fhir.r4.model.TimeType(src.getValue()); copyElement(src, tgt); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - for (org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent t : src.getParam()) - tgt.addParam(convertRuleParamComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent convertTestScriptRuleComponent(org.hl7.fhir.r4.model.TestScript.TestScriptRuleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent(); + public static org.hl7.fhir.dstu3.model.TimeType convertTime(org.hl7.fhir.r4.model.TimeType src) throws FHIRException { + org.hl7.fhir.dstu3.model.TimeType tgt = new org.hl7.fhir.dstu3.model.TimeType(src.getValue()); copyElement(src, tgt); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - for (org.hl7.fhir.r4.model.TestScript.RuleParamComponent t : src.getParam()) - tgt.addParam(convertRuleParamComponent(t)); return tgt; } - public static org.hl7.fhir.r4.model.TestScript.RuleParamComponent convertRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Timing convertTiming(org.hl7.fhir.dstu3.model.Timing src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestScript.RuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.RuleParamComponent(); + org.hl7.fhir.r4.model.Timing tgt = new org.hl7.fhir.r4.model.Timing(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); + for (org.hl7.fhir.dstu3.model.DateTimeType t : src.getEvent()) + tgt.addEvent(t.getValue()); + if (src.hasRepeat()) + tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent convertRuleParamComponent(org.hl7.fhir.r4.model.TestScript.RuleParamComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Timing convertTiming(org.hl7.fhir.r4.model.Timing src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent(); + org.hl7.fhir.dstu3.model.Timing tgt = new org.hl7.fhir.dstu3.model.Timing(); copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); + for (org.hl7.fhir.r4.model.DateTimeType t : src.getEvent()) + tgt.addEvent(t.getValue()); + if (src.hasRepeat()) + tgt.setRepeat(convertTimingRepeatComponent(src.getRepeat())); + if (src.hasCode()) + tgt.setCode(convertCodeableConcept(src.getCode())); return tgt; } - public static org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent convertTestScriptRulesetComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent(); + org.hl7.fhir.r4.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.r4.model.Timing.TimingRepeatComponent(); copyElement(src, tgt); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - for (org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent t : src.getRule()) - tgt.addRule(convertRulesetRuleComponent(t)); + if (src.hasBounds()) + tgt.setBounds(convertType(src.getBounds())); + if (src.hasCount()) + tgt.setCount(src.getCount()); + if (src.hasCountMax()) + tgt.setCountMax(src.getCountMax()); + if (src.hasDuration()) + tgt.setDuration(src.getDuration()); + if (src.hasDurationMax()) + tgt.setDurationMax(src.getDurationMax()); + if (src.hasDurationUnit()) + tgt.setDurationUnit(convertUnitsOfTime(src.getDurationUnit())); + if (src.hasFrequency()) + tgt.setFrequency(src.getFrequency()); + if (src.hasFrequencyMax()) + tgt.setFrequencyMax(src.getFrequencyMax()); + if (src.hasPeriod()) + tgt.setPeriod(src.getPeriod()); + if (src.hasPeriodMax()) + tgt.setPeriodMax(src.getPeriodMax()); + if (src.hasPeriodUnit()) + tgt.setPeriodUnit(convertUnitsOfTime(src.getPeriodUnit())); + for (org.hl7.fhir.dstu3.model.Enumeration t : src.getDayOfWeek()) + tgt.addDayOfWeek(convertDayOfWeek(t.getValue())); + for (org.hl7.fhir.dstu3.model.TimeType t : src.getTimeOfDay()) + tgt.addTimeOfDay(t.getValue()); + for (org.hl7.fhir.dstu3.model.Enumeration t : src.getWhen()) + tgt.addWhen(convertEventTiming(t.getValue())); + if (src.hasOffset()) + tgt.setOffset(src.getOffset()); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent convertTestScriptRulesetComponent(org.hl7.fhir.r4.model.TestScript.TestScriptRulesetComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent convertTimingRepeatComponent(org.hl7.fhir.r4.model.Timing.TimingRepeatComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent(); + org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent tgt = new org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent(); copyElement(src, tgt); - if (src.hasResource()) - tgt.setResource(convertReference(src.getResource())); - for (org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent t : src.getRule()) - tgt.addRule(convertRulesetRuleComponent(t)); + if (src.hasBounds()) + tgt.setBounds(convertType(src.getBounds())); + if (src.hasCount()) + tgt.setCount(src.getCount()); + if (src.hasCountMax()) + tgt.setCountMax(src.getCountMax()); + if (src.hasDuration()) + tgt.setDuration(src.getDuration()); + if (src.hasDurationMax()) + tgt.setDurationMax(src.getDurationMax()); + if (src.hasDurationUnit()) + tgt.setDurationUnit(convertUnitsOfTime(src.getDurationUnit())); + if (src.hasFrequency()) + tgt.setFrequency(src.getFrequency()); + if (src.hasFrequencyMax()) + tgt.setFrequencyMax(src.getFrequencyMax()); + if (src.hasPeriod()) + tgt.setPeriod(src.getPeriod()); + if (src.hasPeriodMax()) + tgt.setPeriodMax(src.getPeriodMax()); + if (src.hasPeriodUnit()) + tgt.setPeriodUnit(convertUnitsOfTime(src.getPeriodUnit())); + for (org.hl7.fhir.r4.model.Enumeration t : src.getDayOfWeek()) + tgt.addDayOfWeek(convertDayOfWeek(t.getValue())); + for (org.hl7.fhir.r4.model.TimeType t : src.getTimeOfDay()) + tgt.addTimeOfDay(t.getValue()); + for (org.hl7.fhir.r4.model.Enumeration t : src.getWhen()) + tgt.addWhen(convertEventTiming(t.getValue())); + if (src.hasOffset()) + tgt.setOffset(src.getOffset()); return tgt; } - public static org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent convertRulesetRuleComponent(org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent(); - copyElement(src, tgt); - if (src.hasRuleId()) - tgt.setRuleId(src.getRuleId()); - for (org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent t : src.getParam()) - tgt.addParam(convertRulesetRuleParamComponent(t)); - return tgt; + if (src instanceof org.hl7.fhir.dstu3.model.Base64BinaryType) + return convertBase64Binary((org.hl7.fhir.dstu3.model.Base64BinaryType) src); + if (src instanceof org.hl7.fhir.dstu3.model.BooleanType) + return convertBoolean((org.hl7.fhir.dstu3.model.BooleanType) src); + if (src instanceof org.hl7.fhir.dstu3.model.CodeType) + return convertCode((org.hl7.fhir.dstu3.model.CodeType) src); + if (src instanceof org.hl7.fhir.dstu3.model.DateType) + return convertDate((org.hl7.fhir.dstu3.model.DateType) src); + if (src instanceof org.hl7.fhir.dstu3.model.DateTimeType) + return convertDateTime((org.hl7.fhir.dstu3.model.DateTimeType) src); + if (src instanceof org.hl7.fhir.dstu3.model.DecimalType) + return convertDecimal((org.hl7.fhir.dstu3.model.DecimalType) src); + if (src instanceof org.hl7.fhir.dstu3.model.IdType) + return convertId((org.hl7.fhir.dstu3.model.IdType) src); + if (src instanceof org.hl7.fhir.dstu3.model.InstantType) + return convertInstant((org.hl7.fhir.dstu3.model.InstantType) src); + if (src instanceof org.hl7.fhir.dstu3.model.IntegerType) + return convertInteger((org.hl7.fhir.dstu3.model.IntegerType) src); + if (src instanceof org.hl7.fhir.dstu3.model.MarkdownType) + return convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src); + if (src instanceof org.hl7.fhir.dstu3.model.OidType) + return convertOid((org.hl7.fhir.dstu3.model.OidType) src); + if (src instanceof org.hl7.fhir.dstu3.model.PositiveIntType) + return convertPositiveInt((org.hl7.fhir.dstu3.model.PositiveIntType) src); + if (src instanceof org.hl7.fhir.dstu3.model.StringType) + return convertString((org.hl7.fhir.dstu3.model.StringType) src); + if (src instanceof org.hl7.fhir.dstu3.model.TimeType) + return convertTime((org.hl7.fhir.dstu3.model.TimeType) src); + if (src instanceof org.hl7.fhir.dstu3.model.UnsignedIntType) + return convertUnsignedInt((org.hl7.fhir.dstu3.model.UnsignedIntType) src); + if (src instanceof org.hl7.fhir.dstu3.model.UriType) + return convertUri((org.hl7.fhir.dstu3.model.UriType) src); + if (src instanceof org.hl7.fhir.dstu3.model.UuidType) + return convertUuid((org.hl7.fhir.dstu3.model.UuidType) src); + if (src instanceof org.hl7.fhir.dstu3.model.Extension) + return convertExtension((org.hl7.fhir.dstu3.model.Extension) src); + if (src instanceof org.hl7.fhir.dstu3.model.Narrative) + return convertNarrative((org.hl7.fhir.dstu3.model.Narrative) src); + if (src instanceof org.hl7.fhir.dstu3.model.Age) + return convertAge((org.hl7.fhir.dstu3.model.Age) src); + if (src instanceof org.hl7.fhir.dstu3.model.Annotation) + return convertAnnotation((org.hl7.fhir.dstu3.model.Annotation) src); + if (src instanceof org.hl7.fhir.dstu3.model.Attachment) + return convertAttachment((org.hl7.fhir.dstu3.model.Attachment) src); + if (src instanceof org.hl7.fhir.dstu3.model.CodeableConcept) + return convertCodeableConcept((org.hl7.fhir.dstu3.model.CodeableConcept) src); + if (src instanceof org.hl7.fhir.dstu3.model.Coding) + return convertCoding((org.hl7.fhir.dstu3.model.Coding) src); + if (src instanceof org.hl7.fhir.dstu3.model.Count) + return convertCount((org.hl7.fhir.dstu3.model.Count) src); + if (src instanceof org.hl7.fhir.dstu3.model.Distance) + return convertDistance((org.hl7.fhir.dstu3.model.Distance) src); + if (src instanceof org.hl7.fhir.dstu3.model.Duration) + return convertDuration((org.hl7.fhir.dstu3.model.Duration) src); + if (src instanceof org.hl7.fhir.dstu3.model.Identifier) + return convertIdentifier((org.hl7.fhir.dstu3.model.Identifier) src); + if (src instanceof org.hl7.fhir.dstu3.model.Money) + return convertMoney((org.hl7.fhir.dstu3.model.Money) src); + if (src instanceof org.hl7.fhir.dstu3.model.Period) + return convertPeriod((org.hl7.fhir.dstu3.model.Period) src); + if (src instanceof org.hl7.fhir.dstu3.model.Quantity) + return convertQuantity((org.hl7.fhir.dstu3.model.Quantity) src); + if (src instanceof org.hl7.fhir.dstu3.model.Range) + return convertRange((org.hl7.fhir.dstu3.model.Range) src); + if (src instanceof org.hl7.fhir.dstu3.model.Ratio) + return convertRatio((org.hl7.fhir.dstu3.model.Ratio) src); + if (src instanceof org.hl7.fhir.dstu3.model.Reference) + return convertReference((org.hl7.fhir.dstu3.model.Reference) src); + if (src instanceof org.hl7.fhir.dstu3.model.SampledData) + return convertSampledData((org.hl7.fhir.dstu3.model.SampledData) src); + if (src instanceof org.hl7.fhir.dstu3.model.Signature) + return convertSignature((org.hl7.fhir.dstu3.model.Signature) src); + if (src instanceof org.hl7.fhir.dstu3.model.Address) + return convertAddress((org.hl7.fhir.dstu3.model.Address) src); + if (src instanceof org.hl7.fhir.dstu3.model.ContactDetail) + return convertContactDetail((org.hl7.fhir.dstu3.model.ContactDetail) src); + if (src instanceof org.hl7.fhir.dstu3.model.ContactPoint) + return convertContactPoint((org.hl7.fhir.dstu3.model.ContactPoint) src); + if (src instanceof org.hl7.fhir.dstu3.model.Contributor) + return convertContributor((org.hl7.fhir.dstu3.model.Contributor) src); + if (src instanceof org.hl7.fhir.dstu3.model.Dosage) + return convertDosage((org.hl7.fhir.dstu3.model.Dosage) src); + if (src instanceof org.hl7.fhir.dstu3.model.ElementDefinition) + return convertElementDefinition((org.hl7.fhir.dstu3.model.ElementDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.HumanName) + return convertHumanName((org.hl7.fhir.dstu3.model.HumanName) src); + if (src instanceof org.hl7.fhir.dstu3.model.Meta) + return convertMeta((org.hl7.fhir.dstu3.model.Meta) src); + if (src instanceof org.hl7.fhir.dstu3.model.ParameterDefinition) + return convertParameterDefinition((org.hl7.fhir.dstu3.model.ParameterDefinition) src); + if (src instanceof org.hl7.fhir.dstu3.model.RelatedArtifact) + return convertRelatedArtifact((org.hl7.fhir.dstu3.model.RelatedArtifact) src); + if (src instanceof org.hl7.fhir.dstu3.model.Timing) + return convertTiming((org.hl7.fhir.dstu3.model.Timing) src); + if (src instanceof org.hl7.fhir.dstu3.model.UsageContext) + return convertUsageContext((org.hl7.fhir.dstu3.model.UsageContext) src); + if (src instanceof org.hl7.fhir.dstu3.model.SimpleQuantity) + return convertSimpleQuantity((org.hl7.fhir.dstu3.model.SimpleQuantity) src); + throw new Error("Unknown type "+src.fhirType()); } - public static org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent convertRulesetRuleComponent(org.hl7.fhir.r4.model.TestScript.RulesetRuleComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent(); - copyElement(src, tgt); - if (src.hasRuleId()) - tgt.setRuleId(src.getRuleId()); - for (org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent t : src.getParam()) - tgt.addParam(convertRulesetRuleParamComponent(t)); - return tgt; + if (src instanceof org.hl7.fhir.r4.model.Base64BinaryType) + return convertBase64Binary((org.hl7.fhir.r4.model.Base64BinaryType) src); + if (src instanceof org.hl7.fhir.r4.model.BooleanType) + return convertBoolean((org.hl7.fhir.r4.model.BooleanType) src); + if (src instanceof org.hl7.fhir.r4.model.CodeType) + return convertCode((org.hl7.fhir.r4.model.CodeType) src); + if (src instanceof org.hl7.fhir.r4.model.DateType) + return convertDate((org.hl7.fhir.r4.model.DateType) src); + if (src instanceof org.hl7.fhir.r4.model.DateTimeType) + return convertDateTime((org.hl7.fhir.r4.model.DateTimeType) src); + if (src instanceof org.hl7.fhir.r4.model.DecimalType) + return convertDecimal((org.hl7.fhir.r4.model.DecimalType) src); + if (src instanceof org.hl7.fhir.r4.model.IdType) + return convertId((org.hl7.fhir.r4.model.IdType) src); + if (src instanceof org.hl7.fhir.r4.model.InstantType) + return convertInstant((org.hl7.fhir.r4.model.InstantType) src); + if (src instanceof org.hl7.fhir.r4.model.IntegerType) + return convertInteger((org.hl7.fhir.r4.model.IntegerType) src); + if (src instanceof org.hl7.fhir.r4.model.MarkdownType) + return convertMarkdown((org.hl7.fhir.r4.model.MarkdownType) src); + if (src instanceof org.hl7.fhir.r4.model.OidType) + return convertOid((org.hl7.fhir.r4.model.OidType) src); + if (src instanceof org.hl7.fhir.r4.model.PositiveIntType) + return convertPositiveInt((org.hl7.fhir.r4.model.PositiveIntType) src); + if (src instanceof org.hl7.fhir.r4.model.StringType) + return convertString((org.hl7.fhir.r4.model.StringType) src); + if (src instanceof org.hl7.fhir.r4.model.TimeType) + return convertTime((org.hl7.fhir.r4.model.TimeType) src); + if (src instanceof org.hl7.fhir.r4.model.UnsignedIntType) + return convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src); + if (src instanceof org.hl7.fhir.r4.model.UriType) + return convertUri((org.hl7.fhir.r4.model.UriType) src); + if (src instanceof org.hl7.fhir.r4.model.UuidType) + return convertUuid((org.hl7.fhir.r4.model.UuidType) src); + if (src instanceof org.hl7.fhir.r4.model.Extension) + return convertExtension((org.hl7.fhir.r4.model.Extension) src); + if (src instanceof org.hl7.fhir.r4.model.Narrative) + return convertNarrative((org.hl7.fhir.r4.model.Narrative) src); + if (src instanceof org.hl7.fhir.r4.model.Age) + return convertAge((org.hl7.fhir.r4.model.Age) src); + if (src instanceof org.hl7.fhir.r4.model.Annotation) + return convertAnnotation((org.hl7.fhir.r4.model.Annotation) src); + if (src instanceof org.hl7.fhir.r4.model.Attachment) + return convertAttachment((org.hl7.fhir.r4.model.Attachment) src); + if (src instanceof org.hl7.fhir.r4.model.CodeableConcept) + return convertCodeableConcept((org.hl7.fhir.r4.model.CodeableConcept) src); + if (src instanceof org.hl7.fhir.r4.model.Coding) + return convertCoding((org.hl7.fhir.r4.model.Coding) src); + if (src instanceof org.hl7.fhir.r4.model.Count) + return convertCount((org.hl7.fhir.r4.model.Count) src); + if (src instanceof org.hl7.fhir.r4.model.Distance) + return convertDistance((org.hl7.fhir.r4.model.Distance) src); + if (src instanceof org.hl7.fhir.r4.model.Duration) + return convertDuration((org.hl7.fhir.r4.model.Duration) src); + if (src instanceof org.hl7.fhir.r4.model.Identifier) + return convertIdentifier((org.hl7.fhir.r4.model.Identifier) src); + if (src instanceof org.hl7.fhir.r4.model.Money) + return convertMoney((org.hl7.fhir.r4.model.Money) src); + if (src instanceof org.hl7.fhir.r4.model.Period) + return convertPeriod((org.hl7.fhir.r4.model.Period) src); + if (src instanceof org.hl7.fhir.r4.model.Quantity) + return convertQuantity((org.hl7.fhir.r4.model.Quantity) src); + if (src instanceof org.hl7.fhir.r4.model.Range) + return convertRange((org.hl7.fhir.r4.model.Range) src); + if (src instanceof org.hl7.fhir.r4.model.Ratio) + return convertRatio((org.hl7.fhir.r4.model.Ratio) src); + if (src instanceof org.hl7.fhir.r4.model.Reference) + return convertReference((org.hl7.fhir.r4.model.Reference) src); + if (src instanceof org.hl7.fhir.r4.model.SampledData) + return convertSampledData((org.hl7.fhir.r4.model.SampledData) src); + if (src instanceof org.hl7.fhir.r4.model.Signature) + return convertSignature((org.hl7.fhir.r4.model.Signature) src); + if (src instanceof org.hl7.fhir.r4.model.Address) + return convertAddress((org.hl7.fhir.r4.model.Address) src); + if (src instanceof org.hl7.fhir.r4.model.ContactDetail) + return convertContactDetail((org.hl7.fhir.r4.model.ContactDetail) src); + if (src instanceof org.hl7.fhir.r4.model.ContactPoint) + return convertContactPoint((org.hl7.fhir.r4.model.ContactPoint) src); + if (src instanceof org.hl7.fhir.r4.model.Contributor) + return convertContributor((org.hl7.fhir.r4.model.Contributor) src); + if (src instanceof org.hl7.fhir.r4.model.Dosage) + return convertDosage((org.hl7.fhir.r4.model.Dosage) src); + if (src instanceof org.hl7.fhir.r4.model.ElementDefinition) + return convertElementDefinition((org.hl7.fhir.r4.model.ElementDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.HumanName) + return convertHumanName((org.hl7.fhir.r4.model.HumanName) src); + if (src instanceof org.hl7.fhir.r4.model.Meta) + return convertMeta((org.hl7.fhir.r4.model.Meta) src); + if (src instanceof org.hl7.fhir.r4.model.ParameterDefinition) + return convertParameterDefinition((org.hl7.fhir.r4.model.ParameterDefinition) src); + if (src instanceof org.hl7.fhir.r4.model.RelatedArtifact) + return convertRelatedArtifact((org.hl7.fhir.r4.model.RelatedArtifact) src); + if (src instanceof org.hl7.fhir.r4.model.Timing) + return convertTiming((org.hl7.fhir.r4.model.Timing) src); + if (src instanceof org.hl7.fhir.r4.model.UsageContext) + return convertUsageContext((org.hl7.fhir.r4.model.UsageContext) src); + if (src instanceof org.hl7.fhir.r4.model.SimpleQuantity) + return convertSimpleQuantity((org.hl7.fhir.r4.model.SimpleQuantity) src); + throw new Error("Unknown type "+src.fhirType()); } - public static org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent convertRulesetRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent convertRulesetRuleParamComponent(org.hl7.fhir.r4.model.TestScript.RulesetRuleParamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent t : src.getAction()) - tgt.addAction(convertSetupActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.r4.model.TestScript.TestScriptSetupComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.TestScript.SetupActionComponent t : src.getAction()) - tgt.addAction(convertSetupActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.r4.model.TestScript.SetupActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasResource()) - tgt.setResource(src.getResource()); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasAccept()) - tgt.setAccept(convertContentType(src.getAccept())); - if (src.hasContentType()) - tgt.setContentType(convertContentType(src.getContentType())); - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); - if (src.hasEncodeRequestUrl()) - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - if (src.hasOrigin()) - tgt.setOrigin(src.getOrigin()); - if (src.hasParams()) - tgt.setParams(src.getParams()); - for (org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) - tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); - if (src.hasRequestId()) - tgt.setRequestId(src.getRequestId()); - if (src.hasResponseId()) - tgt.setResponseId(src.getResponseId()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); - if (src.hasTargetId()) - tgt.setTargetId(src.getTargetId()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent(); - copyElement(src, tgt); - if (src.hasType()) - tgt.setType(convertCoding(src.getType())); - if (src.hasResource()) - tgt.setResource(src.getResource()); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasAccept()) - tgt.setAccept(convertContentType(src.getAccept())); - if (src.hasContentType()) - tgt.setContentType(convertContentType(src.getContentType())); - if (src.hasDestination()) - tgt.setDestination(src.getDestination()); - if (src.hasEncodeRequestUrl()) - tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); - if (src.hasOrigin()) - tgt.setOrigin(src.getOrigin()); - if (src.hasParams()) - tgt.setParams(src.getParams()); - for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) - tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); - if (src.hasRequestId()) - tgt.setRequestId(src.getRequestId()); - if (src.hasResponseId()) - tgt.setResponseId(src.getResponseId()); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); - if (src.hasTargetId()) - tgt.setTargetId(src.getTargetId()); - if (src.hasUrl()) - tgt.setUrl(src.getUrl()); - return tgt; - } - - private static org.hl7.fhir.r4.model.TestScript.ContentType convertContentType(org.hl7.fhir.dstu3.model.TestScript.ContentType src) throws FHIRException { + private static org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule convertTypeDerivationRule(org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule src) throws FHIRException { if (src == null) return null; switch (src) { - case XML: return org.hl7.fhir.r4.model.TestScript.ContentType.XML; - case JSON: return org.hl7.fhir.r4.model.TestScript.ContentType.JSON; - case TTL: return org.hl7.fhir.r4.model.TestScript.ContentType.TTL; - case NONE: return org.hl7.fhir.r4.model.TestScript.ContentType.NONE; - default: return org.hl7.fhir.r4.model.TestScript.ContentType.NULL; + case SPECIALIZATION: return org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION; + case CONSTRAINT: return org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT; + default: return org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.NULL; } } - private static org.hl7.fhir.dstu3.model.TestScript.ContentType convertContentType(org.hl7.fhir.r4.model.TestScript.ContentType src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule convertTypeDerivationRule(org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule src) throws FHIRException { if (src == null) return null; switch (src) { - case XML: return org.hl7.fhir.dstu3.model.TestScript.ContentType.XML; - case JSON: return org.hl7.fhir.dstu3.model.TestScript.ContentType.JSON; - case TTL: return org.hl7.fhir.dstu3.model.TestScript.ContentType.TTL; - case NONE: return org.hl7.fhir.dstu3.model.TestScript.ContentType.NONE; - default: return org.hl7.fhir.dstu3.model.TestScript.ContentType.NULL; + case SPECIALIZATION: return org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION; + case CONSTRAINT: return org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.CONSTRAINT; + default: return org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.NULL; } } - public static org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent convertTypeRefComponent(org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent(); + org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent tgt = new org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent(); copyElement(src, tgt); - if (src.hasField()) - tgt.setField(src.getField()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasProfile()) + tgt.setProfile(src.getProfile()); + if (src.hasTargetProfile()) + tgt.setTargetProfile(src.getTargetProfile()); + for (org.hl7.fhir.dstu3.model.Enumeration t : src.getAggregation()) + tgt.addAggregation(convertAggregationMode(t.getValue())); + if (src.hasVersioning()) + tgt.setVersioning(convertReferenceVersionRules(src.getVersioning())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent convertTypeRefComponent(org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(src.getCode()); + if (src.hasProfile()) + tgt.setProfile(src.getProfile()); + if (src.hasTargetProfile()) + tgt.setTargetProfile(src.getTargetProfile()); + for (org.hl7.fhir.r4.model.Enumeration t : src.getAggregation()) + tgt.addAggregation(convertAggregationMode(t.getValue())); + if (src.hasVersioning()) + tgt.setVersioning(convertReferenceVersionRules(src.getVersioning())); + return tgt; + } + + private static org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case READ: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.READ; + case VREAD: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.VREAD; + case UPDATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.UPDATE; + case PATCH: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.PATCH; + case DELETE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.DELETE; + case HISTORYINSTANCE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE; + case HISTORYTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE; + case CREATE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.CREATE; + case SEARCHTYPE: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE; + default: return org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.r4.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case READ: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.READ; + case VREAD: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.VREAD; + case UPDATE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.UPDATE; + case PATCH: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.PATCH; + case DELETE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.DELETE; + case HISTORYINSTANCE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE; + case HISTORYTYPE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE; + case CREATE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.CREATE; + case SEARCHTYPE: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.NULL; + } +} + + private static org.hl7.fhir.r4.model.Device.UDIEntryType convertUDIEntryType(org.hl7.fhir.dstu3.model.Device.UDIEntryType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BARCODE: return org.hl7.fhir.r4.model.Device.UDIEntryType.BARCODE; + case RFID: return org.hl7.fhir.r4.model.Device.UDIEntryType.RFID; + case MANUAL: return org.hl7.fhir.r4.model.Device.UDIEntryType.MANUAL; + case CARD: return org.hl7.fhir.r4.model.Device.UDIEntryType.CARD; + case SELFREPORTED: return org.hl7.fhir.r4.model.Device.UDIEntryType.SELFREPORTED; + case UNKNOWN: return org.hl7.fhir.r4.model.Device.UDIEntryType.UNKNOWN; + default: return org.hl7.fhir.r4.model.Device.UDIEntryType.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Device.UDIEntryType convertUDIEntryType(org.hl7.fhir.r4.model.Device.UDIEntryType src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case BARCODE: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.BARCODE; + case RFID: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.RFID; + case MANUAL: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.MANUAL; + case CARD: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.CARD; + case SELFREPORTED: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.SELFREPORTED; + case UNKNOWN: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.UNKNOWN; + default: return org.hl7.fhir.dstu3.model.Device.UDIEntryType.NULL; + } +} + + private static org.hl7.fhir.r4.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.dstu3.model.Timing.UnitsOfTime src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case S: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.S; + case MIN: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MIN; + case H: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.H; + case D: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.D; + case WK: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.WK; + case MO: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.MO; + case A: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.A; + default: return org.hl7.fhir.r4.model.Timing.UnitsOfTime.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.Timing.UnitsOfTime convertUnitsOfTime(org.hl7.fhir.r4.model.Timing.UnitsOfTime src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case S: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.S; + case MIN: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.MIN; + case H: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.H; + case D: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.D; + case WK: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.WK; + case MO: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.MO; + case A: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.A; + default: return org.hl7.fhir.dstu3.model.Timing.UnitsOfTime.NULL; + } +} + + private static org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NO: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NO; + case EXTENSIONS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.EXTENSIONS; + case ELEMENTS: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.ELEMENTS; + case BOTH: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.BOTH; + default: return org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.r4.model.CapabilityStatement.UnknownContentCode src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case NO: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NO; + case EXTENSIONS: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.EXTENSIONS; + case ELEMENTS: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.ELEMENTS; + case BOTH: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.BOTH; + default: return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NULL; + } +} + + public static org.hl7.fhir.r4.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.dstu3.model.UnsignedIntType src) throws FHIRException { + org.hl7.fhir.r4.model.UnsignedIntType tgt = new org.hl7.fhir.r4.model.UnsignedIntType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.r4.model.UnsignedIntType src) throws FHIRException { + org.hl7.fhir.dstu3.model.UnsignedIntType tgt = new org.hl7.fhir.dstu3.model.UnsignedIntType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { + org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { + org.hl7.fhir.dstu3.model.UriType tgt = new org.hl7.fhir.dstu3.model.UriType(src.getValue()); + copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.UsageContext convertUsageContext(org.hl7.fhir.dstu3.model.UsageContext src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.UsageContext tgt = new org.hl7.fhir.r4.model.UsageContext(); + copyElement(src, tgt); + if (src.hasCode()) + tgt.setCode(convertCoding(src.getCode())); if (src.hasValue()) - tgt.setValue(src.getValue()); + tgt.setValue(convertType(src.getValue())); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.UsageContext convertUsageContext(org.hl7.fhir.r4.model.UsageContext src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent(); + org.hl7.fhir.dstu3.model.UsageContext tgt = new org.hl7.fhir.dstu3.model.UsageContext(); copyElement(src, tgt); - if (src.hasField()) - tgt.setField(src.getField()); + if (src.hasCode()) + tgt.setCode(convertCoding(src.getCode())); if (src.hasValue()) - tgt.setValue(src.getValue()); + tgt.setValue(convertType(src.getValue())); return tgt; } - public static org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasDirection()) - tgt.setDirection(convertAssertionDirectionType(src.getDirection())); - if (src.hasCompareToSourceId()) - tgt.setCompareToSourceId(src.getCompareToSourceId()); - if (src.hasCompareToSourceExpression()) - tgt.setCompareToSourceExpression(src.getCompareToSourceExpression()); - if (src.hasCompareToSourcePath()) - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - if (src.hasContentType()) - tgt.setContentType(convertContentType(src.getContentType())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasMinimumId()) - tgt.setMinimumId(src.getMinimumId()); - if (src.hasNavigationLinks()) - tgt.setNavigationLinks(src.getNavigationLinks()); - if (src.hasOperator()) - tgt.setOperator(convertAssertionOperatorType(src.getOperator())); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasRequestMethod()) - tgt.setRequestMethod(convertTestScriptRequestMethodCode(src.getRequestMethod())); - if (src.hasRequestURL()) - tgt.setRequestURL(src.getRequestURL()); - if (src.hasResource()) - tgt.setResource(src.getResource()); - if (src.hasResponse()) - tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); - if (src.hasResponseCode()) - tgt.setResponseCode(src.getResponseCode()); - if (src.hasRule()) - tgt.setRule(convertActionAssertRuleComponent(src.getRule())); - if (src.hasRuleset()) - tgt.setRuleset(convertActionAssertRulesetComponent(src.getRuleset())); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); - if (src.hasValidateProfileId()) - tgt.setValidateProfileId(src.getValidateProfileId()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasWarningOnly()) - tgt.setWarningOnly(src.getWarningOnly()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent(); - copyElement(src, tgt); - if (src.hasLabel()) - tgt.setLabel(src.getLabel()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - if (src.hasDirection()) - tgt.setDirection(convertAssertionDirectionType(src.getDirection())); - if (src.hasCompareToSourceId()) - tgt.setCompareToSourceId(src.getCompareToSourceId()); - if (src.hasCompareToSourceExpression()) - tgt.setCompareToSourceExpression(src.getCompareToSourceExpression()); - if (src.hasCompareToSourcePath()) - tgt.setCompareToSourcePath(src.getCompareToSourcePath()); - if (src.hasContentType()) - tgt.setContentType(convertContentType(src.getContentType())); - if (src.hasExpression()) - tgt.setExpression(src.getExpression()); - if (src.hasHeaderField()) - tgt.setHeaderField(src.getHeaderField()); - if (src.hasMinimumId()) - tgt.setMinimumId(src.getMinimumId()); - if (src.hasNavigationLinks()) - tgt.setNavigationLinks(src.getNavigationLinks()); - if (src.hasOperator()) - tgt.setOperator(convertAssertionOperatorType(src.getOperator())); - if (src.hasPath()) - tgt.setPath(src.getPath()); - if (src.hasRequestMethod()) - tgt.setRequestMethod(convertTestScriptRequestMethodCode(src.getRequestMethod())); - if (src.hasRequestURL()) - tgt.setRequestURL(src.getRequestURL()); - if (src.hasResource()) - tgt.setResource(src.getResource()); - if (src.hasResponse()) - tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); - if (src.hasResponseCode()) - tgt.setResponseCode(src.getResponseCode()); - if (src.hasRule()) - tgt.setRule(convertActionAssertRuleComponent(src.getRule())); - if (src.hasRuleset()) - tgt.setRuleset(convertActionAssertRulesetComponent(src.getRuleset())); - if (src.hasSourceId()) - tgt.setSourceId(src.getSourceId()); - if (src.hasValidateProfileId()) - tgt.setValidateProfileId(src.getValidateProfileId()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - if (src.hasWarningOnly()) - tgt.setWarningOnly(src.getWarningOnly()); - return tgt; - } - - private static org.hl7.fhir.r4.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType src) throws FHIRException { + private static org.hl7.fhir.r4.model.Claim.Use convertUse(org.hl7.fhir.dstu3.model.Claim.Use src) throws FHIRException { if (src == null) return null; switch (src) { - case RESPONSE: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.RESPONSE; - case REQUEST: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.REQUEST; - default: return org.hl7.fhir.r4.model.TestScript.AssertionDirectionType.NULL; + case COMPLETE: return org.hl7.fhir.r4.model.Claim.Use.COMPLETE; + case PROPOSED: return org.hl7.fhir.r4.model.Claim.Use.PROPOSED; + case EXPLORATORY: return org.hl7.fhir.r4.model.Claim.Use.EXPLORATORY; + case OTHER: return org.hl7.fhir.r4.model.Claim.Use.OTHER; + default: return org.hl7.fhir.r4.model.Claim.Use.NULL; } } - private static org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.r4.model.TestScript.AssertionDirectionType src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.Claim.Use convertUse(org.hl7.fhir.r4.model.Claim.Use src) throws FHIRException { if (src == null) return null; switch (src) { - case RESPONSE: return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.RESPONSE; - case REQUEST: return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.REQUEST; - default: return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.NULL; + case COMPLETE: return org.hl7.fhir.dstu3.model.Claim.Use.COMPLETE; + case PROPOSED: return org.hl7.fhir.dstu3.model.Claim.Use.PROPOSED; + case EXPLORATORY: return org.hl7.fhir.dstu3.model.Claim.Use.EXPLORATORY; + case OTHER: return org.hl7.fhir.dstu3.model.Claim.Use.OTHER; + default: return org.hl7.fhir.dstu3.model.Claim.Use.NULL; } } - private static org.hl7.fhir.r4.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EQUALS; - case NOTEQUALS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEQUALS; - case IN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.IN; - case NOTIN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTIN; - case GREATERTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.GREATERTHAN; - case LESSTHAN: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.LESSTHAN; - case EMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EMPTY; - case NOTEMPTY: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTEMPTY; - case CONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.CONTAINS; - case NOTCONTAINS: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NOTCONTAINS; - case EVAL: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.EVAL; - default: return org.hl7.fhir.r4.model.TestScript.AssertionOperatorType.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.r4.model.TestScript.AssertionOperatorType src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUALS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EQUALS; - case NOTEQUALS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEQUALS; - case IN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.IN; - case NOTIN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTIN; - case GREATERTHAN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.GREATERTHAN; - case LESSTHAN: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.LESSTHAN; - case EMPTY: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EMPTY; - case NOTEMPTY: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEMPTY; - case CONTAINS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.CONTAINS; - case NOTCONTAINS: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTCONTAINS; - case EVAL: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EVAL; - default: return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NULL; - } -} - - private static org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode convertTestScriptRequestMethodCode(org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DELETE: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.DELETE; - case GET: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.GET; - case OPTIONS: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.OPTIONS; - case PATCH: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.PATCH; - case POST: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.POST; - case PUT: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.PUT; - default: return org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode convertTestScriptRequestMethodCode(org.hl7.fhir.r4.model.TestScript.TestScriptRequestMethodCode src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case DELETE: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.DELETE; - case GET: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.GET; - case OPTIONS: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.OPTIONS; - case PATCH: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.PATCH; - case POST: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.POST; - case PUT: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.PUT; - default: return org.hl7.fhir.dstu3.model.TestScript.TestScriptRequestMethodCode.NULL; - } -} - - private static org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OKAY: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.OKAY; - case CREATED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CREATED; - case NOCONTENT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOCONTENT; - case NOTMODIFIED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTMODIFIED; - case BAD: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.BAD; - case FORBIDDEN: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.FORBIDDEN; - case NOTFOUND: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTFOUND; - case METHODNOTALLOWED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; - case CONFLICT: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.CONFLICT; - case GONE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.GONE; - case PRECONDITIONFAILED: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; - case UNPROCESSABLE: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; - default: return org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case OKAY: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.OKAY; - case CREATED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CREATED; - case NOCONTENT: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOCONTENT; - case NOTMODIFIED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTMODIFIED; - case BAD: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.BAD; - case FORBIDDEN: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.FORBIDDEN; - case NOTFOUND: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTFOUND; - case METHODNOTALLOWED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED; - case CONFLICT: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CONFLICT; - case GONE: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.GONE; - case PRECONDITIONFAILED: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED; - case UNPROCESSABLE: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.UNPROCESSABLE; - default: return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NULL; - } -} - - public static org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent convertActionAssertRuleComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent(); + public static org.hl7.fhir.r4.model.UuidType convertUuid(org.hl7.fhir.dstu3.model.UuidType src) throws FHIRException { + org.hl7.fhir.r4.model.UuidType tgt = new org.hl7.fhir.r4.model.UuidType(src.getValue()); copyElement(src, tgt); - if (src.hasRuleId()) - tgt.setRuleId(src.getRuleId()); - for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent t : src.getParam()) - tgt.addParam(convertActionAssertRuleParamComponent(t)); return tgt; } - public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent convertActionAssertRuleComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRuleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent(); + public static org.hl7.fhir.dstu3.model.UuidType convertUuid(org.hl7.fhir.r4.model.UuidType src) throws FHIRException { + org.hl7.fhir.dstu3.model.UuidType tgt = new org.hl7.fhir.dstu3.model.UuidType(src.getValue()); copyElement(src, tgt); - if (src.hasRuleId()) - tgt.setRuleId(src.getRuleId()); - for (org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent t : src.getParam()) - tgt.addParam(convertActionAssertRuleParamComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent convertActionAssertRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent convertActionAssertRuleParamComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRuleParamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent convertActionAssertRulesetComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent(); - copyElement(src, tgt); - if (src.hasRulesetId()) - tgt.setRulesetId(src.getRulesetId()); - for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent t : src.getRule()) - tgt.addRule(convertActionAssertRulesetRuleComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent convertActionAssertRulesetComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent(); - copyElement(src, tgt); - if (src.hasRulesetId()) - tgt.setRulesetId(src.getRulesetId()); - for (org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent t : src.getRule()) - tgt.addRule(convertActionAssertRulesetRuleComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent convertActionAssertRulesetRuleComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent(); - copyElement(src, tgt); - if (src.hasRuleId()) - tgt.setRuleId(src.getRuleId()); - for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent t : src.getParam()) - tgt.addParam(convertActionAssertRulesetRuleParamComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent convertActionAssertRulesetRuleComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent(); - copyElement(src, tgt); - if (src.hasRuleId()) - tgt.setRuleId(src.getRuleId()); - for (org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent t : src.getParam()) - tgt.addParam(convertActionAssertRulesetRuleParamComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent convertActionAssertRulesetRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent convertActionAssertRulesetRuleParamComponent(org.hl7.fhir.r4.model.TestScript.ActionAssertRulesetRuleParamComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) - tgt.addAction(convertTestActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasDescription()) - tgt.setDescription(src.getDescription()); - for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) - tgt.addAction(convertTestActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestScript.TestActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.r4.model.TestScript.TestActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - if (src.hasAssert()) - tgt.setAssert(convertSetupActionAssertComponent(src.getAssert())); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent t : src.getAction()) - tgt.addAction(convertTeardownActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.r4.model.TestScript.TestScriptTeardownComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent(); - copyElement(src, tgt); - for (org.hl7.fhir.r4.model.TestScript.TeardownActionComponent t : src.getAction()) - tgt.addAction(convertTeardownActionComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.r4.model.TestScript.TeardownActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.r4.model.TestScript.TeardownActionComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent(); - copyElement(src, tgt); - if (src.hasOperation()) - tgt.setOperation(convertSetupActionOperationComponent(src.getOperation())); return tgt; } @@ -27732,160 +24521,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) - tgt.addConcept(convertConceptReferenceComponent(t)); - for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) - tgt.addFilter(convertConceptSetFilterComponent(t)); - for (org.hl7.fhir.dstu3.model.UriType t : src.getValueSet()) - tgt.addValueSet(t.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); - copyElement(src, tgt); - if (src.hasSystem()) - tgt.setSystem(src.getSystem()); - if (src.hasVersion()) - tgt.setVersion(src.getVersion()); - for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) - tgt.addConcept(convertConceptReferenceComponent(t)); - for (org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) - tgt.addFilter(convertConceptSetFilterComponent(t)); - for (org.hl7.fhir.r4.model.UriType t : src.getValueSet()) - tgt.addValueSet(t.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); - copyElement(src, tgt); - if (src.hasCode()) - tgt.setCode(src.getCode()); - if (src.hasDisplay()) - tgt.setDisplay(src.getDisplay()); - for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) - tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); - copyElement(src, tgt); - if (src.hasLanguage()) - tgt.setLanguage(src.getLanguage()); - if (src.hasUse()) - tgt.setUse(convertCoding(src.getUse())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); - copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasOp()) - tgt.setOp(convertFilterOperator(src.getOp())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); - copyElement(src, tgt); - if (src.hasProperty()) - tgt.setProperty(src.getProperty()); - if (src.hasOp()) - tgt.setOp(convertFilterOperator(src.getOp())); - if (src.hasValue()) - tgt.setValue(src.getValue()); - return tgt; - } - - private static org.hl7.fhir.r4.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUAL: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.EQUAL; - case ISA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISA; - case DESCENDENTOF: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.DESCENDENTOF; - case ISNOTA: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.ISNOTA; - case REGEX: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.REGEX; - case IN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.IN; - case NOTIN: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NOTIN; - case GENERALIZES: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.GENERALIZES; - case EXISTS: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.EXISTS; - default: return org.hl7.fhir.r4.model.ValueSet.FilterOperator.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.r4.model.ValueSet.FilterOperator src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case EQUAL: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EQUAL; - case ISA: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISA; - case DESCENDENTOF: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.DESCENDENTOF; - case ISNOTA: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISNOTA; - case REGEX: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.REGEX; - case IN: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.IN; - case NOTIN: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NOTIN; - case GENERALIZES: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.GENERALIZES; - case EXISTS: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EXISTS; - default: return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NULL; - } -} - public static org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { if (src == null) return null; @@ -27926,30 +24561,6 @@ public class VersionConvertor_30_40 { return tgt; } - public static org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); - copyElement(src, tgt); - if (src.hasName()) - tgt.setName(src.getName()); - if (src.hasValue()) - tgt.setValue(convertType(src.getValue())); - return tgt; - } - public static org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { if (src == null) return null; @@ -27998,6 +24609,122 @@ public class VersionConvertor_30_40 { return tgt; } + public static org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); + copyElement(src, tgt); + if (src.hasName()) + tgt.setName(src.getName()); + if (src.hasValue()) + tgt.setValue(convertType(src.getValue())); + return tgt; + } + + public static org.hl7.fhir.r4.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.r4.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.r4.model.Contract.ValuedItemComponent(); + copyElement(src, tgt); + if (src.hasEntity()) + tgt.setEntity(convertType(src.getEntity())); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasEffectiveTime()) + tgt.setEffectiveTime(src.getEffectiveTime()); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasPoints()) + tgt.setPoints(src.getPoints()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + public static org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.r4.model.Contract.ValuedItemComponent src) throws FHIRException { + if (src == null) + return null; + org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent(); + copyElement(src, tgt); + if (src.hasEntity()) + tgt.setEntity(convertType(src.getEntity())); + if (src.hasIdentifier()) + tgt.setIdentifier(convertIdentifier(src.getIdentifier())); + if (src.hasEffectiveTime()) + tgt.setEffectiveTime(src.getEffectiveTime()); + if (src.hasQuantity()) + tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); + if (src.hasUnitPrice()) + tgt.setUnitPrice(convertMoney(src.getUnitPrice())); + if (src.hasFactor()) + tgt.setFactor(src.getFactor()); + if (src.hasPoints()) + tgt.setPoints(src.getPoints()); + if (src.hasNet()) + tgt.setNet(convertMoney(src.getNet())); + return tgt; + } + + private static org.hl7.fhir.r4.model.VisionPrescription.VisionBase convertVisionBase(org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UP: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.UP; + case DOWN: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.DOWN; + case IN: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.IN; + case OUT: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.OUT; + default: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase convertVisionBase(org.hl7.fhir.r4.model.VisionPrescription.VisionBase src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case UP: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.UP; + case DOWN: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.DOWN; + case IN: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.IN; + case OUT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.OUT; + default: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.NULL; + } +} + + private static org.hl7.fhir.r4.model.VisionPrescription.VisionEyes convertVisionEyes(org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RIGHT: return org.hl7.fhir.r4.model.VisionPrescription.VisionEyes.RIGHT; + case LEFT: return org.hl7.fhir.r4.model.VisionPrescription.VisionEyes.LEFT; + default: return org.hl7.fhir.r4.model.VisionPrescription.VisionEyes.NULL; + } +} + + private static org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes convertVisionEyes(org.hl7.fhir.r4.model.VisionPrescription.VisionEyes src) throws FHIRException { + if (src == null) + return null; + switch (src) { + case RIGHT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes.RIGHT; + case LEFT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes.LEFT; + default: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes.NULL; + } +} + public static org.hl7.fhir.r4.model.VisionPrescription convertVisionPrescription(org.hl7.fhir.dstu3.model.VisionPrescription src) throws FHIRException { if (src == null) return null; @@ -28046,30 +24773,6 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.VisionPrescription.VisionStatus convertVisionStatus(org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.NULL; - } -} - - private static org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus convertVisionStatus(org.hl7.fhir.r4.model.VisionPrescription.VisionStatus src) throws FHIRException { - if (src == null) - return null; - switch (src) { - case ACTIVE: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.ACTIVE; - case CANCELLED: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.CANCELLED; - case DRAFT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.DRAFT; - case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.ENTEREDINERROR; - default: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.NULL; - } -} - public static org.hl7.fhir.r4.model.VisionPrescription.VisionPrescriptionDispenseComponent convertVisionPrescriptionDispenseComponent(org.hl7.fhir.dstu3.model.VisionPrescription.VisionPrescriptionDispenseComponent src) throws FHIRException { if (src == null) return null; @@ -28146,520 +24849,162 @@ public class VersionConvertor_30_40 { return tgt; } - private static org.hl7.fhir.r4.model.VisionPrescription.VisionEyes convertVisionEyes(org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes src) throws FHIRException { + private static org.hl7.fhir.r4.model.VisionPrescription.VisionStatus convertVisionStatus(org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case RIGHT: return org.hl7.fhir.r4.model.VisionPrescription.VisionEyes.RIGHT; - case LEFT: return org.hl7.fhir.r4.model.VisionPrescription.VisionEyes.LEFT; - default: return org.hl7.fhir.r4.model.VisionPrescription.VisionEyes.NULL; + case ACTIVE: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.ACTIVE; + case CANCELLED: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.CANCELLED; + case DRAFT: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.DRAFT; + case ENTEREDINERROR: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.r4.model.VisionPrescription.VisionStatus.NULL; } } - private static org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes convertVisionEyes(org.hl7.fhir.r4.model.VisionPrescription.VisionEyes src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus convertVisionStatus(org.hl7.fhir.r4.model.VisionPrescription.VisionStatus src) throws FHIRException { if (src == null) return null; switch (src) { - case RIGHT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes.RIGHT; - case LEFT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes.LEFT; - default: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionEyes.NULL; + case ACTIVE: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.ACTIVE; + case CANCELLED: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.CANCELLED; + case DRAFT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.DRAFT; + case ENTEREDINERROR: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.ENTEREDINERROR; + default: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionStatus.NULL; } } - private static org.hl7.fhir.r4.model.VisionPrescription.VisionBase convertVisionBase(org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase src) throws FHIRException { + private static org.hl7.fhir.r4.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType src) throws FHIRException { if (src == null) return null; switch (src) { - case UP: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.UP; - case DOWN: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.DOWN; - case IN: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.IN; - case OUT: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.OUT; - default: return org.hl7.fhir.r4.model.VisionPrescription.VisionBase.NULL; + case NORMAL: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL; + case PHONETIC: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.PHONETIC; + case NEARBY: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NEARBY; + case DISTANCE: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.DISTANCE; + case OTHER: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.OTHER; + default: return org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NULL; } } - private static org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase convertVisionBase(org.hl7.fhir.r4.model.VisionPrescription.VisionBase src) throws FHIRException { + private static org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType src) throws FHIRException { if (src == null) return null; switch (src) { - case UP: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.UP; - case DOWN: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.DOWN; - case IN: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.IN; - case OUT: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.OUT; - default: return org.hl7.fhir.dstu3.model.VisionPrescription.VisionBase.NULL; + case NORMAL: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NORMAL; + case PHONETIC: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.PHONETIC; + case NEARBY: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NEARBY; + case DISTANCE: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.DISTANCE; + case OTHER: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.OTHER; + default: return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NULL; } } - public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException { - if (src == null) - return null; - if (src instanceof org.hl7.fhir.dstu3.model.Parameters) - return convertParameters((org.hl7.fhir.dstu3.model.Parameters) src); - if (src instanceof org.hl7.fhir.dstu3.model.Account) - return convertAccount((org.hl7.fhir.dstu3.model.Account) src); - if (src instanceof org.hl7.fhir.dstu3.model.ActivityDefinition) - return convertActivityDefinition((org.hl7.fhir.dstu3.model.ActivityDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.AllergyIntolerance) - return convertAllergyIntolerance((org.hl7.fhir.dstu3.model.AllergyIntolerance) src); - if (src instanceof org.hl7.fhir.dstu3.model.Appointment) - return convertAppointment((org.hl7.fhir.dstu3.model.Appointment) src); - if (src instanceof org.hl7.fhir.dstu3.model.AppointmentResponse) - return convertAppointmentResponse((org.hl7.fhir.dstu3.model.AppointmentResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.AuditEvent) - return convertAuditEvent((org.hl7.fhir.dstu3.model.AuditEvent) src); - if (src instanceof org.hl7.fhir.dstu3.model.Basic) - return convertBasic((org.hl7.fhir.dstu3.model.Basic) src); - if (src instanceof org.hl7.fhir.dstu3.model.Binary) - return convertBinary((org.hl7.fhir.dstu3.model.Binary) src); - if (src instanceof org.hl7.fhir.dstu3.model.BodySite) - return convertBodySite((org.hl7.fhir.dstu3.model.BodySite) src); - if (src instanceof org.hl7.fhir.dstu3.model.Bundle) - return convertBundle((org.hl7.fhir.dstu3.model.Bundle) src); - if (src instanceof org.hl7.fhir.dstu3.model.CapabilityStatement) - return convertCapabilityStatement((org.hl7.fhir.dstu3.model.CapabilityStatement) src); - if (src instanceof org.hl7.fhir.dstu3.model.CarePlan) - return convertCarePlan((org.hl7.fhir.dstu3.model.CarePlan) src); - if (src instanceof org.hl7.fhir.dstu3.model.CareTeam) - return convertCareTeam((org.hl7.fhir.dstu3.model.CareTeam) src); - if (src instanceof org.hl7.fhir.dstu3.model.ChargeItem) - return convertChargeItem((org.hl7.fhir.dstu3.model.ChargeItem) src); - if (src instanceof org.hl7.fhir.dstu3.model.Claim) - return convertClaim((org.hl7.fhir.dstu3.model.Claim) src); - if (src instanceof org.hl7.fhir.dstu3.model.ClaimResponse) - return convertClaimResponse((org.hl7.fhir.dstu3.model.ClaimResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.ClinicalImpression) - return convertClinicalImpression((org.hl7.fhir.dstu3.model.ClinicalImpression) src); - if (src instanceof org.hl7.fhir.dstu3.model.CodeSystem) - return convertCodeSystem((org.hl7.fhir.dstu3.model.CodeSystem) src); - if (src instanceof org.hl7.fhir.dstu3.model.Communication) - return convertCommunication((org.hl7.fhir.dstu3.model.Communication) src); - if (src instanceof org.hl7.fhir.dstu3.model.CommunicationRequest) - return convertCommunicationRequest((org.hl7.fhir.dstu3.model.CommunicationRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.CompartmentDefinition) - return convertCompartmentDefinition((org.hl7.fhir.dstu3.model.CompartmentDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.Composition) - return convertComposition((org.hl7.fhir.dstu3.model.Composition) src); - if (src instanceof org.hl7.fhir.dstu3.model.ConceptMap) - return convertConceptMap((org.hl7.fhir.dstu3.model.ConceptMap) src); - if (src instanceof org.hl7.fhir.dstu3.model.Condition) - return convertCondition((org.hl7.fhir.dstu3.model.Condition) src); - if (src instanceof org.hl7.fhir.dstu3.model.Consent) - return convertConsent((org.hl7.fhir.dstu3.model.Consent) src); - if (src instanceof org.hl7.fhir.dstu3.model.Contract) - return convertContract((org.hl7.fhir.dstu3.model.Contract) src); - if (src instanceof org.hl7.fhir.dstu3.model.Coverage) - return convertCoverage((org.hl7.fhir.dstu3.model.Coverage) src); - if (src instanceof org.hl7.fhir.dstu3.model.DataElement) - return convertDataElement((org.hl7.fhir.dstu3.model.DataElement) src); - if (src instanceof org.hl7.fhir.dstu3.model.DetectedIssue) - return convertDetectedIssue((org.hl7.fhir.dstu3.model.DetectedIssue) src); - if (src instanceof org.hl7.fhir.dstu3.model.Device) - return convertDevice((org.hl7.fhir.dstu3.model.Device) src); - if (src instanceof org.hl7.fhir.dstu3.model.DeviceComponent) - return convertDeviceComponent((org.hl7.fhir.dstu3.model.DeviceComponent) src); - if (src instanceof org.hl7.fhir.dstu3.model.DeviceMetric) - return convertDeviceMetric((org.hl7.fhir.dstu3.model.DeviceMetric) src); - if (src instanceof org.hl7.fhir.dstu3.model.DeviceRequest) - return convertDeviceRequest((org.hl7.fhir.dstu3.model.DeviceRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.DeviceUseStatement) - return convertDeviceUseStatement((org.hl7.fhir.dstu3.model.DeviceUseStatement) src); - if (src instanceof org.hl7.fhir.dstu3.model.DiagnosticReport) - return convertDiagnosticReport((org.hl7.fhir.dstu3.model.DiagnosticReport) src); - if (src instanceof org.hl7.fhir.dstu3.model.DocumentManifest) - return convertDocumentManifest((org.hl7.fhir.dstu3.model.DocumentManifest) src); - if (src instanceof org.hl7.fhir.dstu3.model.DocumentReference) - return convertDocumentReference((org.hl7.fhir.dstu3.model.DocumentReference) src); - if (src instanceof org.hl7.fhir.dstu3.model.EligibilityRequest) - return convertEligibilityRequest((org.hl7.fhir.dstu3.model.EligibilityRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.EligibilityResponse) - return convertEligibilityResponse((org.hl7.fhir.dstu3.model.EligibilityResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.Encounter) - return convertEncounter((org.hl7.fhir.dstu3.model.Encounter) src); - if (src instanceof org.hl7.fhir.dstu3.model.Endpoint) - return convertEndpoint((org.hl7.fhir.dstu3.model.Endpoint) src); - if (src instanceof org.hl7.fhir.dstu3.model.EnrollmentRequest) - return convertEnrollmentRequest((org.hl7.fhir.dstu3.model.EnrollmentRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.EnrollmentResponse) - return convertEnrollmentResponse((org.hl7.fhir.dstu3.model.EnrollmentResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.EpisodeOfCare) - return convertEpisodeOfCare((org.hl7.fhir.dstu3.model.EpisodeOfCare) src); - if (src instanceof org.hl7.fhir.dstu3.model.ExpansionProfile) - return convertExpansionProfile((org.hl7.fhir.dstu3.model.ExpansionProfile) src); - if (src instanceof org.hl7.fhir.dstu3.model.ExplanationOfBenefit) - return convertExplanationOfBenefit((org.hl7.fhir.dstu3.model.ExplanationOfBenefit) src); - if (src instanceof org.hl7.fhir.dstu3.model.FamilyMemberHistory) - return convertFamilyMemberHistory((org.hl7.fhir.dstu3.model.FamilyMemberHistory) src); - if (src instanceof org.hl7.fhir.dstu3.model.Flag) - return convertFlag((org.hl7.fhir.dstu3.model.Flag) src); - if (src instanceof org.hl7.fhir.dstu3.model.Goal) - return convertGoal((org.hl7.fhir.dstu3.model.Goal) src); - if (src instanceof org.hl7.fhir.dstu3.model.GraphDefinition) - return convertGraphDefinition((org.hl7.fhir.dstu3.model.GraphDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.Group) - return convertGroup((org.hl7.fhir.dstu3.model.Group) src); - if (src instanceof org.hl7.fhir.dstu3.model.GuidanceResponse) - return convertGuidanceResponse((org.hl7.fhir.dstu3.model.GuidanceResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.HealthcareService) - return convertHealthcareService((org.hl7.fhir.dstu3.model.HealthcareService) src); - if (src instanceof org.hl7.fhir.dstu3.model.ImagingManifest) - return convertImagingManifest((org.hl7.fhir.dstu3.model.ImagingManifest) src); - if (src instanceof org.hl7.fhir.dstu3.model.ImagingStudy) - return convertImagingStudy((org.hl7.fhir.dstu3.model.ImagingStudy) src); - if (src instanceof org.hl7.fhir.dstu3.model.Immunization) - return convertImmunization((org.hl7.fhir.dstu3.model.Immunization) src); - if (src instanceof org.hl7.fhir.dstu3.model.ImmunizationRecommendation) - return convertImmunizationRecommendation((org.hl7.fhir.dstu3.model.ImmunizationRecommendation) src); - if (src instanceof org.hl7.fhir.dstu3.model.ImplementationGuide) - return convertImplementationGuide((org.hl7.fhir.dstu3.model.ImplementationGuide) src); - if (src instanceof org.hl7.fhir.dstu3.model.Library) - return convertLibrary((org.hl7.fhir.dstu3.model.Library) src); - if (src instanceof org.hl7.fhir.dstu3.model.Linkage) - return convertLinkage((org.hl7.fhir.dstu3.model.Linkage) src); - if (src instanceof org.hl7.fhir.dstu3.model.ListResource) - return convertList((org.hl7.fhir.dstu3.model.ListResource) src); - if (src instanceof org.hl7.fhir.dstu3.model.Location) - return convertLocation((org.hl7.fhir.dstu3.model.Location) src); - if (src instanceof org.hl7.fhir.dstu3.model.Measure) - return convertMeasure((org.hl7.fhir.dstu3.model.Measure) src); - if (src instanceof org.hl7.fhir.dstu3.model.MeasureReport) - return convertMeasureReport((org.hl7.fhir.dstu3.model.MeasureReport) src); - if (src instanceof org.hl7.fhir.dstu3.model.Media) - return convertMedia((org.hl7.fhir.dstu3.model.Media) src); - if (src instanceof org.hl7.fhir.dstu3.model.Medication) - return convertMedication((org.hl7.fhir.dstu3.model.Medication) src); - if (src instanceof org.hl7.fhir.dstu3.model.MedicationAdministration) - return convertMedicationAdministration((org.hl7.fhir.dstu3.model.MedicationAdministration) src); - if (src instanceof org.hl7.fhir.dstu3.model.MedicationDispense) - return convertMedicationDispense((org.hl7.fhir.dstu3.model.MedicationDispense) src); - if (src instanceof org.hl7.fhir.dstu3.model.MedicationRequest) - return convertMedicationRequest((org.hl7.fhir.dstu3.model.MedicationRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.MedicationStatement) - return convertMedicationStatement((org.hl7.fhir.dstu3.model.MedicationStatement) src); - if (src instanceof org.hl7.fhir.dstu3.model.MessageDefinition) - return convertMessageDefinition((org.hl7.fhir.dstu3.model.MessageDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.MessageHeader) - return convertMessageHeader((org.hl7.fhir.dstu3.model.MessageHeader) src); - if (src instanceof org.hl7.fhir.dstu3.model.NamingSystem) - return convertNamingSystem((org.hl7.fhir.dstu3.model.NamingSystem) src); - if (src instanceof org.hl7.fhir.dstu3.model.NutritionOrder) - return convertNutritionOrder((org.hl7.fhir.dstu3.model.NutritionOrder) src); - if (src instanceof org.hl7.fhir.dstu3.model.Observation) - return convertObservation((org.hl7.fhir.dstu3.model.Observation) src); - if (src instanceof org.hl7.fhir.dstu3.model.OperationDefinition) - return convertOperationDefinition((org.hl7.fhir.dstu3.model.OperationDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.OperationOutcome) - return convertOperationOutcome((org.hl7.fhir.dstu3.model.OperationOutcome) src); - if (src instanceof org.hl7.fhir.dstu3.model.Organization) - return convertOrganization((org.hl7.fhir.dstu3.model.Organization) src); - if (src instanceof org.hl7.fhir.dstu3.model.Patient) - return convertPatient((org.hl7.fhir.dstu3.model.Patient) src); - if (src instanceof org.hl7.fhir.dstu3.model.PaymentNotice) - return convertPaymentNotice((org.hl7.fhir.dstu3.model.PaymentNotice) src); - if (src instanceof org.hl7.fhir.dstu3.model.PaymentReconciliation) - return convertPaymentReconciliation((org.hl7.fhir.dstu3.model.PaymentReconciliation) src); - if (src instanceof org.hl7.fhir.dstu3.model.Person) - return convertPerson((org.hl7.fhir.dstu3.model.Person) src); - if (src instanceof org.hl7.fhir.dstu3.model.PlanDefinition) - return convertPlanDefinition((org.hl7.fhir.dstu3.model.PlanDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.Practitioner) - return convertPractitioner((org.hl7.fhir.dstu3.model.Practitioner) src); - if (src instanceof org.hl7.fhir.dstu3.model.PractitionerRole) - return convertPractitionerRole((org.hl7.fhir.dstu3.model.PractitionerRole) src); - if (src instanceof org.hl7.fhir.dstu3.model.Procedure) - return convertProcedure((org.hl7.fhir.dstu3.model.Procedure) src); - if (src instanceof org.hl7.fhir.dstu3.model.ProcedureRequest) - return convertProcedureRequest((org.hl7.fhir.dstu3.model.ProcedureRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.ProcessRequest) - return convertProcessRequest((org.hl7.fhir.dstu3.model.ProcessRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.ProcessResponse) - return convertProcessResponse((org.hl7.fhir.dstu3.model.ProcessResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.Provenance) - return convertProvenance((org.hl7.fhir.dstu3.model.Provenance) src); - if (src instanceof org.hl7.fhir.dstu3.model.Questionnaire) - return convertQuestionnaire((org.hl7.fhir.dstu3.model.Questionnaire) src); - if (src instanceof org.hl7.fhir.dstu3.model.QuestionnaireResponse) - return convertQuestionnaireResponse((org.hl7.fhir.dstu3.model.QuestionnaireResponse) src); - if (src instanceof org.hl7.fhir.dstu3.model.ReferralRequest) - return convertReferralRequest((org.hl7.fhir.dstu3.model.ReferralRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.RelatedPerson) - return convertRelatedPerson((org.hl7.fhir.dstu3.model.RelatedPerson) src); - if (src instanceof org.hl7.fhir.dstu3.model.RequestGroup) - return convertRequestGroup((org.hl7.fhir.dstu3.model.RequestGroup) src); - if (src instanceof org.hl7.fhir.dstu3.model.ResearchStudy) - return convertResearchStudy((org.hl7.fhir.dstu3.model.ResearchStudy) src); - if (src instanceof org.hl7.fhir.dstu3.model.ResearchSubject) - return convertResearchSubject((org.hl7.fhir.dstu3.model.ResearchSubject) src); - if (src instanceof org.hl7.fhir.dstu3.model.RiskAssessment) - return convertRiskAssessment((org.hl7.fhir.dstu3.model.RiskAssessment) src); - if (src instanceof org.hl7.fhir.dstu3.model.Schedule) - return convertSchedule((org.hl7.fhir.dstu3.model.Schedule) src); - if (src instanceof org.hl7.fhir.dstu3.model.SearchParameter) - return convertSearchParameter((org.hl7.fhir.dstu3.model.SearchParameter) src); - if (src instanceof org.hl7.fhir.dstu3.model.Sequence) - return convertSequence((org.hl7.fhir.dstu3.model.Sequence) src); - if (src instanceof org.hl7.fhir.dstu3.model.ServiceDefinition) - return convertServiceDefinition((org.hl7.fhir.dstu3.model.ServiceDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.Slot) - return convertSlot((org.hl7.fhir.dstu3.model.Slot) src); - if (src instanceof org.hl7.fhir.dstu3.model.Specimen) - return convertSpecimen((org.hl7.fhir.dstu3.model.Specimen) src); - if (src instanceof org.hl7.fhir.dstu3.model.StructureDefinition) - return convertStructureDefinition((org.hl7.fhir.dstu3.model.StructureDefinition) src); - if (src instanceof org.hl7.fhir.dstu3.model.StructureMap) - return convertStructureMap((org.hl7.fhir.dstu3.model.StructureMap) src); - if (src instanceof org.hl7.fhir.dstu3.model.Subscription) - return convertSubscription((org.hl7.fhir.dstu3.model.Subscription) src); - if (src instanceof org.hl7.fhir.dstu3.model.Substance) - return convertSubstance((org.hl7.fhir.dstu3.model.Substance) src); - if (src instanceof org.hl7.fhir.dstu3.model.SupplyDelivery) - return convertSupplyDelivery((org.hl7.fhir.dstu3.model.SupplyDelivery) src); - if (src instanceof org.hl7.fhir.dstu3.model.SupplyRequest) - return convertSupplyRequest((org.hl7.fhir.dstu3.model.SupplyRequest) src); - if (src instanceof org.hl7.fhir.dstu3.model.Task) - return convertTask((org.hl7.fhir.dstu3.model.Task) src); - if (src instanceof org.hl7.fhir.dstu3.model.TestReport) - return convertTestReport((org.hl7.fhir.dstu3.model.TestReport) src); - if (src instanceof org.hl7.fhir.dstu3.model.TestScript) - return convertTestScript((org.hl7.fhir.dstu3.model.TestScript) src); - if (src instanceof org.hl7.fhir.dstu3.model.ValueSet) - return convertValueSet((org.hl7.fhir.dstu3.model.ValueSet) src); - if (src instanceof org.hl7.fhir.dstu3.model.VisionPrescription) - return convertVisionPrescription((org.hl7.fhir.dstu3.model.VisionPrescription) src); - throw new Error("Unknown resource "+src.fhirType()); + private static void copyBackboneElement(org.hl7.fhir.dstu3.model.BackboneElement src, org.hl7.fhir.r4.model.BackboneElement tgt) throws FHIRException { + copyElement(src, tgt); + for (org.hl7.fhir.dstu3.model.Extension e : src.getModifierExtension()) { + tgt.addModifierExtension(convertExtension(e)); + } } - public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException { - if (src == null) - return null; - if (src instanceof org.hl7.fhir.r4.model.Parameters) - return convertParameters((org.hl7.fhir.r4.model.Parameters) src); - if (src instanceof org.hl7.fhir.r4.model.Account) - return convertAccount((org.hl7.fhir.r4.model.Account) src); - if (src instanceof org.hl7.fhir.r4.model.ActivityDefinition) - return convertActivityDefinition((org.hl7.fhir.r4.model.ActivityDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.AllergyIntolerance) - return convertAllergyIntolerance((org.hl7.fhir.r4.model.AllergyIntolerance) src); - if (src instanceof org.hl7.fhir.r4.model.Appointment) - return convertAppointment((org.hl7.fhir.r4.model.Appointment) src); - if (src instanceof org.hl7.fhir.r4.model.AppointmentResponse) - return convertAppointmentResponse((org.hl7.fhir.r4.model.AppointmentResponse) src); - if (src instanceof org.hl7.fhir.r4.model.AuditEvent) - return convertAuditEvent((org.hl7.fhir.r4.model.AuditEvent) src); - if (src instanceof org.hl7.fhir.r4.model.Basic) - return convertBasic((org.hl7.fhir.r4.model.Basic) src); - if (src instanceof org.hl7.fhir.r4.model.Binary) - return convertBinary((org.hl7.fhir.r4.model.Binary) src); - if (src instanceof org.hl7.fhir.r4.model.BodyStructure) - return convertBodySite((org.hl7.fhir.r4.model.BodyStructure) src); - if (src instanceof org.hl7.fhir.r4.model.Bundle) - return convertBundle((org.hl7.fhir.r4.model.Bundle) src); - if (src instanceof org.hl7.fhir.r4.model.CapabilityStatement) - return convertCapabilityStatement((org.hl7.fhir.r4.model.CapabilityStatement) src); - if (src instanceof org.hl7.fhir.r4.model.CarePlan) - return convertCarePlan((org.hl7.fhir.r4.model.CarePlan) src); - if (src instanceof org.hl7.fhir.r4.model.CareTeam) - return convertCareTeam((org.hl7.fhir.r4.model.CareTeam) src); - if (src instanceof org.hl7.fhir.r4.model.ChargeItem) - return convertChargeItem((org.hl7.fhir.r4.model.ChargeItem) src); - if (src instanceof org.hl7.fhir.r4.model.Claim) - return convertClaim((org.hl7.fhir.r4.model.Claim) src); - if (src instanceof org.hl7.fhir.r4.model.ClaimResponse) - return convertClaimResponse((org.hl7.fhir.r4.model.ClaimResponse) src); - if (src instanceof org.hl7.fhir.r4.model.ClinicalImpression) - return convertClinicalImpression((org.hl7.fhir.r4.model.ClinicalImpression) src); - if (src instanceof org.hl7.fhir.r4.model.CodeSystem) - return convertCodeSystem((org.hl7.fhir.r4.model.CodeSystem) src); - if (src instanceof org.hl7.fhir.r4.model.Communication) - return convertCommunication((org.hl7.fhir.r4.model.Communication) src); - if (src instanceof org.hl7.fhir.r4.model.CommunicationRequest) - return convertCommunicationRequest((org.hl7.fhir.r4.model.CommunicationRequest) src); - if (src instanceof org.hl7.fhir.r4.model.CompartmentDefinition) - return convertCompartmentDefinition((org.hl7.fhir.r4.model.CompartmentDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.Composition) - return convertComposition((org.hl7.fhir.r4.model.Composition) src); - if (src instanceof org.hl7.fhir.r4.model.ConceptMap) - return convertConceptMap((org.hl7.fhir.r4.model.ConceptMap) src); - if (src instanceof org.hl7.fhir.r4.model.Condition) - return convertCondition((org.hl7.fhir.r4.model.Condition) src); - if (src instanceof org.hl7.fhir.r4.model.Consent) - return convertConsent((org.hl7.fhir.r4.model.Consent) src); - if (src instanceof org.hl7.fhir.r4.model.Contract) - return convertContract((org.hl7.fhir.r4.model.Contract) src); - if (src instanceof org.hl7.fhir.r4.model.Coverage) - return convertCoverage((org.hl7.fhir.r4.model.Coverage) src); - if (src instanceof org.hl7.fhir.r4.model.DetectedIssue) - return convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue) src); - if (src instanceof org.hl7.fhir.r4.model.Device) - return convertDevice((org.hl7.fhir.r4.model.Device) src); - if (src instanceof org.hl7.fhir.r4.model.DeviceComponent) - return convertDeviceComponent((org.hl7.fhir.r4.model.DeviceComponent) src); - if (src instanceof org.hl7.fhir.r4.model.DeviceMetric) - return convertDeviceMetric((org.hl7.fhir.r4.model.DeviceMetric) src); - if (src instanceof org.hl7.fhir.r4.model.DeviceRequest) - return convertDeviceRequest((org.hl7.fhir.r4.model.DeviceRequest) src); - if (src instanceof org.hl7.fhir.r4.model.DeviceUseStatement) - return convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement) src); - if (src instanceof org.hl7.fhir.r4.model.DiagnosticReport) - return convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport) src); - if (src instanceof org.hl7.fhir.r4.model.DocumentManifest) - return convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src); - if (src instanceof org.hl7.fhir.r4.model.DocumentReference) - return convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference) src); - if (src instanceof org.hl7.fhir.r4.model.EligibilityRequest) - return convertEligibilityRequest((org.hl7.fhir.r4.model.EligibilityRequest) src); - if (src instanceof org.hl7.fhir.r4.model.EligibilityResponse) - return convertEligibilityResponse((org.hl7.fhir.r4.model.EligibilityResponse) src); - if (src instanceof org.hl7.fhir.r4.model.Encounter) - return convertEncounter((org.hl7.fhir.r4.model.Encounter) src); - if (src instanceof org.hl7.fhir.r4.model.Endpoint) - return convertEndpoint((org.hl7.fhir.r4.model.Endpoint) src); - if (src instanceof org.hl7.fhir.r4.model.EnrollmentRequest) - return convertEnrollmentRequest((org.hl7.fhir.r4.model.EnrollmentRequest) src); - if (src instanceof org.hl7.fhir.r4.model.EnrollmentResponse) - return convertEnrollmentResponse((org.hl7.fhir.r4.model.EnrollmentResponse) src); - if (src instanceof org.hl7.fhir.r4.model.EpisodeOfCare) - return convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare) src); - if (src instanceof org.hl7.fhir.r4.model.ExpansionProfile) - return convertExpansionProfile((org.hl7.fhir.r4.model.ExpansionProfile) src); - if (src instanceof org.hl7.fhir.r4.model.ExplanationOfBenefit) - return convertExplanationOfBenefit((org.hl7.fhir.r4.model.ExplanationOfBenefit) src); - if (src instanceof org.hl7.fhir.r4.model.FamilyMemberHistory) - return convertFamilyMemberHistory((org.hl7.fhir.r4.model.FamilyMemberHistory) src); - if (src instanceof org.hl7.fhir.r4.model.Flag) - return convertFlag((org.hl7.fhir.r4.model.Flag) src); - if (src instanceof org.hl7.fhir.r4.model.Goal) - return convertGoal((org.hl7.fhir.r4.model.Goal) src); - if (src instanceof org.hl7.fhir.r4.model.GraphDefinition) - return convertGraphDefinition((org.hl7.fhir.r4.model.GraphDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.Group) - return convertGroup((org.hl7.fhir.r4.model.Group) src); - if (src instanceof org.hl7.fhir.r4.model.GuidanceResponse) - return convertGuidanceResponse((org.hl7.fhir.r4.model.GuidanceResponse) src); - if (src instanceof org.hl7.fhir.r4.model.HealthcareService) - return convertHealthcareService((org.hl7.fhir.r4.model.HealthcareService) src); - if (src instanceof org.hl7.fhir.r4.model.ImagingManifest) - return convertImagingManifest((org.hl7.fhir.r4.model.ImagingManifest) src); - if (src instanceof org.hl7.fhir.r4.model.ImagingStudy) - return convertImagingStudy((org.hl7.fhir.r4.model.ImagingStudy) src); - if (src instanceof org.hl7.fhir.r4.model.Immunization) - return convertImmunization((org.hl7.fhir.r4.model.Immunization) src); - if (src instanceof org.hl7.fhir.r4.model.ImmunizationRecommendation) - return convertImmunizationRecommendation((org.hl7.fhir.r4.model.ImmunizationRecommendation) src); - if (src instanceof org.hl7.fhir.r4.model.ImplementationGuide) - return convertImplementationGuide((org.hl7.fhir.r4.model.ImplementationGuide) src); - if (src instanceof org.hl7.fhir.r4.model.Library) - return convertLibrary((org.hl7.fhir.r4.model.Library) src); - if (src instanceof org.hl7.fhir.r4.model.Linkage) - return convertLinkage((org.hl7.fhir.r4.model.Linkage) src); - if (src instanceof org.hl7.fhir.r4.model.ListResource) - return convertList((org.hl7.fhir.r4.model.ListResource) src); - if (src instanceof org.hl7.fhir.r4.model.Location) - return convertLocation((org.hl7.fhir.r4.model.Location) src); - if (src instanceof org.hl7.fhir.r4.model.Measure) - return convertMeasure((org.hl7.fhir.r4.model.Measure) src); - if (src instanceof org.hl7.fhir.r4.model.MeasureReport) - return convertMeasureReport((org.hl7.fhir.r4.model.MeasureReport) src); - if (src instanceof org.hl7.fhir.r4.model.Media) - return convertMedia((org.hl7.fhir.r4.model.Media) src); - if (src instanceof org.hl7.fhir.r4.model.Medication) - return convertMedication((org.hl7.fhir.r4.model.Medication) src); - if (src instanceof org.hl7.fhir.r4.model.MedicationAdministration) - return convertMedicationAdministration((org.hl7.fhir.r4.model.MedicationAdministration) src); - if (src instanceof org.hl7.fhir.r4.model.MedicationDispense) - return convertMedicationDispense((org.hl7.fhir.r4.model.MedicationDispense) src); - if (src instanceof org.hl7.fhir.r4.model.MedicationRequest) - return convertMedicationRequest((org.hl7.fhir.r4.model.MedicationRequest) src); - if (src instanceof org.hl7.fhir.r4.model.MedicationStatement) - return convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement) src); - if (src instanceof org.hl7.fhir.r4.model.MessageDefinition) - return convertMessageDefinition((org.hl7.fhir.r4.model.MessageDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.MessageHeader) - return convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader) src); - if (src instanceof org.hl7.fhir.r4.model.NamingSystem) - return convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem) src); - if (src instanceof org.hl7.fhir.r4.model.NutritionOrder) - return convertNutritionOrder((org.hl7.fhir.r4.model.NutritionOrder) src); - if (src instanceof org.hl7.fhir.r4.model.Observation) - return convertObservation((org.hl7.fhir.r4.model.Observation) src); - if (src instanceof org.hl7.fhir.r4.model.OperationDefinition) - return convertOperationDefinition((org.hl7.fhir.r4.model.OperationDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.OperationOutcome) - return convertOperationOutcome((org.hl7.fhir.r4.model.OperationOutcome) src); - if (src instanceof org.hl7.fhir.r4.model.Organization) - return convertOrganization((org.hl7.fhir.r4.model.Organization) src); - if (src instanceof org.hl7.fhir.r4.model.Patient) - return convertPatient((org.hl7.fhir.r4.model.Patient) src); - if (src instanceof org.hl7.fhir.r4.model.PaymentNotice) - return convertPaymentNotice((org.hl7.fhir.r4.model.PaymentNotice) src); - if (src instanceof org.hl7.fhir.r4.model.PaymentReconciliation) - return convertPaymentReconciliation((org.hl7.fhir.r4.model.PaymentReconciliation) src); - if (src instanceof org.hl7.fhir.r4.model.Person) - return convertPerson((org.hl7.fhir.r4.model.Person) src); - if (src instanceof org.hl7.fhir.r4.model.PlanDefinition) - return convertPlanDefinition((org.hl7.fhir.r4.model.PlanDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.Practitioner) - return convertPractitioner((org.hl7.fhir.r4.model.Practitioner) src); - if (src instanceof org.hl7.fhir.r4.model.PractitionerRole) - return convertPractitionerRole((org.hl7.fhir.r4.model.PractitionerRole) src); - if (src instanceof org.hl7.fhir.r4.model.Procedure) - return convertProcedure((org.hl7.fhir.r4.model.Procedure) src); - if (src instanceof org.hl7.fhir.r4.model.ProcedureRequest) - return convertProcedureRequest((org.hl7.fhir.r4.model.ProcedureRequest) src); - if (src instanceof org.hl7.fhir.r4.model.ProcessRequest) - return convertProcessRequest((org.hl7.fhir.r4.model.ProcessRequest) src); - if (src instanceof org.hl7.fhir.r4.model.ProcessResponse) - return convertProcessResponse((org.hl7.fhir.r4.model.ProcessResponse) src); - if (src instanceof org.hl7.fhir.r4.model.Provenance) - return convertProvenance((org.hl7.fhir.r4.model.Provenance) src); - if (src instanceof org.hl7.fhir.r4.model.Questionnaire) - return convertQuestionnaire((org.hl7.fhir.r4.model.Questionnaire) src); - if (src instanceof org.hl7.fhir.r4.model.QuestionnaireResponse) - return convertQuestionnaireResponse((org.hl7.fhir.r4.model.QuestionnaireResponse) src); - if (src instanceof org.hl7.fhir.r4.model.RelatedPerson) - return convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson) src); - if (src instanceof org.hl7.fhir.r4.model.RequestGroup) - return convertRequestGroup((org.hl7.fhir.r4.model.RequestGroup) src); - if (src instanceof org.hl7.fhir.r4.model.ResearchStudy) - return convertResearchStudy((org.hl7.fhir.r4.model.ResearchStudy) src); - if (src instanceof org.hl7.fhir.r4.model.ResearchSubject) - return convertResearchSubject((org.hl7.fhir.r4.model.ResearchSubject) src); - if (src instanceof org.hl7.fhir.r4.model.RiskAssessment) - return convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment) src); - if (src instanceof org.hl7.fhir.r4.model.Schedule) - return convertSchedule((org.hl7.fhir.r4.model.Schedule) src); - if (src instanceof org.hl7.fhir.r4.model.SearchParameter) - return convertSearchParameter((org.hl7.fhir.r4.model.SearchParameter) src); - if (src instanceof org.hl7.fhir.r4.model.Sequence) - return convertSequence((org.hl7.fhir.r4.model.Sequence) src); - if (src instanceof org.hl7.fhir.r4.model.ServiceDefinition) - return convertServiceDefinition((org.hl7.fhir.r4.model.ServiceDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.Slot) - return convertSlot((org.hl7.fhir.r4.model.Slot) src); - if (src instanceof org.hl7.fhir.r4.model.Specimen) - return convertSpecimen((org.hl7.fhir.r4.model.Specimen) src); - if (src instanceof org.hl7.fhir.r4.model.StructureDefinition) - return convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition) src); - if (src instanceof org.hl7.fhir.r4.model.StructureMap) - return convertStructureMap((org.hl7.fhir.r4.model.StructureMap) src); - if (src instanceof org.hl7.fhir.r4.model.Subscription) - return convertSubscription((org.hl7.fhir.r4.model.Subscription) src); - if (src instanceof org.hl7.fhir.r4.model.Substance) - return convertSubstance((org.hl7.fhir.r4.model.Substance) src); - if (src instanceof org.hl7.fhir.r4.model.SupplyDelivery) - return convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery) src); - if (src instanceof org.hl7.fhir.r4.model.SupplyRequest) - return convertSupplyRequest((org.hl7.fhir.r4.model.SupplyRequest) src); - if (src instanceof org.hl7.fhir.r4.model.Task) - return convertTask((org.hl7.fhir.r4.model.Task) src); - if (src instanceof org.hl7.fhir.r4.model.TestReport) - return convertTestReport((org.hl7.fhir.r4.model.TestReport) src); - if (src instanceof org.hl7.fhir.r4.model.TestScript) - return convertTestScript((org.hl7.fhir.r4.model.TestScript) src); - if (src instanceof org.hl7.fhir.r4.model.ValueSet) - return convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); - if (src instanceof org.hl7.fhir.r4.model.VisionPrescription) - return convertVisionPrescription((org.hl7.fhir.r4.model.VisionPrescription) src); - throw new Error("Unknown resource "+src.fhirType()); + private static void copyBackboneElement(org.hl7.fhir.r4.model.BackboneElement src, org.hl7.fhir.dstu3.model.BackboneElement tgt) throws FHIRException { + copyElement(src, tgt); + for (org.hl7.fhir.r4.model.Extension e : src.getModifierExtension()) { + tgt.addModifierExtension(convertExtension(e)); + } + } + + private static void copyDomainResource(org.hl7.fhir.dstu3.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException { + copyResource(src, tgt); + if (src.hasText()) + tgt.setText(convertNarrative(src.getText())); + for (org.hl7.fhir.dstu3.model.Resource t : src.getContained()) + tgt.addContained(convertResource(t)); + for (org.hl7.fhir.dstu3.model.Extension t : src.getExtension()) + tgt.addExtension(convertExtension(t)); + for (org.hl7.fhir.dstu3.model.Extension t : src.getModifierExtension()) + tgt.addModifierExtension(convertExtension(t)); + } + + private static void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu3.model.DomainResource tgt) throws FHIRException { + copyResource(src, tgt); + if (src.hasText()) + tgt.setText(convertNarrative(src.getText())); + for (org.hl7.fhir.r4.model.Resource t : src.getContained()) + tgt.addContained(convertResource(t)); + for (org.hl7.fhir.r4.model.Extension t : src.getExtension()) + tgt.addExtension(convertExtension(t)); + for (org.hl7.fhir.r4.model.Extension t : src.getModifierExtension()) + tgt.addModifierExtension(convertExtension(t)); + } + + private static void copyElement(org.hl7.fhir.dstu3.model.Element src, org.hl7.fhir.r4.model.Element tgt) throws FHIRException { + if (src.hasId()) + tgt.setId(src.getId()); + for (org.hl7.fhir.dstu3.model.Extension e : src.getExtension()) { + tgt.addExtension(convertExtension(e)); + } + } + + private static void copyElement(org.hl7.fhir.r4.model.Element src, org.hl7.fhir.dstu3.model.Element tgt) throws FHIRException { + if (src.hasId()) + tgt.setId(src.getId()); + for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { + tgt.addExtension(convertExtension(e)); + } + } + + public static void copyQuantity(org.hl7.fhir.dstu3.model.Quantity src, org.hl7.fhir.r4.model.Quantity tgt) throws FHIRException { + if (src == null || tgt == null) + return; + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasComparator()) + tgt.setComparator(convertQuantityComparator(src.getComparator())); + if (src.hasUnit()) + tgt.setUnit(src.getUnit()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); + } + + public static void copyQuantity(org.hl7.fhir.r4.model.Quantity src, org.hl7.fhir.dstu3.model.Quantity tgt) throws FHIRException { + if (src == null || tgt == null) + return; + copyElement(src, tgt); + if (src.hasValue()) + tgt.setValue(src.getValue()); + if (src.hasComparator()) + tgt.setComparator(convertQuantityComparator(src.getComparator())); + if (src.hasUnit()) + tgt.setUnit(src.getUnit()); + if (src.hasSystem()) + tgt.setSystem(src.getSystem()); + if (src.hasCode()) + tgt.setCode(src.getCode()); +} + + private static void copyResource(org.hl7.fhir.dstu3.model.Resource src, org.hl7.fhir.r4.model.Resource tgt) throws FHIRException { + if (src.hasId()) + tgt.setId(src.getId()); + if (src.hasMeta()) + tgt.setMeta(convertMeta(src.getMeta())); + if (src.hasImplicitRules()) + tgt.setImplicitRules(src.getImplicitRules()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); + } + + private static void copyResource(org.hl7.fhir.r4.model.Resource src, org.hl7.fhir.dstu3.model.Resource tgt) throws FHIRException { + if (src.hasId()) + tgt.setId(src.getId()); + if (src.hasMeta()) + tgt.setMeta(convertMeta(src.getMeta())); + if (src.hasImplicitRules()) + tgt.setImplicitRules(src.getImplicitRules()); + if (src.hasLanguage()) + tgt.setLanguage(src.getLanguage()); } diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 7eae762593b..c904c128d23 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-igpacks/pom.xml b/hapi-fhir-igpacks/pom.xml index 02a758e9903..5bbc7f9acd0 100644 --- a/hapi-fhir-igpacks/pom.xml +++ b/hapi-fhir-igpacks/pom.xml @@ -5,7 +5,7 @@ hapi-deployable-pom ca.uhn.hapi.fhir - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml 4.0.0 diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 9c628cf0f68..099ce243b82 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 4606b1a1113..d9f5051a67a 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-example/pom.xml b/hapi-fhir-jaxrsserver-example/pom.xml index 2ef56877f6e..1afc91cab47 100644 --- a/hapi-fhir-jaxrsserver-example/pom.xml +++ b/hapi-fhir-jaxrsserver-example/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 4033f8097d3..4180b184923 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseJsonMessage.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseJsonMessage.java new file mode 100644 index 00000000000..5c0c8d9b639 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseJsonMessage.java @@ -0,0 +1,52 @@ +package ca.uhn.fhir.jpa.subscription; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2017 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageHeaders; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) +public abstract class BaseJsonMessage implements Message { + + private static final long serialVersionUID = 1L; + @JsonProperty("headers") + private MessageHeaders myHeaders; + + /** + * Constructor + */ + public BaseJsonMessage() { + super(); + } + + @Override + public MessageHeaders getHeaders() { + return myHeaders; + } + + public void setHeaders(MessageHeaders theHeaders) { + myHeaders = theHeaders; + } +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java index 6a0bde62437..5799ca6ba60 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java @@ -37,6 +37,7 @@ public abstract class BaseSubscriptionDeliverySubscriber extends BaseSubscriptio @Override public void handleMessage(Message theMessage) throws MessagingException { if (!(theMessage.getPayload() instanceof ResourceDeliveryMessage)) { + ourLog.warn("Unexpected payload type: {}", theMessage.getPayload()); return; } try { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionInterceptor.java index b439040075f..3f259e6cf77 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionInterceptor.java @@ -50,7 +50,6 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.messaging.MessageHandler; import org.springframework.messaging.SubscribableChannel; import org.springframework.messaging.support.ExecutorSubscribableChannel; -import org.springframework.messaging.support.GenericMessage; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.transaction.support.TransactionSynchronizationAdapter; import org.springframework.transaction.support.TransactionSynchronizationManager; @@ -346,6 +345,21 @@ public abstract class BaseSubscriptionInterceptor exten submitResourceModified(msg); } + protected void sendToProcessingChannel(final ResourceModifiedMessage theMessage) { + ourLog.trace("Registering synchronization to send resource modified message to processing channel"); + + /* + * We only actually submit this item work working after the + */ + TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { + @Override + public void afterCommit() { + ourLog.trace("Sending resource modified message to processing channel"); + getProcessingChannel().send(new ResourceModifiedJsonMessage(theMessage)); + } + }); + } + public void setFhirContext(FhirContext theCtx) { myCtx = theCtx; } @@ -442,24 +456,8 @@ public abstract class BaseSubscriptionInterceptor exten } protected void submitResourceModified(final ResourceModifiedMessage theMsg) { - final GenericMessage message = new GenericMessage<>(theMsg); mySubscriptionActivatingSubscriber.handleMessage(theMsg.getOperationType(), theMsg.getId(myCtx), theMsg.getNewPayload(myCtx)); - sendToProcessingChannel(message); - } - - protected void sendToProcessingChannel(final GenericMessage theMessage) { - ourLog.trace("Registering synchronization to send resource modified message to processing channel"); - - /* - * We only actually submit this item work working after the - */ - TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { - @Override - public void afterCommit() { - ourLog.trace("Sending resource modified message to processing channel"); - getProcessingChannel().send(theMessage); - } - }); + sendToProcessingChannel(theMsg); } protected abstract void unregisterDeliverySubscriber(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceDeliveryJsonMessage.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceDeliveryJsonMessage.java new file mode 100644 index 00000000000..dcb8a5b05e8 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceDeliveryJsonMessage.java @@ -0,0 +1,57 @@ +package ca.uhn.fhir.jpa.subscription; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2017 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) +public class ResourceDeliveryJsonMessage extends BaseJsonMessage { + + @JsonProperty("payload") + private ResourceDeliveryMessage myPayload; + + /** + * Constructor + */ + public ResourceDeliveryJsonMessage() { + super(); + } + + /** + * Constructor + */ + public ResourceDeliveryJsonMessage(ResourceDeliveryMessage thePayload) { + myPayload = thePayload; + } + + @Override + public ResourceDeliveryMessage getPayload() { + return myPayload; + } + + public void setPayload(ResourceDeliveryMessage thePayload) { + myPayload = thePayload; + } + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedJsonMessage.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedJsonMessage.java new file mode 100644 index 00000000000..b8c02e5ecce --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedJsonMessage.java @@ -0,0 +1,57 @@ +package ca.uhn.fhir.jpa.subscription; + +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2017 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) +public class ResourceModifiedJsonMessage extends BaseJsonMessage { + + @JsonProperty("headers") + private ResourceModifiedMessage myPayload; + + /** + * Constructor + */ + public ResourceModifiedJsonMessage() { + super(); + } + + /** + * Constructor + */ + public ResourceModifiedJsonMessage(ResourceModifiedMessage thePayload) { + myPayload = thePayload; + } + + @Override + public ResourceModifiedMessage getPayload() { + return myPayload; + } + + public void setPayload(ResourceModifiedMessage thePayload) { + myPayload = thePayload; + } + +} diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedMessage.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedMessage.java index 50e3a77567a..1097a69231b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedMessage.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/ResourceModifiedMessage.java @@ -29,11 +29,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import java.io.Serializable; - @JsonInclude(JsonInclude.Include.NON_NULL) @JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) -public class ResourceModifiedMessage implements Serializable { +public class ResourceModifiedMessage { private static final long serialVersionUID = 1L; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionCheckingSubscriber.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionCheckingSubscriber.java index f1be343b66e..3822c6a5ec8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionCheckingSubscriber.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionCheckingSubscriber.java @@ -30,16 +30,12 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; -import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.hl7.fhir.r4.model.Subscription; -import org.hl7.fhir.utilities.ucum.Canonical; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.messaging.Message; import org.springframework.messaging.MessagingException; -import org.springframework.messaging.support.GenericMessage; -import java.util.Collection; import java.util.List; public class SubscriptionCheckingSubscriber extends BaseSubscriptionSubscriber { @@ -53,12 +49,12 @@ public class SubscriptionCheckingSubscriber extends BaseSubscriptionSubscriber { public void handleMessage(Message theMessage) throws MessagingException { ourLog.trace("Handling resource modified message: {}", theMessage); - if (!(theMessage.getPayload() instanceof ResourceModifiedMessage)) { - ourLog.warn("Unexpected message payload type: {}", theMessage.getPayload()); + if (!(theMessage instanceof ResourceModifiedJsonMessage)) { + ourLog.warn("Unexpected message payload type: {}", theMessage); return; } - ResourceModifiedMessage msg = (ResourceModifiedMessage) theMessage.getPayload(); + ResourceModifiedMessage msg = ((ResourceModifiedJsonMessage) theMessage).getPayload(); switch (msg.getOperationType()) { case CREATE: case UPDATE: @@ -122,7 +118,8 @@ public class SubscriptionCheckingSubscriber extends BaseSubscriptionSubscriber { deliveryMsg.setOperationType(msg.getOperationType()); deliveryMsg.setPayloadId(msg.getId(getContext())); - getSubscriptionInterceptor().getDeliveryChannel().send(new GenericMessage<>(deliveryMsg)); + ResourceDeliveryJsonMessage wrappedMsg = new ResourceDeliveryJsonMessage(deliveryMsg); + getSubscriptionInterceptor().getDeliveryChannel().send(wrappedMsg); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/min/ResourceMinimizerMojo.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/min/ResourceMinimizerMojo.java new file mode 100644 index 00000000000..fd123083046 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/min/ResourceMinimizerMojo.java @@ -0,0 +1,238 @@ +package ca.uhn.fhir.jpa.config.min; + +import ca.uhn.fhir.context.BaseRuntimeChildDefinition; +import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu2.resource.Bundle; +import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; +import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.rest.api.EncodingEnum; +import ca.uhn.fhir.util.BundleUtil; +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.core.joran.util.ConfigurationWatchListUtil; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseResource; + +import java.io.*; +import java.net.URL; +import java.util.Collection; + +public class ResourceMinimizerMojo { + + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceMinimizerMojo.class); + + private String fhirVersion; + + private long myByteCount; + private FhirContext myCtx; + private int myFileCount; + + private File targetDirectory; + + public void execute() throws Exception { + ourLog.info("Starting resource minimizer"); + + if (myCtx != null) { + // nothing + } else if ("DSTU2".equals(fhirVersion)) { + myCtx = FhirContext.forDstu2(); + } else if ("HL7ORG_DSTU2".equals(fhirVersion)) { + myCtx = FhirContext.forDstu2Hl7Org(); + } else if ("DSTU2_1".equals(fhirVersion)) { + myCtx = FhirContext.forDstu2_1(); + } else if ("DSTU3".equals(fhirVersion)) { + myCtx = FhirContext.forDstu3(); + } else if ("R4".equals(fhirVersion)) { + myCtx = FhirContext.forR4(); + } else { + throw new Exception("Unknown version: " + fhirVersion); + } + + ourLog.info("Looking for files in directory: {}", targetDirectory.getAbsolutePath()); + + Collection files = FileUtils.listFiles(targetDirectory, new String[] { "xml", "json" }, true); + for (File nextFile : files) { + ourLog.debug("Checking file: {}", nextFile); + + String inputString; + try { + inputString = IOUtils.toString(new FileInputStream(nextFile), "UTF-8"); + } catch (IOException e) { + throw new Exception("Failed to read file: " + nextFile, e); + } + + IParser parser = EncodingEnum.detectEncoding(inputString).newParser(myCtx); + IBaseResource input = parser.parseResource(inputString); + + if (input instanceof IResource) { + ((IResource) input).getText().getDiv().setValueAsString((String) null); + ((IResource) input).getText().getStatus().setValueAsString((String) null); + if (input instanceof Bundle) { + for (Entry nextEntry : ((Bundle) input).getEntry()) { + if (nextEntry.getResource() != null) { + nextEntry.getResource().getText().getDiv().setValueAsString((String) null); + nextEntry.getResource().getText().getStatus().setValueAsString((String) null); + } + } + } + } else { + minimizeResource((IBaseResource)input); + } + + String outputString = parser.setPrettyPrint(true).encodeResourceToString(input); + StringBuilder b = new StringBuilder(); + for (String nextLine : outputString.split("\\n")) { + int i; + for (i = 0; i < nextLine.length(); i++) { + if (nextLine.charAt(i) != ' ') { + break; + } + } + + b.append(StringUtils.leftPad("", i / 3, ' ')); + b.append(nextLine.substring(i)); + b.append("\n"); + } + outputString = b.toString(); + + if (!inputString.equals(outputString)) { + ourLog.info("Trimming contents of resource: {} - From {} to {}", nextFile, FileUtils.byteCountToDisplaySize(inputString.length()), FileUtils.byteCountToDisplaySize(outputString.length())); + myByteCount += (inputString.length() - outputString.length()); + myFileCount++; + try { + String f = nextFile.getAbsolutePath(); + Writer w = new OutputStreamWriter(new FileOutputStream(f, false), "UTF-8"); + w = new BufferedWriter(w); + w.append(outputString); + w.close(); + } catch (IOException e) { + throw new Exception("Failed to write " + nextFile, e); + } + + } + + } + } + + public long getByteCount() { + return myByteCount; + } + + public int getFileCount() { + return myFileCount; + } + + private void minimizeResource(IBaseResource theInput) { + if (theInput instanceof IBaseBundle) { + for (IBaseResource next : BundleUtil.toListOfResources(myCtx, (IBaseBundle) theInput)) { + minimizeResource(next); + } + } + + BaseRuntimeElementCompositeDefinition element = (BaseRuntimeElementCompositeDefinition) myCtx.getElementDefinition(theInput.getClass()); + BaseRuntimeChildDefinition textElement = element.getChildByName("text"); + if (textElement != null) { + textElement.getMutator().setValue(theInput, null); + } + } + + public static void main(String[] args) throws Exception { + FhirContext ctxDstu2; +// FhirContext ctxDstu2_1; + FhirContext ctxDstu3; + FhirContext ctxR4; + ctxDstu2 = FhirContext.forDstu2(); +// ctxDstu2_1 = FhirContext.forDstu2_1(); + ctxDstu3 = FhirContext.forDstu3(); + ctxR4 = FhirContext.forR4(); + + LoggerContext loggerContext = ((ch.qos.logback.classic.Logger) ourLog).getLoggerContext(); + URL mainURL = ConfigurationWatchListUtil.getMainWatchURL(loggerContext); + System.out.println(mainURL); + // or even + ourLog.info("Logback used '{}' as the configuration file.", mainURL); + + int fileCount = 0; + long byteCount = 0; + + ResourceMinimizerMojo m = new ResourceMinimizerMojo(); + + m.myCtx = ctxDstu2; + m.targetDirectory = new File("./hapi-tinder-plugin/src/main/resources/vs/dstu2"); + m.fhirVersion = "DSTU2"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + + m = new ResourceMinimizerMojo(); + m.myCtx = ctxDstu2; + m.targetDirectory = new File("./hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/valueset"); + m.fhirVersion = "DSTU2"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + + m = new ResourceMinimizerMojo(); + m.myCtx = ctxDstu2; + m.targetDirectory = new File("./hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/profile"); + m.fhirVersion = "DSTU2"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + + m = new ResourceMinimizerMojo(); + m.myCtx = ctxDstu3; + m.targetDirectory = new File("./hapi-fhir-validation-resources-dstu3/src/main/resources/org/hl7/fhir/dstu3/model/profile"); + m.fhirVersion = "DSTU3"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + + m = new ResourceMinimizerMojo(); + m.myCtx = ctxDstu3; + m.targetDirectory = new File("./hapi-fhir-validation-resources-dstu3/src/main/resources/org/hl7/fhir/dstu3/model/valueset"); + m.fhirVersion = "DSTU3"; + m.execute(); + byteCount += m.getByteCount(); + +// m = new ResourceMinimizerMojo(); +// m.myCtx = ctxDstu2_1; +// m.targetDirectory = new File("./hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/dstu2016may/model/profile"); +// m.fhirVersion = "DSTU2_1"; +// m.execute(); +// byteCount += m.getByteCount(); +// fileCount += m.getFileCount(); +// +// m = new ResourceMinimizerMojo(); +// m.myCtx = ctxDstu2_1; +// m.targetDirectory = new File("./hapi-fhir-validation-resources-dstu2.1/src/main/resources/org/hl7/fhir/dstu2016may/model/valueset"); +// m.fhirVersion = "DSTU2_1"; +// m.execute(); +// byteCount += m.getByteCount(); +// fileCount += m.getFileCount(); + + m = new ResourceMinimizerMojo(); + m.myCtx = ctxR4; + m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile"); + m.fhirVersion = "R4"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + + m = new ResourceMinimizerMojo(); + m.myCtx = ctxR4; + m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset"); + m.fhirVersion = "R4"; + m.execute(); + byteCount += m.getByteCount(); + fileCount += m.getFileCount(); + + ourLog.info("Trimmed {} files", fileCount); + ourLog.info("Trimmed {} bytes", FileUtils.byteCountToDisplaySize(byteCount)); + } + +} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3UniqueSearchParamTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3UniqueSearchParamTest.java index 842d53ddd4e..bc50c2cee1f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3UniqueSearchParamTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3UniqueSearchParamTest.java @@ -18,8 +18,6 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; -import org.springframework.data.mapping.PreferredConstructor; -import org.springframework.orm.jpa.JpaSystemException; import java.util.Collections; import java.util.List; @@ -38,7 +36,171 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test myDaoConfig.setDefaultSearchParamsCanBeOverridden(new DaoConfig().isDefaultSearchParamsCanBeOverridden()); } + @Before + public void before() { + myDaoConfig.setDefaultSearchParamsCanBeOverridden(true); + } + private void createUniqueBirthdateAndGenderSps() { + SearchParameter sp = new SearchParameter(); + sp.setId("SearchParameter/patient-gender"); + sp.setType(Enumerations.SearchParamType.TOKEN); + sp.setCode("gender"); + sp.setExpression("Patient.gender"); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Patient"); + mySearchParameterDao.update(sp); + + sp = new SearchParameter(); + sp.setId("SearchParameter/patient-birthdate"); + sp.setType(Enumerations.SearchParamType.DATE); + sp.setCode("birthdate"); + sp.setExpression("Patient.birthDate"); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Patient"); + mySearchParameterDao.update(sp); + + sp = new SearchParameter(); + sp.setId("SearchParameter/patient-gender-birthdate"); + sp.setType(Enumerations.SearchParamType.COMPOSITE); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Patient"); + sp.addComponent() + .setExpression("Patient") + .setDefinition(new Reference("SearchParameter/patient-gender")); + sp.addComponent() + .setExpression("Patient") + .setDefinition(new Reference("SearchParameter/patient-birthdate")); + sp.addExtension() + .setUrl(JpaConstants.EXT_SP_UNIQUE) + .setValue(new BooleanType(true)); + mySearchParameterDao.update(sp); + + mySearchParamRegsitry.forceRefresh(); + } + + private void createUniqueIndexCoverageBeneficiary() { + SearchParameter sp = new SearchParameter(); + sp.setId("SearchParameter/coverage-beneficiary"); + sp.setCode("beneficiary"); + sp.setExpression("Coverage.beneficiary"); + sp.setType(Enumerations.SearchParamType.REFERENCE); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Coverage"); + mySearchParameterDao.update(sp); + + sp = new SearchParameter(); + sp.setId("SearchParameter/coverage-identifier"); + sp.setCode("identifier"); + sp.setExpression("Coverage.identifier"); + sp.setType(Enumerations.SearchParamType.TOKEN); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Coverage"); + mySearchParameterDao.update(sp); + + sp = new SearchParameter(); + sp.setId("SearchParameter/coverage-beneficiary-identifier"); + sp.setCode("coverage-beneficiary-identifier"); + sp.setExpression("Coverage.beneficiary"); + sp.setType(Enumerations.SearchParamType.COMPOSITE); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Coverage"); + sp.addComponent() + .setExpression("Coverage") + .setDefinition(new Reference("/SearchParameter/coverage-beneficiary")); + sp.addComponent() + .setExpression("Coverage") + .setDefinition(new Reference("/SearchParameter/coverage-identifier")); + sp.addExtension() + .setUrl(JpaConstants.EXT_SP_UNIQUE) + .setValue(new BooleanType(true)); + mySearchParameterDao.update(sp); + mySearchParamRegsitry.forceRefresh(); + } + + private void createUniqueNameAndManagingOrganizationSps() { + SearchParameter sp = new SearchParameter(); + sp.setId("SearchParameter/patient-name"); + sp.setType(Enumerations.SearchParamType.STRING); + sp.setCode("name"); + sp.setExpression("Patient.name"); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Patient"); + mySearchParameterDao.update(sp); + + sp = new SearchParameter(); + sp.setId("SearchParameter/patient-organization"); + sp.setType(Enumerations.SearchParamType.REFERENCE); + sp.setCode("organization"); + sp.setExpression("Patient.managingOrganization"); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Patient"); + mySearchParameterDao.update(sp); + + sp = new SearchParameter(); + sp.setId("SearchParameter/patient-name-organization"); + sp.setType(Enumerations.SearchParamType.COMPOSITE); + sp.setStatus(PublicationStatus.ACTIVE); + sp.addBase("Patient"); + sp.addComponent() + .setExpression("Patient") + .setDefinition(new Reference("SearchParameter/patient-name")); + sp.addComponent() + .setExpression("Patient") + .setDefinition(new Reference("SearchParameter/patient-organization")); + sp.addExtension() + .setUrl(JpaConstants.EXT_SP_UNIQUE) + .setValue(new BooleanType(true)); + mySearchParameterDao.update(sp); + + mySearchParamRegsitry.forceRefresh(); + } + + @Test + public void testDetectUniqueSearchParams() { + createUniqueBirthdateAndGenderSps(); + List params = mySearchParamRegsitry.getActiveUniqueSearchParams("Patient"); + + assertEquals(1, params.size()); + assertEquals(params.get(0).isUnique(), true); + assertEquals(2, params.get(0).getCompositeOf().size()); + // Should be alphabetical order + assertEquals("birthdate", params.get(0).getCompositeOf().get(0).getName()); + assertEquals("gender", params.get(0).getCompositeOf().get(1).getName()); + } + + @Test + public void testDuplicateUniqueValuesAreRejected() { + createUniqueBirthdateAndGenderSps(); + + Patient pt1 = new Patient(); + pt1.setGender(Enumerations.AdministrativeGender.MALE); + pt1.setBirthDateElement(new DateType("2011-01-01")); + IIdType id1 = myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); + + try { + myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); + fail(); + } catch (PreconditionFailedException e) { + // good + } + + Patient pt2 = new Patient(); + pt2.setGender(Enumerations.AdministrativeGender.MALE); + IIdType id2 = myPatientDao.create(pt2).getId().toUnqualifiedVersionless(); + + pt2 = new Patient(); + pt2.setId(id2); + pt2.setGender(Enumerations.AdministrativeGender.MALE); + pt2.setBirthDateElement(new DateType("2011-01-01")); + try { + myPatientDao.update(pt2); + fail(); + } catch (PreconditionFailedException e) { + // good + } + + } @Test public void testIndexTransactionWithMatchUrl() { @@ -65,7 +227,6 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test } - @Test public void testIndexTransactionWithMatchUrl2() { createUniqueIndexCoverageBeneficiary(); @@ -176,190 +337,6 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test } - - private void createUniqueIndexCoverageBeneficiary() { - SearchParameter sp = new SearchParameter(); - sp.setId("SearchParameter/coverage-beneficiary"); - sp.setCode("beneficiary"); - sp.setExpression("Coverage.beneficiary"); - sp.setType(Enumerations.SearchParamType.REFERENCE); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Coverage"); - mySearchParameterDao.update(sp); - - sp = new SearchParameter(); - sp.setId("SearchParameter/coverage-identifier"); - sp.setCode("identifier"); - sp.setExpression("Coverage.identifier"); - sp.setType(Enumerations.SearchParamType.TOKEN); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Coverage"); - mySearchParameterDao.update(sp); - - sp = new SearchParameter(); - sp.setId("SearchParameter/coverage-beneficiary-identifier"); - sp.setCode("coverage-beneficiary-identifier"); - sp.setExpression("Coverage.beneficiary"); - sp.setType(Enumerations.SearchParamType.COMPOSITE); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Coverage"); - sp.addComponent() - .setExpression("Coverage") - .setDefinition(new Reference("/SearchParameter/coverage-beneficiary")); - sp.addComponent() - .setExpression("Coverage") - .setDefinition(new Reference("/SearchParameter/coverage-identifier")); - sp.addExtension() - .setUrl(JpaConstants.EXT_SP_UNIQUE) - .setValue(new BooleanType(true)); - mySearchParameterDao.update(sp); - mySearchParamRegsitry.forceRefresh(); - } - - - @Before - public void before() { - myDaoConfig.setDefaultSearchParamsCanBeOverridden(true); - } - - private void createUniqueBirthdateAndGenderSps() { - SearchParameter sp = new SearchParameter(); - sp.setId("SearchParameter/patient-gender"); - sp.setType(Enumerations.SearchParamType.TOKEN); - sp.setCode("gender"); - sp.setExpression("Patient.gender"); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Patient"); - mySearchParameterDao.update(sp); - - sp = new SearchParameter(); - sp.setId("SearchParameter/patient-birthdate"); - sp.setType(Enumerations.SearchParamType.DATE); - sp.setCode("birthdate"); - sp.setExpression("Patient.birthDate"); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Patient"); - mySearchParameterDao.update(sp); - - sp = new SearchParameter(); - sp.setId("SearchParameter/patient-gender-birthdate"); - sp.setType(Enumerations.SearchParamType.COMPOSITE); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Patient"); - sp.addComponent() - .setExpression("Patient") - .setDefinition(new Reference("SearchParameter/patient-gender")); - sp.addComponent() - .setExpression("Patient") - .setDefinition(new Reference("SearchParameter/patient-birthdate")); - sp.addExtension() - .setUrl(JpaConstants.EXT_SP_UNIQUE) - .setValue(new BooleanType(true)); - mySearchParameterDao.update(sp); - - mySearchParamRegsitry.forceRefresh(); - } - - private void createUniqueNameAndManagingOrganizationSps() { - SearchParameter sp = new SearchParameter(); - sp.setId("SearchParameter/patient-name"); - sp.setType(Enumerations.SearchParamType.STRING); - sp.setCode("name"); - sp.setExpression("Patient.name"); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Patient"); - mySearchParameterDao.update(sp); - - sp = new SearchParameter(); - sp.setId("SearchParameter/patient-organization"); - sp.setType(Enumerations.SearchParamType.REFERENCE); - sp.setCode("organization"); - sp.setExpression("Patient.managingOrganization"); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Patient"); - mySearchParameterDao.update(sp); - - sp = new SearchParameter(); - sp.setId("SearchParameter/patient-name-organization"); - sp.setType(Enumerations.SearchParamType.COMPOSITE); - sp.setStatus(PublicationStatus.ACTIVE); - sp.addBase("Patient"); - sp.addComponent() - .setExpression("Patient") - .setDefinition(new Reference("SearchParameter/patient-name")); - sp.addComponent() - .setExpression("Patient") - .setDefinition(new Reference("SearchParameter/patient-organization")); - sp.addExtension() - .setUrl(JpaConstants.EXT_SP_UNIQUE) - .setValue(new BooleanType(true)); - mySearchParameterDao.update(sp); - - mySearchParamRegsitry.forceRefresh(); - } - - @Test - public void testDetectUniqueSearchParams() { - createUniqueBirthdateAndGenderSps(); - List params = mySearchParamRegsitry.getActiveUniqueSearchParams("Patient"); - - assertEquals(1, params.size()); - assertEquals(params.get(0).isUnique(), true); - assertEquals(2, params.get(0).getCompositeOf().size()); - // Should be alphabetical order - assertEquals("birthdate", params.get(0).getCompositeOf().get(0).getName()); - assertEquals("gender", params.get(0).getCompositeOf().get(1).getName()); - } - - - @Test - public void testDuplicateUniqueValuesAreRejected() { - createUniqueBirthdateAndGenderSps(); - - Patient pt1 = new Patient(); - pt1.setGender(Enumerations.AdministrativeGender.MALE); - pt1.setBirthDateElement(new DateType("2011-01-01")); - IIdType id1 = myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); - - try { - myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); - fail(); - } catch (PreconditionFailedException e) { - // good - } - - Patient pt2 = new Patient(); - pt2.setGender(Enumerations.AdministrativeGender.MALE); - IIdType id2 = myPatientDao.create(pt2).getId().toUnqualifiedVersionless(); - - pt2 = new Patient(); - pt2.setId(id2); - pt2.setGender(Enumerations.AdministrativeGender.MALE); - pt2.setBirthDateElement(new DateType("2011-01-01")); - try { - myPatientDao.update(pt2); - fail(); - } catch (PreconditionFailedException e) { - // good - } - - } - - @Test - public void testUniqueValuesAreIndexed_DateAndToken() { - createUniqueBirthdateAndGenderSps(); - - Patient pt1 = new Patient(); - pt1.setGender(Enumerations.AdministrativeGender.MALE); - pt1.setBirthDateElement(new DateType("2011-01-01")); - IIdType id1 = myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); - - List uniques = myResourceIndexedCompositeStringUniqueDao.findAll(); - assertEquals(1, uniques.size()); - assertEquals("Patient/" + id1.getIdPart(), uniques.get(0).getResource().getIdDt().toUnqualifiedVersionless().getValue()); - assertEquals("Patient?birthdate=2011-01-01&gender=http%3A%2F%2Fhl7.org%2Ffhir%2Fadministrative-gender%7Cmale", uniques.get(0).getIndexString()); - } - @Test public void testSearchSynchronousUsingUniqueComposite() { createUniqueBirthdateAndGenderSps(); @@ -384,7 +361,7 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test assertEquals(SearchBuilder.HandlerTypeEnum.UNIQUE_INDEX, SearchBuilder.getLastHandlerMechanismForUnitTest()); } - @Test + @Test public void testSearchUsingUniqueComposite() { createUniqueBirthdateAndGenderSps(); @@ -392,6 +369,7 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test pt1.setGender(Enumerations.AdministrativeGender.MALE); pt1.setBirthDateElement(new DateType("2011-01-01")); IIdType id1 = myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); + assertNotNull(id1); Patient pt2 = new Patient(); pt2.setGender(Enumerations.AdministrativeGender.MALE); @@ -414,7 +392,9 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test params.add("gender", new TokenParam("http://hl7.org/fhir/administrative-gender", "male")); results = myPatientDao.search(params); assertEquals(searchId, results.getUuid()); - assertThat(toUnqualifiedVersionlessIdValues(results), containsInAnyOrder(id1.getValue())); + String id1Value = id1.getValue(); + List actualValues = toUnqualifiedVersionlessIdValues(results); + assertThat(actualValues, containsInAnyOrder(id1Value)); // Null because we just reuse the last search assertEquals(null, SearchBuilder.getLastHandlerMechanismForUnitTest()); @@ -435,6 +415,21 @@ public class FhirResourceDaoDstu3UniqueSearchParamTest extends BaseJpaDstu3Test } + @Test + public void testUniqueValuesAreIndexed_DateAndToken() { + createUniqueBirthdateAndGenderSps(); + + Patient pt1 = new Patient(); + pt1.setGender(Enumerations.AdministrativeGender.MALE); + pt1.setBirthDateElement(new DateType("2011-01-01")); + IIdType id1 = myPatientDao.create(pt1).getId().toUnqualifiedVersionless(); + + List uniques = myResourceIndexedCompositeStringUniqueDao.findAll(); + assertEquals(1, uniques.size()); + assertEquals("Patient/" + id1.getIdPart(), uniques.get(0).getResource().getIdDt().toUnqualifiedVersionless().getValue()); + assertEquals("Patient?birthdate=2011-01-01&gender=http%3A%2F%2Fhl7.org%2Ffhir%2Fadministrative-gender%7Cmale", uniques.get(0).getIndexString()); + } + @Test public void testUniqueValuesAreIndexed_StringAndReference() { createUniqueNameAndManagingOrganizationSps(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java index f1746efb97a..4a72e9331a2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValueSetTest.java @@ -1,59 +1,136 @@ package ca.uhn.fhir.jpa.dao.dstu3; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.stringContainsInOrder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; - -import org.hl7.fhir.dstu3.model.CodeSystem; -import org.hl7.fhir.dstu3.model.CodeType; -import org.hl7.fhir.dstu3.model.CodeableConcept; -import org.hl7.fhir.dstu3.model.Coding; -import org.hl7.fhir.dstu3.model.IdType; -import org.hl7.fhir.dstu3.model.Parameters; -import org.hl7.fhir.dstu3.model.StringType; -import org.hl7.fhir.dstu3.model.UriType; -import org.hl7.fhir.dstu3.model.ValueSet; +import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import ca.uhn.fhir.util.TestUtil; +import org.hl7.fhir.dstu3.hapi.ctx.IValidationSupport; +import org.hl7.fhir.dstu3.model.*; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.junit.AfterClass; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; -import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; -import ca.uhn.fhir.util.TestUtil; +import java.io.IOException; + +import static junit.framework.Assert.assertNotNull; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu3ValueSetTest.class); private IIdType myExtensionalVsId; - - - @AfterClass - public static void afterClassClearContext() { - TestUtil.clearAllStaticFieldsForUnitTest(); - } - + @Autowired + private IValidationSupport myValidationSupport; @Before @Transactional public void before02() throws IOException { ValueSet upload = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml"); myExtensionalVsId = myValueSetDao.create(upload, mySrd).getId().toUnqualifiedVersionless(); - + CodeSystem upload2 = loadResourceFromClasspath(CodeSystem.class, "/extensional-case-3-cs.xml"); myCodeSystemDao.create(upload2, mySrd).getId().toUnqualifiedVersionless(); } + @Test + @Ignore + public void testBuiltInValueSetFetchAndExpand() { + + try { + myValueSetDao.read(new IdType("ValueSet/endpoint-payload-type")); + fail(); + } catch (ResourceNotFoundException e) { + // good + } + + ValueSet vs = myValidationSupport.fetchResource(myFhirCtx, ValueSet.class, "http://hl7.org/fhir/ValueSet/endpoint-payload-type"); + myValueSetDao.update(vs); + + vs = myValueSetDao.read(new IdType("ValueSet/endpoint-payload-type")); + assertNotNull(vs); + assertEquals("http://hl7.org/fhir/ValueSet/endpoint-payload-type", vs.getUrl()); + + ValueSet expansion = myValueSetDao.expand(vs.getIdElement(), null, mySrd); + ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expansion)); + } + + @Test + public void testExpandById() throws IOException { + String resp; + + ValueSet expanded = myValueSetDao.expand(myExtensionalVsId, null, mySrd); + resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); + ourLog.info(resp); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + assertThat(resp, containsString("")); + + /* + * Filter with display name + */ + + expanded = myValueSetDao.expand(myExtensionalVsId, ("systolic"), mySrd); + resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); + ourLog.info(resp); + //@formatter:off + assertThat(resp, stringContainsInOrder( + "", + "")); + //@formatter:on + + } + + @Test + @Ignore + public void testExpandByIdentifier() { + ValueSet expanded = myValueSetDao.expandByIdentifier("http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2", "11378"); + String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); + ourLog.info(resp); + //@formatter:off + assertThat(resp, stringContainsInOrder( + "", + "")); + //@formatter:on + + assertThat(resp, not(containsString(""))); + } + + /** + * This type of expansion doesn't really make sense.. + */ + @Test + @Ignore + public void testExpandByValueSet() throws IOException { + ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml"); + ValueSet expanded = myValueSetDao.expand(toExpand, "11378"); + String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); + ourLog.info(resp); + //@formatter:off + assertThat(resp, stringContainsInOrder( + "", + "")); + //@formatter:on + + assertThat(resp, not(containsString(""))); + } + @Test public void testValidateCodeOperationByCodeAndSystemBad() { UriType valueSetIdentifier = null; @@ -123,6 +200,20 @@ public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); } + @Test + public void testValidateCodeOperationByResourceIdAndCodeAndSystem() { + UriType valueSetIdentifier = null; + IIdType id = myExtensionalVsId; + CodeType code = new CodeType("11378-7"); + UriType system = new UriType("http://acme.org"); + StringType display = null; + Coding coding = null; + CodeableConcept codeableConcept = null; + ValidateCodeResult result = myValueSetDao.validateCode(valueSetIdentifier, id, code, system, display, coding, codeableConcept, mySrd); + assertTrue(result.isResult()); + assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); + } + @Test public void testValidateCodeOperationByResourceIdAndCodeableConcept() { UriType valueSetIdentifier = null; @@ -138,91 +229,6 @@ public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); } - @Test - public void testValidateCodeOperationByResourceIdAndCodeAndSystem() { - UriType valueSetIdentifier = null; - IIdType id = myExtensionalVsId; - CodeType code = new CodeType("11378-7"); - UriType system = new UriType("http://acme.org"); - StringType display = null; - Coding coding = null; - CodeableConcept codeableConcept = null; - ValidateCodeResult result = myValueSetDao.validateCode(valueSetIdentifier, id, code, system, display, coding, codeableConcept, mySrd); - assertTrue(result.isResult()); - assertEquals("Systolic blood pressure at First encounter", result.getDisplay()); - } - - @Test - public void testExpandById() throws IOException { - String resp; - - ValueSet expanded = myValueSetDao.expand(myExtensionalVsId, null, mySrd); - resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); - ourLog.info(resp); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - assertThat(resp, containsString("")); - - /* - * Filter with display name - */ - - expanded = myValueSetDao.expand(myExtensionalVsId, ("systolic"), mySrd); - resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); - ourLog.info(resp); - //@formatter:off - assertThat(resp, stringContainsInOrder( - "", - "")); - //@formatter:on - - } - - @Test - @Ignore - public void testExpandByIdentifier() { - ValueSet expanded = myValueSetDao.expandByIdentifier("http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2", "11378"); - String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); - ourLog.info(resp); - //@formatter:off - assertThat(resp, stringContainsInOrder( - "", - "")); - //@formatter:on - - assertThat(resp, not(containsString(""))); - } - - /** - * This type of expansion doesn't really make sense.. - */ - @Test - @Ignore - public void testExpandByValueSet() throws IOException { - ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml"); - ValueSet expanded = myValueSetDao.expand(toExpand, "11378"); - String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded); - ourLog.info(resp); - //@formatter:off - assertThat(resp, stringContainsInOrder( - "", - "")); - //@formatter:on - - assertThat(resp, not(containsString(""))); - } - - @Test public void testValiedateCodeAgainstBuiltInValueSetAndCodeSystemWithValidCode() { IPrimitiveType display = null; @@ -232,11 +238,16 @@ public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test { StringType code = new StringType("BRN"); StringType system = new StringType("http://hl7.org/fhir/v2/0487"); ValidateCodeResult result = myValueSetDao.validateCode(vsIdentifier, null, code, system, display, coding, codeableConcept, mySrd); - + ourLog.info(result.getMessage()); assertTrue(result.getMessage(), result.isResult()); } - + @AfterClass + public static void afterClassClearContext() { + TestUtil.clearAllStaticFieldsForUnitTest(); + } + + } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchMissingTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchMissingTest.java index 0697183af66..51251c75916 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchMissingTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchMissingTest.java @@ -161,12 +161,12 @@ public class FhirResourceDaoR4SearchMissingTest extends BaseJpaR4Test { @Test public void testSearchWithMissingDate2() { MedicationRequest mr1 = new MedicationRequest(); - mr1.getCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); + mr1.addCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); mr1.addDosageInstruction().getTiming().addEventElement().setValueAsString("2017-01-01"); IIdType id1 = myMedicationRequestDao.create(mr1).getId().toUnqualifiedVersionless(); MedicationRequest mr2 = new MedicationRequest(); - mr2.getCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); + mr2.addCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); IIdType id2 = myMedicationRequestDao.create(mr2).getId().toUnqualifiedVersionless(); SearchParameterMap map = new SearchParameterMap(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java index 013bdc91a31..9410fb8d2e6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java @@ -165,41 +165,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { return ids; } - @Test - public void testUpdateThatCreatesReturnsHttp201() throws IOException { - - Patient p = new Patient(); - p.setId("A"); - p.setActive(true); - String encoded = myFhirCtx.newJsonParser().encodeResourceToString(p); - - HttpPut put = new HttpPut(ourServerBase + "/Patient/A"); - put.setEntity(new StringEntity(encoded, "application/fhir+json", "UTF-8")); - - CloseableHttpResponse response = ourHttpClient.execute(put); - try { - assertEquals(201, response.getStatusLine().getStatusCode()); - } finally { - IOUtils.closeQuietly(response); - } - - p = new Patient(); - p.setId("A"); - p.setActive(false); - encoded = myFhirCtx.newJsonParser().encodeResourceToString(p); - - put = new HttpPut(ourServerBase + "/Patient/A"); - put.setEntity(new StringEntity(encoded, "application/fhir+json", "UTF-8")); - - response = ourHttpClient.execute(put); - try { - assertEquals(200, response.getStatusLine().getStatusCode()); - } finally { - IOUtils.closeQuietly(response); - } - - } - // Y @Test public void testBundleCreate() throws Exception { @@ -248,7 +213,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { //@formatter:off assertThat(toUnqualifiedVersionlessIds(resp), contains(id)); - + //@formatter:off resp = ourClient .search() @@ -490,8 +455,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } - - @Test public void testCreateResourceConditionalComplex() throws IOException { Patient pt = new Patient(); @@ -554,7 +517,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { response.close(); } } - @Test public void testCreateResourceWithNumericId() throws IOException { @@ -577,7 +539,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { response.close(); } } - + @Test public void testCreateWithForcedId() throws IOException { String methodName = "testCreateWithForcedId"; @@ -893,7 +855,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { int initialSize = client.search().forResource(DocumentManifest.class).returnBundle(Bundle.class).execute().getEntry().size(); - String resBody = IOUtils.toString(ResourceProviderR4Test.class.getResource("/documentmanifest.json"), StandardCharsets.UTF_8); + String resBody = IOUtils.toString(ResourceProviderR4Test.class.getResource("/r4/documentmanifest.json"), StandardCharsets.UTF_8); client.create().resource(resBody).execute(); int newSize = client.search().forResource(DocumentManifest.class).returnBundle(Bundle.class).execute().getEntry().size(); @@ -911,7 +873,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { int initialSize = client.search().forResource(DocumentReference.class).returnBundle(Bundle.class).execute().getEntry().size(); - String resBody = IOUtils.toString(ResourceProviderR4Test.class.getResource("/documentreference.json"), StandardCharsets.UTF_8); + String resBody = IOUtils.toString(ResourceProviderR4Test.class.getResource("/r4/documentreference.json"), StandardCharsets.UTF_8); client.create().resource(resBody).execute(); int newSize = client.search().forResource(DocumentReference.class).returnBundle(Bundle.class).execute().getEntry().size(); @@ -1461,7 +1423,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } Collections.sort(ids); ourLog.info("{} ids: {}", ids.size(), ids); - + assertThat(responseBundle.getEntry().size(), lessThanOrEqualTo(25)); TreeSet idsSet = new TreeSet(); @@ -1567,31 +1529,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { assertEquals(1, response.getEntry().size()); } - // private void delete(String theResourceType, String theParamName, String theParamValue) { - // Bundle resources; - // do { - // IQuery forResource = ourClient.search().forResource(theResourceType); - // if (theParamName != null) { - // forResource = forResource.where(new StringClientParam(theParamName).matches().value(theParamValue)); - // } - // resources = forResource.execute(); - // for (IResource next : resources.toListOfResources()) { - // ourLog.info("Deleting resource: {}", next.getId()); - // ourClient.delete().resource(next).execute(); - // } - // } while (resources.size() > 0); - // } - // - // private void deleteToken(String theResourceType, String theParamName, String theParamSystem, String theParamValue) - // { - // Bundle resources = ourClient.search().forResource(theResourceType).where(new - // TokenClientParam(theParamName).exactly().systemAndCode(theParamSystem, theParamValue)).execute(); - // for (IResource next : resources.toListOfResources()) { - // ourLog.info("Deleting resource: {}", next.getId()); - // ourClient.delete().resource(next).execute(); - // } - // } - @SuppressWarnings("unused") @Test public void testFullTextSearch() throws RuntimeException, Exception { @@ -1620,6 +1557,31 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } } + // private void delete(String theResourceType, String theParamName, String theParamValue) { + // Bundle resources; + // do { + // IQuery forResource = ourClient.search().forResource(theResourceType); + // if (theParamName != null) { + // forResource = forResource.where(new StringClientParam(theParamName).matches().value(theParamValue)); + // } + // resources = forResource.execute(); + // for (IResource next : resources.toListOfResources()) { + // ourLog.info("Deleting resource: {}", next.getId()); + // ourClient.delete().resource(next).execute(); + // } + // } while (resources.size() > 0); + // } + // + // private void deleteToken(String theResourceType, String theParamName, String theParamSystem, String theParamValue) + // { + // Bundle resources = ourClient.search().forResource(theResourceType).where(new + // TokenClientParam(theParamName).exactly().systemAndCode(theParamSystem, theParamValue)).execute(); + // for (IResource next : resources.toListOfResources()) { + // ourLog.info("Deleting resource: {}", next.getId()); + // ourClient.delete().resource(next).execute(); + // } + // } + @Test public void testGetResourceCountsOperation() throws Exception { String methodName = "testMetaOperations"; @@ -1640,8 +1602,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { response.close(); } } - - + @Test public void testHasParameter() throws Exception { IIdType pid0; @@ -1678,7 +1639,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { List ids = searchAndReturnUnqualifiedVersionlessIdValues(uri); assertThat(ids, contains(pid0.getValue())); } - + @Test public void testHasParameterNoResults() throws Exception { @@ -1888,6 +1849,73 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { assertEquals(1, b.getEntry().size()); } + @Test + public void testMetaOperationWithNoMetaParameter() throws Exception { + Patient p = new Patient(); + p.addName().setFamily("testMetaAddInvalid"); + IIdType id = ourClient.create().resource(p).execute().getId().toUnqualifiedVersionless(); + + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:on + + HttpPost post = new HttpPost(ourServerBase + "/Patient/" + id.getIdPart() + "/$meta-add"); + post.setEntity(new StringEntity(input, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); + CloseableHttpResponse response = ourHttpClient.execute(post); + try { + String output = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); + ourLog.info(output); + assertEquals(400, response.getStatusLine().getStatusCode()); + assertThat(output, containsString("Input contains no parameter with name 'meta'")); + } finally { + response.close(); + } + + post = new HttpPost(ourServerBase + "/Patient/" + id.getIdPart() + "/$meta-delete"); + post.setEntity(new StringEntity(input, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); + response = ourHttpClient.execute(post); + try { + String output = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); + ourLog.info(output); + assertEquals(400, response.getStatusLine().getStatusCode()); + assertThat(output, containsString("Input contains no parameter with name 'meta'")); + } finally { + response.close(); + } + + } + + @Test + public void testMetaOperations() throws Exception { + String methodName = "testMetaOperations"; + + Patient pt = new Patient(); + pt.addName().setFamily(methodName); + IIdType id = ourClient.create().resource(pt).execute().getId().toUnqualifiedVersionless(); + + Meta meta = ourClient.meta().get(Meta.class).fromResource(id).execute(); + assertEquals(0, meta.getTag().size()); + + Meta inMeta = new Meta(); + inMeta.addTag().setSystem("urn:system1").setCode("urn:code1"); + meta = ourClient.meta().add().onResource(id).meta(inMeta).execute(); + assertEquals(1, meta.getTag().size()); + + inMeta = new Meta(); + inMeta.addTag().setSystem("urn:system1").setCode("urn:code1"); + meta = ourClient.meta().delete().onResource(id).meta(inMeta).execute(); + assertEquals(0, meta.getTag().size()); + + } + @Test public void testMetadata() throws Exception { HttpGet get = new HttpGet(ourServerBase + "/metadata"); @@ -1921,86 +1949,19 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { assertEquals(1, resp.getTotal()); } - @Test - public void testMetaOperations() throws Exception { - String methodName = "testMetaOperations"; - - Patient pt = new Patient(); - pt.addName().setFamily(methodName); - IIdType id = ourClient.create().resource(pt).execute().getId().toUnqualifiedVersionless(); - - Meta meta = ourClient.meta().get(Meta.class).fromResource(id).execute(); - assertEquals(0, meta.getTag().size()); - - Meta inMeta = new Meta(); - inMeta.addTag().setSystem("urn:system1").setCode("urn:code1"); - meta = ourClient.meta().add().onResource(id).meta(inMeta).execute(); - assertEquals(1, meta.getTag().size()); - - inMeta = new Meta(); - inMeta.addTag().setSystem("urn:system1").setCode("urn:code1"); - meta = ourClient.meta().delete().onResource(id).meta(inMeta).execute(); - assertEquals(0, meta.getTag().size()); - - } - - @Test - public void testMetaOperationWithNoMetaParameter() throws Exception { - Patient p = new Patient(); - p.addName().setFamily("testMetaAddInvalid"); - IIdType id = ourClient.create().resource(p).execute().getId().toUnqualifiedVersionless(); - - //@formatter:off - String input = "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - ""; - //@formatter:on - - HttpPost post = new HttpPost(ourServerBase + "/Patient/" + id.getIdPart() + "/$meta-add"); - post.setEntity(new StringEntity(input, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); - CloseableHttpResponse response = ourHttpClient.execute(post); - try { - String output = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); - ourLog.info(output); - assertEquals(400, response.getStatusLine().getStatusCode()); - assertThat(output, containsString("Input contains no parameter with name 'meta'")); - } finally { - response.close(); - } - - post = new HttpPost(ourServerBase + "/Patient/" + id.getIdPart() + "/$meta-delete"); - post.setEntity(new StringEntity(input, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); - response = ourHttpClient.execute(post); - try { - String output = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); - ourLog.info(output); - assertEquals(400, response.getStatusLine().getStatusCode()); - assertThat(output, containsString("Input contains no parameter with name 'meta'")); - } finally { - response.close(); - } - - } - @Test public void testPagingOverEverythingSet() throws InterruptedException { Patient p = new Patient(); p.setActive(true); String pid = myPatientDao.create(p).getId().toUnqualifiedVersionless().getValue(); - + for (int i = 0; i < 20; i++) { Observation o = new Observation(); o.getSubject().setReference(pid); o.addIdentifier().setSystem("foo").setValue(Integer.toString(i)); myObservationDao.create(o); } - + mySearchCoordinatorSvcRaw.setLoadingThrottleForUnitTests(50); mySearchCoordinatorSvcRaw.setSyncSizeForUnitTests(10); mySearchCoordinatorSvcRaw.setNeverUseLocalSearchForUnitTests(true); @@ -2013,7 +1974,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .returnResourceType(Bundle.class) .useHttpGet() .execute(); - + assertEquals(10, response.getEntry().size()); if (response.getTotalElement().getValueAsString() != null) { assertEquals("21", response.getTotalElement().getValueAsString()); @@ -2033,7 +1994,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { // Load page 3 Thread.sleep(2000); - + nextUrl = response.getLink("next").getUrl(); response = ourClient.fetchResourceFromUrl(Bundle.class, nextUrl); @@ -2046,18 +2007,18 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { @Test public void testPagingOverEverythingSetWithNoPagingProvider() throws InterruptedException { ourRestServer.setPagingProvider(null); - + Patient p = new Patient(); p.setActive(true); String pid = myPatientDao.create(p).getId().toUnqualifiedVersionless().getValue(); - + for (int i = 0; i < 20; i++) { Observation o = new Observation(); o.getSubject().setReference(pid); o.addIdentifier().setSystem("foo").setValue(Integer.toString(i)); myObservationDao.create(o); } - + mySearchCoordinatorSvcRaw.setLoadingThrottleForUnitTests(50); mySearchCoordinatorSvcRaw.setSyncSizeForUnitTests(10); mySearchCoordinatorSvcRaw.setNeverUseLocalSearchForUnitTests(true); @@ -2070,7 +2031,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .returnResourceType(Bundle.class) .useHttpGet() .execute(); - + assertEquals(21, response.getEntry().size()); assertEquals(21, response.getTotalElement().getValue().intValue()); assertEquals(null, response.getLink("next")); @@ -2404,57 +2365,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } - @Test - public void testSearchByIdentifier() { - Patient p1 = new Patient(); - p1.addIdentifier().setSystem("urn:system").setValue("testSearchByIdentifier01"); - p1.addName().setFamily("testSearchByIdentifierFamily01").addGiven("testSearchByIdentifierGiven01"); - IdType p1Id = (IdType) ourClient.create().resource(p1).execute().getId(); - - Patient p2 = new Patient(); - p2.addIdentifier().setSystem("urn:system").setValue("testSearchByIdentifier02"); - p2.addName().setFamily("testSearchByIdentifierFamily01").addGiven("testSearchByIdentifierGiven02"); - ourClient.create().resource(p2).execute().getId(); - - //@formatter:off - Bundle actual = ourClient - .search() - .forResource(Patient.class) - .where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system", "testSearchByIdentifier01")) - .encodedJson() - .prettyPrint() - .returnBundle(Bundle.class) - .execute(); - //@formatter:on - - assertEquals(1, actual.getEntry().size()); - assertEquals(ourServerBase + "/Patient/" + p1Id.getIdPart(), actual.getEntry().get(0).getFullUrl()); - assertEquals(p1Id.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); - assertEquals(SearchEntryMode.MATCH, actual.getEntry().get(0).getSearch().getModeElement().getValue()); - } - - @Test - public void testSearchByIdentifierWithoutSystem() { - - Patient p1 = new Patient(); - p1.addIdentifier().setValue("testSearchByIdentifierWithoutSystem01"); - IdType p1Id = (IdType) ourClient.create().resource(p1).execute().getId(); - - //@formatter:off - Bundle actual = ourClient - .search() - .forResource(Patient.class) - .where(Patient.IDENTIFIER.exactly().systemAndCode(null, "testSearchByIdentifierWithoutSystem01")) - .encodedJson() - .prettyPrint() - .returnBundle(Bundle.class) - .execute(); - //@formatter:on - assertEquals(1, actual.getEntry().size()); - assertEquals(p1Id.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); - - } - @Test public void testSearchByIdOr() { IIdType id1; @@ -2539,6 +2449,57 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } + @Test + public void testSearchByIdentifier() { + Patient p1 = new Patient(); + p1.addIdentifier().setSystem("urn:system").setValue("testSearchByIdentifier01"); + p1.addName().setFamily("testSearchByIdentifierFamily01").addGiven("testSearchByIdentifierGiven01"); + IdType p1Id = (IdType) ourClient.create().resource(p1).execute().getId(); + + Patient p2 = new Patient(); + p2.addIdentifier().setSystem("urn:system").setValue("testSearchByIdentifier02"); + p2.addName().setFamily("testSearchByIdentifierFamily01").addGiven("testSearchByIdentifierGiven02"); + ourClient.create().resource(p2).execute().getId(); + + //@formatter:off + Bundle actual = ourClient + .search() + .forResource(Patient.class) + .where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system", "testSearchByIdentifier01")) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + //@formatter:on + + assertEquals(1, actual.getEntry().size()); + assertEquals(ourServerBase + "/Patient/" + p1Id.getIdPart(), actual.getEntry().get(0).getFullUrl()); + assertEquals(p1Id.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + assertEquals(SearchEntryMode.MATCH, actual.getEntry().get(0).getSearch().getModeElement().getValue()); + } + + @Test + public void testSearchByIdentifierWithoutSystem() { + + Patient p1 = new Patient(); + p1.addIdentifier().setValue("testSearchByIdentifierWithoutSystem01"); + IdType p1Id = (IdType) ourClient.create().resource(p1).execute().getId(); + + //@formatter:off + Bundle actual = ourClient + .search() + .forResource(Patient.class) + .where(Patient.IDENTIFIER.exactly().systemAndCode(null, "testSearchByIdentifierWithoutSystem01")) + .encodedJson() + .prettyPrint() + .returnBundle(Bundle.class) + .execute(); + //@formatter:on + assertEquals(1, actual.getEntry().size()); + assertEquals(p1Id.getIdPart(), actual.getEntry().get(0).getResource().getIdElement().getIdPart()); + + } + @Test public void testSearchByLastUpdated() throws Exception { String methodName = "testSearchByLastUpdated"; @@ -2802,6 +2763,31 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } + @Test() + public void testSearchNegativeNumbers() throws Exception { + Observation o = new Observation(); + o.setValue(new Quantity().setValue(new BigDecimal("-10"))); + String oid1 = myObservationDao.create(o, mySrd).getId().toUnqualifiedVersionless().getValue(); + + Observation o2 = new Observation(); + o2.setValue(new Quantity().setValue(new BigDecimal("-20"))); + String oid2 = myObservationDao.create(o2, mySrd).getId().toUnqualifiedVersionless().getValue(); + + HttpGet get = new HttpGet(ourServerBase + "/Observation?value-quantity=gt-15"); + CloseableHttpResponse resp = ourHttpClient.execute(get); + try { + assertEquals(200, resp.getStatusLine().getStatusCode()); + Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, IOUtils.toString(resp.getEntity().getContent(), Constants.CHARSET_UTF8)); + + List ids = toUnqualifiedVersionlessIdValues(bundle); + assertThat(ids, contains(oid1)); + assertThat(ids, not(contains(oid2))); + } finally { + IOUtils.closeQuietly(resp); + } + + } + @SuppressWarnings("unused") @Test public void testSearchPagingKeepsOldSearches() throws Exception { @@ -3233,31 +3219,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } } - @Test() - public void testSearchNegativeNumbers() throws Exception { - Observation o = new Observation(); - o.setValue(new Quantity().setValue(new BigDecimal("-10"))); - String oid1 = myObservationDao.create(o, mySrd).getId().toUnqualifiedVersionless().getValue(); - - Observation o2 = new Observation(); - o2.setValue(new Quantity().setValue(new BigDecimal("-20"))); - String oid2 = myObservationDao.create(o2, mySrd).getId().toUnqualifiedVersionless().getValue(); - - HttpGet get = new HttpGet(ourServerBase + "/Observation?value-quantity=gt-15"); - CloseableHttpResponse resp = ourHttpClient.execute(get); - try { - assertEquals(200, resp.getStatusLine().getStatusCode()); - Bundle bundle = myFhirCtx.newXmlParser().parseResource(Bundle.class, IOUtils.toString(resp.getEntity().getContent(), Constants.CHARSET_UTF8)); - - List ids = toUnqualifiedVersionlessIdValues(bundle); - assertThat(ids, contains(oid1)); - assertThat(ids, not(contains(oid2))); - } finally { - IOUtils.closeQuietly(resp); - } - - } - @Test(expected = InvalidRequestException.class) public void testSearchWithInvalidSort() throws Exception { Observation o = new Observation(); @@ -3356,12 +3317,12 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { @Test public void testSearchWithMissingDate2() throws Exception { MedicationRequest mr1 = new MedicationRequest(); - mr1.getCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); + mr1.addCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); mr1.addDosageInstruction().getTiming().addEventElement().setValueAsString("2017-01-01"); IIdType id1 = myMedicationRequestDao.create(mr1).getId().toUnqualifiedVersionless(); MedicationRequest mr2 = new MedicationRequest(); - mr2.getCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); + mr2.addCategory().addCoding().setSystem("urn:medicationroute").setCode("oral"); IIdType id2 = myMedicationRequestDao.create(mr2).getId().toUnqualifiedVersionless(); HttpGet get = new HttpGet(ourServerBase + "/MedicationRequest?date:missing=false"); @@ -3381,7 +3342,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { /** * See #411 - * + * * Let's see if we can reproduce this issue in JPA */ @Test @@ -3895,6 +3856,41 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } + @Test + public void testUpdateThatCreatesReturnsHttp201() throws IOException { + + Patient p = new Patient(); + p.setId("A"); + p.setActive(true); + String encoded = myFhirCtx.newJsonParser().encodeResourceToString(p); + + HttpPut put = new HttpPut(ourServerBase + "/Patient/A"); + put.setEntity(new StringEntity(encoded, "application/fhir+json", "UTF-8")); + + CloseableHttpResponse response = ourHttpClient.execute(put); + try { + assertEquals(201, response.getStatusLine().getStatusCode()); + } finally { + IOUtils.closeQuietly(response); + } + + p = new Patient(); + p.setId("A"); + p.setActive(false); + encoded = myFhirCtx.newJsonParser().encodeResourceToString(p); + + put = new HttpPut(ourServerBase + "/Patient/A"); + put.setEntity(new StringEntity(encoded, "application/fhir+json", "UTF-8")); + + response = ourHttpClient.execute(put); + try { + assertEquals(200, response.getStatusLine().getStatusCode()); + } finally { + IOUtils.closeQuietly(response); + } + + } + @Test public void testUpdateWithClientSuppliedIdWhichDoesntExist() { Patient p1 = new Patient(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/r4/RestHookWithEventDefinitionR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/r4/RestHookWithEventDefinitionR4Test.java index 4f5b41f39cb..2a0eae5a583 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/r4/RestHookWithEventDefinitionR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/r4/RestHookWithEventDefinitionR4Test.java @@ -95,9 +95,9 @@ public class RestHookWithEventDefinitionR4Test extends BaseResourceProviderR4Tes .setPurpose("Monitor all admissions to Emergency") .setTrigger(new TriggerDefinition() .setType(TriggerDefinition.TriggerType.DATAADDED) - .setEventCondition(new TriggerDefinition.TriggerDefinitionEventConditionComponent() + .setCondition(new TriggerDefinition.TriggerDefinitionConditionComponent() .setDescription("Encounter Location = emergency (active/completed encounters, current or previous)") - .setLanguage("text/fhirpath") + .setLanguage(TriggerDefinition.ExpressionLanguage.TEXT_FHIRPATH) .setExpression("(this | %previous).location.where(location = 'Location/emergency' and status in {'active', 'completed'}).exists()") ) ); diff --git a/hapi-fhir-jpaserver-base/src/test/resources/r4/documentmanifest.json b/hapi-fhir-jpaserver-base/src/test/resources/r4/documentmanifest.json new file mode 100644 index 00000000000..d230eeb3b49 --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/r4/documentmanifest.json @@ -0,0 +1,49 @@ +{ + "resourceType" : "DocumentManifest", + "text" : { + "status" : "generated", + "div" : "
Text
" + }, + "contained" : [ + { + "resourceType" : "Practitioner", + "id" : "a1", + "name" : [{ + "family" : [ + "Dopplemeyer" + ], + "given" : [ + "Sherry" + ] + }], + "telecom" : [ + { + "system" : "email", + "value" : "john.doe@healthcare.example.org" + } + ] + } + ], + "masterIdentifier" : { + "system" : "http://example.org/documents", + "value" : "23425234234-2346" + }, + "subject" : [ + ], + "type" : { + "text" : "History and Physical" + }, + "agent" : [ + { + "who": { + "reference": "#a1" + } + } + ], + "created" : "2004-12-25T23:50:50", + "source" : "urn:oid:1.3.6.1.4.1.21367.2009.1.2.1", + "status" : "current", + "description" : "Physical", + "content" : [ + ] +} diff --git a/hapi-fhir-jpaserver-base/src/test/resources/r4/documentreference.json b/hapi-fhir-jpaserver-base/src/test/resources/r4/documentreference.json new file mode 100644 index 00000000000..0bcdd9688aa --- /dev/null +++ b/hapi-fhir-jpaserver-base/src/test/resources/r4/documentreference.json @@ -0,0 +1,101 @@ +{ + "resourceType" : "DocumentReference", + "text" : { + "status" : "generated", + "div" : "

Generated Narrative

masterIdentifier: urn:oid:1.3.6.1.4.1.21367.2005.3.7

subject: MRN = 12345 (usual); Henry Levin ; Male; birthDate: 24-Sep 1932; active

type: Outpatient Note

author: Sherry Dopplemeyer ; Primary Surgon; Orthopedic, Gerald Smitty ; Attending; Orthopedic

created: 24-Dec 2005 9:35

indexed: 24-Dec 2005 9:43

status: current

description: Physical

confidentiality: Clinical-Staff

primaryLanguage: en-US

mimeType: application/hl7-v3+xml

size: 3654

hash: da39a3ee5e6b4b0d3255bfef95601890afd80709

location: http://example.org/xds/mhd/Binary/@07a6483f-732b-461e-86b6-edb665c45510

Contexts

Event Period FacilityType
Arm 23-Dec 2004 8:0 --> 23-Dec 2004 8:1 Outpatient
" + }, + "contained" : [ + { + "resourceType" : "Practitioner", + "id" : "a1", + "name" : [{ + "family" : [ + "Dopplemeyer" + ], + "given" : [ + "Sherry" + ] + }], + "telecom" : [ + { + "system" : "email", + "value" : "john.doe@healthcare.example.org" + } + ] + }, + { + "resourceType" : "Practitioner", + "id" : "a2", + "name" : [{ + "family" : [ + "Smitty" + ], + "given" : [ + "Gerald" + ] + }], + "telecom" : [ + { + "system" : "email", + "value" : "john.doe@healthcare.example.org" + } + ] + } + ], + "masterIdentifier" : { + "system" : "urn:ietf:rfc:3986", + "value" : "urn:oid:1.3.6.1.4.1.21367.2005.3.7" + }, + "subject" : { + }, + "type" : { + "coding" : [ + { + "system" : "http://loinc.org", + "code" : "34108-1", + "display" : "Outpatient Note" + } + ] + }, + "agent" : [ + { + "who": { + "reference": "#a1" + } + }, + { + "who": { + "reference": "#a2" + } + } + ], + "created" : "2005-12-24T09:35:00+11:00", + "status" : "current", + "description" : "Physical", + "context" : { + "event" : [ + { + "coding" : [ + { + "system" : "http://ihe.net/xds/connectathon/eventCodes", + "code" : "T-D8200", + "display" : "Arm" + } + ] + } + ], + "period" : { + "start" : "2004-12-23T08:00:00", + "end" : "2004-12-23T08:01:00" + }, + "facilityType" : { + "coding" : [ + { + "system" : "http://www.ihe.net/xds/connectathon/healthcareFacilityTypeCodes", + "code" : "Outpatient", + "display" : "Outpatient" + } + ] + } + } +} diff --git a/hapi-fhir-jpaserver-example/pom.xml b/hapi-fhir-jpaserver-example/pom.xml index b94187107e7..bf4581e8c78 100644 --- a/hapi-fhir-jpaserver-example/pom.xml +++ b/hapi-fhir-jpaserver-example/pom.xml @@ -10,7 +10,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 1c1ba87ebd8..689103e4ca2 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 58af562ca5a..923b2d38e51 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu/pom.xml b/hapi-fhir-structures-dstu/pom.xml index d0830826102..cf739d6e948 100644 --- a/hapi-fhir-structures-dstu/pom.xml +++ b/hapi-fhir-structures-dstu/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index 4228515e7ff..86cf1512304 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index 77f9969e47c..4a23a6db906 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index b2302ab102d..187ad02f9e8 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/utils/NarrativeGenerator.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/utils/NarrativeGenerator.java index 47666433107..a447ed064a6 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/utils/NarrativeGenerator.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/utils/NarrativeGenerator.java @@ -1,8 +1,18 @@ package org.hl7.fhir.dstu3.utils; +import org.hl7.fhir.dstu3.context.IWorkerContext; +import org.hl7.fhir.dstu3.model.DomainResource; + public class NarrativeGenerator { - public static String describeSystem(String theSystem) { + public NarrativeGenerator(String theS, String theS1, IWorkerContext theContext) { + + } + + public void generate(DomainResource theR) { + } + + public static String describeSystem(String theSystem) { return theSystem; } diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 6d11955bb56..ea2f6e3ec2e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 8cbe4bf6d15..7183a9d49a0 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java index 270559103d1..31bd506f2cd 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java @@ -361,7 +361,7 @@ public class ProfileUtilities extends TranslatingUtilities { // we actually delegate the work to a subroutine so we can re-enter it with a different cursors processPaths("", derived.getSnapshot(), base.getSnapshot(), derived.getDifferential(), baseCursor, diffCursor, base.getSnapshot().getElement().size()-1, - derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, derived.getId(), null, null, false, base.getUrl(), null, false); + derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, derived.getId(), null, null, false, base.getUrl(), null, false, null); if (!derived.getSnapshot().getElementFirstRep().getType().isEmpty()) throw new Error("type on first snapshot element for "+derived.getSnapshot().getElementFirstRep().getPath()+" in "+derived.getUrl()+" from "+base.getUrl()); updateMaps(base, derived); @@ -379,7 +379,7 @@ public class ProfileUtilities extends TranslatingUtilities { for (ElementDefinition e : derived.getDifferential().getElement()) { if (!e.hasUserData(GENERATED_IN_SNAPSHOT)) { System.out.println("Error in snapshot generation: Differential for "+derived.getUrl()+" with id: " + e.getId()+" has an element that is not marked with a snapshot match"); - throw new DefinitionException("Snapshot for "+derived.getUrl()+" does not contain differential element with id: " + e.getId()); + throw new DefinitionException("Snapshot for "+derived.getUrl()+" does not contain an element that matches an existing differential element that has id: " + e.getId()); // System.out.println("**BAD Differential element: " + profileName + ":" + e.getId()); } } @@ -468,7 +468,7 @@ public class ProfileUtilities extends TranslatingUtilities { * @throws Exception */ private ElementDefinition processPaths(String indent, StructureDefinitionSnapshotComponent result, StructureDefinitionSnapshotComponent base, StructureDefinitionDifferentialComponent differential, int baseCursor, int diffCursor, int baseLimit, - int diffLimit, String url, String profileName, String contextPathSrc, String contextPathDst, boolean trimDifferential, String contextName, String resultPathBase, boolean slicingDone) throws DefinitionException, FHIRException { + int diffLimit, String url, String profileName, String contextPathSrc, String contextPathDst, boolean trimDifferential, String contextName, String resultPathBase, boolean slicingDone, ElementDefinition redirector) throws DefinitionException, FHIRException { if (DEBUG) System.out.println(indent+"PP @ "+resultPathBase+": base = "+baseCursor+" to "+baseLimit+", diff = "+diffCursor+" to "+diffLimit+" (slicing = "+slicingDone+")"); ElementDefinition res = null; @@ -476,7 +476,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (baseCursor <= baseLimit) { // get the current focus of the base, and decide what to do ElementDefinition currentBase = base.getElement().get(baseCursor); - String cpath = fixedPath(contextPathSrc, currentBase.getPath()); + String cpath = fixedPathSource(contextPathSrc, currentBase.getPath(), redirector); if (DEBUG) System.out.println(indent+" - "+cpath+": base = "+baseCursor+" to "+baseLimit+", diff = "+diffCursor+" to "+diffLimit+" (slicingDone = "+slicingDone+")"); List diffMatches = getDiffMatches(differential, cpath, diffCursor, diffLimit, profileName, url); // get a list of matching elements in scope @@ -486,7 +486,7 @@ public class ProfileUtilities extends TranslatingUtilities { if (diffMatches.isEmpty()) { // the differential doesn't say anything about this item // so we just copy it in ElementDefinition outcome = updateURLs(url, currentBase.copy()); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); updateFromBase(outcome, currentBase); markDerived(outcome); if (resultPathBase == null) @@ -510,7 +510,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), cpath+".")) diffCursor++; processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start, dt.getSnapshot().getElement().size()-1, - diffCursor-1, url, profileName, cpath, outcome.getPath(), trimDifferential, contextName, resultPathBase, false); + diffCursor-1, url, profileName, cpath, outcome.getPath(), trimDifferential, contextName, resultPathBase, false, null); } baseCursor++; } else if (diffMatches.size() == 1 && (slicingDone || !(diffMatches.get(0).hasSlicing() || (isExtension(diffMatches.get(0)) && diffMatches.get(0).hasSliceName())))) {// one matching element in the differential @@ -541,7 +541,7 @@ public class ProfileUtilities extends TranslatingUtilities { template = overWriteWithCurrent(template, currentBase); ElementDefinition outcome = updateURLs(url, template); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); res = outcome; updateFromBase(outcome, currentBase); if (diffMatches.get(0).hasSliceName()) @@ -590,14 +590,14 @@ public class ProfileUtilities extends TranslatingUtilities { int nbl = nbc; while (nbl < base.getElement().size() && base.getElement().get(nbl).getPath().startsWith(tgt.getPath()+".")) nbl++; - processPaths(indent+" ", result, base, differential, nbc, start - 1, nbl-1, diffCursor - 1, url, profileName, tgt.getPath(), diffMatches.get(0).getPath(), trimDifferential, contextName, resultPathBase, false); + processPaths(indent+" ", result, base, differential, nbc, start - 1, nbl-1, diffCursor - 1, url, profileName, tgt.getPath(), diffMatches.get(0).getPath(), trimDifferential, contextName, resultPathBase, false, outcome); } else { StructureDefinition dt = getProfileForDataType(outcome.getType().get(0)); if (dt == null) throw new DefinitionException(diffMatches.get(0).getPath()+" has children ("+differential.getElement().get(diffCursor).getPath()+") for type "+typeCode(outcome.getType())+" in profile "+profileName+", but can't find type"); contextName = dt.getUrl(); processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start, dt.getSnapshot().getElement().size()-1, - diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false); + diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, null); } } } @@ -617,12 +617,12 @@ public class ProfileUtilities extends TranslatingUtilities { if (diffMatches.size() > 1 && diffMatches.get(0).hasSlicing() && (nbl > baseCursor || differential.getElement().indexOf(diffMatches.get(1)) > differential.getElement().indexOf(diffMatches.get(0))+1)) { int ndc = differential.getElement().indexOf(diffMatches.get(0)); int ndl = findEndOfElement(differential, ndc); - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true).setSlicing(diffMatches.get(0).getSlicing()); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, null).setSlicing(diffMatches.get(0).getSlicing()); start++; } else { // we're just going to accept the differential slicing at face value ElementDefinition outcome = updateURLs(url, currentBase.copy()); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); updateFromBase(outcome, currentBase); if (!diffMatches.get(0).hasSlicing()) @@ -658,7 +658,7 @@ public class ProfileUtilities extends TranslatingUtilities { continue; }*/ // now we process the base scope repeatedly for each instance of the item in the differential list - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, null); } // ok, done with that - next in the base list baseCursor = nbl+1; @@ -680,7 +680,7 @@ public class ProfileUtilities extends TranslatingUtilities { // copy across the currentbase, and all of its children and siblings while (baseCursor < base.getElement().size() && base.getElement().get(baseCursor).getPath().startsWith(path)) { ElementDefinition outcome = updateURLs(url, base.getElement().get(baseCursor).copy()); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); if (!outcome.getPath().startsWith(resultPathBase)) throw new DefinitionException("Adding wrong path in profile " + profileName + ": "+outcome.getPath()+" vs " + resultPathBase); result.getElement().add(outcome); // so we just copy it in @@ -704,9 +704,9 @@ public class ProfileUtilities extends TranslatingUtilities { throw new DefinitionException("Slicing rules on differential ("+summariseSlicing(dSlice)+") do not match those on base ("+summariseSlicing(bSlice)+") - rule @ "+path+" ("+contextName+")"); } ElementDefinition outcome = updateURLs(url, currentBase.copy()); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); updateFromBase(outcome, currentBase); - if (diffMatches.get(0).hasSlicing() /*&& !isExtension*/) { + if (diffMatches.get(0).hasSlicing() || !diffMatches.get(0).hasSliceName()) { updateFromSlicing(outcome.getSlicing(), diffMatches.get(0).getSlicing()); updateFromDefinition(outcome, diffMatches.get(0), profileName, closed, url); // if there's no slice, we don't want to update the unsliced description } else if (!diffMatches.get(0).hasSliceName()) @@ -721,7 +721,7 @@ public class ProfileUtilities extends TranslatingUtilities { int nbl = findEndOfElement(base, baseCursor); int ndc = differential.getElement().indexOf(diffMatches.get(0)); int ndl = findEndOfElement(differential, ndc); - processPaths(indent+" ", result, base, differential, baseCursor+1, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true); + processPaths(indent+" ", result, base, differential, baseCursor+1, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, null); // throw new Error("Not done yet"); } @@ -731,7 +731,7 @@ public class ProfileUtilities extends TranslatingUtilities { baseCursor = base.getElement().indexOf(baseItem); outcome = updateURLs(url, baseItem.copy()); updateFromBase(outcome, currentBase); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); outcome.setSlicing(null); if (!outcome.getPath().startsWith(resultPathBase)) throw new DefinitionException("Adding wrong path"); @@ -743,7 +743,7 @@ public class ProfileUtilities extends TranslatingUtilities { int ndc = differential.getElement().indexOf(diffMatches.get(diffpos)); int ndl = findEndOfElement(differential, ndc); // now we process the base scope repeatedly for each instance of the item in the differential list - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, diffpos), contextPathSrc, contextPathDst, closed, contextName, resultPathBase, true); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, diffpos), contextPathSrc, contextPathDst, closed, contextName, resultPathBase, true, null); // ok, done with that - now set the cursors for if this is the end baseCursor = nbl; diffCursor = ndl+1; @@ -754,7 +754,7 @@ public class ProfileUtilities extends TranslatingUtilities { // just copy any children on the base while (baseCursor < base.getElement().size() && base.getElement().get(baseCursor).getPath().startsWith(path) && !base.getElement().get(baseCursor).getPath().equals(path)) { outcome = updateURLs(url, base.getElement().get(baseCursor).copy()); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); if (!outcome.getPath().startsWith(resultPathBase)) throw new DefinitionException("Adding wrong path"); result.getElement().add(outcome); @@ -778,7 +778,7 @@ public class ProfileUtilities extends TranslatingUtilities { throw new DefinitionException("Named items are out of order in the slice"); outcome = updateURLs(url, currentBase.copy()); // outcome = updateURLs(url, diffItem.copy()); - outcome.setPath(fixedPath(contextPathDst, outcome.getPath())); + outcome.setPath(fixedPathDest(contextPathDst, outcome.getPath(), redirector)); updateFromBase(outcome, currentBase); outcome.setSlicing(null); if (!outcome.getPath().startsWith(resultPathBase)) @@ -807,7 +807,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), diffMatches.get(0).getPath()+".")) diffCursor++; processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start-1, dt.getSnapshot().getElement().size()-1, - diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false); + diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, null); } else if (outcome.getType().get(0).getCode().equals("Extension")) { // Force URL to appear if we're dealing with an extension. (This is a kludge - may need to drill down in other cases where we're slicing and the type has a profile declaration that could be setting the fixed value) StructureDefinition dt = getProfileForDataType(outcome.getType().get(0)); @@ -815,7 +815,7 @@ public class ProfileUtilities extends TranslatingUtilities { // We only want the children that aren't the root if (extEd.getPath().contains(".")) { ElementDefinition extUrlEd = updateURLs(url, extEd.copy()); - extUrlEd.setPath(fixedPath(outcome.getPath(), extUrlEd.getPath())); + extUrlEd.setPath(fixedPathDest(outcome.getPath(), extUrlEd.getPath(), null)); // updateFromBase(extUrlEd, currentBase); markDerived(extUrlEd); result.getElement().add(extUrlEd); @@ -997,12 +997,28 @@ public class ProfileUtilities extends TranslatingUtilities { } - private String fixedPath(String contextPath, String pathSimple) { + private String fixedPathSource(String contextPath, String pathSimple, ElementDefinition redirector) { if (contextPath == null) return pathSimple; - return contextPath+"."+pathSimple.substring(pathSimple.indexOf(".")+1); + String ptail = pathSimple.substring(pathSimple.indexOf(".")+1); + if (redirector != null) + return contextPath+"."+tail(redirector.getPath())+"."+ptail.substring(ptail.indexOf(".")+1); + else + return contextPath+"."+ptail; } - + + private String fixedPathDest(String contextPath, String pathSimple, ElementDefinition redirector) { + if (contextPath == null) + return pathSimple; + String ptail = pathSimple.substring(pathSimple.indexOf(".")+1); + if (redirector != null) { + ptail = ptail.substring(ptail.indexOf(".")+1); +// ptail = ptail.substring(ptail.indexOf(".")+1); + return contextPath+"."+/*tail(redirector.getPath())+"."+*/ptail; + } else + return contextPath+"."+ptail; + } + private StructureDefinition getProfileForDataType(TypeRefComponent type) { StructureDefinition sd = null; @@ -1125,7 +1141,7 @@ public class ProfileUtilities extends TranslatingUtilities { private boolean ruleMatches(SlicingRules diff, SlicingRules base) { - return (diff == null) || (base == null) || (diff == base) || (diff == SlicingRules.OPEN) || + return (diff == null) || (base == null) || (diff == base) || (base == SlicingRules.OPEN) || ((diff == SlicingRules.OPENATEND && base == SlicingRules.CLOSED)); } @@ -1221,19 +1237,21 @@ public class ProfileUtilities extends TranslatingUtilities { // Before applying changes, apply them to what's in the profile // TODO: follow Chris's rules - StructureDefinition profile = source.getType().size() == 1 && source.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, source.getTypeFirstRep().getProfile()) : null; - if (profile != null) { - ElementDefinition e = profile.getSnapshot().getElement().get(0); - base.setDefinition(e.getDefinition()); - base.setShort(e.getShort()); - if (e.hasCommentElement()) - base.setCommentElement(e.getCommentElement()); - if (e.hasRequirementsElement()) - base.setRequirementsElement(e.getRequirementsElement()); - base.getAlias().clear(); - base.getAlias().addAll(e.getAlias()); - base.getMapping().clear(); - base.getMapping().addAll(e.getMapping()); + if (base.hasSliceName()) { + StructureDefinition profile = source.getType().size() == 1 && source.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, source.getTypeFirstRep().getProfile()) : null; + if (profile != null) { + ElementDefinition e = profile.getSnapshot().getElement().get(0); + base.setDefinition(e.getDefinition()); + base.setShort(e.getShort()); + if (e.hasCommentElement()) + base.setCommentElement(e.getCommentElement()); + if (e.hasRequirementsElement()) + base.setRequirementsElement(e.getRequirementsElement()); + base.getAlias().clear(); + base.getAlias().addAll(e.getAlias()); + base.getMapping().clear(); + base.getMapping().addAll(e.getMapping()); + } } if (derived != null) { @@ -2817,7 +2835,14 @@ public class ProfileUtilities extends TranslatingUtilities { return i; } if (path.startsWith(p+".") && snapshot.get(i).hasContentReference()) { - actual = base+(snapshot.get(i).getContentReference().substring(1)+"."+path.substring(p.length()+1)).substring(prefixLength); + String ref = snapshot.get(i).getContentReference(); + if (ref.substring(1, 2).toUpperCase().equals(ref.substring(1,2))) + actual = base+(ref.substring(1)+"."+path.substring(p.length()+1)).substring(prefixLength); + else { + // Older versions of FHIR (e.g. 2016May) had reference of the style #parameter instead of #Parameters.parameter, so we have to handle that + actual = base+(path.substring(0, path.indexOf(".")+1) + ref.substring(1)+"."+path.substring(p.length()+1)).substring(prefixLength); + } + i = 0; } } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/BaseWorkerContext.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/BaseWorkerContext.java index 8a0506d0d8a..7b2fc3125be 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/BaseWorkerContext.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/BaseWorkerContext.java @@ -266,6 +266,7 @@ public abstract class BaseWorkerContext implements IWorkerContext { if (canRunWithoutTerminology) { noTerminologyServer = true; log("==============!! Running without terminology server !!=============="); + log("Error: "+e.getMessage()); return false; } else throw new TerminologyServiceException(e); @@ -772,9 +773,8 @@ public abstract class BaseWorkerContext implements IWorkerContext { } } - public void initTS(String cachePath, String tsServer) throws Exception { + public void initTS(String cachePath) throws Exception { cache = cachePath; - this.tsServer = tsServer; expansionCache = new ValueSetExpansionCache(this, null); validationCachePath = Utilities.path(cachePath, "validation.cache"); try { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java index 5b228b6de51..0332fa21e89 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java @@ -179,11 +179,16 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon loadBytes(name, stream); } - public String connectToTSServer(String url) throws URISyntaxException { - txServer = new FHIRToolingClient(url); - txServer.setTimeout(30000); - return txServer.getCapabilitiesStatementQuick().getSoftware().getVersion(); - } + public String connectToTSServer(String url) throws URISyntaxException { + txServer = new FHIRToolingClient(url); + txServer.setTimeout(30000); + return txServer.getCapabilitiesStatementQuick().getSoftware().getVersion(); + } + + public String connectToTSServer(FHIRToolingClient client) throws URISyntaxException { + txServer = client; + return txServer.getCapabilitiesStatementQuick().getSoftware().getVersion(); + } public void loadFromFile(InputStream stream, String name, IContextResourceLoader loader) throws IOException, FHIRException { Resource f; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Element.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Element.java index 2965e2b4b5d..f4954eccf84 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Element.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Element.java @@ -1,743 +1,737 @@ -package org.hl7.fhir.r4.elementmodel; - -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.commons.lang3.Validate; -import org.hl7.fhir.r4.elementmodel.Element.ElementSortComparator; -import org.hl7.fhir.r4.elementmodel.Element.ICodingImpl; -import org.hl7.fhir.r4.model.Base; -import org.hl7.fhir.r4.model.Coding; -import org.hl7.fhir.r4.model.ElementDefinition; -import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent; -import org.hl7.fhir.r4.model.Enumerations.BindingStrength; -import org.hl7.fhir.r4.model.ICoding; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.StructureDefinition; -import org.hl7.fhir.r4.model.Type; -import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent; -import org.hl7.fhir.r4.terminologies.ValueSetExpander.ValueSetExpansionOutcome; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.utilities.xhtml.XhtmlComposer; -import org.hl7.fhir.utilities.xhtml.XhtmlNode; - -/** - * This class represents the underlying reference model of FHIR - * - * A resource is nothing but a set of elements, where every element has a - * name, maybe a stated type, maybe an id, and either a value or child elements - * (one or the other, but not both or neither) - * - * @author Grahame Grieve - * - */ -public class Element extends Base { - - - public enum SpecialElement { - CONTAINED, BUNDLE_ENTRY, BUNDLE_OUTCOME, PARAMETER; - - public static SpecialElement fromProperty(Property property) { - if (property.getStructure().getIdElement().getIdPart().equals("Parameters")) - return PARAMETER; - if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("resource")) - return BUNDLE_ENTRY; - if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("outcome")) - return BUNDLE_OUTCOME; - if (property.getName().equals("contained")) - return CONTAINED; - throw new Error("Unknown resource containing a native resource: "+property.getDefinition().getId()); - } - } - - private List comments;// not relevant for production, but useful in documentation - private String name; - private String type; - private String value; - private int index = -1; - private List children; - private Property property; - private Property elementProperty; // this is used when special is set to true - it tracks the underlying element property which is used in a few places - private int line; - private int col; - private SpecialElement special; - private XhtmlNode xhtml; // if this is populated, then value will also hold the string representation - - public Element(String name) { - super(); - this.name = name; - } - - public Element(Element other) { - super(); - name = other.name; - type = other.type; - property = other.property; - elementProperty = other.elementProperty; - special = other.special; - } - - public Element(String name, Property property) { - super(); - this.name = name; - this.property = property; - } - - public Element(String name, Property property, String type, String value) { - super(); - this.name = name; - this.property = property; - this.type = type; - this.value = value; - } - - public void updateProperty(Property property, SpecialElement special, Property elementProperty) { - this.property = property; - this.elementProperty = elementProperty; - this.special = special; - } - - public SpecialElement getSpecial() { - return special; - } - - public String getName() { - return name; - } - - public String getType() { - if (type == null) - return property.getType(name); - else - return type; - } - - public String getValue() { - return value; - } - - public boolean hasChildren() { - return !(children == null || children.isEmpty()); - } - - public List getChildren() { - if (children == null) - children = new ArrayList(); - return children; - } - - public boolean hasComments() { - return !(comments == null || comments.isEmpty()); - } - - public List getComments() { - if (comments == null) - comments = new ArrayList(); - return comments; - } - - public Property getProperty() { - return property; - } - - public void setValue(String value) { - this.value = value; - } - - public void setType(String type) { - this.type = type; - - } - - public boolean hasValue() { - return value != null; - } - - public List getChildrenByName(String name) { - List res = new ArrayList(); - if (hasChildren()) { - for (Element child : children) - if (name.equals(child.getName())) - res.add(child); - } - return res; - } - - public void numberChildren() { - if (children == null) - return; - - String last = ""; - int index = 0; - for (Element child : children) { - if (child.getProperty().isList()) { - if (last.equals(child.getName())) { - index++; - } else { - last = child.getName(); - index = 0; - } - child.index = index; - } else { - child.index = -1; - } - child.numberChildren(); - } - } - - public int getIndex() { - return index; - } - - public boolean hasIndex() { - return index > -1; - } - - public void setIndex(int index) { - this.index = index; - } - - public String getChildValue(String name) { - if (children == null) - return null; - for (Element child : children) { - if (name.equals(child.getName())) - return child.getValue(); - } - return null; - } - - public void setChildValue(String name, String value) { - if (children == null) - children = new ArrayList(); - for (Element child : children) { - if (name.equals(child.getName())) { - if (!child.isPrimitive()) - throw new Error("Cannot set a value of a non-primitive type ("+name+" on "+this.getName()+")"); - child.setValue(value); - } - } - try { - setProperty(name.hashCode(), name, new StringType(value)); - } catch (FHIRException e) { - throw new Error(e); - } - } - - public List getChildren(String name) { - List res = new ArrayList(); - if (children != null) - for (Element child : children) { - if (name.equals(child.getName())) - res.add(child); - } - return res; - } - - public boolean hasType() { - if (type == null) - return property.hasType(name); - else - return true; - } - - @Override - public String fhirType() { - return getType(); - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - if (isPrimitive() && (hash == "value".hashCode()) && !Utilities.noString(value)) { -// String tn = getType(); -// throw new Error(tn+" not done yet"); - Base[] b = new Base[1]; - b[0] = new StringType(value); - return b; - } - - List result = new ArrayList(); - if (children != null) { - for (Element child : children) { - if (child.getName().equals(name)) - result.add(child); - if (child.getName().startsWith(name) && child.getProperty().isChoice() && child.getProperty().getName().equals(name+"[x]")) - result.add(child); - } - } - if (result.isEmpty() && checkValid) { -// throw new FHIRException("not determined yet"); - } - return result.toArray(new Base[result.size()]); - } - - @Override - protected void listChildren(List childProps) { - if (children != null) { - Map map = new HashMap(); - for (Element c : children) { - org.hl7.fhir.r4.model.Property p = map.get(c.getName()); - if (p == null) { - p = new org.hl7.fhir.r4.model.Property(c.getName(), c.fhirType(), c.getProperty().getDefinition().getDefinition(), c.getProperty().getDefinition().getMin(), maxToInt(c.getProperty().getDefinition().getMax()), c); - childProps.add(p); - map.put(c.getName(), p); - - } else - p.getValues().add(c); - } - } - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - if (isPrimitive() && (hash == "value".hashCode())) { - this.value = castToString(value).asStringValue(); - return this; - } - if ("xhtml".equals(getType()) && (hash == "value".hashCode())) { - this.xhtml = castToXhtml(value); - this.value = castToXhtmlString(value); - return this; - } - - if (!value.isPrimitive() && !(value instanceof Element)) { - if (isDataType(value)) - value = convertToElement(property.getChild(name), value); - else - throw new FHIRException("Cannot set property "+name+" on "+this.name+" - value is not a primitive type ("+value.fhirType()+") or an ElementModel type"); - } - - if (children == null) - children = new ArrayList(); - Element childForValue = null; - - // look through existing children - for (Element child : children) { - if (child.getName().equals(name)) { - if (!child.isList()) { - childForValue = child; - break; - } else { - Element ne = new Element(child); - children.add(ne); - numberChildren(); - childForValue = ne; - break; - } - } - } - - if (childForValue == null) - for (Property p : property.getChildProperties(this.name, type)) { - if (p.getName().equals(name) || p.getName().equals(name+"[x]")) { - Element ne = new Element(name, p); - children.add(ne); - childForValue = ne; - break; - } - } - - if (childForValue == null) - throw new Error("Cannot set property "+name+" on "+this.name); - else if (value.isPrimitive()) { - if (childForValue.property.getName().endsWith("[x]")) - childForValue.name = name+Utilities.capitalize(value.fhirType()); - childForValue.setValue(value.primitiveValue()); - } else { - Element ve = (Element) value; - childForValue.type = ve.getType(); - if (childForValue.property.getName().endsWith("[x]")) - childForValue.name = name+Utilities.capitalize(childForValue.type); - else if (value.isResource()) { - if (childForValue.elementProperty == null) - childForValue.elementProperty = childForValue.property; - childForValue.property = ve.property; - childForValue.special = SpecialElement.BUNDLE_ENTRY; - } - if (ve.children != null) { - if (childForValue.children == null) - childForValue.children = new ArrayList(); - else - childForValue.children.clear(); - childForValue.children.addAll(ve.children); - } - } - return childForValue; - } - - private Base convertToElement(Property prop, Base v) throws FHIRException { - return new ObjectConverter(property.getContext()).convert(prop, (Type) v); - } - - private boolean isDataType(Base v) { - return v instanceof Type && property.getContext().getTypeNames().contains(v.fhirType()); - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - if (isPrimitive() && (hash == "value".hashCode())) { - return new StringType(value); - } - - if (children == null) - children = new ArrayList(); - - // look through existing children - for (Element child : children) { - if (child.getName().equals(name)) { - if (!child.isList()) { - return child; - } else { - Element ne = new Element(child); - children.add(ne); - numberChildren(); - return ne; - } - } - } - - for (Property p : property.getChildProperties(this.name, type)) { - if (p.getName().equals(name)) { - Element ne = new Element(name, p); - children.add(ne); - return ne; - } - } - - throw new Error("Unrecognised name "+name+" on "+this.name); - } - - private int maxToInt(String max) { - if (max.equals("*")) - return Integer.MAX_VALUE; - else - return Integer.parseInt(max); - } - - @Override - public boolean isPrimitive() { - return type != null ? property.isPrimitive(type) : property.isPrimitive(property.getType(name)); - } - - @Override - public boolean isResource() { - return property.isResource(); - } - - - @Override - public boolean hasPrimitiveValue() { - return property.isPrimitiveName(name) || property.IsLogicalAndHasPrimitiveValue(name); - } - - - @Override - public String primitiveValue() { - if (isPrimitive()) - return value; - else { - if (hasPrimitiveValue() && children != null) { - for (Element c : children) { - if (c.getName().equals("value")) - return c.primitiveValue(); - } - } - return null; - } - } - - // for the validator - public int line() { - return line; - } - - public int col() { - return col; - } - - public Element markLocation(int line, int col) { - this.line = line; - this.col = col; - return this; - } - - public void markValidation(StructureDefinition profile, ElementDefinition definition) { - } - - public Element getNamedChild(String name) { - if (children == null) - return null; - Element result = null; - for (Element child : children) { - if (child.getName().equals(name)) { - if (result == null) - result = child; - else - throw new Error("Attempt to read a single element when there is more than one present ("+name+")"); - } - } - return result; - } - - public void getNamedChildren(String name, List list) { - if (children != null) - for (Element child : children) - if (child.getName().equals(name)) - list.add(child); - } - - public String getNamedChildValue(String name) { - Element child = getNamedChild(name); - return child == null ? null : child.value; - } - - public void getNamedChildrenWithWildcard(String string, List values) { - Validate.isTrue(string.endsWith("[x]")); - - String start = string.substring(0, string.length() - 3); - if (children != null) { - for (Element child : children) { - if (child.getName().startsWith(start)) { - values.add(child); - } - } - } - } - - - public XhtmlNode getXhtml() { - return xhtml; - } - - public Element setXhtml(XhtmlNode xhtml) { - this.xhtml = xhtml; - return this; - } - - @Override - public boolean isEmpty() { - if (isNotBlank(value)) { - return false; - } - for (Element next : getChildren()) { - if (!next.isEmpty()) { - return false; - } - } - return true; - } - - public Property getElementProperty() { - return elementProperty; - } - - public boolean hasElementProperty() { - return elementProperty != null; - } - - public boolean hasChild(String name) { - return getNamedChild(name) != null; - } - - @Override - public String toString() { - return name+"="+fhirType() + "["+(children == null || hasValue() ? value : Integer.toString(children.size())+" children")+"]"; - } - - @Override - public String getIdBase() { - return getChildValue("id"); - } - - @Override - public void setIdBase(String value) { - setChildValue("id", value); - } - - -// @Override -// public boolean equalsDeep(Base other) { -// if (!super.equalsDeep(other)) -// return false; -// -// } -// -// @Override -// public boolean equalsShallow(Base other) { -// if (!super.equalsShallow(other)) -// return false; -// } - - public Type asType() throws FHIRException { - return new ObjectConverter(property.getContext()).convertToType(this); - } - - @Override - public boolean isMetadataBased() { - return true; - } - - public boolean isList() { - if (elementProperty != null) - return elementProperty.isList(); - else - return property.isList(); - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - Property p = property.getChildSimpleName(this.name, name); - if (p != null) { - Set types = new HashSet(); - for (TypeRefComponent tr : p.getDefinition().getType()) { - types.add(tr.getCode()); - } - return types.toArray(new String[]{}); - } - return super.getTypesForProperty(hash, name); - - } - - public void sort() { - if (children != null) { - List remove = new ArrayList(); - for (Element child : children) { - child.sort(); - if (child.isEmpty()) - remove.add(child); - } - children.removeAll(remove); - java.util.Collections.sort(children, new ElementSortComparator(this, this.property)); - } - } - - public class ElementSortComparator implements Comparator { - private List children; - public ElementSortComparator(Element e, Property property) { - String tn = e.getType(); - StructureDefinition sd = property.getContext().fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+tn); - if (sd != null && !sd.getAbstract()) - children = sd.getSnapshot().getElement(); - else - children = property.getStructure().getSnapshot().getElement(); - } - - @Override - public int compare(Element e0, Element e1) { - int i0 = find(e0); - int i1 = find(e1); - return Integer.compare(i0, i1); - } - private int find(Element e0) { - int i = e0.elementProperty != null ? children.indexOf(e0.elementProperty.getDefinition()) : children.indexOf(e0.property.getDefinition()); - return i; - } - - } - - public class ICodingImpl implements ICoding { - private String system; - private String version; - private String code; - private String display; - private boolean doesSystem; - private boolean doesVersion; - private boolean doesCode; - private boolean doesDisplay; - public ICodingImpl(boolean doesCode, boolean doesSystem, boolean doesVersion, boolean doesDisplay) { - super(); - this.doesCode = doesCode; - this.doesSystem = doesSystem; - this.doesVersion = doesVersion; - this.doesDisplay = doesDisplay; - } - public String getSystem() { - return system; - } - public String getVersion() { - return version; - } - public String getCode() { - return code; - } - public String getDisplay() { - return display; - } - public boolean hasSystem() { - return !Utilities.noString(system); - } - public boolean hasVersion() { - return !Utilities.noString(version); - } - public boolean hasCode() { - return !Utilities.noString(code); - } - public boolean hasDisplay() { - return !Utilities.noString(display); - } - public boolean supportsSystem() { - return doesSystem; - } - public boolean supportsVersion() { - return doesVersion; - } - public boolean supportsCode() { - return doesCode; - } - public boolean supportsDisplay() { - return doesDisplay; - } - } - - public ICoding getAsICoding() throws FHIRException { - if ("code".equals(fhirType())) { - if (property.getDefinition().getBinding().getStrength() != BindingStrength.REQUIRED) - return null; - ICodingImpl c = new ICodingImpl(true, true, false, false); - c.code = primitiveValue(); - ValueSetExpansionOutcome vse = property.getContext().expandVS(property.getDefinition().getBinding(), true, false); - if (vse.getValueset() == null) - return null; - for (ValueSetExpansionContainsComponent cc : vse.getValueset().getExpansion().getContains()) { - if (cc.getCode().equals(c.code)) { - c.system = cc.getSystem(); - if (cc.hasVersion()) { - c.doesVersion = true; - c.version = cc.getVersion(); - } - if (cc.hasDisplay()) { - c.doesDisplay = true; - c.display = cc.getDisplay(); - } - } - } - if (c.system == null) - return null; - return c; - } else if ("Coding".equals(fhirType())) { - ICodingImpl c = new ICodingImpl(true, true, true, true); - c.system = getNamedChildValue("system"); - c.code = getNamedChildValue("code"); - c.display = getNamedChildValue("display"); - c.version = getNamedChildValue("version"); - return c; - } else if ("Quantity".equals(fhirType())) { - ICodingImpl c = new ICodingImpl(true, true, false, false); - c.system = getNamedChildValue("system"); - c.code = getNamedChildValue("code"); - return c; - } else - return null; - } - - -} +package org.hl7.fhir.r4.elementmodel; + +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +import java.io.IOException; +import java.util.*; + +import org.apache.commons.lang3.Validate; +import org.hl7.fhir.r4.elementmodel.Element.ElementSortComparator; +import org.hl7.fhir.r4.elementmodel.Element.ICodingImpl; +import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.ElementDefinition; +import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent; +import org.hl7.fhir.r4.model.Enumerations.BindingStrength; +import org.hl7.fhir.r4.model.ICoding; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.model.Type; +import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent; +import org.hl7.fhir.r4.terminologies.ValueSetExpander.ValueSetExpansionOutcome; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xhtml.XhtmlComposer; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; + +/** + * This class represents the underlying reference model of FHIR + * + * A resource is nothing but a set of elements, where every element has a + * name, maybe a stated type, maybe an id, and either a value or child elements + * (one or the other, but not both or neither) + * + * @author Grahame Grieve + * + */ +public class Element extends Base { + + + public enum SpecialElement { + CONTAINED, BUNDLE_ENTRY, BUNDLE_OUTCOME, PARAMETER; + + public static SpecialElement fromProperty(Property property) { + if (property.getStructure().getIdElement().getIdPart().equals("Parameters")) + return PARAMETER; + if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("resource")) + return BUNDLE_ENTRY; + if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("outcome")) + return BUNDLE_OUTCOME; + if (property.getName().equals("contained")) + return CONTAINED; + throw new Error("Unknown resource containing a native resource: "+property.getDefinition().getId()); + } + } + + private List comments;// not relevant for production, but useful in documentation + private String name; + private String type; + private String value; + private int index = -1; + private List children; + private Property property; + private Property elementProperty; // this is used when special is set to true - it tracks the underlying element property which is used in a few places + private int line; + private int col; + private SpecialElement special; + private XhtmlNode xhtml; // if this is populated, then value will also hold the string representation + + public Element(String name) { + super(); + this.name = name; + } + + public Element(Element other) { + super(); + name = other.name; + type = other.type; + property = other.property; + elementProperty = other.elementProperty; + special = other.special; + } + + public Element(String name, Property property) { + super(); + this.name = name; + this.property = property; + } + + public Element(String name, Property property, String type, String value) { + super(); + this.name = name; + this.property = property; + this.type = type; + this.value = value; + } + + public void updateProperty(Property property, SpecialElement special, Property elementProperty) { + this.property = property; + this.elementProperty = elementProperty; + this.special = special; + } + + public SpecialElement getSpecial() { + return special; + } + + public String getName() { + return name; + } + + public String getType() { + if (type == null) + return property.getType(name); + else + return type; + } + + public String getValue() { + return value; + } + + public boolean hasChildren() { + return !(children == null || children.isEmpty()); + } + + public List getChildren() { + if (children == null) + children = new ArrayList(); + return children; + } + + public boolean hasComments() { + return !(comments == null || comments.isEmpty()); + } + + public List getComments() { + if (comments == null) + comments = new ArrayList(); + return comments; + } + + public Property getProperty() { + return property; + } + + public void setValue(String value) { + this.value = value; + } + + public void setType(String type) { + this.type = type; + + } + + public boolean hasValue() { + return value != null; + } + + public List getChildrenByName(String name) { + List res = new ArrayList(); + if (hasChildren()) { + for (Element child : children) + if (name.equals(child.getName())) + res.add(child); + } + return res; + } + + public void numberChildren() { + if (children == null) + return; + + String last = ""; + int index = 0; + for (Element child : children) { + if (child.getProperty().isList()) { + if (last.equals(child.getName())) { + index++; + } else { + last = child.getName(); + index = 0; + } + child.index = index; + } else { + child.index = -1; + } + child.numberChildren(); + } + } + + public int getIndex() { + return index; + } + + public boolean hasIndex() { + return index > -1; + } + + public void setIndex(int index) { + this.index = index; + } + + public String getChildValue(String name) { + if (children == null) + return null; + for (Element child : children) { + if (name.equals(child.getName())) + return child.getValue(); + } + return null; + } + + public void setChildValue(String name, String value) { + if (children == null) + children = new ArrayList(); + for (Element child : children) { + if (name.equals(child.getName())) { + if (!child.isPrimitive()) + throw new Error("Cannot set a value of a non-primitive type ("+name+" on "+this.getName()+")"); + child.setValue(value); + } + } + try { + setProperty(name.hashCode(), name, new StringType(value)); + } catch (FHIRException e) { + throw new Error(e); + } + } + + public List getChildren(String name) { + List res = new ArrayList(); + if (children != null) + for (Element child : children) { + if (name.equals(child.getName())) + res.add(child); + } + return res; + } + + public boolean hasType() { + if (type == null) + return property.hasType(name); + else + return true; + } + + @Override + public String fhirType() { + return getType(); + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + if (isPrimitive() && (hash == "value".hashCode()) && !Utilities.noString(value)) { +// String tn = getType(); +// throw new Error(tn+" not done yet"); + Base[] b = new Base[1]; + b[0] = new StringType(value); + return b; + } + + List result = new ArrayList(); + if (children != null) { + for (Element child : children) { + if (child.getName().equals(name)) + result.add(child); + if (child.getName().startsWith(name) && child.getProperty().isChoice() && child.getProperty().getName().equals(name+"[x]")) + result.add(child); + } + } + if (result.isEmpty() && checkValid) { +// throw new FHIRException("not determined yet"); + } + return result.toArray(new Base[result.size()]); + } + + @Override + protected void listChildren(List childProps) { + if (children != null) { + Map map = new HashMap(); + for (Element c : children) { + org.hl7.fhir.r4.model.Property p = map.get(c.getName()); + if (p == null) { + p = new org.hl7.fhir.r4.model.Property(c.getName(), c.fhirType(), c.getProperty().getDefinition().getDefinition(), c.getProperty().getDefinition().getMin(), maxToInt(c.getProperty().getDefinition().getMax()), c); + childProps.add(p); + map.put(c.getName(), p); + + } else + p.getValues().add(c); + } + } + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + if (isPrimitive() && (hash == "value".hashCode())) { + this.value = castToString(value).asStringValue(); + return this; + } + if ("xhtml".equals(getType()) && (hash == "value".hashCode())) { + this.xhtml = castToXhtml(value); + this.value = castToXhtmlString(value); + return this; + } + + if (!value.isPrimitive() && !(value instanceof Element)) { + if (isDataType(value)) + value = convertToElement(property.getChild(name), value); + else + throw new FHIRException("Cannot set property "+name+" on "+this.name+" - value is not a primitive type ("+value.fhirType()+") or an ElementModel type"); + } + + if (children == null) + children = new ArrayList(); + Element childForValue = null; + + // look through existing children + for (Element child : children) { + if (child.getName().equals(name)) { + if (!child.isList()) { + childForValue = child; + break; + } else { + Element ne = new Element(child); + children.add(ne); + numberChildren(); + childForValue = ne; + break; + } + } + } + + if (childForValue == null) + for (Property p : property.getChildProperties(this.name, type)) { + if (p.getName().equals(name) || p.getName().equals(name+"[x]")) { + Element ne = new Element(name, p); + children.add(ne); + childForValue = ne; + break; + } + } + + if (childForValue == null) + throw new Error("Cannot set property "+name+" on "+this.name); + else if (value.isPrimitive()) { + if (childForValue.property.getName().endsWith("[x]")) + childForValue.name = name+Utilities.capitalize(value.fhirType()); + childForValue.setValue(value.primitiveValue()); + } else { + Element ve = (Element) value; + childForValue.type = ve.getType(); + if (childForValue.property.getName().endsWith("[x]")) + childForValue.name = name+Utilities.capitalize(childForValue.type); + else if (value.isResource()) { + if (childForValue.elementProperty == null) + childForValue.elementProperty = childForValue.property; + childForValue.property = ve.property; + childForValue.special = SpecialElement.BUNDLE_ENTRY; + } + if (ve.children != null) { + if (childForValue.children == null) + childForValue.children = new ArrayList(); + else + childForValue.children.clear(); + childForValue.children.addAll(ve.children); + } + } + return childForValue; + } + + private Base convertToElement(Property prop, Base v) throws FHIRException { + return new ObjectConverter(property.getContext()).convert(prop, (Type) v); + } + + private boolean isDataType(Base v) { + return v instanceof Type && property.getContext().getTypeNames().contains(v.fhirType()); + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + if (isPrimitive() && (hash == "value".hashCode())) { + return new StringType(value); + } + + if (children == null) + children = new ArrayList(); + + // look through existing children + for (Element child : children) { + if (child.getName().equals(name)) { + if (!child.isList()) { + return child; + } else { + Element ne = new Element(child); + children.add(ne); + numberChildren(); + return ne; + } + } + } + + for (Property p : property.getChildProperties(this.name, type)) { + if (p.getName().equals(name)) { + Element ne = new Element(name, p); + children.add(ne); + return ne; + } + } + + throw new Error("Unrecognised name "+name+" on "+this.name); + } + + private int maxToInt(String max) { + if (max.equals("*")) + return Integer.MAX_VALUE; + else + return Integer.parseInt(max); + } + + @Override + public boolean isPrimitive() { + return type != null ? property.isPrimitive(type) : property.isPrimitive(property.getType(name)); + } + + @Override + public boolean isResource() { + return property.isResource(); + } + + + @Override + public boolean hasPrimitiveValue() { + return property.isPrimitiveName(name) || property.IsLogicalAndHasPrimitiveValue(name); + } + + + @Override + public String primitiveValue() { + if (isPrimitive()) + return value; + else { + if (hasPrimitiveValue() && children != null) { + for (Element c : children) { + if (c.getName().equals("value")) + return c.primitiveValue(); + } + } + return null; + } + } + + // for the validator + public int line() { + return line; + } + + public int col() { + return col; + } + + public Element markLocation(int line, int col) { + this.line = line; + this.col = col; + return this; + } + + public void markValidation(StructureDefinition profile, ElementDefinition definition) { + } + + public Element getNamedChild(String name) { + if (children == null) + return null; + Element result = null; + for (Element child : children) { + if (child.getName().equals(name)) { + if (result == null) + result = child; + else + throw new Error("Attempt to read a single element when there is more than one present ("+name+")"); + } + } + return result; + } + + public void getNamedChildren(String name, List list) { + if (children != null) + for (Element child : children) + if (child.getName().equals(name)) + list.add(child); + } + + public String getNamedChildValue(String name) { + Element child = getNamedChild(name); + return child == null ? null : child.value; + } + + public void getNamedChildrenWithWildcard(String string, List values) { + Validate.isTrue(string.endsWith("[x]")); + + String start = string.substring(0, string.length() - 3); + if (children != null) { + for (Element child : children) { + if (child.getName().startsWith(start)) { + values.add(child); + } + } + } + } + + + public XhtmlNode getXhtml() { + return xhtml; + } + + public Element setXhtml(XhtmlNode xhtml) { + this.xhtml = xhtml; + return this; + } + + @Override + public boolean isEmpty() { + if (isNotBlank(value)) { + return false; + } + for (Element next : getChildren()) { + if (!next.isEmpty()) { + return false; + } + } + return true; + } + + public Property getElementProperty() { + return elementProperty; + } + + public boolean hasElementProperty() { + return elementProperty != null; + } + + public boolean hasChild(String name) { + return getNamedChild(name) != null; + } + + @Override + public String toString() { + return name+"="+fhirType() + "["+(children == null || hasValue() ? value : Integer.toString(children.size())+" children")+"]"; + } + + @Override + public String getIdBase() { + return getChildValue("id"); + } + + @Override + public void setIdBase(String value) { + setChildValue("id", value); + } + + +// @Override +// public boolean equalsDeep(Base other) { +// if (!super.equalsDeep(other)) +// return false; +// +// } +// +// @Override +// public boolean equalsShallow(Base other) { +// if (!super.equalsShallow(other)) +// return false; +// } + + public Type asType() throws FHIRException { + return new ObjectConverter(property.getContext()).convertToType(this); + } + + @Override + public boolean isMetadataBased() { + return true; + } + + public boolean isList() { + if (elementProperty != null) + return elementProperty.isList(); + else + return property.isList(); + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + Property p = property.getChildSimpleName(this.name, name); + if (p != null) { + Set types = new HashSet(); + for (TypeRefComponent tr : p.getDefinition().getType()) { + types.add(tr.getCode()); + } + return types.toArray(new String[]{}); + } + return super.getTypesForProperty(hash, name); + + } + + public void sort() { + if (children != null) { + List remove = new ArrayList(); + for (Element child : children) { + child.sort(); + if (child.isEmpty()) + remove.add(child); + } + children.removeAll(remove); + Collections.sort(children, new ElementSortComparator(this, this.property)); + } + } + + public class ElementSortComparator implements Comparator { + private List children; + public ElementSortComparator(Element e, Property property) { + String tn = e.getType(); + StructureDefinition sd = property.getContext().fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+tn); + if (sd != null && !sd.getAbstract()) + children = sd.getSnapshot().getElement(); + else + children = property.getStructure().getSnapshot().getElement(); + } + + @Override + public int compare(Element e0, Element e1) { + int i0 = find(e0); + int i1 = find(e1); + return Integer.compare(i0, i1); + } + private int find(Element e0) { + int i = e0.elementProperty != null ? children.indexOf(e0.elementProperty.getDefinition()) : children.indexOf(e0.property.getDefinition()); + return i; + } + + } + + public class ICodingImpl implements ICoding { + private String system; + private String version; + private String code; + private String display; + private boolean doesSystem; + private boolean doesVersion; + private boolean doesCode; + private boolean doesDisplay; + public ICodingImpl(boolean doesCode, boolean doesSystem, boolean doesVersion, boolean doesDisplay) { + super(); + this.doesCode = doesCode; + this.doesSystem = doesSystem; + this.doesVersion = doesVersion; + this.doesDisplay = doesDisplay; + } + public String getSystem() { + return system; + } + public String getVersion() { + return version; + } + public String getCode() { + return code; + } + public String getDisplay() { + return display; + } + public boolean hasSystem() { + return !Utilities.noString(system); + } + public boolean hasVersion() { + return !Utilities.noString(version); + } + public boolean hasCode() { + return !Utilities.noString(code); + } + public boolean hasDisplay() { + return !Utilities.noString(display); + } + public boolean supportsSystem() { + return doesSystem; + } + public boolean supportsVersion() { + return doesVersion; + } + public boolean supportsCode() { + return doesCode; + } + public boolean supportsDisplay() { + return doesDisplay; + } + } + + public ICoding getAsICoding() throws FHIRException { + if ("code".equals(fhirType())) { + if (property.getDefinition().getBinding().getStrength() != BindingStrength.REQUIRED) + return null; + ICodingImpl c = new ICodingImpl(true, true, false, false); + c.code = primitiveValue(); + ValueSetExpansionOutcome vse = property.getContext().expandVS(property.getDefinition().getBinding(), true, false); + if (vse.getValueset() == null) + return null; + for (ValueSetExpansionContainsComponent cc : vse.getValueset().getExpansion().getContains()) { + if (cc.getCode().equals(c.code)) { + c.system = cc.getSystem(); + if (cc.hasVersion()) { + c.doesVersion = true; + c.version = cc.getVersion(); + } + if (cc.hasDisplay()) { + c.doesDisplay = true; + c.display = cc.getDisplay(); + } + } + } + if (c.system == null) + return null; + return c; + } else if ("Coding".equals(fhirType())) { + ICodingImpl c = new ICodingImpl(true, true, true, true); + c.system = getNamedChildValue("system"); + c.code = getNamedChildValue("code"); + c.display = getNamedChildValue("display"); + c.version = getNamedChildValue("version"); + return c; + } else if ("Quantity".equals(fhirType())) { + ICodingImpl c = new ICodingImpl(true, true, false, false); + c.system = getNamedChildValue("system"); + c.code = getNamedChildValue("code"); + return c; + } else + return null; + } + + +} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Property.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Property.java index 62421ae9e3e..794076066de 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Property.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/Property.java @@ -255,12 +255,19 @@ public class Property { } } if (!"xhtml".equals(t)) { - final String url; - if (StringUtils.isNotBlank(ed.getType().get(0).getProfile())) { - url = ed.getType().get(0).getProfile(); - } else { - url = "http://hl7.org/fhir/StructureDefinition/" + t; + String url = null; + for (TypeRefComponent aType: ed.getType()) { + if (aType.getCode().equals(t)) { + if (StringUtils.isNotBlank(aType.getProfile())) { + url = aType.getProfile(); + } else { + url = "http://hl7.org/fhir/StructureDefinition/" + t; + } + break; + } } + if (url==null) + throw new Error("Unable to find type " + t + " for element " + elementName + " with path " + ed.getPath()); sd = context.fetchResource(StructureDefinition.class, url); if (sd == null) throw new DefinitionException("Unable to find type '"+t+"' for name '"+elementName+"' on property "+definition.getPath()); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/JsonParser.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/JsonParser.java index aed1dae98eb..9948fda6132 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/JsonParser.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/JsonParser.java @@ -1,42000 +1,43737 @@ -package org.hl7.fhir.r4.formats; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 - -import org.hl7.fhir.r4.model.DateType; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.CodeType; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.IntegerType; -import org.hl7.fhir.r4.model.OidType; -import org.hl7.fhir.r4.model.UriType; -import org.hl7.fhir.r4.model.UuidType; -import org.hl7.fhir.r4.model.InstantType; -import org.hl7.fhir.r4.model.BooleanType; -import org.hl7.fhir.r4.model.Base64BinaryType; -import org.hl7.fhir.r4.model.UnsignedIntType; -import org.hl7.fhir.r4.model.MarkdownType; -import org.hl7.fhir.r4.model.TimeType; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.PositiveIntType; -import org.hl7.fhir.r4.model.DecimalType; -import org.hl7.fhir.r4.model.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.utilities.xhtml.XhtmlNode; -import org.hl7.fhir.exceptions.FHIRFormatError; -import org.hl7.fhir.exceptions.FHIRException; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import java.io.IOException; - -public class JsonParser extends JsonParserBase { - - protected void parseElementProperties(JsonObject json, Element element) throws IOException, FHIRFormatError { - super.parseElementProperties(json, element); - if (json.has("extension")) { - JsonArray array = json.getAsJsonArray("extension"); - for (int i = 0; i < array.size(); i++) { - element.getExtension().add(parseExtension(array.get(i).getAsJsonObject())); - } - }; - } - - protected void parseBackboneProperties(JsonObject json, BackboneElement element) throws IOException, FHIRFormatError { - parseElementProperties(json, element); - if (json.has("modifierExtension")) { - JsonArray array = json.getAsJsonArray("modifierExtension"); - for (int i = 0; i < array.size(); i++) { - element.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject())); - } - } - } - - protected void parseTypeProperties(JsonObject json, Element element) throws IOException, FHIRFormatError { - parseElementProperties(json, element); - } - - @SuppressWarnings("unchecked") - protected > Enumeration parseEnumeration(String s, E item, EnumFactory e) throws IOException, FHIRFormatError { - Enumeration res = new Enumeration(e); - if (s != null) - res.setValue((E) e.fromCode(s)); - return res; - } - - protected DateType parseDate(String v) throws IOException, FHIRFormatError { - DateType res = new DateType(v); - return res; - } - - protected DateTimeType parseDateTime(String v) throws IOException, FHIRFormatError { - DateTimeType res = new DateTimeType(v); - return res; - } - - protected CodeType parseCode(String v) throws IOException, FHIRFormatError { - CodeType res = new CodeType(v); - return res; - } - - protected StringType parseString(String v) throws IOException, FHIRFormatError { - StringType res = new StringType(v); - return res; - } - - protected IntegerType parseInteger(java.lang.Long v) throws IOException, FHIRFormatError { - IntegerType res = new IntegerType(v); - return res; - } - - protected OidType parseOid(String v) throws IOException, FHIRFormatError { - OidType res = new OidType(v); - return res; - } - - protected UriType parseUri(String v) throws IOException, FHIRFormatError { - UriType res = new UriType(v); - return res; - } - - protected UuidType parseUuid(String v) throws IOException, FHIRFormatError { - UuidType res = new UuidType(v); - return res; - } - - protected InstantType parseInstant(String v) throws IOException, FHIRFormatError { - InstantType res = new InstantType(v); - return res; - } - - protected BooleanType parseBoolean(java.lang.Boolean v) throws IOException, FHIRFormatError { - BooleanType res = new BooleanType(v); - return res; - } - - protected Base64BinaryType parseBase64Binary(String v) throws IOException, FHIRFormatError { - Base64BinaryType res = new Base64BinaryType(v); - return res; - } - - protected UnsignedIntType parseUnsignedInt(String v) throws IOException, FHIRFormatError { - UnsignedIntType res = new UnsignedIntType(v); - return res; - } - - protected MarkdownType parseMarkdown(String v) throws IOException, FHIRFormatError { - MarkdownType res = new MarkdownType(v); - return res; - } - - protected TimeType parseTime(String v) throws IOException, FHIRFormatError { - TimeType res = new TimeType(v); - return res; - } - - protected IdType parseId(String v) throws IOException, FHIRFormatError { - IdType res = new IdType(v); - return res; - } - - protected PositiveIntType parsePositiveInt(String v) throws IOException, FHIRFormatError { - PositiveIntType res = new PositiveIntType(v); - return res; - } - - protected DecimalType parseDecimal(java.math.BigDecimal v) throws IOException, FHIRFormatError { - DecimalType res = new DecimalType(v); - return res; - } - - protected Extension parseExtension(JsonObject json) throws IOException, FHIRFormatError { - Extension res = new Extension(); - parseExtensionProperties(json, res); - return res; - } - - protected void parseExtensionProperties(JsonObject json, Extension res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected Narrative parseNarrative(JsonObject json) throws IOException, FHIRFormatError { - Narrative res = new Narrative(); - parseNarrativeProperties(json, res); - return res; - } - - protected void parseNarrativeProperties(JsonObject json, Narrative res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Narrative.NarrativeStatus.NULL, new Narrative.NarrativeStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("div")) - res.setDiv(parseXhtml(json.get("div").getAsString())); - } - - protected Reference parseReference(JsonObject json) throws IOException, FHIRFormatError { - Reference res = new Reference(); - parseReferenceProperties(json, res); - return res; - } - - protected void parseReferenceProperties(JsonObject json, Reference res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("reference")) - res.setReferenceElement(parseString(json.get("reference").getAsString())); - if (json.has("_reference")) - parseElementProperties(json.getAsJsonObject("_reference"), res.getReferenceElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - } - - protected Quantity parseQuantity(JsonObject json) throws IOException, FHIRFormatError { - Quantity res = new Quantity(); - parseQuantityProperties(json, res); - return res; - } - - protected void parseQuantityProperties(JsonObject json, Quantity res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("value")) - res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("comparator")) - res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); - if (json.has("_comparator")) - parseElementProperties(json.getAsJsonObject("_comparator"), res.getComparatorElement()); - if (json.has("unit")) - res.setUnitElement(parseString(json.get("unit").getAsString())); - if (json.has("_unit")) - parseElementProperties(json.getAsJsonObject("_unit"), res.getUnitElement()); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - } - - protected Period parsePeriod(JsonObject json) throws IOException, FHIRFormatError { - Period res = new Period(); - parsePeriodProperties(json, res); - return res; - } - - protected void parsePeriodProperties(JsonObject json, Period res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("start")) - res.setStartElement(parseDateTime(json.get("start").getAsString())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("end")) - res.setEndElement(parseDateTime(json.get("end").getAsString())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - } - - protected Attachment parseAttachment(JsonObject json) throws IOException, FHIRFormatError { - Attachment res = new Attachment(); - parseAttachmentProperties(json, res); - return res; - } - - protected void parseAttachmentProperties(JsonObject json, Attachment res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("contentType")) - res.setContentTypeElement(parseCode(json.get("contentType").getAsString())); - if (json.has("_contentType")) - parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("data")) - res.setDataElement(parseBase64Binary(json.get("data").getAsString())); - if (json.has("_data")) - parseElementProperties(json.getAsJsonObject("_data"), res.getDataElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("size")) - res.setSizeElement(parseUnsignedInt(json.get("size").getAsString())); - if (json.has("_size")) - parseElementProperties(json.getAsJsonObject("_size"), res.getSizeElement()); - if (json.has("hash")) - res.setHashElement(parseBase64Binary(json.get("hash").getAsString())); - if (json.has("_hash")) - parseElementProperties(json.getAsJsonObject("_hash"), res.getHashElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("creation")) - res.setCreationElement(parseDateTime(json.get("creation").getAsString())); - if (json.has("_creation")) - parseElementProperties(json.getAsJsonObject("_creation"), res.getCreationElement()); - } - - protected Duration parseDuration(JsonObject json) throws IOException, FHIRFormatError { - Duration res = new Duration(); - parseDurationProperties(json, res); - return res; - } - - protected void parseDurationProperties(JsonObject json, Duration res) throws IOException, FHIRFormatError { - parseQuantityProperties(json, res); - } - - protected Count parseCount(JsonObject json) throws IOException, FHIRFormatError { - Count res = new Count(); - parseCountProperties(json, res); - return res; - } - - protected void parseCountProperties(JsonObject json, Count res) throws IOException, FHIRFormatError { - parseQuantityProperties(json, res); - } - - protected Range parseRange(JsonObject json) throws IOException, FHIRFormatError { - Range res = new Range(); - parseRangeProperties(json, res); - return res; - } - - protected void parseRangeProperties(JsonObject json, Range res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("low")) - res.setLow(parseSimpleQuantity(json.getAsJsonObject("low"))); - if (json.has("high")) - res.setHigh(parseSimpleQuantity(json.getAsJsonObject("high"))); - } - - protected Annotation parseAnnotation(JsonObject json) throws IOException, FHIRFormatError { - Annotation res = new Annotation(); - parseAnnotationProperties(json, res); - return res; - } - - protected void parseAnnotationProperties(JsonObject json, Annotation res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - Type author = parseType("author", json); - if (author != null) - res.setAuthor(author); - if (json.has("time")) - res.setTimeElement(parseDateTime(json.get("time").getAsString())); - if (json.has("_time")) - parseElementProperties(json.getAsJsonObject("_time"), res.getTimeElement()); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - } - - protected Money parseMoney(JsonObject json) throws IOException, FHIRFormatError { - Money res = new Money(); - parseMoneyProperties(json, res); - return res; - } - - protected void parseMoneyProperties(JsonObject json, Money res) throws IOException, FHIRFormatError { - parseQuantityProperties(json, res); - } - - protected Identifier parseIdentifier(JsonObject json) throws IOException, FHIRFormatError { - Identifier res = new Identifier(); - parseIdentifierProperties(json, res); - return res; - } - - protected void parseIdentifierProperties(JsonObject json, Identifier res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), Identifier.IdentifierUse.NULL, new Identifier.IdentifierUseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("assigner")) - res.setAssigner(parseReference(json.getAsJsonObject("assigner"))); - } - - protected Coding parseCoding(JsonObject json) throws IOException, FHIRFormatError { - Coding res = new Coding(); - parseCodingProperties(json, res); - return res; - } - - protected void parseCodingProperties(JsonObject json, Coding res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("userSelected")) - res.setUserSelectedElement(parseBoolean(json.get("userSelected").getAsBoolean())); - if (json.has("_userSelected")) - parseElementProperties(json.getAsJsonObject("_userSelected"), res.getUserSelectedElement()); - } - - protected Signature parseSignature(JsonObject json) throws IOException, FHIRFormatError { - Signature res = new Signature(); - parseSignatureProperties(json, res); - return res; - } - - protected void parseSignatureProperties(JsonObject json, Signature res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("when")) - res.setWhenElement(parseInstant(json.get("when").getAsString())); - if (json.has("_when")) - parseElementProperties(json.getAsJsonObject("_when"), res.getWhenElement()); - Type who = parseType("who", json); - if (who != null) - res.setWho(who); - Type onBehalfOf = parseType("onBehalfOf", json); - if (onBehalfOf != null) - res.setOnBehalfOf(onBehalfOf); - if (json.has("contentType")) - res.setContentTypeElement(parseCode(json.get("contentType").getAsString())); - if (json.has("_contentType")) - parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); - if (json.has("blob")) - res.setBlobElement(parseBase64Binary(json.get("blob").getAsString())); - if (json.has("_blob")) - parseElementProperties(json.getAsJsonObject("_blob"), res.getBlobElement()); - } - - protected SampledData parseSampledData(JsonObject json) throws IOException, FHIRFormatError { - SampledData res = new SampledData(); - parseSampledDataProperties(json, res); - return res; - } - - protected void parseSampledDataProperties(JsonObject json, SampledData res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("origin")) - res.setOrigin(parseSimpleQuantity(json.getAsJsonObject("origin"))); - if (json.has("period")) - res.setPeriodElement(parseDecimal(json.get("period").getAsBigDecimal())); - if (json.has("_period")) - parseElementProperties(json.getAsJsonObject("_period"), res.getPeriodElement()); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("lowerLimit")) - res.setLowerLimitElement(parseDecimal(json.get("lowerLimit").getAsBigDecimal())); - if (json.has("_lowerLimit")) - parseElementProperties(json.getAsJsonObject("_lowerLimit"), res.getLowerLimitElement()); - if (json.has("upperLimit")) - res.setUpperLimitElement(parseDecimal(json.get("upperLimit").getAsBigDecimal())); - if (json.has("_upperLimit")) - parseElementProperties(json.getAsJsonObject("_upperLimit"), res.getUpperLimitElement()); - if (json.has("dimensions")) - res.setDimensionsElement(parsePositiveInt(json.get("dimensions").getAsString())); - if (json.has("_dimensions")) - parseElementProperties(json.getAsJsonObject("_dimensions"), res.getDimensionsElement()); - if (json.has("data")) - res.setDataElement(parseString(json.get("data").getAsString())); - if (json.has("_data")) - parseElementProperties(json.getAsJsonObject("_data"), res.getDataElement()); - } - - protected Ratio parseRatio(JsonObject json) throws IOException, FHIRFormatError { - Ratio res = new Ratio(); - parseRatioProperties(json, res); - return res; - } - - protected void parseRatioProperties(JsonObject json, Ratio res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("numerator")) - res.setNumerator(parseQuantity(json.getAsJsonObject("numerator"))); - if (json.has("denominator")) - res.setDenominator(parseQuantity(json.getAsJsonObject("denominator"))); - } - - protected Distance parseDistance(JsonObject json) throws IOException, FHIRFormatError { - Distance res = new Distance(); - parseDistanceProperties(json, res); - return res; - } - - protected void parseDistanceProperties(JsonObject json, Distance res) throws IOException, FHIRFormatError { - parseQuantityProperties(json, res); - } - - protected Age parseAge(JsonObject json) throws IOException, FHIRFormatError { - Age res = new Age(); - parseAgeProperties(json, res); - return res; - } - - protected void parseAgeProperties(JsonObject json, Age res) throws IOException, FHIRFormatError { - parseQuantityProperties(json, res); - } - - protected CodeableConcept parseCodeableConcept(JsonObject json) throws IOException, FHIRFormatError { - CodeableConcept res = new CodeableConcept(); - parseCodeableConceptProperties(json, res); - return res; - } - - protected void parseCodeableConceptProperties(JsonObject json, CodeableConcept res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("coding")) { - JsonArray array = json.getAsJsonArray("coding"); - for (int i = 0; i < array.size(); i++) { - res.getCoding().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - } - - protected SimpleQuantity parseSimpleQuantity(JsonObject json) throws IOException, FHIRFormatError { - SimpleQuantity res = new SimpleQuantity(); - parseSimpleQuantityProperties(json, res); - return res; - } - - protected void parseSimpleQuantityProperties(JsonObject json, SimpleQuantity res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("value")) - res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("comparator")) - res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); - if (json.has("_comparator")) - parseElementProperties(json.getAsJsonObject("_comparator"), res.getComparatorElement()); - if (json.has("unit")) - res.setUnitElement(parseString(json.get("unit").getAsString())); - if (json.has("_unit")) - parseElementProperties(json.getAsJsonObject("_unit"), res.getUnitElement()); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - } - - protected Meta parseMeta(JsonObject json) throws IOException, FHIRFormatError { - Meta res = new Meta(); - parseMetaProperties(json, res); - return res; - } - - protected void parseMetaProperties(JsonObject json, Meta res) throws IOException, FHIRFormatError { - parseElementProperties(json, res); - if (json.has("versionId")) - res.setVersionIdElement(parseId(json.get("versionId").getAsString())); - if (json.has("_versionId")) - parseElementProperties(json.getAsJsonObject("_versionId"), res.getVersionIdElement()); - if (json.has("lastUpdated")) - res.setLastUpdatedElement(parseInstant(json.get("lastUpdated").getAsString())); - if (json.has("_lastUpdated")) - parseElementProperties(json.getAsJsonObject("_lastUpdated"), res.getLastUpdatedElement()); - if (json.has("profile")) { - JsonArray array = json.getAsJsonArray("profile"); - for (int i = 0; i < array.size(); i++) { - res.getProfile().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_profile")) { - JsonArray array = json.getAsJsonArray("_profile"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getProfile().size()) - res.getProfile().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getProfile().get(i)); - } - }; - if (json.has("security")) { - JsonArray array = json.getAsJsonArray("security"); - for (int i = 0; i < array.size(); i++) { - res.getSecurity().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("tag")) { - JsonArray array = json.getAsJsonArray("tag"); - for (int i = 0; i < array.size(); i++) { - res.getTag().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - } - - protected Address parseAddress(JsonObject json) throws IOException, FHIRFormatError { - Address res = new Address(); - parseAddressProperties(json, res); - return res; - } - - protected void parseAddressProperties(JsonObject json, Address res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), Address.AddressUse.NULL, new Address.AddressUseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Address.AddressType.NULL, new Address.AddressTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("line")) { - JsonArray array = json.getAsJsonArray("line"); - for (int i = 0; i < array.size(); i++) { - res.getLine().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_line")) { - JsonArray array = json.getAsJsonArray("_line"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getLine().size()) - res.getLine().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getLine().get(i)); - } - }; - if (json.has("city")) - res.setCityElement(parseString(json.get("city").getAsString())); - if (json.has("_city")) - parseElementProperties(json.getAsJsonObject("_city"), res.getCityElement()); - if (json.has("district")) - res.setDistrictElement(parseString(json.get("district").getAsString())); - if (json.has("_district")) - parseElementProperties(json.getAsJsonObject("_district"), res.getDistrictElement()); - if (json.has("state")) - res.setStateElement(parseString(json.get("state").getAsString())); - if (json.has("_state")) - parseElementProperties(json.getAsJsonObject("_state"), res.getStateElement()); - if (json.has("postalCode")) - res.setPostalCodeElement(parseString(json.get("postalCode").getAsString())); - if (json.has("_postalCode")) - parseElementProperties(json.getAsJsonObject("_postalCode"), res.getPostalCodeElement()); - if (json.has("country")) - res.setCountryElement(parseString(json.get("country").getAsString())); - if (json.has("_country")) - parseElementProperties(json.getAsJsonObject("_country"), res.getCountryElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected TriggerDefinition parseTriggerDefinition(JsonObject json) throws IOException, FHIRFormatError { - TriggerDefinition res = new TriggerDefinition(); - parseTriggerDefinitionProperties(json, res); - return res; - } - - protected void parseTriggerDefinitionProperties(JsonObject json, TriggerDefinition res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), TriggerDefinition.TriggerType.NULL, new TriggerDefinition.TriggerTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("eventName")) - res.setEventNameElement(parseString(json.get("eventName").getAsString())); - if (json.has("_eventName")) - parseElementProperties(json.getAsJsonObject("_eventName"), res.getEventNameElement()); - Type eventTiming = parseType("eventTiming", json); - if (eventTiming != null) - res.setEventTiming(eventTiming); - if (json.has("eventData")) - res.setEventData(parseDataRequirement(json.getAsJsonObject("eventData"))); - if (json.has("eventCondition")) - res.setEventCondition(parseTriggerDefinitionTriggerDefinitionEventConditionComponent(json.getAsJsonObject("eventCondition"), res)); - } - - protected TriggerDefinition.TriggerDefinitionEventConditionComponent parseTriggerDefinitionTriggerDefinitionEventConditionComponent(JsonObject json, TriggerDefinition owner) throws IOException, FHIRFormatError { - TriggerDefinition.TriggerDefinitionEventConditionComponent res = new TriggerDefinition.TriggerDefinitionEventConditionComponent(); - parseTriggerDefinitionTriggerDefinitionEventConditionComponentProperties(json, owner, res); - return res; - } - - protected void parseTriggerDefinitionTriggerDefinitionEventConditionComponentProperties(JsonObject json, TriggerDefinition owner, TriggerDefinition.TriggerDefinitionEventConditionComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("language")) - res.setLanguageElement(parseString(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - } - - protected Contributor parseContributor(JsonObject json) throws IOException, FHIRFormatError { - Contributor res = new Contributor(); - parseContributorProperties(json, res); - return res; - } - - protected void parseContributorProperties(JsonObject json, Contributor res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Contributor.ContributorType.NULL, new Contributor.ContributorTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - } - - protected DataRequirement parseDataRequirement(JsonObject json) throws IOException, FHIRFormatError { - DataRequirement res = new DataRequirement(); - parseDataRequirementProperties(json, res); - return res; - } - - protected void parseDataRequirementProperties(JsonObject json, DataRequirement res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("profile")) { - JsonArray array = json.getAsJsonArray("profile"); - for (int i = 0; i < array.size(); i++) { - res.getProfile().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_profile")) { - JsonArray array = json.getAsJsonArray("_profile"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getProfile().size()) - res.getProfile().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getProfile().get(i)); - } - }; - if (json.has("mustSupport")) { - JsonArray array = json.getAsJsonArray("mustSupport"); - for (int i = 0; i < array.size(); i++) { - res.getMustSupport().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_mustSupport")) { - JsonArray array = json.getAsJsonArray("_mustSupport"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getMustSupport().size()) - res.getMustSupport().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getMustSupport().get(i)); - } - }; - if (json.has("codeFilter")) { - JsonArray array = json.getAsJsonArray("codeFilter"); - for (int i = 0; i < array.size(); i++) { - res.getCodeFilter().add(parseDataRequirementDataRequirementCodeFilterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("dateFilter")) { - JsonArray array = json.getAsJsonArray("dateFilter"); - for (int i = 0; i < array.size(); i++) { - res.getDateFilter().add(parseDataRequirementDataRequirementDateFilterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementDataRequirementCodeFilterComponent(JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError { - DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent(); - parseDataRequirementDataRequirementCodeFilterComponentProperties(json, owner, res); - return res; - } - - protected void parseDataRequirementDataRequirementCodeFilterComponentProperties(JsonObject json, DataRequirement owner, DataRequirement.DataRequirementCodeFilterComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - Type valueSet = parseType("valueSet", json); - if (valueSet != null) - res.setValueSet(valueSet); - if (json.has("valueCode")) { - JsonArray array = json.getAsJsonArray("valueCode"); - for (int i = 0; i < array.size(); i++) { - res.getValueCode().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_valueCode")) { - JsonArray array = json.getAsJsonArray("_valueCode"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getValueCode().size()) - res.getValueCode().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getValueCode().get(i)); - } - }; - if (json.has("valueCoding")) { - JsonArray array = json.getAsJsonArray("valueCoding"); - for (int i = 0; i < array.size(); i++) { - res.getValueCoding().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("valueCodeableConcept")) { - JsonArray array = json.getAsJsonArray("valueCodeableConcept"); - for (int i = 0; i < array.size(); i++) { - res.getValueCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDataRequirementDateFilterComponent(JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError { - DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent(); - parseDataRequirementDataRequirementDateFilterComponentProperties(json, owner, res); - return res; - } - - protected void parseDataRequirementDataRequirementDateFilterComponentProperties(JsonObject json, DataRequirement owner, DataRequirement.DataRequirementDateFilterComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected Dosage parseDosage(JsonObject json) throws IOException, FHIRFormatError { - Dosage res = new Dosage(); - parseDosageProperties(json, res); - return res; - } - - protected void parseDosageProperties(JsonObject json, Dosage res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parseInteger(json.get("sequence").getAsLong())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("additionalInstruction")) { - JsonArray array = json.getAsJsonArray("additionalInstruction"); - for (int i = 0; i < array.size(); i++) { - res.getAdditionalInstruction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("patientInstruction")) - res.setPatientInstructionElement(parseString(json.get("patientInstruction").getAsString())); - if (json.has("_patientInstruction")) - parseElementProperties(json.getAsJsonObject("_patientInstruction"), res.getPatientInstructionElement()); - if (json.has("timing")) - res.setTiming(parseTiming(json.getAsJsonObject("timing"))); - Type asNeeded = parseType("asNeeded", json); - if (asNeeded != null) - res.setAsNeeded(asNeeded); - if (json.has("site")) - res.setSite(parseCodeableConcept(json.getAsJsonObject("site"))); - if (json.has("route")) - res.setRoute(parseCodeableConcept(json.getAsJsonObject("route"))); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - Type dose = parseType("dose", json); - if (dose != null) - res.setDose(dose); - if (json.has("maxDosePerPeriod")) - res.setMaxDosePerPeriod(parseRatio(json.getAsJsonObject("maxDosePerPeriod"))); - if (json.has("maxDosePerAdministration")) - res.setMaxDosePerAdministration(parseSimpleQuantity(json.getAsJsonObject("maxDosePerAdministration"))); - if (json.has("maxDosePerLifetime")) - res.setMaxDosePerLifetime(parseSimpleQuantity(json.getAsJsonObject("maxDosePerLifetime"))); - Type rate = parseType("rate", json); - if (rate != null) - res.setRate(rate); - } - - protected RelatedArtifact parseRelatedArtifact(JsonObject json) throws IOException, FHIRFormatError { - RelatedArtifact res = new RelatedArtifact(); - parseRelatedArtifactProperties(json, res); - return res; - } - - protected void parseRelatedArtifactProperties(JsonObject json, RelatedArtifact res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), RelatedArtifact.RelatedArtifactType.NULL, new RelatedArtifact.RelatedArtifactTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("citation")) - res.setCitationElement(parseString(json.get("citation").getAsString())); - if (json.has("_citation")) - parseElementProperties(json.getAsJsonObject("_citation"), res.getCitationElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("document")) - res.setDocument(parseAttachment(json.getAsJsonObject("document"))); - if (json.has("resource")) - res.setResource(parseReference(json.getAsJsonObject("resource"))); - } - - protected ContactDetail parseContactDetail(JsonObject json) throws IOException, FHIRFormatError { - ContactDetail res = new ContactDetail(); - parseContactDetailProperties(json, res); - return res; - } - - protected void parseContactDetailProperties(JsonObject json, ContactDetail res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - } - - protected HumanName parseHumanName(JsonObject json) throws IOException, FHIRFormatError { - HumanName res = new HumanName(); - parseHumanNameProperties(json, res); - return res; - } - - protected void parseHumanNameProperties(JsonObject json, HumanName res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), HumanName.NameUse.NULL, new HumanName.NameUseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("family")) - res.setFamilyElement(parseString(json.get("family").getAsString())); - if (json.has("_family")) - parseElementProperties(json.getAsJsonObject("_family"), res.getFamilyElement()); - if (json.has("given")) { - JsonArray array = json.getAsJsonArray("given"); - for (int i = 0; i < array.size(); i++) { - res.getGiven().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_given")) { - JsonArray array = json.getAsJsonArray("_given"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getGiven().size()) - res.getGiven().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getGiven().get(i)); - } - }; - if (json.has("prefix")) { - JsonArray array = json.getAsJsonArray("prefix"); - for (int i = 0; i < array.size(); i++) { - res.getPrefix().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_prefix")) { - JsonArray array = json.getAsJsonArray("_prefix"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPrefix().size()) - res.getPrefix().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPrefix().get(i)); - } - }; - if (json.has("suffix")) { - JsonArray array = json.getAsJsonArray("suffix"); - for (int i = 0; i < array.size(); i++) { - res.getSuffix().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_suffix")) { - JsonArray array = json.getAsJsonArray("_suffix"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSuffix().size()) - res.getSuffix().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSuffix().get(i)); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected ContactPoint parseContactPoint(JsonObject json) throws IOException, FHIRFormatError { - ContactPoint res = new ContactPoint(); - parseContactPointProperties(json, res); - return res; - } - - protected void parseContactPointProperties(JsonObject json, ContactPoint res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("system")) - res.setSystemElement(parseEnumeration(json.get("system").getAsString(), ContactPoint.ContactPointSystem.NULL, new ContactPoint.ContactPointSystemEnumFactory())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), ContactPoint.ContactPointUse.NULL, new ContactPoint.ContactPointUseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("rank")) - res.setRankElement(parsePositiveInt(json.get("rank").getAsString())); - if (json.has("_rank")) - parseElementProperties(json.getAsJsonObject("_rank"), res.getRankElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected UsageContext parseUsageContext(JsonObject json) throws IOException, FHIRFormatError { - UsageContext res = new UsageContext(); - parseUsageContextProperties(json, res); - return res; - } - - protected void parseUsageContextProperties(JsonObject json, UsageContext res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("code")) - res.setCode(parseCoding(json.getAsJsonObject("code"))); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected Timing parseTiming(JsonObject json) throws IOException, FHIRFormatError { - Timing res = new Timing(); - parseTimingProperties(json, res); - return res; - } - - protected void parseTimingProperties(JsonObject json, Timing res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("event")) { - JsonArray array = json.getAsJsonArray("event"); - for (int i = 0; i < array.size(); i++) { - res.getEvent().add(parseDateTime(array.get(i).getAsString())); - } - }; - if (json.has("_event")) { - JsonArray array = json.getAsJsonArray("_event"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getEvent().size()) - res.getEvent().add(parseDateTime(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getEvent().get(i)); - } - }; - if (json.has("repeat")) - res.setRepeat(parseTimingTimingRepeatComponent(json.getAsJsonObject("repeat"), res)); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - } - - protected Timing.TimingRepeatComponent parseTimingTimingRepeatComponent(JsonObject json, Timing owner) throws IOException, FHIRFormatError { - Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent(); - parseTimingTimingRepeatComponentProperties(json, owner, res); - return res; - } - - protected void parseTimingTimingRepeatComponentProperties(JsonObject json, Timing owner, Timing.TimingRepeatComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - Type bounds = parseType("bounds", json); - if (bounds != null) - res.setBounds(bounds); - if (json.has("count")) - res.setCountElement(parseInteger(json.get("count").getAsLong())); - if (json.has("_count")) - parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); - if (json.has("countMax")) - res.setCountMaxElement(parseInteger(json.get("countMax").getAsLong())); - if (json.has("_countMax")) - parseElementProperties(json.getAsJsonObject("_countMax"), res.getCountMaxElement()); - if (json.has("duration")) - res.setDurationElement(parseDecimal(json.get("duration").getAsBigDecimal())); - if (json.has("_duration")) - parseElementProperties(json.getAsJsonObject("_duration"), res.getDurationElement()); - if (json.has("durationMax")) - res.setDurationMaxElement(parseDecimal(json.get("durationMax").getAsBigDecimal())); - if (json.has("_durationMax")) - parseElementProperties(json.getAsJsonObject("_durationMax"), res.getDurationMaxElement()); - if (json.has("durationUnit")) - res.setDurationUnitElement(parseEnumeration(json.get("durationUnit").getAsString(), Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); - if (json.has("_durationUnit")) - parseElementProperties(json.getAsJsonObject("_durationUnit"), res.getDurationUnitElement()); - if (json.has("frequency")) - res.setFrequencyElement(parseInteger(json.get("frequency").getAsLong())); - if (json.has("_frequency")) - parseElementProperties(json.getAsJsonObject("_frequency"), res.getFrequencyElement()); - if (json.has("frequencyMax")) - res.setFrequencyMaxElement(parseInteger(json.get("frequencyMax").getAsLong())); - if (json.has("_frequencyMax")) - parseElementProperties(json.getAsJsonObject("_frequencyMax"), res.getFrequencyMaxElement()); - if (json.has("period")) - res.setPeriodElement(parseDecimal(json.get("period").getAsBigDecimal())); - if (json.has("_period")) - parseElementProperties(json.getAsJsonObject("_period"), res.getPeriodElement()); - if (json.has("periodMax")) - res.setPeriodMaxElement(parseDecimal(json.get("periodMax").getAsBigDecimal())); - if (json.has("_periodMax")) - parseElementProperties(json.getAsJsonObject("_periodMax"), res.getPeriodMaxElement()); - if (json.has("periodUnit")) - res.setPeriodUnitElement(parseEnumeration(json.get("periodUnit").getAsString(), Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); - if (json.has("_periodUnit")) - parseElementProperties(json.getAsJsonObject("_periodUnit"), res.getPeriodUnitElement()); - if (json.has("dayOfWeek")) { - JsonArray array = json.getAsJsonArray("dayOfWeek"); - for (int i = 0; i < array.size(); i++) { - res.getDayOfWeek().add(parseEnumeration(array.get(i).getAsString(), Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); - } - }; - if (json.has("_dayOfWeek")) { - JsonArray array = json.getAsJsonArray("_dayOfWeek"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDayOfWeek().size()) - res.getDayOfWeek().add(parseEnumeration(null, Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDayOfWeek().get(i)); - } - }; - if (json.has("timeOfDay")) { - JsonArray array = json.getAsJsonArray("timeOfDay"); - for (int i = 0; i < array.size(); i++) { - res.getTimeOfDay().add(parseTime(array.get(i).getAsString())); - } - }; - if (json.has("_timeOfDay")) { - JsonArray array = json.getAsJsonArray("_timeOfDay"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getTimeOfDay().size()) - res.getTimeOfDay().add(parseTime(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getTimeOfDay().get(i)); - } - }; - if (json.has("when")) { - JsonArray array = json.getAsJsonArray("when"); - for (int i = 0; i < array.size(); i++) { - res.getWhen().add(parseEnumeration(array.get(i).getAsString(), Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); - } - }; - if (json.has("_when")) { - JsonArray array = json.getAsJsonArray("_when"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getWhen().size()) - res.getWhen().add(parseEnumeration(null, Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getWhen().get(i)); - } - }; - if (json.has("offset")) - res.setOffsetElement(parseUnsignedInt(json.get("offset").getAsString())); - if (json.has("_offset")) - parseElementProperties(json.getAsJsonObject("_offset"), res.getOffsetElement()); - } - - protected ElementDefinition parseElementDefinition(JsonObject json) throws IOException, FHIRFormatError { - ElementDefinition res = new ElementDefinition(); - parseElementDefinitionProperties(json, res); - return res; - } - - protected void parseElementDefinitionProperties(JsonObject json, ElementDefinition res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("representation")) { - JsonArray array = json.getAsJsonArray("representation"); - for (int i = 0; i < array.size(); i++) { - res.getRepresentation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory())); - } - }; - if (json.has("_representation")) { - JsonArray array = json.getAsJsonArray("_representation"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getRepresentation().size()) - res.getRepresentation().add(parseEnumeration(null, ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getRepresentation().get(i)); - } - }; - if (json.has("sliceName")) - res.setSliceNameElement(parseString(json.get("sliceName").getAsString())); - if (json.has("_sliceName")) - parseElementProperties(json.getAsJsonObject("_sliceName"), res.getSliceNameElement()); - if (json.has("label")) - res.setLabelElement(parseString(json.get("label").getAsString())); - if (json.has("_label")) - parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("slicing")) - res.setSlicing(parseElementDefinitionElementDefinitionSlicingComponent(json.getAsJsonObject("slicing"), res)); - if (json.has("short")) - res.setShortElement(parseString(json.get("short").getAsString())); - if (json.has("_short")) - parseElementProperties(json.getAsJsonObject("_short"), res.getShortElement()); - if (json.has("definition")) - res.setDefinitionElement(parseMarkdown(json.get("definition").getAsString())); - if (json.has("_definition")) - parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); - if (json.has("comment")) - res.setCommentElement(parseMarkdown(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("requirements")) - res.setRequirementsElement(parseMarkdown(json.get("requirements").getAsString())); - if (json.has("_requirements")) - parseElementProperties(json.getAsJsonObject("_requirements"), res.getRequirementsElement()); - if (json.has("alias")) { - JsonArray array = json.getAsJsonArray("alias"); - for (int i = 0; i < array.size(); i++) { - res.getAlias().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_alias")) { - JsonArray array = json.getAsJsonArray("_alias"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getAlias().size()) - res.getAlias().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getAlias().get(i)); - } - }; - if (json.has("min")) - res.setMinElement(parseUnsignedInt(json.get("min").getAsString())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - if (json.has("base")) - res.setBase(parseElementDefinitionElementDefinitionBaseComponent(json.getAsJsonObject("base"), res)); - if (json.has("contentReference")) - res.setContentReferenceElement(parseUri(json.get("contentReference").getAsString())); - if (json.has("_contentReference")) - parseElementProperties(json.getAsJsonObject("_contentReference"), res.getContentReferenceElement()); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseElementDefinitionTypeRefComponent(array.get(i).getAsJsonObject(), res)); - } - }; - Type defaultValue = parseType("defaultValue", json); - if (defaultValue != null) - res.setDefaultValue(defaultValue); - if (json.has("meaningWhenMissing")) - res.setMeaningWhenMissingElement(parseMarkdown(json.get("meaningWhenMissing").getAsString())); - if (json.has("_meaningWhenMissing")) - parseElementProperties(json.getAsJsonObject("_meaningWhenMissing"), res.getMeaningWhenMissingElement()); - if (json.has("orderMeaning")) - res.setOrderMeaningElement(parseString(json.get("orderMeaning").getAsString())); - if (json.has("_orderMeaning")) - parseElementProperties(json.getAsJsonObject("_orderMeaning"), res.getOrderMeaningElement()); - Type fixed = parseType("fixed", json); - if (fixed != null) - res.setFixed(fixed); - Type pattern = parseType("pattern", json); - if (pattern != null) - res.setPattern(pattern); - if (json.has("example")) { - JsonArray array = json.getAsJsonArray("example"); - for (int i = 0; i < array.size(); i++) { - res.getExample().add(parseElementDefinitionElementDefinitionExampleComponent(array.get(i).getAsJsonObject(), res)); - } - }; - Type minValue = parseType("minValue", json); - if (minValue != null) - res.setMinValue(minValue); - Type maxValue = parseType("maxValue", json); - if (maxValue != null) - res.setMaxValue(maxValue); - if (json.has("maxLength")) - res.setMaxLengthElement(parseInteger(json.get("maxLength").getAsLong())); - if (json.has("_maxLength")) - parseElementProperties(json.getAsJsonObject("_maxLength"), res.getMaxLengthElement()); - if (json.has("condition")) { - JsonArray array = json.getAsJsonArray("condition"); - for (int i = 0; i < array.size(); i++) { - res.getCondition().add(parseId(array.get(i).getAsString())); - } - }; - if (json.has("_condition")) { - JsonArray array = json.getAsJsonArray("_condition"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getCondition().size()) - res.getCondition().add(parseId(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getCondition().get(i)); - } - }; - if (json.has("constraint")) { - JsonArray array = json.getAsJsonArray("constraint"); - for (int i = 0; i < array.size(); i++) { - res.getConstraint().add(parseElementDefinitionElementDefinitionConstraintComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("mustSupport")) - res.setMustSupportElement(parseBoolean(json.get("mustSupport").getAsBoolean())); - if (json.has("_mustSupport")) - parseElementProperties(json.getAsJsonObject("_mustSupport"), res.getMustSupportElement()); - if (json.has("isModifier")) - res.setIsModifierElement(parseBoolean(json.get("isModifier").getAsBoolean())); - if (json.has("_isModifier")) - parseElementProperties(json.getAsJsonObject("_isModifier"), res.getIsModifierElement()); - if (json.has("isSummary")) - res.setIsSummaryElement(parseBoolean(json.get("isSummary").getAsBoolean())); - if (json.has("_isSummary")) - parseElementProperties(json.getAsJsonObject("_isSummary"), res.getIsSummaryElement()); - if (json.has("binding")) - res.setBinding(parseElementDefinitionElementDefinitionBindingComponent(json.getAsJsonObject("binding"), res)); - if (json.has("mapping")) { - JsonArray array = json.getAsJsonArray("mapping"); - for (int i = 0; i < array.size(); i++) { - res.getMapping().add(parseElementDefinitionElementDefinitionMappingComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionElementDefinitionSlicingComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent(); - parseElementDefinitionElementDefinitionSlicingComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionSlicingComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("discriminator")) { - JsonArray array = json.getAsJsonArray("discriminator"); - for (int i = 0; i < array.size(); i++) { - res.getDiscriminator().add(parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("ordered")) - res.setOrderedElement(parseBoolean(json.get("ordered").getAsBoolean())); - if (json.has("_ordered")) - parseElementProperties(json.getAsJsonObject("_ordered"), res.getOrderedElement()); - if (json.has("rules")) - res.setRulesElement(parseEnumeration(json.get("rules").getAsString(), ElementDefinition.SlicingRules.NULL, new ElementDefinition.SlicingRulesEnumFactory())); - if (json.has("_rules")) - parseElementProperties(json.getAsJsonObject("_rules"), res.getRulesElement()); - } - - protected ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); - parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ElementDefinition.DiscriminatorType.NULL, new ElementDefinition.DiscriminatorTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - } - - protected ElementDefinition.ElementDefinitionBaseComponent parseElementDefinitionElementDefinitionBaseComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent(); - parseElementDefinitionElementDefinitionBaseComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionBaseComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionBaseComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("min")) - res.setMinElement(parseUnsignedInt(json.get("min").getAsString())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - } - - protected ElementDefinition.TypeRefComponent parseElementDefinitionTypeRefComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent(); - parseElementDefinitionTypeRefComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionTypeRefComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.TypeRefComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseUri(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("profile")) - res.setProfileElement(parseUri(json.get("profile").getAsString())); - if (json.has("_profile")) - parseElementProperties(json.getAsJsonObject("_profile"), res.getProfileElement()); - if (json.has("targetProfile")) - res.setTargetProfileElement(parseUri(json.get("targetProfile").getAsString())); - if (json.has("_targetProfile")) - parseElementProperties(json.getAsJsonObject("_targetProfile"), res.getTargetProfileElement()); - if (json.has("aggregation")) { - JsonArray array = json.getAsJsonArray("aggregation"); - for (int i = 0; i < array.size(); i++) { - res.getAggregation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory())); - } - }; - if (json.has("_aggregation")) { - JsonArray array = json.getAsJsonArray("_aggregation"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getAggregation().size()) - res.getAggregation().add(parseEnumeration(null, ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getAggregation().get(i)); - } - }; - if (json.has("versioning")) - res.setVersioningElement(parseEnumeration(json.get("versioning").getAsString(), ElementDefinition.ReferenceVersionRules.NULL, new ElementDefinition.ReferenceVersionRulesEnumFactory())); - if (json.has("_versioning")) - parseElementProperties(json.getAsJsonObject("_versioning"), res.getVersioningElement()); - } - - protected ElementDefinition.ElementDefinitionExampleComponent parseElementDefinitionElementDefinitionExampleComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent(); - parseElementDefinitionElementDefinitionExampleComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionExampleComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionExampleComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("label")) - res.setLabelElement(parseString(json.get("label").getAsString())); - if (json.has("_label")) - parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionElementDefinitionConstraintComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent(); - parseElementDefinitionElementDefinitionConstraintComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionConstraintComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionConstraintComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("key")) - res.setKeyElement(parseId(json.get("key").getAsString())); - if (json.has("_key")) - parseElementProperties(json.getAsJsonObject("_key"), res.getKeyElement()); - if (json.has("requirements")) - res.setRequirementsElement(parseString(json.get("requirements").getAsString())); - if (json.has("_requirements")) - parseElementProperties(json.getAsJsonObject("_requirements"), res.getRequirementsElement()); - if (json.has("severity")) - res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), ElementDefinition.ConstraintSeverity.NULL, new ElementDefinition.ConstraintSeverityEnumFactory())); - if (json.has("_severity")) - parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); - if (json.has("human")) - res.setHumanElement(parseString(json.get("human").getAsString())); - if (json.has("_human")) - parseElementProperties(json.getAsJsonObject("_human"), res.getHumanElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - if (json.has("xpath")) - res.setXpathElement(parseString(json.get("xpath").getAsString())); - if (json.has("_xpath")) - parseElementProperties(json.getAsJsonObject("_xpath"), res.getXpathElement()); - if (json.has("source")) - res.setSourceElement(parseUri(json.get("source").getAsString())); - if (json.has("_source")) - parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); - } - - protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionElementDefinitionBindingComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent(); - parseElementDefinitionElementDefinitionBindingComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionBindingComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionBindingComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("strength")) - res.setStrengthElement(parseEnumeration(json.get("strength").getAsString(), Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); - if (json.has("_strength")) - parseElementProperties(json.getAsJsonObject("_strength"), res.getStrengthElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - Type valueSet = parseType("valueSet", json); - if (valueSet != null) - res.setValueSet(valueSet); - } - - protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionElementDefinitionMappingComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent(); - parseElementDefinitionElementDefinitionMappingComponentProperties(json, owner, res); - return res; - } - - protected void parseElementDefinitionElementDefinitionMappingComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionMappingComponent res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("identity")) - res.setIdentityElement(parseId(json.get("identity").getAsString())); - if (json.has("_identity")) - parseElementProperties(json.getAsJsonObject("_identity"), res.getIdentityElement()); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("map")) - res.setMapElement(parseString(json.get("map").getAsString())); - if (json.has("_map")) - parseElementProperties(json.getAsJsonObject("_map"), res.getMapElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected ParameterDefinition parseParameterDefinition(JsonObject json) throws IOException, FHIRFormatError { - ParameterDefinition res = new ParameterDefinition(); - parseParameterDefinitionProperties(json, res); - return res; - } - - protected void parseParameterDefinitionProperties(JsonObject json, ParameterDefinition res) throws IOException, FHIRFormatError { - parseTypeProperties(json, res); - if (json.has("name")) - res.setNameElement(parseCode(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), ParameterDefinition.ParameterUse.NULL, new ParameterDefinition.ParameterUseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("min")) - res.setMinElement(parseInteger(json.get("min").getAsLong())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("profile")) - res.setProfile(parseReference(json.getAsJsonObject("profile"))); - } - - protected void parseDomainResourceProperties(JsonObject json, DomainResource res) throws IOException, FHIRFormatError { - parseResourceProperties(json, res); - if (json.has("text")) - res.setText(parseNarrative(json.getAsJsonObject("text"))); - if (json.has("contained")) { - JsonArray array = json.getAsJsonArray("contained"); - for (int i = 0; i < array.size(); i++) { - res.getContained().add(parseResource(array.get(i).getAsJsonObject())); - } - }; - if (json.has("extension")) { - JsonArray array = json.getAsJsonArray("extension"); - for (int i = 0; i < array.size(); i++) { - res.getExtension().add(parseExtension(array.get(i).getAsJsonObject())); - } - }; - if (json.has("modifierExtension")) { - JsonArray array = json.getAsJsonArray("modifierExtension"); - for (int i = 0; i < array.size(); i++) { - res.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject())); - } - }; - } - - protected Parameters parseParameters(JsonObject json) throws IOException, FHIRFormatError { - Parameters res = new Parameters(); - parseParametersProperties(json, res); - return res; - } - - protected void parseParametersProperties(JsonObject json, Parameters res) throws IOException, FHIRFormatError { - parseResourceProperties(json, res); - if (json.has("parameter")) { - JsonArray array = json.getAsJsonArray("parameter"); - for (int i = 0; i < array.size(); i++) { - res.getParameter().add(parseParametersParametersParameterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Parameters.ParametersParameterComponent parseParametersParametersParameterComponent(JsonObject json, Parameters owner) throws IOException, FHIRFormatError { - Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent(); - parseParametersParametersParameterComponentProperties(json, owner, res); - return res; - } - - protected void parseParametersParametersParameterComponentProperties(JsonObject json, Parameters owner, Parameters.ParametersParameterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("resource")) - res.setResource(parseResource(json.getAsJsonObject("resource"))); - if (json.has("part")) { - JsonArray array = json.getAsJsonArray("part"); - for (int i = 0; i < array.size(); i++) { - res.getPart().add(parseParametersParametersParameterComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected void parseResourceProperties(JsonObject json, Resource res) throws IOException, FHIRFormatError { - if (json.has("id")) - res.setIdElement(parseId(json.get("id").getAsString())); - if (json.has("_id")) - parseElementProperties(json.getAsJsonObject("_id"), res.getIdElement()); - if (json.has("meta")) - res.setMeta(parseMeta(json.getAsJsonObject("meta"))); - if (json.has("implicitRules")) - res.setImplicitRulesElement(parseUri(json.get("implicitRules").getAsString())); - if (json.has("_implicitRules")) - parseElementProperties(json.getAsJsonObject("_implicitRules"), res.getImplicitRulesElement()); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - } - - protected Account parseAccount(JsonObject json) throws IOException, FHIRFormatError { - Account res = new Account(); - parseAccountProperties(json, res); - return res; - } - - protected void parseAccountProperties(JsonObject json, Account res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Account.AccountStatus.NULL, new Account.AccountStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("active")) - res.setActive(parsePeriod(json.getAsJsonObject("active"))); - if (json.has("balance")) - res.setBalance(parseMoney(json.getAsJsonObject("balance"))); - if (json.has("coverage")) { - JsonArray array = json.getAsJsonArray("coverage"); - for (int i = 0; i < array.size(); i++) { - res.getCoverage().add(parseAccountCoverageComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("owner")) - res.setOwner(parseReference(json.getAsJsonObject("owner"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("guarantor")) { - JsonArray array = json.getAsJsonArray("guarantor"); - for (int i = 0; i < array.size(); i++) { - res.getGuarantor().add(parseAccountGuarantorComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Account.CoverageComponent parseAccountCoverageComponent(JsonObject json, Account owner) throws IOException, FHIRFormatError { - Account.CoverageComponent res = new Account.CoverageComponent(); - parseAccountCoverageComponentProperties(json, owner, res); - return res; - } - - protected void parseAccountCoverageComponentProperties(JsonObject json, Account owner, Account.CoverageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - if (json.has("priority")) - res.setPriorityElement(parsePositiveInt(json.get("priority").getAsString())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - } - - protected Account.GuarantorComponent parseAccountGuarantorComponent(JsonObject json, Account owner) throws IOException, FHIRFormatError { - Account.GuarantorComponent res = new Account.GuarantorComponent(); - parseAccountGuarantorComponentProperties(json, owner, res); - return res; - } - - protected void parseAccountGuarantorComponentProperties(JsonObject json, Account owner, Account.GuarantorComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("party")) - res.setParty(parseReference(json.getAsJsonObject("party"))); - if (json.has("onHold")) - res.setOnHoldElement(parseBoolean(json.get("onHold").getAsBoolean())); - if (json.has("_onHold")) - parseElementProperties(json.getAsJsonObject("_onHold"), res.getOnHoldElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected ActivityDefinition parseActivityDefinition(JsonObject json) throws IOException, FHIRFormatError { - ActivityDefinition res = new ActivityDefinition(); - parseActivityDefinitionProperties(json, res); - return res; - } - - protected void parseActivityDefinitionProperties(JsonObject json, ActivityDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contributor")) { - JsonArray array = json.getAsJsonArray("contributor"); - for (int i = 0; i < array.size(); i++) { - res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("library")) { - JsonArray array = json.getAsJsonArray("library"); - for (int i = 0; i < array.size(); i++) { - res.getLibrary().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), ActivityDefinition.ActivityDefinitionKind.NULL, new ActivityDefinition.ActivityDefinitionKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - Type timing = parseType("timing", json); - if (timing != null) - res.setTiming(timing); - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseActivityDefinitionActivityDefinitionParticipantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - Type product = parseType("product", json); - if (product != null) - res.setProduct(product); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("dosage")) { - JsonArray array = json.getAsJsonArray("dosage"); - for (int i = 0; i < array.size(); i++) { - res.getDosage().add(parseDosage(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) { - JsonArray array = json.getAsJsonArray("bodySite"); - for (int i = 0; i < array.size(); i++) { - res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("transform")) - res.setTransform(parseReference(json.getAsJsonObject("transform"))); - if (json.has("dynamicValue")) { - JsonArray array = json.getAsJsonArray("dynamicValue"); - for (int i = 0; i < array.size(); i++) { - res.getDynamicValue().add(parseActivityDefinitionActivityDefinitionDynamicValueComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionActivityDefinitionParticipantComponent(JsonObject json, ActivityDefinition owner) throws IOException, FHIRFormatError { - ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent(); - parseActivityDefinitionActivityDefinitionParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parseActivityDefinitionActivityDefinitionParticipantComponentProperties(JsonObject json, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ActivityDefinition.ActivityParticipantType.NULL, new ActivityDefinition.ActivityParticipantTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - } - - protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionActivityDefinitionDynamicValueComponent(JsonObject json, ActivityDefinition owner) throws IOException, FHIRFormatError { - ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent(); - parseActivityDefinitionActivityDefinitionDynamicValueComponentProperties(json, owner, res); - return res; - } - - protected void parseActivityDefinitionActivityDefinitionDynamicValueComponentProperties(JsonObject json, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionDynamicValueComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("language")) - res.setLanguageElement(parseString(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - } - - protected AdverseEvent parseAdverseEvent(JsonObject json) throws IOException, FHIRFormatError { - AdverseEvent res = new AdverseEvent(); - parseAdverseEventProperties(json, res); - return res; - } - - protected void parseAdverseEventProperties(JsonObject json, AdverseEvent res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("actuality")) - res.setActualityElement(parseEnumeration(json.get("actuality").getAsString(), AdverseEvent.AdverseEventActuality.NULL, new AdverseEvent.AdverseEventActualityEnumFactory())); - if (json.has("_actuality")) - parseElementProperties(json.getAsJsonObject("_actuality"), res.getActualityElement()); - if (json.has("category")) - res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), AdverseEvent.AdverseEventCategory.NULL, new AdverseEvent.AdverseEventCategoryEnumFactory())); - if (json.has("_category")) - parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); - if (json.has("event")) - res.setEvent(parseCodeableConcept(json.getAsJsonObject("event"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("resultingCondition")) { - JsonArray array = json.getAsJsonArray("resultingCondition"); - for (int i = 0; i < array.size(); i++) { - res.getResultingCondition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("seriousness")) - res.setSeriousness(parseCodeableConcept(json.getAsJsonObject("seriousness"))); - if (json.has("severity")) - res.setSeverity(parseCodeableConcept(json.getAsJsonObject("severity"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("recorder")) - res.setRecorder(parseReference(json.getAsJsonObject("recorder"))); - if (json.has("eventParticipant")) - res.setEventParticipant(parseReference(json.getAsJsonObject("eventParticipant"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("suspectEntity")) { - JsonArray array = json.getAsJsonArray("suspectEntity"); - for (int i = 0; i < array.size(); i++) { - res.getSuspectEntity().add(parseAdverseEventAdverseEventSuspectEntityComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("subjectMedicalHistory")) { - JsonArray array = json.getAsJsonArray("subjectMedicalHistory"); - for (int i = 0; i < array.size(); i++) { - res.getSubjectMedicalHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("referenceDocument")) { - JsonArray array = json.getAsJsonArray("referenceDocument"); - for (int i = 0; i < array.size(); i++) { - res.getReferenceDocument().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("study")) { - JsonArray array = json.getAsJsonArray("study"); - for (int i = 0; i < array.size(); i++) { - res.getStudy().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventAdverseEventSuspectEntityComponent(JsonObject json, AdverseEvent owner) throws IOException, FHIRFormatError { - AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent(); - parseAdverseEventAdverseEventSuspectEntityComponentProperties(json, owner, res); - return res; - } - - protected void parseAdverseEventAdverseEventSuspectEntityComponentProperties(JsonObject json, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("instance")) - res.setInstance(parseReference(json.getAsJsonObject("instance"))); - if (json.has("causality")) { - JsonArray array = json.getAsJsonArray("causality"); - for (int i = 0; i < array.size(); i++) { - res.getCausality().add(parseAdverseEventAdverseEventSuspectEntityCausalityComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventAdverseEventSuspectEntityCausalityComponent(JsonObject json, AdverseEvent owner) throws IOException, FHIRFormatError { - AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent(); - parseAdverseEventAdverseEventSuspectEntityCausalityComponentProperties(json, owner, res); - return res; - } - - protected void parseAdverseEventAdverseEventSuspectEntityCausalityComponentProperties(JsonObject json, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("assessment")) - res.setAssessment(parseCodeableConcept(json.getAsJsonObject("assessment"))); - if (json.has("productRelatedness")) - res.setProductRelatednessElement(parseString(json.get("productRelatedness").getAsString())); - if (json.has("_productRelatedness")) - parseElementProperties(json.getAsJsonObject("_productRelatedness"), res.getProductRelatednessElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - } - - protected AllergyIntolerance parseAllergyIntolerance(JsonObject json) throws IOException, FHIRFormatError { - AllergyIntolerance res = new AllergyIntolerance(); - parseAllergyIntoleranceProperties(json, res); - return res; - } - - protected void parseAllergyIntoleranceProperties(JsonObject json, AllergyIntolerance res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("clinicalStatus")) - res.setClinicalStatusElement(parseEnumeration(json.get("clinicalStatus").getAsString(), AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL, new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory())); - if (json.has("_clinicalStatus")) - parseElementProperties(json.getAsJsonObject("_clinicalStatus"), res.getClinicalStatusElement()); - if (json.has("verificationStatus")) - res.setVerificationStatusElement(parseEnumeration(json.get("verificationStatus").getAsString(), AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL, new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory())); - if (json.has("_verificationStatus")) - parseElementProperties(json.getAsJsonObject("_verificationStatus"), res.getVerificationStatusElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), AllergyIntolerance.AllergyIntoleranceType.NULL, new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseEnumeration(array.get(i).getAsString(), AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); - } - }; - if (json.has("_category")) { - JsonArray array = json.getAsJsonArray("_category"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getCategory().size()) - res.getCategory().add(parseEnumeration(null, AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getCategory().get(i)); - } - }; - if (json.has("criticality")) - res.setCriticalityElement(parseEnumeration(json.get("criticality").getAsString(), AllergyIntolerance.AllergyIntoleranceCriticality.NULL, new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory())); - if (json.has("_criticality")) - parseElementProperties(json.getAsJsonObject("_criticality"), res.getCriticalityElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - Type onset = parseType("onset", json); - if (onset != null) - res.setOnset(onset); - if (json.has("assertedDate")) - res.setAssertedDateElement(parseDateTime(json.get("assertedDate").getAsString())); - if (json.has("_assertedDate")) - parseElementProperties(json.getAsJsonObject("_assertedDate"), res.getAssertedDateElement()); - if (json.has("recorder")) - res.setRecorder(parseReference(json.getAsJsonObject("recorder"))); - if (json.has("asserter")) - res.setAsserter(parseReference(json.getAsJsonObject("asserter"))); - if (json.has("lastOccurrence")) - res.setLastOccurrenceElement(parseDateTime(json.get("lastOccurrence").getAsString())); - if (json.has("_lastOccurrence")) - parseElementProperties(json.getAsJsonObject("_lastOccurrence"), res.getLastOccurrenceElement()); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reaction")) { - JsonArray array = json.getAsJsonArray("reaction"); - for (int i = 0; i < array.size(); i++) { - res.getReaction().add(parseAllergyIntoleranceAllergyIntoleranceReactionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceAllergyIntoleranceReactionComponent(JsonObject json, AllergyIntolerance owner) throws IOException, FHIRFormatError { - AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent(); - parseAllergyIntoleranceAllergyIntoleranceReactionComponentProperties(json, owner, res); - return res; - } - - protected void parseAllergyIntoleranceAllergyIntoleranceReactionComponentProperties(JsonObject json, AllergyIntolerance owner, AllergyIntolerance.AllergyIntoleranceReactionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("substance")) - res.setSubstance(parseCodeableConcept(json.getAsJsonObject("substance"))); - if (json.has("manifestation")) { - JsonArray array = json.getAsJsonArray("manifestation"); - for (int i = 0; i < array.size(); i++) { - res.getManifestation().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("onset")) - res.setOnsetElement(parseDateTime(json.get("onset").getAsString())); - if (json.has("_onset")) - parseElementProperties(json.getAsJsonObject("_onset"), res.getOnsetElement()); - if (json.has("severity")) - res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), AllergyIntolerance.AllergyIntoleranceSeverity.NULL, new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory())); - if (json.has("_severity")) - parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); - if (json.has("exposureRoute")) - res.setExposureRoute(parseCodeableConcept(json.getAsJsonObject("exposureRoute"))); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected Appointment parseAppointment(JsonObject json) throws IOException, FHIRFormatError { - Appointment res = new Appointment(); - parseAppointmentProperties(json, res); - return res; - } - - protected void parseAppointmentProperties(JsonObject json, Appointment res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Appointment.AppointmentStatus.NULL, new Appointment.AppointmentStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("serviceCategory")) - res.setServiceCategory(parseCodeableConcept(json.getAsJsonObject("serviceCategory"))); - if (json.has("serviceType")) { - JsonArray array = json.getAsJsonArray("serviceType"); - for (int i = 0; i < array.size(); i++) { - res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialty")) { - JsonArray array = json.getAsJsonArray("specialty"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("appointmentType")) - res.setAppointmentType(parseCodeableConcept(json.getAsJsonObject("appointmentType"))); - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("indication")) { - JsonArray array = json.getAsJsonArray("indication"); - for (int i = 0; i < array.size(); i++) { - res.getIndication().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("priority")) - res.setPriorityElement(parseUnsignedInt(json.get("priority").getAsString())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("supportingInformation")) { - JsonArray array = json.getAsJsonArray("supportingInformation"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("start")) - res.setStartElement(parseInstant(json.get("start").getAsString())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("end")) - res.setEndElement(parseInstant(json.get("end").getAsString())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - if (json.has("minutesDuration")) - res.setMinutesDurationElement(parsePositiveInt(json.get("minutesDuration").getAsString())); - if (json.has("_minutesDuration")) - parseElementProperties(json.getAsJsonObject("_minutesDuration"), res.getMinutesDurationElement()); - if (json.has("slot")) { - JsonArray array = json.getAsJsonArray("slot"); - for (int i = 0; i < array.size(); i++) { - res.getSlot().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("incomingReferral")) { - JsonArray array = json.getAsJsonArray("incomingReferral"); - for (int i = 0; i < array.size(); i++) { - res.getIncomingReferral().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseAppointmentAppointmentParticipantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("requestedPeriod")) { - JsonArray array = json.getAsJsonArray("requestedPeriod"); - for (int i = 0; i < array.size(); i++) { - res.getRequestedPeriod().add(parsePeriod(array.get(i).getAsJsonObject())); - } - }; - } - - protected Appointment.AppointmentParticipantComponent parseAppointmentAppointmentParticipantComponent(JsonObject json, Appointment owner) throws IOException, FHIRFormatError { - Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent(); - parseAppointmentAppointmentParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parseAppointmentAppointmentParticipantComponentProperties(JsonObject json, Appointment owner, Appointment.AppointmentParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - if (json.has("required")) - res.setRequiredElement(parseEnumeration(json.get("required").getAsString(), Appointment.ParticipantRequired.NULL, new Appointment.ParticipantRequiredEnumFactory())); - if (json.has("_required")) - parseElementProperties(json.getAsJsonObject("_required"), res.getRequiredElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Appointment.ParticipationStatus.NULL, new Appointment.ParticipationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - } - - protected AppointmentResponse parseAppointmentResponse(JsonObject json) throws IOException, FHIRFormatError { - AppointmentResponse res = new AppointmentResponse(); - parseAppointmentResponseProperties(json, res); - return res; - } - - protected void parseAppointmentResponseProperties(JsonObject json, AppointmentResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("appointment")) - res.setAppointment(parseReference(json.getAsJsonObject("appointment"))); - if (json.has("start")) - res.setStartElement(parseInstant(json.get("start").getAsString())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("end")) - res.setEndElement(parseInstant(json.get("end").getAsString())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - if (json.has("participantType")) { - JsonArray array = json.getAsJsonArray("participantType"); - for (int i = 0; i < array.size(); i++) { - res.getParticipantType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - if (json.has("participantStatus")) - res.setParticipantStatusElement(parseEnumeration(json.get("participantStatus").getAsString(), AppointmentResponse.ParticipantStatus.NULL, new AppointmentResponse.ParticipantStatusEnumFactory())); - if (json.has("_participantStatus")) - parseElementProperties(json.getAsJsonObject("_participantStatus"), res.getParticipantStatusElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected AuditEvent parseAuditEvent(JsonObject json) throws IOException, FHIRFormatError { - AuditEvent res = new AuditEvent(); - parseAuditEventProperties(json, res); - return res; - } - - protected void parseAuditEventProperties(JsonObject json, AuditEvent res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("type")) - res.setType(parseCoding(json.getAsJsonObject("type"))); - if (json.has("subtype")) { - JsonArray array = json.getAsJsonArray("subtype"); - for (int i = 0; i < array.size(); i++) { - res.getSubtype().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("action")) - res.setActionElement(parseEnumeration(json.get("action").getAsString(), AuditEvent.AuditEventAction.NULL, new AuditEvent.AuditEventActionEnumFactory())); - if (json.has("_action")) - parseElementProperties(json.getAsJsonObject("_action"), res.getActionElement()); - if (json.has("recorded")) - res.setRecordedElement(parseInstant(json.get("recorded").getAsString())); - if (json.has("_recorded")) - parseElementProperties(json.getAsJsonObject("_recorded"), res.getRecordedElement()); - if (json.has("outcome")) - res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), AuditEvent.AuditEventOutcome.NULL, new AuditEvent.AuditEventOutcomeEnumFactory())); - if (json.has("_outcome")) - parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); - if (json.has("outcomeDesc")) - res.setOutcomeDescElement(parseString(json.get("outcomeDesc").getAsString())); - if (json.has("_outcomeDesc")) - parseElementProperties(json.getAsJsonObject("_outcomeDesc"), res.getOutcomeDescElement()); - if (json.has("purposeOfEvent")) { - JsonArray array = json.getAsJsonArray("purposeOfEvent"); - for (int i = 0; i < array.size(); i++) { - res.getPurposeOfEvent().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("agent")) { - JsonArray array = json.getAsJsonArray("agent"); - for (int i = 0; i < array.size(); i++) { - res.getAgent().add(parseAuditEventAuditEventAgentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("source")) - res.setSource(parseAuditEventAuditEventSourceComponent(json.getAsJsonObject("source"), res)); - if (json.has("entity")) { - JsonArray array = json.getAsJsonArray("entity"); - for (int i = 0; i < array.size(); i++) { - res.getEntity().add(parseAuditEventAuditEventEntityComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected AuditEvent.AuditEventAgentComponent parseAuditEventAuditEventAgentComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { - AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent(); - parseAuditEventAuditEventAgentComponentProperties(json, owner, res); - return res; - } - - protected void parseAuditEventAuditEventAgentComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventAgentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) { - JsonArray array = json.getAsJsonArray("role"); - for (int i = 0; i < array.size(); i++) { - res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reference")) - res.setReference(parseReference(json.getAsJsonObject("reference"))); - if (json.has("userId")) - res.setUserId(parseIdentifier(json.getAsJsonObject("userId"))); - if (json.has("altId")) - res.setAltIdElement(parseString(json.get("altId").getAsString())); - if (json.has("_altId")) - parseElementProperties(json.getAsJsonObject("_altId"), res.getAltIdElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("requestor")) - res.setRequestorElement(parseBoolean(json.get("requestor").getAsBoolean())); - if (json.has("_requestor")) - parseElementProperties(json.getAsJsonObject("_requestor"), res.getRequestorElement()); - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("policy")) { - JsonArray array = json.getAsJsonArray("policy"); - for (int i = 0; i < array.size(); i++) { - res.getPolicy().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_policy")) { - JsonArray array = json.getAsJsonArray("_policy"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPolicy().size()) - res.getPolicy().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPolicy().get(i)); - } - }; - if (json.has("media")) - res.setMedia(parseCoding(json.getAsJsonObject("media"))); - if (json.has("network")) - res.setNetwork(parseAuditEventAuditEventAgentNetworkComponent(json.getAsJsonObject("network"), owner)); - if (json.has("purposeOfUse")) { - JsonArray array = json.getAsJsonArray("purposeOfUse"); - for (int i = 0; i < array.size(); i++) { - res.getPurposeOfUse().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected AuditEvent.AuditEventAgentNetworkComponent parseAuditEventAuditEventAgentNetworkComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { - AuditEvent.AuditEventAgentNetworkComponent res = new AuditEvent.AuditEventAgentNetworkComponent(); - parseAuditEventAuditEventAgentNetworkComponentProperties(json, owner, res); - return res; - } - - protected void parseAuditEventAuditEventAgentNetworkComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventAgentNetworkComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("address")) - res.setAddressElement(parseString(json.get("address").getAsString())); - if (json.has("_address")) - parseElementProperties(json.getAsJsonObject("_address"), res.getAddressElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), AuditEvent.AuditEventAgentNetworkType.NULL, new AuditEvent.AuditEventAgentNetworkTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - } - - protected AuditEvent.AuditEventSourceComponent parseAuditEventAuditEventSourceComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { - AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent(); - parseAuditEventAuditEventSourceComponentProperties(json, owner, res); - return res; - } - - protected void parseAuditEventAuditEventSourceComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventSourceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("site")) - res.setSiteElement(parseString(json.get("site").getAsString())); - if (json.has("_site")) - parseElementProperties(json.getAsJsonObject("_site"), res.getSiteElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - } - - protected AuditEvent.AuditEventEntityComponent parseAuditEventAuditEventEntityComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { - AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent(); - parseAuditEventAuditEventEntityComponentProperties(json, owner, res); - return res; - } - - protected void parseAuditEventAuditEventEntityComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventEntityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("reference")) - res.setReference(parseReference(json.getAsJsonObject("reference"))); - if (json.has("type")) - res.setType(parseCoding(json.getAsJsonObject("type"))); - if (json.has("role")) - res.setRole(parseCoding(json.getAsJsonObject("role"))); - if (json.has("lifecycle")) - res.setLifecycle(parseCoding(json.getAsJsonObject("lifecycle"))); - if (json.has("securityLabel")) { - JsonArray array = json.getAsJsonArray("securityLabel"); - for (int i = 0; i < array.size(); i++) { - res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("query")) - res.setQueryElement(parseBase64Binary(json.get("query").getAsString())); - if (json.has("_query")) - parseElementProperties(json.getAsJsonObject("_query"), res.getQueryElement()); - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parseAuditEventAuditEventEntityDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventAuditEventEntityDetailComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { - AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent(); - parseAuditEventAuditEventEntityDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseAuditEventAuditEventEntityDetailComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventEntityDetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseString(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("value")) - res.setValueElement(parseBase64Binary(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected Basic parseBasic(JsonObject json) throws IOException, FHIRFormatError { - Basic res = new Basic(); - parseBasicProperties(json, res); - return res; - } - - protected void parseBasicProperties(JsonObject json, Basic res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("created")) - res.setCreatedElement(parseDate(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - } - - protected Binary parseBinary(JsonObject json) throws IOException, FHIRFormatError { - Binary res = new Binary(); - parseBinaryProperties(json, res); - return res; - } - - protected void parseBinaryProperties(JsonObject json, Binary res) throws IOException, FHIRFormatError { - parseResourceProperties(json, res); - if (json.has("contentType")) - res.setContentTypeElement(parseCode(json.get("contentType").getAsString())); - if (json.has("_contentType")) - parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); - if (json.has("securityContext")) - res.setSecurityContext(parseReference(json.getAsJsonObject("securityContext"))); - if (json.has("content")) - res.setContentElement(parseBase64Binary(json.get("content").getAsString())); - if (json.has("_content")) - parseElementProperties(json.getAsJsonObject("_content"), res.getContentElement()); - } - - protected BodyStructure parseBodyStructure(JsonObject json) throws IOException, FHIRFormatError { - BodyStructure res = new BodyStructure(); - parseBodyStructureProperties(json, res); - return res; - } - - protected void parseBodyStructureProperties(JsonObject json, BodyStructure res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("morphology")) - res.setMorphology(parseCodeableConcept(json.getAsJsonObject("morphology"))); - if (json.has("location")) - res.setLocation(parseCodeableConcept(json.getAsJsonObject("location"))); - if (json.has("locationQualifier")) { - JsonArray array = json.getAsJsonArray("locationQualifier"); - for (int i = 0; i < array.size(); i++) { - res.getLocationQualifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("image")) { - JsonArray array = json.getAsJsonArray("image"); - for (int i = 0; i < array.size(); i++) { - res.getImage().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - } - - protected Bundle parseBundle(JsonObject json) throws IOException, FHIRFormatError { - Bundle res = new Bundle(); - parseBundleProperties(json, res); - return res; - } - - protected void parseBundleProperties(JsonObject json, Bundle res) throws IOException, FHIRFormatError { - parseResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Bundle.BundleType.NULL, new Bundle.BundleTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("total")) - res.setTotalElement(parseUnsignedInt(json.get("total").getAsString())); - if (json.has("_total")) - parseElementProperties(json.getAsJsonObject("_total"), res.getTotalElement()); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parseBundleBundleLinkComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("entry")) { - JsonArray array = json.getAsJsonArray("entry"); - for (int i = 0; i < array.size(); i++) { - res.getEntry().add(parseBundleBundleEntryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("signature")) - res.setSignature(parseSignature(json.getAsJsonObject("signature"))); - } - - protected Bundle.BundleLinkComponent parseBundleBundleLinkComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { - Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent(); - parseBundleBundleLinkComponentProperties(json, owner, res); - return res; - } - - protected void parseBundleBundleLinkComponentProperties(JsonObject json, Bundle owner, Bundle.BundleLinkComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("relation")) - res.setRelationElement(parseString(json.get("relation").getAsString())); - if (json.has("_relation")) - parseElementProperties(json.getAsJsonObject("_relation"), res.getRelationElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - } - - protected Bundle.BundleEntryComponent parseBundleBundleEntryComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { - Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent(); - parseBundleBundleEntryComponentProperties(json, owner, res); - return res; - } - - protected void parseBundleBundleEntryComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parseBundleBundleLinkComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("fullUrl")) - res.setFullUrlElement(parseUri(json.get("fullUrl").getAsString())); - if (json.has("_fullUrl")) - parseElementProperties(json.getAsJsonObject("_fullUrl"), res.getFullUrlElement()); - if (json.has("resource")) - res.setResource(parseResource(json.getAsJsonObject("resource"))); - if (json.has("search")) - res.setSearch(parseBundleBundleEntrySearchComponent(json.getAsJsonObject("search"), owner)); - if (json.has("request")) - res.setRequest(parseBundleBundleEntryRequestComponent(json.getAsJsonObject("request"), owner)); - if (json.has("response")) - res.setResponse(parseBundleBundleEntryResponseComponent(json.getAsJsonObject("response"), owner)); - } - - protected Bundle.BundleEntrySearchComponent parseBundleBundleEntrySearchComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { - Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent(); - parseBundleBundleEntrySearchComponentProperties(json, owner, res); - return res; - } - - protected void parseBundleBundleEntrySearchComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntrySearchComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Bundle.SearchEntryMode.NULL, new Bundle.SearchEntryModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("score")) - res.setScoreElement(parseDecimal(json.get("score").getAsBigDecimal())); - if (json.has("_score")) - parseElementProperties(json.getAsJsonObject("_score"), res.getScoreElement()); - } - - protected Bundle.BundleEntryRequestComponent parseBundleBundleEntryRequestComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { - Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent(); - parseBundleBundleEntryRequestComponentProperties(json, owner, res); - return res; - } - - protected void parseBundleBundleEntryRequestComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntryRequestComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("method")) - res.setMethodElement(parseEnumeration(json.get("method").getAsString(), Bundle.HTTPVerb.NULL, new Bundle.HTTPVerbEnumFactory())); - if (json.has("_method")) - parseElementProperties(json.getAsJsonObject("_method"), res.getMethodElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("ifNoneMatch")) - res.setIfNoneMatchElement(parseString(json.get("ifNoneMatch").getAsString())); - if (json.has("_ifNoneMatch")) - parseElementProperties(json.getAsJsonObject("_ifNoneMatch"), res.getIfNoneMatchElement()); - if (json.has("ifModifiedSince")) - res.setIfModifiedSinceElement(parseInstant(json.get("ifModifiedSince").getAsString())); - if (json.has("_ifModifiedSince")) - parseElementProperties(json.getAsJsonObject("_ifModifiedSince"), res.getIfModifiedSinceElement()); - if (json.has("ifMatch")) - res.setIfMatchElement(parseString(json.get("ifMatch").getAsString())); - if (json.has("_ifMatch")) - parseElementProperties(json.getAsJsonObject("_ifMatch"), res.getIfMatchElement()); - if (json.has("ifNoneExist")) - res.setIfNoneExistElement(parseString(json.get("ifNoneExist").getAsString())); - if (json.has("_ifNoneExist")) - parseElementProperties(json.getAsJsonObject("_ifNoneExist"), res.getIfNoneExistElement()); - } - - protected Bundle.BundleEntryResponseComponent parseBundleBundleEntryResponseComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { - Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent(); - parseBundleBundleEntryResponseComponentProperties(json, owner, res); - return res; - } - - protected void parseBundleBundleEntryResponseComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntryResponseComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("status")) - res.setStatusElement(parseString(json.get("status").getAsString())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("location")) - res.setLocationElement(parseUri(json.get("location").getAsString())); - if (json.has("_location")) - parseElementProperties(json.getAsJsonObject("_location"), res.getLocationElement()); - if (json.has("etag")) - res.setEtagElement(parseString(json.get("etag").getAsString())); - if (json.has("_etag")) - parseElementProperties(json.getAsJsonObject("_etag"), res.getEtagElement()); - if (json.has("lastModified")) - res.setLastModifiedElement(parseInstant(json.get("lastModified").getAsString())); - if (json.has("_lastModified")) - parseElementProperties(json.getAsJsonObject("_lastModified"), res.getLastModifiedElement()); - if (json.has("outcome")) - res.setOutcome(parseResource(json.getAsJsonObject("outcome"))); - } - - protected CapabilityStatement parseCapabilityStatement(JsonObject json) throws IOException, FHIRFormatError { - CapabilityStatement res = new CapabilityStatement(); - parseCapabilityStatementProperties(json, res); - return res; - } - - protected void parseCapabilityStatementProperties(JsonObject json, CapabilityStatement res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), CapabilityStatement.CapabilityStatementKind.NULL, new CapabilityStatement.CapabilityStatementKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("instantiates")) { - JsonArray array = json.getAsJsonArray("instantiates"); - for (int i = 0; i < array.size(); i++) { - res.getInstantiates().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_instantiates")) { - JsonArray array = json.getAsJsonArray("_instantiates"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getInstantiates().size()) - res.getInstantiates().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getInstantiates().get(i)); - } - }; - if (json.has("software")) - res.setSoftware(parseCapabilityStatementCapabilityStatementSoftwareComponent(json.getAsJsonObject("software"), res)); - if (json.has("implementation")) - res.setImplementation(parseCapabilityStatementCapabilityStatementImplementationComponent(json.getAsJsonObject("implementation"), res)); - if (json.has("fhirVersion")) - res.setFhirVersionElement(parseId(json.get("fhirVersion").getAsString())); - if (json.has("_fhirVersion")) - parseElementProperties(json.getAsJsonObject("_fhirVersion"), res.getFhirVersionElement()); - if (json.has("acceptUnknown")) - res.setAcceptUnknownElement(parseEnumeration(json.get("acceptUnknown").getAsString(), CapabilityStatement.UnknownContentCode.NULL, new CapabilityStatement.UnknownContentCodeEnumFactory())); - if (json.has("_acceptUnknown")) - parseElementProperties(json.getAsJsonObject("_acceptUnknown"), res.getAcceptUnknownElement()); - if (json.has("format")) { - JsonArray array = json.getAsJsonArray("format"); - for (int i = 0; i < array.size(); i++) { - res.getFormat().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_format")) { - JsonArray array = json.getAsJsonArray("_format"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getFormat().size()) - res.getFormat().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getFormat().get(i)); - } - }; - if (json.has("patchFormat")) { - JsonArray array = json.getAsJsonArray("patchFormat"); - for (int i = 0; i < array.size(); i++) { - res.getPatchFormat().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_patchFormat")) { - JsonArray array = json.getAsJsonArray("_patchFormat"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPatchFormat().size()) - res.getPatchFormat().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPatchFormat().get(i)); - } - }; - if (json.has("implementationGuide")) { - JsonArray array = json.getAsJsonArray("implementationGuide"); - for (int i = 0; i < array.size(); i++) { - res.getImplementationGuide().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_implementationGuide")) { - JsonArray array = json.getAsJsonArray("_implementationGuide"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getImplementationGuide().size()) - res.getImplementationGuide().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getImplementationGuide().get(i)); - } - }; - if (json.has("profile")) { - JsonArray array = json.getAsJsonArray("profile"); - for (int i = 0; i < array.size(); i++) { - res.getProfile().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("rest")) { - JsonArray array = json.getAsJsonArray("rest"); - for (int i = 0; i < array.size(); i++) { - res.getRest().add(parseCapabilityStatementCapabilityStatementRestComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("messaging")) { - JsonArray array = json.getAsJsonArray("messaging"); - for (int i = 0; i < array.size(); i++) { - res.getMessaging().add(parseCapabilityStatementCapabilityStatementMessagingComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("document")) { - JsonArray array = json.getAsJsonArray("document"); - for (int i = 0; i < array.size(); i++) { - res.getDocument().add(parseCapabilityStatementCapabilityStatementDocumentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementCapabilityStatementSoftwareComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent(); - parseCapabilityStatementCapabilityStatementSoftwareComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementSoftwareComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementSoftwareComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("releaseDate")) - res.setReleaseDateElement(parseDateTime(json.get("releaseDate").getAsString())); - if (json.has("_releaseDate")) - parseElementProperties(json.getAsJsonObject("_releaseDate"), res.getReleaseDateElement()); - } - - protected CapabilityStatement.CapabilityStatementImplementationComponent parseCapabilityStatementCapabilityStatementImplementationComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent(); - parseCapabilityStatementCapabilityStatementImplementationComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementImplementationComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementImplementationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - } - - protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementCapabilityStatementRestComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent(); - parseCapabilityStatementCapabilityStatementRestComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementRestComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.RestfulCapabilityMode.NULL, new CapabilityStatement.RestfulCapabilityModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("security")) - res.setSecurity(parseCapabilityStatementCapabilityStatementRestSecurityComponent(json.getAsJsonObject("security"), owner)); - if (json.has("resource")) { - JsonArray array = json.getAsJsonArray("resource"); - for (int i = 0; i < array.size(); i++) { - res.getResource().add(parseCapabilityStatementCapabilityStatementRestResourceComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("interaction")) { - JsonArray array = json.getAsJsonArray("interaction"); - for (int i = 0; i < array.size(); i++) { - res.getInteraction().add(parseCapabilityStatementSystemInteractionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("searchParam")) { - JsonArray array = json.getAsJsonArray("searchParam"); - for (int i = 0; i < array.size(); i++) { - res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("operation")) { - JsonArray array = json.getAsJsonArray("operation"); - for (int i = 0; i < array.size(); i++) { - res.getOperation().add(parseCapabilityStatementCapabilityStatementRestOperationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("compartment")) { - JsonArray array = json.getAsJsonArray("compartment"); - for (int i = 0; i < array.size(); i++) { - res.getCompartment().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_compartment")) { - JsonArray array = json.getAsJsonArray("_compartment"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getCompartment().size()) - res.getCompartment().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getCompartment().get(i)); - } - }; - } - - protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementCapabilityStatementRestSecurityComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent(); - parseCapabilityStatementCapabilityStatementRestSecurityComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementRestSecurityComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("cors")) - res.setCorsElement(parseBoolean(json.get("cors").getAsBoolean())); - if (json.has("_cors")) - parseElementProperties(json.getAsJsonObject("_cors"), res.getCorsElement()); - if (json.has("service")) { - JsonArray array = json.getAsJsonArray("service"); - for (int i = 0; i < array.size(); i++) { - res.getService().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("certificate")) { - JsonArray array = json.getAsJsonArray("certificate"); - for (int i = 0; i < array.size(); i++) { - res.getCertificate().add(parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res = new CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); - parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("blob")) - res.setBlobElement(parseBase64Binary(json.get("blob").getAsString())); - if (json.has("_blob")) - parseElementProperties(json.getAsJsonObject("_blob"), res.getBlobElement()); - } - - protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementCapabilityStatementRestResourceComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent(); - parseCapabilityStatementCapabilityStatementRestResourceComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementRestResourceComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("profile")) - res.setProfile(parseReference(json.getAsJsonObject("profile"))); - if (json.has("documentation")) - res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("interaction")) { - JsonArray array = json.getAsJsonArray("interaction"); - for (int i = 0; i < array.size(); i++) { - res.getInteraction().add(parseCapabilityStatementResourceInteractionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("versioning")) - res.setVersioningElement(parseEnumeration(json.get("versioning").getAsString(), CapabilityStatement.ResourceVersionPolicy.NULL, new CapabilityStatement.ResourceVersionPolicyEnumFactory())); - if (json.has("_versioning")) - parseElementProperties(json.getAsJsonObject("_versioning"), res.getVersioningElement()); - if (json.has("readHistory")) - res.setReadHistoryElement(parseBoolean(json.get("readHistory").getAsBoolean())); - if (json.has("_readHistory")) - parseElementProperties(json.getAsJsonObject("_readHistory"), res.getReadHistoryElement()); - if (json.has("updateCreate")) - res.setUpdateCreateElement(parseBoolean(json.get("updateCreate").getAsBoolean())); - if (json.has("_updateCreate")) - parseElementProperties(json.getAsJsonObject("_updateCreate"), res.getUpdateCreateElement()); - if (json.has("conditionalCreate")) - res.setConditionalCreateElement(parseBoolean(json.get("conditionalCreate").getAsBoolean())); - if (json.has("_conditionalCreate")) - parseElementProperties(json.getAsJsonObject("_conditionalCreate"), res.getConditionalCreateElement()); - if (json.has("conditionalRead")) - res.setConditionalReadElement(parseEnumeration(json.get("conditionalRead").getAsString(), CapabilityStatement.ConditionalReadStatus.NULL, new CapabilityStatement.ConditionalReadStatusEnumFactory())); - if (json.has("_conditionalRead")) - parseElementProperties(json.getAsJsonObject("_conditionalRead"), res.getConditionalReadElement()); - if (json.has("conditionalUpdate")) - res.setConditionalUpdateElement(parseBoolean(json.get("conditionalUpdate").getAsBoolean())); - if (json.has("_conditionalUpdate")) - parseElementProperties(json.getAsJsonObject("_conditionalUpdate"), res.getConditionalUpdateElement()); - if (json.has("conditionalDelete")) - res.setConditionalDeleteElement(parseEnumeration(json.get("conditionalDelete").getAsString(), CapabilityStatement.ConditionalDeleteStatus.NULL, new CapabilityStatement.ConditionalDeleteStatusEnumFactory())); - if (json.has("_conditionalDelete")) - parseElementProperties(json.getAsJsonObject("_conditionalDelete"), res.getConditionalDeleteElement()); - if (json.has("referencePolicy")) { - JsonArray array = json.getAsJsonArray("referencePolicy"); - for (int i = 0; i < array.size(); i++) { - res.getReferencePolicy().add(parseEnumeration(array.get(i).getAsString(), CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); - } - }; - if (json.has("_referencePolicy")) { - JsonArray array = json.getAsJsonArray("_referencePolicy"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getReferencePolicy().size()) - res.getReferencePolicy().add(parseEnumeration(null, CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getReferencePolicy().get(i)); - } - }; - if (json.has("searchInclude")) { - JsonArray array = json.getAsJsonArray("searchInclude"); - for (int i = 0; i < array.size(); i++) { - res.getSearchInclude().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_searchInclude")) { - JsonArray array = json.getAsJsonArray("_searchInclude"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSearchInclude().size()) - res.getSearchInclude().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSearchInclude().get(i)); - } - }; - if (json.has("searchRevInclude")) { - JsonArray array = json.getAsJsonArray("searchRevInclude"); - for (int i = 0; i < array.size(); i++) { - res.getSearchRevInclude().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_searchRevInclude")) { - JsonArray array = json.getAsJsonArray("_searchRevInclude"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSearchRevInclude().size()) - res.getSearchRevInclude().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSearchRevInclude().get(i)); - } - }; - if (json.has("searchParam")) { - JsonArray array = json.getAsJsonArray("searchParam"); - for (int i = 0; i < array.size(); i++) { - res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent(); - parseCapabilityStatementResourceInteractionComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementResourceInteractionComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.ResourceInteractionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CapabilityStatement.TypeRestfulInteraction.NULL, new CapabilityStatement.TypeRestfulInteractionEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); - parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("definition")) - res.setDefinitionElement(parseUri(json.get("definition").getAsString())); - if (json.has("_definition")) - parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected CapabilityStatement.SystemInteractionComponent parseCapabilityStatementSystemInteractionComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent(); - parseCapabilityStatementSystemInteractionComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementSystemInteractionComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.SystemInteractionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CapabilityStatement.SystemRestfulInteraction.NULL, new CapabilityStatement.SystemRestfulInteractionEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected CapabilityStatement.CapabilityStatementRestOperationComponent parseCapabilityStatementCapabilityStatementRestOperationComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestOperationComponent res = new CapabilityStatement.CapabilityStatementRestOperationComponent(); - parseCapabilityStatementCapabilityStatementRestOperationComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementRestOperationComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestOperationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("definition")) - res.setDefinition(parseReference(json.getAsJsonObject("definition"))); - } - - protected CapabilityStatement.CapabilityStatementMessagingComponent parseCapabilityStatementCapabilityStatementMessagingComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent(); - parseCapabilityStatementCapabilityStatementMessagingComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementMessagingComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("reliableCache")) - res.setReliableCacheElement(parseUnsignedInt(json.get("reliableCache").getAsString())); - if (json.has("_reliableCache")) - parseElementProperties(json.getAsJsonObject("_reliableCache"), res.getReliableCacheElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("supportedMessage")) { - JsonArray array = json.getAsJsonArray("supportedMessage"); - for (int i = 0; i < array.size(); i++) { - res.getSupportedMessage().add(parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("event")) { - JsonArray array = json.getAsJsonArray("event"); - for (int i = 0; i < array.size(); i++) { - res.getEvent().add(parseCapabilityStatementCapabilityStatementMessagingEventComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); - parseCapabilityStatementCapabilityStatementMessagingEndpointComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementMessagingEndpointComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEndpointComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("protocol")) - res.setProtocol(parseCoding(json.getAsJsonObject("protocol"))); - if (json.has("address")) - res.setAddressElement(parseUri(json.get("address").getAsString())); - if (json.has("_address")) - parseElementProperties(json.getAsJsonObject("_address"), res.getAddressElement()); - } - - protected CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); - parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("definition")) - res.setDefinition(parseReference(json.getAsJsonObject("definition"))); - } - - protected CapabilityStatement.CapabilityStatementMessagingEventComponent parseCapabilityStatementCapabilityStatementMessagingEventComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingEventComponent res = new CapabilityStatement.CapabilityStatementMessagingEventComponent(); - parseCapabilityStatementCapabilityStatementMessagingEventComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementMessagingEventComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEventComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCoding(json.getAsJsonObject("code"))); - if (json.has("category")) - res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), CapabilityStatement.MessageSignificanceCategory.NULL, new CapabilityStatement.MessageSignificanceCategoryEnumFactory())); - if (json.has("_category")) - parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("focus")) - res.setFocusElement(parseCode(json.get("focus").getAsString())); - if (json.has("_focus")) - parseElementProperties(json.getAsJsonObject("_focus"), res.getFocusElement()); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("response")) - res.setResponse(parseReference(json.getAsJsonObject("response"))); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected CapabilityStatement.CapabilityStatementDocumentComponent parseCapabilityStatementCapabilityStatementDocumentComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent(); - parseCapabilityStatementCapabilityStatementDocumentComponentProperties(json, owner, res); - return res; - } - - protected void parseCapabilityStatementCapabilityStatementDocumentComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementDocumentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.DocumentMode.NULL, new CapabilityStatement.DocumentModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("profile")) - res.setProfile(parseReference(json.getAsJsonObject("profile"))); - } - - protected CarePlan parseCarePlan(JsonObject json) throws IOException, FHIRFormatError { - CarePlan res = new CarePlan(); - parseCarePlanProperties(json, res); - return res; - } - - protected void parseCarePlanProperties(JsonObject json, CarePlan res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("replaces")) { - JsonArray array = json.getAsJsonArray("replaces"); - for (int i = 0; i < array.size(); i++) { - res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CarePlan.CarePlanStatus.NULL, new CarePlan.CarePlanStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("intent")) - res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), CarePlan.CarePlanIntent.NULL, new CarePlan.CarePlanIntentEnumFactory())); - if (json.has("_intent")) - parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("author")) { - JsonArray array = json.getAsJsonArray("author"); - for (int i = 0; i < array.size(); i++) { - res.getAuthor().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("careTeam")) { - JsonArray array = json.getAsJsonArray("careTeam"); - for (int i = 0; i < array.size(); i++) { - res.getCareTeam().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("addresses")) { - JsonArray array = json.getAsJsonArray("addresses"); - for (int i = 0; i < array.size(); i++) { - res.getAddresses().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("supportingInfo")) { - JsonArray array = json.getAsJsonArray("supportingInfo"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("goal")) { - JsonArray array = json.getAsJsonArray("goal"); - for (int i = 0; i < array.size(); i++) { - res.getGoal().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("activity")) { - JsonArray array = json.getAsJsonArray("activity"); - for (int i = 0; i < array.size(); i++) { - res.getActivity().add(parseCarePlanCarePlanActivityComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected CarePlan.CarePlanActivityComponent parseCarePlanCarePlanActivityComponent(JsonObject json, CarePlan owner) throws IOException, FHIRFormatError { - CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent(); - parseCarePlanCarePlanActivityComponentProperties(json, owner, res); - return res; - } - - protected void parseCarePlanCarePlanActivityComponentProperties(JsonObject json, CarePlan owner, CarePlan.CarePlanActivityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("outcomeCodeableConcept")) { - JsonArray array = json.getAsJsonArray("outcomeCodeableConcept"); - for (int i = 0; i < array.size(); i++) { - res.getOutcomeCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("outcomeReference")) { - JsonArray array = json.getAsJsonArray("outcomeReference"); - for (int i = 0; i < array.size(); i++) { - res.getOutcomeReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("progress")) { - JsonArray array = json.getAsJsonArray("progress"); - for (int i = 0; i < array.size(); i++) { - res.getProgress().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reference")) - res.setReference(parseReference(json.getAsJsonObject("reference"))); - if (json.has("detail")) - res.setDetail(parseCarePlanCarePlanActivityDetailComponent(json.getAsJsonObject("detail"), owner)); - } - - protected CarePlan.CarePlanActivityDetailComponent parseCarePlanCarePlanActivityDetailComponent(JsonObject json, CarePlan owner) throws IOException, FHIRFormatError { - CarePlan.CarePlanActivityDetailComponent res = new CarePlan.CarePlanActivityDetailComponent(); - parseCarePlanCarePlanActivityDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseCarePlanCarePlanActivityDetailComponentProperties(JsonObject json, CarePlan owner, CarePlan.CarePlanActivityDetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("definition")) - res.setDefinition(parseReference(json.getAsJsonObject("definition"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("goal")) { - JsonArray array = json.getAsJsonArray("goal"); - for (int i = 0; i < array.size(); i++) { - res.getGoal().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CarePlan.CarePlanActivityStatus.NULL, new CarePlan.CarePlanActivityStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("statusReason")) - res.setStatusReasonElement(parseString(json.get("statusReason").getAsString())); - if (json.has("_statusReason")) - parseElementProperties(json.getAsJsonObject("_statusReason"), res.getStatusReasonElement()); - if (json.has("prohibited")) - res.setProhibitedElement(parseBoolean(json.get("prohibited").getAsBoolean())); - if (json.has("_prohibited")) - parseElementProperties(json.getAsJsonObject("_prohibited"), res.getProhibitedElement()); - Type scheduled = parseType("scheduled", json); - if (scheduled != null) - res.setScheduled(scheduled); - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - Type product = parseType("product", json); - if (product != null) - res.setProduct(product); - if (json.has("dailyAmount")) - res.setDailyAmount(parseSimpleQuantity(json.getAsJsonObject("dailyAmount"))); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - } - - protected CareTeam parseCareTeam(JsonObject json) throws IOException, FHIRFormatError { - CareTeam res = new CareTeam(); - parseCareTeamProperties(json, res); - return res; - } - - protected void parseCareTeamProperties(JsonObject json, CareTeam res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CareTeam.CareTeamStatus.NULL, new CareTeam.CareTeamStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseCareTeamCareTeamParticipantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("managingOrganization")) { - JsonArray array = json.getAsJsonArray("managingOrganization"); - for (int i = 0; i < array.size(); i++) { - res.getManagingOrganization().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected CareTeam.CareTeamParticipantComponent parseCareTeamCareTeamParticipantComponent(JsonObject json, CareTeam owner) throws IOException, FHIRFormatError { - CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent(); - parseCareTeamCareTeamParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parseCareTeamCareTeamParticipantComponentProperties(JsonObject json, CareTeam owner, CareTeam.CareTeamParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("member")) - res.setMember(parseReference(json.getAsJsonObject("member"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected ChargeItem parseChargeItem(JsonObject json) throws IOException, FHIRFormatError { - ChargeItem res = new ChargeItem(); - parseChargeItemProperties(json, res); - return res; - } - - protected void parseChargeItemProperties(JsonObject json, ChargeItem res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_definition")) { - JsonArray array = json.getAsJsonArray("_definition"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDefinition().size()) - res.getDefinition().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDefinition().get(i)); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ChargeItem.ChargeItemStatus.NULL, new ChargeItem.ChargeItemStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseChargeItemChargeItemParticipantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("performingOrganization")) - res.setPerformingOrganization(parseReference(json.getAsJsonObject("performingOrganization"))); - if (json.has("requestingOrganization")) - res.setRequestingOrganization(parseReference(json.getAsJsonObject("requestingOrganization"))); - if (json.has("quantity")) - res.setQuantity(parseQuantity(json.getAsJsonObject("quantity"))); - if (json.has("bodysite")) { - JsonArray array = json.getAsJsonArray("bodysite"); - for (int i = 0; i < array.size(); i++) { - res.getBodysite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("factorOverride")) - res.setFactorOverrideElement(parseDecimal(json.get("factorOverride").getAsBigDecimal())); - if (json.has("_factorOverride")) - parseElementProperties(json.getAsJsonObject("_factorOverride"), res.getFactorOverrideElement()); - if (json.has("priceOverride")) - res.setPriceOverride(parseMoney(json.getAsJsonObject("priceOverride"))); - if (json.has("overrideReason")) - res.setOverrideReasonElement(parseString(json.get("overrideReason").getAsString())); - if (json.has("_overrideReason")) - parseElementProperties(json.getAsJsonObject("_overrideReason"), res.getOverrideReasonElement()); - if (json.has("enterer")) - res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); - if (json.has("enteredDate")) - res.setEnteredDateElement(parseDateTime(json.get("enteredDate").getAsString())); - if (json.has("_enteredDate")) - parseElementProperties(json.getAsJsonObject("_enteredDate"), res.getEnteredDateElement()); - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("service")) { - JsonArray array = json.getAsJsonArray("service"); - for (int i = 0; i < array.size(); i++) { - res.getService().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("account")) { - JsonArray array = json.getAsJsonArray("account"); - for (int i = 0; i < array.size(); i++) { - res.getAccount().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("supportingInformation")) { - JsonArray array = json.getAsJsonArray("supportingInformation"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected ChargeItem.ChargeItemParticipantComponent parseChargeItemChargeItemParticipantComponent(JsonObject json, ChargeItem owner) throws IOException, FHIRFormatError { - ChargeItem.ChargeItemParticipantComponent res = new ChargeItem.ChargeItemParticipantComponent(); - parseChargeItemChargeItemParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parseChargeItemChargeItemParticipantComponentProperties(JsonObject json, ChargeItem owner, ChargeItem.ChargeItemParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - } - - protected Claim parseClaim(JsonObject json) throws IOException, FHIRFormatError { - Claim res = new Claim(); - parseClaimProperties(json, res); - return res; - } - - protected void parseClaimProperties(JsonObject json, Claim res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Claim.ClaimStatus.NULL, new Claim.ClaimStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("subType")) { - JsonArray array = json.getAsJsonArray("subType"); - for (int i = 0; i < array.size(); i++) { - res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), Claim.Use.NULL, new Claim.UseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("billablePeriod")) - res.setBillablePeriod(parsePeriod(json.getAsJsonObject("billablePeriod"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("enterer")) - res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); - if (json.has("insurer")) - res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("priority")) - res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); - if (json.has("fundsReserve")) - res.setFundsReserve(parseCodeableConcept(json.getAsJsonObject("fundsReserve"))); - if (json.has("related")) { - JsonArray array = json.getAsJsonArray("related"); - for (int i = 0; i < array.size(); i++) { - res.getRelated().add(parseClaimRelatedClaimComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("prescription")) - res.setPrescription(parseReference(json.getAsJsonObject("prescription"))); - if (json.has("originalPrescription")) - res.setOriginalPrescription(parseReference(json.getAsJsonObject("originalPrescription"))); - if (json.has("payee")) - res.setPayee(parseClaimPayeeComponent(json.getAsJsonObject("payee"), res)); - if (json.has("referral")) - res.setReferral(parseReference(json.getAsJsonObject("referral"))); - if (json.has("facility")) - res.setFacility(parseReference(json.getAsJsonObject("facility"))); - if (json.has("careTeam")) { - JsonArray array = json.getAsJsonArray("careTeam"); - for (int i = 0; i < array.size(); i++) { - res.getCareTeam().add(parseClaimCareTeamComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("information")) { - JsonArray array = json.getAsJsonArray("information"); - for (int i = 0; i < array.size(); i++) { - res.getInformation().add(parseClaimSpecialConditionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("diagnosis")) { - JsonArray array = json.getAsJsonArray("diagnosis"); - for (int i = 0; i < array.size(); i++) { - res.getDiagnosis().add(parseClaimDiagnosisComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("procedure")) { - JsonArray array = json.getAsJsonArray("procedure"); - for (int i = 0; i < array.size(); i++) { - res.getProcedure().add(parseClaimProcedureComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("insurance")) { - JsonArray array = json.getAsJsonArray("insurance"); - for (int i = 0; i < array.size(); i++) { - res.getInsurance().add(parseClaimInsuranceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("accident")) - res.setAccident(parseClaimAccidentComponent(json.getAsJsonObject("accident"), res)); - if (json.has("employmentImpacted")) - res.setEmploymentImpacted(parsePeriod(json.getAsJsonObject("employmentImpacted"))); - if (json.has("hospitalization")) - res.setHospitalization(parsePeriod(json.getAsJsonObject("hospitalization"))); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseClaimItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("total")) - res.setTotal(parseMoney(json.getAsJsonObject("total"))); - } - - protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent(); - parseClaimRelatedClaimComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimRelatedClaimComponentProperties(JsonObject json, Claim owner, Claim.RelatedClaimComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("claim")) - res.setClaim(parseReference(json.getAsJsonObject("claim"))); - if (json.has("relationship")) - res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); - if (json.has("reference")) - res.setReference(parseIdentifier(json.getAsJsonObject("reference"))); - } - - protected Claim.PayeeComponent parseClaimPayeeComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.PayeeComponent res = new Claim.PayeeComponent(); - parseClaimPayeeComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimPayeeComponentProperties(JsonObject json, Claim owner, Claim.PayeeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("resource")) - res.setResource(parseCoding(json.getAsJsonObject("resource"))); - if (json.has("party")) - res.setParty(parseReference(json.getAsJsonObject("party"))); - } - - protected Claim.CareTeamComponent parseClaimCareTeamComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.CareTeamComponent res = new Claim.CareTeamComponent(); - parseClaimCareTeamComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimCareTeamComponentProperties(JsonObject json, Claim owner, Claim.CareTeamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("responsible")) - res.setResponsibleElement(parseBoolean(json.get("responsible").getAsBoolean())); - if (json.has("_responsible")) - parseElementProperties(json.getAsJsonObject("_responsible"), res.getResponsibleElement()); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("qualification")) - res.setQualification(parseCodeableConcept(json.getAsJsonObject("qualification"))); - } - - protected Claim.SpecialConditionComponent parseClaimSpecialConditionComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.SpecialConditionComponent res = new Claim.SpecialConditionComponent(); - parseClaimSpecialConditionComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimSpecialConditionComponentProperties(JsonObject json, Claim owner, Claim.SpecialConditionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - Type timing = parseType("timing", json); - if (timing != null) - res.setTiming(timing); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - } - - protected Claim.DiagnosisComponent parseClaimDiagnosisComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.DiagnosisComponent res = new Claim.DiagnosisComponent(); - parseClaimDiagnosisComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimDiagnosisComponentProperties(JsonObject json, Claim owner, Claim.DiagnosisComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - Type diagnosis = parseType("diagnosis", json); - if (diagnosis != null) - res.setDiagnosis(diagnosis); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("packageCode")) - res.setPackageCode(parseCodeableConcept(json.getAsJsonObject("packageCode"))); - } - - protected Claim.ProcedureComponent parseClaimProcedureComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.ProcedureComponent res = new Claim.ProcedureComponent(); - parseClaimProcedureComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimProcedureComponentProperties(JsonObject json, Claim owner, Claim.ProcedureComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - Type procedure = parseType("procedure", json); - if (procedure != null) - res.setProcedure(procedure); - } - - protected Claim.InsuranceComponent parseClaimInsuranceComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.InsuranceComponent res = new Claim.InsuranceComponent(); - parseClaimInsuranceComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimInsuranceComponentProperties(JsonObject json, Claim owner, Claim.InsuranceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("focal")) - res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean())); - if (json.has("_focal")) - parseElementProperties(json.getAsJsonObject("_focal"), res.getFocalElement()); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - if (json.has("businessArrangement")) - res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString())); - if (json.has("_businessArrangement")) - parseElementProperties(json.getAsJsonObject("_businessArrangement"), res.getBusinessArrangementElement()); - if (json.has("preAuthRef")) { - JsonArray array = json.getAsJsonArray("preAuthRef"); - for (int i = 0; i < array.size(); i++) { - res.getPreAuthRef().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_preAuthRef")) { - JsonArray array = json.getAsJsonArray("_preAuthRef"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPreAuthRef().size()) - res.getPreAuthRef().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i)); - } - }; - if (json.has("claimResponse")) - res.setClaimResponse(parseReference(json.getAsJsonObject("claimResponse"))); - } - - protected Claim.AccidentComponent parseClaimAccidentComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.AccidentComponent res = new Claim.AccidentComponent(); - parseClaimAccidentComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimAccidentComponentProperties(JsonObject json, Claim owner, Claim.AccidentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("date")) - res.setDateElement(parseDate(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - Type location = parseType("location", json); - if (location != null) - res.setLocation(location); - } - - protected Claim.ItemComponent parseClaimItemComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.ItemComponent res = new Claim.ItemComponent(); - parseClaimItemComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimItemComponentProperties(JsonObject json, Claim owner, Claim.ItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("careTeamLinkId")) { - JsonArray array = json.getAsJsonArray("careTeamLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getCareTeamLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_careTeamLinkId")) { - JsonArray array = json.getAsJsonArray("_careTeamLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getCareTeamLinkId().size()) - res.getCareTeamLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getCareTeamLinkId().get(i)); - } - }; - if (json.has("diagnosisLinkId")) { - JsonArray array = json.getAsJsonArray("diagnosisLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getDiagnosisLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_diagnosisLinkId")) { - JsonArray array = json.getAsJsonArray("_diagnosisLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDiagnosisLinkId().size()) - res.getDiagnosisLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDiagnosisLinkId().get(i)); - } - }; - if (json.has("procedureLinkId")) { - JsonArray array = json.getAsJsonArray("procedureLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getProcedureLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_procedureLinkId")) { - JsonArray array = json.getAsJsonArray("_procedureLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getProcedureLinkId().size()) - res.getProcedureLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getProcedureLinkId().get(i)); - } - }; - if (json.has("informationLinkId")) { - JsonArray array = json.getAsJsonArray("informationLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getInformationLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_informationLinkId")) { - JsonArray array = json.getAsJsonArray("_informationLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getInformationLinkId().size()) - res.getInformationLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getInformationLinkId().get(i)); - } - }; - if (json.has("revenue")) - res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("programCode")) { - JsonArray array = json.getAsJsonArray("programCode"); - for (int i = 0; i < array.size(); i++) { - res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - Type serviced = parseType("serviced", json); - if (serviced != null) - res.setServiced(serviced); - Type location = parseType("location", json); - if (location != null) - res.setLocation(location); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - if (json.has("udi")) { - JsonArray array = json.getAsJsonArray("udi"); - for (int i = 0; i < array.size(); i++) { - res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) - res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); - if (json.has("subSite")) { - JsonArray array = json.getAsJsonArray("subSite"); - for (int i = 0; i < array.size(); i++) { - res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("encounter")) { - JsonArray array = json.getAsJsonArray("encounter"); - for (int i = 0; i < array.size(); i++) { - res.getEncounter().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parseClaimDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Claim.DetailComponent parseClaimDetailComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.DetailComponent res = new Claim.DetailComponent(); - parseClaimDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimDetailComponentProperties(JsonObject json, Claim owner, Claim.DetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("revenue")) - res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("programCode")) { - JsonArray array = json.getAsJsonArray("programCode"); - for (int i = 0; i < array.size(); i++) { - res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - if (json.has("udi")) { - JsonArray array = json.getAsJsonArray("udi"); - for (int i = 0; i < array.size(); i++) { - res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("subDetail")) { - JsonArray array = json.getAsJsonArray("subDetail"); - for (int i = 0; i < array.size(); i++) { - res.getSubDetail().add(parseClaimSubDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Claim.SubDetailComponent parseClaimSubDetailComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { - Claim.SubDetailComponent res = new Claim.SubDetailComponent(); - parseClaimSubDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimSubDetailComponentProperties(JsonObject json, Claim owner, Claim.SubDetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("revenue")) - res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("programCode")) { - JsonArray array = json.getAsJsonArray("programCode"); - for (int i = 0; i < array.size(); i++) { - res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - if (json.has("udi")) { - JsonArray array = json.getAsJsonArray("udi"); - for (int i = 0; i < array.size(); i++) { - res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected ClaimResponse parseClaimResponse(JsonObject json) throws IOException, FHIRFormatError { - ClaimResponse res = new ClaimResponse(); - parseClaimResponseProperties(json, res); - return res; - } - - protected void parseClaimResponseProperties(JsonObject json, ClaimResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ClaimResponse.ClaimResponseStatus.NULL, new ClaimResponse.ClaimResponseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("insurer")) - res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); - if (json.has("requestProvider")) - res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); - if (json.has("requestOrganization")) - res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("disposition")) - res.setDispositionElement(parseString(json.get("disposition").getAsString())); - if (json.has("_disposition")) - parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); - if (json.has("payeeType")) - res.setPayeeType(parseCodeableConcept(json.getAsJsonObject("payeeType"))); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseClaimResponseItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("addItem")) { - JsonArray array = json.getAsJsonArray("addItem"); - for (int i = 0; i < array.size(); i++) { - res.getAddItem().add(parseClaimResponseAddedItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("error")) { - JsonArray array = json.getAsJsonArray("error"); - for (int i = 0; i < array.size(); i++) { - res.getError().add(parseClaimResponseErrorComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("totalCost")) - res.setTotalCost(parseMoney(json.getAsJsonObject("totalCost"))); - if (json.has("unallocDeductable")) - res.setUnallocDeductable(parseMoney(json.getAsJsonObject("unallocDeductable"))); - if (json.has("totalBenefit")) - res.setTotalBenefit(parseMoney(json.getAsJsonObject("totalBenefit"))); - if (json.has("payment")) - res.setPayment(parseClaimResponsePaymentComponent(json.getAsJsonObject("payment"), res)); - if (json.has("reserved")) - res.setReserved(parseCoding(json.getAsJsonObject("reserved"))); - if (json.has("form")) - res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); - if (json.has("processNote")) { - JsonArray array = json.getAsJsonArray("processNote"); - for (int i = 0; i < array.size(); i++) { - res.getProcessNote().add(parseClaimResponseNoteComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("communicationRequest")) { - JsonArray array = json.getAsJsonArray("communicationRequest"); - for (int i = 0; i < array.size(); i++) { - res.getCommunicationRequest().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("insurance")) { - JsonArray array = json.getAsJsonArray("insurance"); - for (int i = 0; i < array.size(); i++) { - res.getInsurance().add(parseClaimResponseInsuranceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent(); - parseClaimResponseItemComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseItemComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.ItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) - res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); - if (json.has("_sequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parseClaimResponseItemDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent(); - parseClaimResponseAdjudicationComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseAdjudicationComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.AdjudicationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - if (json.has("amount")) - res.setAmount(parseMoney(json.getAsJsonObject("amount"))); - if (json.has("value")) - res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent(); - parseClaimResponseItemDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseItemDetailComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.ItemDetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) - res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); - if (json.has("_sequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("subDetail")) { - JsonArray array = json.getAsJsonArray("subDetail"); - for (int i = 0; i < array.size(); i++) { - res.getSubDetail().add(parseClaimResponseSubDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent(); - parseClaimResponseSubDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseSubDetailComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.SubDetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) - res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); - if (json.has("_sequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent(); - parseClaimResponseAddedItemComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseAddedItemComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.AddedItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) { - JsonArray array = json.getAsJsonArray("sequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_sequenceLinkId")) { - JsonArray array = json.getAsJsonArray("_sequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSequenceLinkId().size()) - res.getSequenceLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSequenceLinkId().get(i)); - } - }; - if (json.has("detailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("detailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getDetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_detailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("_detailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDetailSequenceLinkId().size()) - res.getDetailSequenceLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDetailSequenceLinkId().get(i)); - } - }; - if (json.has("subdetailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("subdetailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getSubdetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_subdetailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("_subdetailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSubdetailSequenceLinkId().size()) - res.getSubdetailSequenceLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSubdetailSequenceLinkId().get(i)); - } - }; - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("fee")) - res.setFee(parseMoney(json.getAsJsonObject("fee"))); - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ClaimResponse.ErrorComponent parseClaimResponseErrorComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent(); - parseClaimResponseErrorComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseErrorComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.ErrorComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) - res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); - if (json.has("_sequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); - if (json.has("detailSequenceLinkId")) - res.setDetailSequenceLinkIdElement(parsePositiveInt(json.get("detailSequenceLinkId").getAsString())); - if (json.has("_detailSequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_detailSequenceLinkId"), res.getDetailSequenceLinkIdElement()); - if (json.has("subdetailSequenceLinkId")) - res.setSubdetailSequenceLinkIdElement(parsePositiveInt(json.get("subdetailSequenceLinkId").getAsString())); - if (json.has("_subdetailSequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_subdetailSequenceLinkId"), res.getSubdetailSequenceLinkIdElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - } - - protected ClaimResponse.PaymentComponent parseClaimResponsePaymentComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent(); - parseClaimResponsePaymentComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponsePaymentComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.PaymentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("adjustment")) - res.setAdjustment(parseMoney(json.getAsJsonObject("adjustment"))); - if (json.has("adjustmentReason")) - res.setAdjustmentReason(parseCodeableConcept(json.getAsJsonObject("adjustmentReason"))); - if (json.has("date")) - res.setDateElement(parseDate(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("amount")) - res.setAmount(parseMoney(json.getAsJsonObject("amount"))); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - } - - protected ClaimResponse.NoteComponent parseClaimResponseNoteComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent(); - parseClaimResponseNoteComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseNoteComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.NoteComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("number")) - res.setNumberElement(parsePositiveInt(json.get("number").getAsString())); - if (json.has("_number")) - parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("language")) - res.setLanguage(parseCodeableConcept(json.getAsJsonObject("language"))); - } - - protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { - ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent(); - parseClaimResponseInsuranceComponentProperties(json, owner, res); - return res; - } - - protected void parseClaimResponseInsuranceComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.InsuranceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("focal")) - res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean())); - if (json.has("_focal")) - parseElementProperties(json.getAsJsonObject("_focal"), res.getFocalElement()); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - if (json.has("businessArrangement")) - res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString())); - if (json.has("_businessArrangement")) - parseElementProperties(json.getAsJsonObject("_businessArrangement"), res.getBusinessArrangementElement()); - if (json.has("preAuthRef")) { - JsonArray array = json.getAsJsonArray("preAuthRef"); - for (int i = 0; i < array.size(); i++) { - res.getPreAuthRef().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_preAuthRef")) { - JsonArray array = json.getAsJsonArray("_preAuthRef"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPreAuthRef().size()) - res.getPreAuthRef().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i)); - } - }; - if (json.has("claimResponse")) - res.setClaimResponse(parseReference(json.getAsJsonObject("claimResponse"))); - } - - protected ClinicalImpression parseClinicalImpression(JsonObject json) throws IOException, FHIRFormatError { - ClinicalImpression res = new ClinicalImpression(); - parseClinicalImpressionProperties(json, res); - return res; - } - - protected void parseClinicalImpressionProperties(JsonObject json, ClinicalImpression res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ClinicalImpression.ClinicalImpressionStatus.NULL, new ClinicalImpression.ClinicalImpressionStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type effective = parseType("effective", json); - if (effective != null) - res.setEffective(effective); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("assessor")) - res.setAssessor(parseReference(json.getAsJsonObject("assessor"))); - if (json.has("previous")) - res.setPrevious(parseReference(json.getAsJsonObject("previous"))); - if (json.has("problem")) { - JsonArray array = json.getAsJsonArray("problem"); - for (int i = 0; i < array.size(); i++) { - res.getProblem().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("investigation")) { - JsonArray array = json.getAsJsonArray("investigation"); - for (int i = 0; i < array.size(); i++) { - res.getInvestigation().add(parseClinicalImpressionClinicalImpressionInvestigationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("protocol")) { - JsonArray array = json.getAsJsonArray("protocol"); - for (int i = 0; i < array.size(); i++) { - res.getProtocol().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_protocol")) { - JsonArray array = json.getAsJsonArray("_protocol"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getProtocol().size()) - res.getProtocol().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getProtocol().get(i)); - } - }; - if (json.has("summary")) - res.setSummaryElement(parseString(json.get("summary").getAsString())); - if (json.has("_summary")) - parseElementProperties(json.getAsJsonObject("_summary"), res.getSummaryElement()); - if (json.has("finding")) { - JsonArray array = json.getAsJsonArray("finding"); - for (int i = 0; i < array.size(); i++) { - res.getFinding().add(parseClinicalImpressionClinicalImpressionFindingComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("prognosisCodeableConcept")) { - JsonArray array = json.getAsJsonArray("prognosisCodeableConcept"); - for (int i = 0; i < array.size(); i++) { - res.getPrognosisCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("prognosisReference")) { - JsonArray array = json.getAsJsonArray("prognosisReference"); - for (int i = 0; i < array.size(); i++) { - res.getPrognosisReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected ClinicalImpression.ClinicalImpressionInvestigationComponent parseClinicalImpressionClinicalImpressionInvestigationComponent(JsonObject json, ClinicalImpression owner) throws IOException, FHIRFormatError { - ClinicalImpression.ClinicalImpressionInvestigationComponent res = new ClinicalImpression.ClinicalImpressionInvestigationComponent(); - parseClinicalImpressionClinicalImpressionInvestigationComponentProperties(json, owner, res); - return res; - } - - protected void parseClinicalImpressionClinicalImpressionInvestigationComponentProperties(JsonObject json, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionInvestigationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionClinicalImpressionFindingComponent(JsonObject json, ClinicalImpression owner) throws IOException, FHIRFormatError { - ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent(); - parseClinicalImpressionClinicalImpressionFindingComponentProperties(json, owner, res); - return res; - } - - protected void parseClinicalImpressionClinicalImpressionFindingComponentProperties(JsonObject json, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionFindingComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type item = parseType("item", json); - if (item != null) - res.setItem(item); - if (json.has("basis")) - res.setBasisElement(parseString(json.get("basis").getAsString())); - if (json.has("_basis")) - parseElementProperties(json.getAsJsonObject("_basis"), res.getBasisElement()); - } - - protected CodeSystem parseCodeSystem(JsonObject json) throws IOException, FHIRFormatError { - CodeSystem res = new CodeSystem(); - parseCodeSystemProperties(json, res); - return res; - } - - protected void parseCodeSystemProperties(JsonObject json, CodeSystem res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("caseSensitive")) - res.setCaseSensitiveElement(parseBoolean(json.get("caseSensitive").getAsBoolean())); - if (json.has("_caseSensitive")) - parseElementProperties(json.getAsJsonObject("_caseSensitive"), res.getCaseSensitiveElement()); - if (json.has("valueSet")) - res.setValueSetElement(parseUri(json.get("valueSet").getAsString())); - if (json.has("_valueSet")) - parseElementProperties(json.getAsJsonObject("_valueSet"), res.getValueSetElement()); - if (json.has("hierarchyMeaning")) - res.setHierarchyMeaningElement(parseEnumeration(json.get("hierarchyMeaning").getAsString(), CodeSystem.CodeSystemHierarchyMeaning.NULL, new CodeSystem.CodeSystemHierarchyMeaningEnumFactory())); - if (json.has("_hierarchyMeaning")) - parseElementProperties(json.getAsJsonObject("_hierarchyMeaning"), res.getHierarchyMeaningElement()); - if (json.has("compositional")) - res.setCompositionalElement(parseBoolean(json.get("compositional").getAsBoolean())); - if (json.has("_compositional")) - parseElementProperties(json.getAsJsonObject("_compositional"), res.getCompositionalElement()); - if (json.has("versionNeeded")) - res.setVersionNeededElement(parseBoolean(json.get("versionNeeded").getAsBoolean())); - if (json.has("_versionNeeded")) - parseElementProperties(json.getAsJsonObject("_versionNeeded"), res.getVersionNeededElement()); - if (json.has("content")) - res.setContentElement(parseEnumeration(json.get("content").getAsString(), CodeSystem.CodeSystemContentMode.NULL, new CodeSystem.CodeSystemContentModeEnumFactory())); - if (json.has("_content")) - parseElementProperties(json.getAsJsonObject("_content"), res.getContentElement()); - if (json.has("count")) - res.setCountElement(parseUnsignedInt(json.get("count").getAsString())); - if (json.has("_count")) - parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); - if (json.has("filter")) { - JsonArray array = json.getAsJsonArray("filter"); - for (int i = 0; i < array.size(); i++) { - res.getFilter().add(parseCodeSystemCodeSystemFilterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("property")) { - JsonArray array = json.getAsJsonArray("property"); - for (int i = 0; i < array.size(); i++) { - res.getProperty().add(parseCodeSystemPropertyComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("concept")) { - JsonArray array = json.getAsJsonArray("concept"); - for (int i = 0; i < array.size(); i++) { - res.getConcept().add(parseCodeSystemConceptDefinitionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected CodeSystem.CodeSystemFilterComponent parseCodeSystemCodeSystemFilterComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { - CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent(); - parseCodeSystemCodeSystemFilterComponentProperties(json, owner, res); - return res; - } - - protected void parseCodeSystemCodeSystemFilterComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.CodeSystemFilterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("operator")) { - JsonArray array = json.getAsJsonArray("operator"); - for (int i = 0; i < array.size(); i++) { - res.getOperator().add(parseEnumeration(array.get(i).getAsString(), CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); - } - }; - if (json.has("_operator")) { - JsonArray array = json.getAsJsonArray("_operator"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getOperator().size()) - res.getOperator().add(parseEnumeration(null, CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getOperator().get(i)); - } - }; - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected CodeSystem.PropertyComponent parseCodeSystemPropertyComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { - CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent(); - parseCodeSystemPropertyComponentProperties(json, owner, res); - return res; - } - - protected void parseCodeSystemPropertyComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.PropertyComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("uri")) - res.setUriElement(parseUri(json.get("uri").getAsString())); - if (json.has("_uri")) - parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), CodeSystem.PropertyType.NULL, new CodeSystem.PropertyTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - } - - protected CodeSystem.ConceptDefinitionComponent parseCodeSystemConceptDefinitionComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { - CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent(); - parseCodeSystemConceptDefinitionComponentProperties(json, owner, res); - return res; - } - - protected void parseCodeSystemConceptDefinitionComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.ConceptDefinitionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("definition")) - res.setDefinitionElement(parseString(json.get("definition").getAsString())); - if (json.has("_definition")) - parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); - if (json.has("designation")) { - JsonArray array = json.getAsJsonArray("designation"); - for (int i = 0; i < array.size(); i++) { - res.getDesignation().add(parseCodeSystemConceptDefinitionDesignationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("property")) { - JsonArray array = json.getAsJsonArray("property"); - for (int i = 0; i < array.size(); i++) { - res.getProperty().add(parseCodeSystemConceptPropertyComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("concept")) { - JsonArray array = json.getAsJsonArray("concept"); - for (int i = 0; i < array.size(); i++) { - res.getConcept().add(parseCodeSystemConceptDefinitionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { - CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent(); - parseCodeSystemConceptDefinitionDesignationComponentProperties(json, owner, res); - return res; - } - - protected void parseCodeSystemConceptDefinitionDesignationComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.ConceptDefinitionDesignationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("use")) - res.setUse(parseCoding(json.getAsJsonObject("use"))); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { - CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent(); - parseCodeSystemConceptPropertyComponentProperties(json, owner, res); - return res; - } - - protected void parseCodeSystemConceptPropertyComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.ConceptPropertyComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected Communication parseCommunication(JsonObject json) throws IOException, FHIRFormatError { - Communication res = new Communication(); - parseCommunicationProperties(json, res); - return res; - } - - protected void parseCommunicationProperties(JsonObject json, Communication res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("inResponseTo")) { - JsonArray array = json.getAsJsonArray("inResponseTo"); - for (int i = 0; i < array.size(); i++) { - res.getInResponseTo().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Communication.CommunicationStatus.NULL, new Communication.CommunicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("notDone")) - res.setNotDoneElement(parseBoolean(json.get("notDone").getAsBoolean())); - if (json.has("_notDone")) - parseElementProperties(json.getAsJsonObject("_notDone"), res.getNotDoneElement()); - if (json.has("notDoneReason")) - res.setNotDoneReason(parseCodeableConcept(json.getAsJsonObject("notDoneReason"))); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Communication.CommunicationPriority.NULL, new Communication.CommunicationPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("medium")) { - JsonArray array = json.getAsJsonArray("medium"); - for (int i = 0; i < array.size(); i++) { - res.getMedium().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("recipient")) { - JsonArray array = json.getAsJsonArray("recipient"); - for (int i = 0; i < array.size(); i++) { - res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("sent")) - res.setSentElement(parseDateTime(json.get("sent").getAsString())); - if (json.has("_sent")) - parseElementProperties(json.getAsJsonObject("_sent"), res.getSentElement()); - if (json.has("received")) - res.setReceivedElement(parseDateTime(json.get("received").getAsString())); - if (json.has("_received")) - parseElementProperties(json.getAsJsonObject("_received"), res.getReceivedElement()); - if (json.has("sender")) - res.setSender(parseReference(json.getAsJsonObject("sender"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("payload")) { - JsonArray array = json.getAsJsonArray("payload"); - for (int i = 0; i < array.size(); i++) { - res.getPayload().add(parseCommunicationCommunicationPayloadComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected Communication.CommunicationPayloadComponent parseCommunicationCommunicationPayloadComponent(JsonObject json, Communication owner) throws IOException, FHIRFormatError { - Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent(); - parseCommunicationCommunicationPayloadComponentProperties(json, owner, res); - return res; - } - - protected void parseCommunicationCommunicationPayloadComponentProperties(JsonObject json, Communication owner, Communication.CommunicationPayloadComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type content = parseType("content", json); - if (content != null) - res.setContent(content); - } - - protected CommunicationRequest parseCommunicationRequest(JsonObject json) throws IOException, FHIRFormatError { - CommunicationRequest res = new CommunicationRequest(); - parseCommunicationRequestProperties(json, res); - return res; - } - - protected void parseCommunicationRequestProperties(JsonObject json, CommunicationRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("replaces")) { - JsonArray array = json.getAsJsonArray("replaces"); - for (int i = 0; i < array.size(); i++) { - res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("groupIdentifier")) - res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CommunicationRequest.CommunicationRequestStatus.NULL, new CommunicationRequest.CommunicationRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), CommunicationRequest.CommunicationPriority.NULL, new CommunicationRequest.CommunicationPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("medium")) { - JsonArray array = json.getAsJsonArray("medium"); - for (int i = 0; i < array.size(); i++) { - res.getMedium().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("recipient")) { - JsonArray array = json.getAsJsonArray("recipient"); - for (int i = 0; i < array.size(); i++) { - res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("payload")) { - JsonArray array = json.getAsJsonArray("payload"); - for (int i = 0; i < array.size(); i++) { - res.getPayload().add(parseCommunicationRequestCommunicationRequestPayloadComponent(array.get(i).getAsJsonObject(), res)); - } - }; - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("sender")) - res.setSender(parseReference(json.getAsJsonObject("sender"))); - if (json.has("requester")) - res.setRequester(parseCommunicationRequestCommunicationRequestRequesterComponent(json.getAsJsonObject("requester"), res)); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestCommunicationRequestPayloadComponent(JsonObject json, CommunicationRequest owner) throws IOException, FHIRFormatError { - CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent(); - parseCommunicationRequestCommunicationRequestPayloadComponentProperties(json, owner, res); - return res; - } - - protected void parseCommunicationRequestCommunicationRequestPayloadComponentProperties(JsonObject json, CommunicationRequest owner, CommunicationRequest.CommunicationRequestPayloadComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type content = parseType("content", json); - if (content != null) - res.setContent(content); - } - - protected CommunicationRequest.CommunicationRequestRequesterComponent parseCommunicationRequestCommunicationRequestRequesterComponent(JsonObject json, CommunicationRequest owner) throws IOException, FHIRFormatError { - CommunicationRequest.CommunicationRequestRequesterComponent res = new CommunicationRequest.CommunicationRequestRequesterComponent(); - parseCommunicationRequestCommunicationRequestRequesterComponentProperties(json, owner, res); - return res; - } - - protected void parseCommunicationRequestCommunicationRequestRequesterComponentProperties(JsonObject json, CommunicationRequest owner, CommunicationRequest.CommunicationRequestRequesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("agent")) - res.setAgent(parseReference(json.getAsJsonObject("agent"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected CompartmentDefinition parseCompartmentDefinition(JsonObject json) throws IOException, FHIRFormatError { - CompartmentDefinition res = new CompartmentDefinition(); - parseCompartmentDefinitionProperties(json, res); - return res; - } - - protected void parseCompartmentDefinitionProperties(JsonObject json, CompartmentDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CompartmentDefinition.CompartmentType.NULL, new CompartmentDefinition.CompartmentTypeEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("search")) - res.setSearchElement(parseBoolean(json.get("search").getAsBoolean())); - if (json.has("_search")) - parseElementProperties(json.getAsJsonObject("_search"), res.getSearchElement()); - if (json.has("resource")) { - JsonArray array = json.getAsJsonArray("resource"); - for (int i = 0; i < array.size(); i++) { - res.getResource().add(parseCompartmentDefinitionCompartmentDefinitionResourceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionCompartmentDefinitionResourceComponent(JsonObject json, CompartmentDefinition owner) throws IOException, FHIRFormatError { - CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent(); - parseCompartmentDefinitionCompartmentDefinitionResourceComponentProperties(json, owner, res); - return res; - } - - protected void parseCompartmentDefinitionCompartmentDefinitionResourceComponentProperties(JsonObject json, CompartmentDefinition owner, CompartmentDefinition.CompartmentDefinitionResourceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("param")) { - JsonArray array = json.getAsJsonArray("param"); - for (int i = 0; i < array.size(); i++) { - res.getParam().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_param")) { - JsonArray array = json.getAsJsonArray("_param"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getParam().size()) - res.getParam().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getParam().get(i)); - } - }; - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected Composition parseComposition(JsonObject json) throws IOException, FHIRFormatError { - Composition res = new Composition(); - parseCompositionProperties(json, res); - return res; - } - - protected void parseCompositionProperties(JsonObject json, Composition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Composition.CompositionStatus.NULL, new Composition.CompositionStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("class")) - res.setClass_(parseCodeableConcept(json.getAsJsonObject("class"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("author")) { - JsonArray array = json.getAsJsonArray("author"); - for (int i = 0; i < array.size(); i++) { - res.getAuthor().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("confidentiality")) - res.setConfidentialityElement(parseEnumeration(json.get("confidentiality").getAsString(), Composition.DocumentConfidentiality.NULL, new Composition.DocumentConfidentialityEnumFactory())); - if (json.has("_confidentiality")) - parseElementProperties(json.getAsJsonObject("_confidentiality"), res.getConfidentialityElement()); - if (json.has("attester")) { - JsonArray array = json.getAsJsonArray("attester"); - for (int i = 0; i < array.size(); i++) { - res.getAttester().add(parseCompositionCompositionAttesterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("custodian")) - res.setCustodian(parseReference(json.getAsJsonObject("custodian"))); - if (json.has("relatesTo")) { - JsonArray array = json.getAsJsonArray("relatesTo"); - for (int i = 0; i < array.size(); i++) { - res.getRelatesTo().add(parseCompositionCompositionRelatesToComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("event")) { - JsonArray array = json.getAsJsonArray("event"); - for (int i = 0; i < array.size(); i++) { - res.getEvent().add(parseCompositionCompositionEventComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("section")) { - JsonArray array = json.getAsJsonArray("section"); - for (int i = 0; i < array.size(); i++) { - res.getSection().add(parseCompositionSectionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Composition.CompositionAttesterComponent parseCompositionCompositionAttesterComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { - Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent(); - parseCompositionCompositionAttesterComponentProperties(json, owner, res); - return res; - } - - protected void parseCompositionCompositionAttesterComponentProperties(JsonObject json, Composition owner, Composition.CompositionAttesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("mode")) { - JsonArray array = json.getAsJsonArray("mode"); - for (int i = 0; i < array.size(); i++) { - res.getMode().add(parseEnumeration(array.get(i).getAsString(), Composition.CompositionAttestationMode.NULL, new Composition.CompositionAttestationModeEnumFactory())); - } - }; - if (json.has("_mode")) { - JsonArray array = json.getAsJsonArray("_mode"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getMode().size()) - res.getMode().add(parseEnumeration(null, Composition.CompositionAttestationMode.NULL, new Composition.CompositionAttestationModeEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getMode().get(i)); - } - }; - if (json.has("time")) - res.setTimeElement(parseDateTime(json.get("time").getAsString())); - if (json.has("_time")) - parseElementProperties(json.getAsJsonObject("_time"), res.getTimeElement()); - if (json.has("party")) - res.setParty(parseReference(json.getAsJsonObject("party"))); - } - - protected Composition.CompositionRelatesToComponent parseCompositionCompositionRelatesToComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { - Composition.CompositionRelatesToComponent res = new Composition.CompositionRelatesToComponent(); - parseCompositionCompositionRelatesToComponentProperties(json, owner, res); - return res; - } - - protected void parseCompositionCompositionRelatesToComponentProperties(JsonObject json, Composition owner, Composition.CompositionRelatesToComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), Composition.DocumentRelationshipType.NULL, new Composition.DocumentRelationshipTypeEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - Type target = parseType("target", json); - if (target != null) - res.setTarget(target); - } - - protected Composition.CompositionEventComponent parseCompositionCompositionEventComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { - Composition.CompositionEventComponent res = new Composition.CompositionEventComponent(); - parseCompositionCompositionEventComponentProperties(json, owner, res); - return res; - } - - protected void parseCompositionCompositionEventComponentProperties(JsonObject json, Composition owner, Composition.CompositionEventComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Composition.SectionComponent parseCompositionSectionComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { - Composition.SectionComponent res = new Composition.SectionComponent(); - parseCompositionSectionComponentProperties(json, owner, res); - return res; - } - - protected void parseCompositionSectionComponentProperties(JsonObject json, Composition owner, Composition.SectionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("text")) - res.setText(parseNarrative(json.getAsJsonObject("text"))); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Composition.SectionMode.NULL, new Composition.SectionModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("orderedBy")) - res.setOrderedBy(parseCodeableConcept(json.getAsJsonObject("orderedBy"))); - if (json.has("entry")) { - JsonArray array = json.getAsJsonArray("entry"); - for (int i = 0; i < array.size(); i++) { - res.getEntry().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("emptyReason")) - res.setEmptyReason(parseCodeableConcept(json.getAsJsonObject("emptyReason"))); - if (json.has("section")) { - JsonArray array = json.getAsJsonArray("section"); - for (int i = 0; i < array.size(); i++) { - res.getSection().add(parseCompositionSectionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ConceptMap parseConceptMap(JsonObject json) throws IOException, FHIRFormatError { - ConceptMap res = new ConceptMap(); - parseConceptMapProperties(json, res); - return res; - } - - protected void parseConceptMapProperties(JsonObject json, ConceptMap res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - Type source = parseType("source", json); - if (source != null) - res.setSource(source); - Type target = parseType("target", json); - if (target != null) - res.setTarget(target); - if (json.has("group")) { - JsonArray array = json.getAsJsonArray("group"); - for (int i = 0; i < array.size(); i++) { - res.getGroup().add(parseConceptMapConceptMapGroupComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ConceptMap.ConceptMapGroupComponent parseConceptMapConceptMapGroupComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { - ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent(); - parseConceptMapConceptMapGroupComponentProperties(json, owner, res); - return res; - } - - protected void parseConceptMapConceptMapGroupComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.ConceptMapGroupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("source")) - res.setSourceElement(parseUri(json.get("source").getAsString())); - if (json.has("_source")) - parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); - if (json.has("sourceVersion")) - res.setSourceVersionElement(parseString(json.get("sourceVersion").getAsString())); - if (json.has("_sourceVersion")) - parseElementProperties(json.getAsJsonObject("_sourceVersion"), res.getSourceVersionElement()); - if (json.has("target")) - res.setTargetElement(parseUri(json.get("target").getAsString())); - if (json.has("_target")) - parseElementProperties(json.getAsJsonObject("_target"), res.getTargetElement()); - if (json.has("targetVersion")) - res.setTargetVersionElement(parseString(json.get("targetVersion").getAsString())); - if (json.has("_targetVersion")) - parseElementProperties(json.getAsJsonObject("_targetVersion"), res.getTargetVersionElement()); - if (json.has("element")) { - JsonArray array = json.getAsJsonArray("element"); - for (int i = 0; i < array.size(); i++) { - res.getElement().add(parseConceptMapSourceElementComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("unmapped")) - res.setUnmapped(parseConceptMapConceptMapGroupUnmappedComponent(json.getAsJsonObject("unmapped"), owner)); - } - - protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { - ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent(); - parseConceptMapSourceElementComponentProperties(json, owner, res); - return res; - } - - protected void parseConceptMapSourceElementComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.SourceElementComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("target")) { - JsonArray array = json.getAsJsonArray("target"); - for (int i = 0; i < array.size(); i++) { - res.getTarget().add(parseConceptMapTargetElementComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { - ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent(); - parseConceptMapTargetElementComponentProperties(json, owner, res); - return res; - } - - protected void parseConceptMapTargetElementComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.TargetElementComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("equivalence")) - res.setEquivalenceElement(parseEnumeration(json.get("equivalence").getAsString(), Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory())); - if (json.has("_equivalence")) - parseElementProperties(json.getAsJsonObject("_equivalence"), res.getEquivalenceElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("dependsOn")) { - JsonArray array = json.getAsJsonArray("dependsOn"); - for (int i = 0; i < array.size(); i++) { - res.getDependsOn().add(parseConceptMapOtherElementComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("product")) { - JsonArray array = json.getAsJsonArray("product"); - for (int i = 0; i < array.size(); i++) { - res.getProduct().add(parseConceptMapOtherElementComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { - ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent(); - parseConceptMapOtherElementComponentProperties(json, owner, res); - return res; - } - - protected void parseConceptMapOtherElementComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.OtherElementComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("property")) - res.setPropertyElement(parseUri(json.get("property").getAsString())); - if (json.has("_property")) - parseElementProperties(json.getAsJsonObject("_property"), res.getPropertyElement()); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("code")) - res.setCodeElement(parseString(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - } - - protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapConceptMapGroupUnmappedComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { - ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent(); - parseConceptMapConceptMapGroupUnmappedComponentProperties(json, owner, res); - return res; - } - - protected void parseConceptMapConceptMapGroupUnmappedComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.ConceptMapGroupUnmappedComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ConceptMap.ConceptMapGroupUnmappedMode.NULL, new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - } - - protected Condition parseCondition(JsonObject json) throws IOException, FHIRFormatError { - Condition res = new Condition(); - parseConditionProperties(json, res); - return res; - } - - protected void parseConditionProperties(JsonObject json, Condition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("clinicalStatus")) - res.setClinicalStatusElement(parseEnumeration(json.get("clinicalStatus").getAsString(), Condition.ConditionClinicalStatus.NULL, new Condition.ConditionClinicalStatusEnumFactory())); - if (json.has("_clinicalStatus")) - parseElementProperties(json.getAsJsonObject("_clinicalStatus"), res.getClinicalStatusElement()); - if (json.has("verificationStatus")) - res.setVerificationStatusElement(parseEnumeration(json.get("verificationStatus").getAsString(), Condition.ConditionVerificationStatus.NULL, new Condition.ConditionVerificationStatusEnumFactory())); - if (json.has("_verificationStatus")) - parseElementProperties(json.getAsJsonObject("_verificationStatus"), res.getVerificationStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("severity")) - res.setSeverity(parseCodeableConcept(json.getAsJsonObject("severity"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("bodySite")) { - JsonArray array = json.getAsJsonArray("bodySite"); - for (int i = 0; i < array.size(); i++) { - res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type onset = parseType("onset", json); - if (onset != null) - res.setOnset(onset); - Type abatement = parseType("abatement", json); - if (abatement != null) - res.setAbatement(abatement); - if (json.has("assertedDate")) - res.setAssertedDateElement(parseDateTime(json.get("assertedDate").getAsString())); - if (json.has("_assertedDate")) - parseElementProperties(json.getAsJsonObject("_assertedDate"), res.getAssertedDateElement()); - if (json.has("asserter")) - res.setAsserter(parseReference(json.getAsJsonObject("asserter"))); - if (json.has("stage")) { - JsonArray array = json.getAsJsonArray("stage"); - for (int i = 0; i < array.size(); i++) { - res.getStage().add(parseConditionConditionStageComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("evidence")) { - JsonArray array = json.getAsJsonArray("evidence"); - for (int i = 0; i < array.size(); i++) { - res.getEvidence().add(parseConditionConditionEvidenceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected Condition.ConditionStageComponent parseConditionConditionStageComponent(JsonObject json, Condition owner) throws IOException, FHIRFormatError { - Condition.ConditionStageComponent res = new Condition.ConditionStageComponent(); - parseConditionConditionStageComponentProperties(json, owner, res); - return res; - } - - protected void parseConditionConditionStageComponentProperties(JsonObject json, Condition owner, Condition.ConditionStageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("summary")) - res.setSummary(parseCodeableConcept(json.getAsJsonObject("summary"))); - if (json.has("assessment")) { - JsonArray array = json.getAsJsonArray("assessment"); - for (int i = 0; i < array.size(); i++) { - res.getAssessment().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - } - - protected Condition.ConditionEvidenceComponent parseConditionConditionEvidenceComponent(JsonObject json, Condition owner) throws IOException, FHIRFormatError { - Condition.ConditionEvidenceComponent res = new Condition.ConditionEvidenceComponent(); - parseConditionConditionEvidenceComponentProperties(json, owner, res); - return res; - } - - protected void parseConditionConditionEvidenceComponentProperties(JsonObject json, Condition owner, Condition.ConditionEvidenceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Consent parseConsent(JsonObject json) throws IOException, FHIRFormatError { - Consent res = new Consent(); - parseConsentProperties(json, res); - return res; - } - - protected void parseConsentProperties(JsonObject json, Consent res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Consent.ConsentState.NULL, new Consent.ConsentStateEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("dateTime")) - res.setDateTimeElement(parseDateTime(json.get("dateTime").getAsString())); - if (json.has("_dateTime")) - parseElementProperties(json.getAsJsonObject("_dateTime"), res.getDateTimeElement()); - if (json.has("consentingParty")) { - JsonArray array = json.getAsJsonArray("consentingParty"); - for (int i = 0; i < array.size(); i++) { - res.getConsentingParty().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("organization")) { - JsonArray array = json.getAsJsonArray("organization"); - for (int i = 0; i < array.size(); i++) { - res.getOrganization().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - Type source = parseType("source", json); - if (source != null) - res.setSource(source); - if (json.has("policy")) { - JsonArray array = json.getAsJsonArray("policy"); - for (int i = 0; i < array.size(); i++) { - res.getPolicy().add(parseConsentConsentPolicyComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("policyRule")) - res.setPolicyRuleElement(parseUri(json.get("policyRule").getAsString())); - if (json.has("_policyRule")) - parseElementProperties(json.getAsJsonObject("_policyRule"), res.getPolicyRuleElement()); - if (json.has("verification")) { - JsonArray array = json.getAsJsonArray("verification"); - for (int i = 0; i < array.size(); i++) { - res.getVerification().add(parseConsentConsentVerificationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("provision")) { - JsonArray array = json.getAsJsonArray("provision"); - for (int i = 0; i < array.size(); i++) { - res.getProvision().add(parseConsentprovisionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Consent.ConsentPolicyComponent parseConsentConsentPolicyComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { - Consent.ConsentPolicyComponent res = new Consent.ConsentPolicyComponent(); - parseConsentConsentPolicyComponentProperties(json, owner, res); - return res; - } - - protected void parseConsentConsentPolicyComponentProperties(JsonObject json, Consent owner, Consent.ConsentPolicyComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("authority")) - res.setAuthorityElement(parseUri(json.get("authority").getAsString())); - if (json.has("_authority")) - parseElementProperties(json.getAsJsonObject("_authority"), res.getAuthorityElement()); - if (json.has("uri")) - res.setUriElement(parseUri(json.get("uri").getAsString())); - if (json.has("_uri")) - parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); - } - - protected Consent.ConsentVerificationComponent parseConsentConsentVerificationComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { - Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent(); - parseConsentConsentVerificationComponentProperties(json, owner, res); - return res; - } - - protected void parseConsentConsentVerificationComponentProperties(JsonObject json, Consent owner, Consent.ConsentVerificationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("verified")) - res.setVerifiedElement(parseBoolean(json.get("verified").getAsBoolean())); - if (json.has("_verified")) - parseElementProperties(json.getAsJsonObject("_verified"), res.getVerifiedElement()); - if (json.has("verifiedWith")) - res.setVerifiedWith(parseReference(json.getAsJsonObject("verifiedWith"))); - if (json.has("verificationDate")) - res.setVerificationDateElement(parseDateTime(json.get("verificationDate").getAsString())); - if (json.has("_verificationDate")) - parseElementProperties(json.getAsJsonObject("_verificationDate"), res.getVerificationDateElement()); - } - - protected Consent.provisionComponent parseConsentprovisionComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { - Consent.provisionComponent res = new Consent.provisionComponent(); - parseConsentprovisionComponentProperties(json, owner, res); - return res; - } - - protected void parseConsentprovisionComponentProperties(JsonObject json, Consent owner, Consent.provisionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Consent.ConsentProvisionType.NULL, new Consent.ConsentProvisionTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("actor")) { - JsonArray array = json.getAsJsonArray("actor"); - for (int i = 0; i < array.size(); i++) { - res.getActor().add(parseConsentprovisionActorComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("securityLabel")) { - JsonArray array = json.getAsJsonArray("securityLabel"); - for (int i = 0; i < array.size(); i++) { - res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) { - JsonArray array = json.getAsJsonArray("purpose"); - for (int i = 0; i < array.size(); i++) { - res.getPurpose().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("class")) { - JsonArray array = json.getAsJsonArray("class"); - for (int i = 0; i < array.size(); i++) { - res.getClass_().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dataPeriod")) - res.setDataPeriod(parsePeriod(json.getAsJsonObject("dataPeriod"))); - if (json.has("data")) { - JsonArray array = json.getAsJsonArray("data"); - for (int i = 0; i < array.size(); i++) { - res.getData().add(parseConsentprovisionDataComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("provision")) { - JsonArray array = json.getAsJsonArray("provision"); - for (int i = 0; i < array.size(); i++) { - res.getProvision().add(parseConsentprovisionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Consent.provisionActorComponent parseConsentprovisionActorComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { - Consent.provisionActorComponent res = new Consent.provisionActorComponent(); - parseConsentprovisionActorComponentProperties(json, owner, res); - return res; - } - - protected void parseConsentprovisionActorComponentProperties(JsonObject json, Consent owner, Consent.provisionActorComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("reference")) - res.setReference(parseReference(json.getAsJsonObject("reference"))); - } - - protected Consent.provisionDataComponent parseConsentprovisionDataComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { - Consent.provisionDataComponent res = new Consent.provisionDataComponent(); - parseConsentprovisionDataComponentProperties(json, owner, res); - return res; - } - - protected void parseConsentprovisionDataComponentProperties(JsonObject json, Consent owner, Consent.provisionDataComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("meaning")) - res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Consent.ConsentDataMeaning.NULL, new Consent.ConsentDataMeaningEnumFactory())); - if (json.has("_meaning")) - parseElementProperties(json.getAsJsonObject("_meaning"), res.getMeaningElement()); - if (json.has("reference")) - res.setReference(parseReference(json.getAsJsonObject("reference"))); - } - - protected Contract parseContract(JsonObject json) throws IOException, FHIRFormatError { - Contract res = new Contract(); - parseContractProperties(json, res); - return res; - } - - protected void parseContractProperties(JsonObject json, Contract res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Contract.ContractStatus.NULL, new Contract.ContractStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("contentDerivative")) - res.setContentDerivative(parseCodeableConcept(json.getAsJsonObject("contentDerivative"))); - if (json.has("issued")) - res.setIssuedElement(parseDateTime(json.get("issued").getAsString())); - if (json.has("_issued")) - parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); - if (json.has("applies")) - res.setApplies(parsePeriod(json.getAsJsonObject("applies"))); - if (json.has("subject")) { - JsonArray array = json.getAsJsonArray("subject"); - for (int i = 0; i < array.size(); i++) { - res.getSubject().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("authority")) { - JsonArray array = json.getAsJsonArray("authority"); - for (int i = 0; i < array.size(); i++) { - res.getAuthority().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("domain")) { - JsonArray array = json.getAsJsonArray("domain"); - for (int i = 0; i < array.size(); i++) { - res.getDomain().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("subType")) { - JsonArray array = json.getAsJsonArray("subType"); - for (int i = 0; i < array.size(); i++) { - res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("term")) { - JsonArray array = json.getAsJsonArray("term"); - for (int i = 0; i < array.size(); i++) { - res.getTerm().add(parseContractTermComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("signer")) { - JsonArray array = json.getAsJsonArray("signer"); - for (int i = 0; i < array.size(); i++) { - res.getSigner().add(parseContractSignatoryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("friendly")) { - JsonArray array = json.getAsJsonArray("friendly"); - for (int i = 0; i < array.size(); i++) { - res.getFriendly().add(parseContractFriendlyLanguageComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("legal")) { - JsonArray array = json.getAsJsonArray("legal"); - for (int i = 0; i < array.size(); i++) { - res.getLegal().add(parseContractLegalLanguageComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("rule")) - res.setRule(parseContractComputableLanguageComponent(json.getAsJsonObject("rule"), res)); - Type legallyBinding = parseType("legallyBinding", json); - if (legallyBinding != null) - res.setLegallyBinding(legallyBinding); - } - - protected Contract.TermComponent parseContractTermComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.TermComponent res = new Contract.TermComponent(); - parseContractTermComponentProperties(json, owner, res); - return res; - } - - protected void parseContractTermComponentProperties(JsonObject json, Contract owner, Contract.TermComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("issued")) - res.setIssuedElement(parseDateTime(json.get("issued").getAsString())); - if (json.has("_issued")) - parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); - if (json.has("applies")) - res.setApplies(parsePeriod(json.getAsJsonObject("applies"))); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("subType")) - res.setSubType(parseCodeableConcept(json.getAsJsonObject("subType"))); - if (json.has("offer")) - res.setOffer(parseContractContractOfferComponent(json.getAsJsonObject("offer"), owner)); - if (json.has("asset")) { - JsonArray array = json.getAsJsonArray("asset"); - for (int i = 0; i < array.size(); i++) { - res.getAsset().add(parseContractContractAssetComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("agent")) { - JsonArray array = json.getAsJsonArray("agent"); - for (int i = 0; i < array.size(); i++) { - res.getAgent().add(parseContractAgentComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("actionReason")) { - JsonArray array = json.getAsJsonArray("actionReason"); - for (int i = 0; i < array.size(); i++) { - res.getActionReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("group")) { - JsonArray array = json.getAsJsonArray("group"); - for (int i = 0; i < array.size(); i++) { - res.getGroup().add(parseContractTermComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Contract.ContractOfferComponent parseContractContractOfferComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.ContractOfferComponent res = new Contract.ContractOfferComponent(); - parseContractContractOfferComponentProperties(json, owner, res); - return res; - } - - protected void parseContractContractOfferComponentProperties(JsonObject json, Contract owner, Contract.ContractOfferComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("topic")) - res.setTopic(parseReference(json.getAsJsonObject("topic"))); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("decision")) - res.setDecision(parseCodeableConcept(json.getAsJsonObject("decision"))); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("linkId")) - res.setLinkIdElement(parseString(json.get("linkId").getAsString())); - if (json.has("_linkId")) - parseElementProperties(json.getAsJsonObject("_linkId"), res.getLinkIdElement()); - } - - protected Contract.ContractAssetComponent parseContractContractAssetComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.ContractAssetComponent res = new Contract.ContractAssetComponent(); - parseContractContractAssetComponentProperties(json, owner, res); - return res; - } - - protected void parseContractContractAssetComponentProperties(JsonObject json, Contract owner, Contract.ContractAssetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("class")) - res.setClass_(parseCoding(json.getAsJsonObject("class"))); - if (json.has("code")) - res.setCode(parseCoding(json.getAsJsonObject("code"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("dataPeriod")) - res.setDataPeriod(parsePeriod(json.getAsJsonObject("dataPeriod"))); - if (json.has("data")) { - JsonArray array = json.getAsJsonArray("data"); - for (int i = 0; i < array.size(); i++) { - res.getData().add(parseContractAssetDataComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("valuedItem")) { - JsonArray array = json.getAsJsonArray("valuedItem"); - for (int i = 0; i < array.size(); i++) { - res.getValuedItem().add(parseContractValuedItemComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("securityLabel")) { - JsonArray array = json.getAsJsonArray("securityLabel"); - for (int i = 0; i < array.size(); i++) { - res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - } - - protected Contract.AssetDataComponent parseContractAssetDataComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.AssetDataComponent res = new Contract.AssetDataComponent(); - parseContractAssetDataComponentProperties(json, owner, res); - return res; - } - - protected void parseContractAssetDataComponentProperties(JsonObject json, Contract owner, Contract.AssetDataComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("meaning")) - res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Contract.ContractDataMeaning.NULL, new Contract.ContractDataMeaningEnumFactory())); - if (json.has("_meaning")) - parseElementProperties(json.getAsJsonObject("_meaning"), res.getMeaningElement()); - if (json.has("reference")) - res.setReference(parseReference(json.getAsJsonObject("reference"))); - } - - protected Contract.ValuedItemComponent parseContractValuedItemComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.ValuedItemComponent res = new Contract.ValuedItemComponent(); - parseContractValuedItemComponentProperties(json, owner, res); - return res; - } - - protected void parseContractValuedItemComponentProperties(JsonObject json, Contract owner, Contract.ValuedItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type entity = parseType("entity", json); - if (entity != null) - res.setEntity(entity); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("effectiveTime")) - res.setEffectiveTimeElement(parseDateTime(json.get("effectiveTime").getAsString())); - if (json.has("_effectiveTime")) - parseElementProperties(json.getAsJsonObject("_effectiveTime"), res.getEffectiveTimeElement()); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("points")) - res.setPointsElement(parseDecimal(json.get("points").getAsBigDecimal())); - if (json.has("_points")) - parseElementProperties(json.getAsJsonObject("_points"), res.getPointsElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - } - - protected Contract.AgentComponent parseContractAgentComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.AgentComponent res = new Contract.AgentComponent(); - parseContractAgentComponentProperties(json, owner, res); - return res; - } - - protected void parseContractAgentComponentProperties(JsonObject json, Contract owner, Contract.AgentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - if (json.has("role")) { - JsonArray array = json.getAsJsonArray("role"); - for (int i = 0; i < array.size(); i++) { - res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected Contract.SignatoryComponent parseContractSignatoryComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.SignatoryComponent res = new Contract.SignatoryComponent(); - parseContractSignatoryComponentProperties(json, owner, res); - return res; - } - - protected void parseContractSignatoryComponentProperties(JsonObject json, Contract owner, Contract.SignatoryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCoding(json.getAsJsonObject("type"))); - if (json.has("party")) - res.setParty(parseReference(json.getAsJsonObject("party"))); - if (json.has("signature")) { - JsonArray array = json.getAsJsonArray("signature"); - for (int i = 0; i < array.size(); i++) { - res.getSignature().add(parseSignature(array.get(i).getAsJsonObject())); - } - }; - } - - protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent(); - parseContractFriendlyLanguageComponentProperties(json, owner, res); - return res; - } - - protected void parseContractFriendlyLanguageComponentProperties(JsonObject json, Contract owner, Contract.FriendlyLanguageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type content = parseType("content", json); - if (content != null) - res.setContent(content); - } - - protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent(); - parseContractLegalLanguageComponentProperties(json, owner, res); - return res; - } - - protected void parseContractLegalLanguageComponentProperties(JsonObject json, Contract owner, Contract.LegalLanguageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type content = parseType("content", json); - if (content != null) - res.setContent(content); - } - - protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { - Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent(); - parseContractComputableLanguageComponentProperties(json, owner, res); - return res; - } - - protected void parseContractComputableLanguageComponentProperties(JsonObject json, Contract owner, Contract.ComputableLanguageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type content = parseType("content", json); - if (content != null) - res.setContent(content); - } - - protected Coverage parseCoverage(JsonObject json) throws IOException, FHIRFormatError { - Coverage res = new Coverage(); - parseCoverageProperties(json, res); - return res; - } - - protected void parseCoverageProperties(JsonObject json, Coverage res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Coverage.CoverageStatus.NULL, new Coverage.CoverageStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("policyHolder")) - res.setPolicyHolder(parseReference(json.getAsJsonObject("policyHolder"))); - if (json.has("subscriber")) - res.setSubscriber(parseReference(json.getAsJsonObject("subscriber"))); - if (json.has("subscriberId")) - res.setSubscriberIdElement(parseString(json.get("subscriberId").getAsString())); - if (json.has("_subscriberId")) - parseElementProperties(json.getAsJsonObject("_subscriberId"), res.getSubscriberIdElement()); - if (json.has("beneficiary")) - res.setBeneficiary(parseReference(json.getAsJsonObject("beneficiary"))); - if (json.has("relationship")) - res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("payor")) { - JsonArray array = json.getAsJsonArray("payor"); - for (int i = 0; i < array.size(); i++) { - res.getPayor().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("grouping")) - res.setGrouping(parseCoverageGroupComponent(json.getAsJsonObject("grouping"), res)); - if (json.has("dependent")) - res.setDependentElement(parseString(json.get("dependent").getAsString())); - if (json.has("_dependent")) - parseElementProperties(json.getAsJsonObject("_dependent"), res.getDependentElement()); - if (json.has("sequence")) - res.setSequenceElement(parseString(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("order")) - res.setOrderElement(parsePositiveInt(json.get("order").getAsString())); - if (json.has("_order")) - parseElementProperties(json.getAsJsonObject("_order"), res.getOrderElement()); - if (json.has("network")) - res.setNetworkElement(parseString(json.get("network").getAsString())); - if (json.has("_network")) - parseElementProperties(json.getAsJsonObject("_network"), res.getNetworkElement()); - if (json.has("contract")) { - JsonArray array = json.getAsJsonArray("contract"); - for (int i = 0; i < array.size(); i++) { - res.getContract().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Coverage.GroupComponent parseCoverageGroupComponent(JsonObject json, Coverage owner) throws IOException, FHIRFormatError { - Coverage.GroupComponent res = new Coverage.GroupComponent(); - parseCoverageGroupComponentProperties(json, owner, res); - return res; - } - - protected void parseCoverageGroupComponentProperties(JsonObject json, Coverage owner, Coverage.GroupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("group")) - res.setGroupElement(parseString(json.get("group").getAsString())); - if (json.has("_group")) - parseElementProperties(json.getAsJsonObject("_group"), res.getGroupElement()); - if (json.has("groupDisplay")) - res.setGroupDisplayElement(parseString(json.get("groupDisplay").getAsString())); - if (json.has("_groupDisplay")) - parseElementProperties(json.getAsJsonObject("_groupDisplay"), res.getGroupDisplayElement()); - if (json.has("subGroup")) - res.setSubGroupElement(parseString(json.get("subGroup").getAsString())); - if (json.has("_subGroup")) - parseElementProperties(json.getAsJsonObject("_subGroup"), res.getSubGroupElement()); - if (json.has("subGroupDisplay")) - res.setSubGroupDisplayElement(parseString(json.get("subGroupDisplay").getAsString())); - if (json.has("_subGroupDisplay")) - parseElementProperties(json.getAsJsonObject("_subGroupDisplay"), res.getSubGroupDisplayElement()); - if (json.has("plan")) - res.setPlanElement(parseString(json.get("plan").getAsString())); - if (json.has("_plan")) - parseElementProperties(json.getAsJsonObject("_plan"), res.getPlanElement()); - if (json.has("planDisplay")) - res.setPlanDisplayElement(parseString(json.get("planDisplay").getAsString())); - if (json.has("_planDisplay")) - parseElementProperties(json.getAsJsonObject("_planDisplay"), res.getPlanDisplayElement()); - if (json.has("subPlan")) - res.setSubPlanElement(parseString(json.get("subPlan").getAsString())); - if (json.has("_subPlan")) - parseElementProperties(json.getAsJsonObject("_subPlan"), res.getSubPlanElement()); - if (json.has("subPlanDisplay")) - res.setSubPlanDisplayElement(parseString(json.get("subPlanDisplay").getAsString())); - if (json.has("_subPlanDisplay")) - parseElementProperties(json.getAsJsonObject("_subPlanDisplay"), res.getSubPlanDisplayElement()); - if (json.has("class")) - res.setClass_Element(parseString(json.get("class").getAsString())); - if (json.has("_class")) - parseElementProperties(json.getAsJsonObject("_class"), res.getClass_Element()); - if (json.has("classDisplay")) - res.setClassDisplayElement(parseString(json.get("classDisplay").getAsString())); - if (json.has("_classDisplay")) - parseElementProperties(json.getAsJsonObject("_classDisplay"), res.getClassDisplayElement()); - if (json.has("subClass")) - res.setSubClassElement(parseString(json.get("subClass").getAsString())); - if (json.has("_subClass")) - parseElementProperties(json.getAsJsonObject("_subClass"), res.getSubClassElement()); - if (json.has("subClassDisplay")) - res.setSubClassDisplayElement(parseString(json.get("subClassDisplay").getAsString())); - if (json.has("_subClassDisplay")) - parseElementProperties(json.getAsJsonObject("_subClassDisplay"), res.getSubClassDisplayElement()); - } - - protected DetectedIssue parseDetectedIssue(JsonObject json) throws IOException, FHIRFormatError { - DetectedIssue res = new DetectedIssue(); - parseDetectedIssueProperties(json, res); - return res; - } - - protected void parseDetectedIssueProperties(JsonObject json, DetectedIssue res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DetectedIssue.DetectedIssueStatus.NULL, new DetectedIssue.DetectedIssueStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("severity")) - res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), DetectedIssue.DetectedIssueSeverity.NULL, new DetectedIssue.DetectedIssueSeverityEnumFactory())); - if (json.has("_severity")) - parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - if (json.has("implicated")) { - JsonArray array = json.getAsJsonArray("implicated"); - for (int i = 0; i < array.size(); i++) { - res.getImplicated().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("detail")) - res.setDetailElement(parseString(json.get("detail").getAsString())); - if (json.has("_detail")) - parseElementProperties(json.getAsJsonObject("_detail"), res.getDetailElement()); - if (json.has("reference")) - res.setReferenceElement(parseUri(json.get("reference").getAsString())); - if (json.has("_reference")) - parseElementProperties(json.getAsJsonObject("_reference"), res.getReferenceElement()); - if (json.has("mitigation")) { - JsonArray array = json.getAsJsonArray("mitigation"); - for (int i = 0; i < array.size(); i++) { - res.getMitigation().add(parseDetectedIssueDetectedIssueMitigationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueDetectedIssueMitigationComponent(JsonObject json, DetectedIssue owner) throws IOException, FHIRFormatError { - DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent(); - parseDetectedIssueDetectedIssueMitigationComponentProperties(json, owner, res); - return res; - } - - protected void parseDetectedIssueDetectedIssueMitigationComponentProperties(JsonObject json, DetectedIssue owner, DetectedIssue.DetectedIssueMitigationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("action")) - res.setAction(parseCodeableConcept(json.getAsJsonObject("action"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - } - - protected Device parseDevice(JsonObject json) throws IOException, FHIRFormatError { - Device res = new Device(); - parseDeviceProperties(json, res); - return res; - } - - protected void parseDeviceProperties(JsonObject json, Device res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("udi")) - res.setUdi(parseDeviceDeviceUdiComponent(json.getAsJsonObject("udi"), res)); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Device.FHIRDeviceStatus.NULL, new Device.FHIRDeviceStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("lotNumber")) - res.setLotNumberElement(parseString(json.get("lotNumber").getAsString())); - if (json.has("_lotNumber")) - parseElementProperties(json.getAsJsonObject("_lotNumber"), res.getLotNumberElement()); - if (json.has("manufacturer")) - res.setManufacturerElement(parseString(json.get("manufacturer").getAsString())); - if (json.has("_manufacturer")) - parseElementProperties(json.getAsJsonObject("_manufacturer"), res.getManufacturerElement()); - if (json.has("manufactureDate")) - res.setManufactureDateElement(parseDateTime(json.get("manufactureDate").getAsString())); - if (json.has("_manufactureDate")) - parseElementProperties(json.getAsJsonObject("_manufactureDate"), res.getManufactureDateElement()); - if (json.has("expirationDate")) - res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString())); - if (json.has("_expirationDate")) - parseElementProperties(json.getAsJsonObject("_expirationDate"), res.getExpirationDateElement()); - if (json.has("model")) - res.setModelElement(parseString(json.get("model").getAsString())); - if (json.has("_model")) - parseElementProperties(json.getAsJsonObject("_model"), res.getModelElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("owner")) - res.setOwner(parseReference(json.getAsJsonObject("owner"))); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("safety")) { - JsonArray array = json.getAsJsonArray("safety"); - for (int i = 0; i < array.size(); i++) { - res.getSafety().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected Device.DeviceUdiComponent parseDeviceDeviceUdiComponent(JsonObject json, Device owner) throws IOException, FHIRFormatError { - Device.DeviceUdiComponent res = new Device.DeviceUdiComponent(); - parseDeviceDeviceUdiComponentProperties(json, owner, res); - return res; - } - - protected void parseDeviceDeviceUdiComponentProperties(JsonObject json, Device owner, Device.DeviceUdiComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("deviceIdentifier")) - res.setDeviceIdentifierElement(parseString(json.get("deviceIdentifier").getAsString())); - if (json.has("_deviceIdentifier")) - parseElementProperties(json.getAsJsonObject("_deviceIdentifier"), res.getDeviceIdentifierElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("jurisdiction")) - res.setJurisdictionElement(parseUri(json.get("jurisdiction").getAsString())); - if (json.has("_jurisdiction")) - parseElementProperties(json.getAsJsonObject("_jurisdiction"), res.getJurisdictionElement()); - if (json.has("carrierHRF")) - res.setCarrierHRFElement(parseString(json.get("carrierHRF").getAsString())); - if (json.has("_carrierHRF")) - parseElementProperties(json.getAsJsonObject("_carrierHRF"), res.getCarrierHRFElement()); - if (json.has("carrierAIDC")) - res.setCarrierAIDCElement(parseBase64Binary(json.get("carrierAIDC").getAsString())); - if (json.has("_carrierAIDC")) - parseElementProperties(json.getAsJsonObject("_carrierAIDC"), res.getCarrierAIDCElement()); - if (json.has("issuer")) - res.setIssuerElement(parseUri(json.get("issuer").getAsString())); - if (json.has("_issuer")) - parseElementProperties(json.getAsJsonObject("_issuer"), res.getIssuerElement()); - if (json.has("entryType")) - res.setEntryTypeElement(parseEnumeration(json.get("entryType").getAsString(), Device.UDIEntryType.NULL, new Device.UDIEntryTypeEnumFactory())); - if (json.has("_entryType")) - parseElementProperties(json.getAsJsonObject("_entryType"), res.getEntryTypeElement()); - } - - protected DeviceComponent parseDeviceComponent(JsonObject json) throws IOException, FHIRFormatError { - DeviceComponent res = new DeviceComponent(); - parseDeviceComponentProperties(json, res); - return res; - } - - protected void parseDeviceComponentProperties(JsonObject json, DeviceComponent res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("lastSystemChange")) - res.setLastSystemChangeElement(parseInstant(json.get("lastSystemChange").getAsString())); - if (json.has("_lastSystemChange")) - parseElementProperties(json.getAsJsonObject("_lastSystemChange"), res.getLastSystemChangeElement()); - if (json.has("source")) - res.setSource(parseReference(json.getAsJsonObject("source"))); - if (json.has("parent")) - res.setParent(parseReference(json.getAsJsonObject("parent"))); - if (json.has("operationalStatus")) { - JsonArray array = json.getAsJsonArray("operationalStatus"); - for (int i = 0; i < array.size(); i++) { - res.getOperationalStatus().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("parameterGroup")) - res.setParameterGroup(parseCodeableConcept(json.getAsJsonObject("parameterGroup"))); - if (json.has("measurementPrinciple")) - res.setMeasurementPrincipleElement(parseEnumeration(json.get("measurementPrinciple").getAsString(), DeviceComponent.MeasmntPrinciple.NULL, new DeviceComponent.MeasmntPrincipleEnumFactory())); - if (json.has("_measurementPrinciple")) - parseElementProperties(json.getAsJsonObject("_measurementPrinciple"), res.getMeasurementPrincipleElement()); - if (json.has("productionSpecification")) { - JsonArray array = json.getAsJsonArray("productionSpecification"); - for (int i = 0; i < array.size(); i++) { - res.getProductionSpecification().add(parseDeviceComponentDeviceComponentProductionSpecificationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("languageCode")) - res.setLanguageCode(parseCodeableConcept(json.getAsJsonObject("languageCode"))); - } - - protected DeviceComponent.DeviceComponentProductionSpecificationComponent parseDeviceComponentDeviceComponentProductionSpecificationComponent(JsonObject json, DeviceComponent owner) throws IOException, FHIRFormatError { - DeviceComponent.DeviceComponentProductionSpecificationComponent res = new DeviceComponent.DeviceComponentProductionSpecificationComponent(); - parseDeviceComponentDeviceComponentProductionSpecificationComponentProperties(json, owner, res); - return res; - } - - protected void parseDeviceComponentDeviceComponentProductionSpecificationComponentProperties(JsonObject json, DeviceComponent owner, DeviceComponent.DeviceComponentProductionSpecificationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("specType")) - res.setSpecType(parseCodeableConcept(json.getAsJsonObject("specType"))); - if (json.has("componentId")) - res.setComponentId(parseIdentifier(json.getAsJsonObject("componentId"))); - if (json.has("productionSpec")) - res.setProductionSpecElement(parseString(json.get("productionSpec").getAsString())); - if (json.has("_productionSpec")) - parseElementProperties(json.getAsJsonObject("_productionSpec"), res.getProductionSpecElement()); - } - - protected DeviceMetric parseDeviceMetric(JsonObject json) throws IOException, FHIRFormatError { - DeviceMetric res = new DeviceMetric(); - parseDeviceMetricProperties(json, res); - return res; - } - - protected void parseDeviceMetricProperties(JsonObject json, DeviceMetric res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("unit")) - res.setUnit(parseCodeableConcept(json.getAsJsonObject("unit"))); - if (json.has("source")) - res.setSource(parseReference(json.getAsJsonObject("source"))); - if (json.has("parent")) - res.setParent(parseReference(json.getAsJsonObject("parent"))); - if (json.has("operationalStatus")) - res.setOperationalStatusElement(parseEnumeration(json.get("operationalStatus").getAsString(), DeviceMetric.DeviceMetricOperationalStatus.NULL, new DeviceMetric.DeviceMetricOperationalStatusEnumFactory())); - if (json.has("_operationalStatus")) - parseElementProperties(json.getAsJsonObject("_operationalStatus"), res.getOperationalStatusElement()); - if (json.has("color")) - res.setColorElement(parseEnumeration(json.get("color").getAsString(), DeviceMetric.DeviceMetricColor.NULL, new DeviceMetric.DeviceMetricColorEnumFactory())); - if (json.has("_color")) - parseElementProperties(json.getAsJsonObject("_color"), res.getColorElement()); - if (json.has("category")) - res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), DeviceMetric.DeviceMetricCategory.NULL, new DeviceMetric.DeviceMetricCategoryEnumFactory())); - if (json.has("_category")) - parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); - if (json.has("measurementPeriod")) - res.setMeasurementPeriod(parseTiming(json.getAsJsonObject("measurementPeriod"))); - if (json.has("calibration")) { - JsonArray array = json.getAsJsonArray("calibration"); - for (int i = 0; i < array.size(); i++) { - res.getCalibration().add(parseDeviceMetricDeviceMetricCalibrationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricDeviceMetricCalibrationComponent(JsonObject json, DeviceMetric owner) throws IOException, FHIRFormatError { - DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent(); - parseDeviceMetricDeviceMetricCalibrationComponentProperties(json, owner, res); - return res; - } - - protected void parseDeviceMetricDeviceMetricCalibrationComponentProperties(JsonObject json, DeviceMetric owner, DeviceMetric.DeviceMetricCalibrationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), DeviceMetric.DeviceMetricCalibrationType.NULL, new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("state")) - res.setStateElement(parseEnumeration(json.get("state").getAsString(), DeviceMetric.DeviceMetricCalibrationState.NULL, new DeviceMetric.DeviceMetricCalibrationStateEnumFactory())); - if (json.has("_state")) - parseElementProperties(json.getAsJsonObject("_state"), res.getStateElement()); - if (json.has("time")) - res.setTimeElement(parseInstant(json.get("time").getAsString())); - if (json.has("_time")) - parseElementProperties(json.getAsJsonObject("_time"), res.getTimeElement()); - } - - protected DeviceRequest parseDeviceRequest(JsonObject json) throws IOException, FHIRFormatError { - DeviceRequest res = new DeviceRequest(); - parseDeviceRequestProperties(json, res); - return res; - } - - protected void parseDeviceRequestProperties(JsonObject json, DeviceRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("priorRequest")) { - JsonArray array = json.getAsJsonArray("priorRequest"); - for (int i = 0; i < array.size(); i++) { - res.getPriorRequest().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("groupIdentifier")) - res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceRequest.DeviceRequestStatus.NULL, new DeviceRequest.DeviceRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("intent")) - res.setIntent(parseCodeableConcept(json.getAsJsonObject("intent"))); - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), DeviceRequest.RequestPriority.NULL, new DeviceRequest.RequestPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - Type code = parseType("code", json); - if (code != null) - res.setCode(code); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("requester")) - res.setRequester(parseDeviceRequestDeviceRequestRequesterComponent(json.getAsJsonObject("requester"), res)); - if (json.has("performerType")) - res.setPerformerType(parseCodeableConcept(json.getAsJsonObject("performerType"))); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("supportingInfo")) { - JsonArray array = json.getAsJsonArray("supportingInfo"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("relevantHistory")) { - JsonArray array = json.getAsJsonArray("relevantHistory"); - for (int i = 0; i < array.size(); i++) { - res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected DeviceRequest.DeviceRequestRequesterComponent parseDeviceRequestDeviceRequestRequesterComponent(JsonObject json, DeviceRequest owner) throws IOException, FHIRFormatError { - DeviceRequest.DeviceRequestRequesterComponent res = new DeviceRequest.DeviceRequestRequesterComponent(); - parseDeviceRequestDeviceRequestRequesterComponentProperties(json, owner, res); - return res; - } - - protected void parseDeviceRequestDeviceRequestRequesterComponentProperties(JsonObject json, DeviceRequest owner, DeviceRequest.DeviceRequestRequesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("agent")) - res.setAgent(parseReference(json.getAsJsonObject("agent"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected DeviceUseStatement parseDeviceUseStatement(JsonObject json) throws IOException, FHIRFormatError { - DeviceUseStatement res = new DeviceUseStatement(); - parseDeviceUseStatementProperties(json, res); - return res; - } - - protected void parseDeviceUseStatementProperties(JsonObject json, DeviceUseStatement res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceUseStatement.DeviceUseStatementStatus.NULL, new DeviceUseStatement.DeviceUseStatementStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("whenUsed")) - res.setWhenUsed(parsePeriod(json.getAsJsonObject("whenUsed"))); - Type timing = parseType("timing", json); - if (timing != null) - res.setTiming(timing); - if (json.has("recordedOn")) - res.setRecordedOnElement(parseDateTime(json.get("recordedOn").getAsString())); - if (json.has("_recordedOn")) - parseElementProperties(json.getAsJsonObject("_recordedOn"), res.getRecordedOnElement()); - if (json.has("source")) - res.setSource(parseReference(json.getAsJsonObject("source"))); - if (json.has("device")) - res.setDevice(parseReference(json.getAsJsonObject("device"))); - if (json.has("indication")) { - JsonArray array = json.getAsJsonArray("indication"); - for (int i = 0; i < array.size(); i++) { - res.getIndication().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) - res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected DiagnosticReport parseDiagnosticReport(JsonObject json) throws IOException, FHIRFormatError { - DiagnosticReport res = new DiagnosticReport(); - parseDiagnosticReportProperties(json, res); - return res; - } - - protected void parseDiagnosticReportProperties(JsonObject json, DiagnosticReport res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DiagnosticReport.DiagnosticReportStatus.NULL, new DiagnosticReport.DiagnosticReportStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type effective = parseType("effective", json); - if (effective != null) - res.setEffective(effective); - if (json.has("issued")) - res.setIssuedElement(parseInstant(json.get("issued").getAsString())); - if (json.has("_issued")) - parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("resultsInterpreter")) { - JsonArray array = json.getAsJsonArray("resultsInterpreter"); - for (int i = 0; i < array.size(); i++) { - res.getResultsInterpreter().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specimen")) { - JsonArray array = json.getAsJsonArray("specimen"); - for (int i = 0; i < array.size(); i++) { - res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("result")) { - JsonArray array = json.getAsJsonArray("result"); - for (int i = 0; i < array.size(); i++) { - res.getResult().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("imagingStudy")) { - JsonArray array = json.getAsJsonArray("imagingStudy"); - for (int i = 0; i < array.size(); i++) { - res.getImagingStudy().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("image")) { - JsonArray array = json.getAsJsonArray("image"); - for (int i = 0; i < array.size(); i++) { - res.getImage().add(parseDiagnosticReportDiagnosticReportImageComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("conclusion")) - res.setConclusionElement(parseString(json.get("conclusion").getAsString())); - if (json.has("_conclusion")) - parseElementProperties(json.getAsJsonObject("_conclusion"), res.getConclusionElement()); - if (json.has("codedDiagnosis")) { - JsonArray array = json.getAsJsonArray("codedDiagnosis"); - for (int i = 0; i < array.size(); i++) { - res.getCodedDiagnosis().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("presentedForm")) { - JsonArray array = json.getAsJsonArray("presentedForm"); - for (int i = 0; i < array.size(); i++) { - res.getPresentedForm().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - } - - protected DiagnosticReport.DiagnosticReportImageComponent parseDiagnosticReportDiagnosticReportImageComponent(JsonObject json, DiagnosticReport owner) throws IOException, FHIRFormatError { - DiagnosticReport.DiagnosticReportImageComponent res = new DiagnosticReport.DiagnosticReportImageComponent(); - parseDiagnosticReportDiagnosticReportImageComponentProperties(json, owner, res); - return res; - } - - protected void parseDiagnosticReportDiagnosticReportImageComponentProperties(JsonObject json, DiagnosticReport owner, DiagnosticReport.DiagnosticReportImageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("link")) - res.setLink(parseReference(json.getAsJsonObject("link"))); - } - - protected DocumentManifest parseDocumentManifest(JsonObject json) throws IOException, FHIRFormatError { - DocumentManifest res = new DocumentManifest(); - parseDocumentManifestProperties(json, res); - return res; - } - - protected void parseDocumentManifestProperties(JsonObject json, DocumentManifest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("masterIdentifier")) - res.setMasterIdentifier(parseIdentifier(json.getAsJsonObject("masterIdentifier"))); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("author")) { - JsonArray array = json.getAsJsonArray("author"); - for (int i = 0; i < array.size(); i++) { - res.getAuthor().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("recipient")) { - JsonArray array = json.getAsJsonArray("recipient"); - for (int i = 0; i < array.size(); i++) { - res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("source")) - res.setSourceElement(parseUri(json.get("source").getAsString())); - if (json.has("_source")) - parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("content")) { - JsonArray array = json.getAsJsonArray("content"); - for (int i = 0; i < array.size(); i++) { - res.getContent().add(parseDocumentManifestDocumentManifestContentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("related")) { - JsonArray array = json.getAsJsonArray("related"); - for (int i = 0; i < array.size(); i++) { - res.getRelated().add(parseDocumentManifestDocumentManifestRelatedComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected DocumentManifest.DocumentManifestContentComponent parseDocumentManifestDocumentManifestContentComponent(JsonObject json, DocumentManifest owner) throws IOException, FHIRFormatError { - DocumentManifest.DocumentManifestContentComponent res = new DocumentManifest.DocumentManifestContentComponent(); - parseDocumentManifestDocumentManifestContentComponentProperties(json, owner, res); - return res; - } - - protected void parseDocumentManifestDocumentManifestContentComponentProperties(JsonObject json, DocumentManifest owner, DocumentManifest.DocumentManifestContentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type p = parseType("p", json); - if (p != null) - res.setP(p); - } - - protected DocumentManifest.DocumentManifestRelatedComponent parseDocumentManifestDocumentManifestRelatedComponent(JsonObject json, DocumentManifest owner) throws IOException, FHIRFormatError { - DocumentManifest.DocumentManifestRelatedComponent res = new DocumentManifest.DocumentManifestRelatedComponent(); - parseDocumentManifestDocumentManifestRelatedComponentProperties(json, owner, res); - return res; - } - - protected void parseDocumentManifestDocumentManifestRelatedComponentProperties(JsonObject json, DocumentManifest owner, DocumentManifest.DocumentManifestRelatedComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("ref")) - res.setRef(parseReference(json.getAsJsonObject("ref"))); - } - - protected DocumentReference parseDocumentReference(JsonObject json) throws IOException, FHIRFormatError { - DocumentReference res = new DocumentReference(); - parseDocumentReferenceProperties(json, res); - return res; - } - - protected void parseDocumentReferenceProperties(JsonObject json, DocumentReference res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("masterIdentifier")) - res.setMasterIdentifier(parseIdentifier(json.getAsJsonObject("masterIdentifier"))); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("docStatus")) - res.setDocStatusElement(parseEnumeration(json.get("docStatus").getAsString(), DocumentReference.ReferredDocumentStatus.NULL, new DocumentReference.ReferredDocumentStatusEnumFactory())); - if (json.has("_docStatus")) - parseElementProperties(json.getAsJsonObject("_docStatus"), res.getDocStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("class")) - res.setClass_(parseCodeableConcept(json.getAsJsonObject("class"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("indexed")) - res.setIndexedElement(parseInstant(json.get("indexed").getAsString())); - if (json.has("_indexed")) - parseElementProperties(json.getAsJsonObject("_indexed"), res.getIndexedElement()); - if (json.has("author")) { - JsonArray array = json.getAsJsonArray("author"); - for (int i = 0; i < array.size(); i++) { - res.getAuthor().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("authenticator")) - res.setAuthenticator(parseReference(json.getAsJsonObject("authenticator"))); - if (json.has("custodian")) - res.setCustodian(parseReference(json.getAsJsonObject("custodian"))); - if (json.has("relatesTo")) { - JsonArray array = json.getAsJsonArray("relatesTo"); - for (int i = 0; i < array.size(); i++) { - res.getRelatesTo().add(parseDocumentReferenceDocumentReferenceRelatesToComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("securityLabel")) { - JsonArray array = json.getAsJsonArray("securityLabel"); - for (int i = 0; i < array.size(); i++) { - res.getSecurityLabel().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("content")) { - JsonArray array = json.getAsJsonArray("content"); - for (int i = 0; i < array.size(); i++) { - res.getContent().add(parseDocumentReferenceDocumentReferenceContentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("context")) - res.setContext(parseDocumentReferenceDocumentReferenceContextComponent(json.getAsJsonObject("context"), res)); - } - - protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceDocumentReferenceRelatesToComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { - DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent(); - parseDocumentReferenceDocumentReferenceRelatesToComponentProperties(json, owner, res); - return res; - } - - protected void parseDocumentReferenceDocumentReferenceRelatesToComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceRelatesToComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), DocumentReference.DocumentRelationshipType.NULL, new DocumentReference.DocumentRelationshipTypeEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("target")) - res.setTarget(parseReference(json.getAsJsonObject("target"))); - } - - protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceDocumentReferenceContentComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { - DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent(); - parseDocumentReferenceDocumentReferenceContentComponentProperties(json, owner, res); - return res; - } - - protected void parseDocumentReferenceDocumentReferenceContentComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceContentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("attachment")) - res.setAttachment(parseAttachment(json.getAsJsonObject("attachment"))); - if (json.has("format")) - res.setFormat(parseCoding(json.getAsJsonObject("format"))); - } - - protected DocumentReference.DocumentReferenceContextComponent parseDocumentReferenceDocumentReferenceContextComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { - DocumentReference.DocumentReferenceContextComponent res = new DocumentReference.DocumentReferenceContextComponent(); - parseDocumentReferenceDocumentReferenceContextComponentProperties(json, owner, res); - return res; - } - - protected void parseDocumentReferenceDocumentReferenceContextComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceContextComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("event")) { - JsonArray array = json.getAsJsonArray("event"); - for (int i = 0; i < array.size(); i++) { - res.getEvent().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("facilityType")) - res.setFacilityType(parseCodeableConcept(json.getAsJsonObject("facilityType"))); - if (json.has("practiceSetting")) - res.setPracticeSetting(parseCodeableConcept(json.getAsJsonObject("practiceSetting"))); - if (json.has("sourcePatientInfo")) - res.setSourcePatientInfo(parseReference(json.getAsJsonObject("sourcePatientInfo"))); - if (json.has("related")) { - JsonArray array = json.getAsJsonArray("related"); - for (int i = 0; i < array.size(); i++) { - res.getRelated().add(parseDocumentReferenceDocumentReferenceContextRelatedComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected DocumentReference.DocumentReferenceContextRelatedComponent parseDocumentReferenceDocumentReferenceContextRelatedComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { - DocumentReference.DocumentReferenceContextRelatedComponent res = new DocumentReference.DocumentReferenceContextRelatedComponent(); - parseDocumentReferenceDocumentReferenceContextRelatedComponentProperties(json, owner, res); - return res; - } - - protected void parseDocumentReferenceDocumentReferenceContextRelatedComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceContextRelatedComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("ref")) - res.setRef(parseReference(json.getAsJsonObject("ref"))); - } - - protected EligibilityRequest parseEligibilityRequest(JsonObject json) throws IOException, FHIRFormatError { - EligibilityRequest res = new EligibilityRequest(); - parseEligibilityRequestProperties(json, res); - return res; - } - - protected void parseEligibilityRequestProperties(JsonObject json, EligibilityRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EligibilityRequest.EligibilityRequestStatus.NULL, new EligibilityRequest.EligibilityRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("priority")) - res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - Type serviced = parseType("serviced", json); - if (serviced != null) - res.setServiced(serviced); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("enterer")) - res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("insurer")) - res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); - if (json.has("facility")) - res.setFacility(parseReference(json.getAsJsonObject("facility"))); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - if (json.has("businessArrangement")) - res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString())); - if (json.has("_businessArrangement")) - parseElementProperties(json.getAsJsonObject("_businessArrangement"), res.getBusinessArrangementElement()); - if (json.has("benefitCategory")) - res.setBenefitCategory(parseCodeableConcept(json.getAsJsonObject("benefitCategory"))); - if (json.has("benefitSubCategory")) - res.setBenefitSubCategory(parseCodeableConcept(json.getAsJsonObject("benefitSubCategory"))); - } - - protected EligibilityResponse parseEligibilityResponse(JsonObject json) throws IOException, FHIRFormatError { - EligibilityResponse res = new EligibilityResponse(); - parseEligibilityResponseProperties(json, res); - return res; - } - - protected void parseEligibilityResponseProperties(JsonObject json, EligibilityResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EligibilityResponse.EligibilityResponseStatus.NULL, new EligibilityResponse.EligibilityResponseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("requestProvider")) - res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); - if (json.has("requestOrganization")) - res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("disposition")) - res.setDispositionElement(parseString(json.get("disposition").getAsString())); - if (json.has("_disposition")) - parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); - if (json.has("insurer")) - res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); - if (json.has("inforce")) - res.setInforceElement(parseBoolean(json.get("inforce").getAsBoolean())); - if (json.has("_inforce")) - parseElementProperties(json.getAsJsonObject("_inforce"), res.getInforceElement()); - if (json.has("insurance")) { - JsonArray array = json.getAsJsonArray("insurance"); - for (int i = 0; i < array.size(); i++) { - res.getInsurance().add(parseEligibilityResponseInsuranceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("form")) - res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); - if (json.has("error")) { - JsonArray array = json.getAsJsonArray("error"); - for (int i = 0; i < array.size(); i++) { - res.getError().add(parseEligibilityResponseErrorsComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected EligibilityResponse.InsuranceComponent parseEligibilityResponseInsuranceComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { - EligibilityResponse.InsuranceComponent res = new EligibilityResponse.InsuranceComponent(); - parseEligibilityResponseInsuranceComponentProperties(json, owner, res); - return res; - } - - protected void parseEligibilityResponseInsuranceComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.InsuranceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - if (json.has("contract")) - res.setContract(parseReference(json.getAsJsonObject("contract"))); - if (json.has("benefitBalance")) { - JsonArray array = json.getAsJsonArray("benefitBalance"); - for (int i = 0; i < array.size(); i++) { - res.getBenefitBalance().add(parseEligibilityResponseBenefitsComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected EligibilityResponse.BenefitsComponent parseEligibilityResponseBenefitsComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { - EligibilityResponse.BenefitsComponent res = new EligibilityResponse.BenefitsComponent(); - parseEligibilityResponseBenefitsComponentProperties(json, owner, res); - return res; - } - - protected void parseEligibilityResponseBenefitsComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.BenefitsComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("subCategory")) - res.setSubCategory(parseCodeableConcept(json.getAsJsonObject("subCategory"))); - if (json.has("excluded")) - res.setExcludedElement(parseBoolean(json.get("excluded").getAsBoolean())); - if (json.has("_excluded")) - parseElementProperties(json.getAsJsonObject("_excluded"), res.getExcludedElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("network")) - res.setNetwork(parseCodeableConcept(json.getAsJsonObject("network"))); - if (json.has("unit")) - res.setUnit(parseCodeableConcept(json.getAsJsonObject("unit"))); - if (json.has("term")) - res.setTerm(parseCodeableConcept(json.getAsJsonObject("term"))); - if (json.has("financial")) { - JsonArray array = json.getAsJsonArray("financial"); - for (int i = 0; i < array.size(); i++) { - res.getFinancial().add(parseEligibilityResponseBenefitComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected EligibilityResponse.BenefitComponent parseEligibilityResponseBenefitComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { - EligibilityResponse.BenefitComponent res = new EligibilityResponse.BenefitComponent(); - parseEligibilityResponseBenefitComponentProperties(json, owner, res); - return res; - } - - protected void parseEligibilityResponseBenefitComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.BenefitComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - Type allowed = parseType("allowed", json); - if (allowed != null) - res.setAllowed(allowed); - Type used = parseType("used", json); - if (used != null) - res.setUsed(used); - } - - protected EligibilityResponse.ErrorsComponent parseEligibilityResponseErrorsComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { - EligibilityResponse.ErrorsComponent res = new EligibilityResponse.ErrorsComponent(); - parseEligibilityResponseErrorsComponentProperties(json, owner, res); - return res; - } - - protected void parseEligibilityResponseErrorsComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.ErrorsComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - } - - protected Encounter parseEncounter(JsonObject json) throws IOException, FHIRFormatError { - Encounter res = new Encounter(); - parseEncounterProperties(json, res); - return res; - } - - protected void parseEncounterProperties(JsonObject json, Encounter res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("statusHistory")) { - JsonArray array = json.getAsJsonArray("statusHistory"); - for (int i = 0; i < array.size(); i++) { - res.getStatusHistory().add(parseEncounterStatusHistoryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("class")) - res.setClass_(parseCoding(json.getAsJsonObject("class"))); - if (json.has("classHistory")) { - JsonArray array = json.getAsJsonArray("classHistory"); - for (int i = 0; i < array.size(); i++) { - res.getClassHistory().add(parseEncounterClassHistoryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("priority")) - res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("episodeOfCare")) { - JsonArray array = json.getAsJsonArray("episodeOfCare"); - for (int i = 0; i < array.size(); i++) { - res.getEpisodeOfCare().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("incomingReferral")) { - JsonArray array = json.getAsJsonArray("incomingReferral"); - for (int i = 0; i < array.size(); i++) { - res.getIncomingReferral().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseEncounterEncounterParticipantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("appointment")) - res.setAppointment(parseReference(json.getAsJsonObject("appointment"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("length")) - res.setLength(parseDuration(json.getAsJsonObject("length"))); - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("diagnosis")) { - JsonArray array = json.getAsJsonArray("diagnosis"); - for (int i = 0; i < array.size(); i++) { - res.getDiagnosis().add(parseEncounterDiagnosisComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("account")) { - JsonArray array = json.getAsJsonArray("account"); - for (int i = 0; i < array.size(); i++) { - res.getAccount().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("hospitalization")) - res.setHospitalization(parseEncounterEncounterHospitalizationComponent(json.getAsJsonObject("hospitalization"), res)); - if (json.has("location")) { - JsonArray array = json.getAsJsonArray("location"); - for (int i = 0; i < array.size(); i++) { - res.getLocation().add(parseEncounterEncounterLocationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("serviceProvider")) - res.setServiceProvider(parseReference(json.getAsJsonObject("serviceProvider"))); - if (json.has("partOf")) - res.setPartOf(parseReference(json.getAsJsonObject("partOf"))); - } - - protected Encounter.StatusHistoryComponent parseEncounterStatusHistoryComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { - Encounter.StatusHistoryComponent res = new Encounter.StatusHistoryComponent(); - parseEncounterStatusHistoryComponentProperties(json, owner, res); - return res; - } - - protected void parseEncounterStatusHistoryComponentProperties(JsonObject json, Encounter owner, Encounter.StatusHistoryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected Encounter.ClassHistoryComponent parseEncounterClassHistoryComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { - Encounter.ClassHistoryComponent res = new Encounter.ClassHistoryComponent(); - parseEncounterClassHistoryComponentProperties(json, owner, res); - return res; - } - - protected void parseEncounterClassHistoryComponentProperties(JsonObject json, Encounter owner, Encounter.ClassHistoryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("class")) - res.setClass_(parseCoding(json.getAsJsonObject("class"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected Encounter.EncounterParticipantComponent parseEncounterEncounterParticipantComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { - Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent(); - parseEncounterEncounterParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parseEncounterEncounterParticipantComponentProperties(JsonObject json, Encounter owner, Encounter.EncounterParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("individual")) - res.setIndividual(parseReference(json.getAsJsonObject("individual"))); - } - - protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { - Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent(); - parseEncounterDiagnosisComponentProperties(json, owner, res); - return res; - } - - protected void parseEncounterDiagnosisComponentProperties(JsonObject json, Encounter owner, Encounter.DiagnosisComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("condition")) - res.setCondition(parseReference(json.getAsJsonObject("condition"))); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("rank")) - res.setRankElement(parsePositiveInt(json.get("rank").getAsString())); - if (json.has("_rank")) - parseElementProperties(json.getAsJsonObject("_rank"), res.getRankElement()); - } - - protected Encounter.EncounterHospitalizationComponent parseEncounterEncounterHospitalizationComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { - Encounter.EncounterHospitalizationComponent res = new Encounter.EncounterHospitalizationComponent(); - parseEncounterEncounterHospitalizationComponentProperties(json, owner, res); - return res; - } - - protected void parseEncounterEncounterHospitalizationComponentProperties(JsonObject json, Encounter owner, Encounter.EncounterHospitalizationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("preAdmissionIdentifier")) - res.setPreAdmissionIdentifier(parseIdentifier(json.getAsJsonObject("preAdmissionIdentifier"))); - if (json.has("origin")) - res.setOrigin(parseReference(json.getAsJsonObject("origin"))); - if (json.has("admitSource")) - res.setAdmitSource(parseCodeableConcept(json.getAsJsonObject("admitSource"))); - if (json.has("reAdmission")) - res.setReAdmission(parseCodeableConcept(json.getAsJsonObject("reAdmission"))); - if (json.has("dietPreference")) { - JsonArray array = json.getAsJsonArray("dietPreference"); - for (int i = 0; i < array.size(); i++) { - res.getDietPreference().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialCourtesy")) { - JsonArray array = json.getAsJsonArray("specialCourtesy"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialCourtesy().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialArrangement")) { - JsonArray array = json.getAsJsonArray("specialArrangement"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialArrangement().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("destination")) - res.setDestination(parseReference(json.getAsJsonObject("destination"))); - if (json.has("dischargeDisposition")) - res.setDischargeDisposition(parseCodeableConcept(json.getAsJsonObject("dischargeDisposition"))); - } - - protected Encounter.EncounterLocationComponent parseEncounterEncounterLocationComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { - Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent(); - parseEncounterEncounterLocationComponentProperties(json, owner, res); - return res; - } - - protected void parseEncounterEncounterLocationComponentProperties(JsonObject json, Encounter owner, Encounter.EncounterLocationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterLocationStatus.NULL, new Encounter.EncounterLocationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected Endpoint parseEndpoint(JsonObject json) throws IOException, FHIRFormatError { - Endpoint res = new Endpoint(); - parseEndpointProperties(json, res); - return res; - } - - protected void parseEndpointProperties(JsonObject json, Endpoint res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Endpoint.EndpointStatus.NULL, new Endpoint.EndpointStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("connectionType")) - res.setConnectionType(parseCoding(json.getAsJsonObject("connectionType"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("managingOrganization")) - res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("payloadType")) { - JsonArray array = json.getAsJsonArray("payloadType"); - for (int i = 0; i < array.size(); i++) { - res.getPayloadType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("payloadMimeType")) { - JsonArray array = json.getAsJsonArray("payloadMimeType"); - for (int i = 0; i < array.size(); i++) { - res.getPayloadMimeType().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_payloadMimeType")) { - JsonArray array = json.getAsJsonArray("_payloadMimeType"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPayloadMimeType().size()) - res.getPayloadMimeType().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPayloadMimeType().get(i)); - } - }; - if (json.has("address")) - res.setAddressElement(parseUri(json.get("address").getAsString())); - if (json.has("_address")) - parseElementProperties(json.getAsJsonObject("_address"), res.getAddressElement()); - if (json.has("header")) { - JsonArray array = json.getAsJsonArray("header"); - for (int i = 0; i < array.size(); i++) { - res.getHeader().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_header")) { - JsonArray array = json.getAsJsonArray("_header"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getHeader().size()) - res.getHeader().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getHeader().get(i)); - } - }; - } - - protected EnrollmentRequest parseEnrollmentRequest(JsonObject json) throws IOException, FHIRFormatError { - EnrollmentRequest res = new EnrollmentRequest(); - parseEnrollmentRequestProperties(json, res); - return res; - } - - protected void parseEnrollmentRequestProperties(JsonObject json, EnrollmentRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EnrollmentRequest.EnrollmentRequestStatus.NULL, new EnrollmentRequest.EnrollmentRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("insurer")) - res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("candidate")) - res.setCandidate(parseReference(json.getAsJsonObject("candidate"))); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - } - - protected EnrollmentResponse parseEnrollmentResponse(JsonObject json) throws IOException, FHIRFormatError { - EnrollmentResponse res = new EnrollmentResponse(); - parseEnrollmentResponseProperties(json, res); - return res; - } - - protected void parseEnrollmentResponseProperties(JsonObject json, EnrollmentResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EnrollmentResponse.EnrollmentResponseStatus.NULL, new EnrollmentResponse.EnrollmentResponseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("disposition")) - res.setDispositionElement(parseString(json.get("disposition").getAsString())); - if (json.has("_disposition")) - parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("requestProvider")) - res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); - if (json.has("requestOrganization")) - res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); - } - - protected EpisodeOfCare parseEpisodeOfCare(JsonObject json) throws IOException, FHIRFormatError { - EpisodeOfCare res = new EpisodeOfCare(); - parseEpisodeOfCareProperties(json, res); - return res; - } - - protected void parseEpisodeOfCareProperties(JsonObject json, EpisodeOfCare res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("statusHistory")) { - JsonArray array = json.getAsJsonArray("statusHistory"); - for (int i = 0; i < array.size(); i++) { - res.getStatusHistory().add(parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("diagnosis")) { - JsonArray array = json.getAsJsonArray("diagnosis"); - for (int i = 0; i < array.size(); i++) { - res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("managingOrganization")) - res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("referralRequest")) { - JsonArray array = json.getAsJsonArray("referralRequest"); - for (int i = 0; i < array.size(); i++) { - res.getReferralRequest().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("careManager")) - res.setCareManager(parseReference(json.getAsJsonObject("careManager"))); - if (json.has("team")) { - JsonArray array = json.getAsJsonArray("team"); - for (int i = 0; i < array.size(); i++) { - res.getTeam().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("account")) { - JsonArray array = json.getAsJsonArray("account"); - for (int i = 0; i < array.size(); i++) { - res.getAccount().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(JsonObject json, EpisodeOfCare owner) throws IOException, FHIRFormatError { - EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); - parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentProperties(json, owner, res); - return res; - } - - protected void parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentProperties(JsonObject json, EpisodeOfCare owner, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected EpisodeOfCare.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(JsonObject json, EpisodeOfCare owner) throws IOException, FHIRFormatError { - EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent(); - parseEpisodeOfCareDiagnosisComponentProperties(json, owner, res); - return res; - } - - protected void parseEpisodeOfCareDiagnosisComponentProperties(JsonObject json, EpisodeOfCare owner, EpisodeOfCare.DiagnosisComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("condition")) - res.setCondition(parseReference(json.getAsJsonObject("condition"))); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("rank")) - res.setRankElement(parsePositiveInt(json.get("rank").getAsString())); - if (json.has("_rank")) - parseElementProperties(json.getAsJsonObject("_rank"), res.getRankElement()); - } - - protected EventDefinition parseEventDefinition(JsonObject json) throws IOException, FHIRFormatError { - EventDefinition res = new EventDefinition(); - parseEventDefinitionProperties(json, res); - return res; - } - - protected void parseEventDefinitionProperties(JsonObject json, EventDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contributor")) { - JsonArray array = json.getAsJsonArray("contributor"); - for (int i = 0; i < array.size(); i++) { - res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - - } - - protected ExpansionProfile parseExpansionProfile(JsonObject json) throws IOException, FHIRFormatError { - ExpansionProfile res = new ExpansionProfile(); - parseExpansionProfileProperties(json, res); - return res; - } - - protected void parseExpansionProfileProperties(JsonObject json, ExpansionProfile res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("fixedVersion")) { - JsonArray array = json.getAsJsonArray("fixedVersion"); - for (int i = 0; i < array.size(); i++) { - res.getFixedVersion().add(parseExpansionProfileExpansionProfileFixedVersionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("excludedSystem")) - res.setExcludedSystem(parseExpansionProfileExpansionProfileExcludedSystemComponent(json.getAsJsonObject("excludedSystem"), res)); - if (json.has("includeDesignations")) - res.setIncludeDesignationsElement(parseBoolean(json.get("includeDesignations").getAsBoolean())); - if (json.has("_includeDesignations")) - parseElementProperties(json.getAsJsonObject("_includeDesignations"), res.getIncludeDesignationsElement()); - if (json.has("designation")) - res.setDesignation(parseExpansionProfileExpansionProfileDesignationComponent(json.getAsJsonObject("designation"), res)); - if (json.has("includeDefinition")) - res.setIncludeDefinitionElement(parseBoolean(json.get("includeDefinition").getAsBoolean())); - if (json.has("_includeDefinition")) - parseElementProperties(json.getAsJsonObject("_includeDefinition"), res.getIncludeDefinitionElement()); - if (json.has("activeOnly")) - res.setActiveOnlyElement(parseBoolean(json.get("activeOnly").getAsBoolean())); - if (json.has("_activeOnly")) - parseElementProperties(json.getAsJsonObject("_activeOnly"), res.getActiveOnlyElement()); - if (json.has("excludeNested")) - res.setExcludeNestedElement(parseBoolean(json.get("excludeNested").getAsBoolean())); - if (json.has("_excludeNested")) - parseElementProperties(json.getAsJsonObject("_excludeNested"), res.getExcludeNestedElement()); - if (json.has("excludeNotForUI")) - res.setExcludeNotForUIElement(parseBoolean(json.get("excludeNotForUI").getAsBoolean())); - if (json.has("_excludeNotForUI")) - parseElementProperties(json.getAsJsonObject("_excludeNotForUI"), res.getExcludeNotForUIElement()); - if (json.has("excludePostCoordinated")) - res.setExcludePostCoordinatedElement(parseBoolean(json.get("excludePostCoordinated").getAsBoolean())); - if (json.has("_excludePostCoordinated")) - parseElementProperties(json.getAsJsonObject("_excludePostCoordinated"), res.getExcludePostCoordinatedElement()); - if (json.has("displayLanguage")) - res.setDisplayLanguageElement(parseCode(json.get("displayLanguage").getAsString())); - if (json.has("_displayLanguage")) - parseElementProperties(json.getAsJsonObject("_displayLanguage"), res.getDisplayLanguageElement()); - if (json.has("limitedExpansion")) - res.setLimitedExpansionElement(parseBoolean(json.get("limitedExpansion").getAsBoolean())); - if (json.has("_limitedExpansion")) - parseElementProperties(json.getAsJsonObject("_limitedExpansion"), res.getLimitedExpansionElement()); - } - - protected ExpansionProfile.ExpansionProfileFixedVersionComponent parseExpansionProfileExpansionProfileFixedVersionComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.ExpansionProfileFixedVersionComponent res = new ExpansionProfile.ExpansionProfileFixedVersionComponent(); - parseExpansionProfileExpansionProfileFixedVersionComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileExpansionProfileFixedVersionComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.ExpansionProfileFixedVersionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ExpansionProfile.SystemVersionProcessingMode.NULL, new ExpansionProfile.SystemVersionProcessingModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - } - - protected ExpansionProfile.ExpansionProfileExcludedSystemComponent parseExpansionProfileExpansionProfileExcludedSystemComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.ExpansionProfileExcludedSystemComponent res = new ExpansionProfile.ExpansionProfileExcludedSystemComponent(); - parseExpansionProfileExpansionProfileExcludedSystemComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileExpansionProfileExcludedSystemComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.ExpansionProfileExcludedSystemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - } - - protected ExpansionProfile.ExpansionProfileDesignationComponent parseExpansionProfileExpansionProfileDesignationComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.ExpansionProfileDesignationComponent res = new ExpansionProfile.ExpansionProfileDesignationComponent(); - parseExpansionProfileExpansionProfileDesignationComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileExpansionProfileDesignationComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.ExpansionProfileDesignationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("include")) - res.setInclude(parseExpansionProfileDesignationIncludeComponent(json.getAsJsonObject("include"), owner)); - if (json.has("exclude")) - res.setExclude(parseExpansionProfileDesignationExcludeComponent(json.getAsJsonObject("exclude"), owner)); - } - - protected ExpansionProfile.DesignationIncludeComponent parseExpansionProfileDesignationIncludeComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.DesignationIncludeComponent res = new ExpansionProfile.DesignationIncludeComponent(); - parseExpansionProfileDesignationIncludeComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileDesignationIncludeComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationIncludeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("designation")) { - JsonArray array = json.getAsJsonArray("designation"); - for (int i = 0; i < array.size(); i++) { - res.getDesignation().add(parseExpansionProfileDesignationIncludeDesignationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExpansionProfile.DesignationIncludeDesignationComponent parseExpansionProfileDesignationIncludeDesignationComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.DesignationIncludeDesignationComponent res = new ExpansionProfile.DesignationIncludeDesignationComponent(); - parseExpansionProfileDesignationIncludeDesignationComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileDesignationIncludeDesignationComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationIncludeDesignationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("use")) - res.setUse(parseCoding(json.getAsJsonObject("use"))); - } - - protected ExpansionProfile.DesignationExcludeComponent parseExpansionProfileDesignationExcludeComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.DesignationExcludeComponent res = new ExpansionProfile.DesignationExcludeComponent(); - parseExpansionProfileDesignationExcludeComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileDesignationExcludeComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationExcludeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("designation")) { - JsonArray array = json.getAsJsonArray("designation"); - for (int i = 0; i < array.size(); i++) { - res.getDesignation().add(parseExpansionProfileDesignationExcludeDesignationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExpansionProfile.DesignationExcludeDesignationComponent parseExpansionProfileDesignationExcludeDesignationComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { - ExpansionProfile.DesignationExcludeDesignationComponent res = new ExpansionProfile.DesignationExcludeDesignationComponent(); - parseExpansionProfileDesignationExcludeDesignationComponentProperties(json, owner, res); - return res; - } - - protected void parseExpansionProfileDesignationExcludeDesignationComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationExcludeDesignationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("use")) - res.setUse(parseCoding(json.getAsJsonObject("use"))); - } - - protected ExplanationOfBenefit parseExplanationOfBenefit(JsonObject json) throws IOException, FHIRFormatError { - ExplanationOfBenefit res = new ExplanationOfBenefit(); - parseExplanationOfBenefitProperties(json, res); - return res; - } - - protected void parseExplanationOfBenefitProperties(JsonObject json, ExplanationOfBenefit res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL, new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("subType")) { - JsonArray array = json.getAsJsonArray("subType"); - for (int i = 0; i < array.size(); i++) { - res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("billablePeriod")) - res.setBillablePeriod(parsePeriod(json.getAsJsonObject("billablePeriod"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("enterer")) - res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); - if (json.has("insurer")) - res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("referral")) - res.setReferral(parseReference(json.getAsJsonObject("referral"))); - if (json.has("facility")) - res.setFacility(parseReference(json.getAsJsonObject("facility"))); - if (json.has("claim")) - res.setClaim(parseReference(json.getAsJsonObject("claim"))); - if (json.has("claimResponse")) - res.setClaimResponse(parseReference(json.getAsJsonObject("claimResponse"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("disposition")) - res.setDispositionElement(parseString(json.get("disposition").getAsString())); - if (json.has("_disposition")) - parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); - if (json.has("related")) { - JsonArray array = json.getAsJsonArray("related"); - for (int i = 0; i < array.size(); i++) { - res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("prescription")) - res.setPrescription(parseReference(json.getAsJsonObject("prescription"))); - if (json.has("originalPrescription")) - res.setOriginalPrescription(parseReference(json.getAsJsonObject("originalPrescription"))); - if (json.has("payee")) - res.setPayee(parseExplanationOfBenefitPayeeComponent(json.getAsJsonObject("payee"), res)); - if (json.has("information")) { - JsonArray array = json.getAsJsonArray("information"); - for (int i = 0; i < array.size(); i++) { - res.getInformation().add(parseExplanationOfBenefitSupportingInformationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("careTeam")) { - JsonArray array = json.getAsJsonArray("careTeam"); - for (int i = 0; i < array.size(); i++) { - res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("diagnosis")) { - JsonArray array = json.getAsJsonArray("diagnosis"); - for (int i = 0; i < array.size(); i++) { - res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("procedure")) { - JsonArray array = json.getAsJsonArray("procedure"); - for (int i = 0; i < array.size(); i++) { - res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("precedence")) - res.setPrecedenceElement(parsePositiveInt(json.get("precedence").getAsString())); - if (json.has("_precedence")) - parseElementProperties(json.getAsJsonObject("_precedence"), res.getPrecedenceElement()); - if (json.has("insurance")) - res.setInsurance(parseExplanationOfBenefitInsuranceComponent(json.getAsJsonObject("insurance"), res)); - if (json.has("accident")) - res.setAccident(parseExplanationOfBenefitAccidentComponent(json.getAsJsonObject("accident"), res)); - if (json.has("employmentImpacted")) - res.setEmploymentImpacted(parsePeriod(json.getAsJsonObject("employmentImpacted"))); - if (json.has("hospitalization")) - res.setHospitalization(parsePeriod(json.getAsJsonObject("hospitalization"))); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseExplanationOfBenefitItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("addItem")) { - JsonArray array = json.getAsJsonArray("addItem"); - for (int i = 0; i < array.size(); i++) { - res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("totalCost")) - res.setTotalCost(parseMoney(json.getAsJsonObject("totalCost"))); - if (json.has("unallocDeductable")) - res.setUnallocDeductable(parseMoney(json.getAsJsonObject("unallocDeductable"))); - if (json.has("totalBenefit")) - res.setTotalBenefit(parseMoney(json.getAsJsonObject("totalBenefit"))); - if (json.has("payment")) - res.setPayment(parseExplanationOfBenefitPaymentComponent(json.getAsJsonObject("payment"), res)); - if (json.has("form")) - res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); - if (json.has("processNote")) { - JsonArray array = json.getAsJsonArray("processNote"); - for (int i = 0; i < array.size(); i++) { - res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("benefitBalance")) { - JsonArray array = json.getAsJsonArray("benefitBalance"); - for (int i = 0; i < array.size(); i++) { - res.getBenefitBalance().add(parseExplanationOfBenefitBenefitBalanceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent(); - parseExplanationOfBenefitRelatedClaimComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitRelatedClaimComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.RelatedClaimComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("claim")) - res.setClaim(parseReference(json.getAsJsonObject("claim"))); - if (json.has("relationship")) - res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); - if (json.has("reference")) - res.setReference(parseIdentifier(json.getAsJsonObject("reference"))); - } - - protected ExplanationOfBenefit.PayeeComponent parseExplanationOfBenefitPayeeComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent(); - parseExplanationOfBenefitPayeeComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitPayeeComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.PayeeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("resource")) - res.setResource(parseCoding(json.getAsJsonObject("resource"))); - if (json.has("party")) - res.setParty(parseReference(json.getAsJsonObject("party"))); - } - - protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent(); - parseExplanationOfBenefitSupportingInformationComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitSupportingInformationComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.SupportingInformationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - Type timing = parseType("timing", json); - if (timing != null) - res.setTiming(timing); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("reason")) - res.setReason(parseCoding(json.getAsJsonObject("reason"))); - } - - protected ExplanationOfBenefit.CareTeamComponent parseExplanationOfBenefitCareTeamComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent(); - parseExplanationOfBenefitCareTeamComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitCareTeamComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.CareTeamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("responsible")) - res.setResponsibleElement(parseBoolean(json.get("responsible").getAsBoolean())); - if (json.has("_responsible")) - parseElementProperties(json.getAsJsonObject("_responsible"), res.getResponsibleElement()); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("qualification")) - res.setQualification(parseCodeableConcept(json.getAsJsonObject("qualification"))); - } - - protected ExplanationOfBenefit.DiagnosisComponent parseExplanationOfBenefitDiagnosisComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent(); - parseExplanationOfBenefitDiagnosisComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitDiagnosisComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.DiagnosisComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - Type diagnosis = parseType("diagnosis", json); - if (diagnosis != null) - res.setDiagnosis(diagnosis); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("packageCode")) - res.setPackageCode(parseCodeableConcept(json.getAsJsonObject("packageCode"))); - } - - protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent(); - parseExplanationOfBenefitProcedureComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitProcedureComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.ProcedureComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - Type procedure = parseType("procedure", json); - if (procedure != null) - res.setProcedure(procedure); - } - - protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent(); - parseExplanationOfBenefitInsuranceComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitInsuranceComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.InsuranceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("coverage")) - res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); - if (json.has("preAuthRef")) { - JsonArray array = json.getAsJsonArray("preAuthRef"); - for (int i = 0; i < array.size(); i++) { - res.getPreAuthRef().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_preAuthRef")) { - JsonArray array = json.getAsJsonArray("_preAuthRef"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPreAuthRef().size()) - res.getPreAuthRef().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i)); - } - }; - } - - protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent(); - parseExplanationOfBenefitAccidentComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitAccidentComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.AccidentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("date")) - res.setDateElement(parseDate(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - Type location = parseType("location", json); - if (location != null) - res.setLocation(location); - } - - protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent(); - parseExplanationOfBenefitItemComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitItemComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.ItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("careTeamLinkId")) { - JsonArray array = json.getAsJsonArray("careTeamLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getCareTeamLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_careTeamLinkId")) { - JsonArray array = json.getAsJsonArray("_careTeamLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getCareTeamLinkId().size()) - res.getCareTeamLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getCareTeamLinkId().get(i)); - } - }; - if (json.has("diagnosisLinkId")) { - JsonArray array = json.getAsJsonArray("diagnosisLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getDiagnosisLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_diagnosisLinkId")) { - JsonArray array = json.getAsJsonArray("_diagnosisLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDiagnosisLinkId().size()) - res.getDiagnosisLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDiagnosisLinkId().get(i)); - } - }; - if (json.has("procedureLinkId")) { - JsonArray array = json.getAsJsonArray("procedureLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getProcedureLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_procedureLinkId")) { - JsonArray array = json.getAsJsonArray("_procedureLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getProcedureLinkId().size()) - res.getProcedureLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getProcedureLinkId().get(i)); - } - }; - if (json.has("informationLinkId")) { - JsonArray array = json.getAsJsonArray("informationLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getInformationLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_informationLinkId")) { - JsonArray array = json.getAsJsonArray("_informationLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getInformationLinkId().size()) - res.getInformationLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getInformationLinkId().get(i)); - } - }; - if (json.has("revenue")) - res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("programCode")) { - JsonArray array = json.getAsJsonArray("programCode"); - for (int i = 0; i < array.size(); i++) { - res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - Type serviced = parseType("serviced", json); - if (serviced != null) - res.setServiced(serviced); - Type location = parseType("location", json); - if (location != null) - res.setLocation(location); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - if (json.has("udi")) { - JsonArray array = json.getAsJsonArray("udi"); - for (int i = 0; i < array.size(); i++) { - res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) - res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); - if (json.has("subSite")) { - JsonArray array = json.getAsJsonArray("subSite"); - for (int i = 0; i < array.size(); i++) { - res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("encounter")) { - JsonArray array = json.getAsJsonArray("encounter"); - for (int i = 0; i < array.size(); i++) { - res.getEncounter().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parseExplanationOfBenefitDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent(); - parseExplanationOfBenefitAdjudicationComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitAdjudicationComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.AdjudicationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - if (json.has("amount")) - res.setAmount(parseMoney(json.getAsJsonObject("amount"))); - if (json.has("value")) - res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent(); - parseExplanationOfBenefitDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitDetailComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.DetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("revenue")) - res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("programCode")) { - JsonArray array = json.getAsJsonArray("programCode"); - for (int i = 0; i < array.size(); i++) { - res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - if (json.has("udi")) { - JsonArray array = json.getAsJsonArray("udi"); - for (int i = 0; i < array.size(); i++) { - res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("subDetail")) { - JsonArray array = json.getAsJsonArray("subDetail"); - for (int i = 0; i < array.size(); i++) { - res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent(); - parseExplanationOfBenefitSubDetailComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitSubDetailComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.SubDetailComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequence")) - res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); - if (json.has("_sequence")) - parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("revenue")) - res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("programCode")) { - JsonArray array = json.getAsJsonArray("programCode"); - for (int i = 0; i < array.size(); i++) { - res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("unitPrice")) - res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); - if (json.has("factor")) - res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); - if (json.has("_factor")) - parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); - if (json.has("net")) - res.setNet(parseMoney(json.getAsJsonObject("net"))); - if (json.has("udi")) { - JsonArray array = json.getAsJsonArray("udi"); - for (int i = 0; i < array.size(); i++) { - res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent(); - parseExplanationOfBenefitAddedItemComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitAddedItemComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) { - JsonArray array = json.getAsJsonArray("sequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_sequenceLinkId")) { - JsonArray array = json.getAsJsonArray("_sequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSequenceLinkId().size()) - res.getSequenceLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSequenceLinkId().get(i)); - } - }; - if (json.has("detailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("detailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getDetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_detailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("_detailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDetailSequenceLinkId().size()) - res.getDetailSequenceLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDetailSequenceLinkId().get(i)); - } - }; - if (json.has("subdetailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("subdetailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - res.getSubdetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_subdetailSequenceLinkId")) { - JsonArray array = json.getAsJsonArray("_subdetailSequenceLinkId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSubdetailSequenceLinkId().size()) - res.getSubdetailSequenceLinkId().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSubdetailSequenceLinkId().get(i)); - } - }; - if (json.has("service")) - res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("fee")) - res.setFee(parseMoney(json.getAsJsonObject("fee"))); - if (json.has("noteNumber")) { - JsonArray array = json.getAsJsonArray("noteNumber"); - for (int i = 0; i < array.size(); i++) { - res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); - } - }; - if (json.has("_noteNumber")) { - JsonArray array = json.getAsJsonArray("_noteNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getNoteNumber().size()) - res.getNoteNumber().add(parsePositiveInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); - } - }; - if (json.has("adjudication")) { - JsonArray array = json.getAsJsonArray("adjudication"); - for (int i = 0; i < array.size(); i++) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExplanationOfBenefit.PaymentComponent parseExplanationOfBenefitPaymentComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent(); - parseExplanationOfBenefitPaymentComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitPaymentComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.PaymentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("adjustment")) - res.setAdjustment(parseMoney(json.getAsJsonObject("adjustment"))); - if (json.has("adjustmentReason")) - res.setAdjustmentReason(parseCodeableConcept(json.getAsJsonObject("adjustmentReason"))); - if (json.has("date")) - res.setDateElement(parseDate(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("amount")) - res.setAmount(parseMoney(json.getAsJsonObject("amount"))); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - } - - protected ExplanationOfBenefit.NoteComponent parseExplanationOfBenefitNoteComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent(); - parseExplanationOfBenefitNoteComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitNoteComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.NoteComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("number")) - res.setNumberElement(parsePositiveInt(json.get("number").getAsString())); - if (json.has("_number")) - parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("language")) - res.setLanguage(parseCodeableConcept(json.getAsJsonObject("language"))); - } - - protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent(); - parseExplanationOfBenefitBenefitBalanceComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitBenefitBalanceComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitBalanceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("subCategory")) - res.setSubCategory(parseCodeableConcept(json.getAsJsonObject("subCategory"))); - if (json.has("excluded")) - res.setExcludedElement(parseBoolean(json.get("excluded").getAsBoolean())); - if (json.has("_excluded")) - parseElementProperties(json.getAsJsonObject("_excluded"), res.getExcludedElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("network")) - res.setNetwork(parseCodeableConcept(json.getAsJsonObject("network"))); - if (json.has("unit")) - res.setUnit(parseCodeableConcept(json.getAsJsonObject("unit"))); - if (json.has("term")) - res.setTerm(parseCodeableConcept(json.getAsJsonObject("term"))); - if (json.has("financial")) { - JsonArray array = json.getAsJsonArray("financial"); - for (int i = 0; i < array.size(); i++) { - res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { - ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent(); - parseExplanationOfBenefitBenefitComponentProperties(json, owner, res); - return res; - } - - protected void parseExplanationOfBenefitBenefitComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - Type allowed = parseType("allowed", json); - if (allowed != null) - res.setAllowed(allowed); - Type used = parseType("used", json); - if (used != null) - res.setUsed(used); - } - - protected FamilyMemberHistory parseFamilyMemberHistory(JsonObject json) throws IOException, FHIRFormatError { - FamilyMemberHistory res = new FamilyMemberHistory(); - parseFamilyMemberHistoryProperties(json, res); - return res; - } - - protected void parseFamilyMemberHistoryProperties(JsonObject json, FamilyMemberHistory res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), FamilyMemberHistory.FamilyHistoryStatus.NULL, new FamilyMemberHistory.FamilyHistoryStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("dataAbsentReason")) - res.setDataAbsentReason(parseCodeableConcept(json.getAsJsonObject("dataAbsentReason"))); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("relationship")) - res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); - if (json.has("gender")) - res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - if (json.has("_gender")) - parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); - Type born = parseType("born", json); - if (born != null) - res.setBorn(born); - Type age = parseType("age", json); - if (age != null) - res.setAge(age); - if (json.has("estimatedAge")) - res.setEstimatedAgeElement(parseBoolean(json.get("estimatedAge").getAsBoolean())); - if (json.has("_estimatedAge")) - parseElementProperties(json.getAsJsonObject("_estimatedAge"), res.getEstimatedAgeElement()); - Type deceased = parseType("deceased", json); - if (deceased != null) - res.setDeceased(deceased); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("condition")) { - JsonArray array = json.getAsJsonArray("condition"); - for (int i = 0; i < array.size(); i++) { - res.getCondition().add(parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(JsonObject json, FamilyMemberHistory owner) throws IOException, FHIRFormatError { - FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent(); - parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentProperties(json, owner, res); - return res; - } - - protected void parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentProperties(JsonObject json, FamilyMemberHistory owner, FamilyMemberHistory.FamilyMemberHistoryConditionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - Type onset = parseType("onset", json); - if (onset != null) - res.setOnset(onset); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected Flag parseFlag(JsonObject json) throws IOException, FHIRFormatError { - Flag res = new Flag(); - parseFlagProperties(json, res); - return res; - } - - protected void parseFlagProperties(JsonObject json, Flag res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Flag.FlagStatus.NULL, new Flag.FlagStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - } - - protected Goal parseGoal(JsonObject json) throws IOException, FHIRFormatError { - Goal res = new Goal(); - parseGoalProperties(json, res); - return res; - } - - protected void parseGoalProperties(JsonObject json, Goal res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Goal.GoalStatus.NULL, new Goal.GoalStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("priority")) - res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); - if (json.has("description")) - res.setDescription(parseCodeableConcept(json.getAsJsonObject("description"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - Type start = parseType("start", json); - if (start != null) - res.setStart(start); - if (json.has("target")) - res.setTarget(parseGoalGoalTargetComponent(json.getAsJsonObject("target"), res)); - if (json.has("statusDate")) - res.setStatusDateElement(parseDate(json.get("statusDate").getAsString())); - if (json.has("_statusDate")) - parseElementProperties(json.getAsJsonObject("_statusDate"), res.getStatusDateElement()); - if (json.has("statusReason")) - res.setStatusReasonElement(parseString(json.get("statusReason").getAsString())); - if (json.has("_statusReason")) - parseElementProperties(json.getAsJsonObject("_statusReason"), res.getStatusReasonElement()); - if (json.has("expressedBy")) - res.setExpressedBy(parseReference(json.getAsJsonObject("expressedBy"))); - if (json.has("addresses")) { - JsonArray array = json.getAsJsonArray("addresses"); - for (int i = 0; i < array.size(); i++) { - res.getAddresses().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("outcomeCode")) { - JsonArray array = json.getAsJsonArray("outcomeCode"); - for (int i = 0; i < array.size(); i++) { - res.getOutcomeCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("outcomeReference")) { - JsonArray array = json.getAsJsonArray("outcomeReference"); - for (int i = 0; i < array.size(); i++) { - res.getOutcomeReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Goal.GoalTargetComponent parseGoalGoalTargetComponent(JsonObject json, Goal owner) throws IOException, FHIRFormatError { - Goal.GoalTargetComponent res = new Goal.GoalTargetComponent(); - parseGoalGoalTargetComponentProperties(json, owner, res); - return res; - } - - protected void parseGoalGoalTargetComponentProperties(JsonObject json, Goal owner, Goal.GoalTargetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("measure")) - res.setMeasure(parseCodeableConcept(json.getAsJsonObject("measure"))); - Type detail = parseType("detail", json); - if (detail != null) - res.setDetail(detail); - Type due = parseType("due", json); - if (due != null) - res.setDue(due); - } - - protected GraphDefinition parseGraphDefinition(JsonObject json) throws IOException, FHIRFormatError { - GraphDefinition res = new GraphDefinition(); - parseGraphDefinitionProperties(json, res); - return res; - } - - protected void parseGraphDefinitionProperties(JsonObject json, GraphDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("start")) - res.setStartElement(parseCode(json.get("start").getAsString())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("profile")) - res.setProfileElement(parseUri(json.get("profile").getAsString())); - if (json.has("_profile")) - parseElementProperties(json.getAsJsonObject("_profile"), res.getProfileElement()); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionGraphDefinitionLinkComponent(JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError { - GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent(); - parseGraphDefinitionGraphDefinitionLinkComponentProperties(json, owner, res); - return res; - } - - protected void parseGraphDefinitionGraphDefinitionLinkComponentProperties(JsonObject json, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("sliceName")) - res.setSliceNameElement(parseString(json.get("sliceName").getAsString())); - if (json.has("_sliceName")) - parseElementProperties(json.getAsJsonObject("_sliceName"), res.getSliceNameElement()); - if (json.has("min")) - res.setMinElement(parseInteger(json.get("min").getAsLong())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("target")) { - JsonArray array = json.getAsJsonArray("target"); - for (int i = 0; i < array.size(); i++) { - res.getTarget().add(parseGraphDefinitionGraphDefinitionLinkTargetComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected GraphDefinition.GraphDefinitionLinkTargetComponent parseGraphDefinitionGraphDefinitionLinkTargetComponent(JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError { - GraphDefinition.GraphDefinitionLinkTargetComponent res = new GraphDefinition.GraphDefinitionLinkTargetComponent(); - parseGraphDefinitionGraphDefinitionLinkTargetComponentProperties(json, owner, res); - return res; - } - - protected void parseGraphDefinitionGraphDefinitionLinkTargetComponentProperties(JsonObject json, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("profile")) - res.setProfileElement(parseUri(json.get("profile").getAsString())); - if (json.has("_profile")) - parseElementProperties(json.getAsJsonObject("_profile"), res.getProfileElement()); - if (json.has("compartment")) { - JsonArray array = json.getAsJsonArray("compartment"); - for (int i = 0; i < array.size(); i++) { - res.getCompartment().add(parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError { - GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); - parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentProperties(json, owner, res); - return res; - } - - protected void parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentProperties(JsonObject json, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), GraphDefinition.CompartmentCode.NULL, new GraphDefinition.CompartmentCodeEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("rule")) - res.setRuleElement(parseEnumeration(json.get("rule").getAsString(), GraphDefinition.GraphCompartmentRule.NULL, new GraphDefinition.GraphCompartmentRuleEnumFactory())); - if (json.has("_rule")) - parseElementProperties(json.getAsJsonObject("_rule"), res.getRuleElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - } - - protected Group parseGroup(JsonObject json) throws IOException, FHIRFormatError { - Group res = new Group(); - parseGroupProperties(json, res); - return res; - } - - protected void parseGroupProperties(JsonObject json, Group res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Group.GroupType.NULL, new Group.GroupTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("actual")) - res.setActualElement(parseBoolean(json.get("actual").getAsBoolean())); - if (json.has("_actual")) - parseElementProperties(json.getAsJsonObject("_actual"), res.getActualElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("quantity")) - res.setQuantityElement(parseUnsignedInt(json.get("quantity").getAsString())); - if (json.has("_quantity")) - parseElementProperties(json.getAsJsonObject("_quantity"), res.getQuantityElement()); - if (json.has("characteristic")) { - JsonArray array = json.getAsJsonArray("characteristic"); - for (int i = 0; i < array.size(); i++) { - res.getCharacteristic().add(parseGroupGroupCharacteristicComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("member")) { - JsonArray array = json.getAsJsonArray("member"); - for (int i = 0; i < array.size(); i++) { - res.getMember().add(parseGroupGroupMemberComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Group.GroupCharacteristicComponent parseGroupGroupCharacteristicComponent(JsonObject json, Group owner) throws IOException, FHIRFormatError { - Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent(); - parseGroupGroupCharacteristicComponentProperties(json, owner, res); - return res; - } - - protected void parseGroupGroupCharacteristicComponentProperties(JsonObject json, Group owner, Group.GroupCharacteristicComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("exclude")) - res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean())); - if (json.has("_exclude")) - parseElementProperties(json.getAsJsonObject("_exclude"), res.getExcludeElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected Group.GroupMemberComponent parseGroupGroupMemberComponent(JsonObject json, Group owner) throws IOException, FHIRFormatError { - Group.GroupMemberComponent res = new Group.GroupMemberComponent(); - parseGroupGroupMemberComponentProperties(json, owner, res); - return res; - } - - protected void parseGroupGroupMemberComponentProperties(JsonObject json, Group owner, Group.GroupMemberComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("entity")) - res.setEntity(parseReference(json.getAsJsonObject("entity"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("inactive")) - res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean())); - if (json.has("_inactive")) - parseElementProperties(json.getAsJsonObject("_inactive"), res.getInactiveElement()); - } - - protected GuidanceResponse parseGuidanceResponse(JsonObject json) throws IOException, FHIRFormatError { - GuidanceResponse res = new GuidanceResponse(); - parseGuidanceResponseProperties(json, res); - return res; - } - - protected void parseGuidanceResponseProperties(JsonObject json, GuidanceResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("requestId")) - res.setRequestIdElement(parseId(json.get("requestId").getAsString())); - if (json.has("_requestId")) - parseElementProperties(json.getAsJsonObject("_requestId"), res.getRequestIdElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("module")) - res.setModule(parseReference(json.getAsJsonObject("module"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), GuidanceResponse.GuidanceResponseStatus.NULL, new GuidanceResponse.GuidanceResponseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("occurrenceDateTime")) - res.setOccurrenceDateTimeElement(parseDateTime(json.get("occurrenceDateTime").getAsString())); - if (json.has("_occurrenceDateTime")) - parseElementProperties(json.getAsJsonObject("_occurrenceDateTime"), res.getOccurrenceDateTimeElement()); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - Type reason = parseType("reason", json); - if (reason != null) - res.setReason(reason); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("evaluationMessage")) { - JsonArray array = json.getAsJsonArray("evaluationMessage"); - for (int i = 0; i < array.size(); i++) { - res.getEvaluationMessage().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("outputParameters")) - res.setOutputParameters(parseReference(json.getAsJsonObject("outputParameters"))); - if (json.has("result")) - res.setResult(parseReference(json.getAsJsonObject("result"))); - if (json.has("dataRequirement")) { - JsonArray array = json.getAsJsonArray("dataRequirement"); - for (int i = 0; i < array.size(); i++) { - res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject())); - } - }; - } - - protected HealthcareService parseHealthcareService(JsonObject json) throws IOException, FHIRFormatError { - HealthcareService res = new HealthcareService(); - parseHealthcareServiceProperties(json, res); - return res; - } - - protected void parseHealthcareServiceProperties(JsonObject json, HealthcareService res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("providedBy")) - res.setProvidedBy(parseReference(json.getAsJsonObject("providedBy"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialty")) { - JsonArray array = json.getAsJsonArray("specialty"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("location")) { - JsonArray array = json.getAsJsonArray("location"); - for (int i = 0; i < array.size(); i++) { - res.getLocation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("extraDetails")) - res.setExtraDetailsElement(parseString(json.get("extraDetails").getAsString())); - if (json.has("_extraDetails")) - parseElementProperties(json.getAsJsonObject("_extraDetails"), res.getExtraDetailsElement()); - if (json.has("photo")) - res.setPhoto(parseAttachment(json.getAsJsonObject("photo"))); - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("coverageArea")) { - JsonArray array = json.getAsJsonArray("coverageArea"); - for (int i = 0; i < array.size(); i++) { - res.getCoverageArea().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("serviceProvisionCode")) { - JsonArray array = json.getAsJsonArray("serviceProvisionCode"); - for (int i = 0; i < array.size(); i++) { - res.getServiceProvisionCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("eligibility")) - res.setEligibility(parseCodeableConcept(json.getAsJsonObject("eligibility"))); - if (json.has("eligibilityNote")) - res.setEligibilityNoteElement(parseString(json.get("eligibilityNote").getAsString())); - if (json.has("_eligibilityNote")) - parseElementProperties(json.getAsJsonObject("_eligibilityNote"), res.getEligibilityNoteElement()); - if (json.has("programName")) { - JsonArray array = json.getAsJsonArray("programName"); - for (int i = 0; i < array.size(); i++) { - res.getProgramName().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_programName")) { - JsonArray array = json.getAsJsonArray("_programName"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getProgramName().size()) - res.getProgramName().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getProgramName().get(i)); - } - }; - if (json.has("characteristic")) { - JsonArray array = json.getAsJsonArray("characteristic"); - for (int i = 0; i < array.size(); i++) { - res.getCharacteristic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("referralMethod")) { - JsonArray array = json.getAsJsonArray("referralMethod"); - for (int i = 0; i < array.size(); i++) { - res.getReferralMethod().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("appointmentRequired")) - res.setAppointmentRequiredElement(parseBoolean(json.get("appointmentRequired").getAsBoolean())); - if (json.has("_appointmentRequired")) - parseElementProperties(json.getAsJsonObject("_appointmentRequired"), res.getAppointmentRequiredElement()); - if (json.has("availableTime")) { - JsonArray array = json.getAsJsonArray("availableTime"); - for (int i = 0; i < array.size(); i++) { - res.getAvailableTime().add(parseHealthcareServiceHealthcareServiceAvailableTimeComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("notAvailable")) { - JsonArray array = json.getAsJsonArray("notAvailable"); - for (int i = 0; i < array.size(); i++) { - res.getNotAvailable().add(parseHealthcareServiceHealthcareServiceNotAvailableComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("availabilityExceptions")) - res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString())); - if (json.has("_availabilityExceptions")) - parseElementProperties(json.getAsJsonObject("_availabilityExceptions"), res.getAvailabilityExceptionsElement()); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected HealthcareService.HealthcareServiceAvailableTimeComponent parseHealthcareServiceHealthcareServiceAvailableTimeComponent(JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError { - HealthcareService.HealthcareServiceAvailableTimeComponent res = new HealthcareService.HealthcareServiceAvailableTimeComponent(); - parseHealthcareServiceHealthcareServiceAvailableTimeComponentProperties(json, owner, res); - return res; - } - - protected void parseHealthcareServiceHealthcareServiceAvailableTimeComponentProperties(JsonObject json, HealthcareService owner, HealthcareService.HealthcareServiceAvailableTimeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("daysOfWeek")) { - JsonArray array = json.getAsJsonArray("daysOfWeek"); - for (int i = 0; i < array.size(); i++) { - res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); - } - }; - if (json.has("_daysOfWeek")) { - JsonArray array = json.getAsJsonArray("_daysOfWeek"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDaysOfWeek().size()) - res.getDaysOfWeek().add(parseEnumeration(null, HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDaysOfWeek().get(i)); - } - }; - if (json.has("allDay")) - res.setAllDayElement(parseBoolean(json.get("allDay").getAsBoolean())); - if (json.has("_allDay")) - parseElementProperties(json.getAsJsonObject("_allDay"), res.getAllDayElement()); - if (json.has("availableStartTime")) - res.setAvailableStartTimeElement(parseTime(json.get("availableStartTime").getAsString())); - if (json.has("_availableStartTime")) - parseElementProperties(json.getAsJsonObject("_availableStartTime"), res.getAvailableStartTimeElement()); - if (json.has("availableEndTime")) - res.setAvailableEndTimeElement(parseTime(json.get("availableEndTime").getAsString())); - if (json.has("_availableEndTime")) - parseElementProperties(json.getAsJsonObject("_availableEndTime"), res.getAvailableEndTimeElement()); - } - - protected HealthcareService.HealthcareServiceNotAvailableComponent parseHealthcareServiceHealthcareServiceNotAvailableComponent(JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError { - HealthcareService.HealthcareServiceNotAvailableComponent res = new HealthcareService.HealthcareServiceNotAvailableComponent(); - parseHealthcareServiceHealthcareServiceNotAvailableComponentProperties(json, owner, res); - return res; - } - - protected void parseHealthcareServiceHealthcareServiceNotAvailableComponentProperties(JsonObject json, HealthcareService owner, HealthcareService.HealthcareServiceNotAvailableComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("during")) - res.setDuring(parsePeriod(json.getAsJsonObject("during"))); - } - - protected ImagingManifest parseImagingManifest(JsonObject json) throws IOException, FHIRFormatError { - ImagingManifest res = new ImagingManifest(); - parseImagingManifestProperties(json, res); - return res; - } - - protected void parseImagingManifestProperties(JsonObject json, ImagingManifest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("authoringTime")) - res.setAuthoringTimeElement(parseDateTime(json.get("authoringTime").getAsString())); - if (json.has("_authoringTime")) - parseElementProperties(json.getAsJsonObject("_authoringTime"), res.getAuthoringTimeElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("study")) { - JsonArray array = json.getAsJsonArray("study"); - for (int i = 0; i < array.size(); i++) { - res.getStudy().add(parseImagingManifestStudyComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ImagingManifest.StudyComponent parseImagingManifestStudyComponent(JsonObject json, ImagingManifest owner) throws IOException, FHIRFormatError { - ImagingManifest.StudyComponent res = new ImagingManifest.StudyComponent(); - parseImagingManifestStudyComponentProperties(json, owner, res); - return res; - } - - protected void parseImagingManifestStudyComponentProperties(JsonObject json, ImagingManifest owner, ImagingManifest.StudyComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("uid")) - res.setUidElement(parseOid(json.get("uid").getAsString())); - if (json.has("_uid")) - parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); - if (json.has("imagingStudy")) - res.setImagingStudy(parseReference(json.getAsJsonObject("imagingStudy"))); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("series")) { - JsonArray array = json.getAsJsonArray("series"); - for (int i = 0; i < array.size(); i++) { - res.getSeries().add(parseImagingManifestSeriesComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ImagingManifest.SeriesComponent parseImagingManifestSeriesComponent(JsonObject json, ImagingManifest owner) throws IOException, FHIRFormatError { - ImagingManifest.SeriesComponent res = new ImagingManifest.SeriesComponent(); - parseImagingManifestSeriesComponentProperties(json, owner, res); - return res; - } - - protected void parseImagingManifestSeriesComponentProperties(JsonObject json, ImagingManifest owner, ImagingManifest.SeriesComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("uid")) - res.setUidElement(parseOid(json.get("uid").getAsString())); - if (json.has("_uid")) - parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("instance")) { - JsonArray array = json.getAsJsonArray("instance"); - for (int i = 0; i < array.size(); i++) { - res.getInstance().add(parseImagingManifestInstanceComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ImagingManifest.InstanceComponent parseImagingManifestInstanceComponent(JsonObject json, ImagingManifest owner) throws IOException, FHIRFormatError { - ImagingManifest.InstanceComponent res = new ImagingManifest.InstanceComponent(); - parseImagingManifestInstanceComponentProperties(json, owner, res); - return res; - } - - protected void parseImagingManifestInstanceComponentProperties(JsonObject json, ImagingManifest owner, ImagingManifest.InstanceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sopClass")) - res.setSopClassElement(parseOid(json.get("sopClass").getAsString())); - if (json.has("_sopClass")) - parseElementProperties(json.getAsJsonObject("_sopClass"), res.getSopClassElement()); - if (json.has("uid")) - res.setUidElement(parseOid(json.get("uid").getAsString())); - if (json.has("_uid")) - parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); - if (json.has("frameNumber")) { - JsonArray array = json.getAsJsonArray("frameNumber"); - for (int i = 0; i < array.size(); i++) { - res.getFrameNumber().add(parseUnsignedInt(array.get(i).getAsString())); - } - }; - if (json.has("_frameNumber")) { - JsonArray array = json.getAsJsonArray("_frameNumber"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getFrameNumber().size()) - res.getFrameNumber().add(parseUnsignedInt(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getFrameNumber().get(i)); - } - }; - } - - protected ImagingStudy parseImagingStudy(JsonObject json) throws IOException, FHIRFormatError { - ImagingStudy res = new ImagingStudy(); - parseImagingStudyProperties(json, res); - return res; - } - - protected void parseImagingStudyProperties(JsonObject json, ImagingStudy res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("uid")) - res.setUidElement(parseOid(json.get("uid").getAsString())); - if (json.has("_uid")) - parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); - if (json.has("accession")) - res.setAccession(parseIdentifier(json.getAsJsonObject("accession"))); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("availability")) - res.setAvailabilityElement(parseEnumeration(json.get("availability").getAsString(), ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); - if (json.has("_availability")) - parseElementProperties(json.getAsJsonObject("_availability"), res.getAvailabilityElement()); - if (json.has("modalityList")) { - JsonArray array = json.getAsJsonArray("modalityList"); - for (int i = 0; i < array.size(); i++) { - res.getModalityList().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("started")) - res.setStartedElement(parseDateTime(json.get("started").getAsString())); - if (json.has("_started")) - parseElementProperties(json.getAsJsonObject("_started"), res.getStartedElement()); - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("referrer")) - res.setReferrer(parseReference(json.getAsJsonObject("referrer"))); - if (json.has("interpreter")) { - JsonArray array = json.getAsJsonArray("interpreter"); - for (int i = 0; i < array.size(); i++) { - res.getInterpreter().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("numberOfSeries")) - res.setNumberOfSeriesElement(parseUnsignedInt(json.get("numberOfSeries").getAsString())); - if (json.has("_numberOfSeries")) - parseElementProperties(json.getAsJsonObject("_numberOfSeries"), res.getNumberOfSeriesElement()); - if (json.has("numberOfInstances")) - res.setNumberOfInstancesElement(parseUnsignedInt(json.get("numberOfInstances").getAsString())); - if (json.has("_numberOfInstances")) - parseElementProperties(json.getAsJsonObject("_numberOfInstances"), res.getNumberOfInstancesElement()); - if (json.has("procedureReference")) { - JsonArray array = json.getAsJsonArray("procedureReference"); - for (int i = 0; i < array.size(); i++) { - res.getProcedureReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("procedureCode")) { - JsonArray array = json.getAsJsonArray("procedureCode"); - for (int i = 0; i < array.size(); i++) { - res.getProcedureCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("series")) { - JsonArray array = json.getAsJsonArray("series"); - for (int i = 0; i < array.size(); i++) { - res.getSeries().add(parseImagingStudyImagingStudySeriesComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudyImagingStudySeriesComponent(JsonObject json, ImagingStudy owner) throws IOException, FHIRFormatError { - ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent(); - parseImagingStudyImagingStudySeriesComponentProperties(json, owner, res); - return res; - } - - protected void parseImagingStudyImagingStudySeriesComponentProperties(JsonObject json, ImagingStudy owner, ImagingStudy.ImagingStudySeriesComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("uid")) - res.setUidElement(parseOid(json.get("uid").getAsString())); - if (json.has("_uid")) - parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); - if (json.has("number")) - res.setNumberElement(parseUnsignedInt(json.get("number").getAsString())); - if (json.has("_number")) - parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); - if (json.has("modality")) - res.setModality(parseCoding(json.getAsJsonObject("modality"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("numberOfInstances")) - res.setNumberOfInstancesElement(parseUnsignedInt(json.get("numberOfInstances").getAsString())); - if (json.has("_numberOfInstances")) - parseElementProperties(json.getAsJsonObject("_numberOfInstances"), res.getNumberOfInstancesElement()); - if (json.has("availability")) - res.setAvailabilityElement(parseEnumeration(json.get("availability").getAsString(), ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); - if (json.has("_availability")) - parseElementProperties(json.getAsJsonObject("_availability"), res.getAvailabilityElement()); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) - res.setBodySite(parseCoding(json.getAsJsonObject("bodySite"))); - if (json.has("laterality")) - res.setLaterality(parseCoding(json.getAsJsonObject("laterality"))); - if (json.has("started")) - res.setStartedElement(parseDateTime(json.get("started").getAsString())); - if (json.has("_started")) - parseElementProperties(json.getAsJsonObject("_started"), res.getStartedElement()); - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("instance")) { - JsonArray array = json.getAsJsonArray("instance"); - for (int i = 0; i < array.size(); i++) { - res.getInstance().add(parseImagingStudyImagingStudySeriesInstanceComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ImagingStudy.ImagingStudySeriesInstanceComponent parseImagingStudyImagingStudySeriesInstanceComponent(JsonObject json, ImagingStudy owner) throws IOException, FHIRFormatError { - ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent(); - parseImagingStudyImagingStudySeriesInstanceComponentProperties(json, owner, res); - return res; - } - - protected void parseImagingStudyImagingStudySeriesInstanceComponentProperties(JsonObject json, ImagingStudy owner, ImagingStudy.ImagingStudySeriesInstanceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("uid")) - res.setUidElement(parseOid(json.get("uid").getAsString())); - if (json.has("_uid")) - parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); - if (json.has("number")) - res.setNumberElement(parseUnsignedInt(json.get("number").getAsString())); - if (json.has("_number")) - parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); - if (json.has("sopClass")) - res.setSopClassElement(parseOid(json.get("sopClass").getAsString())); - if (json.has("_sopClass")) - parseElementProperties(json.getAsJsonObject("_sopClass"), res.getSopClassElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - } - - protected Immunization parseImmunization(JsonObject json) throws IOException, FHIRFormatError { - Immunization res = new Immunization(); - parseImmunizationProperties(json, res); - return res; - } - - protected void parseImmunizationProperties(JsonObject json, Immunization res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Immunization.ImmunizationStatus.NULL, new Immunization.ImmunizationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("notGiven")) - res.setNotGivenElement(parseBoolean(json.get("notGiven").getAsBoolean())); - if (json.has("_notGiven")) - parseElementProperties(json.getAsJsonObject("_notGiven"), res.getNotGivenElement()); - if (json.has("vaccineCode")) - res.setVaccineCode(parseCodeableConcept(json.getAsJsonObject("vaccineCode"))); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("primarySource")) - res.setPrimarySourceElement(parseBoolean(json.get("primarySource").getAsBoolean())); - if (json.has("_primarySource")) - parseElementProperties(json.getAsJsonObject("_primarySource"), res.getPrimarySourceElement()); - if (json.has("reportOrigin")) - res.setReportOrigin(parseCodeableConcept(json.getAsJsonObject("reportOrigin"))); - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("manufacturer")) - res.setManufacturer(parseReference(json.getAsJsonObject("manufacturer"))); - if (json.has("lotNumber")) - res.setLotNumberElement(parseString(json.get("lotNumber").getAsString())); - if (json.has("_lotNumber")) - parseElementProperties(json.getAsJsonObject("_lotNumber"), res.getLotNumberElement()); - if (json.has("expirationDate")) - res.setExpirationDateElement(parseDate(json.get("expirationDate").getAsString())); - if (json.has("_expirationDate")) - parseElementProperties(json.getAsJsonObject("_expirationDate"), res.getExpirationDateElement()); - if (json.has("site")) - res.setSite(parseCodeableConcept(json.getAsJsonObject("site"))); - if (json.has("route")) - res.setRoute(parseCodeableConcept(json.getAsJsonObject("route"))); - if (json.has("doseQuantity")) - res.setDoseQuantity(parseSimpleQuantity(json.getAsJsonObject("doseQuantity"))); - if (json.has("practitioner")) { - JsonArray array = json.getAsJsonArray("practitioner"); - for (int i = 0; i < array.size(); i++) { - res.getPractitioner().add(parseImmunizationImmunizationPractitionerComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("explanation")) - res.setExplanation(parseImmunizationImmunizationExplanationComponent(json.getAsJsonObject("explanation"), res)); - if (json.has("reaction")) { - JsonArray array = json.getAsJsonArray("reaction"); - for (int i = 0; i < array.size(); i++) { - res.getReaction().add(parseImmunizationImmunizationReactionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("vaccinationProtocol")) { - JsonArray array = json.getAsJsonArray("vaccinationProtocol"); - for (int i = 0; i < array.size(); i++) { - res.getVaccinationProtocol().add(parseImmunizationImmunizationVaccinationProtocolComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Immunization.ImmunizationPractitionerComponent parseImmunizationImmunizationPractitionerComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { - Immunization.ImmunizationPractitionerComponent res = new Immunization.ImmunizationPractitionerComponent(); - parseImmunizationImmunizationPractitionerComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationImmunizationPractitionerComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationPractitionerComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - } - - protected Immunization.ImmunizationExplanationComponent parseImmunizationImmunizationExplanationComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { - Immunization.ImmunizationExplanationComponent res = new Immunization.ImmunizationExplanationComponent(); - parseImmunizationImmunizationExplanationComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationImmunizationExplanationComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationExplanationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonNotGiven")) { - JsonArray array = json.getAsJsonArray("reasonNotGiven"); - for (int i = 0; i < array.size(); i++) { - res.getReasonNotGiven().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected Immunization.ImmunizationReactionComponent parseImmunizationImmunizationReactionComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { - Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent(); - parseImmunizationImmunizationReactionComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationImmunizationReactionComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationReactionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("detail")) - res.setDetail(parseReference(json.getAsJsonObject("detail"))); - if (json.has("reported")) - res.setReportedElement(parseBoolean(json.get("reported").getAsBoolean())); - if (json.has("_reported")) - parseElementProperties(json.getAsJsonObject("_reported"), res.getReportedElement()); - } - - protected Immunization.ImmunizationVaccinationProtocolComponent parseImmunizationImmunizationVaccinationProtocolComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { - Immunization.ImmunizationVaccinationProtocolComponent res = new Immunization.ImmunizationVaccinationProtocolComponent(); - parseImmunizationImmunizationVaccinationProtocolComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationImmunizationVaccinationProtocolComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationVaccinationProtocolComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("doseSequence")) - res.setDoseSequenceElement(parsePositiveInt(json.get("doseSequence").getAsString())); - if (json.has("_doseSequence")) - parseElementProperties(json.getAsJsonObject("_doseSequence"), res.getDoseSequenceElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("authority")) - res.setAuthority(parseReference(json.getAsJsonObject("authority"))); - if (json.has("series")) - res.setSeriesElement(parseString(json.get("series").getAsString())); - if (json.has("_series")) - parseElementProperties(json.getAsJsonObject("_series"), res.getSeriesElement()); - if (json.has("seriesDoses")) - res.setSeriesDosesElement(parsePositiveInt(json.get("seriesDoses").getAsString())); - if (json.has("_seriesDoses")) - parseElementProperties(json.getAsJsonObject("_seriesDoses"), res.getSeriesDosesElement()); - if (json.has("targetDisease")) { - JsonArray array = json.getAsJsonArray("targetDisease"); - for (int i = 0; i < array.size(); i++) { - res.getTargetDisease().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("doseStatus")) - res.setDoseStatus(parseCodeableConcept(json.getAsJsonObject("doseStatus"))); - if (json.has("doseStatusReason")) - res.setDoseStatusReason(parseCodeableConcept(json.getAsJsonObject("doseStatusReason"))); - } - - protected ImmunizationRecommendation parseImmunizationRecommendation(JsonObject json) throws IOException, FHIRFormatError { - ImmunizationRecommendation res = new ImmunizationRecommendation(); - parseImmunizationRecommendationProperties(json, res); - return res; - } - - protected void parseImmunizationRecommendationProperties(JsonObject json, ImmunizationRecommendation res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("recommendation")) { - JsonArray array = json.getAsJsonArray("recommendation"); - for (int i = 0; i < array.size(); i++) { - res.getRecommendation().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError { - ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); - parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("vaccineCode")) - res.setVaccineCode(parseCodeableConcept(json.getAsJsonObject("vaccineCode"))); - if (json.has("targetDisease")) - res.setTargetDisease(parseCodeableConcept(json.getAsJsonObject("targetDisease"))); - if (json.has("doseNumber")) - res.setDoseNumberElement(parsePositiveInt(json.get("doseNumber").getAsString())); - if (json.has("_doseNumber")) - parseElementProperties(json.getAsJsonObject("_doseNumber"), res.getDoseNumberElement()); - if (json.has("forecastStatus")) - res.setForecastStatus(parseCodeableConcept(json.getAsJsonObject("forecastStatus"))); - if (json.has("dateCriterion")) { - JsonArray array = json.getAsJsonArray("dateCriterion"); - for (int i = 0; i < array.size(); i++) { - res.getDateCriterion().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("protocol")) - res.setProtocol(parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(json.getAsJsonObject("protocol"), owner)); - if (json.has("supportingImmunization")) { - JsonArray array = json.getAsJsonArray("supportingImmunization"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingImmunization().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("supportingPatientInformation")) { - JsonArray array = json.getAsJsonArray("supportingPatientInformation"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingPatientInformation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError { - ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent(); - parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("value")) - res.setValueElement(parseDateTime(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError { - ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent(); - parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentProperties(json, owner, res); - return res; - } - - protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("doseSequence")) - res.setDoseSequenceElement(parsePositiveInt(json.get("doseSequence").getAsString())); - if (json.has("_doseSequence")) - parseElementProperties(json.getAsJsonObject("_doseSequence"), res.getDoseSequenceElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("authority")) - res.setAuthority(parseReference(json.getAsJsonObject("authority"))); - if (json.has("series")) - res.setSeriesElement(parseString(json.get("series").getAsString())); - if (json.has("_series")) - parseElementProperties(json.getAsJsonObject("_series"), res.getSeriesElement()); - } - - protected ImplementationGuide parseImplementationGuide(JsonObject json) throws IOException, FHIRFormatError { - ImplementationGuide res = new ImplementationGuide(); - parseImplementationGuideProperties(json, res); - return res; - } - - protected void parseImplementationGuideProperties(JsonObject json, ImplementationGuide res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("fhirVersion")) - res.setFhirVersionElement(parseId(json.get("fhirVersion").getAsString())); - if (json.has("_fhirVersion")) - parseElementProperties(json.getAsJsonObject("_fhirVersion"), res.getFhirVersionElement()); - if (json.has("dependency")) { - JsonArray array = json.getAsJsonArray("dependency"); - for (int i = 0; i < array.size(); i++) { - res.getDependency().add(parseImplementationGuideImplementationGuideDependencyComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("package")) { - JsonArray array = json.getAsJsonArray("package"); - for (int i = 0; i < array.size(); i++) { - res.getPackage().add(parseImplementationGuideImplementationGuidePackageComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("global")) { - JsonArray array = json.getAsJsonArray("global"); - for (int i = 0; i < array.size(); i++) { - res.getGlobal().add(parseImplementationGuideImplementationGuideGlobalComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("binary")) { - JsonArray array = json.getAsJsonArray("binary"); - for (int i = 0; i < array.size(); i++) { - res.getBinary().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_binary")) { - JsonArray array = json.getAsJsonArray("_binary"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getBinary().size()) - res.getBinary().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getBinary().get(i)); - } - }; - if (json.has("page")) - res.setPage(parseImplementationGuideImplementationGuidePageComponent(json.getAsJsonObject("page"), res)); - } - - protected ImplementationGuide.ImplementationGuideDependencyComponent parseImplementationGuideImplementationGuideDependencyComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuideDependencyComponent res = new ImplementationGuide.ImplementationGuideDependencyComponent(); - parseImplementationGuideImplementationGuideDependencyComponentProperties(json, owner, res); - return res; - } - - protected void parseImplementationGuideImplementationGuideDependencyComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDependencyComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ImplementationGuide.GuideDependencyType.NULL, new ImplementationGuide.GuideDependencyTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("uri")) - res.setUriElement(parseUri(json.get("uri").getAsString())); - if (json.has("_uri")) - parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); - } - - protected ImplementationGuide.ImplementationGuidePackageComponent parseImplementationGuideImplementationGuidePackageComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuidePackageComponent res = new ImplementationGuide.ImplementationGuidePackageComponent(); - parseImplementationGuideImplementationGuidePackageComponentProperties(json, owner, res); - return res; - } - - protected void parseImplementationGuideImplementationGuidePackageComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("resource")) { - JsonArray array = json.getAsJsonArray("resource"); - for (int i = 0; i < array.size(); i++) { - res.getResource().add(parseImplementationGuideImplementationGuidePackageResourceComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ImplementationGuide.ImplementationGuidePackageResourceComponent parseImplementationGuideImplementationGuidePackageResourceComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuidePackageResourceComponent res = new ImplementationGuide.ImplementationGuidePackageResourceComponent(); - parseImplementationGuideImplementationGuidePackageResourceComponentProperties(json, owner, res); - return res; - } - - protected void parseImplementationGuideImplementationGuidePackageResourceComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageResourceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("example")) - res.setExampleElement(parseBoolean(json.get("example").getAsBoolean())); - if (json.has("_example")) - parseElementProperties(json.getAsJsonObject("_example"), res.getExampleElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("acronym")) - res.setAcronymElement(parseString(json.get("acronym").getAsString())); - if (json.has("_acronym")) - parseElementProperties(json.getAsJsonObject("_acronym"), res.getAcronymElement()); - Type source = parseType("source", json); - if (source != null) - res.setSource(source); - if (json.has("exampleFor")) - res.setExampleFor(parseReference(json.getAsJsonObject("exampleFor"))); - } - - protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideImplementationGuideGlobalComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent(); - parseImplementationGuideImplementationGuideGlobalComponentProperties(json, owner, res); - return res; - } - - protected void parseImplementationGuideImplementationGuideGlobalComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuideGlobalComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("profile")) - res.setProfile(parseReference(json.getAsJsonObject("profile"))); - } - - protected ImplementationGuide.ImplementationGuidePageComponent parseImplementationGuideImplementationGuidePageComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuidePageComponent res = new ImplementationGuide.ImplementationGuidePageComponent(); - parseImplementationGuideImplementationGuidePageComponentProperties(json, owner, res); - return res; - } - - protected void parseImplementationGuideImplementationGuidePageComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("source")) - res.setSourceElement(parseUri(json.get("source").getAsString())); - if (json.has("_source")) - parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), ImplementationGuide.GuidePageKind.NULL, new ImplementationGuide.GuidePageKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_type")) { - JsonArray array = json.getAsJsonArray("_type"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getType().size()) - res.getType().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getType().get(i)); - } - }; - if (json.has("package")) { - JsonArray array = json.getAsJsonArray("package"); - for (int i = 0; i < array.size(); i++) { - res.getPackage().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_package")) { - JsonArray array = json.getAsJsonArray("_package"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPackage().size()) - res.getPackage().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPackage().get(i)); - } - }; - if (json.has("format")) - res.setFormatElement(parseCode(json.get("format").getAsString())); - if (json.has("_format")) - parseElementProperties(json.getAsJsonObject("_format"), res.getFormatElement()); - if (json.has("page")) { - JsonArray array = json.getAsJsonArray("page"); - for (int i = 0; i < array.size(); i++) { - res.getPage().add(parseImplementationGuideImplementationGuidePageComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Library parseLibrary(JsonObject json) throws IOException, FHIRFormatError { - Library res = new Library(); - parseLibraryProperties(json, res); - return res; - } - - protected void parseLibraryProperties(JsonObject json, Library res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contributor")) { - JsonArray array = json.getAsJsonArray("contributor"); - for (int i = 0; i < array.size(); i++) { - res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("parameter")) { - JsonArray array = json.getAsJsonArray("parameter"); - for (int i = 0; i < array.size(); i++) { - res.getParameter().add(parseParameterDefinition(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dataRequirement")) { - JsonArray array = json.getAsJsonArray("dataRequirement"); - for (int i = 0; i < array.size(); i++) { - res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject())); - } - }; - if (json.has("content")) { - JsonArray array = json.getAsJsonArray("content"); - for (int i = 0; i < array.size(); i++) { - res.getContent().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - } - - protected Linkage parseLinkage(JsonObject json) throws IOException, FHIRFormatError { - Linkage res = new Linkage(); - parseLinkageProperties(json, res); - return res; - } - - protected void parseLinkageProperties(JsonObject json, Linkage res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseLinkageLinkageItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Linkage.LinkageItemComponent parseLinkageLinkageItemComponent(JsonObject json, Linkage owner) throws IOException, FHIRFormatError { - Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent(); - parseLinkageLinkageItemComponentProperties(json, owner, res); - return res; - } - - protected void parseLinkageLinkageItemComponentProperties(JsonObject json, Linkage owner, Linkage.LinkageItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Linkage.LinkageType.NULL, new Linkage.LinkageTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("resource")) - res.setResource(parseReference(json.getAsJsonObject("resource"))); - } - - protected ListResource parseListResource(JsonObject json) throws IOException, FHIRFormatError { - ListResource res = new ListResource(); - parseListResourceProperties(json, res); - return res; - } - - protected void parseListResourceProperties(JsonObject json, ListResource res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ListResource.ListStatus.NULL, new ListResource.ListStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ListResource.ListMode.NULL, new ListResource.ListModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("source")) - res.setSource(parseReference(json.getAsJsonObject("source"))); - if (json.has("orderedBy")) - res.setOrderedBy(parseCodeableConcept(json.getAsJsonObject("orderedBy"))); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("entry")) { - JsonArray array = json.getAsJsonArray("entry"); - for (int i = 0; i < array.size(); i++) { - res.getEntry().add(parseListResourceListEntryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("emptyReason")) - res.setEmptyReason(parseCodeableConcept(json.getAsJsonObject("emptyReason"))); - } - - protected ListResource.ListEntryComponent parseListResourceListEntryComponent(JsonObject json, ListResource owner) throws IOException, FHIRFormatError { - ListResource.ListEntryComponent res = new ListResource.ListEntryComponent(); - parseListResourceListEntryComponentProperties(json, owner, res); - return res; - } - - protected void parseListResourceListEntryComponentProperties(JsonObject json, ListResource owner, ListResource.ListEntryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("flag")) - res.setFlag(parseCodeableConcept(json.getAsJsonObject("flag"))); - if (json.has("deleted")) - res.setDeletedElement(parseBoolean(json.get("deleted").getAsBoolean())); - if (json.has("_deleted")) - parseElementProperties(json.getAsJsonObject("_deleted"), res.getDeletedElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("item")) - res.setItem(parseReference(json.getAsJsonObject("item"))); - } - - protected Location parseLocation(JsonObject json) throws IOException, FHIRFormatError { - Location res = new Location(); - parseLocationProperties(json, res); - return res; - } - - protected void parseLocationProperties(JsonObject json, Location res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Location.LocationStatus.NULL, new Location.LocationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("operationalStatus")) - res.setOperationalStatus(parseCoding(json.getAsJsonObject("operationalStatus"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("alias")) { - JsonArray array = json.getAsJsonArray("alias"); - for (int i = 0; i < array.size(); i++) { - res.getAlias().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_alias")) { - JsonArray array = json.getAsJsonArray("_alias"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getAlias().size()) - res.getAlias().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getAlias().get(i)); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Location.LocationMode.NULL, new Location.LocationModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("address")) - res.setAddress(parseAddress(json.getAsJsonObject("address"))); - if (json.has("physicalType")) - res.setPhysicalType(parseCodeableConcept(json.getAsJsonObject("physicalType"))); - if (json.has("position")) - res.setPosition(parseLocationLocationPositionComponent(json.getAsJsonObject("position"), res)); - if (json.has("managingOrganization")) - res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); - if (json.has("partOf")) - res.setPartOf(parseReference(json.getAsJsonObject("partOf"))); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Location.LocationPositionComponent parseLocationLocationPositionComponent(JsonObject json, Location owner) throws IOException, FHIRFormatError { - Location.LocationPositionComponent res = new Location.LocationPositionComponent(); - parseLocationLocationPositionComponentProperties(json, owner, res); - return res; - } - - protected void parseLocationLocationPositionComponentProperties(JsonObject json, Location owner, Location.LocationPositionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("longitude")) - res.setLongitudeElement(parseDecimal(json.get("longitude").getAsBigDecimal())); - if (json.has("_longitude")) - parseElementProperties(json.getAsJsonObject("_longitude"), res.getLongitudeElement()); - if (json.has("latitude")) - res.setLatitudeElement(parseDecimal(json.get("latitude").getAsBigDecimal())); - if (json.has("_latitude")) - parseElementProperties(json.getAsJsonObject("_latitude"), res.getLatitudeElement()); - if (json.has("altitude")) - res.setAltitudeElement(parseDecimal(json.get("altitude").getAsBigDecimal())); - if (json.has("_altitude")) - parseElementProperties(json.getAsJsonObject("_altitude"), res.getAltitudeElement()); - } - - protected Measure parseMeasure(JsonObject json) throws IOException, FHIRFormatError { - Measure res = new Measure(); - parseMeasureProperties(json, res); - return res; - } - - protected void parseMeasureProperties(JsonObject json, Measure res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contributor")) { - JsonArray array = json.getAsJsonArray("contributor"); - for (int i = 0; i < array.size(); i++) { - res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("library")) { - JsonArray array = json.getAsJsonArray("library"); - for (int i = 0; i < array.size(); i++) { - res.getLibrary().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("disclaimer")) - res.setDisclaimerElement(parseMarkdown(json.get("disclaimer").getAsString())); - if (json.has("_disclaimer")) - parseElementProperties(json.getAsJsonObject("_disclaimer"), res.getDisclaimerElement()); - if (json.has("scoring")) - res.setScoring(parseCodeableConcept(json.getAsJsonObject("scoring"))); - if (json.has("compositeScoring")) - res.setCompositeScoring(parseCodeableConcept(json.getAsJsonObject("compositeScoring"))); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("riskAdjustment")) - res.setRiskAdjustmentElement(parseString(json.get("riskAdjustment").getAsString())); - if (json.has("_riskAdjustment")) - parseElementProperties(json.getAsJsonObject("_riskAdjustment"), res.getRiskAdjustmentElement()); - if (json.has("rateAggregation")) - res.setRateAggregationElement(parseString(json.get("rateAggregation").getAsString())); - if (json.has("_rateAggregation")) - parseElementProperties(json.getAsJsonObject("_rateAggregation"), res.getRateAggregationElement()); - if (json.has("rationale")) - res.setRationaleElement(parseMarkdown(json.get("rationale").getAsString())); - if (json.has("_rationale")) - parseElementProperties(json.getAsJsonObject("_rationale"), res.getRationaleElement()); - if (json.has("clinicalRecommendationStatement")) - res.setClinicalRecommendationStatementElement(parseMarkdown(json.get("clinicalRecommendationStatement").getAsString())); - if (json.has("_clinicalRecommendationStatement")) - parseElementProperties(json.getAsJsonObject("_clinicalRecommendationStatement"), res.getClinicalRecommendationStatementElement()); - if (json.has("improvementNotation")) - res.setImprovementNotationElement(parseString(json.get("improvementNotation").getAsString())); - if (json.has("_improvementNotation")) - parseElementProperties(json.getAsJsonObject("_improvementNotation"), res.getImprovementNotationElement()); - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseMarkdown(array.get(i).getAsString())); - } - }; - if (json.has("_definition")) { - JsonArray array = json.getAsJsonArray("_definition"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDefinition().size()) - res.getDefinition().add(parseMarkdown(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDefinition().get(i)); - } - }; - if (json.has("guidance")) - res.setGuidanceElement(parseMarkdown(json.get("guidance").getAsString())); - if (json.has("_guidance")) - parseElementProperties(json.getAsJsonObject("_guidance"), res.getGuidanceElement()); - if (json.has("set")) - res.setSetElement(parseString(json.get("set").getAsString())); - if (json.has("_set")) - parseElementProperties(json.getAsJsonObject("_set"), res.getSetElement()); - if (json.has("group")) { - JsonArray array = json.getAsJsonArray("group"); - for (int i = 0; i < array.size(); i++) { - res.getGroup().add(parseMeasureMeasureGroupComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("supplementalData")) { - JsonArray array = json.getAsJsonArray("supplementalData"); - for (int i = 0; i < array.size(); i++) { - res.getSupplementalData().add(parseMeasureMeasureSupplementalDataComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Measure.MeasureGroupComponent parseMeasureMeasureGroupComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { - Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent(); - parseMeasureMeasureGroupComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureMeasureGroupComponentProperties(JsonObject json, Measure owner, Measure.MeasureGroupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("population")) { - JsonArray array = json.getAsJsonArray("population"); - for (int i = 0; i < array.size(); i++) { - res.getPopulation().add(parseMeasureMeasureGroupPopulationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("stratifier")) { - JsonArray array = json.getAsJsonArray("stratifier"); - for (int i = 0; i < array.size(); i++) { - res.getStratifier().add(parseMeasureMeasureGroupStratifierComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Measure.MeasureGroupPopulationComponent parseMeasureMeasureGroupPopulationComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { - Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent(); - parseMeasureMeasureGroupPopulationComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureMeasureGroupPopulationComponentProperties(JsonObject json, Measure owner, Measure.MeasureGroupPopulationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("criteria")) - res.setCriteriaElement(parseString(json.get("criteria").getAsString())); - if (json.has("_criteria")) - parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); - } - - protected Measure.MeasureGroupStratifierComponent parseMeasureMeasureGroupStratifierComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { - Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent(); - parseMeasureMeasureGroupStratifierComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureMeasureGroupStratifierComponentProperties(JsonObject json, Measure owner, Measure.MeasureGroupStratifierComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("criteria")) - res.setCriteriaElement(parseString(json.get("criteria").getAsString())); - if (json.has("_criteria")) - parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - } - - protected Measure.MeasureSupplementalDataComponent parseMeasureMeasureSupplementalDataComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { - Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent(); - parseMeasureMeasureSupplementalDataComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureMeasureSupplementalDataComponentProperties(JsonObject json, Measure owner, Measure.MeasureSupplementalDataComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("usage")) { - JsonArray array = json.getAsJsonArray("usage"); - for (int i = 0; i < array.size(); i++) { - res.getUsage().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("criteria")) - res.setCriteriaElement(parseString(json.get("criteria").getAsString())); - if (json.has("_criteria")) - parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - } - - protected MeasureReport parseMeasureReport(JsonObject json) throws IOException, FHIRFormatError { - MeasureReport res = new MeasureReport(); - parseMeasureReportProperties(json, res); - return res; - } - - protected void parseMeasureReportProperties(JsonObject json, MeasureReport res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MeasureReport.MeasureReportStatus.NULL, new MeasureReport.MeasureReportStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MeasureReport.MeasureReportType.NULL, new MeasureReport.MeasureReportTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("measure")) - res.setMeasure(parseReference(json.getAsJsonObject("measure"))); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("reportingOrganization")) - res.setReportingOrganization(parseReference(json.getAsJsonObject("reportingOrganization"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("group")) { - JsonArray array = json.getAsJsonArray("group"); - for (int i = 0; i < array.size(); i++) { - res.getGroup().add(parseMeasureReportMeasureReportGroupComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("evaluatedResources")) - res.setEvaluatedResources(parseReference(json.getAsJsonObject("evaluatedResources"))); - } - - protected MeasureReport.MeasureReportGroupComponent parseMeasureReportMeasureReportGroupComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { - MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent(); - parseMeasureReportMeasureReportGroupComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureReportMeasureReportGroupComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.MeasureReportGroupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("population")) { - JsonArray array = json.getAsJsonArray("population"); - for (int i = 0; i < array.size(); i++) { - res.getPopulation().add(parseMeasureReportMeasureReportGroupPopulationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("measureScore")) - res.setMeasureScoreElement(parseDecimal(json.get("measureScore").getAsBigDecimal())); - if (json.has("_measureScore")) - parseElementProperties(json.getAsJsonObject("_measureScore"), res.getMeasureScoreElement()); - if (json.has("stratifier")) { - JsonArray array = json.getAsJsonArray("stratifier"); - for (int i = 0; i < array.size(); i++) { - res.getStratifier().add(parseMeasureReportMeasureReportGroupStratifierComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportMeasureReportGroupPopulationComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { - MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent(); - parseMeasureReportMeasureReportGroupPopulationComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureReportMeasureReportGroupPopulationComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.MeasureReportGroupPopulationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("count")) - res.setCountElement(parseInteger(json.get("count").getAsLong())); - if (json.has("_count")) - parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); - if (json.has("patients")) - res.setPatients(parseReference(json.getAsJsonObject("patients"))); - } - - protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportMeasureReportGroupStratifierComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { - MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent(); - parseMeasureReportMeasureReportGroupStratifierComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureReportMeasureReportGroupStratifierComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.MeasureReportGroupStratifierComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("stratum")) { - JsonArray array = json.getAsJsonArray("stratum"); - for (int i = 0; i < array.size(); i++) { - res.getStratum().add(parseMeasureReportStratifierGroupComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { - MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent(); - parseMeasureReportStratifierGroupComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureReportStratifierGroupComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.StratifierGroupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("population")) { - JsonArray array = json.getAsJsonArray("population"); - for (int i = 0; i < array.size(); i++) { - res.getPopulation().add(parseMeasureReportStratifierGroupPopulationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("measureScore")) - res.setMeasureScoreElement(parseDecimal(json.get("measureScore").getAsBigDecimal())); - if (json.has("_measureScore")) - parseElementProperties(json.getAsJsonObject("_measureScore"), res.getMeasureScoreElement()); - } - - protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { - MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent(); - parseMeasureReportStratifierGroupPopulationComponentProperties(json, owner, res); - return res; - } - - protected void parseMeasureReportStratifierGroupPopulationComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.StratifierGroupPopulationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("count")) - res.setCountElement(parseInteger(json.get("count").getAsLong())); - if (json.has("_count")) - parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); - if (json.has("patients")) - res.setPatients(parseReference(json.getAsJsonObject("patients"))); - } - - protected Media parseMedia(JsonObject json) throws IOException, FHIRFormatError { - Media res = new Media(); - parseMediaProperties(json, res); - return res; - } - - protected void parseMediaProperties(JsonObject json, Media res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Media.DigitalMediaType.NULL, new Media.DigitalMediaTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("subtype")) - res.setSubtype(parseCodeableConcept(json.getAsJsonObject("subtype"))); - if (json.has("view")) - res.setView(parseCodeableConcept(json.getAsJsonObject("view"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("operator")) - res.setOperator(parseReference(json.getAsJsonObject("operator"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) - res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); - if (json.has("device")) - res.setDevice(parseReference(json.getAsJsonObject("device"))); - if (json.has("height")) - res.setHeightElement(parsePositiveInt(json.get("height").getAsString())); - if (json.has("_height")) - parseElementProperties(json.getAsJsonObject("_height"), res.getHeightElement()); - if (json.has("width")) - res.setWidthElement(parsePositiveInt(json.get("width").getAsString())); - if (json.has("_width")) - parseElementProperties(json.getAsJsonObject("_width"), res.getWidthElement()); - if (json.has("frames")) - res.setFramesElement(parsePositiveInt(json.get("frames").getAsString())); - if (json.has("_frames")) - parseElementProperties(json.getAsJsonObject("_frames"), res.getFramesElement()); - if (json.has("duration")) - res.setDurationElement(parseUnsignedInt(json.get("duration").getAsString())); - if (json.has("_duration")) - parseElementProperties(json.getAsJsonObject("_duration"), res.getDurationElement()); - if (json.has("content")) - res.setContent(parseAttachment(json.getAsJsonObject("content"))); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected Medication parseMedication(JsonObject json) throws IOException, FHIRFormatError { - Medication res = new Medication(); - parseMedicationProperties(json, res); - return res; - } - - protected void parseMedicationProperties(JsonObject json, Medication res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Medication.MedicationStatus.NULL, new Medication.MedicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("isBrand")) - res.setIsBrandElement(parseBoolean(json.get("isBrand").getAsBoolean())); - if (json.has("_isBrand")) - parseElementProperties(json.getAsJsonObject("_isBrand"), res.getIsBrandElement()); - if (json.has("isOverTheCounter")) - res.setIsOverTheCounterElement(parseBoolean(json.get("isOverTheCounter").getAsBoolean())); - if (json.has("_isOverTheCounter")) - parseElementProperties(json.getAsJsonObject("_isOverTheCounter"), res.getIsOverTheCounterElement()); - if (json.has("manufacturer")) - res.setManufacturer(parseReference(json.getAsJsonObject("manufacturer"))); - if (json.has("form")) - res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); - if (json.has("ingredient")) { - JsonArray array = json.getAsJsonArray("ingredient"); - for (int i = 0; i < array.size(); i++) { - res.getIngredient().add(parseMedicationMedicationIngredientComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("package")) - res.setPackage(parseMedicationMedicationPackageComponent(json.getAsJsonObject("package"), res)); - if (json.has("image")) { - JsonArray array = json.getAsJsonArray("image"); - for (int i = 0; i < array.size(); i++) { - res.getImage().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - } - - protected Medication.MedicationIngredientComponent parseMedicationMedicationIngredientComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { - Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent(); - parseMedicationMedicationIngredientComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationMedicationIngredientComponentProperties(JsonObject json, Medication owner, Medication.MedicationIngredientComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type item = parseType("item", json); - if (item != null) - res.setItem(item); - if (json.has("isActive")) - res.setIsActiveElement(parseBoolean(json.get("isActive").getAsBoolean())); - if (json.has("_isActive")) - parseElementProperties(json.getAsJsonObject("_isActive"), res.getIsActiveElement()); - if (json.has("amount")) - res.setAmount(parseRatio(json.getAsJsonObject("amount"))); - } - - protected Medication.MedicationPackageComponent parseMedicationMedicationPackageComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { - Medication.MedicationPackageComponent res = new Medication.MedicationPackageComponent(); - parseMedicationMedicationPackageComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationMedicationPackageComponentProperties(JsonObject json, Medication owner, Medication.MedicationPackageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("container")) - res.setContainer(parseCodeableConcept(json.getAsJsonObject("container"))); - if (json.has("content")) { - JsonArray array = json.getAsJsonArray("content"); - for (int i = 0; i < array.size(); i++) { - res.getContent().add(parseMedicationMedicationPackageContentComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("batch")) { - JsonArray array = json.getAsJsonArray("batch"); - for (int i = 0; i < array.size(); i++) { - res.getBatch().add(parseMedicationMedicationPackageBatchComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Medication.MedicationPackageContentComponent parseMedicationMedicationPackageContentComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { - Medication.MedicationPackageContentComponent res = new Medication.MedicationPackageContentComponent(); - parseMedicationMedicationPackageContentComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationMedicationPackageContentComponentProperties(JsonObject json, Medication owner, Medication.MedicationPackageContentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type item = parseType("item", json); - if (item != null) - res.setItem(item); - if (json.has("amount")) - res.setAmount(parseSimpleQuantity(json.getAsJsonObject("amount"))); - } - - protected Medication.MedicationPackageBatchComponent parseMedicationMedicationPackageBatchComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { - Medication.MedicationPackageBatchComponent res = new Medication.MedicationPackageBatchComponent(); - parseMedicationMedicationPackageBatchComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationMedicationPackageBatchComponentProperties(JsonObject json, Medication owner, Medication.MedicationPackageBatchComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("lotNumber")) - res.setLotNumberElement(parseString(json.get("lotNumber").getAsString())); - if (json.has("_lotNumber")) - parseElementProperties(json.getAsJsonObject("_lotNumber"), res.getLotNumberElement()); - if (json.has("expirationDate")) - res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString())); - if (json.has("_expirationDate")) - parseElementProperties(json.getAsJsonObject("_expirationDate"), res.getExpirationDateElement()); - } - - protected MedicationAdministration parseMedicationAdministration(JsonObject json) throws IOException, FHIRFormatError { - MedicationAdministration res = new MedicationAdministration(); - parseMedicationAdministrationProperties(json, res); - return res; - } - - protected void parseMedicationAdministrationProperties(JsonObject json, MedicationAdministration res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationAdministration.MedicationAdministrationStatus.NULL, new MedicationAdministration.MedicationAdministrationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - Type medication = parseType("medication", json); - if (medication != null) - res.setMedication(medication); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("supportingInformation")) { - JsonArray array = json.getAsJsonArray("supportingInformation"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - Type effective = parseType("effective", json); - if (effective != null) - res.setEffective(effective); - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseMedicationAdministrationMedicationAdministrationPerformerComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("notGiven")) - res.setNotGivenElement(parseBoolean(json.get("notGiven").getAsBoolean())); - if (json.has("_notGiven")) - parseElementProperties(json.getAsJsonObject("_notGiven"), res.getNotGivenElement()); - if (json.has("reasonNotGiven")) { - JsonArray array = json.getAsJsonArray("reasonNotGiven"); - for (int i = 0; i < array.size(); i++) { - res.getReasonNotGiven().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("device")) { - JsonArray array = json.getAsJsonArray("device"); - for (int i = 0; i < array.size(); i++) { - res.getDevice().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dosage")) - res.setDosage(parseMedicationAdministrationMedicationAdministrationDosageComponent(json.getAsJsonObject("dosage"), res)); - if (json.has("eventHistory")) { - JsonArray array = json.getAsJsonArray("eventHistory"); - for (int i = 0; i < array.size(); i++) { - res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationMedicationAdministrationPerformerComponent(JsonObject json, MedicationAdministration owner) throws IOException, FHIRFormatError { - MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent(); - parseMedicationAdministrationMedicationAdministrationPerformerComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationAdministrationMedicationAdministrationPerformerComponentProperties(JsonObject json, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationPerformerComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationMedicationAdministrationDosageComponent(JsonObject json, MedicationAdministration owner) throws IOException, FHIRFormatError { - MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent(); - parseMedicationAdministrationMedicationAdministrationDosageComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationAdministrationMedicationAdministrationDosageComponentProperties(JsonObject json, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationDosageComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("site")) - res.setSite(parseCodeableConcept(json.getAsJsonObject("site"))); - if (json.has("route")) - res.setRoute(parseCodeableConcept(json.getAsJsonObject("route"))); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - if (json.has("dose")) - res.setDose(parseSimpleQuantity(json.getAsJsonObject("dose"))); - Type rate = parseType("rate", json); - if (rate != null) - res.setRate(rate); - } - - protected MedicationDispense parseMedicationDispense(JsonObject json) throws IOException, FHIRFormatError { - MedicationDispense res = new MedicationDispense(); - parseMedicationDispenseProperties(json, res); - return res; - } - - protected void parseMedicationDispenseProperties(JsonObject json, MedicationDispense res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationDispense.MedicationDispenseStatus.NULL, new MedicationDispense.MedicationDispenseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - Type medication = parseType("medication", json); - if (medication != null) - res.setMedication(medication); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("supportingInformation")) { - JsonArray array = json.getAsJsonArray("supportingInformation"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseMedicationDispenseMedicationDispensePerformerComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("authorizingPrescription")) { - JsonArray array = json.getAsJsonArray("authorizingPrescription"); - for (int i = 0; i < array.size(); i++) { - res.getAuthorizingPrescription().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("daysSupply")) - res.setDaysSupply(parseSimpleQuantity(json.getAsJsonObject("daysSupply"))); - if (json.has("whenPrepared")) - res.setWhenPreparedElement(parseDateTime(json.get("whenPrepared").getAsString())); - if (json.has("_whenPrepared")) - parseElementProperties(json.getAsJsonObject("_whenPrepared"), res.getWhenPreparedElement()); - if (json.has("whenHandedOver")) - res.setWhenHandedOverElement(parseDateTime(json.get("whenHandedOver").getAsString())); - if (json.has("_whenHandedOver")) - parseElementProperties(json.getAsJsonObject("_whenHandedOver"), res.getWhenHandedOverElement()); - if (json.has("destination")) - res.setDestination(parseReference(json.getAsJsonObject("destination"))); - if (json.has("receiver")) { - JsonArray array = json.getAsJsonArray("receiver"); - for (int i = 0; i < array.size(); i++) { - res.getReceiver().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dosageInstruction")) { - JsonArray array = json.getAsJsonArray("dosageInstruction"); - for (int i = 0; i < array.size(); i++) { - res.getDosageInstruction().add(parseDosage(array.get(i).getAsJsonObject())); - } - }; - if (json.has("substitution")) - res.setSubstitution(parseMedicationDispenseMedicationDispenseSubstitutionComponent(json.getAsJsonObject("substitution"), res)); - if (json.has("detectedIssue")) { - JsonArray array = json.getAsJsonArray("detectedIssue"); - for (int i = 0; i < array.size(); i++) { - res.getDetectedIssue().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("notDone")) - res.setNotDoneElement(parseBoolean(json.get("notDone").getAsBoolean())); - if (json.has("_notDone")) - parseElementProperties(json.getAsJsonObject("_notDone"), res.getNotDoneElement()); - Type notDoneReason = parseType("notDoneReason", json); - if (notDoneReason != null) - res.setNotDoneReason(notDoneReason); - if (json.has("eventHistory")) { - JsonArray array = json.getAsJsonArray("eventHistory"); - for (int i = 0; i < array.size(); i++) { - res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispenseMedicationDispensePerformerComponent(JsonObject json, MedicationDispense owner) throws IOException, FHIRFormatError { - MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent(); - parseMedicationDispenseMedicationDispensePerformerComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationDispenseMedicationDispensePerformerComponentProperties(JsonObject json, MedicationDispense owner, MedicationDispense.MedicationDispensePerformerComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected MedicationDispense.MedicationDispenseSubstitutionComponent parseMedicationDispenseMedicationDispenseSubstitutionComponent(JsonObject json, MedicationDispense owner) throws IOException, FHIRFormatError { - MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent(); - parseMedicationDispenseMedicationDispenseSubstitutionComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationDispenseMedicationDispenseSubstitutionComponentProperties(JsonObject json, MedicationDispense owner, MedicationDispense.MedicationDispenseSubstitutionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("wasSubstituted")) - res.setWasSubstitutedElement(parseBoolean(json.get("wasSubstituted").getAsBoolean())); - if (json.has("_wasSubstituted")) - parseElementProperties(json.getAsJsonObject("_wasSubstituted"), res.getWasSubstitutedElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("responsibleParty")) { - JsonArray array = json.getAsJsonArray("responsibleParty"); - for (int i = 0; i < array.size(); i++) { - res.getResponsibleParty().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected MedicationRequest parseMedicationRequest(JsonObject json) throws IOException, FHIRFormatError { - MedicationRequest res = new MedicationRequest(); - parseMedicationRequestProperties(json, res); - return res; - } - - protected void parseMedicationRequestProperties(JsonObject json, MedicationRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("groupIdentifier")) - res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationRequest.MedicationRequestStatus.NULL, new MedicationRequest.MedicationRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("intent")) - res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), MedicationRequest.MedicationRequestIntent.NULL, new MedicationRequest.MedicationRequestIntentEnumFactory())); - if (json.has("_intent")) - parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), MedicationRequest.MedicationRequestPriority.NULL, new MedicationRequest.MedicationRequestPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - Type medication = parseType("medication", json); - if (medication != null) - res.setMedication(medication); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("supportingInformation")) { - JsonArray array = json.getAsJsonArray("supportingInformation"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("requester")) - res.setRequester(parseMedicationRequestMedicationRequestRequesterComponent(json.getAsJsonObject("requester"), res)); - if (json.has("recorder")) - res.setRecorder(parseReference(json.getAsJsonObject("recorder"))); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dosageInstruction")) { - JsonArray array = json.getAsJsonArray("dosageInstruction"); - for (int i = 0; i < array.size(); i++) { - res.getDosageInstruction().add(parseDosage(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dispenseRequest")) - res.setDispenseRequest(parseMedicationRequestMedicationRequestDispenseRequestComponent(json.getAsJsonObject("dispenseRequest"), res)); - if (json.has("substitution")) - res.setSubstitution(parseMedicationRequestMedicationRequestSubstitutionComponent(json.getAsJsonObject("substitution"), res)); - if (json.has("priorPrescription")) - res.setPriorPrescription(parseReference(json.getAsJsonObject("priorPrescription"))); - if (json.has("detectedIssue")) { - JsonArray array = json.getAsJsonArray("detectedIssue"); - for (int i = 0; i < array.size(); i++) { - res.getDetectedIssue().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("eventHistory")) { - JsonArray array = json.getAsJsonArray("eventHistory"); - for (int i = 0; i < array.size(); i++) { - res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected MedicationRequest.MedicationRequestRequesterComponent parseMedicationRequestMedicationRequestRequesterComponent(JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError { - MedicationRequest.MedicationRequestRequesterComponent res = new MedicationRequest.MedicationRequestRequesterComponent(); - parseMedicationRequestMedicationRequestRequesterComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationRequestMedicationRequestRequesterComponentProperties(JsonObject json, MedicationRequest owner, MedicationRequest.MedicationRequestRequesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("agent")) - res.setAgent(parseReference(json.getAsJsonObject("agent"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestMedicationRequestDispenseRequestComponent(JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError { - MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent(); - parseMedicationRequestMedicationRequestDispenseRequestComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationRequestMedicationRequestDispenseRequestComponentProperties(JsonObject json, MedicationRequest owner, MedicationRequest.MedicationRequestDispenseRequestComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("validityPeriod")) - res.setValidityPeriod(parsePeriod(json.getAsJsonObject("validityPeriod"))); - if (json.has("numberOfRepeatsAllowed")) - res.setNumberOfRepeatsAllowedElement(parseUnsignedInt(json.get("numberOfRepeatsAllowed").getAsString())); - if (json.has("_numberOfRepeatsAllowed")) - parseElementProperties(json.getAsJsonObject("_numberOfRepeatsAllowed"), res.getNumberOfRepeatsAllowedElement()); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("expectedSupplyDuration")) - res.setExpectedSupplyDuration(parseDuration(json.getAsJsonObject("expectedSupplyDuration"))); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - } - - protected MedicationRequest.MedicationRequestSubstitutionComponent parseMedicationRequestMedicationRequestSubstitutionComponent(JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError { - MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent(); - parseMedicationRequestMedicationRequestSubstitutionComponentProperties(json, owner, res); - return res; - } - - protected void parseMedicationRequestMedicationRequestSubstitutionComponentProperties(JsonObject json, MedicationRequest owner, MedicationRequest.MedicationRequestSubstitutionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("allowed")) - res.setAllowedElement(parseBoolean(json.get("allowed").getAsBoolean())); - if (json.has("_allowed")) - parseElementProperties(json.getAsJsonObject("_allowed"), res.getAllowedElement()); - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - } - - protected MedicationStatement parseMedicationStatement(JsonObject json) throws IOException, FHIRFormatError { - MedicationStatement res = new MedicationStatement(); - parseMedicationStatementProperties(json, res); - return res; - } - - protected void parseMedicationStatementProperties(JsonObject json, MedicationStatement res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationStatement.MedicationStatementStatus.NULL, new MedicationStatement.MedicationStatementStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - Type medication = parseType("medication", json); - if (medication != null) - res.setMedication(medication); - Type effective = parseType("effective", json); - if (effective != null) - res.setEffective(effective); - if (json.has("dateAsserted")) - res.setDateAssertedElement(parseDateTime(json.get("dateAsserted").getAsString())); - if (json.has("_dateAsserted")) - parseElementProperties(json.getAsJsonObject("_dateAsserted"), res.getDateAssertedElement()); - if (json.has("informationSource")) - res.setInformationSource(parseReference(json.getAsJsonObject("informationSource"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("derivedFrom")) { - JsonArray array = json.getAsJsonArray("derivedFrom"); - for (int i = 0; i < array.size(); i++) { - res.getDerivedFrom().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("taken")) - res.setTakenElement(parseEnumeration(json.get("taken").getAsString(), MedicationStatement.MedicationStatementTaken.NULL, new MedicationStatement.MedicationStatementTakenEnumFactory())); - if (json.has("_taken")) - parseElementProperties(json.getAsJsonObject("_taken"), res.getTakenElement()); - if (json.has("reasonNotTaken")) { - JsonArray array = json.getAsJsonArray("reasonNotTaken"); - for (int i = 0; i < array.size(); i++) { - res.getReasonNotTaken().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dosage")) { - JsonArray array = json.getAsJsonArray("dosage"); - for (int i = 0; i < array.size(); i++) { - res.getDosage().add(parseDosage(array.get(i).getAsJsonObject())); - } - }; - } - - protected MessageDefinition parseMessageDefinition(JsonObject json) throws IOException, FHIRFormatError { - MessageDefinition res = new MessageDefinition(); - parseMessageDefinitionProperties(json, res); - return res; - } - - protected void parseMessageDefinitionProperties(JsonObject json, MessageDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("base")) - res.setBase(parseReference(json.getAsJsonObject("base"))); - if (json.has("parent")) { - JsonArray array = json.getAsJsonArray("parent"); - for (int i = 0; i < array.size(); i++) { - res.getParent().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("replaces")) { - JsonArray array = json.getAsJsonArray("replaces"); - for (int i = 0; i < array.size(); i++) { - res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("event")) - res.setEvent(parseCoding(json.getAsJsonObject("event"))); - if (json.has("category")) - res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), MessageDefinition.MessageSignificanceCategory.NULL, new MessageDefinition.MessageSignificanceCategoryEnumFactory())); - if (json.has("_category")) - parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); - if (json.has("focus")) { - JsonArray array = json.getAsJsonArray("focus"); - for (int i = 0; i < array.size(); i++) { - res.getFocus().add(parseMessageDefinitionMessageDefinitionFocusComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("responseRequired")) - res.setResponseRequiredElement(parseBoolean(json.get("responseRequired").getAsBoolean())); - if (json.has("_responseRequired")) - parseElementProperties(json.getAsJsonObject("_responseRequired"), res.getResponseRequiredElement()); - if (json.has("allowedResponse")) { - JsonArray array = json.getAsJsonArray("allowedResponse"); - for (int i = 0; i < array.size(); i++) { - res.getAllowedResponse().add(parseMessageDefinitionMessageDefinitionAllowedResponseComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionMessageDefinitionFocusComponent(JsonObject json, MessageDefinition owner) throws IOException, FHIRFormatError { - MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent(); - parseMessageDefinitionMessageDefinitionFocusComponentProperties(json, owner, res); - return res; - } - - protected void parseMessageDefinitionMessageDefinitionFocusComponentProperties(JsonObject json, MessageDefinition owner, MessageDefinition.MessageDefinitionFocusComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("profile")) - res.setProfile(parseReference(json.getAsJsonObject("profile"))); - if (json.has("min")) - res.setMinElement(parseUnsignedInt(json.get("min").getAsString())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - } - - protected MessageDefinition.MessageDefinitionAllowedResponseComponent parseMessageDefinitionMessageDefinitionAllowedResponseComponent(JsonObject json, MessageDefinition owner) throws IOException, FHIRFormatError { - MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent(); - parseMessageDefinitionMessageDefinitionAllowedResponseComponentProperties(json, owner, res); - return res; - } - - protected void parseMessageDefinitionMessageDefinitionAllowedResponseComponentProperties(JsonObject json, MessageDefinition owner, MessageDefinition.MessageDefinitionAllowedResponseComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("message")) - res.setMessage(parseReference(json.getAsJsonObject("message"))); - if (json.has("situation")) - res.setSituationElement(parseMarkdown(json.get("situation").getAsString())); - if (json.has("_situation")) - parseElementProperties(json.getAsJsonObject("_situation"), res.getSituationElement()); - } - - protected MessageHeader parseMessageHeader(JsonObject json) throws IOException, FHIRFormatError { - MessageHeader res = new MessageHeader(); - parseMessageHeaderProperties(json, res); - return res; - } - - protected void parseMessageHeaderProperties(JsonObject json, MessageHeader res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("event")) - res.setEvent(parseCoding(json.getAsJsonObject("event"))); - if (json.has("destination")) { - JsonArray array = json.getAsJsonArray("destination"); - for (int i = 0; i < array.size(); i++) { - res.getDestination().add(parseMessageHeaderMessageDestinationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("sender")) - res.setSender(parseReference(json.getAsJsonObject("sender"))); - if (json.has("timestamp")) - res.setTimestampElement(parseInstant(json.get("timestamp").getAsString())); - if (json.has("_timestamp")) - parseElementProperties(json.getAsJsonObject("_timestamp"), res.getTimestampElement()); - if (json.has("enterer")) - res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - if (json.has("source")) - res.setSource(parseMessageHeaderMessageSourceComponent(json.getAsJsonObject("source"), res)); - if (json.has("responsible")) - res.setResponsible(parseReference(json.getAsJsonObject("responsible"))); - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - if (json.has("response")) - res.setResponse(parseMessageHeaderMessageHeaderResponseComponent(json.getAsJsonObject("response"), res)); - if (json.has("focus")) { - JsonArray array = json.getAsJsonArray("focus"); - for (int i = 0; i < array.size(); i++) { - res.getFocus().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected MessageHeader.MessageDestinationComponent parseMessageHeaderMessageDestinationComponent(JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError { - MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent(); - parseMessageHeaderMessageDestinationComponentProperties(json, owner, res); - return res; - } - - protected void parseMessageHeaderMessageDestinationComponentProperties(JsonObject json, MessageHeader owner, MessageHeader.MessageDestinationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("target")) - res.setTarget(parseReference(json.getAsJsonObject("target"))); - if (json.has("endpoint")) - res.setEndpointElement(parseUri(json.get("endpoint").getAsString())); - if (json.has("_endpoint")) - parseElementProperties(json.getAsJsonObject("_endpoint"), res.getEndpointElement()); - if (json.has("receiver")) - res.setReceiver(parseReference(json.getAsJsonObject("receiver"))); - } - - protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError { - MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent(); - parseMessageHeaderMessageSourceComponentProperties(json, owner, res); - return res; - } - - protected void parseMessageHeaderMessageSourceComponentProperties(JsonObject json, MessageHeader owner, MessageHeader.MessageSourceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("software")) - res.setSoftwareElement(parseString(json.get("software").getAsString())); - if (json.has("_software")) - parseElementProperties(json.getAsJsonObject("_software"), res.getSoftwareElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("contact")) - res.setContact(parseContactPoint(json.getAsJsonObject("contact"))); - if (json.has("endpoint")) - res.setEndpointElement(parseUri(json.get("endpoint").getAsString())); - if (json.has("_endpoint")) - parseElementProperties(json.getAsJsonObject("_endpoint"), res.getEndpointElement()); - } - - protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderMessageHeaderResponseComponent(JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError { - MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent(); - parseMessageHeaderMessageHeaderResponseComponentProperties(json, owner, res); - return res; - } - - protected void parseMessageHeaderMessageHeaderResponseComponentProperties(JsonObject json, MessageHeader owner, MessageHeader.MessageHeaderResponseComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifierElement(parseId(json.get("identifier").getAsString())); - if (json.has("_identifier")) - parseElementProperties(json.getAsJsonObject("_identifier"), res.getIdentifierElement()); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), MessageHeader.ResponseType.NULL, new MessageHeader.ResponseTypeEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("details")) - res.setDetails(parseReference(json.getAsJsonObject("details"))); - } - - protected NamingSystem parseNamingSystem(JsonObject json) throws IOException, FHIRFormatError { - NamingSystem res = new NamingSystem(); - parseNamingSystemProperties(json, res); - return res; - } - - protected void parseNamingSystemProperties(JsonObject json, NamingSystem res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), NamingSystem.NamingSystemType.NULL, new NamingSystem.NamingSystemTypeEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("responsible")) - res.setResponsibleElement(parseString(json.get("responsible").getAsString())); - if (json.has("_responsible")) - parseElementProperties(json.getAsJsonObject("_responsible"), res.getResponsibleElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("uniqueId")) { - JsonArray array = json.getAsJsonArray("uniqueId"); - for (int i = 0; i < array.size(); i++) { - res.getUniqueId().add(parseNamingSystemNamingSystemUniqueIdComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("replacedBy")) - res.setReplacedBy(parseReference(json.getAsJsonObject("replacedBy"))); - } - - protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemNamingSystemUniqueIdComponent(JsonObject json, NamingSystem owner) throws IOException, FHIRFormatError { - NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent(); - parseNamingSystemNamingSystemUniqueIdComponentProperties(json, owner, res); - return res; - } - - protected void parseNamingSystemNamingSystemUniqueIdComponentProperties(JsonObject json, NamingSystem owner, NamingSystem.NamingSystemUniqueIdComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), NamingSystem.NamingSystemIdentifierType.NULL, new NamingSystem.NamingSystemIdentifierTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("preferred")) - res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean())); - if (json.has("_preferred")) - parseElementProperties(json.getAsJsonObject("_preferred"), res.getPreferredElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected NutritionOrder parseNutritionOrder(JsonObject json) throws IOException, FHIRFormatError { - NutritionOrder res = new NutritionOrder(); - parseNutritionOrderProperties(json, res); - return res; - } - - protected void parseNutritionOrderProperties(JsonObject json, NutritionOrder res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), NutritionOrder.NutritionOrderStatus.NULL, new NutritionOrder.NutritionOrderStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("dateTime")) - res.setDateTimeElement(parseDateTime(json.get("dateTime").getAsString())); - if (json.has("_dateTime")) - parseElementProperties(json.getAsJsonObject("_dateTime"), res.getDateTimeElement()); - if (json.has("orderer")) - res.setOrderer(parseReference(json.getAsJsonObject("orderer"))); - if (json.has("allergyIntolerance")) { - JsonArray array = json.getAsJsonArray("allergyIntolerance"); - for (int i = 0; i < array.size(); i++) { - res.getAllergyIntolerance().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("foodPreferenceModifier")) { - JsonArray array = json.getAsJsonArray("foodPreferenceModifier"); - for (int i = 0; i < array.size(); i++) { - res.getFoodPreferenceModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("excludeFoodModifier")) { - JsonArray array = json.getAsJsonArray("excludeFoodModifier"); - for (int i = 0; i < array.size(); i++) { - res.getExcludeFoodModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("oralDiet")) - res.setOralDiet(parseNutritionOrderNutritionOrderOralDietComponent(json.getAsJsonObject("oralDiet"), res)); - if (json.has("supplement")) { - JsonArray array = json.getAsJsonArray("supplement"); - for (int i = 0; i < array.size(); i++) { - res.getSupplement().add(parseNutritionOrderNutritionOrderSupplementComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("enteralFormula")) - res.setEnteralFormula(parseNutritionOrderNutritionOrderEnteralFormulaComponent(json.getAsJsonObject("enteralFormula"), res)); - } - - protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderNutritionOrderOralDietComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { - NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent(); - parseNutritionOrderNutritionOrderOralDietComponentProperties(json, owner, res); - return res; - } - - protected void parseNutritionOrderNutritionOrderOralDietComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("schedule")) { - JsonArray array = json.getAsJsonArray("schedule"); - for (int i = 0; i < array.size(); i++) { - res.getSchedule().add(parseTiming(array.get(i).getAsJsonObject())); - } - }; - if (json.has("nutrient")) { - JsonArray array = json.getAsJsonArray("nutrient"); - for (int i = 0; i < array.size(); i++) { - res.getNutrient().add(parseNutritionOrderNutritionOrderOralDietNutrientComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("texture")) { - JsonArray array = json.getAsJsonArray("texture"); - for (int i = 0; i < array.size(); i++) { - res.getTexture().add(parseNutritionOrderNutritionOrderOralDietTextureComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("fluidConsistencyType")) { - JsonArray array = json.getAsJsonArray("fluidConsistencyType"); - for (int i = 0; i < array.size(); i++) { - res.getFluidConsistencyType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("instruction")) - res.setInstructionElement(parseString(json.get("instruction").getAsString())); - if (json.has("_instruction")) - parseElementProperties(json.getAsJsonObject("_instruction"), res.getInstructionElement()); - } - - protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderNutritionOrderOralDietNutrientComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { - NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent(); - parseNutritionOrderNutritionOrderOralDietNutrientComponentProperties(json, owner, res); - return res; - } - - protected void parseNutritionOrderNutritionOrderOralDietNutrientComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietNutrientComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("modifier")) - res.setModifier(parseCodeableConcept(json.getAsJsonObject("modifier"))); - if (json.has("amount")) - res.setAmount(parseSimpleQuantity(json.getAsJsonObject("amount"))); - } - - protected NutritionOrder.NutritionOrderOralDietTextureComponent parseNutritionOrderNutritionOrderOralDietTextureComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { - NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent(); - parseNutritionOrderNutritionOrderOralDietTextureComponentProperties(json, owner, res); - return res; - } - - protected void parseNutritionOrderNutritionOrderOralDietTextureComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietTextureComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("modifier")) - res.setModifier(parseCodeableConcept(json.getAsJsonObject("modifier"))); - if (json.has("foodType")) - res.setFoodType(parseCodeableConcept(json.getAsJsonObject("foodType"))); - } - - protected NutritionOrder.NutritionOrderSupplementComponent parseNutritionOrderNutritionOrderSupplementComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { - NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent(); - parseNutritionOrderNutritionOrderSupplementComponentProperties(json, owner, res); - return res; - } - - protected void parseNutritionOrderNutritionOrderSupplementComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderSupplementComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("productName")) - res.setProductNameElement(parseString(json.get("productName").getAsString())); - if (json.has("_productName")) - parseElementProperties(json.getAsJsonObject("_productName"), res.getProductNameElement()); - if (json.has("schedule")) { - JsonArray array = json.getAsJsonArray("schedule"); - for (int i = 0; i < array.size(); i++) { - res.getSchedule().add(parseTiming(array.get(i).getAsJsonObject())); - } - }; - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("instruction")) - res.setInstructionElement(parseString(json.get("instruction").getAsString())); - if (json.has("_instruction")) - parseElementProperties(json.getAsJsonObject("_instruction"), res.getInstructionElement()); - } - - protected NutritionOrder.NutritionOrderEnteralFormulaComponent parseNutritionOrderNutritionOrderEnteralFormulaComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { - NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent(); - parseNutritionOrderNutritionOrderEnteralFormulaComponentProperties(json, owner, res); - return res; - } - - protected void parseNutritionOrderNutritionOrderEnteralFormulaComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("baseFormulaType")) - res.setBaseFormulaType(parseCodeableConcept(json.getAsJsonObject("baseFormulaType"))); - if (json.has("baseFormulaProductName")) - res.setBaseFormulaProductNameElement(parseString(json.get("baseFormulaProductName").getAsString())); - if (json.has("_baseFormulaProductName")) - parseElementProperties(json.getAsJsonObject("_baseFormulaProductName"), res.getBaseFormulaProductNameElement()); - if (json.has("additiveType")) - res.setAdditiveType(parseCodeableConcept(json.getAsJsonObject("additiveType"))); - if (json.has("additiveProductName")) - res.setAdditiveProductNameElement(parseString(json.get("additiveProductName").getAsString())); - if (json.has("_additiveProductName")) - parseElementProperties(json.getAsJsonObject("_additiveProductName"), res.getAdditiveProductNameElement()); - if (json.has("caloricDensity")) - res.setCaloricDensity(parseSimpleQuantity(json.getAsJsonObject("caloricDensity"))); - if (json.has("routeofAdministration")) - res.setRouteofAdministration(parseCodeableConcept(json.getAsJsonObject("routeofAdministration"))); - if (json.has("administration")) { - JsonArray array = json.getAsJsonArray("administration"); - for (int i = 0; i < array.size(); i++) { - res.getAdministration().add(parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("maxVolumeToDeliver")) - res.setMaxVolumeToDeliver(parseSimpleQuantity(json.getAsJsonObject("maxVolumeToDeliver"))); - if (json.has("administrationInstruction")) - res.setAdministrationInstructionElement(parseString(json.get("administrationInstruction").getAsString())); - if (json.has("_administrationInstruction")) - parseElementProperties(json.getAsJsonObject("_administrationInstruction"), res.getAdministrationInstructionElement()); - } - - protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { - NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); - parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentProperties(json, owner, res); - return res; - } - - protected void parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("schedule")) - res.setSchedule(parseTiming(json.getAsJsonObject("schedule"))); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - Type rate = parseType("rate", json); - if (rate != null) - res.setRate(rate); - } - - protected Observation parseObservation(JsonObject json) throws IOException, FHIRFormatError { - Observation res = new Observation(); - parseObservationProperties(json, res); - return res; - } - - protected void parseObservationProperties(JsonObject json, Observation res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Observation.ObservationStatus.NULL, new Observation.ObservationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type effective = parseType("effective", json); - if (effective != null) - res.setEffective(effective); - if (json.has("issued")) - res.setIssuedElement(parseInstant(json.get("issued").getAsString())); - if (json.has("_issued")) - parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("dataAbsentReason")) - res.setDataAbsentReason(parseCodeableConcept(json.getAsJsonObject("dataAbsentReason"))); - if (json.has("interpretation")) - res.setInterpretation(parseCodeableConcept(json.getAsJsonObject("interpretation"))); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("bodySite")) - res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - if (json.has("specimen")) - res.setSpecimen(parseReference(json.getAsJsonObject("specimen"))); - if (json.has("device")) - res.setDevice(parseReference(json.getAsJsonObject("device"))); - if (json.has("referenceRange")) { - JsonArray array = json.getAsJsonArray("referenceRange"); - for (int i = 0; i < array.size(); i++) { - res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("related")) { - JsonArray array = json.getAsJsonArray("related"); - for (int i = 0; i < array.size(); i++) { - res.getRelated().add(parseObservationObservationRelatedComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("component")) { - JsonArray array = json.getAsJsonArray("component"); - for (int i = 0; i < array.size(); i++) { - res.getComponent().add(parseObservationObservationComponentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Observation.ObservationReferenceRangeComponent parseObservationObservationReferenceRangeComponent(JsonObject json, Observation owner) throws IOException, FHIRFormatError { - Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent(); - parseObservationObservationReferenceRangeComponentProperties(json, owner, res); - return res; - } - - protected void parseObservationObservationReferenceRangeComponentProperties(JsonObject json, Observation owner, Observation.ObservationReferenceRangeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("low")) - res.setLow(parseSimpleQuantity(json.getAsJsonObject("low"))); - if (json.has("high")) - res.setHigh(parseSimpleQuantity(json.getAsJsonObject("high"))); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("appliesTo")) { - JsonArray array = json.getAsJsonArray("appliesTo"); - for (int i = 0; i < array.size(); i++) { - res.getAppliesTo().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("age")) - res.setAge(parseRange(json.getAsJsonObject("age"))); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - } - - protected Observation.ObservationRelatedComponent parseObservationObservationRelatedComponent(JsonObject json, Observation owner) throws IOException, FHIRFormatError { - Observation.ObservationRelatedComponent res = new Observation.ObservationRelatedComponent(); - parseObservationObservationRelatedComponentProperties(json, owner, res); - return res; - } - - protected void parseObservationObservationRelatedComponentProperties(JsonObject json, Observation owner, Observation.ObservationRelatedComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Observation.ObservationRelationshipType.NULL, new Observation.ObservationRelationshipTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("target")) - res.setTarget(parseReference(json.getAsJsonObject("target"))); - } - - protected Observation.ObservationComponentComponent parseObservationObservationComponentComponent(JsonObject json, Observation owner) throws IOException, FHIRFormatError { - Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent(); - parseObservationObservationComponentComponentProperties(json, owner, res); - return res; - } - - protected void parseObservationObservationComponentComponentProperties(JsonObject json, Observation owner, Observation.ObservationComponentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("dataAbsentReason")) - res.setDataAbsentReason(parseCodeableConcept(json.getAsJsonObject("dataAbsentReason"))); - if (json.has("interpretation")) - res.setInterpretation(parseCodeableConcept(json.getAsJsonObject("interpretation"))); - if (json.has("referenceRange")) { - JsonArray array = json.getAsJsonArray("referenceRange"); - for (int i = 0; i < array.size(); i++) { - res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected OperationDefinition parseOperationDefinition(JsonObject json) throws IOException, FHIRFormatError { - OperationDefinition res = new OperationDefinition(); - parseOperationDefinitionProperties(json, res); - return res; - } - - protected void parseOperationDefinitionProperties(JsonObject json, OperationDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), OperationDefinition.OperationKind.NULL, new OperationDefinition.OperationKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("idempotent")) - res.setIdempotentElement(parseBoolean(json.get("idempotent").getAsBoolean())); - if (json.has("_idempotent")) - parseElementProperties(json.getAsJsonObject("_idempotent"), res.getIdempotentElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - if (json.has("base")) - res.setBase(parseReference(json.getAsJsonObject("base"))); - if (json.has("resource")) { - JsonArray array = json.getAsJsonArray("resource"); - for (int i = 0; i < array.size(); i++) { - res.getResource().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_resource")) { - JsonArray array = json.getAsJsonArray("_resource"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getResource().size()) - res.getResource().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getResource().get(i)); - } - }; - if (json.has("system")) - res.setSystemElement(parseBoolean(json.get("system").getAsBoolean())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("type")) - res.setTypeElement(parseBoolean(json.get("type").getAsBoolean())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("instance")) - res.setInstanceElement(parseBoolean(json.get("instance").getAsBoolean())); - if (json.has("_instance")) - parseElementProperties(json.getAsJsonObject("_instance"), res.getInstanceElement()); - if (json.has("parameter")) { - JsonArray array = json.getAsJsonArray("parameter"); - for (int i = 0; i < array.size(); i++) { - res.getParameter().add(parseOperationDefinitionOperationDefinitionParameterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("overload")) { - JsonArray array = json.getAsJsonArray("overload"); - for (int i = 0; i < array.size(); i++) { - res.getOverload().add(parseOperationDefinitionOperationDefinitionOverloadComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionOperationDefinitionParameterComponent(JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError { - OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent(); - parseOperationDefinitionOperationDefinitionParameterComponentProperties(json, owner, res); - return res; - } - - protected void parseOperationDefinitionOperationDefinitionParameterComponentProperties(JsonObject json, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseCode(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("use")) - res.setUseElement(parseEnumeration(json.get("use").getAsString(), OperationDefinition.OperationParameterUse.NULL, new OperationDefinition.OperationParameterUseEnumFactory())); - if (json.has("_use")) - parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); - if (json.has("min")) - res.setMinElement(parseInteger(json.get("min").getAsLong())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("searchType")) - res.setSearchTypeElement(parseEnumeration(json.get("searchType").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); - if (json.has("_searchType")) - parseElementProperties(json.getAsJsonObject("_searchType"), res.getSearchTypeElement()); - if (json.has("profile")) - res.setProfile(parseReference(json.getAsJsonObject("profile"))); - if (json.has("binding")) - res.setBinding(parseOperationDefinitionOperationDefinitionParameterBindingComponent(json.getAsJsonObject("binding"), owner)); - if (json.has("part")) { - JsonArray array = json.getAsJsonArray("part"); - for (int i = 0; i < array.size(); i++) { - res.getPart().add(parseOperationDefinitionOperationDefinitionParameterComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionOperationDefinitionParameterBindingComponent(JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError { - OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent(); - parseOperationDefinitionOperationDefinitionParameterBindingComponentProperties(json, owner, res); - return res; - } - - protected void parseOperationDefinitionOperationDefinitionParameterBindingComponentProperties(JsonObject json, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterBindingComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("strength")) - res.setStrengthElement(parseEnumeration(json.get("strength").getAsString(), Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); - if (json.has("_strength")) - parseElementProperties(json.getAsJsonObject("_strength"), res.getStrengthElement()); - Type valueSet = parseType("valueSet", json); - if (valueSet != null) - res.setValueSet(valueSet); - } - - protected OperationDefinition.OperationDefinitionOverloadComponent parseOperationDefinitionOperationDefinitionOverloadComponent(JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError { - OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent(); - parseOperationDefinitionOperationDefinitionOverloadComponentProperties(json, owner, res); - return res; - } - - protected void parseOperationDefinitionOperationDefinitionOverloadComponentProperties(JsonObject json, OperationDefinition owner, OperationDefinition.OperationDefinitionOverloadComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("parameterName")) { - JsonArray array = json.getAsJsonArray("parameterName"); - for (int i = 0; i < array.size(); i++) { - res.getParameterName().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_parameterName")) { - JsonArray array = json.getAsJsonArray("_parameterName"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getParameterName().size()) - res.getParameterName().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getParameterName().get(i)); - } - }; - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected OperationOutcome parseOperationOutcome(JsonObject json) throws IOException, FHIRFormatError { - OperationOutcome res = new OperationOutcome(); - parseOperationOutcomeProperties(json, res); - return res; - } - - protected void parseOperationOutcomeProperties(JsonObject json, OperationOutcome res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("issue")) { - JsonArray array = json.getAsJsonArray("issue"); - for (int i = 0; i < array.size(); i++) { - res.getIssue().add(parseOperationOutcomeOperationOutcomeIssueComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeOperationOutcomeIssueComponent(JsonObject json, OperationOutcome owner) throws IOException, FHIRFormatError { - OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent(); - parseOperationOutcomeOperationOutcomeIssueComponentProperties(json, owner, res); - return res; - } - - protected void parseOperationOutcomeOperationOutcomeIssueComponentProperties(JsonObject json, OperationOutcome owner, OperationOutcome.OperationOutcomeIssueComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("severity")) - res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), OperationOutcome.IssueSeverity.NULL, new OperationOutcome.IssueSeverityEnumFactory())); - if (json.has("_severity")) - parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); - if (json.has("code")) - res.setCodeElement(parseEnumeration(json.get("code").getAsString(), OperationOutcome.IssueType.NULL, new OperationOutcome.IssueTypeEnumFactory())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("details")) - res.setDetails(parseCodeableConcept(json.getAsJsonObject("details"))); - if (json.has("diagnostics")) - res.setDiagnosticsElement(parseString(json.get("diagnostics").getAsString())); - if (json.has("_diagnostics")) - parseElementProperties(json.getAsJsonObject("_diagnostics"), res.getDiagnosticsElement()); - if (json.has("location")) { - JsonArray array = json.getAsJsonArray("location"); - for (int i = 0; i < array.size(); i++) { - res.getLocation().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_location")) { - JsonArray array = json.getAsJsonArray("_location"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getLocation().size()) - res.getLocation().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getLocation().get(i)); - } - }; - if (json.has("expression")) { - JsonArray array = json.getAsJsonArray("expression"); - for (int i = 0; i < array.size(); i++) { - res.getExpression().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_expression")) { - JsonArray array = json.getAsJsonArray("_expression"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getExpression().size()) - res.getExpression().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getExpression().get(i)); - } - }; - } - - protected Organization parseOrganization(JsonObject json) throws IOException, FHIRFormatError { - Organization res = new Organization(); - parseOrganizationProperties(json, res); - return res; - } - - protected void parseOrganizationProperties(JsonObject json, Organization res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("type")) { - JsonArray array = json.getAsJsonArray("type"); - for (int i = 0; i < array.size(); i++) { - res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("alias")) { - JsonArray array = json.getAsJsonArray("alias"); - for (int i = 0; i < array.size(); i++) { - res.getAlias().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_alias")) { - JsonArray array = json.getAsJsonArray("_alias"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getAlias().size()) - res.getAlias().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getAlias().get(i)); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("address")) { - JsonArray array = json.getAsJsonArray("address"); - for (int i = 0; i < array.size(); i++) { - res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) - res.setPartOf(parseReference(json.getAsJsonObject("partOf"))); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseOrganizationOrganizationContactComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Organization.OrganizationContactComponent parseOrganizationOrganizationContactComponent(JsonObject json, Organization owner) throws IOException, FHIRFormatError { - Organization.OrganizationContactComponent res = new Organization.OrganizationContactComponent(); - parseOrganizationOrganizationContactComponentProperties(json, owner, res); - return res; - } - - protected void parseOrganizationOrganizationContactComponentProperties(JsonObject json, Organization owner, Organization.OrganizationContactComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("purpose")) - res.setPurpose(parseCodeableConcept(json.getAsJsonObject("purpose"))); - if (json.has("name")) - res.setName(parseHumanName(json.getAsJsonObject("name"))); - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("address")) - res.setAddress(parseAddress(json.getAsJsonObject("address"))); - } - - protected Patient parsePatient(JsonObject json) throws IOException, FHIRFormatError { - Patient res = new Patient(); - parsePatientProperties(json, res); - return res; - } - - protected void parsePatientProperties(JsonObject json, Patient res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("name")) { - JsonArray array = json.getAsJsonArray("name"); - for (int i = 0; i < array.size(); i++) { - res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("gender")) - res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - if (json.has("_gender")) - parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); - if (json.has("birthDate")) - res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); - if (json.has("_birthDate")) - parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); - Type deceased = parseType("deceased", json); - if (deceased != null) - res.setDeceased(deceased); - if (json.has("address")) { - JsonArray array = json.getAsJsonArray("address"); - for (int i = 0; i < array.size(); i++) { - res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); - } - }; - if (json.has("maritalStatus")) - res.setMaritalStatus(parseCodeableConcept(json.getAsJsonObject("maritalStatus"))); - Type multipleBirth = parseType("multipleBirth", json); - if (multipleBirth != null) - res.setMultipleBirth(multipleBirth); - if (json.has("photo")) { - JsonArray array = json.getAsJsonArray("photo"); - for (int i = 0; i < array.size(); i++) { - res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parsePatientContactComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("animal")) - res.setAnimal(parsePatientAnimalComponent(json.getAsJsonObject("animal"), res)); - if (json.has("communication")) { - JsonArray array = json.getAsJsonArray("communication"); - for (int i = 0; i < array.size(); i++) { - res.getCommunication().add(parsePatientPatientCommunicationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("generalPractitioner")) { - JsonArray array = json.getAsJsonArray("generalPractitioner"); - for (int i = 0; i < array.size(); i++) { - res.getGeneralPractitioner().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("managingOrganization")) - res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parsePatientPatientLinkComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Patient.ContactComponent parsePatientContactComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { - Patient.ContactComponent res = new Patient.ContactComponent(); - parsePatientContactComponentProperties(json, owner, res); - return res; - } - - protected void parsePatientContactComponentProperties(JsonObject json, Patient owner, Patient.ContactComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("relationship")) { - JsonArray array = json.getAsJsonArray("relationship"); - for (int i = 0; i < array.size(); i++) { - res.getRelationship().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("name")) - res.setName(parseHumanName(json.getAsJsonObject("name"))); - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("address")) - res.setAddress(parseAddress(json.getAsJsonObject("address"))); - if (json.has("gender")) - res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - if (json.has("_gender")) - parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected Patient.AnimalComponent parsePatientAnimalComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { - Patient.AnimalComponent res = new Patient.AnimalComponent(); - parsePatientAnimalComponentProperties(json, owner, res); - return res; - } - - protected void parsePatientAnimalComponentProperties(JsonObject json, Patient owner, Patient.AnimalComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("species")) - res.setSpecies(parseCodeableConcept(json.getAsJsonObject("species"))); - if (json.has("breed")) - res.setBreed(parseCodeableConcept(json.getAsJsonObject("breed"))); - if (json.has("genderStatus")) - res.setGenderStatus(parseCodeableConcept(json.getAsJsonObject("genderStatus"))); - } - - protected Patient.PatientCommunicationComponent parsePatientPatientCommunicationComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { - Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent(); - parsePatientPatientCommunicationComponentProperties(json, owner, res); - return res; - } - - protected void parsePatientPatientCommunicationComponentProperties(JsonObject json, Patient owner, Patient.PatientCommunicationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("language")) - res.setLanguage(parseCodeableConcept(json.getAsJsonObject("language"))); - if (json.has("preferred")) - res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean())); - if (json.has("_preferred")) - parseElementProperties(json.getAsJsonObject("_preferred"), res.getPreferredElement()); - } - - protected Patient.PatientLinkComponent parsePatientPatientLinkComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { - Patient.PatientLinkComponent res = new Patient.PatientLinkComponent(); - parsePatientPatientLinkComponentProperties(json, owner, res); - return res; - } - - protected void parsePatientPatientLinkComponentProperties(JsonObject json, Patient owner, Patient.PatientLinkComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("other")) - res.setOther(parseReference(json.getAsJsonObject("other"))); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Patient.LinkType.NULL, new Patient.LinkTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - } - - protected PaymentNotice parsePaymentNotice(JsonObject json) throws IOException, FHIRFormatError { - PaymentNotice res = new PaymentNotice(); - parsePaymentNoticeProperties(json, res); - return res; - } - - protected void parsePaymentNoticeProperties(JsonObject json, PaymentNotice res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), PaymentNotice.PaymentNoticeStatus.NULL, new PaymentNotice.PaymentNoticeStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("response")) - res.setResponse(parseReference(json.getAsJsonObject("response"))); - if (json.has("statusDate")) - res.setStatusDateElement(parseDate(json.get("statusDate").getAsString())); - if (json.has("_statusDate")) - parseElementProperties(json.getAsJsonObject("_statusDate"), res.getStatusDateElement()); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("target")) - res.setTarget(parseReference(json.getAsJsonObject("target"))); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("paymentStatus")) - res.setPaymentStatus(parseCodeableConcept(json.getAsJsonObject("paymentStatus"))); - } - - protected PaymentReconciliation parsePaymentReconciliation(JsonObject json) throws IOException, FHIRFormatError { - PaymentReconciliation res = new PaymentReconciliation(); - parsePaymentReconciliationProperties(json, res); - return res; - } - - protected void parsePaymentReconciliationProperties(JsonObject json, PaymentReconciliation res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), PaymentReconciliation.PaymentReconciliationStatus.NULL, new PaymentReconciliation.PaymentReconciliationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("disposition")) - res.setDispositionElement(parseString(json.get("disposition").getAsString())); - if (json.has("_disposition")) - parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); - if (json.has("requestProvider")) - res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); - if (json.has("requestOrganization")) - res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); - if (json.has("detail")) { - JsonArray array = json.getAsJsonArray("detail"); - for (int i = 0; i < array.size(); i++) { - res.getDetail().add(parsePaymentReconciliationDetailsComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("form")) - res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); - if (json.has("total")) - res.setTotal(parseMoney(json.getAsJsonObject("total"))); - if (json.has("processNote")) { - JsonArray array = json.getAsJsonArray("processNote"); - for (int i = 0; i < array.size(); i++) { - res.getProcessNote().add(parsePaymentReconciliationNotesComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected PaymentReconciliation.DetailsComponent parsePaymentReconciliationDetailsComponent(JsonObject json, PaymentReconciliation owner) throws IOException, FHIRFormatError { - PaymentReconciliation.DetailsComponent res = new PaymentReconciliation.DetailsComponent(); - parsePaymentReconciliationDetailsComponentProperties(json, owner, res); - return res; - } - - protected void parsePaymentReconciliationDetailsComponentProperties(JsonObject json, PaymentReconciliation owner, PaymentReconciliation.DetailsComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("response")) - res.setResponse(parseReference(json.getAsJsonObject("response"))); - if (json.has("submitter")) - res.setSubmitter(parseReference(json.getAsJsonObject("submitter"))); - if (json.has("payee")) - res.setPayee(parseReference(json.getAsJsonObject("payee"))); - if (json.has("date")) - res.setDateElement(parseDate(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("amount")) - res.setAmount(parseMoney(json.getAsJsonObject("amount"))); - } - - protected PaymentReconciliation.NotesComponent parsePaymentReconciliationNotesComponent(JsonObject json, PaymentReconciliation owner) throws IOException, FHIRFormatError { - PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent(); - parsePaymentReconciliationNotesComponentProperties(json, owner, res); - return res; - } - - protected void parsePaymentReconciliationNotesComponentProperties(JsonObject json, PaymentReconciliation owner, PaymentReconciliation.NotesComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - } - - protected Person parsePerson(JsonObject json) throws IOException, FHIRFormatError { - Person res = new Person(); - parsePersonProperties(json, res); - return res; - } - - protected void parsePersonProperties(JsonObject json, Person res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("name")) { - JsonArray array = json.getAsJsonArray("name"); - for (int i = 0; i < array.size(); i++) { - res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("gender")) - res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - if (json.has("_gender")) - parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); - if (json.has("birthDate")) - res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); - if (json.has("_birthDate")) - parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); - if (json.has("address")) { - JsonArray array = json.getAsJsonArray("address"); - for (int i = 0; i < array.size(); i++) { - res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); - } - }; - if (json.has("photo")) - res.setPhoto(parseAttachment(json.getAsJsonObject("photo"))); - if (json.has("managingOrganization")) - res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parsePersonPersonLinkComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Person.PersonLinkComponent parsePersonPersonLinkComponent(JsonObject json, Person owner) throws IOException, FHIRFormatError { - Person.PersonLinkComponent res = new Person.PersonLinkComponent(); - parsePersonPersonLinkComponentProperties(json, owner, res); - return res; - } - - protected void parsePersonPersonLinkComponentProperties(JsonObject json, Person owner, Person.PersonLinkComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("target")) - res.setTarget(parseReference(json.getAsJsonObject("target"))); - if (json.has("assurance")) - res.setAssuranceElement(parseEnumeration(json.get("assurance").getAsString(), Person.IdentityAssuranceLevel.NULL, new Person.IdentityAssuranceLevelEnumFactory())); - if (json.has("_assurance")) - parseElementProperties(json.getAsJsonObject("_assurance"), res.getAssuranceElement()); - } - - protected PlanDefinition parsePlanDefinition(JsonObject json) throws IOException, FHIRFormatError { - PlanDefinition res = new PlanDefinition(); - parsePlanDefinitionProperties(json, res); - return res; - } - - protected void parsePlanDefinitionProperties(JsonObject json, PlanDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contributor")) { - JsonArray array = json.getAsJsonArray("contributor"); - for (int i = 0; i < array.size(); i++) { - res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("library")) { - JsonArray array = json.getAsJsonArray("library"); - for (int i = 0; i < array.size(); i++) { - res.getLibrary().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("goal")) { - JsonArray array = json.getAsJsonArray("goal"); - for (int i = 0; i < array.size(); i++) { - res.getGoal().add(parsePlanDefinitionPlanDefinitionGoalComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionPlanDefinitionGoalComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent(); - parsePlanDefinitionPlanDefinitionGoalComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionGoalComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("description")) - res.setDescription(parseCodeableConcept(json.getAsJsonObject("description"))); - if (json.has("priority")) - res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); - if (json.has("start")) - res.setStart(parseCodeableConcept(json.getAsJsonObject("start"))); - if (json.has("addresses")) { - JsonArray array = json.getAsJsonArray("addresses"); - for (int i = 0; i < array.size(); i++) { - res.getAddresses().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("documentation")) { - JsonArray array = json.getAsJsonArray("documentation"); - for (int i = 0; i < array.size(); i++) { - res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("target")) { - JsonArray array = json.getAsJsonArray("target"); - for (int i = 0; i < array.size(); i++) { - res.getTarget().add(parsePlanDefinitionPlanDefinitionGoalTargetComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionPlanDefinitionGoalTargetComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent(); - parsePlanDefinitionPlanDefinitionGoalTargetComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionGoalTargetComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalTargetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("measure")) - res.setMeasure(parseCodeableConcept(json.getAsJsonObject("measure"))); - Type detail = parseType("detail", json); - if (detail != null) - res.setDetail(detail); - if (json.has("due")) - res.setDue(parseDuration(json.getAsJsonObject("due"))); - } - - protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionPlanDefinitionActionComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent(); - parsePlanDefinitionPlanDefinitionActionComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionActionComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("label")) - res.setLabelElement(parseString(json.get("label").getAsString())); - if (json.has("_label")) - parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("textEquivalent")) - res.setTextEquivalentElement(parseString(json.get("textEquivalent").getAsString())); - if (json.has("_textEquivalent")) - parseElementProperties(json.getAsJsonObject("_textEquivalent"), res.getTextEquivalentElement()); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("documentation")) { - JsonArray array = json.getAsJsonArray("documentation"); - for (int i = 0; i < array.size(); i++) { - res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("goalId")) { - JsonArray array = json.getAsJsonArray("goalId"); - for (int i = 0; i < array.size(); i++) { - res.getGoalId().add(parseId(array.get(i).getAsString())); - } - }; - if (json.has("_goalId")) { - JsonArray array = json.getAsJsonArray("_goalId"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getGoalId().size()) - res.getGoalId().add(parseId(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getGoalId().get(i)); - } - }; - if (json.has("triggerDefinition")) { - JsonArray array = json.getAsJsonArray("triggerDefinition"); - for (int i = 0; i < array.size(); i++) { - res.getTriggerDefinition().add(parseTriggerDefinition(array.get(i).getAsJsonObject())); - } - }; - if (json.has("condition")) { - JsonArray array = json.getAsJsonArray("condition"); - for (int i = 0; i < array.size(); i++) { - res.getCondition().add(parsePlanDefinitionPlanDefinitionActionConditionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("input")) { - JsonArray array = json.getAsJsonArray("input"); - for (int i = 0; i < array.size(); i++) { - res.getInput().add(parseDataRequirement(array.get(i).getAsJsonObject())); - } - }; - if (json.has("output")) { - JsonArray array = json.getAsJsonArray("output"); - for (int i = 0; i < array.size(); i++) { - res.getOutput().add(parseDataRequirement(array.get(i).getAsJsonObject())); - } - }; - if (json.has("relatedAction")) { - JsonArray array = json.getAsJsonArray("relatedAction"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedAction().add(parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - Type timing = parseType("timing", json); - if (timing != null) - res.setTiming(timing); - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parsePlanDefinitionPlanDefinitionActionParticipantComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("type")) - res.setType(parseCoding(json.getAsJsonObject("type"))); - if (json.has("groupingBehavior")) - res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(), PlanDefinition.ActionGroupingBehavior.NULL, new PlanDefinition.ActionGroupingBehaviorEnumFactory())); - if (json.has("_groupingBehavior")) - parseElementProperties(json.getAsJsonObject("_groupingBehavior"), res.getGroupingBehaviorElement()); - if (json.has("selectionBehavior")) - res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(), PlanDefinition.ActionSelectionBehavior.NULL, new PlanDefinition.ActionSelectionBehaviorEnumFactory())); - if (json.has("_selectionBehavior")) - parseElementProperties(json.getAsJsonObject("_selectionBehavior"), res.getSelectionBehaviorElement()); - if (json.has("requiredBehavior")) - res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(), PlanDefinition.ActionRequiredBehavior.NULL, new PlanDefinition.ActionRequiredBehaviorEnumFactory())); - if (json.has("_requiredBehavior")) - parseElementProperties(json.getAsJsonObject("_requiredBehavior"), res.getRequiredBehaviorElement()); - if (json.has("precheckBehavior")) - res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(), PlanDefinition.ActionPrecheckBehavior.NULL, new PlanDefinition.ActionPrecheckBehaviorEnumFactory())); - if (json.has("_precheckBehavior")) - parseElementProperties(json.getAsJsonObject("_precheckBehavior"), res.getPrecheckBehaviorElement()); - if (json.has("cardinalityBehavior")) - res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(), PlanDefinition.ActionCardinalityBehavior.NULL, new PlanDefinition.ActionCardinalityBehaviorEnumFactory())); - if (json.has("_cardinalityBehavior")) - parseElementProperties(json.getAsJsonObject("_cardinalityBehavior"), res.getCardinalityBehaviorElement()); - if (json.has("definition")) - res.setDefinition(parseReference(json.getAsJsonObject("definition"))); - if (json.has("transform")) - res.setTransform(parseReference(json.getAsJsonObject("transform"))); - if (json.has("dynamicValue")) { - JsonArray array = json.getAsJsonArray("dynamicValue"); - for (int i = 0; i < array.size(); i++) { - res.getDynamicValue().add(parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionPlanDefinitionActionConditionComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent(); - parsePlanDefinitionPlanDefinitionActionConditionComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionActionConditionComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionConditionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), PlanDefinition.ActionConditionKind.NULL, new PlanDefinition.ActionConditionKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("language")) - res.setLanguageElement(parseString(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - } - - protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent(); - parsePlanDefinitionPlanDefinitionActionRelatedActionComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionActionRelatedActionComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionRelatedActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("actionId")) - res.setActionIdElement(parseId(json.get("actionId").getAsString())); - if (json.has("_actionId")) - parseElementProperties(json.getAsJsonObject("_actionId"), res.getActionIdElement()); - if (json.has("relationship")) - res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), PlanDefinition.ActionRelationshipType.NULL, new PlanDefinition.ActionRelationshipTypeEnumFactory())); - if (json.has("_relationship")) - parseElementProperties(json.getAsJsonObject("_relationship"), res.getRelationshipElement()); - Type offset = parseType("offset", json); - if (offset != null) - res.setOffset(offset); - } - - protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionPlanDefinitionActionParticipantComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent(); - parsePlanDefinitionPlanDefinitionActionParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionActionParticipantComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), PlanDefinition.ActionParticipantType.NULL, new PlanDefinition.ActionParticipantTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - } - - protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent(); - parsePlanDefinitionPlanDefinitionActionDynamicValueComponentProperties(json, owner, res); - return res; - } - - protected void parsePlanDefinitionPlanDefinitionActionDynamicValueComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionDynamicValueComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("language")) - res.setLanguageElement(parseString(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - } - - protected Practitioner parsePractitioner(JsonObject json) throws IOException, FHIRFormatError { - Practitioner res = new Practitioner(); - parsePractitionerProperties(json, res); - return res; - } - - protected void parsePractitionerProperties(JsonObject json, Practitioner res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("name")) { - JsonArray array = json.getAsJsonArray("name"); - for (int i = 0; i < array.size(); i++) { - res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("address")) { - JsonArray array = json.getAsJsonArray("address"); - for (int i = 0; i < array.size(); i++) { - res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); - } - }; - if (json.has("gender")) - res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - if (json.has("_gender")) - parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); - if (json.has("birthDate")) - res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); - if (json.has("_birthDate")) - parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); - if (json.has("photo")) { - JsonArray array = json.getAsJsonArray("photo"); - for (int i = 0; i < array.size(); i++) { - res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - if (json.has("qualification")) { - JsonArray array = json.getAsJsonArray("qualification"); - for (int i = 0; i < array.size(); i++) { - res.getQualification().add(parsePractitionerPractitionerQualificationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("communication")) { - JsonArray array = json.getAsJsonArray("communication"); - for (int i = 0; i < array.size(); i++) { - res.getCommunication().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected Practitioner.PractitionerQualificationComponent parsePractitionerPractitionerQualificationComponent(JsonObject json, Practitioner owner) throws IOException, FHIRFormatError { - Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent(); - parsePractitionerPractitionerQualificationComponentProperties(json, owner, res); - return res; - } - - protected void parsePractitionerPractitionerQualificationComponentProperties(JsonObject json, Practitioner owner, Practitioner.PractitionerQualificationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("issuer")) - res.setIssuer(parseReference(json.getAsJsonObject("issuer"))); - } - - protected PractitionerRole parsePractitionerRole(JsonObject json) throws IOException, FHIRFormatError { - PractitionerRole res = new PractitionerRole(); - parsePractitionerRoleProperties(json, res); - return res; - } - - protected void parsePractitionerRoleProperties(JsonObject json, PractitionerRole res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("practitioner")) - res.setPractitioner(parseReference(json.getAsJsonObject("practitioner"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialty")) { - JsonArray array = json.getAsJsonArray("specialty"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("location")) { - JsonArray array = json.getAsJsonArray("location"); - for (int i = 0; i < array.size(); i++) { - res.getLocation().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("healthcareService")) { - JsonArray array = json.getAsJsonArray("healthcareService"); - for (int i = 0; i < array.size(); i++) { - res.getHealthcareService().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("availableTime")) { - JsonArray array = json.getAsJsonArray("availableTime"); - for (int i = 0; i < array.size(); i++) { - res.getAvailableTime().add(parsePractitionerRolePractitionerRoleAvailableTimeComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("notAvailable")) { - JsonArray array = json.getAsJsonArray("notAvailable"); - for (int i = 0; i < array.size(); i++) { - res.getNotAvailable().add(parsePractitionerRolePractitionerRoleNotAvailableComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("availabilityExceptions")) - res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString())); - if (json.has("_availabilityExceptions")) - parseElementProperties(json.getAsJsonObject("_availabilityExceptions"), res.getAvailabilityExceptionsElement()); - if (json.has("endpoint")) { - JsonArray array = json.getAsJsonArray("endpoint"); - for (int i = 0; i < array.size(); i++) { - res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected PractitionerRole.PractitionerRoleAvailableTimeComponent parsePractitionerRolePractitionerRoleAvailableTimeComponent(JsonObject json, PractitionerRole owner) throws IOException, FHIRFormatError { - PractitionerRole.PractitionerRoleAvailableTimeComponent res = new PractitionerRole.PractitionerRoleAvailableTimeComponent(); - parsePractitionerRolePractitionerRoleAvailableTimeComponentProperties(json, owner, res); - return res; - } - - protected void parsePractitionerRolePractitionerRoleAvailableTimeComponentProperties(JsonObject json, PractitionerRole owner, PractitionerRole.PractitionerRoleAvailableTimeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("daysOfWeek")) { - JsonArray array = json.getAsJsonArray("daysOfWeek"); - for (int i = 0; i < array.size(); i++) { - res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); - } - }; - if (json.has("_daysOfWeek")) { - JsonArray array = json.getAsJsonArray("_daysOfWeek"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getDaysOfWeek().size()) - res.getDaysOfWeek().add(parseEnumeration(null, PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getDaysOfWeek().get(i)); - } - }; - if (json.has("allDay")) - res.setAllDayElement(parseBoolean(json.get("allDay").getAsBoolean())); - if (json.has("_allDay")) - parseElementProperties(json.getAsJsonObject("_allDay"), res.getAllDayElement()); - if (json.has("availableStartTime")) - res.setAvailableStartTimeElement(parseTime(json.get("availableStartTime").getAsString())); - if (json.has("_availableStartTime")) - parseElementProperties(json.getAsJsonObject("_availableStartTime"), res.getAvailableStartTimeElement()); - if (json.has("availableEndTime")) - res.setAvailableEndTimeElement(parseTime(json.get("availableEndTime").getAsString())); - if (json.has("_availableEndTime")) - parseElementProperties(json.getAsJsonObject("_availableEndTime"), res.getAvailableEndTimeElement()); - } - - protected PractitionerRole.PractitionerRoleNotAvailableComponent parsePractitionerRolePractitionerRoleNotAvailableComponent(JsonObject json, PractitionerRole owner) throws IOException, FHIRFormatError { - PractitionerRole.PractitionerRoleNotAvailableComponent res = new PractitionerRole.PractitionerRoleNotAvailableComponent(); - parsePractitionerRolePractitionerRoleNotAvailableComponentProperties(json, owner, res); - return res; - } - - protected void parsePractitionerRolePractitionerRoleNotAvailableComponentProperties(JsonObject json, PractitionerRole owner, PractitionerRole.PractitionerRoleNotAvailableComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("during")) - res.setDuring(parsePeriod(json.getAsJsonObject("during"))); - } - - protected Procedure parseProcedure(JsonObject json) throws IOException, FHIRFormatError { - Procedure res = new Procedure(); - parseProcedureProperties(json, res); - return res; - } - - protected void parseProcedureProperties(JsonObject json, Procedure res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Procedure.ProcedureStatus.NULL, new Procedure.ProcedureStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("notDone")) - res.setNotDoneElement(parseBoolean(json.get("notDone").getAsBoolean())); - if (json.has("_notDone")) - parseElementProperties(json.getAsJsonObject("_notDone"), res.getNotDoneElement()); - if (json.has("notDoneReason")) - res.setNotDoneReason(parseCodeableConcept(json.getAsJsonObject("notDoneReason"))); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type performed = parseType("performed", json); - if (performed != null) - res.setPerformed(performed); - if (json.has("performer")) { - JsonArray array = json.getAsJsonArray("performer"); - for (int i = 0; i < array.size(); i++) { - res.getPerformer().add(parseProcedureProcedurePerformerComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) { - JsonArray array = json.getAsJsonArray("bodySite"); - for (int i = 0; i < array.size(); i++) { - res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("report")) { - JsonArray array = json.getAsJsonArray("report"); - for (int i = 0; i < array.size(); i++) { - res.getReport().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("complication")) { - JsonArray array = json.getAsJsonArray("complication"); - for (int i = 0; i < array.size(); i++) { - res.getComplication().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("complicationDetail")) { - JsonArray array = json.getAsJsonArray("complicationDetail"); - for (int i = 0; i < array.size(); i++) { - res.getComplicationDetail().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("followUp")) { - JsonArray array = json.getAsJsonArray("followUp"); - for (int i = 0; i < array.size(); i++) { - res.getFollowUp().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("focalDevice")) { - JsonArray array = json.getAsJsonArray("focalDevice"); - for (int i = 0; i < array.size(); i++) { - res.getFocalDevice().add(parseProcedureProcedureFocalDeviceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("usedReference")) { - JsonArray array = json.getAsJsonArray("usedReference"); - for (int i = 0; i < array.size(); i++) { - res.getUsedReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("usedCode")) { - JsonArray array = json.getAsJsonArray("usedCode"); - for (int i = 0; i < array.size(); i++) { - res.getUsedCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - } - - protected Procedure.ProcedurePerformerComponent parseProcedureProcedurePerformerComponent(JsonObject json, Procedure owner) throws IOException, FHIRFormatError { - Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent(); - parseProcedureProcedurePerformerComponentProperties(json, owner, res); - return res; - } - - protected void parseProcedureProcedurePerformerComponentProperties(JsonObject json, Procedure owner, Procedure.ProcedurePerformerComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) - res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); - if (json.has("actor")) - res.setActor(parseReference(json.getAsJsonObject("actor"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected Procedure.ProcedureFocalDeviceComponent parseProcedureProcedureFocalDeviceComponent(JsonObject json, Procedure owner) throws IOException, FHIRFormatError { - Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent(); - parseProcedureProcedureFocalDeviceComponentProperties(json, owner, res); - return res; - } - - protected void parseProcedureProcedureFocalDeviceComponentProperties(JsonObject json, Procedure owner, Procedure.ProcedureFocalDeviceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("action")) - res.setAction(parseCodeableConcept(json.getAsJsonObject("action"))); - if (json.has("manipulated")) - res.setManipulated(parseReference(json.getAsJsonObject("manipulated"))); - } - - protected ProcedureRequest parseProcedureRequest(JsonObject json) throws IOException, FHIRFormatError { - ProcedureRequest res = new ProcedureRequest(); - parseProcedureRequestProperties(json, res); - return res; - } - - protected void parseProcedureRequestProperties(JsonObject json, ProcedureRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("replaces")) { - JsonArray array = json.getAsJsonArray("replaces"); - for (int i = 0; i < array.size(); i++) { - res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("requisition")) - res.setRequisition(parseIdentifier(json.getAsJsonObject("requisition"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ProcedureRequest.ProcedureRequestStatus.NULL, new ProcedureRequest.ProcedureRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("intent")) - res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), ProcedureRequest.ProcedureRequestIntent.NULL, new ProcedureRequest.ProcedureRequestIntentEnumFactory())); - if (json.has("_intent")) - parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), ProcedureRequest.ProcedureRequestPriority.NULL, new ProcedureRequest.ProcedureRequestPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("doNotPerform")) - res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean())); - if (json.has("_doNotPerform")) - parseElementProperties(json.getAsJsonObject("_doNotPerform"), res.getDoNotPerformElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - Type asNeeded = parseType("asNeeded", json); - if (asNeeded != null) - res.setAsNeeded(asNeeded); - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("requester")) - res.setRequester(parseProcedureRequestProcedureRequestRequesterComponent(json.getAsJsonObject("requester"), res)); - if (json.has("performerType")) - res.setPerformerType(parseCodeableConcept(json.getAsJsonObject("performerType"))); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - if (json.has("reasonCode")) { - JsonArray array = json.getAsJsonArray("reasonCode"); - for (int i = 0; i < array.size(); i++) { - res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonReference")) { - JsonArray array = json.getAsJsonArray("reasonReference"); - for (int i = 0; i < array.size(); i++) { - res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("supportingInfo")) { - JsonArray array = json.getAsJsonArray("supportingInfo"); - for (int i = 0; i < array.size(); i++) { - res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specimen")) { - JsonArray array = json.getAsJsonArray("specimen"); - for (int i = 0; i < array.size(); i++) { - res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("bodySite")) { - JsonArray array = json.getAsJsonArray("bodySite"); - for (int i = 0; i < array.size(); i++) { - res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("relevantHistory")) { - JsonArray array = json.getAsJsonArray("relevantHistory"); - for (int i = 0; i < array.size(); i++) { - res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected ProcedureRequest.ProcedureRequestRequesterComponent parseProcedureRequestProcedureRequestRequesterComponent(JsonObject json, ProcedureRequest owner) throws IOException, FHIRFormatError { - ProcedureRequest.ProcedureRequestRequesterComponent res = new ProcedureRequest.ProcedureRequestRequesterComponent(); - parseProcedureRequestProcedureRequestRequesterComponentProperties(json, owner, res); - return res; - } - - protected void parseProcedureRequestProcedureRequestRequesterComponentProperties(JsonObject json, ProcedureRequest owner, ProcedureRequest.ProcedureRequestRequesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("agent")) - res.setAgent(parseReference(json.getAsJsonObject("agent"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected ProcessRequest parseProcessRequest(JsonObject json) throws IOException, FHIRFormatError { - ProcessRequest res = new ProcessRequest(); - parseProcessRequestProperties(json, res); - return res; - } - - protected void parseProcessRequestProperties(JsonObject json, ProcessRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ProcessRequest.ProcessRequestStatus.NULL, new ProcessRequest.ProcessRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("action")) - res.setActionElement(parseEnumeration(json.get("action").getAsString(), ProcessRequest.ActionList.NULL, new ProcessRequest.ActionListEnumFactory())); - if (json.has("_action")) - parseElementProperties(json.getAsJsonObject("_action"), res.getActionElement()); - if (json.has("target")) - res.setTarget(parseReference(json.getAsJsonObject("target"))); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("provider")) - res.setProvider(parseReference(json.getAsJsonObject("provider"))); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("response")) - res.setResponse(parseReference(json.getAsJsonObject("response"))); - if (json.has("nullify")) - res.setNullifyElement(parseBoolean(json.get("nullify").getAsBoolean())); - if (json.has("_nullify")) - parseElementProperties(json.getAsJsonObject("_nullify"), res.getNullifyElement()); - if (json.has("reference")) - res.setReferenceElement(parseString(json.get("reference").getAsString())); - if (json.has("_reference")) - parseElementProperties(json.getAsJsonObject("_reference"), res.getReferenceElement()); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseProcessRequestItemsComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("include")) { - JsonArray array = json.getAsJsonArray("include"); - for (int i = 0; i < array.size(); i++) { - res.getInclude().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_include")) { - JsonArray array = json.getAsJsonArray("_include"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getInclude().size()) - res.getInclude().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getInclude().get(i)); - } - }; - if (json.has("exclude")) { - JsonArray array = json.getAsJsonArray("exclude"); - for (int i = 0; i < array.size(); i++) { - res.getExclude().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_exclude")) { - JsonArray array = json.getAsJsonArray("_exclude"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getExclude().size()) - res.getExclude().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getExclude().get(i)); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected ProcessRequest.ItemsComponent parseProcessRequestItemsComponent(JsonObject json, ProcessRequest owner) throws IOException, FHIRFormatError { - ProcessRequest.ItemsComponent res = new ProcessRequest.ItemsComponent(); - parseProcessRequestItemsComponentProperties(json, owner, res); - return res; - } - - protected void parseProcessRequestItemsComponentProperties(JsonObject json, ProcessRequest owner, ProcessRequest.ItemsComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("sequenceLinkId")) - res.setSequenceLinkIdElement(parseInteger(json.get("sequenceLinkId").getAsLong())); - if (json.has("_sequenceLinkId")) - parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); - } - - protected ProcessResponse parseProcessResponse(JsonObject json) throws IOException, FHIRFormatError { - ProcessResponse res = new ProcessResponse(); - parseProcessResponseProperties(json, res); - return res; - } - - protected void parseProcessResponseProperties(JsonObject json, ProcessResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ProcessResponse.ProcessResponseStatus.NULL, new ProcessResponse.ProcessResponseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("created")) - res.setCreatedElement(parseDateTime(json.get("created").getAsString())); - if (json.has("_created")) - parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); - if (json.has("organization")) - res.setOrganization(parseReference(json.getAsJsonObject("organization"))); - if (json.has("request")) - res.setRequest(parseReference(json.getAsJsonObject("request"))); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - if (json.has("disposition")) - res.setDispositionElement(parseString(json.get("disposition").getAsString())); - if (json.has("_disposition")) - parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); - if (json.has("requestProvider")) - res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); - if (json.has("requestOrganization")) - res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); - if (json.has("form")) - res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); - if (json.has("processNote")) { - JsonArray array = json.getAsJsonArray("processNote"); - for (int i = 0; i < array.size(); i++) { - res.getProcessNote().add(parseProcessResponseProcessResponseProcessNoteComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("error")) { - JsonArray array = json.getAsJsonArray("error"); - for (int i = 0; i < array.size(); i++) { - res.getError().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("communicationRequest")) { - JsonArray array = json.getAsJsonArray("communicationRequest"); - for (int i = 0; i < array.size(); i++) { - res.getCommunicationRequest().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected ProcessResponse.ProcessResponseProcessNoteComponent parseProcessResponseProcessResponseProcessNoteComponent(JsonObject json, ProcessResponse owner) throws IOException, FHIRFormatError { - ProcessResponse.ProcessResponseProcessNoteComponent res = new ProcessResponse.ProcessResponseProcessNoteComponent(); - parseProcessResponseProcessResponseProcessNoteComponentProperties(json, owner, res); - return res; - } - - protected void parseProcessResponseProcessResponseProcessNoteComponentProperties(JsonObject json, ProcessResponse owner, ProcessResponse.ProcessResponseProcessNoteComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - } - - protected Provenance parseProvenance(JsonObject json) throws IOException, FHIRFormatError { - Provenance res = new Provenance(); - parseProvenanceProperties(json, res); - return res; - } - - protected void parseProvenanceProperties(JsonObject json, Provenance res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("target")) { - JsonArray array = json.getAsJsonArray("target"); - for (int i = 0; i < array.size(); i++) { - res.getTarget().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("recorded")) - res.setRecordedElement(parseInstant(json.get("recorded").getAsString())); - if (json.has("_recorded")) - parseElementProperties(json.getAsJsonObject("_recorded"), res.getRecordedElement()); - if (json.has("policy")) { - JsonArray array = json.getAsJsonArray("policy"); - for (int i = 0; i < array.size(); i++) { - res.getPolicy().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_policy")) { - JsonArray array = json.getAsJsonArray("_policy"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getPolicy().size()) - res.getPolicy().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getPolicy().get(i)); - } - }; - if (json.has("location")) - res.setLocation(parseReference(json.getAsJsonObject("location"))); - if (json.has("reason")) { - JsonArray array = json.getAsJsonArray("reason"); - for (int i = 0; i < array.size(); i++) { - res.getReason().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("activity")) - res.setActivity(parseCoding(json.getAsJsonObject("activity"))); - if (json.has("agent")) { - JsonArray array = json.getAsJsonArray("agent"); - for (int i = 0; i < array.size(); i++) { - res.getAgent().add(parseProvenanceProvenanceAgentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("entity")) { - JsonArray array = json.getAsJsonArray("entity"); - for (int i = 0; i < array.size(); i++) { - res.getEntity().add(parseProvenanceProvenanceEntityComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("signature")) { - JsonArray array = json.getAsJsonArray("signature"); - for (int i = 0; i < array.size(); i++) { - res.getSignature().add(parseSignature(array.get(i).getAsJsonObject())); - } - }; - } - - protected Provenance.ProvenanceAgentComponent parseProvenanceProvenanceAgentComponent(JsonObject json, Provenance owner) throws IOException, FHIRFormatError { - Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent(); - parseProvenanceProvenanceAgentComponentProperties(json, owner, res); - return res; - } - - protected void parseProvenanceProvenanceAgentComponentProperties(JsonObject json, Provenance owner, Provenance.ProvenanceAgentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) { - JsonArray array = json.getAsJsonArray("role"); - for (int i = 0; i < array.size(); i++) { - res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - Type who = parseType("who", json); - if (who != null) - res.setWho(who); - Type onBehalfOf = parseType("onBehalfOf", json); - if (onBehalfOf != null) - res.setOnBehalfOf(onBehalfOf); - if (json.has("relatedAgentType")) - res.setRelatedAgentType(parseCodeableConcept(json.getAsJsonObject("relatedAgentType"))); - } - - protected Provenance.ProvenanceEntityComponent parseProvenanceProvenanceEntityComponent(JsonObject json, Provenance owner) throws IOException, FHIRFormatError { - Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent(); - parseProvenanceProvenanceEntityComponentProperties(json, owner, res); - return res; - } - - protected void parseProvenanceProvenanceEntityComponentProperties(JsonObject json, Provenance owner, Provenance.ProvenanceEntityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("role")) - res.setRoleElement(parseEnumeration(json.get("role").getAsString(), Provenance.ProvenanceEntityRole.NULL, new Provenance.ProvenanceEntityRoleEnumFactory())); - if (json.has("_role")) - parseElementProperties(json.getAsJsonObject("_role"), res.getRoleElement()); - Type what = parseType("what", json); - if (what != null) - res.setWhat(what); - if (json.has("agent")) { - JsonArray array = json.getAsJsonArray("agent"); - for (int i = 0; i < array.size(); i++) { - res.getAgent().add(parseProvenanceProvenanceAgentComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Questionnaire parseQuestionnaire(JsonObject json) throws IOException, FHIRFormatError { - Questionnaire res = new Questionnaire(); - parseQuestionnaireProperties(json, res); - return res; - } - - protected void parseQuestionnaireProperties(JsonObject json, Questionnaire res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("subjectType")) { - JsonArray array = json.getAsJsonArray("subjectType"); - for (int i = 0; i < array.size(); i++) { - res.getSubjectType().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_subjectType")) { - JsonArray array = json.getAsJsonArray("_subjectType"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getSubjectType().size()) - res.getSubjectType().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getSubjectType().get(i)); - } - }; - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireQuestionnaireItemComponent(JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError { - Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent(); - parseQuestionnaireQuestionnaireItemComponentProperties(json, owner, res); - return res; - } - - protected void parseQuestionnaireQuestionnaireItemComponentProperties(JsonObject json, Questionnaire owner, Questionnaire.QuestionnaireItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("linkId")) - res.setLinkIdElement(parseString(json.get("linkId").getAsString())); - if (json.has("_linkId")) - parseElementProperties(json.getAsJsonObject("_linkId"), res.getLinkIdElement()); - if (json.has("definition")) - res.setDefinitionElement(parseUri(json.get("definition").getAsString())); - if (json.has("_definition")) - parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("prefix")) - res.setPrefixElement(parseString(json.get("prefix").getAsString())); - if (json.has("_prefix")) - parseElementProperties(json.getAsJsonObject("_prefix"), res.getPrefixElement()); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Questionnaire.QuestionnaireItemType.NULL, new Questionnaire.QuestionnaireItemTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("enableWhen")) { - JsonArray array = json.getAsJsonArray("enableWhen"); - for (int i = 0; i < array.size(); i++) { - res.getEnableWhen().add(parseQuestionnaireQuestionnaireItemEnableWhenComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("required")) - res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean())); - if (json.has("_required")) - parseElementProperties(json.getAsJsonObject("_required"), res.getRequiredElement()); - if (json.has("repeats")) - res.setRepeatsElement(parseBoolean(json.get("repeats").getAsBoolean())); - if (json.has("_repeats")) - parseElementProperties(json.getAsJsonObject("_repeats"), res.getRepeatsElement()); - if (json.has("readOnly")) - res.setReadOnlyElement(parseBoolean(json.get("readOnly").getAsBoolean())); - if (json.has("_readOnly")) - parseElementProperties(json.getAsJsonObject("_readOnly"), res.getReadOnlyElement()); - if (json.has("maxLength")) - res.setMaxLengthElement(parseInteger(json.get("maxLength").getAsLong())); - if (json.has("_maxLength")) - parseElementProperties(json.getAsJsonObject("_maxLength"), res.getMaxLengthElement()); - if (json.has("options")) - res.setOptions(parseReference(json.getAsJsonObject("options"))); - if (json.has("option")) { - JsonArray array = json.getAsJsonArray("option"); - for (int i = 0; i < array.size(); i++) { - res.getOption().add(parseQuestionnaireQuestionnaireItemOptionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - Type initial = parseType("initial", json); - if (initial != null) - res.setInitial(initial); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireQuestionnaireItemEnableWhenComponent(JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError { - Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent(); - parseQuestionnaireQuestionnaireItemEnableWhenComponentProperties(json, owner, res); - return res; - } - - protected void parseQuestionnaireQuestionnaireItemEnableWhenComponentProperties(JsonObject json, Questionnaire owner, Questionnaire.QuestionnaireItemEnableWhenComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("question")) - res.setQuestionElement(parseString(json.get("question").getAsString())); - if (json.has("_question")) - parseElementProperties(json.getAsJsonObject("_question"), res.getQuestionElement()); - if (json.has("hasAnswer")) - res.setHasAnswerElement(parseBoolean(json.get("hasAnswer").getAsBoolean())); - if (json.has("_hasAnswer")) - parseElementProperties(json.getAsJsonObject("_hasAnswer"), res.getHasAnswerElement()); - Type answer = parseType("answer", json); - if (answer != null) - res.setAnswer(answer); - } - - protected Questionnaire.QuestionnaireItemOptionComponent parseQuestionnaireQuestionnaireItemOptionComponent(JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError { - Questionnaire.QuestionnaireItemOptionComponent res = new Questionnaire.QuestionnaireItemOptionComponent(); - parseQuestionnaireQuestionnaireItemOptionComponentProperties(json, owner, res); - return res; - } - - protected void parseQuestionnaireQuestionnaireItemOptionComponentProperties(JsonObject json, Questionnaire owner, Questionnaire.QuestionnaireItemOptionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected QuestionnaireResponse parseQuestionnaireResponse(JsonObject json) throws IOException, FHIRFormatError { - QuestionnaireResponse res = new QuestionnaireResponse(); - parseQuestionnaireResponseProperties(json, res); - return res; - } - - protected void parseQuestionnaireResponseProperties(JsonObject json, QuestionnaireResponse res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("parent")) { - JsonArray array = json.getAsJsonArray("parent"); - for (int i = 0; i < array.size(); i++) { - res.getParent().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("questionnaire")) - res.setQuestionnaire(parseReference(json.getAsJsonObject("questionnaire"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), QuestionnaireResponse.QuestionnaireResponseStatus.NULL, new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("authored")) - res.setAuthoredElement(parseDateTime(json.get("authored").getAsString())); - if (json.has("_authored")) - parseElementProperties(json.getAsJsonObject("_authored"), res.getAuthoredElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - if (json.has("source")) - res.setSource(parseReference(json.getAsJsonObject("source"))); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseQuestionnaireResponseItemComponent(JsonObject json, QuestionnaireResponse owner) throws IOException, FHIRFormatError { - QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent(); - parseQuestionnaireResponseQuestionnaireResponseItemComponentProperties(json, owner, res); - return res; - } - - protected void parseQuestionnaireResponseQuestionnaireResponseItemComponentProperties(JsonObject json, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("linkId")) - res.setLinkIdElement(parseString(json.get("linkId").getAsString())); - if (json.has("_linkId")) - parseElementProperties(json.getAsJsonObject("_linkId"), res.getLinkIdElement()); - if (json.has("definition")) - res.setDefinitionElement(parseUri(json.get("definition").getAsString())); - if (json.has("_definition")) - parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); - if (json.has("text")) - res.setTextElement(parseString(json.get("text").getAsString())); - if (json.has("_text")) - parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("answer")) { - JsonArray array = json.getAsJsonArray("answer"); - for (int i = 0; i < array.size(); i++) { - res.getAnswer().add(parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(JsonObject json, QuestionnaireResponse owner) throws IOException, FHIRFormatError { - QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); - parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentProperties(json, owner, res); - return res; - } - - protected void parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentProperties(JsonObject json, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - if (json.has("item")) { - JsonArray array = json.getAsJsonArray("item"); - for (int i = 0; i < array.size(); i++) { - res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected RelatedPerson parseRelatedPerson(JsonObject json) throws IOException, FHIRFormatError { - RelatedPerson res = new RelatedPerson(); - parseRelatedPersonProperties(json, res); - return res; - } - - protected void parseRelatedPersonProperties(JsonObject json, RelatedPerson res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("relationship")) - res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); - if (json.has("name")) { - JsonArray array = json.getAsJsonArray("name"); - for (int i = 0; i < array.size(); i++) { - res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); - } - }; - if (json.has("telecom")) { - JsonArray array = json.getAsJsonArray("telecom"); - for (int i = 0; i < array.size(); i++) { - res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("gender")) - res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - if (json.has("_gender")) - parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); - if (json.has("birthDate")) - res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); - if (json.has("_birthDate")) - parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); - if (json.has("address")) { - JsonArray array = json.getAsJsonArray("address"); - for (int i = 0; i < array.size(); i++) { - res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); - } - }; - if (json.has("photo")) { - JsonArray array = json.getAsJsonArray("photo"); - for (int i = 0; i < array.size(); i++) { - res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - } - - protected RequestGroup parseRequestGroup(JsonObject json) throws IOException, FHIRFormatError { - RequestGroup res = new RequestGroup(); - parseRequestGroupProperties(json, res); - return res; - } - - protected void parseRequestGroupProperties(JsonObject json, RequestGroup res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("definition")) { - JsonArray array = json.getAsJsonArray("definition"); - for (int i = 0; i < array.size(); i++) { - res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("replaces")) { - JsonArray array = json.getAsJsonArray("replaces"); - for (int i = 0; i < array.size(); i++) { - res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("groupIdentifier")) - res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), RequestGroup.RequestStatus.NULL, new RequestGroup.RequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("intent")) - res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), RequestGroup.RequestIntent.NULL, new RequestGroup.RequestIntentEnumFactory())); - if (json.has("_intent")) - parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), RequestGroup.RequestPriority.NULL, new RequestGroup.RequestPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("author")) - res.setAuthor(parseReference(json.getAsJsonObject("author"))); - Type reason = parseType("reason", json); - if (reason != null) - res.setReason(reason); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseRequestGroupRequestGroupActionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected RequestGroup.RequestGroupActionComponent parseRequestGroupRequestGroupActionComponent(JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError { - RequestGroup.RequestGroupActionComponent res = new RequestGroup.RequestGroupActionComponent(); - parseRequestGroupRequestGroupActionComponentProperties(json, owner, res); - return res; - } - - protected void parseRequestGroupRequestGroupActionComponentProperties(JsonObject json, RequestGroup owner, RequestGroup.RequestGroupActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("label")) - res.setLabelElement(parseString(json.get("label").getAsString())); - if (json.has("_label")) - parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("textEquivalent")) - res.setTextEquivalentElement(parseString(json.get("textEquivalent").getAsString())); - if (json.has("_textEquivalent")) - parseElementProperties(json.getAsJsonObject("_textEquivalent"), res.getTextEquivalentElement()); - if (json.has("code")) { - JsonArray array = json.getAsJsonArray("code"); - for (int i = 0; i < array.size(); i++) { - res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("documentation")) { - JsonArray array = json.getAsJsonArray("documentation"); - for (int i = 0; i < array.size(); i++) { - res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("condition")) { - JsonArray array = json.getAsJsonArray("condition"); - for (int i = 0; i < array.size(); i++) { - res.getCondition().add(parseRequestGroupRequestGroupActionConditionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("relatedAction")) { - JsonArray array = json.getAsJsonArray("relatedAction"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedAction().add(parseRequestGroupRequestGroupActionRelatedActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - Type timing = parseType("timing", json); - if (timing != null) - res.setTiming(timing); - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("type")) - res.setType(parseCoding(json.getAsJsonObject("type"))); - if (json.has("groupingBehavior")) - res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(), RequestGroup.ActionGroupingBehavior.NULL, new RequestGroup.ActionGroupingBehaviorEnumFactory())); - if (json.has("_groupingBehavior")) - parseElementProperties(json.getAsJsonObject("_groupingBehavior"), res.getGroupingBehaviorElement()); - if (json.has("selectionBehavior")) - res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(), RequestGroup.ActionSelectionBehavior.NULL, new RequestGroup.ActionSelectionBehaviorEnumFactory())); - if (json.has("_selectionBehavior")) - parseElementProperties(json.getAsJsonObject("_selectionBehavior"), res.getSelectionBehaviorElement()); - if (json.has("requiredBehavior")) - res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(), RequestGroup.ActionRequiredBehavior.NULL, new RequestGroup.ActionRequiredBehaviorEnumFactory())); - if (json.has("_requiredBehavior")) - parseElementProperties(json.getAsJsonObject("_requiredBehavior"), res.getRequiredBehaviorElement()); - if (json.has("precheckBehavior")) - res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(), RequestGroup.ActionPrecheckBehavior.NULL, new RequestGroup.ActionPrecheckBehaviorEnumFactory())); - if (json.has("_precheckBehavior")) - parseElementProperties(json.getAsJsonObject("_precheckBehavior"), res.getPrecheckBehaviorElement()); - if (json.has("cardinalityBehavior")) - res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(), RequestGroup.ActionCardinalityBehavior.NULL, new RequestGroup.ActionCardinalityBehaviorEnumFactory())); - if (json.has("_cardinalityBehavior")) - parseElementProperties(json.getAsJsonObject("_cardinalityBehavior"), res.getCardinalityBehaviorElement()); - if (json.has("resource")) - res.setResource(parseReference(json.getAsJsonObject("resource"))); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseRequestGroupRequestGroupActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected RequestGroup.RequestGroupActionConditionComponent parseRequestGroupRequestGroupActionConditionComponent(JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError { - RequestGroup.RequestGroupActionConditionComponent res = new RequestGroup.RequestGroupActionConditionComponent(); - parseRequestGroupRequestGroupActionConditionComponentProperties(json, owner, res); - return res; - } - - protected void parseRequestGroupRequestGroupActionConditionComponentProperties(JsonObject json, RequestGroup owner, RequestGroup.RequestGroupActionConditionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), RequestGroup.ActionConditionKind.NULL, new RequestGroup.ActionConditionKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("language")) - res.setLanguageElement(parseString(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - } - - protected RequestGroup.RequestGroupActionRelatedActionComponent parseRequestGroupRequestGroupActionRelatedActionComponent(JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError { - RequestGroup.RequestGroupActionRelatedActionComponent res = new RequestGroup.RequestGroupActionRelatedActionComponent(); - parseRequestGroupRequestGroupActionRelatedActionComponentProperties(json, owner, res); - return res; - } - - protected void parseRequestGroupRequestGroupActionRelatedActionComponentProperties(JsonObject json, RequestGroup owner, RequestGroup.RequestGroupActionRelatedActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("actionId")) - res.setActionIdElement(parseId(json.get("actionId").getAsString())); - if (json.has("_actionId")) - parseElementProperties(json.getAsJsonObject("_actionId"), res.getActionIdElement()); - if (json.has("relationship")) - res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), RequestGroup.ActionRelationshipType.NULL, new RequestGroup.ActionRelationshipTypeEnumFactory())); - if (json.has("_relationship")) - parseElementProperties(json.getAsJsonObject("_relationship"), res.getRelationshipElement()); - Type offset = parseType("offset", json); - if (offset != null) - res.setOffset(offset); - } - - protected ResearchStudy parseResearchStudy(JsonObject json) throws IOException, FHIRFormatError { - ResearchStudy res = new ResearchStudy(); - parseResearchStudyProperties(json, res); - return res; - } - - protected void parseResearchStudyProperties(JsonObject json, ResearchStudy res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("protocol")) { - JsonArray array = json.getAsJsonArray("protocol"); - for (int i = 0; i < array.size(); i++) { - res.getProtocol().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ResearchStudy.ResearchStudyStatus.NULL, new ResearchStudy.ResearchStudyStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("focus")) { - JsonArray array = json.getAsJsonArray("focus"); - for (int i = 0; i < array.size(); i++) { - res.getFocus().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("keyword")) { - JsonArray array = json.getAsJsonArray("keyword"); - for (int i = 0; i < array.size(); i++) { - res.getKeyword().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("enrollment")) { - JsonArray array = json.getAsJsonArray("enrollment"); - for (int i = 0; i < array.size(); i++) { - res.getEnrollment().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("sponsor")) - res.setSponsor(parseReference(json.getAsJsonObject("sponsor"))); - if (json.has("principalInvestigator")) - res.setPrincipalInvestigator(parseReference(json.getAsJsonObject("principalInvestigator"))); - if (json.has("site")) { - JsonArray array = json.getAsJsonArray("site"); - for (int i = 0; i < array.size(); i++) { - res.getSite().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("reasonStopped")) - res.setReasonStopped(parseCodeableConcept(json.getAsJsonObject("reasonStopped"))); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("arm")) { - JsonArray array = json.getAsJsonArray("arm"); - for (int i = 0; i < array.size(); i++) { - res.getArm().add(parseResearchStudyResearchStudyArmComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected ResearchStudy.ResearchStudyArmComponent parseResearchStudyResearchStudyArmComponent(JsonObject json, ResearchStudy owner) throws IOException, FHIRFormatError { - ResearchStudy.ResearchStudyArmComponent res = new ResearchStudy.ResearchStudyArmComponent(); - parseResearchStudyResearchStudyArmComponentProperties(json, owner, res); - return res; - } - - protected void parseResearchStudyResearchStudyArmComponentProperties(JsonObject json, ResearchStudy owner, ResearchStudy.ResearchStudyArmComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - } - - protected ResearchSubject parseResearchSubject(JsonObject json) throws IOException, FHIRFormatError { - ResearchSubject res = new ResearchSubject(); - parseResearchSubjectProperties(json, res); - return res; - } - - protected void parseResearchSubjectProperties(JsonObject json, ResearchSubject res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ResearchSubject.ResearchSubjectStatus.NULL, new ResearchSubject.ResearchSubjectStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("study")) - res.setStudy(parseReference(json.getAsJsonObject("study"))); - if (json.has("individual")) - res.setIndividual(parseReference(json.getAsJsonObject("individual"))); - if (json.has("assignedArm")) - res.setAssignedArmElement(parseString(json.get("assignedArm").getAsString())); - if (json.has("_assignedArm")) - parseElementProperties(json.getAsJsonObject("_assignedArm"), res.getAssignedArmElement()); - if (json.has("actualArm")) - res.setActualArmElement(parseString(json.get("actualArm").getAsString())); - if (json.has("_actualArm")) - parseElementProperties(json.getAsJsonObject("_actualArm"), res.getActualArmElement()); - if (json.has("consent")) - res.setConsent(parseReference(json.getAsJsonObject("consent"))); - } - - protected RiskAssessment parseRiskAssessment(JsonObject json) throws IOException, FHIRFormatError { - RiskAssessment res = new RiskAssessment(); - parseRiskAssessmentProperties(json, res); - return res; - } - - protected void parseRiskAssessmentProperties(JsonObject json, RiskAssessment res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("basedOn")) - res.setBasedOn(parseReference(json.getAsJsonObject("basedOn"))); - if (json.has("parent")) - res.setParent(parseReference(json.getAsJsonObject("parent"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), RiskAssessment.RiskAssessmentStatus.NULL, new RiskAssessment.RiskAssessmentStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("condition")) - res.setCondition(parseReference(json.getAsJsonObject("condition"))); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - Type reason = parseType("reason", json); - if (reason != null) - res.setReason(reason); - if (json.has("basis")) { - JsonArray array = json.getAsJsonArray("basis"); - for (int i = 0; i < array.size(); i++) { - res.getBasis().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("prediction")) { - JsonArray array = json.getAsJsonArray("prediction"); - for (int i = 0; i < array.size(); i++) { - res.getPrediction().add(parseRiskAssessmentRiskAssessmentPredictionComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("mitigation")) - res.setMitigationElement(parseString(json.get("mitigation").getAsString())); - if (json.has("_mitigation")) - parseElementProperties(json.getAsJsonObject("_mitigation"), res.getMitigationElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentRiskAssessmentPredictionComponent(JsonObject json, RiskAssessment owner) throws IOException, FHIRFormatError { - RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent(); - parseRiskAssessmentRiskAssessmentPredictionComponentProperties(json, owner, res); - return res; - } - - protected void parseRiskAssessmentRiskAssessmentPredictionComponentProperties(JsonObject json, RiskAssessment owner, RiskAssessment.RiskAssessmentPredictionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("outcome")) - res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); - Type probability = parseType("probability", json); - if (probability != null) - res.setProbability(probability); - if (json.has("qualitativeRisk")) - res.setQualitativeRisk(parseCodeableConcept(json.getAsJsonObject("qualitativeRisk"))); - if (json.has("relativeRisk")) - res.setRelativeRiskElement(parseDecimal(json.get("relativeRisk").getAsBigDecimal())); - if (json.has("_relativeRisk")) - parseElementProperties(json.getAsJsonObject("_relativeRisk"), res.getRelativeRiskElement()); - Type when = parseType("when", json); - if (when != null) - res.setWhen(when); - if (json.has("rationale")) - res.setRationaleElement(parseString(json.get("rationale").getAsString())); - if (json.has("_rationale")) - parseElementProperties(json.getAsJsonObject("_rationale"), res.getRationaleElement()); - } - - protected Schedule parseSchedule(JsonObject json) throws IOException, FHIRFormatError { - Schedule res = new Schedule(); - parseScheduleProperties(json, res); - return res; - } - - protected void parseScheduleProperties(JsonObject json, Schedule res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("active")) - res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); - if (json.has("_active")) - parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); - if (json.has("serviceCategory")) - res.setServiceCategory(parseCodeableConcept(json.getAsJsonObject("serviceCategory"))); - if (json.has("serviceType")) { - JsonArray array = json.getAsJsonArray("serviceType"); - for (int i = 0; i < array.size(); i++) { - res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialty")) { - JsonArray array = json.getAsJsonArray("specialty"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("actor")) { - JsonArray array = json.getAsJsonArray("actor"); - for (int i = 0; i < array.size(); i++) { - res.getActor().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("planningHorizon")) - res.setPlanningHorizon(parsePeriod(json.getAsJsonObject("planningHorizon"))); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected SearchParameter parseSearchParameter(JsonObject json) throws IOException, FHIRFormatError { - SearchParameter res = new SearchParameter(); - parseSearchParameterProperties(json, res); - return res; - } - - protected void parseSearchParameterProperties(JsonObject json, SearchParameter res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("base")) { - JsonArray array = json.getAsJsonArray("base"); - for (int i = 0; i < array.size(); i++) { - res.getBase().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_base")) { - JsonArray array = json.getAsJsonArray("_base"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getBase().size()) - res.getBase().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getBase().get(i)); - } - }; - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("derivedFrom")) - res.setDerivedFromElement(parseUri(json.get("derivedFrom").getAsString())); - if (json.has("_derivedFrom")) - parseElementProperties(json.getAsJsonObject("_derivedFrom"), res.getDerivedFromElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - if (json.has("xpath")) - res.setXpathElement(parseString(json.get("xpath").getAsString())); - if (json.has("_xpath")) - parseElementProperties(json.getAsJsonObject("_xpath"), res.getXpathElement()); - if (json.has("xpathUsage")) - res.setXpathUsageElement(parseEnumeration(json.get("xpathUsage").getAsString(), SearchParameter.XPathUsageType.NULL, new SearchParameter.XPathUsageTypeEnumFactory())); - if (json.has("_xpathUsage")) - parseElementProperties(json.getAsJsonObject("_xpathUsage"), res.getXpathUsageElement()); - if (json.has("target")) { - JsonArray array = json.getAsJsonArray("target"); - for (int i = 0; i < array.size(); i++) { - res.getTarget().add(parseCode(array.get(i).getAsString())); - } - }; - if (json.has("_target")) { - JsonArray array = json.getAsJsonArray("_target"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getTarget().size()) - res.getTarget().add(parseCode(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getTarget().get(i)); - } - }; - if (json.has("comparator")) { - JsonArray array = json.getAsJsonArray("comparator"); - for (int i = 0; i < array.size(); i++) { - res.getComparator().add(parseEnumeration(array.get(i).getAsString(), SearchParameter.SearchComparator.NULL, new SearchParameter.SearchComparatorEnumFactory())); - } - }; - if (json.has("_comparator")) { - JsonArray array = json.getAsJsonArray("_comparator"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getComparator().size()) - res.getComparator().add(parseEnumeration(null, SearchParameter.SearchComparator.NULL, new SearchParameter.SearchComparatorEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getComparator().get(i)); - } - }; - if (json.has("modifier")) { - JsonArray array = json.getAsJsonArray("modifier"); - for (int i = 0; i < array.size(); i++) { - res.getModifier().add(parseEnumeration(array.get(i).getAsString(), SearchParameter.SearchModifierCode.NULL, new SearchParameter.SearchModifierCodeEnumFactory())); - } - }; - if (json.has("_modifier")) { - JsonArray array = json.getAsJsonArray("_modifier"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getModifier().size()) - res.getModifier().add(parseEnumeration(null, SearchParameter.SearchModifierCode.NULL, new SearchParameter.SearchModifierCodeEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getModifier().get(i)); - } - }; - if (json.has("chain")) { - JsonArray array = json.getAsJsonArray("chain"); - for (int i = 0; i < array.size(); i++) { - res.getChain().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_chain")) { - JsonArray array = json.getAsJsonArray("_chain"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getChain().size()) - res.getChain().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getChain().get(i)); - } - }; - if (json.has("component")) { - JsonArray array = json.getAsJsonArray("component"); - for (int i = 0; i < array.size(); i++) { - res.getComponent().add(parseSearchParameterSearchParameterComponentComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected SearchParameter.SearchParameterComponentComponent parseSearchParameterSearchParameterComponentComponent(JsonObject json, SearchParameter owner) throws IOException, FHIRFormatError { - SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent(); - parseSearchParameterSearchParameterComponentComponentProperties(json, owner, res); - return res; - } - - protected void parseSearchParameterSearchParameterComponentComponentProperties(JsonObject json, SearchParameter owner, SearchParameter.SearchParameterComponentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("definition")) - res.setDefinition(parseReference(json.getAsJsonObject("definition"))); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - } - - protected Sequence parseSequence(JsonObject json) throws IOException, FHIRFormatError { - Sequence res = new Sequence(); - parseSequenceProperties(json, res); - return res; - } - - protected void parseSequenceProperties(JsonObject json, Sequence res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Sequence.SequenceType.NULL, new Sequence.SequenceTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("coordinateSystem")) - res.setCoordinateSystemElement(parseInteger(json.get("coordinateSystem").getAsLong())); - if (json.has("_coordinateSystem")) - parseElementProperties(json.getAsJsonObject("_coordinateSystem"), res.getCoordinateSystemElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("specimen")) - res.setSpecimen(parseReference(json.getAsJsonObject("specimen"))); - if (json.has("device")) - res.setDevice(parseReference(json.getAsJsonObject("device"))); - if (json.has("performer")) - res.setPerformer(parseReference(json.getAsJsonObject("performer"))); - if (json.has("quantity")) - res.setQuantity(parseQuantity(json.getAsJsonObject("quantity"))); - if (json.has("referenceSeq")) - res.setReferenceSeq(parseSequenceSequenceReferenceSeqComponent(json.getAsJsonObject("referenceSeq"), res)); - if (json.has("variant")) { - JsonArray array = json.getAsJsonArray("variant"); - for (int i = 0; i < array.size(); i++) { - res.getVariant().add(parseSequenceSequenceVariantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("observedSeq")) - res.setObservedSeqElement(parseString(json.get("observedSeq").getAsString())); - if (json.has("_observedSeq")) - parseElementProperties(json.getAsJsonObject("_observedSeq"), res.getObservedSeqElement()); - if (json.has("quality")) { - JsonArray array = json.getAsJsonArray("quality"); - for (int i = 0; i < array.size(); i++) { - res.getQuality().add(parseSequenceSequenceQualityComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("readCoverage")) - res.setReadCoverageElement(parseInteger(json.get("readCoverage").getAsLong())); - if (json.has("_readCoverage")) - parseElementProperties(json.getAsJsonObject("_readCoverage"), res.getReadCoverageElement()); - if (json.has("repository")) { - JsonArray array = json.getAsJsonArray("repository"); - for (int i = 0; i < array.size(); i++) { - res.getRepository().add(parseSequenceSequenceRepositoryComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("pointer")) { - JsonArray array = json.getAsJsonArray("pointer"); - for (int i = 0; i < array.size(); i++) { - res.getPointer().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Sequence.SequenceReferenceSeqComponent parseSequenceSequenceReferenceSeqComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { - Sequence.SequenceReferenceSeqComponent res = new Sequence.SequenceReferenceSeqComponent(); - parseSequenceSequenceReferenceSeqComponentProperties(json, owner, res); - return res; - } - - protected void parseSequenceSequenceReferenceSeqComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceReferenceSeqComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("chromosome")) - res.setChromosome(parseCodeableConcept(json.getAsJsonObject("chromosome"))); - if (json.has("genomeBuild")) - res.setGenomeBuildElement(parseString(json.get("genomeBuild").getAsString())); - if (json.has("_genomeBuild")) - parseElementProperties(json.getAsJsonObject("_genomeBuild"), res.getGenomeBuildElement()); - if (json.has("referenceSeqId")) - res.setReferenceSeqId(parseCodeableConcept(json.getAsJsonObject("referenceSeqId"))); - if (json.has("referenceSeqPointer")) - res.setReferenceSeqPointer(parseReference(json.getAsJsonObject("referenceSeqPointer"))); - if (json.has("referenceSeqString")) - res.setReferenceSeqStringElement(parseString(json.get("referenceSeqString").getAsString())); - if (json.has("_referenceSeqString")) - parseElementProperties(json.getAsJsonObject("_referenceSeqString"), res.getReferenceSeqStringElement()); - if (json.has("strand")) - res.setStrandElement(parseInteger(json.get("strand").getAsLong())); - if (json.has("_strand")) - parseElementProperties(json.getAsJsonObject("_strand"), res.getStrandElement()); - if (json.has("windowStart")) - res.setWindowStartElement(parseInteger(json.get("windowStart").getAsLong())); - if (json.has("_windowStart")) - parseElementProperties(json.getAsJsonObject("_windowStart"), res.getWindowStartElement()); - if (json.has("windowEnd")) - res.setWindowEndElement(parseInteger(json.get("windowEnd").getAsLong())); - if (json.has("_windowEnd")) - parseElementProperties(json.getAsJsonObject("_windowEnd"), res.getWindowEndElement()); - } - - protected Sequence.SequenceVariantComponent parseSequenceSequenceVariantComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { - Sequence.SequenceVariantComponent res = new Sequence.SequenceVariantComponent(); - parseSequenceSequenceVariantComponentProperties(json, owner, res); - return res; - } - - protected void parseSequenceSequenceVariantComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceVariantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("start")) - res.setStartElement(parseInteger(json.get("start").getAsLong())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("end")) - res.setEndElement(parseInteger(json.get("end").getAsLong())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - if (json.has("observedAllele")) - res.setObservedAlleleElement(parseString(json.get("observedAllele").getAsString())); - if (json.has("_observedAllele")) - parseElementProperties(json.getAsJsonObject("_observedAllele"), res.getObservedAlleleElement()); - if (json.has("referenceAllele")) - res.setReferenceAlleleElement(parseString(json.get("referenceAllele").getAsString())); - if (json.has("_referenceAllele")) - parseElementProperties(json.getAsJsonObject("_referenceAllele"), res.getReferenceAlleleElement()); - if (json.has("cigar")) - res.setCigarElement(parseString(json.get("cigar").getAsString())); - if (json.has("_cigar")) - parseElementProperties(json.getAsJsonObject("_cigar"), res.getCigarElement()); - if (json.has("variantPointer")) - res.setVariantPointer(parseReference(json.getAsJsonObject("variantPointer"))); - } - - protected Sequence.SequenceQualityComponent parseSequenceSequenceQualityComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { - Sequence.SequenceQualityComponent res = new Sequence.SequenceQualityComponent(); - parseSequenceSequenceQualityComponentProperties(json, owner, res); - return res; - } - - protected void parseSequenceSequenceQualityComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceQualityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Sequence.QualityType.NULL, new Sequence.QualityTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("standardSequence")) - res.setStandardSequence(parseCodeableConcept(json.getAsJsonObject("standardSequence"))); - if (json.has("start")) - res.setStartElement(parseInteger(json.get("start").getAsLong())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("end")) - res.setEndElement(parseInteger(json.get("end").getAsLong())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - if (json.has("score")) - res.setScore(parseQuantity(json.getAsJsonObject("score"))); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - if (json.has("truthTP")) - res.setTruthTPElement(parseDecimal(json.get("truthTP").getAsBigDecimal())); - if (json.has("_truthTP")) - parseElementProperties(json.getAsJsonObject("_truthTP"), res.getTruthTPElement()); - if (json.has("queryTP")) - res.setQueryTPElement(parseDecimal(json.get("queryTP").getAsBigDecimal())); - if (json.has("_queryTP")) - parseElementProperties(json.getAsJsonObject("_queryTP"), res.getQueryTPElement()); - if (json.has("truthFN")) - res.setTruthFNElement(parseDecimal(json.get("truthFN").getAsBigDecimal())); - if (json.has("_truthFN")) - parseElementProperties(json.getAsJsonObject("_truthFN"), res.getTruthFNElement()); - if (json.has("queryFP")) - res.setQueryFPElement(parseDecimal(json.get("queryFP").getAsBigDecimal())); - if (json.has("_queryFP")) - parseElementProperties(json.getAsJsonObject("_queryFP"), res.getQueryFPElement()); - if (json.has("gtFP")) - res.setGtFPElement(parseDecimal(json.get("gtFP").getAsBigDecimal())); - if (json.has("_gtFP")) - parseElementProperties(json.getAsJsonObject("_gtFP"), res.getGtFPElement()); - if (json.has("precision")) - res.setPrecisionElement(parseDecimal(json.get("precision").getAsBigDecimal())); - if (json.has("_precision")) - parseElementProperties(json.getAsJsonObject("_precision"), res.getPrecisionElement()); - if (json.has("recall")) - res.setRecallElement(parseDecimal(json.get("recall").getAsBigDecimal())); - if (json.has("_recall")) - parseElementProperties(json.getAsJsonObject("_recall"), res.getRecallElement()); - if (json.has("fScore")) - res.setFScoreElement(parseDecimal(json.get("fScore").getAsBigDecimal())); - if (json.has("_fScore")) - parseElementProperties(json.getAsJsonObject("_fScore"), res.getFScoreElement()); - } - - protected Sequence.SequenceRepositoryComponent parseSequenceSequenceRepositoryComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { - Sequence.SequenceRepositoryComponent res = new Sequence.SequenceRepositoryComponent(); - parseSequenceSequenceRepositoryComponentProperties(json, owner, res); - return res; - } - - protected void parseSequenceSequenceRepositoryComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceRepositoryComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Sequence.RepositoryType.NULL, new Sequence.RepositoryTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("datasetId")) - res.setDatasetIdElement(parseString(json.get("datasetId").getAsString())); - if (json.has("_datasetId")) - parseElementProperties(json.getAsJsonObject("_datasetId"), res.getDatasetIdElement()); - if (json.has("variantsetId")) - res.setVariantsetIdElement(parseString(json.get("variantsetId").getAsString())); - if (json.has("_variantsetId")) - parseElementProperties(json.getAsJsonObject("_variantsetId"), res.getVariantsetIdElement()); - if (json.has("readsetId")) - res.setReadsetIdElement(parseString(json.get("readsetId").getAsString())); - if (json.has("_readsetId")) - parseElementProperties(json.getAsJsonObject("_readsetId"), res.getReadsetIdElement()); - } - - protected ServiceDefinition parseServiceDefinition(JsonObject json) throws IOException, FHIRFormatError { - ServiceDefinition res = new ServiceDefinition(); - parseServiceDefinitionProperties(json, res); - return res; - } - - protected void parseServiceDefinitionProperties(JsonObject json, ServiceDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("usage")) - res.setUsageElement(parseString(json.get("usage").getAsString())); - if (json.has("_usage")) - parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); - if (json.has("approvalDate")) - res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); - if (json.has("_approvalDate")) - parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); - if (json.has("lastReviewDate")) - res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); - if (json.has("_lastReviewDate")) - parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); - if (json.has("effectivePeriod")) - res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("topic")) { - JsonArray array = json.getAsJsonArray("topic"); - for (int i = 0; i < array.size(); i++) { - res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contributor")) { - JsonArray array = json.getAsJsonArray("contributor"); - for (int i = 0; i < array.size(); i++) { - res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); - } - }; - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("relatedArtifact")) { - JsonArray array = json.getAsJsonArray("relatedArtifact"); - for (int i = 0; i < array.size(); i++) { - res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); - } - }; - if (json.has("trigger")) { - JsonArray array = json.getAsJsonArray("trigger"); - for (int i = 0; i < array.size(); i++) { - res.getTrigger().add(parseTriggerDefinition(array.get(i).getAsJsonObject())); - } - }; - if (json.has("dataRequirement")) { - JsonArray array = json.getAsJsonArray("dataRequirement"); - for (int i = 0; i < array.size(); i++) { - res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject())); - } - }; - if (json.has("operationDefinition")) - res.setOperationDefinition(parseReference(json.getAsJsonObject("operationDefinition"))); - } - - protected Slot parseSlot(JsonObject json) throws IOException, FHIRFormatError { - Slot res = new Slot(); - parseSlotProperties(json, res); - return res; - } - - protected void parseSlotProperties(JsonObject json, Slot res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("serviceCategory")) - res.setServiceCategory(parseCodeableConcept(json.getAsJsonObject("serviceCategory"))); - if (json.has("serviceType")) { - JsonArray array = json.getAsJsonArray("serviceType"); - for (int i = 0; i < array.size(); i++) { - res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("specialty")) { - JsonArray array = json.getAsJsonArray("specialty"); - for (int i = 0; i < array.size(); i++) { - res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("appointmentType")) - res.setAppointmentType(parseCodeableConcept(json.getAsJsonObject("appointmentType"))); - if (json.has("schedule")) - res.setSchedule(parseReference(json.getAsJsonObject("schedule"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Slot.SlotStatus.NULL, new Slot.SlotStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("start")) - res.setStartElement(parseInstant(json.get("start").getAsString())); - if (json.has("_start")) - parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); - if (json.has("end")) - res.setEndElement(parseInstant(json.get("end").getAsString())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - if (json.has("overbooked")) - res.setOverbookedElement(parseBoolean(json.get("overbooked").getAsBoolean())); - if (json.has("_overbooked")) - parseElementProperties(json.getAsJsonObject("_overbooked"), res.getOverbookedElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected Specimen parseSpecimen(JsonObject json) throws IOException, FHIRFormatError { - Specimen res = new Specimen(); - parseSpecimenProperties(json, res); - return res; - } - - protected void parseSpecimenProperties(JsonObject json, Specimen res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("accessionIdentifier")) - res.setAccessionIdentifier(parseIdentifier(json.getAsJsonObject("accessionIdentifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Specimen.SpecimenStatus.NULL, new Specimen.SpecimenStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("subject")) - res.setSubject(parseReference(json.getAsJsonObject("subject"))); - if (json.has("receivedTime")) - res.setReceivedTimeElement(parseDateTime(json.get("receivedTime").getAsString())); - if (json.has("_receivedTime")) - parseElementProperties(json.getAsJsonObject("_receivedTime"), res.getReceivedTimeElement()); - if (json.has("parent")) { - JsonArray array = json.getAsJsonArray("parent"); - for (int i = 0; i < array.size(); i++) { - res.getParent().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("request")) { - JsonArray array = json.getAsJsonArray("request"); - for (int i = 0; i < array.size(); i++) { - res.getRequest().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("collection")) - res.setCollection(parseSpecimenSpecimenCollectionComponent(json.getAsJsonObject("collection"), res)); - if (json.has("processing")) { - JsonArray array = json.getAsJsonArray("processing"); - for (int i = 0; i < array.size(); i++) { - res.getProcessing().add(parseSpecimenSpecimenProcessingComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("container")) { - JsonArray array = json.getAsJsonArray("container"); - for (int i = 0; i < array.size(); i++) { - res.getContainer().add(parseSpecimenSpecimenContainerComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - protected Specimen.SpecimenCollectionComponent parseSpecimenSpecimenCollectionComponent(JsonObject json, Specimen owner) throws IOException, FHIRFormatError { - Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent(); - parseSpecimenSpecimenCollectionComponentProperties(json, owner, res); - return res; - } - - protected void parseSpecimenSpecimenCollectionComponentProperties(JsonObject json, Specimen owner, Specimen.SpecimenCollectionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("collector")) - res.setCollector(parseReference(json.getAsJsonObject("collector"))); - Type collected = parseType("collected", json); - if (collected != null) - res.setCollected(collected); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - if (json.has("method")) - res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); - if (json.has("bodySite")) - res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); - } - - protected Specimen.SpecimenProcessingComponent parseSpecimenSpecimenProcessingComponent(JsonObject json, Specimen owner) throws IOException, FHIRFormatError { - Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent(); - parseSpecimenSpecimenProcessingComponentProperties(json, owner, res); - return res; - } - - protected void parseSpecimenSpecimenProcessingComponentProperties(JsonObject json, Specimen owner, Specimen.SpecimenProcessingComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("procedure")) - res.setProcedure(parseCodeableConcept(json.getAsJsonObject("procedure"))); - if (json.has("additive")) { - JsonArray array = json.getAsJsonArray("additive"); - for (int i = 0; i < array.size(); i++) { - res.getAdditive().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - Type time = parseType("time", json); - if (time != null) - res.setTime(time); - } - - protected Specimen.SpecimenContainerComponent parseSpecimenSpecimenContainerComponent(JsonObject json, Specimen owner) throws IOException, FHIRFormatError { - Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent(); - parseSpecimenSpecimenContainerComponentProperties(json, owner, res); - return res; - } - - protected void parseSpecimenSpecimenContainerComponentProperties(JsonObject json, Specimen owner, Specimen.SpecimenContainerComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("capacity")) - res.setCapacity(parseSimpleQuantity(json.getAsJsonObject("capacity"))); - if (json.has("specimenQuantity")) - res.setSpecimenQuantity(parseSimpleQuantity(json.getAsJsonObject("specimenQuantity"))); - Type additive = parseType("additive", json); - if (additive != null) - res.setAdditive(additive); - } - - protected StructureDefinition parseStructureDefinition(JsonObject json) throws IOException, FHIRFormatError { - StructureDefinition res = new StructureDefinition(); - parseStructureDefinitionProperties(json, res); - return res; - } - - protected void parseStructureDefinitionProperties(JsonObject json, StructureDefinition res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("keyword")) { - JsonArray array = json.getAsJsonArray("keyword"); - for (int i = 0; i < array.size(); i++) { - res.getKeyword().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - if (json.has("fhirVersion")) - res.setFhirVersionElement(parseId(json.get("fhirVersion").getAsString())); - if (json.has("_fhirVersion")) - parseElementProperties(json.getAsJsonObject("_fhirVersion"), res.getFhirVersionElement()); - if (json.has("mapping")) { - JsonArray array = json.getAsJsonArray("mapping"); - for (int i = 0; i < array.size(); i++) { - res.getMapping().add(parseStructureDefinitionStructureDefinitionMappingComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("kind")) - res.setKindElement(parseEnumeration(json.get("kind").getAsString(), StructureDefinition.StructureDefinitionKind.NULL, new StructureDefinition.StructureDefinitionKindEnumFactory())); - if (json.has("_kind")) - parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); - if (json.has("abstract")) - res.setAbstractElement(parseBoolean(json.get("abstract").getAsBoolean())); - if (json.has("_abstract")) - parseElementProperties(json.getAsJsonObject("_abstract"), res.getAbstractElement()); - if (json.has("contextType")) - res.setContextTypeElement(parseEnumeration(json.get("contextType").getAsString(), StructureDefinition.ExtensionContext.NULL, new StructureDefinition.ExtensionContextEnumFactory())); - if (json.has("_contextType")) - parseElementProperties(json.getAsJsonObject("_contextType"), res.getContextTypeElement()); - if (json.has("context")) { - JsonArray array = json.getAsJsonArray("context"); - for (int i = 0; i < array.size(); i++) { - res.getContext().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_context")) { - JsonArray array = json.getAsJsonArray("_context"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getContext().size()) - res.getContext().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getContext().get(i)); - } - }; - if (json.has("contextInvariant")) { - JsonArray array = json.getAsJsonArray("contextInvariant"); - for (int i = 0; i < array.size(); i++) { - res.getContextInvariant().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_contextInvariant")) { - JsonArray array = json.getAsJsonArray("_contextInvariant"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getContextInvariant().size()) - res.getContextInvariant().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getContextInvariant().get(i)); - } - }; - if (json.has("type")) - res.setTypeElement(parseCode(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("baseDefinition")) - res.setBaseDefinitionElement(parseUri(json.get("baseDefinition").getAsString())); - if (json.has("_baseDefinition")) - parseElementProperties(json.getAsJsonObject("_baseDefinition"), res.getBaseDefinitionElement()); - if (json.has("derivation")) - res.setDerivationElement(parseEnumeration(json.get("derivation").getAsString(), StructureDefinition.TypeDerivationRule.NULL, new StructureDefinition.TypeDerivationRuleEnumFactory())); - if (json.has("_derivation")) - parseElementProperties(json.getAsJsonObject("_derivation"), res.getDerivationElement()); - if (json.has("snapshot")) - res.setSnapshot(parseStructureDefinitionStructureDefinitionSnapshotComponent(json.getAsJsonObject("snapshot"), res)); - if (json.has("differential")) - res.setDifferential(parseStructureDefinitionStructureDefinitionDifferentialComponent(json.getAsJsonObject("differential"), res)); - } - - protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionStructureDefinitionMappingComponent(JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError { - StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent(); - parseStructureDefinitionStructureDefinitionMappingComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureDefinitionStructureDefinitionMappingComponentProperties(JsonObject json, StructureDefinition owner, StructureDefinition.StructureDefinitionMappingComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identity")) - res.setIdentityElement(parseId(json.get("identity").getAsString())); - if (json.has("_identity")) - parseElementProperties(json.getAsJsonObject("_identity"), res.getIdentityElement()); - if (json.has("uri")) - res.setUriElement(parseUri(json.get("uri").getAsString())); - if (json.has("_uri")) - parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("comment")) - res.setCommentElement(parseString(json.get("comment").getAsString())); - if (json.has("_comment")) - parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); - } - - protected StructureDefinition.StructureDefinitionSnapshotComponent parseStructureDefinitionStructureDefinitionSnapshotComponent(JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError { - StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent(); - parseStructureDefinitionStructureDefinitionSnapshotComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureDefinitionStructureDefinitionSnapshotComponentProperties(JsonObject json, StructureDefinition owner, StructureDefinition.StructureDefinitionSnapshotComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("element")) { - JsonArray array = json.getAsJsonArray("element"); - for (int i = 0; i < array.size(); i++) { - res.getElement().add(parseElementDefinition(array.get(i).getAsJsonObject())); - } - }; - } - - protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionStructureDefinitionDifferentialComponent(JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError { - StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent(); - parseStructureDefinitionStructureDefinitionDifferentialComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureDefinitionStructureDefinitionDifferentialComponentProperties(JsonObject json, StructureDefinition owner, StructureDefinition.StructureDefinitionDifferentialComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("element")) { - JsonArray array = json.getAsJsonArray("element"); - for (int i = 0; i < array.size(); i++) { - res.getElement().add(parseElementDefinition(array.get(i).getAsJsonObject())); - } - }; - } - - protected StructureMap parseStructureMap(JsonObject json) throws IOException, FHIRFormatError { - StructureMap res = new StructureMap(); - parseStructureMapProperties(json, res); - return res; - } - - protected void parseStructureMapProperties(JsonObject json, StructureMap res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("structure")) { - JsonArray array = json.getAsJsonArray("structure"); - for (int i = 0; i < array.size(); i++) { - res.getStructure().add(parseStructureMapStructureMapStructureComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("import")) { - JsonArray array = json.getAsJsonArray("import"); - for (int i = 0; i < array.size(); i++) { - res.getImport().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_import")) { - JsonArray array = json.getAsJsonArray("_import"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getImport().size()) - res.getImport().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getImport().get(i)); - } - }; - if (json.has("group")) { - JsonArray array = json.getAsJsonArray("group"); - for (int i = 0; i < array.size(); i++) { - res.getGroup().add(parseStructureMapStructureMapGroupComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected StructureMap.StructureMapStructureComponent parseStructureMapStructureMapStructureComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent(); - parseStructureMapStructureMapStructureComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapStructureComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapStructureComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), StructureMap.StructureMapModelMode.NULL, new StructureMap.StructureMapModelModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("alias")) - res.setAliasElement(parseString(json.get("alias").getAsString())); - if (json.has("_alias")) - parseElementProperties(json.getAsJsonObject("_alias"), res.getAliasElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected StructureMap.StructureMapGroupComponent parseStructureMapStructureMapGroupComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent(); - parseStructureMapStructureMapGroupComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseId(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("extends")) - res.setExtendsElement(parseId(json.get("extends").getAsString())); - if (json.has("_extends")) - parseElementProperties(json.getAsJsonObject("_extends"), res.getExtendsElement()); - if (json.has("typeMode")) - res.setTypeModeElement(parseEnumeration(json.get("typeMode").getAsString(), StructureMap.StructureMapGroupTypeMode.NULL, new StructureMap.StructureMapGroupTypeModeEnumFactory())); - if (json.has("_typeMode")) - parseElementProperties(json.getAsJsonObject("_typeMode"), res.getTypeModeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - if (json.has("input")) { - JsonArray array = json.getAsJsonArray("input"); - for (int i = 0; i < array.size(); i++) { - res.getInput().add(parseStructureMapStructureMapGroupInputComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("rule")) { - JsonArray array = json.getAsJsonArray("rule"); - for (int i = 0; i < array.size(); i++) { - res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected StructureMap.StructureMapGroupInputComponent parseStructureMapStructureMapGroupInputComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent(); - parseStructureMapStructureMapGroupInputComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupInputComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupInputComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseId(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("type")) - res.setTypeElement(parseString(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("mode")) - res.setModeElement(parseEnumeration(json.get("mode").getAsString(), StructureMap.StructureMapInputMode.NULL, new StructureMap.StructureMapInputModeEnumFactory())); - if (json.has("_mode")) - parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected StructureMap.StructureMapGroupRuleComponent parseStructureMapStructureMapGroupRuleComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent(); - parseStructureMapStructureMapGroupRuleComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupRuleComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseId(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("source")) { - JsonArray array = json.getAsJsonArray("source"); - for (int i = 0; i < array.size(); i++) { - res.getSource().add(parseStructureMapStructureMapGroupRuleSourceComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("target")) { - JsonArray array = json.getAsJsonArray("target"); - for (int i = 0; i < array.size(); i++) { - res.getTarget().add(parseStructureMapStructureMapGroupRuleTargetComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("rule")) { - JsonArray array = json.getAsJsonArray("rule"); - for (int i = 0; i < array.size(); i++) { - res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("dependent")) { - JsonArray array = json.getAsJsonArray("dependent"); - for (int i = 0; i < array.size(); i++) { - res.getDependent().add(parseStructureMapStructureMapGroupRuleDependentComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("documentation")) - res.setDocumentationElement(parseString(json.get("documentation").getAsString())); - if (json.has("_documentation")) - parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); - } - - protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapStructureMapGroupRuleSourceComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent(); - parseStructureMapStructureMapGroupRuleSourceComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupRuleSourceComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleSourceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("context")) - res.setContextElement(parseId(json.get("context").getAsString())); - if (json.has("_context")) - parseElementProperties(json.getAsJsonObject("_context"), res.getContextElement()); - if (json.has("min")) - res.setMinElement(parseInteger(json.get("min").getAsLong())); - if (json.has("_min")) - parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); - if (json.has("max")) - res.setMaxElement(parseString(json.get("max").getAsString())); - if (json.has("_max")) - parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); - if (json.has("type")) - res.setTypeElement(parseString(json.get("type").getAsString())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - Type defaultValue = parseType("defaultValue", json); - if (defaultValue != null) - res.setDefaultValue(defaultValue); - if (json.has("element")) - res.setElementElement(parseString(json.get("element").getAsString())); - if (json.has("_element")) - parseElementProperties(json.getAsJsonObject("_element"), res.getElementElement()); - if (json.has("listMode")) - res.setListModeElement(parseEnumeration(json.get("listMode").getAsString(), StructureMap.StructureMapSourceListMode.NULL, new StructureMap.StructureMapSourceListModeEnumFactory())); - if (json.has("_listMode")) - parseElementProperties(json.getAsJsonObject("_listMode"), res.getListModeElement()); - if (json.has("variable")) - res.setVariableElement(parseId(json.get("variable").getAsString())); - if (json.has("_variable")) - parseElementProperties(json.getAsJsonObject("_variable"), res.getVariableElement()); - if (json.has("condition")) - res.setConditionElement(parseString(json.get("condition").getAsString())); - if (json.has("_condition")) - parseElementProperties(json.getAsJsonObject("_condition"), res.getConditionElement()); - if (json.has("check")) - res.setCheckElement(parseString(json.get("check").getAsString())); - if (json.has("_check")) - parseElementProperties(json.getAsJsonObject("_check"), res.getCheckElement()); - } - - protected StructureMap.StructureMapGroupRuleTargetComponent parseStructureMapStructureMapGroupRuleTargetComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent(); - parseStructureMapStructureMapGroupRuleTargetComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupRuleTargetComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleTargetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("context")) - res.setContextElement(parseId(json.get("context").getAsString())); - if (json.has("_context")) - parseElementProperties(json.getAsJsonObject("_context"), res.getContextElement()); - if (json.has("contextType")) - res.setContextTypeElement(parseEnumeration(json.get("contextType").getAsString(), StructureMap.StructureMapContextType.NULL, new StructureMap.StructureMapContextTypeEnumFactory())); - if (json.has("_contextType")) - parseElementProperties(json.getAsJsonObject("_contextType"), res.getContextTypeElement()); - if (json.has("element")) - res.setElementElement(parseString(json.get("element").getAsString())); - if (json.has("_element")) - parseElementProperties(json.getAsJsonObject("_element"), res.getElementElement()); - if (json.has("variable")) - res.setVariableElement(parseId(json.get("variable").getAsString())); - if (json.has("_variable")) - parseElementProperties(json.getAsJsonObject("_variable"), res.getVariableElement()); - if (json.has("listMode")) { - JsonArray array = json.getAsJsonArray("listMode"); - for (int i = 0; i < array.size(); i++) { - res.getListMode().add(parseEnumeration(array.get(i).getAsString(), StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory())); - } - }; - if (json.has("_listMode")) { - JsonArray array = json.getAsJsonArray("_listMode"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getListMode().size()) - res.getListMode().add(parseEnumeration(null, StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory())); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getListMode().get(i)); - } - }; - if (json.has("listRuleId")) - res.setListRuleIdElement(parseId(json.get("listRuleId").getAsString())); - if (json.has("_listRuleId")) - parseElementProperties(json.getAsJsonObject("_listRuleId"), res.getListRuleIdElement()); - if (json.has("transform")) - res.setTransformElement(parseEnumeration(json.get("transform").getAsString(), StructureMap.StructureMapTransform.NULL, new StructureMap.StructureMapTransformEnumFactory())); - if (json.has("_transform")) - parseElementProperties(json.getAsJsonObject("_transform"), res.getTransformElement()); - if (json.has("parameter")) { - JsonArray array = json.getAsJsonArray("parameter"); - for (int i = 0; i < array.size(); i++) { - res.getParameter().add(parseStructureMapStructureMapGroupRuleTargetParameterComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapStructureMapGroupRuleTargetParameterComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent(); - parseStructureMapStructureMapGroupRuleTargetParameterComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupRuleTargetParameterComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleTargetParameterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapStructureMapGroupRuleDependentComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent(); - parseStructureMapStructureMapGroupRuleDependentComponentProperties(json, owner, res); - return res; - } - - protected void parseStructureMapStructureMapGroupRuleDependentComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleDependentComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseId(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("variable")) { - JsonArray array = json.getAsJsonArray("variable"); - for (int i = 0; i < array.size(); i++) { - res.getVariable().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_variable")) { - JsonArray array = json.getAsJsonArray("_variable"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getVariable().size()) - res.getVariable().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getVariable().get(i)); - } - }; - } - - protected Subscription parseSubscription(JsonObject json) throws IOException, FHIRFormatError { - Subscription res = new Subscription(); - parseSubscriptionProperties(json, res); - return res; - } - - protected void parseSubscriptionProperties(JsonObject json, Subscription res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Subscription.SubscriptionStatus.NULL, new Subscription.SubscriptionStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject())); - } - }; - if (json.has("end")) - res.setEndElement(parseInstant(json.get("end").getAsString())); - if (json.has("_end")) - parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); - if (json.has("reason")) - res.setReasonElement(parseString(json.get("reason").getAsString())); - if (json.has("_reason")) - parseElementProperties(json.getAsJsonObject("_reason"), res.getReasonElement()); - if (json.has("criteria")) - res.setCriteriaElement(parseString(json.get("criteria").getAsString())); - if (json.has("_criteria")) - parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); - if (json.has("error")) - res.setErrorElement(parseString(json.get("error").getAsString())); - if (json.has("_error")) - parseElementProperties(json.getAsJsonObject("_error"), res.getErrorElement()); - if (json.has("channel")) - res.setChannel(parseSubscriptionSubscriptionChannelComponent(json.getAsJsonObject("channel"), res)); - if (json.has("tag")) { - JsonArray array = json.getAsJsonArray("tag"); - for (int i = 0; i < array.size(); i++) { - res.getTag().add(parseCoding(array.get(i).getAsJsonObject())); - } - }; - } - - protected Subscription.SubscriptionChannelComponent parseSubscriptionSubscriptionChannelComponent(JsonObject json, Subscription owner) throws IOException, FHIRFormatError { - Subscription.SubscriptionChannelComponent res = new Subscription.SubscriptionChannelComponent(); - parseSubscriptionSubscriptionChannelComponentProperties(json, owner, res); - return res; - } - - protected void parseSubscriptionSubscriptionChannelComponentProperties(JsonObject json, Subscription owner, Subscription.SubscriptionChannelComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Subscription.SubscriptionChannelType.NULL, new Subscription.SubscriptionChannelTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("endpoint")) - res.setEndpointElement(parseUri(json.get("endpoint").getAsString())); - if (json.has("_endpoint")) - parseElementProperties(json.getAsJsonObject("_endpoint"), res.getEndpointElement()); - if (json.has("payload")) - res.setPayloadElement(parseString(json.get("payload").getAsString())); - if (json.has("_payload")) - parseElementProperties(json.getAsJsonObject("_payload"), res.getPayloadElement()); - if (json.has("header")) { - JsonArray array = json.getAsJsonArray("header"); - for (int i = 0; i < array.size(); i++) { - res.getHeader().add(parseString(array.get(i).getAsString())); - } - }; - if (json.has("_header")) { - JsonArray array = json.getAsJsonArray("_header"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getHeader().size()) - res.getHeader().add(parseString(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getHeader().get(i)); - } - }; - } - - protected Substance parseSubstance(JsonObject json) throws IOException, FHIRFormatError { - Substance res = new Substance(); - parseSubstanceProperties(json, res); - return res; - } - - protected void parseSubstanceProperties(JsonObject json, Substance res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Substance.FHIRSubstanceStatus.NULL, new Substance.FHIRSubstanceStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) { - JsonArray array = json.getAsJsonArray("category"); - for (int i = 0; i < array.size(); i++) { - res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("instance")) { - JsonArray array = json.getAsJsonArray("instance"); - for (int i = 0; i < array.size(); i++) { - res.getInstance().add(parseSubstanceSubstanceInstanceComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("ingredient")) { - JsonArray array = json.getAsJsonArray("ingredient"); - for (int i = 0; i < array.size(); i++) { - res.getIngredient().add(parseSubstanceSubstanceIngredientComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Substance.SubstanceInstanceComponent parseSubstanceSubstanceInstanceComponent(JsonObject json, Substance owner) throws IOException, FHIRFormatError { - Substance.SubstanceInstanceComponent res = new Substance.SubstanceInstanceComponent(); - parseSubstanceSubstanceInstanceComponentProperties(json, owner, res); - return res; - } - - protected void parseSubstanceSubstanceInstanceComponentProperties(JsonObject json, Substance owner, Substance.SubstanceInstanceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("expiry")) - res.setExpiryElement(parseDateTime(json.get("expiry").getAsString())); - if (json.has("_expiry")) - parseElementProperties(json.getAsJsonObject("_expiry"), res.getExpiryElement()); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - } - - protected Substance.SubstanceIngredientComponent parseSubstanceSubstanceIngredientComponent(JsonObject json, Substance owner) throws IOException, FHIRFormatError { - Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent(); - parseSubstanceSubstanceIngredientComponentProperties(json, owner, res); - return res; - } - - protected void parseSubstanceSubstanceIngredientComponentProperties(JsonObject json, Substance owner, Substance.SubstanceIngredientComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("quantity")) - res.setQuantity(parseRatio(json.getAsJsonObject("quantity"))); - Type substance = parseType("substance", json); - if (substance != null) - res.setSubstance(substance); - } - - protected SupplyDelivery parseSupplyDelivery(JsonObject json) throws IOException, FHIRFormatError { - SupplyDelivery res = new SupplyDelivery(); - parseSupplyDeliveryProperties(json, res); - return res; - } - - protected void parseSupplyDeliveryProperties(JsonObject json, SupplyDelivery res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), SupplyDelivery.SupplyDeliveryStatus.NULL, new SupplyDelivery.SupplyDeliveryStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - if (json.has("suppliedItem")) - res.setSuppliedItem(parseSupplyDeliverySupplyDeliverySuppliedItemComponent(json.getAsJsonObject("suppliedItem"), res)); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("supplier")) - res.setSupplier(parseReference(json.getAsJsonObject("supplier"))); - if (json.has("destination")) - res.setDestination(parseReference(json.getAsJsonObject("destination"))); - if (json.has("receiver")) { - JsonArray array = json.getAsJsonArray("receiver"); - for (int i = 0; i < array.size(); i++) { - res.getReceiver().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySupplyDeliverySuppliedItemComponent(JsonObject json, SupplyDelivery owner) throws IOException, FHIRFormatError { - SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent(); - parseSupplyDeliverySupplyDeliverySuppliedItemComponentProperties(json, owner, res); - return res; - } - - protected void parseSupplyDeliverySupplyDeliverySuppliedItemComponentProperties(JsonObject json, SupplyDelivery owner, SupplyDelivery.SupplyDeliverySuppliedItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("quantity")) - res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); - Type item = parseType("item", json); - if (item != null) - res.setItem(item); - } - - protected SupplyRequest parseSupplyRequest(JsonObject json) throws IOException, FHIRFormatError { - SupplyRequest res = new SupplyRequest(); - parseSupplyRequestProperties(json, res); - return res; - } - - protected void parseSupplyRequestProperties(JsonObject json, SupplyRequest res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), SupplyRequest.SupplyRequestStatus.NULL, new SupplyRequest.SupplyRequestStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("category")) - res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), SupplyRequest.RequestPriority.NULL, new SupplyRequest.RequestPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("orderedItem")) - res.setOrderedItem(parseSupplyRequestSupplyRequestOrderedItemComponent(json.getAsJsonObject("orderedItem"), res)); - Type occurrence = parseType("occurrence", json); - if (occurrence != null) - res.setOccurrence(occurrence); - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("requester")) - res.setRequester(parseSupplyRequestSupplyRequestRequesterComponent(json.getAsJsonObject("requester"), res)); - if (json.has("supplier")) { - JsonArray array = json.getAsJsonArray("supplier"); - for (int i = 0; i < array.size(); i++) { - res.getSupplier().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - Type reason = parseType("reason", json); - if (reason != null) - res.setReason(reason); - if (json.has("deliverFrom")) - res.setDeliverFrom(parseReference(json.getAsJsonObject("deliverFrom"))); - if (json.has("deliverTo")) - res.setDeliverTo(parseReference(json.getAsJsonObject("deliverTo"))); - } - - protected SupplyRequest.SupplyRequestOrderedItemComponent parseSupplyRequestSupplyRequestOrderedItemComponent(JsonObject json, SupplyRequest owner) throws IOException, FHIRFormatError { - SupplyRequest.SupplyRequestOrderedItemComponent res = new SupplyRequest.SupplyRequestOrderedItemComponent(); - parseSupplyRequestSupplyRequestOrderedItemComponentProperties(json, owner, res); - return res; - } - - protected void parseSupplyRequestSupplyRequestOrderedItemComponentProperties(JsonObject json, SupplyRequest owner, SupplyRequest.SupplyRequestOrderedItemComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("quantity")) - res.setQuantity(parseQuantity(json.getAsJsonObject("quantity"))); - Type item = parseType("item", json); - if (item != null) - res.setItem(item); - } - - protected SupplyRequest.SupplyRequestRequesterComponent parseSupplyRequestSupplyRequestRequesterComponent(JsonObject json, SupplyRequest owner) throws IOException, FHIRFormatError { - SupplyRequest.SupplyRequestRequesterComponent res = new SupplyRequest.SupplyRequestRequesterComponent(); - parseSupplyRequestSupplyRequestRequesterComponentProperties(json, owner, res); - return res; - } - - protected void parseSupplyRequestSupplyRequestRequesterComponentProperties(JsonObject json, SupplyRequest owner, SupplyRequest.SupplyRequestRequesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("agent")) - res.setAgent(parseReference(json.getAsJsonObject("agent"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected Task parseTask(JsonObject json) throws IOException, FHIRFormatError { - Task res = new Task(); - parseTaskProperties(json, res); - return res; - } - - protected void parseTaskProperties(JsonObject json, Task res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - Type definition = parseType("definition", json); - if (definition != null) - res.setDefinition(definition); - if (json.has("basedOn")) { - JsonArray array = json.getAsJsonArray("basedOn"); - for (int i = 0; i < array.size(); i++) { - res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("groupIdentifier")) - res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); - if (json.has("partOf")) { - JsonArray array = json.getAsJsonArray("partOf"); - for (int i = 0; i < array.size(); i++) { - res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Task.TaskStatus.NULL, new Task.TaskStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("statusReason")) - res.setStatusReason(parseCodeableConcept(json.getAsJsonObject("statusReason"))); - if (json.has("businessStatus")) - res.setBusinessStatus(parseCodeableConcept(json.getAsJsonObject("businessStatus"))); - if (json.has("intent")) - res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Task.TaskIntent.NULL, new Task.TaskIntentEnumFactory())); - if (json.has("_intent")) - parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); - if (json.has("priority")) - res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Task.TaskPriority.NULL, new Task.TaskPriorityEnumFactory())); - if (json.has("_priority")) - parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); - if (json.has("code")) - res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("focus")) - res.setFocus(parseReference(json.getAsJsonObject("focus"))); - if (json.has("for")) - res.setFor(parseReference(json.getAsJsonObject("for"))); - if (json.has("context")) - res.setContext(parseReference(json.getAsJsonObject("context"))); - if (json.has("executionPeriod")) - res.setExecutionPeriod(parsePeriod(json.getAsJsonObject("executionPeriod"))); - if (json.has("authoredOn")) - res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); - if (json.has("_authoredOn")) - parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); - if (json.has("lastModified")) - res.setLastModifiedElement(parseDateTime(json.get("lastModified").getAsString())); - if (json.has("_lastModified")) - parseElementProperties(json.getAsJsonObject("_lastModified"), res.getLastModifiedElement()); - if (json.has("requester")) - res.setRequester(parseTaskTaskRequesterComponent(json.getAsJsonObject("requester"), res)); - if (json.has("performerType")) { - JsonArray array = json.getAsJsonArray("performerType"); - for (int i = 0; i < array.size(); i++) { - res.getPerformerType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("owner")) - res.setOwner(parseReference(json.getAsJsonObject("owner"))); - if (json.has("reason")) - res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - if (json.has("relevantHistory")) { - JsonArray array = json.getAsJsonArray("relevantHistory"); - for (int i = 0; i < array.size(); i++) { - res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("restriction")) - res.setRestriction(parseTaskTaskRestrictionComponent(json.getAsJsonObject("restriction"), res)); - if (json.has("input")) { - JsonArray array = json.getAsJsonArray("input"); - for (int i = 0; i < array.size(); i++) { - res.getInput().add(parseTaskParameterComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("output")) { - JsonArray array = json.getAsJsonArray("output"); - for (int i = 0; i < array.size(); i++) { - res.getOutput().add(parseTaskTaskOutputComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected Task.TaskRequesterComponent parseTaskTaskRequesterComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { - Task.TaskRequesterComponent res = new Task.TaskRequesterComponent(); - parseTaskTaskRequesterComponentProperties(json, owner, res); - return res; - } - - protected void parseTaskTaskRequesterComponentProperties(JsonObject json, Task owner, Task.TaskRequesterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("agent")) - res.setAgent(parseReference(json.getAsJsonObject("agent"))); - if (json.has("onBehalfOf")) - res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); - } - - protected Task.TaskRestrictionComponent parseTaskTaskRestrictionComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { - Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent(); - parseTaskTaskRestrictionComponentProperties(json, owner, res); - return res; - } - - protected void parseTaskTaskRestrictionComponentProperties(JsonObject json, Task owner, Task.TaskRestrictionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("repetitions")) - res.setRepetitionsElement(parsePositiveInt(json.get("repetitions").getAsString())); - if (json.has("_repetitions")) - parseElementProperties(json.getAsJsonObject("_repetitions"), res.getRepetitionsElement()); - if (json.has("period")) - res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); - if (json.has("recipient")) { - JsonArray array = json.getAsJsonArray("recipient"); - for (int i = 0; i < array.size(); i++) { - res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - } - - protected Task.ParameterComponent parseTaskParameterComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { - Task.ParameterComponent res = new Task.ParameterComponent(); - parseTaskParameterComponentProperties(json, owner, res); - return res; - } - - protected void parseTaskParameterComponentProperties(JsonObject json, Task owner, Task.ParameterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected Task.TaskOutputComponent parseTaskTaskOutputComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { - Task.TaskOutputComponent res = new Task.TaskOutputComponent(); - parseTaskTaskOutputComponentProperties(json, owner, res); - return res; - } - - protected void parseTaskTaskOutputComponentProperties(JsonObject json, Task owner, Task.TaskOutputComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected TestReport parseTestReport(JsonObject json) throws IOException, FHIRFormatError { - TestReport res = new TestReport(); - parseTestReportProperties(json, res); - return res; - } - - protected void parseTestReportProperties(JsonObject json, TestReport res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), TestReport.TestReportStatus.NULL, new TestReport.TestReportStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("testScript")) - res.setTestScript(parseReference(json.getAsJsonObject("testScript"))); - if (json.has("result")) - res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportResult.NULL, new TestReport.TestReportResultEnumFactory())); - if (json.has("_result")) - parseElementProperties(json.getAsJsonObject("_result"), res.getResultElement()); - if (json.has("score")) - res.setScoreElement(parseDecimal(json.get("score").getAsBigDecimal())); - if (json.has("_score")) - parseElementProperties(json.getAsJsonObject("_score"), res.getScoreElement()); - if (json.has("tester")) - res.setTesterElement(parseString(json.get("tester").getAsString())); - if (json.has("_tester")) - parseElementProperties(json.getAsJsonObject("_tester"), res.getTesterElement()); - if (json.has("issued")) - res.setIssuedElement(parseDateTime(json.get("issued").getAsString())); - if (json.has("_issued")) - parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); - if (json.has("participant")) { - JsonArray array = json.getAsJsonArray("participant"); - for (int i = 0; i < array.size(); i++) { - res.getParticipant().add(parseTestReportTestReportParticipantComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("setup")) - res.setSetup(parseTestReportTestReportSetupComponent(json.getAsJsonObject("setup"), res)); - if (json.has("test")) { - JsonArray array = json.getAsJsonArray("test"); - for (int i = 0; i < array.size(); i++) { - res.getTest().add(parseTestReportTestReportTestComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("teardown")) - res.setTeardown(parseTestReportTestReportTeardownComponent(json.getAsJsonObject("teardown"), res)); - } - - protected TestReport.TestReportParticipantComponent parseTestReportTestReportParticipantComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent(); - parseTestReportTestReportParticipantComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportTestReportParticipantComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportParticipantComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setTypeElement(parseEnumeration(json.get("type").getAsString(), TestReport.TestReportParticipantType.NULL, new TestReport.TestReportParticipantTypeEnumFactory())); - if (json.has("_type")) - parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); - if (json.has("uri")) - res.setUriElement(parseUri(json.get("uri").getAsString())); - if (json.has("_uri")) - parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - } - - protected TestReport.TestReportSetupComponent parseTestReportTestReportSetupComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent(); - parseTestReportTestReportSetupComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportTestReportSetupComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportSetupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseTestReportSetupActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.SetupActionComponent res = new TestReport.SetupActionComponent(); - parseTestReportSetupActionComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportSetupActionComponentProperties(JsonObject json, TestReport owner, TestReport.SetupActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("operation")) - res.setOperation(parseTestReportSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); - if (json.has("assert")) - res.setAssert(parseTestReportSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); - } - - protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent(); - parseTestReportSetupActionOperationComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportSetupActionOperationComponentProperties(JsonObject json, TestReport owner, TestReport.SetupActionOperationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("result")) - res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); - if (json.has("_result")) - parseElementProperties(json.getAsJsonObject("_result"), res.getResultElement()); - if (json.has("message")) - res.setMessageElement(parseMarkdown(json.get("message").getAsString())); - if (json.has("_message")) - parseElementProperties(json.getAsJsonObject("_message"), res.getMessageElement()); - if (json.has("detail")) - res.setDetailElement(parseUri(json.get("detail").getAsString())); - if (json.has("_detail")) - parseElementProperties(json.getAsJsonObject("_detail"), res.getDetailElement()); - } - - protected TestReport.SetupActionAssertComponent parseTestReportSetupActionAssertComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent(); - parseTestReportSetupActionAssertComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportSetupActionAssertComponentProperties(JsonObject json, TestReport owner, TestReport.SetupActionAssertComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("result")) - res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); - if (json.has("_result")) - parseElementProperties(json.getAsJsonObject("_result"), res.getResultElement()); - if (json.has("message")) - res.setMessageElement(parseMarkdown(json.get("message").getAsString())); - if (json.has("_message")) - parseElementProperties(json.getAsJsonObject("_message"), res.getMessageElement()); - if (json.has("detail")) - res.setDetailElement(parseString(json.get("detail").getAsString())); - if (json.has("_detail")) - parseElementProperties(json.getAsJsonObject("_detail"), res.getDetailElement()); - } - - protected TestReport.TestReportTestComponent parseTestReportTestReportTestComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent(); - parseTestReportTestReportTestComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportTestReportTestComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportTestComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseTestReportTestActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestReport.TestActionComponent parseTestReportTestActionComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.TestActionComponent res = new TestReport.TestActionComponent(); - parseTestReportTestActionComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportTestActionComponentProperties(JsonObject json, TestReport owner, TestReport.TestActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("operation")) - res.setOperation(parseTestReportSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); - if (json.has("assert")) - res.setAssert(parseTestReportSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); - } - - protected TestReport.TestReportTeardownComponent parseTestReportTestReportTeardownComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent(); - parseTestReportTestReportTeardownComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportTestReportTeardownComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportTeardownComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseTestReportTeardownActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { - TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent(); - parseTestReportTeardownActionComponentProperties(json, owner, res); - return res; - } - - protected void parseTestReportTeardownActionComponentProperties(JsonObject json, TestReport owner, TestReport.TeardownActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("operation")) - res.setOperation(parseTestReportSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); - } - - protected TestScript parseTestScript(JsonObject json) throws IOException, FHIRFormatError { - TestScript res = new TestScript(); - parseTestScriptProperties(json, res); - return res; - } - - protected void parseTestScriptProperties(JsonObject json, TestScript res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) - res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("origin")) { - JsonArray array = json.getAsJsonArray("origin"); - for (int i = 0; i < array.size(); i++) { - res.getOrigin().add(parseTestScriptTestScriptOriginComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("destination")) { - JsonArray array = json.getAsJsonArray("destination"); - for (int i = 0; i < array.size(); i++) { - res.getDestination().add(parseTestScriptTestScriptDestinationComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("metadata")) - res.setMetadata(parseTestScriptTestScriptMetadataComponent(json.getAsJsonObject("metadata"), res)); - if (json.has("fixture")) { - JsonArray array = json.getAsJsonArray("fixture"); - for (int i = 0; i < array.size(); i++) { - res.getFixture().add(parseTestScriptTestScriptFixtureComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("profile")) { - JsonArray array = json.getAsJsonArray("profile"); - for (int i = 0; i < array.size(); i++) { - res.getProfile().add(parseReference(array.get(i).getAsJsonObject())); - } - }; - if (json.has("variable")) { - JsonArray array = json.getAsJsonArray("variable"); - for (int i = 0; i < array.size(); i++) { - res.getVariable().add(parseTestScriptTestScriptVariableComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("rule")) { - JsonArray array = json.getAsJsonArray("rule"); - for (int i = 0; i < array.size(); i++) { - res.getRule().add(parseTestScriptTestScriptRuleComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("ruleset")) { - JsonArray array = json.getAsJsonArray("ruleset"); - for (int i = 0; i < array.size(); i++) { - res.getRuleset().add(parseTestScriptTestScriptRulesetComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("setup")) - res.setSetup(parseTestScriptTestScriptSetupComponent(json.getAsJsonObject("setup"), res)); - if (json.has("test")) { - JsonArray array = json.getAsJsonArray("test"); - for (int i = 0; i < array.size(); i++) { - res.getTest().add(parseTestScriptTestScriptTestComponent(array.get(i).getAsJsonObject(), res)); - } - }; - if (json.has("teardown")) - res.setTeardown(parseTestScriptTestScriptTeardownComponent(json.getAsJsonObject("teardown"), res)); - } - - protected TestScript.TestScriptOriginComponent parseTestScriptTestScriptOriginComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent(); - parseTestScriptTestScriptOriginComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptOriginComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptOriginComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("index")) - res.setIndexElement(parseInteger(json.get("index").getAsLong())); - if (json.has("_index")) - parseElementProperties(json.getAsJsonObject("_index"), res.getIndexElement()); - if (json.has("profile")) - res.setProfile(parseCoding(json.getAsJsonObject("profile"))); - } - - protected TestScript.TestScriptDestinationComponent parseTestScriptTestScriptDestinationComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent(); - parseTestScriptTestScriptDestinationComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptDestinationComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptDestinationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("index")) - res.setIndexElement(parseInteger(json.get("index").getAsLong())); - if (json.has("_index")) - parseElementProperties(json.getAsJsonObject("_index"), res.getIndexElement()); - if (json.has("profile")) - res.setProfile(parseCoding(json.getAsJsonObject("profile"))); - } - - protected TestScript.TestScriptMetadataComponent parseTestScriptTestScriptMetadataComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent(); - parseTestScriptTestScriptMetadataComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptMetadataComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptMetadataComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parseTestScriptTestScriptMetadataLinkComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("capability")) { - JsonArray array = json.getAsJsonArray("capability"); - for (int i = 0; i < array.size(); i++) { - res.getCapability().add(parseTestScriptTestScriptMetadataCapabilityComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.TestScriptMetadataLinkComponent parseTestScriptTestScriptMetadataLinkComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent(); - parseTestScriptTestScriptMetadataLinkComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptMetadataLinkComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptMetadataLinkComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - } - - protected TestScript.TestScriptMetadataCapabilityComponent parseTestScriptTestScriptMetadataCapabilityComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent(); - parseTestScriptTestScriptMetadataCapabilityComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptMetadataCapabilityComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptMetadataCapabilityComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("required")) - res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean())); - if (json.has("_required")) - parseElementProperties(json.getAsJsonObject("_required"), res.getRequiredElement()); - if (json.has("validated")) - res.setValidatedElement(parseBoolean(json.get("validated").getAsBoolean())); - if (json.has("_validated")) - parseElementProperties(json.getAsJsonObject("_validated"), res.getValidatedElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("origin")) { - JsonArray array = json.getAsJsonArray("origin"); - for (int i = 0; i < array.size(); i++) { - res.getOrigin().add(parseInteger(array.get(i).getAsLong())); - } - }; - if (json.has("_origin")) { - JsonArray array = json.getAsJsonArray("_origin"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getOrigin().size()) - res.getOrigin().add(parseInteger(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getOrigin().get(i)); - } - }; - if (json.has("destination")) - res.setDestinationElement(parseInteger(json.get("destination").getAsLong())); - if (json.has("_destination")) - parseElementProperties(json.getAsJsonObject("_destination"), res.getDestinationElement()); - if (json.has("link")) { - JsonArray array = json.getAsJsonArray("link"); - for (int i = 0; i < array.size(); i++) { - res.getLink().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_link")) { - JsonArray array = json.getAsJsonArray("_link"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getLink().size()) - res.getLink().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getLink().get(i)); - } - }; - if (json.has("capabilities")) - res.setCapabilities(parseReference(json.getAsJsonObject("capabilities"))); - } - - protected TestScript.TestScriptFixtureComponent parseTestScriptTestScriptFixtureComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent(); - parseTestScriptTestScriptFixtureComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptFixtureComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptFixtureComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("autocreate")) - res.setAutocreateElement(parseBoolean(json.get("autocreate").getAsBoolean())); - if (json.has("_autocreate")) - parseElementProperties(json.getAsJsonObject("_autocreate"), res.getAutocreateElement()); - if (json.has("autodelete")) - res.setAutodeleteElement(parseBoolean(json.get("autodelete").getAsBoolean())); - if (json.has("_autodelete")) - parseElementProperties(json.getAsJsonObject("_autodelete"), res.getAutodeleteElement()); - if (json.has("resource")) - res.setResource(parseReference(json.getAsJsonObject("resource"))); - } - - protected TestScript.TestScriptVariableComponent parseTestScriptTestScriptVariableComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent(); - parseTestScriptTestScriptVariableComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptVariableComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptVariableComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("defaultValue")) - res.setDefaultValueElement(parseString(json.get("defaultValue").getAsString())); - if (json.has("_defaultValue")) - parseElementProperties(json.getAsJsonObject("_defaultValue"), res.getDefaultValueElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - if (json.has("headerField")) - res.setHeaderFieldElement(parseString(json.get("headerField").getAsString())); - if (json.has("_headerField")) - parseElementProperties(json.getAsJsonObject("_headerField"), res.getHeaderFieldElement()); - if (json.has("hint")) - res.setHintElement(parseString(json.get("hint").getAsString())); - if (json.has("_hint")) - parseElementProperties(json.getAsJsonObject("_hint"), res.getHintElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("sourceId")) - res.setSourceIdElement(parseId(json.get("sourceId").getAsString())); - if (json.has("_sourceId")) - parseElementProperties(json.getAsJsonObject("_sourceId"), res.getSourceIdElement()); - } - - protected TestScript.TestScriptRuleComponent parseTestScriptTestScriptRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptRuleComponent res = new TestScript.TestScriptRuleComponent(); - parseTestScriptTestScriptRuleComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptRuleComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptRuleComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("resource")) - res.setResource(parseReference(json.getAsJsonObject("resource"))); - if (json.has("param")) { - JsonArray array = json.getAsJsonArray("param"); - for (int i = 0; i < array.size(); i++) { - res.getParam().add(parseTestScriptRuleParamComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.RuleParamComponent parseTestScriptRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.RuleParamComponent res = new TestScript.RuleParamComponent(); - parseTestScriptRuleParamComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.RuleParamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected TestScript.TestScriptRulesetComponent parseTestScriptTestScriptRulesetComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptRulesetComponent res = new TestScript.TestScriptRulesetComponent(); - parseTestScriptTestScriptRulesetComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptRulesetComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptRulesetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("resource")) - res.setResource(parseReference(json.getAsJsonObject("resource"))); - if (json.has("rule")) { - JsonArray array = json.getAsJsonArray("rule"); - for (int i = 0; i < array.size(); i++) { - res.getRule().add(parseTestScriptRulesetRuleComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.RulesetRuleComponent parseTestScriptRulesetRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.RulesetRuleComponent res = new TestScript.RulesetRuleComponent(); - parseTestScriptRulesetRuleComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptRulesetRuleComponentProperties(JsonObject json, TestScript owner, TestScript.RulesetRuleComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("ruleId")) - res.setRuleIdElement(parseId(json.get("ruleId").getAsString())); - if (json.has("_ruleId")) - parseElementProperties(json.getAsJsonObject("_ruleId"), res.getRuleIdElement()); - if (json.has("param")) { - JsonArray array = json.getAsJsonArray("param"); - for (int i = 0; i < array.size(); i++) { - res.getParam().add(parseTestScriptRulesetRuleParamComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.RulesetRuleParamComponent parseTestScriptRulesetRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.RulesetRuleParamComponent res = new TestScript.RulesetRuleParamComponent(); - parseTestScriptRulesetRuleParamComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptRulesetRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.RulesetRuleParamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected TestScript.TestScriptSetupComponent parseTestScriptTestScriptSetupComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent(); - parseTestScriptTestScriptSetupComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptSetupComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptSetupComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseTestScriptSetupActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.SetupActionComponent res = new TestScript.SetupActionComponent(); - parseTestScriptSetupActionComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptSetupActionComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("operation")) - res.setOperation(parseTestScriptSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); - if (json.has("assert")) - res.setAssert(parseTestScriptSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); - } - - protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent(); - parseTestScriptSetupActionOperationComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptSetupActionOperationComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionOperationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("type")) - res.setType(parseCoding(json.getAsJsonObject("type"))); - if (json.has("resource")) - res.setResourceElement(parseCode(json.get("resource").getAsString())); - if (json.has("_resource")) - parseElementProperties(json.getAsJsonObject("_resource"), res.getResourceElement()); - if (json.has("label")) - res.setLabelElement(parseString(json.get("label").getAsString())); - if (json.has("_label")) - parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("accept")) - res.setAcceptElement(parseEnumeration(json.get("accept").getAsString(), TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); - if (json.has("_accept")) - parseElementProperties(json.getAsJsonObject("_accept"), res.getAcceptElement()); - if (json.has("contentType")) - res.setContentTypeElement(parseEnumeration(json.get("contentType").getAsString(), TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); - if (json.has("_contentType")) - parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); - if (json.has("destination")) - res.setDestinationElement(parseInteger(json.get("destination").getAsLong())); - if (json.has("_destination")) - parseElementProperties(json.getAsJsonObject("_destination"), res.getDestinationElement()); - if (json.has("encodeRequestUrl")) - res.setEncodeRequestUrlElement(parseBoolean(json.get("encodeRequestUrl").getAsBoolean())); - if (json.has("_encodeRequestUrl")) - parseElementProperties(json.getAsJsonObject("_encodeRequestUrl"), res.getEncodeRequestUrlElement()); - if (json.has("origin")) - res.setOriginElement(parseInteger(json.get("origin").getAsLong())); - if (json.has("_origin")) - parseElementProperties(json.getAsJsonObject("_origin"), res.getOriginElement()); - if (json.has("params")) - res.setParamsElement(parseString(json.get("params").getAsString())); - if (json.has("_params")) - parseElementProperties(json.getAsJsonObject("_params"), res.getParamsElement()); - if (json.has("requestHeader")) { - JsonArray array = json.getAsJsonArray("requestHeader"); - for (int i = 0; i < array.size(); i++) { - res.getRequestHeader().add(parseTestScriptSetupActionOperationRequestHeaderComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("requestId")) - res.setRequestIdElement(parseId(json.get("requestId").getAsString())); - if (json.has("_requestId")) - parseElementProperties(json.getAsJsonObject("_requestId"), res.getRequestIdElement()); - if (json.has("responseId")) - res.setResponseIdElement(parseId(json.get("responseId").getAsString())); - if (json.has("_responseId")) - parseElementProperties(json.getAsJsonObject("_responseId"), res.getResponseIdElement()); - if (json.has("sourceId")) - res.setSourceIdElement(parseId(json.get("sourceId").getAsString())); - if (json.has("_sourceId")) - parseElementProperties(json.getAsJsonObject("_sourceId"), res.getSourceIdElement()); - if (json.has("targetId")) - res.setTargetIdElement(parseId(json.get("targetId").getAsString())); - if (json.has("_targetId")) - parseElementProperties(json.getAsJsonObject("_targetId"), res.getTargetIdElement()); - if (json.has("url")) - res.setUrlElement(parseString(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - } - - protected TestScript.SetupActionOperationRequestHeaderComponent parseTestScriptSetupActionOperationRequestHeaderComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent(); - parseTestScriptSetupActionOperationRequestHeaderComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptSetupActionOperationRequestHeaderComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionOperationRequestHeaderComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("field")) - res.setFieldElement(parseString(json.get("field").getAsString())); - if (json.has("_field")) - parseElementProperties(json.getAsJsonObject("_field"), res.getFieldElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected TestScript.SetupActionAssertComponent parseTestScriptSetupActionAssertComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent(); - parseTestScriptSetupActionAssertComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptSetupActionAssertComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionAssertComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("label")) - res.setLabelElement(parseString(json.get("label").getAsString())); - if (json.has("_label")) - parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("direction")) - res.setDirectionElement(parseEnumeration(json.get("direction").getAsString(), TestScript.AssertionDirectionType.NULL, new TestScript.AssertionDirectionTypeEnumFactory())); - if (json.has("_direction")) - parseElementProperties(json.getAsJsonObject("_direction"), res.getDirectionElement()); - if (json.has("compareToSourceId")) - res.setCompareToSourceIdElement(parseString(json.get("compareToSourceId").getAsString())); - if (json.has("_compareToSourceId")) - parseElementProperties(json.getAsJsonObject("_compareToSourceId"), res.getCompareToSourceIdElement()); - if (json.has("compareToSourceExpression")) - res.setCompareToSourceExpressionElement(parseString(json.get("compareToSourceExpression").getAsString())); - if (json.has("_compareToSourceExpression")) - parseElementProperties(json.getAsJsonObject("_compareToSourceExpression"), res.getCompareToSourceExpressionElement()); - if (json.has("compareToSourcePath")) - res.setCompareToSourcePathElement(parseString(json.get("compareToSourcePath").getAsString())); - if (json.has("_compareToSourcePath")) - parseElementProperties(json.getAsJsonObject("_compareToSourcePath"), res.getCompareToSourcePathElement()); - if (json.has("contentType")) - res.setContentTypeElement(parseEnumeration(json.get("contentType").getAsString(), TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); - if (json.has("_contentType")) - parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); - if (json.has("expression")) - res.setExpressionElement(parseString(json.get("expression").getAsString())); - if (json.has("_expression")) - parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); - if (json.has("headerField")) - res.setHeaderFieldElement(parseString(json.get("headerField").getAsString())); - if (json.has("_headerField")) - parseElementProperties(json.getAsJsonObject("_headerField"), res.getHeaderFieldElement()); - if (json.has("minimumId")) - res.setMinimumIdElement(parseString(json.get("minimumId").getAsString())); - if (json.has("_minimumId")) - parseElementProperties(json.getAsJsonObject("_minimumId"), res.getMinimumIdElement()); - if (json.has("navigationLinks")) - res.setNavigationLinksElement(parseBoolean(json.get("navigationLinks").getAsBoolean())); - if (json.has("_navigationLinks")) - parseElementProperties(json.getAsJsonObject("_navigationLinks"), res.getNavigationLinksElement()); - if (json.has("operator")) - res.setOperatorElement(parseEnumeration(json.get("operator").getAsString(), TestScript.AssertionOperatorType.NULL, new TestScript.AssertionOperatorTypeEnumFactory())); - if (json.has("_operator")) - parseElementProperties(json.getAsJsonObject("_operator"), res.getOperatorElement()); - if (json.has("path")) - res.setPathElement(parseString(json.get("path").getAsString())); - if (json.has("_path")) - parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); - if (json.has("requestMethod")) - res.setRequestMethodElement(parseEnumeration(json.get("requestMethod").getAsString(), TestScript.TestScriptRequestMethodCode.NULL, new TestScript.TestScriptRequestMethodCodeEnumFactory())); - if (json.has("_requestMethod")) - parseElementProperties(json.getAsJsonObject("_requestMethod"), res.getRequestMethodElement()); - if (json.has("requestURL")) - res.setRequestURLElement(parseString(json.get("requestURL").getAsString())); - if (json.has("_requestURL")) - parseElementProperties(json.getAsJsonObject("_requestURL"), res.getRequestURLElement()); - if (json.has("resource")) - res.setResourceElement(parseCode(json.get("resource").getAsString())); - if (json.has("_resource")) - parseElementProperties(json.getAsJsonObject("_resource"), res.getResourceElement()); - if (json.has("response")) - res.setResponseElement(parseEnumeration(json.get("response").getAsString(), TestScript.AssertionResponseTypes.NULL, new TestScript.AssertionResponseTypesEnumFactory())); - if (json.has("_response")) - parseElementProperties(json.getAsJsonObject("_response"), res.getResponseElement()); - if (json.has("responseCode")) - res.setResponseCodeElement(parseString(json.get("responseCode").getAsString())); - if (json.has("_responseCode")) - parseElementProperties(json.getAsJsonObject("_responseCode"), res.getResponseCodeElement()); - if (json.has("rule")) - res.setRule(parseTestScriptActionAssertRuleComponent(json.getAsJsonObject("rule"), owner)); - if (json.has("ruleset")) - res.setRuleset(parseTestScriptActionAssertRulesetComponent(json.getAsJsonObject("ruleset"), owner)); - if (json.has("sourceId")) - res.setSourceIdElement(parseId(json.get("sourceId").getAsString())); - if (json.has("_sourceId")) - parseElementProperties(json.getAsJsonObject("_sourceId"), res.getSourceIdElement()); - if (json.has("validateProfileId")) - res.setValidateProfileIdElement(parseId(json.get("validateProfileId").getAsString())); - if (json.has("_validateProfileId")) - parseElementProperties(json.getAsJsonObject("_validateProfileId"), res.getValidateProfileIdElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - if (json.has("warningOnly")) - res.setWarningOnlyElement(parseBoolean(json.get("warningOnly").getAsBoolean())); - if (json.has("_warningOnly")) - parseElementProperties(json.getAsJsonObject("_warningOnly"), res.getWarningOnlyElement()); - } - - protected TestScript.ActionAssertRuleComponent parseTestScriptActionAssertRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.ActionAssertRuleComponent res = new TestScript.ActionAssertRuleComponent(); - parseTestScriptActionAssertRuleComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptActionAssertRuleComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRuleComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("ruleId")) - res.setRuleIdElement(parseId(json.get("ruleId").getAsString())); - if (json.has("_ruleId")) - parseElementProperties(json.getAsJsonObject("_ruleId"), res.getRuleIdElement()); - if (json.has("param")) { - JsonArray array = json.getAsJsonArray("param"); - for (int i = 0; i < array.size(); i++) { - res.getParam().add(parseTestScriptActionAssertRuleParamComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.ActionAssertRuleParamComponent parseTestScriptActionAssertRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.ActionAssertRuleParamComponent res = new TestScript.ActionAssertRuleParamComponent(); - parseTestScriptActionAssertRuleParamComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptActionAssertRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRuleParamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected TestScript.ActionAssertRulesetComponent parseTestScriptActionAssertRulesetComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.ActionAssertRulesetComponent res = new TestScript.ActionAssertRulesetComponent(); - parseTestScriptActionAssertRulesetComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptActionAssertRulesetComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRulesetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("rulesetId")) - res.setRulesetIdElement(parseId(json.get("rulesetId").getAsString())); - if (json.has("_rulesetId")) - parseElementProperties(json.getAsJsonObject("_rulesetId"), res.getRulesetIdElement()); - if (json.has("rule")) { - JsonArray array = json.getAsJsonArray("rule"); - for (int i = 0; i < array.size(); i++) { - res.getRule().add(parseTestScriptActionAssertRulesetRuleComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.ActionAssertRulesetRuleComponent parseTestScriptActionAssertRulesetRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.ActionAssertRulesetRuleComponent res = new TestScript.ActionAssertRulesetRuleComponent(); - parseTestScriptActionAssertRulesetRuleComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptActionAssertRulesetRuleComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRulesetRuleComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("ruleId")) - res.setRuleIdElement(parseId(json.get("ruleId").getAsString())); - if (json.has("_ruleId")) - parseElementProperties(json.getAsJsonObject("_ruleId"), res.getRuleIdElement()); - if (json.has("param")) { - JsonArray array = json.getAsJsonArray("param"); - for (int i = 0; i < array.size(); i++) { - res.getParam().add(parseTestScriptActionAssertRulesetRuleParamComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.ActionAssertRulesetRuleParamComponent parseTestScriptActionAssertRulesetRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.ActionAssertRulesetRuleParamComponent res = new TestScript.ActionAssertRulesetRuleParamComponent(); - parseTestScriptActionAssertRulesetRuleParamComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptActionAssertRulesetRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRulesetRuleParamComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected TestScript.TestScriptTestComponent parseTestScriptTestScriptTestComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent(); - parseTestScriptTestScriptTestComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptTestComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptTestComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("description")) - res.setDescriptionElement(parseString(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseTestScriptTestActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.TestActionComponent parseTestScriptTestActionComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestActionComponent res = new TestScript.TestActionComponent(); - parseTestScriptTestActionComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestActionComponentProperties(JsonObject json, TestScript owner, TestScript.TestActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("operation")) - res.setOperation(parseTestScriptSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); - if (json.has("assert")) - res.setAssert(parseTestScriptSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); - } - - protected TestScript.TestScriptTeardownComponent parseTestScriptTestScriptTeardownComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent(); - parseTestScriptTestScriptTeardownComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTestScriptTeardownComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptTeardownComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("action")) { - JsonArray array = json.getAsJsonArray("action"); - for (int i = 0; i < array.size(); i++) { - res.getAction().add(parseTestScriptTeardownActionComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { - TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent(); - parseTestScriptTeardownActionComponentProperties(json, owner, res); - return res; - } - - protected void parseTestScriptTeardownActionComponentProperties(JsonObject json, TestScript owner, TestScript.TeardownActionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("operation")) - res.setOperation(parseTestScriptSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); - } - - protected ValueSet parseValueSet(JsonObject json) throws IOException, FHIRFormatError { - ValueSet res = new ValueSet(); - parseValueSetProperties(json, res); - return res; - } - - protected void parseValueSetProperties(JsonObject json, ValueSet res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("url")) - res.setUrlElement(parseUri(json.get("url").getAsString())); - if (json.has("_url")) - parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - if (json.has("title")) - res.setTitleElement(parseString(json.get("title").getAsString())); - if (json.has("_title")) - parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("experimental")) - res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); - if (json.has("_experimental")) - parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); - if (json.has("date")) - res.setDateElement(parseDateTime(json.get("date").getAsString())); - if (json.has("_date")) - parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); - if (json.has("publisher")) - res.setPublisherElement(parseString(json.get("publisher").getAsString())); - if (json.has("_publisher")) - parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); - if (json.has("contact")) { - JsonArray array = json.getAsJsonArray("contact"); - for (int i = 0; i < array.size(); i++) { - res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); - } - }; - if (json.has("description")) - res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); - if (json.has("_description")) - parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); - if (json.has("useContext")) { - JsonArray array = json.getAsJsonArray("useContext"); - for (int i = 0; i < array.size(); i++) { - res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); - } - }; - if (json.has("jurisdiction")) { - JsonArray array = json.getAsJsonArray("jurisdiction"); - for (int i = 0; i < array.size(); i++) { - res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); - } - }; - if (json.has("immutable")) - res.setImmutableElement(parseBoolean(json.get("immutable").getAsBoolean())); - if (json.has("_immutable")) - parseElementProperties(json.getAsJsonObject("_immutable"), res.getImmutableElement()); - if (json.has("purpose")) - res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); - if (json.has("_purpose")) - parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); - if (json.has("copyright")) - res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); - if (json.has("_copyright")) - parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); - if (json.has("extensible")) - res.setExtensibleElement(parseBoolean(json.get("extensible").getAsBoolean())); - if (json.has("_extensible")) - parseElementProperties(json.getAsJsonObject("_extensible"), res.getExtensibleElement()); - if (json.has("compose")) - res.setCompose(parseValueSetValueSetComposeComponent(json.getAsJsonObject("compose"), res)); - if (json.has("expansion")) - res.setExpansion(parseValueSetValueSetExpansionComponent(json.getAsJsonObject("expansion"), res)); - } - - protected ValueSet.ValueSetComposeComponent parseValueSetValueSetComposeComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent(); - parseValueSetValueSetComposeComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetValueSetComposeComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetComposeComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("lockedDate")) - res.setLockedDateElement(parseDate(json.get("lockedDate").getAsString())); - if (json.has("_lockedDate")) - parseElementProperties(json.getAsJsonObject("_lockedDate"), res.getLockedDateElement()); - if (json.has("inactive")) - res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean())); - if (json.has("_inactive")) - parseElementProperties(json.getAsJsonObject("_inactive"), res.getInactiveElement()); - if (json.has("include")) { - JsonArray array = json.getAsJsonArray("include"); - for (int i = 0; i < array.size(); i++) { - res.getInclude().add(parseValueSetConceptSetComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("exclude")) { - JsonArray array = json.getAsJsonArray("exclude"); - for (int i = 0; i < array.size(); i++) { - res.getExclude().add(parseValueSetConceptSetComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent(); - parseValueSetConceptSetComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetConceptSetComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptSetComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("concept")) { - JsonArray array = json.getAsJsonArray("concept"); - for (int i = 0; i < array.size(); i++) { - res.getConcept().add(parseValueSetConceptReferenceComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("filter")) { - JsonArray array = json.getAsJsonArray("filter"); - for (int i = 0; i < array.size(); i++) { - res.getFilter().add(parseValueSetConceptSetFilterComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("valueSet")) { - JsonArray array = json.getAsJsonArray("valueSet"); - for (int i = 0; i < array.size(); i++) { - res.getValueSet().add(parseUri(array.get(i).getAsString())); - } - }; - if (json.has("_valueSet")) { - JsonArray array = json.getAsJsonArray("_valueSet"); - for (int i = 0; i < array.size(); i++) { - if (i == res.getValueSet().size()) - res.getValueSet().add(parseUri(null)); - if (array.get(i) instanceof JsonObject) - parseElementProperties(array.get(i).getAsJsonObject(), res.getValueSet().get(i)); - } - }; - } - - protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent(); - parseValueSetConceptReferenceComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetConceptReferenceComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptReferenceComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("designation")) { - JsonArray array = json.getAsJsonArray("designation"); - for (int i = 0; i < array.size(); i++) { - res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent(); - parseValueSetConceptReferenceDesignationComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetConceptReferenceDesignationComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptReferenceDesignationComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("language")) - res.setLanguageElement(parseCode(json.get("language").getAsString())); - if (json.has("_language")) - parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); - if (json.has("use")) - res.setUse(parseCoding(json.getAsJsonObject("use"))); - if (json.has("value")) - res.setValueElement(parseString(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent(); - parseValueSetConceptSetFilterComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetConceptSetFilterComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptSetFilterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("property")) - res.setPropertyElement(parseCode(json.get("property").getAsString())); - if (json.has("_property")) - parseElementProperties(json.getAsJsonObject("_property"), res.getPropertyElement()); - if (json.has("op")) - res.setOpElement(parseEnumeration(json.get("op").getAsString(), ValueSet.FilterOperator.NULL, new ValueSet.FilterOperatorEnumFactory())); - if (json.has("_op")) - parseElementProperties(json.getAsJsonObject("_op"), res.getOpElement()); - if (json.has("value")) - res.setValueElement(parseCode(json.get("value").getAsString())); - if (json.has("_value")) - parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); - } - - protected ValueSet.ValueSetExpansionComponent parseValueSetValueSetExpansionComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent(); - parseValueSetValueSetExpansionComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetValueSetExpansionComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetExpansionComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("identifier")) - res.setIdentifierElement(parseUri(json.get("identifier").getAsString())); - if (json.has("_identifier")) - parseElementProperties(json.getAsJsonObject("_identifier"), res.getIdentifierElement()); - if (json.has("timestamp")) - res.setTimestampElement(parseDateTime(json.get("timestamp").getAsString())); - if (json.has("_timestamp")) - parseElementProperties(json.getAsJsonObject("_timestamp"), res.getTimestampElement()); - if (json.has("total")) - res.setTotalElement(parseInteger(json.get("total").getAsLong())); - if (json.has("_total")) - parseElementProperties(json.getAsJsonObject("_total"), res.getTotalElement()); - if (json.has("offset")) - res.setOffsetElement(parseInteger(json.get("offset").getAsLong())); - if (json.has("_offset")) - parseElementProperties(json.getAsJsonObject("_offset"), res.getOffsetElement()); - if (json.has("parameter")) { - JsonArray array = json.getAsJsonArray("parameter"); - for (int i = 0; i < array.size(); i++) { - res.getParameter().add(parseValueSetValueSetExpansionParameterComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("contains")) { - JsonArray array = json.getAsJsonArray("contains"); - for (int i = 0; i < array.size(); i++) { - res.getContains().add(parseValueSetValueSetExpansionContainsComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected ValueSet.ValueSetExpansionParameterComponent parseValueSetValueSetExpansionParameterComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent(); - parseValueSetValueSetExpansionParameterComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetValueSetExpansionParameterComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetExpansionParameterComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("name")) - res.setNameElement(parseString(json.get("name").getAsString())); - if (json.has("_name")) - parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); - Type value = parseType("value", json); - if (value != null) - res.setValue(value); - } - - protected ValueSet.ValueSetExpansionContainsComponent parseValueSetValueSetExpansionContainsComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { - ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent(); - parseValueSetValueSetExpansionContainsComponentProperties(json, owner, res); - return res; - } - - protected void parseValueSetValueSetExpansionContainsComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetExpansionContainsComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("system")) - res.setSystemElement(parseUri(json.get("system").getAsString())); - if (json.has("_system")) - parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); - if (json.has("abstract")) - res.setAbstractElement(parseBoolean(json.get("abstract").getAsBoolean())); - if (json.has("_abstract")) - parseElementProperties(json.getAsJsonObject("_abstract"), res.getAbstractElement()); - if (json.has("inactive")) - res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean())); - if (json.has("_inactive")) - parseElementProperties(json.getAsJsonObject("_inactive"), res.getInactiveElement()); - if (json.has("version")) - res.setVersionElement(parseString(json.get("version").getAsString())); - if (json.has("_version")) - parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); - if (json.has("code")) - res.setCodeElement(parseCode(json.get("code").getAsString())); - if (json.has("_code")) - parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); - if (json.has("display")) - res.setDisplayElement(parseString(json.get("display").getAsString())); - if (json.has("_display")) - parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); - if (json.has("designation")) { - JsonArray array = json.getAsJsonArray("designation"); - for (int i = 0; i < array.size(); i++) { - res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - if (json.has("contains")) { - JsonArray array = json.getAsJsonArray("contains"); - for (int i = 0; i < array.size(); i++) { - res.getContains().add(parseValueSetValueSetExpansionContainsComponent(array.get(i).getAsJsonObject(), owner)); - } - }; - } - - protected VisionPrescription parseVisionPrescription(JsonObject json) throws IOException, FHIRFormatError { - VisionPrescription res = new VisionPrescription(); - parseVisionPrescriptionProperties(json, res); - return res; - } - - protected void parseVisionPrescriptionProperties(JsonObject json, VisionPrescription res) throws IOException, FHIRFormatError { - parseDomainResourceProperties(json, res); - if (json.has("identifier")) { - JsonArray array = json.getAsJsonArray("identifier"); - for (int i = 0; i < array.size(); i++) { - res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); - } - }; - if (json.has("status")) - res.setStatusElement(parseEnumeration(json.get("status").getAsString(), VisionPrescription.VisionStatus.NULL, new VisionPrescription.VisionStatusEnumFactory())); - if (json.has("_status")) - parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); - if (json.has("patient")) - res.setPatient(parseReference(json.getAsJsonObject("patient"))); - if (json.has("encounter")) - res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); - if (json.has("dateWritten")) - res.setDateWrittenElement(parseDateTime(json.get("dateWritten").getAsString())); - if (json.has("_dateWritten")) - parseElementProperties(json.getAsJsonObject("_dateWritten"), res.getDateWrittenElement()); - if (json.has("prescriber")) - res.setPrescriber(parseReference(json.getAsJsonObject("prescriber"))); - Type reason = parseType("reason", json); - if (reason != null) - res.setReason(reason); - if (json.has("dispense")) { - JsonArray array = json.getAsJsonArray("dispense"); - for (int i = 0; i < array.size(); i++) { - res.getDispense().add(parseVisionPrescriptionVisionPrescriptionDispenseComponent(array.get(i).getAsJsonObject(), res)); - } - }; - } - - protected VisionPrescription.VisionPrescriptionDispenseComponent parseVisionPrescriptionVisionPrescriptionDispenseComponent(JsonObject json, VisionPrescription owner) throws IOException, FHIRFormatError { - VisionPrescription.VisionPrescriptionDispenseComponent res = new VisionPrescription.VisionPrescriptionDispenseComponent(); - parseVisionPrescriptionVisionPrescriptionDispenseComponentProperties(json, owner, res); - return res; - } - - protected void parseVisionPrescriptionVisionPrescriptionDispenseComponentProperties(JsonObject json, VisionPrescription owner, VisionPrescription.VisionPrescriptionDispenseComponent res) throws IOException, FHIRFormatError { - parseBackboneProperties(json, res); - if (json.has("product")) - res.setProduct(parseCodeableConcept(json.getAsJsonObject("product"))); - if (json.has("eye")) - res.setEyeElement(parseEnumeration(json.get("eye").getAsString(), VisionPrescription.VisionEyes.NULL, new VisionPrescription.VisionEyesEnumFactory())); - if (json.has("_eye")) - parseElementProperties(json.getAsJsonObject("_eye"), res.getEyeElement()); - if (json.has("sphere")) - res.setSphereElement(parseDecimal(json.get("sphere").getAsBigDecimal())); - if (json.has("_sphere")) - parseElementProperties(json.getAsJsonObject("_sphere"), res.getSphereElement()); - if (json.has("cylinder")) - res.setCylinderElement(parseDecimal(json.get("cylinder").getAsBigDecimal())); - if (json.has("_cylinder")) - parseElementProperties(json.getAsJsonObject("_cylinder"), res.getCylinderElement()); - if (json.has("axis")) - res.setAxisElement(parseInteger(json.get("axis").getAsLong())); - if (json.has("_axis")) - parseElementProperties(json.getAsJsonObject("_axis"), res.getAxisElement()); - if (json.has("prism")) - res.setPrismElement(parseDecimal(json.get("prism").getAsBigDecimal())); - if (json.has("_prism")) - parseElementProperties(json.getAsJsonObject("_prism"), res.getPrismElement()); - if (json.has("base")) - res.setBaseElement(parseEnumeration(json.get("base").getAsString(), VisionPrescription.VisionBase.NULL, new VisionPrescription.VisionBaseEnumFactory())); - if (json.has("_base")) - parseElementProperties(json.getAsJsonObject("_base"), res.getBaseElement()); - if (json.has("add")) - res.setAddElement(parseDecimal(json.get("add").getAsBigDecimal())); - if (json.has("_add")) - parseElementProperties(json.getAsJsonObject("_add"), res.getAddElement()); - if (json.has("power")) - res.setPowerElement(parseDecimal(json.get("power").getAsBigDecimal())); - if (json.has("_power")) - parseElementProperties(json.getAsJsonObject("_power"), res.getPowerElement()); - if (json.has("backCurve")) - res.setBackCurveElement(parseDecimal(json.get("backCurve").getAsBigDecimal())); - if (json.has("_backCurve")) - parseElementProperties(json.getAsJsonObject("_backCurve"), res.getBackCurveElement()); - if (json.has("diameter")) - res.setDiameterElement(parseDecimal(json.get("diameter").getAsBigDecimal())); - if (json.has("_diameter")) - parseElementProperties(json.getAsJsonObject("_diameter"), res.getDiameterElement()); - if (json.has("duration")) - res.setDuration(parseSimpleQuantity(json.getAsJsonObject("duration"))); - if (json.has("color")) - res.setColorElement(parseString(json.get("color").getAsString())); - if (json.has("_color")) - parseElementProperties(json.getAsJsonObject("_color"), res.getColorElement()); - if (json.has("brand")) - res.setBrandElement(parseString(json.get("brand").getAsString())); - if (json.has("_brand")) - parseElementProperties(json.getAsJsonObject("_brand"), res.getBrandElement()); - if (json.has("note")) { - JsonArray array = json.getAsJsonArray("note"); - for (int i = 0; i < array.size(); i++) { - res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); - } - }; - } - - @Override - protected Resource parseResource(JsonObject json) throws IOException, FHIRFormatError { - String t = json.get("resourceType").getAsString(); - if (Utilities.noString(t)) - throw new FHIRFormatError("Unable to find resource type - maybe not a FHIR resource?"); - if (t.equals("Parameters")) - return parseParameters(json); - else if (t.equals("Account")) - return parseAccount(json); - else if (t.equals("ActivityDefinition")) - return parseActivityDefinition(json); - else if (t.equals("AdverseEvent")) - return parseAdverseEvent(json); - else if (t.equals("AllergyIntolerance")) - return parseAllergyIntolerance(json); - else if (t.equals("Appointment")) - return parseAppointment(json); - else if (t.equals("AppointmentResponse")) - return parseAppointmentResponse(json); - else if (t.equals("AuditEvent")) - return parseAuditEvent(json); - else if (t.equals("Basic")) - return parseBasic(json); - else if (t.equals("Binary")) - return parseBinary(json); - else if (t.equals("BodyStructure")) - return parseBodyStructure(json); - else if (t.equals("Bundle")) - return parseBundle(json); - else if (t.equals("CapabilityStatement")) - return parseCapabilityStatement(json); - else if (t.equals("CarePlan")) - return parseCarePlan(json); - else if (t.equals("CareTeam")) - return parseCareTeam(json); - else if (t.equals("ChargeItem")) - return parseChargeItem(json); - else if (t.equals("Claim")) - return parseClaim(json); - else if (t.equals("ClaimResponse")) - return parseClaimResponse(json); - else if (t.equals("ClinicalImpression")) - return parseClinicalImpression(json); - else if (t.equals("CodeSystem")) - return parseCodeSystem(json); - else if (t.equals("Communication")) - return parseCommunication(json); - else if (t.equals("CommunicationRequest")) - return parseCommunicationRequest(json); - else if (t.equals("CompartmentDefinition")) - return parseCompartmentDefinition(json); - else if (t.equals("Composition")) - return parseComposition(json); - else if (t.equals("ConceptMap")) - return parseConceptMap(json); - else if (t.equals("Condition")) - return parseCondition(json); - else if (t.equals("Consent")) - return parseConsent(json); - else if (t.equals("Contract")) - return parseContract(json); - else if (t.equals("Coverage")) - return parseCoverage(json); - else if (t.equals("DetectedIssue")) - return parseDetectedIssue(json); - else if (t.equals("Device")) - return parseDevice(json); - else if (t.equals("DeviceComponent")) - return parseDeviceComponent(json); - else if (t.equals("DeviceMetric")) - return parseDeviceMetric(json); - else if (t.equals("DeviceRequest")) - return parseDeviceRequest(json); - else if (t.equals("DeviceUseStatement")) - return parseDeviceUseStatement(json); - else if (t.equals("DiagnosticReport")) - return parseDiagnosticReport(json); - else if (t.equals("DocumentManifest")) - return parseDocumentManifest(json); - else if (t.equals("DocumentReference")) - return parseDocumentReference(json); - else if (t.equals("EligibilityRequest")) - return parseEligibilityRequest(json); - else if (t.equals("EligibilityResponse")) - return parseEligibilityResponse(json); - else if (t.equals("Encounter")) - return parseEncounter(json); - else if (t.equals("Endpoint")) - return parseEndpoint(json); - else if (t.equals("EnrollmentRequest")) - return parseEnrollmentRequest(json); - else if (t.equals("EnrollmentResponse")) - return parseEnrollmentResponse(json); - else if (t.equals("EpisodeOfCare")) - return parseEpisodeOfCare(json); - else if (t.equals("EventDefinition")) - return parseEventDefinition(json); - else if (t.equals("ExpansionProfile")) - return parseExpansionProfile(json); - else if (t.equals("ExplanationOfBenefit")) - return parseExplanationOfBenefit(json); - else if (t.equals("FamilyMemberHistory")) - return parseFamilyMemberHistory(json); - else if (t.equals("Flag")) - return parseFlag(json); - else if (t.equals("Goal")) - return parseGoal(json); - else if (t.equals("GraphDefinition")) - return parseGraphDefinition(json); - else if (t.equals("Group")) - return parseGroup(json); - else if (t.equals("GuidanceResponse")) - return parseGuidanceResponse(json); - else if (t.equals("HealthcareService")) - return parseHealthcareService(json); - else if (t.equals("ImagingManifest")) - return parseImagingManifest(json); - else if (t.equals("ImagingStudy")) - return parseImagingStudy(json); - else if (t.equals("Immunization")) - return parseImmunization(json); - else if (t.equals("ImmunizationRecommendation")) - return parseImmunizationRecommendation(json); - else if (t.equals("ImplementationGuide")) - return parseImplementationGuide(json); - else if (t.equals("Library")) - return parseLibrary(json); - else if (t.equals("Linkage")) - return parseLinkage(json); - else if (t.equals("List")) - return parseListResource(json); - else if (t.equals("Location")) - return parseLocation(json); - else if (t.equals("Measure")) - return parseMeasure(json); - else if (t.equals("MeasureReport")) - return parseMeasureReport(json); - else if (t.equals("Media")) - return parseMedia(json); - else if (t.equals("Medication")) - return parseMedication(json); - else if (t.equals("MedicationAdministration")) - return parseMedicationAdministration(json); - else if (t.equals("MedicationDispense")) - return parseMedicationDispense(json); - else if (t.equals("MedicationRequest")) - return parseMedicationRequest(json); - else if (t.equals("MedicationStatement")) - return parseMedicationStatement(json); - else if (t.equals("MessageDefinition")) - return parseMessageDefinition(json); - else if (t.equals("MessageHeader")) - return parseMessageHeader(json); - else if (t.equals("NamingSystem")) - return parseNamingSystem(json); - else if (t.equals("NutritionOrder")) - return parseNutritionOrder(json); - else if (t.equals("Observation")) - return parseObservation(json); - else if (t.equals("OperationDefinition")) - return parseOperationDefinition(json); - else if (t.equals("OperationOutcome")) - return parseOperationOutcome(json); - else if (t.equals("Organization")) - return parseOrganization(json); - else if (t.equals("Patient")) - return parsePatient(json); - else if (t.equals("PaymentNotice")) - return parsePaymentNotice(json); - else if (t.equals("PaymentReconciliation")) - return parsePaymentReconciliation(json); - else if (t.equals("Person")) - return parsePerson(json); - else if (t.equals("PlanDefinition")) - return parsePlanDefinition(json); - else if (t.equals("Practitioner")) - return parsePractitioner(json); - else if (t.equals("PractitionerRole")) - return parsePractitionerRole(json); - else if (t.equals("Procedure")) - return parseProcedure(json); - else if (t.equals("ProcedureRequest")) - return parseProcedureRequest(json); - else if (t.equals("ProcessRequest")) - return parseProcessRequest(json); - else if (t.equals("ProcessResponse")) - return parseProcessResponse(json); - else if (t.equals("Provenance")) - return parseProvenance(json); - else if (t.equals("Questionnaire")) - return parseQuestionnaire(json); - else if (t.equals("QuestionnaireResponse")) - return parseQuestionnaireResponse(json); - else if (t.equals("RelatedPerson")) - return parseRelatedPerson(json); - else if (t.equals("RequestGroup")) - return parseRequestGroup(json); - else if (t.equals("ResearchStudy")) - return parseResearchStudy(json); - else if (t.equals("ResearchSubject")) - return parseResearchSubject(json); - else if (t.equals("RiskAssessment")) - return parseRiskAssessment(json); - else if (t.equals("Schedule")) - return parseSchedule(json); - else if (t.equals("SearchParameter")) - return parseSearchParameter(json); - else if (t.equals("Sequence")) - return parseSequence(json); - else if (t.equals("ServiceDefinition")) - return parseServiceDefinition(json); - else if (t.equals("Slot")) - return parseSlot(json); - else if (t.equals("Specimen")) - return parseSpecimen(json); - else if (t.equals("StructureDefinition")) - return parseStructureDefinition(json); - else if (t.equals("StructureMap")) - return parseStructureMap(json); - else if (t.equals("Subscription")) - return parseSubscription(json); - else if (t.equals("Substance")) - return parseSubstance(json); - else if (t.equals("SupplyDelivery")) - return parseSupplyDelivery(json); - else if (t.equals("SupplyRequest")) - return parseSupplyRequest(json); - else if (t.equals("Task")) - return parseTask(json); - else if (t.equals("TestReport")) - return parseTestReport(json); - else if (t.equals("TestScript")) - return parseTestScript(json); - else if (t.equals("ValueSet")) - return parseValueSet(json); - else if (t.equals("VisionPrescription")) - return parseVisionPrescription(json); - else if (t.equals("Binary")) - return parseBinary(json); - throw new FHIRFormatError("Unknown.Unrecognised resource type '"+t+"' (in property 'resourceType')"); - } - - protected Type parseType(String prefix, JsonObject json) throws IOException, FHIRFormatError { - if (json.has(prefix+"Extension")) - return parseExtension(json.getAsJsonObject(prefix+"Extension")); - else if (json.has(prefix+"Narrative")) - return parseNarrative(json.getAsJsonObject(prefix+"Narrative")); - else if (json.has(prefix+"Reference")) - return parseReference(json.getAsJsonObject(prefix+"Reference")); - else if (json.has(prefix+"Quantity")) - return parseQuantity(json.getAsJsonObject(prefix+"Quantity")); - else if (json.has(prefix+"Period")) - return parsePeriod(json.getAsJsonObject(prefix+"Period")); - else if (json.has(prefix+"Attachment")) - return parseAttachment(json.getAsJsonObject(prefix+"Attachment")); - else if (json.has(prefix+"Duration")) - return parseDuration(json.getAsJsonObject(prefix+"Duration")); - else if (json.has(prefix+"Count")) - return parseCount(json.getAsJsonObject(prefix+"Count")); - else if (json.has(prefix+"Range")) - return parseRange(json.getAsJsonObject(prefix+"Range")); - else if (json.has(prefix+"Annotation")) - return parseAnnotation(json.getAsJsonObject(prefix+"Annotation")); - else if (json.has(prefix+"Money")) - return parseMoney(json.getAsJsonObject(prefix+"Money")); - else if (json.has(prefix+"Identifier")) - return parseIdentifier(json.getAsJsonObject(prefix+"Identifier")); - else if (json.has(prefix+"Coding")) - return parseCoding(json.getAsJsonObject(prefix+"Coding")); - else if (json.has(prefix+"Signature")) - return parseSignature(json.getAsJsonObject(prefix+"Signature")); - else if (json.has(prefix+"SampledData")) - return parseSampledData(json.getAsJsonObject(prefix+"SampledData")); - else if (json.has(prefix+"Ratio")) - return parseRatio(json.getAsJsonObject(prefix+"Ratio")); - else if (json.has(prefix+"Distance")) - return parseDistance(json.getAsJsonObject(prefix+"Distance")); - else if (json.has(prefix+"Age")) - return parseAge(json.getAsJsonObject(prefix+"Age")); - else if (json.has(prefix+"CodeableConcept")) - return parseCodeableConcept(json.getAsJsonObject(prefix+"CodeableConcept")); - else if (json.has(prefix+"SimpleQuantity")) - return parseSimpleQuantity(json.getAsJsonObject(prefix+"SimpleQuantity")); - else if (json.has(prefix+"Meta")) - return parseMeta(json.getAsJsonObject(prefix+"Meta")); - else if (json.has(prefix+"Address")) - return parseAddress(json.getAsJsonObject(prefix+"Address")); - else if (json.has(prefix+"TriggerDefinition")) - return parseTriggerDefinition(json.getAsJsonObject(prefix+"TriggerDefinition")); - else if (json.has(prefix+"Contributor")) - return parseContributor(json.getAsJsonObject(prefix+"Contributor")); - else if (json.has(prefix+"DataRequirement")) - return parseDataRequirement(json.getAsJsonObject(prefix+"DataRequirement")); - else if (json.has(prefix+"Dosage")) - return parseDosage(json.getAsJsonObject(prefix+"Dosage")); - else if (json.has(prefix+"RelatedArtifact")) - return parseRelatedArtifact(json.getAsJsonObject(prefix+"RelatedArtifact")); - else if (json.has(prefix+"ContactDetail")) - return parseContactDetail(json.getAsJsonObject(prefix+"ContactDetail")); - else if (json.has(prefix+"HumanName")) - return parseHumanName(json.getAsJsonObject(prefix+"HumanName")); - else if (json.has(prefix+"ContactPoint")) - return parseContactPoint(json.getAsJsonObject(prefix+"ContactPoint")); - else if (json.has(prefix+"UsageContext")) - return parseUsageContext(json.getAsJsonObject(prefix+"UsageContext")); - else if (json.has(prefix+"Timing")) - return parseTiming(json.getAsJsonObject(prefix+"Timing")); - else if (json.has(prefix+"ElementDefinition")) - return parseElementDefinition(json.getAsJsonObject(prefix+"ElementDefinition")); - else if (json.has(prefix+"ParameterDefinition")) - return parseParameterDefinition(json.getAsJsonObject(prefix+"ParameterDefinition")); - else if (json.has(prefix+"Date") || json.has("_"+prefix+"Date")) { - Type t = json.has(prefix+"Date") ? parseDate(json.get(prefix+"Date").getAsString()) : new DateType(); - if (json.has("_"+prefix+"Date")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Date"), t); - return t; - } - else if (json.has(prefix+"DateTime") || json.has("_"+prefix+"DateTime")) { - Type t = json.has(prefix+"DateTime") ? parseDateTime(json.get(prefix+"DateTime").getAsString()) : new DateTimeType(); - if (json.has("_"+prefix+"DateTime")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"DateTime"), t); - return t; - } - else if (json.has(prefix+"Code") || json.has("_"+prefix+"Code")) { - Type t = json.has(prefix+"Code") ? parseCode(json.get(prefix+"Code").getAsString()) : new CodeType(); - if (json.has("_"+prefix+"Code")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Code"), t); - return t; - } - else if (json.has(prefix+"String") || json.has("_"+prefix+"String")) { - Type t = json.has(prefix+"String") ? parseString(json.get(prefix+"String").getAsString()) : new StringType(); - if (json.has("_"+prefix+"String")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"String"), t); - return t; - } - else if (json.has(prefix+"Integer") || json.has("_"+prefix+"Integer")) { - Type t = json.has(prefix+"Integer") ? parseInteger(json.get(prefix+"Integer").getAsLong()) : new IntegerType(); - if (json.has("_"+prefix+"Integer")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Integer"), t); - return t; - } - else if (json.has(prefix+"Oid") || json.has("_"+prefix+"Oid")) { - Type t = json.has(prefix+"Oid") ? parseOid(json.get(prefix+"Oid").getAsString()) : new OidType(); - if (json.has("_"+prefix+"Oid")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Oid"), t); - return t; - } - else if (json.has(prefix+"Uri") || json.has("_"+prefix+"Uri")) { - Type t = json.has(prefix+"Uri") ? parseUri(json.get(prefix+"Uri").getAsString()) : new UriType(); - if (json.has("_"+prefix+"Uri")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Uri"), t); - return t; - } - else if (json.has(prefix+"Uuid") || json.has("_"+prefix+"Uuid")) { - Type t = json.has(prefix+"Uuid") ? parseUuid(json.get(prefix+"Uuid").getAsString()) : new UuidType(); - if (json.has("_"+prefix+"Uuid")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Uuid"), t); - return t; - } - else if (json.has(prefix+"Instant") || json.has("_"+prefix+"Instant")) { - Type t = json.has(prefix+"Instant") ? parseInstant(json.get(prefix+"Instant").getAsString()) : new InstantType(); - if (json.has("_"+prefix+"Instant")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Instant"), t); - return t; - } - else if (json.has(prefix+"Boolean") || json.has("_"+prefix+"Boolean")) { - Type t = json.has(prefix+"Boolean") ? parseBoolean(json.get(prefix+"Boolean").getAsBoolean()) : new BooleanType(); - if (json.has("_"+prefix+"Boolean")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Boolean"), t); - return t; - } - else if (json.has(prefix+"Base64Binary") || json.has("_"+prefix+"Base64Binary")) { - Type t = json.has(prefix+"Base64Binary") ? parseBase64Binary(json.get(prefix+"Base64Binary").getAsString()) : new Base64BinaryType(); - if (json.has("_"+prefix+"Base64Binary")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Base64Binary"), t); - return t; - } - else if (json.has(prefix+"UnsignedInt") || json.has("_"+prefix+"UnsignedInt")) { - Type t = json.has(prefix+"UnsignedInt") ? parseUnsignedInt(json.get(prefix+"UnsignedInt").getAsString()) : new UnsignedIntType(); - if (json.has("_"+prefix+"UnsignedInt")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"UnsignedInt"), t); - return t; - } - else if (json.has(prefix+"Markdown") || json.has("_"+prefix+"Markdown")) { - Type t = json.has(prefix+"Markdown") ? parseMarkdown(json.get(prefix+"Markdown").getAsString()) : new MarkdownType(); - if (json.has("_"+prefix+"Markdown")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Markdown"), t); - return t; - } - else if (json.has(prefix+"Time") || json.has("_"+prefix+"Time")) { - Type t = json.has(prefix+"Time") ? parseTime(json.get(prefix+"Time").getAsString()) : new TimeType(); - if (json.has("_"+prefix+"Time")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Time"), t); - return t; - } - else if (json.has(prefix+"Id") || json.has("_"+prefix+"Id")) { - Type t = json.has(prefix+"Id") ? parseId(json.get(prefix+"Id").getAsString()) : new IdType(); - if (json.has("_"+prefix+"Id")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Id"), t); - return t; - } - else if (json.has(prefix+"PositiveInt") || json.has("_"+prefix+"PositiveInt")) { - Type t = json.has(prefix+"PositiveInt") ? parsePositiveInt(json.get(prefix+"PositiveInt").getAsString()) : new PositiveIntType(); - if (json.has("_"+prefix+"PositiveInt")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"PositiveInt"), t); - return t; - } - else if (json.has(prefix+"Decimal") || json.has("_"+prefix+"Decimal")) { - Type t = json.has(prefix+"Decimal") ? parseDecimal(json.get(prefix+"Decimal").getAsBigDecimal()) : new DecimalType(); - if (json.has("_"+prefix+"Decimal")) - parseElementProperties(json.getAsJsonObject("_"+prefix+"Decimal"), t); - return t; - } - return null; - } - - protected Type parseType(JsonObject json, String type) throws IOException, FHIRFormatError { - if (type.equals("Extension")) - return parseExtension(json); - else if (type.equals("Narrative")) - return parseNarrative(json); - else if (type.equals("Reference")) - return parseReference(json); - else if (type.equals("Quantity")) - return parseQuantity(json); - else if (type.equals("Period")) - return parsePeriod(json); - else if (type.equals("Attachment")) - return parseAttachment(json); - else if (type.equals("Duration")) - return parseDuration(json); - else if (type.equals("Count")) - return parseCount(json); - else if (type.equals("Range")) - return parseRange(json); - else if (type.equals("Annotation")) - return parseAnnotation(json); - else if (type.equals("Money")) - return parseMoney(json); - else if (type.equals("Identifier")) - return parseIdentifier(json); - else if (type.equals("Coding")) - return parseCoding(json); - else if (type.equals("Signature")) - return parseSignature(json); - else if (type.equals("SampledData")) - return parseSampledData(json); - else if (type.equals("Ratio")) - return parseRatio(json); - else if (type.equals("Distance")) - return parseDistance(json); - else if (type.equals("Age")) - return parseAge(json); - else if (type.equals("CodeableConcept")) - return parseCodeableConcept(json); - else if (type.equals("SimpleQuantity")) - return parseSimpleQuantity(json); - else if (type.equals("Meta")) - return parseMeta(json); - else if (type.equals("Address")) - return parseAddress(json); - else if (type.equals("TriggerDefinition")) - return parseTriggerDefinition(json); - else if (type.equals("Contributor")) - return parseContributor(json); - else if (type.equals("DataRequirement")) - return parseDataRequirement(json); - else if (type.equals("Dosage")) - return parseDosage(json); - else if (type.equals("RelatedArtifact")) - return parseRelatedArtifact(json); - else if (type.equals("ContactDetail")) - return parseContactDetail(json); - else if (type.equals("HumanName")) - return parseHumanName(json); - else if (type.equals("ContactPoint")) - return parseContactPoint(json); - else if (type.equals("UsageContext")) - return parseUsageContext(json); - else if (type.equals("Timing")) - return parseTiming(json); - else if (type.equals("ElementDefinition")) - return parseElementDefinition(json); - else if (type.equals("ParameterDefinition")) - return parseParameterDefinition(json); - throw new FHIRFormatError("Unknown Type "+type); - } - - protected boolean hasTypeName(JsonObject json, String prefix) { - if (json.has(prefix+"Extension")) - return true; - if (json.has(prefix+"Narrative")) - return true; - if (json.has(prefix+"Reference")) - return true; - if (json.has(prefix+"Quantity")) - return true; - if (json.has(prefix+"Period")) - return true; - if (json.has(prefix+"Attachment")) - return true; - if (json.has(prefix+"Duration")) - return true; - if (json.has(prefix+"Count")) - return true; - if (json.has(prefix+"Range")) - return true; - if (json.has(prefix+"Annotation")) - return true; - if (json.has(prefix+"Money")) - return true; - if (json.has(prefix+"Identifier")) - return true; - if (json.has(prefix+"Coding")) - return true; - if (json.has(prefix+"Signature")) - return true; - if (json.has(prefix+"SampledData")) - return true; - if (json.has(prefix+"Ratio")) - return true; - if (json.has(prefix+"Distance")) - return true; - if (json.has(prefix+"Age")) - return true; - if (json.has(prefix+"CodeableConcept")) - return true; - if (json.has(prefix+"SimpleQuantity")) - return true; - if (json.has(prefix+"Meta")) - return true; - if (json.has(prefix+"Address")) - return true; - if (json.has(prefix+"TriggerDefinition")) - return true; - if (json.has(prefix+"Contributor")) - return true; - if (json.has(prefix+"DataRequirement")) - return true; - if (json.has(prefix+"Dosage")) - return true; - if (json.has(prefix+"RelatedArtifact")) - return true; - if (json.has(prefix+"ContactDetail")) - return true; - if (json.has(prefix+"HumanName")) - return true; - if (json.has(prefix+"ContactPoint")) - return true; - if (json.has(prefix+"UsageContext")) - return true; - if (json.has(prefix+"Timing")) - return true; - if (json.has(prefix+"ElementDefinition")) - return true; - if (json.has(prefix+"ParameterDefinition")) - return true; - if (json.has(prefix+"Parameters")) - return true; - if (json.has(prefix+"Account")) - return true; - if (json.has(prefix+"ActivityDefinition")) - return true; - if (json.has(prefix+"AdverseEvent")) - return true; - if (json.has(prefix+"AllergyIntolerance")) - return true; - if (json.has(prefix+"Appointment")) - return true; - if (json.has(prefix+"AppointmentResponse")) - return true; - if (json.has(prefix+"AuditEvent")) - return true; - if (json.has(prefix+"Basic")) - return true; - if (json.has(prefix+"Binary")) - return true; - if (json.has(prefix+"BodyStructure")) - return true; - if (json.has(prefix+"Bundle")) - return true; - if (json.has(prefix+"CapabilityStatement")) - return true; - if (json.has(prefix+"CarePlan")) - return true; - if (json.has(prefix+"CareTeam")) - return true; - if (json.has(prefix+"ChargeItem")) - return true; - if (json.has(prefix+"Claim")) - return true; - if (json.has(prefix+"ClaimResponse")) - return true; - if (json.has(prefix+"ClinicalImpression")) - return true; - if (json.has(prefix+"CodeSystem")) - return true; - if (json.has(prefix+"Communication")) - return true; - if (json.has(prefix+"CommunicationRequest")) - return true; - if (json.has(prefix+"CompartmentDefinition")) - return true; - if (json.has(prefix+"Composition")) - return true; - if (json.has(prefix+"ConceptMap")) - return true; - if (json.has(prefix+"Condition")) - return true; - if (json.has(prefix+"Consent")) - return true; - if (json.has(prefix+"Contract")) - return true; - if (json.has(prefix+"Coverage")) - return true; - if (json.has(prefix+"DetectedIssue")) - return true; - if (json.has(prefix+"Device")) - return true; - if (json.has(prefix+"DeviceComponent")) - return true; - if (json.has(prefix+"DeviceMetric")) - return true; - if (json.has(prefix+"DeviceRequest")) - return true; - if (json.has(prefix+"DeviceUseStatement")) - return true; - if (json.has(prefix+"DiagnosticReport")) - return true; - if (json.has(prefix+"DocumentManifest")) - return true; - if (json.has(prefix+"DocumentReference")) - return true; - if (json.has(prefix+"EligibilityRequest")) - return true; - if (json.has(prefix+"EligibilityResponse")) - return true; - if (json.has(prefix+"Encounter")) - return true; - if (json.has(prefix+"Endpoint")) - return true; - if (json.has(prefix+"EnrollmentRequest")) - return true; - if (json.has(prefix+"EnrollmentResponse")) - return true; - if (json.has(prefix+"EpisodeOfCare")) - return true; - if (json.has(prefix+"EventDefinition")) - return true; - if (json.has(prefix+"ExpansionProfile")) - return true; - if (json.has(prefix+"ExplanationOfBenefit")) - return true; - if (json.has(prefix+"FamilyMemberHistory")) - return true; - if (json.has(prefix+"Flag")) - return true; - if (json.has(prefix+"Goal")) - return true; - if (json.has(prefix+"GraphDefinition")) - return true; - if (json.has(prefix+"Group")) - return true; - if (json.has(prefix+"GuidanceResponse")) - return true; - if (json.has(prefix+"HealthcareService")) - return true; - if (json.has(prefix+"ImagingManifest")) - return true; - if (json.has(prefix+"ImagingStudy")) - return true; - if (json.has(prefix+"Immunization")) - return true; - if (json.has(prefix+"ImmunizationRecommendation")) - return true; - if (json.has(prefix+"ImplementationGuide")) - return true; - if (json.has(prefix+"Library")) - return true; - if (json.has(prefix+"Linkage")) - return true; - if (json.has(prefix+"List")) - return true; - if (json.has(prefix+"Location")) - return true; - if (json.has(prefix+"Measure")) - return true; - if (json.has(prefix+"MeasureReport")) - return true; - if (json.has(prefix+"Media")) - return true; - if (json.has(prefix+"Medication")) - return true; - if (json.has(prefix+"MedicationAdministration")) - return true; - if (json.has(prefix+"MedicationDispense")) - return true; - if (json.has(prefix+"MedicationRequest")) - return true; - if (json.has(prefix+"MedicationStatement")) - return true; - if (json.has(prefix+"MessageDefinition")) - return true; - if (json.has(prefix+"MessageHeader")) - return true; - if (json.has(prefix+"NamingSystem")) - return true; - if (json.has(prefix+"NutritionOrder")) - return true; - if (json.has(prefix+"Observation")) - return true; - if (json.has(prefix+"OperationDefinition")) - return true; - if (json.has(prefix+"OperationOutcome")) - return true; - if (json.has(prefix+"Organization")) - return true; - if (json.has(prefix+"Patient")) - return true; - if (json.has(prefix+"PaymentNotice")) - return true; - if (json.has(prefix+"PaymentReconciliation")) - return true; - if (json.has(prefix+"Person")) - return true; - if (json.has(prefix+"PlanDefinition")) - return true; - if (json.has(prefix+"Practitioner")) - return true; - if (json.has(prefix+"PractitionerRole")) - return true; - if (json.has(prefix+"Procedure")) - return true; - if (json.has(prefix+"ProcedureRequest")) - return true; - if (json.has(prefix+"ProcessRequest")) - return true; - if (json.has(prefix+"ProcessResponse")) - return true; - if (json.has(prefix+"Provenance")) - return true; - if (json.has(prefix+"Questionnaire")) - return true; - if (json.has(prefix+"QuestionnaireResponse")) - return true; - if (json.has(prefix+"RelatedPerson")) - return true; - if (json.has(prefix+"RequestGroup")) - return true; - if (json.has(prefix+"ResearchStudy")) - return true; - if (json.has(prefix+"ResearchSubject")) - return true; - if (json.has(prefix+"RiskAssessment")) - return true; - if (json.has(prefix+"Schedule")) - return true; - if (json.has(prefix+"SearchParameter")) - return true; - if (json.has(prefix+"Sequence")) - return true; - if (json.has(prefix+"ServiceDefinition")) - return true; - if (json.has(prefix+"Slot")) - return true; - if (json.has(prefix+"Specimen")) - return true; - if (json.has(prefix+"StructureDefinition")) - return true; - if (json.has(prefix+"StructureMap")) - return true; - if (json.has(prefix+"Subscription")) - return true; - if (json.has(prefix+"Substance")) - return true; - if (json.has(prefix+"SupplyDelivery")) - return true; - if (json.has(prefix+"SupplyRequest")) - return true; - if (json.has(prefix+"Task")) - return true; - if (json.has(prefix+"TestReport")) - return true; - if (json.has(prefix+"TestScript")) - return true; - if (json.has(prefix+"ValueSet")) - return true; - if (json.has(prefix+"VisionPrescription")) - return true; - if (json.has(prefix+"Date") || json.has("_"+prefix+"Date")) - return true; - if (json.has(prefix+"DateTime") || json.has("_"+prefix+"DateTime")) - return true; - if (json.has(prefix+"Code") || json.has("_"+prefix+"Code")) - return true; - if (json.has(prefix+"String") || json.has("_"+prefix+"String")) - return true; - if (json.has(prefix+"Integer") || json.has("_"+prefix+"Integer")) - return true; - if (json.has(prefix+"Oid") || json.has("_"+prefix+"Oid")) - return true; - if (json.has(prefix+"Uri") || json.has("_"+prefix+"Uri")) - return true; - if (json.has(prefix+"Uuid") || json.has("_"+prefix+"Uuid")) - return true; - if (json.has(prefix+"Instant") || json.has("_"+prefix+"Instant")) - return true; - if (json.has(prefix+"Boolean") || json.has("_"+prefix+"Boolean")) - return true; - if (json.has(prefix+"Base64Binary") || json.has("_"+prefix+"Base64Binary")) - return true; - if (json.has(prefix+"UnsignedInt") || json.has("_"+prefix+"UnsignedInt")) - return true; - if (json.has(prefix+"Markdown") || json.has("_"+prefix+"Markdown")) - return true; - if (json.has(prefix+"Time") || json.has("_"+prefix+"Time")) - return true; - if (json.has(prefix+"Id") || json.has("_"+prefix+"Id")) - return true; - if (json.has(prefix+"PositiveInt") || json.has("_"+prefix+"PositiveInt")) - return true; - if (json.has(prefix+"Decimal") || json.has("_"+prefix+"Decimal")) - return true; - return false; - } - protected void composeElement(Element element) throws IOException { - if (element.hasId()) - prop("id", element.getId()); - if (makeComments(element)) { - openArray("fhir_comments"); - for (String s : element.getFormatCommentsPre()) - prop(null, s); - for (String s : element.getFormatCommentsPost()) - prop(null, s); - closeArray(); - } - if (element.hasExtension()) { - openArray("extension"); - for (Extension e : element.getExtension()) - composeExtension(null, e); - closeArray(); - } - } - - protected void composeBackbone(BackboneElement element) throws IOException { - composeElement(element); - if (element.hasModifierExtension()) { - openArray("modifierExtension"); - for (Extension e : element.getModifierExtension()) - composeExtension(null, e); - closeArray(); - } - } - - protected > void composeEnumerationCore(String name, Enumeration value, EnumFactory e, boolean inArray) throws IOException { - if (value != null && value.getValue() != null) { - prop(name, e.toCode(value.getValue())); - } else if (inArray) - writeNull(name); - } - - protected > void composeEnumerationExtras(String name, Enumeration value, EnumFactory e, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } else if (inArray) - writeNull(name); - } - - protected void composeDateCore(String name, DateType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, value.asStringValue()); - } - else if (inArray) - writeNull(name); - } - - protected void composeDateExtras(String name, DateType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeDateTimeCore(String name, DateTimeType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, value.asStringValue()); - } - else if (inArray) - writeNull(name); - } - - protected void composeDateTimeExtras(String name, DateTimeType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeCodeCore(String name, CodeType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeCodeExtras(String name, CodeType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeStringCore(String name, StringType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeStringExtras(String name, StringType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeIntegerCore(String name, IntegerType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, Integer.valueOf(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeIntegerExtras(String name, IntegerType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeOidCore(String name, OidType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeOidExtras(String name, OidType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeUriCore(String name, UriType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeUriExtras(String name, UriType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeUuidCore(String name, UuidType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeUuidExtras(String name, UuidType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeInstantCore(String name, InstantType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, value.asStringValue()); - } - else if (inArray) - writeNull(name); - } - - protected void composeInstantExtras(String name, InstantType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeBooleanCore(String name, BooleanType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, value.getValue()); - } - else if (inArray) - writeNull(name); - } - - protected void composeBooleanExtras(String name, BooleanType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeBase64BinaryCore(String name, Base64BinaryType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeBase64BinaryExtras(String name, Base64BinaryType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeUnsignedIntCore(String name, UnsignedIntType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, Integer.valueOf(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeUnsignedIntExtras(String name, UnsignedIntType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeMarkdownCore(String name, MarkdownType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeMarkdownExtras(String name, MarkdownType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeTimeCore(String name, TimeType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, value.asStringValue()); - } - else if (inArray) - writeNull(name); - } - - protected void composeTimeExtras(String name, TimeType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeIdCore(String name, IdType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, toString(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composeIdExtras(String name, IdType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composePositiveIntCore(String name, PositiveIntType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, Integer.valueOf(value.getValue())); - } - else if (inArray) - writeNull(name); - } - - protected void composePositiveIntExtras(String name, PositiveIntType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeDecimalCore(String name, DecimalType value, boolean inArray) throws IOException { - if (value != null && value.hasValue()) { - prop(name, value.getValue()); - } - else if (inArray) - writeNull(name); - } - - protected void composeDecimalExtras(String name, DecimalType value, boolean inArray) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { - open(inArray ? null : "_"+name); - composeElement(value); - close(); - } - else if (inArray) - writeNull(name); - } - - protected void composeExtension(String name, Extension element) throws IOException { - if (element != null) { - open(name); - composeExtensionInner(element); - close(); - } - } - - protected void composeExtensionInner(Extension element) throws IOException { - composeElement(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeNarrative(String name, Narrative element) throws IOException { - if (element != null) { - open(name); - composeNarrativeInner(element); - close(); - } - } - - protected void composeNarrativeInner(Narrative element) throws IOException { - composeElement(element); - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory(), false); - } - if (element.hasDiv()) { - XhtmlNode node = element.getDiv(); - if (node.getNsDecl() == null) { - node.attribute("xmlns", XHTML_NS); - } - composeXhtml("div", node); - } - } - - protected void composeDuration(String name, Duration element) throws IOException { - if (element != null) { - open(name); - composeDurationInner(element); - close(); - } - } - - protected void composeDurationInner(Duration element) throws IOException { - composeQuantityInner(element); - } - - protected void composeCount(String name, Count element) throws IOException { - if (element != null) { - open(name); - composeCountInner(element); - close(); - } - } - - protected void composeCountInner(Count element) throws IOException { - composeQuantityInner(element); - } - - protected void composeMoney(String name, Money element) throws IOException { - if (element != null) { - open(name); - composeMoneyInner(element); - close(); - } - } - - protected void composeMoneyInner(Money element) throws IOException { - composeQuantityInner(element); - } - - protected void composeDistance(String name, Distance element) throws IOException { - if (element != null) { - open(name); - composeDistanceInner(element); - close(); - } - } - - protected void composeDistanceInner(Distance element) throws IOException { - composeQuantityInner(element); - } - - protected void composeAge(String name, Age element) throws IOException { - if (element != null) { - open(name); - composeAgeInner(element); - close(); - } - } - - protected void composeAgeInner(Age element) throws IOException { - composeQuantityInner(element); - } - - protected void composeReference(String name, Reference element) throws IOException { - if (element != null) { - open(name); - composeReferenceInner(element); - close(); - } - } - - protected void composeReferenceInner(Reference element) throws IOException { - composeElement(element); - if (element.hasReferenceElement()) { - composeStringCore("reference", element.getReferenceElement(), false); - composeStringExtras("reference", element.getReferenceElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - } - - protected void composeQuantity(String name, Quantity element) throws IOException { - if (element != null) { - open(name); - composeQuantityInner(element); - close(); - } - } - - protected void composeQuantityInner(Quantity element) throws IOException { - composeElement(element); - if (element.hasValueElement()) { - composeDecimalCore("value", element.getValueElement(), false); - composeDecimalExtras("value", element.getValueElement(), false); - } - if (element.hasComparatorElement()) { - composeEnumerationCore("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory(), false); - composeEnumerationExtras("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory(), false); - } - if (element.hasUnitElement()) { - composeStringCore("unit", element.getUnitElement(), false); - composeStringExtras("unit", element.getUnitElement(), false); - } - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - } - - protected void composePeriod(String name, Period element) throws IOException { - if (element != null) { - open(name); - composePeriodInner(element); - close(); - } - } - - protected void composePeriodInner(Period element) throws IOException { - composeElement(element); - if (element.hasStartElement()) { - composeDateTimeCore("start", element.getStartElement(), false); - composeDateTimeExtras("start", element.getStartElement(), false); - } - if (element.hasEndElement()) { - composeDateTimeCore("end", element.getEndElement(), false); - composeDateTimeExtras("end", element.getEndElement(), false); - } - } - - protected void composeAttachment(String name, Attachment element) throws IOException { - if (element != null) { - open(name); - composeAttachmentInner(element); - close(); - } - } - - protected void composeAttachmentInner(Attachment element) throws IOException { - composeElement(element); - if (element.hasContentTypeElement()) { - composeCodeCore("contentType", element.getContentTypeElement(), false); - composeCodeExtras("contentType", element.getContentTypeElement(), false); - } - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - if (element.hasDataElement()) { - composeBase64BinaryCore("data", element.getDataElement(), false); - composeBase64BinaryExtras("data", element.getDataElement(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasSizeElement()) { - composeUnsignedIntCore("size", element.getSizeElement(), false); - composeUnsignedIntExtras("size", element.getSizeElement(), false); - } - if (element.hasHashElement()) { - composeBase64BinaryCore("hash", element.getHashElement(), false); - composeBase64BinaryExtras("hash", element.getHashElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasCreationElement()) { - composeDateTimeCore("creation", element.getCreationElement(), false); - composeDateTimeExtras("creation", element.getCreationElement(), false); - } - } - - protected void composeRange(String name, Range element) throws IOException { - if (element != null) { - open(name); - composeRangeInner(element); - close(); - } - } - - protected void composeRangeInner(Range element) throws IOException { - composeElement(element); - if (element.hasLow()) { - composeSimpleQuantity("low", element.getLow()); - } - if (element.hasHigh()) { - composeSimpleQuantity("high", element.getHigh()); - } - } - - protected void composeAnnotation(String name, Annotation element) throws IOException { - if (element != null) { - open(name); - composeAnnotationInner(element); - close(); - } - } - - protected void composeAnnotationInner(Annotation element) throws IOException { - composeElement(element); - if (element.hasAuthor()) { - composeType("author", element.getAuthor()); - } - if (element.hasTimeElement()) { - composeDateTimeCore("time", element.getTimeElement(), false); - composeDateTimeExtras("time", element.getTimeElement(), false); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - } - - protected void composeIdentifier(String name, Identifier element) throws IOException { - if (element != null) { - open(name); - composeIdentifierInner(element); - close(); - } - } - - protected void composeIdentifierInner(Identifier element) throws IOException { - composeElement(element); - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasAssigner()) { - composeReference("assigner", element.getAssigner()); - } - } - - protected void composeCoding(String name, Coding element) throws IOException { - if (element != null) { - open(name); - composeCodingInner(element); - close(); - } - } - - protected void composeCodingInner(Coding element) throws IOException { - composeElement(element); - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasUserSelectedElement()) { - composeBooleanCore("userSelected", element.getUserSelectedElement(), false); - composeBooleanExtras("userSelected", element.getUserSelectedElement(), false); - } - } - - protected void composeSignature(String name, Signature element) throws IOException { - if (element != null) { - open(name); - composeSignatureInner(element); - close(); - } - } - - protected void composeSignatureInner(Signature element) throws IOException { - composeElement(element); - if (element.hasType()) { - openArray("type"); - for (Coding e : element.getType()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasWhenElement()) { - composeInstantCore("when", element.getWhenElement(), false); - composeInstantExtras("when", element.getWhenElement(), false); - } - if (element.hasWho()) { - composeType("who", element.getWho()); - } - if (element.hasOnBehalfOf()) { - composeType("onBehalfOf", element.getOnBehalfOf()); - } - if (element.hasContentTypeElement()) { - composeCodeCore("contentType", element.getContentTypeElement(), false); - composeCodeExtras("contentType", element.getContentTypeElement(), false); - } - if (element.hasBlobElement()) { - composeBase64BinaryCore("blob", element.getBlobElement(), false); - composeBase64BinaryExtras("blob", element.getBlobElement(), false); - } - } - - protected void composeSampledData(String name, SampledData element) throws IOException { - if (element != null) { - open(name); - composeSampledDataInner(element); - close(); - } - } - - protected void composeSampledDataInner(SampledData element) throws IOException { - composeElement(element); - if (element.hasOrigin()) { - composeSimpleQuantity("origin", element.getOrigin()); - } - if (element.hasPeriodElement()) { - composeDecimalCore("period", element.getPeriodElement(), false); - composeDecimalExtras("period", element.getPeriodElement(), false); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasLowerLimitElement()) { - composeDecimalCore("lowerLimit", element.getLowerLimitElement(), false); - composeDecimalExtras("lowerLimit", element.getLowerLimitElement(), false); - } - if (element.hasUpperLimitElement()) { - composeDecimalCore("upperLimit", element.getUpperLimitElement(), false); - composeDecimalExtras("upperLimit", element.getUpperLimitElement(), false); - } - if (element.hasDimensionsElement()) { - composePositiveIntCore("dimensions", element.getDimensionsElement(), false); - composePositiveIntExtras("dimensions", element.getDimensionsElement(), false); - } - if (element.hasDataElement()) { - composeStringCore("data", element.getDataElement(), false); - composeStringExtras("data", element.getDataElement(), false); - } - } - - protected void composeRatio(String name, Ratio element) throws IOException { - if (element != null) { - open(name); - composeRatioInner(element); - close(); - } - } - - protected void composeRatioInner(Ratio element) throws IOException { - composeElement(element); - if (element.hasNumerator()) { - composeQuantity("numerator", element.getNumerator()); - } - if (element.hasDenominator()) { - composeQuantity("denominator", element.getDenominator()); - } - } - - protected void composeCodeableConcept(String name, CodeableConcept element) throws IOException { - if (element != null) { - open(name); - composeCodeableConceptInner(element); - close(); - } - } - - protected void composeCodeableConceptInner(CodeableConcept element) throws IOException { - composeElement(element); - if (element.hasCoding()) { - openArray("coding"); - for (Coding e : element.getCoding()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - } - - protected void composeSimpleQuantity(String name, SimpleQuantity element) throws IOException { - if (element != null) { - open(name); - composeSimpleQuantityInner(element); - close(); - } - } - - protected void composeSimpleQuantityInner(SimpleQuantity element) throws IOException { - composeElement(element); - if (element.hasValueElement()) { - composeDecimalCore("value", element.getValueElement(), false); - composeDecimalExtras("value", element.getValueElement(), false); - } - if (element.hasComparatorElement()) { - composeEnumerationCore("comparator", element.getComparatorElement(), new SimpleQuantity.QuantityComparatorEnumFactory(), false); - composeEnumerationExtras("comparator", element.getComparatorElement(), new SimpleQuantity.QuantityComparatorEnumFactory(), false); - } - if (element.hasUnitElement()) { - composeStringCore("unit", element.getUnitElement(), false); - composeStringExtras("unit", element.getUnitElement(), false); - } - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - } - - protected void composeMeta(String name, Meta element) throws IOException { - if (element != null) { - open(name); - composeMetaInner(element); - close(); - } - } - - protected void composeMetaInner(Meta element) throws IOException { - composeElement(element); - if (element.hasVersionIdElement()) { - composeIdCore("versionId", element.getVersionIdElement(), false); - composeIdExtras("versionId", element.getVersionIdElement(), false); - } - if (element.hasLastUpdatedElement()) { - composeInstantCore("lastUpdated", element.getLastUpdatedElement(), false); - composeInstantExtras("lastUpdated", element.getLastUpdatedElement(), false); - } - if (element.hasProfile()) { - openArray("profile"); - for (UriType e : element.getProfile()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getProfile())) { - openArray("_profile"); - for (UriType e : element.getProfile()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSecurity()) { - openArray("security"); - for (Coding e : element.getSecurity()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasTag()) { - openArray("tag"); - for (Coding e : element.getTag()) - composeCoding(null, e); - closeArray(); - }; - } - - protected void composeAddress(String name, Address element) throws IOException { - if (element != null) { - open(name); - composeAddressInner(element); - close(); - } - } - - protected void composeAddressInner(Address element) throws IOException { - composeElement(element); - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new Address.AddressUseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new Address.AddressUseEnumFactory(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Address.AddressTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Address.AddressTypeEnumFactory(), false); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasLine()) { - openArray("line"); - for (StringType e : element.getLine()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getLine())) { - openArray("_line"); - for (StringType e : element.getLine()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasCityElement()) { - composeStringCore("city", element.getCityElement(), false); - composeStringExtras("city", element.getCityElement(), false); - } - if (element.hasDistrictElement()) { - composeStringCore("district", element.getDistrictElement(), false); - composeStringExtras("district", element.getDistrictElement(), false); - } - if (element.hasStateElement()) { - composeStringCore("state", element.getStateElement(), false); - composeStringExtras("state", element.getStateElement(), false); - } - if (element.hasPostalCodeElement()) { - composeStringCore("postalCode", element.getPostalCodeElement(), false); - composeStringExtras("postalCode", element.getPostalCodeElement(), false); - } - if (element.hasCountryElement()) { - composeStringCore("country", element.getCountryElement(), false); - composeStringExtras("country", element.getCountryElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeTriggerDefinition(String name, TriggerDefinition element) throws IOException { - if (element != null) { - open(name); - composeTriggerDefinitionInner(element); - close(); - } - } - - protected void composeTriggerDefinitionInner(TriggerDefinition element) throws IOException { - composeElement(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory(), false); - } - if (element.hasEventNameElement()) { - composeStringCore("eventName", element.getEventNameElement(), false); - composeStringExtras("eventName", element.getEventNameElement(), false); - } - if (element.hasEventTiming()) { - composeType("eventTiming", element.getEventTiming()); - } - if (element.hasEventData()) { - composeDataRequirement("eventData", element.getEventData()); - } - if (element.hasEventCondition()) { - composeTriggerDefinitionTriggerDefinitionEventConditionComponent("eventCondition", element.getEventCondition()); - } - } - - protected void composeTriggerDefinitionTriggerDefinitionEventConditionComponent(String name, TriggerDefinition.TriggerDefinitionEventConditionComponent element) throws IOException { - if (element != null) { - open(name); - composeTriggerDefinitionTriggerDefinitionEventConditionComponentInner(element); - close(); - } - } - - protected void composeTriggerDefinitionTriggerDefinitionEventConditionComponentInner(TriggerDefinition.TriggerDefinitionEventConditionComponent element) throws IOException { - composeElement(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasLanguageElement()) { - composeStringCore("language", element.getLanguageElement(), false); - composeStringExtras("language", element.getLanguageElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - } - - protected void composeContributor(String name, Contributor element) throws IOException { - if (element != null) { - open(name); - composeContributorInner(element); - close(); - } - } - - protected void composeContributorInner(Contributor element) throws IOException { - composeElement(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - } - - protected void composeDataRequirement(String name, DataRequirement element) throws IOException { - if (element != null) { - open(name); - composeDataRequirementInner(element); - close(); - } - } - - protected void composeDataRequirementInner(DataRequirement element) throws IOException { - composeElement(element); - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasProfile()) { - openArray("profile"); - for (UriType e : element.getProfile()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getProfile())) { - openArray("_profile"); - for (UriType e : element.getProfile()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasMustSupport()) { - openArray("mustSupport"); - for (StringType e : element.getMustSupport()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getMustSupport())) { - openArray("_mustSupport"); - for (StringType e : element.getMustSupport()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasCodeFilter()) { - openArray("codeFilter"); - for (DataRequirement.DataRequirementCodeFilterComponent e : element.getCodeFilter()) - composeDataRequirementDataRequirementCodeFilterComponent(null, e); - closeArray(); - }; - if (element.hasDateFilter()) { - openArray("dateFilter"); - for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter()) - composeDataRequirementDataRequirementDateFilterComponent(null, e); - closeArray(); - }; - } - - protected void composeDataRequirementDataRequirementCodeFilterComponent(String name, DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { - if (element != null) { - open(name); - composeDataRequirementDataRequirementCodeFilterComponentInner(element); - close(); - } - } - - protected void composeDataRequirementDataRequirementCodeFilterComponentInner(DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { - composeElement(element); - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasValueSet()) { - composeType("valueSet", element.getValueSet()); - } - if (element.hasValueCode()) { - openArray("valueCode"); - for (CodeType e : element.getValueCode()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getValueCode())) { - openArray("_valueCode"); - for (CodeType e : element.getValueCode()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasValueCoding()) { - openArray("valueCoding"); - for (Coding e : element.getValueCoding()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasValueCodeableConcept()) { - openArray("valueCodeableConcept"); - for (CodeableConcept e : element.getValueCodeableConcept()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composeDataRequirementDataRequirementDateFilterComponent(String name, DataRequirement.DataRequirementDateFilterComponent element) throws IOException { - if (element != null) { - open(name); - composeDataRequirementDataRequirementDateFilterComponentInner(element); - close(); - } - } - - protected void composeDataRequirementDataRequirementDateFilterComponentInner(DataRequirement.DataRequirementDateFilterComponent element) throws IOException { - composeElement(element); - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeDosage(String name, Dosage element) throws IOException { - if (element != null) { - open(name); - composeDosageInner(element); - close(); - } - } - - protected void composeDosageInner(Dosage element) throws IOException { - composeElement(element); - if (element.hasSequenceElement()) { - composeIntegerCore("sequence", element.getSequenceElement(), false); - composeIntegerExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasAdditionalInstruction()) { - openArray("additionalInstruction"); - for (CodeableConcept e : element.getAdditionalInstruction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPatientInstructionElement()) { - composeStringCore("patientInstruction", element.getPatientInstructionElement(), false); - composeStringExtras("patientInstruction", element.getPatientInstructionElement(), false); - } - if (element.hasTiming()) { - composeTiming("timing", element.getTiming()); - } - if (element.hasAsNeeded()) { - composeType("asNeeded", element.getAsNeeded()); - } - if (element.hasSite()) { - composeCodeableConcept("site", element.getSite()); - } - if (element.hasRoute()) { - composeCodeableConcept("route", element.getRoute()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasDose()) { - composeType("dose", element.getDose()); - } - if (element.hasMaxDosePerPeriod()) { - composeRatio("maxDosePerPeriod", element.getMaxDosePerPeriod()); - } - if (element.hasMaxDosePerAdministration()) { - composeSimpleQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration()); - } - if (element.hasMaxDosePerLifetime()) { - composeSimpleQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime()); - } - if (element.hasRate()) { - composeType("rate", element.getRate()); - } - } - - protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException { - if (element != null) { - open(name); - composeRelatedArtifactInner(element); - close(); - } - } - - protected void composeRelatedArtifactInner(RelatedArtifact element) throws IOException { - composeElement(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasCitationElement()) { - composeStringCore("citation", element.getCitationElement(), false); - composeStringExtras("citation", element.getCitationElement(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasDocument()) { - composeAttachment("document", element.getDocument()); - } - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - } - - protected void composeContactDetail(String name, ContactDetail element) throws IOException { - if (element != null) { - open(name); - composeContactDetailInner(element); - close(); - } - } - - protected void composeContactDetailInner(ContactDetail element) throws IOException { - composeElement(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - } - - protected void composeHumanName(String name, HumanName element) throws IOException { - if (element != null) { - open(name); - composeHumanNameInner(element); - close(); - } - } - - protected void composeHumanNameInner(HumanName element) throws IOException { - composeElement(element); - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new HumanName.NameUseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new HumanName.NameUseEnumFactory(), false); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasFamilyElement()) { - composeStringCore("family", element.getFamilyElement(), false); - composeStringExtras("family", element.getFamilyElement(), false); - } - if (element.hasGiven()) { - openArray("given"); - for (StringType e : element.getGiven()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getGiven())) { - openArray("_given"); - for (StringType e : element.getGiven()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasPrefix()) { - openArray("prefix"); - for (StringType e : element.getPrefix()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPrefix())) { - openArray("_prefix"); - for (StringType e : element.getPrefix()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSuffix()) { - openArray("suffix"); - for (StringType e : element.getSuffix()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSuffix())) { - openArray("_suffix"); - for (StringType e : element.getSuffix()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeContactPoint(String name, ContactPoint element) throws IOException { - if (element != null) { - open(name); - composeContactPointInner(element); - close(); - } - } - - protected void composeContactPointInner(ContactPoint element) throws IOException { - composeElement(element); - if (element.hasSystemElement()) { - composeEnumerationCore("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory(), false); - composeEnumerationExtras("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory(), false); - } - if (element.hasRankElement()) { - composePositiveIntCore("rank", element.getRankElement(), false); - composePositiveIntExtras("rank", element.getRankElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeUsageContext(String name, UsageContext element) throws IOException { - if (element != null) { - open(name); - composeUsageContextInner(element); - close(); - } - } - - protected void composeUsageContextInner(UsageContext element) throws IOException { - composeElement(element); - if (element.hasCode()) { - composeCoding("code", element.getCode()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeTiming(String name, Timing element) throws IOException { - if (element != null) { - open(name); - composeTimingInner(element); - close(); - } - } - - protected void composeTimingInner(Timing element) throws IOException { - composeElement(element); - if (element.hasEvent()) { - openArray("event"); - for (DateTimeType e : element.getEvent()) - composeDateTimeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getEvent())) { - openArray("_event"); - for (DateTimeType e : element.getEvent()) - composeDateTimeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasRepeat()) { - composeTimingTimingRepeatComponent("repeat", element.getRepeat()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - } - - protected void composeTimingTimingRepeatComponent(String name, Timing.TimingRepeatComponent element) throws IOException { - if (element != null) { - open(name); - composeTimingTimingRepeatComponentInner(element); - close(); - } - } - - protected void composeTimingTimingRepeatComponentInner(Timing.TimingRepeatComponent element) throws IOException { - composeElement(element); - if (element.hasBounds()) { - composeType("bounds", element.getBounds()); - } - if (element.hasCountElement()) { - composeIntegerCore("count", element.getCountElement(), false); - composeIntegerExtras("count", element.getCountElement(), false); - } - if (element.hasCountMaxElement()) { - composeIntegerCore("countMax", element.getCountMaxElement(), false); - composeIntegerExtras("countMax", element.getCountMaxElement(), false); - } - if (element.hasDurationElement()) { - composeDecimalCore("duration", element.getDurationElement(), false); - composeDecimalExtras("duration", element.getDurationElement(), false); - } - if (element.hasDurationMaxElement()) { - composeDecimalCore("durationMax", element.getDurationMaxElement(), false); - composeDecimalExtras("durationMax", element.getDurationMaxElement(), false); - } - if (element.hasDurationUnitElement()) { - composeEnumerationCore("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); - composeEnumerationExtras("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); - } - if (element.hasFrequencyElement()) { - composeIntegerCore("frequency", element.getFrequencyElement(), false); - composeIntegerExtras("frequency", element.getFrequencyElement(), false); - } - if (element.hasFrequencyMaxElement()) { - composeIntegerCore("frequencyMax", element.getFrequencyMaxElement(), false); - composeIntegerExtras("frequencyMax", element.getFrequencyMaxElement(), false); - } - if (element.hasPeriodElement()) { - composeDecimalCore("period", element.getPeriodElement(), false); - composeDecimalExtras("period", element.getPeriodElement(), false); - } - if (element.hasPeriodMaxElement()) { - composeDecimalCore("periodMax", element.getPeriodMaxElement(), false); - composeDecimalExtras("periodMax", element.getPeriodMaxElement(), false); - } - if (element.hasPeriodUnitElement()) { - composeEnumerationCore("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); - composeEnumerationExtras("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); - } - if (element.hasDayOfWeek()) { - openArray("dayOfWeek"); - for (Enumeration e : element.getDayOfWeek()) - composeEnumerationCore(null, e, new Timing.DayOfWeekEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getDayOfWeek())) { - openArray("_dayOfWeek"); - for (Enumeration e : element.getDayOfWeek()) - composeEnumerationExtras(null, e, new Timing.DayOfWeekEnumFactory(), true); - closeArray(); - } - }; - if (element.hasTimeOfDay()) { - openArray("timeOfDay"); - for (TimeType e : element.getTimeOfDay()) - composeTimeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getTimeOfDay())) { - openArray("_timeOfDay"); - for (TimeType e : element.getTimeOfDay()) - composeTimeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasWhen()) { - openArray("when"); - for (Enumeration e : element.getWhen()) - composeEnumerationCore(null, e, new Timing.EventTimingEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getWhen())) { - openArray("_when"); - for (Enumeration e : element.getWhen()) - composeEnumerationExtras(null, e, new Timing.EventTimingEnumFactory(), true); - closeArray(); - } - }; - if (element.hasOffsetElement()) { - composeUnsignedIntCore("offset", element.getOffsetElement(), false); - composeUnsignedIntExtras("offset", element.getOffsetElement(), false); - } - } - - protected void composeElementDefinition(String name, ElementDefinition element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionInner(element); - close(); - } - } - - protected void composeElementDefinitionInner(ElementDefinition element) throws IOException { - composeElement(element); - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasRepresentation()) { - openArray("representation"); - for (Enumeration e : element.getRepresentation()) - composeEnumerationCore(null, e, new ElementDefinition.PropertyRepresentationEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getRepresentation())) { - openArray("_representation"); - for (Enumeration e : element.getRepresentation()) - composeEnumerationExtras(null, e, new ElementDefinition.PropertyRepresentationEnumFactory(), true); - closeArray(); - } - }; - if (element.hasSliceNameElement()) { - composeStringCore("sliceName", element.getSliceNameElement(), false); - composeStringExtras("sliceName", element.getSliceNameElement(), false); - } - if (element.hasLabelElement()) { - composeStringCore("label", element.getLabelElement(), false); - composeStringExtras("label", element.getLabelElement(), false); - } - if (element.hasCode()) { - openArray("code"); - for (Coding e : element.getCode()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasSlicing()) { - composeElementDefinitionElementDefinitionSlicingComponent("slicing", element.getSlicing()); - } - if (element.hasShortElement()) { - composeStringCore("short", element.getShortElement(), false); - composeStringExtras("short", element.getShortElement(), false); - } - if (element.hasDefinitionElement()) { - composeMarkdownCore("definition", element.getDefinitionElement(), false); - composeMarkdownExtras("definition", element.getDefinitionElement(), false); - } - if (element.hasCommentElement()) { - composeMarkdownCore("comment", element.getCommentElement(), false); - composeMarkdownExtras("comment", element.getCommentElement(), false); - } - if (element.hasRequirementsElement()) { - composeMarkdownCore("requirements", element.getRequirementsElement(), false); - composeMarkdownExtras("requirements", element.getRequirementsElement(), false); - } - if (element.hasAlias()) { - openArray("alias"); - for (StringType e : element.getAlias()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getAlias())) { - openArray("_alias"); - for (StringType e : element.getAlias()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasMinElement()) { - composeUnsignedIntCore("min", element.getMinElement(), false); - composeUnsignedIntExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - if (element.hasBase()) { - composeElementDefinitionElementDefinitionBaseComponent("base", element.getBase()); - } - if (element.hasContentReferenceElement()) { - composeUriCore("contentReference", element.getContentReferenceElement(), false); - composeUriExtras("contentReference", element.getContentReferenceElement(), false); - } - if (element.hasType()) { - openArray("type"); - for (ElementDefinition.TypeRefComponent e : element.getType()) - composeElementDefinitionTypeRefComponent(null, e); - closeArray(); - }; - if (element.hasDefaultValue()) { - composeType("defaultValue", element.getDefaultValue()); - } - if (element.hasMeaningWhenMissingElement()) { - composeMarkdownCore("meaningWhenMissing", element.getMeaningWhenMissingElement(), false); - composeMarkdownExtras("meaningWhenMissing", element.getMeaningWhenMissingElement(), false); - } - if (element.hasOrderMeaningElement()) { - composeStringCore("orderMeaning", element.getOrderMeaningElement(), false); - composeStringExtras("orderMeaning", element.getOrderMeaningElement(), false); - } - if (element.hasFixed()) { - composeType("fixed", element.getFixed()); - } - if (element.hasPattern()) { - composeType("pattern", element.getPattern()); - } - if (element.hasExample()) { - openArray("example"); - for (ElementDefinition.ElementDefinitionExampleComponent e : element.getExample()) - composeElementDefinitionElementDefinitionExampleComponent(null, e); - closeArray(); - }; - if (element.hasMinValue()) { - composeType("minValue", element.getMinValue()); - } - if (element.hasMaxValue()) { - composeType("maxValue", element.getMaxValue()); - } - if (element.hasMaxLengthElement()) { - composeIntegerCore("maxLength", element.getMaxLengthElement(), false); - composeIntegerExtras("maxLength", element.getMaxLengthElement(), false); - } - if (element.hasCondition()) { - openArray("condition"); - for (IdType e : element.getCondition()) - composeIdCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getCondition())) { - openArray("_condition"); - for (IdType e : element.getCondition()) - composeIdExtras(null, e, true); - closeArray(); - } - }; - if (element.hasConstraint()) { - openArray("constraint"); - for (ElementDefinition.ElementDefinitionConstraintComponent e : element.getConstraint()) - composeElementDefinitionElementDefinitionConstraintComponent(null, e); - closeArray(); - }; - if (element.hasMustSupportElement()) { - composeBooleanCore("mustSupport", element.getMustSupportElement(), false); - composeBooleanExtras("mustSupport", element.getMustSupportElement(), false); - } - if (element.hasIsModifierElement()) { - composeBooleanCore("isModifier", element.getIsModifierElement(), false); - composeBooleanExtras("isModifier", element.getIsModifierElement(), false); - } - if (element.hasIsSummaryElement()) { - composeBooleanCore("isSummary", element.getIsSummaryElement(), false); - composeBooleanExtras("isSummary", element.getIsSummaryElement(), false); - } - if (element.hasBinding()) { - composeElementDefinitionElementDefinitionBindingComponent("binding", element.getBinding()); - } - if (element.hasMapping()) { - openArray("mapping"); - for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping()) - composeElementDefinitionElementDefinitionMappingComponent(null, e); - closeArray(); - }; - } - - protected void composeElementDefinitionElementDefinitionSlicingComponent(String name, ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionSlicingComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionSlicingComponentInner(ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { - composeElement(element); - if (element.hasDiscriminator()) { - openArray("discriminator"); - for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator()) - composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasOrderedElement()) { - composeBooleanCore("ordered", element.getOrderedElement(), false); - composeBooleanExtras("ordered", element.getOrderedElement(), false); - } - if (element.hasRulesElement()) { - composeEnumerationCore("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory(), false); - composeEnumerationExtras("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory(), false); - } - } - - protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentInner(ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { - composeElement(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - } - - protected void composeElementDefinitionElementDefinitionBaseComponent(String name, ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionBaseComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionBaseComponentInner(ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { - composeElement(element); - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasMinElement()) { - composeUnsignedIntCore("min", element.getMinElement(), false); - composeUnsignedIntExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - } - - protected void composeElementDefinitionTypeRefComponent(String name, ElementDefinition.TypeRefComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionTypeRefComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionTypeRefComponentInner(ElementDefinition.TypeRefComponent element) throws IOException { - composeElement(element); - if (element.hasCodeElement()) { - composeUriCore("code", element.getCodeElement(), false); - composeUriExtras("code", element.getCodeElement(), false); - } - if (element.hasProfileElement()) { - composeUriCore("profile", element.getProfileElement(), false); - composeUriExtras("profile", element.getProfileElement(), false); - } - if (element.hasTargetProfileElement()) { - composeUriCore("targetProfile", element.getTargetProfileElement(), false); - composeUriExtras("targetProfile", element.getTargetProfileElement(), false); - } - if (element.hasAggregation()) { - openArray("aggregation"); - for (Enumeration e : element.getAggregation()) - composeEnumerationCore(null, e, new ElementDefinition.AggregationModeEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getAggregation())) { - openArray("_aggregation"); - for (Enumeration e : element.getAggregation()) - composeEnumerationExtras(null, e, new ElementDefinition.AggregationModeEnumFactory(), true); - closeArray(); - } - }; - if (element.hasVersioningElement()) { - composeEnumerationCore("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory(), false); - composeEnumerationExtras("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory(), false); - } - } - - protected void composeElementDefinitionElementDefinitionExampleComponent(String name, ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionExampleComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionExampleComponentInner(ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { - composeElement(element); - if (element.hasLabelElement()) { - composeStringCore("label", element.getLabelElement(), false); - composeStringExtras("label", element.getLabelElement(), false); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeElementDefinitionElementDefinitionConstraintComponent(String name, ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionConstraintComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionConstraintComponentInner(ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { - composeElement(element); - if (element.hasKeyElement()) { - composeIdCore("key", element.getKeyElement(), false); - composeIdExtras("key", element.getKeyElement(), false); - } - if (element.hasRequirementsElement()) { - composeStringCore("requirements", element.getRequirementsElement(), false); - composeStringExtras("requirements", element.getRequirementsElement(), false); - } - if (element.hasSeverityElement()) { - composeEnumerationCore("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory(), false); - composeEnumerationExtras("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory(), false); - } - if (element.hasHumanElement()) { - composeStringCore("human", element.getHumanElement(), false); - composeStringExtras("human", element.getHumanElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - if (element.hasXpathElement()) { - composeStringCore("xpath", element.getXpathElement(), false); - composeStringExtras("xpath", element.getXpathElement(), false); - } - if (element.hasSourceElement()) { - composeUriCore("source", element.getSourceElement(), false); - composeUriExtras("source", element.getSourceElement(), false); - } - } - - protected void composeElementDefinitionElementDefinitionBindingComponent(String name, ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionBindingComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionBindingComponentInner(ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { - composeElement(element); - if (element.hasStrengthElement()) { - composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); - composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasValueSet()) { - composeType("valueSet", element.getValueSet()); - } - } - - protected void composeElementDefinitionElementDefinitionMappingComponent(String name, ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { - if (element != null) { - open(name); - composeElementDefinitionElementDefinitionMappingComponentInner(element); - close(); - } - } - - protected void composeElementDefinitionElementDefinitionMappingComponentInner(ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { - composeElement(element); - if (element.hasIdentityElement()) { - composeIdCore("identity", element.getIdentityElement(), false); - composeIdExtras("identity", element.getIdentityElement(), false); - } - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - if (element.hasMapElement()) { - composeStringCore("map", element.getMapElement(), false); - composeStringExtras("map", element.getMapElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeParameterDefinition(String name, ParameterDefinition element) throws IOException { - if (element != null) { - open(name); - composeParameterDefinitionInner(element); - close(); - } - } - - protected void composeParameterDefinitionInner(ParameterDefinition element) throws IOException { - composeElement(element); - if (element.hasNameElement()) { - composeCodeCore("name", element.getNameElement(), false); - composeCodeExtras("name", element.getNameElement(), false); - } - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory(), false); - } - if (element.hasMinElement()) { - composeIntegerCore("min", element.getMinElement(), false); - composeIntegerExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - } - - protected void composeDomainResourceElements(DomainResource element) throws IOException { - composeResourceElements(element); - if (element.hasText()) { - composeNarrative("text", element.getText()); - } - if (element.hasContained()) { - openArray("contained"); - for (Resource e : element.getContained()) { - open(null); - composeResource(e); - close(); - } - closeArray(); - }; - if (element.hasExtension()) { - openArray("extension"); - for (Extension e : element.getExtension()) - composeExtension(null, e); - closeArray(); - }; - if (element.hasModifierExtension()) { - openArray("modifierExtension"); - for (Extension e : element.getModifierExtension()) - composeExtension(null, e); - closeArray(); - }; - } - - protected void composeParameters(String name, Parameters element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeParametersInner(element); - } - } - - protected void composeParametersInner(Parameters element) throws IOException { - composeResourceElements(element); - if (element.hasParameter()) { - openArray("parameter"); - for (Parameters.ParametersParameterComponent e : element.getParameter()) - composeParametersParametersParameterComponent(null, e); - closeArray(); - }; - } - - protected void composeParametersParametersParameterComponent(String name, Parameters.ParametersParameterComponent element) throws IOException { - if (element != null) { - open(name); - composeParametersParametersParameterComponentInner(element); - close(); - } - } - - protected void composeParametersParametersParameterComponentInner(Parameters.ParametersParameterComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasResource()) { - open("resource"); - composeResource(element.getResource()); - close(); - } - if (element.hasPart()) { - openArray("part"); - for (Parameters.ParametersParameterComponent e : element.getPart()) - composeParametersParametersParameterComponent(null, e); - closeArray(); - }; - } - - protected void composeResourceElements(Resource element) throws IOException { - if (element.hasIdElement()) { - composeIdCore("id", element.getIdElement(), false); - composeIdExtras("id", element.getIdElement(), false); - } - if (element.hasMeta()) { - composeMeta("meta", element.getMeta()); - } - if (element.hasImplicitRulesElement()) { - composeUriCore("implicitRules", element.getImplicitRulesElement(), false); - composeUriExtras("implicitRules", element.getImplicitRulesElement(), false); - } - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - } - - protected void composeAccount(String name, Account element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeAccountInner(element); - } - } - - protected void composeAccountInner(Account element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Account.AccountStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Account.AccountStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasActive()) { - composePeriod("active", element.getActive()); - } - if (element.hasBalance()) { - composeMoney("balance", element.getBalance()); - } - if (element.hasCoverage()) { - openArray("coverage"); - for (Account.CoverageComponent e : element.getCoverage()) - composeAccountCoverageComponent(null, e); - closeArray(); - }; - if (element.hasOwner()) { - composeReference("owner", element.getOwner()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasGuarantor()) { - openArray("guarantor"); - for (Account.GuarantorComponent e : element.getGuarantor()) - composeAccountGuarantorComponent(null, e); - closeArray(); - }; - } - - protected void composeAccountCoverageComponent(String name, Account.CoverageComponent element) throws IOException { - if (element != null) { - open(name); - composeAccountCoverageComponentInner(element); - close(); - } - } - - protected void composeAccountCoverageComponentInner(Account.CoverageComponent element) throws IOException { - composeBackbone(element); - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasPriorityElement()) { - composePositiveIntCore("priority", element.getPriorityElement(), false); - composePositiveIntExtras("priority", element.getPriorityElement(), false); - } - } - - protected void composeAccountGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException { - if (element != null) { - open(name); - composeAccountGuarantorComponentInner(element); - close(); - } - } - - protected void composeAccountGuarantorComponentInner(Account.GuarantorComponent element) throws IOException { - composeBackbone(element); - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - if (element.hasOnHoldElement()) { - composeBooleanCore("onHold", element.getOnHoldElement(), false); - composeBooleanExtras("onHold", element.getOnHoldElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeActivityDefinition(String name, ActivityDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeActivityDefinitionInner(element); - } - } - - protected void composeActivityDefinitionInner(ActivityDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContributor()) { - openArray("contributor"); - for (Contributor e : element.getContributor()) - composeContributor(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasLibrary()) { - openArray("library"); - for (Reference e : element.getLibrary()) - composeReference(null, e); - closeArray(); - }; - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasParticipant()) { - openArray("participant"); - for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant()) - composeActivityDefinitionActivityDefinitionParticipantComponent(null, e); - closeArray(); - }; - if (element.hasProduct()) { - composeType("product", element.getProduct()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasDosage()) { - openArray("dosage"); - for (Dosage e : element.getDosage()) - composeDosage(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - openArray("bodySite"); - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTransform()) { - composeReference("transform", element.getTransform()); - } - if (element.hasDynamicValue()) { - openArray("dynamicValue"); - for (ActivityDefinition.ActivityDefinitionDynamicValueComponent e : element.getDynamicValue()) - composeActivityDefinitionActivityDefinitionDynamicValueComponent(null, e); - closeArray(); - }; - } - - protected void composeActivityDefinitionActivityDefinitionParticipantComponent(String name, ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composeActivityDefinitionActivityDefinitionParticipantComponentInner(element); - close(); - } - } - - protected void composeActivityDefinitionActivityDefinitionParticipantComponentInner(ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory(), false); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - } - - protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { - if (element != null) { - open(name); - composeActivityDefinitionActivityDefinitionDynamicValueComponentInner(element); - close(); - } - } - - protected void composeActivityDefinitionActivityDefinitionDynamicValueComponentInner(ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { - composeBackbone(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasLanguageElement()) { - composeStringCore("language", element.getLanguageElement(), false); - composeStringExtras("language", element.getLanguageElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - } - - protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeAdverseEventInner(element); - } - } - - protected void composeAdverseEventInner(AdverseEvent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasActualityElement()) { - composeEnumerationCore("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory(), false); - composeEnumerationExtras("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory(), false); - } - if (element.hasCategoryElement()) { - composeEnumerationCore("category", element.getCategoryElement(), new AdverseEvent.AdverseEventCategoryEnumFactory(), false); - composeEnumerationExtras("category", element.getCategoryElement(), new AdverseEvent.AdverseEventCategoryEnumFactory(), false); - } - if (element.hasEvent()) { - composeCodeableConcept("event", element.getEvent()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasResultingCondition()) { - openArray("resultingCondition"); - for (Reference e : element.getResultingCondition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasSeriousness()) { - composeCodeableConcept("seriousness", element.getSeriousness()); - } - if (element.hasSeverity()) { - composeCodeableConcept("severity", element.getSeverity()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasRecorder()) { - composeReference("recorder", element.getRecorder()); - } - if (element.hasEventParticipant()) { - composeReference("eventParticipant", element.getEventParticipant()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasSuspectEntity()) { - openArray("suspectEntity"); - for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity()) - composeAdverseEventAdverseEventSuspectEntityComponent(null, e); - closeArray(); - }; - if (element.hasSubjectMedicalHistory()) { - openArray("subjectMedicalHistory"); - for (Reference e : element.getSubjectMedicalHistory()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReferenceDocument()) { - openArray("referenceDocument"); - for (Reference e : element.getReferenceDocument()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStudy()) { - openArray("study"); - for (Reference e : element.getStudy()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeAdverseEventAdverseEventSuspectEntityComponent(String name, AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { - if (element != null) { - open(name); - composeAdverseEventAdverseEventSuspectEntityComponentInner(element); - close(); - } - } - - protected void composeAdverseEventAdverseEventSuspectEntityComponentInner(AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { - composeBackbone(element); - if (element.hasInstance()) { - composeReference("instance", element.getInstance()); - } - if (element.hasCausality()) { - openArray("causality"); - for (AdverseEvent.AdverseEventSuspectEntityCausalityComponent e : element.getCausality()) - composeAdverseEventAdverseEventSuspectEntityCausalityComponent(null, e); - closeArray(); - }; - } - - protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { - if (element != null) { - open(name); - composeAdverseEventAdverseEventSuspectEntityCausalityComponentInner(element); - close(); - } - } - - protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponentInner(AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { - composeBackbone(element); - if (element.hasAssessment()) { - composeCodeableConcept("assessment", element.getAssessment()); - } - if (element.hasProductRelatednessElement()) { - composeStringCore("productRelatedness", element.getProductRelatednessElement(), false); - composeStringExtras("productRelatedness", element.getProductRelatednessElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - } - - protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeAllergyIntoleranceInner(element); - } - } - - protected void composeAllergyIntoleranceInner(AllergyIntolerance element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasClinicalStatusElement()) { - composeEnumerationCore("clinicalStatus", element.getClinicalStatusElement(), new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory(), false); - composeEnumerationExtras("clinicalStatus", element.getClinicalStatusElement(), new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory(), false); - } - if (element.hasVerificationStatusElement()) { - composeEnumerationCore("verificationStatus", element.getVerificationStatusElement(), new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory(), false); - composeEnumerationExtras("verificationStatus", element.getVerificationStatusElement(), new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (Enumeration e : element.getCategory()) - composeEnumerationCore(null, e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getCategory())) { - openArray("_category"); - for (Enumeration e : element.getCategory()) - composeEnumerationExtras(null, e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), true); - closeArray(); - } - }; - if (element.hasCriticalityElement()) { - composeEnumerationCore("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory(), false); - composeEnumerationExtras("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasOnset()) { - composeType("onset", element.getOnset()); - } - if (element.hasAssertedDateElement()) { - composeDateTimeCore("assertedDate", element.getAssertedDateElement(), false); - composeDateTimeExtras("assertedDate", element.getAssertedDateElement(), false); - } - if (element.hasRecorder()) { - composeReference("recorder", element.getRecorder()); - } - if (element.hasAsserter()) { - composeReference("asserter", element.getAsserter()); - } - if (element.hasLastOccurrenceElement()) { - composeDateTimeCore("lastOccurrence", element.getLastOccurrenceElement(), false); - composeDateTimeExtras("lastOccurrence", element.getLastOccurrenceElement(), false); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasReaction()) { - openArray("reaction"); - for (AllergyIntolerance.AllergyIntoleranceReactionComponent e : element.getReaction()) - composeAllergyIntoleranceAllergyIntoleranceReactionComponent(null, e); - closeArray(); - }; - } - - protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { - if (element != null) { - open(name); - composeAllergyIntoleranceAllergyIntoleranceReactionComponentInner(element); - close(); - } - } - - protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponentInner(AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { - composeBackbone(element); - if (element.hasSubstance()) { - composeCodeableConcept("substance", element.getSubstance()); - } - if (element.hasManifestation()) { - openArray("manifestation"); - for (CodeableConcept e : element.getManifestation()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasOnsetElement()) { - composeDateTimeCore("onset", element.getOnsetElement(), false); - composeDateTimeExtras("onset", element.getOnsetElement(), false); - } - if (element.hasSeverityElement()) { - composeEnumerationCore("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory(), false); - composeEnumerationExtras("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory(), false); - } - if (element.hasExposureRoute()) { - composeCodeableConcept("exposureRoute", element.getExposureRoute()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeAppointment(String name, Appointment element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeAppointmentInner(element); - } - } - - protected void composeAppointmentInner(Appointment element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory(), false); - } - if (element.hasServiceCategory()) { - composeCodeableConcept("serviceCategory", element.getServiceCategory()); - } - if (element.hasServiceType()) { - openArray("serviceType"); - for (CodeableConcept e : element.getServiceType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialty()) { - openArray("specialty"); - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasAppointmentType()) { - composeCodeableConcept("appointmentType", element.getAppointmentType()); - } - if (element.hasReason()) { - openArray("reason"); - for (CodeableConcept e : element.getReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasIndication()) { - openArray("indication"); - for (Reference e : element.getIndication()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPriorityElement()) { - composeUnsignedIntCore("priority", element.getPriorityElement(), false); - composeUnsignedIntExtras("priority", element.getPriorityElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasSupportingInformation()) { - openArray("supportingInformation"); - for (Reference e : element.getSupportingInformation()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStartElement()) { - composeInstantCore("start", element.getStartElement(), false); - composeInstantExtras("start", element.getStartElement(), false); - } - if (element.hasEndElement()) { - composeInstantCore("end", element.getEndElement(), false); - composeInstantExtras("end", element.getEndElement(), false); - } - if (element.hasMinutesDurationElement()) { - composePositiveIntCore("minutesDuration", element.getMinutesDurationElement(), false); - composePositiveIntExtras("minutesDuration", element.getMinutesDurationElement(), false); - } - if (element.hasSlot()) { - openArray("slot"); - for (Reference e : element.getSlot()) - composeReference(null, e); - closeArray(); - }; - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasIncomingReferral()) { - openArray("incomingReferral"); - for (Reference e : element.getIncomingReferral()) - composeReference(null, e); - closeArray(); - }; - if (element.hasParticipant()) { - openArray("participant"); - for (Appointment.AppointmentParticipantComponent e : element.getParticipant()) - composeAppointmentAppointmentParticipantComponent(null, e); - closeArray(); - }; - if (element.hasRequestedPeriod()) { - openArray("requestedPeriod"); - for (Period e : element.getRequestedPeriod()) - composePeriod(null, e); - closeArray(); - }; - } - - protected void composeAppointmentAppointmentParticipantComponent(String name, Appointment.AppointmentParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composeAppointmentAppointmentParticipantComponentInner(element); - close(); - } - } - - protected void composeAppointmentAppointmentParticipantComponentInner(Appointment.AppointmentParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasRequiredElement()) { - composeEnumerationCore("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory(), false); - composeEnumerationExtras("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(), false); - } - } - - protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeAppointmentResponseInner(element); - } - } - - protected void composeAppointmentResponseInner(AppointmentResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasAppointment()) { - composeReference("appointment", element.getAppointment()); - } - if (element.hasStartElement()) { - composeInstantCore("start", element.getStartElement(), false); - composeInstantExtras("start", element.getStartElement(), false); - } - if (element.hasEndElement()) { - composeInstantCore("end", element.getEndElement(), false); - composeInstantExtras("end", element.getEndElement(), false); - } - if (element.hasParticipantType()) { - openArray("participantType"); - for (CodeableConcept e : element.getParticipantType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasParticipantStatusElement()) { - composeEnumerationCore("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.ParticipantStatusEnumFactory(), false); - composeEnumerationExtras("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.ParticipantStatusEnumFactory(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeAuditEvent(String name, AuditEvent element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeAuditEventInner(element); - } - } - - protected void composeAuditEventInner(AuditEvent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasSubtype()) { - openArray("subtype"); - for (Coding e : element.getSubtype()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasActionElement()) { - composeEnumerationCore("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false); - composeEnumerationExtras("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false); - } - if (element.hasRecordedElement()) { - composeInstantCore("recorded", element.getRecordedElement(), false); - composeInstantExtras("recorded", element.getRecordedElement(), false); - } - if (element.hasOutcomeElement()) { - composeEnumerationCore("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory(), false); - composeEnumerationExtras("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory(), false); - } - if (element.hasOutcomeDescElement()) { - composeStringCore("outcomeDesc", element.getOutcomeDescElement(), false); - composeStringExtras("outcomeDesc", element.getOutcomeDescElement(), false); - } - if (element.hasPurposeOfEvent()) { - openArray("purposeOfEvent"); - for (CodeableConcept e : element.getPurposeOfEvent()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasAgent()) { - openArray("agent"); - for (AuditEvent.AuditEventAgentComponent e : element.getAgent()) - composeAuditEventAuditEventAgentComponent(null, e); - closeArray(); - }; - if (element.hasSource()) { - composeAuditEventAuditEventSourceComponent("source", element.getSource()); - } - if (element.hasEntity()) { - openArray("entity"); - for (AuditEvent.AuditEventEntityComponent e : element.getEntity()) - composeAuditEventAuditEventEntityComponent(null, e); - closeArray(); - }; - } - - protected void composeAuditEventAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element) throws IOException { - if (element != null) { - open(name); - composeAuditEventAuditEventAgentComponentInner(element); - close(); - } - } - - protected void composeAuditEventAuditEventAgentComponentInner(AuditEvent.AuditEventAgentComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - openArray("role"); - for (CodeableConcept e : element.getRole()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - if (element.hasUserId()) { - composeIdentifier("userId", element.getUserId()); - } - if (element.hasAltIdElement()) { - composeStringCore("altId", element.getAltIdElement(), false); - composeStringExtras("altId", element.getAltIdElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasRequestorElement()) { - composeBooleanCore("requestor", element.getRequestorElement(), false); - composeBooleanExtras("requestor", element.getRequestorElement(), false); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasPolicy()) { - openArray("policy"); - for (UriType e : element.getPolicy()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPolicy())) { - openArray("_policy"); - for (UriType e : element.getPolicy()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasMedia()) { - composeCoding("media", element.getMedia()); - } - if (element.hasNetwork()) { - composeAuditEventAuditEventAgentNetworkComponent("network", element.getNetwork()); - } - if (element.hasPurposeOfUse()) { - openArray("purposeOfUse"); - for (CodeableConcept e : element.getPurposeOfUse()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composeAuditEventAuditEventAgentNetworkComponent(String name, AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { - if (element != null) { - open(name); - composeAuditEventAuditEventAgentNetworkComponentInner(element); - close(); - } - } - - protected void composeAuditEventAuditEventAgentNetworkComponentInner(AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { - composeBackbone(element); - if (element.hasAddressElement()) { - composeStringCore("address", element.getAddressElement(), false); - composeStringExtras("address", element.getAddressElement(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory(), false); - } - } - - protected void composeAuditEventAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element) throws IOException { - if (element != null) { - open(name); - composeAuditEventAuditEventSourceComponentInner(element); - close(); - } - } - - protected void composeAuditEventAuditEventSourceComponentInner(AuditEvent.AuditEventSourceComponent element) throws IOException { - composeBackbone(element); - if (element.hasSiteElement()) { - composeStringCore("site", element.getSiteElement(), false); - composeStringExtras("site", element.getSiteElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasType()) { - openArray("type"); - for (Coding e : element.getType()) - composeCoding(null, e); - closeArray(); - }; - } - - protected void composeAuditEventAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element) throws IOException { - if (element != null) { - open(name); - composeAuditEventAuditEventEntityComponentInner(element); - close(); - } - } - - protected void composeAuditEventAuditEventEntityComponentInner(AuditEvent.AuditEventEntityComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasRole()) { - composeCoding("role", element.getRole()); - } - if (element.hasLifecycle()) { - composeCoding("lifecycle", element.getLifecycle()); - } - if (element.hasSecurityLabel()) { - openArray("securityLabel"); - for (Coding e : element.getSecurityLabel()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasQueryElement()) { - composeBase64BinaryCore("query", element.getQueryElement(), false); - composeBase64BinaryExtras("query", element.getQueryElement(), false); - } - if (element.hasDetail()) { - openArray("detail"); - for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail()) - composeAuditEventAuditEventEntityDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeAuditEventAuditEventEntityDetailComponent(String name, AuditEvent.AuditEventEntityDetailComponent element) throws IOException { - if (element != null) { - open(name); - composeAuditEventAuditEventEntityDetailComponentInner(element); - close(); - } - } - - protected void composeAuditEventAuditEventEntityDetailComponentInner(AuditEvent.AuditEventEntityDetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeStringCore("type", element.getTypeElement(), false); - composeStringExtras("type", element.getTypeElement(), false); - } - if (element.hasValueElement()) { - composeBase64BinaryCore("value", element.getValueElement(), false); - composeBase64BinaryExtras("value", element.getValueElement(), false); - } - } - - protected void composeBasic(String name, Basic element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeBasicInner(element); - } - } - - protected void composeBasicInner(Basic element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasCreatedElement()) { - composeDateCore("created", element.getCreatedElement(), false); - composeDateExtras("created", element.getCreatedElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - } - - protected void composeBinary(String name, Binary element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeBinaryInner(element); - } - } - - protected void composeBinaryInner(Binary element) throws IOException { - composeResourceElements(element); - if (element.hasContentTypeElement()) { - composeCodeCore("contentType", element.getContentTypeElement(), false); - composeCodeExtras("contentType", element.getContentTypeElement(), false); - } - if (element.hasSecurityContext()) { - composeReference("securityContext", element.getSecurityContext()); - } - if (element.hasContentElement()) { - composeBase64BinaryCore("content", element.getContentElement(), false); - composeBase64BinaryExtras("content", element.getContentElement(), false); - } - } - - protected void composeBodyStructure(String name, BodyStructure element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeBodyStructureInner(element); - } - } - - protected void composeBodyStructureInner(BodyStructure element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasMorphology()) { - composeCodeableConcept("morphology", element.getMorphology()); - } - if (element.hasLocation()) { - composeCodeableConcept("location", element.getLocation()); - } - if (element.hasLocationQualifier()) { - openArray("locationQualifier"); - for (CodeableConcept e : element.getLocationQualifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasImage()) { - openArray("image"); - for (Attachment e : element.getImage()) - composeAttachment(null, e); - closeArray(); - }; - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - } - - protected void composeBundle(String name, Bundle element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeBundleInner(element); - } - } - - protected void composeBundleInner(Bundle element) throws IOException { - composeResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory(), false); - } - if (element.hasTotalElement()) { - composeUnsignedIntCore("total", element.getTotalElement(), false); - composeUnsignedIntExtras("total", element.getTotalElement(), false); - } - if (element.hasLink()) { - openArray("link"); - for (Bundle.BundleLinkComponent e : element.getLink()) - composeBundleBundleLinkComponent(null, e); - closeArray(); - }; - if (element.hasEntry()) { - openArray("entry"); - for (Bundle.BundleEntryComponent e : element.getEntry()) - composeBundleBundleEntryComponent(null, e); - closeArray(); - }; - if (element.hasSignature()) { - composeSignature("signature", element.getSignature()); - } - } - - protected void composeBundleBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException { - if (element != null) { - open(name); - composeBundleBundleLinkComponentInner(element); - close(); - } - } - - protected void composeBundleBundleLinkComponentInner(Bundle.BundleLinkComponent element) throws IOException { - composeBackbone(element); - if (element.hasRelationElement()) { - composeStringCore("relation", element.getRelationElement(), false); - composeStringExtras("relation", element.getRelationElement(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - } - - protected void composeBundleBundleEntryComponent(String name, Bundle.BundleEntryComponent element) throws IOException { - if (element != null) { - open(name); - composeBundleBundleEntryComponentInner(element); - close(); - } - } - - protected void composeBundleBundleEntryComponentInner(Bundle.BundleEntryComponent element) throws IOException { - composeBackbone(element); - if (element.hasLink()) { - openArray("link"); - for (Bundle.BundleLinkComponent e : element.getLink()) - composeBundleBundleLinkComponent(null, e); - closeArray(); - }; - if (element.hasFullUrlElement()) { - composeUriCore("fullUrl", element.getFullUrlElement(), false); - composeUriExtras("fullUrl", element.getFullUrlElement(), false); - } - if (element.hasResource()) { - open("resource"); - composeResource(element.getResource()); - close(); - } - if (element.hasSearch()) { - composeBundleBundleEntrySearchComponent("search", element.getSearch()); - } - if (element.hasRequest()) { - composeBundleBundleEntryRequestComponent("request", element.getRequest()); - } - if (element.hasResponse()) { - composeBundleBundleEntryResponseComponent("response", element.getResponse()); - } - } - - protected void composeBundleBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element) throws IOException { - if (element != null) { - open(name); - composeBundleBundleEntrySearchComponentInner(element); - close(); - } - } - - protected void composeBundleBundleEntrySearchComponentInner(Bundle.BundleEntrySearchComponent element) throws IOException { - composeBackbone(element); - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory(), false); - } - if (element.hasScoreElement()) { - composeDecimalCore("score", element.getScoreElement(), false); - composeDecimalExtras("score", element.getScoreElement(), false); - } - } - - protected void composeBundleBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element) throws IOException { - if (element != null) { - open(name); - composeBundleBundleEntryRequestComponentInner(element); - close(); - } - } - - protected void composeBundleBundleEntryRequestComponentInner(Bundle.BundleEntryRequestComponent element) throws IOException { - composeBackbone(element); - if (element.hasMethodElement()) { - composeEnumerationCore("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory(), false); - composeEnumerationExtras("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIfNoneMatchElement()) { - composeStringCore("ifNoneMatch", element.getIfNoneMatchElement(), false); - composeStringExtras("ifNoneMatch", element.getIfNoneMatchElement(), false); - } - if (element.hasIfModifiedSinceElement()) { - composeInstantCore("ifModifiedSince", element.getIfModifiedSinceElement(), false); - composeInstantExtras("ifModifiedSince", element.getIfModifiedSinceElement(), false); - } - if (element.hasIfMatchElement()) { - composeStringCore("ifMatch", element.getIfMatchElement(), false); - composeStringExtras("ifMatch", element.getIfMatchElement(), false); - } - if (element.hasIfNoneExistElement()) { - composeStringCore("ifNoneExist", element.getIfNoneExistElement(), false); - composeStringExtras("ifNoneExist", element.getIfNoneExistElement(), false); - } - } - - protected void composeBundleBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element) throws IOException { - if (element != null) { - open(name); - composeBundleBundleEntryResponseComponentInner(element); - close(); - } - } - - protected void composeBundleBundleEntryResponseComponentInner(Bundle.BundleEntryResponseComponent element) throws IOException { - composeBackbone(element); - if (element.hasStatusElement()) { - composeStringCore("status", element.getStatusElement(), false); - composeStringExtras("status", element.getStatusElement(), false); - } - if (element.hasLocationElement()) { - composeUriCore("location", element.getLocationElement(), false); - composeUriExtras("location", element.getLocationElement(), false); - } - if (element.hasEtagElement()) { - composeStringCore("etag", element.getEtagElement(), false); - composeStringExtras("etag", element.getEtagElement(), false); - } - if (element.hasLastModifiedElement()) { - composeInstantCore("lastModified", element.getLastModifiedElement(), false); - composeInstantExtras("lastModified", element.getLastModifiedElement(), false); - } - if (element.hasOutcome()) { - open("outcome"); - composeResource(element.getOutcome()); - close(); - } - } - - protected void composeCapabilityStatement(String name, CapabilityStatement element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCapabilityStatementInner(element); - } - } - - protected void composeCapabilityStatementInner(CapabilityStatement element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new CapabilityStatement.CapabilityStatementKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new CapabilityStatement.CapabilityStatementKindEnumFactory(), false); - } - if (element.hasInstantiates()) { - openArray("instantiates"); - for (UriType e : element.getInstantiates()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getInstantiates())) { - openArray("_instantiates"); - for (UriType e : element.getInstantiates()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSoftware()) { - composeCapabilityStatementCapabilityStatementSoftwareComponent("software", element.getSoftware()); - } - if (element.hasImplementation()) { - composeCapabilityStatementCapabilityStatementImplementationComponent("implementation", element.getImplementation()); - } - if (element.hasFhirVersionElement()) { - composeIdCore("fhirVersion", element.getFhirVersionElement(), false); - composeIdExtras("fhirVersion", element.getFhirVersionElement(), false); - } - if (element.hasAcceptUnknownElement()) { - composeEnumerationCore("acceptUnknown", element.getAcceptUnknownElement(), new CapabilityStatement.UnknownContentCodeEnumFactory(), false); - composeEnumerationExtras("acceptUnknown", element.getAcceptUnknownElement(), new CapabilityStatement.UnknownContentCodeEnumFactory(), false); - } - if (element.hasFormat()) { - openArray("format"); - for (CodeType e : element.getFormat()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getFormat())) { - openArray("_format"); - for (CodeType e : element.getFormat()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasPatchFormat()) { - openArray("patchFormat"); - for (CodeType e : element.getPatchFormat()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPatchFormat())) { - openArray("_patchFormat"); - for (CodeType e : element.getPatchFormat()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasImplementationGuide()) { - openArray("implementationGuide"); - for (UriType e : element.getImplementationGuide()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getImplementationGuide())) { - openArray("_implementationGuide"); - for (UriType e : element.getImplementationGuide()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasProfile()) { - openArray("profile"); - for (Reference e : element.getProfile()) - composeReference(null, e); - closeArray(); - }; - if (element.hasRest()) { - openArray("rest"); - for (CapabilityStatement.CapabilityStatementRestComponent e : element.getRest()) - composeCapabilityStatementCapabilityStatementRestComponent(null, e); - closeArray(); - }; - if (element.hasMessaging()) { - openArray("messaging"); - for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging()) - composeCapabilityStatementCapabilityStatementMessagingComponent(null, e); - closeArray(); - }; - if (element.hasDocument()) { - openArray("document"); - for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument()) - composeCapabilityStatementCapabilityStatementDocumentComponent(null, e); - closeArray(); - }; - } - - protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(String name, CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementSoftwareComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementSoftwareComponentInner(CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasReleaseDateElement()) { - composeDateTimeCore("releaseDate", element.getReleaseDateElement(), false); - composeDateTimeExtras("releaseDate", element.getReleaseDateElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementImplementationComponent(String name, CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementImplementationComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementImplementationComponentInner(CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { - composeBackbone(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestComponent(String name, CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementRestComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestComponentInner(CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { - composeBackbone(element); - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasSecurity()) { - composeCapabilityStatementCapabilityStatementRestSecurityComponent("security", element.getSecurity()); - } - if (element.hasResource()) { - openArray("resource"); - for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource()) - composeCapabilityStatementCapabilityStatementRestResourceComponent(null, e); - closeArray(); - }; - if (element.hasInteraction()) { - openArray("interaction"); - for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction()) - composeCapabilityStatementSystemInteractionComponent(null, e); - closeArray(); - }; - if (element.hasSearchParam()) { - openArray("searchParam"); - for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(null, e); - closeArray(); - }; - if (element.hasOperation()) { - openArray("operation"); - for (CapabilityStatement.CapabilityStatementRestOperationComponent e : element.getOperation()) - composeCapabilityStatementCapabilityStatementRestOperationComponent(null, e); - closeArray(); - }; - if (element.hasCompartment()) { - openArray("compartment"); - for (UriType e : element.getCompartment()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getCompartment())) { - openArray("_compartment"); - for (UriType e : element.getCompartment()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementRestSecurityComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityComponentInner(CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { - composeBackbone(element); - if (element.hasCorsElement()) { - composeBooleanCore("cors", element.getCorsElement(), false); - composeBooleanExtras("cors", element.getCorsElement(), false); - } - if (element.hasService()) { - openArray("service"); - for (CodeableConcept e : element.getService()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasCertificate()) { - openArray("certificate"); - for (CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent e : element.getCertificate()) - composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(null, e); - closeArray(); - }; - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentInner(CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasBlobElement()) { - composeBase64BinaryCore("blob", element.getBlobElement(), false); - composeBase64BinaryExtras("blob", element.getBlobElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(String name, CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementRestResourceComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceComponentInner(CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - if (element.hasDocumentationElement()) { - composeMarkdownCore("documentation", element.getDocumentationElement(), false); - composeMarkdownExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasInteraction()) { - openArray("interaction"); - for (CapabilityStatement.ResourceInteractionComponent e : element.getInteraction()) - composeCapabilityStatementResourceInteractionComponent(null, e); - closeArray(); - }; - if (element.hasVersioningElement()) { - composeEnumerationCore("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory(), false); - composeEnumerationExtras("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory(), false); - } - if (element.hasReadHistoryElement()) { - composeBooleanCore("readHistory", element.getReadHistoryElement(), false); - composeBooleanExtras("readHistory", element.getReadHistoryElement(), false); - } - if (element.hasUpdateCreateElement()) { - composeBooleanCore("updateCreate", element.getUpdateCreateElement(), false); - composeBooleanExtras("updateCreate", element.getUpdateCreateElement(), false); - } - if (element.hasConditionalCreateElement()) { - composeBooleanCore("conditionalCreate", element.getConditionalCreateElement(), false); - composeBooleanExtras("conditionalCreate", element.getConditionalCreateElement(), false); - } - if (element.hasConditionalReadElement()) { - composeEnumerationCore("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory(), false); - composeEnumerationExtras("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory(), false); - } - if (element.hasConditionalUpdateElement()) { - composeBooleanCore("conditionalUpdate", element.getConditionalUpdateElement(), false); - composeBooleanExtras("conditionalUpdate", element.getConditionalUpdateElement(), false); - } - if (element.hasConditionalDeleteElement()) { - composeEnumerationCore("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory(), false); - composeEnumerationExtras("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory(), false); - } - if (element.hasReferencePolicy()) { - openArray("referencePolicy"); - for (Enumeration e : element.getReferencePolicy()) - composeEnumerationCore(null, e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getReferencePolicy())) { - openArray("_referencePolicy"); - for (Enumeration e : element.getReferencePolicy()) - composeEnumerationExtras(null, e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), true); - closeArray(); - } - }; - if (element.hasSearchInclude()) { - openArray("searchInclude"); - for (StringType e : element.getSearchInclude()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSearchInclude())) { - openArray("_searchInclude"); - for (StringType e : element.getSearchInclude()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSearchRevInclude()) { - openArray("searchRevInclude"); - for (StringType e : element.getSearchRevInclude()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSearchRevInclude())) { - openArray("_searchRevInclude"); - for (StringType e : element.getSearchRevInclude()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSearchParam()) { - openArray("searchParam"); - for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(null, e); - closeArray(); - }; - } - - protected void composeCapabilityStatementResourceInteractionComponent(String name, CapabilityStatement.ResourceInteractionComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementResourceInteractionComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementResourceInteractionComponentInner(CapabilityStatement.ResourceInteractionComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentInner(CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDefinitionElement()) { - composeUriCore("definition", element.getDefinitionElement(), false); - composeUriExtras("definition", element.getDefinitionElement(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeCapabilityStatementSystemInteractionComponent(String name, CapabilityStatement.SystemInteractionComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementSystemInteractionComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementSystemInteractionComponentInner(CapabilityStatement.SystemInteractionComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestOperationComponent(String name, CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementRestOperationComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestOperationComponentInner(CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingComponent(String name, CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementMessagingComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingComponentInner(CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { - composeBackbone(element); - if (element.hasEndpoint()) { - openArray("endpoint"); - for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint()) - composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(null, e); - closeArray(); - }; - if (element.hasReliableCacheElement()) { - composeUnsignedIntCore("reliableCache", element.getReliableCacheElement(), false); - composeUnsignedIntExtras("reliableCache", element.getReliableCacheElement(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasSupportedMessage()) { - openArray("supportedMessage"); - for (CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent e : element.getSupportedMessage()) - composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(null, e); - closeArray(); - }; - if (element.hasEvent()) { - openArray("event"); - for (CapabilityStatement.CapabilityStatementMessagingEventComponent e : element.getEvent()) - composeCapabilityStatementCapabilityStatementMessagingEventComponent(null, e); - closeArray(); - }; - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementMessagingEndpointComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponentInner(CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { - composeBackbone(element); - if (element.hasProtocol()) { - composeCoding("protocol", element.getProtocol()); - } - if (element.hasAddressElement()) { - composeUriCore("address", element.getAddressElement(), false); - composeUriExtras("address", element.getAddressElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentInner(CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { - composeBackbone(element); - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); - } - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEventComponent(String name, CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementMessagingEventComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEventComponentInner(CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCoding("code", element.getCode()); - } - if (element.hasCategoryElement()) { - composeEnumerationCore("category", element.getCategoryElement(), new CapabilityStatement.MessageSignificanceCategoryEnumFactory(), false); - composeEnumerationExtras("category", element.getCategoryElement(), new CapabilityStatement.MessageSignificanceCategoryEnumFactory(), false); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); - } - if (element.hasFocusElement()) { - composeCodeCore("focus", element.getFocusElement(), false); - composeCodeExtras("focus", element.getFocusElement(), false); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeCapabilityStatementCapabilityStatementDocumentComponent(String name, CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { - if (element != null) { - open(name); - composeCapabilityStatementCapabilityStatementDocumentComponentInner(element); - close(); - } - } - - protected void composeCapabilityStatementCapabilityStatementDocumentComponentInner(CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { - composeBackbone(element); - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - } - - protected void composeCarePlan(String name, CarePlan element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCarePlanInner(element); - } - } - - protected void composeCarePlanInner(CarePlan element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReplaces()) { - openArray("replaces"); - for (Reference e : element.getReplaces()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory(), false); - } - if (element.hasIntentElement()) { - composeEnumerationCore("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory(), false); - composeEnumerationExtras("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasAuthor()) { - openArray("author"); - for (Reference e : element.getAuthor()) - composeReference(null, e); - closeArray(); - }; - if (element.hasCareTeam()) { - openArray("careTeam"); - for (Reference e : element.getCareTeam()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAddresses()) { - openArray("addresses"); - for (Reference e : element.getAddresses()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSupportingInfo()) { - openArray("supportingInfo"); - for (Reference e : element.getSupportingInfo()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGoal()) { - openArray("goal"); - for (Reference e : element.getGoal()) - composeReference(null, e); - closeArray(); - }; - if (element.hasActivity()) { - openArray("activity"); - for (CarePlan.CarePlanActivityComponent e : element.getActivity()) - composeCarePlanCarePlanActivityComponent(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeCarePlanCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element) throws IOException { - if (element != null) { - open(name); - composeCarePlanCarePlanActivityComponentInner(element); - close(); - } - } - - protected void composeCarePlanCarePlanActivityComponentInner(CarePlan.CarePlanActivityComponent element) throws IOException { - composeBackbone(element); - if (element.hasOutcomeCodeableConcept()) { - openArray("outcomeCodeableConcept"); - for (CodeableConcept e : element.getOutcomeCodeableConcept()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasOutcomeReference()) { - openArray("outcomeReference"); - for (Reference e : element.getOutcomeReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasProgress()) { - openArray("progress"); - for (Annotation e : element.getProgress()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - if (element.hasDetail()) { - composeCarePlanCarePlanActivityDetailComponent("detail", element.getDetail()); - } - } - - protected void composeCarePlanCarePlanActivityDetailComponent(String name, CarePlan.CarePlanActivityDetailComponent element) throws IOException { - if (element != null) { - open(name); - composeCarePlanCarePlanActivityDetailComponentInner(element); - close(); - } - } - - protected void composeCarePlanCarePlanActivityDetailComponentInner(CarePlan.CarePlanActivityDetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGoal()) { - openArray("goal"); - for (Reference e : element.getGoal()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory(), false); - } - if (element.hasStatusReasonElement()) { - composeStringCore("statusReason", element.getStatusReasonElement(), false); - composeStringExtras("statusReason", element.getStatusReasonElement(), false); - } - if (element.hasProhibitedElement()) { - composeBooleanCore("prohibited", element.getProhibitedElement(), false); - composeBooleanExtras("prohibited", element.getProhibitedElement(), false); - } - if (element.hasScheduled()) { - composeType("scheduled", element.getScheduled()); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasPerformer()) { - openArray("performer"); - for (Reference e : element.getPerformer()) - composeReference(null, e); - closeArray(); - }; - if (element.hasProduct()) { - composeType("product", element.getProduct()); - } - if (element.hasDailyAmount()) { - composeSimpleQuantity("dailyAmount", element.getDailyAmount()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - } - - protected void composeCareTeam(String name, CareTeam element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCareTeamInner(element); - } - } - - protected void composeCareTeamInner(CareTeam element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasParticipant()) { - openArray("participant"); - for (CareTeam.CareTeamParticipantComponent e : element.getParticipant()) - composeCareTeamCareTeamParticipantComponent(null, e); - closeArray(); - }; - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasManagingOrganization()) { - openArray("managingOrganization"); - for (Reference e : element.getManagingOrganization()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeCareTeamCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composeCareTeamCareTeamParticipantComponentInner(element); - close(); - } - } - - protected void composeCareTeamCareTeamParticipantComponentInner(CareTeam.CareTeamParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasMember()) { - composeReference("member", element.getMember()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeChargeItem(String name, ChargeItem element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeChargeItemInner(element); - } - } - - protected void composeChargeItemInner(ChargeItem element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasDefinition()) { - openArray("definition"); - for (UriType e : element.getDefinition()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getDefinition())) { - openArray("_definition"); - for (UriType e : element.getDefinition()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory(), false); - } - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasParticipant()) { - openArray("participant"); - for (ChargeItem.ChargeItemParticipantComponent e : element.getParticipant()) - composeChargeItemChargeItemParticipantComponent(null, e); - closeArray(); - }; - if (element.hasPerformingOrganization()) { - composeReference("performingOrganization", element.getPerformingOrganization()); - } - if (element.hasRequestingOrganization()) { - composeReference("requestingOrganization", element.getRequestingOrganization()); - } - if (element.hasQuantity()) { - composeQuantity("quantity", element.getQuantity()); - } - if (element.hasBodysite()) { - openArray("bodysite"); - for (CodeableConcept e : element.getBodysite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasFactorOverrideElement()) { - composeDecimalCore("factorOverride", element.getFactorOverrideElement(), false); - composeDecimalExtras("factorOverride", element.getFactorOverrideElement(), false); - } - if (element.hasPriceOverride()) { - composeMoney("priceOverride", element.getPriceOverride()); - } - if (element.hasOverrideReasonElement()) { - composeStringCore("overrideReason", element.getOverrideReasonElement(), false); - composeStringExtras("overrideReason", element.getOverrideReasonElement(), false); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasEnteredDateElement()) { - composeDateTimeCore("enteredDate", element.getEnteredDateElement(), false); - composeDateTimeExtras("enteredDate", element.getEnteredDateElement(), false); - } - if (element.hasReason()) { - openArray("reason"); - for (CodeableConcept e : element.getReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasService()) { - openArray("service"); - for (Reference e : element.getService()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAccount()) { - openArray("account"); - for (Reference e : element.getAccount()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasSupportingInformation()) { - openArray("supportingInformation"); - for (Reference e : element.getSupportingInformation()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeChargeItemChargeItemParticipantComponent(String name, ChargeItem.ChargeItemParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composeChargeItemChargeItemParticipantComponentInner(element); - close(); - } - } - - protected void composeChargeItemChargeItemParticipantComponentInner(ChargeItem.ChargeItemParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - } - - protected void composeClaim(String name, Claim element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeClaimInner(element); - } - } - - protected void composeClaimInner(Claim element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - openArray("subType"); - for (CodeableConcept e : element.getSubType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new Claim.UseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new Claim.UseEnumFactory(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasBillablePeriod()) { - composePeriod("billablePeriod", element.getBillablePeriod()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasFundsReserve()) { - composeCodeableConcept("fundsReserve", element.getFundsReserve()); - } - if (element.hasRelated()) { - openArray("related"); - for (Claim.RelatedClaimComponent e : element.getRelated()) - composeClaimRelatedClaimComponent(null, e); - closeArray(); - }; - if (element.hasPrescription()) { - composeReference("prescription", element.getPrescription()); - } - if (element.hasOriginalPrescription()) { - composeReference("originalPrescription", element.getOriginalPrescription()); - } - if (element.hasPayee()) { - composeClaimPayeeComponent("payee", element.getPayee()); - } - if (element.hasReferral()) { - composeReference("referral", element.getReferral()); - } - if (element.hasFacility()) { - composeReference("facility", element.getFacility()); - } - if (element.hasCareTeam()) { - openArray("careTeam"); - for (Claim.CareTeamComponent e : element.getCareTeam()) - composeClaimCareTeamComponent(null, e); - closeArray(); - }; - if (element.hasInformation()) { - openArray("information"); - for (Claim.SpecialConditionComponent e : element.getInformation()) - composeClaimSpecialConditionComponent(null, e); - closeArray(); - }; - if (element.hasDiagnosis()) { - openArray("diagnosis"); - for (Claim.DiagnosisComponent e : element.getDiagnosis()) - composeClaimDiagnosisComponent(null, e); - closeArray(); - }; - if (element.hasProcedure()) { - openArray("procedure"); - for (Claim.ProcedureComponent e : element.getProcedure()) - composeClaimProcedureComponent(null, e); - closeArray(); - }; - if (element.hasInsurance()) { - openArray("insurance"); - for (Claim.InsuranceComponent e : element.getInsurance()) - composeClaimInsuranceComponent(null, e); - closeArray(); - }; - if (element.hasAccident()) { - composeClaimAccidentComponent("accident", element.getAccident()); - } - if (element.hasEmploymentImpacted()) { - composePeriod("employmentImpacted", element.getEmploymentImpacted()); - } - if (element.hasHospitalization()) { - composePeriod("hospitalization", element.getHospitalization()); - } - if (element.hasItem()) { - openArray("item"); - for (Claim.ItemComponent e : element.getItem()) - composeClaimItemComponent(null, e); - closeArray(); - }; - if (element.hasTotal()) { - composeMoney("total", element.getTotal()); - } - } - - protected void composeClaimRelatedClaimComponent(String name, Claim.RelatedClaimComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimRelatedClaimComponentInner(element); - close(); - } - } - - protected void composeClaimRelatedClaimComponentInner(Claim.RelatedClaimComponent element) throws IOException { - composeBackbone(element); - if (element.hasClaim()) { - composeReference("claim", element.getClaim()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasReference()) { - composeIdentifier("reference", element.getReference()); - } - } - - protected void composeClaimPayeeComponent(String name, Claim.PayeeComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimPayeeComponentInner(element); - close(); - } - } - - protected void composeClaimPayeeComponentInner(Claim.PayeeComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasResource()) { - composeCoding("resource", element.getResource()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - } - - protected void composeClaimCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimCareTeamComponentInner(element); - close(); - } - } - - protected void composeClaimCareTeamComponentInner(Claim.CareTeamComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasResponsibleElement()) { - composeBooleanCore("responsible", element.getResponsibleElement(), false); - composeBooleanExtras("responsible", element.getResponsibleElement(), false); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasQualification()) { - composeCodeableConcept("qualification", element.getQualification()); - } - } - - protected void composeClaimSpecialConditionComponent(String name, Claim.SpecialConditionComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimSpecialConditionComponentInner(element); - close(); - } - } - - protected void composeClaimSpecialConditionComponentInner(Claim.SpecialConditionComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - } - - protected void composeClaimDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimDiagnosisComponentInner(element); - close(); - } - } - - protected void composeClaimDiagnosisComponentInner(Claim.DiagnosisComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasDiagnosis()) { - composeType("diagnosis", element.getDiagnosis()); - } - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPackageCode()) { - composeCodeableConcept("packageCode", element.getPackageCode()); - } - } - - protected void composeClaimProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimProcedureComponentInner(element); - close(); - } - } - - protected void composeClaimProcedureComponentInner(Claim.ProcedureComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasProcedure()) { - composeType("procedure", element.getProcedure()); - } - } - - protected void composeClaimInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimInsuranceComponentInner(element); - close(); - } - } - - protected void composeClaimInsuranceComponentInner(Claim.InsuranceComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasFocalElement()) { - composeBooleanCore("focal", element.getFocalElement(), false); - composeBooleanExtras("focal", element.getFocalElement(), false); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasBusinessArrangementElement()) { - composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false); - composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false); - } - if (element.hasPreAuthRef()) { - openArray("preAuthRef"); - for (StringType e : element.getPreAuthRef()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPreAuthRef())) { - openArray("_preAuthRef"); - for (StringType e : element.getPreAuthRef()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasClaimResponse()) { - composeReference("claimResponse", element.getClaimResponse()); - } - } - - protected void composeClaimAccidentComponent(String name, Claim.AccidentComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimAccidentComponentInner(element); - close(); - } - } - - protected void composeClaimAccidentComponentInner(Claim.AccidentComponent element) throws IOException { - composeBackbone(element); - if (element.hasDateElement()) { - composeDateCore("date", element.getDateElement(), false); - composeDateExtras("date", element.getDateElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLocation()) { - composeType("location", element.getLocation()); - } - } - - protected void composeClaimItemComponent(String name, Claim.ItemComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimItemComponentInner(element); - close(); - } - } - - protected void composeClaimItemComponentInner(Claim.ItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasCareTeamLinkId()) { - openArray("careTeamLinkId"); - for (PositiveIntType e : element.getCareTeamLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getCareTeamLinkId())) { - openArray("_careTeamLinkId"); - for (PositiveIntType e : element.getCareTeamLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDiagnosisLinkId()) { - openArray("diagnosisLinkId"); - for (PositiveIntType e : element.getDiagnosisLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getDiagnosisLinkId())) { - openArray("_diagnosisLinkId"); - for (PositiveIntType e : element.getDiagnosisLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasProcedureLinkId()) { - openArray("procedureLinkId"); - for (PositiveIntType e : element.getProcedureLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getProcedureLinkId())) { - openArray("_procedureLinkId"); - for (PositiveIntType e : element.getProcedureLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasInformationLinkId()) { - openArray("informationLinkId"); - for (PositiveIntType e : element.getInformationLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getInformationLinkId())) { - openArray("_informationLinkId"); - for (PositiveIntType e : element.getInformationLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasProgramCode()) { - openArray("programCode"); - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasServiced()) { - composeType("serviced", element.getServiced()); - } - if (element.hasLocation()) { - composeType("location", element.getLocation()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - openArray("udi"); - for (Reference e : element.getUdi()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasSubSite()) { - openArray("subSite"); - for (CodeableConcept e : element.getSubSite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasEncounter()) { - openArray("encounter"); - for (Reference e : element.getEncounter()) - composeReference(null, e); - closeArray(); - }; - if (element.hasDetail()) { - openArray("detail"); - for (Claim.DetailComponent e : element.getDetail()) - composeClaimDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimDetailComponent(String name, Claim.DetailComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimDetailComponentInner(element); - close(); - } - } - - protected void composeClaimDetailComponentInner(Claim.DetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasProgramCode()) { - openArray("programCode"); - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - openArray("udi"); - for (Reference e : element.getUdi()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSubDetail()) { - openArray("subDetail"); - for (Claim.SubDetailComponent e : element.getSubDetail()) - composeClaimSubDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimSubDetailComponentInner(element); - close(); - } - } - - protected void composeClaimSubDetailComponentInner(Claim.SubDetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasProgramCode()) { - openArray("programCode"); - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - openArray("udi"); - for (Reference e : element.getUdi()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeClaimResponse(String name, ClaimResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeClaimResponseInner(element); - } - } - - protected void composeClaimResponseInner(ClaimResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeStringCore("disposition", element.getDispositionElement(), false); - composeStringExtras("disposition", element.getDispositionElement(), false); - } - if (element.hasPayeeType()) { - composeCodeableConcept("payeeType", element.getPayeeType()); - } - if (element.hasItem()) { - openArray("item"); - for (ClaimResponse.ItemComponent e : element.getItem()) - composeClaimResponseItemComponent(null, e); - closeArray(); - }; - if (element.hasAddItem()) { - openArray("addItem"); - for (ClaimResponse.AddedItemComponent e : element.getAddItem()) - composeClaimResponseAddedItemComponent(null, e); - closeArray(); - }; - if (element.hasError()) { - openArray("error"); - for (ClaimResponse.ErrorComponent e : element.getError()) - composeClaimResponseErrorComponent(null, e); - closeArray(); - }; - if (element.hasTotalCost()) { - composeMoney("totalCost", element.getTotalCost()); - } - if (element.hasUnallocDeductable()) { - composeMoney("unallocDeductable", element.getUnallocDeductable()); - } - if (element.hasTotalBenefit()) { - composeMoney("totalBenefit", element.getTotalBenefit()); - } - if (element.hasPayment()) { - composeClaimResponsePaymentComponent("payment", element.getPayment()); - } - if (element.hasReserved()) { - composeCoding("reserved", element.getReserved()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasProcessNote()) { - openArray("processNote"); - for (ClaimResponse.NoteComponent e : element.getProcessNote()) - composeClaimResponseNoteComponent(null, e); - closeArray(); - }; - if (element.hasCommunicationRequest()) { - openArray("communicationRequest"); - for (Reference e : element.getCommunicationRequest()) - composeReference(null, e); - closeArray(); - }; - if (element.hasInsurance()) { - openArray("insurance"); - for (ClaimResponse.InsuranceComponent e : element.getInsurance()) - composeClaimResponseInsuranceComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimResponseItemComponent(String name, ClaimResponse.ItemComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseItemComponentInner(element); - close(); - } - } - - protected void composeClaimResponseItemComponentInner(ClaimResponse.ItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); - composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); - } - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent(null, e); - closeArray(); - }; - if (element.hasDetail()) { - openArray("detail"); - for (ClaimResponse.ItemDetailComponent e : element.getDetail()) - composeClaimResponseItemDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimResponseAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseAdjudicationComponentInner(element); - close(); - } - } - - protected void composeClaimResponseAdjudicationComponentInner(ClaimResponse.AdjudicationComponent element) throws IOException { - composeBackbone(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasValueElement()) { - composeDecimalCore("value", element.getValueElement(), false); - composeDecimalExtras("value", element.getValueElement(), false); - } - } - - protected void composeClaimResponseItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseItemDetailComponentInner(element); - close(); - } - } - - protected void composeClaimResponseItemDetailComponentInner(ClaimResponse.ItemDetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); - composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); - } - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent(null, e); - closeArray(); - }; - if (element.hasSubDetail()) { - openArray("subDetail"); - for (ClaimResponse.SubDetailComponent e : element.getSubDetail()) - composeClaimResponseSubDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimResponseSubDetailComponent(String name, ClaimResponse.SubDetailComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseSubDetailComponentInner(element); - close(); - } - } - - protected void composeClaimResponseSubDetailComponentInner(ClaimResponse.SubDetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); - composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); - } - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimResponseAddedItemComponent(String name, ClaimResponse.AddedItemComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseAddedItemComponentInner(element); - close(); - } - } - - protected void composeClaimResponseAddedItemComponentInner(ClaimResponse.AddedItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkId()) { - openArray("sequenceLinkId"); - for (PositiveIntType e : element.getSequenceLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSequenceLinkId())) { - openArray("_sequenceLinkId"); - for (PositiveIntType e : element.getSequenceLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDetailSequenceLinkId()) { - openArray("detailSequenceLinkId"); - for (PositiveIntType e : element.getDetailSequenceLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getDetailSequenceLinkId())) { - openArray("_detailSequenceLinkId"); - for (PositiveIntType e : element.getDetailSequenceLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSubdetailSequenceLinkId()) { - openArray("subdetailSequenceLinkId"); - for (PositiveIntType e : element.getSubdetailSequenceLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSubdetailSequenceLinkId())) { - openArray("_subdetailSequenceLinkId"); - for (PositiveIntType e : element.getSubdetailSequenceLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasFee()) { - composeMoney("fee", element.getFee()); - } - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent(null, e); - closeArray(); - }; - } - - protected void composeClaimResponseErrorComponent(String name, ClaimResponse.ErrorComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseErrorComponentInner(element); - close(); - } - } - - protected void composeClaimResponseErrorComponentInner(ClaimResponse.ErrorComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); - composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); - } - if (element.hasDetailSequenceLinkIdElement()) { - composePositiveIntCore("detailSequenceLinkId", element.getDetailSequenceLinkIdElement(), false); - composePositiveIntExtras("detailSequenceLinkId", element.getDetailSequenceLinkIdElement(), false); - } - if (element.hasSubdetailSequenceLinkIdElement()) { - composePositiveIntCore("subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement(), false); - composePositiveIntExtras("subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - } - - protected void composeClaimResponsePaymentComponent(String name, ClaimResponse.PaymentComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponsePaymentComponentInner(element); - close(); - } - } - - protected void composeClaimResponsePaymentComponentInner(ClaimResponse.PaymentComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAdjustment()) { - composeMoney("adjustment", element.getAdjustment()); - } - if (element.hasAdjustmentReason()) { - composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); - } - if (element.hasDateElement()) { - composeDateCore("date", element.getDateElement(), false); - composeDateExtras("date", element.getDateElement(), false); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - } - - protected void composeClaimResponseNoteComponent(String name, ClaimResponse.NoteComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseNoteComponentInner(element); - close(); - } - } - - protected void composeClaimResponseNoteComponentInner(ClaimResponse.NoteComponent element) throws IOException { - composeBackbone(element); - if (element.hasNumberElement()) { - composePositiveIntCore("number", element.getNumberElement(), false); - composePositiveIntExtras("number", element.getNumberElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasLanguage()) { - composeCodeableConcept("language", element.getLanguage()); - } - } - - protected void composeClaimResponseInsuranceComponent(String name, ClaimResponse.InsuranceComponent element) throws IOException { - if (element != null) { - open(name); - composeClaimResponseInsuranceComponentInner(element); - close(); - } - } - - protected void composeClaimResponseInsuranceComponentInner(ClaimResponse.InsuranceComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasFocalElement()) { - composeBooleanCore("focal", element.getFocalElement(), false); - composeBooleanExtras("focal", element.getFocalElement(), false); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasBusinessArrangementElement()) { - composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false); - composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false); - } - if (element.hasPreAuthRef()) { - openArray("preAuthRef"); - for (StringType e : element.getPreAuthRef()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPreAuthRef())) { - openArray("_preAuthRef"); - for (StringType e : element.getPreAuthRef()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasClaimResponse()) { - composeReference("claimResponse", element.getClaimResponse()); - } - } - - protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeClinicalImpressionInner(element); - } - } - - protected void composeClinicalImpressionInner(ClinicalImpression element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ClinicalImpression.ClinicalImpressionStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ClinicalImpression.ClinicalImpressionStatusEnumFactory(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasAssessor()) { - composeReference("assessor", element.getAssessor()); - } - if (element.hasPrevious()) { - composeReference("previous", element.getPrevious()); - } - if (element.hasProblem()) { - openArray("problem"); - for (Reference e : element.getProblem()) - composeReference(null, e); - closeArray(); - }; - if (element.hasInvestigation()) { - openArray("investigation"); - for (ClinicalImpression.ClinicalImpressionInvestigationComponent e : element.getInvestigation()) - composeClinicalImpressionClinicalImpressionInvestigationComponent(null, e); - closeArray(); - }; - if (element.hasProtocol()) { - openArray("protocol"); - for (UriType e : element.getProtocol()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getProtocol())) { - openArray("_protocol"); - for (UriType e : element.getProtocol()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSummaryElement()) { - composeStringCore("summary", element.getSummaryElement(), false); - composeStringExtras("summary", element.getSummaryElement(), false); - } - if (element.hasFinding()) { - openArray("finding"); - for (ClinicalImpression.ClinicalImpressionFindingComponent e : element.getFinding()) - composeClinicalImpressionClinicalImpressionFindingComponent(null, e); - closeArray(); - }; - if (element.hasPrognosisCodeableConcept()) { - openArray("prognosisCodeableConcept"); - for (CodeableConcept e : element.getPrognosisCodeableConcept()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPrognosisReference()) { - openArray("prognosisReference"); - for (Reference e : element.getPrognosisReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAction()) { - openArray("action"); - for (Reference e : element.getAction()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(String name, ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { - if (element != null) { - open(name); - composeClinicalImpressionClinicalImpressionInvestigationComponentInner(element); - close(); - } - } - - protected void composeClinicalImpressionClinicalImpressionInvestigationComponentInner(ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasItem()) { - openArray("item"); - for (Reference e : element.getItem()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeClinicalImpressionClinicalImpressionFindingComponent(String name, ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { - if (element != null) { - open(name); - composeClinicalImpressionClinicalImpressionFindingComponentInner(element); - close(); - } - } - - protected void composeClinicalImpressionClinicalImpressionFindingComponentInner(ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { - composeBackbone(element); - if (element.hasItem()) { - composeType("item", element.getItem()); - } - if (element.hasBasisElement()) { - composeStringCore("basis", element.getBasisElement(), false); - composeStringExtras("basis", element.getBasisElement(), false); - } - } - - protected void composeCodeSystem(String name, CodeSystem element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCodeSystemInner(element); - } - } - - protected void composeCodeSystemInner(CodeSystem element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasCaseSensitiveElement()) { - composeBooleanCore("caseSensitive", element.getCaseSensitiveElement(), false); - composeBooleanExtras("caseSensitive", element.getCaseSensitiveElement(), false); - } - if (element.hasValueSetElement()) { - composeUriCore("valueSet", element.getValueSetElement(), false); - composeUriExtras("valueSet", element.getValueSetElement(), false); - } - if (element.hasHierarchyMeaningElement()) { - composeEnumerationCore("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory(), false); - composeEnumerationExtras("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory(), false); - } - if (element.hasCompositionalElement()) { - composeBooleanCore("compositional", element.getCompositionalElement(), false); - composeBooleanExtras("compositional", element.getCompositionalElement(), false); - } - if (element.hasVersionNeededElement()) { - composeBooleanCore("versionNeeded", element.getVersionNeededElement(), false); - composeBooleanExtras("versionNeeded", element.getVersionNeededElement(), false); - } - if (element.hasContentElement()) { - composeEnumerationCore("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory(), false); - composeEnumerationExtras("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory(), false); - } - if (element.hasCountElement()) { - composeUnsignedIntCore("count", element.getCountElement(), false); - composeUnsignedIntExtras("count", element.getCountElement(), false); - } - if (element.hasFilter()) { - openArray("filter"); - for (CodeSystem.CodeSystemFilterComponent e : element.getFilter()) - composeCodeSystemCodeSystemFilterComponent(null, e); - closeArray(); - }; - if (element.hasProperty()) { - openArray("property"); - for (CodeSystem.PropertyComponent e : element.getProperty()) - composeCodeSystemPropertyComponent(null, e); - closeArray(); - }; - if (element.hasConcept()) { - openArray("concept"); - for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) - composeCodeSystemConceptDefinitionComponent(null, e); - closeArray(); - }; - } - - protected void composeCodeSystemCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element) throws IOException { - if (element != null) { - open(name); - composeCodeSystemCodeSystemFilterComponentInner(element); - close(); - } - } - - protected void composeCodeSystemCodeSystemFilterComponentInner(CodeSystem.CodeSystemFilterComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasOperator()) { - openArray("operator"); - for (Enumeration e : element.getOperator()) - composeEnumerationCore(null, e, new CodeSystem.FilterOperatorEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getOperator())) { - openArray("_operator"); - for (Enumeration e : element.getOperator()) - composeEnumerationExtras(null, e, new CodeSystem.FilterOperatorEnumFactory(), true); - closeArray(); - } - }; - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeCodeSystemPropertyComponent(String name, CodeSystem.PropertyComponent element) throws IOException { - if (element != null) { - open(name); - composeCodeSystemPropertyComponentInner(element); - close(); - } - } - - protected void composeCodeSystemPropertyComponentInner(CodeSystem.PropertyComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasUriElement()) { - composeUriCore("uri", element.getUriElement(), false); - composeUriExtras("uri", element.getUriElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory(), false); - } - } - - protected void composeCodeSystemConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element) throws IOException { - if (element != null) { - open(name); - composeCodeSystemConceptDefinitionComponentInner(element); - close(); - } - } - - protected void composeCodeSystemConceptDefinitionComponentInner(CodeSystem.ConceptDefinitionComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasDefinitionElement()) { - composeStringCore("definition", element.getDefinitionElement(), false); - composeStringExtras("definition", element.getDefinitionElement(), false); - } - if (element.hasDesignation()) { - openArray("designation"); - for (CodeSystem.ConceptDefinitionDesignationComponent e : element.getDesignation()) - composeCodeSystemConceptDefinitionDesignationComponent(null, e); - closeArray(); - }; - if (element.hasProperty()) { - openArray("property"); - for (CodeSystem.ConceptPropertyComponent e : element.getProperty()) - composeCodeSystemConceptPropertyComponent(null, e); - closeArray(); - }; - if (element.hasConcept()) { - openArray("concept"); - for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) - composeCodeSystemConceptDefinitionComponent(null, e); - closeArray(); - }; - } - - protected void composeCodeSystemConceptDefinitionDesignationComponent(String name, CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { - if (element != null) { - open(name); - composeCodeSystemConceptDefinitionDesignationComponentInner(element); - close(); - } - } - - protected void composeCodeSystemConceptDefinitionDesignationComponentInner(CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { - composeBackbone(element); - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeCodeSystemConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element) throws IOException { - if (element != null) { - open(name); - composeCodeSystemConceptPropertyComponentInner(element); - close(); - } - } - - protected void composeCodeSystemConceptPropertyComponentInner(CodeSystem.ConceptPropertyComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeCommunication(String name, Communication element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCommunicationInner(element); - } - } - - protected void composeCommunicationInner(Communication element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasInResponseTo()) { - openArray("inResponseTo"); - for (Reference e : element.getInResponseTo()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory(), false); - } - if (element.hasNotDoneElement()) { - composeBooleanCore("notDone", element.getNotDoneElement(), false); - composeBooleanExtras("notDone", element.getNotDoneElement(), false); - } - if (element.hasNotDoneReason()) { - composeCodeableConcept("notDoneReason", element.getNotDoneReason()); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new Communication.CommunicationPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new Communication.CommunicationPriorityEnumFactory(), false); - } - if (element.hasMedium()) { - openArray("medium"); - for (CodeableConcept e : element.getMedium()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasRecipient()) { - openArray("recipient"); - for (Reference e : element.getRecipient()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (Reference e : element.getTopic()) - composeReference(null, e); - closeArray(); - }; - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSentElement()) { - composeDateTimeCore("sent", element.getSentElement(), false); - composeDateTimeExtras("sent", element.getSentElement(), false); - } - if (element.hasReceivedElement()) { - composeDateTimeCore("received", element.getReceivedElement(), false); - composeDateTimeExtras("received", element.getReceivedElement(), false); - } - if (element.hasSender()) { - composeReference("sender", element.getSender()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPayload()) { - openArray("payload"); - for (Communication.CommunicationPayloadComponent e : element.getPayload()) - composeCommunicationCommunicationPayloadComponent(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeCommunicationCommunicationPayloadComponent(String name, Communication.CommunicationPayloadComponent element) throws IOException { - if (element != null) { - open(name); - composeCommunicationCommunicationPayloadComponentInner(element); - close(); - } - } - - protected void composeCommunicationCommunicationPayloadComponentInner(Communication.CommunicationPayloadComponent element) throws IOException { - composeBackbone(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } - } - - protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCommunicationRequestInner(element); - } - } - - protected void composeCommunicationRequestInner(CommunicationRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReplaces()) { - openArray("replaces"); - for (Reference e : element.getReplaces()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new CommunicationRequest.CommunicationRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new CommunicationRequest.CommunicationRequestStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new CommunicationRequest.CommunicationPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new CommunicationRequest.CommunicationPriorityEnumFactory(), false); - } - if (element.hasMedium()) { - openArray("medium"); - for (CodeableConcept e : element.getMedium()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasRecipient()) { - openArray("recipient"); - for (Reference e : element.getRecipient()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (Reference e : element.getTopic()) - composeReference(null, e); - closeArray(); - }; - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPayload()) { - openArray("payload"); - for (CommunicationRequest.CommunicationRequestPayloadComponent e : element.getPayload()) - composeCommunicationRequestCommunicationRequestPayloadComponent(null, e); - closeArray(); - }; - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasSender()) { - composeReference("sender", element.getSender()); - } - if (element.hasRequester()) { - composeCommunicationRequestCommunicationRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeCommunicationRequestCommunicationRequestPayloadComponent(String name, CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { - if (element != null) { - open(name); - composeCommunicationRequestCommunicationRequestPayloadComponentInner(element); - close(); - } - } - - protected void composeCommunicationRequestCommunicationRequestPayloadComponentInner(CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { - composeBackbone(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } - } - - protected void composeCommunicationRequestCommunicationRequestRequesterComponent(String name, CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { - if (element != null) { - open(name); - composeCommunicationRequestCommunicationRequestRequesterComponentInner(element); - close(); - } - } - - protected void composeCommunicationRequestCommunicationRequestRequesterComponentInner(CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCompartmentDefinitionInner(element); - } - } - - protected void composeCompartmentDefinitionInner(CompartmentDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory(), false); - } - if (element.hasSearchElement()) { - composeBooleanCore("search", element.getSearchElement(), false); - composeBooleanExtras("search", element.getSearchElement(), false); - } - if (element.hasResource()) { - openArray("resource"); - for (CompartmentDefinition.CompartmentDefinitionResourceComponent e : element.getResource()) - composeCompartmentDefinitionCompartmentDefinitionResourceComponent(null, e); - closeArray(); - }; - } - - protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { - if (element != null) { - open(name); - composeCompartmentDefinitionCompartmentDefinitionResourceComponentInner(element); - close(); - } - } - - protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponentInner(CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasParam()) { - openArray("param"); - for (StringType e : element.getParam()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getParam())) { - openArray("_param"); - for (StringType e : element.getParam()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeComposition(String name, Composition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCompositionInner(element); - } - } - - protected void composeCompositionInner(Composition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasClass_()) { - composeCodeableConcept("class", element.getClass_()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasAuthor()) { - openArray("author"); - for (Reference e : element.getAuthor()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasConfidentialityElement()) { - composeEnumerationCore("confidentiality", element.getConfidentialityElement(), new Composition.DocumentConfidentialityEnumFactory(), false); - composeEnumerationExtras("confidentiality", element.getConfidentialityElement(), new Composition.DocumentConfidentialityEnumFactory(), false); - } - if (element.hasAttester()) { - openArray("attester"); - for (Composition.CompositionAttesterComponent e : element.getAttester()) - composeCompositionCompositionAttesterComponent(null, e); - closeArray(); - }; - if (element.hasCustodian()) { - composeReference("custodian", element.getCustodian()); - } - if (element.hasRelatesTo()) { - openArray("relatesTo"); - for (Composition.CompositionRelatesToComponent e : element.getRelatesTo()) - composeCompositionCompositionRelatesToComponent(null, e); - closeArray(); - }; - if (element.hasEvent()) { - openArray("event"); - for (Composition.CompositionEventComponent e : element.getEvent()) - composeCompositionCompositionEventComponent(null, e); - closeArray(); - }; - if (element.hasSection()) { - openArray("section"); - for (Composition.SectionComponent e : element.getSection()) - composeCompositionSectionComponent(null, e); - closeArray(); - }; - } - - protected void composeCompositionCompositionAttesterComponent(String name, Composition.CompositionAttesterComponent element) throws IOException { - if (element != null) { - open(name); - composeCompositionCompositionAttesterComponentInner(element); - close(); - } - } - - protected void composeCompositionCompositionAttesterComponentInner(Composition.CompositionAttesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasMode()) { - openArray("mode"); - for (Enumeration e : element.getMode()) - composeEnumerationCore(null, e, new Composition.CompositionAttestationModeEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getMode())) { - openArray("_mode"); - for (Enumeration e : element.getMode()) - composeEnumerationExtras(null, e, new Composition.CompositionAttestationModeEnumFactory(), true); - closeArray(); - } - }; - if (element.hasTimeElement()) { - composeDateTimeCore("time", element.getTimeElement(), false); - composeDateTimeExtras("time", element.getTimeElement(), false); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - } - - protected void composeCompositionCompositionRelatesToComponent(String name, Composition.CompositionRelatesToComponent element) throws IOException { - if (element != null) { - open(name); - composeCompositionCompositionRelatesToComponentInner(element); - close(); - } - } - - protected void composeCompositionCompositionRelatesToComponentInner(Composition.CompositionRelatesToComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory(), false); - } - if (element.hasTarget()) { - composeType("target", element.getTarget()); - } - } - - protected void composeCompositionCompositionEventComponent(String name, Composition.CompositionEventComponent element) throws IOException { - if (element != null) { - open(name); - composeCompositionCompositionEventComponentInner(element); - close(); - } - } - - protected void composeCompositionCompositionEventComponentInner(Composition.CompositionEventComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - openArray("code"); - for (CodeableConcept e : element.getCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasDetail()) { - openArray("detail"); - for (Reference e : element.getDetail()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeCompositionSectionComponent(String name, Composition.SectionComponent element) throws IOException { - if (element != null) { - open(name); - composeCompositionSectionComponentInner(element); - close(); - } - } - - protected void composeCompositionSectionComponentInner(Composition.SectionComponent element) throws IOException { - composeBackbone(element); - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasText()) { - composeNarrative("text", element.getText()); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new Composition.SectionModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new Composition.SectionModeEnumFactory(), false); - } - if (element.hasOrderedBy()) { - composeCodeableConcept("orderedBy", element.getOrderedBy()); - } - if (element.hasEntry()) { - openArray("entry"); - for (Reference e : element.getEntry()) - composeReference(null, e); - closeArray(); - }; - if (element.hasEmptyReason()) { - composeCodeableConcept("emptyReason", element.getEmptyReason()); - } - if (element.hasSection()) { - openArray("section"); - for (Composition.SectionComponent e : element.getSection()) - composeCompositionSectionComponent(null, e); - closeArray(); - }; - } - - protected void composeConceptMap(String name, ConceptMap element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeConceptMapInner(element); - } - } - - protected void composeConceptMapInner(ConceptMap element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasSource()) { - composeType("source", element.getSource()); - } - if (element.hasTarget()) { - composeType("target", element.getTarget()); - } - if (element.hasGroup()) { - openArray("group"); - for (ConceptMap.ConceptMapGroupComponent e : element.getGroup()) - composeConceptMapConceptMapGroupComponent(null, e); - closeArray(); - }; - } - - protected void composeConceptMapConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element) throws IOException { - if (element != null) { - open(name); - composeConceptMapConceptMapGroupComponentInner(element); - close(); - } - } - - protected void composeConceptMapConceptMapGroupComponentInner(ConceptMap.ConceptMapGroupComponent element) throws IOException { - composeBackbone(element); - if (element.hasSourceElement()) { - composeUriCore("source", element.getSourceElement(), false); - composeUriExtras("source", element.getSourceElement(), false); - } - if (element.hasSourceVersionElement()) { - composeStringCore("sourceVersion", element.getSourceVersionElement(), false); - composeStringExtras("sourceVersion", element.getSourceVersionElement(), false); - } - if (element.hasTargetElement()) { - composeUriCore("target", element.getTargetElement(), false); - composeUriExtras("target", element.getTargetElement(), false); - } - if (element.hasTargetVersionElement()) { - composeStringCore("targetVersion", element.getTargetVersionElement(), false); - composeStringExtras("targetVersion", element.getTargetVersionElement(), false); - } - if (element.hasElement()) { - openArray("element"); - for (ConceptMap.SourceElementComponent e : element.getElement()) - composeConceptMapSourceElementComponent(null, e); - closeArray(); - }; - if (element.hasUnmapped()) { - composeConceptMapConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped()); - } - } - - protected void composeConceptMapSourceElementComponent(String name, ConceptMap.SourceElementComponent element) throws IOException { - if (element != null) { - open(name); - composeConceptMapSourceElementComponentInner(element); - close(); - } - } - - protected void composeConceptMapSourceElementComponentInner(ConceptMap.SourceElementComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasTarget()) { - openArray("target"); - for (ConceptMap.TargetElementComponent e : element.getTarget()) - composeConceptMapTargetElementComponent(null, e); - closeArray(); - }; - } - - protected void composeConceptMapTargetElementComponent(String name, ConceptMap.TargetElementComponent element) throws IOException { - if (element != null) { - open(name); - composeConceptMapTargetElementComponentInner(element); - close(); - } - } - - protected void composeConceptMapTargetElementComponentInner(ConceptMap.TargetElementComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasEquivalenceElement()) { - composeEnumerationCore("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory(), false); - composeEnumerationExtras("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasDependsOn()) { - openArray("dependsOn"); - for (ConceptMap.OtherElementComponent e : element.getDependsOn()) - composeConceptMapOtherElementComponent(null, e); - closeArray(); - }; - if (element.hasProduct()) { - openArray("product"); - for (ConceptMap.OtherElementComponent e : element.getProduct()) - composeConceptMapOtherElementComponent(null, e); - closeArray(); - }; - } - - protected void composeConceptMapOtherElementComponent(String name, ConceptMap.OtherElementComponent element) throws IOException { - if (element != null) { - open(name); - composeConceptMapOtherElementComponentInner(element); - close(); - } - } - - protected void composeConceptMapOtherElementComponentInner(ConceptMap.OtherElementComponent element) throws IOException { - composeBackbone(element); - if (element.hasPropertyElement()) { - composeUriCore("property", element.getPropertyElement(), false); - composeUriExtras("property", element.getPropertyElement(), false); - } - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasCodeElement()) { - composeStringCore("code", element.getCodeElement(), false); - composeStringExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - } - - protected void composeConceptMapConceptMapGroupUnmappedComponent(String name, ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { - if (element != null) { - open(name); - composeConceptMapConceptMapGroupUnmappedComponentInner(element); - close(); - } - } - - protected void composeConceptMapConceptMapGroupUnmappedComponentInner(ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { - composeBackbone(element); - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - } - - protected void composeCondition(String name, Condition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeConditionInner(element); - } - } - - protected void composeConditionInner(Condition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasClinicalStatusElement()) { - composeEnumerationCore("clinicalStatus", element.getClinicalStatusElement(), new Condition.ConditionClinicalStatusEnumFactory(), false); - composeEnumerationExtras("clinicalStatus", element.getClinicalStatusElement(), new Condition.ConditionClinicalStatusEnumFactory(), false); - } - if (element.hasVerificationStatusElement()) { - composeEnumerationCore("verificationStatus", element.getVerificationStatusElement(), new Condition.ConditionVerificationStatusEnumFactory(), false); - composeEnumerationExtras("verificationStatus", element.getVerificationStatusElement(), new Condition.ConditionVerificationStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSeverity()) { - composeCodeableConcept("severity", element.getSeverity()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasBodySite()) { - openArray("bodySite"); - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOnset()) { - composeType("onset", element.getOnset()); - } - if (element.hasAbatement()) { - composeType("abatement", element.getAbatement()); - } - if (element.hasAssertedDateElement()) { - composeDateTimeCore("assertedDate", element.getAssertedDateElement(), false); - composeDateTimeExtras("assertedDate", element.getAssertedDateElement(), false); - } - if (element.hasAsserter()) { - composeReference("asserter", element.getAsserter()); - } - if (element.hasStage()) { - openArray("stage"); - for (Condition.ConditionStageComponent e : element.getStage()) - composeConditionConditionStageComponent(null, e); - closeArray(); - }; - if (element.hasEvidence()) { - openArray("evidence"); - for (Condition.ConditionEvidenceComponent e : element.getEvidence()) - composeConditionConditionEvidenceComponent(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeConditionConditionStageComponent(String name, Condition.ConditionStageComponent element) throws IOException { - if (element != null) { - open(name); - composeConditionConditionStageComponentInner(element); - close(); - } - } - - protected void composeConditionConditionStageComponentInner(Condition.ConditionStageComponent element) throws IOException { - composeBackbone(element); - if (element.hasSummary()) { - composeCodeableConcept("summary", element.getSummary()); - } - if (element.hasAssessment()) { - openArray("assessment"); - for (Reference e : element.getAssessment()) - composeReference(null, e); - closeArray(); - }; - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - } - - protected void composeConditionConditionEvidenceComponent(String name, Condition.ConditionEvidenceComponent element) throws IOException { - if (element != null) { - open(name); - composeConditionConditionEvidenceComponentInner(element); - close(); - } - } - - protected void composeConditionConditionEvidenceComponentInner(Condition.ConditionEvidenceComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - openArray("code"); - for (CodeableConcept e : element.getCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDetail()) { - openArray("detail"); - for (Reference e : element.getDetail()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeConsent(String name, Consent element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeConsentInner(element); - } - } - - protected void composeConsentInner(Consent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateTimeElement()) { - composeDateTimeCore("dateTime", element.getDateTimeElement(), false); - composeDateTimeExtras("dateTime", element.getDateTimeElement(), false); - } - if (element.hasConsentingParty()) { - openArray("consentingParty"); - for (Reference e : element.getConsentingParty()) - composeReference(null, e); - closeArray(); - }; - if (element.hasOrganization()) { - openArray("organization"); - for (Reference e : element.getOrganization()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSource()) { - composeType("source", element.getSource()); - } - if (element.hasPolicy()) { - openArray("policy"); - for (Consent.ConsentPolicyComponent e : element.getPolicy()) - composeConsentConsentPolicyComponent(null, e); - closeArray(); - }; - if (element.hasPolicyRuleElement()) { - composeUriCore("policyRule", element.getPolicyRuleElement(), false); - composeUriExtras("policyRule", element.getPolicyRuleElement(), false); - } - if (element.hasVerification()) { - openArray("verification"); - for (Consent.ConsentVerificationComponent e : element.getVerification()) - composeConsentConsentVerificationComponent(null, e); - closeArray(); - }; - if (element.hasProvision()) { - openArray("provision"); - for (Consent.provisionComponent e : element.getProvision()) - composeConsentprovisionComponent(null, e); - closeArray(); - }; - } - - protected void composeConsentConsentPolicyComponent(String name, Consent.ConsentPolicyComponent element) throws IOException { - if (element != null) { - open(name); - composeConsentConsentPolicyComponentInner(element); - close(); - } - } - - protected void composeConsentConsentPolicyComponentInner(Consent.ConsentPolicyComponent element) throws IOException { - composeBackbone(element); - if (element.hasAuthorityElement()) { - composeUriCore("authority", element.getAuthorityElement(), false); - composeUriExtras("authority", element.getAuthorityElement(), false); - } - if (element.hasUriElement()) { - composeUriCore("uri", element.getUriElement(), false); - composeUriExtras("uri", element.getUriElement(), false); - } - } - - protected void composeConsentConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element) throws IOException { - if (element != null) { - open(name); - composeConsentConsentVerificationComponentInner(element); - close(); - } - } - - protected void composeConsentConsentVerificationComponentInner(Consent.ConsentVerificationComponent element) throws IOException { - composeBackbone(element); - if (element.hasVerifiedElement()) { - composeBooleanCore("verified", element.getVerifiedElement(), false); - composeBooleanExtras("verified", element.getVerifiedElement(), false); - } - if (element.hasVerifiedWith()) { - composeReference("verifiedWith", element.getVerifiedWith()); - } - if (element.hasVerificationDateElement()) { - composeDateTimeCore("verificationDate", element.getVerificationDateElement(), false); - composeDateTimeExtras("verificationDate", element.getVerificationDateElement(), false); - } - } - - protected void composeConsentprovisionComponent(String name, Consent.provisionComponent element) throws IOException { - if (element != null) { - open(name); - composeConsentprovisionComponentInner(element); - close(); - } - } - - protected void composeConsentprovisionComponentInner(Consent.provisionComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasActor()) { - openArray("actor"); - for (Consent.provisionActorComponent e : element.getActor()) - composeConsentprovisionActorComponent(null, e); - closeArray(); - }; - if (element.hasAction()) { - openArray("action"); - for (CodeableConcept e : element.getAction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSecurityLabel()) { - openArray("securityLabel"); - for (Coding e : element.getSecurityLabel()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasPurpose()) { - openArray("purpose"); - for (Coding e : element.getPurpose()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasClass_()) { - openArray("class"); - for (Coding e : element.getClass_()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasCode()) { - openArray("code"); - for (Coding e : element.getCode()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasDataPeriod()) { - composePeriod("dataPeriod", element.getDataPeriod()); - } - if (element.hasData()) { - openArray("data"); - for (Consent.provisionDataComponent e : element.getData()) - composeConsentprovisionDataComponent(null, e); - closeArray(); - }; - if (element.hasProvision()) { - openArray("provision"); - for (Consent.provisionComponent e : element.getProvision()) - composeConsentprovisionComponent(null, e); - closeArray(); - }; - } - - protected void composeConsentprovisionActorComponent(String name, Consent.provisionActorComponent element) throws IOException { - if (element != null) { - open(name); - composeConsentprovisionActorComponentInner(element); - close(); - } - } - - protected void composeConsentprovisionActorComponentInner(Consent.provisionActorComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - } - - protected void composeConsentprovisionDataComponent(String name, Consent.provisionDataComponent element) throws IOException { - if (element != null) { - open(name); - composeConsentprovisionDataComponentInner(element); - close(); - } - } - - protected void composeConsentprovisionDataComponentInner(Consent.provisionDataComponent element) throws IOException { - composeBackbone(element); - if (element.hasMeaningElement()) { - composeEnumerationCore("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory(), false); - composeEnumerationExtras("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory(), false); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - } - - protected void composeContract(String name, Contract element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeContractInner(element); - } - } - - protected void composeContractInner(Contract element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory(), false); - } - if (element.hasContentDerivative()) { - composeCodeableConcept("contentDerivative", element.getContentDerivative()); - } - if (element.hasIssuedElement()) { - composeDateTimeCore("issued", element.getIssuedElement(), false); - composeDateTimeExtras("issued", element.getIssuedElement(), false); - } - if (element.hasApplies()) { - composePeriod("applies", element.getApplies()); - } - if (element.hasSubject()) { - openArray("subject"); - for (Reference e : element.getSubject()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAuthority()) { - openArray("authority"); - for (Reference e : element.getAuthority()) - composeReference(null, e); - closeArray(); - }; - if (element.hasDomain()) { - openArray("domain"); - for (Reference e : element.getDomain()) - composeReference(null, e); - closeArray(); - }; - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - openArray("subType"); - for (CodeableConcept e : element.getSubType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTerm()) { - openArray("term"); - for (Contract.TermComponent e : element.getTerm()) - composeContractTermComponent(null, e); - closeArray(); - }; - if (element.hasSigner()) { - openArray("signer"); - for (Contract.SignatoryComponent e : element.getSigner()) - composeContractSignatoryComponent(null, e); - closeArray(); - }; - if (element.hasFriendly()) { - openArray("friendly"); - for (Contract.FriendlyLanguageComponent e : element.getFriendly()) - composeContractFriendlyLanguageComponent(null, e); - closeArray(); - }; - if (element.hasLegal()) { - openArray("legal"); - for (Contract.LegalLanguageComponent e : element.getLegal()) - composeContractLegalLanguageComponent(null, e); - closeArray(); - }; - if (element.hasRule()) { - composeContractComputableLanguageComponent("rule", element.getRule()); - } - if (element.hasLegallyBinding()) { - composeType("legallyBinding", element.getLegallyBinding()); - } - } - - protected void composeContractTermComponent(String name, Contract.TermComponent element) throws IOException { - if (element != null) { - open(name); - composeContractTermComponentInner(element); - close(); - } - } - - protected void composeContractTermComponentInner(Contract.TermComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasIssuedElement()) { - composeDateTimeCore("issued", element.getIssuedElement(), false); - composeDateTimeExtras("issued", element.getIssuedElement(), false); - } - if (element.hasApplies()) { - composePeriod("applies", element.getApplies()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - composeCodeableConcept("subType", element.getSubType()); - } - if (element.hasOffer()) { - composeContractContractOfferComponent("offer", element.getOffer()); - } - if (element.hasAsset()) { - openArray("asset"); - for (Contract.ContractAssetComponent e : element.getAsset()) - composeContractContractAssetComponent(null, e); - closeArray(); - }; - if (element.hasAgent()) { - openArray("agent"); - for (Contract.AgentComponent e : element.getAgent()) - composeContractAgentComponent(null, e); - closeArray(); - }; - if (element.hasAction()) { - openArray("action"); - for (CodeableConcept e : element.getAction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasActionReason()) { - openArray("actionReason"); - for (CodeableConcept e : element.getActionReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasGroup()) { - openArray("group"); - for (Contract.TermComponent e : element.getGroup()) - composeContractTermComponent(null, e); - closeArray(); - }; - } - - protected void composeContractContractOfferComponent(String name, Contract.ContractOfferComponent element) throws IOException { - if (element != null) { - open(name); - composeContractContractOfferComponentInner(element); - close(); - } - } - - protected void composeContractContractOfferComponentInner(Contract.ContractOfferComponent element) throws IOException { - composeBackbone(element); - if (element.hasTopic()) { - composeReference("topic", element.getTopic()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasDecision()) { - composeCodeableConcept("decision", element.getDecision()); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasLinkIdElement()) { - composeStringCore("linkId", element.getLinkIdElement(), false); - composeStringExtras("linkId", element.getLinkIdElement(), false); - } - } - - protected void composeContractContractAssetComponent(String name, Contract.ContractAssetComponent element) throws IOException { - if (element != null) { - open(name); - composeContractContractAssetComponentInner(element); - close(); - } - } - - protected void composeContractContractAssetComponentInner(Contract.ContractAssetComponent element) throws IOException { - composeBackbone(element); - if (element.hasClass_()) { - composeCoding("class", element.getClass_()); - } - if (element.hasCode()) { - composeCoding("code", element.getCode()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasDataPeriod()) { - composePeriod("dataPeriod", element.getDataPeriod()); - } - if (element.hasData()) { - openArray("data"); - for (Contract.AssetDataComponent e : element.getData()) - composeContractAssetDataComponent(null, e); - closeArray(); - }; - if (element.hasValuedItem()) { - openArray("valuedItem"); - for (Contract.ValuedItemComponent e : element.getValuedItem()) - composeContractValuedItemComponent(null, e); - closeArray(); - }; - if (element.hasSecurityLabel()) { - openArray("securityLabel"); - for (Coding e : element.getSecurityLabel()) - composeCoding(null, e); - closeArray(); - }; - } - - protected void composeContractAssetDataComponent(String name, Contract.AssetDataComponent element) throws IOException { - if (element != null) { - open(name); - composeContractAssetDataComponentInner(element); - close(); - } - } - - protected void composeContractAssetDataComponentInner(Contract.AssetDataComponent element) throws IOException { - composeBackbone(element); - if (element.hasMeaningElement()) { - composeEnumerationCore("meaning", element.getMeaningElement(), new Contract.ContractDataMeaningEnumFactory(), false); - composeEnumerationExtras("meaning", element.getMeaningElement(), new Contract.ContractDataMeaningEnumFactory(), false); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - } - - protected void composeContractValuedItemComponent(String name, Contract.ValuedItemComponent element) throws IOException { - if (element != null) { - open(name); - composeContractValuedItemComponentInner(element); - close(); - } - } - - protected void composeContractValuedItemComponentInner(Contract.ValuedItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasEntity()) { - composeType("entity", element.getEntity()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasEffectiveTimeElement()) { - composeDateTimeCore("effectiveTime", element.getEffectiveTimeElement(), false); - composeDateTimeExtras("effectiveTime", element.getEffectiveTimeElement(), false); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasPointsElement()) { - composeDecimalCore("points", element.getPointsElement(), false); - composeDecimalExtras("points", element.getPointsElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - } - - protected void composeContractAgentComponent(String name, Contract.AgentComponent element) throws IOException { - if (element != null) { - open(name); - composeContractAgentComponentInner(element); - close(); - } - } - - protected void composeContractAgentComponentInner(Contract.AgentComponent element) throws IOException { - composeBackbone(element); - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasRole()) { - openArray("role"); - for (CodeableConcept e : element.getRole()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composeContractSignatoryComponent(String name, Contract.SignatoryComponent element) throws IOException { - if (element != null) { - open(name); - composeContractSignatoryComponentInner(element); - close(); - } - } - - protected void composeContractSignatoryComponentInner(Contract.SignatoryComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - if (element.hasSignature()) { - openArray("signature"); - for (Signature e : element.getSignature()) - composeSignature(null, e); - closeArray(); - }; - } - - protected void composeContractFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element) throws IOException { - if (element != null) { - open(name); - composeContractFriendlyLanguageComponentInner(element); - close(); - } - } - - protected void composeContractFriendlyLanguageComponentInner(Contract.FriendlyLanguageComponent element) throws IOException { - composeBackbone(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } - } - - protected void composeContractLegalLanguageComponent(String name, Contract.LegalLanguageComponent element) throws IOException { - if (element != null) { - open(name); - composeContractLegalLanguageComponentInner(element); - close(); - } - } - - protected void composeContractLegalLanguageComponentInner(Contract.LegalLanguageComponent element) throws IOException { - composeBackbone(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } - } - - protected void composeContractComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element) throws IOException { - if (element != null) { - open(name); - composeContractComputableLanguageComponentInner(element); - close(); - } - } - - protected void composeContractComputableLanguageComponentInner(Contract.ComputableLanguageComponent element) throws IOException { - composeBackbone(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } - } - - protected void composeCoverage(String name, Coverage element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeCoverageInner(element); - } - } - - protected void composeCoverageInner(Coverage element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasPolicyHolder()) { - composeReference("policyHolder", element.getPolicyHolder()); - } - if (element.hasSubscriber()) { - composeReference("subscriber", element.getSubscriber()); - } - if (element.hasSubscriberIdElement()) { - composeStringCore("subscriberId", element.getSubscriberIdElement(), false); - composeStringExtras("subscriberId", element.getSubscriberIdElement(), false); - } - if (element.hasBeneficiary()) { - composeReference("beneficiary", element.getBeneficiary()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasPayor()) { - openArray("payor"); - for (Reference e : element.getPayor()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGrouping()) { - composeCoverageGroupComponent("grouping", element.getGrouping()); - } - if (element.hasDependentElement()) { - composeStringCore("dependent", element.getDependentElement(), false); - composeStringExtras("dependent", element.getDependentElement(), false); - } - if (element.hasSequenceElement()) { - composeStringCore("sequence", element.getSequenceElement(), false); - composeStringExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasOrderElement()) { - composePositiveIntCore("order", element.getOrderElement(), false); - composePositiveIntExtras("order", element.getOrderElement(), false); - } - if (element.hasNetworkElement()) { - composeStringCore("network", element.getNetworkElement(), false); - composeStringExtras("network", element.getNetworkElement(), false); - } - if (element.hasContract()) { - openArray("contract"); - for (Reference e : element.getContract()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeCoverageGroupComponent(String name, Coverage.GroupComponent element) throws IOException { - if (element != null) { - open(name); - composeCoverageGroupComponentInner(element); - close(); - } - } - - protected void composeCoverageGroupComponentInner(Coverage.GroupComponent element) throws IOException { - composeBackbone(element); - if (element.hasGroupElement()) { - composeStringCore("group", element.getGroupElement(), false); - composeStringExtras("group", element.getGroupElement(), false); - } - if (element.hasGroupDisplayElement()) { - composeStringCore("groupDisplay", element.getGroupDisplayElement(), false); - composeStringExtras("groupDisplay", element.getGroupDisplayElement(), false); - } - if (element.hasSubGroupElement()) { - composeStringCore("subGroup", element.getSubGroupElement(), false); - composeStringExtras("subGroup", element.getSubGroupElement(), false); - } - if (element.hasSubGroupDisplayElement()) { - composeStringCore("subGroupDisplay", element.getSubGroupDisplayElement(), false); - composeStringExtras("subGroupDisplay", element.getSubGroupDisplayElement(), false); - } - if (element.hasPlanElement()) { - composeStringCore("plan", element.getPlanElement(), false); - composeStringExtras("plan", element.getPlanElement(), false); - } - if (element.hasPlanDisplayElement()) { - composeStringCore("planDisplay", element.getPlanDisplayElement(), false); - composeStringExtras("planDisplay", element.getPlanDisplayElement(), false); - } - if (element.hasSubPlanElement()) { - composeStringCore("subPlan", element.getSubPlanElement(), false); - composeStringExtras("subPlan", element.getSubPlanElement(), false); - } - if (element.hasSubPlanDisplayElement()) { - composeStringCore("subPlanDisplay", element.getSubPlanDisplayElement(), false); - composeStringExtras("subPlanDisplay", element.getSubPlanDisplayElement(), false); - } - if (element.hasClass_Element()) { - composeStringCore("class", element.getClass_Element(), false); - composeStringExtras("class", element.getClass_Element(), false); - } - if (element.hasClassDisplayElement()) { - composeStringCore("classDisplay", element.getClassDisplayElement(), false); - composeStringExtras("classDisplay", element.getClassDisplayElement(), false); - } - if (element.hasSubClassElement()) { - composeStringCore("subClass", element.getSubClassElement(), false); - composeStringExtras("subClass", element.getSubClassElement(), false); - } - if (element.hasSubClassDisplayElement()) { - composeStringCore("subClassDisplay", element.getSubClassDisplayElement(), false); - composeStringExtras("subClassDisplay", element.getSubClassDisplayElement(), false); - } - } - - protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDetectedIssueInner(element); - } - } - - protected void composeDetectedIssueInner(DetectedIssue element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasSeverityElement()) { - composeEnumerationCore("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory(), false); - composeEnumerationExtras("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasImplicated()) { - openArray("implicated"); - for (Reference e : element.getImplicated()) - composeReference(null, e); - closeArray(); - }; - if (element.hasDetailElement()) { - composeStringCore("detail", element.getDetailElement(), false); - composeStringExtras("detail", element.getDetailElement(), false); - } - if (element.hasReferenceElement()) { - composeUriCore("reference", element.getReferenceElement(), false); - composeUriExtras("reference", element.getReferenceElement(), false); - } - if (element.hasMitigation()) { - openArray("mitigation"); - for (DetectedIssue.DetectedIssueMitigationComponent e : element.getMitigation()) - composeDetectedIssueDetectedIssueMitigationComponent(null, e); - closeArray(); - }; - } - - protected void composeDetectedIssueDetectedIssueMitigationComponent(String name, DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { - if (element != null) { - open(name); - composeDetectedIssueDetectedIssueMitigationComponentInner(element); - close(); - } - } - - protected void composeDetectedIssueDetectedIssueMitigationComponentInner(DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { - composeBackbone(element); - if (element.hasAction()) { - composeCodeableConcept("action", element.getAction()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - } - - protected void composeDevice(String name, Device element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDeviceInner(element); - } - } - - protected void composeDeviceInner(Device element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasUdi()) { - composeDeviceDeviceUdiComponent("udi", element.getUdi()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLotNumberElement()) { - composeStringCore("lotNumber", element.getLotNumberElement(), false); - composeStringExtras("lotNumber", element.getLotNumberElement(), false); - } - if (element.hasManufacturerElement()) { - composeStringCore("manufacturer", element.getManufacturerElement(), false); - composeStringExtras("manufacturer", element.getManufacturerElement(), false); - } - if (element.hasManufactureDateElement()) { - composeDateTimeCore("manufactureDate", element.getManufactureDateElement(), false); - composeDateTimeExtras("manufactureDate", element.getManufactureDateElement(), false); - } - if (element.hasExpirationDateElement()) { - composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false); - composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false); - } - if (element.hasModelElement()) { - composeStringCore("model", element.getModelElement(), false); - composeStringExtras("model", element.getModelElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasOwner()) { - composeReference("owner", element.getOwner()); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactPoint e : element.getContact()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasSafety()) { - openArray("safety"); - for (CodeableConcept e : element.getSafety()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composeDeviceDeviceUdiComponent(String name, Device.DeviceUdiComponent element) throws IOException { - if (element != null) { - open(name); - composeDeviceDeviceUdiComponentInner(element); - close(); - } - } - - protected void composeDeviceDeviceUdiComponentInner(Device.DeviceUdiComponent element) throws IOException { - composeBackbone(element); - if (element.hasDeviceIdentifierElement()) { - composeStringCore("deviceIdentifier", element.getDeviceIdentifierElement(), false); - composeStringExtras("deviceIdentifier", element.getDeviceIdentifierElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasJurisdictionElement()) { - composeUriCore("jurisdiction", element.getJurisdictionElement(), false); - composeUriExtras("jurisdiction", element.getJurisdictionElement(), false); - } - if (element.hasCarrierHRFElement()) { - composeStringCore("carrierHRF", element.getCarrierHRFElement(), false); - composeStringExtras("carrierHRF", element.getCarrierHRFElement(), false); - } - if (element.hasCarrierAIDCElement()) { - composeBase64BinaryCore("carrierAIDC", element.getCarrierAIDCElement(), false); - composeBase64BinaryExtras("carrierAIDC", element.getCarrierAIDCElement(), false); - } - if (element.hasIssuerElement()) { - composeUriCore("issuer", element.getIssuerElement(), false); - composeUriExtras("issuer", element.getIssuerElement(), false); - } - if (element.hasEntryTypeElement()) { - composeEnumerationCore("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory(), false); - composeEnumerationExtras("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory(), false); - } - } - - protected void composeDeviceComponent(String name, DeviceComponent element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDeviceComponentInner(element); - } - } - - protected void composeDeviceComponentInner(DeviceComponent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLastSystemChangeElement()) { - composeInstantCore("lastSystemChange", element.getLastSystemChangeElement(), false); - composeInstantExtras("lastSystemChange", element.getLastSystemChangeElement(), false); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasParent()) { - composeReference("parent", element.getParent()); - } - if (element.hasOperationalStatus()) { - openArray("operationalStatus"); - for (CodeableConcept e : element.getOperationalStatus()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasParameterGroup()) { - composeCodeableConcept("parameterGroup", element.getParameterGroup()); - } - if (element.hasMeasurementPrincipleElement()) { - composeEnumerationCore("measurementPrinciple", element.getMeasurementPrincipleElement(), new DeviceComponent.MeasmntPrincipleEnumFactory(), false); - composeEnumerationExtras("measurementPrinciple", element.getMeasurementPrincipleElement(), new DeviceComponent.MeasmntPrincipleEnumFactory(), false); - } - if (element.hasProductionSpecification()) { - openArray("productionSpecification"); - for (DeviceComponent.DeviceComponentProductionSpecificationComponent e : element.getProductionSpecification()) - composeDeviceComponentDeviceComponentProductionSpecificationComponent(null, e); - closeArray(); - }; - if (element.hasLanguageCode()) { - composeCodeableConcept("languageCode", element.getLanguageCode()); - } - } - - protected void composeDeviceComponentDeviceComponentProductionSpecificationComponent(String name, DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { - if (element != null) { - open(name); - composeDeviceComponentDeviceComponentProductionSpecificationComponentInner(element); - close(); - } - } - - protected void composeDeviceComponentDeviceComponentProductionSpecificationComponentInner(DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { - composeBackbone(element); - if (element.hasSpecType()) { - composeCodeableConcept("specType", element.getSpecType()); - } - if (element.hasComponentId()) { - composeIdentifier("componentId", element.getComponentId()); - } - if (element.hasProductionSpecElement()) { - composeStringCore("productionSpec", element.getProductionSpecElement(), false); - composeStringExtras("productionSpec", element.getProductionSpecElement(), false); - } - } - - protected void composeDeviceMetric(String name, DeviceMetric element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDeviceMetricInner(element); - } - } - - protected void composeDeviceMetricInner(DeviceMetric element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasUnit()) { - composeCodeableConcept("unit", element.getUnit()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasParent()) { - composeReference("parent", element.getParent()); - } - if (element.hasOperationalStatusElement()) { - composeEnumerationCore("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false); - composeEnumerationExtras("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false); - } - if (element.hasColorElement()) { - composeEnumerationCore("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory(), false); - composeEnumerationExtras("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory(), false); - } - if (element.hasCategoryElement()) { - composeEnumerationCore("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory(), false); - composeEnumerationExtras("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory(), false); - } - if (element.hasMeasurementPeriod()) { - composeTiming("measurementPeriod", element.getMeasurementPeriod()); - } - if (element.hasCalibration()) { - openArray("calibration"); - for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration()) - composeDeviceMetricDeviceMetricCalibrationComponent(null, e); - closeArray(); - }; - } - - protected void composeDeviceMetricDeviceMetricCalibrationComponent(String name, DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { - if (element != null) { - open(name); - composeDeviceMetricDeviceMetricCalibrationComponentInner(element); - close(); - } - } - - protected void composeDeviceMetricDeviceMetricCalibrationComponentInner(DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory(), false); - } - if (element.hasStateElement()) { - composeEnumerationCore("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory(), false); - composeEnumerationExtras("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory(), false); - } - if (element.hasTimeElement()) { - composeInstantCore("time", element.getTimeElement(), false); - composeInstantExtras("time", element.getTimeElement(), false); - } - } - - protected void composeDeviceRequest(String name, DeviceRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDeviceRequestInner(element); - } - } - - protected void composeDeviceRequestInner(DeviceRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPriorRequest()) { - openArray("priorRequest"); - for (Reference e : element.getPriorRequest()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory(), false); - } - if (element.hasIntent()) { - composeCodeableConcept("intent", element.getIntent()); - } - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory(), false); - } - if (element.hasCode()) { - composeType("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasRequester()) { - composeDeviceRequestDeviceRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasPerformerType()) { - composeCodeableConcept("performerType", element.getPerformerType()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSupportingInfo()) { - openArray("supportingInfo"); - for (Reference e : element.getSupportingInfo()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasRelevantHistory()) { - openArray("relevantHistory"); - for (Reference e : element.getRelevantHistory()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeDeviceRequestDeviceRequestRequesterComponent(String name, DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { - if (element != null) { - open(name); - composeDeviceRequestDeviceRequestRequesterComponentInner(element); - close(); - } - } - - protected void composeDeviceRequestDeviceRequestRequesterComponentInner(DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeDeviceUseStatement(String name, DeviceUseStatement element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDeviceUseStatementInner(element); - } - } - - protected void composeDeviceUseStatementInner(DeviceUseStatement element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new DeviceUseStatement.DeviceUseStatementStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new DeviceUseStatement.DeviceUseStatementStatusEnumFactory(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasWhenUsed()) { - composePeriod("whenUsed", element.getWhenUsed()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } - if (element.hasRecordedOnElement()) { - composeDateTimeCore("recordedOn", element.getRecordedOnElement(), false); - composeDateTimeExtras("recordedOn", element.getRecordedOnElement(), false); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasIndication()) { - openArray("indication"); - for (CodeableConcept e : element.getIndication()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDiagnosticReportInner(element); - } - } - - protected void composeDiagnosticReportInner(DiagnosticReport element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } - if (element.hasIssuedElement()) { - composeInstantCore("issued", element.getIssuedElement(), false); - composeInstantExtras("issued", element.getIssuedElement(), false); - } - if (element.hasPerformer()) { - openArray("performer"); - for (Reference e : element.getPerformer()) - composeReference(null, e); - closeArray(); - }; - if (element.hasResultsInterpreter()) { - openArray("resultsInterpreter"); - for (Reference e : element.getResultsInterpreter()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSpecimen()) { - openArray("specimen"); - for (Reference e : element.getSpecimen()) - composeReference(null, e); - closeArray(); - }; - if (element.hasResult()) { - openArray("result"); - for (Reference e : element.getResult()) - composeReference(null, e); - closeArray(); - }; - if (element.hasImagingStudy()) { - openArray("imagingStudy"); - for (Reference e : element.getImagingStudy()) - composeReference(null, e); - closeArray(); - }; - if (element.hasImage()) { - openArray("image"); - for (DiagnosticReport.DiagnosticReportImageComponent e : element.getImage()) - composeDiagnosticReportDiagnosticReportImageComponent(null, e); - closeArray(); - }; - if (element.hasConclusionElement()) { - composeStringCore("conclusion", element.getConclusionElement(), false); - composeStringExtras("conclusion", element.getConclusionElement(), false); - } - if (element.hasCodedDiagnosis()) { - openArray("codedDiagnosis"); - for (CodeableConcept e : element.getCodedDiagnosis()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPresentedForm()) { - openArray("presentedForm"); - for (Attachment e : element.getPresentedForm()) - composeAttachment(null, e); - closeArray(); - }; - } - - protected void composeDiagnosticReportDiagnosticReportImageComponent(String name, DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { - if (element != null) { - open(name); - composeDiagnosticReportDiagnosticReportImageComponentInner(element); - close(); - } - } - - protected void composeDiagnosticReportDiagnosticReportImageComponentInner(DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { - composeBackbone(element); - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasLink()) { - composeReference("link", element.getLink()); - } - } - - protected void composeDocumentManifest(String name, DocumentManifest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDocumentManifestInner(element); - } - } - - protected void composeDocumentManifestInner(DocumentManifest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasMasterIdentifier()) { - composeIdentifier("masterIdentifier", element.getMasterIdentifier()); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasAuthor()) { - openArray("author"); - for (Reference e : element.getAuthor()) - composeReference(null, e); - closeArray(); - }; - if (element.hasRecipient()) { - openArray("recipient"); - for (Reference e : element.getRecipient()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSourceElement()) { - composeUriCore("source", element.getSourceElement(), false); - composeUriExtras("source", element.getSourceElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasContent()) { - openArray("content"); - for (DocumentManifest.DocumentManifestContentComponent e : element.getContent()) - composeDocumentManifestDocumentManifestContentComponent(null, e); - closeArray(); - }; - if (element.hasRelated()) { - openArray("related"); - for (DocumentManifest.DocumentManifestRelatedComponent e : element.getRelated()) - composeDocumentManifestDocumentManifestRelatedComponent(null, e); - closeArray(); - }; - } - - protected void composeDocumentManifestDocumentManifestContentComponent(String name, DocumentManifest.DocumentManifestContentComponent element) throws IOException { - if (element != null) { - open(name); - composeDocumentManifestDocumentManifestContentComponentInner(element); - close(); - } - } - - protected void composeDocumentManifestDocumentManifestContentComponentInner(DocumentManifest.DocumentManifestContentComponent element) throws IOException { - composeBackbone(element); - if (element.hasP()) { - composeType("p", element.getP()); - } - } - - protected void composeDocumentManifestDocumentManifestRelatedComponent(String name, DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { - if (element != null) { - open(name); - composeDocumentManifestDocumentManifestRelatedComponentInner(element); - close(); - } - } - - protected void composeDocumentManifestDocumentManifestRelatedComponentInner(DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasRef()) { - composeReference("ref", element.getRef()); - } - } - - protected void composeDocumentReference(String name, DocumentReference element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeDocumentReferenceInner(element); - } - } - - protected void composeDocumentReferenceInner(DocumentReference element) throws IOException { - composeDomainResourceElements(element); - if (element.hasMasterIdentifier()) { - composeIdentifier("masterIdentifier", element.getMasterIdentifier()); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); - } - if (element.hasDocStatusElement()) { - composeEnumerationCore("docStatus", element.getDocStatusElement(), new DocumentReference.ReferredDocumentStatusEnumFactory(), false); - composeEnumerationExtras("docStatus", element.getDocStatusElement(), new DocumentReference.ReferredDocumentStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasClass_()) { - composeCodeableConcept("class", element.getClass_()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasIndexedElement()) { - composeInstantCore("indexed", element.getIndexedElement(), false); - composeInstantExtras("indexed", element.getIndexedElement(), false); - } - if (element.hasAuthor()) { - openArray("author"); - for (Reference e : element.getAuthor()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAuthenticator()) { - composeReference("authenticator", element.getAuthenticator()); - } - if (element.hasCustodian()) { - composeReference("custodian", element.getCustodian()); - } - if (element.hasRelatesTo()) { - openArray("relatesTo"); - for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo()) - composeDocumentReferenceDocumentReferenceRelatesToComponent(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasSecurityLabel()) { - openArray("securityLabel"); - for (CodeableConcept e : element.getSecurityLabel()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContent()) { - openArray("content"); - for (DocumentReference.DocumentReferenceContentComponent e : element.getContent()) - composeDocumentReferenceDocumentReferenceContentComponent(null, e); - closeArray(); - }; - if (element.hasContext()) { - composeDocumentReferenceDocumentReferenceContextComponent("context", element.getContext()); - } - } - - protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(String name, DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { - if (element != null) { - open(name); - composeDocumentReferenceDocumentReferenceRelatesToComponentInner(element); - close(); - } - } - - protected void composeDocumentReferenceDocumentReferenceRelatesToComponentInner(DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory(), false); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - } - - protected void composeDocumentReferenceDocumentReferenceContentComponent(String name, DocumentReference.DocumentReferenceContentComponent element) throws IOException { - if (element != null) { - open(name); - composeDocumentReferenceDocumentReferenceContentComponentInner(element); - close(); - } - } - - protected void composeDocumentReferenceDocumentReferenceContentComponentInner(DocumentReference.DocumentReferenceContentComponent element) throws IOException { - composeBackbone(element); - if (element.hasAttachment()) { - composeAttachment("attachment", element.getAttachment()); - } - if (element.hasFormat()) { - composeCoding("format", element.getFormat()); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextComponent(String name, DocumentReference.DocumentReferenceContextComponent element) throws IOException { - if (element != null) { - open(name); - composeDocumentReferenceDocumentReferenceContextComponentInner(element); - close(); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextComponentInner(DocumentReference.DocumentReferenceContextComponent element) throws IOException { - composeBackbone(element); - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasEvent()) { - openArray("event"); - for (CodeableConcept e : element.getEvent()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasFacilityType()) { - composeCodeableConcept("facilityType", element.getFacilityType()); - } - if (element.hasPracticeSetting()) { - composeCodeableConcept("practiceSetting", element.getPracticeSetting()); - } - if (element.hasSourcePatientInfo()) { - composeReference("sourcePatientInfo", element.getSourcePatientInfo()); - } - if (element.hasRelated()) { - openArray("related"); - for (DocumentReference.DocumentReferenceContextRelatedComponent e : element.getRelated()) - composeDocumentReferenceDocumentReferenceContextRelatedComponent(null, e); - closeArray(); - }; - } - - protected void composeDocumentReferenceDocumentReferenceContextRelatedComponent(String name, DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { - if (element != null) { - open(name); - composeDocumentReferenceDocumentReferenceContextRelatedComponentInner(element); - close(); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextRelatedComponentInner(DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasRef()) { - composeReference("ref", element.getRef()); - } - } - - protected void composeEligibilityRequest(String name, EligibilityRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEligibilityRequestInner(element); - } - } - - protected void composeEligibilityRequestInner(EligibilityRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new EligibilityRequest.EligibilityRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new EligibilityRequest.EligibilityRequestStatusEnumFactory(), false); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasServiced()) { - composeType("serviced", element.getServiced()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasFacility()) { - composeReference("facility", element.getFacility()); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasBusinessArrangementElement()) { - composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false); - composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false); - } - if (element.hasBenefitCategory()) { - composeCodeableConcept("benefitCategory", element.getBenefitCategory()); - } - if (element.hasBenefitSubCategory()) { - composeCodeableConcept("benefitSubCategory", element.getBenefitSubCategory()); - } - } - - protected void composeEligibilityResponse(String name, EligibilityResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEligibilityResponseInner(element); - } - } - - protected void composeEligibilityResponseInner(EligibilityResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new EligibilityResponse.EligibilityResponseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new EligibilityResponse.EligibilityResponseStatusEnumFactory(), false); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeStringCore("disposition", element.getDispositionElement(), false); - composeStringExtras("disposition", element.getDispositionElement(), false); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasInforceElement()) { - composeBooleanCore("inforce", element.getInforceElement(), false); - composeBooleanExtras("inforce", element.getInforceElement(), false); - } - if (element.hasInsurance()) { - openArray("insurance"); - for (EligibilityResponse.InsuranceComponent e : element.getInsurance()) - composeEligibilityResponseInsuranceComponent(null, e); - closeArray(); - }; - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasError()) { - openArray("error"); - for (EligibilityResponse.ErrorsComponent e : element.getError()) - composeEligibilityResponseErrorsComponent(null, e); - closeArray(); - }; - } - - protected void composeEligibilityResponseInsuranceComponent(String name, EligibilityResponse.InsuranceComponent element) throws IOException { - if (element != null) { - open(name); - composeEligibilityResponseInsuranceComponentInner(element); - close(); - } - } - - protected void composeEligibilityResponseInsuranceComponentInner(EligibilityResponse.InsuranceComponent element) throws IOException { - composeBackbone(element); - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasContract()) { - composeReference("contract", element.getContract()); - } - if (element.hasBenefitBalance()) { - openArray("benefitBalance"); - for (EligibilityResponse.BenefitsComponent e : element.getBenefitBalance()) - composeEligibilityResponseBenefitsComponent(null, e); - closeArray(); - }; - } - - protected void composeEligibilityResponseBenefitsComponent(String name, EligibilityResponse.BenefitsComponent element) throws IOException { - if (element != null) { - open(name); - composeEligibilityResponseBenefitsComponentInner(element); - close(); - } - } - - protected void composeEligibilityResponseBenefitsComponentInner(EligibilityResponse.BenefitsComponent element) throws IOException { - composeBackbone(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasSubCategory()) { - composeCodeableConcept("subCategory", element.getSubCategory()); - } - if (element.hasExcludedElement()) { - composeBooleanCore("excluded", element.getExcludedElement(), false); - composeBooleanExtras("excluded", element.getExcludedElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasNetwork()) { - composeCodeableConcept("network", element.getNetwork()); - } - if (element.hasUnit()) { - composeCodeableConcept("unit", element.getUnit()); - } - if (element.hasTerm()) { - composeCodeableConcept("term", element.getTerm()); - } - if (element.hasFinancial()) { - openArray("financial"); - for (EligibilityResponse.BenefitComponent e : element.getFinancial()) - composeEligibilityResponseBenefitComponent(null, e); - closeArray(); - }; - } - - protected void composeEligibilityResponseBenefitComponent(String name, EligibilityResponse.BenefitComponent element) throws IOException { - if (element != null) { - open(name); - composeEligibilityResponseBenefitComponentInner(element); - close(); - } - } - - protected void composeEligibilityResponseBenefitComponentInner(EligibilityResponse.BenefitComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAllowed()) { - composeType("allowed", element.getAllowed()); - } - if (element.hasUsed()) { - composeType("used", element.getUsed()); - } - } - - protected void composeEligibilityResponseErrorsComponent(String name, EligibilityResponse.ErrorsComponent element) throws IOException { - if (element != null) { - open(name); - composeEligibilityResponseErrorsComponentInner(element); - close(); - } - } - - protected void composeEligibilityResponseErrorsComponentInner(EligibilityResponse.ErrorsComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - } - - protected void composeEncounter(String name, Encounter element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEncounterInner(element); - } - } - - protected void composeEncounterInner(Encounter element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); - } - if (element.hasStatusHistory()) { - openArray("statusHistory"); - for (Encounter.StatusHistoryComponent e : element.getStatusHistory()) - composeEncounterStatusHistoryComponent(null, e); - closeArray(); - }; - if (element.hasClass_()) { - composeCoding("class", element.getClass_()); - } - if (element.hasClassHistory()) { - openArray("classHistory"); - for (Encounter.ClassHistoryComponent e : element.getClassHistory()) - composeEncounterClassHistoryComponent(null, e); - closeArray(); - }; - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasEpisodeOfCare()) { - openArray("episodeOfCare"); - for (Reference e : element.getEpisodeOfCare()) - composeReference(null, e); - closeArray(); - }; - if (element.hasIncomingReferral()) { - openArray("incomingReferral"); - for (Reference e : element.getIncomingReferral()) - composeReference(null, e); - closeArray(); - }; - if (element.hasParticipant()) { - openArray("participant"); - for (Encounter.EncounterParticipantComponent e : element.getParticipant()) - composeEncounterEncounterParticipantComponent(null, e); - closeArray(); - }; - if (element.hasAppointment()) { - composeReference("appointment", element.getAppointment()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasLength()) { - composeDuration("length", element.getLength()); - } - if (element.hasReason()) { - openArray("reason"); - for (CodeableConcept e : element.getReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDiagnosis()) { - openArray("diagnosis"); - for (Encounter.DiagnosisComponent e : element.getDiagnosis()) - composeEncounterDiagnosisComponent(null, e); - closeArray(); - }; - if (element.hasAccount()) { - openArray("account"); - for (Reference e : element.getAccount()) - composeReference(null, e); - closeArray(); - }; - if (element.hasHospitalization()) { - composeEncounterEncounterHospitalizationComponent("hospitalization", element.getHospitalization()); - } - if (element.hasLocation()) { - openArray("location"); - for (Encounter.EncounterLocationComponent e : element.getLocation()) - composeEncounterEncounterLocationComponent(null, e); - closeArray(); - }; - if (element.hasServiceProvider()) { - composeReference("serviceProvider", element.getServiceProvider()); - } - if (element.hasPartOf()) { - composeReference("partOf", element.getPartOf()); - } - } - - protected void composeEncounterStatusHistoryComponent(String name, Encounter.StatusHistoryComponent element) throws IOException { - if (element != null) { - open(name); - composeEncounterStatusHistoryComponentInner(element); - close(); - } - } - - protected void composeEncounterStatusHistoryComponentInner(Encounter.StatusHistoryComponent element) throws IOException { - composeBackbone(element); - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEncounterClassHistoryComponent(String name, Encounter.ClassHistoryComponent element) throws IOException { - if (element != null) { - open(name); - composeEncounterClassHistoryComponentInner(element); - close(); - } - } - - protected void composeEncounterClassHistoryComponentInner(Encounter.ClassHistoryComponent element) throws IOException { - composeBackbone(element); - if (element.hasClass_()) { - composeCoding("class", element.getClass_()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEncounterEncounterParticipantComponent(String name, Encounter.EncounterParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composeEncounterEncounterParticipantComponentInner(element); - close(); - } - } - - protected void composeEncounterEncounterParticipantComponentInner(Encounter.EncounterParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasIndividual()) { - composeReference("individual", element.getIndividual()); - } - } - - protected void composeEncounterDiagnosisComponent(String name, Encounter.DiagnosisComponent element) throws IOException { - if (element != null) { - open(name); - composeEncounterDiagnosisComponentInner(element); - close(); - } - } - - protected void composeEncounterDiagnosisComponentInner(Encounter.DiagnosisComponent element) throws IOException { - composeBackbone(element); - if (element.hasCondition()) { - composeReference("condition", element.getCondition()); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasRankElement()) { - composePositiveIntCore("rank", element.getRankElement(), false); - composePositiveIntExtras("rank", element.getRankElement(), false); - } - } - - protected void composeEncounterEncounterHospitalizationComponent(String name, Encounter.EncounterHospitalizationComponent element) throws IOException { - if (element != null) { - open(name); - composeEncounterEncounterHospitalizationComponentInner(element); - close(); - } - } - - protected void composeEncounterEncounterHospitalizationComponentInner(Encounter.EncounterHospitalizationComponent element) throws IOException { - composeBackbone(element); - if (element.hasPreAdmissionIdentifier()) { - composeIdentifier("preAdmissionIdentifier", element.getPreAdmissionIdentifier()); - } - if (element.hasOrigin()) { - composeReference("origin", element.getOrigin()); - } - if (element.hasAdmitSource()) { - composeCodeableConcept("admitSource", element.getAdmitSource()); - } - if (element.hasReAdmission()) { - composeCodeableConcept("reAdmission", element.getReAdmission()); - } - if (element.hasDietPreference()) { - openArray("dietPreference"); - for (CodeableConcept e : element.getDietPreference()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialCourtesy()) { - openArray("specialCourtesy"); - for (CodeableConcept e : element.getSpecialCourtesy()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialArrangement()) { - openArray("specialArrangement"); - for (CodeableConcept e : element.getSpecialArrangement()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDestination()) { - composeReference("destination", element.getDestination()); - } - if (element.hasDischargeDisposition()) { - composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition()); - } - } - - protected void composeEncounterEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element) throws IOException { - if (element != null) { - open(name); - composeEncounterEncounterLocationComponentInner(element); - close(); - } - } - - protected void composeEncounterEncounterLocationComponentInner(Encounter.EncounterLocationComponent element) throws IOException { - composeBackbone(element); - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEndpoint(String name, Endpoint element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEndpointInner(element); - } - } - - protected void composeEndpointInner(Endpoint element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory(), false); - } - if (element.hasConnectionType()) { - composeCoding("connectionType", element.getConnectionType()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactPoint e : element.getContact()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasPayloadType()) { - openArray("payloadType"); - for (CodeableConcept e : element.getPayloadType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPayloadMimeType()) { - openArray("payloadMimeType"); - for (CodeType e : element.getPayloadMimeType()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPayloadMimeType())) { - openArray("_payloadMimeType"); - for (CodeType e : element.getPayloadMimeType()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAddressElement()) { - composeUriCore("address", element.getAddressElement(), false); - composeUriExtras("address", element.getAddressElement(), false); - } - if (element.hasHeader()) { - openArray("header"); - for (StringType e : element.getHeader()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getHeader())) { - openArray("_header"); - for (StringType e : element.getHeader()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEnrollmentRequestInner(element); - } - } - - protected void composeEnrollmentRequestInner(EnrollmentRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new EnrollmentRequest.EnrollmentRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new EnrollmentRequest.EnrollmentRequestStatusEnumFactory(), false); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasCandidate()) { - composeReference("candidate", element.getCandidate()); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - } - - protected void composeEnrollmentResponse(String name, EnrollmentResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEnrollmentResponseInner(element); - } - } - - protected void composeEnrollmentResponseInner(EnrollmentResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new EnrollmentResponse.EnrollmentResponseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new EnrollmentResponse.EnrollmentResponseStatusEnumFactory(), false); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeStringCore("disposition", element.getDispositionElement(), false); - composeStringExtras("disposition", element.getDispositionElement(), false); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - } - - protected void composeEpisodeOfCare(String name, EpisodeOfCare element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEpisodeOfCareInner(element); - } - } - - protected void composeEpisodeOfCareInner(EpisodeOfCare element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); - } - if (element.hasStatusHistory()) { - openArray("statusHistory"); - for (EpisodeOfCare.EpisodeOfCareStatusHistoryComponent e : element.getStatusHistory()) - composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(null, e); - closeArray(); - }; - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDiagnosis()) { - openArray("diagnosis"); - for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis()) - composeEpisodeOfCareDiagnosisComponent(null, e); - closeArray(); - }; - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasReferralRequest()) { - openArray("referralRequest"); - for (Reference e : element.getReferralRequest()) - composeReference(null, e); - closeArray(); - }; - if (element.hasCareManager()) { - composeReference("careManager", element.getCareManager()); - } - if (element.hasTeam()) { - openArray("team"); - for (Reference e : element.getTeam()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAccount()) { - openArray("account"); - for (Reference e : element.getAccount()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { - if (element != null) { - open(name); - composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentInner(element); - close(); - } - } - - protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentInner(EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { - composeBackbone(element); - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEpisodeOfCareDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element) throws IOException { - if (element != null) { - open(name); - composeEpisodeOfCareDiagnosisComponentInner(element); - close(); - } - } - - protected void composeEpisodeOfCareDiagnosisComponentInner(EpisodeOfCare.DiagnosisComponent element) throws IOException { - composeBackbone(element); - if (element.hasCondition()) { - composeReference("condition", element.getCondition()); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasRankElement()) { - composePositiveIntCore("rank", element.getRankElement(), false); - composePositiveIntExtras("rank", element.getRankElement(), false); - } - } - - protected void composeEventDefinition(String name, EventDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeEventDefinitionInner(element); - } - } - - protected void composeEventDefinitionInner(EventDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContributor()) { - openArray("contributor"); - for (Contributor e : element.getContributor()) - composeContributor(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - } - - protected void composeExpansionProfile(String name, ExpansionProfile element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeExpansionProfileInner(element); - } - } - - protected void composeExpansionProfileInner(ExpansionProfile element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasFixedVersion()) { - openArray("fixedVersion"); - for (ExpansionProfile.ExpansionProfileFixedVersionComponent e : element.getFixedVersion()) - composeExpansionProfileExpansionProfileFixedVersionComponent(null, e); - closeArray(); - }; - if (element.hasExcludedSystem()) { - composeExpansionProfileExpansionProfileExcludedSystemComponent("excludedSystem", element.getExcludedSystem()); - } - if (element.hasIncludeDesignationsElement()) { - composeBooleanCore("includeDesignations", element.getIncludeDesignationsElement(), false); - composeBooleanExtras("includeDesignations", element.getIncludeDesignationsElement(), false); - } - if (element.hasDesignation()) { - composeExpansionProfileExpansionProfileDesignationComponent("designation", element.getDesignation()); - } - if (element.hasIncludeDefinitionElement()) { - composeBooleanCore("includeDefinition", element.getIncludeDefinitionElement(), false); - composeBooleanExtras("includeDefinition", element.getIncludeDefinitionElement(), false); - } - if (element.hasActiveOnlyElement()) { - composeBooleanCore("activeOnly", element.getActiveOnlyElement(), false); - composeBooleanExtras("activeOnly", element.getActiveOnlyElement(), false); - } - if (element.hasExcludeNestedElement()) { - composeBooleanCore("excludeNested", element.getExcludeNestedElement(), false); - composeBooleanExtras("excludeNested", element.getExcludeNestedElement(), false); - } - if (element.hasExcludeNotForUIElement()) { - composeBooleanCore("excludeNotForUI", element.getExcludeNotForUIElement(), false); - composeBooleanExtras("excludeNotForUI", element.getExcludeNotForUIElement(), false); - } - if (element.hasExcludePostCoordinatedElement()) { - composeBooleanCore("excludePostCoordinated", element.getExcludePostCoordinatedElement(), false); - composeBooleanExtras("excludePostCoordinated", element.getExcludePostCoordinatedElement(), false); - } - if (element.hasDisplayLanguageElement()) { - composeCodeCore("displayLanguage", element.getDisplayLanguageElement(), false); - composeCodeExtras("displayLanguage", element.getDisplayLanguageElement(), false); - } - if (element.hasLimitedExpansionElement()) { - composeBooleanCore("limitedExpansion", element.getLimitedExpansionElement(), false); - composeBooleanExtras("limitedExpansion", element.getLimitedExpansionElement(), false); - } - } - - protected void composeExpansionProfileExpansionProfileFixedVersionComponent(String name, ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileExpansionProfileFixedVersionComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileExpansionProfileFixedVersionComponentInner(ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { - composeBackbone(element); - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new ExpansionProfile.SystemVersionProcessingModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new ExpansionProfile.SystemVersionProcessingModeEnumFactory(), false); - } - } - - protected void composeExpansionProfileExpansionProfileExcludedSystemComponent(String name, ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileExpansionProfileExcludedSystemComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileExpansionProfileExcludedSystemComponentInner(ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { - composeBackbone(element); - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - } - - protected void composeExpansionProfileExpansionProfileDesignationComponent(String name, ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileExpansionProfileDesignationComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileExpansionProfileDesignationComponentInner(ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { - composeBackbone(element); - if (element.hasInclude()) { - composeExpansionProfileDesignationIncludeComponent("include", element.getInclude()); - } - if (element.hasExclude()) { - composeExpansionProfileDesignationExcludeComponent("exclude", element.getExclude()); - } - } - - protected void composeExpansionProfileDesignationIncludeComponent(String name, ExpansionProfile.DesignationIncludeComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileDesignationIncludeComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileDesignationIncludeComponentInner(ExpansionProfile.DesignationIncludeComponent element) throws IOException { - composeBackbone(element); - if (element.hasDesignation()) { - openArray("designation"); - for (ExpansionProfile.DesignationIncludeDesignationComponent e : element.getDesignation()) - composeExpansionProfileDesignationIncludeDesignationComponent(null, e); - closeArray(); - }; - } - - protected void composeExpansionProfileDesignationIncludeDesignationComponent(String name, ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileDesignationIncludeDesignationComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileDesignationIncludeDesignationComponentInner(ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { - composeBackbone(element); - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - } - - protected void composeExpansionProfileDesignationExcludeComponent(String name, ExpansionProfile.DesignationExcludeComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileDesignationExcludeComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileDesignationExcludeComponentInner(ExpansionProfile.DesignationExcludeComponent element) throws IOException { - composeBackbone(element); - if (element.hasDesignation()) { - openArray("designation"); - for (ExpansionProfile.DesignationExcludeDesignationComponent e : element.getDesignation()) - composeExpansionProfileDesignationExcludeDesignationComponent(null, e); - closeArray(); - }; - } - - protected void composeExpansionProfileDesignationExcludeDesignationComponent(String name, ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { - if (element != null) { - open(name); - composeExpansionProfileDesignationExcludeDesignationComponentInner(element); - close(); - } - } - - protected void composeExpansionProfileDesignationExcludeDesignationComponentInner(ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { - composeBackbone(element); - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - } - - protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeExplanationOfBenefitInner(element); - } - } - - protected void composeExplanationOfBenefitInner(ExplanationOfBenefit element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - openArray("subType"); - for (CodeableConcept e : element.getSubType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasBillablePeriod()) { - composePeriod("billablePeriod", element.getBillablePeriod()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasReferral()) { - composeReference("referral", element.getReferral()); - } - if (element.hasFacility()) { - composeReference("facility", element.getFacility()); - } - if (element.hasClaim()) { - composeReference("claim", element.getClaim()); - } - if (element.hasClaimResponse()) { - composeReference("claimResponse", element.getClaimResponse()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeStringCore("disposition", element.getDispositionElement(), false); - composeStringExtras("disposition", element.getDispositionElement(), false); - } - if (element.hasRelated()) { - openArray("related"); - for (ExplanationOfBenefit.RelatedClaimComponent e : element.getRelated()) - composeExplanationOfBenefitRelatedClaimComponent(null, e); - closeArray(); - }; - if (element.hasPrescription()) { - composeReference("prescription", element.getPrescription()); - } - if (element.hasOriginalPrescription()) { - composeReference("originalPrescription", element.getOriginalPrescription()); - } - if (element.hasPayee()) { - composeExplanationOfBenefitPayeeComponent("payee", element.getPayee()); - } - if (element.hasInformation()) { - openArray("information"); - for (ExplanationOfBenefit.SupportingInformationComponent e : element.getInformation()) - composeExplanationOfBenefitSupportingInformationComponent(null, e); - closeArray(); - }; - if (element.hasCareTeam()) { - openArray("careTeam"); - for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam()) - composeExplanationOfBenefitCareTeamComponent(null, e); - closeArray(); - }; - if (element.hasDiagnosis()) { - openArray("diagnosis"); - for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis()) - composeExplanationOfBenefitDiagnosisComponent(null, e); - closeArray(); - }; - if (element.hasProcedure()) { - openArray("procedure"); - for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure()) - composeExplanationOfBenefitProcedureComponent(null, e); - closeArray(); - }; - if (element.hasPrecedenceElement()) { - composePositiveIntCore("precedence", element.getPrecedenceElement(), false); - composePositiveIntExtras("precedence", element.getPrecedenceElement(), false); - } - if (element.hasInsurance()) { - composeExplanationOfBenefitInsuranceComponent("insurance", element.getInsurance()); - } - if (element.hasAccident()) { - composeExplanationOfBenefitAccidentComponent("accident", element.getAccident()); - } - if (element.hasEmploymentImpacted()) { - composePeriod("employmentImpacted", element.getEmploymentImpacted()); - } - if (element.hasHospitalization()) { - composePeriod("hospitalization", element.getHospitalization()); - } - if (element.hasItem()) { - openArray("item"); - for (ExplanationOfBenefit.ItemComponent e : element.getItem()) - composeExplanationOfBenefitItemComponent(null, e); - closeArray(); - }; - if (element.hasAddItem()) { - openArray("addItem"); - for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem()) - composeExplanationOfBenefitAddedItemComponent(null, e); - closeArray(); - }; - if (element.hasTotalCost()) { - composeMoney("totalCost", element.getTotalCost()); - } - if (element.hasUnallocDeductable()) { - composeMoney("unallocDeductable", element.getUnallocDeductable()); - } - if (element.hasTotalBenefit()) { - composeMoney("totalBenefit", element.getTotalBenefit()); - } - if (element.hasPayment()) { - composeExplanationOfBenefitPaymentComponent("payment", element.getPayment()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasProcessNote()) { - openArray("processNote"); - for (ExplanationOfBenefit.NoteComponent e : element.getProcessNote()) - composeExplanationOfBenefitNoteComponent(null, e); - closeArray(); - }; - if (element.hasBenefitBalance()) { - openArray("benefitBalance"); - for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance()) - composeExplanationOfBenefitBenefitBalanceComponent(null, e); - closeArray(); - }; - } - - protected void composeExplanationOfBenefitRelatedClaimComponent(String name, ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitRelatedClaimComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitRelatedClaimComponentInner(ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { - composeBackbone(element); - if (element.hasClaim()) { - composeReference("claim", element.getClaim()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasReference()) { - composeIdentifier("reference", element.getReference()); - } - } - - protected void composeExplanationOfBenefitPayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitPayeeComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitPayeeComponentInner(ExplanationOfBenefit.PayeeComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasResource()) { - composeCoding("resource", element.getResource()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - } - - protected void composeExplanationOfBenefitSupportingInformationComponent(String name, ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitSupportingInformationComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitSupportingInformationComponentInner(ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasReason()) { - composeCoding("reason", element.getReason()); - } - } - - protected void composeExplanationOfBenefitCareTeamComponent(String name, ExplanationOfBenefit.CareTeamComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitCareTeamComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitCareTeamComponentInner(ExplanationOfBenefit.CareTeamComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasResponsibleElement()) { - composeBooleanCore("responsible", element.getResponsibleElement(), false); - composeBooleanExtras("responsible", element.getResponsibleElement(), false); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasQualification()) { - composeCodeableConcept("qualification", element.getQualification()); - } - } - - protected void composeExplanationOfBenefitDiagnosisComponent(String name, ExplanationOfBenefit.DiagnosisComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitDiagnosisComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitDiagnosisComponentInner(ExplanationOfBenefit.DiagnosisComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasDiagnosis()) { - composeType("diagnosis", element.getDiagnosis()); - } - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPackageCode()) { - composeCodeableConcept("packageCode", element.getPackageCode()); - } - } - - protected void composeExplanationOfBenefitProcedureComponent(String name, ExplanationOfBenefit.ProcedureComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitProcedureComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitProcedureComponentInner(ExplanationOfBenefit.ProcedureComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasProcedure()) { - composeType("procedure", element.getProcedure()); - } - } - - protected void composeExplanationOfBenefitInsuranceComponent(String name, ExplanationOfBenefit.InsuranceComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitInsuranceComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitInsuranceComponentInner(ExplanationOfBenefit.InsuranceComponent element) throws IOException { - composeBackbone(element); - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasPreAuthRef()) { - openArray("preAuthRef"); - for (StringType e : element.getPreAuthRef()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPreAuthRef())) { - openArray("_preAuthRef"); - for (StringType e : element.getPreAuthRef()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeExplanationOfBenefitAccidentComponent(String name, ExplanationOfBenefit.AccidentComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitAccidentComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitAccidentComponentInner(ExplanationOfBenefit.AccidentComponent element) throws IOException { - composeBackbone(element); - if (element.hasDateElement()) { - composeDateCore("date", element.getDateElement(), false); - composeDateExtras("date", element.getDateElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLocation()) { - composeType("location", element.getLocation()); - } - } - - protected void composeExplanationOfBenefitItemComponent(String name, ExplanationOfBenefit.ItemComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitItemComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitItemComponentInner(ExplanationOfBenefit.ItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasCareTeamLinkId()) { - openArray("careTeamLinkId"); - for (PositiveIntType e : element.getCareTeamLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getCareTeamLinkId())) { - openArray("_careTeamLinkId"); - for (PositiveIntType e : element.getCareTeamLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDiagnosisLinkId()) { - openArray("diagnosisLinkId"); - for (PositiveIntType e : element.getDiagnosisLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getDiagnosisLinkId())) { - openArray("_diagnosisLinkId"); - for (PositiveIntType e : element.getDiagnosisLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasProcedureLinkId()) { - openArray("procedureLinkId"); - for (PositiveIntType e : element.getProcedureLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getProcedureLinkId())) { - openArray("_procedureLinkId"); - for (PositiveIntType e : element.getProcedureLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasInformationLinkId()) { - openArray("informationLinkId"); - for (PositiveIntType e : element.getInformationLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getInformationLinkId())) { - openArray("_informationLinkId"); - for (PositiveIntType e : element.getInformationLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasProgramCode()) { - openArray("programCode"); - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasServiced()) { - composeType("serviced", element.getServiced()); - } - if (element.hasLocation()) { - composeType("location", element.getLocation()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - openArray("udi"); - for (Reference e : element.getUdi()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasSubSite()) { - openArray("subSite"); - for (CodeableConcept e : element.getSubSite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasEncounter()) { - openArray("encounter"); - for (Reference e : element.getEncounter()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent(null, e); - closeArray(); - }; - if (element.hasDetail()) { - openArray("detail"); - for (ExplanationOfBenefit.DetailComponent e : element.getDetail()) - composeExplanationOfBenefitDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeExplanationOfBenefitAdjudicationComponent(String name, ExplanationOfBenefit.AdjudicationComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitAdjudicationComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitAdjudicationComponentInner(ExplanationOfBenefit.AdjudicationComponent element) throws IOException { - composeBackbone(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasValueElement()) { - composeDecimalCore("value", element.getValueElement(), false); - composeDecimalExtras("value", element.getValueElement(), false); - } - } - - protected void composeExplanationOfBenefitDetailComponent(String name, ExplanationOfBenefit.DetailComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitDetailComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitDetailComponentInner(ExplanationOfBenefit.DetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasProgramCode()) { - openArray("programCode"); - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - openArray("udi"); - for (Reference e : element.getUdi()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent(null, e); - closeArray(); - }; - if (element.hasSubDetail()) { - openArray("subDetail"); - for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail()) - composeExplanationOfBenefitSubDetailComponent(null, e); - closeArray(); - }; - } - - protected void composeExplanationOfBenefitSubDetailComponent(String name, ExplanationOfBenefit.SubDetailComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitSubDetailComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitSubDetailComponentInner(ExplanationOfBenefit.SubDetailComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceElement()) { - composePositiveIntCore("sequence", element.getSequenceElement(), false); - composePositiveIntExtras("sequence", element.getSequenceElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasProgramCode()) { - openArray("programCode"); - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimalCore("factor", element.getFactorElement(), false); - composeDecimalExtras("factor", element.getFactorElement(), false); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - openArray("udi"); - for (Reference e : element.getUdi()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent(null, e); - closeArray(); - }; - } - - protected void composeExplanationOfBenefitAddedItemComponent(String name, ExplanationOfBenefit.AddedItemComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitAddedItemComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitAddedItemComponentInner(ExplanationOfBenefit.AddedItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkId()) { - openArray("sequenceLinkId"); - for (PositiveIntType e : element.getSequenceLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSequenceLinkId())) { - openArray("_sequenceLinkId"); - for (PositiveIntType e : element.getSequenceLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDetailSequenceLinkId()) { - openArray("detailSequenceLinkId"); - for (PositiveIntType e : element.getDetailSequenceLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getDetailSequenceLinkId())) { - openArray("_detailSequenceLinkId"); - for (PositiveIntType e : element.getDetailSequenceLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSubdetailSequenceLinkId()) { - openArray("subdetailSequenceLinkId"); - for (PositiveIntType e : element.getSubdetailSequenceLinkId()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSubdetailSequenceLinkId())) { - openArray("_subdetailSequenceLinkId"); - for (PositiveIntType e : element.getSubdetailSequenceLinkId()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - openArray("modifier"); - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasFee()) { - composeMoney("fee", element.getFee()); - } - if (element.hasNoteNumber()) { - openArray("noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getNoteNumber())) { - openArray("_noteNumber"); - for (PositiveIntType e : element.getNoteNumber()) - composePositiveIntExtras(null, e, true); - closeArray(); - } - }; - if (element.hasAdjudication()) { - openArray("adjudication"); - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent(null, e); - closeArray(); - }; - } - - protected void composeExplanationOfBenefitPaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitPaymentComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitPaymentComponentInner(ExplanationOfBenefit.PaymentComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAdjustment()) { - composeMoney("adjustment", element.getAdjustment()); - } - if (element.hasAdjustmentReason()) { - composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); - } - if (element.hasDateElement()) { - composeDateCore("date", element.getDateElement(), false); - composeDateExtras("date", element.getDateElement(), false); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - } - - protected void composeExplanationOfBenefitNoteComponent(String name, ExplanationOfBenefit.NoteComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitNoteComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitNoteComponentInner(ExplanationOfBenefit.NoteComponent element) throws IOException { - composeBackbone(element); - if (element.hasNumberElement()) { - composePositiveIntCore("number", element.getNumberElement(), false); - composePositiveIntExtras("number", element.getNumberElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasLanguage()) { - composeCodeableConcept("language", element.getLanguage()); - } - } - - protected void composeExplanationOfBenefitBenefitBalanceComponent(String name, ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitBenefitBalanceComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitBenefitBalanceComponentInner(ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { - composeBackbone(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasSubCategory()) { - composeCodeableConcept("subCategory", element.getSubCategory()); - } - if (element.hasExcludedElement()) { - composeBooleanCore("excluded", element.getExcludedElement(), false); - composeBooleanExtras("excluded", element.getExcludedElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasNetwork()) { - composeCodeableConcept("network", element.getNetwork()); - } - if (element.hasUnit()) { - composeCodeableConcept("unit", element.getUnit()); - } - if (element.hasTerm()) { - composeCodeableConcept("term", element.getTerm()); - } - if (element.hasFinancial()) { - openArray("financial"); - for (ExplanationOfBenefit.BenefitComponent e : element.getFinancial()) - composeExplanationOfBenefitBenefitComponent(null, e); - closeArray(); - }; - } - - protected void composeExplanationOfBenefitBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element) throws IOException { - if (element != null) { - open(name); - composeExplanationOfBenefitBenefitComponentInner(element); - close(); - } - } - - protected void composeExplanationOfBenefitBenefitComponentInner(ExplanationOfBenefit.BenefitComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAllowed()) { - composeType("allowed", element.getAllowed()); - } - if (element.hasUsed()) { - composeType("used", element.getUsed()); - } - } - - protected void composeFamilyMemberHistory(String name, FamilyMemberHistory element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeFamilyMemberHistoryInner(element); - } - } - - protected void composeFamilyMemberHistoryInner(FamilyMemberHistory element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory(), false); - } - if (element.hasDataAbsentReason()) { - composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasGenderElement()) { - composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - } - if (element.hasBorn()) { - composeType("born", element.getBorn()); - } - if (element.hasAge()) { - composeType("age", element.getAge()); - } - if (element.hasEstimatedAgeElement()) { - composeBooleanCore("estimatedAge", element.getEstimatedAgeElement(), false); - composeBooleanExtras("estimatedAge", element.getEstimatedAgeElement(), false); - } - if (element.hasDeceased()) { - composeType("deceased", element.getDeceased()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasCondition()) { - openArray("condition"); - for (FamilyMemberHistory.FamilyMemberHistoryConditionComponent e : element.getCondition()) - composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(null, e); - closeArray(); - }; - } - - protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { - if (element != null) { - open(name); - composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentInner(element); - close(); - } - } - - protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentInner(FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasOnset()) { - composeType("onset", element.getOnset()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeFlag(String name, Flag element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeFlagInner(element); - } - } - - protected void composeFlagInner(Flag element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - } - - protected void composeGoal(String name, Goal element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeGoalInner(element); - } - } - - protected void composeGoalInner(Goal element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Goal.GoalStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Goal.GoalStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasDescription()) { - composeCodeableConcept("description", element.getDescription()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasStart()) { - composeType("start", element.getStart()); - } - if (element.hasTarget()) { - composeGoalGoalTargetComponent("target", element.getTarget()); - } - if (element.hasStatusDateElement()) { - composeDateCore("statusDate", element.getStatusDateElement(), false); - composeDateExtras("statusDate", element.getStatusDateElement(), false); - } - if (element.hasStatusReasonElement()) { - composeStringCore("statusReason", element.getStatusReasonElement(), false); - composeStringExtras("statusReason", element.getStatusReasonElement(), false); - } - if (element.hasExpressedBy()) { - composeReference("expressedBy", element.getExpressedBy()); - } - if (element.hasAddresses()) { - openArray("addresses"); - for (Reference e : element.getAddresses()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasOutcomeCode()) { - openArray("outcomeCode"); - for (CodeableConcept e : element.getOutcomeCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasOutcomeReference()) { - openArray("outcomeReference"); - for (Reference e : element.getOutcomeReference()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeGoalGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException { - if (element != null) { - open(name); - composeGoalGoalTargetComponentInner(element); - close(); - } - } - - protected void composeGoalGoalTargetComponentInner(Goal.GoalTargetComponent element) throws IOException { - composeBackbone(element); - if (element.hasMeasure()) { - composeCodeableConcept("measure", element.getMeasure()); - } - if (element.hasDetail()) { - composeType("detail", element.getDetail()); - } - if (element.hasDue()) { - composeType("due", element.getDue()); - } - } - - protected void composeGraphDefinition(String name, GraphDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeGraphDefinitionInner(element); - } - } - - protected void composeGraphDefinitionInner(GraphDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasStartElement()) { - composeCodeCore("start", element.getStartElement(), false); - composeCodeExtras("start", element.getStartElement(), false); - } - if (element.hasProfileElement()) { - composeUriCore("profile", element.getProfileElement(), false); - composeUriExtras("profile", element.getProfileElement(), false); - } - if (element.hasLink()) { - openArray("link"); - for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) - composeGraphDefinitionGraphDefinitionLinkComponent(null, e); - closeArray(); - }; - } - - protected void composeGraphDefinitionGraphDefinitionLinkComponent(String name, GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { - if (element != null) { - open(name); - composeGraphDefinitionGraphDefinitionLinkComponentInner(element); - close(); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkComponentInner(GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { - composeBackbone(element); - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasSliceNameElement()) { - composeStringCore("sliceName", element.getSliceNameElement(), false); - composeStringExtras("sliceName", element.getSliceNameElement(), false); - } - if (element.hasMinElement()) { - composeIntegerCore("min", element.getMinElement(), false); - composeIntegerExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasTarget()) { - openArray("target"); - for (GraphDefinition.GraphDefinitionLinkTargetComponent e : element.getTarget()) - composeGraphDefinitionGraphDefinitionLinkTargetComponent(null, e); - closeArray(); - }; - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(String name, GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { - if (element != null) { - open(name); - composeGraphDefinitionGraphDefinitionLinkTargetComponentInner(element); - close(); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetComponentInner(GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasProfileElement()) { - composeUriCore("profile", element.getProfileElement(), false); - composeUriExtras("profile", element.getProfileElement(), false); - } - if (element.hasCompartment()) { - openArray("compartment"); - for (GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent e : element.getCompartment()) - composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(null, e); - closeArray(); - }; - if (element.hasLink()) { - openArray("link"); - for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) - composeGraphDefinitionGraphDefinitionLinkComponent(null, e); - closeArray(); - }; - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(String name, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { - if (element != null) { - open(name); - composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentInner(element); - close(); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentInner(GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory(), false); - } - if (element.hasRuleElement()) { - composeEnumerationCore("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(), false); - composeEnumerationExtras("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - } - - protected void composeGroup(String name, Group element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeGroupInner(element); - } - } - - protected void composeGroupInner(Group element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Group.GroupTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Group.GroupTypeEnumFactory(), false); - } - if (element.hasActualElement()) { - composeBooleanCore("actual", element.getActualElement(), false); - composeBooleanExtras("actual", element.getActualElement(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasQuantityElement()) { - composeUnsignedIntCore("quantity", element.getQuantityElement(), false); - composeUnsignedIntExtras("quantity", element.getQuantityElement(), false); - } - if (element.hasCharacteristic()) { - openArray("characteristic"); - for (Group.GroupCharacteristicComponent e : element.getCharacteristic()) - composeGroupGroupCharacteristicComponent(null, e); - closeArray(); - }; - if (element.hasMember()) { - openArray("member"); - for (Group.GroupMemberComponent e : element.getMember()) - composeGroupGroupMemberComponent(null, e); - closeArray(); - }; - } - - protected void composeGroupGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element) throws IOException { - if (element != null) { - open(name); - composeGroupGroupCharacteristicComponentInner(element); - close(); - } - } - - protected void composeGroupGroupCharacteristicComponentInner(Group.GroupCharacteristicComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasExcludeElement()) { - composeBooleanCore("exclude", element.getExcludeElement(), false); - composeBooleanExtras("exclude", element.getExcludeElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeGroupGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException { - if (element != null) { - open(name); - composeGroupGroupMemberComponentInner(element); - close(); - } - } - - protected void composeGroupGroupMemberComponentInner(Group.GroupMemberComponent element) throws IOException { - composeBackbone(element); - if (element.hasEntity()) { - composeReference("entity", element.getEntity()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasInactiveElement()) { - composeBooleanCore("inactive", element.getInactiveElement(), false); - composeBooleanExtras("inactive", element.getInactiveElement(), false); - } - } - - protected void composeGuidanceResponse(String name, GuidanceResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeGuidanceResponseInner(element); - } - } - - protected void composeGuidanceResponseInner(GuidanceResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasRequestIdElement()) { - composeIdCore("requestId", element.getRequestIdElement(), false); - composeIdExtras("requestId", element.getRequestIdElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasModule()) { - composeReference("module", element.getModule()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrenceDateTimeElement()) { - composeDateTimeCore("occurrenceDateTime", element.getOccurrenceDateTimeElement(), false); - composeDateTimeExtras("occurrenceDateTime", element.getOccurrenceDateTimeElement(), false); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasEvaluationMessage()) { - openArray("evaluationMessage"); - for (Reference e : element.getEvaluationMessage()) - composeReference(null, e); - closeArray(); - }; - if (element.hasOutputParameters()) { - composeReference("outputParameters", element.getOutputParameters()); - } - if (element.hasResult()) { - composeReference("result", element.getResult()); - } - if (element.hasDataRequirement()) { - openArray("dataRequirement"); - for (DataRequirement e : element.getDataRequirement()) - composeDataRequirement(null, e); - closeArray(); - }; - } - - protected void composeHealthcareService(String name, HealthcareService element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeHealthcareServiceInner(element); - } - } - - protected void composeHealthcareServiceInner(HealthcareService element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasProvidedBy()) { - composeReference("providedBy", element.getProvidedBy()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialty()) { - openArray("specialty"); - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasLocation()) { - openArray("location"); - for (Reference e : element.getLocation()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasExtraDetailsElement()) { - composeStringCore("extraDetails", element.getExtraDetailsElement(), false); - composeStringExtras("extraDetails", element.getExtraDetailsElement(), false); - } - if (element.hasPhoto()) { - composeAttachment("photo", element.getPhoto()); - } - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasCoverageArea()) { - openArray("coverageArea"); - for (Reference e : element.getCoverageArea()) - composeReference(null, e); - closeArray(); - }; - if (element.hasServiceProvisionCode()) { - openArray("serviceProvisionCode"); - for (CodeableConcept e : element.getServiceProvisionCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasEligibility()) { - composeCodeableConcept("eligibility", element.getEligibility()); - } - if (element.hasEligibilityNoteElement()) { - composeStringCore("eligibilityNote", element.getEligibilityNoteElement(), false); - composeStringExtras("eligibilityNote", element.getEligibilityNoteElement(), false); - } - if (element.hasProgramName()) { - openArray("programName"); - for (StringType e : element.getProgramName()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getProgramName())) { - openArray("_programName"); - for (StringType e : element.getProgramName()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasCharacteristic()) { - openArray("characteristic"); - for (CodeableConcept e : element.getCharacteristic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReferralMethod()) { - openArray("referralMethod"); - for (CodeableConcept e : element.getReferralMethod()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasAppointmentRequiredElement()) { - composeBooleanCore("appointmentRequired", element.getAppointmentRequiredElement(), false); - composeBooleanExtras("appointmentRequired", element.getAppointmentRequiredElement(), false); - } - if (element.hasAvailableTime()) { - openArray("availableTime"); - for (HealthcareService.HealthcareServiceAvailableTimeComponent e : element.getAvailableTime()) - composeHealthcareServiceHealthcareServiceAvailableTimeComponent(null, e); - closeArray(); - }; - if (element.hasNotAvailable()) { - openArray("notAvailable"); - for (HealthcareService.HealthcareServiceNotAvailableComponent e : element.getNotAvailable()) - composeHealthcareServiceHealthcareServiceNotAvailableComponent(null, e); - closeArray(); - }; - if (element.hasAvailabilityExceptionsElement()) { - composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); - composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); - } - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(String name, HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { - if (element != null) { - open(name); - composeHealthcareServiceHealthcareServiceAvailableTimeComponentInner(element); - close(); - } - } - - protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponentInner(HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { - composeBackbone(element); - if (element.hasDaysOfWeek()) { - openArray("daysOfWeek"); - for (Enumeration e : element.getDaysOfWeek()) - composeEnumerationCore(null, e, new HealthcareService.DaysOfWeekEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getDaysOfWeek())) { - openArray("_daysOfWeek"); - for (Enumeration e : element.getDaysOfWeek()) - composeEnumerationExtras(null, e, new HealthcareService.DaysOfWeekEnumFactory(), true); - closeArray(); - } - }; - if (element.hasAllDayElement()) { - composeBooleanCore("allDay", element.getAllDayElement(), false); - composeBooleanExtras("allDay", element.getAllDayElement(), false); - } - if (element.hasAvailableStartTimeElement()) { - composeTimeCore("availableStartTime", element.getAvailableStartTimeElement(), false); - composeTimeExtras("availableStartTime", element.getAvailableStartTimeElement(), false); - } - if (element.hasAvailableEndTimeElement()) { - composeTimeCore("availableEndTime", element.getAvailableEndTimeElement(), false); - composeTimeExtras("availableEndTime", element.getAvailableEndTimeElement(), false); - } - } - - protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(String name, HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { - if (element != null) { - open(name); - composeHealthcareServiceHealthcareServiceNotAvailableComponentInner(element); - close(); - } - } - - protected void composeHealthcareServiceHealthcareServiceNotAvailableComponentInner(HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { - composeBackbone(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasDuring()) { - composePeriod("during", element.getDuring()); - } - } - - protected void composeImagingManifest(String name, ImagingManifest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeImagingManifestInner(element); - } - } - - protected void composeImagingManifestInner(ImagingManifest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasAuthoringTimeElement()) { - composeDateTimeCore("authoringTime", element.getAuthoringTimeElement(), false); - composeDateTimeExtras("authoringTime", element.getAuthoringTimeElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasStudy()) { - openArray("study"); - for (ImagingManifest.StudyComponent e : element.getStudy()) - composeImagingManifestStudyComponent(null, e); - closeArray(); - }; - } - - protected void composeImagingManifestStudyComponent(String name, ImagingManifest.StudyComponent element) throws IOException { - if (element != null) { - open(name); - composeImagingManifestStudyComponentInner(element); - close(); - } - } - - protected void composeImagingManifestStudyComponentInner(ImagingManifest.StudyComponent element) throws IOException { - composeBackbone(element); - if (element.hasUidElement()) { - composeOidCore("uid", element.getUidElement(), false); - composeOidExtras("uid", element.getUidElement(), false); - } - if (element.hasImagingStudy()) { - composeReference("imagingStudy", element.getImagingStudy()); - } - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSeries()) { - openArray("series"); - for (ImagingManifest.SeriesComponent e : element.getSeries()) - composeImagingManifestSeriesComponent(null, e); - closeArray(); - }; - } - - protected void composeImagingManifestSeriesComponent(String name, ImagingManifest.SeriesComponent element) throws IOException { - if (element != null) { - open(name); - composeImagingManifestSeriesComponentInner(element); - close(); - } - } - - protected void composeImagingManifestSeriesComponentInner(ImagingManifest.SeriesComponent element) throws IOException { - composeBackbone(element); - if (element.hasUidElement()) { - composeOidCore("uid", element.getUidElement(), false); - composeOidExtras("uid", element.getUidElement(), false); - } - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - if (element.hasInstance()) { - openArray("instance"); - for (ImagingManifest.InstanceComponent e : element.getInstance()) - composeImagingManifestInstanceComponent(null, e); - closeArray(); - }; - } - - protected void composeImagingManifestInstanceComponent(String name, ImagingManifest.InstanceComponent element) throws IOException { - if (element != null) { - open(name); - composeImagingManifestInstanceComponentInner(element); - close(); - } - } - - protected void composeImagingManifestInstanceComponentInner(ImagingManifest.InstanceComponent element) throws IOException { - composeBackbone(element); - if (element.hasSopClassElement()) { - composeOidCore("sopClass", element.getSopClassElement(), false); - composeOidExtras("sopClass", element.getSopClassElement(), false); - } - if (element.hasUidElement()) { - composeOidCore("uid", element.getUidElement(), false); - composeOidExtras("uid", element.getUidElement(), false); - } - if (element.hasFrameNumber()) { - openArray("frameNumber"); - for (UnsignedIntType e : element.getFrameNumber()) - composeUnsignedIntCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getFrameNumber())) { - openArray("_frameNumber"); - for (UnsignedIntType e : element.getFrameNumber()) - composeUnsignedIntExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeImagingStudy(String name, ImagingStudy element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeImagingStudyInner(element); - } - } - - protected void composeImagingStudyInner(ImagingStudy element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUidElement()) { - composeOidCore("uid", element.getUidElement(), false); - composeOidExtras("uid", element.getUidElement(), false); - } - if (element.hasAccession()) { - composeIdentifier("accession", element.getAccession()); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasAvailabilityElement()) { - composeEnumerationCore("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); - composeEnumerationExtras("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); - } - if (element.hasModalityList()) { - openArray("modalityList"); - for (Coding e : element.getModalityList()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasStartedElement()) { - composeDateTimeCore("started", element.getStartedElement(), false); - composeDateTimeExtras("started", element.getStartedElement(), false); - } - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReferrer()) { - composeReference("referrer", element.getReferrer()); - } - if (element.hasInterpreter()) { - openArray("interpreter"); - for (Reference e : element.getInterpreter()) - composeReference(null, e); - closeArray(); - }; - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNumberOfSeriesElement()) { - composeUnsignedIntCore("numberOfSeries", element.getNumberOfSeriesElement(), false); - composeUnsignedIntExtras("numberOfSeries", element.getNumberOfSeriesElement(), false); - } - if (element.hasNumberOfInstancesElement()) { - composeUnsignedIntCore("numberOfInstances", element.getNumberOfInstancesElement(), false); - composeUnsignedIntExtras("numberOfInstances", element.getNumberOfInstancesElement(), false); - } - if (element.hasProcedureReference()) { - openArray("procedureReference"); - for (Reference e : element.getProcedureReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasProcedureCode()) { - openArray("procedureCode"); - for (CodeableConcept e : element.getProcedureCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasSeries()) { - openArray("series"); - for (ImagingStudy.ImagingStudySeriesComponent e : element.getSeries()) - composeImagingStudyImagingStudySeriesComponent(null, e); - closeArray(); - }; - } - - protected void composeImagingStudyImagingStudySeriesComponent(String name, ImagingStudy.ImagingStudySeriesComponent element) throws IOException { - if (element != null) { - open(name); - composeImagingStudyImagingStudySeriesComponentInner(element); - close(); - } - } - - protected void composeImagingStudyImagingStudySeriesComponentInner(ImagingStudy.ImagingStudySeriesComponent element) throws IOException { - composeBackbone(element); - if (element.hasUidElement()) { - composeOidCore("uid", element.getUidElement(), false); - composeOidExtras("uid", element.getUidElement(), false); - } - if (element.hasNumberElement()) { - composeUnsignedIntCore("number", element.getNumberElement(), false); - composeUnsignedIntExtras("number", element.getNumberElement(), false); - } - if (element.hasModality()) { - composeCoding("modality", element.getModality()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasNumberOfInstancesElement()) { - composeUnsignedIntCore("numberOfInstances", element.getNumberOfInstancesElement(), false); - composeUnsignedIntExtras("numberOfInstances", element.getNumberOfInstancesElement(), false); - } - if (element.hasAvailabilityElement()) { - composeEnumerationCore("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); - composeEnumerationExtras("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); - } - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - composeCoding("bodySite", element.getBodySite()); - } - if (element.hasLaterality()) { - composeCoding("laterality", element.getLaterality()); - } - if (element.hasStartedElement()) { - composeDateTimeCore("started", element.getStartedElement(), false); - composeDateTimeExtras("started", element.getStartedElement(), false); - } - if (element.hasPerformer()) { - openArray("performer"); - for (Reference e : element.getPerformer()) - composeReference(null, e); - closeArray(); - }; - if (element.hasInstance()) { - openArray("instance"); - for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance()) - composeImagingStudyImagingStudySeriesInstanceComponent(null, e); - closeArray(); - }; - } - - protected void composeImagingStudyImagingStudySeriesInstanceComponent(String name, ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { - if (element != null) { - open(name); - composeImagingStudyImagingStudySeriesInstanceComponentInner(element); - close(); - } - } - - protected void composeImagingStudyImagingStudySeriesInstanceComponentInner(ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { - composeBackbone(element); - if (element.hasUidElement()) { - composeOidCore("uid", element.getUidElement(), false); - composeOidExtras("uid", element.getUidElement(), false); - } - if (element.hasNumberElement()) { - composeUnsignedIntCore("number", element.getNumberElement(), false); - composeUnsignedIntExtras("number", element.getNumberElement(), false); - } - if (element.hasSopClassElement()) { - composeOidCore("sopClass", element.getSopClassElement(), false); - composeOidExtras("sopClass", element.getSopClassElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - } - - protected void composeImmunization(String name, Immunization element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeImmunizationInner(element); - } - } - - protected void composeImmunizationInner(Immunization element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory(), false); - } - if (element.hasNotGivenElement()) { - composeBooleanCore("notGiven", element.getNotGivenElement(), false); - composeBooleanExtras("notGiven", element.getNotGivenElement(), false); - } - if (element.hasVaccineCode()) { - composeCodeableConcept("vaccineCode", element.getVaccineCode()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPrimarySourceElement()) { - composeBooleanCore("primarySource", element.getPrimarySourceElement(), false); - composeBooleanExtras("primarySource", element.getPrimarySourceElement(), false); - } - if (element.hasReportOrigin()) { - composeCodeableConcept("reportOrigin", element.getReportOrigin()); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasManufacturer()) { - composeReference("manufacturer", element.getManufacturer()); - } - if (element.hasLotNumberElement()) { - composeStringCore("lotNumber", element.getLotNumberElement(), false); - composeStringExtras("lotNumber", element.getLotNumberElement(), false); - } - if (element.hasExpirationDateElement()) { - composeDateCore("expirationDate", element.getExpirationDateElement(), false); - composeDateExtras("expirationDate", element.getExpirationDateElement(), false); - } - if (element.hasSite()) { - composeCodeableConcept("site", element.getSite()); - } - if (element.hasRoute()) { - composeCodeableConcept("route", element.getRoute()); - } - if (element.hasDoseQuantity()) { - composeSimpleQuantity("doseQuantity", element.getDoseQuantity()); - } - if (element.hasPractitioner()) { - openArray("practitioner"); - for (Immunization.ImmunizationPractitionerComponent e : element.getPractitioner()) - composeImmunizationImmunizationPractitionerComponent(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasExplanation()) { - composeImmunizationImmunizationExplanationComponent("explanation", element.getExplanation()); - } - if (element.hasReaction()) { - openArray("reaction"); - for (Immunization.ImmunizationReactionComponent e : element.getReaction()) - composeImmunizationImmunizationReactionComponent(null, e); - closeArray(); - }; - if (element.hasVaccinationProtocol()) { - openArray("vaccinationProtocol"); - for (Immunization.ImmunizationVaccinationProtocolComponent e : element.getVaccinationProtocol()) - composeImmunizationImmunizationVaccinationProtocolComponent(null, e); - closeArray(); - }; - } - - protected void composeImmunizationImmunizationPractitionerComponent(String name, Immunization.ImmunizationPractitionerComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationImmunizationPractitionerComponentInner(element); - close(); - } - } - - protected void composeImmunizationImmunizationPractitionerComponentInner(Immunization.ImmunizationPractitionerComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - } - - protected void composeImmunizationImmunizationExplanationComponent(String name, Immunization.ImmunizationExplanationComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationImmunizationExplanationComponentInner(element); - close(); - } - } - - protected void composeImmunizationImmunizationExplanationComponentInner(Immunization.ImmunizationExplanationComponent element) throws IOException { - composeBackbone(element); - if (element.hasReason()) { - openArray("reason"); - for (CodeableConcept e : element.getReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonNotGiven()) { - openArray("reasonNotGiven"); - for (CodeableConcept e : element.getReasonNotGiven()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composeImmunizationImmunizationReactionComponent(String name, Immunization.ImmunizationReactionComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationImmunizationReactionComponentInner(element); - close(); - } - } - - protected void composeImmunizationImmunizationReactionComponentInner(Immunization.ImmunizationReactionComponent element) throws IOException { - composeBackbone(element); - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasDetail()) { - composeReference("detail", element.getDetail()); - } - if (element.hasReportedElement()) { - composeBooleanCore("reported", element.getReportedElement(), false); - composeBooleanExtras("reported", element.getReportedElement(), false); - } - } - - protected void composeImmunizationImmunizationVaccinationProtocolComponent(String name, Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationImmunizationVaccinationProtocolComponentInner(element); - close(); - } - } - - protected void composeImmunizationImmunizationVaccinationProtocolComponentInner(Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { - composeBackbone(element); - if (element.hasDoseSequenceElement()) { - composePositiveIntCore("doseSequence", element.getDoseSequenceElement(), false); - composePositiveIntExtras("doseSequence", element.getDoseSequenceElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasAuthority()) { - composeReference("authority", element.getAuthority()); - } - if (element.hasSeriesElement()) { - composeStringCore("series", element.getSeriesElement(), false); - composeStringExtras("series", element.getSeriesElement(), false); - } - if (element.hasSeriesDosesElement()) { - composePositiveIntCore("seriesDoses", element.getSeriesDosesElement(), false); - composePositiveIntExtras("seriesDoses", element.getSeriesDosesElement(), false); - } - if (element.hasTargetDisease()) { - openArray("targetDisease"); - for (CodeableConcept e : element.getTargetDisease()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDoseStatus()) { - composeCodeableConcept("doseStatus", element.getDoseStatus()); - } - if (element.hasDoseStatusReason()) { - composeCodeableConcept("doseStatusReason", element.getDoseStatusReason()); - } - } - - protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeImmunizationRecommendationInner(element); - } - } - - protected void composeImmunizationRecommendationInner(ImmunizationRecommendation element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasRecommendation()) { - openArray("recommendation"); - for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent e : element.getRecommendation()) - composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(null, e); - closeArray(); - }; - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(element); - close(); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { - composeBackbone(element); - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasVaccineCode()) { - composeCodeableConcept("vaccineCode", element.getVaccineCode()); - } - if (element.hasTargetDisease()) { - composeCodeableConcept("targetDisease", element.getTargetDisease()); - } - if (element.hasDoseNumberElement()) { - composePositiveIntCore("doseNumber", element.getDoseNumberElement(), false); - composePositiveIntExtras("doseNumber", element.getDoseNumberElement(), false); - } - if (element.hasForecastStatus()) { - composeCodeableConcept("forecastStatus", element.getForecastStatus()); - } - if (element.hasDateCriterion()) { - openArray("dateCriterion"); - for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element.getDateCriterion()) - composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(null, e); - closeArray(); - }; - if (element.hasProtocol()) { - composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent("protocol", element.getProtocol()); - } - if (element.hasSupportingImmunization()) { - openArray("supportingImmunization"); - for (Reference e : element.getSupportingImmunization()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSupportingPatientInformation()) { - openArray("supportingPatientInformation"); - for (Reference e : element.getSupportingPatientInformation()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentInner(element); - close(); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasValueElement()) { - composeDateTimeCore("value", element.getValueElement(), false); - composeDateTimeExtras("value", element.getValueElement(), false); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { - if (element != null) { - open(name); - composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentInner(element); - close(); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { - composeBackbone(element); - if (element.hasDoseSequenceElement()) { - composePositiveIntCore("doseSequence", element.getDoseSequenceElement(), false); - composePositiveIntExtras("doseSequence", element.getDoseSequenceElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasAuthority()) { - composeReference("authority", element.getAuthority()); - } - if (element.hasSeriesElement()) { - composeStringCore("series", element.getSeriesElement(), false); - composeStringExtras("series", element.getSeriesElement(), false); - } - } - - protected void composeImplementationGuide(String name, ImplementationGuide element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeImplementationGuideInner(element); - } - } - - protected void composeImplementationGuideInner(ImplementationGuide element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasFhirVersionElement()) { - composeIdCore("fhirVersion", element.getFhirVersionElement(), false); - composeIdExtras("fhirVersion", element.getFhirVersionElement(), false); - } - if (element.hasDependency()) { - openArray("dependency"); - for (ImplementationGuide.ImplementationGuideDependencyComponent e : element.getDependency()) - composeImplementationGuideImplementationGuideDependencyComponent(null, e); - closeArray(); - }; - if (element.hasPackage()) { - openArray("package"); - for (ImplementationGuide.ImplementationGuidePackageComponent e : element.getPackage()) - composeImplementationGuideImplementationGuidePackageComponent(null, e); - closeArray(); - }; - if (element.hasGlobal()) { - openArray("global"); - for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal()) - composeImplementationGuideImplementationGuideGlobalComponent(null, e); - closeArray(); - }; - if (element.hasBinary()) { - openArray("binary"); - for (UriType e : element.getBinary()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getBinary())) { - openArray("_binary"); - for (UriType e : element.getBinary()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasPage()) { - composeImplementationGuideImplementationGuidePageComponent("page", element.getPage()); - } - } - - protected void composeImplementationGuideImplementationGuideDependencyComponent(String name, ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { - if (element != null) { - open(name); - composeImplementationGuideImplementationGuideDependencyComponentInner(element); - close(); - } - } - - protected void composeImplementationGuideImplementationGuideDependencyComponentInner(ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new ImplementationGuide.GuideDependencyTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new ImplementationGuide.GuideDependencyTypeEnumFactory(), false); - } - if (element.hasUriElement()) { - composeUriCore("uri", element.getUriElement(), false); - composeUriExtras("uri", element.getUriElement(), false); - } - } - - protected void composeImplementationGuideImplementationGuidePackageComponent(String name, ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { - if (element != null) { - open(name); - composeImplementationGuideImplementationGuidePackageComponentInner(element); - close(); - } - } - - protected void composeImplementationGuideImplementationGuidePackageComponentInner(ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasResource()) { - openArray("resource"); - for (ImplementationGuide.ImplementationGuidePackageResourceComponent e : element.getResource()) - composeImplementationGuideImplementationGuidePackageResourceComponent(null, e); - closeArray(); - }; - } - - protected void composeImplementationGuideImplementationGuidePackageResourceComponent(String name, ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { - if (element != null) { - open(name); - composeImplementationGuideImplementationGuidePackageResourceComponentInner(element); - close(); - } - } - - protected void composeImplementationGuideImplementationGuidePackageResourceComponentInner(ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { - composeBackbone(element); - if (element.hasExampleElement()) { - composeBooleanCore("example", element.getExampleElement(), false); - composeBooleanExtras("example", element.getExampleElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasAcronymElement()) { - composeStringCore("acronym", element.getAcronymElement(), false); - composeStringExtras("acronym", element.getAcronymElement(), false); - } - if (element.hasSource()) { - composeType("source", element.getSource()); - } - if (element.hasExampleFor()) { - composeReference("exampleFor", element.getExampleFor()); - } - } - - protected void composeImplementationGuideImplementationGuideGlobalComponent(String name, ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { - if (element != null) { - open(name); - composeImplementationGuideImplementationGuideGlobalComponentInner(element); - close(); - } - } - - protected void composeImplementationGuideImplementationGuideGlobalComponentInner(ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - } - - protected void composeImplementationGuideImplementationGuidePageComponent(String name, ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { - if (element != null) { - open(name); - composeImplementationGuideImplementationGuidePageComponentInner(element); - close(); - } - } - - protected void composeImplementationGuideImplementationGuidePageComponentInner(ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { - composeBackbone(element); - if (element.hasSourceElement()) { - composeUriCore("source", element.getSourceElement(), false); - composeUriExtras("source", element.getSourceElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new ImplementationGuide.GuidePageKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new ImplementationGuide.GuidePageKindEnumFactory(), false); - } - if (element.hasType()) { - openArray("type"); - for (CodeType e : element.getType()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getType())) { - openArray("_type"); - for (CodeType e : element.getType()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasPackage()) { - openArray("package"); - for (StringType e : element.getPackage()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPackage())) { - openArray("_package"); - for (StringType e : element.getPackage()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasFormatElement()) { - composeCodeCore("format", element.getFormatElement(), false); - composeCodeExtras("format", element.getFormatElement(), false); - } - if (element.hasPage()) { - openArray("page"); - for (ImplementationGuide.ImplementationGuidePageComponent e : element.getPage()) - composeImplementationGuideImplementationGuidePageComponent(null, e); - closeArray(); - }; - } - - protected void composeLibrary(String name, Library element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeLibraryInner(element); - } - } - - protected void composeLibraryInner(Library element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContributor()) { - openArray("contributor"); - for (Contributor e : element.getContributor()) - composeContributor(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasParameter()) { - openArray("parameter"); - for (ParameterDefinition e : element.getParameter()) - composeParameterDefinition(null, e); - closeArray(); - }; - if (element.hasDataRequirement()) { - openArray("dataRequirement"); - for (DataRequirement e : element.getDataRequirement()) - composeDataRequirement(null, e); - closeArray(); - }; - if (element.hasContent()) { - openArray("content"); - for (Attachment e : element.getContent()) - composeAttachment(null, e); - closeArray(); - }; - } - - protected void composeLinkage(String name, Linkage element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeLinkageInner(element); - } - } - - protected void composeLinkageInner(Linkage element) throws IOException { - composeDomainResourceElements(element); - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasItem()) { - openArray("item"); - for (Linkage.LinkageItemComponent e : element.getItem()) - composeLinkageLinkageItemComponent(null, e); - closeArray(); - }; - } - - protected void composeLinkageLinkageItemComponent(String name, Linkage.LinkageItemComponent element) throws IOException { - if (element != null) { - open(name); - composeLinkageLinkageItemComponentInner(element); - close(); - } - } - - protected void composeLinkageLinkageItemComponentInner(Linkage.LinkageItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory(), false); - } - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - } - - protected void composeListResource(String name, ListResource element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeListResourceInner(element); - } - } - - protected void composeListResourceInner(ListResource element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory(), false); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new ListResource.ListModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new ListResource.ListModeEnumFactory(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasOrderedBy()) { - composeCodeableConcept("orderedBy", element.getOrderedBy()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasEntry()) { - openArray("entry"); - for (ListResource.ListEntryComponent e : element.getEntry()) - composeListResourceListEntryComponent(null, e); - closeArray(); - }; - if (element.hasEmptyReason()) { - composeCodeableConcept("emptyReason", element.getEmptyReason()); - } - } - - protected void composeListResourceListEntryComponent(String name, ListResource.ListEntryComponent element) throws IOException { - if (element != null) { - open(name); - composeListResourceListEntryComponentInner(element); - close(); - } - } - - protected void composeListResourceListEntryComponentInner(ListResource.ListEntryComponent element) throws IOException { - composeBackbone(element); - if (element.hasFlag()) { - composeCodeableConcept("flag", element.getFlag()); - } - if (element.hasDeletedElement()) { - composeBooleanCore("deleted", element.getDeletedElement(), false); - composeBooleanExtras("deleted", element.getDeletedElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasItem()) { - composeReference("item", element.getItem()); - } - } - - protected void composeLocation(String name, Location element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeLocationInner(element); - } - } - - protected void composeLocationInner(Location element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Location.LocationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Location.LocationStatusEnumFactory(), false); - } - if (element.hasOperationalStatus()) { - composeCoding("operationalStatus", element.getOperationalStatus()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasAlias()) { - openArray("alias"); - for (StringType e : element.getAlias()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getAlias())) { - openArray("_alias"); - for (StringType e : element.getAlias()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new Location.LocationModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new Location.LocationModeEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasAddress()) { - composeAddress("address", element.getAddress()); - } - if (element.hasPhysicalType()) { - composeCodeableConcept("physicalType", element.getPhysicalType()); - } - if (element.hasPosition()) { - composeLocationLocationPositionComponent("position", element.getPosition()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasPartOf()) { - composeReference("partOf", element.getPartOf()); - } - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeLocationLocationPositionComponent(String name, Location.LocationPositionComponent element) throws IOException { - if (element != null) { - open(name); - composeLocationLocationPositionComponentInner(element); - close(); - } - } - - protected void composeLocationLocationPositionComponentInner(Location.LocationPositionComponent element) throws IOException { - composeBackbone(element); - if (element.hasLongitudeElement()) { - composeDecimalCore("longitude", element.getLongitudeElement(), false); - composeDecimalExtras("longitude", element.getLongitudeElement(), false); - } - if (element.hasLatitudeElement()) { - composeDecimalCore("latitude", element.getLatitudeElement(), false); - composeDecimalExtras("latitude", element.getLatitudeElement(), false); - } - if (element.hasAltitudeElement()) { - composeDecimalCore("altitude", element.getAltitudeElement(), false); - composeDecimalExtras("altitude", element.getAltitudeElement(), false); - } - } - - protected void composeMeasure(String name, Measure element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMeasureInner(element); - } - } - - protected void composeMeasureInner(Measure element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContributor()) { - openArray("contributor"); - for (Contributor e : element.getContributor()) - composeContributor(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasLibrary()) { - openArray("library"); - for (Reference e : element.getLibrary()) - composeReference(null, e); - closeArray(); - }; - if (element.hasDisclaimerElement()) { - composeMarkdownCore("disclaimer", element.getDisclaimerElement(), false); - composeMarkdownExtras("disclaimer", element.getDisclaimerElement(), false); - } - if (element.hasScoring()) { - composeCodeableConcept("scoring", element.getScoring()); - } - if (element.hasCompositeScoring()) { - composeCodeableConcept("compositeScoring", element.getCompositeScoring()); - } - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasRiskAdjustmentElement()) { - composeStringCore("riskAdjustment", element.getRiskAdjustmentElement(), false); - composeStringExtras("riskAdjustment", element.getRiskAdjustmentElement(), false); - } - if (element.hasRateAggregationElement()) { - composeStringCore("rateAggregation", element.getRateAggregationElement(), false); - composeStringExtras("rateAggregation", element.getRateAggregationElement(), false); - } - if (element.hasRationaleElement()) { - composeMarkdownCore("rationale", element.getRationaleElement(), false); - composeMarkdownExtras("rationale", element.getRationaleElement(), false); - } - if (element.hasClinicalRecommendationStatementElement()) { - composeMarkdownCore("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), false); - composeMarkdownExtras("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), false); - } - if (element.hasImprovementNotationElement()) { - composeStringCore("improvementNotation", element.getImprovementNotationElement(), false); - composeStringExtras("improvementNotation", element.getImprovementNotationElement(), false); - } - if (element.hasDefinition()) { - openArray("definition"); - for (MarkdownType e : element.getDefinition()) - composeMarkdownCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getDefinition())) { - openArray("_definition"); - for (MarkdownType e : element.getDefinition()) - composeMarkdownExtras(null, e, true); - closeArray(); - } - }; - if (element.hasGuidanceElement()) { - composeMarkdownCore("guidance", element.getGuidanceElement(), false); - composeMarkdownExtras("guidance", element.getGuidanceElement(), false); - } - if (element.hasSetElement()) { - composeStringCore("set", element.getSetElement(), false); - composeStringExtras("set", element.getSetElement(), false); - } - if (element.hasGroup()) { - openArray("group"); - for (Measure.MeasureGroupComponent e : element.getGroup()) - composeMeasureMeasureGroupComponent(null, e); - closeArray(); - }; - if (element.hasSupplementalData()) { - openArray("supplementalData"); - for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData()) - composeMeasureMeasureSupplementalDataComponent(null, e); - closeArray(); - }; - } - - protected void composeMeasureMeasureGroupComponent(String name, Measure.MeasureGroupComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureMeasureGroupComponentInner(element); - close(); - } - } - - protected void composeMeasureMeasureGroupComponentInner(Measure.MeasureGroupComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPopulation()) { - openArray("population"); - for (Measure.MeasureGroupPopulationComponent e : element.getPopulation()) - composeMeasureMeasureGroupPopulationComponent(null, e); - closeArray(); - }; - if (element.hasStratifier()) { - openArray("stratifier"); - for (Measure.MeasureGroupStratifierComponent e : element.getStratifier()) - composeMeasureMeasureGroupStratifierComponent(null, e); - closeArray(); - }; - } - - protected void composeMeasureMeasureGroupPopulationComponent(String name, Measure.MeasureGroupPopulationComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureMeasureGroupPopulationComponentInner(element); - close(); - } - } - - protected void composeMeasureMeasureGroupPopulationComponentInner(Measure.MeasureGroupPopulationComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasCriteriaElement()) { - composeStringCore("criteria", element.getCriteriaElement(), false); - composeStringExtras("criteria", element.getCriteriaElement(), false); - } - } - - protected void composeMeasureMeasureGroupStratifierComponent(String name, Measure.MeasureGroupStratifierComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureMeasureGroupStratifierComponentInner(element); - close(); - } - } - - protected void composeMeasureMeasureGroupStratifierComponentInner(Measure.MeasureGroupStratifierComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCriteriaElement()) { - composeStringCore("criteria", element.getCriteriaElement(), false); - composeStringExtras("criteria", element.getCriteriaElement(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - } - - protected void composeMeasureMeasureSupplementalDataComponent(String name, Measure.MeasureSupplementalDataComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureMeasureSupplementalDataComponentInner(element); - close(); - } - } - - protected void composeMeasureMeasureSupplementalDataComponentInner(Measure.MeasureSupplementalDataComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasUsage()) { - openArray("usage"); - for (CodeableConcept e : element.getUsage()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCriteriaElement()) { - composeStringCore("criteria", element.getCriteriaElement(), false); - composeStringExtras("criteria", element.getCriteriaElement(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - } - - protected void composeMeasureReport(String name, MeasureReport element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMeasureReportInner(element); - } - } - - protected void composeMeasureReportInner(MeasureReport element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory(), false); - } - if (element.hasMeasure()) { - composeReference("measure", element.getMeasure()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasReportingOrganization()) { - composeReference("reportingOrganization", element.getReportingOrganization()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasGroup()) { - openArray("group"); - for (MeasureReport.MeasureReportGroupComponent e : element.getGroup()) - composeMeasureReportMeasureReportGroupComponent(null, e); - closeArray(); - }; - if (element.hasEvaluatedResources()) { - composeReference("evaluatedResources", element.getEvaluatedResources()); - } - } - - protected void composeMeasureReportMeasureReportGroupComponent(String name, MeasureReport.MeasureReportGroupComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureReportMeasureReportGroupComponentInner(element); - close(); - } - } - - protected void composeMeasureReportMeasureReportGroupComponentInner(MeasureReport.MeasureReportGroupComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasPopulation()) { - openArray("population"); - for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation()) - composeMeasureReportMeasureReportGroupPopulationComponent(null, e); - closeArray(); - }; - if (element.hasMeasureScoreElement()) { - composeDecimalCore("measureScore", element.getMeasureScoreElement(), false); - composeDecimalExtras("measureScore", element.getMeasureScoreElement(), false); - } - if (element.hasStratifier()) { - openArray("stratifier"); - for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier()) - composeMeasureReportMeasureReportGroupStratifierComponent(null, e); - closeArray(); - }; - } - - protected void composeMeasureReportMeasureReportGroupPopulationComponent(String name, MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureReportMeasureReportGroupPopulationComponentInner(element); - close(); - } - } - - protected void composeMeasureReportMeasureReportGroupPopulationComponentInner(MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasCountElement()) { - composeIntegerCore("count", element.getCountElement(), false); - composeIntegerExtras("count", element.getCountElement(), false); - } - if (element.hasPatients()) { - composeReference("patients", element.getPatients()); - } - } - - protected void composeMeasureReportMeasureReportGroupStratifierComponent(String name, MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureReportMeasureReportGroupStratifierComponentInner(element); - close(); - } - } - - protected void composeMeasureReportMeasureReportGroupStratifierComponentInner(MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStratum()) { - openArray("stratum"); - for (MeasureReport.StratifierGroupComponent e : element.getStratum()) - composeMeasureReportStratifierGroupComponent(null, e); - closeArray(); - }; - } - - protected void composeMeasureReportStratifierGroupComponent(String name, MeasureReport.StratifierGroupComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureReportStratifierGroupComponentInner(element); - close(); - } - } - - protected void composeMeasureReportStratifierGroupComponentInner(MeasureReport.StratifierGroupComponent element) throws IOException { - composeBackbone(element); - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - if (element.hasPopulation()) { - openArray("population"); - for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation()) - composeMeasureReportStratifierGroupPopulationComponent(null, e); - closeArray(); - }; - if (element.hasMeasureScoreElement()) { - composeDecimalCore("measureScore", element.getMeasureScoreElement(), false); - composeDecimalExtras("measureScore", element.getMeasureScoreElement(), false); - } - } - - protected void composeMeasureReportStratifierGroupPopulationComponent(String name, MeasureReport.StratifierGroupPopulationComponent element) throws IOException { - if (element != null) { - open(name); - composeMeasureReportStratifierGroupPopulationComponentInner(element); - close(); - } - } - - protected void composeMeasureReportStratifierGroupPopulationComponentInner(MeasureReport.StratifierGroupPopulationComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasCountElement()) { - composeIntegerCore("count", element.getCountElement(), false); - composeIntegerExtras("count", element.getCountElement(), false); - } - if (element.hasPatients()) { - composeReference("patients", element.getPatients()); - } - } - - protected void composeMedia(String name, Media element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMediaInner(element); - } - } - - protected void composeMediaInner(Media element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Media.DigitalMediaTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Media.DigitalMediaTypeEnumFactory(), false); - } - if (element.hasSubtype()) { - composeCodeableConcept("subtype", element.getSubtype()); - } - if (element.hasView()) { - composeCodeableConcept("view", element.getView()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasOperator()) { - composeReference("operator", element.getOperator()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasHeightElement()) { - composePositiveIntCore("height", element.getHeightElement(), false); - composePositiveIntExtras("height", element.getHeightElement(), false); - } - if (element.hasWidthElement()) { - composePositiveIntCore("width", element.getWidthElement(), false); - composePositiveIntExtras("width", element.getWidthElement(), false); - } - if (element.hasFramesElement()) { - composePositiveIntCore("frames", element.getFramesElement(), false); - composePositiveIntExtras("frames", element.getFramesElement(), false); - } - if (element.hasDurationElement()) { - composeUnsignedIntCore("duration", element.getDurationElement(), false); - composeUnsignedIntExtras("duration", element.getDurationElement(), false); - } - if (element.hasContent()) { - composeAttachment("content", element.getContent()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeMedication(String name, Medication element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMedicationInner(element); - } - } - - protected void composeMedicationInner(Medication element) throws IOException { - composeDomainResourceElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory(), false); - } - if (element.hasIsBrandElement()) { - composeBooleanCore("isBrand", element.getIsBrandElement(), false); - composeBooleanExtras("isBrand", element.getIsBrandElement(), false); - } - if (element.hasIsOverTheCounterElement()) { - composeBooleanCore("isOverTheCounter", element.getIsOverTheCounterElement(), false); - composeBooleanExtras("isOverTheCounter", element.getIsOverTheCounterElement(), false); - } - if (element.hasManufacturer()) { - composeReference("manufacturer", element.getManufacturer()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasIngredient()) { - openArray("ingredient"); - for (Medication.MedicationIngredientComponent e : element.getIngredient()) - composeMedicationMedicationIngredientComponent(null, e); - closeArray(); - }; - if (element.hasPackage()) { - composeMedicationMedicationPackageComponent("package", element.getPackage()); - } - if (element.hasImage()) { - openArray("image"); - for (Attachment e : element.getImage()) - composeAttachment(null, e); - closeArray(); - }; - } - - protected void composeMedicationMedicationIngredientComponent(String name, Medication.MedicationIngredientComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationMedicationIngredientComponentInner(element); - close(); - } - } - - protected void composeMedicationMedicationIngredientComponentInner(Medication.MedicationIngredientComponent element) throws IOException { - composeBackbone(element); - if (element.hasItem()) { - composeType("item", element.getItem()); - } - if (element.hasIsActiveElement()) { - composeBooleanCore("isActive", element.getIsActiveElement(), false); - composeBooleanExtras("isActive", element.getIsActiveElement(), false); - } - if (element.hasAmount()) { - composeRatio("amount", element.getAmount()); - } - } - - protected void composeMedicationMedicationPackageComponent(String name, Medication.MedicationPackageComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationMedicationPackageComponentInner(element); - close(); - } - } - - protected void composeMedicationMedicationPackageComponentInner(Medication.MedicationPackageComponent element) throws IOException { - composeBackbone(element); - if (element.hasContainer()) { - composeCodeableConcept("container", element.getContainer()); - } - if (element.hasContent()) { - openArray("content"); - for (Medication.MedicationPackageContentComponent e : element.getContent()) - composeMedicationMedicationPackageContentComponent(null, e); - closeArray(); - }; - if (element.hasBatch()) { - openArray("batch"); - for (Medication.MedicationPackageBatchComponent e : element.getBatch()) - composeMedicationMedicationPackageBatchComponent(null, e); - closeArray(); - }; - } - - protected void composeMedicationMedicationPackageContentComponent(String name, Medication.MedicationPackageContentComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationMedicationPackageContentComponentInner(element); - close(); - } - } - - protected void composeMedicationMedicationPackageContentComponentInner(Medication.MedicationPackageContentComponent element) throws IOException { - composeBackbone(element); - if (element.hasItem()) { - composeType("item", element.getItem()); - } - if (element.hasAmount()) { - composeSimpleQuantity("amount", element.getAmount()); - } - } - - protected void composeMedicationMedicationPackageBatchComponent(String name, Medication.MedicationPackageBatchComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationMedicationPackageBatchComponentInner(element); - close(); - } - } - - protected void composeMedicationMedicationPackageBatchComponentInner(Medication.MedicationPackageBatchComponent element) throws IOException { - composeBackbone(element); - if (element.hasLotNumberElement()) { - composeStringCore("lotNumber", element.getLotNumberElement(), false); - composeStringExtras("lotNumber", element.getLotNumberElement(), false); - } - if (element.hasExpirationDateElement()) { - composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false); - composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false); - } - } - - protected void composeMedicationAdministration(String name, MedicationAdministration element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMedicationAdministrationInner(element); - } - } - - protected void composeMedicationAdministrationInner(MedicationAdministration element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSupportingInformation()) { - openArray("supportingInformation"); - for (Reference e : element.getSupportingInformation()) - composeReference(null, e); - closeArray(); - }; - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } - if (element.hasPerformer()) { - openArray("performer"); - for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer()) - composeMedicationAdministrationMedicationAdministrationPerformerComponent(null, e); - closeArray(); - }; - if (element.hasNotGivenElement()) { - composeBooleanCore("notGiven", element.getNotGivenElement(), false); - composeBooleanExtras("notGiven", element.getNotGivenElement(), false); - } - if (element.hasReasonNotGiven()) { - openArray("reasonNotGiven"); - for (CodeableConcept e : element.getReasonNotGiven()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasDevice()) { - openArray("device"); - for (Reference e : element.getDevice()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasDosage()) { - composeMedicationAdministrationMedicationAdministrationDosageComponent("dosage", element.getDosage()); - } - if (element.hasEventHistory()) { - openArray("eventHistory"); - for (Reference e : element.getEventHistory()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(String name, MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationAdministrationMedicationAdministrationPerformerComponentInner(element); - close(); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationPerformerComponentInner(MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { - composeBackbone(element); - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(String name, MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationAdministrationMedicationAdministrationDosageComponentInner(element); - close(); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationDosageComponentInner(MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { - composeBackbone(element); - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasSite()) { - composeCodeableConcept("site", element.getSite()); - } - if (element.hasRoute()) { - composeCodeableConcept("route", element.getRoute()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasDose()) { - composeSimpleQuantity("dose", element.getDose()); - } - if (element.hasRate()) { - composeType("rate", element.getRate()); - } - } - - protected void composeMedicationDispense(String name, MedicationDispense element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMedicationDispenseInner(element); - } - } - - protected void composeMedicationDispenseInner(MedicationDispense element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSupportingInformation()) { - openArray("supportingInformation"); - for (Reference e : element.getSupportingInformation()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPerformer()) { - openArray("performer"); - for (MedicationDispense.MedicationDispensePerformerComponent e : element.getPerformer()) - composeMedicationDispenseMedicationDispensePerformerComponent(null, e); - closeArray(); - }; - if (element.hasAuthorizingPrescription()) { - openArray("authorizingPrescription"); - for (Reference e : element.getAuthorizingPrescription()) - composeReference(null, e); - closeArray(); - }; - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasDaysSupply()) { - composeSimpleQuantity("daysSupply", element.getDaysSupply()); - } - if (element.hasWhenPreparedElement()) { - composeDateTimeCore("whenPrepared", element.getWhenPreparedElement(), false); - composeDateTimeExtras("whenPrepared", element.getWhenPreparedElement(), false); - } - if (element.hasWhenHandedOverElement()) { - composeDateTimeCore("whenHandedOver", element.getWhenHandedOverElement(), false); - composeDateTimeExtras("whenHandedOver", element.getWhenHandedOverElement(), false); - } - if (element.hasDestination()) { - composeReference("destination", element.getDestination()); - } - if (element.hasReceiver()) { - openArray("receiver"); - for (Reference e : element.getReceiver()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasDosageInstruction()) { - openArray("dosageInstruction"); - for (Dosage e : element.getDosageInstruction()) - composeDosage(null, e); - closeArray(); - }; - if (element.hasSubstitution()) { - composeMedicationDispenseMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution()); - } - if (element.hasDetectedIssue()) { - openArray("detectedIssue"); - for (Reference e : element.getDetectedIssue()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNotDoneElement()) { - composeBooleanCore("notDone", element.getNotDoneElement(), false); - composeBooleanExtras("notDone", element.getNotDoneElement(), false); - } - if (element.hasNotDoneReason()) { - composeType("notDoneReason", element.getNotDoneReason()); - } - if (element.hasEventHistory()) { - openArray("eventHistory"); - for (Reference e : element.getEventHistory()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeMedicationDispenseMedicationDispensePerformerComponent(String name, MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationDispenseMedicationDispensePerformerComponentInner(element); - close(); - } - } - - protected void composeMedicationDispenseMedicationDispensePerformerComponentInner(MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { - composeBackbone(element); - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(String name, MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationDispenseMedicationDispenseSubstitutionComponentInner(element); - close(); - } - } - - protected void composeMedicationDispenseMedicationDispenseSubstitutionComponentInner(MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { - composeBackbone(element); - if (element.hasWasSubstitutedElement()) { - composeBooleanCore("wasSubstituted", element.getWasSubstitutedElement(), false); - composeBooleanExtras("wasSubstituted", element.getWasSubstitutedElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasReason()) { - openArray("reason"); - for (CodeableConcept e : element.getReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasResponsibleParty()) { - openArray("responsibleParty"); - for (Reference e : element.getResponsibleParty()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMedicationRequestInner(element); - } - } - - protected void composeMedicationRequestInner(MedicationRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new MedicationRequest.MedicationRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new MedicationRequest.MedicationRequestStatusEnumFactory(), false); - } - if (element.hasIntentElement()) { - composeEnumerationCore("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory(), false); - composeEnumerationExtras("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new MedicationRequest.MedicationRequestPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new MedicationRequest.MedicationRequestPriorityEnumFactory(), false); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSupportingInformation()) { - openArray("supportingInformation"); - for (Reference e : element.getSupportingInformation()) - composeReference(null, e); - closeArray(); - }; - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasRequester()) { - composeMedicationRequestMedicationRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasRecorder()) { - composeReference("recorder", element.getRecorder()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasDosageInstruction()) { - openArray("dosageInstruction"); - for (Dosage e : element.getDosageInstruction()) - composeDosage(null, e); - closeArray(); - }; - if (element.hasDispenseRequest()) { - composeMedicationRequestMedicationRequestDispenseRequestComponent("dispenseRequest", element.getDispenseRequest()); - } - if (element.hasSubstitution()) { - composeMedicationRequestMedicationRequestSubstitutionComponent("substitution", element.getSubstitution()); - } - if (element.hasPriorPrescription()) { - composeReference("priorPrescription", element.getPriorPrescription()); - } - if (element.hasDetectedIssue()) { - openArray("detectedIssue"); - for (Reference e : element.getDetectedIssue()) - composeReference(null, e); - closeArray(); - }; - if (element.hasEventHistory()) { - openArray("eventHistory"); - for (Reference e : element.getEventHistory()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeMedicationRequestMedicationRequestRequesterComponent(String name, MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationRequestMedicationRequestRequesterComponentInner(element); - close(); - } - } - - protected void composeMedicationRequestMedicationRequestRequesterComponentInner(MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(String name, MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationRequestMedicationRequestDispenseRequestComponentInner(element); - close(); - } - } - - protected void composeMedicationRequestMedicationRequestDispenseRequestComponentInner(MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { - composeBackbone(element); - if (element.hasValidityPeriod()) { - composePeriod("validityPeriod", element.getValidityPeriod()); - } - if (element.hasNumberOfRepeatsAllowedElement()) { - composeUnsignedIntCore("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), false); - composeUnsignedIntExtras("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), false); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasExpectedSupplyDuration()) { - composeDuration("expectedSupplyDuration", element.getExpectedSupplyDuration()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - } - - protected void composeMedicationRequestMedicationRequestSubstitutionComponent(String name, MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { - if (element != null) { - open(name); - composeMedicationRequestMedicationRequestSubstitutionComponentInner(element); - close(); - } - } - - protected void composeMedicationRequestMedicationRequestSubstitutionComponentInner(MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { - composeBackbone(element); - if (element.hasAllowedElement()) { - composeBooleanCore("allowed", element.getAllowedElement(), false); - composeBooleanExtras("allowed", element.getAllowedElement(), false); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - } - - protected void composeMedicationStatement(String name, MedicationStatement element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMedicationStatementInner(element); - } - } - - protected void composeMedicationStatementInner(MedicationStatement element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } - if (element.hasDateAssertedElement()) { - composeDateTimeCore("dateAsserted", element.getDateAssertedElement(), false); - composeDateTimeExtras("dateAsserted", element.getDateAssertedElement(), false); - } - if (element.hasInformationSource()) { - composeReference("informationSource", element.getInformationSource()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasDerivedFrom()) { - openArray("derivedFrom"); - for (Reference e : element.getDerivedFrom()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTakenElement()) { - composeEnumerationCore("taken", element.getTakenElement(), new MedicationStatement.MedicationStatementTakenEnumFactory(), false); - composeEnumerationExtras("taken", element.getTakenElement(), new MedicationStatement.MedicationStatementTakenEnumFactory(), false); - } - if (element.hasReasonNotTaken()) { - openArray("reasonNotTaken"); - for (CodeableConcept e : element.getReasonNotTaken()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasDosage()) { - openArray("dosage"); - for (Dosage e : element.getDosage()) - composeDosage(null, e); - closeArray(); - }; - } - - protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMessageDefinitionInner(element); - } - } - - protected void composeMessageDefinitionInner(MessageDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasBase()) { - composeReference("base", element.getBase()); - } - if (element.hasParent()) { - openArray("parent"); - for (Reference e : element.getParent()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReplaces()) { - openArray("replaces"); - for (Reference e : element.getReplaces()) - composeReference(null, e); - closeArray(); - }; - if (element.hasEvent()) { - composeCoding("event", element.getEvent()); - } - if (element.hasCategoryElement()) { - composeEnumerationCore("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory(), false); - composeEnumerationExtras("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory(), false); - } - if (element.hasFocus()) { - openArray("focus"); - for (MessageDefinition.MessageDefinitionFocusComponent e : element.getFocus()) - composeMessageDefinitionMessageDefinitionFocusComponent(null, e); - closeArray(); - }; - if (element.hasResponseRequiredElement()) { - composeBooleanCore("responseRequired", element.getResponseRequiredElement(), false); - composeBooleanExtras("responseRequired", element.getResponseRequiredElement(), false); - } - if (element.hasAllowedResponse()) { - openArray("allowedResponse"); - for (MessageDefinition.MessageDefinitionAllowedResponseComponent e : element.getAllowedResponse()) - composeMessageDefinitionMessageDefinitionAllowedResponseComponent(null, e); - closeArray(); - }; - } - - protected void composeMessageDefinitionMessageDefinitionFocusComponent(String name, MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { - if (element != null) { - open(name); - composeMessageDefinitionMessageDefinitionFocusComponentInner(element); - close(); - } - } - - protected void composeMessageDefinitionMessageDefinitionFocusComponentInner(MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - if (element.hasMinElement()) { - composeUnsignedIntCore("min", element.getMinElement(), false); - composeUnsignedIntExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - } - - protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { - if (element != null) { - open(name); - composeMessageDefinitionMessageDefinitionAllowedResponseComponentInner(element); - close(); - } - } - - protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponentInner(MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { - composeBackbone(element); - if (element.hasMessage()) { - composeReference("message", element.getMessage()); - } - if (element.hasSituationElement()) { - composeMarkdownCore("situation", element.getSituationElement(), false); - composeMarkdownExtras("situation", element.getSituationElement(), false); - } - } - - protected void composeMessageHeader(String name, MessageHeader element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeMessageHeaderInner(element); - } - } - - protected void composeMessageHeaderInner(MessageHeader element) throws IOException { - composeDomainResourceElements(element); - if (element.hasEvent()) { - composeCoding("event", element.getEvent()); - } - if (element.hasDestination()) { - openArray("destination"); - for (MessageHeader.MessageDestinationComponent e : element.getDestination()) - composeMessageHeaderMessageDestinationComponent(null, e); - closeArray(); - }; - if (element.hasSender()) { - composeReference("sender", element.getSender()); - } - if (element.hasTimestampElement()) { - composeInstantCore("timestamp", element.getTimestampElement(), false); - composeInstantExtras("timestamp", element.getTimestampElement(), false); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasSource()) { - composeMessageHeaderMessageSourceComponent("source", element.getSource()); - } - if (element.hasResponsible()) { - composeReference("responsible", element.getResponsible()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasResponse()) { - composeMessageHeaderMessageHeaderResponseComponent("response", element.getResponse()); - } - if (element.hasFocus()) { - openArray("focus"); - for (Reference e : element.getFocus()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeMessageHeaderMessageDestinationComponent(String name, MessageHeader.MessageDestinationComponent element) throws IOException { - if (element != null) { - open(name); - composeMessageHeaderMessageDestinationComponentInner(element); - close(); - } - } - - protected void composeMessageHeaderMessageDestinationComponentInner(MessageHeader.MessageDestinationComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasEndpointElement()) { - composeUriCore("endpoint", element.getEndpointElement(), false); - composeUriExtras("endpoint", element.getEndpointElement(), false); - } - if (element.hasReceiver()) { - composeReference("receiver", element.getReceiver()); - } - } - - protected void composeMessageHeaderMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element) throws IOException { - if (element != null) { - open(name); - composeMessageHeaderMessageSourceComponentInner(element); - close(); - } - } - - protected void composeMessageHeaderMessageSourceComponentInner(MessageHeader.MessageSourceComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasSoftwareElement()) { - composeStringCore("software", element.getSoftwareElement(), false); - composeStringExtras("software", element.getSoftwareElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasContact()) { - composeContactPoint("contact", element.getContact()); - } - if (element.hasEndpointElement()) { - composeUriCore("endpoint", element.getEndpointElement(), false); - composeUriExtras("endpoint", element.getEndpointElement(), false); - } - } - - protected void composeMessageHeaderMessageHeaderResponseComponent(String name, MessageHeader.MessageHeaderResponseComponent element) throws IOException { - if (element != null) { - open(name); - composeMessageHeaderMessageHeaderResponseComponentInner(element); - close(); - } - } - - protected void composeMessageHeaderMessageHeaderResponseComponentInner(MessageHeader.MessageHeaderResponseComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifierElement()) { - composeIdCore("identifier", element.getIdentifierElement(), false); - composeIdExtras("identifier", element.getIdentifierElement(), false); - } - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory(), false); - } - if (element.hasDetails()) { - composeReference("details", element.getDetails()); - } - } - - protected void composeNamingSystem(String name, NamingSystem element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeNamingSystemInner(element); - } - } - - protected void composeNamingSystemInner(NamingSystem element) throws IOException { - composeDomainResourceElements(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasResponsibleElement()) { - composeStringCore("responsible", element.getResponsibleElement(), false); - composeStringExtras("responsible", element.getResponsibleElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasUniqueId()) { - openArray("uniqueId"); - for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId()) - composeNamingSystemNamingSystemUniqueIdComponent(null, e); - closeArray(); - }; - if (element.hasReplacedBy()) { - composeReference("replacedBy", element.getReplacedBy()); - } - } - - protected void composeNamingSystemNamingSystemUniqueIdComponent(String name, NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { - if (element != null) { - open(name); - composeNamingSystemNamingSystemUniqueIdComponentInner(element); - close(); - } - } - - protected void composeNamingSystemNamingSystemUniqueIdComponentInner(NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - if (element.hasPreferredElement()) { - composeBooleanCore("preferred", element.getPreferredElement(), false); - composeBooleanExtras("preferred", element.getPreferredElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeNutritionOrderInner(element); - } - } - - protected void composeNutritionOrderInner(NutritionOrder element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateTimeElement()) { - composeDateTimeCore("dateTime", element.getDateTimeElement(), false); - composeDateTimeExtras("dateTime", element.getDateTimeElement(), false); - } - if (element.hasOrderer()) { - composeReference("orderer", element.getOrderer()); - } - if (element.hasAllergyIntolerance()) { - openArray("allergyIntolerance"); - for (Reference e : element.getAllergyIntolerance()) - composeReference(null, e); - closeArray(); - }; - if (element.hasFoodPreferenceModifier()) { - openArray("foodPreferenceModifier"); - for (CodeableConcept e : element.getFoodPreferenceModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasExcludeFoodModifier()) { - openArray("excludeFoodModifier"); - for (CodeableConcept e : element.getExcludeFoodModifier()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasOralDiet()) { - composeNutritionOrderNutritionOrderOralDietComponent("oralDiet", element.getOralDiet()); - } - if (element.hasSupplement()) { - openArray("supplement"); - for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement()) - composeNutritionOrderNutritionOrderSupplementComponent(null, e); - closeArray(); - }; - if (element.hasEnteralFormula()) { - composeNutritionOrderNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula()); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietComponent(String name, NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { - if (element != null) { - open(name); - composeNutritionOrderNutritionOrderOralDietComponentInner(element); - close(); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietComponentInner(NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSchedule()) { - openArray("schedule"); - for (Timing e : element.getSchedule()) - composeTiming(null, e); - closeArray(); - }; - if (element.hasNutrient()) { - openArray("nutrient"); - for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient()) - composeNutritionOrderNutritionOrderOralDietNutrientComponent(null, e); - closeArray(); - }; - if (element.hasTexture()) { - openArray("texture"); - for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture()) - composeNutritionOrderNutritionOrderOralDietTextureComponent(null, e); - closeArray(); - }; - if (element.hasFluidConsistencyType()) { - openArray("fluidConsistencyType"); - for (CodeableConcept e : element.getFluidConsistencyType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasInstructionElement()) { - composeStringCore("instruction", element.getInstructionElement(), false); - composeStringExtras("instruction", element.getInstructionElement(), false); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { - if (element != null) { - open(name); - composeNutritionOrderNutritionOrderOralDietNutrientComponentInner(element); - close(); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietNutrientComponentInner(NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { - composeBackbone(element); - if (element.hasModifier()) { - composeCodeableConcept("modifier", element.getModifier()); - } - if (element.hasAmount()) { - composeSimpleQuantity("amount", element.getAmount()); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(String name, NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { - if (element != null) { - open(name); - composeNutritionOrderNutritionOrderOralDietTextureComponentInner(element); - close(); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietTextureComponentInner(NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { - composeBackbone(element); - if (element.hasModifier()) { - composeCodeableConcept("modifier", element.getModifier()); - } - if (element.hasFoodType()) { - composeCodeableConcept("foodType", element.getFoodType()); - } - } - - protected void composeNutritionOrderNutritionOrderSupplementComponent(String name, NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { - if (element != null) { - open(name); - composeNutritionOrderNutritionOrderSupplementComponentInner(element); - close(); - } - } - - protected void composeNutritionOrderNutritionOrderSupplementComponentInner(NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasProductNameElement()) { - composeStringCore("productName", element.getProductNameElement(), false); - composeStringExtras("productName", element.getProductNameElement(), false); - } - if (element.hasSchedule()) { - openArray("schedule"); - for (Timing e : element.getSchedule()) - composeTiming(null, e); - closeArray(); - }; - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasInstructionElement()) { - composeStringCore("instruction", element.getInstructionElement(), false); - composeStringExtras("instruction", element.getInstructionElement(), false); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { - if (element != null) { - open(name); - composeNutritionOrderNutritionOrderEnteralFormulaComponentInner(element); - close(); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaComponentInner(NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { - composeBackbone(element); - if (element.hasBaseFormulaType()) { - composeCodeableConcept("baseFormulaType", element.getBaseFormulaType()); - } - if (element.hasBaseFormulaProductNameElement()) { - composeStringCore("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false); - composeStringExtras("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false); - } - if (element.hasAdditiveType()) { - composeCodeableConcept("additiveType", element.getAdditiveType()); - } - if (element.hasAdditiveProductNameElement()) { - composeStringCore("additiveProductName", element.getAdditiveProductNameElement(), false); - composeStringExtras("additiveProductName", element.getAdditiveProductNameElement(), false); - } - if (element.hasCaloricDensity()) { - composeSimpleQuantity("caloricDensity", element.getCaloricDensity()); - } - if (element.hasRouteofAdministration()) { - composeCodeableConcept("routeofAdministration", element.getRouteofAdministration()); - } - if (element.hasAdministration()) { - openArray("administration"); - for (NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent e : element.getAdministration()) - composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(null, e); - closeArray(); - }; - if (element.hasMaxVolumeToDeliver()) { - composeSimpleQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver()); - } - if (element.hasAdministrationInstructionElement()) { - composeStringCore("administrationInstruction", element.getAdministrationInstructionElement(), false); - composeStringExtras("administrationInstruction", element.getAdministrationInstructionElement(), false); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { - if (element != null) { - open(name); - composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentInner(element); - close(); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentInner(NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { - composeBackbone(element); - if (element.hasSchedule()) { - composeTiming("schedule", element.getSchedule()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasRate()) { - composeType("rate", element.getRate()); - } - } - - protected void composeObservation(String name, Observation element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeObservationInner(element); - } - } - - protected void composeObservationInner(Observation element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } - if (element.hasIssuedElement()) { - composeInstantCore("issued", element.getIssuedElement(), false); - composeInstantExtras("issued", element.getIssuedElement(), false); - } - if (element.hasPerformer()) { - openArray("performer"); - for (Reference e : element.getPerformer()) - composeReference(null, e); - closeArray(); - }; - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasDataAbsentReason()) { - composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); - } - if (element.hasInterpretation()) { - composeCodeableConcept("interpretation", element.getInterpretation()); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasSpecimen()) { - composeReference("specimen", element.getSpecimen()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasReferenceRange()) { - openArray("referenceRange"); - for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) - composeObservationObservationReferenceRangeComponent(null, e); - closeArray(); - }; - if (element.hasRelated()) { - openArray("related"); - for (Observation.ObservationRelatedComponent e : element.getRelated()) - composeObservationObservationRelatedComponent(null, e); - closeArray(); - }; - if (element.hasComponent()) { - openArray("component"); - for (Observation.ObservationComponentComponent e : element.getComponent()) - composeObservationObservationComponentComponent(null, e); - closeArray(); - }; - } - - protected void composeObservationObservationReferenceRangeComponent(String name, Observation.ObservationReferenceRangeComponent element) throws IOException { - if (element != null) { - open(name); - composeObservationObservationReferenceRangeComponentInner(element); - close(); - } - } - - protected void composeObservationObservationReferenceRangeComponentInner(Observation.ObservationReferenceRangeComponent element) throws IOException { - composeBackbone(element); - if (element.hasLow()) { - composeSimpleQuantity("low", element.getLow()); - } - if (element.hasHigh()) { - composeSimpleQuantity("high", element.getHigh()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAppliesTo()) { - openArray("appliesTo"); - for (CodeableConcept e : element.getAppliesTo()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasAge()) { - composeRange("age", element.getAge()); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - } - - protected void composeObservationObservationRelatedComponent(String name, Observation.ObservationRelatedComponent element) throws IOException { - if (element != null) { - open(name); - composeObservationObservationRelatedComponentInner(element); - close(); - } - } - - protected void composeObservationObservationRelatedComponentInner(Observation.ObservationRelatedComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Observation.ObservationRelationshipTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Observation.ObservationRelationshipTypeEnumFactory(), false); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - } - - protected void composeObservationObservationComponentComponent(String name, Observation.ObservationComponentComponent element) throws IOException { - if (element != null) { - open(name); - composeObservationObservationComponentComponentInner(element); - close(); - } - } - - protected void composeObservationObservationComponentComponentInner(Observation.ObservationComponentComponent element) throws IOException { - composeBackbone(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasDataAbsentReason()) { - composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); - } - if (element.hasInterpretation()) { - composeCodeableConcept("interpretation", element.getInterpretation()); - } - if (element.hasReferenceRange()) { - openArray("referenceRange"); - for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) - composeObservationObservationReferenceRangeComponent(null, e); - closeArray(); - }; - } - - protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeOperationDefinitionInner(element); - } - } - - protected void composeOperationDefinitionInner(OperationDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasIdempotentElement()) { - composeBooleanCore("idempotent", element.getIdempotentElement(), false); - composeBooleanExtras("idempotent", element.getIdempotentElement(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - if (element.hasBase()) { - composeReference("base", element.getBase()); - } - if (element.hasResource()) { - openArray("resource"); - for (CodeType e : element.getResource()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getResource())) { - openArray("_resource"); - for (CodeType e : element.getResource()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasSystemElement()) { - composeBooleanCore("system", element.getSystemElement(), false); - composeBooleanExtras("system", element.getSystemElement(), false); - } - if (element.hasTypeElement()) { - composeBooleanCore("type", element.getTypeElement(), false); - composeBooleanExtras("type", element.getTypeElement(), false); - } - if (element.hasInstanceElement()) { - composeBooleanCore("instance", element.getInstanceElement(), false); - composeBooleanExtras("instance", element.getInstanceElement(), false); - } - if (element.hasParameter()) { - openArray("parameter"); - for (OperationDefinition.OperationDefinitionParameterComponent e : element.getParameter()) - composeOperationDefinitionOperationDefinitionParameterComponent(null, e); - closeArray(); - }; - if (element.hasOverload()) { - openArray("overload"); - for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload()) - composeOperationDefinitionOperationDefinitionOverloadComponent(null, e); - closeArray(); - }; - } - - protected void composeOperationDefinitionOperationDefinitionParameterComponent(String name, OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { - if (element != null) { - open(name); - composeOperationDefinitionOperationDefinitionParameterComponentInner(element); - close(); - } - } - - protected void composeOperationDefinitionOperationDefinitionParameterComponentInner(OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeCodeCore("name", element.getNameElement(), false); - composeCodeExtras("name", element.getNameElement(), false); - } - if (element.hasUseElement()) { - composeEnumerationCore("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory(), false); - composeEnumerationExtras("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory(), false); - } - if (element.hasMinElement()) { - composeIntegerCore("min", element.getMinElement(), false); - composeIntegerExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasSearchTypeElement()) { - composeEnumerationCore("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); - composeEnumerationExtras("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - if (element.hasBinding()) { - composeOperationDefinitionOperationDefinitionParameterBindingComponent("binding", element.getBinding()); - } - if (element.hasPart()) { - openArray("part"); - for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart()) - composeOperationDefinitionOperationDefinitionParameterComponent(null, e); - closeArray(); - }; - } - - protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(String name, OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { - if (element != null) { - open(name); - composeOperationDefinitionOperationDefinitionParameterBindingComponentInner(element); - close(); - } - } - - protected void composeOperationDefinitionOperationDefinitionParameterBindingComponentInner(OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { - composeBackbone(element); - if (element.hasStrengthElement()) { - composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); - composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); - } - if (element.hasValueSet()) { - composeType("valueSet", element.getValueSet()); - } - } - - protected void composeOperationDefinitionOperationDefinitionOverloadComponent(String name, OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { - if (element != null) { - open(name); - composeOperationDefinitionOperationDefinitionOverloadComponentInner(element); - close(); - } - } - - protected void composeOperationDefinitionOperationDefinitionOverloadComponentInner(OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { - composeBackbone(element); - if (element.hasParameterName()) { - openArray("parameterName"); - for (StringType e : element.getParameterName()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getParameterName())) { - openArray("_parameterName"); - for (StringType e : element.getParameterName()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeOperationOutcome(String name, OperationOutcome element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeOperationOutcomeInner(element); - } - } - - protected void composeOperationOutcomeInner(OperationOutcome element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIssue()) { - openArray("issue"); - for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue()) - composeOperationOutcomeOperationOutcomeIssueComponent(null, e); - closeArray(); - }; - } - - protected void composeOperationOutcomeOperationOutcomeIssueComponent(String name, OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { - if (element != null) { - open(name); - composeOperationOutcomeOperationOutcomeIssueComponentInner(element); - close(); - } - } - - protected void composeOperationOutcomeOperationOutcomeIssueComponentInner(OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { - composeBackbone(element); - if (element.hasSeverityElement()) { - composeEnumerationCore("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory(), false); - composeEnumerationExtras("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory(), false); - } - if (element.hasCodeElement()) { - composeEnumerationCore("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory(), false); - composeEnumerationExtras("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory(), false); - } - if (element.hasDetails()) { - composeCodeableConcept("details", element.getDetails()); - } - if (element.hasDiagnosticsElement()) { - composeStringCore("diagnostics", element.getDiagnosticsElement(), false); - composeStringExtras("diagnostics", element.getDiagnosticsElement(), false); - } - if (element.hasLocation()) { - openArray("location"); - for (StringType e : element.getLocation()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getLocation())) { - openArray("_location"); - for (StringType e : element.getLocation()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasExpression()) { - openArray("expression"); - for (StringType e : element.getExpression()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getExpression())) { - openArray("_expression"); - for (StringType e : element.getExpression()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeOrganization(String name, Organization element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeOrganizationInner(element); - } - } - - protected void composeOrganizationInner(Organization element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasType()) { - openArray("type"); - for (CodeableConcept e : element.getType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasAlias()) { - openArray("alias"); - for (StringType e : element.getAlias()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getAlias())) { - openArray("_alias"); - for (StringType e : element.getAlias()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasAddress()) { - openArray("address"); - for (Address e : element.getAddress()) - composeAddress(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - composeReference("partOf", element.getPartOf()); - } - if (element.hasContact()) { - openArray("contact"); - for (Organization.OrganizationContactComponent e : element.getContact()) - composeOrganizationOrganizationContactComponent(null, e); - closeArray(); - }; - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeOrganizationOrganizationContactComponent(String name, Organization.OrganizationContactComponent element) throws IOException { - if (element != null) { - open(name); - composeOrganizationOrganizationContactComponentInner(element); - close(); - } - } - - protected void composeOrganizationOrganizationContactComponentInner(Organization.OrganizationContactComponent element) throws IOException { - composeBackbone(element); - if (element.hasPurpose()) { - composeCodeableConcept("purpose", element.getPurpose()); - } - if (element.hasName()) { - composeHumanName("name", element.getName()); - } - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasAddress()) { - composeAddress("address", element.getAddress()); - } - } - - protected void composePatient(String name, Patient element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePatientInner(element); - } - } - - protected void composePatientInner(Patient element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasName()) { - openArray("name"); - for (HumanName e : element.getName()) - composeHumanName(null, e); - closeArray(); - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasGenderElement()) { - composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - } - if (element.hasBirthDateElement()) { - composeDateCore("birthDate", element.getBirthDateElement(), false); - composeDateExtras("birthDate", element.getBirthDateElement(), false); - } - if (element.hasDeceased()) { - composeType("deceased", element.getDeceased()); - } - if (element.hasAddress()) { - openArray("address"); - for (Address e : element.getAddress()) - composeAddress(null, e); - closeArray(); - }; - if (element.hasMaritalStatus()) { - composeCodeableConcept("maritalStatus", element.getMaritalStatus()); - } - if (element.hasMultipleBirth()) { - composeType("multipleBirth", element.getMultipleBirth()); - } - if (element.hasPhoto()) { - openArray("photo"); - for (Attachment e : element.getPhoto()) - composeAttachment(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (Patient.ContactComponent e : element.getContact()) - composePatientContactComponent(null, e); - closeArray(); - }; - if (element.hasAnimal()) { - composePatientAnimalComponent("animal", element.getAnimal()); - } - if (element.hasCommunication()) { - openArray("communication"); - for (Patient.PatientCommunicationComponent e : element.getCommunication()) - composePatientPatientCommunicationComponent(null, e); - closeArray(); - }; - if (element.hasGeneralPractitioner()) { - openArray("generalPractitioner"); - for (Reference e : element.getGeneralPractitioner()) - composeReference(null, e); - closeArray(); - }; - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasLink()) { - openArray("link"); - for (Patient.PatientLinkComponent e : element.getLink()) - composePatientPatientLinkComponent(null, e); - closeArray(); - }; - } - - protected void composePatientContactComponent(String name, Patient.ContactComponent element) throws IOException { - if (element != null) { - open(name); - composePatientContactComponentInner(element); - close(); - } - } - - protected void composePatientContactComponentInner(Patient.ContactComponent element) throws IOException { - composeBackbone(element); - if (element.hasRelationship()) { - openArray("relationship"); - for (CodeableConcept e : element.getRelationship()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasName()) { - composeHumanName("name", element.getName()); - } - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasAddress()) { - composeAddress("address", element.getAddress()); - } - if (element.hasGenderElement()) { - composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composePatientAnimalComponent(String name, Patient.AnimalComponent element) throws IOException { - if (element != null) { - open(name); - composePatientAnimalComponentInner(element); - close(); - } - } - - protected void composePatientAnimalComponentInner(Patient.AnimalComponent element) throws IOException { - composeBackbone(element); - if (element.hasSpecies()) { - composeCodeableConcept("species", element.getSpecies()); - } - if (element.hasBreed()) { - composeCodeableConcept("breed", element.getBreed()); - } - if (element.hasGenderStatus()) { - composeCodeableConcept("genderStatus", element.getGenderStatus()); - } - } - - protected void composePatientPatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element) throws IOException { - if (element != null) { - open(name); - composePatientPatientCommunicationComponentInner(element); - close(); - } - } - - protected void composePatientPatientCommunicationComponentInner(Patient.PatientCommunicationComponent element) throws IOException { - composeBackbone(element); - if (element.hasLanguage()) { - composeCodeableConcept("language", element.getLanguage()); - } - if (element.hasPreferredElement()) { - composeBooleanCore("preferred", element.getPreferredElement(), false); - composeBooleanExtras("preferred", element.getPreferredElement(), false); - } - } - - protected void composePatientPatientLinkComponent(String name, Patient.PatientLinkComponent element) throws IOException { - if (element != null) { - open(name); - composePatientPatientLinkComponentInner(element); - close(); - } - } - - protected void composePatientPatientLinkComponentInner(Patient.PatientLinkComponent element) throws IOException { - composeBackbone(element); - if (element.hasOther()) { - composeReference("other", element.getOther()); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory(), false); - } - } - - protected void composePaymentNotice(String name, PaymentNotice element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePaymentNoticeInner(element); - } - } - - protected void composePaymentNoticeInner(PaymentNotice element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory(), false); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasStatusDateElement()) { - composeDateCore("statusDate", element.getStatusDateElement(), false); - composeDateExtras("statusDate", element.getStatusDateElement(), false); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasPaymentStatus()) { - composeCodeableConcept("paymentStatus", element.getPaymentStatus()); - } - } - - protected void composePaymentReconciliation(String name, PaymentReconciliation element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePaymentReconciliationInner(element); - } - } - - protected void composePaymentReconciliationInner(PaymentReconciliation element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new PaymentReconciliation.PaymentReconciliationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new PaymentReconciliation.PaymentReconciliationStatusEnumFactory(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeStringCore("disposition", element.getDispositionElement(), false); - composeStringExtras("disposition", element.getDispositionElement(), false); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasDetail()) { - openArray("detail"); - for (PaymentReconciliation.DetailsComponent e : element.getDetail()) - composePaymentReconciliationDetailsComponent(null, e); - closeArray(); - }; - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasTotal()) { - composeMoney("total", element.getTotal()); - } - if (element.hasProcessNote()) { - openArray("processNote"); - for (PaymentReconciliation.NotesComponent e : element.getProcessNote()) - composePaymentReconciliationNotesComponent(null, e); - closeArray(); - }; - } - - protected void composePaymentReconciliationDetailsComponent(String name, PaymentReconciliation.DetailsComponent element) throws IOException { - if (element != null) { - open(name); - composePaymentReconciliationDetailsComponentInner(element); - close(); - } - } - - protected void composePaymentReconciliationDetailsComponentInner(PaymentReconciliation.DetailsComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasSubmitter()) { - composeReference("submitter", element.getSubmitter()); - } - if (element.hasPayee()) { - composeReference("payee", element.getPayee()); - } - if (element.hasDateElement()) { - composeDateCore("date", element.getDateElement(), false); - composeDateExtras("date", element.getDateElement(), false); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - } - - protected void composePaymentReconciliationNotesComponent(String name, PaymentReconciliation.NotesComponent element) throws IOException { - if (element != null) { - open(name); - composePaymentReconciliationNotesComponentInner(element); - close(); - } - } - - protected void composePaymentReconciliationNotesComponentInner(PaymentReconciliation.NotesComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - } - - protected void composePerson(String name, Person element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePersonInner(element); - } - } - - protected void composePersonInner(Person element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasName()) { - openArray("name"); - for (HumanName e : element.getName()) - composeHumanName(null, e); - closeArray(); - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasGenderElement()) { - composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - } - if (element.hasBirthDateElement()) { - composeDateCore("birthDate", element.getBirthDateElement(), false); - composeDateExtras("birthDate", element.getBirthDateElement(), false); - } - if (element.hasAddress()) { - openArray("address"); - for (Address e : element.getAddress()) - composeAddress(null, e); - closeArray(); - }; - if (element.hasPhoto()) { - composeAttachment("photo", element.getPhoto()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasLink()) { - openArray("link"); - for (Person.PersonLinkComponent e : element.getLink()) - composePersonPersonLinkComponent(null, e); - closeArray(); - }; - } - - protected void composePersonPersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException { - if (element != null) { - open(name); - composePersonPersonLinkComponentInner(element); - close(); - } - } - - protected void composePersonPersonLinkComponentInner(Person.PersonLinkComponent element) throws IOException { - composeBackbone(element); - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasAssuranceElement()) { - composeEnumerationCore("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory(), false); - composeEnumerationExtras("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory(), false); - } - } - - protected void composePlanDefinition(String name, PlanDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePlanDefinitionInner(element); - } - } - - protected void composePlanDefinitionInner(PlanDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContributor()) { - openArray("contributor"); - for (Contributor e : element.getContributor()) - composeContributor(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasLibrary()) { - openArray("library"); - for (Reference e : element.getLibrary()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGoal()) { - openArray("goal"); - for (PlanDefinition.PlanDefinitionGoalComponent e : element.getGoal()) - composePlanDefinitionPlanDefinitionGoalComponent(null, e); - closeArray(); - }; - if (element.hasAction()) { - openArray("action"); - for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) - composePlanDefinitionPlanDefinitionActionComponent(null, e); - closeArray(); - }; - } - - protected void composePlanDefinitionPlanDefinitionGoalComponent(String name, PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionGoalComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionGoalComponentInner(PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { - composeBackbone(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasDescription()) { - composeCodeableConcept("description", element.getDescription()); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasStart()) { - composeCodeableConcept("start", element.getStart()); - } - if (element.hasAddresses()) { - openArray("addresses"); - for (CodeableConcept e : element.getAddresses()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDocumentation()) { - openArray("documentation"); - for (RelatedArtifact e : element.getDocumentation()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasTarget()) { - openArray("target"); - for (PlanDefinition.PlanDefinitionGoalTargetComponent e : element.getTarget()) - composePlanDefinitionPlanDefinitionGoalTargetComponent(null, e); - closeArray(); - }; - } - - protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(String name, PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionGoalTargetComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionGoalTargetComponentInner(PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { - composeBackbone(element); - if (element.hasMeasure()) { - composeCodeableConcept("measure", element.getMeasure()); - } - if (element.hasDetail()) { - composeType("detail", element.getDetail()); - } - if (element.hasDue()) { - composeDuration("due", element.getDue()); - } - } - - protected void composePlanDefinitionPlanDefinitionActionComponent(String name, PlanDefinition.PlanDefinitionActionComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionActionComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionActionComponentInner(PlanDefinition.PlanDefinitionActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasLabelElement()) { - composeStringCore("label", element.getLabelElement(), false); - composeStringExtras("label", element.getLabelElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasTextEquivalentElement()) { - composeStringCore("textEquivalent", element.getTextEquivalentElement(), false); - composeStringExtras("textEquivalent", element.getTextEquivalentElement(), false); - } - if (element.hasCode()) { - openArray("code"); - for (CodeableConcept e : element.getCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReason()) { - openArray("reason"); - for (CodeableConcept e : element.getReason()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDocumentation()) { - openArray("documentation"); - for (RelatedArtifact e : element.getDocumentation()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasGoalId()) { - openArray("goalId"); - for (IdType e : element.getGoalId()) - composeIdCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getGoalId())) { - openArray("_goalId"); - for (IdType e : element.getGoalId()) - composeIdExtras(null, e, true); - closeArray(); - } - }; - if (element.hasTriggerDefinition()) { - openArray("triggerDefinition"); - for (TriggerDefinition e : element.getTriggerDefinition()) - composeTriggerDefinition(null, e); - closeArray(); - }; - if (element.hasCondition()) { - openArray("condition"); - for (PlanDefinition.PlanDefinitionActionConditionComponent e : element.getCondition()) - composePlanDefinitionPlanDefinitionActionConditionComponent(null, e); - closeArray(); - }; - if (element.hasInput()) { - openArray("input"); - for (DataRequirement e : element.getInput()) - composeDataRequirement(null, e); - closeArray(); - }; - if (element.hasOutput()) { - openArray("output"); - for (DataRequirement e : element.getOutput()) - composeDataRequirement(null, e); - closeArray(); - }; - if (element.hasRelatedAction()) { - openArray("relatedAction"); - for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction()) - composePlanDefinitionPlanDefinitionActionRelatedActionComponent(null, e); - closeArray(); - }; - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } - if (element.hasParticipant()) { - openArray("participant"); - for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant()) - composePlanDefinitionPlanDefinitionActionParticipantComponent(null, e); - closeArray(); - }; - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasGroupingBehaviorElement()) { - composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(), new PlanDefinition.ActionGroupingBehaviorEnumFactory(), false); - composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(), new PlanDefinition.ActionGroupingBehaviorEnumFactory(), false); - } - if (element.hasSelectionBehaviorElement()) { - composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(), new PlanDefinition.ActionSelectionBehaviorEnumFactory(), false); - composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(), new PlanDefinition.ActionSelectionBehaviorEnumFactory(), false); - } - if (element.hasRequiredBehaviorElement()) { - composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(), new PlanDefinition.ActionRequiredBehaviorEnumFactory(), false); - composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(), new PlanDefinition.ActionRequiredBehaviorEnumFactory(), false); - } - if (element.hasPrecheckBehaviorElement()) { - composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(), new PlanDefinition.ActionPrecheckBehaviorEnumFactory(), false); - composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(), new PlanDefinition.ActionPrecheckBehaviorEnumFactory(), false); - } - if (element.hasCardinalityBehaviorElement()) { - composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(), new PlanDefinition.ActionCardinalityBehaviorEnumFactory(), false); - composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(), new PlanDefinition.ActionCardinalityBehaviorEnumFactory(), false); - } - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - if (element.hasTransform()) { - composeReference("transform", element.getTransform()); - } - if (element.hasDynamicValue()) { - openArray("dynamicValue"); - for (PlanDefinition.PlanDefinitionActionDynamicValueComponent e : element.getDynamicValue()) - composePlanDefinitionPlanDefinitionActionDynamicValueComponent(null, e); - closeArray(); - }; - if (element.hasAction()) { - openArray("action"); - for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) - composePlanDefinitionPlanDefinitionActionComponent(null, e); - closeArray(); - }; - } - - protected void composePlanDefinitionPlanDefinitionActionConditionComponent(String name, PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionActionConditionComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionActionConditionComponentInner(PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { - composeBackbone(element); - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasLanguageElement()) { - composeStringCore("language", element.getLanguageElement(), false); - composeStringExtras("language", element.getLanguageElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - } - - protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionActionRelatedActionComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponentInner(PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasActionIdElement()) { - composeIdCore("actionId", element.getActionIdElement(), false); - composeIdExtras("actionId", element.getActionIdElement(), false); - } - if (element.hasRelationshipElement()) { - composeEnumerationCore("relationship", element.getRelationshipElement(), new PlanDefinition.ActionRelationshipTypeEnumFactory(), false); - composeEnumerationExtras("relationship", element.getRelationshipElement(), new PlanDefinition.ActionRelationshipTypeEnumFactory(), false); - } - if (element.hasOffset()) { - composeType("offset", element.getOffset()); - } - } - - protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(String name, PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionActionParticipantComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionActionParticipantComponentInner(PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory(), false); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - } - - protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { - if (element != null) { - open(name); - composePlanDefinitionPlanDefinitionActionDynamicValueComponentInner(element); - close(); - } - } - - protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponentInner(PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { - composeBackbone(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasLanguageElement()) { - composeStringCore("language", element.getLanguageElement(), false); - composeStringExtras("language", element.getLanguageElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - } - - protected void composePractitioner(String name, Practitioner element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePractitionerInner(element); - } - } - - protected void composePractitionerInner(Practitioner element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasName()) { - openArray("name"); - for (HumanName e : element.getName()) - composeHumanName(null, e); - closeArray(); - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasAddress()) { - openArray("address"); - for (Address e : element.getAddress()) - composeAddress(null, e); - closeArray(); - }; - if (element.hasGenderElement()) { - composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - } - if (element.hasBirthDateElement()) { - composeDateCore("birthDate", element.getBirthDateElement(), false); - composeDateExtras("birthDate", element.getBirthDateElement(), false); - } - if (element.hasPhoto()) { - openArray("photo"); - for (Attachment e : element.getPhoto()) - composeAttachment(null, e); - closeArray(); - }; - if (element.hasQualification()) { - openArray("qualification"); - for (Practitioner.PractitionerQualificationComponent e : element.getQualification()) - composePractitionerPractitionerQualificationComponent(null, e); - closeArray(); - }; - if (element.hasCommunication()) { - openArray("communication"); - for (CodeableConcept e : element.getCommunication()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composePractitionerPractitionerQualificationComponent(String name, Practitioner.PractitionerQualificationComponent element) throws IOException { - if (element != null) { - open(name); - composePractitionerPractitionerQualificationComponentInner(element); - close(); - } - } - - protected void composePractitionerPractitionerQualificationComponentInner(Practitioner.PractitionerQualificationComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasIssuer()) { - composeReference("issuer", element.getIssuer()); - } - } - - protected void composePractitionerRole(String name, PractitionerRole element) throws IOException { - if (element != null) { - prop("resourceType", name); - composePractitionerRoleInner(element); - } - } - - protected void composePractitionerRoleInner(PractitionerRole element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasPractitioner()) { - composeReference("practitioner", element.getPractitioner()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasCode()) { - openArray("code"); - for (CodeableConcept e : element.getCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialty()) { - openArray("specialty"); - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasLocation()) { - openArray("location"); - for (Reference e : element.getLocation()) - composeReference(null, e); - closeArray(); - }; - if (element.hasHealthcareService()) { - openArray("healthcareService"); - for (Reference e : element.getHealthcareService()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasAvailableTime()) { - openArray("availableTime"); - for (PractitionerRole.PractitionerRoleAvailableTimeComponent e : element.getAvailableTime()) - composePractitionerRolePractitionerRoleAvailableTimeComponent(null, e); - closeArray(); - }; - if (element.hasNotAvailable()) { - openArray("notAvailable"); - for (PractitionerRole.PractitionerRoleNotAvailableComponent e : element.getNotAvailable()) - composePractitionerRolePractitionerRoleNotAvailableComponent(null, e); - closeArray(); - }; - if (element.hasAvailabilityExceptionsElement()) { - composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); - composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); - } - if (element.hasEndpoint()) { - openArray("endpoint"); - for (Reference e : element.getEndpoint()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(String name, PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { - if (element != null) { - open(name); - composePractitionerRolePractitionerRoleAvailableTimeComponentInner(element); - close(); - } - } - - protected void composePractitionerRolePractitionerRoleAvailableTimeComponentInner(PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { - composeBackbone(element); - if (element.hasDaysOfWeek()) { - openArray("daysOfWeek"); - for (Enumeration e : element.getDaysOfWeek()) - composeEnumerationCore(null, e, new PractitionerRole.DaysOfWeekEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getDaysOfWeek())) { - openArray("_daysOfWeek"); - for (Enumeration e : element.getDaysOfWeek()) - composeEnumerationExtras(null, e, new PractitionerRole.DaysOfWeekEnumFactory(), true); - closeArray(); - } - }; - if (element.hasAllDayElement()) { - composeBooleanCore("allDay", element.getAllDayElement(), false); - composeBooleanExtras("allDay", element.getAllDayElement(), false); - } - if (element.hasAvailableStartTimeElement()) { - composeTimeCore("availableStartTime", element.getAvailableStartTimeElement(), false); - composeTimeExtras("availableStartTime", element.getAvailableStartTimeElement(), false); - } - if (element.hasAvailableEndTimeElement()) { - composeTimeCore("availableEndTime", element.getAvailableEndTimeElement(), false); - composeTimeExtras("availableEndTime", element.getAvailableEndTimeElement(), false); - } - } - - protected void composePractitionerRolePractitionerRoleNotAvailableComponent(String name, PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { - if (element != null) { - open(name); - composePractitionerRolePractitionerRoleNotAvailableComponentInner(element); - close(); - } - } - - protected void composePractitionerRolePractitionerRoleNotAvailableComponentInner(PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { - composeBackbone(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasDuring()) { - composePeriod("during", element.getDuring()); - } - } - - protected void composeProcedure(String name, Procedure element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeProcedureInner(element); - } - } - - protected void composeProcedureInner(Procedure element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory(), false); - } - if (element.hasNotDoneElement()) { - composeBooleanCore("notDone", element.getNotDoneElement(), false); - composeBooleanExtras("notDone", element.getNotDoneElement(), false); - } - if (element.hasNotDoneReason()) { - composeCodeableConcept("notDoneReason", element.getNotDoneReason()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPerformed()) { - composeType("performed", element.getPerformed()); - } - if (element.hasPerformer()) { - openArray("performer"); - for (Procedure.ProcedurePerformerComponent e : element.getPerformer()) - composeProcedureProcedurePerformerComponent(null, e); - closeArray(); - }; - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - openArray("bodySite"); - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasReport()) { - openArray("report"); - for (Reference e : element.getReport()) - composeReference(null, e); - closeArray(); - }; - if (element.hasComplication()) { - openArray("complication"); - for (CodeableConcept e : element.getComplication()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasComplicationDetail()) { - openArray("complicationDetail"); - for (Reference e : element.getComplicationDetail()) - composeReference(null, e); - closeArray(); - }; - if (element.hasFollowUp()) { - openArray("followUp"); - for (CodeableConcept e : element.getFollowUp()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasFocalDevice()) { - openArray("focalDevice"); - for (Procedure.ProcedureFocalDeviceComponent e : element.getFocalDevice()) - composeProcedureProcedureFocalDeviceComponent(null, e); - closeArray(); - }; - if (element.hasUsedReference()) { - openArray("usedReference"); - for (Reference e : element.getUsedReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasUsedCode()) { - openArray("usedCode"); - for (CodeableConcept e : element.getUsedCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - } - - protected void composeProcedureProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element) throws IOException { - if (element != null) { - open(name); - composeProcedureProcedurePerformerComponentInner(element); - close(); - } - } - - protected void composeProcedureProcedurePerformerComponentInner(Procedure.ProcedurePerformerComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeProcedureProcedureFocalDeviceComponent(String name, Procedure.ProcedureFocalDeviceComponent element) throws IOException { - if (element != null) { - open(name); - composeProcedureProcedureFocalDeviceComponentInner(element); - close(); - } - } - - protected void composeProcedureProcedureFocalDeviceComponentInner(Procedure.ProcedureFocalDeviceComponent element) throws IOException { - composeBackbone(element); - if (element.hasAction()) { - composeCodeableConcept("action", element.getAction()); - } - if (element.hasManipulated()) { - composeReference("manipulated", element.getManipulated()); - } - } - - protected void composeProcedureRequest(String name, ProcedureRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeProcedureRequestInner(element); - } - } - - protected void composeProcedureRequestInner(ProcedureRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReplaces()) { - openArray("replaces"); - for (Reference e : element.getReplaces()) - composeReference(null, e); - closeArray(); - }; - if (element.hasRequisition()) { - composeIdentifier("requisition", element.getRequisition()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ProcedureRequest.ProcedureRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ProcedureRequest.ProcedureRequestStatusEnumFactory(), false); - } - if (element.hasIntentElement()) { - composeEnumerationCore("intent", element.getIntentElement(), new ProcedureRequest.ProcedureRequestIntentEnumFactory(), false); - composeEnumerationExtras("intent", element.getIntentElement(), new ProcedureRequest.ProcedureRequestIntentEnumFactory(), false); - } - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new ProcedureRequest.ProcedureRequestPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new ProcedureRequest.ProcedureRequestPriorityEnumFactory(), false); - } - if (element.hasDoNotPerformElement()) { - composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false); - composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasAsNeeded()) { - composeType("asNeeded", element.getAsNeeded()); - } - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasRequester()) { - composeProcedureRequestProcedureRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasPerformerType()) { - composeCodeableConcept("performerType", element.getPerformerType()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReasonCode()) { - openArray("reasonCode"); - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasReasonReference()) { - openArray("reasonReference"); - for (Reference e : element.getReasonReference()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSupportingInfo()) { - openArray("supportingInfo"); - for (Reference e : element.getSupportingInfo()) - composeReference(null, e); - closeArray(); - }; - if (element.hasSpecimen()) { - openArray("specimen"); - for (Reference e : element.getSpecimen()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBodySite()) { - openArray("bodySite"); - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasRelevantHistory()) { - openArray("relevantHistory"); - for (Reference e : element.getRelevantHistory()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeProcedureRequestProcedureRequestRequesterComponent(String name, ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { - if (element != null) { - open(name); - composeProcedureRequestProcedureRequestRequesterComponentInner(element); - close(); - } - } - - protected void composeProcedureRequestProcedureRequestRequesterComponentInner(ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeProcessRequest(String name, ProcessRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeProcessRequestInner(element); - } - } - - protected void composeProcessRequestInner(ProcessRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ProcessRequest.ProcessRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ProcessRequest.ProcessRequestStatusEnumFactory(), false); - } - if (element.hasActionElement()) { - composeEnumerationCore("action", element.getActionElement(), new ProcessRequest.ActionListEnumFactory(), false); - composeEnumerationExtras("action", element.getActionElement(), new ProcessRequest.ActionListEnumFactory(), false); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasNullifyElement()) { - composeBooleanCore("nullify", element.getNullifyElement(), false); - composeBooleanExtras("nullify", element.getNullifyElement(), false); - } - if (element.hasReferenceElement()) { - composeStringCore("reference", element.getReferenceElement(), false); - composeStringExtras("reference", element.getReferenceElement(), false); - } - if (element.hasItem()) { - openArray("item"); - for (ProcessRequest.ItemsComponent e : element.getItem()) - composeProcessRequestItemsComponent(null, e); - closeArray(); - }; - if (element.hasInclude()) { - openArray("include"); - for (StringType e : element.getInclude()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getInclude())) { - openArray("_include"); - for (StringType e : element.getInclude()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasExclude()) { - openArray("exclude"); - for (StringType e : element.getExclude()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getExclude())) { - openArray("_exclude"); - for (StringType e : element.getExclude()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeProcessRequestItemsComponent(String name, ProcessRequest.ItemsComponent element) throws IOException { - if (element != null) { - open(name); - composeProcessRequestItemsComponentInner(element); - close(); - } - } - - protected void composeProcessRequestItemsComponentInner(ProcessRequest.ItemsComponent element) throws IOException { - composeBackbone(element); - if (element.hasSequenceLinkIdElement()) { - composeIntegerCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); - composeIntegerExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); - } - } - - protected void composeProcessResponse(String name, ProcessResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeProcessResponseInner(element); - } - } - - protected void composeProcessResponseInner(ProcessResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ProcessResponse.ProcessResponseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ProcessResponse.ProcessResponseStatusEnumFactory(), false); - } - if (element.hasCreatedElement()) { - composeDateTimeCore("created", element.getCreatedElement(), false); - composeDateTimeExtras("created", element.getCreatedElement(), false); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeStringCore("disposition", element.getDispositionElement(), false); - composeStringExtras("disposition", element.getDispositionElement(), false); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasProcessNote()) { - openArray("processNote"); - for (ProcessResponse.ProcessResponseProcessNoteComponent e : element.getProcessNote()) - composeProcessResponseProcessResponseProcessNoteComponent(null, e); - closeArray(); - }; - if (element.hasError()) { - openArray("error"); - for (CodeableConcept e : element.getError()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCommunicationRequest()) { - openArray("communicationRequest"); - for (Reference e : element.getCommunicationRequest()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeProcessResponseProcessResponseProcessNoteComponent(String name, ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { - if (element != null) { - open(name); - composeProcessResponseProcessResponseProcessNoteComponentInner(element); - close(); - } - } - - protected void composeProcessResponseProcessResponseProcessNoteComponentInner(ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - } - - protected void composeProvenance(String name, Provenance element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeProvenanceInner(element); - } - } - - protected void composeProvenanceInner(Provenance element) throws IOException { - composeDomainResourceElements(element); - if (element.hasTarget()) { - openArray("target"); - for (Reference e : element.getTarget()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasRecordedElement()) { - composeInstantCore("recorded", element.getRecordedElement(), false); - composeInstantExtras("recorded", element.getRecordedElement(), false); - } - if (element.hasPolicy()) { - openArray("policy"); - for (UriType e : element.getPolicy()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getPolicy())) { - openArray("_policy"); - for (UriType e : element.getPolicy()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasReason()) { - openArray("reason"); - for (Coding e : element.getReason()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasActivity()) { - composeCoding("activity", element.getActivity()); - } - if (element.hasAgent()) { - openArray("agent"); - for (Provenance.ProvenanceAgentComponent e : element.getAgent()) - composeProvenanceProvenanceAgentComponent(null, e); - closeArray(); - }; - if (element.hasEntity()) { - openArray("entity"); - for (Provenance.ProvenanceEntityComponent e : element.getEntity()) - composeProvenanceProvenanceEntityComponent(null, e); - closeArray(); - }; - if (element.hasSignature()) { - openArray("signature"); - for (Signature e : element.getSignature()) - composeSignature(null, e); - closeArray(); - }; - } - - protected void composeProvenanceProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element) throws IOException { - if (element != null) { - open(name); - composeProvenanceProvenanceAgentComponentInner(element); - close(); - } - } - - protected void composeProvenanceProvenanceAgentComponentInner(Provenance.ProvenanceAgentComponent element) throws IOException { - composeBackbone(element); - if (element.hasRole()) { - openArray("role"); - for (CodeableConcept e : element.getRole()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasWho()) { - composeType("who", element.getWho()); - } - if (element.hasOnBehalfOf()) { - composeType("onBehalfOf", element.getOnBehalfOf()); - } - if (element.hasRelatedAgentType()) { - composeCodeableConcept("relatedAgentType", element.getRelatedAgentType()); - } - } - - protected void composeProvenanceProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element) throws IOException { - if (element != null) { - open(name); - composeProvenanceProvenanceEntityComponentInner(element); - close(); - } - } - - protected void composeProvenanceProvenanceEntityComponentInner(Provenance.ProvenanceEntityComponent element) throws IOException { - composeBackbone(element); - if (element.hasRoleElement()) { - composeEnumerationCore("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory(), false); - composeEnumerationExtras("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory(), false); - } - if (element.hasWhat()) { - composeType("what", element.getWhat()); - } - if (element.hasAgent()) { - openArray("agent"); - for (Provenance.ProvenanceAgentComponent e : element.getAgent()) - composeProvenanceProvenanceAgentComponent(null, e); - closeArray(); - }; - } - - protected void composeQuestionnaire(String name, Questionnaire element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeQuestionnaireInner(element); - } - } - - protected void composeQuestionnaireInner(Questionnaire element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasCode()) { - openArray("code"); - for (Coding e : element.getCode()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasSubjectType()) { - openArray("subjectType"); - for (CodeType e : element.getSubjectType()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getSubjectType())) { - openArray("_subjectType"); - for (CodeType e : element.getSubjectType()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasItem()) { - openArray("item"); - for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) - composeQuestionnaireQuestionnaireItemComponent(null, e); - closeArray(); - }; - } - - protected void composeQuestionnaireQuestionnaireItemComponent(String name, Questionnaire.QuestionnaireItemComponent element) throws IOException { - if (element != null) { - open(name); - composeQuestionnaireQuestionnaireItemComponentInner(element); - close(); - } - } - - protected void composeQuestionnaireQuestionnaireItemComponentInner(Questionnaire.QuestionnaireItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasLinkIdElement()) { - composeStringCore("linkId", element.getLinkIdElement(), false); - composeStringExtras("linkId", element.getLinkIdElement(), false); - } - if (element.hasDefinitionElement()) { - composeUriCore("definition", element.getDefinitionElement(), false); - composeUriExtras("definition", element.getDefinitionElement(), false); - } - if (element.hasCode()) { - openArray("code"); - for (Coding e : element.getCode()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasPrefixElement()) { - composeStringCore("prefix", element.getPrefixElement(), false); - composeStringExtras("prefix", element.getPrefixElement(), false); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory(), false); - } - if (element.hasEnableWhen()) { - openArray("enableWhen"); - for (Questionnaire.QuestionnaireItemEnableWhenComponent e : element.getEnableWhen()) - composeQuestionnaireQuestionnaireItemEnableWhenComponent(null, e); - closeArray(); - }; - if (element.hasRequiredElement()) { - composeBooleanCore("required", element.getRequiredElement(), false); - composeBooleanExtras("required", element.getRequiredElement(), false); - } - if (element.hasRepeatsElement()) { - composeBooleanCore("repeats", element.getRepeatsElement(), false); - composeBooleanExtras("repeats", element.getRepeatsElement(), false); - } - if (element.hasReadOnlyElement()) { - composeBooleanCore("readOnly", element.getReadOnlyElement(), false); - composeBooleanExtras("readOnly", element.getReadOnlyElement(), false); - } - if (element.hasMaxLengthElement()) { - composeIntegerCore("maxLength", element.getMaxLengthElement(), false); - composeIntegerExtras("maxLength", element.getMaxLengthElement(), false); - } - if (element.hasOptions()) { - composeReference("options", element.getOptions()); - } - if (element.hasOption()) { - openArray("option"); - for (Questionnaire.QuestionnaireItemOptionComponent e : element.getOption()) - composeQuestionnaireQuestionnaireItemOptionComponent(null, e); - closeArray(); - }; - if (element.hasInitial()) { - composeType("initial", element.getInitial()); - } - if (element.hasItem()) { - openArray("item"); - for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) - composeQuestionnaireQuestionnaireItemComponent(null, e); - closeArray(); - }; - } - - protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(String name, Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { - if (element != null) { - open(name); - composeQuestionnaireQuestionnaireItemEnableWhenComponentInner(element); - close(); - } - } - - protected void composeQuestionnaireQuestionnaireItemEnableWhenComponentInner(Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { - composeBackbone(element); - if (element.hasQuestionElement()) { - composeStringCore("question", element.getQuestionElement(), false); - composeStringExtras("question", element.getQuestionElement(), false); - } - if (element.hasHasAnswerElement()) { - composeBooleanCore("hasAnswer", element.getHasAnswerElement(), false); - composeBooleanExtras("hasAnswer", element.getHasAnswerElement(), false); - } - if (element.hasAnswer()) { - composeType("answer", element.getAnswer()); - } - } - - protected void composeQuestionnaireQuestionnaireItemOptionComponent(String name, Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { - if (element != null) { - open(name); - composeQuestionnaireQuestionnaireItemOptionComponentInner(element); - close(); - } - } - - protected void composeQuestionnaireQuestionnaireItemOptionComponentInner(Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { - composeBackbone(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeQuestionnaireResponseInner(element); - } - } - - protected void composeQuestionnaireResponseInner(QuestionnaireResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasParent()) { - openArray("parent"); - for (Reference e : element.getParent()) - composeReference(null, e); - closeArray(); - }; - if (element.hasQuestionnaire()) { - composeReference("questionnaire", element.getQuestionnaire()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasAuthoredElement()) { - composeDateTimeCore("authored", element.getAuthoredElement(), false); - composeDateTimeExtras("authored", element.getAuthoredElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasItem()) { - openArray("item"); - for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) - composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e); - closeArray(); - }; - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { - if (element != null) { - open(name); - composeQuestionnaireResponseQuestionnaireResponseItemComponentInner(element); - close(); - } - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemComponentInner(QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasLinkIdElement()) { - composeStringCore("linkId", element.getLinkIdElement(), false); - composeStringExtras("linkId", element.getLinkIdElement(), false); - } - if (element.hasDefinitionElement()) { - composeUriCore("definition", element.getDefinitionElement(), false); - composeUriExtras("definition", element.getDefinitionElement(), false); - } - if (element.hasTextElement()) { - composeStringCore("text", element.getTextElement(), false); - composeStringExtras("text", element.getTextElement(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasAnswer()) { - openArray("answer"); - for (QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent e : element.getAnswer()) - composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(null, e); - closeArray(); - }; - if (element.hasItem()) { - openArray("item"); - for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) - composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e); - closeArray(); - }; - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { - if (element != null) { - open(name); - composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentInner(element); - close(); - } - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentInner(QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { - composeBackbone(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } - if (element.hasItem()) { - openArray("item"); - for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) - composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e); - closeArray(); - }; - } - - protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeRelatedPersonInner(element); - } - } - - protected void composeRelatedPersonInner(RelatedPerson element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasName()) { - openArray("name"); - for (HumanName e : element.getName()) - composeHumanName(null, e); - closeArray(); - }; - if (element.hasTelecom()) { - openArray("telecom"); - for (ContactPoint e : element.getTelecom()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasGenderElement()) { - composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); - } - if (element.hasBirthDateElement()) { - composeDateCore("birthDate", element.getBirthDateElement(), false); - composeDateExtras("birthDate", element.getBirthDateElement(), false); - } - if (element.hasAddress()) { - openArray("address"); - for (Address e : element.getAddress()) - composeAddress(null, e); - closeArray(); - }; - if (element.hasPhoto()) { - openArray("photo"); - for (Attachment e : element.getPhoto()) - composeAttachment(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeRequestGroup(String name, RequestGroup element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeRequestGroupInner(element); - } - } - - protected void composeRequestGroupInner(RequestGroup element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - openArray("definition"); - for (Reference e : element.getDefinition()) - composeReference(null, e); - closeArray(); - }; - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReplaces()) { - openArray("replaces"); - for (Reference e : element.getReplaces()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory(), false); - } - if (element.hasIntentElement()) { - composeEnumerationCore("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory(), false); - composeEnumerationExtras("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory(), false); - } - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory(), false); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasAction()) { - openArray("action"); - for (RequestGroup.RequestGroupActionComponent e : element.getAction()) - composeRequestGroupRequestGroupActionComponent(null, e); - closeArray(); - }; - } - - protected void composeRequestGroupRequestGroupActionComponent(String name, RequestGroup.RequestGroupActionComponent element) throws IOException { - if (element != null) { - open(name); - composeRequestGroupRequestGroupActionComponentInner(element); - close(); - } - } - - protected void composeRequestGroupRequestGroupActionComponentInner(RequestGroup.RequestGroupActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasLabelElement()) { - composeStringCore("label", element.getLabelElement(), false); - composeStringExtras("label", element.getLabelElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasTextEquivalentElement()) { - composeStringCore("textEquivalent", element.getTextEquivalentElement(), false); - composeStringExtras("textEquivalent", element.getTextEquivalentElement(), false); - } - if (element.hasCode()) { - openArray("code"); - for (CodeableConcept e : element.getCode()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDocumentation()) { - openArray("documentation"); - for (RelatedArtifact e : element.getDocumentation()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasCondition()) { - openArray("condition"); - for (RequestGroup.RequestGroupActionConditionComponent e : element.getCondition()) - composeRequestGroupRequestGroupActionConditionComponent(null, e); - closeArray(); - }; - if (element.hasRelatedAction()) { - openArray("relatedAction"); - for (RequestGroup.RequestGroupActionRelatedActionComponent e : element.getRelatedAction()) - composeRequestGroupRequestGroupActionRelatedActionComponent(null, e); - closeArray(); - }; - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } - if (element.hasParticipant()) { - openArray("participant"); - for (Reference e : element.getParticipant()) - composeReference(null, e); - closeArray(); - }; - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasGroupingBehaviorElement()) { - composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(), new RequestGroup.ActionGroupingBehaviorEnumFactory(), false); - composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(), new RequestGroup.ActionGroupingBehaviorEnumFactory(), false); - } - if (element.hasSelectionBehaviorElement()) { - composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(), new RequestGroup.ActionSelectionBehaviorEnumFactory(), false); - composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(), new RequestGroup.ActionSelectionBehaviorEnumFactory(), false); - } - if (element.hasRequiredBehaviorElement()) { - composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(), new RequestGroup.ActionRequiredBehaviorEnumFactory(), false); - composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(), new RequestGroup.ActionRequiredBehaviorEnumFactory(), false); - } - if (element.hasPrecheckBehaviorElement()) { - composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(), new RequestGroup.ActionPrecheckBehaviorEnumFactory(), false); - composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(), new RequestGroup.ActionPrecheckBehaviorEnumFactory(), false); - } - if (element.hasCardinalityBehaviorElement()) { - composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(), new RequestGroup.ActionCardinalityBehaviorEnumFactory(), false); - composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(), new RequestGroup.ActionCardinalityBehaviorEnumFactory(), false); - } - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - if (element.hasAction()) { - openArray("action"); - for (RequestGroup.RequestGroupActionComponent e : element.getAction()) - composeRequestGroupRequestGroupActionComponent(null, e); - closeArray(); - }; - } - - protected void composeRequestGroupRequestGroupActionConditionComponent(String name, RequestGroup.RequestGroupActionConditionComponent element) throws IOException { - if (element != null) { - open(name); - composeRequestGroupRequestGroupActionConditionComponentInner(element); - close(); - } - } - - protected void composeRequestGroupRequestGroupActionConditionComponentInner(RequestGroup.RequestGroupActionConditionComponent element) throws IOException { - composeBackbone(element); - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasLanguageElement()) { - composeStringCore("language", element.getLanguageElement(), false); - composeStringExtras("language", element.getLanguageElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - } - - protected void composeRequestGroupRequestGroupActionRelatedActionComponent(String name, RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { - if (element != null) { - open(name); - composeRequestGroupRequestGroupActionRelatedActionComponentInner(element); - close(); - } - } - - protected void composeRequestGroupRequestGroupActionRelatedActionComponentInner(RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasActionIdElement()) { - composeIdCore("actionId", element.getActionIdElement(), false); - composeIdExtras("actionId", element.getActionIdElement(), false); - } - if (element.hasRelationshipElement()) { - composeEnumerationCore("relationship", element.getRelationshipElement(), new RequestGroup.ActionRelationshipTypeEnumFactory(), false); - composeEnumerationExtras("relationship", element.getRelationshipElement(), new RequestGroup.ActionRelationshipTypeEnumFactory(), false); - } - if (element.hasOffset()) { - composeType("offset", element.getOffset()); - } - } - - protected void composeResearchStudy(String name, ResearchStudy element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeResearchStudyInner(element); - } - } - - protected void composeResearchStudyInner(ResearchStudy element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasProtocol()) { - openArray("protocol"); - for (Reference e : element.getProtocol()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasFocus()) { - openArray("focus"); - for (CodeableConcept e : element.getFocus()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasKeyword()) { - openArray("keyword"); - for (CodeableConcept e : element.getKeyword()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasEnrollment()) { - openArray("enrollment"); - for (Reference e : element.getEnrollment()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasSponsor()) { - composeReference("sponsor", element.getSponsor()); - } - if (element.hasPrincipalInvestigator()) { - composeReference("principalInvestigator", element.getPrincipalInvestigator()); - } - if (element.hasSite()) { - openArray("site"); - for (Reference e : element.getSite()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReasonStopped()) { - composeCodeableConcept("reasonStopped", element.getReasonStopped()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasArm()) { - openArray("arm"); - for (ResearchStudy.ResearchStudyArmComponent e : element.getArm()) - composeResearchStudyResearchStudyArmComponent(null, e); - closeArray(); - }; - } - - protected void composeResearchStudyResearchStudyArmComponent(String name, ResearchStudy.ResearchStudyArmComponent element) throws IOException { - if (element != null) { - open(name); - composeResearchStudyResearchStudyArmComponentInner(element); - close(); - } - } - - protected void composeResearchStudyResearchStudyArmComponentInner(ResearchStudy.ResearchStudyArmComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - } - - protected void composeResearchSubject(String name, ResearchSubject element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeResearchSubjectInner(element); - } - } - - protected void composeResearchSubjectInner(ResearchSubject element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasStudy()) { - composeReference("study", element.getStudy()); - } - if (element.hasIndividual()) { - composeReference("individual", element.getIndividual()); - } - if (element.hasAssignedArmElement()) { - composeStringCore("assignedArm", element.getAssignedArmElement(), false); - composeStringExtras("assignedArm", element.getAssignedArmElement(), false); - } - if (element.hasActualArmElement()) { - composeStringCore("actualArm", element.getActualArmElement(), false); - composeStringExtras("actualArm", element.getActualArmElement(), false); - } - if (element.hasConsent()) { - composeReference("consent", element.getConsent()); - } - } - - protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeRiskAssessmentInner(element); - } - } - - protected void composeRiskAssessmentInner(RiskAssessment element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasBasedOn()) { - composeReference("basedOn", element.getBasedOn()); - } - if (element.hasParent()) { - composeReference("parent", element.getParent()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory(), false); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasCondition()) { - composeReference("condition", element.getCondition()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } - if (element.hasBasis()) { - openArray("basis"); - for (Reference e : element.getBasis()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPrediction()) { - openArray("prediction"); - for (RiskAssessment.RiskAssessmentPredictionComponent e : element.getPrediction()) - composeRiskAssessmentRiskAssessmentPredictionComponent(null, e); - closeArray(); - }; - if (element.hasMitigationElement()) { - composeStringCore("mitigation", element.getMitigationElement(), false); - composeStringExtras("mitigation", element.getMitigationElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeRiskAssessmentRiskAssessmentPredictionComponent(String name, RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { - if (element != null) { - open(name); - composeRiskAssessmentRiskAssessmentPredictionComponentInner(element); - close(); - } - } - - protected void composeRiskAssessmentRiskAssessmentPredictionComponentInner(RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasProbability()) { - composeType("probability", element.getProbability()); - } - if (element.hasQualitativeRisk()) { - composeCodeableConcept("qualitativeRisk", element.getQualitativeRisk()); - } - if (element.hasRelativeRiskElement()) { - composeDecimalCore("relativeRisk", element.getRelativeRiskElement(), false); - composeDecimalExtras("relativeRisk", element.getRelativeRiskElement(), false); - } - if (element.hasWhen()) { - composeType("when", element.getWhen()); - } - if (element.hasRationaleElement()) { - composeStringCore("rationale", element.getRationaleElement(), false); - composeStringExtras("rationale", element.getRationaleElement(), false); - } - } - - protected void composeSchedule(String name, Schedule element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeScheduleInner(element); - } - } - - protected void composeScheduleInner(Schedule element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasActiveElement()) { - composeBooleanCore("active", element.getActiveElement(), false); - composeBooleanExtras("active", element.getActiveElement(), false); - } - if (element.hasServiceCategory()) { - composeCodeableConcept("serviceCategory", element.getServiceCategory()); - } - if (element.hasServiceType()) { - openArray("serviceType"); - for (CodeableConcept e : element.getServiceType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialty()) { - openArray("specialty"); - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasActor()) { - openArray("actor"); - for (Reference e : element.getActor()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPlanningHorizon()) { - composePeriod("planningHorizon", element.getPlanningHorizon()); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeSearchParameter(String name, SearchParameter element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSearchParameterInner(element); - } - } - - protected void composeSearchParameterInner(SearchParameter element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasBase()) { - openArray("base"); - for (CodeType e : element.getBase()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getBase())) { - openArray("_base"); - for (CodeType e : element.getBase()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); - } - if (element.hasDerivedFromElement()) { - composeUriCore("derivedFrom", element.getDerivedFromElement(), false); - composeUriExtras("derivedFrom", element.getDerivedFromElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - if (element.hasXpathElement()) { - composeStringCore("xpath", element.getXpathElement(), false); - composeStringExtras("xpath", element.getXpathElement(), false); - } - if (element.hasXpathUsageElement()) { - composeEnumerationCore("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory(), false); - composeEnumerationExtras("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory(), false); - } - if (element.hasTarget()) { - openArray("target"); - for (CodeType e : element.getTarget()) - composeCodeCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getTarget())) { - openArray("_target"); - for (CodeType e : element.getTarget()) - composeCodeExtras(null, e, true); - closeArray(); - } - }; - if (element.hasComparator()) { - openArray("comparator"); - for (Enumeration e : element.getComparator()) - composeEnumerationCore(null, e, new SearchParameter.SearchComparatorEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getComparator())) { - openArray("_comparator"); - for (Enumeration e : element.getComparator()) - composeEnumerationExtras(null, e, new SearchParameter.SearchComparatorEnumFactory(), true); - closeArray(); - } - }; - if (element.hasModifier()) { - openArray("modifier"); - for (Enumeration e : element.getModifier()) - composeEnumerationCore(null, e, new SearchParameter.SearchModifierCodeEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getModifier())) { - openArray("_modifier"); - for (Enumeration e : element.getModifier()) - composeEnumerationExtras(null, e, new SearchParameter.SearchModifierCodeEnumFactory(), true); - closeArray(); - } - }; - if (element.hasChain()) { - openArray("chain"); - for (StringType e : element.getChain()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getChain())) { - openArray("_chain"); - for (StringType e : element.getChain()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasComponent()) { - openArray("component"); - for (SearchParameter.SearchParameterComponentComponent e : element.getComponent()) - composeSearchParameterSearchParameterComponentComponent(null, e); - closeArray(); - }; - } - - protected void composeSearchParameterSearchParameterComponentComponent(String name, SearchParameter.SearchParameterComponentComponent element) throws IOException { - if (element != null) { - open(name); - composeSearchParameterSearchParameterComponentComponentInner(element); - close(); - } - } - - protected void composeSearchParameterSearchParameterComponentComponentInner(SearchParameter.SearchParameterComponentComponent element) throws IOException { - composeBackbone(element); - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - } - - protected void composeSequence(String name, Sequence element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSequenceInner(element); - } - } - - protected void composeSequenceInner(Sequence element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Sequence.SequenceTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Sequence.SequenceTypeEnumFactory(), false); - } - if (element.hasCoordinateSystemElement()) { - composeIntegerCore("coordinateSystem", element.getCoordinateSystemElement(), false); - composeIntegerExtras("coordinateSystem", element.getCoordinateSystemElement(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasSpecimen()) { - composeReference("specimen", element.getSpecimen()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasQuantity()) { - composeQuantity("quantity", element.getQuantity()); - } - if (element.hasReferenceSeq()) { - composeSequenceSequenceReferenceSeqComponent("referenceSeq", element.getReferenceSeq()); - } - if (element.hasVariant()) { - openArray("variant"); - for (Sequence.SequenceVariantComponent e : element.getVariant()) - composeSequenceSequenceVariantComponent(null, e); - closeArray(); - }; - if (element.hasObservedSeqElement()) { - composeStringCore("observedSeq", element.getObservedSeqElement(), false); - composeStringExtras("observedSeq", element.getObservedSeqElement(), false); - } - if (element.hasQuality()) { - openArray("quality"); - for (Sequence.SequenceQualityComponent e : element.getQuality()) - composeSequenceSequenceQualityComponent(null, e); - closeArray(); - }; - if (element.hasReadCoverageElement()) { - composeIntegerCore("readCoverage", element.getReadCoverageElement(), false); - composeIntegerExtras("readCoverage", element.getReadCoverageElement(), false); - } - if (element.hasRepository()) { - openArray("repository"); - for (Sequence.SequenceRepositoryComponent e : element.getRepository()) - composeSequenceSequenceRepositoryComponent(null, e); - closeArray(); - }; - if (element.hasPointer()) { - openArray("pointer"); - for (Reference e : element.getPointer()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeSequenceSequenceReferenceSeqComponent(String name, Sequence.SequenceReferenceSeqComponent element) throws IOException { - if (element != null) { - open(name); - composeSequenceSequenceReferenceSeqComponentInner(element); - close(); - } - } - - protected void composeSequenceSequenceReferenceSeqComponentInner(Sequence.SequenceReferenceSeqComponent element) throws IOException { - composeBackbone(element); - if (element.hasChromosome()) { - composeCodeableConcept("chromosome", element.getChromosome()); - } - if (element.hasGenomeBuildElement()) { - composeStringCore("genomeBuild", element.getGenomeBuildElement(), false); - composeStringExtras("genomeBuild", element.getGenomeBuildElement(), false); - } - if (element.hasReferenceSeqId()) { - composeCodeableConcept("referenceSeqId", element.getReferenceSeqId()); - } - if (element.hasReferenceSeqPointer()) { - composeReference("referenceSeqPointer", element.getReferenceSeqPointer()); - } - if (element.hasReferenceSeqStringElement()) { - composeStringCore("referenceSeqString", element.getReferenceSeqStringElement(), false); - composeStringExtras("referenceSeqString", element.getReferenceSeqStringElement(), false); - } - if (element.hasStrandElement()) { - composeIntegerCore("strand", element.getStrandElement(), false); - composeIntegerExtras("strand", element.getStrandElement(), false); - } - if (element.hasWindowStartElement()) { - composeIntegerCore("windowStart", element.getWindowStartElement(), false); - composeIntegerExtras("windowStart", element.getWindowStartElement(), false); - } - if (element.hasWindowEndElement()) { - composeIntegerCore("windowEnd", element.getWindowEndElement(), false); - composeIntegerExtras("windowEnd", element.getWindowEndElement(), false); - } - } - - protected void composeSequenceSequenceVariantComponent(String name, Sequence.SequenceVariantComponent element) throws IOException { - if (element != null) { - open(name); - composeSequenceSequenceVariantComponentInner(element); - close(); - } - } - - protected void composeSequenceSequenceVariantComponentInner(Sequence.SequenceVariantComponent element) throws IOException { - composeBackbone(element); - if (element.hasStartElement()) { - composeIntegerCore("start", element.getStartElement(), false); - composeIntegerExtras("start", element.getStartElement(), false); - } - if (element.hasEndElement()) { - composeIntegerCore("end", element.getEndElement(), false); - composeIntegerExtras("end", element.getEndElement(), false); - } - if (element.hasObservedAlleleElement()) { - composeStringCore("observedAllele", element.getObservedAlleleElement(), false); - composeStringExtras("observedAllele", element.getObservedAlleleElement(), false); - } - if (element.hasReferenceAlleleElement()) { - composeStringCore("referenceAllele", element.getReferenceAlleleElement(), false); - composeStringExtras("referenceAllele", element.getReferenceAlleleElement(), false); - } - if (element.hasCigarElement()) { - composeStringCore("cigar", element.getCigarElement(), false); - composeStringExtras("cigar", element.getCigarElement(), false); - } - if (element.hasVariantPointer()) { - composeReference("variantPointer", element.getVariantPointer()); - } - } - - protected void composeSequenceSequenceQualityComponent(String name, Sequence.SequenceQualityComponent element) throws IOException { - if (element != null) { - open(name); - composeSequenceSequenceQualityComponentInner(element); - close(); - } - } - - protected void composeSequenceSequenceQualityComponentInner(Sequence.SequenceQualityComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Sequence.QualityTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Sequence.QualityTypeEnumFactory(), false); - } - if (element.hasStandardSequence()) { - composeCodeableConcept("standardSequence", element.getStandardSequence()); - } - if (element.hasStartElement()) { - composeIntegerCore("start", element.getStartElement(), false); - composeIntegerExtras("start", element.getStartElement(), false); - } - if (element.hasEndElement()) { - composeIntegerCore("end", element.getEndElement(), false); - composeIntegerExtras("end", element.getEndElement(), false); - } - if (element.hasScore()) { - composeQuantity("score", element.getScore()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasTruthTPElement()) { - composeDecimalCore("truthTP", element.getTruthTPElement(), false); - composeDecimalExtras("truthTP", element.getTruthTPElement(), false); - } - if (element.hasQueryTPElement()) { - composeDecimalCore("queryTP", element.getQueryTPElement(), false); - composeDecimalExtras("queryTP", element.getQueryTPElement(), false); - } - if (element.hasTruthFNElement()) { - composeDecimalCore("truthFN", element.getTruthFNElement(), false); - composeDecimalExtras("truthFN", element.getTruthFNElement(), false); - } - if (element.hasQueryFPElement()) { - composeDecimalCore("queryFP", element.getQueryFPElement(), false); - composeDecimalExtras("queryFP", element.getQueryFPElement(), false); - } - if (element.hasGtFPElement()) { - composeDecimalCore("gtFP", element.getGtFPElement(), false); - composeDecimalExtras("gtFP", element.getGtFPElement(), false); - } - if (element.hasPrecisionElement()) { - composeDecimalCore("precision", element.getPrecisionElement(), false); - composeDecimalExtras("precision", element.getPrecisionElement(), false); - } - if (element.hasRecallElement()) { - composeDecimalCore("recall", element.getRecallElement(), false); - composeDecimalExtras("recall", element.getRecallElement(), false); - } - if (element.hasFScoreElement()) { - composeDecimalCore("fScore", element.getFScoreElement(), false); - composeDecimalExtras("fScore", element.getFScoreElement(), false); - } - } - - protected void composeSequenceSequenceRepositoryComponent(String name, Sequence.SequenceRepositoryComponent element) throws IOException { - if (element != null) { - open(name); - composeSequenceSequenceRepositoryComponentInner(element); - close(); - } - } - - protected void composeSequenceSequenceRepositoryComponentInner(Sequence.SequenceRepositoryComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Sequence.RepositoryTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Sequence.RepositoryTypeEnumFactory(), false); - } - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDatasetIdElement()) { - composeStringCore("datasetId", element.getDatasetIdElement(), false); - composeStringExtras("datasetId", element.getDatasetIdElement(), false); - } - if (element.hasVariantsetIdElement()) { - composeStringCore("variantsetId", element.getVariantsetIdElement(), false); - composeStringExtras("variantsetId", element.getVariantsetIdElement(), false); - } - if (element.hasReadsetIdElement()) { - composeStringCore("readsetId", element.getReadsetIdElement(), false); - composeStringExtras("readsetId", element.getReadsetIdElement(), false); - } - } - - protected void composeServiceDefinition(String name, ServiceDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeServiceDefinitionInner(element); - } - } - - protected void composeServiceDefinitionInner(ServiceDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasUsageElement()) { - composeStringCore("usage", element.getUsageElement(), false); - composeStringExtras("usage", element.getUsageElement(), false); - } - if (element.hasApprovalDateElement()) { - composeDateCore("approvalDate", element.getApprovalDateElement(), false); - composeDateExtras("approvalDate", element.getApprovalDateElement(), false); - } - if (element.hasLastReviewDateElement()) { - composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); - composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasTopic()) { - openArray("topic"); - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasContributor()) { - openArray("contributor"); - for (Contributor e : element.getContributor()) - composeContributor(null, e); - closeArray(); - }; - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasRelatedArtifact()) { - openArray("relatedArtifact"); - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact(null, e); - closeArray(); - }; - if (element.hasTrigger()) { - openArray("trigger"); - for (TriggerDefinition e : element.getTrigger()) - composeTriggerDefinition(null, e); - closeArray(); - }; - if (element.hasDataRequirement()) { - openArray("dataRequirement"); - for (DataRequirement e : element.getDataRequirement()) - composeDataRequirement(null, e); - closeArray(); - }; - if (element.hasOperationDefinition()) { - composeReference("operationDefinition", element.getOperationDefinition()); - } - } - - protected void composeSlot(String name, Slot element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSlotInner(element); - } - } - - protected void composeSlotInner(Slot element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasServiceCategory()) { - composeCodeableConcept("serviceCategory", element.getServiceCategory()); - } - if (element.hasServiceType()) { - openArray("serviceType"); - for (CodeableConcept e : element.getServiceType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasSpecialty()) { - openArray("specialty"); - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasAppointmentType()) { - composeCodeableConcept("appointmentType", element.getAppointmentType()); - } - if (element.hasSchedule()) { - composeReference("schedule", element.getSchedule()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory(), false); - } - if (element.hasStartElement()) { - composeInstantCore("start", element.getStartElement(), false); - composeInstantExtras("start", element.getStartElement(), false); - } - if (element.hasEndElement()) { - composeInstantCore("end", element.getEndElement(), false); - composeInstantExtras("end", element.getEndElement(), false); - } - if (element.hasOverbookedElement()) { - composeBooleanCore("overbooked", element.getOverbookedElement(), false); - composeBooleanExtras("overbooked", element.getOverbookedElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeSpecimen(String name, Specimen element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSpecimenInner(element); - } - } - - protected void composeSpecimenInner(Specimen element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasAccessionIdentifier()) { - composeIdentifier("accessionIdentifier", element.getAccessionIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasReceivedTimeElement()) { - composeDateTimeCore("receivedTime", element.getReceivedTimeElement(), false); - composeDateTimeExtras("receivedTime", element.getReceivedTimeElement(), false); - } - if (element.hasParent()) { - openArray("parent"); - for (Reference e : element.getParent()) - composeReference(null, e); - closeArray(); - }; - if (element.hasRequest()) { - openArray("request"); - for (Reference e : element.getRequest()) - composeReference(null, e); - closeArray(); - }; - if (element.hasCollection()) { - composeSpecimenSpecimenCollectionComponent("collection", element.getCollection()); - } - if (element.hasProcessing()) { - openArray("processing"); - for (Specimen.SpecimenProcessingComponent e : element.getProcessing()) - composeSpecimenSpecimenProcessingComponent(null, e); - closeArray(); - }; - if (element.hasContainer()) { - openArray("container"); - for (Specimen.SpecimenContainerComponent e : element.getContainer()) - composeSpecimenSpecimenContainerComponent(null, e); - closeArray(); - }; - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - protected void composeSpecimenSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element) throws IOException { - if (element != null) { - open(name); - composeSpecimenSpecimenCollectionComponentInner(element); - close(); - } - } - - protected void composeSpecimenSpecimenCollectionComponentInner(Specimen.SpecimenCollectionComponent element) throws IOException { - composeBackbone(element); - if (element.hasCollector()) { - composeReference("collector", element.getCollector()); - } - if (element.hasCollected()) { - composeType("collected", element.getCollected()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - } - - protected void composeSpecimenSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element) throws IOException { - if (element != null) { - open(name); - composeSpecimenSpecimenProcessingComponentInner(element); - close(); - } - } - - protected void composeSpecimenSpecimenProcessingComponentInner(Specimen.SpecimenProcessingComponent element) throws IOException { - composeBackbone(element); - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasProcedure()) { - composeCodeableConcept("procedure", element.getProcedure()); - } - if (element.hasAdditive()) { - openArray("additive"); - for (Reference e : element.getAdditive()) - composeReference(null, e); - closeArray(); - }; - if (element.hasTime()) { - composeType("time", element.getTime()); - } - } - - protected void composeSpecimenSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element) throws IOException { - if (element != null) { - open(name); - composeSpecimenSpecimenContainerComponentInner(element); - close(); - } - } - - protected void composeSpecimenSpecimenContainerComponentInner(Specimen.SpecimenContainerComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasCapacity()) { - composeSimpleQuantity("capacity", element.getCapacity()); - } - if (element.hasSpecimenQuantity()) { - composeSimpleQuantity("specimenQuantity", element.getSpecimenQuantity()); - } - if (element.hasAdditive()) { - composeType("additive", element.getAdditive()); - } - } - - protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeStructureDefinitionInner(element); - } - } - - protected void composeStructureDefinitionInner(StructureDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasKeyword()) { - openArray("keyword"); - for (Coding e : element.getKeyword()) - composeCoding(null, e); - closeArray(); - }; - if (element.hasFhirVersionElement()) { - composeIdCore("fhirVersion", element.getFhirVersionElement(), false); - composeIdExtras("fhirVersion", element.getFhirVersionElement(), false); - } - if (element.hasMapping()) { - openArray("mapping"); - for (StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping()) - composeStructureDefinitionStructureDefinitionMappingComponent(null, e); - closeArray(); - }; - if (element.hasKindElement()) { - composeEnumerationCore("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory(), false); - composeEnumerationExtras("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory(), false); - } - if (element.hasAbstractElement()) { - composeBooleanCore("abstract", element.getAbstractElement(), false); - composeBooleanExtras("abstract", element.getAbstractElement(), false); - } - if (element.hasContextTypeElement()) { - composeEnumerationCore("contextType", element.getContextTypeElement(), new StructureDefinition.ExtensionContextEnumFactory(), false); - composeEnumerationExtras("contextType", element.getContextTypeElement(), new StructureDefinition.ExtensionContextEnumFactory(), false); - } - if (element.hasContext()) { - openArray("context"); - for (StringType e : element.getContext()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getContext())) { - openArray("_context"); - for (StringType e : element.getContext()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasContextInvariant()) { - openArray("contextInvariant"); - for (StringType e : element.getContextInvariant()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getContextInvariant())) { - openArray("_contextInvariant"); - for (StringType e : element.getContextInvariant()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - if (element.hasTypeElement()) { - composeCodeCore("type", element.getTypeElement(), false); - composeCodeExtras("type", element.getTypeElement(), false); - } - if (element.hasBaseDefinitionElement()) { - composeUriCore("baseDefinition", element.getBaseDefinitionElement(), false); - composeUriExtras("baseDefinition", element.getBaseDefinitionElement(), false); - } - if (element.hasDerivationElement()) { - composeEnumerationCore("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory(), false); - composeEnumerationExtras("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory(), false); - } - if (element.hasSnapshot()) { - composeStructureDefinitionStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot()); - } - if (element.hasDifferential()) { - composeStructureDefinitionStructureDefinitionDifferentialComponent("differential", element.getDifferential()); - } - } - - protected void composeStructureDefinitionStructureDefinitionMappingComponent(String name, StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureDefinitionStructureDefinitionMappingComponentInner(element); - close(); - } - } - - protected void composeStructureDefinitionStructureDefinitionMappingComponentInner(StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentityElement()) { - composeIdCore("identity", element.getIdentityElement(), false); - composeIdExtras("identity", element.getIdentityElement(), false); - } - if (element.hasUriElement()) { - composeUriCore("uri", element.getUriElement(), false); - composeUriExtras("uri", element.getUriElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasCommentElement()) { - composeStringCore("comment", element.getCommentElement(), false); - composeStringExtras("comment", element.getCommentElement(), false); - } - } - - protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(String name, StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureDefinitionStructureDefinitionSnapshotComponentInner(element); - close(); - } - } - - protected void composeStructureDefinitionStructureDefinitionSnapshotComponentInner(StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { - composeBackbone(element); - if (element.hasElement()) { - openArray("element"); - for (ElementDefinition e : element.getElement()) - composeElementDefinition(null, e); - closeArray(); - }; - } - - protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(String name, StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureDefinitionStructureDefinitionDifferentialComponentInner(element); - close(); - } - } - - protected void composeStructureDefinitionStructureDefinitionDifferentialComponentInner(StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { - composeBackbone(element); - if (element.hasElement()) { - openArray("element"); - for (ElementDefinition e : element.getElement()) - composeElementDefinition(null, e); - closeArray(); - }; - } - - protected void composeStructureMap(String name, StructureMap element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeStructureMapInner(element); - } - } - - protected void composeStructureMapInner(StructureMap element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasStructure()) { - openArray("structure"); - for (StructureMap.StructureMapStructureComponent e : element.getStructure()) - composeStructureMapStructureMapStructureComponent(null, e); - closeArray(); - }; - if (element.hasImport()) { - openArray("import"); - for (UriType e : element.getImport()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getImport())) { - openArray("_import"); - for (UriType e : element.getImport()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasGroup()) { - openArray("group"); - for (StructureMap.StructureMapGroupComponent e : element.getGroup()) - composeStructureMapStructureMapGroupComponent(null, e); - closeArray(); - }; - } - - protected void composeStructureMapStructureMapStructureComponent(String name, StructureMap.StructureMapStructureComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapStructureComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapStructureComponentInner(StructureMap.StructureMapStructureComponent element) throws IOException { - composeBackbone(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory(), false); - } - if (element.hasAliasElement()) { - composeStringCore("alias", element.getAliasElement(), false); - composeStringExtras("alias", element.getAliasElement(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeStructureMapStructureMapGroupComponent(String name, StructureMap.StructureMapGroupComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupComponentInner(StructureMap.StructureMapGroupComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeIdCore("name", element.getNameElement(), false); - composeIdExtras("name", element.getNameElement(), false); - } - if (element.hasExtendsElement()) { - composeIdCore("extends", element.getExtendsElement(), false); - composeIdExtras("extends", element.getExtendsElement(), false); - } - if (element.hasTypeModeElement()) { - composeEnumerationCore("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory(), false); - composeEnumerationExtras("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - if (element.hasInput()) { - openArray("input"); - for (StructureMap.StructureMapGroupInputComponent e : element.getInput()) - composeStructureMapStructureMapGroupInputComponent(null, e); - closeArray(); - }; - if (element.hasRule()) { - openArray("rule"); - for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) - composeStructureMapStructureMapGroupRuleComponent(null, e); - closeArray(); - }; - } - - protected void composeStructureMapStructureMapGroupInputComponent(String name, StructureMap.StructureMapGroupInputComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupInputComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupInputComponentInner(StructureMap.StructureMapGroupInputComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeIdCore("name", element.getNameElement(), false); - composeIdExtras("name", element.getNameElement(), false); - } - if (element.hasTypeElement()) { - composeStringCore("type", element.getTypeElement(), false); - composeStringExtras("type", element.getTypeElement(), false); - } - if (element.hasModeElement()) { - composeEnumerationCore("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory(), false); - composeEnumerationExtras("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory(), false); - } - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeStructureMapStructureMapGroupRuleComponent(String name, StructureMap.StructureMapGroupRuleComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupRuleComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupRuleComponentInner(StructureMap.StructureMapGroupRuleComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeIdCore("name", element.getNameElement(), false); - composeIdExtras("name", element.getNameElement(), false); - } - if (element.hasSource()) { - openArray("source"); - for (StructureMap.StructureMapGroupRuleSourceComponent e : element.getSource()) - composeStructureMapStructureMapGroupRuleSourceComponent(null, e); - closeArray(); - }; - if (element.hasTarget()) { - openArray("target"); - for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget()) - composeStructureMapStructureMapGroupRuleTargetComponent(null, e); - closeArray(); - }; - if (element.hasRule()) { - openArray("rule"); - for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) - composeStructureMapStructureMapGroupRuleComponent(null, e); - closeArray(); - }; - if (element.hasDependent()) { - openArray("dependent"); - for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent()) - composeStructureMapStructureMapGroupRuleDependentComponent(null, e); - closeArray(); - }; - if (element.hasDocumentationElement()) { - composeStringCore("documentation", element.getDocumentationElement(), false); - composeStringExtras("documentation", element.getDocumentationElement(), false); - } - } - - protected void composeStructureMapStructureMapGroupRuleSourceComponent(String name, StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupRuleSourceComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupRuleSourceComponentInner(StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { - composeBackbone(element); - if (element.hasContextElement()) { - composeIdCore("context", element.getContextElement(), false); - composeIdExtras("context", element.getContextElement(), false); - } - if (element.hasMinElement()) { - composeIntegerCore("min", element.getMinElement(), false); - composeIntegerExtras("min", element.getMinElement(), false); - } - if (element.hasMaxElement()) { - composeStringCore("max", element.getMaxElement(), false); - composeStringExtras("max", element.getMaxElement(), false); - } - if (element.hasTypeElement()) { - composeStringCore("type", element.getTypeElement(), false); - composeStringExtras("type", element.getTypeElement(), false); - } - if (element.hasDefaultValue()) { - composeType("defaultValue", element.getDefaultValue()); - } - if (element.hasElementElement()) { - composeStringCore("element", element.getElementElement(), false); - composeStringExtras("element", element.getElementElement(), false); - } - if (element.hasListModeElement()) { - composeEnumerationCore("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory(), false); - composeEnumerationExtras("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory(), false); - } - if (element.hasVariableElement()) { - composeIdCore("variable", element.getVariableElement(), false); - composeIdExtras("variable", element.getVariableElement(), false); - } - if (element.hasConditionElement()) { - composeStringCore("condition", element.getConditionElement(), false); - composeStringExtras("condition", element.getConditionElement(), false); - } - if (element.hasCheckElement()) { - composeStringCore("check", element.getCheckElement(), false); - composeStringExtras("check", element.getCheckElement(), false); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetComponent(String name, StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupRuleTargetComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetComponentInner(StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { - composeBackbone(element); - if (element.hasContextElement()) { - composeIdCore("context", element.getContextElement(), false); - composeIdExtras("context", element.getContextElement(), false); - } - if (element.hasContextTypeElement()) { - composeEnumerationCore("contextType", element.getContextTypeElement(), new StructureMap.StructureMapContextTypeEnumFactory(), false); - composeEnumerationExtras("contextType", element.getContextTypeElement(), new StructureMap.StructureMapContextTypeEnumFactory(), false); - } - if (element.hasElementElement()) { - composeStringCore("element", element.getElementElement(), false); - composeStringExtras("element", element.getElementElement(), false); - } - if (element.hasVariableElement()) { - composeIdCore("variable", element.getVariableElement(), false); - composeIdExtras("variable", element.getVariableElement(), false); - } - if (element.hasListMode()) { - openArray("listMode"); - for (Enumeration e : element.getListMode()) - composeEnumerationCore(null, e, new StructureMap.StructureMapTargetListModeEnumFactory(), true); - closeArray(); - if (anyHasExtras(element.getListMode())) { - openArray("_listMode"); - for (Enumeration e : element.getListMode()) - composeEnumerationExtras(null, e, new StructureMap.StructureMapTargetListModeEnumFactory(), true); - closeArray(); - } - }; - if (element.hasListRuleIdElement()) { - composeIdCore("listRuleId", element.getListRuleIdElement(), false); - composeIdExtras("listRuleId", element.getListRuleIdElement(), false); - } - if (element.hasTransformElement()) { - composeEnumerationCore("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory(), false); - composeEnumerationExtras("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory(), false); - } - if (element.hasParameter()) { - openArray("parameter"); - for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter()) - composeStructureMapStructureMapGroupRuleTargetParameterComponent(null, e); - closeArray(); - }; - } - - protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupRuleTargetParameterComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetParameterComponentInner(StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { - composeBackbone(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeStructureMapStructureMapGroupRuleDependentComponent(String name, StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { - if (element != null) { - open(name); - composeStructureMapStructureMapGroupRuleDependentComponentInner(element); - close(); - } - } - - protected void composeStructureMapStructureMapGroupRuleDependentComponentInner(StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeIdCore("name", element.getNameElement(), false); - composeIdExtras("name", element.getNameElement(), false); - } - if (element.hasVariable()) { - openArray("variable"); - for (StringType e : element.getVariable()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getVariable())) { - openArray("_variable"); - for (StringType e : element.getVariable()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeSubscription(String name, Subscription element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSubscriptionInner(element); - } - } - - protected void composeSubscriptionInner(Subscription element) throws IOException { - composeDomainResourceElements(element); - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactPoint e : element.getContact()) - composeContactPoint(null, e); - closeArray(); - }; - if (element.hasEndElement()) { - composeInstantCore("end", element.getEndElement(), false); - composeInstantExtras("end", element.getEndElement(), false); - } - if (element.hasReasonElement()) { - composeStringCore("reason", element.getReasonElement(), false); - composeStringExtras("reason", element.getReasonElement(), false); - } - if (element.hasCriteriaElement()) { - composeStringCore("criteria", element.getCriteriaElement(), false); - composeStringExtras("criteria", element.getCriteriaElement(), false); - } - if (element.hasErrorElement()) { - composeStringCore("error", element.getErrorElement(), false); - composeStringExtras("error", element.getErrorElement(), false); - } - if (element.hasChannel()) { - composeSubscriptionSubscriptionChannelComponent("channel", element.getChannel()); - } - if (element.hasTag()) { - openArray("tag"); - for (Coding e : element.getTag()) - composeCoding(null, e); - closeArray(); - }; - } - - protected void composeSubscriptionSubscriptionChannelComponent(String name, Subscription.SubscriptionChannelComponent element) throws IOException { - if (element != null) { - open(name); - composeSubscriptionSubscriptionChannelComponentInner(element); - close(); - } - } - - protected void composeSubscriptionSubscriptionChannelComponentInner(Subscription.SubscriptionChannelComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory(), false); - } - if (element.hasEndpointElement()) { - composeUriCore("endpoint", element.getEndpointElement(), false); - composeUriExtras("endpoint", element.getEndpointElement(), false); - } - if (element.hasPayloadElement()) { - composeStringCore("payload", element.getPayloadElement(), false); - composeStringExtras("payload", element.getPayloadElement(), false); - } - if (element.hasHeader()) { - openArray("header"); - for (StringType e : element.getHeader()) - composeStringCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getHeader())) { - openArray("_header"); - for (StringType e : element.getHeader()) - composeStringExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeSubstance(String name, Substance element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSubstanceInner(element); - } - } - - protected void composeSubstanceInner(Substance element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory(), false); - } - if (element.hasCategory()) { - openArray("category"); - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasInstance()) { - openArray("instance"); - for (Substance.SubstanceInstanceComponent e : element.getInstance()) - composeSubstanceSubstanceInstanceComponent(null, e); - closeArray(); - }; - if (element.hasIngredient()) { - openArray("ingredient"); - for (Substance.SubstanceIngredientComponent e : element.getIngredient()) - composeSubstanceSubstanceIngredientComponent(null, e); - closeArray(); - }; - } - - protected void composeSubstanceSubstanceInstanceComponent(String name, Substance.SubstanceInstanceComponent element) throws IOException { - if (element != null) { - open(name); - composeSubstanceSubstanceInstanceComponentInner(element); - close(); - } - } - - protected void composeSubstanceSubstanceInstanceComponentInner(Substance.SubstanceInstanceComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasExpiryElement()) { - composeDateTimeCore("expiry", element.getExpiryElement(), false); - composeDateTimeExtras("expiry", element.getExpiryElement(), false); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - } - - protected void composeSubstanceSubstanceIngredientComponent(String name, Substance.SubstanceIngredientComponent element) throws IOException { - if (element != null) { - open(name); - composeSubstanceSubstanceIngredientComponentInner(element); - close(); - } - } - - protected void composeSubstanceSubstanceIngredientComponentInner(Substance.SubstanceIngredientComponent element) throws IOException { - composeBackbone(element); - if (element.hasQuantity()) { - composeRatio("quantity", element.getQuantity()); - } - if (element.hasSubstance()) { - composeType("substance", element.getSubstance()); - } - } - - protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSupplyDeliveryInner(element); - } - } - - protected void composeSupplyDeliveryInner(SupplyDelivery element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSuppliedItem()) { - composeSupplyDeliverySupplyDeliverySuppliedItemComponent("suppliedItem", element.getSuppliedItem()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasSupplier()) { - composeReference("supplier", element.getSupplier()); - } - if (element.hasDestination()) { - composeReference("destination", element.getDestination()); - } - if (element.hasReceiver()) { - openArray("receiver"); - for (Reference e : element.getReceiver()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { - if (element != null) { - open(name); - composeSupplyDeliverySupplyDeliverySuppliedItemComponentInner(element); - close(); - } - } - - protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponentInner(SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasItem()) { - composeType("item", element.getItem()); - } - } - - protected void composeSupplyRequest(String name, SupplyRequest element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeSupplyRequestInner(element); - } - } - - protected void composeSupplyRequestInner(SupplyRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory(), false); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory(), false); - } - if (element.hasOrderedItem()) { - composeSupplyRequestSupplyRequestOrderedItemComponent("orderedItem", element.getOrderedItem()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasRequester()) { - composeSupplyRequestSupplyRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasSupplier()) { - openArray("supplier"); - for (Reference e : element.getSupplier()) - composeReference(null, e); - closeArray(); - }; - if (element.hasReason()) { - composeType("reason", element.getReason()); - } - if (element.hasDeliverFrom()) { - composeReference("deliverFrom", element.getDeliverFrom()); - } - if (element.hasDeliverTo()) { - composeReference("deliverTo", element.getDeliverTo()); - } - } - - protected void composeSupplyRequestSupplyRequestOrderedItemComponent(String name, SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { - if (element != null) { - open(name); - composeSupplyRequestSupplyRequestOrderedItemComponentInner(element); - close(); - } - } - - protected void composeSupplyRequestSupplyRequestOrderedItemComponentInner(SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { - composeBackbone(element); - if (element.hasQuantity()) { - composeQuantity("quantity", element.getQuantity()); - } - if (element.hasItem()) { - composeType("item", element.getItem()); - } - } - - protected void composeSupplyRequestSupplyRequestRequesterComponent(String name, SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { - if (element != null) { - open(name); - composeSupplyRequestSupplyRequestRequesterComponentInner(element); - close(); - } - } - - protected void composeSupplyRequestSupplyRequestRequesterComponentInner(SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeTask(String name, Task element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeTaskInner(element); - } - } - - protected void composeTaskInner(Task element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasDefinition()) { - composeType("definition", element.getDefinition()); - } - if (element.hasBasedOn()) { - openArray("basedOn"); - for (Reference e : element.getBasedOn()) - composeReference(null, e); - closeArray(); - }; - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasPartOf()) { - openArray("partOf"); - for (Reference e : element.getPartOf()) - composeReference(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Task.TaskStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Task.TaskStatusEnumFactory(), false); - } - if (element.hasStatusReason()) { - composeCodeableConcept("statusReason", element.getStatusReason()); - } - if (element.hasBusinessStatus()) { - composeCodeableConcept("businessStatus", element.getBusinessStatus()); - } - if (element.hasIntentElement()) { - composeEnumerationCore("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory(), false); - composeEnumerationExtras("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory(), false); - } - if (element.hasPriorityElement()) { - composeEnumerationCore("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory(), false); - composeEnumerationExtras("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory(), false); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasFocus()) { - composeReference("focus", element.getFocus()); - } - if (element.hasFor()) { - composeReference("for", element.getFor()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasExecutionPeriod()) { - composePeriod("executionPeriod", element.getExecutionPeriod()); - } - if (element.hasAuthoredOnElement()) { - composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); - composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); - } - if (element.hasLastModifiedElement()) { - composeDateTimeCore("lastModified", element.getLastModifiedElement(), false); - composeDateTimeExtras("lastModified", element.getLastModifiedElement(), false); - } - if (element.hasRequester()) { - composeTaskTaskRequesterComponent("requester", element.getRequester()); - } - if (element.hasPerformerType()) { - openArray("performerType"); - for (CodeableConcept e : element.getPerformerType()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasOwner()) { - composeReference("owner", element.getOwner()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - if (element.hasRelevantHistory()) { - openArray("relevantHistory"); - for (Reference e : element.getRelevantHistory()) - composeReference(null, e); - closeArray(); - }; - if (element.hasRestriction()) { - composeTaskTaskRestrictionComponent("restriction", element.getRestriction()); - } - if (element.hasInput()) { - openArray("input"); - for (Task.ParameterComponent e : element.getInput()) - composeTaskParameterComponent(null, e); - closeArray(); - }; - if (element.hasOutput()) { - openArray("output"); - for (Task.TaskOutputComponent e : element.getOutput()) - composeTaskTaskOutputComponent(null, e); - closeArray(); - }; - } - - protected void composeTaskTaskRequesterComponent(String name, Task.TaskRequesterComponent element) throws IOException { - if (element != null) { - open(name); - composeTaskTaskRequesterComponentInner(element); - close(); - } - } - - protected void composeTaskTaskRequesterComponentInner(Task.TaskRequesterComponent element) throws IOException { - composeBackbone(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeTaskTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element) throws IOException { - if (element != null) { - open(name); - composeTaskTaskRestrictionComponentInner(element); - close(); - } - } - - protected void composeTaskTaskRestrictionComponentInner(Task.TaskRestrictionComponent element) throws IOException { - composeBackbone(element); - if (element.hasRepetitionsElement()) { - composePositiveIntCore("repetitions", element.getRepetitionsElement(), false); - composePositiveIntExtras("repetitions", element.getRepetitionsElement(), false); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasRecipient()) { - openArray("recipient"); - for (Reference e : element.getRecipient()) - composeReference(null, e); - closeArray(); - }; - } - - protected void composeTaskParameterComponent(String name, Task.ParameterComponent element) throws IOException { - if (element != null) { - open(name); - composeTaskParameterComponentInner(element); - close(); - } - } - - protected void composeTaskParameterComponentInner(Task.ParameterComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeTaskTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException { - if (element != null) { - open(name); - composeTaskTaskOutputComponentInner(element); - close(); - } - } - - protected void composeTaskTaskOutputComponentInner(Task.TaskOutputComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeTestReport(String name, TestReport element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeTestReportInner(element); - } - } - - protected void composeTestReportInner(TestReport element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory(), false); - } - if (element.hasTestScript()) { - composeReference("testScript", element.getTestScript()); - } - if (element.hasResultElement()) { - composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory(), false); - composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory(), false); - } - if (element.hasScoreElement()) { - composeDecimalCore("score", element.getScoreElement(), false); - composeDecimalExtras("score", element.getScoreElement(), false); - } - if (element.hasTesterElement()) { - composeStringCore("tester", element.getTesterElement(), false); - composeStringExtras("tester", element.getTesterElement(), false); - } - if (element.hasIssuedElement()) { - composeDateTimeCore("issued", element.getIssuedElement(), false); - composeDateTimeExtras("issued", element.getIssuedElement(), false); - } - if (element.hasParticipant()) { - openArray("participant"); - for (TestReport.TestReportParticipantComponent e : element.getParticipant()) - composeTestReportTestReportParticipantComponent(null, e); - closeArray(); - }; - if (element.hasSetup()) { - composeTestReportTestReportSetupComponent("setup", element.getSetup()); - } - if (element.hasTest()) { - openArray("test"); - for (TestReport.TestReportTestComponent e : element.getTest()) - composeTestReportTestReportTestComponent(null, e); - closeArray(); - }; - if (element.hasTeardown()) { - composeTestReportTestReportTeardownComponent("teardown", element.getTeardown()); - } - } - - protected void composeTestReportTestReportParticipantComponent(String name, TestReport.TestReportParticipantComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportTestReportParticipantComponentInner(element); - close(); - } - } - - protected void composeTestReportTestReportParticipantComponentInner(TestReport.TestReportParticipantComponent element) throws IOException { - composeBackbone(element); - if (element.hasTypeElement()) { - composeEnumerationCore("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory(), false); - composeEnumerationExtras("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory(), false); - } - if (element.hasUriElement()) { - composeUriCore("uri", element.getUriElement(), false); - composeUriExtras("uri", element.getUriElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - } - - protected void composeTestReportTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportTestReportSetupComponentInner(element); - close(); - } - } - - protected void composeTestReportTestReportSetupComponentInner(TestReport.TestReportSetupComponent element) throws IOException { - composeBackbone(element); - if (element.hasAction()) { - openArray("action"); - for (TestReport.SetupActionComponent e : element.getAction()) - composeTestReportSetupActionComponent(null, e); - closeArray(); - }; - } - - protected void composeTestReportSetupActionComponent(String name, TestReport.SetupActionComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportSetupActionComponentInner(element); - close(); - } - } - - protected void composeTestReportSetupActionComponentInner(TestReport.SetupActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOperation()) { - composeTestReportSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestReportSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestReportSetupActionOperationComponent(String name, TestReport.SetupActionOperationComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportSetupActionOperationComponentInner(element); - close(); - } - } - - protected void composeTestReportSetupActionOperationComponentInner(TestReport.SetupActionOperationComponent element) throws IOException { - composeBackbone(element); - if (element.hasResultElement()) { - composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); - composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); - } - if (element.hasMessageElement()) { - composeMarkdownCore("message", element.getMessageElement(), false); - composeMarkdownExtras("message", element.getMessageElement(), false); - } - if (element.hasDetailElement()) { - composeUriCore("detail", element.getDetailElement(), false); - composeUriExtras("detail", element.getDetailElement(), false); - } - } - - protected void composeTestReportSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportSetupActionAssertComponentInner(element); - close(); - } - } - - protected void composeTestReportSetupActionAssertComponentInner(TestReport.SetupActionAssertComponent element) throws IOException { - composeBackbone(element); - if (element.hasResultElement()) { - composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); - composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); - } - if (element.hasMessageElement()) { - composeMarkdownCore("message", element.getMessageElement(), false); - composeMarkdownExtras("message", element.getMessageElement(), false); - } - if (element.hasDetailElement()) { - composeStringCore("detail", element.getDetailElement(), false); - composeStringExtras("detail", element.getDetailElement(), false); - } - } - - protected void composeTestReportTestReportTestComponent(String name, TestReport.TestReportTestComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportTestReportTestComponentInner(element); - close(); - } - } - - protected void composeTestReportTestReportTestComponentInner(TestReport.TestReportTestComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasAction()) { - openArray("action"); - for (TestReport.TestActionComponent e : element.getAction()) - composeTestReportTestActionComponent(null, e); - closeArray(); - }; - } - - protected void composeTestReportTestActionComponent(String name, TestReport.TestActionComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportTestActionComponentInner(element); - close(); - } - } - - protected void composeTestReportTestActionComponentInner(TestReport.TestActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOperation()) { - composeTestReportSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestReportSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestReportTestReportTeardownComponent(String name, TestReport.TestReportTeardownComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportTestReportTeardownComponentInner(element); - close(); - } - } - - protected void composeTestReportTestReportTeardownComponentInner(TestReport.TestReportTeardownComponent element) throws IOException { - composeBackbone(element); - if (element.hasAction()) { - openArray("action"); - for (TestReport.TeardownActionComponent e : element.getAction()) - composeTestReportTeardownActionComponent(null, e); - closeArray(); - }; - } - - protected void composeTestReportTeardownActionComponent(String name, TestReport.TeardownActionComponent element) throws IOException { - if (element != null) { - open(name); - composeTestReportTeardownActionComponentInner(element); - close(); - } - } - - protected void composeTestReportTeardownActionComponentInner(TestReport.TeardownActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOperation()) { - composeTestReportSetupActionOperationComponent("operation", element.getOperation()); - } - } - - protected void composeTestScript(String name, TestScript element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeTestScriptInner(element); - } - } - - protected void composeTestScriptInner(TestScript element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasOrigin()) { - openArray("origin"); - for (TestScript.TestScriptOriginComponent e : element.getOrigin()) - composeTestScriptTestScriptOriginComponent(null, e); - closeArray(); - }; - if (element.hasDestination()) { - openArray("destination"); - for (TestScript.TestScriptDestinationComponent e : element.getDestination()) - composeTestScriptTestScriptDestinationComponent(null, e); - closeArray(); - }; - if (element.hasMetadata()) { - composeTestScriptTestScriptMetadataComponent("metadata", element.getMetadata()); - } - if (element.hasFixture()) { - openArray("fixture"); - for (TestScript.TestScriptFixtureComponent e : element.getFixture()) - composeTestScriptTestScriptFixtureComponent(null, e); - closeArray(); - }; - if (element.hasProfile()) { - openArray("profile"); - for (Reference e : element.getProfile()) - composeReference(null, e); - closeArray(); - }; - if (element.hasVariable()) { - openArray("variable"); - for (TestScript.TestScriptVariableComponent e : element.getVariable()) - composeTestScriptTestScriptVariableComponent(null, e); - closeArray(); - }; - if (element.hasRule()) { - openArray("rule"); - for (TestScript.TestScriptRuleComponent e : element.getRule()) - composeTestScriptTestScriptRuleComponent(null, e); - closeArray(); - }; - if (element.hasRuleset()) { - openArray("ruleset"); - for (TestScript.TestScriptRulesetComponent e : element.getRuleset()) - composeTestScriptTestScriptRulesetComponent(null, e); - closeArray(); - }; - if (element.hasSetup()) { - composeTestScriptTestScriptSetupComponent("setup", element.getSetup()); - } - if (element.hasTest()) { - openArray("test"); - for (TestScript.TestScriptTestComponent e : element.getTest()) - composeTestScriptTestScriptTestComponent(null, e); - closeArray(); - }; - if (element.hasTeardown()) { - composeTestScriptTestScriptTeardownComponent("teardown", element.getTeardown()); - } - } - - protected void composeTestScriptTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptOriginComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptOriginComponentInner(TestScript.TestScriptOriginComponent element) throws IOException { - composeBackbone(element); - if (element.hasIndexElement()) { - composeIntegerCore("index", element.getIndexElement(), false); - composeIntegerExtras("index", element.getIndexElement(), false); - } - if (element.hasProfile()) { - composeCoding("profile", element.getProfile()); - } - } - - protected void composeTestScriptTestScriptDestinationComponent(String name, TestScript.TestScriptDestinationComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptDestinationComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptDestinationComponentInner(TestScript.TestScriptDestinationComponent element) throws IOException { - composeBackbone(element); - if (element.hasIndexElement()) { - composeIntegerCore("index", element.getIndexElement(), false); - composeIntegerExtras("index", element.getIndexElement(), false); - } - if (element.hasProfile()) { - composeCoding("profile", element.getProfile()); - } - } - - protected void composeTestScriptTestScriptMetadataComponent(String name, TestScript.TestScriptMetadataComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptMetadataComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptMetadataComponentInner(TestScript.TestScriptMetadataComponent element) throws IOException { - composeBackbone(element); - if (element.hasLink()) { - openArray("link"); - for (TestScript.TestScriptMetadataLinkComponent e : element.getLink()) - composeTestScriptTestScriptMetadataLinkComponent(null, e); - closeArray(); - }; - if (element.hasCapability()) { - openArray("capability"); - for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability()) - composeTestScriptTestScriptMetadataCapabilityComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptTestScriptMetadataLinkComponent(String name, TestScript.TestScriptMetadataLinkComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptMetadataLinkComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptMetadataLinkComponentInner(TestScript.TestScriptMetadataLinkComponent element) throws IOException { - composeBackbone(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - } - - protected void composeTestScriptTestScriptMetadataCapabilityComponent(String name, TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptMetadataCapabilityComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptMetadataCapabilityComponentInner(TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { - composeBackbone(element); - if (element.hasRequiredElement()) { - composeBooleanCore("required", element.getRequiredElement(), false); - composeBooleanExtras("required", element.getRequiredElement(), false); - } - if (element.hasValidatedElement()) { - composeBooleanCore("validated", element.getValidatedElement(), false); - composeBooleanExtras("validated", element.getValidatedElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasOrigin()) { - openArray("origin"); - for (IntegerType e : element.getOrigin()) - composeIntegerCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getOrigin())) { - openArray("_origin"); - for (IntegerType e : element.getOrigin()) - composeIntegerExtras(null, e, true); - closeArray(); - } - }; - if (element.hasDestinationElement()) { - composeIntegerCore("destination", element.getDestinationElement(), false); - composeIntegerExtras("destination", element.getDestinationElement(), false); - } - if (element.hasLink()) { - openArray("link"); - for (UriType e : element.getLink()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getLink())) { - openArray("_link"); - for (UriType e : element.getLink()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - if (element.hasCapabilities()) { - composeReference("capabilities", element.getCapabilities()); - } - } - - protected void composeTestScriptTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptFixtureComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptFixtureComponentInner(TestScript.TestScriptFixtureComponent element) throws IOException { - composeBackbone(element); - if (element.hasAutocreateElement()) { - composeBooleanCore("autocreate", element.getAutocreateElement(), false); - composeBooleanExtras("autocreate", element.getAutocreateElement(), false); - } - if (element.hasAutodeleteElement()) { - composeBooleanCore("autodelete", element.getAutodeleteElement(), false); - composeBooleanExtras("autodelete", element.getAutodeleteElement(), false); - } - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - } - - protected void composeTestScriptTestScriptVariableComponent(String name, TestScript.TestScriptVariableComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptVariableComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptVariableComponentInner(TestScript.TestScriptVariableComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDefaultValueElement()) { - composeStringCore("defaultValue", element.getDefaultValueElement(), false); - composeStringExtras("defaultValue", element.getDefaultValueElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - if (element.hasHeaderFieldElement()) { - composeStringCore("headerField", element.getHeaderFieldElement(), false); - composeStringExtras("headerField", element.getHeaderFieldElement(), false); - } - if (element.hasHintElement()) { - composeStringCore("hint", element.getHintElement(), false); - composeStringExtras("hint", element.getHintElement(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasSourceIdElement()) { - composeIdCore("sourceId", element.getSourceIdElement(), false); - composeIdExtras("sourceId", element.getSourceIdElement(), false); - } - } - - protected void composeTestScriptTestScriptRuleComponent(String name, TestScript.TestScriptRuleComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptRuleComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptRuleComponentInner(TestScript.TestScriptRuleComponent element) throws IOException { - composeBackbone(element); - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - if (element.hasParam()) { - openArray("param"); - for (TestScript.RuleParamComponent e : element.getParam()) - composeTestScriptRuleParamComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptRuleParamComponent(String name, TestScript.RuleParamComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptRuleParamComponentInner(element); - close(); - } - } - - protected void composeTestScriptRuleParamComponentInner(TestScript.RuleParamComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeTestScriptTestScriptRulesetComponent(String name, TestScript.TestScriptRulesetComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptRulesetComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptRulesetComponentInner(TestScript.TestScriptRulesetComponent element) throws IOException { - composeBackbone(element); - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - if (element.hasRule()) { - openArray("rule"); - for (TestScript.RulesetRuleComponent e : element.getRule()) - composeTestScriptRulesetRuleComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptRulesetRuleComponent(String name, TestScript.RulesetRuleComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptRulesetRuleComponentInner(element); - close(); - } - } - - protected void composeTestScriptRulesetRuleComponentInner(TestScript.RulesetRuleComponent element) throws IOException { - composeBackbone(element); - if (element.hasRuleIdElement()) { - composeIdCore("ruleId", element.getRuleIdElement(), false); - composeIdExtras("ruleId", element.getRuleIdElement(), false); - } - if (element.hasParam()) { - openArray("param"); - for (TestScript.RulesetRuleParamComponent e : element.getParam()) - composeTestScriptRulesetRuleParamComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptRulesetRuleParamComponent(String name, TestScript.RulesetRuleParamComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptRulesetRuleParamComponentInner(element); - close(); - } - } - - protected void composeTestScriptRulesetRuleParamComponentInner(TestScript.RulesetRuleParamComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeTestScriptTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptSetupComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptSetupComponentInner(TestScript.TestScriptSetupComponent element) throws IOException { - composeBackbone(element); - if (element.hasAction()) { - openArray("action"); - for (TestScript.SetupActionComponent e : element.getAction()) - composeTestScriptSetupActionComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptSetupActionComponent(String name, TestScript.SetupActionComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptSetupActionComponentInner(element); - close(); - } - } - - protected void composeTestScriptSetupActionComponentInner(TestScript.SetupActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOperation()) { - composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestScriptSetupActionOperationComponent(String name, TestScript.SetupActionOperationComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptSetupActionOperationComponentInner(element); - close(); - } - } - - protected void composeTestScriptSetupActionOperationComponentInner(TestScript.SetupActionOperationComponent element) throws IOException { - composeBackbone(element); - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasResourceElement()) { - composeCodeCore("resource", element.getResourceElement(), false); - composeCodeExtras("resource", element.getResourceElement(), false); - } - if (element.hasLabelElement()) { - composeStringCore("label", element.getLabelElement(), false); - composeStringExtras("label", element.getLabelElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasAcceptElement()) { - composeEnumerationCore("accept", element.getAcceptElement(), new TestScript.ContentTypeEnumFactory(), false); - composeEnumerationExtras("accept", element.getAcceptElement(), new TestScript.ContentTypeEnumFactory(), false); - } - if (element.hasContentTypeElement()) { - composeEnumerationCore("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); - composeEnumerationExtras("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); - } - if (element.hasDestinationElement()) { - composeIntegerCore("destination", element.getDestinationElement(), false); - composeIntegerExtras("destination", element.getDestinationElement(), false); - } - if (element.hasEncodeRequestUrlElement()) { - composeBooleanCore("encodeRequestUrl", element.getEncodeRequestUrlElement(), false); - composeBooleanExtras("encodeRequestUrl", element.getEncodeRequestUrlElement(), false); - } - if (element.hasOriginElement()) { - composeIntegerCore("origin", element.getOriginElement(), false); - composeIntegerExtras("origin", element.getOriginElement(), false); - } - if (element.hasParamsElement()) { - composeStringCore("params", element.getParamsElement(), false); - composeStringExtras("params", element.getParamsElement(), false); - } - if (element.hasRequestHeader()) { - openArray("requestHeader"); - for (TestScript.SetupActionOperationRequestHeaderComponent e : element.getRequestHeader()) - composeTestScriptSetupActionOperationRequestHeaderComponent(null, e); - closeArray(); - }; - if (element.hasRequestIdElement()) { - composeIdCore("requestId", element.getRequestIdElement(), false); - composeIdExtras("requestId", element.getRequestIdElement(), false); - } - if (element.hasResponseIdElement()) { - composeIdCore("responseId", element.getResponseIdElement(), false); - composeIdExtras("responseId", element.getResponseIdElement(), false); - } - if (element.hasSourceIdElement()) { - composeIdCore("sourceId", element.getSourceIdElement(), false); - composeIdExtras("sourceId", element.getSourceIdElement(), false); - } - if (element.hasTargetIdElement()) { - composeIdCore("targetId", element.getTargetIdElement(), false); - composeIdExtras("targetId", element.getTargetIdElement(), false); - } - if (element.hasUrlElement()) { - composeStringCore("url", element.getUrlElement(), false); - composeStringExtras("url", element.getUrlElement(), false); - } - } - - protected void composeTestScriptSetupActionOperationRequestHeaderComponent(String name, TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptSetupActionOperationRequestHeaderComponentInner(element); - close(); - } - } - - protected void composeTestScriptSetupActionOperationRequestHeaderComponentInner(TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { - composeBackbone(element); - if (element.hasFieldElement()) { - composeStringCore("field", element.getFieldElement(), false); - composeStringExtras("field", element.getFieldElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeTestScriptSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptSetupActionAssertComponentInner(element); - close(); - } - } - - protected void composeTestScriptSetupActionAssertComponentInner(TestScript.SetupActionAssertComponent element) throws IOException { - composeBackbone(element); - if (element.hasLabelElement()) { - composeStringCore("label", element.getLabelElement(), false); - composeStringExtras("label", element.getLabelElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasDirectionElement()) { - composeEnumerationCore("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory(), false); - composeEnumerationExtras("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory(), false); - } - if (element.hasCompareToSourceIdElement()) { - composeStringCore("compareToSourceId", element.getCompareToSourceIdElement(), false); - composeStringExtras("compareToSourceId", element.getCompareToSourceIdElement(), false); - } - if (element.hasCompareToSourceExpressionElement()) { - composeStringCore("compareToSourceExpression", element.getCompareToSourceExpressionElement(), false); - composeStringExtras("compareToSourceExpression", element.getCompareToSourceExpressionElement(), false); - } - if (element.hasCompareToSourcePathElement()) { - composeStringCore("compareToSourcePath", element.getCompareToSourcePathElement(), false); - composeStringExtras("compareToSourcePath", element.getCompareToSourcePathElement(), false); - } - if (element.hasContentTypeElement()) { - composeEnumerationCore("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); - composeEnumerationExtras("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); - } - if (element.hasExpressionElement()) { - composeStringCore("expression", element.getExpressionElement(), false); - composeStringExtras("expression", element.getExpressionElement(), false); - } - if (element.hasHeaderFieldElement()) { - composeStringCore("headerField", element.getHeaderFieldElement(), false); - composeStringExtras("headerField", element.getHeaderFieldElement(), false); - } - if (element.hasMinimumIdElement()) { - composeStringCore("minimumId", element.getMinimumIdElement(), false); - composeStringExtras("minimumId", element.getMinimumIdElement(), false); - } - if (element.hasNavigationLinksElement()) { - composeBooleanCore("navigationLinks", element.getNavigationLinksElement(), false); - composeBooleanExtras("navigationLinks", element.getNavigationLinksElement(), false); - } - if (element.hasOperatorElement()) { - composeEnumerationCore("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory(), false); - composeEnumerationExtras("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory(), false); - } - if (element.hasPathElement()) { - composeStringCore("path", element.getPathElement(), false); - composeStringExtras("path", element.getPathElement(), false); - } - if (element.hasRequestMethodElement()) { - composeEnumerationCore("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false); - composeEnumerationExtras("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false); - } - if (element.hasRequestURLElement()) { - composeStringCore("requestURL", element.getRequestURLElement(), false); - composeStringExtras("requestURL", element.getRequestURLElement(), false); - } - if (element.hasResourceElement()) { - composeCodeCore("resource", element.getResourceElement(), false); - composeCodeExtras("resource", element.getResourceElement(), false); - } - if (element.hasResponseElement()) { - composeEnumerationCore("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory(), false); - composeEnumerationExtras("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory(), false); - } - if (element.hasResponseCodeElement()) { - composeStringCore("responseCode", element.getResponseCodeElement(), false); - composeStringExtras("responseCode", element.getResponseCodeElement(), false); - } - if (element.hasRule()) { - composeTestScriptActionAssertRuleComponent("rule", element.getRule()); - } - if (element.hasRuleset()) { - composeTestScriptActionAssertRulesetComponent("ruleset", element.getRuleset()); - } - if (element.hasSourceIdElement()) { - composeIdCore("sourceId", element.getSourceIdElement(), false); - composeIdExtras("sourceId", element.getSourceIdElement(), false); - } - if (element.hasValidateProfileIdElement()) { - composeIdCore("validateProfileId", element.getValidateProfileIdElement(), false); - composeIdExtras("validateProfileId", element.getValidateProfileIdElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - if (element.hasWarningOnlyElement()) { - composeBooleanCore("warningOnly", element.getWarningOnlyElement(), false); - composeBooleanExtras("warningOnly", element.getWarningOnlyElement(), false); - } - } - - protected void composeTestScriptActionAssertRuleComponent(String name, TestScript.ActionAssertRuleComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptActionAssertRuleComponentInner(element); - close(); - } - } - - protected void composeTestScriptActionAssertRuleComponentInner(TestScript.ActionAssertRuleComponent element) throws IOException { - composeBackbone(element); - if (element.hasRuleIdElement()) { - composeIdCore("ruleId", element.getRuleIdElement(), false); - composeIdExtras("ruleId", element.getRuleIdElement(), false); - } - if (element.hasParam()) { - openArray("param"); - for (TestScript.ActionAssertRuleParamComponent e : element.getParam()) - composeTestScriptActionAssertRuleParamComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptActionAssertRuleParamComponent(String name, TestScript.ActionAssertRuleParamComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptActionAssertRuleParamComponentInner(element); - close(); - } - } - - protected void composeTestScriptActionAssertRuleParamComponentInner(TestScript.ActionAssertRuleParamComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeTestScriptActionAssertRulesetComponent(String name, TestScript.ActionAssertRulesetComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptActionAssertRulesetComponentInner(element); - close(); - } - } - - protected void composeTestScriptActionAssertRulesetComponentInner(TestScript.ActionAssertRulesetComponent element) throws IOException { - composeBackbone(element); - if (element.hasRulesetIdElement()) { - composeIdCore("rulesetId", element.getRulesetIdElement(), false); - composeIdExtras("rulesetId", element.getRulesetIdElement(), false); - } - if (element.hasRule()) { - openArray("rule"); - for (TestScript.ActionAssertRulesetRuleComponent e : element.getRule()) - composeTestScriptActionAssertRulesetRuleComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptActionAssertRulesetRuleComponent(String name, TestScript.ActionAssertRulesetRuleComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptActionAssertRulesetRuleComponentInner(element); - close(); - } - } - - protected void composeTestScriptActionAssertRulesetRuleComponentInner(TestScript.ActionAssertRulesetRuleComponent element) throws IOException { - composeBackbone(element); - if (element.hasRuleIdElement()) { - composeIdCore("ruleId", element.getRuleIdElement(), false); - composeIdExtras("ruleId", element.getRuleIdElement(), false); - } - if (element.hasParam()) { - openArray("param"); - for (TestScript.ActionAssertRulesetRuleParamComponent e : element.getParam()) - composeTestScriptActionAssertRulesetRuleParamComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptActionAssertRulesetRuleParamComponent(String name, TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptActionAssertRulesetRuleParamComponentInner(element); - close(); - } - } - - protected void composeTestScriptActionAssertRulesetRuleParamComponentInner(TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeTestScriptTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptTestComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptTestComponentInner(TestScript.TestScriptTestComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasDescriptionElement()) { - composeStringCore("description", element.getDescriptionElement(), false); - composeStringExtras("description", element.getDescriptionElement(), false); - } - if (element.hasAction()) { - openArray("action"); - for (TestScript.TestActionComponent e : element.getAction()) - composeTestScriptTestActionComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptTestActionComponent(String name, TestScript.TestActionComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestActionComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestActionComponentInner(TestScript.TestActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOperation()) { - composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestScriptTestScriptTeardownComponent(String name, TestScript.TestScriptTeardownComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTestScriptTeardownComponentInner(element); - close(); - } - } - - protected void composeTestScriptTestScriptTeardownComponentInner(TestScript.TestScriptTeardownComponent element) throws IOException { - composeBackbone(element); - if (element.hasAction()) { - openArray("action"); - for (TestScript.TeardownActionComponent e : element.getAction()) - composeTestScriptTeardownActionComponent(null, e); - closeArray(); - }; - } - - protected void composeTestScriptTeardownActionComponent(String name, TestScript.TeardownActionComponent element) throws IOException { - if (element != null) { - open(name); - composeTestScriptTeardownActionComponentInner(element); - close(); - } - } - - protected void composeTestScriptTeardownActionComponentInner(TestScript.TeardownActionComponent element) throws IOException { - composeBackbone(element); - if (element.hasOperation()) { - composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); - } - } - - protected void composeValueSet(String name, ValueSet element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeValueSetInner(element); - } - } - - protected void composeValueSetInner(ValueSet element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUriCore("url", element.getUrlElement(), false); - composeUriExtras("url", element.getUrlElement(), false); - } - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasTitleElement()) { - composeStringCore("title", element.getTitleElement(), false); - composeStringExtras("title", element.getTitleElement(), false); - } - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); - } - if (element.hasExperimentalElement()) { - composeBooleanCore("experimental", element.getExperimentalElement(), false); - composeBooleanExtras("experimental", element.getExperimentalElement(), false); - } - if (element.hasDateElement()) { - composeDateTimeCore("date", element.getDateElement(), false); - composeDateTimeExtras("date", element.getDateElement(), false); - } - if (element.hasPublisherElement()) { - composeStringCore("publisher", element.getPublisherElement(), false); - composeStringExtras("publisher", element.getPublisherElement(), false); - } - if (element.hasContact()) { - openArray("contact"); - for (ContactDetail e : element.getContact()) - composeContactDetail(null, e); - closeArray(); - }; - if (element.hasDescriptionElement()) { - composeMarkdownCore("description", element.getDescriptionElement(), false); - composeMarkdownExtras("description", element.getDescriptionElement(), false); - } - if (element.hasUseContext()) { - openArray("useContext"); - for (UsageContext e : element.getUseContext()) - composeUsageContext(null, e); - closeArray(); - }; - if (element.hasJurisdiction()) { - openArray("jurisdiction"); - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept(null, e); - closeArray(); - }; - if (element.hasImmutableElement()) { - composeBooleanCore("immutable", element.getImmutableElement(), false); - composeBooleanExtras("immutable", element.getImmutableElement(), false); - } - if (element.hasPurposeElement()) { - composeMarkdownCore("purpose", element.getPurposeElement(), false); - composeMarkdownExtras("purpose", element.getPurposeElement(), false); - } - if (element.hasCopyrightElement()) { - composeMarkdownCore("copyright", element.getCopyrightElement(), false); - composeMarkdownExtras("copyright", element.getCopyrightElement(), false); - } - if (element.hasExtensibleElement()) { - composeBooleanCore("extensible", element.getExtensibleElement(), false); - composeBooleanExtras("extensible", element.getExtensibleElement(), false); - } - if (element.hasCompose()) { - composeValueSetValueSetComposeComponent("compose", element.getCompose()); - } - if (element.hasExpansion()) { - composeValueSetValueSetExpansionComponent("expansion", element.getExpansion()); - } - } - - protected void composeValueSetValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetValueSetComposeComponentInner(element); - close(); - } - } - - protected void composeValueSetValueSetComposeComponentInner(ValueSet.ValueSetComposeComponent element) throws IOException { - composeBackbone(element); - if (element.hasLockedDateElement()) { - composeDateCore("lockedDate", element.getLockedDateElement(), false); - composeDateExtras("lockedDate", element.getLockedDateElement(), false); - } - if (element.hasInactiveElement()) { - composeBooleanCore("inactive", element.getInactiveElement(), false); - composeBooleanExtras("inactive", element.getInactiveElement(), false); - } - if (element.hasInclude()) { - openArray("include"); - for (ValueSet.ConceptSetComponent e : element.getInclude()) - composeValueSetConceptSetComponent(null, e); - closeArray(); - }; - if (element.hasExclude()) { - openArray("exclude"); - for (ValueSet.ConceptSetComponent e : element.getExclude()) - composeValueSetConceptSetComponent(null, e); - closeArray(); - }; - } - - protected void composeValueSetConceptSetComponent(String name, ValueSet.ConceptSetComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetConceptSetComponentInner(element); - close(); - } - } - - protected void composeValueSetConceptSetComponentInner(ValueSet.ConceptSetComponent element) throws IOException { - composeBackbone(element); - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasConcept()) { - openArray("concept"); - for (ValueSet.ConceptReferenceComponent e : element.getConcept()) - composeValueSetConceptReferenceComponent(null, e); - closeArray(); - }; - if (element.hasFilter()) { - openArray("filter"); - for (ValueSet.ConceptSetFilterComponent e : element.getFilter()) - composeValueSetConceptSetFilterComponent(null, e); - closeArray(); - }; - if (element.hasValueSet()) { - openArray("valueSet"); - for (UriType e : element.getValueSet()) - composeUriCore(null, e, true); - closeArray(); - if (anyHasExtras(element.getValueSet())) { - openArray("_valueSet"); - for (UriType e : element.getValueSet()) - composeUriExtras(null, e, true); - closeArray(); - } - }; - } - - protected void composeValueSetConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetConceptReferenceComponentInner(element); - close(); - } - } - - protected void composeValueSetConceptReferenceComponentInner(ValueSet.ConceptReferenceComponent element) throws IOException { - composeBackbone(element); - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasDesignation()) { - openArray("designation"); - for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) - composeValueSetConceptReferenceDesignationComponent(null, e); - closeArray(); - }; - } - - protected void composeValueSetConceptReferenceDesignationComponent(String name, ValueSet.ConceptReferenceDesignationComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetConceptReferenceDesignationComponentInner(element); - close(); - } - } - - protected void composeValueSetConceptReferenceDesignationComponentInner(ValueSet.ConceptReferenceDesignationComponent element) throws IOException { - composeBackbone(element); - if (element.hasLanguageElement()) { - composeCodeCore("language", element.getLanguageElement(), false); - composeCodeExtras("language", element.getLanguageElement(), false); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - if (element.hasValueElement()) { - composeStringCore("value", element.getValueElement(), false); - composeStringExtras("value", element.getValueElement(), false); - } - } - - protected void composeValueSetConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetConceptSetFilterComponentInner(element); - close(); - } - } - - protected void composeValueSetConceptSetFilterComponentInner(ValueSet.ConceptSetFilterComponent element) throws IOException { - composeBackbone(element); - if (element.hasPropertyElement()) { - composeCodeCore("property", element.getPropertyElement(), false); - composeCodeExtras("property", element.getPropertyElement(), false); - } - if (element.hasOpElement()) { - composeEnumerationCore("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory(), false); - composeEnumerationExtras("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory(), false); - } - if (element.hasValueElement()) { - composeCodeCore("value", element.getValueElement(), false); - composeCodeExtras("value", element.getValueElement(), false); - } - } - - protected void composeValueSetValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetValueSetExpansionComponentInner(element); - close(); - } - } - - protected void composeValueSetValueSetExpansionComponentInner(ValueSet.ValueSetExpansionComponent element) throws IOException { - composeBackbone(element); - if (element.hasIdentifierElement()) { - composeUriCore("identifier", element.getIdentifierElement(), false); - composeUriExtras("identifier", element.getIdentifierElement(), false); - } - if (element.hasTimestampElement()) { - composeDateTimeCore("timestamp", element.getTimestampElement(), false); - composeDateTimeExtras("timestamp", element.getTimestampElement(), false); - } - if (element.hasTotalElement()) { - composeIntegerCore("total", element.getTotalElement(), false); - composeIntegerExtras("total", element.getTotalElement(), false); - } - if (element.hasOffsetElement()) { - composeIntegerCore("offset", element.getOffsetElement(), false); - composeIntegerExtras("offset", element.getOffsetElement(), false); - } - if (element.hasParameter()) { - openArray("parameter"); - for (ValueSet.ValueSetExpansionParameterComponent e : element.getParameter()) - composeValueSetValueSetExpansionParameterComponent(null, e); - closeArray(); - }; - if (element.hasContains()) { - openArray("contains"); - for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) - composeValueSetValueSetExpansionContainsComponent(null, e); - closeArray(); - }; - } - - protected void composeValueSetValueSetExpansionParameterComponent(String name, ValueSet.ValueSetExpansionParameterComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetValueSetExpansionParameterComponentInner(element); - close(); - } - } - - protected void composeValueSetValueSetExpansionParameterComponentInner(ValueSet.ValueSetExpansionParameterComponent element) throws IOException { - composeBackbone(element); - if (element.hasNameElement()) { - composeStringCore("name", element.getNameElement(), false); - composeStringExtras("name", element.getNameElement(), false); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } - } - - protected void composeValueSetValueSetExpansionContainsComponent(String name, ValueSet.ValueSetExpansionContainsComponent element) throws IOException { - if (element != null) { - open(name); - composeValueSetValueSetExpansionContainsComponentInner(element); - close(); - } - } - - protected void composeValueSetValueSetExpansionContainsComponentInner(ValueSet.ValueSetExpansionContainsComponent element) throws IOException { - composeBackbone(element); - if (element.hasSystemElement()) { - composeUriCore("system", element.getSystemElement(), false); - composeUriExtras("system", element.getSystemElement(), false); - } - if (element.hasAbstractElement()) { - composeBooleanCore("abstract", element.getAbstractElement(), false); - composeBooleanExtras("abstract", element.getAbstractElement(), false); - } - if (element.hasInactiveElement()) { - composeBooleanCore("inactive", element.getInactiveElement(), false); - composeBooleanExtras("inactive", element.getInactiveElement(), false); - } - if (element.hasVersionElement()) { - composeStringCore("version", element.getVersionElement(), false); - composeStringExtras("version", element.getVersionElement(), false); - } - if (element.hasCodeElement()) { - composeCodeCore("code", element.getCodeElement(), false); - composeCodeExtras("code", element.getCodeElement(), false); - } - if (element.hasDisplayElement()) { - composeStringCore("display", element.getDisplayElement(), false); - composeStringExtras("display", element.getDisplayElement(), false); - } - if (element.hasDesignation()) { - openArray("designation"); - for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) - composeValueSetConceptReferenceDesignationComponent(null, e); - closeArray(); - }; - if (element.hasContains()) { - openArray("contains"); - for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) - composeValueSetValueSetExpansionContainsComponent(null, e); - closeArray(); - }; - } - - protected void composeVisionPrescription(String name, VisionPrescription element) throws IOException { - if (element != null) { - prop("resourceType", name); - composeVisionPrescriptionInner(element); - } - } - - protected void composeVisionPrescriptionInner(VisionPrescription element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - openArray("identifier"); - for (Identifier e : element.getIdentifier()) - composeIdentifier(null, e); - closeArray(); - }; - if (element.hasStatusElement()) { - composeEnumerationCore("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory(), false); - composeEnumerationExtras("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory(), false); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateWrittenElement()) { - composeDateTimeCore("dateWritten", element.getDateWrittenElement(), false); - composeDateTimeExtras("dateWritten", element.getDateWrittenElement(), false); - } - if (element.hasPrescriber()) { - composeReference("prescriber", element.getPrescriber()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } - if (element.hasDispense()) { - openArray("dispense"); - for (VisionPrescription.VisionPrescriptionDispenseComponent e : element.getDispense()) - composeVisionPrescriptionVisionPrescriptionDispenseComponent(null, e); - closeArray(); - }; - } - - protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(String name, VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { - if (element != null) { - open(name); - composeVisionPrescriptionVisionPrescriptionDispenseComponentInner(element); - close(); - } - } - - protected void composeVisionPrescriptionVisionPrescriptionDispenseComponentInner(VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { - composeBackbone(element); - if (element.hasProduct()) { - composeCodeableConcept("product", element.getProduct()); - } - if (element.hasEyeElement()) { - composeEnumerationCore("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory(), false); - composeEnumerationExtras("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory(), false); - } - if (element.hasSphereElement()) { - composeDecimalCore("sphere", element.getSphereElement(), false); - composeDecimalExtras("sphere", element.getSphereElement(), false); - } - if (element.hasCylinderElement()) { - composeDecimalCore("cylinder", element.getCylinderElement(), false); - composeDecimalExtras("cylinder", element.getCylinderElement(), false); - } - if (element.hasAxisElement()) { - composeIntegerCore("axis", element.getAxisElement(), false); - composeIntegerExtras("axis", element.getAxisElement(), false); - } - if (element.hasPrismElement()) { - composeDecimalCore("prism", element.getPrismElement(), false); - composeDecimalExtras("prism", element.getPrismElement(), false); - } - if (element.hasBaseElement()) { - composeEnumerationCore("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory(), false); - composeEnumerationExtras("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory(), false); - } - if (element.hasAddElement()) { - composeDecimalCore("add", element.getAddElement(), false); - composeDecimalExtras("add", element.getAddElement(), false); - } - if (element.hasPowerElement()) { - composeDecimalCore("power", element.getPowerElement(), false); - composeDecimalExtras("power", element.getPowerElement(), false); - } - if (element.hasBackCurveElement()) { - composeDecimalCore("backCurve", element.getBackCurveElement(), false); - composeDecimalExtras("backCurve", element.getBackCurveElement(), false); - } - if (element.hasDiameterElement()) { - composeDecimalCore("diameter", element.getDiameterElement(), false); - composeDecimalExtras("diameter", element.getDiameterElement(), false); - } - if (element.hasDuration()) { - composeSimpleQuantity("duration", element.getDuration()); - } - if (element.hasColorElement()) { - composeStringCore("color", element.getColorElement(), false); - composeStringExtras("color", element.getColorElement(), false); - } - if (element.hasBrandElement()) { - composeStringCore("brand", element.getBrandElement(), false); - composeStringExtras("brand", element.getBrandElement(), false); - } - if (element.hasNote()) { - openArray("note"); - for (Annotation e : element.getNote()) - composeAnnotation(null, e); - closeArray(); - }; - } - - @Override - protected void composeResource(Resource resource) throws IOException { - if (resource instanceof Parameters) - composeParameters("Parameters", (Parameters)resource); - else if (resource instanceof Account) - composeAccount("Account", (Account)resource); - else if (resource instanceof ActivityDefinition) - composeActivityDefinition("ActivityDefinition", (ActivityDefinition)resource); - else if (resource instanceof AdverseEvent) - composeAdverseEvent("AdverseEvent", (AdverseEvent)resource); - else if (resource instanceof AllergyIntolerance) - composeAllergyIntolerance("AllergyIntolerance", (AllergyIntolerance)resource); - else if (resource instanceof Appointment) - composeAppointment("Appointment", (Appointment)resource); - else if (resource instanceof AppointmentResponse) - composeAppointmentResponse("AppointmentResponse", (AppointmentResponse)resource); - else if (resource instanceof AuditEvent) - composeAuditEvent("AuditEvent", (AuditEvent)resource); - else if (resource instanceof Basic) - composeBasic("Basic", (Basic)resource); - else if (resource instanceof Binary) - composeBinary("Binary", (Binary)resource); - else if (resource instanceof BodyStructure) - composeBodyStructure("BodyStructure", (BodyStructure)resource); - else if (resource instanceof Bundle) - composeBundle("Bundle", (Bundle)resource); - else if (resource instanceof CapabilityStatement) - composeCapabilityStatement("CapabilityStatement", (CapabilityStatement)resource); - else if (resource instanceof CarePlan) - composeCarePlan("CarePlan", (CarePlan)resource); - else if (resource instanceof CareTeam) - composeCareTeam("CareTeam", (CareTeam)resource); - else if (resource instanceof ChargeItem) - composeChargeItem("ChargeItem", (ChargeItem)resource); - else if (resource instanceof Claim) - composeClaim("Claim", (Claim)resource); - else if (resource instanceof ClaimResponse) - composeClaimResponse("ClaimResponse", (ClaimResponse)resource); - else if (resource instanceof ClinicalImpression) - composeClinicalImpression("ClinicalImpression", (ClinicalImpression)resource); - else if (resource instanceof CodeSystem) - composeCodeSystem("CodeSystem", (CodeSystem)resource); - else if (resource instanceof Communication) - composeCommunication("Communication", (Communication)resource); - else if (resource instanceof CommunicationRequest) - composeCommunicationRequest("CommunicationRequest", (CommunicationRequest)resource); - else if (resource instanceof CompartmentDefinition) - composeCompartmentDefinition("CompartmentDefinition", (CompartmentDefinition)resource); - else if (resource instanceof Composition) - composeComposition("Composition", (Composition)resource); - else if (resource instanceof ConceptMap) - composeConceptMap("ConceptMap", (ConceptMap)resource); - else if (resource instanceof Condition) - composeCondition("Condition", (Condition)resource); - else if (resource instanceof Consent) - composeConsent("Consent", (Consent)resource); - else if (resource instanceof Contract) - composeContract("Contract", (Contract)resource); - else if (resource instanceof Coverage) - composeCoverage("Coverage", (Coverage)resource); - else if (resource instanceof DetectedIssue) - composeDetectedIssue("DetectedIssue", (DetectedIssue)resource); - else if (resource instanceof Device) - composeDevice("Device", (Device)resource); - else if (resource instanceof DeviceComponent) - composeDeviceComponent("DeviceComponent", (DeviceComponent)resource); - else if (resource instanceof DeviceMetric) - composeDeviceMetric("DeviceMetric", (DeviceMetric)resource); - else if (resource instanceof DeviceRequest) - composeDeviceRequest("DeviceRequest", (DeviceRequest)resource); - else if (resource instanceof DeviceUseStatement) - composeDeviceUseStatement("DeviceUseStatement", (DeviceUseStatement)resource); - else if (resource instanceof DiagnosticReport) - composeDiagnosticReport("DiagnosticReport", (DiagnosticReport)resource); - else if (resource instanceof DocumentManifest) - composeDocumentManifest("DocumentManifest", (DocumentManifest)resource); - else if (resource instanceof DocumentReference) - composeDocumentReference("DocumentReference", (DocumentReference)resource); - else if (resource instanceof EligibilityRequest) - composeEligibilityRequest("EligibilityRequest", (EligibilityRequest)resource); - else if (resource instanceof EligibilityResponse) - composeEligibilityResponse("EligibilityResponse", (EligibilityResponse)resource); - else if (resource instanceof Encounter) - composeEncounter("Encounter", (Encounter)resource); - else if (resource instanceof Endpoint) - composeEndpoint("Endpoint", (Endpoint)resource); - else if (resource instanceof EnrollmentRequest) - composeEnrollmentRequest("EnrollmentRequest", (EnrollmentRequest)resource); - else if (resource instanceof EnrollmentResponse) - composeEnrollmentResponse("EnrollmentResponse", (EnrollmentResponse)resource); - else if (resource instanceof EpisodeOfCare) - composeEpisodeOfCare("EpisodeOfCare", (EpisodeOfCare)resource); - else if (resource instanceof EventDefinition) - composeEventDefinition("EventDefinition", (EventDefinition)resource); - else if (resource instanceof ExpansionProfile) - composeExpansionProfile("ExpansionProfile", (ExpansionProfile)resource); - else if (resource instanceof ExplanationOfBenefit) - composeExplanationOfBenefit("ExplanationOfBenefit", (ExplanationOfBenefit)resource); - else if (resource instanceof FamilyMemberHistory) - composeFamilyMemberHistory("FamilyMemberHistory", (FamilyMemberHistory)resource); - else if (resource instanceof Flag) - composeFlag("Flag", (Flag)resource); - else if (resource instanceof Goal) - composeGoal("Goal", (Goal)resource); - else if (resource instanceof GraphDefinition) - composeGraphDefinition("GraphDefinition", (GraphDefinition)resource); - else if (resource instanceof Group) - composeGroup("Group", (Group)resource); - else if (resource instanceof GuidanceResponse) - composeGuidanceResponse("GuidanceResponse", (GuidanceResponse)resource); - else if (resource instanceof HealthcareService) - composeHealthcareService("HealthcareService", (HealthcareService)resource); - else if (resource instanceof ImagingManifest) - composeImagingManifest("ImagingManifest", (ImagingManifest)resource); - else if (resource instanceof ImagingStudy) - composeImagingStudy("ImagingStudy", (ImagingStudy)resource); - else if (resource instanceof Immunization) - composeImmunization("Immunization", (Immunization)resource); - else if (resource instanceof ImmunizationRecommendation) - composeImmunizationRecommendation("ImmunizationRecommendation", (ImmunizationRecommendation)resource); - else if (resource instanceof ImplementationGuide) - composeImplementationGuide("ImplementationGuide", (ImplementationGuide)resource); - else if (resource instanceof Library) - composeLibrary("Library", (Library)resource); - else if (resource instanceof Linkage) - composeLinkage("Linkage", (Linkage)resource); - else if (resource instanceof ListResource) - composeListResource("List", (ListResource)resource); - else if (resource instanceof Location) - composeLocation("Location", (Location)resource); - else if (resource instanceof Measure) - composeMeasure("Measure", (Measure)resource); - else if (resource instanceof MeasureReport) - composeMeasureReport("MeasureReport", (MeasureReport)resource); - else if (resource instanceof Media) - composeMedia("Media", (Media)resource); - else if (resource instanceof Medication) - composeMedication("Medication", (Medication)resource); - else if (resource instanceof MedicationAdministration) - composeMedicationAdministration("MedicationAdministration", (MedicationAdministration)resource); - else if (resource instanceof MedicationDispense) - composeMedicationDispense("MedicationDispense", (MedicationDispense)resource); - else if (resource instanceof MedicationRequest) - composeMedicationRequest("MedicationRequest", (MedicationRequest)resource); - else if (resource instanceof MedicationStatement) - composeMedicationStatement("MedicationStatement", (MedicationStatement)resource); - else if (resource instanceof MessageDefinition) - composeMessageDefinition("MessageDefinition", (MessageDefinition)resource); - else if (resource instanceof MessageHeader) - composeMessageHeader("MessageHeader", (MessageHeader)resource); - else if (resource instanceof NamingSystem) - composeNamingSystem("NamingSystem", (NamingSystem)resource); - else if (resource instanceof NutritionOrder) - composeNutritionOrder("NutritionOrder", (NutritionOrder)resource); - else if (resource instanceof Observation) - composeObservation("Observation", (Observation)resource); - else if (resource instanceof OperationDefinition) - composeOperationDefinition("OperationDefinition", (OperationDefinition)resource); - else if (resource instanceof OperationOutcome) - composeOperationOutcome("OperationOutcome", (OperationOutcome)resource); - else if (resource instanceof Organization) - composeOrganization("Organization", (Organization)resource); - else if (resource instanceof Patient) - composePatient("Patient", (Patient)resource); - else if (resource instanceof PaymentNotice) - composePaymentNotice("PaymentNotice", (PaymentNotice)resource); - else if (resource instanceof PaymentReconciliation) - composePaymentReconciliation("PaymentReconciliation", (PaymentReconciliation)resource); - else if (resource instanceof Person) - composePerson("Person", (Person)resource); - else if (resource instanceof PlanDefinition) - composePlanDefinition("PlanDefinition", (PlanDefinition)resource); - else if (resource instanceof Practitioner) - composePractitioner("Practitioner", (Practitioner)resource); - else if (resource instanceof PractitionerRole) - composePractitionerRole("PractitionerRole", (PractitionerRole)resource); - else if (resource instanceof Procedure) - composeProcedure("Procedure", (Procedure)resource); - else if (resource instanceof ProcedureRequest) - composeProcedureRequest("ProcedureRequest", (ProcedureRequest)resource); - else if (resource instanceof ProcessRequest) - composeProcessRequest("ProcessRequest", (ProcessRequest)resource); - else if (resource instanceof ProcessResponse) - composeProcessResponse("ProcessResponse", (ProcessResponse)resource); - else if (resource instanceof Provenance) - composeProvenance("Provenance", (Provenance)resource); - else if (resource instanceof Questionnaire) - composeQuestionnaire("Questionnaire", (Questionnaire)resource); - else if (resource instanceof QuestionnaireResponse) - composeQuestionnaireResponse("QuestionnaireResponse", (QuestionnaireResponse)resource); - else if (resource instanceof RelatedPerson) - composeRelatedPerson("RelatedPerson", (RelatedPerson)resource); - else if (resource instanceof RequestGroup) - composeRequestGroup("RequestGroup", (RequestGroup)resource); - else if (resource instanceof ResearchStudy) - composeResearchStudy("ResearchStudy", (ResearchStudy)resource); - else if (resource instanceof ResearchSubject) - composeResearchSubject("ResearchSubject", (ResearchSubject)resource); - else if (resource instanceof RiskAssessment) - composeRiskAssessment("RiskAssessment", (RiskAssessment)resource); - else if (resource instanceof Schedule) - composeSchedule("Schedule", (Schedule)resource); - else if (resource instanceof SearchParameter) - composeSearchParameter("SearchParameter", (SearchParameter)resource); - else if (resource instanceof Sequence) - composeSequence("Sequence", (Sequence)resource); - else if (resource instanceof ServiceDefinition) - composeServiceDefinition("ServiceDefinition", (ServiceDefinition)resource); - else if (resource instanceof Slot) - composeSlot("Slot", (Slot)resource); - else if (resource instanceof Specimen) - composeSpecimen("Specimen", (Specimen)resource); - else if (resource instanceof StructureDefinition) - composeStructureDefinition("StructureDefinition", (StructureDefinition)resource); - else if (resource instanceof StructureMap) - composeStructureMap("StructureMap", (StructureMap)resource); - else if (resource instanceof Subscription) - composeSubscription("Subscription", (Subscription)resource); - else if (resource instanceof Substance) - composeSubstance("Substance", (Substance)resource); - else if (resource instanceof SupplyDelivery) - composeSupplyDelivery("SupplyDelivery", (SupplyDelivery)resource); - else if (resource instanceof SupplyRequest) - composeSupplyRequest("SupplyRequest", (SupplyRequest)resource); - else if (resource instanceof Task) - composeTask("Task", (Task)resource); - else if (resource instanceof TestReport) - composeTestReport("TestReport", (TestReport)resource); - else if (resource instanceof TestScript) - composeTestScript("TestScript", (TestScript)resource); - else if (resource instanceof ValueSet) - composeValueSet("ValueSet", (ValueSet)resource); - else if (resource instanceof VisionPrescription) - composeVisionPrescription("VisionPrescription", (VisionPrescription)resource); - else if (resource instanceof Binary) - composeBinary("Binary", (Binary)resource); - else - throw new Error("Unhandled resource type "+resource.getClass().getName()); - } - - protected void composeNamedReference(String name, Resource resource) throws IOException { - if (resource instanceof Parameters) - composeParameters(name, (Parameters)resource); - else if (resource instanceof Account) - composeAccount(name, (Account)resource); - else if (resource instanceof ActivityDefinition) - composeActivityDefinition(name, (ActivityDefinition)resource); - else if (resource instanceof AdverseEvent) - composeAdverseEvent(name, (AdverseEvent)resource); - else if (resource instanceof AllergyIntolerance) - composeAllergyIntolerance(name, (AllergyIntolerance)resource); - else if (resource instanceof Appointment) - composeAppointment(name, (Appointment)resource); - else if (resource instanceof AppointmentResponse) - composeAppointmentResponse(name, (AppointmentResponse)resource); - else if (resource instanceof AuditEvent) - composeAuditEvent(name, (AuditEvent)resource); - else if (resource instanceof Basic) - composeBasic(name, (Basic)resource); - else if (resource instanceof Binary) - composeBinary(name, (Binary)resource); - else if (resource instanceof BodyStructure) - composeBodyStructure(name, (BodyStructure)resource); - else if (resource instanceof Bundle) - composeBundle(name, (Bundle)resource); - else if (resource instanceof CapabilityStatement) - composeCapabilityStatement(name, (CapabilityStatement)resource); - else if (resource instanceof CarePlan) - composeCarePlan(name, (CarePlan)resource); - else if (resource instanceof CareTeam) - composeCareTeam(name, (CareTeam)resource); - else if (resource instanceof ChargeItem) - composeChargeItem(name, (ChargeItem)resource); - else if (resource instanceof Claim) - composeClaim(name, (Claim)resource); - else if (resource instanceof ClaimResponse) - composeClaimResponse(name, (ClaimResponse)resource); - else if (resource instanceof ClinicalImpression) - composeClinicalImpression(name, (ClinicalImpression)resource); - else if (resource instanceof CodeSystem) - composeCodeSystem(name, (CodeSystem)resource); - else if (resource instanceof Communication) - composeCommunication(name, (Communication)resource); - else if (resource instanceof CommunicationRequest) - composeCommunicationRequest(name, (CommunicationRequest)resource); - else if (resource instanceof CompartmentDefinition) - composeCompartmentDefinition(name, (CompartmentDefinition)resource); - else if (resource instanceof Composition) - composeComposition(name, (Composition)resource); - else if (resource instanceof ConceptMap) - composeConceptMap(name, (ConceptMap)resource); - else if (resource instanceof Condition) - composeCondition(name, (Condition)resource); - else if (resource instanceof Consent) - composeConsent(name, (Consent)resource); - else if (resource instanceof Contract) - composeContract(name, (Contract)resource); - else if (resource instanceof Coverage) - composeCoverage(name, (Coverage)resource); - else if (resource instanceof DetectedIssue) - composeDetectedIssue(name, (DetectedIssue)resource); - else if (resource instanceof Device) - composeDevice(name, (Device)resource); - else if (resource instanceof DeviceComponent) - composeDeviceComponent(name, (DeviceComponent)resource); - else if (resource instanceof DeviceMetric) - composeDeviceMetric(name, (DeviceMetric)resource); - else if (resource instanceof DeviceRequest) - composeDeviceRequest(name, (DeviceRequest)resource); - else if (resource instanceof DeviceUseStatement) - composeDeviceUseStatement(name, (DeviceUseStatement)resource); - else if (resource instanceof DiagnosticReport) - composeDiagnosticReport(name, (DiagnosticReport)resource); - else if (resource instanceof DocumentManifest) - composeDocumentManifest(name, (DocumentManifest)resource); - else if (resource instanceof DocumentReference) - composeDocumentReference(name, (DocumentReference)resource); - else if (resource instanceof EligibilityRequest) - composeEligibilityRequest(name, (EligibilityRequest)resource); - else if (resource instanceof EligibilityResponse) - composeEligibilityResponse(name, (EligibilityResponse)resource); - else if (resource instanceof Encounter) - composeEncounter(name, (Encounter)resource); - else if (resource instanceof Endpoint) - composeEndpoint(name, (Endpoint)resource); - else if (resource instanceof EnrollmentRequest) - composeEnrollmentRequest(name, (EnrollmentRequest)resource); - else if (resource instanceof EnrollmentResponse) - composeEnrollmentResponse(name, (EnrollmentResponse)resource); - else if (resource instanceof EpisodeOfCare) - composeEpisodeOfCare(name, (EpisodeOfCare)resource); - else if (resource instanceof EventDefinition) - composeEventDefinition(name, (EventDefinition)resource); - else if (resource instanceof ExpansionProfile) - composeExpansionProfile(name, (ExpansionProfile)resource); - else if (resource instanceof ExplanationOfBenefit) - composeExplanationOfBenefit(name, (ExplanationOfBenefit)resource); - else if (resource instanceof FamilyMemberHistory) - composeFamilyMemberHistory(name, (FamilyMemberHistory)resource); - else if (resource instanceof Flag) - composeFlag(name, (Flag)resource); - else if (resource instanceof Goal) - composeGoal(name, (Goal)resource); - else if (resource instanceof GraphDefinition) - composeGraphDefinition(name, (GraphDefinition)resource); - else if (resource instanceof Group) - composeGroup(name, (Group)resource); - else if (resource instanceof GuidanceResponse) - composeGuidanceResponse(name, (GuidanceResponse)resource); - else if (resource instanceof HealthcareService) - composeHealthcareService(name, (HealthcareService)resource); - else if (resource instanceof ImagingManifest) - composeImagingManifest(name, (ImagingManifest)resource); - else if (resource instanceof ImagingStudy) - composeImagingStudy(name, (ImagingStudy)resource); - else if (resource instanceof Immunization) - composeImmunization(name, (Immunization)resource); - else if (resource instanceof ImmunizationRecommendation) - composeImmunizationRecommendation(name, (ImmunizationRecommendation)resource); - else if (resource instanceof ImplementationGuide) - composeImplementationGuide(name, (ImplementationGuide)resource); - else if (resource instanceof Library) - composeLibrary(name, (Library)resource); - else if (resource instanceof Linkage) - composeLinkage(name, (Linkage)resource); - else if (resource instanceof ListResource) - composeListResource(name, (ListResource)resource); - else if (resource instanceof Location) - composeLocation(name, (Location)resource); - else if (resource instanceof Measure) - composeMeasure(name, (Measure)resource); - else if (resource instanceof MeasureReport) - composeMeasureReport(name, (MeasureReport)resource); - else if (resource instanceof Media) - composeMedia(name, (Media)resource); - else if (resource instanceof Medication) - composeMedication(name, (Medication)resource); - else if (resource instanceof MedicationAdministration) - composeMedicationAdministration(name, (MedicationAdministration)resource); - else if (resource instanceof MedicationDispense) - composeMedicationDispense(name, (MedicationDispense)resource); - else if (resource instanceof MedicationRequest) - composeMedicationRequest(name, (MedicationRequest)resource); - else if (resource instanceof MedicationStatement) - composeMedicationStatement(name, (MedicationStatement)resource); - else if (resource instanceof MessageDefinition) - composeMessageDefinition(name, (MessageDefinition)resource); - else if (resource instanceof MessageHeader) - composeMessageHeader(name, (MessageHeader)resource); - else if (resource instanceof NamingSystem) - composeNamingSystem(name, (NamingSystem)resource); - else if (resource instanceof NutritionOrder) - composeNutritionOrder(name, (NutritionOrder)resource); - else if (resource instanceof Observation) - composeObservation(name, (Observation)resource); - else if (resource instanceof OperationDefinition) - composeOperationDefinition(name, (OperationDefinition)resource); - else if (resource instanceof OperationOutcome) - composeOperationOutcome(name, (OperationOutcome)resource); - else if (resource instanceof Organization) - composeOrganization(name, (Organization)resource); - else if (resource instanceof Patient) - composePatient(name, (Patient)resource); - else if (resource instanceof PaymentNotice) - composePaymentNotice(name, (PaymentNotice)resource); - else if (resource instanceof PaymentReconciliation) - composePaymentReconciliation(name, (PaymentReconciliation)resource); - else if (resource instanceof Person) - composePerson(name, (Person)resource); - else if (resource instanceof PlanDefinition) - composePlanDefinition(name, (PlanDefinition)resource); - else if (resource instanceof Practitioner) - composePractitioner(name, (Practitioner)resource); - else if (resource instanceof PractitionerRole) - composePractitionerRole(name, (PractitionerRole)resource); - else if (resource instanceof Procedure) - composeProcedure(name, (Procedure)resource); - else if (resource instanceof ProcedureRequest) - composeProcedureRequest(name, (ProcedureRequest)resource); - else if (resource instanceof ProcessRequest) - composeProcessRequest(name, (ProcessRequest)resource); - else if (resource instanceof ProcessResponse) - composeProcessResponse(name, (ProcessResponse)resource); - else if (resource instanceof Provenance) - composeProvenance(name, (Provenance)resource); - else if (resource instanceof Questionnaire) - composeQuestionnaire(name, (Questionnaire)resource); - else if (resource instanceof QuestionnaireResponse) - composeQuestionnaireResponse(name, (QuestionnaireResponse)resource); - else if (resource instanceof RelatedPerson) - composeRelatedPerson(name, (RelatedPerson)resource); - else if (resource instanceof RequestGroup) - composeRequestGroup(name, (RequestGroup)resource); - else if (resource instanceof ResearchStudy) - composeResearchStudy(name, (ResearchStudy)resource); - else if (resource instanceof ResearchSubject) - composeResearchSubject(name, (ResearchSubject)resource); - else if (resource instanceof RiskAssessment) - composeRiskAssessment(name, (RiskAssessment)resource); - else if (resource instanceof Schedule) - composeSchedule(name, (Schedule)resource); - else if (resource instanceof SearchParameter) - composeSearchParameter(name, (SearchParameter)resource); - else if (resource instanceof Sequence) - composeSequence(name, (Sequence)resource); - else if (resource instanceof ServiceDefinition) - composeServiceDefinition(name, (ServiceDefinition)resource); - else if (resource instanceof Slot) - composeSlot(name, (Slot)resource); - else if (resource instanceof Specimen) - composeSpecimen(name, (Specimen)resource); - else if (resource instanceof StructureDefinition) - composeStructureDefinition(name, (StructureDefinition)resource); - else if (resource instanceof StructureMap) - composeStructureMap(name, (StructureMap)resource); - else if (resource instanceof Subscription) - composeSubscription(name, (Subscription)resource); - else if (resource instanceof Substance) - composeSubstance(name, (Substance)resource); - else if (resource instanceof SupplyDelivery) - composeSupplyDelivery(name, (SupplyDelivery)resource); - else if (resource instanceof SupplyRequest) - composeSupplyRequest(name, (SupplyRequest)resource); - else if (resource instanceof Task) - composeTask(name, (Task)resource); - else if (resource instanceof TestReport) - composeTestReport(name, (TestReport)resource); - else if (resource instanceof TestScript) - composeTestScript(name, (TestScript)resource); - else if (resource instanceof ValueSet) - composeValueSet(name, (ValueSet)resource); - else if (resource instanceof VisionPrescription) - composeVisionPrescription(name, (VisionPrescription)resource); - else if (resource instanceof Binary) - composeBinary(name, (Binary)resource); - else - throw new Error("Unhandled resource type "+resource.getClass().getName()); - } - - protected void composeType(String prefix, Type type) throws IOException { - if (type == null) - ; - else if (type instanceof SimpleQuantity) - composeSimpleQuantity(prefix+"SimpleQuantity", (SimpleQuantity) type); - else if (type instanceof Extension) - composeExtension(prefix+"Extension", (Extension) type); - else if (type instanceof Narrative) - composeNarrative(prefix+"Narrative", (Narrative) type); - else if (type instanceof Duration) - composeDuration(prefix+"Duration", (Duration) type); - else if (type instanceof Count) - composeCount(prefix+"Count", (Count) type); - else if (type instanceof Money) - composeMoney(prefix+"Money", (Money) type); - else if (type instanceof Distance) - composeDistance(prefix+"Distance", (Distance) type); - else if (type instanceof Age) - composeAge(prefix+"Age", (Age) type); - else if (type instanceof Reference) - composeReference(prefix+"Reference", (Reference) type); - else if (type instanceof Quantity) - composeQuantity(prefix+"Quantity", (Quantity) type); - else if (type instanceof Period) - composePeriod(prefix+"Period", (Period) type); - else if (type instanceof Attachment) - composeAttachment(prefix+"Attachment", (Attachment) type); - else if (type instanceof Range) - composeRange(prefix+"Range", (Range) type); - else if (type instanceof Annotation) - composeAnnotation(prefix+"Annotation", (Annotation) type); - else if (type instanceof Identifier) - composeIdentifier(prefix+"Identifier", (Identifier) type); - else if (type instanceof Coding) - composeCoding(prefix+"Coding", (Coding) type); - else if (type instanceof Signature) - composeSignature(prefix+"Signature", (Signature) type); - else if (type instanceof SampledData) - composeSampledData(prefix+"SampledData", (SampledData) type); - else if (type instanceof Ratio) - composeRatio(prefix+"Ratio", (Ratio) type); - else if (type instanceof CodeableConcept) - composeCodeableConcept(prefix+"CodeableConcept", (CodeableConcept) type); - else if (type instanceof Meta) - composeMeta(prefix+"Meta", (Meta) type); - else if (type instanceof Address) - composeAddress(prefix+"Address", (Address) type); - else if (type instanceof TriggerDefinition) - composeTriggerDefinition(prefix+"TriggerDefinition", (TriggerDefinition) type); - else if (type instanceof Contributor) - composeContributor(prefix+"Contributor", (Contributor) type); - else if (type instanceof DataRequirement) - composeDataRequirement(prefix+"DataRequirement", (DataRequirement) type); - else if (type instanceof Dosage) - composeDosage(prefix+"Dosage", (Dosage) type); - else if (type instanceof RelatedArtifact) - composeRelatedArtifact(prefix+"RelatedArtifact", (RelatedArtifact) type); - else if (type instanceof ContactDetail) - composeContactDetail(prefix+"ContactDetail", (ContactDetail) type); - else if (type instanceof HumanName) - composeHumanName(prefix+"HumanName", (HumanName) type); - else if (type instanceof ContactPoint) - composeContactPoint(prefix+"ContactPoint", (ContactPoint) type); - else if (type instanceof UsageContext) - composeUsageContext(prefix+"UsageContext", (UsageContext) type); - else if (type instanceof Timing) - composeTiming(prefix+"Timing", (Timing) type); - else if (type instanceof ElementDefinition) - composeElementDefinition(prefix+"ElementDefinition", (ElementDefinition) type); - else if (type instanceof ParameterDefinition) - composeParameterDefinition(prefix+"ParameterDefinition", (ParameterDefinition) type); - else if (type instanceof CodeType) { - composeCodeCore(prefix+"Code", (CodeType) type, false); - composeCodeExtras(prefix+"Code", (CodeType) type, false); - } - else if (type instanceof OidType) { - composeOidCore(prefix+"Oid", (OidType) type, false); - composeOidExtras(prefix+"Oid", (OidType) type, false); - } - else if (type instanceof UuidType) { - composeUuidCore(prefix+"Uuid", (UuidType) type, false); - composeUuidExtras(prefix+"Uuid", (UuidType) type, false); - } - else if (type instanceof UnsignedIntType) { - composeUnsignedIntCore(prefix+"UnsignedInt", (UnsignedIntType) type, false); - composeUnsignedIntExtras(prefix+"UnsignedInt", (UnsignedIntType) type, false); - } - else if (type instanceof MarkdownType) { - composeMarkdownCore(prefix+"Markdown", (MarkdownType) type, false); - composeMarkdownExtras(prefix+"Markdown", (MarkdownType) type, false); - } - else if (type instanceof IdType) { - composeIdCore(prefix+"Id", (IdType) type, false); - composeIdExtras(prefix+"Id", (IdType) type, false); - } - else if (type instanceof PositiveIntType) { - composePositiveIntCore(prefix+"PositiveInt", (PositiveIntType) type, false); - composePositiveIntExtras(prefix+"PositiveInt", (PositiveIntType) type, false); - } - else if (type instanceof DateType) { - composeDateCore(prefix+"Date", (DateType) type, false); - composeDateExtras(prefix+"Date", (DateType) type, false); - } - else if (type instanceof DateTimeType) { - composeDateTimeCore(prefix+"DateTime", (DateTimeType) type, false); - composeDateTimeExtras(prefix+"DateTime", (DateTimeType) type, false); - } - else if (type instanceof StringType) { - composeStringCore(prefix+"String", (StringType) type, false); - composeStringExtras(prefix+"String", (StringType) type, false); - } - else if (type instanceof IntegerType) { - composeIntegerCore(prefix+"Integer", (IntegerType) type, false); - composeIntegerExtras(prefix+"Integer", (IntegerType) type, false); - } - else if (type instanceof UriType) { - composeUriCore(prefix+"Uri", (UriType) type, false); - composeUriExtras(prefix+"Uri", (UriType) type, false); - } - else if (type instanceof InstantType) { - composeInstantCore(prefix+"Instant", (InstantType) type, false); - composeInstantExtras(prefix+"Instant", (InstantType) type, false); - } - else if (type instanceof BooleanType) { - composeBooleanCore(prefix+"Boolean", (BooleanType) type, false); - composeBooleanExtras(prefix+"Boolean", (BooleanType) type, false); - } - else if (type instanceof Base64BinaryType) { - composeBase64BinaryCore(prefix+"Base64Binary", (Base64BinaryType) type, false); - composeBase64BinaryExtras(prefix+"Base64Binary", (Base64BinaryType) type, false); - } - else if (type instanceof TimeType) { - composeTimeCore(prefix+"Time", (TimeType) type, false); - composeTimeExtras(prefix+"Time", (TimeType) type, false); - } - else if (type instanceof DecimalType) { - composeDecimalCore(prefix+"Decimal", (DecimalType) type, false); - composeDecimalExtras(prefix+"Decimal", (DecimalType) type, false); - } - else - throw new Error("Unhandled type"); - } - - protected void composeTypeInner(Type type) throws IOException { - if (type == null) - ; - else if (type instanceof Extension) - composeExtensionInner((Extension) type); - else if (type instanceof Narrative) - composeNarrativeInner((Narrative) type); - else if (type instanceof Duration) - composeDurationInner((Duration) type); - else if (type instanceof Count) - composeCountInner((Count) type); - else if (type instanceof Money) - composeMoneyInner((Money) type); - else if (type instanceof Distance) - composeDistanceInner((Distance) type); - else if (type instanceof Age) - composeAgeInner((Age) type); - else if (type instanceof Reference) - composeReferenceInner((Reference) type); - else if (type instanceof Quantity) - composeQuantityInner((Quantity) type); - else if (type instanceof Period) - composePeriodInner((Period) type); - else if (type instanceof Attachment) - composeAttachmentInner((Attachment) type); - else if (type instanceof Range) - composeRangeInner((Range) type); - else if (type instanceof Annotation) - composeAnnotationInner((Annotation) type); - else if (type instanceof Identifier) - composeIdentifierInner((Identifier) type); - else if (type instanceof Coding) - composeCodingInner((Coding) type); - else if (type instanceof Signature) - composeSignatureInner((Signature) type); - else if (type instanceof SampledData) - composeSampledDataInner((SampledData) type); - else if (type instanceof Ratio) - composeRatioInner((Ratio) type); - else if (type instanceof CodeableConcept) - composeCodeableConceptInner((CodeableConcept) type); - else if (type instanceof SimpleQuantity) - composeSimpleQuantityInner((SimpleQuantity) type); - else if (type instanceof Meta) - composeMetaInner((Meta) type); - else if (type instanceof Address) - composeAddressInner((Address) type); - else if (type instanceof TriggerDefinition) - composeTriggerDefinitionInner((TriggerDefinition) type); - else if (type instanceof Contributor) - composeContributorInner((Contributor) type); - else if (type instanceof DataRequirement) - composeDataRequirementInner((DataRequirement) type); - else if (type instanceof Dosage) - composeDosageInner((Dosage) type); - else if (type instanceof RelatedArtifact) - composeRelatedArtifactInner((RelatedArtifact) type); - else if (type instanceof ContactDetail) - composeContactDetailInner((ContactDetail) type); - else if (type instanceof HumanName) - composeHumanNameInner((HumanName) type); - else if (type instanceof ContactPoint) - composeContactPointInner((ContactPoint) type); - else if (type instanceof UsageContext) - composeUsageContextInner((UsageContext) type); - else if (type instanceof Timing) - composeTimingInner((Timing) type); - else if (type instanceof ElementDefinition) - composeElementDefinitionInner((ElementDefinition) type); - else if (type instanceof ParameterDefinition) - composeParameterDefinitionInner((ParameterDefinition) type); - else - throw new Error("Unhandled type"); - } - -} - +package org.hl7.fhir.r4.formats; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import org.hl7.fhir.r4.model.DateType; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.IntegerType; +import org.hl7.fhir.r4.model.OidType; +import org.hl7.fhir.r4.model.UriType; +import org.hl7.fhir.r4.model.UuidType; +import org.hl7.fhir.r4.model.InstantType; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.Base64BinaryType; +import org.hl7.fhir.r4.model.UnsignedIntType; +import org.hl7.fhir.r4.model.MarkdownType; +import org.hl7.fhir.r4.model.TimeType; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.PositiveIntType; +import org.hl7.fhir.r4.model.DecimalType; +import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; +import org.hl7.fhir.exceptions.FHIRFormatError; +import org.hl7.fhir.exceptions.FHIRException; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import java.io.IOException; + +public class JsonParser extends JsonParserBase { + + protected void parseElementProperties(JsonObject json, Element element) throws IOException, FHIRFormatError { + super.parseElementProperties(json, element); + if (json.has("extension")) { + JsonArray array = json.getAsJsonArray("extension"); + for (int i = 0; i < array.size(); i++) { + element.getExtension().add(parseExtension(array.get(i).getAsJsonObject())); + } + }; + } + + protected void parseBackboneProperties(JsonObject json, BackboneElement element) throws IOException, FHIRFormatError { + parseElementProperties(json, element); + if (json.has("modifierExtension")) { + JsonArray array = json.getAsJsonArray("modifierExtension"); + for (int i = 0; i < array.size(); i++) { + element.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject())); + } + } + } + + protected void parseTypeProperties(JsonObject json, Element element) throws IOException, FHIRFormatError { + parseElementProperties(json, element); + } + + @SuppressWarnings("unchecked") + protected > Enumeration parseEnumeration(String s, E item, EnumFactory e) throws IOException, FHIRFormatError { + Enumeration res = new Enumeration(e); + if (s != null) + res.setValue((E) e.fromCode(s)); + return res; + } + + protected DateType parseDate(String v) throws IOException, FHIRFormatError { + DateType res = new DateType(v); + return res; + } + + protected DateTimeType parseDateTime(String v) throws IOException, FHIRFormatError { + DateTimeType res = new DateTimeType(v); + return res; + } + + protected CodeType parseCode(String v) throws IOException, FHIRFormatError { + CodeType res = new CodeType(v); + return res; + } + + protected StringType parseString(String v) throws IOException, FHIRFormatError { + StringType res = new StringType(v); + return res; + } + + protected IntegerType parseInteger(java.lang.Long v) throws IOException, FHIRFormatError { + IntegerType res = new IntegerType(v); + return res; + } + + protected OidType parseOid(String v) throws IOException, FHIRFormatError { + OidType res = new OidType(v); + return res; + } + + protected UriType parseUri(String v) throws IOException, FHIRFormatError { + UriType res = new UriType(v); + return res; + } + + protected UuidType parseUuid(String v) throws IOException, FHIRFormatError { + UuidType res = new UuidType(v); + return res; + } + + protected InstantType parseInstant(String v) throws IOException, FHIRFormatError { + InstantType res = new InstantType(v); + return res; + } + + protected BooleanType parseBoolean(java.lang.Boolean v) throws IOException, FHIRFormatError { + BooleanType res = new BooleanType(v); + return res; + } + + protected Base64BinaryType parseBase64Binary(String v) throws IOException, FHIRFormatError { + Base64BinaryType res = new Base64BinaryType(v); + return res; + } + + protected UnsignedIntType parseUnsignedInt(String v) throws IOException, FHIRFormatError { + UnsignedIntType res = new UnsignedIntType(v); + return res; + } + + protected MarkdownType parseMarkdown(String v) throws IOException, FHIRFormatError { + MarkdownType res = new MarkdownType(v); + return res; + } + + protected TimeType parseTime(String v) throws IOException, FHIRFormatError { + TimeType res = new TimeType(v); + return res; + } + + protected IdType parseId(String v) throws IOException, FHIRFormatError { + IdType res = new IdType(v); + return res; + } + + protected PositiveIntType parsePositiveInt(String v) throws IOException, FHIRFormatError { + PositiveIntType res = new PositiveIntType(v); + return res; + } + + protected DecimalType parseDecimal(java.math.BigDecimal v) throws IOException, FHIRFormatError { + DecimalType res = new DecimalType(v); + return res; + } + + protected Extension parseExtension(JsonObject json) throws IOException, FHIRFormatError { + Extension res = new Extension(); + parseExtensionProperties(json, res); + return res; + } + + protected void parseExtensionProperties(JsonObject json, Extension res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected Narrative parseNarrative(JsonObject json) throws IOException, FHIRFormatError { + Narrative res = new Narrative(); + parseNarrativeProperties(json, res); + return res; + } + + protected void parseNarrativeProperties(JsonObject json, Narrative res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Narrative.NarrativeStatus.NULL, new Narrative.NarrativeStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("div")) + res.setDiv(parseXhtml(json.get("div").getAsString())); + } + + protected Reference parseReference(JsonObject json) throws IOException, FHIRFormatError { + Reference res = new Reference(); + parseReferenceProperties(json, res); + return res; + } + + protected void parseReferenceProperties(JsonObject json, Reference res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("reference")) + res.setReferenceElement(parseString(json.get("reference").getAsString())); + if (json.has("_reference")) + parseElementProperties(json.getAsJsonObject("_reference"), res.getReferenceElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + } + + protected Quantity parseQuantity(JsonObject json) throws IOException, FHIRFormatError { + Quantity res = new Quantity(); + parseQuantityProperties(json, res); + return res; + } + + protected void parseQuantityProperties(JsonObject json, Quantity res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("value")) + res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("comparator")) + res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); + if (json.has("_comparator")) + parseElementProperties(json.getAsJsonObject("_comparator"), res.getComparatorElement()); + if (json.has("unit")) + res.setUnitElement(parseString(json.get("unit").getAsString())); + if (json.has("_unit")) + parseElementProperties(json.getAsJsonObject("_unit"), res.getUnitElement()); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + } + + protected Period parsePeriod(JsonObject json) throws IOException, FHIRFormatError { + Period res = new Period(); + parsePeriodProperties(json, res); + return res; + } + + protected void parsePeriodProperties(JsonObject json, Period res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("start")) + res.setStartElement(parseDateTime(json.get("start").getAsString())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseDateTime(json.get("end").getAsString())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + } + + protected Attachment parseAttachment(JsonObject json) throws IOException, FHIRFormatError { + Attachment res = new Attachment(); + parseAttachmentProperties(json, res); + return res; + } + + protected void parseAttachmentProperties(JsonObject json, Attachment res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("contentType")) + res.setContentTypeElement(parseCode(json.get("contentType").getAsString())); + if (json.has("_contentType")) + parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("data")) + res.setDataElement(parseBase64Binary(json.get("data").getAsString())); + if (json.has("_data")) + parseElementProperties(json.getAsJsonObject("_data"), res.getDataElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("size")) + res.setSizeElement(parseUnsignedInt(json.get("size").getAsString())); + if (json.has("_size")) + parseElementProperties(json.getAsJsonObject("_size"), res.getSizeElement()); + if (json.has("hash")) + res.setHashElement(parseBase64Binary(json.get("hash").getAsString())); + if (json.has("_hash")) + parseElementProperties(json.getAsJsonObject("_hash"), res.getHashElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("creation")) + res.setCreationElement(parseDateTime(json.get("creation").getAsString())); + if (json.has("_creation")) + parseElementProperties(json.getAsJsonObject("_creation"), res.getCreationElement()); + } + + protected Duration parseDuration(JsonObject json) throws IOException, FHIRFormatError { + Duration res = new Duration(); + parseDurationProperties(json, res); + return res; + } + + protected void parseDurationProperties(JsonObject json, Duration res) throws IOException, FHIRFormatError { + parseQuantityProperties(json, res); + } + + protected Count parseCount(JsonObject json) throws IOException, FHIRFormatError { + Count res = new Count(); + parseCountProperties(json, res); + return res; + } + + protected void parseCountProperties(JsonObject json, Count res) throws IOException, FHIRFormatError { + parseQuantityProperties(json, res); + } + + protected Range parseRange(JsonObject json) throws IOException, FHIRFormatError { + Range res = new Range(); + parseRangeProperties(json, res); + return res; + } + + protected void parseRangeProperties(JsonObject json, Range res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("low")) + res.setLow(parseSimpleQuantity(json.getAsJsonObject("low"))); + if (json.has("high")) + res.setHigh(parseSimpleQuantity(json.getAsJsonObject("high"))); + } + + protected Annotation parseAnnotation(JsonObject json) throws IOException, FHIRFormatError { + Annotation res = new Annotation(); + parseAnnotationProperties(json, res); + return res; + } + + protected void parseAnnotationProperties(JsonObject json, Annotation res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + Type author = parseType("author", json); + if (author != null) + res.setAuthor(author); + if (json.has("time")) + res.setTimeElement(parseDateTime(json.get("time").getAsString())); + if (json.has("_time")) + parseElementProperties(json.getAsJsonObject("_time"), res.getTimeElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + } + + protected Money parseMoney(JsonObject json) throws IOException, FHIRFormatError { + Money res = new Money(); + parseMoneyProperties(json, res); + return res; + } + + protected void parseMoneyProperties(JsonObject json, Money res) throws IOException, FHIRFormatError { + parseQuantityProperties(json, res); + } + + protected Identifier parseIdentifier(JsonObject json) throws IOException, FHIRFormatError { + Identifier res = new Identifier(); + parseIdentifierProperties(json, res); + return res; + } + + protected void parseIdentifierProperties(JsonObject json, Identifier res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), Identifier.IdentifierUse.NULL, new Identifier.IdentifierUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("assigner")) + res.setAssigner(parseReference(json.getAsJsonObject("assigner"))); + } + + protected Coding parseCoding(JsonObject json) throws IOException, FHIRFormatError { + Coding res = new Coding(); + parseCodingProperties(json, res); + return res; + } + + protected void parseCodingProperties(JsonObject json, Coding res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("userSelected")) + res.setUserSelectedElement(parseBoolean(json.get("userSelected").getAsBoolean())); + if (json.has("_userSelected")) + parseElementProperties(json.getAsJsonObject("_userSelected"), res.getUserSelectedElement()); + } + + protected Signature parseSignature(JsonObject json) throws IOException, FHIRFormatError { + Signature res = new Signature(); + parseSignatureProperties(json, res); + return res; + } + + protected void parseSignatureProperties(JsonObject json, Signature res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("when")) + res.setWhenElement(parseInstant(json.get("when").getAsString())); + if (json.has("_when")) + parseElementProperties(json.getAsJsonObject("_when"), res.getWhenElement()); + Type who = parseType("who", json); + if (who != null) + res.setWho(who); + Type onBehalfOf = parseType("onBehalfOf", json); + if (onBehalfOf != null) + res.setOnBehalfOf(onBehalfOf); + if (json.has("contentType")) + res.setContentTypeElement(parseCode(json.get("contentType").getAsString())); + if (json.has("_contentType")) + parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); + if (json.has("blob")) + res.setBlobElement(parseBase64Binary(json.get("blob").getAsString())); + if (json.has("_blob")) + parseElementProperties(json.getAsJsonObject("_blob"), res.getBlobElement()); + } + + protected SampledData parseSampledData(JsonObject json) throws IOException, FHIRFormatError { + SampledData res = new SampledData(); + parseSampledDataProperties(json, res); + return res; + } + + protected void parseSampledDataProperties(JsonObject json, SampledData res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("origin")) + res.setOrigin(parseSimpleQuantity(json.getAsJsonObject("origin"))); + if (json.has("period")) + res.setPeriodElement(parseDecimal(json.get("period").getAsBigDecimal())); + if (json.has("_period")) + parseElementProperties(json.getAsJsonObject("_period"), res.getPeriodElement()); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("lowerLimit")) + res.setLowerLimitElement(parseDecimal(json.get("lowerLimit").getAsBigDecimal())); + if (json.has("_lowerLimit")) + parseElementProperties(json.getAsJsonObject("_lowerLimit"), res.getLowerLimitElement()); + if (json.has("upperLimit")) + res.setUpperLimitElement(parseDecimal(json.get("upperLimit").getAsBigDecimal())); + if (json.has("_upperLimit")) + parseElementProperties(json.getAsJsonObject("_upperLimit"), res.getUpperLimitElement()); + if (json.has("dimensions")) + res.setDimensionsElement(parsePositiveInt(json.get("dimensions").getAsString())); + if (json.has("_dimensions")) + parseElementProperties(json.getAsJsonObject("_dimensions"), res.getDimensionsElement()); + if (json.has("data")) + res.setDataElement(parseString(json.get("data").getAsString())); + if (json.has("_data")) + parseElementProperties(json.getAsJsonObject("_data"), res.getDataElement()); + } + + protected Ratio parseRatio(JsonObject json) throws IOException, FHIRFormatError { + Ratio res = new Ratio(); + parseRatioProperties(json, res); + return res; + } + + protected void parseRatioProperties(JsonObject json, Ratio res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("numerator")) + res.setNumerator(parseQuantity(json.getAsJsonObject("numerator"))); + if (json.has("denominator")) + res.setDenominator(parseQuantity(json.getAsJsonObject("denominator"))); + } + + protected Distance parseDistance(JsonObject json) throws IOException, FHIRFormatError { + Distance res = new Distance(); + parseDistanceProperties(json, res); + return res; + } + + protected void parseDistanceProperties(JsonObject json, Distance res) throws IOException, FHIRFormatError { + parseQuantityProperties(json, res); + } + + protected Age parseAge(JsonObject json) throws IOException, FHIRFormatError { + Age res = new Age(); + parseAgeProperties(json, res); + return res; + } + + protected void parseAgeProperties(JsonObject json, Age res) throws IOException, FHIRFormatError { + parseQuantityProperties(json, res); + } + + protected CodeableConcept parseCodeableConcept(JsonObject json) throws IOException, FHIRFormatError { + CodeableConcept res = new CodeableConcept(); + parseCodeableConceptProperties(json, res); + return res; + } + + protected void parseCodeableConceptProperties(JsonObject json, CodeableConcept res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("coding")) { + JsonArray array = json.getAsJsonArray("coding"); + for (int i = 0; i < array.size(); i++) { + res.getCoding().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + } + + protected SimpleQuantity parseSimpleQuantity(JsonObject json) throws IOException, FHIRFormatError { + SimpleQuantity res = new SimpleQuantity(); + parseSimpleQuantityProperties(json, res); + return res; + } + + protected void parseSimpleQuantityProperties(JsonObject json, SimpleQuantity res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("value")) + res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("comparator")) + res.setComparatorElement(parseEnumeration(json.get("comparator").getAsString(), Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); + if (json.has("_comparator")) + parseElementProperties(json.getAsJsonObject("_comparator"), res.getComparatorElement()); + if (json.has("unit")) + res.setUnitElement(parseString(json.get("unit").getAsString())); + if (json.has("_unit")) + parseElementProperties(json.getAsJsonObject("_unit"), res.getUnitElement()); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + } + + protected Meta parseMeta(JsonObject json) throws IOException, FHIRFormatError { + Meta res = new Meta(); + parseMetaProperties(json, res); + return res; + } + + protected void parseMetaProperties(JsonObject json, Meta res) throws IOException, FHIRFormatError { + parseElementProperties(json, res); + if (json.has("versionId")) + res.setVersionIdElement(parseId(json.get("versionId").getAsString())); + if (json.has("_versionId")) + parseElementProperties(json.getAsJsonObject("_versionId"), res.getVersionIdElement()); + if (json.has("lastUpdated")) + res.setLastUpdatedElement(parseInstant(json.get("lastUpdated").getAsString())); + if (json.has("_lastUpdated")) + parseElementProperties(json.getAsJsonObject("_lastUpdated"), res.getLastUpdatedElement()); + if (json.has("profile")) { + JsonArray array = json.getAsJsonArray("profile"); + for (int i = 0; i < array.size(); i++) { + res.getProfile().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_profile")) { + JsonArray array = json.getAsJsonArray("_profile"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getProfile().size()) + res.getProfile().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getProfile().get(i)); + } + }; + if (json.has("security")) { + JsonArray array = json.getAsJsonArray("security"); + for (int i = 0; i < array.size(); i++) { + res.getSecurity().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("tag")) { + JsonArray array = json.getAsJsonArray("tag"); + for (int i = 0; i < array.size(); i++) { + res.getTag().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + } + + protected Address parseAddress(JsonObject json) throws IOException, FHIRFormatError { + Address res = new Address(); + parseAddressProperties(json, res); + return res; + } + + protected void parseAddressProperties(JsonObject json, Address res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), Address.AddressUse.NULL, new Address.AddressUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Address.AddressType.NULL, new Address.AddressTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("line")) { + JsonArray array = json.getAsJsonArray("line"); + for (int i = 0; i < array.size(); i++) { + res.getLine().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_line")) { + JsonArray array = json.getAsJsonArray("_line"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getLine().size()) + res.getLine().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getLine().get(i)); + } + }; + if (json.has("city")) + res.setCityElement(parseString(json.get("city").getAsString())); + if (json.has("_city")) + parseElementProperties(json.getAsJsonObject("_city"), res.getCityElement()); + if (json.has("district")) + res.setDistrictElement(parseString(json.get("district").getAsString())); + if (json.has("_district")) + parseElementProperties(json.getAsJsonObject("_district"), res.getDistrictElement()); + if (json.has("state")) + res.setStateElement(parseString(json.get("state").getAsString())); + if (json.has("_state")) + parseElementProperties(json.getAsJsonObject("_state"), res.getStateElement()); + if (json.has("postalCode")) + res.setPostalCodeElement(parseString(json.get("postalCode").getAsString())); + if (json.has("_postalCode")) + parseElementProperties(json.getAsJsonObject("_postalCode"), res.getPostalCodeElement()); + if (json.has("country")) + res.setCountryElement(parseString(json.get("country").getAsString())); + if (json.has("_country")) + parseElementProperties(json.getAsJsonObject("_country"), res.getCountryElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected TriggerDefinition parseTriggerDefinition(JsonObject json) throws IOException, FHIRFormatError { + TriggerDefinition res = new TriggerDefinition(); + parseTriggerDefinitionProperties(json, res); + return res; + } + + protected void parseTriggerDefinitionProperties(JsonObject json, TriggerDefinition res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), TriggerDefinition.TriggerType.NULL, new TriggerDefinition.TriggerTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("name")) + res.setNameElement(parseUri(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + if (json.has("data")) + res.setData(parseDataRequirement(json.getAsJsonObject("data"))); + if (json.has("condition")) + res.setCondition(parseTriggerDefinitionTriggerDefinitionConditionComponent(json.getAsJsonObject("condition"), res)); + } + + protected TriggerDefinition.TriggerDefinitionConditionComponent parseTriggerDefinitionTriggerDefinitionConditionComponent(JsonObject json, TriggerDefinition owner) throws IOException, FHIRFormatError { + TriggerDefinition.TriggerDefinitionConditionComponent res = new TriggerDefinition.TriggerDefinitionConditionComponent(); + parseTriggerDefinitionTriggerDefinitionConditionComponentProperties(json, owner, res); + return res; + } + + protected void parseTriggerDefinitionTriggerDefinitionConditionComponentProperties(JsonObject json, TriggerDefinition owner, TriggerDefinition.TriggerDefinitionConditionComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("language")) + res.setLanguageElement(parseEnumeration(json.get("language").getAsString(), TriggerDefinition.ExpressionLanguage.NULL, new TriggerDefinition.ExpressionLanguageEnumFactory())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + } + + protected Contributor parseContributor(JsonObject json) throws IOException, FHIRFormatError { + Contributor res = new Contributor(); + parseContributorProperties(json, res); + return res; + } + + protected void parseContributorProperties(JsonObject json, Contributor res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Contributor.ContributorType.NULL, new Contributor.ContributorTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + } + + protected DataRequirement parseDataRequirement(JsonObject json) throws IOException, FHIRFormatError { + DataRequirement res = new DataRequirement(); + parseDataRequirementProperties(json, res); + return res; + } + + protected void parseDataRequirementProperties(JsonObject json, DataRequirement res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("profile")) { + JsonArray array = json.getAsJsonArray("profile"); + for (int i = 0; i < array.size(); i++) { + res.getProfile().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_profile")) { + JsonArray array = json.getAsJsonArray("_profile"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getProfile().size()) + res.getProfile().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getProfile().get(i)); + } + }; + if (json.has("mustSupport")) { + JsonArray array = json.getAsJsonArray("mustSupport"); + for (int i = 0; i < array.size(); i++) { + res.getMustSupport().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_mustSupport")) { + JsonArray array = json.getAsJsonArray("_mustSupport"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getMustSupport().size()) + res.getMustSupport().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getMustSupport().get(i)); + } + }; + if (json.has("codeFilter")) { + JsonArray array = json.getAsJsonArray("codeFilter"); + for (int i = 0; i < array.size(); i++) { + res.getCodeFilter().add(parseDataRequirementDataRequirementCodeFilterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("dateFilter")) { + JsonArray array = json.getAsJsonArray("dateFilter"); + for (int i = 0; i < array.size(); i++) { + res.getDateFilter().add(parseDataRequirementDataRequirementDateFilterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementDataRequirementCodeFilterComponent(JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError { + DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent(); + parseDataRequirementDataRequirementCodeFilterComponentProperties(json, owner, res); + return res; + } + + protected void parseDataRequirementDataRequirementCodeFilterComponentProperties(JsonObject json, DataRequirement owner, DataRequirement.DataRequirementCodeFilterComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + Type valueSet = parseType("valueSet", json); + if (valueSet != null) + res.setValueSet(valueSet); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + } + + protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDataRequirementDateFilterComponent(JsonObject json, DataRequirement owner) throws IOException, FHIRFormatError { + DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent(); + parseDataRequirementDataRequirementDateFilterComponentProperties(json, owner, res); + return res; + } + + protected void parseDataRequirementDataRequirementDateFilterComponentProperties(JsonObject json, DataRequirement owner, DataRequirement.DataRequirementDateFilterComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected Dosage parseDosage(JsonObject json) throws IOException, FHIRFormatError { + Dosage res = new Dosage(); + parseDosageProperties(json, res); + return res; + } + + protected void parseDosageProperties(JsonObject json, Dosage res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parseInteger(json.get("sequence").getAsLong())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("additionalInstruction")) { + JsonArray array = json.getAsJsonArray("additionalInstruction"); + for (int i = 0; i < array.size(); i++) { + res.getAdditionalInstruction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("patientInstruction")) + res.setPatientInstructionElement(parseString(json.get("patientInstruction").getAsString())); + if (json.has("_patientInstruction")) + parseElementProperties(json.getAsJsonObject("_patientInstruction"), res.getPatientInstructionElement()); + if (json.has("timing")) + res.setTiming(parseTiming(json.getAsJsonObject("timing"))); + Type asNeeded = parseType("asNeeded", json); + if (asNeeded != null) + res.setAsNeeded(asNeeded); + if (json.has("site")) + res.setSite(parseCodeableConcept(json.getAsJsonObject("site"))); + if (json.has("route")) + res.setRoute(parseCodeableConcept(json.getAsJsonObject("route"))); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + Type dose = parseType("dose", json); + if (dose != null) + res.setDose(dose); + if (json.has("maxDosePerPeriod")) + res.setMaxDosePerPeriod(parseRatio(json.getAsJsonObject("maxDosePerPeriod"))); + if (json.has("maxDosePerAdministration")) + res.setMaxDosePerAdministration(parseSimpleQuantity(json.getAsJsonObject("maxDosePerAdministration"))); + if (json.has("maxDosePerLifetime")) + res.setMaxDosePerLifetime(parseSimpleQuantity(json.getAsJsonObject("maxDosePerLifetime"))); + Type rate = parseType("rate", json); + if (rate != null) + res.setRate(rate); + } + + protected RelatedArtifact parseRelatedArtifact(JsonObject json) throws IOException, FHIRFormatError { + RelatedArtifact res = new RelatedArtifact(); + parseRelatedArtifactProperties(json, res); + return res; + } + + protected void parseRelatedArtifactProperties(JsonObject json, RelatedArtifact res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), RelatedArtifact.RelatedArtifactType.NULL, new RelatedArtifact.RelatedArtifactTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("citation")) + res.setCitationElement(parseString(json.get("citation").getAsString())); + if (json.has("_citation")) + parseElementProperties(json.getAsJsonObject("_citation"), res.getCitationElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("document")) + res.setDocument(parseAttachment(json.getAsJsonObject("document"))); + if (json.has("resource")) + res.setResource(parseReference(json.getAsJsonObject("resource"))); + } + + protected ContactDetail parseContactDetail(JsonObject json) throws IOException, FHIRFormatError { + ContactDetail res = new ContactDetail(); + parseContactDetailProperties(json, res); + return res; + } + + protected void parseContactDetailProperties(JsonObject json, ContactDetail res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + } + + protected HumanName parseHumanName(JsonObject json) throws IOException, FHIRFormatError { + HumanName res = new HumanName(); + parseHumanNameProperties(json, res); + return res; + } + + protected void parseHumanNameProperties(JsonObject json, HumanName res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), HumanName.NameUse.NULL, new HumanName.NameUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("family")) + res.setFamilyElement(parseString(json.get("family").getAsString())); + if (json.has("_family")) + parseElementProperties(json.getAsJsonObject("_family"), res.getFamilyElement()); + if (json.has("given")) { + JsonArray array = json.getAsJsonArray("given"); + for (int i = 0; i < array.size(); i++) { + res.getGiven().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_given")) { + JsonArray array = json.getAsJsonArray("_given"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getGiven().size()) + res.getGiven().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getGiven().get(i)); + } + }; + if (json.has("prefix")) { + JsonArray array = json.getAsJsonArray("prefix"); + for (int i = 0; i < array.size(); i++) { + res.getPrefix().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_prefix")) { + JsonArray array = json.getAsJsonArray("_prefix"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPrefix().size()) + res.getPrefix().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPrefix().get(i)); + } + }; + if (json.has("suffix")) { + JsonArray array = json.getAsJsonArray("suffix"); + for (int i = 0; i < array.size(); i++) { + res.getSuffix().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_suffix")) { + JsonArray array = json.getAsJsonArray("_suffix"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSuffix().size()) + res.getSuffix().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSuffix().get(i)); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected ContactPoint parseContactPoint(JsonObject json) throws IOException, FHIRFormatError { + ContactPoint res = new ContactPoint(); + parseContactPointProperties(json, res); + return res; + } + + protected void parseContactPointProperties(JsonObject json, ContactPoint res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("system")) + res.setSystemElement(parseEnumeration(json.get("system").getAsString(), ContactPoint.ContactPointSystem.NULL, new ContactPoint.ContactPointSystemEnumFactory())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), ContactPoint.ContactPointUse.NULL, new ContactPoint.ContactPointUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("rank")) + res.setRankElement(parsePositiveInt(json.get("rank").getAsString())); + if (json.has("_rank")) + parseElementProperties(json.getAsJsonObject("_rank"), res.getRankElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected UsageContext parseUsageContext(JsonObject json) throws IOException, FHIRFormatError { + UsageContext res = new UsageContext(); + parseUsageContextProperties(json, res); + return res; + } + + protected void parseUsageContextProperties(JsonObject json, UsageContext res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("code")) + res.setCode(parseCoding(json.getAsJsonObject("code"))); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected Timing parseTiming(JsonObject json) throws IOException, FHIRFormatError { + Timing res = new Timing(); + parseTimingProperties(json, res); + return res; + } + + protected void parseTimingProperties(JsonObject json, Timing res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("event")) { + JsonArray array = json.getAsJsonArray("event"); + for (int i = 0; i < array.size(); i++) { + res.getEvent().add(parseDateTime(array.get(i).getAsString())); + } + }; + if (json.has("_event")) { + JsonArray array = json.getAsJsonArray("_event"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getEvent().size()) + res.getEvent().add(parseDateTime(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getEvent().get(i)); + } + }; + if (json.has("repeat")) + res.setRepeat(parseTimingTimingRepeatComponent(json.getAsJsonObject("repeat"), res)); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + } + + protected Timing.TimingRepeatComponent parseTimingTimingRepeatComponent(JsonObject json, Timing owner) throws IOException, FHIRFormatError { + Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent(); + parseTimingTimingRepeatComponentProperties(json, owner, res); + return res; + } + + protected void parseTimingTimingRepeatComponentProperties(JsonObject json, Timing owner, Timing.TimingRepeatComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + Type bounds = parseType("bounds", json); + if (bounds != null) + res.setBounds(bounds); + if (json.has("count")) + res.setCountElement(parseInteger(json.get("count").getAsLong())); + if (json.has("_count")) + parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); + if (json.has("countMax")) + res.setCountMaxElement(parseInteger(json.get("countMax").getAsLong())); + if (json.has("_countMax")) + parseElementProperties(json.getAsJsonObject("_countMax"), res.getCountMaxElement()); + if (json.has("duration")) + res.setDurationElement(parseDecimal(json.get("duration").getAsBigDecimal())); + if (json.has("_duration")) + parseElementProperties(json.getAsJsonObject("_duration"), res.getDurationElement()); + if (json.has("durationMax")) + res.setDurationMaxElement(parseDecimal(json.get("durationMax").getAsBigDecimal())); + if (json.has("_durationMax")) + parseElementProperties(json.getAsJsonObject("_durationMax"), res.getDurationMaxElement()); + if (json.has("durationUnit")) + res.setDurationUnitElement(parseEnumeration(json.get("durationUnit").getAsString(), Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); + if (json.has("_durationUnit")) + parseElementProperties(json.getAsJsonObject("_durationUnit"), res.getDurationUnitElement()); + if (json.has("frequency")) + res.setFrequencyElement(parseInteger(json.get("frequency").getAsLong())); + if (json.has("_frequency")) + parseElementProperties(json.getAsJsonObject("_frequency"), res.getFrequencyElement()); + if (json.has("frequencyMax")) + res.setFrequencyMaxElement(parseInteger(json.get("frequencyMax").getAsLong())); + if (json.has("_frequencyMax")) + parseElementProperties(json.getAsJsonObject("_frequencyMax"), res.getFrequencyMaxElement()); + if (json.has("period")) + res.setPeriodElement(parseDecimal(json.get("period").getAsBigDecimal())); + if (json.has("_period")) + parseElementProperties(json.getAsJsonObject("_period"), res.getPeriodElement()); + if (json.has("periodMax")) + res.setPeriodMaxElement(parseDecimal(json.get("periodMax").getAsBigDecimal())); + if (json.has("_periodMax")) + parseElementProperties(json.getAsJsonObject("_periodMax"), res.getPeriodMaxElement()); + if (json.has("periodUnit")) + res.setPeriodUnitElement(parseEnumeration(json.get("periodUnit").getAsString(), Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); + if (json.has("_periodUnit")) + parseElementProperties(json.getAsJsonObject("_periodUnit"), res.getPeriodUnitElement()); + if (json.has("dayOfWeek")) { + JsonArray array = json.getAsJsonArray("dayOfWeek"); + for (int i = 0; i < array.size(); i++) { + res.getDayOfWeek().add(parseEnumeration(array.get(i).getAsString(), Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); + } + }; + if (json.has("_dayOfWeek")) { + JsonArray array = json.getAsJsonArray("_dayOfWeek"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDayOfWeek().size()) + res.getDayOfWeek().add(parseEnumeration(null, Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDayOfWeek().get(i)); + } + }; + if (json.has("timeOfDay")) { + JsonArray array = json.getAsJsonArray("timeOfDay"); + for (int i = 0; i < array.size(); i++) { + res.getTimeOfDay().add(parseTime(array.get(i).getAsString())); + } + }; + if (json.has("_timeOfDay")) { + JsonArray array = json.getAsJsonArray("_timeOfDay"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getTimeOfDay().size()) + res.getTimeOfDay().add(parseTime(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getTimeOfDay().get(i)); + } + }; + if (json.has("when")) { + JsonArray array = json.getAsJsonArray("when"); + for (int i = 0; i < array.size(); i++) { + res.getWhen().add(parseEnumeration(array.get(i).getAsString(), Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); + } + }; + if (json.has("_when")) { + JsonArray array = json.getAsJsonArray("_when"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getWhen().size()) + res.getWhen().add(parseEnumeration(null, Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getWhen().get(i)); + } + }; + if (json.has("offset")) + res.setOffsetElement(parseUnsignedInt(json.get("offset").getAsString())); + if (json.has("_offset")) + parseElementProperties(json.getAsJsonObject("_offset"), res.getOffsetElement()); + } + + protected ElementDefinition parseElementDefinition(JsonObject json) throws IOException, FHIRFormatError { + ElementDefinition res = new ElementDefinition(); + parseElementDefinitionProperties(json, res); + return res; + } + + protected void parseElementDefinitionProperties(JsonObject json, ElementDefinition res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("representation")) { + JsonArray array = json.getAsJsonArray("representation"); + for (int i = 0; i < array.size(); i++) { + res.getRepresentation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory())); + } + }; + if (json.has("_representation")) { + JsonArray array = json.getAsJsonArray("_representation"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getRepresentation().size()) + res.getRepresentation().add(parseEnumeration(null, ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getRepresentation().get(i)); + } + }; + if (json.has("sliceName")) + res.setSliceNameElement(parseString(json.get("sliceName").getAsString())); + if (json.has("_sliceName")) + parseElementProperties(json.getAsJsonObject("_sliceName"), res.getSliceNameElement()); + if (json.has("label")) + res.setLabelElement(parseString(json.get("label").getAsString())); + if (json.has("_label")) + parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("slicing")) + res.setSlicing(parseElementDefinitionElementDefinitionSlicingComponent(json.getAsJsonObject("slicing"), res)); + if (json.has("short")) + res.setShortElement(parseString(json.get("short").getAsString())); + if (json.has("_short")) + parseElementProperties(json.getAsJsonObject("_short"), res.getShortElement()); + if (json.has("definition")) + res.setDefinitionElement(parseMarkdown(json.get("definition").getAsString())); + if (json.has("_definition")) + parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); + if (json.has("comment")) + res.setCommentElement(parseMarkdown(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("requirements")) + res.setRequirementsElement(parseMarkdown(json.get("requirements").getAsString())); + if (json.has("_requirements")) + parseElementProperties(json.getAsJsonObject("_requirements"), res.getRequirementsElement()); + if (json.has("alias")) { + JsonArray array = json.getAsJsonArray("alias"); + for (int i = 0; i < array.size(); i++) { + res.getAlias().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_alias")) { + JsonArray array = json.getAsJsonArray("_alias"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getAlias().size()) + res.getAlias().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getAlias().get(i)); + } + }; + if (json.has("min")) + res.setMinElement(parseUnsignedInt(json.get("min").getAsString())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + if (json.has("base")) + res.setBase(parseElementDefinitionElementDefinitionBaseComponent(json.getAsJsonObject("base"), res)); + if (json.has("contentReference")) + res.setContentReferenceElement(parseUri(json.get("contentReference").getAsString())); + if (json.has("_contentReference")) + parseElementProperties(json.getAsJsonObject("_contentReference"), res.getContentReferenceElement()); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseElementDefinitionTypeRefComponent(array.get(i).getAsJsonObject(), res)); + } + }; + Type defaultValue = parseType("defaultValue", json); + if (defaultValue != null) + res.setDefaultValue(defaultValue); + if (json.has("meaningWhenMissing")) + res.setMeaningWhenMissingElement(parseMarkdown(json.get("meaningWhenMissing").getAsString())); + if (json.has("_meaningWhenMissing")) + parseElementProperties(json.getAsJsonObject("_meaningWhenMissing"), res.getMeaningWhenMissingElement()); + if (json.has("orderMeaning")) + res.setOrderMeaningElement(parseString(json.get("orderMeaning").getAsString())); + if (json.has("_orderMeaning")) + parseElementProperties(json.getAsJsonObject("_orderMeaning"), res.getOrderMeaningElement()); + Type fixed = parseType("fixed", json); + if (fixed != null) + res.setFixed(fixed); + Type pattern = parseType("pattern", json); + if (pattern != null) + res.setPattern(pattern); + if (json.has("example")) { + JsonArray array = json.getAsJsonArray("example"); + for (int i = 0; i < array.size(); i++) { + res.getExample().add(parseElementDefinitionElementDefinitionExampleComponent(array.get(i).getAsJsonObject(), res)); + } + }; + Type minValue = parseType("minValue", json); + if (minValue != null) + res.setMinValue(minValue); + Type maxValue = parseType("maxValue", json); + if (maxValue != null) + res.setMaxValue(maxValue); + if (json.has("maxLength")) + res.setMaxLengthElement(parseInteger(json.get("maxLength").getAsLong())); + if (json.has("_maxLength")) + parseElementProperties(json.getAsJsonObject("_maxLength"), res.getMaxLengthElement()); + if (json.has("condition")) { + JsonArray array = json.getAsJsonArray("condition"); + for (int i = 0; i < array.size(); i++) { + res.getCondition().add(parseId(array.get(i).getAsString())); + } + }; + if (json.has("_condition")) { + JsonArray array = json.getAsJsonArray("_condition"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getCondition().size()) + res.getCondition().add(parseId(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getCondition().get(i)); + } + }; + if (json.has("constraint")) { + JsonArray array = json.getAsJsonArray("constraint"); + for (int i = 0; i < array.size(); i++) { + res.getConstraint().add(parseElementDefinitionElementDefinitionConstraintComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("mustSupport")) + res.setMustSupportElement(parseBoolean(json.get("mustSupport").getAsBoolean())); + if (json.has("_mustSupport")) + parseElementProperties(json.getAsJsonObject("_mustSupport"), res.getMustSupportElement()); + if (json.has("isModifier")) + res.setIsModifierElement(parseBoolean(json.get("isModifier").getAsBoolean())); + if (json.has("_isModifier")) + parseElementProperties(json.getAsJsonObject("_isModifier"), res.getIsModifierElement()); + if (json.has("isSummary")) + res.setIsSummaryElement(parseBoolean(json.get("isSummary").getAsBoolean())); + if (json.has("_isSummary")) + parseElementProperties(json.getAsJsonObject("_isSummary"), res.getIsSummaryElement()); + if (json.has("binding")) + res.setBinding(parseElementDefinitionElementDefinitionBindingComponent(json.getAsJsonObject("binding"), res)); + if (json.has("mapping")) { + JsonArray array = json.getAsJsonArray("mapping"); + for (int i = 0; i < array.size(); i++) { + res.getMapping().add(parseElementDefinitionElementDefinitionMappingComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionElementDefinitionSlicingComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent(); + parseElementDefinitionElementDefinitionSlicingComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionSlicingComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("discriminator")) { + JsonArray array = json.getAsJsonArray("discriminator"); + for (int i = 0; i < array.size(); i++) { + res.getDiscriminator().add(parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("ordered")) + res.setOrderedElement(parseBoolean(json.get("ordered").getAsBoolean())); + if (json.has("_ordered")) + parseElementProperties(json.getAsJsonObject("_ordered"), res.getOrderedElement()); + if (json.has("rules")) + res.setRulesElement(parseEnumeration(json.get("rules").getAsString(), ElementDefinition.SlicingRules.NULL, new ElementDefinition.SlicingRulesEnumFactory())); + if (json.has("_rules")) + parseElementProperties(json.getAsJsonObject("_rules"), res.getRulesElement()); + } + + protected ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); + parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ElementDefinition.DiscriminatorType.NULL, new ElementDefinition.DiscriminatorTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + } + + protected ElementDefinition.ElementDefinitionBaseComponent parseElementDefinitionElementDefinitionBaseComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent(); + parseElementDefinitionElementDefinitionBaseComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionBaseComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionBaseComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("min")) + res.setMinElement(parseUnsignedInt(json.get("min").getAsString())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + } + + protected ElementDefinition.TypeRefComponent parseElementDefinitionTypeRefComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent(); + parseElementDefinitionTypeRefComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionTypeRefComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.TypeRefComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseUri(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("profile")) + res.setProfileElement(parseUri(json.get("profile").getAsString())); + if (json.has("_profile")) + parseElementProperties(json.getAsJsonObject("_profile"), res.getProfileElement()); + if (json.has("targetProfile")) + res.setTargetProfileElement(parseUri(json.get("targetProfile").getAsString())); + if (json.has("_targetProfile")) + parseElementProperties(json.getAsJsonObject("_targetProfile"), res.getTargetProfileElement()); + if (json.has("aggregation")) { + JsonArray array = json.getAsJsonArray("aggregation"); + for (int i = 0; i < array.size(); i++) { + res.getAggregation().add(parseEnumeration(array.get(i).getAsString(), ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory())); + } + }; + if (json.has("_aggregation")) { + JsonArray array = json.getAsJsonArray("_aggregation"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getAggregation().size()) + res.getAggregation().add(parseEnumeration(null, ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getAggregation().get(i)); + } + }; + if (json.has("versioning")) + res.setVersioningElement(parseEnumeration(json.get("versioning").getAsString(), ElementDefinition.ReferenceVersionRules.NULL, new ElementDefinition.ReferenceVersionRulesEnumFactory())); + if (json.has("_versioning")) + parseElementProperties(json.getAsJsonObject("_versioning"), res.getVersioningElement()); + } + + protected ElementDefinition.ElementDefinitionExampleComponent parseElementDefinitionElementDefinitionExampleComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent(); + parseElementDefinitionElementDefinitionExampleComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionExampleComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionExampleComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("label")) + res.setLabelElement(parseString(json.get("label").getAsString())); + if (json.has("_label")) + parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionElementDefinitionConstraintComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent(); + parseElementDefinitionElementDefinitionConstraintComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionConstraintComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionConstraintComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("key")) + res.setKeyElement(parseId(json.get("key").getAsString())); + if (json.has("_key")) + parseElementProperties(json.getAsJsonObject("_key"), res.getKeyElement()); + if (json.has("requirements")) + res.setRequirementsElement(parseString(json.get("requirements").getAsString())); + if (json.has("_requirements")) + parseElementProperties(json.getAsJsonObject("_requirements"), res.getRequirementsElement()); + if (json.has("severity")) + res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), ElementDefinition.ConstraintSeverity.NULL, new ElementDefinition.ConstraintSeverityEnumFactory())); + if (json.has("_severity")) + parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); + if (json.has("human")) + res.setHumanElement(parseString(json.get("human").getAsString())); + if (json.has("_human")) + parseElementProperties(json.getAsJsonObject("_human"), res.getHumanElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + if (json.has("xpath")) + res.setXpathElement(parseString(json.get("xpath").getAsString())); + if (json.has("_xpath")) + parseElementProperties(json.getAsJsonObject("_xpath"), res.getXpathElement()); + if (json.has("source")) + res.setSourceElement(parseUri(json.get("source").getAsString())); + if (json.has("_source")) + parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); + } + + protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionElementDefinitionBindingComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent(); + parseElementDefinitionElementDefinitionBindingComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionBindingComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionBindingComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("strength")) + res.setStrengthElement(parseEnumeration(json.get("strength").getAsString(), Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); + if (json.has("_strength")) + parseElementProperties(json.getAsJsonObject("_strength"), res.getStrengthElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + Type valueSet = parseType("valueSet", json); + if (valueSet != null) + res.setValueSet(valueSet); + } + + protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionElementDefinitionMappingComponent(JsonObject json, ElementDefinition owner) throws IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent(); + parseElementDefinitionElementDefinitionMappingComponentProperties(json, owner, res); + return res; + } + + protected void parseElementDefinitionElementDefinitionMappingComponentProperties(JsonObject json, ElementDefinition owner, ElementDefinition.ElementDefinitionMappingComponent res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("identity")) + res.setIdentityElement(parseId(json.get("identity").getAsString())); + if (json.has("_identity")) + parseElementProperties(json.getAsJsonObject("_identity"), res.getIdentityElement()); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("map")) + res.setMapElement(parseString(json.get("map").getAsString())); + if (json.has("_map")) + parseElementProperties(json.getAsJsonObject("_map"), res.getMapElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected ParameterDefinition parseParameterDefinition(JsonObject json) throws IOException, FHIRFormatError { + ParameterDefinition res = new ParameterDefinition(); + parseParameterDefinitionProperties(json, res); + return res; + } + + protected void parseParameterDefinitionProperties(JsonObject json, ParameterDefinition res) throws IOException, FHIRFormatError { + parseTypeProperties(json, res); + if (json.has("name")) + res.setNameElement(parseCode(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), ParameterDefinition.ParameterUse.NULL, new ParameterDefinition.ParameterUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("min")) + res.setMinElement(parseInteger(json.get("min").getAsLong())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("profile")) + res.setProfile(parseReference(json.getAsJsonObject("profile"))); + } + + protected void parseDomainResourceProperties(JsonObject json, DomainResource res) throws IOException, FHIRFormatError { + parseResourceProperties(json, res); + if (json.has("text")) + res.setText(parseNarrative(json.getAsJsonObject("text"))); + if (json.has("contained")) { + JsonArray array = json.getAsJsonArray("contained"); + for (int i = 0; i < array.size(); i++) { + res.getContained().add(parseResource(array.get(i).getAsJsonObject())); + } + }; + if (json.has("extension")) { + JsonArray array = json.getAsJsonArray("extension"); + for (int i = 0; i < array.size(); i++) { + res.getExtension().add(parseExtension(array.get(i).getAsJsonObject())); + } + }; + if (json.has("modifierExtension")) { + JsonArray array = json.getAsJsonArray("modifierExtension"); + for (int i = 0; i < array.size(); i++) { + res.getModifierExtension().add(parseExtension(array.get(i).getAsJsonObject())); + } + }; + } + + protected Parameters parseParameters(JsonObject json) throws IOException, FHIRFormatError { + Parameters res = new Parameters(); + parseParametersProperties(json, res); + return res; + } + + protected void parseParametersProperties(JsonObject json, Parameters res) throws IOException, FHIRFormatError { + parseResourceProperties(json, res); + if (json.has("parameter")) { + JsonArray array = json.getAsJsonArray("parameter"); + for (int i = 0; i < array.size(); i++) { + res.getParameter().add(parseParametersParametersParameterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Parameters.ParametersParameterComponent parseParametersParametersParameterComponent(JsonObject json, Parameters owner) throws IOException, FHIRFormatError { + Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent(); + parseParametersParametersParameterComponentProperties(json, owner, res); + return res; + } + + protected void parseParametersParametersParameterComponentProperties(JsonObject json, Parameters owner, Parameters.ParametersParameterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("resource")) + res.setResource(parseResource(json.getAsJsonObject("resource"))); + if (json.has("part")) { + JsonArray array = json.getAsJsonArray("part"); + for (int i = 0; i < array.size(); i++) { + res.getPart().add(parseParametersParametersParameterComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected void parseResourceProperties(JsonObject json, Resource res) throws IOException, FHIRFormatError { + if (json.has("id")) + res.setIdElement(parseId(json.get("id").getAsString())); + if (json.has("_id")) + parseElementProperties(json.getAsJsonObject("_id"), res.getIdElement()); + if (json.has("meta")) + res.setMeta(parseMeta(json.getAsJsonObject("meta"))); + if (json.has("implicitRules")) + res.setImplicitRulesElement(parseUri(json.get("implicitRules").getAsString())); + if (json.has("_implicitRules")) + parseElementProperties(json.getAsJsonObject("_implicitRules"), res.getImplicitRulesElement()); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + } + + protected Account parseAccount(JsonObject json) throws IOException, FHIRFormatError { + Account res = new Account(); + parseAccountProperties(json, res); + return res; + } + + protected void parseAccountProperties(JsonObject json, Account res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Account.AccountStatus.NULL, new Account.AccountStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("active")) + res.setActive(parsePeriod(json.getAsJsonObject("active"))); + if (json.has("balance")) + res.setBalance(parseMoney(json.getAsJsonObject("balance"))); + if (json.has("coverage")) { + JsonArray array = json.getAsJsonArray("coverage"); + for (int i = 0; i < array.size(); i++) { + res.getCoverage().add(parseAccountCoverageComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("owner")) + res.setOwner(parseReference(json.getAsJsonObject("owner"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("guarantor")) { + JsonArray array = json.getAsJsonArray("guarantor"); + for (int i = 0; i < array.size(); i++) { + res.getGuarantor().add(parseAccountGuarantorComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Account.CoverageComponent parseAccountCoverageComponent(JsonObject json, Account owner) throws IOException, FHIRFormatError { + Account.CoverageComponent res = new Account.CoverageComponent(); + parseAccountCoverageComponentProperties(json, owner, res); + return res; + } + + protected void parseAccountCoverageComponentProperties(JsonObject json, Account owner, Account.CoverageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + if (json.has("priority")) + res.setPriorityElement(parsePositiveInt(json.get("priority").getAsString())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + } + + protected Account.GuarantorComponent parseAccountGuarantorComponent(JsonObject json, Account owner) throws IOException, FHIRFormatError { + Account.GuarantorComponent res = new Account.GuarantorComponent(); + parseAccountGuarantorComponentProperties(json, owner, res); + return res; + } + + protected void parseAccountGuarantorComponentProperties(JsonObject json, Account owner, Account.GuarantorComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("party")) + res.setParty(parseReference(json.getAsJsonObject("party"))); + if (json.has("onHold")) + res.setOnHoldElement(parseBoolean(json.get("onHold").getAsBoolean())); + if (json.has("_onHold")) + parseElementProperties(json.getAsJsonObject("_onHold"), res.getOnHoldElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected ActivityDefinition parseActivityDefinition(JsonObject json) throws IOException, FHIRFormatError { + ActivityDefinition res = new ActivityDefinition(); + parseActivityDefinitionProperties(json, res); + return res; + } + + protected void parseActivityDefinitionProperties(JsonObject json, ActivityDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contributor")) { + JsonArray array = json.getAsJsonArray("contributor"); + for (int i = 0; i < array.size(); i++) { + res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("library")) { + JsonArray array = json.getAsJsonArray("library"); + for (int i = 0; i < array.size(); i++) { + res.getLibrary().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), ActivityDefinition.ActivityDefinitionKind.NULL, new ActivityDefinition.ActivityDefinitionKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseActivityDefinitionActivityDefinitionParticipantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + Type product = parseType("product", json); + if (product != null) + res.setProduct(product); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("dosage")) { + JsonArray array = json.getAsJsonArray("dosage"); + for (int i = 0; i < array.size(); i++) { + res.getDosage().add(parseDosage(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) { + JsonArray array = json.getAsJsonArray("bodySite"); + for (int i = 0; i < array.size(); i++) { + res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("transform")) + res.setTransform(parseReference(json.getAsJsonObject("transform"))); + if (json.has("dynamicValue")) { + JsonArray array = json.getAsJsonArray("dynamicValue"); + for (int i = 0; i < array.size(); i++) { + res.getDynamicValue().add(parseActivityDefinitionActivityDefinitionDynamicValueComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionActivityDefinitionParticipantComponent(JsonObject json, ActivityDefinition owner) throws IOException, FHIRFormatError { + ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent(); + parseActivityDefinitionActivityDefinitionParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parseActivityDefinitionActivityDefinitionParticipantComponentProperties(JsonObject json, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ActivityDefinition.ActivityParticipantType.NULL, new ActivityDefinition.ActivityParticipantTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + } + + protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionActivityDefinitionDynamicValueComponent(JsonObject json, ActivityDefinition owner) throws IOException, FHIRFormatError { + ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent(); + parseActivityDefinitionActivityDefinitionDynamicValueComponentProperties(json, owner, res); + return res; + } + + protected void parseActivityDefinitionActivityDefinitionDynamicValueComponentProperties(JsonObject json, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionDynamicValueComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("language")) + res.setLanguageElement(parseString(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + } + + protected AdverseEvent parseAdverseEvent(JsonObject json) throws IOException, FHIRFormatError { + AdverseEvent res = new AdverseEvent(); + parseAdverseEventProperties(json, res); + return res; + } + + protected void parseAdverseEventProperties(JsonObject json, AdverseEvent res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("actuality")) + res.setActualityElement(parseEnumeration(json.get("actuality").getAsString(), AdverseEvent.AdverseEventActuality.NULL, new AdverseEvent.AdverseEventActualityEnumFactory())); + if (json.has("_actuality")) + parseElementProperties(json.getAsJsonObject("_actuality"), res.getActualityElement()); + if (json.has("category")) + res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), AdverseEvent.AdverseEventCategory.NULL, new AdverseEvent.AdverseEventCategoryEnumFactory())); + if (json.has("_category")) + parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); + if (json.has("event")) + res.setEvent(parseCodeableConcept(json.getAsJsonObject("event"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("resultingCondition")) { + JsonArray array = json.getAsJsonArray("resultingCondition"); + for (int i = 0; i < array.size(); i++) { + res.getResultingCondition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("seriousness")) + res.setSeriousness(parseCodeableConcept(json.getAsJsonObject("seriousness"))); + if (json.has("severity")) + res.setSeverity(parseCodeableConcept(json.getAsJsonObject("severity"))); + if (json.has("outcome")) + res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); + if (json.has("recorder")) + res.setRecorder(parseReference(json.getAsJsonObject("recorder"))); + if (json.has("eventParticipant")) + res.setEventParticipant(parseReference(json.getAsJsonObject("eventParticipant"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("suspectEntity")) { + JsonArray array = json.getAsJsonArray("suspectEntity"); + for (int i = 0; i < array.size(); i++) { + res.getSuspectEntity().add(parseAdverseEventAdverseEventSuspectEntityComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("subjectMedicalHistory")) { + JsonArray array = json.getAsJsonArray("subjectMedicalHistory"); + for (int i = 0; i < array.size(); i++) { + res.getSubjectMedicalHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("referenceDocument")) { + JsonArray array = json.getAsJsonArray("referenceDocument"); + for (int i = 0; i < array.size(); i++) { + res.getReferenceDocument().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("study")) { + JsonArray array = json.getAsJsonArray("study"); + for (int i = 0; i < array.size(); i++) { + res.getStudy().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventAdverseEventSuspectEntityComponent(JsonObject json, AdverseEvent owner) throws IOException, FHIRFormatError { + AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent(); + parseAdverseEventAdverseEventSuspectEntityComponentProperties(json, owner, res); + return res; + } + + protected void parseAdverseEventAdverseEventSuspectEntityComponentProperties(JsonObject json, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("instance")) + res.setInstance(parseReference(json.getAsJsonObject("instance"))); + if (json.has("causality")) { + JsonArray array = json.getAsJsonArray("causality"); + for (int i = 0; i < array.size(); i++) { + res.getCausality().add(parseAdverseEventAdverseEventSuspectEntityCausalityComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventAdverseEventSuspectEntityCausalityComponent(JsonObject json, AdverseEvent owner) throws IOException, FHIRFormatError { + AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent(); + parseAdverseEventAdverseEventSuspectEntityCausalityComponentProperties(json, owner, res); + return res; + } + + protected void parseAdverseEventAdverseEventSuspectEntityCausalityComponentProperties(JsonObject json, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("assessment")) + res.setAssessment(parseCodeableConcept(json.getAsJsonObject("assessment"))); + if (json.has("productRelatedness")) + res.setProductRelatednessElement(parseString(json.get("productRelatedness").getAsString())); + if (json.has("_productRelatedness")) + parseElementProperties(json.getAsJsonObject("_productRelatedness"), res.getProductRelatednessElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + } + + protected AllergyIntolerance parseAllergyIntolerance(JsonObject json) throws IOException, FHIRFormatError { + AllergyIntolerance res = new AllergyIntolerance(); + parseAllergyIntoleranceProperties(json, res); + return res; + } + + protected void parseAllergyIntoleranceProperties(JsonObject json, AllergyIntolerance res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("clinicalStatus")) + res.setClinicalStatusElement(parseEnumeration(json.get("clinicalStatus").getAsString(), AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL, new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory())); + if (json.has("_clinicalStatus")) + parseElementProperties(json.getAsJsonObject("_clinicalStatus"), res.getClinicalStatusElement()); + if (json.has("verificationStatus")) + res.setVerificationStatusElement(parseEnumeration(json.get("verificationStatus").getAsString(), AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL, new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory())); + if (json.has("_verificationStatus")) + parseElementProperties(json.getAsJsonObject("_verificationStatus"), res.getVerificationStatusElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), AllergyIntolerance.AllergyIntoleranceType.NULL, new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseEnumeration(array.get(i).getAsString(), AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); + } + }; + if (json.has("_category")) { + JsonArray array = json.getAsJsonArray("_category"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getCategory().size()) + res.getCategory().add(parseEnumeration(null, AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getCategory().get(i)); + } + }; + if (json.has("criticality")) + res.setCriticalityElement(parseEnumeration(json.get("criticality").getAsString(), AllergyIntolerance.AllergyIntoleranceCriticality.NULL, new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory())); + if (json.has("_criticality")) + parseElementProperties(json.getAsJsonObject("_criticality"), res.getCriticalityElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + Type onset = parseType("onset", json); + if (onset != null) + res.setOnset(onset); + if (json.has("assertedDate")) + res.setAssertedDateElement(parseDateTime(json.get("assertedDate").getAsString())); + if (json.has("_assertedDate")) + parseElementProperties(json.getAsJsonObject("_assertedDate"), res.getAssertedDateElement()); + if (json.has("recorder")) + res.setRecorder(parseReference(json.getAsJsonObject("recorder"))); + if (json.has("asserter")) + res.setAsserter(parseReference(json.getAsJsonObject("asserter"))); + if (json.has("lastOccurrence")) + res.setLastOccurrenceElement(parseDateTime(json.get("lastOccurrence").getAsString())); + if (json.has("_lastOccurrence")) + parseElementProperties(json.getAsJsonObject("_lastOccurrence"), res.getLastOccurrenceElement()); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reaction")) { + JsonArray array = json.getAsJsonArray("reaction"); + for (int i = 0; i < array.size(); i++) { + res.getReaction().add(parseAllergyIntoleranceAllergyIntoleranceReactionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceAllergyIntoleranceReactionComponent(JsonObject json, AllergyIntolerance owner) throws IOException, FHIRFormatError { + AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent(); + parseAllergyIntoleranceAllergyIntoleranceReactionComponentProperties(json, owner, res); + return res; + } + + protected void parseAllergyIntoleranceAllergyIntoleranceReactionComponentProperties(JsonObject json, AllergyIntolerance owner, AllergyIntolerance.AllergyIntoleranceReactionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("substance")) + res.setSubstance(parseCodeableConcept(json.getAsJsonObject("substance"))); + if (json.has("manifestation")) { + JsonArray array = json.getAsJsonArray("manifestation"); + for (int i = 0; i < array.size(); i++) { + res.getManifestation().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("onset")) + res.setOnsetElement(parseDateTime(json.get("onset").getAsString())); + if (json.has("_onset")) + parseElementProperties(json.getAsJsonObject("_onset"), res.getOnsetElement()); + if (json.has("severity")) + res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), AllergyIntolerance.AllergyIntoleranceSeverity.NULL, new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory())); + if (json.has("_severity")) + parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); + if (json.has("exposureRoute")) + res.setExposureRoute(parseCodeableConcept(json.getAsJsonObject("exposureRoute"))); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected Appointment parseAppointment(JsonObject json) throws IOException, FHIRFormatError { + Appointment res = new Appointment(); + parseAppointmentProperties(json, res); + return res; + } + + protected void parseAppointmentProperties(JsonObject json, Appointment res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Appointment.AppointmentStatus.NULL, new Appointment.AppointmentStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("serviceCategory")) + res.setServiceCategory(parseCodeableConcept(json.getAsJsonObject("serviceCategory"))); + if (json.has("serviceType")) { + JsonArray array = json.getAsJsonArray("serviceType"); + for (int i = 0; i < array.size(); i++) { + res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialty")) { + JsonArray array = json.getAsJsonArray("specialty"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("appointmentType")) + res.setAppointmentType(parseCodeableConcept(json.getAsJsonObject("appointmentType"))); + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("indication")) { + JsonArray array = json.getAsJsonArray("indication"); + for (int i = 0; i < array.size(); i++) { + res.getIndication().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priority")) + res.setPriorityElement(parseUnsignedInt(json.get("priority").getAsString())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("supportingInformation")) { + JsonArray array = json.getAsJsonArray("supportingInformation"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("start")) + res.setStartElement(parseInstant(json.get("start").getAsString())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInstant(json.get("end").getAsString())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + if (json.has("minutesDuration")) + res.setMinutesDurationElement(parsePositiveInt(json.get("minutesDuration").getAsString())); + if (json.has("_minutesDuration")) + parseElementProperties(json.getAsJsonObject("_minutesDuration"), res.getMinutesDurationElement()); + if (json.has("slot")) { + JsonArray array = json.getAsJsonArray("slot"); + for (int i = 0; i < array.size(); i++) { + res.getSlot().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("incomingReferral")) { + JsonArray array = json.getAsJsonArray("incomingReferral"); + for (int i = 0; i < array.size(); i++) { + res.getIncomingReferral().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseAppointmentAppointmentParticipantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("requestedPeriod")) { + JsonArray array = json.getAsJsonArray("requestedPeriod"); + for (int i = 0; i < array.size(); i++) { + res.getRequestedPeriod().add(parsePeriod(array.get(i).getAsJsonObject())); + } + }; + } + + protected Appointment.AppointmentParticipantComponent parseAppointmentAppointmentParticipantComponent(JsonObject json, Appointment owner) throws IOException, FHIRFormatError { + Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent(); + parseAppointmentAppointmentParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parseAppointmentAppointmentParticipantComponentProperties(JsonObject json, Appointment owner, Appointment.AppointmentParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + if (json.has("required")) + res.setRequiredElement(parseEnumeration(json.get("required").getAsString(), Appointment.ParticipantRequired.NULL, new Appointment.ParticipantRequiredEnumFactory())); + if (json.has("_required")) + parseElementProperties(json.getAsJsonObject("_required"), res.getRequiredElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Appointment.ParticipationStatus.NULL, new Appointment.ParticipationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + } + + protected AppointmentResponse parseAppointmentResponse(JsonObject json) throws IOException, FHIRFormatError { + AppointmentResponse res = new AppointmentResponse(); + parseAppointmentResponseProperties(json, res); + return res; + } + + protected void parseAppointmentResponseProperties(JsonObject json, AppointmentResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("appointment")) + res.setAppointment(parseReference(json.getAsJsonObject("appointment"))); + if (json.has("start")) + res.setStartElement(parseInstant(json.get("start").getAsString())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInstant(json.get("end").getAsString())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + if (json.has("participantType")) { + JsonArray array = json.getAsJsonArray("participantType"); + for (int i = 0; i < array.size(); i++) { + res.getParticipantType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + if (json.has("participantStatus")) + res.setParticipantStatusElement(parseEnumeration(json.get("participantStatus").getAsString(), AppointmentResponse.ParticipantStatus.NULL, new AppointmentResponse.ParticipantStatusEnumFactory())); + if (json.has("_participantStatus")) + parseElementProperties(json.getAsJsonObject("_participantStatus"), res.getParticipantStatusElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected AuditEvent parseAuditEvent(JsonObject json) throws IOException, FHIRFormatError { + AuditEvent res = new AuditEvent(); + parseAuditEventProperties(json, res); + return res; + } + + protected void parseAuditEventProperties(JsonObject json, AuditEvent res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("type")) + res.setType(parseCoding(json.getAsJsonObject("type"))); + if (json.has("subtype")) { + JsonArray array = json.getAsJsonArray("subtype"); + for (int i = 0; i < array.size(); i++) { + res.getSubtype().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("action")) + res.setActionElement(parseEnumeration(json.get("action").getAsString(), AuditEvent.AuditEventAction.NULL, new AuditEvent.AuditEventActionEnumFactory())); + if (json.has("_action")) + parseElementProperties(json.getAsJsonObject("_action"), res.getActionElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("recorded")) + res.setRecordedElement(parseInstant(json.get("recorded").getAsString())); + if (json.has("_recorded")) + parseElementProperties(json.getAsJsonObject("_recorded"), res.getRecordedElement()); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), AuditEvent.AuditEventOutcome.NULL, new AuditEvent.AuditEventOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("outcomeDesc")) + res.setOutcomeDescElement(parseString(json.get("outcomeDesc").getAsString())); + if (json.has("_outcomeDesc")) + parseElementProperties(json.getAsJsonObject("_outcomeDesc"), res.getOutcomeDescElement()); + if (json.has("purposeOfEvent")) { + JsonArray array = json.getAsJsonArray("purposeOfEvent"); + for (int i = 0; i < array.size(); i++) { + res.getPurposeOfEvent().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("agent")) { + JsonArray array = json.getAsJsonArray("agent"); + for (int i = 0; i < array.size(); i++) { + res.getAgent().add(parseAuditEventAuditEventAgentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("source")) + res.setSource(parseAuditEventAuditEventSourceComponent(json.getAsJsonObject("source"), res)); + if (json.has("entity")) { + JsonArray array = json.getAsJsonArray("entity"); + for (int i = 0; i < array.size(); i++) { + res.getEntity().add(parseAuditEventAuditEventEntityComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected AuditEvent.AuditEventAgentComponent parseAuditEventAuditEventAgentComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { + AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent(); + parseAuditEventAuditEventAgentComponentProperties(json, owner, res); + return res; + } + + protected void parseAuditEventAuditEventAgentComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventAgentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("role")) { + JsonArray array = json.getAsJsonArray("role"); + for (int i = 0; i < array.size(); i++) { + res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reference")) + res.setReference(parseReference(json.getAsJsonObject("reference"))); + if (json.has("userId")) + res.setUserId(parseIdentifier(json.getAsJsonObject("userId"))); + if (json.has("altId")) + res.setAltIdElement(parseString(json.get("altId").getAsString())); + if (json.has("_altId")) + parseElementProperties(json.getAsJsonObject("_altId"), res.getAltIdElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("requestor")) + res.setRequestorElement(parseBoolean(json.get("requestor").getAsBoolean())); + if (json.has("_requestor")) + parseElementProperties(json.getAsJsonObject("_requestor"), res.getRequestorElement()); + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("policy")) { + JsonArray array = json.getAsJsonArray("policy"); + for (int i = 0; i < array.size(); i++) { + res.getPolicy().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_policy")) { + JsonArray array = json.getAsJsonArray("_policy"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPolicy().size()) + res.getPolicy().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPolicy().get(i)); + } + }; + if (json.has("media")) + res.setMedia(parseCoding(json.getAsJsonObject("media"))); + if (json.has("network")) + res.setNetwork(parseAuditEventAuditEventAgentNetworkComponent(json.getAsJsonObject("network"), owner)); + if (json.has("purposeOfUse")) { + JsonArray array = json.getAsJsonArray("purposeOfUse"); + for (int i = 0; i < array.size(); i++) { + res.getPurposeOfUse().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected AuditEvent.AuditEventAgentNetworkComponent parseAuditEventAuditEventAgentNetworkComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { + AuditEvent.AuditEventAgentNetworkComponent res = new AuditEvent.AuditEventAgentNetworkComponent(); + parseAuditEventAuditEventAgentNetworkComponentProperties(json, owner, res); + return res; + } + + protected void parseAuditEventAuditEventAgentNetworkComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventAgentNetworkComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("address")) + res.setAddressElement(parseString(json.get("address").getAsString())); + if (json.has("_address")) + parseElementProperties(json.getAsJsonObject("_address"), res.getAddressElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), AuditEvent.AuditEventAgentNetworkType.NULL, new AuditEvent.AuditEventAgentNetworkTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + } + + protected AuditEvent.AuditEventSourceComponent parseAuditEventAuditEventSourceComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { + AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent(); + parseAuditEventAuditEventSourceComponentProperties(json, owner, res); + return res; + } + + protected void parseAuditEventAuditEventSourceComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventSourceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("site")) + res.setSiteElement(parseString(json.get("site").getAsString())); + if (json.has("_site")) + parseElementProperties(json.getAsJsonObject("_site"), res.getSiteElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + } + + protected AuditEvent.AuditEventEntityComponent parseAuditEventAuditEventEntityComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { + AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent(); + parseAuditEventAuditEventEntityComponentProperties(json, owner, res); + return res; + } + + protected void parseAuditEventAuditEventEntityComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventEntityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("reference")) + res.setReference(parseReference(json.getAsJsonObject("reference"))); + if (json.has("type")) + res.setType(parseCoding(json.getAsJsonObject("type"))); + if (json.has("role")) + res.setRole(parseCoding(json.getAsJsonObject("role"))); + if (json.has("lifecycle")) + res.setLifecycle(parseCoding(json.getAsJsonObject("lifecycle"))); + if (json.has("securityLabel")) { + JsonArray array = json.getAsJsonArray("securityLabel"); + for (int i = 0; i < array.size(); i++) { + res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("query")) + res.setQueryElement(parseBase64Binary(json.get("query").getAsString())); + if (json.has("_query")) + parseElementProperties(json.getAsJsonObject("_query"), res.getQueryElement()); + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parseAuditEventAuditEventEntityDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventAuditEventEntityDetailComponent(JsonObject json, AuditEvent owner) throws IOException, FHIRFormatError { + AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent(); + parseAuditEventAuditEventEntityDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseAuditEventAuditEventEntityDetailComponentProperties(JsonObject json, AuditEvent owner, AuditEvent.AuditEventEntityDetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseString(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected Basic parseBasic(JsonObject json) throws IOException, FHIRFormatError { + Basic res = new Basic(); + parseBasicProperties(json, res); + return res; + } + + protected void parseBasicProperties(JsonObject json, Basic res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("created")) + res.setCreatedElement(parseDate(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + } + + protected Binary parseBinary(JsonObject json) throws IOException, FHIRFormatError { + Binary res = new Binary(); + parseBinaryProperties(json, res); + return res; + } + + protected void parseBinaryProperties(JsonObject json, Binary res) throws IOException, FHIRFormatError { + parseResourceProperties(json, res); + if (json.has("contentType")) + res.setContentTypeElement(parseCode(json.get("contentType").getAsString())); + if (json.has("_contentType")) + parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); + if (json.has("securityContext")) + res.setSecurityContext(parseReference(json.getAsJsonObject("securityContext"))); + if (json.has("content")) + res.setContentElement(parseBase64Binary(json.get("content").getAsString())); + if (json.has("_content")) + parseElementProperties(json.getAsJsonObject("_content"), res.getContentElement()); + } + + protected BodyStructure parseBodyStructure(JsonObject json) throws IOException, FHIRFormatError { + BodyStructure res = new BodyStructure(); + parseBodyStructureProperties(json, res); + return res; + } + + protected void parseBodyStructureProperties(JsonObject json, BodyStructure res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("morphology")) + res.setMorphology(parseCodeableConcept(json.getAsJsonObject("morphology"))); + if (json.has("location")) + res.setLocation(parseCodeableConcept(json.getAsJsonObject("location"))); + if (json.has("locationQualifier")) { + JsonArray array = json.getAsJsonArray("locationQualifier"); + for (int i = 0; i < array.size(); i++) { + res.getLocationQualifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("image")) { + JsonArray array = json.getAsJsonArray("image"); + for (int i = 0; i < array.size(); i++) { + res.getImage().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + } + + protected Bundle parseBundle(JsonObject json) throws IOException, FHIRFormatError { + Bundle res = new Bundle(); + parseBundleProperties(json, res); + return res; + } + + protected void parseBundleProperties(JsonObject json, Bundle res) throws IOException, FHIRFormatError { + parseResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Bundle.BundleType.NULL, new Bundle.BundleTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("total")) + res.setTotalElement(parseUnsignedInt(json.get("total").getAsString())); + if (json.has("_total")) + parseElementProperties(json.getAsJsonObject("_total"), res.getTotalElement()); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parseBundleBundleLinkComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("entry")) { + JsonArray array = json.getAsJsonArray("entry"); + for (int i = 0; i < array.size(); i++) { + res.getEntry().add(parseBundleBundleEntryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("signature")) + res.setSignature(parseSignature(json.getAsJsonObject("signature"))); + } + + protected Bundle.BundleLinkComponent parseBundleBundleLinkComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { + Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent(); + parseBundleBundleLinkComponentProperties(json, owner, res); + return res; + } + + protected void parseBundleBundleLinkComponentProperties(JsonObject json, Bundle owner, Bundle.BundleLinkComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("relation")) + res.setRelationElement(parseString(json.get("relation").getAsString())); + if (json.has("_relation")) + parseElementProperties(json.getAsJsonObject("_relation"), res.getRelationElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + } + + protected Bundle.BundleEntryComponent parseBundleBundleEntryComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { + Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent(); + parseBundleBundleEntryComponentProperties(json, owner, res); + return res; + } + + protected void parseBundleBundleEntryComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parseBundleBundleLinkComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("fullUrl")) + res.setFullUrlElement(parseUri(json.get("fullUrl").getAsString())); + if (json.has("_fullUrl")) + parseElementProperties(json.getAsJsonObject("_fullUrl"), res.getFullUrlElement()); + if (json.has("resource")) + res.setResource(parseResource(json.getAsJsonObject("resource"))); + if (json.has("search")) + res.setSearch(parseBundleBundleEntrySearchComponent(json.getAsJsonObject("search"), owner)); + if (json.has("request")) + res.setRequest(parseBundleBundleEntryRequestComponent(json.getAsJsonObject("request"), owner)); + if (json.has("response")) + res.setResponse(parseBundleBundleEntryResponseComponent(json.getAsJsonObject("response"), owner)); + } + + protected Bundle.BundleEntrySearchComponent parseBundleBundleEntrySearchComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { + Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent(); + parseBundleBundleEntrySearchComponentProperties(json, owner, res); + return res; + } + + protected void parseBundleBundleEntrySearchComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntrySearchComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Bundle.SearchEntryMode.NULL, new Bundle.SearchEntryModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("score")) + res.setScoreElement(parseDecimal(json.get("score").getAsBigDecimal())); + if (json.has("_score")) + parseElementProperties(json.getAsJsonObject("_score"), res.getScoreElement()); + } + + protected Bundle.BundleEntryRequestComponent parseBundleBundleEntryRequestComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { + Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent(); + parseBundleBundleEntryRequestComponentProperties(json, owner, res); + return res; + } + + protected void parseBundleBundleEntryRequestComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntryRequestComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("method")) + res.setMethodElement(parseEnumeration(json.get("method").getAsString(), Bundle.HTTPVerb.NULL, new Bundle.HTTPVerbEnumFactory())); + if (json.has("_method")) + parseElementProperties(json.getAsJsonObject("_method"), res.getMethodElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("ifNoneMatch")) + res.setIfNoneMatchElement(parseString(json.get("ifNoneMatch").getAsString())); + if (json.has("_ifNoneMatch")) + parseElementProperties(json.getAsJsonObject("_ifNoneMatch"), res.getIfNoneMatchElement()); + if (json.has("ifModifiedSince")) + res.setIfModifiedSinceElement(parseInstant(json.get("ifModifiedSince").getAsString())); + if (json.has("_ifModifiedSince")) + parseElementProperties(json.getAsJsonObject("_ifModifiedSince"), res.getIfModifiedSinceElement()); + if (json.has("ifMatch")) + res.setIfMatchElement(parseString(json.get("ifMatch").getAsString())); + if (json.has("_ifMatch")) + parseElementProperties(json.getAsJsonObject("_ifMatch"), res.getIfMatchElement()); + if (json.has("ifNoneExist")) + res.setIfNoneExistElement(parseString(json.get("ifNoneExist").getAsString())); + if (json.has("_ifNoneExist")) + parseElementProperties(json.getAsJsonObject("_ifNoneExist"), res.getIfNoneExistElement()); + } + + protected Bundle.BundleEntryResponseComponent parseBundleBundleEntryResponseComponent(JsonObject json, Bundle owner) throws IOException, FHIRFormatError { + Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent(); + parseBundleBundleEntryResponseComponentProperties(json, owner, res); + return res; + } + + protected void parseBundleBundleEntryResponseComponentProperties(JsonObject json, Bundle owner, Bundle.BundleEntryResponseComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("status")) + res.setStatusElement(parseString(json.get("status").getAsString())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("location")) + res.setLocationElement(parseUri(json.get("location").getAsString())); + if (json.has("_location")) + parseElementProperties(json.getAsJsonObject("_location"), res.getLocationElement()); + if (json.has("etag")) + res.setEtagElement(parseString(json.get("etag").getAsString())); + if (json.has("_etag")) + parseElementProperties(json.getAsJsonObject("_etag"), res.getEtagElement()); + if (json.has("lastModified")) + res.setLastModifiedElement(parseInstant(json.get("lastModified").getAsString())); + if (json.has("_lastModified")) + parseElementProperties(json.getAsJsonObject("_lastModified"), res.getLastModifiedElement()); + if (json.has("outcome")) + res.setOutcome(parseResource(json.getAsJsonObject("outcome"))); + } + + protected CapabilityStatement parseCapabilityStatement(JsonObject json) throws IOException, FHIRFormatError { + CapabilityStatement res = new CapabilityStatement(); + parseCapabilityStatementProperties(json, res); + return res; + } + + protected void parseCapabilityStatementProperties(JsonObject json, CapabilityStatement res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), CapabilityStatement.CapabilityStatementKind.NULL, new CapabilityStatement.CapabilityStatementKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("instantiates")) { + JsonArray array = json.getAsJsonArray("instantiates"); + for (int i = 0; i < array.size(); i++) { + res.getInstantiates().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_instantiates")) { + JsonArray array = json.getAsJsonArray("_instantiates"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getInstantiates().size()) + res.getInstantiates().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getInstantiates().get(i)); + } + }; + if (json.has("software")) + res.setSoftware(parseCapabilityStatementCapabilityStatementSoftwareComponent(json.getAsJsonObject("software"), res)); + if (json.has("implementation")) + res.setImplementation(parseCapabilityStatementCapabilityStatementImplementationComponent(json.getAsJsonObject("implementation"), res)); + if (json.has("fhirVersion")) + res.setFhirVersionElement(parseId(json.get("fhirVersion").getAsString())); + if (json.has("_fhirVersion")) + parseElementProperties(json.getAsJsonObject("_fhirVersion"), res.getFhirVersionElement()); + if (json.has("acceptUnknown")) + res.setAcceptUnknownElement(parseEnumeration(json.get("acceptUnknown").getAsString(), CapabilityStatement.UnknownContentCode.NULL, new CapabilityStatement.UnknownContentCodeEnumFactory())); + if (json.has("_acceptUnknown")) + parseElementProperties(json.getAsJsonObject("_acceptUnknown"), res.getAcceptUnknownElement()); + if (json.has("format")) { + JsonArray array = json.getAsJsonArray("format"); + for (int i = 0; i < array.size(); i++) { + res.getFormat().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_format")) { + JsonArray array = json.getAsJsonArray("_format"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getFormat().size()) + res.getFormat().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getFormat().get(i)); + } + }; + if (json.has("patchFormat")) { + JsonArray array = json.getAsJsonArray("patchFormat"); + for (int i = 0; i < array.size(); i++) { + res.getPatchFormat().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_patchFormat")) { + JsonArray array = json.getAsJsonArray("_patchFormat"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPatchFormat().size()) + res.getPatchFormat().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPatchFormat().get(i)); + } + }; + if (json.has("implementationGuide")) { + JsonArray array = json.getAsJsonArray("implementationGuide"); + for (int i = 0; i < array.size(); i++) { + res.getImplementationGuide().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_implementationGuide")) { + JsonArray array = json.getAsJsonArray("_implementationGuide"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getImplementationGuide().size()) + res.getImplementationGuide().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getImplementationGuide().get(i)); + } + }; + if (json.has("profile")) { + JsonArray array = json.getAsJsonArray("profile"); + for (int i = 0; i < array.size(); i++) { + res.getProfile().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("rest")) { + JsonArray array = json.getAsJsonArray("rest"); + for (int i = 0; i < array.size(); i++) { + res.getRest().add(parseCapabilityStatementCapabilityStatementRestComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("messaging")) { + JsonArray array = json.getAsJsonArray("messaging"); + for (int i = 0; i < array.size(); i++) { + res.getMessaging().add(parseCapabilityStatementCapabilityStatementMessagingComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("document")) { + JsonArray array = json.getAsJsonArray("document"); + for (int i = 0; i < array.size(); i++) { + res.getDocument().add(parseCapabilityStatementCapabilityStatementDocumentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementCapabilityStatementSoftwareComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent(); + parseCapabilityStatementCapabilityStatementSoftwareComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementSoftwareComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementSoftwareComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("releaseDate")) + res.setReleaseDateElement(parseDateTime(json.get("releaseDate").getAsString())); + if (json.has("_releaseDate")) + parseElementProperties(json.getAsJsonObject("_releaseDate"), res.getReleaseDateElement()); + } + + protected CapabilityStatement.CapabilityStatementImplementationComponent parseCapabilityStatementCapabilityStatementImplementationComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent(); + parseCapabilityStatementCapabilityStatementImplementationComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementImplementationComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementImplementationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + } + + protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementCapabilityStatementRestComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent(); + parseCapabilityStatementCapabilityStatementRestComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementRestComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.RestfulCapabilityMode.NULL, new CapabilityStatement.RestfulCapabilityModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("security")) + res.setSecurity(parseCapabilityStatementCapabilityStatementRestSecurityComponent(json.getAsJsonObject("security"), owner)); + if (json.has("resource")) { + JsonArray array = json.getAsJsonArray("resource"); + for (int i = 0; i < array.size(); i++) { + res.getResource().add(parseCapabilityStatementCapabilityStatementRestResourceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("interaction")) { + JsonArray array = json.getAsJsonArray("interaction"); + for (int i = 0; i < array.size(); i++) { + res.getInteraction().add(parseCapabilityStatementSystemInteractionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("searchParam")) { + JsonArray array = json.getAsJsonArray("searchParam"); + for (int i = 0; i < array.size(); i++) { + res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("operation")) { + JsonArray array = json.getAsJsonArray("operation"); + for (int i = 0; i < array.size(); i++) { + res.getOperation().add(parseCapabilityStatementCapabilityStatementRestOperationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("compartment")) { + JsonArray array = json.getAsJsonArray("compartment"); + for (int i = 0; i < array.size(); i++) { + res.getCompartment().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_compartment")) { + JsonArray array = json.getAsJsonArray("_compartment"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getCompartment().size()) + res.getCompartment().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getCompartment().get(i)); + } + }; + } + + protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementCapabilityStatementRestSecurityComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent(); + parseCapabilityStatementCapabilityStatementRestSecurityComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementRestSecurityComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("cors")) + res.setCorsElement(parseBoolean(json.get("cors").getAsBoolean())); + if (json.has("_cors")) + parseElementProperties(json.getAsJsonObject("_cors"), res.getCorsElement()); + if (json.has("service")) { + JsonArray array = json.getAsJsonArray("service"); + for (int i = 0; i < array.size(); i++) { + res.getService().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("certificate")) { + JsonArray array = json.getAsJsonArray("certificate"); + for (int i = 0; i < array.size(); i++) { + res.getCertificate().add(parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res = new CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); + parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("blob")) + res.setBlobElement(parseBase64Binary(json.get("blob").getAsString())); + if (json.has("_blob")) + parseElementProperties(json.getAsJsonObject("_blob"), res.getBlobElement()); + } + + protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementCapabilityStatementRestResourceComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent(); + parseCapabilityStatementCapabilityStatementRestResourceComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementRestResourceComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("profile")) + res.setProfile(parseReference(json.getAsJsonObject("profile"))); + if (json.has("documentation")) + res.setDocumentationElement(parseMarkdown(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("interaction")) { + JsonArray array = json.getAsJsonArray("interaction"); + for (int i = 0; i < array.size(); i++) { + res.getInteraction().add(parseCapabilityStatementResourceInteractionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("versioning")) + res.setVersioningElement(parseEnumeration(json.get("versioning").getAsString(), CapabilityStatement.ResourceVersionPolicy.NULL, new CapabilityStatement.ResourceVersionPolicyEnumFactory())); + if (json.has("_versioning")) + parseElementProperties(json.getAsJsonObject("_versioning"), res.getVersioningElement()); + if (json.has("readHistory")) + res.setReadHistoryElement(parseBoolean(json.get("readHistory").getAsBoolean())); + if (json.has("_readHistory")) + parseElementProperties(json.getAsJsonObject("_readHistory"), res.getReadHistoryElement()); + if (json.has("updateCreate")) + res.setUpdateCreateElement(parseBoolean(json.get("updateCreate").getAsBoolean())); + if (json.has("_updateCreate")) + parseElementProperties(json.getAsJsonObject("_updateCreate"), res.getUpdateCreateElement()); + if (json.has("conditionalCreate")) + res.setConditionalCreateElement(parseBoolean(json.get("conditionalCreate").getAsBoolean())); + if (json.has("_conditionalCreate")) + parseElementProperties(json.getAsJsonObject("_conditionalCreate"), res.getConditionalCreateElement()); + if (json.has("conditionalRead")) + res.setConditionalReadElement(parseEnumeration(json.get("conditionalRead").getAsString(), CapabilityStatement.ConditionalReadStatus.NULL, new CapabilityStatement.ConditionalReadStatusEnumFactory())); + if (json.has("_conditionalRead")) + parseElementProperties(json.getAsJsonObject("_conditionalRead"), res.getConditionalReadElement()); + if (json.has("conditionalUpdate")) + res.setConditionalUpdateElement(parseBoolean(json.get("conditionalUpdate").getAsBoolean())); + if (json.has("_conditionalUpdate")) + parseElementProperties(json.getAsJsonObject("_conditionalUpdate"), res.getConditionalUpdateElement()); + if (json.has("conditionalDelete")) + res.setConditionalDeleteElement(parseEnumeration(json.get("conditionalDelete").getAsString(), CapabilityStatement.ConditionalDeleteStatus.NULL, new CapabilityStatement.ConditionalDeleteStatusEnumFactory())); + if (json.has("_conditionalDelete")) + parseElementProperties(json.getAsJsonObject("_conditionalDelete"), res.getConditionalDeleteElement()); + if (json.has("referencePolicy")) { + JsonArray array = json.getAsJsonArray("referencePolicy"); + for (int i = 0; i < array.size(); i++) { + res.getReferencePolicy().add(parseEnumeration(array.get(i).getAsString(), CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); + } + }; + if (json.has("_referencePolicy")) { + JsonArray array = json.getAsJsonArray("_referencePolicy"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getReferencePolicy().size()) + res.getReferencePolicy().add(parseEnumeration(null, CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getReferencePolicy().get(i)); + } + }; + if (json.has("searchInclude")) { + JsonArray array = json.getAsJsonArray("searchInclude"); + for (int i = 0; i < array.size(); i++) { + res.getSearchInclude().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_searchInclude")) { + JsonArray array = json.getAsJsonArray("_searchInclude"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSearchInclude().size()) + res.getSearchInclude().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSearchInclude().get(i)); + } + }; + if (json.has("searchRevInclude")) { + JsonArray array = json.getAsJsonArray("searchRevInclude"); + for (int i = 0; i < array.size(); i++) { + res.getSearchRevInclude().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_searchRevInclude")) { + JsonArray array = json.getAsJsonArray("_searchRevInclude"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSearchRevInclude().size()) + res.getSearchRevInclude().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSearchRevInclude().get(i)); + } + }; + if (json.has("searchParam")) { + JsonArray array = json.getAsJsonArray("searchParam"); + for (int i = 0; i < array.size(); i++) { + res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent(); + parseCapabilityStatementResourceInteractionComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementResourceInteractionComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.ResourceInteractionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CapabilityStatement.TypeRestfulInteraction.NULL, new CapabilityStatement.TypeRestfulInteractionEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); + parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("definition")) + res.setDefinitionElement(parseUri(json.get("definition").getAsString())); + if (json.has("_definition")) + parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected CapabilityStatement.SystemInteractionComponent parseCapabilityStatementSystemInteractionComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent(); + parseCapabilityStatementSystemInteractionComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementSystemInteractionComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.SystemInteractionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CapabilityStatement.SystemRestfulInteraction.NULL, new CapabilityStatement.SystemRestfulInteractionEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected CapabilityStatement.CapabilityStatementRestOperationComponent parseCapabilityStatementCapabilityStatementRestOperationComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestOperationComponent res = new CapabilityStatement.CapabilityStatementRestOperationComponent(); + parseCapabilityStatementCapabilityStatementRestOperationComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementRestOperationComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestOperationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("definition")) + res.setDefinition(parseReference(json.getAsJsonObject("definition"))); + } + + protected CapabilityStatement.CapabilityStatementMessagingComponent parseCapabilityStatementCapabilityStatementMessagingComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent(); + parseCapabilityStatementCapabilityStatementMessagingComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementMessagingComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("reliableCache")) + res.setReliableCacheElement(parseUnsignedInt(json.get("reliableCache").getAsString())); + if (json.has("_reliableCache")) + parseElementProperties(json.getAsJsonObject("_reliableCache"), res.getReliableCacheElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("supportedMessage")) { + JsonArray array = json.getAsJsonArray("supportedMessage"); + for (int i = 0; i < array.size(); i++) { + res.getSupportedMessage().add(parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("event")) { + JsonArray array = json.getAsJsonArray("event"); + for (int i = 0; i < array.size(); i++) { + res.getEvent().add(parseCapabilityStatementCapabilityStatementMessagingEventComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); + parseCapabilityStatementCapabilityStatementMessagingEndpointComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementMessagingEndpointComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEndpointComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("protocol")) + res.setProtocol(parseCoding(json.getAsJsonObject("protocol"))); + if (json.has("address")) + res.setAddressElement(parseUri(json.get("address").getAsString())); + if (json.has("_address")) + parseElementProperties(json.getAsJsonObject("_address"), res.getAddressElement()); + } + + protected CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); + parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("definition")) + res.setDefinition(parseReference(json.getAsJsonObject("definition"))); + } + + protected CapabilityStatement.CapabilityStatementMessagingEventComponent parseCapabilityStatementCapabilityStatementMessagingEventComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingEventComponent res = new CapabilityStatement.CapabilityStatementMessagingEventComponent(); + parseCapabilityStatementCapabilityStatementMessagingEventComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementMessagingEventComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEventComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCoding(json.getAsJsonObject("code"))); + if (json.has("category")) + res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), CapabilityStatement.MessageSignificanceCategory.NULL, new CapabilityStatement.MessageSignificanceCategoryEnumFactory())); + if (json.has("_category")) + parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("focus")) + res.setFocusElement(parseCode(json.get("focus").getAsString())); + if (json.has("_focus")) + parseElementProperties(json.getAsJsonObject("_focus"), res.getFocusElement()); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("response")) + res.setResponse(parseReference(json.getAsJsonObject("response"))); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected CapabilityStatement.CapabilityStatementDocumentComponent parseCapabilityStatementCapabilityStatementDocumentComponent(JsonObject json, CapabilityStatement owner) throws IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent(); + parseCapabilityStatementCapabilityStatementDocumentComponentProperties(json, owner, res); + return res; + } + + protected void parseCapabilityStatementCapabilityStatementDocumentComponentProperties(JsonObject json, CapabilityStatement owner, CapabilityStatement.CapabilityStatementDocumentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), CapabilityStatement.DocumentMode.NULL, new CapabilityStatement.DocumentModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("profile")) + res.setProfile(parseReference(json.getAsJsonObject("profile"))); + } + + protected CarePlan parseCarePlan(JsonObject json) throws IOException, FHIRFormatError { + CarePlan res = new CarePlan(); + parseCarePlanProperties(json, res); + return res; + } + + protected void parseCarePlanProperties(JsonObject json, CarePlan res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("replaces")) { + JsonArray array = json.getAsJsonArray("replaces"); + for (int i = 0; i < array.size(); i++) { + res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CarePlan.CarePlanStatus.NULL, new CarePlan.CarePlanStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("intent")) + res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), CarePlan.CarePlanIntent.NULL, new CarePlan.CarePlanIntentEnumFactory())); + if (json.has("_intent")) + parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("author")) { + JsonArray array = json.getAsJsonArray("author"); + for (int i = 0; i < array.size(); i++) { + res.getAuthor().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("careTeam")) { + JsonArray array = json.getAsJsonArray("careTeam"); + for (int i = 0; i < array.size(); i++) { + res.getCareTeam().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("addresses")) { + JsonArray array = json.getAsJsonArray("addresses"); + for (int i = 0; i < array.size(); i++) { + res.getAddresses().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("supportingInfo")) { + JsonArray array = json.getAsJsonArray("supportingInfo"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("goal")) { + JsonArray array = json.getAsJsonArray("goal"); + for (int i = 0; i < array.size(); i++) { + res.getGoal().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("activity")) { + JsonArray array = json.getAsJsonArray("activity"); + for (int i = 0; i < array.size(); i++) { + res.getActivity().add(parseCarePlanCarePlanActivityComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected CarePlan.CarePlanActivityComponent parseCarePlanCarePlanActivityComponent(JsonObject json, CarePlan owner) throws IOException, FHIRFormatError { + CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent(); + parseCarePlanCarePlanActivityComponentProperties(json, owner, res); + return res; + } + + protected void parseCarePlanCarePlanActivityComponentProperties(JsonObject json, CarePlan owner, CarePlan.CarePlanActivityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("outcomeCodeableConcept")) { + JsonArray array = json.getAsJsonArray("outcomeCodeableConcept"); + for (int i = 0; i < array.size(); i++) { + res.getOutcomeCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("outcomeReference")) { + JsonArray array = json.getAsJsonArray("outcomeReference"); + for (int i = 0; i < array.size(); i++) { + res.getOutcomeReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("progress")) { + JsonArray array = json.getAsJsonArray("progress"); + for (int i = 0; i < array.size(); i++) { + res.getProgress().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reference")) + res.setReference(parseReference(json.getAsJsonObject("reference"))); + if (json.has("detail")) + res.setDetail(parseCarePlanCarePlanActivityDetailComponent(json.getAsJsonObject("detail"), owner)); + } + + protected CarePlan.CarePlanActivityDetailComponent parseCarePlanCarePlanActivityDetailComponent(JsonObject json, CarePlan owner) throws IOException, FHIRFormatError { + CarePlan.CarePlanActivityDetailComponent res = new CarePlan.CarePlanActivityDetailComponent(); + parseCarePlanCarePlanActivityDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseCarePlanCarePlanActivityDetailComponentProperties(JsonObject json, CarePlan owner, CarePlan.CarePlanActivityDetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), CarePlan.CarePlanActivityKind.NULL, new CarePlan.CarePlanActivityKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("definition")) + res.setDefinition(parseReference(json.getAsJsonObject("definition"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("goal")) { + JsonArray array = json.getAsJsonArray("goal"); + for (int i = 0; i < array.size(); i++) { + res.getGoal().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CarePlan.CarePlanActivityStatus.NULL, new CarePlan.CarePlanActivityStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("statusReason")) + res.setStatusReasonElement(parseString(json.get("statusReason").getAsString())); + if (json.has("_statusReason")) + parseElementProperties(json.getAsJsonObject("_statusReason"), res.getStatusReasonElement()); + if (json.has("prohibited")) + res.setProhibitedElement(parseBoolean(json.get("prohibited").getAsBoolean())); + if (json.has("_prohibited")) + parseElementProperties(json.getAsJsonObject("_prohibited"), res.getProhibitedElement()); + Type scheduled = parseType("scheduled", json); + if (scheduled != null) + res.setScheduled(scheduled); + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type product = parseType("product", json); + if (product != null) + res.setProduct(product); + if (json.has("dailyAmount")) + res.setDailyAmount(parseSimpleQuantity(json.getAsJsonObject("dailyAmount"))); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + } + + protected CareTeam parseCareTeam(JsonObject json) throws IOException, FHIRFormatError { + CareTeam res = new CareTeam(); + parseCareTeamProperties(json, res); + return res; + } + + protected void parseCareTeamProperties(JsonObject json, CareTeam res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CareTeam.CareTeamStatus.NULL, new CareTeam.CareTeamStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseCareTeamCareTeamParticipantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("managingOrganization")) { + JsonArray array = json.getAsJsonArray("managingOrganization"); + for (int i = 0; i < array.size(); i++) { + res.getManagingOrganization().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected CareTeam.CareTeamParticipantComponent parseCareTeamCareTeamParticipantComponent(JsonObject json, CareTeam owner) throws IOException, FHIRFormatError { + CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent(); + parseCareTeamCareTeamParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parseCareTeamCareTeamParticipantComponentProperties(JsonObject json, CareTeam owner, CareTeam.CareTeamParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("member")) + res.setMember(parseReference(json.getAsJsonObject("member"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected CatalogEntry parseCatalogEntry(JsonObject json) throws IOException, FHIRFormatError { + CatalogEntry res = new CatalogEntry(); + parseCatalogEntryProperties(json, res); + return res; + } + + protected void parseCatalogEntryProperties(JsonObject json, CatalogEntry res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("purpose")) + res.setPurpose(parseCodeableConcept(json.getAsJsonObject("purpose"))); + if (json.has("referencedItem")) + res.setReferencedItem(parseReference(json.getAsJsonObject("referencedItem"))); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("additionalIdentifier")) { + JsonArray array = json.getAsJsonArray("additionalIdentifier"); + for (int i = 0; i < array.size(); i++) { + res.getAdditionalIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("classification")) { + JsonArray array = json.getAsJsonArray("classification"); + for (int i = 0; i < array.size(); i++) { + res.getClassification().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatus(parseCodeableConcept(json.getAsJsonObject("status"))); + if (json.has("validityPeriod")) + res.setValidityPeriod(parsePeriod(json.getAsJsonObject("validityPeriod"))); + if (json.has("lastUpdated")) + res.setLastUpdatedElement(parseDateTime(json.get("lastUpdated").getAsString())); + if (json.has("_lastUpdated")) + parseElementProperties(json.getAsJsonObject("_lastUpdated"), res.getLastUpdatedElement()); + if (json.has("additionalCharacteristic")) { + JsonArray array = json.getAsJsonArray("additionalCharacteristic"); + for (int i = 0; i < array.size(); i++) { + res.getAdditionalCharacteristic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("additionalClassification")) { + JsonArray array = json.getAsJsonArray("additionalClassification"); + for (int i = 0; i < array.size(); i++) { + res.getAdditionalClassification().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("relatedItem")) { + JsonArray array = json.getAsJsonArray("relatedItem"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedItem().add(parseCatalogEntryCatalogEntryRelatedItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected CatalogEntry.CatalogEntryRelatedItemComponent parseCatalogEntryCatalogEntryRelatedItemComponent(JsonObject json, CatalogEntry owner) throws IOException, FHIRFormatError { + CatalogEntry.CatalogEntryRelatedItemComponent res = new CatalogEntry.CatalogEntryRelatedItemComponent(); + parseCatalogEntryCatalogEntryRelatedItemComponentProperties(json, owner, res); + return res; + } + + protected void parseCatalogEntryCatalogEntryRelatedItemComponentProperties(JsonObject json, CatalogEntry owner, CatalogEntry.CatalogEntryRelatedItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("relationtype")) + res.setRelationtype(parseCodeableConcept(json.getAsJsonObject("relationtype"))); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("item")) + res.setItem(parseReference(json.getAsJsonObject("item"))); + } + + protected ChargeItem parseChargeItem(JsonObject json) throws IOException, FHIRFormatError { + ChargeItem res = new ChargeItem(); + parseChargeItemProperties(json, res); + return res; + } + + protected void parseChargeItemProperties(JsonObject json, ChargeItem res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_definition")) { + JsonArray array = json.getAsJsonArray("_definition"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDefinition().size()) + res.getDefinition().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDefinition().get(i)); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ChargeItem.ChargeItemStatus.NULL, new ChargeItem.ChargeItemStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseChargeItemChargeItemParticipantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("performingOrganization")) + res.setPerformingOrganization(parseReference(json.getAsJsonObject("performingOrganization"))); + if (json.has("requestingOrganization")) + res.setRequestingOrganization(parseReference(json.getAsJsonObject("requestingOrganization"))); + if (json.has("quantity")) + res.setQuantity(parseQuantity(json.getAsJsonObject("quantity"))); + if (json.has("bodysite")) { + JsonArray array = json.getAsJsonArray("bodysite"); + for (int i = 0; i < array.size(); i++) { + res.getBodysite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("factorOverride")) + res.setFactorOverrideElement(parseDecimal(json.get("factorOverride").getAsBigDecimal())); + if (json.has("_factorOverride")) + parseElementProperties(json.getAsJsonObject("_factorOverride"), res.getFactorOverrideElement()); + if (json.has("priceOverride")) + res.setPriceOverride(parseMoney(json.getAsJsonObject("priceOverride"))); + if (json.has("overrideReason")) + res.setOverrideReasonElement(parseString(json.get("overrideReason").getAsString())); + if (json.has("_overrideReason")) + parseElementProperties(json.getAsJsonObject("_overrideReason"), res.getOverrideReasonElement()); + if (json.has("enterer")) + res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); + if (json.has("enteredDate")) + res.setEnteredDateElement(parseDateTime(json.get("enteredDate").getAsString())); + if (json.has("_enteredDate")) + parseElementProperties(json.getAsJsonObject("_enteredDate"), res.getEnteredDateElement()); + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("service")) { + JsonArray array = json.getAsJsonArray("service"); + for (int i = 0; i < array.size(); i++) { + res.getService().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("account")) { + JsonArray array = json.getAsJsonArray("account"); + for (int i = 0; i < array.size(); i++) { + res.getAccount().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("supportingInformation")) { + JsonArray array = json.getAsJsonArray("supportingInformation"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ChargeItem.ChargeItemParticipantComponent parseChargeItemChargeItemParticipantComponent(JsonObject json, ChargeItem owner) throws IOException, FHIRFormatError { + ChargeItem.ChargeItemParticipantComponent res = new ChargeItem.ChargeItemParticipantComponent(); + parseChargeItemChargeItemParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parseChargeItemChargeItemParticipantComponentProperties(JsonObject json, ChargeItem owner, ChargeItem.ChargeItemParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + } + + protected Claim parseClaim(JsonObject json) throws IOException, FHIRFormatError { + Claim res = new Claim(); + parseClaimProperties(json, res); + return res; + } + + protected void parseClaimProperties(JsonObject json, Claim res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Claim.ClaimStatus.NULL, new Claim.ClaimStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("subType")) { + JsonArray array = json.getAsJsonArray("subType"); + for (int i = 0; i < array.size(); i++) { + res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), Claim.Use.NULL, new Claim.UseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("billablePeriod")) + res.setBillablePeriod(parsePeriod(json.getAsJsonObject("billablePeriod"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("enterer")) + res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); + if (json.has("insurer")) + res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("priority")) + res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); + if (json.has("fundsReserve")) + res.setFundsReserve(parseCodeableConcept(json.getAsJsonObject("fundsReserve"))); + if (json.has("related")) { + JsonArray array = json.getAsJsonArray("related"); + for (int i = 0; i < array.size(); i++) { + res.getRelated().add(parseClaimRelatedClaimComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("prescription")) + res.setPrescription(parseReference(json.getAsJsonObject("prescription"))); + if (json.has("originalPrescription")) + res.setOriginalPrescription(parseReference(json.getAsJsonObject("originalPrescription"))); + if (json.has("payee")) + res.setPayee(parseClaimPayeeComponent(json.getAsJsonObject("payee"), res)); + if (json.has("referral")) + res.setReferral(parseReference(json.getAsJsonObject("referral"))); + if (json.has("facility")) + res.setFacility(parseReference(json.getAsJsonObject("facility"))); + if (json.has("careTeam")) { + JsonArray array = json.getAsJsonArray("careTeam"); + for (int i = 0; i < array.size(); i++) { + res.getCareTeam().add(parseClaimCareTeamComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("information")) { + JsonArray array = json.getAsJsonArray("information"); + for (int i = 0; i < array.size(); i++) { + res.getInformation().add(parseClaimSpecialConditionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("diagnosis")) { + JsonArray array = json.getAsJsonArray("diagnosis"); + for (int i = 0; i < array.size(); i++) { + res.getDiagnosis().add(parseClaimDiagnosisComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("procedure")) { + JsonArray array = json.getAsJsonArray("procedure"); + for (int i = 0; i < array.size(); i++) { + res.getProcedure().add(parseClaimProcedureComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("insurance")) { + JsonArray array = json.getAsJsonArray("insurance"); + for (int i = 0; i < array.size(); i++) { + res.getInsurance().add(parseClaimInsuranceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("accident")) + res.setAccident(parseClaimAccidentComponent(json.getAsJsonObject("accident"), res)); + if (json.has("employmentImpacted")) + res.setEmploymentImpacted(parsePeriod(json.getAsJsonObject("employmentImpacted"))); + if (json.has("hospitalization")) + res.setHospitalization(parsePeriod(json.getAsJsonObject("hospitalization"))); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseClaimItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("total")) + res.setTotal(parseMoney(json.getAsJsonObject("total"))); + } + + protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent(); + parseClaimRelatedClaimComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimRelatedClaimComponentProperties(JsonObject json, Claim owner, Claim.RelatedClaimComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("claim")) + res.setClaim(parseReference(json.getAsJsonObject("claim"))); + if (json.has("relationship")) + res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); + if (json.has("reference")) + res.setReference(parseIdentifier(json.getAsJsonObject("reference"))); + } + + protected Claim.PayeeComponent parseClaimPayeeComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.PayeeComponent res = new Claim.PayeeComponent(); + parseClaimPayeeComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimPayeeComponentProperties(JsonObject json, Claim owner, Claim.PayeeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("resource")) + res.setResource(parseCoding(json.getAsJsonObject("resource"))); + if (json.has("party")) + res.setParty(parseReference(json.getAsJsonObject("party"))); + } + + protected Claim.CareTeamComponent parseClaimCareTeamComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.CareTeamComponent res = new Claim.CareTeamComponent(); + parseClaimCareTeamComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimCareTeamComponentProperties(JsonObject json, Claim owner, Claim.CareTeamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("responsible")) + res.setResponsibleElement(parseBoolean(json.get("responsible").getAsBoolean())); + if (json.has("_responsible")) + parseElementProperties(json.getAsJsonObject("_responsible"), res.getResponsibleElement()); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("qualification")) + res.setQualification(parseCodeableConcept(json.getAsJsonObject("qualification"))); + } + + protected Claim.SpecialConditionComponent parseClaimSpecialConditionComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.SpecialConditionComponent res = new Claim.SpecialConditionComponent(); + parseClaimSpecialConditionComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimSpecialConditionComponentProperties(JsonObject json, Claim owner, Claim.SpecialConditionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("reason")) + res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); + } + + protected Claim.DiagnosisComponent parseClaimDiagnosisComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.DiagnosisComponent res = new Claim.DiagnosisComponent(); + parseClaimDiagnosisComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimDiagnosisComponentProperties(JsonObject json, Claim owner, Claim.DiagnosisComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + Type diagnosis = parseType("diagnosis", json); + if (diagnosis != null) + res.setDiagnosis(diagnosis); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("packageCode")) + res.setPackageCode(parseCodeableConcept(json.getAsJsonObject("packageCode"))); + } + + protected Claim.ProcedureComponent parseClaimProcedureComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.ProcedureComponent res = new Claim.ProcedureComponent(); + parseClaimProcedureComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimProcedureComponentProperties(JsonObject json, Claim owner, Claim.ProcedureComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + Type procedure = parseType("procedure", json); + if (procedure != null) + res.setProcedure(procedure); + } + + protected Claim.InsuranceComponent parseClaimInsuranceComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.InsuranceComponent res = new Claim.InsuranceComponent(); + parseClaimInsuranceComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimInsuranceComponentProperties(JsonObject json, Claim owner, Claim.InsuranceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("focal")) + res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean())); + if (json.has("_focal")) + parseElementProperties(json.getAsJsonObject("_focal"), res.getFocalElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + if (json.has("businessArrangement")) + res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString())); + if (json.has("_businessArrangement")) + parseElementProperties(json.getAsJsonObject("_businessArrangement"), res.getBusinessArrangementElement()); + if (json.has("preAuthRef")) { + JsonArray array = json.getAsJsonArray("preAuthRef"); + for (int i = 0; i < array.size(); i++) { + res.getPreAuthRef().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_preAuthRef")) { + JsonArray array = json.getAsJsonArray("_preAuthRef"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPreAuthRef().size()) + res.getPreAuthRef().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i)); + } + }; + if (json.has("claimResponse")) + res.setClaimResponse(parseReference(json.getAsJsonObject("claimResponse"))); + } + + protected Claim.AccidentComponent parseClaimAccidentComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.AccidentComponent res = new Claim.AccidentComponent(); + parseClaimAccidentComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimAccidentComponentProperties(JsonObject json, Claim owner, Claim.AccidentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("date")) + res.setDateElement(parseDate(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + Type location = parseType("location", json); + if (location != null) + res.setLocation(location); + } + + protected Claim.ItemComponent parseClaimItemComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.ItemComponent res = new Claim.ItemComponent(); + parseClaimItemComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimItemComponentProperties(JsonObject json, Claim owner, Claim.ItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("careTeamLinkId")) { + JsonArray array = json.getAsJsonArray("careTeamLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getCareTeamLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_careTeamLinkId")) { + JsonArray array = json.getAsJsonArray("_careTeamLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getCareTeamLinkId().size()) + res.getCareTeamLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getCareTeamLinkId().get(i)); + } + }; + if (json.has("diagnosisLinkId")) { + JsonArray array = json.getAsJsonArray("diagnosisLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getDiagnosisLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_diagnosisLinkId")) { + JsonArray array = json.getAsJsonArray("_diagnosisLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDiagnosisLinkId().size()) + res.getDiagnosisLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDiagnosisLinkId().get(i)); + } + }; + if (json.has("procedureLinkId")) { + JsonArray array = json.getAsJsonArray("procedureLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getProcedureLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_procedureLinkId")) { + JsonArray array = json.getAsJsonArray("_procedureLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getProcedureLinkId().size()) + res.getProcedureLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getProcedureLinkId().get(i)); + } + }; + if (json.has("informationLinkId")) { + JsonArray array = json.getAsJsonArray("informationLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getInformationLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_informationLinkId")) { + JsonArray array = json.getAsJsonArray("_informationLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getInformationLinkId().size()) + res.getInformationLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getInformationLinkId().get(i)); + } + }; + if (json.has("revenue")) + res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("programCode")) { + JsonArray array = json.getAsJsonArray("programCode"); + for (int i = 0; i < array.size(); i++) { + res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + Type serviced = parseType("serviced", json); + if (serviced != null) + res.setServiced(serviced); + Type location = parseType("location", json); + if (location != null) + res.setLocation(location); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + if (json.has("udi")) { + JsonArray array = json.getAsJsonArray("udi"); + for (int i = 0; i < array.size(); i++) { + res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) + res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); + if (json.has("subSite")) { + JsonArray array = json.getAsJsonArray("subSite"); + for (int i = 0; i < array.size(); i++) { + res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("encounter")) { + JsonArray array = json.getAsJsonArray("encounter"); + for (int i = 0; i < array.size(); i++) { + res.getEncounter().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parseClaimDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Claim.DetailComponent parseClaimDetailComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.DetailComponent res = new Claim.DetailComponent(); + parseClaimDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimDetailComponentProperties(JsonObject json, Claim owner, Claim.DetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("revenue")) + res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("programCode")) { + JsonArray array = json.getAsJsonArray("programCode"); + for (int i = 0; i < array.size(); i++) { + res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + if (json.has("udi")) { + JsonArray array = json.getAsJsonArray("udi"); + for (int i = 0; i < array.size(); i++) { + res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("subDetail")) { + JsonArray array = json.getAsJsonArray("subDetail"); + for (int i = 0; i < array.size(); i++) { + res.getSubDetail().add(parseClaimSubDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Claim.SubDetailComponent parseClaimSubDetailComponent(JsonObject json, Claim owner) throws IOException, FHIRFormatError { + Claim.SubDetailComponent res = new Claim.SubDetailComponent(); + parseClaimSubDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimSubDetailComponentProperties(JsonObject json, Claim owner, Claim.SubDetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("revenue")) + res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("programCode")) { + JsonArray array = json.getAsJsonArray("programCode"); + for (int i = 0; i < array.size(); i++) { + res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + if (json.has("udi")) { + JsonArray array = json.getAsJsonArray("udi"); + for (int i = 0; i < array.size(); i++) { + res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ClaimResponse parseClaimResponse(JsonObject json) throws IOException, FHIRFormatError { + ClaimResponse res = new ClaimResponse(); + parseClaimResponseProperties(json, res); + return res; + } + + protected void parseClaimResponseProperties(JsonObject json, ClaimResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ClaimResponse.ClaimResponseStatus.NULL, new ClaimResponse.ClaimResponseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("insurer")) + res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); + if (json.has("requestProvider")) + res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); + if (json.has("requestOrganization")) + res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), ClaimResponse.RemittanceOutcome.NULL, new ClaimResponse.RemittanceOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("disposition")) + res.setDispositionElement(parseString(json.get("disposition").getAsString())); + if (json.has("_disposition")) + parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); + if (json.has("payeeType")) + res.setPayeeType(parseCodeableConcept(json.getAsJsonObject("payeeType"))); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseClaimResponseItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("addItem")) { + JsonArray array = json.getAsJsonArray("addItem"); + for (int i = 0; i < array.size(); i++) { + res.getAddItem().add(parseClaimResponseAddedItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("error")) { + JsonArray array = json.getAsJsonArray("error"); + for (int i = 0; i < array.size(); i++) { + res.getError().add(parseClaimResponseErrorComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("totalCost")) + res.setTotalCost(parseMoney(json.getAsJsonObject("totalCost"))); + if (json.has("unallocDeductable")) + res.setUnallocDeductable(parseMoney(json.getAsJsonObject("unallocDeductable"))); + if (json.has("totalBenefit")) + res.setTotalBenefit(parseMoney(json.getAsJsonObject("totalBenefit"))); + if (json.has("payment")) + res.setPayment(parseClaimResponsePaymentComponent(json.getAsJsonObject("payment"), res)); + if (json.has("reserved")) + res.setReserved(parseCoding(json.getAsJsonObject("reserved"))); + if (json.has("form")) + res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); + if (json.has("processNote")) { + JsonArray array = json.getAsJsonArray("processNote"); + for (int i = 0; i < array.size(); i++) { + res.getProcessNote().add(parseClaimResponseNoteComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("communicationRequest")) { + JsonArray array = json.getAsJsonArray("communicationRequest"); + for (int i = 0; i < array.size(); i++) { + res.getCommunicationRequest().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("insurance")) { + JsonArray array = json.getAsJsonArray("insurance"); + for (int i = 0; i < array.size(); i++) { + res.getInsurance().add(parseClaimResponseInsuranceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent(); + parseClaimResponseItemComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseItemComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.ItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) + res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); + if (json.has("_sequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parseClaimResponseItemDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent(); + parseClaimResponseAdjudicationComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseAdjudicationComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.AdjudicationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("reason")) + res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); + if (json.has("amount")) + res.setAmount(parseMoney(json.getAsJsonObject("amount"))); + if (json.has("value")) + res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent(); + parseClaimResponseItemDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseItemDetailComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.ItemDetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) + res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); + if (json.has("_sequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("subDetail")) { + JsonArray array = json.getAsJsonArray("subDetail"); + for (int i = 0; i < array.size(); i++) { + res.getSubDetail().add(parseClaimResponseSubDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent(); + parseClaimResponseSubDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseSubDetailComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.SubDetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) + res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); + if (json.has("_sequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent(); + parseClaimResponseAddedItemComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseAddedItemComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.AddedItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) { + JsonArray array = json.getAsJsonArray("sequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_sequenceLinkId")) { + JsonArray array = json.getAsJsonArray("_sequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSequenceLinkId().size()) + res.getSequenceLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSequenceLinkId().get(i)); + } + }; + if (json.has("detailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("detailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getDetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_detailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("_detailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDetailSequenceLinkId().size()) + res.getDetailSequenceLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDetailSequenceLinkId().get(i)); + } + }; + if (json.has("subdetailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("subdetailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getSubdetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_subdetailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("_subdetailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSubdetailSequenceLinkId().size()) + res.getSubdetailSequenceLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSubdetailSequenceLinkId().get(i)); + } + }; + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("fee")) + res.setFee(parseMoney(json.getAsJsonObject("fee"))); + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ClaimResponse.ErrorComponent parseClaimResponseErrorComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent(); + parseClaimResponseErrorComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseErrorComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.ErrorComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) + res.setSequenceLinkIdElement(parsePositiveInt(json.get("sequenceLinkId").getAsString())); + if (json.has("_sequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); + if (json.has("detailSequenceLinkId")) + res.setDetailSequenceLinkIdElement(parsePositiveInt(json.get("detailSequenceLinkId").getAsString())); + if (json.has("_detailSequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_detailSequenceLinkId"), res.getDetailSequenceLinkIdElement()); + if (json.has("subdetailSequenceLinkId")) + res.setSubdetailSequenceLinkIdElement(parsePositiveInt(json.get("subdetailSequenceLinkId").getAsString())); + if (json.has("_subdetailSequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_subdetailSequenceLinkId"), res.getSubdetailSequenceLinkIdElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + } + + protected ClaimResponse.PaymentComponent parseClaimResponsePaymentComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent(); + parseClaimResponsePaymentComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponsePaymentComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.PaymentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("adjustment")) + res.setAdjustment(parseMoney(json.getAsJsonObject("adjustment"))); + if (json.has("adjustmentReason")) + res.setAdjustmentReason(parseCodeableConcept(json.getAsJsonObject("adjustmentReason"))); + if (json.has("date")) + res.setDateElement(parseDate(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("amount")) + res.setAmount(parseMoney(json.getAsJsonObject("amount"))); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + } + + protected ClaimResponse.NoteComponent parseClaimResponseNoteComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent(); + parseClaimResponseNoteComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseNoteComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.NoteComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("number")) + res.setNumberElement(parsePositiveInt(json.get("number").getAsString())); + if (json.has("_number")) + parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("language")) + res.setLanguage(parseCodeableConcept(json.getAsJsonObject("language"))); + } + + protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(JsonObject json, ClaimResponse owner) throws IOException, FHIRFormatError { + ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent(); + parseClaimResponseInsuranceComponentProperties(json, owner, res); + return res; + } + + protected void parseClaimResponseInsuranceComponentProperties(JsonObject json, ClaimResponse owner, ClaimResponse.InsuranceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("focal")) + res.setFocalElement(parseBoolean(json.get("focal").getAsBoolean())); + if (json.has("_focal")) + parseElementProperties(json.getAsJsonObject("_focal"), res.getFocalElement()); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + if (json.has("businessArrangement")) + res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString())); + if (json.has("_businessArrangement")) + parseElementProperties(json.getAsJsonObject("_businessArrangement"), res.getBusinessArrangementElement()); + if (json.has("preAuthRef")) { + JsonArray array = json.getAsJsonArray("preAuthRef"); + for (int i = 0; i < array.size(); i++) { + res.getPreAuthRef().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_preAuthRef")) { + JsonArray array = json.getAsJsonArray("_preAuthRef"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPreAuthRef().size()) + res.getPreAuthRef().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i)); + } + }; + if (json.has("claimResponse")) + res.setClaimResponse(parseReference(json.getAsJsonObject("claimResponse"))); + } + + protected ClinicalImpression parseClinicalImpression(JsonObject json) throws IOException, FHIRFormatError { + ClinicalImpression res = new ClinicalImpression(); + parseClinicalImpressionProperties(json, res); + return res; + } + + protected void parseClinicalImpressionProperties(JsonObject json, ClinicalImpression res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ClinicalImpression.ClinicalImpressionStatus.NULL, new ClinicalImpression.ClinicalImpressionStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type effective = parseType("effective", json); + if (effective != null) + res.setEffective(effective); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("assessor")) + res.setAssessor(parseReference(json.getAsJsonObject("assessor"))); + if (json.has("previous")) + res.setPrevious(parseReference(json.getAsJsonObject("previous"))); + if (json.has("problem")) { + JsonArray array = json.getAsJsonArray("problem"); + for (int i = 0; i < array.size(); i++) { + res.getProblem().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("investigation")) { + JsonArray array = json.getAsJsonArray("investigation"); + for (int i = 0; i < array.size(); i++) { + res.getInvestigation().add(parseClinicalImpressionClinicalImpressionInvestigationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("protocol")) { + JsonArray array = json.getAsJsonArray("protocol"); + for (int i = 0; i < array.size(); i++) { + res.getProtocol().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_protocol")) { + JsonArray array = json.getAsJsonArray("_protocol"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getProtocol().size()) + res.getProtocol().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getProtocol().get(i)); + } + }; + if (json.has("summary")) + res.setSummaryElement(parseString(json.get("summary").getAsString())); + if (json.has("_summary")) + parseElementProperties(json.getAsJsonObject("_summary"), res.getSummaryElement()); + if (json.has("finding")) { + JsonArray array = json.getAsJsonArray("finding"); + for (int i = 0; i < array.size(); i++) { + res.getFinding().add(parseClinicalImpressionClinicalImpressionFindingComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("prognosisCodeableConcept")) { + JsonArray array = json.getAsJsonArray("prognosisCodeableConcept"); + for (int i = 0; i < array.size(); i++) { + res.getPrognosisCodeableConcept().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("prognosisReference")) { + JsonArray array = json.getAsJsonArray("prognosisReference"); + for (int i = 0; i < array.size(); i++) { + res.getPrognosisReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected ClinicalImpression.ClinicalImpressionInvestigationComponent parseClinicalImpressionClinicalImpressionInvestigationComponent(JsonObject json, ClinicalImpression owner) throws IOException, FHIRFormatError { + ClinicalImpression.ClinicalImpressionInvestigationComponent res = new ClinicalImpression.ClinicalImpressionInvestigationComponent(); + parseClinicalImpressionClinicalImpressionInvestigationComponentProperties(json, owner, res); + return res; + } + + protected void parseClinicalImpressionClinicalImpressionInvestigationComponentProperties(JsonObject json, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionInvestigationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionClinicalImpressionFindingComponent(JsonObject json, ClinicalImpression owner) throws IOException, FHIRFormatError { + ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent(); + parseClinicalImpressionClinicalImpressionFindingComponentProperties(json, owner, res); + return res; + } + + protected void parseClinicalImpressionClinicalImpressionFindingComponentProperties(JsonObject json, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionFindingComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type item = parseType("item", json); + if (item != null) + res.setItem(item); + if (json.has("basis")) + res.setBasisElement(parseString(json.get("basis").getAsString())); + if (json.has("_basis")) + parseElementProperties(json.getAsJsonObject("_basis"), res.getBasisElement()); + } + + protected CodeSystem parseCodeSystem(JsonObject json) throws IOException, FHIRFormatError { + CodeSystem res = new CodeSystem(); + parseCodeSystemProperties(json, res); + return res; + } + + protected void parseCodeSystemProperties(JsonObject json, CodeSystem res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("caseSensitive")) + res.setCaseSensitiveElement(parseBoolean(json.get("caseSensitive").getAsBoolean())); + if (json.has("_caseSensitive")) + parseElementProperties(json.getAsJsonObject("_caseSensitive"), res.getCaseSensitiveElement()); + if (json.has("valueSet")) + res.setValueSetElement(parseUri(json.get("valueSet").getAsString())); + if (json.has("_valueSet")) + parseElementProperties(json.getAsJsonObject("_valueSet"), res.getValueSetElement()); + if (json.has("hierarchyMeaning")) + res.setHierarchyMeaningElement(parseEnumeration(json.get("hierarchyMeaning").getAsString(), CodeSystem.CodeSystemHierarchyMeaning.NULL, new CodeSystem.CodeSystemHierarchyMeaningEnumFactory())); + if (json.has("_hierarchyMeaning")) + parseElementProperties(json.getAsJsonObject("_hierarchyMeaning"), res.getHierarchyMeaningElement()); + if (json.has("compositional")) + res.setCompositionalElement(parseBoolean(json.get("compositional").getAsBoolean())); + if (json.has("_compositional")) + parseElementProperties(json.getAsJsonObject("_compositional"), res.getCompositionalElement()); + if (json.has("versionNeeded")) + res.setVersionNeededElement(parseBoolean(json.get("versionNeeded").getAsBoolean())); + if (json.has("_versionNeeded")) + parseElementProperties(json.getAsJsonObject("_versionNeeded"), res.getVersionNeededElement()); + if (json.has("content")) + res.setContentElement(parseEnumeration(json.get("content").getAsString(), CodeSystem.CodeSystemContentMode.NULL, new CodeSystem.CodeSystemContentModeEnumFactory())); + if (json.has("_content")) + parseElementProperties(json.getAsJsonObject("_content"), res.getContentElement()); + if (json.has("count")) + res.setCountElement(parseUnsignedInt(json.get("count").getAsString())); + if (json.has("_count")) + parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); + if (json.has("filter")) { + JsonArray array = json.getAsJsonArray("filter"); + for (int i = 0; i < array.size(); i++) { + res.getFilter().add(parseCodeSystemCodeSystemFilterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("property")) { + JsonArray array = json.getAsJsonArray("property"); + for (int i = 0; i < array.size(); i++) { + res.getProperty().add(parseCodeSystemPropertyComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("concept")) { + JsonArray array = json.getAsJsonArray("concept"); + for (int i = 0; i < array.size(); i++) { + res.getConcept().add(parseCodeSystemConceptDefinitionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected CodeSystem.CodeSystemFilterComponent parseCodeSystemCodeSystemFilterComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { + CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent(); + parseCodeSystemCodeSystemFilterComponentProperties(json, owner, res); + return res; + } + + protected void parseCodeSystemCodeSystemFilterComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.CodeSystemFilterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("operator")) { + JsonArray array = json.getAsJsonArray("operator"); + for (int i = 0; i < array.size(); i++) { + res.getOperator().add(parseEnumeration(array.get(i).getAsString(), CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); + } + }; + if (json.has("_operator")) { + JsonArray array = json.getAsJsonArray("_operator"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getOperator().size()) + res.getOperator().add(parseEnumeration(null, CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getOperator().get(i)); + } + }; + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected CodeSystem.PropertyComponent parseCodeSystemPropertyComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { + CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent(); + parseCodeSystemPropertyComponentProperties(json, owner, res); + return res; + } + + protected void parseCodeSystemPropertyComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.PropertyComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("uri")) + res.setUriElement(parseUri(json.get("uri").getAsString())); + if (json.has("_uri")) + parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), CodeSystem.PropertyType.NULL, new CodeSystem.PropertyTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + } + + protected CodeSystem.ConceptDefinitionComponent parseCodeSystemConceptDefinitionComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { + CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent(); + parseCodeSystemConceptDefinitionComponentProperties(json, owner, res); + return res; + } + + protected void parseCodeSystemConceptDefinitionComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.ConceptDefinitionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("definition")) + res.setDefinitionElement(parseString(json.get("definition").getAsString())); + if (json.has("_definition")) + parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); + if (json.has("designation")) { + JsonArray array = json.getAsJsonArray("designation"); + for (int i = 0; i < array.size(); i++) { + res.getDesignation().add(parseCodeSystemConceptDefinitionDesignationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("property")) { + JsonArray array = json.getAsJsonArray("property"); + for (int i = 0; i < array.size(); i++) { + res.getProperty().add(parseCodeSystemConceptPropertyComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("concept")) { + JsonArray array = json.getAsJsonArray("concept"); + for (int i = 0; i < array.size(); i++) { + res.getConcept().add(parseCodeSystemConceptDefinitionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { + CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent(); + parseCodeSystemConceptDefinitionDesignationComponentProperties(json, owner, res); + return res; + } + + protected void parseCodeSystemConceptDefinitionDesignationComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.ConceptDefinitionDesignationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("use")) + res.setUse(parseCoding(json.getAsJsonObject("use"))); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(JsonObject json, CodeSystem owner) throws IOException, FHIRFormatError { + CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent(); + parseCodeSystemConceptPropertyComponentProperties(json, owner, res); + return res; + } + + protected void parseCodeSystemConceptPropertyComponentProperties(JsonObject json, CodeSystem owner, CodeSystem.ConceptPropertyComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected Communication parseCommunication(JsonObject json) throws IOException, FHIRFormatError { + Communication res = new Communication(); + parseCommunicationProperties(json, res); + return res; + } + + protected void parseCommunicationProperties(JsonObject json, Communication res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("inResponseTo")) { + JsonArray array = json.getAsJsonArray("inResponseTo"); + for (int i = 0; i < array.size(); i++) { + res.getInResponseTo().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Communication.CommunicationStatus.NULL, new Communication.CommunicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("notDone")) + res.setNotDoneElement(parseBoolean(json.get("notDone").getAsBoolean())); + if (json.has("_notDone")) + parseElementProperties(json.getAsJsonObject("_notDone"), res.getNotDoneElement()); + if (json.has("notDoneReason")) + res.setNotDoneReason(parseCodeableConcept(json.getAsJsonObject("notDoneReason"))); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Communication.CommunicationPriority.NULL, new Communication.CommunicationPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("medium")) { + JsonArray array = json.getAsJsonArray("medium"); + for (int i = 0; i < array.size(); i++) { + res.getMedium().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("recipient")) { + JsonArray array = json.getAsJsonArray("recipient"); + for (int i = 0; i < array.size(); i++) { + res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("sent")) + res.setSentElement(parseDateTime(json.get("sent").getAsString())); + if (json.has("_sent")) + parseElementProperties(json.getAsJsonObject("_sent"), res.getSentElement()); + if (json.has("received")) + res.setReceivedElement(parseDateTime(json.get("received").getAsString())); + if (json.has("_received")) + parseElementProperties(json.getAsJsonObject("_received"), res.getReceivedElement()); + if (json.has("sender")) + res.setSender(parseReference(json.getAsJsonObject("sender"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("payload")) { + JsonArray array = json.getAsJsonArray("payload"); + for (int i = 0; i < array.size(); i++) { + res.getPayload().add(parseCommunicationCommunicationPayloadComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected Communication.CommunicationPayloadComponent parseCommunicationCommunicationPayloadComponent(JsonObject json, Communication owner) throws IOException, FHIRFormatError { + Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent(); + parseCommunicationCommunicationPayloadComponentProperties(json, owner, res); + return res; + } + + protected void parseCommunicationCommunicationPayloadComponentProperties(JsonObject json, Communication owner, Communication.CommunicationPayloadComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type content = parseType("content", json); + if (content != null) + res.setContent(content); + } + + protected CommunicationRequest parseCommunicationRequest(JsonObject json) throws IOException, FHIRFormatError { + CommunicationRequest res = new CommunicationRequest(); + parseCommunicationRequestProperties(json, res); + return res; + } + + protected void parseCommunicationRequestProperties(JsonObject json, CommunicationRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("replaces")) { + JsonArray array = json.getAsJsonArray("replaces"); + for (int i = 0; i < array.size(); i++) { + res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("groupIdentifier")) + res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), CommunicationRequest.CommunicationRequestStatus.NULL, new CommunicationRequest.CommunicationRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), CommunicationRequest.CommunicationPriority.NULL, new CommunicationRequest.CommunicationPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("medium")) { + JsonArray array = json.getAsJsonArray("medium"); + for (int i = 0; i < array.size(); i++) { + res.getMedium().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("recipient")) { + JsonArray array = json.getAsJsonArray("recipient"); + for (int i = 0; i < array.size(); i++) { + res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("payload")) { + JsonArray array = json.getAsJsonArray("payload"); + for (int i = 0; i < array.size(); i++) { + res.getPayload().add(parseCommunicationRequestCommunicationRequestPayloadComponent(array.get(i).getAsJsonObject(), res)); + } + }; + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("sender")) + res.setSender(parseReference(json.getAsJsonObject("sender"))); + if (json.has("requester")) + res.setRequester(parseCommunicationRequestCommunicationRequestRequesterComponent(json.getAsJsonObject("requester"), res)); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestCommunicationRequestPayloadComponent(JsonObject json, CommunicationRequest owner) throws IOException, FHIRFormatError { + CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent(); + parseCommunicationRequestCommunicationRequestPayloadComponentProperties(json, owner, res); + return res; + } + + protected void parseCommunicationRequestCommunicationRequestPayloadComponentProperties(JsonObject json, CommunicationRequest owner, CommunicationRequest.CommunicationRequestPayloadComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type content = parseType("content", json); + if (content != null) + res.setContent(content); + } + + protected CommunicationRequest.CommunicationRequestRequesterComponent parseCommunicationRequestCommunicationRequestRequesterComponent(JsonObject json, CommunicationRequest owner) throws IOException, FHIRFormatError { + CommunicationRequest.CommunicationRequestRequesterComponent res = new CommunicationRequest.CommunicationRequestRequesterComponent(); + parseCommunicationRequestCommunicationRequestRequesterComponentProperties(json, owner, res); + return res; + } + + protected void parseCommunicationRequestCommunicationRequestRequesterComponentProperties(JsonObject json, CommunicationRequest owner, CommunicationRequest.CommunicationRequestRequesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("agent")) + res.setAgent(parseReference(json.getAsJsonObject("agent"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected CompartmentDefinition parseCompartmentDefinition(JsonObject json) throws IOException, FHIRFormatError { + CompartmentDefinition res = new CompartmentDefinition(); + parseCompartmentDefinitionProperties(json, res); + return res; + } + + protected void parseCompartmentDefinitionProperties(JsonObject json, CompartmentDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), CompartmentDefinition.CompartmentType.NULL, new CompartmentDefinition.CompartmentTypeEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("search")) + res.setSearchElement(parseBoolean(json.get("search").getAsBoolean())); + if (json.has("_search")) + parseElementProperties(json.getAsJsonObject("_search"), res.getSearchElement()); + if (json.has("resource")) { + JsonArray array = json.getAsJsonArray("resource"); + for (int i = 0; i < array.size(); i++) { + res.getResource().add(parseCompartmentDefinitionCompartmentDefinitionResourceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionCompartmentDefinitionResourceComponent(JsonObject json, CompartmentDefinition owner) throws IOException, FHIRFormatError { + CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent(); + parseCompartmentDefinitionCompartmentDefinitionResourceComponentProperties(json, owner, res); + return res; + } + + protected void parseCompartmentDefinitionCompartmentDefinitionResourceComponentProperties(JsonObject json, CompartmentDefinition owner, CompartmentDefinition.CompartmentDefinitionResourceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("param")) { + JsonArray array = json.getAsJsonArray("param"); + for (int i = 0; i < array.size(); i++) { + res.getParam().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_param")) { + JsonArray array = json.getAsJsonArray("_param"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getParam().size()) + res.getParam().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getParam().get(i)); + } + }; + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected Composition parseComposition(JsonObject json) throws IOException, FHIRFormatError { + Composition res = new Composition(); + parseCompositionProperties(json, res); + return res; + } + + protected void parseCompositionProperties(JsonObject json, Composition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Composition.CompositionStatus.NULL, new Composition.CompositionStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("class")) + res.setClass_(parseCodeableConcept(json.getAsJsonObject("class"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("author")) { + JsonArray array = json.getAsJsonArray("author"); + for (int i = 0; i < array.size(); i++) { + res.getAuthor().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("confidentiality")) + res.setConfidentialityElement(parseEnumeration(json.get("confidentiality").getAsString(), Composition.DocumentConfidentiality.NULL, new Composition.DocumentConfidentialityEnumFactory())); + if (json.has("_confidentiality")) + parseElementProperties(json.getAsJsonObject("_confidentiality"), res.getConfidentialityElement()); + if (json.has("attester")) { + JsonArray array = json.getAsJsonArray("attester"); + for (int i = 0; i < array.size(); i++) { + res.getAttester().add(parseCompositionCompositionAttesterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("custodian")) + res.setCustodian(parseReference(json.getAsJsonObject("custodian"))); + if (json.has("relatesTo")) { + JsonArray array = json.getAsJsonArray("relatesTo"); + for (int i = 0; i < array.size(); i++) { + res.getRelatesTo().add(parseCompositionCompositionRelatesToComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("event")) { + JsonArray array = json.getAsJsonArray("event"); + for (int i = 0; i < array.size(); i++) { + res.getEvent().add(parseCompositionCompositionEventComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("section")) { + JsonArray array = json.getAsJsonArray("section"); + for (int i = 0; i < array.size(); i++) { + res.getSection().add(parseCompositionSectionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Composition.CompositionAttesterComponent parseCompositionCompositionAttesterComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { + Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent(); + parseCompositionCompositionAttesterComponentProperties(json, owner, res); + return res; + } + + protected void parseCompositionCompositionAttesterComponentProperties(JsonObject json, Composition owner, Composition.CompositionAttesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("mode")) { + JsonArray array = json.getAsJsonArray("mode"); + for (int i = 0; i < array.size(); i++) { + res.getMode().add(parseEnumeration(array.get(i).getAsString(), Composition.CompositionAttestationMode.NULL, new Composition.CompositionAttestationModeEnumFactory())); + } + }; + if (json.has("_mode")) { + JsonArray array = json.getAsJsonArray("_mode"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getMode().size()) + res.getMode().add(parseEnumeration(null, Composition.CompositionAttestationMode.NULL, new Composition.CompositionAttestationModeEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getMode().get(i)); + } + }; + if (json.has("time")) + res.setTimeElement(parseDateTime(json.get("time").getAsString())); + if (json.has("_time")) + parseElementProperties(json.getAsJsonObject("_time"), res.getTimeElement()); + if (json.has("party")) + res.setParty(parseReference(json.getAsJsonObject("party"))); + } + + protected Composition.CompositionRelatesToComponent parseCompositionCompositionRelatesToComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { + Composition.CompositionRelatesToComponent res = new Composition.CompositionRelatesToComponent(); + parseCompositionCompositionRelatesToComponentProperties(json, owner, res); + return res; + } + + protected void parseCompositionCompositionRelatesToComponentProperties(JsonObject json, Composition owner, Composition.CompositionRelatesToComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), Composition.DocumentRelationshipType.NULL, new Composition.DocumentRelationshipTypeEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + Type target = parseType("target", json); + if (target != null) + res.setTarget(target); + } + + protected Composition.CompositionEventComponent parseCompositionCompositionEventComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { + Composition.CompositionEventComponent res = new Composition.CompositionEventComponent(); + parseCompositionCompositionEventComponentProperties(json, owner, res); + return res; + } + + protected void parseCompositionCompositionEventComponentProperties(JsonObject json, Composition owner, Composition.CompositionEventComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Composition.SectionComponent parseCompositionSectionComponent(JsonObject json, Composition owner) throws IOException, FHIRFormatError { + Composition.SectionComponent res = new Composition.SectionComponent(); + parseCompositionSectionComponentProperties(json, owner, res); + return res; + } + + protected void parseCompositionSectionComponentProperties(JsonObject json, Composition owner, Composition.SectionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("text")) + res.setText(parseNarrative(json.getAsJsonObject("text"))); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Composition.SectionMode.NULL, new Composition.SectionModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("orderedBy")) + res.setOrderedBy(parseCodeableConcept(json.getAsJsonObject("orderedBy"))); + if (json.has("entry")) { + JsonArray array = json.getAsJsonArray("entry"); + for (int i = 0; i < array.size(); i++) { + res.getEntry().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("emptyReason")) + res.setEmptyReason(parseCodeableConcept(json.getAsJsonObject("emptyReason"))); + if (json.has("section")) { + JsonArray array = json.getAsJsonArray("section"); + for (int i = 0; i < array.size(); i++) { + res.getSection().add(parseCompositionSectionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ConceptMap parseConceptMap(JsonObject json) throws IOException, FHIRFormatError { + ConceptMap res = new ConceptMap(); + parseConceptMapProperties(json, res); + return res; + } + + protected void parseConceptMapProperties(JsonObject json, ConceptMap res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + Type source = parseType("source", json); + if (source != null) + res.setSource(source); + Type target = parseType("target", json); + if (target != null) + res.setTarget(target); + if (json.has("group")) { + JsonArray array = json.getAsJsonArray("group"); + for (int i = 0; i < array.size(); i++) { + res.getGroup().add(parseConceptMapConceptMapGroupComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ConceptMap.ConceptMapGroupComponent parseConceptMapConceptMapGroupComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { + ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent(); + parseConceptMapConceptMapGroupComponentProperties(json, owner, res); + return res; + } + + protected void parseConceptMapConceptMapGroupComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.ConceptMapGroupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("source")) + res.setSourceElement(parseUri(json.get("source").getAsString())); + if (json.has("_source")) + parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); + if (json.has("sourceVersion")) + res.setSourceVersionElement(parseString(json.get("sourceVersion").getAsString())); + if (json.has("_sourceVersion")) + parseElementProperties(json.getAsJsonObject("_sourceVersion"), res.getSourceVersionElement()); + if (json.has("target")) + res.setTargetElement(parseUri(json.get("target").getAsString())); + if (json.has("_target")) + parseElementProperties(json.getAsJsonObject("_target"), res.getTargetElement()); + if (json.has("targetVersion")) + res.setTargetVersionElement(parseString(json.get("targetVersion").getAsString())); + if (json.has("_targetVersion")) + parseElementProperties(json.getAsJsonObject("_targetVersion"), res.getTargetVersionElement()); + if (json.has("element")) { + JsonArray array = json.getAsJsonArray("element"); + for (int i = 0; i < array.size(); i++) { + res.getElement().add(parseConceptMapSourceElementComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("unmapped")) + res.setUnmapped(parseConceptMapConceptMapGroupUnmappedComponent(json.getAsJsonObject("unmapped"), owner)); + } + + protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { + ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent(); + parseConceptMapSourceElementComponentProperties(json, owner, res); + return res; + } + + protected void parseConceptMapSourceElementComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.SourceElementComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("target")) { + JsonArray array = json.getAsJsonArray("target"); + for (int i = 0; i < array.size(); i++) { + res.getTarget().add(parseConceptMapTargetElementComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { + ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent(); + parseConceptMapTargetElementComponentProperties(json, owner, res); + return res; + } + + protected void parseConceptMapTargetElementComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.TargetElementComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("equivalence")) + res.setEquivalenceElement(parseEnumeration(json.get("equivalence").getAsString(), Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory())); + if (json.has("_equivalence")) + parseElementProperties(json.getAsJsonObject("_equivalence"), res.getEquivalenceElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("dependsOn")) { + JsonArray array = json.getAsJsonArray("dependsOn"); + for (int i = 0; i < array.size(); i++) { + res.getDependsOn().add(parseConceptMapOtherElementComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("product")) { + JsonArray array = json.getAsJsonArray("product"); + for (int i = 0; i < array.size(); i++) { + res.getProduct().add(parseConceptMapOtherElementComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { + ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent(); + parseConceptMapOtherElementComponentProperties(json, owner, res); + return res; + } + + protected void parseConceptMapOtherElementComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.OtherElementComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("property")) + res.setPropertyElement(parseUri(json.get("property").getAsString())); + if (json.has("_property")) + parseElementProperties(json.getAsJsonObject("_property"), res.getPropertyElement()); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("code")) + res.setCodeElement(parseString(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + } + + protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapConceptMapGroupUnmappedComponent(JsonObject json, ConceptMap owner) throws IOException, FHIRFormatError { + ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent(); + parseConceptMapConceptMapGroupUnmappedComponentProperties(json, owner, res); + return res; + } + + protected void parseConceptMapConceptMapGroupUnmappedComponentProperties(JsonObject json, ConceptMap owner, ConceptMap.ConceptMapGroupUnmappedComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ConceptMap.ConceptMapGroupUnmappedMode.NULL, new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + } + + protected Condition parseCondition(JsonObject json) throws IOException, FHIRFormatError { + Condition res = new Condition(); + parseConditionProperties(json, res); + return res; + } + + protected void parseConditionProperties(JsonObject json, Condition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("clinicalStatus")) + res.setClinicalStatusElement(parseEnumeration(json.get("clinicalStatus").getAsString(), Condition.ConditionClinicalStatus.NULL, new Condition.ConditionClinicalStatusEnumFactory())); + if (json.has("_clinicalStatus")) + parseElementProperties(json.getAsJsonObject("_clinicalStatus"), res.getClinicalStatusElement()); + if (json.has("verificationStatus")) + res.setVerificationStatusElement(parseEnumeration(json.get("verificationStatus").getAsString(), Condition.ConditionVerificationStatus.NULL, new Condition.ConditionVerificationStatusEnumFactory())); + if (json.has("_verificationStatus")) + parseElementProperties(json.getAsJsonObject("_verificationStatus"), res.getVerificationStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("severity")) + res.setSeverity(parseCodeableConcept(json.getAsJsonObject("severity"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("bodySite")) { + JsonArray array = json.getAsJsonArray("bodySite"); + for (int i = 0; i < array.size(); i++) { + res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type onset = parseType("onset", json); + if (onset != null) + res.setOnset(onset); + Type abatement = parseType("abatement", json); + if (abatement != null) + res.setAbatement(abatement); + if (json.has("assertedDate")) + res.setAssertedDateElement(parseDateTime(json.get("assertedDate").getAsString())); + if (json.has("_assertedDate")) + parseElementProperties(json.getAsJsonObject("_assertedDate"), res.getAssertedDateElement()); + if (json.has("asserter")) + res.setAsserter(parseReference(json.getAsJsonObject("asserter"))); + if (json.has("stage")) { + JsonArray array = json.getAsJsonArray("stage"); + for (int i = 0; i < array.size(); i++) { + res.getStage().add(parseConditionConditionStageComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("evidence")) { + JsonArray array = json.getAsJsonArray("evidence"); + for (int i = 0; i < array.size(); i++) { + res.getEvidence().add(parseConditionConditionEvidenceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected Condition.ConditionStageComponent parseConditionConditionStageComponent(JsonObject json, Condition owner) throws IOException, FHIRFormatError { + Condition.ConditionStageComponent res = new Condition.ConditionStageComponent(); + parseConditionConditionStageComponentProperties(json, owner, res); + return res; + } + + protected void parseConditionConditionStageComponentProperties(JsonObject json, Condition owner, Condition.ConditionStageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("summary")) + res.setSummary(parseCodeableConcept(json.getAsJsonObject("summary"))); + if (json.has("assessment")) { + JsonArray array = json.getAsJsonArray("assessment"); + for (int i = 0; i < array.size(); i++) { + res.getAssessment().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + } + + protected Condition.ConditionEvidenceComponent parseConditionConditionEvidenceComponent(JsonObject json, Condition owner) throws IOException, FHIRFormatError { + Condition.ConditionEvidenceComponent res = new Condition.ConditionEvidenceComponent(); + parseConditionConditionEvidenceComponentProperties(json, owner, res); + return res; + } + + protected void parseConditionConditionEvidenceComponentProperties(JsonObject json, Condition owner, Condition.ConditionEvidenceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Consent parseConsent(JsonObject json) throws IOException, FHIRFormatError { + Consent res = new Consent(); + parseConsentProperties(json, res); + return res; + } + + protected void parseConsentProperties(JsonObject json, Consent res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Consent.ConsentState.NULL, new Consent.ConsentStateEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("dateTime")) + res.setDateTimeElement(parseDateTime(json.get("dateTime").getAsString())); + if (json.has("_dateTime")) + parseElementProperties(json.getAsJsonObject("_dateTime"), res.getDateTimeElement()); + if (json.has("consentingParty")) { + JsonArray array = json.getAsJsonArray("consentingParty"); + for (int i = 0; i < array.size(); i++) { + res.getConsentingParty().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("organization")) { + JsonArray array = json.getAsJsonArray("organization"); + for (int i = 0; i < array.size(); i++) { + res.getOrganization().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type source = parseType("source", json); + if (source != null) + res.setSource(source); + if (json.has("policy")) { + JsonArray array = json.getAsJsonArray("policy"); + for (int i = 0; i < array.size(); i++) { + res.getPolicy().add(parseConsentConsentPolicyComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("policyRule")) + res.setPolicyRule(parseCodeableConcept(json.getAsJsonObject("policyRule"))); + if (json.has("verification")) { + JsonArray array = json.getAsJsonArray("verification"); + for (int i = 0; i < array.size(); i++) { + res.getVerification().add(parseConsentConsentVerificationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("provision")) { + JsonArray array = json.getAsJsonArray("provision"); + for (int i = 0; i < array.size(); i++) { + res.getProvision().add(parseConsentprovisionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Consent.ConsentPolicyComponent parseConsentConsentPolicyComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { + Consent.ConsentPolicyComponent res = new Consent.ConsentPolicyComponent(); + parseConsentConsentPolicyComponentProperties(json, owner, res); + return res; + } + + protected void parseConsentConsentPolicyComponentProperties(JsonObject json, Consent owner, Consent.ConsentPolicyComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("authority")) + res.setAuthorityElement(parseUri(json.get("authority").getAsString())); + if (json.has("_authority")) + parseElementProperties(json.getAsJsonObject("_authority"), res.getAuthorityElement()); + if (json.has("uri")) + res.setUriElement(parseUri(json.get("uri").getAsString())); + if (json.has("_uri")) + parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); + } + + protected Consent.ConsentVerificationComponent parseConsentConsentVerificationComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { + Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent(); + parseConsentConsentVerificationComponentProperties(json, owner, res); + return res; + } + + protected void parseConsentConsentVerificationComponentProperties(JsonObject json, Consent owner, Consent.ConsentVerificationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("verified")) + res.setVerifiedElement(parseBoolean(json.get("verified").getAsBoolean())); + if (json.has("_verified")) + parseElementProperties(json.getAsJsonObject("_verified"), res.getVerifiedElement()); + if (json.has("verifiedWith")) + res.setVerifiedWith(parseReference(json.getAsJsonObject("verifiedWith"))); + if (json.has("verificationDate")) + res.setVerificationDateElement(parseDateTime(json.get("verificationDate").getAsString())); + if (json.has("_verificationDate")) + parseElementProperties(json.getAsJsonObject("_verificationDate"), res.getVerificationDateElement()); + } + + protected Consent.provisionComponent parseConsentprovisionComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { + Consent.provisionComponent res = new Consent.provisionComponent(); + parseConsentprovisionComponentProperties(json, owner, res); + return res; + } + + protected void parseConsentprovisionComponentProperties(JsonObject json, Consent owner, Consent.provisionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Consent.ConsentProvisionType.NULL, new Consent.ConsentProvisionTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("actor")) { + JsonArray array = json.getAsJsonArray("actor"); + for (int i = 0; i < array.size(); i++) { + res.getActor().add(parseConsentprovisionActorComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("securityLabel")) { + JsonArray array = json.getAsJsonArray("securityLabel"); + for (int i = 0; i < array.size(); i++) { + res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) { + JsonArray array = json.getAsJsonArray("purpose"); + for (int i = 0; i < array.size(); i++) { + res.getPurpose().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("class")) { + JsonArray array = json.getAsJsonArray("class"); + for (int i = 0; i < array.size(); i++) { + res.getClass_().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dataPeriod")) + res.setDataPeriod(parsePeriod(json.getAsJsonObject("dataPeriod"))); + if (json.has("data")) { + JsonArray array = json.getAsJsonArray("data"); + for (int i = 0; i < array.size(); i++) { + res.getData().add(parseConsentprovisionDataComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("provision")) { + JsonArray array = json.getAsJsonArray("provision"); + for (int i = 0; i < array.size(); i++) { + res.getProvision().add(parseConsentprovisionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Consent.provisionActorComponent parseConsentprovisionActorComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { + Consent.provisionActorComponent res = new Consent.provisionActorComponent(); + parseConsentprovisionActorComponentProperties(json, owner, res); + return res; + } + + protected void parseConsentprovisionActorComponentProperties(JsonObject json, Consent owner, Consent.provisionActorComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("reference")) + res.setReference(parseReference(json.getAsJsonObject("reference"))); + } + + protected Consent.provisionDataComponent parseConsentprovisionDataComponent(JsonObject json, Consent owner) throws IOException, FHIRFormatError { + Consent.provisionDataComponent res = new Consent.provisionDataComponent(); + parseConsentprovisionDataComponentProperties(json, owner, res); + return res; + } + + protected void parseConsentprovisionDataComponentProperties(JsonObject json, Consent owner, Consent.provisionDataComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("meaning")) + res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Consent.ConsentDataMeaning.NULL, new Consent.ConsentDataMeaningEnumFactory())); + if (json.has("_meaning")) + parseElementProperties(json.getAsJsonObject("_meaning"), res.getMeaningElement()); + if (json.has("reference")) + res.setReference(parseReference(json.getAsJsonObject("reference"))); + } + + protected Contract parseContract(JsonObject json) throws IOException, FHIRFormatError { + Contract res = new Contract(); + parseContractProperties(json, res); + return res; + } + + protected void parseContractProperties(JsonObject json, Contract res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Contract.ContractStatus.NULL, new Contract.ContractStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("contentDerivative")) + res.setContentDerivative(parseCodeableConcept(json.getAsJsonObject("contentDerivative"))); + if (json.has("issued")) + res.setIssuedElement(parseDateTime(json.get("issued").getAsString())); + if (json.has("_issued")) + parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); + if (json.has("applies")) + res.setApplies(parsePeriod(json.getAsJsonObject("applies"))); + if (json.has("subject")) { + JsonArray array = json.getAsJsonArray("subject"); + for (int i = 0; i < array.size(); i++) { + res.getSubject().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("authority")) { + JsonArray array = json.getAsJsonArray("authority"); + for (int i = 0; i < array.size(); i++) { + res.getAuthority().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("domain")) { + JsonArray array = json.getAsJsonArray("domain"); + for (int i = 0; i < array.size(); i++) { + res.getDomain().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("subType")) { + JsonArray array = json.getAsJsonArray("subType"); + for (int i = 0; i < array.size(); i++) { + res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("term")) { + JsonArray array = json.getAsJsonArray("term"); + for (int i = 0; i < array.size(); i++) { + res.getTerm().add(parseContractTermComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("signer")) { + JsonArray array = json.getAsJsonArray("signer"); + for (int i = 0; i < array.size(); i++) { + res.getSigner().add(parseContractSignatoryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("friendly")) { + JsonArray array = json.getAsJsonArray("friendly"); + for (int i = 0; i < array.size(); i++) { + res.getFriendly().add(parseContractFriendlyLanguageComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("legal")) { + JsonArray array = json.getAsJsonArray("legal"); + for (int i = 0; i < array.size(); i++) { + res.getLegal().add(parseContractLegalLanguageComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("rule")) + res.setRule(parseContractComputableLanguageComponent(json.getAsJsonObject("rule"), res)); + Type legallyBinding = parseType("legallyBinding", json); + if (legallyBinding != null) + res.setLegallyBinding(legallyBinding); + } + + protected Contract.TermComponent parseContractTermComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.TermComponent res = new Contract.TermComponent(); + parseContractTermComponentProperties(json, owner, res); + return res; + } + + protected void parseContractTermComponentProperties(JsonObject json, Contract owner, Contract.TermComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("issued")) + res.setIssuedElement(parseDateTime(json.get("issued").getAsString())); + if (json.has("_issued")) + parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); + if (json.has("applies")) + res.setApplies(parsePeriod(json.getAsJsonObject("applies"))); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("subType")) + res.setSubType(parseCodeableConcept(json.getAsJsonObject("subType"))); + if (json.has("offer")) + res.setOffer(parseContractContractOfferComponent(json.getAsJsonObject("offer"), owner)); + if (json.has("asset")) { + JsonArray array = json.getAsJsonArray("asset"); + for (int i = 0; i < array.size(); i++) { + res.getAsset().add(parseContractContractAssetComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("agent")) { + JsonArray array = json.getAsJsonArray("agent"); + for (int i = 0; i < array.size(); i++) { + res.getAgent().add(parseContractAgentComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("actionReason")) { + JsonArray array = json.getAsJsonArray("actionReason"); + for (int i = 0; i < array.size(); i++) { + res.getActionReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("group")) { + JsonArray array = json.getAsJsonArray("group"); + for (int i = 0; i < array.size(); i++) { + res.getGroup().add(parseContractTermComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Contract.ContractOfferComponent parseContractContractOfferComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.ContractOfferComponent res = new Contract.ContractOfferComponent(); + parseContractContractOfferComponentProperties(json, owner, res); + return res; + } + + protected void parseContractContractOfferComponentProperties(JsonObject json, Contract owner, Contract.ContractOfferComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("topic")) + res.setTopic(parseReference(json.getAsJsonObject("topic"))); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("decision")) + res.setDecision(parseCodeableConcept(json.getAsJsonObject("decision"))); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("linkId")) + res.setLinkIdElement(parseString(json.get("linkId").getAsString())); + if (json.has("_linkId")) + parseElementProperties(json.getAsJsonObject("_linkId"), res.getLinkIdElement()); + } + + protected Contract.ContractAssetComponent parseContractContractAssetComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.ContractAssetComponent res = new Contract.ContractAssetComponent(); + parseContractContractAssetComponentProperties(json, owner, res); + return res; + } + + protected void parseContractContractAssetComponentProperties(JsonObject json, Contract owner, Contract.ContractAssetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("class")) + res.setClass_(parseCoding(json.getAsJsonObject("class"))); + if (json.has("code")) + res.setCode(parseCoding(json.getAsJsonObject("code"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("dataPeriod")) + res.setDataPeriod(parsePeriod(json.getAsJsonObject("dataPeriod"))); + if (json.has("data")) { + JsonArray array = json.getAsJsonArray("data"); + for (int i = 0; i < array.size(); i++) { + res.getData().add(parseContractAssetDataComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("valuedItem")) { + JsonArray array = json.getAsJsonArray("valuedItem"); + for (int i = 0; i < array.size(); i++) { + res.getValuedItem().add(parseContractValuedItemComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("securityLabel")) { + JsonArray array = json.getAsJsonArray("securityLabel"); + for (int i = 0; i < array.size(); i++) { + res.getSecurityLabel().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + } + + protected Contract.AssetDataComponent parseContractAssetDataComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.AssetDataComponent res = new Contract.AssetDataComponent(); + parseContractAssetDataComponentProperties(json, owner, res); + return res; + } + + protected void parseContractAssetDataComponentProperties(JsonObject json, Contract owner, Contract.AssetDataComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("meaning")) + res.setMeaningElement(parseEnumeration(json.get("meaning").getAsString(), Contract.ContractDataMeaning.NULL, new Contract.ContractDataMeaningEnumFactory())); + if (json.has("_meaning")) + parseElementProperties(json.getAsJsonObject("_meaning"), res.getMeaningElement()); + if (json.has("reference")) + res.setReference(parseReference(json.getAsJsonObject("reference"))); + } + + protected Contract.ValuedItemComponent parseContractValuedItemComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.ValuedItemComponent res = new Contract.ValuedItemComponent(); + parseContractValuedItemComponentProperties(json, owner, res); + return res; + } + + protected void parseContractValuedItemComponentProperties(JsonObject json, Contract owner, Contract.ValuedItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type entity = parseType("entity", json); + if (entity != null) + res.setEntity(entity); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("effectiveTime")) + res.setEffectiveTimeElement(parseDateTime(json.get("effectiveTime").getAsString())); + if (json.has("_effectiveTime")) + parseElementProperties(json.getAsJsonObject("_effectiveTime"), res.getEffectiveTimeElement()); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("points")) + res.setPointsElement(parseDecimal(json.get("points").getAsBigDecimal())); + if (json.has("_points")) + parseElementProperties(json.getAsJsonObject("_points"), res.getPointsElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + } + + protected Contract.AgentComponent parseContractAgentComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.AgentComponent res = new Contract.AgentComponent(); + parseContractAgentComponentProperties(json, owner, res); + return res; + } + + protected void parseContractAgentComponentProperties(JsonObject json, Contract owner, Contract.AgentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + if (json.has("role")) { + JsonArray array = json.getAsJsonArray("role"); + for (int i = 0; i < array.size(); i++) { + res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected Contract.SignatoryComponent parseContractSignatoryComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.SignatoryComponent res = new Contract.SignatoryComponent(); + parseContractSignatoryComponentProperties(json, owner, res); + return res; + } + + protected void parseContractSignatoryComponentProperties(JsonObject json, Contract owner, Contract.SignatoryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCoding(json.getAsJsonObject("type"))); + if (json.has("party")) + res.setParty(parseReference(json.getAsJsonObject("party"))); + if (json.has("signature")) { + JsonArray array = json.getAsJsonArray("signature"); + for (int i = 0; i < array.size(); i++) { + res.getSignature().add(parseSignature(array.get(i).getAsJsonObject())); + } + }; + } + + protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent(); + parseContractFriendlyLanguageComponentProperties(json, owner, res); + return res; + } + + protected void parseContractFriendlyLanguageComponentProperties(JsonObject json, Contract owner, Contract.FriendlyLanguageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type content = parseType("content", json); + if (content != null) + res.setContent(content); + } + + protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent(); + parseContractLegalLanguageComponentProperties(json, owner, res); + return res; + } + + protected void parseContractLegalLanguageComponentProperties(JsonObject json, Contract owner, Contract.LegalLanguageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type content = parseType("content", json); + if (content != null) + res.setContent(content); + } + + protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(JsonObject json, Contract owner) throws IOException, FHIRFormatError { + Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent(); + parseContractComputableLanguageComponentProperties(json, owner, res); + return res; + } + + protected void parseContractComputableLanguageComponentProperties(JsonObject json, Contract owner, Contract.ComputableLanguageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type content = parseType("content", json); + if (content != null) + res.setContent(content); + } + + protected Coverage parseCoverage(JsonObject json) throws IOException, FHIRFormatError { + Coverage res = new Coverage(); + parseCoverageProperties(json, res); + return res; + } + + protected void parseCoverageProperties(JsonObject json, Coverage res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Coverage.CoverageStatus.NULL, new Coverage.CoverageStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("policyHolder")) + res.setPolicyHolder(parseReference(json.getAsJsonObject("policyHolder"))); + if (json.has("subscriber")) + res.setSubscriber(parseReference(json.getAsJsonObject("subscriber"))); + if (json.has("subscriberId")) + res.setSubscriberIdElement(parseString(json.get("subscriberId").getAsString())); + if (json.has("_subscriberId")) + parseElementProperties(json.getAsJsonObject("_subscriberId"), res.getSubscriberIdElement()); + if (json.has("beneficiary")) + res.setBeneficiary(parseReference(json.getAsJsonObject("beneficiary"))); + if (json.has("relationship")) + res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("payor")) { + JsonArray array = json.getAsJsonArray("payor"); + for (int i = 0; i < array.size(); i++) { + res.getPayor().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("grouping")) + res.setGrouping(parseCoverageGroupComponent(json.getAsJsonObject("grouping"), res)); + if (json.has("dependent")) + res.setDependentElement(parseString(json.get("dependent").getAsString())); + if (json.has("_dependent")) + parseElementProperties(json.getAsJsonObject("_dependent"), res.getDependentElement()); + if (json.has("sequence")) + res.setSequenceElement(parseString(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("order")) + res.setOrderElement(parsePositiveInt(json.get("order").getAsString())); + if (json.has("_order")) + parseElementProperties(json.getAsJsonObject("_order"), res.getOrderElement()); + if (json.has("network")) + res.setNetworkElement(parseString(json.get("network").getAsString())); + if (json.has("_network")) + parseElementProperties(json.getAsJsonObject("_network"), res.getNetworkElement()); + if (json.has("contract")) { + JsonArray array = json.getAsJsonArray("contract"); + for (int i = 0; i < array.size(); i++) { + res.getContract().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Coverage.GroupComponent parseCoverageGroupComponent(JsonObject json, Coverage owner) throws IOException, FHIRFormatError { + Coverage.GroupComponent res = new Coverage.GroupComponent(); + parseCoverageGroupComponentProperties(json, owner, res); + return res; + } + + protected void parseCoverageGroupComponentProperties(JsonObject json, Coverage owner, Coverage.GroupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("group")) + res.setGroupElement(parseString(json.get("group").getAsString())); + if (json.has("_group")) + parseElementProperties(json.getAsJsonObject("_group"), res.getGroupElement()); + if (json.has("groupDisplay")) + res.setGroupDisplayElement(parseString(json.get("groupDisplay").getAsString())); + if (json.has("_groupDisplay")) + parseElementProperties(json.getAsJsonObject("_groupDisplay"), res.getGroupDisplayElement()); + if (json.has("subGroup")) + res.setSubGroupElement(parseString(json.get("subGroup").getAsString())); + if (json.has("_subGroup")) + parseElementProperties(json.getAsJsonObject("_subGroup"), res.getSubGroupElement()); + if (json.has("subGroupDisplay")) + res.setSubGroupDisplayElement(parseString(json.get("subGroupDisplay").getAsString())); + if (json.has("_subGroupDisplay")) + parseElementProperties(json.getAsJsonObject("_subGroupDisplay"), res.getSubGroupDisplayElement()); + if (json.has("plan")) + res.setPlanElement(parseString(json.get("plan").getAsString())); + if (json.has("_plan")) + parseElementProperties(json.getAsJsonObject("_plan"), res.getPlanElement()); + if (json.has("planDisplay")) + res.setPlanDisplayElement(parseString(json.get("planDisplay").getAsString())); + if (json.has("_planDisplay")) + parseElementProperties(json.getAsJsonObject("_planDisplay"), res.getPlanDisplayElement()); + if (json.has("subPlan")) + res.setSubPlanElement(parseString(json.get("subPlan").getAsString())); + if (json.has("_subPlan")) + parseElementProperties(json.getAsJsonObject("_subPlan"), res.getSubPlanElement()); + if (json.has("subPlanDisplay")) + res.setSubPlanDisplayElement(parseString(json.get("subPlanDisplay").getAsString())); + if (json.has("_subPlanDisplay")) + parseElementProperties(json.getAsJsonObject("_subPlanDisplay"), res.getSubPlanDisplayElement()); + if (json.has("class")) + res.setClass_Element(parseString(json.get("class").getAsString())); + if (json.has("_class")) + parseElementProperties(json.getAsJsonObject("_class"), res.getClass_Element()); + if (json.has("classDisplay")) + res.setClassDisplayElement(parseString(json.get("classDisplay").getAsString())); + if (json.has("_classDisplay")) + parseElementProperties(json.getAsJsonObject("_classDisplay"), res.getClassDisplayElement()); + if (json.has("subClass")) + res.setSubClassElement(parseString(json.get("subClass").getAsString())); + if (json.has("_subClass")) + parseElementProperties(json.getAsJsonObject("_subClass"), res.getSubClassElement()); + if (json.has("subClassDisplay")) + res.setSubClassDisplayElement(parseString(json.get("subClassDisplay").getAsString())); + if (json.has("_subClassDisplay")) + parseElementProperties(json.getAsJsonObject("_subClassDisplay"), res.getSubClassDisplayElement()); + } + + protected DetectedIssue parseDetectedIssue(JsonObject json) throws IOException, FHIRFormatError { + DetectedIssue res = new DetectedIssue(); + parseDetectedIssueProperties(json, res); + return res; + } + + protected void parseDetectedIssueProperties(JsonObject json, DetectedIssue res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DetectedIssue.DetectedIssueStatus.NULL, new DetectedIssue.DetectedIssueStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("severity")) + res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), DetectedIssue.DetectedIssueSeverity.NULL, new DetectedIssue.DetectedIssueSeverityEnumFactory())); + if (json.has("_severity")) + parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("implicated")) { + JsonArray array = json.getAsJsonArray("implicated"); + for (int i = 0; i < array.size(); i++) { + res.getImplicated().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("detail")) + res.setDetailElement(parseString(json.get("detail").getAsString())); + if (json.has("_detail")) + parseElementProperties(json.getAsJsonObject("_detail"), res.getDetailElement()); + if (json.has("reference")) + res.setReferenceElement(parseUri(json.get("reference").getAsString())); + if (json.has("_reference")) + parseElementProperties(json.getAsJsonObject("_reference"), res.getReferenceElement()); + if (json.has("mitigation")) { + JsonArray array = json.getAsJsonArray("mitigation"); + for (int i = 0; i < array.size(); i++) { + res.getMitigation().add(parseDetectedIssueDetectedIssueMitigationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueDetectedIssueMitigationComponent(JsonObject json, DetectedIssue owner) throws IOException, FHIRFormatError { + DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent(); + parseDetectedIssueDetectedIssueMitigationComponentProperties(json, owner, res); + return res; + } + + protected void parseDetectedIssueDetectedIssueMitigationComponentProperties(JsonObject json, DetectedIssue owner, DetectedIssue.DetectedIssueMitigationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("action")) + res.setAction(parseCodeableConcept(json.getAsJsonObject("action"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + } + + protected Device parseDevice(JsonObject json) throws IOException, FHIRFormatError { + Device res = new Device(); + parseDeviceProperties(json, res); + return res; + } + + protected void parseDeviceProperties(JsonObject json, Device res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("udi")) + res.setUdi(parseDeviceDeviceUdiComponent(json.getAsJsonObject("udi"), res)); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Device.FHIRDeviceStatus.NULL, new Device.FHIRDeviceStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("lotNumber")) + res.setLotNumberElement(parseString(json.get("lotNumber").getAsString())); + if (json.has("_lotNumber")) + parseElementProperties(json.getAsJsonObject("_lotNumber"), res.getLotNumberElement()); + if (json.has("manufacturer")) + res.setManufacturerElement(parseString(json.get("manufacturer").getAsString())); + if (json.has("_manufacturer")) + parseElementProperties(json.getAsJsonObject("_manufacturer"), res.getManufacturerElement()); + if (json.has("manufactureDate")) + res.setManufactureDateElement(parseDateTime(json.get("manufactureDate").getAsString())); + if (json.has("_manufactureDate")) + parseElementProperties(json.getAsJsonObject("_manufactureDate"), res.getManufactureDateElement()); + if (json.has("expirationDate")) + res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString())); + if (json.has("_expirationDate")) + parseElementProperties(json.getAsJsonObject("_expirationDate"), res.getExpirationDateElement()); + if (json.has("model")) + res.setModelElement(parseString(json.get("model").getAsString())); + if (json.has("_model")) + parseElementProperties(json.getAsJsonObject("_model"), res.getModelElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("owner")) + res.setOwner(parseReference(json.getAsJsonObject("owner"))); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("safety")) { + JsonArray array = json.getAsJsonArray("safety"); + for (int i = 0; i < array.size(); i++) { + res.getSafety().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected Device.DeviceUdiComponent parseDeviceDeviceUdiComponent(JsonObject json, Device owner) throws IOException, FHIRFormatError { + Device.DeviceUdiComponent res = new Device.DeviceUdiComponent(); + parseDeviceDeviceUdiComponentProperties(json, owner, res); + return res; + } + + protected void parseDeviceDeviceUdiComponentProperties(JsonObject json, Device owner, Device.DeviceUdiComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("deviceIdentifier")) + res.setDeviceIdentifierElement(parseString(json.get("deviceIdentifier").getAsString())); + if (json.has("_deviceIdentifier")) + parseElementProperties(json.getAsJsonObject("_deviceIdentifier"), res.getDeviceIdentifierElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("jurisdiction")) + res.setJurisdictionElement(parseUri(json.get("jurisdiction").getAsString())); + if (json.has("_jurisdiction")) + parseElementProperties(json.getAsJsonObject("_jurisdiction"), res.getJurisdictionElement()); + if (json.has("carrierHRF")) + res.setCarrierHRFElement(parseString(json.get("carrierHRF").getAsString())); + if (json.has("_carrierHRF")) + parseElementProperties(json.getAsJsonObject("_carrierHRF"), res.getCarrierHRFElement()); + if (json.has("carrierAIDC")) + res.setCarrierAIDCElement(parseBase64Binary(json.get("carrierAIDC").getAsString())); + if (json.has("_carrierAIDC")) + parseElementProperties(json.getAsJsonObject("_carrierAIDC"), res.getCarrierAIDCElement()); + if (json.has("issuer")) + res.setIssuerElement(parseUri(json.get("issuer").getAsString())); + if (json.has("_issuer")) + parseElementProperties(json.getAsJsonObject("_issuer"), res.getIssuerElement()); + if (json.has("entryType")) + res.setEntryTypeElement(parseEnumeration(json.get("entryType").getAsString(), Device.UDIEntryType.NULL, new Device.UDIEntryTypeEnumFactory())); + if (json.has("_entryType")) + parseElementProperties(json.getAsJsonObject("_entryType"), res.getEntryTypeElement()); + } + + protected DeviceComponent parseDeviceComponent(JsonObject json) throws IOException, FHIRFormatError { + DeviceComponent res = new DeviceComponent(); + parseDeviceComponentProperties(json, res); + return res; + } + + protected void parseDeviceComponentProperties(JsonObject json, DeviceComponent res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("lastSystemChange")) + res.setLastSystemChangeElement(parseInstant(json.get("lastSystemChange").getAsString())); + if (json.has("_lastSystemChange")) + parseElementProperties(json.getAsJsonObject("_lastSystemChange"), res.getLastSystemChangeElement()); + if (json.has("source")) + res.setSource(parseReference(json.getAsJsonObject("source"))); + if (json.has("parent")) + res.setParent(parseReference(json.getAsJsonObject("parent"))); + if (json.has("operationalStatus")) { + JsonArray array = json.getAsJsonArray("operationalStatus"); + for (int i = 0; i < array.size(); i++) { + res.getOperationalStatus().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("parameterGroup")) + res.setParameterGroup(parseCodeableConcept(json.getAsJsonObject("parameterGroup"))); + if (json.has("measurementPrinciple")) + res.setMeasurementPrincipleElement(parseEnumeration(json.get("measurementPrinciple").getAsString(), DeviceComponent.MeasmntPrinciple.NULL, new DeviceComponent.MeasmntPrincipleEnumFactory())); + if (json.has("_measurementPrinciple")) + parseElementProperties(json.getAsJsonObject("_measurementPrinciple"), res.getMeasurementPrincipleElement()); + if (json.has("productionSpecification")) { + JsonArray array = json.getAsJsonArray("productionSpecification"); + for (int i = 0; i < array.size(); i++) { + res.getProductionSpecification().add(parseDeviceComponentDeviceComponentProductionSpecificationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("languageCode")) + res.setLanguageCode(parseCodeableConcept(json.getAsJsonObject("languageCode"))); + if (json.has("property")) { + JsonArray array = json.getAsJsonArray("property"); + for (int i = 0; i < array.size(); i++) { + res.getProperty().add(parseDeviceComponentDeviceComponentPropertyComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected DeviceComponent.DeviceComponentProductionSpecificationComponent parseDeviceComponentDeviceComponentProductionSpecificationComponent(JsonObject json, DeviceComponent owner) throws IOException, FHIRFormatError { + DeviceComponent.DeviceComponentProductionSpecificationComponent res = new DeviceComponent.DeviceComponentProductionSpecificationComponent(); + parseDeviceComponentDeviceComponentProductionSpecificationComponentProperties(json, owner, res); + return res; + } + + protected void parseDeviceComponentDeviceComponentProductionSpecificationComponentProperties(JsonObject json, DeviceComponent owner, DeviceComponent.DeviceComponentProductionSpecificationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("specType")) + res.setSpecType(parseCodeableConcept(json.getAsJsonObject("specType"))); + if (json.has("componentId")) + res.setComponentId(parseIdentifier(json.getAsJsonObject("componentId"))); + if (json.has("productionSpec")) + res.setProductionSpecElement(parseString(json.get("productionSpec").getAsString())); + if (json.has("_productionSpec")) + parseElementProperties(json.getAsJsonObject("_productionSpec"), res.getProductionSpecElement()); + } + + protected DeviceComponent.DeviceComponentPropertyComponent parseDeviceComponentDeviceComponentPropertyComponent(JsonObject json, DeviceComponent owner) throws IOException, FHIRFormatError { + DeviceComponent.DeviceComponentPropertyComponent res = new DeviceComponent.DeviceComponentPropertyComponent(); + parseDeviceComponentDeviceComponentPropertyComponentProperties(json, owner, res); + return res; + } + + protected void parseDeviceComponentDeviceComponentPropertyComponentProperties(JsonObject json, DeviceComponent owner, DeviceComponent.DeviceComponentPropertyComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("valueQuantity")) { + JsonArray array = json.getAsJsonArray("valueQuantity"); + for (int i = 0; i < array.size(); i++) { + res.getValueQuantity().add(parseQuantity(array.get(i).getAsJsonObject())); + } + }; + if (json.has("valueCode")) { + JsonArray array = json.getAsJsonArray("valueCode"); + for (int i = 0; i < array.size(); i++) { + res.getValueCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected DeviceMetric parseDeviceMetric(JsonObject json) throws IOException, FHIRFormatError { + DeviceMetric res = new DeviceMetric(); + parseDeviceMetricProperties(json, res); + return res; + } + + protected void parseDeviceMetricProperties(JsonObject json, DeviceMetric res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("unit")) + res.setUnit(parseCodeableConcept(json.getAsJsonObject("unit"))); + if (json.has("source")) + res.setSource(parseReference(json.getAsJsonObject("source"))); + if (json.has("parent")) + res.setParent(parseReference(json.getAsJsonObject("parent"))); + if (json.has("operationalStatus")) + res.setOperationalStatusElement(parseEnumeration(json.get("operationalStatus").getAsString(), DeviceMetric.DeviceMetricOperationalStatus.NULL, new DeviceMetric.DeviceMetricOperationalStatusEnumFactory())); + if (json.has("_operationalStatus")) + parseElementProperties(json.getAsJsonObject("_operationalStatus"), res.getOperationalStatusElement()); + if (json.has("color")) + res.setColorElement(parseEnumeration(json.get("color").getAsString(), DeviceMetric.DeviceMetricColor.NULL, new DeviceMetric.DeviceMetricColorEnumFactory())); + if (json.has("_color")) + parseElementProperties(json.getAsJsonObject("_color"), res.getColorElement()); + if (json.has("category")) + res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), DeviceMetric.DeviceMetricCategory.NULL, new DeviceMetric.DeviceMetricCategoryEnumFactory())); + if (json.has("_category")) + parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); + if (json.has("measurementPeriod")) + res.setMeasurementPeriod(parseTiming(json.getAsJsonObject("measurementPeriod"))); + if (json.has("calibration")) { + JsonArray array = json.getAsJsonArray("calibration"); + for (int i = 0; i < array.size(); i++) { + res.getCalibration().add(parseDeviceMetricDeviceMetricCalibrationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricDeviceMetricCalibrationComponent(JsonObject json, DeviceMetric owner) throws IOException, FHIRFormatError { + DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent(); + parseDeviceMetricDeviceMetricCalibrationComponentProperties(json, owner, res); + return res; + } + + protected void parseDeviceMetricDeviceMetricCalibrationComponentProperties(JsonObject json, DeviceMetric owner, DeviceMetric.DeviceMetricCalibrationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), DeviceMetric.DeviceMetricCalibrationType.NULL, new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("state")) + res.setStateElement(parseEnumeration(json.get("state").getAsString(), DeviceMetric.DeviceMetricCalibrationState.NULL, new DeviceMetric.DeviceMetricCalibrationStateEnumFactory())); + if (json.has("_state")) + parseElementProperties(json.getAsJsonObject("_state"), res.getStateElement()); + if (json.has("time")) + res.setTimeElement(parseInstant(json.get("time").getAsString())); + if (json.has("_time")) + parseElementProperties(json.getAsJsonObject("_time"), res.getTimeElement()); + } + + protected DeviceRequest parseDeviceRequest(JsonObject json) throws IOException, FHIRFormatError { + DeviceRequest res = new DeviceRequest(); + parseDeviceRequestProperties(json, res); + return res; + } + + protected void parseDeviceRequestProperties(JsonObject json, DeviceRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priorRequest")) { + JsonArray array = json.getAsJsonArray("priorRequest"); + for (int i = 0; i < array.size(); i++) { + res.getPriorRequest().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("groupIdentifier")) + res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceRequest.DeviceRequestStatus.NULL, new DeviceRequest.DeviceRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("intent")) + res.setIntent(parseCodeableConcept(json.getAsJsonObject("intent"))); + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), DeviceRequest.RequestPriority.NULL, new DeviceRequest.RequestPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + Type code = parseType("code", json); + if (code != null) + res.setCode(code); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("requester")) + res.setRequester(parseDeviceRequestDeviceRequestRequesterComponent(json.getAsJsonObject("requester"), res)); + if (json.has("performerType")) + res.setPerformerType(parseCodeableConcept(json.getAsJsonObject("performerType"))); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("supportingInfo")) { + JsonArray array = json.getAsJsonArray("supportingInfo"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("relevantHistory")) { + JsonArray array = json.getAsJsonArray("relevantHistory"); + for (int i = 0; i < array.size(); i++) { + res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected DeviceRequest.DeviceRequestRequesterComponent parseDeviceRequestDeviceRequestRequesterComponent(JsonObject json, DeviceRequest owner) throws IOException, FHIRFormatError { + DeviceRequest.DeviceRequestRequesterComponent res = new DeviceRequest.DeviceRequestRequesterComponent(); + parseDeviceRequestDeviceRequestRequesterComponentProperties(json, owner, res); + return res; + } + + protected void parseDeviceRequestDeviceRequestRequesterComponentProperties(JsonObject json, DeviceRequest owner, DeviceRequest.DeviceRequestRequesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("agent")) + res.setAgent(parseReference(json.getAsJsonObject("agent"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected DeviceUseStatement parseDeviceUseStatement(JsonObject json) throws IOException, FHIRFormatError { + DeviceUseStatement res = new DeviceUseStatement(); + parseDeviceUseStatementProperties(json, res); + return res; + } + + protected void parseDeviceUseStatementProperties(JsonObject json, DeviceUseStatement res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DeviceUseStatement.DeviceUseStatementStatus.NULL, new DeviceUseStatement.DeviceUseStatementStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("whenUsed")) + res.setWhenUsed(parsePeriod(json.getAsJsonObject("whenUsed"))); + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + if (json.has("recordedOn")) + res.setRecordedOnElement(parseDateTime(json.get("recordedOn").getAsString())); + if (json.has("_recordedOn")) + parseElementProperties(json.getAsJsonObject("_recordedOn"), res.getRecordedOnElement()); + if (json.has("source")) + res.setSource(parseReference(json.getAsJsonObject("source"))); + if (json.has("device")) + res.setDevice(parseReference(json.getAsJsonObject("device"))); + if (json.has("indication")) { + JsonArray array = json.getAsJsonArray("indication"); + for (int i = 0; i < array.size(); i++) { + res.getIndication().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) + res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected DiagnosticReport parseDiagnosticReport(JsonObject json) throws IOException, FHIRFormatError { + DiagnosticReport res = new DiagnosticReport(); + parseDiagnosticReportProperties(json, res); + return res; + } + + protected void parseDiagnosticReportProperties(JsonObject json, DiagnosticReport res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), DiagnosticReport.DiagnosticReportStatus.NULL, new DiagnosticReport.DiagnosticReportStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type effective = parseType("effective", json); + if (effective != null) + res.setEffective(effective); + if (json.has("issued")) + res.setIssuedElement(parseInstant(json.get("issued").getAsString())); + if (json.has("_issued")) + parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("resultsInterpreter")) { + JsonArray array = json.getAsJsonArray("resultsInterpreter"); + for (int i = 0; i < array.size(); i++) { + res.getResultsInterpreter().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specimen")) { + JsonArray array = json.getAsJsonArray("specimen"); + for (int i = 0; i < array.size(); i++) { + res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("result")) { + JsonArray array = json.getAsJsonArray("result"); + for (int i = 0; i < array.size(); i++) { + res.getResult().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("imagingStudy")) { + JsonArray array = json.getAsJsonArray("imagingStudy"); + for (int i = 0; i < array.size(); i++) { + res.getImagingStudy().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("image")) { + JsonArray array = json.getAsJsonArray("image"); + for (int i = 0; i < array.size(); i++) { + res.getImage().add(parseDiagnosticReportDiagnosticReportImageComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("conclusion")) + res.setConclusionElement(parseString(json.get("conclusion").getAsString())); + if (json.has("_conclusion")) + parseElementProperties(json.getAsJsonObject("_conclusion"), res.getConclusionElement()); + if (json.has("codedDiagnosis")) { + JsonArray array = json.getAsJsonArray("codedDiagnosis"); + for (int i = 0; i < array.size(); i++) { + res.getCodedDiagnosis().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("presentedForm")) { + JsonArray array = json.getAsJsonArray("presentedForm"); + for (int i = 0; i < array.size(); i++) { + res.getPresentedForm().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + } + + protected DiagnosticReport.DiagnosticReportImageComponent parseDiagnosticReportDiagnosticReportImageComponent(JsonObject json, DiagnosticReport owner) throws IOException, FHIRFormatError { + DiagnosticReport.DiagnosticReportImageComponent res = new DiagnosticReport.DiagnosticReportImageComponent(); + parseDiagnosticReportDiagnosticReportImageComponentProperties(json, owner, res); + return res; + } + + protected void parseDiagnosticReportDiagnosticReportImageComponentProperties(JsonObject json, DiagnosticReport owner, DiagnosticReport.DiagnosticReportImageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("link")) + res.setLink(parseReference(json.getAsJsonObject("link"))); + } + + protected DocumentManifest parseDocumentManifest(JsonObject json) throws IOException, FHIRFormatError { + DocumentManifest res = new DocumentManifest(); + parseDocumentManifestProperties(json, res); + return res; + } + + protected void parseDocumentManifestProperties(JsonObject json, DocumentManifest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("masterIdentifier")) + res.setMasterIdentifier(parseIdentifier(json.getAsJsonObject("masterIdentifier"))); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("agent")) { + JsonArray array = json.getAsJsonArray("agent"); + for (int i = 0; i < array.size(); i++) { + res.getAgent().add(parseDocumentManifestDocumentManifestAgentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("recipient")) { + JsonArray array = json.getAsJsonArray("recipient"); + for (int i = 0; i < array.size(); i++) { + res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("source")) + res.setSourceElement(parseUri(json.get("source").getAsString())); + if (json.has("_source")) + parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("content")) { + JsonArray array = json.getAsJsonArray("content"); + for (int i = 0; i < array.size(); i++) { + res.getContent().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("related")) { + JsonArray array = json.getAsJsonArray("related"); + for (int i = 0; i < array.size(); i++) { + res.getRelated().add(parseDocumentManifestDocumentManifestRelatedComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected DocumentManifest.DocumentManifestAgentComponent parseDocumentManifestDocumentManifestAgentComponent(JsonObject json, DocumentManifest owner) throws IOException, FHIRFormatError { + DocumentManifest.DocumentManifestAgentComponent res = new DocumentManifest.DocumentManifestAgentComponent(); + parseDocumentManifestDocumentManifestAgentComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentManifestDocumentManifestAgentComponentProperties(JsonObject json, DocumentManifest owner, DocumentManifest.DocumentManifestAgentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("who")) + res.setWho(parseReference(json.getAsJsonObject("who"))); + } + + protected DocumentManifest.DocumentManifestRelatedComponent parseDocumentManifestDocumentManifestRelatedComponent(JsonObject json, DocumentManifest owner) throws IOException, FHIRFormatError { + DocumentManifest.DocumentManifestRelatedComponent res = new DocumentManifest.DocumentManifestRelatedComponent(); + parseDocumentManifestDocumentManifestRelatedComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentManifestDocumentManifestRelatedComponentProperties(JsonObject json, DocumentManifest owner, DocumentManifest.DocumentManifestRelatedComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("ref")) + res.setRef(parseReference(json.getAsJsonObject("ref"))); + } + + protected DocumentReference parseDocumentReference(JsonObject json) throws IOException, FHIRFormatError { + DocumentReference res = new DocumentReference(); + parseDocumentReferenceProperties(json, res); + return res; + } + + protected void parseDocumentReferenceProperties(JsonObject json, DocumentReference res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("masterIdentifier")) + res.setMasterIdentifier(parseIdentifier(json.getAsJsonObject("masterIdentifier"))); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("docStatus")) + res.setDocStatusElement(parseEnumeration(json.get("docStatus").getAsString(), DocumentReference.ReferredDocumentStatus.NULL, new DocumentReference.ReferredDocumentStatusEnumFactory())); + if (json.has("_docStatus")) + parseElementProperties(json.getAsJsonObject("_docStatus"), res.getDocStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("class")) + res.setClass_(parseCodeableConcept(json.getAsJsonObject("class"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("date")) + res.setDateElement(parseInstant(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("agent")) { + JsonArray array = json.getAsJsonArray("agent"); + for (int i = 0; i < array.size(); i++) { + res.getAgent().add(parseDocumentReferenceDocumentReferenceAgentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("authenticator")) + res.setAuthenticator(parseReference(json.getAsJsonObject("authenticator"))); + if (json.has("custodian")) + res.setCustodian(parseReference(json.getAsJsonObject("custodian"))); + if (json.has("relatesTo")) { + JsonArray array = json.getAsJsonArray("relatesTo"); + for (int i = 0; i < array.size(); i++) { + res.getRelatesTo().add(parseDocumentReferenceDocumentReferenceRelatesToComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("securityLabel")) { + JsonArray array = json.getAsJsonArray("securityLabel"); + for (int i = 0; i < array.size(); i++) { + res.getSecurityLabel().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("content")) { + JsonArray array = json.getAsJsonArray("content"); + for (int i = 0; i < array.size(); i++) { + res.getContent().add(parseDocumentReferenceDocumentReferenceContentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("context")) + res.setContext(parseDocumentReferenceDocumentReferenceContextComponent(json.getAsJsonObject("context"), res)); + } + + protected DocumentReference.DocumentReferenceAgentComponent parseDocumentReferenceDocumentReferenceAgentComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { + DocumentReference.DocumentReferenceAgentComponent res = new DocumentReference.DocumentReferenceAgentComponent(); + parseDocumentReferenceDocumentReferenceAgentComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentReferenceDocumentReferenceAgentComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceAgentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("who")) + res.setWho(parseReference(json.getAsJsonObject("who"))); + } + + protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceDocumentReferenceRelatesToComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { + DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent(); + parseDocumentReferenceDocumentReferenceRelatesToComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentReferenceDocumentReferenceRelatesToComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceRelatesToComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), DocumentReference.DocumentRelationshipType.NULL, new DocumentReference.DocumentRelationshipTypeEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("target")) + res.setTarget(parseReference(json.getAsJsonObject("target"))); + } + + protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceDocumentReferenceContentComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { + DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent(); + parseDocumentReferenceDocumentReferenceContentComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentReferenceDocumentReferenceContentComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceContentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("attachment")) + res.setAttachment(parseAttachment(json.getAsJsonObject("attachment"))); + if (json.has("format")) + res.setFormat(parseCoding(json.getAsJsonObject("format"))); + } + + protected DocumentReference.DocumentReferenceContextComponent parseDocumentReferenceDocumentReferenceContextComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { + DocumentReference.DocumentReferenceContextComponent res = new DocumentReference.DocumentReferenceContextComponent(); + parseDocumentReferenceDocumentReferenceContextComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentReferenceDocumentReferenceContextComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceContextComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("event")) { + JsonArray array = json.getAsJsonArray("event"); + for (int i = 0; i < array.size(); i++) { + res.getEvent().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("facilityType")) + res.setFacilityType(parseCodeableConcept(json.getAsJsonObject("facilityType"))); + if (json.has("practiceSetting")) + res.setPracticeSetting(parseCodeableConcept(json.getAsJsonObject("practiceSetting"))); + if (json.has("sourcePatientInfo")) + res.setSourcePatientInfo(parseReference(json.getAsJsonObject("sourcePatientInfo"))); + if (json.has("related")) { + JsonArray array = json.getAsJsonArray("related"); + for (int i = 0; i < array.size(); i++) { + res.getRelated().add(parseDocumentReferenceDocumentReferenceContextRelatedComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected DocumentReference.DocumentReferenceContextRelatedComponent parseDocumentReferenceDocumentReferenceContextRelatedComponent(JsonObject json, DocumentReference owner) throws IOException, FHIRFormatError { + DocumentReference.DocumentReferenceContextRelatedComponent res = new DocumentReference.DocumentReferenceContextRelatedComponent(); + parseDocumentReferenceDocumentReferenceContextRelatedComponentProperties(json, owner, res); + return res; + } + + protected void parseDocumentReferenceDocumentReferenceContextRelatedComponentProperties(JsonObject json, DocumentReference owner, DocumentReference.DocumentReferenceContextRelatedComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("ref")) + res.setRef(parseReference(json.getAsJsonObject("ref"))); + } + + protected EligibilityRequest parseEligibilityRequest(JsonObject json) throws IOException, FHIRFormatError { + EligibilityRequest res = new EligibilityRequest(); + parseEligibilityRequestProperties(json, res); + return res; + } + + protected void parseEligibilityRequestProperties(JsonObject json, EligibilityRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EligibilityRequest.EligibilityRequestStatus.NULL, new EligibilityRequest.EligibilityRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("priority")) + res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + Type serviced = parseType("serviced", json); + if (serviced != null) + res.setServiced(serviced); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("enterer")) + res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("insurer")) + res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); + if (json.has("facility")) + res.setFacility(parseReference(json.getAsJsonObject("facility"))); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + if (json.has("businessArrangement")) + res.setBusinessArrangementElement(parseString(json.get("businessArrangement").getAsString())); + if (json.has("_businessArrangement")) + parseElementProperties(json.getAsJsonObject("_businessArrangement"), res.getBusinessArrangementElement()); + if (json.has("benefitCategory")) + res.setBenefitCategory(parseCodeableConcept(json.getAsJsonObject("benefitCategory"))); + if (json.has("benefitSubCategory")) + res.setBenefitSubCategory(parseCodeableConcept(json.getAsJsonObject("benefitSubCategory"))); + } + + protected EligibilityResponse parseEligibilityResponse(JsonObject json) throws IOException, FHIRFormatError { + EligibilityResponse res = new EligibilityResponse(); + parseEligibilityResponseProperties(json, res); + return res; + } + + protected void parseEligibilityResponseProperties(JsonObject json, EligibilityResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EligibilityResponse.EligibilityResponseStatus.NULL, new EligibilityResponse.EligibilityResponseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("requestProvider")) + res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); + if (json.has("requestOrganization")) + res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("disposition")) + res.setDispositionElement(parseString(json.get("disposition").getAsString())); + if (json.has("_disposition")) + parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); + if (json.has("insurer")) + res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); + if (json.has("inforce")) + res.setInforceElement(parseBoolean(json.get("inforce").getAsBoolean())); + if (json.has("_inforce")) + parseElementProperties(json.getAsJsonObject("_inforce"), res.getInforceElement()); + if (json.has("insurance")) { + JsonArray array = json.getAsJsonArray("insurance"); + for (int i = 0; i < array.size(); i++) { + res.getInsurance().add(parseEligibilityResponseInsuranceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("form")) + res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); + if (json.has("error")) { + JsonArray array = json.getAsJsonArray("error"); + for (int i = 0; i < array.size(); i++) { + res.getError().add(parseEligibilityResponseErrorsComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected EligibilityResponse.InsuranceComponent parseEligibilityResponseInsuranceComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { + EligibilityResponse.InsuranceComponent res = new EligibilityResponse.InsuranceComponent(); + parseEligibilityResponseInsuranceComponentProperties(json, owner, res); + return res; + } + + protected void parseEligibilityResponseInsuranceComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.InsuranceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + if (json.has("contract")) + res.setContract(parseReference(json.getAsJsonObject("contract"))); + if (json.has("benefitBalance")) { + JsonArray array = json.getAsJsonArray("benefitBalance"); + for (int i = 0; i < array.size(); i++) { + res.getBenefitBalance().add(parseEligibilityResponseBenefitsComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected EligibilityResponse.BenefitsComponent parseEligibilityResponseBenefitsComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { + EligibilityResponse.BenefitsComponent res = new EligibilityResponse.BenefitsComponent(); + parseEligibilityResponseBenefitsComponentProperties(json, owner, res); + return res; + } + + protected void parseEligibilityResponseBenefitsComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.BenefitsComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("subCategory")) + res.setSubCategory(parseCodeableConcept(json.getAsJsonObject("subCategory"))); + if (json.has("excluded")) + res.setExcludedElement(parseBoolean(json.get("excluded").getAsBoolean())); + if (json.has("_excluded")) + parseElementProperties(json.getAsJsonObject("_excluded"), res.getExcludedElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("network")) + res.setNetwork(parseCodeableConcept(json.getAsJsonObject("network"))); + if (json.has("unit")) + res.setUnit(parseCodeableConcept(json.getAsJsonObject("unit"))); + if (json.has("term")) + res.setTerm(parseCodeableConcept(json.getAsJsonObject("term"))); + if (json.has("financial")) { + JsonArray array = json.getAsJsonArray("financial"); + for (int i = 0; i < array.size(); i++) { + res.getFinancial().add(parseEligibilityResponseBenefitComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected EligibilityResponse.BenefitComponent parseEligibilityResponseBenefitComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { + EligibilityResponse.BenefitComponent res = new EligibilityResponse.BenefitComponent(); + parseEligibilityResponseBenefitComponentProperties(json, owner, res); + return res; + } + + protected void parseEligibilityResponseBenefitComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.BenefitComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + Type allowed = parseType("allowed", json); + if (allowed != null) + res.setAllowed(allowed); + Type used = parseType("used", json); + if (used != null) + res.setUsed(used); + } + + protected EligibilityResponse.ErrorsComponent parseEligibilityResponseErrorsComponent(JsonObject json, EligibilityResponse owner) throws IOException, FHIRFormatError { + EligibilityResponse.ErrorsComponent res = new EligibilityResponse.ErrorsComponent(); + parseEligibilityResponseErrorsComponentProperties(json, owner, res); + return res; + } + + protected void parseEligibilityResponseErrorsComponentProperties(JsonObject json, EligibilityResponse owner, EligibilityResponse.ErrorsComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + } + + protected Encounter parseEncounter(JsonObject json) throws IOException, FHIRFormatError { + Encounter res = new Encounter(); + parseEncounterProperties(json, res); + return res; + } + + protected void parseEncounterProperties(JsonObject json, Encounter res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("statusHistory")) { + JsonArray array = json.getAsJsonArray("statusHistory"); + for (int i = 0; i < array.size(); i++) { + res.getStatusHistory().add(parseEncounterStatusHistoryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("class")) + res.setClass_(parseCoding(json.getAsJsonObject("class"))); + if (json.has("classHistory")) { + JsonArray array = json.getAsJsonArray("classHistory"); + for (int i = 0; i < array.size(); i++) { + res.getClassHistory().add(parseEncounterClassHistoryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priority")) + res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("episodeOfCare")) { + JsonArray array = json.getAsJsonArray("episodeOfCare"); + for (int i = 0; i < array.size(); i++) { + res.getEpisodeOfCare().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("incomingReferral")) { + JsonArray array = json.getAsJsonArray("incomingReferral"); + for (int i = 0; i < array.size(); i++) { + res.getIncomingReferral().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseEncounterEncounterParticipantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("appointment")) + res.setAppointment(parseReference(json.getAsJsonObject("appointment"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("length")) + res.setLength(parseDuration(json.getAsJsonObject("length"))); + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("diagnosis")) { + JsonArray array = json.getAsJsonArray("diagnosis"); + for (int i = 0; i < array.size(); i++) { + res.getDiagnosis().add(parseEncounterDiagnosisComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("account")) { + JsonArray array = json.getAsJsonArray("account"); + for (int i = 0; i < array.size(); i++) { + res.getAccount().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("hospitalization")) + res.setHospitalization(parseEncounterEncounterHospitalizationComponent(json.getAsJsonObject("hospitalization"), res)); + if (json.has("location")) { + JsonArray array = json.getAsJsonArray("location"); + for (int i = 0; i < array.size(); i++) { + res.getLocation().add(parseEncounterEncounterLocationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("serviceProvider")) + res.setServiceProvider(parseReference(json.getAsJsonObject("serviceProvider"))); + if (json.has("partOf")) + res.setPartOf(parseReference(json.getAsJsonObject("partOf"))); + } + + protected Encounter.StatusHistoryComponent parseEncounterStatusHistoryComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { + Encounter.StatusHistoryComponent res = new Encounter.StatusHistoryComponent(); + parseEncounterStatusHistoryComponentProperties(json, owner, res); + return res; + } + + protected void parseEncounterStatusHistoryComponentProperties(JsonObject json, Encounter owner, Encounter.StatusHistoryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected Encounter.ClassHistoryComponent parseEncounterClassHistoryComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { + Encounter.ClassHistoryComponent res = new Encounter.ClassHistoryComponent(); + parseEncounterClassHistoryComponentProperties(json, owner, res); + return res; + } + + protected void parseEncounterClassHistoryComponentProperties(JsonObject json, Encounter owner, Encounter.ClassHistoryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("class")) + res.setClass_(parseCoding(json.getAsJsonObject("class"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected Encounter.EncounterParticipantComponent parseEncounterEncounterParticipantComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { + Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent(); + parseEncounterEncounterParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parseEncounterEncounterParticipantComponentProperties(JsonObject json, Encounter owner, Encounter.EncounterParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("individual")) + res.setIndividual(parseReference(json.getAsJsonObject("individual"))); + } + + protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { + Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent(); + parseEncounterDiagnosisComponentProperties(json, owner, res); + return res; + } + + protected void parseEncounterDiagnosisComponentProperties(JsonObject json, Encounter owner, Encounter.DiagnosisComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("condition")) + res.setCondition(parseReference(json.getAsJsonObject("condition"))); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("rank")) + res.setRankElement(parsePositiveInt(json.get("rank").getAsString())); + if (json.has("_rank")) + parseElementProperties(json.getAsJsonObject("_rank"), res.getRankElement()); + } + + protected Encounter.EncounterHospitalizationComponent parseEncounterEncounterHospitalizationComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { + Encounter.EncounterHospitalizationComponent res = new Encounter.EncounterHospitalizationComponent(); + parseEncounterEncounterHospitalizationComponentProperties(json, owner, res); + return res; + } + + protected void parseEncounterEncounterHospitalizationComponentProperties(JsonObject json, Encounter owner, Encounter.EncounterHospitalizationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("preAdmissionIdentifier")) + res.setPreAdmissionIdentifier(parseIdentifier(json.getAsJsonObject("preAdmissionIdentifier"))); + if (json.has("origin")) + res.setOrigin(parseReference(json.getAsJsonObject("origin"))); + if (json.has("admitSource")) + res.setAdmitSource(parseCodeableConcept(json.getAsJsonObject("admitSource"))); + if (json.has("reAdmission")) + res.setReAdmission(parseCodeableConcept(json.getAsJsonObject("reAdmission"))); + if (json.has("dietPreference")) { + JsonArray array = json.getAsJsonArray("dietPreference"); + for (int i = 0; i < array.size(); i++) { + res.getDietPreference().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialCourtesy")) { + JsonArray array = json.getAsJsonArray("specialCourtesy"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialCourtesy().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialArrangement")) { + JsonArray array = json.getAsJsonArray("specialArrangement"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialArrangement().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("destination")) + res.setDestination(parseReference(json.getAsJsonObject("destination"))); + if (json.has("dischargeDisposition")) + res.setDischargeDisposition(parseCodeableConcept(json.getAsJsonObject("dischargeDisposition"))); + } + + protected Encounter.EncounterLocationComponent parseEncounterEncounterLocationComponent(JsonObject json, Encounter owner) throws IOException, FHIRFormatError { + Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent(); + parseEncounterEncounterLocationComponentProperties(json, owner, res); + return res; + } + + protected void parseEncounterEncounterLocationComponentProperties(JsonObject json, Encounter owner, Encounter.EncounterLocationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Encounter.EncounterLocationStatus.NULL, new Encounter.EncounterLocationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected Endpoint parseEndpoint(JsonObject json) throws IOException, FHIRFormatError { + Endpoint res = new Endpoint(); + parseEndpointProperties(json, res); + return res; + } + + protected void parseEndpointProperties(JsonObject json, Endpoint res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Endpoint.EndpointStatus.NULL, new Endpoint.EndpointStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("connectionType")) + res.setConnectionType(parseCoding(json.getAsJsonObject("connectionType"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("managingOrganization")) + res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("payloadType")) { + JsonArray array = json.getAsJsonArray("payloadType"); + for (int i = 0; i < array.size(); i++) { + res.getPayloadType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("payloadMimeType")) { + JsonArray array = json.getAsJsonArray("payloadMimeType"); + for (int i = 0; i < array.size(); i++) { + res.getPayloadMimeType().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_payloadMimeType")) { + JsonArray array = json.getAsJsonArray("_payloadMimeType"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPayloadMimeType().size()) + res.getPayloadMimeType().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPayloadMimeType().get(i)); + } + }; + if (json.has("address")) + res.setAddressElement(parseUri(json.get("address").getAsString())); + if (json.has("_address")) + parseElementProperties(json.getAsJsonObject("_address"), res.getAddressElement()); + if (json.has("header")) { + JsonArray array = json.getAsJsonArray("header"); + for (int i = 0; i < array.size(); i++) { + res.getHeader().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_header")) { + JsonArray array = json.getAsJsonArray("_header"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getHeader().size()) + res.getHeader().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getHeader().get(i)); + } + }; + } + + protected EnrollmentRequest parseEnrollmentRequest(JsonObject json) throws IOException, FHIRFormatError { + EnrollmentRequest res = new EnrollmentRequest(); + parseEnrollmentRequestProperties(json, res); + return res; + } + + protected void parseEnrollmentRequestProperties(JsonObject json, EnrollmentRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EnrollmentRequest.EnrollmentRequestStatus.NULL, new EnrollmentRequest.EnrollmentRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("insurer")) + res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("candidate")) + res.setCandidate(parseReference(json.getAsJsonObject("candidate"))); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + } + + protected EnrollmentResponse parseEnrollmentResponse(JsonObject json) throws IOException, FHIRFormatError { + EnrollmentResponse res = new EnrollmentResponse(); + parseEnrollmentResponseProperties(json, res); + return res; + } + + protected void parseEnrollmentResponseProperties(JsonObject json, EnrollmentResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EnrollmentResponse.EnrollmentResponseStatus.NULL, new EnrollmentResponse.EnrollmentResponseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("disposition")) + res.setDispositionElement(parseString(json.get("disposition").getAsString())); + if (json.has("_disposition")) + parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("requestProvider")) + res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); + if (json.has("requestOrganization")) + res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); + } + + protected EpisodeOfCare parseEpisodeOfCare(JsonObject json) throws IOException, FHIRFormatError { + EpisodeOfCare res = new EpisodeOfCare(); + parseEpisodeOfCareProperties(json, res); + return res; + } + + protected void parseEpisodeOfCareProperties(JsonObject json, EpisodeOfCare res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("statusHistory")) { + JsonArray array = json.getAsJsonArray("statusHistory"); + for (int i = 0; i < array.size(); i++) { + res.getStatusHistory().add(parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("diagnosis")) { + JsonArray array = json.getAsJsonArray("diagnosis"); + for (int i = 0; i < array.size(); i++) { + res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("managingOrganization")) + res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("referralRequest")) { + JsonArray array = json.getAsJsonArray("referralRequest"); + for (int i = 0; i < array.size(); i++) { + res.getReferralRequest().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("careManager")) + res.setCareManager(parseReference(json.getAsJsonObject("careManager"))); + if (json.has("team")) { + JsonArray array = json.getAsJsonArray("team"); + for (int i = 0; i < array.size(); i++) { + res.getTeam().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("account")) { + JsonArray array = json.getAsJsonArray("account"); + for (int i = 0; i < array.size(); i++) { + res.getAccount().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(JsonObject json, EpisodeOfCare owner) throws IOException, FHIRFormatError { + EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); + parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentProperties(json, owner, res); + return res; + } + + protected void parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentProperties(JsonObject json, EpisodeOfCare owner, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected EpisodeOfCare.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(JsonObject json, EpisodeOfCare owner) throws IOException, FHIRFormatError { + EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent(); + parseEpisodeOfCareDiagnosisComponentProperties(json, owner, res); + return res; + } + + protected void parseEpisodeOfCareDiagnosisComponentProperties(JsonObject json, EpisodeOfCare owner, EpisodeOfCare.DiagnosisComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("condition")) + res.setCondition(parseReference(json.getAsJsonObject("condition"))); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("rank")) + res.setRankElement(parsePositiveInt(json.get("rank").getAsString())); + if (json.has("_rank")) + parseElementProperties(json.getAsJsonObject("_rank"), res.getRankElement()); + } + + protected EventDefinition parseEventDefinition(JsonObject json) throws IOException, FHIRFormatError { + EventDefinition res = new EventDefinition(); + parseEventDefinitionProperties(json, res); + return res; + } + + protected void parseEventDefinitionProperties(JsonObject json, EventDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contributor")) { + JsonArray array = json.getAsJsonArray("contributor"); + for (int i = 0; i < array.size(); i++) { + res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("trigger")) + res.setTrigger(parseTriggerDefinition(json.getAsJsonObject("trigger"))); + } + + protected ExampleScenario parseExampleScenario(JsonObject json) throws IOException, FHIRFormatError { + ExampleScenario res = new ExampleScenario(); + parseExampleScenarioProperties(json, res); + return res; + } + + protected void parseExampleScenarioProperties(JsonObject json, ExampleScenario res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("actor")) { + JsonArray array = json.getAsJsonArray("actor"); + for (int i = 0; i < array.size(); i++) { + res.getActor().add(parseExampleScenarioExampleScenarioActorComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("instance")) { + JsonArray array = json.getAsJsonArray("instance"); + for (int i = 0; i < array.size(); i++) { + res.getInstance().add(parseExampleScenarioExampleScenarioInstanceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("process")) + res.setProcess(parseExampleScenarioExampleScenarioProcessComponent(json.getAsJsonObject("process"), res)); + if (json.has("workflow")) { + JsonArray array = json.getAsJsonArray("workflow"); + for (int i = 0; i < array.size(); i++) { + res.getWorkflow().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ExampleScenario.ExampleScenarioActorComponent parseExampleScenarioExampleScenarioActorComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioActorComponent res = new ExampleScenario.ExampleScenarioActorComponent(); + parseExampleScenarioExampleScenarioActorComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioActorComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioActorComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("actorId")) + res.setActorIdElement(parseString(json.get("actorId").getAsString())); + if (json.has("_actorId")) + parseElementProperties(json.getAsJsonObject("_actorId"), res.getActorIdElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ExampleScenario.ExampleScenarioActorType.NULL, new ExampleScenario.ExampleScenarioActorTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + } + + protected ExampleScenario.ExampleScenarioInstanceComponent parseExampleScenarioExampleScenarioInstanceComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceComponent(); + parseExampleScenarioExampleScenarioInstanceComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioInstanceComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("resourceId")) + res.setResourceIdElement(parseString(json.get("resourceId").getAsString())); + if (json.has("_resourceId")) + parseElementProperties(json.getAsJsonObject("_resourceId"), res.getResourceIdElement()); + if (json.has("resourceType")) + res.setResourceTypeElement(parseEnumeration(json.get("resourceType").getAsString(), ExampleScenario.FHIRResourceType.NULL, new ExampleScenario.FHIRResourceTypeEnumFactory())); + if (json.has("_resourceType")) + parseElementProperties(json.getAsJsonObject("_resourceType"), res.getResourceTypeElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("version")) { + JsonArray array = json.getAsJsonArray("version"); + for (int i = 0; i < array.size(); i++) { + res.getVersion().add(parseExampleScenarioExampleScenarioInstanceVersionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("containedInstance")) { + JsonArray array = json.getAsJsonArray("containedInstance"); + for (int i = 0; i < array.size(); i++) { + res.getContainedInstance().add(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExampleScenario.ExampleScenarioInstanceVersionComponent parseExampleScenarioExampleScenarioInstanceVersionComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioInstanceVersionComponent res = new ExampleScenario.ExampleScenarioInstanceVersionComponent(); + parseExampleScenarioExampleScenarioInstanceVersionComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioInstanceVersionComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceVersionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("versionId")) + res.setVersionIdElement(parseString(json.get("versionId").getAsString())); + if (json.has("_versionId")) + parseElementProperties(json.getAsJsonObject("_versionId"), res.getVersionIdElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + } + + protected ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent(); + parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("resourceId")) + res.setResourceIdElement(parseString(json.get("resourceId").getAsString())); + if (json.has("_resourceId")) + parseElementProperties(json.getAsJsonObject("_resourceId"), res.getResourceIdElement()); + if (json.has("versionId")) + res.setVersionIdElement(parseString(json.get("versionId").getAsString())); + if (json.has("_versionId")) + parseElementProperties(json.getAsJsonObject("_versionId"), res.getVersionIdElement()); + } + + protected ExampleScenario.ExampleScenarioProcessComponent parseExampleScenarioExampleScenarioProcessComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessComponent res = new ExampleScenario.ExampleScenarioProcessComponent(); + parseExampleScenarioExampleScenarioProcessComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioProcessComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("preConditions")) + res.setPreConditionsElement(parseMarkdown(json.get("preConditions").getAsString())); + if (json.has("_preConditions")) + parseElementProperties(json.getAsJsonObject("_preConditions"), res.getPreConditionsElement()); + if (json.has("postConditions")) + res.setPostConditionsElement(parseMarkdown(json.get("postConditions").getAsString())); + if (json.has("_postConditions")) + parseElementProperties(json.getAsJsonObject("_postConditions"), res.getPostConditionsElement()); + if (json.has("step")) { + JsonArray array = json.getAsJsonArray("step"); + for (int i = 0; i < array.size(); i++) { + res.getStep().add(parseExampleScenarioExampleScenarioProcessStepComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExampleScenario.ExampleScenarioProcessStepComponent parseExampleScenarioExampleScenarioProcessStepComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepComponent res = new ExampleScenario.ExampleScenarioProcessStepComponent(); + parseExampleScenarioExampleScenarioProcessStepComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioProcessStepComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("process")) { + JsonArray array = json.getAsJsonArray("process"); + for (int i = 0; i < array.size(); i++) { + res.getProcess().add(parseExampleScenarioExampleScenarioProcessComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("pause")) + res.setPauseElement(parseBoolean(json.get("pause").getAsBoolean())); + if (json.has("_pause")) + parseElementProperties(json.getAsJsonObject("_pause"), res.getPauseElement()); + if (json.has("operation")) + res.setOperation(parseExampleScenarioExampleScenarioProcessStepOperationComponent(json.getAsJsonObject("operation"), owner)); + if (json.has("alternative")) + res.setAlternative(parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(json.getAsJsonObject("alternative"), owner)); + } + + protected ExampleScenario.ExampleScenarioProcessStepOperationComponent parseExampleScenarioExampleScenarioProcessStepOperationComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepOperationComponent res = new ExampleScenario.ExampleScenarioProcessStepOperationComponent(); + parseExampleScenarioExampleScenarioProcessStepOperationComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioProcessStepOperationComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepOperationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("number")) + res.setNumberElement(parseString(json.get("number").getAsString())); + if (json.has("_number")) + parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); + if (json.has("type")) + res.setTypeElement(parseString(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("initiator")) + res.setInitiatorElement(parseString(json.get("initiator").getAsString())); + if (json.has("_initiator")) + parseElementProperties(json.getAsJsonObject("_initiator"), res.getInitiatorElement()); + if (json.has("receiver")) + res.setReceiverElement(parseString(json.get("receiver").getAsString())); + if (json.has("_receiver")) + parseElementProperties(json.getAsJsonObject("_receiver"), res.getReceiverElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("initiatorActive")) + res.setInitiatorActiveElement(parseBoolean(json.get("initiatorActive").getAsBoolean())); + if (json.has("_initiatorActive")) + parseElementProperties(json.getAsJsonObject("_initiatorActive"), res.getInitiatorActiveElement()); + if (json.has("receiverActive")) + res.setReceiverActiveElement(parseBoolean(json.get("receiverActive").getAsBoolean())); + if (json.has("_receiverActive")) + parseElementProperties(json.getAsJsonObject("_receiverActive"), res.getReceiverActiveElement()); + if (json.has("request")) + res.setRequest(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(json.getAsJsonObject("request"), owner)); + if (json.has("response")) + res.setResponse(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(json.getAsJsonObject("response"), owner)); + } + + protected ExampleScenario.ExampleScenarioProcessStepAlternativeComponent parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeComponent(); + parseExampleScenarioExampleScenarioProcessStepAlternativeComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioProcessStepAlternativeComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("option")) { + JsonArray array = json.getAsJsonArray("option"); + for (int i = 0; i < array.size(); i++) { + res.getOption().add(parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(JsonObject json, ExampleScenario owner) throws IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent(); + parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentProperties(json, owner, res); + return res; + } + + protected void parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentProperties(JsonObject json, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("step")) { + JsonArray array = json.getAsJsonArray("step"); + for (int i = 0; i < array.size(); i++) { + res.getStep().add(parseExampleScenarioExampleScenarioProcessStepComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("pause")) { + JsonArray array = json.getAsJsonArray("pause"); + for (int i = 0; i < array.size(); i++) { + res.getPause().add(parseBoolean(array.get(i).getAsBoolean())); + } + }; + if (json.has("_pause")) { + JsonArray array = json.getAsJsonArray("_pause"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPause().size()) + res.getPause().add(parseBoolean(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPause().get(i)); + } + }; + } + + protected ExpansionProfile parseExpansionProfile(JsonObject json) throws IOException, FHIRFormatError { + ExpansionProfile res = new ExpansionProfile(); + parseExpansionProfileProperties(json, res); + return res; + } + + protected void parseExpansionProfileProperties(JsonObject json, ExpansionProfile res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("fixedVersion")) { + JsonArray array = json.getAsJsonArray("fixedVersion"); + for (int i = 0; i < array.size(); i++) { + res.getFixedVersion().add(parseExpansionProfileExpansionProfileFixedVersionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("excludedSystem")) + res.setExcludedSystem(parseExpansionProfileExpansionProfileExcludedSystemComponent(json.getAsJsonObject("excludedSystem"), res)); + if (json.has("includeDesignations")) + res.setIncludeDesignationsElement(parseBoolean(json.get("includeDesignations").getAsBoolean())); + if (json.has("_includeDesignations")) + parseElementProperties(json.getAsJsonObject("_includeDesignations"), res.getIncludeDesignationsElement()); + if (json.has("designation")) + res.setDesignation(parseExpansionProfileExpansionProfileDesignationComponent(json.getAsJsonObject("designation"), res)); + if (json.has("includeDefinition")) + res.setIncludeDefinitionElement(parseBoolean(json.get("includeDefinition").getAsBoolean())); + if (json.has("_includeDefinition")) + parseElementProperties(json.getAsJsonObject("_includeDefinition"), res.getIncludeDefinitionElement()); + if (json.has("activeOnly")) + res.setActiveOnlyElement(parseBoolean(json.get("activeOnly").getAsBoolean())); + if (json.has("_activeOnly")) + parseElementProperties(json.getAsJsonObject("_activeOnly"), res.getActiveOnlyElement()); + if (json.has("excludeNested")) + res.setExcludeNestedElement(parseBoolean(json.get("excludeNested").getAsBoolean())); + if (json.has("_excludeNested")) + parseElementProperties(json.getAsJsonObject("_excludeNested"), res.getExcludeNestedElement()); + if (json.has("excludeNotForUI")) + res.setExcludeNotForUIElement(parseBoolean(json.get("excludeNotForUI").getAsBoolean())); + if (json.has("_excludeNotForUI")) + parseElementProperties(json.getAsJsonObject("_excludeNotForUI"), res.getExcludeNotForUIElement()); + if (json.has("excludePostCoordinated")) + res.setExcludePostCoordinatedElement(parseBoolean(json.get("excludePostCoordinated").getAsBoolean())); + if (json.has("_excludePostCoordinated")) + parseElementProperties(json.getAsJsonObject("_excludePostCoordinated"), res.getExcludePostCoordinatedElement()); + if (json.has("displayLanguage")) + res.setDisplayLanguageElement(parseCode(json.get("displayLanguage").getAsString())); + if (json.has("_displayLanguage")) + parseElementProperties(json.getAsJsonObject("_displayLanguage"), res.getDisplayLanguageElement()); + if (json.has("limitedExpansion")) + res.setLimitedExpansionElement(parseBoolean(json.get("limitedExpansion").getAsBoolean())); + if (json.has("_limitedExpansion")) + parseElementProperties(json.getAsJsonObject("_limitedExpansion"), res.getLimitedExpansionElement()); + } + + protected ExpansionProfile.ExpansionProfileFixedVersionComponent parseExpansionProfileExpansionProfileFixedVersionComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.ExpansionProfileFixedVersionComponent res = new ExpansionProfile.ExpansionProfileFixedVersionComponent(); + parseExpansionProfileExpansionProfileFixedVersionComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileExpansionProfileFixedVersionComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.ExpansionProfileFixedVersionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ExpansionProfile.SystemVersionProcessingMode.NULL, new ExpansionProfile.SystemVersionProcessingModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + } + + protected ExpansionProfile.ExpansionProfileExcludedSystemComponent parseExpansionProfileExpansionProfileExcludedSystemComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.ExpansionProfileExcludedSystemComponent res = new ExpansionProfile.ExpansionProfileExcludedSystemComponent(); + parseExpansionProfileExpansionProfileExcludedSystemComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileExpansionProfileExcludedSystemComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.ExpansionProfileExcludedSystemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + } + + protected ExpansionProfile.ExpansionProfileDesignationComponent parseExpansionProfileExpansionProfileDesignationComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.ExpansionProfileDesignationComponent res = new ExpansionProfile.ExpansionProfileDesignationComponent(); + parseExpansionProfileExpansionProfileDesignationComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileExpansionProfileDesignationComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.ExpansionProfileDesignationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("include")) + res.setInclude(parseExpansionProfileDesignationIncludeComponent(json.getAsJsonObject("include"), owner)); + if (json.has("exclude")) + res.setExclude(parseExpansionProfileDesignationExcludeComponent(json.getAsJsonObject("exclude"), owner)); + } + + protected ExpansionProfile.DesignationIncludeComponent parseExpansionProfileDesignationIncludeComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.DesignationIncludeComponent res = new ExpansionProfile.DesignationIncludeComponent(); + parseExpansionProfileDesignationIncludeComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileDesignationIncludeComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationIncludeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("designation")) { + JsonArray array = json.getAsJsonArray("designation"); + for (int i = 0; i < array.size(); i++) { + res.getDesignation().add(parseExpansionProfileDesignationIncludeDesignationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExpansionProfile.DesignationIncludeDesignationComponent parseExpansionProfileDesignationIncludeDesignationComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.DesignationIncludeDesignationComponent res = new ExpansionProfile.DesignationIncludeDesignationComponent(); + parseExpansionProfileDesignationIncludeDesignationComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileDesignationIncludeDesignationComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationIncludeDesignationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("use")) + res.setUse(parseCoding(json.getAsJsonObject("use"))); + } + + protected ExpansionProfile.DesignationExcludeComponent parseExpansionProfileDesignationExcludeComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.DesignationExcludeComponent res = new ExpansionProfile.DesignationExcludeComponent(); + parseExpansionProfileDesignationExcludeComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileDesignationExcludeComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationExcludeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("designation")) { + JsonArray array = json.getAsJsonArray("designation"); + for (int i = 0; i < array.size(); i++) { + res.getDesignation().add(parseExpansionProfileDesignationExcludeDesignationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExpansionProfile.DesignationExcludeDesignationComponent parseExpansionProfileDesignationExcludeDesignationComponent(JsonObject json, ExpansionProfile owner) throws IOException, FHIRFormatError { + ExpansionProfile.DesignationExcludeDesignationComponent res = new ExpansionProfile.DesignationExcludeDesignationComponent(); + parseExpansionProfileDesignationExcludeDesignationComponentProperties(json, owner, res); + return res; + } + + protected void parseExpansionProfileDesignationExcludeDesignationComponentProperties(JsonObject json, ExpansionProfile owner, ExpansionProfile.DesignationExcludeDesignationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("use")) + res.setUse(parseCoding(json.getAsJsonObject("use"))); + } + + protected ExplanationOfBenefit parseExplanationOfBenefit(JsonObject json) throws IOException, FHIRFormatError { + ExplanationOfBenefit res = new ExplanationOfBenefit(); + parseExplanationOfBenefitProperties(json, res); + return res; + } + + protected void parseExplanationOfBenefitProperties(JsonObject json, ExplanationOfBenefit res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL, new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("subType")) { + JsonArray array = json.getAsJsonArray("subType"); + for (int i = 0; i < array.size(); i++) { + res.getSubType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("billablePeriod")) + res.setBillablePeriod(parsePeriod(json.getAsJsonObject("billablePeriod"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("enterer")) + res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); + if (json.has("insurer")) + res.setInsurer(parseReference(json.getAsJsonObject("insurer"))); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("referral")) + res.setReferral(parseReference(json.getAsJsonObject("referral"))); + if (json.has("facility")) + res.setFacility(parseReference(json.getAsJsonObject("facility"))); + if (json.has("claim")) + res.setClaim(parseReference(json.getAsJsonObject("claim"))); + if (json.has("claimResponse")) + res.setClaimResponse(parseReference(json.getAsJsonObject("claimResponse"))); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), ExplanationOfBenefit.RemittanceOutcome.NULL, new ExplanationOfBenefit.RemittanceOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("disposition")) + res.setDispositionElement(parseString(json.get("disposition").getAsString())); + if (json.has("_disposition")) + parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); + if (json.has("related")) { + JsonArray array = json.getAsJsonArray("related"); + for (int i = 0; i < array.size(); i++) { + res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("prescription")) + res.setPrescription(parseReference(json.getAsJsonObject("prescription"))); + if (json.has("originalPrescription")) + res.setOriginalPrescription(parseReference(json.getAsJsonObject("originalPrescription"))); + if (json.has("payee")) + res.setPayee(parseExplanationOfBenefitPayeeComponent(json.getAsJsonObject("payee"), res)); + if (json.has("information")) { + JsonArray array = json.getAsJsonArray("information"); + for (int i = 0; i < array.size(); i++) { + res.getInformation().add(parseExplanationOfBenefitSupportingInformationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("careTeam")) { + JsonArray array = json.getAsJsonArray("careTeam"); + for (int i = 0; i < array.size(); i++) { + res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("diagnosis")) { + JsonArray array = json.getAsJsonArray("diagnosis"); + for (int i = 0; i < array.size(); i++) { + res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("procedure")) { + JsonArray array = json.getAsJsonArray("procedure"); + for (int i = 0; i < array.size(); i++) { + res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("precedence")) + res.setPrecedenceElement(parsePositiveInt(json.get("precedence").getAsString())); + if (json.has("_precedence")) + parseElementProperties(json.getAsJsonObject("_precedence"), res.getPrecedenceElement()); + if (json.has("insurance")) + res.setInsurance(parseExplanationOfBenefitInsuranceComponent(json.getAsJsonObject("insurance"), res)); + if (json.has("accident")) + res.setAccident(parseExplanationOfBenefitAccidentComponent(json.getAsJsonObject("accident"), res)); + if (json.has("employmentImpacted")) + res.setEmploymentImpacted(parsePeriod(json.getAsJsonObject("employmentImpacted"))); + if (json.has("hospitalization")) + res.setHospitalization(parsePeriod(json.getAsJsonObject("hospitalization"))); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseExplanationOfBenefitItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("addItem")) { + JsonArray array = json.getAsJsonArray("addItem"); + for (int i = 0; i < array.size(); i++) { + res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("totalCost")) + res.setTotalCost(parseMoney(json.getAsJsonObject("totalCost"))); + if (json.has("unallocDeductable")) + res.setUnallocDeductable(parseMoney(json.getAsJsonObject("unallocDeductable"))); + if (json.has("totalBenefit")) + res.setTotalBenefit(parseMoney(json.getAsJsonObject("totalBenefit"))); + if (json.has("payment")) + res.setPayment(parseExplanationOfBenefitPaymentComponent(json.getAsJsonObject("payment"), res)); + if (json.has("form")) + res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); + if (json.has("processNote")) { + JsonArray array = json.getAsJsonArray("processNote"); + for (int i = 0; i < array.size(); i++) { + res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("benefitBalance")) { + JsonArray array = json.getAsJsonArray("benefitBalance"); + for (int i = 0; i < array.size(); i++) { + res.getBenefitBalance().add(parseExplanationOfBenefitBenefitBalanceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent(); + parseExplanationOfBenefitRelatedClaimComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitRelatedClaimComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.RelatedClaimComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("claim")) + res.setClaim(parseReference(json.getAsJsonObject("claim"))); + if (json.has("relationship")) + res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); + if (json.has("reference")) + res.setReference(parseIdentifier(json.getAsJsonObject("reference"))); + } + + protected ExplanationOfBenefit.PayeeComponent parseExplanationOfBenefitPayeeComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent(); + parseExplanationOfBenefitPayeeComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitPayeeComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.PayeeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("resource")) + res.setResource(parseCoding(json.getAsJsonObject("resource"))); + if (json.has("party")) + res.setParty(parseReference(json.getAsJsonObject("party"))); + } + + protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent(); + parseExplanationOfBenefitSupportingInformationComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitSupportingInformationComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.SupportingInformationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("reason")) + res.setReason(parseCoding(json.getAsJsonObject("reason"))); + } + + protected ExplanationOfBenefit.CareTeamComponent parseExplanationOfBenefitCareTeamComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent(); + parseExplanationOfBenefitCareTeamComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitCareTeamComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.CareTeamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("responsible")) + res.setResponsibleElement(parseBoolean(json.get("responsible").getAsBoolean())); + if (json.has("_responsible")) + parseElementProperties(json.getAsJsonObject("_responsible"), res.getResponsibleElement()); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("qualification")) + res.setQualification(parseCodeableConcept(json.getAsJsonObject("qualification"))); + } + + protected ExplanationOfBenefit.DiagnosisComponent parseExplanationOfBenefitDiagnosisComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent(); + parseExplanationOfBenefitDiagnosisComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitDiagnosisComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.DiagnosisComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + Type diagnosis = parseType("diagnosis", json); + if (diagnosis != null) + res.setDiagnosis(diagnosis); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("packageCode")) + res.setPackageCode(parseCodeableConcept(json.getAsJsonObject("packageCode"))); + } + + protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent(); + parseExplanationOfBenefitProcedureComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitProcedureComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.ProcedureComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + Type procedure = parseType("procedure", json); + if (procedure != null) + res.setProcedure(procedure); + } + + protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent(); + parseExplanationOfBenefitInsuranceComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitInsuranceComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.InsuranceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("coverage")) + res.setCoverage(parseReference(json.getAsJsonObject("coverage"))); + if (json.has("preAuthRef")) { + JsonArray array = json.getAsJsonArray("preAuthRef"); + for (int i = 0; i < array.size(); i++) { + res.getPreAuthRef().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_preAuthRef")) { + JsonArray array = json.getAsJsonArray("_preAuthRef"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPreAuthRef().size()) + res.getPreAuthRef().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPreAuthRef().get(i)); + } + }; + } + + protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent(); + parseExplanationOfBenefitAccidentComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitAccidentComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.AccidentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("date")) + res.setDateElement(parseDate(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + Type location = parseType("location", json); + if (location != null) + res.setLocation(location); + } + + protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent(); + parseExplanationOfBenefitItemComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitItemComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.ItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("careTeamLinkId")) { + JsonArray array = json.getAsJsonArray("careTeamLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getCareTeamLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_careTeamLinkId")) { + JsonArray array = json.getAsJsonArray("_careTeamLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getCareTeamLinkId().size()) + res.getCareTeamLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getCareTeamLinkId().get(i)); + } + }; + if (json.has("diagnosisLinkId")) { + JsonArray array = json.getAsJsonArray("diagnosisLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getDiagnosisLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_diagnosisLinkId")) { + JsonArray array = json.getAsJsonArray("_diagnosisLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDiagnosisLinkId().size()) + res.getDiagnosisLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDiagnosisLinkId().get(i)); + } + }; + if (json.has("procedureLinkId")) { + JsonArray array = json.getAsJsonArray("procedureLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getProcedureLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_procedureLinkId")) { + JsonArray array = json.getAsJsonArray("_procedureLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getProcedureLinkId().size()) + res.getProcedureLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getProcedureLinkId().get(i)); + } + }; + if (json.has("informationLinkId")) { + JsonArray array = json.getAsJsonArray("informationLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getInformationLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_informationLinkId")) { + JsonArray array = json.getAsJsonArray("_informationLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getInformationLinkId().size()) + res.getInformationLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getInformationLinkId().get(i)); + } + }; + if (json.has("revenue")) + res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("programCode")) { + JsonArray array = json.getAsJsonArray("programCode"); + for (int i = 0; i < array.size(); i++) { + res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + Type serviced = parseType("serviced", json); + if (serviced != null) + res.setServiced(serviced); + Type location = parseType("location", json); + if (location != null) + res.setLocation(location); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + if (json.has("udi")) { + JsonArray array = json.getAsJsonArray("udi"); + for (int i = 0; i < array.size(); i++) { + res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) + res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); + if (json.has("subSite")) { + JsonArray array = json.getAsJsonArray("subSite"); + for (int i = 0; i < array.size(); i++) { + res.getSubSite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("encounter")) { + JsonArray array = json.getAsJsonArray("encounter"); + for (int i = 0; i < array.size(); i++) { + res.getEncounter().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parseExplanationOfBenefitDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent(); + parseExplanationOfBenefitAdjudicationComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitAdjudicationComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.AdjudicationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("reason")) + res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); + if (json.has("amount")) + res.setAmount(parseMoney(json.getAsJsonObject("amount"))); + if (json.has("value")) + res.setValueElement(parseDecimal(json.get("value").getAsBigDecimal())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent(); + parseExplanationOfBenefitDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitDetailComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.DetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("revenue")) + res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("programCode")) { + JsonArray array = json.getAsJsonArray("programCode"); + for (int i = 0; i < array.size(); i++) { + res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + if (json.has("udi")) { + JsonArray array = json.getAsJsonArray("udi"); + for (int i = 0; i < array.size(); i++) { + res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("subDetail")) { + JsonArray array = json.getAsJsonArray("subDetail"); + for (int i = 0; i < array.size(); i++) { + res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent(); + parseExplanationOfBenefitSubDetailComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitSubDetailComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.SubDetailComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequence")) + res.setSequenceElement(parsePositiveInt(json.get("sequence").getAsString())); + if (json.has("_sequence")) + parseElementProperties(json.getAsJsonObject("_sequence"), res.getSequenceElement()); + if (json.has("revenue")) + res.setRevenue(parseCodeableConcept(json.getAsJsonObject("revenue"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("programCode")) { + JsonArray array = json.getAsJsonArray("programCode"); + for (int i = 0; i < array.size(); i++) { + res.getProgramCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("unitPrice")) + res.setUnitPrice(parseMoney(json.getAsJsonObject("unitPrice"))); + if (json.has("factor")) + res.setFactorElement(parseDecimal(json.get("factor").getAsBigDecimal())); + if (json.has("_factor")) + parseElementProperties(json.getAsJsonObject("_factor"), res.getFactorElement()); + if (json.has("net")) + res.setNet(parseMoney(json.getAsJsonObject("net"))); + if (json.has("udi")) { + JsonArray array = json.getAsJsonArray("udi"); + for (int i = 0; i < array.size(); i++) { + res.getUdi().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent(); + parseExplanationOfBenefitAddedItemComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitAddedItemComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) { + JsonArray array = json.getAsJsonArray("sequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_sequenceLinkId")) { + JsonArray array = json.getAsJsonArray("_sequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSequenceLinkId().size()) + res.getSequenceLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSequenceLinkId().get(i)); + } + }; + if (json.has("detailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("detailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getDetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_detailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("_detailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDetailSequenceLinkId().size()) + res.getDetailSequenceLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDetailSequenceLinkId().get(i)); + } + }; + if (json.has("subdetailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("subdetailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + res.getSubdetailSequenceLinkId().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_subdetailSequenceLinkId")) { + JsonArray array = json.getAsJsonArray("_subdetailSequenceLinkId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSubdetailSequenceLinkId().size()) + res.getSubdetailSequenceLinkId().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSubdetailSequenceLinkId().get(i)); + } + }; + if (json.has("service")) + res.setService(parseCodeableConcept(json.getAsJsonObject("service"))); + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("fee")) + res.setFee(parseMoney(json.getAsJsonObject("fee"))); + if (json.has("noteNumber")) { + JsonArray array = json.getAsJsonArray("noteNumber"); + for (int i = 0; i < array.size(); i++) { + res.getNoteNumber().add(parsePositiveInt(array.get(i).getAsString())); + } + }; + if (json.has("_noteNumber")) { + JsonArray array = json.getAsJsonArray("_noteNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNoteNumber().size()) + res.getNoteNumber().add(parsePositiveInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNoteNumber().get(i)); + } + }; + if (json.has("adjudication")) { + JsonArray array = json.getAsJsonArray("adjudication"); + for (int i = 0; i < array.size(); i++) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExplanationOfBenefit.PaymentComponent parseExplanationOfBenefitPaymentComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent(); + parseExplanationOfBenefitPaymentComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitPaymentComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.PaymentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("adjustment")) + res.setAdjustment(parseMoney(json.getAsJsonObject("adjustment"))); + if (json.has("adjustmentReason")) + res.setAdjustmentReason(parseCodeableConcept(json.getAsJsonObject("adjustmentReason"))); + if (json.has("date")) + res.setDateElement(parseDate(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("amount")) + res.setAmount(parseMoney(json.getAsJsonObject("amount"))); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + } + + protected ExplanationOfBenefit.NoteComponent parseExplanationOfBenefitNoteComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent(); + parseExplanationOfBenefitNoteComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitNoteComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.NoteComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("number")) + res.setNumberElement(parsePositiveInt(json.get("number").getAsString())); + if (json.has("_number")) + parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("language")) + res.setLanguage(parseCodeableConcept(json.getAsJsonObject("language"))); + } + + protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent(); + parseExplanationOfBenefitBenefitBalanceComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitBenefitBalanceComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitBalanceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("subCategory")) + res.setSubCategory(parseCodeableConcept(json.getAsJsonObject("subCategory"))); + if (json.has("excluded")) + res.setExcludedElement(parseBoolean(json.get("excluded").getAsBoolean())); + if (json.has("_excluded")) + parseElementProperties(json.getAsJsonObject("_excluded"), res.getExcludedElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("network")) + res.setNetwork(parseCodeableConcept(json.getAsJsonObject("network"))); + if (json.has("unit")) + res.setUnit(parseCodeableConcept(json.getAsJsonObject("unit"))); + if (json.has("term")) + res.setTerm(parseCodeableConcept(json.getAsJsonObject("term"))); + if (json.has("financial")) { + JsonArray array = json.getAsJsonArray("financial"); + for (int i = 0; i < array.size(); i++) { + res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(JsonObject json, ExplanationOfBenefit owner) throws IOException, FHIRFormatError { + ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent(); + parseExplanationOfBenefitBenefitComponentProperties(json, owner, res); + return res; + } + + protected void parseExplanationOfBenefitBenefitComponentProperties(JsonObject json, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + Type allowed = parseType("allowed", json); + if (allowed != null) + res.setAllowed(allowed); + Type used = parseType("used", json); + if (used != null) + res.setUsed(used); + } + + protected FamilyMemberHistory parseFamilyMemberHistory(JsonObject json) throws IOException, FHIRFormatError { + FamilyMemberHistory res = new FamilyMemberHistory(); + parseFamilyMemberHistoryProperties(json, res); + return res; + } + + protected void parseFamilyMemberHistoryProperties(JsonObject json, FamilyMemberHistory res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), FamilyMemberHistory.FamilyHistoryStatus.NULL, new FamilyMemberHistory.FamilyHistoryStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("dataAbsentReason")) + res.setDataAbsentReason(parseCodeableConcept(json.getAsJsonObject("dataAbsentReason"))); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("relationship")) + res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); + if (json.has("gender")) + res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + if (json.has("_gender")) + parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); + Type born = parseType("born", json); + if (born != null) + res.setBorn(born); + Type age = parseType("age", json); + if (age != null) + res.setAge(age); + if (json.has("estimatedAge")) + res.setEstimatedAgeElement(parseBoolean(json.get("estimatedAge").getAsBoolean())); + if (json.has("_estimatedAge")) + parseElementProperties(json.getAsJsonObject("_estimatedAge"), res.getEstimatedAgeElement()); + Type deceased = parseType("deceased", json); + if (deceased != null) + res.setDeceased(deceased); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("condition")) { + JsonArray array = json.getAsJsonArray("condition"); + for (int i = 0; i < array.size(); i++) { + res.getCondition().add(parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(JsonObject json, FamilyMemberHistory owner) throws IOException, FHIRFormatError { + FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent(); + parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentProperties(json, owner, res); + return res; + } + + protected void parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentProperties(JsonObject json, FamilyMemberHistory owner, FamilyMemberHistory.FamilyMemberHistoryConditionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("outcome")) + res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); + Type onset = parseType("onset", json); + if (onset != null) + res.setOnset(onset); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected Flag parseFlag(JsonObject json) throws IOException, FHIRFormatError { + Flag res = new Flag(); + parseFlagProperties(json, res); + return res; + } + + protected void parseFlagProperties(JsonObject json, Flag res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Flag.FlagStatus.NULL, new Flag.FlagStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + } + + protected Goal parseGoal(JsonObject json) throws IOException, FHIRFormatError { + Goal res = new Goal(); + parseGoalProperties(json, res); + return res; + } + + protected void parseGoalProperties(JsonObject json, Goal res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Goal.GoalStatus.NULL, new Goal.GoalStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priority")) + res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); + if (json.has("description")) + res.setDescription(parseCodeableConcept(json.getAsJsonObject("description"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + Type start = parseType("start", json); + if (start != null) + res.setStart(start); + if (json.has("target")) + res.setTarget(parseGoalGoalTargetComponent(json.getAsJsonObject("target"), res)); + if (json.has("statusDate")) + res.setStatusDateElement(parseDate(json.get("statusDate").getAsString())); + if (json.has("_statusDate")) + parseElementProperties(json.getAsJsonObject("_statusDate"), res.getStatusDateElement()); + if (json.has("statusReason")) + res.setStatusReasonElement(parseString(json.get("statusReason").getAsString())); + if (json.has("_statusReason")) + parseElementProperties(json.getAsJsonObject("_statusReason"), res.getStatusReasonElement()); + if (json.has("expressedBy")) + res.setExpressedBy(parseReference(json.getAsJsonObject("expressedBy"))); + if (json.has("addresses")) { + JsonArray array = json.getAsJsonArray("addresses"); + for (int i = 0; i < array.size(); i++) { + res.getAddresses().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("outcomeCode")) { + JsonArray array = json.getAsJsonArray("outcomeCode"); + for (int i = 0; i < array.size(); i++) { + res.getOutcomeCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("outcomeReference")) { + JsonArray array = json.getAsJsonArray("outcomeReference"); + for (int i = 0; i < array.size(); i++) { + res.getOutcomeReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Goal.GoalTargetComponent parseGoalGoalTargetComponent(JsonObject json, Goal owner) throws IOException, FHIRFormatError { + Goal.GoalTargetComponent res = new Goal.GoalTargetComponent(); + parseGoalGoalTargetComponentProperties(json, owner, res); + return res; + } + + protected void parseGoalGoalTargetComponentProperties(JsonObject json, Goal owner, Goal.GoalTargetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("measure")) + res.setMeasure(parseCodeableConcept(json.getAsJsonObject("measure"))); + Type detail = parseType("detail", json); + if (detail != null) + res.setDetail(detail); + Type due = parseType("due", json); + if (due != null) + res.setDue(due); + } + + protected GraphDefinition parseGraphDefinition(JsonObject json) throws IOException, FHIRFormatError { + GraphDefinition res = new GraphDefinition(); + parseGraphDefinitionProperties(json, res); + return res; + } + + protected void parseGraphDefinitionProperties(JsonObject json, GraphDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("start")) + res.setStartElement(parseCode(json.get("start").getAsString())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("profile")) + res.setProfileElement(parseUri(json.get("profile").getAsString())); + if (json.has("_profile")) + parseElementProperties(json.getAsJsonObject("_profile"), res.getProfileElement()); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionGraphDefinitionLinkComponent(JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError { + GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent(); + parseGraphDefinitionGraphDefinitionLinkComponentProperties(json, owner, res); + return res; + } + + protected void parseGraphDefinitionGraphDefinitionLinkComponentProperties(JsonObject json, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("sliceName")) + res.setSliceNameElement(parseString(json.get("sliceName").getAsString())); + if (json.has("_sliceName")) + parseElementProperties(json.getAsJsonObject("_sliceName"), res.getSliceNameElement()); + if (json.has("min")) + res.setMinElement(parseInteger(json.get("min").getAsLong())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("target")) { + JsonArray array = json.getAsJsonArray("target"); + for (int i = 0; i < array.size(); i++) { + res.getTarget().add(parseGraphDefinitionGraphDefinitionLinkTargetComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected GraphDefinition.GraphDefinitionLinkTargetComponent parseGraphDefinitionGraphDefinitionLinkTargetComponent(JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError { + GraphDefinition.GraphDefinitionLinkTargetComponent res = new GraphDefinition.GraphDefinitionLinkTargetComponent(); + parseGraphDefinitionGraphDefinitionLinkTargetComponentProperties(json, owner, res); + return res; + } + + protected void parseGraphDefinitionGraphDefinitionLinkTargetComponentProperties(JsonObject json, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("params")) + res.setParamsElement(parseString(json.get("params").getAsString())); + if (json.has("_params")) + parseElementProperties(json.getAsJsonObject("_params"), res.getParamsElement()); + if (json.has("profile")) + res.setProfileElement(parseUri(json.get("profile").getAsString())); + if (json.has("_profile")) + parseElementProperties(json.getAsJsonObject("_profile"), res.getProfileElement()); + if (json.has("compartment")) { + JsonArray array = json.getAsJsonArray("compartment"); + for (int i = 0; i < array.size(); i++) { + res.getCompartment().add(parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(JsonObject json, GraphDefinition owner) throws IOException, FHIRFormatError { + GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); + parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentProperties(json, owner, res); + return res; + } + + protected void parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentProperties(JsonObject json, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), GraphDefinition.GraphCompartmentUse.NULL, new GraphDefinition.GraphCompartmentUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), GraphDefinition.CompartmentCode.NULL, new GraphDefinition.CompartmentCodeEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("rule")) + res.setRuleElement(parseEnumeration(json.get("rule").getAsString(), GraphDefinition.GraphCompartmentRule.NULL, new GraphDefinition.GraphCompartmentRuleEnumFactory())); + if (json.has("_rule")) + parseElementProperties(json.getAsJsonObject("_rule"), res.getRuleElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + } + + protected Group parseGroup(JsonObject json) throws IOException, FHIRFormatError { + Group res = new Group(); + parseGroupProperties(json, res); + return res; + } + + protected void parseGroupProperties(JsonObject json, Group res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Group.GroupType.NULL, new Group.GroupTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("actual")) + res.setActualElement(parseBoolean(json.get("actual").getAsBoolean())); + if (json.has("_actual")) + parseElementProperties(json.getAsJsonObject("_actual"), res.getActualElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("quantity")) + res.setQuantityElement(parseUnsignedInt(json.get("quantity").getAsString())); + if (json.has("_quantity")) + parseElementProperties(json.getAsJsonObject("_quantity"), res.getQuantityElement()); + if (json.has("characteristic")) { + JsonArray array = json.getAsJsonArray("characteristic"); + for (int i = 0; i < array.size(); i++) { + res.getCharacteristic().add(parseGroupGroupCharacteristicComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("member")) { + JsonArray array = json.getAsJsonArray("member"); + for (int i = 0; i < array.size(); i++) { + res.getMember().add(parseGroupGroupMemberComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Group.GroupCharacteristicComponent parseGroupGroupCharacteristicComponent(JsonObject json, Group owner) throws IOException, FHIRFormatError { + Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent(); + parseGroupGroupCharacteristicComponentProperties(json, owner, res); + return res; + } + + protected void parseGroupGroupCharacteristicComponentProperties(JsonObject json, Group owner, Group.GroupCharacteristicComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("exclude")) + res.setExcludeElement(parseBoolean(json.get("exclude").getAsBoolean())); + if (json.has("_exclude")) + parseElementProperties(json.getAsJsonObject("_exclude"), res.getExcludeElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected Group.GroupMemberComponent parseGroupGroupMemberComponent(JsonObject json, Group owner) throws IOException, FHIRFormatError { + Group.GroupMemberComponent res = new Group.GroupMemberComponent(); + parseGroupGroupMemberComponentProperties(json, owner, res); + return res; + } + + protected void parseGroupGroupMemberComponentProperties(JsonObject json, Group owner, Group.GroupMemberComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("entity")) + res.setEntity(parseReference(json.getAsJsonObject("entity"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("inactive")) + res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean())); + if (json.has("_inactive")) + parseElementProperties(json.getAsJsonObject("_inactive"), res.getInactiveElement()); + } + + protected GuidanceResponse parseGuidanceResponse(JsonObject json) throws IOException, FHIRFormatError { + GuidanceResponse res = new GuidanceResponse(); + parseGuidanceResponseProperties(json, res); + return res; + } + + protected void parseGuidanceResponseProperties(JsonObject json, GuidanceResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("requestId")) + res.setRequestIdElement(parseId(json.get("requestId").getAsString())); + if (json.has("_requestId")) + parseElementProperties(json.getAsJsonObject("_requestId"), res.getRequestIdElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("module")) + res.setModule(parseReference(json.getAsJsonObject("module"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), GuidanceResponse.GuidanceResponseStatus.NULL, new GuidanceResponse.GuidanceResponseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("occurrenceDateTime")) + res.setOccurrenceDateTimeElement(parseDateTime(json.get("occurrenceDateTime").getAsString())); + if (json.has("_occurrenceDateTime")) + parseElementProperties(json.getAsJsonObject("_occurrenceDateTime"), res.getOccurrenceDateTimeElement()); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + Type reason = parseType("reason", json); + if (reason != null) + res.setReason(reason); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("evaluationMessage")) { + JsonArray array = json.getAsJsonArray("evaluationMessage"); + for (int i = 0; i < array.size(); i++) { + res.getEvaluationMessage().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("outputParameters")) + res.setOutputParameters(parseReference(json.getAsJsonObject("outputParameters"))); + if (json.has("result")) + res.setResult(parseReference(json.getAsJsonObject("result"))); + if (json.has("dataRequirement")) { + JsonArray array = json.getAsJsonArray("dataRequirement"); + for (int i = 0; i < array.size(); i++) { + res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject())); + } + }; + } + + protected HealthcareService parseHealthcareService(JsonObject json) throws IOException, FHIRFormatError { + HealthcareService res = new HealthcareService(); + parseHealthcareServiceProperties(json, res); + return res; + } + + protected void parseHealthcareServiceProperties(JsonObject json, HealthcareService res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("providedBy")) + res.setProvidedBy(parseReference(json.getAsJsonObject("providedBy"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialty")) { + JsonArray array = json.getAsJsonArray("specialty"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("location")) { + JsonArray array = json.getAsJsonArray("location"); + for (int i = 0; i < array.size(); i++) { + res.getLocation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("extraDetails")) + res.setExtraDetailsElement(parseString(json.get("extraDetails").getAsString())); + if (json.has("_extraDetails")) + parseElementProperties(json.getAsJsonObject("_extraDetails"), res.getExtraDetailsElement()); + if (json.has("photo")) + res.setPhoto(parseAttachment(json.getAsJsonObject("photo"))); + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("coverageArea")) { + JsonArray array = json.getAsJsonArray("coverageArea"); + for (int i = 0; i < array.size(); i++) { + res.getCoverageArea().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("serviceProvisionCode")) { + JsonArray array = json.getAsJsonArray("serviceProvisionCode"); + for (int i = 0; i < array.size(); i++) { + res.getServiceProvisionCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("eligibility")) + res.setEligibility(parseCodeableConcept(json.getAsJsonObject("eligibility"))); + if (json.has("eligibilityNote")) + res.setEligibilityNoteElement(parseString(json.get("eligibilityNote").getAsString())); + if (json.has("_eligibilityNote")) + parseElementProperties(json.getAsJsonObject("_eligibilityNote"), res.getEligibilityNoteElement()); + if (json.has("programName")) { + JsonArray array = json.getAsJsonArray("programName"); + for (int i = 0; i < array.size(); i++) { + res.getProgramName().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_programName")) { + JsonArray array = json.getAsJsonArray("_programName"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getProgramName().size()) + res.getProgramName().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getProgramName().get(i)); + } + }; + if (json.has("characteristic")) { + JsonArray array = json.getAsJsonArray("characteristic"); + for (int i = 0; i < array.size(); i++) { + res.getCharacteristic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("referralMethod")) { + JsonArray array = json.getAsJsonArray("referralMethod"); + for (int i = 0; i < array.size(); i++) { + res.getReferralMethod().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("appointmentRequired")) + res.setAppointmentRequiredElement(parseBoolean(json.get("appointmentRequired").getAsBoolean())); + if (json.has("_appointmentRequired")) + parseElementProperties(json.getAsJsonObject("_appointmentRequired"), res.getAppointmentRequiredElement()); + if (json.has("availableTime")) { + JsonArray array = json.getAsJsonArray("availableTime"); + for (int i = 0; i < array.size(); i++) { + res.getAvailableTime().add(parseHealthcareServiceHealthcareServiceAvailableTimeComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("notAvailable")) { + JsonArray array = json.getAsJsonArray("notAvailable"); + for (int i = 0; i < array.size(); i++) { + res.getNotAvailable().add(parseHealthcareServiceHealthcareServiceNotAvailableComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("availabilityExceptions")) + res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString())); + if (json.has("_availabilityExceptions")) + parseElementProperties(json.getAsJsonObject("_availabilityExceptions"), res.getAvailabilityExceptionsElement()); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected HealthcareService.HealthcareServiceAvailableTimeComponent parseHealthcareServiceHealthcareServiceAvailableTimeComponent(JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError { + HealthcareService.HealthcareServiceAvailableTimeComponent res = new HealthcareService.HealthcareServiceAvailableTimeComponent(); + parseHealthcareServiceHealthcareServiceAvailableTimeComponentProperties(json, owner, res); + return res; + } + + protected void parseHealthcareServiceHealthcareServiceAvailableTimeComponentProperties(JsonObject json, HealthcareService owner, HealthcareService.HealthcareServiceAvailableTimeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("daysOfWeek")) { + JsonArray array = json.getAsJsonArray("daysOfWeek"); + for (int i = 0; i < array.size(); i++) { + res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); + } + }; + if (json.has("_daysOfWeek")) { + JsonArray array = json.getAsJsonArray("_daysOfWeek"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDaysOfWeek().size()) + res.getDaysOfWeek().add(parseEnumeration(null, HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDaysOfWeek().get(i)); + } + }; + if (json.has("allDay")) + res.setAllDayElement(parseBoolean(json.get("allDay").getAsBoolean())); + if (json.has("_allDay")) + parseElementProperties(json.getAsJsonObject("_allDay"), res.getAllDayElement()); + if (json.has("availableStartTime")) + res.setAvailableStartTimeElement(parseTime(json.get("availableStartTime").getAsString())); + if (json.has("_availableStartTime")) + parseElementProperties(json.getAsJsonObject("_availableStartTime"), res.getAvailableStartTimeElement()); + if (json.has("availableEndTime")) + res.setAvailableEndTimeElement(parseTime(json.get("availableEndTime").getAsString())); + if (json.has("_availableEndTime")) + parseElementProperties(json.getAsJsonObject("_availableEndTime"), res.getAvailableEndTimeElement()); + } + + protected HealthcareService.HealthcareServiceNotAvailableComponent parseHealthcareServiceHealthcareServiceNotAvailableComponent(JsonObject json, HealthcareService owner) throws IOException, FHIRFormatError { + HealthcareService.HealthcareServiceNotAvailableComponent res = new HealthcareService.HealthcareServiceNotAvailableComponent(); + parseHealthcareServiceHealthcareServiceNotAvailableComponentProperties(json, owner, res); + return res; + } + + protected void parseHealthcareServiceHealthcareServiceNotAvailableComponentProperties(JsonObject json, HealthcareService owner, HealthcareService.HealthcareServiceNotAvailableComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("during")) + res.setDuring(parsePeriod(json.getAsJsonObject("during"))); + } + + protected ImagingManifest parseImagingManifest(JsonObject json) throws IOException, FHIRFormatError { + ImagingManifest res = new ImagingManifest(); + parseImagingManifestProperties(json, res); + return res; + } + + protected void parseImagingManifestProperties(JsonObject json, ImagingManifest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("authoringTime")) + res.setAuthoringTimeElement(parseDateTime(json.get("authoringTime").getAsString())); + if (json.has("_authoringTime")) + parseElementProperties(json.getAsJsonObject("_authoringTime"), res.getAuthoringTimeElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("study")) { + JsonArray array = json.getAsJsonArray("study"); + for (int i = 0; i < array.size(); i++) { + res.getStudy().add(parseImagingManifestStudyComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ImagingManifest.StudyComponent parseImagingManifestStudyComponent(JsonObject json, ImagingManifest owner) throws IOException, FHIRFormatError { + ImagingManifest.StudyComponent res = new ImagingManifest.StudyComponent(); + parseImagingManifestStudyComponentProperties(json, owner, res); + return res; + } + + protected void parseImagingManifestStudyComponentProperties(JsonObject json, ImagingManifest owner, ImagingManifest.StudyComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("uid")) + res.setUidElement(parseOid(json.get("uid").getAsString())); + if (json.has("_uid")) + parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); + if (json.has("imagingStudy")) + res.setImagingStudy(parseReference(json.getAsJsonObject("imagingStudy"))); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("series")) { + JsonArray array = json.getAsJsonArray("series"); + for (int i = 0; i < array.size(); i++) { + res.getSeries().add(parseImagingManifestSeriesComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ImagingManifest.SeriesComponent parseImagingManifestSeriesComponent(JsonObject json, ImagingManifest owner) throws IOException, FHIRFormatError { + ImagingManifest.SeriesComponent res = new ImagingManifest.SeriesComponent(); + parseImagingManifestSeriesComponentProperties(json, owner, res); + return res; + } + + protected void parseImagingManifestSeriesComponentProperties(JsonObject json, ImagingManifest owner, ImagingManifest.SeriesComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("uid")) + res.setUidElement(parseOid(json.get("uid").getAsString())); + if (json.has("_uid")) + parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("instance")) { + JsonArray array = json.getAsJsonArray("instance"); + for (int i = 0; i < array.size(); i++) { + res.getInstance().add(parseImagingManifestInstanceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ImagingManifest.InstanceComponent parseImagingManifestInstanceComponent(JsonObject json, ImagingManifest owner) throws IOException, FHIRFormatError { + ImagingManifest.InstanceComponent res = new ImagingManifest.InstanceComponent(); + parseImagingManifestInstanceComponentProperties(json, owner, res); + return res; + } + + protected void parseImagingManifestInstanceComponentProperties(JsonObject json, ImagingManifest owner, ImagingManifest.InstanceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sopClass")) + res.setSopClassElement(parseOid(json.get("sopClass").getAsString())); + if (json.has("_sopClass")) + parseElementProperties(json.getAsJsonObject("_sopClass"), res.getSopClassElement()); + if (json.has("uid")) + res.setUidElement(parseOid(json.get("uid").getAsString())); + if (json.has("_uid")) + parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); + if (json.has("frameNumber")) { + JsonArray array = json.getAsJsonArray("frameNumber"); + for (int i = 0; i < array.size(); i++) { + res.getFrameNumber().add(parseUnsignedInt(array.get(i).getAsString())); + } + }; + if (json.has("_frameNumber")) { + JsonArray array = json.getAsJsonArray("_frameNumber"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getFrameNumber().size()) + res.getFrameNumber().add(parseUnsignedInt(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getFrameNumber().get(i)); + } + }; + } + + protected ImagingStudy parseImagingStudy(JsonObject json) throws IOException, FHIRFormatError { + ImagingStudy res = new ImagingStudy(); + parseImagingStudyProperties(json, res); + return res; + } + + protected void parseImagingStudyProperties(JsonObject json, ImagingStudy res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("uid")) + res.setUidElement(parseOid(json.get("uid").getAsString())); + if (json.has("_uid")) + parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); + if (json.has("accession")) + res.setAccession(parseIdentifier(json.getAsJsonObject("accession"))); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("availability")) + res.setAvailabilityElement(parseEnumeration(json.get("availability").getAsString(), ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); + if (json.has("_availability")) + parseElementProperties(json.getAsJsonObject("_availability"), res.getAvailabilityElement()); + if (json.has("modalityList")) { + JsonArray array = json.getAsJsonArray("modalityList"); + for (int i = 0; i < array.size(); i++) { + res.getModalityList().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("started")) + res.setStartedElement(parseDateTime(json.get("started").getAsString())); + if (json.has("_started")) + parseElementProperties(json.getAsJsonObject("_started"), res.getStartedElement()); + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("referrer")) + res.setReferrer(parseReference(json.getAsJsonObject("referrer"))); + if (json.has("interpreter")) { + JsonArray array = json.getAsJsonArray("interpreter"); + for (int i = 0; i < array.size(); i++) { + res.getInterpreter().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("numberOfSeries")) + res.setNumberOfSeriesElement(parseUnsignedInt(json.get("numberOfSeries").getAsString())); + if (json.has("_numberOfSeries")) + parseElementProperties(json.getAsJsonObject("_numberOfSeries"), res.getNumberOfSeriesElement()); + if (json.has("numberOfInstances")) + res.setNumberOfInstancesElement(parseUnsignedInt(json.get("numberOfInstances").getAsString())); + if (json.has("_numberOfInstances")) + parseElementProperties(json.getAsJsonObject("_numberOfInstances"), res.getNumberOfInstancesElement()); + if (json.has("procedureReference")) { + JsonArray array = json.getAsJsonArray("procedureReference"); + for (int i = 0; i < array.size(); i++) { + res.getProcedureReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("procedureCode")) { + JsonArray array = json.getAsJsonArray("procedureCode"); + for (int i = 0; i < array.size(); i++) { + res.getProcedureCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reason")) + res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("series")) { + JsonArray array = json.getAsJsonArray("series"); + for (int i = 0; i < array.size(); i++) { + res.getSeries().add(parseImagingStudyImagingStudySeriesComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudyImagingStudySeriesComponent(JsonObject json, ImagingStudy owner) throws IOException, FHIRFormatError { + ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent(); + parseImagingStudyImagingStudySeriesComponentProperties(json, owner, res); + return res; + } + + protected void parseImagingStudyImagingStudySeriesComponentProperties(JsonObject json, ImagingStudy owner, ImagingStudy.ImagingStudySeriesComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("uid")) + res.setUidElement(parseOid(json.get("uid").getAsString())); + if (json.has("_uid")) + parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); + if (json.has("number")) + res.setNumberElement(parseUnsignedInt(json.get("number").getAsString())); + if (json.has("_number")) + parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); + if (json.has("modality")) + res.setModality(parseCoding(json.getAsJsonObject("modality"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("numberOfInstances")) + res.setNumberOfInstancesElement(parseUnsignedInt(json.get("numberOfInstances").getAsString())); + if (json.has("_numberOfInstances")) + parseElementProperties(json.getAsJsonObject("_numberOfInstances"), res.getNumberOfInstancesElement()); + if (json.has("availability")) + res.setAvailabilityElement(parseEnumeration(json.get("availability").getAsString(), ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); + if (json.has("_availability")) + parseElementProperties(json.getAsJsonObject("_availability"), res.getAvailabilityElement()); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) + res.setBodySite(parseCoding(json.getAsJsonObject("bodySite"))); + if (json.has("laterality")) + res.setLaterality(parseCoding(json.getAsJsonObject("laterality"))); + if (json.has("started")) + res.setStartedElement(parseDateTime(json.get("started").getAsString())); + if (json.has("_started")) + parseElementProperties(json.getAsJsonObject("_started"), res.getStartedElement()); + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("instance")) { + JsonArray array = json.getAsJsonArray("instance"); + for (int i = 0; i < array.size(); i++) { + res.getInstance().add(parseImagingStudyImagingStudySeriesInstanceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ImagingStudy.ImagingStudySeriesInstanceComponent parseImagingStudyImagingStudySeriesInstanceComponent(JsonObject json, ImagingStudy owner) throws IOException, FHIRFormatError { + ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent(); + parseImagingStudyImagingStudySeriesInstanceComponentProperties(json, owner, res); + return res; + } + + protected void parseImagingStudyImagingStudySeriesInstanceComponentProperties(JsonObject json, ImagingStudy owner, ImagingStudy.ImagingStudySeriesInstanceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("uid")) + res.setUidElement(parseOid(json.get("uid").getAsString())); + if (json.has("_uid")) + parseElementProperties(json.getAsJsonObject("_uid"), res.getUidElement()); + if (json.has("number")) + res.setNumberElement(parseUnsignedInt(json.get("number").getAsString())); + if (json.has("_number")) + parseElementProperties(json.getAsJsonObject("_number"), res.getNumberElement()); + if (json.has("sopClass")) + res.setSopClassElement(parseOid(json.get("sopClass").getAsString())); + if (json.has("_sopClass")) + parseElementProperties(json.getAsJsonObject("_sopClass"), res.getSopClassElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + } + + protected Immunization parseImmunization(JsonObject json) throws IOException, FHIRFormatError { + Immunization res = new Immunization(); + parseImmunizationProperties(json, res); + return res; + } + + protected void parseImmunizationProperties(JsonObject json, Immunization res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Immunization.ImmunizationStatus.NULL, new Immunization.ImmunizationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("notGiven")) + res.setNotGivenElement(parseBoolean(json.get("notGiven").getAsBoolean())); + if (json.has("_notGiven")) + parseElementProperties(json.getAsJsonObject("_notGiven"), res.getNotGivenElement()); + if (json.has("vaccineCode")) + res.setVaccineCode(parseCodeableConcept(json.getAsJsonObject("vaccineCode"))); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("primarySource")) + res.setPrimarySourceElement(parseBoolean(json.get("primarySource").getAsBoolean())); + if (json.has("_primarySource")) + parseElementProperties(json.getAsJsonObject("_primarySource"), res.getPrimarySourceElement()); + if (json.has("reportOrigin")) + res.setReportOrigin(parseCodeableConcept(json.getAsJsonObject("reportOrigin"))); + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("manufacturer")) + res.setManufacturer(parseReference(json.getAsJsonObject("manufacturer"))); + if (json.has("lotNumber")) + res.setLotNumberElement(parseString(json.get("lotNumber").getAsString())); + if (json.has("_lotNumber")) + parseElementProperties(json.getAsJsonObject("_lotNumber"), res.getLotNumberElement()); + if (json.has("expirationDate")) + res.setExpirationDateElement(parseDate(json.get("expirationDate").getAsString())); + if (json.has("_expirationDate")) + parseElementProperties(json.getAsJsonObject("_expirationDate"), res.getExpirationDateElement()); + if (json.has("site")) + res.setSite(parseCodeableConcept(json.getAsJsonObject("site"))); + if (json.has("route")) + res.setRoute(parseCodeableConcept(json.getAsJsonObject("route"))); + if (json.has("doseQuantity")) + res.setDoseQuantity(parseSimpleQuantity(json.getAsJsonObject("doseQuantity"))); + if (json.has("practitioner")) { + JsonArray array = json.getAsJsonArray("practitioner"); + for (int i = 0; i < array.size(); i++) { + res.getPractitioner().add(parseImmunizationImmunizationPractitionerComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("explanation")) + res.setExplanation(parseImmunizationImmunizationExplanationComponent(json.getAsJsonObject("explanation"), res)); + if (json.has("reaction")) { + JsonArray array = json.getAsJsonArray("reaction"); + for (int i = 0; i < array.size(); i++) { + res.getReaction().add(parseImmunizationImmunizationReactionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("vaccinationProtocol")) { + JsonArray array = json.getAsJsonArray("vaccinationProtocol"); + for (int i = 0; i < array.size(); i++) { + res.getVaccinationProtocol().add(parseImmunizationImmunizationVaccinationProtocolComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Immunization.ImmunizationPractitionerComponent parseImmunizationImmunizationPractitionerComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { + Immunization.ImmunizationPractitionerComponent res = new Immunization.ImmunizationPractitionerComponent(); + parseImmunizationImmunizationPractitionerComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationImmunizationPractitionerComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationPractitionerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + } + + protected Immunization.ImmunizationExplanationComponent parseImmunizationImmunizationExplanationComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { + Immunization.ImmunizationExplanationComponent res = new Immunization.ImmunizationExplanationComponent(); + parseImmunizationImmunizationExplanationComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationImmunizationExplanationComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationExplanationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonNotGiven")) { + JsonArray array = json.getAsJsonArray("reasonNotGiven"); + for (int i = 0; i < array.size(); i++) { + res.getReasonNotGiven().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected Immunization.ImmunizationReactionComponent parseImmunizationImmunizationReactionComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { + Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent(); + parseImmunizationImmunizationReactionComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationImmunizationReactionComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationReactionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("detail")) + res.setDetail(parseReference(json.getAsJsonObject("detail"))); + if (json.has("reported")) + res.setReportedElement(parseBoolean(json.get("reported").getAsBoolean())); + if (json.has("_reported")) + parseElementProperties(json.getAsJsonObject("_reported"), res.getReportedElement()); + } + + protected Immunization.ImmunizationVaccinationProtocolComponent parseImmunizationImmunizationVaccinationProtocolComponent(JsonObject json, Immunization owner) throws IOException, FHIRFormatError { + Immunization.ImmunizationVaccinationProtocolComponent res = new Immunization.ImmunizationVaccinationProtocolComponent(); + parseImmunizationImmunizationVaccinationProtocolComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationImmunizationVaccinationProtocolComponentProperties(JsonObject json, Immunization owner, Immunization.ImmunizationVaccinationProtocolComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("doseSequence")) + res.setDoseSequenceElement(parsePositiveInt(json.get("doseSequence").getAsString())); + if (json.has("_doseSequence")) + parseElementProperties(json.getAsJsonObject("_doseSequence"), res.getDoseSequenceElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("authority")) + res.setAuthority(parseReference(json.getAsJsonObject("authority"))); + if (json.has("series")) + res.setSeriesElement(parseString(json.get("series").getAsString())); + if (json.has("_series")) + parseElementProperties(json.getAsJsonObject("_series"), res.getSeriesElement()); + if (json.has("seriesDoses")) + res.setSeriesDosesElement(parsePositiveInt(json.get("seriesDoses").getAsString())); + if (json.has("_seriesDoses")) + parseElementProperties(json.getAsJsonObject("_seriesDoses"), res.getSeriesDosesElement()); + if (json.has("targetDisease")) { + JsonArray array = json.getAsJsonArray("targetDisease"); + for (int i = 0; i < array.size(); i++) { + res.getTargetDisease().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("doseStatus")) + res.setDoseStatus(parseCodeableConcept(json.getAsJsonObject("doseStatus"))); + if (json.has("doseStatusReason")) + res.setDoseStatusReason(parseCodeableConcept(json.getAsJsonObject("doseStatusReason"))); + } + + protected ImmunizationRecommendation parseImmunizationRecommendation(JsonObject json) throws IOException, FHIRFormatError { + ImmunizationRecommendation res = new ImmunizationRecommendation(); + parseImmunizationRecommendationProperties(json, res); + return res; + } + + protected void parseImmunizationRecommendationProperties(JsonObject json, ImmunizationRecommendation res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("recommendation")) { + JsonArray array = json.getAsJsonArray("recommendation"); + for (int i = 0; i < array.size(); i++) { + res.getRecommendation().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError { + ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); + parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("vaccineCode")) + res.setVaccineCode(parseCodeableConcept(json.getAsJsonObject("vaccineCode"))); + if (json.has("targetDisease")) + res.setTargetDisease(parseCodeableConcept(json.getAsJsonObject("targetDisease"))); + if (json.has("doseNumber")) + res.setDoseNumberElement(parsePositiveInt(json.get("doseNumber").getAsString())); + if (json.has("_doseNumber")) + parseElementProperties(json.getAsJsonObject("_doseNumber"), res.getDoseNumberElement()); + if (json.has("forecastStatus")) + res.setForecastStatus(parseCodeableConcept(json.getAsJsonObject("forecastStatus"))); + if (json.has("dateCriterion")) { + JsonArray array = json.getAsJsonArray("dateCriterion"); + for (int i = 0; i < array.size(); i++) { + res.getDateCriterion().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("protocol")) + res.setProtocol(parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(json.getAsJsonObject("protocol"), owner)); + if (json.has("supportingImmunization")) { + JsonArray array = json.getAsJsonArray("supportingImmunization"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingImmunization().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("supportingPatientInformation")) { + JsonArray array = json.getAsJsonArray("supportingPatientInformation"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingPatientInformation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError { + ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent(); + parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("value")) + res.setValueElement(parseDateTime(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(JsonObject json, ImmunizationRecommendation owner) throws IOException, FHIRFormatError { + ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent(); + parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentProperties(json, owner, res); + return res; + } + + protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("doseSequence")) + res.setDoseSequenceElement(parsePositiveInt(json.get("doseSequence").getAsString())); + if (json.has("_doseSequence")) + parseElementProperties(json.getAsJsonObject("_doseSequence"), res.getDoseSequenceElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("authority")) + res.setAuthority(parseReference(json.getAsJsonObject("authority"))); + if (json.has("series")) + res.setSeriesElement(parseString(json.get("series").getAsString())); + if (json.has("_series")) + parseElementProperties(json.getAsJsonObject("_series"), res.getSeriesElement()); + } + + protected ImplementationGuide parseImplementationGuide(JsonObject json) throws IOException, FHIRFormatError { + ImplementationGuide res = new ImplementationGuide(); + parseImplementationGuideProperties(json, res); + return res; + } + + protected void parseImplementationGuideProperties(JsonObject json, ImplementationGuide res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("fhirVersion")) + res.setFhirVersionElement(parseId(json.get("fhirVersion").getAsString())); + if (json.has("_fhirVersion")) + parseElementProperties(json.getAsJsonObject("_fhirVersion"), res.getFhirVersionElement()); + if (json.has("dependency")) { + JsonArray array = json.getAsJsonArray("dependency"); + for (int i = 0; i < array.size(); i++) { + res.getDependency().add(parseImplementationGuideImplementationGuideDependencyComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("package")) { + JsonArray array = json.getAsJsonArray("package"); + for (int i = 0; i < array.size(); i++) { + res.getPackage().add(parseImplementationGuideImplementationGuidePackageComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("global")) { + JsonArray array = json.getAsJsonArray("global"); + for (int i = 0; i < array.size(); i++) { + res.getGlobal().add(parseImplementationGuideImplementationGuideGlobalComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("binary")) { + JsonArray array = json.getAsJsonArray("binary"); + for (int i = 0; i < array.size(); i++) { + res.getBinary().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_binary")) { + JsonArray array = json.getAsJsonArray("_binary"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getBinary().size()) + res.getBinary().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getBinary().get(i)); + } + }; + if (json.has("page")) + res.setPage(parseImplementationGuideImplementationGuidePageComponent(json.getAsJsonObject("page"), res)); + } + + protected ImplementationGuide.ImplementationGuideDependencyComponent parseImplementationGuideImplementationGuideDependencyComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuideDependencyComponent res = new ImplementationGuide.ImplementationGuideDependencyComponent(); + parseImplementationGuideImplementationGuideDependencyComponentProperties(json, owner, res); + return res; + } + + protected void parseImplementationGuideImplementationGuideDependencyComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDependencyComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), ImplementationGuide.GuideDependencyType.NULL, new ImplementationGuide.GuideDependencyTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("uri")) + res.setUriElement(parseUri(json.get("uri").getAsString())); + if (json.has("_uri")) + parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); + } + + protected ImplementationGuide.ImplementationGuidePackageComponent parseImplementationGuideImplementationGuidePackageComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuidePackageComponent res = new ImplementationGuide.ImplementationGuidePackageComponent(); + parseImplementationGuideImplementationGuidePackageComponentProperties(json, owner, res); + return res; + } + + protected void parseImplementationGuideImplementationGuidePackageComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("resource")) { + JsonArray array = json.getAsJsonArray("resource"); + for (int i = 0; i < array.size(); i++) { + res.getResource().add(parseImplementationGuideImplementationGuidePackageResourceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ImplementationGuide.ImplementationGuidePackageResourceComponent parseImplementationGuideImplementationGuidePackageResourceComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuidePackageResourceComponent res = new ImplementationGuide.ImplementationGuidePackageResourceComponent(); + parseImplementationGuideImplementationGuidePackageResourceComponentProperties(json, owner, res); + return res; + } + + protected void parseImplementationGuideImplementationGuidePackageResourceComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageResourceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("example")) + res.setExampleElement(parseBoolean(json.get("example").getAsBoolean())); + if (json.has("_example")) + parseElementProperties(json.getAsJsonObject("_example"), res.getExampleElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("acronym")) + res.setAcronymElement(parseString(json.get("acronym").getAsString())); + if (json.has("_acronym")) + parseElementProperties(json.getAsJsonObject("_acronym"), res.getAcronymElement()); + Type source = parseType("source", json); + if (source != null) + res.setSource(source); + if (json.has("exampleFor")) + res.setExampleFor(parseReference(json.getAsJsonObject("exampleFor"))); + } + + protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideImplementationGuideGlobalComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent(); + parseImplementationGuideImplementationGuideGlobalComponentProperties(json, owner, res); + return res; + } + + protected void parseImplementationGuideImplementationGuideGlobalComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuideGlobalComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("profile")) + res.setProfile(parseReference(json.getAsJsonObject("profile"))); + } + + protected ImplementationGuide.ImplementationGuidePageComponent parseImplementationGuideImplementationGuidePageComponent(JsonObject json, ImplementationGuide owner) throws IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuidePageComponent res = new ImplementationGuide.ImplementationGuidePageComponent(); + parseImplementationGuideImplementationGuidePageComponentProperties(json, owner, res); + return res; + } + + protected void parseImplementationGuideImplementationGuidePageComponentProperties(JsonObject json, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("source")) + res.setSourceElement(parseUri(json.get("source").getAsString())); + if (json.has("_source")) + parseElementProperties(json.getAsJsonObject("_source"), res.getSourceElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), ImplementationGuide.GuidePageKind.NULL, new ImplementationGuide.GuidePageKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_type")) { + JsonArray array = json.getAsJsonArray("_type"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getType().size()) + res.getType().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getType().get(i)); + } + }; + if (json.has("package")) { + JsonArray array = json.getAsJsonArray("package"); + for (int i = 0; i < array.size(); i++) { + res.getPackage().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_package")) { + JsonArray array = json.getAsJsonArray("_package"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPackage().size()) + res.getPackage().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPackage().get(i)); + } + }; + if (json.has("format")) + res.setFormatElement(parseCode(json.get("format").getAsString())); + if (json.has("_format")) + parseElementProperties(json.getAsJsonObject("_format"), res.getFormatElement()); + if (json.has("page")) { + JsonArray array = json.getAsJsonArray("page"); + for (int i = 0; i < array.size(); i++) { + res.getPage().add(parseImplementationGuideImplementationGuidePageComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Library parseLibrary(JsonObject json) throws IOException, FHIRFormatError { + Library res = new Library(); + parseLibraryProperties(json, res); + return res; + } + + protected void parseLibraryProperties(JsonObject json, Library res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contributor")) { + JsonArray array = json.getAsJsonArray("contributor"); + for (int i = 0; i < array.size(); i++) { + res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("parameter")) { + JsonArray array = json.getAsJsonArray("parameter"); + for (int i = 0; i < array.size(); i++) { + res.getParameter().add(parseParameterDefinition(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dataRequirement")) { + JsonArray array = json.getAsJsonArray("dataRequirement"); + for (int i = 0; i < array.size(); i++) { + res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject())); + } + }; + if (json.has("content")) { + JsonArray array = json.getAsJsonArray("content"); + for (int i = 0; i < array.size(); i++) { + res.getContent().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + } + + protected Linkage parseLinkage(JsonObject json) throws IOException, FHIRFormatError { + Linkage res = new Linkage(); + parseLinkageProperties(json, res); + return res; + } + + protected void parseLinkageProperties(JsonObject json, Linkage res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseLinkageLinkageItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Linkage.LinkageItemComponent parseLinkageLinkageItemComponent(JsonObject json, Linkage owner) throws IOException, FHIRFormatError { + Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent(); + parseLinkageLinkageItemComponentProperties(json, owner, res); + return res; + } + + protected void parseLinkageLinkageItemComponentProperties(JsonObject json, Linkage owner, Linkage.LinkageItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Linkage.LinkageType.NULL, new Linkage.LinkageTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("resource")) + res.setResource(parseReference(json.getAsJsonObject("resource"))); + } + + protected ListResource parseListResource(JsonObject json) throws IOException, FHIRFormatError { + ListResource res = new ListResource(); + parseListResourceProperties(json, res); + return res; + } + + protected void parseListResourceProperties(JsonObject json, ListResource res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ListResource.ListStatus.NULL, new ListResource.ListStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), ListResource.ListMode.NULL, new ListResource.ListModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("source")) + res.setSource(parseReference(json.getAsJsonObject("source"))); + if (json.has("orderedBy")) + res.setOrderedBy(parseCodeableConcept(json.getAsJsonObject("orderedBy"))); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("entry")) { + JsonArray array = json.getAsJsonArray("entry"); + for (int i = 0; i < array.size(); i++) { + res.getEntry().add(parseListResourceListEntryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("emptyReason")) + res.setEmptyReason(parseCodeableConcept(json.getAsJsonObject("emptyReason"))); + } + + protected ListResource.ListEntryComponent parseListResourceListEntryComponent(JsonObject json, ListResource owner) throws IOException, FHIRFormatError { + ListResource.ListEntryComponent res = new ListResource.ListEntryComponent(); + parseListResourceListEntryComponentProperties(json, owner, res); + return res; + } + + protected void parseListResourceListEntryComponentProperties(JsonObject json, ListResource owner, ListResource.ListEntryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("flag")) + res.setFlag(parseCodeableConcept(json.getAsJsonObject("flag"))); + if (json.has("deleted")) + res.setDeletedElement(parseBoolean(json.get("deleted").getAsBoolean())); + if (json.has("_deleted")) + parseElementProperties(json.getAsJsonObject("_deleted"), res.getDeletedElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("item")) + res.setItem(parseReference(json.getAsJsonObject("item"))); + } + + protected Location parseLocation(JsonObject json) throws IOException, FHIRFormatError { + Location res = new Location(); + parseLocationProperties(json, res); + return res; + } + + protected void parseLocationProperties(JsonObject json, Location res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Location.LocationStatus.NULL, new Location.LocationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("operationalStatus")) + res.setOperationalStatus(parseCoding(json.getAsJsonObject("operationalStatus"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("alias")) { + JsonArray array = json.getAsJsonArray("alias"); + for (int i = 0; i < array.size(); i++) { + res.getAlias().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_alias")) { + JsonArray array = json.getAsJsonArray("_alias"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getAlias().size()) + res.getAlias().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getAlias().get(i)); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), Location.LocationMode.NULL, new Location.LocationModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("address")) + res.setAddress(parseAddress(json.getAsJsonObject("address"))); + if (json.has("physicalType")) + res.setPhysicalType(parseCodeableConcept(json.getAsJsonObject("physicalType"))); + if (json.has("position")) + res.setPosition(parseLocationLocationPositionComponent(json.getAsJsonObject("position"), res)); + if (json.has("managingOrganization")) + res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); + if (json.has("partOf")) + res.setPartOf(parseReference(json.getAsJsonObject("partOf"))); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Location.LocationPositionComponent parseLocationLocationPositionComponent(JsonObject json, Location owner) throws IOException, FHIRFormatError { + Location.LocationPositionComponent res = new Location.LocationPositionComponent(); + parseLocationLocationPositionComponentProperties(json, owner, res); + return res; + } + + protected void parseLocationLocationPositionComponentProperties(JsonObject json, Location owner, Location.LocationPositionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("longitude")) + res.setLongitudeElement(parseDecimal(json.get("longitude").getAsBigDecimal())); + if (json.has("_longitude")) + parseElementProperties(json.getAsJsonObject("_longitude"), res.getLongitudeElement()); + if (json.has("latitude")) + res.setLatitudeElement(parseDecimal(json.get("latitude").getAsBigDecimal())); + if (json.has("_latitude")) + parseElementProperties(json.getAsJsonObject("_latitude"), res.getLatitudeElement()); + if (json.has("altitude")) + res.setAltitudeElement(parseDecimal(json.get("altitude").getAsBigDecimal())); + if (json.has("_altitude")) + parseElementProperties(json.getAsJsonObject("_altitude"), res.getAltitudeElement()); + } + + protected Measure parseMeasure(JsonObject json) throws IOException, FHIRFormatError { + Measure res = new Measure(); + parseMeasureProperties(json, res); + return res; + } + + protected void parseMeasureProperties(JsonObject json, Measure res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contributor")) { + JsonArray array = json.getAsJsonArray("contributor"); + for (int i = 0; i < array.size(); i++) { + res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("library")) { + JsonArray array = json.getAsJsonArray("library"); + for (int i = 0; i < array.size(); i++) { + res.getLibrary().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("disclaimer")) + res.setDisclaimerElement(parseMarkdown(json.get("disclaimer").getAsString())); + if (json.has("_disclaimer")) + parseElementProperties(json.getAsJsonObject("_disclaimer"), res.getDisclaimerElement()); + if (json.has("scoring")) + res.setScoring(parseCodeableConcept(json.getAsJsonObject("scoring"))); + if (json.has("compositeScoring")) + res.setCompositeScoring(parseCodeableConcept(json.getAsJsonObject("compositeScoring"))); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("riskAdjustment")) + res.setRiskAdjustmentElement(parseString(json.get("riskAdjustment").getAsString())); + if (json.has("_riskAdjustment")) + parseElementProperties(json.getAsJsonObject("_riskAdjustment"), res.getRiskAdjustmentElement()); + if (json.has("rateAggregation")) + res.setRateAggregationElement(parseString(json.get("rateAggregation").getAsString())); + if (json.has("_rateAggregation")) + parseElementProperties(json.getAsJsonObject("_rateAggregation"), res.getRateAggregationElement()); + if (json.has("rationale")) + res.setRationaleElement(parseMarkdown(json.get("rationale").getAsString())); + if (json.has("_rationale")) + parseElementProperties(json.getAsJsonObject("_rationale"), res.getRationaleElement()); + if (json.has("clinicalRecommendationStatement")) + res.setClinicalRecommendationStatementElement(parseMarkdown(json.get("clinicalRecommendationStatement").getAsString())); + if (json.has("_clinicalRecommendationStatement")) + parseElementProperties(json.getAsJsonObject("_clinicalRecommendationStatement"), res.getClinicalRecommendationStatementElement()); + if (json.has("improvementNotation")) + res.setImprovementNotationElement(parseString(json.get("improvementNotation").getAsString())); + if (json.has("_improvementNotation")) + parseElementProperties(json.getAsJsonObject("_improvementNotation"), res.getImprovementNotationElement()); + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseMarkdown(array.get(i).getAsString())); + } + }; + if (json.has("_definition")) { + JsonArray array = json.getAsJsonArray("_definition"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDefinition().size()) + res.getDefinition().add(parseMarkdown(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDefinition().get(i)); + } + }; + if (json.has("guidance")) + res.setGuidanceElement(parseMarkdown(json.get("guidance").getAsString())); + if (json.has("_guidance")) + parseElementProperties(json.getAsJsonObject("_guidance"), res.getGuidanceElement()); + if (json.has("set")) + res.setSetElement(parseString(json.get("set").getAsString())); + if (json.has("_set")) + parseElementProperties(json.getAsJsonObject("_set"), res.getSetElement()); + if (json.has("group")) { + JsonArray array = json.getAsJsonArray("group"); + for (int i = 0; i < array.size(); i++) { + res.getGroup().add(parseMeasureMeasureGroupComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("supplementalData")) { + JsonArray array = json.getAsJsonArray("supplementalData"); + for (int i = 0; i < array.size(); i++) { + res.getSupplementalData().add(parseMeasureMeasureSupplementalDataComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Measure.MeasureGroupComponent parseMeasureMeasureGroupComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { + Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent(); + parseMeasureMeasureGroupComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureMeasureGroupComponentProperties(JsonObject json, Measure owner, Measure.MeasureGroupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("population")) { + JsonArray array = json.getAsJsonArray("population"); + for (int i = 0; i < array.size(); i++) { + res.getPopulation().add(parseMeasureMeasureGroupPopulationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("stratifier")) { + JsonArray array = json.getAsJsonArray("stratifier"); + for (int i = 0; i < array.size(); i++) { + res.getStratifier().add(parseMeasureMeasureGroupStratifierComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Measure.MeasureGroupPopulationComponent parseMeasureMeasureGroupPopulationComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { + Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent(); + parseMeasureMeasureGroupPopulationComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureMeasureGroupPopulationComponentProperties(JsonObject json, Measure owner, Measure.MeasureGroupPopulationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("criteria")) + res.setCriteriaElement(parseString(json.get("criteria").getAsString())); + if (json.has("_criteria")) + parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); + } + + protected Measure.MeasureGroupStratifierComponent parseMeasureMeasureGroupStratifierComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { + Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent(); + parseMeasureMeasureGroupStratifierComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureMeasureGroupStratifierComponentProperties(JsonObject json, Measure owner, Measure.MeasureGroupStratifierComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("criteria")) + res.setCriteriaElement(parseString(json.get("criteria").getAsString())); + if (json.has("_criteria")) + parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + } + + protected Measure.MeasureSupplementalDataComponent parseMeasureMeasureSupplementalDataComponent(JsonObject json, Measure owner) throws IOException, FHIRFormatError { + Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent(); + parseMeasureMeasureSupplementalDataComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureMeasureSupplementalDataComponentProperties(JsonObject json, Measure owner, Measure.MeasureSupplementalDataComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("usage")) { + JsonArray array = json.getAsJsonArray("usage"); + for (int i = 0; i < array.size(); i++) { + res.getUsage().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("criteria")) + res.setCriteriaElement(parseString(json.get("criteria").getAsString())); + if (json.has("_criteria")) + parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + } + + protected MeasureReport parseMeasureReport(JsonObject json) throws IOException, FHIRFormatError { + MeasureReport res = new MeasureReport(); + parseMeasureReportProperties(json, res); + return res; + } + + protected void parseMeasureReportProperties(JsonObject json, MeasureReport res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MeasureReport.MeasureReportStatus.NULL, new MeasureReport.MeasureReportStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), MeasureReport.MeasureReportType.NULL, new MeasureReport.MeasureReportTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("measure")) + res.setMeasure(parseReference(json.getAsJsonObject("measure"))); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("reportingOrganization")) + res.setReportingOrganization(parseReference(json.getAsJsonObject("reportingOrganization"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("group")) { + JsonArray array = json.getAsJsonArray("group"); + for (int i = 0; i < array.size(); i++) { + res.getGroup().add(parseMeasureReportMeasureReportGroupComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("evaluatedResources")) + res.setEvaluatedResources(parseReference(json.getAsJsonObject("evaluatedResources"))); + } + + protected MeasureReport.MeasureReportGroupComponent parseMeasureReportMeasureReportGroupComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { + MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent(); + parseMeasureReportMeasureReportGroupComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureReportMeasureReportGroupComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.MeasureReportGroupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("population")) { + JsonArray array = json.getAsJsonArray("population"); + for (int i = 0; i < array.size(); i++) { + res.getPopulation().add(parseMeasureReportMeasureReportGroupPopulationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("measureScore")) + res.setMeasureScoreElement(parseDecimal(json.get("measureScore").getAsBigDecimal())); + if (json.has("_measureScore")) + parseElementProperties(json.getAsJsonObject("_measureScore"), res.getMeasureScoreElement()); + if (json.has("stratifier")) { + JsonArray array = json.getAsJsonArray("stratifier"); + for (int i = 0; i < array.size(); i++) { + res.getStratifier().add(parseMeasureReportMeasureReportGroupStratifierComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportMeasureReportGroupPopulationComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { + MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent(); + parseMeasureReportMeasureReportGroupPopulationComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureReportMeasureReportGroupPopulationComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.MeasureReportGroupPopulationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("count")) + res.setCountElement(parseInteger(json.get("count").getAsLong())); + if (json.has("_count")) + parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); + if (json.has("patients")) + res.setPatients(parseReference(json.getAsJsonObject("patients"))); + } + + protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportMeasureReportGroupStratifierComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { + MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent(); + parseMeasureReportMeasureReportGroupStratifierComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureReportMeasureReportGroupStratifierComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.MeasureReportGroupStratifierComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("stratum")) { + JsonArray array = json.getAsJsonArray("stratum"); + for (int i = 0; i < array.size(); i++) { + res.getStratum().add(parseMeasureReportStratifierGroupComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { + MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent(); + parseMeasureReportStratifierGroupComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureReportStratifierGroupComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.StratifierGroupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("population")) { + JsonArray array = json.getAsJsonArray("population"); + for (int i = 0; i < array.size(); i++) { + res.getPopulation().add(parseMeasureReportStratifierGroupPopulationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("measureScore")) + res.setMeasureScoreElement(parseDecimal(json.get("measureScore").getAsBigDecimal())); + if (json.has("_measureScore")) + parseElementProperties(json.getAsJsonObject("_measureScore"), res.getMeasureScoreElement()); + } + + protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent(JsonObject json, MeasureReport owner) throws IOException, FHIRFormatError { + MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent(); + parseMeasureReportStratifierGroupPopulationComponentProperties(json, owner, res); + return res; + } + + protected void parseMeasureReportStratifierGroupPopulationComponentProperties(JsonObject json, MeasureReport owner, MeasureReport.StratifierGroupPopulationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("count")) + res.setCountElement(parseInteger(json.get("count").getAsLong())); + if (json.has("_count")) + parseElementProperties(json.getAsJsonObject("_count"), res.getCountElement()); + if (json.has("patients")) + res.setPatients(parseReference(json.getAsJsonObject("patients"))); + } + + protected Media parseMedia(JsonObject json) throws IOException, FHIRFormatError { + Media res = new Media(); + parseMediaProperties(json, res); + return res; + } + + protected void parseMediaProperties(JsonObject json, Media res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Media.DigitalMediaType.NULL, new Media.DigitalMediaTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("subtype")) + res.setSubtype(parseCodeableConcept(json.getAsJsonObject("subtype"))); + if (json.has("view")) + res.setView(parseCodeableConcept(json.getAsJsonObject("view"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("operator")) + res.setOperator(parseReference(json.getAsJsonObject("operator"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) + res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); + if (json.has("device")) + res.setDevice(parseReference(json.getAsJsonObject("device"))); + if (json.has("height")) + res.setHeightElement(parsePositiveInt(json.get("height").getAsString())); + if (json.has("_height")) + parseElementProperties(json.getAsJsonObject("_height"), res.getHeightElement()); + if (json.has("width")) + res.setWidthElement(parsePositiveInt(json.get("width").getAsString())); + if (json.has("_width")) + parseElementProperties(json.getAsJsonObject("_width"), res.getWidthElement()); + if (json.has("frames")) + res.setFramesElement(parsePositiveInt(json.get("frames").getAsString())); + if (json.has("_frames")) + parseElementProperties(json.getAsJsonObject("_frames"), res.getFramesElement()); + if (json.has("duration")) + res.setDurationElement(parseUnsignedInt(json.get("duration").getAsString())); + if (json.has("_duration")) + parseElementProperties(json.getAsJsonObject("_duration"), res.getDurationElement()); + if (json.has("content")) + res.setContent(parseAttachment(json.getAsJsonObject("content"))); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected Medication parseMedication(JsonObject json) throws IOException, FHIRFormatError { + Medication res = new Medication(); + parseMedicationProperties(json, res); + return res; + } + + protected void parseMedicationProperties(JsonObject json, Medication res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Medication.MedicationStatus.NULL, new Medication.MedicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("isBrand")) + res.setIsBrandElement(parseBoolean(json.get("isBrand").getAsBoolean())); + if (json.has("_isBrand")) + parseElementProperties(json.getAsJsonObject("_isBrand"), res.getIsBrandElement()); + if (json.has("isOverTheCounter")) + res.setIsOverTheCounterElement(parseBoolean(json.get("isOverTheCounter").getAsBoolean())); + if (json.has("_isOverTheCounter")) + parseElementProperties(json.getAsJsonObject("_isOverTheCounter"), res.getIsOverTheCounterElement()); + if (json.has("manufacturer")) + res.setManufacturer(parseReference(json.getAsJsonObject("manufacturer"))); + if (json.has("form")) + res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); + if (json.has("ingredient")) { + JsonArray array = json.getAsJsonArray("ingredient"); + for (int i = 0; i < array.size(); i++) { + res.getIngredient().add(parseMedicationMedicationIngredientComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("package")) + res.setPackage(parseMedicationMedicationPackageComponent(json.getAsJsonObject("package"), res)); + if (json.has("image")) { + JsonArray array = json.getAsJsonArray("image"); + for (int i = 0; i < array.size(); i++) { + res.getImage().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + } + + protected Medication.MedicationIngredientComponent parseMedicationMedicationIngredientComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { + Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent(); + parseMedicationMedicationIngredientComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationMedicationIngredientComponentProperties(JsonObject json, Medication owner, Medication.MedicationIngredientComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type item = parseType("item", json); + if (item != null) + res.setItem(item); + if (json.has("isActive")) + res.setIsActiveElement(parseBoolean(json.get("isActive").getAsBoolean())); + if (json.has("_isActive")) + parseElementProperties(json.getAsJsonObject("_isActive"), res.getIsActiveElement()); + if (json.has("amount")) + res.setAmount(parseRatio(json.getAsJsonObject("amount"))); + } + + protected Medication.MedicationPackageComponent parseMedicationMedicationPackageComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { + Medication.MedicationPackageComponent res = new Medication.MedicationPackageComponent(); + parseMedicationMedicationPackageComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationMedicationPackageComponentProperties(JsonObject json, Medication owner, Medication.MedicationPackageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("container")) + res.setContainer(parseCodeableConcept(json.getAsJsonObject("container"))); + if (json.has("content")) { + JsonArray array = json.getAsJsonArray("content"); + for (int i = 0; i < array.size(); i++) { + res.getContent().add(parseMedicationMedicationPackageContentComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("batch")) { + JsonArray array = json.getAsJsonArray("batch"); + for (int i = 0; i < array.size(); i++) { + res.getBatch().add(parseMedicationMedicationPackageBatchComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Medication.MedicationPackageContentComponent parseMedicationMedicationPackageContentComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { + Medication.MedicationPackageContentComponent res = new Medication.MedicationPackageContentComponent(); + parseMedicationMedicationPackageContentComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationMedicationPackageContentComponentProperties(JsonObject json, Medication owner, Medication.MedicationPackageContentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type item = parseType("item", json); + if (item != null) + res.setItem(item); + if (json.has("amount")) + res.setAmount(parseSimpleQuantity(json.getAsJsonObject("amount"))); + } + + protected Medication.MedicationPackageBatchComponent parseMedicationMedicationPackageBatchComponent(JsonObject json, Medication owner) throws IOException, FHIRFormatError { + Medication.MedicationPackageBatchComponent res = new Medication.MedicationPackageBatchComponent(); + parseMedicationMedicationPackageBatchComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationMedicationPackageBatchComponentProperties(JsonObject json, Medication owner, Medication.MedicationPackageBatchComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("lotNumber")) + res.setLotNumberElement(parseString(json.get("lotNumber").getAsString())); + if (json.has("_lotNumber")) + parseElementProperties(json.getAsJsonObject("_lotNumber"), res.getLotNumberElement()); + if (json.has("expirationDate")) + res.setExpirationDateElement(parseDateTime(json.get("expirationDate").getAsString())); + if (json.has("_expirationDate")) + parseElementProperties(json.getAsJsonObject("_expirationDate"), res.getExpirationDateElement()); + } + + protected MedicationAdministration parseMedicationAdministration(JsonObject json) throws IOException, FHIRFormatError { + MedicationAdministration res = new MedicationAdministration(); + parseMedicationAdministrationProperties(json, res); + return res; + } + + protected void parseMedicationAdministrationProperties(JsonObject json, MedicationAdministration res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationAdministration.MedicationAdministrationStatus.NULL, new MedicationAdministration.MedicationAdministrationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + Type medication = parseType("medication", json); + if (medication != null) + res.setMedication(medication); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("supportingInformation")) { + JsonArray array = json.getAsJsonArray("supportingInformation"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type effective = parseType("effective", json); + if (effective != null) + res.setEffective(effective); + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseMedicationAdministrationMedicationAdministrationPerformerComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("notGiven")) + res.setNotGivenElement(parseBoolean(json.get("notGiven").getAsBoolean())); + if (json.has("_notGiven")) + parseElementProperties(json.getAsJsonObject("_notGiven"), res.getNotGivenElement()); + if (json.has("reasonNotGiven")) { + JsonArray array = json.getAsJsonArray("reasonNotGiven"); + for (int i = 0; i < array.size(); i++) { + res.getReasonNotGiven().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("device")) { + JsonArray array = json.getAsJsonArray("device"); + for (int i = 0; i < array.size(); i++) { + res.getDevice().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dosage")) + res.setDosage(parseMedicationAdministrationMedicationAdministrationDosageComponent(json.getAsJsonObject("dosage"), res)); + if (json.has("eventHistory")) { + JsonArray array = json.getAsJsonArray("eventHistory"); + for (int i = 0; i < array.size(); i++) { + res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationMedicationAdministrationPerformerComponent(JsonObject json, MedicationAdministration owner) throws IOException, FHIRFormatError { + MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent(); + parseMedicationAdministrationMedicationAdministrationPerformerComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationAdministrationMedicationAdministrationPerformerComponentProperties(JsonObject json, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationPerformerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationMedicationAdministrationDosageComponent(JsonObject json, MedicationAdministration owner) throws IOException, FHIRFormatError { + MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent(); + parseMedicationAdministrationMedicationAdministrationDosageComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationAdministrationMedicationAdministrationDosageComponentProperties(JsonObject json, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationDosageComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("site")) + res.setSite(parseCodeableConcept(json.getAsJsonObject("site"))); + if (json.has("route")) + res.setRoute(parseCodeableConcept(json.getAsJsonObject("route"))); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + if (json.has("dose")) + res.setDose(parseSimpleQuantity(json.getAsJsonObject("dose"))); + Type rate = parseType("rate", json); + if (rate != null) + res.setRate(rate); + } + + protected MedicationDispense parseMedicationDispense(JsonObject json) throws IOException, FHIRFormatError { + MedicationDispense res = new MedicationDispense(); + parseMedicationDispenseProperties(json, res); + return res; + } + + protected void parseMedicationDispenseProperties(JsonObject json, MedicationDispense res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationDispense.MedicationDispenseStatus.NULL, new MedicationDispense.MedicationDispenseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + Type medication = parseType("medication", json); + if (medication != null) + res.setMedication(medication); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("supportingInformation")) { + JsonArray array = json.getAsJsonArray("supportingInformation"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseMedicationDispenseMedicationDispensePerformerComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("authorizingPrescription")) { + JsonArray array = json.getAsJsonArray("authorizingPrescription"); + for (int i = 0; i < array.size(); i++) { + res.getAuthorizingPrescription().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("daysSupply")) + res.setDaysSupply(parseSimpleQuantity(json.getAsJsonObject("daysSupply"))); + if (json.has("whenPrepared")) + res.setWhenPreparedElement(parseDateTime(json.get("whenPrepared").getAsString())); + if (json.has("_whenPrepared")) + parseElementProperties(json.getAsJsonObject("_whenPrepared"), res.getWhenPreparedElement()); + if (json.has("whenHandedOver")) + res.setWhenHandedOverElement(parseDateTime(json.get("whenHandedOver").getAsString())); + if (json.has("_whenHandedOver")) + parseElementProperties(json.getAsJsonObject("_whenHandedOver"), res.getWhenHandedOverElement()); + if (json.has("destination")) + res.setDestination(parseReference(json.getAsJsonObject("destination"))); + if (json.has("receiver")) { + JsonArray array = json.getAsJsonArray("receiver"); + for (int i = 0; i < array.size(); i++) { + res.getReceiver().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dosageInstruction")) { + JsonArray array = json.getAsJsonArray("dosageInstruction"); + for (int i = 0; i < array.size(); i++) { + res.getDosageInstruction().add(parseDosage(array.get(i).getAsJsonObject())); + } + }; + if (json.has("substitution")) + res.setSubstitution(parseMedicationDispenseMedicationDispenseSubstitutionComponent(json.getAsJsonObject("substitution"), res)); + if (json.has("detectedIssue")) { + JsonArray array = json.getAsJsonArray("detectedIssue"); + for (int i = 0; i < array.size(); i++) { + res.getDetectedIssue().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("notDone")) + res.setNotDoneElement(parseBoolean(json.get("notDone").getAsBoolean())); + if (json.has("_notDone")) + parseElementProperties(json.getAsJsonObject("_notDone"), res.getNotDoneElement()); + Type notDoneReason = parseType("notDoneReason", json); + if (notDoneReason != null) + res.setNotDoneReason(notDoneReason); + if (json.has("eventHistory")) { + JsonArray array = json.getAsJsonArray("eventHistory"); + for (int i = 0; i < array.size(); i++) { + res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispenseMedicationDispensePerformerComponent(JsonObject json, MedicationDispense owner) throws IOException, FHIRFormatError { + MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent(); + parseMedicationDispenseMedicationDispensePerformerComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationDispenseMedicationDispensePerformerComponentProperties(JsonObject json, MedicationDispense owner, MedicationDispense.MedicationDispensePerformerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected MedicationDispense.MedicationDispenseSubstitutionComponent parseMedicationDispenseMedicationDispenseSubstitutionComponent(JsonObject json, MedicationDispense owner) throws IOException, FHIRFormatError { + MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent(); + parseMedicationDispenseMedicationDispenseSubstitutionComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationDispenseMedicationDispenseSubstitutionComponentProperties(JsonObject json, MedicationDispense owner, MedicationDispense.MedicationDispenseSubstitutionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("wasSubstituted")) + res.setWasSubstitutedElement(parseBoolean(json.get("wasSubstituted").getAsBoolean())); + if (json.has("_wasSubstituted")) + parseElementProperties(json.getAsJsonObject("_wasSubstituted"), res.getWasSubstitutedElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("responsibleParty")) { + JsonArray array = json.getAsJsonArray("responsibleParty"); + for (int i = 0; i < array.size(); i++) { + res.getResponsibleParty().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected MedicationRequest parseMedicationRequest(JsonObject json) throws IOException, FHIRFormatError { + MedicationRequest res = new MedicationRequest(); + parseMedicationRequestProperties(json, res); + return res; + } + + protected void parseMedicationRequestProperties(JsonObject json, MedicationRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("groupIdentifier")) + res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationRequest.MedicationRequestStatus.NULL, new MedicationRequest.MedicationRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("intent")) + res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), MedicationRequest.MedicationRequestIntent.NULL, new MedicationRequest.MedicationRequestIntentEnumFactory())); + if (json.has("_intent")) + parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), MedicationRequest.MedicationRequestPriority.NULL, new MedicationRequest.MedicationRequestPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + Type medication = parseType("medication", json); + if (medication != null) + res.setMedication(medication); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("supportingInformation")) { + JsonArray array = json.getAsJsonArray("supportingInformation"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInformation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("requester")) + res.setRequester(parseMedicationRequestMedicationRequestRequesterComponent(json.getAsJsonObject("requester"), res)); + if (json.has("recorder")) + res.setRecorder(parseReference(json.getAsJsonObject("recorder"))); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dosageInstruction")) { + JsonArray array = json.getAsJsonArray("dosageInstruction"); + for (int i = 0; i < array.size(); i++) { + res.getDosageInstruction().add(parseDosage(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dispenseRequest")) + res.setDispenseRequest(parseMedicationRequestMedicationRequestDispenseRequestComponent(json.getAsJsonObject("dispenseRequest"), res)); + if (json.has("substitution")) + res.setSubstitution(parseMedicationRequestMedicationRequestSubstitutionComponent(json.getAsJsonObject("substitution"), res)); + if (json.has("priorPrescription")) + res.setPriorPrescription(parseReference(json.getAsJsonObject("priorPrescription"))); + if (json.has("detectedIssue")) { + JsonArray array = json.getAsJsonArray("detectedIssue"); + for (int i = 0; i < array.size(); i++) { + res.getDetectedIssue().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("eventHistory")) { + JsonArray array = json.getAsJsonArray("eventHistory"); + for (int i = 0; i < array.size(); i++) { + res.getEventHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected MedicationRequest.MedicationRequestRequesterComponent parseMedicationRequestMedicationRequestRequesterComponent(JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError { + MedicationRequest.MedicationRequestRequesterComponent res = new MedicationRequest.MedicationRequestRequesterComponent(); + parseMedicationRequestMedicationRequestRequesterComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationRequestMedicationRequestRequesterComponentProperties(JsonObject json, MedicationRequest owner, MedicationRequest.MedicationRequestRequesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("agent")) + res.setAgent(parseReference(json.getAsJsonObject("agent"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestMedicationRequestDispenseRequestComponent(JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError { + MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent(); + parseMedicationRequestMedicationRequestDispenseRequestComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationRequestMedicationRequestDispenseRequestComponentProperties(JsonObject json, MedicationRequest owner, MedicationRequest.MedicationRequestDispenseRequestComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("validityPeriod")) + res.setValidityPeriod(parsePeriod(json.getAsJsonObject("validityPeriod"))); + if (json.has("numberOfRepeatsAllowed")) + res.setNumberOfRepeatsAllowedElement(parseUnsignedInt(json.get("numberOfRepeatsAllowed").getAsString())); + if (json.has("_numberOfRepeatsAllowed")) + parseElementProperties(json.getAsJsonObject("_numberOfRepeatsAllowed"), res.getNumberOfRepeatsAllowedElement()); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("expectedSupplyDuration")) + res.setExpectedSupplyDuration(parseDuration(json.getAsJsonObject("expectedSupplyDuration"))); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + } + + protected MedicationRequest.MedicationRequestSubstitutionComponent parseMedicationRequestMedicationRequestSubstitutionComponent(JsonObject json, MedicationRequest owner) throws IOException, FHIRFormatError { + MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent(); + parseMedicationRequestMedicationRequestSubstitutionComponentProperties(json, owner, res); + return res; + } + + protected void parseMedicationRequestMedicationRequestSubstitutionComponentProperties(JsonObject json, MedicationRequest owner, MedicationRequest.MedicationRequestSubstitutionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("allowed")) + res.setAllowedElement(parseBoolean(json.get("allowed").getAsBoolean())); + if (json.has("_allowed")) + parseElementProperties(json.getAsJsonObject("_allowed"), res.getAllowedElement()); + if (json.has("reason")) + res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); + } + + protected MedicationStatement parseMedicationStatement(JsonObject json) throws IOException, FHIRFormatError { + MedicationStatement res = new MedicationStatement(); + parseMedicationStatementProperties(json, res); + return res; + } + + protected void parseMedicationStatementProperties(JsonObject json, MedicationStatement res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), MedicationStatement.MedicationStatementStatus.NULL, new MedicationStatement.MedicationStatementStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + Type medication = parseType("medication", json); + if (medication != null) + res.setMedication(medication); + Type effective = parseType("effective", json); + if (effective != null) + res.setEffective(effective); + if (json.has("dateAsserted")) + res.setDateAssertedElement(parseDateTime(json.get("dateAsserted").getAsString())); + if (json.has("_dateAsserted")) + parseElementProperties(json.getAsJsonObject("_dateAsserted"), res.getDateAssertedElement()); + if (json.has("informationSource")) + res.setInformationSource(parseReference(json.getAsJsonObject("informationSource"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("derivedFrom")) { + JsonArray array = json.getAsJsonArray("derivedFrom"); + for (int i = 0; i < array.size(); i++) { + res.getDerivedFrom().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("taken")) + res.setTakenElement(parseEnumeration(json.get("taken").getAsString(), MedicationStatement.MedicationStatementTaken.NULL, new MedicationStatement.MedicationStatementTakenEnumFactory())); + if (json.has("_taken")) + parseElementProperties(json.getAsJsonObject("_taken"), res.getTakenElement()); + if (json.has("reasonNotTaken")) { + JsonArray array = json.getAsJsonArray("reasonNotTaken"); + for (int i = 0; i < array.size(); i++) { + res.getReasonNotTaken().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dosage")) { + JsonArray array = json.getAsJsonArray("dosage"); + for (int i = 0; i < array.size(); i++) { + res.getDosage().add(parseDosage(array.get(i).getAsJsonObject())); + } + }; + } + + protected MessageDefinition parseMessageDefinition(JsonObject json) throws IOException, FHIRFormatError { + MessageDefinition res = new MessageDefinition(); + parseMessageDefinitionProperties(json, res); + return res; + } + + protected void parseMessageDefinitionProperties(JsonObject json, MessageDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("base")) + res.setBase(parseReference(json.getAsJsonObject("base"))); + if (json.has("parent")) { + JsonArray array = json.getAsJsonArray("parent"); + for (int i = 0; i < array.size(); i++) { + res.getParent().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("replaces")) { + JsonArray array = json.getAsJsonArray("replaces"); + for (int i = 0; i < array.size(); i++) { + res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("event")) + res.setEventElement(parseUri(json.get("event").getAsString())); + if (json.has("_event")) + parseElementProperties(json.getAsJsonObject("_event"), res.getEventElement()); + if (json.has("category")) + res.setCategoryElement(parseEnumeration(json.get("category").getAsString(), MessageDefinition.MessageSignificanceCategory.NULL, new MessageDefinition.MessageSignificanceCategoryEnumFactory())); + if (json.has("_category")) + parseElementProperties(json.getAsJsonObject("_category"), res.getCategoryElement()); + if (json.has("focus")) { + JsonArray array = json.getAsJsonArray("focus"); + for (int i = 0; i < array.size(); i++) { + res.getFocus().add(parseMessageDefinitionMessageDefinitionFocusComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("responseRequired")) + res.setResponseRequiredElement(parseBoolean(json.get("responseRequired").getAsBoolean())); + if (json.has("_responseRequired")) + parseElementProperties(json.getAsJsonObject("_responseRequired"), res.getResponseRequiredElement()); + if (json.has("allowedResponse")) { + JsonArray array = json.getAsJsonArray("allowedResponse"); + for (int i = 0; i < array.size(); i++) { + res.getAllowedResponse().add(parseMessageDefinitionMessageDefinitionAllowedResponseComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionMessageDefinitionFocusComponent(JsonObject json, MessageDefinition owner) throws IOException, FHIRFormatError { + MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent(); + parseMessageDefinitionMessageDefinitionFocusComponentProperties(json, owner, res); + return res; + } + + protected void parseMessageDefinitionMessageDefinitionFocusComponentProperties(JsonObject json, MessageDefinition owner, MessageDefinition.MessageDefinitionFocusComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("profile")) + res.setProfile(parseReference(json.getAsJsonObject("profile"))); + if (json.has("min")) + res.setMinElement(parseUnsignedInt(json.get("min").getAsString())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + } + + protected MessageDefinition.MessageDefinitionAllowedResponseComponent parseMessageDefinitionMessageDefinitionAllowedResponseComponent(JsonObject json, MessageDefinition owner) throws IOException, FHIRFormatError { + MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent(); + parseMessageDefinitionMessageDefinitionAllowedResponseComponentProperties(json, owner, res); + return res; + } + + protected void parseMessageDefinitionMessageDefinitionAllowedResponseComponentProperties(JsonObject json, MessageDefinition owner, MessageDefinition.MessageDefinitionAllowedResponseComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("message")) + res.setMessage(parseReference(json.getAsJsonObject("message"))); + if (json.has("situation")) + res.setSituationElement(parseMarkdown(json.get("situation").getAsString())); + if (json.has("_situation")) + parseElementProperties(json.getAsJsonObject("_situation"), res.getSituationElement()); + } + + protected MessageHeader parseMessageHeader(JsonObject json) throws IOException, FHIRFormatError { + MessageHeader res = new MessageHeader(); + parseMessageHeaderProperties(json, res); + return res; + } + + protected void parseMessageHeaderProperties(JsonObject json, MessageHeader res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("event")) + res.setEvent(parseCoding(json.getAsJsonObject("event"))); + if (json.has("destination")) { + JsonArray array = json.getAsJsonArray("destination"); + for (int i = 0; i < array.size(); i++) { + res.getDestination().add(parseMessageHeaderMessageDestinationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("sender")) + res.setSender(parseReference(json.getAsJsonObject("sender"))); + if (json.has("timestamp")) + res.setTimestampElement(parseInstant(json.get("timestamp").getAsString())); + if (json.has("_timestamp")) + parseElementProperties(json.getAsJsonObject("_timestamp"), res.getTimestampElement()); + if (json.has("enterer")) + res.setEnterer(parseReference(json.getAsJsonObject("enterer"))); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("source")) + res.setSource(parseMessageHeaderMessageSourceComponent(json.getAsJsonObject("source"), res)); + if (json.has("responsible")) + res.setResponsible(parseReference(json.getAsJsonObject("responsible"))); + if (json.has("reason")) + res.setReason(parseCodeableConcept(json.getAsJsonObject("reason"))); + if (json.has("response")) + res.setResponse(parseMessageHeaderMessageHeaderResponseComponent(json.getAsJsonObject("response"), res)); + if (json.has("focus")) { + JsonArray array = json.getAsJsonArray("focus"); + for (int i = 0; i < array.size(); i++) { + res.getFocus().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) + res.setDefinitionElement(parseUri(json.get("definition").getAsString())); + if (json.has("_definition")) + parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); + } + + protected MessageHeader.MessageDestinationComponent parseMessageHeaderMessageDestinationComponent(JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError { + MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent(); + parseMessageHeaderMessageDestinationComponentProperties(json, owner, res); + return res; + } + + protected void parseMessageHeaderMessageDestinationComponentProperties(JsonObject json, MessageHeader owner, MessageHeader.MessageDestinationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("target")) + res.setTarget(parseReference(json.getAsJsonObject("target"))); + if (json.has("endpoint")) + res.setEndpointElement(parseUri(json.get("endpoint").getAsString())); + if (json.has("_endpoint")) + parseElementProperties(json.getAsJsonObject("_endpoint"), res.getEndpointElement()); + if (json.has("receiver")) + res.setReceiver(parseReference(json.getAsJsonObject("receiver"))); + } + + protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError { + MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent(); + parseMessageHeaderMessageSourceComponentProperties(json, owner, res); + return res; + } + + protected void parseMessageHeaderMessageSourceComponentProperties(JsonObject json, MessageHeader owner, MessageHeader.MessageSourceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("software")) + res.setSoftwareElement(parseString(json.get("software").getAsString())); + if (json.has("_software")) + parseElementProperties(json.getAsJsonObject("_software"), res.getSoftwareElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("contact")) + res.setContact(parseContactPoint(json.getAsJsonObject("contact"))); + if (json.has("endpoint")) + res.setEndpointElement(parseUri(json.get("endpoint").getAsString())); + if (json.has("_endpoint")) + parseElementProperties(json.getAsJsonObject("_endpoint"), res.getEndpointElement()); + } + + protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderMessageHeaderResponseComponent(JsonObject json, MessageHeader owner) throws IOException, FHIRFormatError { + MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent(); + parseMessageHeaderMessageHeaderResponseComponentProperties(json, owner, res); + return res; + } + + protected void parseMessageHeaderMessageHeaderResponseComponentProperties(JsonObject json, MessageHeader owner, MessageHeader.MessageHeaderResponseComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifierElement(parseId(json.get("identifier").getAsString())); + if (json.has("_identifier")) + parseElementProperties(json.getAsJsonObject("_identifier"), res.getIdentifierElement()); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), MessageHeader.ResponseType.NULL, new MessageHeader.ResponseTypeEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("details")) + res.setDetails(parseReference(json.getAsJsonObject("details"))); + } + + protected NamingSystem parseNamingSystem(JsonObject json) throws IOException, FHIRFormatError { + NamingSystem res = new NamingSystem(); + parseNamingSystemProperties(json, res); + return res; + } + + protected void parseNamingSystemProperties(JsonObject json, NamingSystem res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), NamingSystem.NamingSystemType.NULL, new NamingSystem.NamingSystemTypeEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("responsible")) + res.setResponsibleElement(parseString(json.get("responsible").getAsString())); + if (json.has("_responsible")) + parseElementProperties(json.getAsJsonObject("_responsible"), res.getResponsibleElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("uniqueId")) { + JsonArray array = json.getAsJsonArray("uniqueId"); + for (int i = 0; i < array.size(); i++) { + res.getUniqueId().add(parseNamingSystemNamingSystemUniqueIdComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("replacedBy")) + res.setReplacedBy(parseReference(json.getAsJsonObject("replacedBy"))); + } + + protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemNamingSystemUniqueIdComponent(JsonObject json, NamingSystem owner) throws IOException, FHIRFormatError { + NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent(); + parseNamingSystemNamingSystemUniqueIdComponentProperties(json, owner, res); + return res; + } + + protected void parseNamingSystemNamingSystemUniqueIdComponentProperties(JsonObject json, NamingSystem owner, NamingSystem.NamingSystemUniqueIdComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), NamingSystem.NamingSystemIdentifierType.NULL, new NamingSystem.NamingSystemIdentifierTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("preferred")) + res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean())); + if (json.has("_preferred")) + parseElementProperties(json.getAsJsonObject("_preferred"), res.getPreferredElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected NutritionOrder parseNutritionOrder(JsonObject json) throws IOException, FHIRFormatError { + NutritionOrder res = new NutritionOrder(); + parseNutritionOrderProperties(json, res); + return res; + } + + protected void parseNutritionOrderProperties(JsonObject json, NutritionOrder res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), NutritionOrder.NutritionOrderStatus.NULL, new NutritionOrder.NutritionOrderStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("dateTime")) + res.setDateTimeElement(parseDateTime(json.get("dateTime").getAsString())); + if (json.has("_dateTime")) + parseElementProperties(json.getAsJsonObject("_dateTime"), res.getDateTimeElement()); + if (json.has("orderer")) + res.setOrderer(parseReference(json.getAsJsonObject("orderer"))); + if (json.has("allergyIntolerance")) { + JsonArray array = json.getAsJsonArray("allergyIntolerance"); + for (int i = 0; i < array.size(); i++) { + res.getAllergyIntolerance().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("foodPreferenceModifier")) { + JsonArray array = json.getAsJsonArray("foodPreferenceModifier"); + for (int i = 0; i < array.size(); i++) { + res.getFoodPreferenceModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("excludeFoodModifier")) { + JsonArray array = json.getAsJsonArray("excludeFoodModifier"); + for (int i = 0; i < array.size(); i++) { + res.getExcludeFoodModifier().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("oralDiet")) + res.setOralDiet(parseNutritionOrderNutritionOrderOralDietComponent(json.getAsJsonObject("oralDiet"), res)); + if (json.has("supplement")) { + JsonArray array = json.getAsJsonArray("supplement"); + for (int i = 0; i < array.size(); i++) { + res.getSupplement().add(parseNutritionOrderNutritionOrderSupplementComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("enteralFormula")) + res.setEnteralFormula(parseNutritionOrderNutritionOrderEnteralFormulaComponent(json.getAsJsonObject("enteralFormula"), res)); + } + + protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderNutritionOrderOralDietComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { + NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent(); + parseNutritionOrderNutritionOrderOralDietComponentProperties(json, owner, res); + return res; + } + + protected void parseNutritionOrderNutritionOrderOralDietComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("schedule")) { + JsonArray array = json.getAsJsonArray("schedule"); + for (int i = 0; i < array.size(); i++) { + res.getSchedule().add(parseTiming(array.get(i).getAsJsonObject())); + } + }; + if (json.has("nutrient")) { + JsonArray array = json.getAsJsonArray("nutrient"); + for (int i = 0; i < array.size(); i++) { + res.getNutrient().add(parseNutritionOrderNutritionOrderOralDietNutrientComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("texture")) { + JsonArray array = json.getAsJsonArray("texture"); + for (int i = 0; i < array.size(); i++) { + res.getTexture().add(parseNutritionOrderNutritionOrderOralDietTextureComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("fluidConsistencyType")) { + JsonArray array = json.getAsJsonArray("fluidConsistencyType"); + for (int i = 0; i < array.size(); i++) { + res.getFluidConsistencyType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("instruction")) + res.setInstructionElement(parseString(json.get("instruction").getAsString())); + if (json.has("_instruction")) + parseElementProperties(json.getAsJsonObject("_instruction"), res.getInstructionElement()); + } + + protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderNutritionOrderOralDietNutrientComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { + NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent(); + parseNutritionOrderNutritionOrderOralDietNutrientComponentProperties(json, owner, res); + return res; + } + + protected void parseNutritionOrderNutritionOrderOralDietNutrientComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietNutrientComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("modifier")) + res.setModifier(parseCodeableConcept(json.getAsJsonObject("modifier"))); + if (json.has("amount")) + res.setAmount(parseSimpleQuantity(json.getAsJsonObject("amount"))); + } + + protected NutritionOrder.NutritionOrderOralDietTextureComponent parseNutritionOrderNutritionOrderOralDietTextureComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { + NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent(); + parseNutritionOrderNutritionOrderOralDietTextureComponentProperties(json, owner, res); + return res; + } + + protected void parseNutritionOrderNutritionOrderOralDietTextureComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietTextureComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("modifier")) + res.setModifier(parseCodeableConcept(json.getAsJsonObject("modifier"))); + if (json.has("foodType")) + res.setFoodType(parseCodeableConcept(json.getAsJsonObject("foodType"))); + } + + protected NutritionOrder.NutritionOrderSupplementComponent parseNutritionOrderNutritionOrderSupplementComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { + NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent(); + parseNutritionOrderNutritionOrderSupplementComponentProperties(json, owner, res); + return res; + } + + protected void parseNutritionOrderNutritionOrderSupplementComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderSupplementComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("productName")) + res.setProductNameElement(parseString(json.get("productName").getAsString())); + if (json.has("_productName")) + parseElementProperties(json.getAsJsonObject("_productName"), res.getProductNameElement()); + if (json.has("schedule")) { + JsonArray array = json.getAsJsonArray("schedule"); + for (int i = 0; i < array.size(); i++) { + res.getSchedule().add(parseTiming(array.get(i).getAsJsonObject())); + } + }; + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("instruction")) + res.setInstructionElement(parseString(json.get("instruction").getAsString())); + if (json.has("_instruction")) + parseElementProperties(json.getAsJsonObject("_instruction"), res.getInstructionElement()); + } + + protected NutritionOrder.NutritionOrderEnteralFormulaComponent parseNutritionOrderNutritionOrderEnteralFormulaComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { + NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent(); + parseNutritionOrderNutritionOrderEnteralFormulaComponentProperties(json, owner, res); + return res; + } + + protected void parseNutritionOrderNutritionOrderEnteralFormulaComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("baseFormulaType")) + res.setBaseFormulaType(parseCodeableConcept(json.getAsJsonObject("baseFormulaType"))); + if (json.has("baseFormulaProductName")) + res.setBaseFormulaProductNameElement(parseString(json.get("baseFormulaProductName").getAsString())); + if (json.has("_baseFormulaProductName")) + parseElementProperties(json.getAsJsonObject("_baseFormulaProductName"), res.getBaseFormulaProductNameElement()); + if (json.has("additiveType")) + res.setAdditiveType(parseCodeableConcept(json.getAsJsonObject("additiveType"))); + if (json.has("additiveProductName")) + res.setAdditiveProductNameElement(parseString(json.get("additiveProductName").getAsString())); + if (json.has("_additiveProductName")) + parseElementProperties(json.getAsJsonObject("_additiveProductName"), res.getAdditiveProductNameElement()); + if (json.has("caloricDensity")) + res.setCaloricDensity(parseSimpleQuantity(json.getAsJsonObject("caloricDensity"))); + if (json.has("routeofAdministration")) + res.setRouteofAdministration(parseCodeableConcept(json.getAsJsonObject("routeofAdministration"))); + if (json.has("administration")) { + JsonArray array = json.getAsJsonArray("administration"); + for (int i = 0; i < array.size(); i++) { + res.getAdministration().add(parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("maxVolumeToDeliver")) + res.setMaxVolumeToDeliver(parseSimpleQuantity(json.getAsJsonObject("maxVolumeToDeliver"))); + if (json.has("administrationInstruction")) + res.setAdministrationInstructionElement(parseString(json.get("administrationInstruction").getAsString())); + if (json.has("_administrationInstruction")) + parseElementProperties(json.getAsJsonObject("_administrationInstruction"), res.getAdministrationInstructionElement()); + } + + protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(JsonObject json, NutritionOrder owner) throws IOException, FHIRFormatError { + NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); + parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentProperties(json, owner, res); + return res; + } + + protected void parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentProperties(JsonObject json, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("schedule")) + res.setSchedule(parseTiming(json.getAsJsonObject("schedule"))); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + Type rate = parseType("rate", json); + if (rate != null) + res.setRate(rate); + } + + protected Observation parseObservation(JsonObject json) throws IOException, FHIRFormatError { + Observation res = new Observation(); + parseObservationProperties(json, res); + return res; + } + + protected void parseObservationProperties(JsonObject json, Observation res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Observation.ObservationStatus.NULL, new Observation.ObservationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type effective = parseType("effective", json); + if (effective != null) + res.setEffective(effective); + if (json.has("issued")) + res.setIssuedElement(parseInstant(json.get("issued").getAsString())); + if (json.has("_issued")) + parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("dataAbsentReason")) + res.setDataAbsentReason(parseCodeableConcept(json.getAsJsonObject("dataAbsentReason"))); + if (json.has("interpretation")) + res.setInterpretation(parseCodeableConcept(json.getAsJsonObject("interpretation"))); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("bodySite")) + res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + if (json.has("specimen")) + res.setSpecimen(parseReference(json.getAsJsonObject("specimen"))); + if (json.has("device")) + res.setDevice(parseReference(json.getAsJsonObject("device"))); + if (json.has("referenceRange")) { + JsonArray array = json.getAsJsonArray("referenceRange"); + for (int i = 0; i < array.size(); i++) { + res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("related")) { + JsonArray array = json.getAsJsonArray("related"); + for (int i = 0; i < array.size(); i++) { + res.getRelated().add(parseObservationObservationRelatedComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("component")) { + JsonArray array = json.getAsJsonArray("component"); + for (int i = 0; i < array.size(); i++) { + res.getComponent().add(parseObservationObservationComponentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Observation.ObservationReferenceRangeComponent parseObservationObservationReferenceRangeComponent(JsonObject json, Observation owner) throws IOException, FHIRFormatError { + Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent(); + parseObservationObservationReferenceRangeComponentProperties(json, owner, res); + return res; + } + + protected void parseObservationObservationReferenceRangeComponentProperties(JsonObject json, Observation owner, Observation.ObservationReferenceRangeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("low")) + res.setLow(parseSimpleQuantity(json.getAsJsonObject("low"))); + if (json.has("high")) + res.setHigh(parseSimpleQuantity(json.getAsJsonObject("high"))); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("appliesTo")) { + JsonArray array = json.getAsJsonArray("appliesTo"); + for (int i = 0; i < array.size(); i++) { + res.getAppliesTo().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("age")) + res.setAge(parseRange(json.getAsJsonObject("age"))); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + } + + protected Observation.ObservationRelatedComponent parseObservationObservationRelatedComponent(JsonObject json, Observation owner) throws IOException, FHIRFormatError { + Observation.ObservationRelatedComponent res = new Observation.ObservationRelatedComponent(); + parseObservationObservationRelatedComponentProperties(json, owner, res); + return res; + } + + protected void parseObservationObservationRelatedComponentProperties(JsonObject json, Observation owner, Observation.ObservationRelatedComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Observation.ObservationRelationshipType.NULL, new Observation.ObservationRelationshipTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("target")) + res.setTarget(parseReference(json.getAsJsonObject("target"))); + } + + protected Observation.ObservationComponentComponent parseObservationObservationComponentComponent(JsonObject json, Observation owner) throws IOException, FHIRFormatError { + Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent(); + parseObservationObservationComponentComponentProperties(json, owner, res); + return res; + } + + protected void parseObservationObservationComponentComponentProperties(JsonObject json, Observation owner, Observation.ObservationComponentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("dataAbsentReason")) + res.setDataAbsentReason(parseCodeableConcept(json.getAsJsonObject("dataAbsentReason"))); + if (json.has("interpretation")) + res.setInterpretation(parseCodeableConcept(json.getAsJsonObject("interpretation"))); + if (json.has("referenceRange")) { + JsonArray array = json.getAsJsonArray("referenceRange"); + for (int i = 0; i < array.size(); i++) { + res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected OperationDefinition parseOperationDefinition(JsonObject json) throws IOException, FHIRFormatError { + OperationDefinition res = new OperationDefinition(); + parseOperationDefinitionProperties(json, res); + return res; + } + + protected void parseOperationDefinitionProperties(JsonObject json, OperationDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), OperationDefinition.OperationKind.NULL, new OperationDefinition.OperationKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("idempotent")) + res.setIdempotentElement(parseBoolean(json.get("idempotent").getAsBoolean())); + if (json.has("_idempotent")) + parseElementProperties(json.getAsJsonObject("_idempotent"), res.getIdempotentElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + if (json.has("base")) + res.setBase(parseReference(json.getAsJsonObject("base"))); + if (json.has("resource")) { + JsonArray array = json.getAsJsonArray("resource"); + for (int i = 0; i < array.size(); i++) { + res.getResource().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_resource")) { + JsonArray array = json.getAsJsonArray("_resource"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getResource().size()) + res.getResource().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getResource().get(i)); + } + }; + if (json.has("system")) + res.setSystemElement(parseBoolean(json.get("system").getAsBoolean())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("type")) + res.setTypeElement(parseBoolean(json.get("type").getAsBoolean())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("instance")) + res.setInstanceElement(parseBoolean(json.get("instance").getAsBoolean())); + if (json.has("_instance")) + parseElementProperties(json.getAsJsonObject("_instance"), res.getInstanceElement()); + if (json.has("parameter")) { + JsonArray array = json.getAsJsonArray("parameter"); + for (int i = 0; i < array.size(); i++) { + res.getParameter().add(parseOperationDefinitionOperationDefinitionParameterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("overload")) { + JsonArray array = json.getAsJsonArray("overload"); + for (int i = 0; i < array.size(); i++) { + res.getOverload().add(parseOperationDefinitionOperationDefinitionOverloadComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionOperationDefinitionParameterComponent(JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError { + OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent(); + parseOperationDefinitionOperationDefinitionParameterComponentProperties(json, owner, res); + return res; + } + + protected void parseOperationDefinitionOperationDefinitionParameterComponentProperties(JsonObject json, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseCode(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("use")) + res.setUseElement(parseEnumeration(json.get("use").getAsString(), OperationDefinition.OperationParameterUse.NULL, new OperationDefinition.OperationParameterUseEnumFactory())); + if (json.has("_use")) + parseElementProperties(json.getAsJsonObject("_use"), res.getUseElement()); + if (json.has("min")) + res.setMinElement(parseInteger(json.get("min").getAsLong())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("searchType")) + res.setSearchTypeElement(parseEnumeration(json.get("searchType").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); + if (json.has("_searchType")) + parseElementProperties(json.getAsJsonObject("_searchType"), res.getSearchTypeElement()); + if (json.has("profile")) + res.setProfile(parseReference(json.getAsJsonObject("profile"))); + if (json.has("binding")) + res.setBinding(parseOperationDefinitionOperationDefinitionParameterBindingComponent(json.getAsJsonObject("binding"), owner)); + if (json.has("part")) { + JsonArray array = json.getAsJsonArray("part"); + for (int i = 0; i < array.size(); i++) { + res.getPart().add(parseOperationDefinitionOperationDefinitionParameterComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionOperationDefinitionParameterBindingComponent(JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError { + OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent(); + parseOperationDefinitionOperationDefinitionParameterBindingComponentProperties(json, owner, res); + return res; + } + + protected void parseOperationDefinitionOperationDefinitionParameterBindingComponentProperties(JsonObject json, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterBindingComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("strength")) + res.setStrengthElement(parseEnumeration(json.get("strength").getAsString(), Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); + if (json.has("_strength")) + parseElementProperties(json.getAsJsonObject("_strength"), res.getStrengthElement()); + Type valueSet = parseType("valueSet", json); + if (valueSet != null) + res.setValueSet(valueSet); + } + + protected OperationDefinition.OperationDefinitionOverloadComponent parseOperationDefinitionOperationDefinitionOverloadComponent(JsonObject json, OperationDefinition owner) throws IOException, FHIRFormatError { + OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent(); + parseOperationDefinitionOperationDefinitionOverloadComponentProperties(json, owner, res); + return res; + } + + protected void parseOperationDefinitionOperationDefinitionOverloadComponentProperties(JsonObject json, OperationDefinition owner, OperationDefinition.OperationDefinitionOverloadComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("parameterName")) { + JsonArray array = json.getAsJsonArray("parameterName"); + for (int i = 0; i < array.size(); i++) { + res.getParameterName().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_parameterName")) { + JsonArray array = json.getAsJsonArray("_parameterName"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getParameterName().size()) + res.getParameterName().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getParameterName().get(i)); + } + }; + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected OperationOutcome parseOperationOutcome(JsonObject json) throws IOException, FHIRFormatError { + OperationOutcome res = new OperationOutcome(); + parseOperationOutcomeProperties(json, res); + return res; + } + + protected void parseOperationOutcomeProperties(JsonObject json, OperationOutcome res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("issue")) { + JsonArray array = json.getAsJsonArray("issue"); + for (int i = 0; i < array.size(); i++) { + res.getIssue().add(parseOperationOutcomeOperationOutcomeIssueComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeOperationOutcomeIssueComponent(JsonObject json, OperationOutcome owner) throws IOException, FHIRFormatError { + OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent(); + parseOperationOutcomeOperationOutcomeIssueComponentProperties(json, owner, res); + return res; + } + + protected void parseOperationOutcomeOperationOutcomeIssueComponentProperties(JsonObject json, OperationOutcome owner, OperationOutcome.OperationOutcomeIssueComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("severity")) + res.setSeverityElement(parseEnumeration(json.get("severity").getAsString(), OperationOutcome.IssueSeverity.NULL, new OperationOutcome.IssueSeverityEnumFactory())); + if (json.has("_severity")) + parseElementProperties(json.getAsJsonObject("_severity"), res.getSeverityElement()); + if (json.has("code")) + res.setCodeElement(parseEnumeration(json.get("code").getAsString(), OperationOutcome.IssueType.NULL, new OperationOutcome.IssueTypeEnumFactory())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("details")) + res.setDetails(parseCodeableConcept(json.getAsJsonObject("details"))); + if (json.has("diagnostics")) + res.setDiagnosticsElement(parseString(json.get("diagnostics").getAsString())); + if (json.has("_diagnostics")) + parseElementProperties(json.getAsJsonObject("_diagnostics"), res.getDiagnosticsElement()); + if (json.has("location")) { + JsonArray array = json.getAsJsonArray("location"); + for (int i = 0; i < array.size(); i++) { + res.getLocation().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_location")) { + JsonArray array = json.getAsJsonArray("_location"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getLocation().size()) + res.getLocation().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getLocation().get(i)); + } + }; + if (json.has("expression")) { + JsonArray array = json.getAsJsonArray("expression"); + for (int i = 0; i < array.size(); i++) { + res.getExpression().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_expression")) { + JsonArray array = json.getAsJsonArray("_expression"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getExpression().size()) + res.getExpression().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getExpression().get(i)); + } + }; + } + + protected Organization parseOrganization(JsonObject json) throws IOException, FHIRFormatError { + Organization res = new Organization(); + parseOrganizationProperties(json, res); + return res; + } + + protected void parseOrganizationProperties(JsonObject json, Organization res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("type")) { + JsonArray array = json.getAsJsonArray("type"); + for (int i = 0; i < array.size(); i++) { + res.getType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("alias")) { + JsonArray array = json.getAsJsonArray("alias"); + for (int i = 0; i < array.size(); i++) { + res.getAlias().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_alias")) { + JsonArray array = json.getAsJsonArray("_alias"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getAlias().size()) + res.getAlias().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getAlias().get(i)); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("address")) { + JsonArray array = json.getAsJsonArray("address"); + for (int i = 0; i < array.size(); i++) { + res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) + res.setPartOf(parseReference(json.getAsJsonObject("partOf"))); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseOrganizationOrganizationContactComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Organization.OrganizationContactComponent parseOrganizationOrganizationContactComponent(JsonObject json, Organization owner) throws IOException, FHIRFormatError { + Organization.OrganizationContactComponent res = new Organization.OrganizationContactComponent(); + parseOrganizationOrganizationContactComponentProperties(json, owner, res); + return res; + } + + protected void parseOrganizationOrganizationContactComponentProperties(JsonObject json, Organization owner, Organization.OrganizationContactComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("purpose")) + res.setPurpose(parseCodeableConcept(json.getAsJsonObject("purpose"))); + if (json.has("name")) + res.setName(parseHumanName(json.getAsJsonObject("name"))); + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("address")) + res.setAddress(parseAddress(json.getAsJsonObject("address"))); + } + + protected Patient parsePatient(JsonObject json) throws IOException, FHIRFormatError { + Patient res = new Patient(); + parsePatientProperties(json, res); + return res; + } + + protected void parsePatientProperties(JsonObject json, Patient res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("name")) { + JsonArray array = json.getAsJsonArray("name"); + for (int i = 0; i < array.size(); i++) { + res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("gender")) + res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + if (json.has("_gender")) + parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); + if (json.has("birthDate")) + res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); + if (json.has("_birthDate")) + parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); + Type deceased = parseType("deceased", json); + if (deceased != null) + res.setDeceased(deceased); + if (json.has("address")) { + JsonArray array = json.getAsJsonArray("address"); + for (int i = 0; i < array.size(); i++) { + res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); + } + }; + if (json.has("maritalStatus")) + res.setMaritalStatus(parseCodeableConcept(json.getAsJsonObject("maritalStatus"))); + Type multipleBirth = parseType("multipleBirth", json); + if (multipleBirth != null) + res.setMultipleBirth(multipleBirth); + if (json.has("photo")) { + JsonArray array = json.getAsJsonArray("photo"); + for (int i = 0; i < array.size(); i++) { + res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parsePatientContactComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("animal")) + res.setAnimal(parsePatientAnimalComponent(json.getAsJsonObject("animal"), res)); + if (json.has("communication")) { + JsonArray array = json.getAsJsonArray("communication"); + for (int i = 0; i < array.size(); i++) { + res.getCommunication().add(parsePatientPatientCommunicationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("generalPractitioner")) { + JsonArray array = json.getAsJsonArray("generalPractitioner"); + for (int i = 0; i < array.size(); i++) { + res.getGeneralPractitioner().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("managingOrganization")) + res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parsePatientPatientLinkComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Patient.ContactComponent parsePatientContactComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { + Patient.ContactComponent res = new Patient.ContactComponent(); + parsePatientContactComponentProperties(json, owner, res); + return res; + } + + protected void parsePatientContactComponentProperties(JsonObject json, Patient owner, Patient.ContactComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("relationship")) { + JsonArray array = json.getAsJsonArray("relationship"); + for (int i = 0; i < array.size(); i++) { + res.getRelationship().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("name")) + res.setName(parseHumanName(json.getAsJsonObject("name"))); + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("address")) + res.setAddress(parseAddress(json.getAsJsonObject("address"))); + if (json.has("gender")) + res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + if (json.has("_gender")) + parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected Patient.AnimalComponent parsePatientAnimalComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { + Patient.AnimalComponent res = new Patient.AnimalComponent(); + parsePatientAnimalComponentProperties(json, owner, res); + return res; + } + + protected void parsePatientAnimalComponentProperties(JsonObject json, Patient owner, Patient.AnimalComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("species")) + res.setSpecies(parseCodeableConcept(json.getAsJsonObject("species"))); + if (json.has("breed")) + res.setBreed(parseCodeableConcept(json.getAsJsonObject("breed"))); + if (json.has("genderStatus")) + res.setGenderStatus(parseCodeableConcept(json.getAsJsonObject("genderStatus"))); + } + + protected Patient.PatientCommunicationComponent parsePatientPatientCommunicationComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { + Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent(); + parsePatientPatientCommunicationComponentProperties(json, owner, res); + return res; + } + + protected void parsePatientPatientCommunicationComponentProperties(JsonObject json, Patient owner, Patient.PatientCommunicationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("language")) + res.setLanguage(parseCodeableConcept(json.getAsJsonObject("language"))); + if (json.has("preferred")) + res.setPreferredElement(parseBoolean(json.get("preferred").getAsBoolean())); + if (json.has("_preferred")) + parseElementProperties(json.getAsJsonObject("_preferred"), res.getPreferredElement()); + } + + protected Patient.PatientLinkComponent parsePatientPatientLinkComponent(JsonObject json, Patient owner) throws IOException, FHIRFormatError { + Patient.PatientLinkComponent res = new Patient.PatientLinkComponent(); + parsePatientPatientLinkComponentProperties(json, owner, res); + return res; + } + + protected void parsePatientPatientLinkComponentProperties(JsonObject json, Patient owner, Patient.PatientLinkComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("other")) + res.setOther(parseReference(json.getAsJsonObject("other"))); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Patient.LinkType.NULL, new Patient.LinkTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + } + + protected PaymentNotice parsePaymentNotice(JsonObject json) throws IOException, FHIRFormatError { + PaymentNotice res = new PaymentNotice(); + parsePaymentNoticeProperties(json, res); + return res; + } + + protected void parsePaymentNoticeProperties(JsonObject json, PaymentNotice res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), PaymentNotice.PaymentNoticeStatus.NULL, new PaymentNotice.PaymentNoticeStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("response")) + res.setResponse(parseReference(json.getAsJsonObject("response"))); + if (json.has("statusDate")) + res.setStatusDateElement(parseDate(json.get("statusDate").getAsString())); + if (json.has("_statusDate")) + parseElementProperties(json.getAsJsonObject("_statusDate"), res.getStatusDateElement()); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("target")) + res.setTarget(parseReference(json.getAsJsonObject("target"))); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("paymentStatus")) + res.setPaymentStatus(parseCodeableConcept(json.getAsJsonObject("paymentStatus"))); + } + + protected PaymentReconciliation parsePaymentReconciliation(JsonObject json) throws IOException, FHIRFormatError { + PaymentReconciliation res = new PaymentReconciliation(); + parsePaymentReconciliationProperties(json, res); + return res; + } + + protected void parsePaymentReconciliationProperties(JsonObject json, PaymentReconciliation res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), PaymentReconciliation.PaymentReconciliationStatus.NULL, new PaymentReconciliation.PaymentReconciliationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("disposition")) + res.setDispositionElement(parseString(json.get("disposition").getAsString())); + if (json.has("_disposition")) + parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); + if (json.has("requestProvider")) + res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); + if (json.has("requestOrganization")) + res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); + if (json.has("detail")) { + JsonArray array = json.getAsJsonArray("detail"); + for (int i = 0; i < array.size(); i++) { + res.getDetail().add(parsePaymentReconciliationDetailsComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("form")) + res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); + if (json.has("total")) + res.setTotal(parseMoney(json.getAsJsonObject("total"))); + if (json.has("processNote")) { + JsonArray array = json.getAsJsonArray("processNote"); + for (int i = 0; i < array.size(); i++) { + res.getProcessNote().add(parsePaymentReconciliationNotesComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected PaymentReconciliation.DetailsComponent parsePaymentReconciliationDetailsComponent(JsonObject json, PaymentReconciliation owner) throws IOException, FHIRFormatError { + PaymentReconciliation.DetailsComponent res = new PaymentReconciliation.DetailsComponent(); + parsePaymentReconciliationDetailsComponentProperties(json, owner, res); + return res; + } + + protected void parsePaymentReconciliationDetailsComponentProperties(JsonObject json, PaymentReconciliation owner, PaymentReconciliation.DetailsComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("response")) + res.setResponse(parseReference(json.getAsJsonObject("response"))); + if (json.has("submitter")) + res.setSubmitter(parseReference(json.getAsJsonObject("submitter"))); + if (json.has("payee")) + res.setPayee(parseReference(json.getAsJsonObject("payee"))); + if (json.has("date")) + res.setDateElement(parseDate(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("amount")) + res.setAmount(parseMoney(json.getAsJsonObject("amount"))); + } + + protected PaymentReconciliation.NotesComponent parsePaymentReconciliationNotesComponent(JsonObject json, PaymentReconciliation owner) throws IOException, FHIRFormatError { + PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent(); + parsePaymentReconciliationNotesComponentProperties(json, owner, res); + return res; + } + + protected void parsePaymentReconciliationNotesComponentProperties(JsonObject json, PaymentReconciliation owner, PaymentReconciliation.NotesComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + } + + protected Person parsePerson(JsonObject json) throws IOException, FHIRFormatError { + Person res = new Person(); + parsePersonProperties(json, res); + return res; + } + + protected void parsePersonProperties(JsonObject json, Person res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("name")) { + JsonArray array = json.getAsJsonArray("name"); + for (int i = 0; i < array.size(); i++) { + res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("gender")) + res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + if (json.has("_gender")) + parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); + if (json.has("birthDate")) + res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); + if (json.has("_birthDate")) + parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); + if (json.has("address")) { + JsonArray array = json.getAsJsonArray("address"); + for (int i = 0; i < array.size(); i++) { + res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); + } + }; + if (json.has("photo")) + res.setPhoto(parseAttachment(json.getAsJsonObject("photo"))); + if (json.has("managingOrganization")) + res.setManagingOrganization(parseReference(json.getAsJsonObject("managingOrganization"))); + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parsePersonPersonLinkComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Person.PersonLinkComponent parsePersonPersonLinkComponent(JsonObject json, Person owner) throws IOException, FHIRFormatError { + Person.PersonLinkComponent res = new Person.PersonLinkComponent(); + parsePersonPersonLinkComponentProperties(json, owner, res); + return res; + } + + protected void parsePersonPersonLinkComponentProperties(JsonObject json, Person owner, Person.PersonLinkComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("target")) + res.setTarget(parseReference(json.getAsJsonObject("target"))); + if (json.has("assurance")) + res.setAssuranceElement(parseEnumeration(json.get("assurance").getAsString(), Person.IdentityAssuranceLevel.NULL, new Person.IdentityAssuranceLevelEnumFactory())); + if (json.has("_assurance")) + parseElementProperties(json.getAsJsonObject("_assurance"), res.getAssuranceElement()); + } + + protected PlanDefinition parsePlanDefinition(JsonObject json) throws IOException, FHIRFormatError { + PlanDefinition res = new PlanDefinition(); + parsePlanDefinitionProperties(json, res); + return res; + } + + protected void parsePlanDefinitionProperties(JsonObject json, PlanDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contributor")) { + JsonArray array = json.getAsJsonArray("contributor"); + for (int i = 0; i < array.size(); i++) { + res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("library")) { + JsonArray array = json.getAsJsonArray("library"); + for (int i = 0; i < array.size(); i++) { + res.getLibrary().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("goal")) { + JsonArray array = json.getAsJsonArray("goal"); + for (int i = 0; i < array.size(); i++) { + res.getGoal().add(parsePlanDefinitionPlanDefinitionGoalComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionPlanDefinitionGoalComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent(); + parsePlanDefinitionPlanDefinitionGoalComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionGoalComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("description")) + res.setDescription(parseCodeableConcept(json.getAsJsonObject("description"))); + if (json.has("priority")) + res.setPriority(parseCodeableConcept(json.getAsJsonObject("priority"))); + if (json.has("start")) + res.setStart(parseCodeableConcept(json.getAsJsonObject("start"))); + if (json.has("addresses")) { + JsonArray array = json.getAsJsonArray("addresses"); + for (int i = 0; i < array.size(); i++) { + res.getAddresses().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("documentation")) { + JsonArray array = json.getAsJsonArray("documentation"); + for (int i = 0; i < array.size(); i++) { + res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("target")) { + JsonArray array = json.getAsJsonArray("target"); + for (int i = 0; i < array.size(); i++) { + res.getTarget().add(parsePlanDefinitionPlanDefinitionGoalTargetComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionPlanDefinitionGoalTargetComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent(); + parsePlanDefinitionPlanDefinitionGoalTargetComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionGoalTargetComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalTargetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("measure")) + res.setMeasure(parseCodeableConcept(json.getAsJsonObject("measure"))); + Type detail = parseType("detail", json); + if (detail != null) + res.setDetail(detail); + if (json.has("due")) + res.setDue(parseDuration(json.getAsJsonObject("due"))); + } + + protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionPlanDefinitionActionComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent(); + parsePlanDefinitionPlanDefinitionActionComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionActionComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("prefix")) + res.setPrefixElement(parseString(json.get("prefix").getAsString())); + if (json.has("_prefix")) + parseElementProperties(json.getAsJsonObject("_prefix"), res.getPrefixElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("textEquivalent")) + res.setTextEquivalentElement(parseString(json.get("textEquivalent").getAsString())); + if (json.has("_textEquivalent")) + parseElementProperties(json.getAsJsonObject("_textEquivalent"), res.getTextEquivalentElement()); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("documentation")) { + JsonArray array = json.getAsJsonArray("documentation"); + for (int i = 0; i < array.size(); i++) { + res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("goalId")) { + JsonArray array = json.getAsJsonArray("goalId"); + for (int i = 0; i < array.size(); i++) { + res.getGoalId().add(parseId(array.get(i).getAsString())); + } + }; + if (json.has("_goalId")) { + JsonArray array = json.getAsJsonArray("_goalId"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getGoalId().size()) + res.getGoalId().add(parseId(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getGoalId().get(i)); + } + }; + if (json.has("triggerDefinition")) { + JsonArray array = json.getAsJsonArray("triggerDefinition"); + for (int i = 0; i < array.size(); i++) { + res.getTriggerDefinition().add(parseTriggerDefinition(array.get(i).getAsJsonObject())); + } + }; + if (json.has("condition")) { + JsonArray array = json.getAsJsonArray("condition"); + for (int i = 0; i < array.size(); i++) { + res.getCondition().add(parsePlanDefinitionPlanDefinitionActionConditionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("input")) { + JsonArray array = json.getAsJsonArray("input"); + for (int i = 0; i < array.size(); i++) { + res.getInput().add(parseDataRequirement(array.get(i).getAsJsonObject())); + } + }; + if (json.has("output")) { + JsonArray array = json.getAsJsonArray("output"); + for (int i = 0; i < array.size(); i++) { + res.getOutput().add(parseDataRequirement(array.get(i).getAsJsonObject())); + } + }; + if (json.has("relatedAction")) { + JsonArray array = json.getAsJsonArray("relatedAction"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedAction().add(parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parsePlanDefinitionPlanDefinitionActionParticipantComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("type")) + res.setType(parseCoding(json.getAsJsonObject("type"))); + if (json.has("groupingBehavior")) + res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(), PlanDefinition.ActionGroupingBehavior.NULL, new PlanDefinition.ActionGroupingBehaviorEnumFactory())); + if (json.has("_groupingBehavior")) + parseElementProperties(json.getAsJsonObject("_groupingBehavior"), res.getGroupingBehaviorElement()); + if (json.has("selectionBehavior")) + res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(), PlanDefinition.ActionSelectionBehavior.NULL, new PlanDefinition.ActionSelectionBehaviorEnumFactory())); + if (json.has("_selectionBehavior")) + parseElementProperties(json.getAsJsonObject("_selectionBehavior"), res.getSelectionBehaviorElement()); + if (json.has("requiredBehavior")) + res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(), PlanDefinition.ActionRequiredBehavior.NULL, new PlanDefinition.ActionRequiredBehaviorEnumFactory())); + if (json.has("_requiredBehavior")) + parseElementProperties(json.getAsJsonObject("_requiredBehavior"), res.getRequiredBehaviorElement()); + if (json.has("precheckBehavior")) + res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(), PlanDefinition.ActionPrecheckBehavior.NULL, new PlanDefinition.ActionPrecheckBehaviorEnumFactory())); + if (json.has("_precheckBehavior")) + parseElementProperties(json.getAsJsonObject("_precheckBehavior"), res.getPrecheckBehaviorElement()); + if (json.has("cardinalityBehavior")) + res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(), PlanDefinition.ActionCardinalityBehavior.NULL, new PlanDefinition.ActionCardinalityBehaviorEnumFactory())); + if (json.has("_cardinalityBehavior")) + parseElementProperties(json.getAsJsonObject("_cardinalityBehavior"), res.getCardinalityBehaviorElement()); + if (json.has("definition")) + res.setDefinition(parseReference(json.getAsJsonObject("definition"))); + if (json.has("transform")) + res.setTransform(parseReference(json.getAsJsonObject("transform"))); + if (json.has("dynamicValue")) { + JsonArray array = json.getAsJsonArray("dynamicValue"); + for (int i = 0; i < array.size(); i++) { + res.getDynamicValue().add(parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionPlanDefinitionActionConditionComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent(); + parsePlanDefinitionPlanDefinitionActionConditionComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionActionConditionComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionConditionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), PlanDefinition.ActionConditionKind.NULL, new PlanDefinition.ActionConditionKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("language")) + res.setLanguageElement(parseString(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + } + + protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent(); + parsePlanDefinitionPlanDefinitionActionRelatedActionComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionActionRelatedActionComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionRelatedActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("actionId")) + res.setActionIdElement(parseId(json.get("actionId").getAsString())); + if (json.has("_actionId")) + parseElementProperties(json.getAsJsonObject("_actionId"), res.getActionIdElement()); + if (json.has("relationship")) + res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), PlanDefinition.ActionRelationshipType.NULL, new PlanDefinition.ActionRelationshipTypeEnumFactory())); + if (json.has("_relationship")) + parseElementProperties(json.getAsJsonObject("_relationship"), res.getRelationshipElement()); + Type offset = parseType("offset", json); + if (offset != null) + res.setOffset(offset); + } + + protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionPlanDefinitionActionParticipantComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent(); + parsePlanDefinitionPlanDefinitionActionParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionActionParticipantComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), PlanDefinition.ActionParticipantType.NULL, new PlanDefinition.ActionParticipantTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + } + + protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(JsonObject json, PlanDefinition owner) throws IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent(); + parsePlanDefinitionPlanDefinitionActionDynamicValueComponentProperties(json, owner, res); + return res; + } + + protected void parsePlanDefinitionPlanDefinitionActionDynamicValueComponentProperties(JsonObject json, PlanDefinition owner, PlanDefinition.PlanDefinitionActionDynamicValueComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("language")) + res.setLanguageElement(parseString(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + } + + protected Practitioner parsePractitioner(JsonObject json) throws IOException, FHIRFormatError { + Practitioner res = new Practitioner(); + parsePractitionerProperties(json, res); + return res; + } + + protected void parsePractitionerProperties(JsonObject json, Practitioner res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("name")) { + JsonArray array = json.getAsJsonArray("name"); + for (int i = 0; i < array.size(); i++) { + res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("address")) { + JsonArray array = json.getAsJsonArray("address"); + for (int i = 0; i < array.size(); i++) { + res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); + } + }; + if (json.has("gender")) + res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + if (json.has("_gender")) + parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); + if (json.has("birthDate")) + res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); + if (json.has("_birthDate")) + parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); + if (json.has("photo")) { + JsonArray array = json.getAsJsonArray("photo"); + for (int i = 0; i < array.size(); i++) { + res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + if (json.has("qualification")) { + JsonArray array = json.getAsJsonArray("qualification"); + for (int i = 0; i < array.size(); i++) { + res.getQualification().add(parsePractitionerPractitionerQualificationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("communication")) { + JsonArray array = json.getAsJsonArray("communication"); + for (int i = 0; i < array.size(); i++) { + res.getCommunication().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected Practitioner.PractitionerQualificationComponent parsePractitionerPractitionerQualificationComponent(JsonObject json, Practitioner owner) throws IOException, FHIRFormatError { + Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent(); + parsePractitionerPractitionerQualificationComponentProperties(json, owner, res); + return res; + } + + protected void parsePractitionerPractitionerQualificationComponentProperties(JsonObject json, Practitioner owner, Practitioner.PractitionerQualificationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("issuer")) + res.setIssuer(parseReference(json.getAsJsonObject("issuer"))); + } + + protected PractitionerRole parsePractitionerRole(JsonObject json) throws IOException, FHIRFormatError { + PractitionerRole res = new PractitionerRole(); + parsePractitionerRoleProperties(json, res); + return res; + } + + protected void parsePractitionerRoleProperties(JsonObject json, PractitionerRole res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("practitioner")) + res.setPractitioner(parseReference(json.getAsJsonObject("practitioner"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialty")) { + JsonArray array = json.getAsJsonArray("specialty"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("location")) { + JsonArray array = json.getAsJsonArray("location"); + for (int i = 0; i < array.size(); i++) { + res.getLocation().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("healthcareService")) { + JsonArray array = json.getAsJsonArray("healthcareService"); + for (int i = 0; i < array.size(); i++) { + res.getHealthcareService().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("availableTime")) { + JsonArray array = json.getAsJsonArray("availableTime"); + for (int i = 0; i < array.size(); i++) { + res.getAvailableTime().add(parsePractitionerRolePractitionerRoleAvailableTimeComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("notAvailable")) { + JsonArray array = json.getAsJsonArray("notAvailable"); + for (int i = 0; i < array.size(); i++) { + res.getNotAvailable().add(parsePractitionerRolePractitionerRoleNotAvailableComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("availabilityExceptions")) + res.setAvailabilityExceptionsElement(parseString(json.get("availabilityExceptions").getAsString())); + if (json.has("_availabilityExceptions")) + parseElementProperties(json.getAsJsonObject("_availabilityExceptions"), res.getAvailabilityExceptionsElement()); + if (json.has("endpoint")) { + JsonArray array = json.getAsJsonArray("endpoint"); + for (int i = 0; i < array.size(); i++) { + res.getEndpoint().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected PractitionerRole.PractitionerRoleAvailableTimeComponent parsePractitionerRolePractitionerRoleAvailableTimeComponent(JsonObject json, PractitionerRole owner) throws IOException, FHIRFormatError { + PractitionerRole.PractitionerRoleAvailableTimeComponent res = new PractitionerRole.PractitionerRoleAvailableTimeComponent(); + parsePractitionerRolePractitionerRoleAvailableTimeComponentProperties(json, owner, res); + return res; + } + + protected void parsePractitionerRolePractitionerRoleAvailableTimeComponentProperties(JsonObject json, PractitionerRole owner, PractitionerRole.PractitionerRoleAvailableTimeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("daysOfWeek")) { + JsonArray array = json.getAsJsonArray("daysOfWeek"); + for (int i = 0; i < array.size(); i++) { + res.getDaysOfWeek().add(parseEnumeration(array.get(i).getAsString(), PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); + } + }; + if (json.has("_daysOfWeek")) { + JsonArray array = json.getAsJsonArray("_daysOfWeek"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getDaysOfWeek().size()) + res.getDaysOfWeek().add(parseEnumeration(null, PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getDaysOfWeek().get(i)); + } + }; + if (json.has("allDay")) + res.setAllDayElement(parseBoolean(json.get("allDay").getAsBoolean())); + if (json.has("_allDay")) + parseElementProperties(json.getAsJsonObject("_allDay"), res.getAllDayElement()); + if (json.has("availableStartTime")) + res.setAvailableStartTimeElement(parseTime(json.get("availableStartTime").getAsString())); + if (json.has("_availableStartTime")) + parseElementProperties(json.getAsJsonObject("_availableStartTime"), res.getAvailableStartTimeElement()); + if (json.has("availableEndTime")) + res.setAvailableEndTimeElement(parseTime(json.get("availableEndTime").getAsString())); + if (json.has("_availableEndTime")) + parseElementProperties(json.getAsJsonObject("_availableEndTime"), res.getAvailableEndTimeElement()); + } + + protected PractitionerRole.PractitionerRoleNotAvailableComponent parsePractitionerRolePractitionerRoleNotAvailableComponent(JsonObject json, PractitionerRole owner) throws IOException, FHIRFormatError { + PractitionerRole.PractitionerRoleNotAvailableComponent res = new PractitionerRole.PractitionerRoleNotAvailableComponent(); + parsePractitionerRolePractitionerRoleNotAvailableComponentProperties(json, owner, res); + return res; + } + + protected void parsePractitionerRolePractitionerRoleNotAvailableComponentProperties(JsonObject json, PractitionerRole owner, PractitionerRole.PractitionerRoleNotAvailableComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("during")) + res.setDuring(parsePeriod(json.getAsJsonObject("during"))); + } + + protected Procedure parseProcedure(JsonObject json) throws IOException, FHIRFormatError { + Procedure res = new Procedure(); + parseProcedureProperties(json, res); + return res; + } + + protected void parseProcedureProperties(JsonObject json, Procedure res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Procedure.ProcedureStatus.NULL, new Procedure.ProcedureStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("notDone")) + res.setNotDoneElement(parseBoolean(json.get("notDone").getAsBoolean())); + if (json.has("_notDone")) + parseElementProperties(json.getAsJsonObject("_notDone"), res.getNotDoneElement()); + if (json.has("notDoneReason")) + res.setNotDoneReason(parseCodeableConcept(json.getAsJsonObject("notDoneReason"))); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type performed = parseType("performed", json); + if (performed != null) + res.setPerformed(performed); + if (json.has("performer")) { + JsonArray array = json.getAsJsonArray("performer"); + for (int i = 0; i < array.size(); i++) { + res.getPerformer().add(parseProcedureProcedurePerformerComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) { + JsonArray array = json.getAsJsonArray("bodySite"); + for (int i = 0; i < array.size(); i++) { + res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("outcome")) + res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); + if (json.has("report")) { + JsonArray array = json.getAsJsonArray("report"); + for (int i = 0; i < array.size(); i++) { + res.getReport().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("complication")) { + JsonArray array = json.getAsJsonArray("complication"); + for (int i = 0; i < array.size(); i++) { + res.getComplication().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("complicationDetail")) { + JsonArray array = json.getAsJsonArray("complicationDetail"); + for (int i = 0; i < array.size(); i++) { + res.getComplicationDetail().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("followUp")) { + JsonArray array = json.getAsJsonArray("followUp"); + for (int i = 0; i < array.size(); i++) { + res.getFollowUp().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("focalDevice")) { + JsonArray array = json.getAsJsonArray("focalDevice"); + for (int i = 0; i < array.size(); i++) { + res.getFocalDevice().add(parseProcedureProcedureFocalDeviceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("usedReference")) { + JsonArray array = json.getAsJsonArray("usedReference"); + for (int i = 0; i < array.size(); i++) { + res.getUsedReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("usedCode")) { + JsonArray array = json.getAsJsonArray("usedCode"); + for (int i = 0; i < array.size(); i++) { + res.getUsedCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + } + + protected Procedure.ProcedurePerformerComponent parseProcedureProcedurePerformerComponent(JsonObject json, Procedure owner) throws IOException, FHIRFormatError { + Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent(); + parseProcedureProcedurePerformerComponentProperties(json, owner, res); + return res; + } + + protected void parseProcedureProcedurePerformerComponentProperties(JsonObject json, Procedure owner, Procedure.ProcedurePerformerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("role")) + res.setRole(parseCodeableConcept(json.getAsJsonObject("role"))); + if (json.has("actor")) + res.setActor(parseReference(json.getAsJsonObject("actor"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected Procedure.ProcedureFocalDeviceComponent parseProcedureProcedureFocalDeviceComponent(JsonObject json, Procedure owner) throws IOException, FHIRFormatError { + Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent(); + parseProcedureProcedureFocalDeviceComponentProperties(json, owner, res); + return res; + } + + protected void parseProcedureProcedureFocalDeviceComponentProperties(JsonObject json, Procedure owner, Procedure.ProcedureFocalDeviceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("action")) + res.setAction(parseCodeableConcept(json.getAsJsonObject("action"))); + if (json.has("manipulated")) + res.setManipulated(parseReference(json.getAsJsonObject("manipulated"))); + } + + protected ProcedureRequest parseProcedureRequest(JsonObject json) throws IOException, FHIRFormatError { + ProcedureRequest res = new ProcedureRequest(); + parseProcedureRequestProperties(json, res); + return res; + } + + protected void parseProcedureRequestProperties(JsonObject json, ProcedureRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("replaces")) { + JsonArray array = json.getAsJsonArray("replaces"); + for (int i = 0; i < array.size(); i++) { + res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("requisition")) + res.setRequisition(parseIdentifier(json.getAsJsonObject("requisition"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ProcedureRequest.ProcedureRequestStatus.NULL, new ProcedureRequest.ProcedureRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("intent")) + res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), ProcedureRequest.ProcedureRequestIntent.NULL, new ProcedureRequest.ProcedureRequestIntentEnumFactory())); + if (json.has("_intent")) + parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), ProcedureRequest.ProcedureRequestPriority.NULL, new ProcedureRequest.ProcedureRequestPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("doNotPerform")) + res.setDoNotPerformElement(parseBoolean(json.get("doNotPerform").getAsBoolean())); + if (json.has("_doNotPerform")) + parseElementProperties(json.getAsJsonObject("_doNotPerform"), res.getDoNotPerformElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + Type asNeeded = parseType("asNeeded", json); + if (asNeeded != null) + res.setAsNeeded(asNeeded); + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("requester")) + res.setRequester(parseProcedureRequestProcedureRequestRequesterComponent(json.getAsJsonObject("requester"), res)); + if (json.has("performerType")) + res.setPerformerType(parseCodeableConcept(json.getAsJsonObject("performerType"))); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("supportingInfo")) { + JsonArray array = json.getAsJsonArray("supportingInfo"); + for (int i = 0; i < array.size(); i++) { + res.getSupportingInfo().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specimen")) { + JsonArray array = json.getAsJsonArray("specimen"); + for (int i = 0; i < array.size(); i++) { + res.getSpecimen().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("bodySite")) { + JsonArray array = json.getAsJsonArray("bodySite"); + for (int i = 0; i < array.size(); i++) { + res.getBodySite().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("relevantHistory")) { + JsonArray array = json.getAsJsonArray("relevantHistory"); + for (int i = 0; i < array.size(); i++) { + res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ProcedureRequest.ProcedureRequestRequesterComponent parseProcedureRequestProcedureRequestRequesterComponent(JsonObject json, ProcedureRequest owner) throws IOException, FHIRFormatError { + ProcedureRequest.ProcedureRequestRequesterComponent res = new ProcedureRequest.ProcedureRequestRequesterComponent(); + parseProcedureRequestProcedureRequestRequesterComponentProperties(json, owner, res); + return res; + } + + protected void parseProcedureRequestProcedureRequestRequesterComponentProperties(JsonObject json, ProcedureRequest owner, ProcedureRequest.ProcedureRequestRequesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("agent")) + res.setAgent(parseReference(json.getAsJsonObject("agent"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected ProcessRequest parseProcessRequest(JsonObject json) throws IOException, FHIRFormatError { + ProcessRequest res = new ProcessRequest(); + parseProcessRequestProperties(json, res); + return res; + } + + protected void parseProcessRequestProperties(JsonObject json, ProcessRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ProcessRequest.ProcessRequestStatus.NULL, new ProcessRequest.ProcessRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("action")) + res.setActionElement(parseEnumeration(json.get("action").getAsString(), ProcessRequest.ActionList.NULL, new ProcessRequest.ActionListEnumFactory())); + if (json.has("_action")) + parseElementProperties(json.getAsJsonObject("_action"), res.getActionElement()); + if (json.has("target")) + res.setTarget(parseReference(json.getAsJsonObject("target"))); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("provider")) + res.setProvider(parseReference(json.getAsJsonObject("provider"))); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("response")) + res.setResponse(parseReference(json.getAsJsonObject("response"))); + if (json.has("nullify")) + res.setNullifyElement(parseBoolean(json.get("nullify").getAsBoolean())); + if (json.has("_nullify")) + parseElementProperties(json.getAsJsonObject("_nullify"), res.getNullifyElement()); + if (json.has("reference")) + res.setReferenceElement(parseString(json.get("reference").getAsString())); + if (json.has("_reference")) + parseElementProperties(json.getAsJsonObject("_reference"), res.getReferenceElement()); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseProcessRequestItemsComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("include")) { + JsonArray array = json.getAsJsonArray("include"); + for (int i = 0; i < array.size(); i++) { + res.getInclude().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_include")) { + JsonArray array = json.getAsJsonArray("_include"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getInclude().size()) + res.getInclude().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getInclude().get(i)); + } + }; + if (json.has("exclude")) { + JsonArray array = json.getAsJsonArray("exclude"); + for (int i = 0; i < array.size(); i++) { + res.getExclude().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_exclude")) { + JsonArray array = json.getAsJsonArray("_exclude"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getExclude().size()) + res.getExclude().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getExclude().get(i)); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected ProcessRequest.ItemsComponent parseProcessRequestItemsComponent(JsonObject json, ProcessRequest owner) throws IOException, FHIRFormatError { + ProcessRequest.ItemsComponent res = new ProcessRequest.ItemsComponent(); + parseProcessRequestItemsComponentProperties(json, owner, res); + return res; + } + + protected void parseProcessRequestItemsComponentProperties(JsonObject json, ProcessRequest owner, ProcessRequest.ItemsComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("sequenceLinkId")) + res.setSequenceLinkIdElement(parseInteger(json.get("sequenceLinkId").getAsLong())); + if (json.has("_sequenceLinkId")) + parseElementProperties(json.getAsJsonObject("_sequenceLinkId"), res.getSequenceLinkIdElement()); + } + + protected ProcessResponse parseProcessResponse(JsonObject json) throws IOException, FHIRFormatError { + ProcessResponse res = new ProcessResponse(); + parseProcessResponseProperties(json, res); + return res; + } + + protected void parseProcessResponseProperties(JsonObject json, ProcessResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ProcessResponse.ProcessResponseStatus.NULL, new ProcessResponse.ProcessResponseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("created")) + res.setCreatedElement(parseDateTime(json.get("created").getAsString())); + if (json.has("_created")) + parseElementProperties(json.getAsJsonObject("_created"), res.getCreatedElement()); + if (json.has("organization")) + res.setOrganization(parseReference(json.getAsJsonObject("organization"))); + if (json.has("request")) + res.setRequest(parseReference(json.getAsJsonObject("request"))); + if (json.has("outcome")) + res.setOutcomeElement(parseEnumeration(json.get("outcome").getAsString(), ProcessResponse.ProcessingOutcome.NULL, new ProcessResponse.ProcessingOutcomeEnumFactory())); + if (json.has("_outcome")) + parseElementProperties(json.getAsJsonObject("_outcome"), res.getOutcomeElement()); + if (json.has("disposition")) + res.setDispositionElement(parseString(json.get("disposition").getAsString())); + if (json.has("_disposition")) + parseElementProperties(json.getAsJsonObject("_disposition"), res.getDispositionElement()); + if (json.has("requestProvider")) + res.setRequestProvider(parseReference(json.getAsJsonObject("requestProvider"))); + if (json.has("requestOrganization")) + res.setRequestOrganization(parseReference(json.getAsJsonObject("requestOrganization"))); + if (json.has("form")) + res.setForm(parseCodeableConcept(json.getAsJsonObject("form"))); + if (json.has("processNote")) { + JsonArray array = json.getAsJsonArray("processNote"); + for (int i = 0; i < array.size(); i++) { + res.getProcessNote().add(parseProcessResponseProcessResponseProcessNoteComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("error")) { + JsonArray array = json.getAsJsonArray("error"); + for (int i = 0; i < array.size(); i++) { + res.getError().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("communicationRequest")) { + JsonArray array = json.getAsJsonArray("communicationRequest"); + for (int i = 0; i < array.size(); i++) { + res.getCommunicationRequest().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected ProcessResponse.ProcessResponseProcessNoteComponent parseProcessResponseProcessResponseProcessNoteComponent(JsonObject json, ProcessResponse owner) throws IOException, FHIRFormatError { + ProcessResponse.ProcessResponseProcessNoteComponent res = new ProcessResponse.ProcessResponseProcessNoteComponent(); + parseProcessResponseProcessResponseProcessNoteComponentProperties(json, owner, res); + return res; + } + + protected void parseProcessResponseProcessResponseProcessNoteComponentProperties(JsonObject json, ProcessResponse owner, ProcessResponse.ProcessResponseProcessNoteComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + } + + protected Provenance parseProvenance(JsonObject json) throws IOException, FHIRFormatError { + Provenance res = new Provenance(); + parseProvenanceProperties(json, res); + return res; + } + + protected void parseProvenanceProperties(JsonObject json, Provenance res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("target")) { + JsonArray array = json.getAsJsonArray("target"); + for (int i = 0; i < array.size(); i++) { + res.getTarget().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type occured = parseType("occured", json); + if (occured != null) + res.setOccured(occured); + if (json.has("recorded")) + res.setRecordedElement(parseInstant(json.get("recorded").getAsString())); + if (json.has("_recorded")) + parseElementProperties(json.getAsJsonObject("_recorded"), res.getRecordedElement()); + if (json.has("policy")) { + JsonArray array = json.getAsJsonArray("policy"); + for (int i = 0; i < array.size(); i++) { + res.getPolicy().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_policy")) { + JsonArray array = json.getAsJsonArray("_policy"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPolicy().size()) + res.getPolicy().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPolicy().get(i)); + } + }; + if (json.has("location")) + res.setLocation(parseReference(json.getAsJsonObject("location"))); + if (json.has("reason")) { + JsonArray array = json.getAsJsonArray("reason"); + for (int i = 0; i < array.size(); i++) { + res.getReason().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("activity")) + res.setActivity(parseCodeableConcept(json.getAsJsonObject("activity"))); + if (json.has("agent")) { + JsonArray array = json.getAsJsonArray("agent"); + for (int i = 0; i < array.size(); i++) { + res.getAgent().add(parseProvenanceProvenanceAgentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("entity")) { + JsonArray array = json.getAsJsonArray("entity"); + for (int i = 0; i < array.size(); i++) { + res.getEntity().add(parseProvenanceProvenanceEntityComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("signature")) { + JsonArray array = json.getAsJsonArray("signature"); + for (int i = 0; i < array.size(); i++) { + res.getSignature().add(parseSignature(array.get(i).getAsJsonObject())); + } + }; + } + + protected Provenance.ProvenanceAgentComponent parseProvenanceProvenanceAgentComponent(JsonObject json, Provenance owner) throws IOException, FHIRFormatError { + Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent(); + parseProvenanceProvenanceAgentComponentProperties(json, owner, res); + return res; + } + + protected void parseProvenanceProvenanceAgentComponentProperties(JsonObject json, Provenance owner, Provenance.ProvenanceAgentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("role")) { + JsonArray array = json.getAsJsonArray("role"); + for (int i = 0; i < array.size(); i++) { + res.getRole().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + Type who = parseType("who", json); + if (who != null) + res.setWho(who); + Type onBehalfOf = parseType("onBehalfOf", json); + if (onBehalfOf != null) + res.setOnBehalfOf(onBehalfOf); + } + + protected Provenance.ProvenanceEntityComponent parseProvenanceProvenanceEntityComponent(JsonObject json, Provenance owner) throws IOException, FHIRFormatError { + Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent(); + parseProvenanceProvenanceEntityComponentProperties(json, owner, res); + return res; + } + + protected void parseProvenanceProvenanceEntityComponentProperties(JsonObject json, Provenance owner, Provenance.ProvenanceEntityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("role")) + res.setRoleElement(parseEnumeration(json.get("role").getAsString(), Provenance.ProvenanceEntityRole.NULL, new Provenance.ProvenanceEntityRoleEnumFactory())); + if (json.has("_role")) + parseElementProperties(json.getAsJsonObject("_role"), res.getRoleElement()); + Type what = parseType("what", json); + if (what != null) + res.setWhat(what); + if (json.has("agent")) { + JsonArray array = json.getAsJsonArray("agent"); + for (int i = 0; i < array.size(); i++) { + res.getAgent().add(parseProvenanceProvenanceAgentComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Questionnaire parseQuestionnaire(JsonObject json) throws IOException, FHIRFormatError { + Questionnaire res = new Questionnaire(); + parseQuestionnaireProperties(json, res); + return res; + } + + protected void parseQuestionnaireProperties(JsonObject json, Questionnaire res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("subjectType")) { + JsonArray array = json.getAsJsonArray("subjectType"); + for (int i = 0; i < array.size(); i++) { + res.getSubjectType().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_subjectType")) { + JsonArray array = json.getAsJsonArray("_subjectType"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSubjectType().size()) + res.getSubjectType().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSubjectType().get(i)); + } + }; + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireQuestionnaireItemComponent(JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError { + Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent(); + parseQuestionnaireQuestionnaireItemComponentProperties(json, owner, res); + return res; + } + + protected void parseQuestionnaireQuestionnaireItemComponentProperties(JsonObject json, Questionnaire owner, Questionnaire.QuestionnaireItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("linkId")) + res.setLinkIdElement(parseString(json.get("linkId").getAsString())); + if (json.has("_linkId")) + parseElementProperties(json.getAsJsonObject("_linkId"), res.getLinkIdElement()); + if (json.has("definition")) + res.setDefinitionElement(parseUri(json.get("definition").getAsString())); + if (json.has("_definition")) + parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("prefix")) + res.setPrefixElement(parseString(json.get("prefix").getAsString())); + if (json.has("_prefix")) + parseElementProperties(json.getAsJsonObject("_prefix"), res.getPrefixElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Questionnaire.QuestionnaireItemType.NULL, new Questionnaire.QuestionnaireItemTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("enableWhen")) { + JsonArray array = json.getAsJsonArray("enableWhen"); + for (int i = 0; i < array.size(); i++) { + res.getEnableWhen().add(parseQuestionnaireQuestionnaireItemEnableWhenComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("required")) + res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean())); + if (json.has("_required")) + parseElementProperties(json.getAsJsonObject("_required"), res.getRequiredElement()); + if (json.has("repeats")) + res.setRepeatsElement(parseBoolean(json.get("repeats").getAsBoolean())); + if (json.has("_repeats")) + parseElementProperties(json.getAsJsonObject("_repeats"), res.getRepeatsElement()); + if (json.has("readOnly")) + res.setReadOnlyElement(parseBoolean(json.get("readOnly").getAsBoolean())); + if (json.has("_readOnly")) + parseElementProperties(json.getAsJsonObject("_readOnly"), res.getReadOnlyElement()); + if (json.has("maxLength")) + res.setMaxLengthElement(parseInteger(json.get("maxLength").getAsLong())); + if (json.has("_maxLength")) + parseElementProperties(json.getAsJsonObject("_maxLength"), res.getMaxLengthElement()); + if (json.has("options")) + res.setOptions(parseReference(json.getAsJsonObject("options"))); + if (json.has("option")) { + JsonArray array = json.getAsJsonArray("option"); + for (int i = 0; i < array.size(); i++) { + res.getOption().add(parseQuestionnaireQuestionnaireItemOptionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + Type initial = parseType("initial", json); + if (initial != null) + res.setInitial(initial); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireQuestionnaireItemEnableWhenComponent(JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError { + Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent(); + parseQuestionnaireQuestionnaireItemEnableWhenComponentProperties(json, owner, res); + return res; + } + + protected void parseQuestionnaireQuestionnaireItemEnableWhenComponentProperties(JsonObject json, Questionnaire owner, Questionnaire.QuestionnaireItemEnableWhenComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("question")) + res.setQuestionElement(parseString(json.get("question").getAsString())); + if (json.has("_question")) + parseElementProperties(json.getAsJsonObject("_question"), res.getQuestionElement()); + if (json.has("hasAnswer")) + res.setHasAnswerElement(parseBoolean(json.get("hasAnswer").getAsBoolean())); + if (json.has("_hasAnswer")) + parseElementProperties(json.getAsJsonObject("_hasAnswer"), res.getHasAnswerElement()); + Type answer = parseType("answer", json); + if (answer != null) + res.setAnswer(answer); + } + + protected Questionnaire.QuestionnaireItemOptionComponent parseQuestionnaireQuestionnaireItemOptionComponent(JsonObject json, Questionnaire owner) throws IOException, FHIRFormatError { + Questionnaire.QuestionnaireItemOptionComponent res = new Questionnaire.QuestionnaireItemOptionComponent(); + parseQuestionnaireQuestionnaireItemOptionComponentProperties(json, owner, res); + return res; + } + + protected void parseQuestionnaireQuestionnaireItemOptionComponentProperties(JsonObject json, Questionnaire owner, Questionnaire.QuestionnaireItemOptionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected QuestionnaireResponse parseQuestionnaireResponse(JsonObject json) throws IOException, FHIRFormatError { + QuestionnaireResponse res = new QuestionnaireResponse(); + parseQuestionnaireResponseProperties(json, res); + return res; + } + + protected void parseQuestionnaireResponseProperties(JsonObject json, QuestionnaireResponse res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("parent")) { + JsonArray array = json.getAsJsonArray("parent"); + for (int i = 0; i < array.size(); i++) { + res.getParent().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("questionnaire")) + res.setQuestionnaire(parseReference(json.getAsJsonObject("questionnaire"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), QuestionnaireResponse.QuestionnaireResponseStatus.NULL, new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("authored")) + res.setAuthoredElement(parseDateTime(json.get("authored").getAsString())); + if (json.has("_authored")) + parseElementProperties(json.getAsJsonObject("_authored"), res.getAuthoredElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("source")) + res.setSource(parseReference(json.getAsJsonObject("source"))); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseQuestionnaireResponseItemComponent(JsonObject json, QuestionnaireResponse owner) throws IOException, FHIRFormatError { + QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent(); + parseQuestionnaireResponseQuestionnaireResponseItemComponentProperties(json, owner, res); + return res; + } + + protected void parseQuestionnaireResponseQuestionnaireResponseItemComponentProperties(JsonObject json, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("linkId")) + res.setLinkIdElement(parseString(json.get("linkId").getAsString())); + if (json.has("_linkId")) + parseElementProperties(json.getAsJsonObject("_linkId"), res.getLinkIdElement()); + if (json.has("definition")) + res.setDefinitionElement(parseUri(json.get("definition").getAsString())); + if (json.has("_definition")) + parseElementProperties(json.getAsJsonObject("_definition"), res.getDefinitionElement()); + if (json.has("text")) + res.setTextElement(parseString(json.get("text").getAsString())); + if (json.has("_text")) + parseElementProperties(json.getAsJsonObject("_text"), res.getTextElement()); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("answer")) { + JsonArray array = json.getAsJsonArray("answer"); + for (int i = 0; i < array.size(); i++) { + res.getAnswer().add(parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(JsonObject json, QuestionnaireResponse owner) throws IOException, FHIRFormatError { + QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); + parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentProperties(json, owner, res); + return res; + } + + protected void parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentProperties(JsonObject json, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + if (json.has("item")) { + JsonArray array = json.getAsJsonArray("item"); + for (int i = 0; i < array.size(); i++) { + res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected RelatedPerson parseRelatedPerson(JsonObject json) throws IOException, FHIRFormatError { + RelatedPerson res = new RelatedPerson(); + parseRelatedPersonProperties(json, res); + return res; + } + + protected void parseRelatedPersonProperties(JsonObject json, RelatedPerson res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("relationship")) + res.setRelationship(parseCodeableConcept(json.getAsJsonObject("relationship"))); + if (json.has("name")) { + JsonArray array = json.getAsJsonArray("name"); + for (int i = 0; i < array.size(); i++) { + res.getName().add(parseHumanName(array.get(i).getAsJsonObject())); + } + }; + if (json.has("telecom")) { + JsonArray array = json.getAsJsonArray("telecom"); + for (int i = 0; i < array.size(); i++) { + res.getTelecom().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("gender")) + res.setGenderElement(parseEnumeration(json.get("gender").getAsString(), Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + if (json.has("_gender")) + parseElementProperties(json.getAsJsonObject("_gender"), res.getGenderElement()); + if (json.has("birthDate")) + res.setBirthDateElement(parseDate(json.get("birthDate").getAsString())); + if (json.has("_birthDate")) + parseElementProperties(json.getAsJsonObject("_birthDate"), res.getBirthDateElement()); + if (json.has("address")) { + JsonArray array = json.getAsJsonArray("address"); + for (int i = 0; i < array.size(); i++) { + res.getAddress().add(parseAddress(array.get(i).getAsJsonObject())); + } + }; + if (json.has("photo")) { + JsonArray array = json.getAsJsonArray("photo"); + for (int i = 0; i < array.size(); i++) { + res.getPhoto().add(parseAttachment(array.get(i).getAsJsonObject())); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + } + + protected RequestGroup parseRequestGroup(JsonObject json) throws IOException, FHIRFormatError { + RequestGroup res = new RequestGroup(); + parseRequestGroupProperties(json, res); + return res; + } + + protected void parseRequestGroupProperties(JsonObject json, RequestGroup res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("definition")) { + JsonArray array = json.getAsJsonArray("definition"); + for (int i = 0; i < array.size(); i++) { + res.getDefinition().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("replaces")) { + JsonArray array = json.getAsJsonArray("replaces"); + for (int i = 0; i < array.size(); i++) { + res.getReplaces().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("groupIdentifier")) + res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), RequestGroup.RequestStatus.NULL, new RequestGroup.RequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("intent")) + res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), RequestGroup.RequestIntent.NULL, new RequestGroup.RequestIntentEnumFactory())); + if (json.has("_intent")) + parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), RequestGroup.RequestPriority.NULL, new RequestGroup.RequestPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("author")) + res.setAuthor(parseReference(json.getAsJsonObject("author"))); + if (json.has("reasonCode")) { + JsonArray array = json.getAsJsonArray("reasonCode"); + for (int i = 0; i < array.size(); i++) { + res.getReasonCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonReference")) { + JsonArray array = json.getAsJsonArray("reasonReference"); + for (int i = 0; i < array.size(); i++) { + res.getReasonReference().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseRequestGroupRequestGroupActionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected RequestGroup.RequestGroupActionComponent parseRequestGroupRequestGroupActionComponent(JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError { + RequestGroup.RequestGroupActionComponent res = new RequestGroup.RequestGroupActionComponent(); + parseRequestGroupRequestGroupActionComponentProperties(json, owner, res); + return res; + } + + protected void parseRequestGroupRequestGroupActionComponentProperties(JsonObject json, RequestGroup owner, RequestGroup.RequestGroupActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("prefix")) + res.setPrefixElement(parseString(json.get("prefix").getAsString())); + if (json.has("_prefix")) + parseElementProperties(json.getAsJsonObject("_prefix"), res.getPrefixElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("textEquivalent")) + res.setTextEquivalentElement(parseString(json.get("textEquivalent").getAsString())); + if (json.has("_textEquivalent")) + parseElementProperties(json.getAsJsonObject("_textEquivalent"), res.getTextEquivalentElement()); + if (json.has("code")) { + JsonArray array = json.getAsJsonArray("code"); + for (int i = 0; i < array.size(); i++) { + res.getCode().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("documentation")) { + JsonArray array = json.getAsJsonArray("documentation"); + for (int i = 0; i < array.size(); i++) { + res.getDocumentation().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("condition")) { + JsonArray array = json.getAsJsonArray("condition"); + for (int i = 0; i < array.size(); i++) { + res.getCondition().add(parseRequestGroupRequestGroupActionConditionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("relatedAction")) { + JsonArray array = json.getAsJsonArray("relatedAction"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedAction().add(parseRequestGroupRequestGroupActionRelatedActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + Type timing = parseType("timing", json); + if (timing != null) + res.setTiming(timing); + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setType(parseCoding(json.getAsJsonObject("type"))); + if (json.has("groupingBehavior")) + res.setGroupingBehaviorElement(parseEnumeration(json.get("groupingBehavior").getAsString(), RequestGroup.ActionGroupingBehavior.NULL, new RequestGroup.ActionGroupingBehaviorEnumFactory())); + if (json.has("_groupingBehavior")) + parseElementProperties(json.getAsJsonObject("_groupingBehavior"), res.getGroupingBehaviorElement()); + if (json.has("selectionBehavior")) + res.setSelectionBehaviorElement(parseEnumeration(json.get("selectionBehavior").getAsString(), RequestGroup.ActionSelectionBehavior.NULL, new RequestGroup.ActionSelectionBehaviorEnumFactory())); + if (json.has("_selectionBehavior")) + parseElementProperties(json.getAsJsonObject("_selectionBehavior"), res.getSelectionBehaviorElement()); + if (json.has("requiredBehavior")) + res.setRequiredBehaviorElement(parseEnumeration(json.get("requiredBehavior").getAsString(), RequestGroup.ActionRequiredBehavior.NULL, new RequestGroup.ActionRequiredBehaviorEnumFactory())); + if (json.has("_requiredBehavior")) + parseElementProperties(json.getAsJsonObject("_requiredBehavior"), res.getRequiredBehaviorElement()); + if (json.has("precheckBehavior")) + res.setPrecheckBehaviorElement(parseEnumeration(json.get("precheckBehavior").getAsString(), RequestGroup.ActionPrecheckBehavior.NULL, new RequestGroup.ActionPrecheckBehaviorEnumFactory())); + if (json.has("_precheckBehavior")) + parseElementProperties(json.getAsJsonObject("_precheckBehavior"), res.getPrecheckBehaviorElement()); + if (json.has("cardinalityBehavior")) + res.setCardinalityBehaviorElement(parseEnumeration(json.get("cardinalityBehavior").getAsString(), RequestGroup.ActionCardinalityBehavior.NULL, new RequestGroup.ActionCardinalityBehaviorEnumFactory())); + if (json.has("_cardinalityBehavior")) + parseElementProperties(json.getAsJsonObject("_cardinalityBehavior"), res.getCardinalityBehaviorElement()); + if (json.has("resource")) + res.setResource(parseReference(json.getAsJsonObject("resource"))); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseRequestGroupRequestGroupActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected RequestGroup.RequestGroupActionConditionComponent parseRequestGroupRequestGroupActionConditionComponent(JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError { + RequestGroup.RequestGroupActionConditionComponent res = new RequestGroup.RequestGroupActionConditionComponent(); + parseRequestGroupRequestGroupActionConditionComponentProperties(json, owner, res); + return res; + } + + protected void parseRequestGroupRequestGroupActionConditionComponentProperties(JsonObject json, RequestGroup owner, RequestGroup.RequestGroupActionConditionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), RequestGroup.ActionConditionKind.NULL, new RequestGroup.ActionConditionKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("language")) + res.setLanguageElement(parseString(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + } + + protected RequestGroup.RequestGroupActionRelatedActionComponent parseRequestGroupRequestGroupActionRelatedActionComponent(JsonObject json, RequestGroup owner) throws IOException, FHIRFormatError { + RequestGroup.RequestGroupActionRelatedActionComponent res = new RequestGroup.RequestGroupActionRelatedActionComponent(); + parseRequestGroupRequestGroupActionRelatedActionComponentProperties(json, owner, res); + return res; + } + + protected void parseRequestGroupRequestGroupActionRelatedActionComponentProperties(JsonObject json, RequestGroup owner, RequestGroup.RequestGroupActionRelatedActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("actionId")) + res.setActionIdElement(parseId(json.get("actionId").getAsString())); + if (json.has("_actionId")) + parseElementProperties(json.getAsJsonObject("_actionId"), res.getActionIdElement()); + if (json.has("relationship")) + res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), RequestGroup.ActionRelationshipType.NULL, new RequestGroup.ActionRelationshipTypeEnumFactory())); + if (json.has("_relationship")) + parseElementProperties(json.getAsJsonObject("_relationship"), res.getRelationshipElement()); + Type offset = parseType("offset", json); + if (offset != null) + res.setOffset(offset); + } + + protected ResearchStudy parseResearchStudy(JsonObject json) throws IOException, FHIRFormatError { + ResearchStudy res = new ResearchStudy(); + parseResearchStudyProperties(json, res); + return res; + } + + protected void parseResearchStudyProperties(JsonObject json, ResearchStudy res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("protocol")) { + JsonArray array = json.getAsJsonArray("protocol"); + for (int i = 0; i < array.size(); i++) { + res.getProtocol().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ResearchStudy.ResearchStudyStatus.NULL, new ResearchStudy.ResearchStudyStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("focus")) { + JsonArray array = json.getAsJsonArray("focus"); + for (int i = 0; i < array.size(); i++) { + res.getFocus().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("keyword")) { + JsonArray array = json.getAsJsonArray("keyword"); + for (int i = 0; i < array.size(); i++) { + res.getKeyword().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("enrollment")) { + JsonArray array = json.getAsJsonArray("enrollment"); + for (int i = 0; i < array.size(); i++) { + res.getEnrollment().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("sponsor")) + res.setSponsor(parseReference(json.getAsJsonObject("sponsor"))); + if (json.has("principalInvestigator")) + res.setPrincipalInvestigator(parseReference(json.getAsJsonObject("principalInvestigator"))); + if (json.has("site")) { + JsonArray array = json.getAsJsonArray("site"); + for (int i = 0; i < array.size(); i++) { + res.getSite().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("reasonStopped")) + res.setReasonStopped(parseCodeableConcept(json.getAsJsonObject("reasonStopped"))); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("arm")) { + JsonArray array = json.getAsJsonArray("arm"); + for (int i = 0; i < array.size(); i++) { + res.getArm().add(parseResearchStudyResearchStudyArmComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected ResearchStudy.ResearchStudyArmComponent parseResearchStudyResearchStudyArmComponent(JsonObject json, ResearchStudy owner) throws IOException, FHIRFormatError { + ResearchStudy.ResearchStudyArmComponent res = new ResearchStudy.ResearchStudyArmComponent(); + parseResearchStudyResearchStudyArmComponentProperties(json, owner, res); + return res; + } + + protected void parseResearchStudyResearchStudyArmComponentProperties(JsonObject json, ResearchStudy owner, ResearchStudy.ResearchStudyArmComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + } + + protected ResearchSubject parseResearchSubject(JsonObject json) throws IOException, FHIRFormatError { + ResearchSubject res = new ResearchSubject(); + parseResearchSubjectProperties(json, res); + return res; + } + + protected void parseResearchSubjectProperties(JsonObject json, ResearchSubject res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), ResearchSubject.ResearchSubjectStatus.NULL, new ResearchSubject.ResearchSubjectStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("study")) + res.setStudy(parseReference(json.getAsJsonObject("study"))); + if (json.has("individual")) + res.setIndividual(parseReference(json.getAsJsonObject("individual"))); + if (json.has("assignedArm")) + res.setAssignedArmElement(parseString(json.get("assignedArm").getAsString())); + if (json.has("_assignedArm")) + parseElementProperties(json.getAsJsonObject("_assignedArm"), res.getAssignedArmElement()); + if (json.has("actualArm")) + res.setActualArmElement(parseString(json.get("actualArm").getAsString())); + if (json.has("_actualArm")) + parseElementProperties(json.getAsJsonObject("_actualArm"), res.getActualArmElement()); + if (json.has("consent")) + res.setConsent(parseReference(json.getAsJsonObject("consent"))); + } + + protected RiskAssessment parseRiskAssessment(JsonObject json) throws IOException, FHIRFormatError { + RiskAssessment res = new RiskAssessment(); + parseRiskAssessmentProperties(json, res); + return res; + } + + protected void parseRiskAssessmentProperties(JsonObject json, RiskAssessment res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("basedOn")) + res.setBasedOn(parseReference(json.getAsJsonObject("basedOn"))); + if (json.has("parent")) + res.setParent(parseReference(json.getAsJsonObject("parent"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), RiskAssessment.RiskAssessmentStatus.NULL, new RiskAssessment.RiskAssessmentStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("condition")) + res.setCondition(parseReference(json.getAsJsonObject("condition"))); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + Type reason = parseType("reason", json); + if (reason != null) + res.setReason(reason); + if (json.has("basis")) { + JsonArray array = json.getAsJsonArray("basis"); + for (int i = 0; i < array.size(); i++) { + res.getBasis().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("prediction")) { + JsonArray array = json.getAsJsonArray("prediction"); + for (int i = 0; i < array.size(); i++) { + res.getPrediction().add(parseRiskAssessmentRiskAssessmentPredictionComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("mitigation")) + res.setMitigationElement(parseString(json.get("mitigation").getAsString())); + if (json.has("_mitigation")) + parseElementProperties(json.getAsJsonObject("_mitigation"), res.getMitigationElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentRiskAssessmentPredictionComponent(JsonObject json, RiskAssessment owner) throws IOException, FHIRFormatError { + RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent(); + parseRiskAssessmentRiskAssessmentPredictionComponentProperties(json, owner, res); + return res; + } + + protected void parseRiskAssessmentRiskAssessmentPredictionComponentProperties(JsonObject json, RiskAssessment owner, RiskAssessment.RiskAssessmentPredictionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("outcome")) + res.setOutcome(parseCodeableConcept(json.getAsJsonObject("outcome"))); + Type probability = parseType("probability", json); + if (probability != null) + res.setProbability(probability); + if (json.has("qualitativeRisk")) + res.setQualitativeRisk(parseCodeableConcept(json.getAsJsonObject("qualitativeRisk"))); + if (json.has("relativeRisk")) + res.setRelativeRiskElement(parseDecimal(json.get("relativeRisk").getAsBigDecimal())); + if (json.has("_relativeRisk")) + parseElementProperties(json.getAsJsonObject("_relativeRisk"), res.getRelativeRiskElement()); + Type when = parseType("when", json); + if (when != null) + res.setWhen(when); + if (json.has("rationale")) + res.setRationaleElement(parseString(json.get("rationale").getAsString())); + if (json.has("_rationale")) + parseElementProperties(json.getAsJsonObject("_rationale"), res.getRationaleElement()); + } + + protected Schedule parseSchedule(JsonObject json) throws IOException, FHIRFormatError { + Schedule res = new Schedule(); + parseScheduleProperties(json, res); + return res; + } + + protected void parseScheduleProperties(JsonObject json, Schedule res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("active")) + res.setActiveElement(parseBoolean(json.get("active").getAsBoolean())); + if (json.has("_active")) + parseElementProperties(json.getAsJsonObject("_active"), res.getActiveElement()); + if (json.has("serviceCategory")) + res.setServiceCategory(parseCodeableConcept(json.getAsJsonObject("serviceCategory"))); + if (json.has("serviceType")) { + JsonArray array = json.getAsJsonArray("serviceType"); + for (int i = 0; i < array.size(); i++) { + res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialty")) { + JsonArray array = json.getAsJsonArray("specialty"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("actor")) { + JsonArray array = json.getAsJsonArray("actor"); + for (int i = 0; i < array.size(); i++) { + res.getActor().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("planningHorizon")) + res.setPlanningHorizon(parsePeriod(json.getAsJsonObject("planningHorizon"))); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected SearchParameter parseSearchParameter(JsonObject json) throws IOException, FHIRFormatError { + SearchParameter res = new SearchParameter(); + parseSearchParameterProperties(json, res); + return res; + } + + protected void parseSearchParameterProperties(JsonObject json, SearchParameter res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("base")) { + JsonArray array = json.getAsJsonArray("base"); + for (int i = 0; i < array.size(); i++) { + res.getBase().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_base")) { + JsonArray array = json.getAsJsonArray("_base"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getBase().size()) + res.getBase().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getBase().get(i)); + } + }; + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("derivedFrom")) + res.setDerivedFromElement(parseUri(json.get("derivedFrom").getAsString())); + if (json.has("_derivedFrom")) + parseElementProperties(json.getAsJsonObject("_derivedFrom"), res.getDerivedFromElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + if (json.has("xpath")) + res.setXpathElement(parseString(json.get("xpath").getAsString())); + if (json.has("_xpath")) + parseElementProperties(json.getAsJsonObject("_xpath"), res.getXpathElement()); + if (json.has("xpathUsage")) + res.setXpathUsageElement(parseEnumeration(json.get("xpathUsage").getAsString(), SearchParameter.XPathUsageType.NULL, new SearchParameter.XPathUsageTypeEnumFactory())); + if (json.has("_xpathUsage")) + parseElementProperties(json.getAsJsonObject("_xpathUsage"), res.getXpathUsageElement()); + if (json.has("target")) { + JsonArray array = json.getAsJsonArray("target"); + for (int i = 0; i < array.size(); i++) { + res.getTarget().add(parseCode(array.get(i).getAsString())); + } + }; + if (json.has("_target")) { + JsonArray array = json.getAsJsonArray("_target"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getTarget().size()) + res.getTarget().add(parseCode(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getTarget().get(i)); + } + }; + if (json.has("comparator")) { + JsonArray array = json.getAsJsonArray("comparator"); + for (int i = 0; i < array.size(); i++) { + res.getComparator().add(parseEnumeration(array.get(i).getAsString(), SearchParameter.SearchComparator.NULL, new SearchParameter.SearchComparatorEnumFactory())); + } + }; + if (json.has("_comparator")) { + JsonArray array = json.getAsJsonArray("_comparator"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getComparator().size()) + res.getComparator().add(parseEnumeration(null, SearchParameter.SearchComparator.NULL, new SearchParameter.SearchComparatorEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getComparator().get(i)); + } + }; + if (json.has("modifier")) { + JsonArray array = json.getAsJsonArray("modifier"); + for (int i = 0; i < array.size(); i++) { + res.getModifier().add(parseEnumeration(array.get(i).getAsString(), SearchParameter.SearchModifierCode.NULL, new SearchParameter.SearchModifierCodeEnumFactory())); + } + }; + if (json.has("_modifier")) { + JsonArray array = json.getAsJsonArray("_modifier"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getModifier().size()) + res.getModifier().add(parseEnumeration(null, SearchParameter.SearchModifierCode.NULL, new SearchParameter.SearchModifierCodeEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getModifier().get(i)); + } + }; + if (json.has("chain")) { + JsonArray array = json.getAsJsonArray("chain"); + for (int i = 0; i < array.size(); i++) { + res.getChain().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_chain")) { + JsonArray array = json.getAsJsonArray("_chain"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getChain().size()) + res.getChain().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getChain().get(i)); + } + }; + if (json.has("component")) { + JsonArray array = json.getAsJsonArray("component"); + for (int i = 0; i < array.size(); i++) { + res.getComponent().add(parseSearchParameterSearchParameterComponentComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected SearchParameter.SearchParameterComponentComponent parseSearchParameterSearchParameterComponentComponent(JsonObject json, SearchParameter owner) throws IOException, FHIRFormatError { + SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent(); + parseSearchParameterSearchParameterComponentComponentProperties(json, owner, res); + return res; + } + + protected void parseSearchParameterSearchParameterComponentComponentProperties(JsonObject json, SearchParameter owner, SearchParameter.SearchParameterComponentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("definition")) + res.setDefinition(parseReference(json.getAsJsonObject("definition"))); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + } + + protected Sequence parseSequence(JsonObject json) throws IOException, FHIRFormatError { + Sequence res = new Sequence(); + parseSequenceProperties(json, res); + return res; + } + + protected void parseSequenceProperties(JsonObject json, Sequence res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Sequence.SequenceType.NULL, new Sequence.SequenceTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("coordinateSystem")) + res.setCoordinateSystemElement(parseInteger(json.get("coordinateSystem").getAsLong())); + if (json.has("_coordinateSystem")) + parseElementProperties(json.getAsJsonObject("_coordinateSystem"), res.getCoordinateSystemElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("specimen")) + res.setSpecimen(parseReference(json.getAsJsonObject("specimen"))); + if (json.has("device")) + res.setDevice(parseReference(json.getAsJsonObject("device"))); + if (json.has("performer")) + res.setPerformer(parseReference(json.getAsJsonObject("performer"))); + if (json.has("quantity")) + res.setQuantity(parseQuantity(json.getAsJsonObject("quantity"))); + if (json.has("referenceSeq")) + res.setReferenceSeq(parseSequenceSequenceReferenceSeqComponent(json.getAsJsonObject("referenceSeq"), res)); + if (json.has("variant")) { + JsonArray array = json.getAsJsonArray("variant"); + for (int i = 0; i < array.size(); i++) { + res.getVariant().add(parseSequenceSequenceVariantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("observedSeq")) + res.setObservedSeqElement(parseString(json.get("observedSeq").getAsString())); + if (json.has("_observedSeq")) + parseElementProperties(json.getAsJsonObject("_observedSeq"), res.getObservedSeqElement()); + if (json.has("quality")) { + JsonArray array = json.getAsJsonArray("quality"); + for (int i = 0; i < array.size(); i++) { + res.getQuality().add(parseSequenceSequenceQualityComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("readCoverage")) + res.setReadCoverageElement(parseInteger(json.get("readCoverage").getAsLong())); + if (json.has("_readCoverage")) + parseElementProperties(json.getAsJsonObject("_readCoverage"), res.getReadCoverageElement()); + if (json.has("repository")) { + JsonArray array = json.getAsJsonArray("repository"); + for (int i = 0; i < array.size(); i++) { + res.getRepository().add(parseSequenceSequenceRepositoryComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("pointer")) { + JsonArray array = json.getAsJsonArray("pointer"); + for (int i = 0; i < array.size(); i++) { + res.getPointer().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("structureVariant")) { + JsonArray array = json.getAsJsonArray("structureVariant"); + for (int i = 0; i < array.size(); i++) { + res.getStructureVariant().add(parseSequenceSequenceStructureVariantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Sequence.SequenceReferenceSeqComponent parseSequenceSequenceReferenceSeqComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceReferenceSeqComponent res = new Sequence.SequenceReferenceSeqComponent(); + parseSequenceSequenceReferenceSeqComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceReferenceSeqComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceReferenceSeqComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("chromosome")) + res.setChromosome(parseCodeableConcept(json.getAsJsonObject("chromosome"))); + if (json.has("genomeBuild")) + res.setGenomeBuildElement(parseString(json.get("genomeBuild").getAsString())); + if (json.has("_genomeBuild")) + parseElementProperties(json.getAsJsonObject("_genomeBuild"), res.getGenomeBuildElement()); + if (json.has("referenceSeqId")) + res.setReferenceSeqId(parseCodeableConcept(json.getAsJsonObject("referenceSeqId"))); + if (json.has("referenceSeqPointer")) + res.setReferenceSeqPointer(parseReference(json.getAsJsonObject("referenceSeqPointer"))); + if (json.has("referenceSeqString")) + res.setReferenceSeqStringElement(parseString(json.get("referenceSeqString").getAsString())); + if (json.has("_referenceSeqString")) + parseElementProperties(json.getAsJsonObject("_referenceSeqString"), res.getReferenceSeqStringElement()); + if (json.has("strand")) + res.setStrandElement(parseInteger(json.get("strand").getAsLong())); + if (json.has("_strand")) + parseElementProperties(json.getAsJsonObject("_strand"), res.getStrandElement()); + if (json.has("windowStart")) + res.setWindowStartElement(parseInteger(json.get("windowStart").getAsLong())); + if (json.has("_windowStart")) + parseElementProperties(json.getAsJsonObject("_windowStart"), res.getWindowStartElement()); + if (json.has("windowEnd")) + res.setWindowEndElement(parseInteger(json.get("windowEnd").getAsLong())); + if (json.has("_windowEnd")) + parseElementProperties(json.getAsJsonObject("_windowEnd"), res.getWindowEndElement()); + } + + protected Sequence.SequenceVariantComponent parseSequenceSequenceVariantComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceVariantComponent res = new Sequence.SequenceVariantComponent(); + parseSequenceSequenceVariantComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceVariantComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceVariantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("start")) + res.setStartElement(parseInteger(json.get("start").getAsLong())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInteger(json.get("end").getAsLong())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + if (json.has("observedAllele")) + res.setObservedAlleleElement(parseString(json.get("observedAllele").getAsString())); + if (json.has("_observedAllele")) + parseElementProperties(json.getAsJsonObject("_observedAllele"), res.getObservedAlleleElement()); + if (json.has("referenceAllele")) + res.setReferenceAlleleElement(parseString(json.get("referenceAllele").getAsString())); + if (json.has("_referenceAllele")) + parseElementProperties(json.getAsJsonObject("_referenceAllele"), res.getReferenceAlleleElement()); + if (json.has("cigar")) + res.setCigarElement(parseString(json.get("cigar").getAsString())); + if (json.has("_cigar")) + parseElementProperties(json.getAsJsonObject("_cigar"), res.getCigarElement()); + if (json.has("variantPointer")) + res.setVariantPointer(parseReference(json.getAsJsonObject("variantPointer"))); + } + + protected Sequence.SequenceQualityComponent parseSequenceSequenceQualityComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceQualityComponent res = new Sequence.SequenceQualityComponent(); + parseSequenceSequenceQualityComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceQualityComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceQualityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Sequence.QualityType.NULL, new Sequence.QualityTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("standardSequence")) + res.setStandardSequence(parseCodeableConcept(json.getAsJsonObject("standardSequence"))); + if (json.has("start")) + res.setStartElement(parseInteger(json.get("start").getAsLong())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInteger(json.get("end").getAsLong())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + if (json.has("score")) + res.setScore(parseQuantity(json.getAsJsonObject("score"))); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + if (json.has("truthTP")) + res.setTruthTPElement(parseDecimal(json.get("truthTP").getAsBigDecimal())); + if (json.has("_truthTP")) + parseElementProperties(json.getAsJsonObject("_truthTP"), res.getTruthTPElement()); + if (json.has("queryTP")) + res.setQueryTPElement(parseDecimal(json.get("queryTP").getAsBigDecimal())); + if (json.has("_queryTP")) + parseElementProperties(json.getAsJsonObject("_queryTP"), res.getQueryTPElement()); + if (json.has("truthFN")) + res.setTruthFNElement(parseDecimal(json.get("truthFN").getAsBigDecimal())); + if (json.has("_truthFN")) + parseElementProperties(json.getAsJsonObject("_truthFN"), res.getTruthFNElement()); + if (json.has("queryFP")) + res.setQueryFPElement(parseDecimal(json.get("queryFP").getAsBigDecimal())); + if (json.has("_queryFP")) + parseElementProperties(json.getAsJsonObject("_queryFP"), res.getQueryFPElement()); + if (json.has("gtFP")) + res.setGtFPElement(parseDecimal(json.get("gtFP").getAsBigDecimal())); + if (json.has("_gtFP")) + parseElementProperties(json.getAsJsonObject("_gtFP"), res.getGtFPElement()); + if (json.has("precision")) + res.setPrecisionElement(parseDecimal(json.get("precision").getAsBigDecimal())); + if (json.has("_precision")) + parseElementProperties(json.getAsJsonObject("_precision"), res.getPrecisionElement()); + if (json.has("recall")) + res.setRecallElement(parseDecimal(json.get("recall").getAsBigDecimal())); + if (json.has("_recall")) + parseElementProperties(json.getAsJsonObject("_recall"), res.getRecallElement()); + if (json.has("fScore")) + res.setFScoreElement(parseDecimal(json.get("fScore").getAsBigDecimal())); + if (json.has("_fScore")) + parseElementProperties(json.getAsJsonObject("_fScore"), res.getFScoreElement()); + if (json.has("roc")) + res.setRoc(parseSequenceSequenceQualityRocComponent(json.getAsJsonObject("roc"), owner)); + } + + protected Sequence.SequenceQualityRocComponent parseSequenceSequenceQualityRocComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceQualityRocComponent res = new Sequence.SequenceQualityRocComponent(); + parseSequenceSequenceQualityRocComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceQualityRocComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceQualityRocComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("score")) { + JsonArray array = json.getAsJsonArray("score"); + for (int i = 0; i < array.size(); i++) { + res.getScore().add(parseInteger(array.get(i).getAsLong())); + } + }; + if (json.has("_score")) { + JsonArray array = json.getAsJsonArray("_score"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getScore().size()) + res.getScore().add(parseInteger(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getScore().get(i)); + } + }; + if (json.has("numTP")) { + JsonArray array = json.getAsJsonArray("numTP"); + for (int i = 0; i < array.size(); i++) { + res.getNumTP().add(parseInteger(array.get(i).getAsLong())); + } + }; + if (json.has("_numTP")) { + JsonArray array = json.getAsJsonArray("_numTP"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNumTP().size()) + res.getNumTP().add(parseInteger(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNumTP().get(i)); + } + }; + if (json.has("numFP")) { + JsonArray array = json.getAsJsonArray("numFP"); + for (int i = 0; i < array.size(); i++) { + res.getNumFP().add(parseInteger(array.get(i).getAsLong())); + } + }; + if (json.has("_numFP")) { + JsonArray array = json.getAsJsonArray("_numFP"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNumFP().size()) + res.getNumFP().add(parseInteger(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNumFP().get(i)); + } + }; + if (json.has("numFN")) { + JsonArray array = json.getAsJsonArray("numFN"); + for (int i = 0; i < array.size(); i++) { + res.getNumFN().add(parseInteger(array.get(i).getAsLong())); + } + }; + if (json.has("_numFN")) { + JsonArray array = json.getAsJsonArray("_numFN"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getNumFN().size()) + res.getNumFN().add(parseInteger(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getNumFN().get(i)); + } + }; + if (json.has("precision")) { + JsonArray array = json.getAsJsonArray("precision"); + for (int i = 0; i < array.size(); i++) { + res.getPrecision().add(parseDecimal(array.get(i).getAsBigDecimal())); + } + }; + if (json.has("_precision")) { + JsonArray array = json.getAsJsonArray("_precision"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getPrecision().size()) + res.getPrecision().add(parseDecimal(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getPrecision().get(i)); + } + }; + if (json.has("sensitivity")) { + JsonArray array = json.getAsJsonArray("sensitivity"); + for (int i = 0; i < array.size(); i++) { + res.getSensitivity().add(parseDecimal(array.get(i).getAsBigDecimal())); + } + }; + if (json.has("_sensitivity")) { + JsonArray array = json.getAsJsonArray("_sensitivity"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getSensitivity().size()) + res.getSensitivity().add(parseDecimal(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getSensitivity().get(i)); + } + }; + if (json.has("fMeasure")) { + JsonArray array = json.getAsJsonArray("fMeasure"); + for (int i = 0; i < array.size(); i++) { + res.getFMeasure().add(parseDecimal(array.get(i).getAsBigDecimal())); + } + }; + if (json.has("_fMeasure")) { + JsonArray array = json.getAsJsonArray("_fMeasure"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getFMeasure().size()) + res.getFMeasure().add(parseDecimal(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getFMeasure().get(i)); + } + }; + } + + protected Sequence.SequenceRepositoryComponent parseSequenceSequenceRepositoryComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceRepositoryComponent res = new Sequence.SequenceRepositoryComponent(); + parseSequenceSequenceRepositoryComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceRepositoryComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceRepositoryComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Sequence.RepositoryType.NULL, new Sequence.RepositoryTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("datasetId")) + res.setDatasetIdElement(parseString(json.get("datasetId").getAsString())); + if (json.has("_datasetId")) + parseElementProperties(json.getAsJsonObject("_datasetId"), res.getDatasetIdElement()); + if (json.has("variantsetId")) + res.setVariantsetIdElement(parseString(json.get("variantsetId").getAsString())); + if (json.has("_variantsetId")) + parseElementProperties(json.getAsJsonObject("_variantsetId"), res.getVariantsetIdElement()); + if (json.has("readsetId")) + res.setReadsetIdElement(parseString(json.get("readsetId").getAsString())); + if (json.has("_readsetId")) + parseElementProperties(json.getAsJsonObject("_readsetId"), res.getReadsetIdElement()); + } + + protected Sequence.SequenceStructureVariantComponent parseSequenceSequenceStructureVariantComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceStructureVariantComponent res = new Sequence.SequenceStructureVariantComponent(); + parseSequenceSequenceStructureVariantComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceStructureVariantComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceStructureVariantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("precision")) + res.setPrecisionElement(parseString(json.get("precision").getAsString())); + if (json.has("_precision")) + parseElementProperties(json.getAsJsonObject("_precision"), res.getPrecisionElement()); + if (json.has("reportedaCGHRatio")) + res.setReportedaCGHRatioElement(parseDecimal(json.get("reportedaCGHRatio").getAsBigDecimal())); + if (json.has("_reportedaCGHRatio")) + parseElementProperties(json.getAsJsonObject("_reportedaCGHRatio"), res.getReportedaCGHRatioElement()); + if (json.has("length")) + res.setLengthElement(parseInteger(json.get("length").getAsLong())); + if (json.has("_length")) + parseElementProperties(json.getAsJsonObject("_length"), res.getLengthElement()); + if (json.has("outer")) + res.setOuter(parseSequenceSequenceStructureVariantOuterComponent(json.getAsJsonObject("outer"), owner)); + if (json.has("inner")) + res.setInner(parseSequenceSequenceStructureVariantInnerComponent(json.getAsJsonObject("inner"), owner)); + } + + protected Sequence.SequenceStructureVariantOuterComponent parseSequenceSequenceStructureVariantOuterComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceStructureVariantOuterComponent res = new Sequence.SequenceStructureVariantOuterComponent(); + parseSequenceSequenceStructureVariantOuterComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceStructureVariantOuterComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceStructureVariantOuterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("start")) + res.setStartElement(parseInteger(json.get("start").getAsLong())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInteger(json.get("end").getAsLong())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + } + + protected Sequence.SequenceStructureVariantInnerComponent parseSequenceSequenceStructureVariantInnerComponent(JsonObject json, Sequence owner) throws IOException, FHIRFormatError { + Sequence.SequenceStructureVariantInnerComponent res = new Sequence.SequenceStructureVariantInnerComponent(); + parseSequenceSequenceStructureVariantInnerComponentProperties(json, owner, res); + return res; + } + + protected void parseSequenceSequenceStructureVariantInnerComponentProperties(JsonObject json, Sequence owner, Sequence.SequenceStructureVariantInnerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("start")) + res.setStartElement(parseInteger(json.get("start").getAsLong())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInteger(json.get("end").getAsLong())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + } + + protected ServiceDefinition parseServiceDefinition(JsonObject json) throws IOException, FHIRFormatError { + ServiceDefinition res = new ServiceDefinition(); + parseServiceDefinitionProperties(json, res); + return res; + } + + protected void parseServiceDefinitionProperties(JsonObject json, ServiceDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("usage")) + res.setUsageElement(parseString(json.get("usage").getAsString())); + if (json.has("_usage")) + parseElementProperties(json.getAsJsonObject("_usage"), res.getUsageElement()); + if (json.has("approvalDate")) + res.setApprovalDateElement(parseDate(json.get("approvalDate").getAsString())); + if (json.has("_approvalDate")) + parseElementProperties(json.getAsJsonObject("_approvalDate"), res.getApprovalDateElement()); + if (json.has("lastReviewDate")) + res.setLastReviewDateElement(parseDate(json.get("lastReviewDate").getAsString())); + if (json.has("_lastReviewDate")) + parseElementProperties(json.getAsJsonObject("_lastReviewDate"), res.getLastReviewDateElement()); + if (json.has("effectivePeriod")) + res.setEffectivePeriod(parsePeriod(json.getAsJsonObject("effectivePeriod"))); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("topic")) { + JsonArray array = json.getAsJsonArray("topic"); + for (int i = 0; i < array.size(); i++) { + res.getTopic().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contributor")) { + JsonArray array = json.getAsJsonArray("contributor"); + for (int i = 0; i < array.size(); i++) { + res.getContributor().add(parseContributor(array.get(i).getAsJsonObject())); + } + }; + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("relatedArtifact")) { + JsonArray array = json.getAsJsonArray("relatedArtifact"); + for (int i = 0; i < array.size(); i++) { + res.getRelatedArtifact().add(parseRelatedArtifact(array.get(i).getAsJsonObject())); + } + }; + if (json.has("trigger")) { + JsonArray array = json.getAsJsonArray("trigger"); + for (int i = 0; i < array.size(); i++) { + res.getTrigger().add(parseTriggerDefinition(array.get(i).getAsJsonObject())); + } + }; + if (json.has("dataRequirement")) { + JsonArray array = json.getAsJsonArray("dataRequirement"); + for (int i = 0; i < array.size(); i++) { + res.getDataRequirement().add(parseDataRequirement(array.get(i).getAsJsonObject())); + } + }; + if (json.has("operationDefinition")) + res.setOperationDefinition(parseReference(json.getAsJsonObject("operationDefinition"))); + } + + protected Slot parseSlot(JsonObject json) throws IOException, FHIRFormatError { + Slot res = new Slot(); + parseSlotProperties(json, res); + return res; + } + + protected void parseSlotProperties(JsonObject json, Slot res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("serviceCategory")) + res.setServiceCategory(parseCodeableConcept(json.getAsJsonObject("serviceCategory"))); + if (json.has("serviceType")) { + JsonArray array = json.getAsJsonArray("serviceType"); + for (int i = 0; i < array.size(); i++) { + res.getServiceType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specialty")) { + JsonArray array = json.getAsJsonArray("specialty"); + for (int i = 0; i < array.size(); i++) { + res.getSpecialty().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("appointmentType")) + res.setAppointmentType(parseCodeableConcept(json.getAsJsonObject("appointmentType"))); + if (json.has("schedule")) + res.setSchedule(parseReference(json.getAsJsonObject("schedule"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Slot.SlotStatus.NULL, new Slot.SlotStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("start")) + res.setStartElement(parseInstant(json.get("start").getAsString())); + if (json.has("_start")) + parseElementProperties(json.getAsJsonObject("_start"), res.getStartElement()); + if (json.has("end")) + res.setEndElement(parseInstant(json.get("end").getAsString())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + if (json.has("overbooked")) + res.setOverbookedElement(parseBoolean(json.get("overbooked").getAsBoolean())); + if (json.has("_overbooked")) + parseElementProperties(json.getAsJsonObject("_overbooked"), res.getOverbookedElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected Specimen parseSpecimen(JsonObject json) throws IOException, FHIRFormatError { + Specimen res = new Specimen(); + parseSpecimenProperties(json, res); + return res; + } + + protected void parseSpecimenProperties(JsonObject json, Specimen res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("accessionIdentifier")) + res.setAccessionIdentifier(parseIdentifier(json.getAsJsonObject("accessionIdentifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Specimen.SpecimenStatus.NULL, new Specimen.SpecimenStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("subject")) + res.setSubject(parseReference(json.getAsJsonObject("subject"))); + if (json.has("receivedTime")) + res.setReceivedTimeElement(parseDateTime(json.get("receivedTime").getAsString())); + if (json.has("_receivedTime")) + parseElementProperties(json.getAsJsonObject("_receivedTime"), res.getReceivedTimeElement()); + if (json.has("parent")) { + JsonArray array = json.getAsJsonArray("parent"); + for (int i = 0; i < array.size(); i++) { + res.getParent().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("request")) { + JsonArray array = json.getAsJsonArray("request"); + for (int i = 0; i < array.size(); i++) { + res.getRequest().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("collection")) + res.setCollection(parseSpecimenSpecimenCollectionComponent(json.getAsJsonObject("collection"), res)); + if (json.has("processing")) { + JsonArray array = json.getAsJsonArray("processing"); + for (int i = 0; i < array.size(); i++) { + res.getProcessing().add(parseSpecimenSpecimenProcessingComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("container")) { + JsonArray array = json.getAsJsonArray("container"); + for (int i = 0; i < array.size(); i++) { + res.getContainer().add(parseSpecimenSpecimenContainerComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + protected Specimen.SpecimenCollectionComponent parseSpecimenSpecimenCollectionComponent(JsonObject json, Specimen owner) throws IOException, FHIRFormatError { + Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent(); + parseSpecimenSpecimenCollectionComponentProperties(json, owner, res); + return res; + } + + protected void parseSpecimenSpecimenCollectionComponentProperties(JsonObject json, Specimen owner, Specimen.SpecimenCollectionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("collector")) + res.setCollector(parseReference(json.getAsJsonObject("collector"))); + Type collected = parseType("collected", json); + if (collected != null) + res.setCollected(collected); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + if (json.has("method")) + res.setMethod(parseCodeableConcept(json.getAsJsonObject("method"))); + if (json.has("bodySite")) + res.setBodySite(parseCodeableConcept(json.getAsJsonObject("bodySite"))); + } + + protected Specimen.SpecimenProcessingComponent parseSpecimenSpecimenProcessingComponent(JsonObject json, Specimen owner) throws IOException, FHIRFormatError { + Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent(); + parseSpecimenSpecimenProcessingComponentProperties(json, owner, res); + return res; + } + + protected void parseSpecimenSpecimenProcessingComponentProperties(JsonObject json, Specimen owner, Specimen.SpecimenProcessingComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("procedure")) + res.setProcedure(parseCodeableConcept(json.getAsJsonObject("procedure"))); + if (json.has("additive")) { + JsonArray array = json.getAsJsonArray("additive"); + for (int i = 0; i < array.size(); i++) { + res.getAdditive().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type time = parseType("time", json); + if (time != null) + res.setTime(time); + } + + protected Specimen.SpecimenContainerComponent parseSpecimenSpecimenContainerComponent(JsonObject json, Specimen owner) throws IOException, FHIRFormatError { + Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent(); + parseSpecimenSpecimenContainerComponentProperties(json, owner, res); + return res; + } + + protected void parseSpecimenSpecimenContainerComponentProperties(JsonObject json, Specimen owner, Specimen.SpecimenContainerComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("capacity")) + res.setCapacity(parseSimpleQuantity(json.getAsJsonObject("capacity"))); + if (json.has("specimenQuantity")) + res.setSpecimenQuantity(parseSimpleQuantity(json.getAsJsonObject("specimenQuantity"))); + Type additive = parseType("additive", json); + if (additive != null) + res.setAdditive(additive); + } + + protected SpecimenDefinition parseSpecimenDefinition(JsonObject json) throws IOException, FHIRFormatError { + SpecimenDefinition res = new SpecimenDefinition(); + parseSpecimenDefinitionProperties(json, res); + return res; + } + + protected void parseSpecimenDefinitionProperties(JsonObject json, SpecimenDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("typeCollected")) + res.setTypeCollected(parseCodeableConcept(json.getAsJsonObject("typeCollected"))); + if (json.has("patientPreparation")) + res.setPatientPreparationElement(parseString(json.get("patientPreparation").getAsString())); + if (json.has("_patientPreparation")) + parseElementProperties(json.getAsJsonObject("_patientPreparation"), res.getPatientPreparationElement()); + if (json.has("timeAspect")) + res.setTimeAspectElement(parseString(json.get("timeAspect").getAsString())); + if (json.has("_timeAspect")) + parseElementProperties(json.getAsJsonObject("_timeAspect"), res.getTimeAspectElement()); + if (json.has("collection")) { + JsonArray array = json.getAsJsonArray("collection"); + for (int i = 0; i < array.size(); i++) { + res.getCollection().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("specimenToLab")) { + JsonArray array = json.getAsJsonArray("specimenToLab"); + for (int i = 0; i < array.size(); i++) { + res.getSpecimenToLab().add(parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError { + SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent res = new SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent(); + parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentProperties(json, owner, res); + return res; + } + + protected void parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentProperties(JsonObject json, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("isDerived")) + res.setIsDerivedElement(parseBoolean(json.get("isDerived").getAsBoolean())); + if (json.has("_isDerived")) + parseElementProperties(json.getAsJsonObject("_isDerived"), res.getIsDerivedElement()); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("preference")) + res.setPreferenceElement(parseEnumeration(json.get("preference").getAsString(), SpecimenDefinition.SpecimenContainedPreference.NULL, new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory())); + if (json.has("_preference")) + parseElementProperties(json.getAsJsonObject("_preference"), res.getPreferenceElement()); + if (json.has("containerMaterial")) + res.setContainerMaterial(parseCodeableConcept(json.getAsJsonObject("containerMaterial"))); + if (json.has("containerType")) + res.setContainerType(parseCodeableConcept(json.getAsJsonObject("containerType"))); + if (json.has("containerCap")) + res.setContainerCap(parseCodeableConcept(json.getAsJsonObject("containerCap"))); + if (json.has("containerDescription")) + res.setContainerDescriptionElement(parseString(json.get("containerDescription").getAsString())); + if (json.has("_containerDescription")) + parseElementProperties(json.getAsJsonObject("_containerDescription"), res.getContainerDescriptionElement()); + if (json.has("containerCapacity")) + res.setContainerCapacity(parseSimpleQuantity(json.getAsJsonObject("containerCapacity"))); + if (json.has("containerMinimumVolume")) + res.setContainerMinimumVolume(parseSimpleQuantity(json.getAsJsonObject("containerMinimumVolume"))); + if (json.has("containerAdditive")) { + JsonArray array = json.getAsJsonArray("containerAdditive"); + for (int i = 0; i < array.size(); i++) { + res.getContainerAdditive().add(parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("containerPreparation")) + res.setContainerPreparationElement(parseString(json.get("containerPreparation").getAsString())); + if (json.has("_containerPreparation")) + parseElementProperties(json.getAsJsonObject("_containerPreparation"), res.getContainerPreparationElement()); + if (json.has("requirement")) + res.setRequirementElement(parseString(json.get("requirement").getAsString())); + if (json.has("_requirement")) + parseElementProperties(json.getAsJsonObject("_requirement"), res.getRequirementElement()); + if (json.has("retentionTime")) + res.setRetentionTime(parseDuration(json.getAsJsonObject("retentionTime"))); + if (json.has("rejectionCriterion")) { + JsonArray array = json.getAsJsonArray("rejectionCriterion"); + for (int i = 0; i < array.size(); i++) { + res.getRejectionCriterion().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("handling")) { + JsonArray array = json.getAsJsonArray("handling"); + for (int i = 0; i < array.size(); i++) { + res.getHandling().add(parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError { + SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent res = new SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent(); + parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentProperties(json, owner, res); + return res; + } + + protected void parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentProperties(JsonObject json, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type additive = parseType("additive", json); + if (additive != null) + res.setAdditive(additive); + } + + protected SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(JsonObject json, SpecimenDefinition owner) throws IOException, FHIRFormatError { + SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent res = new SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent(); + parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentProperties(json, owner, res); + return res; + } + + protected void parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentProperties(JsonObject json, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("conditionSet")) + res.setConditionSet(parseCodeableConcept(json.getAsJsonObject("conditionSet"))); + if (json.has("tempRange")) + res.setTempRange(parseRange(json.getAsJsonObject("tempRange"))); + if (json.has("maxDuration")) + res.setMaxDuration(parseDuration(json.getAsJsonObject("maxDuration"))); + if (json.has("lightExposure")) + res.setLightExposureElement(parseString(json.get("lightExposure").getAsString())); + if (json.has("_lightExposure")) + parseElementProperties(json.getAsJsonObject("_lightExposure"), res.getLightExposureElement()); + if (json.has("instruction")) + res.setInstructionElement(parseString(json.get("instruction").getAsString())); + if (json.has("_instruction")) + parseElementProperties(json.getAsJsonObject("_instruction"), res.getInstructionElement()); + } + + protected StructureDefinition parseStructureDefinition(JsonObject json) throws IOException, FHIRFormatError { + StructureDefinition res = new StructureDefinition(); + parseStructureDefinitionProperties(json, res); + return res; + } + + protected void parseStructureDefinitionProperties(JsonObject json, StructureDefinition res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("keyword")) { + JsonArray array = json.getAsJsonArray("keyword"); + for (int i = 0; i < array.size(); i++) { + res.getKeyword().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + if (json.has("fhirVersion")) + res.setFhirVersionElement(parseId(json.get("fhirVersion").getAsString())); + if (json.has("_fhirVersion")) + parseElementProperties(json.getAsJsonObject("_fhirVersion"), res.getFhirVersionElement()); + if (json.has("mapping")) { + JsonArray array = json.getAsJsonArray("mapping"); + for (int i = 0; i < array.size(); i++) { + res.getMapping().add(parseStructureDefinitionStructureDefinitionMappingComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("kind")) + res.setKindElement(parseEnumeration(json.get("kind").getAsString(), StructureDefinition.StructureDefinitionKind.NULL, new StructureDefinition.StructureDefinitionKindEnumFactory())); + if (json.has("_kind")) + parseElementProperties(json.getAsJsonObject("_kind"), res.getKindElement()); + if (json.has("abstract")) + res.setAbstractElement(parseBoolean(json.get("abstract").getAsBoolean())); + if (json.has("_abstract")) + parseElementProperties(json.getAsJsonObject("_abstract"), res.getAbstractElement()); + if (json.has("contextType")) + res.setContextTypeElement(parseEnumeration(json.get("contextType").getAsString(), StructureDefinition.ExtensionContext.NULL, new StructureDefinition.ExtensionContextEnumFactory())); + if (json.has("_contextType")) + parseElementProperties(json.getAsJsonObject("_contextType"), res.getContextTypeElement()); + if (json.has("context")) { + JsonArray array = json.getAsJsonArray("context"); + for (int i = 0; i < array.size(); i++) { + res.getContext().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_context")) { + JsonArray array = json.getAsJsonArray("_context"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getContext().size()) + res.getContext().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getContext().get(i)); + } + }; + if (json.has("contextInvariant")) { + JsonArray array = json.getAsJsonArray("contextInvariant"); + for (int i = 0; i < array.size(); i++) { + res.getContextInvariant().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_contextInvariant")) { + JsonArray array = json.getAsJsonArray("_contextInvariant"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getContextInvariant().size()) + res.getContextInvariant().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getContextInvariant().get(i)); + } + }; + if (json.has("type")) + res.setTypeElement(parseCode(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("baseDefinition")) + res.setBaseDefinitionElement(parseUri(json.get("baseDefinition").getAsString())); + if (json.has("_baseDefinition")) + parseElementProperties(json.getAsJsonObject("_baseDefinition"), res.getBaseDefinitionElement()); + if (json.has("derivation")) + res.setDerivationElement(parseEnumeration(json.get("derivation").getAsString(), StructureDefinition.TypeDerivationRule.NULL, new StructureDefinition.TypeDerivationRuleEnumFactory())); + if (json.has("_derivation")) + parseElementProperties(json.getAsJsonObject("_derivation"), res.getDerivationElement()); + if (json.has("snapshot")) + res.setSnapshot(parseStructureDefinitionStructureDefinitionSnapshotComponent(json.getAsJsonObject("snapshot"), res)); + if (json.has("differential")) + res.setDifferential(parseStructureDefinitionStructureDefinitionDifferentialComponent(json.getAsJsonObject("differential"), res)); + } + + protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionStructureDefinitionMappingComponent(JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError { + StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent(); + parseStructureDefinitionStructureDefinitionMappingComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureDefinitionStructureDefinitionMappingComponentProperties(JsonObject json, StructureDefinition owner, StructureDefinition.StructureDefinitionMappingComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identity")) + res.setIdentityElement(parseId(json.get("identity").getAsString())); + if (json.has("_identity")) + parseElementProperties(json.getAsJsonObject("_identity"), res.getIdentityElement()); + if (json.has("uri")) + res.setUriElement(parseUri(json.get("uri").getAsString())); + if (json.has("_uri")) + parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("comment")) + res.setCommentElement(parseString(json.get("comment").getAsString())); + if (json.has("_comment")) + parseElementProperties(json.getAsJsonObject("_comment"), res.getCommentElement()); + } + + protected StructureDefinition.StructureDefinitionSnapshotComponent parseStructureDefinitionStructureDefinitionSnapshotComponent(JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError { + StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent(); + parseStructureDefinitionStructureDefinitionSnapshotComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureDefinitionStructureDefinitionSnapshotComponentProperties(JsonObject json, StructureDefinition owner, StructureDefinition.StructureDefinitionSnapshotComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("element")) { + JsonArray array = json.getAsJsonArray("element"); + for (int i = 0; i < array.size(); i++) { + res.getElement().add(parseElementDefinition(array.get(i).getAsJsonObject())); + } + }; + } + + protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionStructureDefinitionDifferentialComponent(JsonObject json, StructureDefinition owner) throws IOException, FHIRFormatError { + StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent(); + parseStructureDefinitionStructureDefinitionDifferentialComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureDefinitionStructureDefinitionDifferentialComponentProperties(JsonObject json, StructureDefinition owner, StructureDefinition.StructureDefinitionDifferentialComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("element")) { + JsonArray array = json.getAsJsonArray("element"); + for (int i = 0; i < array.size(); i++) { + res.getElement().add(parseElementDefinition(array.get(i).getAsJsonObject())); + } + }; + } + + protected StructureMap parseStructureMap(JsonObject json) throws IOException, FHIRFormatError { + StructureMap res = new StructureMap(); + parseStructureMapProperties(json, res); + return res; + } + + protected void parseStructureMapProperties(JsonObject json, StructureMap res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("structure")) { + JsonArray array = json.getAsJsonArray("structure"); + for (int i = 0; i < array.size(); i++) { + res.getStructure().add(parseStructureMapStructureMapStructureComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("import")) { + JsonArray array = json.getAsJsonArray("import"); + for (int i = 0; i < array.size(); i++) { + res.getImport().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_import")) { + JsonArray array = json.getAsJsonArray("_import"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getImport().size()) + res.getImport().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getImport().get(i)); + } + }; + if (json.has("group")) { + JsonArray array = json.getAsJsonArray("group"); + for (int i = 0; i < array.size(); i++) { + res.getGroup().add(parseStructureMapStructureMapGroupComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected StructureMap.StructureMapStructureComponent parseStructureMapStructureMapStructureComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent(); + parseStructureMapStructureMapStructureComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapStructureComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapStructureComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), StructureMap.StructureMapModelMode.NULL, new StructureMap.StructureMapModelModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("alias")) + res.setAliasElement(parseString(json.get("alias").getAsString())); + if (json.has("_alias")) + parseElementProperties(json.getAsJsonObject("_alias"), res.getAliasElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected StructureMap.StructureMapGroupComponent parseStructureMapStructureMapGroupComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent(); + parseStructureMapStructureMapGroupComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseId(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("extends")) + res.setExtendsElement(parseId(json.get("extends").getAsString())); + if (json.has("_extends")) + parseElementProperties(json.getAsJsonObject("_extends"), res.getExtendsElement()); + if (json.has("typeMode")) + res.setTypeModeElement(parseEnumeration(json.get("typeMode").getAsString(), StructureMap.StructureMapGroupTypeMode.NULL, new StructureMap.StructureMapGroupTypeModeEnumFactory())); + if (json.has("_typeMode")) + parseElementProperties(json.getAsJsonObject("_typeMode"), res.getTypeModeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + if (json.has("input")) { + JsonArray array = json.getAsJsonArray("input"); + for (int i = 0; i < array.size(); i++) { + res.getInput().add(parseStructureMapStructureMapGroupInputComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("rule")) { + JsonArray array = json.getAsJsonArray("rule"); + for (int i = 0; i < array.size(); i++) { + res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected StructureMap.StructureMapGroupInputComponent parseStructureMapStructureMapGroupInputComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent(); + parseStructureMapStructureMapGroupInputComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupInputComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupInputComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseId(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("type")) + res.setTypeElement(parseString(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("mode")) + res.setModeElement(parseEnumeration(json.get("mode").getAsString(), StructureMap.StructureMapInputMode.NULL, new StructureMap.StructureMapInputModeEnumFactory())); + if (json.has("_mode")) + parseElementProperties(json.getAsJsonObject("_mode"), res.getModeElement()); + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected StructureMap.StructureMapGroupRuleComponent parseStructureMapStructureMapGroupRuleComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent(); + parseStructureMapStructureMapGroupRuleComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupRuleComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseId(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("source")) { + JsonArray array = json.getAsJsonArray("source"); + for (int i = 0; i < array.size(); i++) { + res.getSource().add(parseStructureMapStructureMapGroupRuleSourceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("target")) { + JsonArray array = json.getAsJsonArray("target"); + for (int i = 0; i < array.size(); i++) { + res.getTarget().add(parseStructureMapStructureMapGroupRuleTargetComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("rule")) { + JsonArray array = json.getAsJsonArray("rule"); + for (int i = 0; i < array.size(); i++) { + res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("dependent")) { + JsonArray array = json.getAsJsonArray("dependent"); + for (int i = 0; i < array.size(); i++) { + res.getDependent().add(parseStructureMapStructureMapGroupRuleDependentComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("documentation")) + res.setDocumentationElement(parseString(json.get("documentation").getAsString())); + if (json.has("_documentation")) + parseElementProperties(json.getAsJsonObject("_documentation"), res.getDocumentationElement()); + } + + protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapStructureMapGroupRuleSourceComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent(); + parseStructureMapStructureMapGroupRuleSourceComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupRuleSourceComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleSourceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("context")) + res.setContextElement(parseId(json.get("context").getAsString())); + if (json.has("_context")) + parseElementProperties(json.getAsJsonObject("_context"), res.getContextElement()); + if (json.has("min")) + res.setMinElement(parseInteger(json.get("min").getAsLong())); + if (json.has("_min")) + parseElementProperties(json.getAsJsonObject("_min"), res.getMinElement()); + if (json.has("max")) + res.setMaxElement(parseString(json.get("max").getAsString())); + if (json.has("_max")) + parseElementProperties(json.getAsJsonObject("_max"), res.getMaxElement()); + if (json.has("type")) + res.setTypeElement(parseString(json.get("type").getAsString())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + Type defaultValue = parseType("defaultValue", json); + if (defaultValue != null) + res.setDefaultValue(defaultValue); + if (json.has("element")) + res.setElementElement(parseString(json.get("element").getAsString())); + if (json.has("_element")) + parseElementProperties(json.getAsJsonObject("_element"), res.getElementElement()); + if (json.has("listMode")) + res.setListModeElement(parseEnumeration(json.get("listMode").getAsString(), StructureMap.StructureMapSourceListMode.NULL, new StructureMap.StructureMapSourceListModeEnumFactory())); + if (json.has("_listMode")) + parseElementProperties(json.getAsJsonObject("_listMode"), res.getListModeElement()); + if (json.has("variable")) + res.setVariableElement(parseId(json.get("variable").getAsString())); + if (json.has("_variable")) + parseElementProperties(json.getAsJsonObject("_variable"), res.getVariableElement()); + if (json.has("condition")) + res.setConditionElement(parseString(json.get("condition").getAsString())); + if (json.has("_condition")) + parseElementProperties(json.getAsJsonObject("_condition"), res.getConditionElement()); + if (json.has("check")) + res.setCheckElement(parseString(json.get("check").getAsString())); + if (json.has("_check")) + parseElementProperties(json.getAsJsonObject("_check"), res.getCheckElement()); + } + + protected StructureMap.StructureMapGroupRuleTargetComponent parseStructureMapStructureMapGroupRuleTargetComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent(); + parseStructureMapStructureMapGroupRuleTargetComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupRuleTargetComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleTargetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("context")) + res.setContextElement(parseId(json.get("context").getAsString())); + if (json.has("_context")) + parseElementProperties(json.getAsJsonObject("_context"), res.getContextElement()); + if (json.has("contextType")) + res.setContextTypeElement(parseEnumeration(json.get("contextType").getAsString(), StructureMap.StructureMapContextType.NULL, new StructureMap.StructureMapContextTypeEnumFactory())); + if (json.has("_contextType")) + parseElementProperties(json.getAsJsonObject("_contextType"), res.getContextTypeElement()); + if (json.has("element")) + res.setElementElement(parseString(json.get("element").getAsString())); + if (json.has("_element")) + parseElementProperties(json.getAsJsonObject("_element"), res.getElementElement()); + if (json.has("variable")) + res.setVariableElement(parseId(json.get("variable").getAsString())); + if (json.has("_variable")) + parseElementProperties(json.getAsJsonObject("_variable"), res.getVariableElement()); + if (json.has("listMode")) { + JsonArray array = json.getAsJsonArray("listMode"); + for (int i = 0; i < array.size(); i++) { + res.getListMode().add(parseEnumeration(array.get(i).getAsString(), StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory())); + } + }; + if (json.has("_listMode")) { + JsonArray array = json.getAsJsonArray("_listMode"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getListMode().size()) + res.getListMode().add(parseEnumeration(null, StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory())); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getListMode().get(i)); + } + }; + if (json.has("listRuleId")) + res.setListRuleIdElement(parseId(json.get("listRuleId").getAsString())); + if (json.has("_listRuleId")) + parseElementProperties(json.getAsJsonObject("_listRuleId"), res.getListRuleIdElement()); + if (json.has("transform")) + res.setTransformElement(parseEnumeration(json.get("transform").getAsString(), StructureMap.StructureMapTransform.NULL, new StructureMap.StructureMapTransformEnumFactory())); + if (json.has("_transform")) + parseElementProperties(json.getAsJsonObject("_transform"), res.getTransformElement()); + if (json.has("parameter")) { + JsonArray array = json.getAsJsonArray("parameter"); + for (int i = 0; i < array.size(); i++) { + res.getParameter().add(parseStructureMapStructureMapGroupRuleTargetParameterComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapStructureMapGroupRuleTargetParameterComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent(); + parseStructureMapStructureMapGroupRuleTargetParameterComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupRuleTargetParameterComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleTargetParameterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapStructureMapGroupRuleDependentComponent(JsonObject json, StructureMap owner) throws IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent(); + parseStructureMapStructureMapGroupRuleDependentComponentProperties(json, owner, res); + return res; + } + + protected void parseStructureMapStructureMapGroupRuleDependentComponentProperties(JsonObject json, StructureMap owner, StructureMap.StructureMapGroupRuleDependentComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseId(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("variable")) { + JsonArray array = json.getAsJsonArray("variable"); + for (int i = 0; i < array.size(); i++) { + res.getVariable().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_variable")) { + JsonArray array = json.getAsJsonArray("_variable"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getVariable().size()) + res.getVariable().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getVariable().get(i)); + } + }; + } + + protected Subscription parseSubscription(JsonObject json) throws IOException, FHIRFormatError { + Subscription res = new Subscription(); + parseSubscriptionProperties(json, res); + return res; + } + + protected void parseSubscriptionProperties(JsonObject json, Subscription res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Subscription.SubscriptionStatus.NULL, new Subscription.SubscriptionStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactPoint(array.get(i).getAsJsonObject())); + } + }; + if (json.has("end")) + res.setEndElement(parseInstant(json.get("end").getAsString())); + if (json.has("_end")) + parseElementProperties(json.getAsJsonObject("_end"), res.getEndElement()); + if (json.has("reason")) + res.setReasonElement(parseString(json.get("reason").getAsString())); + if (json.has("_reason")) + parseElementProperties(json.getAsJsonObject("_reason"), res.getReasonElement()); + if (json.has("criteria")) + res.setCriteriaElement(parseString(json.get("criteria").getAsString())); + if (json.has("_criteria")) + parseElementProperties(json.getAsJsonObject("_criteria"), res.getCriteriaElement()); + if (json.has("error")) + res.setErrorElement(parseString(json.get("error").getAsString())); + if (json.has("_error")) + parseElementProperties(json.getAsJsonObject("_error"), res.getErrorElement()); + if (json.has("channel")) + res.setChannel(parseSubscriptionSubscriptionChannelComponent(json.getAsJsonObject("channel"), res)); + if (json.has("tag")) { + JsonArray array = json.getAsJsonArray("tag"); + for (int i = 0; i < array.size(); i++) { + res.getTag().add(parseCoding(array.get(i).getAsJsonObject())); + } + }; + } + + protected Subscription.SubscriptionChannelComponent parseSubscriptionSubscriptionChannelComponent(JsonObject json, Subscription owner) throws IOException, FHIRFormatError { + Subscription.SubscriptionChannelComponent res = new Subscription.SubscriptionChannelComponent(); + parseSubscriptionSubscriptionChannelComponentProperties(json, owner, res); + return res; + } + + protected void parseSubscriptionSubscriptionChannelComponentProperties(JsonObject json, Subscription owner, Subscription.SubscriptionChannelComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), Subscription.SubscriptionChannelType.NULL, new Subscription.SubscriptionChannelTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("endpoint")) + res.setEndpointElement(parseUri(json.get("endpoint").getAsString())); + if (json.has("_endpoint")) + parseElementProperties(json.getAsJsonObject("_endpoint"), res.getEndpointElement()); + if (json.has("payload")) + res.setPayloadElement(parseString(json.get("payload").getAsString())); + if (json.has("_payload")) + parseElementProperties(json.getAsJsonObject("_payload"), res.getPayloadElement()); + if (json.has("header")) { + JsonArray array = json.getAsJsonArray("header"); + for (int i = 0; i < array.size(); i++) { + res.getHeader().add(parseString(array.get(i).getAsString())); + } + }; + if (json.has("_header")) { + JsonArray array = json.getAsJsonArray("_header"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getHeader().size()) + res.getHeader().add(parseString(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getHeader().get(i)); + } + }; + } + + protected Substance parseSubstance(JsonObject json) throws IOException, FHIRFormatError { + Substance res = new Substance(); + parseSubstanceProperties(json, res); + return res; + } + + protected void parseSubstanceProperties(JsonObject json, Substance res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Substance.FHIRSubstanceStatus.NULL, new Substance.FHIRSubstanceStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) { + JsonArray array = json.getAsJsonArray("category"); + for (int i = 0; i < array.size(); i++) { + res.getCategory().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("instance")) { + JsonArray array = json.getAsJsonArray("instance"); + for (int i = 0; i < array.size(); i++) { + res.getInstance().add(parseSubstanceSubstanceInstanceComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("ingredient")) { + JsonArray array = json.getAsJsonArray("ingredient"); + for (int i = 0; i < array.size(); i++) { + res.getIngredient().add(parseSubstanceSubstanceIngredientComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Substance.SubstanceInstanceComponent parseSubstanceSubstanceInstanceComponent(JsonObject json, Substance owner) throws IOException, FHIRFormatError { + Substance.SubstanceInstanceComponent res = new Substance.SubstanceInstanceComponent(); + parseSubstanceSubstanceInstanceComponentProperties(json, owner, res); + return res; + } + + protected void parseSubstanceSubstanceInstanceComponentProperties(JsonObject json, Substance owner, Substance.SubstanceInstanceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("expiry")) + res.setExpiryElement(parseDateTime(json.get("expiry").getAsString())); + if (json.has("_expiry")) + parseElementProperties(json.getAsJsonObject("_expiry"), res.getExpiryElement()); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + } + + protected Substance.SubstanceIngredientComponent parseSubstanceSubstanceIngredientComponent(JsonObject json, Substance owner) throws IOException, FHIRFormatError { + Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent(); + parseSubstanceSubstanceIngredientComponentProperties(json, owner, res); + return res; + } + + protected void parseSubstanceSubstanceIngredientComponentProperties(JsonObject json, Substance owner, Substance.SubstanceIngredientComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("quantity")) + res.setQuantity(parseRatio(json.getAsJsonObject("quantity"))); + Type substance = parseType("substance", json); + if (substance != null) + res.setSubstance(substance); + } + + protected SupplyDelivery parseSupplyDelivery(JsonObject json) throws IOException, FHIRFormatError { + SupplyDelivery res = new SupplyDelivery(); + parseSupplyDeliveryProperties(json, res); + return res; + } + + protected void parseSupplyDeliveryProperties(JsonObject json, SupplyDelivery res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), SupplyDelivery.SupplyDeliveryStatus.NULL, new SupplyDelivery.SupplyDeliveryStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + if (json.has("suppliedItem")) + res.setSuppliedItem(parseSupplyDeliverySupplyDeliverySuppliedItemComponent(json.getAsJsonObject("suppliedItem"), res)); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("supplier")) + res.setSupplier(parseReference(json.getAsJsonObject("supplier"))); + if (json.has("destination")) + res.setDestination(parseReference(json.getAsJsonObject("destination"))); + if (json.has("receiver")) { + JsonArray array = json.getAsJsonArray("receiver"); + for (int i = 0; i < array.size(); i++) { + res.getReceiver().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySupplyDeliverySuppliedItemComponent(JsonObject json, SupplyDelivery owner) throws IOException, FHIRFormatError { + SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent(); + parseSupplyDeliverySupplyDeliverySuppliedItemComponentProperties(json, owner, res); + return res; + } + + protected void parseSupplyDeliverySupplyDeliverySuppliedItemComponentProperties(JsonObject json, SupplyDelivery owner, SupplyDelivery.SupplyDeliverySuppliedItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("quantity")) + res.setQuantity(parseSimpleQuantity(json.getAsJsonObject("quantity"))); + Type item = parseType("item", json); + if (item != null) + res.setItem(item); + } + + protected SupplyRequest parseSupplyRequest(JsonObject json) throws IOException, FHIRFormatError { + SupplyRequest res = new SupplyRequest(); + parseSupplyRequestProperties(json, res); + return res; + } + + protected void parseSupplyRequestProperties(JsonObject json, SupplyRequest res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), SupplyRequest.SupplyRequestStatus.NULL, new SupplyRequest.SupplyRequestStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("category")) + res.setCategory(parseCodeableConcept(json.getAsJsonObject("category"))); + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), SupplyRequest.RequestPriority.NULL, new SupplyRequest.RequestPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("orderedItem")) + res.setOrderedItem(parseSupplyRequestSupplyRequestOrderedItemComponent(json.getAsJsonObject("orderedItem"), res)); + Type occurrence = parseType("occurrence", json); + if (occurrence != null) + res.setOccurrence(occurrence); + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("requester")) + res.setRequester(parseSupplyRequestSupplyRequestRequesterComponent(json.getAsJsonObject("requester"), res)); + if (json.has("supplier")) { + JsonArray array = json.getAsJsonArray("supplier"); + for (int i = 0; i < array.size(); i++) { + res.getSupplier().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + Type reason = parseType("reason", json); + if (reason != null) + res.setReason(reason); + if (json.has("deliverFrom")) + res.setDeliverFrom(parseReference(json.getAsJsonObject("deliverFrom"))); + if (json.has("deliverTo")) + res.setDeliverTo(parseReference(json.getAsJsonObject("deliverTo"))); + } + + protected SupplyRequest.SupplyRequestOrderedItemComponent parseSupplyRequestSupplyRequestOrderedItemComponent(JsonObject json, SupplyRequest owner) throws IOException, FHIRFormatError { + SupplyRequest.SupplyRequestOrderedItemComponent res = new SupplyRequest.SupplyRequestOrderedItemComponent(); + parseSupplyRequestSupplyRequestOrderedItemComponentProperties(json, owner, res); + return res; + } + + protected void parseSupplyRequestSupplyRequestOrderedItemComponentProperties(JsonObject json, SupplyRequest owner, SupplyRequest.SupplyRequestOrderedItemComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("quantity")) + res.setQuantity(parseQuantity(json.getAsJsonObject("quantity"))); + Type item = parseType("item", json); + if (item != null) + res.setItem(item); + } + + protected SupplyRequest.SupplyRequestRequesterComponent parseSupplyRequestSupplyRequestRequesterComponent(JsonObject json, SupplyRequest owner) throws IOException, FHIRFormatError { + SupplyRequest.SupplyRequestRequesterComponent res = new SupplyRequest.SupplyRequestRequesterComponent(); + parseSupplyRequestSupplyRequestRequesterComponentProperties(json, owner, res); + return res; + } + + protected void parseSupplyRequestSupplyRequestRequesterComponentProperties(JsonObject json, SupplyRequest owner, SupplyRequest.SupplyRequestRequesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("agent")) + res.setAgent(parseReference(json.getAsJsonObject("agent"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected Task parseTask(JsonObject json) throws IOException, FHIRFormatError { + Task res = new Task(); + parseTaskProperties(json, res); + return res; + } + + protected void parseTaskProperties(JsonObject json, Task res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + Type definition = parseType("definition", json); + if (definition != null) + res.setDefinition(definition); + if (json.has("basedOn")) { + JsonArray array = json.getAsJsonArray("basedOn"); + for (int i = 0; i < array.size(); i++) { + res.getBasedOn().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("groupIdentifier")) + res.setGroupIdentifier(parseIdentifier(json.getAsJsonObject("groupIdentifier"))); + if (json.has("partOf")) { + JsonArray array = json.getAsJsonArray("partOf"); + for (int i = 0; i < array.size(); i++) { + res.getPartOf().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Task.TaskStatus.NULL, new Task.TaskStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("statusReason")) + res.setStatusReason(parseCodeableConcept(json.getAsJsonObject("statusReason"))); + if (json.has("businessStatus")) + res.setBusinessStatus(parseCodeableConcept(json.getAsJsonObject("businessStatus"))); + if (json.has("intent")) + res.setIntentElement(parseEnumeration(json.get("intent").getAsString(), Task.TaskIntent.NULL, new Task.TaskIntentEnumFactory())); + if (json.has("_intent")) + parseElementProperties(json.getAsJsonObject("_intent"), res.getIntentElement()); + if (json.has("priority")) + res.setPriorityElement(parseEnumeration(json.get("priority").getAsString(), Task.TaskPriority.NULL, new Task.TaskPriorityEnumFactory())); + if (json.has("_priority")) + parseElementProperties(json.getAsJsonObject("_priority"), res.getPriorityElement()); + if (json.has("code")) + res.setCode(parseCodeableConcept(json.getAsJsonObject("code"))); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("focus")) + res.setFocus(parseReference(json.getAsJsonObject("focus"))); + if (json.has("for")) + res.setFor(parseReference(json.getAsJsonObject("for"))); + if (json.has("context")) + res.setContext(parseReference(json.getAsJsonObject("context"))); + if (json.has("executionPeriod")) + res.setExecutionPeriod(parsePeriod(json.getAsJsonObject("executionPeriod"))); + if (json.has("authoredOn")) + res.setAuthoredOnElement(parseDateTime(json.get("authoredOn").getAsString())); + if (json.has("_authoredOn")) + parseElementProperties(json.getAsJsonObject("_authoredOn"), res.getAuthoredOnElement()); + if (json.has("lastModified")) + res.setLastModifiedElement(parseDateTime(json.get("lastModified").getAsString())); + if (json.has("_lastModified")) + parseElementProperties(json.getAsJsonObject("_lastModified"), res.getLastModifiedElement()); + if (json.has("requester")) + res.setRequester(parseTaskTaskRequesterComponent(json.getAsJsonObject("requester"), res)); + if (json.has("performerType")) { + JsonArray array = json.getAsJsonArray("performerType"); + for (int i = 0; i < array.size(); i++) { + res.getPerformerType().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("owner")) + res.setOwner(parseReference(json.getAsJsonObject("owner"))); + if (json.has("reasonCode")) + res.setReasonCode(parseCodeableConcept(json.getAsJsonObject("reasonCode"))); + if (json.has("reasonReference")) + res.setReasonReference(parseReference(json.getAsJsonObject("reasonReference"))); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + if (json.has("relevantHistory")) { + JsonArray array = json.getAsJsonArray("relevantHistory"); + for (int i = 0; i < array.size(); i++) { + res.getRelevantHistory().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("restriction")) + res.setRestriction(parseTaskTaskRestrictionComponent(json.getAsJsonObject("restriction"), res)); + if (json.has("input")) { + JsonArray array = json.getAsJsonArray("input"); + for (int i = 0; i < array.size(); i++) { + res.getInput().add(parseTaskParameterComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("output")) { + JsonArray array = json.getAsJsonArray("output"); + for (int i = 0; i < array.size(); i++) { + res.getOutput().add(parseTaskTaskOutputComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected Task.TaskRequesterComponent parseTaskTaskRequesterComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { + Task.TaskRequesterComponent res = new Task.TaskRequesterComponent(); + parseTaskTaskRequesterComponentProperties(json, owner, res); + return res; + } + + protected void parseTaskTaskRequesterComponentProperties(JsonObject json, Task owner, Task.TaskRequesterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("agent")) + res.setAgent(parseReference(json.getAsJsonObject("agent"))); + if (json.has("onBehalfOf")) + res.setOnBehalfOf(parseReference(json.getAsJsonObject("onBehalfOf"))); + } + + protected Task.TaskRestrictionComponent parseTaskTaskRestrictionComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { + Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent(); + parseTaskTaskRestrictionComponentProperties(json, owner, res); + return res; + } + + protected void parseTaskTaskRestrictionComponentProperties(JsonObject json, Task owner, Task.TaskRestrictionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("repetitions")) + res.setRepetitionsElement(parsePositiveInt(json.get("repetitions").getAsString())); + if (json.has("_repetitions")) + parseElementProperties(json.getAsJsonObject("_repetitions"), res.getRepetitionsElement()); + if (json.has("period")) + res.setPeriod(parsePeriod(json.getAsJsonObject("period"))); + if (json.has("recipient")) { + JsonArray array = json.getAsJsonArray("recipient"); + for (int i = 0; i < array.size(); i++) { + res.getRecipient().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + } + + protected Task.ParameterComponent parseTaskParameterComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { + Task.ParameterComponent res = new Task.ParameterComponent(); + parseTaskParameterComponentProperties(json, owner, res); + return res; + } + + protected void parseTaskParameterComponentProperties(JsonObject json, Task owner, Task.ParameterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected Task.TaskOutputComponent parseTaskTaskOutputComponent(JsonObject json, Task owner) throws IOException, FHIRFormatError { + Task.TaskOutputComponent res = new Task.TaskOutputComponent(); + parseTaskTaskOutputComponentProperties(json, owner, res); + return res; + } + + protected void parseTaskTaskOutputComponentProperties(JsonObject json, Task owner, Task.TaskOutputComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCodeableConcept(json.getAsJsonObject("type"))); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected TestReport parseTestReport(JsonObject json) throws IOException, FHIRFormatError { + TestReport res = new TestReport(); + parseTestReportProperties(json, res); + return res; + } + + protected void parseTestReportProperties(JsonObject json, TestReport res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), TestReport.TestReportStatus.NULL, new TestReport.TestReportStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("testScript")) + res.setTestScript(parseReference(json.getAsJsonObject("testScript"))); + if (json.has("result")) + res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportResult.NULL, new TestReport.TestReportResultEnumFactory())); + if (json.has("_result")) + parseElementProperties(json.getAsJsonObject("_result"), res.getResultElement()); + if (json.has("score")) + res.setScoreElement(parseDecimal(json.get("score").getAsBigDecimal())); + if (json.has("_score")) + parseElementProperties(json.getAsJsonObject("_score"), res.getScoreElement()); + if (json.has("tester")) + res.setTesterElement(parseString(json.get("tester").getAsString())); + if (json.has("_tester")) + parseElementProperties(json.getAsJsonObject("_tester"), res.getTesterElement()); + if (json.has("issued")) + res.setIssuedElement(parseDateTime(json.get("issued").getAsString())); + if (json.has("_issued")) + parseElementProperties(json.getAsJsonObject("_issued"), res.getIssuedElement()); + if (json.has("participant")) { + JsonArray array = json.getAsJsonArray("participant"); + for (int i = 0; i < array.size(); i++) { + res.getParticipant().add(parseTestReportTestReportParticipantComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("setup")) + res.setSetup(parseTestReportTestReportSetupComponent(json.getAsJsonObject("setup"), res)); + if (json.has("test")) { + JsonArray array = json.getAsJsonArray("test"); + for (int i = 0; i < array.size(); i++) { + res.getTest().add(parseTestReportTestReportTestComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("teardown")) + res.setTeardown(parseTestReportTestReportTeardownComponent(json.getAsJsonObject("teardown"), res)); + } + + protected TestReport.TestReportParticipantComponent parseTestReportTestReportParticipantComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent(); + parseTestReportTestReportParticipantComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportTestReportParticipantComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportParticipantComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setTypeElement(parseEnumeration(json.get("type").getAsString(), TestReport.TestReportParticipantType.NULL, new TestReport.TestReportParticipantTypeEnumFactory())); + if (json.has("_type")) + parseElementProperties(json.getAsJsonObject("_type"), res.getTypeElement()); + if (json.has("uri")) + res.setUriElement(parseUri(json.get("uri").getAsString())); + if (json.has("_uri")) + parseElementProperties(json.getAsJsonObject("_uri"), res.getUriElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + } + + protected TestReport.TestReportSetupComponent parseTestReportTestReportSetupComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent(); + parseTestReportTestReportSetupComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportTestReportSetupComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportSetupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseTestReportSetupActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.SetupActionComponent res = new TestReport.SetupActionComponent(); + parseTestReportSetupActionComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportSetupActionComponentProperties(JsonObject json, TestReport owner, TestReport.SetupActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("operation")) + res.setOperation(parseTestReportSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); + if (json.has("assert")) + res.setAssert(parseTestReportSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); + } + + protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent(); + parseTestReportSetupActionOperationComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportSetupActionOperationComponentProperties(JsonObject json, TestReport owner, TestReport.SetupActionOperationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("result")) + res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); + if (json.has("_result")) + parseElementProperties(json.getAsJsonObject("_result"), res.getResultElement()); + if (json.has("message")) + res.setMessageElement(parseMarkdown(json.get("message").getAsString())); + if (json.has("_message")) + parseElementProperties(json.getAsJsonObject("_message"), res.getMessageElement()); + if (json.has("detail")) + res.setDetailElement(parseUri(json.get("detail").getAsString())); + if (json.has("_detail")) + parseElementProperties(json.getAsJsonObject("_detail"), res.getDetailElement()); + } + + protected TestReport.SetupActionAssertComponent parseTestReportSetupActionAssertComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent(); + parseTestReportSetupActionAssertComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportSetupActionAssertComponentProperties(JsonObject json, TestReport owner, TestReport.SetupActionAssertComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("result")) + res.setResultElement(parseEnumeration(json.get("result").getAsString(), TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); + if (json.has("_result")) + parseElementProperties(json.getAsJsonObject("_result"), res.getResultElement()); + if (json.has("message")) + res.setMessageElement(parseMarkdown(json.get("message").getAsString())); + if (json.has("_message")) + parseElementProperties(json.getAsJsonObject("_message"), res.getMessageElement()); + if (json.has("detail")) + res.setDetailElement(parseString(json.get("detail").getAsString())); + if (json.has("_detail")) + parseElementProperties(json.getAsJsonObject("_detail"), res.getDetailElement()); + } + + protected TestReport.TestReportTestComponent parseTestReportTestReportTestComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent(); + parseTestReportTestReportTestComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportTestReportTestComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportTestComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseTestReportTestActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestReport.TestActionComponent parseTestReportTestActionComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.TestActionComponent res = new TestReport.TestActionComponent(); + parseTestReportTestActionComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportTestActionComponentProperties(JsonObject json, TestReport owner, TestReport.TestActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("operation")) + res.setOperation(parseTestReportSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); + if (json.has("assert")) + res.setAssert(parseTestReportSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); + } + + protected TestReport.TestReportTeardownComponent parseTestReportTestReportTeardownComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent(); + parseTestReportTestReportTeardownComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportTestReportTeardownComponentProperties(JsonObject json, TestReport owner, TestReport.TestReportTeardownComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseTestReportTeardownActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(JsonObject json, TestReport owner) throws IOException, FHIRFormatError { + TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent(); + parseTestReportTeardownActionComponentProperties(json, owner, res); + return res; + } + + protected void parseTestReportTeardownActionComponentProperties(JsonObject json, TestReport owner, TestReport.TeardownActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("operation")) + res.setOperation(parseTestReportSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); + } + + protected TestScript parseTestScript(JsonObject json) throws IOException, FHIRFormatError { + TestScript res = new TestScript(); + parseTestScriptProperties(json, res); + return res; + } + + protected void parseTestScriptProperties(JsonObject json, TestScript res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) + res.setIdentifier(parseIdentifier(json.getAsJsonObject("identifier"))); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("origin")) { + JsonArray array = json.getAsJsonArray("origin"); + for (int i = 0; i < array.size(); i++) { + res.getOrigin().add(parseTestScriptTestScriptOriginComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("destination")) { + JsonArray array = json.getAsJsonArray("destination"); + for (int i = 0; i < array.size(); i++) { + res.getDestination().add(parseTestScriptTestScriptDestinationComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("metadata")) + res.setMetadata(parseTestScriptTestScriptMetadataComponent(json.getAsJsonObject("metadata"), res)); + if (json.has("fixture")) { + JsonArray array = json.getAsJsonArray("fixture"); + for (int i = 0; i < array.size(); i++) { + res.getFixture().add(parseTestScriptTestScriptFixtureComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("profile")) { + JsonArray array = json.getAsJsonArray("profile"); + for (int i = 0; i < array.size(); i++) { + res.getProfile().add(parseReference(array.get(i).getAsJsonObject())); + } + }; + if (json.has("variable")) { + JsonArray array = json.getAsJsonArray("variable"); + for (int i = 0; i < array.size(); i++) { + res.getVariable().add(parseTestScriptTestScriptVariableComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("rule")) { + JsonArray array = json.getAsJsonArray("rule"); + for (int i = 0; i < array.size(); i++) { + res.getRule().add(parseTestScriptTestScriptRuleComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("ruleset")) { + JsonArray array = json.getAsJsonArray("ruleset"); + for (int i = 0; i < array.size(); i++) { + res.getRuleset().add(parseTestScriptTestScriptRulesetComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("setup")) + res.setSetup(parseTestScriptTestScriptSetupComponent(json.getAsJsonObject("setup"), res)); + if (json.has("test")) { + JsonArray array = json.getAsJsonArray("test"); + for (int i = 0; i < array.size(); i++) { + res.getTest().add(parseTestScriptTestScriptTestComponent(array.get(i).getAsJsonObject(), res)); + } + }; + if (json.has("teardown")) + res.setTeardown(parseTestScriptTestScriptTeardownComponent(json.getAsJsonObject("teardown"), res)); + } + + protected TestScript.TestScriptOriginComponent parseTestScriptTestScriptOriginComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent(); + parseTestScriptTestScriptOriginComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptOriginComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptOriginComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("index")) + res.setIndexElement(parseInteger(json.get("index").getAsLong())); + if (json.has("_index")) + parseElementProperties(json.getAsJsonObject("_index"), res.getIndexElement()); + if (json.has("profile")) + res.setProfile(parseCoding(json.getAsJsonObject("profile"))); + } + + protected TestScript.TestScriptDestinationComponent parseTestScriptTestScriptDestinationComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent(); + parseTestScriptTestScriptDestinationComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptDestinationComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptDestinationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("index")) + res.setIndexElement(parseInteger(json.get("index").getAsLong())); + if (json.has("_index")) + parseElementProperties(json.getAsJsonObject("_index"), res.getIndexElement()); + if (json.has("profile")) + res.setProfile(parseCoding(json.getAsJsonObject("profile"))); + } + + protected TestScript.TestScriptMetadataComponent parseTestScriptTestScriptMetadataComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent(); + parseTestScriptTestScriptMetadataComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptMetadataComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptMetadataComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parseTestScriptTestScriptMetadataLinkComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("capability")) { + JsonArray array = json.getAsJsonArray("capability"); + for (int i = 0; i < array.size(); i++) { + res.getCapability().add(parseTestScriptTestScriptMetadataCapabilityComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.TestScriptMetadataLinkComponent parseTestScriptTestScriptMetadataLinkComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent(); + parseTestScriptTestScriptMetadataLinkComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptMetadataLinkComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptMetadataLinkComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + } + + protected TestScript.TestScriptMetadataCapabilityComponent parseTestScriptTestScriptMetadataCapabilityComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent(); + parseTestScriptTestScriptMetadataCapabilityComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptMetadataCapabilityComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptMetadataCapabilityComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("required")) + res.setRequiredElement(parseBoolean(json.get("required").getAsBoolean())); + if (json.has("_required")) + parseElementProperties(json.getAsJsonObject("_required"), res.getRequiredElement()); + if (json.has("validated")) + res.setValidatedElement(parseBoolean(json.get("validated").getAsBoolean())); + if (json.has("_validated")) + parseElementProperties(json.getAsJsonObject("_validated"), res.getValidatedElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("origin")) { + JsonArray array = json.getAsJsonArray("origin"); + for (int i = 0; i < array.size(); i++) { + res.getOrigin().add(parseInteger(array.get(i).getAsLong())); + } + }; + if (json.has("_origin")) { + JsonArray array = json.getAsJsonArray("_origin"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getOrigin().size()) + res.getOrigin().add(parseInteger(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getOrigin().get(i)); + } + }; + if (json.has("destination")) + res.setDestinationElement(parseInteger(json.get("destination").getAsLong())); + if (json.has("_destination")) + parseElementProperties(json.getAsJsonObject("_destination"), res.getDestinationElement()); + if (json.has("link")) { + JsonArray array = json.getAsJsonArray("link"); + for (int i = 0; i < array.size(); i++) { + res.getLink().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_link")) { + JsonArray array = json.getAsJsonArray("_link"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getLink().size()) + res.getLink().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getLink().get(i)); + } + }; + if (json.has("capabilities")) + res.setCapabilities(parseReference(json.getAsJsonObject("capabilities"))); + } + + protected TestScript.TestScriptFixtureComponent parseTestScriptTestScriptFixtureComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent(); + parseTestScriptTestScriptFixtureComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptFixtureComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptFixtureComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("autocreate")) + res.setAutocreateElement(parseBoolean(json.get("autocreate").getAsBoolean())); + if (json.has("_autocreate")) + parseElementProperties(json.getAsJsonObject("_autocreate"), res.getAutocreateElement()); + if (json.has("autodelete")) + res.setAutodeleteElement(parseBoolean(json.get("autodelete").getAsBoolean())); + if (json.has("_autodelete")) + parseElementProperties(json.getAsJsonObject("_autodelete"), res.getAutodeleteElement()); + if (json.has("resource")) + res.setResource(parseReference(json.getAsJsonObject("resource"))); + } + + protected TestScript.TestScriptVariableComponent parseTestScriptTestScriptVariableComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent(); + parseTestScriptTestScriptVariableComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptVariableComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptVariableComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("defaultValue")) + res.setDefaultValueElement(parseString(json.get("defaultValue").getAsString())); + if (json.has("_defaultValue")) + parseElementProperties(json.getAsJsonObject("_defaultValue"), res.getDefaultValueElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + if (json.has("headerField")) + res.setHeaderFieldElement(parseString(json.get("headerField").getAsString())); + if (json.has("_headerField")) + parseElementProperties(json.getAsJsonObject("_headerField"), res.getHeaderFieldElement()); + if (json.has("hint")) + res.setHintElement(parseString(json.get("hint").getAsString())); + if (json.has("_hint")) + parseElementProperties(json.getAsJsonObject("_hint"), res.getHintElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("sourceId")) + res.setSourceIdElement(parseId(json.get("sourceId").getAsString())); + if (json.has("_sourceId")) + parseElementProperties(json.getAsJsonObject("_sourceId"), res.getSourceIdElement()); + } + + protected TestScript.TestScriptRuleComponent parseTestScriptTestScriptRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptRuleComponent res = new TestScript.TestScriptRuleComponent(); + parseTestScriptTestScriptRuleComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptRuleComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptRuleComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("resource")) + res.setResource(parseReference(json.getAsJsonObject("resource"))); + if (json.has("param")) { + JsonArray array = json.getAsJsonArray("param"); + for (int i = 0; i < array.size(); i++) { + res.getParam().add(parseTestScriptRuleParamComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.RuleParamComponent parseTestScriptRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.RuleParamComponent res = new TestScript.RuleParamComponent(); + parseTestScriptRuleParamComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.RuleParamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected TestScript.TestScriptRulesetComponent parseTestScriptTestScriptRulesetComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptRulesetComponent res = new TestScript.TestScriptRulesetComponent(); + parseTestScriptTestScriptRulesetComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptRulesetComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptRulesetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("resource")) + res.setResource(parseReference(json.getAsJsonObject("resource"))); + if (json.has("rule")) { + JsonArray array = json.getAsJsonArray("rule"); + for (int i = 0; i < array.size(); i++) { + res.getRule().add(parseTestScriptRulesetRuleComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.RulesetRuleComponent parseTestScriptRulesetRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.RulesetRuleComponent res = new TestScript.RulesetRuleComponent(); + parseTestScriptRulesetRuleComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptRulesetRuleComponentProperties(JsonObject json, TestScript owner, TestScript.RulesetRuleComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("ruleId")) + res.setRuleIdElement(parseId(json.get("ruleId").getAsString())); + if (json.has("_ruleId")) + parseElementProperties(json.getAsJsonObject("_ruleId"), res.getRuleIdElement()); + if (json.has("param")) { + JsonArray array = json.getAsJsonArray("param"); + for (int i = 0; i < array.size(); i++) { + res.getParam().add(parseTestScriptRulesetRuleParamComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.RulesetRuleParamComponent parseTestScriptRulesetRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.RulesetRuleParamComponent res = new TestScript.RulesetRuleParamComponent(); + parseTestScriptRulesetRuleParamComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptRulesetRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.RulesetRuleParamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected TestScript.TestScriptSetupComponent parseTestScriptTestScriptSetupComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent(); + parseTestScriptTestScriptSetupComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptSetupComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptSetupComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseTestScriptSetupActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.SetupActionComponent res = new TestScript.SetupActionComponent(); + parseTestScriptSetupActionComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptSetupActionComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("operation")) + res.setOperation(parseTestScriptSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); + if (json.has("assert")) + res.setAssert(parseTestScriptSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); + } + + protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent(); + parseTestScriptSetupActionOperationComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptSetupActionOperationComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionOperationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("type")) + res.setType(parseCoding(json.getAsJsonObject("type"))); + if (json.has("resource")) + res.setResourceElement(parseCode(json.get("resource").getAsString())); + if (json.has("_resource")) + parseElementProperties(json.getAsJsonObject("_resource"), res.getResourceElement()); + if (json.has("label")) + res.setLabelElement(parseString(json.get("label").getAsString())); + if (json.has("_label")) + parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("accept")) + res.setAcceptElement(parseEnumeration(json.get("accept").getAsString(), TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); + if (json.has("_accept")) + parseElementProperties(json.getAsJsonObject("_accept"), res.getAcceptElement()); + if (json.has("contentType")) + res.setContentTypeElement(parseEnumeration(json.get("contentType").getAsString(), TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); + if (json.has("_contentType")) + parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); + if (json.has("destination")) + res.setDestinationElement(parseInteger(json.get("destination").getAsLong())); + if (json.has("_destination")) + parseElementProperties(json.getAsJsonObject("_destination"), res.getDestinationElement()); + if (json.has("encodeRequestUrl")) + res.setEncodeRequestUrlElement(parseBoolean(json.get("encodeRequestUrl").getAsBoolean())); + if (json.has("_encodeRequestUrl")) + parseElementProperties(json.getAsJsonObject("_encodeRequestUrl"), res.getEncodeRequestUrlElement()); + if (json.has("origin")) + res.setOriginElement(parseInteger(json.get("origin").getAsLong())); + if (json.has("_origin")) + parseElementProperties(json.getAsJsonObject("_origin"), res.getOriginElement()); + if (json.has("params")) + res.setParamsElement(parseString(json.get("params").getAsString())); + if (json.has("_params")) + parseElementProperties(json.getAsJsonObject("_params"), res.getParamsElement()); + if (json.has("requestHeader")) { + JsonArray array = json.getAsJsonArray("requestHeader"); + for (int i = 0; i < array.size(); i++) { + res.getRequestHeader().add(parseTestScriptSetupActionOperationRequestHeaderComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("requestId")) + res.setRequestIdElement(parseId(json.get("requestId").getAsString())); + if (json.has("_requestId")) + parseElementProperties(json.getAsJsonObject("_requestId"), res.getRequestIdElement()); + if (json.has("responseId")) + res.setResponseIdElement(parseId(json.get("responseId").getAsString())); + if (json.has("_responseId")) + parseElementProperties(json.getAsJsonObject("_responseId"), res.getResponseIdElement()); + if (json.has("sourceId")) + res.setSourceIdElement(parseId(json.get("sourceId").getAsString())); + if (json.has("_sourceId")) + parseElementProperties(json.getAsJsonObject("_sourceId"), res.getSourceIdElement()); + if (json.has("targetId")) + res.setTargetIdElement(parseId(json.get("targetId").getAsString())); + if (json.has("_targetId")) + parseElementProperties(json.getAsJsonObject("_targetId"), res.getTargetIdElement()); + if (json.has("url")) + res.setUrlElement(parseString(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + } + + protected TestScript.SetupActionOperationRequestHeaderComponent parseTestScriptSetupActionOperationRequestHeaderComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent(); + parseTestScriptSetupActionOperationRequestHeaderComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptSetupActionOperationRequestHeaderComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionOperationRequestHeaderComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("field")) + res.setFieldElement(parseString(json.get("field").getAsString())); + if (json.has("_field")) + parseElementProperties(json.getAsJsonObject("_field"), res.getFieldElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected TestScript.SetupActionAssertComponent parseTestScriptSetupActionAssertComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent(); + parseTestScriptSetupActionAssertComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptSetupActionAssertComponentProperties(JsonObject json, TestScript owner, TestScript.SetupActionAssertComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("label")) + res.setLabelElement(parseString(json.get("label").getAsString())); + if (json.has("_label")) + parseElementProperties(json.getAsJsonObject("_label"), res.getLabelElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("direction")) + res.setDirectionElement(parseEnumeration(json.get("direction").getAsString(), TestScript.AssertionDirectionType.NULL, new TestScript.AssertionDirectionTypeEnumFactory())); + if (json.has("_direction")) + parseElementProperties(json.getAsJsonObject("_direction"), res.getDirectionElement()); + if (json.has("compareToSourceId")) + res.setCompareToSourceIdElement(parseString(json.get("compareToSourceId").getAsString())); + if (json.has("_compareToSourceId")) + parseElementProperties(json.getAsJsonObject("_compareToSourceId"), res.getCompareToSourceIdElement()); + if (json.has("compareToSourceExpression")) + res.setCompareToSourceExpressionElement(parseString(json.get("compareToSourceExpression").getAsString())); + if (json.has("_compareToSourceExpression")) + parseElementProperties(json.getAsJsonObject("_compareToSourceExpression"), res.getCompareToSourceExpressionElement()); + if (json.has("compareToSourcePath")) + res.setCompareToSourcePathElement(parseString(json.get("compareToSourcePath").getAsString())); + if (json.has("_compareToSourcePath")) + parseElementProperties(json.getAsJsonObject("_compareToSourcePath"), res.getCompareToSourcePathElement()); + if (json.has("contentType")) + res.setContentTypeElement(parseEnumeration(json.get("contentType").getAsString(), TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); + if (json.has("_contentType")) + parseElementProperties(json.getAsJsonObject("_contentType"), res.getContentTypeElement()); + if (json.has("expression")) + res.setExpressionElement(parseString(json.get("expression").getAsString())); + if (json.has("_expression")) + parseElementProperties(json.getAsJsonObject("_expression"), res.getExpressionElement()); + if (json.has("headerField")) + res.setHeaderFieldElement(parseString(json.get("headerField").getAsString())); + if (json.has("_headerField")) + parseElementProperties(json.getAsJsonObject("_headerField"), res.getHeaderFieldElement()); + if (json.has("minimumId")) + res.setMinimumIdElement(parseString(json.get("minimumId").getAsString())); + if (json.has("_minimumId")) + parseElementProperties(json.getAsJsonObject("_minimumId"), res.getMinimumIdElement()); + if (json.has("navigationLinks")) + res.setNavigationLinksElement(parseBoolean(json.get("navigationLinks").getAsBoolean())); + if (json.has("_navigationLinks")) + parseElementProperties(json.getAsJsonObject("_navigationLinks"), res.getNavigationLinksElement()); + if (json.has("operator")) + res.setOperatorElement(parseEnumeration(json.get("operator").getAsString(), TestScript.AssertionOperatorType.NULL, new TestScript.AssertionOperatorTypeEnumFactory())); + if (json.has("_operator")) + parseElementProperties(json.getAsJsonObject("_operator"), res.getOperatorElement()); + if (json.has("path")) + res.setPathElement(parseString(json.get("path").getAsString())); + if (json.has("_path")) + parseElementProperties(json.getAsJsonObject("_path"), res.getPathElement()); + if (json.has("requestMethod")) + res.setRequestMethodElement(parseEnumeration(json.get("requestMethod").getAsString(), TestScript.TestScriptRequestMethodCode.NULL, new TestScript.TestScriptRequestMethodCodeEnumFactory())); + if (json.has("_requestMethod")) + parseElementProperties(json.getAsJsonObject("_requestMethod"), res.getRequestMethodElement()); + if (json.has("requestURL")) + res.setRequestURLElement(parseString(json.get("requestURL").getAsString())); + if (json.has("_requestURL")) + parseElementProperties(json.getAsJsonObject("_requestURL"), res.getRequestURLElement()); + if (json.has("resource")) + res.setResourceElement(parseCode(json.get("resource").getAsString())); + if (json.has("_resource")) + parseElementProperties(json.getAsJsonObject("_resource"), res.getResourceElement()); + if (json.has("response")) + res.setResponseElement(parseEnumeration(json.get("response").getAsString(), TestScript.AssertionResponseTypes.NULL, new TestScript.AssertionResponseTypesEnumFactory())); + if (json.has("_response")) + parseElementProperties(json.getAsJsonObject("_response"), res.getResponseElement()); + if (json.has("responseCode")) + res.setResponseCodeElement(parseString(json.get("responseCode").getAsString())); + if (json.has("_responseCode")) + parseElementProperties(json.getAsJsonObject("_responseCode"), res.getResponseCodeElement()); + if (json.has("rule")) + res.setRule(parseTestScriptActionAssertRuleComponent(json.getAsJsonObject("rule"), owner)); + if (json.has("ruleset")) + res.setRuleset(parseTestScriptActionAssertRulesetComponent(json.getAsJsonObject("ruleset"), owner)); + if (json.has("sourceId")) + res.setSourceIdElement(parseId(json.get("sourceId").getAsString())); + if (json.has("_sourceId")) + parseElementProperties(json.getAsJsonObject("_sourceId"), res.getSourceIdElement()); + if (json.has("validateProfileId")) + res.setValidateProfileIdElement(parseId(json.get("validateProfileId").getAsString())); + if (json.has("_validateProfileId")) + parseElementProperties(json.getAsJsonObject("_validateProfileId"), res.getValidateProfileIdElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + if (json.has("warningOnly")) + res.setWarningOnlyElement(parseBoolean(json.get("warningOnly").getAsBoolean())); + if (json.has("_warningOnly")) + parseElementProperties(json.getAsJsonObject("_warningOnly"), res.getWarningOnlyElement()); + } + + protected TestScript.ActionAssertRuleComponent parseTestScriptActionAssertRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.ActionAssertRuleComponent res = new TestScript.ActionAssertRuleComponent(); + parseTestScriptActionAssertRuleComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptActionAssertRuleComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRuleComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("ruleId")) + res.setRuleIdElement(parseId(json.get("ruleId").getAsString())); + if (json.has("_ruleId")) + parseElementProperties(json.getAsJsonObject("_ruleId"), res.getRuleIdElement()); + if (json.has("param")) { + JsonArray array = json.getAsJsonArray("param"); + for (int i = 0; i < array.size(); i++) { + res.getParam().add(parseTestScriptActionAssertRuleParamComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.ActionAssertRuleParamComponent parseTestScriptActionAssertRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.ActionAssertRuleParamComponent res = new TestScript.ActionAssertRuleParamComponent(); + parseTestScriptActionAssertRuleParamComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptActionAssertRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRuleParamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected TestScript.ActionAssertRulesetComponent parseTestScriptActionAssertRulesetComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.ActionAssertRulesetComponent res = new TestScript.ActionAssertRulesetComponent(); + parseTestScriptActionAssertRulesetComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptActionAssertRulesetComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRulesetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("rulesetId")) + res.setRulesetIdElement(parseId(json.get("rulesetId").getAsString())); + if (json.has("_rulesetId")) + parseElementProperties(json.getAsJsonObject("_rulesetId"), res.getRulesetIdElement()); + if (json.has("rule")) { + JsonArray array = json.getAsJsonArray("rule"); + for (int i = 0; i < array.size(); i++) { + res.getRule().add(parseTestScriptActionAssertRulesetRuleComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.ActionAssertRulesetRuleComponent parseTestScriptActionAssertRulesetRuleComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.ActionAssertRulesetRuleComponent res = new TestScript.ActionAssertRulesetRuleComponent(); + parseTestScriptActionAssertRulesetRuleComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptActionAssertRulesetRuleComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRulesetRuleComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("ruleId")) + res.setRuleIdElement(parseId(json.get("ruleId").getAsString())); + if (json.has("_ruleId")) + parseElementProperties(json.getAsJsonObject("_ruleId"), res.getRuleIdElement()); + if (json.has("param")) { + JsonArray array = json.getAsJsonArray("param"); + for (int i = 0; i < array.size(); i++) { + res.getParam().add(parseTestScriptActionAssertRulesetRuleParamComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.ActionAssertRulesetRuleParamComponent parseTestScriptActionAssertRulesetRuleParamComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.ActionAssertRulesetRuleParamComponent res = new TestScript.ActionAssertRulesetRuleParamComponent(); + parseTestScriptActionAssertRulesetRuleParamComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptActionAssertRulesetRuleParamComponentProperties(JsonObject json, TestScript owner, TestScript.ActionAssertRulesetRuleParamComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected TestScript.TestScriptTestComponent parseTestScriptTestScriptTestComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent(); + parseTestScriptTestScriptTestComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptTestComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptTestComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("description")) + res.setDescriptionElement(parseString(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseTestScriptTestActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.TestActionComponent parseTestScriptTestActionComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestActionComponent res = new TestScript.TestActionComponent(); + parseTestScriptTestActionComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestActionComponentProperties(JsonObject json, TestScript owner, TestScript.TestActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("operation")) + res.setOperation(parseTestScriptSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); + if (json.has("assert")) + res.setAssert(parseTestScriptSetupActionAssertComponent(json.getAsJsonObject("assert"), owner)); + } + + protected TestScript.TestScriptTeardownComponent parseTestScriptTestScriptTeardownComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent(); + parseTestScriptTestScriptTeardownComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTestScriptTeardownComponentProperties(JsonObject json, TestScript owner, TestScript.TestScriptTeardownComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("action")) { + JsonArray array = json.getAsJsonArray("action"); + for (int i = 0; i < array.size(); i++) { + res.getAction().add(parseTestScriptTeardownActionComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(JsonObject json, TestScript owner) throws IOException, FHIRFormatError { + TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent(); + parseTestScriptTeardownActionComponentProperties(json, owner, res); + return res; + } + + protected void parseTestScriptTeardownActionComponentProperties(JsonObject json, TestScript owner, TestScript.TeardownActionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("operation")) + res.setOperation(parseTestScriptSetupActionOperationComponent(json.getAsJsonObject("operation"), owner)); + } + + protected ValueSet parseValueSet(JsonObject json) throws IOException, FHIRFormatError { + ValueSet res = new ValueSet(); + parseValueSetProperties(json, res); + return res; + } + + protected void parseValueSetProperties(JsonObject json, ValueSet res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("url")) + res.setUrlElement(parseUri(json.get("url").getAsString())); + if (json.has("_url")) + parseElementProperties(json.getAsJsonObject("_url"), res.getUrlElement()); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + if (json.has("title")) + res.setTitleElement(parseString(json.get("title").getAsString())); + if (json.has("_title")) + parseElementProperties(json.getAsJsonObject("_title"), res.getTitleElement()); + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("experimental")) + res.setExperimentalElement(parseBoolean(json.get("experimental").getAsBoolean())); + if (json.has("_experimental")) + parseElementProperties(json.getAsJsonObject("_experimental"), res.getExperimentalElement()); + if (json.has("date")) + res.setDateElement(parseDateTime(json.get("date").getAsString())); + if (json.has("_date")) + parseElementProperties(json.getAsJsonObject("_date"), res.getDateElement()); + if (json.has("publisher")) + res.setPublisherElement(parseString(json.get("publisher").getAsString())); + if (json.has("_publisher")) + parseElementProperties(json.getAsJsonObject("_publisher"), res.getPublisherElement()); + if (json.has("contact")) { + JsonArray array = json.getAsJsonArray("contact"); + for (int i = 0; i < array.size(); i++) { + res.getContact().add(parseContactDetail(array.get(i).getAsJsonObject())); + } + }; + if (json.has("description")) + res.setDescriptionElement(parseMarkdown(json.get("description").getAsString())); + if (json.has("_description")) + parseElementProperties(json.getAsJsonObject("_description"), res.getDescriptionElement()); + if (json.has("useContext")) { + JsonArray array = json.getAsJsonArray("useContext"); + for (int i = 0; i < array.size(); i++) { + res.getUseContext().add(parseUsageContext(array.get(i).getAsJsonObject())); + } + }; + if (json.has("jurisdiction")) { + JsonArray array = json.getAsJsonArray("jurisdiction"); + for (int i = 0; i < array.size(); i++) { + res.getJurisdiction().add(parseCodeableConcept(array.get(i).getAsJsonObject())); + } + }; + if (json.has("immutable")) + res.setImmutableElement(parseBoolean(json.get("immutable").getAsBoolean())); + if (json.has("_immutable")) + parseElementProperties(json.getAsJsonObject("_immutable"), res.getImmutableElement()); + if (json.has("purpose")) + res.setPurposeElement(parseMarkdown(json.get("purpose").getAsString())); + if (json.has("_purpose")) + parseElementProperties(json.getAsJsonObject("_purpose"), res.getPurposeElement()); + if (json.has("copyright")) + res.setCopyrightElement(parseMarkdown(json.get("copyright").getAsString())); + if (json.has("_copyright")) + parseElementProperties(json.getAsJsonObject("_copyright"), res.getCopyrightElement()); + if (json.has("extensible")) + res.setExtensibleElement(parseBoolean(json.get("extensible").getAsBoolean())); + if (json.has("_extensible")) + parseElementProperties(json.getAsJsonObject("_extensible"), res.getExtensibleElement()); + if (json.has("compose")) + res.setCompose(parseValueSetValueSetComposeComponent(json.getAsJsonObject("compose"), res)); + if (json.has("expansion")) + res.setExpansion(parseValueSetValueSetExpansionComponent(json.getAsJsonObject("expansion"), res)); + } + + protected ValueSet.ValueSetComposeComponent parseValueSetValueSetComposeComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent(); + parseValueSetValueSetComposeComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetValueSetComposeComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetComposeComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("lockedDate")) + res.setLockedDateElement(parseDate(json.get("lockedDate").getAsString())); + if (json.has("_lockedDate")) + parseElementProperties(json.getAsJsonObject("_lockedDate"), res.getLockedDateElement()); + if (json.has("inactive")) + res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean())); + if (json.has("_inactive")) + parseElementProperties(json.getAsJsonObject("_inactive"), res.getInactiveElement()); + if (json.has("include")) { + JsonArray array = json.getAsJsonArray("include"); + for (int i = 0; i < array.size(); i++) { + res.getInclude().add(parseValueSetConceptSetComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("exclude")) { + JsonArray array = json.getAsJsonArray("exclude"); + for (int i = 0; i < array.size(); i++) { + res.getExclude().add(parseValueSetConceptSetComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent(); + parseValueSetConceptSetComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetConceptSetComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptSetComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("concept")) { + JsonArray array = json.getAsJsonArray("concept"); + for (int i = 0; i < array.size(); i++) { + res.getConcept().add(parseValueSetConceptReferenceComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("filter")) { + JsonArray array = json.getAsJsonArray("filter"); + for (int i = 0; i < array.size(); i++) { + res.getFilter().add(parseValueSetConceptSetFilterComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("valueSet")) { + JsonArray array = json.getAsJsonArray("valueSet"); + for (int i = 0; i < array.size(); i++) { + res.getValueSet().add(parseUri(array.get(i).getAsString())); + } + }; + if (json.has("_valueSet")) { + JsonArray array = json.getAsJsonArray("_valueSet"); + for (int i = 0; i < array.size(); i++) { + if (i == res.getValueSet().size()) + res.getValueSet().add(parseUri(null)); + if (array.get(i) instanceof JsonObject) + parseElementProperties(array.get(i).getAsJsonObject(), res.getValueSet().get(i)); + } + }; + } + + protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent(); + parseValueSetConceptReferenceComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetConceptReferenceComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptReferenceComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("designation")) { + JsonArray array = json.getAsJsonArray("designation"); + for (int i = 0; i < array.size(); i++) { + res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent(); + parseValueSetConceptReferenceDesignationComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetConceptReferenceDesignationComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptReferenceDesignationComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("language")) + res.setLanguageElement(parseCode(json.get("language").getAsString())); + if (json.has("_language")) + parseElementProperties(json.getAsJsonObject("_language"), res.getLanguageElement()); + if (json.has("use")) + res.setUse(parseCoding(json.getAsJsonObject("use"))); + if (json.has("value")) + res.setValueElement(parseString(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent(); + parseValueSetConceptSetFilterComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetConceptSetFilterComponentProperties(JsonObject json, ValueSet owner, ValueSet.ConceptSetFilterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("property")) + res.setPropertyElement(parseCode(json.get("property").getAsString())); + if (json.has("_property")) + parseElementProperties(json.getAsJsonObject("_property"), res.getPropertyElement()); + if (json.has("op")) + res.setOpElement(parseEnumeration(json.get("op").getAsString(), ValueSet.FilterOperator.NULL, new ValueSet.FilterOperatorEnumFactory())); + if (json.has("_op")) + parseElementProperties(json.getAsJsonObject("_op"), res.getOpElement()); + if (json.has("value")) + res.setValueElement(parseCode(json.get("value").getAsString())); + if (json.has("_value")) + parseElementProperties(json.getAsJsonObject("_value"), res.getValueElement()); + } + + protected ValueSet.ValueSetExpansionComponent parseValueSetValueSetExpansionComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent(); + parseValueSetValueSetExpansionComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetValueSetExpansionComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetExpansionComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("identifier")) + res.setIdentifierElement(parseUri(json.get("identifier").getAsString())); + if (json.has("_identifier")) + parseElementProperties(json.getAsJsonObject("_identifier"), res.getIdentifierElement()); + if (json.has("timestamp")) + res.setTimestampElement(parseDateTime(json.get("timestamp").getAsString())); + if (json.has("_timestamp")) + parseElementProperties(json.getAsJsonObject("_timestamp"), res.getTimestampElement()); + if (json.has("total")) + res.setTotalElement(parseInteger(json.get("total").getAsLong())); + if (json.has("_total")) + parseElementProperties(json.getAsJsonObject("_total"), res.getTotalElement()); + if (json.has("offset")) + res.setOffsetElement(parseInteger(json.get("offset").getAsLong())); + if (json.has("_offset")) + parseElementProperties(json.getAsJsonObject("_offset"), res.getOffsetElement()); + if (json.has("parameter")) { + JsonArray array = json.getAsJsonArray("parameter"); + for (int i = 0; i < array.size(); i++) { + res.getParameter().add(parseValueSetValueSetExpansionParameterComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("contains")) { + JsonArray array = json.getAsJsonArray("contains"); + for (int i = 0; i < array.size(); i++) { + res.getContains().add(parseValueSetValueSetExpansionContainsComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected ValueSet.ValueSetExpansionParameterComponent parseValueSetValueSetExpansionParameterComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent(); + parseValueSetValueSetExpansionParameterComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetValueSetExpansionParameterComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetExpansionParameterComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("name")) + res.setNameElement(parseString(json.get("name").getAsString())); + if (json.has("_name")) + parseElementProperties(json.getAsJsonObject("_name"), res.getNameElement()); + Type value = parseType("value", json); + if (value != null) + res.setValue(value); + } + + protected ValueSet.ValueSetExpansionContainsComponent parseValueSetValueSetExpansionContainsComponent(JsonObject json, ValueSet owner) throws IOException, FHIRFormatError { + ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent(); + parseValueSetValueSetExpansionContainsComponentProperties(json, owner, res); + return res; + } + + protected void parseValueSetValueSetExpansionContainsComponentProperties(JsonObject json, ValueSet owner, ValueSet.ValueSetExpansionContainsComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("system")) + res.setSystemElement(parseUri(json.get("system").getAsString())); + if (json.has("_system")) + parseElementProperties(json.getAsJsonObject("_system"), res.getSystemElement()); + if (json.has("abstract")) + res.setAbstractElement(parseBoolean(json.get("abstract").getAsBoolean())); + if (json.has("_abstract")) + parseElementProperties(json.getAsJsonObject("_abstract"), res.getAbstractElement()); + if (json.has("inactive")) + res.setInactiveElement(parseBoolean(json.get("inactive").getAsBoolean())); + if (json.has("_inactive")) + parseElementProperties(json.getAsJsonObject("_inactive"), res.getInactiveElement()); + if (json.has("version")) + res.setVersionElement(parseString(json.get("version").getAsString())); + if (json.has("_version")) + parseElementProperties(json.getAsJsonObject("_version"), res.getVersionElement()); + if (json.has("code")) + res.setCodeElement(parseCode(json.get("code").getAsString())); + if (json.has("_code")) + parseElementProperties(json.getAsJsonObject("_code"), res.getCodeElement()); + if (json.has("display")) + res.setDisplayElement(parseString(json.get("display").getAsString())); + if (json.has("_display")) + parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement()); + if (json.has("designation")) { + JsonArray array = json.getAsJsonArray("designation"); + for (int i = 0; i < array.size(); i++) { + res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + if (json.has("contains")) { + JsonArray array = json.getAsJsonArray("contains"); + for (int i = 0; i < array.size(); i++) { + res.getContains().add(parseValueSetValueSetExpansionContainsComponent(array.get(i).getAsJsonObject(), owner)); + } + }; + } + + protected VisionPrescription parseVisionPrescription(JsonObject json) throws IOException, FHIRFormatError { + VisionPrescription res = new VisionPrescription(); + parseVisionPrescriptionProperties(json, res); + return res; + } + + protected void parseVisionPrescriptionProperties(JsonObject json, VisionPrescription res) throws IOException, FHIRFormatError { + parseDomainResourceProperties(json, res); + if (json.has("identifier")) { + JsonArray array = json.getAsJsonArray("identifier"); + for (int i = 0; i < array.size(); i++) { + res.getIdentifier().add(parseIdentifier(array.get(i).getAsJsonObject())); + } + }; + if (json.has("status")) + res.setStatusElement(parseEnumeration(json.get("status").getAsString(), VisionPrescription.VisionStatus.NULL, new VisionPrescription.VisionStatusEnumFactory())); + if (json.has("_status")) + parseElementProperties(json.getAsJsonObject("_status"), res.getStatusElement()); + if (json.has("patient")) + res.setPatient(parseReference(json.getAsJsonObject("patient"))); + if (json.has("encounter")) + res.setEncounter(parseReference(json.getAsJsonObject("encounter"))); + if (json.has("dateWritten")) + res.setDateWrittenElement(parseDateTime(json.get("dateWritten").getAsString())); + if (json.has("_dateWritten")) + parseElementProperties(json.getAsJsonObject("_dateWritten"), res.getDateWrittenElement()); + if (json.has("prescriber")) + res.setPrescriber(parseReference(json.getAsJsonObject("prescriber"))); + Type reason = parseType("reason", json); + if (reason != null) + res.setReason(reason); + if (json.has("dispense")) { + JsonArray array = json.getAsJsonArray("dispense"); + for (int i = 0; i < array.size(); i++) { + res.getDispense().add(parseVisionPrescriptionVisionPrescriptionDispenseComponent(array.get(i).getAsJsonObject(), res)); + } + }; + } + + protected VisionPrescription.VisionPrescriptionDispenseComponent parseVisionPrescriptionVisionPrescriptionDispenseComponent(JsonObject json, VisionPrescription owner) throws IOException, FHIRFormatError { + VisionPrescription.VisionPrescriptionDispenseComponent res = new VisionPrescription.VisionPrescriptionDispenseComponent(); + parseVisionPrescriptionVisionPrescriptionDispenseComponentProperties(json, owner, res); + return res; + } + + protected void parseVisionPrescriptionVisionPrescriptionDispenseComponentProperties(JsonObject json, VisionPrescription owner, VisionPrescription.VisionPrescriptionDispenseComponent res) throws IOException, FHIRFormatError { + parseBackboneProperties(json, res); + if (json.has("product")) + res.setProduct(parseCodeableConcept(json.getAsJsonObject("product"))); + if (json.has("eye")) + res.setEyeElement(parseEnumeration(json.get("eye").getAsString(), VisionPrescription.VisionEyes.NULL, new VisionPrescription.VisionEyesEnumFactory())); + if (json.has("_eye")) + parseElementProperties(json.getAsJsonObject("_eye"), res.getEyeElement()); + if (json.has("sphere")) + res.setSphereElement(parseDecimal(json.get("sphere").getAsBigDecimal())); + if (json.has("_sphere")) + parseElementProperties(json.getAsJsonObject("_sphere"), res.getSphereElement()); + if (json.has("cylinder")) + res.setCylinderElement(parseDecimal(json.get("cylinder").getAsBigDecimal())); + if (json.has("_cylinder")) + parseElementProperties(json.getAsJsonObject("_cylinder"), res.getCylinderElement()); + if (json.has("axis")) + res.setAxisElement(parseInteger(json.get("axis").getAsLong())); + if (json.has("_axis")) + parseElementProperties(json.getAsJsonObject("_axis"), res.getAxisElement()); + if (json.has("prism")) + res.setPrismElement(parseDecimal(json.get("prism").getAsBigDecimal())); + if (json.has("_prism")) + parseElementProperties(json.getAsJsonObject("_prism"), res.getPrismElement()); + if (json.has("base")) + res.setBaseElement(parseEnumeration(json.get("base").getAsString(), VisionPrescription.VisionBase.NULL, new VisionPrescription.VisionBaseEnumFactory())); + if (json.has("_base")) + parseElementProperties(json.getAsJsonObject("_base"), res.getBaseElement()); + if (json.has("add")) + res.setAddElement(parseDecimal(json.get("add").getAsBigDecimal())); + if (json.has("_add")) + parseElementProperties(json.getAsJsonObject("_add"), res.getAddElement()); + if (json.has("power")) + res.setPowerElement(parseDecimal(json.get("power").getAsBigDecimal())); + if (json.has("_power")) + parseElementProperties(json.getAsJsonObject("_power"), res.getPowerElement()); + if (json.has("backCurve")) + res.setBackCurveElement(parseDecimal(json.get("backCurve").getAsBigDecimal())); + if (json.has("_backCurve")) + parseElementProperties(json.getAsJsonObject("_backCurve"), res.getBackCurveElement()); + if (json.has("diameter")) + res.setDiameterElement(parseDecimal(json.get("diameter").getAsBigDecimal())); + if (json.has("_diameter")) + parseElementProperties(json.getAsJsonObject("_diameter"), res.getDiameterElement()); + if (json.has("duration")) + res.setDuration(parseSimpleQuantity(json.getAsJsonObject("duration"))); + if (json.has("color")) + res.setColorElement(parseString(json.get("color").getAsString())); + if (json.has("_color")) + parseElementProperties(json.getAsJsonObject("_color"), res.getColorElement()); + if (json.has("brand")) + res.setBrandElement(parseString(json.get("brand").getAsString())); + if (json.has("_brand")) + parseElementProperties(json.getAsJsonObject("_brand"), res.getBrandElement()); + if (json.has("note")) { + JsonArray array = json.getAsJsonArray("note"); + for (int i = 0; i < array.size(); i++) { + res.getNote().add(parseAnnotation(array.get(i).getAsJsonObject())); + } + }; + } + + @Override + protected Resource parseResource(JsonObject json) throws IOException, FHIRFormatError { + String t = json.get("resourceType").getAsString(); + if (Utilities.noString(t)) + throw new FHIRFormatError("Unable to find resource type - maybe not a FHIR resource?"); + if (t.equals("Parameters")) + return parseParameters(json); + else if (t.equals("Account")) + return parseAccount(json); + else if (t.equals("ActivityDefinition")) + return parseActivityDefinition(json); + else if (t.equals("AdverseEvent")) + return parseAdverseEvent(json); + else if (t.equals("AllergyIntolerance")) + return parseAllergyIntolerance(json); + else if (t.equals("Appointment")) + return parseAppointment(json); + else if (t.equals("AppointmentResponse")) + return parseAppointmentResponse(json); + else if (t.equals("AuditEvent")) + return parseAuditEvent(json); + else if (t.equals("Basic")) + return parseBasic(json); + else if (t.equals("Binary")) + return parseBinary(json); + else if (t.equals("BodyStructure")) + return parseBodyStructure(json); + else if (t.equals("Bundle")) + return parseBundle(json); + else if (t.equals("CapabilityStatement")) + return parseCapabilityStatement(json); + else if (t.equals("CarePlan")) + return parseCarePlan(json); + else if (t.equals("CareTeam")) + return parseCareTeam(json); + else if (t.equals("CatalogEntry")) + return parseCatalogEntry(json); + else if (t.equals("ChargeItem")) + return parseChargeItem(json); + else if (t.equals("Claim")) + return parseClaim(json); + else if (t.equals("ClaimResponse")) + return parseClaimResponse(json); + else if (t.equals("ClinicalImpression")) + return parseClinicalImpression(json); + else if (t.equals("CodeSystem")) + return parseCodeSystem(json); + else if (t.equals("Communication")) + return parseCommunication(json); + else if (t.equals("CommunicationRequest")) + return parseCommunicationRequest(json); + else if (t.equals("CompartmentDefinition")) + return parseCompartmentDefinition(json); + else if (t.equals("Composition")) + return parseComposition(json); + else if (t.equals("ConceptMap")) + return parseConceptMap(json); + else if (t.equals("Condition")) + return parseCondition(json); + else if (t.equals("Consent")) + return parseConsent(json); + else if (t.equals("Contract")) + return parseContract(json); + else if (t.equals("Coverage")) + return parseCoverage(json); + else if (t.equals("DetectedIssue")) + return parseDetectedIssue(json); + else if (t.equals("Device")) + return parseDevice(json); + else if (t.equals("DeviceComponent")) + return parseDeviceComponent(json); + else if (t.equals("DeviceMetric")) + return parseDeviceMetric(json); + else if (t.equals("DeviceRequest")) + return parseDeviceRequest(json); + else if (t.equals("DeviceUseStatement")) + return parseDeviceUseStatement(json); + else if (t.equals("DiagnosticReport")) + return parseDiagnosticReport(json); + else if (t.equals("DocumentManifest")) + return parseDocumentManifest(json); + else if (t.equals("DocumentReference")) + return parseDocumentReference(json); + else if (t.equals("EligibilityRequest")) + return parseEligibilityRequest(json); + else if (t.equals("EligibilityResponse")) + return parseEligibilityResponse(json); + else if (t.equals("Encounter")) + return parseEncounter(json); + else if (t.equals("Endpoint")) + return parseEndpoint(json); + else if (t.equals("EnrollmentRequest")) + return parseEnrollmentRequest(json); + else if (t.equals("EnrollmentResponse")) + return parseEnrollmentResponse(json); + else if (t.equals("EpisodeOfCare")) + return parseEpisodeOfCare(json); + else if (t.equals("EventDefinition")) + return parseEventDefinition(json); + else if (t.equals("ExampleScenario")) + return parseExampleScenario(json); + else if (t.equals("ExpansionProfile")) + return parseExpansionProfile(json); + else if (t.equals("ExplanationOfBenefit")) + return parseExplanationOfBenefit(json); + else if (t.equals("FamilyMemberHistory")) + return parseFamilyMemberHistory(json); + else if (t.equals("Flag")) + return parseFlag(json); + else if (t.equals("Goal")) + return parseGoal(json); + else if (t.equals("GraphDefinition")) + return parseGraphDefinition(json); + else if (t.equals("Group")) + return parseGroup(json); + else if (t.equals("GuidanceResponse")) + return parseGuidanceResponse(json); + else if (t.equals("HealthcareService")) + return parseHealthcareService(json); + else if (t.equals("ImagingManifest")) + return parseImagingManifest(json); + else if (t.equals("ImagingStudy")) + return parseImagingStudy(json); + else if (t.equals("Immunization")) + return parseImmunization(json); + else if (t.equals("ImmunizationRecommendation")) + return parseImmunizationRecommendation(json); + else if (t.equals("ImplementationGuide")) + return parseImplementationGuide(json); + else if (t.equals("Library")) + return parseLibrary(json); + else if (t.equals("Linkage")) + return parseLinkage(json); + else if (t.equals("List")) + return parseListResource(json); + else if (t.equals("Location")) + return parseLocation(json); + else if (t.equals("Measure")) + return parseMeasure(json); + else if (t.equals("MeasureReport")) + return parseMeasureReport(json); + else if (t.equals("Media")) + return parseMedia(json); + else if (t.equals("Medication")) + return parseMedication(json); + else if (t.equals("MedicationAdministration")) + return parseMedicationAdministration(json); + else if (t.equals("MedicationDispense")) + return parseMedicationDispense(json); + else if (t.equals("MedicationRequest")) + return parseMedicationRequest(json); + else if (t.equals("MedicationStatement")) + return parseMedicationStatement(json); + else if (t.equals("MessageDefinition")) + return parseMessageDefinition(json); + else if (t.equals("MessageHeader")) + return parseMessageHeader(json); + else if (t.equals("NamingSystem")) + return parseNamingSystem(json); + else if (t.equals("NutritionOrder")) + return parseNutritionOrder(json); + else if (t.equals("Observation")) + return parseObservation(json); + else if (t.equals("OperationDefinition")) + return parseOperationDefinition(json); + else if (t.equals("OperationOutcome")) + return parseOperationOutcome(json); + else if (t.equals("Organization")) + return parseOrganization(json); + else if (t.equals("Patient")) + return parsePatient(json); + else if (t.equals("PaymentNotice")) + return parsePaymentNotice(json); + else if (t.equals("PaymentReconciliation")) + return parsePaymentReconciliation(json); + else if (t.equals("Person")) + return parsePerson(json); + else if (t.equals("PlanDefinition")) + return parsePlanDefinition(json); + else if (t.equals("Practitioner")) + return parsePractitioner(json); + else if (t.equals("PractitionerRole")) + return parsePractitionerRole(json); + else if (t.equals("Procedure")) + return parseProcedure(json); + else if (t.equals("ProcedureRequest")) + return parseProcedureRequest(json); + else if (t.equals("ProcessRequest")) + return parseProcessRequest(json); + else if (t.equals("ProcessResponse")) + return parseProcessResponse(json); + else if (t.equals("Provenance")) + return parseProvenance(json); + else if (t.equals("Questionnaire")) + return parseQuestionnaire(json); + else if (t.equals("QuestionnaireResponse")) + return parseQuestionnaireResponse(json); + else if (t.equals("RelatedPerson")) + return parseRelatedPerson(json); + else if (t.equals("RequestGroup")) + return parseRequestGroup(json); + else if (t.equals("ResearchStudy")) + return parseResearchStudy(json); + else if (t.equals("ResearchSubject")) + return parseResearchSubject(json); + else if (t.equals("RiskAssessment")) + return parseRiskAssessment(json); + else if (t.equals("Schedule")) + return parseSchedule(json); + else if (t.equals("SearchParameter")) + return parseSearchParameter(json); + else if (t.equals("Sequence")) + return parseSequence(json); + else if (t.equals("ServiceDefinition")) + return parseServiceDefinition(json); + else if (t.equals("Slot")) + return parseSlot(json); + else if (t.equals("Specimen")) + return parseSpecimen(json); + else if (t.equals("SpecimenDefinition")) + return parseSpecimenDefinition(json); + else if (t.equals("StructureDefinition")) + return parseStructureDefinition(json); + else if (t.equals("StructureMap")) + return parseStructureMap(json); + else if (t.equals("Subscription")) + return parseSubscription(json); + else if (t.equals("Substance")) + return parseSubstance(json); + else if (t.equals("SupplyDelivery")) + return parseSupplyDelivery(json); + else if (t.equals("SupplyRequest")) + return parseSupplyRequest(json); + else if (t.equals("Task")) + return parseTask(json); + else if (t.equals("TestReport")) + return parseTestReport(json); + else if (t.equals("TestScript")) + return parseTestScript(json); + else if (t.equals("ValueSet")) + return parseValueSet(json); + else if (t.equals("VisionPrescription")) + return parseVisionPrescription(json); + else if (t.equals("Binary")) + return parseBinary(json); + throw new FHIRFormatError("Unknown.Unrecognised resource type '"+t+"' (in property 'resourceType')"); + } + + protected Type parseType(String prefix, JsonObject json) throws IOException, FHIRFormatError { + if (json.has(prefix+"Extension")) + return parseExtension(json.getAsJsonObject(prefix+"Extension")); + else if (json.has(prefix+"Narrative")) + return parseNarrative(json.getAsJsonObject(prefix+"Narrative")); + else if (json.has(prefix+"Reference")) + return parseReference(json.getAsJsonObject(prefix+"Reference")); + else if (json.has(prefix+"Quantity")) + return parseQuantity(json.getAsJsonObject(prefix+"Quantity")); + else if (json.has(prefix+"Period")) + return parsePeriod(json.getAsJsonObject(prefix+"Period")); + else if (json.has(prefix+"Attachment")) + return parseAttachment(json.getAsJsonObject(prefix+"Attachment")); + else if (json.has(prefix+"Duration")) + return parseDuration(json.getAsJsonObject(prefix+"Duration")); + else if (json.has(prefix+"Count")) + return parseCount(json.getAsJsonObject(prefix+"Count")); + else if (json.has(prefix+"Range")) + return parseRange(json.getAsJsonObject(prefix+"Range")); + else if (json.has(prefix+"Annotation")) + return parseAnnotation(json.getAsJsonObject(prefix+"Annotation")); + else if (json.has(prefix+"Money")) + return parseMoney(json.getAsJsonObject(prefix+"Money")); + else if (json.has(prefix+"Identifier")) + return parseIdentifier(json.getAsJsonObject(prefix+"Identifier")); + else if (json.has(prefix+"Coding")) + return parseCoding(json.getAsJsonObject(prefix+"Coding")); + else if (json.has(prefix+"Signature")) + return parseSignature(json.getAsJsonObject(prefix+"Signature")); + else if (json.has(prefix+"SampledData")) + return parseSampledData(json.getAsJsonObject(prefix+"SampledData")); + else if (json.has(prefix+"Ratio")) + return parseRatio(json.getAsJsonObject(prefix+"Ratio")); + else if (json.has(prefix+"Distance")) + return parseDistance(json.getAsJsonObject(prefix+"Distance")); + else if (json.has(prefix+"Age")) + return parseAge(json.getAsJsonObject(prefix+"Age")); + else if (json.has(prefix+"CodeableConcept")) + return parseCodeableConcept(json.getAsJsonObject(prefix+"CodeableConcept")); + else if (json.has(prefix+"SimpleQuantity")) + return parseSimpleQuantity(json.getAsJsonObject(prefix+"SimpleQuantity")); + else if (json.has(prefix+"Meta")) + return parseMeta(json.getAsJsonObject(prefix+"Meta")); + else if (json.has(prefix+"Address")) + return parseAddress(json.getAsJsonObject(prefix+"Address")); + else if (json.has(prefix+"TriggerDefinition")) + return parseTriggerDefinition(json.getAsJsonObject(prefix+"TriggerDefinition")); + else if (json.has(prefix+"Contributor")) + return parseContributor(json.getAsJsonObject(prefix+"Contributor")); + else if (json.has(prefix+"DataRequirement")) + return parseDataRequirement(json.getAsJsonObject(prefix+"DataRequirement")); + else if (json.has(prefix+"Dosage")) + return parseDosage(json.getAsJsonObject(prefix+"Dosage")); + else if (json.has(prefix+"RelatedArtifact")) + return parseRelatedArtifact(json.getAsJsonObject(prefix+"RelatedArtifact")); + else if (json.has(prefix+"ContactDetail")) + return parseContactDetail(json.getAsJsonObject(prefix+"ContactDetail")); + else if (json.has(prefix+"HumanName")) + return parseHumanName(json.getAsJsonObject(prefix+"HumanName")); + else if (json.has(prefix+"ContactPoint")) + return parseContactPoint(json.getAsJsonObject(prefix+"ContactPoint")); + else if (json.has(prefix+"UsageContext")) + return parseUsageContext(json.getAsJsonObject(prefix+"UsageContext")); + else if (json.has(prefix+"Timing")) + return parseTiming(json.getAsJsonObject(prefix+"Timing")); + else if (json.has(prefix+"ElementDefinition")) + return parseElementDefinition(json.getAsJsonObject(prefix+"ElementDefinition")); + else if (json.has(prefix+"ParameterDefinition")) + return parseParameterDefinition(json.getAsJsonObject(prefix+"ParameterDefinition")); + else if (json.has(prefix+"Date") || json.has("_"+prefix+"Date")) { + Type t = json.has(prefix+"Date") ? parseDate(json.get(prefix+"Date").getAsString()) : new DateType(); + if (json.has("_"+prefix+"Date")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Date"), t); + return t; + } + else if (json.has(prefix+"DateTime") || json.has("_"+prefix+"DateTime")) { + Type t = json.has(prefix+"DateTime") ? parseDateTime(json.get(prefix+"DateTime").getAsString()) : new DateTimeType(); + if (json.has("_"+prefix+"DateTime")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"DateTime"), t); + return t; + } + else if (json.has(prefix+"Code") || json.has("_"+prefix+"Code")) { + Type t = json.has(prefix+"Code") ? parseCode(json.get(prefix+"Code").getAsString()) : new CodeType(); + if (json.has("_"+prefix+"Code")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Code"), t); + return t; + } + else if (json.has(prefix+"String") || json.has("_"+prefix+"String")) { + Type t = json.has(prefix+"String") ? parseString(json.get(prefix+"String").getAsString()) : new StringType(); + if (json.has("_"+prefix+"String")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"String"), t); + return t; + } + else if (json.has(prefix+"Integer") || json.has("_"+prefix+"Integer")) { + Type t = json.has(prefix+"Integer") ? parseInteger(json.get(prefix+"Integer").getAsLong()) : new IntegerType(); + if (json.has("_"+prefix+"Integer")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Integer"), t); + return t; + } + else if (json.has(prefix+"Oid") || json.has("_"+prefix+"Oid")) { + Type t = json.has(prefix+"Oid") ? parseOid(json.get(prefix+"Oid").getAsString()) : new OidType(); + if (json.has("_"+prefix+"Oid")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Oid"), t); + return t; + } + else if (json.has(prefix+"Uri") || json.has("_"+prefix+"Uri")) { + Type t = json.has(prefix+"Uri") ? parseUri(json.get(prefix+"Uri").getAsString()) : new UriType(); + if (json.has("_"+prefix+"Uri")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Uri"), t); + return t; + } + else if (json.has(prefix+"Uuid") || json.has("_"+prefix+"Uuid")) { + Type t = json.has(prefix+"Uuid") ? parseUuid(json.get(prefix+"Uuid").getAsString()) : new UuidType(); + if (json.has("_"+prefix+"Uuid")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Uuid"), t); + return t; + } + else if (json.has(prefix+"Instant") || json.has("_"+prefix+"Instant")) { + Type t = json.has(prefix+"Instant") ? parseInstant(json.get(prefix+"Instant").getAsString()) : new InstantType(); + if (json.has("_"+prefix+"Instant")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Instant"), t); + return t; + } + else if (json.has(prefix+"Boolean") || json.has("_"+prefix+"Boolean")) { + Type t = json.has(prefix+"Boolean") ? parseBoolean(json.get(prefix+"Boolean").getAsBoolean()) : new BooleanType(); + if (json.has("_"+prefix+"Boolean")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Boolean"), t); + return t; + } + else if (json.has(prefix+"Base64Binary") || json.has("_"+prefix+"Base64Binary")) { + Type t = json.has(prefix+"Base64Binary") ? parseBase64Binary(json.get(prefix+"Base64Binary").getAsString()) : new Base64BinaryType(); + if (json.has("_"+prefix+"Base64Binary")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Base64Binary"), t); + return t; + } + else if (json.has(prefix+"UnsignedInt") || json.has("_"+prefix+"UnsignedInt")) { + Type t = json.has(prefix+"UnsignedInt") ? parseUnsignedInt(json.get(prefix+"UnsignedInt").getAsString()) : new UnsignedIntType(); + if (json.has("_"+prefix+"UnsignedInt")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"UnsignedInt"), t); + return t; + } + else if (json.has(prefix+"Markdown") || json.has("_"+prefix+"Markdown")) { + Type t = json.has(prefix+"Markdown") ? parseMarkdown(json.get(prefix+"Markdown").getAsString()) : new MarkdownType(); + if (json.has("_"+prefix+"Markdown")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Markdown"), t); + return t; + } + else if (json.has(prefix+"Time") || json.has("_"+prefix+"Time")) { + Type t = json.has(prefix+"Time") ? parseTime(json.get(prefix+"Time").getAsString()) : new TimeType(); + if (json.has("_"+prefix+"Time")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Time"), t); + return t; + } + else if (json.has(prefix+"Id") || json.has("_"+prefix+"Id")) { + Type t = json.has(prefix+"Id") ? parseId(json.get(prefix+"Id").getAsString()) : new IdType(); + if (json.has("_"+prefix+"Id")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Id"), t); + return t; + } + else if (json.has(prefix+"PositiveInt") || json.has("_"+prefix+"PositiveInt")) { + Type t = json.has(prefix+"PositiveInt") ? parsePositiveInt(json.get(prefix+"PositiveInt").getAsString()) : new PositiveIntType(); + if (json.has("_"+prefix+"PositiveInt")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"PositiveInt"), t); + return t; + } + else if (json.has(prefix+"Decimal") || json.has("_"+prefix+"Decimal")) { + Type t = json.has(prefix+"Decimal") ? parseDecimal(json.get(prefix+"Decimal").getAsBigDecimal()) : new DecimalType(); + if (json.has("_"+prefix+"Decimal")) + parseElementProperties(json.getAsJsonObject("_"+prefix+"Decimal"), t); + return t; + } + return null; + } + + protected Type parseType(JsonObject json, String type) throws IOException, FHIRFormatError { + if (type.equals("Extension")) + return parseExtension(json); + else if (type.equals("Narrative")) + return parseNarrative(json); + else if (type.equals("Reference")) + return parseReference(json); + else if (type.equals("Quantity")) + return parseQuantity(json); + else if (type.equals("Period")) + return parsePeriod(json); + else if (type.equals("Attachment")) + return parseAttachment(json); + else if (type.equals("Duration")) + return parseDuration(json); + else if (type.equals("Count")) + return parseCount(json); + else if (type.equals("Range")) + return parseRange(json); + else if (type.equals("Annotation")) + return parseAnnotation(json); + else if (type.equals("Money")) + return parseMoney(json); + else if (type.equals("Identifier")) + return parseIdentifier(json); + else if (type.equals("Coding")) + return parseCoding(json); + else if (type.equals("Signature")) + return parseSignature(json); + else if (type.equals("SampledData")) + return parseSampledData(json); + else if (type.equals("Ratio")) + return parseRatio(json); + else if (type.equals("Distance")) + return parseDistance(json); + else if (type.equals("Age")) + return parseAge(json); + else if (type.equals("CodeableConcept")) + return parseCodeableConcept(json); + else if (type.equals("SimpleQuantity")) + return parseSimpleQuantity(json); + else if (type.equals("Meta")) + return parseMeta(json); + else if (type.equals("Address")) + return parseAddress(json); + else if (type.equals("TriggerDefinition")) + return parseTriggerDefinition(json); + else if (type.equals("Contributor")) + return parseContributor(json); + else if (type.equals("DataRequirement")) + return parseDataRequirement(json); + else if (type.equals("Dosage")) + return parseDosage(json); + else if (type.equals("RelatedArtifact")) + return parseRelatedArtifact(json); + else if (type.equals("ContactDetail")) + return parseContactDetail(json); + else if (type.equals("HumanName")) + return parseHumanName(json); + else if (type.equals("ContactPoint")) + return parseContactPoint(json); + else if (type.equals("UsageContext")) + return parseUsageContext(json); + else if (type.equals("Timing")) + return parseTiming(json); + else if (type.equals("ElementDefinition")) + return parseElementDefinition(json); + else if (type.equals("ParameterDefinition")) + return parseParameterDefinition(json); + throw new FHIRFormatError("Unknown Type "+type); + } + + protected boolean hasTypeName(JsonObject json, String prefix) { + if (json.has(prefix+"Extension")) + return true; + if (json.has(prefix+"Narrative")) + return true; + if (json.has(prefix+"Reference")) + return true; + if (json.has(prefix+"Quantity")) + return true; + if (json.has(prefix+"Period")) + return true; + if (json.has(prefix+"Attachment")) + return true; + if (json.has(prefix+"Duration")) + return true; + if (json.has(prefix+"Count")) + return true; + if (json.has(prefix+"Range")) + return true; + if (json.has(prefix+"Annotation")) + return true; + if (json.has(prefix+"Money")) + return true; + if (json.has(prefix+"Identifier")) + return true; + if (json.has(prefix+"Coding")) + return true; + if (json.has(prefix+"Signature")) + return true; + if (json.has(prefix+"SampledData")) + return true; + if (json.has(prefix+"Ratio")) + return true; + if (json.has(prefix+"Distance")) + return true; + if (json.has(prefix+"Age")) + return true; + if (json.has(prefix+"CodeableConcept")) + return true; + if (json.has(prefix+"SimpleQuantity")) + return true; + if (json.has(prefix+"Meta")) + return true; + if (json.has(prefix+"Address")) + return true; + if (json.has(prefix+"TriggerDefinition")) + return true; + if (json.has(prefix+"Contributor")) + return true; + if (json.has(prefix+"DataRequirement")) + return true; + if (json.has(prefix+"Dosage")) + return true; + if (json.has(prefix+"RelatedArtifact")) + return true; + if (json.has(prefix+"ContactDetail")) + return true; + if (json.has(prefix+"HumanName")) + return true; + if (json.has(prefix+"ContactPoint")) + return true; + if (json.has(prefix+"UsageContext")) + return true; + if (json.has(prefix+"Timing")) + return true; + if (json.has(prefix+"ElementDefinition")) + return true; + if (json.has(prefix+"ParameterDefinition")) + return true; + if (json.has(prefix+"Parameters")) + return true; + if (json.has(prefix+"Account")) + return true; + if (json.has(prefix+"ActivityDefinition")) + return true; + if (json.has(prefix+"AdverseEvent")) + return true; + if (json.has(prefix+"AllergyIntolerance")) + return true; + if (json.has(prefix+"Appointment")) + return true; + if (json.has(prefix+"AppointmentResponse")) + return true; + if (json.has(prefix+"AuditEvent")) + return true; + if (json.has(prefix+"Basic")) + return true; + if (json.has(prefix+"Binary")) + return true; + if (json.has(prefix+"BodyStructure")) + return true; + if (json.has(prefix+"Bundle")) + return true; + if (json.has(prefix+"CapabilityStatement")) + return true; + if (json.has(prefix+"CarePlan")) + return true; + if (json.has(prefix+"CareTeam")) + return true; + if (json.has(prefix+"CatalogEntry")) + return true; + if (json.has(prefix+"ChargeItem")) + return true; + if (json.has(prefix+"Claim")) + return true; + if (json.has(prefix+"ClaimResponse")) + return true; + if (json.has(prefix+"ClinicalImpression")) + return true; + if (json.has(prefix+"CodeSystem")) + return true; + if (json.has(prefix+"Communication")) + return true; + if (json.has(prefix+"CommunicationRequest")) + return true; + if (json.has(prefix+"CompartmentDefinition")) + return true; + if (json.has(prefix+"Composition")) + return true; + if (json.has(prefix+"ConceptMap")) + return true; + if (json.has(prefix+"Condition")) + return true; + if (json.has(prefix+"Consent")) + return true; + if (json.has(prefix+"Contract")) + return true; + if (json.has(prefix+"Coverage")) + return true; + if (json.has(prefix+"DetectedIssue")) + return true; + if (json.has(prefix+"Device")) + return true; + if (json.has(prefix+"DeviceComponent")) + return true; + if (json.has(prefix+"DeviceMetric")) + return true; + if (json.has(prefix+"DeviceRequest")) + return true; + if (json.has(prefix+"DeviceUseStatement")) + return true; + if (json.has(prefix+"DiagnosticReport")) + return true; + if (json.has(prefix+"DocumentManifest")) + return true; + if (json.has(prefix+"DocumentReference")) + return true; + if (json.has(prefix+"EligibilityRequest")) + return true; + if (json.has(prefix+"EligibilityResponse")) + return true; + if (json.has(prefix+"Encounter")) + return true; + if (json.has(prefix+"Endpoint")) + return true; + if (json.has(prefix+"EnrollmentRequest")) + return true; + if (json.has(prefix+"EnrollmentResponse")) + return true; + if (json.has(prefix+"EpisodeOfCare")) + return true; + if (json.has(prefix+"EventDefinition")) + return true; + if (json.has(prefix+"ExampleScenario")) + return true; + if (json.has(prefix+"ExpansionProfile")) + return true; + if (json.has(prefix+"ExplanationOfBenefit")) + return true; + if (json.has(prefix+"FamilyMemberHistory")) + return true; + if (json.has(prefix+"Flag")) + return true; + if (json.has(prefix+"Goal")) + return true; + if (json.has(prefix+"GraphDefinition")) + return true; + if (json.has(prefix+"Group")) + return true; + if (json.has(prefix+"GuidanceResponse")) + return true; + if (json.has(prefix+"HealthcareService")) + return true; + if (json.has(prefix+"ImagingManifest")) + return true; + if (json.has(prefix+"ImagingStudy")) + return true; + if (json.has(prefix+"Immunization")) + return true; + if (json.has(prefix+"ImmunizationRecommendation")) + return true; + if (json.has(prefix+"ImplementationGuide")) + return true; + if (json.has(prefix+"Library")) + return true; + if (json.has(prefix+"Linkage")) + return true; + if (json.has(prefix+"List")) + return true; + if (json.has(prefix+"Location")) + return true; + if (json.has(prefix+"Measure")) + return true; + if (json.has(prefix+"MeasureReport")) + return true; + if (json.has(prefix+"Media")) + return true; + if (json.has(prefix+"Medication")) + return true; + if (json.has(prefix+"MedicationAdministration")) + return true; + if (json.has(prefix+"MedicationDispense")) + return true; + if (json.has(prefix+"MedicationRequest")) + return true; + if (json.has(prefix+"MedicationStatement")) + return true; + if (json.has(prefix+"MessageDefinition")) + return true; + if (json.has(prefix+"MessageHeader")) + return true; + if (json.has(prefix+"NamingSystem")) + return true; + if (json.has(prefix+"NutritionOrder")) + return true; + if (json.has(prefix+"Observation")) + return true; + if (json.has(prefix+"OperationDefinition")) + return true; + if (json.has(prefix+"OperationOutcome")) + return true; + if (json.has(prefix+"Organization")) + return true; + if (json.has(prefix+"Patient")) + return true; + if (json.has(prefix+"PaymentNotice")) + return true; + if (json.has(prefix+"PaymentReconciliation")) + return true; + if (json.has(prefix+"Person")) + return true; + if (json.has(prefix+"PlanDefinition")) + return true; + if (json.has(prefix+"Practitioner")) + return true; + if (json.has(prefix+"PractitionerRole")) + return true; + if (json.has(prefix+"Procedure")) + return true; + if (json.has(prefix+"ProcedureRequest")) + return true; + if (json.has(prefix+"ProcessRequest")) + return true; + if (json.has(prefix+"ProcessResponse")) + return true; + if (json.has(prefix+"Provenance")) + return true; + if (json.has(prefix+"Questionnaire")) + return true; + if (json.has(prefix+"QuestionnaireResponse")) + return true; + if (json.has(prefix+"RelatedPerson")) + return true; + if (json.has(prefix+"RequestGroup")) + return true; + if (json.has(prefix+"ResearchStudy")) + return true; + if (json.has(prefix+"ResearchSubject")) + return true; + if (json.has(prefix+"RiskAssessment")) + return true; + if (json.has(prefix+"Schedule")) + return true; + if (json.has(prefix+"SearchParameter")) + return true; + if (json.has(prefix+"Sequence")) + return true; + if (json.has(prefix+"ServiceDefinition")) + return true; + if (json.has(prefix+"Slot")) + return true; + if (json.has(prefix+"Specimen")) + return true; + if (json.has(prefix+"SpecimenDefinition")) + return true; + if (json.has(prefix+"StructureDefinition")) + return true; + if (json.has(prefix+"StructureMap")) + return true; + if (json.has(prefix+"Subscription")) + return true; + if (json.has(prefix+"Substance")) + return true; + if (json.has(prefix+"SupplyDelivery")) + return true; + if (json.has(prefix+"SupplyRequest")) + return true; + if (json.has(prefix+"Task")) + return true; + if (json.has(prefix+"TestReport")) + return true; + if (json.has(prefix+"TestScript")) + return true; + if (json.has(prefix+"ValueSet")) + return true; + if (json.has(prefix+"VisionPrescription")) + return true; + if (json.has(prefix+"Date") || json.has("_"+prefix+"Date")) + return true; + if (json.has(prefix+"DateTime") || json.has("_"+prefix+"DateTime")) + return true; + if (json.has(prefix+"Code") || json.has("_"+prefix+"Code")) + return true; + if (json.has(prefix+"String") || json.has("_"+prefix+"String")) + return true; + if (json.has(prefix+"Integer") || json.has("_"+prefix+"Integer")) + return true; + if (json.has(prefix+"Oid") || json.has("_"+prefix+"Oid")) + return true; + if (json.has(prefix+"Uri") || json.has("_"+prefix+"Uri")) + return true; + if (json.has(prefix+"Uuid") || json.has("_"+prefix+"Uuid")) + return true; + if (json.has(prefix+"Instant") || json.has("_"+prefix+"Instant")) + return true; + if (json.has(prefix+"Boolean") || json.has("_"+prefix+"Boolean")) + return true; + if (json.has(prefix+"Base64Binary") || json.has("_"+prefix+"Base64Binary")) + return true; + if (json.has(prefix+"UnsignedInt") || json.has("_"+prefix+"UnsignedInt")) + return true; + if (json.has(prefix+"Markdown") || json.has("_"+prefix+"Markdown")) + return true; + if (json.has(prefix+"Time") || json.has("_"+prefix+"Time")) + return true; + if (json.has(prefix+"Id") || json.has("_"+prefix+"Id")) + return true; + if (json.has(prefix+"PositiveInt") || json.has("_"+prefix+"PositiveInt")) + return true; + if (json.has(prefix+"Decimal") || json.has("_"+prefix+"Decimal")) + return true; + return false; + } + protected void composeElement(Element element) throws IOException { + if (element.hasId()) + prop("id", element.getId()); + if (makeComments(element)) { + openArray("fhir_comments"); + for (String s : element.getFormatCommentsPre()) + prop(null, s); + for (String s : element.getFormatCommentsPost()) + prop(null, s); + closeArray(); + } + if (element.hasExtension()) { + openArray("extension"); + for (Extension e : element.getExtension()) + composeExtension(null, e); + closeArray(); + } + } + + protected void composeBackbone(BackboneElement element) throws IOException { + composeElement(element); + if (element.hasModifierExtension()) { + openArray("modifierExtension"); + for (Extension e : element.getModifierExtension()) + composeExtension(null, e); + closeArray(); + } + } + + protected > void composeEnumerationCore(String name, Enumeration value, EnumFactory e, boolean inArray) throws IOException { + if (value != null && value.getValue() != null) { + prop(name, e.toCode(value.getValue())); + } else if (inArray) + writeNull(name); + } + + protected > void composeEnumerationExtras(String name, Enumeration value, EnumFactory e, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } else if (inArray) + writeNull(name); + } + + protected void composeDateCore(String name, DateType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, value.asStringValue()); + } + else if (inArray) + writeNull(name); + } + + protected void composeDateExtras(String name, DateType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeDateTimeCore(String name, DateTimeType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, value.asStringValue()); + } + else if (inArray) + writeNull(name); + } + + protected void composeDateTimeExtras(String name, DateTimeType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeCodeCore(String name, CodeType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeCodeExtras(String name, CodeType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeStringCore(String name, StringType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeStringExtras(String name, StringType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeIntegerCore(String name, IntegerType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, Integer.valueOf(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeIntegerExtras(String name, IntegerType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeOidCore(String name, OidType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeOidExtras(String name, OidType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeUriCore(String name, UriType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeUriExtras(String name, UriType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeUuidCore(String name, UuidType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeUuidExtras(String name, UuidType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeInstantCore(String name, InstantType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, value.asStringValue()); + } + else if (inArray) + writeNull(name); + } + + protected void composeInstantExtras(String name, InstantType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeBooleanCore(String name, BooleanType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, value.getValue()); + } + else if (inArray) + writeNull(name); + } + + protected void composeBooleanExtras(String name, BooleanType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeBase64BinaryCore(String name, Base64BinaryType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeBase64BinaryExtras(String name, Base64BinaryType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeUnsignedIntCore(String name, UnsignedIntType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, Integer.valueOf(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeUnsignedIntExtras(String name, UnsignedIntType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeMarkdownCore(String name, MarkdownType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeMarkdownExtras(String name, MarkdownType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeTimeCore(String name, TimeType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, value.asStringValue()); + } + else if (inArray) + writeNull(name); + } + + protected void composeTimeExtras(String name, TimeType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeIdCore(String name, IdType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, toString(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composeIdExtras(String name, IdType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composePositiveIntCore(String name, PositiveIntType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, Integer.valueOf(value.getValue())); + } + else if (inArray) + writeNull(name); + } + + protected void composePositiveIntExtras(String name, PositiveIntType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeDecimalCore(String name, DecimalType value, boolean inArray) throws IOException { + if (value != null && value.hasValue()) { + prop(name, value.getValue()); + } + else if (inArray) + writeNull(name); + } + + protected void composeDecimalExtras(String name, DecimalType value, boolean inArray) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) { + open(inArray ? null : "_"+name); + composeElement(value); + close(); + } + else if (inArray) + writeNull(name); + } + + protected void composeExtension(String name, Extension element) throws IOException { + if (element != null) { + open(name); + composeExtensionInner(element); + close(); + } + } + + protected void composeExtensionInner(Extension element) throws IOException { + composeElement(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeNarrative(String name, Narrative element) throws IOException { + if (element != null) { + open(name); + composeNarrativeInner(element); + close(); + } + } + + protected void composeNarrativeInner(Narrative element) throws IOException { + composeElement(element); + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory(), false); + } + if (element.hasDiv()) { + XhtmlNode node = element.getDiv(); + if (node.getNsDecl() == null) { + node.attribute("xmlns", XHTML_NS); + } + composeXhtml("div", node); + } + } + + protected void composeDuration(String name, Duration element) throws IOException { + if (element != null) { + open(name); + composeDurationInner(element); + close(); + } + } + + protected void composeDurationInner(Duration element) throws IOException { + composeQuantityInner(element); + } + + protected void composeCount(String name, Count element) throws IOException { + if (element != null) { + open(name); + composeCountInner(element); + close(); + } + } + + protected void composeCountInner(Count element) throws IOException { + composeQuantityInner(element); + } + + protected void composeMoney(String name, Money element) throws IOException { + if (element != null) { + open(name); + composeMoneyInner(element); + close(); + } + } + + protected void composeMoneyInner(Money element) throws IOException { + composeQuantityInner(element); + } + + protected void composeDistance(String name, Distance element) throws IOException { + if (element != null) { + open(name); + composeDistanceInner(element); + close(); + } + } + + protected void composeDistanceInner(Distance element) throws IOException { + composeQuantityInner(element); + } + + protected void composeAge(String name, Age element) throws IOException { + if (element != null) { + open(name); + composeAgeInner(element); + close(); + } + } + + protected void composeAgeInner(Age element) throws IOException { + composeQuantityInner(element); + } + + protected void composeReference(String name, Reference element) throws IOException { + if (element != null) { + open(name); + composeReferenceInner(element); + close(); + } + } + + protected void composeReferenceInner(Reference element) throws IOException { + composeElement(element); + if (element.hasReferenceElement()) { + composeStringCore("reference", element.getReferenceElement(), false); + composeStringExtras("reference", element.getReferenceElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + } + + protected void composeQuantity(String name, Quantity element) throws IOException { + if (element != null) { + open(name); + composeQuantityInner(element); + close(); + } + } + + protected void composeQuantityInner(Quantity element) throws IOException { + composeElement(element); + if (element.hasValueElement()) { + composeDecimalCore("value", element.getValueElement(), false); + composeDecimalExtras("value", element.getValueElement(), false); + } + if (element.hasComparatorElement()) { + composeEnumerationCore("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory(), false); + composeEnumerationExtras("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory(), false); + } + if (element.hasUnitElement()) { + composeStringCore("unit", element.getUnitElement(), false); + composeStringExtras("unit", element.getUnitElement(), false); + } + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + } + + protected void composePeriod(String name, Period element) throws IOException { + if (element != null) { + open(name); + composePeriodInner(element); + close(); + } + } + + protected void composePeriodInner(Period element) throws IOException { + composeElement(element); + if (element.hasStartElement()) { + composeDateTimeCore("start", element.getStartElement(), false); + composeDateTimeExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeDateTimeCore("end", element.getEndElement(), false); + composeDateTimeExtras("end", element.getEndElement(), false); + } + } + + protected void composeAttachment(String name, Attachment element) throws IOException { + if (element != null) { + open(name); + composeAttachmentInner(element); + close(); + } + } + + protected void composeAttachmentInner(Attachment element) throws IOException { + composeElement(element); + if (element.hasContentTypeElement()) { + composeCodeCore("contentType", element.getContentTypeElement(), false); + composeCodeExtras("contentType", element.getContentTypeElement(), false); + } + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + if (element.hasDataElement()) { + composeBase64BinaryCore("data", element.getDataElement(), false); + composeBase64BinaryExtras("data", element.getDataElement(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasSizeElement()) { + composeUnsignedIntCore("size", element.getSizeElement(), false); + composeUnsignedIntExtras("size", element.getSizeElement(), false); + } + if (element.hasHashElement()) { + composeBase64BinaryCore("hash", element.getHashElement(), false); + composeBase64BinaryExtras("hash", element.getHashElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasCreationElement()) { + composeDateTimeCore("creation", element.getCreationElement(), false); + composeDateTimeExtras("creation", element.getCreationElement(), false); + } + } + + protected void composeRange(String name, Range element) throws IOException { + if (element != null) { + open(name); + composeRangeInner(element); + close(); + } + } + + protected void composeRangeInner(Range element) throws IOException { + composeElement(element); + if (element.hasLow()) { + composeSimpleQuantity("low", element.getLow()); + } + if (element.hasHigh()) { + composeSimpleQuantity("high", element.getHigh()); + } + } + + protected void composeAnnotation(String name, Annotation element) throws IOException { + if (element != null) { + open(name); + composeAnnotationInner(element); + close(); + } + } + + protected void composeAnnotationInner(Annotation element) throws IOException { + composeElement(element); + if (element.hasAuthor()) { + composeType("author", element.getAuthor()); + } + if (element.hasTimeElement()) { + composeDateTimeCore("time", element.getTimeElement(), false); + composeDateTimeExtras("time", element.getTimeElement(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + } + + protected void composeIdentifier(String name, Identifier element) throws IOException { + if (element != null) { + open(name); + composeIdentifierInner(element); + close(); + } + } + + protected void composeIdentifierInner(Identifier element) throws IOException { + composeElement(element); + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasAssigner()) { + composeReference("assigner", element.getAssigner()); + } + } + + protected void composeCoding(String name, Coding element) throws IOException { + if (element != null) { + open(name); + composeCodingInner(element); + close(); + } + } + + protected void composeCodingInner(Coding element) throws IOException { + composeElement(element); + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasUserSelectedElement()) { + composeBooleanCore("userSelected", element.getUserSelectedElement(), false); + composeBooleanExtras("userSelected", element.getUserSelectedElement(), false); + } + } + + protected void composeSignature(String name, Signature element) throws IOException { + if (element != null) { + open(name); + composeSignatureInner(element); + close(); + } + } + + protected void composeSignatureInner(Signature element) throws IOException { + composeElement(element); + if (element.hasType()) { + openArray("type"); + for (Coding e : element.getType()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasWhenElement()) { + composeInstantCore("when", element.getWhenElement(), false); + composeInstantExtras("when", element.getWhenElement(), false); + } + if (element.hasWho()) { + composeType("who", element.getWho()); + } + if (element.hasOnBehalfOf()) { + composeType("onBehalfOf", element.getOnBehalfOf()); + } + if (element.hasContentTypeElement()) { + composeCodeCore("contentType", element.getContentTypeElement(), false); + composeCodeExtras("contentType", element.getContentTypeElement(), false); + } + if (element.hasBlobElement()) { + composeBase64BinaryCore("blob", element.getBlobElement(), false); + composeBase64BinaryExtras("blob", element.getBlobElement(), false); + } + } + + protected void composeSampledData(String name, SampledData element) throws IOException { + if (element != null) { + open(name); + composeSampledDataInner(element); + close(); + } + } + + protected void composeSampledDataInner(SampledData element) throws IOException { + composeElement(element); + if (element.hasOrigin()) { + composeSimpleQuantity("origin", element.getOrigin()); + } + if (element.hasPeriodElement()) { + composeDecimalCore("period", element.getPeriodElement(), false); + composeDecimalExtras("period", element.getPeriodElement(), false); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasLowerLimitElement()) { + composeDecimalCore("lowerLimit", element.getLowerLimitElement(), false); + composeDecimalExtras("lowerLimit", element.getLowerLimitElement(), false); + } + if (element.hasUpperLimitElement()) { + composeDecimalCore("upperLimit", element.getUpperLimitElement(), false); + composeDecimalExtras("upperLimit", element.getUpperLimitElement(), false); + } + if (element.hasDimensionsElement()) { + composePositiveIntCore("dimensions", element.getDimensionsElement(), false); + composePositiveIntExtras("dimensions", element.getDimensionsElement(), false); + } + if (element.hasDataElement()) { + composeStringCore("data", element.getDataElement(), false); + composeStringExtras("data", element.getDataElement(), false); + } + } + + protected void composeRatio(String name, Ratio element) throws IOException { + if (element != null) { + open(name); + composeRatioInner(element); + close(); + } + } + + protected void composeRatioInner(Ratio element) throws IOException { + composeElement(element); + if (element.hasNumerator()) { + composeQuantity("numerator", element.getNumerator()); + } + if (element.hasDenominator()) { + composeQuantity("denominator", element.getDenominator()); + } + } + + protected void composeCodeableConcept(String name, CodeableConcept element) throws IOException { + if (element != null) { + open(name); + composeCodeableConceptInner(element); + close(); + } + } + + protected void composeCodeableConceptInner(CodeableConcept element) throws IOException { + composeElement(element); + if (element.hasCoding()) { + openArray("coding"); + for (Coding e : element.getCoding()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + } + + protected void composeSimpleQuantity(String name, SimpleQuantity element) throws IOException { + if (element != null) { + open(name); + composeSimpleQuantityInner(element); + close(); + } + } + + protected void composeSimpleQuantityInner(SimpleQuantity element) throws IOException { + composeElement(element); + if (element.hasValueElement()) { + composeDecimalCore("value", element.getValueElement(), false); + composeDecimalExtras("value", element.getValueElement(), false); + } + if (element.hasComparatorElement()) { + composeEnumerationCore("comparator", element.getComparatorElement(), new SimpleQuantity.QuantityComparatorEnumFactory(), false); + composeEnumerationExtras("comparator", element.getComparatorElement(), new SimpleQuantity.QuantityComparatorEnumFactory(), false); + } + if (element.hasUnitElement()) { + composeStringCore("unit", element.getUnitElement(), false); + composeStringExtras("unit", element.getUnitElement(), false); + } + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + } + + protected void composeMeta(String name, Meta element) throws IOException { + if (element != null) { + open(name); + composeMetaInner(element); + close(); + } + } + + protected void composeMetaInner(Meta element) throws IOException { + composeElement(element); + if (element.hasVersionIdElement()) { + composeIdCore("versionId", element.getVersionIdElement(), false); + composeIdExtras("versionId", element.getVersionIdElement(), false); + } + if (element.hasLastUpdatedElement()) { + composeInstantCore("lastUpdated", element.getLastUpdatedElement(), false); + composeInstantExtras("lastUpdated", element.getLastUpdatedElement(), false); + } + if (element.hasProfile()) { + openArray("profile"); + for (UriType e : element.getProfile()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getProfile())) { + openArray("_profile"); + for (UriType e : element.getProfile()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSecurity()) { + openArray("security"); + for (Coding e : element.getSecurity()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasTag()) { + openArray("tag"); + for (Coding e : element.getTag()) + composeCoding(null, e); + closeArray(); + }; + } + + protected void composeAddress(String name, Address element) throws IOException { + if (element != null) { + open(name); + composeAddressInner(element); + close(); + } + } + + protected void composeAddressInner(Address element) throws IOException { + composeElement(element); + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new Address.AddressUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new Address.AddressUseEnumFactory(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Address.AddressTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Address.AddressTypeEnumFactory(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasLine()) { + openArray("line"); + for (StringType e : element.getLine()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getLine())) { + openArray("_line"); + for (StringType e : element.getLine()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasCityElement()) { + composeStringCore("city", element.getCityElement(), false); + composeStringExtras("city", element.getCityElement(), false); + } + if (element.hasDistrictElement()) { + composeStringCore("district", element.getDistrictElement(), false); + composeStringExtras("district", element.getDistrictElement(), false); + } + if (element.hasStateElement()) { + composeStringCore("state", element.getStateElement(), false); + composeStringExtras("state", element.getStateElement(), false); + } + if (element.hasPostalCodeElement()) { + composeStringCore("postalCode", element.getPostalCodeElement(), false); + composeStringExtras("postalCode", element.getPostalCodeElement(), false); + } + if (element.hasCountryElement()) { + composeStringCore("country", element.getCountryElement(), false); + composeStringExtras("country", element.getCountryElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeTriggerDefinition(String name, TriggerDefinition element) throws IOException { + if (element != null) { + open(name); + composeTriggerDefinitionInner(element); + close(); + } + } + + protected void composeTriggerDefinitionInner(TriggerDefinition element) throws IOException { + composeElement(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory(), false); + } + if (element.hasNameElement()) { + composeUriCore("name", element.getNameElement(), false); + composeUriExtras("name", element.getNameElement(), false); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasData()) { + composeDataRequirement("data", element.getData()); + } + if (element.hasCondition()) { + composeTriggerDefinitionTriggerDefinitionConditionComponent("condition", element.getCondition()); + } + } + + protected void composeTriggerDefinitionTriggerDefinitionConditionComponent(String name, TriggerDefinition.TriggerDefinitionConditionComponent element) throws IOException { + if (element != null) { + open(name); + composeTriggerDefinitionTriggerDefinitionConditionComponentInner(element); + close(); + } + } + + protected void composeTriggerDefinitionTriggerDefinitionConditionComponentInner(TriggerDefinition.TriggerDefinitionConditionComponent element) throws IOException { + composeElement(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasLanguageElement()) { + composeEnumerationCore("language", element.getLanguageElement(), new TriggerDefinition.ExpressionLanguageEnumFactory(), false); + composeEnumerationExtras("language", element.getLanguageElement(), new TriggerDefinition.ExpressionLanguageEnumFactory(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + } + + protected void composeContributor(String name, Contributor element) throws IOException { + if (element != null) { + open(name); + composeContributorInner(element); + close(); + } + } + + protected void composeContributorInner(Contributor element) throws IOException { + composeElement(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + } + + protected void composeDataRequirement(String name, DataRequirement element) throws IOException { + if (element != null) { + open(name); + composeDataRequirementInner(element); + close(); + } + } + + protected void composeDataRequirementInner(DataRequirement element) throws IOException { + composeElement(element); + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasProfile()) { + openArray("profile"); + for (UriType e : element.getProfile()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getProfile())) { + openArray("_profile"); + for (UriType e : element.getProfile()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasMustSupport()) { + openArray("mustSupport"); + for (StringType e : element.getMustSupport()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getMustSupport())) { + openArray("_mustSupport"); + for (StringType e : element.getMustSupport()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasCodeFilter()) { + openArray("codeFilter"); + for (DataRequirement.DataRequirementCodeFilterComponent e : element.getCodeFilter()) + composeDataRequirementDataRequirementCodeFilterComponent(null, e); + closeArray(); + }; + if (element.hasDateFilter()) { + openArray("dateFilter"); + for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter()) + composeDataRequirementDataRequirementDateFilterComponent(null, e); + closeArray(); + }; + } + + protected void composeDataRequirementDataRequirementCodeFilterComponent(String name, DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { + if (element != null) { + open(name); + composeDataRequirementDataRequirementCodeFilterComponentInner(element); + close(); + } + } + + protected void composeDataRequirementDataRequirementCodeFilterComponentInner(DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { + composeElement(element); + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasValueSet()) { + composeType("valueSet", element.getValueSet()); + } + if (element.hasCode()) { + openArray("code"); + for (Coding e : element.getCode()) + composeCoding(null, e); + closeArray(); + }; + } + + protected void composeDataRequirementDataRequirementDateFilterComponent(String name, DataRequirement.DataRequirementDateFilterComponent element) throws IOException { + if (element != null) { + open(name); + composeDataRequirementDataRequirementDateFilterComponentInner(element); + close(); + } + } + + protected void composeDataRequirementDataRequirementDateFilterComponentInner(DataRequirement.DataRequirementDateFilterComponent element) throws IOException { + composeElement(element); + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeDosage(String name, Dosage element) throws IOException { + if (element != null) { + open(name); + composeDosageInner(element); + close(); + } + } + + protected void composeDosageInner(Dosage element) throws IOException { + composeElement(element); + if (element.hasSequenceElement()) { + composeIntegerCore("sequence", element.getSequenceElement(), false); + composeIntegerExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasAdditionalInstruction()) { + openArray("additionalInstruction"); + for (CodeableConcept e : element.getAdditionalInstruction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPatientInstructionElement()) { + composeStringCore("patientInstruction", element.getPatientInstructionElement(), false); + composeStringExtras("patientInstruction", element.getPatientInstructionElement(), false); + } + if (element.hasTiming()) { + composeTiming("timing", element.getTiming()); + } + if (element.hasAsNeeded()) { + composeType("asNeeded", element.getAsNeeded()); + } + if (element.hasSite()) { + composeCodeableConcept("site", element.getSite()); + } + if (element.hasRoute()) { + composeCodeableConcept("route", element.getRoute()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasDose()) { + composeType("dose", element.getDose()); + } + if (element.hasMaxDosePerPeriod()) { + composeRatio("maxDosePerPeriod", element.getMaxDosePerPeriod()); + } + if (element.hasMaxDosePerAdministration()) { + composeSimpleQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration()); + } + if (element.hasMaxDosePerLifetime()) { + composeSimpleQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime()); + } + if (element.hasRate()) { + composeType("rate", element.getRate()); + } + } + + protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException { + if (element != null) { + open(name); + composeRelatedArtifactInner(element); + close(); + } + } + + protected void composeRelatedArtifactInner(RelatedArtifact element) throws IOException { + composeElement(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasCitationElement()) { + composeStringCore("citation", element.getCitationElement(), false); + composeStringExtras("citation", element.getCitationElement(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasDocument()) { + composeAttachment("document", element.getDocument()); + } + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + } + + protected void composeContactDetail(String name, ContactDetail element) throws IOException { + if (element != null) { + open(name); + composeContactDetailInner(element); + close(); + } + } + + protected void composeContactDetailInner(ContactDetail element) throws IOException { + composeElement(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + } + + protected void composeHumanName(String name, HumanName element) throws IOException { + if (element != null) { + open(name); + composeHumanNameInner(element); + close(); + } + } + + protected void composeHumanNameInner(HumanName element) throws IOException { + composeElement(element); + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new HumanName.NameUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new HumanName.NameUseEnumFactory(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasFamilyElement()) { + composeStringCore("family", element.getFamilyElement(), false); + composeStringExtras("family", element.getFamilyElement(), false); + } + if (element.hasGiven()) { + openArray("given"); + for (StringType e : element.getGiven()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getGiven())) { + openArray("_given"); + for (StringType e : element.getGiven()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPrefix()) { + openArray("prefix"); + for (StringType e : element.getPrefix()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPrefix())) { + openArray("_prefix"); + for (StringType e : element.getPrefix()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSuffix()) { + openArray("suffix"); + for (StringType e : element.getSuffix()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSuffix())) { + openArray("_suffix"); + for (StringType e : element.getSuffix()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeContactPoint(String name, ContactPoint element) throws IOException { + if (element != null) { + open(name); + composeContactPointInner(element); + close(); + } + } + + protected void composeContactPointInner(ContactPoint element) throws IOException { + composeElement(element); + if (element.hasSystemElement()) { + composeEnumerationCore("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory(), false); + composeEnumerationExtras("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory(), false); + } + if (element.hasRankElement()) { + composePositiveIntCore("rank", element.getRankElement(), false); + composePositiveIntExtras("rank", element.getRankElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeUsageContext(String name, UsageContext element) throws IOException { + if (element != null) { + open(name); + composeUsageContextInner(element); + close(); + } + } + + protected void composeUsageContextInner(UsageContext element) throws IOException { + composeElement(element); + if (element.hasCode()) { + composeCoding("code", element.getCode()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeTiming(String name, Timing element) throws IOException { + if (element != null) { + open(name); + composeTimingInner(element); + close(); + } + } + + protected void composeTimingInner(Timing element) throws IOException { + composeElement(element); + if (element.hasEvent()) { + openArray("event"); + for (DateTimeType e : element.getEvent()) + composeDateTimeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getEvent())) { + openArray("_event"); + for (DateTimeType e : element.getEvent()) + composeDateTimeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasRepeat()) { + composeTimingTimingRepeatComponent("repeat", element.getRepeat()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + } + + protected void composeTimingTimingRepeatComponent(String name, Timing.TimingRepeatComponent element) throws IOException { + if (element != null) { + open(name); + composeTimingTimingRepeatComponentInner(element); + close(); + } + } + + protected void composeTimingTimingRepeatComponentInner(Timing.TimingRepeatComponent element) throws IOException { + composeElement(element); + if (element.hasBounds()) { + composeType("bounds", element.getBounds()); + } + if (element.hasCountElement()) { + composeIntegerCore("count", element.getCountElement(), false); + composeIntegerExtras("count", element.getCountElement(), false); + } + if (element.hasCountMaxElement()) { + composeIntegerCore("countMax", element.getCountMaxElement(), false); + composeIntegerExtras("countMax", element.getCountMaxElement(), false); + } + if (element.hasDurationElement()) { + composeDecimalCore("duration", element.getDurationElement(), false); + composeDecimalExtras("duration", element.getDurationElement(), false); + } + if (element.hasDurationMaxElement()) { + composeDecimalCore("durationMax", element.getDurationMaxElement(), false); + composeDecimalExtras("durationMax", element.getDurationMaxElement(), false); + } + if (element.hasDurationUnitElement()) { + composeEnumerationCore("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); + composeEnumerationExtras("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); + } + if (element.hasFrequencyElement()) { + composeIntegerCore("frequency", element.getFrequencyElement(), false); + composeIntegerExtras("frequency", element.getFrequencyElement(), false); + } + if (element.hasFrequencyMaxElement()) { + composeIntegerCore("frequencyMax", element.getFrequencyMaxElement(), false); + composeIntegerExtras("frequencyMax", element.getFrequencyMaxElement(), false); + } + if (element.hasPeriodElement()) { + composeDecimalCore("period", element.getPeriodElement(), false); + composeDecimalExtras("period", element.getPeriodElement(), false); + } + if (element.hasPeriodMaxElement()) { + composeDecimalCore("periodMax", element.getPeriodMaxElement(), false); + composeDecimalExtras("periodMax", element.getPeriodMaxElement(), false); + } + if (element.hasPeriodUnitElement()) { + composeEnumerationCore("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); + composeEnumerationExtras("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory(), false); + } + if (element.hasDayOfWeek()) { + openArray("dayOfWeek"); + for (Enumeration e : element.getDayOfWeek()) + composeEnumerationCore(null, e, new Timing.DayOfWeekEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getDayOfWeek())) { + openArray("_dayOfWeek"); + for (Enumeration e : element.getDayOfWeek()) + composeEnumerationExtras(null, e, new Timing.DayOfWeekEnumFactory(), true); + closeArray(); + } + }; + if (element.hasTimeOfDay()) { + openArray("timeOfDay"); + for (TimeType e : element.getTimeOfDay()) + composeTimeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getTimeOfDay())) { + openArray("_timeOfDay"); + for (TimeType e : element.getTimeOfDay()) + composeTimeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasWhen()) { + openArray("when"); + for (Enumeration e : element.getWhen()) + composeEnumerationCore(null, e, new Timing.EventTimingEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getWhen())) { + openArray("_when"); + for (Enumeration e : element.getWhen()) + composeEnumerationExtras(null, e, new Timing.EventTimingEnumFactory(), true); + closeArray(); + } + }; + if (element.hasOffsetElement()) { + composeUnsignedIntCore("offset", element.getOffsetElement(), false); + composeUnsignedIntExtras("offset", element.getOffsetElement(), false); + } + } + + protected void composeElementDefinition(String name, ElementDefinition element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionInner(element); + close(); + } + } + + protected void composeElementDefinitionInner(ElementDefinition element) throws IOException { + composeElement(element); + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasRepresentation()) { + openArray("representation"); + for (Enumeration e : element.getRepresentation()) + composeEnumerationCore(null, e, new ElementDefinition.PropertyRepresentationEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getRepresentation())) { + openArray("_representation"); + for (Enumeration e : element.getRepresentation()) + composeEnumerationExtras(null, e, new ElementDefinition.PropertyRepresentationEnumFactory(), true); + closeArray(); + } + }; + if (element.hasSliceNameElement()) { + composeStringCore("sliceName", element.getSliceNameElement(), false); + composeStringExtras("sliceName", element.getSliceNameElement(), false); + } + if (element.hasLabelElement()) { + composeStringCore("label", element.getLabelElement(), false); + composeStringExtras("label", element.getLabelElement(), false); + } + if (element.hasCode()) { + openArray("code"); + for (Coding e : element.getCode()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasSlicing()) { + composeElementDefinitionElementDefinitionSlicingComponent("slicing", element.getSlicing()); + } + if (element.hasShortElement()) { + composeStringCore("short", element.getShortElement(), false); + composeStringExtras("short", element.getShortElement(), false); + } + if (element.hasDefinitionElement()) { + composeMarkdownCore("definition", element.getDefinitionElement(), false); + composeMarkdownExtras("definition", element.getDefinitionElement(), false); + } + if (element.hasCommentElement()) { + composeMarkdownCore("comment", element.getCommentElement(), false); + composeMarkdownExtras("comment", element.getCommentElement(), false); + } + if (element.hasRequirementsElement()) { + composeMarkdownCore("requirements", element.getRequirementsElement(), false); + composeMarkdownExtras("requirements", element.getRequirementsElement(), false); + } + if (element.hasAlias()) { + openArray("alias"); + for (StringType e : element.getAlias()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getAlias())) { + openArray("_alias"); + for (StringType e : element.getAlias()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasMinElement()) { + composeUnsignedIntCore("min", element.getMinElement(), false); + composeUnsignedIntExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + if (element.hasBase()) { + composeElementDefinitionElementDefinitionBaseComponent("base", element.getBase()); + } + if (element.hasContentReferenceElement()) { + composeUriCore("contentReference", element.getContentReferenceElement(), false); + composeUriExtras("contentReference", element.getContentReferenceElement(), false); + } + if (element.hasType()) { + openArray("type"); + for (ElementDefinition.TypeRefComponent e : element.getType()) + composeElementDefinitionTypeRefComponent(null, e); + closeArray(); + }; + if (element.hasDefaultValue()) { + composeType("defaultValue", element.getDefaultValue()); + } + if (element.hasMeaningWhenMissingElement()) { + composeMarkdownCore("meaningWhenMissing", element.getMeaningWhenMissingElement(), false); + composeMarkdownExtras("meaningWhenMissing", element.getMeaningWhenMissingElement(), false); + } + if (element.hasOrderMeaningElement()) { + composeStringCore("orderMeaning", element.getOrderMeaningElement(), false); + composeStringExtras("orderMeaning", element.getOrderMeaningElement(), false); + } + if (element.hasFixed()) { + composeType("fixed", element.getFixed()); + } + if (element.hasPattern()) { + composeType("pattern", element.getPattern()); + } + if (element.hasExample()) { + openArray("example"); + for (ElementDefinition.ElementDefinitionExampleComponent e : element.getExample()) + composeElementDefinitionElementDefinitionExampleComponent(null, e); + closeArray(); + }; + if (element.hasMinValue()) { + composeType("minValue", element.getMinValue()); + } + if (element.hasMaxValue()) { + composeType("maxValue", element.getMaxValue()); + } + if (element.hasMaxLengthElement()) { + composeIntegerCore("maxLength", element.getMaxLengthElement(), false); + composeIntegerExtras("maxLength", element.getMaxLengthElement(), false); + } + if (element.hasCondition()) { + openArray("condition"); + for (IdType e : element.getCondition()) + composeIdCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getCondition())) { + openArray("_condition"); + for (IdType e : element.getCondition()) + composeIdExtras(null, e, true); + closeArray(); + } + }; + if (element.hasConstraint()) { + openArray("constraint"); + for (ElementDefinition.ElementDefinitionConstraintComponent e : element.getConstraint()) + composeElementDefinitionElementDefinitionConstraintComponent(null, e); + closeArray(); + }; + if (element.hasMustSupportElement()) { + composeBooleanCore("mustSupport", element.getMustSupportElement(), false); + composeBooleanExtras("mustSupport", element.getMustSupportElement(), false); + } + if (element.hasIsModifierElement()) { + composeBooleanCore("isModifier", element.getIsModifierElement(), false); + composeBooleanExtras("isModifier", element.getIsModifierElement(), false); + } + if (element.hasIsSummaryElement()) { + composeBooleanCore("isSummary", element.getIsSummaryElement(), false); + composeBooleanExtras("isSummary", element.getIsSummaryElement(), false); + } + if (element.hasBinding()) { + composeElementDefinitionElementDefinitionBindingComponent("binding", element.getBinding()); + } + if (element.hasMapping()) { + openArray("mapping"); + for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping()) + composeElementDefinitionElementDefinitionMappingComponent(null, e); + closeArray(); + }; + } + + protected void composeElementDefinitionElementDefinitionSlicingComponent(String name, ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionSlicingComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionSlicingComponentInner(ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { + composeElement(element); + if (element.hasDiscriminator()) { + openArray("discriminator"); + for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator()) + composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasOrderedElement()) { + composeBooleanCore("ordered", element.getOrderedElement(), false); + composeBooleanExtras("ordered", element.getOrderedElement(), false); + } + if (element.hasRulesElement()) { + composeEnumerationCore("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory(), false); + composeEnumerationExtras("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory(), false); + } + } + + protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentInner(ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { + composeElement(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + } + + protected void composeElementDefinitionElementDefinitionBaseComponent(String name, ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionBaseComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionBaseComponentInner(ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { + composeElement(element); + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasMinElement()) { + composeUnsignedIntCore("min", element.getMinElement(), false); + composeUnsignedIntExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + } + + protected void composeElementDefinitionTypeRefComponent(String name, ElementDefinition.TypeRefComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionTypeRefComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionTypeRefComponentInner(ElementDefinition.TypeRefComponent element) throws IOException { + composeElement(element); + if (element.hasCodeElement()) { + composeUriCore("code", element.getCodeElement(), false); + composeUriExtras("code", element.getCodeElement(), false); + } + if (element.hasProfileElement()) { + composeUriCore("profile", element.getProfileElement(), false); + composeUriExtras("profile", element.getProfileElement(), false); + } + if (element.hasTargetProfileElement()) { + composeUriCore("targetProfile", element.getTargetProfileElement(), false); + composeUriExtras("targetProfile", element.getTargetProfileElement(), false); + } + if (element.hasAggregation()) { + openArray("aggregation"); + for (Enumeration e : element.getAggregation()) + composeEnumerationCore(null, e, new ElementDefinition.AggregationModeEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getAggregation())) { + openArray("_aggregation"); + for (Enumeration e : element.getAggregation()) + composeEnumerationExtras(null, e, new ElementDefinition.AggregationModeEnumFactory(), true); + closeArray(); + } + }; + if (element.hasVersioningElement()) { + composeEnumerationCore("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory(), false); + composeEnumerationExtras("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory(), false); + } + } + + protected void composeElementDefinitionElementDefinitionExampleComponent(String name, ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionExampleComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionExampleComponentInner(ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { + composeElement(element); + if (element.hasLabelElement()) { + composeStringCore("label", element.getLabelElement(), false); + composeStringExtras("label", element.getLabelElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeElementDefinitionElementDefinitionConstraintComponent(String name, ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionConstraintComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionConstraintComponentInner(ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { + composeElement(element); + if (element.hasKeyElement()) { + composeIdCore("key", element.getKeyElement(), false); + composeIdExtras("key", element.getKeyElement(), false); + } + if (element.hasRequirementsElement()) { + composeStringCore("requirements", element.getRequirementsElement(), false); + composeStringExtras("requirements", element.getRequirementsElement(), false); + } + if (element.hasSeverityElement()) { + composeEnumerationCore("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory(), false); + composeEnumerationExtras("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory(), false); + } + if (element.hasHumanElement()) { + composeStringCore("human", element.getHumanElement(), false); + composeStringExtras("human", element.getHumanElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + if (element.hasXpathElement()) { + composeStringCore("xpath", element.getXpathElement(), false); + composeStringExtras("xpath", element.getXpathElement(), false); + } + if (element.hasSourceElement()) { + composeUriCore("source", element.getSourceElement(), false); + composeUriExtras("source", element.getSourceElement(), false); + } + } + + protected void composeElementDefinitionElementDefinitionBindingComponent(String name, ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionBindingComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionBindingComponentInner(ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { + composeElement(element); + if (element.hasStrengthElement()) { + composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); + composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasValueSet()) { + composeType("valueSet", element.getValueSet()); + } + } + + protected void composeElementDefinitionElementDefinitionMappingComponent(String name, ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { + if (element != null) { + open(name); + composeElementDefinitionElementDefinitionMappingComponentInner(element); + close(); + } + } + + protected void composeElementDefinitionElementDefinitionMappingComponentInner(ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { + composeElement(element); + if (element.hasIdentityElement()) { + composeIdCore("identity", element.getIdentityElement(), false); + composeIdExtras("identity", element.getIdentityElement(), false); + } + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + if (element.hasMapElement()) { + composeStringCore("map", element.getMapElement(), false); + composeStringExtras("map", element.getMapElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeParameterDefinition(String name, ParameterDefinition element) throws IOException { + if (element != null) { + open(name); + composeParameterDefinitionInner(element); + close(); + } + } + + protected void composeParameterDefinitionInner(ParameterDefinition element) throws IOException { + composeElement(element); + if (element.hasNameElement()) { + composeCodeCore("name", element.getNameElement(), false); + composeCodeExtras("name", element.getNameElement(), false); + } + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory(), false); + } + if (element.hasMinElement()) { + composeIntegerCore("min", element.getMinElement(), false); + composeIntegerExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + } + + protected void composeDomainResourceElements(DomainResource element) throws IOException { + composeResourceElements(element); + if (element.hasText()) { + composeNarrative("text", element.getText()); + } + if (element.hasContained()) { + openArray("contained"); + for (Resource e : element.getContained()) { + open(null); + composeResource(e); + close(); + } + closeArray(); + }; + if (element.hasExtension()) { + openArray("extension"); + for (Extension e : element.getExtension()) + composeExtension(null, e); + closeArray(); + }; + if (element.hasModifierExtension()) { + openArray("modifierExtension"); + for (Extension e : element.getModifierExtension()) + composeExtension(null, e); + closeArray(); + }; + } + + protected void composeParameters(String name, Parameters element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeParametersInner(element); + } + } + + protected void composeParametersInner(Parameters element) throws IOException { + composeResourceElements(element); + if (element.hasParameter()) { + openArray("parameter"); + for (Parameters.ParametersParameterComponent e : element.getParameter()) + composeParametersParametersParameterComponent(null, e); + closeArray(); + }; + } + + protected void composeParametersParametersParameterComponent(String name, Parameters.ParametersParameterComponent element) throws IOException { + if (element != null) { + open(name); + composeParametersParametersParameterComponentInner(element); + close(); + } + } + + protected void composeParametersParametersParameterComponentInner(Parameters.ParametersParameterComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasResource()) { + open("resource"); + composeResource(element.getResource()); + close(); + } + if (element.hasPart()) { + openArray("part"); + for (Parameters.ParametersParameterComponent e : element.getPart()) + composeParametersParametersParameterComponent(null, e); + closeArray(); + }; + } + + protected void composeResourceElements(Resource element) throws IOException { + if (element.hasIdElement()) { + composeIdCore("id", element.getIdElement(), false); + composeIdExtras("id", element.getIdElement(), false); + } + if (element.hasMeta()) { + composeMeta("meta", element.getMeta()); + } + if (element.hasImplicitRulesElement()) { + composeUriCore("implicitRules", element.getImplicitRulesElement(), false); + composeUriExtras("implicitRules", element.getImplicitRulesElement(), false); + } + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + } + + protected void composeAccount(String name, Account element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeAccountInner(element); + } + } + + protected void composeAccountInner(Account element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Account.AccountStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Account.AccountStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasActive()) { + composePeriod("active", element.getActive()); + } + if (element.hasBalance()) { + composeMoney("balance", element.getBalance()); + } + if (element.hasCoverage()) { + openArray("coverage"); + for (Account.CoverageComponent e : element.getCoverage()) + composeAccountCoverageComponent(null, e); + closeArray(); + }; + if (element.hasOwner()) { + composeReference("owner", element.getOwner()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasGuarantor()) { + openArray("guarantor"); + for (Account.GuarantorComponent e : element.getGuarantor()) + composeAccountGuarantorComponent(null, e); + closeArray(); + }; + } + + protected void composeAccountCoverageComponent(String name, Account.CoverageComponent element) throws IOException { + if (element != null) { + open(name); + composeAccountCoverageComponentInner(element); + close(); + } + } + + protected void composeAccountCoverageComponentInner(Account.CoverageComponent element) throws IOException { + composeBackbone(element); + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasPriorityElement()) { + composePositiveIntCore("priority", element.getPriorityElement(), false); + composePositiveIntExtras("priority", element.getPriorityElement(), false); + } + } + + protected void composeAccountGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException { + if (element != null) { + open(name); + composeAccountGuarantorComponentInner(element); + close(); + } + } + + protected void composeAccountGuarantorComponentInner(Account.GuarantorComponent element) throws IOException { + composeBackbone(element); + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + if (element.hasOnHoldElement()) { + composeBooleanCore("onHold", element.getOnHoldElement(), false); + composeBooleanExtras("onHold", element.getOnHoldElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeActivityDefinition(String name, ActivityDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeActivityDefinitionInner(element); + } + } + + protected void composeActivityDefinitionInner(ActivityDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContributor()) { + openArray("contributor"); + for (Contributor e : element.getContributor()) + composeContributor(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasLibrary()) { + openArray("library"); + for (Reference e : element.getLibrary()) + composeReference(null, e); + closeArray(); + }; + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasParticipant()) { + openArray("participant"); + for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant()) + composeActivityDefinitionActivityDefinitionParticipantComponent(null, e); + closeArray(); + }; + if (element.hasProduct()) { + composeType("product", element.getProduct()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasDosage()) { + openArray("dosage"); + for (Dosage e : element.getDosage()) + composeDosage(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + openArray("bodySite"); + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTransform()) { + composeReference("transform", element.getTransform()); + } + if (element.hasDynamicValue()) { + openArray("dynamicValue"); + for (ActivityDefinition.ActivityDefinitionDynamicValueComponent e : element.getDynamicValue()) + composeActivityDefinitionActivityDefinitionDynamicValueComponent(null, e); + closeArray(); + }; + } + + protected void composeActivityDefinitionActivityDefinitionParticipantComponent(String name, ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composeActivityDefinitionActivityDefinitionParticipantComponentInner(element); + close(); + } + } + + protected void composeActivityDefinitionActivityDefinitionParticipantComponentInner(ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory(), false); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + } + + protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { + if (element != null) { + open(name); + composeActivityDefinitionActivityDefinitionDynamicValueComponentInner(element); + close(); + } + } + + protected void composeActivityDefinitionActivityDefinitionDynamicValueComponentInner(ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasLanguageElement()) { + composeStringCore("language", element.getLanguageElement(), false); + composeStringExtras("language", element.getLanguageElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + } + + protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeAdverseEventInner(element); + } + } + + protected void composeAdverseEventInner(AdverseEvent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasActualityElement()) { + composeEnumerationCore("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory(), false); + composeEnumerationExtras("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory(), false); + } + if (element.hasCategoryElement()) { + composeEnumerationCore("category", element.getCategoryElement(), new AdverseEvent.AdverseEventCategoryEnumFactory(), false); + composeEnumerationExtras("category", element.getCategoryElement(), new AdverseEvent.AdverseEventCategoryEnumFactory(), false); + } + if (element.hasEvent()) { + composeCodeableConcept("event", element.getEvent()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasResultingCondition()) { + openArray("resultingCondition"); + for (Reference e : element.getResultingCondition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasSeriousness()) { + composeCodeableConcept("seriousness", element.getSeriousness()); + } + if (element.hasSeverity()) { + composeCodeableConcept("severity", element.getSeverity()); + } + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasRecorder()) { + composeReference("recorder", element.getRecorder()); + } + if (element.hasEventParticipant()) { + composeReference("eventParticipant", element.getEventParticipant()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasSuspectEntity()) { + openArray("suspectEntity"); + for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity()) + composeAdverseEventAdverseEventSuspectEntityComponent(null, e); + closeArray(); + }; + if (element.hasSubjectMedicalHistory()) { + openArray("subjectMedicalHistory"); + for (Reference e : element.getSubjectMedicalHistory()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReferenceDocument()) { + openArray("referenceDocument"); + for (Reference e : element.getReferenceDocument()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStudy()) { + openArray("study"); + for (Reference e : element.getStudy()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeAdverseEventAdverseEventSuspectEntityComponent(String name, AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { + if (element != null) { + open(name); + composeAdverseEventAdverseEventSuspectEntityComponentInner(element); + close(); + } + } + + protected void composeAdverseEventAdverseEventSuspectEntityComponentInner(AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { + composeBackbone(element); + if (element.hasInstance()) { + composeReference("instance", element.getInstance()); + } + if (element.hasCausality()) { + openArray("causality"); + for (AdverseEvent.AdverseEventSuspectEntityCausalityComponent e : element.getCausality()) + composeAdverseEventAdverseEventSuspectEntityCausalityComponent(null, e); + closeArray(); + }; + } + + protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { + if (element != null) { + open(name); + composeAdverseEventAdverseEventSuspectEntityCausalityComponentInner(element); + close(); + } + } + + protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponentInner(AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { + composeBackbone(element); + if (element.hasAssessment()) { + composeCodeableConcept("assessment", element.getAssessment()); + } + if (element.hasProductRelatednessElement()) { + composeStringCore("productRelatedness", element.getProductRelatednessElement(), false); + composeStringExtras("productRelatedness", element.getProductRelatednessElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + } + + protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeAllergyIntoleranceInner(element); + } + } + + protected void composeAllergyIntoleranceInner(AllergyIntolerance element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasClinicalStatusElement()) { + composeEnumerationCore("clinicalStatus", element.getClinicalStatusElement(), new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory(), false); + composeEnumerationExtras("clinicalStatus", element.getClinicalStatusElement(), new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory(), false); + } + if (element.hasVerificationStatusElement()) { + composeEnumerationCore("verificationStatus", element.getVerificationStatusElement(), new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory(), false); + composeEnumerationExtras("verificationStatus", element.getVerificationStatusElement(), new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (Enumeration e : element.getCategory()) + composeEnumerationCore(null, e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getCategory())) { + openArray("_category"); + for (Enumeration e : element.getCategory()) + composeEnumerationExtras(null, e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory(), true); + closeArray(); + } + }; + if (element.hasCriticalityElement()) { + composeEnumerationCore("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory(), false); + composeEnumerationExtras("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasOnset()) { + composeType("onset", element.getOnset()); + } + if (element.hasAssertedDateElement()) { + composeDateTimeCore("assertedDate", element.getAssertedDateElement(), false); + composeDateTimeExtras("assertedDate", element.getAssertedDateElement(), false); + } + if (element.hasRecorder()) { + composeReference("recorder", element.getRecorder()); + } + if (element.hasAsserter()) { + composeReference("asserter", element.getAsserter()); + } + if (element.hasLastOccurrenceElement()) { + composeDateTimeCore("lastOccurrence", element.getLastOccurrenceElement(), false); + composeDateTimeExtras("lastOccurrence", element.getLastOccurrenceElement(), false); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasReaction()) { + openArray("reaction"); + for (AllergyIntolerance.AllergyIntoleranceReactionComponent e : element.getReaction()) + composeAllergyIntoleranceAllergyIntoleranceReactionComponent(null, e); + closeArray(); + }; + } + + protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { + if (element != null) { + open(name); + composeAllergyIntoleranceAllergyIntoleranceReactionComponentInner(element); + close(); + } + } + + protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponentInner(AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { + composeBackbone(element); + if (element.hasSubstance()) { + composeCodeableConcept("substance", element.getSubstance()); + } + if (element.hasManifestation()) { + openArray("manifestation"); + for (CodeableConcept e : element.getManifestation()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasOnsetElement()) { + composeDateTimeCore("onset", element.getOnsetElement(), false); + composeDateTimeExtras("onset", element.getOnsetElement(), false); + } + if (element.hasSeverityElement()) { + composeEnumerationCore("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory(), false); + composeEnumerationExtras("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory(), false); + } + if (element.hasExposureRoute()) { + composeCodeableConcept("exposureRoute", element.getExposureRoute()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeAppointment(String name, Appointment element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeAppointmentInner(element); + } + } + + protected void composeAppointmentInner(Appointment element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory(), false); + } + if (element.hasServiceCategory()) { + composeCodeableConcept("serviceCategory", element.getServiceCategory()); + } + if (element.hasServiceType()) { + openArray("serviceType"); + for (CodeableConcept e : element.getServiceType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialty()) { + openArray("specialty"); + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasAppointmentType()) { + composeCodeableConcept("appointmentType", element.getAppointmentType()); + } + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasIndication()) { + openArray("indication"); + for (Reference e : element.getIndication()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPriorityElement()) { + composeUnsignedIntCore("priority", element.getPriorityElement(), false); + composeUnsignedIntExtras("priority", element.getPriorityElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasSupportingInformation()) { + openArray("supportingInformation"); + for (Reference e : element.getSupportingInformation()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStartElement()) { + composeInstantCore("start", element.getStartElement(), false); + composeInstantExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeInstantCore("end", element.getEndElement(), false); + composeInstantExtras("end", element.getEndElement(), false); + } + if (element.hasMinutesDurationElement()) { + composePositiveIntCore("minutesDuration", element.getMinutesDurationElement(), false); + composePositiveIntExtras("minutesDuration", element.getMinutesDurationElement(), false); + } + if (element.hasSlot()) { + openArray("slot"); + for (Reference e : element.getSlot()) + composeReference(null, e); + closeArray(); + }; + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasIncomingReferral()) { + openArray("incomingReferral"); + for (Reference e : element.getIncomingReferral()) + composeReference(null, e); + closeArray(); + }; + if (element.hasParticipant()) { + openArray("participant"); + for (Appointment.AppointmentParticipantComponent e : element.getParticipant()) + composeAppointmentAppointmentParticipantComponent(null, e); + closeArray(); + }; + if (element.hasRequestedPeriod()) { + openArray("requestedPeriod"); + for (Period e : element.getRequestedPeriod()) + composePeriod(null, e); + closeArray(); + }; + } + + protected void composeAppointmentAppointmentParticipantComponent(String name, Appointment.AppointmentParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composeAppointmentAppointmentParticipantComponentInner(element); + close(); + } + } + + protected void composeAppointmentAppointmentParticipantComponentInner(Appointment.AppointmentParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasRequiredElement()) { + composeEnumerationCore("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory(), false); + composeEnumerationExtras("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory(), false); + } + } + + protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeAppointmentResponseInner(element); + } + } + + protected void composeAppointmentResponseInner(AppointmentResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasAppointment()) { + composeReference("appointment", element.getAppointment()); + } + if (element.hasStartElement()) { + composeInstantCore("start", element.getStartElement(), false); + composeInstantExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeInstantCore("end", element.getEndElement(), false); + composeInstantExtras("end", element.getEndElement(), false); + } + if (element.hasParticipantType()) { + openArray("participantType"); + for (CodeableConcept e : element.getParticipantType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasParticipantStatusElement()) { + composeEnumerationCore("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.ParticipantStatusEnumFactory(), false); + composeEnumerationExtras("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.ParticipantStatusEnumFactory(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeAuditEvent(String name, AuditEvent element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeAuditEventInner(element); + } + } + + protected void composeAuditEventInner(AuditEvent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasSubtype()) { + openArray("subtype"); + for (Coding e : element.getSubtype()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasActionElement()) { + composeEnumerationCore("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false); + composeEnumerationExtras("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasRecordedElement()) { + composeInstantCore("recorded", element.getRecordedElement(), false); + composeInstantExtras("recorded", element.getRecordedElement(), false); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory(), false); + } + if (element.hasOutcomeDescElement()) { + composeStringCore("outcomeDesc", element.getOutcomeDescElement(), false); + composeStringExtras("outcomeDesc", element.getOutcomeDescElement(), false); + } + if (element.hasPurposeOfEvent()) { + openArray("purposeOfEvent"); + for (CodeableConcept e : element.getPurposeOfEvent()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasAgent()) { + openArray("agent"); + for (AuditEvent.AuditEventAgentComponent e : element.getAgent()) + composeAuditEventAuditEventAgentComponent(null, e); + closeArray(); + }; + if (element.hasSource()) { + composeAuditEventAuditEventSourceComponent("source", element.getSource()); + } + if (element.hasEntity()) { + openArray("entity"); + for (AuditEvent.AuditEventEntityComponent e : element.getEntity()) + composeAuditEventAuditEventEntityComponent(null, e); + closeArray(); + }; + } + + protected void composeAuditEventAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element) throws IOException { + if (element != null) { + open(name); + composeAuditEventAuditEventAgentComponentInner(element); + close(); + } + } + + protected void composeAuditEventAuditEventAgentComponentInner(AuditEvent.AuditEventAgentComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasRole()) { + openArray("role"); + for (CodeableConcept e : element.getRole()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + if (element.hasUserId()) { + composeIdentifier("userId", element.getUserId()); + } + if (element.hasAltIdElement()) { + composeStringCore("altId", element.getAltIdElement(), false); + composeStringExtras("altId", element.getAltIdElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasRequestorElement()) { + composeBooleanCore("requestor", element.getRequestorElement(), false); + composeBooleanExtras("requestor", element.getRequestorElement(), false); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasPolicy()) { + openArray("policy"); + for (UriType e : element.getPolicy()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPolicy())) { + openArray("_policy"); + for (UriType e : element.getPolicy()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasMedia()) { + composeCoding("media", element.getMedia()); + } + if (element.hasNetwork()) { + composeAuditEventAuditEventAgentNetworkComponent("network", element.getNetwork()); + } + if (element.hasPurposeOfUse()) { + openArray("purposeOfUse"); + for (CodeableConcept e : element.getPurposeOfUse()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composeAuditEventAuditEventAgentNetworkComponent(String name, AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { + if (element != null) { + open(name); + composeAuditEventAuditEventAgentNetworkComponentInner(element); + close(); + } + } + + protected void composeAuditEventAuditEventAgentNetworkComponentInner(AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { + composeBackbone(element); + if (element.hasAddressElement()) { + composeStringCore("address", element.getAddressElement(), false); + composeStringExtras("address", element.getAddressElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory(), false); + } + } + + protected void composeAuditEventAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element) throws IOException { + if (element != null) { + open(name); + composeAuditEventAuditEventSourceComponentInner(element); + close(); + } + } + + protected void composeAuditEventAuditEventSourceComponentInner(AuditEvent.AuditEventSourceComponent element) throws IOException { + composeBackbone(element); + if (element.hasSiteElement()) { + composeStringCore("site", element.getSiteElement(), false); + composeStringExtras("site", element.getSiteElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasType()) { + openArray("type"); + for (Coding e : element.getType()) + composeCoding(null, e); + closeArray(); + }; + } + + protected void composeAuditEventAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element) throws IOException { + if (element != null) { + open(name); + composeAuditEventAuditEventEntityComponentInner(element); + close(); + } + } + + protected void composeAuditEventAuditEventEntityComponentInner(AuditEvent.AuditEventEntityComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasRole()) { + composeCoding("role", element.getRole()); + } + if (element.hasLifecycle()) { + composeCoding("lifecycle", element.getLifecycle()); + } + if (element.hasSecurityLabel()) { + openArray("securityLabel"); + for (Coding e : element.getSecurityLabel()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasQueryElement()) { + composeBase64BinaryCore("query", element.getQueryElement(), false); + composeBase64BinaryExtras("query", element.getQueryElement(), false); + } + if (element.hasDetail()) { + openArray("detail"); + for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail()) + composeAuditEventAuditEventEntityDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeAuditEventAuditEventEntityDetailComponent(String name, AuditEvent.AuditEventEntityDetailComponent element) throws IOException { + if (element != null) { + open(name); + composeAuditEventAuditEventEntityDetailComponentInner(element); + close(); + } + } + + protected void composeAuditEventAuditEventEntityDetailComponentInner(AuditEvent.AuditEventEntityDetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeStringCore("type", element.getTypeElement(), false); + composeStringExtras("type", element.getTypeElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeBasic(String name, Basic element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeBasicInner(element); + } + } + + protected void composeBasicInner(Basic element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasCreatedElement()) { + composeDateCore("created", element.getCreatedElement(), false); + composeDateExtras("created", element.getCreatedElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + } + + protected void composeBinary(String name, Binary element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeBinaryInner(element); + } + } + + protected void composeBinaryInner(Binary element) throws IOException { + composeResourceElements(element); + if (element.hasContentTypeElement()) { + composeCodeCore("contentType", element.getContentTypeElement(), false); + composeCodeExtras("contentType", element.getContentTypeElement(), false); + } + if (element.hasSecurityContext()) { + composeReference("securityContext", element.getSecurityContext()); + } + if (element.hasContentElement()) { + composeBase64BinaryCore("content", element.getContentElement(), false); + composeBase64BinaryExtras("content", element.getContentElement(), false); + } + } + + protected void composeBodyStructure(String name, BodyStructure element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeBodyStructureInner(element); + } + } + + protected void composeBodyStructureInner(BodyStructure element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasMorphology()) { + composeCodeableConcept("morphology", element.getMorphology()); + } + if (element.hasLocation()) { + composeCodeableConcept("location", element.getLocation()); + } + if (element.hasLocationQualifier()) { + openArray("locationQualifier"); + for (CodeableConcept e : element.getLocationQualifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasImage()) { + openArray("image"); + for (Attachment e : element.getImage()) + composeAttachment(null, e); + closeArray(); + }; + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + } + + protected void composeBundle(String name, Bundle element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeBundleInner(element); + } + } + + protected void composeBundleInner(Bundle element) throws IOException { + composeResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory(), false); + } + if (element.hasTotalElement()) { + composeUnsignedIntCore("total", element.getTotalElement(), false); + composeUnsignedIntExtras("total", element.getTotalElement(), false); + } + if (element.hasLink()) { + openArray("link"); + for (Bundle.BundleLinkComponent e : element.getLink()) + composeBundleBundleLinkComponent(null, e); + closeArray(); + }; + if (element.hasEntry()) { + openArray("entry"); + for (Bundle.BundleEntryComponent e : element.getEntry()) + composeBundleBundleEntryComponent(null, e); + closeArray(); + }; + if (element.hasSignature()) { + composeSignature("signature", element.getSignature()); + } + } + + protected void composeBundleBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException { + if (element != null) { + open(name); + composeBundleBundleLinkComponentInner(element); + close(); + } + } + + protected void composeBundleBundleLinkComponentInner(Bundle.BundleLinkComponent element) throws IOException { + composeBackbone(element); + if (element.hasRelationElement()) { + composeStringCore("relation", element.getRelationElement(), false); + composeStringExtras("relation", element.getRelationElement(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + } + + protected void composeBundleBundleEntryComponent(String name, Bundle.BundleEntryComponent element) throws IOException { + if (element != null) { + open(name); + composeBundleBundleEntryComponentInner(element); + close(); + } + } + + protected void composeBundleBundleEntryComponentInner(Bundle.BundleEntryComponent element) throws IOException { + composeBackbone(element); + if (element.hasLink()) { + openArray("link"); + for (Bundle.BundleLinkComponent e : element.getLink()) + composeBundleBundleLinkComponent(null, e); + closeArray(); + }; + if (element.hasFullUrlElement()) { + composeUriCore("fullUrl", element.getFullUrlElement(), false); + composeUriExtras("fullUrl", element.getFullUrlElement(), false); + } + if (element.hasResource()) { + open("resource"); + composeResource(element.getResource()); + close(); + } + if (element.hasSearch()) { + composeBundleBundleEntrySearchComponent("search", element.getSearch()); + } + if (element.hasRequest()) { + composeBundleBundleEntryRequestComponent("request", element.getRequest()); + } + if (element.hasResponse()) { + composeBundleBundleEntryResponseComponent("response", element.getResponse()); + } + } + + protected void composeBundleBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element) throws IOException { + if (element != null) { + open(name); + composeBundleBundleEntrySearchComponentInner(element); + close(); + } + } + + protected void composeBundleBundleEntrySearchComponentInner(Bundle.BundleEntrySearchComponent element) throws IOException { + composeBackbone(element); + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory(), false); + } + if (element.hasScoreElement()) { + composeDecimalCore("score", element.getScoreElement(), false); + composeDecimalExtras("score", element.getScoreElement(), false); + } + } + + protected void composeBundleBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element) throws IOException { + if (element != null) { + open(name); + composeBundleBundleEntryRequestComponentInner(element); + close(); + } + } + + protected void composeBundleBundleEntryRequestComponentInner(Bundle.BundleEntryRequestComponent element) throws IOException { + composeBackbone(element); + if (element.hasMethodElement()) { + composeEnumerationCore("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory(), false); + composeEnumerationExtras("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIfNoneMatchElement()) { + composeStringCore("ifNoneMatch", element.getIfNoneMatchElement(), false); + composeStringExtras("ifNoneMatch", element.getIfNoneMatchElement(), false); + } + if (element.hasIfModifiedSinceElement()) { + composeInstantCore("ifModifiedSince", element.getIfModifiedSinceElement(), false); + composeInstantExtras("ifModifiedSince", element.getIfModifiedSinceElement(), false); + } + if (element.hasIfMatchElement()) { + composeStringCore("ifMatch", element.getIfMatchElement(), false); + composeStringExtras("ifMatch", element.getIfMatchElement(), false); + } + if (element.hasIfNoneExistElement()) { + composeStringCore("ifNoneExist", element.getIfNoneExistElement(), false); + composeStringExtras("ifNoneExist", element.getIfNoneExistElement(), false); + } + } + + protected void composeBundleBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element) throws IOException { + if (element != null) { + open(name); + composeBundleBundleEntryResponseComponentInner(element); + close(); + } + } + + protected void composeBundleBundleEntryResponseComponentInner(Bundle.BundleEntryResponseComponent element) throws IOException { + composeBackbone(element); + if (element.hasStatusElement()) { + composeStringCore("status", element.getStatusElement(), false); + composeStringExtras("status", element.getStatusElement(), false); + } + if (element.hasLocationElement()) { + composeUriCore("location", element.getLocationElement(), false); + composeUriExtras("location", element.getLocationElement(), false); + } + if (element.hasEtagElement()) { + composeStringCore("etag", element.getEtagElement(), false); + composeStringExtras("etag", element.getEtagElement(), false); + } + if (element.hasLastModifiedElement()) { + composeInstantCore("lastModified", element.getLastModifiedElement(), false); + composeInstantExtras("lastModified", element.getLastModifiedElement(), false); + } + if (element.hasOutcome()) { + open("outcome"); + composeResource(element.getOutcome()); + close(); + } + } + + protected void composeCapabilityStatement(String name, CapabilityStatement element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCapabilityStatementInner(element); + } + } + + protected void composeCapabilityStatementInner(CapabilityStatement element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new CapabilityStatement.CapabilityStatementKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new CapabilityStatement.CapabilityStatementKindEnumFactory(), false); + } + if (element.hasInstantiates()) { + openArray("instantiates"); + for (UriType e : element.getInstantiates()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getInstantiates())) { + openArray("_instantiates"); + for (UriType e : element.getInstantiates()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSoftware()) { + composeCapabilityStatementCapabilityStatementSoftwareComponent("software", element.getSoftware()); + } + if (element.hasImplementation()) { + composeCapabilityStatementCapabilityStatementImplementationComponent("implementation", element.getImplementation()); + } + if (element.hasFhirVersionElement()) { + composeIdCore("fhirVersion", element.getFhirVersionElement(), false); + composeIdExtras("fhirVersion", element.getFhirVersionElement(), false); + } + if (element.hasAcceptUnknownElement()) { + composeEnumerationCore("acceptUnknown", element.getAcceptUnknownElement(), new CapabilityStatement.UnknownContentCodeEnumFactory(), false); + composeEnumerationExtras("acceptUnknown", element.getAcceptUnknownElement(), new CapabilityStatement.UnknownContentCodeEnumFactory(), false); + } + if (element.hasFormat()) { + openArray("format"); + for (CodeType e : element.getFormat()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getFormat())) { + openArray("_format"); + for (CodeType e : element.getFormat()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPatchFormat()) { + openArray("patchFormat"); + for (CodeType e : element.getPatchFormat()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPatchFormat())) { + openArray("_patchFormat"); + for (CodeType e : element.getPatchFormat()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasImplementationGuide()) { + openArray("implementationGuide"); + for (UriType e : element.getImplementationGuide()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getImplementationGuide())) { + openArray("_implementationGuide"); + for (UriType e : element.getImplementationGuide()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasProfile()) { + openArray("profile"); + for (Reference e : element.getProfile()) + composeReference(null, e); + closeArray(); + }; + if (element.hasRest()) { + openArray("rest"); + for (CapabilityStatement.CapabilityStatementRestComponent e : element.getRest()) + composeCapabilityStatementCapabilityStatementRestComponent(null, e); + closeArray(); + }; + if (element.hasMessaging()) { + openArray("messaging"); + for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging()) + composeCapabilityStatementCapabilityStatementMessagingComponent(null, e); + closeArray(); + }; + if (element.hasDocument()) { + openArray("document"); + for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument()) + composeCapabilityStatementCapabilityStatementDocumentComponent(null, e); + closeArray(); + }; + } + + protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(String name, CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementSoftwareComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementSoftwareComponentInner(CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasReleaseDateElement()) { + composeDateTimeCore("releaseDate", element.getReleaseDateElement(), false); + composeDateTimeExtras("releaseDate", element.getReleaseDateElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementImplementationComponent(String name, CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementImplementationComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementImplementationComponentInner(CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestComponent(String name, CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementRestComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestComponentInner(CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { + composeBackbone(element); + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasSecurity()) { + composeCapabilityStatementCapabilityStatementRestSecurityComponent("security", element.getSecurity()); + } + if (element.hasResource()) { + openArray("resource"); + for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource()) + composeCapabilityStatementCapabilityStatementRestResourceComponent(null, e); + closeArray(); + }; + if (element.hasInteraction()) { + openArray("interaction"); + for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction()) + composeCapabilityStatementSystemInteractionComponent(null, e); + closeArray(); + }; + if (element.hasSearchParam()) { + openArray("searchParam"); + for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(null, e); + closeArray(); + }; + if (element.hasOperation()) { + openArray("operation"); + for (CapabilityStatement.CapabilityStatementRestOperationComponent e : element.getOperation()) + composeCapabilityStatementCapabilityStatementRestOperationComponent(null, e); + closeArray(); + }; + if (element.hasCompartment()) { + openArray("compartment"); + for (UriType e : element.getCompartment()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getCompartment())) { + openArray("_compartment"); + for (UriType e : element.getCompartment()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementRestSecurityComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityComponentInner(CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { + composeBackbone(element); + if (element.hasCorsElement()) { + composeBooleanCore("cors", element.getCorsElement(), false); + composeBooleanExtras("cors", element.getCorsElement(), false); + } + if (element.hasService()) { + openArray("service"); + for (CodeableConcept e : element.getService()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasCertificate()) { + openArray("certificate"); + for (CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent e : element.getCertificate()) + composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(null, e); + closeArray(); + }; + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentInner(CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasBlobElement()) { + composeBase64BinaryCore("blob", element.getBlobElement(), false); + composeBase64BinaryExtras("blob", element.getBlobElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(String name, CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementRestResourceComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceComponentInner(CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + if (element.hasDocumentationElement()) { + composeMarkdownCore("documentation", element.getDocumentationElement(), false); + composeMarkdownExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasInteraction()) { + openArray("interaction"); + for (CapabilityStatement.ResourceInteractionComponent e : element.getInteraction()) + composeCapabilityStatementResourceInteractionComponent(null, e); + closeArray(); + }; + if (element.hasVersioningElement()) { + composeEnumerationCore("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory(), false); + composeEnumerationExtras("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory(), false); + } + if (element.hasReadHistoryElement()) { + composeBooleanCore("readHistory", element.getReadHistoryElement(), false); + composeBooleanExtras("readHistory", element.getReadHistoryElement(), false); + } + if (element.hasUpdateCreateElement()) { + composeBooleanCore("updateCreate", element.getUpdateCreateElement(), false); + composeBooleanExtras("updateCreate", element.getUpdateCreateElement(), false); + } + if (element.hasConditionalCreateElement()) { + composeBooleanCore("conditionalCreate", element.getConditionalCreateElement(), false); + composeBooleanExtras("conditionalCreate", element.getConditionalCreateElement(), false); + } + if (element.hasConditionalReadElement()) { + composeEnumerationCore("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory(), false); + composeEnumerationExtras("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory(), false); + } + if (element.hasConditionalUpdateElement()) { + composeBooleanCore("conditionalUpdate", element.getConditionalUpdateElement(), false); + composeBooleanExtras("conditionalUpdate", element.getConditionalUpdateElement(), false); + } + if (element.hasConditionalDeleteElement()) { + composeEnumerationCore("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory(), false); + composeEnumerationExtras("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory(), false); + } + if (element.hasReferencePolicy()) { + openArray("referencePolicy"); + for (Enumeration e : element.getReferencePolicy()) + composeEnumerationCore(null, e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getReferencePolicy())) { + openArray("_referencePolicy"); + for (Enumeration e : element.getReferencePolicy()) + composeEnumerationExtras(null, e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory(), true); + closeArray(); + } + }; + if (element.hasSearchInclude()) { + openArray("searchInclude"); + for (StringType e : element.getSearchInclude()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSearchInclude())) { + openArray("_searchInclude"); + for (StringType e : element.getSearchInclude()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSearchRevInclude()) { + openArray("searchRevInclude"); + for (StringType e : element.getSearchRevInclude()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSearchRevInclude())) { + openArray("_searchRevInclude"); + for (StringType e : element.getSearchRevInclude()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSearchParam()) { + openArray("searchParam"); + for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(null, e); + closeArray(); + }; + } + + protected void composeCapabilityStatementResourceInteractionComponent(String name, CapabilityStatement.ResourceInteractionComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementResourceInteractionComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementResourceInteractionComponentInner(CapabilityStatement.ResourceInteractionComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentInner(CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDefinitionElement()) { + composeUriCore("definition", element.getDefinitionElement(), false); + composeUriExtras("definition", element.getDefinitionElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeCapabilityStatementSystemInteractionComponent(String name, CapabilityStatement.SystemInteractionComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementSystemInteractionComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementSystemInteractionComponentInner(CapabilityStatement.SystemInteractionComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestOperationComponent(String name, CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementRestOperationComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestOperationComponentInner(CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingComponent(String name, CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementMessagingComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingComponentInner(CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { + composeBackbone(element); + if (element.hasEndpoint()) { + openArray("endpoint"); + for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint()) + composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(null, e); + closeArray(); + }; + if (element.hasReliableCacheElement()) { + composeUnsignedIntCore("reliableCache", element.getReliableCacheElement(), false); + composeUnsignedIntExtras("reliableCache", element.getReliableCacheElement(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasSupportedMessage()) { + openArray("supportedMessage"); + for (CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent e : element.getSupportedMessage()) + composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(null, e); + closeArray(); + }; + if (element.hasEvent()) { + openArray("event"); + for (CapabilityStatement.CapabilityStatementMessagingEventComponent e : element.getEvent()) + composeCapabilityStatementCapabilityStatementMessagingEventComponent(null, e); + closeArray(); + }; + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementMessagingEndpointComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponentInner(CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { + composeBackbone(element); + if (element.hasProtocol()) { + composeCoding("protocol", element.getProtocol()); + } + if (element.hasAddressElement()) { + composeUriCore("address", element.getAddressElement(), false); + composeUriExtras("address", element.getAddressElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentInner(CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { + composeBackbone(element); + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); + } + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEventComponent(String name, CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementMessagingEventComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEventComponentInner(CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCoding("code", element.getCode()); + } + if (element.hasCategoryElement()) { + composeEnumerationCore("category", element.getCategoryElement(), new CapabilityStatement.MessageSignificanceCategoryEnumFactory(), false); + composeEnumerationExtras("category", element.getCategoryElement(), new CapabilityStatement.MessageSignificanceCategoryEnumFactory(), false); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory(), false); + } + if (element.hasFocusElement()) { + composeCodeCore("focus", element.getFocusElement(), false); + composeCodeExtras("focus", element.getFocusElement(), false); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeCapabilityStatementCapabilityStatementDocumentComponent(String name, CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { + if (element != null) { + open(name); + composeCapabilityStatementCapabilityStatementDocumentComponentInner(element); + close(); + } + } + + protected void composeCapabilityStatementCapabilityStatementDocumentComponentInner(CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { + composeBackbone(element); + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + } + + protected void composeCarePlan(String name, CarePlan element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCarePlanInner(element); + } + } + + protected void composeCarePlanInner(CarePlan element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReplaces()) { + openArray("replaces"); + for (Reference e : element.getReplaces()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory(), false); + } + if (element.hasIntentElement()) { + composeEnumerationCore("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory(), false); + composeEnumerationExtras("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasAuthor()) { + openArray("author"); + for (Reference e : element.getAuthor()) + composeReference(null, e); + closeArray(); + }; + if (element.hasCareTeam()) { + openArray("careTeam"); + for (Reference e : element.getCareTeam()) + composeReference(null, e); + closeArray(); + }; + if (element.hasAddresses()) { + openArray("addresses"); + for (Reference e : element.getAddresses()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSupportingInfo()) { + openArray("supportingInfo"); + for (Reference e : element.getSupportingInfo()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGoal()) { + openArray("goal"); + for (Reference e : element.getGoal()) + composeReference(null, e); + closeArray(); + }; + if (element.hasActivity()) { + openArray("activity"); + for (CarePlan.CarePlanActivityComponent e : element.getActivity()) + composeCarePlanCarePlanActivityComponent(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeCarePlanCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element) throws IOException { + if (element != null) { + open(name); + composeCarePlanCarePlanActivityComponentInner(element); + close(); + } + } + + protected void composeCarePlanCarePlanActivityComponentInner(CarePlan.CarePlanActivityComponent element) throws IOException { + composeBackbone(element); + if (element.hasOutcomeCodeableConcept()) { + openArray("outcomeCodeableConcept"); + for (CodeableConcept e : element.getOutcomeCodeableConcept()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasOutcomeReference()) { + openArray("outcomeReference"); + for (Reference e : element.getOutcomeReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasProgress()) { + openArray("progress"); + for (Annotation e : element.getProgress()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + if (element.hasDetail()) { + composeCarePlanCarePlanActivityDetailComponent("detail", element.getDetail()); + } + } + + protected void composeCarePlanCarePlanActivityDetailComponent(String name, CarePlan.CarePlanActivityDetailComponent element) throws IOException { + if (element != null) { + open(name); + composeCarePlanCarePlanActivityDetailComponentInner(element); + close(); + } + } + + protected void composeCarePlanCarePlanActivityDetailComponentInner(CarePlan.CarePlanActivityDetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new CarePlan.CarePlanActivityKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new CarePlan.CarePlanActivityKindEnumFactory(), false); + } + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGoal()) { + openArray("goal"); + for (Reference e : element.getGoal()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory(), false); + } + if (element.hasStatusReasonElement()) { + composeStringCore("statusReason", element.getStatusReasonElement(), false); + composeStringExtras("statusReason", element.getStatusReasonElement(), false); + } + if (element.hasProhibitedElement()) { + composeBooleanCore("prohibited", element.getProhibitedElement(), false); + composeBooleanExtras("prohibited", element.getProhibitedElement(), false); + } + if (element.hasScheduled()) { + composeType("scheduled", element.getScheduled()); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasPerformer()) { + openArray("performer"); + for (Reference e : element.getPerformer()) + composeReference(null, e); + closeArray(); + }; + if (element.hasProduct()) { + composeType("product", element.getProduct()); + } + if (element.hasDailyAmount()) { + composeSimpleQuantity("dailyAmount", element.getDailyAmount()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + } + + protected void composeCareTeam(String name, CareTeam element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCareTeamInner(element); + } + } + + protected void composeCareTeamInner(CareTeam element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasParticipant()) { + openArray("participant"); + for (CareTeam.CareTeamParticipantComponent e : element.getParticipant()) + composeCareTeamCareTeamParticipantComponent(null, e); + closeArray(); + }; + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasManagingOrganization()) { + openArray("managingOrganization"); + for (Reference e : element.getManagingOrganization()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeCareTeamCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composeCareTeamCareTeamParticipantComponentInner(element); + close(); + } + } + + protected void composeCareTeamCareTeamParticipantComponentInner(CareTeam.CareTeamParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasMember()) { + composeReference("member", element.getMember()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeCatalogEntry(String name, CatalogEntry element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCatalogEntryInner(element); + } + } + + protected void composeCatalogEntryInner(CatalogEntry element) throws IOException { + composeDomainResourceElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasPurpose()) { + composeCodeableConcept("purpose", element.getPurpose()); + } + if (element.hasReferencedItem()) { + composeReference("referencedItem", element.getReferencedItem()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasAdditionalIdentifier()) { + openArray("additionalIdentifier"); + for (Identifier e : element.getAdditionalIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasClassification()) { + openArray("classification"); + for (Identifier e : element.getClassification()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatus()) { + composeCodeableConcept("status", element.getStatus()); + } + if (element.hasValidityPeriod()) { + composePeriod("validityPeriod", element.getValidityPeriod()); + } + if (element.hasLastUpdatedElement()) { + composeDateTimeCore("lastUpdated", element.getLastUpdatedElement(), false); + composeDateTimeExtras("lastUpdated", element.getLastUpdatedElement(), false); + } + if (element.hasAdditionalCharacteristic()) { + openArray("additionalCharacteristic"); + for (CodeableConcept e : element.getAdditionalCharacteristic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasAdditionalClassification()) { + openArray("additionalClassification"); + for (CodeableConcept e : element.getAdditionalClassification()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasRelatedItem()) { + openArray("relatedItem"); + for (CatalogEntry.CatalogEntryRelatedItemComponent e : element.getRelatedItem()) + composeCatalogEntryCatalogEntryRelatedItemComponent(null, e); + closeArray(); + }; + } + + protected void composeCatalogEntryCatalogEntryRelatedItemComponent(String name, CatalogEntry.CatalogEntryRelatedItemComponent element) throws IOException { + if (element != null) { + open(name); + composeCatalogEntryCatalogEntryRelatedItemComponentInner(element); + close(); + } + } + + protected void composeCatalogEntryCatalogEntryRelatedItemComponentInner(CatalogEntry.CatalogEntryRelatedItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasRelationtype()) { + composeCodeableConcept("relationtype", element.getRelationtype()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasItem()) { + composeReference("item", element.getItem()); + } + } + + protected void composeChargeItem(String name, ChargeItem element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeChargeItemInner(element); + } + } + + protected void composeChargeItemInner(ChargeItem element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasDefinition()) { + openArray("definition"); + for (UriType e : element.getDefinition()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getDefinition())) { + openArray("_definition"); + for (UriType e : element.getDefinition()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory(), false); + } + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasParticipant()) { + openArray("participant"); + for (ChargeItem.ChargeItemParticipantComponent e : element.getParticipant()) + composeChargeItemChargeItemParticipantComponent(null, e); + closeArray(); + }; + if (element.hasPerformingOrganization()) { + composeReference("performingOrganization", element.getPerformingOrganization()); + } + if (element.hasRequestingOrganization()) { + composeReference("requestingOrganization", element.getRequestingOrganization()); + } + if (element.hasQuantity()) { + composeQuantity("quantity", element.getQuantity()); + } + if (element.hasBodysite()) { + openArray("bodysite"); + for (CodeableConcept e : element.getBodysite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasFactorOverrideElement()) { + composeDecimalCore("factorOverride", element.getFactorOverrideElement(), false); + composeDecimalExtras("factorOverride", element.getFactorOverrideElement(), false); + } + if (element.hasPriceOverride()) { + composeMoney("priceOverride", element.getPriceOverride()); + } + if (element.hasOverrideReasonElement()) { + composeStringCore("overrideReason", element.getOverrideReasonElement(), false); + composeStringExtras("overrideReason", element.getOverrideReasonElement(), false); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasEnteredDateElement()) { + composeDateTimeCore("enteredDate", element.getEnteredDateElement(), false); + composeDateTimeExtras("enteredDate", element.getEnteredDateElement(), false); + } + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasService()) { + openArray("service"); + for (Reference e : element.getService()) + composeReference(null, e); + closeArray(); + }; + if (element.hasAccount()) { + openArray("account"); + for (Reference e : element.getAccount()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasSupportingInformation()) { + openArray("supportingInformation"); + for (Reference e : element.getSupportingInformation()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeChargeItemChargeItemParticipantComponent(String name, ChargeItem.ChargeItemParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composeChargeItemChargeItemParticipantComponentInner(element); + close(); + } + } + + protected void composeChargeItemChargeItemParticipantComponentInner(ChargeItem.ChargeItemParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + } + + protected void composeClaim(String name, Claim element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeClaimInner(element); + } + } + + protected void composeClaimInner(Claim element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + openArray("subType"); + for (CodeableConcept e : element.getSubType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new Claim.UseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new Claim.UseEnumFactory(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasBillablePeriod()) { + composePeriod("billablePeriod", element.getBillablePeriod()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasFundsReserve()) { + composeCodeableConcept("fundsReserve", element.getFundsReserve()); + } + if (element.hasRelated()) { + openArray("related"); + for (Claim.RelatedClaimComponent e : element.getRelated()) + composeClaimRelatedClaimComponent(null, e); + closeArray(); + }; + if (element.hasPrescription()) { + composeReference("prescription", element.getPrescription()); + } + if (element.hasOriginalPrescription()) { + composeReference("originalPrescription", element.getOriginalPrescription()); + } + if (element.hasPayee()) { + composeClaimPayeeComponent("payee", element.getPayee()); + } + if (element.hasReferral()) { + composeReference("referral", element.getReferral()); + } + if (element.hasFacility()) { + composeReference("facility", element.getFacility()); + } + if (element.hasCareTeam()) { + openArray("careTeam"); + for (Claim.CareTeamComponent e : element.getCareTeam()) + composeClaimCareTeamComponent(null, e); + closeArray(); + }; + if (element.hasInformation()) { + openArray("information"); + for (Claim.SpecialConditionComponent e : element.getInformation()) + composeClaimSpecialConditionComponent(null, e); + closeArray(); + }; + if (element.hasDiagnosis()) { + openArray("diagnosis"); + for (Claim.DiagnosisComponent e : element.getDiagnosis()) + composeClaimDiagnosisComponent(null, e); + closeArray(); + }; + if (element.hasProcedure()) { + openArray("procedure"); + for (Claim.ProcedureComponent e : element.getProcedure()) + composeClaimProcedureComponent(null, e); + closeArray(); + }; + if (element.hasInsurance()) { + openArray("insurance"); + for (Claim.InsuranceComponent e : element.getInsurance()) + composeClaimInsuranceComponent(null, e); + closeArray(); + }; + if (element.hasAccident()) { + composeClaimAccidentComponent("accident", element.getAccident()); + } + if (element.hasEmploymentImpacted()) { + composePeriod("employmentImpacted", element.getEmploymentImpacted()); + } + if (element.hasHospitalization()) { + composePeriod("hospitalization", element.getHospitalization()); + } + if (element.hasItem()) { + openArray("item"); + for (Claim.ItemComponent e : element.getItem()) + composeClaimItemComponent(null, e); + closeArray(); + }; + if (element.hasTotal()) { + composeMoney("total", element.getTotal()); + } + } + + protected void composeClaimRelatedClaimComponent(String name, Claim.RelatedClaimComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimRelatedClaimComponentInner(element); + close(); + } + } + + protected void composeClaimRelatedClaimComponentInner(Claim.RelatedClaimComponent element) throws IOException { + composeBackbone(element); + if (element.hasClaim()) { + composeReference("claim", element.getClaim()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasReference()) { + composeIdentifier("reference", element.getReference()); + } + } + + protected void composeClaimPayeeComponent(String name, Claim.PayeeComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimPayeeComponentInner(element); + close(); + } + } + + protected void composeClaimPayeeComponentInner(Claim.PayeeComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasResource()) { + composeCoding("resource", element.getResource()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + } + + protected void composeClaimCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimCareTeamComponentInner(element); + close(); + } + } + + protected void composeClaimCareTeamComponentInner(Claim.CareTeamComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasResponsibleElement()) { + composeBooleanCore("responsible", element.getResponsibleElement(), false); + composeBooleanExtras("responsible", element.getResponsibleElement(), false); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasQualification()) { + composeCodeableConcept("qualification", element.getQualification()); + } + } + + protected void composeClaimSpecialConditionComponent(String name, Claim.SpecialConditionComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimSpecialConditionComponentInner(element); + close(); + } + } + + protected void composeClaimSpecialConditionComponentInner(Claim.SpecialConditionComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + } + + protected void composeClaimDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimDiagnosisComponentInner(element); + close(); + } + } + + protected void composeClaimDiagnosisComponentInner(Claim.DiagnosisComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasDiagnosis()) { + composeType("diagnosis", element.getDiagnosis()); + } + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPackageCode()) { + composeCodeableConcept("packageCode", element.getPackageCode()); + } + } + + protected void composeClaimProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimProcedureComponentInner(element); + close(); + } + } + + protected void composeClaimProcedureComponentInner(Claim.ProcedureComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasProcedure()) { + composeType("procedure", element.getProcedure()); + } + } + + protected void composeClaimInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimInsuranceComponentInner(element); + close(); + } + } + + protected void composeClaimInsuranceComponentInner(Claim.InsuranceComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasFocalElement()) { + composeBooleanCore("focal", element.getFocalElement(), false); + composeBooleanExtras("focal", element.getFocalElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasBusinessArrangementElement()) { + composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false); + composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false); + } + if (element.hasPreAuthRef()) { + openArray("preAuthRef"); + for (StringType e : element.getPreAuthRef()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPreAuthRef())) { + openArray("_preAuthRef"); + for (StringType e : element.getPreAuthRef()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasClaimResponse()) { + composeReference("claimResponse", element.getClaimResponse()); + } + } + + protected void composeClaimAccidentComponent(String name, Claim.AccidentComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimAccidentComponentInner(element); + close(); + } + } + + protected void composeClaimAccidentComponentInner(Claim.AccidentComponent element) throws IOException { + composeBackbone(element); + if (element.hasDateElement()) { + composeDateCore("date", element.getDateElement(), false); + composeDateExtras("date", element.getDateElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLocation()) { + composeType("location", element.getLocation()); + } + } + + protected void composeClaimItemComponent(String name, Claim.ItemComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimItemComponentInner(element); + close(); + } + } + + protected void composeClaimItemComponentInner(Claim.ItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasCareTeamLinkId()) { + openArray("careTeamLinkId"); + for (PositiveIntType e : element.getCareTeamLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getCareTeamLinkId())) { + openArray("_careTeamLinkId"); + for (PositiveIntType e : element.getCareTeamLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDiagnosisLinkId()) { + openArray("diagnosisLinkId"); + for (PositiveIntType e : element.getDiagnosisLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getDiagnosisLinkId())) { + openArray("_diagnosisLinkId"); + for (PositiveIntType e : element.getDiagnosisLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasProcedureLinkId()) { + openArray("procedureLinkId"); + for (PositiveIntType e : element.getProcedureLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getProcedureLinkId())) { + openArray("_procedureLinkId"); + for (PositiveIntType e : element.getProcedureLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasInformationLinkId()) { + openArray("informationLinkId"); + for (PositiveIntType e : element.getInformationLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getInformationLinkId())) { + openArray("_informationLinkId"); + for (PositiveIntType e : element.getInformationLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasProgramCode()) { + openArray("programCode"); + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasServiced()) { + composeType("serviced", element.getServiced()); + } + if (element.hasLocation()) { + composeType("location", element.getLocation()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + openArray("udi"); + for (Reference e : element.getUdi()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasSubSite()) { + openArray("subSite"); + for (CodeableConcept e : element.getSubSite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasEncounter()) { + openArray("encounter"); + for (Reference e : element.getEncounter()) + composeReference(null, e); + closeArray(); + }; + if (element.hasDetail()) { + openArray("detail"); + for (Claim.DetailComponent e : element.getDetail()) + composeClaimDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimDetailComponent(String name, Claim.DetailComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimDetailComponentInner(element); + close(); + } + } + + protected void composeClaimDetailComponentInner(Claim.DetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasProgramCode()) { + openArray("programCode"); + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + openArray("udi"); + for (Reference e : element.getUdi()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSubDetail()) { + openArray("subDetail"); + for (Claim.SubDetailComponent e : element.getSubDetail()) + composeClaimSubDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimSubDetailComponentInner(element); + close(); + } + } + + protected void composeClaimSubDetailComponentInner(Claim.SubDetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasProgramCode()) { + openArray("programCode"); + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + openArray("udi"); + for (Reference e : element.getUdi()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeClaimResponse(String name, ClaimResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeClaimResponseInner(element); + } + } + + protected void composeClaimResponseInner(ClaimResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new ClaimResponse.RemittanceOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new ClaimResponse.RemittanceOutcomeEnumFactory(), false); + } + if (element.hasDispositionElement()) { + composeStringCore("disposition", element.getDispositionElement(), false); + composeStringExtras("disposition", element.getDispositionElement(), false); + } + if (element.hasPayeeType()) { + composeCodeableConcept("payeeType", element.getPayeeType()); + } + if (element.hasItem()) { + openArray("item"); + for (ClaimResponse.ItemComponent e : element.getItem()) + composeClaimResponseItemComponent(null, e); + closeArray(); + }; + if (element.hasAddItem()) { + openArray("addItem"); + for (ClaimResponse.AddedItemComponent e : element.getAddItem()) + composeClaimResponseAddedItemComponent(null, e); + closeArray(); + }; + if (element.hasError()) { + openArray("error"); + for (ClaimResponse.ErrorComponent e : element.getError()) + composeClaimResponseErrorComponent(null, e); + closeArray(); + }; + if (element.hasTotalCost()) { + composeMoney("totalCost", element.getTotalCost()); + } + if (element.hasUnallocDeductable()) { + composeMoney("unallocDeductable", element.getUnallocDeductable()); + } + if (element.hasTotalBenefit()) { + composeMoney("totalBenefit", element.getTotalBenefit()); + } + if (element.hasPayment()) { + composeClaimResponsePaymentComponent("payment", element.getPayment()); + } + if (element.hasReserved()) { + composeCoding("reserved", element.getReserved()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasProcessNote()) { + openArray("processNote"); + for (ClaimResponse.NoteComponent e : element.getProcessNote()) + composeClaimResponseNoteComponent(null, e); + closeArray(); + }; + if (element.hasCommunicationRequest()) { + openArray("communicationRequest"); + for (Reference e : element.getCommunicationRequest()) + composeReference(null, e); + closeArray(); + }; + if (element.hasInsurance()) { + openArray("insurance"); + for (ClaimResponse.InsuranceComponent e : element.getInsurance()) + composeClaimResponseInsuranceComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimResponseItemComponent(String name, ClaimResponse.ItemComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseItemComponentInner(element); + close(); + } + } + + protected void composeClaimResponseItemComponentInner(ClaimResponse.ItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); + composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); + } + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent(null, e); + closeArray(); + }; + if (element.hasDetail()) { + openArray("detail"); + for (ClaimResponse.ItemDetailComponent e : element.getDetail()) + composeClaimResponseItemDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimResponseAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseAdjudicationComponentInner(element); + close(); + } + } + + protected void composeClaimResponseAdjudicationComponentInner(ClaimResponse.AdjudicationComponent element) throws IOException { + composeBackbone(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasValueElement()) { + composeDecimalCore("value", element.getValueElement(), false); + composeDecimalExtras("value", element.getValueElement(), false); + } + } + + protected void composeClaimResponseItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseItemDetailComponentInner(element); + close(); + } + } + + protected void composeClaimResponseItemDetailComponentInner(ClaimResponse.ItemDetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); + composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); + } + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent(null, e); + closeArray(); + }; + if (element.hasSubDetail()) { + openArray("subDetail"); + for (ClaimResponse.SubDetailComponent e : element.getSubDetail()) + composeClaimResponseSubDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimResponseSubDetailComponent(String name, ClaimResponse.SubDetailComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseSubDetailComponentInner(element); + close(); + } + } + + protected void composeClaimResponseSubDetailComponentInner(ClaimResponse.SubDetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); + composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); + } + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimResponseAddedItemComponent(String name, ClaimResponse.AddedItemComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseAddedItemComponentInner(element); + close(); + } + } + + protected void composeClaimResponseAddedItemComponentInner(ClaimResponse.AddedItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkId()) { + openArray("sequenceLinkId"); + for (PositiveIntType e : element.getSequenceLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSequenceLinkId())) { + openArray("_sequenceLinkId"); + for (PositiveIntType e : element.getSequenceLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDetailSequenceLinkId()) { + openArray("detailSequenceLinkId"); + for (PositiveIntType e : element.getDetailSequenceLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getDetailSequenceLinkId())) { + openArray("_detailSequenceLinkId"); + for (PositiveIntType e : element.getDetailSequenceLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSubdetailSequenceLinkId()) { + openArray("subdetailSequenceLinkId"); + for (PositiveIntType e : element.getSubdetailSequenceLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSubdetailSequenceLinkId())) { + openArray("_subdetailSequenceLinkId"); + for (PositiveIntType e : element.getSubdetailSequenceLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasFee()) { + composeMoney("fee", element.getFee()); + } + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent(null, e); + closeArray(); + }; + } + + protected void composeClaimResponseErrorComponent(String name, ClaimResponse.ErrorComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseErrorComponentInner(element); + close(); + } + } + + protected void composeClaimResponseErrorComponentInner(ClaimResponse.ErrorComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveIntCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); + composePositiveIntExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); + } + if (element.hasDetailSequenceLinkIdElement()) { + composePositiveIntCore("detailSequenceLinkId", element.getDetailSequenceLinkIdElement(), false); + composePositiveIntExtras("detailSequenceLinkId", element.getDetailSequenceLinkIdElement(), false); + } + if (element.hasSubdetailSequenceLinkIdElement()) { + composePositiveIntCore("subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement(), false); + composePositiveIntExtras("subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + } + + protected void composeClaimResponsePaymentComponent(String name, ClaimResponse.PaymentComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponsePaymentComponentInner(element); + close(); + } + } + + protected void composeClaimResponsePaymentComponentInner(ClaimResponse.PaymentComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAdjustment()) { + composeMoney("adjustment", element.getAdjustment()); + } + if (element.hasAdjustmentReason()) { + composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); + } + if (element.hasDateElement()) { + composeDateCore("date", element.getDateElement(), false); + composeDateExtras("date", element.getDateElement(), false); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + } + + protected void composeClaimResponseNoteComponent(String name, ClaimResponse.NoteComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseNoteComponentInner(element); + close(); + } + } + + protected void composeClaimResponseNoteComponentInner(ClaimResponse.NoteComponent element) throws IOException { + composeBackbone(element); + if (element.hasNumberElement()) { + composePositiveIntCore("number", element.getNumberElement(), false); + composePositiveIntExtras("number", element.getNumberElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasLanguage()) { + composeCodeableConcept("language", element.getLanguage()); + } + } + + protected void composeClaimResponseInsuranceComponent(String name, ClaimResponse.InsuranceComponent element) throws IOException { + if (element != null) { + open(name); + composeClaimResponseInsuranceComponentInner(element); + close(); + } + } + + protected void composeClaimResponseInsuranceComponentInner(ClaimResponse.InsuranceComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasFocalElement()) { + composeBooleanCore("focal", element.getFocalElement(), false); + composeBooleanExtras("focal", element.getFocalElement(), false); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasBusinessArrangementElement()) { + composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false); + composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false); + } + if (element.hasPreAuthRef()) { + openArray("preAuthRef"); + for (StringType e : element.getPreAuthRef()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPreAuthRef())) { + openArray("_preAuthRef"); + for (StringType e : element.getPreAuthRef()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasClaimResponse()) { + composeReference("claimResponse", element.getClaimResponse()); + } + } + + protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeClinicalImpressionInner(element); + } + } + + protected void composeClinicalImpressionInner(ClinicalImpression element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ClinicalImpression.ClinicalImpressionStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ClinicalImpression.ClinicalImpressionStatusEnumFactory(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasAssessor()) { + composeReference("assessor", element.getAssessor()); + } + if (element.hasPrevious()) { + composeReference("previous", element.getPrevious()); + } + if (element.hasProblem()) { + openArray("problem"); + for (Reference e : element.getProblem()) + composeReference(null, e); + closeArray(); + }; + if (element.hasInvestigation()) { + openArray("investigation"); + for (ClinicalImpression.ClinicalImpressionInvestigationComponent e : element.getInvestigation()) + composeClinicalImpressionClinicalImpressionInvestigationComponent(null, e); + closeArray(); + }; + if (element.hasProtocol()) { + openArray("protocol"); + for (UriType e : element.getProtocol()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getProtocol())) { + openArray("_protocol"); + for (UriType e : element.getProtocol()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSummaryElement()) { + composeStringCore("summary", element.getSummaryElement(), false); + composeStringExtras("summary", element.getSummaryElement(), false); + } + if (element.hasFinding()) { + openArray("finding"); + for (ClinicalImpression.ClinicalImpressionFindingComponent e : element.getFinding()) + composeClinicalImpressionClinicalImpressionFindingComponent(null, e); + closeArray(); + }; + if (element.hasPrognosisCodeableConcept()) { + openArray("prognosisCodeableConcept"); + for (CodeableConcept e : element.getPrognosisCodeableConcept()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPrognosisReference()) { + openArray("prognosisReference"); + for (Reference e : element.getPrognosisReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasAction()) { + openArray("action"); + for (Reference e : element.getAction()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(String name, ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { + if (element != null) { + open(name); + composeClinicalImpressionClinicalImpressionInvestigationComponentInner(element); + close(); + } + } + + protected void composeClinicalImpressionClinicalImpressionInvestigationComponentInner(ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasItem()) { + openArray("item"); + for (Reference e : element.getItem()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeClinicalImpressionClinicalImpressionFindingComponent(String name, ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { + if (element != null) { + open(name); + composeClinicalImpressionClinicalImpressionFindingComponentInner(element); + close(); + } + } + + protected void composeClinicalImpressionClinicalImpressionFindingComponentInner(ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { + composeBackbone(element); + if (element.hasItem()) { + composeType("item", element.getItem()); + } + if (element.hasBasisElement()) { + composeStringCore("basis", element.getBasisElement(), false); + composeStringExtras("basis", element.getBasisElement(), false); + } + } + + protected void composeCodeSystem(String name, CodeSystem element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCodeSystemInner(element); + } + } + + protected void composeCodeSystemInner(CodeSystem element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasCaseSensitiveElement()) { + composeBooleanCore("caseSensitive", element.getCaseSensitiveElement(), false); + composeBooleanExtras("caseSensitive", element.getCaseSensitiveElement(), false); + } + if (element.hasValueSetElement()) { + composeUriCore("valueSet", element.getValueSetElement(), false); + composeUriExtras("valueSet", element.getValueSetElement(), false); + } + if (element.hasHierarchyMeaningElement()) { + composeEnumerationCore("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory(), false); + composeEnumerationExtras("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory(), false); + } + if (element.hasCompositionalElement()) { + composeBooleanCore("compositional", element.getCompositionalElement(), false); + composeBooleanExtras("compositional", element.getCompositionalElement(), false); + } + if (element.hasVersionNeededElement()) { + composeBooleanCore("versionNeeded", element.getVersionNeededElement(), false); + composeBooleanExtras("versionNeeded", element.getVersionNeededElement(), false); + } + if (element.hasContentElement()) { + composeEnumerationCore("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory(), false); + composeEnumerationExtras("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory(), false); + } + if (element.hasCountElement()) { + composeUnsignedIntCore("count", element.getCountElement(), false); + composeUnsignedIntExtras("count", element.getCountElement(), false); + } + if (element.hasFilter()) { + openArray("filter"); + for (CodeSystem.CodeSystemFilterComponent e : element.getFilter()) + composeCodeSystemCodeSystemFilterComponent(null, e); + closeArray(); + }; + if (element.hasProperty()) { + openArray("property"); + for (CodeSystem.PropertyComponent e : element.getProperty()) + composeCodeSystemPropertyComponent(null, e); + closeArray(); + }; + if (element.hasConcept()) { + openArray("concept"); + for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) + composeCodeSystemConceptDefinitionComponent(null, e); + closeArray(); + }; + } + + protected void composeCodeSystemCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element) throws IOException { + if (element != null) { + open(name); + composeCodeSystemCodeSystemFilterComponentInner(element); + close(); + } + } + + protected void composeCodeSystemCodeSystemFilterComponentInner(CodeSystem.CodeSystemFilterComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasOperator()) { + openArray("operator"); + for (Enumeration e : element.getOperator()) + composeEnumerationCore(null, e, new CodeSystem.FilterOperatorEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getOperator())) { + openArray("_operator"); + for (Enumeration e : element.getOperator()) + composeEnumerationExtras(null, e, new CodeSystem.FilterOperatorEnumFactory(), true); + closeArray(); + } + }; + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeCodeSystemPropertyComponent(String name, CodeSystem.PropertyComponent element) throws IOException { + if (element != null) { + open(name); + composeCodeSystemPropertyComponentInner(element); + close(); + } + } + + protected void composeCodeSystemPropertyComponentInner(CodeSystem.PropertyComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasUriElement()) { + composeUriCore("uri", element.getUriElement(), false); + composeUriExtras("uri", element.getUriElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory(), false); + } + } + + protected void composeCodeSystemConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element) throws IOException { + if (element != null) { + open(name); + composeCodeSystemConceptDefinitionComponentInner(element); + close(); + } + } + + protected void composeCodeSystemConceptDefinitionComponentInner(CodeSystem.ConceptDefinitionComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasDefinitionElement()) { + composeStringCore("definition", element.getDefinitionElement(), false); + composeStringExtras("definition", element.getDefinitionElement(), false); + } + if (element.hasDesignation()) { + openArray("designation"); + for (CodeSystem.ConceptDefinitionDesignationComponent e : element.getDesignation()) + composeCodeSystemConceptDefinitionDesignationComponent(null, e); + closeArray(); + }; + if (element.hasProperty()) { + openArray("property"); + for (CodeSystem.ConceptPropertyComponent e : element.getProperty()) + composeCodeSystemConceptPropertyComponent(null, e); + closeArray(); + }; + if (element.hasConcept()) { + openArray("concept"); + for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) + composeCodeSystemConceptDefinitionComponent(null, e); + closeArray(); + }; + } + + protected void composeCodeSystemConceptDefinitionDesignationComponent(String name, CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { + if (element != null) { + open(name); + composeCodeSystemConceptDefinitionDesignationComponentInner(element); + close(); + } + } + + protected void composeCodeSystemConceptDefinitionDesignationComponentInner(CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { + composeBackbone(element); + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeCodeSystemConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element) throws IOException { + if (element != null) { + open(name); + composeCodeSystemConceptPropertyComponentInner(element); + close(); + } + } + + protected void composeCodeSystemConceptPropertyComponentInner(CodeSystem.ConceptPropertyComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeCommunication(String name, Communication element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCommunicationInner(element); + } + } + + protected void composeCommunicationInner(Communication element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasInResponseTo()) { + openArray("inResponseTo"); + for (Reference e : element.getInResponseTo()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory(), false); + } + if (element.hasNotDoneElement()) { + composeBooleanCore("notDone", element.getNotDoneElement(), false); + composeBooleanExtras("notDone", element.getNotDoneElement(), false); + } + if (element.hasNotDoneReason()) { + composeCodeableConcept("notDoneReason", element.getNotDoneReason()); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new Communication.CommunicationPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new Communication.CommunicationPriorityEnumFactory(), false); + } + if (element.hasMedium()) { + openArray("medium"); + for (CodeableConcept e : element.getMedium()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasRecipient()) { + openArray("recipient"); + for (Reference e : element.getRecipient()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (Reference e : element.getTopic()) + composeReference(null, e); + closeArray(); + }; + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSentElement()) { + composeDateTimeCore("sent", element.getSentElement(), false); + composeDateTimeExtras("sent", element.getSentElement(), false); + } + if (element.hasReceivedElement()) { + composeDateTimeCore("received", element.getReceivedElement(), false); + composeDateTimeExtras("received", element.getReceivedElement(), false); + } + if (element.hasSender()) { + composeReference("sender", element.getSender()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPayload()) { + openArray("payload"); + for (Communication.CommunicationPayloadComponent e : element.getPayload()) + composeCommunicationCommunicationPayloadComponent(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeCommunicationCommunicationPayloadComponent(String name, Communication.CommunicationPayloadComponent element) throws IOException { + if (element != null) { + open(name); + composeCommunicationCommunicationPayloadComponentInner(element); + close(); + } + } + + protected void composeCommunicationCommunicationPayloadComponentInner(Communication.CommunicationPayloadComponent element) throws IOException { + composeBackbone(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } + } + + protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCommunicationRequestInner(element); + } + } + + protected void composeCommunicationRequestInner(CommunicationRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReplaces()) { + openArray("replaces"); + for (Reference e : element.getReplaces()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new CommunicationRequest.CommunicationRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new CommunicationRequest.CommunicationRequestStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new CommunicationRequest.CommunicationPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new CommunicationRequest.CommunicationPriorityEnumFactory(), false); + } + if (element.hasMedium()) { + openArray("medium"); + for (CodeableConcept e : element.getMedium()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasRecipient()) { + openArray("recipient"); + for (Reference e : element.getRecipient()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (Reference e : element.getTopic()) + composeReference(null, e); + closeArray(); + }; + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPayload()) { + openArray("payload"); + for (CommunicationRequest.CommunicationRequestPayloadComponent e : element.getPayload()) + composeCommunicationRequestCommunicationRequestPayloadComponent(null, e); + closeArray(); + }; + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasSender()) { + composeReference("sender", element.getSender()); + } + if (element.hasRequester()) { + composeCommunicationRequestCommunicationRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeCommunicationRequestCommunicationRequestPayloadComponent(String name, CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { + if (element != null) { + open(name); + composeCommunicationRequestCommunicationRequestPayloadComponentInner(element); + close(); + } + } + + protected void composeCommunicationRequestCommunicationRequestPayloadComponentInner(CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { + composeBackbone(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } + } + + protected void composeCommunicationRequestCommunicationRequestRequesterComponent(String name, CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { + if (element != null) { + open(name); + composeCommunicationRequestCommunicationRequestRequesterComponentInner(element); + close(); + } + } + + protected void composeCommunicationRequestCommunicationRequestRequesterComponentInner(CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCompartmentDefinitionInner(element); + } + } + + protected void composeCompartmentDefinitionInner(CompartmentDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory(), false); + } + if (element.hasSearchElement()) { + composeBooleanCore("search", element.getSearchElement(), false); + composeBooleanExtras("search", element.getSearchElement(), false); + } + if (element.hasResource()) { + openArray("resource"); + for (CompartmentDefinition.CompartmentDefinitionResourceComponent e : element.getResource()) + composeCompartmentDefinitionCompartmentDefinitionResourceComponent(null, e); + closeArray(); + }; + } + + protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { + if (element != null) { + open(name); + composeCompartmentDefinitionCompartmentDefinitionResourceComponentInner(element); + close(); + } + } + + protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponentInner(CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasParam()) { + openArray("param"); + for (StringType e : element.getParam()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getParam())) { + openArray("_param"); + for (StringType e : element.getParam()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeComposition(String name, Composition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCompositionInner(element); + } + } + + protected void composeCompositionInner(Composition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasClass_()) { + composeCodeableConcept("class", element.getClass_()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasAuthor()) { + openArray("author"); + for (Reference e : element.getAuthor()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasConfidentialityElement()) { + composeEnumerationCore("confidentiality", element.getConfidentialityElement(), new Composition.DocumentConfidentialityEnumFactory(), false); + composeEnumerationExtras("confidentiality", element.getConfidentialityElement(), new Composition.DocumentConfidentialityEnumFactory(), false); + } + if (element.hasAttester()) { + openArray("attester"); + for (Composition.CompositionAttesterComponent e : element.getAttester()) + composeCompositionCompositionAttesterComponent(null, e); + closeArray(); + }; + if (element.hasCustodian()) { + composeReference("custodian", element.getCustodian()); + } + if (element.hasRelatesTo()) { + openArray("relatesTo"); + for (Composition.CompositionRelatesToComponent e : element.getRelatesTo()) + composeCompositionCompositionRelatesToComponent(null, e); + closeArray(); + }; + if (element.hasEvent()) { + openArray("event"); + for (Composition.CompositionEventComponent e : element.getEvent()) + composeCompositionCompositionEventComponent(null, e); + closeArray(); + }; + if (element.hasSection()) { + openArray("section"); + for (Composition.SectionComponent e : element.getSection()) + composeCompositionSectionComponent(null, e); + closeArray(); + }; + } + + protected void composeCompositionCompositionAttesterComponent(String name, Composition.CompositionAttesterComponent element) throws IOException { + if (element != null) { + open(name); + composeCompositionCompositionAttesterComponentInner(element); + close(); + } + } + + protected void composeCompositionCompositionAttesterComponentInner(Composition.CompositionAttesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasMode()) { + openArray("mode"); + for (Enumeration e : element.getMode()) + composeEnumerationCore(null, e, new Composition.CompositionAttestationModeEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getMode())) { + openArray("_mode"); + for (Enumeration e : element.getMode()) + composeEnumerationExtras(null, e, new Composition.CompositionAttestationModeEnumFactory(), true); + closeArray(); + } + }; + if (element.hasTimeElement()) { + composeDateTimeCore("time", element.getTimeElement(), false); + composeDateTimeExtras("time", element.getTimeElement(), false); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + } + + protected void composeCompositionCompositionRelatesToComponent(String name, Composition.CompositionRelatesToComponent element) throws IOException { + if (element != null) { + open(name); + composeCompositionCompositionRelatesToComponentInner(element); + close(); + } + } + + protected void composeCompositionCompositionRelatesToComponentInner(Composition.CompositionRelatesToComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory(), false); + } + if (element.hasTarget()) { + composeType("target", element.getTarget()); + } + } + + protected void composeCompositionCompositionEventComponent(String name, Composition.CompositionEventComponent element) throws IOException { + if (element != null) { + open(name); + composeCompositionCompositionEventComponentInner(element); + close(); + } + } + + protected void composeCompositionCompositionEventComponentInner(Composition.CompositionEventComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + openArray("code"); + for (CodeableConcept e : element.getCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasDetail()) { + openArray("detail"); + for (Reference e : element.getDetail()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeCompositionSectionComponent(String name, Composition.SectionComponent element) throws IOException { + if (element != null) { + open(name); + composeCompositionSectionComponentInner(element); + close(); + } + } + + protected void composeCompositionSectionComponentInner(Composition.SectionComponent element) throws IOException { + composeBackbone(element); + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasText()) { + composeNarrative("text", element.getText()); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new Composition.SectionModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new Composition.SectionModeEnumFactory(), false); + } + if (element.hasOrderedBy()) { + composeCodeableConcept("orderedBy", element.getOrderedBy()); + } + if (element.hasEntry()) { + openArray("entry"); + for (Reference e : element.getEntry()) + composeReference(null, e); + closeArray(); + }; + if (element.hasEmptyReason()) { + composeCodeableConcept("emptyReason", element.getEmptyReason()); + } + if (element.hasSection()) { + openArray("section"); + for (Composition.SectionComponent e : element.getSection()) + composeCompositionSectionComponent(null, e); + closeArray(); + }; + } + + protected void composeConceptMap(String name, ConceptMap element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeConceptMapInner(element); + } + } + + protected void composeConceptMapInner(ConceptMap element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasSource()) { + composeType("source", element.getSource()); + } + if (element.hasTarget()) { + composeType("target", element.getTarget()); + } + if (element.hasGroup()) { + openArray("group"); + for (ConceptMap.ConceptMapGroupComponent e : element.getGroup()) + composeConceptMapConceptMapGroupComponent(null, e); + closeArray(); + }; + } + + protected void composeConceptMapConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element) throws IOException { + if (element != null) { + open(name); + composeConceptMapConceptMapGroupComponentInner(element); + close(); + } + } + + protected void composeConceptMapConceptMapGroupComponentInner(ConceptMap.ConceptMapGroupComponent element) throws IOException { + composeBackbone(element); + if (element.hasSourceElement()) { + composeUriCore("source", element.getSourceElement(), false); + composeUriExtras("source", element.getSourceElement(), false); + } + if (element.hasSourceVersionElement()) { + composeStringCore("sourceVersion", element.getSourceVersionElement(), false); + composeStringExtras("sourceVersion", element.getSourceVersionElement(), false); + } + if (element.hasTargetElement()) { + composeUriCore("target", element.getTargetElement(), false); + composeUriExtras("target", element.getTargetElement(), false); + } + if (element.hasTargetVersionElement()) { + composeStringCore("targetVersion", element.getTargetVersionElement(), false); + composeStringExtras("targetVersion", element.getTargetVersionElement(), false); + } + if (element.hasElement()) { + openArray("element"); + for (ConceptMap.SourceElementComponent e : element.getElement()) + composeConceptMapSourceElementComponent(null, e); + closeArray(); + }; + if (element.hasUnmapped()) { + composeConceptMapConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped()); + } + } + + protected void composeConceptMapSourceElementComponent(String name, ConceptMap.SourceElementComponent element) throws IOException { + if (element != null) { + open(name); + composeConceptMapSourceElementComponentInner(element); + close(); + } + } + + protected void composeConceptMapSourceElementComponentInner(ConceptMap.SourceElementComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasTarget()) { + openArray("target"); + for (ConceptMap.TargetElementComponent e : element.getTarget()) + composeConceptMapTargetElementComponent(null, e); + closeArray(); + }; + } + + protected void composeConceptMapTargetElementComponent(String name, ConceptMap.TargetElementComponent element) throws IOException { + if (element != null) { + open(name); + composeConceptMapTargetElementComponentInner(element); + close(); + } + } + + protected void composeConceptMapTargetElementComponentInner(ConceptMap.TargetElementComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasEquivalenceElement()) { + composeEnumerationCore("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory(), false); + composeEnumerationExtras("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasDependsOn()) { + openArray("dependsOn"); + for (ConceptMap.OtherElementComponent e : element.getDependsOn()) + composeConceptMapOtherElementComponent(null, e); + closeArray(); + }; + if (element.hasProduct()) { + openArray("product"); + for (ConceptMap.OtherElementComponent e : element.getProduct()) + composeConceptMapOtherElementComponent(null, e); + closeArray(); + }; + } + + protected void composeConceptMapOtherElementComponent(String name, ConceptMap.OtherElementComponent element) throws IOException { + if (element != null) { + open(name); + composeConceptMapOtherElementComponentInner(element); + close(); + } + } + + protected void composeConceptMapOtherElementComponentInner(ConceptMap.OtherElementComponent element) throws IOException { + composeBackbone(element); + if (element.hasPropertyElement()) { + composeUriCore("property", element.getPropertyElement(), false); + composeUriExtras("property", element.getPropertyElement(), false); + } + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasCodeElement()) { + composeStringCore("code", element.getCodeElement(), false); + composeStringExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + } + + protected void composeConceptMapConceptMapGroupUnmappedComponent(String name, ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { + if (element != null) { + open(name); + composeConceptMapConceptMapGroupUnmappedComponentInner(element); + close(); + } + } + + protected void composeConceptMapConceptMapGroupUnmappedComponentInner(ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { + composeBackbone(element); + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + } + + protected void composeCondition(String name, Condition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeConditionInner(element); + } + } + + protected void composeConditionInner(Condition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasClinicalStatusElement()) { + composeEnumerationCore("clinicalStatus", element.getClinicalStatusElement(), new Condition.ConditionClinicalStatusEnumFactory(), false); + composeEnumerationExtras("clinicalStatus", element.getClinicalStatusElement(), new Condition.ConditionClinicalStatusEnumFactory(), false); + } + if (element.hasVerificationStatusElement()) { + composeEnumerationCore("verificationStatus", element.getVerificationStatusElement(), new Condition.ConditionVerificationStatusEnumFactory(), false); + composeEnumerationExtras("verificationStatus", element.getVerificationStatusElement(), new Condition.ConditionVerificationStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSeverity()) { + composeCodeableConcept("severity", element.getSeverity()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasBodySite()) { + openArray("bodySite"); + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOnset()) { + composeType("onset", element.getOnset()); + } + if (element.hasAbatement()) { + composeType("abatement", element.getAbatement()); + } + if (element.hasAssertedDateElement()) { + composeDateTimeCore("assertedDate", element.getAssertedDateElement(), false); + composeDateTimeExtras("assertedDate", element.getAssertedDateElement(), false); + } + if (element.hasAsserter()) { + composeReference("asserter", element.getAsserter()); + } + if (element.hasStage()) { + openArray("stage"); + for (Condition.ConditionStageComponent e : element.getStage()) + composeConditionConditionStageComponent(null, e); + closeArray(); + }; + if (element.hasEvidence()) { + openArray("evidence"); + for (Condition.ConditionEvidenceComponent e : element.getEvidence()) + composeConditionConditionEvidenceComponent(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeConditionConditionStageComponent(String name, Condition.ConditionStageComponent element) throws IOException { + if (element != null) { + open(name); + composeConditionConditionStageComponentInner(element); + close(); + } + } + + protected void composeConditionConditionStageComponentInner(Condition.ConditionStageComponent element) throws IOException { + composeBackbone(element); + if (element.hasSummary()) { + composeCodeableConcept("summary", element.getSummary()); + } + if (element.hasAssessment()) { + openArray("assessment"); + for (Reference e : element.getAssessment()) + composeReference(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + } + + protected void composeConditionConditionEvidenceComponent(String name, Condition.ConditionEvidenceComponent element) throws IOException { + if (element != null) { + open(name); + composeConditionConditionEvidenceComponentInner(element); + close(); + } + } + + protected void composeConditionConditionEvidenceComponentInner(Condition.ConditionEvidenceComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + openArray("code"); + for (CodeableConcept e : element.getCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDetail()) { + openArray("detail"); + for (Reference e : element.getDetail()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeConsent(String name, Consent element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeConsentInner(element); + } + } + + protected void composeConsentInner(Consent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateTimeElement()) { + composeDateTimeCore("dateTime", element.getDateTimeElement(), false); + composeDateTimeExtras("dateTime", element.getDateTimeElement(), false); + } + if (element.hasConsentingParty()) { + openArray("consentingParty"); + for (Reference e : element.getConsentingParty()) + composeReference(null, e); + closeArray(); + }; + if (element.hasOrganization()) { + openArray("organization"); + for (Reference e : element.getOrganization()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSource()) { + composeType("source", element.getSource()); + } + if (element.hasPolicy()) { + openArray("policy"); + for (Consent.ConsentPolicyComponent e : element.getPolicy()) + composeConsentConsentPolicyComponent(null, e); + closeArray(); + }; + if (element.hasPolicyRule()) { + composeCodeableConcept("policyRule", element.getPolicyRule()); + } + if (element.hasVerification()) { + openArray("verification"); + for (Consent.ConsentVerificationComponent e : element.getVerification()) + composeConsentConsentVerificationComponent(null, e); + closeArray(); + }; + if (element.hasProvision()) { + openArray("provision"); + for (Consent.provisionComponent e : element.getProvision()) + composeConsentprovisionComponent(null, e); + closeArray(); + }; + } + + protected void composeConsentConsentPolicyComponent(String name, Consent.ConsentPolicyComponent element) throws IOException { + if (element != null) { + open(name); + composeConsentConsentPolicyComponentInner(element); + close(); + } + } + + protected void composeConsentConsentPolicyComponentInner(Consent.ConsentPolicyComponent element) throws IOException { + composeBackbone(element); + if (element.hasAuthorityElement()) { + composeUriCore("authority", element.getAuthorityElement(), false); + composeUriExtras("authority", element.getAuthorityElement(), false); + } + if (element.hasUriElement()) { + composeUriCore("uri", element.getUriElement(), false); + composeUriExtras("uri", element.getUriElement(), false); + } + } + + protected void composeConsentConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element) throws IOException { + if (element != null) { + open(name); + composeConsentConsentVerificationComponentInner(element); + close(); + } + } + + protected void composeConsentConsentVerificationComponentInner(Consent.ConsentVerificationComponent element) throws IOException { + composeBackbone(element); + if (element.hasVerifiedElement()) { + composeBooleanCore("verified", element.getVerifiedElement(), false); + composeBooleanExtras("verified", element.getVerifiedElement(), false); + } + if (element.hasVerifiedWith()) { + composeReference("verifiedWith", element.getVerifiedWith()); + } + if (element.hasVerificationDateElement()) { + composeDateTimeCore("verificationDate", element.getVerificationDateElement(), false); + composeDateTimeExtras("verificationDate", element.getVerificationDateElement(), false); + } + } + + protected void composeConsentprovisionComponent(String name, Consent.provisionComponent element) throws IOException { + if (element != null) { + open(name); + composeConsentprovisionComponentInner(element); + close(); + } + } + + protected void composeConsentprovisionComponentInner(Consent.provisionComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasActor()) { + openArray("actor"); + for (Consent.provisionActorComponent e : element.getActor()) + composeConsentprovisionActorComponent(null, e); + closeArray(); + }; + if (element.hasAction()) { + openArray("action"); + for (CodeableConcept e : element.getAction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSecurityLabel()) { + openArray("securityLabel"); + for (Coding e : element.getSecurityLabel()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasPurpose()) { + openArray("purpose"); + for (Coding e : element.getPurpose()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasClass_()) { + openArray("class"); + for (Coding e : element.getClass_()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasCode()) { + openArray("code"); + for (Coding e : element.getCode()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasDataPeriod()) { + composePeriod("dataPeriod", element.getDataPeriod()); + } + if (element.hasData()) { + openArray("data"); + for (Consent.provisionDataComponent e : element.getData()) + composeConsentprovisionDataComponent(null, e); + closeArray(); + }; + if (element.hasProvision()) { + openArray("provision"); + for (Consent.provisionComponent e : element.getProvision()) + composeConsentprovisionComponent(null, e); + closeArray(); + }; + } + + protected void composeConsentprovisionActorComponent(String name, Consent.provisionActorComponent element) throws IOException { + if (element != null) { + open(name); + composeConsentprovisionActorComponentInner(element); + close(); + } + } + + protected void composeConsentprovisionActorComponentInner(Consent.provisionActorComponent element) throws IOException { + composeBackbone(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + } + + protected void composeConsentprovisionDataComponent(String name, Consent.provisionDataComponent element) throws IOException { + if (element != null) { + open(name); + composeConsentprovisionDataComponentInner(element); + close(); + } + } + + protected void composeConsentprovisionDataComponentInner(Consent.provisionDataComponent element) throws IOException { + composeBackbone(element); + if (element.hasMeaningElement()) { + composeEnumerationCore("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory(), false); + composeEnumerationExtras("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory(), false); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + } + + protected void composeContract(String name, Contract element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeContractInner(element); + } + } + + protected void composeContractInner(Contract element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory(), false); + } + if (element.hasContentDerivative()) { + composeCodeableConcept("contentDerivative", element.getContentDerivative()); + } + if (element.hasIssuedElement()) { + composeDateTimeCore("issued", element.getIssuedElement(), false); + composeDateTimeExtras("issued", element.getIssuedElement(), false); + } + if (element.hasApplies()) { + composePeriod("applies", element.getApplies()); + } + if (element.hasSubject()) { + openArray("subject"); + for (Reference e : element.getSubject()) + composeReference(null, e); + closeArray(); + }; + if (element.hasAuthority()) { + openArray("authority"); + for (Reference e : element.getAuthority()) + composeReference(null, e); + closeArray(); + }; + if (element.hasDomain()) { + openArray("domain"); + for (Reference e : element.getDomain()) + composeReference(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + openArray("subType"); + for (CodeableConcept e : element.getSubType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTerm()) { + openArray("term"); + for (Contract.TermComponent e : element.getTerm()) + composeContractTermComponent(null, e); + closeArray(); + }; + if (element.hasSigner()) { + openArray("signer"); + for (Contract.SignatoryComponent e : element.getSigner()) + composeContractSignatoryComponent(null, e); + closeArray(); + }; + if (element.hasFriendly()) { + openArray("friendly"); + for (Contract.FriendlyLanguageComponent e : element.getFriendly()) + composeContractFriendlyLanguageComponent(null, e); + closeArray(); + }; + if (element.hasLegal()) { + openArray("legal"); + for (Contract.LegalLanguageComponent e : element.getLegal()) + composeContractLegalLanguageComponent(null, e); + closeArray(); + }; + if (element.hasRule()) { + composeContractComputableLanguageComponent("rule", element.getRule()); + } + if (element.hasLegallyBinding()) { + composeType("legallyBinding", element.getLegallyBinding()); + } + } + + protected void composeContractTermComponent(String name, Contract.TermComponent element) throws IOException { + if (element != null) { + open(name); + composeContractTermComponentInner(element); + close(); + } + } + + protected void composeContractTermComponentInner(Contract.TermComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasIssuedElement()) { + composeDateTimeCore("issued", element.getIssuedElement(), false); + composeDateTimeExtras("issued", element.getIssuedElement(), false); + } + if (element.hasApplies()) { + composePeriod("applies", element.getApplies()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + composeCodeableConcept("subType", element.getSubType()); + } + if (element.hasOffer()) { + composeContractContractOfferComponent("offer", element.getOffer()); + } + if (element.hasAsset()) { + openArray("asset"); + for (Contract.ContractAssetComponent e : element.getAsset()) + composeContractContractAssetComponent(null, e); + closeArray(); + }; + if (element.hasAgent()) { + openArray("agent"); + for (Contract.AgentComponent e : element.getAgent()) + composeContractAgentComponent(null, e); + closeArray(); + }; + if (element.hasAction()) { + openArray("action"); + for (CodeableConcept e : element.getAction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasActionReason()) { + openArray("actionReason"); + for (CodeableConcept e : element.getActionReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasGroup()) { + openArray("group"); + for (Contract.TermComponent e : element.getGroup()) + composeContractTermComponent(null, e); + closeArray(); + }; + } + + protected void composeContractContractOfferComponent(String name, Contract.ContractOfferComponent element) throws IOException { + if (element != null) { + open(name); + composeContractContractOfferComponentInner(element); + close(); + } + } + + protected void composeContractContractOfferComponentInner(Contract.ContractOfferComponent element) throws IOException { + composeBackbone(element); + if (element.hasTopic()) { + composeReference("topic", element.getTopic()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasDecision()) { + composeCodeableConcept("decision", element.getDecision()); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasLinkIdElement()) { + composeStringCore("linkId", element.getLinkIdElement(), false); + composeStringExtras("linkId", element.getLinkIdElement(), false); + } + } + + protected void composeContractContractAssetComponent(String name, Contract.ContractAssetComponent element) throws IOException { + if (element != null) { + open(name); + composeContractContractAssetComponentInner(element); + close(); + } + } + + protected void composeContractContractAssetComponentInner(Contract.ContractAssetComponent element) throws IOException { + composeBackbone(element); + if (element.hasClass_()) { + composeCoding("class", element.getClass_()); + } + if (element.hasCode()) { + composeCoding("code", element.getCode()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasDataPeriod()) { + composePeriod("dataPeriod", element.getDataPeriod()); + } + if (element.hasData()) { + openArray("data"); + for (Contract.AssetDataComponent e : element.getData()) + composeContractAssetDataComponent(null, e); + closeArray(); + }; + if (element.hasValuedItem()) { + openArray("valuedItem"); + for (Contract.ValuedItemComponent e : element.getValuedItem()) + composeContractValuedItemComponent(null, e); + closeArray(); + }; + if (element.hasSecurityLabel()) { + openArray("securityLabel"); + for (Coding e : element.getSecurityLabel()) + composeCoding(null, e); + closeArray(); + }; + } + + protected void composeContractAssetDataComponent(String name, Contract.AssetDataComponent element) throws IOException { + if (element != null) { + open(name); + composeContractAssetDataComponentInner(element); + close(); + } + } + + protected void composeContractAssetDataComponentInner(Contract.AssetDataComponent element) throws IOException { + composeBackbone(element); + if (element.hasMeaningElement()) { + composeEnumerationCore("meaning", element.getMeaningElement(), new Contract.ContractDataMeaningEnumFactory(), false); + composeEnumerationExtras("meaning", element.getMeaningElement(), new Contract.ContractDataMeaningEnumFactory(), false); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + } + + protected void composeContractValuedItemComponent(String name, Contract.ValuedItemComponent element) throws IOException { + if (element != null) { + open(name); + composeContractValuedItemComponentInner(element); + close(); + } + } + + protected void composeContractValuedItemComponentInner(Contract.ValuedItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasEntity()) { + composeType("entity", element.getEntity()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasEffectiveTimeElement()) { + composeDateTimeCore("effectiveTime", element.getEffectiveTimeElement(), false); + composeDateTimeExtras("effectiveTime", element.getEffectiveTimeElement(), false); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasPointsElement()) { + composeDecimalCore("points", element.getPointsElement(), false); + composeDecimalExtras("points", element.getPointsElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + } + + protected void composeContractAgentComponent(String name, Contract.AgentComponent element) throws IOException { + if (element != null) { + open(name); + composeContractAgentComponentInner(element); + close(); + } + } + + protected void composeContractAgentComponentInner(Contract.AgentComponent element) throws IOException { + composeBackbone(element); + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasRole()) { + openArray("role"); + for (CodeableConcept e : element.getRole()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composeContractSignatoryComponent(String name, Contract.SignatoryComponent element) throws IOException { + if (element != null) { + open(name); + composeContractSignatoryComponentInner(element); + close(); + } + } + + protected void composeContractSignatoryComponentInner(Contract.SignatoryComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + if (element.hasSignature()) { + openArray("signature"); + for (Signature e : element.getSignature()) + composeSignature(null, e); + closeArray(); + }; + } + + protected void composeContractFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element) throws IOException { + if (element != null) { + open(name); + composeContractFriendlyLanguageComponentInner(element); + close(); + } + } + + protected void composeContractFriendlyLanguageComponentInner(Contract.FriendlyLanguageComponent element) throws IOException { + composeBackbone(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } + } + + protected void composeContractLegalLanguageComponent(String name, Contract.LegalLanguageComponent element) throws IOException { + if (element != null) { + open(name); + composeContractLegalLanguageComponentInner(element); + close(); + } + } + + protected void composeContractLegalLanguageComponentInner(Contract.LegalLanguageComponent element) throws IOException { + composeBackbone(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } + } + + protected void composeContractComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element) throws IOException { + if (element != null) { + open(name); + composeContractComputableLanguageComponentInner(element); + close(); + } + } + + protected void composeContractComputableLanguageComponentInner(Contract.ComputableLanguageComponent element) throws IOException { + composeBackbone(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } + } + + protected void composeCoverage(String name, Coverage element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeCoverageInner(element); + } + } + + protected void composeCoverageInner(Coverage element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasPolicyHolder()) { + composeReference("policyHolder", element.getPolicyHolder()); + } + if (element.hasSubscriber()) { + composeReference("subscriber", element.getSubscriber()); + } + if (element.hasSubscriberIdElement()) { + composeStringCore("subscriberId", element.getSubscriberIdElement(), false); + composeStringExtras("subscriberId", element.getSubscriberIdElement(), false); + } + if (element.hasBeneficiary()) { + composeReference("beneficiary", element.getBeneficiary()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasPayor()) { + openArray("payor"); + for (Reference e : element.getPayor()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGrouping()) { + composeCoverageGroupComponent("grouping", element.getGrouping()); + } + if (element.hasDependentElement()) { + composeStringCore("dependent", element.getDependentElement(), false); + composeStringExtras("dependent", element.getDependentElement(), false); + } + if (element.hasSequenceElement()) { + composeStringCore("sequence", element.getSequenceElement(), false); + composeStringExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasOrderElement()) { + composePositiveIntCore("order", element.getOrderElement(), false); + composePositiveIntExtras("order", element.getOrderElement(), false); + } + if (element.hasNetworkElement()) { + composeStringCore("network", element.getNetworkElement(), false); + composeStringExtras("network", element.getNetworkElement(), false); + } + if (element.hasContract()) { + openArray("contract"); + for (Reference e : element.getContract()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeCoverageGroupComponent(String name, Coverage.GroupComponent element) throws IOException { + if (element != null) { + open(name); + composeCoverageGroupComponentInner(element); + close(); + } + } + + protected void composeCoverageGroupComponentInner(Coverage.GroupComponent element) throws IOException { + composeBackbone(element); + if (element.hasGroupElement()) { + composeStringCore("group", element.getGroupElement(), false); + composeStringExtras("group", element.getGroupElement(), false); + } + if (element.hasGroupDisplayElement()) { + composeStringCore("groupDisplay", element.getGroupDisplayElement(), false); + composeStringExtras("groupDisplay", element.getGroupDisplayElement(), false); + } + if (element.hasSubGroupElement()) { + composeStringCore("subGroup", element.getSubGroupElement(), false); + composeStringExtras("subGroup", element.getSubGroupElement(), false); + } + if (element.hasSubGroupDisplayElement()) { + composeStringCore("subGroupDisplay", element.getSubGroupDisplayElement(), false); + composeStringExtras("subGroupDisplay", element.getSubGroupDisplayElement(), false); + } + if (element.hasPlanElement()) { + composeStringCore("plan", element.getPlanElement(), false); + composeStringExtras("plan", element.getPlanElement(), false); + } + if (element.hasPlanDisplayElement()) { + composeStringCore("planDisplay", element.getPlanDisplayElement(), false); + composeStringExtras("planDisplay", element.getPlanDisplayElement(), false); + } + if (element.hasSubPlanElement()) { + composeStringCore("subPlan", element.getSubPlanElement(), false); + composeStringExtras("subPlan", element.getSubPlanElement(), false); + } + if (element.hasSubPlanDisplayElement()) { + composeStringCore("subPlanDisplay", element.getSubPlanDisplayElement(), false); + composeStringExtras("subPlanDisplay", element.getSubPlanDisplayElement(), false); + } + if (element.hasClass_Element()) { + composeStringCore("class", element.getClass_Element(), false); + composeStringExtras("class", element.getClass_Element(), false); + } + if (element.hasClassDisplayElement()) { + composeStringCore("classDisplay", element.getClassDisplayElement(), false); + composeStringExtras("classDisplay", element.getClassDisplayElement(), false); + } + if (element.hasSubClassElement()) { + composeStringCore("subClass", element.getSubClassElement(), false); + composeStringExtras("subClass", element.getSubClassElement(), false); + } + if (element.hasSubClassDisplayElement()) { + composeStringCore("subClassDisplay", element.getSubClassDisplayElement(), false); + composeStringExtras("subClassDisplay", element.getSubClassDisplayElement(), false); + } + } + + protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDetectedIssueInner(element); + } + } + + protected void composeDetectedIssueInner(DetectedIssue element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasSeverityElement()) { + composeEnumerationCore("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory(), false); + composeEnumerationExtras("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasImplicated()) { + openArray("implicated"); + for (Reference e : element.getImplicated()) + composeReference(null, e); + closeArray(); + }; + if (element.hasDetailElement()) { + composeStringCore("detail", element.getDetailElement(), false); + composeStringExtras("detail", element.getDetailElement(), false); + } + if (element.hasReferenceElement()) { + composeUriCore("reference", element.getReferenceElement(), false); + composeUriExtras("reference", element.getReferenceElement(), false); + } + if (element.hasMitigation()) { + openArray("mitigation"); + for (DetectedIssue.DetectedIssueMitigationComponent e : element.getMitigation()) + composeDetectedIssueDetectedIssueMitigationComponent(null, e); + closeArray(); + }; + } + + protected void composeDetectedIssueDetectedIssueMitigationComponent(String name, DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { + if (element != null) { + open(name); + composeDetectedIssueDetectedIssueMitigationComponentInner(element); + close(); + } + } + + protected void composeDetectedIssueDetectedIssueMitigationComponentInner(DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { + composeBackbone(element); + if (element.hasAction()) { + composeCodeableConcept("action", element.getAction()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + } + + protected void composeDevice(String name, Device element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDeviceInner(element); + } + } + + protected void composeDeviceInner(Device element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasUdi()) { + composeDeviceDeviceUdiComponent("udi", element.getUdi()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLotNumberElement()) { + composeStringCore("lotNumber", element.getLotNumberElement(), false); + composeStringExtras("lotNumber", element.getLotNumberElement(), false); + } + if (element.hasManufacturerElement()) { + composeStringCore("manufacturer", element.getManufacturerElement(), false); + composeStringExtras("manufacturer", element.getManufacturerElement(), false); + } + if (element.hasManufactureDateElement()) { + composeDateTimeCore("manufactureDate", element.getManufactureDateElement(), false); + composeDateTimeExtras("manufactureDate", element.getManufactureDateElement(), false); + } + if (element.hasExpirationDateElement()) { + composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false); + composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false); + } + if (element.hasModelElement()) { + composeStringCore("model", element.getModelElement(), false); + composeStringExtras("model", element.getModelElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasOwner()) { + composeReference("owner", element.getOwner()); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactPoint e : element.getContact()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasSafety()) { + openArray("safety"); + for (CodeableConcept e : element.getSafety()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composeDeviceDeviceUdiComponent(String name, Device.DeviceUdiComponent element) throws IOException { + if (element != null) { + open(name); + composeDeviceDeviceUdiComponentInner(element); + close(); + } + } + + protected void composeDeviceDeviceUdiComponentInner(Device.DeviceUdiComponent element) throws IOException { + composeBackbone(element); + if (element.hasDeviceIdentifierElement()) { + composeStringCore("deviceIdentifier", element.getDeviceIdentifierElement(), false); + composeStringExtras("deviceIdentifier", element.getDeviceIdentifierElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasJurisdictionElement()) { + composeUriCore("jurisdiction", element.getJurisdictionElement(), false); + composeUriExtras("jurisdiction", element.getJurisdictionElement(), false); + } + if (element.hasCarrierHRFElement()) { + composeStringCore("carrierHRF", element.getCarrierHRFElement(), false); + composeStringExtras("carrierHRF", element.getCarrierHRFElement(), false); + } + if (element.hasCarrierAIDCElement()) { + composeBase64BinaryCore("carrierAIDC", element.getCarrierAIDCElement(), false); + composeBase64BinaryExtras("carrierAIDC", element.getCarrierAIDCElement(), false); + } + if (element.hasIssuerElement()) { + composeUriCore("issuer", element.getIssuerElement(), false); + composeUriExtras("issuer", element.getIssuerElement(), false); + } + if (element.hasEntryTypeElement()) { + composeEnumerationCore("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory(), false); + composeEnumerationExtras("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory(), false); + } + } + + protected void composeDeviceComponent(String name, DeviceComponent element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDeviceComponentInner(element); + } + } + + protected void composeDeviceComponentInner(DeviceComponent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLastSystemChangeElement()) { + composeInstantCore("lastSystemChange", element.getLastSystemChangeElement(), false); + composeInstantExtras("lastSystemChange", element.getLastSystemChangeElement(), false); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasParent()) { + composeReference("parent", element.getParent()); + } + if (element.hasOperationalStatus()) { + openArray("operationalStatus"); + for (CodeableConcept e : element.getOperationalStatus()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasParameterGroup()) { + composeCodeableConcept("parameterGroup", element.getParameterGroup()); + } + if (element.hasMeasurementPrincipleElement()) { + composeEnumerationCore("measurementPrinciple", element.getMeasurementPrincipleElement(), new DeviceComponent.MeasmntPrincipleEnumFactory(), false); + composeEnumerationExtras("measurementPrinciple", element.getMeasurementPrincipleElement(), new DeviceComponent.MeasmntPrincipleEnumFactory(), false); + } + if (element.hasProductionSpecification()) { + openArray("productionSpecification"); + for (DeviceComponent.DeviceComponentProductionSpecificationComponent e : element.getProductionSpecification()) + composeDeviceComponentDeviceComponentProductionSpecificationComponent(null, e); + closeArray(); + }; + if (element.hasLanguageCode()) { + composeCodeableConcept("languageCode", element.getLanguageCode()); + } + if (element.hasProperty()) { + openArray("property"); + for (DeviceComponent.DeviceComponentPropertyComponent e : element.getProperty()) + composeDeviceComponentDeviceComponentPropertyComponent(null, e); + closeArray(); + }; + } + + protected void composeDeviceComponentDeviceComponentProductionSpecificationComponent(String name, DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { + if (element != null) { + open(name); + composeDeviceComponentDeviceComponentProductionSpecificationComponentInner(element); + close(); + } + } + + protected void composeDeviceComponentDeviceComponentProductionSpecificationComponentInner(DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { + composeBackbone(element); + if (element.hasSpecType()) { + composeCodeableConcept("specType", element.getSpecType()); + } + if (element.hasComponentId()) { + composeIdentifier("componentId", element.getComponentId()); + } + if (element.hasProductionSpecElement()) { + composeStringCore("productionSpec", element.getProductionSpecElement(), false); + composeStringExtras("productionSpec", element.getProductionSpecElement(), false); + } + } + + protected void composeDeviceComponentDeviceComponentPropertyComponent(String name, DeviceComponent.DeviceComponentPropertyComponent element) throws IOException { + if (element != null) { + open(name); + composeDeviceComponentDeviceComponentPropertyComponentInner(element); + close(); + } + } + + protected void composeDeviceComponentDeviceComponentPropertyComponentInner(DeviceComponent.DeviceComponentPropertyComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasValueQuantity()) { + openArray("valueQuantity"); + for (Quantity e : element.getValueQuantity()) + composeQuantity(null, e); + closeArray(); + }; + if (element.hasValueCode()) { + openArray("valueCode"); + for (CodeableConcept e : element.getValueCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composeDeviceMetric(String name, DeviceMetric element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDeviceMetricInner(element); + } + } + + protected void composeDeviceMetricInner(DeviceMetric element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasUnit()) { + composeCodeableConcept("unit", element.getUnit()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasParent()) { + composeReference("parent", element.getParent()); + } + if (element.hasOperationalStatusElement()) { + composeEnumerationCore("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false); + composeEnumerationExtras("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory(), false); + } + if (element.hasColorElement()) { + composeEnumerationCore("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory(), false); + composeEnumerationExtras("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory(), false); + } + if (element.hasCategoryElement()) { + composeEnumerationCore("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory(), false); + composeEnumerationExtras("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory(), false); + } + if (element.hasMeasurementPeriod()) { + composeTiming("measurementPeriod", element.getMeasurementPeriod()); + } + if (element.hasCalibration()) { + openArray("calibration"); + for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration()) + composeDeviceMetricDeviceMetricCalibrationComponent(null, e); + closeArray(); + }; + } + + protected void composeDeviceMetricDeviceMetricCalibrationComponent(String name, DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { + if (element != null) { + open(name); + composeDeviceMetricDeviceMetricCalibrationComponentInner(element); + close(); + } + } + + protected void composeDeviceMetricDeviceMetricCalibrationComponentInner(DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory(), false); + } + if (element.hasStateElement()) { + composeEnumerationCore("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory(), false); + composeEnumerationExtras("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory(), false); + } + if (element.hasTimeElement()) { + composeInstantCore("time", element.getTimeElement(), false); + composeInstantExtras("time", element.getTimeElement(), false); + } + } + + protected void composeDeviceRequest(String name, DeviceRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDeviceRequestInner(element); + } + } + + protected void composeDeviceRequestInner(DeviceRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPriorRequest()) { + openArray("priorRequest"); + for (Reference e : element.getPriorRequest()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory(), false); + } + if (element.hasIntent()) { + composeCodeableConcept("intent", element.getIntent()); + } + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory(), false); + } + if (element.hasCode()) { + composeType("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasRequester()) { + composeDeviceRequestDeviceRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasPerformerType()) { + composeCodeableConcept("performerType", element.getPerformerType()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSupportingInfo()) { + openArray("supportingInfo"); + for (Reference e : element.getSupportingInfo()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasRelevantHistory()) { + openArray("relevantHistory"); + for (Reference e : element.getRelevantHistory()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeDeviceRequestDeviceRequestRequesterComponent(String name, DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { + if (element != null) { + open(name); + composeDeviceRequestDeviceRequestRequesterComponentInner(element); + close(); + } + } + + protected void composeDeviceRequestDeviceRequestRequesterComponentInner(DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeDeviceUseStatement(String name, DeviceUseStatement element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDeviceUseStatementInner(element); + } + } + + protected void composeDeviceUseStatementInner(DeviceUseStatement element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new DeviceUseStatement.DeviceUseStatementStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new DeviceUseStatement.DeviceUseStatementStatusEnumFactory(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasWhenUsed()) { + composePeriod("whenUsed", element.getWhenUsed()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasRecordedOnElement()) { + composeDateTimeCore("recordedOn", element.getRecordedOnElement(), false); + composeDateTimeExtras("recordedOn", element.getRecordedOnElement(), false); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasIndication()) { + openArray("indication"); + for (CodeableConcept e : element.getIndication()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDiagnosticReportInner(element); + } + } + + protected void composeDiagnosticReportInner(DiagnosticReport element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } + if (element.hasIssuedElement()) { + composeInstantCore("issued", element.getIssuedElement(), false); + composeInstantExtras("issued", element.getIssuedElement(), false); + } + if (element.hasPerformer()) { + openArray("performer"); + for (Reference e : element.getPerformer()) + composeReference(null, e); + closeArray(); + }; + if (element.hasResultsInterpreter()) { + openArray("resultsInterpreter"); + for (Reference e : element.getResultsInterpreter()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSpecimen()) { + openArray("specimen"); + for (Reference e : element.getSpecimen()) + composeReference(null, e); + closeArray(); + }; + if (element.hasResult()) { + openArray("result"); + for (Reference e : element.getResult()) + composeReference(null, e); + closeArray(); + }; + if (element.hasImagingStudy()) { + openArray("imagingStudy"); + for (Reference e : element.getImagingStudy()) + composeReference(null, e); + closeArray(); + }; + if (element.hasImage()) { + openArray("image"); + for (DiagnosticReport.DiagnosticReportImageComponent e : element.getImage()) + composeDiagnosticReportDiagnosticReportImageComponent(null, e); + closeArray(); + }; + if (element.hasConclusionElement()) { + composeStringCore("conclusion", element.getConclusionElement(), false); + composeStringExtras("conclusion", element.getConclusionElement(), false); + } + if (element.hasCodedDiagnosis()) { + openArray("codedDiagnosis"); + for (CodeableConcept e : element.getCodedDiagnosis()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPresentedForm()) { + openArray("presentedForm"); + for (Attachment e : element.getPresentedForm()) + composeAttachment(null, e); + closeArray(); + }; + } + + protected void composeDiagnosticReportDiagnosticReportImageComponent(String name, DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { + if (element != null) { + open(name); + composeDiagnosticReportDiagnosticReportImageComponentInner(element); + close(); + } + } + + protected void composeDiagnosticReportDiagnosticReportImageComponentInner(DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { + composeBackbone(element); + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasLink()) { + composeReference("link", element.getLink()); + } + } + + protected void composeDocumentManifest(String name, DocumentManifest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDocumentManifestInner(element); + } + } + + protected void composeDocumentManifestInner(DocumentManifest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasMasterIdentifier()) { + composeIdentifier("masterIdentifier", element.getMasterIdentifier()); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasAgent()) { + openArray("agent"); + for (DocumentManifest.DocumentManifestAgentComponent e : element.getAgent()) + composeDocumentManifestDocumentManifestAgentComponent(null, e); + closeArray(); + }; + if (element.hasRecipient()) { + openArray("recipient"); + for (Reference e : element.getRecipient()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSourceElement()) { + composeUriCore("source", element.getSourceElement(), false); + composeUriExtras("source", element.getSourceElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasContent()) { + openArray("content"); + for (Reference e : element.getContent()) + composeReference(null, e); + closeArray(); + }; + if (element.hasRelated()) { + openArray("related"); + for (DocumentManifest.DocumentManifestRelatedComponent e : element.getRelated()) + composeDocumentManifestDocumentManifestRelatedComponent(null, e); + closeArray(); + }; + } + + protected void composeDocumentManifestDocumentManifestAgentComponent(String name, DocumentManifest.DocumentManifestAgentComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentManifestDocumentManifestAgentComponentInner(element); + close(); + } + } + + protected void composeDocumentManifestDocumentManifestAgentComponentInner(DocumentManifest.DocumentManifestAgentComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasWho()) { + composeReference("who", element.getWho()); + } + } + + protected void composeDocumentManifestDocumentManifestRelatedComponent(String name, DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentManifestDocumentManifestRelatedComponentInner(element); + close(); + } + } + + protected void composeDocumentManifestDocumentManifestRelatedComponentInner(DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasRef()) { + composeReference("ref", element.getRef()); + } + } + + protected void composeDocumentReference(String name, DocumentReference element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeDocumentReferenceInner(element); + } + } + + protected void composeDocumentReferenceInner(DocumentReference element) throws IOException { + composeDomainResourceElements(element); + if (element.hasMasterIdentifier()) { + composeIdentifier("masterIdentifier", element.getMasterIdentifier()); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory(), false); + } + if (element.hasDocStatusElement()) { + composeEnumerationCore("docStatus", element.getDocStatusElement(), new DocumentReference.ReferredDocumentStatusEnumFactory(), false); + composeEnumerationExtras("docStatus", element.getDocStatusElement(), new DocumentReference.ReferredDocumentStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasClass_()) { + composeCodeableConcept("class", element.getClass_()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasDateElement()) { + composeInstantCore("date", element.getDateElement(), false); + composeInstantExtras("date", element.getDateElement(), false); + } + if (element.hasAgent()) { + openArray("agent"); + for (DocumentReference.DocumentReferenceAgentComponent e : element.getAgent()) + composeDocumentReferenceDocumentReferenceAgentComponent(null, e); + closeArray(); + }; + if (element.hasAuthenticator()) { + composeReference("authenticator", element.getAuthenticator()); + } + if (element.hasCustodian()) { + composeReference("custodian", element.getCustodian()); + } + if (element.hasRelatesTo()) { + openArray("relatesTo"); + for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo()) + composeDocumentReferenceDocumentReferenceRelatesToComponent(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasSecurityLabel()) { + openArray("securityLabel"); + for (CodeableConcept e : element.getSecurityLabel()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContent()) { + openArray("content"); + for (DocumentReference.DocumentReferenceContentComponent e : element.getContent()) + composeDocumentReferenceDocumentReferenceContentComponent(null, e); + closeArray(); + }; + if (element.hasContext()) { + composeDocumentReferenceDocumentReferenceContextComponent("context", element.getContext()); + } + } + + protected void composeDocumentReferenceDocumentReferenceAgentComponent(String name, DocumentReference.DocumentReferenceAgentComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentReferenceDocumentReferenceAgentComponentInner(element); + close(); + } + } + + protected void composeDocumentReferenceDocumentReferenceAgentComponentInner(DocumentReference.DocumentReferenceAgentComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasWho()) { + composeReference("who", element.getWho()); + } + } + + protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(String name, DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentReferenceDocumentReferenceRelatesToComponentInner(element); + close(); + } + } + + protected void composeDocumentReferenceDocumentReferenceRelatesToComponentInner(DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory(), false); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + } + + protected void composeDocumentReferenceDocumentReferenceContentComponent(String name, DocumentReference.DocumentReferenceContentComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentReferenceDocumentReferenceContentComponentInner(element); + close(); + } + } + + protected void composeDocumentReferenceDocumentReferenceContentComponentInner(DocumentReference.DocumentReferenceContentComponent element) throws IOException { + composeBackbone(element); + if (element.hasAttachment()) { + composeAttachment("attachment", element.getAttachment()); + } + if (element.hasFormat()) { + composeCoding("format", element.getFormat()); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextComponent(String name, DocumentReference.DocumentReferenceContextComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentReferenceDocumentReferenceContextComponentInner(element); + close(); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextComponentInner(DocumentReference.DocumentReferenceContextComponent element) throws IOException { + composeBackbone(element); + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasEvent()) { + openArray("event"); + for (CodeableConcept e : element.getEvent()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasFacilityType()) { + composeCodeableConcept("facilityType", element.getFacilityType()); + } + if (element.hasPracticeSetting()) { + composeCodeableConcept("practiceSetting", element.getPracticeSetting()); + } + if (element.hasSourcePatientInfo()) { + composeReference("sourcePatientInfo", element.getSourcePatientInfo()); + } + if (element.hasRelated()) { + openArray("related"); + for (DocumentReference.DocumentReferenceContextRelatedComponent e : element.getRelated()) + composeDocumentReferenceDocumentReferenceContextRelatedComponent(null, e); + closeArray(); + }; + } + + protected void composeDocumentReferenceDocumentReferenceContextRelatedComponent(String name, DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { + if (element != null) { + open(name); + composeDocumentReferenceDocumentReferenceContextRelatedComponentInner(element); + close(); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextRelatedComponentInner(DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasRef()) { + composeReference("ref", element.getRef()); + } + } + + protected void composeEligibilityRequest(String name, EligibilityRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEligibilityRequestInner(element); + } + } + + protected void composeEligibilityRequestInner(EligibilityRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new EligibilityRequest.EligibilityRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new EligibilityRequest.EligibilityRequestStatusEnumFactory(), false); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasServiced()) { + composeType("serviced", element.getServiced()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasFacility()) { + composeReference("facility", element.getFacility()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasBusinessArrangementElement()) { + composeStringCore("businessArrangement", element.getBusinessArrangementElement(), false); + composeStringExtras("businessArrangement", element.getBusinessArrangementElement(), false); + } + if (element.hasBenefitCategory()) { + composeCodeableConcept("benefitCategory", element.getBenefitCategory()); + } + if (element.hasBenefitSubCategory()) { + composeCodeableConcept("benefitSubCategory", element.getBenefitSubCategory()); + } + } + + protected void composeEligibilityResponse(String name, EligibilityResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEligibilityResponseInner(element); + } + } + + protected void composeEligibilityResponseInner(EligibilityResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new EligibilityResponse.EligibilityResponseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new EligibilityResponse.EligibilityResponseStatusEnumFactory(), false); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(), false); + } + if (element.hasDispositionElement()) { + composeStringCore("disposition", element.getDispositionElement(), false); + composeStringExtras("disposition", element.getDispositionElement(), false); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasInforceElement()) { + composeBooleanCore("inforce", element.getInforceElement(), false); + composeBooleanExtras("inforce", element.getInforceElement(), false); + } + if (element.hasInsurance()) { + openArray("insurance"); + for (EligibilityResponse.InsuranceComponent e : element.getInsurance()) + composeEligibilityResponseInsuranceComponent(null, e); + closeArray(); + }; + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasError()) { + openArray("error"); + for (EligibilityResponse.ErrorsComponent e : element.getError()) + composeEligibilityResponseErrorsComponent(null, e); + closeArray(); + }; + } + + protected void composeEligibilityResponseInsuranceComponent(String name, EligibilityResponse.InsuranceComponent element) throws IOException { + if (element != null) { + open(name); + composeEligibilityResponseInsuranceComponentInner(element); + close(); + } + } + + protected void composeEligibilityResponseInsuranceComponentInner(EligibilityResponse.InsuranceComponent element) throws IOException { + composeBackbone(element); + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasContract()) { + composeReference("contract", element.getContract()); + } + if (element.hasBenefitBalance()) { + openArray("benefitBalance"); + for (EligibilityResponse.BenefitsComponent e : element.getBenefitBalance()) + composeEligibilityResponseBenefitsComponent(null, e); + closeArray(); + }; + } + + protected void composeEligibilityResponseBenefitsComponent(String name, EligibilityResponse.BenefitsComponent element) throws IOException { + if (element != null) { + open(name); + composeEligibilityResponseBenefitsComponentInner(element); + close(); + } + } + + protected void composeEligibilityResponseBenefitsComponentInner(EligibilityResponse.BenefitsComponent element) throws IOException { + composeBackbone(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasSubCategory()) { + composeCodeableConcept("subCategory", element.getSubCategory()); + } + if (element.hasExcludedElement()) { + composeBooleanCore("excluded", element.getExcludedElement(), false); + composeBooleanExtras("excluded", element.getExcludedElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasNetwork()) { + composeCodeableConcept("network", element.getNetwork()); + } + if (element.hasUnit()) { + composeCodeableConcept("unit", element.getUnit()); + } + if (element.hasTerm()) { + composeCodeableConcept("term", element.getTerm()); + } + if (element.hasFinancial()) { + openArray("financial"); + for (EligibilityResponse.BenefitComponent e : element.getFinancial()) + composeEligibilityResponseBenefitComponent(null, e); + closeArray(); + }; + } + + protected void composeEligibilityResponseBenefitComponent(String name, EligibilityResponse.BenefitComponent element) throws IOException { + if (element != null) { + open(name); + composeEligibilityResponseBenefitComponentInner(element); + close(); + } + } + + protected void composeEligibilityResponseBenefitComponentInner(EligibilityResponse.BenefitComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAllowed()) { + composeType("allowed", element.getAllowed()); + } + if (element.hasUsed()) { + composeType("used", element.getUsed()); + } + } + + protected void composeEligibilityResponseErrorsComponent(String name, EligibilityResponse.ErrorsComponent element) throws IOException { + if (element != null) { + open(name); + composeEligibilityResponseErrorsComponentInner(element); + close(); + } + } + + protected void composeEligibilityResponseErrorsComponentInner(EligibilityResponse.ErrorsComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + } + + protected void composeEncounter(String name, Encounter element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEncounterInner(element); + } + } + + protected void composeEncounterInner(Encounter element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); + } + if (element.hasStatusHistory()) { + openArray("statusHistory"); + for (Encounter.StatusHistoryComponent e : element.getStatusHistory()) + composeEncounterStatusHistoryComponent(null, e); + closeArray(); + }; + if (element.hasClass_()) { + composeCoding("class", element.getClass_()); + } + if (element.hasClassHistory()) { + openArray("classHistory"); + for (Encounter.ClassHistoryComponent e : element.getClassHistory()) + composeEncounterClassHistoryComponent(null, e); + closeArray(); + }; + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasEpisodeOfCare()) { + openArray("episodeOfCare"); + for (Reference e : element.getEpisodeOfCare()) + composeReference(null, e); + closeArray(); + }; + if (element.hasIncomingReferral()) { + openArray("incomingReferral"); + for (Reference e : element.getIncomingReferral()) + composeReference(null, e); + closeArray(); + }; + if (element.hasParticipant()) { + openArray("participant"); + for (Encounter.EncounterParticipantComponent e : element.getParticipant()) + composeEncounterEncounterParticipantComponent(null, e); + closeArray(); + }; + if (element.hasAppointment()) { + composeReference("appointment", element.getAppointment()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasLength()) { + composeDuration("length", element.getLength()); + } + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDiagnosis()) { + openArray("diagnosis"); + for (Encounter.DiagnosisComponent e : element.getDiagnosis()) + composeEncounterDiagnosisComponent(null, e); + closeArray(); + }; + if (element.hasAccount()) { + openArray("account"); + for (Reference e : element.getAccount()) + composeReference(null, e); + closeArray(); + }; + if (element.hasHospitalization()) { + composeEncounterEncounterHospitalizationComponent("hospitalization", element.getHospitalization()); + } + if (element.hasLocation()) { + openArray("location"); + for (Encounter.EncounterLocationComponent e : element.getLocation()) + composeEncounterEncounterLocationComponent(null, e); + closeArray(); + }; + if (element.hasServiceProvider()) { + composeReference("serviceProvider", element.getServiceProvider()); + } + if (element.hasPartOf()) { + composeReference("partOf", element.getPartOf()); + } + } + + protected void composeEncounterStatusHistoryComponent(String name, Encounter.StatusHistoryComponent element) throws IOException { + if (element != null) { + open(name); + composeEncounterStatusHistoryComponentInner(element); + close(); + } + } + + protected void composeEncounterStatusHistoryComponentInner(Encounter.StatusHistoryComponent element) throws IOException { + composeBackbone(element); + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEncounterClassHistoryComponent(String name, Encounter.ClassHistoryComponent element) throws IOException { + if (element != null) { + open(name); + composeEncounterClassHistoryComponentInner(element); + close(); + } + } + + protected void composeEncounterClassHistoryComponentInner(Encounter.ClassHistoryComponent element) throws IOException { + composeBackbone(element); + if (element.hasClass_()) { + composeCoding("class", element.getClass_()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEncounterEncounterParticipantComponent(String name, Encounter.EncounterParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composeEncounterEncounterParticipantComponentInner(element); + close(); + } + } + + protected void composeEncounterEncounterParticipantComponentInner(Encounter.EncounterParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasIndividual()) { + composeReference("individual", element.getIndividual()); + } + } + + protected void composeEncounterDiagnosisComponent(String name, Encounter.DiagnosisComponent element) throws IOException { + if (element != null) { + open(name); + composeEncounterDiagnosisComponentInner(element); + close(); + } + } + + protected void composeEncounterDiagnosisComponentInner(Encounter.DiagnosisComponent element) throws IOException { + composeBackbone(element); + if (element.hasCondition()) { + composeReference("condition", element.getCondition()); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasRankElement()) { + composePositiveIntCore("rank", element.getRankElement(), false); + composePositiveIntExtras("rank", element.getRankElement(), false); + } + } + + protected void composeEncounterEncounterHospitalizationComponent(String name, Encounter.EncounterHospitalizationComponent element) throws IOException { + if (element != null) { + open(name); + composeEncounterEncounterHospitalizationComponentInner(element); + close(); + } + } + + protected void composeEncounterEncounterHospitalizationComponentInner(Encounter.EncounterHospitalizationComponent element) throws IOException { + composeBackbone(element); + if (element.hasPreAdmissionIdentifier()) { + composeIdentifier("preAdmissionIdentifier", element.getPreAdmissionIdentifier()); + } + if (element.hasOrigin()) { + composeReference("origin", element.getOrigin()); + } + if (element.hasAdmitSource()) { + composeCodeableConcept("admitSource", element.getAdmitSource()); + } + if (element.hasReAdmission()) { + composeCodeableConcept("reAdmission", element.getReAdmission()); + } + if (element.hasDietPreference()) { + openArray("dietPreference"); + for (CodeableConcept e : element.getDietPreference()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialCourtesy()) { + openArray("specialCourtesy"); + for (CodeableConcept e : element.getSpecialCourtesy()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialArrangement()) { + openArray("specialArrangement"); + for (CodeableConcept e : element.getSpecialArrangement()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDestination()) { + composeReference("destination", element.getDestination()); + } + if (element.hasDischargeDisposition()) { + composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition()); + } + } + + protected void composeEncounterEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element) throws IOException { + if (element != null) { + open(name); + composeEncounterEncounterLocationComponentInner(element); + close(); + } + } + + protected void composeEncounterEncounterLocationComponentInner(Encounter.EncounterLocationComponent element) throws IOException { + composeBackbone(element); + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEndpoint(String name, Endpoint element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEndpointInner(element); + } + } + + protected void composeEndpointInner(Endpoint element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory(), false); + } + if (element.hasConnectionType()) { + composeCoding("connectionType", element.getConnectionType()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactPoint e : element.getContact()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasPayloadType()) { + openArray("payloadType"); + for (CodeableConcept e : element.getPayloadType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPayloadMimeType()) { + openArray("payloadMimeType"); + for (CodeType e : element.getPayloadMimeType()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPayloadMimeType())) { + openArray("_payloadMimeType"); + for (CodeType e : element.getPayloadMimeType()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAddressElement()) { + composeUriCore("address", element.getAddressElement(), false); + composeUriExtras("address", element.getAddressElement(), false); + } + if (element.hasHeader()) { + openArray("header"); + for (StringType e : element.getHeader()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getHeader())) { + openArray("_header"); + for (StringType e : element.getHeader()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEnrollmentRequestInner(element); + } + } + + protected void composeEnrollmentRequestInner(EnrollmentRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new EnrollmentRequest.EnrollmentRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new EnrollmentRequest.EnrollmentRequestStatusEnumFactory(), false); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasCandidate()) { + composeReference("candidate", element.getCandidate()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + } + + protected void composeEnrollmentResponse(String name, EnrollmentResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEnrollmentResponseInner(element); + } + } + + protected void composeEnrollmentResponseInner(EnrollmentResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new EnrollmentResponse.EnrollmentResponseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new EnrollmentResponse.EnrollmentResponseStatusEnumFactory(), false); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(), false); + } + if (element.hasDispositionElement()) { + composeStringCore("disposition", element.getDispositionElement(), false); + composeStringExtras("disposition", element.getDispositionElement(), false); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + } + + protected void composeEpisodeOfCare(String name, EpisodeOfCare element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEpisodeOfCareInner(element); + } + } + + protected void composeEpisodeOfCareInner(EpisodeOfCare element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); + } + if (element.hasStatusHistory()) { + openArray("statusHistory"); + for (EpisodeOfCare.EpisodeOfCareStatusHistoryComponent e : element.getStatusHistory()) + composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(null, e); + closeArray(); + }; + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDiagnosis()) { + openArray("diagnosis"); + for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis()) + composeEpisodeOfCareDiagnosisComponent(null, e); + closeArray(); + }; + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasReferralRequest()) { + openArray("referralRequest"); + for (Reference e : element.getReferralRequest()) + composeReference(null, e); + closeArray(); + }; + if (element.hasCareManager()) { + composeReference("careManager", element.getCareManager()); + } + if (element.hasTeam()) { + openArray("team"); + for (Reference e : element.getTeam()) + composeReference(null, e); + closeArray(); + }; + if (element.hasAccount()) { + openArray("account"); + for (Reference e : element.getAccount()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { + if (element != null) { + open(name); + composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentInner(element); + close(); + } + } + + protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentInner(EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { + composeBackbone(element); + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEpisodeOfCareDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element) throws IOException { + if (element != null) { + open(name); + composeEpisodeOfCareDiagnosisComponentInner(element); + close(); + } + } + + protected void composeEpisodeOfCareDiagnosisComponentInner(EpisodeOfCare.DiagnosisComponent element) throws IOException { + composeBackbone(element); + if (element.hasCondition()) { + composeReference("condition", element.getCondition()); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasRankElement()) { + composePositiveIntCore("rank", element.getRankElement(), false); + composePositiveIntExtras("rank", element.getRankElement(), false); + } + } + + protected void composeEventDefinition(String name, EventDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeEventDefinitionInner(element); + } + } + + protected void composeEventDefinitionInner(EventDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContributor()) { + openArray("contributor"); + for (Contributor e : element.getContributor()) + composeContributor(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasTrigger()) { + composeTriggerDefinition("trigger", element.getTrigger()); + } + } + + protected void composeExampleScenario(String name, ExampleScenario element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeExampleScenarioInner(element); + } + } + + protected void composeExampleScenarioInner(ExampleScenario element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasActor()) { + openArray("actor"); + for (ExampleScenario.ExampleScenarioActorComponent e : element.getActor()) + composeExampleScenarioExampleScenarioActorComponent(null, e); + closeArray(); + }; + if (element.hasInstance()) { + openArray("instance"); + for (ExampleScenario.ExampleScenarioInstanceComponent e : element.getInstance()) + composeExampleScenarioExampleScenarioInstanceComponent(null, e); + closeArray(); + }; + if (element.hasProcess()) { + composeExampleScenarioExampleScenarioProcessComponent("process", element.getProcess()); + } + if (element.hasWorkflow()) { + openArray("workflow"); + for (Reference e : element.getWorkflow()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeExampleScenarioExampleScenarioActorComponent(String name, ExampleScenario.ExampleScenarioActorComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioActorComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioActorComponentInner(ExampleScenario.ExampleScenarioActorComponent element) throws IOException { + composeBackbone(element); + if (element.hasActorIdElement()) { + composeStringCore("actorId", element.getActorIdElement(), false); + composeStringExtras("actorId", element.getActorIdElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new ExampleScenario.ExampleScenarioActorTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new ExampleScenario.ExampleScenarioActorTypeEnumFactory(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceComponent(String name, ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioInstanceComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceComponentInner(ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException { + composeBackbone(element); + if (element.hasResourceIdElement()) { + composeStringCore("resourceId", element.getResourceIdElement(), false); + composeStringExtras("resourceId", element.getResourceIdElement(), false); + } + if (element.hasResourceTypeElement()) { + composeEnumerationCore("resourceType", element.getResourceTypeElement(), new ExampleScenario.FHIRResourceTypeEnumFactory(), false); + composeEnumerationExtras("resourceType", element.getResourceTypeElement(), new ExampleScenario.FHIRResourceTypeEnumFactory(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasVersion()) { + openArray("version"); + for (ExampleScenario.ExampleScenarioInstanceVersionComponent e : element.getVersion()) + composeExampleScenarioExampleScenarioInstanceVersionComponent(null, e); + closeArray(); + }; + if (element.hasContainedInstance()) { + openArray("containedInstance"); + for (ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent e : element.getContainedInstance()) + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(null, e); + closeArray(); + }; + } + + protected void composeExampleScenarioExampleScenarioInstanceVersionComponent(String name, ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioInstanceVersionComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceVersionComponentInner(ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException { + composeBackbone(element); + if (element.hasVersionIdElement()) { + composeStringCore("versionId", element.getVersionIdElement(), false); + composeStringExtras("versionId", element.getVersionIdElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(String name, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentInner(ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException { + composeBackbone(element); + if (element.hasResourceIdElement()) { + composeStringCore("resourceId", element.getResourceIdElement(), false); + composeStringExtras("resourceId", element.getResourceIdElement(), false); + } + if (element.hasVersionIdElement()) { + composeStringCore("versionId", element.getVersionIdElement(), false); + composeStringExtras("versionId", element.getVersionIdElement(), false); + } + } + + protected void composeExampleScenarioExampleScenarioProcessComponent(String name, ExampleScenario.ExampleScenarioProcessComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioProcessComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioProcessComponentInner(ExampleScenario.ExampleScenarioProcessComponent element) throws IOException { + composeBackbone(element); + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPreConditionsElement()) { + composeMarkdownCore("preConditions", element.getPreConditionsElement(), false); + composeMarkdownExtras("preConditions", element.getPreConditionsElement(), false); + } + if (element.hasPostConditionsElement()) { + composeMarkdownCore("postConditions", element.getPostConditionsElement(), false); + composeMarkdownExtras("postConditions", element.getPostConditionsElement(), false); + } + if (element.hasStep()) { + openArray("step"); + for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep()) + composeExampleScenarioExampleScenarioProcessStepComponent(null, e); + closeArray(); + }; + } + + protected void composeExampleScenarioExampleScenarioProcessStepComponent(String name, ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioProcessStepComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepComponentInner(ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException { + composeBackbone(element); + if (element.hasProcess()) { + openArray("process"); + for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess()) + composeExampleScenarioExampleScenarioProcessComponent(null, e); + closeArray(); + }; + if (element.hasPauseElement()) { + composeBooleanCore("pause", element.getPauseElement(), false); + composeBooleanExtras("pause", element.getPauseElement(), false); + } + if (element.hasOperation()) { + composeExampleScenarioExampleScenarioProcessStepOperationComponent("operation", element.getOperation()); + } + if (element.hasAlternative()) { + composeExampleScenarioExampleScenarioProcessStepAlternativeComponent("alternative", element.getAlternative()); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepOperationComponent(String name, ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioProcessStepOperationComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepOperationComponentInner(ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException { + composeBackbone(element); + if (element.hasNumberElement()) { + composeStringCore("number", element.getNumberElement(), false); + composeStringExtras("number", element.getNumberElement(), false); + } + if (element.hasTypeElement()) { + composeStringCore("type", element.getTypeElement(), false); + composeStringExtras("type", element.getTypeElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasInitiatorElement()) { + composeStringCore("initiator", element.getInitiatorElement(), false); + composeStringExtras("initiator", element.getInitiatorElement(), false); + } + if (element.hasReceiverElement()) { + composeStringCore("receiver", element.getReceiverElement(), false); + composeStringExtras("receiver", element.getReceiverElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasInitiatorActiveElement()) { + composeBooleanCore("initiatorActive", element.getInitiatorActiveElement(), false); + composeBooleanExtras("initiatorActive", element.getInitiatorActiveElement(), false); + } + if (element.hasReceiverActiveElement()) { + composeBooleanCore("receiverActive", element.getReceiverActiveElement(), false); + composeBooleanExtras("receiverActive", element.getReceiverActiveElement(), false); + } + if (element.hasRequest()) { + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("request", element.getRequest()); + } + if (element.hasResponse()) { + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("response", element.getResponse()); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(String name, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioProcessStepAlternativeComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponentInner(ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasOption()) { + openArray("option"); + for (ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent e : element.getOption()) + composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(null, e); + closeArray(); + }; + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(String name, ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent element) throws IOException { + if (element != null) { + open(name); + composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentInner(element); + close(); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentInner(ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasStep()) { + openArray("step"); + for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep()) + composeExampleScenarioExampleScenarioProcessStepComponent(null, e); + closeArray(); + }; + if (element.hasPause()) { + openArray("pause"); + for (BooleanType e : element.getPause()) + composeBooleanCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPause())) { + openArray("_pause"); + for (BooleanType e : element.getPause()) + composeBooleanExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeExpansionProfile(String name, ExpansionProfile element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeExpansionProfileInner(element); + } + } + + protected void composeExpansionProfileInner(ExpansionProfile element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasFixedVersion()) { + openArray("fixedVersion"); + for (ExpansionProfile.ExpansionProfileFixedVersionComponent e : element.getFixedVersion()) + composeExpansionProfileExpansionProfileFixedVersionComponent(null, e); + closeArray(); + }; + if (element.hasExcludedSystem()) { + composeExpansionProfileExpansionProfileExcludedSystemComponent("excludedSystem", element.getExcludedSystem()); + } + if (element.hasIncludeDesignationsElement()) { + composeBooleanCore("includeDesignations", element.getIncludeDesignationsElement(), false); + composeBooleanExtras("includeDesignations", element.getIncludeDesignationsElement(), false); + } + if (element.hasDesignation()) { + composeExpansionProfileExpansionProfileDesignationComponent("designation", element.getDesignation()); + } + if (element.hasIncludeDefinitionElement()) { + composeBooleanCore("includeDefinition", element.getIncludeDefinitionElement(), false); + composeBooleanExtras("includeDefinition", element.getIncludeDefinitionElement(), false); + } + if (element.hasActiveOnlyElement()) { + composeBooleanCore("activeOnly", element.getActiveOnlyElement(), false); + composeBooleanExtras("activeOnly", element.getActiveOnlyElement(), false); + } + if (element.hasExcludeNestedElement()) { + composeBooleanCore("excludeNested", element.getExcludeNestedElement(), false); + composeBooleanExtras("excludeNested", element.getExcludeNestedElement(), false); + } + if (element.hasExcludeNotForUIElement()) { + composeBooleanCore("excludeNotForUI", element.getExcludeNotForUIElement(), false); + composeBooleanExtras("excludeNotForUI", element.getExcludeNotForUIElement(), false); + } + if (element.hasExcludePostCoordinatedElement()) { + composeBooleanCore("excludePostCoordinated", element.getExcludePostCoordinatedElement(), false); + composeBooleanExtras("excludePostCoordinated", element.getExcludePostCoordinatedElement(), false); + } + if (element.hasDisplayLanguageElement()) { + composeCodeCore("displayLanguage", element.getDisplayLanguageElement(), false); + composeCodeExtras("displayLanguage", element.getDisplayLanguageElement(), false); + } + if (element.hasLimitedExpansionElement()) { + composeBooleanCore("limitedExpansion", element.getLimitedExpansionElement(), false); + composeBooleanExtras("limitedExpansion", element.getLimitedExpansionElement(), false); + } + } + + protected void composeExpansionProfileExpansionProfileFixedVersionComponent(String name, ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileExpansionProfileFixedVersionComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileExpansionProfileFixedVersionComponentInner(ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { + composeBackbone(element); + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new ExpansionProfile.SystemVersionProcessingModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new ExpansionProfile.SystemVersionProcessingModeEnumFactory(), false); + } + } + + protected void composeExpansionProfileExpansionProfileExcludedSystemComponent(String name, ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileExpansionProfileExcludedSystemComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileExpansionProfileExcludedSystemComponentInner(ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { + composeBackbone(element); + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + } + + protected void composeExpansionProfileExpansionProfileDesignationComponent(String name, ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileExpansionProfileDesignationComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileExpansionProfileDesignationComponentInner(ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { + composeBackbone(element); + if (element.hasInclude()) { + composeExpansionProfileDesignationIncludeComponent("include", element.getInclude()); + } + if (element.hasExclude()) { + composeExpansionProfileDesignationExcludeComponent("exclude", element.getExclude()); + } + } + + protected void composeExpansionProfileDesignationIncludeComponent(String name, ExpansionProfile.DesignationIncludeComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileDesignationIncludeComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileDesignationIncludeComponentInner(ExpansionProfile.DesignationIncludeComponent element) throws IOException { + composeBackbone(element); + if (element.hasDesignation()) { + openArray("designation"); + for (ExpansionProfile.DesignationIncludeDesignationComponent e : element.getDesignation()) + composeExpansionProfileDesignationIncludeDesignationComponent(null, e); + closeArray(); + }; + } + + protected void composeExpansionProfileDesignationIncludeDesignationComponent(String name, ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileDesignationIncludeDesignationComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileDesignationIncludeDesignationComponentInner(ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { + composeBackbone(element); + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + } + + protected void composeExpansionProfileDesignationExcludeComponent(String name, ExpansionProfile.DesignationExcludeComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileDesignationExcludeComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileDesignationExcludeComponentInner(ExpansionProfile.DesignationExcludeComponent element) throws IOException { + composeBackbone(element); + if (element.hasDesignation()) { + openArray("designation"); + for (ExpansionProfile.DesignationExcludeDesignationComponent e : element.getDesignation()) + composeExpansionProfileDesignationExcludeDesignationComponent(null, e); + closeArray(); + }; + } + + protected void composeExpansionProfileDesignationExcludeDesignationComponent(String name, ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { + if (element != null) { + open(name); + composeExpansionProfileDesignationExcludeDesignationComponentInner(element); + close(); + } + } + + protected void composeExpansionProfileDesignationExcludeDesignationComponentInner(ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { + composeBackbone(element); + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + } + + protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeExplanationOfBenefitInner(element); + } + } + + protected void composeExplanationOfBenefitInner(ExplanationOfBenefit element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + openArray("subType"); + for (CodeableConcept e : element.getSubType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasBillablePeriod()) { + composePeriod("billablePeriod", element.getBillablePeriod()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasReferral()) { + composeReference("referral", element.getReferral()); + } + if (element.hasFacility()) { + composeReference("facility", element.getFacility()); + } + if (element.hasClaim()) { + composeReference("claim", element.getClaim()); + } + if (element.hasClaimResponse()) { + composeReference("claimResponse", element.getClaimResponse()); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new ExplanationOfBenefit.RemittanceOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new ExplanationOfBenefit.RemittanceOutcomeEnumFactory(), false); + } + if (element.hasDispositionElement()) { + composeStringCore("disposition", element.getDispositionElement(), false); + composeStringExtras("disposition", element.getDispositionElement(), false); + } + if (element.hasRelated()) { + openArray("related"); + for (ExplanationOfBenefit.RelatedClaimComponent e : element.getRelated()) + composeExplanationOfBenefitRelatedClaimComponent(null, e); + closeArray(); + }; + if (element.hasPrescription()) { + composeReference("prescription", element.getPrescription()); + } + if (element.hasOriginalPrescription()) { + composeReference("originalPrescription", element.getOriginalPrescription()); + } + if (element.hasPayee()) { + composeExplanationOfBenefitPayeeComponent("payee", element.getPayee()); + } + if (element.hasInformation()) { + openArray("information"); + for (ExplanationOfBenefit.SupportingInformationComponent e : element.getInformation()) + composeExplanationOfBenefitSupportingInformationComponent(null, e); + closeArray(); + }; + if (element.hasCareTeam()) { + openArray("careTeam"); + for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam()) + composeExplanationOfBenefitCareTeamComponent(null, e); + closeArray(); + }; + if (element.hasDiagnosis()) { + openArray("diagnosis"); + for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis()) + composeExplanationOfBenefitDiagnosisComponent(null, e); + closeArray(); + }; + if (element.hasProcedure()) { + openArray("procedure"); + for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure()) + composeExplanationOfBenefitProcedureComponent(null, e); + closeArray(); + }; + if (element.hasPrecedenceElement()) { + composePositiveIntCore("precedence", element.getPrecedenceElement(), false); + composePositiveIntExtras("precedence", element.getPrecedenceElement(), false); + } + if (element.hasInsurance()) { + composeExplanationOfBenefitInsuranceComponent("insurance", element.getInsurance()); + } + if (element.hasAccident()) { + composeExplanationOfBenefitAccidentComponent("accident", element.getAccident()); + } + if (element.hasEmploymentImpacted()) { + composePeriod("employmentImpacted", element.getEmploymentImpacted()); + } + if (element.hasHospitalization()) { + composePeriod("hospitalization", element.getHospitalization()); + } + if (element.hasItem()) { + openArray("item"); + for (ExplanationOfBenefit.ItemComponent e : element.getItem()) + composeExplanationOfBenefitItemComponent(null, e); + closeArray(); + }; + if (element.hasAddItem()) { + openArray("addItem"); + for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem()) + composeExplanationOfBenefitAddedItemComponent(null, e); + closeArray(); + }; + if (element.hasTotalCost()) { + composeMoney("totalCost", element.getTotalCost()); + } + if (element.hasUnallocDeductable()) { + composeMoney("unallocDeductable", element.getUnallocDeductable()); + } + if (element.hasTotalBenefit()) { + composeMoney("totalBenefit", element.getTotalBenefit()); + } + if (element.hasPayment()) { + composeExplanationOfBenefitPaymentComponent("payment", element.getPayment()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasProcessNote()) { + openArray("processNote"); + for (ExplanationOfBenefit.NoteComponent e : element.getProcessNote()) + composeExplanationOfBenefitNoteComponent(null, e); + closeArray(); + }; + if (element.hasBenefitBalance()) { + openArray("benefitBalance"); + for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance()) + composeExplanationOfBenefitBenefitBalanceComponent(null, e); + closeArray(); + }; + } + + protected void composeExplanationOfBenefitRelatedClaimComponent(String name, ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitRelatedClaimComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitRelatedClaimComponentInner(ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { + composeBackbone(element); + if (element.hasClaim()) { + composeReference("claim", element.getClaim()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasReference()) { + composeIdentifier("reference", element.getReference()); + } + } + + protected void composeExplanationOfBenefitPayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitPayeeComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitPayeeComponentInner(ExplanationOfBenefit.PayeeComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasResource()) { + composeCoding("resource", element.getResource()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + } + + protected void composeExplanationOfBenefitSupportingInformationComponent(String name, ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitSupportingInformationComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitSupportingInformationComponentInner(ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasReason()) { + composeCoding("reason", element.getReason()); + } + } + + protected void composeExplanationOfBenefitCareTeamComponent(String name, ExplanationOfBenefit.CareTeamComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitCareTeamComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitCareTeamComponentInner(ExplanationOfBenefit.CareTeamComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasResponsibleElement()) { + composeBooleanCore("responsible", element.getResponsibleElement(), false); + composeBooleanExtras("responsible", element.getResponsibleElement(), false); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasQualification()) { + composeCodeableConcept("qualification", element.getQualification()); + } + } + + protected void composeExplanationOfBenefitDiagnosisComponent(String name, ExplanationOfBenefit.DiagnosisComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitDiagnosisComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitDiagnosisComponentInner(ExplanationOfBenefit.DiagnosisComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasDiagnosis()) { + composeType("diagnosis", element.getDiagnosis()); + } + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPackageCode()) { + composeCodeableConcept("packageCode", element.getPackageCode()); + } + } + + protected void composeExplanationOfBenefitProcedureComponent(String name, ExplanationOfBenefit.ProcedureComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitProcedureComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitProcedureComponentInner(ExplanationOfBenefit.ProcedureComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasProcedure()) { + composeType("procedure", element.getProcedure()); + } + } + + protected void composeExplanationOfBenefitInsuranceComponent(String name, ExplanationOfBenefit.InsuranceComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitInsuranceComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitInsuranceComponentInner(ExplanationOfBenefit.InsuranceComponent element) throws IOException { + composeBackbone(element); + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasPreAuthRef()) { + openArray("preAuthRef"); + for (StringType e : element.getPreAuthRef()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPreAuthRef())) { + openArray("_preAuthRef"); + for (StringType e : element.getPreAuthRef()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeExplanationOfBenefitAccidentComponent(String name, ExplanationOfBenefit.AccidentComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitAccidentComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitAccidentComponentInner(ExplanationOfBenefit.AccidentComponent element) throws IOException { + composeBackbone(element); + if (element.hasDateElement()) { + composeDateCore("date", element.getDateElement(), false); + composeDateExtras("date", element.getDateElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLocation()) { + composeType("location", element.getLocation()); + } + } + + protected void composeExplanationOfBenefitItemComponent(String name, ExplanationOfBenefit.ItemComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitItemComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitItemComponentInner(ExplanationOfBenefit.ItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasCareTeamLinkId()) { + openArray("careTeamLinkId"); + for (PositiveIntType e : element.getCareTeamLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getCareTeamLinkId())) { + openArray("_careTeamLinkId"); + for (PositiveIntType e : element.getCareTeamLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDiagnosisLinkId()) { + openArray("diagnosisLinkId"); + for (PositiveIntType e : element.getDiagnosisLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getDiagnosisLinkId())) { + openArray("_diagnosisLinkId"); + for (PositiveIntType e : element.getDiagnosisLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasProcedureLinkId()) { + openArray("procedureLinkId"); + for (PositiveIntType e : element.getProcedureLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getProcedureLinkId())) { + openArray("_procedureLinkId"); + for (PositiveIntType e : element.getProcedureLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasInformationLinkId()) { + openArray("informationLinkId"); + for (PositiveIntType e : element.getInformationLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getInformationLinkId())) { + openArray("_informationLinkId"); + for (PositiveIntType e : element.getInformationLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasProgramCode()) { + openArray("programCode"); + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasServiced()) { + composeType("serviced", element.getServiced()); + } + if (element.hasLocation()) { + composeType("location", element.getLocation()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + openArray("udi"); + for (Reference e : element.getUdi()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasSubSite()) { + openArray("subSite"); + for (CodeableConcept e : element.getSubSite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasEncounter()) { + openArray("encounter"); + for (Reference e : element.getEncounter()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent(null, e); + closeArray(); + }; + if (element.hasDetail()) { + openArray("detail"); + for (ExplanationOfBenefit.DetailComponent e : element.getDetail()) + composeExplanationOfBenefitDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeExplanationOfBenefitAdjudicationComponent(String name, ExplanationOfBenefit.AdjudicationComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitAdjudicationComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitAdjudicationComponentInner(ExplanationOfBenefit.AdjudicationComponent element) throws IOException { + composeBackbone(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasValueElement()) { + composeDecimalCore("value", element.getValueElement(), false); + composeDecimalExtras("value", element.getValueElement(), false); + } + } + + protected void composeExplanationOfBenefitDetailComponent(String name, ExplanationOfBenefit.DetailComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitDetailComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitDetailComponentInner(ExplanationOfBenefit.DetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasProgramCode()) { + openArray("programCode"); + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + openArray("udi"); + for (Reference e : element.getUdi()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent(null, e); + closeArray(); + }; + if (element.hasSubDetail()) { + openArray("subDetail"); + for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail()) + composeExplanationOfBenefitSubDetailComponent(null, e); + closeArray(); + }; + } + + protected void composeExplanationOfBenefitSubDetailComponent(String name, ExplanationOfBenefit.SubDetailComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitSubDetailComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitSubDetailComponentInner(ExplanationOfBenefit.SubDetailComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceElement()) { + composePositiveIntCore("sequence", element.getSequenceElement(), false); + composePositiveIntExtras("sequence", element.getSequenceElement(), false); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasProgramCode()) { + openArray("programCode"); + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimalCore("factor", element.getFactorElement(), false); + composeDecimalExtras("factor", element.getFactorElement(), false); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + openArray("udi"); + for (Reference e : element.getUdi()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent(null, e); + closeArray(); + }; + } + + protected void composeExplanationOfBenefitAddedItemComponent(String name, ExplanationOfBenefit.AddedItemComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitAddedItemComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitAddedItemComponentInner(ExplanationOfBenefit.AddedItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkId()) { + openArray("sequenceLinkId"); + for (PositiveIntType e : element.getSequenceLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSequenceLinkId())) { + openArray("_sequenceLinkId"); + for (PositiveIntType e : element.getSequenceLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDetailSequenceLinkId()) { + openArray("detailSequenceLinkId"); + for (PositiveIntType e : element.getDetailSequenceLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getDetailSequenceLinkId())) { + openArray("_detailSequenceLinkId"); + for (PositiveIntType e : element.getDetailSequenceLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSubdetailSequenceLinkId()) { + openArray("subdetailSequenceLinkId"); + for (PositiveIntType e : element.getSubdetailSequenceLinkId()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSubdetailSequenceLinkId())) { + openArray("_subdetailSequenceLinkId"); + for (PositiveIntType e : element.getSubdetailSequenceLinkId()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + openArray("modifier"); + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasFee()) { + composeMoney("fee", element.getFee()); + } + if (element.hasNoteNumber()) { + openArray("noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNoteNumber())) { + openArray("_noteNumber"); + for (PositiveIntType e : element.getNoteNumber()) + composePositiveIntExtras(null, e, true); + closeArray(); + } + }; + if (element.hasAdjudication()) { + openArray("adjudication"); + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent(null, e); + closeArray(); + }; + } + + protected void composeExplanationOfBenefitPaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitPaymentComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitPaymentComponentInner(ExplanationOfBenefit.PaymentComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAdjustment()) { + composeMoney("adjustment", element.getAdjustment()); + } + if (element.hasAdjustmentReason()) { + composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); + } + if (element.hasDateElement()) { + composeDateCore("date", element.getDateElement(), false); + composeDateExtras("date", element.getDateElement(), false); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + } + + protected void composeExplanationOfBenefitNoteComponent(String name, ExplanationOfBenefit.NoteComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitNoteComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitNoteComponentInner(ExplanationOfBenefit.NoteComponent element) throws IOException { + composeBackbone(element); + if (element.hasNumberElement()) { + composePositiveIntCore("number", element.getNumberElement(), false); + composePositiveIntExtras("number", element.getNumberElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasLanguage()) { + composeCodeableConcept("language", element.getLanguage()); + } + } + + protected void composeExplanationOfBenefitBenefitBalanceComponent(String name, ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitBenefitBalanceComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitBenefitBalanceComponentInner(ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { + composeBackbone(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasSubCategory()) { + composeCodeableConcept("subCategory", element.getSubCategory()); + } + if (element.hasExcludedElement()) { + composeBooleanCore("excluded", element.getExcludedElement(), false); + composeBooleanExtras("excluded", element.getExcludedElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasNetwork()) { + composeCodeableConcept("network", element.getNetwork()); + } + if (element.hasUnit()) { + composeCodeableConcept("unit", element.getUnit()); + } + if (element.hasTerm()) { + composeCodeableConcept("term", element.getTerm()); + } + if (element.hasFinancial()) { + openArray("financial"); + for (ExplanationOfBenefit.BenefitComponent e : element.getFinancial()) + composeExplanationOfBenefitBenefitComponent(null, e); + closeArray(); + }; + } + + protected void composeExplanationOfBenefitBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element) throws IOException { + if (element != null) { + open(name); + composeExplanationOfBenefitBenefitComponentInner(element); + close(); + } + } + + protected void composeExplanationOfBenefitBenefitComponentInner(ExplanationOfBenefit.BenefitComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAllowed()) { + composeType("allowed", element.getAllowed()); + } + if (element.hasUsed()) { + composeType("used", element.getUsed()); + } + } + + protected void composeFamilyMemberHistory(String name, FamilyMemberHistory element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeFamilyMemberHistoryInner(element); + } + } + + protected void composeFamilyMemberHistoryInner(FamilyMemberHistory element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory(), false); + } + if (element.hasDataAbsentReason()) { + composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasGenderElement()) { + composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + } + if (element.hasBorn()) { + composeType("born", element.getBorn()); + } + if (element.hasAge()) { + composeType("age", element.getAge()); + } + if (element.hasEstimatedAgeElement()) { + composeBooleanCore("estimatedAge", element.getEstimatedAgeElement(), false); + composeBooleanExtras("estimatedAge", element.getEstimatedAgeElement(), false); + } + if (element.hasDeceased()) { + composeType("deceased", element.getDeceased()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasCondition()) { + openArray("condition"); + for (FamilyMemberHistory.FamilyMemberHistoryConditionComponent e : element.getCondition()) + composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(null, e); + closeArray(); + }; + } + + protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { + if (element != null) { + open(name); + composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentInner(element); + close(); + } + } + + protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentInner(FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasOnset()) { + composeType("onset", element.getOnset()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeFlag(String name, Flag element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeFlagInner(element); + } + } + + protected void composeFlagInner(Flag element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + } + + protected void composeGoal(String name, Goal element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeGoalInner(element); + } + } + + protected void composeGoalInner(Goal element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Goal.GoalStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Goal.GoalStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasDescription()) { + composeCodeableConcept("description", element.getDescription()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasStart()) { + composeType("start", element.getStart()); + } + if (element.hasTarget()) { + composeGoalGoalTargetComponent("target", element.getTarget()); + } + if (element.hasStatusDateElement()) { + composeDateCore("statusDate", element.getStatusDateElement(), false); + composeDateExtras("statusDate", element.getStatusDateElement(), false); + } + if (element.hasStatusReasonElement()) { + composeStringCore("statusReason", element.getStatusReasonElement(), false); + composeStringExtras("statusReason", element.getStatusReasonElement(), false); + } + if (element.hasExpressedBy()) { + composeReference("expressedBy", element.getExpressedBy()); + } + if (element.hasAddresses()) { + openArray("addresses"); + for (Reference e : element.getAddresses()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasOutcomeCode()) { + openArray("outcomeCode"); + for (CodeableConcept e : element.getOutcomeCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasOutcomeReference()) { + openArray("outcomeReference"); + for (Reference e : element.getOutcomeReference()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeGoalGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException { + if (element != null) { + open(name); + composeGoalGoalTargetComponentInner(element); + close(); + } + } + + protected void composeGoalGoalTargetComponentInner(Goal.GoalTargetComponent element) throws IOException { + composeBackbone(element); + if (element.hasMeasure()) { + composeCodeableConcept("measure", element.getMeasure()); + } + if (element.hasDetail()) { + composeType("detail", element.getDetail()); + } + if (element.hasDue()) { + composeType("due", element.getDue()); + } + } + + protected void composeGraphDefinition(String name, GraphDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeGraphDefinitionInner(element); + } + } + + protected void composeGraphDefinitionInner(GraphDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasStartElement()) { + composeCodeCore("start", element.getStartElement(), false); + composeCodeExtras("start", element.getStartElement(), false); + } + if (element.hasProfileElement()) { + composeUriCore("profile", element.getProfileElement(), false); + composeUriExtras("profile", element.getProfileElement(), false); + } + if (element.hasLink()) { + openArray("link"); + for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) + composeGraphDefinitionGraphDefinitionLinkComponent(null, e); + closeArray(); + }; + } + + protected void composeGraphDefinitionGraphDefinitionLinkComponent(String name, GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { + if (element != null) { + open(name); + composeGraphDefinitionGraphDefinitionLinkComponentInner(element); + close(); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkComponentInner(GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { + composeBackbone(element); + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasSliceNameElement()) { + composeStringCore("sliceName", element.getSliceNameElement(), false); + composeStringExtras("sliceName", element.getSliceNameElement(), false); + } + if (element.hasMinElement()) { + composeIntegerCore("min", element.getMinElement(), false); + composeIntegerExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasTarget()) { + openArray("target"); + for (GraphDefinition.GraphDefinitionLinkTargetComponent e : element.getTarget()) + composeGraphDefinitionGraphDefinitionLinkTargetComponent(null, e); + closeArray(); + }; + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(String name, GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { + if (element != null) { + open(name); + composeGraphDefinitionGraphDefinitionLinkTargetComponentInner(element); + close(); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetComponentInner(GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasParamsElement()) { + composeStringCore("params", element.getParamsElement(), false); + composeStringExtras("params", element.getParamsElement(), false); + } + if (element.hasProfileElement()) { + composeUriCore("profile", element.getProfileElement(), false); + composeUriExtras("profile", element.getProfileElement(), false); + } + if (element.hasCompartment()) { + openArray("compartment"); + for (GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent e : element.getCompartment()) + composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(null, e); + closeArray(); + }; + if (element.hasLink()) { + openArray("link"); + for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) + composeGraphDefinitionGraphDefinitionLinkComponent(null, e); + closeArray(); + }; + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(String name, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { + if (element != null) { + open(name); + composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentInner(element); + close(); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentInner(GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { + composeBackbone(element); + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory(), false); + } + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory(), false); + } + if (element.hasRuleElement()) { + composeEnumerationCore("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(), false); + composeEnumerationExtras("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + } + + protected void composeGroup(String name, Group element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeGroupInner(element); + } + } + + protected void composeGroupInner(Group element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Group.GroupTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Group.GroupTypeEnumFactory(), false); + } + if (element.hasActualElement()) { + composeBooleanCore("actual", element.getActualElement(), false); + composeBooleanExtras("actual", element.getActualElement(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasQuantityElement()) { + composeUnsignedIntCore("quantity", element.getQuantityElement(), false); + composeUnsignedIntExtras("quantity", element.getQuantityElement(), false); + } + if (element.hasCharacteristic()) { + openArray("characteristic"); + for (Group.GroupCharacteristicComponent e : element.getCharacteristic()) + composeGroupGroupCharacteristicComponent(null, e); + closeArray(); + }; + if (element.hasMember()) { + openArray("member"); + for (Group.GroupMemberComponent e : element.getMember()) + composeGroupGroupMemberComponent(null, e); + closeArray(); + }; + } + + protected void composeGroupGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element) throws IOException { + if (element != null) { + open(name); + composeGroupGroupCharacteristicComponentInner(element); + close(); + } + } + + protected void composeGroupGroupCharacteristicComponentInner(Group.GroupCharacteristicComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasExcludeElement()) { + composeBooleanCore("exclude", element.getExcludeElement(), false); + composeBooleanExtras("exclude", element.getExcludeElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeGroupGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException { + if (element != null) { + open(name); + composeGroupGroupMemberComponentInner(element); + close(); + } + } + + protected void composeGroupGroupMemberComponentInner(Group.GroupMemberComponent element) throws IOException { + composeBackbone(element); + if (element.hasEntity()) { + composeReference("entity", element.getEntity()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasInactiveElement()) { + composeBooleanCore("inactive", element.getInactiveElement(), false); + composeBooleanExtras("inactive", element.getInactiveElement(), false); + } + } + + protected void composeGuidanceResponse(String name, GuidanceResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeGuidanceResponseInner(element); + } + } + + protected void composeGuidanceResponseInner(GuidanceResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasRequestIdElement()) { + composeIdCore("requestId", element.getRequestIdElement(), false); + composeIdExtras("requestId", element.getRequestIdElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasModule()) { + composeReference("module", element.getModule()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrenceDateTimeElement()) { + composeDateTimeCore("occurrenceDateTime", element.getOccurrenceDateTimeElement(), false); + composeDateTimeExtras("occurrenceDateTime", element.getOccurrenceDateTimeElement(), false); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasEvaluationMessage()) { + openArray("evaluationMessage"); + for (Reference e : element.getEvaluationMessage()) + composeReference(null, e); + closeArray(); + }; + if (element.hasOutputParameters()) { + composeReference("outputParameters", element.getOutputParameters()); + } + if (element.hasResult()) { + composeReference("result", element.getResult()); + } + if (element.hasDataRequirement()) { + openArray("dataRequirement"); + for (DataRequirement e : element.getDataRequirement()) + composeDataRequirement(null, e); + closeArray(); + }; + } + + protected void composeHealthcareService(String name, HealthcareService element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeHealthcareServiceInner(element); + } + } + + protected void composeHealthcareServiceInner(HealthcareService element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasProvidedBy()) { + composeReference("providedBy", element.getProvidedBy()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialty()) { + openArray("specialty"); + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasLocation()) { + openArray("location"); + for (Reference e : element.getLocation()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasExtraDetailsElement()) { + composeStringCore("extraDetails", element.getExtraDetailsElement(), false); + composeStringExtras("extraDetails", element.getExtraDetailsElement(), false); + } + if (element.hasPhoto()) { + composeAttachment("photo", element.getPhoto()); + } + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasCoverageArea()) { + openArray("coverageArea"); + for (Reference e : element.getCoverageArea()) + composeReference(null, e); + closeArray(); + }; + if (element.hasServiceProvisionCode()) { + openArray("serviceProvisionCode"); + for (CodeableConcept e : element.getServiceProvisionCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasEligibility()) { + composeCodeableConcept("eligibility", element.getEligibility()); + } + if (element.hasEligibilityNoteElement()) { + composeStringCore("eligibilityNote", element.getEligibilityNoteElement(), false); + composeStringExtras("eligibilityNote", element.getEligibilityNoteElement(), false); + } + if (element.hasProgramName()) { + openArray("programName"); + for (StringType e : element.getProgramName()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getProgramName())) { + openArray("_programName"); + for (StringType e : element.getProgramName()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasCharacteristic()) { + openArray("characteristic"); + for (CodeableConcept e : element.getCharacteristic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReferralMethod()) { + openArray("referralMethod"); + for (CodeableConcept e : element.getReferralMethod()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasAppointmentRequiredElement()) { + composeBooleanCore("appointmentRequired", element.getAppointmentRequiredElement(), false); + composeBooleanExtras("appointmentRequired", element.getAppointmentRequiredElement(), false); + } + if (element.hasAvailableTime()) { + openArray("availableTime"); + for (HealthcareService.HealthcareServiceAvailableTimeComponent e : element.getAvailableTime()) + composeHealthcareServiceHealthcareServiceAvailableTimeComponent(null, e); + closeArray(); + }; + if (element.hasNotAvailable()) { + openArray("notAvailable"); + for (HealthcareService.HealthcareServiceNotAvailableComponent e : element.getNotAvailable()) + composeHealthcareServiceHealthcareServiceNotAvailableComponent(null, e); + closeArray(); + }; + if (element.hasAvailabilityExceptionsElement()) { + composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); + composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); + } + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(String name, HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { + if (element != null) { + open(name); + composeHealthcareServiceHealthcareServiceAvailableTimeComponentInner(element); + close(); + } + } + + protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponentInner(HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { + composeBackbone(element); + if (element.hasDaysOfWeek()) { + openArray("daysOfWeek"); + for (Enumeration e : element.getDaysOfWeek()) + composeEnumerationCore(null, e, new HealthcareService.DaysOfWeekEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getDaysOfWeek())) { + openArray("_daysOfWeek"); + for (Enumeration e : element.getDaysOfWeek()) + composeEnumerationExtras(null, e, new HealthcareService.DaysOfWeekEnumFactory(), true); + closeArray(); + } + }; + if (element.hasAllDayElement()) { + composeBooleanCore("allDay", element.getAllDayElement(), false); + composeBooleanExtras("allDay", element.getAllDayElement(), false); + } + if (element.hasAvailableStartTimeElement()) { + composeTimeCore("availableStartTime", element.getAvailableStartTimeElement(), false); + composeTimeExtras("availableStartTime", element.getAvailableStartTimeElement(), false); + } + if (element.hasAvailableEndTimeElement()) { + composeTimeCore("availableEndTime", element.getAvailableEndTimeElement(), false); + composeTimeExtras("availableEndTime", element.getAvailableEndTimeElement(), false); + } + } + + protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(String name, HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { + if (element != null) { + open(name); + composeHealthcareServiceHealthcareServiceNotAvailableComponentInner(element); + close(); + } + } + + protected void composeHealthcareServiceHealthcareServiceNotAvailableComponentInner(HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasDuring()) { + composePeriod("during", element.getDuring()); + } + } + + protected void composeImagingManifest(String name, ImagingManifest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeImagingManifestInner(element); + } + } + + protected void composeImagingManifestInner(ImagingManifest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasAuthoringTimeElement()) { + composeDateTimeCore("authoringTime", element.getAuthoringTimeElement(), false); + composeDateTimeExtras("authoringTime", element.getAuthoringTimeElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasStudy()) { + openArray("study"); + for (ImagingManifest.StudyComponent e : element.getStudy()) + composeImagingManifestStudyComponent(null, e); + closeArray(); + }; + } + + protected void composeImagingManifestStudyComponent(String name, ImagingManifest.StudyComponent element) throws IOException { + if (element != null) { + open(name); + composeImagingManifestStudyComponentInner(element); + close(); + } + } + + protected void composeImagingManifestStudyComponentInner(ImagingManifest.StudyComponent element) throws IOException { + composeBackbone(element); + if (element.hasUidElement()) { + composeOidCore("uid", element.getUidElement(), false); + composeOidExtras("uid", element.getUidElement(), false); + } + if (element.hasImagingStudy()) { + composeReference("imagingStudy", element.getImagingStudy()); + } + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSeries()) { + openArray("series"); + for (ImagingManifest.SeriesComponent e : element.getSeries()) + composeImagingManifestSeriesComponent(null, e); + closeArray(); + }; + } + + protected void composeImagingManifestSeriesComponent(String name, ImagingManifest.SeriesComponent element) throws IOException { + if (element != null) { + open(name); + composeImagingManifestSeriesComponentInner(element); + close(); + } + } + + protected void composeImagingManifestSeriesComponentInner(ImagingManifest.SeriesComponent element) throws IOException { + composeBackbone(element); + if (element.hasUidElement()) { + composeOidCore("uid", element.getUidElement(), false); + composeOidExtras("uid", element.getUidElement(), false); + } + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + if (element.hasInstance()) { + openArray("instance"); + for (ImagingManifest.InstanceComponent e : element.getInstance()) + composeImagingManifestInstanceComponent(null, e); + closeArray(); + }; + } + + protected void composeImagingManifestInstanceComponent(String name, ImagingManifest.InstanceComponent element) throws IOException { + if (element != null) { + open(name); + composeImagingManifestInstanceComponentInner(element); + close(); + } + } + + protected void composeImagingManifestInstanceComponentInner(ImagingManifest.InstanceComponent element) throws IOException { + composeBackbone(element); + if (element.hasSopClassElement()) { + composeOidCore("sopClass", element.getSopClassElement(), false); + composeOidExtras("sopClass", element.getSopClassElement(), false); + } + if (element.hasUidElement()) { + composeOidCore("uid", element.getUidElement(), false); + composeOidExtras("uid", element.getUidElement(), false); + } + if (element.hasFrameNumber()) { + openArray("frameNumber"); + for (UnsignedIntType e : element.getFrameNumber()) + composeUnsignedIntCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getFrameNumber())) { + openArray("_frameNumber"); + for (UnsignedIntType e : element.getFrameNumber()) + composeUnsignedIntExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeImagingStudy(String name, ImagingStudy element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeImagingStudyInner(element); + } + } + + protected void composeImagingStudyInner(ImagingStudy element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUidElement()) { + composeOidCore("uid", element.getUidElement(), false); + composeOidExtras("uid", element.getUidElement(), false); + } + if (element.hasAccession()) { + composeIdentifier("accession", element.getAccession()); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasAvailabilityElement()) { + composeEnumerationCore("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); + composeEnumerationExtras("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); + } + if (element.hasModalityList()) { + openArray("modalityList"); + for (Coding e : element.getModalityList()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasStartedElement()) { + composeDateTimeCore("started", element.getStartedElement(), false); + composeDateTimeExtras("started", element.getStartedElement(), false); + } + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReferrer()) { + composeReference("referrer", element.getReferrer()); + } + if (element.hasInterpreter()) { + openArray("interpreter"); + for (Reference e : element.getInterpreter()) + composeReference(null, e); + closeArray(); + }; + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNumberOfSeriesElement()) { + composeUnsignedIntCore("numberOfSeries", element.getNumberOfSeriesElement(), false); + composeUnsignedIntExtras("numberOfSeries", element.getNumberOfSeriesElement(), false); + } + if (element.hasNumberOfInstancesElement()) { + composeUnsignedIntCore("numberOfInstances", element.getNumberOfInstancesElement(), false); + composeUnsignedIntExtras("numberOfInstances", element.getNumberOfInstancesElement(), false); + } + if (element.hasProcedureReference()) { + openArray("procedureReference"); + for (Reference e : element.getProcedureReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasProcedureCode()) { + openArray("procedureCode"); + for (CodeableConcept e : element.getProcedureCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasSeries()) { + openArray("series"); + for (ImagingStudy.ImagingStudySeriesComponent e : element.getSeries()) + composeImagingStudyImagingStudySeriesComponent(null, e); + closeArray(); + }; + } + + protected void composeImagingStudyImagingStudySeriesComponent(String name, ImagingStudy.ImagingStudySeriesComponent element) throws IOException { + if (element != null) { + open(name); + composeImagingStudyImagingStudySeriesComponentInner(element); + close(); + } + } + + protected void composeImagingStudyImagingStudySeriesComponentInner(ImagingStudy.ImagingStudySeriesComponent element) throws IOException { + composeBackbone(element); + if (element.hasUidElement()) { + composeOidCore("uid", element.getUidElement(), false); + composeOidExtras("uid", element.getUidElement(), false); + } + if (element.hasNumberElement()) { + composeUnsignedIntCore("number", element.getNumberElement(), false); + composeUnsignedIntExtras("number", element.getNumberElement(), false); + } + if (element.hasModality()) { + composeCoding("modality", element.getModality()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasNumberOfInstancesElement()) { + composeUnsignedIntCore("numberOfInstances", element.getNumberOfInstancesElement(), false); + composeUnsignedIntExtras("numberOfInstances", element.getNumberOfInstancesElement(), false); + } + if (element.hasAvailabilityElement()) { + composeEnumerationCore("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); + composeEnumerationExtras("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory(), false); + } + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + composeCoding("bodySite", element.getBodySite()); + } + if (element.hasLaterality()) { + composeCoding("laterality", element.getLaterality()); + } + if (element.hasStartedElement()) { + composeDateTimeCore("started", element.getStartedElement(), false); + composeDateTimeExtras("started", element.getStartedElement(), false); + } + if (element.hasPerformer()) { + openArray("performer"); + for (Reference e : element.getPerformer()) + composeReference(null, e); + closeArray(); + }; + if (element.hasInstance()) { + openArray("instance"); + for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance()) + composeImagingStudyImagingStudySeriesInstanceComponent(null, e); + closeArray(); + }; + } + + protected void composeImagingStudyImagingStudySeriesInstanceComponent(String name, ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { + if (element != null) { + open(name); + composeImagingStudyImagingStudySeriesInstanceComponentInner(element); + close(); + } + } + + protected void composeImagingStudyImagingStudySeriesInstanceComponentInner(ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { + composeBackbone(element); + if (element.hasUidElement()) { + composeOidCore("uid", element.getUidElement(), false); + composeOidExtras("uid", element.getUidElement(), false); + } + if (element.hasNumberElement()) { + composeUnsignedIntCore("number", element.getNumberElement(), false); + composeUnsignedIntExtras("number", element.getNumberElement(), false); + } + if (element.hasSopClassElement()) { + composeOidCore("sopClass", element.getSopClassElement(), false); + composeOidExtras("sopClass", element.getSopClassElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + } + + protected void composeImmunization(String name, Immunization element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeImmunizationInner(element); + } + } + + protected void composeImmunizationInner(Immunization element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory(), false); + } + if (element.hasNotGivenElement()) { + composeBooleanCore("notGiven", element.getNotGivenElement(), false); + composeBooleanExtras("notGiven", element.getNotGivenElement(), false); + } + if (element.hasVaccineCode()) { + composeCodeableConcept("vaccineCode", element.getVaccineCode()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPrimarySourceElement()) { + composeBooleanCore("primarySource", element.getPrimarySourceElement(), false); + composeBooleanExtras("primarySource", element.getPrimarySourceElement(), false); + } + if (element.hasReportOrigin()) { + composeCodeableConcept("reportOrigin", element.getReportOrigin()); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasManufacturer()) { + composeReference("manufacturer", element.getManufacturer()); + } + if (element.hasLotNumberElement()) { + composeStringCore("lotNumber", element.getLotNumberElement(), false); + composeStringExtras("lotNumber", element.getLotNumberElement(), false); + } + if (element.hasExpirationDateElement()) { + composeDateCore("expirationDate", element.getExpirationDateElement(), false); + composeDateExtras("expirationDate", element.getExpirationDateElement(), false); + } + if (element.hasSite()) { + composeCodeableConcept("site", element.getSite()); + } + if (element.hasRoute()) { + composeCodeableConcept("route", element.getRoute()); + } + if (element.hasDoseQuantity()) { + composeSimpleQuantity("doseQuantity", element.getDoseQuantity()); + } + if (element.hasPractitioner()) { + openArray("practitioner"); + for (Immunization.ImmunizationPractitionerComponent e : element.getPractitioner()) + composeImmunizationImmunizationPractitionerComponent(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasExplanation()) { + composeImmunizationImmunizationExplanationComponent("explanation", element.getExplanation()); + } + if (element.hasReaction()) { + openArray("reaction"); + for (Immunization.ImmunizationReactionComponent e : element.getReaction()) + composeImmunizationImmunizationReactionComponent(null, e); + closeArray(); + }; + if (element.hasVaccinationProtocol()) { + openArray("vaccinationProtocol"); + for (Immunization.ImmunizationVaccinationProtocolComponent e : element.getVaccinationProtocol()) + composeImmunizationImmunizationVaccinationProtocolComponent(null, e); + closeArray(); + }; + } + + protected void composeImmunizationImmunizationPractitionerComponent(String name, Immunization.ImmunizationPractitionerComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationImmunizationPractitionerComponentInner(element); + close(); + } + } + + protected void composeImmunizationImmunizationPractitionerComponentInner(Immunization.ImmunizationPractitionerComponent element) throws IOException { + composeBackbone(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + } + + protected void composeImmunizationImmunizationExplanationComponent(String name, Immunization.ImmunizationExplanationComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationImmunizationExplanationComponentInner(element); + close(); + } + } + + protected void composeImmunizationImmunizationExplanationComponentInner(Immunization.ImmunizationExplanationComponent element) throws IOException { + composeBackbone(element); + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonNotGiven()) { + openArray("reasonNotGiven"); + for (CodeableConcept e : element.getReasonNotGiven()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composeImmunizationImmunizationReactionComponent(String name, Immunization.ImmunizationReactionComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationImmunizationReactionComponentInner(element); + close(); + } + } + + protected void composeImmunizationImmunizationReactionComponentInner(Immunization.ImmunizationReactionComponent element) throws IOException { + composeBackbone(element); + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasDetail()) { + composeReference("detail", element.getDetail()); + } + if (element.hasReportedElement()) { + composeBooleanCore("reported", element.getReportedElement(), false); + composeBooleanExtras("reported", element.getReportedElement(), false); + } + } + + protected void composeImmunizationImmunizationVaccinationProtocolComponent(String name, Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationImmunizationVaccinationProtocolComponentInner(element); + close(); + } + } + + protected void composeImmunizationImmunizationVaccinationProtocolComponentInner(Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { + composeBackbone(element); + if (element.hasDoseSequenceElement()) { + composePositiveIntCore("doseSequence", element.getDoseSequenceElement(), false); + composePositiveIntExtras("doseSequence", element.getDoseSequenceElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasAuthority()) { + composeReference("authority", element.getAuthority()); + } + if (element.hasSeriesElement()) { + composeStringCore("series", element.getSeriesElement(), false); + composeStringExtras("series", element.getSeriesElement(), false); + } + if (element.hasSeriesDosesElement()) { + composePositiveIntCore("seriesDoses", element.getSeriesDosesElement(), false); + composePositiveIntExtras("seriesDoses", element.getSeriesDosesElement(), false); + } + if (element.hasTargetDisease()) { + openArray("targetDisease"); + for (CodeableConcept e : element.getTargetDisease()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDoseStatus()) { + composeCodeableConcept("doseStatus", element.getDoseStatus()); + } + if (element.hasDoseStatusReason()) { + composeCodeableConcept("doseStatusReason", element.getDoseStatusReason()); + } + } + + protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeImmunizationRecommendationInner(element); + } + } + + protected void composeImmunizationRecommendationInner(ImmunizationRecommendation element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasRecommendation()) { + openArray("recommendation"); + for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent e : element.getRecommendation()) + composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(null, e); + closeArray(); + }; + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(element); + close(); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { + composeBackbone(element); + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasVaccineCode()) { + composeCodeableConcept("vaccineCode", element.getVaccineCode()); + } + if (element.hasTargetDisease()) { + composeCodeableConcept("targetDisease", element.getTargetDisease()); + } + if (element.hasDoseNumberElement()) { + composePositiveIntCore("doseNumber", element.getDoseNumberElement(), false); + composePositiveIntExtras("doseNumber", element.getDoseNumberElement(), false); + } + if (element.hasForecastStatus()) { + composeCodeableConcept("forecastStatus", element.getForecastStatus()); + } + if (element.hasDateCriterion()) { + openArray("dateCriterion"); + for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element.getDateCriterion()) + composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(null, e); + closeArray(); + }; + if (element.hasProtocol()) { + composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent("protocol", element.getProtocol()); + } + if (element.hasSupportingImmunization()) { + openArray("supportingImmunization"); + for (Reference e : element.getSupportingImmunization()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSupportingPatientInformation()) { + openArray("supportingPatientInformation"); + for (Reference e : element.getSupportingPatientInformation()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentInner(element); + close(); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasValueElement()) { + composeDateTimeCore("value", element.getValueElement(), false); + composeDateTimeExtras("value", element.getValueElement(), false); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { + if (element != null) { + open(name); + composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentInner(element); + close(); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { + composeBackbone(element); + if (element.hasDoseSequenceElement()) { + composePositiveIntCore("doseSequence", element.getDoseSequenceElement(), false); + composePositiveIntExtras("doseSequence", element.getDoseSequenceElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasAuthority()) { + composeReference("authority", element.getAuthority()); + } + if (element.hasSeriesElement()) { + composeStringCore("series", element.getSeriesElement(), false); + composeStringExtras("series", element.getSeriesElement(), false); + } + } + + protected void composeImplementationGuide(String name, ImplementationGuide element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeImplementationGuideInner(element); + } + } + + protected void composeImplementationGuideInner(ImplementationGuide element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasFhirVersionElement()) { + composeIdCore("fhirVersion", element.getFhirVersionElement(), false); + composeIdExtras("fhirVersion", element.getFhirVersionElement(), false); + } + if (element.hasDependency()) { + openArray("dependency"); + for (ImplementationGuide.ImplementationGuideDependencyComponent e : element.getDependency()) + composeImplementationGuideImplementationGuideDependencyComponent(null, e); + closeArray(); + }; + if (element.hasPackage()) { + openArray("package"); + for (ImplementationGuide.ImplementationGuidePackageComponent e : element.getPackage()) + composeImplementationGuideImplementationGuidePackageComponent(null, e); + closeArray(); + }; + if (element.hasGlobal()) { + openArray("global"); + for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal()) + composeImplementationGuideImplementationGuideGlobalComponent(null, e); + closeArray(); + }; + if (element.hasBinary()) { + openArray("binary"); + for (UriType e : element.getBinary()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getBinary())) { + openArray("_binary"); + for (UriType e : element.getBinary()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPage()) { + composeImplementationGuideImplementationGuidePageComponent("page", element.getPage()); + } + } + + protected void composeImplementationGuideImplementationGuideDependencyComponent(String name, ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { + if (element != null) { + open(name); + composeImplementationGuideImplementationGuideDependencyComponentInner(element); + close(); + } + } + + protected void composeImplementationGuideImplementationGuideDependencyComponentInner(ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new ImplementationGuide.GuideDependencyTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new ImplementationGuide.GuideDependencyTypeEnumFactory(), false); + } + if (element.hasUriElement()) { + composeUriCore("uri", element.getUriElement(), false); + composeUriExtras("uri", element.getUriElement(), false); + } + } + + protected void composeImplementationGuideImplementationGuidePackageComponent(String name, ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { + if (element != null) { + open(name); + composeImplementationGuideImplementationGuidePackageComponentInner(element); + close(); + } + } + + protected void composeImplementationGuideImplementationGuidePackageComponentInner(ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasResource()) { + openArray("resource"); + for (ImplementationGuide.ImplementationGuidePackageResourceComponent e : element.getResource()) + composeImplementationGuideImplementationGuidePackageResourceComponent(null, e); + closeArray(); + }; + } + + protected void composeImplementationGuideImplementationGuidePackageResourceComponent(String name, ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { + if (element != null) { + open(name); + composeImplementationGuideImplementationGuidePackageResourceComponentInner(element); + close(); + } + } + + protected void composeImplementationGuideImplementationGuidePackageResourceComponentInner(ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { + composeBackbone(element); + if (element.hasExampleElement()) { + composeBooleanCore("example", element.getExampleElement(), false); + composeBooleanExtras("example", element.getExampleElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasAcronymElement()) { + composeStringCore("acronym", element.getAcronymElement(), false); + composeStringExtras("acronym", element.getAcronymElement(), false); + } + if (element.hasSource()) { + composeType("source", element.getSource()); + } + if (element.hasExampleFor()) { + composeReference("exampleFor", element.getExampleFor()); + } + } + + protected void composeImplementationGuideImplementationGuideGlobalComponent(String name, ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { + if (element != null) { + open(name); + composeImplementationGuideImplementationGuideGlobalComponentInner(element); + close(); + } + } + + protected void composeImplementationGuideImplementationGuideGlobalComponentInner(ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + } + + protected void composeImplementationGuideImplementationGuidePageComponent(String name, ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { + if (element != null) { + open(name); + composeImplementationGuideImplementationGuidePageComponentInner(element); + close(); + } + } + + protected void composeImplementationGuideImplementationGuidePageComponentInner(ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { + composeBackbone(element); + if (element.hasSourceElement()) { + composeUriCore("source", element.getSourceElement(), false); + composeUriExtras("source", element.getSourceElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new ImplementationGuide.GuidePageKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new ImplementationGuide.GuidePageKindEnumFactory(), false); + } + if (element.hasType()) { + openArray("type"); + for (CodeType e : element.getType()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getType())) { + openArray("_type"); + for (CodeType e : element.getType()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPackage()) { + openArray("package"); + for (StringType e : element.getPackage()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPackage())) { + openArray("_package"); + for (StringType e : element.getPackage()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasFormatElement()) { + composeCodeCore("format", element.getFormatElement(), false); + composeCodeExtras("format", element.getFormatElement(), false); + } + if (element.hasPage()) { + openArray("page"); + for (ImplementationGuide.ImplementationGuidePageComponent e : element.getPage()) + composeImplementationGuideImplementationGuidePageComponent(null, e); + closeArray(); + }; + } + + protected void composeLibrary(String name, Library element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeLibraryInner(element); + } + } + + protected void composeLibraryInner(Library element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContributor()) { + openArray("contributor"); + for (Contributor e : element.getContributor()) + composeContributor(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasParameter()) { + openArray("parameter"); + for (ParameterDefinition e : element.getParameter()) + composeParameterDefinition(null, e); + closeArray(); + }; + if (element.hasDataRequirement()) { + openArray("dataRequirement"); + for (DataRequirement e : element.getDataRequirement()) + composeDataRequirement(null, e); + closeArray(); + }; + if (element.hasContent()) { + openArray("content"); + for (Attachment e : element.getContent()) + composeAttachment(null, e); + closeArray(); + }; + } + + protected void composeLinkage(String name, Linkage element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeLinkageInner(element); + } + } + + protected void composeLinkageInner(Linkage element) throws IOException { + composeDomainResourceElements(element); + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasItem()) { + openArray("item"); + for (Linkage.LinkageItemComponent e : element.getItem()) + composeLinkageLinkageItemComponent(null, e); + closeArray(); + }; + } + + protected void composeLinkageLinkageItemComponent(String name, Linkage.LinkageItemComponent element) throws IOException { + if (element != null) { + open(name); + composeLinkageLinkageItemComponentInner(element); + close(); + } + } + + protected void composeLinkageLinkageItemComponentInner(Linkage.LinkageItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory(), false); + } + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + } + + protected void composeListResource(String name, ListResource element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeListResourceInner(element); + } + } + + protected void composeListResourceInner(ListResource element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory(), false); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new ListResource.ListModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new ListResource.ListModeEnumFactory(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasOrderedBy()) { + composeCodeableConcept("orderedBy", element.getOrderedBy()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasEntry()) { + openArray("entry"); + for (ListResource.ListEntryComponent e : element.getEntry()) + composeListResourceListEntryComponent(null, e); + closeArray(); + }; + if (element.hasEmptyReason()) { + composeCodeableConcept("emptyReason", element.getEmptyReason()); + } + } + + protected void composeListResourceListEntryComponent(String name, ListResource.ListEntryComponent element) throws IOException { + if (element != null) { + open(name); + composeListResourceListEntryComponentInner(element); + close(); + } + } + + protected void composeListResourceListEntryComponentInner(ListResource.ListEntryComponent element) throws IOException { + composeBackbone(element); + if (element.hasFlag()) { + composeCodeableConcept("flag", element.getFlag()); + } + if (element.hasDeletedElement()) { + composeBooleanCore("deleted", element.getDeletedElement(), false); + composeBooleanExtras("deleted", element.getDeletedElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasItem()) { + composeReference("item", element.getItem()); + } + } + + protected void composeLocation(String name, Location element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeLocationInner(element); + } + } + + protected void composeLocationInner(Location element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Location.LocationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Location.LocationStatusEnumFactory(), false); + } + if (element.hasOperationalStatus()) { + composeCoding("operationalStatus", element.getOperationalStatus()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasAlias()) { + openArray("alias"); + for (StringType e : element.getAlias()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getAlias())) { + openArray("_alias"); + for (StringType e : element.getAlias()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new Location.LocationModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new Location.LocationModeEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasAddress()) { + composeAddress("address", element.getAddress()); + } + if (element.hasPhysicalType()) { + composeCodeableConcept("physicalType", element.getPhysicalType()); + } + if (element.hasPosition()) { + composeLocationLocationPositionComponent("position", element.getPosition()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasPartOf()) { + composeReference("partOf", element.getPartOf()); + } + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeLocationLocationPositionComponent(String name, Location.LocationPositionComponent element) throws IOException { + if (element != null) { + open(name); + composeLocationLocationPositionComponentInner(element); + close(); + } + } + + protected void composeLocationLocationPositionComponentInner(Location.LocationPositionComponent element) throws IOException { + composeBackbone(element); + if (element.hasLongitudeElement()) { + composeDecimalCore("longitude", element.getLongitudeElement(), false); + composeDecimalExtras("longitude", element.getLongitudeElement(), false); + } + if (element.hasLatitudeElement()) { + composeDecimalCore("latitude", element.getLatitudeElement(), false); + composeDecimalExtras("latitude", element.getLatitudeElement(), false); + } + if (element.hasAltitudeElement()) { + composeDecimalCore("altitude", element.getAltitudeElement(), false); + composeDecimalExtras("altitude", element.getAltitudeElement(), false); + } + } + + protected void composeMeasure(String name, Measure element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMeasureInner(element); + } + } + + protected void composeMeasureInner(Measure element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContributor()) { + openArray("contributor"); + for (Contributor e : element.getContributor()) + composeContributor(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasLibrary()) { + openArray("library"); + for (Reference e : element.getLibrary()) + composeReference(null, e); + closeArray(); + }; + if (element.hasDisclaimerElement()) { + composeMarkdownCore("disclaimer", element.getDisclaimerElement(), false); + composeMarkdownExtras("disclaimer", element.getDisclaimerElement(), false); + } + if (element.hasScoring()) { + composeCodeableConcept("scoring", element.getScoring()); + } + if (element.hasCompositeScoring()) { + composeCodeableConcept("compositeScoring", element.getCompositeScoring()); + } + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasRiskAdjustmentElement()) { + composeStringCore("riskAdjustment", element.getRiskAdjustmentElement(), false); + composeStringExtras("riskAdjustment", element.getRiskAdjustmentElement(), false); + } + if (element.hasRateAggregationElement()) { + composeStringCore("rateAggregation", element.getRateAggregationElement(), false); + composeStringExtras("rateAggregation", element.getRateAggregationElement(), false); + } + if (element.hasRationaleElement()) { + composeMarkdownCore("rationale", element.getRationaleElement(), false); + composeMarkdownExtras("rationale", element.getRationaleElement(), false); + } + if (element.hasClinicalRecommendationStatementElement()) { + composeMarkdownCore("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), false); + composeMarkdownExtras("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), false); + } + if (element.hasImprovementNotationElement()) { + composeStringCore("improvementNotation", element.getImprovementNotationElement(), false); + composeStringExtras("improvementNotation", element.getImprovementNotationElement(), false); + } + if (element.hasDefinition()) { + openArray("definition"); + for (MarkdownType e : element.getDefinition()) + composeMarkdownCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getDefinition())) { + openArray("_definition"); + for (MarkdownType e : element.getDefinition()) + composeMarkdownExtras(null, e, true); + closeArray(); + } + }; + if (element.hasGuidanceElement()) { + composeMarkdownCore("guidance", element.getGuidanceElement(), false); + composeMarkdownExtras("guidance", element.getGuidanceElement(), false); + } + if (element.hasSetElement()) { + composeStringCore("set", element.getSetElement(), false); + composeStringExtras("set", element.getSetElement(), false); + } + if (element.hasGroup()) { + openArray("group"); + for (Measure.MeasureGroupComponent e : element.getGroup()) + composeMeasureMeasureGroupComponent(null, e); + closeArray(); + }; + if (element.hasSupplementalData()) { + openArray("supplementalData"); + for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData()) + composeMeasureMeasureSupplementalDataComponent(null, e); + closeArray(); + }; + } + + protected void composeMeasureMeasureGroupComponent(String name, Measure.MeasureGroupComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureMeasureGroupComponentInner(element); + close(); + } + } + + protected void composeMeasureMeasureGroupComponentInner(Measure.MeasureGroupComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPopulation()) { + openArray("population"); + for (Measure.MeasureGroupPopulationComponent e : element.getPopulation()) + composeMeasureMeasureGroupPopulationComponent(null, e); + closeArray(); + }; + if (element.hasStratifier()) { + openArray("stratifier"); + for (Measure.MeasureGroupStratifierComponent e : element.getStratifier()) + composeMeasureMeasureGroupStratifierComponent(null, e); + closeArray(); + }; + } + + protected void composeMeasureMeasureGroupPopulationComponent(String name, Measure.MeasureGroupPopulationComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureMeasureGroupPopulationComponentInner(element); + close(); + } + } + + protected void composeMeasureMeasureGroupPopulationComponentInner(Measure.MeasureGroupPopulationComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasCriteriaElement()) { + composeStringCore("criteria", element.getCriteriaElement(), false); + composeStringExtras("criteria", element.getCriteriaElement(), false); + } + } + + protected void composeMeasureMeasureGroupStratifierComponent(String name, Measure.MeasureGroupStratifierComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureMeasureGroupStratifierComponentInner(element); + close(); + } + } + + protected void composeMeasureMeasureGroupStratifierComponentInner(Measure.MeasureGroupStratifierComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCriteriaElement()) { + composeStringCore("criteria", element.getCriteriaElement(), false); + composeStringExtras("criteria", element.getCriteriaElement(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + } + + protected void composeMeasureMeasureSupplementalDataComponent(String name, Measure.MeasureSupplementalDataComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureMeasureSupplementalDataComponentInner(element); + close(); + } + } + + protected void composeMeasureMeasureSupplementalDataComponentInner(Measure.MeasureSupplementalDataComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasUsage()) { + openArray("usage"); + for (CodeableConcept e : element.getUsage()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCriteriaElement()) { + composeStringCore("criteria", element.getCriteriaElement(), false); + composeStringExtras("criteria", element.getCriteriaElement(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + } + + protected void composeMeasureReport(String name, MeasureReport element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMeasureReportInner(element); + } + } + + protected void composeMeasureReportInner(MeasureReport element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory(), false); + } + if (element.hasMeasure()) { + composeReference("measure", element.getMeasure()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasReportingOrganization()) { + composeReference("reportingOrganization", element.getReportingOrganization()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasGroup()) { + openArray("group"); + for (MeasureReport.MeasureReportGroupComponent e : element.getGroup()) + composeMeasureReportMeasureReportGroupComponent(null, e); + closeArray(); + }; + if (element.hasEvaluatedResources()) { + composeReference("evaluatedResources", element.getEvaluatedResources()); + } + } + + protected void composeMeasureReportMeasureReportGroupComponent(String name, MeasureReport.MeasureReportGroupComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureReportMeasureReportGroupComponentInner(element); + close(); + } + } + + protected void composeMeasureReportMeasureReportGroupComponentInner(MeasureReport.MeasureReportGroupComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasPopulation()) { + openArray("population"); + for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation()) + composeMeasureReportMeasureReportGroupPopulationComponent(null, e); + closeArray(); + }; + if (element.hasMeasureScoreElement()) { + composeDecimalCore("measureScore", element.getMeasureScoreElement(), false); + composeDecimalExtras("measureScore", element.getMeasureScoreElement(), false); + } + if (element.hasStratifier()) { + openArray("stratifier"); + for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier()) + composeMeasureReportMeasureReportGroupStratifierComponent(null, e); + closeArray(); + }; + } + + protected void composeMeasureReportMeasureReportGroupPopulationComponent(String name, MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureReportMeasureReportGroupPopulationComponentInner(element); + close(); + } + } + + protected void composeMeasureReportMeasureReportGroupPopulationComponentInner(MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasCountElement()) { + composeIntegerCore("count", element.getCountElement(), false); + composeIntegerExtras("count", element.getCountElement(), false); + } + if (element.hasPatients()) { + composeReference("patients", element.getPatients()); + } + } + + protected void composeMeasureReportMeasureReportGroupStratifierComponent(String name, MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureReportMeasureReportGroupStratifierComponentInner(element); + close(); + } + } + + protected void composeMeasureReportMeasureReportGroupStratifierComponentInner(MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStratum()) { + openArray("stratum"); + for (MeasureReport.StratifierGroupComponent e : element.getStratum()) + composeMeasureReportStratifierGroupComponent(null, e); + closeArray(); + }; + } + + protected void composeMeasureReportStratifierGroupComponent(String name, MeasureReport.StratifierGroupComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureReportStratifierGroupComponentInner(element); + close(); + } + } + + protected void composeMeasureReportStratifierGroupComponentInner(MeasureReport.StratifierGroupComponent element) throws IOException { + composeBackbone(element); + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + if (element.hasPopulation()) { + openArray("population"); + for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation()) + composeMeasureReportStratifierGroupPopulationComponent(null, e); + closeArray(); + }; + if (element.hasMeasureScoreElement()) { + composeDecimalCore("measureScore", element.getMeasureScoreElement(), false); + composeDecimalExtras("measureScore", element.getMeasureScoreElement(), false); + } + } + + protected void composeMeasureReportStratifierGroupPopulationComponent(String name, MeasureReport.StratifierGroupPopulationComponent element) throws IOException { + if (element != null) { + open(name); + composeMeasureReportStratifierGroupPopulationComponentInner(element); + close(); + } + } + + protected void composeMeasureReportStratifierGroupPopulationComponentInner(MeasureReport.StratifierGroupPopulationComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasCountElement()) { + composeIntegerCore("count", element.getCountElement(), false); + composeIntegerExtras("count", element.getCountElement(), false); + } + if (element.hasPatients()) { + composeReference("patients", element.getPatients()); + } + } + + protected void composeMedia(String name, Media element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMediaInner(element); + } + } + + protected void composeMediaInner(Media element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Media.DigitalMediaTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Media.DigitalMediaTypeEnumFactory(), false); + } + if (element.hasSubtype()) { + composeCodeableConcept("subtype", element.getSubtype()); + } + if (element.hasView()) { + composeCodeableConcept("view", element.getView()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasOperator()) { + composeReference("operator", element.getOperator()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasHeightElement()) { + composePositiveIntCore("height", element.getHeightElement(), false); + composePositiveIntExtras("height", element.getHeightElement(), false); + } + if (element.hasWidthElement()) { + composePositiveIntCore("width", element.getWidthElement(), false); + composePositiveIntExtras("width", element.getWidthElement(), false); + } + if (element.hasFramesElement()) { + composePositiveIntCore("frames", element.getFramesElement(), false); + composePositiveIntExtras("frames", element.getFramesElement(), false); + } + if (element.hasDurationElement()) { + composeUnsignedIntCore("duration", element.getDurationElement(), false); + composeUnsignedIntExtras("duration", element.getDurationElement(), false); + } + if (element.hasContent()) { + composeAttachment("content", element.getContent()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeMedication(String name, Medication element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMedicationInner(element); + } + } + + protected void composeMedicationInner(Medication element) throws IOException { + composeDomainResourceElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory(), false); + } + if (element.hasIsBrandElement()) { + composeBooleanCore("isBrand", element.getIsBrandElement(), false); + composeBooleanExtras("isBrand", element.getIsBrandElement(), false); + } + if (element.hasIsOverTheCounterElement()) { + composeBooleanCore("isOverTheCounter", element.getIsOverTheCounterElement(), false); + composeBooleanExtras("isOverTheCounter", element.getIsOverTheCounterElement(), false); + } + if (element.hasManufacturer()) { + composeReference("manufacturer", element.getManufacturer()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasIngredient()) { + openArray("ingredient"); + for (Medication.MedicationIngredientComponent e : element.getIngredient()) + composeMedicationMedicationIngredientComponent(null, e); + closeArray(); + }; + if (element.hasPackage()) { + composeMedicationMedicationPackageComponent("package", element.getPackage()); + } + if (element.hasImage()) { + openArray("image"); + for (Attachment e : element.getImage()) + composeAttachment(null, e); + closeArray(); + }; + } + + protected void composeMedicationMedicationIngredientComponent(String name, Medication.MedicationIngredientComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationMedicationIngredientComponentInner(element); + close(); + } + } + + protected void composeMedicationMedicationIngredientComponentInner(Medication.MedicationIngredientComponent element) throws IOException { + composeBackbone(element); + if (element.hasItem()) { + composeType("item", element.getItem()); + } + if (element.hasIsActiveElement()) { + composeBooleanCore("isActive", element.getIsActiveElement(), false); + composeBooleanExtras("isActive", element.getIsActiveElement(), false); + } + if (element.hasAmount()) { + composeRatio("amount", element.getAmount()); + } + } + + protected void composeMedicationMedicationPackageComponent(String name, Medication.MedicationPackageComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationMedicationPackageComponentInner(element); + close(); + } + } + + protected void composeMedicationMedicationPackageComponentInner(Medication.MedicationPackageComponent element) throws IOException { + composeBackbone(element); + if (element.hasContainer()) { + composeCodeableConcept("container", element.getContainer()); + } + if (element.hasContent()) { + openArray("content"); + for (Medication.MedicationPackageContentComponent e : element.getContent()) + composeMedicationMedicationPackageContentComponent(null, e); + closeArray(); + }; + if (element.hasBatch()) { + openArray("batch"); + for (Medication.MedicationPackageBatchComponent e : element.getBatch()) + composeMedicationMedicationPackageBatchComponent(null, e); + closeArray(); + }; + } + + protected void composeMedicationMedicationPackageContentComponent(String name, Medication.MedicationPackageContentComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationMedicationPackageContentComponentInner(element); + close(); + } + } + + protected void composeMedicationMedicationPackageContentComponentInner(Medication.MedicationPackageContentComponent element) throws IOException { + composeBackbone(element); + if (element.hasItem()) { + composeType("item", element.getItem()); + } + if (element.hasAmount()) { + composeSimpleQuantity("amount", element.getAmount()); + } + } + + protected void composeMedicationMedicationPackageBatchComponent(String name, Medication.MedicationPackageBatchComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationMedicationPackageBatchComponentInner(element); + close(); + } + } + + protected void composeMedicationMedicationPackageBatchComponentInner(Medication.MedicationPackageBatchComponent element) throws IOException { + composeBackbone(element); + if (element.hasLotNumberElement()) { + composeStringCore("lotNumber", element.getLotNumberElement(), false); + composeStringExtras("lotNumber", element.getLotNumberElement(), false); + } + if (element.hasExpirationDateElement()) { + composeDateTimeCore("expirationDate", element.getExpirationDateElement(), false); + composeDateTimeExtras("expirationDate", element.getExpirationDateElement(), false); + } + } + + protected void composeMedicationAdministration(String name, MedicationAdministration element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMedicationAdministrationInner(element); + } + } + + protected void composeMedicationAdministrationInner(MedicationAdministration element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusEnumFactory(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSupportingInformation()) { + openArray("supportingInformation"); + for (Reference e : element.getSupportingInformation()) + composeReference(null, e); + closeArray(); + }; + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } + if (element.hasPerformer()) { + openArray("performer"); + for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer()) + composeMedicationAdministrationMedicationAdministrationPerformerComponent(null, e); + closeArray(); + }; + if (element.hasNotGivenElement()) { + composeBooleanCore("notGiven", element.getNotGivenElement(), false); + composeBooleanExtras("notGiven", element.getNotGivenElement(), false); + } + if (element.hasReasonNotGiven()) { + openArray("reasonNotGiven"); + for (CodeableConcept e : element.getReasonNotGiven()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasDevice()) { + openArray("device"); + for (Reference e : element.getDevice()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasDosage()) { + composeMedicationAdministrationMedicationAdministrationDosageComponent("dosage", element.getDosage()); + } + if (element.hasEventHistory()) { + openArray("eventHistory"); + for (Reference e : element.getEventHistory()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(String name, MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationAdministrationMedicationAdministrationPerformerComponentInner(element); + close(); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationPerformerComponentInner(MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { + composeBackbone(element); + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(String name, MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationAdministrationMedicationAdministrationDosageComponentInner(element); + close(); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationDosageComponentInner(MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { + composeBackbone(element); + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasSite()) { + composeCodeableConcept("site", element.getSite()); + } + if (element.hasRoute()) { + composeCodeableConcept("route", element.getRoute()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasDose()) { + composeSimpleQuantity("dose", element.getDose()); + } + if (element.hasRate()) { + composeType("rate", element.getRate()); + } + } + + protected void composeMedicationDispense(String name, MedicationDispense element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMedicationDispenseInner(element); + } + } + + protected void composeMedicationDispenseInner(MedicationDispense element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusEnumFactory(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSupportingInformation()) { + openArray("supportingInformation"); + for (Reference e : element.getSupportingInformation()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPerformer()) { + openArray("performer"); + for (MedicationDispense.MedicationDispensePerformerComponent e : element.getPerformer()) + composeMedicationDispenseMedicationDispensePerformerComponent(null, e); + closeArray(); + }; + if (element.hasAuthorizingPrescription()) { + openArray("authorizingPrescription"); + for (Reference e : element.getAuthorizingPrescription()) + composeReference(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasDaysSupply()) { + composeSimpleQuantity("daysSupply", element.getDaysSupply()); + } + if (element.hasWhenPreparedElement()) { + composeDateTimeCore("whenPrepared", element.getWhenPreparedElement(), false); + composeDateTimeExtras("whenPrepared", element.getWhenPreparedElement(), false); + } + if (element.hasWhenHandedOverElement()) { + composeDateTimeCore("whenHandedOver", element.getWhenHandedOverElement(), false); + composeDateTimeExtras("whenHandedOver", element.getWhenHandedOverElement(), false); + } + if (element.hasDestination()) { + composeReference("destination", element.getDestination()); + } + if (element.hasReceiver()) { + openArray("receiver"); + for (Reference e : element.getReceiver()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasDosageInstruction()) { + openArray("dosageInstruction"); + for (Dosage e : element.getDosageInstruction()) + composeDosage(null, e); + closeArray(); + }; + if (element.hasSubstitution()) { + composeMedicationDispenseMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution()); + } + if (element.hasDetectedIssue()) { + openArray("detectedIssue"); + for (Reference e : element.getDetectedIssue()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNotDoneElement()) { + composeBooleanCore("notDone", element.getNotDoneElement(), false); + composeBooleanExtras("notDone", element.getNotDoneElement(), false); + } + if (element.hasNotDoneReason()) { + composeType("notDoneReason", element.getNotDoneReason()); + } + if (element.hasEventHistory()) { + openArray("eventHistory"); + for (Reference e : element.getEventHistory()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeMedicationDispenseMedicationDispensePerformerComponent(String name, MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationDispenseMedicationDispensePerformerComponentInner(element); + close(); + } + } + + protected void composeMedicationDispenseMedicationDispensePerformerComponentInner(MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { + composeBackbone(element); + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(String name, MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationDispenseMedicationDispenseSubstitutionComponentInner(element); + close(); + } + } + + protected void composeMedicationDispenseMedicationDispenseSubstitutionComponentInner(MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { + composeBackbone(element); + if (element.hasWasSubstitutedElement()) { + composeBooleanCore("wasSubstituted", element.getWasSubstitutedElement(), false); + composeBooleanExtras("wasSubstituted", element.getWasSubstitutedElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasResponsibleParty()) { + openArray("responsibleParty"); + for (Reference e : element.getResponsibleParty()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMedicationRequestInner(element); + } + } + + protected void composeMedicationRequestInner(MedicationRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new MedicationRequest.MedicationRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new MedicationRequest.MedicationRequestStatusEnumFactory(), false); + } + if (element.hasIntentElement()) { + composeEnumerationCore("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory(), false); + composeEnumerationExtras("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new MedicationRequest.MedicationRequestPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new MedicationRequest.MedicationRequestPriorityEnumFactory(), false); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSupportingInformation()) { + openArray("supportingInformation"); + for (Reference e : element.getSupportingInformation()) + composeReference(null, e); + closeArray(); + }; + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasRequester()) { + composeMedicationRequestMedicationRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasRecorder()) { + composeReference("recorder", element.getRecorder()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasDosageInstruction()) { + openArray("dosageInstruction"); + for (Dosage e : element.getDosageInstruction()) + composeDosage(null, e); + closeArray(); + }; + if (element.hasDispenseRequest()) { + composeMedicationRequestMedicationRequestDispenseRequestComponent("dispenseRequest", element.getDispenseRequest()); + } + if (element.hasSubstitution()) { + composeMedicationRequestMedicationRequestSubstitutionComponent("substitution", element.getSubstitution()); + } + if (element.hasPriorPrescription()) { + composeReference("priorPrescription", element.getPriorPrescription()); + } + if (element.hasDetectedIssue()) { + openArray("detectedIssue"); + for (Reference e : element.getDetectedIssue()) + composeReference(null, e); + closeArray(); + }; + if (element.hasEventHistory()) { + openArray("eventHistory"); + for (Reference e : element.getEventHistory()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeMedicationRequestMedicationRequestRequesterComponent(String name, MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationRequestMedicationRequestRequesterComponentInner(element); + close(); + } + } + + protected void composeMedicationRequestMedicationRequestRequesterComponentInner(MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(String name, MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationRequestMedicationRequestDispenseRequestComponentInner(element); + close(); + } + } + + protected void composeMedicationRequestMedicationRequestDispenseRequestComponentInner(MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { + composeBackbone(element); + if (element.hasValidityPeriod()) { + composePeriod("validityPeriod", element.getValidityPeriod()); + } + if (element.hasNumberOfRepeatsAllowedElement()) { + composeUnsignedIntCore("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), false); + composeUnsignedIntExtras("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), false); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasExpectedSupplyDuration()) { + composeDuration("expectedSupplyDuration", element.getExpectedSupplyDuration()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + } + + protected void composeMedicationRequestMedicationRequestSubstitutionComponent(String name, MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { + if (element != null) { + open(name); + composeMedicationRequestMedicationRequestSubstitutionComponentInner(element); + close(); + } + } + + protected void composeMedicationRequestMedicationRequestSubstitutionComponentInner(MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { + composeBackbone(element); + if (element.hasAllowedElement()) { + composeBooleanCore("allowed", element.getAllowedElement(), false); + composeBooleanExtras("allowed", element.getAllowedElement(), false); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + } + + protected void composeMedicationStatement(String name, MedicationStatement element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMedicationStatementInner(element); + } + } + + protected void composeMedicationStatementInner(MedicationStatement element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusEnumFactory(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } + if (element.hasDateAssertedElement()) { + composeDateTimeCore("dateAsserted", element.getDateAssertedElement(), false); + composeDateTimeExtras("dateAsserted", element.getDateAssertedElement(), false); + } + if (element.hasInformationSource()) { + composeReference("informationSource", element.getInformationSource()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasDerivedFrom()) { + openArray("derivedFrom"); + for (Reference e : element.getDerivedFrom()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTakenElement()) { + composeEnumerationCore("taken", element.getTakenElement(), new MedicationStatement.MedicationStatementTakenEnumFactory(), false); + composeEnumerationExtras("taken", element.getTakenElement(), new MedicationStatement.MedicationStatementTakenEnumFactory(), false); + } + if (element.hasReasonNotTaken()) { + openArray("reasonNotTaken"); + for (CodeableConcept e : element.getReasonNotTaken()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasDosage()) { + openArray("dosage"); + for (Dosage e : element.getDosage()) + composeDosage(null, e); + closeArray(); + }; + } + + protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMessageDefinitionInner(element); + } + } + + protected void composeMessageDefinitionInner(MessageDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasBase()) { + composeReference("base", element.getBase()); + } + if (element.hasParent()) { + openArray("parent"); + for (Reference e : element.getParent()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReplaces()) { + openArray("replaces"); + for (Reference e : element.getReplaces()) + composeReference(null, e); + closeArray(); + }; + if (element.hasEventElement()) { + composeUriCore("event", element.getEventElement(), false); + composeUriExtras("event", element.getEventElement(), false); + } + if (element.hasCategoryElement()) { + composeEnumerationCore("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory(), false); + composeEnumerationExtras("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory(), false); + } + if (element.hasFocus()) { + openArray("focus"); + for (MessageDefinition.MessageDefinitionFocusComponent e : element.getFocus()) + composeMessageDefinitionMessageDefinitionFocusComponent(null, e); + closeArray(); + }; + if (element.hasResponseRequiredElement()) { + composeBooleanCore("responseRequired", element.getResponseRequiredElement(), false); + composeBooleanExtras("responseRequired", element.getResponseRequiredElement(), false); + } + if (element.hasAllowedResponse()) { + openArray("allowedResponse"); + for (MessageDefinition.MessageDefinitionAllowedResponseComponent e : element.getAllowedResponse()) + composeMessageDefinitionMessageDefinitionAllowedResponseComponent(null, e); + closeArray(); + }; + } + + protected void composeMessageDefinitionMessageDefinitionFocusComponent(String name, MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { + if (element != null) { + open(name); + composeMessageDefinitionMessageDefinitionFocusComponentInner(element); + close(); + } + } + + protected void composeMessageDefinitionMessageDefinitionFocusComponentInner(MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + if (element.hasMinElement()) { + composeUnsignedIntCore("min", element.getMinElement(), false); + composeUnsignedIntExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + } + + protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { + if (element != null) { + open(name); + composeMessageDefinitionMessageDefinitionAllowedResponseComponentInner(element); + close(); + } + } + + protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponentInner(MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { + composeBackbone(element); + if (element.hasMessage()) { + composeReference("message", element.getMessage()); + } + if (element.hasSituationElement()) { + composeMarkdownCore("situation", element.getSituationElement(), false); + composeMarkdownExtras("situation", element.getSituationElement(), false); + } + } + + protected void composeMessageHeader(String name, MessageHeader element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeMessageHeaderInner(element); + } + } + + protected void composeMessageHeaderInner(MessageHeader element) throws IOException { + composeDomainResourceElements(element); + if (element.hasEvent()) { + composeCoding("event", element.getEvent()); + } + if (element.hasDestination()) { + openArray("destination"); + for (MessageHeader.MessageDestinationComponent e : element.getDestination()) + composeMessageHeaderMessageDestinationComponent(null, e); + closeArray(); + }; + if (element.hasSender()) { + composeReference("sender", element.getSender()); + } + if (element.hasTimestampElement()) { + composeInstantCore("timestamp", element.getTimestampElement(), false); + composeInstantExtras("timestamp", element.getTimestampElement(), false); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasSource()) { + composeMessageHeaderMessageSourceComponent("source", element.getSource()); + } + if (element.hasResponsible()) { + composeReference("responsible", element.getResponsible()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasResponse()) { + composeMessageHeaderMessageHeaderResponseComponent("response", element.getResponse()); + } + if (element.hasFocus()) { + openArray("focus"); + for (Reference e : element.getFocus()) + composeReference(null, e); + closeArray(); + }; + if (element.hasDefinitionElement()) { + composeUriCore("definition", element.getDefinitionElement(), false); + composeUriExtras("definition", element.getDefinitionElement(), false); + } + } + + protected void composeMessageHeaderMessageDestinationComponent(String name, MessageHeader.MessageDestinationComponent element) throws IOException { + if (element != null) { + open(name); + composeMessageHeaderMessageDestinationComponentInner(element); + close(); + } + } + + protected void composeMessageHeaderMessageDestinationComponentInner(MessageHeader.MessageDestinationComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasEndpointElement()) { + composeUriCore("endpoint", element.getEndpointElement(), false); + composeUriExtras("endpoint", element.getEndpointElement(), false); + } + if (element.hasReceiver()) { + composeReference("receiver", element.getReceiver()); + } + } + + protected void composeMessageHeaderMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element) throws IOException { + if (element != null) { + open(name); + composeMessageHeaderMessageSourceComponentInner(element); + close(); + } + } + + protected void composeMessageHeaderMessageSourceComponentInner(MessageHeader.MessageSourceComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasSoftwareElement()) { + composeStringCore("software", element.getSoftwareElement(), false); + composeStringExtras("software", element.getSoftwareElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasContact()) { + composeContactPoint("contact", element.getContact()); + } + if (element.hasEndpointElement()) { + composeUriCore("endpoint", element.getEndpointElement(), false); + composeUriExtras("endpoint", element.getEndpointElement(), false); + } + } + + protected void composeMessageHeaderMessageHeaderResponseComponent(String name, MessageHeader.MessageHeaderResponseComponent element) throws IOException { + if (element != null) { + open(name); + composeMessageHeaderMessageHeaderResponseComponentInner(element); + close(); + } + } + + protected void composeMessageHeaderMessageHeaderResponseComponentInner(MessageHeader.MessageHeaderResponseComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifierElement()) { + composeIdCore("identifier", element.getIdentifierElement(), false); + composeIdExtras("identifier", element.getIdentifierElement(), false); + } + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory(), false); + } + if (element.hasDetails()) { + composeReference("details", element.getDetails()); + } + } + + protected void composeNamingSystem(String name, NamingSystem element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeNamingSystemInner(element); + } + } + + protected void composeNamingSystemInner(NamingSystem element) throws IOException { + composeDomainResourceElements(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasResponsibleElement()) { + composeStringCore("responsible", element.getResponsibleElement(), false); + composeStringExtras("responsible", element.getResponsibleElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasUniqueId()) { + openArray("uniqueId"); + for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId()) + composeNamingSystemNamingSystemUniqueIdComponent(null, e); + closeArray(); + }; + if (element.hasReplacedBy()) { + composeReference("replacedBy", element.getReplacedBy()); + } + } + + protected void composeNamingSystemNamingSystemUniqueIdComponent(String name, NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { + if (element != null) { + open(name); + composeNamingSystemNamingSystemUniqueIdComponentInner(element); + close(); + } + } + + protected void composeNamingSystemNamingSystemUniqueIdComponentInner(NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + if (element.hasPreferredElement()) { + composeBooleanCore("preferred", element.getPreferredElement(), false); + composeBooleanExtras("preferred", element.getPreferredElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeNutritionOrderInner(element); + } + } + + protected void composeNutritionOrderInner(NutritionOrder element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateTimeElement()) { + composeDateTimeCore("dateTime", element.getDateTimeElement(), false); + composeDateTimeExtras("dateTime", element.getDateTimeElement(), false); + } + if (element.hasOrderer()) { + composeReference("orderer", element.getOrderer()); + } + if (element.hasAllergyIntolerance()) { + openArray("allergyIntolerance"); + for (Reference e : element.getAllergyIntolerance()) + composeReference(null, e); + closeArray(); + }; + if (element.hasFoodPreferenceModifier()) { + openArray("foodPreferenceModifier"); + for (CodeableConcept e : element.getFoodPreferenceModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasExcludeFoodModifier()) { + openArray("excludeFoodModifier"); + for (CodeableConcept e : element.getExcludeFoodModifier()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasOralDiet()) { + composeNutritionOrderNutritionOrderOralDietComponent("oralDiet", element.getOralDiet()); + } + if (element.hasSupplement()) { + openArray("supplement"); + for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement()) + composeNutritionOrderNutritionOrderSupplementComponent(null, e); + closeArray(); + }; + if (element.hasEnteralFormula()) { + composeNutritionOrderNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula()); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietComponent(String name, NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { + if (element != null) { + open(name); + composeNutritionOrderNutritionOrderOralDietComponentInner(element); + close(); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietComponentInner(NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSchedule()) { + openArray("schedule"); + for (Timing e : element.getSchedule()) + composeTiming(null, e); + closeArray(); + }; + if (element.hasNutrient()) { + openArray("nutrient"); + for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient()) + composeNutritionOrderNutritionOrderOralDietNutrientComponent(null, e); + closeArray(); + }; + if (element.hasTexture()) { + openArray("texture"); + for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture()) + composeNutritionOrderNutritionOrderOralDietTextureComponent(null, e); + closeArray(); + }; + if (element.hasFluidConsistencyType()) { + openArray("fluidConsistencyType"); + for (CodeableConcept e : element.getFluidConsistencyType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasInstructionElement()) { + composeStringCore("instruction", element.getInstructionElement(), false); + composeStringExtras("instruction", element.getInstructionElement(), false); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { + if (element != null) { + open(name); + composeNutritionOrderNutritionOrderOralDietNutrientComponentInner(element); + close(); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietNutrientComponentInner(NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { + composeBackbone(element); + if (element.hasModifier()) { + composeCodeableConcept("modifier", element.getModifier()); + } + if (element.hasAmount()) { + composeSimpleQuantity("amount", element.getAmount()); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(String name, NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { + if (element != null) { + open(name); + composeNutritionOrderNutritionOrderOralDietTextureComponentInner(element); + close(); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietTextureComponentInner(NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { + composeBackbone(element); + if (element.hasModifier()) { + composeCodeableConcept("modifier", element.getModifier()); + } + if (element.hasFoodType()) { + composeCodeableConcept("foodType", element.getFoodType()); + } + } + + protected void composeNutritionOrderNutritionOrderSupplementComponent(String name, NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { + if (element != null) { + open(name); + composeNutritionOrderNutritionOrderSupplementComponentInner(element); + close(); + } + } + + protected void composeNutritionOrderNutritionOrderSupplementComponentInner(NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasProductNameElement()) { + composeStringCore("productName", element.getProductNameElement(), false); + composeStringExtras("productName", element.getProductNameElement(), false); + } + if (element.hasSchedule()) { + openArray("schedule"); + for (Timing e : element.getSchedule()) + composeTiming(null, e); + closeArray(); + }; + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasInstructionElement()) { + composeStringCore("instruction", element.getInstructionElement(), false); + composeStringExtras("instruction", element.getInstructionElement(), false); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { + if (element != null) { + open(name); + composeNutritionOrderNutritionOrderEnteralFormulaComponentInner(element); + close(); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaComponentInner(NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { + composeBackbone(element); + if (element.hasBaseFormulaType()) { + composeCodeableConcept("baseFormulaType", element.getBaseFormulaType()); + } + if (element.hasBaseFormulaProductNameElement()) { + composeStringCore("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false); + composeStringExtras("baseFormulaProductName", element.getBaseFormulaProductNameElement(), false); + } + if (element.hasAdditiveType()) { + composeCodeableConcept("additiveType", element.getAdditiveType()); + } + if (element.hasAdditiveProductNameElement()) { + composeStringCore("additiveProductName", element.getAdditiveProductNameElement(), false); + composeStringExtras("additiveProductName", element.getAdditiveProductNameElement(), false); + } + if (element.hasCaloricDensity()) { + composeSimpleQuantity("caloricDensity", element.getCaloricDensity()); + } + if (element.hasRouteofAdministration()) { + composeCodeableConcept("routeofAdministration", element.getRouteofAdministration()); + } + if (element.hasAdministration()) { + openArray("administration"); + for (NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent e : element.getAdministration()) + composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(null, e); + closeArray(); + }; + if (element.hasMaxVolumeToDeliver()) { + composeSimpleQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver()); + } + if (element.hasAdministrationInstructionElement()) { + composeStringCore("administrationInstruction", element.getAdministrationInstructionElement(), false); + composeStringExtras("administrationInstruction", element.getAdministrationInstructionElement(), false); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { + if (element != null) { + open(name); + composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentInner(element); + close(); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentInner(NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { + composeBackbone(element); + if (element.hasSchedule()) { + composeTiming("schedule", element.getSchedule()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasRate()) { + composeType("rate", element.getRate()); + } + } + + protected void composeObservation(String name, Observation element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeObservationInner(element); + } + } + + protected void composeObservationInner(Observation element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } + if (element.hasIssuedElement()) { + composeInstantCore("issued", element.getIssuedElement(), false); + composeInstantExtras("issued", element.getIssuedElement(), false); + } + if (element.hasPerformer()) { + openArray("performer"); + for (Reference e : element.getPerformer()) + composeReference(null, e); + closeArray(); + }; + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasDataAbsentReason()) { + composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); + } + if (element.hasInterpretation()) { + composeCodeableConcept("interpretation", element.getInterpretation()); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasSpecimen()) { + composeReference("specimen", element.getSpecimen()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasReferenceRange()) { + openArray("referenceRange"); + for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) + composeObservationObservationReferenceRangeComponent(null, e); + closeArray(); + }; + if (element.hasRelated()) { + openArray("related"); + for (Observation.ObservationRelatedComponent e : element.getRelated()) + composeObservationObservationRelatedComponent(null, e); + closeArray(); + }; + if (element.hasComponent()) { + openArray("component"); + for (Observation.ObservationComponentComponent e : element.getComponent()) + composeObservationObservationComponentComponent(null, e); + closeArray(); + }; + } + + protected void composeObservationObservationReferenceRangeComponent(String name, Observation.ObservationReferenceRangeComponent element) throws IOException { + if (element != null) { + open(name); + composeObservationObservationReferenceRangeComponentInner(element); + close(); + } + } + + protected void composeObservationObservationReferenceRangeComponentInner(Observation.ObservationReferenceRangeComponent element) throws IOException { + composeBackbone(element); + if (element.hasLow()) { + composeSimpleQuantity("low", element.getLow()); + } + if (element.hasHigh()) { + composeSimpleQuantity("high", element.getHigh()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAppliesTo()) { + openArray("appliesTo"); + for (CodeableConcept e : element.getAppliesTo()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasAge()) { + composeRange("age", element.getAge()); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + } + + protected void composeObservationObservationRelatedComponent(String name, Observation.ObservationRelatedComponent element) throws IOException { + if (element != null) { + open(name); + composeObservationObservationRelatedComponentInner(element); + close(); + } + } + + protected void composeObservationObservationRelatedComponentInner(Observation.ObservationRelatedComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Observation.ObservationRelationshipTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Observation.ObservationRelationshipTypeEnumFactory(), false); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + } + + protected void composeObservationObservationComponentComponent(String name, Observation.ObservationComponentComponent element) throws IOException { + if (element != null) { + open(name); + composeObservationObservationComponentComponentInner(element); + close(); + } + } + + protected void composeObservationObservationComponentComponentInner(Observation.ObservationComponentComponent element) throws IOException { + composeBackbone(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasDataAbsentReason()) { + composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); + } + if (element.hasInterpretation()) { + composeCodeableConcept("interpretation", element.getInterpretation()); + } + if (element.hasReferenceRange()) { + openArray("referenceRange"); + for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) + composeObservationObservationReferenceRangeComponent(null, e); + closeArray(); + }; + } + + protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeOperationDefinitionInner(element); + } + } + + protected void composeOperationDefinitionInner(OperationDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasIdempotentElement()) { + composeBooleanCore("idempotent", element.getIdempotentElement(), false); + composeBooleanExtras("idempotent", element.getIdempotentElement(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + if (element.hasBase()) { + composeReference("base", element.getBase()); + } + if (element.hasResource()) { + openArray("resource"); + for (CodeType e : element.getResource()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getResource())) { + openArray("_resource"); + for (CodeType e : element.getResource()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSystemElement()) { + composeBooleanCore("system", element.getSystemElement(), false); + composeBooleanExtras("system", element.getSystemElement(), false); + } + if (element.hasTypeElement()) { + composeBooleanCore("type", element.getTypeElement(), false); + composeBooleanExtras("type", element.getTypeElement(), false); + } + if (element.hasInstanceElement()) { + composeBooleanCore("instance", element.getInstanceElement(), false); + composeBooleanExtras("instance", element.getInstanceElement(), false); + } + if (element.hasParameter()) { + openArray("parameter"); + for (OperationDefinition.OperationDefinitionParameterComponent e : element.getParameter()) + composeOperationDefinitionOperationDefinitionParameterComponent(null, e); + closeArray(); + }; + if (element.hasOverload()) { + openArray("overload"); + for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload()) + composeOperationDefinitionOperationDefinitionOverloadComponent(null, e); + closeArray(); + }; + } + + protected void composeOperationDefinitionOperationDefinitionParameterComponent(String name, OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { + if (element != null) { + open(name); + composeOperationDefinitionOperationDefinitionParameterComponentInner(element); + close(); + } + } + + protected void composeOperationDefinitionOperationDefinitionParameterComponentInner(OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeCodeCore("name", element.getNameElement(), false); + composeCodeExtras("name", element.getNameElement(), false); + } + if (element.hasUseElement()) { + composeEnumerationCore("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory(), false); + composeEnumerationExtras("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory(), false); + } + if (element.hasMinElement()) { + composeIntegerCore("min", element.getMinElement(), false); + composeIntegerExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasSearchTypeElement()) { + composeEnumerationCore("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); + composeEnumerationExtras("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + if (element.hasBinding()) { + composeOperationDefinitionOperationDefinitionParameterBindingComponent("binding", element.getBinding()); + } + if (element.hasPart()) { + openArray("part"); + for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart()) + composeOperationDefinitionOperationDefinitionParameterComponent(null, e); + closeArray(); + }; + } + + protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(String name, OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { + if (element != null) { + open(name); + composeOperationDefinitionOperationDefinitionParameterBindingComponentInner(element); + close(); + } + } + + protected void composeOperationDefinitionOperationDefinitionParameterBindingComponentInner(OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { + composeBackbone(element); + if (element.hasStrengthElement()) { + composeEnumerationCore("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); + composeEnumerationExtras("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory(), false); + } + if (element.hasValueSet()) { + composeType("valueSet", element.getValueSet()); + } + } + + protected void composeOperationDefinitionOperationDefinitionOverloadComponent(String name, OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { + if (element != null) { + open(name); + composeOperationDefinitionOperationDefinitionOverloadComponentInner(element); + close(); + } + } + + protected void composeOperationDefinitionOperationDefinitionOverloadComponentInner(OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { + composeBackbone(element); + if (element.hasParameterName()) { + openArray("parameterName"); + for (StringType e : element.getParameterName()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getParameterName())) { + openArray("_parameterName"); + for (StringType e : element.getParameterName()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeOperationOutcome(String name, OperationOutcome element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeOperationOutcomeInner(element); + } + } + + protected void composeOperationOutcomeInner(OperationOutcome element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIssue()) { + openArray("issue"); + for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue()) + composeOperationOutcomeOperationOutcomeIssueComponent(null, e); + closeArray(); + }; + } + + protected void composeOperationOutcomeOperationOutcomeIssueComponent(String name, OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { + if (element != null) { + open(name); + composeOperationOutcomeOperationOutcomeIssueComponentInner(element); + close(); + } + } + + protected void composeOperationOutcomeOperationOutcomeIssueComponentInner(OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { + composeBackbone(element); + if (element.hasSeverityElement()) { + composeEnumerationCore("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory(), false); + composeEnumerationExtras("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory(), false); + } + if (element.hasCodeElement()) { + composeEnumerationCore("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory(), false); + composeEnumerationExtras("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory(), false); + } + if (element.hasDetails()) { + composeCodeableConcept("details", element.getDetails()); + } + if (element.hasDiagnosticsElement()) { + composeStringCore("diagnostics", element.getDiagnosticsElement(), false); + composeStringExtras("diagnostics", element.getDiagnosticsElement(), false); + } + if (element.hasLocation()) { + openArray("location"); + for (StringType e : element.getLocation()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getLocation())) { + openArray("_location"); + for (StringType e : element.getLocation()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasExpression()) { + openArray("expression"); + for (StringType e : element.getExpression()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getExpression())) { + openArray("_expression"); + for (StringType e : element.getExpression()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeOrganization(String name, Organization element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeOrganizationInner(element); + } + } + + protected void composeOrganizationInner(Organization element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasType()) { + openArray("type"); + for (CodeableConcept e : element.getType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasAlias()) { + openArray("alias"); + for (StringType e : element.getAlias()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getAlias())) { + openArray("_alias"); + for (StringType e : element.getAlias()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasAddress()) { + openArray("address"); + for (Address e : element.getAddress()) + composeAddress(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + composeReference("partOf", element.getPartOf()); + } + if (element.hasContact()) { + openArray("contact"); + for (Organization.OrganizationContactComponent e : element.getContact()) + composeOrganizationOrganizationContactComponent(null, e); + closeArray(); + }; + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeOrganizationOrganizationContactComponent(String name, Organization.OrganizationContactComponent element) throws IOException { + if (element != null) { + open(name); + composeOrganizationOrganizationContactComponentInner(element); + close(); + } + } + + protected void composeOrganizationOrganizationContactComponentInner(Organization.OrganizationContactComponent element) throws IOException { + composeBackbone(element); + if (element.hasPurpose()) { + composeCodeableConcept("purpose", element.getPurpose()); + } + if (element.hasName()) { + composeHumanName("name", element.getName()); + } + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasAddress()) { + composeAddress("address", element.getAddress()); + } + } + + protected void composePatient(String name, Patient element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePatientInner(element); + } + } + + protected void composePatientInner(Patient element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasName()) { + openArray("name"); + for (HumanName e : element.getName()) + composeHumanName(null, e); + closeArray(); + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasGenderElement()) { + composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + } + if (element.hasBirthDateElement()) { + composeDateCore("birthDate", element.getBirthDateElement(), false); + composeDateExtras("birthDate", element.getBirthDateElement(), false); + } + if (element.hasDeceased()) { + composeType("deceased", element.getDeceased()); + } + if (element.hasAddress()) { + openArray("address"); + for (Address e : element.getAddress()) + composeAddress(null, e); + closeArray(); + }; + if (element.hasMaritalStatus()) { + composeCodeableConcept("maritalStatus", element.getMaritalStatus()); + } + if (element.hasMultipleBirth()) { + composeType("multipleBirth", element.getMultipleBirth()); + } + if (element.hasPhoto()) { + openArray("photo"); + for (Attachment e : element.getPhoto()) + composeAttachment(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (Patient.ContactComponent e : element.getContact()) + composePatientContactComponent(null, e); + closeArray(); + }; + if (element.hasAnimal()) { + composePatientAnimalComponent("animal", element.getAnimal()); + } + if (element.hasCommunication()) { + openArray("communication"); + for (Patient.PatientCommunicationComponent e : element.getCommunication()) + composePatientPatientCommunicationComponent(null, e); + closeArray(); + }; + if (element.hasGeneralPractitioner()) { + openArray("generalPractitioner"); + for (Reference e : element.getGeneralPractitioner()) + composeReference(null, e); + closeArray(); + }; + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasLink()) { + openArray("link"); + for (Patient.PatientLinkComponent e : element.getLink()) + composePatientPatientLinkComponent(null, e); + closeArray(); + }; + } + + protected void composePatientContactComponent(String name, Patient.ContactComponent element) throws IOException { + if (element != null) { + open(name); + composePatientContactComponentInner(element); + close(); + } + } + + protected void composePatientContactComponentInner(Patient.ContactComponent element) throws IOException { + composeBackbone(element); + if (element.hasRelationship()) { + openArray("relationship"); + for (CodeableConcept e : element.getRelationship()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasName()) { + composeHumanName("name", element.getName()); + } + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasAddress()) { + composeAddress("address", element.getAddress()); + } + if (element.hasGenderElement()) { + composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composePatientAnimalComponent(String name, Patient.AnimalComponent element) throws IOException { + if (element != null) { + open(name); + composePatientAnimalComponentInner(element); + close(); + } + } + + protected void composePatientAnimalComponentInner(Patient.AnimalComponent element) throws IOException { + composeBackbone(element); + if (element.hasSpecies()) { + composeCodeableConcept("species", element.getSpecies()); + } + if (element.hasBreed()) { + composeCodeableConcept("breed", element.getBreed()); + } + if (element.hasGenderStatus()) { + composeCodeableConcept("genderStatus", element.getGenderStatus()); + } + } + + protected void composePatientPatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element) throws IOException { + if (element != null) { + open(name); + composePatientPatientCommunicationComponentInner(element); + close(); + } + } + + protected void composePatientPatientCommunicationComponentInner(Patient.PatientCommunicationComponent element) throws IOException { + composeBackbone(element); + if (element.hasLanguage()) { + composeCodeableConcept("language", element.getLanguage()); + } + if (element.hasPreferredElement()) { + composeBooleanCore("preferred", element.getPreferredElement(), false); + composeBooleanExtras("preferred", element.getPreferredElement(), false); + } + } + + protected void composePatientPatientLinkComponent(String name, Patient.PatientLinkComponent element) throws IOException { + if (element != null) { + open(name); + composePatientPatientLinkComponentInner(element); + close(); + } + } + + protected void composePatientPatientLinkComponentInner(Patient.PatientLinkComponent element) throws IOException { + composeBackbone(element); + if (element.hasOther()) { + composeReference("other", element.getOther()); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory(), false); + } + } + + protected void composePaymentNotice(String name, PaymentNotice element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePaymentNoticeInner(element); + } + } + + protected void composePaymentNoticeInner(PaymentNotice element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory(), false); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasStatusDateElement()) { + composeDateCore("statusDate", element.getStatusDateElement(), false); + composeDateExtras("statusDate", element.getStatusDateElement(), false); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasPaymentStatus()) { + composeCodeableConcept("paymentStatus", element.getPaymentStatus()); + } + } + + protected void composePaymentReconciliation(String name, PaymentReconciliation element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePaymentReconciliationInner(element); + } + } + + protected void composePaymentReconciliationInner(PaymentReconciliation element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new PaymentReconciliation.PaymentReconciliationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new PaymentReconciliation.PaymentReconciliationStatusEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory(), false); + } + if (element.hasDispositionElement()) { + composeStringCore("disposition", element.getDispositionElement(), false); + composeStringExtras("disposition", element.getDispositionElement(), false); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasDetail()) { + openArray("detail"); + for (PaymentReconciliation.DetailsComponent e : element.getDetail()) + composePaymentReconciliationDetailsComponent(null, e); + closeArray(); + }; + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasTotal()) { + composeMoney("total", element.getTotal()); + } + if (element.hasProcessNote()) { + openArray("processNote"); + for (PaymentReconciliation.NotesComponent e : element.getProcessNote()) + composePaymentReconciliationNotesComponent(null, e); + closeArray(); + }; + } + + protected void composePaymentReconciliationDetailsComponent(String name, PaymentReconciliation.DetailsComponent element) throws IOException { + if (element != null) { + open(name); + composePaymentReconciliationDetailsComponentInner(element); + close(); + } + } + + protected void composePaymentReconciliationDetailsComponentInner(PaymentReconciliation.DetailsComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasSubmitter()) { + composeReference("submitter", element.getSubmitter()); + } + if (element.hasPayee()) { + composeReference("payee", element.getPayee()); + } + if (element.hasDateElement()) { + composeDateCore("date", element.getDateElement(), false); + composeDateExtras("date", element.getDateElement(), false); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + } + + protected void composePaymentReconciliationNotesComponent(String name, PaymentReconciliation.NotesComponent element) throws IOException { + if (element != null) { + open(name); + composePaymentReconciliationNotesComponentInner(element); + close(); + } + } + + protected void composePaymentReconciliationNotesComponentInner(PaymentReconciliation.NotesComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + } + + protected void composePerson(String name, Person element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePersonInner(element); + } + } + + protected void composePersonInner(Person element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasName()) { + openArray("name"); + for (HumanName e : element.getName()) + composeHumanName(null, e); + closeArray(); + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasGenderElement()) { + composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + } + if (element.hasBirthDateElement()) { + composeDateCore("birthDate", element.getBirthDateElement(), false); + composeDateExtras("birthDate", element.getBirthDateElement(), false); + } + if (element.hasAddress()) { + openArray("address"); + for (Address e : element.getAddress()) + composeAddress(null, e); + closeArray(); + }; + if (element.hasPhoto()) { + composeAttachment("photo", element.getPhoto()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasLink()) { + openArray("link"); + for (Person.PersonLinkComponent e : element.getLink()) + composePersonPersonLinkComponent(null, e); + closeArray(); + }; + } + + protected void composePersonPersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException { + if (element != null) { + open(name); + composePersonPersonLinkComponentInner(element); + close(); + } + } + + protected void composePersonPersonLinkComponentInner(Person.PersonLinkComponent element) throws IOException { + composeBackbone(element); + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasAssuranceElement()) { + composeEnumerationCore("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory(), false); + composeEnumerationExtras("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory(), false); + } + } + + protected void composePlanDefinition(String name, PlanDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePlanDefinitionInner(element); + } + } + + protected void composePlanDefinitionInner(PlanDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContributor()) { + openArray("contributor"); + for (Contributor e : element.getContributor()) + composeContributor(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasLibrary()) { + openArray("library"); + for (Reference e : element.getLibrary()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGoal()) { + openArray("goal"); + for (PlanDefinition.PlanDefinitionGoalComponent e : element.getGoal()) + composePlanDefinitionPlanDefinitionGoalComponent(null, e); + closeArray(); + }; + if (element.hasAction()) { + openArray("action"); + for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) + composePlanDefinitionPlanDefinitionActionComponent(null, e); + closeArray(); + }; + } + + protected void composePlanDefinitionPlanDefinitionGoalComponent(String name, PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionGoalComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionGoalComponentInner(PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { + composeBackbone(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasDescription()) { + composeCodeableConcept("description", element.getDescription()); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasStart()) { + composeCodeableConcept("start", element.getStart()); + } + if (element.hasAddresses()) { + openArray("addresses"); + for (CodeableConcept e : element.getAddresses()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDocumentation()) { + openArray("documentation"); + for (RelatedArtifact e : element.getDocumentation()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasTarget()) { + openArray("target"); + for (PlanDefinition.PlanDefinitionGoalTargetComponent e : element.getTarget()) + composePlanDefinitionPlanDefinitionGoalTargetComponent(null, e); + closeArray(); + }; + } + + protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(String name, PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionGoalTargetComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionGoalTargetComponentInner(PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { + composeBackbone(element); + if (element.hasMeasure()) { + composeCodeableConcept("measure", element.getMeasure()); + } + if (element.hasDetail()) { + composeType("detail", element.getDetail()); + } + if (element.hasDue()) { + composeDuration("due", element.getDue()); + } + } + + protected void composePlanDefinitionPlanDefinitionActionComponent(String name, PlanDefinition.PlanDefinitionActionComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionActionComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionActionComponentInner(PlanDefinition.PlanDefinitionActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasPrefixElement()) { + composeStringCore("prefix", element.getPrefixElement(), false); + composeStringExtras("prefix", element.getPrefixElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasTextEquivalentElement()) { + composeStringCore("textEquivalent", element.getTextEquivalentElement(), false); + composeStringExtras("textEquivalent", element.getTextEquivalentElement(), false); + } + if (element.hasCode()) { + openArray("code"); + for (CodeableConcept e : element.getCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDocumentation()) { + openArray("documentation"); + for (RelatedArtifact e : element.getDocumentation()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasGoalId()) { + openArray("goalId"); + for (IdType e : element.getGoalId()) + composeIdCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getGoalId())) { + openArray("_goalId"); + for (IdType e : element.getGoalId()) + composeIdExtras(null, e, true); + closeArray(); + } + }; + if (element.hasTriggerDefinition()) { + openArray("triggerDefinition"); + for (TriggerDefinition e : element.getTriggerDefinition()) + composeTriggerDefinition(null, e); + closeArray(); + }; + if (element.hasCondition()) { + openArray("condition"); + for (PlanDefinition.PlanDefinitionActionConditionComponent e : element.getCondition()) + composePlanDefinitionPlanDefinitionActionConditionComponent(null, e); + closeArray(); + }; + if (element.hasInput()) { + openArray("input"); + for (DataRequirement e : element.getInput()) + composeDataRequirement(null, e); + closeArray(); + }; + if (element.hasOutput()) { + openArray("output"); + for (DataRequirement e : element.getOutput()) + composeDataRequirement(null, e); + closeArray(); + }; + if (element.hasRelatedAction()) { + openArray("relatedAction"); + for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction()) + composePlanDefinitionPlanDefinitionActionRelatedActionComponent(null, e); + closeArray(); + }; + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasParticipant()) { + openArray("participant"); + for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant()) + composePlanDefinitionPlanDefinitionActionParticipantComponent(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasGroupingBehaviorElement()) { + composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(), new PlanDefinition.ActionGroupingBehaviorEnumFactory(), false); + composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(), new PlanDefinition.ActionGroupingBehaviorEnumFactory(), false); + } + if (element.hasSelectionBehaviorElement()) { + composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(), new PlanDefinition.ActionSelectionBehaviorEnumFactory(), false); + composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(), new PlanDefinition.ActionSelectionBehaviorEnumFactory(), false); + } + if (element.hasRequiredBehaviorElement()) { + composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(), new PlanDefinition.ActionRequiredBehaviorEnumFactory(), false); + composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(), new PlanDefinition.ActionRequiredBehaviorEnumFactory(), false); + } + if (element.hasPrecheckBehaviorElement()) { + composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(), new PlanDefinition.ActionPrecheckBehaviorEnumFactory(), false); + composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(), new PlanDefinition.ActionPrecheckBehaviorEnumFactory(), false); + } + if (element.hasCardinalityBehaviorElement()) { + composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(), new PlanDefinition.ActionCardinalityBehaviorEnumFactory(), false); + composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(), new PlanDefinition.ActionCardinalityBehaviorEnumFactory(), false); + } + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + if (element.hasTransform()) { + composeReference("transform", element.getTransform()); + } + if (element.hasDynamicValue()) { + openArray("dynamicValue"); + for (PlanDefinition.PlanDefinitionActionDynamicValueComponent e : element.getDynamicValue()) + composePlanDefinitionPlanDefinitionActionDynamicValueComponent(null, e); + closeArray(); + }; + if (element.hasAction()) { + openArray("action"); + for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) + composePlanDefinitionPlanDefinitionActionComponent(null, e); + closeArray(); + }; + } + + protected void composePlanDefinitionPlanDefinitionActionConditionComponent(String name, PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionActionConditionComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionActionConditionComponentInner(PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { + composeBackbone(element); + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasLanguageElement()) { + composeStringCore("language", element.getLanguageElement(), false); + composeStringExtras("language", element.getLanguageElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + } + + protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionActionRelatedActionComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponentInner(PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasActionIdElement()) { + composeIdCore("actionId", element.getActionIdElement(), false); + composeIdExtras("actionId", element.getActionIdElement(), false); + } + if (element.hasRelationshipElement()) { + composeEnumerationCore("relationship", element.getRelationshipElement(), new PlanDefinition.ActionRelationshipTypeEnumFactory(), false); + composeEnumerationExtras("relationship", element.getRelationshipElement(), new PlanDefinition.ActionRelationshipTypeEnumFactory(), false); + } + if (element.hasOffset()) { + composeType("offset", element.getOffset()); + } + } + + protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(String name, PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionActionParticipantComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionActionParticipantComponentInner(PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory(), false); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + } + + protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { + if (element != null) { + open(name); + composePlanDefinitionPlanDefinitionActionDynamicValueComponentInner(element); + close(); + } + } + + protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponentInner(PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasLanguageElement()) { + composeStringCore("language", element.getLanguageElement(), false); + composeStringExtras("language", element.getLanguageElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + } + + protected void composePractitioner(String name, Practitioner element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePractitionerInner(element); + } + } + + protected void composePractitionerInner(Practitioner element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasName()) { + openArray("name"); + for (HumanName e : element.getName()) + composeHumanName(null, e); + closeArray(); + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasAddress()) { + openArray("address"); + for (Address e : element.getAddress()) + composeAddress(null, e); + closeArray(); + }; + if (element.hasGenderElement()) { + composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + } + if (element.hasBirthDateElement()) { + composeDateCore("birthDate", element.getBirthDateElement(), false); + composeDateExtras("birthDate", element.getBirthDateElement(), false); + } + if (element.hasPhoto()) { + openArray("photo"); + for (Attachment e : element.getPhoto()) + composeAttachment(null, e); + closeArray(); + }; + if (element.hasQualification()) { + openArray("qualification"); + for (Practitioner.PractitionerQualificationComponent e : element.getQualification()) + composePractitionerPractitionerQualificationComponent(null, e); + closeArray(); + }; + if (element.hasCommunication()) { + openArray("communication"); + for (CodeableConcept e : element.getCommunication()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composePractitionerPractitionerQualificationComponent(String name, Practitioner.PractitionerQualificationComponent element) throws IOException { + if (element != null) { + open(name); + composePractitionerPractitionerQualificationComponentInner(element); + close(); + } + } + + protected void composePractitionerPractitionerQualificationComponentInner(Practitioner.PractitionerQualificationComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasIssuer()) { + composeReference("issuer", element.getIssuer()); + } + } + + protected void composePractitionerRole(String name, PractitionerRole element) throws IOException { + if (element != null) { + prop("resourceType", name); + composePractitionerRoleInner(element); + } + } + + protected void composePractitionerRoleInner(PractitionerRole element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasPractitioner()) { + composeReference("practitioner", element.getPractitioner()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasCode()) { + openArray("code"); + for (CodeableConcept e : element.getCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialty()) { + openArray("specialty"); + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasLocation()) { + openArray("location"); + for (Reference e : element.getLocation()) + composeReference(null, e); + closeArray(); + }; + if (element.hasHealthcareService()) { + openArray("healthcareService"); + for (Reference e : element.getHealthcareService()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasAvailableTime()) { + openArray("availableTime"); + for (PractitionerRole.PractitionerRoleAvailableTimeComponent e : element.getAvailableTime()) + composePractitionerRolePractitionerRoleAvailableTimeComponent(null, e); + closeArray(); + }; + if (element.hasNotAvailable()) { + openArray("notAvailable"); + for (PractitionerRole.PractitionerRoleNotAvailableComponent e : element.getNotAvailable()) + composePractitionerRolePractitionerRoleNotAvailableComponent(null, e); + closeArray(); + }; + if (element.hasAvailabilityExceptionsElement()) { + composeStringCore("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); + composeStringExtras("availabilityExceptions", element.getAvailabilityExceptionsElement(), false); + } + if (element.hasEndpoint()) { + openArray("endpoint"); + for (Reference e : element.getEndpoint()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(String name, PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { + if (element != null) { + open(name); + composePractitionerRolePractitionerRoleAvailableTimeComponentInner(element); + close(); + } + } + + protected void composePractitionerRolePractitionerRoleAvailableTimeComponentInner(PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { + composeBackbone(element); + if (element.hasDaysOfWeek()) { + openArray("daysOfWeek"); + for (Enumeration e : element.getDaysOfWeek()) + composeEnumerationCore(null, e, new PractitionerRole.DaysOfWeekEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getDaysOfWeek())) { + openArray("_daysOfWeek"); + for (Enumeration e : element.getDaysOfWeek()) + composeEnumerationExtras(null, e, new PractitionerRole.DaysOfWeekEnumFactory(), true); + closeArray(); + } + }; + if (element.hasAllDayElement()) { + composeBooleanCore("allDay", element.getAllDayElement(), false); + composeBooleanExtras("allDay", element.getAllDayElement(), false); + } + if (element.hasAvailableStartTimeElement()) { + composeTimeCore("availableStartTime", element.getAvailableStartTimeElement(), false); + composeTimeExtras("availableStartTime", element.getAvailableStartTimeElement(), false); + } + if (element.hasAvailableEndTimeElement()) { + composeTimeCore("availableEndTime", element.getAvailableEndTimeElement(), false); + composeTimeExtras("availableEndTime", element.getAvailableEndTimeElement(), false); + } + } + + protected void composePractitionerRolePractitionerRoleNotAvailableComponent(String name, PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { + if (element != null) { + open(name); + composePractitionerRolePractitionerRoleNotAvailableComponentInner(element); + close(); + } + } + + protected void composePractitionerRolePractitionerRoleNotAvailableComponentInner(PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasDuring()) { + composePeriod("during", element.getDuring()); + } + } + + protected void composeProcedure(String name, Procedure element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeProcedureInner(element); + } + } + + protected void composeProcedureInner(Procedure element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory(), false); + } + if (element.hasNotDoneElement()) { + composeBooleanCore("notDone", element.getNotDoneElement(), false); + composeBooleanExtras("notDone", element.getNotDoneElement(), false); + } + if (element.hasNotDoneReason()) { + composeCodeableConcept("notDoneReason", element.getNotDoneReason()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPerformed()) { + composeType("performed", element.getPerformed()); + } + if (element.hasPerformer()) { + openArray("performer"); + for (Procedure.ProcedurePerformerComponent e : element.getPerformer()) + composeProcedureProcedurePerformerComponent(null, e); + closeArray(); + }; + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + openArray("bodySite"); + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasReport()) { + openArray("report"); + for (Reference e : element.getReport()) + composeReference(null, e); + closeArray(); + }; + if (element.hasComplication()) { + openArray("complication"); + for (CodeableConcept e : element.getComplication()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasComplicationDetail()) { + openArray("complicationDetail"); + for (Reference e : element.getComplicationDetail()) + composeReference(null, e); + closeArray(); + }; + if (element.hasFollowUp()) { + openArray("followUp"); + for (CodeableConcept e : element.getFollowUp()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasFocalDevice()) { + openArray("focalDevice"); + for (Procedure.ProcedureFocalDeviceComponent e : element.getFocalDevice()) + composeProcedureProcedureFocalDeviceComponent(null, e); + closeArray(); + }; + if (element.hasUsedReference()) { + openArray("usedReference"); + for (Reference e : element.getUsedReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasUsedCode()) { + openArray("usedCode"); + for (CodeableConcept e : element.getUsedCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + } + + protected void composeProcedureProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element) throws IOException { + if (element != null) { + open(name); + composeProcedureProcedurePerformerComponentInner(element); + close(); + } + } + + protected void composeProcedureProcedurePerformerComponentInner(Procedure.ProcedurePerformerComponent element) throws IOException { + composeBackbone(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeProcedureProcedureFocalDeviceComponent(String name, Procedure.ProcedureFocalDeviceComponent element) throws IOException { + if (element != null) { + open(name); + composeProcedureProcedureFocalDeviceComponentInner(element); + close(); + } + } + + protected void composeProcedureProcedureFocalDeviceComponentInner(Procedure.ProcedureFocalDeviceComponent element) throws IOException { + composeBackbone(element); + if (element.hasAction()) { + composeCodeableConcept("action", element.getAction()); + } + if (element.hasManipulated()) { + composeReference("manipulated", element.getManipulated()); + } + } + + protected void composeProcedureRequest(String name, ProcedureRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeProcedureRequestInner(element); + } + } + + protected void composeProcedureRequestInner(ProcedureRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReplaces()) { + openArray("replaces"); + for (Reference e : element.getReplaces()) + composeReference(null, e); + closeArray(); + }; + if (element.hasRequisition()) { + composeIdentifier("requisition", element.getRequisition()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ProcedureRequest.ProcedureRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ProcedureRequest.ProcedureRequestStatusEnumFactory(), false); + } + if (element.hasIntentElement()) { + composeEnumerationCore("intent", element.getIntentElement(), new ProcedureRequest.ProcedureRequestIntentEnumFactory(), false); + composeEnumerationExtras("intent", element.getIntentElement(), new ProcedureRequest.ProcedureRequestIntentEnumFactory(), false); + } + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new ProcedureRequest.ProcedureRequestPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new ProcedureRequest.ProcedureRequestPriorityEnumFactory(), false); + } + if (element.hasDoNotPerformElement()) { + composeBooleanCore("doNotPerform", element.getDoNotPerformElement(), false); + composeBooleanExtras("doNotPerform", element.getDoNotPerformElement(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasAsNeeded()) { + composeType("asNeeded", element.getAsNeeded()); + } + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasRequester()) { + composeProcedureRequestProcedureRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasPerformerType()) { + composeCodeableConcept("performerType", element.getPerformerType()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSupportingInfo()) { + openArray("supportingInfo"); + for (Reference e : element.getSupportingInfo()) + composeReference(null, e); + closeArray(); + }; + if (element.hasSpecimen()) { + openArray("specimen"); + for (Reference e : element.getSpecimen()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBodySite()) { + openArray("bodySite"); + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasRelevantHistory()) { + openArray("relevantHistory"); + for (Reference e : element.getRelevantHistory()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeProcedureRequestProcedureRequestRequesterComponent(String name, ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { + if (element != null) { + open(name); + composeProcedureRequestProcedureRequestRequesterComponentInner(element); + close(); + } + } + + protected void composeProcedureRequestProcedureRequestRequesterComponentInner(ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeProcessRequest(String name, ProcessRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeProcessRequestInner(element); + } + } + + protected void composeProcessRequestInner(ProcessRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ProcessRequest.ProcessRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ProcessRequest.ProcessRequestStatusEnumFactory(), false); + } + if (element.hasActionElement()) { + composeEnumerationCore("action", element.getActionElement(), new ProcessRequest.ActionListEnumFactory(), false); + composeEnumerationExtras("action", element.getActionElement(), new ProcessRequest.ActionListEnumFactory(), false); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasNullifyElement()) { + composeBooleanCore("nullify", element.getNullifyElement(), false); + composeBooleanExtras("nullify", element.getNullifyElement(), false); + } + if (element.hasReferenceElement()) { + composeStringCore("reference", element.getReferenceElement(), false); + composeStringExtras("reference", element.getReferenceElement(), false); + } + if (element.hasItem()) { + openArray("item"); + for (ProcessRequest.ItemsComponent e : element.getItem()) + composeProcessRequestItemsComponent(null, e); + closeArray(); + }; + if (element.hasInclude()) { + openArray("include"); + for (StringType e : element.getInclude()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getInclude())) { + openArray("_include"); + for (StringType e : element.getInclude()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasExclude()) { + openArray("exclude"); + for (StringType e : element.getExclude()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getExclude())) { + openArray("_exclude"); + for (StringType e : element.getExclude()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeProcessRequestItemsComponent(String name, ProcessRequest.ItemsComponent element) throws IOException { + if (element != null) { + open(name); + composeProcessRequestItemsComponentInner(element); + close(); + } + } + + protected void composeProcessRequestItemsComponentInner(ProcessRequest.ItemsComponent element) throws IOException { + composeBackbone(element); + if (element.hasSequenceLinkIdElement()) { + composeIntegerCore("sequenceLinkId", element.getSequenceLinkIdElement(), false); + composeIntegerExtras("sequenceLinkId", element.getSequenceLinkIdElement(), false); + } + } + + protected void composeProcessResponse(String name, ProcessResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeProcessResponseInner(element); + } + } + + protected void composeProcessResponseInner(ProcessResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ProcessResponse.ProcessResponseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ProcessResponse.ProcessResponseStatusEnumFactory(), false); + } + if (element.hasCreatedElement()) { + composeDateTimeCore("created", element.getCreatedElement(), false); + composeDateTimeExtras("created", element.getCreatedElement(), false); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) { + composeEnumerationCore("outcome", element.getOutcomeElement(), new ProcessResponse.ProcessingOutcomeEnumFactory(), false); + composeEnumerationExtras("outcome", element.getOutcomeElement(), new ProcessResponse.ProcessingOutcomeEnumFactory(), false); + } + if (element.hasDispositionElement()) { + composeStringCore("disposition", element.getDispositionElement(), false); + composeStringExtras("disposition", element.getDispositionElement(), false); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasProcessNote()) { + openArray("processNote"); + for (ProcessResponse.ProcessResponseProcessNoteComponent e : element.getProcessNote()) + composeProcessResponseProcessResponseProcessNoteComponent(null, e); + closeArray(); + }; + if (element.hasError()) { + openArray("error"); + for (CodeableConcept e : element.getError()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCommunicationRequest()) { + openArray("communicationRequest"); + for (Reference e : element.getCommunicationRequest()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeProcessResponseProcessResponseProcessNoteComponent(String name, ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { + if (element != null) { + open(name); + composeProcessResponseProcessResponseProcessNoteComponentInner(element); + close(); + } + } + + protected void composeProcessResponseProcessResponseProcessNoteComponentInner(ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + } + + protected void composeProvenance(String name, Provenance element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeProvenanceInner(element); + } + } + + protected void composeProvenanceInner(Provenance element) throws IOException { + composeDomainResourceElements(element); + if (element.hasTarget()) { + openArray("target"); + for (Reference e : element.getTarget()) + composeReference(null, e); + closeArray(); + }; + if (element.hasOccured()) { + composeType("occured", element.getOccured()); + } + if (element.hasRecordedElement()) { + composeInstantCore("recorded", element.getRecordedElement(), false); + composeInstantExtras("recorded", element.getRecordedElement(), false); + } + if (element.hasPolicy()) { + openArray("policy"); + for (UriType e : element.getPolicy()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPolicy())) { + openArray("_policy"); + for (UriType e : element.getPolicy()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasReason()) { + openArray("reason"); + for (CodeableConcept e : element.getReason()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasActivity()) { + composeCodeableConcept("activity", element.getActivity()); + } + if (element.hasAgent()) { + openArray("agent"); + for (Provenance.ProvenanceAgentComponent e : element.getAgent()) + composeProvenanceProvenanceAgentComponent(null, e); + closeArray(); + }; + if (element.hasEntity()) { + openArray("entity"); + for (Provenance.ProvenanceEntityComponent e : element.getEntity()) + composeProvenanceProvenanceEntityComponent(null, e); + closeArray(); + }; + if (element.hasSignature()) { + openArray("signature"); + for (Signature e : element.getSignature()) + composeSignature(null, e); + closeArray(); + }; + } + + protected void composeProvenanceProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element) throws IOException { + if (element != null) { + open(name); + composeProvenanceProvenanceAgentComponentInner(element); + close(); + } + } + + protected void composeProvenanceProvenanceAgentComponentInner(Provenance.ProvenanceAgentComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasRole()) { + openArray("role"); + for (CodeableConcept e : element.getRole()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasWho()) { + composeType("who", element.getWho()); + } + if (element.hasOnBehalfOf()) { + composeType("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeProvenanceProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element) throws IOException { + if (element != null) { + open(name); + composeProvenanceProvenanceEntityComponentInner(element); + close(); + } + } + + protected void composeProvenanceProvenanceEntityComponentInner(Provenance.ProvenanceEntityComponent element) throws IOException { + composeBackbone(element); + if (element.hasRoleElement()) { + composeEnumerationCore("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory(), false); + composeEnumerationExtras("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory(), false); + } + if (element.hasWhat()) { + composeType("what", element.getWhat()); + } + if (element.hasAgent()) { + openArray("agent"); + for (Provenance.ProvenanceAgentComponent e : element.getAgent()) + composeProvenanceProvenanceAgentComponent(null, e); + closeArray(); + }; + } + + protected void composeQuestionnaire(String name, Questionnaire element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeQuestionnaireInner(element); + } + } + + protected void composeQuestionnaireInner(Questionnaire element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasCode()) { + openArray("code"); + for (Coding e : element.getCode()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasSubjectType()) { + openArray("subjectType"); + for (CodeType e : element.getSubjectType()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSubjectType())) { + openArray("_subjectType"); + for (CodeType e : element.getSubjectType()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasItem()) { + openArray("item"); + for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) + composeQuestionnaireQuestionnaireItemComponent(null, e); + closeArray(); + }; + } + + protected void composeQuestionnaireQuestionnaireItemComponent(String name, Questionnaire.QuestionnaireItemComponent element) throws IOException { + if (element != null) { + open(name); + composeQuestionnaireQuestionnaireItemComponentInner(element); + close(); + } + } + + protected void composeQuestionnaireQuestionnaireItemComponentInner(Questionnaire.QuestionnaireItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasLinkIdElement()) { + composeStringCore("linkId", element.getLinkIdElement(), false); + composeStringExtras("linkId", element.getLinkIdElement(), false); + } + if (element.hasDefinitionElement()) { + composeUriCore("definition", element.getDefinitionElement(), false); + composeUriExtras("definition", element.getDefinitionElement(), false); + } + if (element.hasCode()) { + openArray("code"); + for (Coding e : element.getCode()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasPrefixElement()) { + composeStringCore("prefix", element.getPrefixElement(), false); + composeStringExtras("prefix", element.getPrefixElement(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory(), false); + } + if (element.hasEnableWhen()) { + openArray("enableWhen"); + for (Questionnaire.QuestionnaireItemEnableWhenComponent e : element.getEnableWhen()) + composeQuestionnaireQuestionnaireItemEnableWhenComponent(null, e); + closeArray(); + }; + if (element.hasRequiredElement()) { + composeBooleanCore("required", element.getRequiredElement(), false); + composeBooleanExtras("required", element.getRequiredElement(), false); + } + if (element.hasRepeatsElement()) { + composeBooleanCore("repeats", element.getRepeatsElement(), false); + composeBooleanExtras("repeats", element.getRepeatsElement(), false); + } + if (element.hasReadOnlyElement()) { + composeBooleanCore("readOnly", element.getReadOnlyElement(), false); + composeBooleanExtras("readOnly", element.getReadOnlyElement(), false); + } + if (element.hasMaxLengthElement()) { + composeIntegerCore("maxLength", element.getMaxLengthElement(), false); + composeIntegerExtras("maxLength", element.getMaxLengthElement(), false); + } + if (element.hasOptions()) { + composeReference("options", element.getOptions()); + } + if (element.hasOption()) { + openArray("option"); + for (Questionnaire.QuestionnaireItemOptionComponent e : element.getOption()) + composeQuestionnaireQuestionnaireItemOptionComponent(null, e); + closeArray(); + }; + if (element.hasInitial()) { + composeType("initial", element.getInitial()); + } + if (element.hasItem()) { + openArray("item"); + for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) + composeQuestionnaireQuestionnaireItemComponent(null, e); + closeArray(); + }; + } + + protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(String name, Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { + if (element != null) { + open(name); + composeQuestionnaireQuestionnaireItemEnableWhenComponentInner(element); + close(); + } + } + + protected void composeQuestionnaireQuestionnaireItemEnableWhenComponentInner(Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { + composeBackbone(element); + if (element.hasQuestionElement()) { + composeStringCore("question", element.getQuestionElement(), false); + composeStringExtras("question", element.getQuestionElement(), false); + } + if (element.hasHasAnswerElement()) { + composeBooleanCore("hasAnswer", element.getHasAnswerElement(), false); + composeBooleanExtras("hasAnswer", element.getHasAnswerElement(), false); + } + if (element.hasAnswer()) { + composeType("answer", element.getAnswer()); + } + } + + protected void composeQuestionnaireQuestionnaireItemOptionComponent(String name, Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { + if (element != null) { + open(name); + composeQuestionnaireQuestionnaireItemOptionComponentInner(element); + close(); + } + } + + protected void composeQuestionnaireQuestionnaireItemOptionComponentInner(Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { + composeBackbone(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeQuestionnaireResponseInner(element); + } + } + + protected void composeQuestionnaireResponseInner(QuestionnaireResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasParent()) { + openArray("parent"); + for (Reference e : element.getParent()) + composeReference(null, e); + closeArray(); + }; + if (element.hasQuestionnaire()) { + composeReference("questionnaire", element.getQuestionnaire()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasAuthoredElement()) { + composeDateTimeCore("authored", element.getAuthoredElement(), false); + composeDateTimeExtras("authored", element.getAuthoredElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasItem()) { + openArray("item"); + for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) + composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e); + closeArray(); + }; + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { + if (element != null) { + open(name); + composeQuestionnaireResponseQuestionnaireResponseItemComponentInner(element); + close(); + } + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemComponentInner(QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasLinkIdElement()) { + composeStringCore("linkId", element.getLinkIdElement(), false); + composeStringExtras("linkId", element.getLinkIdElement(), false); + } + if (element.hasDefinitionElement()) { + composeUriCore("definition", element.getDefinitionElement(), false); + composeUriExtras("definition", element.getDefinitionElement(), false); + } + if (element.hasTextElement()) { + composeStringCore("text", element.getTextElement(), false); + composeStringExtras("text", element.getTextElement(), false); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasAnswer()) { + openArray("answer"); + for (QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent e : element.getAnswer()) + composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(null, e); + closeArray(); + }; + if (element.hasItem()) { + openArray("item"); + for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) + composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e); + closeArray(); + }; + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { + if (element != null) { + open(name); + composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentInner(element); + close(); + } + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentInner(QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { + composeBackbone(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } + if (element.hasItem()) { + openArray("item"); + for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) + composeQuestionnaireResponseQuestionnaireResponseItemComponent(null, e); + closeArray(); + }; + } + + protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeRelatedPersonInner(element); + } + } + + protected void composeRelatedPersonInner(RelatedPerson element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasName()) { + openArray("name"); + for (HumanName e : element.getName()) + composeHumanName(null, e); + closeArray(); + }; + if (element.hasTelecom()) { + openArray("telecom"); + for (ContactPoint e : element.getTelecom()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasGenderElement()) { + composeEnumerationCore("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + composeEnumerationExtras("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory(), false); + } + if (element.hasBirthDateElement()) { + composeDateCore("birthDate", element.getBirthDateElement(), false); + composeDateExtras("birthDate", element.getBirthDateElement(), false); + } + if (element.hasAddress()) { + openArray("address"); + for (Address e : element.getAddress()) + composeAddress(null, e); + closeArray(); + }; + if (element.hasPhoto()) { + openArray("photo"); + for (Attachment e : element.getPhoto()) + composeAttachment(null, e); + closeArray(); + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeRequestGroup(String name, RequestGroup element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeRequestGroupInner(element); + } + } + + protected void composeRequestGroupInner(RequestGroup element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + openArray("definition"); + for (Reference e : element.getDefinition()) + composeReference(null, e); + closeArray(); + }; + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReplaces()) { + openArray("replaces"); + for (Reference e : element.getReplaces()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory(), false); + } + if (element.hasIntentElement()) { + composeEnumerationCore("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory(), false); + composeEnumerationExtras("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory(), false); + } + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasReasonCode()) { + openArray("reasonCode"); + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasReasonReference()) { + openArray("reasonReference"); + for (Reference e : element.getReasonReference()) + composeReference(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasAction()) { + openArray("action"); + for (RequestGroup.RequestGroupActionComponent e : element.getAction()) + composeRequestGroupRequestGroupActionComponent(null, e); + closeArray(); + }; + } + + protected void composeRequestGroupRequestGroupActionComponent(String name, RequestGroup.RequestGroupActionComponent element) throws IOException { + if (element != null) { + open(name); + composeRequestGroupRequestGroupActionComponentInner(element); + close(); + } + } + + protected void composeRequestGroupRequestGroupActionComponentInner(RequestGroup.RequestGroupActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasPrefixElement()) { + composeStringCore("prefix", element.getPrefixElement(), false); + composeStringExtras("prefix", element.getPrefixElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasTextEquivalentElement()) { + composeStringCore("textEquivalent", element.getTextEquivalentElement(), false); + composeStringExtras("textEquivalent", element.getTextEquivalentElement(), false); + } + if (element.hasCode()) { + openArray("code"); + for (CodeableConcept e : element.getCode()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDocumentation()) { + openArray("documentation"); + for (RelatedArtifact e : element.getDocumentation()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasCondition()) { + openArray("condition"); + for (RequestGroup.RequestGroupActionConditionComponent e : element.getCondition()) + composeRequestGroupRequestGroupActionConditionComponent(null, e); + closeArray(); + }; + if (element.hasRelatedAction()) { + openArray("relatedAction"); + for (RequestGroup.RequestGroupActionRelatedActionComponent e : element.getRelatedAction()) + composeRequestGroupRequestGroupActionRelatedActionComponent(null, e); + closeArray(); + }; + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } + if (element.hasParticipant()) { + openArray("participant"); + for (Reference e : element.getParticipant()) + composeReference(null, e); + closeArray(); + }; + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasGroupingBehaviorElement()) { + composeEnumerationCore("groupingBehavior", element.getGroupingBehaviorElement(), new RequestGroup.ActionGroupingBehaviorEnumFactory(), false); + composeEnumerationExtras("groupingBehavior", element.getGroupingBehaviorElement(), new RequestGroup.ActionGroupingBehaviorEnumFactory(), false); + } + if (element.hasSelectionBehaviorElement()) { + composeEnumerationCore("selectionBehavior", element.getSelectionBehaviorElement(), new RequestGroup.ActionSelectionBehaviorEnumFactory(), false); + composeEnumerationExtras("selectionBehavior", element.getSelectionBehaviorElement(), new RequestGroup.ActionSelectionBehaviorEnumFactory(), false); + } + if (element.hasRequiredBehaviorElement()) { + composeEnumerationCore("requiredBehavior", element.getRequiredBehaviorElement(), new RequestGroup.ActionRequiredBehaviorEnumFactory(), false); + composeEnumerationExtras("requiredBehavior", element.getRequiredBehaviorElement(), new RequestGroup.ActionRequiredBehaviorEnumFactory(), false); + } + if (element.hasPrecheckBehaviorElement()) { + composeEnumerationCore("precheckBehavior", element.getPrecheckBehaviorElement(), new RequestGroup.ActionPrecheckBehaviorEnumFactory(), false); + composeEnumerationExtras("precheckBehavior", element.getPrecheckBehaviorElement(), new RequestGroup.ActionPrecheckBehaviorEnumFactory(), false); + } + if (element.hasCardinalityBehaviorElement()) { + composeEnumerationCore("cardinalityBehavior", element.getCardinalityBehaviorElement(), new RequestGroup.ActionCardinalityBehaviorEnumFactory(), false); + composeEnumerationExtras("cardinalityBehavior", element.getCardinalityBehaviorElement(), new RequestGroup.ActionCardinalityBehaviorEnumFactory(), false); + } + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + if (element.hasAction()) { + openArray("action"); + for (RequestGroup.RequestGroupActionComponent e : element.getAction()) + composeRequestGroupRequestGroupActionComponent(null, e); + closeArray(); + }; + } + + protected void composeRequestGroupRequestGroupActionConditionComponent(String name, RequestGroup.RequestGroupActionConditionComponent element) throws IOException { + if (element != null) { + open(name); + composeRequestGroupRequestGroupActionConditionComponentInner(element); + close(); + } + } + + protected void composeRequestGroupRequestGroupActionConditionComponentInner(RequestGroup.RequestGroupActionConditionComponent element) throws IOException { + composeBackbone(element); + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasLanguageElement()) { + composeStringCore("language", element.getLanguageElement(), false); + composeStringExtras("language", element.getLanguageElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + } + + protected void composeRequestGroupRequestGroupActionRelatedActionComponent(String name, RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { + if (element != null) { + open(name); + composeRequestGroupRequestGroupActionRelatedActionComponentInner(element); + close(); + } + } + + protected void composeRequestGroupRequestGroupActionRelatedActionComponentInner(RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasActionIdElement()) { + composeIdCore("actionId", element.getActionIdElement(), false); + composeIdExtras("actionId", element.getActionIdElement(), false); + } + if (element.hasRelationshipElement()) { + composeEnumerationCore("relationship", element.getRelationshipElement(), new RequestGroup.ActionRelationshipTypeEnumFactory(), false); + composeEnumerationExtras("relationship", element.getRelationshipElement(), new RequestGroup.ActionRelationshipTypeEnumFactory(), false); + } + if (element.hasOffset()) { + composeType("offset", element.getOffset()); + } + } + + protected void composeResearchStudy(String name, ResearchStudy element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeResearchStudyInner(element); + } + } + + protected void composeResearchStudyInner(ResearchStudy element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasProtocol()) { + openArray("protocol"); + for (Reference e : element.getProtocol()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasFocus()) { + openArray("focus"); + for (CodeableConcept e : element.getFocus()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasKeyword()) { + openArray("keyword"); + for (CodeableConcept e : element.getKeyword()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasEnrollment()) { + openArray("enrollment"); + for (Reference e : element.getEnrollment()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasSponsor()) { + composeReference("sponsor", element.getSponsor()); + } + if (element.hasPrincipalInvestigator()) { + composeReference("principalInvestigator", element.getPrincipalInvestigator()); + } + if (element.hasSite()) { + openArray("site"); + for (Reference e : element.getSite()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReasonStopped()) { + composeCodeableConcept("reasonStopped", element.getReasonStopped()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasArm()) { + openArray("arm"); + for (ResearchStudy.ResearchStudyArmComponent e : element.getArm()) + composeResearchStudyResearchStudyArmComponent(null, e); + closeArray(); + }; + } + + protected void composeResearchStudyResearchStudyArmComponent(String name, ResearchStudy.ResearchStudyArmComponent element) throws IOException { + if (element != null) { + open(name); + composeResearchStudyResearchStudyArmComponentInner(element); + close(); + } + } + + protected void composeResearchStudyResearchStudyArmComponentInner(ResearchStudy.ResearchStudyArmComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + } + + protected void composeResearchSubject(String name, ResearchSubject element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeResearchSubjectInner(element); + } + } + + protected void composeResearchSubjectInner(ResearchSubject element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasStudy()) { + composeReference("study", element.getStudy()); + } + if (element.hasIndividual()) { + composeReference("individual", element.getIndividual()); + } + if (element.hasAssignedArmElement()) { + composeStringCore("assignedArm", element.getAssignedArmElement(), false); + composeStringExtras("assignedArm", element.getAssignedArmElement(), false); + } + if (element.hasActualArmElement()) { + composeStringCore("actualArm", element.getActualArmElement(), false); + composeStringExtras("actualArm", element.getActualArmElement(), false); + } + if (element.hasConsent()) { + composeReference("consent", element.getConsent()); + } + } + + protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeRiskAssessmentInner(element); + } + } + + protected void composeRiskAssessmentInner(RiskAssessment element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasBasedOn()) { + composeReference("basedOn", element.getBasedOn()); + } + if (element.hasParent()) { + composeReference("parent", element.getParent()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory(), false); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasCondition()) { + composeReference("condition", element.getCondition()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } + if (element.hasBasis()) { + openArray("basis"); + for (Reference e : element.getBasis()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPrediction()) { + openArray("prediction"); + for (RiskAssessment.RiskAssessmentPredictionComponent e : element.getPrediction()) + composeRiskAssessmentRiskAssessmentPredictionComponent(null, e); + closeArray(); + }; + if (element.hasMitigationElement()) { + composeStringCore("mitigation", element.getMitigationElement(), false); + composeStringExtras("mitigation", element.getMitigationElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeRiskAssessmentRiskAssessmentPredictionComponent(String name, RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { + if (element != null) { + open(name); + composeRiskAssessmentRiskAssessmentPredictionComponentInner(element); + close(); + } + } + + protected void composeRiskAssessmentRiskAssessmentPredictionComponentInner(RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasProbability()) { + composeType("probability", element.getProbability()); + } + if (element.hasQualitativeRisk()) { + composeCodeableConcept("qualitativeRisk", element.getQualitativeRisk()); + } + if (element.hasRelativeRiskElement()) { + composeDecimalCore("relativeRisk", element.getRelativeRiskElement(), false); + composeDecimalExtras("relativeRisk", element.getRelativeRiskElement(), false); + } + if (element.hasWhen()) { + composeType("when", element.getWhen()); + } + if (element.hasRationaleElement()) { + composeStringCore("rationale", element.getRationaleElement(), false); + composeStringExtras("rationale", element.getRationaleElement(), false); + } + } + + protected void composeSchedule(String name, Schedule element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeScheduleInner(element); + } + } + + protected void composeScheduleInner(Schedule element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasActiveElement()) { + composeBooleanCore("active", element.getActiveElement(), false); + composeBooleanExtras("active", element.getActiveElement(), false); + } + if (element.hasServiceCategory()) { + composeCodeableConcept("serviceCategory", element.getServiceCategory()); + } + if (element.hasServiceType()) { + openArray("serviceType"); + for (CodeableConcept e : element.getServiceType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialty()) { + openArray("specialty"); + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasActor()) { + openArray("actor"); + for (Reference e : element.getActor()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPlanningHorizon()) { + composePeriod("planningHorizon", element.getPlanningHorizon()); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeSearchParameter(String name, SearchParameter element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSearchParameterInner(element); + } + } + + protected void composeSearchParameterInner(SearchParameter element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasBase()) { + openArray("base"); + for (CodeType e : element.getBase()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getBase())) { + openArray("_base"); + for (CodeType e : element.getBase()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory(), false); + } + if (element.hasDerivedFromElement()) { + composeUriCore("derivedFrom", element.getDerivedFromElement(), false); + composeUriExtras("derivedFrom", element.getDerivedFromElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + if (element.hasXpathElement()) { + composeStringCore("xpath", element.getXpathElement(), false); + composeStringExtras("xpath", element.getXpathElement(), false); + } + if (element.hasXpathUsageElement()) { + composeEnumerationCore("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory(), false); + composeEnumerationExtras("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory(), false); + } + if (element.hasTarget()) { + openArray("target"); + for (CodeType e : element.getTarget()) + composeCodeCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getTarget())) { + openArray("_target"); + for (CodeType e : element.getTarget()) + composeCodeExtras(null, e, true); + closeArray(); + } + }; + if (element.hasComparator()) { + openArray("comparator"); + for (Enumeration e : element.getComparator()) + composeEnumerationCore(null, e, new SearchParameter.SearchComparatorEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getComparator())) { + openArray("_comparator"); + for (Enumeration e : element.getComparator()) + composeEnumerationExtras(null, e, new SearchParameter.SearchComparatorEnumFactory(), true); + closeArray(); + } + }; + if (element.hasModifier()) { + openArray("modifier"); + for (Enumeration e : element.getModifier()) + composeEnumerationCore(null, e, new SearchParameter.SearchModifierCodeEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getModifier())) { + openArray("_modifier"); + for (Enumeration e : element.getModifier()) + composeEnumerationExtras(null, e, new SearchParameter.SearchModifierCodeEnumFactory(), true); + closeArray(); + } + }; + if (element.hasChain()) { + openArray("chain"); + for (StringType e : element.getChain()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getChain())) { + openArray("_chain"); + for (StringType e : element.getChain()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasComponent()) { + openArray("component"); + for (SearchParameter.SearchParameterComponentComponent e : element.getComponent()) + composeSearchParameterSearchParameterComponentComponent(null, e); + closeArray(); + }; + } + + protected void composeSearchParameterSearchParameterComponentComponent(String name, SearchParameter.SearchParameterComponentComponent element) throws IOException { + if (element != null) { + open(name); + composeSearchParameterSearchParameterComponentComponentInner(element); + close(); + } + } + + protected void composeSearchParameterSearchParameterComponentComponentInner(SearchParameter.SearchParameterComponentComponent element) throws IOException { + composeBackbone(element); + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + } + + protected void composeSequence(String name, Sequence element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSequenceInner(element); + } + } + + protected void composeSequenceInner(Sequence element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Sequence.SequenceTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Sequence.SequenceTypeEnumFactory(), false); + } + if (element.hasCoordinateSystemElement()) { + composeIntegerCore("coordinateSystem", element.getCoordinateSystemElement(), false); + composeIntegerExtras("coordinateSystem", element.getCoordinateSystemElement(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasSpecimen()) { + composeReference("specimen", element.getSpecimen()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasQuantity()) { + composeQuantity("quantity", element.getQuantity()); + } + if (element.hasReferenceSeq()) { + composeSequenceSequenceReferenceSeqComponent("referenceSeq", element.getReferenceSeq()); + } + if (element.hasVariant()) { + openArray("variant"); + for (Sequence.SequenceVariantComponent e : element.getVariant()) + composeSequenceSequenceVariantComponent(null, e); + closeArray(); + }; + if (element.hasObservedSeqElement()) { + composeStringCore("observedSeq", element.getObservedSeqElement(), false); + composeStringExtras("observedSeq", element.getObservedSeqElement(), false); + } + if (element.hasQuality()) { + openArray("quality"); + for (Sequence.SequenceQualityComponent e : element.getQuality()) + composeSequenceSequenceQualityComponent(null, e); + closeArray(); + }; + if (element.hasReadCoverageElement()) { + composeIntegerCore("readCoverage", element.getReadCoverageElement(), false); + composeIntegerExtras("readCoverage", element.getReadCoverageElement(), false); + } + if (element.hasRepository()) { + openArray("repository"); + for (Sequence.SequenceRepositoryComponent e : element.getRepository()) + composeSequenceSequenceRepositoryComponent(null, e); + closeArray(); + }; + if (element.hasPointer()) { + openArray("pointer"); + for (Reference e : element.getPointer()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStructureVariant()) { + openArray("structureVariant"); + for (Sequence.SequenceStructureVariantComponent e : element.getStructureVariant()) + composeSequenceSequenceStructureVariantComponent(null, e); + closeArray(); + }; + } + + protected void composeSequenceSequenceReferenceSeqComponent(String name, Sequence.SequenceReferenceSeqComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceReferenceSeqComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceReferenceSeqComponentInner(Sequence.SequenceReferenceSeqComponent element) throws IOException { + composeBackbone(element); + if (element.hasChromosome()) { + composeCodeableConcept("chromosome", element.getChromosome()); + } + if (element.hasGenomeBuildElement()) { + composeStringCore("genomeBuild", element.getGenomeBuildElement(), false); + composeStringExtras("genomeBuild", element.getGenomeBuildElement(), false); + } + if (element.hasReferenceSeqId()) { + composeCodeableConcept("referenceSeqId", element.getReferenceSeqId()); + } + if (element.hasReferenceSeqPointer()) { + composeReference("referenceSeqPointer", element.getReferenceSeqPointer()); + } + if (element.hasReferenceSeqStringElement()) { + composeStringCore("referenceSeqString", element.getReferenceSeqStringElement(), false); + composeStringExtras("referenceSeqString", element.getReferenceSeqStringElement(), false); + } + if (element.hasStrandElement()) { + composeIntegerCore("strand", element.getStrandElement(), false); + composeIntegerExtras("strand", element.getStrandElement(), false); + } + if (element.hasWindowStartElement()) { + composeIntegerCore("windowStart", element.getWindowStartElement(), false); + composeIntegerExtras("windowStart", element.getWindowStartElement(), false); + } + if (element.hasWindowEndElement()) { + composeIntegerCore("windowEnd", element.getWindowEndElement(), false); + composeIntegerExtras("windowEnd", element.getWindowEndElement(), false); + } + } + + protected void composeSequenceSequenceVariantComponent(String name, Sequence.SequenceVariantComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceVariantComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceVariantComponentInner(Sequence.SequenceVariantComponent element) throws IOException { + composeBackbone(element); + if (element.hasStartElement()) { + composeIntegerCore("start", element.getStartElement(), false); + composeIntegerExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeIntegerCore("end", element.getEndElement(), false); + composeIntegerExtras("end", element.getEndElement(), false); + } + if (element.hasObservedAlleleElement()) { + composeStringCore("observedAllele", element.getObservedAlleleElement(), false); + composeStringExtras("observedAllele", element.getObservedAlleleElement(), false); + } + if (element.hasReferenceAlleleElement()) { + composeStringCore("referenceAllele", element.getReferenceAlleleElement(), false); + composeStringExtras("referenceAllele", element.getReferenceAlleleElement(), false); + } + if (element.hasCigarElement()) { + composeStringCore("cigar", element.getCigarElement(), false); + composeStringExtras("cigar", element.getCigarElement(), false); + } + if (element.hasVariantPointer()) { + composeReference("variantPointer", element.getVariantPointer()); + } + } + + protected void composeSequenceSequenceQualityComponent(String name, Sequence.SequenceQualityComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceQualityComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceQualityComponentInner(Sequence.SequenceQualityComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Sequence.QualityTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Sequence.QualityTypeEnumFactory(), false); + } + if (element.hasStandardSequence()) { + composeCodeableConcept("standardSequence", element.getStandardSequence()); + } + if (element.hasStartElement()) { + composeIntegerCore("start", element.getStartElement(), false); + composeIntegerExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeIntegerCore("end", element.getEndElement(), false); + composeIntegerExtras("end", element.getEndElement(), false); + } + if (element.hasScore()) { + composeQuantity("score", element.getScore()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasTruthTPElement()) { + composeDecimalCore("truthTP", element.getTruthTPElement(), false); + composeDecimalExtras("truthTP", element.getTruthTPElement(), false); + } + if (element.hasQueryTPElement()) { + composeDecimalCore("queryTP", element.getQueryTPElement(), false); + composeDecimalExtras("queryTP", element.getQueryTPElement(), false); + } + if (element.hasTruthFNElement()) { + composeDecimalCore("truthFN", element.getTruthFNElement(), false); + composeDecimalExtras("truthFN", element.getTruthFNElement(), false); + } + if (element.hasQueryFPElement()) { + composeDecimalCore("queryFP", element.getQueryFPElement(), false); + composeDecimalExtras("queryFP", element.getQueryFPElement(), false); + } + if (element.hasGtFPElement()) { + composeDecimalCore("gtFP", element.getGtFPElement(), false); + composeDecimalExtras("gtFP", element.getGtFPElement(), false); + } + if (element.hasPrecisionElement()) { + composeDecimalCore("precision", element.getPrecisionElement(), false); + composeDecimalExtras("precision", element.getPrecisionElement(), false); + } + if (element.hasRecallElement()) { + composeDecimalCore("recall", element.getRecallElement(), false); + composeDecimalExtras("recall", element.getRecallElement(), false); + } + if (element.hasFScoreElement()) { + composeDecimalCore("fScore", element.getFScoreElement(), false); + composeDecimalExtras("fScore", element.getFScoreElement(), false); + } + if (element.hasRoc()) { + composeSequenceSequenceQualityRocComponent("roc", element.getRoc()); + } + } + + protected void composeSequenceSequenceQualityRocComponent(String name, Sequence.SequenceQualityRocComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceQualityRocComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceQualityRocComponentInner(Sequence.SequenceQualityRocComponent element) throws IOException { + composeBackbone(element); + if (element.hasScore()) { + openArray("score"); + for (IntegerType e : element.getScore()) + composeIntegerCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getScore())) { + openArray("_score"); + for (IntegerType e : element.getScore()) + composeIntegerExtras(null, e, true); + closeArray(); + } + }; + if (element.hasNumTP()) { + openArray("numTP"); + for (IntegerType e : element.getNumTP()) + composeIntegerCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNumTP())) { + openArray("_numTP"); + for (IntegerType e : element.getNumTP()) + composeIntegerExtras(null, e, true); + closeArray(); + } + }; + if (element.hasNumFP()) { + openArray("numFP"); + for (IntegerType e : element.getNumFP()) + composeIntegerCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNumFP())) { + openArray("_numFP"); + for (IntegerType e : element.getNumFP()) + composeIntegerExtras(null, e, true); + closeArray(); + } + }; + if (element.hasNumFN()) { + openArray("numFN"); + for (IntegerType e : element.getNumFN()) + composeIntegerCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getNumFN())) { + openArray("_numFN"); + for (IntegerType e : element.getNumFN()) + composeIntegerExtras(null, e, true); + closeArray(); + } + }; + if (element.hasPrecision()) { + openArray("precision"); + for (DecimalType e : element.getPrecision()) + composeDecimalCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getPrecision())) { + openArray("_precision"); + for (DecimalType e : element.getPrecision()) + composeDecimalExtras(null, e, true); + closeArray(); + } + }; + if (element.hasSensitivity()) { + openArray("sensitivity"); + for (DecimalType e : element.getSensitivity()) + composeDecimalCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getSensitivity())) { + openArray("_sensitivity"); + for (DecimalType e : element.getSensitivity()) + composeDecimalExtras(null, e, true); + closeArray(); + } + }; + if (element.hasFMeasure()) { + openArray("fMeasure"); + for (DecimalType e : element.getFMeasure()) + composeDecimalCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getFMeasure())) { + openArray("_fMeasure"); + for (DecimalType e : element.getFMeasure()) + composeDecimalExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeSequenceSequenceRepositoryComponent(String name, Sequence.SequenceRepositoryComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceRepositoryComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceRepositoryComponentInner(Sequence.SequenceRepositoryComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Sequence.RepositoryTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Sequence.RepositoryTypeEnumFactory(), false); + } + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDatasetIdElement()) { + composeStringCore("datasetId", element.getDatasetIdElement(), false); + composeStringExtras("datasetId", element.getDatasetIdElement(), false); + } + if (element.hasVariantsetIdElement()) { + composeStringCore("variantsetId", element.getVariantsetIdElement(), false); + composeStringExtras("variantsetId", element.getVariantsetIdElement(), false); + } + if (element.hasReadsetIdElement()) { + composeStringCore("readsetId", element.getReadsetIdElement(), false); + composeStringExtras("readsetId", element.getReadsetIdElement(), false); + } + } + + protected void composeSequenceSequenceStructureVariantComponent(String name, Sequence.SequenceStructureVariantComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceStructureVariantComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceStructureVariantComponentInner(Sequence.SequenceStructureVariantComponent element) throws IOException { + composeBackbone(element); + if (element.hasPrecisionElement()) { + composeStringCore("precision", element.getPrecisionElement(), false); + composeStringExtras("precision", element.getPrecisionElement(), false); + } + if (element.hasReportedaCGHRatioElement()) { + composeDecimalCore("reportedaCGHRatio", element.getReportedaCGHRatioElement(), false); + composeDecimalExtras("reportedaCGHRatio", element.getReportedaCGHRatioElement(), false); + } + if (element.hasLengthElement()) { + composeIntegerCore("length", element.getLengthElement(), false); + composeIntegerExtras("length", element.getLengthElement(), false); + } + if (element.hasOuter()) { + composeSequenceSequenceStructureVariantOuterComponent("outer", element.getOuter()); + } + if (element.hasInner()) { + composeSequenceSequenceStructureVariantInnerComponent("inner", element.getInner()); + } + } + + protected void composeSequenceSequenceStructureVariantOuterComponent(String name, Sequence.SequenceStructureVariantOuterComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceStructureVariantOuterComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceStructureVariantOuterComponentInner(Sequence.SequenceStructureVariantOuterComponent element) throws IOException { + composeBackbone(element); + if (element.hasStartElement()) { + composeIntegerCore("start", element.getStartElement(), false); + composeIntegerExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeIntegerCore("end", element.getEndElement(), false); + composeIntegerExtras("end", element.getEndElement(), false); + } + } + + protected void composeSequenceSequenceStructureVariantInnerComponent(String name, Sequence.SequenceStructureVariantInnerComponent element) throws IOException { + if (element != null) { + open(name); + composeSequenceSequenceStructureVariantInnerComponentInner(element); + close(); + } + } + + protected void composeSequenceSequenceStructureVariantInnerComponentInner(Sequence.SequenceStructureVariantInnerComponent element) throws IOException { + composeBackbone(element); + if (element.hasStartElement()) { + composeIntegerCore("start", element.getStartElement(), false); + composeIntegerExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeIntegerCore("end", element.getEndElement(), false); + composeIntegerExtras("end", element.getEndElement(), false); + } + } + + protected void composeServiceDefinition(String name, ServiceDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeServiceDefinitionInner(element); + } + } + + protected void composeServiceDefinitionInner(ServiceDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasUsageElement()) { + composeStringCore("usage", element.getUsageElement(), false); + composeStringExtras("usage", element.getUsageElement(), false); + } + if (element.hasApprovalDateElement()) { + composeDateCore("approvalDate", element.getApprovalDateElement(), false); + composeDateExtras("approvalDate", element.getApprovalDateElement(), false); + } + if (element.hasLastReviewDateElement()) { + composeDateCore("lastReviewDate", element.getLastReviewDateElement(), false); + composeDateExtras("lastReviewDate", element.getLastReviewDateElement(), false); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasTopic()) { + openArray("topic"); + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasContributor()) { + openArray("contributor"); + for (Contributor e : element.getContributor()) + composeContributor(null, e); + closeArray(); + }; + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasRelatedArtifact()) { + openArray("relatedArtifact"); + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact(null, e); + closeArray(); + }; + if (element.hasTrigger()) { + openArray("trigger"); + for (TriggerDefinition e : element.getTrigger()) + composeTriggerDefinition(null, e); + closeArray(); + }; + if (element.hasDataRequirement()) { + openArray("dataRequirement"); + for (DataRequirement e : element.getDataRequirement()) + composeDataRequirement(null, e); + closeArray(); + }; + if (element.hasOperationDefinition()) { + composeReference("operationDefinition", element.getOperationDefinition()); + } + } + + protected void composeSlot(String name, Slot element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSlotInner(element); + } + } + + protected void composeSlotInner(Slot element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasServiceCategory()) { + composeCodeableConcept("serviceCategory", element.getServiceCategory()); + } + if (element.hasServiceType()) { + openArray("serviceType"); + for (CodeableConcept e : element.getServiceType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecialty()) { + openArray("specialty"); + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasAppointmentType()) { + composeCodeableConcept("appointmentType", element.getAppointmentType()); + } + if (element.hasSchedule()) { + composeReference("schedule", element.getSchedule()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory(), false); + } + if (element.hasStartElement()) { + composeInstantCore("start", element.getStartElement(), false); + composeInstantExtras("start", element.getStartElement(), false); + } + if (element.hasEndElement()) { + composeInstantCore("end", element.getEndElement(), false); + composeInstantExtras("end", element.getEndElement(), false); + } + if (element.hasOverbookedElement()) { + composeBooleanCore("overbooked", element.getOverbookedElement(), false); + composeBooleanExtras("overbooked", element.getOverbookedElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeSpecimen(String name, Specimen element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSpecimenInner(element); + } + } + + protected void composeSpecimenInner(Specimen element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasAccessionIdentifier()) { + composeIdentifier("accessionIdentifier", element.getAccessionIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasReceivedTimeElement()) { + composeDateTimeCore("receivedTime", element.getReceivedTimeElement(), false); + composeDateTimeExtras("receivedTime", element.getReceivedTimeElement(), false); + } + if (element.hasParent()) { + openArray("parent"); + for (Reference e : element.getParent()) + composeReference(null, e); + closeArray(); + }; + if (element.hasRequest()) { + openArray("request"); + for (Reference e : element.getRequest()) + composeReference(null, e); + closeArray(); + }; + if (element.hasCollection()) { + composeSpecimenSpecimenCollectionComponent("collection", element.getCollection()); + } + if (element.hasProcessing()) { + openArray("processing"); + for (Specimen.SpecimenProcessingComponent e : element.getProcessing()) + composeSpecimenSpecimenProcessingComponent(null, e); + closeArray(); + }; + if (element.hasContainer()) { + openArray("container"); + for (Specimen.SpecimenContainerComponent e : element.getContainer()) + composeSpecimenSpecimenContainerComponent(null, e); + closeArray(); + }; + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + protected void composeSpecimenSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element) throws IOException { + if (element != null) { + open(name); + composeSpecimenSpecimenCollectionComponentInner(element); + close(); + } + } + + protected void composeSpecimenSpecimenCollectionComponentInner(Specimen.SpecimenCollectionComponent element) throws IOException { + composeBackbone(element); + if (element.hasCollector()) { + composeReference("collector", element.getCollector()); + } + if (element.hasCollected()) { + composeType("collected", element.getCollected()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + } + + protected void composeSpecimenSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element) throws IOException { + if (element != null) { + open(name); + composeSpecimenSpecimenProcessingComponentInner(element); + close(); + } + } + + protected void composeSpecimenSpecimenProcessingComponentInner(Specimen.SpecimenProcessingComponent element) throws IOException { + composeBackbone(element); + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasProcedure()) { + composeCodeableConcept("procedure", element.getProcedure()); + } + if (element.hasAdditive()) { + openArray("additive"); + for (Reference e : element.getAdditive()) + composeReference(null, e); + closeArray(); + }; + if (element.hasTime()) { + composeType("time", element.getTime()); + } + } + + protected void composeSpecimenSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element) throws IOException { + if (element != null) { + open(name); + composeSpecimenSpecimenContainerComponentInner(element); + close(); + } + } + + protected void composeSpecimenSpecimenContainerComponentInner(Specimen.SpecimenContainerComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasCapacity()) { + composeSimpleQuantity("capacity", element.getCapacity()); + } + if (element.hasSpecimenQuantity()) { + composeSimpleQuantity("specimenQuantity", element.getSpecimenQuantity()); + } + if (element.hasAdditive()) { + composeType("additive", element.getAdditive()); + } + } + + protected void composeSpecimenDefinition(String name, SpecimenDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSpecimenDefinitionInner(element); + } + } + + protected void composeSpecimenDefinitionInner(SpecimenDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasTypeCollected()) { + composeCodeableConcept("typeCollected", element.getTypeCollected()); + } + if (element.hasPatientPreparationElement()) { + composeStringCore("patientPreparation", element.getPatientPreparationElement(), false); + composeStringExtras("patientPreparation", element.getPatientPreparationElement(), false); + } + if (element.hasTimeAspectElement()) { + composeStringCore("timeAspect", element.getTimeAspectElement(), false); + composeStringExtras("timeAspect", element.getTimeAspectElement(), false); + } + if (element.hasCollection()) { + openArray("collection"); + for (CodeableConcept e : element.getCollection()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasSpecimenToLab()) { + openArray("specimenToLab"); + for (SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent e : element.getSpecimenToLab()) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(null, e); + closeArray(); + }; + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent element) throws IOException { + if (element != null) { + open(name); + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentInner(element); + close(); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentInner(SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent element) throws IOException { + composeBackbone(element); + if (element.hasIsDerivedElement()) { + composeBooleanCore("isDerived", element.getIsDerivedElement(), false); + composeBooleanExtras("isDerived", element.getIsDerivedElement(), false); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasPreferenceElement()) { + composeEnumerationCore("preference", element.getPreferenceElement(), new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory(), false); + composeEnumerationExtras("preference", element.getPreferenceElement(), new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory(), false); + } + if (element.hasContainerMaterial()) { + composeCodeableConcept("containerMaterial", element.getContainerMaterial()); + } + if (element.hasContainerType()) { + composeCodeableConcept("containerType", element.getContainerType()); + } + if (element.hasContainerCap()) { + composeCodeableConcept("containerCap", element.getContainerCap()); + } + if (element.hasContainerDescriptionElement()) { + composeStringCore("containerDescription", element.getContainerDescriptionElement(), false); + composeStringExtras("containerDescription", element.getContainerDescriptionElement(), false); + } + if (element.hasContainerCapacity()) { + composeSimpleQuantity("containerCapacity", element.getContainerCapacity()); + } + if (element.hasContainerMinimumVolume()) { + composeSimpleQuantity("containerMinimumVolume", element.getContainerMinimumVolume()); + } + if (element.hasContainerAdditive()) { + openArray("containerAdditive"); + for (SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent e : element.getContainerAdditive()) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(null, e); + closeArray(); + }; + if (element.hasContainerPreparationElement()) { + composeStringCore("containerPreparation", element.getContainerPreparationElement(), false); + composeStringExtras("containerPreparation", element.getContainerPreparationElement(), false); + } + if (element.hasRequirementElement()) { + composeStringCore("requirement", element.getRequirementElement(), false); + composeStringExtras("requirement", element.getRequirementElement(), false); + } + if (element.hasRetentionTime()) { + composeDuration("retentionTime", element.getRetentionTime()); + } + if (element.hasRejectionCriterion()) { + openArray("rejectionCriterion"); + for (CodeableConcept e : element.getRejectionCriterion()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasHandling()) { + openArray("handling"); + for (SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent e : element.getHandling()) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(null, e); + closeArray(); + }; + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent element) throws IOException { + if (element != null) { + open(name); + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentInner(element); + close(); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentInner(SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent element) throws IOException { + composeBackbone(element); + if (element.hasAdditive()) { + composeType("additive", element.getAdditive()); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent element) throws IOException { + if (element != null) { + open(name); + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentInner(element); + close(); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentInner(SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent element) throws IOException { + composeBackbone(element); + if (element.hasConditionSet()) { + composeCodeableConcept("conditionSet", element.getConditionSet()); + } + if (element.hasTempRange()) { + composeRange("tempRange", element.getTempRange()); + } + if (element.hasMaxDuration()) { + composeDuration("maxDuration", element.getMaxDuration()); + } + if (element.hasLightExposureElement()) { + composeStringCore("lightExposure", element.getLightExposureElement(), false); + composeStringExtras("lightExposure", element.getLightExposureElement(), false); + } + if (element.hasInstructionElement()) { + composeStringCore("instruction", element.getInstructionElement(), false); + composeStringExtras("instruction", element.getInstructionElement(), false); + } + } + + protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeStructureDefinitionInner(element); + } + } + + protected void composeStructureDefinitionInner(StructureDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasKeyword()) { + openArray("keyword"); + for (Coding e : element.getKeyword()) + composeCoding(null, e); + closeArray(); + }; + if (element.hasFhirVersionElement()) { + composeIdCore("fhirVersion", element.getFhirVersionElement(), false); + composeIdExtras("fhirVersion", element.getFhirVersionElement(), false); + } + if (element.hasMapping()) { + openArray("mapping"); + for (StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping()) + composeStructureDefinitionStructureDefinitionMappingComponent(null, e); + closeArray(); + }; + if (element.hasKindElement()) { + composeEnumerationCore("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory(), false); + composeEnumerationExtras("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory(), false); + } + if (element.hasAbstractElement()) { + composeBooleanCore("abstract", element.getAbstractElement(), false); + composeBooleanExtras("abstract", element.getAbstractElement(), false); + } + if (element.hasContextTypeElement()) { + composeEnumerationCore("contextType", element.getContextTypeElement(), new StructureDefinition.ExtensionContextEnumFactory(), false); + composeEnumerationExtras("contextType", element.getContextTypeElement(), new StructureDefinition.ExtensionContextEnumFactory(), false); + } + if (element.hasContext()) { + openArray("context"); + for (StringType e : element.getContext()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getContext())) { + openArray("_context"); + for (StringType e : element.getContext()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasContextInvariant()) { + openArray("contextInvariant"); + for (StringType e : element.getContextInvariant()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getContextInvariant())) { + openArray("_contextInvariant"); + for (StringType e : element.getContextInvariant()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + if (element.hasTypeElement()) { + composeCodeCore("type", element.getTypeElement(), false); + composeCodeExtras("type", element.getTypeElement(), false); + } + if (element.hasBaseDefinitionElement()) { + composeUriCore("baseDefinition", element.getBaseDefinitionElement(), false); + composeUriExtras("baseDefinition", element.getBaseDefinitionElement(), false); + } + if (element.hasDerivationElement()) { + composeEnumerationCore("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory(), false); + composeEnumerationExtras("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory(), false); + } + if (element.hasSnapshot()) { + composeStructureDefinitionStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot()); + } + if (element.hasDifferential()) { + composeStructureDefinitionStructureDefinitionDifferentialComponent("differential", element.getDifferential()); + } + } + + protected void composeStructureDefinitionStructureDefinitionMappingComponent(String name, StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureDefinitionStructureDefinitionMappingComponentInner(element); + close(); + } + } + + protected void composeStructureDefinitionStructureDefinitionMappingComponentInner(StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentityElement()) { + composeIdCore("identity", element.getIdentityElement(), false); + composeIdExtras("identity", element.getIdentityElement(), false); + } + if (element.hasUriElement()) { + composeUriCore("uri", element.getUriElement(), false); + composeUriExtras("uri", element.getUriElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasCommentElement()) { + composeStringCore("comment", element.getCommentElement(), false); + composeStringExtras("comment", element.getCommentElement(), false); + } + } + + protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(String name, StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureDefinitionStructureDefinitionSnapshotComponentInner(element); + close(); + } + } + + protected void composeStructureDefinitionStructureDefinitionSnapshotComponentInner(StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { + composeBackbone(element); + if (element.hasElement()) { + openArray("element"); + for (ElementDefinition e : element.getElement()) + composeElementDefinition(null, e); + closeArray(); + }; + } + + protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(String name, StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureDefinitionStructureDefinitionDifferentialComponentInner(element); + close(); + } + } + + protected void composeStructureDefinitionStructureDefinitionDifferentialComponentInner(StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { + composeBackbone(element); + if (element.hasElement()) { + openArray("element"); + for (ElementDefinition e : element.getElement()) + composeElementDefinition(null, e); + closeArray(); + }; + } + + protected void composeStructureMap(String name, StructureMap element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeStructureMapInner(element); + } + } + + protected void composeStructureMapInner(StructureMap element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasStructure()) { + openArray("structure"); + for (StructureMap.StructureMapStructureComponent e : element.getStructure()) + composeStructureMapStructureMapStructureComponent(null, e); + closeArray(); + }; + if (element.hasImport()) { + openArray("import"); + for (UriType e : element.getImport()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getImport())) { + openArray("_import"); + for (UriType e : element.getImport()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasGroup()) { + openArray("group"); + for (StructureMap.StructureMapGroupComponent e : element.getGroup()) + composeStructureMapStructureMapGroupComponent(null, e); + closeArray(); + }; + } + + protected void composeStructureMapStructureMapStructureComponent(String name, StructureMap.StructureMapStructureComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapStructureComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapStructureComponentInner(StructureMap.StructureMapStructureComponent element) throws IOException { + composeBackbone(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory(), false); + } + if (element.hasAliasElement()) { + composeStringCore("alias", element.getAliasElement(), false); + composeStringExtras("alias", element.getAliasElement(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeStructureMapStructureMapGroupComponent(String name, StructureMap.StructureMapGroupComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupComponentInner(StructureMap.StructureMapGroupComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeIdCore("name", element.getNameElement(), false); + composeIdExtras("name", element.getNameElement(), false); + } + if (element.hasExtendsElement()) { + composeIdCore("extends", element.getExtendsElement(), false); + composeIdExtras("extends", element.getExtendsElement(), false); + } + if (element.hasTypeModeElement()) { + composeEnumerationCore("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory(), false); + composeEnumerationExtras("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + if (element.hasInput()) { + openArray("input"); + for (StructureMap.StructureMapGroupInputComponent e : element.getInput()) + composeStructureMapStructureMapGroupInputComponent(null, e); + closeArray(); + }; + if (element.hasRule()) { + openArray("rule"); + for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) + composeStructureMapStructureMapGroupRuleComponent(null, e); + closeArray(); + }; + } + + protected void composeStructureMapStructureMapGroupInputComponent(String name, StructureMap.StructureMapGroupInputComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupInputComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupInputComponentInner(StructureMap.StructureMapGroupInputComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeIdCore("name", element.getNameElement(), false); + composeIdExtras("name", element.getNameElement(), false); + } + if (element.hasTypeElement()) { + composeStringCore("type", element.getTypeElement(), false); + composeStringExtras("type", element.getTypeElement(), false); + } + if (element.hasModeElement()) { + composeEnumerationCore("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory(), false); + composeEnumerationExtras("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory(), false); + } + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeStructureMapStructureMapGroupRuleComponent(String name, StructureMap.StructureMapGroupRuleComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupRuleComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupRuleComponentInner(StructureMap.StructureMapGroupRuleComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeIdCore("name", element.getNameElement(), false); + composeIdExtras("name", element.getNameElement(), false); + } + if (element.hasSource()) { + openArray("source"); + for (StructureMap.StructureMapGroupRuleSourceComponent e : element.getSource()) + composeStructureMapStructureMapGroupRuleSourceComponent(null, e); + closeArray(); + }; + if (element.hasTarget()) { + openArray("target"); + for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget()) + composeStructureMapStructureMapGroupRuleTargetComponent(null, e); + closeArray(); + }; + if (element.hasRule()) { + openArray("rule"); + for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) + composeStructureMapStructureMapGroupRuleComponent(null, e); + closeArray(); + }; + if (element.hasDependent()) { + openArray("dependent"); + for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent()) + composeStructureMapStructureMapGroupRuleDependentComponent(null, e); + closeArray(); + }; + if (element.hasDocumentationElement()) { + composeStringCore("documentation", element.getDocumentationElement(), false); + composeStringExtras("documentation", element.getDocumentationElement(), false); + } + } + + protected void composeStructureMapStructureMapGroupRuleSourceComponent(String name, StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupRuleSourceComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupRuleSourceComponentInner(StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { + composeBackbone(element); + if (element.hasContextElement()) { + composeIdCore("context", element.getContextElement(), false); + composeIdExtras("context", element.getContextElement(), false); + } + if (element.hasMinElement()) { + composeIntegerCore("min", element.getMinElement(), false); + composeIntegerExtras("min", element.getMinElement(), false); + } + if (element.hasMaxElement()) { + composeStringCore("max", element.getMaxElement(), false); + composeStringExtras("max", element.getMaxElement(), false); + } + if (element.hasTypeElement()) { + composeStringCore("type", element.getTypeElement(), false); + composeStringExtras("type", element.getTypeElement(), false); + } + if (element.hasDefaultValue()) { + composeType("defaultValue", element.getDefaultValue()); + } + if (element.hasElementElement()) { + composeStringCore("element", element.getElementElement(), false); + composeStringExtras("element", element.getElementElement(), false); + } + if (element.hasListModeElement()) { + composeEnumerationCore("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory(), false); + composeEnumerationExtras("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory(), false); + } + if (element.hasVariableElement()) { + composeIdCore("variable", element.getVariableElement(), false); + composeIdExtras("variable", element.getVariableElement(), false); + } + if (element.hasConditionElement()) { + composeStringCore("condition", element.getConditionElement(), false); + composeStringExtras("condition", element.getConditionElement(), false); + } + if (element.hasCheckElement()) { + composeStringCore("check", element.getCheckElement(), false); + composeStringExtras("check", element.getCheckElement(), false); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetComponent(String name, StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupRuleTargetComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetComponentInner(StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { + composeBackbone(element); + if (element.hasContextElement()) { + composeIdCore("context", element.getContextElement(), false); + composeIdExtras("context", element.getContextElement(), false); + } + if (element.hasContextTypeElement()) { + composeEnumerationCore("contextType", element.getContextTypeElement(), new StructureMap.StructureMapContextTypeEnumFactory(), false); + composeEnumerationExtras("contextType", element.getContextTypeElement(), new StructureMap.StructureMapContextTypeEnumFactory(), false); + } + if (element.hasElementElement()) { + composeStringCore("element", element.getElementElement(), false); + composeStringExtras("element", element.getElementElement(), false); + } + if (element.hasVariableElement()) { + composeIdCore("variable", element.getVariableElement(), false); + composeIdExtras("variable", element.getVariableElement(), false); + } + if (element.hasListMode()) { + openArray("listMode"); + for (Enumeration e : element.getListMode()) + composeEnumerationCore(null, e, new StructureMap.StructureMapTargetListModeEnumFactory(), true); + closeArray(); + if (anyHasExtras(element.getListMode())) { + openArray("_listMode"); + for (Enumeration e : element.getListMode()) + composeEnumerationExtras(null, e, new StructureMap.StructureMapTargetListModeEnumFactory(), true); + closeArray(); + } + }; + if (element.hasListRuleIdElement()) { + composeIdCore("listRuleId", element.getListRuleIdElement(), false); + composeIdExtras("listRuleId", element.getListRuleIdElement(), false); + } + if (element.hasTransformElement()) { + composeEnumerationCore("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory(), false); + composeEnumerationExtras("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory(), false); + } + if (element.hasParameter()) { + openArray("parameter"); + for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter()) + composeStructureMapStructureMapGroupRuleTargetParameterComponent(null, e); + closeArray(); + }; + } + + protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupRuleTargetParameterComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetParameterComponentInner(StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { + composeBackbone(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeStructureMapStructureMapGroupRuleDependentComponent(String name, StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { + if (element != null) { + open(name); + composeStructureMapStructureMapGroupRuleDependentComponentInner(element); + close(); + } + } + + protected void composeStructureMapStructureMapGroupRuleDependentComponentInner(StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeIdCore("name", element.getNameElement(), false); + composeIdExtras("name", element.getNameElement(), false); + } + if (element.hasVariable()) { + openArray("variable"); + for (StringType e : element.getVariable()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getVariable())) { + openArray("_variable"); + for (StringType e : element.getVariable()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeSubscription(String name, Subscription element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSubscriptionInner(element); + } + } + + protected void composeSubscriptionInner(Subscription element) throws IOException { + composeDomainResourceElements(element); + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactPoint e : element.getContact()) + composeContactPoint(null, e); + closeArray(); + }; + if (element.hasEndElement()) { + composeInstantCore("end", element.getEndElement(), false); + composeInstantExtras("end", element.getEndElement(), false); + } + if (element.hasReasonElement()) { + composeStringCore("reason", element.getReasonElement(), false); + composeStringExtras("reason", element.getReasonElement(), false); + } + if (element.hasCriteriaElement()) { + composeStringCore("criteria", element.getCriteriaElement(), false); + composeStringExtras("criteria", element.getCriteriaElement(), false); + } + if (element.hasErrorElement()) { + composeStringCore("error", element.getErrorElement(), false); + composeStringExtras("error", element.getErrorElement(), false); + } + if (element.hasChannel()) { + composeSubscriptionSubscriptionChannelComponent("channel", element.getChannel()); + } + if (element.hasTag()) { + openArray("tag"); + for (Coding e : element.getTag()) + composeCoding(null, e); + closeArray(); + }; + } + + protected void composeSubscriptionSubscriptionChannelComponent(String name, Subscription.SubscriptionChannelComponent element) throws IOException { + if (element != null) { + open(name); + composeSubscriptionSubscriptionChannelComponentInner(element); + close(); + } + } + + protected void composeSubscriptionSubscriptionChannelComponentInner(Subscription.SubscriptionChannelComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory(), false); + } + if (element.hasEndpointElement()) { + composeUriCore("endpoint", element.getEndpointElement(), false); + composeUriExtras("endpoint", element.getEndpointElement(), false); + } + if (element.hasPayloadElement()) { + composeStringCore("payload", element.getPayloadElement(), false); + composeStringExtras("payload", element.getPayloadElement(), false); + } + if (element.hasHeader()) { + openArray("header"); + for (StringType e : element.getHeader()) + composeStringCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getHeader())) { + openArray("_header"); + for (StringType e : element.getHeader()) + composeStringExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeSubstance(String name, Substance element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSubstanceInner(element); + } + } + + protected void composeSubstanceInner(Substance element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory(), false); + } + if (element.hasCategory()) { + openArray("category"); + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasInstance()) { + openArray("instance"); + for (Substance.SubstanceInstanceComponent e : element.getInstance()) + composeSubstanceSubstanceInstanceComponent(null, e); + closeArray(); + }; + if (element.hasIngredient()) { + openArray("ingredient"); + for (Substance.SubstanceIngredientComponent e : element.getIngredient()) + composeSubstanceSubstanceIngredientComponent(null, e); + closeArray(); + }; + } + + protected void composeSubstanceSubstanceInstanceComponent(String name, Substance.SubstanceInstanceComponent element) throws IOException { + if (element != null) { + open(name); + composeSubstanceSubstanceInstanceComponentInner(element); + close(); + } + } + + protected void composeSubstanceSubstanceInstanceComponentInner(Substance.SubstanceInstanceComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasExpiryElement()) { + composeDateTimeCore("expiry", element.getExpiryElement(), false); + composeDateTimeExtras("expiry", element.getExpiryElement(), false); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + } + + protected void composeSubstanceSubstanceIngredientComponent(String name, Substance.SubstanceIngredientComponent element) throws IOException { + if (element != null) { + open(name); + composeSubstanceSubstanceIngredientComponentInner(element); + close(); + } + } + + protected void composeSubstanceSubstanceIngredientComponentInner(Substance.SubstanceIngredientComponent element) throws IOException { + composeBackbone(element); + if (element.hasQuantity()) { + composeRatio("quantity", element.getQuantity()); + } + if (element.hasSubstance()) { + composeType("substance", element.getSubstance()); + } + } + + protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSupplyDeliveryInner(element); + } + } + + protected void composeSupplyDeliveryInner(SupplyDelivery element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSuppliedItem()) { + composeSupplyDeliverySupplyDeliverySuppliedItemComponent("suppliedItem", element.getSuppliedItem()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasSupplier()) { + composeReference("supplier", element.getSupplier()); + } + if (element.hasDestination()) { + composeReference("destination", element.getDestination()); + } + if (element.hasReceiver()) { + openArray("receiver"); + for (Reference e : element.getReceiver()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { + if (element != null) { + open(name); + composeSupplyDeliverySupplyDeliverySuppliedItemComponentInner(element); + close(); + } + } + + protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponentInner(SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasItem()) { + composeType("item", element.getItem()); + } + } + + protected void composeSupplyRequest(String name, SupplyRequest element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeSupplyRequestInner(element); + } + } + + protected void composeSupplyRequestInner(SupplyRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory(), false); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory(), false); + } + if (element.hasOrderedItem()) { + composeSupplyRequestSupplyRequestOrderedItemComponent("orderedItem", element.getOrderedItem()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasRequester()) { + composeSupplyRequestSupplyRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasSupplier()) { + openArray("supplier"); + for (Reference e : element.getSupplier()) + composeReference(null, e); + closeArray(); + }; + if (element.hasReason()) { + composeType("reason", element.getReason()); + } + if (element.hasDeliverFrom()) { + composeReference("deliverFrom", element.getDeliverFrom()); + } + if (element.hasDeliverTo()) { + composeReference("deliverTo", element.getDeliverTo()); + } + } + + protected void composeSupplyRequestSupplyRequestOrderedItemComponent(String name, SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { + if (element != null) { + open(name); + composeSupplyRequestSupplyRequestOrderedItemComponentInner(element); + close(); + } + } + + protected void composeSupplyRequestSupplyRequestOrderedItemComponentInner(SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { + composeBackbone(element); + if (element.hasQuantity()) { + composeQuantity("quantity", element.getQuantity()); + } + if (element.hasItem()) { + composeType("item", element.getItem()); + } + } + + protected void composeSupplyRequestSupplyRequestRequesterComponent(String name, SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { + if (element != null) { + open(name); + composeSupplyRequestSupplyRequestRequesterComponentInner(element); + close(); + } + } + + protected void composeSupplyRequestSupplyRequestRequesterComponentInner(SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeTask(String name, Task element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeTaskInner(element); + } + } + + protected void composeTaskInner(Task element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasDefinition()) { + composeType("definition", element.getDefinition()); + } + if (element.hasBasedOn()) { + openArray("basedOn"); + for (Reference e : element.getBasedOn()) + composeReference(null, e); + closeArray(); + }; + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasPartOf()) { + openArray("partOf"); + for (Reference e : element.getPartOf()) + composeReference(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Task.TaskStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Task.TaskStatusEnumFactory(), false); + } + if (element.hasStatusReason()) { + composeCodeableConcept("statusReason", element.getStatusReason()); + } + if (element.hasBusinessStatus()) { + composeCodeableConcept("businessStatus", element.getBusinessStatus()); + } + if (element.hasIntentElement()) { + composeEnumerationCore("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory(), false); + composeEnumerationExtras("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory(), false); + } + if (element.hasPriorityElement()) { + composeEnumerationCore("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory(), false); + composeEnumerationExtras("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory(), false); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasFocus()) { + composeReference("focus", element.getFocus()); + } + if (element.hasFor()) { + composeReference("for", element.getFor()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasExecutionPeriod()) { + composePeriod("executionPeriod", element.getExecutionPeriod()); + } + if (element.hasAuthoredOnElement()) { + composeDateTimeCore("authoredOn", element.getAuthoredOnElement(), false); + composeDateTimeExtras("authoredOn", element.getAuthoredOnElement(), false); + } + if (element.hasLastModifiedElement()) { + composeDateTimeCore("lastModified", element.getLastModifiedElement(), false); + composeDateTimeExtras("lastModified", element.getLastModifiedElement(), false); + } + if (element.hasRequester()) { + composeTaskTaskRequesterComponent("requester", element.getRequester()); + } + if (element.hasPerformerType()) { + openArray("performerType"); + for (CodeableConcept e : element.getPerformerType()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasOwner()) { + composeReference("owner", element.getOwner()); + } + if (element.hasReasonCode()) { + composeCodeableConcept("reasonCode", element.getReasonCode()); + } + if (element.hasReasonReference()) { + composeReference("reasonReference", element.getReasonReference()); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + if (element.hasRelevantHistory()) { + openArray("relevantHistory"); + for (Reference e : element.getRelevantHistory()) + composeReference(null, e); + closeArray(); + }; + if (element.hasRestriction()) { + composeTaskTaskRestrictionComponent("restriction", element.getRestriction()); + } + if (element.hasInput()) { + openArray("input"); + for (Task.ParameterComponent e : element.getInput()) + composeTaskParameterComponent(null, e); + closeArray(); + }; + if (element.hasOutput()) { + openArray("output"); + for (Task.TaskOutputComponent e : element.getOutput()) + composeTaskTaskOutputComponent(null, e); + closeArray(); + }; + } + + protected void composeTaskTaskRequesterComponent(String name, Task.TaskRequesterComponent element) throws IOException { + if (element != null) { + open(name); + composeTaskTaskRequesterComponentInner(element); + close(); + } + } + + protected void composeTaskTaskRequesterComponentInner(Task.TaskRequesterComponent element) throws IOException { + composeBackbone(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeTaskTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element) throws IOException { + if (element != null) { + open(name); + composeTaskTaskRestrictionComponentInner(element); + close(); + } + } + + protected void composeTaskTaskRestrictionComponentInner(Task.TaskRestrictionComponent element) throws IOException { + composeBackbone(element); + if (element.hasRepetitionsElement()) { + composePositiveIntCore("repetitions", element.getRepetitionsElement(), false); + composePositiveIntExtras("repetitions", element.getRepetitionsElement(), false); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasRecipient()) { + openArray("recipient"); + for (Reference e : element.getRecipient()) + composeReference(null, e); + closeArray(); + }; + } + + protected void composeTaskParameterComponent(String name, Task.ParameterComponent element) throws IOException { + if (element != null) { + open(name); + composeTaskParameterComponentInner(element); + close(); + } + } + + protected void composeTaskParameterComponentInner(Task.ParameterComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeTaskTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException { + if (element != null) { + open(name); + composeTaskTaskOutputComponentInner(element); + close(); + } + } + + protected void composeTaskTaskOutputComponentInner(Task.TaskOutputComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeTestReport(String name, TestReport element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeTestReportInner(element); + } + } + + protected void composeTestReportInner(TestReport element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory(), false); + } + if (element.hasTestScript()) { + composeReference("testScript", element.getTestScript()); + } + if (element.hasResultElement()) { + composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory(), false); + composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory(), false); + } + if (element.hasScoreElement()) { + composeDecimalCore("score", element.getScoreElement(), false); + composeDecimalExtras("score", element.getScoreElement(), false); + } + if (element.hasTesterElement()) { + composeStringCore("tester", element.getTesterElement(), false); + composeStringExtras("tester", element.getTesterElement(), false); + } + if (element.hasIssuedElement()) { + composeDateTimeCore("issued", element.getIssuedElement(), false); + composeDateTimeExtras("issued", element.getIssuedElement(), false); + } + if (element.hasParticipant()) { + openArray("participant"); + for (TestReport.TestReportParticipantComponent e : element.getParticipant()) + composeTestReportTestReportParticipantComponent(null, e); + closeArray(); + }; + if (element.hasSetup()) { + composeTestReportTestReportSetupComponent("setup", element.getSetup()); + } + if (element.hasTest()) { + openArray("test"); + for (TestReport.TestReportTestComponent e : element.getTest()) + composeTestReportTestReportTestComponent(null, e); + closeArray(); + }; + if (element.hasTeardown()) { + composeTestReportTestReportTeardownComponent("teardown", element.getTeardown()); + } + } + + protected void composeTestReportTestReportParticipantComponent(String name, TestReport.TestReportParticipantComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportTestReportParticipantComponentInner(element); + close(); + } + } + + protected void composeTestReportTestReportParticipantComponentInner(TestReport.TestReportParticipantComponent element) throws IOException { + composeBackbone(element); + if (element.hasTypeElement()) { + composeEnumerationCore("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory(), false); + composeEnumerationExtras("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory(), false); + } + if (element.hasUriElement()) { + composeUriCore("uri", element.getUriElement(), false); + composeUriExtras("uri", element.getUriElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + } + + protected void composeTestReportTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportTestReportSetupComponentInner(element); + close(); + } + } + + protected void composeTestReportTestReportSetupComponentInner(TestReport.TestReportSetupComponent element) throws IOException { + composeBackbone(element); + if (element.hasAction()) { + openArray("action"); + for (TestReport.SetupActionComponent e : element.getAction()) + composeTestReportSetupActionComponent(null, e); + closeArray(); + }; + } + + protected void composeTestReportSetupActionComponent(String name, TestReport.SetupActionComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportSetupActionComponentInner(element); + close(); + } + } + + protected void composeTestReportSetupActionComponentInner(TestReport.SetupActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOperation()) { + composeTestReportSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestReportSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestReportSetupActionOperationComponent(String name, TestReport.SetupActionOperationComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportSetupActionOperationComponentInner(element); + close(); + } + } + + protected void composeTestReportSetupActionOperationComponentInner(TestReport.SetupActionOperationComponent element) throws IOException { + composeBackbone(element); + if (element.hasResultElement()) { + composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); + composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); + } + if (element.hasMessageElement()) { + composeMarkdownCore("message", element.getMessageElement(), false); + composeMarkdownExtras("message", element.getMessageElement(), false); + } + if (element.hasDetailElement()) { + composeUriCore("detail", element.getDetailElement(), false); + composeUriExtras("detail", element.getDetailElement(), false); + } + } + + protected void composeTestReportSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportSetupActionAssertComponentInner(element); + close(); + } + } + + protected void composeTestReportSetupActionAssertComponentInner(TestReport.SetupActionAssertComponent element) throws IOException { + composeBackbone(element); + if (element.hasResultElement()) { + composeEnumerationCore("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); + composeEnumerationExtras("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory(), false); + } + if (element.hasMessageElement()) { + composeMarkdownCore("message", element.getMessageElement(), false); + composeMarkdownExtras("message", element.getMessageElement(), false); + } + if (element.hasDetailElement()) { + composeStringCore("detail", element.getDetailElement(), false); + composeStringExtras("detail", element.getDetailElement(), false); + } + } + + protected void composeTestReportTestReportTestComponent(String name, TestReport.TestReportTestComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportTestReportTestComponentInner(element); + close(); + } + } + + protected void composeTestReportTestReportTestComponentInner(TestReport.TestReportTestComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasAction()) { + openArray("action"); + for (TestReport.TestActionComponent e : element.getAction()) + composeTestReportTestActionComponent(null, e); + closeArray(); + }; + } + + protected void composeTestReportTestActionComponent(String name, TestReport.TestActionComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportTestActionComponentInner(element); + close(); + } + } + + protected void composeTestReportTestActionComponentInner(TestReport.TestActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOperation()) { + composeTestReportSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestReportSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestReportTestReportTeardownComponent(String name, TestReport.TestReportTeardownComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportTestReportTeardownComponentInner(element); + close(); + } + } + + protected void composeTestReportTestReportTeardownComponentInner(TestReport.TestReportTeardownComponent element) throws IOException { + composeBackbone(element); + if (element.hasAction()) { + openArray("action"); + for (TestReport.TeardownActionComponent e : element.getAction()) + composeTestReportTeardownActionComponent(null, e); + closeArray(); + }; + } + + protected void composeTestReportTeardownActionComponent(String name, TestReport.TeardownActionComponent element) throws IOException { + if (element != null) { + open(name); + composeTestReportTeardownActionComponentInner(element); + close(); + } + } + + protected void composeTestReportTeardownActionComponentInner(TestReport.TeardownActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOperation()) { + composeTestReportSetupActionOperationComponent("operation", element.getOperation()); + } + } + + protected void composeTestScript(String name, TestScript element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeTestScriptInner(element); + } + } + + protected void composeTestScriptInner(TestScript element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasOrigin()) { + openArray("origin"); + for (TestScript.TestScriptOriginComponent e : element.getOrigin()) + composeTestScriptTestScriptOriginComponent(null, e); + closeArray(); + }; + if (element.hasDestination()) { + openArray("destination"); + for (TestScript.TestScriptDestinationComponent e : element.getDestination()) + composeTestScriptTestScriptDestinationComponent(null, e); + closeArray(); + }; + if (element.hasMetadata()) { + composeTestScriptTestScriptMetadataComponent("metadata", element.getMetadata()); + } + if (element.hasFixture()) { + openArray("fixture"); + for (TestScript.TestScriptFixtureComponent e : element.getFixture()) + composeTestScriptTestScriptFixtureComponent(null, e); + closeArray(); + }; + if (element.hasProfile()) { + openArray("profile"); + for (Reference e : element.getProfile()) + composeReference(null, e); + closeArray(); + }; + if (element.hasVariable()) { + openArray("variable"); + for (TestScript.TestScriptVariableComponent e : element.getVariable()) + composeTestScriptTestScriptVariableComponent(null, e); + closeArray(); + }; + if (element.hasRule()) { + openArray("rule"); + for (TestScript.TestScriptRuleComponent e : element.getRule()) + composeTestScriptTestScriptRuleComponent(null, e); + closeArray(); + }; + if (element.hasRuleset()) { + openArray("ruleset"); + for (TestScript.TestScriptRulesetComponent e : element.getRuleset()) + composeTestScriptTestScriptRulesetComponent(null, e); + closeArray(); + }; + if (element.hasSetup()) { + composeTestScriptTestScriptSetupComponent("setup", element.getSetup()); + } + if (element.hasTest()) { + openArray("test"); + for (TestScript.TestScriptTestComponent e : element.getTest()) + composeTestScriptTestScriptTestComponent(null, e); + closeArray(); + }; + if (element.hasTeardown()) { + composeTestScriptTestScriptTeardownComponent("teardown", element.getTeardown()); + } + } + + protected void composeTestScriptTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptOriginComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptOriginComponentInner(TestScript.TestScriptOriginComponent element) throws IOException { + composeBackbone(element); + if (element.hasIndexElement()) { + composeIntegerCore("index", element.getIndexElement(), false); + composeIntegerExtras("index", element.getIndexElement(), false); + } + if (element.hasProfile()) { + composeCoding("profile", element.getProfile()); + } + } + + protected void composeTestScriptTestScriptDestinationComponent(String name, TestScript.TestScriptDestinationComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptDestinationComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptDestinationComponentInner(TestScript.TestScriptDestinationComponent element) throws IOException { + composeBackbone(element); + if (element.hasIndexElement()) { + composeIntegerCore("index", element.getIndexElement(), false); + composeIntegerExtras("index", element.getIndexElement(), false); + } + if (element.hasProfile()) { + composeCoding("profile", element.getProfile()); + } + } + + protected void composeTestScriptTestScriptMetadataComponent(String name, TestScript.TestScriptMetadataComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptMetadataComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptMetadataComponentInner(TestScript.TestScriptMetadataComponent element) throws IOException { + composeBackbone(element); + if (element.hasLink()) { + openArray("link"); + for (TestScript.TestScriptMetadataLinkComponent e : element.getLink()) + composeTestScriptTestScriptMetadataLinkComponent(null, e); + closeArray(); + }; + if (element.hasCapability()) { + openArray("capability"); + for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability()) + composeTestScriptTestScriptMetadataCapabilityComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptTestScriptMetadataLinkComponent(String name, TestScript.TestScriptMetadataLinkComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptMetadataLinkComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptMetadataLinkComponentInner(TestScript.TestScriptMetadataLinkComponent element) throws IOException { + composeBackbone(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + } + + protected void composeTestScriptTestScriptMetadataCapabilityComponent(String name, TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptMetadataCapabilityComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptMetadataCapabilityComponentInner(TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { + composeBackbone(element); + if (element.hasRequiredElement()) { + composeBooleanCore("required", element.getRequiredElement(), false); + composeBooleanExtras("required", element.getRequiredElement(), false); + } + if (element.hasValidatedElement()) { + composeBooleanCore("validated", element.getValidatedElement(), false); + composeBooleanExtras("validated", element.getValidatedElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasOrigin()) { + openArray("origin"); + for (IntegerType e : element.getOrigin()) + composeIntegerCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getOrigin())) { + openArray("_origin"); + for (IntegerType e : element.getOrigin()) + composeIntegerExtras(null, e, true); + closeArray(); + } + }; + if (element.hasDestinationElement()) { + composeIntegerCore("destination", element.getDestinationElement(), false); + composeIntegerExtras("destination", element.getDestinationElement(), false); + } + if (element.hasLink()) { + openArray("link"); + for (UriType e : element.getLink()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getLink())) { + openArray("_link"); + for (UriType e : element.getLink()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + if (element.hasCapabilities()) { + composeReference("capabilities", element.getCapabilities()); + } + } + + protected void composeTestScriptTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptFixtureComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptFixtureComponentInner(TestScript.TestScriptFixtureComponent element) throws IOException { + composeBackbone(element); + if (element.hasAutocreateElement()) { + composeBooleanCore("autocreate", element.getAutocreateElement(), false); + composeBooleanExtras("autocreate", element.getAutocreateElement(), false); + } + if (element.hasAutodeleteElement()) { + composeBooleanCore("autodelete", element.getAutodeleteElement(), false); + composeBooleanExtras("autodelete", element.getAutodeleteElement(), false); + } + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + } + + protected void composeTestScriptTestScriptVariableComponent(String name, TestScript.TestScriptVariableComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptVariableComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptVariableComponentInner(TestScript.TestScriptVariableComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDefaultValueElement()) { + composeStringCore("defaultValue", element.getDefaultValueElement(), false); + composeStringExtras("defaultValue", element.getDefaultValueElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + if (element.hasHeaderFieldElement()) { + composeStringCore("headerField", element.getHeaderFieldElement(), false); + composeStringExtras("headerField", element.getHeaderFieldElement(), false); + } + if (element.hasHintElement()) { + composeStringCore("hint", element.getHintElement(), false); + composeStringExtras("hint", element.getHintElement(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasSourceIdElement()) { + composeIdCore("sourceId", element.getSourceIdElement(), false); + composeIdExtras("sourceId", element.getSourceIdElement(), false); + } + } + + protected void composeTestScriptTestScriptRuleComponent(String name, TestScript.TestScriptRuleComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptRuleComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptRuleComponentInner(TestScript.TestScriptRuleComponent element) throws IOException { + composeBackbone(element); + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + if (element.hasParam()) { + openArray("param"); + for (TestScript.RuleParamComponent e : element.getParam()) + composeTestScriptRuleParamComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptRuleParamComponent(String name, TestScript.RuleParamComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptRuleParamComponentInner(element); + close(); + } + } + + protected void composeTestScriptRuleParamComponentInner(TestScript.RuleParamComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeTestScriptTestScriptRulesetComponent(String name, TestScript.TestScriptRulesetComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptRulesetComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptRulesetComponentInner(TestScript.TestScriptRulesetComponent element) throws IOException { + composeBackbone(element); + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + if (element.hasRule()) { + openArray("rule"); + for (TestScript.RulesetRuleComponent e : element.getRule()) + composeTestScriptRulesetRuleComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptRulesetRuleComponent(String name, TestScript.RulesetRuleComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptRulesetRuleComponentInner(element); + close(); + } + } + + protected void composeTestScriptRulesetRuleComponentInner(TestScript.RulesetRuleComponent element) throws IOException { + composeBackbone(element); + if (element.hasRuleIdElement()) { + composeIdCore("ruleId", element.getRuleIdElement(), false); + composeIdExtras("ruleId", element.getRuleIdElement(), false); + } + if (element.hasParam()) { + openArray("param"); + for (TestScript.RulesetRuleParamComponent e : element.getParam()) + composeTestScriptRulesetRuleParamComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptRulesetRuleParamComponent(String name, TestScript.RulesetRuleParamComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptRulesetRuleParamComponentInner(element); + close(); + } + } + + protected void composeTestScriptRulesetRuleParamComponentInner(TestScript.RulesetRuleParamComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeTestScriptTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptSetupComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptSetupComponentInner(TestScript.TestScriptSetupComponent element) throws IOException { + composeBackbone(element); + if (element.hasAction()) { + openArray("action"); + for (TestScript.SetupActionComponent e : element.getAction()) + composeTestScriptSetupActionComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptSetupActionComponent(String name, TestScript.SetupActionComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptSetupActionComponentInner(element); + close(); + } + } + + protected void composeTestScriptSetupActionComponentInner(TestScript.SetupActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOperation()) { + composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestScriptSetupActionOperationComponent(String name, TestScript.SetupActionOperationComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptSetupActionOperationComponentInner(element); + close(); + } + } + + protected void composeTestScriptSetupActionOperationComponentInner(TestScript.SetupActionOperationComponent element) throws IOException { + composeBackbone(element); + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasResourceElement()) { + composeCodeCore("resource", element.getResourceElement(), false); + composeCodeExtras("resource", element.getResourceElement(), false); + } + if (element.hasLabelElement()) { + composeStringCore("label", element.getLabelElement(), false); + composeStringExtras("label", element.getLabelElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasAcceptElement()) { + composeEnumerationCore("accept", element.getAcceptElement(), new TestScript.ContentTypeEnumFactory(), false); + composeEnumerationExtras("accept", element.getAcceptElement(), new TestScript.ContentTypeEnumFactory(), false); + } + if (element.hasContentTypeElement()) { + composeEnumerationCore("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); + composeEnumerationExtras("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); + } + if (element.hasDestinationElement()) { + composeIntegerCore("destination", element.getDestinationElement(), false); + composeIntegerExtras("destination", element.getDestinationElement(), false); + } + if (element.hasEncodeRequestUrlElement()) { + composeBooleanCore("encodeRequestUrl", element.getEncodeRequestUrlElement(), false); + composeBooleanExtras("encodeRequestUrl", element.getEncodeRequestUrlElement(), false); + } + if (element.hasOriginElement()) { + composeIntegerCore("origin", element.getOriginElement(), false); + composeIntegerExtras("origin", element.getOriginElement(), false); + } + if (element.hasParamsElement()) { + composeStringCore("params", element.getParamsElement(), false); + composeStringExtras("params", element.getParamsElement(), false); + } + if (element.hasRequestHeader()) { + openArray("requestHeader"); + for (TestScript.SetupActionOperationRequestHeaderComponent e : element.getRequestHeader()) + composeTestScriptSetupActionOperationRequestHeaderComponent(null, e); + closeArray(); + }; + if (element.hasRequestIdElement()) { + composeIdCore("requestId", element.getRequestIdElement(), false); + composeIdExtras("requestId", element.getRequestIdElement(), false); + } + if (element.hasResponseIdElement()) { + composeIdCore("responseId", element.getResponseIdElement(), false); + composeIdExtras("responseId", element.getResponseIdElement(), false); + } + if (element.hasSourceIdElement()) { + composeIdCore("sourceId", element.getSourceIdElement(), false); + composeIdExtras("sourceId", element.getSourceIdElement(), false); + } + if (element.hasTargetIdElement()) { + composeIdCore("targetId", element.getTargetIdElement(), false); + composeIdExtras("targetId", element.getTargetIdElement(), false); + } + if (element.hasUrlElement()) { + composeStringCore("url", element.getUrlElement(), false); + composeStringExtras("url", element.getUrlElement(), false); + } + } + + protected void composeTestScriptSetupActionOperationRequestHeaderComponent(String name, TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptSetupActionOperationRequestHeaderComponentInner(element); + close(); + } + } + + protected void composeTestScriptSetupActionOperationRequestHeaderComponentInner(TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { + composeBackbone(element); + if (element.hasFieldElement()) { + composeStringCore("field", element.getFieldElement(), false); + composeStringExtras("field", element.getFieldElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeTestScriptSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptSetupActionAssertComponentInner(element); + close(); + } + } + + protected void composeTestScriptSetupActionAssertComponentInner(TestScript.SetupActionAssertComponent element) throws IOException { + composeBackbone(element); + if (element.hasLabelElement()) { + composeStringCore("label", element.getLabelElement(), false); + composeStringExtras("label", element.getLabelElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasDirectionElement()) { + composeEnumerationCore("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory(), false); + composeEnumerationExtras("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory(), false); + } + if (element.hasCompareToSourceIdElement()) { + composeStringCore("compareToSourceId", element.getCompareToSourceIdElement(), false); + composeStringExtras("compareToSourceId", element.getCompareToSourceIdElement(), false); + } + if (element.hasCompareToSourceExpressionElement()) { + composeStringCore("compareToSourceExpression", element.getCompareToSourceExpressionElement(), false); + composeStringExtras("compareToSourceExpression", element.getCompareToSourceExpressionElement(), false); + } + if (element.hasCompareToSourcePathElement()) { + composeStringCore("compareToSourcePath", element.getCompareToSourcePathElement(), false); + composeStringExtras("compareToSourcePath", element.getCompareToSourcePathElement(), false); + } + if (element.hasContentTypeElement()) { + composeEnumerationCore("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); + composeEnumerationExtras("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory(), false); + } + if (element.hasExpressionElement()) { + composeStringCore("expression", element.getExpressionElement(), false); + composeStringExtras("expression", element.getExpressionElement(), false); + } + if (element.hasHeaderFieldElement()) { + composeStringCore("headerField", element.getHeaderFieldElement(), false); + composeStringExtras("headerField", element.getHeaderFieldElement(), false); + } + if (element.hasMinimumIdElement()) { + composeStringCore("minimumId", element.getMinimumIdElement(), false); + composeStringExtras("minimumId", element.getMinimumIdElement(), false); + } + if (element.hasNavigationLinksElement()) { + composeBooleanCore("navigationLinks", element.getNavigationLinksElement(), false); + composeBooleanExtras("navigationLinks", element.getNavigationLinksElement(), false); + } + if (element.hasOperatorElement()) { + composeEnumerationCore("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory(), false); + composeEnumerationExtras("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory(), false); + } + if (element.hasPathElement()) { + composeStringCore("path", element.getPathElement(), false); + composeStringExtras("path", element.getPathElement(), false); + } + if (element.hasRequestMethodElement()) { + composeEnumerationCore("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false); + composeEnumerationExtras("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory(), false); + } + if (element.hasRequestURLElement()) { + composeStringCore("requestURL", element.getRequestURLElement(), false); + composeStringExtras("requestURL", element.getRequestURLElement(), false); + } + if (element.hasResourceElement()) { + composeCodeCore("resource", element.getResourceElement(), false); + composeCodeExtras("resource", element.getResourceElement(), false); + } + if (element.hasResponseElement()) { + composeEnumerationCore("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory(), false); + composeEnumerationExtras("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory(), false); + } + if (element.hasResponseCodeElement()) { + composeStringCore("responseCode", element.getResponseCodeElement(), false); + composeStringExtras("responseCode", element.getResponseCodeElement(), false); + } + if (element.hasRule()) { + composeTestScriptActionAssertRuleComponent("rule", element.getRule()); + } + if (element.hasRuleset()) { + composeTestScriptActionAssertRulesetComponent("ruleset", element.getRuleset()); + } + if (element.hasSourceIdElement()) { + composeIdCore("sourceId", element.getSourceIdElement(), false); + composeIdExtras("sourceId", element.getSourceIdElement(), false); + } + if (element.hasValidateProfileIdElement()) { + composeIdCore("validateProfileId", element.getValidateProfileIdElement(), false); + composeIdExtras("validateProfileId", element.getValidateProfileIdElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + if (element.hasWarningOnlyElement()) { + composeBooleanCore("warningOnly", element.getWarningOnlyElement(), false); + composeBooleanExtras("warningOnly", element.getWarningOnlyElement(), false); + } + } + + protected void composeTestScriptActionAssertRuleComponent(String name, TestScript.ActionAssertRuleComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptActionAssertRuleComponentInner(element); + close(); + } + } + + protected void composeTestScriptActionAssertRuleComponentInner(TestScript.ActionAssertRuleComponent element) throws IOException { + composeBackbone(element); + if (element.hasRuleIdElement()) { + composeIdCore("ruleId", element.getRuleIdElement(), false); + composeIdExtras("ruleId", element.getRuleIdElement(), false); + } + if (element.hasParam()) { + openArray("param"); + for (TestScript.ActionAssertRuleParamComponent e : element.getParam()) + composeTestScriptActionAssertRuleParamComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptActionAssertRuleParamComponent(String name, TestScript.ActionAssertRuleParamComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptActionAssertRuleParamComponentInner(element); + close(); + } + } + + protected void composeTestScriptActionAssertRuleParamComponentInner(TestScript.ActionAssertRuleParamComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeTestScriptActionAssertRulesetComponent(String name, TestScript.ActionAssertRulesetComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptActionAssertRulesetComponentInner(element); + close(); + } + } + + protected void composeTestScriptActionAssertRulesetComponentInner(TestScript.ActionAssertRulesetComponent element) throws IOException { + composeBackbone(element); + if (element.hasRulesetIdElement()) { + composeIdCore("rulesetId", element.getRulesetIdElement(), false); + composeIdExtras("rulesetId", element.getRulesetIdElement(), false); + } + if (element.hasRule()) { + openArray("rule"); + for (TestScript.ActionAssertRulesetRuleComponent e : element.getRule()) + composeTestScriptActionAssertRulesetRuleComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptActionAssertRulesetRuleComponent(String name, TestScript.ActionAssertRulesetRuleComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptActionAssertRulesetRuleComponentInner(element); + close(); + } + } + + protected void composeTestScriptActionAssertRulesetRuleComponentInner(TestScript.ActionAssertRulesetRuleComponent element) throws IOException { + composeBackbone(element); + if (element.hasRuleIdElement()) { + composeIdCore("ruleId", element.getRuleIdElement(), false); + composeIdExtras("ruleId", element.getRuleIdElement(), false); + } + if (element.hasParam()) { + openArray("param"); + for (TestScript.ActionAssertRulesetRuleParamComponent e : element.getParam()) + composeTestScriptActionAssertRulesetRuleParamComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptActionAssertRulesetRuleParamComponent(String name, TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptActionAssertRulesetRuleParamComponentInner(element); + close(); + } + } + + protected void composeTestScriptActionAssertRulesetRuleParamComponentInner(TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeTestScriptTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptTestComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptTestComponentInner(TestScript.TestScriptTestComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasDescriptionElement()) { + composeStringCore("description", element.getDescriptionElement(), false); + composeStringExtras("description", element.getDescriptionElement(), false); + } + if (element.hasAction()) { + openArray("action"); + for (TestScript.TestActionComponent e : element.getAction()) + composeTestScriptTestActionComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptTestActionComponent(String name, TestScript.TestActionComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestActionComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestActionComponentInner(TestScript.TestActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOperation()) { + composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestScriptTestScriptTeardownComponent(String name, TestScript.TestScriptTeardownComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTestScriptTeardownComponentInner(element); + close(); + } + } + + protected void composeTestScriptTestScriptTeardownComponentInner(TestScript.TestScriptTeardownComponent element) throws IOException { + composeBackbone(element); + if (element.hasAction()) { + openArray("action"); + for (TestScript.TeardownActionComponent e : element.getAction()) + composeTestScriptTeardownActionComponent(null, e); + closeArray(); + }; + } + + protected void composeTestScriptTeardownActionComponent(String name, TestScript.TeardownActionComponent element) throws IOException { + if (element != null) { + open(name); + composeTestScriptTeardownActionComponentInner(element); + close(); + } + } + + protected void composeTestScriptTeardownActionComponentInner(TestScript.TeardownActionComponent element) throws IOException { + composeBackbone(element); + if (element.hasOperation()) { + composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); + } + } + + protected void composeValueSet(String name, ValueSet element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeValueSetInner(element); + } + } + + protected void composeValueSetInner(ValueSet element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUriCore("url", element.getUrlElement(), false); + composeUriExtras("url", element.getUrlElement(), false); + } + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasTitleElement()) { + composeStringCore("title", element.getTitleElement(), false); + composeStringExtras("title", element.getTitleElement(), false); + } + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory(), false); + } + if (element.hasExperimentalElement()) { + composeBooleanCore("experimental", element.getExperimentalElement(), false); + composeBooleanExtras("experimental", element.getExperimentalElement(), false); + } + if (element.hasDateElement()) { + composeDateTimeCore("date", element.getDateElement(), false); + composeDateTimeExtras("date", element.getDateElement(), false); + } + if (element.hasPublisherElement()) { + composeStringCore("publisher", element.getPublisherElement(), false); + composeStringExtras("publisher", element.getPublisherElement(), false); + } + if (element.hasContact()) { + openArray("contact"); + for (ContactDetail e : element.getContact()) + composeContactDetail(null, e); + closeArray(); + }; + if (element.hasDescriptionElement()) { + composeMarkdownCore("description", element.getDescriptionElement(), false); + composeMarkdownExtras("description", element.getDescriptionElement(), false); + } + if (element.hasUseContext()) { + openArray("useContext"); + for (UsageContext e : element.getUseContext()) + composeUsageContext(null, e); + closeArray(); + }; + if (element.hasJurisdiction()) { + openArray("jurisdiction"); + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept(null, e); + closeArray(); + }; + if (element.hasImmutableElement()) { + composeBooleanCore("immutable", element.getImmutableElement(), false); + composeBooleanExtras("immutable", element.getImmutableElement(), false); + } + if (element.hasPurposeElement()) { + composeMarkdownCore("purpose", element.getPurposeElement(), false); + composeMarkdownExtras("purpose", element.getPurposeElement(), false); + } + if (element.hasCopyrightElement()) { + composeMarkdownCore("copyright", element.getCopyrightElement(), false); + composeMarkdownExtras("copyright", element.getCopyrightElement(), false); + } + if (element.hasExtensibleElement()) { + composeBooleanCore("extensible", element.getExtensibleElement(), false); + composeBooleanExtras("extensible", element.getExtensibleElement(), false); + } + if (element.hasCompose()) { + composeValueSetValueSetComposeComponent("compose", element.getCompose()); + } + if (element.hasExpansion()) { + composeValueSetValueSetExpansionComponent("expansion", element.getExpansion()); + } + } + + protected void composeValueSetValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetValueSetComposeComponentInner(element); + close(); + } + } + + protected void composeValueSetValueSetComposeComponentInner(ValueSet.ValueSetComposeComponent element) throws IOException { + composeBackbone(element); + if (element.hasLockedDateElement()) { + composeDateCore("lockedDate", element.getLockedDateElement(), false); + composeDateExtras("lockedDate", element.getLockedDateElement(), false); + } + if (element.hasInactiveElement()) { + composeBooleanCore("inactive", element.getInactiveElement(), false); + composeBooleanExtras("inactive", element.getInactiveElement(), false); + } + if (element.hasInclude()) { + openArray("include"); + for (ValueSet.ConceptSetComponent e : element.getInclude()) + composeValueSetConceptSetComponent(null, e); + closeArray(); + }; + if (element.hasExclude()) { + openArray("exclude"); + for (ValueSet.ConceptSetComponent e : element.getExclude()) + composeValueSetConceptSetComponent(null, e); + closeArray(); + }; + } + + protected void composeValueSetConceptSetComponent(String name, ValueSet.ConceptSetComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetConceptSetComponentInner(element); + close(); + } + } + + protected void composeValueSetConceptSetComponentInner(ValueSet.ConceptSetComponent element) throws IOException { + composeBackbone(element); + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasConcept()) { + openArray("concept"); + for (ValueSet.ConceptReferenceComponent e : element.getConcept()) + composeValueSetConceptReferenceComponent(null, e); + closeArray(); + }; + if (element.hasFilter()) { + openArray("filter"); + for (ValueSet.ConceptSetFilterComponent e : element.getFilter()) + composeValueSetConceptSetFilterComponent(null, e); + closeArray(); + }; + if (element.hasValueSet()) { + openArray("valueSet"); + for (UriType e : element.getValueSet()) + composeUriCore(null, e, true); + closeArray(); + if (anyHasExtras(element.getValueSet())) { + openArray("_valueSet"); + for (UriType e : element.getValueSet()) + composeUriExtras(null, e, true); + closeArray(); + } + }; + } + + protected void composeValueSetConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetConceptReferenceComponentInner(element); + close(); + } + } + + protected void composeValueSetConceptReferenceComponentInner(ValueSet.ConceptReferenceComponent element) throws IOException { + composeBackbone(element); + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasDesignation()) { + openArray("designation"); + for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) + composeValueSetConceptReferenceDesignationComponent(null, e); + closeArray(); + }; + } + + protected void composeValueSetConceptReferenceDesignationComponent(String name, ValueSet.ConceptReferenceDesignationComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetConceptReferenceDesignationComponentInner(element); + close(); + } + } + + protected void composeValueSetConceptReferenceDesignationComponentInner(ValueSet.ConceptReferenceDesignationComponent element) throws IOException { + composeBackbone(element); + if (element.hasLanguageElement()) { + composeCodeCore("language", element.getLanguageElement(), false); + composeCodeExtras("language", element.getLanguageElement(), false); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + if (element.hasValueElement()) { + composeStringCore("value", element.getValueElement(), false); + composeStringExtras("value", element.getValueElement(), false); + } + } + + protected void composeValueSetConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetConceptSetFilterComponentInner(element); + close(); + } + } + + protected void composeValueSetConceptSetFilterComponentInner(ValueSet.ConceptSetFilterComponent element) throws IOException { + composeBackbone(element); + if (element.hasPropertyElement()) { + composeCodeCore("property", element.getPropertyElement(), false); + composeCodeExtras("property", element.getPropertyElement(), false); + } + if (element.hasOpElement()) { + composeEnumerationCore("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory(), false); + composeEnumerationExtras("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory(), false); + } + if (element.hasValueElement()) { + composeCodeCore("value", element.getValueElement(), false); + composeCodeExtras("value", element.getValueElement(), false); + } + } + + protected void composeValueSetValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetValueSetExpansionComponentInner(element); + close(); + } + } + + protected void composeValueSetValueSetExpansionComponentInner(ValueSet.ValueSetExpansionComponent element) throws IOException { + composeBackbone(element); + if (element.hasIdentifierElement()) { + composeUriCore("identifier", element.getIdentifierElement(), false); + composeUriExtras("identifier", element.getIdentifierElement(), false); + } + if (element.hasTimestampElement()) { + composeDateTimeCore("timestamp", element.getTimestampElement(), false); + composeDateTimeExtras("timestamp", element.getTimestampElement(), false); + } + if (element.hasTotalElement()) { + composeIntegerCore("total", element.getTotalElement(), false); + composeIntegerExtras("total", element.getTotalElement(), false); + } + if (element.hasOffsetElement()) { + composeIntegerCore("offset", element.getOffsetElement(), false); + composeIntegerExtras("offset", element.getOffsetElement(), false); + } + if (element.hasParameter()) { + openArray("parameter"); + for (ValueSet.ValueSetExpansionParameterComponent e : element.getParameter()) + composeValueSetValueSetExpansionParameterComponent(null, e); + closeArray(); + }; + if (element.hasContains()) { + openArray("contains"); + for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) + composeValueSetValueSetExpansionContainsComponent(null, e); + closeArray(); + }; + } + + protected void composeValueSetValueSetExpansionParameterComponent(String name, ValueSet.ValueSetExpansionParameterComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetValueSetExpansionParameterComponentInner(element); + close(); + } + } + + protected void composeValueSetValueSetExpansionParameterComponentInner(ValueSet.ValueSetExpansionParameterComponent element) throws IOException { + composeBackbone(element); + if (element.hasNameElement()) { + composeStringCore("name", element.getNameElement(), false); + composeStringExtras("name", element.getNameElement(), false); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } + } + + protected void composeValueSetValueSetExpansionContainsComponent(String name, ValueSet.ValueSetExpansionContainsComponent element) throws IOException { + if (element != null) { + open(name); + composeValueSetValueSetExpansionContainsComponentInner(element); + close(); + } + } + + protected void composeValueSetValueSetExpansionContainsComponentInner(ValueSet.ValueSetExpansionContainsComponent element) throws IOException { + composeBackbone(element); + if (element.hasSystemElement()) { + composeUriCore("system", element.getSystemElement(), false); + composeUriExtras("system", element.getSystemElement(), false); + } + if (element.hasAbstractElement()) { + composeBooleanCore("abstract", element.getAbstractElement(), false); + composeBooleanExtras("abstract", element.getAbstractElement(), false); + } + if (element.hasInactiveElement()) { + composeBooleanCore("inactive", element.getInactiveElement(), false); + composeBooleanExtras("inactive", element.getInactiveElement(), false); + } + if (element.hasVersionElement()) { + composeStringCore("version", element.getVersionElement(), false); + composeStringExtras("version", element.getVersionElement(), false); + } + if (element.hasCodeElement()) { + composeCodeCore("code", element.getCodeElement(), false); + composeCodeExtras("code", element.getCodeElement(), false); + } + if (element.hasDisplayElement()) { + composeStringCore("display", element.getDisplayElement(), false); + composeStringExtras("display", element.getDisplayElement(), false); + } + if (element.hasDesignation()) { + openArray("designation"); + for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) + composeValueSetConceptReferenceDesignationComponent(null, e); + closeArray(); + }; + if (element.hasContains()) { + openArray("contains"); + for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) + composeValueSetValueSetExpansionContainsComponent(null, e); + closeArray(); + }; + } + + protected void composeVisionPrescription(String name, VisionPrescription element) throws IOException { + if (element != null) { + prop("resourceType", name); + composeVisionPrescriptionInner(element); + } + } + + protected void composeVisionPrescriptionInner(VisionPrescription element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + openArray("identifier"); + for (Identifier e : element.getIdentifier()) + composeIdentifier(null, e); + closeArray(); + }; + if (element.hasStatusElement()) { + composeEnumerationCore("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory(), false); + composeEnumerationExtras("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory(), false); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateWrittenElement()) { + composeDateTimeCore("dateWritten", element.getDateWrittenElement(), false); + composeDateTimeExtras("dateWritten", element.getDateWrittenElement(), false); + } + if (element.hasPrescriber()) { + composeReference("prescriber", element.getPrescriber()); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } + if (element.hasDispense()) { + openArray("dispense"); + for (VisionPrescription.VisionPrescriptionDispenseComponent e : element.getDispense()) + composeVisionPrescriptionVisionPrescriptionDispenseComponent(null, e); + closeArray(); + }; + } + + protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(String name, VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { + if (element != null) { + open(name); + composeVisionPrescriptionVisionPrescriptionDispenseComponentInner(element); + close(); + } + } + + protected void composeVisionPrescriptionVisionPrescriptionDispenseComponentInner(VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { + composeBackbone(element); + if (element.hasProduct()) { + composeCodeableConcept("product", element.getProduct()); + } + if (element.hasEyeElement()) { + composeEnumerationCore("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory(), false); + composeEnumerationExtras("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory(), false); + } + if (element.hasSphereElement()) { + composeDecimalCore("sphere", element.getSphereElement(), false); + composeDecimalExtras("sphere", element.getSphereElement(), false); + } + if (element.hasCylinderElement()) { + composeDecimalCore("cylinder", element.getCylinderElement(), false); + composeDecimalExtras("cylinder", element.getCylinderElement(), false); + } + if (element.hasAxisElement()) { + composeIntegerCore("axis", element.getAxisElement(), false); + composeIntegerExtras("axis", element.getAxisElement(), false); + } + if (element.hasPrismElement()) { + composeDecimalCore("prism", element.getPrismElement(), false); + composeDecimalExtras("prism", element.getPrismElement(), false); + } + if (element.hasBaseElement()) { + composeEnumerationCore("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory(), false); + composeEnumerationExtras("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory(), false); + } + if (element.hasAddElement()) { + composeDecimalCore("add", element.getAddElement(), false); + composeDecimalExtras("add", element.getAddElement(), false); + } + if (element.hasPowerElement()) { + composeDecimalCore("power", element.getPowerElement(), false); + composeDecimalExtras("power", element.getPowerElement(), false); + } + if (element.hasBackCurveElement()) { + composeDecimalCore("backCurve", element.getBackCurveElement(), false); + composeDecimalExtras("backCurve", element.getBackCurveElement(), false); + } + if (element.hasDiameterElement()) { + composeDecimalCore("diameter", element.getDiameterElement(), false); + composeDecimalExtras("diameter", element.getDiameterElement(), false); + } + if (element.hasDuration()) { + composeSimpleQuantity("duration", element.getDuration()); + } + if (element.hasColorElement()) { + composeStringCore("color", element.getColorElement(), false); + composeStringExtras("color", element.getColorElement(), false); + } + if (element.hasBrandElement()) { + composeStringCore("brand", element.getBrandElement(), false); + composeStringExtras("brand", element.getBrandElement(), false); + } + if (element.hasNote()) { + openArray("note"); + for (Annotation e : element.getNote()) + composeAnnotation(null, e); + closeArray(); + }; + } + + @Override + protected void composeResource(Resource resource) throws IOException { + if (resource instanceof Parameters) + composeParameters("Parameters", (Parameters)resource); + else if (resource instanceof Account) + composeAccount("Account", (Account)resource); + else if (resource instanceof ActivityDefinition) + composeActivityDefinition("ActivityDefinition", (ActivityDefinition)resource); + else if (resource instanceof AdverseEvent) + composeAdverseEvent("AdverseEvent", (AdverseEvent)resource); + else if (resource instanceof AllergyIntolerance) + composeAllergyIntolerance("AllergyIntolerance", (AllergyIntolerance)resource); + else if (resource instanceof Appointment) + composeAppointment("Appointment", (Appointment)resource); + else if (resource instanceof AppointmentResponse) + composeAppointmentResponse("AppointmentResponse", (AppointmentResponse)resource); + else if (resource instanceof AuditEvent) + composeAuditEvent("AuditEvent", (AuditEvent)resource); + else if (resource instanceof Basic) + composeBasic("Basic", (Basic)resource); + else if (resource instanceof Binary) + composeBinary("Binary", (Binary)resource); + else if (resource instanceof BodyStructure) + composeBodyStructure("BodyStructure", (BodyStructure)resource); + else if (resource instanceof Bundle) + composeBundle("Bundle", (Bundle)resource); + else if (resource instanceof CapabilityStatement) + composeCapabilityStatement("CapabilityStatement", (CapabilityStatement)resource); + else if (resource instanceof CarePlan) + composeCarePlan("CarePlan", (CarePlan)resource); + else if (resource instanceof CareTeam) + composeCareTeam("CareTeam", (CareTeam)resource); + else if (resource instanceof CatalogEntry) + composeCatalogEntry("CatalogEntry", (CatalogEntry)resource); + else if (resource instanceof ChargeItem) + composeChargeItem("ChargeItem", (ChargeItem)resource); + else if (resource instanceof Claim) + composeClaim("Claim", (Claim)resource); + else if (resource instanceof ClaimResponse) + composeClaimResponse("ClaimResponse", (ClaimResponse)resource); + else if (resource instanceof ClinicalImpression) + composeClinicalImpression("ClinicalImpression", (ClinicalImpression)resource); + else if (resource instanceof CodeSystem) + composeCodeSystem("CodeSystem", (CodeSystem)resource); + else if (resource instanceof Communication) + composeCommunication("Communication", (Communication)resource); + else if (resource instanceof CommunicationRequest) + composeCommunicationRequest("CommunicationRequest", (CommunicationRequest)resource); + else if (resource instanceof CompartmentDefinition) + composeCompartmentDefinition("CompartmentDefinition", (CompartmentDefinition)resource); + else if (resource instanceof Composition) + composeComposition("Composition", (Composition)resource); + else if (resource instanceof ConceptMap) + composeConceptMap("ConceptMap", (ConceptMap)resource); + else if (resource instanceof Condition) + composeCondition("Condition", (Condition)resource); + else if (resource instanceof Consent) + composeConsent("Consent", (Consent)resource); + else if (resource instanceof Contract) + composeContract("Contract", (Contract)resource); + else if (resource instanceof Coverage) + composeCoverage("Coverage", (Coverage)resource); + else if (resource instanceof DetectedIssue) + composeDetectedIssue("DetectedIssue", (DetectedIssue)resource); + else if (resource instanceof Device) + composeDevice("Device", (Device)resource); + else if (resource instanceof DeviceComponent) + composeDeviceComponent("DeviceComponent", (DeviceComponent)resource); + else if (resource instanceof DeviceMetric) + composeDeviceMetric("DeviceMetric", (DeviceMetric)resource); + else if (resource instanceof DeviceRequest) + composeDeviceRequest("DeviceRequest", (DeviceRequest)resource); + else if (resource instanceof DeviceUseStatement) + composeDeviceUseStatement("DeviceUseStatement", (DeviceUseStatement)resource); + else if (resource instanceof DiagnosticReport) + composeDiagnosticReport("DiagnosticReport", (DiagnosticReport)resource); + else if (resource instanceof DocumentManifest) + composeDocumentManifest("DocumentManifest", (DocumentManifest)resource); + else if (resource instanceof DocumentReference) + composeDocumentReference("DocumentReference", (DocumentReference)resource); + else if (resource instanceof EligibilityRequest) + composeEligibilityRequest("EligibilityRequest", (EligibilityRequest)resource); + else if (resource instanceof EligibilityResponse) + composeEligibilityResponse("EligibilityResponse", (EligibilityResponse)resource); + else if (resource instanceof Encounter) + composeEncounter("Encounter", (Encounter)resource); + else if (resource instanceof Endpoint) + composeEndpoint("Endpoint", (Endpoint)resource); + else if (resource instanceof EnrollmentRequest) + composeEnrollmentRequest("EnrollmentRequest", (EnrollmentRequest)resource); + else if (resource instanceof EnrollmentResponse) + composeEnrollmentResponse("EnrollmentResponse", (EnrollmentResponse)resource); + else if (resource instanceof EpisodeOfCare) + composeEpisodeOfCare("EpisodeOfCare", (EpisodeOfCare)resource); + else if (resource instanceof EventDefinition) + composeEventDefinition("EventDefinition", (EventDefinition)resource); + else if (resource instanceof ExampleScenario) + composeExampleScenario("ExampleScenario", (ExampleScenario)resource); + else if (resource instanceof ExpansionProfile) + composeExpansionProfile("ExpansionProfile", (ExpansionProfile)resource); + else if (resource instanceof ExplanationOfBenefit) + composeExplanationOfBenefit("ExplanationOfBenefit", (ExplanationOfBenefit)resource); + else if (resource instanceof FamilyMemberHistory) + composeFamilyMemberHistory("FamilyMemberHistory", (FamilyMemberHistory)resource); + else if (resource instanceof Flag) + composeFlag("Flag", (Flag)resource); + else if (resource instanceof Goal) + composeGoal("Goal", (Goal)resource); + else if (resource instanceof GraphDefinition) + composeGraphDefinition("GraphDefinition", (GraphDefinition)resource); + else if (resource instanceof Group) + composeGroup("Group", (Group)resource); + else if (resource instanceof GuidanceResponse) + composeGuidanceResponse("GuidanceResponse", (GuidanceResponse)resource); + else if (resource instanceof HealthcareService) + composeHealthcareService("HealthcareService", (HealthcareService)resource); + else if (resource instanceof ImagingManifest) + composeImagingManifest("ImagingManifest", (ImagingManifest)resource); + else if (resource instanceof ImagingStudy) + composeImagingStudy("ImagingStudy", (ImagingStudy)resource); + else if (resource instanceof Immunization) + composeImmunization("Immunization", (Immunization)resource); + else if (resource instanceof ImmunizationRecommendation) + composeImmunizationRecommendation("ImmunizationRecommendation", (ImmunizationRecommendation)resource); + else if (resource instanceof ImplementationGuide) + composeImplementationGuide("ImplementationGuide", (ImplementationGuide)resource); + else if (resource instanceof Library) + composeLibrary("Library", (Library)resource); + else if (resource instanceof Linkage) + composeLinkage("Linkage", (Linkage)resource); + else if (resource instanceof ListResource) + composeListResource("List", (ListResource)resource); + else if (resource instanceof Location) + composeLocation("Location", (Location)resource); + else if (resource instanceof Measure) + composeMeasure("Measure", (Measure)resource); + else if (resource instanceof MeasureReport) + composeMeasureReport("MeasureReport", (MeasureReport)resource); + else if (resource instanceof Media) + composeMedia("Media", (Media)resource); + else if (resource instanceof Medication) + composeMedication("Medication", (Medication)resource); + else if (resource instanceof MedicationAdministration) + composeMedicationAdministration("MedicationAdministration", (MedicationAdministration)resource); + else if (resource instanceof MedicationDispense) + composeMedicationDispense("MedicationDispense", (MedicationDispense)resource); + else if (resource instanceof MedicationRequest) + composeMedicationRequest("MedicationRequest", (MedicationRequest)resource); + else if (resource instanceof MedicationStatement) + composeMedicationStatement("MedicationStatement", (MedicationStatement)resource); + else if (resource instanceof MessageDefinition) + composeMessageDefinition("MessageDefinition", (MessageDefinition)resource); + else if (resource instanceof MessageHeader) + composeMessageHeader("MessageHeader", (MessageHeader)resource); + else if (resource instanceof NamingSystem) + composeNamingSystem("NamingSystem", (NamingSystem)resource); + else if (resource instanceof NutritionOrder) + composeNutritionOrder("NutritionOrder", (NutritionOrder)resource); + else if (resource instanceof Observation) + composeObservation("Observation", (Observation)resource); + else if (resource instanceof OperationDefinition) + composeOperationDefinition("OperationDefinition", (OperationDefinition)resource); + else if (resource instanceof OperationOutcome) + composeOperationOutcome("OperationOutcome", (OperationOutcome)resource); + else if (resource instanceof Organization) + composeOrganization("Organization", (Organization)resource); + else if (resource instanceof Patient) + composePatient("Patient", (Patient)resource); + else if (resource instanceof PaymentNotice) + composePaymentNotice("PaymentNotice", (PaymentNotice)resource); + else if (resource instanceof PaymentReconciliation) + composePaymentReconciliation("PaymentReconciliation", (PaymentReconciliation)resource); + else if (resource instanceof Person) + composePerson("Person", (Person)resource); + else if (resource instanceof PlanDefinition) + composePlanDefinition("PlanDefinition", (PlanDefinition)resource); + else if (resource instanceof Practitioner) + composePractitioner("Practitioner", (Practitioner)resource); + else if (resource instanceof PractitionerRole) + composePractitionerRole("PractitionerRole", (PractitionerRole)resource); + else if (resource instanceof Procedure) + composeProcedure("Procedure", (Procedure)resource); + else if (resource instanceof ProcedureRequest) + composeProcedureRequest("ProcedureRequest", (ProcedureRequest)resource); + else if (resource instanceof ProcessRequest) + composeProcessRequest("ProcessRequest", (ProcessRequest)resource); + else if (resource instanceof ProcessResponse) + composeProcessResponse("ProcessResponse", (ProcessResponse)resource); + else if (resource instanceof Provenance) + composeProvenance("Provenance", (Provenance)resource); + else if (resource instanceof Questionnaire) + composeQuestionnaire("Questionnaire", (Questionnaire)resource); + else if (resource instanceof QuestionnaireResponse) + composeQuestionnaireResponse("QuestionnaireResponse", (QuestionnaireResponse)resource); + else if (resource instanceof RelatedPerson) + composeRelatedPerson("RelatedPerson", (RelatedPerson)resource); + else if (resource instanceof RequestGroup) + composeRequestGroup("RequestGroup", (RequestGroup)resource); + else if (resource instanceof ResearchStudy) + composeResearchStudy("ResearchStudy", (ResearchStudy)resource); + else if (resource instanceof ResearchSubject) + composeResearchSubject("ResearchSubject", (ResearchSubject)resource); + else if (resource instanceof RiskAssessment) + composeRiskAssessment("RiskAssessment", (RiskAssessment)resource); + else if (resource instanceof Schedule) + composeSchedule("Schedule", (Schedule)resource); + else if (resource instanceof SearchParameter) + composeSearchParameter("SearchParameter", (SearchParameter)resource); + else if (resource instanceof Sequence) + composeSequence("Sequence", (Sequence)resource); + else if (resource instanceof ServiceDefinition) + composeServiceDefinition("ServiceDefinition", (ServiceDefinition)resource); + else if (resource instanceof Slot) + composeSlot("Slot", (Slot)resource); + else if (resource instanceof Specimen) + composeSpecimen("Specimen", (Specimen)resource); + else if (resource instanceof SpecimenDefinition) + composeSpecimenDefinition("SpecimenDefinition", (SpecimenDefinition)resource); + else if (resource instanceof StructureDefinition) + composeStructureDefinition("StructureDefinition", (StructureDefinition)resource); + else if (resource instanceof StructureMap) + composeStructureMap("StructureMap", (StructureMap)resource); + else if (resource instanceof Subscription) + composeSubscription("Subscription", (Subscription)resource); + else if (resource instanceof Substance) + composeSubstance("Substance", (Substance)resource); + else if (resource instanceof SupplyDelivery) + composeSupplyDelivery("SupplyDelivery", (SupplyDelivery)resource); + else if (resource instanceof SupplyRequest) + composeSupplyRequest("SupplyRequest", (SupplyRequest)resource); + else if (resource instanceof Task) + composeTask("Task", (Task)resource); + else if (resource instanceof TestReport) + composeTestReport("TestReport", (TestReport)resource); + else if (resource instanceof TestScript) + composeTestScript("TestScript", (TestScript)resource); + else if (resource instanceof ValueSet) + composeValueSet("ValueSet", (ValueSet)resource); + else if (resource instanceof VisionPrescription) + composeVisionPrescription("VisionPrescription", (VisionPrescription)resource); + else if (resource instanceof Binary) + composeBinary("Binary", (Binary)resource); + else + throw new Error("Unhandled resource type "+resource.getClass().getName()); + } + + protected void composeNamedReference(String name, Resource resource) throws IOException { + if (resource instanceof Parameters) + composeParameters(name, (Parameters)resource); + else if (resource instanceof Account) + composeAccount(name, (Account)resource); + else if (resource instanceof ActivityDefinition) + composeActivityDefinition(name, (ActivityDefinition)resource); + else if (resource instanceof AdverseEvent) + composeAdverseEvent(name, (AdverseEvent)resource); + else if (resource instanceof AllergyIntolerance) + composeAllergyIntolerance(name, (AllergyIntolerance)resource); + else if (resource instanceof Appointment) + composeAppointment(name, (Appointment)resource); + else if (resource instanceof AppointmentResponse) + composeAppointmentResponse(name, (AppointmentResponse)resource); + else if (resource instanceof AuditEvent) + composeAuditEvent(name, (AuditEvent)resource); + else if (resource instanceof Basic) + composeBasic(name, (Basic)resource); + else if (resource instanceof Binary) + composeBinary(name, (Binary)resource); + else if (resource instanceof BodyStructure) + composeBodyStructure(name, (BodyStructure)resource); + else if (resource instanceof Bundle) + composeBundle(name, (Bundle)resource); + else if (resource instanceof CapabilityStatement) + composeCapabilityStatement(name, (CapabilityStatement)resource); + else if (resource instanceof CarePlan) + composeCarePlan(name, (CarePlan)resource); + else if (resource instanceof CareTeam) + composeCareTeam(name, (CareTeam)resource); + else if (resource instanceof CatalogEntry) + composeCatalogEntry(name, (CatalogEntry)resource); + else if (resource instanceof ChargeItem) + composeChargeItem(name, (ChargeItem)resource); + else if (resource instanceof Claim) + composeClaim(name, (Claim)resource); + else if (resource instanceof ClaimResponse) + composeClaimResponse(name, (ClaimResponse)resource); + else if (resource instanceof ClinicalImpression) + composeClinicalImpression(name, (ClinicalImpression)resource); + else if (resource instanceof CodeSystem) + composeCodeSystem(name, (CodeSystem)resource); + else if (resource instanceof Communication) + composeCommunication(name, (Communication)resource); + else if (resource instanceof CommunicationRequest) + composeCommunicationRequest(name, (CommunicationRequest)resource); + else if (resource instanceof CompartmentDefinition) + composeCompartmentDefinition(name, (CompartmentDefinition)resource); + else if (resource instanceof Composition) + composeComposition(name, (Composition)resource); + else if (resource instanceof ConceptMap) + composeConceptMap(name, (ConceptMap)resource); + else if (resource instanceof Condition) + composeCondition(name, (Condition)resource); + else if (resource instanceof Consent) + composeConsent(name, (Consent)resource); + else if (resource instanceof Contract) + composeContract(name, (Contract)resource); + else if (resource instanceof Coverage) + composeCoverage(name, (Coverage)resource); + else if (resource instanceof DetectedIssue) + composeDetectedIssue(name, (DetectedIssue)resource); + else if (resource instanceof Device) + composeDevice(name, (Device)resource); + else if (resource instanceof DeviceComponent) + composeDeviceComponent(name, (DeviceComponent)resource); + else if (resource instanceof DeviceMetric) + composeDeviceMetric(name, (DeviceMetric)resource); + else if (resource instanceof DeviceRequest) + composeDeviceRequest(name, (DeviceRequest)resource); + else if (resource instanceof DeviceUseStatement) + composeDeviceUseStatement(name, (DeviceUseStatement)resource); + else if (resource instanceof DiagnosticReport) + composeDiagnosticReport(name, (DiagnosticReport)resource); + else if (resource instanceof DocumentManifest) + composeDocumentManifest(name, (DocumentManifest)resource); + else if (resource instanceof DocumentReference) + composeDocumentReference(name, (DocumentReference)resource); + else if (resource instanceof EligibilityRequest) + composeEligibilityRequest(name, (EligibilityRequest)resource); + else if (resource instanceof EligibilityResponse) + composeEligibilityResponse(name, (EligibilityResponse)resource); + else if (resource instanceof Encounter) + composeEncounter(name, (Encounter)resource); + else if (resource instanceof Endpoint) + composeEndpoint(name, (Endpoint)resource); + else if (resource instanceof EnrollmentRequest) + composeEnrollmentRequest(name, (EnrollmentRequest)resource); + else if (resource instanceof EnrollmentResponse) + composeEnrollmentResponse(name, (EnrollmentResponse)resource); + else if (resource instanceof EpisodeOfCare) + composeEpisodeOfCare(name, (EpisodeOfCare)resource); + else if (resource instanceof EventDefinition) + composeEventDefinition(name, (EventDefinition)resource); + else if (resource instanceof ExampleScenario) + composeExampleScenario(name, (ExampleScenario)resource); + else if (resource instanceof ExpansionProfile) + composeExpansionProfile(name, (ExpansionProfile)resource); + else if (resource instanceof ExplanationOfBenefit) + composeExplanationOfBenefit(name, (ExplanationOfBenefit)resource); + else if (resource instanceof FamilyMemberHistory) + composeFamilyMemberHistory(name, (FamilyMemberHistory)resource); + else if (resource instanceof Flag) + composeFlag(name, (Flag)resource); + else if (resource instanceof Goal) + composeGoal(name, (Goal)resource); + else if (resource instanceof GraphDefinition) + composeGraphDefinition(name, (GraphDefinition)resource); + else if (resource instanceof Group) + composeGroup(name, (Group)resource); + else if (resource instanceof GuidanceResponse) + composeGuidanceResponse(name, (GuidanceResponse)resource); + else if (resource instanceof HealthcareService) + composeHealthcareService(name, (HealthcareService)resource); + else if (resource instanceof ImagingManifest) + composeImagingManifest(name, (ImagingManifest)resource); + else if (resource instanceof ImagingStudy) + composeImagingStudy(name, (ImagingStudy)resource); + else if (resource instanceof Immunization) + composeImmunization(name, (Immunization)resource); + else if (resource instanceof ImmunizationRecommendation) + composeImmunizationRecommendation(name, (ImmunizationRecommendation)resource); + else if (resource instanceof ImplementationGuide) + composeImplementationGuide(name, (ImplementationGuide)resource); + else if (resource instanceof Library) + composeLibrary(name, (Library)resource); + else if (resource instanceof Linkage) + composeLinkage(name, (Linkage)resource); + else if (resource instanceof ListResource) + composeListResource(name, (ListResource)resource); + else if (resource instanceof Location) + composeLocation(name, (Location)resource); + else if (resource instanceof Measure) + composeMeasure(name, (Measure)resource); + else if (resource instanceof MeasureReport) + composeMeasureReport(name, (MeasureReport)resource); + else if (resource instanceof Media) + composeMedia(name, (Media)resource); + else if (resource instanceof Medication) + composeMedication(name, (Medication)resource); + else if (resource instanceof MedicationAdministration) + composeMedicationAdministration(name, (MedicationAdministration)resource); + else if (resource instanceof MedicationDispense) + composeMedicationDispense(name, (MedicationDispense)resource); + else if (resource instanceof MedicationRequest) + composeMedicationRequest(name, (MedicationRequest)resource); + else if (resource instanceof MedicationStatement) + composeMedicationStatement(name, (MedicationStatement)resource); + else if (resource instanceof MessageDefinition) + composeMessageDefinition(name, (MessageDefinition)resource); + else if (resource instanceof MessageHeader) + composeMessageHeader(name, (MessageHeader)resource); + else if (resource instanceof NamingSystem) + composeNamingSystem(name, (NamingSystem)resource); + else if (resource instanceof NutritionOrder) + composeNutritionOrder(name, (NutritionOrder)resource); + else if (resource instanceof Observation) + composeObservation(name, (Observation)resource); + else if (resource instanceof OperationDefinition) + composeOperationDefinition(name, (OperationDefinition)resource); + else if (resource instanceof OperationOutcome) + composeOperationOutcome(name, (OperationOutcome)resource); + else if (resource instanceof Organization) + composeOrganization(name, (Organization)resource); + else if (resource instanceof Patient) + composePatient(name, (Patient)resource); + else if (resource instanceof PaymentNotice) + composePaymentNotice(name, (PaymentNotice)resource); + else if (resource instanceof PaymentReconciliation) + composePaymentReconciliation(name, (PaymentReconciliation)resource); + else if (resource instanceof Person) + composePerson(name, (Person)resource); + else if (resource instanceof PlanDefinition) + composePlanDefinition(name, (PlanDefinition)resource); + else if (resource instanceof Practitioner) + composePractitioner(name, (Practitioner)resource); + else if (resource instanceof PractitionerRole) + composePractitionerRole(name, (PractitionerRole)resource); + else if (resource instanceof Procedure) + composeProcedure(name, (Procedure)resource); + else if (resource instanceof ProcedureRequest) + composeProcedureRequest(name, (ProcedureRequest)resource); + else if (resource instanceof ProcessRequest) + composeProcessRequest(name, (ProcessRequest)resource); + else if (resource instanceof ProcessResponse) + composeProcessResponse(name, (ProcessResponse)resource); + else if (resource instanceof Provenance) + composeProvenance(name, (Provenance)resource); + else if (resource instanceof Questionnaire) + composeQuestionnaire(name, (Questionnaire)resource); + else if (resource instanceof QuestionnaireResponse) + composeQuestionnaireResponse(name, (QuestionnaireResponse)resource); + else if (resource instanceof RelatedPerson) + composeRelatedPerson(name, (RelatedPerson)resource); + else if (resource instanceof RequestGroup) + composeRequestGroup(name, (RequestGroup)resource); + else if (resource instanceof ResearchStudy) + composeResearchStudy(name, (ResearchStudy)resource); + else if (resource instanceof ResearchSubject) + composeResearchSubject(name, (ResearchSubject)resource); + else if (resource instanceof RiskAssessment) + composeRiskAssessment(name, (RiskAssessment)resource); + else if (resource instanceof Schedule) + composeSchedule(name, (Schedule)resource); + else if (resource instanceof SearchParameter) + composeSearchParameter(name, (SearchParameter)resource); + else if (resource instanceof Sequence) + composeSequence(name, (Sequence)resource); + else if (resource instanceof ServiceDefinition) + composeServiceDefinition(name, (ServiceDefinition)resource); + else if (resource instanceof Slot) + composeSlot(name, (Slot)resource); + else if (resource instanceof Specimen) + composeSpecimen(name, (Specimen)resource); + else if (resource instanceof SpecimenDefinition) + composeSpecimenDefinition(name, (SpecimenDefinition)resource); + else if (resource instanceof StructureDefinition) + composeStructureDefinition(name, (StructureDefinition)resource); + else if (resource instanceof StructureMap) + composeStructureMap(name, (StructureMap)resource); + else if (resource instanceof Subscription) + composeSubscription(name, (Subscription)resource); + else if (resource instanceof Substance) + composeSubstance(name, (Substance)resource); + else if (resource instanceof SupplyDelivery) + composeSupplyDelivery(name, (SupplyDelivery)resource); + else if (resource instanceof SupplyRequest) + composeSupplyRequest(name, (SupplyRequest)resource); + else if (resource instanceof Task) + composeTask(name, (Task)resource); + else if (resource instanceof TestReport) + composeTestReport(name, (TestReport)resource); + else if (resource instanceof TestScript) + composeTestScript(name, (TestScript)resource); + else if (resource instanceof ValueSet) + composeValueSet(name, (ValueSet)resource); + else if (resource instanceof VisionPrescription) + composeVisionPrescription(name, (VisionPrescription)resource); + else if (resource instanceof Binary) + composeBinary(name, (Binary)resource); + else + throw new Error("Unhandled resource type "+resource.getClass().getName()); + } + + protected void composeType(String prefix, Type type) throws IOException { + if (type == null) + ; + else if (type instanceof SimpleQuantity) + composeSimpleQuantity(prefix+"SimpleQuantity", (SimpleQuantity) type); + else if (type instanceof Extension) + composeExtension(prefix+"Extension", (Extension) type); + else if (type instanceof Narrative) + composeNarrative(prefix+"Narrative", (Narrative) type); + else if (type instanceof Duration) + composeDuration(prefix+"Duration", (Duration) type); + else if (type instanceof Count) + composeCount(prefix+"Count", (Count) type); + else if (type instanceof Money) + composeMoney(prefix+"Money", (Money) type); + else if (type instanceof Distance) + composeDistance(prefix+"Distance", (Distance) type); + else if (type instanceof Age) + composeAge(prefix+"Age", (Age) type); + else if (type instanceof Reference) + composeReference(prefix+"Reference", (Reference) type); + else if (type instanceof Quantity) + composeQuantity(prefix+"Quantity", (Quantity) type); + else if (type instanceof Period) + composePeriod(prefix+"Period", (Period) type); + else if (type instanceof Attachment) + composeAttachment(prefix+"Attachment", (Attachment) type); + else if (type instanceof Range) + composeRange(prefix+"Range", (Range) type); + else if (type instanceof Annotation) + composeAnnotation(prefix+"Annotation", (Annotation) type); + else if (type instanceof Identifier) + composeIdentifier(prefix+"Identifier", (Identifier) type); + else if (type instanceof Coding) + composeCoding(prefix+"Coding", (Coding) type); + else if (type instanceof Signature) + composeSignature(prefix+"Signature", (Signature) type); + else if (type instanceof SampledData) + composeSampledData(prefix+"SampledData", (SampledData) type); + else if (type instanceof Ratio) + composeRatio(prefix+"Ratio", (Ratio) type); + else if (type instanceof CodeableConcept) + composeCodeableConcept(prefix+"CodeableConcept", (CodeableConcept) type); + else if (type instanceof Meta) + composeMeta(prefix+"Meta", (Meta) type); + else if (type instanceof Address) + composeAddress(prefix+"Address", (Address) type); + else if (type instanceof TriggerDefinition) + composeTriggerDefinition(prefix+"TriggerDefinition", (TriggerDefinition) type); + else if (type instanceof Contributor) + composeContributor(prefix+"Contributor", (Contributor) type); + else if (type instanceof DataRequirement) + composeDataRequirement(prefix+"DataRequirement", (DataRequirement) type); + else if (type instanceof Dosage) + composeDosage(prefix+"Dosage", (Dosage) type); + else if (type instanceof RelatedArtifact) + composeRelatedArtifact(prefix+"RelatedArtifact", (RelatedArtifact) type); + else if (type instanceof ContactDetail) + composeContactDetail(prefix+"ContactDetail", (ContactDetail) type); + else if (type instanceof HumanName) + composeHumanName(prefix+"HumanName", (HumanName) type); + else if (type instanceof ContactPoint) + composeContactPoint(prefix+"ContactPoint", (ContactPoint) type); + else if (type instanceof UsageContext) + composeUsageContext(prefix+"UsageContext", (UsageContext) type); + else if (type instanceof Timing) + composeTiming(prefix+"Timing", (Timing) type); + else if (type instanceof ElementDefinition) + composeElementDefinition(prefix+"ElementDefinition", (ElementDefinition) type); + else if (type instanceof ParameterDefinition) + composeParameterDefinition(prefix+"ParameterDefinition", (ParameterDefinition) type); + else if (type instanceof CodeType) { + composeCodeCore(prefix+"Code", (CodeType) type, false); + composeCodeExtras(prefix+"Code", (CodeType) type, false); + } + else if (type instanceof OidType) { + composeOidCore(prefix+"Oid", (OidType) type, false); + composeOidExtras(prefix+"Oid", (OidType) type, false); + } + else if (type instanceof UuidType) { + composeUuidCore(prefix+"Uuid", (UuidType) type, false); + composeUuidExtras(prefix+"Uuid", (UuidType) type, false); + } + else if (type instanceof UnsignedIntType) { + composeUnsignedIntCore(prefix+"UnsignedInt", (UnsignedIntType) type, false); + composeUnsignedIntExtras(prefix+"UnsignedInt", (UnsignedIntType) type, false); + } + else if (type instanceof MarkdownType) { + composeMarkdownCore(prefix+"Markdown", (MarkdownType) type, false); + composeMarkdownExtras(prefix+"Markdown", (MarkdownType) type, false); + } + else if (type instanceof IdType) { + composeIdCore(prefix+"Id", (IdType) type, false); + composeIdExtras(prefix+"Id", (IdType) type, false); + } + else if (type instanceof PositiveIntType) { + composePositiveIntCore(prefix+"PositiveInt", (PositiveIntType) type, false); + composePositiveIntExtras(prefix+"PositiveInt", (PositiveIntType) type, false); + } + else if (type instanceof DateType) { + composeDateCore(prefix+"Date", (DateType) type, false); + composeDateExtras(prefix+"Date", (DateType) type, false); + } + else if (type instanceof DateTimeType) { + composeDateTimeCore(prefix+"DateTime", (DateTimeType) type, false); + composeDateTimeExtras(prefix+"DateTime", (DateTimeType) type, false); + } + else if (type instanceof StringType) { + composeStringCore(prefix+"String", (StringType) type, false); + composeStringExtras(prefix+"String", (StringType) type, false); + } + else if (type instanceof IntegerType) { + composeIntegerCore(prefix+"Integer", (IntegerType) type, false); + composeIntegerExtras(prefix+"Integer", (IntegerType) type, false); + } + else if (type instanceof UriType) { + composeUriCore(prefix+"Uri", (UriType) type, false); + composeUriExtras(prefix+"Uri", (UriType) type, false); + } + else if (type instanceof InstantType) { + composeInstantCore(prefix+"Instant", (InstantType) type, false); + composeInstantExtras(prefix+"Instant", (InstantType) type, false); + } + else if (type instanceof BooleanType) { + composeBooleanCore(prefix+"Boolean", (BooleanType) type, false); + composeBooleanExtras(prefix+"Boolean", (BooleanType) type, false); + } + else if (type instanceof Base64BinaryType) { + composeBase64BinaryCore(prefix+"Base64Binary", (Base64BinaryType) type, false); + composeBase64BinaryExtras(prefix+"Base64Binary", (Base64BinaryType) type, false); + } + else if (type instanceof TimeType) { + composeTimeCore(prefix+"Time", (TimeType) type, false); + composeTimeExtras(prefix+"Time", (TimeType) type, false); + } + else if (type instanceof DecimalType) { + composeDecimalCore(prefix+"Decimal", (DecimalType) type, false); + composeDecimalExtras(prefix+"Decimal", (DecimalType) type, false); + } + else + throw new Error("Unhandled type"); + } + + protected void composeTypeInner(Type type) throws IOException { + if (type == null) + ; + else if (type instanceof Extension) + composeExtensionInner((Extension) type); + else if (type instanceof Narrative) + composeNarrativeInner((Narrative) type); + else if (type instanceof Duration) + composeDurationInner((Duration) type); + else if (type instanceof Count) + composeCountInner((Count) type); + else if (type instanceof Money) + composeMoneyInner((Money) type); + else if (type instanceof Distance) + composeDistanceInner((Distance) type); + else if (type instanceof Age) + composeAgeInner((Age) type); + else if (type instanceof Reference) + composeReferenceInner((Reference) type); + else if (type instanceof Quantity) + composeQuantityInner((Quantity) type); + else if (type instanceof Period) + composePeriodInner((Period) type); + else if (type instanceof Attachment) + composeAttachmentInner((Attachment) type); + else if (type instanceof Range) + composeRangeInner((Range) type); + else if (type instanceof Annotation) + composeAnnotationInner((Annotation) type); + else if (type instanceof Identifier) + composeIdentifierInner((Identifier) type); + else if (type instanceof Coding) + composeCodingInner((Coding) type); + else if (type instanceof Signature) + composeSignatureInner((Signature) type); + else if (type instanceof SampledData) + composeSampledDataInner((SampledData) type); + else if (type instanceof Ratio) + composeRatioInner((Ratio) type); + else if (type instanceof CodeableConcept) + composeCodeableConceptInner((CodeableConcept) type); + else if (type instanceof SimpleQuantity) + composeSimpleQuantityInner((SimpleQuantity) type); + else if (type instanceof Meta) + composeMetaInner((Meta) type); + else if (type instanceof Address) + composeAddressInner((Address) type); + else if (type instanceof TriggerDefinition) + composeTriggerDefinitionInner((TriggerDefinition) type); + else if (type instanceof Contributor) + composeContributorInner((Contributor) type); + else if (type instanceof DataRequirement) + composeDataRequirementInner((DataRequirement) type); + else if (type instanceof Dosage) + composeDosageInner((Dosage) type); + else if (type instanceof RelatedArtifact) + composeRelatedArtifactInner((RelatedArtifact) type); + else if (type instanceof ContactDetail) + composeContactDetailInner((ContactDetail) type); + else if (type instanceof HumanName) + composeHumanNameInner((HumanName) type); + else if (type instanceof ContactPoint) + composeContactPointInner((ContactPoint) type); + else if (type instanceof UsageContext) + composeUsageContextInner((UsageContext) type); + else if (type instanceof Timing) + composeTimingInner((Timing) type); + else if (type instanceof ElementDefinition) + composeElementDefinitionInner((ElementDefinition) type); + else if (type instanceof ParameterDefinition) + composeParameterDefinitionInner((ParameterDefinition) type); + else + throw new Error("Unhandled type"); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/RdfParser.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/RdfParser.java index 68b3a739b10..33226914f91 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/RdfParser.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/RdfParser.java @@ -1,13218 +1,13748 @@ -package org.hl7.fhir.r4.formats; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 - -import org.hl7.fhir.r4.model.DateType; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.CodeType; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.IntegerType; -import org.hl7.fhir.r4.model.OidType; -import org.hl7.fhir.r4.model.UriType; -import org.hl7.fhir.r4.model.UuidType; -import org.hl7.fhir.r4.model.InstantType; -import org.hl7.fhir.r4.model.BooleanType; -import org.hl7.fhir.r4.model.Base64BinaryType; -import org.hl7.fhir.r4.model.UnsignedIntType; -import org.hl7.fhir.r4.model.MarkdownType; -import org.hl7.fhir.r4.model.TimeType; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.PositiveIntType; -import org.hl7.fhir.r4.model.DecimalType; -import org.hl7.fhir.r4.model.*; -import org.xmlpull.v1.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.exceptions.FHIRFormatError; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r4.utils.formats.Turtle.Complex; -import java.io.IOException; - -public class RdfParser extends RdfParserBase { - - public RdfParser() { - super(); - } - - public RdfParser(boolean allowUnknownContent) { - super(); - setAllowUnknownContent(allowUnknownContent); - } - - - protected void composeElement(Complex t, String parentType, String name, Element element, int index) { - if (element == null) - return; - if (index > -1) - t.predicate("fhir:index", Integer.toString(index)); - if (element.hasIdElement()) - composeString(t, "Element", "id", element.getIdElement(), -1); - for (int i = 0; i < element.getExtension().size(); i++) - composeExtension(t, "Element", "extension", element.getExtension().get(i), i); - } - - protected void composeBackboneElement(Complex t, String tType, String name, BackboneElement element, int index) { - composeElement(t, tType, name, element, index); - for (int i = 0; i < element.getModifierExtension().size(); i++) - composeExtension(t, "Element", "modifierExtension", element.getModifierExtension().get(i), i); - } - - private void composeEnum(Complex parent, String parentType, String name, Enumeration value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - decorateCode(t, value); - } - - - protected void composeDate(Complex parent, String parentType, String name, DateType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeDateTime(Complex parent, String parentType, String name, DateTimeType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeCode(Complex parent, String parentType, String name, CodeType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - decorateCode(t, value); - } - - protected void composeString(Complex parent, String parentType, String name, StringType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeInteger(Complex parent, String parentType, String name, IntegerType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeOid(Complex parent, String parentType, String name, OidType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeUri(Complex parent, String parentType, String name, UriType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeUuid(Complex parent, String parentType, String name, UuidType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeInstant(Complex parent, String parentType, String name, InstantType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeBoolean(Complex parent, String parentType, String name, BooleanType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeBase64Binary(Complex parent, String parentType, String name, Base64BinaryType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeUnsignedInt(Complex parent, String parentType, String name, UnsignedIntType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeMarkdown(Complex parent, String parentType, String name, MarkdownType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeTime(Complex parent, String parentType, String name, TimeType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeId(Complex parent, String parentType, String name, IdType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composePositiveInt(Complex parent, String parentType, String name, PositiveIntType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeDecimal(Complex parent, String parentType, String name, DecimalType value, int index) { - if (value == null) - return; - Complex t = parent.predicate("fhir:"+parentType+"."+name); - t.predicate("fhir:value", ttlLiteral(value.asStringValue())); - composeElement(t, parentType, name, value, index); - } - - protected void composeExtension(Complex parent, String parentType, String name, Extension element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Extension", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "Extension", "url", element.getUrlElement(), -1); - if (element.hasValue()) - composeType(t, "Extension", "value", element.getValue(), -1); - } - - protected void composeNarrative(Complex parent, String parentType, String name, Narrative element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Narrative", name, element, index); - if (element.hasStatusElement()) - composeEnum(t, "Narrative", "status", element.getStatusElement(), -1); - if (element.hasDiv()) - composeXhtml(t, "Narrative", "div", element.getDiv(), -1); - } - - protected void composeReference(Complex parent, String parentType, String name, Reference element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Reference", name, element, index); - if (element.hasReferenceElement()) - composeString(t, "Reference", "reference", element.getReferenceElement_(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "Reference", "identifier", element.getIdentifier(), -1); - if (element.hasDisplayElement()) - composeString(t, "Reference", "display", element.getDisplayElement(), -1); - } - - protected void composeQuantity(Complex parent, String parentType, String name, Quantity element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Quantity", name, element, index); - if (element.hasValueElement()) - composeDecimal(t, "Quantity", "value", element.getValueElement(), -1); - if (element.hasComparatorElement()) - composeEnum(t, "Quantity", "comparator", element.getComparatorElement(), -1); - if (element.hasUnitElement()) - composeString(t, "Quantity", "unit", element.getUnitElement(), -1); - if (element.hasSystemElement()) - composeUri(t, "Quantity", "system", element.getSystemElement(), -1); - if (element.hasCodeElement()) - composeCode(t, "Quantity", "code", element.getCodeElement(), -1); - } - - protected void composePeriod(Complex parent, String parentType, String name, Period element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Period", name, element, index); - if (element.hasStartElement()) - composeDateTime(t, "Period", "start", element.getStartElement(), -1); - if (element.hasEndElement()) - composeDateTime(t, "Period", "end", element.getEndElement(), -1); - } - - protected void composeAttachment(Complex parent, String parentType, String name, Attachment element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Attachment", name, element, index); - if (element.hasContentTypeElement()) - composeCode(t, "Attachment", "contentType", element.getContentTypeElement(), -1); - if (element.hasLanguageElement()) - composeCode(t, "Attachment", "language", element.getLanguageElement(), -1); - if (element.hasDataElement()) - composeBase64Binary(t, "Attachment", "data", element.getDataElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "Attachment", "url", element.getUrlElement(), -1); - if (element.hasSizeElement()) - composeUnsignedInt(t, "Attachment", "size", element.getSizeElement(), -1); - if (element.hasHashElement()) - composeBase64Binary(t, "Attachment", "hash", element.getHashElement(), -1); - if (element.hasTitleElement()) - composeString(t, "Attachment", "title", element.getTitleElement(), -1); - if (element.hasCreationElement()) - composeDateTime(t, "Attachment", "creation", element.getCreationElement(), -1); - } - - protected void composeDuration(Complex parent, String parentType, String name, Duration element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Duration", name, element, index); - } - - protected void composeCount(Complex parent, String parentType, String name, Count element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Count", name, element, index); - } - - protected void composeRange(Complex parent, String parentType, String name, Range element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Range", name, element, index); - if (element.hasLow()) - composeQuantity(t, "Range", "low", element.getLow(), -1); - if (element.hasHigh()) - composeQuantity(t, "Range", "high", element.getHigh(), -1); - } - - protected void composeAnnotation(Complex parent, String parentType, String name, Annotation element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Annotation", name, element, index); - if (element.hasAuthor()) - composeType(t, "Annotation", "author", element.getAuthor(), -1); - if (element.hasTimeElement()) - composeDateTime(t, "Annotation", "time", element.getTimeElement(), -1); - if (element.hasTextElement()) - composeString(t, "Annotation", "text", element.getTextElement(), -1); - } - - protected void composeMoney(Complex parent, String parentType, String name, Money element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Money", name, element, index); - } - - protected void composeIdentifier(Complex parent, String parentType, String name, Identifier element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Identifier", name, element, index); - if (element.hasUseElement()) - composeEnum(t, "Identifier", "use", element.getUseElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Identifier", "type", element.getType(), -1); - if (element.hasSystemElement()) - composeUri(t, "Identifier", "system", element.getSystemElement(), -1); - if (element.hasValueElement()) - composeString(t, "Identifier", "value", element.getValueElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Identifier", "period", element.getPeriod(), -1); - if (element.hasAssigner()) - composeReference(t, "Identifier", "assigner", element.getAssigner(), -1); - } - - protected void composeCoding(Complex parent, String parentType, String name, Coding element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Coding", name, element, index); - decorateCoding(t, element); - if (element.hasSystemElement()) - composeUri(t, "Coding", "system", element.getSystemElement(), -1); - if (element.hasVersionElement()) - composeString(t, "Coding", "version", element.getVersionElement(), -1); - if (element.hasCodeElement()) - composeCode(t, "Coding", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "Coding", "display", element.getDisplayElement(), -1); - if (element.hasUserSelectedElement()) - composeBoolean(t, "Coding", "userSelected", element.getUserSelectedElement(), -1); - } - - protected void composeSignature(Complex parent, String parentType, String name, Signature element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Signature", name, element, index); - for (int i = 0; i < element.getType().size(); i++) - composeCoding(t, "Signature", "type", element.getType().get(i), i); - if (element.hasWhenElement()) - composeInstant(t, "Signature", "when", element.getWhenElement(), -1); - if (element.hasWho()) - composeType(t, "Signature", "who", element.getWho(), -1); - if (element.hasOnBehalfOf()) - composeType(t, "Signature", "onBehalfOf", element.getOnBehalfOf(), -1); - if (element.hasContentTypeElement()) - composeCode(t, "Signature", "contentType", element.getContentTypeElement(), -1); - if (element.hasBlobElement()) - composeBase64Binary(t, "Signature", "blob", element.getBlobElement(), -1); - } - - protected void composeSampledData(Complex parent, String parentType, String name, SampledData element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "SampledData", name, element, index); - if (element.hasOrigin()) - composeQuantity(t, "SampledData", "origin", element.getOrigin(), -1); - if (element.hasPeriodElement()) - composeDecimal(t, "SampledData", "period", element.getPeriodElement(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "SampledData", "factor", element.getFactorElement(), -1); - if (element.hasLowerLimitElement()) - composeDecimal(t, "SampledData", "lowerLimit", element.getLowerLimitElement(), -1); - if (element.hasUpperLimitElement()) - composeDecimal(t, "SampledData", "upperLimit", element.getUpperLimitElement(), -1); - if (element.hasDimensionsElement()) - composePositiveInt(t, "SampledData", "dimensions", element.getDimensionsElement(), -1); - if (element.hasDataElement()) - composeString(t, "SampledData", "data", element.getDataElement(), -1); - } - - protected void composeRatio(Complex parent, String parentType, String name, Ratio element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Ratio", name, element, index); - if (element.hasNumerator()) - composeQuantity(t, "Ratio", "numerator", element.getNumerator(), -1); - if (element.hasDenominator()) - composeQuantity(t, "Ratio", "denominator", element.getDenominator(), -1); - } - - protected void composeDistance(Complex parent, String parentType, String name, Distance element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Distance", name, element, index); - } - - protected void composeAge(Complex parent, String parentType, String name, Age element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Age", name, element, index); - } - - protected void composeCodeableConcept(Complex parent, String parentType, String name, CodeableConcept element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "CodeableConcept", name, element, index); - decorateCodeableConcept(t, element); - for (int i = 0; i < element.getCoding().size(); i++) - composeCoding(t, "CodeableConcept", "coding", element.getCoding().get(i), i); - if (element.hasTextElement()) - composeString(t, "CodeableConcept", "text", element.getTextElement(), -1); - } - - protected void composeMeta(Complex parent, String parentType, String name, Meta element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Meta", name, element, index); - if (element.hasVersionIdElement()) - composeId(t, "Meta", "versionId", element.getVersionIdElement(), -1); - if (element.hasLastUpdatedElement()) - composeInstant(t, "Meta", "lastUpdated", element.getLastUpdatedElement(), -1); - for (int i = 0; i < element.getProfile().size(); i++) - composeUri(t, "Meta", "profile", element.getProfile().get(i), i); - for (int i = 0; i < element.getSecurity().size(); i++) - composeCoding(t, "Meta", "security", element.getSecurity().get(i), i); - for (int i = 0; i < element.getTag().size(); i++) - composeCoding(t, "Meta", "tag", element.getTag().get(i), i); - } - - protected void composeAddress(Complex parent, String parentType, String name, Address element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Address", name, element, index); - if (element.hasUseElement()) - composeEnum(t, "Address", "use", element.getUseElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "Address", "type", element.getTypeElement(), -1); - if (element.hasTextElement()) - composeString(t, "Address", "text", element.getTextElement(), -1); - for (int i = 0; i < element.getLine().size(); i++) - composeString(t, "Address", "line", element.getLine().get(i), i); - if (element.hasCityElement()) - composeString(t, "Address", "city", element.getCityElement(), -1); - if (element.hasDistrictElement()) - composeString(t, "Address", "district", element.getDistrictElement(), -1); - if (element.hasStateElement()) - composeString(t, "Address", "state", element.getStateElement(), -1); - if (element.hasPostalCodeElement()) - composeString(t, "Address", "postalCode", element.getPostalCodeElement(), -1); - if (element.hasCountryElement()) - composeString(t, "Address", "country", element.getCountryElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Address", "period", element.getPeriod(), -1); - } - - protected void composeTriggerDefinition(Complex parent, String parentType, String name, TriggerDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "TriggerDefinition", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "TriggerDefinition", "type", element.getTypeElement(), -1); - if (element.hasEventNameElement()) - composeString(t, "TriggerDefinition", "eventName", element.getEventNameElement(), -1); - if (element.hasEventTiming()) - composeType(t, "TriggerDefinition", "eventTiming", element.getEventTiming(), -1); - if (element.hasEventData()) - composeDataRequirement(t, "TriggerDefinition", "eventData", element.getEventData(), -1); - if (element.hasEventCondition()) - composeTriggerDefinitionTriggerDefinitionEventConditionComponent(t, "TriggerDefinition", "eventCondition", element.getEventCondition(), -1); - } - - protected void composeTriggerDefinitionTriggerDefinitionEventConditionComponent(Complex parent, String parentType, String name, TriggerDefinition.TriggerDefinitionEventConditionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "eventCondition", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "TriggerDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasLanguageElement()) - composeString(t, "TriggerDefinition", "language", element.getLanguageElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "TriggerDefinition", "expression", element.getExpressionElement(), -1); - } - - protected void composeContributor(Complex parent, String parentType, String name, Contributor element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Contributor", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Contributor", "type", element.getTypeElement(), -1); - if (element.hasNameElement()) - composeString(t, "Contributor", "name", element.getNameElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "Contributor", "contact", element.getContact().get(i), i); - } - - protected void composeDataRequirement(Complex parent, String parentType, String name, DataRequirement element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "DataRequirement", name, element, index); - if (element.hasTypeElement()) - composeCode(t, "DataRequirement", "type", element.getTypeElement(), -1); - for (int i = 0; i < element.getProfile().size(); i++) - composeUri(t, "DataRequirement", "profile", element.getProfile().get(i), i); - for (int i = 0; i < element.getMustSupport().size(); i++) - composeString(t, "DataRequirement", "mustSupport", element.getMustSupport().get(i), i); - for (int i = 0; i < element.getCodeFilter().size(); i++) - composeDataRequirementDataRequirementCodeFilterComponent(t, "DataRequirement", "codeFilter", element.getCodeFilter().get(i), i); - for (int i = 0; i < element.getDateFilter().size(); i++) - composeDataRequirementDataRequirementDateFilterComponent(t, "DataRequirement", "dateFilter", element.getDateFilter().get(i), i); - } - - protected void composeDataRequirementDataRequirementCodeFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementCodeFilterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "codeFilter", name, element, index); - if (element.hasPathElement()) - composeString(t, "DataRequirement", "path", element.getPathElement(), -1); - if (element.hasValueSet()) - composeType(t, "DataRequirement", "valueSet", element.getValueSet(), -1); - for (int i = 0; i < element.getValueCode().size(); i++) - composeCode(t, "DataRequirement", "valueCode", element.getValueCode().get(i), i); - for (int i = 0; i < element.getValueCoding().size(); i++) - composeCoding(t, "DataRequirement", "valueCoding", element.getValueCoding().get(i), i); - for (int i = 0; i < element.getValueCodeableConcept().size(); i++) - composeCodeableConcept(t, "DataRequirement", "valueCodeableConcept", element.getValueCodeableConcept().get(i), i); - } - - protected void composeDataRequirementDataRequirementDateFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementDateFilterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "dateFilter", name, element, index); - if (element.hasPathElement()) - composeString(t, "DataRequirement", "path", element.getPathElement(), -1); - if (element.hasValue()) - composeType(t, "DataRequirement", "value", element.getValue(), -1); - } - - protected void composeDosage(Complex parent, String parentType, String name, Dosage element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Dosage", name, element, index); - if (element.hasSequenceElement()) - composeInteger(t, "Dosage", "sequence", element.getSequenceElement(), -1); - if (element.hasTextElement()) - composeString(t, "Dosage", "text", element.getTextElement(), -1); - for (int i = 0; i < element.getAdditionalInstruction().size(); i++) - composeCodeableConcept(t, "Dosage", "additionalInstruction", element.getAdditionalInstruction().get(i), i); - if (element.hasPatientInstructionElement()) - composeString(t, "Dosage", "patientInstruction", element.getPatientInstructionElement(), -1); - if (element.hasTiming()) - composeTiming(t, "Dosage", "timing", element.getTiming(), -1); - if (element.hasAsNeeded()) - composeType(t, "Dosage", "asNeeded", element.getAsNeeded(), -1); - if (element.hasSite()) - composeCodeableConcept(t, "Dosage", "site", element.getSite(), -1); - if (element.hasRoute()) - composeCodeableConcept(t, "Dosage", "route", element.getRoute(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "Dosage", "method", element.getMethod(), -1); - if (element.hasDose()) - composeType(t, "Dosage", "dose", element.getDose(), -1); - if (element.hasMaxDosePerPeriod()) - composeRatio(t, "Dosage", "maxDosePerPeriod", element.getMaxDosePerPeriod(), -1); - if (element.hasMaxDosePerAdministration()) - composeQuantity(t, "Dosage", "maxDosePerAdministration", element.getMaxDosePerAdministration(), -1); - if (element.hasMaxDosePerLifetime()) - composeQuantity(t, "Dosage", "maxDosePerLifetime", element.getMaxDosePerLifetime(), -1); - if (element.hasRate()) - composeType(t, "Dosage", "rate", element.getRate(), -1); - } - - protected void composeRelatedArtifact(Complex parent, String parentType, String name, RelatedArtifact element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "RelatedArtifact", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "RelatedArtifact", "type", element.getTypeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "RelatedArtifact", "display", element.getDisplayElement(), -1); - if (element.hasCitationElement()) - composeString(t, "RelatedArtifact", "citation", element.getCitationElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "RelatedArtifact", "url", element.getUrlElement(), -1); - if (element.hasDocument()) - composeAttachment(t, "RelatedArtifact", "document", element.getDocument(), -1); - if (element.hasResource()) - composeReference(t, "RelatedArtifact", "resource", element.getResource(), -1); - } - - protected void composeContactDetail(Complex parent, String parentType, String name, ContactDetail element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "ContactDetail", name, element, index); - if (element.hasNameElement()) - composeString(t, "ContactDetail", "name", element.getNameElement(), -1); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "ContactDetail", "telecom", element.getTelecom().get(i), i); - } - - protected void composeHumanName(Complex parent, String parentType, String name, HumanName element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "HumanName", name, element, index); - if (element.hasUseElement()) - composeEnum(t, "HumanName", "use", element.getUseElement(), -1); - if (element.hasTextElement()) - composeString(t, "HumanName", "text", element.getTextElement(), -1); - if (element.hasFamilyElement()) - composeString(t, "HumanName", "family", element.getFamilyElement(), -1); - for (int i = 0; i < element.getGiven().size(); i++) - composeString(t, "HumanName", "given", element.getGiven().get(i), i); - for (int i = 0; i < element.getPrefix().size(); i++) - composeString(t, "HumanName", "prefix", element.getPrefix().get(i), i); - for (int i = 0; i < element.getSuffix().size(); i++) - composeString(t, "HumanName", "suffix", element.getSuffix().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "HumanName", "period", element.getPeriod(), -1); - } - - protected void composeContactPoint(Complex parent, String parentType, String name, ContactPoint element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "ContactPoint", name, element, index); - if (element.hasSystemElement()) - composeEnum(t, "ContactPoint", "system", element.getSystemElement(), -1); - if (element.hasValueElement()) - composeString(t, "ContactPoint", "value", element.getValueElement(), -1); - if (element.hasUseElement()) - composeEnum(t, "ContactPoint", "use", element.getUseElement(), -1); - if (element.hasRankElement()) - composePositiveInt(t, "ContactPoint", "rank", element.getRankElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "ContactPoint", "period", element.getPeriod(), -1); - } - - protected void composeUsageContext(Complex parent, String parentType, String name, UsageContext element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "UsageContext", name, element, index); - if (element.hasCode()) - composeCoding(t, "UsageContext", "code", element.getCode(), -1); - if (element.hasValue()) - composeType(t, "UsageContext", "value", element.getValue(), -1); - } - - protected void composeTiming(Complex parent, String parentType, String name, Timing element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "Timing", name, element, index); - for (int i = 0; i < element.getEvent().size(); i++) - composeDateTime(t, "Timing", "event", element.getEvent().get(i), i); - if (element.hasRepeat()) - composeTimingTimingRepeatComponent(t, "Timing", "repeat", element.getRepeat(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Timing", "code", element.getCode(), -1); - } - - protected void composeTimingTimingRepeatComponent(Complex parent, String parentType, String name, Timing.TimingRepeatComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "repeat", name, element, index); - if (element.hasBounds()) - composeType(t, "Timing", "bounds", element.getBounds(), -1); - if (element.hasCountElement()) - composeInteger(t, "Timing", "count", element.getCountElement(), -1); - if (element.hasCountMaxElement()) - composeInteger(t, "Timing", "countMax", element.getCountMaxElement(), -1); - if (element.hasDurationElement()) - composeDecimal(t, "Timing", "duration", element.getDurationElement(), -1); - if (element.hasDurationMaxElement()) - composeDecimal(t, "Timing", "durationMax", element.getDurationMaxElement(), -1); - if (element.hasDurationUnitElement()) - composeEnum(t, "Timing", "durationUnit", element.getDurationUnitElement(), -1); - if (element.hasFrequencyElement()) - composeInteger(t, "Timing", "frequency", element.getFrequencyElement(), -1); - if (element.hasFrequencyMaxElement()) - composeInteger(t, "Timing", "frequencyMax", element.getFrequencyMaxElement(), -1); - if (element.hasPeriodElement()) - composeDecimal(t, "Timing", "period", element.getPeriodElement(), -1); - if (element.hasPeriodMaxElement()) - composeDecimal(t, "Timing", "periodMax", element.getPeriodMaxElement(), -1); - if (element.hasPeriodUnitElement()) - composeEnum(t, "Timing", "periodUnit", element.getPeriodUnitElement(), -1); - for (int i = 0; i < element.getDayOfWeek().size(); i++) - composeEnum(t, "Timing", "dayOfWeek", element.getDayOfWeek().get(i), i); - for (int i = 0; i < element.getTimeOfDay().size(); i++) - composeTime(t, "Timing", "timeOfDay", element.getTimeOfDay().get(i), i); - for (int i = 0; i < element.getWhen().size(); i++) - composeEnum(t, "Timing", "when", element.getWhen().get(i), i); - if (element.hasOffsetElement()) - composeUnsignedInt(t, "Timing", "offset", element.getOffsetElement(), -1); - } - - protected void composeElementDefinition(Complex parent, String parentType, String name, ElementDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "ElementDefinition", name, element, index); - if (element.hasPathElement()) - composeString(t, "ElementDefinition", "path", element.getPathElement(), -1); - for (int i = 0; i < element.getRepresentation().size(); i++) - composeEnum(t, "ElementDefinition", "representation", element.getRepresentation().get(i), i); - if (element.hasSliceNameElement()) - composeString(t, "ElementDefinition", "sliceName", element.getSliceNameElement(), -1); - if (element.hasLabelElement()) - composeString(t, "ElementDefinition", "label", element.getLabelElement(), -1); - for (int i = 0; i < element.getCode().size(); i++) - composeCoding(t, "ElementDefinition", "code", element.getCode().get(i), i); - if (element.hasSlicing()) - composeElementDefinitionElementDefinitionSlicingComponent(t, "ElementDefinition", "slicing", element.getSlicing(), -1); - if (element.hasShortElement()) - composeString(t, "ElementDefinition", "short", element.getShortElement(), -1); - if (element.hasDefinitionElement()) - composeMarkdown(t, "ElementDefinition", "definition", element.getDefinitionElement(), -1); - if (element.hasCommentElement()) - composeMarkdown(t, "ElementDefinition", "comment", element.getCommentElement(), -1); - if (element.hasRequirementsElement()) - composeMarkdown(t, "ElementDefinition", "requirements", element.getRequirementsElement(), -1); - for (int i = 0; i < element.getAlias().size(); i++) - composeString(t, "ElementDefinition", "alias", element.getAlias().get(i), i); - if (element.hasMinElement()) - composeUnsignedInt(t, "ElementDefinition", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "ElementDefinition", "max", element.getMaxElement(), -1); - if (element.hasBase()) - composeElementDefinitionElementDefinitionBaseComponent(t, "ElementDefinition", "base", element.getBase(), -1); - if (element.hasContentReferenceElement()) - composeUri(t, "ElementDefinition", "contentReference", element.getContentReferenceElement(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeElementDefinitionTypeRefComponent(t, "ElementDefinition", "type", element.getType().get(i), i); - if (element.hasDefaultValue()) - composeType(t, "ElementDefinition", "defaultValue", element.getDefaultValue(), -1); - if (element.hasMeaningWhenMissingElement()) - composeMarkdown(t, "ElementDefinition", "meaningWhenMissing", element.getMeaningWhenMissingElement(), -1); - if (element.hasOrderMeaningElement()) - composeString(t, "ElementDefinition", "orderMeaning", element.getOrderMeaningElement(), -1); - if (element.hasFixed()) - composeType(t, "ElementDefinition", "fixed", element.getFixed(), -1); - if (element.hasPattern()) - composeType(t, "ElementDefinition", "pattern", element.getPattern(), -1); - for (int i = 0; i < element.getExample().size(); i++) - composeElementDefinitionElementDefinitionExampleComponent(t, "ElementDefinition", "example", element.getExample().get(i), i); - if (element.hasMinValue()) - composeType(t, "ElementDefinition", "minValue", element.getMinValue(), -1); - if (element.hasMaxValue()) - composeType(t, "ElementDefinition", "maxValue", element.getMaxValue(), -1); - if (element.hasMaxLengthElement()) - composeInteger(t, "ElementDefinition", "maxLength", element.getMaxLengthElement(), -1); - for (int i = 0; i < element.getCondition().size(); i++) - composeId(t, "ElementDefinition", "condition", element.getCondition().get(i), i); - for (int i = 0; i < element.getConstraint().size(); i++) - composeElementDefinitionElementDefinitionConstraintComponent(t, "ElementDefinition", "constraint", element.getConstraint().get(i), i); - if (element.hasMustSupportElement()) - composeBoolean(t, "ElementDefinition", "mustSupport", element.getMustSupportElement(), -1); - if (element.hasIsModifierElement()) - composeBoolean(t, "ElementDefinition", "isModifier", element.getIsModifierElement(), -1); - if (element.hasIsSummaryElement()) - composeBoolean(t, "ElementDefinition", "isSummary", element.getIsSummaryElement(), -1); - if (element.hasBinding()) - composeElementDefinitionElementDefinitionBindingComponent(t, "ElementDefinition", "binding", element.getBinding(), -1); - for (int i = 0; i < element.getMapping().size(); i++) - composeElementDefinitionElementDefinitionMappingComponent(t, "ElementDefinition", "mapping", element.getMapping().get(i), i); - } - - protected void composeElementDefinitionElementDefinitionSlicingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionSlicingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "slicing", name, element, index); - for (int i = 0; i < element.getDiscriminator().size(); i++) - composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(t, "ElementDefinition", "discriminator", element.getDiscriminator().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "ElementDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasOrderedElement()) - composeBoolean(t, "ElementDefinition", "ordered", element.getOrderedElement(), -1); - if (element.hasRulesElement()) - composeEnum(t, "ElementDefinition", "rules", element.getRulesElement(), -1); - } - - protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "discriminator", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "ElementDefinition", "type", element.getTypeElement(), -1); - if (element.hasPathElement()) - composeString(t, "ElementDefinition", "path", element.getPathElement(), -1); - } - - protected void composeElementDefinitionElementDefinitionBaseComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionBaseComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "base", name, element, index); - if (element.hasPathElement()) - composeString(t, "ElementDefinition", "path", element.getPathElement(), -1); - if (element.hasMinElement()) - composeUnsignedInt(t, "ElementDefinition", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "ElementDefinition", "max", element.getMaxElement(), -1); - } - - protected void composeElementDefinitionTypeRefComponent(Complex parent, String parentType, String name, ElementDefinition.TypeRefComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "type", name, element, index); - if (element.hasCodeElement()) - composeUri(t, "ElementDefinition", "code", element.getCodeElement(), -1); - if (element.hasProfileElement()) - composeUri(t, "ElementDefinition", "profile", element.getProfileElement(), -1); - if (element.hasTargetProfileElement()) - composeUri(t, "ElementDefinition", "targetProfile", element.getTargetProfileElement(), -1); - for (int i = 0; i < element.getAggregation().size(); i++) - composeEnum(t, "ElementDefinition", "aggregation", element.getAggregation().get(i), i); - if (element.hasVersioningElement()) - composeEnum(t, "ElementDefinition", "versioning", element.getVersioningElement(), -1); - } - - protected void composeElementDefinitionElementDefinitionExampleComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionExampleComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "example", name, element, index); - if (element.hasLabelElement()) - composeString(t, "ElementDefinition", "label", element.getLabelElement(), -1); - if (element.hasValue()) - composeType(t, "ElementDefinition", "value", element.getValue(), -1); - } - - protected void composeElementDefinitionElementDefinitionConstraintComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionConstraintComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "constraint", name, element, index); - if (element.hasKeyElement()) - composeId(t, "ElementDefinition", "key", element.getKeyElement(), -1); - if (element.hasRequirementsElement()) - composeString(t, "ElementDefinition", "requirements", element.getRequirementsElement(), -1); - if (element.hasSeverityElement()) - composeEnum(t, "ElementDefinition", "severity", element.getSeverityElement(), -1); - if (element.hasHumanElement()) - composeString(t, "ElementDefinition", "human", element.getHumanElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "ElementDefinition", "expression", element.getExpressionElement(), -1); - if (element.hasXpathElement()) - composeString(t, "ElementDefinition", "xpath", element.getXpathElement(), -1); - if (element.hasSourceElement()) - composeUri(t, "ElementDefinition", "source", element.getSourceElement(), -1); - } - - protected void composeElementDefinitionElementDefinitionBindingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionBindingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "binding", name, element, index); - if (element.hasStrengthElement()) - composeEnum(t, "ElementDefinition", "strength", element.getStrengthElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ElementDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasValueSet()) - composeType(t, "ElementDefinition", "valueSet", element.getValueSet(), -1); - } - - protected void composeElementDefinitionElementDefinitionMappingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionMappingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "mapping", name, element, index); - if (element.hasIdentityElement()) - composeId(t, "ElementDefinition", "identity", element.getIdentityElement(), -1); - if (element.hasLanguageElement()) - composeCode(t, "ElementDefinition", "language", element.getLanguageElement(), -1); - if (element.hasMapElement()) - composeString(t, "ElementDefinition", "map", element.getMapElement(), -1); - if (element.hasCommentElement()) - composeString(t, "ElementDefinition", "comment", element.getCommentElement(), -1); - } - - protected void composeParameterDefinition(Complex parent, String parentType, String name, ParameterDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeElement(t, "ParameterDefinition", name, element, index); - if (element.hasNameElement()) - composeCode(t, "ParameterDefinition", "name", element.getNameElement(), -1); - if (element.hasUseElement()) - composeEnum(t, "ParameterDefinition", "use", element.getUseElement(), -1); - if (element.hasMinElement()) - composeInteger(t, "ParameterDefinition", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "ParameterDefinition", "max", element.getMaxElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "ParameterDefinition", "documentation", element.getDocumentationElement(), -1); - if (element.hasTypeElement()) - composeCode(t, "ParameterDefinition", "type", element.getTypeElement(), -1); - if (element.hasProfile()) - composeReference(t, "ParameterDefinition", "profile", element.getProfile(), -1); - } - - protected void composeDomainResource(Complex t, String parentType, String name, DomainResource element, int index) { - composeResource(t, parentType, name, element, index); - if (element.hasText()) - composeNarrative(t, "DomainResource", "text", element.getText(), -1); - for (int i = 0; i < element.getContained().size(); i++) - composeResource(t, "DomainResource", "contained", element.getContained().get(i), i); - for (int i = 0; i < element.getExtension().size(); i++) - composeExtension(t, "DomainResource", "extension", element.getExtension().get(i), i); - for (int i = 0; i < element.getModifierExtension().size(); i++) - composeExtension(t, "DomainResource", "modifierExtension", element.getModifierExtension().get(i), i); - } - - protected void composeParameters(Complex parent, String parentType, String name, Parameters element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeResource(t, "Parameters", name, element, index); - for (int i = 0; i < element.getParameter().size(); i++) - composeParametersParametersParameterComponent(t, "Parameters", "parameter", element.getParameter().get(i), i); - } - - protected void composeParametersParametersParameterComponent(Complex parent, String parentType, String name, Parameters.ParametersParameterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "parameter", name, element, index); - if (element.hasNameElement()) - composeString(t, "Parameters", "name", element.getNameElement(), -1); - if (element.hasValue()) - composeType(t, "Parameters", "value", element.getValue(), -1); - if (element.hasResource()) - composeResource(t, "Parameters", "resource", element.getResource(), -1); - for (int i = 0; i < element.getPart().size(); i++) - composeParametersParametersParameterComponent(t, "Parameters", "part", element.getPart().get(i), i); - } - - protected void composeResource(Complex t, String parentType, String name, Resource element, int index) { - if (element.hasIdElement()) - composeId(t, "Resource", "id", element.getIdElement(), -1); - if (element.hasMeta()) - composeMeta(t, "Resource", "meta", element.getMeta(), -1); - if (element.hasImplicitRulesElement()) - composeUri(t, "Resource", "implicitRules", element.getImplicitRulesElement(), -1); - if (element.hasLanguageElement()) - composeCode(t, "Resource", "language", element.getLanguageElement(), -1); - } - - protected void composeAccount(Complex parent, String parentType, String name, Account element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Account", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Account", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Account", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Account", "type", element.getType(), -1); - if (element.hasNameElement()) - composeString(t, "Account", "name", element.getNameElement(), -1); - if (element.hasSubject()) - composeReference(t, "Account", "subject", element.getSubject(), -1); - if (element.hasPeriod()) - composePeriod(t, "Account", "period", element.getPeriod(), -1); - if (element.hasActive()) - composePeriod(t, "Account", "active", element.getActive(), -1); - if (element.hasBalance()) - composeMoney(t, "Account", "balance", element.getBalance(), -1); - for (int i = 0; i < element.getCoverage().size(); i++) - composeAccountCoverageComponent(t, "Account", "coverage", element.getCoverage().get(i), i); - if (element.hasOwner()) - composeReference(t, "Account", "owner", element.getOwner(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Account", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getGuarantor().size(); i++) - composeAccountGuarantorComponent(t, "Account", "guarantor", element.getGuarantor().get(i), i); - } - - protected void composeAccountCoverageComponent(Complex parent, String parentType, String name, Account.CoverageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "coverage", name, element, index); - if (element.hasCoverage()) - composeReference(t, "Account", "coverage", element.getCoverage(), -1); - if (element.hasPriorityElement()) - composePositiveInt(t, "Account", "priority", element.getPriorityElement(), -1); - } - - protected void composeAccountGuarantorComponent(Complex parent, String parentType, String name, Account.GuarantorComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "guarantor", name, element, index); - if (element.hasParty()) - composeReference(t, "Account", "party", element.getParty(), -1); - if (element.hasOnHoldElement()) - composeBoolean(t, "Account", "onHold", element.getOnHoldElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Account", "period", element.getPeriod(), -1); - } - - protected void composeActivityDefinition(Complex parent, String parentType, String name, ActivityDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ActivityDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "ActivityDefinition", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ActivityDefinition", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "ActivityDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "ActivityDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "ActivityDefinition", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ActivityDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "ActivityDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ActivityDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "ActivityDefinition", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ActivityDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "ActivityDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasUsageElement()) - composeString(t, "ActivityDefinition", "usage", element.getUsageElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "ActivityDefinition", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "ActivityDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "ActivityDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "ActivityDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ActivityDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeCodeableConcept(t, "ActivityDefinition", "topic", element.getTopic().get(i), i); - for (int i = 0; i < element.getContributor().size(); i++) - composeContributor(t, "ActivityDefinition", "contributor", element.getContributor().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ActivityDefinition", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "ActivityDefinition", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "ActivityDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); - for (int i = 0; i < element.getLibrary().size(); i++) - composeReference(t, "ActivityDefinition", "library", element.getLibrary().get(i), i); - if (element.hasKindElement()) - composeEnum(t, "ActivityDefinition", "kind", element.getKindElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "ActivityDefinition", "code", element.getCode(), -1); - if (element.hasTiming()) - composeType(t, "ActivityDefinition", "timing", element.getTiming(), -1); - if (element.hasLocation()) - composeReference(t, "ActivityDefinition", "location", element.getLocation(), -1); - for (int i = 0; i < element.getParticipant().size(); i++) - composeActivityDefinitionActivityDefinitionParticipantComponent(t, "ActivityDefinition", "participant", element.getParticipant().get(i), i); - if (element.hasProduct()) - composeType(t, "ActivityDefinition", "product", element.getProduct(), -1); - if (element.hasQuantity()) - composeQuantity(t, "ActivityDefinition", "quantity", element.getQuantity(), -1); - for (int i = 0; i < element.getDosage().size(); i++) - composeDosage(t, "ActivityDefinition", "dosage", element.getDosage().get(i), i); - for (int i = 0; i < element.getBodySite().size(); i++) - composeCodeableConcept(t, "ActivityDefinition", "bodySite", element.getBodySite().get(i), i); - if (element.hasTransform()) - composeReference(t, "ActivityDefinition", "transform", element.getTransform(), -1); - for (int i = 0; i < element.getDynamicValue().size(); i++) - composeActivityDefinitionActivityDefinitionDynamicValueComponent(t, "ActivityDefinition", "dynamicValue", element.getDynamicValue().get(i), i); - } - - protected void composeActivityDefinitionActivityDefinitionParticipantComponent(Complex parent, String parentType, String name, ActivityDefinition.ActivityDefinitionParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "ActivityDefinition", "type", element.getTypeElement(), -1); - if (element.hasRole()) - composeCodeableConcept(t, "ActivityDefinition", "role", element.getRole(), -1); - } - - protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(Complex parent, String parentType, String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dynamicValue", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "ActivityDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPathElement()) - composeString(t, "ActivityDefinition", "path", element.getPathElement(), -1); - if (element.hasLanguageElement()) - composeString(t, "ActivityDefinition", "language", element.getLanguageElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "ActivityDefinition", "expression", element.getExpressionElement(), -1); - } - - protected void composeAdverseEvent(Complex parent, String parentType, String name, AdverseEvent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "AdverseEvent", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "AdverseEvent", "identifier", element.getIdentifier(), -1); - if (element.hasActualityElement()) - composeEnum(t, "AdverseEvent", "actuality", element.getActualityElement(), -1); - if (element.hasCategoryElement()) - composeEnum(t, "AdverseEvent", "category", element.getCategoryElement(), -1); - if (element.hasEvent()) - composeCodeableConcept(t, "AdverseEvent", "event", element.getEvent(), -1); - if (element.hasSubject()) - composeReference(t, "AdverseEvent", "subject", element.getSubject(), -1); - if (element.hasDateElement()) - composeDateTime(t, "AdverseEvent", "date", element.getDateElement(), -1); - for (int i = 0; i < element.getResultingCondition().size(); i++) - composeReference(t, "AdverseEvent", "resultingCondition", element.getResultingCondition().get(i), i); - if (element.hasLocation()) - composeReference(t, "AdverseEvent", "location", element.getLocation(), -1); - if (element.hasSeriousness()) - composeCodeableConcept(t, "AdverseEvent", "seriousness", element.getSeriousness(), -1); - if (element.hasSeverity()) - composeCodeableConcept(t, "AdverseEvent", "severity", element.getSeverity(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "AdverseEvent", "outcome", element.getOutcome(), -1); - if (element.hasRecorder()) - composeReference(t, "AdverseEvent", "recorder", element.getRecorder(), -1); - if (element.hasEventParticipant()) - composeReference(t, "AdverseEvent", "eventParticipant", element.getEventParticipant(), -1); - if (element.hasDescriptionElement()) - composeString(t, "AdverseEvent", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getSuspectEntity().size(); i++) - composeAdverseEventAdverseEventSuspectEntityComponent(t, "AdverseEvent", "suspectEntity", element.getSuspectEntity().get(i), i); - for (int i = 0; i < element.getSubjectMedicalHistory().size(); i++) - composeReference(t, "AdverseEvent", "subjectMedicalHistory", element.getSubjectMedicalHistory().get(i), i); - for (int i = 0; i < element.getReferenceDocument().size(); i++) - composeReference(t, "AdverseEvent", "referenceDocument", element.getReferenceDocument().get(i), i); - for (int i = 0; i < element.getStudy().size(); i++) - composeReference(t, "AdverseEvent", "study", element.getStudy().get(i), i); - } - - protected void composeAdverseEventAdverseEventSuspectEntityComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSuspectEntityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "suspectEntity", name, element, index); - if (element.hasInstance()) - composeReference(t, "AdverseEvent", "instance", element.getInstance(), -1); - for (int i = 0; i < element.getCausality().size(); i++) - composeAdverseEventAdverseEventSuspectEntityCausalityComponent(t, "AdverseEvent", "causality", element.getCausality().get(i), i); - } - - protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "causality", name, element, index); - if (element.hasAssessment()) - composeCodeableConcept(t, "AdverseEvent", "assessment", element.getAssessment(), -1); - if (element.hasProductRelatednessElement()) - composeString(t, "AdverseEvent", "productRelatedness", element.getProductRelatednessElement(), -1); - if (element.hasAuthor()) - composeReference(t, "AdverseEvent", "author", element.getAuthor(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "AdverseEvent", "method", element.getMethod(), -1); - } - - protected void composeAllergyIntolerance(Complex parent, String parentType, String name, AllergyIntolerance element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "AllergyIntolerance", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "AllergyIntolerance", "identifier", element.getIdentifier().get(i), i); - if (element.hasClinicalStatusElement()) - composeEnum(t, "AllergyIntolerance", "clinicalStatus", element.getClinicalStatusElement(), -1); - if (element.hasVerificationStatusElement()) - composeEnum(t, "AllergyIntolerance", "verificationStatus", element.getVerificationStatusElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "AllergyIntolerance", "type", element.getTypeElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeEnum(t, "AllergyIntolerance", "category", element.getCategory().get(i), i); - if (element.hasCriticalityElement()) - composeEnum(t, "AllergyIntolerance", "criticality", element.getCriticalityElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "AllergyIntolerance", "code", element.getCode(), -1); - if (element.hasPatient()) - composeReference(t, "AllergyIntolerance", "patient", element.getPatient(), -1); - if (element.hasOnset()) - composeType(t, "AllergyIntolerance", "onset", element.getOnset(), -1); - if (element.hasAssertedDateElement()) - composeDateTime(t, "AllergyIntolerance", "assertedDate", element.getAssertedDateElement(), -1); - if (element.hasRecorder()) - composeReference(t, "AllergyIntolerance", "recorder", element.getRecorder(), -1); - if (element.hasAsserter()) - composeReference(t, "AllergyIntolerance", "asserter", element.getAsserter(), -1); - if (element.hasLastOccurrenceElement()) - composeDateTime(t, "AllergyIntolerance", "lastOccurrence", element.getLastOccurrenceElement(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "AllergyIntolerance", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getReaction().size(); i++) - composeAllergyIntoleranceAllergyIntoleranceReactionComponent(t, "AllergyIntolerance", "reaction", element.getReaction().get(i), i); - } - - protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(Complex parent, String parentType, String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "reaction", name, element, index); - if (element.hasSubstance()) - composeCodeableConcept(t, "AllergyIntolerance", "substance", element.getSubstance(), -1); - for (int i = 0; i < element.getManifestation().size(); i++) - composeCodeableConcept(t, "AllergyIntolerance", "manifestation", element.getManifestation().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "AllergyIntolerance", "description", element.getDescriptionElement(), -1); - if (element.hasOnsetElement()) - composeDateTime(t, "AllergyIntolerance", "onset", element.getOnsetElement(), -1); - if (element.hasSeverityElement()) - composeEnum(t, "AllergyIntolerance", "severity", element.getSeverityElement(), -1); - if (element.hasExposureRoute()) - composeCodeableConcept(t, "AllergyIntolerance", "exposureRoute", element.getExposureRoute(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "AllergyIntolerance", "note", element.getNote().get(i), i); - } - - protected void composeAppointment(Complex parent, String parentType, String name, Appointment element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Appointment", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Appointment", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Appointment", "status", element.getStatusElement(), -1); - if (element.hasServiceCategory()) - composeCodeableConcept(t, "Appointment", "serviceCategory", element.getServiceCategory(), -1); - for (int i = 0; i < element.getServiceType().size(); i++) - composeCodeableConcept(t, "Appointment", "serviceType", element.getServiceType().get(i), i); - for (int i = 0; i < element.getSpecialty().size(); i++) - composeCodeableConcept(t, "Appointment", "specialty", element.getSpecialty().get(i), i); - if (element.hasAppointmentType()) - composeCodeableConcept(t, "Appointment", "appointmentType", element.getAppointmentType(), -1); - for (int i = 0; i < element.getReason().size(); i++) - composeCodeableConcept(t, "Appointment", "reason", element.getReason().get(i), i); - for (int i = 0; i < element.getIndication().size(); i++) - composeReference(t, "Appointment", "indication", element.getIndication().get(i), i); - if (element.hasPriorityElement()) - composeUnsignedInt(t, "Appointment", "priority", element.getPriorityElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Appointment", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getSupportingInformation().size(); i++) - composeReference(t, "Appointment", "supportingInformation", element.getSupportingInformation().get(i), i); - if (element.hasStartElement()) - composeInstant(t, "Appointment", "start", element.getStartElement(), -1); - if (element.hasEndElement()) - composeInstant(t, "Appointment", "end", element.getEndElement(), -1); - if (element.hasMinutesDurationElement()) - composePositiveInt(t, "Appointment", "minutesDuration", element.getMinutesDurationElement(), -1); - for (int i = 0; i < element.getSlot().size(); i++) - composeReference(t, "Appointment", "slot", element.getSlot().get(i), i); - if (element.hasCreatedElement()) - composeDateTime(t, "Appointment", "created", element.getCreatedElement(), -1); - if (element.hasCommentElement()) - composeString(t, "Appointment", "comment", element.getCommentElement(), -1); - for (int i = 0; i < element.getIncomingReferral().size(); i++) - composeReference(t, "Appointment", "incomingReferral", element.getIncomingReferral().get(i), i); - for (int i = 0; i < element.getParticipant().size(); i++) - composeAppointmentAppointmentParticipantComponent(t, "Appointment", "participant", element.getParticipant().get(i), i); - for (int i = 0; i < element.getRequestedPeriod().size(); i++) - composePeriod(t, "Appointment", "requestedPeriod", element.getRequestedPeriod().get(i), i); - } - - protected void composeAppointmentAppointmentParticipantComponent(Complex parent, String parentType, String name, Appointment.AppointmentParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "Appointment", "type", element.getType().get(i), i); - if (element.hasActor()) - composeReference(t, "Appointment", "actor", element.getActor(), -1); - if (element.hasRequiredElement()) - composeEnum(t, "Appointment", "required", element.getRequiredElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Appointment", "status", element.getStatusElement(), -1); - } - - protected void composeAppointmentResponse(Complex parent, String parentType, String name, AppointmentResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "AppointmentResponse", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "AppointmentResponse", "identifier", element.getIdentifier().get(i), i); - if (element.hasAppointment()) - composeReference(t, "AppointmentResponse", "appointment", element.getAppointment(), -1); - if (element.hasStartElement()) - composeInstant(t, "AppointmentResponse", "start", element.getStartElement(), -1); - if (element.hasEndElement()) - composeInstant(t, "AppointmentResponse", "end", element.getEndElement(), -1); - for (int i = 0; i < element.getParticipantType().size(); i++) - composeCodeableConcept(t, "AppointmentResponse", "participantType", element.getParticipantType().get(i), i); - if (element.hasActor()) - composeReference(t, "AppointmentResponse", "actor", element.getActor(), -1); - if (element.hasParticipantStatusElement()) - composeEnum(t, "AppointmentResponse", "participantStatus", element.getParticipantStatusElement(), -1); - if (element.hasCommentElement()) - composeString(t, "AppointmentResponse", "comment", element.getCommentElement(), -1); - } - - protected void composeAuditEvent(Complex parent, String parentType, String name, AuditEvent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "AuditEvent", name, element, index); - if (element.hasType()) - composeCoding(t, "AuditEvent", "type", element.getType(), -1); - for (int i = 0; i < element.getSubtype().size(); i++) - composeCoding(t, "AuditEvent", "subtype", element.getSubtype().get(i), i); - if (element.hasActionElement()) - composeEnum(t, "AuditEvent", "action", element.getActionElement(), -1); - if (element.hasRecordedElement()) - composeInstant(t, "AuditEvent", "recorded", element.getRecordedElement(), -1); - if (element.hasOutcomeElement()) - composeEnum(t, "AuditEvent", "outcome", element.getOutcomeElement(), -1); - if (element.hasOutcomeDescElement()) - composeString(t, "AuditEvent", "outcomeDesc", element.getOutcomeDescElement(), -1); - for (int i = 0; i < element.getPurposeOfEvent().size(); i++) - composeCodeableConcept(t, "AuditEvent", "purposeOfEvent", element.getPurposeOfEvent().get(i), i); - for (int i = 0; i < element.getAgent().size(); i++) - composeAuditEventAuditEventAgentComponent(t, "AuditEvent", "agent", element.getAgent().get(i), i); - if (element.hasSource()) - composeAuditEventAuditEventSourceComponent(t, "AuditEvent", "source", element.getSource(), -1); - for (int i = 0; i < element.getEntity().size(); i++) - composeAuditEventAuditEventEntityComponent(t, "AuditEvent", "entity", element.getEntity().get(i), i); - } - - protected void composeAuditEventAuditEventAgentComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "agent", name, element, index); - for (int i = 0; i < element.getRole().size(); i++) - composeCodeableConcept(t, "AuditEvent", "role", element.getRole().get(i), i); - if (element.hasReference()) - composeReference(t, "AuditEvent", "reference", element.getReference(), -1); - if (element.hasUserId()) - composeIdentifier(t, "AuditEvent", "userId", element.getUserId(), -1); - if (element.hasAltIdElement()) - composeString(t, "AuditEvent", "altId", element.getAltIdElement(), -1); - if (element.hasNameElement()) - composeString(t, "AuditEvent", "name", element.getNameElement(), -1); - if (element.hasRequestorElement()) - composeBoolean(t, "AuditEvent", "requestor", element.getRequestorElement(), -1); - if (element.hasLocation()) - composeReference(t, "AuditEvent", "location", element.getLocation(), -1); - for (int i = 0; i < element.getPolicy().size(); i++) - composeUri(t, "AuditEvent", "policy", element.getPolicy().get(i), i); - if (element.hasMedia()) - composeCoding(t, "AuditEvent", "media", element.getMedia(), -1); - if (element.hasNetwork()) - composeAuditEventAuditEventAgentNetworkComponent(t, "AuditEvent", "network", element.getNetwork(), -1); - for (int i = 0; i < element.getPurposeOfUse().size(); i++) - composeCodeableConcept(t, "AuditEvent", "purposeOfUse", element.getPurposeOfUse().get(i), i); - } - - protected void composeAuditEventAuditEventAgentNetworkComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentNetworkComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "network", name, element, index); - if (element.hasAddressElement()) - composeString(t, "AuditEvent", "address", element.getAddressElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "AuditEvent", "type", element.getTypeElement(), -1); - } - - protected void composeAuditEventAuditEventSourceComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventSourceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "source", name, element, index); - if (element.hasSiteElement()) - composeString(t, "AuditEvent", "site", element.getSiteElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "AuditEvent", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCoding(t, "AuditEvent", "type", element.getType().get(i), i); - } - - protected void composeAuditEventAuditEventEntityComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "entity", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "AuditEvent", "identifier", element.getIdentifier(), -1); - if (element.hasReference()) - composeReference(t, "AuditEvent", "reference", element.getReference(), -1); - if (element.hasType()) - composeCoding(t, "AuditEvent", "type", element.getType(), -1); - if (element.hasRole()) - composeCoding(t, "AuditEvent", "role", element.getRole(), -1); - if (element.hasLifecycle()) - composeCoding(t, "AuditEvent", "lifecycle", element.getLifecycle(), -1); - for (int i = 0; i < element.getSecurityLabel().size(); i++) - composeCoding(t, "AuditEvent", "securityLabel", element.getSecurityLabel().get(i), i); - if (element.hasNameElement()) - composeString(t, "AuditEvent", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "AuditEvent", "description", element.getDescriptionElement(), -1); - if (element.hasQueryElement()) - composeBase64Binary(t, "AuditEvent", "query", element.getQueryElement(), -1); - for (int i = 0; i < element.getDetail().size(); i++) - composeAuditEventAuditEventEntityDetailComponent(t, "AuditEvent", "detail", element.getDetail().get(i), i); - } - - protected void composeAuditEventAuditEventEntityDetailComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityDetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "detail", name, element, index); - if (element.hasTypeElement()) - composeString(t, "AuditEvent", "type", element.getTypeElement(), -1); - if (element.hasValueElement()) - composeBase64Binary(t, "AuditEvent", "value", element.getValueElement(), -1); - } - - protected void composeBasic(Complex parent, String parentType, String name, Basic element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Basic", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Basic", "identifier", element.getIdentifier().get(i), i); - if (element.hasCode()) - composeCodeableConcept(t, "Basic", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "Basic", "subject", element.getSubject(), -1); - if (element.hasCreatedElement()) - composeDate(t, "Basic", "created", element.getCreatedElement(), -1); - if (element.hasAuthor()) - composeReference(t, "Basic", "author", element.getAuthor(), -1); - } - - protected void composeBinary(Complex parent, String parentType, String name, Binary element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeResource(t, "Binary", name, element, index); - if (element.hasContentTypeElement()) - composeCode(t, "Binary", "contentType", element.getContentTypeElement(), -1); - if (element.hasSecurityContext()) - composeReference(t, "Binary", "securityContext", element.getSecurityContext(), -1); - if (element.hasContentElement()) - composeBase64Binary(t, "Binary", "content", element.getContentElement(), -1); - } - - protected void composeBodyStructure(Complex parent, String parentType, String name, BodyStructure element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "BodyStructure", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "BodyStructure", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "BodyStructure", "active", element.getActiveElement(), -1); - if (element.hasMorphology()) - composeCodeableConcept(t, "BodyStructure", "morphology", element.getMorphology(), -1); - if (element.hasLocation()) - composeCodeableConcept(t, "BodyStructure", "location", element.getLocation(), -1); - for (int i = 0; i < element.getLocationQualifier().size(); i++) - composeCodeableConcept(t, "BodyStructure", "locationQualifier", element.getLocationQualifier().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "BodyStructure", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getImage().size(); i++) - composeAttachment(t, "BodyStructure", "image", element.getImage().get(i), i); - if (element.hasPatient()) - composeReference(t, "BodyStructure", "patient", element.getPatient(), -1); - } - - protected void composeBundle(Complex parent, String parentType, String name, Bundle element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeResource(t, "Bundle", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Bundle", "identifier", element.getIdentifier(), -1); - if (element.hasTypeElement()) - composeEnum(t, "Bundle", "type", element.getTypeElement(), -1); - if (element.hasTotalElement()) - composeUnsignedInt(t, "Bundle", "total", element.getTotalElement(), -1); - for (int i = 0; i < element.getLink().size(); i++) - composeBundleBundleLinkComponent(t, "Bundle", "link", element.getLink().get(i), i); - for (int i = 0; i < element.getEntry().size(); i++) - composeBundleBundleEntryComponent(t, "Bundle", "entry", element.getEntry().get(i), i); - if (element.hasSignature()) - composeSignature(t, "Bundle", "signature", element.getSignature(), -1); - } - - protected void composeBundleBundleLinkComponent(Complex parent, String parentType, String name, Bundle.BundleLinkComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "link", name, element, index); - if (element.hasRelationElement()) - composeString(t, "Bundle", "relation", element.getRelationElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "Bundle", "url", element.getUrlElement(), -1); - } - - protected void composeBundleBundleEntryComponent(Complex parent, String parentType, String name, Bundle.BundleEntryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "entry", name, element, index); - for (int i = 0; i < element.getLink().size(); i++) - composeBundleBundleLinkComponent(t, "Bundle", "link", element.getLink().get(i), i); - if (element.hasFullUrlElement()) - composeUri(t, "Bundle", "fullUrl", element.getFullUrlElement(), -1); - if (element.hasResource()) - composeResource(t, "Bundle", "resource", element.getResource(), -1); - if (element.hasSearch()) - composeBundleBundleEntrySearchComponent(t, "Bundle", "search", element.getSearch(), -1); - if (element.hasRequest()) - composeBundleBundleEntryRequestComponent(t, "Bundle", "request", element.getRequest(), -1); - if (element.hasResponse()) - composeBundleBundleEntryResponseComponent(t, "Bundle", "response", element.getResponse(), -1); - } - - protected void composeBundleBundleEntrySearchComponent(Complex parent, String parentType, String name, Bundle.BundleEntrySearchComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "search", name, element, index); - if (element.hasModeElement()) - composeEnum(t, "Bundle", "mode", element.getModeElement(), -1); - if (element.hasScoreElement()) - composeDecimal(t, "Bundle", "score", element.getScoreElement(), -1); - } - - protected void composeBundleBundleEntryRequestComponent(Complex parent, String parentType, String name, Bundle.BundleEntryRequestComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "request", name, element, index); - if (element.hasMethodElement()) - composeEnum(t, "Bundle", "method", element.getMethodElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "Bundle", "url", element.getUrlElement(), -1); - if (element.hasIfNoneMatchElement()) - composeString(t, "Bundle", "ifNoneMatch", element.getIfNoneMatchElement(), -1); - if (element.hasIfModifiedSinceElement()) - composeInstant(t, "Bundle", "ifModifiedSince", element.getIfModifiedSinceElement(), -1); - if (element.hasIfMatchElement()) - composeString(t, "Bundle", "ifMatch", element.getIfMatchElement(), -1); - if (element.hasIfNoneExistElement()) - composeString(t, "Bundle", "ifNoneExist", element.getIfNoneExistElement(), -1); - } - - protected void composeBundleBundleEntryResponseComponent(Complex parent, String parentType, String name, Bundle.BundleEntryResponseComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "response", name, element, index); - if (element.hasStatusElement()) - composeString(t, "Bundle", "status", element.getStatusElement(), -1); - if (element.hasLocationElement()) - composeUri(t, "Bundle", "location", element.getLocationElement(), -1); - if (element.hasEtagElement()) - composeString(t, "Bundle", "etag", element.getEtagElement(), -1); - if (element.hasLastModifiedElement()) - composeInstant(t, "Bundle", "lastModified", element.getLastModifiedElement(), -1); - if (element.hasOutcome()) - composeResource(t, "Bundle", "outcome", element.getOutcome(), -1); - } - - protected void composeCapabilityStatement(Complex parent, String parentType, String name, CapabilityStatement element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "CapabilityStatement", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "CapabilityStatement", "url", element.getUrlElement(), -1); - if (element.hasVersionElement()) - composeString(t, "CapabilityStatement", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "CapabilityStatement", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "CapabilityStatement", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "CapabilityStatement", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "CapabilityStatement", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "CapabilityStatement", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "CapabilityStatement", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "CapabilityStatement", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "CapabilityStatement", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "CapabilityStatement", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "CapabilityStatement", "copyright", element.getCopyrightElement(), -1); - if (element.hasKindElement()) - composeEnum(t, "CapabilityStatement", "kind", element.getKindElement(), -1); - for (int i = 0; i < element.getInstantiates().size(); i++) - composeUri(t, "CapabilityStatement", "instantiates", element.getInstantiates().get(i), i); - if (element.hasSoftware()) - composeCapabilityStatementCapabilityStatementSoftwareComponent(t, "CapabilityStatement", "software", element.getSoftware(), -1); - if (element.hasImplementation()) - composeCapabilityStatementCapabilityStatementImplementationComponent(t, "CapabilityStatement", "implementation", element.getImplementation(), -1); - if (element.hasFhirVersionElement()) - composeId(t, "CapabilityStatement", "fhirVersion", element.getFhirVersionElement(), -1); - if (element.hasAcceptUnknownElement()) - composeEnum(t, "CapabilityStatement", "acceptUnknown", element.getAcceptUnknownElement(), -1); - for (int i = 0; i < element.getFormat().size(); i++) - composeCode(t, "CapabilityStatement", "format", element.getFormat().get(i), i); - for (int i = 0; i < element.getPatchFormat().size(); i++) - composeCode(t, "CapabilityStatement", "patchFormat", element.getPatchFormat().get(i), i); - for (int i = 0; i < element.getImplementationGuide().size(); i++) - composeUri(t, "CapabilityStatement", "implementationGuide", element.getImplementationGuide().get(i), i); - for (int i = 0; i < element.getProfile().size(); i++) - composeReference(t, "CapabilityStatement", "profile", element.getProfile().get(i), i); - for (int i = 0; i < element.getRest().size(); i++) - composeCapabilityStatementCapabilityStatementRestComponent(t, "CapabilityStatement", "rest", element.getRest().get(i), i); - for (int i = 0; i < element.getMessaging().size(); i++) - composeCapabilityStatementCapabilityStatementMessagingComponent(t, "CapabilityStatement", "messaging", element.getMessaging().get(i), i); - for (int i = 0; i < element.getDocument().size(); i++) - composeCapabilityStatementCapabilityStatementDocumentComponent(t, "CapabilityStatement", "document", element.getDocument().get(i), i); - } - - protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementSoftwareComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "software", name, element, index); - if (element.hasNameElement()) - composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); - if (element.hasVersionElement()) - composeString(t, "CapabilityStatement", "version", element.getVersionElement(), -1); - if (element.hasReleaseDateElement()) - composeDateTime(t, "CapabilityStatement", "releaseDate", element.getReleaseDateElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementImplementationComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementImplementationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "implementation", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "CapabilityStatement", "url", element.getUrlElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementRestComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rest", name, element, index); - if (element.hasModeElement()) - composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - if (element.hasSecurity()) - composeCapabilityStatementCapabilityStatementRestSecurityComponent(t, "CapabilityStatement", "security", element.getSecurity(), -1); - for (int i = 0; i < element.getResource().size(); i++) - composeCapabilityStatementCapabilityStatementRestResourceComponent(t, "CapabilityStatement", "resource", element.getResource().get(i), i); - for (int i = 0; i < element.getInteraction().size(); i++) - composeCapabilityStatementSystemInteractionComponent(t, "CapabilityStatement", "interaction", element.getInteraction().get(i), i); - for (int i = 0; i < element.getSearchParam().size(); i++) - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatement", "searchParam", element.getSearchParam().get(i), i); - for (int i = 0; i < element.getOperation().size(); i++) - composeCapabilityStatementCapabilityStatementRestOperationComponent(t, "CapabilityStatement", "operation", element.getOperation().get(i), i); - for (int i = 0; i < element.getCompartment().size(); i++) - composeUri(t, "CapabilityStatement", "compartment", element.getCompartment().get(i), i); - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "security", name, element, index); - if (element.hasCorsElement()) - composeBoolean(t, "CapabilityStatement", "cors", element.getCorsElement(), -1); - for (int i = 0; i < element.getService().size(); i++) - composeCodeableConcept(t, "CapabilityStatement", "service", element.getService().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getCertificate().size(); i++) - composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(t, "CapabilityStatement", "certificate", element.getCertificate().get(i), i); - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "certificate", name, element, index); - if (element.hasTypeElement()) - composeCode(t, "CapabilityStatement", "type", element.getTypeElement(), -1); - if (element.hasBlobElement()) - composeBase64Binary(t, "CapabilityStatement", "blob", element.getBlobElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "resource", name, element, index); - if (element.hasTypeElement()) - composeCode(t, "CapabilityStatement", "type", element.getTypeElement(), -1); - if (element.hasProfile()) - composeReference(t, "CapabilityStatement", "profile", element.getProfile(), -1); - if (element.hasDocumentationElement()) - composeMarkdown(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - for (int i = 0; i < element.getInteraction().size(); i++) - composeCapabilityStatementResourceInteractionComponent(t, "CapabilityStatement", "interaction", element.getInteraction().get(i), i); - if (element.hasVersioningElement()) - composeEnum(t, "CapabilityStatement", "versioning", element.getVersioningElement(), -1); - if (element.hasReadHistoryElement()) - composeBoolean(t, "CapabilityStatement", "readHistory", element.getReadHistoryElement(), -1); - if (element.hasUpdateCreateElement()) - composeBoolean(t, "CapabilityStatement", "updateCreate", element.getUpdateCreateElement(), -1); - if (element.hasConditionalCreateElement()) - composeBoolean(t, "CapabilityStatement", "conditionalCreate", element.getConditionalCreateElement(), -1); - if (element.hasConditionalReadElement()) - composeEnum(t, "CapabilityStatement", "conditionalRead", element.getConditionalReadElement(), -1); - if (element.hasConditionalUpdateElement()) - composeBoolean(t, "CapabilityStatement", "conditionalUpdate", element.getConditionalUpdateElement(), -1); - if (element.hasConditionalDeleteElement()) - composeEnum(t, "CapabilityStatement", "conditionalDelete", element.getConditionalDeleteElement(), -1); - for (int i = 0; i < element.getReferencePolicy().size(); i++) - composeEnum(t, "CapabilityStatement", "referencePolicy", element.getReferencePolicy().get(i), i); - for (int i = 0; i < element.getSearchInclude().size(); i++) - composeString(t, "CapabilityStatement", "searchInclude", element.getSearchInclude().get(i), i); - for (int i = 0; i < element.getSearchRevInclude().size(); i++) - composeString(t, "CapabilityStatement", "searchRevInclude", element.getSearchRevInclude().get(i), i); - for (int i = 0; i < element.getSearchParam().size(); i++) - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatement", "searchParam", element.getSearchParam().get(i), i); - } - - protected void composeCapabilityStatementResourceInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement.ResourceInteractionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "interaction", name, element, index); - if (element.hasCodeElement()) - composeEnum(t, "CapabilityStatement", "code", element.getCodeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "searchParam", name, element, index); - if (element.hasNameElement()) - composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); - if (element.hasDefinitionElement()) - composeUri(t, "CapabilityStatement", "definition", element.getDefinitionElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "CapabilityStatement", "type", element.getTypeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeCapabilityStatementSystemInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement.SystemInteractionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "interaction", name, element, index); - if (element.hasCodeElement()) - composeEnum(t, "CapabilityStatement", "code", element.getCodeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementRestOperationComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestOperationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "operation", name, element, index); - if (element.hasNameElement()) - composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); - if (element.hasDefinition()) - composeReference(t, "CapabilityStatement", "definition", element.getDefinition(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementMessagingComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "messaging", name, element, index); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(t, "CapabilityStatement", "endpoint", element.getEndpoint().get(i), i); - if (element.hasReliableCacheElement()) - composeUnsignedInt(t, "CapabilityStatement", "reliableCache", element.getReliableCacheElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - for (int i = 0; i < element.getSupportedMessage().size(); i++) - composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(t, "CapabilityStatement", "supportedMessage", element.getSupportedMessage().get(i), i); - for (int i = 0; i < element.getEvent().size(); i++) - composeCapabilityStatementCapabilityStatementMessagingEventComponent(t, "CapabilityStatement", "event", element.getEvent().get(i), i); - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "endpoint", name, element, index); - if (element.hasProtocol()) - composeCoding(t, "CapabilityStatement", "protocol", element.getProtocol(), -1); - if (element.hasAddressElement()) - composeUri(t, "CapabilityStatement", "address", element.getAddressElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "supportedMessage", name, element, index); - if (element.hasModeElement()) - composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); - if (element.hasDefinition()) - composeReference(t, "CapabilityStatement", "definition", element.getDefinition(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEventComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingEventComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "event", name, element, index); - if (element.hasCode()) - composeCoding(t, "CapabilityStatement", "code", element.getCode(), -1); - if (element.hasCategoryElement()) - composeEnum(t, "CapabilityStatement", "category", element.getCategoryElement(), -1); - if (element.hasModeElement()) - composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); - if (element.hasFocusElement()) - composeCode(t, "CapabilityStatement", "focus", element.getFocusElement(), -1); - if (element.hasRequest()) - composeReference(t, "CapabilityStatement", "request", element.getRequest(), -1); - if (element.hasResponse()) - composeReference(t, "CapabilityStatement", "response", element.getResponse(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeCapabilityStatementCapabilityStatementDocumentComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementDocumentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "document", name, element, index); - if (element.hasModeElement()) - composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); - if (element.hasProfile()) - composeReference(t, "CapabilityStatement", "profile", element.getProfile(), -1); - } - - protected void composeCarePlan(Complex parent, String parentType, String name, CarePlan element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "CarePlan", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "CarePlan", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "CarePlan", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "CarePlan", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getReplaces().size(); i++) - composeReference(t, "CarePlan", "replaces", element.getReplaces().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "CarePlan", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1); - if (element.hasIntentElement()) - composeEnum(t, "CarePlan", "intent", element.getIntentElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "CarePlan", "category", element.getCategory().get(i), i); - if (element.hasTitleElement()) - composeString(t, "CarePlan", "title", element.getTitleElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1); - if (element.hasSubject()) - composeReference(t, "CarePlan", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "CarePlan", "context", element.getContext(), -1); - if (element.hasPeriod()) - composePeriod(t, "CarePlan", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getAuthor().size(); i++) - composeReference(t, "CarePlan", "author", element.getAuthor().get(i), i); - for (int i = 0; i < element.getCareTeam().size(); i++) - composeReference(t, "CarePlan", "careTeam", element.getCareTeam().get(i), i); - for (int i = 0; i < element.getAddresses().size(); i++) - composeReference(t, "CarePlan", "addresses", element.getAddresses().get(i), i); - for (int i = 0; i < element.getSupportingInfo().size(); i++) - composeReference(t, "CarePlan", "supportingInfo", element.getSupportingInfo().get(i), i); - for (int i = 0; i < element.getGoal().size(); i++) - composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i); - for (int i = 0; i < element.getActivity().size(); i++) - composeCarePlanCarePlanActivityComponent(t, "CarePlan", "activity", element.getActivity().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "CarePlan", "note", element.getNote().get(i), i); - } - - protected void composeCarePlanCarePlanActivityComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "activity", name, element, index); - for (int i = 0; i < element.getOutcomeCodeableConcept().size(); i++) - composeCodeableConcept(t, "CarePlan", "outcomeCodeableConcept", element.getOutcomeCodeableConcept().get(i), i); - for (int i = 0; i < element.getOutcomeReference().size(); i++) - composeReference(t, "CarePlan", "outcomeReference", element.getOutcomeReference().get(i), i); - for (int i = 0; i < element.getProgress().size(); i++) - composeAnnotation(t, "CarePlan", "progress", element.getProgress().get(i), i); - if (element.hasReference()) - composeReference(t, "CarePlan", "reference", element.getReference(), -1); - if (element.hasDetail()) - composeCarePlanCarePlanActivityDetailComponent(t, "CarePlan", "detail", element.getDetail(), -1); - } - - protected void composeCarePlanCarePlanActivityDetailComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityDetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "detail", name, element, index); - if (element.hasCategory()) - composeCodeableConcept(t, "CarePlan", "category", element.getCategory(), -1); - if (element.hasDefinition()) - composeReference(t, "CarePlan", "definition", element.getDefinition(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "CarePlan", "code", element.getCode(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "CarePlan", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "CarePlan", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getGoal().size(); i++) - composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1); - if (element.hasStatusReasonElement()) - composeString(t, "CarePlan", "statusReason", element.getStatusReasonElement(), -1); - if (element.hasProhibitedElement()) - composeBoolean(t, "CarePlan", "prohibited", element.getProhibitedElement(), -1); - if (element.hasScheduled()) - composeType(t, "CarePlan", "scheduled", element.getScheduled(), -1); - if (element.hasLocation()) - composeReference(t, "CarePlan", "location", element.getLocation(), -1); - for (int i = 0; i < element.getPerformer().size(); i++) - composeReference(t, "CarePlan", "performer", element.getPerformer().get(i), i); - if (element.hasProduct()) - composeType(t, "CarePlan", "product", element.getProduct(), -1); - if (element.hasDailyAmount()) - composeQuantity(t, "CarePlan", "dailyAmount", element.getDailyAmount(), -1); - if (element.hasQuantity()) - composeQuantity(t, "CarePlan", "quantity", element.getQuantity(), -1); - if (element.hasDescriptionElement()) - composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1); - } - - protected void composeCareTeam(Complex parent, String parentType, String name, CareTeam element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "CareTeam", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "CareTeam", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "CareTeam", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "CareTeam", "category", element.getCategory().get(i), i); - if (element.hasNameElement()) - composeString(t, "CareTeam", "name", element.getNameElement(), -1); - if (element.hasSubject()) - composeReference(t, "CareTeam", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "CareTeam", "context", element.getContext(), -1); - if (element.hasPeriod()) - composePeriod(t, "CareTeam", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getParticipant().size(); i++) - composeCareTeamCareTeamParticipantComponent(t, "CareTeam", "participant", element.getParticipant().get(i), i); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "CareTeam", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "CareTeam", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getManagingOrganization().size(); i++) - composeReference(t, "CareTeam", "managingOrganization", element.getManagingOrganization().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "CareTeam", "telecom", element.getTelecom().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "CareTeam", "note", element.getNote().get(i), i); - } - - protected void composeCareTeamCareTeamParticipantComponent(Complex parent, String parentType, String name, CareTeam.CareTeamParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - if (element.hasRole()) - composeCodeableConcept(t, "CareTeam", "role", element.getRole(), -1); - if (element.hasMember()) - composeReference(t, "CareTeam", "member", element.getMember(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "CareTeam", "onBehalfOf", element.getOnBehalfOf(), -1); - if (element.hasPeriod()) - composePeriod(t, "CareTeam", "period", element.getPeriod(), -1); - } - - protected void composeChargeItem(Complex parent, String parentType, String name, ChargeItem element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ChargeItem", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "ChargeItem", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getDefinition().size(); i++) - composeUri(t, "ChargeItem", "definition", element.getDefinition().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ChargeItem", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "ChargeItem", "partOf", element.getPartOf().get(i), i); - if (element.hasCode()) - composeCodeableConcept(t, "ChargeItem", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "ChargeItem", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "ChargeItem", "context", element.getContext(), -1); - if (element.hasOccurrence()) - composeType(t, "ChargeItem", "occurrence", element.getOccurrence(), -1); - for (int i = 0; i < element.getParticipant().size(); i++) - composeChargeItemChargeItemParticipantComponent(t, "ChargeItem", "participant", element.getParticipant().get(i), i); - if (element.hasPerformingOrganization()) - composeReference(t, "ChargeItem", "performingOrganization", element.getPerformingOrganization(), -1); - if (element.hasRequestingOrganization()) - composeReference(t, "ChargeItem", "requestingOrganization", element.getRequestingOrganization(), -1); - if (element.hasQuantity()) - composeQuantity(t, "ChargeItem", "quantity", element.getQuantity(), -1); - for (int i = 0; i < element.getBodysite().size(); i++) - composeCodeableConcept(t, "ChargeItem", "bodysite", element.getBodysite().get(i), i); - if (element.hasFactorOverrideElement()) - composeDecimal(t, "ChargeItem", "factorOverride", element.getFactorOverrideElement(), -1); - if (element.hasPriceOverride()) - composeMoney(t, "ChargeItem", "priceOverride", element.getPriceOverride(), -1); - if (element.hasOverrideReasonElement()) - composeString(t, "ChargeItem", "overrideReason", element.getOverrideReasonElement(), -1); - if (element.hasEnterer()) - composeReference(t, "ChargeItem", "enterer", element.getEnterer(), -1); - if (element.hasEnteredDateElement()) - composeDateTime(t, "ChargeItem", "enteredDate", element.getEnteredDateElement(), -1); - for (int i = 0; i < element.getReason().size(); i++) - composeCodeableConcept(t, "ChargeItem", "reason", element.getReason().get(i), i); - for (int i = 0; i < element.getService().size(); i++) - composeReference(t, "ChargeItem", "service", element.getService().get(i), i); - for (int i = 0; i < element.getAccount().size(); i++) - composeReference(t, "ChargeItem", "account", element.getAccount().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "ChargeItem", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getSupportingInformation().size(); i++) - composeReference(t, "ChargeItem", "supportingInformation", element.getSupportingInformation().get(i), i); - } - - protected void composeChargeItemChargeItemParticipantComponent(Complex parent, String parentType, String name, ChargeItem.ChargeItemParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - if (element.hasRole()) - composeCodeableConcept(t, "ChargeItem", "role", element.getRole(), -1); - if (element.hasActor()) - composeReference(t, "ChargeItem", "actor", element.getActor(), -1); - } - - protected void composeClaim(Complex parent, String parentType, String name, Claim element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Claim", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Claim", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Claim", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Claim", "type", element.getType(), -1); - for (int i = 0; i < element.getSubType().size(); i++) - composeCodeableConcept(t, "Claim", "subType", element.getSubType().get(i), i); - if (element.hasUseElement()) - composeEnum(t, "Claim", "use", element.getUseElement(), -1); - if (element.hasPatient()) - composeReference(t, "Claim", "patient", element.getPatient(), -1); - if (element.hasBillablePeriod()) - composePeriod(t, "Claim", "billablePeriod", element.getBillablePeriod(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "Claim", "created", element.getCreatedElement(), -1); - if (element.hasEnterer()) - composeReference(t, "Claim", "enterer", element.getEnterer(), -1); - if (element.hasInsurer()) - composeReference(t, "Claim", "insurer", element.getInsurer(), -1); - if (element.hasProvider()) - composeReference(t, "Claim", "provider", element.getProvider(), -1); - if (element.hasOrganization()) - composeReference(t, "Claim", "organization", element.getOrganization(), -1); - if (element.hasPriority()) - composeCodeableConcept(t, "Claim", "priority", element.getPriority(), -1); - if (element.hasFundsReserve()) - composeCodeableConcept(t, "Claim", "fundsReserve", element.getFundsReserve(), -1); - for (int i = 0; i < element.getRelated().size(); i++) - composeClaimRelatedClaimComponent(t, "Claim", "related", element.getRelated().get(i), i); - if (element.hasPrescription()) - composeReference(t, "Claim", "prescription", element.getPrescription(), -1); - if (element.hasOriginalPrescription()) - composeReference(t, "Claim", "originalPrescription", element.getOriginalPrescription(), -1); - if (element.hasPayee()) - composeClaimPayeeComponent(t, "Claim", "payee", element.getPayee(), -1); - if (element.hasReferral()) - composeReference(t, "Claim", "referral", element.getReferral(), -1); - if (element.hasFacility()) - composeReference(t, "Claim", "facility", element.getFacility(), -1); - for (int i = 0; i < element.getCareTeam().size(); i++) - composeClaimCareTeamComponent(t, "Claim", "careTeam", element.getCareTeam().get(i), i); - for (int i = 0; i < element.getInformation().size(); i++) - composeClaimSpecialConditionComponent(t, "Claim", "information", element.getInformation().get(i), i); - for (int i = 0; i < element.getDiagnosis().size(); i++) - composeClaimDiagnosisComponent(t, "Claim", "diagnosis", element.getDiagnosis().get(i), i); - for (int i = 0; i < element.getProcedure().size(); i++) - composeClaimProcedureComponent(t, "Claim", "procedure", element.getProcedure().get(i), i); - for (int i = 0; i < element.getInsurance().size(); i++) - composeClaimInsuranceComponent(t, "Claim", "insurance", element.getInsurance().get(i), i); - if (element.hasAccident()) - composeClaimAccidentComponent(t, "Claim", "accident", element.getAccident(), -1); - if (element.hasEmploymentImpacted()) - composePeriod(t, "Claim", "employmentImpacted", element.getEmploymentImpacted(), -1); - if (element.hasHospitalization()) - composePeriod(t, "Claim", "hospitalization", element.getHospitalization(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeClaimItemComponent(t, "Claim", "item", element.getItem().get(i), i); - if (element.hasTotal()) - composeMoney(t, "Claim", "total", element.getTotal(), -1); - } - - protected void composeClaimRelatedClaimComponent(Complex parent, String parentType, String name, Claim.RelatedClaimComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "related", name, element, index); - if (element.hasClaim()) - composeReference(t, "Claim", "claim", element.getClaim(), -1); - if (element.hasRelationship()) - composeCodeableConcept(t, "Claim", "relationship", element.getRelationship(), -1); - if (element.hasReference()) - composeIdentifier(t, "Claim", "reference", element.getReference(), -1); - } - - protected void composeClaimPayeeComponent(Complex parent, String parentType, String name, Claim.PayeeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "payee", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "Claim", "type", element.getType(), -1); - if (element.hasResource()) - composeCoding(t, "Claim", "resource", element.getResource(), -1); - if (element.hasParty()) - composeReference(t, "Claim", "party", element.getParty(), -1); - } - - protected void composeClaimCareTeamComponent(Complex parent, String parentType, String name, Claim.CareTeamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "careTeam", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasProvider()) - composeReference(t, "Claim", "provider", element.getProvider(), -1); - if (element.hasResponsibleElement()) - composeBoolean(t, "Claim", "responsible", element.getResponsibleElement(), -1); - if (element.hasRole()) - composeCodeableConcept(t, "Claim", "role", element.getRole(), -1); - if (element.hasQualification()) - composeCodeableConcept(t, "Claim", "qualification", element.getQualification(), -1); - } - - protected void composeClaimSpecialConditionComponent(Complex parent, String parentType, String name, Claim.SpecialConditionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "information", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Claim", "code", element.getCode(), -1); - if (element.hasTiming()) - composeType(t, "Claim", "timing", element.getTiming(), -1); - if (element.hasValue()) - composeType(t, "Claim", "value", element.getValue(), -1); - if (element.hasReason()) - composeCodeableConcept(t, "Claim", "reason", element.getReason(), -1); - } - - protected void composeClaimDiagnosisComponent(Complex parent, String parentType, String name, Claim.DiagnosisComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "diagnosis", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasDiagnosis()) - composeType(t, "Claim", "diagnosis", element.getDiagnosis(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "Claim", "type", element.getType().get(i), i); - if (element.hasPackageCode()) - composeCodeableConcept(t, "Claim", "packageCode", element.getPackageCode(), -1); - } - - protected void composeClaimProcedureComponent(Complex parent, String parentType, String name, Claim.ProcedureComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "procedure", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "Claim", "date", element.getDateElement(), -1); - if (element.hasProcedure()) - composeType(t, "Claim", "procedure", element.getProcedure(), -1); - } - - protected void composeClaimInsuranceComponent(Complex parent, String parentType, String name, Claim.InsuranceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "insurance", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasFocalElement()) - composeBoolean(t, "Claim", "focal", element.getFocalElement(), -1); - if (element.hasCoverage()) - composeReference(t, "Claim", "coverage", element.getCoverage(), -1); - if (element.hasBusinessArrangementElement()) - composeString(t, "Claim", "businessArrangement", element.getBusinessArrangementElement(), -1); - for (int i = 0; i < element.getPreAuthRef().size(); i++) - composeString(t, "Claim", "preAuthRef", element.getPreAuthRef().get(i), i); - if (element.hasClaimResponse()) - composeReference(t, "Claim", "claimResponse", element.getClaimResponse(), -1); - } - - protected void composeClaimAccidentComponent(Complex parent, String parentType, String name, Claim.AccidentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "accident", name, element, index); - if (element.hasDateElement()) - composeDate(t, "Claim", "date", element.getDateElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Claim", "type", element.getType(), -1); - if (element.hasLocation()) - composeType(t, "Claim", "location", element.getLocation(), -1); - } - - protected void composeClaimItemComponent(Complex parent, String parentType, String name, Claim.ItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - for (int i = 0; i < element.getCareTeamLinkId().size(); i++) - composePositiveInt(t, "Claim", "careTeamLinkId", element.getCareTeamLinkId().get(i), i); - for (int i = 0; i < element.getDiagnosisLinkId().size(); i++) - composePositiveInt(t, "Claim", "diagnosisLinkId", element.getDiagnosisLinkId().get(i), i); - for (int i = 0; i < element.getProcedureLinkId().size(); i++) - composePositiveInt(t, "Claim", "procedureLinkId", element.getProcedureLinkId().get(i), i); - for (int i = 0; i < element.getInformationLinkId().size(); i++) - composePositiveInt(t, "Claim", "informationLinkId", element.getInformationLinkId().get(i), i); - if (element.hasRevenue()) - composeCodeableConcept(t, "Claim", "revenue", element.getRevenue(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); - if (element.hasService()) - composeCodeableConcept(t, "Claim", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "Claim", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getProgramCode().size(); i++) - composeCodeableConcept(t, "Claim", "programCode", element.getProgramCode().get(i), i); - if (element.hasServiced()) - composeType(t, "Claim", "serviced", element.getServiced(), -1); - if (element.hasLocation()) - composeType(t, "Claim", "location", element.getLocation(), -1); - if (element.hasQuantity()) - composeQuantity(t, "Claim", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "Claim", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "Claim", "factor", element.getFactorElement(), -1); - if (element.hasNet()) - composeMoney(t, "Claim", "net", element.getNet(), -1); - for (int i = 0; i < element.getUdi().size(); i++) - composeReference(t, "Claim", "udi", element.getUdi().get(i), i); - if (element.hasBodySite()) - composeCodeableConcept(t, "Claim", "bodySite", element.getBodySite(), -1); - for (int i = 0; i < element.getSubSite().size(); i++) - composeCodeableConcept(t, "Claim", "subSite", element.getSubSite().get(i), i); - for (int i = 0; i < element.getEncounter().size(); i++) - composeReference(t, "Claim", "encounter", element.getEncounter().get(i), i); - for (int i = 0; i < element.getDetail().size(); i++) - composeClaimDetailComponent(t, "Claim", "detail", element.getDetail().get(i), i); - } - - protected void composeClaimDetailComponent(Complex parent, String parentType, String name, Claim.DetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "detail", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasRevenue()) - composeCodeableConcept(t, "Claim", "revenue", element.getRevenue(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); - if (element.hasService()) - composeCodeableConcept(t, "Claim", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "Claim", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getProgramCode().size(); i++) - composeCodeableConcept(t, "Claim", "programCode", element.getProgramCode().get(i), i); - if (element.hasQuantity()) - composeQuantity(t, "Claim", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "Claim", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "Claim", "factor", element.getFactorElement(), -1); - if (element.hasNet()) - composeMoney(t, "Claim", "net", element.getNet(), -1); - for (int i = 0; i < element.getUdi().size(); i++) - composeReference(t, "Claim", "udi", element.getUdi().get(i), i); - for (int i = 0; i < element.getSubDetail().size(); i++) - composeClaimSubDetailComponent(t, "Claim", "subDetail", element.getSubDetail().get(i), i); - } - - protected void composeClaimSubDetailComponent(Complex parent, String parentType, String name, Claim.SubDetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "subDetail", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); - if (element.hasRevenue()) - composeCodeableConcept(t, "Claim", "revenue", element.getRevenue(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); - if (element.hasService()) - composeCodeableConcept(t, "Claim", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "Claim", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getProgramCode().size(); i++) - composeCodeableConcept(t, "Claim", "programCode", element.getProgramCode().get(i), i); - if (element.hasQuantity()) - composeQuantity(t, "Claim", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "Claim", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "Claim", "factor", element.getFactorElement(), -1); - if (element.hasNet()) - composeMoney(t, "Claim", "net", element.getNet(), -1); - for (int i = 0; i < element.getUdi().size(); i++) - composeReference(t, "Claim", "udi", element.getUdi().get(i), i); - } - - protected void composeClaimResponse(Complex parent, String parentType, String name, ClaimResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ClaimResponse", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ClaimResponse", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ClaimResponse", "status", element.getStatusElement(), -1); - if (element.hasPatient()) - composeReference(t, "ClaimResponse", "patient", element.getPatient(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "ClaimResponse", "created", element.getCreatedElement(), -1); - if (element.hasInsurer()) - composeReference(t, "ClaimResponse", "insurer", element.getInsurer(), -1); - if (element.hasRequestProvider()) - composeReference(t, "ClaimResponse", "requestProvider", element.getRequestProvider(), -1); - if (element.hasRequestOrganization()) - composeReference(t, "ClaimResponse", "requestOrganization", element.getRequestOrganization(), -1); - if (element.hasRequest()) - composeReference(t, "ClaimResponse", "request", element.getRequest(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "ClaimResponse", "outcome", element.getOutcome(), -1); - if (element.hasDispositionElement()) - composeString(t, "ClaimResponse", "disposition", element.getDispositionElement(), -1); - if (element.hasPayeeType()) - composeCodeableConcept(t, "ClaimResponse", "payeeType", element.getPayeeType(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeClaimResponseItemComponent(t, "ClaimResponse", "item", element.getItem().get(i), i); - for (int i = 0; i < element.getAddItem().size(); i++) - composeClaimResponseAddedItemComponent(t, "ClaimResponse", "addItem", element.getAddItem().get(i), i); - for (int i = 0; i < element.getError().size(); i++) - composeClaimResponseErrorComponent(t, "ClaimResponse", "error", element.getError().get(i), i); - if (element.hasTotalCost()) - composeMoney(t, "ClaimResponse", "totalCost", element.getTotalCost(), -1); - if (element.hasUnallocDeductable()) - composeMoney(t, "ClaimResponse", "unallocDeductable", element.getUnallocDeductable(), -1); - if (element.hasTotalBenefit()) - composeMoney(t, "ClaimResponse", "totalBenefit", element.getTotalBenefit(), -1); - if (element.hasPayment()) - composeClaimResponsePaymentComponent(t, "ClaimResponse", "payment", element.getPayment(), -1); - if (element.hasReserved()) - composeCoding(t, "ClaimResponse", "reserved", element.getReserved(), -1); - if (element.hasForm()) - composeCodeableConcept(t, "ClaimResponse", "form", element.getForm(), -1); - for (int i = 0; i < element.getProcessNote().size(); i++) - composeClaimResponseNoteComponent(t, "ClaimResponse", "processNote", element.getProcessNote().get(i), i); - for (int i = 0; i < element.getCommunicationRequest().size(); i++) - composeReference(t, "ClaimResponse", "communicationRequest", element.getCommunicationRequest().get(i), i); - for (int i = 0; i < element.getInsurance().size(); i++) - composeClaimResponseInsuranceComponent(t, "ClaimResponse", "insurance", element.getInsurance().get(i), i); - } - - protected void composeClaimResponseItemComponent(Complex parent, String parentType, String name, ClaimResponse.ItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasSequenceLinkIdElement()) - composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); - for (int i = 0; i < element.getDetail().size(); i++) - composeClaimResponseItemDetailComponent(t, "ClaimResponse", "detail", element.getDetail().get(i), i); - } - - protected void composeClaimResponseAdjudicationComponent(Complex parent, String parentType, String name, ClaimResponse.AdjudicationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "adjudication", name, element, index); - if (element.hasCategory()) - composeCodeableConcept(t, "ClaimResponse", "category", element.getCategory(), -1); - if (element.hasReason()) - composeCodeableConcept(t, "ClaimResponse", "reason", element.getReason(), -1); - if (element.hasAmount()) - composeMoney(t, "ClaimResponse", "amount", element.getAmount(), -1); - if (element.hasValueElement()) - composeDecimal(t, "ClaimResponse", "value", element.getValueElement(), -1); - } - - protected void composeClaimResponseItemDetailComponent(Complex parent, String parentType, String name, ClaimResponse.ItemDetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "detail", name, element, index); - if (element.hasSequenceLinkIdElement()) - composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); - for (int i = 0; i < element.getSubDetail().size(); i++) - composeClaimResponseSubDetailComponent(t, "ClaimResponse", "subDetail", element.getSubDetail().get(i), i); - } - - protected void composeClaimResponseSubDetailComponent(Complex parent, String parentType, String name, ClaimResponse.SubDetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "subDetail", name, element, index); - if (element.hasSequenceLinkIdElement()) - composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); - } - - protected void composeClaimResponseAddedItemComponent(Complex parent, String parentType, String name, ClaimResponse.AddedItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "addItem", name, element, index); - for (int i = 0; i < element.getSequenceLinkId().size(); i++) - composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkId().get(i), i); - for (int i = 0; i < element.getDetailSequenceLinkId().size(); i++) - composePositiveInt(t, "ClaimResponse", "detailSequenceLinkId", element.getDetailSequenceLinkId().get(i), i); - for (int i = 0; i < element.getSubdetailSequenceLinkId().size(); i++) - composePositiveInt(t, "ClaimResponse", "subdetailSequenceLinkId", element.getSubdetailSequenceLinkId().get(i), i); - if (element.hasService()) - composeCodeableConcept(t, "ClaimResponse", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "ClaimResponse", "modifier", element.getModifier().get(i), i); - if (element.hasFee()) - composeMoney(t, "ClaimResponse", "fee", element.getFee(), -1); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); - } - - protected void composeClaimResponseErrorComponent(Complex parent, String parentType, String name, ClaimResponse.ErrorComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "error", name, element, index); - if (element.hasSequenceLinkIdElement()) - composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); - if (element.hasDetailSequenceLinkIdElement()) - composePositiveInt(t, "ClaimResponse", "detailSequenceLinkId", element.getDetailSequenceLinkIdElement(), -1); - if (element.hasSubdetailSequenceLinkIdElement()) - composePositiveInt(t, "ClaimResponse", "subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "ClaimResponse", "code", element.getCode(), -1); - } - - protected void composeClaimResponsePaymentComponent(Complex parent, String parentType, String name, ClaimResponse.PaymentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "payment", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "ClaimResponse", "type", element.getType(), -1); - if (element.hasAdjustment()) - composeMoney(t, "ClaimResponse", "adjustment", element.getAdjustment(), -1); - if (element.hasAdjustmentReason()) - composeCodeableConcept(t, "ClaimResponse", "adjustmentReason", element.getAdjustmentReason(), -1); - if (element.hasDateElement()) - composeDate(t, "ClaimResponse", "date", element.getDateElement(), -1); - if (element.hasAmount()) - composeMoney(t, "ClaimResponse", "amount", element.getAmount(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "ClaimResponse", "identifier", element.getIdentifier(), -1); - } - - protected void composeClaimResponseNoteComponent(Complex parent, String parentType, String name, ClaimResponse.NoteComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "processNote", name, element, index); - if (element.hasNumberElement()) - composePositiveInt(t, "ClaimResponse", "number", element.getNumberElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "ClaimResponse", "type", element.getType(), -1); - if (element.hasTextElement()) - composeString(t, "ClaimResponse", "text", element.getTextElement(), -1); - if (element.hasLanguage()) - composeCodeableConcept(t, "ClaimResponse", "language", element.getLanguage(), -1); - } - - protected void composeClaimResponseInsuranceComponent(Complex parent, String parentType, String name, ClaimResponse.InsuranceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "insurance", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ClaimResponse", "sequence", element.getSequenceElement(), -1); - if (element.hasFocalElement()) - composeBoolean(t, "ClaimResponse", "focal", element.getFocalElement(), -1); - if (element.hasCoverage()) - composeReference(t, "ClaimResponse", "coverage", element.getCoverage(), -1); - if (element.hasBusinessArrangementElement()) - composeString(t, "ClaimResponse", "businessArrangement", element.getBusinessArrangementElement(), -1); - for (int i = 0; i < element.getPreAuthRef().size(); i++) - composeString(t, "ClaimResponse", "preAuthRef", element.getPreAuthRef().get(i), i); - if (element.hasClaimResponse()) - composeReference(t, "ClaimResponse", "claimResponse", element.getClaimResponse(), -1); - } - - protected void composeClinicalImpression(Complex parent, String parentType, String name, ClinicalImpression element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ClinicalImpression", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ClinicalImpression", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ClinicalImpression", "status", element.getStatusElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "ClinicalImpression", "code", element.getCode(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ClinicalImpression", "description", element.getDescriptionElement(), -1); - if (element.hasSubject()) - composeReference(t, "ClinicalImpression", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "ClinicalImpression", "context", element.getContext(), -1); - if (element.hasEffective()) - composeType(t, "ClinicalImpression", "effective", element.getEffective(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ClinicalImpression", "date", element.getDateElement(), -1); - if (element.hasAssessor()) - composeReference(t, "ClinicalImpression", "assessor", element.getAssessor(), -1); - if (element.hasPrevious()) - composeReference(t, "ClinicalImpression", "previous", element.getPrevious(), -1); - for (int i = 0; i < element.getProblem().size(); i++) - composeReference(t, "ClinicalImpression", "problem", element.getProblem().get(i), i); - for (int i = 0; i < element.getInvestigation().size(); i++) - composeClinicalImpressionClinicalImpressionInvestigationComponent(t, "ClinicalImpression", "investigation", element.getInvestigation().get(i), i); - for (int i = 0; i < element.getProtocol().size(); i++) - composeUri(t, "ClinicalImpression", "protocol", element.getProtocol().get(i), i); - if (element.hasSummaryElement()) - composeString(t, "ClinicalImpression", "summary", element.getSummaryElement(), -1); - for (int i = 0; i < element.getFinding().size(); i++) - composeClinicalImpressionClinicalImpressionFindingComponent(t, "ClinicalImpression", "finding", element.getFinding().get(i), i); - for (int i = 0; i < element.getPrognosisCodeableConcept().size(); i++) - composeCodeableConcept(t, "ClinicalImpression", "prognosisCodeableConcept", element.getPrognosisCodeableConcept().get(i), i); - for (int i = 0; i < element.getPrognosisReference().size(); i++) - composeReference(t, "ClinicalImpression", "prognosisReference", element.getPrognosisReference().get(i), i); - for (int i = 0; i < element.getAction().size(); i++) - composeReference(t, "ClinicalImpression", "action", element.getAction().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "ClinicalImpression", "note", element.getNote().get(i), i); - } - - protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(Complex parent, String parentType, String name, ClinicalImpression.ClinicalImpressionInvestigationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "investigation", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "ClinicalImpression", "code", element.getCode(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeReference(t, "ClinicalImpression", "item", element.getItem().get(i), i); - } - - protected void composeClinicalImpressionClinicalImpressionFindingComponent(Complex parent, String parentType, String name, ClinicalImpression.ClinicalImpressionFindingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "finding", name, element, index); - if (element.hasItem()) - composeType(t, "ClinicalImpression", "item", element.getItem(), -1); - if (element.hasBasisElement()) - composeString(t, "ClinicalImpression", "basis", element.getBasisElement(), -1); - } - - protected void composeCodeSystem(Complex parent, String parentType, String name, CodeSystem element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "CodeSystem", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "CodeSystem", "url", element.getUrlElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "CodeSystem", "identifier", element.getIdentifier(), -1); - if (element.hasVersionElement()) - composeString(t, "CodeSystem", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "CodeSystem", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "CodeSystem", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "CodeSystem", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "CodeSystem", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "CodeSystem", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "CodeSystem", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "CodeSystem", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "CodeSystem", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "CodeSystem", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "CodeSystem", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "CodeSystem", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "CodeSystem", "copyright", element.getCopyrightElement(), -1); - if (element.hasCaseSensitiveElement()) - composeBoolean(t, "CodeSystem", "caseSensitive", element.getCaseSensitiveElement(), -1); - if (element.hasValueSetElement()) - composeUri(t, "CodeSystem", "valueSet", element.getValueSetElement(), -1); - if (element.hasHierarchyMeaningElement()) - composeEnum(t, "CodeSystem", "hierarchyMeaning", element.getHierarchyMeaningElement(), -1); - if (element.hasCompositionalElement()) - composeBoolean(t, "CodeSystem", "compositional", element.getCompositionalElement(), -1); - if (element.hasVersionNeededElement()) - composeBoolean(t, "CodeSystem", "versionNeeded", element.getVersionNeededElement(), -1); - if (element.hasContentElement()) - composeEnum(t, "CodeSystem", "content", element.getContentElement(), -1); - if (element.hasCountElement()) - composeUnsignedInt(t, "CodeSystem", "count", element.getCountElement(), -1); - for (int i = 0; i < element.getFilter().size(); i++) - composeCodeSystemCodeSystemFilterComponent(t, "CodeSystem", "filter", element.getFilter().get(i), i); - for (int i = 0; i < element.getProperty().size(); i++) - composeCodeSystemPropertyComponent(t, "CodeSystem", "property", element.getProperty().get(i), i); - for (int i = 0; i < element.getConcept().size(); i++) - composeCodeSystemConceptDefinitionComponent(t, "CodeSystem", "concept", element.getConcept().get(i), i); - } - - protected void composeCodeSystemCodeSystemFilterComponent(Complex parent, String parentType, String name, CodeSystem.CodeSystemFilterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "filter", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "CodeSystem", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getOperator().size(); i++) - composeEnum(t, "CodeSystem", "operator", element.getOperator().get(i), i); - if (element.hasValueElement()) - composeString(t, "CodeSystem", "value", element.getValueElement(), -1); - } - - protected void composeCodeSystemPropertyComponent(Complex parent, String parentType, String name, CodeSystem.PropertyComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "property", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); - if (element.hasUriElement()) - composeUri(t, "CodeSystem", "uri", element.getUriElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "CodeSystem", "description", element.getDescriptionElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "CodeSystem", "type", element.getTypeElement(), -1); - } - - protected void composeCodeSystemConceptDefinitionComponent(Complex parent, String parentType, String name, CodeSystem.ConceptDefinitionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "concept", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "CodeSystem", "display", element.getDisplayElement(), -1); - if (element.hasDefinitionElement()) - composeString(t, "CodeSystem", "definition", element.getDefinitionElement(), -1); - for (int i = 0; i < element.getDesignation().size(); i++) - composeCodeSystemConceptDefinitionDesignationComponent(t, "CodeSystem", "designation", element.getDesignation().get(i), i); - for (int i = 0; i < element.getProperty().size(); i++) - composeCodeSystemConceptPropertyComponent(t, "CodeSystem", "property", element.getProperty().get(i), i); - for (int i = 0; i < element.getConcept().size(); i++) - composeCodeSystemConceptDefinitionComponent(t, "CodeSystem", "concept", element.getConcept().get(i), i); - } - - protected void composeCodeSystemConceptDefinitionDesignationComponent(Complex parent, String parentType, String name, CodeSystem.ConceptDefinitionDesignationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "designation", name, element, index); - if (element.hasLanguageElement()) - composeCode(t, "CodeSystem", "language", element.getLanguageElement(), -1); - if (element.hasUse()) - composeCoding(t, "CodeSystem", "use", element.getUse(), -1); - if (element.hasValueElement()) - composeString(t, "CodeSystem", "value", element.getValueElement(), -1); - } - - protected void composeCodeSystemConceptPropertyComponent(Complex parent, String parentType, String name, CodeSystem.ConceptPropertyComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "property", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); - if (element.hasValue()) - composeType(t, "CodeSystem", "value", element.getValue(), -1); - } - - protected void composeCommunication(Complex parent, String parentType, String name, Communication element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Communication", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Communication", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "Communication", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "Communication", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "Communication", "partOf", element.getPartOf().get(i), i); - for (int i = 0; i < element.getInResponseTo().size(); i++) - composeReference(t, "Communication", "inResponseTo", element.getInResponseTo().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Communication", "status", element.getStatusElement(), -1); - if (element.hasNotDoneElement()) - composeBoolean(t, "Communication", "notDone", element.getNotDoneElement(), -1); - if (element.hasNotDoneReason()) - composeCodeableConcept(t, "Communication", "notDoneReason", element.getNotDoneReason(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "Communication", "category", element.getCategory().get(i), i); - if (element.hasPriorityElement()) - composeEnum(t, "Communication", "priority", element.getPriorityElement(), -1); - for (int i = 0; i < element.getMedium().size(); i++) - composeCodeableConcept(t, "Communication", "medium", element.getMedium().get(i), i); - if (element.hasSubject()) - composeReference(t, "Communication", "subject", element.getSubject(), -1); - for (int i = 0; i < element.getRecipient().size(); i++) - composeReference(t, "Communication", "recipient", element.getRecipient().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeReference(t, "Communication", "topic", element.getTopic().get(i), i); - if (element.hasContext()) - composeReference(t, "Communication", "context", element.getContext(), -1); - if (element.hasSentElement()) - composeDateTime(t, "Communication", "sent", element.getSentElement(), -1); - if (element.hasReceivedElement()) - composeDateTime(t, "Communication", "received", element.getReceivedElement(), -1); - if (element.hasSender()) - composeReference(t, "Communication", "sender", element.getSender(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "Communication", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "Communication", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getPayload().size(); i++) - composeCommunicationCommunicationPayloadComponent(t, "Communication", "payload", element.getPayload().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Communication", "note", element.getNote().get(i), i); - } - - protected void composeCommunicationCommunicationPayloadComponent(Complex parent, String parentType, String name, Communication.CommunicationPayloadComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "payload", name, element, index); - if (element.hasContent()) - composeType(t, "Communication", "content", element.getContent(), -1); - } - - protected void composeCommunicationRequest(Complex parent, String parentType, String name, CommunicationRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "CommunicationRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "CommunicationRequest", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "CommunicationRequest", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getReplaces().size(); i++) - composeReference(t, "CommunicationRequest", "replaces", element.getReplaces().get(i), i); - if (element.hasGroupIdentifier()) - composeIdentifier(t, "CommunicationRequest", "groupIdentifier", element.getGroupIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "CommunicationRequest", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "CommunicationRequest", "category", element.getCategory().get(i), i); - if (element.hasPriorityElement()) - composeEnum(t, "CommunicationRequest", "priority", element.getPriorityElement(), -1); - for (int i = 0; i < element.getMedium().size(); i++) - composeCodeableConcept(t, "CommunicationRequest", "medium", element.getMedium().get(i), i); - if (element.hasSubject()) - composeReference(t, "CommunicationRequest", "subject", element.getSubject(), -1); - for (int i = 0; i < element.getRecipient().size(); i++) - composeReference(t, "CommunicationRequest", "recipient", element.getRecipient().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeReference(t, "CommunicationRequest", "topic", element.getTopic().get(i), i); - if (element.hasContext()) - composeReference(t, "CommunicationRequest", "context", element.getContext(), -1); - for (int i = 0; i < element.getPayload().size(); i++) - composeCommunicationRequestCommunicationRequestPayloadComponent(t, "CommunicationRequest", "payload", element.getPayload().get(i), i); - if (element.hasOccurrence()) - composeType(t, "CommunicationRequest", "occurrence", element.getOccurrence(), -1); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "CommunicationRequest", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasSender()) - composeReference(t, "CommunicationRequest", "sender", element.getSender(), -1); - if (element.hasRequester()) - composeCommunicationRequestCommunicationRequestRequesterComponent(t, "CommunicationRequest", "requester", element.getRequester(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "CommunicationRequest", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "CommunicationRequest", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "CommunicationRequest", "note", element.getNote().get(i), i); - } - - protected void composeCommunicationRequestCommunicationRequestPayloadComponent(Complex parent, String parentType, String name, CommunicationRequest.CommunicationRequestPayloadComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "payload", name, element, index); - if (element.hasContent()) - composeType(t, "CommunicationRequest", "content", element.getContent(), -1); - } - - protected void composeCommunicationRequestCommunicationRequestRequesterComponent(Complex parent, String parentType, String name, CommunicationRequest.CommunicationRequestRequesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requester", name, element, index); - if (element.hasAgent()) - composeReference(t, "CommunicationRequest", "agent", element.getAgent(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "CommunicationRequest", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeCompartmentDefinition(Complex parent, String parentType, String name, CompartmentDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "CompartmentDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "CompartmentDefinition", "url", element.getUrlElement(), -1); - if (element.hasNameElement()) - composeString(t, "CompartmentDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "CompartmentDefinition", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "CompartmentDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "CompartmentDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "CompartmentDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "CompartmentDefinition", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "CompartmentDefinition", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "CompartmentDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "CompartmentDefinition", "purpose", element.getPurposeElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "CompartmentDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "CompartmentDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasCodeElement()) - composeEnum(t, "CompartmentDefinition", "code", element.getCodeElement(), -1); - if (element.hasSearchElement()) - composeBoolean(t, "CompartmentDefinition", "search", element.getSearchElement(), -1); - for (int i = 0; i < element.getResource().size(); i++) - composeCompartmentDefinitionCompartmentDefinitionResourceComponent(t, "CompartmentDefinition", "resource", element.getResource().get(i), i); - } - - protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(Complex parent, String parentType, String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "resource", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "CompartmentDefinition", "code", element.getCodeElement(), -1); - for (int i = 0; i < element.getParam().size(); i++) - composeString(t, "CompartmentDefinition", "param", element.getParam().get(i), i); - if (element.hasDocumentationElement()) - composeString(t, "CompartmentDefinition", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeComposition(Complex parent, String parentType, String name, Composition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Composition", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Composition", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Composition", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Composition", "type", element.getType(), -1); - if (element.hasClass_()) - composeCodeableConcept(t, "Composition", "class", element.getClass_(), -1); - if (element.hasSubject()) - composeReference(t, "Composition", "subject", element.getSubject(), -1); - if (element.hasEncounter()) - composeReference(t, "Composition", "encounter", element.getEncounter(), -1); - if (element.hasDateElement()) - composeDateTime(t, "Composition", "date", element.getDateElement(), -1); - for (int i = 0; i < element.getAuthor().size(); i++) - composeReference(t, "Composition", "author", element.getAuthor().get(i), i); - if (element.hasTitleElement()) - composeString(t, "Composition", "title", element.getTitleElement(), -1); - if (element.hasConfidentialityElement()) - composeEnum(t, "Composition", "confidentiality", element.getConfidentialityElement(), -1); - for (int i = 0; i < element.getAttester().size(); i++) - composeCompositionCompositionAttesterComponent(t, "Composition", "attester", element.getAttester().get(i), i); - if (element.hasCustodian()) - composeReference(t, "Composition", "custodian", element.getCustodian(), -1); - for (int i = 0; i < element.getRelatesTo().size(); i++) - composeCompositionCompositionRelatesToComponent(t, "Composition", "relatesTo", element.getRelatesTo().get(i), i); - for (int i = 0; i < element.getEvent().size(); i++) - composeCompositionCompositionEventComponent(t, "Composition", "event", element.getEvent().get(i), i); - for (int i = 0; i < element.getSection().size(); i++) - composeCompositionSectionComponent(t, "Composition", "section", element.getSection().get(i), i); - } - - protected void composeCompositionCompositionAttesterComponent(Complex parent, String parentType, String name, Composition.CompositionAttesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "attester", name, element, index); - for (int i = 0; i < element.getMode().size(); i++) - composeEnum(t, "Composition", "mode", element.getMode().get(i), i); - if (element.hasTimeElement()) - composeDateTime(t, "Composition", "time", element.getTimeElement(), -1); - if (element.hasParty()) - composeReference(t, "Composition", "party", element.getParty(), -1); - } - - protected void composeCompositionCompositionRelatesToComponent(Complex parent, String parentType, String name, Composition.CompositionRelatesToComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "relatesTo", name, element, index); - if (element.hasCodeElement()) - composeEnum(t, "Composition", "code", element.getCodeElement(), -1); - if (element.hasTarget()) - composeType(t, "Composition", "target", element.getTarget(), -1); - } - - protected void composeCompositionCompositionEventComponent(Complex parent, String parentType, String name, Composition.CompositionEventComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "event", name, element, index); - for (int i = 0; i < element.getCode().size(); i++) - composeCodeableConcept(t, "Composition", "code", element.getCode().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "Composition", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getDetail().size(); i++) - composeReference(t, "Composition", "detail", element.getDetail().get(i), i); - } - - protected void composeCompositionSectionComponent(Complex parent, String parentType, String name, Composition.SectionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "section", name, element, index); - if (element.hasTitleElement()) - composeString(t, "Composition", "title", element.getTitleElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Composition", "code", element.getCode(), -1); - if (element.hasText()) - composeNarrative(t, "Composition", "text", element.getText(), -1); - if (element.hasModeElement()) - composeEnum(t, "Composition", "mode", element.getModeElement(), -1); - if (element.hasOrderedBy()) - composeCodeableConcept(t, "Composition", "orderedBy", element.getOrderedBy(), -1); - for (int i = 0; i < element.getEntry().size(); i++) - composeReference(t, "Composition", "entry", element.getEntry().get(i), i); - if (element.hasEmptyReason()) - composeCodeableConcept(t, "Composition", "emptyReason", element.getEmptyReason(), -1); - for (int i = 0; i < element.getSection().size(); i++) - composeCompositionSectionComponent(t, "Composition", "section", element.getSection().get(i), i); - } - - protected void composeConceptMap(Complex parent, String parentType, String name, ConceptMap element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ConceptMap", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "ConceptMap", "url", element.getUrlElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "ConceptMap", "identifier", element.getIdentifier(), -1); - if (element.hasVersionElement()) - composeString(t, "ConceptMap", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "ConceptMap", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "ConceptMap", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ConceptMap", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "ConceptMap", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ConceptMap", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "ConceptMap", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ConceptMap", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ConceptMap", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "ConceptMap", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ConceptMap", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "ConceptMap", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "ConceptMap", "copyright", element.getCopyrightElement(), -1); - if (element.hasSource()) - composeType(t, "ConceptMap", "source", element.getSource(), -1); - if (element.hasTarget()) - composeType(t, "ConceptMap", "target", element.getTarget(), -1); - for (int i = 0; i < element.getGroup().size(); i++) - composeConceptMapConceptMapGroupComponent(t, "ConceptMap", "group", element.getGroup().get(i), i); - } - - protected void composeConceptMapConceptMapGroupComponent(Complex parent, String parentType, String name, ConceptMap.ConceptMapGroupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "group", name, element, index); - if (element.hasSourceElement()) - composeUri(t, "ConceptMap", "source", element.getSourceElement(), -1); - if (element.hasSourceVersionElement()) - composeString(t, "ConceptMap", "sourceVersion", element.getSourceVersionElement(), -1); - if (element.hasTargetElement()) - composeUri(t, "ConceptMap", "target", element.getTargetElement(), -1); - if (element.hasTargetVersionElement()) - composeString(t, "ConceptMap", "targetVersion", element.getTargetVersionElement(), -1); - for (int i = 0; i < element.getElement().size(); i++) - composeConceptMapSourceElementComponent(t, "ConceptMap", "element", element.getElement().get(i), i); - if (element.hasUnmapped()) - composeConceptMapConceptMapGroupUnmappedComponent(t, "ConceptMap", "unmapped", element.getUnmapped(), -1); - } - - protected void composeConceptMapSourceElementComponent(Complex parent, String parentType, String name, ConceptMap.SourceElementComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "element", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); - for (int i = 0; i < element.getTarget().size(); i++) - composeConceptMapTargetElementComponent(t, "ConceptMap", "target", element.getTarget().get(i), i); - } - - protected void composeConceptMapTargetElementComponent(Complex parent, String parentType, String name, ConceptMap.TargetElementComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "target", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); - if (element.hasEquivalenceElement()) - composeEnum(t, "ConceptMap", "equivalence", element.getEquivalenceElement(), -1); - if (element.hasCommentElement()) - composeString(t, "ConceptMap", "comment", element.getCommentElement(), -1); - for (int i = 0; i < element.getDependsOn().size(); i++) - composeConceptMapOtherElementComponent(t, "ConceptMap", "dependsOn", element.getDependsOn().get(i), i); - for (int i = 0; i < element.getProduct().size(); i++) - composeConceptMapOtherElementComponent(t, "ConceptMap", "product", element.getProduct().get(i), i); - } - - protected void composeConceptMapOtherElementComponent(Complex parent, String parentType, String name, ConceptMap.OtherElementComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dependsOn", name, element, index); - if (element.hasPropertyElement()) - composeUri(t, "ConceptMap", "property", element.getPropertyElement(), -1); - if (element.hasSystemElement()) - composeUri(t, "ConceptMap", "system", element.getSystemElement(), -1); - if (element.hasCodeElement()) - composeString(t, "ConceptMap", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); - } - - protected void composeConceptMapConceptMapGroupUnmappedComponent(Complex parent, String parentType, String name, ConceptMap.ConceptMapGroupUnmappedComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "unmapped", name, element, index); - if (element.hasModeElement()) - composeEnum(t, "ConceptMap", "mode", element.getModeElement(), -1); - if (element.hasCodeElement()) - composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "ConceptMap", "url", element.getUrlElement(), -1); - } - - protected void composeCondition(Complex parent, String parentType, String name, Condition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Condition", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Condition", "identifier", element.getIdentifier().get(i), i); - if (element.hasClinicalStatusElement()) - composeEnum(t, "Condition", "clinicalStatus", element.getClinicalStatusElement(), -1); - if (element.hasVerificationStatusElement()) - composeEnum(t, "Condition", "verificationStatus", element.getVerificationStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "Condition", "category", element.getCategory().get(i), i); - if (element.hasSeverity()) - composeCodeableConcept(t, "Condition", "severity", element.getSeverity(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Condition", "code", element.getCode(), -1); - for (int i = 0; i < element.getBodySite().size(); i++) - composeCodeableConcept(t, "Condition", "bodySite", element.getBodySite().get(i), i); - if (element.hasSubject()) - composeReference(t, "Condition", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "Condition", "context", element.getContext(), -1); - if (element.hasOnset()) - composeType(t, "Condition", "onset", element.getOnset(), -1); - if (element.hasAbatement()) - composeType(t, "Condition", "abatement", element.getAbatement(), -1); - if (element.hasAssertedDateElement()) - composeDateTime(t, "Condition", "assertedDate", element.getAssertedDateElement(), -1); - if (element.hasAsserter()) - composeReference(t, "Condition", "asserter", element.getAsserter(), -1); - for (int i = 0; i < element.getStage().size(); i++) - composeConditionConditionStageComponent(t, "Condition", "stage", element.getStage().get(i), i); - for (int i = 0; i < element.getEvidence().size(); i++) - composeConditionConditionEvidenceComponent(t, "Condition", "evidence", element.getEvidence().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Condition", "note", element.getNote().get(i), i); - } - - protected void composeConditionConditionStageComponent(Complex parent, String parentType, String name, Condition.ConditionStageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "stage", name, element, index); - if (element.hasSummary()) - composeCodeableConcept(t, "Condition", "summary", element.getSummary(), -1); - for (int i = 0; i < element.getAssessment().size(); i++) - composeReference(t, "Condition", "assessment", element.getAssessment().get(i), i); - if (element.hasType()) - composeCodeableConcept(t, "Condition", "type", element.getType(), -1); - } - - protected void composeConditionConditionEvidenceComponent(Complex parent, String parentType, String name, Condition.ConditionEvidenceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "evidence", name, element, index); - for (int i = 0; i < element.getCode().size(); i++) - composeCodeableConcept(t, "Condition", "code", element.getCode().get(i), i); - for (int i = 0; i < element.getDetail().size(); i++) - composeReference(t, "Condition", "detail", element.getDetail().get(i), i); - } - - protected void composeConsent(Complex parent, String parentType, String name, Consent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Consent", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Consent", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Consent", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "Consent", "category", element.getCategory().get(i), i); - if (element.hasPatient()) - composeReference(t, "Consent", "patient", element.getPatient(), -1); - if (element.hasDateTimeElement()) - composeDateTime(t, "Consent", "dateTime", element.getDateTimeElement(), -1); - for (int i = 0; i < element.getConsentingParty().size(); i++) - composeReference(t, "Consent", "consentingParty", element.getConsentingParty().get(i), i); - for (int i = 0; i < element.getOrganization().size(); i++) - composeReference(t, "Consent", "organization", element.getOrganization().get(i), i); - if (element.hasSource()) - composeType(t, "Consent", "source", element.getSource(), -1); - for (int i = 0; i < element.getPolicy().size(); i++) - composeConsentConsentPolicyComponent(t, "Consent", "policy", element.getPolicy().get(i), i); - if (element.hasPolicyRuleElement()) - composeUri(t, "Consent", "policyRule", element.getPolicyRuleElement(), -1); - for (int i = 0; i < element.getVerification().size(); i++) - composeConsentConsentVerificationComponent(t, "Consent", "verification", element.getVerification().get(i), i); - for (int i = 0; i < element.getProvision().size(); i++) - composeConsentprovisionComponent(t, "Consent", "provision", element.getProvision().get(i), i); - } - - protected void composeConsentConsentPolicyComponent(Complex parent, String parentType, String name, Consent.ConsentPolicyComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "policy", name, element, index); - if (element.hasAuthorityElement()) - composeUri(t, "Consent", "authority", element.getAuthorityElement(), -1); - if (element.hasUriElement()) - composeUri(t, "Consent", "uri", element.getUriElement(), -1); - } - - protected void composeConsentConsentVerificationComponent(Complex parent, String parentType, String name, Consent.ConsentVerificationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "verification", name, element, index); - if (element.hasVerifiedElement()) - composeBoolean(t, "Consent", "verified", element.getVerifiedElement(), -1); - if (element.hasVerifiedWith()) - composeReference(t, "Consent", "verifiedWith", element.getVerifiedWith(), -1); - if (element.hasVerificationDateElement()) - composeDateTime(t, "Consent", "verificationDate", element.getVerificationDateElement(), -1); - } - - protected void composeConsentprovisionComponent(Complex parent, String parentType, String name, Consent.provisionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "provision", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Consent", "type", element.getTypeElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Consent", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getActor().size(); i++) - composeConsentprovisionActorComponent(t, "Consent", "actor", element.getActor().get(i), i); - for (int i = 0; i < element.getAction().size(); i++) - composeCodeableConcept(t, "Consent", "action", element.getAction().get(i), i); - for (int i = 0; i < element.getSecurityLabel().size(); i++) - composeCoding(t, "Consent", "securityLabel", element.getSecurityLabel().get(i), i); - for (int i = 0; i < element.getPurpose().size(); i++) - composeCoding(t, "Consent", "purpose", element.getPurpose().get(i), i); - for (int i = 0; i < element.getClass_().size(); i++) - composeCoding(t, "Consent", "class", element.getClass_().get(i), i); - for (int i = 0; i < element.getCode().size(); i++) - composeCoding(t, "Consent", "code", element.getCode().get(i), i); - if (element.hasDataPeriod()) - composePeriod(t, "Consent", "dataPeriod", element.getDataPeriod(), -1); - for (int i = 0; i < element.getData().size(); i++) - composeConsentprovisionDataComponent(t, "Consent", "data", element.getData().get(i), i); - for (int i = 0; i < element.getProvision().size(); i++) - composeConsentprovisionComponent(t, "Consent", "provision", element.getProvision().get(i), i); - } - - protected void composeConsentprovisionActorComponent(Complex parent, String parentType, String name, Consent.provisionActorComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "actor", name, element, index); - if (element.hasRole()) - composeCodeableConcept(t, "Consent", "role", element.getRole(), -1); - if (element.hasReference()) - composeReference(t, "Consent", "reference", element.getReference(), -1); - } - - protected void composeConsentprovisionDataComponent(Complex parent, String parentType, String name, Consent.provisionDataComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "data", name, element, index); - if (element.hasMeaningElement()) - composeEnum(t, "Consent", "meaning", element.getMeaningElement(), -1); - if (element.hasReference()) - composeReference(t, "Consent", "reference", element.getReference(), -1); - } - - protected void composeContract(Complex parent, String parentType, String name, Contract element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Contract", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Contract", "status", element.getStatusElement(), -1); - if (element.hasContentDerivative()) - composeCodeableConcept(t, "Contract", "contentDerivative", element.getContentDerivative(), -1); - if (element.hasIssuedElement()) - composeDateTime(t, "Contract", "issued", element.getIssuedElement(), -1); - if (element.hasApplies()) - composePeriod(t, "Contract", "applies", element.getApplies(), -1); - for (int i = 0; i < element.getSubject().size(); i++) - composeReference(t, "Contract", "subject", element.getSubject().get(i), i); - for (int i = 0; i < element.getAuthority().size(); i++) - composeReference(t, "Contract", "authority", element.getAuthority().get(i), i); - for (int i = 0; i < element.getDomain().size(); i++) - composeReference(t, "Contract", "domain", element.getDomain().get(i), i); - if (element.hasType()) - composeCodeableConcept(t, "Contract", "type", element.getType(), -1); - for (int i = 0; i < element.getSubType().size(); i++) - composeCodeableConcept(t, "Contract", "subType", element.getSubType().get(i), i); - for (int i = 0; i < element.getTerm().size(); i++) - composeContractTermComponent(t, "Contract", "term", element.getTerm().get(i), i); - for (int i = 0; i < element.getSigner().size(); i++) - composeContractSignatoryComponent(t, "Contract", "signer", element.getSigner().get(i), i); - for (int i = 0; i < element.getFriendly().size(); i++) - composeContractFriendlyLanguageComponent(t, "Contract", "friendly", element.getFriendly().get(i), i); - for (int i = 0; i < element.getLegal().size(); i++) - composeContractLegalLanguageComponent(t, "Contract", "legal", element.getLegal().get(i), i); - if (element.hasRule()) - composeContractComputableLanguageComponent(t, "Contract", "rule", element.getRule(), -1); - if (element.hasLegallyBinding()) - composeType(t, "Contract", "legallyBinding", element.getLegallyBinding(), -1); - } - - protected void composeContractTermComponent(Complex parent, String parentType, String name, Contract.TermComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "term", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1); - if (element.hasIssuedElement()) - composeDateTime(t, "Contract", "issued", element.getIssuedElement(), -1); - if (element.hasApplies()) - composePeriod(t, "Contract", "applies", element.getApplies(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Contract", "type", element.getType(), -1); - if (element.hasSubType()) - composeCodeableConcept(t, "Contract", "subType", element.getSubType(), -1); - if (element.hasOffer()) - composeContractContractOfferComponent(t, "Contract", "offer", element.getOffer(), -1); - for (int i = 0; i < element.getAsset().size(); i++) - composeContractContractAssetComponent(t, "Contract", "asset", element.getAsset().get(i), i); - for (int i = 0; i < element.getAgent().size(); i++) - composeContractAgentComponent(t, "Contract", "agent", element.getAgent().get(i), i); - for (int i = 0; i < element.getAction().size(); i++) - composeCodeableConcept(t, "Contract", "action", element.getAction().get(i), i); - for (int i = 0; i < element.getActionReason().size(); i++) - composeCodeableConcept(t, "Contract", "actionReason", element.getActionReason().get(i), i); - for (int i = 0; i < element.getGroup().size(); i++) - composeContractTermComponent(t, "Contract", "group", element.getGroup().get(i), i); - } - - protected void composeContractContractOfferComponent(Complex parent, String parentType, String name, Contract.ContractOfferComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "offer", name, element, index); - if (element.hasTopic()) - composeReference(t, "Contract", "topic", element.getTopic(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Contract", "type", element.getType(), -1); - if (element.hasDecision()) - composeCodeableConcept(t, "Contract", "decision", element.getDecision(), -1); - if (element.hasTextElement()) - composeString(t, "Contract", "text", element.getTextElement(), -1); - if (element.hasLinkIdElement()) - composeString(t, "Contract", "linkId", element.getLinkIdElement(), -1); - } - - protected void composeContractContractAssetComponent(Complex parent, String parentType, String name, Contract.ContractAssetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "asset", name, element, index); - if (element.hasClass_()) - composeCoding(t, "Contract", "class", element.getClass_(), -1); - if (element.hasCode()) - composeCoding(t, "Contract", "code", element.getCode(), -1); - if (element.hasPeriod()) - composePeriod(t, "Contract", "period", element.getPeriod(), -1); - if (element.hasDataPeriod()) - composePeriod(t, "Contract", "dataPeriod", element.getDataPeriod(), -1); - for (int i = 0; i < element.getData().size(); i++) - composeContractAssetDataComponent(t, "Contract", "data", element.getData().get(i), i); - for (int i = 0; i < element.getValuedItem().size(); i++) - composeContractValuedItemComponent(t, "Contract", "valuedItem", element.getValuedItem().get(i), i); - for (int i = 0; i < element.getSecurityLabel().size(); i++) - composeCoding(t, "Contract", "securityLabel", element.getSecurityLabel().get(i), i); - } - - protected void composeContractAssetDataComponent(Complex parent, String parentType, String name, Contract.AssetDataComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "data", name, element, index); - if (element.hasMeaningElement()) - composeEnum(t, "Contract", "meaning", element.getMeaningElement(), -1); - if (element.hasReference()) - composeReference(t, "Contract", "reference", element.getReference(), -1); - } - - protected void composeContractValuedItemComponent(Complex parent, String parentType, String name, Contract.ValuedItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "valuedItem", name, element, index); - if (element.hasEntity()) - composeType(t, "Contract", "entity", element.getEntity(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1); - if (element.hasEffectiveTimeElement()) - composeDateTime(t, "Contract", "effectiveTime", element.getEffectiveTimeElement(), -1); - if (element.hasQuantity()) - composeQuantity(t, "Contract", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "Contract", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "Contract", "factor", element.getFactorElement(), -1); - if (element.hasPointsElement()) - composeDecimal(t, "Contract", "points", element.getPointsElement(), -1); - if (element.hasNet()) - composeMoney(t, "Contract", "net", element.getNet(), -1); - } - - protected void composeContractAgentComponent(Complex parent, String parentType, String name, Contract.AgentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "agent", name, element, index); - if (element.hasActor()) - composeReference(t, "Contract", "actor", element.getActor(), -1); - for (int i = 0; i < element.getRole().size(); i++) - composeCodeableConcept(t, "Contract", "role", element.getRole().get(i), i); - } - - protected void composeContractSignatoryComponent(Complex parent, String parentType, String name, Contract.SignatoryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "signer", name, element, index); - if (element.hasType()) - composeCoding(t, "Contract", "type", element.getType(), -1); - if (element.hasParty()) - composeReference(t, "Contract", "party", element.getParty(), -1); - for (int i = 0; i < element.getSignature().size(); i++) - composeSignature(t, "Contract", "signature", element.getSignature().get(i), i); - } - - protected void composeContractFriendlyLanguageComponent(Complex parent, String parentType, String name, Contract.FriendlyLanguageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "friendly", name, element, index); - if (element.hasContent()) - composeType(t, "Contract", "content", element.getContent(), -1); - } - - protected void composeContractLegalLanguageComponent(Complex parent, String parentType, String name, Contract.LegalLanguageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "legal", name, element, index); - if (element.hasContent()) - composeType(t, "Contract", "content", element.getContent(), -1); - } - - protected void composeContractComputableLanguageComponent(Complex parent, String parentType, String name, Contract.ComputableLanguageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rule", name, element, index); - if (element.hasContent()) - composeType(t, "Contract", "content", element.getContent(), -1); - } - - protected void composeCoverage(Complex parent, String parentType, String name, Coverage element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Coverage", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Coverage", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Coverage", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Coverage", "type", element.getType(), -1); - if (element.hasPolicyHolder()) - composeReference(t, "Coverage", "policyHolder", element.getPolicyHolder(), -1); - if (element.hasSubscriber()) - composeReference(t, "Coverage", "subscriber", element.getSubscriber(), -1); - if (element.hasSubscriberIdElement()) - composeString(t, "Coverage", "subscriberId", element.getSubscriberIdElement(), -1); - if (element.hasBeneficiary()) - composeReference(t, "Coverage", "beneficiary", element.getBeneficiary(), -1); - if (element.hasRelationship()) - composeCodeableConcept(t, "Coverage", "relationship", element.getRelationship(), -1); - if (element.hasPeriod()) - composePeriod(t, "Coverage", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getPayor().size(); i++) - composeReference(t, "Coverage", "payor", element.getPayor().get(i), i); - if (element.hasGrouping()) - composeCoverageGroupComponent(t, "Coverage", "grouping", element.getGrouping(), -1); - if (element.hasDependentElement()) - composeString(t, "Coverage", "dependent", element.getDependentElement(), -1); - if (element.hasSequenceElement()) - composeString(t, "Coverage", "sequence", element.getSequenceElement(), -1); - if (element.hasOrderElement()) - composePositiveInt(t, "Coverage", "order", element.getOrderElement(), -1); - if (element.hasNetworkElement()) - composeString(t, "Coverage", "network", element.getNetworkElement(), -1); - for (int i = 0; i < element.getContract().size(); i++) - composeReference(t, "Coverage", "contract", element.getContract().get(i), i); - } - - protected void composeCoverageGroupComponent(Complex parent, String parentType, String name, Coverage.GroupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "grouping", name, element, index); - if (element.hasGroupElement()) - composeString(t, "Coverage", "group", element.getGroupElement(), -1); - if (element.hasGroupDisplayElement()) - composeString(t, "Coverage", "groupDisplay", element.getGroupDisplayElement(), -1); - if (element.hasSubGroupElement()) - composeString(t, "Coverage", "subGroup", element.getSubGroupElement(), -1); - if (element.hasSubGroupDisplayElement()) - composeString(t, "Coverage", "subGroupDisplay", element.getSubGroupDisplayElement(), -1); - if (element.hasPlanElement()) - composeString(t, "Coverage", "plan", element.getPlanElement(), -1); - if (element.hasPlanDisplayElement()) - composeString(t, "Coverage", "planDisplay", element.getPlanDisplayElement(), -1); - if (element.hasSubPlanElement()) - composeString(t, "Coverage", "subPlan", element.getSubPlanElement(), -1); - if (element.hasSubPlanDisplayElement()) - composeString(t, "Coverage", "subPlanDisplay", element.getSubPlanDisplayElement(), -1); - if (element.hasClass_Element()) - composeString(t, "Coverage", "class", element.getClass_Element(), -1); - if (element.hasClassDisplayElement()) - composeString(t, "Coverage", "classDisplay", element.getClassDisplayElement(), -1); - if (element.hasSubClassElement()) - composeString(t, "Coverage", "subClass", element.getSubClassElement(), -1); - if (element.hasSubClassDisplayElement()) - composeString(t, "Coverage", "subClassDisplay", element.getSubClassDisplayElement(), -1); - } - - protected void composeDetectedIssue(Complex parent, String parentType, String name, DetectedIssue element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DetectedIssue", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "DetectedIssue", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "DetectedIssue", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "DetectedIssue", "category", element.getCategory(), -1); - if (element.hasSeverityElement()) - composeEnum(t, "DetectedIssue", "severity", element.getSeverityElement(), -1); - if (element.hasPatient()) - composeReference(t, "DetectedIssue", "patient", element.getPatient(), -1); - if (element.hasDateElement()) - composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1); - if (element.hasAuthor()) - composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1); - for (int i = 0; i < element.getImplicated().size(); i++) - composeReference(t, "DetectedIssue", "implicated", element.getImplicated().get(i), i); - if (element.hasDetailElement()) - composeString(t, "DetectedIssue", "detail", element.getDetailElement(), -1); - if (element.hasReferenceElement()) - composeUri(t, "DetectedIssue", "reference", element.getReferenceElement(), -1); - for (int i = 0; i < element.getMitigation().size(); i++) - composeDetectedIssueDetectedIssueMitigationComponent(t, "DetectedIssue", "mitigation", element.getMitigation().get(i), i); - } - - protected void composeDetectedIssueDetectedIssueMitigationComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueMitigationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "mitigation", name, element, index); - if (element.hasAction()) - composeCodeableConcept(t, "DetectedIssue", "action", element.getAction(), -1); - if (element.hasDateElement()) - composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1); - if (element.hasAuthor()) - composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1); - } - - protected void composeDevice(Complex parent, String parentType, String name, Device element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Device", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Device", "identifier", element.getIdentifier().get(i), i); - if (element.hasUdi()) - composeDeviceDeviceUdiComponent(t, "Device", "udi", element.getUdi(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Device", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Device", "type", element.getType(), -1); - if (element.hasLotNumberElement()) - composeString(t, "Device", "lotNumber", element.getLotNumberElement(), -1); - if (element.hasManufacturerElement()) - composeString(t, "Device", "manufacturer", element.getManufacturerElement(), -1); - if (element.hasManufactureDateElement()) - composeDateTime(t, "Device", "manufactureDate", element.getManufactureDateElement(), -1); - if (element.hasExpirationDateElement()) - composeDateTime(t, "Device", "expirationDate", element.getExpirationDateElement(), -1); - if (element.hasModelElement()) - composeString(t, "Device", "model", element.getModelElement(), -1); - if (element.hasVersionElement()) - composeString(t, "Device", "version", element.getVersionElement(), -1); - if (element.hasPatient()) - composeReference(t, "Device", "patient", element.getPatient(), -1); - if (element.hasOwner()) - composeReference(t, "Device", "owner", element.getOwner(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactPoint(t, "Device", "contact", element.getContact().get(i), i); - if (element.hasLocation()) - composeReference(t, "Device", "location", element.getLocation(), -1); - if (element.hasUrlElement()) - composeUri(t, "Device", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Device", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getSafety().size(); i++) - composeCodeableConcept(t, "Device", "safety", element.getSafety().get(i), i); - } - - protected void composeDeviceDeviceUdiComponent(Complex parent, String parentType, String name, Device.DeviceUdiComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "udi", name, element, index); - if (element.hasDeviceIdentifierElement()) - composeString(t, "Device", "deviceIdentifier", element.getDeviceIdentifierElement(), -1); - if (element.hasNameElement()) - composeString(t, "Device", "name", element.getNameElement(), -1); - if (element.hasJurisdictionElement()) - composeUri(t, "Device", "jurisdiction", element.getJurisdictionElement(), -1); - if (element.hasCarrierHRFElement()) - composeString(t, "Device", "carrierHRF", element.getCarrierHRFElement(), -1); - if (element.hasCarrierAIDCElement()) - composeBase64Binary(t, "Device", "carrierAIDC", element.getCarrierAIDCElement(), -1); - if (element.hasIssuerElement()) - composeUri(t, "Device", "issuer", element.getIssuerElement(), -1); - if (element.hasEntryTypeElement()) - composeEnum(t, "Device", "entryType", element.getEntryTypeElement(), -1); - } - - protected void composeDeviceComponent(Complex parent, String parentType, String name, DeviceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DeviceComponent", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "DeviceComponent", "identifier", element.getIdentifier(), -1); - if (element.hasType()) - composeCodeableConcept(t, "DeviceComponent", "type", element.getType(), -1); - if (element.hasLastSystemChangeElement()) - composeInstant(t, "DeviceComponent", "lastSystemChange", element.getLastSystemChangeElement(), -1); - if (element.hasSource()) - composeReference(t, "DeviceComponent", "source", element.getSource(), -1); - if (element.hasParent()) - composeReference(t, "DeviceComponent", "parent", element.getParent(), -1); - for (int i = 0; i < element.getOperationalStatus().size(); i++) - composeCodeableConcept(t, "DeviceComponent", "operationalStatus", element.getOperationalStatus().get(i), i); - if (element.hasParameterGroup()) - composeCodeableConcept(t, "DeviceComponent", "parameterGroup", element.getParameterGroup(), -1); - if (element.hasMeasurementPrincipleElement()) - composeEnum(t, "DeviceComponent", "measurementPrinciple", element.getMeasurementPrincipleElement(), -1); - for (int i = 0; i < element.getProductionSpecification().size(); i++) - composeDeviceComponentDeviceComponentProductionSpecificationComponent(t, "DeviceComponent", "productionSpecification", element.getProductionSpecification().get(i), i); - if (element.hasLanguageCode()) - composeCodeableConcept(t, "DeviceComponent", "languageCode", element.getLanguageCode(), -1); - } - - protected void composeDeviceComponentDeviceComponentProductionSpecificationComponent(Complex parent, String parentType, String name, DeviceComponent.DeviceComponentProductionSpecificationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "productionSpecification", name, element, index); - if (element.hasSpecType()) - composeCodeableConcept(t, "DeviceComponent", "specType", element.getSpecType(), -1); - if (element.hasComponentId()) - composeIdentifier(t, "DeviceComponent", "componentId", element.getComponentId(), -1); - if (element.hasProductionSpecElement()) - composeString(t, "DeviceComponent", "productionSpec", element.getProductionSpecElement(), -1); - } - - protected void composeDeviceMetric(Complex parent, String parentType, String name, DeviceMetric element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DeviceMetric", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "DeviceMetric", "identifier", element.getIdentifier(), -1); - if (element.hasType()) - composeCodeableConcept(t, "DeviceMetric", "type", element.getType(), -1); - if (element.hasUnit()) - composeCodeableConcept(t, "DeviceMetric", "unit", element.getUnit(), -1); - if (element.hasSource()) - composeReference(t, "DeviceMetric", "source", element.getSource(), -1); - if (element.hasParent()) - composeReference(t, "DeviceMetric", "parent", element.getParent(), -1); - if (element.hasOperationalStatusElement()) - composeEnum(t, "DeviceMetric", "operationalStatus", element.getOperationalStatusElement(), -1); - if (element.hasColorElement()) - composeEnum(t, "DeviceMetric", "color", element.getColorElement(), -1); - if (element.hasCategoryElement()) - composeEnum(t, "DeviceMetric", "category", element.getCategoryElement(), -1); - if (element.hasMeasurementPeriod()) - composeTiming(t, "DeviceMetric", "measurementPeriod", element.getMeasurementPeriod(), -1); - for (int i = 0; i < element.getCalibration().size(); i++) - composeDeviceMetricDeviceMetricCalibrationComponent(t, "DeviceMetric", "calibration", element.getCalibration().get(i), i); - } - - protected void composeDeviceMetricDeviceMetricCalibrationComponent(Complex parent, String parentType, String name, DeviceMetric.DeviceMetricCalibrationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "calibration", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "DeviceMetric", "type", element.getTypeElement(), -1); - if (element.hasStateElement()) - composeEnum(t, "DeviceMetric", "state", element.getStateElement(), -1); - if (element.hasTimeElement()) - composeInstant(t, "DeviceMetric", "time", element.getTimeElement(), -1); - } - - protected void composeDeviceRequest(Complex parent, String parentType, String name, DeviceRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DeviceRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "DeviceRequest", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "DeviceRequest", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "DeviceRequest", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getPriorRequest().size(); i++) - composeReference(t, "DeviceRequest", "priorRequest", element.getPriorRequest().get(i), i); - if (element.hasGroupIdentifier()) - composeIdentifier(t, "DeviceRequest", "groupIdentifier", element.getGroupIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "DeviceRequest", "status", element.getStatusElement(), -1); - if (element.hasIntent()) - composeCodeableConcept(t, "DeviceRequest", "intent", element.getIntent(), -1); - if (element.hasPriorityElement()) - composeEnum(t, "DeviceRequest", "priority", element.getPriorityElement(), -1); - if (element.hasCode()) - composeType(t, "DeviceRequest", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "DeviceRequest", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "DeviceRequest", "context", element.getContext(), -1); - if (element.hasOccurrence()) - composeType(t, "DeviceRequest", "occurrence", element.getOccurrence(), -1); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "DeviceRequest", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasRequester()) - composeDeviceRequestDeviceRequestRequesterComponent(t, "DeviceRequest", "requester", element.getRequester(), -1); - if (element.hasPerformerType()) - composeCodeableConcept(t, "DeviceRequest", "performerType", element.getPerformerType(), -1); - if (element.hasPerformer()) - composeReference(t, "DeviceRequest", "performer", element.getPerformer(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "DeviceRequest", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "DeviceRequest", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getSupportingInfo().size(); i++) - composeReference(t, "DeviceRequest", "supportingInfo", element.getSupportingInfo().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "DeviceRequest", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getRelevantHistory().size(); i++) - composeReference(t, "DeviceRequest", "relevantHistory", element.getRelevantHistory().get(i), i); - } - - protected void composeDeviceRequestDeviceRequestRequesterComponent(Complex parent, String parentType, String name, DeviceRequest.DeviceRequestRequesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requester", name, element, index); - if (element.hasAgent()) - composeReference(t, "DeviceRequest", "agent", element.getAgent(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "DeviceRequest", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeDeviceUseStatement(Complex parent, String parentType, String name, DeviceUseStatement element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DeviceUseStatement", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "DeviceUseStatement", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "DeviceUseStatement", "status", element.getStatusElement(), -1); - if (element.hasSubject()) - composeReference(t, "DeviceUseStatement", "subject", element.getSubject(), -1); - if (element.hasWhenUsed()) - composePeriod(t, "DeviceUseStatement", "whenUsed", element.getWhenUsed(), -1); - if (element.hasTiming()) - composeType(t, "DeviceUseStatement", "timing", element.getTiming(), -1); - if (element.hasRecordedOnElement()) - composeDateTime(t, "DeviceUseStatement", "recordedOn", element.getRecordedOnElement(), -1); - if (element.hasSource()) - composeReference(t, "DeviceUseStatement", "source", element.getSource(), -1); - if (element.hasDevice()) - composeReference(t, "DeviceUseStatement", "device", element.getDevice(), -1); - for (int i = 0; i < element.getIndication().size(); i++) - composeCodeableConcept(t, "DeviceUseStatement", "indication", element.getIndication().get(i), i); - if (element.hasBodySite()) - composeCodeableConcept(t, "DeviceUseStatement", "bodySite", element.getBodySite(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "DeviceUseStatement", "note", element.getNote().get(i), i); - } - - protected void composeDiagnosticReport(Complex parent, String parentType, String name, DiagnosticReport element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DiagnosticReport", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "DiagnosticReport", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "DiagnosticReport", "basedOn", element.getBasedOn().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "DiagnosticReport", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "DiagnosticReport", "category", element.getCategory(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "DiagnosticReport", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "DiagnosticReport", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "DiagnosticReport", "context", element.getContext(), -1); - if (element.hasEffective()) - composeType(t, "DiagnosticReport", "effective", element.getEffective(), -1); - if (element.hasIssuedElement()) - composeInstant(t, "DiagnosticReport", "issued", element.getIssuedElement(), -1); - for (int i = 0; i < element.getPerformer().size(); i++) - composeReference(t, "DiagnosticReport", "performer", element.getPerformer().get(i), i); - for (int i = 0; i < element.getResultsInterpreter().size(); i++) - composeReference(t, "DiagnosticReport", "resultsInterpreter", element.getResultsInterpreter().get(i), i); - for (int i = 0; i < element.getSpecimen().size(); i++) - composeReference(t, "DiagnosticReport", "specimen", element.getSpecimen().get(i), i); - for (int i = 0; i < element.getResult().size(); i++) - composeReference(t, "DiagnosticReport", "result", element.getResult().get(i), i); - for (int i = 0; i < element.getImagingStudy().size(); i++) - composeReference(t, "DiagnosticReport", "imagingStudy", element.getImagingStudy().get(i), i); - for (int i = 0; i < element.getImage().size(); i++) - composeDiagnosticReportDiagnosticReportImageComponent(t, "DiagnosticReport", "image", element.getImage().get(i), i); - if (element.hasConclusionElement()) - composeString(t, "DiagnosticReport", "conclusion", element.getConclusionElement(), -1); - for (int i = 0; i < element.getCodedDiagnosis().size(); i++) - composeCodeableConcept(t, "DiagnosticReport", "codedDiagnosis", element.getCodedDiagnosis().get(i), i); - for (int i = 0; i < element.getPresentedForm().size(); i++) - composeAttachment(t, "DiagnosticReport", "presentedForm", element.getPresentedForm().get(i), i); - } - - protected void composeDiagnosticReportDiagnosticReportImageComponent(Complex parent, String parentType, String name, DiagnosticReport.DiagnosticReportImageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "image", name, element, index); - if (element.hasCommentElement()) - composeString(t, "DiagnosticReport", "comment", element.getCommentElement(), -1); - if (element.hasLink()) - composeReference(t, "DiagnosticReport", "link", element.getLink(), -1); - } - - protected void composeDocumentManifest(Complex parent, String parentType, String name, DocumentManifest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DocumentManifest", name, element, index); - if (element.hasMasterIdentifier()) - composeIdentifier(t, "DocumentManifest", "masterIdentifier", element.getMasterIdentifier(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "DocumentManifest", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "DocumentManifest", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "DocumentManifest", "type", element.getType(), -1); - if (element.hasSubject()) - composeReference(t, "DocumentManifest", "subject", element.getSubject(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "DocumentManifest", "created", element.getCreatedElement(), -1); - for (int i = 0; i < element.getAuthor().size(); i++) - composeReference(t, "DocumentManifest", "author", element.getAuthor().get(i), i); - for (int i = 0; i < element.getRecipient().size(); i++) - composeReference(t, "DocumentManifest", "recipient", element.getRecipient().get(i), i); - if (element.hasSourceElement()) - composeUri(t, "DocumentManifest", "source", element.getSourceElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "DocumentManifest", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getContent().size(); i++) - composeDocumentManifestDocumentManifestContentComponent(t, "DocumentManifest", "content", element.getContent().get(i), i); - for (int i = 0; i < element.getRelated().size(); i++) - composeDocumentManifestDocumentManifestRelatedComponent(t, "DocumentManifest", "related", element.getRelated().get(i), i); - } - - protected void composeDocumentManifestDocumentManifestContentComponent(Complex parent, String parentType, String name, DocumentManifest.DocumentManifestContentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "content", name, element, index); - if (element.hasP()) - composeType(t, "DocumentManifest", "p", element.getP(), -1); - } - - protected void composeDocumentManifestDocumentManifestRelatedComponent(Complex parent, String parentType, String name, DocumentManifest.DocumentManifestRelatedComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "related", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "DocumentManifest", "identifier", element.getIdentifier(), -1); - if (element.hasRef()) - composeReference(t, "DocumentManifest", "ref", element.getRef(), -1); - } - - protected void composeDocumentReference(Complex parent, String parentType, String name, DocumentReference element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "DocumentReference", name, element, index); - if (element.hasMasterIdentifier()) - composeIdentifier(t, "DocumentReference", "masterIdentifier", element.getMasterIdentifier(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "DocumentReference", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "DocumentReference", "status", element.getStatusElement(), -1); - if (element.hasDocStatusElement()) - composeEnum(t, "DocumentReference", "docStatus", element.getDocStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "DocumentReference", "type", element.getType(), -1); - if (element.hasClass_()) - composeCodeableConcept(t, "DocumentReference", "class", element.getClass_(), -1); - if (element.hasSubject()) - composeReference(t, "DocumentReference", "subject", element.getSubject(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "DocumentReference", "created", element.getCreatedElement(), -1); - if (element.hasIndexedElement()) - composeInstant(t, "DocumentReference", "indexed", element.getIndexedElement(), -1); - for (int i = 0; i < element.getAuthor().size(); i++) - composeReference(t, "DocumentReference", "author", element.getAuthor().get(i), i); - if (element.hasAuthenticator()) - composeReference(t, "DocumentReference", "authenticator", element.getAuthenticator(), -1); - if (element.hasCustodian()) - composeReference(t, "DocumentReference", "custodian", element.getCustodian(), -1); - for (int i = 0; i < element.getRelatesTo().size(); i++) - composeDocumentReferenceDocumentReferenceRelatesToComponent(t, "DocumentReference", "relatesTo", element.getRelatesTo().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "DocumentReference", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getSecurityLabel().size(); i++) - composeCodeableConcept(t, "DocumentReference", "securityLabel", element.getSecurityLabel().get(i), i); - for (int i = 0; i < element.getContent().size(); i++) - composeDocumentReferenceDocumentReferenceContentComponent(t, "DocumentReference", "content", element.getContent().get(i), i); - if (element.hasContext()) - composeDocumentReferenceDocumentReferenceContextComponent(t, "DocumentReference", "context", element.getContext(), -1); - } - - protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceRelatesToComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "relatesTo", name, element, index); - if (element.hasCodeElement()) - composeEnum(t, "DocumentReference", "code", element.getCodeElement(), -1); - if (element.hasTarget()) - composeReference(t, "DocumentReference", "target", element.getTarget(), -1); - } - - protected void composeDocumentReferenceDocumentReferenceContentComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceContentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "content", name, element, index); - if (element.hasAttachment()) - composeAttachment(t, "DocumentReference", "attachment", element.getAttachment(), -1); - if (element.hasFormat()) - composeCoding(t, "DocumentReference", "format", element.getFormat(), -1); - } - - protected void composeDocumentReferenceDocumentReferenceContextComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceContextComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "context", name, element, index); - if (element.hasEncounter()) - composeReference(t, "DocumentReference", "encounter", element.getEncounter(), -1); - for (int i = 0; i < element.getEvent().size(); i++) - composeCodeableConcept(t, "DocumentReference", "event", element.getEvent().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "DocumentReference", "period", element.getPeriod(), -1); - if (element.hasFacilityType()) - composeCodeableConcept(t, "DocumentReference", "facilityType", element.getFacilityType(), -1); - if (element.hasPracticeSetting()) - composeCodeableConcept(t, "DocumentReference", "practiceSetting", element.getPracticeSetting(), -1); - if (element.hasSourcePatientInfo()) - composeReference(t, "DocumentReference", "sourcePatientInfo", element.getSourcePatientInfo(), -1); - for (int i = 0; i < element.getRelated().size(); i++) - composeDocumentReferenceDocumentReferenceContextRelatedComponent(t, "DocumentReference", "related", element.getRelated().get(i), i); - } - - protected void composeDocumentReferenceDocumentReferenceContextRelatedComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceContextRelatedComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "related", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "DocumentReference", "identifier", element.getIdentifier(), -1); - if (element.hasRef()) - composeReference(t, "DocumentReference", "ref", element.getRef(), -1); - } - - protected void composeEligibilityRequest(Complex parent, String parentType, String name, EligibilityRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "EligibilityRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "EligibilityRequest", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "EligibilityRequest", "status", element.getStatusElement(), -1); - if (element.hasPriority()) - composeCodeableConcept(t, "EligibilityRequest", "priority", element.getPriority(), -1); - if (element.hasPatient()) - composeReference(t, "EligibilityRequest", "patient", element.getPatient(), -1); - if (element.hasServiced()) - composeType(t, "EligibilityRequest", "serviced", element.getServiced(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "EligibilityRequest", "created", element.getCreatedElement(), -1); - if (element.hasEnterer()) - composeReference(t, "EligibilityRequest", "enterer", element.getEnterer(), -1); - if (element.hasProvider()) - composeReference(t, "EligibilityRequest", "provider", element.getProvider(), -1); - if (element.hasOrganization()) - composeReference(t, "EligibilityRequest", "organization", element.getOrganization(), -1); - if (element.hasInsurer()) - composeReference(t, "EligibilityRequest", "insurer", element.getInsurer(), -1); - if (element.hasFacility()) - composeReference(t, "EligibilityRequest", "facility", element.getFacility(), -1); - if (element.hasCoverage()) - composeReference(t, "EligibilityRequest", "coverage", element.getCoverage(), -1); - if (element.hasBusinessArrangementElement()) - composeString(t, "EligibilityRequest", "businessArrangement", element.getBusinessArrangementElement(), -1); - if (element.hasBenefitCategory()) - composeCodeableConcept(t, "EligibilityRequest", "benefitCategory", element.getBenefitCategory(), -1); - if (element.hasBenefitSubCategory()) - composeCodeableConcept(t, "EligibilityRequest", "benefitSubCategory", element.getBenefitSubCategory(), -1); - } - - protected void composeEligibilityResponse(Complex parent, String parentType, String name, EligibilityResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "EligibilityResponse", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "EligibilityResponse", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "EligibilityResponse", "status", element.getStatusElement(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "EligibilityResponse", "created", element.getCreatedElement(), -1); - if (element.hasRequestProvider()) - composeReference(t, "EligibilityResponse", "requestProvider", element.getRequestProvider(), -1); - if (element.hasRequestOrganization()) - composeReference(t, "EligibilityResponse", "requestOrganization", element.getRequestOrganization(), -1); - if (element.hasRequest()) - composeReference(t, "EligibilityResponse", "request", element.getRequest(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "EligibilityResponse", "outcome", element.getOutcome(), -1); - if (element.hasDispositionElement()) - composeString(t, "EligibilityResponse", "disposition", element.getDispositionElement(), -1); - if (element.hasInsurer()) - composeReference(t, "EligibilityResponse", "insurer", element.getInsurer(), -1); - if (element.hasInforceElement()) - composeBoolean(t, "EligibilityResponse", "inforce", element.getInforceElement(), -1); - for (int i = 0; i < element.getInsurance().size(); i++) - composeEligibilityResponseInsuranceComponent(t, "EligibilityResponse", "insurance", element.getInsurance().get(i), i); - if (element.hasForm()) - composeCodeableConcept(t, "EligibilityResponse", "form", element.getForm(), -1); - for (int i = 0; i < element.getError().size(); i++) - composeEligibilityResponseErrorsComponent(t, "EligibilityResponse", "error", element.getError().get(i), i); - } - - protected void composeEligibilityResponseInsuranceComponent(Complex parent, String parentType, String name, EligibilityResponse.InsuranceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "insurance", name, element, index); - if (element.hasCoverage()) - composeReference(t, "EligibilityResponse", "coverage", element.getCoverage(), -1); - if (element.hasContract()) - composeReference(t, "EligibilityResponse", "contract", element.getContract(), -1); - for (int i = 0; i < element.getBenefitBalance().size(); i++) - composeEligibilityResponseBenefitsComponent(t, "EligibilityResponse", "benefitBalance", element.getBenefitBalance().get(i), i); - } - - protected void composeEligibilityResponseBenefitsComponent(Complex parent, String parentType, String name, EligibilityResponse.BenefitsComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "benefitBalance", name, element, index); - if (element.hasCategory()) - composeCodeableConcept(t, "EligibilityResponse", "category", element.getCategory(), -1); - if (element.hasSubCategory()) - composeCodeableConcept(t, "EligibilityResponse", "subCategory", element.getSubCategory(), -1); - if (element.hasExcludedElement()) - composeBoolean(t, "EligibilityResponse", "excluded", element.getExcludedElement(), -1); - if (element.hasNameElement()) - composeString(t, "EligibilityResponse", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "EligibilityResponse", "description", element.getDescriptionElement(), -1); - if (element.hasNetwork()) - composeCodeableConcept(t, "EligibilityResponse", "network", element.getNetwork(), -1); - if (element.hasUnit()) - composeCodeableConcept(t, "EligibilityResponse", "unit", element.getUnit(), -1); - if (element.hasTerm()) - composeCodeableConcept(t, "EligibilityResponse", "term", element.getTerm(), -1); - for (int i = 0; i < element.getFinancial().size(); i++) - composeEligibilityResponseBenefitComponent(t, "EligibilityResponse", "financial", element.getFinancial().get(i), i); - } - - protected void composeEligibilityResponseBenefitComponent(Complex parent, String parentType, String name, EligibilityResponse.BenefitComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "financial", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "EligibilityResponse", "type", element.getType(), -1); - if (element.hasAllowed()) - composeType(t, "EligibilityResponse", "allowed", element.getAllowed(), -1); - if (element.hasUsed()) - composeType(t, "EligibilityResponse", "used", element.getUsed(), -1); - } - - protected void composeEligibilityResponseErrorsComponent(Complex parent, String parentType, String name, EligibilityResponse.ErrorsComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "error", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "EligibilityResponse", "code", element.getCode(), -1); - } - - protected void composeEncounter(Complex parent, String parentType, String name, Encounter element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Encounter", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Encounter", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Encounter", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getStatusHistory().size(); i++) - composeEncounterStatusHistoryComponent(t, "Encounter", "statusHistory", element.getStatusHistory().get(i), i); - if (element.hasClass_()) - composeCoding(t, "Encounter", "class", element.getClass_(), -1); - for (int i = 0; i < element.getClassHistory().size(); i++) - composeEncounterClassHistoryComponent(t, "Encounter", "classHistory", element.getClassHistory().get(i), i); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "Encounter", "type", element.getType().get(i), i); - if (element.hasPriority()) - composeCodeableConcept(t, "Encounter", "priority", element.getPriority(), -1); - if (element.hasSubject()) - composeReference(t, "Encounter", "subject", element.getSubject(), -1); - for (int i = 0; i < element.getEpisodeOfCare().size(); i++) - composeReference(t, "Encounter", "episodeOfCare", element.getEpisodeOfCare().get(i), i); - for (int i = 0; i < element.getIncomingReferral().size(); i++) - composeReference(t, "Encounter", "incomingReferral", element.getIncomingReferral().get(i), i); - for (int i = 0; i < element.getParticipant().size(); i++) - composeEncounterEncounterParticipantComponent(t, "Encounter", "participant", element.getParticipant().get(i), i); - if (element.hasAppointment()) - composeReference(t, "Encounter", "appointment", element.getAppointment(), -1); - if (element.hasPeriod()) - composePeriod(t, "Encounter", "period", element.getPeriod(), -1); - if (element.hasLength()) - composeDuration(t, "Encounter", "length", element.getLength(), -1); - for (int i = 0; i < element.getReason().size(); i++) - composeCodeableConcept(t, "Encounter", "reason", element.getReason().get(i), i); - for (int i = 0; i < element.getDiagnosis().size(); i++) - composeEncounterDiagnosisComponent(t, "Encounter", "diagnosis", element.getDiagnosis().get(i), i); - for (int i = 0; i < element.getAccount().size(); i++) - composeReference(t, "Encounter", "account", element.getAccount().get(i), i); - if (element.hasHospitalization()) - composeEncounterEncounterHospitalizationComponent(t, "Encounter", "hospitalization", element.getHospitalization(), -1); - for (int i = 0; i < element.getLocation().size(); i++) - composeEncounterEncounterLocationComponent(t, "Encounter", "location", element.getLocation().get(i), i); - if (element.hasServiceProvider()) - composeReference(t, "Encounter", "serviceProvider", element.getServiceProvider(), -1); - if (element.hasPartOf()) - composeReference(t, "Encounter", "partOf", element.getPartOf(), -1); - } - - protected void composeEncounterStatusHistoryComponent(Complex parent, String parentType, String name, Encounter.StatusHistoryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "statusHistory", name, element, index); - if (element.hasStatusElement()) - composeEnum(t, "Encounter", "status", element.getStatusElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Encounter", "period", element.getPeriod(), -1); - } - - protected void composeEncounterClassHistoryComponent(Complex parent, String parentType, String name, Encounter.ClassHistoryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "classHistory", name, element, index); - if (element.hasClass_()) - composeCoding(t, "Encounter", "class", element.getClass_(), -1); - if (element.hasPeriod()) - composePeriod(t, "Encounter", "period", element.getPeriod(), -1); - } - - protected void composeEncounterEncounterParticipantComponent(Complex parent, String parentType, String name, Encounter.EncounterParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "Encounter", "type", element.getType().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "Encounter", "period", element.getPeriod(), -1); - if (element.hasIndividual()) - composeReference(t, "Encounter", "individual", element.getIndividual(), -1); - } - - protected void composeEncounterDiagnosisComponent(Complex parent, String parentType, String name, Encounter.DiagnosisComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "diagnosis", name, element, index); - if (element.hasCondition()) - composeReference(t, "Encounter", "condition", element.getCondition(), -1); - if (element.hasRole()) - composeCodeableConcept(t, "Encounter", "role", element.getRole(), -1); - if (element.hasRankElement()) - composePositiveInt(t, "Encounter", "rank", element.getRankElement(), -1); - } - - protected void composeEncounterEncounterHospitalizationComponent(Complex parent, String parentType, String name, Encounter.EncounterHospitalizationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "hospitalization", name, element, index); - if (element.hasPreAdmissionIdentifier()) - composeIdentifier(t, "Encounter", "preAdmissionIdentifier", element.getPreAdmissionIdentifier(), -1); - if (element.hasOrigin()) - composeReference(t, "Encounter", "origin", element.getOrigin(), -1); - if (element.hasAdmitSource()) - composeCodeableConcept(t, "Encounter", "admitSource", element.getAdmitSource(), -1); - if (element.hasReAdmission()) - composeCodeableConcept(t, "Encounter", "reAdmission", element.getReAdmission(), -1); - for (int i = 0; i < element.getDietPreference().size(); i++) - composeCodeableConcept(t, "Encounter", "dietPreference", element.getDietPreference().get(i), i); - for (int i = 0; i < element.getSpecialCourtesy().size(); i++) - composeCodeableConcept(t, "Encounter", "specialCourtesy", element.getSpecialCourtesy().get(i), i); - for (int i = 0; i < element.getSpecialArrangement().size(); i++) - composeCodeableConcept(t, "Encounter", "specialArrangement", element.getSpecialArrangement().get(i), i); - if (element.hasDestination()) - composeReference(t, "Encounter", "destination", element.getDestination(), -1); - if (element.hasDischargeDisposition()) - composeCodeableConcept(t, "Encounter", "dischargeDisposition", element.getDischargeDisposition(), -1); - } - - protected void composeEncounterEncounterLocationComponent(Complex parent, String parentType, String name, Encounter.EncounterLocationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "location", name, element, index); - if (element.hasLocation()) - composeReference(t, "Encounter", "location", element.getLocation(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Encounter", "status", element.getStatusElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Encounter", "period", element.getPeriod(), -1); - } - - protected void composeEndpoint(Complex parent, String parentType, String name, Endpoint element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Endpoint", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Endpoint", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Endpoint", "status", element.getStatusElement(), -1); - if (element.hasConnectionType()) - composeCoding(t, "Endpoint", "connectionType", element.getConnectionType(), -1); - if (element.hasNameElement()) - composeString(t, "Endpoint", "name", element.getNameElement(), -1); - if (element.hasManagingOrganization()) - composeReference(t, "Endpoint", "managingOrganization", element.getManagingOrganization(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactPoint(t, "Endpoint", "contact", element.getContact().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "Endpoint", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getPayloadType().size(); i++) - composeCodeableConcept(t, "Endpoint", "payloadType", element.getPayloadType().get(i), i); - for (int i = 0; i < element.getPayloadMimeType().size(); i++) - composeCode(t, "Endpoint", "payloadMimeType", element.getPayloadMimeType().get(i), i); - if (element.hasAddressElement()) - composeUri(t, "Endpoint", "address", element.getAddressElement(), -1); - for (int i = 0; i < element.getHeader().size(); i++) - composeString(t, "Endpoint", "header", element.getHeader().get(i), i); - } - - protected void composeEnrollmentRequest(Complex parent, String parentType, String name, EnrollmentRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "EnrollmentRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "EnrollmentRequest", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "EnrollmentRequest", "status", element.getStatusElement(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "EnrollmentRequest", "created", element.getCreatedElement(), -1); - if (element.hasInsurer()) - composeReference(t, "EnrollmentRequest", "insurer", element.getInsurer(), -1); - if (element.hasProvider()) - composeReference(t, "EnrollmentRequest", "provider", element.getProvider(), -1); - if (element.hasOrganization()) - composeReference(t, "EnrollmentRequest", "organization", element.getOrganization(), -1); - if (element.hasCandidate()) - composeReference(t, "EnrollmentRequest", "candidate", element.getCandidate(), -1); - if (element.hasCoverage()) - composeReference(t, "EnrollmentRequest", "coverage", element.getCoverage(), -1); - } - - protected void composeEnrollmentResponse(Complex parent, String parentType, String name, EnrollmentResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "EnrollmentResponse", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "EnrollmentResponse", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "EnrollmentResponse", "status", element.getStatusElement(), -1); - if (element.hasRequest()) - composeReference(t, "EnrollmentResponse", "request", element.getRequest(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "EnrollmentResponse", "outcome", element.getOutcome(), -1); - if (element.hasDispositionElement()) - composeString(t, "EnrollmentResponse", "disposition", element.getDispositionElement(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "EnrollmentResponse", "created", element.getCreatedElement(), -1); - if (element.hasOrganization()) - composeReference(t, "EnrollmentResponse", "organization", element.getOrganization(), -1); - if (element.hasRequestProvider()) - composeReference(t, "EnrollmentResponse", "requestProvider", element.getRequestProvider(), -1); - if (element.hasRequestOrganization()) - composeReference(t, "EnrollmentResponse", "requestOrganization", element.getRequestOrganization(), -1); - } - - protected void composeEpisodeOfCare(Complex parent, String parentType, String name, EpisodeOfCare element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "EpisodeOfCare", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "EpisodeOfCare", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "EpisodeOfCare", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getStatusHistory().size(); i++) - composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(t, "EpisodeOfCare", "statusHistory", element.getStatusHistory().get(i), i); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "EpisodeOfCare", "type", element.getType().get(i), i); - for (int i = 0; i < element.getDiagnosis().size(); i++) - composeEpisodeOfCareDiagnosisComponent(t, "EpisodeOfCare", "diagnosis", element.getDiagnosis().get(i), i); - if (element.hasPatient()) - composeReference(t, "EpisodeOfCare", "patient", element.getPatient(), -1); - if (element.hasManagingOrganization()) - composeReference(t, "EpisodeOfCare", "managingOrganization", element.getManagingOrganization(), -1); - if (element.hasPeriod()) - composePeriod(t, "EpisodeOfCare", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getReferralRequest().size(); i++) - composeReference(t, "EpisodeOfCare", "referralRequest", element.getReferralRequest().get(i), i); - if (element.hasCareManager()) - composeReference(t, "EpisodeOfCare", "careManager", element.getCareManager(), -1); - for (int i = 0; i < element.getTeam().size(); i++) - composeReference(t, "EpisodeOfCare", "team", element.getTeam().get(i), i); - for (int i = 0; i < element.getAccount().size(); i++) - composeReference(t, "EpisodeOfCare", "account", element.getAccount().get(i), i); - } - - protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(Complex parent, String parentType, String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "statusHistory", name, element, index); - if (element.hasStatusElement()) - composeEnum(t, "EpisodeOfCare", "status", element.getStatusElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "EpisodeOfCare", "period", element.getPeriod(), -1); - } - - protected void composeEpisodeOfCareDiagnosisComponent(Complex parent, String parentType, String name, EpisodeOfCare.DiagnosisComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "diagnosis", name, element, index); - if (element.hasCondition()) - composeReference(t, "EpisodeOfCare", "condition", element.getCondition(), -1); - if (element.hasRole()) - composeCodeableConcept(t, "EpisodeOfCare", "role", element.getRole(), -1); - if (element.hasRankElement()) - composePositiveInt(t, "EpisodeOfCare", "rank", element.getRankElement(), -1); - } - - protected void composeEventDefinition(Complex parent, String parentType, String name, EventDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "EventDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "EventDefinition", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "EventDefinition", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "EventDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "EventDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "EventDefinition", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "EventDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "EventDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "EventDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "EventDefinition", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "EventDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "EventDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasUsageElement()) - composeString(t, "EventDefinition", "usage", element.getUsageElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "EventDefinition", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "EventDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "EventDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "EventDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "EventDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeCodeableConcept(t, "EventDefinition", "topic", element.getTopic().get(i), i); - for (int i = 0; i < element.getContributor().size(); i++) - composeContributor(t, "EventDefinition", "contributor", element.getContributor().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "EventDefinition", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "EventDefinition", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "EventDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); - } - - protected void composeExpansionProfile(Complex parent, String parentType, String name, ExpansionProfile element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ExpansionProfile", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "ExpansionProfile", "url", element.getUrlElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "ExpansionProfile", "identifier", element.getIdentifier(), -1); - if (element.hasVersionElement()) - composeString(t, "ExpansionProfile", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "ExpansionProfile", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ExpansionProfile", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "ExpansionProfile", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ExpansionProfile", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "ExpansionProfile", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ExpansionProfile", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ExpansionProfile", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "ExpansionProfile", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ExpansionProfile", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getFixedVersion().size(); i++) - composeExpansionProfileExpansionProfileFixedVersionComponent(t, "ExpansionProfile", "fixedVersion", element.getFixedVersion().get(i), i); - if (element.hasExcludedSystem()) - composeExpansionProfileExpansionProfileExcludedSystemComponent(t, "ExpansionProfile", "excludedSystem", element.getExcludedSystem(), -1); - if (element.hasIncludeDesignationsElement()) - composeBoolean(t, "ExpansionProfile", "includeDesignations", element.getIncludeDesignationsElement(), -1); - if (element.hasDesignation()) - composeExpansionProfileExpansionProfileDesignationComponent(t, "ExpansionProfile", "designation", element.getDesignation(), -1); - if (element.hasIncludeDefinitionElement()) - composeBoolean(t, "ExpansionProfile", "includeDefinition", element.getIncludeDefinitionElement(), -1); - if (element.hasActiveOnlyElement()) - composeBoolean(t, "ExpansionProfile", "activeOnly", element.getActiveOnlyElement(), -1); - if (element.hasExcludeNestedElement()) - composeBoolean(t, "ExpansionProfile", "excludeNested", element.getExcludeNestedElement(), -1); - if (element.hasExcludeNotForUIElement()) - composeBoolean(t, "ExpansionProfile", "excludeNotForUI", element.getExcludeNotForUIElement(), -1); - if (element.hasExcludePostCoordinatedElement()) - composeBoolean(t, "ExpansionProfile", "excludePostCoordinated", element.getExcludePostCoordinatedElement(), -1); - if (element.hasDisplayLanguageElement()) - composeCode(t, "ExpansionProfile", "displayLanguage", element.getDisplayLanguageElement(), -1); - if (element.hasLimitedExpansionElement()) - composeBoolean(t, "ExpansionProfile", "limitedExpansion", element.getLimitedExpansionElement(), -1); - } - - protected void composeExpansionProfileExpansionProfileFixedVersionComponent(Complex parent, String parentType, String name, ExpansionProfile.ExpansionProfileFixedVersionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "fixedVersion", name, element, index); - if (element.hasSystemElement()) - composeUri(t, "ExpansionProfile", "system", element.getSystemElement(), -1); - if (element.hasVersionElement()) - composeString(t, "ExpansionProfile", "version", element.getVersionElement(), -1); - if (element.hasModeElement()) - composeEnum(t, "ExpansionProfile", "mode", element.getModeElement(), -1); - } - - protected void composeExpansionProfileExpansionProfileExcludedSystemComponent(Complex parent, String parentType, String name, ExpansionProfile.ExpansionProfileExcludedSystemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "excludedSystem", name, element, index); - if (element.hasSystemElement()) - composeUri(t, "ExpansionProfile", "system", element.getSystemElement(), -1); - if (element.hasVersionElement()) - composeString(t, "ExpansionProfile", "version", element.getVersionElement(), -1); - } - - protected void composeExpansionProfileExpansionProfileDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.ExpansionProfileDesignationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "designation", name, element, index); - if (element.hasInclude()) - composeExpansionProfileDesignationIncludeComponent(t, "ExpansionProfile", "include", element.getInclude(), -1); - if (element.hasExclude()) - composeExpansionProfileDesignationExcludeComponent(t, "ExpansionProfile", "exclude", element.getExclude(), -1); - } - - protected void composeExpansionProfileDesignationIncludeComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationIncludeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "include", name, element, index); - for (int i = 0; i < element.getDesignation().size(); i++) - composeExpansionProfileDesignationIncludeDesignationComponent(t, "ExpansionProfile", "designation", element.getDesignation().get(i), i); - } - - protected void composeExpansionProfileDesignationIncludeDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationIncludeDesignationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "designation", name, element, index); - if (element.hasLanguageElement()) - composeCode(t, "ExpansionProfile", "language", element.getLanguageElement(), -1); - if (element.hasUse()) - composeCoding(t, "ExpansionProfile", "use", element.getUse(), -1); - } - - protected void composeExpansionProfileDesignationExcludeComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationExcludeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "exclude", name, element, index); - for (int i = 0; i < element.getDesignation().size(); i++) - composeExpansionProfileDesignationExcludeDesignationComponent(t, "ExpansionProfile", "designation", element.getDesignation().get(i), i); - } - - protected void composeExpansionProfileDesignationExcludeDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationExcludeDesignationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "designation", name, element, index); - if (element.hasLanguageElement()) - composeCode(t, "ExpansionProfile", "language", element.getLanguageElement(), -1); - if (element.hasUse()) - composeCoding(t, "ExpansionProfile", "use", element.getUse(), -1); - } - - protected void composeExplanationOfBenefit(Complex parent, String parentType, String name, ExplanationOfBenefit element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ExplanationOfBenefit", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ExplanationOfBenefit", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - for (int i = 0; i < element.getSubType().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "subType", element.getSubType().get(i), i); - if (element.hasPatient()) - composeReference(t, "ExplanationOfBenefit", "patient", element.getPatient(), -1); - if (element.hasBillablePeriod()) - composePeriod(t, "ExplanationOfBenefit", "billablePeriod", element.getBillablePeriod(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "ExplanationOfBenefit", "created", element.getCreatedElement(), -1); - if (element.hasEnterer()) - composeReference(t, "ExplanationOfBenefit", "enterer", element.getEnterer(), -1); - if (element.hasInsurer()) - composeReference(t, "ExplanationOfBenefit", "insurer", element.getInsurer(), -1); - if (element.hasProvider()) - composeReference(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1); - if (element.hasOrganization()) - composeReference(t, "ExplanationOfBenefit", "organization", element.getOrganization(), -1); - if (element.hasReferral()) - composeReference(t, "ExplanationOfBenefit", "referral", element.getReferral(), -1); - if (element.hasFacility()) - composeReference(t, "ExplanationOfBenefit", "facility", element.getFacility(), -1); - if (element.hasClaim()) - composeReference(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1); - if (element.hasClaimResponse()) - composeReference(t, "ExplanationOfBenefit", "claimResponse", element.getClaimResponse(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "ExplanationOfBenefit", "outcome", element.getOutcome(), -1); - if (element.hasDispositionElement()) - composeString(t, "ExplanationOfBenefit", "disposition", element.getDispositionElement(), -1); - for (int i = 0; i < element.getRelated().size(); i++) - composeExplanationOfBenefitRelatedClaimComponent(t, "ExplanationOfBenefit", "related", element.getRelated().get(i), i); - if (element.hasPrescription()) - composeReference(t, "ExplanationOfBenefit", "prescription", element.getPrescription(), -1); - if (element.hasOriginalPrescription()) - composeReference(t, "ExplanationOfBenefit", "originalPrescription", element.getOriginalPrescription(), -1); - if (element.hasPayee()) - composeExplanationOfBenefitPayeeComponent(t, "ExplanationOfBenefit", "payee", element.getPayee(), -1); - for (int i = 0; i < element.getInformation().size(); i++) - composeExplanationOfBenefitSupportingInformationComponent(t, "ExplanationOfBenefit", "information", element.getInformation().get(i), i); - for (int i = 0; i < element.getCareTeam().size(); i++) - composeExplanationOfBenefitCareTeamComponent(t, "ExplanationOfBenefit", "careTeam", element.getCareTeam().get(i), i); - for (int i = 0; i < element.getDiagnosis().size(); i++) - composeExplanationOfBenefitDiagnosisComponent(t, "ExplanationOfBenefit", "diagnosis", element.getDiagnosis().get(i), i); - for (int i = 0; i < element.getProcedure().size(); i++) - composeExplanationOfBenefitProcedureComponent(t, "ExplanationOfBenefit", "procedure", element.getProcedure().get(i), i); - if (element.hasPrecedenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "precedence", element.getPrecedenceElement(), -1); - if (element.hasInsurance()) - composeExplanationOfBenefitInsuranceComponent(t, "ExplanationOfBenefit", "insurance", element.getInsurance(), -1); - if (element.hasAccident()) - composeExplanationOfBenefitAccidentComponent(t, "ExplanationOfBenefit", "accident", element.getAccident(), -1); - if (element.hasEmploymentImpacted()) - composePeriod(t, "ExplanationOfBenefit", "employmentImpacted", element.getEmploymentImpacted(), -1); - if (element.hasHospitalization()) - composePeriod(t, "ExplanationOfBenefit", "hospitalization", element.getHospitalization(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeExplanationOfBenefitItemComponent(t, "ExplanationOfBenefit", "item", element.getItem().get(i), i); - for (int i = 0; i < element.getAddItem().size(); i++) - composeExplanationOfBenefitAddedItemComponent(t, "ExplanationOfBenefit", "addItem", element.getAddItem().get(i), i); - if (element.hasTotalCost()) - composeMoney(t, "ExplanationOfBenefit", "totalCost", element.getTotalCost(), -1); - if (element.hasUnallocDeductable()) - composeMoney(t, "ExplanationOfBenefit", "unallocDeductable", element.getUnallocDeductable(), -1); - if (element.hasTotalBenefit()) - composeMoney(t, "ExplanationOfBenefit", "totalBenefit", element.getTotalBenefit(), -1); - if (element.hasPayment()) - composeExplanationOfBenefitPaymentComponent(t, "ExplanationOfBenefit", "payment", element.getPayment(), -1); - if (element.hasForm()) - composeCodeableConcept(t, "ExplanationOfBenefit", "form", element.getForm(), -1); - for (int i = 0; i < element.getProcessNote().size(); i++) - composeExplanationOfBenefitNoteComponent(t, "ExplanationOfBenefit", "processNote", element.getProcessNote().get(i), i); - for (int i = 0; i < element.getBenefitBalance().size(); i++) - composeExplanationOfBenefitBenefitBalanceComponent(t, "ExplanationOfBenefit", "benefitBalance", element.getBenefitBalance().get(i), i); - } - - protected void composeExplanationOfBenefitRelatedClaimComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.RelatedClaimComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "related", name, element, index); - if (element.hasClaim()) - composeReference(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1); - if (element.hasRelationship()) - composeCodeableConcept(t, "ExplanationOfBenefit", "relationship", element.getRelationship(), -1); - if (element.hasReference()) - composeIdentifier(t, "ExplanationOfBenefit", "reference", element.getReference(), -1); - } - - protected void composeExplanationOfBenefitPayeeComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.PayeeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "payee", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasResource()) - composeCoding(t, "ExplanationOfBenefit", "resource", element.getResource(), -1); - if (element.hasParty()) - composeReference(t, "ExplanationOfBenefit", "party", element.getParty(), -1); - } - - protected void composeExplanationOfBenefitSupportingInformationComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.SupportingInformationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "information", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "ExplanationOfBenefit", "code", element.getCode(), -1); - if (element.hasTiming()) - composeType(t, "ExplanationOfBenefit", "timing", element.getTiming(), -1); - if (element.hasValue()) - composeType(t, "ExplanationOfBenefit", "value", element.getValue(), -1); - if (element.hasReason()) - composeCoding(t, "ExplanationOfBenefit", "reason", element.getReason(), -1); - } - - protected void composeExplanationOfBenefitCareTeamComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.CareTeamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "careTeam", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - if (element.hasProvider()) - composeReference(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1); - if (element.hasResponsibleElement()) - composeBoolean(t, "ExplanationOfBenefit", "responsible", element.getResponsibleElement(), -1); - if (element.hasRole()) - composeCodeableConcept(t, "ExplanationOfBenefit", "role", element.getRole(), -1); - if (element.hasQualification()) - composeCodeableConcept(t, "ExplanationOfBenefit", "qualification", element.getQualification(), -1); - } - - protected void composeExplanationOfBenefitDiagnosisComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.DiagnosisComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "diagnosis", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - if (element.hasDiagnosis()) - composeType(t, "ExplanationOfBenefit", "diagnosis", element.getDiagnosis(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType().get(i), i); - if (element.hasPackageCode()) - composeCodeableConcept(t, "ExplanationOfBenefit", "packageCode", element.getPackageCode(), -1); - } - - protected void composeExplanationOfBenefitProcedureComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.ProcedureComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "procedure", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1); - if (element.hasProcedure()) - composeType(t, "ExplanationOfBenefit", "procedure", element.getProcedure(), -1); - } - - protected void composeExplanationOfBenefitInsuranceComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.InsuranceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "insurance", name, element, index); - if (element.hasCoverage()) - composeReference(t, "ExplanationOfBenefit", "coverage", element.getCoverage(), -1); - for (int i = 0; i < element.getPreAuthRef().size(); i++) - composeString(t, "ExplanationOfBenefit", "preAuthRef", element.getPreAuthRef().get(i), i); - } - - protected void composeExplanationOfBenefitAccidentComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.AccidentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "accident", name, element, index); - if (element.hasDateElement()) - composeDate(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasLocation()) - composeType(t, "ExplanationOfBenefit", "location", element.getLocation(), -1); - } - - protected void composeExplanationOfBenefitItemComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.ItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - for (int i = 0; i < element.getCareTeamLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "careTeamLinkId", element.getCareTeamLinkId().get(i), i); - for (int i = 0; i < element.getDiagnosisLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "diagnosisLinkId", element.getDiagnosisLinkId().get(i), i); - for (int i = 0; i < element.getProcedureLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "procedureLinkId", element.getProcedureLinkId().get(i), i); - for (int i = 0; i < element.getInformationLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "informationLinkId", element.getInformationLinkId().get(i), i); - if (element.hasRevenue()) - composeCodeableConcept(t, "ExplanationOfBenefit", "revenue", element.getRevenue(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); - if (element.hasService()) - composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getProgramCode().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "programCode", element.getProgramCode().get(i), i); - if (element.hasServiced()) - composeType(t, "ExplanationOfBenefit", "serviced", element.getServiced(), -1); - if (element.hasLocation()) - composeType(t, "ExplanationOfBenefit", "location", element.getLocation(), -1); - if (element.hasQuantity()) - composeQuantity(t, "ExplanationOfBenefit", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "ExplanationOfBenefit", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "ExplanationOfBenefit", "factor", element.getFactorElement(), -1); - if (element.hasNet()) - composeMoney(t, "ExplanationOfBenefit", "net", element.getNet(), -1); - for (int i = 0; i < element.getUdi().size(); i++) - composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i); - if (element.hasBodySite()) - composeCodeableConcept(t, "ExplanationOfBenefit", "bodySite", element.getBodySite(), -1); - for (int i = 0; i < element.getSubSite().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "subSite", element.getSubSite().get(i), i); - for (int i = 0; i < element.getEncounter().size(); i++) - composeReference(t, "ExplanationOfBenefit", "encounter", element.getEncounter().get(i), i); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); - for (int i = 0; i < element.getDetail().size(); i++) - composeExplanationOfBenefitDetailComponent(t, "ExplanationOfBenefit", "detail", element.getDetail().get(i), i); - } - - protected void composeExplanationOfBenefitAdjudicationComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.AdjudicationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "adjudication", name, element, index); - if (element.hasCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); - if (element.hasReason()) - composeCodeableConcept(t, "ExplanationOfBenefit", "reason", element.getReason(), -1); - if (element.hasAmount()) - composeMoney(t, "ExplanationOfBenefit", "amount", element.getAmount(), -1); - if (element.hasValueElement()) - composeDecimal(t, "ExplanationOfBenefit", "value", element.getValueElement(), -1); - } - - protected void composeExplanationOfBenefitDetailComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.DetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "detail", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasRevenue()) - composeCodeableConcept(t, "ExplanationOfBenefit", "revenue", element.getRevenue(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); - if (element.hasService()) - composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getProgramCode().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "programCode", element.getProgramCode().get(i), i); - if (element.hasQuantity()) - composeQuantity(t, "ExplanationOfBenefit", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "ExplanationOfBenefit", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "ExplanationOfBenefit", "factor", element.getFactorElement(), -1); - if (element.hasNet()) - composeMoney(t, "ExplanationOfBenefit", "net", element.getNet(), -1); - for (int i = 0; i < element.getUdi().size(); i++) - composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); - for (int i = 0; i < element.getSubDetail().size(); i++) - composeExplanationOfBenefitSubDetailComponent(t, "ExplanationOfBenefit", "subDetail", element.getSubDetail().get(i), i); - } - - protected void composeExplanationOfBenefitSubDetailComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.SubDetailComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "subDetail", name, element, index); - if (element.hasSequenceElement()) - composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasRevenue()) - composeCodeableConcept(t, "ExplanationOfBenefit", "revenue", element.getRevenue(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); - if (element.hasService()) - composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getProgramCode().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "programCode", element.getProgramCode().get(i), i); - if (element.hasQuantity()) - composeQuantity(t, "ExplanationOfBenefit", "quantity", element.getQuantity(), -1); - if (element.hasUnitPrice()) - composeMoney(t, "ExplanationOfBenefit", "unitPrice", element.getUnitPrice(), -1); - if (element.hasFactorElement()) - composeDecimal(t, "ExplanationOfBenefit", "factor", element.getFactorElement(), -1); - if (element.hasNet()) - composeMoney(t, "ExplanationOfBenefit", "net", element.getNet(), -1); - for (int i = 0; i < element.getUdi().size(); i++) - composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); - } - - protected void composeExplanationOfBenefitAddedItemComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.AddedItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "addItem", name, element, index); - for (int i = 0; i < element.getSequenceLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "sequenceLinkId", element.getSequenceLinkId().get(i), i); - for (int i = 0; i < element.getDetailSequenceLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "detailSequenceLinkId", element.getDetailSequenceLinkId().get(i), i); - for (int i = 0; i < element.getSubdetailSequenceLinkId().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "subdetailSequenceLinkId", element.getSubdetailSequenceLinkId().get(i), i); - if (element.hasService()) - composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); - for (int i = 0; i < element.getModifier().size(); i++) - composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); - if (element.hasFee()) - composeMoney(t, "ExplanationOfBenefit", "fee", element.getFee(), -1); - for (int i = 0; i < element.getNoteNumber().size(); i++) - composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); - for (int i = 0; i < element.getAdjudication().size(); i++) - composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); - } - - protected void composeExplanationOfBenefitPaymentComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.PaymentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "payment", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasAdjustment()) - composeMoney(t, "ExplanationOfBenefit", "adjustment", element.getAdjustment(), -1); - if (element.hasAdjustmentReason()) - composeCodeableConcept(t, "ExplanationOfBenefit", "adjustmentReason", element.getAdjustmentReason(), -1); - if (element.hasDateElement()) - composeDate(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1); - if (element.hasAmount()) - composeMoney(t, "ExplanationOfBenefit", "amount", element.getAmount(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier(), -1); - } - - protected void composeExplanationOfBenefitNoteComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.NoteComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "processNote", name, element, index); - if (element.hasNumberElement()) - composePositiveInt(t, "ExplanationOfBenefit", "number", element.getNumberElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasTextElement()) - composeString(t, "ExplanationOfBenefit", "text", element.getTextElement(), -1); - if (element.hasLanguage()) - composeCodeableConcept(t, "ExplanationOfBenefit", "language", element.getLanguage(), -1); - } - - protected void composeExplanationOfBenefitBenefitBalanceComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.BenefitBalanceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "benefitBalance", name, element, index); - if (element.hasCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); - if (element.hasSubCategory()) - composeCodeableConcept(t, "ExplanationOfBenefit", "subCategory", element.getSubCategory(), -1); - if (element.hasExcludedElement()) - composeBoolean(t, "ExplanationOfBenefit", "excluded", element.getExcludedElement(), -1); - if (element.hasNameElement()) - composeString(t, "ExplanationOfBenefit", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ExplanationOfBenefit", "description", element.getDescriptionElement(), -1); - if (element.hasNetwork()) - composeCodeableConcept(t, "ExplanationOfBenefit", "network", element.getNetwork(), -1); - if (element.hasUnit()) - composeCodeableConcept(t, "ExplanationOfBenefit", "unit", element.getUnit(), -1); - if (element.hasTerm()) - composeCodeableConcept(t, "ExplanationOfBenefit", "term", element.getTerm(), -1); - for (int i = 0; i < element.getFinancial().size(); i++) - composeExplanationOfBenefitBenefitComponent(t, "ExplanationOfBenefit", "financial", element.getFinancial().get(i), i); - } - - protected void composeExplanationOfBenefitBenefitComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.BenefitComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "financial", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); - if (element.hasAllowed()) - composeType(t, "ExplanationOfBenefit", "allowed", element.getAllowed(), -1); - if (element.hasUsed()) - composeType(t, "ExplanationOfBenefit", "used", element.getUsed(), -1); - } - - protected void composeFamilyMemberHistory(Complex parent, String parentType, String name, FamilyMemberHistory element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "FamilyMemberHistory", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "FamilyMemberHistory", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "FamilyMemberHistory", "definition", element.getDefinition().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "FamilyMemberHistory", "status", element.getStatusElement(), -1); - if (element.hasDataAbsentReason()) - composeCodeableConcept(t, "FamilyMemberHistory", "dataAbsentReason", element.getDataAbsentReason(), -1); - if (element.hasPatient()) - composeReference(t, "FamilyMemberHistory", "patient", element.getPatient(), -1); - if (element.hasDateElement()) - composeDateTime(t, "FamilyMemberHistory", "date", element.getDateElement(), -1); - if (element.hasNameElement()) - composeString(t, "FamilyMemberHistory", "name", element.getNameElement(), -1); - if (element.hasRelationship()) - composeCodeableConcept(t, "FamilyMemberHistory", "relationship", element.getRelationship(), -1); - if (element.hasGenderElement()) - composeEnum(t, "FamilyMemberHistory", "gender", element.getGenderElement(), -1); - if (element.hasBorn()) - composeType(t, "FamilyMemberHistory", "born", element.getBorn(), -1); - if (element.hasAge()) - composeType(t, "FamilyMemberHistory", "age", element.getAge(), -1); - if (element.hasEstimatedAgeElement()) - composeBoolean(t, "FamilyMemberHistory", "estimatedAge", element.getEstimatedAgeElement(), -1); - if (element.hasDeceased()) - composeType(t, "FamilyMemberHistory", "deceased", element.getDeceased(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "FamilyMemberHistory", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "FamilyMemberHistory", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "FamilyMemberHistory", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getCondition().size(); i++) - composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(t, "FamilyMemberHistory", "condition", element.getCondition().get(i), i); - } - - protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(Complex parent, String parentType, String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "condition", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "FamilyMemberHistory", "code", element.getCode(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "FamilyMemberHistory", "outcome", element.getOutcome(), -1); - if (element.hasOnset()) - composeType(t, "FamilyMemberHistory", "onset", element.getOnset(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "FamilyMemberHistory", "note", element.getNote().get(i), i); - } - - protected void composeFlag(Complex parent, String parentType, String name, Flag element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Flag", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Flag", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Flag", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "Flag", "category", element.getCategory(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Flag", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "Flag", "subject", element.getSubject(), -1); - if (element.hasPeriod()) - composePeriod(t, "Flag", "period", element.getPeriod(), -1); - if (element.hasEncounter()) - composeReference(t, "Flag", "encounter", element.getEncounter(), -1); - if (element.hasAuthor()) - composeReference(t, "Flag", "author", element.getAuthor(), -1); - } - - protected void composeGoal(Complex parent, String parentType, String name, Goal element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Goal", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Goal", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Goal", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "Goal", "category", element.getCategory().get(i), i); - if (element.hasPriority()) - composeCodeableConcept(t, "Goal", "priority", element.getPriority(), -1); - if (element.hasDescription()) - composeCodeableConcept(t, "Goal", "description", element.getDescription(), -1); - if (element.hasSubject()) - composeReference(t, "Goal", "subject", element.getSubject(), -1); - if (element.hasStart()) - composeType(t, "Goal", "start", element.getStart(), -1); - if (element.hasTarget()) - composeGoalGoalTargetComponent(t, "Goal", "target", element.getTarget(), -1); - if (element.hasStatusDateElement()) - composeDate(t, "Goal", "statusDate", element.getStatusDateElement(), -1); - if (element.hasStatusReasonElement()) - composeString(t, "Goal", "statusReason", element.getStatusReasonElement(), -1); - if (element.hasExpressedBy()) - composeReference(t, "Goal", "expressedBy", element.getExpressedBy(), -1); - for (int i = 0; i < element.getAddresses().size(); i++) - composeReference(t, "Goal", "addresses", element.getAddresses().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Goal", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getOutcomeCode().size(); i++) - composeCodeableConcept(t, "Goal", "outcomeCode", element.getOutcomeCode().get(i), i); - for (int i = 0; i < element.getOutcomeReference().size(); i++) - composeReference(t, "Goal", "outcomeReference", element.getOutcomeReference().get(i), i); - } - - protected void composeGoalGoalTargetComponent(Complex parent, String parentType, String name, Goal.GoalTargetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "target", name, element, index); - if (element.hasMeasure()) - composeCodeableConcept(t, "Goal", "measure", element.getMeasure(), -1); - if (element.hasDetail()) - composeType(t, "Goal", "detail", element.getDetail(), -1); - if (element.hasDue()) - composeType(t, "Goal", "due", element.getDue(), -1); - } - - protected void composeGraphDefinition(Complex parent, String parentType, String name, GraphDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "GraphDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "GraphDefinition", "url", element.getUrlElement(), -1); - if (element.hasVersionElement()) - composeString(t, "GraphDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "GraphDefinition", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "GraphDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "GraphDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "GraphDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "GraphDefinition", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "GraphDefinition", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "GraphDefinition", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "GraphDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "GraphDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "GraphDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasStartElement()) - composeCode(t, "GraphDefinition", "start", element.getStartElement(), -1); - if (element.hasProfileElement()) - composeUri(t, "GraphDefinition", "profile", element.getProfileElement(), -1); - for (int i = 0; i < element.getLink().size(); i++) - composeGraphDefinitionGraphDefinitionLinkComponent(t, "GraphDefinition", "link", element.getLink().get(i), i); - } - - protected void composeGraphDefinitionGraphDefinitionLinkComponent(Complex parent, String parentType, String name, GraphDefinition.GraphDefinitionLinkComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "link", name, element, index); - if (element.hasPathElement()) - composeString(t, "GraphDefinition", "path", element.getPathElement(), -1); - if (element.hasSliceNameElement()) - composeString(t, "GraphDefinition", "sliceName", element.getSliceNameElement(), -1); - if (element.hasMinElement()) - composeInteger(t, "GraphDefinition", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "GraphDefinition", "max", element.getMaxElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "GraphDefinition", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getTarget().size(); i++) - composeGraphDefinitionGraphDefinitionLinkTargetComponent(t, "GraphDefinition", "target", element.getTarget().get(i), i); - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(Complex parent, String parentType, String name, GraphDefinition.GraphDefinitionLinkTargetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "target", name, element, index); - if (element.hasTypeElement()) - composeCode(t, "GraphDefinition", "type", element.getTypeElement(), -1); - if (element.hasProfileElement()) - composeUri(t, "GraphDefinition", "profile", element.getProfileElement(), -1); - for (int i = 0; i < element.getCompartment().size(); i++) - composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(t, "GraphDefinition", "compartment", element.getCompartment().get(i), i); - for (int i = 0; i < element.getLink().size(); i++) - composeGraphDefinitionGraphDefinitionLinkComponent(t, "GraphDefinition", "link", element.getLink().get(i), i); - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(Complex parent, String parentType, String name, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "compartment", name, element, index); - if (element.hasCodeElement()) - composeEnum(t, "GraphDefinition", "code", element.getCodeElement(), -1); - if (element.hasRuleElement()) - composeEnum(t, "GraphDefinition", "rule", element.getRuleElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "GraphDefinition", "expression", element.getExpressionElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "GraphDefinition", "description", element.getDescriptionElement(), -1); - } - - protected void composeGroup(Complex parent, String parentType, String name, Group element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Group", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Group", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "Group", "active", element.getActiveElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "Group", "type", element.getTypeElement(), -1); - if (element.hasActualElement()) - composeBoolean(t, "Group", "actual", element.getActualElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Group", "code", element.getCode(), -1); - if (element.hasNameElement()) - composeString(t, "Group", "name", element.getNameElement(), -1); - if (element.hasQuantityElement()) - composeUnsignedInt(t, "Group", "quantity", element.getQuantityElement(), -1); - for (int i = 0; i < element.getCharacteristic().size(); i++) - composeGroupGroupCharacteristicComponent(t, "Group", "characteristic", element.getCharacteristic().get(i), i); - for (int i = 0; i < element.getMember().size(); i++) - composeGroupGroupMemberComponent(t, "Group", "member", element.getMember().get(i), i); - } - - protected void composeGroupGroupCharacteristicComponent(Complex parent, String parentType, String name, Group.GroupCharacteristicComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "characteristic", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "Group", "code", element.getCode(), -1); - if (element.hasValue()) - composeType(t, "Group", "value", element.getValue(), -1); - if (element.hasExcludeElement()) - composeBoolean(t, "Group", "exclude", element.getExcludeElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Group", "period", element.getPeriod(), -1); - } - - protected void composeGroupGroupMemberComponent(Complex parent, String parentType, String name, Group.GroupMemberComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "member", name, element, index); - if (element.hasEntity()) - composeReference(t, "Group", "entity", element.getEntity(), -1); - if (element.hasPeriod()) - composePeriod(t, "Group", "period", element.getPeriod(), -1); - if (element.hasInactiveElement()) - composeBoolean(t, "Group", "inactive", element.getInactiveElement(), -1); - } - - protected void composeGuidanceResponse(Complex parent, String parentType, String name, GuidanceResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "GuidanceResponse", name, element, index); - if (element.hasRequestIdElement()) - composeId(t, "GuidanceResponse", "requestId", element.getRequestIdElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "GuidanceResponse", "identifier", element.getIdentifier(), -1); - if (element.hasModule()) - composeReference(t, "GuidanceResponse", "module", element.getModule(), -1); - if (element.hasStatusElement()) - composeEnum(t, "GuidanceResponse", "status", element.getStatusElement(), -1); - if (element.hasSubject()) - composeReference(t, "GuidanceResponse", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "GuidanceResponse", "context", element.getContext(), -1); - if (element.hasOccurrenceDateTimeElement()) - composeDateTime(t, "GuidanceResponse", "occurrenceDateTime", element.getOccurrenceDateTimeElement(), -1); - if (element.hasPerformer()) - composeReference(t, "GuidanceResponse", "performer", element.getPerformer(), -1); - if (element.hasReason()) - composeType(t, "GuidanceResponse", "reason", element.getReason(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "GuidanceResponse", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getEvaluationMessage().size(); i++) - composeReference(t, "GuidanceResponse", "evaluationMessage", element.getEvaluationMessage().get(i), i); - if (element.hasOutputParameters()) - composeReference(t, "GuidanceResponse", "outputParameters", element.getOutputParameters(), -1); - if (element.hasResult()) - composeReference(t, "GuidanceResponse", "result", element.getResult(), -1); - for (int i = 0; i < element.getDataRequirement().size(); i++) - composeDataRequirement(t, "GuidanceResponse", "dataRequirement", element.getDataRequirement().get(i), i); - } - - protected void composeHealthcareService(Complex parent, String parentType, String name, HealthcareService element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "HealthcareService", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "HealthcareService", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "HealthcareService", "active", element.getActiveElement(), -1); - if (element.hasProvidedBy()) - composeReference(t, "HealthcareService", "providedBy", element.getProvidedBy(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "HealthcareService", "category", element.getCategory(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "HealthcareService", "type", element.getType().get(i), i); - for (int i = 0; i < element.getSpecialty().size(); i++) - composeCodeableConcept(t, "HealthcareService", "specialty", element.getSpecialty().get(i), i); - for (int i = 0; i < element.getLocation().size(); i++) - composeReference(t, "HealthcareService", "location", element.getLocation().get(i), i); - if (element.hasNameElement()) - composeString(t, "HealthcareService", "name", element.getNameElement(), -1); - if (element.hasCommentElement()) - composeString(t, "HealthcareService", "comment", element.getCommentElement(), -1); - if (element.hasExtraDetailsElement()) - composeString(t, "HealthcareService", "extraDetails", element.getExtraDetailsElement(), -1); - if (element.hasPhoto()) - composeAttachment(t, "HealthcareService", "photo", element.getPhoto(), -1); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "HealthcareService", "telecom", element.getTelecom().get(i), i); - for (int i = 0; i < element.getCoverageArea().size(); i++) - composeReference(t, "HealthcareService", "coverageArea", element.getCoverageArea().get(i), i); - for (int i = 0; i < element.getServiceProvisionCode().size(); i++) - composeCodeableConcept(t, "HealthcareService", "serviceProvisionCode", element.getServiceProvisionCode().get(i), i); - if (element.hasEligibility()) - composeCodeableConcept(t, "HealthcareService", "eligibility", element.getEligibility(), -1); - if (element.hasEligibilityNoteElement()) - composeString(t, "HealthcareService", "eligibilityNote", element.getEligibilityNoteElement(), -1); - for (int i = 0; i < element.getProgramName().size(); i++) - composeString(t, "HealthcareService", "programName", element.getProgramName().get(i), i); - for (int i = 0; i < element.getCharacteristic().size(); i++) - composeCodeableConcept(t, "HealthcareService", "characteristic", element.getCharacteristic().get(i), i); - for (int i = 0; i < element.getReferralMethod().size(); i++) - composeCodeableConcept(t, "HealthcareService", "referralMethod", element.getReferralMethod().get(i), i); - if (element.hasAppointmentRequiredElement()) - composeBoolean(t, "HealthcareService", "appointmentRequired", element.getAppointmentRequiredElement(), -1); - for (int i = 0; i < element.getAvailableTime().size(); i++) - composeHealthcareServiceHealthcareServiceAvailableTimeComponent(t, "HealthcareService", "availableTime", element.getAvailableTime().get(i), i); - for (int i = 0; i < element.getNotAvailable().size(); i++) - composeHealthcareServiceHealthcareServiceNotAvailableComponent(t, "HealthcareService", "notAvailable", element.getNotAvailable().get(i), i); - if (element.hasAvailabilityExceptionsElement()) - composeString(t, "HealthcareService", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "HealthcareService", "endpoint", element.getEndpoint().get(i), i); - } - - protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(Complex parent, String parentType, String name, HealthcareService.HealthcareServiceAvailableTimeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "availableTime", name, element, index); - for (int i = 0; i < element.getDaysOfWeek().size(); i++) - composeEnum(t, "HealthcareService", "daysOfWeek", element.getDaysOfWeek().get(i), i); - if (element.hasAllDayElement()) - composeBoolean(t, "HealthcareService", "allDay", element.getAllDayElement(), -1); - if (element.hasAvailableStartTimeElement()) - composeTime(t, "HealthcareService", "availableStartTime", element.getAvailableStartTimeElement(), -1); - if (element.hasAvailableEndTimeElement()) - composeTime(t, "HealthcareService", "availableEndTime", element.getAvailableEndTimeElement(), -1); - } - - protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(Complex parent, String parentType, String name, HealthcareService.HealthcareServiceNotAvailableComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "notAvailable", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "HealthcareService", "description", element.getDescriptionElement(), -1); - if (element.hasDuring()) - composePeriod(t, "HealthcareService", "during", element.getDuring(), -1); - } - - protected void composeImagingManifest(Complex parent, String parentType, String name, ImagingManifest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ImagingManifest", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "ImagingManifest", "identifier", element.getIdentifier(), -1); - if (element.hasPatient()) - composeReference(t, "ImagingManifest", "patient", element.getPatient(), -1); - if (element.hasAuthoringTimeElement()) - composeDateTime(t, "ImagingManifest", "authoringTime", element.getAuthoringTimeElement(), -1); - if (element.hasAuthor()) - composeReference(t, "ImagingManifest", "author", element.getAuthor(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ImagingManifest", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getStudy().size(); i++) - composeImagingManifestStudyComponent(t, "ImagingManifest", "study", element.getStudy().get(i), i); - } - - protected void composeImagingManifestStudyComponent(Complex parent, String parentType, String name, ImagingManifest.StudyComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "study", name, element, index); - if (element.hasUidElement()) - composeOid(t, "ImagingManifest", "uid", element.getUidElement(), -1); - if (element.hasImagingStudy()) - composeReference(t, "ImagingManifest", "imagingStudy", element.getImagingStudy(), -1); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "ImagingManifest", "endpoint", element.getEndpoint().get(i), i); - for (int i = 0; i < element.getSeries().size(); i++) - composeImagingManifestSeriesComponent(t, "ImagingManifest", "series", element.getSeries().get(i), i); - } - - protected void composeImagingManifestSeriesComponent(Complex parent, String parentType, String name, ImagingManifest.SeriesComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "series", name, element, index); - if (element.hasUidElement()) - composeOid(t, "ImagingManifest", "uid", element.getUidElement(), -1); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "ImagingManifest", "endpoint", element.getEndpoint().get(i), i); - for (int i = 0; i < element.getInstance().size(); i++) - composeImagingManifestInstanceComponent(t, "ImagingManifest", "instance", element.getInstance().get(i), i); - } - - protected void composeImagingManifestInstanceComponent(Complex parent, String parentType, String name, ImagingManifest.InstanceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "instance", name, element, index); - if (element.hasSopClassElement()) - composeOid(t, "ImagingManifest", "sopClass", element.getSopClassElement(), -1); - if (element.hasUidElement()) - composeOid(t, "ImagingManifest", "uid", element.getUidElement(), -1); - for (int i = 0; i < element.getFrameNumber().size(); i++) - composeUnsignedInt(t, "ImagingManifest", "frameNumber", element.getFrameNumber().get(i), i); - } - - protected void composeImagingStudy(Complex parent, String parentType, String name, ImagingStudy element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ImagingStudy", name, element, index); - if (element.hasUidElement()) - composeOid(t, "ImagingStudy", "uid", element.getUidElement(), -1); - if (element.hasAccession()) - composeIdentifier(t, "ImagingStudy", "accession", element.getAccession(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ImagingStudy", "identifier", element.getIdentifier().get(i), i); - if (element.hasAvailabilityElement()) - composeEnum(t, "ImagingStudy", "availability", element.getAvailabilityElement(), -1); - for (int i = 0; i < element.getModalityList().size(); i++) - composeCoding(t, "ImagingStudy", "modalityList", element.getModalityList().get(i), i); - if (element.hasPatient()) - composeReference(t, "ImagingStudy", "patient", element.getPatient(), -1); - if (element.hasContext()) - composeReference(t, "ImagingStudy", "context", element.getContext(), -1); - if (element.hasStartedElement()) - composeDateTime(t, "ImagingStudy", "started", element.getStartedElement(), -1); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "ImagingStudy", "basedOn", element.getBasedOn().get(i), i); - if (element.hasReferrer()) - composeReference(t, "ImagingStudy", "referrer", element.getReferrer(), -1); - for (int i = 0; i < element.getInterpreter().size(); i++) - composeReference(t, "ImagingStudy", "interpreter", element.getInterpreter().get(i), i); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "ImagingStudy", "endpoint", element.getEndpoint().get(i), i); - if (element.hasNumberOfSeriesElement()) - composeUnsignedInt(t, "ImagingStudy", "numberOfSeries", element.getNumberOfSeriesElement(), -1); - if (element.hasNumberOfInstancesElement()) - composeUnsignedInt(t, "ImagingStudy", "numberOfInstances", element.getNumberOfInstancesElement(), -1); - for (int i = 0; i < element.getProcedureReference().size(); i++) - composeReference(t, "ImagingStudy", "procedureReference", element.getProcedureReference().get(i), i); - for (int i = 0; i < element.getProcedureCode().size(); i++) - composeCodeableConcept(t, "ImagingStudy", "procedureCode", element.getProcedureCode().get(i), i); - if (element.hasReason()) - composeCodeableConcept(t, "ImagingStudy", "reason", element.getReason(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ImagingStudy", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getSeries().size(); i++) - composeImagingStudyImagingStudySeriesComponent(t, "ImagingStudy", "series", element.getSeries().get(i), i); - } - - protected void composeImagingStudyImagingStudySeriesComponent(Complex parent, String parentType, String name, ImagingStudy.ImagingStudySeriesComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "series", name, element, index); - if (element.hasUidElement()) - composeOid(t, "ImagingStudy", "uid", element.getUidElement(), -1); - if (element.hasNumberElement()) - composeUnsignedInt(t, "ImagingStudy", "number", element.getNumberElement(), -1); - if (element.hasModality()) - composeCoding(t, "ImagingStudy", "modality", element.getModality(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ImagingStudy", "description", element.getDescriptionElement(), -1); - if (element.hasNumberOfInstancesElement()) - composeUnsignedInt(t, "ImagingStudy", "numberOfInstances", element.getNumberOfInstancesElement(), -1); - if (element.hasAvailabilityElement()) - composeEnum(t, "ImagingStudy", "availability", element.getAvailabilityElement(), -1); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "ImagingStudy", "endpoint", element.getEndpoint().get(i), i); - if (element.hasBodySite()) - composeCoding(t, "ImagingStudy", "bodySite", element.getBodySite(), -1); - if (element.hasLaterality()) - composeCoding(t, "ImagingStudy", "laterality", element.getLaterality(), -1); - if (element.hasStartedElement()) - composeDateTime(t, "ImagingStudy", "started", element.getStartedElement(), -1); - for (int i = 0; i < element.getPerformer().size(); i++) - composeReference(t, "ImagingStudy", "performer", element.getPerformer().get(i), i); - for (int i = 0; i < element.getInstance().size(); i++) - composeImagingStudyImagingStudySeriesInstanceComponent(t, "ImagingStudy", "instance", element.getInstance().get(i), i); - } - - protected void composeImagingStudyImagingStudySeriesInstanceComponent(Complex parent, String parentType, String name, ImagingStudy.ImagingStudySeriesInstanceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "instance", name, element, index); - if (element.hasUidElement()) - composeOid(t, "ImagingStudy", "uid", element.getUidElement(), -1); - if (element.hasNumberElement()) - composeUnsignedInt(t, "ImagingStudy", "number", element.getNumberElement(), -1); - if (element.hasSopClassElement()) - composeOid(t, "ImagingStudy", "sopClass", element.getSopClassElement(), -1); - if (element.hasTitleElement()) - composeString(t, "ImagingStudy", "title", element.getTitleElement(), -1); - } - - protected void composeImmunization(Complex parent, String parentType, String name, Immunization element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Immunization", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Immunization", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Immunization", "status", element.getStatusElement(), -1); - if (element.hasNotGivenElement()) - composeBoolean(t, "Immunization", "notGiven", element.getNotGivenElement(), -1); - if (element.hasVaccineCode()) - composeCodeableConcept(t, "Immunization", "vaccineCode", element.getVaccineCode(), -1); - if (element.hasPatient()) - composeReference(t, "Immunization", "patient", element.getPatient(), -1); - if (element.hasEncounter()) - composeReference(t, "Immunization", "encounter", element.getEncounter(), -1); - if (element.hasDateElement()) - composeDateTime(t, "Immunization", "date", element.getDateElement(), -1); - if (element.hasPrimarySourceElement()) - composeBoolean(t, "Immunization", "primarySource", element.getPrimarySourceElement(), -1); - if (element.hasReportOrigin()) - composeCodeableConcept(t, "Immunization", "reportOrigin", element.getReportOrigin(), -1); - if (element.hasLocation()) - composeReference(t, "Immunization", "location", element.getLocation(), -1); - if (element.hasManufacturer()) - composeReference(t, "Immunization", "manufacturer", element.getManufacturer(), -1); - if (element.hasLotNumberElement()) - composeString(t, "Immunization", "lotNumber", element.getLotNumberElement(), -1); - if (element.hasExpirationDateElement()) - composeDate(t, "Immunization", "expirationDate", element.getExpirationDateElement(), -1); - if (element.hasSite()) - composeCodeableConcept(t, "Immunization", "site", element.getSite(), -1); - if (element.hasRoute()) - composeCodeableConcept(t, "Immunization", "route", element.getRoute(), -1); - if (element.hasDoseQuantity()) - composeQuantity(t, "Immunization", "doseQuantity", element.getDoseQuantity(), -1); - for (int i = 0; i < element.getPractitioner().size(); i++) - composeImmunizationImmunizationPractitionerComponent(t, "Immunization", "practitioner", element.getPractitioner().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Immunization", "note", element.getNote().get(i), i); - if (element.hasExplanation()) - composeImmunizationImmunizationExplanationComponent(t, "Immunization", "explanation", element.getExplanation(), -1); - for (int i = 0; i < element.getReaction().size(); i++) - composeImmunizationImmunizationReactionComponent(t, "Immunization", "reaction", element.getReaction().get(i), i); - for (int i = 0; i < element.getVaccinationProtocol().size(); i++) - composeImmunizationImmunizationVaccinationProtocolComponent(t, "Immunization", "vaccinationProtocol", element.getVaccinationProtocol().get(i), i); - } - - protected void composeImmunizationImmunizationPractitionerComponent(Complex parent, String parentType, String name, Immunization.ImmunizationPractitionerComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "practitioner", name, element, index); - if (element.hasRole()) - composeCodeableConcept(t, "Immunization", "role", element.getRole(), -1); - if (element.hasActor()) - composeReference(t, "Immunization", "actor", element.getActor(), -1); - } - - protected void composeImmunizationImmunizationExplanationComponent(Complex parent, String parentType, String name, Immunization.ImmunizationExplanationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "explanation", name, element, index); - for (int i = 0; i < element.getReason().size(); i++) - composeCodeableConcept(t, "Immunization", "reason", element.getReason().get(i), i); - for (int i = 0; i < element.getReasonNotGiven().size(); i++) - composeCodeableConcept(t, "Immunization", "reasonNotGiven", element.getReasonNotGiven().get(i), i); - } - - protected void composeImmunizationImmunizationReactionComponent(Complex parent, String parentType, String name, Immunization.ImmunizationReactionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "reaction", name, element, index); - if (element.hasDateElement()) - composeDateTime(t, "Immunization", "date", element.getDateElement(), -1); - if (element.hasDetail()) - composeReference(t, "Immunization", "detail", element.getDetail(), -1); - if (element.hasReportedElement()) - composeBoolean(t, "Immunization", "reported", element.getReportedElement(), -1); - } - - protected void composeImmunizationImmunizationVaccinationProtocolComponent(Complex parent, String parentType, String name, Immunization.ImmunizationVaccinationProtocolComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "vaccinationProtocol", name, element, index); - if (element.hasDoseSequenceElement()) - composePositiveInt(t, "Immunization", "doseSequence", element.getDoseSequenceElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Immunization", "description", element.getDescriptionElement(), -1); - if (element.hasAuthority()) - composeReference(t, "Immunization", "authority", element.getAuthority(), -1); - if (element.hasSeriesElement()) - composeString(t, "Immunization", "series", element.getSeriesElement(), -1); - if (element.hasSeriesDosesElement()) - composePositiveInt(t, "Immunization", "seriesDoses", element.getSeriesDosesElement(), -1); - for (int i = 0; i < element.getTargetDisease().size(); i++) - composeCodeableConcept(t, "Immunization", "targetDisease", element.getTargetDisease().get(i), i); - if (element.hasDoseStatus()) - composeCodeableConcept(t, "Immunization", "doseStatus", element.getDoseStatus(), -1); - if (element.hasDoseStatusReason()) - composeCodeableConcept(t, "Immunization", "doseStatusReason", element.getDoseStatusReason(), -1); - } - - protected void composeImmunizationRecommendation(Complex parent, String parentType, String name, ImmunizationRecommendation element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ImmunizationRecommendation", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ImmunizationRecommendation", "identifier", element.getIdentifier().get(i), i); - if (element.hasPatient()) - composeReference(t, "ImmunizationRecommendation", "patient", element.getPatient(), -1); - for (int i = 0; i < element.getRecommendation().size(); i++) - composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(t, "ImmunizationRecommendation", "recommendation", element.getRecommendation().get(i), i); - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(Complex parent, String parentType, String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "recommendation", name, element, index); - if (element.hasDateElement()) - composeDateTime(t, "ImmunizationRecommendation", "date", element.getDateElement(), -1); - if (element.hasVaccineCode()) - composeCodeableConcept(t, "ImmunizationRecommendation", "vaccineCode", element.getVaccineCode(), -1); - if (element.hasTargetDisease()) - composeCodeableConcept(t, "ImmunizationRecommendation", "targetDisease", element.getTargetDisease(), -1); - if (element.hasDoseNumberElement()) - composePositiveInt(t, "ImmunizationRecommendation", "doseNumber", element.getDoseNumberElement(), -1); - if (element.hasForecastStatus()) - composeCodeableConcept(t, "ImmunizationRecommendation", "forecastStatus", element.getForecastStatus(), -1); - for (int i = 0; i < element.getDateCriterion().size(); i++) - composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(t, "ImmunizationRecommendation", "dateCriterion", element.getDateCriterion().get(i), i); - if (element.hasProtocol()) - composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(t, "ImmunizationRecommendation", "protocol", element.getProtocol(), -1); - for (int i = 0; i < element.getSupportingImmunization().size(); i++) - composeReference(t, "ImmunizationRecommendation", "supportingImmunization", element.getSupportingImmunization().get(i), i); - for (int i = 0; i < element.getSupportingPatientInformation().size(); i++) - composeReference(t, "ImmunizationRecommendation", "supportingPatientInformation", element.getSupportingPatientInformation().get(i), i); - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(Complex parent, String parentType, String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dateCriterion", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "ImmunizationRecommendation", "code", element.getCode(), -1); - if (element.hasValueElement()) - composeDateTime(t, "ImmunizationRecommendation", "value", element.getValueElement(), -1); - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(Complex parent, String parentType, String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "protocol", name, element, index); - if (element.hasDoseSequenceElement()) - composePositiveInt(t, "ImmunizationRecommendation", "doseSequence", element.getDoseSequenceElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ImmunizationRecommendation", "description", element.getDescriptionElement(), -1); - if (element.hasAuthority()) - composeReference(t, "ImmunizationRecommendation", "authority", element.getAuthority(), -1); - if (element.hasSeriesElement()) - composeString(t, "ImmunizationRecommendation", "series", element.getSeriesElement(), -1); - } - - protected void composeImplementationGuide(Complex parent, String parentType, String name, ImplementationGuide element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ImplementationGuide", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "ImplementationGuide", "url", element.getUrlElement(), -1); - if (element.hasVersionElement()) - composeString(t, "ImplementationGuide", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ImplementationGuide", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "ImplementationGuide", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ImplementationGuide", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "ImplementationGuide", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ImplementationGuide", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "ImplementationGuide", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ImplementationGuide", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "ImplementationGuide", "copyright", element.getCopyrightElement(), -1); - if (element.hasFhirVersionElement()) - composeId(t, "ImplementationGuide", "fhirVersion", element.getFhirVersionElement(), -1); - for (int i = 0; i < element.getDependency().size(); i++) - composeImplementationGuideImplementationGuideDependencyComponent(t, "ImplementationGuide", "dependency", element.getDependency().get(i), i); - for (int i = 0; i < element.getPackage().size(); i++) - composeImplementationGuideImplementationGuidePackageComponent(t, "ImplementationGuide", "package", element.getPackage().get(i), i); - for (int i = 0; i < element.getGlobal().size(); i++) - composeImplementationGuideImplementationGuideGlobalComponent(t, "ImplementationGuide", "global", element.getGlobal().get(i), i); - for (int i = 0; i < element.getBinary().size(); i++) - composeUri(t, "ImplementationGuide", "binary", element.getBinary().get(i), i); - if (element.hasPage()) - composeImplementationGuideImplementationGuidePageComponent(t, "ImplementationGuide", "page", element.getPage(), -1); - } - - protected void composeImplementationGuideImplementationGuideDependencyComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideDependencyComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dependency", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "ImplementationGuide", "type", element.getTypeElement(), -1); - if (element.hasUriElement()) - composeUri(t, "ImplementationGuide", "uri", element.getUriElement(), -1); - } - - protected void composeImplementationGuideImplementationGuidePackageComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePackageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "package", name, element, index); - if (element.hasNameElement()) - composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getResource().size(); i++) - composeImplementationGuideImplementationGuidePackageResourceComponent(t, "ImplementationGuide", "resource", element.getResource().get(i), i); - } - - protected void composeImplementationGuideImplementationGuidePackageResourceComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePackageResourceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "resource", name, element, index); - if (element.hasExampleElement()) - composeBoolean(t, "ImplementationGuide", "example", element.getExampleElement(), -1); - if (element.hasNameElement()) - composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1); - if (element.hasAcronymElement()) - composeString(t, "ImplementationGuide", "acronym", element.getAcronymElement(), -1); - if (element.hasSource()) - composeType(t, "ImplementationGuide", "source", element.getSource(), -1); - if (element.hasExampleFor()) - composeReference(t, "ImplementationGuide", "exampleFor", element.getExampleFor(), -1); - } - - protected void composeImplementationGuideImplementationGuideGlobalComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideGlobalComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "global", name, element, index); - if (element.hasTypeElement()) - composeCode(t, "ImplementationGuide", "type", element.getTypeElement(), -1); - if (element.hasProfile()) - composeReference(t, "ImplementationGuide", "profile", element.getProfile(), -1); - } - - protected void composeImplementationGuideImplementationGuidePageComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "page", name, element, index); - if (element.hasSourceElement()) - composeUri(t, "ImplementationGuide", "source", element.getSourceElement(), -1); - if (element.hasTitleElement()) - composeString(t, "ImplementationGuide", "title", element.getTitleElement(), -1); - if (element.hasKindElement()) - composeEnum(t, "ImplementationGuide", "kind", element.getKindElement(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCode(t, "ImplementationGuide", "type", element.getType().get(i), i); - for (int i = 0; i < element.getPackage().size(); i++) - composeString(t, "ImplementationGuide", "package", element.getPackage().get(i), i); - if (element.hasFormatElement()) - composeCode(t, "ImplementationGuide", "format", element.getFormatElement(), -1); - for (int i = 0; i < element.getPage().size(); i++) - composeImplementationGuideImplementationGuidePageComponent(t, "ImplementationGuide", "page", element.getPage().get(i), i); - } - - protected void composeLibrary(Complex parent, String parentType, String name, Library element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Library", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "Library", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Library", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "Library", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "Library", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "Library", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Library", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "Library", "experimental", element.getExperimentalElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Library", "type", element.getType(), -1); - if (element.hasDateElement()) - composeDateTime(t, "Library", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "Library", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "Library", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "Library", "purpose", element.getPurposeElement(), -1); - if (element.hasUsageElement()) - composeString(t, "Library", "usage", element.getUsageElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "Library", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "Library", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "Library", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "Library", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "Library", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeCodeableConcept(t, "Library", "topic", element.getTopic().get(i), i); - for (int i = 0; i < element.getContributor().size(); i++) - composeContributor(t, "Library", "contributor", element.getContributor().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "Library", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "Library", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "Library", "relatedArtifact", element.getRelatedArtifact().get(i), i); - for (int i = 0; i < element.getParameter().size(); i++) - composeParameterDefinition(t, "Library", "parameter", element.getParameter().get(i), i); - for (int i = 0; i < element.getDataRequirement().size(); i++) - composeDataRequirement(t, "Library", "dataRequirement", element.getDataRequirement().get(i), i); - for (int i = 0; i < element.getContent().size(); i++) - composeAttachment(t, "Library", "content", element.getContent().get(i), i); - } - - protected void composeLinkage(Complex parent, String parentType, String name, Linkage element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Linkage", name, element, index); - if (element.hasActiveElement()) - composeBoolean(t, "Linkage", "active", element.getActiveElement(), -1); - if (element.hasAuthor()) - composeReference(t, "Linkage", "author", element.getAuthor(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeLinkageLinkageItemComponent(t, "Linkage", "item", element.getItem().get(i), i); - } - - protected void composeLinkageLinkageItemComponent(Complex parent, String parentType, String name, Linkage.LinkageItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Linkage", "type", element.getTypeElement(), -1); - if (element.hasResource()) - composeReference(t, "Linkage", "resource", element.getResource(), -1); - } - - protected void composeListResource(Complex parent, String parentType, String name, ListResource element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "List", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "List", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "List", "status", element.getStatusElement(), -1); - if (element.hasModeElement()) - composeEnum(t, "List", "mode", element.getModeElement(), -1); - if (element.hasTitleElement()) - composeString(t, "List", "title", element.getTitleElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "List", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "List", "subject", element.getSubject(), -1); - if (element.hasEncounter()) - composeReference(t, "List", "encounter", element.getEncounter(), -1); - if (element.hasDateElement()) - composeDateTime(t, "List", "date", element.getDateElement(), -1); - if (element.hasSource()) - composeReference(t, "List", "source", element.getSource(), -1); - if (element.hasOrderedBy()) - composeCodeableConcept(t, "List", "orderedBy", element.getOrderedBy(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "List", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getEntry().size(); i++) - composeListResourceListEntryComponent(t, "List", "entry", element.getEntry().get(i), i); - if (element.hasEmptyReason()) - composeCodeableConcept(t, "List", "emptyReason", element.getEmptyReason(), -1); - } - - protected void composeListResourceListEntryComponent(Complex parent, String parentType, String name, ListResource.ListEntryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "entry", name, element, index); - if (element.hasFlag()) - composeCodeableConcept(t, "List", "flag", element.getFlag(), -1); - if (element.hasDeletedElement()) - composeBoolean(t, "List", "deleted", element.getDeletedElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "List", "date", element.getDateElement(), -1); - if (element.hasItem()) - composeReference(t, "List", "item", element.getItem(), -1); - } - - protected void composeLocation(Complex parent, String parentType, String name, Location element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Location", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Location", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Location", "status", element.getStatusElement(), -1); - if (element.hasOperationalStatus()) - composeCoding(t, "Location", "operationalStatus", element.getOperationalStatus(), -1); - if (element.hasNameElement()) - composeString(t, "Location", "name", element.getNameElement(), -1); - for (int i = 0; i < element.getAlias().size(); i++) - composeString(t, "Location", "alias", element.getAlias().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "Location", "description", element.getDescriptionElement(), -1); - if (element.hasModeElement()) - composeEnum(t, "Location", "mode", element.getModeElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Location", "type", element.getType(), -1); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Location", "telecom", element.getTelecom().get(i), i); - if (element.hasAddress()) - composeAddress(t, "Location", "address", element.getAddress(), -1); - if (element.hasPhysicalType()) - composeCodeableConcept(t, "Location", "physicalType", element.getPhysicalType(), -1); - if (element.hasPosition()) - composeLocationLocationPositionComponent(t, "Location", "position", element.getPosition(), -1); - if (element.hasManagingOrganization()) - composeReference(t, "Location", "managingOrganization", element.getManagingOrganization(), -1); - if (element.hasPartOf()) - composeReference(t, "Location", "partOf", element.getPartOf(), -1); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "Location", "endpoint", element.getEndpoint().get(i), i); - } - - protected void composeLocationLocationPositionComponent(Complex parent, String parentType, String name, Location.LocationPositionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "position", name, element, index); - if (element.hasLongitudeElement()) - composeDecimal(t, "Location", "longitude", element.getLongitudeElement(), -1); - if (element.hasLatitudeElement()) - composeDecimal(t, "Location", "latitude", element.getLatitudeElement(), -1); - if (element.hasAltitudeElement()) - composeDecimal(t, "Location", "altitude", element.getAltitudeElement(), -1); - } - - protected void composeMeasure(Complex parent, String parentType, String name, Measure element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Measure", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "Measure", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Measure", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "Measure", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "Measure", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "Measure", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Measure", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "Measure", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "Measure", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "Measure", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "Measure", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "Measure", "purpose", element.getPurposeElement(), -1); - if (element.hasUsageElement()) - composeString(t, "Measure", "usage", element.getUsageElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "Measure", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "Measure", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "Measure", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "Measure", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "Measure", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeCodeableConcept(t, "Measure", "topic", element.getTopic().get(i), i); - for (int i = 0; i < element.getContributor().size(); i++) - composeContributor(t, "Measure", "contributor", element.getContributor().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "Measure", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "Measure", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "Measure", "relatedArtifact", element.getRelatedArtifact().get(i), i); - for (int i = 0; i < element.getLibrary().size(); i++) - composeReference(t, "Measure", "library", element.getLibrary().get(i), i); - if (element.hasDisclaimerElement()) - composeMarkdown(t, "Measure", "disclaimer", element.getDisclaimerElement(), -1); - if (element.hasScoring()) - composeCodeableConcept(t, "Measure", "scoring", element.getScoring(), -1); - if (element.hasCompositeScoring()) - composeCodeableConcept(t, "Measure", "compositeScoring", element.getCompositeScoring(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "Measure", "type", element.getType().get(i), i); - if (element.hasRiskAdjustmentElement()) - composeString(t, "Measure", "riskAdjustment", element.getRiskAdjustmentElement(), -1); - if (element.hasRateAggregationElement()) - composeString(t, "Measure", "rateAggregation", element.getRateAggregationElement(), -1); - if (element.hasRationaleElement()) - composeMarkdown(t, "Measure", "rationale", element.getRationaleElement(), -1); - if (element.hasClinicalRecommendationStatementElement()) - composeMarkdown(t, "Measure", "clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), -1); - if (element.hasImprovementNotationElement()) - composeString(t, "Measure", "improvementNotation", element.getImprovementNotationElement(), -1); - for (int i = 0; i < element.getDefinition().size(); i++) - composeMarkdown(t, "Measure", "definition", element.getDefinition().get(i), i); - if (element.hasGuidanceElement()) - composeMarkdown(t, "Measure", "guidance", element.getGuidanceElement(), -1); - if (element.hasSetElement()) - composeString(t, "Measure", "set", element.getSetElement(), -1); - for (int i = 0; i < element.getGroup().size(); i++) - composeMeasureMeasureGroupComponent(t, "Measure", "group", element.getGroup().get(i), i); - for (int i = 0; i < element.getSupplementalData().size(); i++) - composeMeasureMeasureSupplementalDataComponent(t, "Measure", "supplementalData", element.getSupplementalData().get(i), i); - } - - protected void composeMeasureMeasureGroupComponent(Complex parent, String parentType, String name, Measure.MeasureGroupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "group", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); - if (element.hasNameElement()) - composeString(t, "Measure", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Measure", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getPopulation().size(); i++) - composeMeasureMeasureGroupPopulationComponent(t, "Measure", "population", element.getPopulation().get(i), i); - for (int i = 0; i < element.getStratifier().size(); i++) - composeMeasureMeasureGroupStratifierComponent(t, "Measure", "stratifier", element.getStratifier().get(i), i); - } - - protected void composeMeasureMeasureGroupPopulationComponent(Complex parent, String parentType, String name, Measure.MeasureGroupPopulationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "population", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Measure", "code", element.getCode(), -1); - if (element.hasNameElement()) - composeString(t, "Measure", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Measure", "description", element.getDescriptionElement(), -1); - if (element.hasCriteriaElement()) - composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1); - } - - protected void composeMeasureMeasureGroupStratifierComponent(Complex parent, String parentType, String name, Measure.MeasureGroupStratifierComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "stratifier", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); - if (element.hasCriteriaElement()) - composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1); - if (element.hasPathElement()) - composeString(t, "Measure", "path", element.getPathElement(), -1); - } - - protected void composeMeasureMeasureSupplementalDataComponent(Complex parent, String parentType, String name, Measure.MeasureSupplementalDataComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "supplementalData", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getUsage().size(); i++) - composeCodeableConcept(t, "Measure", "usage", element.getUsage().get(i), i); - if (element.hasCriteriaElement()) - composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1); - if (element.hasPathElement()) - composeString(t, "Measure", "path", element.getPathElement(), -1); - } - - protected void composeMeasureReport(Complex parent, String parentType, String name, MeasureReport element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MeasureReport", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "MeasureReport", "status", element.getStatusElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "MeasureReport", "type", element.getTypeElement(), -1); - if (element.hasMeasure()) - composeReference(t, "MeasureReport", "measure", element.getMeasure(), -1); - if (element.hasPatient()) - composeReference(t, "MeasureReport", "patient", element.getPatient(), -1); - if (element.hasDateElement()) - composeDateTime(t, "MeasureReport", "date", element.getDateElement(), -1); - if (element.hasReportingOrganization()) - composeReference(t, "MeasureReport", "reportingOrganization", element.getReportingOrganization(), -1); - if (element.hasPeriod()) - composePeriod(t, "MeasureReport", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getGroup().size(); i++) - composeMeasureReportMeasureReportGroupComponent(t, "MeasureReport", "group", element.getGroup().get(i), i); - if (element.hasEvaluatedResources()) - composeReference(t, "MeasureReport", "evaluatedResources", element.getEvaluatedResources(), -1); - } - - protected void composeMeasureReportMeasureReportGroupComponent(Complex parent, String parentType, String name, MeasureReport.MeasureReportGroupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "group", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getPopulation().size(); i++) - composeMeasureReportMeasureReportGroupPopulationComponent(t, "MeasureReport", "population", element.getPopulation().get(i), i); - if (element.hasMeasureScoreElement()) - composeDecimal(t, "MeasureReport", "measureScore", element.getMeasureScoreElement(), -1); - for (int i = 0; i < element.getStratifier().size(); i++) - composeMeasureReportMeasureReportGroupStratifierComponent(t, "MeasureReport", "stratifier", element.getStratifier().get(i), i); - } - - protected void composeMeasureReportMeasureReportGroupPopulationComponent(Complex parent, String parentType, String name, MeasureReport.MeasureReportGroupPopulationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "population", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "MeasureReport", "code", element.getCode(), -1); - if (element.hasCountElement()) - composeInteger(t, "MeasureReport", "count", element.getCountElement(), -1); - if (element.hasPatients()) - composeReference(t, "MeasureReport", "patients", element.getPatients(), -1); - } - - protected void composeMeasureReportMeasureReportGroupStratifierComponent(Complex parent, String parentType, String name, MeasureReport.MeasureReportGroupStratifierComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "stratifier", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getStratum().size(); i++) - composeMeasureReportStratifierGroupComponent(t, "MeasureReport", "stratum", element.getStratum().get(i), i); - } - - protected void composeMeasureReportStratifierGroupComponent(Complex parent, String parentType, String name, MeasureReport.StratifierGroupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "stratum", name, element, index); - if (element.hasValueElement()) - composeString(t, "MeasureReport", "value", element.getValueElement(), -1); - for (int i = 0; i < element.getPopulation().size(); i++) - composeMeasureReportStratifierGroupPopulationComponent(t, "MeasureReport", "population", element.getPopulation().get(i), i); - if (element.hasMeasureScoreElement()) - composeDecimal(t, "MeasureReport", "measureScore", element.getMeasureScoreElement(), -1); - } - - protected void composeMeasureReportStratifierGroupPopulationComponent(Complex parent, String parentType, String name, MeasureReport.StratifierGroupPopulationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "population", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "MeasureReport", "code", element.getCode(), -1); - if (element.hasCountElement()) - composeInteger(t, "MeasureReport", "count", element.getCountElement(), -1); - if (element.hasPatients()) - composeReference(t, "MeasureReport", "patients", element.getPatients(), -1); - } - - protected void composeMedia(Complex parent, String parentType, String name, Media element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Media", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Media", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "Media", "basedOn", element.getBasedOn().get(i), i); - if (element.hasTypeElement()) - composeEnum(t, "Media", "type", element.getTypeElement(), -1); - if (element.hasSubtype()) - composeCodeableConcept(t, "Media", "subtype", element.getSubtype(), -1); - if (element.hasView()) - composeCodeableConcept(t, "Media", "view", element.getView(), -1); - if (element.hasSubject()) - composeReference(t, "Media", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "Media", "context", element.getContext(), -1); - if (element.hasOccurrence()) - composeType(t, "Media", "occurrence", element.getOccurrence(), -1); - if (element.hasOperator()) - composeReference(t, "Media", "operator", element.getOperator(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "Media", "reasonCode", element.getReasonCode().get(i), i); - if (element.hasBodySite()) - composeCodeableConcept(t, "Media", "bodySite", element.getBodySite(), -1); - if (element.hasDevice()) - composeReference(t, "Media", "device", element.getDevice(), -1); - if (element.hasHeightElement()) - composePositiveInt(t, "Media", "height", element.getHeightElement(), -1); - if (element.hasWidthElement()) - composePositiveInt(t, "Media", "width", element.getWidthElement(), -1); - if (element.hasFramesElement()) - composePositiveInt(t, "Media", "frames", element.getFramesElement(), -1); - if (element.hasDurationElement()) - composeUnsignedInt(t, "Media", "duration", element.getDurationElement(), -1); - if (element.hasContent()) - composeAttachment(t, "Media", "content", element.getContent(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Media", "note", element.getNote().get(i), i); - } - - protected void composeMedication(Complex parent, String parentType, String name, Medication element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Medication", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "Medication", "code", element.getCode(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Medication", "status", element.getStatusElement(), -1); - if (element.hasIsBrandElement()) - composeBoolean(t, "Medication", "isBrand", element.getIsBrandElement(), -1); - if (element.hasIsOverTheCounterElement()) - composeBoolean(t, "Medication", "isOverTheCounter", element.getIsOverTheCounterElement(), -1); - if (element.hasManufacturer()) - composeReference(t, "Medication", "manufacturer", element.getManufacturer(), -1); - if (element.hasForm()) - composeCodeableConcept(t, "Medication", "form", element.getForm(), -1); - for (int i = 0; i < element.getIngredient().size(); i++) - composeMedicationMedicationIngredientComponent(t, "Medication", "ingredient", element.getIngredient().get(i), i); - if (element.hasPackage()) - composeMedicationMedicationPackageComponent(t, "Medication", "package", element.getPackage(), -1); - for (int i = 0; i < element.getImage().size(); i++) - composeAttachment(t, "Medication", "image", element.getImage().get(i), i); - } - - protected void composeMedicationMedicationIngredientComponent(Complex parent, String parentType, String name, Medication.MedicationIngredientComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "ingredient", name, element, index); - if (element.hasItem()) - composeType(t, "Medication", "item", element.getItem(), -1); - if (element.hasIsActiveElement()) - composeBoolean(t, "Medication", "isActive", element.getIsActiveElement(), -1); - if (element.hasAmount()) - composeRatio(t, "Medication", "amount", element.getAmount(), -1); - } - - protected void composeMedicationMedicationPackageComponent(Complex parent, String parentType, String name, Medication.MedicationPackageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "package", name, element, index); - if (element.hasContainer()) - composeCodeableConcept(t, "Medication", "container", element.getContainer(), -1); - for (int i = 0; i < element.getContent().size(); i++) - composeMedicationMedicationPackageContentComponent(t, "Medication", "content", element.getContent().get(i), i); - for (int i = 0; i < element.getBatch().size(); i++) - composeMedicationMedicationPackageBatchComponent(t, "Medication", "batch", element.getBatch().get(i), i); - } - - protected void composeMedicationMedicationPackageContentComponent(Complex parent, String parentType, String name, Medication.MedicationPackageContentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "content", name, element, index); - if (element.hasItem()) - composeType(t, "Medication", "item", element.getItem(), -1); - if (element.hasAmount()) - composeQuantity(t, "Medication", "amount", element.getAmount(), -1); - } - - protected void composeMedicationMedicationPackageBatchComponent(Complex parent, String parentType, String name, Medication.MedicationPackageBatchComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "batch", name, element, index); - if (element.hasLotNumberElement()) - composeString(t, "Medication", "lotNumber", element.getLotNumberElement(), -1); - if (element.hasExpirationDateElement()) - composeDateTime(t, "Medication", "expirationDate", element.getExpirationDateElement(), -1); - } - - protected void composeMedicationAdministration(Complex parent, String parentType, String name, MedicationAdministration element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MedicationAdministration", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "MedicationAdministration", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "MedicationAdministration", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "MedicationAdministration", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "MedicationAdministration", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "MedicationAdministration", "category", element.getCategory(), -1); - if (element.hasMedication()) - composeType(t, "MedicationAdministration", "medication", element.getMedication(), -1); - if (element.hasSubject()) - composeReference(t, "MedicationAdministration", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "MedicationAdministration", "context", element.getContext(), -1); - for (int i = 0; i < element.getSupportingInformation().size(); i++) - composeReference(t, "MedicationAdministration", "supportingInformation", element.getSupportingInformation().get(i), i); - if (element.hasEffective()) - composeType(t, "MedicationAdministration", "effective", element.getEffective(), -1); - for (int i = 0; i < element.getPerformer().size(); i++) - composeMedicationAdministrationMedicationAdministrationPerformerComponent(t, "MedicationAdministration", "performer", element.getPerformer().get(i), i); - if (element.hasNotGivenElement()) - composeBoolean(t, "MedicationAdministration", "notGiven", element.getNotGivenElement(), -1); - for (int i = 0; i < element.getReasonNotGiven().size(); i++) - composeCodeableConcept(t, "MedicationAdministration", "reasonNotGiven", element.getReasonNotGiven().get(i), i); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "MedicationAdministration", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "MedicationAdministration", "reasonReference", element.getReasonReference().get(i), i); - if (element.hasRequest()) - composeReference(t, "MedicationAdministration", "request", element.getRequest(), -1); - for (int i = 0; i < element.getDevice().size(); i++) - composeReference(t, "MedicationAdministration", "device", element.getDevice().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "MedicationAdministration", "note", element.getNote().get(i), i); - if (element.hasDosage()) - composeMedicationAdministrationMedicationAdministrationDosageComponent(t, "MedicationAdministration", "dosage", element.getDosage(), -1); - for (int i = 0; i < element.getEventHistory().size(); i++) - composeReference(t, "MedicationAdministration", "eventHistory", element.getEventHistory().get(i), i); - } - - protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(Complex parent, String parentType, String name, MedicationAdministration.MedicationAdministrationPerformerComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "performer", name, element, index); - if (element.hasActor()) - composeReference(t, "MedicationAdministration", "actor", element.getActor(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "MedicationAdministration", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(Complex parent, String parentType, String name, MedicationAdministration.MedicationAdministrationDosageComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dosage", name, element, index); - if (element.hasTextElement()) - composeString(t, "MedicationAdministration", "text", element.getTextElement(), -1); - if (element.hasSite()) - composeCodeableConcept(t, "MedicationAdministration", "site", element.getSite(), -1); - if (element.hasRoute()) - composeCodeableConcept(t, "MedicationAdministration", "route", element.getRoute(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "MedicationAdministration", "method", element.getMethod(), -1); - if (element.hasDose()) - composeQuantity(t, "MedicationAdministration", "dose", element.getDose(), -1); - if (element.hasRate()) - composeType(t, "MedicationAdministration", "rate", element.getRate(), -1); - } - - protected void composeMedicationDispense(Complex parent, String parentType, String name, MedicationDispense element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MedicationDispense", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "MedicationDispense", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "MedicationDispense", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "MedicationDispense", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "MedicationDispense", "category", element.getCategory(), -1); - if (element.hasMedication()) - composeType(t, "MedicationDispense", "medication", element.getMedication(), -1); - if (element.hasSubject()) - composeReference(t, "MedicationDispense", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "MedicationDispense", "context", element.getContext(), -1); - for (int i = 0; i < element.getSupportingInformation().size(); i++) - composeReference(t, "MedicationDispense", "supportingInformation", element.getSupportingInformation().get(i), i); - for (int i = 0; i < element.getPerformer().size(); i++) - composeMedicationDispenseMedicationDispensePerformerComponent(t, "MedicationDispense", "performer", element.getPerformer().get(i), i); - for (int i = 0; i < element.getAuthorizingPrescription().size(); i++) - composeReference(t, "MedicationDispense", "authorizingPrescription", element.getAuthorizingPrescription().get(i), i); - if (element.hasType()) - composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1); - if (element.hasQuantity()) - composeQuantity(t, "MedicationDispense", "quantity", element.getQuantity(), -1); - if (element.hasDaysSupply()) - composeQuantity(t, "MedicationDispense", "daysSupply", element.getDaysSupply(), -1); - if (element.hasWhenPreparedElement()) - composeDateTime(t, "MedicationDispense", "whenPrepared", element.getWhenPreparedElement(), -1); - if (element.hasWhenHandedOverElement()) - composeDateTime(t, "MedicationDispense", "whenHandedOver", element.getWhenHandedOverElement(), -1); - if (element.hasDestination()) - composeReference(t, "MedicationDispense", "destination", element.getDestination(), -1); - for (int i = 0; i < element.getReceiver().size(); i++) - composeReference(t, "MedicationDispense", "receiver", element.getReceiver().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "MedicationDispense", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getDosageInstruction().size(); i++) - composeDosage(t, "MedicationDispense", "dosageInstruction", element.getDosageInstruction().get(i), i); - if (element.hasSubstitution()) - composeMedicationDispenseMedicationDispenseSubstitutionComponent(t, "MedicationDispense", "substitution", element.getSubstitution(), -1); - for (int i = 0; i < element.getDetectedIssue().size(); i++) - composeReference(t, "MedicationDispense", "detectedIssue", element.getDetectedIssue().get(i), i); - if (element.hasNotDoneElement()) - composeBoolean(t, "MedicationDispense", "notDone", element.getNotDoneElement(), -1); - if (element.hasNotDoneReason()) - composeType(t, "MedicationDispense", "notDoneReason", element.getNotDoneReason(), -1); - for (int i = 0; i < element.getEventHistory().size(); i++) - composeReference(t, "MedicationDispense", "eventHistory", element.getEventHistory().get(i), i); - } - - protected void composeMedicationDispenseMedicationDispensePerformerComponent(Complex parent, String parentType, String name, MedicationDispense.MedicationDispensePerformerComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "performer", name, element, index); - if (element.hasActor()) - composeReference(t, "MedicationDispense", "actor", element.getActor(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "MedicationDispense", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(Complex parent, String parentType, String name, MedicationDispense.MedicationDispenseSubstitutionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "substitution", name, element, index); - if (element.hasWasSubstitutedElement()) - composeBoolean(t, "MedicationDispense", "wasSubstituted", element.getWasSubstitutedElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1); - for (int i = 0; i < element.getReason().size(); i++) - composeCodeableConcept(t, "MedicationDispense", "reason", element.getReason().get(i), i); - for (int i = 0; i < element.getResponsibleParty().size(); i++) - composeReference(t, "MedicationDispense", "responsibleParty", element.getResponsibleParty().get(i), i); - } - - protected void composeMedicationRequest(Complex parent, String parentType, String name, MedicationRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MedicationRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "MedicationRequest", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "MedicationRequest", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "MedicationRequest", "basedOn", element.getBasedOn().get(i), i); - if (element.hasGroupIdentifier()) - composeIdentifier(t, "MedicationRequest", "groupIdentifier", element.getGroupIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "MedicationRequest", "status", element.getStatusElement(), -1); - if (element.hasIntentElement()) - composeEnum(t, "MedicationRequest", "intent", element.getIntentElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "MedicationRequest", "category", element.getCategory(), -1); - if (element.hasPriorityElement()) - composeEnum(t, "MedicationRequest", "priority", element.getPriorityElement(), -1); - if (element.hasMedication()) - composeType(t, "MedicationRequest", "medication", element.getMedication(), -1); - if (element.hasSubject()) - composeReference(t, "MedicationRequest", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "MedicationRequest", "context", element.getContext(), -1); - for (int i = 0; i < element.getSupportingInformation().size(); i++) - composeReference(t, "MedicationRequest", "supportingInformation", element.getSupportingInformation().get(i), i); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "MedicationRequest", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasRequester()) - composeMedicationRequestMedicationRequestRequesterComponent(t, "MedicationRequest", "requester", element.getRequester(), -1); - if (element.hasRecorder()) - composeReference(t, "MedicationRequest", "recorder", element.getRecorder(), -1); - if (element.hasPerformer()) - composeReference(t, "MedicationRequest", "performer", element.getPerformer(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "MedicationRequest", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "MedicationRequest", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "MedicationRequest", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getDosageInstruction().size(); i++) - composeDosage(t, "MedicationRequest", "dosageInstruction", element.getDosageInstruction().get(i), i); - if (element.hasDispenseRequest()) - composeMedicationRequestMedicationRequestDispenseRequestComponent(t, "MedicationRequest", "dispenseRequest", element.getDispenseRequest(), -1); - if (element.hasSubstitution()) - composeMedicationRequestMedicationRequestSubstitutionComponent(t, "MedicationRequest", "substitution", element.getSubstitution(), -1); - if (element.hasPriorPrescription()) - composeReference(t, "MedicationRequest", "priorPrescription", element.getPriorPrescription(), -1); - for (int i = 0; i < element.getDetectedIssue().size(); i++) - composeReference(t, "MedicationRequest", "detectedIssue", element.getDetectedIssue().get(i), i); - for (int i = 0; i < element.getEventHistory().size(); i++) - composeReference(t, "MedicationRequest", "eventHistory", element.getEventHistory().get(i), i); - } - - protected void composeMedicationRequestMedicationRequestRequesterComponent(Complex parent, String parentType, String name, MedicationRequest.MedicationRequestRequesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requester", name, element, index); - if (element.hasAgent()) - composeReference(t, "MedicationRequest", "agent", element.getAgent(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "MedicationRequest", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(Complex parent, String parentType, String name, MedicationRequest.MedicationRequestDispenseRequestComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dispenseRequest", name, element, index); - if (element.hasValidityPeriod()) - composePeriod(t, "MedicationRequest", "validityPeriod", element.getValidityPeriod(), -1); - if (element.hasNumberOfRepeatsAllowedElement()) - composeUnsignedInt(t, "MedicationRequest", "numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), -1); - if (element.hasQuantity()) - composeQuantity(t, "MedicationRequest", "quantity", element.getQuantity(), -1); - if (element.hasExpectedSupplyDuration()) - composeDuration(t, "MedicationRequest", "expectedSupplyDuration", element.getExpectedSupplyDuration(), -1); - if (element.hasPerformer()) - composeReference(t, "MedicationRequest", "performer", element.getPerformer(), -1); - } - - protected void composeMedicationRequestMedicationRequestSubstitutionComponent(Complex parent, String parentType, String name, MedicationRequest.MedicationRequestSubstitutionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "substitution", name, element, index); - if (element.hasAllowedElement()) - composeBoolean(t, "MedicationRequest", "allowed", element.getAllowedElement(), -1); - if (element.hasReason()) - composeCodeableConcept(t, "MedicationRequest", "reason", element.getReason(), -1); - } - - protected void composeMedicationStatement(Complex parent, String parentType, String name, MedicationStatement element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MedicationStatement", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "MedicationStatement", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "MedicationStatement", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "MedicationStatement", "partOf", element.getPartOf().get(i), i); - if (element.hasContext()) - composeReference(t, "MedicationStatement", "context", element.getContext(), -1); - if (element.hasStatusElement()) - composeEnum(t, "MedicationStatement", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "MedicationStatement", "category", element.getCategory(), -1); - if (element.hasMedication()) - composeType(t, "MedicationStatement", "medication", element.getMedication(), -1); - if (element.hasEffective()) - composeType(t, "MedicationStatement", "effective", element.getEffective(), -1); - if (element.hasDateAssertedElement()) - composeDateTime(t, "MedicationStatement", "dateAsserted", element.getDateAssertedElement(), -1); - if (element.hasInformationSource()) - composeReference(t, "MedicationStatement", "informationSource", element.getInformationSource(), -1); - if (element.hasSubject()) - composeReference(t, "MedicationStatement", "subject", element.getSubject(), -1); - for (int i = 0; i < element.getDerivedFrom().size(); i++) - composeReference(t, "MedicationStatement", "derivedFrom", element.getDerivedFrom().get(i), i); - if (element.hasTakenElement()) - composeEnum(t, "MedicationStatement", "taken", element.getTakenElement(), -1); - for (int i = 0; i < element.getReasonNotTaken().size(); i++) - composeCodeableConcept(t, "MedicationStatement", "reasonNotTaken", element.getReasonNotTaken().get(i), i); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "MedicationStatement", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "MedicationStatement", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "MedicationStatement", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getDosage().size(); i++) - composeDosage(t, "MedicationStatement", "dosage", element.getDosage().get(i), i); - } - - protected void composeMessageDefinition(Complex parent, String parentType, String name, MessageDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MessageDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "MessageDefinition", "url", element.getUrlElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "MessageDefinition", "identifier", element.getIdentifier(), -1); - if (element.hasVersionElement()) - composeString(t, "MessageDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "MessageDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "MessageDefinition", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "MessageDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "MessageDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "MessageDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "MessageDefinition", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "MessageDefinition", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "MessageDefinition", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "MessageDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "MessageDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "MessageDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "MessageDefinition", "copyright", element.getCopyrightElement(), -1); - if (element.hasBase()) - composeReference(t, "MessageDefinition", "base", element.getBase(), -1); - for (int i = 0; i < element.getParent().size(); i++) - composeReference(t, "MessageDefinition", "parent", element.getParent().get(i), i); - for (int i = 0; i < element.getReplaces().size(); i++) - composeReference(t, "MessageDefinition", "replaces", element.getReplaces().get(i), i); - if (element.hasEvent()) - composeCoding(t, "MessageDefinition", "event", element.getEvent(), -1); - if (element.hasCategoryElement()) - composeEnum(t, "MessageDefinition", "category", element.getCategoryElement(), -1); - for (int i = 0; i < element.getFocus().size(); i++) - composeMessageDefinitionMessageDefinitionFocusComponent(t, "MessageDefinition", "focus", element.getFocus().get(i), i); - if (element.hasResponseRequiredElement()) - composeBoolean(t, "MessageDefinition", "responseRequired", element.getResponseRequiredElement(), -1); - for (int i = 0; i < element.getAllowedResponse().size(); i++) - composeMessageDefinitionMessageDefinitionAllowedResponseComponent(t, "MessageDefinition", "allowedResponse", element.getAllowedResponse().get(i), i); - } - - protected void composeMessageDefinitionMessageDefinitionFocusComponent(Complex parent, String parentType, String name, MessageDefinition.MessageDefinitionFocusComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "focus", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "MessageDefinition", "code", element.getCodeElement(), -1); - if (element.hasProfile()) - composeReference(t, "MessageDefinition", "profile", element.getProfile(), -1); - if (element.hasMinElement()) - composeUnsignedInt(t, "MessageDefinition", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "MessageDefinition", "max", element.getMaxElement(), -1); - } - - protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(Complex parent, String parentType, String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "allowedResponse", name, element, index); - if (element.hasMessage()) - composeReference(t, "MessageDefinition", "message", element.getMessage(), -1); - if (element.hasSituationElement()) - composeMarkdown(t, "MessageDefinition", "situation", element.getSituationElement(), -1); - } - - protected void composeMessageHeader(Complex parent, String parentType, String name, MessageHeader element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "MessageHeader", name, element, index); - if (element.hasEvent()) - composeCoding(t, "MessageHeader", "event", element.getEvent(), -1); - for (int i = 0; i < element.getDestination().size(); i++) - composeMessageHeaderMessageDestinationComponent(t, "MessageHeader", "destination", element.getDestination().get(i), i); - if (element.hasSender()) - composeReference(t, "MessageHeader", "sender", element.getSender(), -1); - if (element.hasTimestampElement()) - composeInstant(t, "MessageHeader", "timestamp", element.getTimestampElement(), -1); - if (element.hasEnterer()) - composeReference(t, "MessageHeader", "enterer", element.getEnterer(), -1); - if (element.hasAuthor()) - composeReference(t, "MessageHeader", "author", element.getAuthor(), -1); - if (element.hasSource()) - composeMessageHeaderMessageSourceComponent(t, "MessageHeader", "source", element.getSource(), -1); - if (element.hasResponsible()) - composeReference(t, "MessageHeader", "responsible", element.getResponsible(), -1); - if (element.hasReason()) - composeCodeableConcept(t, "MessageHeader", "reason", element.getReason(), -1); - if (element.hasResponse()) - composeMessageHeaderMessageHeaderResponseComponent(t, "MessageHeader", "response", element.getResponse(), -1); - for (int i = 0; i < element.getFocus().size(); i++) - composeReference(t, "MessageHeader", "focus", element.getFocus().get(i), i); - } - - protected void composeMessageHeaderMessageDestinationComponent(Complex parent, String parentType, String name, MessageHeader.MessageDestinationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "destination", name, element, index); - if (element.hasNameElement()) - composeString(t, "MessageHeader", "name", element.getNameElement(), -1); - if (element.hasTarget()) - composeReference(t, "MessageHeader", "target", element.getTarget(), -1); - if (element.hasEndpointElement()) - composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1); - if (element.hasReceiver()) - composeReference(t, "MessageHeader", "receiver", element.getReceiver(), -1); - } - - protected void composeMessageHeaderMessageSourceComponent(Complex parent, String parentType, String name, MessageHeader.MessageSourceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "source", name, element, index); - if (element.hasNameElement()) - composeString(t, "MessageHeader", "name", element.getNameElement(), -1); - if (element.hasSoftwareElement()) - composeString(t, "MessageHeader", "software", element.getSoftwareElement(), -1); - if (element.hasVersionElement()) - composeString(t, "MessageHeader", "version", element.getVersionElement(), -1); - if (element.hasContact()) - composeContactPoint(t, "MessageHeader", "contact", element.getContact(), -1); - if (element.hasEndpointElement()) - composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1); - } - - protected void composeMessageHeaderMessageHeaderResponseComponent(Complex parent, String parentType, String name, MessageHeader.MessageHeaderResponseComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "response", name, element, index); - if (element.hasIdentifierElement()) - composeId(t, "MessageHeader", "identifier", element.getIdentifierElement(), -1); - if (element.hasCodeElement()) - composeEnum(t, "MessageHeader", "code", element.getCodeElement(), -1); - if (element.hasDetails()) - composeReference(t, "MessageHeader", "details", element.getDetails(), -1); - } - - protected void composeNamingSystem(Complex parent, String parentType, String name, NamingSystem element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "NamingSystem", name, element, index); - if (element.hasNameElement()) - composeString(t, "NamingSystem", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "NamingSystem", "status", element.getStatusElement(), -1); - if (element.hasKindElement()) - composeEnum(t, "NamingSystem", "kind", element.getKindElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "NamingSystem", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "NamingSystem", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "NamingSystem", "contact", element.getContact().get(i), i); - if (element.hasResponsibleElement()) - composeString(t, "NamingSystem", "responsible", element.getResponsibleElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "NamingSystem", "type", element.getType(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "NamingSystem", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "NamingSystem", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "NamingSystem", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasUsageElement()) - composeString(t, "NamingSystem", "usage", element.getUsageElement(), -1); - for (int i = 0; i < element.getUniqueId().size(); i++) - composeNamingSystemNamingSystemUniqueIdComponent(t, "NamingSystem", "uniqueId", element.getUniqueId().get(i), i); - if (element.hasReplacedBy()) - composeReference(t, "NamingSystem", "replacedBy", element.getReplacedBy(), -1); - } - - protected void composeNamingSystemNamingSystemUniqueIdComponent(Complex parent, String parentType, String name, NamingSystem.NamingSystemUniqueIdComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "uniqueId", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "NamingSystem", "type", element.getTypeElement(), -1); - if (element.hasValueElement()) - composeString(t, "NamingSystem", "value", element.getValueElement(), -1); - if (element.hasPreferredElement()) - composeBoolean(t, "NamingSystem", "preferred", element.getPreferredElement(), -1); - if (element.hasCommentElement()) - composeString(t, "NamingSystem", "comment", element.getCommentElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "NamingSystem", "period", element.getPeriod(), -1); - } - - protected void composeNutritionOrder(Complex parent, String parentType, String name, NutritionOrder element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "NutritionOrder", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "NutritionOrder", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "NutritionOrder", "status", element.getStatusElement(), -1); - if (element.hasPatient()) - composeReference(t, "NutritionOrder", "patient", element.getPatient(), -1); - if (element.hasEncounter()) - composeReference(t, "NutritionOrder", "encounter", element.getEncounter(), -1); - if (element.hasDateTimeElement()) - composeDateTime(t, "NutritionOrder", "dateTime", element.getDateTimeElement(), -1); - if (element.hasOrderer()) - composeReference(t, "NutritionOrder", "orderer", element.getOrderer(), -1); - for (int i = 0; i < element.getAllergyIntolerance().size(); i++) - composeReference(t, "NutritionOrder", "allergyIntolerance", element.getAllergyIntolerance().get(i), i); - for (int i = 0; i < element.getFoodPreferenceModifier().size(); i++) - composeCodeableConcept(t, "NutritionOrder", "foodPreferenceModifier", element.getFoodPreferenceModifier().get(i), i); - for (int i = 0; i < element.getExcludeFoodModifier().size(); i++) - composeCodeableConcept(t, "NutritionOrder", "excludeFoodModifier", element.getExcludeFoodModifier().get(i), i); - if (element.hasOralDiet()) - composeNutritionOrderNutritionOrderOralDietComponent(t, "NutritionOrder", "oralDiet", element.getOralDiet(), -1); - for (int i = 0; i < element.getSupplement().size(); i++) - composeNutritionOrderNutritionOrderSupplementComponent(t, "NutritionOrder", "supplement", element.getSupplement().get(i), i); - if (element.hasEnteralFormula()) - composeNutritionOrderNutritionOrderEnteralFormulaComponent(t, "NutritionOrder", "enteralFormula", element.getEnteralFormula(), -1); - } - - protected void composeNutritionOrderNutritionOrderOralDietComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "oralDiet", name, element, index); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "NutritionOrder", "type", element.getType().get(i), i); - for (int i = 0; i < element.getSchedule().size(); i++) - composeTiming(t, "NutritionOrder", "schedule", element.getSchedule().get(i), i); - for (int i = 0; i < element.getNutrient().size(); i++) - composeNutritionOrderNutritionOrderOralDietNutrientComponent(t, "NutritionOrder", "nutrient", element.getNutrient().get(i), i); - for (int i = 0; i < element.getTexture().size(); i++) - composeNutritionOrderNutritionOrderOralDietTextureComponent(t, "NutritionOrder", "texture", element.getTexture().get(i), i); - for (int i = 0; i < element.getFluidConsistencyType().size(); i++) - composeCodeableConcept(t, "NutritionOrder", "fluidConsistencyType", element.getFluidConsistencyType().get(i), i); - if (element.hasInstructionElement()) - composeString(t, "NutritionOrder", "instruction", element.getInstructionElement(), -1); - } - - protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "nutrient", name, element, index); - if (element.hasModifier()) - composeCodeableConcept(t, "NutritionOrder", "modifier", element.getModifier(), -1); - if (element.hasAmount()) - composeQuantity(t, "NutritionOrder", "amount", element.getAmount(), -1); - } - - protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietTextureComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "texture", name, element, index); - if (element.hasModifier()) - composeCodeableConcept(t, "NutritionOrder", "modifier", element.getModifier(), -1); - if (element.hasFoodType()) - composeCodeableConcept(t, "NutritionOrder", "foodType", element.getFoodType(), -1); - } - - protected void composeNutritionOrderNutritionOrderSupplementComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderSupplementComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "supplement", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "NutritionOrder", "type", element.getType(), -1); - if (element.hasProductNameElement()) - composeString(t, "NutritionOrder", "productName", element.getProductNameElement(), -1); - for (int i = 0; i < element.getSchedule().size(); i++) - composeTiming(t, "NutritionOrder", "schedule", element.getSchedule().get(i), i); - if (element.hasQuantity()) - composeQuantity(t, "NutritionOrder", "quantity", element.getQuantity(), -1); - if (element.hasInstructionElement()) - composeString(t, "NutritionOrder", "instruction", element.getInstructionElement(), -1); - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "enteralFormula", name, element, index); - if (element.hasBaseFormulaType()) - composeCodeableConcept(t, "NutritionOrder", "baseFormulaType", element.getBaseFormulaType(), -1); - if (element.hasBaseFormulaProductNameElement()) - composeString(t, "NutritionOrder", "baseFormulaProductName", element.getBaseFormulaProductNameElement(), -1); - if (element.hasAdditiveType()) - composeCodeableConcept(t, "NutritionOrder", "additiveType", element.getAdditiveType(), -1); - if (element.hasAdditiveProductNameElement()) - composeString(t, "NutritionOrder", "additiveProductName", element.getAdditiveProductNameElement(), -1); - if (element.hasCaloricDensity()) - composeQuantity(t, "NutritionOrder", "caloricDensity", element.getCaloricDensity(), -1); - if (element.hasRouteofAdministration()) - composeCodeableConcept(t, "NutritionOrder", "routeofAdministration", element.getRouteofAdministration(), -1); - for (int i = 0; i < element.getAdministration().size(); i++) - composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(t, "NutritionOrder", "administration", element.getAdministration().get(i), i); - if (element.hasMaxVolumeToDeliver()) - composeQuantity(t, "NutritionOrder", "maxVolumeToDeliver", element.getMaxVolumeToDeliver(), -1); - if (element.hasAdministrationInstructionElement()) - composeString(t, "NutritionOrder", "administrationInstruction", element.getAdministrationInstructionElement(), -1); - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "administration", name, element, index); - if (element.hasSchedule()) - composeTiming(t, "NutritionOrder", "schedule", element.getSchedule(), -1); - if (element.hasQuantity()) - composeQuantity(t, "NutritionOrder", "quantity", element.getQuantity(), -1); - if (element.hasRate()) - composeType(t, "NutritionOrder", "rate", element.getRate(), -1); - } - - protected void composeObservation(Complex parent, String parentType, String name, Observation element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Observation", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Observation", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "Observation", "basedOn", element.getBasedOn().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Observation", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "Observation", "category", element.getCategory().get(i), i); - if (element.hasCode()) - composeCodeableConcept(t, "Observation", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "Observation", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "Observation", "context", element.getContext(), -1); - if (element.hasEffective()) - composeType(t, "Observation", "effective", element.getEffective(), -1); - if (element.hasIssuedElement()) - composeInstant(t, "Observation", "issued", element.getIssuedElement(), -1); - for (int i = 0; i < element.getPerformer().size(); i++) - composeReference(t, "Observation", "performer", element.getPerformer().get(i), i); - if (element.hasValue()) - composeType(t, "Observation", "value", element.getValue(), -1); - if (element.hasDataAbsentReason()) - composeCodeableConcept(t, "Observation", "dataAbsentReason", element.getDataAbsentReason(), -1); - if (element.hasInterpretation()) - composeCodeableConcept(t, "Observation", "interpretation", element.getInterpretation(), -1); - if (element.hasCommentElement()) - composeString(t, "Observation", "comment", element.getCommentElement(), -1); - if (element.hasBodySite()) - composeCodeableConcept(t, "Observation", "bodySite", element.getBodySite(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "Observation", "method", element.getMethod(), -1); - if (element.hasSpecimen()) - composeReference(t, "Observation", "specimen", element.getSpecimen(), -1); - if (element.hasDevice()) - composeReference(t, "Observation", "device", element.getDevice(), -1); - for (int i = 0; i < element.getReferenceRange().size(); i++) - composeObservationObservationReferenceRangeComponent(t, "Observation", "referenceRange", element.getReferenceRange().get(i), i); - for (int i = 0; i < element.getRelated().size(); i++) - composeObservationObservationRelatedComponent(t, "Observation", "related", element.getRelated().get(i), i); - for (int i = 0; i < element.getComponent().size(); i++) - composeObservationObservationComponentComponent(t, "Observation", "component", element.getComponent().get(i), i); - } - - protected void composeObservationObservationReferenceRangeComponent(Complex parent, String parentType, String name, Observation.ObservationReferenceRangeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "referenceRange", name, element, index); - if (element.hasLow()) - composeQuantity(t, "Observation", "low", element.getLow(), -1); - if (element.hasHigh()) - composeQuantity(t, "Observation", "high", element.getHigh(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Observation", "type", element.getType(), -1); - for (int i = 0; i < element.getAppliesTo().size(); i++) - composeCodeableConcept(t, "Observation", "appliesTo", element.getAppliesTo().get(i), i); - if (element.hasAge()) - composeRange(t, "Observation", "age", element.getAge(), -1); - if (element.hasTextElement()) - composeString(t, "Observation", "text", element.getTextElement(), -1); - } - - protected void composeObservationObservationRelatedComponent(Complex parent, String parentType, String name, Observation.ObservationRelatedComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "related", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Observation", "type", element.getTypeElement(), -1); - if (element.hasTarget()) - composeReference(t, "Observation", "target", element.getTarget(), -1); - } - - protected void composeObservationObservationComponentComponent(Complex parent, String parentType, String name, Observation.ObservationComponentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "component", name, element, index); - if (element.hasCode()) - composeCodeableConcept(t, "Observation", "code", element.getCode(), -1); - if (element.hasValue()) - composeType(t, "Observation", "value", element.getValue(), -1); - if (element.hasDataAbsentReason()) - composeCodeableConcept(t, "Observation", "dataAbsentReason", element.getDataAbsentReason(), -1); - if (element.hasInterpretation()) - composeCodeableConcept(t, "Observation", "interpretation", element.getInterpretation(), -1); - for (int i = 0; i < element.getReferenceRange().size(); i++) - composeObservationObservationReferenceRangeComponent(t, "Observation", "referenceRange", element.getReferenceRange().get(i), i); - } - - protected void composeOperationDefinition(Complex parent, String parentType, String name, OperationDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "OperationDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "OperationDefinition", "url", element.getUrlElement(), -1); - if (element.hasVersionElement()) - composeString(t, "OperationDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "OperationDefinition", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "OperationDefinition", "status", element.getStatusElement(), -1); - if (element.hasKindElement()) - composeEnum(t, "OperationDefinition", "kind", element.getKindElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "OperationDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "OperationDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "OperationDefinition", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "OperationDefinition", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "OperationDefinition", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "OperationDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "OperationDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "OperationDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasIdempotentElement()) - composeBoolean(t, "OperationDefinition", "idempotent", element.getIdempotentElement(), -1); - if (element.hasCodeElement()) - composeCode(t, "OperationDefinition", "code", element.getCodeElement(), -1); - if (element.hasCommentElement()) - composeString(t, "OperationDefinition", "comment", element.getCommentElement(), -1); - if (element.hasBase()) - composeReference(t, "OperationDefinition", "base", element.getBase(), -1); - for (int i = 0; i < element.getResource().size(); i++) - composeCode(t, "OperationDefinition", "resource", element.getResource().get(i), i); - if (element.hasSystemElement()) - composeBoolean(t, "OperationDefinition", "system", element.getSystemElement(), -1); - if (element.hasTypeElement()) - composeBoolean(t, "OperationDefinition", "type", element.getTypeElement(), -1); - if (element.hasInstanceElement()) - composeBoolean(t, "OperationDefinition", "instance", element.getInstanceElement(), -1); - for (int i = 0; i < element.getParameter().size(); i++) - composeOperationDefinitionOperationDefinitionParameterComponent(t, "OperationDefinition", "parameter", element.getParameter().get(i), i); - for (int i = 0; i < element.getOverload().size(); i++) - composeOperationDefinitionOperationDefinitionOverloadComponent(t, "OperationDefinition", "overload", element.getOverload().get(i), i); - } - - protected void composeOperationDefinitionOperationDefinitionParameterComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionParameterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "parameter", name, element, index); - if (element.hasNameElement()) - composeCode(t, "OperationDefinition", "name", element.getNameElement(), -1); - if (element.hasUseElement()) - composeEnum(t, "OperationDefinition", "use", element.getUseElement(), -1); - if (element.hasMinElement()) - composeInteger(t, "OperationDefinition", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "OperationDefinition", "max", element.getMaxElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "OperationDefinition", "documentation", element.getDocumentationElement(), -1); - if (element.hasTypeElement()) - composeCode(t, "OperationDefinition", "type", element.getTypeElement(), -1); - if (element.hasSearchTypeElement()) - composeEnum(t, "OperationDefinition", "searchType", element.getSearchTypeElement(), -1); - if (element.hasProfile()) - composeReference(t, "OperationDefinition", "profile", element.getProfile(), -1); - if (element.hasBinding()) - composeOperationDefinitionOperationDefinitionParameterBindingComponent(t, "OperationDefinition", "binding", element.getBinding(), -1); - for (int i = 0; i < element.getPart().size(); i++) - composeOperationDefinitionOperationDefinitionParameterComponent(t, "OperationDefinition", "part", element.getPart().get(i), i); - } - - protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionParameterBindingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "binding", name, element, index); - if (element.hasStrengthElement()) - composeEnum(t, "OperationDefinition", "strength", element.getStrengthElement(), -1); - if (element.hasValueSet()) - composeType(t, "OperationDefinition", "valueSet", element.getValueSet(), -1); - } - - protected void composeOperationDefinitionOperationDefinitionOverloadComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionOverloadComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "overload", name, element, index); - for (int i = 0; i < element.getParameterName().size(); i++) - composeString(t, "OperationDefinition", "parameterName", element.getParameterName().get(i), i); - if (element.hasCommentElement()) - composeString(t, "OperationDefinition", "comment", element.getCommentElement(), -1); - } - - protected void composeOperationOutcome(Complex parent, String parentType, String name, OperationOutcome element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "OperationOutcome", name, element, index); - for (int i = 0; i < element.getIssue().size(); i++) - composeOperationOutcomeOperationOutcomeIssueComponent(t, "OperationOutcome", "issue", element.getIssue().get(i), i); - } - - protected void composeOperationOutcomeOperationOutcomeIssueComponent(Complex parent, String parentType, String name, OperationOutcome.OperationOutcomeIssueComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "issue", name, element, index); - if (element.hasSeverityElement()) - composeEnum(t, "OperationOutcome", "severity", element.getSeverityElement(), -1); - if (element.hasCodeElement()) - composeEnum(t, "OperationOutcome", "code", element.getCodeElement(), -1); - if (element.hasDetails()) - composeCodeableConcept(t, "OperationOutcome", "details", element.getDetails(), -1); - if (element.hasDiagnosticsElement()) - composeString(t, "OperationOutcome", "diagnostics", element.getDiagnosticsElement(), -1); - for (int i = 0; i < element.getLocation().size(); i++) - composeString(t, "OperationOutcome", "location", element.getLocation().get(i), i); - for (int i = 0; i < element.getExpression().size(); i++) - composeString(t, "OperationOutcome", "expression", element.getExpression().get(i), i); - } - - protected void composeOrganization(Complex parent, String parentType, String name, Organization element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Organization", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Organization", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "Organization", "active", element.getActiveElement(), -1); - for (int i = 0; i < element.getType().size(); i++) - composeCodeableConcept(t, "Organization", "type", element.getType().get(i), i); - if (element.hasNameElement()) - composeString(t, "Organization", "name", element.getNameElement(), -1); - for (int i = 0; i < element.getAlias().size(); i++) - composeString(t, "Organization", "alias", element.getAlias().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Organization", "telecom", element.getTelecom().get(i), i); - for (int i = 0; i < element.getAddress().size(); i++) - composeAddress(t, "Organization", "address", element.getAddress().get(i), i); - if (element.hasPartOf()) - composeReference(t, "Organization", "partOf", element.getPartOf(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeOrganizationOrganizationContactComponent(t, "Organization", "contact", element.getContact().get(i), i); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "Organization", "endpoint", element.getEndpoint().get(i), i); - } - - protected void composeOrganizationOrganizationContactComponent(Complex parent, String parentType, String name, Organization.OrganizationContactComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "contact", name, element, index); - if (element.hasPurpose()) - composeCodeableConcept(t, "Organization", "purpose", element.getPurpose(), -1); - if (element.hasName()) - composeHumanName(t, "Organization", "name", element.getName(), -1); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Organization", "telecom", element.getTelecom().get(i), i); - if (element.hasAddress()) - composeAddress(t, "Organization", "address", element.getAddress(), -1); - } - - protected void composePatient(Complex parent, String parentType, String name, Patient element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Patient", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Patient", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "Patient", "active", element.getActiveElement(), -1); - for (int i = 0; i < element.getName().size(); i++) - composeHumanName(t, "Patient", "name", element.getName().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i); - if (element.hasGenderElement()) - composeEnum(t, "Patient", "gender", element.getGenderElement(), -1); - if (element.hasBirthDateElement()) - composeDate(t, "Patient", "birthDate", element.getBirthDateElement(), -1); - if (element.hasDeceased()) - composeType(t, "Patient", "deceased", element.getDeceased(), -1); - for (int i = 0; i < element.getAddress().size(); i++) - composeAddress(t, "Patient", "address", element.getAddress().get(i), i); - if (element.hasMaritalStatus()) - composeCodeableConcept(t, "Patient", "maritalStatus", element.getMaritalStatus(), -1); - if (element.hasMultipleBirth()) - composeType(t, "Patient", "multipleBirth", element.getMultipleBirth(), -1); - for (int i = 0; i < element.getPhoto().size(); i++) - composeAttachment(t, "Patient", "photo", element.getPhoto().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composePatientContactComponent(t, "Patient", "contact", element.getContact().get(i), i); - if (element.hasAnimal()) - composePatientAnimalComponent(t, "Patient", "animal", element.getAnimal(), -1); - for (int i = 0; i < element.getCommunication().size(); i++) - composePatientPatientCommunicationComponent(t, "Patient", "communication", element.getCommunication().get(i), i); - for (int i = 0; i < element.getGeneralPractitioner().size(); i++) - composeReference(t, "Patient", "generalPractitioner", element.getGeneralPractitioner().get(i), i); - if (element.hasManagingOrganization()) - composeReference(t, "Patient", "managingOrganization", element.getManagingOrganization(), -1); - for (int i = 0; i < element.getLink().size(); i++) - composePatientPatientLinkComponent(t, "Patient", "link", element.getLink().get(i), i); - } - - protected void composePatientContactComponent(Complex parent, String parentType, String name, Patient.ContactComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "contact", name, element, index); - for (int i = 0; i < element.getRelationship().size(); i++) - composeCodeableConcept(t, "Patient", "relationship", element.getRelationship().get(i), i); - if (element.hasName()) - composeHumanName(t, "Patient", "name", element.getName(), -1); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i); - if (element.hasAddress()) - composeAddress(t, "Patient", "address", element.getAddress(), -1); - if (element.hasGenderElement()) - composeEnum(t, "Patient", "gender", element.getGenderElement(), -1); - if (element.hasOrganization()) - composeReference(t, "Patient", "organization", element.getOrganization(), -1); - if (element.hasPeriod()) - composePeriod(t, "Patient", "period", element.getPeriod(), -1); - } - - protected void composePatientAnimalComponent(Complex parent, String parentType, String name, Patient.AnimalComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "animal", name, element, index); - if (element.hasSpecies()) - composeCodeableConcept(t, "Patient", "species", element.getSpecies(), -1); - if (element.hasBreed()) - composeCodeableConcept(t, "Patient", "breed", element.getBreed(), -1); - if (element.hasGenderStatus()) - composeCodeableConcept(t, "Patient", "genderStatus", element.getGenderStatus(), -1); - } - - protected void composePatientPatientCommunicationComponent(Complex parent, String parentType, String name, Patient.PatientCommunicationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "communication", name, element, index); - if (element.hasLanguage()) - composeCodeableConcept(t, "Patient", "language", element.getLanguage(), -1); - if (element.hasPreferredElement()) - composeBoolean(t, "Patient", "preferred", element.getPreferredElement(), -1); - } - - protected void composePatientPatientLinkComponent(Complex parent, String parentType, String name, Patient.PatientLinkComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "link", name, element, index); - if (element.hasOther()) - composeReference(t, "Patient", "other", element.getOther(), -1); - if (element.hasTypeElement()) - composeEnum(t, "Patient", "type", element.getTypeElement(), -1); - } - - protected void composePaymentNotice(Complex parent, String parentType, String name, PaymentNotice element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "PaymentNotice", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "PaymentNotice", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "PaymentNotice", "status", element.getStatusElement(), -1); - if (element.hasRequest()) - composeReference(t, "PaymentNotice", "request", element.getRequest(), -1); - if (element.hasResponse()) - composeReference(t, "PaymentNotice", "response", element.getResponse(), -1); - if (element.hasStatusDateElement()) - composeDate(t, "PaymentNotice", "statusDate", element.getStatusDateElement(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "PaymentNotice", "created", element.getCreatedElement(), -1); - if (element.hasTarget()) - composeReference(t, "PaymentNotice", "target", element.getTarget(), -1); - if (element.hasProvider()) - composeReference(t, "PaymentNotice", "provider", element.getProvider(), -1); - if (element.hasOrganization()) - composeReference(t, "PaymentNotice", "organization", element.getOrganization(), -1); - if (element.hasPaymentStatus()) - composeCodeableConcept(t, "PaymentNotice", "paymentStatus", element.getPaymentStatus(), -1); - } - - protected void composePaymentReconciliation(Complex parent, String parentType, String name, PaymentReconciliation element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "PaymentReconciliation", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "PaymentReconciliation", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "PaymentReconciliation", "status", element.getStatusElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "PaymentReconciliation", "period", element.getPeriod(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "PaymentReconciliation", "created", element.getCreatedElement(), -1); - if (element.hasOrganization()) - composeReference(t, "PaymentReconciliation", "organization", element.getOrganization(), -1); - if (element.hasRequest()) - composeReference(t, "PaymentReconciliation", "request", element.getRequest(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "PaymentReconciliation", "outcome", element.getOutcome(), -1); - if (element.hasDispositionElement()) - composeString(t, "PaymentReconciliation", "disposition", element.getDispositionElement(), -1); - if (element.hasRequestProvider()) - composeReference(t, "PaymentReconciliation", "requestProvider", element.getRequestProvider(), -1); - if (element.hasRequestOrganization()) - composeReference(t, "PaymentReconciliation", "requestOrganization", element.getRequestOrganization(), -1); - for (int i = 0; i < element.getDetail().size(); i++) - composePaymentReconciliationDetailsComponent(t, "PaymentReconciliation", "detail", element.getDetail().get(i), i); - if (element.hasForm()) - composeCodeableConcept(t, "PaymentReconciliation", "form", element.getForm(), -1); - if (element.hasTotal()) - composeMoney(t, "PaymentReconciliation", "total", element.getTotal(), -1); - for (int i = 0; i < element.getProcessNote().size(); i++) - composePaymentReconciliationNotesComponent(t, "PaymentReconciliation", "processNote", element.getProcessNote().get(i), i); - } - - protected void composePaymentReconciliationDetailsComponent(Complex parent, String parentType, String name, PaymentReconciliation.DetailsComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "detail", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "PaymentReconciliation", "type", element.getType(), -1); - if (element.hasRequest()) - composeReference(t, "PaymentReconciliation", "request", element.getRequest(), -1); - if (element.hasResponse()) - composeReference(t, "PaymentReconciliation", "response", element.getResponse(), -1); - if (element.hasSubmitter()) - composeReference(t, "PaymentReconciliation", "submitter", element.getSubmitter(), -1); - if (element.hasPayee()) - composeReference(t, "PaymentReconciliation", "payee", element.getPayee(), -1); - if (element.hasDateElement()) - composeDate(t, "PaymentReconciliation", "date", element.getDateElement(), -1); - if (element.hasAmount()) - composeMoney(t, "PaymentReconciliation", "amount", element.getAmount(), -1); - } - - protected void composePaymentReconciliationNotesComponent(Complex parent, String parentType, String name, PaymentReconciliation.NotesComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "processNote", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "PaymentReconciliation", "type", element.getType(), -1); - if (element.hasTextElement()) - composeString(t, "PaymentReconciliation", "text", element.getTextElement(), -1); - } - - protected void composePerson(Complex parent, String parentType, String name, Person element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Person", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Person", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getName().size(); i++) - composeHumanName(t, "Person", "name", element.getName().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Person", "telecom", element.getTelecom().get(i), i); - if (element.hasGenderElement()) - composeEnum(t, "Person", "gender", element.getGenderElement(), -1); - if (element.hasBirthDateElement()) - composeDate(t, "Person", "birthDate", element.getBirthDateElement(), -1); - for (int i = 0; i < element.getAddress().size(); i++) - composeAddress(t, "Person", "address", element.getAddress().get(i), i); - if (element.hasPhoto()) - composeAttachment(t, "Person", "photo", element.getPhoto(), -1); - if (element.hasManagingOrganization()) - composeReference(t, "Person", "managingOrganization", element.getManagingOrganization(), -1); - if (element.hasActiveElement()) - composeBoolean(t, "Person", "active", element.getActiveElement(), -1); - for (int i = 0; i < element.getLink().size(); i++) - composePersonPersonLinkComponent(t, "Person", "link", element.getLink().get(i), i); - } - - protected void composePersonPersonLinkComponent(Complex parent, String parentType, String name, Person.PersonLinkComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "link", name, element, index); - if (element.hasTarget()) - composeReference(t, "Person", "target", element.getTarget(), -1); - if (element.hasAssuranceElement()) - composeEnum(t, "Person", "assurance", element.getAssuranceElement(), -1); - } - - protected void composePlanDefinition(Complex parent, String parentType, String name, PlanDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "PlanDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "PlanDefinition", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "PlanDefinition", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "PlanDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "PlanDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "PlanDefinition", "title", element.getTitleElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "PlanDefinition", "type", element.getType(), -1); - if (element.hasStatusElement()) - composeEnum(t, "PlanDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "PlanDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "PlanDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "PlanDefinition", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "PlanDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasUsageElement()) - composeString(t, "PlanDefinition", "usage", element.getUsageElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "PlanDefinition", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "PlanDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "PlanDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "PlanDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "PlanDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeCodeableConcept(t, "PlanDefinition", "topic", element.getTopic().get(i), i); - for (int i = 0; i < element.getContributor().size(); i++) - composeContributor(t, "PlanDefinition", "contributor", element.getContributor().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "PlanDefinition", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "PlanDefinition", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "PlanDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); - for (int i = 0; i < element.getLibrary().size(); i++) - composeReference(t, "PlanDefinition", "library", element.getLibrary().get(i), i); - for (int i = 0; i < element.getGoal().size(); i++) - composePlanDefinitionPlanDefinitionGoalComponent(t, "PlanDefinition", "goal", element.getGoal().get(i), i); - for (int i = 0; i < element.getAction().size(); i++) - composePlanDefinitionPlanDefinitionActionComponent(t, "PlanDefinition", "action", element.getAction().get(i), i); - } - - protected void composePlanDefinitionPlanDefinitionGoalComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionGoalComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "goal", name, element, index); - if (element.hasCategory()) - composeCodeableConcept(t, "PlanDefinition", "category", element.getCategory(), -1); - if (element.hasDescription()) - composeCodeableConcept(t, "PlanDefinition", "description", element.getDescription(), -1); - if (element.hasPriority()) - composeCodeableConcept(t, "PlanDefinition", "priority", element.getPriority(), -1); - if (element.hasStart()) - composeCodeableConcept(t, "PlanDefinition", "start", element.getStart(), -1); - for (int i = 0; i < element.getAddresses().size(); i++) - composeCodeableConcept(t, "PlanDefinition", "addresses", element.getAddresses().get(i), i); - for (int i = 0; i < element.getDocumentation().size(); i++) - composeRelatedArtifact(t, "PlanDefinition", "documentation", element.getDocumentation().get(i), i); - for (int i = 0; i < element.getTarget().size(); i++) - composePlanDefinitionPlanDefinitionGoalTargetComponent(t, "PlanDefinition", "target", element.getTarget().get(i), i); - } - - protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionGoalTargetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "target", name, element, index); - if (element.hasMeasure()) - composeCodeableConcept(t, "PlanDefinition", "measure", element.getMeasure(), -1); - if (element.hasDetail()) - composeType(t, "PlanDefinition", "detail", element.getDetail(), -1); - if (element.hasDue()) - composeDuration(t, "PlanDefinition", "due", element.getDue(), -1); - } - - protected void composePlanDefinitionPlanDefinitionActionComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasLabelElement()) - composeString(t, "PlanDefinition", "label", element.getLabelElement(), -1); - if (element.hasTitleElement()) - composeString(t, "PlanDefinition", "title", element.getTitleElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasTextEquivalentElement()) - composeString(t, "PlanDefinition", "textEquivalent", element.getTextEquivalentElement(), -1); - for (int i = 0; i < element.getCode().size(); i++) - composeCodeableConcept(t, "PlanDefinition", "code", element.getCode().get(i), i); - for (int i = 0; i < element.getReason().size(); i++) - composeCodeableConcept(t, "PlanDefinition", "reason", element.getReason().get(i), i); - for (int i = 0; i < element.getDocumentation().size(); i++) - composeRelatedArtifact(t, "PlanDefinition", "documentation", element.getDocumentation().get(i), i); - for (int i = 0; i < element.getGoalId().size(); i++) - composeId(t, "PlanDefinition", "goalId", element.getGoalId().get(i), i); - for (int i = 0; i < element.getTriggerDefinition().size(); i++) - composeTriggerDefinition(t, "PlanDefinition", "triggerDefinition", element.getTriggerDefinition().get(i), i); - for (int i = 0; i < element.getCondition().size(); i++) - composePlanDefinitionPlanDefinitionActionConditionComponent(t, "PlanDefinition", "condition", element.getCondition().get(i), i); - for (int i = 0; i < element.getInput().size(); i++) - composeDataRequirement(t, "PlanDefinition", "input", element.getInput().get(i), i); - for (int i = 0; i < element.getOutput().size(); i++) - composeDataRequirement(t, "PlanDefinition", "output", element.getOutput().get(i), i); - for (int i = 0; i < element.getRelatedAction().size(); i++) - composePlanDefinitionPlanDefinitionActionRelatedActionComponent(t, "PlanDefinition", "relatedAction", element.getRelatedAction().get(i), i); - if (element.hasTiming()) - composeType(t, "PlanDefinition", "timing", element.getTiming(), -1); - for (int i = 0; i < element.getParticipant().size(); i++) - composePlanDefinitionPlanDefinitionActionParticipantComponent(t, "PlanDefinition", "participant", element.getParticipant().get(i), i); - if (element.hasType()) - composeCoding(t, "PlanDefinition", "type", element.getType(), -1); - if (element.hasGroupingBehaviorElement()) - composeEnum(t, "PlanDefinition", "groupingBehavior", element.getGroupingBehaviorElement(), -1); - if (element.hasSelectionBehaviorElement()) - composeEnum(t, "PlanDefinition", "selectionBehavior", element.getSelectionBehaviorElement(), -1); - if (element.hasRequiredBehaviorElement()) - composeEnum(t, "PlanDefinition", "requiredBehavior", element.getRequiredBehaviorElement(), -1); - if (element.hasPrecheckBehaviorElement()) - composeEnum(t, "PlanDefinition", "precheckBehavior", element.getPrecheckBehaviorElement(), -1); - if (element.hasCardinalityBehaviorElement()) - composeEnum(t, "PlanDefinition", "cardinalityBehavior", element.getCardinalityBehaviorElement(), -1); - if (element.hasDefinition()) - composeReference(t, "PlanDefinition", "definition", element.getDefinition(), -1); - if (element.hasTransform()) - composeReference(t, "PlanDefinition", "transform", element.getTransform(), -1); - for (int i = 0; i < element.getDynamicValue().size(); i++) - composePlanDefinitionPlanDefinitionActionDynamicValueComponent(t, "PlanDefinition", "dynamicValue", element.getDynamicValue().get(i), i); - for (int i = 0; i < element.getAction().size(); i++) - composePlanDefinitionPlanDefinitionActionComponent(t, "PlanDefinition", "action", element.getAction().get(i), i); - } - - protected void composePlanDefinitionPlanDefinitionActionConditionComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionConditionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "condition", name, element, index); - if (element.hasKindElement()) - composeEnum(t, "PlanDefinition", "kind", element.getKindElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasLanguageElement()) - composeString(t, "PlanDefinition", "language", element.getLanguageElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "PlanDefinition", "expression", element.getExpressionElement(), -1); - } - - protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "relatedAction", name, element, index); - if (element.hasActionIdElement()) - composeId(t, "PlanDefinition", "actionId", element.getActionIdElement(), -1); - if (element.hasRelationshipElement()) - composeEnum(t, "PlanDefinition", "relationship", element.getRelationshipElement(), -1); - if (element.hasOffset()) - composeType(t, "PlanDefinition", "offset", element.getOffset(), -1); - } - - protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "PlanDefinition", "type", element.getTypeElement(), -1); - if (element.hasRole()) - composeCodeableConcept(t, "PlanDefinition", "role", element.getRole(), -1); - } - - protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dynamicValue", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPathElement()) - composeString(t, "PlanDefinition", "path", element.getPathElement(), -1); - if (element.hasLanguageElement()) - composeString(t, "PlanDefinition", "language", element.getLanguageElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "PlanDefinition", "expression", element.getExpressionElement(), -1); - } - - protected void composePractitioner(Complex parent, String parentType, String name, Practitioner element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Practitioner", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Practitioner", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "Practitioner", "active", element.getActiveElement(), -1); - for (int i = 0; i < element.getName().size(); i++) - composeHumanName(t, "Practitioner", "name", element.getName().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "Practitioner", "telecom", element.getTelecom().get(i), i); - for (int i = 0; i < element.getAddress().size(); i++) - composeAddress(t, "Practitioner", "address", element.getAddress().get(i), i); - if (element.hasGenderElement()) - composeEnum(t, "Practitioner", "gender", element.getGenderElement(), -1); - if (element.hasBirthDateElement()) - composeDate(t, "Practitioner", "birthDate", element.getBirthDateElement(), -1); - for (int i = 0; i < element.getPhoto().size(); i++) - composeAttachment(t, "Practitioner", "photo", element.getPhoto().get(i), i); - for (int i = 0; i < element.getQualification().size(); i++) - composePractitionerPractitionerQualificationComponent(t, "Practitioner", "qualification", element.getQualification().get(i), i); - for (int i = 0; i < element.getCommunication().size(); i++) - composeCodeableConcept(t, "Practitioner", "communication", element.getCommunication().get(i), i); - } - - protected void composePractitionerPractitionerQualificationComponent(Complex parent, String parentType, String name, Practitioner.PractitionerQualificationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "qualification", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Practitioner", "identifier", element.getIdentifier().get(i), i); - if (element.hasCode()) - composeCodeableConcept(t, "Practitioner", "code", element.getCode(), -1); - if (element.hasPeriod()) - composePeriod(t, "Practitioner", "period", element.getPeriod(), -1); - if (element.hasIssuer()) - composeReference(t, "Practitioner", "issuer", element.getIssuer(), -1); - } - - protected void composePractitionerRole(Complex parent, String parentType, String name, PractitionerRole element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "PractitionerRole", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "PractitionerRole", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "PractitionerRole", "active", element.getActiveElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "PractitionerRole", "period", element.getPeriod(), -1); - if (element.hasPractitioner()) - composeReference(t, "PractitionerRole", "practitioner", element.getPractitioner(), -1); - if (element.hasOrganization()) - composeReference(t, "PractitionerRole", "organization", element.getOrganization(), -1); - for (int i = 0; i < element.getCode().size(); i++) - composeCodeableConcept(t, "PractitionerRole", "code", element.getCode().get(i), i); - for (int i = 0; i < element.getSpecialty().size(); i++) - composeCodeableConcept(t, "PractitionerRole", "specialty", element.getSpecialty().get(i), i); - for (int i = 0; i < element.getLocation().size(); i++) - composeReference(t, "PractitionerRole", "location", element.getLocation().get(i), i); - for (int i = 0; i < element.getHealthcareService().size(); i++) - composeReference(t, "PractitionerRole", "healthcareService", element.getHealthcareService().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "PractitionerRole", "telecom", element.getTelecom().get(i), i); - for (int i = 0; i < element.getAvailableTime().size(); i++) - composePractitionerRolePractitionerRoleAvailableTimeComponent(t, "PractitionerRole", "availableTime", element.getAvailableTime().get(i), i); - for (int i = 0; i < element.getNotAvailable().size(); i++) - composePractitionerRolePractitionerRoleNotAvailableComponent(t, "PractitionerRole", "notAvailable", element.getNotAvailable().get(i), i); - if (element.hasAvailabilityExceptionsElement()) - composeString(t, "PractitionerRole", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1); - for (int i = 0; i < element.getEndpoint().size(); i++) - composeReference(t, "PractitionerRole", "endpoint", element.getEndpoint().get(i), i); - } - - protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(Complex parent, String parentType, String name, PractitionerRole.PractitionerRoleAvailableTimeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "availableTime", name, element, index); - for (int i = 0; i < element.getDaysOfWeek().size(); i++) - composeEnum(t, "PractitionerRole", "daysOfWeek", element.getDaysOfWeek().get(i), i); - if (element.hasAllDayElement()) - composeBoolean(t, "PractitionerRole", "allDay", element.getAllDayElement(), -1); - if (element.hasAvailableStartTimeElement()) - composeTime(t, "PractitionerRole", "availableStartTime", element.getAvailableStartTimeElement(), -1); - if (element.hasAvailableEndTimeElement()) - composeTime(t, "PractitionerRole", "availableEndTime", element.getAvailableEndTimeElement(), -1); - } - - protected void composePractitionerRolePractitionerRoleNotAvailableComponent(Complex parent, String parentType, String name, PractitionerRole.PractitionerRoleNotAvailableComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "notAvailable", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "PractitionerRole", "description", element.getDescriptionElement(), -1); - if (element.hasDuring()) - composePeriod(t, "PractitionerRole", "during", element.getDuring(), -1); - } - - protected void composeProcedure(Complex parent, String parentType, String name, Procedure element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Procedure", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Procedure", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "Procedure", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "Procedure", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "Procedure", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Procedure", "status", element.getStatusElement(), -1); - if (element.hasNotDoneElement()) - composeBoolean(t, "Procedure", "notDone", element.getNotDoneElement(), -1); - if (element.hasNotDoneReason()) - composeCodeableConcept(t, "Procedure", "notDoneReason", element.getNotDoneReason(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "Procedure", "category", element.getCategory(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Procedure", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "Procedure", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "Procedure", "context", element.getContext(), -1); - if (element.hasPerformed()) - composeType(t, "Procedure", "performed", element.getPerformed(), -1); - for (int i = 0; i < element.getPerformer().size(); i++) - composeProcedureProcedurePerformerComponent(t, "Procedure", "performer", element.getPerformer().get(i), i); - if (element.hasLocation()) - composeReference(t, "Procedure", "location", element.getLocation(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "Procedure", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "Procedure", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getBodySite().size(); i++) - composeCodeableConcept(t, "Procedure", "bodySite", element.getBodySite().get(i), i); - if (element.hasOutcome()) - composeCodeableConcept(t, "Procedure", "outcome", element.getOutcome(), -1); - for (int i = 0; i < element.getReport().size(); i++) - composeReference(t, "Procedure", "report", element.getReport().get(i), i); - for (int i = 0; i < element.getComplication().size(); i++) - composeCodeableConcept(t, "Procedure", "complication", element.getComplication().get(i), i); - for (int i = 0; i < element.getComplicationDetail().size(); i++) - composeReference(t, "Procedure", "complicationDetail", element.getComplicationDetail().get(i), i); - for (int i = 0; i < element.getFollowUp().size(); i++) - composeCodeableConcept(t, "Procedure", "followUp", element.getFollowUp().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Procedure", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getFocalDevice().size(); i++) - composeProcedureProcedureFocalDeviceComponent(t, "Procedure", "focalDevice", element.getFocalDevice().get(i), i); - for (int i = 0; i < element.getUsedReference().size(); i++) - composeReference(t, "Procedure", "usedReference", element.getUsedReference().get(i), i); - for (int i = 0; i < element.getUsedCode().size(); i++) - composeCodeableConcept(t, "Procedure", "usedCode", element.getUsedCode().get(i), i); - } - - protected void composeProcedureProcedurePerformerComponent(Complex parent, String parentType, String name, Procedure.ProcedurePerformerComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "performer", name, element, index); - if (element.hasRole()) - composeCodeableConcept(t, "Procedure", "role", element.getRole(), -1); - if (element.hasActor()) - composeReference(t, "Procedure", "actor", element.getActor(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "Procedure", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeProcedureProcedureFocalDeviceComponent(Complex parent, String parentType, String name, Procedure.ProcedureFocalDeviceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "focalDevice", name, element, index); - if (element.hasAction()) - composeCodeableConcept(t, "Procedure", "action", element.getAction(), -1); - if (element.hasManipulated()) - composeReference(t, "Procedure", "manipulated", element.getManipulated(), -1); - } - - protected void composeProcedureRequest(Complex parent, String parentType, String name, ProcedureRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ProcedureRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ProcedureRequest", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "ProcedureRequest", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "ProcedureRequest", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getReplaces().size(); i++) - composeReference(t, "ProcedureRequest", "replaces", element.getReplaces().get(i), i); - if (element.hasRequisition()) - composeIdentifier(t, "ProcedureRequest", "requisition", element.getRequisition(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ProcedureRequest", "status", element.getStatusElement(), -1); - if (element.hasIntentElement()) - composeEnum(t, "ProcedureRequest", "intent", element.getIntentElement(), -1); - if (element.hasPriorityElement()) - composeEnum(t, "ProcedureRequest", "priority", element.getPriorityElement(), -1); - if (element.hasDoNotPerformElement()) - composeBoolean(t, "ProcedureRequest", "doNotPerform", element.getDoNotPerformElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "ProcedureRequest", "category", element.getCategory().get(i), i); - if (element.hasCode()) - composeCodeableConcept(t, "ProcedureRequest", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "ProcedureRequest", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "ProcedureRequest", "context", element.getContext(), -1); - if (element.hasOccurrence()) - composeType(t, "ProcedureRequest", "occurrence", element.getOccurrence(), -1); - if (element.hasAsNeeded()) - composeType(t, "ProcedureRequest", "asNeeded", element.getAsNeeded(), -1); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "ProcedureRequest", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasRequester()) - composeProcedureRequestProcedureRequestRequesterComponent(t, "ProcedureRequest", "requester", element.getRequester(), -1); - if (element.hasPerformerType()) - composeCodeableConcept(t, "ProcedureRequest", "performerType", element.getPerformerType(), -1); - if (element.hasPerformer()) - composeReference(t, "ProcedureRequest", "performer", element.getPerformer(), -1); - for (int i = 0; i < element.getReasonCode().size(); i++) - composeCodeableConcept(t, "ProcedureRequest", "reasonCode", element.getReasonCode().get(i), i); - for (int i = 0; i < element.getReasonReference().size(); i++) - composeReference(t, "ProcedureRequest", "reasonReference", element.getReasonReference().get(i), i); - for (int i = 0; i < element.getSupportingInfo().size(); i++) - composeReference(t, "ProcedureRequest", "supportingInfo", element.getSupportingInfo().get(i), i); - for (int i = 0; i < element.getSpecimen().size(); i++) - composeReference(t, "ProcedureRequest", "specimen", element.getSpecimen().get(i), i); - for (int i = 0; i < element.getBodySite().size(); i++) - composeCodeableConcept(t, "ProcedureRequest", "bodySite", element.getBodySite().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "ProcedureRequest", "note", element.getNote().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "ProcedureRequest", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getRelevantHistory().size(); i++) - composeReference(t, "ProcedureRequest", "relevantHistory", element.getRelevantHistory().get(i), i); - } - - protected void composeProcedureRequestProcedureRequestRequesterComponent(Complex parent, String parentType, String name, ProcedureRequest.ProcedureRequestRequesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requester", name, element, index); - if (element.hasAgent()) - composeReference(t, "ProcedureRequest", "agent", element.getAgent(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "ProcedureRequest", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeProcessRequest(Complex parent, String parentType, String name, ProcessRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ProcessRequest", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ProcessRequest", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ProcessRequest", "status", element.getStatusElement(), -1); - if (element.hasActionElement()) - composeEnum(t, "ProcessRequest", "action", element.getActionElement(), -1); - if (element.hasTarget()) - composeReference(t, "ProcessRequest", "target", element.getTarget(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "ProcessRequest", "created", element.getCreatedElement(), -1); - if (element.hasProvider()) - composeReference(t, "ProcessRequest", "provider", element.getProvider(), -1); - if (element.hasOrganization()) - composeReference(t, "ProcessRequest", "organization", element.getOrganization(), -1); - if (element.hasRequest()) - composeReference(t, "ProcessRequest", "request", element.getRequest(), -1); - if (element.hasResponse()) - composeReference(t, "ProcessRequest", "response", element.getResponse(), -1); - if (element.hasNullifyElement()) - composeBoolean(t, "ProcessRequest", "nullify", element.getNullifyElement(), -1); - if (element.hasReferenceElement()) - composeString(t, "ProcessRequest", "reference", element.getReferenceElement(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeProcessRequestItemsComponent(t, "ProcessRequest", "item", element.getItem().get(i), i); - for (int i = 0; i < element.getInclude().size(); i++) - composeString(t, "ProcessRequest", "include", element.getInclude().get(i), i); - for (int i = 0; i < element.getExclude().size(); i++) - composeString(t, "ProcessRequest", "exclude", element.getExclude().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "ProcessRequest", "period", element.getPeriod(), -1); - } - - protected void composeProcessRequestItemsComponent(Complex parent, String parentType, String name, ProcessRequest.ItemsComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasSequenceLinkIdElement()) - composeInteger(t, "ProcessRequest", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); - } - - protected void composeProcessResponse(Complex parent, String parentType, String name, ProcessResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ProcessResponse", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ProcessResponse", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ProcessResponse", "status", element.getStatusElement(), -1); - if (element.hasCreatedElement()) - composeDateTime(t, "ProcessResponse", "created", element.getCreatedElement(), -1); - if (element.hasOrganization()) - composeReference(t, "ProcessResponse", "organization", element.getOrganization(), -1); - if (element.hasRequest()) - composeReference(t, "ProcessResponse", "request", element.getRequest(), -1); - if (element.hasOutcome()) - composeCodeableConcept(t, "ProcessResponse", "outcome", element.getOutcome(), -1); - if (element.hasDispositionElement()) - composeString(t, "ProcessResponse", "disposition", element.getDispositionElement(), -1); - if (element.hasRequestProvider()) - composeReference(t, "ProcessResponse", "requestProvider", element.getRequestProvider(), -1); - if (element.hasRequestOrganization()) - composeReference(t, "ProcessResponse", "requestOrganization", element.getRequestOrganization(), -1); - if (element.hasForm()) - composeCodeableConcept(t, "ProcessResponse", "form", element.getForm(), -1); - for (int i = 0; i < element.getProcessNote().size(); i++) - composeProcessResponseProcessResponseProcessNoteComponent(t, "ProcessResponse", "processNote", element.getProcessNote().get(i), i); - for (int i = 0; i < element.getError().size(); i++) - composeCodeableConcept(t, "ProcessResponse", "error", element.getError().get(i), i); - for (int i = 0; i < element.getCommunicationRequest().size(); i++) - composeReference(t, "ProcessResponse", "communicationRequest", element.getCommunicationRequest().get(i), i); - } - - protected void composeProcessResponseProcessResponseProcessNoteComponent(Complex parent, String parentType, String name, ProcessResponse.ProcessResponseProcessNoteComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "processNote", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "ProcessResponse", "type", element.getType(), -1); - if (element.hasTextElement()) - composeString(t, "ProcessResponse", "text", element.getTextElement(), -1); - } - - protected void composeProvenance(Complex parent, String parentType, String name, Provenance element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Provenance", name, element, index); - for (int i = 0; i < element.getTarget().size(); i++) - composeReference(t, "Provenance", "target", element.getTarget().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "Provenance", "period", element.getPeriod(), -1); - if (element.hasRecordedElement()) - composeInstant(t, "Provenance", "recorded", element.getRecordedElement(), -1); - for (int i = 0; i < element.getPolicy().size(); i++) - composeUri(t, "Provenance", "policy", element.getPolicy().get(i), i); - if (element.hasLocation()) - composeReference(t, "Provenance", "location", element.getLocation(), -1); - for (int i = 0; i < element.getReason().size(); i++) - composeCoding(t, "Provenance", "reason", element.getReason().get(i), i); - if (element.hasActivity()) - composeCoding(t, "Provenance", "activity", element.getActivity(), -1); - for (int i = 0; i < element.getAgent().size(); i++) - composeProvenanceProvenanceAgentComponent(t, "Provenance", "agent", element.getAgent().get(i), i); - for (int i = 0; i < element.getEntity().size(); i++) - composeProvenanceProvenanceEntityComponent(t, "Provenance", "entity", element.getEntity().get(i), i); - for (int i = 0; i < element.getSignature().size(); i++) - composeSignature(t, "Provenance", "signature", element.getSignature().get(i), i); - } - - protected void composeProvenanceProvenanceAgentComponent(Complex parent, String parentType, String name, Provenance.ProvenanceAgentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "agent", name, element, index); - for (int i = 0; i < element.getRole().size(); i++) - composeCodeableConcept(t, "Provenance", "role", element.getRole().get(i), i); - if (element.hasWho()) - composeType(t, "Provenance", "who", element.getWho(), -1); - if (element.hasOnBehalfOf()) - composeType(t, "Provenance", "onBehalfOf", element.getOnBehalfOf(), -1); - if (element.hasRelatedAgentType()) - composeCodeableConcept(t, "Provenance", "relatedAgentType", element.getRelatedAgentType(), -1); - } - - protected void composeProvenanceProvenanceEntityComponent(Complex parent, String parentType, String name, Provenance.ProvenanceEntityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "entity", name, element, index); - if (element.hasRoleElement()) - composeEnum(t, "Provenance", "role", element.getRoleElement(), -1); - if (element.hasWhat()) - composeType(t, "Provenance", "what", element.getWhat(), -1); - for (int i = 0; i < element.getAgent().size(); i++) - composeProvenanceProvenanceAgentComponent(t, "Provenance", "agent", element.getAgent().get(i), i); - } - - protected void composeQuestionnaire(Complex parent, String parentType, String name, Questionnaire element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Questionnaire", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "Questionnaire", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Questionnaire", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "Questionnaire", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "Questionnaire", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "Questionnaire", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Questionnaire", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "Questionnaire", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "Questionnaire", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "Questionnaire", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "Questionnaire", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "Questionnaire", "purpose", element.getPurposeElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "Questionnaire", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "Questionnaire", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "Questionnaire", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "Questionnaire", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "Questionnaire", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "Questionnaire", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "Questionnaire", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getCode().size(); i++) - composeCoding(t, "Questionnaire", "code", element.getCode().get(i), i); - for (int i = 0; i < element.getSubjectType().size(); i++) - composeCode(t, "Questionnaire", "subjectType", element.getSubjectType().get(i), i); - for (int i = 0; i < element.getItem().size(); i++) - composeQuestionnaireQuestionnaireItemComponent(t, "Questionnaire", "item", element.getItem().get(i), i); - } - - protected void composeQuestionnaireQuestionnaireItemComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasLinkIdElement()) - composeString(t, "Questionnaire", "linkId", element.getLinkIdElement(), -1); - if (element.hasDefinitionElement()) - composeUri(t, "Questionnaire", "definition", element.getDefinitionElement(), -1); - for (int i = 0; i < element.getCode().size(); i++) - composeCoding(t, "Questionnaire", "code", element.getCode().get(i), i); - if (element.hasPrefixElement()) - composeString(t, "Questionnaire", "prefix", element.getPrefixElement(), -1); - if (element.hasTextElement()) - composeString(t, "Questionnaire", "text", element.getTextElement(), -1); - if (element.hasTypeElement()) - composeEnum(t, "Questionnaire", "type", element.getTypeElement(), -1); - for (int i = 0; i < element.getEnableWhen().size(); i++) - composeQuestionnaireQuestionnaireItemEnableWhenComponent(t, "Questionnaire", "enableWhen", element.getEnableWhen().get(i), i); - if (element.hasRequiredElement()) - composeBoolean(t, "Questionnaire", "required", element.getRequiredElement(), -1); - if (element.hasRepeatsElement()) - composeBoolean(t, "Questionnaire", "repeats", element.getRepeatsElement(), -1); - if (element.hasReadOnlyElement()) - composeBoolean(t, "Questionnaire", "readOnly", element.getReadOnlyElement(), -1); - if (element.hasMaxLengthElement()) - composeInteger(t, "Questionnaire", "maxLength", element.getMaxLengthElement(), -1); - if (element.hasOptions()) - composeReference(t, "Questionnaire", "options", element.getOptions(), -1); - for (int i = 0; i < element.getOption().size(); i++) - composeQuestionnaireQuestionnaireItemOptionComponent(t, "Questionnaire", "option", element.getOption().get(i), i); - if (element.hasInitial()) - composeType(t, "Questionnaire", "initial", element.getInitial(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeQuestionnaireQuestionnaireItemComponent(t, "Questionnaire", "item", element.getItem().get(i), i); - } - - protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemEnableWhenComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "enableWhen", name, element, index); - if (element.hasQuestionElement()) - composeString(t, "Questionnaire", "question", element.getQuestionElement(), -1); - if (element.hasHasAnswerElement()) - composeBoolean(t, "Questionnaire", "hasAnswer", element.getHasAnswerElement(), -1); - if (element.hasAnswer()) - composeType(t, "Questionnaire", "answer", element.getAnswer(), -1); - } - - protected void composeQuestionnaireQuestionnaireItemOptionComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemOptionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "option", name, element, index); - if (element.hasValue()) - composeType(t, "Questionnaire", "value", element.getValue(), -1); - } - - protected void composeQuestionnaireResponse(Complex parent, String parentType, String name, QuestionnaireResponse element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "QuestionnaireResponse", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "QuestionnaireResponse", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "QuestionnaireResponse", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getParent().size(); i++) - composeReference(t, "QuestionnaireResponse", "parent", element.getParent().get(i), i); - if (element.hasQuestionnaire()) - composeReference(t, "QuestionnaireResponse", "questionnaire", element.getQuestionnaire(), -1); - if (element.hasStatusElement()) - composeEnum(t, "QuestionnaireResponse", "status", element.getStatusElement(), -1); - if (element.hasSubject()) - composeReference(t, "QuestionnaireResponse", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "QuestionnaireResponse", "context", element.getContext(), -1); - if (element.hasAuthoredElement()) - composeDateTime(t, "QuestionnaireResponse", "authored", element.getAuthoredElement(), -1); - if (element.hasAuthor()) - composeReference(t, "QuestionnaireResponse", "author", element.getAuthor(), -1); - if (element.hasSource()) - composeReference(t, "QuestionnaireResponse", "source", element.getSource(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeQuestionnaireResponseQuestionnaireResponseItemComponent(t, "QuestionnaireResponse", "item", element.getItem().get(i), i); - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(Complex parent, String parentType, String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "item", name, element, index); - if (element.hasLinkIdElement()) - composeString(t, "QuestionnaireResponse", "linkId", element.getLinkIdElement(), -1); - if (element.hasDefinitionElement()) - composeUri(t, "QuestionnaireResponse", "definition", element.getDefinitionElement(), -1); - if (element.hasTextElement()) - composeString(t, "QuestionnaireResponse", "text", element.getTextElement(), -1); - if (element.hasSubject()) - composeReference(t, "QuestionnaireResponse", "subject", element.getSubject(), -1); - for (int i = 0; i < element.getAnswer().size(); i++) - composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(t, "QuestionnaireResponse", "answer", element.getAnswer().get(i), i); - for (int i = 0; i < element.getItem().size(); i++) - composeQuestionnaireResponseQuestionnaireResponseItemComponent(t, "QuestionnaireResponse", "item", element.getItem().get(i), i); - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(Complex parent, String parentType, String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "answer", name, element, index); - if (element.hasValue()) - composeType(t, "QuestionnaireResponse", "value", element.getValue(), -1); - for (int i = 0; i < element.getItem().size(); i++) - composeQuestionnaireResponseQuestionnaireResponseItemComponent(t, "QuestionnaireResponse", "item", element.getItem().get(i), i); - } - - protected void composeRelatedPerson(Complex parent, String parentType, String name, RelatedPerson element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "RelatedPerson", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "RelatedPerson", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "RelatedPerson", "active", element.getActiveElement(), -1); - if (element.hasPatient()) - composeReference(t, "RelatedPerson", "patient", element.getPatient(), -1); - if (element.hasRelationship()) - composeCodeableConcept(t, "RelatedPerson", "relationship", element.getRelationship(), -1); - for (int i = 0; i < element.getName().size(); i++) - composeHumanName(t, "RelatedPerson", "name", element.getName().get(i), i); - for (int i = 0; i < element.getTelecom().size(); i++) - composeContactPoint(t, "RelatedPerson", "telecom", element.getTelecom().get(i), i); - if (element.hasGenderElement()) - composeEnum(t, "RelatedPerson", "gender", element.getGenderElement(), -1); - if (element.hasBirthDateElement()) - composeDate(t, "RelatedPerson", "birthDate", element.getBirthDateElement(), -1); - for (int i = 0; i < element.getAddress().size(); i++) - composeAddress(t, "RelatedPerson", "address", element.getAddress().get(i), i); - for (int i = 0; i < element.getPhoto().size(); i++) - composeAttachment(t, "RelatedPerson", "photo", element.getPhoto().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "RelatedPerson", "period", element.getPeriod(), -1); - } - - protected void composeRequestGroup(Complex parent, String parentType, String name, RequestGroup element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "RequestGroup", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "RequestGroup", "identifier", element.getIdentifier().get(i), i); - for (int i = 0; i < element.getDefinition().size(); i++) - composeReference(t, "RequestGroup", "definition", element.getDefinition().get(i), i); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "RequestGroup", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getReplaces().size(); i++) - composeReference(t, "RequestGroup", "replaces", element.getReplaces().get(i), i); - if (element.hasGroupIdentifier()) - composeIdentifier(t, "RequestGroup", "groupIdentifier", element.getGroupIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "RequestGroup", "status", element.getStatusElement(), -1); - if (element.hasIntentElement()) - composeEnum(t, "RequestGroup", "intent", element.getIntentElement(), -1); - if (element.hasPriorityElement()) - composeEnum(t, "RequestGroup", "priority", element.getPriorityElement(), -1); - if (element.hasSubject()) - composeReference(t, "RequestGroup", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "RequestGroup", "context", element.getContext(), -1); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "RequestGroup", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasAuthor()) - composeReference(t, "RequestGroup", "author", element.getAuthor(), -1); - if (element.hasReason()) - composeType(t, "RequestGroup", "reason", element.getReason(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "RequestGroup", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getAction().size(); i++) - composeRequestGroupRequestGroupActionComponent(t, "RequestGroup", "action", element.getAction().get(i), i); - } - - protected void composeRequestGroupRequestGroupActionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasLabelElement()) - composeString(t, "RequestGroup", "label", element.getLabelElement(), -1); - if (element.hasTitleElement()) - composeString(t, "RequestGroup", "title", element.getTitleElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "RequestGroup", "description", element.getDescriptionElement(), -1); - if (element.hasTextEquivalentElement()) - composeString(t, "RequestGroup", "textEquivalent", element.getTextEquivalentElement(), -1); - for (int i = 0; i < element.getCode().size(); i++) - composeCodeableConcept(t, "RequestGroup", "code", element.getCode().get(i), i); - for (int i = 0; i < element.getDocumentation().size(); i++) - composeRelatedArtifact(t, "RequestGroup", "documentation", element.getDocumentation().get(i), i); - for (int i = 0; i < element.getCondition().size(); i++) - composeRequestGroupRequestGroupActionConditionComponent(t, "RequestGroup", "condition", element.getCondition().get(i), i); - for (int i = 0; i < element.getRelatedAction().size(); i++) - composeRequestGroupRequestGroupActionRelatedActionComponent(t, "RequestGroup", "relatedAction", element.getRelatedAction().get(i), i); - if (element.hasTiming()) - composeType(t, "RequestGroup", "timing", element.getTiming(), -1); - for (int i = 0; i < element.getParticipant().size(); i++) - composeReference(t, "RequestGroup", "participant", element.getParticipant().get(i), i); - if (element.hasType()) - composeCoding(t, "RequestGroup", "type", element.getType(), -1); - if (element.hasGroupingBehaviorElement()) - composeEnum(t, "RequestGroup", "groupingBehavior", element.getGroupingBehaviorElement(), -1); - if (element.hasSelectionBehaviorElement()) - composeEnum(t, "RequestGroup", "selectionBehavior", element.getSelectionBehaviorElement(), -1); - if (element.hasRequiredBehaviorElement()) - composeEnum(t, "RequestGroup", "requiredBehavior", element.getRequiredBehaviorElement(), -1); - if (element.hasPrecheckBehaviorElement()) - composeEnum(t, "RequestGroup", "precheckBehavior", element.getPrecheckBehaviorElement(), -1); - if (element.hasCardinalityBehaviorElement()) - composeEnum(t, "RequestGroup", "cardinalityBehavior", element.getCardinalityBehaviorElement(), -1); - if (element.hasResource()) - composeReference(t, "RequestGroup", "resource", element.getResource(), -1); - for (int i = 0; i < element.getAction().size(); i++) - composeRequestGroupRequestGroupActionComponent(t, "RequestGroup", "action", element.getAction().get(i), i); - } - - protected void composeRequestGroupRequestGroupActionConditionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionConditionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "condition", name, element, index); - if (element.hasKindElement()) - composeEnum(t, "RequestGroup", "kind", element.getKindElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "RequestGroup", "description", element.getDescriptionElement(), -1); - if (element.hasLanguageElement()) - composeString(t, "RequestGroup", "language", element.getLanguageElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "RequestGroup", "expression", element.getExpressionElement(), -1); - } - - protected void composeRequestGroupRequestGroupActionRelatedActionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionRelatedActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "relatedAction", name, element, index); - if (element.hasActionIdElement()) - composeId(t, "RequestGroup", "actionId", element.getActionIdElement(), -1); - if (element.hasRelationshipElement()) - composeEnum(t, "RequestGroup", "relationship", element.getRelationshipElement(), -1); - if (element.hasOffset()) - composeType(t, "RequestGroup", "offset", element.getOffset(), -1); - } - - protected void composeResearchStudy(Complex parent, String parentType, String name, ResearchStudy element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ResearchStudy", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ResearchStudy", "identifier", element.getIdentifier().get(i), i); - if (element.hasTitleElement()) - composeString(t, "ResearchStudy", "title", element.getTitleElement(), -1); - for (int i = 0; i < element.getProtocol().size(); i++) - composeReference(t, "ResearchStudy", "protocol", element.getProtocol().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "ResearchStudy", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "ResearchStudy", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "ResearchStudy", "category", element.getCategory().get(i), i); - for (int i = 0; i < element.getFocus().size(); i++) - composeCodeableConcept(t, "ResearchStudy", "focus", element.getFocus().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ResearchStudy", "contact", element.getContact().get(i), i); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "ResearchStudy", "relatedArtifact", element.getRelatedArtifact().get(i), i); - for (int i = 0; i < element.getKeyword().size(); i++) - composeCodeableConcept(t, "ResearchStudy", "keyword", element.getKeyword().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ResearchStudy", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ResearchStudy", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getEnrollment().size(); i++) - composeReference(t, "ResearchStudy", "enrollment", element.getEnrollment().get(i), i); - if (element.hasPeriod()) - composePeriod(t, "ResearchStudy", "period", element.getPeriod(), -1); - if (element.hasSponsor()) - composeReference(t, "ResearchStudy", "sponsor", element.getSponsor(), -1); - if (element.hasPrincipalInvestigator()) - composeReference(t, "ResearchStudy", "principalInvestigator", element.getPrincipalInvestigator(), -1); - for (int i = 0; i < element.getSite().size(); i++) - composeReference(t, "ResearchStudy", "site", element.getSite().get(i), i); - if (element.hasReasonStopped()) - composeCodeableConcept(t, "ResearchStudy", "reasonStopped", element.getReasonStopped(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "ResearchStudy", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getArm().size(); i++) - composeResearchStudyResearchStudyArmComponent(t, "ResearchStudy", "arm", element.getArm().get(i), i); - } - - protected void composeResearchStudyResearchStudyArmComponent(Complex parent, String parentType, String name, ResearchStudy.ResearchStudyArmComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "arm", name, element, index); - if (element.hasNameElement()) - composeString(t, "ResearchStudy", "name", element.getNameElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "ResearchStudy", "code", element.getCode(), -1); - if (element.hasDescriptionElement()) - composeString(t, "ResearchStudy", "description", element.getDescriptionElement(), -1); - } - - protected void composeResearchSubject(Complex parent, String parentType, String name, ResearchSubject element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ResearchSubject", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "ResearchSubject", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ResearchSubject", "status", element.getStatusElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "ResearchSubject", "period", element.getPeriod(), -1); - if (element.hasStudy()) - composeReference(t, "ResearchSubject", "study", element.getStudy(), -1); - if (element.hasIndividual()) - composeReference(t, "ResearchSubject", "individual", element.getIndividual(), -1); - if (element.hasAssignedArmElement()) - composeString(t, "ResearchSubject", "assignedArm", element.getAssignedArmElement(), -1); - if (element.hasActualArmElement()) - composeString(t, "ResearchSubject", "actualArm", element.getActualArmElement(), -1); - if (element.hasConsent()) - composeReference(t, "ResearchSubject", "consent", element.getConsent(), -1); - } - - protected void composeRiskAssessment(Complex parent, String parentType, String name, RiskAssessment element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "RiskAssessment", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "RiskAssessment", "identifier", element.getIdentifier(), -1); - if (element.hasBasedOn()) - composeReference(t, "RiskAssessment", "basedOn", element.getBasedOn(), -1); - if (element.hasParent()) - composeReference(t, "RiskAssessment", "parent", element.getParent(), -1); - if (element.hasStatusElement()) - composeEnum(t, "RiskAssessment", "status", element.getStatusElement(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "RiskAssessment", "method", element.getMethod(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "RiskAssessment", "code", element.getCode(), -1); - if (element.hasSubject()) - composeReference(t, "RiskAssessment", "subject", element.getSubject(), -1); - if (element.hasContext()) - composeReference(t, "RiskAssessment", "context", element.getContext(), -1); - if (element.hasOccurrence()) - composeType(t, "RiskAssessment", "occurrence", element.getOccurrence(), -1); - if (element.hasCondition()) - composeReference(t, "RiskAssessment", "condition", element.getCondition(), -1); - if (element.hasPerformer()) - composeReference(t, "RiskAssessment", "performer", element.getPerformer(), -1); - if (element.hasReason()) - composeType(t, "RiskAssessment", "reason", element.getReason(), -1); - for (int i = 0; i < element.getBasis().size(); i++) - composeReference(t, "RiskAssessment", "basis", element.getBasis().get(i), i); - for (int i = 0; i < element.getPrediction().size(); i++) - composeRiskAssessmentRiskAssessmentPredictionComponent(t, "RiskAssessment", "prediction", element.getPrediction().get(i), i); - if (element.hasMitigationElement()) - composeString(t, "RiskAssessment", "mitigation", element.getMitigationElement(), -1); - if (element.hasCommentElement()) - composeString(t, "RiskAssessment", "comment", element.getCommentElement(), -1); - } - - protected void composeRiskAssessmentRiskAssessmentPredictionComponent(Complex parent, String parentType, String name, RiskAssessment.RiskAssessmentPredictionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "prediction", name, element, index); - if (element.hasOutcome()) - composeCodeableConcept(t, "RiskAssessment", "outcome", element.getOutcome(), -1); - if (element.hasProbability()) - composeType(t, "RiskAssessment", "probability", element.getProbability(), -1); - if (element.hasQualitativeRisk()) - composeCodeableConcept(t, "RiskAssessment", "qualitativeRisk", element.getQualitativeRisk(), -1); - if (element.hasRelativeRiskElement()) - composeDecimal(t, "RiskAssessment", "relativeRisk", element.getRelativeRiskElement(), -1); - if (element.hasWhen()) - composeType(t, "RiskAssessment", "when", element.getWhen(), -1); - if (element.hasRationaleElement()) - composeString(t, "RiskAssessment", "rationale", element.getRationaleElement(), -1); - } - - protected void composeSchedule(Complex parent, String parentType, String name, Schedule element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Schedule", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Schedule", "identifier", element.getIdentifier().get(i), i); - if (element.hasActiveElement()) - composeBoolean(t, "Schedule", "active", element.getActiveElement(), -1); - if (element.hasServiceCategory()) - composeCodeableConcept(t, "Schedule", "serviceCategory", element.getServiceCategory(), -1); - for (int i = 0; i < element.getServiceType().size(); i++) - composeCodeableConcept(t, "Schedule", "serviceType", element.getServiceType().get(i), i); - for (int i = 0; i < element.getSpecialty().size(); i++) - composeCodeableConcept(t, "Schedule", "specialty", element.getSpecialty().get(i), i); - for (int i = 0; i < element.getActor().size(); i++) - composeReference(t, "Schedule", "actor", element.getActor().get(i), i); - if (element.hasPlanningHorizon()) - composePeriod(t, "Schedule", "planningHorizon", element.getPlanningHorizon(), -1); - if (element.hasCommentElement()) - composeString(t, "Schedule", "comment", element.getCommentElement(), -1); - } - - protected void composeSearchParameter(Complex parent, String parentType, String name, SearchParameter element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "SearchParameter", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "SearchParameter", "url", element.getUrlElement(), -1); - if (element.hasVersionElement()) - composeString(t, "SearchParameter", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "SearchParameter", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "SearchParameter", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "SearchParameter", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "SearchParameter", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "SearchParameter", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "SearchParameter", "contact", element.getContact().get(i), i); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "SearchParameter", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "SearchParameter", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "SearchParameter", "purpose", element.getPurposeElement(), -1); - if (element.hasCodeElement()) - composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1); - for (int i = 0; i < element.getBase().size(); i++) - composeCode(t, "SearchParameter", "base", element.getBase().get(i), i); - if (element.hasTypeElement()) - composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1); - if (element.hasDerivedFromElement()) - composeUri(t, "SearchParameter", "derivedFrom", element.getDerivedFromElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "SearchParameter", "description", element.getDescriptionElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1); - if (element.hasXpathElement()) - composeString(t, "SearchParameter", "xpath", element.getXpathElement(), -1); - if (element.hasXpathUsageElement()) - composeEnum(t, "SearchParameter", "xpathUsage", element.getXpathUsageElement(), -1); - for (int i = 0; i < element.getTarget().size(); i++) - composeCode(t, "SearchParameter", "target", element.getTarget().get(i), i); - for (int i = 0; i < element.getComparator().size(); i++) - composeEnum(t, "SearchParameter", "comparator", element.getComparator().get(i), i); - for (int i = 0; i < element.getModifier().size(); i++) - composeEnum(t, "SearchParameter", "modifier", element.getModifier().get(i), i); - for (int i = 0; i < element.getChain().size(); i++) - composeString(t, "SearchParameter", "chain", element.getChain().get(i), i); - for (int i = 0; i < element.getComponent().size(); i++) - composeSearchParameterSearchParameterComponentComponent(t, "SearchParameter", "component", element.getComponent().get(i), i); - } - - protected void composeSearchParameterSearchParameterComponentComponent(Complex parent, String parentType, String name, SearchParameter.SearchParameterComponentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "component", name, element, index); - if (element.hasDefinition()) - composeReference(t, "SearchParameter", "definition", element.getDefinition(), -1); - if (element.hasExpressionElement()) - composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1); - } - - protected void composeSequence(Complex parent, String parentType, String name, Sequence element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Sequence", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Sequence", "identifier", element.getIdentifier().get(i), i); - if (element.hasTypeElement()) - composeEnum(t, "Sequence", "type", element.getTypeElement(), -1); - if (element.hasCoordinateSystemElement()) - composeInteger(t, "Sequence", "coordinateSystem", element.getCoordinateSystemElement(), -1); - if (element.hasPatient()) - composeReference(t, "Sequence", "patient", element.getPatient(), -1); - if (element.hasSpecimen()) - composeReference(t, "Sequence", "specimen", element.getSpecimen(), -1); - if (element.hasDevice()) - composeReference(t, "Sequence", "device", element.getDevice(), -1); - if (element.hasPerformer()) - composeReference(t, "Sequence", "performer", element.getPerformer(), -1); - if (element.hasQuantity()) - composeQuantity(t, "Sequence", "quantity", element.getQuantity(), -1); - if (element.hasReferenceSeq()) - composeSequenceSequenceReferenceSeqComponent(t, "Sequence", "referenceSeq", element.getReferenceSeq(), -1); - for (int i = 0; i < element.getVariant().size(); i++) - composeSequenceSequenceVariantComponent(t, "Sequence", "variant", element.getVariant().get(i), i); - if (element.hasObservedSeqElement()) - composeString(t, "Sequence", "observedSeq", element.getObservedSeqElement(), -1); - for (int i = 0; i < element.getQuality().size(); i++) - composeSequenceSequenceQualityComponent(t, "Sequence", "quality", element.getQuality().get(i), i); - if (element.hasReadCoverageElement()) - composeInteger(t, "Sequence", "readCoverage", element.getReadCoverageElement(), -1); - for (int i = 0; i < element.getRepository().size(); i++) - composeSequenceSequenceRepositoryComponent(t, "Sequence", "repository", element.getRepository().get(i), i); - for (int i = 0; i < element.getPointer().size(); i++) - composeReference(t, "Sequence", "pointer", element.getPointer().get(i), i); - } - - protected void composeSequenceSequenceReferenceSeqComponent(Complex parent, String parentType, String name, Sequence.SequenceReferenceSeqComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "referenceSeq", name, element, index); - if (element.hasChromosome()) - composeCodeableConcept(t, "Sequence", "chromosome", element.getChromosome(), -1); - if (element.hasGenomeBuildElement()) - composeString(t, "Sequence", "genomeBuild", element.getGenomeBuildElement(), -1); - if (element.hasReferenceSeqId()) - composeCodeableConcept(t, "Sequence", "referenceSeqId", element.getReferenceSeqId(), -1); - if (element.hasReferenceSeqPointer()) - composeReference(t, "Sequence", "referenceSeqPointer", element.getReferenceSeqPointer(), -1); - if (element.hasReferenceSeqStringElement()) - composeString(t, "Sequence", "referenceSeqString", element.getReferenceSeqStringElement(), -1); - if (element.hasStrandElement()) - composeInteger(t, "Sequence", "strand", element.getStrandElement(), -1); - if (element.hasWindowStartElement()) - composeInteger(t, "Sequence", "windowStart", element.getWindowStartElement(), -1); - if (element.hasWindowEndElement()) - composeInteger(t, "Sequence", "windowEnd", element.getWindowEndElement(), -1); - } - - protected void composeSequenceSequenceVariantComponent(Complex parent, String parentType, String name, Sequence.SequenceVariantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "variant", name, element, index); - if (element.hasStartElement()) - composeInteger(t, "Sequence", "start", element.getStartElement(), -1); - if (element.hasEndElement()) - composeInteger(t, "Sequence", "end", element.getEndElement(), -1); - if (element.hasObservedAlleleElement()) - composeString(t, "Sequence", "observedAllele", element.getObservedAlleleElement(), -1); - if (element.hasReferenceAlleleElement()) - composeString(t, "Sequence", "referenceAllele", element.getReferenceAlleleElement(), -1); - if (element.hasCigarElement()) - composeString(t, "Sequence", "cigar", element.getCigarElement(), -1); - if (element.hasVariantPointer()) - composeReference(t, "Sequence", "variantPointer", element.getVariantPointer(), -1); - } - - protected void composeSequenceSequenceQualityComponent(Complex parent, String parentType, String name, Sequence.SequenceQualityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "quality", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Sequence", "type", element.getTypeElement(), -1); - if (element.hasStandardSequence()) - composeCodeableConcept(t, "Sequence", "standardSequence", element.getStandardSequence(), -1); - if (element.hasStartElement()) - composeInteger(t, "Sequence", "start", element.getStartElement(), -1); - if (element.hasEndElement()) - composeInteger(t, "Sequence", "end", element.getEndElement(), -1); - if (element.hasScore()) - composeQuantity(t, "Sequence", "score", element.getScore(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "Sequence", "method", element.getMethod(), -1); - if (element.hasTruthTPElement()) - composeDecimal(t, "Sequence", "truthTP", element.getTruthTPElement(), -1); - if (element.hasQueryTPElement()) - composeDecimal(t, "Sequence", "queryTP", element.getQueryTPElement(), -1); - if (element.hasTruthFNElement()) - composeDecimal(t, "Sequence", "truthFN", element.getTruthFNElement(), -1); - if (element.hasQueryFPElement()) - composeDecimal(t, "Sequence", "queryFP", element.getQueryFPElement(), -1); - if (element.hasGtFPElement()) - composeDecimal(t, "Sequence", "gtFP", element.getGtFPElement(), -1); - if (element.hasPrecisionElement()) - composeDecimal(t, "Sequence", "precision", element.getPrecisionElement(), -1); - if (element.hasRecallElement()) - composeDecimal(t, "Sequence", "recall", element.getRecallElement(), -1); - if (element.hasFScoreElement()) - composeDecimal(t, "Sequence", "fScore", element.getFScoreElement(), -1); - } - - protected void composeSequenceSequenceRepositoryComponent(Complex parent, String parentType, String name, Sequence.SequenceRepositoryComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "repository", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Sequence", "type", element.getTypeElement(), -1); - if (element.hasUrlElement()) - composeUri(t, "Sequence", "url", element.getUrlElement(), -1); - if (element.hasNameElement()) - composeString(t, "Sequence", "name", element.getNameElement(), -1); - if (element.hasDatasetIdElement()) - composeString(t, "Sequence", "datasetId", element.getDatasetIdElement(), -1); - if (element.hasVariantsetIdElement()) - composeString(t, "Sequence", "variantsetId", element.getVariantsetIdElement(), -1); - if (element.hasReadsetIdElement()) - composeString(t, "Sequence", "readsetId", element.getReadsetIdElement(), -1); - } - - protected void composeServiceDefinition(Complex parent, String parentType, String name, ServiceDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ServiceDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "ServiceDefinition", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ServiceDefinition", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "ServiceDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "ServiceDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "ServiceDefinition", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ServiceDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "ServiceDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ServiceDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "ServiceDefinition", "publisher", element.getPublisherElement(), -1); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ServiceDefinition", "description", element.getDescriptionElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "ServiceDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasUsageElement()) - composeString(t, "ServiceDefinition", "usage", element.getUsageElement(), -1); - if (element.hasApprovalDateElement()) - composeDate(t, "ServiceDefinition", "approvalDate", element.getApprovalDateElement(), -1); - if (element.hasLastReviewDateElement()) - composeDate(t, "ServiceDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); - if (element.hasEffectivePeriod()) - composePeriod(t, "ServiceDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "ServiceDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ServiceDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - for (int i = 0; i < element.getTopic().size(); i++) - composeCodeableConcept(t, "ServiceDefinition", "topic", element.getTopic().get(i), i); - for (int i = 0; i < element.getContributor().size(); i++) - composeContributor(t, "ServiceDefinition", "contributor", element.getContributor().get(i), i); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ServiceDefinition", "contact", element.getContact().get(i), i); - if (element.hasCopyrightElement()) - composeMarkdown(t, "ServiceDefinition", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getRelatedArtifact().size(); i++) - composeRelatedArtifact(t, "ServiceDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); - for (int i = 0; i < element.getTrigger().size(); i++) - composeTriggerDefinition(t, "ServiceDefinition", "trigger", element.getTrigger().get(i), i); - for (int i = 0; i < element.getDataRequirement().size(); i++) - composeDataRequirement(t, "ServiceDefinition", "dataRequirement", element.getDataRequirement().get(i), i); - if (element.hasOperationDefinition()) - composeReference(t, "ServiceDefinition", "operationDefinition", element.getOperationDefinition(), -1); - } - - protected void composeSlot(Complex parent, String parentType, String name, Slot element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Slot", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Slot", "identifier", element.getIdentifier().get(i), i); - if (element.hasServiceCategory()) - composeCodeableConcept(t, "Slot", "serviceCategory", element.getServiceCategory(), -1); - for (int i = 0; i < element.getServiceType().size(); i++) - composeCodeableConcept(t, "Slot", "serviceType", element.getServiceType().get(i), i); - for (int i = 0; i < element.getSpecialty().size(); i++) - composeCodeableConcept(t, "Slot", "specialty", element.getSpecialty().get(i), i); - if (element.hasAppointmentType()) - composeCodeableConcept(t, "Slot", "appointmentType", element.getAppointmentType(), -1); - if (element.hasSchedule()) - composeReference(t, "Slot", "schedule", element.getSchedule(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Slot", "status", element.getStatusElement(), -1); - if (element.hasStartElement()) - composeInstant(t, "Slot", "start", element.getStartElement(), -1); - if (element.hasEndElement()) - composeInstant(t, "Slot", "end", element.getEndElement(), -1); - if (element.hasOverbookedElement()) - composeBoolean(t, "Slot", "overbooked", element.getOverbookedElement(), -1); - if (element.hasCommentElement()) - composeString(t, "Slot", "comment", element.getCommentElement(), -1); - } - - protected void composeSpecimen(Complex parent, String parentType, String name, Specimen element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Specimen", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Specimen", "identifier", element.getIdentifier().get(i), i); - if (element.hasAccessionIdentifier()) - composeIdentifier(t, "Specimen", "accessionIdentifier", element.getAccessionIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "Specimen", "status", element.getStatusElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Specimen", "type", element.getType(), -1); - if (element.hasSubject()) - composeReference(t, "Specimen", "subject", element.getSubject(), -1); - if (element.hasReceivedTimeElement()) - composeDateTime(t, "Specimen", "receivedTime", element.getReceivedTimeElement(), -1); - for (int i = 0; i < element.getParent().size(); i++) - composeReference(t, "Specimen", "parent", element.getParent().get(i), i); - for (int i = 0; i < element.getRequest().size(); i++) - composeReference(t, "Specimen", "request", element.getRequest().get(i), i); - if (element.hasCollection()) - composeSpecimenSpecimenCollectionComponent(t, "Specimen", "collection", element.getCollection(), -1); - for (int i = 0; i < element.getProcessing().size(); i++) - composeSpecimenSpecimenProcessingComponent(t, "Specimen", "processing", element.getProcessing().get(i), i); - for (int i = 0; i < element.getContainer().size(); i++) - composeSpecimenSpecimenContainerComponent(t, "Specimen", "container", element.getContainer().get(i), i); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Specimen", "note", element.getNote().get(i), i); - } - - protected void composeSpecimenSpecimenCollectionComponent(Complex parent, String parentType, String name, Specimen.SpecimenCollectionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "collection", name, element, index); - if (element.hasCollector()) - composeReference(t, "Specimen", "collector", element.getCollector(), -1); - if (element.hasCollected()) - composeType(t, "Specimen", "collected", element.getCollected(), -1); - if (element.hasQuantity()) - composeQuantity(t, "Specimen", "quantity", element.getQuantity(), -1); - if (element.hasMethod()) - composeCodeableConcept(t, "Specimen", "method", element.getMethod(), -1); - if (element.hasBodySite()) - composeCodeableConcept(t, "Specimen", "bodySite", element.getBodySite(), -1); - } - - protected void composeSpecimenSpecimenProcessingComponent(Complex parent, String parentType, String name, Specimen.SpecimenProcessingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "processing", name, element, index); - if (element.hasDescriptionElement()) - composeString(t, "Specimen", "description", element.getDescriptionElement(), -1); - if (element.hasProcedure()) - composeCodeableConcept(t, "Specimen", "procedure", element.getProcedure(), -1); - for (int i = 0; i < element.getAdditive().size(); i++) - composeReference(t, "Specimen", "additive", element.getAdditive().get(i), i); - if (element.hasTime()) - composeType(t, "Specimen", "time", element.getTime(), -1); - } - - protected void composeSpecimenSpecimenContainerComponent(Complex parent, String parentType, String name, Specimen.SpecimenContainerComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "container", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Specimen", "identifier", element.getIdentifier().get(i), i); - if (element.hasDescriptionElement()) - composeString(t, "Specimen", "description", element.getDescriptionElement(), -1); - if (element.hasType()) - composeCodeableConcept(t, "Specimen", "type", element.getType(), -1); - if (element.hasCapacity()) - composeQuantity(t, "Specimen", "capacity", element.getCapacity(), -1); - if (element.hasSpecimenQuantity()) - composeQuantity(t, "Specimen", "specimenQuantity", element.getSpecimenQuantity(), -1); - if (element.hasAdditive()) - composeType(t, "Specimen", "additive", element.getAdditive(), -1); - } - - protected void composeStructureDefinition(Complex parent, String parentType, String name, StructureDefinition element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "StructureDefinition", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "StructureDefinition", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "StructureDefinition", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "StructureDefinition", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "StructureDefinition", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "StructureDefinition", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "StructureDefinition", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "StructureDefinition", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "StructureDefinition", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "StructureDefinition", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "StructureDefinition", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "StructureDefinition", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "StructureDefinition", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "StructureDefinition", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "StructureDefinition", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "StructureDefinition", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getKeyword().size(); i++) - composeCoding(t, "StructureDefinition", "keyword", element.getKeyword().get(i), i); - if (element.hasFhirVersionElement()) - composeId(t, "StructureDefinition", "fhirVersion", element.getFhirVersionElement(), -1); - for (int i = 0; i < element.getMapping().size(); i++) - composeStructureDefinitionStructureDefinitionMappingComponent(t, "StructureDefinition", "mapping", element.getMapping().get(i), i); - if (element.hasKindElement()) - composeEnum(t, "StructureDefinition", "kind", element.getKindElement(), -1); - if (element.hasAbstractElement()) - composeBoolean(t, "StructureDefinition", "abstract", element.getAbstractElement(), -1); - if (element.hasContextTypeElement()) - composeEnum(t, "StructureDefinition", "contextType", element.getContextTypeElement(), -1); - for (int i = 0; i < element.getContext().size(); i++) - composeString(t, "StructureDefinition", "context", element.getContext().get(i), i); - for (int i = 0; i < element.getContextInvariant().size(); i++) - composeString(t, "StructureDefinition", "contextInvariant", element.getContextInvariant().get(i), i); - if (element.hasTypeElement()) - composeCode(t, "StructureDefinition", "type", element.getTypeElement(), -1); - if (element.hasBaseDefinitionElement()) - composeUri(t, "StructureDefinition", "baseDefinition", element.getBaseDefinitionElement(), -1); - if (element.hasDerivationElement()) - composeEnum(t, "StructureDefinition", "derivation", element.getDerivationElement(), -1); - if (element.hasSnapshot()) - composeStructureDefinitionStructureDefinitionSnapshotComponent(t, "StructureDefinition", "snapshot", element.getSnapshot(), -1); - if (element.hasDifferential()) - composeStructureDefinitionStructureDefinitionDifferentialComponent(t, "StructureDefinition", "differential", element.getDifferential(), -1); - } - - protected void composeStructureDefinitionStructureDefinitionMappingComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionMappingComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "mapping", name, element, index); - if (element.hasIdentityElement()) - composeId(t, "StructureDefinition", "identity", element.getIdentityElement(), -1); - if (element.hasUriElement()) - composeUri(t, "StructureDefinition", "uri", element.getUriElement(), -1); - if (element.hasNameElement()) - composeString(t, "StructureDefinition", "name", element.getNameElement(), -1); - if (element.hasCommentElement()) - composeString(t, "StructureDefinition", "comment", element.getCommentElement(), -1); - } - - protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionSnapshotComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "snapshot", name, element, index); - for (int i = 0; i < element.getElement().size(); i++) - composeElementDefinition(t, "StructureDefinition", "element", element.getElement().get(i), i); - } - - protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionDifferentialComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "differential", name, element, index); - for (int i = 0; i < element.getElement().size(); i++) - composeElementDefinition(t, "StructureDefinition", "element", element.getElement().get(i), i); - } - - protected void composeStructureMap(Complex parent, String parentType, String name, StructureMap element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "StructureMap", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "StructureMap", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "StructureMap", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "StructureMap", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "StructureMap", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "StructureMap", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "StructureMap", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "StructureMap", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "StructureMap", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "StructureMap", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "StructureMap", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "StructureMap", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "StructureMap", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "StructureMap", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "StructureMap", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "StructureMap", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getStructure().size(); i++) - composeStructureMapStructureMapStructureComponent(t, "StructureMap", "structure", element.getStructure().get(i), i); - for (int i = 0; i < element.getImport().size(); i++) - composeUri(t, "StructureMap", "import", element.getImport().get(i), i); - for (int i = 0; i < element.getGroup().size(); i++) - composeStructureMapStructureMapGroupComponent(t, "StructureMap", "group", element.getGroup().get(i), i); - } - - protected void composeStructureMapStructureMapStructureComponent(Complex parent, String parentType, String name, StructureMap.StructureMapStructureComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "structure", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "StructureMap", "url", element.getUrlElement(), -1); - if (element.hasModeElement()) - composeEnum(t, "StructureMap", "mode", element.getModeElement(), -1); - if (element.hasAliasElement()) - composeString(t, "StructureMap", "alias", element.getAliasElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeStructureMapStructureMapGroupComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "group", name, element, index); - if (element.hasNameElement()) - composeId(t, "StructureMap", "name", element.getNameElement(), -1); - if (element.hasExtendsElement()) - composeId(t, "StructureMap", "extends", element.getExtendsElement(), -1); - if (element.hasTypeModeElement()) - composeEnum(t, "StructureMap", "typeMode", element.getTypeModeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); - for (int i = 0; i < element.getInput().size(); i++) - composeStructureMapStructureMapGroupInputComponent(t, "StructureMap", "input", element.getInput().get(i), i); - for (int i = 0; i < element.getRule().size(); i++) - composeStructureMapStructureMapGroupRuleComponent(t, "StructureMap", "rule", element.getRule().get(i), i); - } - - protected void composeStructureMapStructureMapGroupInputComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupInputComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "input", name, element, index); - if (element.hasNameElement()) - composeId(t, "StructureMap", "name", element.getNameElement(), -1); - if (element.hasTypeElement()) - composeString(t, "StructureMap", "type", element.getTypeElement(), -1); - if (element.hasModeElement()) - composeEnum(t, "StructureMap", "mode", element.getModeElement(), -1); - if (element.hasDocumentationElement()) - composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeStructureMapStructureMapGroupRuleComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rule", name, element, index); - if (element.hasNameElement()) - composeId(t, "StructureMap", "name", element.getNameElement(), -1); - for (int i = 0; i < element.getSource().size(); i++) - composeStructureMapStructureMapGroupRuleSourceComponent(t, "StructureMap", "source", element.getSource().get(i), i); - for (int i = 0; i < element.getTarget().size(); i++) - composeStructureMapStructureMapGroupRuleTargetComponent(t, "StructureMap", "target", element.getTarget().get(i), i); - for (int i = 0; i < element.getRule().size(); i++) - composeStructureMapStructureMapGroupRuleComponent(t, "StructureMap", "rule", element.getRule().get(i), i); - for (int i = 0; i < element.getDependent().size(); i++) - composeStructureMapStructureMapGroupRuleDependentComponent(t, "StructureMap", "dependent", element.getDependent().get(i), i); - if (element.hasDocumentationElement()) - composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); - } - - protected void composeStructureMapStructureMapGroupRuleSourceComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleSourceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "source", name, element, index); - if (element.hasContextElement()) - composeId(t, "StructureMap", "context", element.getContextElement(), -1); - if (element.hasMinElement()) - composeInteger(t, "StructureMap", "min", element.getMinElement(), -1); - if (element.hasMaxElement()) - composeString(t, "StructureMap", "max", element.getMaxElement(), -1); - if (element.hasTypeElement()) - composeString(t, "StructureMap", "type", element.getTypeElement(), -1); - if (element.hasDefaultValue()) - composeType(t, "StructureMap", "defaultValue", element.getDefaultValue(), -1); - if (element.hasElementElement()) - composeString(t, "StructureMap", "element", element.getElementElement(), -1); - if (element.hasListModeElement()) - composeEnum(t, "StructureMap", "listMode", element.getListModeElement(), -1); - if (element.hasVariableElement()) - composeId(t, "StructureMap", "variable", element.getVariableElement(), -1); - if (element.hasConditionElement()) - composeString(t, "StructureMap", "condition", element.getConditionElement(), -1); - if (element.hasCheckElement()) - composeString(t, "StructureMap", "check", element.getCheckElement(), -1); - } - - protected void composeStructureMapStructureMapGroupRuleTargetComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleTargetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "target", name, element, index); - if (element.hasContextElement()) - composeId(t, "StructureMap", "context", element.getContextElement(), -1); - if (element.hasContextTypeElement()) - composeEnum(t, "StructureMap", "contextType", element.getContextTypeElement(), -1); - if (element.hasElementElement()) - composeString(t, "StructureMap", "element", element.getElementElement(), -1); - if (element.hasVariableElement()) - composeId(t, "StructureMap", "variable", element.getVariableElement(), -1); - for (int i = 0; i < element.getListMode().size(); i++) - composeEnum(t, "StructureMap", "listMode", element.getListMode().get(i), i); - if (element.hasListRuleIdElement()) - composeId(t, "StructureMap", "listRuleId", element.getListRuleIdElement(), -1); - if (element.hasTransformElement()) - composeEnum(t, "StructureMap", "transform", element.getTransformElement(), -1); - for (int i = 0; i < element.getParameter().size(); i++) - composeStructureMapStructureMapGroupRuleTargetParameterComponent(t, "StructureMap", "parameter", element.getParameter().get(i), i); - } - - protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "parameter", name, element, index); - if (element.hasValue()) - composeType(t, "StructureMap", "value", element.getValue(), -1); - } - - protected void composeStructureMapStructureMapGroupRuleDependentComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleDependentComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dependent", name, element, index); - if (element.hasNameElement()) - composeId(t, "StructureMap", "name", element.getNameElement(), -1); - for (int i = 0; i < element.getVariable().size(); i++) - composeString(t, "StructureMap", "variable", element.getVariable().get(i), i); - } - - protected void composeSubscription(Complex parent, String parentType, String name, Subscription element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Subscription", name, element, index); - if (element.hasStatusElement()) - composeEnum(t, "Subscription", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactPoint(t, "Subscription", "contact", element.getContact().get(i), i); - if (element.hasEndElement()) - composeInstant(t, "Subscription", "end", element.getEndElement(), -1); - if (element.hasReasonElement()) - composeString(t, "Subscription", "reason", element.getReasonElement(), -1); - if (element.hasCriteriaElement()) - composeString(t, "Subscription", "criteria", element.getCriteriaElement(), -1); - if (element.hasErrorElement()) - composeString(t, "Subscription", "error", element.getErrorElement(), -1); - if (element.hasChannel()) - composeSubscriptionSubscriptionChannelComponent(t, "Subscription", "channel", element.getChannel(), -1); - for (int i = 0; i < element.getTag().size(); i++) - composeCoding(t, "Subscription", "tag", element.getTag().get(i), i); - } - - protected void composeSubscriptionSubscriptionChannelComponent(Complex parent, String parentType, String name, Subscription.SubscriptionChannelComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "channel", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "Subscription", "type", element.getTypeElement(), -1); - if (element.hasEndpointElement()) - composeUri(t, "Subscription", "endpoint", element.getEndpointElement(), -1); - if (element.hasPayloadElement()) - composeString(t, "Subscription", "payload", element.getPayloadElement(), -1); - for (int i = 0; i < element.getHeader().size(); i++) - composeString(t, "Subscription", "header", element.getHeader().get(i), i); - } - - protected void composeSubstance(Complex parent, String parentType, String name, Substance element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Substance", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Substance", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Substance", "status", element.getStatusElement(), -1); - for (int i = 0; i < element.getCategory().size(); i++) - composeCodeableConcept(t, "Substance", "category", element.getCategory().get(i), i); - if (element.hasCode()) - composeCodeableConcept(t, "Substance", "code", element.getCode(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Substance", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getInstance().size(); i++) - composeSubstanceSubstanceInstanceComponent(t, "Substance", "instance", element.getInstance().get(i), i); - for (int i = 0; i < element.getIngredient().size(); i++) - composeSubstanceSubstanceIngredientComponent(t, "Substance", "ingredient", element.getIngredient().get(i), i); - } - - protected void composeSubstanceSubstanceInstanceComponent(Complex parent, String parentType, String name, Substance.SubstanceInstanceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "instance", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "Substance", "identifier", element.getIdentifier(), -1); - if (element.hasExpiryElement()) - composeDateTime(t, "Substance", "expiry", element.getExpiryElement(), -1); - if (element.hasQuantity()) - composeQuantity(t, "Substance", "quantity", element.getQuantity(), -1); - } - - protected void composeSubstanceSubstanceIngredientComponent(Complex parent, String parentType, String name, Substance.SubstanceIngredientComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "ingredient", name, element, index); - if (element.hasQuantity()) - composeRatio(t, "Substance", "quantity", element.getQuantity(), -1); - if (element.hasSubstance()) - composeType(t, "Substance", "substance", element.getSubstance(), -1); - } - - protected void composeSupplyDelivery(Complex parent, String parentType, String name, SupplyDelivery element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "SupplyDelivery", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "SupplyDelivery", "identifier", element.getIdentifier(), -1); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "SupplyDelivery", "basedOn", element.getBasedOn().get(i), i); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "SupplyDelivery", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "SupplyDelivery", "status", element.getStatusElement(), -1); - if (element.hasPatient()) - composeReference(t, "SupplyDelivery", "patient", element.getPatient(), -1); - if (element.hasType()) - composeCodeableConcept(t, "SupplyDelivery", "type", element.getType(), -1); - if (element.hasSuppliedItem()) - composeSupplyDeliverySupplyDeliverySuppliedItemComponent(t, "SupplyDelivery", "suppliedItem", element.getSuppliedItem(), -1); - if (element.hasOccurrence()) - composeType(t, "SupplyDelivery", "occurrence", element.getOccurrence(), -1); - if (element.hasSupplier()) - composeReference(t, "SupplyDelivery", "supplier", element.getSupplier(), -1); - if (element.hasDestination()) - composeReference(t, "SupplyDelivery", "destination", element.getDestination(), -1); - for (int i = 0; i < element.getReceiver().size(); i++) - composeReference(t, "SupplyDelivery", "receiver", element.getReceiver().get(i), i); - } - - protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(Complex parent, String parentType, String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "suppliedItem", name, element, index); - if (element.hasQuantity()) - composeQuantity(t, "SupplyDelivery", "quantity", element.getQuantity(), -1); - if (element.hasItem()) - composeType(t, "SupplyDelivery", "item", element.getItem(), -1); - } - - protected void composeSupplyRequest(Complex parent, String parentType, String name, SupplyRequest element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "SupplyRequest", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "SupplyRequest", "identifier", element.getIdentifier(), -1); - if (element.hasStatusElement()) - composeEnum(t, "SupplyRequest", "status", element.getStatusElement(), -1); - if (element.hasCategory()) - composeCodeableConcept(t, "SupplyRequest", "category", element.getCategory(), -1); - if (element.hasPriorityElement()) - composeEnum(t, "SupplyRequest", "priority", element.getPriorityElement(), -1); - if (element.hasOrderedItem()) - composeSupplyRequestSupplyRequestOrderedItemComponent(t, "SupplyRequest", "orderedItem", element.getOrderedItem(), -1); - if (element.hasOccurrence()) - composeType(t, "SupplyRequest", "occurrence", element.getOccurrence(), -1); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "SupplyRequest", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasRequester()) - composeSupplyRequestSupplyRequestRequesterComponent(t, "SupplyRequest", "requester", element.getRequester(), -1); - for (int i = 0; i < element.getSupplier().size(); i++) - composeReference(t, "SupplyRequest", "supplier", element.getSupplier().get(i), i); - if (element.hasReason()) - composeType(t, "SupplyRequest", "reason", element.getReason(), -1); - if (element.hasDeliverFrom()) - composeReference(t, "SupplyRequest", "deliverFrom", element.getDeliverFrom(), -1); - if (element.hasDeliverTo()) - composeReference(t, "SupplyRequest", "deliverTo", element.getDeliverTo(), -1); - } - - protected void composeSupplyRequestSupplyRequestOrderedItemComponent(Complex parent, String parentType, String name, SupplyRequest.SupplyRequestOrderedItemComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "orderedItem", name, element, index); - if (element.hasQuantity()) - composeQuantity(t, "SupplyRequest", "quantity", element.getQuantity(), -1); - if (element.hasItem()) - composeType(t, "SupplyRequest", "item", element.getItem(), -1); - } - - protected void composeSupplyRequestSupplyRequestRequesterComponent(Complex parent, String parentType, String name, SupplyRequest.SupplyRequestRequesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requester", name, element, index); - if (element.hasAgent()) - composeReference(t, "SupplyRequest", "agent", element.getAgent(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "SupplyRequest", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeTask(Complex parent, String parentType, String name, Task element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "Task", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "Task", "identifier", element.getIdentifier().get(i), i); - if (element.hasDefinition()) - composeType(t, "Task", "definition", element.getDefinition(), -1); - for (int i = 0; i < element.getBasedOn().size(); i++) - composeReference(t, "Task", "basedOn", element.getBasedOn().get(i), i); - if (element.hasGroupIdentifier()) - composeIdentifier(t, "Task", "groupIdentifier", element.getGroupIdentifier(), -1); - for (int i = 0; i < element.getPartOf().size(); i++) - composeReference(t, "Task", "partOf", element.getPartOf().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "Task", "status", element.getStatusElement(), -1); - if (element.hasStatusReason()) - composeCodeableConcept(t, "Task", "statusReason", element.getStatusReason(), -1); - if (element.hasBusinessStatus()) - composeCodeableConcept(t, "Task", "businessStatus", element.getBusinessStatus(), -1); - if (element.hasIntentElement()) - composeEnum(t, "Task", "intent", element.getIntentElement(), -1); - if (element.hasPriorityElement()) - composeEnum(t, "Task", "priority", element.getPriorityElement(), -1); - if (element.hasCode()) - composeCodeableConcept(t, "Task", "code", element.getCode(), -1); - if (element.hasDescriptionElement()) - composeString(t, "Task", "description", element.getDescriptionElement(), -1); - if (element.hasFocus()) - composeReference(t, "Task", "focus", element.getFocus(), -1); - if (element.hasFor()) - composeReference(t, "Task", "for", element.getFor(), -1); - if (element.hasContext()) - composeReference(t, "Task", "context", element.getContext(), -1); - if (element.hasExecutionPeriod()) - composePeriod(t, "Task", "executionPeriod", element.getExecutionPeriod(), -1); - if (element.hasAuthoredOnElement()) - composeDateTime(t, "Task", "authoredOn", element.getAuthoredOnElement(), -1); - if (element.hasLastModifiedElement()) - composeDateTime(t, "Task", "lastModified", element.getLastModifiedElement(), -1); - if (element.hasRequester()) - composeTaskTaskRequesterComponent(t, "Task", "requester", element.getRequester(), -1); - for (int i = 0; i < element.getPerformerType().size(); i++) - composeCodeableConcept(t, "Task", "performerType", element.getPerformerType().get(i), i); - if (element.hasOwner()) - composeReference(t, "Task", "owner", element.getOwner(), -1); - if (element.hasReason()) - composeCodeableConcept(t, "Task", "reason", element.getReason(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "Task", "note", element.getNote().get(i), i); - for (int i = 0; i < element.getRelevantHistory().size(); i++) - composeReference(t, "Task", "relevantHistory", element.getRelevantHistory().get(i), i); - if (element.hasRestriction()) - composeTaskTaskRestrictionComponent(t, "Task", "restriction", element.getRestriction(), -1); - for (int i = 0; i < element.getInput().size(); i++) - composeTaskParameterComponent(t, "Task", "input", element.getInput().get(i), i); - for (int i = 0; i < element.getOutput().size(); i++) - composeTaskTaskOutputComponent(t, "Task", "output", element.getOutput().get(i), i); - } - - protected void composeTaskTaskRequesterComponent(Complex parent, String parentType, String name, Task.TaskRequesterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requester", name, element, index); - if (element.hasAgent()) - composeReference(t, "Task", "agent", element.getAgent(), -1); - if (element.hasOnBehalfOf()) - composeReference(t, "Task", "onBehalfOf", element.getOnBehalfOf(), -1); - } - - protected void composeTaskTaskRestrictionComponent(Complex parent, String parentType, String name, Task.TaskRestrictionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "restriction", name, element, index); - if (element.hasRepetitionsElement()) - composePositiveInt(t, "Task", "repetitions", element.getRepetitionsElement(), -1); - if (element.hasPeriod()) - composePeriod(t, "Task", "period", element.getPeriod(), -1); - for (int i = 0; i < element.getRecipient().size(); i++) - composeReference(t, "Task", "recipient", element.getRecipient().get(i), i); - } - - protected void composeTaskParameterComponent(Complex parent, String parentType, String name, Task.ParameterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "input", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "Task", "type", element.getType(), -1); - if (element.hasValue()) - composeType(t, "Task", "value", element.getValue(), -1); - } - - protected void composeTaskTaskOutputComponent(Complex parent, String parentType, String name, Task.TaskOutputComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "output", name, element, index); - if (element.hasType()) - composeCodeableConcept(t, "Task", "type", element.getType(), -1); - if (element.hasValue()) - composeType(t, "Task", "value", element.getValue(), -1); - } - - protected void composeTestReport(Complex parent, String parentType, String name, TestReport element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "TestReport", name, element, index); - if (element.hasIdentifier()) - composeIdentifier(t, "TestReport", "identifier", element.getIdentifier(), -1); - if (element.hasNameElement()) - composeString(t, "TestReport", "name", element.getNameElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "TestReport", "status", element.getStatusElement(), -1); - if (element.hasTestScript()) - composeReference(t, "TestReport", "testScript", element.getTestScript(), -1); - if (element.hasResultElement()) - composeEnum(t, "TestReport", "result", element.getResultElement(), -1); - if (element.hasScoreElement()) - composeDecimal(t, "TestReport", "score", element.getScoreElement(), -1); - if (element.hasTesterElement()) - composeString(t, "TestReport", "tester", element.getTesterElement(), -1); - if (element.hasIssuedElement()) - composeDateTime(t, "TestReport", "issued", element.getIssuedElement(), -1); - for (int i = 0; i < element.getParticipant().size(); i++) - composeTestReportTestReportParticipantComponent(t, "TestReport", "participant", element.getParticipant().get(i), i); - if (element.hasSetup()) - composeTestReportTestReportSetupComponent(t, "TestReport", "setup", element.getSetup(), -1); - for (int i = 0; i < element.getTest().size(); i++) - composeTestReportTestReportTestComponent(t, "TestReport", "test", element.getTest().get(i), i); - if (element.hasTeardown()) - composeTestReportTestReportTeardownComponent(t, "TestReport", "teardown", element.getTeardown(), -1); - } - - protected void composeTestReportTestReportParticipantComponent(Complex parent, String parentType, String name, TestReport.TestReportParticipantComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "participant", name, element, index); - if (element.hasTypeElement()) - composeEnum(t, "TestReport", "type", element.getTypeElement(), -1); - if (element.hasUriElement()) - composeUri(t, "TestReport", "uri", element.getUriElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "TestReport", "display", element.getDisplayElement(), -1); - } - - protected void composeTestReportTestReportSetupComponent(Complex parent, String parentType, String name, TestReport.TestReportSetupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "setup", name, element, index); - for (int i = 0; i < element.getAction().size(); i++) - composeTestReportSetupActionComponent(t, "TestReport", "action", element.getAction().get(i), i); - } - - protected void composeTestReportSetupActionComponent(Complex parent, String parentType, String name, TestReport.SetupActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasOperation()) - composeTestReportSetupActionOperationComponent(t, "TestReport", "operation", element.getOperation(), -1); - if (element.hasAssert()) - composeTestReportSetupActionAssertComponent(t, "TestReport", "assert", element.getAssert(), -1); - } - - protected void composeTestReportSetupActionOperationComponent(Complex parent, String parentType, String name, TestReport.SetupActionOperationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "operation", name, element, index); - if (element.hasResultElement()) - composeEnum(t, "TestReport", "result", element.getResultElement(), -1); - if (element.hasMessageElement()) - composeMarkdown(t, "TestReport", "message", element.getMessageElement(), -1); - if (element.hasDetailElement()) - composeUri(t, "TestReport", "detail", element.getDetailElement(), -1); - } - - protected void composeTestReportSetupActionAssertComponent(Complex parent, String parentType, String name, TestReport.SetupActionAssertComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "assert", name, element, index); - if (element.hasResultElement()) - composeEnum(t, "TestReport", "result", element.getResultElement(), -1); - if (element.hasMessageElement()) - composeMarkdown(t, "TestReport", "message", element.getMessageElement(), -1); - if (element.hasDetailElement()) - composeString(t, "TestReport", "detail", element.getDetailElement(), -1); - } - - protected void composeTestReportTestReportTestComponent(Complex parent, String parentType, String name, TestReport.TestReportTestComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "test", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestReport", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestReport", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getAction().size(); i++) - composeTestReportTestActionComponent(t, "TestReport", "action", element.getAction().get(i), i); - } - - protected void composeTestReportTestActionComponent(Complex parent, String parentType, String name, TestReport.TestActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasOperation()) - composeTestReportSetupActionOperationComponent(t, "TestReport", "operation", element.getOperation(), -1); - if (element.hasAssert()) - composeTestReportSetupActionAssertComponent(t, "TestReport", "assert", element.getAssert(), -1); - } - - protected void composeTestReportTestReportTeardownComponent(Complex parent, String parentType, String name, TestReport.TestReportTeardownComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "teardown", name, element, index); - for (int i = 0; i < element.getAction().size(); i++) - composeTestReportTeardownActionComponent(t, "TestReport", "action", element.getAction().get(i), i); - } - - protected void composeTestReportTeardownActionComponent(Complex parent, String parentType, String name, TestReport.TeardownActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasOperation()) - composeTestReportSetupActionOperationComponent(t, "TestReport", "operation", element.getOperation(), -1); - } - - protected void composeTestScript(Complex parent, String parentType, String name, TestScript element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "TestScript", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "TestScript", "url", element.getUrlElement(), -1); - if (element.hasIdentifier()) - composeIdentifier(t, "TestScript", "identifier", element.getIdentifier(), -1); - if (element.hasVersionElement()) - composeString(t, "TestScript", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "TestScript", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "TestScript", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "TestScript", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "TestScript", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "TestScript", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "TestScript", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "TestScript", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "TestScript", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "TestScript", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasPurposeElement()) - composeMarkdown(t, "TestScript", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "TestScript", "copyright", element.getCopyrightElement(), -1); - for (int i = 0; i < element.getOrigin().size(); i++) - composeTestScriptTestScriptOriginComponent(t, "TestScript", "origin", element.getOrigin().get(i), i); - for (int i = 0; i < element.getDestination().size(); i++) - composeTestScriptTestScriptDestinationComponent(t, "TestScript", "destination", element.getDestination().get(i), i); - if (element.hasMetadata()) - composeTestScriptTestScriptMetadataComponent(t, "TestScript", "metadata", element.getMetadata(), -1); - for (int i = 0; i < element.getFixture().size(); i++) - composeTestScriptTestScriptFixtureComponent(t, "TestScript", "fixture", element.getFixture().get(i), i); - for (int i = 0; i < element.getProfile().size(); i++) - composeReference(t, "TestScript", "profile", element.getProfile().get(i), i); - for (int i = 0; i < element.getVariable().size(); i++) - composeTestScriptTestScriptVariableComponent(t, "TestScript", "variable", element.getVariable().get(i), i); - for (int i = 0; i < element.getRule().size(); i++) - composeTestScriptTestScriptRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i); - for (int i = 0; i < element.getRuleset().size(); i++) - composeTestScriptTestScriptRulesetComponent(t, "TestScript", "ruleset", element.getRuleset().get(i), i); - if (element.hasSetup()) - composeTestScriptTestScriptSetupComponent(t, "TestScript", "setup", element.getSetup(), -1); - for (int i = 0; i < element.getTest().size(); i++) - composeTestScriptTestScriptTestComponent(t, "TestScript", "test", element.getTest().get(i), i); - if (element.hasTeardown()) - composeTestScriptTestScriptTeardownComponent(t, "TestScript", "teardown", element.getTeardown(), -1); - } - - protected void composeTestScriptTestScriptOriginComponent(Complex parent, String parentType, String name, TestScript.TestScriptOriginComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "origin", name, element, index); - if (element.hasIndexElement()) - composeInteger(t, "TestScript", "index", element.getIndexElement(), -1); - if (element.hasProfile()) - composeCoding(t, "TestScript", "profile", element.getProfile(), -1); - } - - protected void composeTestScriptTestScriptDestinationComponent(Complex parent, String parentType, String name, TestScript.TestScriptDestinationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "destination", name, element, index); - if (element.hasIndexElement()) - composeInteger(t, "TestScript", "index", element.getIndexElement(), -1); - if (element.hasProfile()) - composeCoding(t, "TestScript", "profile", element.getProfile(), -1); - } - - protected void composeTestScriptTestScriptMetadataComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "metadata", name, element, index); - for (int i = 0; i < element.getLink().size(); i++) - composeTestScriptTestScriptMetadataLinkComponent(t, "TestScript", "link", element.getLink().get(i), i); - for (int i = 0; i < element.getCapability().size(); i++) - composeTestScriptTestScriptMetadataCapabilityComponent(t, "TestScript", "capability", element.getCapability().get(i), i); - } - - protected void composeTestScriptTestScriptMetadataLinkComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataLinkComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "link", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "TestScript", "url", element.getUrlElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); - } - - protected void composeTestScriptTestScriptMetadataCapabilityComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataCapabilityComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "capability", name, element, index); - if (element.hasRequiredElement()) - composeBoolean(t, "TestScript", "required", element.getRequiredElement(), -1); - if (element.hasValidatedElement()) - composeBoolean(t, "TestScript", "validated", element.getValidatedElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getOrigin().size(); i++) - composeInteger(t, "TestScript", "origin", element.getOrigin().get(i), i); - if (element.hasDestinationElement()) - composeInteger(t, "TestScript", "destination", element.getDestinationElement(), -1); - for (int i = 0; i < element.getLink().size(); i++) - composeUri(t, "TestScript", "link", element.getLink().get(i), i); - if (element.hasCapabilities()) - composeReference(t, "TestScript", "capabilities", element.getCapabilities(), -1); - } - - protected void composeTestScriptTestScriptFixtureComponent(Complex parent, String parentType, String name, TestScript.TestScriptFixtureComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "fixture", name, element, index); - if (element.hasAutocreateElement()) - composeBoolean(t, "TestScript", "autocreate", element.getAutocreateElement(), -1); - if (element.hasAutodeleteElement()) - composeBoolean(t, "TestScript", "autodelete", element.getAutodeleteElement(), -1); - if (element.hasResource()) - composeReference(t, "TestScript", "resource", element.getResource(), -1); - } - - protected void composeTestScriptTestScriptVariableComponent(Complex parent, String parentType, String name, TestScript.TestScriptVariableComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "variable", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasDefaultValueElement()) - composeString(t, "TestScript", "defaultValue", element.getDefaultValueElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "TestScript", "expression", element.getExpressionElement(), -1); - if (element.hasHeaderFieldElement()) - composeString(t, "TestScript", "headerField", element.getHeaderFieldElement(), -1); - if (element.hasHintElement()) - composeString(t, "TestScript", "hint", element.getHintElement(), -1); - if (element.hasPathElement()) - composeString(t, "TestScript", "path", element.getPathElement(), -1); - if (element.hasSourceIdElement()) - composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1); - } - - protected void composeTestScriptTestScriptRuleComponent(Complex parent, String parentType, String name, TestScript.TestScriptRuleComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rule", name, element, index); - if (element.hasResource()) - composeReference(t, "TestScript", "resource", element.getResource(), -1); - for (int i = 0; i < element.getParam().size(); i++) - composeTestScriptRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); - } - - protected void composeTestScriptRuleParamComponent(Complex parent, String parentType, String name, TestScript.RuleParamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "param", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasValueElement()) - composeString(t, "TestScript", "value", element.getValueElement(), -1); - } - - protected void composeTestScriptTestScriptRulesetComponent(Complex parent, String parentType, String name, TestScript.TestScriptRulesetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "ruleset", name, element, index); - if (element.hasResource()) - composeReference(t, "TestScript", "resource", element.getResource(), -1); - for (int i = 0; i < element.getRule().size(); i++) - composeTestScriptRulesetRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i); - } - - protected void composeTestScriptRulesetRuleComponent(Complex parent, String parentType, String name, TestScript.RulesetRuleComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rule", name, element, index); - if (element.hasRuleIdElement()) - composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1); - for (int i = 0; i < element.getParam().size(); i++) - composeTestScriptRulesetRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); - } - - protected void composeTestScriptRulesetRuleParamComponent(Complex parent, String parentType, String name, TestScript.RulesetRuleParamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "param", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasValueElement()) - composeString(t, "TestScript", "value", element.getValueElement(), -1); - } - - protected void composeTestScriptTestScriptSetupComponent(Complex parent, String parentType, String name, TestScript.TestScriptSetupComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "setup", name, element, index); - for (int i = 0; i < element.getAction().size(); i++) - composeTestScriptSetupActionComponent(t, "TestScript", "action", element.getAction().get(i), i); - } - - protected void composeTestScriptSetupActionComponent(Complex parent, String parentType, String name, TestScript.SetupActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasOperation()) - composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1); - if (element.hasAssert()) - composeTestScriptSetupActionAssertComponent(t, "TestScript", "assert", element.getAssert(), -1); - } - - protected void composeTestScriptSetupActionOperationComponent(Complex parent, String parentType, String name, TestScript.SetupActionOperationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "operation", name, element, index); - if (element.hasType()) - composeCoding(t, "TestScript", "type", element.getType(), -1); - if (element.hasResourceElement()) - composeCode(t, "TestScript", "resource", element.getResourceElement(), -1); - if (element.hasLabelElement()) - composeString(t, "TestScript", "label", element.getLabelElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); - if (element.hasAcceptElement()) - composeEnum(t, "TestScript", "accept", element.getAcceptElement(), -1); - if (element.hasContentTypeElement()) - composeEnum(t, "TestScript", "contentType", element.getContentTypeElement(), -1); - if (element.hasDestinationElement()) - composeInteger(t, "TestScript", "destination", element.getDestinationElement(), -1); - if (element.hasEncodeRequestUrlElement()) - composeBoolean(t, "TestScript", "encodeRequestUrl", element.getEncodeRequestUrlElement(), -1); - if (element.hasOriginElement()) - composeInteger(t, "TestScript", "origin", element.getOriginElement(), -1); - if (element.hasParamsElement()) - composeString(t, "TestScript", "params", element.getParamsElement(), -1); - for (int i = 0; i < element.getRequestHeader().size(); i++) - composeTestScriptSetupActionOperationRequestHeaderComponent(t, "TestScript", "requestHeader", element.getRequestHeader().get(i), i); - if (element.hasRequestIdElement()) - composeId(t, "TestScript", "requestId", element.getRequestIdElement(), -1); - if (element.hasResponseIdElement()) - composeId(t, "TestScript", "responseId", element.getResponseIdElement(), -1); - if (element.hasSourceIdElement()) - composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1); - if (element.hasTargetIdElement()) - composeId(t, "TestScript", "targetId", element.getTargetIdElement(), -1); - if (element.hasUrlElement()) - composeString(t, "TestScript", "url", element.getUrlElement(), -1); - } - - protected void composeTestScriptSetupActionOperationRequestHeaderComponent(Complex parent, String parentType, String name, TestScript.SetupActionOperationRequestHeaderComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "requestHeader", name, element, index); - if (element.hasFieldElement()) - composeString(t, "TestScript", "field", element.getFieldElement(), -1); - if (element.hasValueElement()) - composeString(t, "TestScript", "value", element.getValueElement(), -1); - } - - protected void composeTestScriptSetupActionAssertComponent(Complex parent, String parentType, String name, TestScript.SetupActionAssertComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "assert", name, element, index); - if (element.hasLabelElement()) - composeString(t, "TestScript", "label", element.getLabelElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); - if (element.hasDirectionElement()) - composeEnum(t, "TestScript", "direction", element.getDirectionElement(), -1); - if (element.hasCompareToSourceIdElement()) - composeString(t, "TestScript", "compareToSourceId", element.getCompareToSourceIdElement(), -1); - if (element.hasCompareToSourceExpressionElement()) - composeString(t, "TestScript", "compareToSourceExpression", element.getCompareToSourceExpressionElement(), -1); - if (element.hasCompareToSourcePathElement()) - composeString(t, "TestScript", "compareToSourcePath", element.getCompareToSourcePathElement(), -1); - if (element.hasContentTypeElement()) - composeEnum(t, "TestScript", "contentType", element.getContentTypeElement(), -1); - if (element.hasExpressionElement()) - composeString(t, "TestScript", "expression", element.getExpressionElement(), -1); - if (element.hasHeaderFieldElement()) - composeString(t, "TestScript", "headerField", element.getHeaderFieldElement(), -1); - if (element.hasMinimumIdElement()) - composeString(t, "TestScript", "minimumId", element.getMinimumIdElement(), -1); - if (element.hasNavigationLinksElement()) - composeBoolean(t, "TestScript", "navigationLinks", element.getNavigationLinksElement(), -1); - if (element.hasOperatorElement()) - composeEnum(t, "TestScript", "operator", element.getOperatorElement(), -1); - if (element.hasPathElement()) - composeString(t, "TestScript", "path", element.getPathElement(), -1); - if (element.hasRequestMethodElement()) - composeEnum(t, "TestScript", "requestMethod", element.getRequestMethodElement(), -1); - if (element.hasRequestURLElement()) - composeString(t, "TestScript", "requestURL", element.getRequestURLElement(), -1); - if (element.hasResourceElement()) - composeCode(t, "TestScript", "resource", element.getResourceElement(), -1); - if (element.hasResponseElement()) - composeEnum(t, "TestScript", "response", element.getResponseElement(), -1); - if (element.hasResponseCodeElement()) - composeString(t, "TestScript", "responseCode", element.getResponseCodeElement(), -1); - if (element.hasRule()) - composeTestScriptActionAssertRuleComponent(t, "TestScript", "rule", element.getRule(), -1); - if (element.hasRuleset()) - composeTestScriptActionAssertRulesetComponent(t, "TestScript", "ruleset", element.getRuleset(), -1); - if (element.hasSourceIdElement()) - composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1); - if (element.hasValidateProfileIdElement()) - composeId(t, "TestScript", "validateProfileId", element.getValidateProfileIdElement(), -1); - if (element.hasValueElement()) - composeString(t, "TestScript", "value", element.getValueElement(), -1); - if (element.hasWarningOnlyElement()) - composeBoolean(t, "TestScript", "warningOnly", element.getWarningOnlyElement(), -1); - } - - protected void composeTestScriptActionAssertRuleComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRuleComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rule", name, element, index); - if (element.hasRuleIdElement()) - composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1); - for (int i = 0; i < element.getParam().size(); i++) - composeTestScriptActionAssertRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); - } - - protected void composeTestScriptActionAssertRuleParamComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRuleParamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "param", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasValueElement()) - composeString(t, "TestScript", "value", element.getValueElement(), -1); - } - - protected void composeTestScriptActionAssertRulesetComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "ruleset", name, element, index); - if (element.hasRulesetIdElement()) - composeId(t, "TestScript", "rulesetId", element.getRulesetIdElement(), -1); - for (int i = 0; i < element.getRule().size(); i++) - composeTestScriptActionAssertRulesetRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i); - } - - protected void composeTestScriptActionAssertRulesetRuleComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetRuleComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "rule", name, element, index); - if (element.hasRuleIdElement()) - composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1); - for (int i = 0; i < element.getParam().size(); i++) - composeTestScriptActionAssertRulesetRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); - } - - protected void composeTestScriptActionAssertRulesetRuleParamComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetRuleParamComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "param", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasValueElement()) - composeString(t, "TestScript", "value", element.getValueElement(), -1); - } - - protected void composeTestScriptTestScriptTestComponent(Complex parent, String parentType, String name, TestScript.TestScriptTestComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "test", name, element, index); - if (element.hasNameElement()) - composeString(t, "TestScript", "name", element.getNameElement(), -1); - if (element.hasDescriptionElement()) - composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getAction().size(); i++) - composeTestScriptTestActionComponent(t, "TestScript", "action", element.getAction().get(i), i); - } - - protected void composeTestScriptTestActionComponent(Complex parent, String parentType, String name, TestScript.TestActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasOperation()) - composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1); - if (element.hasAssert()) - composeTestScriptSetupActionAssertComponent(t, "TestScript", "assert", element.getAssert(), -1); - } - - protected void composeTestScriptTestScriptTeardownComponent(Complex parent, String parentType, String name, TestScript.TestScriptTeardownComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "teardown", name, element, index); - for (int i = 0; i < element.getAction().size(); i++) - composeTestScriptTeardownActionComponent(t, "TestScript", "action", element.getAction().get(i), i); - } - - protected void composeTestScriptTeardownActionComponent(Complex parent, String parentType, String name, TestScript.TeardownActionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "action", name, element, index); - if (element.hasOperation()) - composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1); - } - - protected void composeValueSet(Complex parent, String parentType, String name, ValueSet element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "ValueSet", name, element, index); - if (element.hasUrlElement()) - composeUri(t, "ValueSet", "url", element.getUrlElement(), -1); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "ValueSet", "identifier", element.getIdentifier().get(i), i); - if (element.hasVersionElement()) - composeString(t, "ValueSet", "version", element.getVersionElement(), -1); - if (element.hasNameElement()) - composeString(t, "ValueSet", "name", element.getNameElement(), -1); - if (element.hasTitleElement()) - composeString(t, "ValueSet", "title", element.getTitleElement(), -1); - if (element.hasStatusElement()) - composeEnum(t, "ValueSet", "status", element.getStatusElement(), -1); - if (element.hasExperimentalElement()) - composeBoolean(t, "ValueSet", "experimental", element.getExperimentalElement(), -1); - if (element.hasDateElement()) - composeDateTime(t, "ValueSet", "date", element.getDateElement(), -1); - if (element.hasPublisherElement()) - composeString(t, "ValueSet", "publisher", element.getPublisherElement(), -1); - for (int i = 0; i < element.getContact().size(); i++) - composeContactDetail(t, "ValueSet", "contact", element.getContact().get(i), i); - if (element.hasDescriptionElement()) - composeMarkdown(t, "ValueSet", "description", element.getDescriptionElement(), -1); - for (int i = 0; i < element.getUseContext().size(); i++) - composeUsageContext(t, "ValueSet", "useContext", element.getUseContext().get(i), i); - for (int i = 0; i < element.getJurisdiction().size(); i++) - composeCodeableConcept(t, "ValueSet", "jurisdiction", element.getJurisdiction().get(i), i); - if (element.hasImmutableElement()) - composeBoolean(t, "ValueSet", "immutable", element.getImmutableElement(), -1); - if (element.hasPurposeElement()) - composeMarkdown(t, "ValueSet", "purpose", element.getPurposeElement(), -1); - if (element.hasCopyrightElement()) - composeMarkdown(t, "ValueSet", "copyright", element.getCopyrightElement(), -1); - if (element.hasExtensibleElement()) - composeBoolean(t, "ValueSet", "extensible", element.getExtensibleElement(), -1); - if (element.hasCompose()) - composeValueSetValueSetComposeComponent(t, "ValueSet", "compose", element.getCompose(), -1); - if (element.hasExpansion()) - composeValueSetValueSetExpansionComponent(t, "ValueSet", "expansion", element.getExpansion(), -1); - } - - protected void composeValueSetValueSetComposeComponent(Complex parent, String parentType, String name, ValueSet.ValueSetComposeComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "compose", name, element, index); - if (element.hasLockedDateElement()) - composeDate(t, "ValueSet", "lockedDate", element.getLockedDateElement(), -1); - if (element.hasInactiveElement()) - composeBoolean(t, "ValueSet", "inactive", element.getInactiveElement(), -1); - for (int i = 0; i < element.getInclude().size(); i++) - composeValueSetConceptSetComponent(t, "ValueSet", "include", element.getInclude().get(i), i); - for (int i = 0; i < element.getExclude().size(); i++) - composeValueSetConceptSetComponent(t, "ValueSet", "exclude", element.getExclude().get(i), i); - } - - protected void composeValueSetConceptSetComponent(Complex parent, String parentType, String name, ValueSet.ConceptSetComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "include", name, element, index); - if (element.hasSystemElement()) - composeUri(t, "ValueSet", "system", element.getSystemElement(), -1); - if (element.hasVersionElement()) - composeString(t, "ValueSet", "version", element.getVersionElement(), -1); - for (int i = 0; i < element.getConcept().size(); i++) - composeValueSetConceptReferenceComponent(t, "ValueSet", "concept", element.getConcept().get(i), i); - for (int i = 0; i < element.getFilter().size(); i++) - composeValueSetConceptSetFilterComponent(t, "ValueSet", "filter", element.getFilter().get(i), i); - for (int i = 0; i < element.getValueSet().size(); i++) - composeUri(t, "ValueSet", "valueSet", element.getValueSet().get(i), i); - } - - protected void composeValueSetConceptReferenceComponent(Complex parent, String parentType, String name, ValueSet.ConceptReferenceComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "concept", name, element, index); - if (element.hasCodeElement()) - composeCode(t, "ValueSet", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "ValueSet", "display", element.getDisplayElement(), -1); - for (int i = 0; i < element.getDesignation().size(); i++) - composeValueSetConceptReferenceDesignationComponent(t, "ValueSet", "designation", element.getDesignation().get(i), i); - } - - protected void composeValueSetConceptReferenceDesignationComponent(Complex parent, String parentType, String name, ValueSet.ConceptReferenceDesignationComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "designation", name, element, index); - if (element.hasLanguageElement()) - composeCode(t, "ValueSet", "language", element.getLanguageElement(), -1); - if (element.hasUse()) - composeCoding(t, "ValueSet", "use", element.getUse(), -1); - if (element.hasValueElement()) - composeString(t, "ValueSet", "value", element.getValueElement(), -1); - } - - protected void composeValueSetConceptSetFilterComponent(Complex parent, String parentType, String name, ValueSet.ConceptSetFilterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "filter", name, element, index); - if (element.hasPropertyElement()) - composeCode(t, "ValueSet", "property", element.getPropertyElement(), -1); - if (element.hasOpElement()) - composeEnum(t, "ValueSet", "op", element.getOpElement(), -1); - if (element.hasValueElement()) - composeCode(t, "ValueSet", "value", element.getValueElement(), -1); - } - - protected void composeValueSetValueSetExpansionComponent(Complex parent, String parentType, String name, ValueSet.ValueSetExpansionComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "expansion", name, element, index); - if (element.hasIdentifierElement()) - composeUri(t, "ValueSet", "identifier", element.getIdentifierElement(), -1); - if (element.hasTimestampElement()) - composeDateTime(t, "ValueSet", "timestamp", element.getTimestampElement(), -1); - if (element.hasTotalElement()) - composeInteger(t, "ValueSet", "total", element.getTotalElement(), -1); - if (element.hasOffsetElement()) - composeInteger(t, "ValueSet", "offset", element.getOffsetElement(), -1); - for (int i = 0; i < element.getParameter().size(); i++) - composeValueSetValueSetExpansionParameterComponent(t, "ValueSet", "parameter", element.getParameter().get(i), i); - for (int i = 0; i < element.getContains().size(); i++) - composeValueSetValueSetExpansionContainsComponent(t, "ValueSet", "contains", element.getContains().get(i), i); - } - - protected void composeValueSetValueSetExpansionParameterComponent(Complex parent, String parentType, String name, ValueSet.ValueSetExpansionParameterComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "parameter", name, element, index); - if (element.hasNameElement()) - composeString(t, "ValueSet", "name", element.getNameElement(), -1); - if (element.hasValue()) - composeType(t, "ValueSet", "value", element.getValue(), -1); - } - - protected void composeValueSetValueSetExpansionContainsComponent(Complex parent, String parentType, String name, ValueSet.ValueSetExpansionContainsComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "contains", name, element, index); - if (element.hasSystemElement()) - composeUri(t, "ValueSet", "system", element.getSystemElement(), -1); - if (element.hasAbstractElement()) - composeBoolean(t, "ValueSet", "abstract", element.getAbstractElement(), -1); - if (element.hasInactiveElement()) - composeBoolean(t, "ValueSet", "inactive", element.getInactiveElement(), -1); - if (element.hasVersionElement()) - composeString(t, "ValueSet", "version", element.getVersionElement(), -1); - if (element.hasCodeElement()) - composeCode(t, "ValueSet", "code", element.getCodeElement(), -1); - if (element.hasDisplayElement()) - composeString(t, "ValueSet", "display", element.getDisplayElement(), -1); - for (int i = 0; i < element.getDesignation().size(); i++) - composeValueSetConceptReferenceDesignationComponent(t, "ValueSet", "designation", element.getDesignation().get(i), i); - for (int i = 0; i < element.getContains().size(); i++) - composeValueSetValueSetExpansionContainsComponent(t, "ValueSet", "contains", element.getContains().get(i), i); - } - - protected void composeVisionPrescription(Complex parent, String parentType, String name, VisionPrescription element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeDomainResource(t, "VisionPrescription", name, element, index); - for (int i = 0; i < element.getIdentifier().size(); i++) - composeIdentifier(t, "VisionPrescription", "identifier", element.getIdentifier().get(i), i); - if (element.hasStatusElement()) - composeEnum(t, "VisionPrescription", "status", element.getStatusElement(), -1); - if (element.hasPatient()) - composeReference(t, "VisionPrescription", "patient", element.getPatient(), -1); - if (element.hasEncounter()) - composeReference(t, "VisionPrescription", "encounter", element.getEncounter(), -1); - if (element.hasDateWrittenElement()) - composeDateTime(t, "VisionPrescription", "dateWritten", element.getDateWrittenElement(), -1); - if (element.hasPrescriber()) - composeReference(t, "VisionPrescription", "prescriber", element.getPrescriber(), -1); - if (element.hasReason()) - composeType(t, "VisionPrescription", "reason", element.getReason(), -1); - for (int i = 0; i < element.getDispense().size(); i++) - composeVisionPrescriptionVisionPrescriptionDispenseComponent(t, "VisionPrescription", "dispense", element.getDispense().get(i), i); - } - - protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(Complex parent, String parentType, String name, VisionPrescription.VisionPrescriptionDispenseComponent element, int index) { - if (element == null) - return; - Complex t; - if (Utilities.noString(parentType)) - t = parent; - else { - t = parent.predicate("fhir:"+parentType+'.'+name); - } - composeBackboneElement(t, "dispense", name, element, index); - if (element.hasProduct()) - composeCodeableConcept(t, "VisionPrescription", "product", element.getProduct(), -1); - if (element.hasEyeElement()) - composeEnum(t, "VisionPrescription", "eye", element.getEyeElement(), -1); - if (element.hasSphereElement()) - composeDecimal(t, "VisionPrescription", "sphere", element.getSphereElement(), -1); - if (element.hasCylinderElement()) - composeDecimal(t, "VisionPrescription", "cylinder", element.getCylinderElement(), -1); - if (element.hasAxisElement()) - composeInteger(t, "VisionPrescription", "axis", element.getAxisElement(), -1); - if (element.hasPrismElement()) - composeDecimal(t, "VisionPrescription", "prism", element.getPrismElement(), -1); - if (element.hasBaseElement()) - composeEnum(t, "VisionPrescription", "base", element.getBaseElement(), -1); - if (element.hasAddElement()) - composeDecimal(t, "VisionPrescription", "add", element.getAddElement(), -1); - if (element.hasPowerElement()) - composeDecimal(t, "VisionPrescription", "power", element.getPowerElement(), -1); - if (element.hasBackCurveElement()) - composeDecimal(t, "VisionPrescription", "backCurve", element.getBackCurveElement(), -1); - if (element.hasDiameterElement()) - composeDecimal(t, "VisionPrescription", "diameter", element.getDiameterElement(), -1); - if (element.hasDuration()) - composeQuantity(t, "VisionPrescription", "duration", element.getDuration(), -1); - if (element.hasColorElement()) - composeString(t, "VisionPrescription", "color", element.getColorElement(), -1); - if (element.hasBrandElement()) - composeString(t, "VisionPrescription", "brand", element.getBrandElement(), -1); - for (int i = 0; i < element.getNote().size(); i++) - composeAnnotation(t, "VisionPrescription", "note", element.getNote().get(i), i); - } - - @Override - protected void composeResource(Complex parent, Resource resource) { - if (resource instanceof Parameters) - composeParameters(parent, null, "Parameters", (Parameters)resource, -1); - else if (resource instanceof Account) - composeAccount(parent, null, "Account", (Account)resource, -1); - else if (resource instanceof ActivityDefinition) - composeActivityDefinition(parent, null, "ActivityDefinition", (ActivityDefinition)resource, -1); - else if (resource instanceof AdverseEvent) - composeAdverseEvent(parent, null, "AdverseEvent", (AdverseEvent)resource, -1); - else if (resource instanceof AllergyIntolerance) - composeAllergyIntolerance(parent, null, "AllergyIntolerance", (AllergyIntolerance)resource, -1); - else if (resource instanceof Appointment) - composeAppointment(parent, null, "Appointment", (Appointment)resource, -1); - else if (resource instanceof AppointmentResponse) - composeAppointmentResponse(parent, null, "AppointmentResponse", (AppointmentResponse)resource, -1); - else if (resource instanceof AuditEvent) - composeAuditEvent(parent, null, "AuditEvent", (AuditEvent)resource, -1); - else if (resource instanceof Basic) - composeBasic(parent, null, "Basic", (Basic)resource, -1); - else if (resource instanceof Binary) - composeBinary(parent, null, "Binary", (Binary)resource, -1); - else if (resource instanceof BodyStructure) - composeBodyStructure(parent, null, "BodyStructure", (BodyStructure)resource, -1); - else if (resource instanceof Bundle) - composeBundle(parent, null, "Bundle", (Bundle)resource, -1); - else if (resource instanceof CapabilityStatement) - composeCapabilityStatement(parent, null, "CapabilityStatement", (CapabilityStatement)resource, -1); - else if (resource instanceof CarePlan) - composeCarePlan(parent, null, "CarePlan", (CarePlan)resource, -1); - else if (resource instanceof CareTeam) - composeCareTeam(parent, null, "CareTeam", (CareTeam)resource, -1); - else if (resource instanceof ChargeItem) - composeChargeItem(parent, null, "ChargeItem", (ChargeItem)resource, -1); - else if (resource instanceof Claim) - composeClaim(parent, null, "Claim", (Claim)resource, -1); - else if (resource instanceof ClaimResponse) - composeClaimResponse(parent, null, "ClaimResponse", (ClaimResponse)resource, -1); - else if (resource instanceof ClinicalImpression) - composeClinicalImpression(parent, null, "ClinicalImpression", (ClinicalImpression)resource, -1); - else if (resource instanceof CodeSystem) - composeCodeSystem(parent, null, "CodeSystem", (CodeSystem)resource, -1); - else if (resource instanceof Communication) - composeCommunication(parent, null, "Communication", (Communication)resource, -1); - else if (resource instanceof CommunicationRequest) - composeCommunicationRequest(parent, null, "CommunicationRequest", (CommunicationRequest)resource, -1); - else if (resource instanceof CompartmentDefinition) - composeCompartmentDefinition(parent, null, "CompartmentDefinition", (CompartmentDefinition)resource, -1); - else if (resource instanceof Composition) - composeComposition(parent, null, "Composition", (Composition)resource, -1); - else if (resource instanceof ConceptMap) - composeConceptMap(parent, null, "ConceptMap", (ConceptMap)resource, -1); - else if (resource instanceof Condition) - composeCondition(parent, null, "Condition", (Condition)resource, -1); - else if (resource instanceof Consent) - composeConsent(parent, null, "Consent", (Consent)resource, -1); - else if (resource instanceof Contract) - composeContract(parent, null, "Contract", (Contract)resource, -1); - else if (resource instanceof Coverage) - composeCoverage(parent, null, "Coverage", (Coverage)resource, -1); - else if (resource instanceof DetectedIssue) - composeDetectedIssue(parent, null, "DetectedIssue", (DetectedIssue)resource, -1); - else if (resource instanceof Device) - composeDevice(parent, null, "Device", (Device)resource, -1); - else if (resource instanceof DeviceComponent) - composeDeviceComponent(parent, null, "DeviceComponent", (DeviceComponent)resource, -1); - else if (resource instanceof DeviceMetric) - composeDeviceMetric(parent, null, "DeviceMetric", (DeviceMetric)resource, -1); - else if (resource instanceof DeviceRequest) - composeDeviceRequest(parent, null, "DeviceRequest", (DeviceRequest)resource, -1); - else if (resource instanceof DeviceUseStatement) - composeDeviceUseStatement(parent, null, "DeviceUseStatement", (DeviceUseStatement)resource, -1); - else if (resource instanceof DiagnosticReport) - composeDiagnosticReport(parent, null, "DiagnosticReport", (DiagnosticReport)resource, -1); - else if (resource instanceof DocumentManifest) - composeDocumentManifest(parent, null, "DocumentManifest", (DocumentManifest)resource, -1); - else if (resource instanceof DocumentReference) - composeDocumentReference(parent, null, "DocumentReference", (DocumentReference)resource, -1); - else if (resource instanceof EligibilityRequest) - composeEligibilityRequest(parent, null, "EligibilityRequest", (EligibilityRequest)resource, -1); - else if (resource instanceof EligibilityResponse) - composeEligibilityResponse(parent, null, "EligibilityResponse", (EligibilityResponse)resource, -1); - else if (resource instanceof Encounter) - composeEncounter(parent, null, "Encounter", (Encounter)resource, -1); - else if (resource instanceof Endpoint) - composeEndpoint(parent, null, "Endpoint", (Endpoint)resource, -1); - else if (resource instanceof EnrollmentRequest) - composeEnrollmentRequest(parent, null, "EnrollmentRequest", (EnrollmentRequest)resource, -1); - else if (resource instanceof EnrollmentResponse) - composeEnrollmentResponse(parent, null, "EnrollmentResponse", (EnrollmentResponse)resource, -1); - else if (resource instanceof EpisodeOfCare) - composeEpisodeOfCare(parent, null, "EpisodeOfCare", (EpisodeOfCare)resource, -1); - else if (resource instanceof EventDefinition) - composeEventDefinition(parent, null, "EventDefinition", (EventDefinition)resource, -1); - else if (resource instanceof ExpansionProfile) - composeExpansionProfile(parent, null, "ExpansionProfile", (ExpansionProfile)resource, -1); - else if (resource instanceof ExplanationOfBenefit) - composeExplanationOfBenefit(parent, null, "ExplanationOfBenefit", (ExplanationOfBenefit)resource, -1); - else if (resource instanceof FamilyMemberHistory) - composeFamilyMemberHistory(parent, null, "FamilyMemberHistory", (FamilyMemberHistory)resource, -1); - else if (resource instanceof Flag) - composeFlag(parent, null, "Flag", (Flag)resource, -1); - else if (resource instanceof Goal) - composeGoal(parent, null, "Goal", (Goal)resource, -1); - else if (resource instanceof GraphDefinition) - composeGraphDefinition(parent, null, "GraphDefinition", (GraphDefinition)resource, -1); - else if (resource instanceof Group) - composeGroup(parent, null, "Group", (Group)resource, -1); - else if (resource instanceof GuidanceResponse) - composeGuidanceResponse(parent, null, "GuidanceResponse", (GuidanceResponse)resource, -1); - else if (resource instanceof HealthcareService) - composeHealthcareService(parent, null, "HealthcareService", (HealthcareService)resource, -1); - else if (resource instanceof ImagingManifest) - composeImagingManifest(parent, null, "ImagingManifest", (ImagingManifest)resource, -1); - else if (resource instanceof ImagingStudy) - composeImagingStudy(parent, null, "ImagingStudy", (ImagingStudy)resource, -1); - else if (resource instanceof Immunization) - composeImmunization(parent, null, "Immunization", (Immunization)resource, -1); - else if (resource instanceof ImmunizationRecommendation) - composeImmunizationRecommendation(parent, null, "ImmunizationRecommendation", (ImmunizationRecommendation)resource, -1); - else if (resource instanceof ImplementationGuide) - composeImplementationGuide(parent, null, "ImplementationGuide", (ImplementationGuide)resource, -1); - else if (resource instanceof Library) - composeLibrary(parent, null, "Library", (Library)resource, -1); - else if (resource instanceof Linkage) - composeLinkage(parent, null, "Linkage", (Linkage)resource, -1); - else if (resource instanceof ListResource) - composeListResource(parent, null, "ListResource", (ListResource)resource, -1); - else if (resource instanceof Location) - composeLocation(parent, null, "Location", (Location)resource, -1); - else if (resource instanceof Measure) - composeMeasure(parent, null, "Measure", (Measure)resource, -1); - else if (resource instanceof MeasureReport) - composeMeasureReport(parent, null, "MeasureReport", (MeasureReport)resource, -1); - else if (resource instanceof Media) - composeMedia(parent, null, "Media", (Media)resource, -1); - else if (resource instanceof Medication) - composeMedication(parent, null, "Medication", (Medication)resource, -1); - else if (resource instanceof MedicationAdministration) - composeMedicationAdministration(parent, null, "MedicationAdministration", (MedicationAdministration)resource, -1); - else if (resource instanceof MedicationDispense) - composeMedicationDispense(parent, null, "MedicationDispense", (MedicationDispense)resource, -1); - else if (resource instanceof MedicationRequest) - composeMedicationRequest(parent, null, "MedicationRequest", (MedicationRequest)resource, -1); - else if (resource instanceof MedicationStatement) - composeMedicationStatement(parent, null, "MedicationStatement", (MedicationStatement)resource, -1); - else if (resource instanceof MessageDefinition) - composeMessageDefinition(parent, null, "MessageDefinition", (MessageDefinition)resource, -1); - else if (resource instanceof MessageHeader) - composeMessageHeader(parent, null, "MessageHeader", (MessageHeader)resource, -1); - else if (resource instanceof NamingSystem) - composeNamingSystem(parent, null, "NamingSystem", (NamingSystem)resource, -1); - else if (resource instanceof NutritionOrder) - composeNutritionOrder(parent, null, "NutritionOrder", (NutritionOrder)resource, -1); - else if (resource instanceof Observation) - composeObservation(parent, null, "Observation", (Observation)resource, -1); - else if (resource instanceof OperationDefinition) - composeOperationDefinition(parent, null, "OperationDefinition", (OperationDefinition)resource, -1); - else if (resource instanceof OperationOutcome) - composeOperationOutcome(parent, null, "OperationOutcome", (OperationOutcome)resource, -1); - else if (resource instanceof Organization) - composeOrganization(parent, null, "Organization", (Organization)resource, -1); - else if (resource instanceof Patient) - composePatient(parent, null, "Patient", (Patient)resource, -1); - else if (resource instanceof PaymentNotice) - composePaymentNotice(parent, null, "PaymentNotice", (PaymentNotice)resource, -1); - else if (resource instanceof PaymentReconciliation) - composePaymentReconciliation(parent, null, "PaymentReconciliation", (PaymentReconciliation)resource, -1); - else if (resource instanceof Person) - composePerson(parent, null, "Person", (Person)resource, -1); - else if (resource instanceof PlanDefinition) - composePlanDefinition(parent, null, "PlanDefinition", (PlanDefinition)resource, -1); - else if (resource instanceof Practitioner) - composePractitioner(parent, null, "Practitioner", (Practitioner)resource, -1); - else if (resource instanceof PractitionerRole) - composePractitionerRole(parent, null, "PractitionerRole", (PractitionerRole)resource, -1); - else if (resource instanceof Procedure) - composeProcedure(parent, null, "Procedure", (Procedure)resource, -1); - else if (resource instanceof ProcedureRequest) - composeProcedureRequest(parent, null, "ProcedureRequest", (ProcedureRequest)resource, -1); - else if (resource instanceof ProcessRequest) - composeProcessRequest(parent, null, "ProcessRequest", (ProcessRequest)resource, -1); - else if (resource instanceof ProcessResponse) - composeProcessResponse(parent, null, "ProcessResponse", (ProcessResponse)resource, -1); - else if (resource instanceof Provenance) - composeProvenance(parent, null, "Provenance", (Provenance)resource, -1); - else if (resource instanceof Questionnaire) - composeQuestionnaire(parent, null, "Questionnaire", (Questionnaire)resource, -1); - else if (resource instanceof QuestionnaireResponse) - composeQuestionnaireResponse(parent, null, "QuestionnaireResponse", (QuestionnaireResponse)resource, -1); - else if (resource instanceof RelatedPerson) - composeRelatedPerson(parent, null, "RelatedPerson", (RelatedPerson)resource, -1); - else if (resource instanceof RequestGroup) - composeRequestGroup(parent, null, "RequestGroup", (RequestGroup)resource, -1); - else if (resource instanceof ResearchStudy) - composeResearchStudy(parent, null, "ResearchStudy", (ResearchStudy)resource, -1); - else if (resource instanceof ResearchSubject) - composeResearchSubject(parent, null, "ResearchSubject", (ResearchSubject)resource, -1); - else if (resource instanceof RiskAssessment) - composeRiskAssessment(parent, null, "RiskAssessment", (RiskAssessment)resource, -1); - else if (resource instanceof Schedule) - composeSchedule(parent, null, "Schedule", (Schedule)resource, -1); - else if (resource instanceof SearchParameter) - composeSearchParameter(parent, null, "SearchParameter", (SearchParameter)resource, -1); - else if (resource instanceof Sequence) - composeSequence(parent, null, "Sequence", (Sequence)resource, -1); - else if (resource instanceof ServiceDefinition) - composeServiceDefinition(parent, null, "ServiceDefinition", (ServiceDefinition)resource, -1); - else if (resource instanceof Slot) - composeSlot(parent, null, "Slot", (Slot)resource, -1); - else if (resource instanceof Specimen) - composeSpecimen(parent, null, "Specimen", (Specimen)resource, -1); - else if (resource instanceof StructureDefinition) - composeStructureDefinition(parent, null, "StructureDefinition", (StructureDefinition)resource, -1); - else if (resource instanceof StructureMap) - composeStructureMap(parent, null, "StructureMap", (StructureMap)resource, -1); - else if (resource instanceof Subscription) - composeSubscription(parent, null, "Subscription", (Subscription)resource, -1); - else if (resource instanceof Substance) - composeSubstance(parent, null, "Substance", (Substance)resource, -1); - else if (resource instanceof SupplyDelivery) - composeSupplyDelivery(parent, null, "SupplyDelivery", (SupplyDelivery)resource, -1); - else if (resource instanceof SupplyRequest) - composeSupplyRequest(parent, null, "SupplyRequest", (SupplyRequest)resource, -1); - else if (resource instanceof Task) - composeTask(parent, null, "Task", (Task)resource, -1); - else if (resource instanceof TestReport) - composeTestReport(parent, null, "TestReport", (TestReport)resource, -1); - else if (resource instanceof TestScript) - composeTestScript(parent, null, "TestScript", (TestScript)resource, -1); - else if (resource instanceof ValueSet) - composeValueSet(parent, null, "ValueSet", (ValueSet)resource, -1); - else if (resource instanceof VisionPrescription) - composeVisionPrescription(parent, null, "VisionPrescription", (VisionPrescription)resource, -1); - else - throw new Error("Unhandled resource type "+resource.getClass().getName()); - } - - protected void composeType(Complex parent, String parentType, String name, Type value, int index) { - if (value == null) - return; - else if (value instanceof DateType) - composeDate(parent, parentType, name, (DateType)value, index); - else if (value instanceof DateTimeType) - composeDateTime(parent, parentType, name, (DateTimeType)value, index); - else if (value instanceof CodeType) - composeCode(parent, parentType, name, (CodeType)value, index); - else if (value instanceof StringType) - composeString(parent, parentType, name, (StringType)value, index); - else if (value instanceof IntegerType) - composeInteger(parent, parentType, name, (IntegerType)value, index); - else if (value instanceof OidType) - composeOid(parent, parentType, name, (OidType)value, index); - else if (value instanceof UriType) - composeUri(parent, parentType, name, (UriType)value, index); - else if (value instanceof UuidType) - composeUuid(parent, parentType, name, (UuidType)value, index); - else if (value instanceof InstantType) - composeInstant(parent, parentType, name, (InstantType)value, index); - else if (value instanceof BooleanType) - composeBoolean(parent, parentType, name, (BooleanType)value, index); - else if (value instanceof Base64BinaryType) - composeBase64Binary(parent, parentType, name, (Base64BinaryType)value, index); - else if (value instanceof UnsignedIntType) - composeUnsignedInt(parent, parentType, name, (UnsignedIntType)value, index); - else if (value instanceof MarkdownType) - composeMarkdown(parent, parentType, name, (MarkdownType)value, index); - else if (value instanceof TimeType) - composeTime(parent, parentType, name, (TimeType)value, index); - else if (value instanceof IdType) - composeId(parent, parentType, name, (IdType)value, index); - else if (value instanceof PositiveIntType) - composePositiveInt(parent, parentType, name, (PositiveIntType)value, index); - else if (value instanceof DecimalType) - composeDecimal(parent, parentType, name, (DecimalType)value, index); - else if (value instanceof Extension) - composeExtension(parent, parentType, name, (Extension)value, index); - else if (value instanceof Narrative) - composeNarrative(parent, parentType, name, (Narrative)value, index); - else if (value instanceof Reference) - composeReference(parent, parentType, name, (Reference)value, index); - else if (value instanceof Quantity) - composeQuantity(parent, parentType, name, (Quantity)value, index); - else if (value instanceof Period) - composePeriod(parent, parentType, name, (Period)value, index); - else if (value instanceof Attachment) - composeAttachment(parent, parentType, name, (Attachment)value, index); - else if (value instanceof Duration) - composeDuration(parent, parentType, name, (Duration)value, index); - else if (value instanceof Count) - composeCount(parent, parentType, name, (Count)value, index); - else if (value instanceof Range) - composeRange(parent, parentType, name, (Range)value, index); - else if (value instanceof Annotation) - composeAnnotation(parent, parentType, name, (Annotation)value, index); - else if (value instanceof Money) - composeMoney(parent, parentType, name, (Money)value, index); - else if (value instanceof Identifier) - composeIdentifier(parent, parentType, name, (Identifier)value, index); - else if (value instanceof Coding) - composeCoding(parent, parentType, name, (Coding)value, index); - else if (value instanceof Signature) - composeSignature(parent, parentType, name, (Signature)value, index); - else if (value instanceof SampledData) - composeSampledData(parent, parentType, name, (SampledData)value, index); - else if (value instanceof Ratio) - composeRatio(parent, parentType, name, (Ratio)value, index); - else if (value instanceof Distance) - composeDistance(parent, parentType, name, (Distance)value, index); - else if (value instanceof Age) - composeAge(parent, parentType, name, (Age)value, index); - else if (value instanceof CodeableConcept) - composeCodeableConcept(parent, parentType, name, (CodeableConcept)value, index); - else if (value instanceof Meta) - composeMeta(parent, parentType, name, (Meta)value, index); - else if (value instanceof Address) - composeAddress(parent, parentType, name, (Address)value, index); - else if (value instanceof TriggerDefinition) - composeTriggerDefinition(parent, parentType, name, (TriggerDefinition)value, index); - else if (value instanceof Contributor) - composeContributor(parent, parentType, name, (Contributor)value, index); - else if (value instanceof DataRequirement) - composeDataRequirement(parent, parentType, name, (DataRequirement)value, index); - else if (value instanceof Dosage) - composeDosage(parent, parentType, name, (Dosage)value, index); - else if (value instanceof RelatedArtifact) - composeRelatedArtifact(parent, parentType, name, (RelatedArtifact)value, index); - else if (value instanceof ContactDetail) - composeContactDetail(parent, parentType, name, (ContactDetail)value, index); - else if (value instanceof HumanName) - composeHumanName(parent, parentType, name, (HumanName)value, index); - else if (value instanceof ContactPoint) - composeContactPoint(parent, parentType, name, (ContactPoint)value, index); - else if (value instanceof UsageContext) - composeUsageContext(parent, parentType, name, (UsageContext)value, index); - else if (value instanceof Timing) - composeTiming(parent, parentType, name, (Timing)value, index); - else if (value instanceof ElementDefinition) - composeElementDefinition(parent, parentType, name, (ElementDefinition)value, index); - else if (value instanceof ParameterDefinition) - composeParameterDefinition(parent, parentType, name, (ParameterDefinition)value, index); - else - throw new Error("Unhandled type"); - } - -} - +package org.hl7.fhir.r4.formats; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import org.hl7.fhir.r4.model.DateType; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.IntegerType; +import org.hl7.fhir.r4.model.OidType; +import org.hl7.fhir.r4.model.UriType; +import org.hl7.fhir.r4.model.UuidType; +import org.hl7.fhir.r4.model.InstantType; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.Base64BinaryType; +import org.hl7.fhir.r4.model.UnsignedIntType; +import org.hl7.fhir.r4.model.MarkdownType; +import org.hl7.fhir.r4.model.TimeType; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.PositiveIntType; +import org.hl7.fhir.r4.model.DecimalType; +import org.hl7.fhir.r4.model.*; +import org.xmlpull.v1.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.exceptions.FHIRFormatError; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.utils.formats.Turtle.Complex; +import java.io.IOException; + +public class RdfParser extends RdfParserBase { + + public RdfParser() { + super(); + } + + public RdfParser(boolean allowUnknownContent) { + super(); + setAllowUnknownContent(allowUnknownContent); + } + + + protected void composeElement(Complex t, String parentType, String name, Element element, int index) { + if (element == null) + return; + if (index > -1) + t.predicate("fhir:index", Integer.toString(index)); + if (element.hasIdElement()) + composeString(t, "Element", "id", element.getIdElement(), -1); + for (int i = 0; i < element.getExtension().size(); i++) + composeExtension(t, "Element", "extension", element.getExtension().get(i), i); + } + + protected void composeBackboneElement(Complex t, String tType, String name, BackboneElement element, int index) { + composeElement(t, tType, name, element, index); + for (int i = 0; i < element.getModifierExtension().size(); i++) + composeExtension(t, "Element", "modifierExtension", element.getModifierExtension().get(i), i); + } + + private void composeEnum(Complex parent, String parentType, String name, Enumeration value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + decorateCode(t, value); + } + + + protected void composeDate(Complex parent, String parentType, String name, DateType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeDateTime(Complex parent, String parentType, String name, DateTimeType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeCode(Complex parent, String parentType, String name, CodeType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + decorateCode(t, value); + } + + protected void composeString(Complex parent, String parentType, String name, StringType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeInteger(Complex parent, String parentType, String name, IntegerType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeOid(Complex parent, String parentType, String name, OidType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeUri(Complex parent, String parentType, String name, UriType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeUuid(Complex parent, String parentType, String name, UuidType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeInstant(Complex parent, String parentType, String name, InstantType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeBoolean(Complex parent, String parentType, String name, BooleanType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeBase64Binary(Complex parent, String parentType, String name, Base64BinaryType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeUnsignedInt(Complex parent, String parentType, String name, UnsignedIntType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeMarkdown(Complex parent, String parentType, String name, MarkdownType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeTime(Complex parent, String parentType, String name, TimeType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeId(Complex parent, String parentType, String name, IdType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composePositiveInt(Complex parent, String parentType, String name, PositiveIntType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeDecimal(Complex parent, String parentType, String name, DecimalType value, int index) { + if (value == null) + return; + Complex t = parent.predicate("fhir:"+parentType+"."+name); + t.predicate("fhir:value", ttlLiteral(value.asStringValue())); + composeElement(t, parentType, name, value, index); + } + + protected void composeExtension(Complex parent, String parentType, String name, Extension element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Extension", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "Extension", "url", element.getUrlElement(), -1); + if (element.hasValue()) + composeType(t, "Extension", "value", element.getValue(), -1); + } + + protected void composeNarrative(Complex parent, String parentType, String name, Narrative element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Narrative", name, element, index); + if (element.hasStatusElement()) + composeEnum(t, "Narrative", "status", element.getStatusElement(), -1); + if (element.hasDiv()) + composeXhtml(t, "Narrative", "div", element.getDiv(), -1); + } + + protected void composeReference(Complex parent, String parentType, String name, Reference element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Reference", name, element, index); + if (element.hasReferenceElement()) + composeString(t, "Reference", "reference", element.getReferenceElement_(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "Reference", "identifier", element.getIdentifier(), -1); + if (element.hasDisplayElement()) + composeString(t, "Reference", "display", element.getDisplayElement(), -1); + } + + protected void composeQuantity(Complex parent, String parentType, String name, Quantity element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Quantity", name, element, index); + if (element.hasValueElement()) + composeDecimal(t, "Quantity", "value", element.getValueElement(), -1); + if (element.hasComparatorElement()) + composeEnum(t, "Quantity", "comparator", element.getComparatorElement(), -1); + if (element.hasUnitElement()) + composeString(t, "Quantity", "unit", element.getUnitElement(), -1); + if (element.hasSystemElement()) + composeUri(t, "Quantity", "system", element.getSystemElement(), -1); + if (element.hasCodeElement()) + composeCode(t, "Quantity", "code", element.getCodeElement(), -1); + } + + protected void composePeriod(Complex parent, String parentType, String name, Period element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Period", name, element, index); + if (element.hasStartElement()) + composeDateTime(t, "Period", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeDateTime(t, "Period", "end", element.getEndElement(), -1); + } + + protected void composeAttachment(Complex parent, String parentType, String name, Attachment element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Attachment", name, element, index); + if (element.hasContentTypeElement()) + composeCode(t, "Attachment", "contentType", element.getContentTypeElement(), -1); + if (element.hasLanguageElement()) + composeCode(t, "Attachment", "language", element.getLanguageElement(), -1); + if (element.hasDataElement()) + composeBase64Binary(t, "Attachment", "data", element.getDataElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "Attachment", "url", element.getUrlElement(), -1); + if (element.hasSizeElement()) + composeUnsignedInt(t, "Attachment", "size", element.getSizeElement(), -1); + if (element.hasHashElement()) + composeBase64Binary(t, "Attachment", "hash", element.getHashElement(), -1); + if (element.hasTitleElement()) + composeString(t, "Attachment", "title", element.getTitleElement(), -1); + if (element.hasCreationElement()) + composeDateTime(t, "Attachment", "creation", element.getCreationElement(), -1); + } + + protected void composeDuration(Complex parent, String parentType, String name, Duration element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Duration", name, element, index); + } + + protected void composeCount(Complex parent, String parentType, String name, Count element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Count", name, element, index); + } + + protected void composeRange(Complex parent, String parentType, String name, Range element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Range", name, element, index); + if (element.hasLow()) + composeQuantity(t, "Range", "low", element.getLow(), -1); + if (element.hasHigh()) + composeQuantity(t, "Range", "high", element.getHigh(), -1); + } + + protected void composeAnnotation(Complex parent, String parentType, String name, Annotation element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Annotation", name, element, index); + if (element.hasAuthor()) + composeType(t, "Annotation", "author", element.getAuthor(), -1); + if (element.hasTimeElement()) + composeDateTime(t, "Annotation", "time", element.getTimeElement(), -1); + if (element.hasTextElement()) + composeString(t, "Annotation", "text", element.getTextElement(), -1); + } + + protected void composeMoney(Complex parent, String parentType, String name, Money element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Money", name, element, index); + } + + protected void composeIdentifier(Complex parent, String parentType, String name, Identifier element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Identifier", name, element, index); + if (element.hasUseElement()) + composeEnum(t, "Identifier", "use", element.getUseElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Identifier", "type", element.getType(), -1); + if (element.hasSystemElement()) + composeUri(t, "Identifier", "system", element.getSystemElement(), -1); + if (element.hasValueElement()) + composeString(t, "Identifier", "value", element.getValueElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Identifier", "period", element.getPeriod(), -1); + if (element.hasAssigner()) + composeReference(t, "Identifier", "assigner", element.getAssigner(), -1); + } + + protected void composeCoding(Complex parent, String parentType, String name, Coding element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Coding", name, element, index); + decorateCoding(t, element); + if (element.hasSystemElement()) + composeUri(t, "Coding", "system", element.getSystemElement(), -1); + if (element.hasVersionElement()) + composeString(t, "Coding", "version", element.getVersionElement(), -1); + if (element.hasCodeElement()) + composeCode(t, "Coding", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "Coding", "display", element.getDisplayElement(), -1); + if (element.hasUserSelectedElement()) + composeBoolean(t, "Coding", "userSelected", element.getUserSelectedElement(), -1); + } + + protected void composeSignature(Complex parent, String parentType, String name, Signature element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Signature", name, element, index); + for (int i = 0; i < element.getType().size(); i++) + composeCoding(t, "Signature", "type", element.getType().get(i), i); + if (element.hasWhenElement()) + composeInstant(t, "Signature", "when", element.getWhenElement(), -1); + if (element.hasWho()) + composeType(t, "Signature", "who", element.getWho(), -1); + if (element.hasOnBehalfOf()) + composeType(t, "Signature", "onBehalfOf", element.getOnBehalfOf(), -1); + if (element.hasContentTypeElement()) + composeCode(t, "Signature", "contentType", element.getContentTypeElement(), -1); + if (element.hasBlobElement()) + composeBase64Binary(t, "Signature", "blob", element.getBlobElement(), -1); + } + + protected void composeSampledData(Complex parent, String parentType, String name, SampledData element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "SampledData", name, element, index); + if (element.hasOrigin()) + composeQuantity(t, "SampledData", "origin", element.getOrigin(), -1); + if (element.hasPeriodElement()) + composeDecimal(t, "SampledData", "period", element.getPeriodElement(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "SampledData", "factor", element.getFactorElement(), -1); + if (element.hasLowerLimitElement()) + composeDecimal(t, "SampledData", "lowerLimit", element.getLowerLimitElement(), -1); + if (element.hasUpperLimitElement()) + composeDecimal(t, "SampledData", "upperLimit", element.getUpperLimitElement(), -1); + if (element.hasDimensionsElement()) + composePositiveInt(t, "SampledData", "dimensions", element.getDimensionsElement(), -1); + if (element.hasDataElement()) + composeString(t, "SampledData", "data", element.getDataElement(), -1); + } + + protected void composeRatio(Complex parent, String parentType, String name, Ratio element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Ratio", name, element, index); + if (element.hasNumerator()) + composeQuantity(t, "Ratio", "numerator", element.getNumerator(), -1); + if (element.hasDenominator()) + composeQuantity(t, "Ratio", "denominator", element.getDenominator(), -1); + } + + protected void composeDistance(Complex parent, String parentType, String name, Distance element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Distance", name, element, index); + } + + protected void composeAge(Complex parent, String parentType, String name, Age element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Age", name, element, index); + } + + protected void composeCodeableConcept(Complex parent, String parentType, String name, CodeableConcept element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "CodeableConcept", name, element, index); + decorateCodeableConcept(t, element); + for (int i = 0; i < element.getCoding().size(); i++) + composeCoding(t, "CodeableConcept", "coding", element.getCoding().get(i), i); + if (element.hasTextElement()) + composeString(t, "CodeableConcept", "text", element.getTextElement(), -1); + } + + protected void composeMeta(Complex parent, String parentType, String name, Meta element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Meta", name, element, index); + if (element.hasVersionIdElement()) + composeId(t, "Meta", "versionId", element.getVersionIdElement(), -1); + if (element.hasLastUpdatedElement()) + composeInstant(t, "Meta", "lastUpdated", element.getLastUpdatedElement(), -1); + for (int i = 0; i < element.getProfile().size(); i++) + composeUri(t, "Meta", "profile", element.getProfile().get(i), i); + for (int i = 0; i < element.getSecurity().size(); i++) + composeCoding(t, "Meta", "security", element.getSecurity().get(i), i); + for (int i = 0; i < element.getTag().size(); i++) + composeCoding(t, "Meta", "tag", element.getTag().get(i), i); + } + + protected void composeAddress(Complex parent, String parentType, String name, Address element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Address", name, element, index); + if (element.hasUseElement()) + composeEnum(t, "Address", "use", element.getUseElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "Address", "type", element.getTypeElement(), -1); + if (element.hasTextElement()) + composeString(t, "Address", "text", element.getTextElement(), -1); + for (int i = 0; i < element.getLine().size(); i++) + composeString(t, "Address", "line", element.getLine().get(i), i); + if (element.hasCityElement()) + composeString(t, "Address", "city", element.getCityElement(), -1); + if (element.hasDistrictElement()) + composeString(t, "Address", "district", element.getDistrictElement(), -1); + if (element.hasStateElement()) + composeString(t, "Address", "state", element.getStateElement(), -1); + if (element.hasPostalCodeElement()) + composeString(t, "Address", "postalCode", element.getPostalCodeElement(), -1); + if (element.hasCountryElement()) + composeString(t, "Address", "country", element.getCountryElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Address", "period", element.getPeriod(), -1); + } + + protected void composeTriggerDefinition(Complex parent, String parentType, String name, TriggerDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "TriggerDefinition", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "TriggerDefinition", "type", element.getTypeElement(), -1); + if (element.hasNameElement()) + composeUri(t, "TriggerDefinition", "name", element.getNameElement(), -1); + if (element.hasTiming()) + composeType(t, "TriggerDefinition", "timing", element.getTiming(), -1); + if (element.hasData()) + composeDataRequirement(t, "TriggerDefinition", "data", element.getData(), -1); + if (element.hasCondition()) + composeTriggerDefinitionTriggerDefinitionConditionComponent(t, "TriggerDefinition", "condition", element.getCondition(), -1); + } + + protected void composeTriggerDefinitionTriggerDefinitionConditionComponent(Complex parent, String parentType, String name, TriggerDefinition.TriggerDefinitionConditionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "condition", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "TriggerDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasLanguageElement()) + composeEnum(t, "TriggerDefinition", "language", element.getLanguageElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "TriggerDefinition", "expression", element.getExpressionElement(), -1); + } + + protected void composeContributor(Complex parent, String parentType, String name, Contributor element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Contributor", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Contributor", "type", element.getTypeElement(), -1); + if (element.hasNameElement()) + composeString(t, "Contributor", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "Contributor", "contact", element.getContact().get(i), i); + } + + protected void composeDataRequirement(Complex parent, String parentType, String name, DataRequirement element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "DataRequirement", name, element, index); + if (element.hasTypeElement()) + composeCode(t, "DataRequirement", "type", element.getTypeElement(), -1); + for (int i = 0; i < element.getProfile().size(); i++) + composeUri(t, "DataRequirement", "profile", element.getProfile().get(i), i); + for (int i = 0; i < element.getMustSupport().size(); i++) + composeString(t, "DataRequirement", "mustSupport", element.getMustSupport().get(i), i); + for (int i = 0; i < element.getCodeFilter().size(); i++) + composeDataRequirementDataRequirementCodeFilterComponent(t, "DataRequirement", "codeFilter", element.getCodeFilter().get(i), i); + for (int i = 0; i < element.getDateFilter().size(); i++) + composeDataRequirementDataRequirementDateFilterComponent(t, "DataRequirement", "dateFilter", element.getDateFilter().get(i), i); + } + + protected void composeDataRequirementDataRequirementCodeFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementCodeFilterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "codeFilter", name, element, index); + if (element.hasPathElement()) + composeString(t, "DataRequirement", "path", element.getPathElement(), -1); + if (element.hasValueSet()) + composeType(t, "DataRequirement", "valueSet", element.getValueSet(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCoding(t, "DataRequirement", "code", element.getCode().get(i), i); + } + + protected void composeDataRequirementDataRequirementDateFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementDateFilterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "dateFilter", name, element, index); + if (element.hasPathElement()) + composeString(t, "DataRequirement", "path", element.getPathElement(), -1); + if (element.hasValue()) + composeType(t, "DataRequirement", "value", element.getValue(), -1); + } + + protected void composeDosage(Complex parent, String parentType, String name, Dosage element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Dosage", name, element, index); + if (element.hasSequenceElement()) + composeInteger(t, "Dosage", "sequence", element.getSequenceElement(), -1); + if (element.hasTextElement()) + composeString(t, "Dosage", "text", element.getTextElement(), -1); + for (int i = 0; i < element.getAdditionalInstruction().size(); i++) + composeCodeableConcept(t, "Dosage", "additionalInstruction", element.getAdditionalInstruction().get(i), i); + if (element.hasPatientInstructionElement()) + composeString(t, "Dosage", "patientInstruction", element.getPatientInstructionElement(), -1); + if (element.hasTiming()) + composeTiming(t, "Dosage", "timing", element.getTiming(), -1); + if (element.hasAsNeeded()) + composeType(t, "Dosage", "asNeeded", element.getAsNeeded(), -1); + if (element.hasSite()) + composeCodeableConcept(t, "Dosage", "site", element.getSite(), -1); + if (element.hasRoute()) + composeCodeableConcept(t, "Dosage", "route", element.getRoute(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "Dosage", "method", element.getMethod(), -1); + if (element.hasDose()) + composeType(t, "Dosage", "dose", element.getDose(), -1); + if (element.hasMaxDosePerPeriod()) + composeRatio(t, "Dosage", "maxDosePerPeriod", element.getMaxDosePerPeriod(), -1); + if (element.hasMaxDosePerAdministration()) + composeQuantity(t, "Dosage", "maxDosePerAdministration", element.getMaxDosePerAdministration(), -1); + if (element.hasMaxDosePerLifetime()) + composeQuantity(t, "Dosage", "maxDosePerLifetime", element.getMaxDosePerLifetime(), -1); + if (element.hasRate()) + composeType(t, "Dosage", "rate", element.getRate(), -1); + } + + protected void composeRelatedArtifact(Complex parent, String parentType, String name, RelatedArtifact element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "RelatedArtifact", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "RelatedArtifact", "type", element.getTypeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "RelatedArtifact", "display", element.getDisplayElement(), -1); + if (element.hasCitationElement()) + composeString(t, "RelatedArtifact", "citation", element.getCitationElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "RelatedArtifact", "url", element.getUrlElement(), -1); + if (element.hasDocument()) + composeAttachment(t, "RelatedArtifact", "document", element.getDocument(), -1); + if (element.hasResource()) + composeReference(t, "RelatedArtifact", "resource", element.getResource(), -1); + } + + protected void composeContactDetail(Complex parent, String parentType, String name, ContactDetail element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "ContactDetail", name, element, index); + if (element.hasNameElement()) + composeString(t, "ContactDetail", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "ContactDetail", "telecom", element.getTelecom().get(i), i); + } + + protected void composeHumanName(Complex parent, String parentType, String name, HumanName element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "HumanName", name, element, index); + if (element.hasUseElement()) + composeEnum(t, "HumanName", "use", element.getUseElement(), -1); + if (element.hasTextElement()) + composeString(t, "HumanName", "text", element.getTextElement(), -1); + if (element.hasFamilyElement()) + composeString(t, "HumanName", "family", element.getFamilyElement(), -1); + for (int i = 0; i < element.getGiven().size(); i++) + composeString(t, "HumanName", "given", element.getGiven().get(i), i); + for (int i = 0; i < element.getPrefix().size(); i++) + composeString(t, "HumanName", "prefix", element.getPrefix().get(i), i); + for (int i = 0; i < element.getSuffix().size(); i++) + composeString(t, "HumanName", "suffix", element.getSuffix().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "HumanName", "period", element.getPeriod(), -1); + } + + protected void composeContactPoint(Complex parent, String parentType, String name, ContactPoint element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "ContactPoint", name, element, index); + if (element.hasSystemElement()) + composeEnum(t, "ContactPoint", "system", element.getSystemElement(), -1); + if (element.hasValueElement()) + composeString(t, "ContactPoint", "value", element.getValueElement(), -1); + if (element.hasUseElement()) + composeEnum(t, "ContactPoint", "use", element.getUseElement(), -1); + if (element.hasRankElement()) + composePositiveInt(t, "ContactPoint", "rank", element.getRankElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "ContactPoint", "period", element.getPeriod(), -1); + } + + protected void composeUsageContext(Complex parent, String parentType, String name, UsageContext element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "UsageContext", name, element, index); + if (element.hasCode()) + composeCoding(t, "UsageContext", "code", element.getCode(), -1); + if (element.hasValue()) + composeType(t, "UsageContext", "value", element.getValue(), -1); + } + + protected void composeTiming(Complex parent, String parentType, String name, Timing element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "Timing", name, element, index); + for (int i = 0; i < element.getEvent().size(); i++) + composeDateTime(t, "Timing", "event", element.getEvent().get(i), i); + if (element.hasRepeat()) + composeTimingTimingRepeatComponent(t, "Timing", "repeat", element.getRepeat(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Timing", "code", element.getCode(), -1); + } + + protected void composeTimingTimingRepeatComponent(Complex parent, String parentType, String name, Timing.TimingRepeatComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "repeat", name, element, index); + if (element.hasBounds()) + composeType(t, "Timing", "bounds", element.getBounds(), -1); + if (element.hasCountElement()) + composeInteger(t, "Timing", "count", element.getCountElement(), -1); + if (element.hasCountMaxElement()) + composeInteger(t, "Timing", "countMax", element.getCountMaxElement(), -1); + if (element.hasDurationElement()) + composeDecimal(t, "Timing", "duration", element.getDurationElement(), -1); + if (element.hasDurationMaxElement()) + composeDecimal(t, "Timing", "durationMax", element.getDurationMaxElement(), -1); + if (element.hasDurationUnitElement()) + composeEnum(t, "Timing", "durationUnit", element.getDurationUnitElement(), -1); + if (element.hasFrequencyElement()) + composeInteger(t, "Timing", "frequency", element.getFrequencyElement(), -1); + if (element.hasFrequencyMaxElement()) + composeInteger(t, "Timing", "frequencyMax", element.getFrequencyMaxElement(), -1); + if (element.hasPeriodElement()) + composeDecimal(t, "Timing", "period", element.getPeriodElement(), -1); + if (element.hasPeriodMaxElement()) + composeDecimal(t, "Timing", "periodMax", element.getPeriodMaxElement(), -1); + if (element.hasPeriodUnitElement()) + composeEnum(t, "Timing", "periodUnit", element.getPeriodUnitElement(), -1); + for (int i = 0; i < element.getDayOfWeek().size(); i++) + composeEnum(t, "Timing", "dayOfWeek", element.getDayOfWeek().get(i), i); + for (int i = 0; i < element.getTimeOfDay().size(); i++) + composeTime(t, "Timing", "timeOfDay", element.getTimeOfDay().get(i), i); + for (int i = 0; i < element.getWhen().size(); i++) + composeEnum(t, "Timing", "when", element.getWhen().get(i), i); + if (element.hasOffsetElement()) + composeUnsignedInt(t, "Timing", "offset", element.getOffsetElement(), -1); + } + + protected void composeElementDefinition(Complex parent, String parentType, String name, ElementDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "ElementDefinition", name, element, index); + if (element.hasPathElement()) + composeString(t, "ElementDefinition", "path", element.getPathElement(), -1); + for (int i = 0; i < element.getRepresentation().size(); i++) + composeEnum(t, "ElementDefinition", "representation", element.getRepresentation().get(i), i); + if (element.hasSliceNameElement()) + composeString(t, "ElementDefinition", "sliceName", element.getSliceNameElement(), -1); + if (element.hasLabelElement()) + composeString(t, "ElementDefinition", "label", element.getLabelElement(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCoding(t, "ElementDefinition", "code", element.getCode().get(i), i); + if (element.hasSlicing()) + composeElementDefinitionElementDefinitionSlicingComponent(t, "ElementDefinition", "slicing", element.getSlicing(), -1); + if (element.hasShortElement()) + composeString(t, "ElementDefinition", "short", element.getShortElement(), -1); + if (element.hasDefinitionElement()) + composeMarkdown(t, "ElementDefinition", "definition", element.getDefinitionElement(), -1); + if (element.hasCommentElement()) + composeMarkdown(t, "ElementDefinition", "comment", element.getCommentElement(), -1); + if (element.hasRequirementsElement()) + composeMarkdown(t, "ElementDefinition", "requirements", element.getRequirementsElement(), -1); + for (int i = 0; i < element.getAlias().size(); i++) + composeString(t, "ElementDefinition", "alias", element.getAlias().get(i), i); + if (element.hasMinElement()) + composeUnsignedInt(t, "ElementDefinition", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "ElementDefinition", "max", element.getMaxElement(), -1); + if (element.hasBase()) + composeElementDefinitionElementDefinitionBaseComponent(t, "ElementDefinition", "base", element.getBase(), -1); + if (element.hasContentReferenceElement()) + composeUri(t, "ElementDefinition", "contentReference", element.getContentReferenceElement(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeElementDefinitionTypeRefComponent(t, "ElementDefinition", "type", element.getType().get(i), i); + if (element.hasDefaultValue()) + composeType(t, "ElementDefinition", "defaultValue", element.getDefaultValue(), -1); + if (element.hasMeaningWhenMissingElement()) + composeMarkdown(t, "ElementDefinition", "meaningWhenMissing", element.getMeaningWhenMissingElement(), -1); + if (element.hasOrderMeaningElement()) + composeString(t, "ElementDefinition", "orderMeaning", element.getOrderMeaningElement(), -1); + if (element.hasFixed()) + composeType(t, "ElementDefinition", "fixed", element.getFixed(), -1); + if (element.hasPattern()) + composeType(t, "ElementDefinition", "pattern", element.getPattern(), -1); + for (int i = 0; i < element.getExample().size(); i++) + composeElementDefinitionElementDefinitionExampleComponent(t, "ElementDefinition", "example", element.getExample().get(i), i); + if (element.hasMinValue()) + composeType(t, "ElementDefinition", "minValue", element.getMinValue(), -1); + if (element.hasMaxValue()) + composeType(t, "ElementDefinition", "maxValue", element.getMaxValue(), -1); + if (element.hasMaxLengthElement()) + composeInteger(t, "ElementDefinition", "maxLength", element.getMaxLengthElement(), -1); + for (int i = 0; i < element.getCondition().size(); i++) + composeId(t, "ElementDefinition", "condition", element.getCondition().get(i), i); + for (int i = 0; i < element.getConstraint().size(); i++) + composeElementDefinitionElementDefinitionConstraintComponent(t, "ElementDefinition", "constraint", element.getConstraint().get(i), i); + if (element.hasMustSupportElement()) + composeBoolean(t, "ElementDefinition", "mustSupport", element.getMustSupportElement(), -1); + if (element.hasIsModifierElement()) + composeBoolean(t, "ElementDefinition", "isModifier", element.getIsModifierElement(), -1); + if (element.hasIsSummaryElement()) + composeBoolean(t, "ElementDefinition", "isSummary", element.getIsSummaryElement(), -1); + if (element.hasBinding()) + composeElementDefinitionElementDefinitionBindingComponent(t, "ElementDefinition", "binding", element.getBinding(), -1); + for (int i = 0; i < element.getMapping().size(); i++) + composeElementDefinitionElementDefinitionMappingComponent(t, "ElementDefinition", "mapping", element.getMapping().get(i), i); + } + + protected void composeElementDefinitionElementDefinitionSlicingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionSlicingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "slicing", name, element, index); + for (int i = 0; i < element.getDiscriminator().size(); i++) + composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(t, "ElementDefinition", "discriminator", element.getDiscriminator().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "ElementDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasOrderedElement()) + composeBoolean(t, "ElementDefinition", "ordered", element.getOrderedElement(), -1); + if (element.hasRulesElement()) + composeEnum(t, "ElementDefinition", "rules", element.getRulesElement(), -1); + } + + protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "discriminator", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "ElementDefinition", "type", element.getTypeElement(), -1); + if (element.hasPathElement()) + composeString(t, "ElementDefinition", "path", element.getPathElement(), -1); + } + + protected void composeElementDefinitionElementDefinitionBaseComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionBaseComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "base", name, element, index); + if (element.hasPathElement()) + composeString(t, "ElementDefinition", "path", element.getPathElement(), -1); + if (element.hasMinElement()) + composeUnsignedInt(t, "ElementDefinition", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "ElementDefinition", "max", element.getMaxElement(), -1); + } + + protected void composeElementDefinitionTypeRefComponent(Complex parent, String parentType, String name, ElementDefinition.TypeRefComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "type", name, element, index); + if (element.hasCodeElement()) + composeUri(t, "ElementDefinition", "code", element.getCodeElement(), -1); + if (element.hasProfileElement()) + composeUri(t, "ElementDefinition", "profile", element.getProfileElement(), -1); + if (element.hasTargetProfileElement()) + composeUri(t, "ElementDefinition", "targetProfile", element.getTargetProfileElement(), -1); + for (int i = 0; i < element.getAggregation().size(); i++) + composeEnum(t, "ElementDefinition", "aggregation", element.getAggregation().get(i), i); + if (element.hasVersioningElement()) + composeEnum(t, "ElementDefinition", "versioning", element.getVersioningElement(), -1); + } + + protected void composeElementDefinitionElementDefinitionExampleComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionExampleComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "example", name, element, index); + if (element.hasLabelElement()) + composeString(t, "ElementDefinition", "label", element.getLabelElement(), -1); + if (element.hasValue()) + composeType(t, "ElementDefinition", "value", element.getValue(), -1); + } + + protected void composeElementDefinitionElementDefinitionConstraintComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionConstraintComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "constraint", name, element, index); + if (element.hasKeyElement()) + composeId(t, "ElementDefinition", "key", element.getKeyElement(), -1); + if (element.hasRequirementsElement()) + composeString(t, "ElementDefinition", "requirements", element.getRequirementsElement(), -1); + if (element.hasSeverityElement()) + composeEnum(t, "ElementDefinition", "severity", element.getSeverityElement(), -1); + if (element.hasHumanElement()) + composeString(t, "ElementDefinition", "human", element.getHumanElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "ElementDefinition", "expression", element.getExpressionElement(), -1); + if (element.hasXpathElement()) + composeString(t, "ElementDefinition", "xpath", element.getXpathElement(), -1); + if (element.hasSourceElement()) + composeUri(t, "ElementDefinition", "source", element.getSourceElement(), -1); + } + + protected void composeElementDefinitionElementDefinitionBindingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionBindingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "binding", name, element, index); + if (element.hasStrengthElement()) + composeEnum(t, "ElementDefinition", "strength", element.getStrengthElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ElementDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasValueSet()) + composeType(t, "ElementDefinition", "valueSet", element.getValueSet(), -1); + } + + protected void composeElementDefinitionElementDefinitionMappingComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionMappingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "mapping", name, element, index); + if (element.hasIdentityElement()) + composeId(t, "ElementDefinition", "identity", element.getIdentityElement(), -1); + if (element.hasLanguageElement()) + composeCode(t, "ElementDefinition", "language", element.getLanguageElement(), -1); + if (element.hasMapElement()) + composeString(t, "ElementDefinition", "map", element.getMapElement(), -1); + if (element.hasCommentElement()) + composeString(t, "ElementDefinition", "comment", element.getCommentElement(), -1); + } + + protected void composeParameterDefinition(Complex parent, String parentType, String name, ParameterDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeElement(t, "ParameterDefinition", name, element, index); + if (element.hasNameElement()) + composeCode(t, "ParameterDefinition", "name", element.getNameElement(), -1); + if (element.hasUseElement()) + composeEnum(t, "ParameterDefinition", "use", element.getUseElement(), -1); + if (element.hasMinElement()) + composeInteger(t, "ParameterDefinition", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "ParameterDefinition", "max", element.getMaxElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "ParameterDefinition", "documentation", element.getDocumentationElement(), -1); + if (element.hasTypeElement()) + composeCode(t, "ParameterDefinition", "type", element.getTypeElement(), -1); + if (element.hasProfile()) + composeReference(t, "ParameterDefinition", "profile", element.getProfile(), -1); + } + + protected void composeDomainResource(Complex t, String parentType, String name, DomainResource element, int index) { + composeResource(t, parentType, name, element, index); + if (element.hasText()) + composeNarrative(t, "DomainResource", "text", element.getText(), -1); + for (int i = 0; i < element.getContained().size(); i++) + composeResource(t, "DomainResource", "contained", element.getContained().get(i), i); + for (int i = 0; i < element.getExtension().size(); i++) + composeExtension(t, "DomainResource", "extension", element.getExtension().get(i), i); + for (int i = 0; i < element.getModifierExtension().size(); i++) + composeExtension(t, "DomainResource", "modifierExtension", element.getModifierExtension().get(i), i); + } + + protected void composeParameters(Complex parent, String parentType, String name, Parameters element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeResource(t, "Parameters", name, element, index); + for (int i = 0; i < element.getParameter().size(); i++) + composeParametersParametersParameterComponent(t, "Parameters", "parameter", element.getParameter().get(i), i); + } + + protected void composeParametersParametersParameterComponent(Complex parent, String parentType, String name, Parameters.ParametersParameterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "parameter", name, element, index); + if (element.hasNameElement()) + composeString(t, "Parameters", "name", element.getNameElement(), -1); + if (element.hasValue()) + composeType(t, "Parameters", "value", element.getValue(), -1); + if (element.hasResource()) + composeResource(t, "Parameters", "resource", element.getResource(), -1); + for (int i = 0; i < element.getPart().size(); i++) + composeParametersParametersParameterComponent(t, "Parameters", "part", element.getPart().get(i), i); + } + + protected void composeResource(Complex t, String parentType, String name, Resource element, int index) { + if (element.hasIdElement()) + composeId(t, "Resource", "id", element.getIdElement(), -1); + if (element.hasMeta()) + composeMeta(t, "Resource", "meta", element.getMeta(), -1); + if (element.hasImplicitRulesElement()) + composeUri(t, "Resource", "implicitRules", element.getImplicitRulesElement(), -1); + if (element.hasLanguageElement()) + composeCode(t, "Resource", "language", element.getLanguageElement(), -1); + } + + protected void composeAccount(Complex parent, String parentType, String name, Account element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Account", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Account", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Account", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Account", "type", element.getType(), -1); + if (element.hasNameElement()) + composeString(t, "Account", "name", element.getNameElement(), -1); + if (element.hasSubject()) + composeReference(t, "Account", "subject", element.getSubject(), -1); + if (element.hasPeriod()) + composePeriod(t, "Account", "period", element.getPeriod(), -1); + if (element.hasActive()) + composePeriod(t, "Account", "active", element.getActive(), -1); + if (element.hasBalance()) + composeMoney(t, "Account", "balance", element.getBalance(), -1); + for (int i = 0; i < element.getCoverage().size(); i++) + composeAccountCoverageComponent(t, "Account", "coverage", element.getCoverage().get(i), i); + if (element.hasOwner()) + composeReference(t, "Account", "owner", element.getOwner(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Account", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getGuarantor().size(); i++) + composeAccountGuarantorComponent(t, "Account", "guarantor", element.getGuarantor().get(i), i); + } + + protected void composeAccountCoverageComponent(Complex parent, String parentType, String name, Account.CoverageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "coverage", name, element, index); + if (element.hasCoverage()) + composeReference(t, "Account", "coverage", element.getCoverage(), -1); + if (element.hasPriorityElement()) + composePositiveInt(t, "Account", "priority", element.getPriorityElement(), -1); + } + + protected void composeAccountGuarantorComponent(Complex parent, String parentType, String name, Account.GuarantorComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "guarantor", name, element, index); + if (element.hasParty()) + composeReference(t, "Account", "party", element.getParty(), -1); + if (element.hasOnHoldElement()) + composeBoolean(t, "Account", "onHold", element.getOnHoldElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Account", "period", element.getPeriod(), -1); + } + + protected void composeActivityDefinition(Complex parent, String parentType, String name, ActivityDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ActivityDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ActivityDefinition", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ActivityDefinition", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "ActivityDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ActivityDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ActivityDefinition", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ActivityDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ActivityDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ActivityDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ActivityDefinition", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ActivityDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "ActivityDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasUsageElement()) + composeString(t, "ActivityDefinition", "usage", element.getUsageElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "ActivityDefinition", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "ActivityDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "ActivityDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ActivityDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ActivityDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeCodeableConcept(t, "ActivityDefinition", "topic", element.getTopic().get(i), i); + for (int i = 0; i < element.getContributor().size(); i++) + composeContributor(t, "ActivityDefinition", "contributor", element.getContributor().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ActivityDefinition", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "ActivityDefinition", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "ActivityDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); + for (int i = 0; i < element.getLibrary().size(); i++) + composeReference(t, "ActivityDefinition", "library", element.getLibrary().get(i), i); + if (element.hasKindElement()) + composeEnum(t, "ActivityDefinition", "kind", element.getKindElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "ActivityDefinition", "code", element.getCode(), -1); + if (element.hasTiming()) + composeType(t, "ActivityDefinition", "timing", element.getTiming(), -1); + if (element.hasLocation()) + composeReference(t, "ActivityDefinition", "location", element.getLocation(), -1); + for (int i = 0; i < element.getParticipant().size(); i++) + composeActivityDefinitionActivityDefinitionParticipantComponent(t, "ActivityDefinition", "participant", element.getParticipant().get(i), i); + if (element.hasProduct()) + composeType(t, "ActivityDefinition", "product", element.getProduct(), -1); + if (element.hasQuantity()) + composeQuantity(t, "ActivityDefinition", "quantity", element.getQuantity(), -1); + for (int i = 0; i < element.getDosage().size(); i++) + composeDosage(t, "ActivityDefinition", "dosage", element.getDosage().get(i), i); + for (int i = 0; i < element.getBodySite().size(); i++) + composeCodeableConcept(t, "ActivityDefinition", "bodySite", element.getBodySite().get(i), i); + if (element.hasTransform()) + composeReference(t, "ActivityDefinition", "transform", element.getTransform(), -1); + for (int i = 0; i < element.getDynamicValue().size(); i++) + composeActivityDefinitionActivityDefinitionDynamicValueComponent(t, "ActivityDefinition", "dynamicValue", element.getDynamicValue().get(i), i); + } + + protected void composeActivityDefinitionActivityDefinitionParticipantComponent(Complex parent, String parentType, String name, ActivityDefinition.ActivityDefinitionParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "ActivityDefinition", "type", element.getTypeElement(), -1); + if (element.hasRole()) + composeCodeableConcept(t, "ActivityDefinition", "role", element.getRole(), -1); + } + + protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(Complex parent, String parentType, String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dynamicValue", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "ActivityDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPathElement()) + composeString(t, "ActivityDefinition", "path", element.getPathElement(), -1); + if (element.hasLanguageElement()) + composeString(t, "ActivityDefinition", "language", element.getLanguageElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "ActivityDefinition", "expression", element.getExpressionElement(), -1); + } + + protected void composeAdverseEvent(Complex parent, String parentType, String name, AdverseEvent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "AdverseEvent", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "AdverseEvent", "identifier", element.getIdentifier(), -1); + if (element.hasActualityElement()) + composeEnum(t, "AdverseEvent", "actuality", element.getActualityElement(), -1); + if (element.hasCategoryElement()) + composeEnum(t, "AdverseEvent", "category", element.getCategoryElement(), -1); + if (element.hasEvent()) + composeCodeableConcept(t, "AdverseEvent", "event", element.getEvent(), -1); + if (element.hasSubject()) + composeReference(t, "AdverseEvent", "subject", element.getSubject(), -1); + if (element.hasDateElement()) + composeDateTime(t, "AdverseEvent", "date", element.getDateElement(), -1); + for (int i = 0; i < element.getResultingCondition().size(); i++) + composeReference(t, "AdverseEvent", "resultingCondition", element.getResultingCondition().get(i), i); + if (element.hasLocation()) + composeReference(t, "AdverseEvent", "location", element.getLocation(), -1); + if (element.hasSeriousness()) + composeCodeableConcept(t, "AdverseEvent", "seriousness", element.getSeriousness(), -1); + if (element.hasSeverity()) + composeCodeableConcept(t, "AdverseEvent", "severity", element.getSeverity(), -1); + if (element.hasOutcome()) + composeCodeableConcept(t, "AdverseEvent", "outcome", element.getOutcome(), -1); + if (element.hasRecorder()) + composeReference(t, "AdverseEvent", "recorder", element.getRecorder(), -1); + if (element.hasEventParticipant()) + composeReference(t, "AdverseEvent", "eventParticipant", element.getEventParticipant(), -1); + if (element.hasDescriptionElement()) + composeString(t, "AdverseEvent", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getSuspectEntity().size(); i++) + composeAdverseEventAdverseEventSuspectEntityComponent(t, "AdverseEvent", "suspectEntity", element.getSuspectEntity().get(i), i); + for (int i = 0; i < element.getSubjectMedicalHistory().size(); i++) + composeReference(t, "AdverseEvent", "subjectMedicalHistory", element.getSubjectMedicalHistory().get(i), i); + for (int i = 0; i < element.getReferenceDocument().size(); i++) + composeReference(t, "AdverseEvent", "referenceDocument", element.getReferenceDocument().get(i), i); + for (int i = 0; i < element.getStudy().size(); i++) + composeReference(t, "AdverseEvent", "study", element.getStudy().get(i), i); + } + + protected void composeAdverseEventAdverseEventSuspectEntityComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSuspectEntityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "suspectEntity", name, element, index); + if (element.hasInstance()) + composeReference(t, "AdverseEvent", "instance", element.getInstance(), -1); + for (int i = 0; i < element.getCausality().size(); i++) + composeAdverseEventAdverseEventSuspectEntityCausalityComponent(t, "AdverseEvent", "causality", element.getCausality().get(i), i); + } + + protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(Complex parent, String parentType, String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "causality", name, element, index); + if (element.hasAssessment()) + composeCodeableConcept(t, "AdverseEvent", "assessment", element.getAssessment(), -1); + if (element.hasProductRelatednessElement()) + composeString(t, "AdverseEvent", "productRelatedness", element.getProductRelatednessElement(), -1); + if (element.hasAuthor()) + composeReference(t, "AdverseEvent", "author", element.getAuthor(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "AdverseEvent", "method", element.getMethod(), -1); + } + + protected void composeAllergyIntolerance(Complex parent, String parentType, String name, AllergyIntolerance element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "AllergyIntolerance", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "AllergyIntolerance", "identifier", element.getIdentifier().get(i), i); + if (element.hasClinicalStatusElement()) + composeEnum(t, "AllergyIntolerance", "clinicalStatus", element.getClinicalStatusElement(), -1); + if (element.hasVerificationStatusElement()) + composeEnum(t, "AllergyIntolerance", "verificationStatus", element.getVerificationStatusElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "AllergyIntolerance", "type", element.getTypeElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeEnum(t, "AllergyIntolerance", "category", element.getCategory().get(i), i); + if (element.hasCriticalityElement()) + composeEnum(t, "AllergyIntolerance", "criticality", element.getCriticalityElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "AllergyIntolerance", "code", element.getCode(), -1); + if (element.hasPatient()) + composeReference(t, "AllergyIntolerance", "patient", element.getPatient(), -1); + if (element.hasOnset()) + composeType(t, "AllergyIntolerance", "onset", element.getOnset(), -1); + if (element.hasAssertedDateElement()) + composeDateTime(t, "AllergyIntolerance", "assertedDate", element.getAssertedDateElement(), -1); + if (element.hasRecorder()) + composeReference(t, "AllergyIntolerance", "recorder", element.getRecorder(), -1); + if (element.hasAsserter()) + composeReference(t, "AllergyIntolerance", "asserter", element.getAsserter(), -1); + if (element.hasLastOccurrenceElement()) + composeDateTime(t, "AllergyIntolerance", "lastOccurrence", element.getLastOccurrenceElement(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "AllergyIntolerance", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getReaction().size(); i++) + composeAllergyIntoleranceAllergyIntoleranceReactionComponent(t, "AllergyIntolerance", "reaction", element.getReaction().get(i), i); + } + + protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(Complex parent, String parentType, String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "reaction", name, element, index); + if (element.hasSubstance()) + composeCodeableConcept(t, "AllergyIntolerance", "substance", element.getSubstance(), -1); + for (int i = 0; i < element.getManifestation().size(); i++) + composeCodeableConcept(t, "AllergyIntolerance", "manifestation", element.getManifestation().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "AllergyIntolerance", "description", element.getDescriptionElement(), -1); + if (element.hasOnsetElement()) + composeDateTime(t, "AllergyIntolerance", "onset", element.getOnsetElement(), -1); + if (element.hasSeverityElement()) + composeEnum(t, "AllergyIntolerance", "severity", element.getSeverityElement(), -1); + if (element.hasExposureRoute()) + composeCodeableConcept(t, "AllergyIntolerance", "exposureRoute", element.getExposureRoute(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "AllergyIntolerance", "note", element.getNote().get(i), i); + } + + protected void composeAppointment(Complex parent, String parentType, String name, Appointment element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Appointment", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Appointment", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Appointment", "status", element.getStatusElement(), -1); + if (element.hasServiceCategory()) + composeCodeableConcept(t, "Appointment", "serviceCategory", element.getServiceCategory(), -1); + for (int i = 0; i < element.getServiceType().size(); i++) + composeCodeableConcept(t, "Appointment", "serviceType", element.getServiceType().get(i), i); + for (int i = 0; i < element.getSpecialty().size(); i++) + composeCodeableConcept(t, "Appointment", "specialty", element.getSpecialty().get(i), i); + if (element.hasAppointmentType()) + composeCodeableConcept(t, "Appointment", "appointmentType", element.getAppointmentType(), -1); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "Appointment", "reason", element.getReason().get(i), i); + for (int i = 0; i < element.getIndication().size(); i++) + composeReference(t, "Appointment", "indication", element.getIndication().get(i), i); + if (element.hasPriorityElement()) + composeUnsignedInt(t, "Appointment", "priority", element.getPriorityElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Appointment", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getSupportingInformation().size(); i++) + composeReference(t, "Appointment", "supportingInformation", element.getSupportingInformation().get(i), i); + if (element.hasStartElement()) + composeInstant(t, "Appointment", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInstant(t, "Appointment", "end", element.getEndElement(), -1); + if (element.hasMinutesDurationElement()) + composePositiveInt(t, "Appointment", "minutesDuration", element.getMinutesDurationElement(), -1); + for (int i = 0; i < element.getSlot().size(); i++) + composeReference(t, "Appointment", "slot", element.getSlot().get(i), i); + if (element.hasCreatedElement()) + composeDateTime(t, "Appointment", "created", element.getCreatedElement(), -1); + if (element.hasCommentElement()) + composeString(t, "Appointment", "comment", element.getCommentElement(), -1); + for (int i = 0; i < element.getIncomingReferral().size(); i++) + composeReference(t, "Appointment", "incomingReferral", element.getIncomingReferral().get(i), i); + for (int i = 0; i < element.getParticipant().size(); i++) + composeAppointmentAppointmentParticipantComponent(t, "Appointment", "participant", element.getParticipant().get(i), i); + for (int i = 0; i < element.getRequestedPeriod().size(); i++) + composePeriod(t, "Appointment", "requestedPeriod", element.getRequestedPeriod().get(i), i); + } + + protected void composeAppointmentAppointmentParticipantComponent(Complex parent, String parentType, String name, Appointment.AppointmentParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "Appointment", "type", element.getType().get(i), i); + if (element.hasActor()) + composeReference(t, "Appointment", "actor", element.getActor(), -1); + if (element.hasRequiredElement()) + composeEnum(t, "Appointment", "required", element.getRequiredElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Appointment", "status", element.getStatusElement(), -1); + } + + protected void composeAppointmentResponse(Complex parent, String parentType, String name, AppointmentResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "AppointmentResponse", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "AppointmentResponse", "identifier", element.getIdentifier().get(i), i); + if (element.hasAppointment()) + composeReference(t, "AppointmentResponse", "appointment", element.getAppointment(), -1); + if (element.hasStartElement()) + composeInstant(t, "AppointmentResponse", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInstant(t, "AppointmentResponse", "end", element.getEndElement(), -1); + for (int i = 0; i < element.getParticipantType().size(); i++) + composeCodeableConcept(t, "AppointmentResponse", "participantType", element.getParticipantType().get(i), i); + if (element.hasActor()) + composeReference(t, "AppointmentResponse", "actor", element.getActor(), -1); + if (element.hasParticipantStatusElement()) + composeEnum(t, "AppointmentResponse", "participantStatus", element.getParticipantStatusElement(), -1); + if (element.hasCommentElement()) + composeString(t, "AppointmentResponse", "comment", element.getCommentElement(), -1); + } + + protected void composeAuditEvent(Complex parent, String parentType, String name, AuditEvent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "AuditEvent", name, element, index); + if (element.hasType()) + composeCoding(t, "AuditEvent", "type", element.getType(), -1); + for (int i = 0; i < element.getSubtype().size(); i++) + composeCoding(t, "AuditEvent", "subtype", element.getSubtype().get(i), i); + if (element.hasActionElement()) + composeEnum(t, "AuditEvent", "action", element.getActionElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "AuditEvent", "period", element.getPeriod(), -1); + if (element.hasRecordedElement()) + composeInstant(t, "AuditEvent", "recorded", element.getRecordedElement(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "AuditEvent", "outcome", element.getOutcomeElement(), -1); + if (element.hasOutcomeDescElement()) + composeString(t, "AuditEvent", "outcomeDesc", element.getOutcomeDescElement(), -1); + for (int i = 0; i < element.getPurposeOfEvent().size(); i++) + composeCodeableConcept(t, "AuditEvent", "purposeOfEvent", element.getPurposeOfEvent().get(i), i); + for (int i = 0; i < element.getAgent().size(); i++) + composeAuditEventAuditEventAgentComponent(t, "AuditEvent", "agent", element.getAgent().get(i), i); + if (element.hasSource()) + composeAuditEventAuditEventSourceComponent(t, "AuditEvent", "source", element.getSource(), -1); + for (int i = 0; i < element.getEntity().size(); i++) + composeAuditEventAuditEventEntityComponent(t, "AuditEvent", "entity", element.getEntity().get(i), i); + } + + protected void composeAuditEventAuditEventAgentComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "agent", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "AuditEvent", "type", element.getType(), -1); + for (int i = 0; i < element.getRole().size(); i++) + composeCodeableConcept(t, "AuditEvent", "role", element.getRole().get(i), i); + if (element.hasReference()) + composeReference(t, "AuditEvent", "reference", element.getReference(), -1); + if (element.hasUserId()) + composeIdentifier(t, "AuditEvent", "userId", element.getUserId(), -1); + if (element.hasAltIdElement()) + composeString(t, "AuditEvent", "altId", element.getAltIdElement(), -1); + if (element.hasNameElement()) + composeString(t, "AuditEvent", "name", element.getNameElement(), -1); + if (element.hasRequestorElement()) + composeBoolean(t, "AuditEvent", "requestor", element.getRequestorElement(), -1); + if (element.hasLocation()) + composeReference(t, "AuditEvent", "location", element.getLocation(), -1); + for (int i = 0; i < element.getPolicy().size(); i++) + composeUri(t, "AuditEvent", "policy", element.getPolicy().get(i), i); + if (element.hasMedia()) + composeCoding(t, "AuditEvent", "media", element.getMedia(), -1); + if (element.hasNetwork()) + composeAuditEventAuditEventAgentNetworkComponent(t, "AuditEvent", "network", element.getNetwork(), -1); + for (int i = 0; i < element.getPurposeOfUse().size(); i++) + composeCodeableConcept(t, "AuditEvent", "purposeOfUse", element.getPurposeOfUse().get(i), i); + } + + protected void composeAuditEventAuditEventAgentNetworkComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentNetworkComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "network", name, element, index); + if (element.hasAddressElement()) + composeString(t, "AuditEvent", "address", element.getAddressElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "AuditEvent", "type", element.getTypeElement(), -1); + } + + protected void composeAuditEventAuditEventSourceComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventSourceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "source", name, element, index); + if (element.hasSiteElement()) + composeString(t, "AuditEvent", "site", element.getSiteElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "AuditEvent", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCoding(t, "AuditEvent", "type", element.getType().get(i), i); + } + + protected void composeAuditEventAuditEventEntityComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "entity", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "AuditEvent", "identifier", element.getIdentifier(), -1); + if (element.hasReference()) + composeReference(t, "AuditEvent", "reference", element.getReference(), -1); + if (element.hasType()) + composeCoding(t, "AuditEvent", "type", element.getType(), -1); + if (element.hasRole()) + composeCoding(t, "AuditEvent", "role", element.getRole(), -1); + if (element.hasLifecycle()) + composeCoding(t, "AuditEvent", "lifecycle", element.getLifecycle(), -1); + for (int i = 0; i < element.getSecurityLabel().size(); i++) + composeCoding(t, "AuditEvent", "securityLabel", element.getSecurityLabel().get(i), i); + if (element.hasNameElement()) + composeString(t, "AuditEvent", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "AuditEvent", "description", element.getDescriptionElement(), -1); + if (element.hasQueryElement()) + composeBase64Binary(t, "AuditEvent", "query", element.getQueryElement(), -1); + for (int i = 0; i < element.getDetail().size(); i++) + composeAuditEventAuditEventEntityDetailComponent(t, "AuditEvent", "detail", element.getDetail().get(i), i); + } + + protected void composeAuditEventAuditEventEntityDetailComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityDetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "detail", name, element, index); + if (element.hasTypeElement()) + composeString(t, "AuditEvent", "type", element.getTypeElement(), -1); + if (element.hasValue()) + composeType(t, "AuditEvent", "value", element.getValue(), -1); + } + + protected void composeBasic(Complex parent, String parentType, String name, Basic element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Basic", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Basic", "identifier", element.getIdentifier().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "Basic", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "Basic", "subject", element.getSubject(), -1); + if (element.hasCreatedElement()) + composeDate(t, "Basic", "created", element.getCreatedElement(), -1); + if (element.hasAuthor()) + composeReference(t, "Basic", "author", element.getAuthor(), -1); + } + + protected void composeBinary(Complex parent, String parentType, String name, Binary element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeResource(t, "Binary", name, element, index); + if (element.hasContentTypeElement()) + composeCode(t, "Binary", "contentType", element.getContentTypeElement(), -1); + if (element.hasSecurityContext()) + composeReference(t, "Binary", "securityContext", element.getSecurityContext(), -1); + if (element.hasContentElement()) + composeBase64Binary(t, "Binary", "content", element.getContentElement(), -1); + } + + protected void composeBodyStructure(Complex parent, String parentType, String name, BodyStructure element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "BodyStructure", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "BodyStructure", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "BodyStructure", "active", element.getActiveElement(), -1); + if (element.hasMorphology()) + composeCodeableConcept(t, "BodyStructure", "morphology", element.getMorphology(), -1); + if (element.hasLocation()) + composeCodeableConcept(t, "BodyStructure", "location", element.getLocation(), -1); + for (int i = 0; i < element.getLocationQualifier().size(); i++) + composeCodeableConcept(t, "BodyStructure", "locationQualifier", element.getLocationQualifier().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "BodyStructure", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getImage().size(); i++) + composeAttachment(t, "BodyStructure", "image", element.getImage().get(i), i); + if (element.hasPatient()) + composeReference(t, "BodyStructure", "patient", element.getPatient(), -1); + } + + protected void composeBundle(Complex parent, String parentType, String name, Bundle element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeResource(t, "Bundle", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Bundle", "identifier", element.getIdentifier(), -1); + if (element.hasTypeElement()) + composeEnum(t, "Bundle", "type", element.getTypeElement(), -1); + if (element.hasTotalElement()) + composeUnsignedInt(t, "Bundle", "total", element.getTotalElement(), -1); + for (int i = 0; i < element.getLink().size(); i++) + composeBundleBundleLinkComponent(t, "Bundle", "link", element.getLink().get(i), i); + for (int i = 0; i < element.getEntry().size(); i++) + composeBundleBundleEntryComponent(t, "Bundle", "entry", element.getEntry().get(i), i); + if (element.hasSignature()) + composeSignature(t, "Bundle", "signature", element.getSignature(), -1); + } + + protected void composeBundleBundleLinkComponent(Complex parent, String parentType, String name, Bundle.BundleLinkComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "link", name, element, index); + if (element.hasRelationElement()) + composeString(t, "Bundle", "relation", element.getRelationElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "Bundle", "url", element.getUrlElement(), -1); + } + + protected void composeBundleBundleEntryComponent(Complex parent, String parentType, String name, Bundle.BundleEntryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "entry", name, element, index); + for (int i = 0; i < element.getLink().size(); i++) + composeBundleBundleLinkComponent(t, "Bundle", "link", element.getLink().get(i), i); + if (element.hasFullUrlElement()) + composeUri(t, "Bundle", "fullUrl", element.getFullUrlElement(), -1); + if (element.hasResource()) + composeResource(t, "Bundle", "resource", element.getResource(), -1); + if (element.hasSearch()) + composeBundleBundleEntrySearchComponent(t, "Bundle", "search", element.getSearch(), -1); + if (element.hasRequest()) + composeBundleBundleEntryRequestComponent(t, "Bundle", "request", element.getRequest(), -1); + if (element.hasResponse()) + composeBundleBundleEntryResponseComponent(t, "Bundle", "response", element.getResponse(), -1); + } + + protected void composeBundleBundleEntrySearchComponent(Complex parent, String parentType, String name, Bundle.BundleEntrySearchComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "search", name, element, index); + if (element.hasModeElement()) + composeEnum(t, "Bundle", "mode", element.getModeElement(), -1); + if (element.hasScoreElement()) + composeDecimal(t, "Bundle", "score", element.getScoreElement(), -1); + } + + protected void composeBundleBundleEntryRequestComponent(Complex parent, String parentType, String name, Bundle.BundleEntryRequestComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "request", name, element, index); + if (element.hasMethodElement()) + composeEnum(t, "Bundle", "method", element.getMethodElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "Bundle", "url", element.getUrlElement(), -1); + if (element.hasIfNoneMatchElement()) + composeString(t, "Bundle", "ifNoneMatch", element.getIfNoneMatchElement(), -1); + if (element.hasIfModifiedSinceElement()) + composeInstant(t, "Bundle", "ifModifiedSince", element.getIfModifiedSinceElement(), -1); + if (element.hasIfMatchElement()) + composeString(t, "Bundle", "ifMatch", element.getIfMatchElement(), -1); + if (element.hasIfNoneExistElement()) + composeString(t, "Bundle", "ifNoneExist", element.getIfNoneExistElement(), -1); + } + + protected void composeBundleBundleEntryResponseComponent(Complex parent, String parentType, String name, Bundle.BundleEntryResponseComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "response", name, element, index); + if (element.hasStatusElement()) + composeString(t, "Bundle", "status", element.getStatusElement(), -1); + if (element.hasLocationElement()) + composeUri(t, "Bundle", "location", element.getLocationElement(), -1); + if (element.hasEtagElement()) + composeString(t, "Bundle", "etag", element.getEtagElement(), -1); + if (element.hasLastModifiedElement()) + composeInstant(t, "Bundle", "lastModified", element.getLastModifiedElement(), -1); + if (element.hasOutcome()) + composeResource(t, "Bundle", "outcome", element.getOutcome(), -1); + } + + protected void composeCapabilityStatement(Complex parent, String parentType, String name, CapabilityStatement element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CapabilityStatement", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "CapabilityStatement", "url", element.getUrlElement(), -1); + if (element.hasVersionElement()) + composeString(t, "CapabilityStatement", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "CapabilityStatement", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "CapabilityStatement", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "CapabilityStatement", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "CapabilityStatement", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "CapabilityStatement", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "CapabilityStatement", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "CapabilityStatement", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "CapabilityStatement", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "CapabilityStatement", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "CapabilityStatement", "copyright", element.getCopyrightElement(), -1); + if (element.hasKindElement()) + composeEnum(t, "CapabilityStatement", "kind", element.getKindElement(), -1); + for (int i = 0; i < element.getInstantiates().size(); i++) + composeUri(t, "CapabilityStatement", "instantiates", element.getInstantiates().get(i), i); + if (element.hasSoftware()) + composeCapabilityStatementCapabilityStatementSoftwareComponent(t, "CapabilityStatement", "software", element.getSoftware(), -1); + if (element.hasImplementation()) + composeCapabilityStatementCapabilityStatementImplementationComponent(t, "CapabilityStatement", "implementation", element.getImplementation(), -1); + if (element.hasFhirVersionElement()) + composeId(t, "CapabilityStatement", "fhirVersion", element.getFhirVersionElement(), -1); + if (element.hasAcceptUnknownElement()) + composeEnum(t, "CapabilityStatement", "acceptUnknown", element.getAcceptUnknownElement(), -1); + for (int i = 0; i < element.getFormat().size(); i++) + composeCode(t, "CapabilityStatement", "format", element.getFormat().get(i), i); + for (int i = 0; i < element.getPatchFormat().size(); i++) + composeCode(t, "CapabilityStatement", "patchFormat", element.getPatchFormat().get(i), i); + for (int i = 0; i < element.getImplementationGuide().size(); i++) + composeUri(t, "CapabilityStatement", "implementationGuide", element.getImplementationGuide().get(i), i); + for (int i = 0; i < element.getProfile().size(); i++) + composeReference(t, "CapabilityStatement", "profile", element.getProfile().get(i), i); + for (int i = 0; i < element.getRest().size(); i++) + composeCapabilityStatementCapabilityStatementRestComponent(t, "CapabilityStatement", "rest", element.getRest().get(i), i); + for (int i = 0; i < element.getMessaging().size(); i++) + composeCapabilityStatementCapabilityStatementMessagingComponent(t, "CapabilityStatement", "messaging", element.getMessaging().get(i), i); + for (int i = 0; i < element.getDocument().size(); i++) + composeCapabilityStatementCapabilityStatementDocumentComponent(t, "CapabilityStatement", "document", element.getDocument().get(i), i); + } + + protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementSoftwareComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "software", name, element, index); + if (element.hasNameElement()) + composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); + if (element.hasVersionElement()) + composeString(t, "CapabilityStatement", "version", element.getVersionElement(), -1); + if (element.hasReleaseDateElement()) + composeDateTime(t, "CapabilityStatement", "releaseDate", element.getReleaseDateElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementImplementationComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementImplementationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "implementation", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "CapabilityStatement", "url", element.getUrlElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementRestComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rest", name, element, index); + if (element.hasModeElement()) + composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + if (element.hasSecurity()) + composeCapabilityStatementCapabilityStatementRestSecurityComponent(t, "CapabilityStatement", "security", element.getSecurity(), -1); + for (int i = 0; i < element.getResource().size(); i++) + composeCapabilityStatementCapabilityStatementRestResourceComponent(t, "CapabilityStatement", "resource", element.getResource().get(i), i); + for (int i = 0; i < element.getInteraction().size(); i++) + composeCapabilityStatementSystemInteractionComponent(t, "CapabilityStatement", "interaction", element.getInteraction().get(i), i); + for (int i = 0; i < element.getSearchParam().size(); i++) + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatement", "searchParam", element.getSearchParam().get(i), i); + for (int i = 0; i < element.getOperation().size(); i++) + composeCapabilityStatementCapabilityStatementRestOperationComponent(t, "CapabilityStatement", "operation", element.getOperation().get(i), i); + for (int i = 0; i < element.getCompartment().size(); i++) + composeUri(t, "CapabilityStatement", "compartment", element.getCompartment().get(i), i); + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "security", name, element, index); + if (element.hasCorsElement()) + composeBoolean(t, "CapabilityStatement", "cors", element.getCorsElement(), -1); + for (int i = 0; i < element.getService().size(); i++) + composeCodeableConcept(t, "CapabilityStatement", "service", element.getService().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getCertificate().size(); i++) + composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(t, "CapabilityStatement", "certificate", element.getCertificate().get(i), i); + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "certificate", name, element, index); + if (element.hasTypeElement()) + composeCode(t, "CapabilityStatement", "type", element.getTypeElement(), -1); + if (element.hasBlobElement()) + composeBase64Binary(t, "CapabilityStatement", "blob", element.getBlobElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "resource", name, element, index); + if (element.hasTypeElement()) + composeCode(t, "CapabilityStatement", "type", element.getTypeElement(), -1); + if (element.hasProfile()) + composeReference(t, "CapabilityStatement", "profile", element.getProfile(), -1); + if (element.hasDocumentationElement()) + composeMarkdown(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + for (int i = 0; i < element.getInteraction().size(); i++) + composeCapabilityStatementResourceInteractionComponent(t, "CapabilityStatement", "interaction", element.getInteraction().get(i), i); + if (element.hasVersioningElement()) + composeEnum(t, "CapabilityStatement", "versioning", element.getVersioningElement(), -1); + if (element.hasReadHistoryElement()) + composeBoolean(t, "CapabilityStatement", "readHistory", element.getReadHistoryElement(), -1); + if (element.hasUpdateCreateElement()) + composeBoolean(t, "CapabilityStatement", "updateCreate", element.getUpdateCreateElement(), -1); + if (element.hasConditionalCreateElement()) + composeBoolean(t, "CapabilityStatement", "conditionalCreate", element.getConditionalCreateElement(), -1); + if (element.hasConditionalReadElement()) + composeEnum(t, "CapabilityStatement", "conditionalRead", element.getConditionalReadElement(), -1); + if (element.hasConditionalUpdateElement()) + composeBoolean(t, "CapabilityStatement", "conditionalUpdate", element.getConditionalUpdateElement(), -1); + if (element.hasConditionalDeleteElement()) + composeEnum(t, "CapabilityStatement", "conditionalDelete", element.getConditionalDeleteElement(), -1); + for (int i = 0; i < element.getReferencePolicy().size(); i++) + composeEnum(t, "CapabilityStatement", "referencePolicy", element.getReferencePolicy().get(i), i); + for (int i = 0; i < element.getSearchInclude().size(); i++) + composeString(t, "CapabilityStatement", "searchInclude", element.getSearchInclude().get(i), i); + for (int i = 0; i < element.getSearchRevInclude().size(); i++) + composeString(t, "CapabilityStatement", "searchRevInclude", element.getSearchRevInclude().get(i), i); + for (int i = 0; i < element.getSearchParam().size(); i++) + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatement", "searchParam", element.getSearchParam().get(i), i); + } + + protected void composeCapabilityStatementResourceInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement.ResourceInteractionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "interaction", name, element, index); + if (element.hasCodeElement()) + composeEnum(t, "CapabilityStatement", "code", element.getCodeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "searchParam", name, element, index); + if (element.hasNameElement()) + composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); + if (element.hasDefinitionElement()) + composeUri(t, "CapabilityStatement", "definition", element.getDefinitionElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "CapabilityStatement", "type", element.getTypeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeCapabilityStatementSystemInteractionComponent(Complex parent, String parentType, String name, CapabilityStatement.SystemInteractionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "interaction", name, element, index); + if (element.hasCodeElement()) + composeEnum(t, "CapabilityStatement", "code", element.getCodeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementRestOperationComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestOperationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "operation", name, element, index); + if (element.hasNameElement()) + composeString(t, "CapabilityStatement", "name", element.getNameElement(), -1); + if (element.hasDefinition()) + composeReference(t, "CapabilityStatement", "definition", element.getDefinition(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementMessagingComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "messaging", name, element, index); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(t, "CapabilityStatement", "endpoint", element.getEndpoint().get(i), i); + if (element.hasReliableCacheElement()) + composeUnsignedInt(t, "CapabilityStatement", "reliableCache", element.getReliableCacheElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + for (int i = 0; i < element.getSupportedMessage().size(); i++) + composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(t, "CapabilityStatement", "supportedMessage", element.getSupportedMessage().get(i), i); + for (int i = 0; i < element.getEvent().size(); i++) + composeCapabilityStatementCapabilityStatementMessagingEventComponent(t, "CapabilityStatement", "event", element.getEvent().get(i), i); + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "endpoint", name, element, index); + if (element.hasProtocol()) + composeCoding(t, "CapabilityStatement", "protocol", element.getProtocol(), -1); + if (element.hasAddressElement()) + composeUri(t, "CapabilityStatement", "address", element.getAddressElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "supportedMessage", name, element, index); + if (element.hasModeElement()) + composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); + if (element.hasDefinition()) + composeReference(t, "CapabilityStatement", "definition", element.getDefinition(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEventComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementMessagingEventComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "event", name, element, index); + if (element.hasCode()) + composeCoding(t, "CapabilityStatement", "code", element.getCode(), -1); + if (element.hasCategoryElement()) + composeEnum(t, "CapabilityStatement", "category", element.getCategoryElement(), -1); + if (element.hasModeElement()) + composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); + if (element.hasFocusElement()) + composeCode(t, "CapabilityStatement", "focus", element.getFocusElement(), -1); + if (element.hasRequest()) + composeReference(t, "CapabilityStatement", "request", element.getRequest(), -1); + if (element.hasResponse()) + composeReference(t, "CapabilityStatement", "response", element.getResponse(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeCapabilityStatementCapabilityStatementDocumentComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementDocumentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "document", name, element, index); + if (element.hasModeElement()) + composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1); + if (element.hasProfile()) + composeReference(t, "CapabilityStatement", "profile", element.getProfile(), -1); + } + + protected void composeCarePlan(Complex parent, String parentType, String name, CarePlan element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CarePlan", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "CarePlan", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "CarePlan", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "CarePlan", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getReplaces().size(); i++) + composeReference(t, "CarePlan", "replaces", element.getReplaces().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "CarePlan", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1); + if (element.hasIntentElement()) + composeEnum(t, "CarePlan", "intent", element.getIntentElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "CarePlan", "category", element.getCategory().get(i), i); + if (element.hasTitleElement()) + composeString(t, "CarePlan", "title", element.getTitleElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1); + if (element.hasSubject()) + composeReference(t, "CarePlan", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "CarePlan", "context", element.getContext(), -1); + if (element.hasPeriod()) + composePeriod(t, "CarePlan", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getAuthor().size(); i++) + composeReference(t, "CarePlan", "author", element.getAuthor().get(i), i); + for (int i = 0; i < element.getCareTeam().size(); i++) + composeReference(t, "CarePlan", "careTeam", element.getCareTeam().get(i), i); + for (int i = 0; i < element.getAddresses().size(); i++) + composeReference(t, "CarePlan", "addresses", element.getAddresses().get(i), i); + for (int i = 0; i < element.getSupportingInfo().size(); i++) + composeReference(t, "CarePlan", "supportingInfo", element.getSupportingInfo().get(i), i); + for (int i = 0; i < element.getGoal().size(); i++) + composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i); + for (int i = 0; i < element.getActivity().size(); i++) + composeCarePlanCarePlanActivityComponent(t, "CarePlan", "activity", element.getActivity().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "CarePlan", "note", element.getNote().get(i), i); + } + + protected void composeCarePlanCarePlanActivityComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "activity", name, element, index); + for (int i = 0; i < element.getOutcomeCodeableConcept().size(); i++) + composeCodeableConcept(t, "CarePlan", "outcomeCodeableConcept", element.getOutcomeCodeableConcept().get(i), i); + for (int i = 0; i < element.getOutcomeReference().size(); i++) + composeReference(t, "CarePlan", "outcomeReference", element.getOutcomeReference().get(i), i); + for (int i = 0; i < element.getProgress().size(); i++) + composeAnnotation(t, "CarePlan", "progress", element.getProgress().get(i), i); + if (element.hasReference()) + composeReference(t, "CarePlan", "reference", element.getReference(), -1); + if (element.hasDetail()) + composeCarePlanCarePlanActivityDetailComponent(t, "CarePlan", "detail", element.getDetail(), -1); + } + + protected void composeCarePlanCarePlanActivityDetailComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityDetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "detail", name, element, index); + if (element.hasKindElement()) + composeEnum(t, "CarePlan", "kind", element.getKindElement(), -1); + if (element.hasDefinition()) + composeReference(t, "CarePlan", "definition", element.getDefinition(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "CarePlan", "code", element.getCode(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "CarePlan", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "CarePlan", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getGoal().size(); i++) + composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1); + if (element.hasStatusReasonElement()) + composeString(t, "CarePlan", "statusReason", element.getStatusReasonElement(), -1); + if (element.hasProhibitedElement()) + composeBoolean(t, "CarePlan", "prohibited", element.getProhibitedElement(), -1); + if (element.hasScheduled()) + composeType(t, "CarePlan", "scheduled", element.getScheduled(), -1); + if (element.hasLocation()) + composeReference(t, "CarePlan", "location", element.getLocation(), -1); + for (int i = 0; i < element.getPerformer().size(); i++) + composeReference(t, "CarePlan", "performer", element.getPerformer().get(i), i); + if (element.hasProduct()) + composeType(t, "CarePlan", "product", element.getProduct(), -1); + if (element.hasDailyAmount()) + composeQuantity(t, "CarePlan", "dailyAmount", element.getDailyAmount(), -1); + if (element.hasQuantity()) + composeQuantity(t, "CarePlan", "quantity", element.getQuantity(), -1); + if (element.hasDescriptionElement()) + composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1); + } + + protected void composeCareTeam(Complex parent, String parentType, String name, CareTeam element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CareTeam", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "CareTeam", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "CareTeam", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "CareTeam", "category", element.getCategory().get(i), i); + if (element.hasNameElement()) + composeString(t, "CareTeam", "name", element.getNameElement(), -1); + if (element.hasSubject()) + composeReference(t, "CareTeam", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "CareTeam", "context", element.getContext(), -1); + if (element.hasPeriod()) + composePeriod(t, "CareTeam", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getParticipant().size(); i++) + composeCareTeamCareTeamParticipantComponent(t, "CareTeam", "participant", element.getParticipant().get(i), i); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "CareTeam", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "CareTeam", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getManagingOrganization().size(); i++) + composeReference(t, "CareTeam", "managingOrganization", element.getManagingOrganization().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "CareTeam", "telecom", element.getTelecom().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "CareTeam", "note", element.getNote().get(i), i); + } + + protected void composeCareTeamCareTeamParticipantComponent(Complex parent, String parentType, String name, CareTeam.CareTeamParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + if (element.hasRole()) + composeCodeableConcept(t, "CareTeam", "role", element.getRole(), -1); + if (element.hasMember()) + composeReference(t, "CareTeam", "member", element.getMember(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "CareTeam", "onBehalfOf", element.getOnBehalfOf(), -1); + if (element.hasPeriod()) + composePeriod(t, "CareTeam", "period", element.getPeriod(), -1); + } + + protected void composeCatalogEntry(Complex parent, String parentType, String name, CatalogEntry element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CatalogEntry", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "CatalogEntry", "type", element.getType(), -1); + if (element.hasPurpose()) + composeCodeableConcept(t, "CatalogEntry", "purpose", element.getPurpose(), -1); + if (element.hasReferencedItem()) + composeReference(t, "CatalogEntry", "referencedItem", element.getReferencedItem(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "CatalogEntry", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getAdditionalIdentifier().size(); i++) + composeIdentifier(t, "CatalogEntry", "additionalIdentifier", element.getAdditionalIdentifier().get(i), i); + for (int i = 0; i < element.getClassification().size(); i++) + composeIdentifier(t, "CatalogEntry", "classification", element.getClassification().get(i), i); + if (element.hasStatus()) + composeCodeableConcept(t, "CatalogEntry", "status", element.getStatus(), -1); + if (element.hasValidityPeriod()) + composePeriod(t, "CatalogEntry", "validityPeriod", element.getValidityPeriod(), -1); + if (element.hasLastUpdatedElement()) + composeDateTime(t, "CatalogEntry", "lastUpdated", element.getLastUpdatedElement(), -1); + for (int i = 0; i < element.getAdditionalCharacteristic().size(); i++) + composeCodeableConcept(t, "CatalogEntry", "additionalCharacteristic", element.getAdditionalCharacteristic().get(i), i); + for (int i = 0; i < element.getAdditionalClassification().size(); i++) + composeCodeableConcept(t, "CatalogEntry", "additionalClassification", element.getAdditionalClassification().get(i), i); + for (int i = 0; i < element.getRelatedItem().size(); i++) + composeCatalogEntryCatalogEntryRelatedItemComponent(t, "CatalogEntry", "relatedItem", element.getRelatedItem().get(i), i); + } + + protected void composeCatalogEntryCatalogEntryRelatedItemComponent(Complex parent, String parentType, String name, CatalogEntry.CatalogEntryRelatedItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "relatedItem", name, element, index); + if (element.hasRelationtype()) + composeCodeableConcept(t, "CatalogEntry", "relationtype", element.getRelationtype(), -1); + if (element.hasType()) + composeCodeableConcept(t, "CatalogEntry", "type", element.getType(), -1); + if (element.hasItem()) + composeReference(t, "CatalogEntry", "item", element.getItem(), -1); + } + + protected void composeChargeItem(Complex parent, String parentType, String name, ChargeItem element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ChargeItem", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "ChargeItem", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getDefinition().size(); i++) + composeUri(t, "ChargeItem", "definition", element.getDefinition().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ChargeItem", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "ChargeItem", "partOf", element.getPartOf().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "ChargeItem", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "ChargeItem", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "ChargeItem", "context", element.getContext(), -1); + if (element.hasOccurrence()) + composeType(t, "ChargeItem", "occurrence", element.getOccurrence(), -1); + for (int i = 0; i < element.getParticipant().size(); i++) + composeChargeItemChargeItemParticipantComponent(t, "ChargeItem", "participant", element.getParticipant().get(i), i); + if (element.hasPerformingOrganization()) + composeReference(t, "ChargeItem", "performingOrganization", element.getPerformingOrganization(), -1); + if (element.hasRequestingOrganization()) + composeReference(t, "ChargeItem", "requestingOrganization", element.getRequestingOrganization(), -1); + if (element.hasQuantity()) + composeQuantity(t, "ChargeItem", "quantity", element.getQuantity(), -1); + for (int i = 0; i < element.getBodysite().size(); i++) + composeCodeableConcept(t, "ChargeItem", "bodysite", element.getBodysite().get(i), i); + if (element.hasFactorOverrideElement()) + composeDecimal(t, "ChargeItem", "factorOverride", element.getFactorOverrideElement(), -1); + if (element.hasPriceOverride()) + composeMoney(t, "ChargeItem", "priceOverride", element.getPriceOverride(), -1); + if (element.hasOverrideReasonElement()) + composeString(t, "ChargeItem", "overrideReason", element.getOverrideReasonElement(), -1); + if (element.hasEnterer()) + composeReference(t, "ChargeItem", "enterer", element.getEnterer(), -1); + if (element.hasEnteredDateElement()) + composeDateTime(t, "ChargeItem", "enteredDate", element.getEnteredDateElement(), -1); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "ChargeItem", "reason", element.getReason().get(i), i); + for (int i = 0; i < element.getService().size(); i++) + composeReference(t, "ChargeItem", "service", element.getService().get(i), i); + for (int i = 0; i < element.getAccount().size(); i++) + composeReference(t, "ChargeItem", "account", element.getAccount().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "ChargeItem", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getSupportingInformation().size(); i++) + composeReference(t, "ChargeItem", "supportingInformation", element.getSupportingInformation().get(i), i); + } + + protected void composeChargeItemChargeItemParticipantComponent(Complex parent, String parentType, String name, ChargeItem.ChargeItemParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + if (element.hasRole()) + composeCodeableConcept(t, "ChargeItem", "role", element.getRole(), -1); + if (element.hasActor()) + composeReference(t, "ChargeItem", "actor", element.getActor(), -1); + } + + protected void composeClaim(Complex parent, String parentType, String name, Claim element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Claim", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Claim", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Claim", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Claim", "type", element.getType(), -1); + for (int i = 0; i < element.getSubType().size(); i++) + composeCodeableConcept(t, "Claim", "subType", element.getSubType().get(i), i); + if (element.hasUseElement()) + composeEnum(t, "Claim", "use", element.getUseElement(), -1); + if (element.hasPatient()) + composeReference(t, "Claim", "patient", element.getPatient(), -1); + if (element.hasBillablePeriod()) + composePeriod(t, "Claim", "billablePeriod", element.getBillablePeriod(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "Claim", "created", element.getCreatedElement(), -1); + if (element.hasEnterer()) + composeReference(t, "Claim", "enterer", element.getEnterer(), -1); + if (element.hasInsurer()) + composeReference(t, "Claim", "insurer", element.getInsurer(), -1); + if (element.hasProvider()) + composeReference(t, "Claim", "provider", element.getProvider(), -1); + if (element.hasOrganization()) + composeReference(t, "Claim", "organization", element.getOrganization(), -1); + if (element.hasPriority()) + composeCodeableConcept(t, "Claim", "priority", element.getPriority(), -1); + if (element.hasFundsReserve()) + composeCodeableConcept(t, "Claim", "fundsReserve", element.getFundsReserve(), -1); + for (int i = 0; i < element.getRelated().size(); i++) + composeClaimRelatedClaimComponent(t, "Claim", "related", element.getRelated().get(i), i); + if (element.hasPrescription()) + composeReference(t, "Claim", "prescription", element.getPrescription(), -1); + if (element.hasOriginalPrescription()) + composeReference(t, "Claim", "originalPrescription", element.getOriginalPrescription(), -1); + if (element.hasPayee()) + composeClaimPayeeComponent(t, "Claim", "payee", element.getPayee(), -1); + if (element.hasReferral()) + composeReference(t, "Claim", "referral", element.getReferral(), -1); + if (element.hasFacility()) + composeReference(t, "Claim", "facility", element.getFacility(), -1); + for (int i = 0; i < element.getCareTeam().size(); i++) + composeClaimCareTeamComponent(t, "Claim", "careTeam", element.getCareTeam().get(i), i); + for (int i = 0; i < element.getInformation().size(); i++) + composeClaimSpecialConditionComponent(t, "Claim", "information", element.getInformation().get(i), i); + for (int i = 0; i < element.getDiagnosis().size(); i++) + composeClaimDiagnosisComponent(t, "Claim", "diagnosis", element.getDiagnosis().get(i), i); + for (int i = 0; i < element.getProcedure().size(); i++) + composeClaimProcedureComponent(t, "Claim", "procedure", element.getProcedure().get(i), i); + for (int i = 0; i < element.getInsurance().size(); i++) + composeClaimInsuranceComponent(t, "Claim", "insurance", element.getInsurance().get(i), i); + if (element.hasAccident()) + composeClaimAccidentComponent(t, "Claim", "accident", element.getAccident(), -1); + if (element.hasEmploymentImpacted()) + composePeriod(t, "Claim", "employmentImpacted", element.getEmploymentImpacted(), -1); + if (element.hasHospitalization()) + composePeriod(t, "Claim", "hospitalization", element.getHospitalization(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeClaimItemComponent(t, "Claim", "item", element.getItem().get(i), i); + if (element.hasTotal()) + composeMoney(t, "Claim", "total", element.getTotal(), -1); + } + + protected void composeClaimRelatedClaimComponent(Complex parent, String parentType, String name, Claim.RelatedClaimComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "related", name, element, index); + if (element.hasClaim()) + composeReference(t, "Claim", "claim", element.getClaim(), -1); + if (element.hasRelationship()) + composeCodeableConcept(t, "Claim", "relationship", element.getRelationship(), -1); + if (element.hasReference()) + composeIdentifier(t, "Claim", "reference", element.getReference(), -1); + } + + protected void composeClaimPayeeComponent(Complex parent, String parentType, String name, Claim.PayeeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "payee", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "Claim", "type", element.getType(), -1); + if (element.hasResource()) + composeCoding(t, "Claim", "resource", element.getResource(), -1); + if (element.hasParty()) + composeReference(t, "Claim", "party", element.getParty(), -1); + } + + protected void composeClaimCareTeamComponent(Complex parent, String parentType, String name, Claim.CareTeamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "careTeam", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasProvider()) + composeReference(t, "Claim", "provider", element.getProvider(), -1); + if (element.hasResponsibleElement()) + composeBoolean(t, "Claim", "responsible", element.getResponsibleElement(), -1); + if (element.hasRole()) + composeCodeableConcept(t, "Claim", "role", element.getRole(), -1); + if (element.hasQualification()) + composeCodeableConcept(t, "Claim", "qualification", element.getQualification(), -1); + } + + protected void composeClaimSpecialConditionComponent(Complex parent, String parentType, String name, Claim.SpecialConditionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "information", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Claim", "code", element.getCode(), -1); + if (element.hasTiming()) + composeType(t, "Claim", "timing", element.getTiming(), -1); + if (element.hasValue()) + composeType(t, "Claim", "value", element.getValue(), -1); + if (element.hasReason()) + composeCodeableConcept(t, "Claim", "reason", element.getReason(), -1); + } + + protected void composeClaimDiagnosisComponent(Complex parent, String parentType, String name, Claim.DiagnosisComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "diagnosis", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasDiagnosis()) + composeType(t, "Claim", "diagnosis", element.getDiagnosis(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "Claim", "type", element.getType().get(i), i); + if (element.hasPackageCode()) + composeCodeableConcept(t, "Claim", "packageCode", element.getPackageCode(), -1); + } + + protected void composeClaimProcedureComponent(Complex parent, String parentType, String name, Claim.ProcedureComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "procedure", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "Claim", "date", element.getDateElement(), -1); + if (element.hasProcedure()) + composeType(t, "Claim", "procedure", element.getProcedure(), -1); + } + + protected void composeClaimInsuranceComponent(Complex parent, String parentType, String name, Claim.InsuranceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "insurance", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasFocalElement()) + composeBoolean(t, "Claim", "focal", element.getFocalElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "Claim", "identifier", element.getIdentifier(), -1); + if (element.hasCoverage()) + composeReference(t, "Claim", "coverage", element.getCoverage(), -1); + if (element.hasBusinessArrangementElement()) + composeString(t, "Claim", "businessArrangement", element.getBusinessArrangementElement(), -1); + for (int i = 0; i < element.getPreAuthRef().size(); i++) + composeString(t, "Claim", "preAuthRef", element.getPreAuthRef().get(i), i); + if (element.hasClaimResponse()) + composeReference(t, "Claim", "claimResponse", element.getClaimResponse(), -1); + } + + protected void composeClaimAccidentComponent(Complex parent, String parentType, String name, Claim.AccidentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "accident", name, element, index); + if (element.hasDateElement()) + composeDate(t, "Claim", "date", element.getDateElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Claim", "type", element.getType(), -1); + if (element.hasLocation()) + composeType(t, "Claim", "location", element.getLocation(), -1); + } + + protected void composeClaimItemComponent(Complex parent, String parentType, String name, Claim.ItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + for (int i = 0; i < element.getCareTeamLinkId().size(); i++) + composePositiveInt(t, "Claim", "careTeamLinkId", element.getCareTeamLinkId().get(i), i); + for (int i = 0; i < element.getDiagnosisLinkId().size(); i++) + composePositiveInt(t, "Claim", "diagnosisLinkId", element.getDiagnosisLinkId().get(i), i); + for (int i = 0; i < element.getProcedureLinkId().size(); i++) + composePositiveInt(t, "Claim", "procedureLinkId", element.getProcedureLinkId().get(i), i); + for (int i = 0; i < element.getInformationLinkId().size(); i++) + composePositiveInt(t, "Claim", "informationLinkId", element.getInformationLinkId().get(i), i); + if (element.hasRevenue()) + composeCodeableConcept(t, "Claim", "revenue", element.getRevenue(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); + if (element.hasService()) + composeCodeableConcept(t, "Claim", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "Claim", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getProgramCode().size(); i++) + composeCodeableConcept(t, "Claim", "programCode", element.getProgramCode().get(i), i); + if (element.hasServiced()) + composeType(t, "Claim", "serviced", element.getServiced(), -1); + if (element.hasLocation()) + composeType(t, "Claim", "location", element.getLocation(), -1); + if (element.hasQuantity()) + composeQuantity(t, "Claim", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "Claim", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "Claim", "factor", element.getFactorElement(), -1); + if (element.hasNet()) + composeMoney(t, "Claim", "net", element.getNet(), -1); + for (int i = 0; i < element.getUdi().size(); i++) + composeReference(t, "Claim", "udi", element.getUdi().get(i), i); + if (element.hasBodySite()) + composeCodeableConcept(t, "Claim", "bodySite", element.getBodySite(), -1); + for (int i = 0; i < element.getSubSite().size(); i++) + composeCodeableConcept(t, "Claim", "subSite", element.getSubSite().get(i), i); + for (int i = 0; i < element.getEncounter().size(); i++) + composeReference(t, "Claim", "encounter", element.getEncounter().get(i), i); + for (int i = 0; i < element.getDetail().size(); i++) + composeClaimDetailComponent(t, "Claim", "detail", element.getDetail().get(i), i); + } + + protected void composeClaimDetailComponent(Complex parent, String parentType, String name, Claim.DetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "detail", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasRevenue()) + composeCodeableConcept(t, "Claim", "revenue", element.getRevenue(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); + if (element.hasService()) + composeCodeableConcept(t, "Claim", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "Claim", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getProgramCode().size(); i++) + composeCodeableConcept(t, "Claim", "programCode", element.getProgramCode().get(i), i); + if (element.hasQuantity()) + composeQuantity(t, "Claim", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "Claim", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "Claim", "factor", element.getFactorElement(), -1); + if (element.hasNet()) + composeMoney(t, "Claim", "net", element.getNet(), -1); + for (int i = 0; i < element.getUdi().size(); i++) + composeReference(t, "Claim", "udi", element.getUdi().get(i), i); + for (int i = 0; i < element.getSubDetail().size(); i++) + composeClaimSubDetailComponent(t, "Claim", "subDetail", element.getSubDetail().get(i), i); + } + + protected void composeClaimSubDetailComponent(Complex parent, String parentType, String name, Claim.SubDetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "subDetail", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1); + if (element.hasRevenue()) + composeCodeableConcept(t, "Claim", "revenue", element.getRevenue(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "Claim", "category", element.getCategory(), -1); + if (element.hasService()) + composeCodeableConcept(t, "Claim", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "Claim", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getProgramCode().size(); i++) + composeCodeableConcept(t, "Claim", "programCode", element.getProgramCode().get(i), i); + if (element.hasQuantity()) + composeQuantity(t, "Claim", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "Claim", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "Claim", "factor", element.getFactorElement(), -1); + if (element.hasNet()) + composeMoney(t, "Claim", "net", element.getNet(), -1); + for (int i = 0; i < element.getUdi().size(); i++) + composeReference(t, "Claim", "udi", element.getUdi().get(i), i); + } + + protected void composeClaimResponse(Complex parent, String parentType, String name, ClaimResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ClaimResponse", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ClaimResponse", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ClaimResponse", "status", element.getStatusElement(), -1); + if (element.hasPatient()) + composeReference(t, "ClaimResponse", "patient", element.getPatient(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "ClaimResponse", "created", element.getCreatedElement(), -1); + if (element.hasInsurer()) + composeReference(t, "ClaimResponse", "insurer", element.getInsurer(), -1); + if (element.hasRequestProvider()) + composeReference(t, "ClaimResponse", "requestProvider", element.getRequestProvider(), -1); + if (element.hasRequestOrganization()) + composeReference(t, "ClaimResponse", "requestOrganization", element.getRequestOrganization(), -1); + if (element.hasRequest()) + composeReference(t, "ClaimResponse", "request", element.getRequest(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "ClaimResponse", "outcome", element.getOutcomeElement(), -1); + if (element.hasDispositionElement()) + composeString(t, "ClaimResponse", "disposition", element.getDispositionElement(), -1); + if (element.hasPayeeType()) + composeCodeableConcept(t, "ClaimResponse", "payeeType", element.getPayeeType(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeClaimResponseItemComponent(t, "ClaimResponse", "item", element.getItem().get(i), i); + for (int i = 0; i < element.getAddItem().size(); i++) + composeClaimResponseAddedItemComponent(t, "ClaimResponse", "addItem", element.getAddItem().get(i), i); + for (int i = 0; i < element.getError().size(); i++) + composeClaimResponseErrorComponent(t, "ClaimResponse", "error", element.getError().get(i), i); + if (element.hasTotalCost()) + composeMoney(t, "ClaimResponse", "totalCost", element.getTotalCost(), -1); + if (element.hasUnallocDeductable()) + composeMoney(t, "ClaimResponse", "unallocDeductable", element.getUnallocDeductable(), -1); + if (element.hasTotalBenefit()) + composeMoney(t, "ClaimResponse", "totalBenefit", element.getTotalBenefit(), -1); + if (element.hasPayment()) + composeClaimResponsePaymentComponent(t, "ClaimResponse", "payment", element.getPayment(), -1); + if (element.hasReserved()) + composeCoding(t, "ClaimResponse", "reserved", element.getReserved(), -1); + if (element.hasForm()) + composeCodeableConcept(t, "ClaimResponse", "form", element.getForm(), -1); + for (int i = 0; i < element.getProcessNote().size(); i++) + composeClaimResponseNoteComponent(t, "ClaimResponse", "processNote", element.getProcessNote().get(i), i); + for (int i = 0; i < element.getCommunicationRequest().size(); i++) + composeReference(t, "ClaimResponse", "communicationRequest", element.getCommunicationRequest().get(i), i); + for (int i = 0; i < element.getInsurance().size(); i++) + composeClaimResponseInsuranceComponent(t, "ClaimResponse", "insurance", element.getInsurance().get(i), i); + } + + protected void composeClaimResponseItemComponent(Complex parent, String parentType, String name, ClaimResponse.ItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasSequenceLinkIdElement()) + composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); + for (int i = 0; i < element.getDetail().size(); i++) + composeClaimResponseItemDetailComponent(t, "ClaimResponse", "detail", element.getDetail().get(i), i); + } + + protected void composeClaimResponseAdjudicationComponent(Complex parent, String parentType, String name, ClaimResponse.AdjudicationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "adjudication", name, element, index); + if (element.hasCategory()) + composeCodeableConcept(t, "ClaimResponse", "category", element.getCategory(), -1); + if (element.hasReason()) + composeCodeableConcept(t, "ClaimResponse", "reason", element.getReason(), -1); + if (element.hasAmount()) + composeMoney(t, "ClaimResponse", "amount", element.getAmount(), -1); + if (element.hasValueElement()) + composeDecimal(t, "ClaimResponse", "value", element.getValueElement(), -1); + } + + protected void composeClaimResponseItemDetailComponent(Complex parent, String parentType, String name, ClaimResponse.ItemDetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "detail", name, element, index); + if (element.hasSequenceLinkIdElement()) + composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); + for (int i = 0; i < element.getSubDetail().size(); i++) + composeClaimResponseSubDetailComponent(t, "ClaimResponse", "subDetail", element.getSubDetail().get(i), i); + } + + protected void composeClaimResponseSubDetailComponent(Complex parent, String parentType, String name, ClaimResponse.SubDetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "subDetail", name, element, index); + if (element.hasSequenceLinkIdElement()) + composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); + } + + protected void composeClaimResponseAddedItemComponent(Complex parent, String parentType, String name, ClaimResponse.AddedItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "addItem", name, element, index); + for (int i = 0; i < element.getSequenceLinkId().size(); i++) + composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkId().get(i), i); + for (int i = 0; i < element.getDetailSequenceLinkId().size(); i++) + composePositiveInt(t, "ClaimResponse", "detailSequenceLinkId", element.getDetailSequenceLinkId().get(i), i); + for (int i = 0; i < element.getSubdetailSequenceLinkId().size(); i++) + composePositiveInt(t, "ClaimResponse", "subdetailSequenceLinkId", element.getSubdetailSequenceLinkId().get(i), i); + if (element.hasService()) + composeCodeableConcept(t, "ClaimResponse", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "ClaimResponse", "modifier", element.getModifier().get(i), i); + if (element.hasFee()) + composeMoney(t, "ClaimResponse", "fee", element.getFee(), -1); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i); + } + + protected void composeClaimResponseErrorComponent(Complex parent, String parentType, String name, ClaimResponse.ErrorComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "error", name, element, index); + if (element.hasSequenceLinkIdElement()) + composePositiveInt(t, "ClaimResponse", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); + if (element.hasDetailSequenceLinkIdElement()) + composePositiveInt(t, "ClaimResponse", "detailSequenceLinkId", element.getDetailSequenceLinkIdElement(), -1); + if (element.hasSubdetailSequenceLinkIdElement()) + composePositiveInt(t, "ClaimResponse", "subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "ClaimResponse", "code", element.getCode(), -1); + } + + protected void composeClaimResponsePaymentComponent(Complex parent, String parentType, String name, ClaimResponse.PaymentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "payment", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "ClaimResponse", "type", element.getType(), -1); + if (element.hasAdjustment()) + composeMoney(t, "ClaimResponse", "adjustment", element.getAdjustment(), -1); + if (element.hasAdjustmentReason()) + composeCodeableConcept(t, "ClaimResponse", "adjustmentReason", element.getAdjustmentReason(), -1); + if (element.hasDateElement()) + composeDate(t, "ClaimResponse", "date", element.getDateElement(), -1); + if (element.hasAmount()) + composeMoney(t, "ClaimResponse", "amount", element.getAmount(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "ClaimResponse", "identifier", element.getIdentifier(), -1); + } + + protected void composeClaimResponseNoteComponent(Complex parent, String parentType, String name, ClaimResponse.NoteComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "processNote", name, element, index); + if (element.hasNumberElement()) + composePositiveInt(t, "ClaimResponse", "number", element.getNumberElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "ClaimResponse", "type", element.getTypeElement(), -1); + if (element.hasTextElement()) + composeString(t, "ClaimResponse", "text", element.getTextElement(), -1); + if (element.hasLanguage()) + composeCodeableConcept(t, "ClaimResponse", "language", element.getLanguage(), -1); + } + + protected void composeClaimResponseInsuranceComponent(Complex parent, String parentType, String name, ClaimResponse.InsuranceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "insurance", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ClaimResponse", "sequence", element.getSequenceElement(), -1); + if (element.hasFocalElement()) + composeBoolean(t, "ClaimResponse", "focal", element.getFocalElement(), -1); + if (element.hasCoverage()) + composeReference(t, "ClaimResponse", "coverage", element.getCoverage(), -1); + if (element.hasBusinessArrangementElement()) + composeString(t, "ClaimResponse", "businessArrangement", element.getBusinessArrangementElement(), -1); + for (int i = 0; i < element.getPreAuthRef().size(); i++) + composeString(t, "ClaimResponse", "preAuthRef", element.getPreAuthRef().get(i), i); + if (element.hasClaimResponse()) + composeReference(t, "ClaimResponse", "claimResponse", element.getClaimResponse(), -1); + } + + protected void composeClinicalImpression(Complex parent, String parentType, String name, ClinicalImpression element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ClinicalImpression", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ClinicalImpression", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ClinicalImpression", "status", element.getStatusElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "ClinicalImpression", "code", element.getCode(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ClinicalImpression", "description", element.getDescriptionElement(), -1); + if (element.hasSubject()) + composeReference(t, "ClinicalImpression", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "ClinicalImpression", "context", element.getContext(), -1); + if (element.hasEffective()) + composeType(t, "ClinicalImpression", "effective", element.getEffective(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ClinicalImpression", "date", element.getDateElement(), -1); + if (element.hasAssessor()) + composeReference(t, "ClinicalImpression", "assessor", element.getAssessor(), -1); + if (element.hasPrevious()) + composeReference(t, "ClinicalImpression", "previous", element.getPrevious(), -1); + for (int i = 0; i < element.getProblem().size(); i++) + composeReference(t, "ClinicalImpression", "problem", element.getProblem().get(i), i); + for (int i = 0; i < element.getInvestigation().size(); i++) + composeClinicalImpressionClinicalImpressionInvestigationComponent(t, "ClinicalImpression", "investigation", element.getInvestigation().get(i), i); + for (int i = 0; i < element.getProtocol().size(); i++) + composeUri(t, "ClinicalImpression", "protocol", element.getProtocol().get(i), i); + if (element.hasSummaryElement()) + composeString(t, "ClinicalImpression", "summary", element.getSummaryElement(), -1); + for (int i = 0; i < element.getFinding().size(); i++) + composeClinicalImpressionClinicalImpressionFindingComponent(t, "ClinicalImpression", "finding", element.getFinding().get(i), i); + for (int i = 0; i < element.getPrognosisCodeableConcept().size(); i++) + composeCodeableConcept(t, "ClinicalImpression", "prognosisCodeableConcept", element.getPrognosisCodeableConcept().get(i), i); + for (int i = 0; i < element.getPrognosisReference().size(); i++) + composeReference(t, "ClinicalImpression", "prognosisReference", element.getPrognosisReference().get(i), i); + for (int i = 0; i < element.getAction().size(); i++) + composeReference(t, "ClinicalImpression", "action", element.getAction().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "ClinicalImpression", "note", element.getNote().get(i), i); + } + + protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(Complex parent, String parentType, String name, ClinicalImpression.ClinicalImpressionInvestigationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "investigation", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "ClinicalImpression", "code", element.getCode(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeReference(t, "ClinicalImpression", "item", element.getItem().get(i), i); + } + + protected void composeClinicalImpressionClinicalImpressionFindingComponent(Complex parent, String parentType, String name, ClinicalImpression.ClinicalImpressionFindingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "finding", name, element, index); + if (element.hasItem()) + composeType(t, "ClinicalImpression", "item", element.getItem(), -1); + if (element.hasBasisElement()) + composeString(t, "ClinicalImpression", "basis", element.getBasisElement(), -1); + } + + protected void composeCodeSystem(Complex parent, String parentType, String name, CodeSystem element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CodeSystem", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "CodeSystem", "url", element.getUrlElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "CodeSystem", "identifier", element.getIdentifier(), -1); + if (element.hasVersionElement()) + composeString(t, "CodeSystem", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "CodeSystem", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "CodeSystem", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "CodeSystem", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "CodeSystem", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "CodeSystem", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "CodeSystem", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "CodeSystem", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "CodeSystem", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "CodeSystem", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "CodeSystem", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "CodeSystem", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "CodeSystem", "copyright", element.getCopyrightElement(), -1); + if (element.hasCaseSensitiveElement()) + composeBoolean(t, "CodeSystem", "caseSensitive", element.getCaseSensitiveElement(), -1); + if (element.hasValueSetElement()) + composeUri(t, "CodeSystem", "valueSet", element.getValueSetElement(), -1); + if (element.hasHierarchyMeaningElement()) + composeEnum(t, "CodeSystem", "hierarchyMeaning", element.getHierarchyMeaningElement(), -1); + if (element.hasCompositionalElement()) + composeBoolean(t, "CodeSystem", "compositional", element.getCompositionalElement(), -1); + if (element.hasVersionNeededElement()) + composeBoolean(t, "CodeSystem", "versionNeeded", element.getVersionNeededElement(), -1); + if (element.hasContentElement()) + composeEnum(t, "CodeSystem", "content", element.getContentElement(), -1); + if (element.hasCountElement()) + composeUnsignedInt(t, "CodeSystem", "count", element.getCountElement(), -1); + for (int i = 0; i < element.getFilter().size(); i++) + composeCodeSystemCodeSystemFilterComponent(t, "CodeSystem", "filter", element.getFilter().get(i), i); + for (int i = 0; i < element.getProperty().size(); i++) + composeCodeSystemPropertyComponent(t, "CodeSystem", "property", element.getProperty().get(i), i); + for (int i = 0; i < element.getConcept().size(); i++) + composeCodeSystemConceptDefinitionComponent(t, "CodeSystem", "concept", element.getConcept().get(i), i); + } + + protected void composeCodeSystemCodeSystemFilterComponent(Complex parent, String parentType, String name, CodeSystem.CodeSystemFilterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "filter", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "CodeSystem", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getOperator().size(); i++) + composeEnum(t, "CodeSystem", "operator", element.getOperator().get(i), i); + if (element.hasValueElement()) + composeString(t, "CodeSystem", "value", element.getValueElement(), -1); + } + + protected void composeCodeSystemPropertyComponent(Complex parent, String parentType, String name, CodeSystem.PropertyComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "property", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); + if (element.hasUriElement()) + composeUri(t, "CodeSystem", "uri", element.getUriElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "CodeSystem", "description", element.getDescriptionElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "CodeSystem", "type", element.getTypeElement(), -1); + } + + protected void composeCodeSystemConceptDefinitionComponent(Complex parent, String parentType, String name, CodeSystem.ConceptDefinitionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "concept", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "CodeSystem", "display", element.getDisplayElement(), -1); + if (element.hasDefinitionElement()) + composeString(t, "CodeSystem", "definition", element.getDefinitionElement(), -1); + for (int i = 0; i < element.getDesignation().size(); i++) + composeCodeSystemConceptDefinitionDesignationComponent(t, "CodeSystem", "designation", element.getDesignation().get(i), i); + for (int i = 0; i < element.getProperty().size(); i++) + composeCodeSystemConceptPropertyComponent(t, "CodeSystem", "property", element.getProperty().get(i), i); + for (int i = 0; i < element.getConcept().size(); i++) + composeCodeSystemConceptDefinitionComponent(t, "CodeSystem", "concept", element.getConcept().get(i), i); + } + + protected void composeCodeSystemConceptDefinitionDesignationComponent(Complex parent, String parentType, String name, CodeSystem.ConceptDefinitionDesignationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "designation", name, element, index); + if (element.hasLanguageElement()) + composeCode(t, "CodeSystem", "language", element.getLanguageElement(), -1); + if (element.hasUse()) + composeCoding(t, "CodeSystem", "use", element.getUse(), -1); + if (element.hasValueElement()) + composeString(t, "CodeSystem", "value", element.getValueElement(), -1); + } + + protected void composeCodeSystemConceptPropertyComponent(Complex parent, String parentType, String name, CodeSystem.ConceptPropertyComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "property", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1); + if (element.hasValue()) + composeType(t, "CodeSystem", "value", element.getValue(), -1); + } + + protected void composeCommunication(Complex parent, String parentType, String name, Communication element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Communication", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Communication", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "Communication", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "Communication", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "Communication", "partOf", element.getPartOf().get(i), i); + for (int i = 0; i < element.getInResponseTo().size(); i++) + composeReference(t, "Communication", "inResponseTo", element.getInResponseTo().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Communication", "status", element.getStatusElement(), -1); + if (element.hasNotDoneElement()) + composeBoolean(t, "Communication", "notDone", element.getNotDoneElement(), -1); + if (element.hasNotDoneReason()) + composeCodeableConcept(t, "Communication", "notDoneReason", element.getNotDoneReason(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Communication", "category", element.getCategory().get(i), i); + if (element.hasPriorityElement()) + composeEnum(t, "Communication", "priority", element.getPriorityElement(), -1); + for (int i = 0; i < element.getMedium().size(); i++) + composeCodeableConcept(t, "Communication", "medium", element.getMedium().get(i), i); + if (element.hasSubject()) + composeReference(t, "Communication", "subject", element.getSubject(), -1); + for (int i = 0; i < element.getRecipient().size(); i++) + composeReference(t, "Communication", "recipient", element.getRecipient().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeReference(t, "Communication", "topic", element.getTopic().get(i), i); + if (element.hasContext()) + composeReference(t, "Communication", "context", element.getContext(), -1); + if (element.hasSentElement()) + composeDateTime(t, "Communication", "sent", element.getSentElement(), -1); + if (element.hasReceivedElement()) + composeDateTime(t, "Communication", "received", element.getReceivedElement(), -1); + if (element.hasSender()) + composeReference(t, "Communication", "sender", element.getSender(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "Communication", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "Communication", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getPayload().size(); i++) + composeCommunicationCommunicationPayloadComponent(t, "Communication", "payload", element.getPayload().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Communication", "note", element.getNote().get(i), i); + } + + protected void composeCommunicationCommunicationPayloadComponent(Complex parent, String parentType, String name, Communication.CommunicationPayloadComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "payload", name, element, index); + if (element.hasContent()) + composeType(t, "Communication", "content", element.getContent(), -1); + } + + protected void composeCommunicationRequest(Complex parent, String parentType, String name, CommunicationRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CommunicationRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "CommunicationRequest", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "CommunicationRequest", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getReplaces().size(); i++) + composeReference(t, "CommunicationRequest", "replaces", element.getReplaces().get(i), i); + if (element.hasGroupIdentifier()) + composeIdentifier(t, "CommunicationRequest", "groupIdentifier", element.getGroupIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "CommunicationRequest", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "CommunicationRequest", "category", element.getCategory().get(i), i); + if (element.hasPriorityElement()) + composeEnum(t, "CommunicationRequest", "priority", element.getPriorityElement(), -1); + for (int i = 0; i < element.getMedium().size(); i++) + composeCodeableConcept(t, "CommunicationRequest", "medium", element.getMedium().get(i), i); + if (element.hasSubject()) + composeReference(t, "CommunicationRequest", "subject", element.getSubject(), -1); + for (int i = 0; i < element.getRecipient().size(); i++) + composeReference(t, "CommunicationRequest", "recipient", element.getRecipient().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeReference(t, "CommunicationRequest", "topic", element.getTopic().get(i), i); + if (element.hasContext()) + composeReference(t, "CommunicationRequest", "context", element.getContext(), -1); + for (int i = 0; i < element.getPayload().size(); i++) + composeCommunicationRequestCommunicationRequestPayloadComponent(t, "CommunicationRequest", "payload", element.getPayload().get(i), i); + if (element.hasOccurrence()) + composeType(t, "CommunicationRequest", "occurrence", element.getOccurrence(), -1); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "CommunicationRequest", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasSender()) + composeReference(t, "CommunicationRequest", "sender", element.getSender(), -1); + if (element.hasRequester()) + composeCommunicationRequestCommunicationRequestRequesterComponent(t, "CommunicationRequest", "requester", element.getRequester(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "CommunicationRequest", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "CommunicationRequest", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "CommunicationRequest", "note", element.getNote().get(i), i); + } + + protected void composeCommunicationRequestCommunicationRequestPayloadComponent(Complex parent, String parentType, String name, CommunicationRequest.CommunicationRequestPayloadComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "payload", name, element, index); + if (element.hasContent()) + composeType(t, "CommunicationRequest", "content", element.getContent(), -1); + } + + protected void composeCommunicationRequestCommunicationRequestRequesterComponent(Complex parent, String parentType, String name, CommunicationRequest.CommunicationRequestRequesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requester", name, element, index); + if (element.hasAgent()) + composeReference(t, "CommunicationRequest", "agent", element.getAgent(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "CommunicationRequest", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeCompartmentDefinition(Complex parent, String parentType, String name, CompartmentDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "CompartmentDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "CompartmentDefinition", "url", element.getUrlElement(), -1); + if (element.hasNameElement()) + composeString(t, "CompartmentDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "CompartmentDefinition", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "CompartmentDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "CompartmentDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "CompartmentDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "CompartmentDefinition", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "CompartmentDefinition", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "CompartmentDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "CompartmentDefinition", "purpose", element.getPurposeElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "CompartmentDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "CompartmentDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasCodeElement()) + composeEnum(t, "CompartmentDefinition", "code", element.getCodeElement(), -1); + if (element.hasSearchElement()) + composeBoolean(t, "CompartmentDefinition", "search", element.getSearchElement(), -1); + for (int i = 0; i < element.getResource().size(); i++) + composeCompartmentDefinitionCompartmentDefinitionResourceComponent(t, "CompartmentDefinition", "resource", element.getResource().get(i), i); + } + + protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(Complex parent, String parentType, String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "resource", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "CompartmentDefinition", "code", element.getCodeElement(), -1); + for (int i = 0; i < element.getParam().size(); i++) + composeString(t, "CompartmentDefinition", "param", element.getParam().get(i), i); + if (element.hasDocumentationElement()) + composeString(t, "CompartmentDefinition", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeComposition(Complex parent, String parentType, String name, Composition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Composition", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Composition", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Composition", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Composition", "type", element.getType(), -1); + if (element.hasClass_()) + composeCodeableConcept(t, "Composition", "class", element.getClass_(), -1); + if (element.hasSubject()) + composeReference(t, "Composition", "subject", element.getSubject(), -1); + if (element.hasEncounter()) + composeReference(t, "Composition", "encounter", element.getEncounter(), -1); + if (element.hasDateElement()) + composeDateTime(t, "Composition", "date", element.getDateElement(), -1); + for (int i = 0; i < element.getAuthor().size(); i++) + composeReference(t, "Composition", "author", element.getAuthor().get(i), i); + if (element.hasTitleElement()) + composeString(t, "Composition", "title", element.getTitleElement(), -1); + if (element.hasConfidentialityElement()) + composeEnum(t, "Composition", "confidentiality", element.getConfidentialityElement(), -1); + for (int i = 0; i < element.getAttester().size(); i++) + composeCompositionCompositionAttesterComponent(t, "Composition", "attester", element.getAttester().get(i), i); + if (element.hasCustodian()) + composeReference(t, "Composition", "custodian", element.getCustodian(), -1); + for (int i = 0; i < element.getRelatesTo().size(); i++) + composeCompositionCompositionRelatesToComponent(t, "Composition", "relatesTo", element.getRelatesTo().get(i), i); + for (int i = 0; i < element.getEvent().size(); i++) + composeCompositionCompositionEventComponent(t, "Composition", "event", element.getEvent().get(i), i); + for (int i = 0; i < element.getSection().size(); i++) + composeCompositionSectionComponent(t, "Composition", "section", element.getSection().get(i), i); + } + + protected void composeCompositionCompositionAttesterComponent(Complex parent, String parentType, String name, Composition.CompositionAttesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "attester", name, element, index); + for (int i = 0; i < element.getMode().size(); i++) + composeEnum(t, "Composition", "mode", element.getMode().get(i), i); + if (element.hasTimeElement()) + composeDateTime(t, "Composition", "time", element.getTimeElement(), -1); + if (element.hasParty()) + composeReference(t, "Composition", "party", element.getParty(), -1); + } + + protected void composeCompositionCompositionRelatesToComponent(Complex parent, String parentType, String name, Composition.CompositionRelatesToComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "relatesTo", name, element, index); + if (element.hasCodeElement()) + composeEnum(t, "Composition", "code", element.getCodeElement(), -1); + if (element.hasTarget()) + composeType(t, "Composition", "target", element.getTarget(), -1); + } + + protected void composeCompositionCompositionEventComponent(Complex parent, String parentType, String name, Composition.CompositionEventComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "event", name, element, index); + for (int i = 0; i < element.getCode().size(); i++) + composeCodeableConcept(t, "Composition", "code", element.getCode().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "Composition", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getDetail().size(); i++) + composeReference(t, "Composition", "detail", element.getDetail().get(i), i); + } + + protected void composeCompositionSectionComponent(Complex parent, String parentType, String name, Composition.SectionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "section", name, element, index); + if (element.hasTitleElement()) + composeString(t, "Composition", "title", element.getTitleElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Composition", "code", element.getCode(), -1); + if (element.hasText()) + composeNarrative(t, "Composition", "text", element.getText(), -1); + if (element.hasModeElement()) + composeEnum(t, "Composition", "mode", element.getModeElement(), -1); + if (element.hasOrderedBy()) + composeCodeableConcept(t, "Composition", "orderedBy", element.getOrderedBy(), -1); + for (int i = 0; i < element.getEntry().size(); i++) + composeReference(t, "Composition", "entry", element.getEntry().get(i), i); + if (element.hasEmptyReason()) + composeCodeableConcept(t, "Composition", "emptyReason", element.getEmptyReason(), -1); + for (int i = 0; i < element.getSection().size(); i++) + composeCompositionSectionComponent(t, "Composition", "section", element.getSection().get(i), i); + } + + protected void composeConceptMap(Complex parent, String parentType, String name, ConceptMap element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ConceptMap", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ConceptMap", "url", element.getUrlElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "ConceptMap", "identifier", element.getIdentifier(), -1); + if (element.hasVersionElement()) + composeString(t, "ConceptMap", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ConceptMap", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ConceptMap", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ConceptMap", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ConceptMap", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ConceptMap", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ConceptMap", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ConceptMap", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ConceptMap", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ConceptMap", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ConceptMap", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "ConceptMap", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "ConceptMap", "copyright", element.getCopyrightElement(), -1); + if (element.hasSource()) + composeType(t, "ConceptMap", "source", element.getSource(), -1); + if (element.hasTarget()) + composeType(t, "ConceptMap", "target", element.getTarget(), -1); + for (int i = 0; i < element.getGroup().size(); i++) + composeConceptMapConceptMapGroupComponent(t, "ConceptMap", "group", element.getGroup().get(i), i); + } + + protected void composeConceptMapConceptMapGroupComponent(Complex parent, String parentType, String name, ConceptMap.ConceptMapGroupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "group", name, element, index); + if (element.hasSourceElement()) + composeUri(t, "ConceptMap", "source", element.getSourceElement(), -1); + if (element.hasSourceVersionElement()) + composeString(t, "ConceptMap", "sourceVersion", element.getSourceVersionElement(), -1); + if (element.hasTargetElement()) + composeUri(t, "ConceptMap", "target", element.getTargetElement(), -1); + if (element.hasTargetVersionElement()) + composeString(t, "ConceptMap", "targetVersion", element.getTargetVersionElement(), -1); + for (int i = 0; i < element.getElement().size(); i++) + composeConceptMapSourceElementComponent(t, "ConceptMap", "element", element.getElement().get(i), i); + if (element.hasUnmapped()) + composeConceptMapConceptMapGroupUnmappedComponent(t, "ConceptMap", "unmapped", element.getUnmapped(), -1); + } + + protected void composeConceptMapSourceElementComponent(Complex parent, String parentType, String name, ConceptMap.SourceElementComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "element", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); + for (int i = 0; i < element.getTarget().size(); i++) + composeConceptMapTargetElementComponent(t, "ConceptMap", "target", element.getTarget().get(i), i); + } + + protected void composeConceptMapTargetElementComponent(Complex parent, String parentType, String name, ConceptMap.TargetElementComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "target", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); + if (element.hasEquivalenceElement()) + composeEnum(t, "ConceptMap", "equivalence", element.getEquivalenceElement(), -1); + if (element.hasCommentElement()) + composeString(t, "ConceptMap", "comment", element.getCommentElement(), -1); + for (int i = 0; i < element.getDependsOn().size(); i++) + composeConceptMapOtherElementComponent(t, "ConceptMap", "dependsOn", element.getDependsOn().get(i), i); + for (int i = 0; i < element.getProduct().size(); i++) + composeConceptMapOtherElementComponent(t, "ConceptMap", "product", element.getProduct().get(i), i); + } + + protected void composeConceptMapOtherElementComponent(Complex parent, String parentType, String name, ConceptMap.OtherElementComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dependsOn", name, element, index); + if (element.hasPropertyElement()) + composeUri(t, "ConceptMap", "property", element.getPropertyElement(), -1); + if (element.hasSystemElement()) + composeUri(t, "ConceptMap", "system", element.getSystemElement(), -1); + if (element.hasCodeElement()) + composeString(t, "ConceptMap", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); + } + + protected void composeConceptMapConceptMapGroupUnmappedComponent(Complex parent, String parentType, String name, ConceptMap.ConceptMapGroupUnmappedComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "unmapped", name, element, index); + if (element.hasModeElement()) + composeEnum(t, "ConceptMap", "mode", element.getModeElement(), -1); + if (element.hasCodeElement()) + composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "ConceptMap", "url", element.getUrlElement(), -1); + } + + protected void composeCondition(Complex parent, String parentType, String name, Condition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Condition", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Condition", "identifier", element.getIdentifier().get(i), i); + if (element.hasClinicalStatusElement()) + composeEnum(t, "Condition", "clinicalStatus", element.getClinicalStatusElement(), -1); + if (element.hasVerificationStatusElement()) + composeEnum(t, "Condition", "verificationStatus", element.getVerificationStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Condition", "category", element.getCategory().get(i), i); + if (element.hasSeverity()) + composeCodeableConcept(t, "Condition", "severity", element.getSeverity(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Condition", "code", element.getCode(), -1); + for (int i = 0; i < element.getBodySite().size(); i++) + composeCodeableConcept(t, "Condition", "bodySite", element.getBodySite().get(i), i); + if (element.hasSubject()) + composeReference(t, "Condition", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "Condition", "context", element.getContext(), -1); + if (element.hasOnset()) + composeType(t, "Condition", "onset", element.getOnset(), -1); + if (element.hasAbatement()) + composeType(t, "Condition", "abatement", element.getAbatement(), -1); + if (element.hasAssertedDateElement()) + composeDateTime(t, "Condition", "assertedDate", element.getAssertedDateElement(), -1); + if (element.hasAsserter()) + composeReference(t, "Condition", "asserter", element.getAsserter(), -1); + for (int i = 0; i < element.getStage().size(); i++) + composeConditionConditionStageComponent(t, "Condition", "stage", element.getStage().get(i), i); + for (int i = 0; i < element.getEvidence().size(); i++) + composeConditionConditionEvidenceComponent(t, "Condition", "evidence", element.getEvidence().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Condition", "note", element.getNote().get(i), i); + } + + protected void composeConditionConditionStageComponent(Complex parent, String parentType, String name, Condition.ConditionStageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "stage", name, element, index); + if (element.hasSummary()) + composeCodeableConcept(t, "Condition", "summary", element.getSummary(), -1); + for (int i = 0; i < element.getAssessment().size(); i++) + composeReference(t, "Condition", "assessment", element.getAssessment().get(i), i); + if (element.hasType()) + composeCodeableConcept(t, "Condition", "type", element.getType(), -1); + } + + protected void composeConditionConditionEvidenceComponent(Complex parent, String parentType, String name, Condition.ConditionEvidenceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "evidence", name, element, index); + for (int i = 0; i < element.getCode().size(); i++) + composeCodeableConcept(t, "Condition", "code", element.getCode().get(i), i); + for (int i = 0; i < element.getDetail().size(); i++) + composeReference(t, "Condition", "detail", element.getDetail().get(i), i); + } + + protected void composeConsent(Complex parent, String parentType, String name, Consent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Consent", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Consent", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Consent", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Consent", "category", element.getCategory().get(i), i); + if (element.hasPatient()) + composeReference(t, "Consent", "patient", element.getPatient(), -1); + if (element.hasDateTimeElement()) + composeDateTime(t, "Consent", "dateTime", element.getDateTimeElement(), -1); + for (int i = 0; i < element.getConsentingParty().size(); i++) + composeReference(t, "Consent", "consentingParty", element.getConsentingParty().get(i), i); + for (int i = 0; i < element.getOrganization().size(); i++) + composeReference(t, "Consent", "organization", element.getOrganization().get(i), i); + if (element.hasSource()) + composeType(t, "Consent", "source", element.getSource(), -1); + for (int i = 0; i < element.getPolicy().size(); i++) + composeConsentConsentPolicyComponent(t, "Consent", "policy", element.getPolicy().get(i), i); + if (element.hasPolicyRule()) + composeCodeableConcept(t, "Consent", "policyRule", element.getPolicyRule(), -1); + for (int i = 0; i < element.getVerification().size(); i++) + composeConsentConsentVerificationComponent(t, "Consent", "verification", element.getVerification().get(i), i); + for (int i = 0; i < element.getProvision().size(); i++) + composeConsentprovisionComponent(t, "Consent", "provision", element.getProvision().get(i), i); + } + + protected void composeConsentConsentPolicyComponent(Complex parent, String parentType, String name, Consent.ConsentPolicyComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "policy", name, element, index); + if (element.hasAuthorityElement()) + composeUri(t, "Consent", "authority", element.getAuthorityElement(), -1); + if (element.hasUriElement()) + composeUri(t, "Consent", "uri", element.getUriElement(), -1); + } + + protected void composeConsentConsentVerificationComponent(Complex parent, String parentType, String name, Consent.ConsentVerificationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "verification", name, element, index); + if (element.hasVerifiedElement()) + composeBoolean(t, "Consent", "verified", element.getVerifiedElement(), -1); + if (element.hasVerifiedWith()) + composeReference(t, "Consent", "verifiedWith", element.getVerifiedWith(), -1); + if (element.hasVerificationDateElement()) + composeDateTime(t, "Consent", "verificationDate", element.getVerificationDateElement(), -1); + } + + protected void composeConsentprovisionComponent(Complex parent, String parentType, String name, Consent.provisionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "provision", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Consent", "type", element.getTypeElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Consent", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getActor().size(); i++) + composeConsentprovisionActorComponent(t, "Consent", "actor", element.getActor().get(i), i); + for (int i = 0; i < element.getAction().size(); i++) + composeCodeableConcept(t, "Consent", "action", element.getAction().get(i), i); + for (int i = 0; i < element.getSecurityLabel().size(); i++) + composeCoding(t, "Consent", "securityLabel", element.getSecurityLabel().get(i), i); + for (int i = 0; i < element.getPurpose().size(); i++) + composeCoding(t, "Consent", "purpose", element.getPurpose().get(i), i); + for (int i = 0; i < element.getClass_().size(); i++) + composeCoding(t, "Consent", "class", element.getClass_().get(i), i); + for (int i = 0; i < element.getCode().size(); i++) + composeCoding(t, "Consent", "code", element.getCode().get(i), i); + if (element.hasDataPeriod()) + composePeriod(t, "Consent", "dataPeriod", element.getDataPeriod(), -1); + for (int i = 0; i < element.getData().size(); i++) + composeConsentprovisionDataComponent(t, "Consent", "data", element.getData().get(i), i); + for (int i = 0; i < element.getProvision().size(); i++) + composeConsentprovisionComponent(t, "Consent", "provision", element.getProvision().get(i), i); + } + + protected void composeConsentprovisionActorComponent(Complex parent, String parentType, String name, Consent.provisionActorComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "actor", name, element, index); + if (element.hasRole()) + composeCodeableConcept(t, "Consent", "role", element.getRole(), -1); + if (element.hasReference()) + composeReference(t, "Consent", "reference", element.getReference(), -1); + } + + protected void composeConsentprovisionDataComponent(Complex parent, String parentType, String name, Consent.provisionDataComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "data", name, element, index); + if (element.hasMeaningElement()) + composeEnum(t, "Consent", "meaning", element.getMeaningElement(), -1); + if (element.hasReference()) + composeReference(t, "Consent", "reference", element.getReference(), -1); + } + + protected void composeContract(Complex parent, String parentType, String name, Contract element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Contract", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Contract", "status", element.getStatusElement(), -1); + if (element.hasContentDerivative()) + composeCodeableConcept(t, "Contract", "contentDerivative", element.getContentDerivative(), -1); + if (element.hasIssuedElement()) + composeDateTime(t, "Contract", "issued", element.getIssuedElement(), -1); + if (element.hasApplies()) + composePeriod(t, "Contract", "applies", element.getApplies(), -1); + for (int i = 0; i < element.getSubject().size(); i++) + composeReference(t, "Contract", "subject", element.getSubject().get(i), i); + for (int i = 0; i < element.getAuthority().size(); i++) + composeReference(t, "Contract", "authority", element.getAuthority().get(i), i); + for (int i = 0; i < element.getDomain().size(); i++) + composeReference(t, "Contract", "domain", element.getDomain().get(i), i); + if (element.hasType()) + composeCodeableConcept(t, "Contract", "type", element.getType(), -1); + for (int i = 0; i < element.getSubType().size(); i++) + composeCodeableConcept(t, "Contract", "subType", element.getSubType().get(i), i); + for (int i = 0; i < element.getTerm().size(); i++) + composeContractTermComponent(t, "Contract", "term", element.getTerm().get(i), i); + for (int i = 0; i < element.getSigner().size(); i++) + composeContractSignatoryComponent(t, "Contract", "signer", element.getSigner().get(i), i); + for (int i = 0; i < element.getFriendly().size(); i++) + composeContractFriendlyLanguageComponent(t, "Contract", "friendly", element.getFriendly().get(i), i); + for (int i = 0; i < element.getLegal().size(); i++) + composeContractLegalLanguageComponent(t, "Contract", "legal", element.getLegal().get(i), i); + if (element.hasRule()) + composeContractComputableLanguageComponent(t, "Contract", "rule", element.getRule(), -1); + if (element.hasLegallyBinding()) + composeType(t, "Contract", "legallyBinding", element.getLegallyBinding(), -1); + } + + protected void composeContractTermComponent(Complex parent, String parentType, String name, Contract.TermComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "term", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1); + if (element.hasIssuedElement()) + composeDateTime(t, "Contract", "issued", element.getIssuedElement(), -1); + if (element.hasApplies()) + composePeriod(t, "Contract", "applies", element.getApplies(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Contract", "type", element.getType(), -1); + if (element.hasSubType()) + composeCodeableConcept(t, "Contract", "subType", element.getSubType(), -1); + if (element.hasOffer()) + composeContractContractOfferComponent(t, "Contract", "offer", element.getOffer(), -1); + for (int i = 0; i < element.getAsset().size(); i++) + composeContractContractAssetComponent(t, "Contract", "asset", element.getAsset().get(i), i); + for (int i = 0; i < element.getAgent().size(); i++) + composeContractAgentComponent(t, "Contract", "agent", element.getAgent().get(i), i); + for (int i = 0; i < element.getAction().size(); i++) + composeCodeableConcept(t, "Contract", "action", element.getAction().get(i), i); + for (int i = 0; i < element.getActionReason().size(); i++) + composeCodeableConcept(t, "Contract", "actionReason", element.getActionReason().get(i), i); + for (int i = 0; i < element.getGroup().size(); i++) + composeContractTermComponent(t, "Contract", "group", element.getGroup().get(i), i); + } + + protected void composeContractContractOfferComponent(Complex parent, String parentType, String name, Contract.ContractOfferComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "offer", name, element, index); + if (element.hasTopic()) + composeReference(t, "Contract", "topic", element.getTopic(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Contract", "type", element.getType(), -1); + if (element.hasDecision()) + composeCodeableConcept(t, "Contract", "decision", element.getDecision(), -1); + if (element.hasTextElement()) + composeString(t, "Contract", "text", element.getTextElement(), -1); + if (element.hasLinkIdElement()) + composeString(t, "Contract", "linkId", element.getLinkIdElement(), -1); + } + + protected void composeContractContractAssetComponent(Complex parent, String parentType, String name, Contract.ContractAssetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "asset", name, element, index); + if (element.hasClass_()) + composeCoding(t, "Contract", "class", element.getClass_(), -1); + if (element.hasCode()) + composeCoding(t, "Contract", "code", element.getCode(), -1); + if (element.hasPeriod()) + composePeriod(t, "Contract", "period", element.getPeriod(), -1); + if (element.hasDataPeriod()) + composePeriod(t, "Contract", "dataPeriod", element.getDataPeriod(), -1); + for (int i = 0; i < element.getData().size(); i++) + composeContractAssetDataComponent(t, "Contract", "data", element.getData().get(i), i); + for (int i = 0; i < element.getValuedItem().size(); i++) + composeContractValuedItemComponent(t, "Contract", "valuedItem", element.getValuedItem().get(i), i); + for (int i = 0; i < element.getSecurityLabel().size(); i++) + composeCoding(t, "Contract", "securityLabel", element.getSecurityLabel().get(i), i); + } + + protected void composeContractAssetDataComponent(Complex parent, String parentType, String name, Contract.AssetDataComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "data", name, element, index); + if (element.hasMeaningElement()) + composeEnum(t, "Contract", "meaning", element.getMeaningElement(), -1); + if (element.hasReference()) + composeReference(t, "Contract", "reference", element.getReference(), -1); + } + + protected void composeContractValuedItemComponent(Complex parent, String parentType, String name, Contract.ValuedItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "valuedItem", name, element, index); + if (element.hasEntity()) + composeType(t, "Contract", "entity", element.getEntity(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1); + if (element.hasEffectiveTimeElement()) + composeDateTime(t, "Contract", "effectiveTime", element.getEffectiveTimeElement(), -1); + if (element.hasQuantity()) + composeQuantity(t, "Contract", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "Contract", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "Contract", "factor", element.getFactorElement(), -1); + if (element.hasPointsElement()) + composeDecimal(t, "Contract", "points", element.getPointsElement(), -1); + if (element.hasNet()) + composeMoney(t, "Contract", "net", element.getNet(), -1); + } + + protected void composeContractAgentComponent(Complex parent, String parentType, String name, Contract.AgentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "agent", name, element, index); + if (element.hasActor()) + composeReference(t, "Contract", "actor", element.getActor(), -1); + for (int i = 0; i < element.getRole().size(); i++) + composeCodeableConcept(t, "Contract", "role", element.getRole().get(i), i); + } + + protected void composeContractSignatoryComponent(Complex parent, String parentType, String name, Contract.SignatoryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "signer", name, element, index); + if (element.hasType()) + composeCoding(t, "Contract", "type", element.getType(), -1); + if (element.hasParty()) + composeReference(t, "Contract", "party", element.getParty(), -1); + for (int i = 0; i < element.getSignature().size(); i++) + composeSignature(t, "Contract", "signature", element.getSignature().get(i), i); + } + + protected void composeContractFriendlyLanguageComponent(Complex parent, String parentType, String name, Contract.FriendlyLanguageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "friendly", name, element, index); + if (element.hasContent()) + composeType(t, "Contract", "content", element.getContent(), -1); + } + + protected void composeContractLegalLanguageComponent(Complex parent, String parentType, String name, Contract.LegalLanguageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "legal", name, element, index); + if (element.hasContent()) + composeType(t, "Contract", "content", element.getContent(), -1); + } + + protected void composeContractComputableLanguageComponent(Complex parent, String parentType, String name, Contract.ComputableLanguageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rule", name, element, index); + if (element.hasContent()) + composeType(t, "Contract", "content", element.getContent(), -1); + } + + protected void composeCoverage(Complex parent, String parentType, String name, Coverage element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Coverage", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Coverage", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Coverage", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Coverage", "type", element.getType(), -1); + if (element.hasPolicyHolder()) + composeReference(t, "Coverage", "policyHolder", element.getPolicyHolder(), -1); + if (element.hasSubscriber()) + composeReference(t, "Coverage", "subscriber", element.getSubscriber(), -1); + if (element.hasSubscriberIdElement()) + composeString(t, "Coverage", "subscriberId", element.getSubscriberIdElement(), -1); + if (element.hasBeneficiary()) + composeReference(t, "Coverage", "beneficiary", element.getBeneficiary(), -1); + if (element.hasRelationship()) + composeCodeableConcept(t, "Coverage", "relationship", element.getRelationship(), -1); + if (element.hasPeriod()) + composePeriod(t, "Coverage", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getPayor().size(); i++) + composeReference(t, "Coverage", "payor", element.getPayor().get(i), i); + if (element.hasGrouping()) + composeCoverageGroupComponent(t, "Coverage", "grouping", element.getGrouping(), -1); + if (element.hasDependentElement()) + composeString(t, "Coverage", "dependent", element.getDependentElement(), -1); + if (element.hasSequenceElement()) + composeString(t, "Coverage", "sequence", element.getSequenceElement(), -1); + if (element.hasOrderElement()) + composePositiveInt(t, "Coverage", "order", element.getOrderElement(), -1); + if (element.hasNetworkElement()) + composeString(t, "Coverage", "network", element.getNetworkElement(), -1); + for (int i = 0; i < element.getContract().size(); i++) + composeReference(t, "Coverage", "contract", element.getContract().get(i), i); + } + + protected void composeCoverageGroupComponent(Complex parent, String parentType, String name, Coverage.GroupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "grouping", name, element, index); + if (element.hasGroupElement()) + composeString(t, "Coverage", "group", element.getGroupElement(), -1); + if (element.hasGroupDisplayElement()) + composeString(t, "Coverage", "groupDisplay", element.getGroupDisplayElement(), -1); + if (element.hasSubGroupElement()) + composeString(t, "Coverage", "subGroup", element.getSubGroupElement(), -1); + if (element.hasSubGroupDisplayElement()) + composeString(t, "Coverage", "subGroupDisplay", element.getSubGroupDisplayElement(), -1); + if (element.hasPlanElement()) + composeString(t, "Coverage", "plan", element.getPlanElement(), -1); + if (element.hasPlanDisplayElement()) + composeString(t, "Coverage", "planDisplay", element.getPlanDisplayElement(), -1); + if (element.hasSubPlanElement()) + composeString(t, "Coverage", "subPlan", element.getSubPlanElement(), -1); + if (element.hasSubPlanDisplayElement()) + composeString(t, "Coverage", "subPlanDisplay", element.getSubPlanDisplayElement(), -1); + if (element.hasClass_Element()) + composeString(t, "Coverage", "class", element.getClass_Element(), -1); + if (element.hasClassDisplayElement()) + composeString(t, "Coverage", "classDisplay", element.getClassDisplayElement(), -1); + if (element.hasSubClassElement()) + composeString(t, "Coverage", "subClass", element.getSubClassElement(), -1); + if (element.hasSubClassDisplayElement()) + composeString(t, "Coverage", "subClassDisplay", element.getSubClassDisplayElement(), -1); + } + + protected void composeDetectedIssue(Complex parent, String parentType, String name, DetectedIssue element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DetectedIssue", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "DetectedIssue", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "DetectedIssue", "status", element.getStatusElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "DetectedIssue", "category", element.getCategory(), -1); + if (element.hasSeverityElement()) + composeEnum(t, "DetectedIssue", "severity", element.getSeverityElement(), -1); + if (element.hasPatient()) + composeReference(t, "DetectedIssue", "patient", element.getPatient(), -1); + if (element.hasDateElement()) + composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1); + if (element.hasAuthor()) + composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1); + for (int i = 0; i < element.getImplicated().size(); i++) + composeReference(t, "DetectedIssue", "implicated", element.getImplicated().get(i), i); + if (element.hasDetailElement()) + composeString(t, "DetectedIssue", "detail", element.getDetailElement(), -1); + if (element.hasReferenceElement()) + composeUri(t, "DetectedIssue", "reference", element.getReferenceElement(), -1); + for (int i = 0; i < element.getMitigation().size(); i++) + composeDetectedIssueDetectedIssueMitigationComponent(t, "DetectedIssue", "mitigation", element.getMitigation().get(i), i); + } + + protected void composeDetectedIssueDetectedIssueMitigationComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueMitigationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "mitigation", name, element, index); + if (element.hasAction()) + composeCodeableConcept(t, "DetectedIssue", "action", element.getAction(), -1); + if (element.hasDateElement()) + composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1); + if (element.hasAuthor()) + composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1); + } + + protected void composeDevice(Complex parent, String parentType, String name, Device element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Device", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Device", "identifier", element.getIdentifier().get(i), i); + if (element.hasUdi()) + composeDeviceDeviceUdiComponent(t, "Device", "udi", element.getUdi(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Device", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Device", "type", element.getType(), -1); + if (element.hasLotNumberElement()) + composeString(t, "Device", "lotNumber", element.getLotNumberElement(), -1); + if (element.hasManufacturerElement()) + composeString(t, "Device", "manufacturer", element.getManufacturerElement(), -1); + if (element.hasManufactureDateElement()) + composeDateTime(t, "Device", "manufactureDate", element.getManufactureDateElement(), -1); + if (element.hasExpirationDateElement()) + composeDateTime(t, "Device", "expirationDate", element.getExpirationDateElement(), -1); + if (element.hasModelElement()) + composeString(t, "Device", "model", element.getModelElement(), -1); + if (element.hasVersionElement()) + composeString(t, "Device", "version", element.getVersionElement(), -1); + if (element.hasPatient()) + composeReference(t, "Device", "patient", element.getPatient(), -1); + if (element.hasOwner()) + composeReference(t, "Device", "owner", element.getOwner(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactPoint(t, "Device", "contact", element.getContact().get(i), i); + if (element.hasLocation()) + composeReference(t, "Device", "location", element.getLocation(), -1); + if (element.hasUrlElement()) + composeUri(t, "Device", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Device", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getSafety().size(); i++) + composeCodeableConcept(t, "Device", "safety", element.getSafety().get(i), i); + } + + protected void composeDeviceDeviceUdiComponent(Complex parent, String parentType, String name, Device.DeviceUdiComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "udi", name, element, index); + if (element.hasDeviceIdentifierElement()) + composeString(t, "Device", "deviceIdentifier", element.getDeviceIdentifierElement(), -1); + if (element.hasNameElement()) + composeString(t, "Device", "name", element.getNameElement(), -1); + if (element.hasJurisdictionElement()) + composeUri(t, "Device", "jurisdiction", element.getJurisdictionElement(), -1); + if (element.hasCarrierHRFElement()) + composeString(t, "Device", "carrierHRF", element.getCarrierHRFElement(), -1); + if (element.hasCarrierAIDCElement()) + composeBase64Binary(t, "Device", "carrierAIDC", element.getCarrierAIDCElement(), -1); + if (element.hasIssuerElement()) + composeUri(t, "Device", "issuer", element.getIssuerElement(), -1); + if (element.hasEntryTypeElement()) + composeEnum(t, "Device", "entryType", element.getEntryTypeElement(), -1); + } + + protected void composeDeviceComponent(Complex parent, String parentType, String name, DeviceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DeviceComponent", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DeviceComponent", "identifier", element.getIdentifier().get(i), i); + if (element.hasType()) + composeCodeableConcept(t, "DeviceComponent", "type", element.getType(), -1); + if (element.hasLastSystemChangeElement()) + composeInstant(t, "DeviceComponent", "lastSystemChange", element.getLastSystemChangeElement(), -1); + if (element.hasSource()) + composeReference(t, "DeviceComponent", "source", element.getSource(), -1); + if (element.hasParent()) + composeReference(t, "DeviceComponent", "parent", element.getParent(), -1); + for (int i = 0; i < element.getOperationalStatus().size(); i++) + composeCodeableConcept(t, "DeviceComponent", "operationalStatus", element.getOperationalStatus().get(i), i); + if (element.hasParameterGroup()) + composeCodeableConcept(t, "DeviceComponent", "parameterGroup", element.getParameterGroup(), -1); + if (element.hasMeasurementPrincipleElement()) + composeEnum(t, "DeviceComponent", "measurementPrinciple", element.getMeasurementPrincipleElement(), -1); + for (int i = 0; i < element.getProductionSpecification().size(); i++) + composeDeviceComponentDeviceComponentProductionSpecificationComponent(t, "DeviceComponent", "productionSpecification", element.getProductionSpecification().get(i), i); + if (element.hasLanguageCode()) + composeCodeableConcept(t, "DeviceComponent", "languageCode", element.getLanguageCode(), -1); + for (int i = 0; i < element.getProperty().size(); i++) + composeDeviceComponentDeviceComponentPropertyComponent(t, "DeviceComponent", "property", element.getProperty().get(i), i); + } + + protected void composeDeviceComponentDeviceComponentProductionSpecificationComponent(Complex parent, String parentType, String name, DeviceComponent.DeviceComponentProductionSpecificationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "productionSpecification", name, element, index); + if (element.hasSpecType()) + composeCodeableConcept(t, "DeviceComponent", "specType", element.getSpecType(), -1); + if (element.hasComponentId()) + composeIdentifier(t, "DeviceComponent", "componentId", element.getComponentId(), -1); + if (element.hasProductionSpecElement()) + composeString(t, "DeviceComponent", "productionSpec", element.getProductionSpecElement(), -1); + } + + protected void composeDeviceComponentDeviceComponentPropertyComponent(Complex parent, String parentType, String name, DeviceComponent.DeviceComponentPropertyComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "property", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "DeviceComponent", "type", element.getType(), -1); + for (int i = 0; i < element.getValueQuantity().size(); i++) + composeQuantity(t, "DeviceComponent", "valueQuantity", element.getValueQuantity().get(i), i); + for (int i = 0; i < element.getValueCode().size(); i++) + composeCodeableConcept(t, "DeviceComponent", "valueCode", element.getValueCode().get(i), i); + } + + protected void composeDeviceMetric(Complex parent, String parentType, String name, DeviceMetric element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DeviceMetric", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DeviceMetric", "identifier", element.getIdentifier().get(i), i); + if (element.hasType()) + composeCodeableConcept(t, "DeviceMetric", "type", element.getType(), -1); + if (element.hasUnit()) + composeCodeableConcept(t, "DeviceMetric", "unit", element.getUnit(), -1); + if (element.hasSource()) + composeReference(t, "DeviceMetric", "source", element.getSource(), -1); + if (element.hasParent()) + composeReference(t, "DeviceMetric", "parent", element.getParent(), -1); + if (element.hasOperationalStatusElement()) + composeEnum(t, "DeviceMetric", "operationalStatus", element.getOperationalStatusElement(), -1); + if (element.hasColorElement()) + composeEnum(t, "DeviceMetric", "color", element.getColorElement(), -1); + if (element.hasCategoryElement()) + composeEnum(t, "DeviceMetric", "category", element.getCategoryElement(), -1); + if (element.hasMeasurementPeriod()) + composeTiming(t, "DeviceMetric", "measurementPeriod", element.getMeasurementPeriod(), -1); + for (int i = 0; i < element.getCalibration().size(); i++) + composeDeviceMetricDeviceMetricCalibrationComponent(t, "DeviceMetric", "calibration", element.getCalibration().get(i), i); + } + + protected void composeDeviceMetricDeviceMetricCalibrationComponent(Complex parent, String parentType, String name, DeviceMetric.DeviceMetricCalibrationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "calibration", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "DeviceMetric", "type", element.getTypeElement(), -1); + if (element.hasStateElement()) + composeEnum(t, "DeviceMetric", "state", element.getStateElement(), -1); + if (element.hasTimeElement()) + composeInstant(t, "DeviceMetric", "time", element.getTimeElement(), -1); + } + + protected void composeDeviceRequest(Complex parent, String parentType, String name, DeviceRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DeviceRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DeviceRequest", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "DeviceRequest", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "DeviceRequest", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getPriorRequest().size(); i++) + composeReference(t, "DeviceRequest", "priorRequest", element.getPriorRequest().get(i), i); + if (element.hasGroupIdentifier()) + composeIdentifier(t, "DeviceRequest", "groupIdentifier", element.getGroupIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "DeviceRequest", "status", element.getStatusElement(), -1); + if (element.hasIntent()) + composeCodeableConcept(t, "DeviceRequest", "intent", element.getIntent(), -1); + if (element.hasPriorityElement()) + composeEnum(t, "DeviceRequest", "priority", element.getPriorityElement(), -1); + if (element.hasCode()) + composeType(t, "DeviceRequest", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "DeviceRequest", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "DeviceRequest", "context", element.getContext(), -1); + if (element.hasOccurrence()) + composeType(t, "DeviceRequest", "occurrence", element.getOccurrence(), -1); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "DeviceRequest", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasRequester()) + composeDeviceRequestDeviceRequestRequesterComponent(t, "DeviceRequest", "requester", element.getRequester(), -1); + if (element.hasPerformerType()) + composeCodeableConcept(t, "DeviceRequest", "performerType", element.getPerformerType(), -1); + if (element.hasPerformer()) + composeReference(t, "DeviceRequest", "performer", element.getPerformer(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "DeviceRequest", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "DeviceRequest", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getSupportingInfo().size(); i++) + composeReference(t, "DeviceRequest", "supportingInfo", element.getSupportingInfo().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "DeviceRequest", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getRelevantHistory().size(); i++) + composeReference(t, "DeviceRequest", "relevantHistory", element.getRelevantHistory().get(i), i); + } + + protected void composeDeviceRequestDeviceRequestRequesterComponent(Complex parent, String parentType, String name, DeviceRequest.DeviceRequestRequesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requester", name, element, index); + if (element.hasAgent()) + composeReference(t, "DeviceRequest", "agent", element.getAgent(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "DeviceRequest", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeDeviceUseStatement(Complex parent, String parentType, String name, DeviceUseStatement element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DeviceUseStatement", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DeviceUseStatement", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "DeviceUseStatement", "status", element.getStatusElement(), -1); + if (element.hasSubject()) + composeReference(t, "DeviceUseStatement", "subject", element.getSubject(), -1); + if (element.hasWhenUsed()) + composePeriod(t, "DeviceUseStatement", "whenUsed", element.getWhenUsed(), -1); + if (element.hasTiming()) + composeType(t, "DeviceUseStatement", "timing", element.getTiming(), -1); + if (element.hasRecordedOnElement()) + composeDateTime(t, "DeviceUseStatement", "recordedOn", element.getRecordedOnElement(), -1); + if (element.hasSource()) + composeReference(t, "DeviceUseStatement", "source", element.getSource(), -1); + if (element.hasDevice()) + composeReference(t, "DeviceUseStatement", "device", element.getDevice(), -1); + for (int i = 0; i < element.getIndication().size(); i++) + composeCodeableConcept(t, "DeviceUseStatement", "indication", element.getIndication().get(i), i); + if (element.hasBodySite()) + composeCodeableConcept(t, "DeviceUseStatement", "bodySite", element.getBodySite(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "DeviceUseStatement", "note", element.getNote().get(i), i); + } + + protected void composeDiagnosticReport(Complex parent, String parentType, String name, DiagnosticReport element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DiagnosticReport", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DiagnosticReport", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "DiagnosticReport", "basedOn", element.getBasedOn().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "DiagnosticReport", "status", element.getStatusElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "DiagnosticReport", "category", element.getCategory(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "DiagnosticReport", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "DiagnosticReport", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "DiagnosticReport", "context", element.getContext(), -1); + if (element.hasEffective()) + composeType(t, "DiagnosticReport", "effective", element.getEffective(), -1); + if (element.hasIssuedElement()) + composeInstant(t, "DiagnosticReport", "issued", element.getIssuedElement(), -1); + for (int i = 0; i < element.getPerformer().size(); i++) + composeReference(t, "DiagnosticReport", "performer", element.getPerformer().get(i), i); + for (int i = 0; i < element.getResultsInterpreter().size(); i++) + composeReference(t, "DiagnosticReport", "resultsInterpreter", element.getResultsInterpreter().get(i), i); + for (int i = 0; i < element.getSpecimen().size(); i++) + composeReference(t, "DiagnosticReport", "specimen", element.getSpecimen().get(i), i); + for (int i = 0; i < element.getResult().size(); i++) + composeReference(t, "DiagnosticReport", "result", element.getResult().get(i), i); + for (int i = 0; i < element.getImagingStudy().size(); i++) + composeReference(t, "DiagnosticReport", "imagingStudy", element.getImagingStudy().get(i), i); + for (int i = 0; i < element.getImage().size(); i++) + composeDiagnosticReportDiagnosticReportImageComponent(t, "DiagnosticReport", "image", element.getImage().get(i), i); + if (element.hasConclusionElement()) + composeString(t, "DiagnosticReport", "conclusion", element.getConclusionElement(), -1); + for (int i = 0; i < element.getCodedDiagnosis().size(); i++) + composeCodeableConcept(t, "DiagnosticReport", "codedDiagnosis", element.getCodedDiagnosis().get(i), i); + for (int i = 0; i < element.getPresentedForm().size(); i++) + composeAttachment(t, "DiagnosticReport", "presentedForm", element.getPresentedForm().get(i), i); + } + + protected void composeDiagnosticReportDiagnosticReportImageComponent(Complex parent, String parentType, String name, DiagnosticReport.DiagnosticReportImageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "image", name, element, index); + if (element.hasCommentElement()) + composeString(t, "DiagnosticReport", "comment", element.getCommentElement(), -1); + if (element.hasLink()) + composeReference(t, "DiagnosticReport", "link", element.getLink(), -1); + } + + protected void composeDocumentManifest(Complex parent, String parentType, String name, DocumentManifest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DocumentManifest", name, element, index); + if (element.hasMasterIdentifier()) + composeIdentifier(t, "DocumentManifest", "masterIdentifier", element.getMasterIdentifier(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DocumentManifest", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "DocumentManifest", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "DocumentManifest", "type", element.getType(), -1); + if (element.hasSubject()) + composeReference(t, "DocumentManifest", "subject", element.getSubject(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "DocumentManifest", "created", element.getCreatedElement(), -1); + for (int i = 0; i < element.getAgent().size(); i++) + composeDocumentManifestDocumentManifestAgentComponent(t, "DocumentManifest", "agent", element.getAgent().get(i), i); + for (int i = 0; i < element.getRecipient().size(); i++) + composeReference(t, "DocumentManifest", "recipient", element.getRecipient().get(i), i); + if (element.hasSourceElement()) + composeUri(t, "DocumentManifest", "source", element.getSourceElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "DocumentManifest", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getContent().size(); i++) + composeReference(t, "DocumentManifest", "content", element.getContent().get(i), i); + for (int i = 0; i < element.getRelated().size(); i++) + composeDocumentManifestDocumentManifestRelatedComponent(t, "DocumentManifest", "related", element.getRelated().get(i), i); + } + + protected void composeDocumentManifestDocumentManifestAgentComponent(Complex parent, String parentType, String name, DocumentManifest.DocumentManifestAgentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "agent", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "DocumentManifest", "type", element.getType(), -1); + if (element.hasWho()) + composeReference(t, "DocumentManifest", "who", element.getWho(), -1); + } + + protected void composeDocumentManifestDocumentManifestRelatedComponent(Complex parent, String parentType, String name, DocumentManifest.DocumentManifestRelatedComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "related", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "DocumentManifest", "identifier", element.getIdentifier(), -1); + if (element.hasRef()) + composeReference(t, "DocumentManifest", "ref", element.getRef(), -1); + } + + protected void composeDocumentReference(Complex parent, String parentType, String name, DocumentReference element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "DocumentReference", name, element, index); + if (element.hasMasterIdentifier()) + composeIdentifier(t, "DocumentReference", "masterIdentifier", element.getMasterIdentifier(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "DocumentReference", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "DocumentReference", "status", element.getStatusElement(), -1); + if (element.hasDocStatusElement()) + composeEnum(t, "DocumentReference", "docStatus", element.getDocStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "DocumentReference", "type", element.getType(), -1); + if (element.hasClass_()) + composeCodeableConcept(t, "DocumentReference", "class", element.getClass_(), -1); + if (element.hasSubject()) + composeReference(t, "DocumentReference", "subject", element.getSubject(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "DocumentReference", "created", element.getCreatedElement(), -1); + if (element.hasDateElement()) + composeInstant(t, "DocumentReference", "date", element.getDateElement(), -1); + for (int i = 0; i < element.getAgent().size(); i++) + composeDocumentReferenceDocumentReferenceAgentComponent(t, "DocumentReference", "agent", element.getAgent().get(i), i); + if (element.hasAuthenticator()) + composeReference(t, "DocumentReference", "authenticator", element.getAuthenticator(), -1); + if (element.hasCustodian()) + composeReference(t, "DocumentReference", "custodian", element.getCustodian(), -1); + for (int i = 0; i < element.getRelatesTo().size(); i++) + composeDocumentReferenceDocumentReferenceRelatesToComponent(t, "DocumentReference", "relatesTo", element.getRelatesTo().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "DocumentReference", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getSecurityLabel().size(); i++) + composeCodeableConcept(t, "DocumentReference", "securityLabel", element.getSecurityLabel().get(i), i); + for (int i = 0; i < element.getContent().size(); i++) + composeDocumentReferenceDocumentReferenceContentComponent(t, "DocumentReference", "content", element.getContent().get(i), i); + if (element.hasContext()) + composeDocumentReferenceDocumentReferenceContextComponent(t, "DocumentReference", "context", element.getContext(), -1); + } + + protected void composeDocumentReferenceDocumentReferenceAgentComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceAgentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "agent", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "DocumentReference", "type", element.getType(), -1); + if (element.hasWho()) + composeReference(t, "DocumentReference", "who", element.getWho(), -1); + } + + protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceRelatesToComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "relatesTo", name, element, index); + if (element.hasCodeElement()) + composeEnum(t, "DocumentReference", "code", element.getCodeElement(), -1); + if (element.hasTarget()) + composeReference(t, "DocumentReference", "target", element.getTarget(), -1); + } + + protected void composeDocumentReferenceDocumentReferenceContentComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceContentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "content", name, element, index); + if (element.hasAttachment()) + composeAttachment(t, "DocumentReference", "attachment", element.getAttachment(), -1); + if (element.hasFormat()) + composeCoding(t, "DocumentReference", "format", element.getFormat(), -1); + } + + protected void composeDocumentReferenceDocumentReferenceContextComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceContextComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "context", name, element, index); + if (element.hasEncounter()) + composeReference(t, "DocumentReference", "encounter", element.getEncounter(), -1); + for (int i = 0; i < element.getEvent().size(); i++) + composeCodeableConcept(t, "DocumentReference", "event", element.getEvent().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "DocumentReference", "period", element.getPeriod(), -1); + if (element.hasFacilityType()) + composeCodeableConcept(t, "DocumentReference", "facilityType", element.getFacilityType(), -1); + if (element.hasPracticeSetting()) + composeCodeableConcept(t, "DocumentReference", "practiceSetting", element.getPracticeSetting(), -1); + if (element.hasSourcePatientInfo()) + composeReference(t, "DocumentReference", "sourcePatientInfo", element.getSourcePatientInfo(), -1); + for (int i = 0; i < element.getRelated().size(); i++) + composeDocumentReferenceDocumentReferenceContextRelatedComponent(t, "DocumentReference", "related", element.getRelated().get(i), i); + } + + protected void composeDocumentReferenceDocumentReferenceContextRelatedComponent(Complex parent, String parentType, String name, DocumentReference.DocumentReferenceContextRelatedComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "related", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "DocumentReference", "identifier", element.getIdentifier(), -1); + if (element.hasRef()) + composeReference(t, "DocumentReference", "ref", element.getRef(), -1); + } + + protected void composeEligibilityRequest(Complex parent, String parentType, String name, EligibilityRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "EligibilityRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "EligibilityRequest", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "EligibilityRequest", "status", element.getStatusElement(), -1); + if (element.hasPriority()) + composeCodeableConcept(t, "EligibilityRequest", "priority", element.getPriority(), -1); + if (element.hasPatient()) + composeReference(t, "EligibilityRequest", "patient", element.getPatient(), -1); + if (element.hasServiced()) + composeType(t, "EligibilityRequest", "serviced", element.getServiced(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "EligibilityRequest", "created", element.getCreatedElement(), -1); + if (element.hasEnterer()) + composeReference(t, "EligibilityRequest", "enterer", element.getEnterer(), -1); + if (element.hasProvider()) + composeReference(t, "EligibilityRequest", "provider", element.getProvider(), -1); + if (element.hasOrganization()) + composeReference(t, "EligibilityRequest", "organization", element.getOrganization(), -1); + if (element.hasInsurer()) + composeReference(t, "EligibilityRequest", "insurer", element.getInsurer(), -1); + if (element.hasFacility()) + composeReference(t, "EligibilityRequest", "facility", element.getFacility(), -1); + if (element.hasCoverage()) + composeReference(t, "EligibilityRequest", "coverage", element.getCoverage(), -1); + if (element.hasBusinessArrangementElement()) + composeString(t, "EligibilityRequest", "businessArrangement", element.getBusinessArrangementElement(), -1); + if (element.hasBenefitCategory()) + composeCodeableConcept(t, "EligibilityRequest", "benefitCategory", element.getBenefitCategory(), -1); + if (element.hasBenefitSubCategory()) + composeCodeableConcept(t, "EligibilityRequest", "benefitSubCategory", element.getBenefitSubCategory(), -1); + } + + protected void composeEligibilityResponse(Complex parent, String parentType, String name, EligibilityResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "EligibilityResponse", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "EligibilityResponse", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "EligibilityResponse", "status", element.getStatusElement(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "EligibilityResponse", "created", element.getCreatedElement(), -1); + if (element.hasRequestProvider()) + composeReference(t, "EligibilityResponse", "requestProvider", element.getRequestProvider(), -1); + if (element.hasRequestOrganization()) + composeReference(t, "EligibilityResponse", "requestOrganization", element.getRequestOrganization(), -1); + if (element.hasRequest()) + composeReference(t, "EligibilityResponse", "request", element.getRequest(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "EligibilityResponse", "outcome", element.getOutcomeElement(), -1); + if (element.hasDispositionElement()) + composeString(t, "EligibilityResponse", "disposition", element.getDispositionElement(), -1); + if (element.hasInsurer()) + composeReference(t, "EligibilityResponse", "insurer", element.getInsurer(), -1); + if (element.hasInforceElement()) + composeBoolean(t, "EligibilityResponse", "inforce", element.getInforceElement(), -1); + for (int i = 0; i < element.getInsurance().size(); i++) + composeEligibilityResponseInsuranceComponent(t, "EligibilityResponse", "insurance", element.getInsurance().get(i), i); + if (element.hasForm()) + composeCodeableConcept(t, "EligibilityResponse", "form", element.getForm(), -1); + for (int i = 0; i < element.getError().size(); i++) + composeEligibilityResponseErrorsComponent(t, "EligibilityResponse", "error", element.getError().get(i), i); + } + + protected void composeEligibilityResponseInsuranceComponent(Complex parent, String parentType, String name, EligibilityResponse.InsuranceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "insurance", name, element, index); + if (element.hasCoverage()) + composeReference(t, "EligibilityResponse", "coverage", element.getCoverage(), -1); + if (element.hasContract()) + composeReference(t, "EligibilityResponse", "contract", element.getContract(), -1); + for (int i = 0; i < element.getBenefitBalance().size(); i++) + composeEligibilityResponseBenefitsComponent(t, "EligibilityResponse", "benefitBalance", element.getBenefitBalance().get(i), i); + } + + protected void composeEligibilityResponseBenefitsComponent(Complex parent, String parentType, String name, EligibilityResponse.BenefitsComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "benefitBalance", name, element, index); + if (element.hasCategory()) + composeCodeableConcept(t, "EligibilityResponse", "category", element.getCategory(), -1); + if (element.hasSubCategory()) + composeCodeableConcept(t, "EligibilityResponse", "subCategory", element.getSubCategory(), -1); + if (element.hasExcludedElement()) + composeBoolean(t, "EligibilityResponse", "excluded", element.getExcludedElement(), -1); + if (element.hasNameElement()) + composeString(t, "EligibilityResponse", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "EligibilityResponse", "description", element.getDescriptionElement(), -1); + if (element.hasNetwork()) + composeCodeableConcept(t, "EligibilityResponse", "network", element.getNetwork(), -1); + if (element.hasUnit()) + composeCodeableConcept(t, "EligibilityResponse", "unit", element.getUnit(), -1); + if (element.hasTerm()) + composeCodeableConcept(t, "EligibilityResponse", "term", element.getTerm(), -1); + for (int i = 0; i < element.getFinancial().size(); i++) + composeEligibilityResponseBenefitComponent(t, "EligibilityResponse", "financial", element.getFinancial().get(i), i); + } + + protected void composeEligibilityResponseBenefitComponent(Complex parent, String parentType, String name, EligibilityResponse.BenefitComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "financial", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "EligibilityResponse", "type", element.getType(), -1); + if (element.hasAllowed()) + composeType(t, "EligibilityResponse", "allowed", element.getAllowed(), -1); + if (element.hasUsed()) + composeType(t, "EligibilityResponse", "used", element.getUsed(), -1); + } + + protected void composeEligibilityResponseErrorsComponent(Complex parent, String parentType, String name, EligibilityResponse.ErrorsComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "error", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "EligibilityResponse", "code", element.getCode(), -1); + } + + protected void composeEncounter(Complex parent, String parentType, String name, Encounter element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Encounter", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Encounter", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Encounter", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getStatusHistory().size(); i++) + composeEncounterStatusHistoryComponent(t, "Encounter", "statusHistory", element.getStatusHistory().get(i), i); + if (element.hasClass_()) + composeCoding(t, "Encounter", "class", element.getClass_(), -1); + for (int i = 0; i < element.getClassHistory().size(); i++) + composeEncounterClassHistoryComponent(t, "Encounter", "classHistory", element.getClassHistory().get(i), i); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "Encounter", "type", element.getType().get(i), i); + if (element.hasPriority()) + composeCodeableConcept(t, "Encounter", "priority", element.getPriority(), -1); + if (element.hasSubject()) + composeReference(t, "Encounter", "subject", element.getSubject(), -1); + for (int i = 0; i < element.getEpisodeOfCare().size(); i++) + composeReference(t, "Encounter", "episodeOfCare", element.getEpisodeOfCare().get(i), i); + for (int i = 0; i < element.getIncomingReferral().size(); i++) + composeReference(t, "Encounter", "incomingReferral", element.getIncomingReferral().get(i), i); + for (int i = 0; i < element.getParticipant().size(); i++) + composeEncounterEncounterParticipantComponent(t, "Encounter", "participant", element.getParticipant().get(i), i); + if (element.hasAppointment()) + composeReference(t, "Encounter", "appointment", element.getAppointment(), -1); + if (element.hasPeriod()) + composePeriod(t, "Encounter", "period", element.getPeriod(), -1); + if (element.hasLength()) + composeDuration(t, "Encounter", "length", element.getLength(), -1); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "Encounter", "reason", element.getReason().get(i), i); + for (int i = 0; i < element.getDiagnosis().size(); i++) + composeEncounterDiagnosisComponent(t, "Encounter", "diagnosis", element.getDiagnosis().get(i), i); + for (int i = 0; i < element.getAccount().size(); i++) + composeReference(t, "Encounter", "account", element.getAccount().get(i), i); + if (element.hasHospitalization()) + composeEncounterEncounterHospitalizationComponent(t, "Encounter", "hospitalization", element.getHospitalization(), -1); + for (int i = 0; i < element.getLocation().size(); i++) + composeEncounterEncounterLocationComponent(t, "Encounter", "location", element.getLocation().get(i), i); + if (element.hasServiceProvider()) + composeReference(t, "Encounter", "serviceProvider", element.getServiceProvider(), -1); + if (element.hasPartOf()) + composeReference(t, "Encounter", "partOf", element.getPartOf(), -1); + } + + protected void composeEncounterStatusHistoryComponent(Complex parent, String parentType, String name, Encounter.StatusHistoryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "statusHistory", name, element, index); + if (element.hasStatusElement()) + composeEnum(t, "Encounter", "status", element.getStatusElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Encounter", "period", element.getPeriod(), -1); + } + + protected void composeEncounterClassHistoryComponent(Complex parent, String parentType, String name, Encounter.ClassHistoryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "classHistory", name, element, index); + if (element.hasClass_()) + composeCoding(t, "Encounter", "class", element.getClass_(), -1); + if (element.hasPeriod()) + composePeriod(t, "Encounter", "period", element.getPeriod(), -1); + } + + protected void composeEncounterEncounterParticipantComponent(Complex parent, String parentType, String name, Encounter.EncounterParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "Encounter", "type", element.getType().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "Encounter", "period", element.getPeriod(), -1); + if (element.hasIndividual()) + composeReference(t, "Encounter", "individual", element.getIndividual(), -1); + } + + protected void composeEncounterDiagnosisComponent(Complex parent, String parentType, String name, Encounter.DiagnosisComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "diagnosis", name, element, index); + if (element.hasCondition()) + composeReference(t, "Encounter", "condition", element.getCondition(), -1); + if (element.hasRole()) + composeCodeableConcept(t, "Encounter", "role", element.getRole(), -1); + if (element.hasRankElement()) + composePositiveInt(t, "Encounter", "rank", element.getRankElement(), -1); + } + + protected void composeEncounterEncounterHospitalizationComponent(Complex parent, String parentType, String name, Encounter.EncounterHospitalizationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "hospitalization", name, element, index); + if (element.hasPreAdmissionIdentifier()) + composeIdentifier(t, "Encounter", "preAdmissionIdentifier", element.getPreAdmissionIdentifier(), -1); + if (element.hasOrigin()) + composeReference(t, "Encounter", "origin", element.getOrigin(), -1); + if (element.hasAdmitSource()) + composeCodeableConcept(t, "Encounter", "admitSource", element.getAdmitSource(), -1); + if (element.hasReAdmission()) + composeCodeableConcept(t, "Encounter", "reAdmission", element.getReAdmission(), -1); + for (int i = 0; i < element.getDietPreference().size(); i++) + composeCodeableConcept(t, "Encounter", "dietPreference", element.getDietPreference().get(i), i); + for (int i = 0; i < element.getSpecialCourtesy().size(); i++) + composeCodeableConcept(t, "Encounter", "specialCourtesy", element.getSpecialCourtesy().get(i), i); + for (int i = 0; i < element.getSpecialArrangement().size(); i++) + composeCodeableConcept(t, "Encounter", "specialArrangement", element.getSpecialArrangement().get(i), i); + if (element.hasDestination()) + composeReference(t, "Encounter", "destination", element.getDestination(), -1); + if (element.hasDischargeDisposition()) + composeCodeableConcept(t, "Encounter", "dischargeDisposition", element.getDischargeDisposition(), -1); + } + + protected void composeEncounterEncounterLocationComponent(Complex parent, String parentType, String name, Encounter.EncounterLocationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "location", name, element, index); + if (element.hasLocation()) + composeReference(t, "Encounter", "location", element.getLocation(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Encounter", "status", element.getStatusElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Encounter", "period", element.getPeriod(), -1); + } + + protected void composeEndpoint(Complex parent, String parentType, String name, Endpoint element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Endpoint", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Endpoint", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Endpoint", "status", element.getStatusElement(), -1); + if (element.hasConnectionType()) + composeCoding(t, "Endpoint", "connectionType", element.getConnectionType(), -1); + if (element.hasNameElement()) + composeString(t, "Endpoint", "name", element.getNameElement(), -1); + if (element.hasManagingOrganization()) + composeReference(t, "Endpoint", "managingOrganization", element.getManagingOrganization(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactPoint(t, "Endpoint", "contact", element.getContact().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "Endpoint", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getPayloadType().size(); i++) + composeCodeableConcept(t, "Endpoint", "payloadType", element.getPayloadType().get(i), i); + for (int i = 0; i < element.getPayloadMimeType().size(); i++) + composeCode(t, "Endpoint", "payloadMimeType", element.getPayloadMimeType().get(i), i); + if (element.hasAddressElement()) + composeUri(t, "Endpoint", "address", element.getAddressElement(), -1); + for (int i = 0; i < element.getHeader().size(); i++) + composeString(t, "Endpoint", "header", element.getHeader().get(i), i); + } + + protected void composeEnrollmentRequest(Complex parent, String parentType, String name, EnrollmentRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "EnrollmentRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "EnrollmentRequest", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "EnrollmentRequest", "status", element.getStatusElement(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "EnrollmentRequest", "created", element.getCreatedElement(), -1); + if (element.hasInsurer()) + composeReference(t, "EnrollmentRequest", "insurer", element.getInsurer(), -1); + if (element.hasProvider()) + composeReference(t, "EnrollmentRequest", "provider", element.getProvider(), -1); + if (element.hasOrganization()) + composeReference(t, "EnrollmentRequest", "organization", element.getOrganization(), -1); + if (element.hasCandidate()) + composeReference(t, "EnrollmentRequest", "candidate", element.getCandidate(), -1); + if (element.hasCoverage()) + composeReference(t, "EnrollmentRequest", "coverage", element.getCoverage(), -1); + } + + protected void composeEnrollmentResponse(Complex parent, String parentType, String name, EnrollmentResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "EnrollmentResponse", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "EnrollmentResponse", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "EnrollmentResponse", "status", element.getStatusElement(), -1); + if (element.hasRequest()) + composeReference(t, "EnrollmentResponse", "request", element.getRequest(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "EnrollmentResponse", "outcome", element.getOutcomeElement(), -1); + if (element.hasDispositionElement()) + composeString(t, "EnrollmentResponse", "disposition", element.getDispositionElement(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "EnrollmentResponse", "created", element.getCreatedElement(), -1); + if (element.hasOrganization()) + composeReference(t, "EnrollmentResponse", "organization", element.getOrganization(), -1); + if (element.hasRequestProvider()) + composeReference(t, "EnrollmentResponse", "requestProvider", element.getRequestProvider(), -1); + if (element.hasRequestOrganization()) + composeReference(t, "EnrollmentResponse", "requestOrganization", element.getRequestOrganization(), -1); + } + + protected void composeEpisodeOfCare(Complex parent, String parentType, String name, EpisodeOfCare element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "EpisodeOfCare", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "EpisodeOfCare", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "EpisodeOfCare", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getStatusHistory().size(); i++) + composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(t, "EpisodeOfCare", "statusHistory", element.getStatusHistory().get(i), i); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "EpisodeOfCare", "type", element.getType().get(i), i); + for (int i = 0; i < element.getDiagnosis().size(); i++) + composeEpisodeOfCareDiagnosisComponent(t, "EpisodeOfCare", "diagnosis", element.getDiagnosis().get(i), i); + if (element.hasPatient()) + composeReference(t, "EpisodeOfCare", "patient", element.getPatient(), -1); + if (element.hasManagingOrganization()) + composeReference(t, "EpisodeOfCare", "managingOrganization", element.getManagingOrganization(), -1); + if (element.hasPeriod()) + composePeriod(t, "EpisodeOfCare", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getReferralRequest().size(); i++) + composeReference(t, "EpisodeOfCare", "referralRequest", element.getReferralRequest().get(i), i); + if (element.hasCareManager()) + composeReference(t, "EpisodeOfCare", "careManager", element.getCareManager(), -1); + for (int i = 0; i < element.getTeam().size(); i++) + composeReference(t, "EpisodeOfCare", "team", element.getTeam().get(i), i); + for (int i = 0; i < element.getAccount().size(); i++) + composeReference(t, "EpisodeOfCare", "account", element.getAccount().get(i), i); + } + + protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(Complex parent, String parentType, String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "statusHistory", name, element, index); + if (element.hasStatusElement()) + composeEnum(t, "EpisodeOfCare", "status", element.getStatusElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "EpisodeOfCare", "period", element.getPeriod(), -1); + } + + protected void composeEpisodeOfCareDiagnosisComponent(Complex parent, String parentType, String name, EpisodeOfCare.DiagnosisComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "diagnosis", name, element, index); + if (element.hasCondition()) + composeReference(t, "EpisodeOfCare", "condition", element.getCondition(), -1); + if (element.hasRole()) + composeCodeableConcept(t, "EpisodeOfCare", "role", element.getRole(), -1); + if (element.hasRankElement()) + composePositiveInt(t, "EpisodeOfCare", "rank", element.getRankElement(), -1); + } + + protected void composeEventDefinition(Complex parent, String parentType, String name, EventDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "EventDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "EventDefinition", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "EventDefinition", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "EventDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "EventDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "EventDefinition", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "EventDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "EventDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "EventDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "EventDefinition", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "EventDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "EventDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasUsageElement()) + composeString(t, "EventDefinition", "usage", element.getUsageElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "EventDefinition", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "EventDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "EventDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "EventDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "EventDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeCodeableConcept(t, "EventDefinition", "topic", element.getTopic().get(i), i); + for (int i = 0; i < element.getContributor().size(); i++) + composeContributor(t, "EventDefinition", "contributor", element.getContributor().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "EventDefinition", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "EventDefinition", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "EventDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); + if (element.hasTrigger()) + composeTriggerDefinition(t, "EventDefinition", "trigger", element.getTrigger(), -1); + } + + protected void composeExampleScenario(Complex parent, String parentType, String name, ExampleScenario element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ExampleScenario", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ExampleScenario", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ExampleScenario", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "ExampleScenario", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ExampleScenario", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ExampleScenario", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ExampleScenario", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ExampleScenario", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ExampleScenario", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ExampleScenario", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ExampleScenario", "contact", element.getContact().get(i), i); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ExampleScenario", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ExampleScenario", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "ExampleScenario", "copyright", element.getCopyrightElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "ExampleScenario", "purpose", element.getPurposeElement(), -1); + for (int i = 0; i < element.getActor().size(); i++) + composeExampleScenarioExampleScenarioActorComponent(t, "ExampleScenario", "actor", element.getActor().get(i), i); + for (int i = 0; i < element.getInstance().size(); i++) + composeExampleScenarioExampleScenarioInstanceComponent(t, "ExampleScenario", "instance", element.getInstance().get(i), i); + if (element.hasProcess()) + composeExampleScenarioExampleScenarioProcessComponent(t, "ExampleScenario", "process", element.getProcess(), -1); + for (int i = 0; i < element.getWorkflow().size(); i++) + composeReference(t, "ExampleScenario", "workflow", element.getWorkflow().get(i), i); + } + + protected void composeExampleScenarioExampleScenarioActorComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioActorComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "actor", name, element, index); + if (element.hasActorIdElement()) + composeString(t, "ExampleScenario", "actorId", element.getActorIdElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "ExampleScenario", "type", element.getTypeElement(), -1); + if (element.hasNameElement()) + composeString(t, "ExampleScenario", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + } + + protected void composeExampleScenarioExampleScenarioInstanceComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioInstanceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "instance", name, element, index); + if (element.hasResourceIdElement()) + composeString(t, "ExampleScenario", "resourceId", element.getResourceIdElement(), -1); + if (element.hasResourceTypeElement()) + composeEnum(t, "ExampleScenario", "resourceType", element.getResourceTypeElement(), -1); + if (element.hasNameElement()) + composeString(t, "ExampleScenario", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getVersion().size(); i++) + composeExampleScenarioExampleScenarioInstanceVersionComponent(t, "ExampleScenario", "version", element.getVersion().get(i), i); + for (int i = 0; i < element.getContainedInstance().size(); i++) + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(t, "ExampleScenario", "containedInstance", element.getContainedInstance().get(i), i); + } + + protected void composeExampleScenarioExampleScenarioInstanceVersionComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioInstanceVersionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "version", name, element, index); + if (element.hasVersionIdElement()) + composeString(t, "ExampleScenario", "versionId", element.getVersionIdElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + } + + protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "containedInstance", name, element, index); + if (element.hasResourceIdElement()) + composeString(t, "ExampleScenario", "resourceId", element.getResourceIdElement(), -1); + if (element.hasVersionIdElement()) + composeString(t, "ExampleScenario", "versionId", element.getVersionIdElement(), -1); + } + + protected void composeExampleScenarioExampleScenarioProcessComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioProcessComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "process", name, element, index); + if (element.hasTitleElement()) + composeString(t, "ExampleScenario", "title", element.getTitleElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + if (element.hasPreConditionsElement()) + composeMarkdown(t, "ExampleScenario", "preConditions", element.getPreConditionsElement(), -1); + if (element.hasPostConditionsElement()) + composeMarkdown(t, "ExampleScenario", "postConditions", element.getPostConditionsElement(), -1); + for (int i = 0; i < element.getStep().size(); i++) + composeExampleScenarioExampleScenarioProcessStepComponent(t, "ExampleScenario", "step", element.getStep().get(i), i); + } + + protected void composeExampleScenarioExampleScenarioProcessStepComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioProcessStepComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "step", name, element, index); + for (int i = 0; i < element.getProcess().size(); i++) + composeExampleScenarioExampleScenarioProcessComponent(t, "ExampleScenario", "process", element.getProcess().get(i), i); + if (element.hasPauseElement()) + composeBoolean(t, "ExampleScenario", "pause", element.getPauseElement(), -1); + if (element.hasOperation()) + composeExampleScenarioExampleScenarioProcessStepOperationComponent(t, "ExampleScenario", "operation", element.getOperation(), -1); + if (element.hasAlternative()) + composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(t, "ExampleScenario", "alternative", element.getAlternative(), -1); + } + + protected void composeExampleScenarioExampleScenarioProcessStepOperationComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioProcessStepOperationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "operation", name, element, index); + if (element.hasNumberElement()) + composeString(t, "ExampleScenario", "number", element.getNumberElement(), -1); + if (element.hasTypeElement()) + composeString(t, "ExampleScenario", "type", element.getTypeElement(), -1); + if (element.hasNameElement()) + composeString(t, "ExampleScenario", "name", element.getNameElement(), -1); + if (element.hasInitiatorElement()) + composeString(t, "ExampleScenario", "initiator", element.getInitiatorElement(), -1); + if (element.hasReceiverElement()) + composeString(t, "ExampleScenario", "receiver", element.getReceiverElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + if (element.hasInitiatorActiveElement()) + composeBoolean(t, "ExampleScenario", "initiatorActive", element.getInitiatorActiveElement(), -1); + if (element.hasReceiverActiveElement()) + composeBoolean(t, "ExampleScenario", "receiverActive", element.getReceiverActiveElement(), -1); + if (element.hasRequest()) + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(t, "ExampleScenario", "request", element.getRequest(), -1); + if (element.hasResponse()) + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(t, "ExampleScenario", "response", element.getResponse(), -1); + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "alternative", name, element, index); + if (element.hasNameElement()) + composeString(t, "ExampleScenario", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getOption().size(); i++) + composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(t, "ExampleScenario", "option", element.getOption().get(i), i); + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(Complex parent, String parentType, String name, ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "option", name, element, index); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExampleScenario", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getStep().size(); i++) + composeExampleScenarioExampleScenarioProcessStepComponent(t, "ExampleScenario", "step", element.getStep().get(i), i); + for (int i = 0; i < element.getPause().size(); i++) + composeBoolean(t, "ExampleScenario", "pause", element.getPause().get(i), i); + } + + protected void composeExpansionProfile(Complex parent, String parentType, String name, ExpansionProfile element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ExpansionProfile", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ExpansionProfile", "url", element.getUrlElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "ExpansionProfile", "identifier", element.getIdentifier(), -1); + if (element.hasVersionElement()) + composeString(t, "ExpansionProfile", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ExpansionProfile", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ExpansionProfile", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ExpansionProfile", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ExpansionProfile", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ExpansionProfile", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ExpansionProfile", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ExpansionProfile", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ExpansionProfile", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ExpansionProfile", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getFixedVersion().size(); i++) + composeExpansionProfileExpansionProfileFixedVersionComponent(t, "ExpansionProfile", "fixedVersion", element.getFixedVersion().get(i), i); + if (element.hasExcludedSystem()) + composeExpansionProfileExpansionProfileExcludedSystemComponent(t, "ExpansionProfile", "excludedSystem", element.getExcludedSystem(), -1); + if (element.hasIncludeDesignationsElement()) + composeBoolean(t, "ExpansionProfile", "includeDesignations", element.getIncludeDesignationsElement(), -1); + if (element.hasDesignation()) + composeExpansionProfileExpansionProfileDesignationComponent(t, "ExpansionProfile", "designation", element.getDesignation(), -1); + if (element.hasIncludeDefinitionElement()) + composeBoolean(t, "ExpansionProfile", "includeDefinition", element.getIncludeDefinitionElement(), -1); + if (element.hasActiveOnlyElement()) + composeBoolean(t, "ExpansionProfile", "activeOnly", element.getActiveOnlyElement(), -1); + if (element.hasExcludeNestedElement()) + composeBoolean(t, "ExpansionProfile", "excludeNested", element.getExcludeNestedElement(), -1); + if (element.hasExcludeNotForUIElement()) + composeBoolean(t, "ExpansionProfile", "excludeNotForUI", element.getExcludeNotForUIElement(), -1); + if (element.hasExcludePostCoordinatedElement()) + composeBoolean(t, "ExpansionProfile", "excludePostCoordinated", element.getExcludePostCoordinatedElement(), -1); + if (element.hasDisplayLanguageElement()) + composeCode(t, "ExpansionProfile", "displayLanguage", element.getDisplayLanguageElement(), -1); + if (element.hasLimitedExpansionElement()) + composeBoolean(t, "ExpansionProfile", "limitedExpansion", element.getLimitedExpansionElement(), -1); + } + + protected void composeExpansionProfileExpansionProfileFixedVersionComponent(Complex parent, String parentType, String name, ExpansionProfile.ExpansionProfileFixedVersionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "fixedVersion", name, element, index); + if (element.hasSystemElement()) + composeUri(t, "ExpansionProfile", "system", element.getSystemElement(), -1); + if (element.hasVersionElement()) + composeString(t, "ExpansionProfile", "version", element.getVersionElement(), -1); + if (element.hasModeElement()) + composeEnum(t, "ExpansionProfile", "mode", element.getModeElement(), -1); + } + + protected void composeExpansionProfileExpansionProfileExcludedSystemComponent(Complex parent, String parentType, String name, ExpansionProfile.ExpansionProfileExcludedSystemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "excludedSystem", name, element, index); + if (element.hasSystemElement()) + composeUri(t, "ExpansionProfile", "system", element.getSystemElement(), -1); + if (element.hasVersionElement()) + composeString(t, "ExpansionProfile", "version", element.getVersionElement(), -1); + } + + protected void composeExpansionProfileExpansionProfileDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.ExpansionProfileDesignationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "designation", name, element, index); + if (element.hasInclude()) + composeExpansionProfileDesignationIncludeComponent(t, "ExpansionProfile", "include", element.getInclude(), -1); + if (element.hasExclude()) + composeExpansionProfileDesignationExcludeComponent(t, "ExpansionProfile", "exclude", element.getExclude(), -1); + } + + protected void composeExpansionProfileDesignationIncludeComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationIncludeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "include", name, element, index); + for (int i = 0; i < element.getDesignation().size(); i++) + composeExpansionProfileDesignationIncludeDesignationComponent(t, "ExpansionProfile", "designation", element.getDesignation().get(i), i); + } + + protected void composeExpansionProfileDesignationIncludeDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationIncludeDesignationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "designation", name, element, index); + if (element.hasLanguageElement()) + composeCode(t, "ExpansionProfile", "language", element.getLanguageElement(), -1); + if (element.hasUse()) + composeCoding(t, "ExpansionProfile", "use", element.getUse(), -1); + } + + protected void composeExpansionProfileDesignationExcludeComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationExcludeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "exclude", name, element, index); + for (int i = 0; i < element.getDesignation().size(); i++) + composeExpansionProfileDesignationExcludeDesignationComponent(t, "ExpansionProfile", "designation", element.getDesignation().get(i), i); + } + + protected void composeExpansionProfileDesignationExcludeDesignationComponent(Complex parent, String parentType, String name, ExpansionProfile.DesignationExcludeDesignationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "designation", name, element, index); + if (element.hasLanguageElement()) + composeCode(t, "ExpansionProfile", "language", element.getLanguageElement(), -1); + if (element.hasUse()) + composeCoding(t, "ExpansionProfile", "use", element.getUse(), -1); + } + + protected void composeExplanationOfBenefit(Complex parent, String parentType, String name, ExplanationOfBenefit element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ExplanationOfBenefit", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ExplanationOfBenefit", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); + for (int i = 0; i < element.getSubType().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "subType", element.getSubType().get(i), i); + if (element.hasPatient()) + composeReference(t, "ExplanationOfBenefit", "patient", element.getPatient(), -1); + if (element.hasBillablePeriod()) + composePeriod(t, "ExplanationOfBenefit", "billablePeriod", element.getBillablePeriod(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "ExplanationOfBenefit", "created", element.getCreatedElement(), -1); + if (element.hasEnterer()) + composeReference(t, "ExplanationOfBenefit", "enterer", element.getEnterer(), -1); + if (element.hasInsurer()) + composeReference(t, "ExplanationOfBenefit", "insurer", element.getInsurer(), -1); + if (element.hasProvider()) + composeReference(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1); + if (element.hasOrganization()) + composeReference(t, "ExplanationOfBenefit", "organization", element.getOrganization(), -1); + if (element.hasReferral()) + composeReference(t, "ExplanationOfBenefit", "referral", element.getReferral(), -1); + if (element.hasFacility()) + composeReference(t, "ExplanationOfBenefit", "facility", element.getFacility(), -1); + if (element.hasClaim()) + composeReference(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1); + if (element.hasClaimResponse()) + composeReference(t, "ExplanationOfBenefit", "claimResponse", element.getClaimResponse(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "ExplanationOfBenefit", "outcome", element.getOutcomeElement(), -1); + if (element.hasDispositionElement()) + composeString(t, "ExplanationOfBenefit", "disposition", element.getDispositionElement(), -1); + for (int i = 0; i < element.getRelated().size(); i++) + composeExplanationOfBenefitRelatedClaimComponent(t, "ExplanationOfBenefit", "related", element.getRelated().get(i), i); + if (element.hasPrescription()) + composeReference(t, "ExplanationOfBenefit", "prescription", element.getPrescription(), -1); + if (element.hasOriginalPrescription()) + composeReference(t, "ExplanationOfBenefit", "originalPrescription", element.getOriginalPrescription(), -1); + if (element.hasPayee()) + composeExplanationOfBenefitPayeeComponent(t, "ExplanationOfBenefit", "payee", element.getPayee(), -1); + for (int i = 0; i < element.getInformation().size(); i++) + composeExplanationOfBenefitSupportingInformationComponent(t, "ExplanationOfBenefit", "information", element.getInformation().get(i), i); + for (int i = 0; i < element.getCareTeam().size(); i++) + composeExplanationOfBenefitCareTeamComponent(t, "ExplanationOfBenefit", "careTeam", element.getCareTeam().get(i), i); + for (int i = 0; i < element.getDiagnosis().size(); i++) + composeExplanationOfBenefitDiagnosisComponent(t, "ExplanationOfBenefit", "diagnosis", element.getDiagnosis().get(i), i); + for (int i = 0; i < element.getProcedure().size(); i++) + composeExplanationOfBenefitProcedureComponent(t, "ExplanationOfBenefit", "procedure", element.getProcedure().get(i), i); + if (element.hasPrecedenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "precedence", element.getPrecedenceElement(), -1); + if (element.hasInsurance()) + composeExplanationOfBenefitInsuranceComponent(t, "ExplanationOfBenefit", "insurance", element.getInsurance(), -1); + if (element.hasAccident()) + composeExplanationOfBenefitAccidentComponent(t, "ExplanationOfBenefit", "accident", element.getAccident(), -1); + if (element.hasEmploymentImpacted()) + composePeriod(t, "ExplanationOfBenefit", "employmentImpacted", element.getEmploymentImpacted(), -1); + if (element.hasHospitalization()) + composePeriod(t, "ExplanationOfBenefit", "hospitalization", element.getHospitalization(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeExplanationOfBenefitItemComponent(t, "ExplanationOfBenefit", "item", element.getItem().get(i), i); + for (int i = 0; i < element.getAddItem().size(); i++) + composeExplanationOfBenefitAddedItemComponent(t, "ExplanationOfBenefit", "addItem", element.getAddItem().get(i), i); + if (element.hasTotalCost()) + composeMoney(t, "ExplanationOfBenefit", "totalCost", element.getTotalCost(), -1); + if (element.hasUnallocDeductable()) + composeMoney(t, "ExplanationOfBenefit", "unallocDeductable", element.getUnallocDeductable(), -1); + if (element.hasTotalBenefit()) + composeMoney(t, "ExplanationOfBenefit", "totalBenefit", element.getTotalBenefit(), -1); + if (element.hasPayment()) + composeExplanationOfBenefitPaymentComponent(t, "ExplanationOfBenefit", "payment", element.getPayment(), -1); + if (element.hasForm()) + composeCodeableConcept(t, "ExplanationOfBenefit", "form", element.getForm(), -1); + for (int i = 0; i < element.getProcessNote().size(); i++) + composeExplanationOfBenefitNoteComponent(t, "ExplanationOfBenefit", "processNote", element.getProcessNote().get(i), i); + for (int i = 0; i < element.getBenefitBalance().size(); i++) + composeExplanationOfBenefitBenefitBalanceComponent(t, "ExplanationOfBenefit", "benefitBalance", element.getBenefitBalance().get(i), i); + } + + protected void composeExplanationOfBenefitRelatedClaimComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.RelatedClaimComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "related", name, element, index); + if (element.hasClaim()) + composeReference(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1); + if (element.hasRelationship()) + composeCodeableConcept(t, "ExplanationOfBenefit", "relationship", element.getRelationship(), -1); + if (element.hasReference()) + composeIdentifier(t, "ExplanationOfBenefit", "reference", element.getReference(), -1); + } + + protected void composeExplanationOfBenefitPayeeComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.PayeeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "payee", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); + if (element.hasResource()) + composeCoding(t, "ExplanationOfBenefit", "resource", element.getResource(), -1); + if (element.hasParty()) + composeReference(t, "ExplanationOfBenefit", "party", element.getParty(), -1); + } + + protected void composeExplanationOfBenefitSupportingInformationComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.SupportingInformationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "information", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "ExplanationOfBenefit", "code", element.getCode(), -1); + if (element.hasTiming()) + composeType(t, "ExplanationOfBenefit", "timing", element.getTiming(), -1); + if (element.hasValue()) + composeType(t, "ExplanationOfBenefit", "value", element.getValue(), -1); + if (element.hasReason()) + composeCoding(t, "ExplanationOfBenefit", "reason", element.getReason(), -1); + } + + protected void composeExplanationOfBenefitCareTeamComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.CareTeamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "careTeam", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + if (element.hasProvider()) + composeReference(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1); + if (element.hasResponsibleElement()) + composeBoolean(t, "ExplanationOfBenefit", "responsible", element.getResponsibleElement(), -1); + if (element.hasRole()) + composeCodeableConcept(t, "ExplanationOfBenefit", "role", element.getRole(), -1); + if (element.hasQualification()) + composeCodeableConcept(t, "ExplanationOfBenefit", "qualification", element.getQualification(), -1); + } + + protected void composeExplanationOfBenefitDiagnosisComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.DiagnosisComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "diagnosis", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + if (element.hasDiagnosis()) + composeType(t, "ExplanationOfBenefit", "diagnosis", element.getDiagnosis(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType().get(i), i); + if (element.hasPackageCode()) + composeCodeableConcept(t, "ExplanationOfBenefit", "packageCode", element.getPackageCode(), -1); + } + + protected void composeExplanationOfBenefitProcedureComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.ProcedureComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "procedure", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1); + if (element.hasProcedure()) + composeType(t, "ExplanationOfBenefit", "procedure", element.getProcedure(), -1); + } + + protected void composeExplanationOfBenefitInsuranceComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.InsuranceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "insurance", name, element, index); + if (element.hasCoverage()) + composeReference(t, "ExplanationOfBenefit", "coverage", element.getCoverage(), -1); + for (int i = 0; i < element.getPreAuthRef().size(); i++) + composeString(t, "ExplanationOfBenefit", "preAuthRef", element.getPreAuthRef().get(i), i); + } + + protected void composeExplanationOfBenefitAccidentComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.AccidentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "accident", name, element, index); + if (element.hasDateElement()) + composeDate(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); + if (element.hasLocation()) + composeType(t, "ExplanationOfBenefit", "location", element.getLocation(), -1); + } + + protected void composeExplanationOfBenefitItemComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.ItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + for (int i = 0; i < element.getCareTeamLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "careTeamLinkId", element.getCareTeamLinkId().get(i), i); + for (int i = 0; i < element.getDiagnosisLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "diagnosisLinkId", element.getDiagnosisLinkId().get(i), i); + for (int i = 0; i < element.getProcedureLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "procedureLinkId", element.getProcedureLinkId().get(i), i); + for (int i = 0; i < element.getInformationLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "informationLinkId", element.getInformationLinkId().get(i), i); + if (element.hasRevenue()) + composeCodeableConcept(t, "ExplanationOfBenefit", "revenue", element.getRevenue(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); + if (element.hasService()) + composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getProgramCode().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "programCode", element.getProgramCode().get(i), i); + if (element.hasServiced()) + composeType(t, "ExplanationOfBenefit", "serviced", element.getServiced(), -1); + if (element.hasLocation()) + composeType(t, "ExplanationOfBenefit", "location", element.getLocation(), -1); + if (element.hasQuantity()) + composeQuantity(t, "ExplanationOfBenefit", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "ExplanationOfBenefit", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "ExplanationOfBenefit", "factor", element.getFactorElement(), -1); + if (element.hasNet()) + composeMoney(t, "ExplanationOfBenefit", "net", element.getNet(), -1); + for (int i = 0; i < element.getUdi().size(); i++) + composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i); + if (element.hasBodySite()) + composeCodeableConcept(t, "ExplanationOfBenefit", "bodySite", element.getBodySite(), -1); + for (int i = 0; i < element.getSubSite().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "subSite", element.getSubSite().get(i), i); + for (int i = 0; i < element.getEncounter().size(); i++) + composeReference(t, "ExplanationOfBenefit", "encounter", element.getEncounter().get(i), i); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); + for (int i = 0; i < element.getDetail().size(); i++) + composeExplanationOfBenefitDetailComponent(t, "ExplanationOfBenefit", "detail", element.getDetail().get(i), i); + } + + protected void composeExplanationOfBenefitAdjudicationComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.AdjudicationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "adjudication", name, element, index); + if (element.hasCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); + if (element.hasReason()) + composeCodeableConcept(t, "ExplanationOfBenefit", "reason", element.getReason(), -1); + if (element.hasAmount()) + composeMoney(t, "ExplanationOfBenefit", "amount", element.getAmount(), -1); + if (element.hasValueElement()) + composeDecimal(t, "ExplanationOfBenefit", "value", element.getValueElement(), -1); + } + + protected void composeExplanationOfBenefitDetailComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.DetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "detail", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + if (element.hasRevenue()) + composeCodeableConcept(t, "ExplanationOfBenefit", "revenue", element.getRevenue(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); + if (element.hasService()) + composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getProgramCode().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "programCode", element.getProgramCode().get(i), i); + if (element.hasQuantity()) + composeQuantity(t, "ExplanationOfBenefit", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "ExplanationOfBenefit", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "ExplanationOfBenefit", "factor", element.getFactorElement(), -1); + if (element.hasNet()) + composeMoney(t, "ExplanationOfBenefit", "net", element.getNet(), -1); + for (int i = 0; i < element.getUdi().size(); i++) + composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); + for (int i = 0; i < element.getSubDetail().size(); i++) + composeExplanationOfBenefitSubDetailComponent(t, "ExplanationOfBenefit", "subDetail", element.getSubDetail().get(i), i); + } + + protected void composeExplanationOfBenefitSubDetailComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.SubDetailComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "subDetail", name, element, index); + if (element.hasSequenceElement()) + composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1); + if (element.hasRevenue()) + composeCodeableConcept(t, "ExplanationOfBenefit", "revenue", element.getRevenue(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); + if (element.hasService()) + composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getProgramCode().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "programCode", element.getProgramCode().get(i), i); + if (element.hasQuantity()) + composeQuantity(t, "ExplanationOfBenefit", "quantity", element.getQuantity(), -1); + if (element.hasUnitPrice()) + composeMoney(t, "ExplanationOfBenefit", "unitPrice", element.getUnitPrice(), -1); + if (element.hasFactorElement()) + composeDecimal(t, "ExplanationOfBenefit", "factor", element.getFactorElement(), -1); + if (element.hasNet()) + composeMoney(t, "ExplanationOfBenefit", "net", element.getNet(), -1); + for (int i = 0; i < element.getUdi().size(); i++) + composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); + } + + protected void composeExplanationOfBenefitAddedItemComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.AddedItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "addItem", name, element, index); + for (int i = 0; i < element.getSequenceLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "sequenceLinkId", element.getSequenceLinkId().get(i), i); + for (int i = 0; i < element.getDetailSequenceLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "detailSequenceLinkId", element.getDetailSequenceLinkId().get(i), i); + for (int i = 0; i < element.getSubdetailSequenceLinkId().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "subdetailSequenceLinkId", element.getSubdetailSequenceLinkId().get(i), i); + if (element.hasService()) + composeCodeableConcept(t, "ExplanationOfBenefit", "service", element.getService(), -1); + for (int i = 0; i < element.getModifier().size(); i++) + composeCodeableConcept(t, "ExplanationOfBenefit", "modifier", element.getModifier().get(i), i); + if (element.hasFee()) + composeMoney(t, "ExplanationOfBenefit", "fee", element.getFee(), -1); + for (int i = 0; i < element.getNoteNumber().size(); i++) + composePositiveInt(t, "ExplanationOfBenefit", "noteNumber", element.getNoteNumber().get(i), i); + for (int i = 0; i < element.getAdjudication().size(); i++) + composeExplanationOfBenefitAdjudicationComponent(t, "ExplanationOfBenefit", "adjudication", element.getAdjudication().get(i), i); + } + + protected void composeExplanationOfBenefitPaymentComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.PaymentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "payment", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); + if (element.hasAdjustment()) + composeMoney(t, "ExplanationOfBenefit", "adjustment", element.getAdjustment(), -1); + if (element.hasAdjustmentReason()) + composeCodeableConcept(t, "ExplanationOfBenefit", "adjustmentReason", element.getAdjustmentReason(), -1); + if (element.hasDateElement()) + composeDate(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1); + if (element.hasAmount()) + composeMoney(t, "ExplanationOfBenefit", "amount", element.getAmount(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier(), -1); + } + + protected void composeExplanationOfBenefitNoteComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.NoteComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "processNote", name, element, index); + if (element.hasNumberElement()) + composePositiveInt(t, "ExplanationOfBenefit", "number", element.getNumberElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "ExplanationOfBenefit", "type", element.getTypeElement(), -1); + if (element.hasTextElement()) + composeString(t, "ExplanationOfBenefit", "text", element.getTextElement(), -1); + if (element.hasLanguage()) + composeCodeableConcept(t, "ExplanationOfBenefit", "language", element.getLanguage(), -1); + } + + protected void composeExplanationOfBenefitBenefitBalanceComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.BenefitBalanceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "benefitBalance", name, element, index); + if (element.hasCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1); + if (element.hasSubCategory()) + composeCodeableConcept(t, "ExplanationOfBenefit", "subCategory", element.getSubCategory(), -1); + if (element.hasExcludedElement()) + composeBoolean(t, "ExplanationOfBenefit", "excluded", element.getExcludedElement(), -1); + if (element.hasNameElement()) + composeString(t, "ExplanationOfBenefit", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ExplanationOfBenefit", "description", element.getDescriptionElement(), -1); + if (element.hasNetwork()) + composeCodeableConcept(t, "ExplanationOfBenefit", "network", element.getNetwork(), -1); + if (element.hasUnit()) + composeCodeableConcept(t, "ExplanationOfBenefit", "unit", element.getUnit(), -1); + if (element.hasTerm()) + composeCodeableConcept(t, "ExplanationOfBenefit", "term", element.getTerm(), -1); + for (int i = 0; i < element.getFinancial().size(); i++) + composeExplanationOfBenefitBenefitComponent(t, "ExplanationOfBenefit", "financial", element.getFinancial().get(i), i); + } + + protected void composeExplanationOfBenefitBenefitComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.BenefitComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "financial", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1); + if (element.hasAllowed()) + composeType(t, "ExplanationOfBenefit", "allowed", element.getAllowed(), -1); + if (element.hasUsed()) + composeType(t, "ExplanationOfBenefit", "used", element.getUsed(), -1); + } + + protected void composeFamilyMemberHistory(Complex parent, String parentType, String name, FamilyMemberHistory element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "FamilyMemberHistory", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "FamilyMemberHistory", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "FamilyMemberHistory", "definition", element.getDefinition().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "FamilyMemberHistory", "status", element.getStatusElement(), -1); + if (element.hasDataAbsentReason()) + composeCodeableConcept(t, "FamilyMemberHistory", "dataAbsentReason", element.getDataAbsentReason(), -1); + if (element.hasPatient()) + composeReference(t, "FamilyMemberHistory", "patient", element.getPatient(), -1); + if (element.hasDateElement()) + composeDateTime(t, "FamilyMemberHistory", "date", element.getDateElement(), -1); + if (element.hasNameElement()) + composeString(t, "FamilyMemberHistory", "name", element.getNameElement(), -1); + if (element.hasRelationship()) + composeCodeableConcept(t, "FamilyMemberHistory", "relationship", element.getRelationship(), -1); + if (element.hasGenderElement()) + composeEnum(t, "FamilyMemberHistory", "gender", element.getGenderElement(), -1); + if (element.hasBorn()) + composeType(t, "FamilyMemberHistory", "born", element.getBorn(), -1); + if (element.hasAge()) + composeType(t, "FamilyMemberHistory", "age", element.getAge(), -1); + if (element.hasEstimatedAgeElement()) + composeBoolean(t, "FamilyMemberHistory", "estimatedAge", element.getEstimatedAgeElement(), -1); + if (element.hasDeceased()) + composeType(t, "FamilyMemberHistory", "deceased", element.getDeceased(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "FamilyMemberHistory", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "FamilyMemberHistory", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "FamilyMemberHistory", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getCondition().size(); i++) + composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(t, "FamilyMemberHistory", "condition", element.getCondition().get(i), i); + } + + protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(Complex parent, String parentType, String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "condition", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "FamilyMemberHistory", "code", element.getCode(), -1); + if (element.hasOutcome()) + composeCodeableConcept(t, "FamilyMemberHistory", "outcome", element.getOutcome(), -1); + if (element.hasOnset()) + composeType(t, "FamilyMemberHistory", "onset", element.getOnset(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "FamilyMemberHistory", "note", element.getNote().get(i), i); + } + + protected void composeFlag(Complex parent, String parentType, String name, Flag element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Flag", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Flag", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Flag", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Flag", "category", element.getCategory().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "Flag", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "Flag", "subject", element.getSubject(), -1); + if (element.hasPeriod()) + composePeriod(t, "Flag", "period", element.getPeriod(), -1); + if (element.hasEncounter()) + composeReference(t, "Flag", "encounter", element.getEncounter(), -1); + if (element.hasAuthor()) + composeReference(t, "Flag", "author", element.getAuthor(), -1); + } + + protected void composeGoal(Complex parent, String parentType, String name, Goal element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Goal", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Goal", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Goal", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Goal", "category", element.getCategory().get(i), i); + if (element.hasPriority()) + composeCodeableConcept(t, "Goal", "priority", element.getPriority(), -1); + if (element.hasDescription()) + composeCodeableConcept(t, "Goal", "description", element.getDescription(), -1); + if (element.hasSubject()) + composeReference(t, "Goal", "subject", element.getSubject(), -1); + if (element.hasStart()) + composeType(t, "Goal", "start", element.getStart(), -1); + if (element.hasTarget()) + composeGoalGoalTargetComponent(t, "Goal", "target", element.getTarget(), -1); + if (element.hasStatusDateElement()) + composeDate(t, "Goal", "statusDate", element.getStatusDateElement(), -1); + if (element.hasStatusReasonElement()) + composeString(t, "Goal", "statusReason", element.getStatusReasonElement(), -1); + if (element.hasExpressedBy()) + composeReference(t, "Goal", "expressedBy", element.getExpressedBy(), -1); + for (int i = 0; i < element.getAddresses().size(); i++) + composeReference(t, "Goal", "addresses", element.getAddresses().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Goal", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getOutcomeCode().size(); i++) + composeCodeableConcept(t, "Goal", "outcomeCode", element.getOutcomeCode().get(i), i); + for (int i = 0; i < element.getOutcomeReference().size(); i++) + composeReference(t, "Goal", "outcomeReference", element.getOutcomeReference().get(i), i); + } + + protected void composeGoalGoalTargetComponent(Complex parent, String parentType, String name, Goal.GoalTargetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "target", name, element, index); + if (element.hasMeasure()) + composeCodeableConcept(t, "Goal", "measure", element.getMeasure(), -1); + if (element.hasDetail()) + composeType(t, "Goal", "detail", element.getDetail(), -1); + if (element.hasDue()) + composeType(t, "Goal", "due", element.getDue(), -1); + } + + protected void composeGraphDefinition(Complex parent, String parentType, String name, GraphDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "GraphDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "GraphDefinition", "url", element.getUrlElement(), -1); + if (element.hasVersionElement()) + composeString(t, "GraphDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "GraphDefinition", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "GraphDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "GraphDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "GraphDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "GraphDefinition", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "GraphDefinition", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "GraphDefinition", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "GraphDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "GraphDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "GraphDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasStartElement()) + composeCode(t, "GraphDefinition", "start", element.getStartElement(), -1); + if (element.hasProfileElement()) + composeUri(t, "GraphDefinition", "profile", element.getProfileElement(), -1); + for (int i = 0; i < element.getLink().size(); i++) + composeGraphDefinitionGraphDefinitionLinkComponent(t, "GraphDefinition", "link", element.getLink().get(i), i); + } + + protected void composeGraphDefinitionGraphDefinitionLinkComponent(Complex parent, String parentType, String name, GraphDefinition.GraphDefinitionLinkComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "link", name, element, index); + if (element.hasPathElement()) + composeString(t, "GraphDefinition", "path", element.getPathElement(), -1); + if (element.hasSliceNameElement()) + composeString(t, "GraphDefinition", "sliceName", element.getSliceNameElement(), -1); + if (element.hasMinElement()) + composeInteger(t, "GraphDefinition", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "GraphDefinition", "max", element.getMaxElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "GraphDefinition", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getTarget().size(); i++) + composeGraphDefinitionGraphDefinitionLinkTargetComponent(t, "GraphDefinition", "target", element.getTarget().get(i), i); + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(Complex parent, String parentType, String name, GraphDefinition.GraphDefinitionLinkTargetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "target", name, element, index); + if (element.hasTypeElement()) + composeCode(t, "GraphDefinition", "type", element.getTypeElement(), -1); + if (element.hasParamsElement()) + composeString(t, "GraphDefinition", "params", element.getParamsElement(), -1); + if (element.hasProfileElement()) + composeUri(t, "GraphDefinition", "profile", element.getProfileElement(), -1); + for (int i = 0; i < element.getCompartment().size(); i++) + composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(t, "GraphDefinition", "compartment", element.getCompartment().get(i), i); + for (int i = 0; i < element.getLink().size(); i++) + composeGraphDefinitionGraphDefinitionLinkComponent(t, "GraphDefinition", "link", element.getLink().get(i), i); + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(Complex parent, String parentType, String name, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "compartment", name, element, index); + if (element.hasUseElement()) + composeEnum(t, "GraphDefinition", "use", element.getUseElement(), -1); + if (element.hasCodeElement()) + composeEnum(t, "GraphDefinition", "code", element.getCodeElement(), -1); + if (element.hasRuleElement()) + composeEnum(t, "GraphDefinition", "rule", element.getRuleElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "GraphDefinition", "expression", element.getExpressionElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "GraphDefinition", "description", element.getDescriptionElement(), -1); + } + + protected void composeGroup(Complex parent, String parentType, String name, Group element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Group", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Group", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "Group", "active", element.getActiveElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "Group", "type", element.getTypeElement(), -1); + if (element.hasActualElement()) + composeBoolean(t, "Group", "actual", element.getActualElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Group", "code", element.getCode(), -1); + if (element.hasNameElement()) + composeString(t, "Group", "name", element.getNameElement(), -1); + if (element.hasQuantityElement()) + composeUnsignedInt(t, "Group", "quantity", element.getQuantityElement(), -1); + for (int i = 0; i < element.getCharacteristic().size(); i++) + composeGroupGroupCharacteristicComponent(t, "Group", "characteristic", element.getCharacteristic().get(i), i); + for (int i = 0; i < element.getMember().size(); i++) + composeGroupGroupMemberComponent(t, "Group", "member", element.getMember().get(i), i); + } + + protected void composeGroupGroupCharacteristicComponent(Complex parent, String parentType, String name, Group.GroupCharacteristicComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "characteristic", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "Group", "code", element.getCode(), -1); + if (element.hasValue()) + composeType(t, "Group", "value", element.getValue(), -1); + if (element.hasExcludeElement()) + composeBoolean(t, "Group", "exclude", element.getExcludeElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Group", "period", element.getPeriod(), -1); + } + + protected void composeGroupGroupMemberComponent(Complex parent, String parentType, String name, Group.GroupMemberComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "member", name, element, index); + if (element.hasEntity()) + composeReference(t, "Group", "entity", element.getEntity(), -1); + if (element.hasPeriod()) + composePeriod(t, "Group", "period", element.getPeriod(), -1); + if (element.hasInactiveElement()) + composeBoolean(t, "Group", "inactive", element.getInactiveElement(), -1); + } + + protected void composeGuidanceResponse(Complex parent, String parentType, String name, GuidanceResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "GuidanceResponse", name, element, index); + if (element.hasRequestIdElement()) + composeId(t, "GuidanceResponse", "requestId", element.getRequestIdElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "GuidanceResponse", "identifier", element.getIdentifier(), -1); + if (element.hasModule()) + composeReference(t, "GuidanceResponse", "module", element.getModule(), -1); + if (element.hasStatusElement()) + composeEnum(t, "GuidanceResponse", "status", element.getStatusElement(), -1); + if (element.hasSubject()) + composeReference(t, "GuidanceResponse", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "GuidanceResponse", "context", element.getContext(), -1); + if (element.hasOccurrenceDateTimeElement()) + composeDateTime(t, "GuidanceResponse", "occurrenceDateTime", element.getOccurrenceDateTimeElement(), -1); + if (element.hasPerformer()) + composeReference(t, "GuidanceResponse", "performer", element.getPerformer(), -1); + if (element.hasReason()) + composeType(t, "GuidanceResponse", "reason", element.getReason(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "GuidanceResponse", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getEvaluationMessage().size(); i++) + composeReference(t, "GuidanceResponse", "evaluationMessage", element.getEvaluationMessage().get(i), i); + if (element.hasOutputParameters()) + composeReference(t, "GuidanceResponse", "outputParameters", element.getOutputParameters(), -1); + if (element.hasResult()) + composeReference(t, "GuidanceResponse", "result", element.getResult(), -1); + for (int i = 0; i < element.getDataRequirement().size(); i++) + composeDataRequirement(t, "GuidanceResponse", "dataRequirement", element.getDataRequirement().get(i), i); + } + + protected void composeHealthcareService(Complex parent, String parentType, String name, HealthcareService element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "HealthcareService", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "HealthcareService", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "HealthcareService", "active", element.getActiveElement(), -1); + if (element.hasProvidedBy()) + composeReference(t, "HealthcareService", "providedBy", element.getProvidedBy(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "HealthcareService", "category", element.getCategory(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "HealthcareService", "type", element.getType().get(i), i); + for (int i = 0; i < element.getSpecialty().size(); i++) + composeCodeableConcept(t, "HealthcareService", "specialty", element.getSpecialty().get(i), i); + for (int i = 0; i < element.getLocation().size(); i++) + composeReference(t, "HealthcareService", "location", element.getLocation().get(i), i); + if (element.hasNameElement()) + composeString(t, "HealthcareService", "name", element.getNameElement(), -1); + if (element.hasCommentElement()) + composeString(t, "HealthcareService", "comment", element.getCommentElement(), -1); + if (element.hasExtraDetailsElement()) + composeString(t, "HealthcareService", "extraDetails", element.getExtraDetailsElement(), -1); + if (element.hasPhoto()) + composeAttachment(t, "HealthcareService", "photo", element.getPhoto(), -1); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "HealthcareService", "telecom", element.getTelecom().get(i), i); + for (int i = 0; i < element.getCoverageArea().size(); i++) + composeReference(t, "HealthcareService", "coverageArea", element.getCoverageArea().get(i), i); + for (int i = 0; i < element.getServiceProvisionCode().size(); i++) + composeCodeableConcept(t, "HealthcareService", "serviceProvisionCode", element.getServiceProvisionCode().get(i), i); + if (element.hasEligibility()) + composeCodeableConcept(t, "HealthcareService", "eligibility", element.getEligibility(), -1); + if (element.hasEligibilityNoteElement()) + composeString(t, "HealthcareService", "eligibilityNote", element.getEligibilityNoteElement(), -1); + for (int i = 0; i < element.getProgramName().size(); i++) + composeString(t, "HealthcareService", "programName", element.getProgramName().get(i), i); + for (int i = 0; i < element.getCharacteristic().size(); i++) + composeCodeableConcept(t, "HealthcareService", "characteristic", element.getCharacteristic().get(i), i); + for (int i = 0; i < element.getReferralMethod().size(); i++) + composeCodeableConcept(t, "HealthcareService", "referralMethod", element.getReferralMethod().get(i), i); + if (element.hasAppointmentRequiredElement()) + composeBoolean(t, "HealthcareService", "appointmentRequired", element.getAppointmentRequiredElement(), -1); + for (int i = 0; i < element.getAvailableTime().size(); i++) + composeHealthcareServiceHealthcareServiceAvailableTimeComponent(t, "HealthcareService", "availableTime", element.getAvailableTime().get(i), i); + for (int i = 0; i < element.getNotAvailable().size(); i++) + composeHealthcareServiceHealthcareServiceNotAvailableComponent(t, "HealthcareService", "notAvailable", element.getNotAvailable().get(i), i); + if (element.hasAvailabilityExceptionsElement()) + composeString(t, "HealthcareService", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "HealthcareService", "endpoint", element.getEndpoint().get(i), i); + } + + protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(Complex parent, String parentType, String name, HealthcareService.HealthcareServiceAvailableTimeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "availableTime", name, element, index); + for (int i = 0; i < element.getDaysOfWeek().size(); i++) + composeEnum(t, "HealthcareService", "daysOfWeek", element.getDaysOfWeek().get(i), i); + if (element.hasAllDayElement()) + composeBoolean(t, "HealthcareService", "allDay", element.getAllDayElement(), -1); + if (element.hasAvailableStartTimeElement()) + composeTime(t, "HealthcareService", "availableStartTime", element.getAvailableStartTimeElement(), -1); + if (element.hasAvailableEndTimeElement()) + composeTime(t, "HealthcareService", "availableEndTime", element.getAvailableEndTimeElement(), -1); + } + + protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(Complex parent, String parentType, String name, HealthcareService.HealthcareServiceNotAvailableComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "notAvailable", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "HealthcareService", "description", element.getDescriptionElement(), -1); + if (element.hasDuring()) + composePeriod(t, "HealthcareService", "during", element.getDuring(), -1); + } + + protected void composeImagingManifest(Complex parent, String parentType, String name, ImagingManifest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ImagingManifest", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "ImagingManifest", "identifier", element.getIdentifier(), -1); + if (element.hasPatient()) + composeReference(t, "ImagingManifest", "patient", element.getPatient(), -1); + if (element.hasAuthoringTimeElement()) + composeDateTime(t, "ImagingManifest", "authoringTime", element.getAuthoringTimeElement(), -1); + if (element.hasAuthor()) + composeReference(t, "ImagingManifest", "author", element.getAuthor(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ImagingManifest", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getStudy().size(); i++) + composeImagingManifestStudyComponent(t, "ImagingManifest", "study", element.getStudy().get(i), i); + } + + protected void composeImagingManifestStudyComponent(Complex parent, String parentType, String name, ImagingManifest.StudyComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "study", name, element, index); + if (element.hasUidElement()) + composeOid(t, "ImagingManifest", "uid", element.getUidElement(), -1); + if (element.hasImagingStudy()) + composeReference(t, "ImagingManifest", "imagingStudy", element.getImagingStudy(), -1); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "ImagingManifest", "endpoint", element.getEndpoint().get(i), i); + for (int i = 0; i < element.getSeries().size(); i++) + composeImagingManifestSeriesComponent(t, "ImagingManifest", "series", element.getSeries().get(i), i); + } + + protected void composeImagingManifestSeriesComponent(Complex parent, String parentType, String name, ImagingManifest.SeriesComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "series", name, element, index); + if (element.hasUidElement()) + composeOid(t, "ImagingManifest", "uid", element.getUidElement(), -1); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "ImagingManifest", "endpoint", element.getEndpoint().get(i), i); + for (int i = 0; i < element.getInstance().size(); i++) + composeImagingManifestInstanceComponent(t, "ImagingManifest", "instance", element.getInstance().get(i), i); + } + + protected void composeImagingManifestInstanceComponent(Complex parent, String parentType, String name, ImagingManifest.InstanceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "instance", name, element, index); + if (element.hasSopClassElement()) + composeOid(t, "ImagingManifest", "sopClass", element.getSopClassElement(), -1); + if (element.hasUidElement()) + composeOid(t, "ImagingManifest", "uid", element.getUidElement(), -1); + for (int i = 0; i < element.getFrameNumber().size(); i++) + composeUnsignedInt(t, "ImagingManifest", "frameNumber", element.getFrameNumber().get(i), i); + } + + protected void composeImagingStudy(Complex parent, String parentType, String name, ImagingStudy element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ImagingStudy", name, element, index); + if (element.hasUidElement()) + composeOid(t, "ImagingStudy", "uid", element.getUidElement(), -1); + if (element.hasAccession()) + composeIdentifier(t, "ImagingStudy", "accession", element.getAccession(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ImagingStudy", "identifier", element.getIdentifier().get(i), i); + if (element.hasAvailabilityElement()) + composeEnum(t, "ImagingStudy", "availability", element.getAvailabilityElement(), -1); + for (int i = 0; i < element.getModalityList().size(); i++) + composeCoding(t, "ImagingStudy", "modalityList", element.getModalityList().get(i), i); + if (element.hasPatient()) + composeReference(t, "ImagingStudy", "patient", element.getPatient(), -1); + if (element.hasContext()) + composeReference(t, "ImagingStudy", "context", element.getContext(), -1); + if (element.hasStartedElement()) + composeDateTime(t, "ImagingStudy", "started", element.getStartedElement(), -1); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "ImagingStudy", "basedOn", element.getBasedOn().get(i), i); + if (element.hasReferrer()) + composeReference(t, "ImagingStudy", "referrer", element.getReferrer(), -1); + for (int i = 0; i < element.getInterpreter().size(); i++) + composeReference(t, "ImagingStudy", "interpreter", element.getInterpreter().get(i), i); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "ImagingStudy", "endpoint", element.getEndpoint().get(i), i); + if (element.hasNumberOfSeriesElement()) + composeUnsignedInt(t, "ImagingStudy", "numberOfSeries", element.getNumberOfSeriesElement(), -1); + if (element.hasNumberOfInstancesElement()) + composeUnsignedInt(t, "ImagingStudy", "numberOfInstances", element.getNumberOfInstancesElement(), -1); + for (int i = 0; i < element.getProcedureReference().size(); i++) + composeReference(t, "ImagingStudy", "procedureReference", element.getProcedureReference().get(i), i); + for (int i = 0; i < element.getProcedureCode().size(); i++) + composeCodeableConcept(t, "ImagingStudy", "procedureCode", element.getProcedureCode().get(i), i); + if (element.hasReason()) + composeCodeableConcept(t, "ImagingStudy", "reason", element.getReason(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ImagingStudy", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getSeries().size(); i++) + composeImagingStudyImagingStudySeriesComponent(t, "ImagingStudy", "series", element.getSeries().get(i), i); + } + + protected void composeImagingStudyImagingStudySeriesComponent(Complex parent, String parentType, String name, ImagingStudy.ImagingStudySeriesComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "series", name, element, index); + if (element.hasUidElement()) + composeOid(t, "ImagingStudy", "uid", element.getUidElement(), -1); + if (element.hasNumberElement()) + composeUnsignedInt(t, "ImagingStudy", "number", element.getNumberElement(), -1); + if (element.hasModality()) + composeCoding(t, "ImagingStudy", "modality", element.getModality(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ImagingStudy", "description", element.getDescriptionElement(), -1); + if (element.hasNumberOfInstancesElement()) + composeUnsignedInt(t, "ImagingStudy", "numberOfInstances", element.getNumberOfInstancesElement(), -1); + if (element.hasAvailabilityElement()) + composeEnum(t, "ImagingStudy", "availability", element.getAvailabilityElement(), -1); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "ImagingStudy", "endpoint", element.getEndpoint().get(i), i); + if (element.hasBodySite()) + composeCoding(t, "ImagingStudy", "bodySite", element.getBodySite(), -1); + if (element.hasLaterality()) + composeCoding(t, "ImagingStudy", "laterality", element.getLaterality(), -1); + if (element.hasStartedElement()) + composeDateTime(t, "ImagingStudy", "started", element.getStartedElement(), -1); + for (int i = 0; i < element.getPerformer().size(); i++) + composeReference(t, "ImagingStudy", "performer", element.getPerformer().get(i), i); + for (int i = 0; i < element.getInstance().size(); i++) + composeImagingStudyImagingStudySeriesInstanceComponent(t, "ImagingStudy", "instance", element.getInstance().get(i), i); + } + + protected void composeImagingStudyImagingStudySeriesInstanceComponent(Complex parent, String parentType, String name, ImagingStudy.ImagingStudySeriesInstanceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "instance", name, element, index); + if (element.hasUidElement()) + composeOid(t, "ImagingStudy", "uid", element.getUidElement(), -1); + if (element.hasNumberElement()) + composeUnsignedInt(t, "ImagingStudy", "number", element.getNumberElement(), -1); + if (element.hasSopClassElement()) + composeOid(t, "ImagingStudy", "sopClass", element.getSopClassElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ImagingStudy", "title", element.getTitleElement(), -1); + } + + protected void composeImmunization(Complex parent, String parentType, String name, Immunization element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Immunization", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Immunization", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Immunization", "status", element.getStatusElement(), -1); + if (element.hasNotGivenElement()) + composeBoolean(t, "Immunization", "notGiven", element.getNotGivenElement(), -1); + if (element.hasVaccineCode()) + composeCodeableConcept(t, "Immunization", "vaccineCode", element.getVaccineCode(), -1); + if (element.hasPatient()) + composeReference(t, "Immunization", "patient", element.getPatient(), -1); + if (element.hasEncounter()) + composeReference(t, "Immunization", "encounter", element.getEncounter(), -1); + if (element.hasDateElement()) + composeDateTime(t, "Immunization", "date", element.getDateElement(), -1); + if (element.hasPrimarySourceElement()) + composeBoolean(t, "Immunization", "primarySource", element.getPrimarySourceElement(), -1); + if (element.hasReportOrigin()) + composeCodeableConcept(t, "Immunization", "reportOrigin", element.getReportOrigin(), -1); + if (element.hasLocation()) + composeReference(t, "Immunization", "location", element.getLocation(), -1); + if (element.hasManufacturer()) + composeReference(t, "Immunization", "manufacturer", element.getManufacturer(), -1); + if (element.hasLotNumberElement()) + composeString(t, "Immunization", "lotNumber", element.getLotNumberElement(), -1); + if (element.hasExpirationDateElement()) + composeDate(t, "Immunization", "expirationDate", element.getExpirationDateElement(), -1); + if (element.hasSite()) + composeCodeableConcept(t, "Immunization", "site", element.getSite(), -1); + if (element.hasRoute()) + composeCodeableConcept(t, "Immunization", "route", element.getRoute(), -1); + if (element.hasDoseQuantity()) + composeQuantity(t, "Immunization", "doseQuantity", element.getDoseQuantity(), -1); + for (int i = 0; i < element.getPractitioner().size(); i++) + composeImmunizationImmunizationPractitionerComponent(t, "Immunization", "practitioner", element.getPractitioner().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Immunization", "note", element.getNote().get(i), i); + if (element.hasExplanation()) + composeImmunizationImmunizationExplanationComponent(t, "Immunization", "explanation", element.getExplanation(), -1); + for (int i = 0; i < element.getReaction().size(); i++) + composeImmunizationImmunizationReactionComponent(t, "Immunization", "reaction", element.getReaction().get(i), i); + for (int i = 0; i < element.getVaccinationProtocol().size(); i++) + composeImmunizationImmunizationVaccinationProtocolComponent(t, "Immunization", "vaccinationProtocol", element.getVaccinationProtocol().get(i), i); + } + + protected void composeImmunizationImmunizationPractitionerComponent(Complex parent, String parentType, String name, Immunization.ImmunizationPractitionerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "practitioner", name, element, index); + if (element.hasRole()) + composeCodeableConcept(t, "Immunization", "role", element.getRole(), -1); + if (element.hasActor()) + composeReference(t, "Immunization", "actor", element.getActor(), -1); + } + + protected void composeImmunizationImmunizationExplanationComponent(Complex parent, String parentType, String name, Immunization.ImmunizationExplanationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "explanation", name, element, index); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "Immunization", "reason", element.getReason().get(i), i); + for (int i = 0; i < element.getReasonNotGiven().size(); i++) + composeCodeableConcept(t, "Immunization", "reasonNotGiven", element.getReasonNotGiven().get(i), i); + } + + protected void composeImmunizationImmunizationReactionComponent(Complex parent, String parentType, String name, Immunization.ImmunizationReactionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "reaction", name, element, index); + if (element.hasDateElement()) + composeDateTime(t, "Immunization", "date", element.getDateElement(), -1); + if (element.hasDetail()) + composeReference(t, "Immunization", "detail", element.getDetail(), -1); + if (element.hasReportedElement()) + composeBoolean(t, "Immunization", "reported", element.getReportedElement(), -1); + } + + protected void composeImmunizationImmunizationVaccinationProtocolComponent(Complex parent, String parentType, String name, Immunization.ImmunizationVaccinationProtocolComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "vaccinationProtocol", name, element, index); + if (element.hasDoseSequenceElement()) + composePositiveInt(t, "Immunization", "doseSequence", element.getDoseSequenceElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Immunization", "description", element.getDescriptionElement(), -1); + if (element.hasAuthority()) + composeReference(t, "Immunization", "authority", element.getAuthority(), -1); + if (element.hasSeriesElement()) + composeString(t, "Immunization", "series", element.getSeriesElement(), -1); + if (element.hasSeriesDosesElement()) + composePositiveInt(t, "Immunization", "seriesDoses", element.getSeriesDosesElement(), -1); + for (int i = 0; i < element.getTargetDisease().size(); i++) + composeCodeableConcept(t, "Immunization", "targetDisease", element.getTargetDisease().get(i), i); + if (element.hasDoseStatus()) + composeCodeableConcept(t, "Immunization", "doseStatus", element.getDoseStatus(), -1); + if (element.hasDoseStatusReason()) + composeCodeableConcept(t, "Immunization", "doseStatusReason", element.getDoseStatusReason(), -1); + } + + protected void composeImmunizationRecommendation(Complex parent, String parentType, String name, ImmunizationRecommendation element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ImmunizationRecommendation", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ImmunizationRecommendation", "identifier", element.getIdentifier().get(i), i); + if (element.hasPatient()) + composeReference(t, "ImmunizationRecommendation", "patient", element.getPatient(), -1); + for (int i = 0; i < element.getRecommendation().size(); i++) + composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(t, "ImmunizationRecommendation", "recommendation", element.getRecommendation().get(i), i); + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(Complex parent, String parentType, String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "recommendation", name, element, index); + if (element.hasDateElement()) + composeDateTime(t, "ImmunizationRecommendation", "date", element.getDateElement(), -1); + if (element.hasVaccineCode()) + composeCodeableConcept(t, "ImmunizationRecommendation", "vaccineCode", element.getVaccineCode(), -1); + if (element.hasTargetDisease()) + composeCodeableConcept(t, "ImmunizationRecommendation", "targetDisease", element.getTargetDisease(), -1); + if (element.hasDoseNumberElement()) + composePositiveInt(t, "ImmunizationRecommendation", "doseNumber", element.getDoseNumberElement(), -1); + if (element.hasForecastStatus()) + composeCodeableConcept(t, "ImmunizationRecommendation", "forecastStatus", element.getForecastStatus(), -1); + for (int i = 0; i < element.getDateCriterion().size(); i++) + composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(t, "ImmunizationRecommendation", "dateCriterion", element.getDateCriterion().get(i), i); + if (element.hasProtocol()) + composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(t, "ImmunizationRecommendation", "protocol", element.getProtocol(), -1); + for (int i = 0; i < element.getSupportingImmunization().size(); i++) + composeReference(t, "ImmunizationRecommendation", "supportingImmunization", element.getSupportingImmunization().get(i), i); + for (int i = 0; i < element.getSupportingPatientInformation().size(); i++) + composeReference(t, "ImmunizationRecommendation", "supportingPatientInformation", element.getSupportingPatientInformation().get(i), i); + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(Complex parent, String parentType, String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dateCriterion", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "ImmunizationRecommendation", "code", element.getCode(), -1); + if (element.hasValueElement()) + composeDateTime(t, "ImmunizationRecommendation", "value", element.getValueElement(), -1); + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(Complex parent, String parentType, String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "protocol", name, element, index); + if (element.hasDoseSequenceElement()) + composePositiveInt(t, "ImmunizationRecommendation", "doseSequence", element.getDoseSequenceElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ImmunizationRecommendation", "description", element.getDescriptionElement(), -1); + if (element.hasAuthority()) + composeReference(t, "ImmunizationRecommendation", "authority", element.getAuthority(), -1); + if (element.hasSeriesElement()) + composeString(t, "ImmunizationRecommendation", "series", element.getSeriesElement(), -1); + } + + protected void composeImplementationGuide(Complex parent, String parentType, String name, ImplementationGuide element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ImplementationGuide", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ImplementationGuide", "url", element.getUrlElement(), -1); + if (element.hasVersionElement()) + composeString(t, "ImplementationGuide", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ImplementationGuide", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ImplementationGuide", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ImplementationGuide", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ImplementationGuide", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ImplementationGuide", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ImplementationGuide", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ImplementationGuide", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "ImplementationGuide", "copyright", element.getCopyrightElement(), -1); + if (element.hasFhirVersionElement()) + composeId(t, "ImplementationGuide", "fhirVersion", element.getFhirVersionElement(), -1); + for (int i = 0; i < element.getDependency().size(); i++) + composeImplementationGuideImplementationGuideDependencyComponent(t, "ImplementationGuide", "dependency", element.getDependency().get(i), i); + for (int i = 0; i < element.getPackage().size(); i++) + composeImplementationGuideImplementationGuidePackageComponent(t, "ImplementationGuide", "package", element.getPackage().get(i), i); + for (int i = 0; i < element.getGlobal().size(); i++) + composeImplementationGuideImplementationGuideGlobalComponent(t, "ImplementationGuide", "global", element.getGlobal().get(i), i); + for (int i = 0; i < element.getBinary().size(); i++) + composeUri(t, "ImplementationGuide", "binary", element.getBinary().get(i), i); + if (element.hasPage()) + composeImplementationGuideImplementationGuidePageComponent(t, "ImplementationGuide", "page", element.getPage(), -1); + } + + protected void composeImplementationGuideImplementationGuideDependencyComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideDependencyComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dependency", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "ImplementationGuide", "type", element.getTypeElement(), -1); + if (element.hasUriElement()) + composeUri(t, "ImplementationGuide", "uri", element.getUriElement(), -1); + } + + protected void composeImplementationGuideImplementationGuidePackageComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePackageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "package", name, element, index); + if (element.hasNameElement()) + composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getResource().size(); i++) + composeImplementationGuideImplementationGuidePackageResourceComponent(t, "ImplementationGuide", "resource", element.getResource().get(i), i); + } + + protected void composeImplementationGuideImplementationGuidePackageResourceComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePackageResourceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "resource", name, element, index); + if (element.hasExampleElement()) + composeBoolean(t, "ImplementationGuide", "example", element.getExampleElement(), -1); + if (element.hasNameElement()) + composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1); + if (element.hasAcronymElement()) + composeString(t, "ImplementationGuide", "acronym", element.getAcronymElement(), -1); + if (element.hasSource()) + composeType(t, "ImplementationGuide", "source", element.getSource(), -1); + if (element.hasExampleFor()) + composeReference(t, "ImplementationGuide", "exampleFor", element.getExampleFor(), -1); + } + + protected void composeImplementationGuideImplementationGuideGlobalComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideGlobalComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "global", name, element, index); + if (element.hasTypeElement()) + composeCode(t, "ImplementationGuide", "type", element.getTypeElement(), -1); + if (element.hasProfile()) + composeReference(t, "ImplementationGuide", "profile", element.getProfile(), -1); + } + + protected void composeImplementationGuideImplementationGuidePageComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "page", name, element, index); + if (element.hasSourceElement()) + composeUri(t, "ImplementationGuide", "source", element.getSourceElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ImplementationGuide", "title", element.getTitleElement(), -1); + if (element.hasKindElement()) + composeEnum(t, "ImplementationGuide", "kind", element.getKindElement(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCode(t, "ImplementationGuide", "type", element.getType().get(i), i); + for (int i = 0; i < element.getPackage().size(); i++) + composeString(t, "ImplementationGuide", "package", element.getPackage().get(i), i); + if (element.hasFormatElement()) + composeCode(t, "ImplementationGuide", "format", element.getFormatElement(), -1); + for (int i = 0; i < element.getPage().size(); i++) + composeImplementationGuideImplementationGuidePageComponent(t, "ImplementationGuide", "page", element.getPage().get(i), i); + } + + protected void composeLibrary(Complex parent, String parentType, String name, Library element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Library", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "Library", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Library", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "Library", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "Library", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "Library", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Library", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "Library", "experimental", element.getExperimentalElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Library", "type", element.getType(), -1); + if (element.hasDateElement()) + composeDateTime(t, "Library", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "Library", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "Library", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "Library", "purpose", element.getPurposeElement(), -1); + if (element.hasUsageElement()) + composeString(t, "Library", "usage", element.getUsageElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "Library", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "Library", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "Library", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "Library", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "Library", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeCodeableConcept(t, "Library", "topic", element.getTopic().get(i), i); + for (int i = 0; i < element.getContributor().size(); i++) + composeContributor(t, "Library", "contributor", element.getContributor().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "Library", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "Library", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "Library", "relatedArtifact", element.getRelatedArtifact().get(i), i); + for (int i = 0; i < element.getParameter().size(); i++) + composeParameterDefinition(t, "Library", "parameter", element.getParameter().get(i), i); + for (int i = 0; i < element.getDataRequirement().size(); i++) + composeDataRequirement(t, "Library", "dataRequirement", element.getDataRequirement().get(i), i); + for (int i = 0; i < element.getContent().size(); i++) + composeAttachment(t, "Library", "content", element.getContent().get(i), i); + } + + protected void composeLinkage(Complex parent, String parentType, String name, Linkage element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Linkage", name, element, index); + if (element.hasActiveElement()) + composeBoolean(t, "Linkage", "active", element.getActiveElement(), -1); + if (element.hasAuthor()) + composeReference(t, "Linkage", "author", element.getAuthor(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeLinkageLinkageItemComponent(t, "Linkage", "item", element.getItem().get(i), i); + } + + protected void composeLinkageLinkageItemComponent(Complex parent, String parentType, String name, Linkage.LinkageItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Linkage", "type", element.getTypeElement(), -1); + if (element.hasResource()) + composeReference(t, "Linkage", "resource", element.getResource(), -1); + } + + protected void composeListResource(Complex parent, String parentType, String name, ListResource element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "List", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "List", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "List", "status", element.getStatusElement(), -1); + if (element.hasModeElement()) + composeEnum(t, "List", "mode", element.getModeElement(), -1); + if (element.hasTitleElement()) + composeString(t, "List", "title", element.getTitleElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "List", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "List", "subject", element.getSubject(), -1); + if (element.hasEncounter()) + composeReference(t, "List", "encounter", element.getEncounter(), -1); + if (element.hasDateElement()) + composeDateTime(t, "List", "date", element.getDateElement(), -1); + if (element.hasSource()) + composeReference(t, "List", "source", element.getSource(), -1); + if (element.hasOrderedBy()) + composeCodeableConcept(t, "List", "orderedBy", element.getOrderedBy(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "List", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getEntry().size(); i++) + composeListResourceListEntryComponent(t, "List", "entry", element.getEntry().get(i), i); + if (element.hasEmptyReason()) + composeCodeableConcept(t, "List", "emptyReason", element.getEmptyReason(), -1); + } + + protected void composeListResourceListEntryComponent(Complex parent, String parentType, String name, ListResource.ListEntryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "entry", name, element, index); + if (element.hasFlag()) + composeCodeableConcept(t, "List", "flag", element.getFlag(), -1); + if (element.hasDeletedElement()) + composeBoolean(t, "List", "deleted", element.getDeletedElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "List", "date", element.getDateElement(), -1); + if (element.hasItem()) + composeReference(t, "List", "item", element.getItem(), -1); + } + + protected void composeLocation(Complex parent, String parentType, String name, Location element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Location", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Location", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Location", "status", element.getStatusElement(), -1); + if (element.hasOperationalStatus()) + composeCoding(t, "Location", "operationalStatus", element.getOperationalStatus(), -1); + if (element.hasNameElement()) + composeString(t, "Location", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getAlias().size(); i++) + composeString(t, "Location", "alias", element.getAlias().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "Location", "description", element.getDescriptionElement(), -1); + if (element.hasModeElement()) + composeEnum(t, "Location", "mode", element.getModeElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Location", "type", element.getType(), -1); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Location", "telecom", element.getTelecom().get(i), i); + if (element.hasAddress()) + composeAddress(t, "Location", "address", element.getAddress(), -1); + if (element.hasPhysicalType()) + composeCodeableConcept(t, "Location", "physicalType", element.getPhysicalType(), -1); + if (element.hasPosition()) + composeLocationLocationPositionComponent(t, "Location", "position", element.getPosition(), -1); + if (element.hasManagingOrganization()) + composeReference(t, "Location", "managingOrganization", element.getManagingOrganization(), -1); + if (element.hasPartOf()) + composeReference(t, "Location", "partOf", element.getPartOf(), -1); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "Location", "endpoint", element.getEndpoint().get(i), i); + } + + protected void composeLocationLocationPositionComponent(Complex parent, String parentType, String name, Location.LocationPositionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "position", name, element, index); + if (element.hasLongitudeElement()) + composeDecimal(t, "Location", "longitude", element.getLongitudeElement(), -1); + if (element.hasLatitudeElement()) + composeDecimal(t, "Location", "latitude", element.getLatitudeElement(), -1); + if (element.hasAltitudeElement()) + composeDecimal(t, "Location", "altitude", element.getAltitudeElement(), -1); + } + + protected void composeMeasure(Complex parent, String parentType, String name, Measure element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Measure", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "Measure", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Measure", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "Measure", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "Measure", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "Measure", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Measure", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "Measure", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "Measure", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "Measure", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "Measure", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "Measure", "purpose", element.getPurposeElement(), -1); + if (element.hasUsageElement()) + composeString(t, "Measure", "usage", element.getUsageElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "Measure", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "Measure", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "Measure", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "Measure", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "Measure", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeCodeableConcept(t, "Measure", "topic", element.getTopic().get(i), i); + for (int i = 0; i < element.getContributor().size(); i++) + composeContributor(t, "Measure", "contributor", element.getContributor().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "Measure", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "Measure", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "Measure", "relatedArtifact", element.getRelatedArtifact().get(i), i); + for (int i = 0; i < element.getLibrary().size(); i++) + composeReference(t, "Measure", "library", element.getLibrary().get(i), i); + if (element.hasDisclaimerElement()) + composeMarkdown(t, "Measure", "disclaimer", element.getDisclaimerElement(), -1); + if (element.hasScoring()) + composeCodeableConcept(t, "Measure", "scoring", element.getScoring(), -1); + if (element.hasCompositeScoring()) + composeCodeableConcept(t, "Measure", "compositeScoring", element.getCompositeScoring(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "Measure", "type", element.getType().get(i), i); + if (element.hasRiskAdjustmentElement()) + composeString(t, "Measure", "riskAdjustment", element.getRiskAdjustmentElement(), -1); + if (element.hasRateAggregationElement()) + composeString(t, "Measure", "rateAggregation", element.getRateAggregationElement(), -1); + if (element.hasRationaleElement()) + composeMarkdown(t, "Measure", "rationale", element.getRationaleElement(), -1); + if (element.hasClinicalRecommendationStatementElement()) + composeMarkdown(t, "Measure", "clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), -1); + if (element.hasImprovementNotationElement()) + composeString(t, "Measure", "improvementNotation", element.getImprovementNotationElement(), -1); + for (int i = 0; i < element.getDefinition().size(); i++) + composeMarkdown(t, "Measure", "definition", element.getDefinition().get(i), i); + if (element.hasGuidanceElement()) + composeMarkdown(t, "Measure", "guidance", element.getGuidanceElement(), -1); + if (element.hasSetElement()) + composeString(t, "Measure", "set", element.getSetElement(), -1); + for (int i = 0; i < element.getGroup().size(); i++) + composeMeasureMeasureGroupComponent(t, "Measure", "group", element.getGroup().get(i), i); + for (int i = 0; i < element.getSupplementalData().size(); i++) + composeMeasureMeasureSupplementalDataComponent(t, "Measure", "supplementalData", element.getSupplementalData().get(i), i); + } + + protected void composeMeasureMeasureGroupComponent(Complex parent, String parentType, String name, Measure.MeasureGroupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "group", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); + if (element.hasNameElement()) + composeString(t, "Measure", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Measure", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getPopulation().size(); i++) + composeMeasureMeasureGroupPopulationComponent(t, "Measure", "population", element.getPopulation().get(i), i); + for (int i = 0; i < element.getStratifier().size(); i++) + composeMeasureMeasureGroupStratifierComponent(t, "Measure", "stratifier", element.getStratifier().get(i), i); + } + + protected void composeMeasureMeasureGroupPopulationComponent(Complex parent, String parentType, String name, Measure.MeasureGroupPopulationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "population", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Measure", "code", element.getCode(), -1); + if (element.hasNameElement()) + composeString(t, "Measure", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Measure", "description", element.getDescriptionElement(), -1); + if (element.hasCriteriaElement()) + composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1); + } + + protected void composeMeasureMeasureGroupStratifierComponent(Complex parent, String parentType, String name, Measure.MeasureGroupStratifierComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "stratifier", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); + if (element.hasCriteriaElement()) + composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1); + if (element.hasPathElement()) + composeString(t, "Measure", "path", element.getPathElement(), -1); + } + + protected void composeMeasureMeasureSupplementalDataComponent(Complex parent, String parentType, String name, Measure.MeasureSupplementalDataComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "supplementalData", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getUsage().size(); i++) + composeCodeableConcept(t, "Measure", "usage", element.getUsage().get(i), i); + if (element.hasCriteriaElement()) + composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1); + if (element.hasPathElement()) + composeString(t, "Measure", "path", element.getPathElement(), -1); + } + + protected void composeMeasureReport(Complex parent, String parentType, String name, MeasureReport element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MeasureReport", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "MeasureReport", "status", element.getStatusElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "MeasureReport", "type", element.getTypeElement(), -1); + if (element.hasMeasure()) + composeReference(t, "MeasureReport", "measure", element.getMeasure(), -1); + if (element.hasPatient()) + composeReference(t, "MeasureReport", "patient", element.getPatient(), -1); + if (element.hasDateElement()) + composeDateTime(t, "MeasureReport", "date", element.getDateElement(), -1); + if (element.hasReportingOrganization()) + composeReference(t, "MeasureReport", "reportingOrganization", element.getReportingOrganization(), -1); + if (element.hasPeriod()) + composePeriod(t, "MeasureReport", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getGroup().size(); i++) + composeMeasureReportMeasureReportGroupComponent(t, "MeasureReport", "group", element.getGroup().get(i), i); + if (element.hasEvaluatedResources()) + composeReference(t, "MeasureReport", "evaluatedResources", element.getEvaluatedResources(), -1); + } + + protected void composeMeasureReportMeasureReportGroupComponent(Complex parent, String parentType, String name, MeasureReport.MeasureReportGroupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "group", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getPopulation().size(); i++) + composeMeasureReportMeasureReportGroupPopulationComponent(t, "MeasureReport", "population", element.getPopulation().get(i), i); + if (element.hasMeasureScoreElement()) + composeDecimal(t, "MeasureReport", "measureScore", element.getMeasureScoreElement(), -1); + for (int i = 0; i < element.getStratifier().size(); i++) + composeMeasureReportMeasureReportGroupStratifierComponent(t, "MeasureReport", "stratifier", element.getStratifier().get(i), i); + } + + protected void composeMeasureReportMeasureReportGroupPopulationComponent(Complex parent, String parentType, String name, MeasureReport.MeasureReportGroupPopulationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "population", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "MeasureReport", "code", element.getCode(), -1); + if (element.hasCountElement()) + composeInteger(t, "MeasureReport", "count", element.getCountElement(), -1); + if (element.hasPatients()) + composeReference(t, "MeasureReport", "patients", element.getPatients(), -1); + } + + protected void composeMeasureReportMeasureReportGroupStratifierComponent(Complex parent, String parentType, String name, MeasureReport.MeasureReportGroupStratifierComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "stratifier", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getStratum().size(); i++) + composeMeasureReportStratifierGroupComponent(t, "MeasureReport", "stratum", element.getStratum().get(i), i); + } + + protected void composeMeasureReportStratifierGroupComponent(Complex parent, String parentType, String name, MeasureReport.StratifierGroupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "stratum", name, element, index); + if (element.hasValueElement()) + composeString(t, "MeasureReport", "value", element.getValueElement(), -1); + for (int i = 0; i < element.getPopulation().size(); i++) + composeMeasureReportStratifierGroupPopulationComponent(t, "MeasureReport", "population", element.getPopulation().get(i), i); + if (element.hasMeasureScoreElement()) + composeDecimal(t, "MeasureReport", "measureScore", element.getMeasureScoreElement(), -1); + } + + protected void composeMeasureReportStratifierGroupPopulationComponent(Complex parent, String parentType, String name, MeasureReport.StratifierGroupPopulationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "population", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "MeasureReport", "identifier", element.getIdentifier(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "MeasureReport", "code", element.getCode(), -1); + if (element.hasCountElement()) + composeInteger(t, "MeasureReport", "count", element.getCountElement(), -1); + if (element.hasPatients()) + composeReference(t, "MeasureReport", "patients", element.getPatients(), -1); + } + + protected void composeMedia(Complex parent, String parentType, String name, Media element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Media", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Media", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "Media", "basedOn", element.getBasedOn().get(i), i); + if (element.hasTypeElement()) + composeEnum(t, "Media", "type", element.getTypeElement(), -1); + if (element.hasSubtype()) + composeCodeableConcept(t, "Media", "subtype", element.getSubtype(), -1); + if (element.hasView()) + composeCodeableConcept(t, "Media", "view", element.getView(), -1); + if (element.hasSubject()) + composeReference(t, "Media", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "Media", "context", element.getContext(), -1); + if (element.hasOccurrence()) + composeType(t, "Media", "occurrence", element.getOccurrence(), -1); + if (element.hasOperator()) + composeReference(t, "Media", "operator", element.getOperator(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "Media", "reasonCode", element.getReasonCode().get(i), i); + if (element.hasBodySite()) + composeCodeableConcept(t, "Media", "bodySite", element.getBodySite(), -1); + if (element.hasDevice()) + composeReference(t, "Media", "device", element.getDevice(), -1); + if (element.hasHeightElement()) + composePositiveInt(t, "Media", "height", element.getHeightElement(), -1); + if (element.hasWidthElement()) + composePositiveInt(t, "Media", "width", element.getWidthElement(), -1); + if (element.hasFramesElement()) + composePositiveInt(t, "Media", "frames", element.getFramesElement(), -1); + if (element.hasDurationElement()) + composeUnsignedInt(t, "Media", "duration", element.getDurationElement(), -1); + if (element.hasContent()) + composeAttachment(t, "Media", "content", element.getContent(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Media", "note", element.getNote().get(i), i); + } + + protected void composeMedication(Complex parent, String parentType, String name, Medication element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Medication", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "Medication", "code", element.getCode(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Medication", "status", element.getStatusElement(), -1); + if (element.hasIsBrandElement()) + composeBoolean(t, "Medication", "isBrand", element.getIsBrandElement(), -1); + if (element.hasIsOverTheCounterElement()) + composeBoolean(t, "Medication", "isOverTheCounter", element.getIsOverTheCounterElement(), -1); + if (element.hasManufacturer()) + composeReference(t, "Medication", "manufacturer", element.getManufacturer(), -1); + if (element.hasForm()) + composeCodeableConcept(t, "Medication", "form", element.getForm(), -1); + for (int i = 0; i < element.getIngredient().size(); i++) + composeMedicationMedicationIngredientComponent(t, "Medication", "ingredient", element.getIngredient().get(i), i); + if (element.hasPackage()) + composeMedicationMedicationPackageComponent(t, "Medication", "package", element.getPackage(), -1); + for (int i = 0; i < element.getImage().size(); i++) + composeAttachment(t, "Medication", "image", element.getImage().get(i), i); + } + + protected void composeMedicationMedicationIngredientComponent(Complex parent, String parentType, String name, Medication.MedicationIngredientComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "ingredient", name, element, index); + if (element.hasItem()) + composeType(t, "Medication", "item", element.getItem(), -1); + if (element.hasIsActiveElement()) + composeBoolean(t, "Medication", "isActive", element.getIsActiveElement(), -1); + if (element.hasAmount()) + composeRatio(t, "Medication", "amount", element.getAmount(), -1); + } + + protected void composeMedicationMedicationPackageComponent(Complex parent, String parentType, String name, Medication.MedicationPackageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "package", name, element, index); + if (element.hasContainer()) + composeCodeableConcept(t, "Medication", "container", element.getContainer(), -1); + for (int i = 0; i < element.getContent().size(); i++) + composeMedicationMedicationPackageContentComponent(t, "Medication", "content", element.getContent().get(i), i); + for (int i = 0; i < element.getBatch().size(); i++) + composeMedicationMedicationPackageBatchComponent(t, "Medication", "batch", element.getBatch().get(i), i); + } + + protected void composeMedicationMedicationPackageContentComponent(Complex parent, String parentType, String name, Medication.MedicationPackageContentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "content", name, element, index); + if (element.hasItem()) + composeType(t, "Medication", "item", element.getItem(), -1); + if (element.hasAmount()) + composeQuantity(t, "Medication", "amount", element.getAmount(), -1); + } + + protected void composeMedicationMedicationPackageBatchComponent(Complex parent, String parentType, String name, Medication.MedicationPackageBatchComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "batch", name, element, index); + if (element.hasLotNumberElement()) + composeString(t, "Medication", "lotNumber", element.getLotNumberElement(), -1); + if (element.hasExpirationDateElement()) + composeDateTime(t, "Medication", "expirationDate", element.getExpirationDateElement(), -1); + } + + protected void composeMedicationAdministration(Complex parent, String parentType, String name, MedicationAdministration element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MedicationAdministration", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "MedicationAdministration", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "MedicationAdministration", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "MedicationAdministration", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "MedicationAdministration", "status", element.getStatusElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "MedicationAdministration", "category", element.getCategory(), -1); + if (element.hasMedication()) + composeType(t, "MedicationAdministration", "medication", element.getMedication(), -1); + if (element.hasSubject()) + composeReference(t, "MedicationAdministration", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "MedicationAdministration", "context", element.getContext(), -1); + for (int i = 0; i < element.getSupportingInformation().size(); i++) + composeReference(t, "MedicationAdministration", "supportingInformation", element.getSupportingInformation().get(i), i); + if (element.hasEffective()) + composeType(t, "MedicationAdministration", "effective", element.getEffective(), -1); + for (int i = 0; i < element.getPerformer().size(); i++) + composeMedicationAdministrationMedicationAdministrationPerformerComponent(t, "MedicationAdministration", "performer", element.getPerformer().get(i), i); + if (element.hasNotGivenElement()) + composeBoolean(t, "MedicationAdministration", "notGiven", element.getNotGivenElement(), -1); + for (int i = 0; i < element.getReasonNotGiven().size(); i++) + composeCodeableConcept(t, "MedicationAdministration", "reasonNotGiven", element.getReasonNotGiven().get(i), i); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "MedicationAdministration", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "MedicationAdministration", "reasonReference", element.getReasonReference().get(i), i); + if (element.hasRequest()) + composeReference(t, "MedicationAdministration", "request", element.getRequest(), -1); + for (int i = 0; i < element.getDevice().size(); i++) + composeReference(t, "MedicationAdministration", "device", element.getDevice().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "MedicationAdministration", "note", element.getNote().get(i), i); + if (element.hasDosage()) + composeMedicationAdministrationMedicationAdministrationDosageComponent(t, "MedicationAdministration", "dosage", element.getDosage(), -1); + for (int i = 0; i < element.getEventHistory().size(); i++) + composeReference(t, "MedicationAdministration", "eventHistory", element.getEventHistory().get(i), i); + } + + protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(Complex parent, String parentType, String name, MedicationAdministration.MedicationAdministrationPerformerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "performer", name, element, index); + if (element.hasActor()) + composeReference(t, "MedicationAdministration", "actor", element.getActor(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "MedicationAdministration", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(Complex parent, String parentType, String name, MedicationAdministration.MedicationAdministrationDosageComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dosage", name, element, index); + if (element.hasTextElement()) + composeString(t, "MedicationAdministration", "text", element.getTextElement(), -1); + if (element.hasSite()) + composeCodeableConcept(t, "MedicationAdministration", "site", element.getSite(), -1); + if (element.hasRoute()) + composeCodeableConcept(t, "MedicationAdministration", "route", element.getRoute(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "MedicationAdministration", "method", element.getMethod(), -1); + if (element.hasDose()) + composeQuantity(t, "MedicationAdministration", "dose", element.getDose(), -1); + if (element.hasRate()) + composeType(t, "MedicationAdministration", "rate", element.getRate(), -1); + } + + protected void composeMedicationDispense(Complex parent, String parentType, String name, MedicationDispense element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MedicationDispense", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "MedicationDispense", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "MedicationDispense", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "MedicationDispense", "status", element.getStatusElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "MedicationDispense", "category", element.getCategory(), -1); + if (element.hasMedication()) + composeType(t, "MedicationDispense", "medication", element.getMedication(), -1); + if (element.hasSubject()) + composeReference(t, "MedicationDispense", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "MedicationDispense", "context", element.getContext(), -1); + for (int i = 0; i < element.getSupportingInformation().size(); i++) + composeReference(t, "MedicationDispense", "supportingInformation", element.getSupportingInformation().get(i), i); + for (int i = 0; i < element.getPerformer().size(); i++) + composeMedicationDispenseMedicationDispensePerformerComponent(t, "MedicationDispense", "performer", element.getPerformer().get(i), i); + for (int i = 0; i < element.getAuthorizingPrescription().size(); i++) + composeReference(t, "MedicationDispense", "authorizingPrescription", element.getAuthorizingPrescription().get(i), i); + if (element.hasType()) + composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1); + if (element.hasQuantity()) + composeQuantity(t, "MedicationDispense", "quantity", element.getQuantity(), -1); + if (element.hasDaysSupply()) + composeQuantity(t, "MedicationDispense", "daysSupply", element.getDaysSupply(), -1); + if (element.hasWhenPreparedElement()) + composeDateTime(t, "MedicationDispense", "whenPrepared", element.getWhenPreparedElement(), -1); + if (element.hasWhenHandedOverElement()) + composeDateTime(t, "MedicationDispense", "whenHandedOver", element.getWhenHandedOverElement(), -1); + if (element.hasDestination()) + composeReference(t, "MedicationDispense", "destination", element.getDestination(), -1); + for (int i = 0; i < element.getReceiver().size(); i++) + composeReference(t, "MedicationDispense", "receiver", element.getReceiver().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "MedicationDispense", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getDosageInstruction().size(); i++) + composeDosage(t, "MedicationDispense", "dosageInstruction", element.getDosageInstruction().get(i), i); + if (element.hasSubstitution()) + composeMedicationDispenseMedicationDispenseSubstitutionComponent(t, "MedicationDispense", "substitution", element.getSubstitution(), -1); + for (int i = 0; i < element.getDetectedIssue().size(); i++) + composeReference(t, "MedicationDispense", "detectedIssue", element.getDetectedIssue().get(i), i); + if (element.hasNotDoneElement()) + composeBoolean(t, "MedicationDispense", "notDone", element.getNotDoneElement(), -1); + if (element.hasNotDoneReason()) + composeType(t, "MedicationDispense", "notDoneReason", element.getNotDoneReason(), -1); + for (int i = 0; i < element.getEventHistory().size(); i++) + composeReference(t, "MedicationDispense", "eventHistory", element.getEventHistory().get(i), i); + } + + protected void composeMedicationDispenseMedicationDispensePerformerComponent(Complex parent, String parentType, String name, MedicationDispense.MedicationDispensePerformerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "performer", name, element, index); + if (element.hasActor()) + composeReference(t, "MedicationDispense", "actor", element.getActor(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "MedicationDispense", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(Complex parent, String parentType, String name, MedicationDispense.MedicationDispenseSubstitutionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "substitution", name, element, index); + if (element.hasWasSubstitutedElement()) + composeBoolean(t, "MedicationDispense", "wasSubstituted", element.getWasSubstitutedElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "MedicationDispense", "reason", element.getReason().get(i), i); + for (int i = 0; i < element.getResponsibleParty().size(); i++) + composeReference(t, "MedicationDispense", "responsibleParty", element.getResponsibleParty().get(i), i); + } + + protected void composeMedicationRequest(Complex parent, String parentType, String name, MedicationRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MedicationRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "MedicationRequest", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "MedicationRequest", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "MedicationRequest", "basedOn", element.getBasedOn().get(i), i); + if (element.hasGroupIdentifier()) + composeIdentifier(t, "MedicationRequest", "groupIdentifier", element.getGroupIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "MedicationRequest", "status", element.getStatusElement(), -1); + if (element.hasIntentElement()) + composeEnum(t, "MedicationRequest", "intent", element.getIntentElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "MedicationRequest", "category", element.getCategory().get(i), i); + if (element.hasPriorityElement()) + composeEnum(t, "MedicationRequest", "priority", element.getPriorityElement(), -1); + if (element.hasMedication()) + composeType(t, "MedicationRequest", "medication", element.getMedication(), -1); + if (element.hasSubject()) + composeReference(t, "MedicationRequest", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "MedicationRequest", "context", element.getContext(), -1); + for (int i = 0; i < element.getSupportingInformation().size(); i++) + composeReference(t, "MedicationRequest", "supportingInformation", element.getSupportingInformation().get(i), i); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "MedicationRequest", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasRequester()) + composeMedicationRequestMedicationRequestRequesterComponent(t, "MedicationRequest", "requester", element.getRequester(), -1); + if (element.hasRecorder()) + composeReference(t, "MedicationRequest", "recorder", element.getRecorder(), -1); + if (element.hasPerformer()) + composeReference(t, "MedicationRequest", "performer", element.getPerformer(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "MedicationRequest", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "MedicationRequest", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "MedicationRequest", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getDosageInstruction().size(); i++) + composeDosage(t, "MedicationRequest", "dosageInstruction", element.getDosageInstruction().get(i), i); + if (element.hasDispenseRequest()) + composeMedicationRequestMedicationRequestDispenseRequestComponent(t, "MedicationRequest", "dispenseRequest", element.getDispenseRequest(), -1); + if (element.hasSubstitution()) + composeMedicationRequestMedicationRequestSubstitutionComponent(t, "MedicationRequest", "substitution", element.getSubstitution(), -1); + if (element.hasPriorPrescription()) + composeReference(t, "MedicationRequest", "priorPrescription", element.getPriorPrescription(), -1); + for (int i = 0; i < element.getDetectedIssue().size(); i++) + composeReference(t, "MedicationRequest", "detectedIssue", element.getDetectedIssue().get(i), i); + for (int i = 0; i < element.getEventHistory().size(); i++) + composeReference(t, "MedicationRequest", "eventHistory", element.getEventHistory().get(i), i); + } + + protected void composeMedicationRequestMedicationRequestRequesterComponent(Complex parent, String parentType, String name, MedicationRequest.MedicationRequestRequesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requester", name, element, index); + if (element.hasAgent()) + composeReference(t, "MedicationRequest", "agent", element.getAgent(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "MedicationRequest", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(Complex parent, String parentType, String name, MedicationRequest.MedicationRequestDispenseRequestComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dispenseRequest", name, element, index); + if (element.hasValidityPeriod()) + composePeriod(t, "MedicationRequest", "validityPeriod", element.getValidityPeriod(), -1); + if (element.hasNumberOfRepeatsAllowedElement()) + composeUnsignedInt(t, "MedicationRequest", "numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement(), -1); + if (element.hasQuantity()) + composeQuantity(t, "MedicationRequest", "quantity", element.getQuantity(), -1); + if (element.hasExpectedSupplyDuration()) + composeDuration(t, "MedicationRequest", "expectedSupplyDuration", element.getExpectedSupplyDuration(), -1); + if (element.hasPerformer()) + composeReference(t, "MedicationRequest", "performer", element.getPerformer(), -1); + } + + protected void composeMedicationRequestMedicationRequestSubstitutionComponent(Complex parent, String parentType, String name, MedicationRequest.MedicationRequestSubstitutionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "substitution", name, element, index); + if (element.hasAllowedElement()) + composeBoolean(t, "MedicationRequest", "allowed", element.getAllowedElement(), -1); + if (element.hasReason()) + composeCodeableConcept(t, "MedicationRequest", "reason", element.getReason(), -1); + } + + protected void composeMedicationStatement(Complex parent, String parentType, String name, MedicationStatement element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MedicationStatement", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "MedicationStatement", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "MedicationStatement", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "MedicationStatement", "partOf", element.getPartOf().get(i), i); + if (element.hasContext()) + composeReference(t, "MedicationStatement", "context", element.getContext(), -1); + if (element.hasStatusElement()) + composeEnum(t, "MedicationStatement", "status", element.getStatusElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "MedicationStatement", "category", element.getCategory(), -1); + if (element.hasMedication()) + composeType(t, "MedicationStatement", "medication", element.getMedication(), -1); + if (element.hasEffective()) + composeType(t, "MedicationStatement", "effective", element.getEffective(), -1); + if (element.hasDateAssertedElement()) + composeDateTime(t, "MedicationStatement", "dateAsserted", element.getDateAssertedElement(), -1); + if (element.hasInformationSource()) + composeReference(t, "MedicationStatement", "informationSource", element.getInformationSource(), -1); + if (element.hasSubject()) + composeReference(t, "MedicationStatement", "subject", element.getSubject(), -1); + for (int i = 0; i < element.getDerivedFrom().size(); i++) + composeReference(t, "MedicationStatement", "derivedFrom", element.getDerivedFrom().get(i), i); + if (element.hasTakenElement()) + composeEnum(t, "MedicationStatement", "taken", element.getTakenElement(), -1); + for (int i = 0; i < element.getReasonNotTaken().size(); i++) + composeCodeableConcept(t, "MedicationStatement", "reasonNotTaken", element.getReasonNotTaken().get(i), i); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "MedicationStatement", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "MedicationStatement", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "MedicationStatement", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getDosage().size(); i++) + composeDosage(t, "MedicationStatement", "dosage", element.getDosage().get(i), i); + } + + protected void composeMessageDefinition(Complex parent, String parentType, String name, MessageDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MessageDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "MessageDefinition", "url", element.getUrlElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "MessageDefinition", "identifier", element.getIdentifier(), -1); + if (element.hasVersionElement()) + composeString(t, "MessageDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "MessageDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "MessageDefinition", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "MessageDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "MessageDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "MessageDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "MessageDefinition", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "MessageDefinition", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "MessageDefinition", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "MessageDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "MessageDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "MessageDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "MessageDefinition", "copyright", element.getCopyrightElement(), -1); + if (element.hasBase()) + composeReference(t, "MessageDefinition", "base", element.getBase(), -1); + for (int i = 0; i < element.getParent().size(); i++) + composeReference(t, "MessageDefinition", "parent", element.getParent().get(i), i); + for (int i = 0; i < element.getReplaces().size(); i++) + composeReference(t, "MessageDefinition", "replaces", element.getReplaces().get(i), i); + if (element.hasEventElement()) + composeUri(t, "MessageDefinition", "event", element.getEventElement(), -1); + if (element.hasCategoryElement()) + composeEnum(t, "MessageDefinition", "category", element.getCategoryElement(), -1); + for (int i = 0; i < element.getFocus().size(); i++) + composeMessageDefinitionMessageDefinitionFocusComponent(t, "MessageDefinition", "focus", element.getFocus().get(i), i); + if (element.hasResponseRequiredElement()) + composeBoolean(t, "MessageDefinition", "responseRequired", element.getResponseRequiredElement(), -1); + for (int i = 0; i < element.getAllowedResponse().size(); i++) + composeMessageDefinitionMessageDefinitionAllowedResponseComponent(t, "MessageDefinition", "allowedResponse", element.getAllowedResponse().get(i), i); + } + + protected void composeMessageDefinitionMessageDefinitionFocusComponent(Complex parent, String parentType, String name, MessageDefinition.MessageDefinitionFocusComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "focus", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "MessageDefinition", "code", element.getCodeElement(), -1); + if (element.hasProfile()) + composeReference(t, "MessageDefinition", "profile", element.getProfile(), -1); + if (element.hasMinElement()) + composeUnsignedInt(t, "MessageDefinition", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "MessageDefinition", "max", element.getMaxElement(), -1); + } + + protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(Complex parent, String parentType, String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "allowedResponse", name, element, index); + if (element.hasMessage()) + composeReference(t, "MessageDefinition", "message", element.getMessage(), -1); + if (element.hasSituationElement()) + composeMarkdown(t, "MessageDefinition", "situation", element.getSituationElement(), -1); + } + + protected void composeMessageHeader(Complex parent, String parentType, String name, MessageHeader element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "MessageHeader", name, element, index); + if (element.hasEvent()) + composeCoding(t, "MessageHeader", "event", element.getEvent(), -1); + for (int i = 0; i < element.getDestination().size(); i++) + composeMessageHeaderMessageDestinationComponent(t, "MessageHeader", "destination", element.getDestination().get(i), i); + if (element.hasSender()) + composeReference(t, "MessageHeader", "sender", element.getSender(), -1); + if (element.hasTimestampElement()) + composeInstant(t, "MessageHeader", "timestamp", element.getTimestampElement(), -1); + if (element.hasEnterer()) + composeReference(t, "MessageHeader", "enterer", element.getEnterer(), -1); + if (element.hasAuthor()) + composeReference(t, "MessageHeader", "author", element.getAuthor(), -1); + if (element.hasSource()) + composeMessageHeaderMessageSourceComponent(t, "MessageHeader", "source", element.getSource(), -1); + if (element.hasResponsible()) + composeReference(t, "MessageHeader", "responsible", element.getResponsible(), -1); + if (element.hasReason()) + composeCodeableConcept(t, "MessageHeader", "reason", element.getReason(), -1); + if (element.hasResponse()) + composeMessageHeaderMessageHeaderResponseComponent(t, "MessageHeader", "response", element.getResponse(), -1); + for (int i = 0; i < element.getFocus().size(); i++) + composeReference(t, "MessageHeader", "focus", element.getFocus().get(i), i); + if (element.hasDefinitionElement()) + composeUri(t, "MessageHeader", "definition", element.getDefinitionElement(), -1); + } + + protected void composeMessageHeaderMessageDestinationComponent(Complex parent, String parentType, String name, MessageHeader.MessageDestinationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "destination", name, element, index); + if (element.hasNameElement()) + composeString(t, "MessageHeader", "name", element.getNameElement(), -1); + if (element.hasTarget()) + composeReference(t, "MessageHeader", "target", element.getTarget(), -1); + if (element.hasEndpointElement()) + composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1); + if (element.hasReceiver()) + composeReference(t, "MessageHeader", "receiver", element.getReceiver(), -1); + } + + protected void composeMessageHeaderMessageSourceComponent(Complex parent, String parentType, String name, MessageHeader.MessageSourceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "source", name, element, index); + if (element.hasNameElement()) + composeString(t, "MessageHeader", "name", element.getNameElement(), -1); + if (element.hasSoftwareElement()) + composeString(t, "MessageHeader", "software", element.getSoftwareElement(), -1); + if (element.hasVersionElement()) + composeString(t, "MessageHeader", "version", element.getVersionElement(), -1); + if (element.hasContact()) + composeContactPoint(t, "MessageHeader", "contact", element.getContact(), -1); + if (element.hasEndpointElement()) + composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1); + } + + protected void composeMessageHeaderMessageHeaderResponseComponent(Complex parent, String parentType, String name, MessageHeader.MessageHeaderResponseComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "response", name, element, index); + if (element.hasIdentifierElement()) + composeId(t, "MessageHeader", "identifier", element.getIdentifierElement(), -1); + if (element.hasCodeElement()) + composeEnum(t, "MessageHeader", "code", element.getCodeElement(), -1); + if (element.hasDetails()) + composeReference(t, "MessageHeader", "details", element.getDetails(), -1); + } + + protected void composeNamingSystem(Complex parent, String parentType, String name, NamingSystem element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "NamingSystem", name, element, index); + if (element.hasNameElement()) + composeString(t, "NamingSystem", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "NamingSystem", "status", element.getStatusElement(), -1); + if (element.hasKindElement()) + composeEnum(t, "NamingSystem", "kind", element.getKindElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "NamingSystem", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "NamingSystem", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "NamingSystem", "contact", element.getContact().get(i), i); + if (element.hasResponsibleElement()) + composeString(t, "NamingSystem", "responsible", element.getResponsibleElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "NamingSystem", "type", element.getType(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "NamingSystem", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "NamingSystem", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "NamingSystem", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasUsageElement()) + composeString(t, "NamingSystem", "usage", element.getUsageElement(), -1); + for (int i = 0; i < element.getUniqueId().size(); i++) + composeNamingSystemNamingSystemUniqueIdComponent(t, "NamingSystem", "uniqueId", element.getUniqueId().get(i), i); + if (element.hasReplacedBy()) + composeReference(t, "NamingSystem", "replacedBy", element.getReplacedBy(), -1); + } + + protected void composeNamingSystemNamingSystemUniqueIdComponent(Complex parent, String parentType, String name, NamingSystem.NamingSystemUniqueIdComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "uniqueId", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "NamingSystem", "type", element.getTypeElement(), -1); + if (element.hasValueElement()) + composeString(t, "NamingSystem", "value", element.getValueElement(), -1); + if (element.hasPreferredElement()) + composeBoolean(t, "NamingSystem", "preferred", element.getPreferredElement(), -1); + if (element.hasCommentElement()) + composeString(t, "NamingSystem", "comment", element.getCommentElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "NamingSystem", "period", element.getPeriod(), -1); + } + + protected void composeNutritionOrder(Complex parent, String parentType, String name, NutritionOrder element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "NutritionOrder", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "NutritionOrder", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "NutritionOrder", "status", element.getStatusElement(), -1); + if (element.hasPatient()) + composeReference(t, "NutritionOrder", "patient", element.getPatient(), -1); + if (element.hasEncounter()) + composeReference(t, "NutritionOrder", "encounter", element.getEncounter(), -1); + if (element.hasDateTimeElement()) + composeDateTime(t, "NutritionOrder", "dateTime", element.getDateTimeElement(), -1); + if (element.hasOrderer()) + composeReference(t, "NutritionOrder", "orderer", element.getOrderer(), -1); + for (int i = 0; i < element.getAllergyIntolerance().size(); i++) + composeReference(t, "NutritionOrder", "allergyIntolerance", element.getAllergyIntolerance().get(i), i); + for (int i = 0; i < element.getFoodPreferenceModifier().size(); i++) + composeCodeableConcept(t, "NutritionOrder", "foodPreferenceModifier", element.getFoodPreferenceModifier().get(i), i); + for (int i = 0; i < element.getExcludeFoodModifier().size(); i++) + composeCodeableConcept(t, "NutritionOrder", "excludeFoodModifier", element.getExcludeFoodModifier().get(i), i); + if (element.hasOralDiet()) + composeNutritionOrderNutritionOrderOralDietComponent(t, "NutritionOrder", "oralDiet", element.getOralDiet(), -1); + for (int i = 0; i < element.getSupplement().size(); i++) + composeNutritionOrderNutritionOrderSupplementComponent(t, "NutritionOrder", "supplement", element.getSupplement().get(i), i); + if (element.hasEnteralFormula()) + composeNutritionOrderNutritionOrderEnteralFormulaComponent(t, "NutritionOrder", "enteralFormula", element.getEnteralFormula(), -1); + } + + protected void composeNutritionOrderNutritionOrderOralDietComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "oralDiet", name, element, index); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "NutritionOrder", "type", element.getType().get(i), i); + for (int i = 0; i < element.getSchedule().size(); i++) + composeTiming(t, "NutritionOrder", "schedule", element.getSchedule().get(i), i); + for (int i = 0; i < element.getNutrient().size(); i++) + composeNutritionOrderNutritionOrderOralDietNutrientComponent(t, "NutritionOrder", "nutrient", element.getNutrient().get(i), i); + for (int i = 0; i < element.getTexture().size(); i++) + composeNutritionOrderNutritionOrderOralDietTextureComponent(t, "NutritionOrder", "texture", element.getTexture().get(i), i); + for (int i = 0; i < element.getFluidConsistencyType().size(); i++) + composeCodeableConcept(t, "NutritionOrder", "fluidConsistencyType", element.getFluidConsistencyType().get(i), i); + if (element.hasInstructionElement()) + composeString(t, "NutritionOrder", "instruction", element.getInstructionElement(), -1); + } + + protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "nutrient", name, element, index); + if (element.hasModifier()) + composeCodeableConcept(t, "NutritionOrder", "modifier", element.getModifier(), -1); + if (element.hasAmount()) + composeQuantity(t, "NutritionOrder", "amount", element.getAmount(), -1); + } + + protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietTextureComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "texture", name, element, index); + if (element.hasModifier()) + composeCodeableConcept(t, "NutritionOrder", "modifier", element.getModifier(), -1); + if (element.hasFoodType()) + composeCodeableConcept(t, "NutritionOrder", "foodType", element.getFoodType(), -1); + } + + protected void composeNutritionOrderNutritionOrderSupplementComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderSupplementComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "supplement", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "NutritionOrder", "type", element.getType(), -1); + if (element.hasProductNameElement()) + composeString(t, "NutritionOrder", "productName", element.getProductNameElement(), -1); + for (int i = 0; i < element.getSchedule().size(); i++) + composeTiming(t, "NutritionOrder", "schedule", element.getSchedule().get(i), i); + if (element.hasQuantity()) + composeQuantity(t, "NutritionOrder", "quantity", element.getQuantity(), -1); + if (element.hasInstructionElement()) + composeString(t, "NutritionOrder", "instruction", element.getInstructionElement(), -1); + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "enteralFormula", name, element, index); + if (element.hasBaseFormulaType()) + composeCodeableConcept(t, "NutritionOrder", "baseFormulaType", element.getBaseFormulaType(), -1); + if (element.hasBaseFormulaProductNameElement()) + composeString(t, "NutritionOrder", "baseFormulaProductName", element.getBaseFormulaProductNameElement(), -1); + if (element.hasAdditiveType()) + composeCodeableConcept(t, "NutritionOrder", "additiveType", element.getAdditiveType(), -1); + if (element.hasAdditiveProductNameElement()) + composeString(t, "NutritionOrder", "additiveProductName", element.getAdditiveProductNameElement(), -1); + if (element.hasCaloricDensity()) + composeQuantity(t, "NutritionOrder", "caloricDensity", element.getCaloricDensity(), -1); + if (element.hasRouteofAdministration()) + composeCodeableConcept(t, "NutritionOrder", "routeofAdministration", element.getRouteofAdministration(), -1); + for (int i = 0; i < element.getAdministration().size(); i++) + composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(t, "NutritionOrder", "administration", element.getAdministration().get(i), i); + if (element.hasMaxVolumeToDeliver()) + composeQuantity(t, "NutritionOrder", "maxVolumeToDeliver", element.getMaxVolumeToDeliver(), -1); + if (element.hasAdministrationInstructionElement()) + composeString(t, "NutritionOrder", "administrationInstruction", element.getAdministrationInstructionElement(), -1); + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "administration", name, element, index); + if (element.hasSchedule()) + composeTiming(t, "NutritionOrder", "schedule", element.getSchedule(), -1); + if (element.hasQuantity()) + composeQuantity(t, "NutritionOrder", "quantity", element.getQuantity(), -1); + if (element.hasRate()) + composeType(t, "NutritionOrder", "rate", element.getRate(), -1); + } + + protected void composeObservation(Complex parent, String parentType, String name, Observation element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Observation", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Observation", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "Observation", "basedOn", element.getBasedOn().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Observation", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Observation", "category", element.getCategory().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "Observation", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "Observation", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "Observation", "context", element.getContext(), -1); + if (element.hasEffective()) + composeType(t, "Observation", "effective", element.getEffective(), -1); + if (element.hasIssuedElement()) + composeInstant(t, "Observation", "issued", element.getIssuedElement(), -1); + for (int i = 0; i < element.getPerformer().size(); i++) + composeReference(t, "Observation", "performer", element.getPerformer().get(i), i); + if (element.hasValue()) + composeType(t, "Observation", "value", element.getValue(), -1); + if (element.hasDataAbsentReason()) + composeCodeableConcept(t, "Observation", "dataAbsentReason", element.getDataAbsentReason(), -1); + if (element.hasInterpretation()) + composeCodeableConcept(t, "Observation", "interpretation", element.getInterpretation(), -1); + if (element.hasCommentElement()) + composeString(t, "Observation", "comment", element.getCommentElement(), -1); + if (element.hasBodySite()) + composeCodeableConcept(t, "Observation", "bodySite", element.getBodySite(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "Observation", "method", element.getMethod(), -1); + if (element.hasSpecimen()) + composeReference(t, "Observation", "specimen", element.getSpecimen(), -1); + if (element.hasDevice()) + composeReference(t, "Observation", "device", element.getDevice(), -1); + for (int i = 0; i < element.getReferenceRange().size(); i++) + composeObservationObservationReferenceRangeComponent(t, "Observation", "referenceRange", element.getReferenceRange().get(i), i); + for (int i = 0; i < element.getRelated().size(); i++) + composeObservationObservationRelatedComponent(t, "Observation", "related", element.getRelated().get(i), i); + for (int i = 0; i < element.getComponent().size(); i++) + composeObservationObservationComponentComponent(t, "Observation", "component", element.getComponent().get(i), i); + } + + protected void composeObservationObservationReferenceRangeComponent(Complex parent, String parentType, String name, Observation.ObservationReferenceRangeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "referenceRange", name, element, index); + if (element.hasLow()) + composeQuantity(t, "Observation", "low", element.getLow(), -1); + if (element.hasHigh()) + composeQuantity(t, "Observation", "high", element.getHigh(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Observation", "type", element.getType(), -1); + for (int i = 0; i < element.getAppliesTo().size(); i++) + composeCodeableConcept(t, "Observation", "appliesTo", element.getAppliesTo().get(i), i); + if (element.hasAge()) + composeRange(t, "Observation", "age", element.getAge(), -1); + if (element.hasTextElement()) + composeString(t, "Observation", "text", element.getTextElement(), -1); + } + + protected void composeObservationObservationRelatedComponent(Complex parent, String parentType, String name, Observation.ObservationRelatedComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "related", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Observation", "type", element.getTypeElement(), -1); + if (element.hasTarget()) + composeReference(t, "Observation", "target", element.getTarget(), -1); + } + + protected void composeObservationObservationComponentComponent(Complex parent, String parentType, String name, Observation.ObservationComponentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "component", name, element, index); + if (element.hasCode()) + composeCodeableConcept(t, "Observation", "code", element.getCode(), -1); + if (element.hasValue()) + composeType(t, "Observation", "value", element.getValue(), -1); + if (element.hasDataAbsentReason()) + composeCodeableConcept(t, "Observation", "dataAbsentReason", element.getDataAbsentReason(), -1); + if (element.hasInterpretation()) + composeCodeableConcept(t, "Observation", "interpretation", element.getInterpretation(), -1); + for (int i = 0; i < element.getReferenceRange().size(); i++) + composeObservationObservationReferenceRangeComponent(t, "Observation", "referenceRange", element.getReferenceRange().get(i), i); + } + + protected void composeOperationDefinition(Complex parent, String parentType, String name, OperationDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "OperationDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "OperationDefinition", "url", element.getUrlElement(), -1); + if (element.hasVersionElement()) + composeString(t, "OperationDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "OperationDefinition", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "OperationDefinition", "status", element.getStatusElement(), -1); + if (element.hasKindElement()) + composeEnum(t, "OperationDefinition", "kind", element.getKindElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "OperationDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "OperationDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "OperationDefinition", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "OperationDefinition", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "OperationDefinition", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "OperationDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "OperationDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "OperationDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasIdempotentElement()) + composeBoolean(t, "OperationDefinition", "idempotent", element.getIdempotentElement(), -1); + if (element.hasCodeElement()) + composeCode(t, "OperationDefinition", "code", element.getCodeElement(), -1); + if (element.hasCommentElement()) + composeString(t, "OperationDefinition", "comment", element.getCommentElement(), -1); + if (element.hasBase()) + composeReference(t, "OperationDefinition", "base", element.getBase(), -1); + for (int i = 0; i < element.getResource().size(); i++) + composeCode(t, "OperationDefinition", "resource", element.getResource().get(i), i); + if (element.hasSystemElement()) + composeBoolean(t, "OperationDefinition", "system", element.getSystemElement(), -1); + if (element.hasTypeElement()) + composeBoolean(t, "OperationDefinition", "type", element.getTypeElement(), -1); + if (element.hasInstanceElement()) + composeBoolean(t, "OperationDefinition", "instance", element.getInstanceElement(), -1); + for (int i = 0; i < element.getParameter().size(); i++) + composeOperationDefinitionOperationDefinitionParameterComponent(t, "OperationDefinition", "parameter", element.getParameter().get(i), i); + for (int i = 0; i < element.getOverload().size(); i++) + composeOperationDefinitionOperationDefinitionOverloadComponent(t, "OperationDefinition", "overload", element.getOverload().get(i), i); + } + + protected void composeOperationDefinitionOperationDefinitionParameterComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionParameterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "parameter", name, element, index); + if (element.hasNameElement()) + composeCode(t, "OperationDefinition", "name", element.getNameElement(), -1); + if (element.hasUseElement()) + composeEnum(t, "OperationDefinition", "use", element.getUseElement(), -1); + if (element.hasMinElement()) + composeInteger(t, "OperationDefinition", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "OperationDefinition", "max", element.getMaxElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "OperationDefinition", "documentation", element.getDocumentationElement(), -1); + if (element.hasTypeElement()) + composeCode(t, "OperationDefinition", "type", element.getTypeElement(), -1); + if (element.hasSearchTypeElement()) + composeEnum(t, "OperationDefinition", "searchType", element.getSearchTypeElement(), -1); + if (element.hasProfile()) + composeReference(t, "OperationDefinition", "profile", element.getProfile(), -1); + if (element.hasBinding()) + composeOperationDefinitionOperationDefinitionParameterBindingComponent(t, "OperationDefinition", "binding", element.getBinding(), -1); + for (int i = 0; i < element.getPart().size(); i++) + composeOperationDefinitionOperationDefinitionParameterComponent(t, "OperationDefinition", "part", element.getPart().get(i), i); + } + + protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionParameterBindingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "binding", name, element, index); + if (element.hasStrengthElement()) + composeEnum(t, "OperationDefinition", "strength", element.getStrengthElement(), -1); + if (element.hasValueSet()) + composeType(t, "OperationDefinition", "valueSet", element.getValueSet(), -1); + } + + protected void composeOperationDefinitionOperationDefinitionOverloadComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionOverloadComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "overload", name, element, index); + for (int i = 0; i < element.getParameterName().size(); i++) + composeString(t, "OperationDefinition", "parameterName", element.getParameterName().get(i), i); + if (element.hasCommentElement()) + composeString(t, "OperationDefinition", "comment", element.getCommentElement(), -1); + } + + protected void composeOperationOutcome(Complex parent, String parentType, String name, OperationOutcome element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "OperationOutcome", name, element, index); + for (int i = 0; i < element.getIssue().size(); i++) + composeOperationOutcomeOperationOutcomeIssueComponent(t, "OperationOutcome", "issue", element.getIssue().get(i), i); + } + + protected void composeOperationOutcomeOperationOutcomeIssueComponent(Complex parent, String parentType, String name, OperationOutcome.OperationOutcomeIssueComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "issue", name, element, index); + if (element.hasSeverityElement()) + composeEnum(t, "OperationOutcome", "severity", element.getSeverityElement(), -1); + if (element.hasCodeElement()) + composeEnum(t, "OperationOutcome", "code", element.getCodeElement(), -1); + if (element.hasDetails()) + composeCodeableConcept(t, "OperationOutcome", "details", element.getDetails(), -1); + if (element.hasDiagnosticsElement()) + composeString(t, "OperationOutcome", "diagnostics", element.getDiagnosticsElement(), -1); + for (int i = 0; i < element.getLocation().size(); i++) + composeString(t, "OperationOutcome", "location", element.getLocation().get(i), i); + for (int i = 0; i < element.getExpression().size(); i++) + composeString(t, "OperationOutcome", "expression", element.getExpression().get(i), i); + } + + protected void composeOrganization(Complex parent, String parentType, String name, Organization element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Organization", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Organization", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "Organization", "active", element.getActiveElement(), -1); + for (int i = 0; i < element.getType().size(); i++) + composeCodeableConcept(t, "Organization", "type", element.getType().get(i), i); + if (element.hasNameElement()) + composeString(t, "Organization", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getAlias().size(); i++) + composeString(t, "Organization", "alias", element.getAlias().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Organization", "telecom", element.getTelecom().get(i), i); + for (int i = 0; i < element.getAddress().size(); i++) + composeAddress(t, "Organization", "address", element.getAddress().get(i), i); + if (element.hasPartOf()) + composeReference(t, "Organization", "partOf", element.getPartOf(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeOrganizationOrganizationContactComponent(t, "Organization", "contact", element.getContact().get(i), i); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "Organization", "endpoint", element.getEndpoint().get(i), i); + } + + protected void composeOrganizationOrganizationContactComponent(Complex parent, String parentType, String name, Organization.OrganizationContactComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "contact", name, element, index); + if (element.hasPurpose()) + composeCodeableConcept(t, "Organization", "purpose", element.getPurpose(), -1); + if (element.hasName()) + composeHumanName(t, "Organization", "name", element.getName(), -1); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Organization", "telecom", element.getTelecom().get(i), i); + if (element.hasAddress()) + composeAddress(t, "Organization", "address", element.getAddress(), -1); + } + + protected void composePatient(Complex parent, String parentType, String name, Patient element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Patient", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Patient", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "Patient", "active", element.getActiveElement(), -1); + for (int i = 0; i < element.getName().size(); i++) + composeHumanName(t, "Patient", "name", element.getName().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i); + if (element.hasGenderElement()) + composeEnum(t, "Patient", "gender", element.getGenderElement(), -1); + if (element.hasBirthDateElement()) + composeDate(t, "Patient", "birthDate", element.getBirthDateElement(), -1); + if (element.hasDeceased()) + composeType(t, "Patient", "deceased", element.getDeceased(), -1); + for (int i = 0; i < element.getAddress().size(); i++) + composeAddress(t, "Patient", "address", element.getAddress().get(i), i); + if (element.hasMaritalStatus()) + composeCodeableConcept(t, "Patient", "maritalStatus", element.getMaritalStatus(), -1); + if (element.hasMultipleBirth()) + composeType(t, "Patient", "multipleBirth", element.getMultipleBirth(), -1); + for (int i = 0; i < element.getPhoto().size(); i++) + composeAttachment(t, "Patient", "photo", element.getPhoto().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composePatientContactComponent(t, "Patient", "contact", element.getContact().get(i), i); + if (element.hasAnimal()) + composePatientAnimalComponent(t, "Patient", "animal", element.getAnimal(), -1); + for (int i = 0; i < element.getCommunication().size(); i++) + composePatientPatientCommunicationComponent(t, "Patient", "communication", element.getCommunication().get(i), i); + for (int i = 0; i < element.getGeneralPractitioner().size(); i++) + composeReference(t, "Patient", "generalPractitioner", element.getGeneralPractitioner().get(i), i); + if (element.hasManagingOrganization()) + composeReference(t, "Patient", "managingOrganization", element.getManagingOrganization(), -1); + for (int i = 0; i < element.getLink().size(); i++) + composePatientPatientLinkComponent(t, "Patient", "link", element.getLink().get(i), i); + } + + protected void composePatientContactComponent(Complex parent, String parentType, String name, Patient.ContactComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "contact", name, element, index); + for (int i = 0; i < element.getRelationship().size(); i++) + composeCodeableConcept(t, "Patient", "relationship", element.getRelationship().get(i), i); + if (element.hasName()) + composeHumanName(t, "Patient", "name", element.getName(), -1); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i); + if (element.hasAddress()) + composeAddress(t, "Patient", "address", element.getAddress(), -1); + if (element.hasGenderElement()) + composeEnum(t, "Patient", "gender", element.getGenderElement(), -1); + if (element.hasOrganization()) + composeReference(t, "Patient", "organization", element.getOrganization(), -1); + if (element.hasPeriod()) + composePeriod(t, "Patient", "period", element.getPeriod(), -1); + } + + protected void composePatientAnimalComponent(Complex parent, String parentType, String name, Patient.AnimalComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "animal", name, element, index); + if (element.hasSpecies()) + composeCodeableConcept(t, "Patient", "species", element.getSpecies(), -1); + if (element.hasBreed()) + composeCodeableConcept(t, "Patient", "breed", element.getBreed(), -1); + if (element.hasGenderStatus()) + composeCodeableConcept(t, "Patient", "genderStatus", element.getGenderStatus(), -1); + } + + protected void composePatientPatientCommunicationComponent(Complex parent, String parentType, String name, Patient.PatientCommunicationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "communication", name, element, index); + if (element.hasLanguage()) + composeCodeableConcept(t, "Patient", "language", element.getLanguage(), -1); + if (element.hasPreferredElement()) + composeBoolean(t, "Patient", "preferred", element.getPreferredElement(), -1); + } + + protected void composePatientPatientLinkComponent(Complex parent, String parentType, String name, Patient.PatientLinkComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "link", name, element, index); + if (element.hasOther()) + composeReference(t, "Patient", "other", element.getOther(), -1); + if (element.hasTypeElement()) + composeEnum(t, "Patient", "type", element.getTypeElement(), -1); + } + + protected void composePaymentNotice(Complex parent, String parentType, String name, PaymentNotice element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "PaymentNotice", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "PaymentNotice", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "PaymentNotice", "status", element.getStatusElement(), -1); + if (element.hasRequest()) + composeReference(t, "PaymentNotice", "request", element.getRequest(), -1); + if (element.hasResponse()) + composeReference(t, "PaymentNotice", "response", element.getResponse(), -1); + if (element.hasStatusDateElement()) + composeDate(t, "PaymentNotice", "statusDate", element.getStatusDateElement(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "PaymentNotice", "created", element.getCreatedElement(), -1); + if (element.hasTarget()) + composeReference(t, "PaymentNotice", "target", element.getTarget(), -1); + if (element.hasProvider()) + composeReference(t, "PaymentNotice", "provider", element.getProvider(), -1); + if (element.hasOrganization()) + composeReference(t, "PaymentNotice", "organization", element.getOrganization(), -1); + if (element.hasPaymentStatus()) + composeCodeableConcept(t, "PaymentNotice", "paymentStatus", element.getPaymentStatus(), -1); + } + + protected void composePaymentReconciliation(Complex parent, String parentType, String name, PaymentReconciliation element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "PaymentReconciliation", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "PaymentReconciliation", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "PaymentReconciliation", "status", element.getStatusElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "PaymentReconciliation", "period", element.getPeriod(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "PaymentReconciliation", "created", element.getCreatedElement(), -1); + if (element.hasOrganization()) + composeReference(t, "PaymentReconciliation", "organization", element.getOrganization(), -1); + if (element.hasRequest()) + composeReference(t, "PaymentReconciliation", "request", element.getRequest(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "PaymentReconciliation", "outcome", element.getOutcomeElement(), -1); + if (element.hasDispositionElement()) + composeString(t, "PaymentReconciliation", "disposition", element.getDispositionElement(), -1); + if (element.hasRequestProvider()) + composeReference(t, "PaymentReconciliation", "requestProvider", element.getRequestProvider(), -1); + if (element.hasRequestOrganization()) + composeReference(t, "PaymentReconciliation", "requestOrganization", element.getRequestOrganization(), -1); + for (int i = 0; i < element.getDetail().size(); i++) + composePaymentReconciliationDetailsComponent(t, "PaymentReconciliation", "detail", element.getDetail().get(i), i); + if (element.hasForm()) + composeCodeableConcept(t, "PaymentReconciliation", "form", element.getForm(), -1); + if (element.hasTotal()) + composeMoney(t, "PaymentReconciliation", "total", element.getTotal(), -1); + for (int i = 0; i < element.getProcessNote().size(); i++) + composePaymentReconciliationNotesComponent(t, "PaymentReconciliation", "processNote", element.getProcessNote().get(i), i); + } + + protected void composePaymentReconciliationDetailsComponent(Complex parent, String parentType, String name, PaymentReconciliation.DetailsComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "detail", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "PaymentReconciliation", "type", element.getType(), -1); + if (element.hasRequest()) + composeReference(t, "PaymentReconciliation", "request", element.getRequest(), -1); + if (element.hasResponse()) + composeReference(t, "PaymentReconciliation", "response", element.getResponse(), -1); + if (element.hasSubmitter()) + composeReference(t, "PaymentReconciliation", "submitter", element.getSubmitter(), -1); + if (element.hasPayee()) + composeReference(t, "PaymentReconciliation", "payee", element.getPayee(), -1); + if (element.hasDateElement()) + composeDate(t, "PaymentReconciliation", "date", element.getDateElement(), -1); + if (element.hasAmount()) + composeMoney(t, "PaymentReconciliation", "amount", element.getAmount(), -1); + } + + protected void composePaymentReconciliationNotesComponent(Complex parent, String parentType, String name, PaymentReconciliation.NotesComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "processNote", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "PaymentReconciliation", "type", element.getTypeElement(), -1); + if (element.hasTextElement()) + composeString(t, "PaymentReconciliation", "text", element.getTextElement(), -1); + } + + protected void composePerson(Complex parent, String parentType, String name, Person element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Person", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Person", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getName().size(); i++) + composeHumanName(t, "Person", "name", element.getName().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Person", "telecom", element.getTelecom().get(i), i); + if (element.hasGenderElement()) + composeEnum(t, "Person", "gender", element.getGenderElement(), -1); + if (element.hasBirthDateElement()) + composeDate(t, "Person", "birthDate", element.getBirthDateElement(), -1); + for (int i = 0; i < element.getAddress().size(); i++) + composeAddress(t, "Person", "address", element.getAddress().get(i), i); + if (element.hasPhoto()) + composeAttachment(t, "Person", "photo", element.getPhoto(), -1); + if (element.hasManagingOrganization()) + composeReference(t, "Person", "managingOrganization", element.getManagingOrganization(), -1); + if (element.hasActiveElement()) + composeBoolean(t, "Person", "active", element.getActiveElement(), -1); + for (int i = 0; i < element.getLink().size(); i++) + composePersonPersonLinkComponent(t, "Person", "link", element.getLink().get(i), i); + } + + protected void composePersonPersonLinkComponent(Complex parent, String parentType, String name, Person.PersonLinkComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "link", name, element, index); + if (element.hasTarget()) + composeReference(t, "Person", "target", element.getTarget(), -1); + if (element.hasAssuranceElement()) + composeEnum(t, "Person", "assurance", element.getAssuranceElement(), -1); + } + + protected void composePlanDefinition(Complex parent, String parentType, String name, PlanDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "PlanDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "PlanDefinition", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "PlanDefinition", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "PlanDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "PlanDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "PlanDefinition", "title", element.getTitleElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "PlanDefinition", "type", element.getType(), -1); + if (element.hasStatusElement()) + composeEnum(t, "PlanDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "PlanDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "PlanDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "PlanDefinition", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "PlanDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasUsageElement()) + composeString(t, "PlanDefinition", "usage", element.getUsageElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "PlanDefinition", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "PlanDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "PlanDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "PlanDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "PlanDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeCodeableConcept(t, "PlanDefinition", "topic", element.getTopic().get(i), i); + for (int i = 0; i < element.getContributor().size(); i++) + composeContributor(t, "PlanDefinition", "contributor", element.getContributor().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "PlanDefinition", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "PlanDefinition", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "PlanDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); + for (int i = 0; i < element.getLibrary().size(); i++) + composeReference(t, "PlanDefinition", "library", element.getLibrary().get(i), i); + for (int i = 0; i < element.getGoal().size(); i++) + composePlanDefinitionPlanDefinitionGoalComponent(t, "PlanDefinition", "goal", element.getGoal().get(i), i); + for (int i = 0; i < element.getAction().size(); i++) + composePlanDefinitionPlanDefinitionActionComponent(t, "PlanDefinition", "action", element.getAction().get(i), i); + } + + protected void composePlanDefinitionPlanDefinitionGoalComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionGoalComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "goal", name, element, index); + if (element.hasCategory()) + composeCodeableConcept(t, "PlanDefinition", "category", element.getCategory(), -1); + if (element.hasDescription()) + composeCodeableConcept(t, "PlanDefinition", "description", element.getDescription(), -1); + if (element.hasPriority()) + composeCodeableConcept(t, "PlanDefinition", "priority", element.getPriority(), -1); + if (element.hasStart()) + composeCodeableConcept(t, "PlanDefinition", "start", element.getStart(), -1); + for (int i = 0; i < element.getAddresses().size(); i++) + composeCodeableConcept(t, "PlanDefinition", "addresses", element.getAddresses().get(i), i); + for (int i = 0; i < element.getDocumentation().size(); i++) + composeRelatedArtifact(t, "PlanDefinition", "documentation", element.getDocumentation().get(i), i); + for (int i = 0; i < element.getTarget().size(); i++) + composePlanDefinitionPlanDefinitionGoalTargetComponent(t, "PlanDefinition", "target", element.getTarget().get(i), i); + } + + protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionGoalTargetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "target", name, element, index); + if (element.hasMeasure()) + composeCodeableConcept(t, "PlanDefinition", "measure", element.getMeasure(), -1); + if (element.hasDetail()) + composeType(t, "PlanDefinition", "detail", element.getDetail(), -1); + if (element.hasDue()) + composeDuration(t, "PlanDefinition", "due", element.getDue(), -1); + } + + protected void composePlanDefinitionPlanDefinitionActionComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasPrefixElement()) + composeString(t, "PlanDefinition", "prefix", element.getPrefixElement(), -1); + if (element.hasTitleElement()) + composeString(t, "PlanDefinition", "title", element.getTitleElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasTextEquivalentElement()) + composeString(t, "PlanDefinition", "textEquivalent", element.getTextEquivalentElement(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCodeableConcept(t, "PlanDefinition", "code", element.getCode().get(i), i); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "PlanDefinition", "reason", element.getReason().get(i), i); + for (int i = 0; i < element.getDocumentation().size(); i++) + composeRelatedArtifact(t, "PlanDefinition", "documentation", element.getDocumentation().get(i), i); + for (int i = 0; i < element.getGoalId().size(); i++) + composeId(t, "PlanDefinition", "goalId", element.getGoalId().get(i), i); + for (int i = 0; i < element.getTriggerDefinition().size(); i++) + composeTriggerDefinition(t, "PlanDefinition", "triggerDefinition", element.getTriggerDefinition().get(i), i); + for (int i = 0; i < element.getCondition().size(); i++) + composePlanDefinitionPlanDefinitionActionConditionComponent(t, "PlanDefinition", "condition", element.getCondition().get(i), i); + for (int i = 0; i < element.getInput().size(); i++) + composeDataRequirement(t, "PlanDefinition", "input", element.getInput().get(i), i); + for (int i = 0; i < element.getOutput().size(); i++) + composeDataRequirement(t, "PlanDefinition", "output", element.getOutput().get(i), i); + for (int i = 0; i < element.getRelatedAction().size(); i++) + composePlanDefinitionPlanDefinitionActionRelatedActionComponent(t, "PlanDefinition", "relatedAction", element.getRelatedAction().get(i), i); + if (element.hasTiming()) + composeType(t, "PlanDefinition", "timing", element.getTiming(), -1); + for (int i = 0; i < element.getParticipant().size(); i++) + composePlanDefinitionPlanDefinitionActionParticipantComponent(t, "PlanDefinition", "participant", element.getParticipant().get(i), i); + if (element.hasType()) + composeCoding(t, "PlanDefinition", "type", element.getType(), -1); + if (element.hasGroupingBehaviorElement()) + composeEnum(t, "PlanDefinition", "groupingBehavior", element.getGroupingBehaviorElement(), -1); + if (element.hasSelectionBehaviorElement()) + composeEnum(t, "PlanDefinition", "selectionBehavior", element.getSelectionBehaviorElement(), -1); + if (element.hasRequiredBehaviorElement()) + composeEnum(t, "PlanDefinition", "requiredBehavior", element.getRequiredBehaviorElement(), -1); + if (element.hasPrecheckBehaviorElement()) + composeEnum(t, "PlanDefinition", "precheckBehavior", element.getPrecheckBehaviorElement(), -1); + if (element.hasCardinalityBehaviorElement()) + composeEnum(t, "PlanDefinition", "cardinalityBehavior", element.getCardinalityBehaviorElement(), -1); + if (element.hasDefinition()) + composeReference(t, "PlanDefinition", "definition", element.getDefinition(), -1); + if (element.hasTransform()) + composeReference(t, "PlanDefinition", "transform", element.getTransform(), -1); + for (int i = 0; i < element.getDynamicValue().size(); i++) + composePlanDefinitionPlanDefinitionActionDynamicValueComponent(t, "PlanDefinition", "dynamicValue", element.getDynamicValue().get(i), i); + for (int i = 0; i < element.getAction().size(); i++) + composePlanDefinitionPlanDefinitionActionComponent(t, "PlanDefinition", "action", element.getAction().get(i), i); + } + + protected void composePlanDefinitionPlanDefinitionActionConditionComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionConditionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "condition", name, element, index); + if (element.hasKindElement()) + composeEnum(t, "PlanDefinition", "kind", element.getKindElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasLanguageElement()) + composeString(t, "PlanDefinition", "language", element.getLanguageElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "PlanDefinition", "expression", element.getExpressionElement(), -1); + } + + protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "relatedAction", name, element, index); + if (element.hasActionIdElement()) + composeId(t, "PlanDefinition", "actionId", element.getActionIdElement(), -1); + if (element.hasRelationshipElement()) + composeEnum(t, "PlanDefinition", "relationship", element.getRelationshipElement(), -1); + if (element.hasOffset()) + composeType(t, "PlanDefinition", "offset", element.getOffset(), -1); + } + + protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "PlanDefinition", "type", element.getTypeElement(), -1); + if (element.hasRole()) + composeCodeableConcept(t, "PlanDefinition", "role", element.getRole(), -1); + } + + protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(Complex parent, String parentType, String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dynamicValue", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "PlanDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPathElement()) + composeString(t, "PlanDefinition", "path", element.getPathElement(), -1); + if (element.hasLanguageElement()) + composeString(t, "PlanDefinition", "language", element.getLanguageElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "PlanDefinition", "expression", element.getExpressionElement(), -1); + } + + protected void composePractitioner(Complex parent, String parentType, String name, Practitioner element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Practitioner", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Practitioner", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "Practitioner", "active", element.getActiveElement(), -1); + for (int i = 0; i < element.getName().size(); i++) + composeHumanName(t, "Practitioner", "name", element.getName().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "Practitioner", "telecom", element.getTelecom().get(i), i); + for (int i = 0; i < element.getAddress().size(); i++) + composeAddress(t, "Practitioner", "address", element.getAddress().get(i), i); + if (element.hasGenderElement()) + composeEnum(t, "Practitioner", "gender", element.getGenderElement(), -1); + if (element.hasBirthDateElement()) + composeDate(t, "Practitioner", "birthDate", element.getBirthDateElement(), -1); + for (int i = 0; i < element.getPhoto().size(); i++) + composeAttachment(t, "Practitioner", "photo", element.getPhoto().get(i), i); + for (int i = 0; i < element.getQualification().size(); i++) + composePractitionerPractitionerQualificationComponent(t, "Practitioner", "qualification", element.getQualification().get(i), i); + for (int i = 0; i < element.getCommunication().size(); i++) + composeCodeableConcept(t, "Practitioner", "communication", element.getCommunication().get(i), i); + } + + protected void composePractitionerPractitionerQualificationComponent(Complex parent, String parentType, String name, Practitioner.PractitionerQualificationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "qualification", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Practitioner", "identifier", element.getIdentifier().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "Practitioner", "code", element.getCode(), -1); + if (element.hasPeriod()) + composePeriod(t, "Practitioner", "period", element.getPeriod(), -1); + if (element.hasIssuer()) + composeReference(t, "Practitioner", "issuer", element.getIssuer(), -1); + } + + protected void composePractitionerRole(Complex parent, String parentType, String name, PractitionerRole element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "PractitionerRole", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "PractitionerRole", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "PractitionerRole", "active", element.getActiveElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "PractitionerRole", "period", element.getPeriod(), -1); + if (element.hasPractitioner()) + composeReference(t, "PractitionerRole", "practitioner", element.getPractitioner(), -1); + if (element.hasOrganization()) + composeReference(t, "PractitionerRole", "organization", element.getOrganization(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCodeableConcept(t, "PractitionerRole", "code", element.getCode().get(i), i); + for (int i = 0; i < element.getSpecialty().size(); i++) + composeCodeableConcept(t, "PractitionerRole", "specialty", element.getSpecialty().get(i), i); + for (int i = 0; i < element.getLocation().size(); i++) + composeReference(t, "PractitionerRole", "location", element.getLocation().get(i), i); + for (int i = 0; i < element.getHealthcareService().size(); i++) + composeReference(t, "PractitionerRole", "healthcareService", element.getHealthcareService().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "PractitionerRole", "telecom", element.getTelecom().get(i), i); + for (int i = 0; i < element.getAvailableTime().size(); i++) + composePractitionerRolePractitionerRoleAvailableTimeComponent(t, "PractitionerRole", "availableTime", element.getAvailableTime().get(i), i); + for (int i = 0; i < element.getNotAvailable().size(); i++) + composePractitionerRolePractitionerRoleNotAvailableComponent(t, "PractitionerRole", "notAvailable", element.getNotAvailable().get(i), i); + if (element.hasAvailabilityExceptionsElement()) + composeString(t, "PractitionerRole", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1); + for (int i = 0; i < element.getEndpoint().size(); i++) + composeReference(t, "PractitionerRole", "endpoint", element.getEndpoint().get(i), i); + } + + protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(Complex parent, String parentType, String name, PractitionerRole.PractitionerRoleAvailableTimeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "availableTime", name, element, index); + for (int i = 0; i < element.getDaysOfWeek().size(); i++) + composeEnum(t, "PractitionerRole", "daysOfWeek", element.getDaysOfWeek().get(i), i); + if (element.hasAllDayElement()) + composeBoolean(t, "PractitionerRole", "allDay", element.getAllDayElement(), -1); + if (element.hasAvailableStartTimeElement()) + composeTime(t, "PractitionerRole", "availableStartTime", element.getAvailableStartTimeElement(), -1); + if (element.hasAvailableEndTimeElement()) + composeTime(t, "PractitionerRole", "availableEndTime", element.getAvailableEndTimeElement(), -1); + } + + protected void composePractitionerRolePractitionerRoleNotAvailableComponent(Complex parent, String parentType, String name, PractitionerRole.PractitionerRoleNotAvailableComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "notAvailable", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "PractitionerRole", "description", element.getDescriptionElement(), -1); + if (element.hasDuring()) + composePeriod(t, "PractitionerRole", "during", element.getDuring(), -1); + } + + protected void composeProcedure(Complex parent, String parentType, String name, Procedure element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Procedure", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Procedure", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "Procedure", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "Procedure", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "Procedure", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Procedure", "status", element.getStatusElement(), -1); + if (element.hasNotDoneElement()) + composeBoolean(t, "Procedure", "notDone", element.getNotDoneElement(), -1); + if (element.hasNotDoneReason()) + composeCodeableConcept(t, "Procedure", "notDoneReason", element.getNotDoneReason(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "Procedure", "category", element.getCategory(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Procedure", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "Procedure", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "Procedure", "context", element.getContext(), -1); + if (element.hasPerformed()) + composeType(t, "Procedure", "performed", element.getPerformed(), -1); + for (int i = 0; i < element.getPerformer().size(); i++) + composeProcedureProcedurePerformerComponent(t, "Procedure", "performer", element.getPerformer().get(i), i); + if (element.hasLocation()) + composeReference(t, "Procedure", "location", element.getLocation(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "Procedure", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "Procedure", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getBodySite().size(); i++) + composeCodeableConcept(t, "Procedure", "bodySite", element.getBodySite().get(i), i); + if (element.hasOutcome()) + composeCodeableConcept(t, "Procedure", "outcome", element.getOutcome(), -1); + for (int i = 0; i < element.getReport().size(); i++) + composeReference(t, "Procedure", "report", element.getReport().get(i), i); + for (int i = 0; i < element.getComplication().size(); i++) + composeCodeableConcept(t, "Procedure", "complication", element.getComplication().get(i), i); + for (int i = 0; i < element.getComplicationDetail().size(); i++) + composeReference(t, "Procedure", "complicationDetail", element.getComplicationDetail().get(i), i); + for (int i = 0; i < element.getFollowUp().size(); i++) + composeCodeableConcept(t, "Procedure", "followUp", element.getFollowUp().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Procedure", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getFocalDevice().size(); i++) + composeProcedureProcedureFocalDeviceComponent(t, "Procedure", "focalDevice", element.getFocalDevice().get(i), i); + for (int i = 0; i < element.getUsedReference().size(); i++) + composeReference(t, "Procedure", "usedReference", element.getUsedReference().get(i), i); + for (int i = 0; i < element.getUsedCode().size(); i++) + composeCodeableConcept(t, "Procedure", "usedCode", element.getUsedCode().get(i), i); + } + + protected void composeProcedureProcedurePerformerComponent(Complex parent, String parentType, String name, Procedure.ProcedurePerformerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "performer", name, element, index); + if (element.hasRole()) + composeCodeableConcept(t, "Procedure", "role", element.getRole(), -1); + if (element.hasActor()) + composeReference(t, "Procedure", "actor", element.getActor(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "Procedure", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeProcedureProcedureFocalDeviceComponent(Complex parent, String parentType, String name, Procedure.ProcedureFocalDeviceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "focalDevice", name, element, index); + if (element.hasAction()) + composeCodeableConcept(t, "Procedure", "action", element.getAction(), -1); + if (element.hasManipulated()) + composeReference(t, "Procedure", "manipulated", element.getManipulated(), -1); + } + + protected void composeProcedureRequest(Complex parent, String parentType, String name, ProcedureRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ProcedureRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ProcedureRequest", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "ProcedureRequest", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "ProcedureRequest", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getReplaces().size(); i++) + composeReference(t, "ProcedureRequest", "replaces", element.getReplaces().get(i), i); + if (element.hasRequisition()) + composeIdentifier(t, "ProcedureRequest", "requisition", element.getRequisition(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ProcedureRequest", "status", element.getStatusElement(), -1); + if (element.hasIntentElement()) + composeEnum(t, "ProcedureRequest", "intent", element.getIntentElement(), -1); + if (element.hasPriorityElement()) + composeEnum(t, "ProcedureRequest", "priority", element.getPriorityElement(), -1); + if (element.hasDoNotPerformElement()) + composeBoolean(t, "ProcedureRequest", "doNotPerform", element.getDoNotPerformElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "ProcedureRequest", "category", element.getCategory().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "ProcedureRequest", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "ProcedureRequest", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "ProcedureRequest", "context", element.getContext(), -1); + if (element.hasOccurrence()) + composeType(t, "ProcedureRequest", "occurrence", element.getOccurrence(), -1); + if (element.hasAsNeeded()) + composeType(t, "ProcedureRequest", "asNeeded", element.getAsNeeded(), -1); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "ProcedureRequest", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasRequester()) + composeProcedureRequestProcedureRequestRequesterComponent(t, "ProcedureRequest", "requester", element.getRequester(), -1); + if (element.hasPerformerType()) + composeCodeableConcept(t, "ProcedureRequest", "performerType", element.getPerformerType(), -1); + if (element.hasPerformer()) + composeReference(t, "ProcedureRequest", "performer", element.getPerformer(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "ProcedureRequest", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "ProcedureRequest", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getSupportingInfo().size(); i++) + composeReference(t, "ProcedureRequest", "supportingInfo", element.getSupportingInfo().get(i), i); + for (int i = 0; i < element.getSpecimen().size(); i++) + composeReference(t, "ProcedureRequest", "specimen", element.getSpecimen().get(i), i); + for (int i = 0; i < element.getBodySite().size(); i++) + composeCodeableConcept(t, "ProcedureRequest", "bodySite", element.getBodySite().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "ProcedureRequest", "note", element.getNote().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "ProcedureRequest", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getRelevantHistory().size(); i++) + composeReference(t, "ProcedureRequest", "relevantHistory", element.getRelevantHistory().get(i), i); + } + + protected void composeProcedureRequestProcedureRequestRequesterComponent(Complex parent, String parentType, String name, ProcedureRequest.ProcedureRequestRequesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requester", name, element, index); + if (element.hasAgent()) + composeReference(t, "ProcedureRequest", "agent", element.getAgent(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "ProcedureRequest", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeProcessRequest(Complex parent, String parentType, String name, ProcessRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ProcessRequest", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ProcessRequest", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ProcessRequest", "status", element.getStatusElement(), -1); + if (element.hasActionElement()) + composeEnum(t, "ProcessRequest", "action", element.getActionElement(), -1); + if (element.hasTarget()) + composeReference(t, "ProcessRequest", "target", element.getTarget(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "ProcessRequest", "created", element.getCreatedElement(), -1); + if (element.hasProvider()) + composeReference(t, "ProcessRequest", "provider", element.getProvider(), -1); + if (element.hasOrganization()) + composeReference(t, "ProcessRequest", "organization", element.getOrganization(), -1); + if (element.hasRequest()) + composeReference(t, "ProcessRequest", "request", element.getRequest(), -1); + if (element.hasResponse()) + composeReference(t, "ProcessRequest", "response", element.getResponse(), -1); + if (element.hasNullifyElement()) + composeBoolean(t, "ProcessRequest", "nullify", element.getNullifyElement(), -1); + if (element.hasReferenceElement()) + composeString(t, "ProcessRequest", "reference", element.getReferenceElement(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeProcessRequestItemsComponent(t, "ProcessRequest", "item", element.getItem().get(i), i); + for (int i = 0; i < element.getInclude().size(); i++) + composeString(t, "ProcessRequest", "include", element.getInclude().get(i), i); + for (int i = 0; i < element.getExclude().size(); i++) + composeString(t, "ProcessRequest", "exclude", element.getExclude().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "ProcessRequest", "period", element.getPeriod(), -1); + } + + protected void composeProcessRequestItemsComponent(Complex parent, String parentType, String name, ProcessRequest.ItemsComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasSequenceLinkIdElement()) + composeInteger(t, "ProcessRequest", "sequenceLinkId", element.getSequenceLinkIdElement(), -1); + } + + protected void composeProcessResponse(Complex parent, String parentType, String name, ProcessResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ProcessResponse", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ProcessResponse", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ProcessResponse", "status", element.getStatusElement(), -1); + if (element.hasCreatedElement()) + composeDateTime(t, "ProcessResponse", "created", element.getCreatedElement(), -1); + if (element.hasOrganization()) + composeReference(t, "ProcessResponse", "organization", element.getOrganization(), -1); + if (element.hasRequest()) + composeReference(t, "ProcessResponse", "request", element.getRequest(), -1); + if (element.hasOutcomeElement()) + composeEnum(t, "ProcessResponse", "outcome", element.getOutcomeElement(), -1); + if (element.hasDispositionElement()) + composeString(t, "ProcessResponse", "disposition", element.getDispositionElement(), -1); + if (element.hasRequestProvider()) + composeReference(t, "ProcessResponse", "requestProvider", element.getRequestProvider(), -1); + if (element.hasRequestOrganization()) + composeReference(t, "ProcessResponse", "requestOrganization", element.getRequestOrganization(), -1); + if (element.hasForm()) + composeCodeableConcept(t, "ProcessResponse", "form", element.getForm(), -1); + for (int i = 0; i < element.getProcessNote().size(); i++) + composeProcessResponseProcessResponseProcessNoteComponent(t, "ProcessResponse", "processNote", element.getProcessNote().get(i), i); + for (int i = 0; i < element.getError().size(); i++) + composeCodeableConcept(t, "ProcessResponse", "error", element.getError().get(i), i); + for (int i = 0; i < element.getCommunicationRequest().size(); i++) + composeReference(t, "ProcessResponse", "communicationRequest", element.getCommunicationRequest().get(i), i); + } + + protected void composeProcessResponseProcessResponseProcessNoteComponent(Complex parent, String parentType, String name, ProcessResponse.ProcessResponseProcessNoteComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "processNote", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "ProcessResponse", "type", element.getTypeElement(), -1); + if (element.hasTextElement()) + composeString(t, "ProcessResponse", "text", element.getTextElement(), -1); + } + + protected void composeProvenance(Complex parent, String parentType, String name, Provenance element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Provenance", name, element, index); + for (int i = 0; i < element.getTarget().size(); i++) + composeReference(t, "Provenance", "target", element.getTarget().get(i), i); + if (element.hasOccured()) + composeType(t, "Provenance", "occured", element.getOccured(), -1); + if (element.hasRecordedElement()) + composeInstant(t, "Provenance", "recorded", element.getRecordedElement(), -1); + for (int i = 0; i < element.getPolicy().size(); i++) + composeUri(t, "Provenance", "policy", element.getPolicy().get(i), i); + if (element.hasLocation()) + composeReference(t, "Provenance", "location", element.getLocation(), -1); + for (int i = 0; i < element.getReason().size(); i++) + composeCodeableConcept(t, "Provenance", "reason", element.getReason().get(i), i); + if (element.hasActivity()) + composeCodeableConcept(t, "Provenance", "activity", element.getActivity(), -1); + for (int i = 0; i < element.getAgent().size(); i++) + composeProvenanceProvenanceAgentComponent(t, "Provenance", "agent", element.getAgent().get(i), i); + for (int i = 0; i < element.getEntity().size(); i++) + composeProvenanceProvenanceEntityComponent(t, "Provenance", "entity", element.getEntity().get(i), i); + for (int i = 0; i < element.getSignature().size(); i++) + composeSignature(t, "Provenance", "signature", element.getSignature().get(i), i); + } + + protected void composeProvenanceProvenanceAgentComponent(Complex parent, String parentType, String name, Provenance.ProvenanceAgentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "agent", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "Provenance", "type", element.getType(), -1); + for (int i = 0; i < element.getRole().size(); i++) + composeCodeableConcept(t, "Provenance", "role", element.getRole().get(i), i); + if (element.hasWho()) + composeType(t, "Provenance", "who", element.getWho(), -1); + if (element.hasOnBehalfOf()) + composeType(t, "Provenance", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeProvenanceProvenanceEntityComponent(Complex parent, String parentType, String name, Provenance.ProvenanceEntityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "entity", name, element, index); + if (element.hasRoleElement()) + composeEnum(t, "Provenance", "role", element.getRoleElement(), -1); + if (element.hasWhat()) + composeType(t, "Provenance", "what", element.getWhat(), -1); + for (int i = 0; i < element.getAgent().size(); i++) + composeProvenanceProvenanceAgentComponent(t, "Provenance", "agent", element.getAgent().get(i), i); + } + + protected void composeQuestionnaire(Complex parent, String parentType, String name, Questionnaire element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Questionnaire", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "Questionnaire", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Questionnaire", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "Questionnaire", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "Questionnaire", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "Questionnaire", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Questionnaire", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "Questionnaire", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "Questionnaire", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "Questionnaire", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "Questionnaire", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "Questionnaire", "purpose", element.getPurposeElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "Questionnaire", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "Questionnaire", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "Questionnaire", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "Questionnaire", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "Questionnaire", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "Questionnaire", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "Questionnaire", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCoding(t, "Questionnaire", "code", element.getCode().get(i), i); + for (int i = 0; i < element.getSubjectType().size(); i++) + composeCode(t, "Questionnaire", "subjectType", element.getSubjectType().get(i), i); + for (int i = 0; i < element.getItem().size(); i++) + composeQuestionnaireQuestionnaireItemComponent(t, "Questionnaire", "item", element.getItem().get(i), i); + } + + protected void composeQuestionnaireQuestionnaireItemComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasLinkIdElement()) + composeString(t, "Questionnaire", "linkId", element.getLinkIdElement(), -1); + if (element.hasDefinitionElement()) + composeUri(t, "Questionnaire", "definition", element.getDefinitionElement(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCoding(t, "Questionnaire", "code", element.getCode().get(i), i); + if (element.hasPrefixElement()) + composeString(t, "Questionnaire", "prefix", element.getPrefixElement(), -1); + if (element.hasTextElement()) + composeString(t, "Questionnaire", "text", element.getTextElement(), -1); + if (element.hasTypeElement()) + composeEnum(t, "Questionnaire", "type", element.getTypeElement(), -1); + for (int i = 0; i < element.getEnableWhen().size(); i++) + composeQuestionnaireQuestionnaireItemEnableWhenComponent(t, "Questionnaire", "enableWhen", element.getEnableWhen().get(i), i); + if (element.hasRequiredElement()) + composeBoolean(t, "Questionnaire", "required", element.getRequiredElement(), -1); + if (element.hasRepeatsElement()) + composeBoolean(t, "Questionnaire", "repeats", element.getRepeatsElement(), -1); + if (element.hasReadOnlyElement()) + composeBoolean(t, "Questionnaire", "readOnly", element.getReadOnlyElement(), -1); + if (element.hasMaxLengthElement()) + composeInteger(t, "Questionnaire", "maxLength", element.getMaxLengthElement(), -1); + if (element.hasOptions()) + composeReference(t, "Questionnaire", "options", element.getOptions(), -1); + for (int i = 0; i < element.getOption().size(); i++) + composeQuestionnaireQuestionnaireItemOptionComponent(t, "Questionnaire", "option", element.getOption().get(i), i); + if (element.hasInitial()) + composeType(t, "Questionnaire", "initial", element.getInitial(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeQuestionnaireQuestionnaireItemComponent(t, "Questionnaire", "item", element.getItem().get(i), i); + } + + protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemEnableWhenComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "enableWhen", name, element, index); + if (element.hasQuestionElement()) + composeString(t, "Questionnaire", "question", element.getQuestionElement(), -1); + if (element.hasHasAnswerElement()) + composeBoolean(t, "Questionnaire", "hasAnswer", element.getHasAnswerElement(), -1); + if (element.hasAnswer()) + composeType(t, "Questionnaire", "answer", element.getAnswer(), -1); + } + + protected void composeQuestionnaireQuestionnaireItemOptionComponent(Complex parent, String parentType, String name, Questionnaire.QuestionnaireItemOptionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "option", name, element, index); + if (element.hasValue()) + composeType(t, "Questionnaire", "value", element.getValue(), -1); + } + + protected void composeQuestionnaireResponse(Complex parent, String parentType, String name, QuestionnaireResponse element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "QuestionnaireResponse", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "QuestionnaireResponse", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "QuestionnaireResponse", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getParent().size(); i++) + composeReference(t, "QuestionnaireResponse", "parent", element.getParent().get(i), i); + if (element.hasQuestionnaire()) + composeReference(t, "QuestionnaireResponse", "questionnaire", element.getQuestionnaire(), -1); + if (element.hasStatusElement()) + composeEnum(t, "QuestionnaireResponse", "status", element.getStatusElement(), -1); + if (element.hasSubject()) + composeReference(t, "QuestionnaireResponse", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "QuestionnaireResponse", "context", element.getContext(), -1); + if (element.hasAuthoredElement()) + composeDateTime(t, "QuestionnaireResponse", "authored", element.getAuthoredElement(), -1); + if (element.hasAuthor()) + composeReference(t, "QuestionnaireResponse", "author", element.getAuthor(), -1); + if (element.hasSource()) + composeReference(t, "QuestionnaireResponse", "source", element.getSource(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeQuestionnaireResponseQuestionnaireResponseItemComponent(t, "QuestionnaireResponse", "item", element.getItem().get(i), i); + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(Complex parent, String parentType, String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "item", name, element, index); + if (element.hasLinkIdElement()) + composeString(t, "QuestionnaireResponse", "linkId", element.getLinkIdElement(), -1); + if (element.hasDefinitionElement()) + composeUri(t, "QuestionnaireResponse", "definition", element.getDefinitionElement(), -1); + if (element.hasTextElement()) + composeString(t, "QuestionnaireResponse", "text", element.getTextElement(), -1); + if (element.hasSubject()) + composeReference(t, "QuestionnaireResponse", "subject", element.getSubject(), -1); + for (int i = 0; i < element.getAnswer().size(); i++) + composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(t, "QuestionnaireResponse", "answer", element.getAnswer().get(i), i); + for (int i = 0; i < element.getItem().size(); i++) + composeQuestionnaireResponseQuestionnaireResponseItemComponent(t, "QuestionnaireResponse", "item", element.getItem().get(i), i); + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(Complex parent, String parentType, String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "answer", name, element, index); + if (element.hasValue()) + composeType(t, "QuestionnaireResponse", "value", element.getValue(), -1); + for (int i = 0; i < element.getItem().size(); i++) + composeQuestionnaireResponseQuestionnaireResponseItemComponent(t, "QuestionnaireResponse", "item", element.getItem().get(i), i); + } + + protected void composeRelatedPerson(Complex parent, String parentType, String name, RelatedPerson element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "RelatedPerson", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "RelatedPerson", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "RelatedPerson", "active", element.getActiveElement(), -1); + if (element.hasPatient()) + composeReference(t, "RelatedPerson", "patient", element.getPatient(), -1); + if (element.hasRelationship()) + composeCodeableConcept(t, "RelatedPerson", "relationship", element.getRelationship(), -1); + for (int i = 0; i < element.getName().size(); i++) + composeHumanName(t, "RelatedPerson", "name", element.getName().get(i), i); + for (int i = 0; i < element.getTelecom().size(); i++) + composeContactPoint(t, "RelatedPerson", "telecom", element.getTelecom().get(i), i); + if (element.hasGenderElement()) + composeEnum(t, "RelatedPerson", "gender", element.getGenderElement(), -1); + if (element.hasBirthDateElement()) + composeDate(t, "RelatedPerson", "birthDate", element.getBirthDateElement(), -1); + for (int i = 0; i < element.getAddress().size(); i++) + composeAddress(t, "RelatedPerson", "address", element.getAddress().get(i), i); + for (int i = 0; i < element.getPhoto().size(); i++) + composeAttachment(t, "RelatedPerson", "photo", element.getPhoto().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "RelatedPerson", "period", element.getPeriod(), -1); + } + + protected void composeRequestGroup(Complex parent, String parentType, String name, RequestGroup element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "RequestGroup", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "RequestGroup", "identifier", element.getIdentifier().get(i), i); + for (int i = 0; i < element.getDefinition().size(); i++) + composeReference(t, "RequestGroup", "definition", element.getDefinition().get(i), i); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "RequestGroup", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getReplaces().size(); i++) + composeReference(t, "RequestGroup", "replaces", element.getReplaces().get(i), i); + if (element.hasGroupIdentifier()) + composeIdentifier(t, "RequestGroup", "groupIdentifier", element.getGroupIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "RequestGroup", "status", element.getStatusElement(), -1); + if (element.hasIntentElement()) + composeEnum(t, "RequestGroup", "intent", element.getIntentElement(), -1); + if (element.hasPriorityElement()) + composeEnum(t, "RequestGroup", "priority", element.getPriorityElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "RequestGroup", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "RequestGroup", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "RequestGroup", "context", element.getContext(), -1); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "RequestGroup", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasAuthor()) + composeReference(t, "RequestGroup", "author", element.getAuthor(), -1); + for (int i = 0; i < element.getReasonCode().size(); i++) + composeCodeableConcept(t, "RequestGroup", "reasonCode", element.getReasonCode().get(i), i); + for (int i = 0; i < element.getReasonReference().size(); i++) + composeReference(t, "RequestGroup", "reasonReference", element.getReasonReference().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "RequestGroup", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getAction().size(); i++) + composeRequestGroupRequestGroupActionComponent(t, "RequestGroup", "action", element.getAction().get(i), i); + } + + protected void composeRequestGroupRequestGroupActionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasPrefixElement()) + composeString(t, "RequestGroup", "prefix", element.getPrefixElement(), -1); + if (element.hasTitleElement()) + composeString(t, "RequestGroup", "title", element.getTitleElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "RequestGroup", "description", element.getDescriptionElement(), -1); + if (element.hasTextEquivalentElement()) + composeString(t, "RequestGroup", "textEquivalent", element.getTextEquivalentElement(), -1); + for (int i = 0; i < element.getCode().size(); i++) + composeCodeableConcept(t, "RequestGroup", "code", element.getCode().get(i), i); + for (int i = 0; i < element.getDocumentation().size(); i++) + composeRelatedArtifact(t, "RequestGroup", "documentation", element.getDocumentation().get(i), i); + for (int i = 0; i < element.getCondition().size(); i++) + composeRequestGroupRequestGroupActionConditionComponent(t, "RequestGroup", "condition", element.getCondition().get(i), i); + for (int i = 0; i < element.getRelatedAction().size(); i++) + composeRequestGroupRequestGroupActionRelatedActionComponent(t, "RequestGroup", "relatedAction", element.getRelatedAction().get(i), i); + if (element.hasTiming()) + composeType(t, "RequestGroup", "timing", element.getTiming(), -1); + for (int i = 0; i < element.getParticipant().size(); i++) + composeReference(t, "RequestGroup", "participant", element.getParticipant().get(i), i); + if (element.hasType()) + composeCoding(t, "RequestGroup", "type", element.getType(), -1); + if (element.hasGroupingBehaviorElement()) + composeEnum(t, "RequestGroup", "groupingBehavior", element.getGroupingBehaviorElement(), -1); + if (element.hasSelectionBehaviorElement()) + composeEnum(t, "RequestGroup", "selectionBehavior", element.getSelectionBehaviorElement(), -1); + if (element.hasRequiredBehaviorElement()) + composeEnum(t, "RequestGroup", "requiredBehavior", element.getRequiredBehaviorElement(), -1); + if (element.hasPrecheckBehaviorElement()) + composeEnum(t, "RequestGroup", "precheckBehavior", element.getPrecheckBehaviorElement(), -1); + if (element.hasCardinalityBehaviorElement()) + composeEnum(t, "RequestGroup", "cardinalityBehavior", element.getCardinalityBehaviorElement(), -1); + if (element.hasResource()) + composeReference(t, "RequestGroup", "resource", element.getResource(), -1); + for (int i = 0; i < element.getAction().size(); i++) + composeRequestGroupRequestGroupActionComponent(t, "RequestGroup", "action", element.getAction().get(i), i); + } + + protected void composeRequestGroupRequestGroupActionConditionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionConditionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "condition", name, element, index); + if (element.hasKindElement()) + composeEnum(t, "RequestGroup", "kind", element.getKindElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "RequestGroup", "description", element.getDescriptionElement(), -1); + if (element.hasLanguageElement()) + composeString(t, "RequestGroup", "language", element.getLanguageElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "RequestGroup", "expression", element.getExpressionElement(), -1); + } + + protected void composeRequestGroupRequestGroupActionRelatedActionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionRelatedActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "relatedAction", name, element, index); + if (element.hasActionIdElement()) + composeId(t, "RequestGroup", "actionId", element.getActionIdElement(), -1); + if (element.hasRelationshipElement()) + composeEnum(t, "RequestGroup", "relationship", element.getRelationshipElement(), -1); + if (element.hasOffset()) + composeType(t, "RequestGroup", "offset", element.getOffset(), -1); + } + + protected void composeResearchStudy(Complex parent, String parentType, String name, ResearchStudy element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ResearchStudy", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ResearchStudy", "identifier", element.getIdentifier().get(i), i); + if (element.hasTitleElement()) + composeString(t, "ResearchStudy", "title", element.getTitleElement(), -1); + for (int i = 0; i < element.getProtocol().size(); i++) + composeReference(t, "ResearchStudy", "protocol", element.getProtocol().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "ResearchStudy", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "ResearchStudy", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "ResearchStudy", "category", element.getCategory().get(i), i); + for (int i = 0; i < element.getFocus().size(); i++) + composeCodeableConcept(t, "ResearchStudy", "focus", element.getFocus().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ResearchStudy", "contact", element.getContact().get(i), i); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "ResearchStudy", "relatedArtifact", element.getRelatedArtifact().get(i), i); + for (int i = 0; i < element.getKeyword().size(); i++) + composeCodeableConcept(t, "ResearchStudy", "keyword", element.getKeyword().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ResearchStudy", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ResearchStudy", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getEnrollment().size(); i++) + composeReference(t, "ResearchStudy", "enrollment", element.getEnrollment().get(i), i); + if (element.hasPeriod()) + composePeriod(t, "ResearchStudy", "period", element.getPeriod(), -1); + if (element.hasSponsor()) + composeReference(t, "ResearchStudy", "sponsor", element.getSponsor(), -1); + if (element.hasPrincipalInvestigator()) + composeReference(t, "ResearchStudy", "principalInvestigator", element.getPrincipalInvestigator(), -1); + for (int i = 0; i < element.getSite().size(); i++) + composeReference(t, "ResearchStudy", "site", element.getSite().get(i), i); + if (element.hasReasonStopped()) + composeCodeableConcept(t, "ResearchStudy", "reasonStopped", element.getReasonStopped(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "ResearchStudy", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getArm().size(); i++) + composeResearchStudyResearchStudyArmComponent(t, "ResearchStudy", "arm", element.getArm().get(i), i); + } + + protected void composeResearchStudyResearchStudyArmComponent(Complex parent, String parentType, String name, ResearchStudy.ResearchStudyArmComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "arm", name, element, index); + if (element.hasNameElement()) + composeString(t, "ResearchStudy", "name", element.getNameElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "ResearchStudy", "code", element.getCode(), -1); + if (element.hasDescriptionElement()) + composeString(t, "ResearchStudy", "description", element.getDescriptionElement(), -1); + } + + protected void composeResearchSubject(Complex parent, String parentType, String name, ResearchSubject element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ResearchSubject", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "ResearchSubject", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ResearchSubject", "status", element.getStatusElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "ResearchSubject", "period", element.getPeriod(), -1); + if (element.hasStudy()) + composeReference(t, "ResearchSubject", "study", element.getStudy(), -1); + if (element.hasIndividual()) + composeReference(t, "ResearchSubject", "individual", element.getIndividual(), -1); + if (element.hasAssignedArmElement()) + composeString(t, "ResearchSubject", "assignedArm", element.getAssignedArmElement(), -1); + if (element.hasActualArmElement()) + composeString(t, "ResearchSubject", "actualArm", element.getActualArmElement(), -1); + if (element.hasConsent()) + composeReference(t, "ResearchSubject", "consent", element.getConsent(), -1); + } + + protected void composeRiskAssessment(Complex parent, String parentType, String name, RiskAssessment element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "RiskAssessment", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "RiskAssessment", "identifier", element.getIdentifier(), -1); + if (element.hasBasedOn()) + composeReference(t, "RiskAssessment", "basedOn", element.getBasedOn(), -1); + if (element.hasParent()) + composeReference(t, "RiskAssessment", "parent", element.getParent(), -1); + if (element.hasStatusElement()) + composeEnum(t, "RiskAssessment", "status", element.getStatusElement(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "RiskAssessment", "method", element.getMethod(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "RiskAssessment", "code", element.getCode(), -1); + if (element.hasSubject()) + composeReference(t, "RiskAssessment", "subject", element.getSubject(), -1); + if (element.hasContext()) + composeReference(t, "RiskAssessment", "context", element.getContext(), -1); + if (element.hasOccurrence()) + composeType(t, "RiskAssessment", "occurrence", element.getOccurrence(), -1); + if (element.hasCondition()) + composeReference(t, "RiskAssessment", "condition", element.getCondition(), -1); + if (element.hasPerformer()) + composeReference(t, "RiskAssessment", "performer", element.getPerformer(), -1); + if (element.hasReason()) + composeType(t, "RiskAssessment", "reason", element.getReason(), -1); + for (int i = 0; i < element.getBasis().size(); i++) + composeReference(t, "RiskAssessment", "basis", element.getBasis().get(i), i); + for (int i = 0; i < element.getPrediction().size(); i++) + composeRiskAssessmentRiskAssessmentPredictionComponent(t, "RiskAssessment", "prediction", element.getPrediction().get(i), i); + if (element.hasMitigationElement()) + composeString(t, "RiskAssessment", "mitigation", element.getMitigationElement(), -1); + if (element.hasCommentElement()) + composeString(t, "RiskAssessment", "comment", element.getCommentElement(), -1); + } + + protected void composeRiskAssessmentRiskAssessmentPredictionComponent(Complex parent, String parentType, String name, RiskAssessment.RiskAssessmentPredictionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "prediction", name, element, index); + if (element.hasOutcome()) + composeCodeableConcept(t, "RiskAssessment", "outcome", element.getOutcome(), -1); + if (element.hasProbability()) + composeType(t, "RiskAssessment", "probability", element.getProbability(), -1); + if (element.hasQualitativeRisk()) + composeCodeableConcept(t, "RiskAssessment", "qualitativeRisk", element.getQualitativeRisk(), -1); + if (element.hasRelativeRiskElement()) + composeDecimal(t, "RiskAssessment", "relativeRisk", element.getRelativeRiskElement(), -1); + if (element.hasWhen()) + composeType(t, "RiskAssessment", "when", element.getWhen(), -1); + if (element.hasRationaleElement()) + composeString(t, "RiskAssessment", "rationale", element.getRationaleElement(), -1); + } + + protected void composeSchedule(Complex parent, String parentType, String name, Schedule element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Schedule", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Schedule", "identifier", element.getIdentifier().get(i), i); + if (element.hasActiveElement()) + composeBoolean(t, "Schedule", "active", element.getActiveElement(), -1); + if (element.hasServiceCategory()) + composeCodeableConcept(t, "Schedule", "serviceCategory", element.getServiceCategory(), -1); + for (int i = 0; i < element.getServiceType().size(); i++) + composeCodeableConcept(t, "Schedule", "serviceType", element.getServiceType().get(i), i); + for (int i = 0; i < element.getSpecialty().size(); i++) + composeCodeableConcept(t, "Schedule", "specialty", element.getSpecialty().get(i), i); + for (int i = 0; i < element.getActor().size(); i++) + composeReference(t, "Schedule", "actor", element.getActor().get(i), i); + if (element.hasPlanningHorizon()) + composePeriod(t, "Schedule", "planningHorizon", element.getPlanningHorizon(), -1); + if (element.hasCommentElement()) + composeString(t, "Schedule", "comment", element.getCommentElement(), -1); + } + + protected void composeSearchParameter(Complex parent, String parentType, String name, SearchParameter element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "SearchParameter", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "SearchParameter", "url", element.getUrlElement(), -1); + if (element.hasVersionElement()) + composeString(t, "SearchParameter", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "SearchParameter", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "SearchParameter", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "SearchParameter", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "SearchParameter", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "SearchParameter", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "SearchParameter", "contact", element.getContact().get(i), i); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "SearchParameter", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "SearchParameter", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "SearchParameter", "purpose", element.getPurposeElement(), -1); + if (element.hasCodeElement()) + composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1); + for (int i = 0; i < element.getBase().size(); i++) + composeCode(t, "SearchParameter", "base", element.getBase().get(i), i); + if (element.hasTypeElement()) + composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1); + if (element.hasDerivedFromElement()) + composeUri(t, "SearchParameter", "derivedFrom", element.getDerivedFromElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "SearchParameter", "description", element.getDescriptionElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1); + if (element.hasXpathElement()) + composeString(t, "SearchParameter", "xpath", element.getXpathElement(), -1); + if (element.hasXpathUsageElement()) + composeEnum(t, "SearchParameter", "xpathUsage", element.getXpathUsageElement(), -1); + for (int i = 0; i < element.getTarget().size(); i++) + composeCode(t, "SearchParameter", "target", element.getTarget().get(i), i); + for (int i = 0; i < element.getComparator().size(); i++) + composeEnum(t, "SearchParameter", "comparator", element.getComparator().get(i), i); + for (int i = 0; i < element.getModifier().size(); i++) + composeEnum(t, "SearchParameter", "modifier", element.getModifier().get(i), i); + for (int i = 0; i < element.getChain().size(); i++) + composeString(t, "SearchParameter", "chain", element.getChain().get(i), i); + for (int i = 0; i < element.getComponent().size(); i++) + composeSearchParameterSearchParameterComponentComponent(t, "SearchParameter", "component", element.getComponent().get(i), i); + } + + protected void composeSearchParameterSearchParameterComponentComponent(Complex parent, String parentType, String name, SearchParameter.SearchParameterComponentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "component", name, element, index); + if (element.hasDefinition()) + composeReference(t, "SearchParameter", "definition", element.getDefinition(), -1); + if (element.hasExpressionElement()) + composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1); + } + + protected void composeSequence(Complex parent, String parentType, String name, Sequence element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Sequence", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Sequence", "identifier", element.getIdentifier().get(i), i); + if (element.hasTypeElement()) + composeEnum(t, "Sequence", "type", element.getTypeElement(), -1); + if (element.hasCoordinateSystemElement()) + composeInteger(t, "Sequence", "coordinateSystem", element.getCoordinateSystemElement(), -1); + if (element.hasPatient()) + composeReference(t, "Sequence", "patient", element.getPatient(), -1); + if (element.hasSpecimen()) + composeReference(t, "Sequence", "specimen", element.getSpecimen(), -1); + if (element.hasDevice()) + composeReference(t, "Sequence", "device", element.getDevice(), -1); + if (element.hasPerformer()) + composeReference(t, "Sequence", "performer", element.getPerformer(), -1); + if (element.hasQuantity()) + composeQuantity(t, "Sequence", "quantity", element.getQuantity(), -1); + if (element.hasReferenceSeq()) + composeSequenceSequenceReferenceSeqComponent(t, "Sequence", "referenceSeq", element.getReferenceSeq(), -1); + for (int i = 0; i < element.getVariant().size(); i++) + composeSequenceSequenceVariantComponent(t, "Sequence", "variant", element.getVariant().get(i), i); + if (element.hasObservedSeqElement()) + composeString(t, "Sequence", "observedSeq", element.getObservedSeqElement(), -1); + for (int i = 0; i < element.getQuality().size(); i++) + composeSequenceSequenceQualityComponent(t, "Sequence", "quality", element.getQuality().get(i), i); + if (element.hasReadCoverageElement()) + composeInteger(t, "Sequence", "readCoverage", element.getReadCoverageElement(), -1); + for (int i = 0; i < element.getRepository().size(); i++) + composeSequenceSequenceRepositoryComponent(t, "Sequence", "repository", element.getRepository().get(i), i); + for (int i = 0; i < element.getPointer().size(); i++) + composeReference(t, "Sequence", "pointer", element.getPointer().get(i), i); + for (int i = 0; i < element.getStructureVariant().size(); i++) + composeSequenceSequenceStructureVariantComponent(t, "Sequence", "structureVariant", element.getStructureVariant().get(i), i); + } + + protected void composeSequenceSequenceReferenceSeqComponent(Complex parent, String parentType, String name, Sequence.SequenceReferenceSeqComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "referenceSeq", name, element, index); + if (element.hasChromosome()) + composeCodeableConcept(t, "Sequence", "chromosome", element.getChromosome(), -1); + if (element.hasGenomeBuildElement()) + composeString(t, "Sequence", "genomeBuild", element.getGenomeBuildElement(), -1); + if (element.hasReferenceSeqId()) + composeCodeableConcept(t, "Sequence", "referenceSeqId", element.getReferenceSeqId(), -1); + if (element.hasReferenceSeqPointer()) + composeReference(t, "Sequence", "referenceSeqPointer", element.getReferenceSeqPointer(), -1); + if (element.hasReferenceSeqStringElement()) + composeString(t, "Sequence", "referenceSeqString", element.getReferenceSeqStringElement(), -1); + if (element.hasStrandElement()) + composeInteger(t, "Sequence", "strand", element.getStrandElement(), -1); + if (element.hasWindowStartElement()) + composeInteger(t, "Sequence", "windowStart", element.getWindowStartElement(), -1); + if (element.hasWindowEndElement()) + composeInteger(t, "Sequence", "windowEnd", element.getWindowEndElement(), -1); + } + + protected void composeSequenceSequenceVariantComponent(Complex parent, String parentType, String name, Sequence.SequenceVariantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "variant", name, element, index); + if (element.hasStartElement()) + composeInteger(t, "Sequence", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInteger(t, "Sequence", "end", element.getEndElement(), -1); + if (element.hasObservedAlleleElement()) + composeString(t, "Sequence", "observedAllele", element.getObservedAlleleElement(), -1); + if (element.hasReferenceAlleleElement()) + composeString(t, "Sequence", "referenceAllele", element.getReferenceAlleleElement(), -1); + if (element.hasCigarElement()) + composeString(t, "Sequence", "cigar", element.getCigarElement(), -1); + if (element.hasVariantPointer()) + composeReference(t, "Sequence", "variantPointer", element.getVariantPointer(), -1); + } + + protected void composeSequenceSequenceQualityComponent(Complex parent, String parentType, String name, Sequence.SequenceQualityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "quality", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Sequence", "type", element.getTypeElement(), -1); + if (element.hasStandardSequence()) + composeCodeableConcept(t, "Sequence", "standardSequence", element.getStandardSequence(), -1); + if (element.hasStartElement()) + composeInteger(t, "Sequence", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInteger(t, "Sequence", "end", element.getEndElement(), -1); + if (element.hasScore()) + composeQuantity(t, "Sequence", "score", element.getScore(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "Sequence", "method", element.getMethod(), -1); + if (element.hasTruthTPElement()) + composeDecimal(t, "Sequence", "truthTP", element.getTruthTPElement(), -1); + if (element.hasQueryTPElement()) + composeDecimal(t, "Sequence", "queryTP", element.getQueryTPElement(), -1); + if (element.hasTruthFNElement()) + composeDecimal(t, "Sequence", "truthFN", element.getTruthFNElement(), -1); + if (element.hasQueryFPElement()) + composeDecimal(t, "Sequence", "queryFP", element.getQueryFPElement(), -1); + if (element.hasGtFPElement()) + composeDecimal(t, "Sequence", "gtFP", element.getGtFPElement(), -1); + if (element.hasPrecisionElement()) + composeDecimal(t, "Sequence", "precision", element.getPrecisionElement(), -1); + if (element.hasRecallElement()) + composeDecimal(t, "Sequence", "recall", element.getRecallElement(), -1); + if (element.hasFScoreElement()) + composeDecimal(t, "Sequence", "fScore", element.getFScoreElement(), -1); + if (element.hasRoc()) + composeSequenceSequenceQualityRocComponent(t, "Sequence", "roc", element.getRoc(), -1); + } + + protected void composeSequenceSequenceQualityRocComponent(Complex parent, String parentType, String name, Sequence.SequenceQualityRocComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "roc", name, element, index); + for (int i = 0; i < element.getScore().size(); i++) + composeInteger(t, "Sequence", "score", element.getScore().get(i), i); + for (int i = 0; i < element.getNumTP().size(); i++) + composeInteger(t, "Sequence", "numTP", element.getNumTP().get(i), i); + for (int i = 0; i < element.getNumFP().size(); i++) + composeInteger(t, "Sequence", "numFP", element.getNumFP().get(i), i); + for (int i = 0; i < element.getNumFN().size(); i++) + composeInteger(t, "Sequence", "numFN", element.getNumFN().get(i), i); + for (int i = 0; i < element.getPrecision().size(); i++) + composeDecimal(t, "Sequence", "precision", element.getPrecision().get(i), i); + for (int i = 0; i < element.getSensitivity().size(); i++) + composeDecimal(t, "Sequence", "sensitivity", element.getSensitivity().get(i), i); + for (int i = 0; i < element.getFMeasure().size(); i++) + composeDecimal(t, "Sequence", "fMeasure", element.getFMeasure().get(i), i); + } + + protected void composeSequenceSequenceRepositoryComponent(Complex parent, String parentType, String name, Sequence.SequenceRepositoryComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "repository", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Sequence", "type", element.getTypeElement(), -1); + if (element.hasUrlElement()) + composeUri(t, "Sequence", "url", element.getUrlElement(), -1); + if (element.hasNameElement()) + composeString(t, "Sequence", "name", element.getNameElement(), -1); + if (element.hasDatasetIdElement()) + composeString(t, "Sequence", "datasetId", element.getDatasetIdElement(), -1); + if (element.hasVariantsetIdElement()) + composeString(t, "Sequence", "variantsetId", element.getVariantsetIdElement(), -1); + if (element.hasReadsetIdElement()) + composeString(t, "Sequence", "readsetId", element.getReadsetIdElement(), -1); + } + + protected void composeSequenceSequenceStructureVariantComponent(Complex parent, String parentType, String name, Sequence.SequenceStructureVariantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "structureVariant", name, element, index); + if (element.hasPrecisionElement()) + composeString(t, "Sequence", "precision", element.getPrecisionElement(), -1); + if (element.hasReportedaCGHRatioElement()) + composeDecimal(t, "Sequence", "reportedaCGHRatio", element.getReportedaCGHRatioElement(), -1); + if (element.hasLengthElement()) + composeInteger(t, "Sequence", "length", element.getLengthElement(), -1); + if (element.hasOuter()) + composeSequenceSequenceStructureVariantOuterComponent(t, "Sequence", "outer", element.getOuter(), -1); + if (element.hasInner()) + composeSequenceSequenceStructureVariantInnerComponent(t, "Sequence", "inner", element.getInner(), -1); + } + + protected void composeSequenceSequenceStructureVariantOuterComponent(Complex parent, String parentType, String name, Sequence.SequenceStructureVariantOuterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "outer", name, element, index); + if (element.hasStartElement()) + composeInteger(t, "Sequence", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInteger(t, "Sequence", "end", element.getEndElement(), -1); + } + + protected void composeSequenceSequenceStructureVariantInnerComponent(Complex parent, String parentType, String name, Sequence.SequenceStructureVariantInnerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "inner", name, element, index); + if (element.hasStartElement()) + composeInteger(t, "Sequence", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInteger(t, "Sequence", "end", element.getEndElement(), -1); + } + + protected void composeServiceDefinition(Complex parent, String parentType, String name, ServiceDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ServiceDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ServiceDefinition", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ServiceDefinition", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "ServiceDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ServiceDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ServiceDefinition", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ServiceDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ServiceDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ServiceDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ServiceDefinition", "publisher", element.getPublisherElement(), -1); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ServiceDefinition", "description", element.getDescriptionElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "ServiceDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasUsageElement()) + composeString(t, "ServiceDefinition", "usage", element.getUsageElement(), -1); + if (element.hasApprovalDateElement()) + composeDate(t, "ServiceDefinition", "approvalDate", element.getApprovalDateElement(), -1); + if (element.hasLastReviewDateElement()) + composeDate(t, "ServiceDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1); + if (element.hasEffectivePeriod()) + composePeriod(t, "ServiceDefinition", "effectivePeriod", element.getEffectivePeriod(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ServiceDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ServiceDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + for (int i = 0; i < element.getTopic().size(); i++) + composeCodeableConcept(t, "ServiceDefinition", "topic", element.getTopic().get(i), i); + for (int i = 0; i < element.getContributor().size(); i++) + composeContributor(t, "ServiceDefinition", "contributor", element.getContributor().get(i), i); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ServiceDefinition", "contact", element.getContact().get(i), i); + if (element.hasCopyrightElement()) + composeMarkdown(t, "ServiceDefinition", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getRelatedArtifact().size(); i++) + composeRelatedArtifact(t, "ServiceDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i); + for (int i = 0; i < element.getTrigger().size(); i++) + composeTriggerDefinition(t, "ServiceDefinition", "trigger", element.getTrigger().get(i), i); + for (int i = 0; i < element.getDataRequirement().size(); i++) + composeDataRequirement(t, "ServiceDefinition", "dataRequirement", element.getDataRequirement().get(i), i); + if (element.hasOperationDefinition()) + composeReference(t, "ServiceDefinition", "operationDefinition", element.getOperationDefinition(), -1); + } + + protected void composeSlot(Complex parent, String parentType, String name, Slot element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Slot", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Slot", "identifier", element.getIdentifier().get(i), i); + if (element.hasServiceCategory()) + composeCodeableConcept(t, "Slot", "serviceCategory", element.getServiceCategory(), -1); + for (int i = 0; i < element.getServiceType().size(); i++) + composeCodeableConcept(t, "Slot", "serviceType", element.getServiceType().get(i), i); + for (int i = 0; i < element.getSpecialty().size(); i++) + composeCodeableConcept(t, "Slot", "specialty", element.getSpecialty().get(i), i); + if (element.hasAppointmentType()) + composeCodeableConcept(t, "Slot", "appointmentType", element.getAppointmentType(), -1); + if (element.hasSchedule()) + composeReference(t, "Slot", "schedule", element.getSchedule(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Slot", "status", element.getStatusElement(), -1); + if (element.hasStartElement()) + composeInstant(t, "Slot", "start", element.getStartElement(), -1); + if (element.hasEndElement()) + composeInstant(t, "Slot", "end", element.getEndElement(), -1); + if (element.hasOverbookedElement()) + composeBoolean(t, "Slot", "overbooked", element.getOverbookedElement(), -1); + if (element.hasCommentElement()) + composeString(t, "Slot", "comment", element.getCommentElement(), -1); + } + + protected void composeSpecimen(Complex parent, String parentType, String name, Specimen element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Specimen", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Specimen", "identifier", element.getIdentifier().get(i), i); + if (element.hasAccessionIdentifier()) + composeIdentifier(t, "Specimen", "accessionIdentifier", element.getAccessionIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "Specimen", "status", element.getStatusElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Specimen", "type", element.getType(), -1); + if (element.hasSubject()) + composeReference(t, "Specimen", "subject", element.getSubject(), -1); + if (element.hasReceivedTimeElement()) + composeDateTime(t, "Specimen", "receivedTime", element.getReceivedTimeElement(), -1); + for (int i = 0; i < element.getParent().size(); i++) + composeReference(t, "Specimen", "parent", element.getParent().get(i), i); + for (int i = 0; i < element.getRequest().size(); i++) + composeReference(t, "Specimen", "request", element.getRequest().get(i), i); + if (element.hasCollection()) + composeSpecimenSpecimenCollectionComponent(t, "Specimen", "collection", element.getCollection(), -1); + for (int i = 0; i < element.getProcessing().size(); i++) + composeSpecimenSpecimenProcessingComponent(t, "Specimen", "processing", element.getProcessing().get(i), i); + for (int i = 0; i < element.getContainer().size(); i++) + composeSpecimenSpecimenContainerComponent(t, "Specimen", "container", element.getContainer().get(i), i); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Specimen", "note", element.getNote().get(i), i); + } + + protected void composeSpecimenSpecimenCollectionComponent(Complex parent, String parentType, String name, Specimen.SpecimenCollectionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "collection", name, element, index); + if (element.hasCollector()) + composeReference(t, "Specimen", "collector", element.getCollector(), -1); + if (element.hasCollected()) + composeType(t, "Specimen", "collected", element.getCollected(), -1); + if (element.hasQuantity()) + composeQuantity(t, "Specimen", "quantity", element.getQuantity(), -1); + if (element.hasMethod()) + composeCodeableConcept(t, "Specimen", "method", element.getMethod(), -1); + if (element.hasBodySite()) + composeCodeableConcept(t, "Specimen", "bodySite", element.getBodySite(), -1); + } + + protected void composeSpecimenSpecimenProcessingComponent(Complex parent, String parentType, String name, Specimen.SpecimenProcessingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "processing", name, element, index); + if (element.hasDescriptionElement()) + composeString(t, "Specimen", "description", element.getDescriptionElement(), -1); + if (element.hasProcedure()) + composeCodeableConcept(t, "Specimen", "procedure", element.getProcedure(), -1); + for (int i = 0; i < element.getAdditive().size(); i++) + composeReference(t, "Specimen", "additive", element.getAdditive().get(i), i); + if (element.hasTime()) + composeType(t, "Specimen", "time", element.getTime(), -1); + } + + protected void composeSpecimenSpecimenContainerComponent(Complex parent, String parentType, String name, Specimen.SpecimenContainerComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "container", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Specimen", "identifier", element.getIdentifier().get(i), i); + if (element.hasDescriptionElement()) + composeString(t, "Specimen", "description", element.getDescriptionElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "Specimen", "type", element.getType(), -1); + if (element.hasCapacity()) + composeQuantity(t, "Specimen", "capacity", element.getCapacity(), -1); + if (element.hasSpecimenQuantity()) + composeQuantity(t, "Specimen", "specimenQuantity", element.getSpecimenQuantity(), -1); + if (element.hasAdditive()) + composeType(t, "Specimen", "additive", element.getAdditive(), -1); + } + + protected void composeSpecimenDefinition(Complex parent, String parentType, String name, SpecimenDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "SpecimenDefinition", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "SpecimenDefinition", "identifier", element.getIdentifier(), -1); + if (element.hasTypeCollected()) + composeCodeableConcept(t, "SpecimenDefinition", "typeCollected", element.getTypeCollected(), -1); + if (element.hasPatientPreparationElement()) + composeString(t, "SpecimenDefinition", "patientPreparation", element.getPatientPreparationElement(), -1); + if (element.hasTimeAspectElement()) + composeString(t, "SpecimenDefinition", "timeAspect", element.getTimeAspectElement(), -1); + for (int i = 0; i < element.getCollection().size(); i++) + composeCodeableConcept(t, "SpecimenDefinition", "collection", element.getCollection().get(i), i); + for (int i = 0; i < element.getSpecimenToLab().size(); i++) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(t, "SpecimenDefinition", "specimenToLab", element.getSpecimenToLab().get(i), i); + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(Complex parent, String parentType, String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "specimenToLab", name, element, index); + if (element.hasIsDerivedElement()) + composeBoolean(t, "SpecimenDefinition", "isDerived", element.getIsDerivedElement(), -1); + if (element.hasType()) + composeCodeableConcept(t, "SpecimenDefinition", "type", element.getType(), -1); + if (element.hasPreferenceElement()) + composeEnum(t, "SpecimenDefinition", "preference", element.getPreferenceElement(), -1); + if (element.hasContainerMaterial()) + composeCodeableConcept(t, "SpecimenDefinition", "containerMaterial", element.getContainerMaterial(), -1); + if (element.hasContainerType()) + composeCodeableConcept(t, "SpecimenDefinition", "containerType", element.getContainerType(), -1); + if (element.hasContainerCap()) + composeCodeableConcept(t, "SpecimenDefinition", "containerCap", element.getContainerCap(), -1); + if (element.hasContainerDescriptionElement()) + composeString(t, "SpecimenDefinition", "containerDescription", element.getContainerDescriptionElement(), -1); + if (element.hasContainerCapacity()) + composeQuantity(t, "SpecimenDefinition", "containerCapacity", element.getContainerCapacity(), -1); + if (element.hasContainerMinimumVolume()) + composeQuantity(t, "SpecimenDefinition", "containerMinimumVolume", element.getContainerMinimumVolume(), -1); + for (int i = 0; i < element.getContainerAdditive().size(); i++) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(t, "SpecimenDefinition", "containerAdditive", element.getContainerAdditive().get(i), i); + if (element.hasContainerPreparationElement()) + composeString(t, "SpecimenDefinition", "containerPreparation", element.getContainerPreparationElement(), -1); + if (element.hasRequirementElement()) + composeString(t, "SpecimenDefinition", "requirement", element.getRequirementElement(), -1); + if (element.hasRetentionTime()) + composeDuration(t, "SpecimenDefinition", "retentionTime", element.getRetentionTime(), -1); + for (int i = 0; i < element.getRejectionCriterion().size(); i++) + composeCodeableConcept(t, "SpecimenDefinition", "rejectionCriterion", element.getRejectionCriterion().get(i), i); + for (int i = 0; i < element.getHandling().size(); i++) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(t, "SpecimenDefinition", "handling", element.getHandling().get(i), i); + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(Complex parent, String parentType, String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "containerAdditive", name, element, index); + if (element.hasAdditive()) + composeType(t, "SpecimenDefinition", "additive", element.getAdditive(), -1); + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(Complex parent, String parentType, String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "handling", name, element, index); + if (element.hasConditionSet()) + composeCodeableConcept(t, "SpecimenDefinition", "conditionSet", element.getConditionSet(), -1); + if (element.hasTempRange()) + composeRange(t, "SpecimenDefinition", "tempRange", element.getTempRange(), -1); + if (element.hasMaxDuration()) + composeDuration(t, "SpecimenDefinition", "maxDuration", element.getMaxDuration(), -1); + if (element.hasLightExposureElement()) + composeString(t, "SpecimenDefinition", "lightExposure", element.getLightExposureElement(), -1); + if (element.hasInstructionElement()) + composeString(t, "SpecimenDefinition", "instruction", element.getInstructionElement(), -1); + } + + protected void composeStructureDefinition(Complex parent, String parentType, String name, StructureDefinition element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "StructureDefinition", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "StructureDefinition", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "StructureDefinition", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "StructureDefinition", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "StructureDefinition", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "StructureDefinition", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "StructureDefinition", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "StructureDefinition", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "StructureDefinition", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "StructureDefinition", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "StructureDefinition", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "StructureDefinition", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "StructureDefinition", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "StructureDefinition", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "StructureDefinition", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "StructureDefinition", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getKeyword().size(); i++) + composeCoding(t, "StructureDefinition", "keyword", element.getKeyword().get(i), i); + if (element.hasFhirVersionElement()) + composeId(t, "StructureDefinition", "fhirVersion", element.getFhirVersionElement(), -1); + for (int i = 0; i < element.getMapping().size(); i++) + composeStructureDefinitionStructureDefinitionMappingComponent(t, "StructureDefinition", "mapping", element.getMapping().get(i), i); + if (element.hasKindElement()) + composeEnum(t, "StructureDefinition", "kind", element.getKindElement(), -1); + if (element.hasAbstractElement()) + composeBoolean(t, "StructureDefinition", "abstract", element.getAbstractElement(), -1); + if (element.hasContextTypeElement()) + composeEnum(t, "StructureDefinition", "contextType", element.getContextTypeElement(), -1); + for (int i = 0; i < element.getContext().size(); i++) + composeString(t, "StructureDefinition", "context", element.getContext().get(i), i); + for (int i = 0; i < element.getContextInvariant().size(); i++) + composeString(t, "StructureDefinition", "contextInvariant", element.getContextInvariant().get(i), i); + if (element.hasTypeElement()) + composeCode(t, "StructureDefinition", "type", element.getTypeElement(), -1); + if (element.hasBaseDefinitionElement()) + composeUri(t, "StructureDefinition", "baseDefinition", element.getBaseDefinitionElement(), -1); + if (element.hasDerivationElement()) + composeEnum(t, "StructureDefinition", "derivation", element.getDerivationElement(), -1); + if (element.hasSnapshot()) + composeStructureDefinitionStructureDefinitionSnapshotComponent(t, "StructureDefinition", "snapshot", element.getSnapshot(), -1); + if (element.hasDifferential()) + composeStructureDefinitionStructureDefinitionDifferentialComponent(t, "StructureDefinition", "differential", element.getDifferential(), -1); + } + + protected void composeStructureDefinitionStructureDefinitionMappingComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionMappingComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "mapping", name, element, index); + if (element.hasIdentityElement()) + composeId(t, "StructureDefinition", "identity", element.getIdentityElement(), -1); + if (element.hasUriElement()) + composeUri(t, "StructureDefinition", "uri", element.getUriElement(), -1); + if (element.hasNameElement()) + composeString(t, "StructureDefinition", "name", element.getNameElement(), -1); + if (element.hasCommentElement()) + composeString(t, "StructureDefinition", "comment", element.getCommentElement(), -1); + } + + protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionSnapshotComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "snapshot", name, element, index); + for (int i = 0; i < element.getElement().size(); i++) + composeElementDefinition(t, "StructureDefinition", "element", element.getElement().get(i), i); + } + + protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionDifferentialComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "differential", name, element, index); + for (int i = 0; i < element.getElement().size(); i++) + composeElementDefinition(t, "StructureDefinition", "element", element.getElement().get(i), i); + } + + protected void composeStructureMap(Complex parent, String parentType, String name, StructureMap element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "StructureMap", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "StructureMap", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "StructureMap", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "StructureMap", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "StructureMap", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "StructureMap", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "StructureMap", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "StructureMap", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "StructureMap", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "StructureMap", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "StructureMap", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "StructureMap", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "StructureMap", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "StructureMap", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "StructureMap", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "StructureMap", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getStructure().size(); i++) + composeStructureMapStructureMapStructureComponent(t, "StructureMap", "structure", element.getStructure().get(i), i); + for (int i = 0; i < element.getImport().size(); i++) + composeUri(t, "StructureMap", "import", element.getImport().get(i), i); + for (int i = 0; i < element.getGroup().size(); i++) + composeStructureMapStructureMapGroupComponent(t, "StructureMap", "group", element.getGroup().get(i), i); + } + + protected void composeStructureMapStructureMapStructureComponent(Complex parent, String parentType, String name, StructureMap.StructureMapStructureComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "structure", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "StructureMap", "url", element.getUrlElement(), -1); + if (element.hasModeElement()) + composeEnum(t, "StructureMap", "mode", element.getModeElement(), -1); + if (element.hasAliasElement()) + composeString(t, "StructureMap", "alias", element.getAliasElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeStructureMapStructureMapGroupComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "group", name, element, index); + if (element.hasNameElement()) + composeId(t, "StructureMap", "name", element.getNameElement(), -1); + if (element.hasExtendsElement()) + composeId(t, "StructureMap", "extends", element.getExtendsElement(), -1); + if (element.hasTypeModeElement()) + composeEnum(t, "StructureMap", "typeMode", element.getTypeModeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); + for (int i = 0; i < element.getInput().size(); i++) + composeStructureMapStructureMapGroupInputComponent(t, "StructureMap", "input", element.getInput().get(i), i); + for (int i = 0; i < element.getRule().size(); i++) + composeStructureMapStructureMapGroupRuleComponent(t, "StructureMap", "rule", element.getRule().get(i), i); + } + + protected void composeStructureMapStructureMapGroupInputComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupInputComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "input", name, element, index); + if (element.hasNameElement()) + composeId(t, "StructureMap", "name", element.getNameElement(), -1); + if (element.hasTypeElement()) + composeString(t, "StructureMap", "type", element.getTypeElement(), -1); + if (element.hasModeElement()) + composeEnum(t, "StructureMap", "mode", element.getModeElement(), -1); + if (element.hasDocumentationElement()) + composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeStructureMapStructureMapGroupRuleComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rule", name, element, index); + if (element.hasNameElement()) + composeId(t, "StructureMap", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getSource().size(); i++) + composeStructureMapStructureMapGroupRuleSourceComponent(t, "StructureMap", "source", element.getSource().get(i), i); + for (int i = 0; i < element.getTarget().size(); i++) + composeStructureMapStructureMapGroupRuleTargetComponent(t, "StructureMap", "target", element.getTarget().get(i), i); + for (int i = 0; i < element.getRule().size(); i++) + composeStructureMapStructureMapGroupRuleComponent(t, "StructureMap", "rule", element.getRule().get(i), i); + for (int i = 0; i < element.getDependent().size(); i++) + composeStructureMapStructureMapGroupRuleDependentComponent(t, "StructureMap", "dependent", element.getDependent().get(i), i); + if (element.hasDocumentationElement()) + composeString(t, "StructureMap", "documentation", element.getDocumentationElement(), -1); + } + + protected void composeStructureMapStructureMapGroupRuleSourceComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleSourceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "source", name, element, index); + if (element.hasContextElement()) + composeId(t, "StructureMap", "context", element.getContextElement(), -1); + if (element.hasMinElement()) + composeInteger(t, "StructureMap", "min", element.getMinElement(), -1); + if (element.hasMaxElement()) + composeString(t, "StructureMap", "max", element.getMaxElement(), -1); + if (element.hasTypeElement()) + composeString(t, "StructureMap", "type", element.getTypeElement(), -1); + if (element.hasDefaultValue()) + composeType(t, "StructureMap", "defaultValue", element.getDefaultValue(), -1); + if (element.hasElementElement()) + composeString(t, "StructureMap", "element", element.getElementElement(), -1); + if (element.hasListModeElement()) + composeEnum(t, "StructureMap", "listMode", element.getListModeElement(), -1); + if (element.hasVariableElement()) + composeId(t, "StructureMap", "variable", element.getVariableElement(), -1); + if (element.hasConditionElement()) + composeString(t, "StructureMap", "condition", element.getConditionElement(), -1); + if (element.hasCheckElement()) + composeString(t, "StructureMap", "check", element.getCheckElement(), -1); + } + + protected void composeStructureMapStructureMapGroupRuleTargetComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleTargetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "target", name, element, index); + if (element.hasContextElement()) + composeId(t, "StructureMap", "context", element.getContextElement(), -1); + if (element.hasContextTypeElement()) + composeEnum(t, "StructureMap", "contextType", element.getContextTypeElement(), -1); + if (element.hasElementElement()) + composeString(t, "StructureMap", "element", element.getElementElement(), -1); + if (element.hasVariableElement()) + composeId(t, "StructureMap", "variable", element.getVariableElement(), -1); + for (int i = 0; i < element.getListMode().size(); i++) + composeEnum(t, "StructureMap", "listMode", element.getListMode().get(i), i); + if (element.hasListRuleIdElement()) + composeId(t, "StructureMap", "listRuleId", element.getListRuleIdElement(), -1); + if (element.hasTransformElement()) + composeEnum(t, "StructureMap", "transform", element.getTransformElement(), -1); + for (int i = 0; i < element.getParameter().size(); i++) + composeStructureMapStructureMapGroupRuleTargetParameterComponent(t, "StructureMap", "parameter", element.getParameter().get(i), i); + } + + protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "parameter", name, element, index); + if (element.hasValue()) + composeType(t, "StructureMap", "value", element.getValue(), -1); + } + + protected void composeStructureMapStructureMapGroupRuleDependentComponent(Complex parent, String parentType, String name, StructureMap.StructureMapGroupRuleDependentComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dependent", name, element, index); + if (element.hasNameElement()) + composeId(t, "StructureMap", "name", element.getNameElement(), -1); + for (int i = 0; i < element.getVariable().size(); i++) + composeString(t, "StructureMap", "variable", element.getVariable().get(i), i); + } + + protected void composeSubscription(Complex parent, String parentType, String name, Subscription element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Subscription", name, element, index); + if (element.hasStatusElement()) + composeEnum(t, "Subscription", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactPoint(t, "Subscription", "contact", element.getContact().get(i), i); + if (element.hasEndElement()) + composeInstant(t, "Subscription", "end", element.getEndElement(), -1); + if (element.hasReasonElement()) + composeString(t, "Subscription", "reason", element.getReasonElement(), -1); + if (element.hasCriteriaElement()) + composeString(t, "Subscription", "criteria", element.getCriteriaElement(), -1); + if (element.hasErrorElement()) + composeString(t, "Subscription", "error", element.getErrorElement(), -1); + if (element.hasChannel()) + composeSubscriptionSubscriptionChannelComponent(t, "Subscription", "channel", element.getChannel(), -1); + for (int i = 0; i < element.getTag().size(); i++) + composeCoding(t, "Subscription", "tag", element.getTag().get(i), i); + } + + protected void composeSubscriptionSubscriptionChannelComponent(Complex parent, String parentType, String name, Subscription.SubscriptionChannelComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "channel", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "Subscription", "type", element.getTypeElement(), -1); + if (element.hasEndpointElement()) + composeUri(t, "Subscription", "endpoint", element.getEndpointElement(), -1); + if (element.hasPayloadElement()) + composeString(t, "Subscription", "payload", element.getPayloadElement(), -1); + for (int i = 0; i < element.getHeader().size(); i++) + composeString(t, "Subscription", "header", element.getHeader().get(i), i); + } + + protected void composeSubstance(Complex parent, String parentType, String name, Substance element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Substance", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Substance", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Substance", "status", element.getStatusElement(), -1); + for (int i = 0; i < element.getCategory().size(); i++) + composeCodeableConcept(t, "Substance", "category", element.getCategory().get(i), i); + if (element.hasCode()) + composeCodeableConcept(t, "Substance", "code", element.getCode(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Substance", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getInstance().size(); i++) + composeSubstanceSubstanceInstanceComponent(t, "Substance", "instance", element.getInstance().get(i), i); + for (int i = 0; i < element.getIngredient().size(); i++) + composeSubstanceSubstanceIngredientComponent(t, "Substance", "ingredient", element.getIngredient().get(i), i); + } + + protected void composeSubstanceSubstanceInstanceComponent(Complex parent, String parentType, String name, Substance.SubstanceInstanceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "instance", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "Substance", "identifier", element.getIdentifier(), -1); + if (element.hasExpiryElement()) + composeDateTime(t, "Substance", "expiry", element.getExpiryElement(), -1); + if (element.hasQuantity()) + composeQuantity(t, "Substance", "quantity", element.getQuantity(), -1); + } + + protected void composeSubstanceSubstanceIngredientComponent(Complex parent, String parentType, String name, Substance.SubstanceIngredientComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "ingredient", name, element, index); + if (element.hasQuantity()) + composeRatio(t, "Substance", "quantity", element.getQuantity(), -1); + if (element.hasSubstance()) + composeType(t, "Substance", "substance", element.getSubstance(), -1); + } + + protected void composeSupplyDelivery(Complex parent, String parentType, String name, SupplyDelivery element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "SupplyDelivery", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "SupplyDelivery", "identifier", element.getIdentifier(), -1); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "SupplyDelivery", "basedOn", element.getBasedOn().get(i), i); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "SupplyDelivery", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "SupplyDelivery", "status", element.getStatusElement(), -1); + if (element.hasPatient()) + composeReference(t, "SupplyDelivery", "patient", element.getPatient(), -1); + if (element.hasType()) + composeCodeableConcept(t, "SupplyDelivery", "type", element.getType(), -1); + if (element.hasSuppliedItem()) + composeSupplyDeliverySupplyDeliverySuppliedItemComponent(t, "SupplyDelivery", "suppliedItem", element.getSuppliedItem(), -1); + if (element.hasOccurrence()) + composeType(t, "SupplyDelivery", "occurrence", element.getOccurrence(), -1); + if (element.hasSupplier()) + composeReference(t, "SupplyDelivery", "supplier", element.getSupplier(), -1); + if (element.hasDestination()) + composeReference(t, "SupplyDelivery", "destination", element.getDestination(), -1); + for (int i = 0; i < element.getReceiver().size(); i++) + composeReference(t, "SupplyDelivery", "receiver", element.getReceiver().get(i), i); + } + + protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(Complex parent, String parentType, String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "suppliedItem", name, element, index); + if (element.hasQuantity()) + composeQuantity(t, "SupplyDelivery", "quantity", element.getQuantity(), -1); + if (element.hasItem()) + composeType(t, "SupplyDelivery", "item", element.getItem(), -1); + } + + protected void composeSupplyRequest(Complex parent, String parentType, String name, SupplyRequest element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "SupplyRequest", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "SupplyRequest", "identifier", element.getIdentifier(), -1); + if (element.hasStatusElement()) + composeEnum(t, "SupplyRequest", "status", element.getStatusElement(), -1); + if (element.hasCategory()) + composeCodeableConcept(t, "SupplyRequest", "category", element.getCategory(), -1); + if (element.hasPriorityElement()) + composeEnum(t, "SupplyRequest", "priority", element.getPriorityElement(), -1); + if (element.hasOrderedItem()) + composeSupplyRequestSupplyRequestOrderedItemComponent(t, "SupplyRequest", "orderedItem", element.getOrderedItem(), -1); + if (element.hasOccurrence()) + composeType(t, "SupplyRequest", "occurrence", element.getOccurrence(), -1); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "SupplyRequest", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasRequester()) + composeSupplyRequestSupplyRequestRequesterComponent(t, "SupplyRequest", "requester", element.getRequester(), -1); + for (int i = 0; i < element.getSupplier().size(); i++) + composeReference(t, "SupplyRequest", "supplier", element.getSupplier().get(i), i); + if (element.hasReason()) + composeType(t, "SupplyRequest", "reason", element.getReason(), -1); + if (element.hasDeliverFrom()) + composeReference(t, "SupplyRequest", "deliverFrom", element.getDeliverFrom(), -1); + if (element.hasDeliverTo()) + composeReference(t, "SupplyRequest", "deliverTo", element.getDeliverTo(), -1); + } + + protected void composeSupplyRequestSupplyRequestOrderedItemComponent(Complex parent, String parentType, String name, SupplyRequest.SupplyRequestOrderedItemComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "orderedItem", name, element, index); + if (element.hasQuantity()) + composeQuantity(t, "SupplyRequest", "quantity", element.getQuantity(), -1); + if (element.hasItem()) + composeType(t, "SupplyRequest", "item", element.getItem(), -1); + } + + protected void composeSupplyRequestSupplyRequestRequesterComponent(Complex parent, String parentType, String name, SupplyRequest.SupplyRequestRequesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requester", name, element, index); + if (element.hasAgent()) + composeReference(t, "SupplyRequest", "agent", element.getAgent(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "SupplyRequest", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeTask(Complex parent, String parentType, String name, Task element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "Task", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "Task", "identifier", element.getIdentifier().get(i), i); + if (element.hasDefinition()) + composeType(t, "Task", "definition", element.getDefinition(), -1); + for (int i = 0; i < element.getBasedOn().size(); i++) + composeReference(t, "Task", "basedOn", element.getBasedOn().get(i), i); + if (element.hasGroupIdentifier()) + composeIdentifier(t, "Task", "groupIdentifier", element.getGroupIdentifier(), -1); + for (int i = 0; i < element.getPartOf().size(); i++) + composeReference(t, "Task", "partOf", element.getPartOf().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "Task", "status", element.getStatusElement(), -1); + if (element.hasStatusReason()) + composeCodeableConcept(t, "Task", "statusReason", element.getStatusReason(), -1); + if (element.hasBusinessStatus()) + composeCodeableConcept(t, "Task", "businessStatus", element.getBusinessStatus(), -1); + if (element.hasIntentElement()) + composeEnum(t, "Task", "intent", element.getIntentElement(), -1); + if (element.hasPriorityElement()) + composeEnum(t, "Task", "priority", element.getPriorityElement(), -1); + if (element.hasCode()) + composeCodeableConcept(t, "Task", "code", element.getCode(), -1); + if (element.hasDescriptionElement()) + composeString(t, "Task", "description", element.getDescriptionElement(), -1); + if (element.hasFocus()) + composeReference(t, "Task", "focus", element.getFocus(), -1); + if (element.hasFor()) + composeReference(t, "Task", "for", element.getFor(), -1); + if (element.hasContext()) + composeReference(t, "Task", "context", element.getContext(), -1); + if (element.hasExecutionPeriod()) + composePeriod(t, "Task", "executionPeriod", element.getExecutionPeriod(), -1); + if (element.hasAuthoredOnElement()) + composeDateTime(t, "Task", "authoredOn", element.getAuthoredOnElement(), -1); + if (element.hasLastModifiedElement()) + composeDateTime(t, "Task", "lastModified", element.getLastModifiedElement(), -1); + if (element.hasRequester()) + composeTaskTaskRequesterComponent(t, "Task", "requester", element.getRequester(), -1); + for (int i = 0; i < element.getPerformerType().size(); i++) + composeCodeableConcept(t, "Task", "performerType", element.getPerformerType().get(i), i); + if (element.hasOwner()) + composeReference(t, "Task", "owner", element.getOwner(), -1); + if (element.hasReasonCode()) + composeCodeableConcept(t, "Task", "reasonCode", element.getReasonCode(), -1); + if (element.hasReasonReference()) + composeReference(t, "Task", "reasonReference", element.getReasonReference(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "Task", "note", element.getNote().get(i), i); + for (int i = 0; i < element.getRelevantHistory().size(); i++) + composeReference(t, "Task", "relevantHistory", element.getRelevantHistory().get(i), i); + if (element.hasRestriction()) + composeTaskTaskRestrictionComponent(t, "Task", "restriction", element.getRestriction(), -1); + for (int i = 0; i < element.getInput().size(); i++) + composeTaskParameterComponent(t, "Task", "input", element.getInput().get(i), i); + for (int i = 0; i < element.getOutput().size(); i++) + composeTaskTaskOutputComponent(t, "Task", "output", element.getOutput().get(i), i); + } + + protected void composeTaskTaskRequesterComponent(Complex parent, String parentType, String name, Task.TaskRequesterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requester", name, element, index); + if (element.hasAgent()) + composeReference(t, "Task", "agent", element.getAgent(), -1); + if (element.hasOnBehalfOf()) + composeReference(t, "Task", "onBehalfOf", element.getOnBehalfOf(), -1); + } + + protected void composeTaskTaskRestrictionComponent(Complex parent, String parentType, String name, Task.TaskRestrictionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "restriction", name, element, index); + if (element.hasRepetitionsElement()) + composePositiveInt(t, "Task", "repetitions", element.getRepetitionsElement(), -1); + if (element.hasPeriod()) + composePeriod(t, "Task", "period", element.getPeriod(), -1); + for (int i = 0; i < element.getRecipient().size(); i++) + composeReference(t, "Task", "recipient", element.getRecipient().get(i), i); + } + + protected void composeTaskParameterComponent(Complex parent, String parentType, String name, Task.ParameterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "input", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "Task", "type", element.getType(), -1); + if (element.hasValue()) + composeType(t, "Task", "value", element.getValue(), -1); + } + + protected void composeTaskTaskOutputComponent(Complex parent, String parentType, String name, Task.TaskOutputComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "output", name, element, index); + if (element.hasType()) + composeCodeableConcept(t, "Task", "type", element.getType(), -1); + if (element.hasValue()) + composeType(t, "Task", "value", element.getValue(), -1); + } + + protected void composeTestReport(Complex parent, String parentType, String name, TestReport element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "TestReport", name, element, index); + if (element.hasIdentifier()) + composeIdentifier(t, "TestReport", "identifier", element.getIdentifier(), -1); + if (element.hasNameElement()) + composeString(t, "TestReport", "name", element.getNameElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "TestReport", "status", element.getStatusElement(), -1); + if (element.hasTestScript()) + composeReference(t, "TestReport", "testScript", element.getTestScript(), -1); + if (element.hasResultElement()) + composeEnum(t, "TestReport", "result", element.getResultElement(), -1); + if (element.hasScoreElement()) + composeDecimal(t, "TestReport", "score", element.getScoreElement(), -1); + if (element.hasTesterElement()) + composeString(t, "TestReport", "tester", element.getTesterElement(), -1); + if (element.hasIssuedElement()) + composeDateTime(t, "TestReport", "issued", element.getIssuedElement(), -1); + for (int i = 0; i < element.getParticipant().size(); i++) + composeTestReportTestReportParticipantComponent(t, "TestReport", "participant", element.getParticipant().get(i), i); + if (element.hasSetup()) + composeTestReportTestReportSetupComponent(t, "TestReport", "setup", element.getSetup(), -1); + for (int i = 0; i < element.getTest().size(); i++) + composeTestReportTestReportTestComponent(t, "TestReport", "test", element.getTest().get(i), i); + if (element.hasTeardown()) + composeTestReportTestReportTeardownComponent(t, "TestReport", "teardown", element.getTeardown(), -1); + } + + protected void composeTestReportTestReportParticipantComponent(Complex parent, String parentType, String name, TestReport.TestReportParticipantComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "participant", name, element, index); + if (element.hasTypeElement()) + composeEnum(t, "TestReport", "type", element.getTypeElement(), -1); + if (element.hasUriElement()) + composeUri(t, "TestReport", "uri", element.getUriElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "TestReport", "display", element.getDisplayElement(), -1); + } + + protected void composeTestReportTestReportSetupComponent(Complex parent, String parentType, String name, TestReport.TestReportSetupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "setup", name, element, index); + for (int i = 0; i < element.getAction().size(); i++) + composeTestReportSetupActionComponent(t, "TestReport", "action", element.getAction().get(i), i); + } + + protected void composeTestReportSetupActionComponent(Complex parent, String parentType, String name, TestReport.SetupActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasOperation()) + composeTestReportSetupActionOperationComponent(t, "TestReport", "operation", element.getOperation(), -1); + if (element.hasAssert()) + composeTestReportSetupActionAssertComponent(t, "TestReport", "assert", element.getAssert(), -1); + } + + protected void composeTestReportSetupActionOperationComponent(Complex parent, String parentType, String name, TestReport.SetupActionOperationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "operation", name, element, index); + if (element.hasResultElement()) + composeEnum(t, "TestReport", "result", element.getResultElement(), -1); + if (element.hasMessageElement()) + composeMarkdown(t, "TestReport", "message", element.getMessageElement(), -1); + if (element.hasDetailElement()) + composeUri(t, "TestReport", "detail", element.getDetailElement(), -1); + } + + protected void composeTestReportSetupActionAssertComponent(Complex parent, String parentType, String name, TestReport.SetupActionAssertComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "assert", name, element, index); + if (element.hasResultElement()) + composeEnum(t, "TestReport", "result", element.getResultElement(), -1); + if (element.hasMessageElement()) + composeMarkdown(t, "TestReport", "message", element.getMessageElement(), -1); + if (element.hasDetailElement()) + composeString(t, "TestReport", "detail", element.getDetailElement(), -1); + } + + protected void composeTestReportTestReportTestComponent(Complex parent, String parentType, String name, TestReport.TestReportTestComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "test", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestReport", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestReport", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getAction().size(); i++) + composeTestReportTestActionComponent(t, "TestReport", "action", element.getAction().get(i), i); + } + + protected void composeTestReportTestActionComponent(Complex parent, String parentType, String name, TestReport.TestActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasOperation()) + composeTestReportSetupActionOperationComponent(t, "TestReport", "operation", element.getOperation(), -1); + if (element.hasAssert()) + composeTestReportSetupActionAssertComponent(t, "TestReport", "assert", element.getAssert(), -1); + } + + protected void composeTestReportTestReportTeardownComponent(Complex parent, String parentType, String name, TestReport.TestReportTeardownComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "teardown", name, element, index); + for (int i = 0; i < element.getAction().size(); i++) + composeTestReportTeardownActionComponent(t, "TestReport", "action", element.getAction().get(i), i); + } + + protected void composeTestReportTeardownActionComponent(Complex parent, String parentType, String name, TestReport.TeardownActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasOperation()) + composeTestReportSetupActionOperationComponent(t, "TestReport", "operation", element.getOperation(), -1); + } + + protected void composeTestScript(Complex parent, String parentType, String name, TestScript element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "TestScript", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "TestScript", "url", element.getUrlElement(), -1); + if (element.hasIdentifier()) + composeIdentifier(t, "TestScript", "identifier", element.getIdentifier(), -1); + if (element.hasVersionElement()) + composeString(t, "TestScript", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "TestScript", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "TestScript", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "TestScript", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "TestScript", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "TestScript", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "TestScript", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "TestScript", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "TestScript", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "TestScript", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasPurposeElement()) + composeMarkdown(t, "TestScript", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "TestScript", "copyright", element.getCopyrightElement(), -1); + for (int i = 0; i < element.getOrigin().size(); i++) + composeTestScriptTestScriptOriginComponent(t, "TestScript", "origin", element.getOrigin().get(i), i); + for (int i = 0; i < element.getDestination().size(); i++) + composeTestScriptTestScriptDestinationComponent(t, "TestScript", "destination", element.getDestination().get(i), i); + if (element.hasMetadata()) + composeTestScriptTestScriptMetadataComponent(t, "TestScript", "metadata", element.getMetadata(), -1); + for (int i = 0; i < element.getFixture().size(); i++) + composeTestScriptTestScriptFixtureComponent(t, "TestScript", "fixture", element.getFixture().get(i), i); + for (int i = 0; i < element.getProfile().size(); i++) + composeReference(t, "TestScript", "profile", element.getProfile().get(i), i); + for (int i = 0; i < element.getVariable().size(); i++) + composeTestScriptTestScriptVariableComponent(t, "TestScript", "variable", element.getVariable().get(i), i); + for (int i = 0; i < element.getRule().size(); i++) + composeTestScriptTestScriptRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i); + for (int i = 0; i < element.getRuleset().size(); i++) + composeTestScriptTestScriptRulesetComponent(t, "TestScript", "ruleset", element.getRuleset().get(i), i); + if (element.hasSetup()) + composeTestScriptTestScriptSetupComponent(t, "TestScript", "setup", element.getSetup(), -1); + for (int i = 0; i < element.getTest().size(); i++) + composeTestScriptTestScriptTestComponent(t, "TestScript", "test", element.getTest().get(i), i); + if (element.hasTeardown()) + composeTestScriptTestScriptTeardownComponent(t, "TestScript", "teardown", element.getTeardown(), -1); + } + + protected void composeTestScriptTestScriptOriginComponent(Complex parent, String parentType, String name, TestScript.TestScriptOriginComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "origin", name, element, index); + if (element.hasIndexElement()) + composeInteger(t, "TestScript", "index", element.getIndexElement(), -1); + if (element.hasProfile()) + composeCoding(t, "TestScript", "profile", element.getProfile(), -1); + } + + protected void composeTestScriptTestScriptDestinationComponent(Complex parent, String parentType, String name, TestScript.TestScriptDestinationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "destination", name, element, index); + if (element.hasIndexElement()) + composeInteger(t, "TestScript", "index", element.getIndexElement(), -1); + if (element.hasProfile()) + composeCoding(t, "TestScript", "profile", element.getProfile(), -1); + } + + protected void composeTestScriptTestScriptMetadataComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "metadata", name, element, index); + for (int i = 0; i < element.getLink().size(); i++) + composeTestScriptTestScriptMetadataLinkComponent(t, "TestScript", "link", element.getLink().get(i), i); + for (int i = 0; i < element.getCapability().size(); i++) + composeTestScriptTestScriptMetadataCapabilityComponent(t, "TestScript", "capability", element.getCapability().get(i), i); + } + + protected void composeTestScriptTestScriptMetadataLinkComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataLinkComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "link", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "TestScript", "url", element.getUrlElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); + } + + protected void composeTestScriptTestScriptMetadataCapabilityComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataCapabilityComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "capability", name, element, index); + if (element.hasRequiredElement()) + composeBoolean(t, "TestScript", "required", element.getRequiredElement(), -1); + if (element.hasValidatedElement()) + composeBoolean(t, "TestScript", "validated", element.getValidatedElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getOrigin().size(); i++) + composeInteger(t, "TestScript", "origin", element.getOrigin().get(i), i); + if (element.hasDestinationElement()) + composeInteger(t, "TestScript", "destination", element.getDestinationElement(), -1); + for (int i = 0; i < element.getLink().size(); i++) + composeUri(t, "TestScript", "link", element.getLink().get(i), i); + if (element.hasCapabilities()) + composeReference(t, "TestScript", "capabilities", element.getCapabilities(), -1); + } + + protected void composeTestScriptTestScriptFixtureComponent(Complex parent, String parentType, String name, TestScript.TestScriptFixtureComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "fixture", name, element, index); + if (element.hasAutocreateElement()) + composeBoolean(t, "TestScript", "autocreate", element.getAutocreateElement(), -1); + if (element.hasAutodeleteElement()) + composeBoolean(t, "TestScript", "autodelete", element.getAutodeleteElement(), -1); + if (element.hasResource()) + composeReference(t, "TestScript", "resource", element.getResource(), -1); + } + + protected void composeTestScriptTestScriptVariableComponent(Complex parent, String parentType, String name, TestScript.TestScriptVariableComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "variable", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasDefaultValueElement()) + composeString(t, "TestScript", "defaultValue", element.getDefaultValueElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "TestScript", "expression", element.getExpressionElement(), -1); + if (element.hasHeaderFieldElement()) + composeString(t, "TestScript", "headerField", element.getHeaderFieldElement(), -1); + if (element.hasHintElement()) + composeString(t, "TestScript", "hint", element.getHintElement(), -1); + if (element.hasPathElement()) + composeString(t, "TestScript", "path", element.getPathElement(), -1); + if (element.hasSourceIdElement()) + composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1); + } + + protected void composeTestScriptTestScriptRuleComponent(Complex parent, String parentType, String name, TestScript.TestScriptRuleComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rule", name, element, index); + if (element.hasResource()) + composeReference(t, "TestScript", "resource", element.getResource(), -1); + for (int i = 0; i < element.getParam().size(); i++) + composeTestScriptRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); + } + + protected void composeTestScriptRuleParamComponent(Complex parent, String parentType, String name, TestScript.RuleParamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "param", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasValueElement()) + composeString(t, "TestScript", "value", element.getValueElement(), -1); + } + + protected void composeTestScriptTestScriptRulesetComponent(Complex parent, String parentType, String name, TestScript.TestScriptRulesetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "ruleset", name, element, index); + if (element.hasResource()) + composeReference(t, "TestScript", "resource", element.getResource(), -1); + for (int i = 0; i < element.getRule().size(); i++) + composeTestScriptRulesetRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i); + } + + protected void composeTestScriptRulesetRuleComponent(Complex parent, String parentType, String name, TestScript.RulesetRuleComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rule", name, element, index); + if (element.hasRuleIdElement()) + composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1); + for (int i = 0; i < element.getParam().size(); i++) + composeTestScriptRulesetRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); + } + + protected void composeTestScriptRulesetRuleParamComponent(Complex parent, String parentType, String name, TestScript.RulesetRuleParamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "param", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasValueElement()) + composeString(t, "TestScript", "value", element.getValueElement(), -1); + } + + protected void composeTestScriptTestScriptSetupComponent(Complex parent, String parentType, String name, TestScript.TestScriptSetupComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "setup", name, element, index); + for (int i = 0; i < element.getAction().size(); i++) + composeTestScriptSetupActionComponent(t, "TestScript", "action", element.getAction().get(i), i); + } + + protected void composeTestScriptSetupActionComponent(Complex parent, String parentType, String name, TestScript.SetupActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasOperation()) + composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1); + if (element.hasAssert()) + composeTestScriptSetupActionAssertComponent(t, "TestScript", "assert", element.getAssert(), -1); + } + + protected void composeTestScriptSetupActionOperationComponent(Complex parent, String parentType, String name, TestScript.SetupActionOperationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "operation", name, element, index); + if (element.hasType()) + composeCoding(t, "TestScript", "type", element.getType(), -1); + if (element.hasResourceElement()) + composeCode(t, "TestScript", "resource", element.getResourceElement(), -1); + if (element.hasLabelElement()) + composeString(t, "TestScript", "label", element.getLabelElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); + if (element.hasAcceptElement()) + composeEnum(t, "TestScript", "accept", element.getAcceptElement(), -1); + if (element.hasContentTypeElement()) + composeEnum(t, "TestScript", "contentType", element.getContentTypeElement(), -1); + if (element.hasDestinationElement()) + composeInteger(t, "TestScript", "destination", element.getDestinationElement(), -1); + if (element.hasEncodeRequestUrlElement()) + composeBoolean(t, "TestScript", "encodeRequestUrl", element.getEncodeRequestUrlElement(), -1); + if (element.hasOriginElement()) + composeInteger(t, "TestScript", "origin", element.getOriginElement(), -1); + if (element.hasParamsElement()) + composeString(t, "TestScript", "params", element.getParamsElement(), -1); + for (int i = 0; i < element.getRequestHeader().size(); i++) + composeTestScriptSetupActionOperationRequestHeaderComponent(t, "TestScript", "requestHeader", element.getRequestHeader().get(i), i); + if (element.hasRequestIdElement()) + composeId(t, "TestScript", "requestId", element.getRequestIdElement(), -1); + if (element.hasResponseIdElement()) + composeId(t, "TestScript", "responseId", element.getResponseIdElement(), -1); + if (element.hasSourceIdElement()) + composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1); + if (element.hasTargetIdElement()) + composeId(t, "TestScript", "targetId", element.getTargetIdElement(), -1); + if (element.hasUrlElement()) + composeString(t, "TestScript", "url", element.getUrlElement(), -1); + } + + protected void composeTestScriptSetupActionOperationRequestHeaderComponent(Complex parent, String parentType, String name, TestScript.SetupActionOperationRequestHeaderComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "requestHeader", name, element, index); + if (element.hasFieldElement()) + composeString(t, "TestScript", "field", element.getFieldElement(), -1); + if (element.hasValueElement()) + composeString(t, "TestScript", "value", element.getValueElement(), -1); + } + + protected void composeTestScriptSetupActionAssertComponent(Complex parent, String parentType, String name, TestScript.SetupActionAssertComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "assert", name, element, index); + if (element.hasLabelElement()) + composeString(t, "TestScript", "label", element.getLabelElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); + if (element.hasDirectionElement()) + composeEnum(t, "TestScript", "direction", element.getDirectionElement(), -1); + if (element.hasCompareToSourceIdElement()) + composeString(t, "TestScript", "compareToSourceId", element.getCompareToSourceIdElement(), -1); + if (element.hasCompareToSourceExpressionElement()) + composeString(t, "TestScript", "compareToSourceExpression", element.getCompareToSourceExpressionElement(), -1); + if (element.hasCompareToSourcePathElement()) + composeString(t, "TestScript", "compareToSourcePath", element.getCompareToSourcePathElement(), -1); + if (element.hasContentTypeElement()) + composeEnum(t, "TestScript", "contentType", element.getContentTypeElement(), -1); + if (element.hasExpressionElement()) + composeString(t, "TestScript", "expression", element.getExpressionElement(), -1); + if (element.hasHeaderFieldElement()) + composeString(t, "TestScript", "headerField", element.getHeaderFieldElement(), -1); + if (element.hasMinimumIdElement()) + composeString(t, "TestScript", "minimumId", element.getMinimumIdElement(), -1); + if (element.hasNavigationLinksElement()) + composeBoolean(t, "TestScript", "navigationLinks", element.getNavigationLinksElement(), -1); + if (element.hasOperatorElement()) + composeEnum(t, "TestScript", "operator", element.getOperatorElement(), -1); + if (element.hasPathElement()) + composeString(t, "TestScript", "path", element.getPathElement(), -1); + if (element.hasRequestMethodElement()) + composeEnum(t, "TestScript", "requestMethod", element.getRequestMethodElement(), -1); + if (element.hasRequestURLElement()) + composeString(t, "TestScript", "requestURL", element.getRequestURLElement(), -1); + if (element.hasResourceElement()) + composeCode(t, "TestScript", "resource", element.getResourceElement(), -1); + if (element.hasResponseElement()) + composeEnum(t, "TestScript", "response", element.getResponseElement(), -1); + if (element.hasResponseCodeElement()) + composeString(t, "TestScript", "responseCode", element.getResponseCodeElement(), -1); + if (element.hasRule()) + composeTestScriptActionAssertRuleComponent(t, "TestScript", "rule", element.getRule(), -1); + if (element.hasRuleset()) + composeTestScriptActionAssertRulesetComponent(t, "TestScript", "ruleset", element.getRuleset(), -1); + if (element.hasSourceIdElement()) + composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1); + if (element.hasValidateProfileIdElement()) + composeId(t, "TestScript", "validateProfileId", element.getValidateProfileIdElement(), -1); + if (element.hasValueElement()) + composeString(t, "TestScript", "value", element.getValueElement(), -1); + if (element.hasWarningOnlyElement()) + composeBoolean(t, "TestScript", "warningOnly", element.getWarningOnlyElement(), -1); + } + + protected void composeTestScriptActionAssertRuleComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRuleComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rule", name, element, index); + if (element.hasRuleIdElement()) + composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1); + for (int i = 0; i < element.getParam().size(); i++) + composeTestScriptActionAssertRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); + } + + protected void composeTestScriptActionAssertRuleParamComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRuleParamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "param", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasValueElement()) + composeString(t, "TestScript", "value", element.getValueElement(), -1); + } + + protected void composeTestScriptActionAssertRulesetComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "ruleset", name, element, index); + if (element.hasRulesetIdElement()) + composeId(t, "TestScript", "rulesetId", element.getRulesetIdElement(), -1); + for (int i = 0; i < element.getRule().size(); i++) + composeTestScriptActionAssertRulesetRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i); + } + + protected void composeTestScriptActionAssertRulesetRuleComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetRuleComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "rule", name, element, index); + if (element.hasRuleIdElement()) + composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1); + for (int i = 0; i < element.getParam().size(); i++) + composeTestScriptActionAssertRulesetRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i); + } + + protected void composeTestScriptActionAssertRulesetRuleParamComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetRuleParamComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "param", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasValueElement()) + composeString(t, "TestScript", "value", element.getValueElement(), -1); + } + + protected void composeTestScriptTestScriptTestComponent(Complex parent, String parentType, String name, TestScript.TestScriptTestComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "test", name, element, index); + if (element.hasNameElement()) + composeString(t, "TestScript", "name", element.getNameElement(), -1); + if (element.hasDescriptionElement()) + composeString(t, "TestScript", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getAction().size(); i++) + composeTestScriptTestActionComponent(t, "TestScript", "action", element.getAction().get(i), i); + } + + protected void composeTestScriptTestActionComponent(Complex parent, String parentType, String name, TestScript.TestActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasOperation()) + composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1); + if (element.hasAssert()) + composeTestScriptSetupActionAssertComponent(t, "TestScript", "assert", element.getAssert(), -1); + } + + protected void composeTestScriptTestScriptTeardownComponent(Complex parent, String parentType, String name, TestScript.TestScriptTeardownComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "teardown", name, element, index); + for (int i = 0; i < element.getAction().size(); i++) + composeTestScriptTeardownActionComponent(t, "TestScript", "action", element.getAction().get(i), i); + } + + protected void composeTestScriptTeardownActionComponent(Complex parent, String parentType, String name, TestScript.TeardownActionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "action", name, element, index); + if (element.hasOperation()) + composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1); + } + + protected void composeValueSet(Complex parent, String parentType, String name, ValueSet element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "ValueSet", name, element, index); + if (element.hasUrlElement()) + composeUri(t, "ValueSet", "url", element.getUrlElement(), -1); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "ValueSet", "identifier", element.getIdentifier().get(i), i); + if (element.hasVersionElement()) + composeString(t, "ValueSet", "version", element.getVersionElement(), -1); + if (element.hasNameElement()) + composeString(t, "ValueSet", "name", element.getNameElement(), -1); + if (element.hasTitleElement()) + composeString(t, "ValueSet", "title", element.getTitleElement(), -1); + if (element.hasStatusElement()) + composeEnum(t, "ValueSet", "status", element.getStatusElement(), -1); + if (element.hasExperimentalElement()) + composeBoolean(t, "ValueSet", "experimental", element.getExperimentalElement(), -1); + if (element.hasDateElement()) + composeDateTime(t, "ValueSet", "date", element.getDateElement(), -1); + if (element.hasPublisherElement()) + composeString(t, "ValueSet", "publisher", element.getPublisherElement(), -1); + for (int i = 0; i < element.getContact().size(); i++) + composeContactDetail(t, "ValueSet", "contact", element.getContact().get(i), i); + if (element.hasDescriptionElement()) + composeMarkdown(t, "ValueSet", "description", element.getDescriptionElement(), -1); + for (int i = 0; i < element.getUseContext().size(); i++) + composeUsageContext(t, "ValueSet", "useContext", element.getUseContext().get(i), i); + for (int i = 0; i < element.getJurisdiction().size(); i++) + composeCodeableConcept(t, "ValueSet", "jurisdiction", element.getJurisdiction().get(i), i); + if (element.hasImmutableElement()) + composeBoolean(t, "ValueSet", "immutable", element.getImmutableElement(), -1); + if (element.hasPurposeElement()) + composeMarkdown(t, "ValueSet", "purpose", element.getPurposeElement(), -1); + if (element.hasCopyrightElement()) + composeMarkdown(t, "ValueSet", "copyright", element.getCopyrightElement(), -1); + if (element.hasExtensibleElement()) + composeBoolean(t, "ValueSet", "extensible", element.getExtensibleElement(), -1); + if (element.hasCompose()) + composeValueSetValueSetComposeComponent(t, "ValueSet", "compose", element.getCompose(), -1); + if (element.hasExpansion()) + composeValueSetValueSetExpansionComponent(t, "ValueSet", "expansion", element.getExpansion(), -1); + } + + protected void composeValueSetValueSetComposeComponent(Complex parent, String parentType, String name, ValueSet.ValueSetComposeComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "compose", name, element, index); + if (element.hasLockedDateElement()) + composeDate(t, "ValueSet", "lockedDate", element.getLockedDateElement(), -1); + if (element.hasInactiveElement()) + composeBoolean(t, "ValueSet", "inactive", element.getInactiveElement(), -1); + for (int i = 0; i < element.getInclude().size(); i++) + composeValueSetConceptSetComponent(t, "ValueSet", "include", element.getInclude().get(i), i); + for (int i = 0; i < element.getExclude().size(); i++) + composeValueSetConceptSetComponent(t, "ValueSet", "exclude", element.getExclude().get(i), i); + } + + protected void composeValueSetConceptSetComponent(Complex parent, String parentType, String name, ValueSet.ConceptSetComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "include", name, element, index); + if (element.hasSystemElement()) + composeUri(t, "ValueSet", "system", element.getSystemElement(), -1); + if (element.hasVersionElement()) + composeString(t, "ValueSet", "version", element.getVersionElement(), -1); + for (int i = 0; i < element.getConcept().size(); i++) + composeValueSetConceptReferenceComponent(t, "ValueSet", "concept", element.getConcept().get(i), i); + for (int i = 0; i < element.getFilter().size(); i++) + composeValueSetConceptSetFilterComponent(t, "ValueSet", "filter", element.getFilter().get(i), i); + for (int i = 0; i < element.getValueSet().size(); i++) + composeUri(t, "ValueSet", "valueSet", element.getValueSet().get(i), i); + } + + protected void composeValueSetConceptReferenceComponent(Complex parent, String parentType, String name, ValueSet.ConceptReferenceComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "concept", name, element, index); + if (element.hasCodeElement()) + composeCode(t, "ValueSet", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "ValueSet", "display", element.getDisplayElement(), -1); + for (int i = 0; i < element.getDesignation().size(); i++) + composeValueSetConceptReferenceDesignationComponent(t, "ValueSet", "designation", element.getDesignation().get(i), i); + } + + protected void composeValueSetConceptReferenceDesignationComponent(Complex parent, String parentType, String name, ValueSet.ConceptReferenceDesignationComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "designation", name, element, index); + if (element.hasLanguageElement()) + composeCode(t, "ValueSet", "language", element.getLanguageElement(), -1); + if (element.hasUse()) + composeCoding(t, "ValueSet", "use", element.getUse(), -1); + if (element.hasValueElement()) + composeString(t, "ValueSet", "value", element.getValueElement(), -1); + } + + protected void composeValueSetConceptSetFilterComponent(Complex parent, String parentType, String name, ValueSet.ConceptSetFilterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "filter", name, element, index); + if (element.hasPropertyElement()) + composeCode(t, "ValueSet", "property", element.getPropertyElement(), -1); + if (element.hasOpElement()) + composeEnum(t, "ValueSet", "op", element.getOpElement(), -1); + if (element.hasValueElement()) + composeCode(t, "ValueSet", "value", element.getValueElement(), -1); + } + + protected void composeValueSetValueSetExpansionComponent(Complex parent, String parentType, String name, ValueSet.ValueSetExpansionComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "expansion", name, element, index); + if (element.hasIdentifierElement()) + composeUri(t, "ValueSet", "identifier", element.getIdentifierElement(), -1); + if (element.hasTimestampElement()) + composeDateTime(t, "ValueSet", "timestamp", element.getTimestampElement(), -1); + if (element.hasTotalElement()) + composeInteger(t, "ValueSet", "total", element.getTotalElement(), -1); + if (element.hasOffsetElement()) + composeInteger(t, "ValueSet", "offset", element.getOffsetElement(), -1); + for (int i = 0; i < element.getParameter().size(); i++) + composeValueSetValueSetExpansionParameterComponent(t, "ValueSet", "parameter", element.getParameter().get(i), i); + for (int i = 0; i < element.getContains().size(); i++) + composeValueSetValueSetExpansionContainsComponent(t, "ValueSet", "contains", element.getContains().get(i), i); + } + + protected void composeValueSetValueSetExpansionParameterComponent(Complex parent, String parentType, String name, ValueSet.ValueSetExpansionParameterComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "parameter", name, element, index); + if (element.hasNameElement()) + composeString(t, "ValueSet", "name", element.getNameElement(), -1); + if (element.hasValue()) + composeType(t, "ValueSet", "value", element.getValue(), -1); + } + + protected void composeValueSetValueSetExpansionContainsComponent(Complex parent, String parentType, String name, ValueSet.ValueSetExpansionContainsComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "contains", name, element, index); + if (element.hasSystemElement()) + composeUri(t, "ValueSet", "system", element.getSystemElement(), -1); + if (element.hasAbstractElement()) + composeBoolean(t, "ValueSet", "abstract", element.getAbstractElement(), -1); + if (element.hasInactiveElement()) + composeBoolean(t, "ValueSet", "inactive", element.getInactiveElement(), -1); + if (element.hasVersionElement()) + composeString(t, "ValueSet", "version", element.getVersionElement(), -1); + if (element.hasCodeElement()) + composeCode(t, "ValueSet", "code", element.getCodeElement(), -1); + if (element.hasDisplayElement()) + composeString(t, "ValueSet", "display", element.getDisplayElement(), -1); + for (int i = 0; i < element.getDesignation().size(); i++) + composeValueSetConceptReferenceDesignationComponent(t, "ValueSet", "designation", element.getDesignation().get(i), i); + for (int i = 0; i < element.getContains().size(); i++) + composeValueSetValueSetExpansionContainsComponent(t, "ValueSet", "contains", element.getContains().get(i), i); + } + + protected void composeVisionPrescription(Complex parent, String parentType, String name, VisionPrescription element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeDomainResource(t, "VisionPrescription", name, element, index); + for (int i = 0; i < element.getIdentifier().size(); i++) + composeIdentifier(t, "VisionPrescription", "identifier", element.getIdentifier().get(i), i); + if (element.hasStatusElement()) + composeEnum(t, "VisionPrescription", "status", element.getStatusElement(), -1); + if (element.hasPatient()) + composeReference(t, "VisionPrescription", "patient", element.getPatient(), -1); + if (element.hasEncounter()) + composeReference(t, "VisionPrescription", "encounter", element.getEncounter(), -1); + if (element.hasDateWrittenElement()) + composeDateTime(t, "VisionPrescription", "dateWritten", element.getDateWrittenElement(), -1); + if (element.hasPrescriber()) + composeReference(t, "VisionPrescription", "prescriber", element.getPrescriber(), -1); + if (element.hasReason()) + composeType(t, "VisionPrescription", "reason", element.getReason(), -1); + for (int i = 0; i < element.getDispense().size(); i++) + composeVisionPrescriptionVisionPrescriptionDispenseComponent(t, "VisionPrescription", "dispense", element.getDispense().get(i), i); + } + + protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(Complex parent, String parentType, String name, VisionPrescription.VisionPrescriptionDispenseComponent element, int index) { + if (element == null) + return; + Complex t; + if (Utilities.noString(parentType)) + t = parent; + else { + t = parent.predicate("fhir:"+parentType+'.'+name); + } + composeBackboneElement(t, "dispense", name, element, index); + if (element.hasProduct()) + composeCodeableConcept(t, "VisionPrescription", "product", element.getProduct(), -1); + if (element.hasEyeElement()) + composeEnum(t, "VisionPrescription", "eye", element.getEyeElement(), -1); + if (element.hasSphereElement()) + composeDecimal(t, "VisionPrescription", "sphere", element.getSphereElement(), -1); + if (element.hasCylinderElement()) + composeDecimal(t, "VisionPrescription", "cylinder", element.getCylinderElement(), -1); + if (element.hasAxisElement()) + composeInteger(t, "VisionPrescription", "axis", element.getAxisElement(), -1); + if (element.hasPrismElement()) + composeDecimal(t, "VisionPrescription", "prism", element.getPrismElement(), -1); + if (element.hasBaseElement()) + composeEnum(t, "VisionPrescription", "base", element.getBaseElement(), -1); + if (element.hasAddElement()) + composeDecimal(t, "VisionPrescription", "add", element.getAddElement(), -1); + if (element.hasPowerElement()) + composeDecimal(t, "VisionPrescription", "power", element.getPowerElement(), -1); + if (element.hasBackCurveElement()) + composeDecimal(t, "VisionPrescription", "backCurve", element.getBackCurveElement(), -1); + if (element.hasDiameterElement()) + composeDecimal(t, "VisionPrescription", "diameter", element.getDiameterElement(), -1); + if (element.hasDuration()) + composeQuantity(t, "VisionPrescription", "duration", element.getDuration(), -1); + if (element.hasColorElement()) + composeString(t, "VisionPrescription", "color", element.getColorElement(), -1); + if (element.hasBrandElement()) + composeString(t, "VisionPrescription", "brand", element.getBrandElement(), -1); + for (int i = 0; i < element.getNote().size(); i++) + composeAnnotation(t, "VisionPrescription", "note", element.getNote().get(i), i); + } + + @Override + protected void composeResource(Complex parent, Resource resource) { + if (resource instanceof Parameters) + composeParameters(parent, null, "Parameters", (Parameters)resource, -1); + else if (resource instanceof Account) + composeAccount(parent, null, "Account", (Account)resource, -1); + else if (resource instanceof ActivityDefinition) + composeActivityDefinition(parent, null, "ActivityDefinition", (ActivityDefinition)resource, -1); + else if (resource instanceof AdverseEvent) + composeAdverseEvent(parent, null, "AdverseEvent", (AdverseEvent)resource, -1); + else if (resource instanceof AllergyIntolerance) + composeAllergyIntolerance(parent, null, "AllergyIntolerance", (AllergyIntolerance)resource, -1); + else if (resource instanceof Appointment) + composeAppointment(parent, null, "Appointment", (Appointment)resource, -1); + else if (resource instanceof AppointmentResponse) + composeAppointmentResponse(parent, null, "AppointmentResponse", (AppointmentResponse)resource, -1); + else if (resource instanceof AuditEvent) + composeAuditEvent(parent, null, "AuditEvent", (AuditEvent)resource, -1); + else if (resource instanceof Basic) + composeBasic(parent, null, "Basic", (Basic)resource, -1); + else if (resource instanceof Binary) + composeBinary(parent, null, "Binary", (Binary)resource, -1); + else if (resource instanceof BodyStructure) + composeBodyStructure(parent, null, "BodyStructure", (BodyStructure)resource, -1); + else if (resource instanceof Bundle) + composeBundle(parent, null, "Bundle", (Bundle)resource, -1); + else if (resource instanceof CapabilityStatement) + composeCapabilityStatement(parent, null, "CapabilityStatement", (CapabilityStatement)resource, -1); + else if (resource instanceof CarePlan) + composeCarePlan(parent, null, "CarePlan", (CarePlan)resource, -1); + else if (resource instanceof CareTeam) + composeCareTeam(parent, null, "CareTeam", (CareTeam)resource, -1); + else if (resource instanceof CatalogEntry) + composeCatalogEntry(parent, null, "CatalogEntry", (CatalogEntry)resource, -1); + else if (resource instanceof ChargeItem) + composeChargeItem(parent, null, "ChargeItem", (ChargeItem)resource, -1); + else if (resource instanceof Claim) + composeClaim(parent, null, "Claim", (Claim)resource, -1); + else if (resource instanceof ClaimResponse) + composeClaimResponse(parent, null, "ClaimResponse", (ClaimResponse)resource, -1); + else if (resource instanceof ClinicalImpression) + composeClinicalImpression(parent, null, "ClinicalImpression", (ClinicalImpression)resource, -1); + else if (resource instanceof CodeSystem) + composeCodeSystem(parent, null, "CodeSystem", (CodeSystem)resource, -1); + else if (resource instanceof Communication) + composeCommunication(parent, null, "Communication", (Communication)resource, -1); + else if (resource instanceof CommunicationRequest) + composeCommunicationRequest(parent, null, "CommunicationRequest", (CommunicationRequest)resource, -1); + else if (resource instanceof CompartmentDefinition) + composeCompartmentDefinition(parent, null, "CompartmentDefinition", (CompartmentDefinition)resource, -1); + else if (resource instanceof Composition) + composeComposition(parent, null, "Composition", (Composition)resource, -1); + else if (resource instanceof ConceptMap) + composeConceptMap(parent, null, "ConceptMap", (ConceptMap)resource, -1); + else if (resource instanceof Condition) + composeCondition(parent, null, "Condition", (Condition)resource, -1); + else if (resource instanceof Consent) + composeConsent(parent, null, "Consent", (Consent)resource, -1); + else if (resource instanceof Contract) + composeContract(parent, null, "Contract", (Contract)resource, -1); + else if (resource instanceof Coverage) + composeCoverage(parent, null, "Coverage", (Coverage)resource, -1); + else if (resource instanceof DetectedIssue) + composeDetectedIssue(parent, null, "DetectedIssue", (DetectedIssue)resource, -1); + else if (resource instanceof Device) + composeDevice(parent, null, "Device", (Device)resource, -1); + else if (resource instanceof DeviceComponent) + composeDeviceComponent(parent, null, "DeviceComponent", (DeviceComponent)resource, -1); + else if (resource instanceof DeviceMetric) + composeDeviceMetric(parent, null, "DeviceMetric", (DeviceMetric)resource, -1); + else if (resource instanceof DeviceRequest) + composeDeviceRequest(parent, null, "DeviceRequest", (DeviceRequest)resource, -1); + else if (resource instanceof DeviceUseStatement) + composeDeviceUseStatement(parent, null, "DeviceUseStatement", (DeviceUseStatement)resource, -1); + else if (resource instanceof DiagnosticReport) + composeDiagnosticReport(parent, null, "DiagnosticReport", (DiagnosticReport)resource, -1); + else if (resource instanceof DocumentManifest) + composeDocumentManifest(parent, null, "DocumentManifest", (DocumentManifest)resource, -1); + else if (resource instanceof DocumentReference) + composeDocumentReference(parent, null, "DocumentReference", (DocumentReference)resource, -1); + else if (resource instanceof EligibilityRequest) + composeEligibilityRequest(parent, null, "EligibilityRequest", (EligibilityRequest)resource, -1); + else if (resource instanceof EligibilityResponse) + composeEligibilityResponse(parent, null, "EligibilityResponse", (EligibilityResponse)resource, -1); + else if (resource instanceof Encounter) + composeEncounter(parent, null, "Encounter", (Encounter)resource, -1); + else if (resource instanceof Endpoint) + composeEndpoint(parent, null, "Endpoint", (Endpoint)resource, -1); + else if (resource instanceof EnrollmentRequest) + composeEnrollmentRequest(parent, null, "EnrollmentRequest", (EnrollmentRequest)resource, -1); + else if (resource instanceof EnrollmentResponse) + composeEnrollmentResponse(parent, null, "EnrollmentResponse", (EnrollmentResponse)resource, -1); + else if (resource instanceof EpisodeOfCare) + composeEpisodeOfCare(parent, null, "EpisodeOfCare", (EpisodeOfCare)resource, -1); + else if (resource instanceof EventDefinition) + composeEventDefinition(parent, null, "EventDefinition", (EventDefinition)resource, -1); + else if (resource instanceof ExampleScenario) + composeExampleScenario(parent, null, "ExampleScenario", (ExampleScenario)resource, -1); + else if (resource instanceof ExpansionProfile) + composeExpansionProfile(parent, null, "ExpansionProfile", (ExpansionProfile)resource, -1); + else if (resource instanceof ExplanationOfBenefit) + composeExplanationOfBenefit(parent, null, "ExplanationOfBenefit", (ExplanationOfBenefit)resource, -1); + else if (resource instanceof FamilyMemberHistory) + composeFamilyMemberHistory(parent, null, "FamilyMemberHistory", (FamilyMemberHistory)resource, -1); + else if (resource instanceof Flag) + composeFlag(parent, null, "Flag", (Flag)resource, -1); + else if (resource instanceof Goal) + composeGoal(parent, null, "Goal", (Goal)resource, -1); + else if (resource instanceof GraphDefinition) + composeGraphDefinition(parent, null, "GraphDefinition", (GraphDefinition)resource, -1); + else if (resource instanceof Group) + composeGroup(parent, null, "Group", (Group)resource, -1); + else if (resource instanceof GuidanceResponse) + composeGuidanceResponse(parent, null, "GuidanceResponse", (GuidanceResponse)resource, -1); + else if (resource instanceof HealthcareService) + composeHealthcareService(parent, null, "HealthcareService", (HealthcareService)resource, -1); + else if (resource instanceof ImagingManifest) + composeImagingManifest(parent, null, "ImagingManifest", (ImagingManifest)resource, -1); + else if (resource instanceof ImagingStudy) + composeImagingStudy(parent, null, "ImagingStudy", (ImagingStudy)resource, -1); + else if (resource instanceof Immunization) + composeImmunization(parent, null, "Immunization", (Immunization)resource, -1); + else if (resource instanceof ImmunizationRecommendation) + composeImmunizationRecommendation(parent, null, "ImmunizationRecommendation", (ImmunizationRecommendation)resource, -1); + else if (resource instanceof ImplementationGuide) + composeImplementationGuide(parent, null, "ImplementationGuide", (ImplementationGuide)resource, -1); + else if (resource instanceof Library) + composeLibrary(parent, null, "Library", (Library)resource, -1); + else if (resource instanceof Linkage) + composeLinkage(parent, null, "Linkage", (Linkage)resource, -1); + else if (resource instanceof ListResource) + composeListResource(parent, null, "ListResource", (ListResource)resource, -1); + else if (resource instanceof Location) + composeLocation(parent, null, "Location", (Location)resource, -1); + else if (resource instanceof Measure) + composeMeasure(parent, null, "Measure", (Measure)resource, -1); + else if (resource instanceof MeasureReport) + composeMeasureReport(parent, null, "MeasureReport", (MeasureReport)resource, -1); + else if (resource instanceof Media) + composeMedia(parent, null, "Media", (Media)resource, -1); + else if (resource instanceof Medication) + composeMedication(parent, null, "Medication", (Medication)resource, -1); + else if (resource instanceof MedicationAdministration) + composeMedicationAdministration(parent, null, "MedicationAdministration", (MedicationAdministration)resource, -1); + else if (resource instanceof MedicationDispense) + composeMedicationDispense(parent, null, "MedicationDispense", (MedicationDispense)resource, -1); + else if (resource instanceof MedicationRequest) + composeMedicationRequest(parent, null, "MedicationRequest", (MedicationRequest)resource, -1); + else if (resource instanceof MedicationStatement) + composeMedicationStatement(parent, null, "MedicationStatement", (MedicationStatement)resource, -1); + else if (resource instanceof MessageDefinition) + composeMessageDefinition(parent, null, "MessageDefinition", (MessageDefinition)resource, -1); + else if (resource instanceof MessageHeader) + composeMessageHeader(parent, null, "MessageHeader", (MessageHeader)resource, -1); + else if (resource instanceof NamingSystem) + composeNamingSystem(parent, null, "NamingSystem", (NamingSystem)resource, -1); + else if (resource instanceof NutritionOrder) + composeNutritionOrder(parent, null, "NutritionOrder", (NutritionOrder)resource, -1); + else if (resource instanceof Observation) + composeObservation(parent, null, "Observation", (Observation)resource, -1); + else if (resource instanceof OperationDefinition) + composeOperationDefinition(parent, null, "OperationDefinition", (OperationDefinition)resource, -1); + else if (resource instanceof OperationOutcome) + composeOperationOutcome(parent, null, "OperationOutcome", (OperationOutcome)resource, -1); + else if (resource instanceof Organization) + composeOrganization(parent, null, "Organization", (Organization)resource, -1); + else if (resource instanceof Patient) + composePatient(parent, null, "Patient", (Patient)resource, -1); + else if (resource instanceof PaymentNotice) + composePaymentNotice(parent, null, "PaymentNotice", (PaymentNotice)resource, -1); + else if (resource instanceof PaymentReconciliation) + composePaymentReconciliation(parent, null, "PaymentReconciliation", (PaymentReconciliation)resource, -1); + else if (resource instanceof Person) + composePerson(parent, null, "Person", (Person)resource, -1); + else if (resource instanceof PlanDefinition) + composePlanDefinition(parent, null, "PlanDefinition", (PlanDefinition)resource, -1); + else if (resource instanceof Practitioner) + composePractitioner(parent, null, "Practitioner", (Practitioner)resource, -1); + else if (resource instanceof PractitionerRole) + composePractitionerRole(parent, null, "PractitionerRole", (PractitionerRole)resource, -1); + else if (resource instanceof Procedure) + composeProcedure(parent, null, "Procedure", (Procedure)resource, -1); + else if (resource instanceof ProcedureRequest) + composeProcedureRequest(parent, null, "ProcedureRequest", (ProcedureRequest)resource, -1); + else if (resource instanceof ProcessRequest) + composeProcessRequest(parent, null, "ProcessRequest", (ProcessRequest)resource, -1); + else if (resource instanceof ProcessResponse) + composeProcessResponse(parent, null, "ProcessResponse", (ProcessResponse)resource, -1); + else if (resource instanceof Provenance) + composeProvenance(parent, null, "Provenance", (Provenance)resource, -1); + else if (resource instanceof Questionnaire) + composeQuestionnaire(parent, null, "Questionnaire", (Questionnaire)resource, -1); + else if (resource instanceof QuestionnaireResponse) + composeQuestionnaireResponse(parent, null, "QuestionnaireResponse", (QuestionnaireResponse)resource, -1); + else if (resource instanceof RelatedPerson) + composeRelatedPerson(parent, null, "RelatedPerson", (RelatedPerson)resource, -1); + else if (resource instanceof RequestGroup) + composeRequestGroup(parent, null, "RequestGroup", (RequestGroup)resource, -1); + else if (resource instanceof ResearchStudy) + composeResearchStudy(parent, null, "ResearchStudy", (ResearchStudy)resource, -1); + else if (resource instanceof ResearchSubject) + composeResearchSubject(parent, null, "ResearchSubject", (ResearchSubject)resource, -1); + else if (resource instanceof RiskAssessment) + composeRiskAssessment(parent, null, "RiskAssessment", (RiskAssessment)resource, -1); + else if (resource instanceof Schedule) + composeSchedule(parent, null, "Schedule", (Schedule)resource, -1); + else if (resource instanceof SearchParameter) + composeSearchParameter(parent, null, "SearchParameter", (SearchParameter)resource, -1); + else if (resource instanceof Sequence) + composeSequence(parent, null, "Sequence", (Sequence)resource, -1); + else if (resource instanceof ServiceDefinition) + composeServiceDefinition(parent, null, "ServiceDefinition", (ServiceDefinition)resource, -1); + else if (resource instanceof Slot) + composeSlot(parent, null, "Slot", (Slot)resource, -1); + else if (resource instanceof Specimen) + composeSpecimen(parent, null, "Specimen", (Specimen)resource, -1); + else if (resource instanceof SpecimenDefinition) + composeSpecimenDefinition(parent, null, "SpecimenDefinition", (SpecimenDefinition)resource, -1); + else if (resource instanceof StructureDefinition) + composeStructureDefinition(parent, null, "StructureDefinition", (StructureDefinition)resource, -1); + else if (resource instanceof StructureMap) + composeStructureMap(parent, null, "StructureMap", (StructureMap)resource, -1); + else if (resource instanceof Subscription) + composeSubscription(parent, null, "Subscription", (Subscription)resource, -1); + else if (resource instanceof Substance) + composeSubstance(parent, null, "Substance", (Substance)resource, -1); + else if (resource instanceof SupplyDelivery) + composeSupplyDelivery(parent, null, "SupplyDelivery", (SupplyDelivery)resource, -1); + else if (resource instanceof SupplyRequest) + composeSupplyRequest(parent, null, "SupplyRequest", (SupplyRequest)resource, -1); + else if (resource instanceof Task) + composeTask(parent, null, "Task", (Task)resource, -1); + else if (resource instanceof TestReport) + composeTestReport(parent, null, "TestReport", (TestReport)resource, -1); + else if (resource instanceof TestScript) + composeTestScript(parent, null, "TestScript", (TestScript)resource, -1); + else if (resource instanceof ValueSet) + composeValueSet(parent, null, "ValueSet", (ValueSet)resource, -1); + else if (resource instanceof VisionPrescription) + composeVisionPrescription(parent, null, "VisionPrescription", (VisionPrescription)resource, -1); + else + throw new Error("Unhandled resource type "+resource.getClass().getName()); + } + + protected void composeType(Complex parent, String parentType, String name, Type value, int index) { + if (value == null) + return; + else if (value instanceof DateType) + composeDate(parent, parentType, name, (DateType)value, index); + else if (value instanceof DateTimeType) + composeDateTime(parent, parentType, name, (DateTimeType)value, index); + else if (value instanceof CodeType) + composeCode(parent, parentType, name, (CodeType)value, index); + else if (value instanceof StringType) + composeString(parent, parentType, name, (StringType)value, index); + else if (value instanceof IntegerType) + composeInteger(parent, parentType, name, (IntegerType)value, index); + else if (value instanceof OidType) + composeOid(parent, parentType, name, (OidType)value, index); + else if (value instanceof UriType) + composeUri(parent, parentType, name, (UriType)value, index); + else if (value instanceof UuidType) + composeUuid(parent, parentType, name, (UuidType)value, index); + else if (value instanceof InstantType) + composeInstant(parent, parentType, name, (InstantType)value, index); + else if (value instanceof BooleanType) + composeBoolean(parent, parentType, name, (BooleanType)value, index); + else if (value instanceof Base64BinaryType) + composeBase64Binary(parent, parentType, name, (Base64BinaryType)value, index); + else if (value instanceof UnsignedIntType) + composeUnsignedInt(parent, parentType, name, (UnsignedIntType)value, index); + else if (value instanceof MarkdownType) + composeMarkdown(parent, parentType, name, (MarkdownType)value, index); + else if (value instanceof TimeType) + composeTime(parent, parentType, name, (TimeType)value, index); + else if (value instanceof IdType) + composeId(parent, parentType, name, (IdType)value, index); + else if (value instanceof PositiveIntType) + composePositiveInt(parent, parentType, name, (PositiveIntType)value, index); + else if (value instanceof DecimalType) + composeDecimal(parent, parentType, name, (DecimalType)value, index); + else if (value instanceof Extension) + composeExtension(parent, parentType, name, (Extension)value, index); + else if (value instanceof Narrative) + composeNarrative(parent, parentType, name, (Narrative)value, index); + else if (value instanceof Reference) + composeReference(parent, parentType, name, (Reference)value, index); + else if (value instanceof Quantity) + composeQuantity(parent, parentType, name, (Quantity)value, index); + else if (value instanceof Period) + composePeriod(parent, parentType, name, (Period)value, index); + else if (value instanceof Attachment) + composeAttachment(parent, parentType, name, (Attachment)value, index); + else if (value instanceof Duration) + composeDuration(parent, parentType, name, (Duration)value, index); + else if (value instanceof Count) + composeCount(parent, parentType, name, (Count)value, index); + else if (value instanceof Range) + composeRange(parent, parentType, name, (Range)value, index); + else if (value instanceof Annotation) + composeAnnotation(parent, parentType, name, (Annotation)value, index); + else if (value instanceof Money) + composeMoney(parent, parentType, name, (Money)value, index); + else if (value instanceof Identifier) + composeIdentifier(parent, parentType, name, (Identifier)value, index); + else if (value instanceof Coding) + composeCoding(parent, parentType, name, (Coding)value, index); + else if (value instanceof Signature) + composeSignature(parent, parentType, name, (Signature)value, index); + else if (value instanceof SampledData) + composeSampledData(parent, parentType, name, (SampledData)value, index); + else if (value instanceof Ratio) + composeRatio(parent, parentType, name, (Ratio)value, index); + else if (value instanceof Distance) + composeDistance(parent, parentType, name, (Distance)value, index); + else if (value instanceof Age) + composeAge(parent, parentType, name, (Age)value, index); + else if (value instanceof CodeableConcept) + composeCodeableConcept(parent, parentType, name, (CodeableConcept)value, index); + else if (value instanceof Meta) + composeMeta(parent, parentType, name, (Meta)value, index); + else if (value instanceof Address) + composeAddress(parent, parentType, name, (Address)value, index); + else if (value instanceof TriggerDefinition) + composeTriggerDefinition(parent, parentType, name, (TriggerDefinition)value, index); + else if (value instanceof Contributor) + composeContributor(parent, parentType, name, (Contributor)value, index); + else if (value instanceof DataRequirement) + composeDataRequirement(parent, parentType, name, (DataRequirement)value, index); + else if (value instanceof Dosage) + composeDosage(parent, parentType, name, (Dosage)value, index); + else if (value instanceof RelatedArtifact) + composeRelatedArtifact(parent, parentType, name, (RelatedArtifact)value, index); + else if (value instanceof ContactDetail) + composeContactDetail(parent, parentType, name, (ContactDetail)value, index); + else if (value instanceof HumanName) + composeHumanName(parent, parentType, name, (HumanName)value, index); + else if (value instanceof ContactPoint) + composeContactPoint(parent, parentType, name, (ContactPoint)value, index); + else if (value instanceof UsageContext) + composeUsageContext(parent, parentType, name, (UsageContext)value, index); + else if (value instanceof Timing) + composeTiming(parent, parentType, name, (Timing)value, index); + else if (value instanceof ElementDefinition) + composeElementDefinition(parent, parentType, name, (ElementDefinition)value, index); + else if (value instanceof ParameterDefinition) + composeParameterDefinition(parent, parentType, name, (ParameterDefinition)value, index); + else + throw new Error("Unhandled type"); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/XmlParser.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/XmlParser.java index 01b3fa27897..b20cb534c28 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/XmlParser.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/formats/XmlParser.java @@ -1,36995 +1,38466 @@ -package org.hl7.fhir.r4.formats; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 - -import org.hl7.fhir.r4.model.DateType; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.CodeType; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.IntegerType; -import org.hl7.fhir.r4.model.OidType; -import org.hl7.fhir.r4.model.UriType; -import org.hl7.fhir.r4.model.UuidType; -import org.hl7.fhir.r4.model.InstantType; -import org.hl7.fhir.r4.model.BooleanType; -import org.hl7.fhir.r4.model.Base64BinaryType; -import org.hl7.fhir.r4.model.UnsignedIntType; -import org.hl7.fhir.r4.model.MarkdownType; -import org.hl7.fhir.r4.model.TimeType; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.PositiveIntType; -import org.hl7.fhir.r4.model.DecimalType; -import org.hl7.fhir.r4.model.*; -import org.xmlpull.v1.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.exceptions.FHIRFormatError; -import org.hl7.fhir.exceptions.FHIRException; -import java.io.IOException; - -public class XmlParser extends XmlParserBase { - - public XmlParser() { - super(); - } - - public XmlParser(boolean allowUnknownContent) { - super(); - setAllowUnknownContent(allowUnknownContent); - } - - - protected boolean parseElementContent(int eventType, XmlPullParser xpp, Element res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extension")) - res.getExtension().add(parseExtension(xpp)); - else - return false; - - return true; - } - - protected boolean parseBackboneContent(int eventType, XmlPullParser xpp, BackboneElement res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) - res.getModifierExtension().add(parseExtension(xpp)); - else - return parseElementContent(eventType, xpp, res); - - return true; - } - - @SuppressWarnings("unchecked") - protected > Enumeration parseEnumeration(XmlPullParser xpp, E item, EnumFactory e) throws XmlPullParserException, IOException, FHIRFormatError { - Enumeration res = new Enumeration(e); - parseElementAttributes(xpp, res); - res.setValue((E) e.fromCode(xpp.getAttributeValue(null, "value"))); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected DateType parseDate(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DateType res = new DateType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected DateTimeType parseDateTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DateTimeType res = new DateTimeType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected CodeType parseCode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CodeType res = new CodeType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected StringType parseString(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - StringType res = new StringType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected IntegerType parseInteger(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - IntegerType res = new IntegerType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected OidType parseOid(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - OidType res = new OidType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected UriType parseUri(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - UriType res = new UriType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected UuidType parseUuid(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - UuidType res = new UuidType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected InstantType parseInstant(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - InstantType res = new InstantType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected BooleanType parseBoolean(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - BooleanType res = new BooleanType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected Base64BinaryType parseBase64Binary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Base64BinaryType res = new Base64BinaryType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected UnsignedIntType parseUnsignedInt(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - UnsignedIntType res = new UnsignedIntType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected MarkdownType parseMarkdown(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MarkdownType res = new MarkdownType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected TimeType parseTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - TimeType res = new TimeType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected IdType parseId(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - IdType res = new IdType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected PositiveIntType parsePositiveInt(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - PositiveIntType res = new PositiveIntType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected DecimalType parseDecimal(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DecimalType res = new DecimalType(xpp.getAttributeValue(null, "value")); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected Extension parseExtension(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Extension res = new Extension(); - parseElementAttributes(xpp, res); - if (xpp.getAttributeValue(null, "url") != null) - res.setUrl(xpp.getAttributeValue(null, "url")); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExtensionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExtensionContent(int eventType, XmlPullParser xpp, Extension res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Narrative parseNarrative(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Narrative res = new Narrative(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNarrativeContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNarrativeContent(int eventType, XmlPullParser xpp, Narrative res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Narrative.NarrativeStatus.NULL, new Narrative.NarrativeStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("div")) { - res.setDiv(parseXhtml(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Reference parseReference(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Reference res = new Reference(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseReferenceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseReferenceContent(int eventType, XmlPullParser xpp, Reference res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReferenceElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Quantity parseQuantity(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Quantity res = new Quantity(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuantityContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuantityContent(int eventType, XmlPullParser xpp, Quantity res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { - res.setComparatorElement(parseEnumeration(xpp, Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { - res.setUnitElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Period parsePeriod(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Period res = new Period(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePeriodContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePeriodContent(int eventType, XmlPullParser xpp, Period res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseDateTime(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Attachment parseAttachment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Attachment res = new Attachment(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAttachmentContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAttachmentContent(int eventType, XmlPullParser xpp, Attachment res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { - res.setContentTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { - res.setDataElement(parseBase64Binary(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("size")) { - res.setSizeElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hash")) { - res.setHashElement(parseBase64Binary(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("creation")) { - res.setCreationElement(parseDateTime(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Duration parseDuration(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Duration res = new Duration(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDurationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDurationContent(int eventType, XmlPullParser xpp, Duration res) throws XmlPullParserException, IOException, FHIRFormatError { - if (!parseQuantityContent(eventType, xpp, res)) - return false; - return true; - } - - protected Count parseCount(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Count res = new Count(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCountContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCountContent(int eventType, XmlPullParser xpp, Count res) throws XmlPullParserException, IOException, FHIRFormatError { - if (!parseQuantityContent(eventType, xpp, res)) - return false; - return true; - } - - protected Range parseRange(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Range res = new Range(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRangeContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRangeContent(int eventType, XmlPullParser xpp, Range res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("low")) { - res.setLow(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("high")) { - res.setHigh(parseSimpleQuantity(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Annotation parseAnnotation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Annotation res = new Annotation(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAnnotationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAnnotationContent(int eventType, XmlPullParser xpp, Annotation res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "author")) { - res.setAuthor(parseType("author", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { - res.setTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Money parseMoney(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Money res = new Money(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMoneyContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMoneyContent(int eventType, XmlPullParser xpp, Money res) throws XmlPullParserException, IOException, FHIRFormatError { - if (!parseQuantityContent(eventType, xpp, res)) - return false; - return true; - } - - protected Identifier parseIdentifier(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Identifier res = new Identifier(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseIdentifierContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseIdentifierContent(int eventType, XmlPullParser xpp, Identifier res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, Identifier.IdentifierUse.NULL, new Identifier.IdentifierUseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assigner")) { - res.setAssigner(parseReference(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Coding parseCoding(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Coding res = new Coding(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodingContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodingContent(int eventType, XmlPullParser xpp, Coding res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("userSelected")) { - res.setUserSelectedElement(parseBoolean(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Signature parseSignature(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Signature res = new Signature(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSignatureContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSignatureContent(int eventType, XmlPullParser xpp, Signature res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("when")) { - res.setWhenElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "who")) { - res.setWho(parseType("who", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onBehalfOf")) { - res.setOnBehalfOf(parseType("onBehalfOf", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { - res.setContentTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("blob")) { - res.setBlobElement(parseBase64Binary(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected SampledData parseSampledData(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - SampledData res = new SampledData(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSampledDataContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSampledDataContent(int eventType, XmlPullParser xpp, SampledData res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { - res.setOrigin(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriodElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lowerLimit")) { - res.setLowerLimitElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("upperLimit")) { - res.setUpperLimitElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dimensions")) { - res.setDimensionsElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { - res.setDataElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Ratio parseRatio(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Ratio res = new Ratio(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRatioContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRatioContent(int eventType, XmlPullParser xpp, Ratio res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numerator")) { - res.setNumerator(parseQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("denominator")) { - res.setDenominator(parseQuantity(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Distance parseDistance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Distance res = new Distance(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDistanceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDistanceContent(int eventType, XmlPullParser xpp, Distance res) throws XmlPullParserException, IOException, FHIRFormatError { - if (!parseQuantityContent(eventType, xpp, res)) - return false; - return true; - } - - protected Age parseAge(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Age res = new Age(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAgeContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAgeContent(int eventType, XmlPullParser xpp, Age res) throws XmlPullParserException, IOException, FHIRFormatError { - if (!parseQuantityContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeableConcept parseCodeableConcept(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CodeableConcept res = new CodeableConcept(); - parseTypeAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeableConceptContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeableConceptContent(int eventType, XmlPullParser xpp, CodeableConcept res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coding")) { - res.getCoding().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected SimpleQuantity parseSimpleQuantity(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - SimpleQuantity res = new SimpleQuantity(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSimpleQuantityContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSimpleQuantityContent(int eventType, XmlPullParser xpp, SimpleQuantity res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { - res.setComparatorElement(parseEnumeration(xpp, Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { - res.setUnitElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Meta parseMeta(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Meta res = new Meta(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMetaContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMetaContent(int eventType, XmlPullParser xpp, Meta res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { - res.setVersionIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastUpdated")) { - res.setLastUpdatedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.getProfile().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("security")) { - res.getSecurity().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tag")) { - res.getTag().add(parseCoding(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Address parseAddress(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Address res = new Address(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAddressContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAddressContent(int eventType, XmlPullParser xpp, Address res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, Address.AddressUse.NULL, new Address.AddressUseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Address.AddressType.NULL, new Address.AddressTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("line")) { - res.getLine().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("city")) { - res.setCityElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("district")) { - res.setDistrictElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("state")) { - res.setStateElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("postalCode")) { - res.setPostalCodeElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { - res.setCountryElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected TriggerDefinition parseTriggerDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - TriggerDefinition res = new TriggerDefinition(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTriggerDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTriggerDefinitionContent(int eventType, XmlPullParser xpp, TriggerDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, TriggerDefinition.TriggerType.NULL, new TriggerDefinition.TriggerTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventName")) { - res.setEventNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "eventTiming")) { - res.setEventTiming(parseType("eventTiming", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventData")) { - res.setEventData(parseDataRequirement(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventCondition")) { - res.setEventCondition(parseTriggerDefinitionTriggerDefinitionEventConditionComponent(xpp, res)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected TriggerDefinition.TriggerDefinitionEventConditionComponent parseTriggerDefinitionTriggerDefinitionEventConditionComponent(XmlPullParser xpp, TriggerDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - TriggerDefinition.TriggerDefinitionEventConditionComponent res = new TriggerDefinition.TriggerDefinitionEventConditionComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTriggerDefinitionTriggerDefinitionEventConditionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTriggerDefinitionTriggerDefinitionEventConditionComponentContent(int eventType, XmlPullParser xpp, TriggerDefinition owner, TriggerDefinition.TriggerDefinitionEventConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contributor parseContributor(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Contributor res = new Contributor(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContributorContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContributorContent(int eventType, XmlPullParser xpp, Contributor res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Contributor.ContributorType.NULL, new Contributor.ContributorTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected DataRequirement parseDataRequirement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DataRequirement res = new DataRequirement(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDataRequirementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDataRequirementContent(int eventType, XmlPullParser xpp, DataRequirement res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.getProfile().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mustSupport")) { - res.getMustSupport().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codeFilter")) { - res.getCodeFilter().add(parseDataRequirementDataRequirementCodeFilterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateFilter")) { - res.getDateFilter().add(parseDataRequirementDataRequirementDateFilterComponent(xpp, res)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementDataRequirementCodeFilterComponent(XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { - DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDataRequirementDataRequirementCodeFilterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDataRequirementDataRequirementCodeFilterComponentContent(int eventType, XmlPullParser xpp, DataRequirement owner, DataRequirement.DataRequirementCodeFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "valueSet")) { - res.setValueSet(parseType("valueSet", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueCode")) { - res.getValueCode().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueCoding")) { - res.getValueCoding().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueCodeableConcept")) { - res.getValueCodeableConcept().add(parseCodeableConcept(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDataRequirementDateFilterComponent(XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { - DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDataRequirementDataRequirementDateFilterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDataRequirementDataRequirementDateFilterComponentContent(int eventType, XmlPullParser xpp, DataRequirement owner, DataRequirement.DataRequirementDateFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Dosage parseDosage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Dosage res = new Dosage(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDosageContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDosageContent(int eventType, XmlPullParser xpp, Dosage res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalInstruction")) { - res.getAdditionalInstruction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientInstruction")) { - res.setPatientInstructionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timing")) { - res.setTiming(parseTiming(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "asNeeded")) { - res.setAsNeeded(parseType("asNeeded", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { - res.setSite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { - res.setRoute(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "dose")) { - res.setDose(parseType("dose", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerPeriod")) { - res.setMaxDosePerPeriod(parseRatio(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerAdministration")) { - res.setMaxDosePerAdministration(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerLifetime")) { - res.setMaxDosePerLifetime(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { - res.setRate(parseType("rate", xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected RelatedArtifact parseRelatedArtifact(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - RelatedArtifact res = new RelatedArtifact(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRelatedArtifactContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRelatedArtifactContent(int eventType, XmlPullParser xpp, RelatedArtifact res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, RelatedArtifact.RelatedArtifactType.NULL, new RelatedArtifact.RelatedArtifactTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("citation")) { - res.setCitationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("document")) { - res.setDocument(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseReference(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ContactDetail parseContactDetail(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ContactDetail res = new ContactDetail(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContactDetailContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContactDetailContent(int eventType, XmlPullParser xpp, ContactDetail res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected HumanName parseHumanName(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - HumanName res = new HumanName(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseHumanNameContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseHumanNameContent(int eventType, XmlPullParser xpp, HumanName res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, HumanName.NameUse.NULL, new HumanName.NameUseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("family")) { - res.setFamilyElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("given")) { - res.getGiven().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { - res.getPrefix().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suffix")) { - res.getSuffix().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ContactPoint parseContactPoint(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ContactPoint res = new ContactPoint(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContactPointContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContactPointContent(int eventType, XmlPullParser xpp, ContactPoint res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseEnumeration(xpp, ContactPoint.ContactPointSystem.NULL, new ContactPoint.ContactPointSystemEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, ContactPoint.ContactPointUse.NULL, new ContactPoint.ContactPointUseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { - res.setRankElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected UsageContext parseUsageContext(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - UsageContext res = new UsageContext(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseUsageContextContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseUsageContextContent(int eventType, XmlPullParser xpp, UsageContext res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Timing parseTiming(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Timing res = new Timing(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTimingContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTimingContent(int eventType, XmlPullParser xpp, Timing res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.getEvent().add(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeat")) { - res.setRepeat(parseTimingTimingRepeatComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected Timing.TimingRepeatComponent parseTimingTimingRepeatComponent(XmlPullParser xpp, Timing owner) throws XmlPullParserException, IOException, FHIRFormatError { - Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTimingTimingRepeatComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTimingTimingRepeatComponentContent(int eventType, XmlPullParser xpp, Timing owner, Timing.TimingRepeatComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "bounds")) { - res.setBounds(parseType("bounds", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { - res.setCountElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("countMax")) { - res.setCountMaxElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { - res.setDurationElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("durationMax")) { - res.setDurationMaxElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("durationUnit")) { - res.setDurationUnitElement(parseEnumeration(xpp, Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequency")) { - res.setFrequencyElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequencyMax")) { - res.setFrequencyMaxElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriodElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodMax")) { - res.setPeriodMaxElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodUnit")) { - res.setPeriodUnitElement(parseEnumeration(xpp, Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dayOfWeek")) { - res.getDayOfWeek().add(parseEnumeration(xpp, Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timeOfDay")) { - res.getTimeOfDay().add(parseTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("when")) { - res.getWhen().add(parseEnumeration(xpp, Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offset")) { - res.setOffsetElement(parseUnsignedInt(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition parseElementDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition res = new ElementDefinition(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionContent(int eventType, XmlPullParser xpp, ElementDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("representation")) { - res.getRepresentation().add(parseEnumeration(xpp, ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceName")) { - res.setSliceNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { - res.setLabelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("slicing")) { - res.setSlicing(parseElementDefinitionElementDefinitionSlicingComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("short")) { - res.setShortElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinitionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirements")) { - res.setRequirementsElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { - res.getAlias().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { - res.setBase(parseElementDefinitionElementDefinitionBaseComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentReference")) { - res.setContentReferenceElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseElementDefinitionTypeRefComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "defaultValue")) { - res.setDefaultValue(parseType("defaultValue", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaningWhenMissing")) { - res.setMeaningWhenMissingElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderMeaning")) { - res.setOrderMeaningElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "fixed")) { - res.setFixed(parseType("fixed", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "pattern")) { - res.setPattern(parseType("pattern", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("example")) { - res.getExample().add(parseElementDefinitionElementDefinitionExampleComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "minValue")) { - res.setMinValue(parseType("minValue", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "maxValue")) { - res.setMaxValue(parseType("maxValue", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxLength")) { - res.setMaxLengthElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.getCondition().add(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("constraint")) { - res.getConstraint().add(parseElementDefinitionElementDefinitionConstraintComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mustSupport")) { - res.setMustSupportElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isModifier")) { - res.setIsModifierElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isSummary")) { - res.setIsSummaryElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binding")) { - res.setBinding(parseElementDefinitionElementDefinitionBindingComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mapping")) { - res.getMapping().add(parseElementDefinitionElementDefinitionMappingComponent(xpp, res)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionElementDefinitionSlicingComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionSlicingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionSlicingComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("discriminator")) { - res.getDiscriminator().add(parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ordered")) { - res.setOrderedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rules")) { - res.setRulesElement(parseEnumeration(xpp, ElementDefinition.SlicingRules.NULL, new ElementDefinition.SlicingRulesEnumFactory())); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, ElementDefinition.DiscriminatorType.NULL, new ElementDefinition.DiscriminatorTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionBaseComponent parseElementDefinitionElementDefinitionBaseComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionBaseComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionBaseComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionBaseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.TypeRefComponent parseElementDefinitionTypeRefComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionTypeRefComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionTypeRefComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.TypeRefComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfileElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetProfile")) { - res.setTargetProfileElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("aggregation")) { - res.getAggregation().add(parseEnumeration(xpp, ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versioning")) { - res.setVersioningElement(parseEnumeration(xpp, ElementDefinition.ReferenceVersionRules.NULL, new ElementDefinition.ReferenceVersionRulesEnumFactory())); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionExampleComponent parseElementDefinitionElementDefinitionExampleComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionExampleComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionExampleComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionExampleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { - res.setLabelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionElementDefinitionConstraintComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionConstraintComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionConstraintComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionConstraintComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("key")) { - res.setKeyElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirements")) { - res.setRequirementsElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { - res.setSeverityElement(parseEnumeration(xpp, ElementDefinition.ConstraintSeverity.NULL, new ElementDefinition.ConstraintSeverityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("human")) { - res.setHumanElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpath")) { - res.setXpathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSourceElement(parseUri(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionElementDefinitionBindingComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionBindingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionBindingComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionBindingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { - res.setStrengthElement(parseEnumeration(xpp, Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "valueSet")) { - res.setValueSet(parseType("valueSet", xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionElementDefinitionMappingComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseElementDefinitionElementDefinitionMappingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseElementDefinitionElementDefinitionMappingComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionMappingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identity")) { - res.setIdentityElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("map")) { - res.setMapElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected ParameterDefinition parseParameterDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ParameterDefinition res = new ParameterDefinition(); - parseElementAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseParameterDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseParameterDefinitionContent(int eventType, XmlPullParser xpp, ParameterDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, ParameterDefinition.ParameterUse.NULL, new ParameterDefinition.ParameterUseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseReference(xpp)); - } else if (!parseElementContent(eventType, xpp, res)) - return false; - return true; - } - - protected void parseDomainResourceAttributes(XmlPullParser xpp, DomainResource res) throws XmlPullParserException, IOException, FHIRFormatError { - parseResourceAttributes(xpp, res); - } - - protected boolean parseDomainResourceContent(int eventType, XmlPullParser xpp, DomainResource res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setText(parseNarrative(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contained")) { - res.getContained().add(parseResourceContained(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extension")) { - res.getExtension().add(parseExtension(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) { - res.getModifierExtension().add(parseExtension(xpp)); - } else - return parseResourceContent(eventType, xpp, res); - return true; - } - - protected Parameters parseParameters(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Parameters res = new Parameters(); - parseResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseParametersContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseParametersContent(int eventType, XmlPullParser xpp, Parameters res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { - res.getParameter().add(parseParametersParametersParameterComponent(xpp, res)); - } else if (!parseResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Parameters.ParametersParameterComponent parseParametersParametersParameterComponent(XmlPullParser xpp, Parameters owner) throws XmlPullParserException, IOException, FHIRFormatError { - Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseParametersParametersParameterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseParametersParametersParameterComponentContent(int eventType, XmlPullParser xpp, Parameters owner, Parameters.ParametersParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseResourceContained(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { - res.getPart().add(parseParametersParametersParameterComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected void parseResourceAttributes(XmlPullParser xpp, Resource res) throws XmlPullParserException, IOException, FHIRFormatError { - if (!comments.isEmpty()) { - res.getFormatCommentsPre().addAll(comments); - comments.clear(); - } - } - - protected boolean parseResourceContent(int eventType, XmlPullParser xpp, Resource res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("id")) { - res.setIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meta")) { - res.setMeta(parseMeta(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implicitRules")) { - res.setImplicitRulesElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else - return false; - return true; - } - - protected Account parseAccount(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Account res = new Account(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAccountContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAccountContent(int eventType, XmlPullParser xpp, Account res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Account.AccountStatus.NULL, new Account.AccountStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActive(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("balance")) { - res.setBalance(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.getCoverage().add(parseAccountCoverageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { - res.setOwner(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("guarantor")) { - res.getGuarantor().add(parseAccountGuarantorComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Account.CoverageComponent parseAccountCoverageComponent(XmlPullParser xpp, Account owner) throws XmlPullParserException, IOException, FHIRFormatError { - Account.CoverageComponent res = new Account.CoverageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAccountCoverageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAccountCoverageComponentContent(int eventType, XmlPullParser xpp, Account owner, Account.CoverageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parsePositiveInt(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Account.GuarantorComponent parseAccountGuarantorComponent(XmlPullParser xpp, Account owner) throws XmlPullParserException, IOException, FHIRFormatError { - Account.GuarantorComponent res = new Account.GuarantorComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAccountGuarantorComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAccountGuarantorComponentContent(int eventType, XmlPullParser xpp, Account owner, Account.GuarantorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { - res.setParty(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onHold")) { - res.setOnHoldElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ActivityDefinition parseActivityDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ActivityDefinition res = new ActivityDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseActivityDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseActivityDefinitionContent(int eventType, XmlPullParser xpp, ActivityDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { - res.getContributor().add(parseContributor(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { - res.getLibrary().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, ActivityDefinition.ActivityDefinitionKind.NULL, new ActivityDefinition.ActivityDefinitionKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { - res.setTiming(parseType("timing", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseActivityDefinitionActivityDefinitionParticipantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { - res.setProduct(parseType("product", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { - res.getDosage().add(parseDosage(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.getBodySite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { - res.setTransform(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dynamicValue")) { - res.getDynamicValue().add(parseActivityDefinitionActivityDefinitionDynamicValueComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionActivityDefinitionParticipantComponent(XmlPullParser xpp, ActivityDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseActivityDefinitionActivityDefinitionParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseActivityDefinitionActivityDefinitionParticipantComponentContent(int eventType, XmlPullParser xpp, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, ActivityDefinition.ActivityParticipantType.NULL, new ActivityDefinition.ActivityParticipantTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionActivityDefinitionDynamicValueComponent(XmlPullParser xpp, ActivityDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseActivityDefinitionActivityDefinitionDynamicValueComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseActivityDefinitionActivityDefinitionDynamicValueComponentContent(int eventType, XmlPullParser xpp, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionDynamicValueComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AdverseEvent parseAdverseEvent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - AdverseEvent res = new AdverseEvent(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAdverseEventContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAdverseEventContent(int eventType, XmlPullParser xpp, AdverseEvent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actuality")) { - res.setActualityElement(parseEnumeration(xpp, AdverseEvent.AdverseEventActuality.NULL, new AdverseEvent.AdverseEventActualityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategoryElement(parseEnumeration(xpp, AdverseEvent.AdverseEventCategory.NULL, new AdverseEvent.AdverseEventCategoryEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.setEvent(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultingCondition")) { - res.getResultingCondition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("seriousness")) { - res.setSeriousness(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { - res.setSeverity(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { - res.setRecorder(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventParticipant")) { - res.setEventParticipant(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suspectEntity")) { - res.getSuspectEntity().add(parseAdverseEventAdverseEventSuspectEntityComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectMedicalHistory")) { - res.getSubjectMedicalHistory().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceDocument")) { - res.getReferenceDocument().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { - res.getStudy().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventAdverseEventSuspectEntityComponent(XmlPullParser xpp, AdverseEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAdverseEventAdverseEventSuspectEntityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAdverseEventAdverseEventSuspectEntityComponentContent(int eventType, XmlPullParser xpp, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { - res.setInstance(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("causality")) { - res.getCausality().add(parseAdverseEventAdverseEventSuspectEntityCausalityComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventAdverseEventSuspectEntityCausalityComponent(XmlPullParser xpp, AdverseEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAdverseEventAdverseEventSuspectEntityCausalityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAdverseEventAdverseEventSuspectEntityCausalityComponentContent(int eventType, XmlPullParser xpp, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessment")) { - res.setAssessment(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productRelatedness")) { - res.setProductRelatednessElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AllergyIntolerance parseAllergyIntolerance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - AllergyIntolerance res = new AllergyIntolerance(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAllergyIntoleranceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAllergyIntoleranceContent(int eventType, XmlPullParser xpp, AllergyIntolerance res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalStatus")) { - res.setClinicalStatusElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL, new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationStatus")) { - res.setVerificationStatusElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL, new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceType.NULL, new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criticality")) { - res.setCriticalityElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceCriticality.NULL, new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { - res.setOnset(parseType("onset", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assertedDate")) { - res.setAssertedDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { - res.setRecorder(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { - res.setAsserter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastOccurrence")) { - res.setLastOccurrenceElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reaction")) { - res.getReaction().add(parseAllergyIntoleranceAllergyIntoleranceReactionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceAllergyIntoleranceReactionComponent(XmlPullParser xpp, AllergyIntolerance owner) throws XmlPullParserException, IOException, FHIRFormatError { - AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAllergyIntoleranceAllergyIntoleranceReactionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAllergyIntoleranceAllergyIntoleranceReactionComponentContent(int eventType, XmlPullParser xpp, AllergyIntolerance owner, AllergyIntolerance.AllergyIntoleranceReactionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substance")) { - res.setSubstance(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manifestation")) { - res.getManifestation().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onset")) { - res.setOnsetElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { - res.setSeverityElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceSeverity.NULL, new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureRoute")) { - res.setExposureRoute(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Appointment parseAppointment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Appointment res = new Appointment(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAppointmentContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAppointmentContent(int eventType, XmlPullParser xpp, Appointment res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Appointment.AppointmentStatus.NULL, new Appointment.AppointmentStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { - res.setServiceCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { - res.getServiceType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { - res.getSpecialty().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentType")) { - res.setAppointmentType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("indication")) { - res.getIndication().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { - res.getSupportingInformation().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("minutesDuration")) { - res.setMinutesDurationElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("slot")) { - res.getSlot().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("incomingReferral")) { - res.getIncomingReferral().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseAppointmentAppointmentParticipantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestedPeriod")) { - res.getRequestedPeriod().add(parsePeriod(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Appointment.AppointmentParticipantComponent parseAppointmentAppointmentParticipantComponent(XmlPullParser xpp, Appointment owner) throws XmlPullParserException, IOException, FHIRFormatError { - Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAppointmentAppointmentParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAppointmentAppointmentParticipantComponentContent(int eventType, XmlPullParser xpp, Appointment owner, Appointment.AppointmentParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { - res.setRequiredElement(parseEnumeration(xpp, Appointment.ParticipantRequired.NULL, new Appointment.ParticipantRequiredEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Appointment.ParticipationStatus.NULL, new Appointment.ParticipationStatusEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AppointmentResponse parseAppointmentResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - AppointmentResponse res = new AppointmentResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAppointmentResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAppointmentResponseContent(int eventType, XmlPullParser xpp, AppointmentResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointment")) { - res.setAppointment(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantType")) { - res.getParticipantType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantStatus")) { - res.setParticipantStatusElement(parseEnumeration(xpp, AppointmentResponse.ParticipantStatus.NULL, new AppointmentResponse.ParticipantStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected AuditEvent parseAuditEvent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - AuditEvent res = new AuditEvent(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAuditEventContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAuditEventContent(int eventType, XmlPullParser xpp, AuditEvent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { - res.getSubtype().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.setActionElement(parseEnumeration(xpp, AuditEvent.AuditEventAction.NULL, new AuditEvent.AuditEventActionEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { - res.setRecordedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcomeElement(parseEnumeration(xpp, AuditEvent.AuditEventOutcome.NULL, new AuditEvent.AuditEventOutcomeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeDesc")) { - res.setOutcomeDescElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purposeOfEvent")) { - res.getPurposeOfEvent().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.getAgent().add(parseAuditEventAuditEventAgentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseAuditEventAuditEventSourceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { - res.getEntity().add(parseAuditEventAuditEventEntityComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected AuditEvent.AuditEventAgentComponent parseAuditEventAuditEventAgentComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAuditEventAuditEventAgentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAuditEventAuditEventAgentComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.getRole().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("userId")) { - res.setUserId(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("altId")) { - res.setAltIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestor")) { - res.setRequestorElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { - res.getPolicy().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("media")) { - res.setMedia(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { - res.setNetwork(parseAuditEventAuditEventAgentNetworkComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purposeOfUse")) { - res.getPurposeOfUse().add(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AuditEvent.AuditEventAgentNetworkComponent parseAuditEventAuditEventAgentNetworkComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AuditEvent.AuditEventAgentNetworkComponent res = new AuditEvent.AuditEventAgentNetworkComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAuditEventAuditEventAgentNetworkComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAuditEventAuditEventAgentNetworkComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventAgentNetworkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.setAddressElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, AuditEvent.AuditEventAgentNetworkType.NULL, new AuditEvent.AuditEventAgentNetworkTypeEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AuditEvent.AuditEventSourceComponent parseAuditEventAuditEventSourceComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAuditEventAuditEventSourceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAuditEventAuditEventSourceComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { - res.setSiteElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AuditEvent.AuditEventEntityComponent parseAuditEventAuditEventEntityComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAuditEventAuditEventEntityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAuditEventAuditEventEntityComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lifecycle")) { - res.setLifecycle(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { - res.getSecurityLabel().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("query")) { - res.setQueryElement(parseBase64Binary(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parseAuditEventAuditEventEntityDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventAuditEventEntityDetailComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { - AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseAuditEventAuditEventEntityDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseAuditEventAuditEventEntityDetailComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventEntityDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseBase64Binary(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Basic parseBasic(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Basic res = new Basic(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBasicContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBasicContent(int eventType, XmlPullParser xpp, Basic res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Binary parseBinary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Binary res = new Binary(); - parseResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBinaryContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBinaryContent(int eventType, XmlPullParser xpp, Binary res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { - res.setContentTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityContext")) { - res.setSecurityContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.setContentElement(parseBase64Binary(xpp)); - } else if (!parseResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected BodyStructure parseBodyStructure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - BodyStructure res = new BodyStructure(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBodyStructureContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBodyStructureContent(int eventType, XmlPullParser xpp, BodyStructure res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("morphology")) { - res.setMorphology(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("locationQualifier")) { - res.getLocationQualifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { - res.getImage().add(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Bundle parseBundle(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Bundle res = new Bundle(); - parseResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBundleContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBundleContent(int eventType, XmlPullParser xpp, Bundle res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Bundle.BundleType.NULL, new Bundle.BundleTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { - res.setTotalElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parseBundleBundleLinkComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { - res.getEntry().add(parseBundleBundleEntryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { - res.setSignature(parseSignature(xpp)); - } else if (!parseResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Bundle.BundleLinkComponent parseBundleBundleLinkComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { - Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBundleBundleLinkComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBundleBundleLinkComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relation")) { - res.setRelationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Bundle.BundleEntryComponent parseBundleBundleEntryComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { - Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBundleBundleEntryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBundleBundleEntryComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parseBundleBundleLinkComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fullUrl")) { - res.setFullUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseResourceContained(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("search")) { - res.setSearch(parseBundleBundleEntrySearchComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseBundleBundleEntryRequestComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponse(parseBundleBundleEntryResponseComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Bundle.BundleEntrySearchComponent parseBundleBundleEntrySearchComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { - Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBundleBundleEntrySearchComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBundleBundleEntrySearchComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntrySearchComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, Bundle.SearchEntryMode.NULL, new Bundle.SearchEntryModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { - res.setScoreElement(parseDecimal(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Bundle.BundleEntryRequestComponent parseBundleBundleEntryRequestComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { - Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBundleBundleEntryRequestComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBundleBundleEntryRequestComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntryRequestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethodElement(parseEnumeration(xpp, Bundle.HTTPVerb.NULL, new Bundle.HTTPVerbEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifNoneMatch")) { - res.setIfNoneMatchElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifModifiedSince")) { - res.setIfModifiedSinceElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifMatch")) { - res.setIfMatchElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifNoneExist")) { - res.setIfNoneExistElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Bundle.BundleEntryResponseComponent parseBundleBundleEntryResponseComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { - Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseBundleBundleEntryResponseComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseBundleBundleEntryResponseComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntryResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocationElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("etag")) { - res.setEtagElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastModified")) { - res.setLastModifiedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseResourceContained(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement parseCapabilityStatement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement res = new CapabilityStatement(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementContent(int eventType, XmlPullParser xpp, CapabilityStatement res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, CapabilityStatement.CapabilityStatementKind.NULL, new CapabilityStatement.CapabilityStatementKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiates")) { - res.getInstantiates().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { - res.setSoftware(parseCapabilityStatementCapabilityStatementSoftwareComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementation")) { - res.setImplementation(parseCapabilityStatementCapabilityStatementImplementationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { - res.setFhirVersionElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("acceptUnknown")) { - res.setAcceptUnknownElement(parseEnumeration(xpp, CapabilityStatement.UnknownContentCode.NULL, new CapabilityStatement.UnknownContentCodeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { - res.getFormat().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patchFormat")) { - res.getPatchFormat().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementationGuide")) { - res.getImplementationGuide().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.getProfile().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rest")) { - res.getRest().add(parseCapabilityStatementCapabilityStatementRestComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("messaging")) { - res.getMessaging().add(parseCapabilityStatementCapabilityStatementMessagingComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("document")) { - res.getDocument().add(parseCapabilityStatementCapabilityStatementDocumentComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementCapabilityStatementSoftwareComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementSoftwareComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementSoftwareComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementSoftwareComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("releaseDate")) { - res.setReleaseDateElement(parseDateTime(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementImplementationComponent parseCapabilityStatementCapabilityStatementImplementationComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementImplementationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementImplementationComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementImplementationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementCapabilityStatementRestComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementRestComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementRestComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, CapabilityStatement.RestfulCapabilityMode.NULL, new CapabilityStatement.RestfulCapabilityModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("security")) { - res.setSecurity(parseCapabilityStatementCapabilityStatementRestSecurityComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.getResource().add(parseCapabilityStatementCapabilityStatementRestResourceComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { - res.getInteraction().add(parseCapabilityStatementSystemInteractionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { - res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.getOperation().add(parseCapabilityStatementCapabilityStatementRestOperationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compartment")) { - res.getCompartment().add(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementCapabilityStatementRestSecurityComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementRestSecurityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementRestSecurityComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cors")) { - res.setCorsElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.getService().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("certificate")) { - res.getCertificate().add(parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res = new CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("blob")) { - res.setBlobElement(parseBase64Binary(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementCapabilityStatementRestResourceComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementRestResourceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementRestResourceComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { - res.getInteraction().add(parseCapabilityStatementResourceInteractionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versioning")) { - res.setVersioningElement(parseEnumeration(xpp, CapabilityStatement.ResourceVersionPolicy.NULL, new CapabilityStatement.ResourceVersionPolicyEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readHistory")) { - res.setReadHistoryElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("updateCreate")) { - res.setUpdateCreateElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalCreate")) { - res.setConditionalCreateElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalRead")) { - res.setConditionalReadElement(parseEnumeration(xpp, CapabilityStatement.ConditionalReadStatus.NULL, new CapabilityStatement.ConditionalReadStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalUpdate")) { - res.setConditionalUpdateElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalDelete")) { - res.setConditionalDeleteElement(parseEnumeration(xpp, CapabilityStatement.ConditionalDeleteStatus.NULL, new CapabilityStatement.ConditionalDeleteStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referencePolicy")) { - res.getReferencePolicy().add(parseEnumeration(xpp, CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchInclude")) { - res.getSearchInclude().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchRevInclude")) { - res.getSearchRevInclude().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { - res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementResourceInteractionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementResourceInteractionComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.ResourceInteractionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, CapabilityStatement.TypeRestfulInteraction.NULL, new CapabilityStatement.TypeRestfulInteractionEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinitionElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.SystemInteractionComponent parseCapabilityStatementSystemInteractionComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementSystemInteractionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementSystemInteractionComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.SystemInteractionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, CapabilityStatement.SystemRestfulInteraction.NULL, new CapabilityStatement.SystemRestfulInteractionEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementRestOperationComponent parseCapabilityStatementCapabilityStatementRestOperationComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementRestOperationComponent res = new CapabilityStatement.CapabilityStatementRestOperationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementRestOperationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementRestOperationComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinition(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementMessagingComponent parseCapabilityStatementCapabilityStatementMessagingComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementMessagingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementMessagingComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reliableCache")) { - res.setReliableCacheElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportedMessage")) { - res.getSupportedMessage().add(parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.getEvent().add(parseCapabilityStatementCapabilityStatementMessagingEventComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementMessagingEndpointComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementMessagingEndpointComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEndpointComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { - res.setProtocol(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.setAddressElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinition(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementMessagingEventComponent parseCapabilityStatementCapabilityStatementMessagingEventComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementMessagingEventComponent res = new CapabilityStatement.CapabilityStatementMessagingEventComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementMessagingEventComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementMessagingEventComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEventComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategoryElement(parseEnumeration(xpp, CapabilityStatement.MessageSignificanceCategory.NULL, new CapabilityStatement.MessageSignificanceCategoryEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { - res.setFocusElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponse(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CapabilityStatement.CapabilityStatementDocumentComponent parseCapabilityStatementCapabilityStatementDocumentComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { - CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCapabilityStatementCapabilityStatementDocumentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCapabilityStatementCapabilityStatementDocumentComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementDocumentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, CapabilityStatement.DocumentMode.NULL, new CapabilityStatement.DocumentModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CarePlan parseCarePlan(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CarePlan res = new CarePlan(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCarePlanContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCarePlanContent(int eventType, XmlPullParser xpp, CarePlan res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { - res.getReplaces().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, CarePlan.CarePlanStatus.NULL, new CarePlan.CarePlanStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { - res.setIntentElement(parseEnumeration(xpp, CarePlan.CarePlanIntent.NULL, new CarePlan.CarePlanIntentEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.getAuthor().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { - res.getCareTeam().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { - res.getAddresses().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { - res.getSupportingInfo().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { - res.getGoal().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activity")) { - res.getActivity().add(parseCarePlanCarePlanActivityComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected CarePlan.CarePlanActivityComponent parseCarePlanCarePlanActivityComponent(XmlPullParser xpp, CarePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { - CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCarePlanCarePlanActivityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCarePlanCarePlanActivityComponentContent(int eventType, XmlPullParser xpp, CarePlan owner, CarePlan.CarePlanActivityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeCodeableConcept")) { - res.getOutcomeCodeableConcept().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeReference")) { - res.getOutcomeReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("progress")) { - res.getProgress().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.setDetail(parseCarePlanCarePlanActivityDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CarePlan.CarePlanActivityDetailComponent parseCarePlanCarePlanActivityDetailComponent(XmlPullParser xpp, CarePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { - CarePlan.CarePlanActivityDetailComponent res = new CarePlan.CarePlanActivityDetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCarePlanCarePlanActivityDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCarePlanCarePlanActivityDetailComponentContent(int eventType, XmlPullParser xpp, CarePlan owner, CarePlan.CarePlanActivityDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinition(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { - res.getGoal().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, CarePlan.CarePlanActivityStatus.NULL, new CarePlan.CarePlanActivityStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { - res.setStatusReasonElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prohibited")) { - res.setProhibitedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "scheduled")) { - res.setScheduled(parseType("scheduled", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { - res.setProduct(parseType("product", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dailyAmount")) { - res.setDailyAmount(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CareTeam parseCareTeam(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CareTeam res = new CareTeam(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCareTeamContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCareTeamContent(int eventType, XmlPullParser xpp, CareTeam res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, CareTeam.CareTeamStatus.NULL, new CareTeam.CareTeamStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseCareTeamCareTeamParticipantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { - res.getManagingOrganization().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected CareTeam.CareTeamParticipantComponent parseCareTeamCareTeamParticipantComponent(XmlPullParser xpp, CareTeam owner) throws XmlPullParserException, IOException, FHIRFormatError { - CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCareTeamCareTeamParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCareTeamCareTeamParticipantComponentContent(int eventType, XmlPullParser xpp, CareTeam owner, CareTeam.CareTeamParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("member")) { - res.setMember(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ChargeItem parseChargeItem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ChargeItem res = new ChargeItem(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseChargeItemContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseChargeItemContent(int eventType, XmlPullParser xpp, ChargeItem res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ChargeItem.ChargeItemStatus.NULL, new ChargeItem.ChargeItemStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseChargeItemChargeItemParticipantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performingOrganization")) { - res.setPerformingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestingOrganization")) { - res.setRequestingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodysite")) { - res.getBodysite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factorOverride")) { - res.setFactorOverrideElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priceOverride")) { - res.setPriceOverride(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overrideReason")) { - res.setOverrideReasonElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { - res.setEnterer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enteredDate")) { - res.setEnteredDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.getService().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { - res.getAccount().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { - res.getSupportingInformation().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ChargeItem.ChargeItemParticipantComponent parseChargeItemChargeItemParticipantComponent(XmlPullParser xpp, ChargeItem owner) throws XmlPullParserException, IOException, FHIRFormatError { - ChargeItem.ChargeItemParticipantComponent res = new ChargeItem.ChargeItemParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseChargeItemChargeItemParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseChargeItemChargeItemParticipantComponentContent(int eventType, XmlPullParser xpp, ChargeItem owner, ChargeItem.ChargeItemParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim parseClaim(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Claim res = new Claim(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimContent(int eventType, XmlPullParser xpp, Claim res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Claim.ClaimStatus.NULL, new Claim.ClaimStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { - res.getSubType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, Claim.Use.NULL, new Claim.UseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("billablePeriod")) { - res.setBillablePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { - res.setEnterer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { - res.setInsurer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriority(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundsReserve")) { - res.setFundsReserve(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { - res.getRelated().add(parseClaimRelatedClaimComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescription")) { - res.setPrescription(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("originalPrescription")) { - res.setOriginalPrescription(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { - res.setPayee(parseClaimPayeeComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referral")) { - res.setReferral(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { - res.setFacility(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { - res.getCareTeam().add(parseClaimCareTeamComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("information")) { - res.getInformation().add(parseClaimSpecialConditionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { - res.getDiagnosis().add(parseClaimDiagnosisComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { - res.getProcedure().add(parseClaimProcedureComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { - res.getInsurance().add(parseClaimInsuranceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accident")) { - res.setAccident(parseClaimAccidentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("employmentImpacted")) { - res.setEmploymentImpacted(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { - res.setHospitalization(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseClaimItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { - res.setTotal(parseMoney(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimRelatedClaimComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimRelatedClaimComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.RelatedClaimComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { - res.setClaim(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationship(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseIdentifier(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.PayeeComponent parseClaimPayeeComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.PayeeComponent res = new Claim.PayeeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimPayeeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimPayeeComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.PayeeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { - res.setParty(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.CareTeamComponent parseClaimCareTeamComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.CareTeamComponent res = new Claim.CareTeamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimCareTeamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimCareTeamComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.CareTeamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { - res.setResponsibleElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { - res.setQualification(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.SpecialConditionComponent parseClaimSpecialConditionComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.SpecialConditionComponent res = new Claim.SpecialConditionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimSpecialConditionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimSpecialConditionComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.SpecialConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { - res.setTiming(parseType("timing", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.DiagnosisComponent parseClaimDiagnosisComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.DiagnosisComponent res = new Claim.DiagnosisComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimDiagnosisComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimDiagnosisComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { - res.setDiagnosis(parseType("diagnosis", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageCode")) { - res.setPackageCode(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.ProcedureComponent parseClaimProcedureComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.ProcedureComponent res = new Claim.ProcedureComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimProcedureComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimProcedureComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.ProcedureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "procedure")) { - res.setProcedure(parseType("procedure", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.InsuranceComponent parseClaimInsuranceComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.InsuranceComponent res = new Claim.InsuranceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimInsuranceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimInsuranceComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { - res.setFocalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { - res.setBusinessArrangementElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { - res.getPreAuthRef().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { - res.setClaimResponse(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.AccidentComponent parseClaimAccidentComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.AccidentComponent res = new Claim.AccidentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimAccidentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimAccidentComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.AccidentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { - res.setLocation(parseType("location", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.ItemComponent parseClaimItemComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.ItemComponent res = new Claim.ItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimItemComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeamLinkId")) { - res.getCareTeamLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosisLinkId")) { - res.getDiagnosisLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureLinkId")) { - res.getProcedureLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationLinkId")) { - res.getInformationLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { - res.setRevenue(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { - res.getProgramCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { - res.setServiced(parseType("serviced", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { - res.setLocation(parseType("location", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.getUdi().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { - res.getSubSite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.getEncounter().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parseClaimDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.DetailComponent parseClaimDetailComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.DetailComponent res = new Claim.DetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimDetailComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.DetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { - res.setRevenue(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { - res.getProgramCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.getUdi().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { - res.getSubDetail().add(parseClaimSubDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Claim.SubDetailComponent parseClaimSubDetailComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { - Claim.SubDetailComponent res = new Claim.SubDetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimSubDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimSubDetailComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { - res.setRevenue(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { - res.getProgramCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.getUdi().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse parseClaimResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse res = new ClaimResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseContent(int eventType, XmlPullParser xpp, ClaimResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ClaimResponse.ClaimResponseStatus.NULL, new ClaimResponse.ClaimResponseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { - res.setInsurer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { - res.setRequestProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { - res.setRequestOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { - res.setDispositionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payeeType")) { - res.setPayeeType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseClaimResponseItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addItem")) { - res.getAddItem().add(parseClaimResponseAddedItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { - res.getError().add(parseClaimResponseErrorComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalCost")) { - res.setTotalCost(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unallocDeductable")) { - res.setUnallocDeductable(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalBenefit")) { - res.setTotalBenefit(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { - res.setPayment(parseClaimResponsePaymentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reserved")) { - res.setReserved(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { - res.setForm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { - res.getProcessNote().add(parseClaimResponseNoteComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationRequest")) { - res.getCommunicationRequest().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { - res.getInsurance().add(parseClaimResponseInsuranceComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseItemComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.setSequenceLinkIdElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parseClaimResponseItemDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseAdjudicationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseAdjudicationComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.AdjudicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseDecimal(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseItemDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseItemDetailComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.ItemDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.setSequenceLinkIdElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { - res.getSubDetail().add(parseClaimResponseSubDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseSubDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseSubDetailComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.setSequenceLinkIdElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseAddedItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseAddedItemComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.AddedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.getSequenceLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequenceLinkId")) { - res.getDetailSequenceLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequenceLinkId")) { - res.getSubdetailSequenceLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fee")) { - res.setFee(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.ErrorComponent parseClaimResponseErrorComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseErrorComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseErrorComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.ErrorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.setSequenceLinkIdElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequenceLinkId")) { - res.setDetailSequenceLinkIdElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequenceLinkId")) { - res.setSubdetailSequenceLinkIdElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.PaymentComponent parseClaimResponsePaymentComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponsePaymentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponsePaymentComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.PaymentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustment")) { - res.setAdjustment(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustmentReason")) { - res.setAdjustmentReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.NoteComponent parseClaimResponseNoteComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseNoteComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseNoteComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.NoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { - res.setNumberElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguage(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClaimResponseInsuranceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClaimResponseInsuranceComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { - res.setFocalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { - res.setBusinessArrangementElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { - res.getPreAuthRef().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { - res.setClaimResponse(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClinicalImpression parseClinicalImpression(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ClinicalImpression res = new ClinicalImpression(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClinicalImpressionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClinicalImpressionContent(int eventType, XmlPullParser xpp, ClinicalImpression res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ClinicalImpression.ClinicalImpressionStatus.NULL, new ClinicalImpression.ClinicalImpressionStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { - res.setEffective(parseType("effective", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessor")) { - res.setAssessor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("previous")) { - res.setPrevious(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("problem")) { - res.getProblem().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("investigation")) { - res.getInvestigation().add(parseClinicalImpressionClinicalImpressionInvestigationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { - res.getProtocol().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("summary")) { - res.setSummaryElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("finding")) { - res.getFinding().add(parseClinicalImpressionClinicalImpressionFindingComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prognosisCodeableConcept")) { - res.getPrognosisCodeableConcept().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prognosisReference")) { - res.getPrognosisReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClinicalImpression.ClinicalImpressionInvestigationComponent parseClinicalImpressionClinicalImpressionInvestigationComponent(XmlPullParser xpp, ClinicalImpression owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClinicalImpression.ClinicalImpressionInvestigationComponent res = new ClinicalImpression.ClinicalImpressionInvestigationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClinicalImpressionClinicalImpressionInvestigationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClinicalImpressionClinicalImpressionInvestigationComponentContent(int eventType, XmlPullParser xpp, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionInvestigationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionClinicalImpressionFindingComponent(XmlPullParser xpp, ClinicalImpression owner) throws XmlPullParserException, IOException, FHIRFormatError { - ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseClinicalImpressionClinicalImpressionFindingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseClinicalImpressionClinicalImpressionFindingComponentContent(int eventType, XmlPullParser xpp, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionFindingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { - res.setItem(parseType("item", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basis")) { - res.setBasisElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeSystem parseCodeSystem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CodeSystem res = new CodeSystem(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeSystemContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeSystemContent(int eventType, XmlPullParser xpp, CodeSystem res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("caseSensitive")) { - res.setCaseSensitiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { - res.setValueSetElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hierarchyMeaning")) { - res.setHierarchyMeaningElement(parseEnumeration(xpp, CodeSystem.CodeSystemHierarchyMeaning.NULL, new CodeSystem.CodeSystemHierarchyMeaningEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositional")) { - res.setCompositionalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionNeeded")) { - res.setVersionNeededElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.setContentElement(parseEnumeration(xpp, CodeSystem.CodeSystemContentMode.NULL, new CodeSystem.CodeSystemContentModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { - res.setCountElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { - res.getFilter().add(parseCodeSystemCodeSystemFilterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { - res.getProperty().add(parseCodeSystemPropertyComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { - res.getConcept().add(parseCodeSystemConceptDefinitionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeSystem.CodeSystemFilterComponent parseCodeSystemCodeSystemFilterComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { - CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeSystemCodeSystemFilterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeSystemCodeSystemFilterComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.CodeSystemFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { - res.getOperator().add(parseEnumeration(xpp, CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeSystem.PropertyComponent parseCodeSystemPropertyComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { - CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeSystemPropertyComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeSystemPropertyComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.PropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { - res.setUriElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, CodeSystem.PropertyType.NULL, new CodeSystem.PropertyTypeEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeSystem.ConceptDefinitionComponent parseCodeSystemConceptDefinitionComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { - CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeSystemConceptDefinitionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeSystemConceptDefinitionComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.ConceptDefinitionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinitionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { - res.getDesignation().add(parseCodeSystemConceptDefinitionDesignationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { - res.getProperty().add(parseCodeSystemConceptPropertyComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { - res.getConcept().add(parseCodeSystemConceptDefinitionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { - CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeSystemConceptDefinitionDesignationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeSystemConceptDefinitionDesignationComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.ConceptDefinitionDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUse(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { - CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCodeSystemConceptPropertyComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCodeSystemConceptPropertyComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.ConceptPropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Communication parseCommunication(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Communication res = new Communication(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCommunicationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCommunicationContent(int eventType, XmlPullParser xpp, Communication res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inResponseTo")) { - res.getInResponseTo().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Communication.CommunicationStatus.NULL, new Communication.CommunicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDone")) { - res.setNotDoneElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDoneReason")) { - res.setNotDoneReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, Communication.CommunicationPriority.NULL, new Communication.CommunicationPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medium")) { - res.getMedium().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { - res.getRecipient().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sent")) { - res.setSentElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("received")) { - res.setReceivedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { - res.setSender(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { - res.getPayload().add(parseCommunicationCommunicationPayloadComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Communication.CommunicationPayloadComponent parseCommunicationCommunicationPayloadComponent(XmlPullParser xpp, Communication owner) throws XmlPullParserException, IOException, FHIRFormatError { - Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCommunicationCommunicationPayloadComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCommunicationCommunicationPayloadComponentContent(int eventType, XmlPullParser xpp, Communication owner, Communication.CommunicationPayloadComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { - res.setContent(parseType("content", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CommunicationRequest parseCommunicationRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CommunicationRequest res = new CommunicationRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCommunicationRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCommunicationRequestContent(int eventType, XmlPullParser xpp, CommunicationRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { - res.getReplaces().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { - res.setGroupIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, CommunicationRequest.CommunicationRequestStatus.NULL, new CommunicationRequest.CommunicationRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, CommunicationRequest.CommunicationPriority.NULL, new CommunicationRequest.CommunicationPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medium")) { - res.getMedium().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { - res.getRecipient().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { - res.getPayload().add(parseCommunicationRequestCommunicationRequestPayloadComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { - res.setSender(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { - res.setRequester(parseCommunicationRequestCommunicationRequestRequesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestCommunicationRequestPayloadComponent(XmlPullParser xpp, CommunicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCommunicationRequestCommunicationRequestPayloadComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCommunicationRequestCommunicationRequestPayloadComponentContent(int eventType, XmlPullParser xpp, CommunicationRequest owner, CommunicationRequest.CommunicationRequestPayloadComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { - res.setContent(parseType("content", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CommunicationRequest.CommunicationRequestRequesterComponent parseCommunicationRequestCommunicationRequestRequesterComponent(XmlPullParser xpp, CommunicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - CommunicationRequest.CommunicationRequestRequesterComponent res = new CommunicationRequest.CommunicationRequestRequesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCommunicationRequestCommunicationRequestRequesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCommunicationRequestCommunicationRequestRequesterComponentContent(int eventType, XmlPullParser xpp, CommunicationRequest owner, CommunicationRequest.CommunicationRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.setAgent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected CompartmentDefinition parseCompartmentDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - CompartmentDefinition res = new CompartmentDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompartmentDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompartmentDefinitionContent(int eventType, XmlPullParser xpp, CompartmentDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, CompartmentDefinition.CompartmentType.NULL, new CompartmentDefinition.CompartmentTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("search")) { - res.setSearchElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.getResource().add(parseCompartmentDefinitionCompartmentDefinitionResourceComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionCompartmentDefinitionResourceComponent(XmlPullParser xpp, CompartmentDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompartmentDefinitionCompartmentDefinitionResourceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompartmentDefinitionCompartmentDefinitionResourceComponentContent(int eventType, XmlPullParser xpp, CompartmentDefinition owner, CompartmentDefinition.CompartmentDefinitionResourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { - res.getParam().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Composition parseComposition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Composition res = new Composition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompositionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompositionContent(int eventType, XmlPullParser xpp, Composition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Composition.CompositionStatus.NULL, new Composition.CompositionStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.setClass_(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.getAuthor().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("confidentiality")) { - res.setConfidentialityElement(parseEnumeration(xpp, Composition.DocumentConfidentiality.NULL, new Composition.DocumentConfidentialityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attester")) { - res.getAttester().add(parseCompositionCompositionAttesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { - res.setCustodian(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatesTo")) { - res.getRelatesTo().add(parseCompositionCompositionRelatesToComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.getEvent().add(parseCompositionCompositionEventComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("section")) { - res.getSection().add(parseCompositionSectionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Composition.CompositionAttesterComponent parseCompositionCompositionAttesterComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { - Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompositionCompositionAttesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompositionCompositionAttesterComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.CompositionAttesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.getMode().add(parseEnumeration(xpp, Composition.CompositionAttestationMode.NULL, new Composition.CompositionAttestationModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { - res.setTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { - res.setParty(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Composition.CompositionRelatesToComponent parseCompositionCompositionRelatesToComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { - Composition.CompositionRelatesToComponent res = new Composition.CompositionRelatesToComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompositionCompositionRelatesToComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompositionCompositionRelatesToComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.CompositionRelatesToComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, Composition.DocumentRelationshipType.NULL, new Composition.DocumentRelationshipTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "target")) { - res.setTarget(parseType("target", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Composition.CompositionEventComponent parseCompositionCompositionEventComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { - Composition.CompositionEventComponent res = new Composition.CompositionEventComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompositionCompositionEventComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompositionCompositionEventComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.CompositionEventComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Composition.SectionComponent parseCompositionSectionComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { - Composition.SectionComponent res = new Composition.SectionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCompositionSectionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCompositionSectionComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.SectionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setText(parseNarrative(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, Composition.SectionMode.NULL, new Composition.SectionModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedBy")) { - res.setOrderedBy(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { - res.getEntry().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("emptyReason")) { - res.setEmptyReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("section")) { - res.getSection().add(parseCompositionSectionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ConceptMap parseConceptMap(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ConceptMap res = new ConceptMap(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConceptMapContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConceptMapContent(int eventType, XmlPullParser xpp, ConceptMap res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { - res.setSource(parseType("source", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "target")) { - res.setTarget(parseType("target", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { - res.getGroup().add(parseConceptMapConceptMapGroupComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ConceptMap.ConceptMapGroupComponent parseConceptMapConceptMapGroupComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConceptMapConceptMapGroupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConceptMapConceptMapGroupComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.ConceptMapGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSourceElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceVersion")) { - res.setSourceVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTargetElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetVersion")) { - res.setTargetVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { - res.getElement().add(parseConceptMapSourceElementComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unmapped")) { - res.setUnmapped(parseConceptMapConceptMapGroupUnmappedComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConceptMapSourceElementComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConceptMapSourceElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.SourceElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.getTarget().add(parseConceptMapTargetElementComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConceptMapTargetElementComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConceptMapTargetElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.TargetElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("equivalence")) { - res.setEquivalenceElement(parseEnumeration(xpp, Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependsOn")) { - res.getDependsOn().add(parseConceptMapOtherElementComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("product")) { - res.getProduct().add(parseConceptMapOtherElementComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConceptMapOtherElementComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConceptMapOtherElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.OtherElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { - res.setPropertyElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapConceptMapGroupUnmappedComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConceptMapConceptMapGroupUnmappedComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConceptMapConceptMapGroupUnmappedComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.ConceptMapGroupUnmappedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, ConceptMap.ConceptMapGroupUnmappedMode.NULL, new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Condition parseCondition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Condition res = new Condition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConditionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConditionContent(int eventType, XmlPullParser xpp, Condition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalStatus")) { - res.setClinicalStatusElement(parseEnumeration(xpp, Condition.ConditionClinicalStatus.NULL, new Condition.ConditionClinicalStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationStatus")) { - res.setVerificationStatusElement(parseEnumeration(xpp, Condition.ConditionVerificationStatus.NULL, new Condition.ConditionVerificationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { - res.setSeverity(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.getBodySite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { - res.setOnset(parseType("onset", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "abatement")) { - res.setAbatement(parseType("abatement", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assertedDate")) { - res.setAssertedDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { - res.setAsserter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stage")) { - res.getStage().add(parseConditionConditionStageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evidence")) { - res.getEvidence().add(parseConditionConditionEvidenceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Condition.ConditionStageComponent parseConditionConditionStageComponent(XmlPullParser xpp, Condition owner) throws XmlPullParserException, IOException, FHIRFormatError { - Condition.ConditionStageComponent res = new Condition.ConditionStageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConditionConditionStageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConditionConditionStageComponentContent(int eventType, XmlPullParser xpp, Condition owner, Condition.ConditionStageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("summary")) { - res.setSummary(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessment")) { - res.getAssessment().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Condition.ConditionEvidenceComponent parseConditionConditionEvidenceComponent(XmlPullParser xpp, Condition owner) throws XmlPullParserException, IOException, FHIRFormatError { - Condition.ConditionEvidenceComponent res = new Condition.ConditionEvidenceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConditionConditionEvidenceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConditionConditionEvidenceComponentContent(int eventType, XmlPullParser xpp, Condition owner, Condition.ConditionEvidenceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Consent parseConsent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Consent res = new Consent(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConsentContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConsentContent(int eventType, XmlPullParser xpp, Consent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Consent.ConsentState.NULL, new Consent.ConsentStateEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateTime")) { - res.setDateTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("consentingParty")) { - res.getConsentingParty().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.getOrganization().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { - res.setSource(parseType("source", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { - res.getPolicy().add(parseConsentConsentPolicyComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policyRule")) { - res.setPolicyRuleElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verification")) { - res.getVerification().add(parseConsentConsentVerificationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provision")) { - res.getProvision().add(parseConsentprovisionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Consent.ConsentPolicyComponent parseConsentConsentPolicyComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { - Consent.ConsentPolicyComponent res = new Consent.ConsentPolicyComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConsentConsentPolicyComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConsentConsentPolicyComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.ConsentPolicyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { - res.setAuthorityElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { - res.setUriElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Consent.ConsentVerificationComponent parseConsentConsentVerificationComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { - Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConsentConsentVerificationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConsentConsentVerificationComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.ConsentVerificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verified")) { - res.setVerifiedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verifiedWith")) { - res.setVerifiedWith(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationDate")) { - res.setVerificationDateElement(parseDateTime(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Consent.provisionComponent parseConsentprovisionComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { - Consent.provisionComponent res = new Consent.provisionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConsentprovisionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConsentprovisionComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.provisionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Consent.ConsentProvisionType.NULL, new Consent.ConsentProvisionTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.getActor().add(parseConsentprovisionActorComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { - res.getSecurityLabel().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.getPurpose().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.getClass_().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataPeriod")) { - res.setDataPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { - res.getData().add(parseConsentprovisionDataComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provision")) { - res.getProvision().add(parseConsentprovisionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Consent.provisionActorComponent parseConsentprovisionActorComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { - Consent.provisionActorComponent res = new Consent.provisionActorComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConsentprovisionActorComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConsentprovisionActorComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.provisionActorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Consent.provisionDataComponent parseConsentprovisionDataComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { - Consent.provisionDataComponent res = new Consent.provisionDataComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseConsentprovisionDataComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseConsentprovisionDataComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.provisionDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaning")) { - res.setMeaningElement(parseEnumeration(xpp, Consent.ConsentDataMeaning.NULL, new Consent.ConsentDataMeaningEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract parseContract(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Contract res = new Contract(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractContent(int eventType, XmlPullParser xpp, Contract res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Contract.ContractStatus.NULL, new Contract.ContractStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentDerivative")) { - res.setContentDerivative(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { - res.setIssuedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applies")) { - res.setApplies(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.getSubject().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { - res.getAuthority().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { - res.getDomain().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { - res.getSubType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { - res.getTerm().add(parseContractTermComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signer")) { - res.getSigner().add(parseContractSignatoryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("friendly")) { - res.getFriendly().add(parseContractFriendlyLanguageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legal")) { - res.getLegal().add(parseContractLegalLanguageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.setRule(parseContractComputableLanguageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "legallyBinding")) { - res.setLegallyBinding(parseType("legallyBinding", xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.TermComponent parseContractTermComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.TermComponent res = new Contract.TermComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractTermComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractTermComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.TermComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { - res.setIssuedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applies")) { - res.setApplies(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { - res.setSubType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offer")) { - res.setOffer(parseContractContractOfferComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asset")) { - res.getAsset().add(parseContractContractAssetComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.getAgent().add(parseContractAgentComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionReason")) { - res.getActionReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { - res.getGroup().add(parseContractTermComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.ContractOfferComponent parseContractContractOfferComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.ContractOfferComponent res = new Contract.ContractOfferComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractContractOfferComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractContractOfferComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ContractOfferComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.setTopic(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("decision")) { - res.setDecision(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { - res.setLinkIdElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.ContractAssetComponent parseContractContractAssetComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.ContractAssetComponent res = new Contract.ContractAssetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractContractAssetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractContractAssetComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ContractAssetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.setClass_(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataPeriod")) { - res.setDataPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { - res.getData().add(parseContractAssetDataComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valuedItem")) { - res.getValuedItem().add(parseContractValuedItemComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { - res.getSecurityLabel().add(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.AssetDataComponent parseContractAssetDataComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.AssetDataComponent res = new Contract.AssetDataComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractAssetDataComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractAssetDataComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.AssetDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaning")) { - res.setMeaningElement(parseEnumeration(xpp, Contract.ContractDataMeaning.NULL, new Contract.ContractDataMeaningEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.ValuedItemComponent parseContractValuedItemComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.ValuedItemComponent res = new Contract.ValuedItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractValuedItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractValuedItemComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ValuedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "entity")) { - res.setEntity(parseType("entity", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectiveTime")) { - res.setEffectiveTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("points")) { - res.setPointsElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.AgentComponent parseContractAgentComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.AgentComponent res = new Contract.AgentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractAgentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractAgentComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.AgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.getRole().add(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.SignatoryComponent parseContractSignatoryComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.SignatoryComponent res = new Contract.SignatoryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractSignatoryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractSignatoryComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.SignatoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { - res.setParty(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { - res.getSignature().add(parseSignature(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractFriendlyLanguageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractFriendlyLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.FriendlyLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { - res.setContent(parseType("content", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractLegalLanguageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractLegalLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.LegalLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { - res.setContent(parseType("content", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { - Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseContractComputableLanguageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseContractComputableLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ComputableLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { - res.setContent(parseType("content", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Coverage parseCoverage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Coverage res = new Coverage(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCoverageContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCoverageContent(int eventType, XmlPullParser xpp, Coverage res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Coverage.CoverageStatus.NULL, new Coverage.CoverageStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policyHolder")) { - res.setPolicyHolder(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subscriber")) { - res.setSubscriber(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subscriberId")) { - res.setSubscriberIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("beneficiary")) { - res.setBeneficiary(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationship(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payor")) { - res.getPayor().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("grouping")) { - res.setGrouping(parseCoverageGroupComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependent")) { - res.setDependentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("order")) { - res.setOrderElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { - res.setNetworkElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contract")) { - res.getContract().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Coverage.GroupComponent parseCoverageGroupComponent(XmlPullParser xpp, Coverage owner) throws XmlPullParserException, IOException, FHIRFormatError { - Coverage.GroupComponent res = new Coverage.GroupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseCoverageGroupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseCoverageGroupComponentContent(int eventType, XmlPullParser xpp, Coverage owner, Coverage.GroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { - res.setGroupElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupDisplay")) { - res.setGroupDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subGroup")) { - res.setSubGroupElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subGroupDisplay")) { - res.setSubGroupDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("plan")) { - res.setPlanElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("planDisplay")) { - res.setPlanDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subPlan")) { - res.setSubPlanElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subPlanDisplay")) { - res.setSubPlanDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.setClass_Element(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classDisplay")) { - res.setClassDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subClass")) { - res.setSubClassElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subClassDisplay")) { - res.setSubClassDisplayElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DetectedIssue parseDetectedIssue(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DetectedIssue res = new DetectedIssue(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDetectedIssueContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDetectedIssueContent(int eventType, XmlPullParser xpp, DetectedIssue res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, DetectedIssue.DetectedIssueStatus.NULL, new DetectedIssue.DetectedIssueStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { - res.setSeverityElement(parseEnumeration(xpp, DetectedIssue.DetectedIssueSeverity.NULL, new DetectedIssue.DetectedIssueSeverityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implicated")) { - res.getImplicated().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.setDetailElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReferenceElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mitigation")) { - res.getMitigation().add(parseDetectedIssueDetectedIssueMitigationComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueDetectedIssueMitigationComponent(XmlPullParser xpp, DetectedIssue owner) throws XmlPullParserException, IOException, FHIRFormatError { - DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDetectedIssueDetectedIssueMitigationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDetectedIssueDetectedIssueMitigationComponentContent(int eventType, XmlPullParser xpp, DetectedIssue owner, DetectedIssue.DetectedIssueMitigationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.setAction(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Device parseDevice(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Device res = new Device(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceContent(int eventType, XmlPullParser xpp, Device res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.setUdi(parseDeviceDeviceUdiComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Device.FHIRDeviceStatus.NULL, new Device.FHIRDeviceStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { - res.setLotNumberElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { - res.setManufacturerElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufactureDate")) { - res.setManufactureDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { - res.setExpirationDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("model")) { - res.setModelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { - res.setOwner(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("safety")) { - res.getSafety().add(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Device.DeviceUdiComponent parseDeviceDeviceUdiComponent(XmlPullParser xpp, Device owner) throws XmlPullParserException, IOException, FHIRFormatError { - Device.DeviceUdiComponent res = new Device.DeviceUdiComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceDeviceUdiComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceDeviceUdiComponentContent(int eventType, XmlPullParser xpp, Device owner, Device.DeviceUdiComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceIdentifier")) { - res.setDeviceIdentifierElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.setJurisdictionElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("carrierHRF")) { - res.setCarrierHRFElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("carrierAIDC")) { - res.setCarrierAIDCElement(parseBase64Binary(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { - res.setIssuerElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entryType")) { - res.setEntryTypeElement(parseEnumeration(xpp, Device.UDIEntryType.NULL, new Device.UDIEntryTypeEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceComponent parseDeviceComponent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceComponent res = new DeviceComponent(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceComponentContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceComponentContent(int eventType, XmlPullParser xpp, DeviceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastSystemChange")) { - res.setLastSystemChangeElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { - res.setParent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { - res.getOperationalStatus().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameterGroup")) { - res.setParameterGroup(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPrinciple")) { - res.setMeasurementPrincipleElement(parseEnumeration(xpp, DeviceComponent.MeasmntPrinciple.NULL, new DeviceComponent.MeasmntPrincipleEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productionSpecification")) { - res.getProductionSpecification().add(parseDeviceComponentDeviceComponentProductionSpecificationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("languageCode")) { - res.setLanguageCode(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceComponent.DeviceComponentProductionSpecificationComponent parseDeviceComponentDeviceComponentProductionSpecificationComponent(XmlPullParser xpp, DeviceComponent owner) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceComponent.DeviceComponentProductionSpecificationComponent res = new DeviceComponent.DeviceComponentProductionSpecificationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceComponentDeviceComponentProductionSpecificationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceComponentDeviceComponentProductionSpecificationComponentContent(int eventType, XmlPullParser xpp, DeviceComponent owner, DeviceComponent.DeviceComponentProductionSpecificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specType")) { - res.setSpecType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("componentId")) { - res.setComponentId(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productionSpec")) { - res.setProductionSpecElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceMetric parseDeviceMetric(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceMetric res = new DeviceMetric(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceMetricContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceMetricContent(int eventType, XmlPullParser xpp, DeviceMetric res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { - res.setUnit(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { - res.setParent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { - res.setOperationalStatusElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricOperationalStatus.NULL, new DeviceMetric.DeviceMetricOperationalStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { - res.setColorElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricColor.NULL, new DeviceMetric.DeviceMetricColorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategoryElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCategory.NULL, new DeviceMetric.DeviceMetricCategoryEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPeriod")) { - res.setMeasurementPeriod(parseTiming(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("calibration")) { - res.getCalibration().add(parseDeviceMetricDeviceMetricCalibrationComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricDeviceMetricCalibrationComponent(XmlPullParser xpp, DeviceMetric owner) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceMetricDeviceMetricCalibrationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceMetricDeviceMetricCalibrationComponentContent(int eventType, XmlPullParser xpp, DeviceMetric owner, DeviceMetric.DeviceMetricCalibrationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCalibrationType.NULL, new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("state")) { - res.setStateElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCalibrationState.NULL, new DeviceMetric.DeviceMetricCalibrationStateEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { - res.setTimeElement(parseInstant(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceRequest parseDeviceRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceRequest res = new DeviceRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceRequestContent(int eventType, XmlPullParser xpp, DeviceRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priorRequest")) { - res.getPriorRequest().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { - res.setGroupIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, DeviceRequest.DeviceRequestStatus.NULL, new DeviceRequest.DeviceRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { - res.setIntent(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, DeviceRequest.RequestPriority.NULL, new DeviceRequest.RequestPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "code")) { - res.setCode(parseType("code", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { - res.setRequester(parseDeviceRequestDeviceRequestRequesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { - res.setPerformerType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { - res.getSupportingInfo().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { - res.getRelevantHistory().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceRequest.DeviceRequestRequesterComponent parseDeviceRequestDeviceRequestRequesterComponent(XmlPullParser xpp, DeviceRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceRequest.DeviceRequestRequesterComponent res = new DeviceRequest.DeviceRequestRequesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceRequestDeviceRequestRequesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceRequestDeviceRequestRequesterComponentContent(int eventType, XmlPullParser xpp, DeviceRequest owner, DeviceRequest.DeviceRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.setAgent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DeviceUseStatement parseDeviceUseStatement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DeviceUseStatement res = new DeviceUseStatement(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDeviceUseStatementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDeviceUseStatementContent(int eventType, XmlPullParser xpp, DeviceUseStatement res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, DeviceUseStatement.DeviceUseStatementStatus.NULL, new DeviceUseStatement.DeviceUseStatementStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenUsed")) { - res.setWhenUsed(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { - res.setTiming(parseType("timing", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recordedOn")) { - res.setRecordedOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { - res.setDevice(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("indication")) { - res.getIndication().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DiagnosticReport parseDiagnosticReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DiagnosticReport res = new DiagnosticReport(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDiagnosticReportContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDiagnosticReportContent(int eventType, XmlPullParser xpp, DiagnosticReport res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, DiagnosticReport.DiagnosticReportStatus.NULL, new DiagnosticReport.DiagnosticReportStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { - res.setEffective(parseType("effective", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { - res.setIssuedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultsInterpreter")) { - res.getResultsInterpreter().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { - res.getSpecimen().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { - res.getResult().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imagingStudy")) { - res.getImagingStudy().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { - res.getImage().add(parseDiagnosticReportDiagnosticReportImageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conclusion")) { - res.setConclusionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codedDiagnosis")) { - res.getCodedDiagnosis().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("presentedForm")) { - res.getPresentedForm().add(parseAttachment(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DiagnosticReport.DiagnosticReportImageComponent parseDiagnosticReportDiagnosticReportImageComponent(XmlPullParser xpp, DiagnosticReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - DiagnosticReport.DiagnosticReportImageComponent res = new DiagnosticReport.DiagnosticReportImageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDiagnosticReportDiagnosticReportImageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDiagnosticReportDiagnosticReportImageComponentContent(int eventType, XmlPullParser xpp, DiagnosticReport owner, DiagnosticReport.DiagnosticReportImageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.setLink(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentManifest parseDocumentManifest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentManifest res = new DocumentManifest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentManifestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentManifestContent(int eventType, XmlPullParser xpp, DocumentManifest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterIdentifier")) { - res.setMasterIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.getAuthor().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { - res.getRecipient().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSourceElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.getContent().add(parseDocumentManifestDocumentManifestContentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { - res.getRelated().add(parseDocumentManifestDocumentManifestRelatedComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentManifest.DocumentManifestContentComponent parseDocumentManifestDocumentManifestContentComponent(XmlPullParser xpp, DocumentManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentManifest.DocumentManifestContentComponent res = new DocumentManifest.DocumentManifestContentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentManifestDocumentManifestContentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentManifestDocumentManifestContentComponentContent(int eventType, XmlPullParser xpp, DocumentManifest owner, DocumentManifest.DocumentManifestContentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "p")) { - res.setP(parseType("p", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentManifest.DocumentManifestRelatedComponent parseDocumentManifestDocumentManifestRelatedComponent(XmlPullParser xpp, DocumentManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentManifest.DocumentManifestRelatedComponent res = new DocumentManifest.DocumentManifestRelatedComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentManifestDocumentManifestRelatedComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentManifestDocumentManifestRelatedComponentContent(int eventType, XmlPullParser xpp, DocumentManifest owner, DocumentManifest.DocumentManifestRelatedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ref")) { - res.setRef(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentReference parseDocumentReference(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentReference res = new DocumentReference(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentReferenceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentReferenceContent(int eventType, XmlPullParser xpp, DocumentReference res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterIdentifier")) { - res.setMasterIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("docStatus")) { - res.setDocStatusElement(parseEnumeration(xpp, DocumentReference.ReferredDocumentStatus.NULL, new DocumentReference.ReferredDocumentStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.setClass_(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("indexed")) { - res.setIndexedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.getAuthor().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authenticator")) { - res.setAuthenticator(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { - res.setCustodian(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatesTo")) { - res.getRelatesTo().add(parseDocumentReferenceDocumentReferenceRelatesToComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { - res.getSecurityLabel().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.getContent().add(parseDocumentReferenceDocumentReferenceContentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseDocumentReferenceDocumentReferenceContextComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceDocumentReferenceRelatesToComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentReferenceDocumentReferenceRelatesToComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentReferenceDocumentReferenceRelatesToComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceRelatesToComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, DocumentReference.DocumentRelationshipType.NULL, new DocumentReference.DocumentRelationshipTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceDocumentReferenceContentComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentReferenceDocumentReferenceContentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentReferenceDocumentReferenceContentComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceContentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attachment")) { - res.setAttachment(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { - res.setFormat(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentReference.DocumentReferenceContextComponent parseDocumentReferenceDocumentReferenceContextComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentReference.DocumentReferenceContextComponent res = new DocumentReference.DocumentReferenceContextComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentReferenceDocumentReferenceContextComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentReferenceDocumentReferenceContextComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceContextComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.getEvent().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facilityType")) { - res.setFacilityType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practiceSetting")) { - res.setPracticeSetting(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourcePatientInfo")) { - res.setSourcePatientInfo(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { - res.getRelated().add(parseDocumentReferenceDocumentReferenceContextRelatedComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected DocumentReference.DocumentReferenceContextRelatedComponent parseDocumentReferenceDocumentReferenceContextRelatedComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { - DocumentReference.DocumentReferenceContextRelatedComponent res = new DocumentReference.DocumentReferenceContextRelatedComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseDocumentReferenceDocumentReferenceContextRelatedComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseDocumentReferenceDocumentReferenceContextRelatedComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceContextRelatedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ref")) { - res.setRef(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected EligibilityRequest parseEligibilityRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - EligibilityRequest res = new EligibilityRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEligibilityRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEligibilityRequestContent(int eventType, XmlPullParser xpp, EligibilityRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, EligibilityRequest.EligibilityRequestStatus.NULL, new EligibilityRequest.EligibilityRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriority(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { - res.setServiced(parseType("serviced", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { - res.setEnterer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { - res.setInsurer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { - res.setFacility(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { - res.setBusinessArrangementElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitCategory")) { - res.setBenefitCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitSubCategory")) { - res.setBenefitSubCategory(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected EligibilityResponse parseEligibilityResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - EligibilityResponse res = new EligibilityResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEligibilityResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEligibilityResponseContent(int eventType, XmlPullParser xpp, EligibilityResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, EligibilityResponse.EligibilityResponseStatus.NULL, new EligibilityResponse.EligibilityResponseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { - res.setRequestProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { - res.setRequestOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { - res.setDispositionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { - res.setInsurer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inforce")) { - res.setInforceElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { - res.getInsurance().add(parseEligibilityResponseInsuranceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { - res.setForm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { - res.getError().add(parseEligibilityResponseErrorsComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected EligibilityResponse.InsuranceComponent parseEligibilityResponseInsuranceComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - EligibilityResponse.InsuranceComponent res = new EligibilityResponse.InsuranceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEligibilityResponseInsuranceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEligibilityResponseInsuranceComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contract")) { - res.setContract(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitBalance")) { - res.getBenefitBalance().add(parseEligibilityResponseBenefitsComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected EligibilityResponse.BenefitsComponent parseEligibilityResponseBenefitsComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - EligibilityResponse.BenefitsComponent res = new EligibilityResponse.BenefitsComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEligibilityResponseBenefitsComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEligibilityResponseBenefitsComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.BenefitsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subCategory")) { - res.setSubCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excluded")) { - res.setExcludedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { - res.setNetwork(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { - res.setUnit(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { - res.setTerm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("financial")) { - res.getFinancial().add(parseEligibilityResponseBenefitComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected EligibilityResponse.BenefitComponent parseEligibilityResponseBenefitComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - EligibilityResponse.BenefitComponent res = new EligibilityResponse.BenefitComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEligibilityResponseBenefitComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEligibilityResponseBenefitComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.BenefitComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { - res.setAllowed(parseType("allowed", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "used")) { - res.setUsed(parseType("used", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected EligibilityResponse.ErrorsComponent parseEligibilityResponseErrorsComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - EligibilityResponse.ErrorsComponent res = new EligibilityResponse.ErrorsComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEligibilityResponseErrorsComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEligibilityResponseErrorsComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.ErrorsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter parseEncounter(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter res = new Encounter(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterContent(int eventType, XmlPullParser xpp, Encounter res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusHistory")) { - res.getStatusHistory().add(parseEncounterStatusHistoryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.setClass_(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classHistory")) { - res.getClassHistory().add(parseEncounterClassHistoryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriority(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("episodeOfCare")) { - res.getEpisodeOfCare().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("incomingReferral")) { - res.getIncomingReferral().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseEncounterEncounterParticipantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointment")) { - res.setAppointment(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { - res.setLength(parseDuration(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { - res.getDiagnosis().add(parseEncounterDiagnosisComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { - res.getAccount().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { - res.setHospitalization(parseEncounterEncounterHospitalizationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.getLocation().add(parseEncounterEncounterLocationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceProvider")) { - res.setServiceProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.setPartOf(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter.StatusHistoryComponent parseEncounterStatusHistoryComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter.StatusHistoryComponent res = new Encounter.StatusHistoryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterStatusHistoryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterStatusHistoryComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.StatusHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter.ClassHistoryComponent parseEncounterClassHistoryComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter.ClassHistoryComponent res = new Encounter.ClassHistoryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterClassHistoryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterClassHistoryComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.ClassHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { - res.setClass_(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter.EncounterParticipantComponent parseEncounterEncounterParticipantComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterEncounterParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterEncounterParticipantComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.EncounterParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("individual")) { - res.setIndividual(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterDiagnosisComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterDiagnosisComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.setCondition(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { - res.setRankElement(parsePositiveInt(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter.EncounterHospitalizationComponent parseEncounterEncounterHospitalizationComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter.EncounterHospitalizationComponent res = new Encounter.EncounterHospitalizationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterEncounterHospitalizationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterEncounterHospitalizationComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.EncounterHospitalizationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAdmissionIdentifier")) { - res.setPreAdmissionIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { - res.setOrigin(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("admitSource")) { - res.setAdmitSource(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reAdmission")) { - res.setReAdmission(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dietPreference")) { - res.getDietPreference().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialCourtesy")) { - res.getSpecialCourtesy().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialArrangement")) { - res.getSpecialArrangement().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.setDestination(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dischargeDisposition")) { - res.setDischargeDisposition(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Encounter.EncounterLocationComponent parseEncounterEncounterLocationComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { - Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEncounterEncounterLocationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEncounterEncounterLocationComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.EncounterLocationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterLocationStatus.NULL, new Encounter.EncounterLocationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Endpoint parseEndpoint(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Endpoint res = new Endpoint(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEndpointContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEndpointContent(int eventType, XmlPullParser xpp, Endpoint res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Endpoint.EndpointStatus.NULL, new Endpoint.EndpointStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("connectionType")) { - res.setConnectionType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { - res.setManagingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payloadType")) { - res.getPayloadType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payloadMimeType")) { - res.getPayloadMimeType().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.setAddressElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("header")) { - res.getHeader().add(parseString(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected EnrollmentRequest parseEnrollmentRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - EnrollmentRequest res = new EnrollmentRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEnrollmentRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEnrollmentRequestContent(int eventType, XmlPullParser xpp, EnrollmentRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, EnrollmentRequest.EnrollmentRequestStatus.NULL, new EnrollmentRequest.EnrollmentRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { - res.setInsurer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("candidate")) { - res.setCandidate(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected EnrollmentResponse parseEnrollmentResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - EnrollmentResponse res = new EnrollmentResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEnrollmentResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEnrollmentResponseContent(int eventType, XmlPullParser xpp, EnrollmentResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, EnrollmentResponse.EnrollmentResponseStatus.NULL, new EnrollmentResponse.EnrollmentResponseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { - res.setDispositionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { - res.setRequestProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { - res.setRequestOrganization(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected EpisodeOfCare parseEpisodeOfCare(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - EpisodeOfCare res = new EpisodeOfCare(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEpisodeOfCareContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEpisodeOfCareContent(int eventType, XmlPullParser xpp, EpisodeOfCare res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusHistory")) { - res.getStatusHistory().add(parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { - res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { - res.setManagingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referralRequest")) { - res.getReferralRequest().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careManager")) { - res.setCareManager(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("team")) { - res.getTeam().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { - res.getAccount().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(XmlPullParser xpp, EpisodeOfCare owner) throws XmlPullParserException, IOException, FHIRFormatError { - EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentContent(int eventType, XmlPullParser xpp, EpisodeOfCare owner, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected EpisodeOfCare.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(XmlPullParser xpp, EpisodeOfCare owner) throws XmlPullParserException, IOException, FHIRFormatError { - EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEpisodeOfCareDiagnosisComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEpisodeOfCareDiagnosisComponentContent(int eventType, XmlPullParser xpp, EpisodeOfCare owner, EpisodeOfCare.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.setCondition(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { - res.setRankElement(parsePositiveInt(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected EventDefinition parseEventDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - EventDefinition res = new EventDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseEventDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseEventDefinitionContent(int eventType, XmlPullParser xpp, EventDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { - res.getContributor().add(parseContributor(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile parseExpansionProfile(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile res = new ExpansionProfile(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileContent(int eventType, XmlPullParser xpp, ExpansionProfile res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fixedVersion")) { - res.getFixedVersion().add(parseExpansionProfileExpansionProfileFixedVersionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludedSystem")) { - res.setExcludedSystem(parseExpansionProfileExpansionProfileExcludedSystemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("includeDesignations")) { - res.setIncludeDesignationsElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { - res.setDesignation(parseExpansionProfileExpansionProfileDesignationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("includeDefinition")) { - res.setIncludeDefinitionElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activeOnly")) { - res.setActiveOnlyElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeNested")) { - res.setExcludeNestedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeNotForUI")) { - res.setExcludeNotForUIElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludePostCoordinated")) { - res.setExcludePostCoordinatedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("displayLanguage")) { - res.setDisplayLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("limitedExpansion")) { - res.setLimitedExpansionElement(parseBoolean(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.ExpansionProfileFixedVersionComponent parseExpansionProfileExpansionProfileFixedVersionComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.ExpansionProfileFixedVersionComponent res = new ExpansionProfile.ExpansionProfileFixedVersionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileExpansionProfileFixedVersionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileExpansionProfileFixedVersionComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.ExpansionProfileFixedVersionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, ExpansionProfile.SystemVersionProcessingMode.NULL, new ExpansionProfile.SystemVersionProcessingModeEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.ExpansionProfileExcludedSystemComponent parseExpansionProfileExpansionProfileExcludedSystemComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.ExpansionProfileExcludedSystemComponent res = new ExpansionProfile.ExpansionProfileExcludedSystemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileExpansionProfileExcludedSystemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileExpansionProfileExcludedSystemComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.ExpansionProfileExcludedSystemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.ExpansionProfileDesignationComponent parseExpansionProfileExpansionProfileDesignationComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.ExpansionProfileDesignationComponent res = new ExpansionProfile.ExpansionProfileDesignationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileExpansionProfileDesignationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileExpansionProfileDesignationComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.ExpansionProfileDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { - res.setInclude(parseExpansionProfileDesignationIncludeComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { - res.setExclude(parseExpansionProfileDesignationExcludeComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.DesignationIncludeComponent parseExpansionProfileDesignationIncludeComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.DesignationIncludeComponent res = new ExpansionProfile.DesignationIncludeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileDesignationIncludeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileDesignationIncludeComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationIncludeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { - res.getDesignation().add(parseExpansionProfileDesignationIncludeDesignationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.DesignationIncludeDesignationComponent parseExpansionProfileDesignationIncludeDesignationComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.DesignationIncludeDesignationComponent res = new ExpansionProfile.DesignationIncludeDesignationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileDesignationIncludeDesignationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileDesignationIncludeDesignationComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationIncludeDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUse(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.DesignationExcludeComponent parseExpansionProfileDesignationExcludeComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.DesignationExcludeComponent res = new ExpansionProfile.DesignationExcludeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileDesignationExcludeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileDesignationExcludeComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationExcludeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { - res.getDesignation().add(parseExpansionProfileDesignationExcludeDesignationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExpansionProfile.DesignationExcludeDesignationComponent parseExpansionProfileDesignationExcludeDesignationComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExpansionProfile.DesignationExcludeDesignationComponent res = new ExpansionProfile.DesignationExcludeDesignationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExpansionProfileDesignationExcludeDesignationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExpansionProfileDesignationExcludeDesignationComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationExcludeDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUse(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit parseExplanationOfBenefit(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit res = new ExplanationOfBenefit(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL, new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { - res.getSubType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("billablePeriod")) { - res.setBillablePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { - res.setEnterer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { - res.setInsurer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referral")) { - res.setReferral(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { - res.setFacility(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { - res.setClaim(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { - res.setClaimResponse(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { - res.setDispositionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { - res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescription")) { - res.setPrescription(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("originalPrescription")) { - res.setOriginalPrescription(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { - res.setPayee(parseExplanationOfBenefitPayeeComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("information")) { - res.getInformation().add(parseExplanationOfBenefitSupportingInformationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { - res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { - res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { - res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precedence")) { - res.setPrecedenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { - res.setInsurance(parseExplanationOfBenefitInsuranceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accident")) { - res.setAccident(parseExplanationOfBenefitAccidentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("employmentImpacted")) { - res.setEmploymentImpacted(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { - res.setHospitalization(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseExplanationOfBenefitItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addItem")) { - res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalCost")) { - res.setTotalCost(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unallocDeductable")) { - res.setUnallocDeductable(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalBenefit")) { - res.setTotalBenefit(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { - res.setPayment(parseExplanationOfBenefitPaymentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { - res.setForm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { - res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitBalance")) { - res.getBenefitBalance().add(parseExplanationOfBenefitBenefitBalanceComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitRelatedClaimComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitRelatedClaimComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.RelatedClaimComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { - res.setClaim(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationship(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReference(parseIdentifier(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.PayeeComponent parseExplanationOfBenefitPayeeComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitPayeeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitPayeeComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.PayeeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { - res.setParty(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitSupportingInformationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitSupportingInformationComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.SupportingInformationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { - res.setTiming(parseType("timing", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.CareTeamComponent parseExplanationOfBenefitCareTeamComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitCareTeamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitCareTeamComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.CareTeamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { - res.setResponsibleElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { - res.setQualification(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.DiagnosisComponent parseExplanationOfBenefitDiagnosisComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitDiagnosisComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitDiagnosisComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { - res.setDiagnosis(parseType("diagnosis", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageCode")) { - res.setPackageCode(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitProcedureComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitProcedureComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.ProcedureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "procedure")) { - res.setProcedure(parseType("procedure", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitInsuranceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitInsuranceComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { - res.setCoverage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { - res.getPreAuthRef().add(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitAccidentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitAccidentComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.AccidentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { - res.setLocation(parseType("location", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitItemComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeamLinkId")) { - res.getCareTeamLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosisLinkId")) { - res.getDiagnosisLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureLinkId")) { - res.getProcedureLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationLinkId")) { - res.getInformationLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { - res.setRevenue(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { - res.getProgramCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { - res.setServiced(parseType("serviced", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { - res.setLocation(parseType("location", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.getUdi().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { - res.getSubSite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.getEncounter().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parseExplanationOfBenefitDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitAdjudicationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitAdjudicationComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.AdjudicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseDecimal(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitDetailComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.DetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { - res.setRevenue(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { - res.getProgramCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.getUdi().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { - res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitSubDetailComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitSubDetailComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { - res.setSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { - res.setRevenue(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { - res.getProgramCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { - res.setUnitPrice(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { - res.setFactorElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { - res.setNet(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { - res.getUdi().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitAddedItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitAddedItemComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.getSequenceLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequenceLinkId")) { - res.getDetailSequenceLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequenceLinkId")) { - res.getSubdetailSequenceLinkId().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { - res.setService(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fee")) { - res.setFee(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { - res.getNoteNumber().add(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { - res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.PaymentComponent parseExplanationOfBenefitPaymentComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitPaymentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitPaymentComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.PaymentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustment")) { - res.setAdjustment(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustmentReason")) { - res.setAdjustmentReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.NoteComponent parseExplanationOfBenefitNoteComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitNoteComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitNoteComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.NoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { - res.setNumberElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguage(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitBenefitBalanceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitBenefitBalanceComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitBalanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subCategory")) { - res.setSubCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excluded")) { - res.setExcludedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { - res.setNetwork(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { - res.setUnit(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { - res.setTerm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("financial")) { - res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { - ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseExplanationOfBenefitBenefitComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseExplanationOfBenefitBenefitComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { - res.setAllowed(parseType("allowed", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "used")) { - res.setUsed(parseType("used", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected FamilyMemberHistory parseFamilyMemberHistory(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - FamilyMemberHistory res = new FamilyMemberHistory(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseFamilyMemberHistoryContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseFamilyMemberHistoryContent(int eventType, XmlPullParser xpp, FamilyMemberHistory res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, FamilyMemberHistory.FamilyHistoryStatus.NULL, new FamilyMemberHistory.FamilyHistoryStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { - res.setDataAbsentReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationship(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { - res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "born")) { - res.setBorn(parseType("born", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "age")) { - res.setAge(parseType("age", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("estimatedAge")) { - res.setEstimatedAgeElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "deceased")) { - res.setDeceased(parseType("deceased", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.getCondition().add(parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(XmlPullParser xpp, FamilyMemberHistory owner) throws XmlPullParserException, IOException, FHIRFormatError { - FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentContent(int eventType, XmlPullParser xpp, FamilyMemberHistory owner, FamilyMemberHistory.FamilyMemberHistoryConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { - res.setOnset(parseType("onset", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Flag parseFlag(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Flag res = new Flag(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseFlagContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseFlagContent(int eventType, XmlPullParser xpp, Flag res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Flag.FlagStatus.NULL, new Flag.FlagStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Goal parseGoal(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Goal res = new Goal(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGoalContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGoalContent(int eventType, XmlPullParser xpp, Goal res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Goal.GoalStatus.NULL, new Goal.GoalStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriority(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescription(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "start")) { - res.setStart(parseType("start", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseGoalGoalTargetComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { - res.setStatusDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { - res.setStatusReasonElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expressedBy")) { - res.setExpressedBy(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { - res.getAddresses().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeCode")) { - res.getOutcomeCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeReference")) { - res.getOutcomeReference().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Goal.GoalTargetComponent parseGoalGoalTargetComponent(XmlPullParser xpp, Goal owner) throws XmlPullParserException, IOException, FHIRFormatError { - Goal.GoalTargetComponent res = new Goal.GoalTargetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGoalGoalTargetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGoalGoalTargetComponentContent(int eventType, XmlPullParser xpp, Goal owner, Goal.GoalTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { - res.setMeasure(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "detail")) { - res.setDetail(parseType("detail", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "due")) { - res.setDue(parseType("due", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected GraphDefinition parseGraphDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - GraphDefinition res = new GraphDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGraphDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGraphDefinitionContent(int eventType, XmlPullParser xpp, GraphDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfileElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionGraphDefinitionLinkComponent(XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGraphDefinitionGraphDefinitionLinkComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGraphDefinitionGraphDefinitionLinkComponentContent(int eventType, XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceName")) { - res.setSliceNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.getTarget().add(parseGraphDefinitionGraphDefinitionLinkTargetComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected GraphDefinition.GraphDefinitionLinkTargetComponent parseGraphDefinitionGraphDefinitionLinkTargetComponent(XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - GraphDefinition.GraphDefinitionLinkTargetComponent res = new GraphDefinition.GraphDefinitionLinkTargetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGraphDefinitionGraphDefinitionLinkTargetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGraphDefinitionGraphDefinitionLinkTargetComponentContent(int eventType, XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfileElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compartment")) { - res.getCompartment().add(parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentContent(int eventType, XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, GraphDefinition.CompartmentCode.NULL, new GraphDefinition.CompartmentCodeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.setRuleElement(parseEnumeration(xpp, GraphDefinition.GraphCompartmentRule.NULL, new GraphDefinition.GraphCompartmentRuleEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Group parseGroup(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Group res = new Group(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGroupContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGroupContent(int eventType, XmlPullParser xpp, Group res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Group.GroupType.NULL, new Group.GroupTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actual")) { - res.setActualElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantityElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { - res.getCharacteristic().add(parseGroupGroupCharacteristicComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("member")) { - res.getMember().add(parseGroupGroupMemberComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Group.GroupCharacteristicComponent parseGroupGroupCharacteristicComponent(XmlPullParser xpp, Group owner) throws XmlPullParserException, IOException, FHIRFormatError { - Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGroupGroupCharacteristicComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGroupGroupCharacteristicComponentContent(int eventType, XmlPullParser xpp, Group owner, Group.GroupCharacteristicComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { - res.setExcludeElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Group.GroupMemberComponent parseGroupGroupMemberComponent(XmlPullParser xpp, Group owner) throws XmlPullParserException, IOException, FHIRFormatError { - Group.GroupMemberComponent res = new Group.GroupMemberComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGroupGroupMemberComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGroupGroupMemberComponentContent(int eventType, XmlPullParser xpp, Group owner, Group.GroupMemberComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { - res.setEntity(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { - res.setInactiveElement(parseBoolean(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected GuidanceResponse parseGuidanceResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - GuidanceResponse res = new GuidanceResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseGuidanceResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseGuidanceResponseContent(int eventType, XmlPullParser xpp, GuidanceResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestId")) { - res.setRequestIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("module")) { - res.setModule(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, GuidanceResponse.GuidanceResponseStatus.NULL, new GuidanceResponse.GuidanceResponseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("occurrenceDateTime")) { - res.setOccurrenceDateTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { - res.setReason(parseType("reason", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evaluationMessage")) { - res.getEvaluationMessage().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outputParameters")) { - res.setOutputParameters(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { - res.setResult(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { - res.getDataRequirement().add(parseDataRequirement(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected HealthcareService parseHealthcareService(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - HealthcareService res = new HealthcareService(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseHealthcareServiceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseHealthcareServiceContent(int eventType, XmlPullParser xpp, HealthcareService res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("providedBy")) { - res.setProvidedBy(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { - res.getSpecialty().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.getLocation().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extraDetails")) { - res.setExtraDetailsElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { - res.setPhoto(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverageArea")) { - res.getCoverageArea().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceProvisionCode")) { - res.getServiceProvisionCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eligibility")) { - res.setEligibility(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eligibilityNote")) { - res.setEligibilityNoteElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programName")) { - res.getProgramName().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { - res.getCharacteristic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referralMethod")) { - res.getReferralMethod().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentRequired")) { - res.setAppointmentRequiredElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableTime")) { - res.getAvailableTime().add(parseHealthcareServiceHealthcareServiceAvailableTimeComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notAvailable")) { - res.getNotAvailable().add(parseHealthcareServiceHealthcareServiceNotAvailableComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { - res.setAvailabilityExceptionsElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected HealthcareService.HealthcareServiceAvailableTimeComponent parseHealthcareServiceHealthcareServiceAvailableTimeComponent(XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { - HealthcareService.HealthcareServiceAvailableTimeComponent res = new HealthcareService.HealthcareServiceAvailableTimeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseHealthcareServiceHealthcareServiceAvailableTimeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseHealthcareServiceHealthcareServiceAvailableTimeComponentContent(int eventType, XmlPullParser xpp, HealthcareService owner, HealthcareService.HealthcareServiceAvailableTimeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { - res.getDaysOfWeek().add(parseEnumeration(xpp, HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { - res.setAllDayElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableStartTime")) { - res.setAvailableStartTimeElement(parseTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableEndTime")) { - res.setAvailableEndTimeElement(parseTime(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected HealthcareService.HealthcareServiceNotAvailableComponent parseHealthcareServiceHealthcareServiceNotAvailableComponent(XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { - HealthcareService.HealthcareServiceNotAvailableComponent res = new HealthcareService.HealthcareServiceNotAvailableComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseHealthcareServiceHealthcareServiceNotAvailableComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseHealthcareServiceHealthcareServiceNotAvailableComponentContent(int eventType, XmlPullParser xpp, HealthcareService owner, HealthcareService.HealthcareServiceNotAvailableComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("during")) { - res.setDuring(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingManifest parseImagingManifest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingManifest res = new ImagingManifest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingManifestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingManifestContent(int eventType, XmlPullParser xpp, ImagingManifest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoringTime")) { - res.setAuthoringTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { - res.getStudy().add(parseImagingManifestStudyComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingManifest.StudyComponent parseImagingManifestStudyComponent(XmlPullParser xpp, ImagingManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingManifest.StudyComponent res = new ImagingManifest.StudyComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingManifestStudyComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingManifestStudyComponentContent(int eventType, XmlPullParser xpp, ImagingManifest owner, ImagingManifest.StudyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { - res.setUidElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imagingStudy")) { - res.setImagingStudy(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { - res.getSeries().add(parseImagingManifestSeriesComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingManifest.SeriesComponent parseImagingManifestSeriesComponent(XmlPullParser xpp, ImagingManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingManifest.SeriesComponent res = new ImagingManifest.SeriesComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingManifestSeriesComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingManifestSeriesComponentContent(int eventType, XmlPullParser xpp, ImagingManifest owner, ImagingManifest.SeriesComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { - res.setUidElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { - res.getInstance().add(parseImagingManifestInstanceComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingManifest.InstanceComponent parseImagingManifestInstanceComponent(XmlPullParser xpp, ImagingManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingManifest.InstanceComponent res = new ImagingManifest.InstanceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingManifestInstanceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingManifestInstanceComponentContent(int eventType, XmlPullParser xpp, ImagingManifest owner, ImagingManifest.InstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sopClass")) { - res.setSopClassElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { - res.setUidElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frameNumber")) { - res.getFrameNumber().add(parseUnsignedInt(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingStudy parseImagingStudy(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingStudy res = new ImagingStudy(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingStudyContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingStudyContent(int eventType, XmlPullParser xpp, ImagingStudy res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { - res.setUidElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accession")) { - res.setAccession(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availability")) { - res.setAvailabilityElement(parseEnumeration(xpp, ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modalityList")) { - res.getModalityList().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("started")) { - res.setStartedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referrer")) { - res.setReferrer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpreter")) { - res.getInterpreter().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfSeries")) { - res.setNumberOfSeriesElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfInstances")) { - res.setNumberOfInstancesElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureReference")) { - res.getProcedureReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureCode")) { - res.getProcedureCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { - res.getSeries().add(parseImagingStudyImagingStudySeriesComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudyImagingStudySeriesComponent(XmlPullParser xpp, ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingStudyImagingStudySeriesComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingStudyImagingStudySeriesComponentContent(int eventType, XmlPullParser xpp, ImagingStudy owner, ImagingStudy.ImagingStudySeriesComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { - res.setUidElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { - res.setNumberElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modality")) { - res.setModality(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfInstances")) { - res.setNumberOfInstancesElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availability")) { - res.setAvailabilityElement(parseEnumeration(xpp, ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("laterality")) { - res.setLaterality(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("started")) { - res.setStartedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { - res.getInstance().add(parseImagingStudyImagingStudySeriesInstanceComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImagingStudy.ImagingStudySeriesInstanceComponent parseImagingStudyImagingStudySeriesInstanceComponent(XmlPullParser xpp, ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImagingStudyImagingStudySeriesInstanceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImagingStudyImagingStudySeriesInstanceComponentContent(int eventType, XmlPullParser xpp, ImagingStudy owner, ImagingStudy.ImagingStudySeriesInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { - res.setUidElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { - res.setNumberElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sopClass")) { - res.setSopClassElement(parseOid(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Immunization parseImmunization(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Immunization res = new Immunization(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationContent(int eventType, XmlPullParser xpp, Immunization res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Immunization.ImmunizationStatus.NULL, new Immunization.ImmunizationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notGiven")) { - res.setNotGivenElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccineCode")) { - res.setVaccineCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("primarySource")) { - res.setPrimarySourceElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reportOrigin")) { - res.setReportOrigin(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { - res.setManufacturer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { - res.setLotNumberElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { - res.setExpirationDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { - res.setSite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { - res.setRoute(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseQuantity")) { - res.setDoseQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practitioner")) { - res.getPractitioner().add(parseImmunizationImmunizationPractitionerComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("explanation")) { - res.setExplanation(parseImmunizationImmunizationExplanationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reaction")) { - res.getReaction().add(parseImmunizationImmunizationReactionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccinationProtocol")) { - res.getVaccinationProtocol().add(parseImmunizationImmunizationVaccinationProtocolComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Immunization.ImmunizationPractitionerComponent parseImmunizationImmunizationPractitionerComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { - Immunization.ImmunizationPractitionerComponent res = new Immunization.ImmunizationPractitionerComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationImmunizationPractitionerComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationImmunizationPractitionerComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationPractitionerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Immunization.ImmunizationExplanationComponent parseImmunizationImmunizationExplanationComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { - Immunization.ImmunizationExplanationComponent res = new Immunization.ImmunizationExplanationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationImmunizationExplanationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationImmunizationExplanationComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationExplanationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonNotGiven")) { - res.getReasonNotGiven().add(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Immunization.ImmunizationReactionComponent parseImmunizationImmunizationReactionComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { - Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationImmunizationReactionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationImmunizationReactionComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationReactionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.setDetail(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reported")) { - res.setReportedElement(parseBoolean(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Immunization.ImmunizationVaccinationProtocolComponent parseImmunizationImmunizationVaccinationProtocolComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { - Immunization.ImmunizationVaccinationProtocolComponent res = new Immunization.ImmunizationVaccinationProtocolComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationImmunizationVaccinationProtocolComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationImmunizationVaccinationProtocolComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationVaccinationProtocolComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseSequence")) { - res.setDoseSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { - res.setAuthority(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { - res.setSeriesElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("seriesDoses")) { - res.setSeriesDosesElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { - res.getTargetDisease().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseStatus")) { - res.setDoseStatus(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseStatusReason")) { - res.setDoseStatusReason(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImmunizationRecommendation parseImmunizationRecommendation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ImmunizationRecommendation res = new ImmunizationRecommendation(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationRecommendationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationRecommendationContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recommendation")) { - res.getRecommendation().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccineCode")) { - res.setVaccineCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { - res.setTargetDisease(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseNumber")) { - res.setDoseNumberElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("forecastStatus")) { - res.setForecastStatus(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateCriterion")) { - res.getDateCriterion().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { - res.setProtocol(parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingImmunization")) { - res.getSupportingImmunization().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingPatientInformation")) { - res.getSupportingPatientInformation().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseDateTime(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseSequence")) { - res.setDoseSequenceElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { - res.setAuthority(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { - res.setSeriesElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImplementationGuide parseImplementationGuide(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ImplementationGuide res = new ImplementationGuide(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImplementationGuideContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImplementationGuideContent(int eventType, XmlPullParser xpp, ImplementationGuide res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { - res.setFhirVersionElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependency")) { - res.getDependency().add(parseImplementationGuideImplementationGuideDependencyComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("package")) { - res.getPackage().add(parseImplementationGuideImplementationGuidePackageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("global")) { - res.getGlobal().add(parseImplementationGuideImplementationGuideGlobalComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binary")) { - res.getBinary().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { - res.setPage(parseImplementationGuideImplementationGuidePageComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImplementationGuide.ImplementationGuideDependencyComponent parseImplementationGuideImplementationGuideDependencyComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuideDependencyComponent res = new ImplementationGuide.ImplementationGuideDependencyComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImplementationGuideImplementationGuideDependencyComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImplementationGuideImplementationGuideDependencyComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDependencyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, ImplementationGuide.GuideDependencyType.NULL, new ImplementationGuide.GuideDependencyTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { - res.setUriElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImplementationGuide.ImplementationGuidePackageComponent parseImplementationGuideImplementationGuidePackageComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuidePackageComponent res = new ImplementationGuide.ImplementationGuidePackageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImplementationGuideImplementationGuidePackageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImplementationGuideImplementationGuidePackageComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.getResource().add(parseImplementationGuideImplementationGuidePackageResourceComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImplementationGuide.ImplementationGuidePackageResourceComponent parseImplementationGuideImplementationGuidePackageResourceComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuidePackageResourceComponent res = new ImplementationGuide.ImplementationGuidePackageResourceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImplementationGuideImplementationGuidePackageResourceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImplementationGuideImplementationGuidePackageResourceComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageResourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("example")) { - res.setExampleElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("acronym")) { - res.setAcronymElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { - res.setSource(parseType("source", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exampleFor")) { - res.setExampleFor(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideImplementationGuideGlobalComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImplementationGuideImplementationGuideGlobalComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImplementationGuideImplementationGuideGlobalComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideGlobalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ImplementationGuide.ImplementationGuidePageComponent parseImplementationGuideImplementationGuidePageComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { - ImplementationGuide.ImplementationGuidePageComponent res = new ImplementationGuide.ImplementationGuidePageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseImplementationGuideImplementationGuidePageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseImplementationGuideImplementationGuidePageComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSourceElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, ImplementationGuide.GuidePageKind.NULL, new ImplementationGuide.GuidePageKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("package")) { - res.getPackage().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { - res.setFormatElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { - res.getPage().add(parseImplementationGuideImplementationGuidePageComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Library parseLibrary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Library res = new Library(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseLibraryContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseLibraryContent(int eventType, XmlPullParser xpp, Library res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { - res.getContributor().add(parseContributor(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { - res.getParameter().add(parseParameterDefinition(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { - res.getDataRequirement().add(parseDataRequirement(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.getContent().add(parseAttachment(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Linkage parseLinkage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Linkage res = new Linkage(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseLinkageContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseLinkageContent(int eventType, XmlPullParser xpp, Linkage res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseLinkageLinkageItemComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Linkage.LinkageItemComponent parseLinkageLinkageItemComponent(XmlPullParser xpp, Linkage owner) throws XmlPullParserException, IOException, FHIRFormatError { - Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseLinkageLinkageItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseLinkageLinkageItemComponentContent(int eventType, XmlPullParser xpp, Linkage owner, Linkage.LinkageItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Linkage.LinkageType.NULL, new Linkage.LinkageTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ListResource parseListResource(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ListResource res = new ListResource(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseListResourceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseListResourceContent(int eventType, XmlPullParser xpp, ListResource res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ListResource.ListStatus.NULL, new ListResource.ListStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, ListResource.ListMode.NULL, new ListResource.ListModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedBy")) { - res.setOrderedBy(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { - res.getEntry().add(parseListResourceListEntryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("emptyReason")) { - res.setEmptyReason(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ListResource.ListEntryComponent parseListResourceListEntryComponent(XmlPullParser xpp, ListResource owner) throws XmlPullParserException, IOException, FHIRFormatError { - ListResource.ListEntryComponent res = new ListResource.ListEntryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseListResourceListEntryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseListResourceListEntryComponentContent(int eventType, XmlPullParser xpp, ListResource owner, ListResource.ListEntryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("flag")) { - res.setFlag(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deleted")) { - res.setDeletedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.setItem(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Location parseLocation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Location res = new Location(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseLocationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseLocationContent(int eventType, XmlPullParser xpp, Location res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Location.LocationStatus.NULL, new Location.LocationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { - res.setOperationalStatus(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { - res.getAlias().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, Location.LocationMode.NULL, new Location.LocationModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.setAddress(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalType")) { - res.setPhysicalType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("position")) { - res.setPosition(parseLocationLocationPositionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { - res.setManagingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.setPartOf(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Location.LocationPositionComponent parseLocationLocationPositionComponent(XmlPullParser xpp, Location owner) throws XmlPullParserException, IOException, FHIRFormatError { - Location.LocationPositionComponent res = new Location.LocationPositionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseLocationLocationPositionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseLocationLocationPositionComponentContent(int eventType, XmlPullParser xpp, Location owner, Location.LocationPositionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("longitude")) { - res.setLongitudeElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("latitude")) { - res.setLatitudeElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("altitude")) { - res.setAltitudeElement(parseDecimal(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Measure parseMeasure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Measure res = new Measure(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureContent(int eventType, XmlPullParser xpp, Measure res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { - res.getContributor().add(parseContributor(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { - res.getLibrary().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disclaimer")) { - res.setDisclaimerElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scoring")) { - res.setScoring(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositeScoring")) { - res.setCompositeScoring(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("riskAdjustment")) { - res.setRiskAdjustmentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rateAggregation")) { - res.setRateAggregationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rationale")) { - res.setRationaleElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalRecommendationStatement")) { - res.setClinicalRecommendationStatementElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("improvementNotation")) { - res.setImprovementNotationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("guidance")) { - res.setGuidanceElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("set")) { - res.setSetElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { - res.getGroup().add(parseMeasureMeasureGroupComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplementalData")) { - res.getSupplementalData().add(parseMeasureMeasureSupplementalDataComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Measure.MeasureGroupComponent parseMeasureMeasureGroupComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { - Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureMeasureGroupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureMeasureGroupComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { - res.getPopulation().add(parseMeasureMeasureGroupPopulationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratifier")) { - res.getStratifier().add(parseMeasureMeasureGroupStratifierComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Measure.MeasureGroupPopulationComponent parseMeasureMeasureGroupPopulationComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { - Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureMeasureGroupPopulationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureMeasureGroupPopulationComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { - res.setCriteriaElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Measure.MeasureGroupStratifierComponent parseMeasureMeasureGroupStratifierComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { - Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureMeasureGroupStratifierComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureMeasureGroupStratifierComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureGroupStratifierComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { - res.setCriteriaElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Measure.MeasureSupplementalDataComponent parseMeasureMeasureSupplementalDataComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { - Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureMeasureSupplementalDataComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureMeasureSupplementalDataComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureSupplementalDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.getUsage().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { - res.setCriteriaElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MeasureReport parseMeasureReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MeasureReport res = new MeasureReport(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureReportContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureReportContent(int eventType, XmlPullParser xpp, MeasureReport res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, MeasureReport.MeasureReportStatus.NULL, new MeasureReport.MeasureReportStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, MeasureReport.MeasureReportType.NULL, new MeasureReport.MeasureReportTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { - res.setMeasure(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reportingOrganization")) { - res.setReportingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { - res.getGroup().add(parseMeasureReportMeasureReportGroupComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evaluatedResources")) { - res.setEvaluatedResources(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MeasureReport.MeasureReportGroupComponent parseMeasureReportMeasureReportGroupComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureReportMeasureReportGroupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureReportMeasureReportGroupComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.MeasureReportGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { - res.getPopulation().add(parseMeasureReportMeasureReportGroupPopulationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measureScore")) { - res.setMeasureScoreElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratifier")) { - res.getStratifier().add(parseMeasureReportMeasureReportGroupStratifierComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportMeasureReportGroupPopulationComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureReportMeasureReportGroupPopulationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureReportMeasureReportGroupPopulationComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.MeasureReportGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { - res.setCountElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patients")) { - res.setPatients(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportMeasureReportGroupStratifierComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureReportMeasureReportGroupStratifierComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureReportMeasureReportGroupStratifierComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.MeasureReportGroupStratifierComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratum")) { - res.getStratum().add(parseMeasureReportStratifierGroupComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureReportStratifierGroupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureReportStratifierGroupComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.StratifierGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { - res.getPopulation().add(parseMeasureReportStratifierGroupPopulationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measureScore")) { - res.setMeasureScoreElement(parseDecimal(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMeasureReportStratifierGroupPopulationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMeasureReportStratifierGroupPopulationComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.StratifierGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { - res.setCountElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patients")) { - res.setPatients(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Media parseMedia(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Media res = new Media(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMediaContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMediaContent(int eventType, XmlPullParser xpp, Media res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Media.DigitalMediaType.NULL, new Media.DigitalMediaTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { - res.setSubtype(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("view")) { - res.setView(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { - res.setOperator(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { - res.setDevice(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("height")) { - res.setHeightElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("width")) { - res.setWidthElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frames")) { - res.setFramesElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { - res.setDurationElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.setContent(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Medication parseMedication(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Medication res = new Medication(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationContent(int eventType, XmlPullParser xpp, Medication res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Medication.MedicationStatus.NULL, new Medication.MedicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isBrand")) { - res.setIsBrandElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isOverTheCounter")) { - res.setIsOverTheCounterElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { - res.setManufacturer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { - res.setForm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { - res.getIngredient().add(parseMedicationMedicationIngredientComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("package")) { - res.setPackage(parseMedicationMedicationPackageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { - res.getImage().add(parseAttachment(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Medication.MedicationIngredientComponent parseMedicationMedicationIngredientComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { - Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationMedicationIngredientComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationMedicationIngredientComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationIngredientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { - res.setItem(parseType("item", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isActive")) { - res.setIsActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseRatio(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Medication.MedicationPackageComponent parseMedicationMedicationPackageComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { - Medication.MedicationPackageComponent res = new Medication.MedicationPackageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationMedicationPackageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationMedicationPackageComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationPackageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("container")) { - res.setContainer(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { - res.getContent().add(parseMedicationMedicationPackageContentComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("batch")) { - res.getBatch().add(parseMedicationMedicationPackageBatchComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Medication.MedicationPackageContentComponent parseMedicationMedicationPackageContentComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { - Medication.MedicationPackageContentComponent res = new Medication.MedicationPackageContentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationMedicationPackageContentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationMedicationPackageContentComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationPackageContentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { - res.setItem(parseType("item", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseSimpleQuantity(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Medication.MedicationPackageBatchComponent parseMedicationMedicationPackageBatchComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { - Medication.MedicationPackageBatchComponent res = new Medication.MedicationPackageBatchComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationMedicationPackageBatchComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationMedicationPackageBatchComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationPackageBatchComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { - res.setLotNumberElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { - res.setExpirationDateElement(parseDateTime(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationAdministration parseMedicationAdministration(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationAdministration res = new MedicationAdministration(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationAdministrationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationAdministrationContent(int eventType, XmlPullParser xpp, MedicationAdministration res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, MedicationAdministration.MedicationAdministrationStatus.NULL, new MedicationAdministration.MedicationAdministrationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { - res.setMedication(parseType("medication", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { - res.getSupportingInformation().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { - res.setEffective(parseType("effective", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseMedicationAdministrationMedicationAdministrationPerformerComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notGiven")) { - res.setNotGivenElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonNotGiven")) { - res.getReasonNotGiven().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { - res.getDevice().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { - res.setDosage(parseMedicationAdministrationMedicationAdministrationDosageComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { - res.getEventHistory().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationMedicationAdministrationPerformerComponent(XmlPullParser xpp, MedicationAdministration owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationAdministrationMedicationAdministrationPerformerComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationAdministrationMedicationAdministrationPerformerComponentContent(int eventType, XmlPullParser xpp, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationPerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationMedicationAdministrationDosageComponent(XmlPullParser xpp, MedicationAdministration owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationAdministrationMedicationAdministrationDosageComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationAdministrationMedicationAdministrationDosageComponentContent(int eventType, XmlPullParser xpp, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationDosageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { - res.setSite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { - res.setRoute(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dose")) { - res.setDose(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { - res.setRate(parseType("rate", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationDispense parseMedicationDispense(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationDispense res = new MedicationDispense(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationDispenseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationDispenseContent(int eventType, XmlPullParser xpp, MedicationDispense res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, MedicationDispense.MedicationDispenseStatus.NULL, new MedicationDispense.MedicationDispenseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { - res.setMedication(parseType("medication", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { - res.getSupportingInformation().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseMedicationDispenseMedicationDispensePerformerComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorizingPrescription")) { - res.getAuthorizingPrescription().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysSupply")) { - res.setDaysSupply(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenPrepared")) { - res.setWhenPreparedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenHandedOver")) { - res.setWhenHandedOverElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.setDestination(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { - res.getReceiver().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosageInstruction")) { - res.getDosageInstruction().add(parseDosage(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { - res.setSubstitution(parseMedicationDispenseMedicationDispenseSubstitutionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detectedIssue")) { - res.getDetectedIssue().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDone")) { - res.setNotDoneElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "notDoneReason")) { - res.setNotDoneReason(parseType("notDoneReason", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { - res.getEventHistory().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispenseMedicationDispensePerformerComponent(XmlPullParser xpp, MedicationDispense owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationDispenseMedicationDispensePerformerComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationDispenseMedicationDispensePerformerComponentContent(int eventType, XmlPullParser xpp, MedicationDispense owner, MedicationDispense.MedicationDispensePerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationDispense.MedicationDispenseSubstitutionComponent parseMedicationDispenseMedicationDispenseSubstitutionComponent(XmlPullParser xpp, MedicationDispense owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationDispenseMedicationDispenseSubstitutionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationDispenseMedicationDispenseSubstitutionComponentContent(int eventType, XmlPullParser xpp, MedicationDispense owner, MedicationDispense.MedicationDispenseSubstitutionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("wasSubstituted")) { - res.setWasSubstitutedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsibleParty")) { - res.getResponsibleParty().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationRequest parseMedicationRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationRequest res = new MedicationRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationRequestContent(int eventType, XmlPullParser xpp, MedicationRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { - res.setGroupIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestStatus.NULL, new MedicationRequest.MedicationRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { - res.setIntentElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestIntent.NULL, new MedicationRequest.MedicationRequestIntentEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestPriority.NULL, new MedicationRequest.MedicationRequestPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { - res.setMedication(parseType("medication", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { - res.getSupportingInformation().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { - res.setRequester(parseMedicationRequestMedicationRequestRequesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { - res.setRecorder(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosageInstruction")) { - res.getDosageInstruction().add(parseDosage(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dispenseRequest")) { - res.setDispenseRequest(parseMedicationRequestMedicationRequestDispenseRequestComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { - res.setSubstitution(parseMedicationRequestMedicationRequestSubstitutionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priorPrescription")) { - res.setPriorPrescription(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detectedIssue")) { - res.getDetectedIssue().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { - res.getEventHistory().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationRequest.MedicationRequestRequesterComponent parseMedicationRequestMedicationRequestRequesterComponent(XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationRequest.MedicationRequestRequesterComponent res = new MedicationRequest.MedicationRequestRequesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationRequestMedicationRequestRequesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationRequestMedicationRequestRequesterComponentContent(int eventType, XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.setAgent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestMedicationRequestDispenseRequestComponent(XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationRequestMedicationRequestDispenseRequestComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationRequestMedicationRequestDispenseRequestComponentContent(int eventType, XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestDispenseRequestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { - res.setValidityPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfRepeatsAllowed")) { - res.setNumberOfRepeatsAllowedElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expectedSupplyDuration")) { - res.setExpectedSupplyDuration(parseDuration(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationRequest.MedicationRequestSubstitutionComponent parseMedicationRequestMedicationRequestSubstitutionComponent(XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationRequestMedicationRequestSubstitutionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationRequestMedicationRequestSubstitutionComponentContent(int eventType, XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestSubstitutionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allowed")) { - res.setAllowedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MedicationStatement parseMedicationStatement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MedicationStatement res = new MedicationStatement(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMedicationStatementContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMedicationStatementContent(int eventType, XmlPullParser xpp, MedicationStatement res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, MedicationStatement.MedicationStatementStatus.NULL, new MedicationStatement.MedicationStatementStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { - res.setMedication(parseType("medication", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { - res.setEffective(parseType("effective", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateAsserted")) { - res.setDateAssertedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationSource")) { - res.setInformationSource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { - res.getDerivedFrom().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("taken")) { - res.setTakenElement(parseEnumeration(xpp, MedicationStatement.MedicationStatementTaken.NULL, new MedicationStatement.MedicationStatementTakenEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonNotTaken")) { - res.getReasonNotTaken().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { - res.getDosage().add(parseDosage(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageDefinition parseMessageDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MessageDefinition res = new MessageDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageDefinitionContent(int eventType, XmlPullParser xpp, MessageDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { - res.setBase(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { - res.getParent().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { - res.getReplaces().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.setEvent(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategoryElement(parseEnumeration(xpp, MessageDefinition.MessageSignificanceCategory.NULL, new MessageDefinition.MessageSignificanceCategoryEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { - res.getFocus().add(parseMessageDefinitionMessageDefinitionFocusComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseRequired")) { - res.setResponseRequiredElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allowedResponse")) { - res.getAllowedResponse().add(parseMessageDefinitionMessageDefinitionAllowedResponseComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionMessageDefinitionFocusComponent(XmlPullParser xpp, MessageDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageDefinitionMessageDefinitionFocusComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageDefinitionMessageDefinitionFocusComponentContent(int eventType, XmlPullParser xpp, MessageDefinition owner, MessageDefinition.MessageDefinitionFocusComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseUnsignedInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageDefinition.MessageDefinitionAllowedResponseComponent parseMessageDefinitionMessageDefinitionAllowedResponseComponent(XmlPullParser xpp, MessageDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageDefinitionMessageDefinitionAllowedResponseComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageDefinitionMessageDefinitionAllowedResponseComponentContent(int eventType, XmlPullParser xpp, MessageDefinition owner, MessageDefinition.MessageDefinitionAllowedResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { - res.setMessage(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("situation")) { - res.setSituationElement(parseMarkdown(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageHeader parseMessageHeader(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - MessageHeader res = new MessageHeader(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageHeaderContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageHeaderContent(int eventType, XmlPullParser xpp, MessageHeader res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { - res.setEvent(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.getDestination().add(parseMessageHeaderMessageDestinationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { - res.setSender(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timestamp")) { - res.setTimestampElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { - res.setEnterer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseMessageHeaderMessageSourceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { - res.setResponsible(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponse(parseMessageHeaderMessageHeaderResponseComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { - res.getFocus().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageHeader.MessageDestinationComponent parseMessageHeaderMessageDestinationComponent(XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { - MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageHeaderMessageDestinationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageHeaderMessageDestinationComponentContent(int eventType, XmlPullParser xpp, MessageHeader owner, MessageHeader.MessageDestinationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.setEndpointElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { - res.setReceiver(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { - MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageHeaderMessageSourceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageHeaderMessageSourceComponentContent(int eventType, XmlPullParser xpp, MessageHeader owner, MessageHeader.MessageSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { - res.setSoftwareElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.setContact(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.setEndpointElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderMessageHeaderResponseComponent(XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { - MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseMessageHeaderMessageHeaderResponseComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseMessageHeaderMessageHeaderResponseComponentContent(int eventType, XmlPullParser xpp, MessageHeader owner, MessageHeader.MessageHeaderResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifierElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, MessageHeader.ResponseType.NULL, new MessageHeader.ResponseTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("details")) { - res.setDetails(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NamingSystem parseNamingSystem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - NamingSystem res = new NamingSystem(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNamingSystemContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNamingSystemContent(int eventType, XmlPullParser xpp, NamingSystem res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, NamingSystem.NamingSystemType.NULL, new NamingSystem.NamingSystemTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { - res.setResponsibleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uniqueId")) { - res.getUniqueId().add(parseNamingSystemNamingSystemUniqueIdComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replacedBy")) { - res.setReplacedBy(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemNamingSystemUniqueIdComponent(XmlPullParser xpp, NamingSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { - NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNamingSystemNamingSystemUniqueIdComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNamingSystemNamingSystemUniqueIdComponentContent(int eventType, XmlPullParser xpp, NamingSystem owner, NamingSystem.NamingSystemUniqueIdComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, NamingSystem.NamingSystemIdentifierType.NULL, new NamingSystem.NamingSystemIdentifierTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { - res.setPreferredElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder parseNutritionOrder(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder res = new NutritionOrder(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderContent(int eventType, XmlPullParser xpp, NutritionOrder res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, NutritionOrder.NutritionOrderStatus.NULL, new NutritionOrder.NutritionOrderStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateTime")) { - res.setDateTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderer")) { - res.setOrderer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allergyIntolerance")) { - res.getAllergyIntolerance().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("foodPreferenceModifier")) { - res.getFoodPreferenceModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeFoodModifier")) { - res.getExcludeFoodModifier().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("oralDiet")) { - res.setOralDiet(parseNutritionOrderNutritionOrderOralDietComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplement")) { - res.getSupplement().add(parseNutritionOrderNutritionOrderSupplementComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enteralFormula")) { - res.setEnteralFormula(parseNutritionOrderNutritionOrderEnteralFormulaComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderNutritionOrderOralDietComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderNutritionOrderOralDietComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderNutritionOrderOralDietComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { - res.getSchedule().add(parseTiming(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nutrient")) { - res.getNutrient().add(parseNutritionOrderNutritionOrderOralDietNutrientComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("texture")) { - res.getTexture().add(parseNutritionOrderNutritionOrderOralDietTextureComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fluidConsistencyType")) { - res.getFluidConsistencyType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { - res.setInstructionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderNutritionOrderOralDietNutrientComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderNutritionOrderOralDietNutrientComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderNutritionOrderOralDietNutrientComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietNutrientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.setModifier(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseSimpleQuantity(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder.NutritionOrderOralDietTextureComponent parseNutritionOrderNutritionOrderOralDietTextureComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderNutritionOrderOralDietTextureComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderNutritionOrderOralDietTextureComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietTextureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.setModifier(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("foodType")) { - res.setFoodType(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder.NutritionOrderSupplementComponent parseNutritionOrderNutritionOrderSupplementComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderNutritionOrderSupplementComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderNutritionOrderSupplementComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderSupplementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productName")) { - res.setProductNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { - res.getSchedule().add(parseTiming(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { - res.setInstructionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder.NutritionOrderEnteralFormulaComponent parseNutritionOrderNutritionOrderEnteralFormulaComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderNutritionOrderEnteralFormulaComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderNutritionOrderEnteralFormulaComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseFormulaType")) { - res.setBaseFormulaType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseFormulaProductName")) { - res.setBaseFormulaProductNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additiveType")) { - res.setAdditiveType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additiveProductName")) { - res.setAdditiveProductNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("caloricDensity")) { - res.setCaloricDensity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("routeofAdministration")) { - res.setRouteofAdministration(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administration")) { - res.getAdministration().add(parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxVolumeToDeliver")) { - res.setMaxVolumeToDeliver(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administrationInstruction")) { - res.setAdministrationInstructionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { - NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { - res.setSchedule(parseTiming(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { - res.setRate(parseType("rate", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Observation parseObservation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Observation res = new Observation(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseObservationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseObservationContent(int eventType, XmlPullParser xpp, Observation res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Observation.ObservationStatus.NULL, new Observation.ObservationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { - res.setEffective(parseType("effective", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { - res.setIssuedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { - res.setDataAbsentReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpretation")) { - res.setInterpretation(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { - res.setSpecimen(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { - res.setDevice(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { - res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { - res.getRelated().add(parseObservationObservationRelatedComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { - res.getComponent().add(parseObservationObservationComponentComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Observation.ObservationReferenceRangeComponent parseObservationObservationReferenceRangeComponent(XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { - Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseObservationObservationReferenceRangeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseObservationObservationReferenceRangeComponentContent(int eventType, XmlPullParser xpp, Observation owner, Observation.ObservationReferenceRangeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("low")) { - res.setLow(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("high")) { - res.setHigh(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appliesTo")) { - res.getAppliesTo().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("age")) { - res.setAge(parseRange(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Observation.ObservationRelatedComponent parseObservationObservationRelatedComponent(XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { - Observation.ObservationRelatedComponent res = new Observation.ObservationRelatedComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseObservationObservationRelatedComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseObservationObservationRelatedComponentContent(int eventType, XmlPullParser xpp, Observation owner, Observation.ObservationRelatedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Observation.ObservationRelationshipType.NULL, new Observation.ObservationRelationshipTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Observation.ObservationComponentComponent parseObservationObservationComponentComponent(XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { - Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseObservationObservationComponentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseObservationObservationComponentComponentContent(int eventType, XmlPullParser xpp, Observation owner, Observation.ObservationComponentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { - res.setDataAbsentReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpretation")) { - res.setInterpretation(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { - res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected OperationDefinition parseOperationDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - OperationDefinition res = new OperationDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOperationDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOperationDefinitionContent(int eventType, XmlPullParser xpp, OperationDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, OperationDefinition.OperationKind.NULL, new OperationDefinition.OperationKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("idempotent")) { - res.setIdempotentElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { - res.setBase(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.getResource().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { - res.setInstanceElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { - res.getParameter().add(parseOperationDefinitionOperationDefinitionParameterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overload")) { - res.getOverload().add(parseOperationDefinitionOperationDefinitionOverloadComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionOperationDefinitionParameterComponent(XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOperationDefinitionOperationDefinitionParameterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOperationDefinitionOperationDefinitionParameterComponentContent(int eventType, XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUseElement(parseEnumeration(xpp, OperationDefinition.OperationParameterUse.NULL, new OperationDefinition.OperationParameterUseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchType")) { - res.setSearchTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binding")) { - res.setBinding(parseOperationDefinitionOperationDefinitionParameterBindingComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { - res.getPart().add(parseOperationDefinitionOperationDefinitionParameterComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionOperationDefinitionParameterBindingComponent(XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOperationDefinitionOperationDefinitionParameterBindingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOperationDefinitionOperationDefinitionParameterBindingComponentContent(int eventType, XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterBindingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { - res.setStrengthElement(parseEnumeration(xpp, Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "valueSet")) { - res.setValueSet(parseType("valueSet", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected OperationDefinition.OperationDefinitionOverloadComponent parseOperationDefinitionOperationDefinitionOverloadComponent(XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOperationDefinitionOperationDefinitionOverloadComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOperationDefinitionOperationDefinitionOverloadComponentContent(int eventType, XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionOverloadComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameterName")) { - res.getParameterName().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected OperationOutcome parseOperationOutcome(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - OperationOutcome res = new OperationOutcome(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOperationOutcomeContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOperationOutcomeContent(int eventType, XmlPullParser xpp, OperationOutcome res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issue")) { - res.getIssue().add(parseOperationOutcomeOperationOutcomeIssueComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeOperationOutcomeIssueComponent(XmlPullParser xpp, OperationOutcome owner) throws XmlPullParserException, IOException, FHIRFormatError { - OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOperationOutcomeOperationOutcomeIssueComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOperationOutcomeOperationOutcomeIssueComponentContent(int eventType, XmlPullParser xpp, OperationOutcome owner, OperationOutcome.OperationOutcomeIssueComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { - res.setSeverityElement(parseEnumeration(xpp, OperationOutcome.IssueSeverity.NULL, new OperationOutcome.IssueSeverityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseEnumeration(xpp, OperationOutcome.IssueType.NULL, new OperationOutcome.IssueTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("details")) { - res.setDetails(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnostics")) { - res.setDiagnosticsElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.getLocation().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.getExpression().add(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Organization parseOrganization(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Organization res = new Organization(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOrganizationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOrganizationContent(int eventType, XmlPullParser xpp, Organization res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.getType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { - res.getAlias().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.getAddress().add(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.setPartOf(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseOrganizationOrganizationContactComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Organization.OrganizationContactComponent parseOrganizationOrganizationContactComponent(XmlPullParser xpp, Organization owner) throws XmlPullParserException, IOException, FHIRFormatError { - Organization.OrganizationContactComponent res = new Organization.OrganizationContactComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseOrganizationOrganizationContactComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseOrganizationOrganizationContactComponentContent(int eventType, XmlPullParser xpp, Organization owner, Organization.OrganizationContactComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurpose(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setName(parseHumanName(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.setAddress(parseAddress(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Patient parsePatient(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Patient res = new Patient(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePatientContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePatientContent(int eventType, XmlPullParser xpp, Patient res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.getName().add(parseHumanName(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { - res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { - res.setBirthDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "deceased")) { - res.setDeceased(parseType("deceased", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.getAddress().add(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maritalStatus")) { - res.setMaritalStatus(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "multipleBirth")) { - res.setMultipleBirth(parseType("multipleBirth", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { - res.getPhoto().add(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parsePatientContactComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("animal")) { - res.setAnimal(parsePatientAnimalComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { - res.getCommunication().add(parsePatientPatientCommunicationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("generalPractitioner")) { - res.getGeneralPractitioner().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { - res.setManagingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parsePatientPatientLinkComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Patient.ContactComponent parsePatientContactComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { - Patient.ContactComponent res = new Patient.ContactComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePatientContactComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePatientContactComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.ContactComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.getRelationship().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setName(parseHumanName(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.setAddress(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { - res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Patient.AnimalComponent parsePatientAnimalComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { - Patient.AnimalComponent res = new Patient.AnimalComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePatientAnimalComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePatientAnimalComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.AnimalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("species")) { - res.setSpecies(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("breed")) { - res.setBreed(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("genderStatus")) { - res.setGenderStatus(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Patient.PatientCommunicationComponent parsePatientPatientCommunicationComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { - Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePatientPatientCommunicationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePatientPatientCommunicationComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.PatientCommunicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguage(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { - res.setPreferredElement(parseBoolean(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Patient.PatientLinkComponent parsePatientPatientLinkComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { - Patient.PatientLinkComponent res = new Patient.PatientLinkComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePatientPatientLinkComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePatientPatientLinkComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.PatientLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("other")) { - res.setOther(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Patient.LinkType.NULL, new Patient.LinkTypeEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PaymentNotice parsePaymentNotice(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - PaymentNotice res = new PaymentNotice(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePaymentNoticeContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePaymentNoticeContent(int eventType, XmlPullParser xpp, PaymentNotice res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, PaymentNotice.PaymentNoticeStatus.NULL, new PaymentNotice.PaymentNoticeStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponse(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { - res.setStatusDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentStatus")) { - res.setPaymentStatus(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected PaymentReconciliation parsePaymentReconciliation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - PaymentReconciliation res = new PaymentReconciliation(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePaymentReconciliationContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePaymentReconciliationContent(int eventType, XmlPullParser xpp, PaymentReconciliation res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, PaymentReconciliation.PaymentReconciliationStatus.NULL, new PaymentReconciliation.PaymentReconciliationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { - res.setDispositionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { - res.setRequestProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { - res.setRequestOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.getDetail().add(parsePaymentReconciliationDetailsComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { - res.setForm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { - res.setTotal(parseMoney(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { - res.getProcessNote().add(parsePaymentReconciliationNotesComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected PaymentReconciliation.DetailsComponent parsePaymentReconciliationDetailsComponent(XmlPullParser xpp, PaymentReconciliation owner) throws XmlPullParserException, IOException, FHIRFormatError { - PaymentReconciliation.DetailsComponent res = new PaymentReconciliation.DetailsComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePaymentReconciliationDetailsComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePaymentReconciliationDetailsComponentContent(int eventType, XmlPullParser xpp, PaymentReconciliation owner, PaymentReconciliation.DetailsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponse(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("submitter")) { - res.setSubmitter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { - res.setPayee(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { - res.setAmount(parseMoney(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PaymentReconciliation.NotesComponent parsePaymentReconciliationNotesComponent(XmlPullParser xpp, PaymentReconciliation owner) throws XmlPullParserException, IOException, FHIRFormatError { - PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePaymentReconciliationNotesComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePaymentReconciliationNotesComponentContent(int eventType, XmlPullParser xpp, PaymentReconciliation owner, PaymentReconciliation.NotesComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Person parsePerson(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Person res = new Person(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePersonContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePersonContent(int eventType, XmlPullParser xpp, Person res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.getName().add(parseHumanName(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { - res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { - res.setBirthDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.getAddress().add(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { - res.setPhoto(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { - res.setManagingOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parsePersonPersonLinkComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Person.PersonLinkComponent parsePersonPersonLinkComponent(XmlPullParser xpp, Person owner) throws XmlPullParserException, IOException, FHIRFormatError { - Person.PersonLinkComponent res = new Person.PersonLinkComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePersonPersonLinkComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePersonPersonLinkComponentContent(int eventType, XmlPullParser xpp, Person owner, Person.PersonLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assurance")) { - res.setAssuranceElement(parseEnumeration(xpp, Person.IdentityAssuranceLevel.NULL, new Person.IdentityAssuranceLevelEnumFactory())); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition parsePlanDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition res = new PlanDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionContent(int eventType, XmlPullParser xpp, PlanDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { - res.getContributor().add(parseContributor(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { - res.getLibrary().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { - res.getGoal().add(parsePlanDefinitionPlanDefinitionGoalComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionPlanDefinitionGoalComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionGoalComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionGoalComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescription(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriority(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStart(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { - res.getAddresses().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.getDocumentation().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.getTarget().add(parsePlanDefinitionPlanDefinitionGoalTargetComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionPlanDefinitionGoalTargetComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionGoalTargetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionGoalTargetComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { - res.setMeasure(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "detail")) { - res.setDetail(parseType("detail", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("due")) { - res.setDue(parseDuration(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionPlanDefinitionActionComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionActionComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { - res.setLabelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textEquivalent")) { - res.setTextEquivalentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.getDocumentation().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goalId")) { - res.getGoalId().add(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("triggerDefinition")) { - res.getTriggerDefinition().add(parseTriggerDefinition(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.getCondition().add(parsePlanDefinitionPlanDefinitionActionConditionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { - res.getInput().add(parseDataRequirement(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("output")) { - res.getOutput().add(parseDataRequirement(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAction")) { - res.getRelatedAction().add(parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { - res.setTiming(parseType("timing", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parsePlanDefinitionPlanDefinitionActionParticipantComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingBehavior")) { - res.setGroupingBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionGroupingBehavior.NULL, new PlanDefinition.ActionGroupingBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("selectionBehavior")) { - res.setSelectionBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionSelectionBehavior.NULL, new PlanDefinition.ActionSelectionBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requiredBehavior")) { - res.setRequiredBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionRequiredBehavior.NULL, new PlanDefinition.ActionRequiredBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precheckBehavior")) { - res.setPrecheckBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionPrecheckBehavior.NULL, new PlanDefinition.ActionPrecheckBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cardinalityBehavior")) { - res.setCardinalityBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionCardinalityBehavior.NULL, new PlanDefinition.ActionCardinalityBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinition(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { - res.setTransform(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dynamicValue")) { - res.getDynamicValue().add(parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionPlanDefinitionActionConditionComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionActionConditionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionActionConditionComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, PlanDefinition.ActionConditionKind.NULL, new PlanDefinition.ActionConditionKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionActionRelatedActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionActionRelatedActionComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionRelatedActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionId")) { - res.setActionIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationshipElement(parseEnumeration(xpp, PlanDefinition.ActionRelationshipType.NULL, new PlanDefinition.ActionRelationshipTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "offset")) { - res.setOffset(parseType("offset", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionPlanDefinitionActionParticipantComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionActionParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionActionParticipantComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, PlanDefinition.ActionParticipantType.NULL, new PlanDefinition.ActionParticipantTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePlanDefinitionPlanDefinitionActionDynamicValueComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePlanDefinitionPlanDefinitionActionDynamicValueComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionDynamicValueComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Practitioner parsePractitioner(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Practitioner res = new Practitioner(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePractitionerContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePractitionerContent(int eventType, XmlPullParser xpp, Practitioner res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.getName().add(parseHumanName(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.getAddress().add(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { - res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { - res.setBirthDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { - res.getPhoto().add(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { - res.getQualification().add(parsePractitionerPractitionerQualificationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { - res.getCommunication().add(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Practitioner.PractitionerQualificationComponent parsePractitionerPractitionerQualificationComponent(XmlPullParser xpp, Practitioner owner) throws XmlPullParserException, IOException, FHIRFormatError { - Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePractitionerPractitionerQualificationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePractitionerPractitionerQualificationComponentContent(int eventType, XmlPullParser xpp, Practitioner owner, Practitioner.PractitionerQualificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { - res.setIssuer(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PractitionerRole parsePractitionerRole(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - PractitionerRole res = new PractitionerRole(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePractitionerRoleContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePractitionerRoleContent(int eventType, XmlPullParser xpp, PractitionerRole res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practitioner")) { - res.setPractitioner(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { - res.getSpecialty().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.getLocation().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("healthcareService")) { - res.getHealthcareService().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableTime")) { - res.getAvailableTime().add(parsePractitionerRolePractitionerRoleAvailableTimeComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notAvailable")) { - res.getNotAvailable().add(parsePractitionerRolePractitionerRoleNotAvailableComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { - res.setAvailabilityExceptionsElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.getEndpoint().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected PractitionerRole.PractitionerRoleAvailableTimeComponent parsePractitionerRolePractitionerRoleAvailableTimeComponent(XmlPullParser xpp, PractitionerRole owner) throws XmlPullParserException, IOException, FHIRFormatError { - PractitionerRole.PractitionerRoleAvailableTimeComponent res = new PractitionerRole.PractitionerRoleAvailableTimeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePractitionerRolePractitionerRoleAvailableTimeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePractitionerRolePractitionerRoleAvailableTimeComponentContent(int eventType, XmlPullParser xpp, PractitionerRole owner, PractitionerRole.PractitionerRoleAvailableTimeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { - res.getDaysOfWeek().add(parseEnumeration(xpp, PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { - res.setAllDayElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableStartTime")) { - res.setAvailableStartTimeElement(parseTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableEndTime")) { - res.setAvailableEndTimeElement(parseTime(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected PractitionerRole.PractitionerRoleNotAvailableComponent parsePractitionerRolePractitionerRoleNotAvailableComponent(XmlPullParser xpp, PractitionerRole owner) throws XmlPullParserException, IOException, FHIRFormatError { - PractitionerRole.PractitionerRoleNotAvailableComponent res = new PractitionerRole.PractitionerRoleNotAvailableComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parsePractitionerRolePractitionerRoleNotAvailableComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parsePractitionerRolePractitionerRoleNotAvailableComponentContent(int eventType, XmlPullParser xpp, PractitionerRole owner, PractitionerRole.PractitionerRoleNotAvailableComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("during")) { - res.setDuring(parsePeriod(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Procedure parseProcedure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Procedure res = new Procedure(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcedureContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcedureContent(int eventType, XmlPullParser xpp, Procedure res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Procedure.ProcedureStatus.NULL, new Procedure.ProcedureStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDone")) { - res.setNotDoneElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDoneReason")) { - res.setNotDoneReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "performed")) { - res.setPerformed(parseType("performed", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.getPerformer().add(parseProcedureProcedurePerformerComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.getBodySite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("report")) { - res.getReport().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("complication")) { - res.getComplication().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("complicationDetail")) { - res.getComplicationDetail().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("followUp")) { - res.getFollowUp().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focalDevice")) { - res.getFocalDevice().add(parseProcedureProcedureFocalDeviceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usedReference")) { - res.getUsedReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usedCode")) { - res.getUsedCode().add(parseCodeableConcept(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Procedure.ProcedurePerformerComponent parseProcedureProcedurePerformerComponent(XmlPullParser xpp, Procedure owner) throws XmlPullParserException, IOException, FHIRFormatError { - Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcedureProcedurePerformerComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcedureProcedurePerformerComponentContent(int eventType, XmlPullParser xpp, Procedure owner, Procedure.ProcedurePerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRole(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.setActor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Procedure.ProcedureFocalDeviceComponent parseProcedureProcedureFocalDeviceComponent(XmlPullParser xpp, Procedure owner) throws XmlPullParserException, IOException, FHIRFormatError { - Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcedureProcedureFocalDeviceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcedureProcedureFocalDeviceComponentContent(int eventType, XmlPullParser xpp, Procedure owner, Procedure.ProcedureFocalDeviceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.setAction(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manipulated")) { - res.setManipulated(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ProcedureRequest parseProcedureRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ProcedureRequest res = new ProcedureRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcedureRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcedureRequestContent(int eventType, XmlPullParser xpp, ProcedureRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { - res.getReplaces().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requisition")) { - res.setRequisition(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ProcedureRequest.ProcedureRequestStatus.NULL, new ProcedureRequest.ProcedureRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { - res.setIntentElement(parseEnumeration(xpp, ProcedureRequest.ProcedureRequestIntent.NULL, new ProcedureRequest.ProcedureRequestIntentEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, ProcedureRequest.ProcedureRequestPriority.NULL, new ProcedureRequest.ProcedureRequestPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { - res.setDoNotPerformElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "asNeeded")) { - res.setAsNeeded(parseType("asNeeded", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { - res.setRequester(parseProcedureRequestProcedureRequestRequesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { - res.setPerformerType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { - res.getReasonCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { - res.getReasonReference().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { - res.getSupportingInfo().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { - res.getSpecimen().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.getBodySite().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { - res.getRelevantHistory().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ProcedureRequest.ProcedureRequestRequesterComponent parseProcedureRequestProcedureRequestRequesterComponent(XmlPullParser xpp, ProcedureRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - ProcedureRequest.ProcedureRequestRequesterComponent res = new ProcedureRequest.ProcedureRequestRequesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcedureRequestProcedureRequestRequesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcedureRequestProcedureRequestRequesterComponentContent(int eventType, XmlPullParser xpp, ProcedureRequest owner, ProcedureRequest.ProcedureRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.setAgent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ProcessRequest parseProcessRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ProcessRequest res = new ProcessRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcessRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcessRequestContent(int eventType, XmlPullParser xpp, ProcessRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ProcessRequest.ProcessRequestStatus.NULL, new ProcessRequest.ProcessRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.setActionElement(parseEnumeration(xpp, ProcessRequest.ActionList.NULL, new ProcessRequest.ActionListEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.setTarget(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { - res.setProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponse(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nullify")) { - res.setNullifyElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { - res.setReferenceElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseProcessRequestItemsComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { - res.getInclude().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { - res.getExclude().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ProcessRequest.ItemsComponent parseProcessRequestItemsComponent(XmlPullParser xpp, ProcessRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - ProcessRequest.ItemsComponent res = new ProcessRequest.ItemsComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcessRequestItemsComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcessRequestItemsComponentContent(int eventType, XmlPullParser xpp, ProcessRequest owner, ProcessRequest.ItemsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { - res.setSequenceLinkIdElement(parseInteger(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ProcessResponse parseProcessResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ProcessResponse res = new ProcessResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcessResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcessResponseContent(int eventType, XmlPullParser xpp, ProcessResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ProcessResponse.ProcessResponseStatus.NULL, new ProcessResponse.ProcessResponseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { - res.setCreatedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { - res.setOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.setRequest(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { - res.setDispositionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { - res.setRequestProvider(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { - res.setRequestOrganization(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { - res.setForm(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { - res.getProcessNote().add(parseProcessResponseProcessResponseProcessNoteComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { - res.getError().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationRequest")) { - res.getCommunicationRequest().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ProcessResponse.ProcessResponseProcessNoteComponent parseProcessResponseProcessResponseProcessNoteComponent(XmlPullParser xpp, ProcessResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - ProcessResponse.ProcessResponseProcessNoteComponent res = new ProcessResponse.ProcessResponseProcessNoteComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProcessResponseProcessResponseProcessNoteComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProcessResponseProcessResponseProcessNoteComponentContent(int eventType, XmlPullParser xpp, ProcessResponse owner, ProcessResponse.ProcessResponseProcessNoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Provenance parseProvenance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Provenance res = new Provenance(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProvenanceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProvenanceContent(int eventType, XmlPullParser xpp, Provenance res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.getTarget().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { - res.setRecordedElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { - res.getPolicy().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { - res.setLocation(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.getReason().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activity")) { - res.setActivity(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.getAgent().add(parseProvenanceProvenanceAgentComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { - res.getEntity().add(parseProvenanceProvenanceEntityComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { - res.getSignature().add(parseSignature(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Provenance.ProvenanceAgentComponent parseProvenanceProvenanceAgentComponent(XmlPullParser xpp, Provenance owner) throws XmlPullParserException, IOException, FHIRFormatError { - Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProvenanceProvenanceAgentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProvenanceProvenanceAgentComponentContent(int eventType, XmlPullParser xpp, Provenance owner, Provenance.ProvenanceAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.getRole().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "who")) { - res.setWho(parseType("who", xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onBehalfOf")) { - res.setOnBehalfOf(parseType("onBehalfOf", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAgentType")) { - res.setRelatedAgentType(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Provenance.ProvenanceEntityComponent parseProvenanceProvenanceEntityComponent(XmlPullParser xpp, Provenance owner) throws XmlPullParserException, IOException, FHIRFormatError { - Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseProvenanceProvenanceEntityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseProvenanceProvenanceEntityComponentContent(int eventType, XmlPullParser xpp, Provenance owner, Provenance.ProvenanceEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { - res.setRoleElement(parseEnumeration(xpp, Provenance.ProvenanceEntityRole.NULL, new Provenance.ProvenanceEntityRoleEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "what")) { - res.setWhat(parseType("what", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.getAgent().add(parseProvenanceProvenanceAgentComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Questionnaire parseQuestionnaire(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Questionnaire res = new Questionnaire(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireContent(int eventType, XmlPullParser xpp, Questionnaire res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectType")) { - res.getSubjectType().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireQuestionnaireItemComponent(XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { - Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireQuestionnaireItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireQuestionnaireItemComponentContent(int eventType, XmlPullParser xpp, Questionnaire owner, Questionnaire.QuestionnaireItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { - res.setLinkIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinitionElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { - res.setPrefixElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Questionnaire.QuestionnaireItemType.NULL, new Questionnaire.QuestionnaireItemTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enableWhen")) { - res.getEnableWhen().add(parseQuestionnaireQuestionnaireItemEnableWhenComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { - res.setRequiredElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeats")) { - res.setRepeatsElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readOnly")) { - res.setReadOnlyElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxLength")) { - res.setMaxLengthElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("options")) { - res.setOptions(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("option")) { - res.getOption().add(parseQuestionnaireQuestionnaireItemOptionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "initial")) { - res.setInitial(parseType("initial", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireQuestionnaireItemEnableWhenComponent(XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { - Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireQuestionnaireItemEnableWhenComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireQuestionnaireItemEnableWhenComponentContent(int eventType, XmlPullParser xpp, Questionnaire owner, Questionnaire.QuestionnaireItemEnableWhenComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("question")) { - res.setQuestionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hasAnswer")) { - res.setHasAnswerElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "answer")) { - res.setAnswer(parseType("answer", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Questionnaire.QuestionnaireItemOptionComponent parseQuestionnaireQuestionnaireItemOptionComponent(XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { - Questionnaire.QuestionnaireItemOptionComponent res = new Questionnaire.QuestionnaireItemOptionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireQuestionnaireItemOptionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireQuestionnaireItemOptionComponentContent(int eventType, XmlPullParser xpp, Questionnaire owner, Questionnaire.QuestionnaireItemOptionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected QuestionnaireResponse parseQuestionnaireResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - QuestionnaireResponse res = new QuestionnaireResponse(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireResponseContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireResponseContent(int eventType, XmlPullParser xpp, QuestionnaireResponse res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { - res.getParent().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("questionnaire")) { - res.setQuestionnaire(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, QuestionnaireResponse.QuestionnaireResponseStatus.NULL, new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authored")) { - res.setAuthoredElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.setSource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseQuestionnaireResponseItemComponent(XmlPullParser xpp, QuestionnaireResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireResponseQuestionnaireResponseItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireResponseQuestionnaireResponseItemComponentContent(int eventType, XmlPullParser xpp, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { - res.setLinkIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinitionElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { - res.setTextElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answer")) { - res.getAnswer().add(parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(XmlPullParser xpp, QuestionnaireResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { - QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentContent(int eventType, XmlPullParser xpp, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { - res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected RelatedPerson parseRelatedPerson(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - RelatedPerson res = new RelatedPerson(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRelatedPersonContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRelatedPersonContent(int eventType, XmlPullParser xpp, RelatedPerson res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationship(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.getName().add(parseHumanName(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { - res.getTelecom().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { - res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { - res.setBirthDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { - res.getAddress().add(parseAddress(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { - res.getPhoto().add(parseAttachment(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected RequestGroup parseRequestGroup(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - RequestGroup res = new RequestGroup(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRequestGroupContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRequestGroupContent(int eventType, XmlPullParser xpp, RequestGroup res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.getDefinition().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { - res.getReplaces().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { - res.setGroupIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, RequestGroup.RequestStatus.NULL, new RequestGroup.RequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { - res.setIntentElement(parseEnumeration(xpp, RequestGroup.RequestIntent.NULL, new RequestGroup.RequestIntentEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, RequestGroup.RequestPriority.NULL, new RequestGroup.RequestPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { - res.setAuthor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { - res.setReason(parseType("reason", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseRequestGroupRequestGroupActionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected RequestGroup.RequestGroupActionComponent parseRequestGroupRequestGroupActionComponent(XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { - RequestGroup.RequestGroupActionComponent res = new RequestGroup.RequestGroupActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRequestGroupRequestGroupActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRequestGroupRequestGroupActionComponentContent(int eventType, XmlPullParser xpp, RequestGroup owner, RequestGroup.RequestGroupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { - res.setLabelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textEquivalent")) { - res.setTextEquivalentElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.getCode().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.getDocumentation().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.getCondition().add(parseRequestGroupRequestGroupActionConditionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAction")) { - res.getRelatedAction().add(parseRequestGroupRequestGroupActionRelatedActionComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { - res.setTiming(parseType("timing", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingBehavior")) { - res.setGroupingBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionGroupingBehavior.NULL, new RequestGroup.ActionGroupingBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("selectionBehavior")) { - res.setSelectionBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionSelectionBehavior.NULL, new RequestGroup.ActionSelectionBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requiredBehavior")) { - res.setRequiredBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionRequiredBehavior.NULL, new RequestGroup.ActionRequiredBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precheckBehavior")) { - res.setPrecheckBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionPrecheckBehavior.NULL, new RequestGroup.ActionPrecheckBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cardinalityBehavior")) { - res.setCardinalityBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionCardinalityBehavior.NULL, new RequestGroup.ActionCardinalityBehaviorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseRequestGroupRequestGroupActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected RequestGroup.RequestGroupActionConditionComponent parseRequestGroupRequestGroupActionConditionComponent(XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { - RequestGroup.RequestGroupActionConditionComponent res = new RequestGroup.RequestGroupActionConditionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRequestGroupRequestGroupActionConditionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRequestGroupRequestGroupActionConditionComponentContent(int eventType, XmlPullParser xpp, RequestGroup owner, RequestGroup.RequestGroupActionConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, RequestGroup.ActionConditionKind.NULL, new RequestGroup.ActionConditionKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected RequestGroup.RequestGroupActionRelatedActionComponent parseRequestGroupRequestGroupActionRelatedActionComponent(XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { - RequestGroup.RequestGroupActionRelatedActionComponent res = new RequestGroup.RequestGroupActionRelatedActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRequestGroupRequestGroupActionRelatedActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRequestGroupRequestGroupActionRelatedActionComponentContent(int eventType, XmlPullParser xpp, RequestGroup owner, RequestGroup.RequestGroupActionRelatedActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionId")) { - res.setActionIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { - res.setRelationshipElement(parseEnumeration(xpp, RequestGroup.ActionRelationshipType.NULL, new RequestGroup.ActionRelationshipTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "offset")) { - res.setOffset(parseType("offset", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ResearchStudy parseResearchStudy(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ResearchStudy res = new ResearchStudy(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseResearchStudyContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseResearchStudyContent(int eventType, XmlPullParser xpp, ResearchStudy res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { - res.getProtocol().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ResearchStudy.ResearchStudyStatus.NULL, new ResearchStudy.ResearchStudyStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { - res.getFocus().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("keyword")) { - res.getKeyword().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enrollment")) { - res.getEnrollment().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sponsor")) { - res.setSponsor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("principalInvestigator")) { - res.setPrincipalInvestigator(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { - res.getSite().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonStopped")) { - res.setReasonStopped(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("arm")) { - res.getArm().add(parseResearchStudyResearchStudyArmComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ResearchStudy.ResearchStudyArmComponent parseResearchStudyResearchStudyArmComponent(XmlPullParser xpp, ResearchStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { - ResearchStudy.ResearchStudyArmComponent res = new ResearchStudy.ResearchStudyArmComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseResearchStudyResearchStudyArmComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseResearchStudyResearchStudyArmComponentContent(int eventType, XmlPullParser xpp, ResearchStudy owner, ResearchStudy.ResearchStudyArmComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ResearchSubject parseResearchSubject(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ResearchSubject res = new ResearchSubject(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseResearchSubjectContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseResearchSubjectContent(int eventType, XmlPullParser xpp, ResearchSubject res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, ResearchSubject.ResearchSubjectStatus.NULL, new ResearchSubject.ResearchSubjectStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { - res.setStudy(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("individual")) { - res.setIndividual(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assignedArm")) { - res.setAssignedArmElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actualArm")) { - res.setActualArmElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("consent")) { - res.setConsent(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected RiskAssessment parseRiskAssessment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - RiskAssessment res = new RiskAssessment(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRiskAssessmentContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRiskAssessmentContent(int eventType, XmlPullParser xpp, RiskAssessment res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.setBasedOn(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { - res.setParent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, RiskAssessment.RiskAssessmentStatus.NULL, new RiskAssessment.RiskAssessmentStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.setCondition(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { - res.setReason(parseType("reason", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basis")) { - res.getBasis().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prediction")) { - res.getPrediction().add(parseRiskAssessmentRiskAssessmentPredictionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mitigation")) { - res.setMitigationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentRiskAssessmentPredictionComponent(XmlPullParser xpp, RiskAssessment owner) throws XmlPullParserException, IOException, FHIRFormatError { - RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseRiskAssessmentRiskAssessmentPredictionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseRiskAssessmentRiskAssessmentPredictionComponentContent(int eventType, XmlPullParser xpp, RiskAssessment owner, RiskAssessment.RiskAssessmentPredictionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { - res.setOutcome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "probability")) { - res.setProbability(parseType("probability", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualitativeRisk")) { - res.setQualitativeRisk(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relativeRisk")) { - res.setRelativeRiskElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "when")) { - res.setWhen(parseType("when", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rationale")) { - res.setRationaleElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Schedule parseSchedule(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Schedule res = new Schedule(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseScheduleContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseScheduleContent(int eventType, XmlPullParser xpp, Schedule res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { - res.setActiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { - res.setServiceCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { - res.getServiceType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { - res.getSpecialty().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { - res.getActor().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("planningHorizon")) { - res.setPlanningHorizon(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected SearchParameter parseSearchParameter(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - SearchParameter res = new SearchParameter(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSearchParameterContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSearchParameterContent(int eventType, XmlPullParser xpp, SearchParameter res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { - res.getBase().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { - res.setDerivedFromElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpath")) { - res.setXpathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpathUsage")) { - res.setXpathUsageElement(parseEnumeration(xpp, SearchParameter.XPathUsageType.NULL, new SearchParameter.XPathUsageTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.getTarget().add(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { - res.getComparator().add(parseEnumeration(xpp, SearchParameter.SearchComparator.NULL, new SearchParameter.SearchComparatorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { - res.getModifier().add(parseEnumeration(xpp, SearchParameter.SearchModifierCode.NULL, new SearchParameter.SearchModifierCodeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("chain")) { - res.getChain().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { - res.getComponent().add(parseSearchParameterSearchParameterComponentComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected SearchParameter.SearchParameterComponentComponent parseSearchParameterSearchParameterComponentComponent(XmlPullParser xpp, SearchParameter owner) throws XmlPullParserException, IOException, FHIRFormatError { - SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSearchParameterSearchParameterComponentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSearchParameterSearchParameterComponentComponentContent(int eventType, XmlPullParser xpp, SearchParameter owner, SearchParameter.SearchParameterComponentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { - res.setDefinition(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Sequence parseSequence(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Sequence res = new Sequence(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSequenceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSequenceContent(int eventType, XmlPullParser xpp, Sequence res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Sequence.SequenceType.NULL, new Sequence.SequenceTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coordinateSystem")) { - res.setCoordinateSystemElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { - res.setSpecimen(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { - res.setDevice(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { - res.setPerformer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeq")) { - res.setReferenceSeq(parseSequenceSequenceReferenceSeqComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variant")) { - res.getVariant().add(parseSequenceSequenceVariantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observedSeq")) { - res.setObservedSeqElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quality")) { - res.getQuality().add(parseSequenceSequenceQualityComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readCoverage")) { - res.setReadCoverageElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repository")) { - res.getRepository().add(parseSequenceSequenceRepositoryComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pointer")) { - res.getPointer().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Sequence.SequenceReferenceSeqComponent parseSequenceSequenceReferenceSeqComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { - Sequence.SequenceReferenceSeqComponent res = new Sequence.SequenceReferenceSeqComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSequenceSequenceReferenceSeqComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSequenceSequenceReferenceSeqComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceReferenceSeqComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("chromosome")) { - res.setChromosome(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("genomeBuild")) { - res.setGenomeBuildElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqId")) { - res.setReferenceSeqId(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqPointer")) { - res.setReferenceSeqPointer(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqString")) { - res.setReferenceSeqStringElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strand")) { - res.setStrandElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("windowStart")) { - res.setWindowStartElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("windowEnd")) { - res.setWindowEndElement(parseInteger(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Sequence.SequenceVariantComponent parseSequenceSequenceVariantComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { - Sequence.SequenceVariantComponent res = new Sequence.SequenceVariantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSequenceSequenceVariantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSequenceSequenceVariantComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceVariantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observedAllele")) { - res.setObservedAlleleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceAllele")) { - res.setReferenceAlleleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cigar")) { - res.setCigarElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantPointer")) { - res.setVariantPointer(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Sequence.SequenceQualityComponent parseSequenceSequenceQualityComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { - Sequence.SequenceQualityComponent res = new Sequence.SequenceQualityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSequenceSequenceQualityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSequenceSequenceQualityComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceQualityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Sequence.QualityType.NULL, new Sequence.QualityTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("standardSequence")) { - res.setStandardSequence(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { - res.setScore(parseQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("truthTP")) { - res.setTruthTPElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("queryTP")) { - res.setQueryTPElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("truthFN")) { - res.setTruthFNElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("queryFP")) { - res.setQueryFPElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gtFP")) { - res.setGtFPElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precision")) { - res.setPrecisionElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recall")) { - res.setRecallElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fScore")) { - res.setFScoreElement(parseDecimal(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Sequence.SequenceRepositoryComponent parseSequenceSequenceRepositoryComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { - Sequence.SequenceRepositoryComponent res = new Sequence.SequenceRepositoryComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSequenceSequenceRepositoryComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSequenceSequenceRepositoryComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceRepositoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Sequence.RepositoryType.NULL, new Sequence.RepositoryTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("datasetId")) { - res.setDatasetIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantsetId")) { - res.setVariantsetIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readsetId")) { - res.setReadsetIdElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ServiceDefinition parseServiceDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ServiceDefinition res = new ServiceDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseServiceDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseServiceDefinitionContent(int eventType, XmlPullParser xpp, ServiceDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { - res.setUsageElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { - res.setApprovalDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { - res.setLastReviewDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { - res.setEffectivePeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { - res.getTopic().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { - res.getContributor().add(parseContributor(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { - res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("trigger")) { - res.getTrigger().add(parseTriggerDefinition(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { - res.getDataRequirement().add(parseDataRequirement(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationDefinition")) { - res.setOperationDefinition(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Slot parseSlot(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Slot res = new Slot(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSlotContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSlotContent(int eventType, XmlPullParser xpp, Slot res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { - res.setServiceCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { - res.getServiceType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { - res.getSpecialty().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentType")) { - res.setAppointmentType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { - res.setSchedule(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Slot.SlotStatus.NULL, new Slot.SlotStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { - res.setStartElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overbooked")) { - res.setOverbookedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Specimen parseSpecimen(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Specimen res = new Specimen(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSpecimenContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSpecimenContent(int eventType, XmlPullParser xpp, Specimen res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accessionIdentifier")) { - res.setAccessionIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Specimen.SpecimenStatus.NULL, new Specimen.SpecimenStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { - res.setSubject(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receivedTime")) { - res.setReceivedTimeElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { - res.getParent().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { - res.getRequest().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collection")) { - res.setCollection(parseSpecimenSpecimenCollectionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processing")) { - res.getProcessing().add(parseSpecimenSpecimenProcessingComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("container")) { - res.getContainer().add(parseSpecimenSpecimenContainerComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Specimen.SpecimenCollectionComponent parseSpecimenSpecimenCollectionComponent(XmlPullParser xpp, Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { - Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSpecimenSpecimenCollectionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSpecimenSpecimenCollectionComponentContent(int eventType, XmlPullParser xpp, Specimen owner, Specimen.SpecimenCollectionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collector")) { - res.setCollector(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "collected")) { - res.setCollected(parseType("collected", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { - res.setMethod(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { - res.setBodySite(parseCodeableConcept(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Specimen.SpecimenProcessingComponent parseSpecimenSpecimenProcessingComponent(XmlPullParser xpp, Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { - Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSpecimenSpecimenProcessingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSpecimenSpecimenProcessingComponentContent(int eventType, XmlPullParser xpp, Specimen owner, Specimen.SpecimenProcessingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { - res.setProcedure(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additive")) { - res.getAdditive().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "time")) { - res.setTime(parseType("time", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Specimen.SpecimenContainerComponent parseSpecimenSpecimenContainerComponent(XmlPullParser xpp, Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { - Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSpecimenSpecimenContainerComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSpecimenSpecimenContainerComponentContent(int eventType, XmlPullParser xpp, Specimen owner, Specimen.SpecimenContainerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capacity")) { - res.setCapacity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimenQuantity")) { - res.setSpecimenQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "additive")) { - res.setAdditive(parseType("additive", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureDefinition parseStructureDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - StructureDefinition res = new StructureDefinition(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureDefinitionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureDefinitionContent(int eventType, XmlPullParser xpp, StructureDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("keyword")) { - res.getKeyword().add(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { - res.setFhirVersionElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mapping")) { - res.getMapping().add(parseStructureDefinitionStructureDefinitionMappingComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { - res.setKindElement(parseEnumeration(xpp, StructureDefinition.StructureDefinitionKind.NULL, new StructureDefinition.StructureDefinitionKindEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abstract")) { - res.setAbstractElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextType")) { - res.setContextTypeElement(parseEnumeration(xpp, StructureDefinition.ExtensionContext.NULL, new StructureDefinition.ExtensionContextEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.getContext().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextInvariant")) { - res.getContextInvariant().add(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseDefinition")) { - res.setBaseDefinitionElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivation")) { - res.setDerivationElement(parseEnumeration(xpp, StructureDefinition.TypeDerivationRule.NULL, new StructureDefinition.TypeDerivationRuleEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("snapshot")) { - res.setSnapshot(parseStructureDefinitionStructureDefinitionSnapshotComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("differential")) { - res.setDifferential(parseStructureDefinitionStructureDefinitionDifferentialComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionStructureDefinitionMappingComponent(XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureDefinitionStructureDefinitionMappingComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureDefinitionStructureDefinitionMappingComponentContent(int eventType, XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionMappingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identity")) { - res.setIdentityElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { - res.setUriElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { - res.setCommentElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureDefinition.StructureDefinitionSnapshotComponent parseStructureDefinitionStructureDefinitionSnapshotComponent(XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureDefinitionStructureDefinitionSnapshotComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureDefinitionStructureDefinitionSnapshotComponentContent(int eventType, XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionSnapshotComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { - res.getElement().add(parseElementDefinition(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionStructureDefinitionDifferentialComponent(XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureDefinitionStructureDefinitionDifferentialComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureDefinitionStructureDefinitionDifferentialComponentContent(int eventType, XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionDifferentialComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { - res.getElement().add(parseElementDefinition(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap parseStructureMap(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap res = new StructureMap(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapContent(int eventType, XmlPullParser xpp, StructureMap res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structure")) { - res.getStructure().add(parseStructureMapStructureMapStructureComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("import")) { - res.getImport().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { - res.getGroup().add(parseStructureMapStructureMapGroupComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapStructureComponent parseStructureMapStructureMapStructureComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapStructureComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapStructureComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapStructureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, StructureMap.StructureMapModelMode.NULL, new StructureMap.StructureMapModelModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { - res.setAliasElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupComponent parseStructureMapStructureMapGroupComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extends")) { - res.setExtendsElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeMode")) { - res.setTypeModeElement(parseEnumeration(xpp, StructureMap.StructureMapGroupTypeMode.NULL, new StructureMap.StructureMapGroupTypeModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { - res.getInput().add(parseStructureMapStructureMapGroupInputComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupInputComponent parseStructureMapStructureMapGroupInputComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupInputComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupInputComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupInputComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { - res.setModeElement(parseEnumeration(xpp, StructureMap.StructureMapInputMode.NULL, new StructureMap.StructureMapInputModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupRuleComponent parseStructureMapStructureMapGroupRuleComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupRuleComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupRuleComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { - res.getSource().add(parseStructureMapStructureMapGroupRuleSourceComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { - res.getTarget().add(parseStructureMapStructureMapGroupRuleTargetComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependent")) { - res.getDependent().add(parseStructureMapStructureMapGroupRuleDependentComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { - res.setDocumentationElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapStructureMapGroupRuleSourceComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupRuleSourceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupRuleSourceComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContextElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { - res.setMinElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { - res.setMaxElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "defaultValue")) { - res.setDefaultValue(parseType("defaultValue", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { - res.setElementElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listMode")) { - res.setListModeElement(parseEnumeration(xpp, StructureMap.StructureMapSourceListMode.NULL, new StructureMap.StructureMapSourceListModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { - res.setVariableElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { - res.setConditionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("check")) { - res.setCheckElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupRuleTargetComponent parseStructureMapStructureMapGroupRuleTargetComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupRuleTargetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupRuleTargetComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContextElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextType")) { - res.setContextTypeElement(parseEnumeration(xpp, StructureMap.StructureMapContextType.NULL, new StructureMap.StructureMapContextTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { - res.setElementElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { - res.setVariableElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listMode")) { - res.getListMode().add(parseEnumeration(xpp, StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listRuleId")) { - res.setListRuleIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { - res.setTransformElement(parseEnumeration(xpp, StructureMap.StructureMapTransform.NULL, new StructureMap.StructureMapTransformEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { - res.getParameter().add(parseStructureMapStructureMapGroupRuleTargetParameterComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapStructureMapGroupRuleTargetParameterComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupRuleTargetParameterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupRuleTargetParameterComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleTargetParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapStructureMapGroupRuleDependentComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { - StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseStructureMapStructureMapGroupRuleDependentComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseStructureMapStructureMapGroupRuleDependentComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleDependentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { - res.getVariable().add(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Subscription parseSubscription(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Subscription res = new Subscription(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSubscriptionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSubscriptionContent(int eventType, XmlPullParser xpp, Subscription res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Subscription.SubscriptionStatus.NULL, new Subscription.SubscriptionStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactPoint(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { - res.setEndElement(parseInstant(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReasonElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { - res.setCriteriaElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { - res.setErrorElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("channel")) { - res.setChannel(parseSubscriptionSubscriptionChannelComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tag")) { - res.getTag().add(parseCoding(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Subscription.SubscriptionChannelComponent parseSubscriptionSubscriptionChannelComponent(XmlPullParser xpp, Subscription owner) throws XmlPullParserException, IOException, FHIRFormatError { - Subscription.SubscriptionChannelComponent res = new Subscription.SubscriptionChannelComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSubscriptionSubscriptionChannelComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSubscriptionSubscriptionChannelComponentContent(int eventType, XmlPullParser xpp, Subscription owner, Subscription.SubscriptionChannelComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, Subscription.SubscriptionChannelType.NULL, new Subscription.SubscriptionChannelTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { - res.setEndpointElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { - res.setPayloadElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("header")) { - res.getHeader().add(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Substance parseSubstance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Substance res = new Substance(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSubstanceContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSubstanceContent(int eventType, XmlPullParser xpp, Substance res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Substance.FHIRSubstanceStatus.NULL, new Substance.FHIRSubstanceStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.getCategory().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { - res.getInstance().add(parseSubstanceSubstanceInstanceComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { - res.getIngredient().add(parseSubstanceSubstanceIngredientComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Substance.SubstanceInstanceComponent parseSubstanceSubstanceInstanceComponent(XmlPullParser xpp, Substance owner) throws XmlPullParserException, IOException, FHIRFormatError { - Substance.SubstanceInstanceComponent res = new Substance.SubstanceInstanceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSubstanceSubstanceInstanceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSubstanceSubstanceInstanceComponentContent(int eventType, XmlPullParser xpp, Substance owner, Substance.SubstanceInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expiry")) { - res.setExpiryElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Substance.SubstanceIngredientComponent parseSubstanceSubstanceIngredientComponent(XmlPullParser xpp, Substance owner) throws XmlPullParserException, IOException, FHIRFormatError { - Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSubstanceSubstanceIngredientComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSubstanceSubstanceIngredientComponentContent(int eventType, XmlPullParser xpp, Substance owner, Substance.SubstanceIngredientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseRatio(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "substance")) { - res.setSubstance(parseType("substance", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected SupplyDelivery parseSupplyDelivery(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - SupplyDelivery res = new SupplyDelivery(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSupplyDeliveryContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSupplyDeliveryContent(int eventType, XmlPullParser xpp, SupplyDelivery res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, SupplyDelivery.SupplyDeliveryStatus.NULL, new SupplyDelivery.SupplyDeliveryStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suppliedItem")) { - res.setSuppliedItem(parseSupplyDeliverySupplyDeliverySuppliedItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplier")) { - res.setSupplier(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.setDestination(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { - res.getReceiver().add(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySupplyDeliverySuppliedItemComponent(XmlPullParser xpp, SupplyDelivery owner) throws XmlPullParserException, IOException, FHIRFormatError { - SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSupplyDeliverySupplyDeliverySuppliedItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSupplyDeliverySupplyDeliverySuppliedItemComponentContent(int eventType, XmlPullParser xpp, SupplyDelivery owner, SupplyDelivery.SupplyDeliverySuppliedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { - res.setItem(parseType("item", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected SupplyRequest parseSupplyRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - SupplyRequest res = new SupplyRequest(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSupplyRequestContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSupplyRequestContent(int eventType, XmlPullParser xpp, SupplyRequest res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, SupplyRequest.SupplyRequestStatus.NULL, new SupplyRequest.SupplyRequestStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { - res.setCategory(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, SupplyRequest.RequestPriority.NULL, new SupplyRequest.RequestPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedItem")) { - res.setOrderedItem(parseSupplyRequestSupplyRequestOrderedItemComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { - res.setOccurrence(parseType("occurrence", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { - res.setRequester(parseSupplyRequestSupplyRequestRequesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplier")) { - res.getSupplier().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { - res.setReason(parseType("reason", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deliverFrom")) { - res.setDeliverFrom(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deliverTo")) { - res.setDeliverTo(parseReference(xpp)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected SupplyRequest.SupplyRequestOrderedItemComponent parseSupplyRequestSupplyRequestOrderedItemComponent(XmlPullParser xpp, SupplyRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - SupplyRequest.SupplyRequestOrderedItemComponent res = new SupplyRequest.SupplyRequestOrderedItemComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSupplyRequestSupplyRequestOrderedItemComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSupplyRequestSupplyRequestOrderedItemComponentContent(int eventType, XmlPullParser xpp, SupplyRequest owner, SupplyRequest.SupplyRequestOrderedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { - res.setQuantity(parseQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { - res.setItem(parseType("item", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected SupplyRequest.SupplyRequestRequesterComponent parseSupplyRequestSupplyRequestRequesterComponent(XmlPullParser xpp, SupplyRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { - SupplyRequest.SupplyRequestRequesterComponent res = new SupplyRequest.SupplyRequestRequesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseSupplyRequestSupplyRequestRequesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseSupplyRequestSupplyRequestRequesterComponentContent(int eventType, XmlPullParser xpp, SupplyRequest owner, SupplyRequest.SupplyRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.setAgent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Task parseTask(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - Task res = new Task(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTaskContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTaskContent(int eventType, XmlPullParser xpp, Task res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "definition")) { - res.setDefinition(parseType("definition", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { - res.getBasedOn().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { - res.setGroupIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { - res.getPartOf().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Task.TaskStatus.NULL, new Task.TaskStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { - res.setStatusReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessStatus")) { - res.setBusinessStatus(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { - res.setIntentElement(parseEnumeration(xpp, Task.TaskIntent.NULL, new Task.TaskIntentEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { - res.setPriorityElement(parseEnumeration(xpp, Task.TaskPriority.NULL, new Task.TaskPriorityEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCode(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { - res.setFocus(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("for")) { - res.setFor(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { - res.setContext(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("executionPeriod")) { - res.setExecutionPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { - res.setAuthoredOnElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastModified")) { - res.setLastModifiedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { - res.setRequester(parseTaskTaskRequesterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { - res.getPerformerType().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { - res.setOwner(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { - res.setReason(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { - res.getRelevantHistory().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("restriction")) { - res.setRestriction(parseTaskTaskRestrictionComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { - res.getInput().add(parseTaskParameterComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("output")) { - res.getOutput().add(parseTaskTaskOutputComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected Task.TaskRequesterComponent parseTaskTaskRequesterComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { - Task.TaskRequesterComponent res = new Task.TaskRequesterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTaskTaskRequesterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTaskTaskRequesterComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.TaskRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { - res.setAgent(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { - res.setOnBehalfOf(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Task.TaskRestrictionComponent parseTaskTaskRestrictionComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { - Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTaskTaskRestrictionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTaskTaskRestrictionComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.TaskRestrictionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repetitions")) { - res.setRepetitionsElement(parsePositiveInt(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { - res.setPeriod(parsePeriod(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { - res.getRecipient().add(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Task.ParameterComponent parseTaskParameterComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { - Task.ParameterComponent res = new Task.ParameterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTaskParameterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTaskParameterComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.ParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected Task.TaskOutputComponent parseTaskTaskOutputComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { - Task.TaskOutputComponent res = new Task.TaskOutputComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTaskTaskOutputComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTaskTaskOutputComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.TaskOutputComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport parseTestReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport res = new TestReport(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportContent(int eventType, XmlPullParser xpp, TestReport res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, TestReport.TestReportStatus.NULL, new TestReport.TestReportStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("testScript")) { - res.setTestScript(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { - res.setResultElement(parseEnumeration(xpp, TestReport.TestReportResult.NULL, new TestReport.TestReportResultEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { - res.setScoreElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tester")) { - res.setTesterElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { - res.setIssuedElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { - res.getParticipant().add(parseTestReportTestReportParticipantComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("setup")) { - res.setSetup(parseTestReportTestReportSetupComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("test")) { - res.getTest().add(parseTestReportTestReportTestComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("teardown")) { - res.setTeardown(parseTestReportTestReportTeardownComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.TestReportParticipantComponent parseTestReportTestReportParticipantComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportTestReportParticipantComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportTestReportParticipantComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setTypeElement(parseEnumeration(xpp, TestReport.TestReportParticipantType.NULL, new TestReport.TestReportParticipantTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { - res.setUriElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.TestReportSetupComponent parseTestReportTestReportSetupComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportTestReportSetupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportTestReportSetupComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportSetupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseTestReportSetupActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.SetupActionComponent res = new TestReport.SetupActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportSetupActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportSetupActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.SetupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { - res.setAssert(parseTestReportSetupActionAssertComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportSetupActionOperationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportSetupActionOperationComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.SetupActionOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { - res.setResultElement(parseEnumeration(xpp, TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { - res.setMessageElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.setDetailElement(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.SetupActionAssertComponent parseTestReportSetupActionAssertComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportSetupActionAssertComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportSetupActionAssertComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.SetupActionAssertComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { - res.setResultElement(parseEnumeration(xpp, TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { - res.setMessageElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { - res.setDetailElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.TestReportTestComponent parseTestReportTestReportTestComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportTestReportTestComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportTestReportTestComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportTestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseTestReportTestActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.TestActionComponent parseTestReportTestActionComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.TestActionComponent res = new TestReport.TestActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportTestActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportTestActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { - res.setAssert(parseTestReportSetupActionAssertComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.TestReportTeardownComponent parseTestReportTestReportTeardownComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportTestReportTeardownComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportTestReportTeardownComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportTeardownComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseTestReportTeardownActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestReportTeardownActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestReportTeardownActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TeardownActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript parseTestScript(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript res = new TestScript(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptContent(int eventType, XmlPullParser xpp, TestScript res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifier(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { - res.getOrigin().add(parseTestScriptTestScriptOriginComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.getDestination().add(parseTestScriptTestScriptDestinationComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("metadata")) { - res.setMetadata(parseTestScriptTestScriptMetadataComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fixture")) { - res.getFixture().add(parseTestScriptTestScriptFixtureComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.getProfile().add(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { - res.getVariable().add(parseTestScriptTestScriptVariableComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.getRule().add(parseTestScriptTestScriptRuleComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleset")) { - res.getRuleset().add(parseTestScriptTestScriptRulesetComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("setup")) { - res.setSetup(parseTestScriptTestScriptSetupComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("test")) { - res.getTest().add(parseTestScriptTestScriptTestComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("teardown")) { - res.setTeardown(parseTestScriptTestScriptTeardownComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptOriginComponent parseTestScriptTestScriptOriginComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptOriginComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptOriginComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptOriginComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("index")) { - res.setIndexElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptDestinationComponent parseTestScriptTestScriptDestinationComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptDestinationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptDestinationComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptDestinationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("index")) { - res.setIndexElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { - res.setProfile(parseCoding(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptMetadataComponent parseTestScriptTestScriptMetadataComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptMetadataComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptMetadataComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptMetadataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parseTestScriptTestScriptMetadataLinkComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capability")) { - res.getCapability().add(parseTestScriptTestScriptMetadataCapabilityComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptMetadataLinkComponent parseTestScriptTestScriptMetadataLinkComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptMetadataLinkComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptMetadataLinkComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptMetadataLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptMetadataCapabilityComponent parseTestScriptTestScriptMetadataCapabilityComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptMetadataCapabilityComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptMetadataCapabilityComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptMetadataCapabilityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { - res.setRequiredElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validated")) { - res.setValidatedElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { - res.getOrigin().add(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.setDestinationElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { - res.getLink().add(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capabilities")) { - res.setCapabilities(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptFixtureComponent parseTestScriptTestScriptFixtureComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptFixtureComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptFixtureComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptFixtureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("autocreate")) { - res.setAutocreateElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("autodelete")) { - res.setAutodeleteElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseReference(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptVariableComponent parseTestScriptTestScriptVariableComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptVariableComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptVariableComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptVariableComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("defaultValue")) { - res.setDefaultValueElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("headerField")) { - res.setHeaderFieldElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hint")) { - res.setHintElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { - res.setSourceIdElement(parseId(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptRuleComponent parseTestScriptTestScriptRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptRuleComponent res = new TestScript.TestScriptRuleComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptRuleComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { - res.getParam().add(parseTestScriptRuleParamComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.RuleParamComponent parseTestScriptRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.RuleParamComponent res = new TestScript.RuleParamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptRuleParamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.RuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptRulesetComponent parseTestScriptTestScriptRulesetComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptRulesetComponent res = new TestScript.TestScriptRulesetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptRulesetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptRulesetComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptRulesetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResource(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.getRule().add(parseTestScriptRulesetRuleComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.RulesetRuleComponent parseTestScriptRulesetRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.RulesetRuleComponent res = new TestScript.RulesetRuleComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptRulesetRuleComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptRulesetRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.RulesetRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleId")) { - res.setRuleIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { - res.getParam().add(parseTestScriptRulesetRuleParamComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.RulesetRuleParamComponent parseTestScriptRulesetRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.RulesetRuleParamComponent res = new TestScript.RulesetRuleParamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptRulesetRuleParamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptRulesetRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.RulesetRuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptSetupComponent parseTestScriptTestScriptSetupComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptSetupComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptSetupComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptSetupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseTestScriptSetupActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.SetupActionComponent res = new TestScript.SetupActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptSetupActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptSetupActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { - res.setAssert(parseTestScriptSetupActionAssertComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptSetupActionOperationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptSetupActionOperationComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { - res.setType(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResourceElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { - res.setLabelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accept")) { - res.setAcceptElement(parseEnumeration(xpp, TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { - res.setContentTypeElement(parseEnumeration(xpp, TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { - res.setDestinationElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encodeRequestUrl")) { - res.setEncodeRequestUrlElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { - res.setOriginElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("params")) { - res.setParamsElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestHeader")) { - res.getRequestHeader().add(parseTestScriptSetupActionOperationRequestHeaderComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestId")) { - res.setRequestIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseId")) { - res.setResponseIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { - res.setSourceIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetId")) { - res.setTargetIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.SetupActionOperationRequestHeaderComponent parseTestScriptSetupActionOperationRequestHeaderComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptSetupActionOperationRequestHeaderComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptSetupActionOperationRequestHeaderComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionOperationRequestHeaderComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("field")) { - res.setFieldElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.SetupActionAssertComponent parseTestScriptSetupActionAssertComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptSetupActionAssertComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptSetupActionAssertComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionAssertComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { - res.setLabelElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("direction")) { - res.setDirectionElement(parseEnumeration(xpp, TestScript.AssertionDirectionType.NULL, new TestScript.AssertionDirectionTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourceId")) { - res.setCompareToSourceIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourceExpression")) { - res.setCompareToSourceExpressionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourcePath")) { - res.setCompareToSourcePathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { - res.setContentTypeElement(parseEnumeration(xpp, TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { - res.setExpressionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("headerField")) { - res.setHeaderFieldElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("minimumId")) { - res.setMinimumIdElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("navigationLinks")) { - res.setNavigationLinksElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { - res.setOperatorElement(parseEnumeration(xpp, TestScript.AssertionOperatorType.NULL, new TestScript.AssertionOperatorTypeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { - res.setPathElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestMethod")) { - res.setRequestMethodElement(parseEnumeration(xpp, TestScript.TestScriptRequestMethodCode.NULL, new TestScript.TestScriptRequestMethodCodeEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestURL")) { - res.setRequestURLElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { - res.setResourceElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { - res.setResponseElement(parseEnumeration(xpp, TestScript.AssertionResponseTypes.NULL, new TestScript.AssertionResponseTypesEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseCode")) { - res.setResponseCodeElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.setRule(parseTestScriptActionAssertRuleComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleset")) { - res.setRuleset(parseTestScriptActionAssertRulesetComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { - res.setSourceIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validateProfileId")) { - res.setValidateProfileIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("warningOnly")) { - res.setWarningOnlyElement(parseBoolean(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.ActionAssertRuleComponent parseTestScriptActionAssertRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.ActionAssertRuleComponent res = new TestScript.ActionAssertRuleComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptActionAssertRuleComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptActionAssertRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleId")) { - res.setRuleIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { - res.getParam().add(parseTestScriptActionAssertRuleParamComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.ActionAssertRuleParamComponent parseTestScriptActionAssertRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.ActionAssertRuleParamComponent res = new TestScript.ActionAssertRuleParamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptActionAssertRuleParamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptActionAssertRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.ActionAssertRulesetComponent parseTestScriptActionAssertRulesetComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.ActionAssertRulesetComponent res = new TestScript.ActionAssertRulesetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptActionAssertRulesetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptActionAssertRulesetComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRulesetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rulesetId")) { - res.setRulesetIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { - res.getRule().add(parseTestScriptActionAssertRulesetRuleComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.ActionAssertRulesetRuleComponent parseTestScriptActionAssertRulesetRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.ActionAssertRulesetRuleComponent res = new TestScript.ActionAssertRulesetRuleComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptActionAssertRulesetRuleComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptActionAssertRulesetRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRulesetRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleId")) { - res.setRuleIdElement(parseId(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { - res.getParam().add(parseTestScriptActionAssertRulesetRuleParamComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.ActionAssertRulesetRuleParamComponent parseTestScriptActionAssertRulesetRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.ActionAssertRulesetRuleParamComponent res = new TestScript.ActionAssertRulesetRuleParamComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptActionAssertRulesetRuleParamComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptActionAssertRulesetRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRulesetRuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptTestComponent parseTestScriptTestScriptTestComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptTestComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptTestComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptTestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseTestScriptTestActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestActionComponent parseTestScriptTestActionComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestActionComponent res = new TestScript.TestActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { - res.setAssert(parseTestScriptSetupActionAssertComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TestScriptTeardownComponent parseTestScriptTestScriptTeardownComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTestScriptTeardownComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTestScriptTeardownComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptTeardownComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { - res.getAction().add(parseTestScriptTeardownActionComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { - TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseTestScriptTeardownActionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseTestScriptTeardownActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TeardownActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { - res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet parseValueSet(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet res = new ValueSet(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetContent(int eventType, XmlPullParser xpp, ValueSet res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { - res.setUrlElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { - res.setTitleElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { - res.setExperimentalElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { - res.setDateElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { - res.setPublisherElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { - res.getContact().add(parseContactDetail(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { - res.setDescriptionElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { - res.getUseContext().add(parseUsageContext(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { - res.getJurisdiction().add(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("immutable")) { - res.setImmutableElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { - res.setPurposeElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { - res.setCopyrightElement(parseMarkdown(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extensible")) { - res.setExtensibleElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compose")) { - res.setCompose(parseValueSetValueSetComposeComponent(xpp, res)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expansion")) { - res.setExpansion(parseValueSetValueSetExpansionComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ValueSetComposeComponent parseValueSetValueSetComposeComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetValueSetComposeComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetValueSetComposeComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetComposeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lockedDate")) { - res.setLockedDateElement(parseDate(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { - res.setInactiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { - res.getInclude().add(parseValueSetConceptSetComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { - res.getExclude().add(parseValueSetConceptSetComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetConceptSetComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetConceptSetComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptSetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { - res.getConcept().add(parseValueSetConceptReferenceComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { - res.getFilter().add(parseValueSetConceptSetFilterComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { - res.getValueSet().add(parseUri(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetConceptReferenceComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetConceptReferenceComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptReferenceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { - res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetConceptReferenceDesignationComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetConceptReferenceDesignationComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptReferenceDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { - res.setLanguageElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { - res.setUse(parseCoding(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseString(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetConceptSetFilterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetConceptSetFilterComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptSetFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { - res.setPropertyElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("op")) { - res.setOpElement(parseEnumeration(xpp, ValueSet.FilterOperator.NULL, new ValueSet.FilterOperatorEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { - res.setValueElement(parseCode(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ValueSetExpansionComponent parseValueSetValueSetExpansionComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetValueSetExpansionComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetValueSetExpansionComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetExpansionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.setIdentifierElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timestamp")) { - res.setTimestampElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { - res.setTotalElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offset")) { - res.setOffsetElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { - res.getParameter().add(parseValueSetValueSetExpansionParameterComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contains")) { - res.getContains().add(parseValueSetValueSetExpansionContainsComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ValueSetExpansionParameterComponent parseValueSetValueSetExpansionParameterComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetValueSetExpansionParameterComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetValueSetExpansionParameterComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetExpansionParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { - res.setNameElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { - res.setValue(parseType("value", xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected ValueSet.ValueSetExpansionContainsComponent parseValueSetValueSetExpansionContainsComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { - ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseValueSetValueSetExpansionContainsComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseValueSetValueSetExpansionContainsComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetExpansionContainsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { - res.setSystemElement(parseUri(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abstract")) { - res.setAbstractElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { - res.setInactiveElement(parseBoolean(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { - res.setVersionElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { - res.setCodeElement(parseCode(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { - res.setDisplayElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { - res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(xpp, owner)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contains")) { - res.getContains().add(parseValueSetValueSetExpansionContainsComponent(xpp, owner)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - protected VisionPrescription parseVisionPrescription(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - VisionPrescription res = new VisionPrescription(); - parseDomainResourceAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseVisionPrescriptionContent(eventType, xpp, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseVisionPrescriptionContent(int eventType, XmlPullParser xpp, VisionPrescription res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { - res.getIdentifier().add(parseIdentifier(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { - res.setStatusElement(parseEnumeration(xpp, VisionPrescription.VisionStatus.NULL, new VisionPrescription.VisionStatusEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { - res.setPatient(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { - res.setEncounter(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateWritten")) { - res.setDateWrittenElement(parseDateTime(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescriber")) { - res.setPrescriber(parseReference(xpp)); - } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { - res.setReason(parseType("reason", xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dispense")) { - res.getDispense().add(parseVisionPrescriptionVisionPrescriptionDispenseComponent(xpp, res)); - } else if (!parseDomainResourceContent(eventType, xpp, res)) - return false; - return true; - } - - protected VisionPrescription.VisionPrescriptionDispenseComponent parseVisionPrescriptionVisionPrescriptionDispenseComponent(XmlPullParser xpp, VisionPrescription owner) throws XmlPullParserException, IOException, FHIRFormatError { - VisionPrescription.VisionPrescriptionDispenseComponent res = new VisionPrescription.VisionPrescriptionDispenseComponent(); - parseBackboneAttributes(xpp, res); - next(xpp); - int eventType = nextNoWhitespace(xpp); - while (eventType != XmlPullParser.END_TAG) { - if (!parseVisionPrescriptionVisionPrescriptionDispenseComponentContent(eventType, xpp, owner, res)) - unknownContent(xpp); - eventType = nextNoWhitespace(xpp); - } - next(xpp); - parseElementClose(res); - return res; - } - - protected boolean parseVisionPrescriptionVisionPrescriptionDispenseComponentContent(int eventType, XmlPullParser xpp, VisionPrescription owner, VisionPrescription.VisionPrescriptionDispenseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { - if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("product")) { - res.setProduct(parseCodeableConcept(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eye")) { - res.setEyeElement(parseEnumeration(xpp, VisionPrescription.VisionEyes.NULL, new VisionPrescription.VisionEyesEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sphere")) { - res.setSphereElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cylinder")) { - res.setCylinderElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("axis")) { - res.setAxisElement(parseInteger(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prism")) { - res.setPrismElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { - res.setBaseElement(parseEnumeration(xpp, VisionPrescription.VisionBase.NULL, new VisionPrescription.VisionBaseEnumFactory())); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("add")) { - res.setAddElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("power")) { - res.setPowerElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("backCurve")) { - res.setBackCurveElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diameter")) { - res.setDiameterElement(parseDecimal(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { - res.setDuration(parseSimpleQuantity(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { - res.setColorElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("brand")) { - res.setBrandElement(parseString(xpp)); - } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { - res.getNote().add(parseAnnotation(xpp)); - } else if (!parseBackboneContent(eventType, xpp, res)) - return false; - return true; - } - - @Override - protected Resource parseResource(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - if (xpp.getName().equals("Parameters")) - return parseParameters(xpp); - else if (xpp.getName().equals("Account")) - return parseAccount(xpp); - else if (xpp.getName().equals("ActivityDefinition")) - return parseActivityDefinition(xpp); - else if (xpp.getName().equals("AdverseEvent")) - return parseAdverseEvent(xpp); - else if (xpp.getName().equals("AllergyIntolerance")) - return parseAllergyIntolerance(xpp); - else if (xpp.getName().equals("Appointment")) - return parseAppointment(xpp); - else if (xpp.getName().equals("AppointmentResponse")) - return parseAppointmentResponse(xpp); - else if (xpp.getName().equals("AuditEvent")) - return parseAuditEvent(xpp); - else if (xpp.getName().equals("Basic")) - return parseBasic(xpp); - else if (xpp.getName().equals("Binary")) - return parseBinary(xpp); - else if (xpp.getName().equals("BodyStructure")) - return parseBodyStructure(xpp); - else if (xpp.getName().equals("Bundle")) - return parseBundle(xpp); - else if (xpp.getName().equals("CapabilityStatement")) - return parseCapabilityStatement(xpp); - else if (xpp.getName().equals("CarePlan")) - return parseCarePlan(xpp); - else if (xpp.getName().equals("CareTeam")) - return parseCareTeam(xpp); - else if (xpp.getName().equals("ChargeItem")) - return parseChargeItem(xpp); - else if (xpp.getName().equals("Claim")) - return parseClaim(xpp); - else if (xpp.getName().equals("ClaimResponse")) - return parseClaimResponse(xpp); - else if (xpp.getName().equals("ClinicalImpression")) - return parseClinicalImpression(xpp); - else if (xpp.getName().equals("CodeSystem")) - return parseCodeSystem(xpp); - else if (xpp.getName().equals("Communication")) - return parseCommunication(xpp); - else if (xpp.getName().equals("CommunicationRequest")) - return parseCommunicationRequest(xpp); - else if (xpp.getName().equals("CompartmentDefinition")) - return parseCompartmentDefinition(xpp); - else if (xpp.getName().equals("Composition")) - return parseComposition(xpp); - else if (xpp.getName().equals("ConceptMap")) - return parseConceptMap(xpp); - else if (xpp.getName().equals("Condition")) - return parseCondition(xpp); - else if (xpp.getName().equals("Consent")) - return parseConsent(xpp); - else if (xpp.getName().equals("Contract")) - return parseContract(xpp); - else if (xpp.getName().equals("Coverage")) - return parseCoverage(xpp); - else if (xpp.getName().equals("DetectedIssue")) - return parseDetectedIssue(xpp); - else if (xpp.getName().equals("Device")) - return parseDevice(xpp); - else if (xpp.getName().equals("DeviceComponent")) - return parseDeviceComponent(xpp); - else if (xpp.getName().equals("DeviceMetric")) - return parseDeviceMetric(xpp); - else if (xpp.getName().equals("DeviceRequest")) - return parseDeviceRequest(xpp); - else if (xpp.getName().equals("DeviceUseStatement")) - return parseDeviceUseStatement(xpp); - else if (xpp.getName().equals("DiagnosticReport")) - return parseDiagnosticReport(xpp); - else if (xpp.getName().equals("DocumentManifest")) - return parseDocumentManifest(xpp); - else if (xpp.getName().equals("DocumentReference")) - return parseDocumentReference(xpp); - else if (xpp.getName().equals("EligibilityRequest")) - return parseEligibilityRequest(xpp); - else if (xpp.getName().equals("EligibilityResponse")) - return parseEligibilityResponse(xpp); - else if (xpp.getName().equals("Encounter")) - return parseEncounter(xpp); - else if (xpp.getName().equals("Endpoint")) - return parseEndpoint(xpp); - else if (xpp.getName().equals("EnrollmentRequest")) - return parseEnrollmentRequest(xpp); - else if (xpp.getName().equals("EnrollmentResponse")) - return parseEnrollmentResponse(xpp); - else if (xpp.getName().equals("EpisodeOfCare")) - return parseEpisodeOfCare(xpp); - else if (xpp.getName().equals("EventDefinition")) - return parseEventDefinition(xpp); - else if (xpp.getName().equals("ExpansionProfile")) - return parseExpansionProfile(xpp); - else if (xpp.getName().equals("ExplanationOfBenefit")) - return parseExplanationOfBenefit(xpp); - else if (xpp.getName().equals("FamilyMemberHistory")) - return parseFamilyMemberHistory(xpp); - else if (xpp.getName().equals("Flag")) - return parseFlag(xpp); - else if (xpp.getName().equals("Goal")) - return parseGoal(xpp); - else if (xpp.getName().equals("GraphDefinition")) - return parseGraphDefinition(xpp); - else if (xpp.getName().equals("Group")) - return parseGroup(xpp); - else if (xpp.getName().equals("GuidanceResponse")) - return parseGuidanceResponse(xpp); - else if (xpp.getName().equals("HealthcareService")) - return parseHealthcareService(xpp); - else if (xpp.getName().equals("ImagingManifest")) - return parseImagingManifest(xpp); - else if (xpp.getName().equals("ImagingStudy")) - return parseImagingStudy(xpp); - else if (xpp.getName().equals("Immunization")) - return parseImmunization(xpp); - else if (xpp.getName().equals("ImmunizationRecommendation")) - return parseImmunizationRecommendation(xpp); - else if (xpp.getName().equals("ImplementationGuide")) - return parseImplementationGuide(xpp); - else if (xpp.getName().equals("Library")) - return parseLibrary(xpp); - else if (xpp.getName().equals("Linkage")) - return parseLinkage(xpp); - else if (xpp.getName().equals("List")) - return parseListResource(xpp); - else if (xpp.getName().equals("Location")) - return parseLocation(xpp); - else if (xpp.getName().equals("Measure")) - return parseMeasure(xpp); - else if (xpp.getName().equals("MeasureReport")) - return parseMeasureReport(xpp); - else if (xpp.getName().equals("Media")) - return parseMedia(xpp); - else if (xpp.getName().equals("Medication")) - return parseMedication(xpp); - else if (xpp.getName().equals("MedicationAdministration")) - return parseMedicationAdministration(xpp); - else if (xpp.getName().equals("MedicationDispense")) - return parseMedicationDispense(xpp); - else if (xpp.getName().equals("MedicationRequest")) - return parseMedicationRequest(xpp); - else if (xpp.getName().equals("MedicationStatement")) - return parseMedicationStatement(xpp); - else if (xpp.getName().equals("MessageDefinition")) - return parseMessageDefinition(xpp); - else if (xpp.getName().equals("MessageHeader")) - return parseMessageHeader(xpp); - else if (xpp.getName().equals("NamingSystem")) - return parseNamingSystem(xpp); - else if (xpp.getName().equals("NutritionOrder")) - return parseNutritionOrder(xpp); - else if (xpp.getName().equals("Observation")) - return parseObservation(xpp); - else if (xpp.getName().equals("OperationDefinition")) - return parseOperationDefinition(xpp); - else if (xpp.getName().equals("OperationOutcome")) - return parseOperationOutcome(xpp); - else if (xpp.getName().equals("Organization")) - return parseOrganization(xpp); - else if (xpp.getName().equals("Patient")) - return parsePatient(xpp); - else if (xpp.getName().equals("PaymentNotice")) - return parsePaymentNotice(xpp); - else if (xpp.getName().equals("PaymentReconciliation")) - return parsePaymentReconciliation(xpp); - else if (xpp.getName().equals("Person")) - return parsePerson(xpp); - else if (xpp.getName().equals("PlanDefinition")) - return parsePlanDefinition(xpp); - else if (xpp.getName().equals("Practitioner")) - return parsePractitioner(xpp); - else if (xpp.getName().equals("PractitionerRole")) - return parsePractitionerRole(xpp); - else if (xpp.getName().equals("Procedure")) - return parseProcedure(xpp); - else if (xpp.getName().equals("ProcedureRequest")) - return parseProcedureRequest(xpp); - else if (xpp.getName().equals("ProcessRequest")) - return parseProcessRequest(xpp); - else if (xpp.getName().equals("ProcessResponse")) - return parseProcessResponse(xpp); - else if (xpp.getName().equals("Provenance")) - return parseProvenance(xpp); - else if (xpp.getName().equals("Questionnaire")) - return parseQuestionnaire(xpp); - else if (xpp.getName().equals("QuestionnaireResponse")) - return parseQuestionnaireResponse(xpp); - else if (xpp.getName().equals("RelatedPerson")) - return parseRelatedPerson(xpp); - else if (xpp.getName().equals("RequestGroup")) - return parseRequestGroup(xpp); - else if (xpp.getName().equals("ResearchStudy")) - return parseResearchStudy(xpp); - else if (xpp.getName().equals("ResearchSubject")) - return parseResearchSubject(xpp); - else if (xpp.getName().equals("RiskAssessment")) - return parseRiskAssessment(xpp); - else if (xpp.getName().equals("Schedule")) - return parseSchedule(xpp); - else if (xpp.getName().equals("SearchParameter")) - return parseSearchParameter(xpp); - else if (xpp.getName().equals("Sequence")) - return parseSequence(xpp); - else if (xpp.getName().equals("ServiceDefinition")) - return parseServiceDefinition(xpp); - else if (xpp.getName().equals("Slot")) - return parseSlot(xpp); - else if (xpp.getName().equals("Specimen")) - return parseSpecimen(xpp); - else if (xpp.getName().equals("StructureDefinition")) - return parseStructureDefinition(xpp); - else if (xpp.getName().equals("StructureMap")) - return parseStructureMap(xpp); - else if (xpp.getName().equals("Subscription")) - return parseSubscription(xpp); - else if (xpp.getName().equals("Substance")) - return parseSubstance(xpp); - else if (xpp.getName().equals("SupplyDelivery")) - return parseSupplyDelivery(xpp); - else if (xpp.getName().equals("SupplyRequest")) - return parseSupplyRequest(xpp); - else if (xpp.getName().equals("Task")) - return parseTask(xpp); - else if (xpp.getName().equals("TestReport")) - return parseTestReport(xpp); - else if (xpp.getName().equals("TestScript")) - return parseTestScript(xpp); - else if (xpp.getName().equals("ValueSet")) - return parseValueSet(xpp); - else if (xpp.getName().equals("VisionPrescription")) - return parseVisionPrescription(xpp); - else if (xpp.getName().equals("Binary")) - return parseBinary(xpp); - throw new FHIRFormatError("Unknown resource type "+xpp.getName()+""); - } - - protected Type parseType(String prefix, XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { - if (xpp.getName().equals(prefix+"date")) - return parseDate(xpp); - else if (xpp.getName().equals(prefix+"dateTime")) - return parseDateTime(xpp); - else if (xpp.getName().equals(prefix+"code")) - return parseCode(xpp); - else if (xpp.getName().equals(prefix+"string")) - return parseString(xpp); - else if (xpp.getName().equals(prefix+"integer")) - return parseInteger(xpp); - else if (xpp.getName().equals(prefix+"oid")) - return parseOid(xpp); - else if (xpp.getName().equals(prefix+"uri")) - return parseUri(xpp); - else if (xpp.getName().equals(prefix+"uuid")) - return parseUuid(xpp); - else if (xpp.getName().equals(prefix+"instant")) - return parseInstant(xpp); - else if (xpp.getName().equals(prefix+"boolean")) - return parseBoolean(xpp); - else if (xpp.getName().equals(prefix+"base64Binary")) - return parseBase64Binary(xpp); - else if (xpp.getName().equals(prefix+"unsignedInt")) - return parseUnsignedInt(xpp); - else if (xpp.getName().equals(prefix+"markdown")) - return parseMarkdown(xpp); - else if (xpp.getName().equals(prefix+"time")) - return parseTime(xpp); - else if (xpp.getName().equals(prefix+"id")) - return parseId(xpp); - else if (xpp.getName().equals(prefix+"positiveInt")) - return parsePositiveInt(xpp); - else if (xpp.getName().equals(prefix+"decimal")) - return parseDecimal(xpp); - else if (xpp.getName().equals(prefix+"Extension")) - return parseExtension(xpp); - else if (xpp.getName().equals(prefix+"Narrative")) - return parseNarrative(xpp); - else if (xpp.getName().equals(prefix+"Reference")) - return parseReference(xpp); - else if (xpp.getName().equals(prefix+"Quantity")) - return parseQuantity(xpp); - else if (xpp.getName().equals(prefix+"Period")) - return parsePeriod(xpp); - else if (xpp.getName().equals(prefix+"Attachment")) - return parseAttachment(xpp); - else if (xpp.getName().equals(prefix+"Duration")) - return parseDuration(xpp); - else if (xpp.getName().equals(prefix+"Count")) - return parseCount(xpp); - else if (xpp.getName().equals(prefix+"Range")) - return parseRange(xpp); - else if (xpp.getName().equals(prefix+"Annotation")) - return parseAnnotation(xpp); - else if (xpp.getName().equals(prefix+"Money")) - return parseMoney(xpp); - else if (xpp.getName().equals(prefix+"Identifier")) - return parseIdentifier(xpp); - else if (xpp.getName().equals(prefix+"Coding")) - return parseCoding(xpp); - else if (xpp.getName().equals(prefix+"Signature")) - return parseSignature(xpp); - else if (xpp.getName().equals(prefix+"SampledData")) - return parseSampledData(xpp); - else if (xpp.getName().equals(prefix+"Ratio")) - return parseRatio(xpp); - else if (xpp.getName().equals(prefix+"Distance")) - return parseDistance(xpp); - else if (xpp.getName().equals(prefix+"Age")) - return parseAge(xpp); - else if (xpp.getName().equals(prefix+"CodeableConcept")) - return parseCodeableConcept(xpp); - else if (xpp.getName().equals(prefix+"SimpleQuantity")) - return parseSimpleQuantity(xpp); - else if (xpp.getName().equals(prefix+"Meta")) - return parseMeta(xpp); - else if (xpp.getName().equals(prefix+"Address")) - return parseAddress(xpp); - else if (xpp.getName().equals(prefix+"TriggerDefinition")) - return parseTriggerDefinition(xpp); - else if (xpp.getName().equals(prefix+"Contributor")) - return parseContributor(xpp); - else if (xpp.getName().equals(prefix+"DataRequirement")) - return parseDataRequirement(xpp); - else if (xpp.getName().equals(prefix+"Dosage")) - return parseDosage(xpp); - else if (xpp.getName().equals(prefix+"RelatedArtifact")) - return parseRelatedArtifact(xpp); - else if (xpp.getName().equals(prefix+"ContactDetail")) - return parseContactDetail(xpp); - else if (xpp.getName().equals(prefix+"HumanName")) - return parseHumanName(xpp); - else if (xpp.getName().equals(prefix+"ContactPoint")) - return parseContactPoint(xpp); - else if (xpp.getName().equals(prefix+"UsageContext")) - return parseUsageContext(xpp); - else if (xpp.getName().equals(prefix+"Timing")) - return parseTiming(xpp); - else if (xpp.getName().equals(prefix+"ElementDefinition")) - return parseElementDefinition(xpp); - else if (xpp.getName().equals(prefix+"ParameterDefinition")) - return parseParameterDefinition(xpp); - else if (xpp.getName().equals(prefix+"Date")) - return parseDate(xpp); - else if (xpp.getName().equals(prefix+"DateTime")) - return parseDateTime(xpp); - else if (xpp.getName().equals(prefix+"Code")) - return parseCode(xpp); - else if (xpp.getName().equals(prefix+"String")) - return parseString(xpp); - else if (xpp.getName().equals(prefix+"Integer")) - return parseInteger(xpp); - else if (xpp.getName().equals(prefix+"Oid")) - return parseOid(xpp); - else if (xpp.getName().equals(prefix+"Uri")) - return parseUri(xpp); - else if (xpp.getName().equals(prefix+"Uuid")) - return parseUuid(xpp); - else if (xpp.getName().equals(prefix+"Instant")) - return parseInstant(xpp); - else if (xpp.getName().equals(prefix+"Boolean")) - return parseBoolean(xpp); - else if (xpp.getName().equals(prefix+"Base64Binary")) - return parseBase64Binary(xpp); - else if (xpp.getName().equals(prefix+"UnsignedInt")) - return parseUnsignedInt(xpp); - else if (xpp.getName().equals(prefix+"Markdown")) - return parseMarkdown(xpp); - else if (xpp.getName().equals(prefix+"Time")) - return parseTime(xpp); - else if (xpp.getName().equals(prefix+"Id")) - return parseId(xpp); - else if (xpp.getName().equals(prefix+"PositiveInt")) - return parsePositiveInt(xpp); - else if (xpp.getName().equals(prefix+"Decimal")) - return parseDecimal(xpp); - throw new FHIRFormatError("Unknown type "+xpp.getName()); - } - - protected Type parseType(XmlPullParser xpp, String type) throws XmlPullParserException, IOException, FHIRFormatError { - if (type.equals("date")) - return parseDate(xpp); - else if (type.equals("dateTime")) - return parseDateTime(xpp); - else if (type.equals("code")) - return parseCode(xpp); - else if (type.equals("string")) - return parseString(xpp); - else if (type.equals("integer")) - return parseInteger(xpp); - else if (type.equals("oid")) - return parseOid(xpp); - else if (type.equals("uri")) - return parseUri(xpp); - else if (type.equals("uuid")) - return parseUuid(xpp); - else if (type.equals("instant")) - return parseInstant(xpp); - else if (type.equals("boolean")) - return parseBoolean(xpp); - else if (type.equals("base64Binary")) - return parseBase64Binary(xpp); - else if (type.equals("unsignedInt")) - return parseUnsignedInt(xpp); - else if (type.equals("markdown")) - return parseMarkdown(xpp); - else if (type.equals("time")) - return parseTime(xpp); - else if (type.equals("id")) - return parseId(xpp); - else if (type.equals("positiveInt")) - return parsePositiveInt(xpp); - else if (type.equals("decimal")) - return parseDecimal(xpp); - else if (type.equals("Extension")) - return parseExtension(xpp); - else if (type.equals("Narrative")) - return parseNarrative(xpp); - else if (type.equals("Reference")) - return parseReference(xpp); - else if (type.equals("Quantity")) - return parseQuantity(xpp); - else if (type.equals("Period")) - return parsePeriod(xpp); - else if (type.equals("Attachment")) - return parseAttachment(xpp); - else if (type.equals("Duration")) - return parseDuration(xpp); - else if (type.equals("Count")) - return parseCount(xpp); - else if (type.equals("Range")) - return parseRange(xpp); - else if (type.equals("Annotation")) - return parseAnnotation(xpp); - else if (type.equals("Money")) - return parseMoney(xpp); - else if (type.equals("Identifier")) - return parseIdentifier(xpp); - else if (type.equals("Coding")) - return parseCoding(xpp); - else if (type.equals("Signature")) - return parseSignature(xpp); - else if (type.equals("SampledData")) - return parseSampledData(xpp); - else if (type.equals("Ratio")) - return parseRatio(xpp); - else if (type.equals("Distance")) - return parseDistance(xpp); - else if (type.equals("Age")) - return parseAge(xpp); - else if (type.equals("CodeableConcept")) - return parseCodeableConcept(xpp); - else if (type.equals("SimpleQuantity")) - return parseSimpleQuantity(xpp); - else if (type.equals("Meta")) - return parseMeta(xpp); - else if (type.equals("Address")) - return parseAddress(xpp); - else if (type.equals("TriggerDefinition")) - return parseTriggerDefinition(xpp); - else if (type.equals("Contributor")) - return parseContributor(xpp); - else if (type.equals("DataRequirement")) - return parseDataRequirement(xpp); - else if (type.equals("Dosage")) - return parseDosage(xpp); - else if (type.equals("RelatedArtifact")) - return parseRelatedArtifact(xpp); - else if (type.equals("ContactDetail")) - return parseContactDetail(xpp); - else if (type.equals("HumanName")) - return parseHumanName(xpp); - else if (type.equals("ContactPoint")) - return parseContactPoint(xpp); - else if (type.equals("UsageContext")) - return parseUsageContext(xpp); - else if (type.equals("Timing")) - return parseTiming(xpp); - else if (type.equals("ElementDefinition")) - return parseElementDefinition(xpp); - else if (type.equals("ParameterDefinition")) - return parseParameterDefinition(xpp); - throw new FHIRFormatError("Unknown type "+type); - } - - public Base parseFragment(XmlPullParser xpp, String type) throws XmlPullParserException, IOException, FHIRFormatError { - if (type.equals("Extension")) - return parseExtension(xpp); - else if (type.equals("Narrative")) - return parseNarrative(xpp); - else if (type.equals("Reference")) - return parseReference(xpp); - else if (type.equals("Quantity")) - return parseQuantity(xpp); - else if (type.equals("Period")) - return parsePeriod(xpp); - else if (type.equals("Attachment")) - return parseAttachment(xpp); - else if (type.equals("Duration")) - return parseDuration(xpp); - else if (type.equals("Count")) - return parseCount(xpp); - else if (type.equals("Range")) - return parseRange(xpp); - else if (type.equals("Annotation")) - return parseAnnotation(xpp); - else if (type.equals("Money")) - return parseMoney(xpp); - else if (type.equals("Identifier")) - return parseIdentifier(xpp); - else if (type.equals("Coding")) - return parseCoding(xpp); - else if (type.equals("Signature")) - return parseSignature(xpp); - else if (type.equals("SampledData")) - return parseSampledData(xpp); - else if (type.equals("Ratio")) - return parseRatio(xpp); - else if (type.equals("Distance")) - return parseDistance(xpp); - else if (type.equals("Age")) - return parseAge(xpp); - else if (type.equals("CodeableConcept")) - return parseCodeableConcept(xpp); - else if (type.equals("SimpleQuantity")) - return parseSimpleQuantity(xpp); - else if (type.equals("Meta")) - return parseMeta(xpp); - else if (type.equals("Address")) - return parseAddress(xpp); - else if (type.equals("TriggerDefinition")) - return parseTriggerDefinition(xpp); - else if (type.equals("Contributor")) - return parseContributor(xpp); - else if (type.equals("DataRequirement")) - return parseDataRequirement(xpp); - else if (type.equals("Dosage")) - return parseDosage(xpp); - else if (type.equals("RelatedArtifact")) - return parseRelatedArtifact(xpp); - else if (type.equals("ContactDetail")) - return parseContactDetail(xpp); - else if (type.equals("HumanName")) - return parseHumanName(xpp); - else if (type.equals("ContactPoint")) - return parseContactPoint(xpp); - else if (type.equals("UsageContext")) - return parseUsageContext(xpp); - else if (type.equals("Timing")) - return parseTiming(xpp); - else if (type.equals("ElementDefinition")) - return parseElementDefinition(xpp); - else if (type.equals("ParameterDefinition")) - return parseParameterDefinition(xpp); - else if (type.equals("Parameters")) - return parseParameters(xpp); - else if (type.equals("Account")) - return parseAccount(xpp); - else if (type.equals("ActivityDefinition")) - return parseActivityDefinition(xpp); - else if (type.equals("AdverseEvent")) - return parseAdverseEvent(xpp); - else if (type.equals("AllergyIntolerance")) - return parseAllergyIntolerance(xpp); - else if (type.equals("Appointment")) - return parseAppointment(xpp); - else if (type.equals("AppointmentResponse")) - return parseAppointmentResponse(xpp); - else if (type.equals("AuditEvent")) - return parseAuditEvent(xpp); - else if (type.equals("Basic")) - return parseBasic(xpp); - else if (type.equals("Binary")) - return parseBinary(xpp); - else if (type.equals("BodyStructure")) - return parseBodyStructure(xpp); - else if (type.equals("Bundle")) - return parseBundle(xpp); - else if (type.equals("CapabilityStatement")) - return parseCapabilityStatement(xpp); - else if (type.equals("CarePlan")) - return parseCarePlan(xpp); - else if (type.equals("CareTeam")) - return parseCareTeam(xpp); - else if (type.equals("ChargeItem")) - return parseChargeItem(xpp); - else if (type.equals("Claim")) - return parseClaim(xpp); - else if (type.equals("ClaimResponse")) - return parseClaimResponse(xpp); - else if (type.equals("ClinicalImpression")) - return parseClinicalImpression(xpp); - else if (type.equals("CodeSystem")) - return parseCodeSystem(xpp); - else if (type.equals("Communication")) - return parseCommunication(xpp); - else if (type.equals("CommunicationRequest")) - return parseCommunicationRequest(xpp); - else if (type.equals("CompartmentDefinition")) - return parseCompartmentDefinition(xpp); - else if (type.equals("Composition")) - return parseComposition(xpp); - else if (type.equals("ConceptMap")) - return parseConceptMap(xpp); - else if (type.equals("Condition")) - return parseCondition(xpp); - else if (type.equals("Consent")) - return parseConsent(xpp); - else if (type.equals("Contract")) - return parseContract(xpp); - else if (type.equals("Coverage")) - return parseCoverage(xpp); - else if (type.equals("DetectedIssue")) - return parseDetectedIssue(xpp); - else if (type.equals("Device")) - return parseDevice(xpp); - else if (type.equals("DeviceComponent")) - return parseDeviceComponent(xpp); - else if (type.equals("DeviceMetric")) - return parseDeviceMetric(xpp); - else if (type.equals("DeviceRequest")) - return parseDeviceRequest(xpp); - else if (type.equals("DeviceUseStatement")) - return parseDeviceUseStatement(xpp); - else if (type.equals("DiagnosticReport")) - return parseDiagnosticReport(xpp); - else if (type.equals("DocumentManifest")) - return parseDocumentManifest(xpp); - else if (type.equals("DocumentReference")) - return parseDocumentReference(xpp); - else if (type.equals("EligibilityRequest")) - return parseEligibilityRequest(xpp); - else if (type.equals("EligibilityResponse")) - return parseEligibilityResponse(xpp); - else if (type.equals("Encounter")) - return parseEncounter(xpp); - else if (type.equals("Endpoint")) - return parseEndpoint(xpp); - else if (type.equals("EnrollmentRequest")) - return parseEnrollmentRequest(xpp); - else if (type.equals("EnrollmentResponse")) - return parseEnrollmentResponse(xpp); - else if (type.equals("EpisodeOfCare")) - return parseEpisodeOfCare(xpp); - else if (type.equals("EventDefinition")) - return parseEventDefinition(xpp); - else if (type.equals("ExpansionProfile")) - return parseExpansionProfile(xpp); - else if (type.equals("ExplanationOfBenefit")) - return parseExplanationOfBenefit(xpp); - else if (type.equals("FamilyMemberHistory")) - return parseFamilyMemberHistory(xpp); - else if (type.equals("Flag")) - return parseFlag(xpp); - else if (type.equals("Goal")) - return parseGoal(xpp); - else if (type.equals("GraphDefinition")) - return parseGraphDefinition(xpp); - else if (type.equals("Group")) - return parseGroup(xpp); - else if (type.equals("GuidanceResponse")) - return parseGuidanceResponse(xpp); - else if (type.equals("HealthcareService")) - return parseHealthcareService(xpp); - else if (type.equals("ImagingManifest")) - return parseImagingManifest(xpp); - else if (type.equals("ImagingStudy")) - return parseImagingStudy(xpp); - else if (type.equals("Immunization")) - return parseImmunization(xpp); - else if (type.equals("ImmunizationRecommendation")) - return parseImmunizationRecommendation(xpp); - else if (type.equals("ImplementationGuide")) - return parseImplementationGuide(xpp); - else if (type.equals("Library")) - return parseLibrary(xpp); - else if (type.equals("Linkage")) - return parseLinkage(xpp); - else if (type.equals("List")) - return parseListResource(xpp); - else if (type.equals("Location")) - return parseLocation(xpp); - else if (type.equals("Measure")) - return parseMeasure(xpp); - else if (type.equals("MeasureReport")) - return parseMeasureReport(xpp); - else if (type.equals("Media")) - return parseMedia(xpp); - else if (type.equals("Medication")) - return parseMedication(xpp); - else if (type.equals("MedicationAdministration")) - return parseMedicationAdministration(xpp); - else if (type.equals("MedicationDispense")) - return parseMedicationDispense(xpp); - else if (type.equals("MedicationRequest")) - return parseMedicationRequest(xpp); - else if (type.equals("MedicationStatement")) - return parseMedicationStatement(xpp); - else if (type.equals("MessageDefinition")) - return parseMessageDefinition(xpp); - else if (type.equals("MessageHeader")) - return parseMessageHeader(xpp); - else if (type.equals("NamingSystem")) - return parseNamingSystem(xpp); - else if (type.equals("NutritionOrder")) - return parseNutritionOrder(xpp); - else if (type.equals("Observation")) - return parseObservation(xpp); - else if (type.equals("OperationDefinition")) - return parseOperationDefinition(xpp); - else if (type.equals("OperationOutcome")) - return parseOperationOutcome(xpp); - else if (type.equals("Organization")) - return parseOrganization(xpp); - else if (type.equals("Patient")) - return parsePatient(xpp); - else if (type.equals("PaymentNotice")) - return parsePaymentNotice(xpp); - else if (type.equals("PaymentReconciliation")) - return parsePaymentReconciliation(xpp); - else if (type.equals("Person")) - return parsePerson(xpp); - else if (type.equals("PlanDefinition")) - return parsePlanDefinition(xpp); - else if (type.equals("Practitioner")) - return parsePractitioner(xpp); - else if (type.equals("PractitionerRole")) - return parsePractitionerRole(xpp); - else if (type.equals("Procedure")) - return parseProcedure(xpp); - else if (type.equals("ProcedureRequest")) - return parseProcedureRequest(xpp); - else if (type.equals("ProcessRequest")) - return parseProcessRequest(xpp); - else if (type.equals("ProcessResponse")) - return parseProcessResponse(xpp); - else if (type.equals("Provenance")) - return parseProvenance(xpp); - else if (type.equals("Questionnaire")) - return parseQuestionnaire(xpp); - else if (type.equals("QuestionnaireResponse")) - return parseQuestionnaireResponse(xpp); - else if (type.equals("RelatedPerson")) - return parseRelatedPerson(xpp); - else if (type.equals("RequestGroup")) - return parseRequestGroup(xpp); - else if (type.equals("ResearchStudy")) - return parseResearchStudy(xpp); - else if (type.equals("ResearchSubject")) - return parseResearchSubject(xpp); - else if (type.equals("RiskAssessment")) - return parseRiskAssessment(xpp); - else if (type.equals("Schedule")) - return parseSchedule(xpp); - else if (type.equals("SearchParameter")) - return parseSearchParameter(xpp); - else if (type.equals("Sequence")) - return parseSequence(xpp); - else if (type.equals("ServiceDefinition")) - return parseServiceDefinition(xpp); - else if (type.equals("Slot")) - return parseSlot(xpp); - else if (type.equals("Specimen")) - return parseSpecimen(xpp); - else if (type.equals("StructureDefinition")) - return parseStructureDefinition(xpp); - else if (type.equals("StructureMap")) - return parseStructureMap(xpp); - else if (type.equals("Subscription")) - return parseSubscription(xpp); - else if (type.equals("Substance")) - return parseSubstance(xpp); - else if (type.equals("SupplyDelivery")) - return parseSupplyDelivery(xpp); - else if (type.equals("SupplyRequest")) - return parseSupplyRequest(xpp); - else if (type.equals("Task")) - return parseTask(xpp); - else if (type.equals("TestReport")) - return parseTestReport(xpp); - else if (type.equals("TestScript")) - return parseTestScript(xpp); - else if (type.equals("ValueSet")) - return parseValueSet(xpp); - else if (type.equals("VisionPrescription")) - return parseVisionPrescription(xpp); - else if (type.equals("date")) - return parseDate(xpp); - else if (type.equals("dateTime")) - return parseDateTime(xpp); - else if (type.equals("code")) - return parseCode(xpp); - else if (type.equals("string")) - return parseString(xpp); - else if (type.equals("integer")) - return parseInteger(xpp); - else if (type.equals("oid")) - return parseOid(xpp); - else if (type.equals("uri")) - return parseUri(xpp); - else if (type.equals("uuid")) - return parseUuid(xpp); - else if (type.equals("instant")) - return parseInstant(xpp); - else if (type.equals("boolean")) - return parseBoolean(xpp); - else if (type.equals("base64Binary")) - return parseBase64Binary(xpp); - else if (type.equals("unsignedInt")) - return parseUnsignedInt(xpp); - else if (type.equals("markdown")) - return parseMarkdown(xpp); - else if (type.equals("time")) - return parseTime(xpp); - else if (type.equals("id")) - return parseId(xpp); - else if (type.equals("positiveInt")) - return parsePositiveInt(xpp); - else if (type.equals("decimal")) - return parseDecimal(xpp); - throw new FHIRFormatError("Unknown type "+type); - } - - private boolean nameIsTypeName(XmlPullParser xpp, String prefix) { - if (xpp.getName().equals(prefix+"Reference")) - return true; - if (xpp.getName().equals(prefix+"Quantity")) - return true; - if (xpp.getName().equals(prefix+"Period")) - return true; - if (xpp.getName().equals(prefix+"Attachment")) - return true; - if (xpp.getName().equals(prefix+"Duration")) - return true; - if (xpp.getName().equals(prefix+"Count")) - return true; - if (xpp.getName().equals(prefix+"Range")) - return true; - if (xpp.getName().equals(prefix+"Annotation")) - return true; - if (xpp.getName().equals(prefix+"Money")) - return true; - if (xpp.getName().equals(prefix+"Identifier")) - return true; - if (xpp.getName().equals(prefix+"Coding")) - return true; - if (xpp.getName().equals(prefix+"Signature")) - return true; - if (xpp.getName().equals(prefix+"SampledData")) - return true; - if (xpp.getName().equals(prefix+"Ratio")) - return true; - if (xpp.getName().equals(prefix+"Distance")) - return true; - if (xpp.getName().equals(prefix+"Age")) - return true; - if (xpp.getName().equals(prefix+"CodeableConcept")) - return true; - if (xpp.getName().equals(prefix+"SimpleQuantity")) - return true; - if (xpp.getName().equals(prefix+"Meta")) - return true; - if (xpp.getName().equals(prefix+"Address")) - return true; - if (xpp.getName().equals(prefix+"TriggerDefinition")) - return true; - if (xpp.getName().equals(prefix+"Contributor")) - return true; - if (xpp.getName().equals(prefix+"DataRequirement")) - return true; - if (xpp.getName().equals(prefix+"Dosage")) - return true; - if (xpp.getName().equals(prefix+"RelatedArtifact")) - return true; - if (xpp.getName().equals(prefix+"ContactDetail")) - return true; - if (xpp.getName().equals(prefix+"HumanName")) - return true; - if (xpp.getName().equals(prefix+"ContactPoint")) - return true; - if (xpp.getName().equals(prefix+"UsageContext")) - return true; - if (xpp.getName().equals(prefix+"Timing")) - return true; - if (xpp.getName().equals(prefix+"ElementDefinition")) - return true; - if (xpp.getName().equals(prefix+"ParameterDefinition")) - return true; - if (xpp.getName().equals(prefix+"Parameters")) - return true; - if (xpp.getName().equals(prefix+"Account")) - return true; - if (xpp.getName().equals(prefix+"ActivityDefinition")) - return true; - if (xpp.getName().equals(prefix+"AdverseEvent")) - return true; - if (xpp.getName().equals(prefix+"AllergyIntolerance")) - return true; - if (xpp.getName().equals(prefix+"Appointment")) - return true; - if (xpp.getName().equals(prefix+"AppointmentResponse")) - return true; - if (xpp.getName().equals(prefix+"AuditEvent")) - return true; - if (xpp.getName().equals(prefix+"Basic")) - return true; - if (xpp.getName().equals(prefix+"Binary")) - return true; - if (xpp.getName().equals(prefix+"BodyStructure")) - return true; - if (xpp.getName().equals(prefix+"Bundle")) - return true; - if (xpp.getName().equals(prefix+"CapabilityStatement")) - return true; - if (xpp.getName().equals(prefix+"CarePlan")) - return true; - if (xpp.getName().equals(prefix+"CareTeam")) - return true; - if (xpp.getName().equals(prefix+"ChargeItem")) - return true; - if (xpp.getName().equals(prefix+"Claim")) - return true; - if (xpp.getName().equals(prefix+"ClaimResponse")) - return true; - if (xpp.getName().equals(prefix+"ClinicalImpression")) - return true; - if (xpp.getName().equals(prefix+"CodeSystem")) - return true; - if (xpp.getName().equals(prefix+"Communication")) - return true; - if (xpp.getName().equals(prefix+"CommunicationRequest")) - return true; - if (xpp.getName().equals(prefix+"CompartmentDefinition")) - return true; - if (xpp.getName().equals(prefix+"Composition")) - return true; - if (xpp.getName().equals(prefix+"ConceptMap")) - return true; - if (xpp.getName().equals(prefix+"Condition")) - return true; - if (xpp.getName().equals(prefix+"Consent")) - return true; - if (xpp.getName().equals(prefix+"Contract")) - return true; - if (xpp.getName().equals(prefix+"Coverage")) - return true; - if (xpp.getName().equals(prefix+"DetectedIssue")) - return true; - if (xpp.getName().equals(prefix+"Device")) - return true; - if (xpp.getName().equals(prefix+"DeviceComponent")) - return true; - if (xpp.getName().equals(prefix+"DeviceMetric")) - return true; - if (xpp.getName().equals(prefix+"DeviceRequest")) - return true; - if (xpp.getName().equals(prefix+"DeviceUseStatement")) - return true; - if (xpp.getName().equals(prefix+"DiagnosticReport")) - return true; - if (xpp.getName().equals(prefix+"DocumentManifest")) - return true; - if (xpp.getName().equals(prefix+"DocumentReference")) - return true; - if (xpp.getName().equals(prefix+"EligibilityRequest")) - return true; - if (xpp.getName().equals(prefix+"EligibilityResponse")) - return true; - if (xpp.getName().equals(prefix+"Encounter")) - return true; - if (xpp.getName().equals(prefix+"Endpoint")) - return true; - if (xpp.getName().equals(prefix+"EnrollmentRequest")) - return true; - if (xpp.getName().equals(prefix+"EnrollmentResponse")) - return true; - if (xpp.getName().equals(prefix+"EpisodeOfCare")) - return true; - if (xpp.getName().equals(prefix+"EventDefinition")) - return true; - if (xpp.getName().equals(prefix+"ExpansionProfile")) - return true; - if (xpp.getName().equals(prefix+"ExplanationOfBenefit")) - return true; - if (xpp.getName().equals(prefix+"FamilyMemberHistory")) - return true; - if (xpp.getName().equals(prefix+"Flag")) - return true; - if (xpp.getName().equals(prefix+"Goal")) - return true; - if (xpp.getName().equals(prefix+"GraphDefinition")) - return true; - if (xpp.getName().equals(prefix+"Group")) - return true; - if (xpp.getName().equals(prefix+"GuidanceResponse")) - return true; - if (xpp.getName().equals(prefix+"HealthcareService")) - return true; - if (xpp.getName().equals(prefix+"ImagingManifest")) - return true; - if (xpp.getName().equals(prefix+"ImagingStudy")) - return true; - if (xpp.getName().equals(prefix+"Immunization")) - return true; - if (xpp.getName().equals(prefix+"ImmunizationRecommendation")) - return true; - if (xpp.getName().equals(prefix+"ImplementationGuide")) - return true; - if (xpp.getName().equals(prefix+"Library")) - return true; - if (xpp.getName().equals(prefix+"Linkage")) - return true; - if (xpp.getName().equals(prefix+"List")) - return true; - if (xpp.getName().equals(prefix+"Location")) - return true; - if (xpp.getName().equals(prefix+"Measure")) - return true; - if (xpp.getName().equals(prefix+"MeasureReport")) - return true; - if (xpp.getName().equals(prefix+"Media")) - return true; - if (xpp.getName().equals(prefix+"Medication")) - return true; - if (xpp.getName().equals(prefix+"MedicationAdministration")) - return true; - if (xpp.getName().equals(prefix+"MedicationDispense")) - return true; - if (xpp.getName().equals(prefix+"MedicationRequest")) - return true; - if (xpp.getName().equals(prefix+"MedicationStatement")) - return true; - if (xpp.getName().equals(prefix+"MessageDefinition")) - return true; - if (xpp.getName().equals(prefix+"MessageHeader")) - return true; - if (xpp.getName().equals(prefix+"NamingSystem")) - return true; - if (xpp.getName().equals(prefix+"NutritionOrder")) - return true; - if (xpp.getName().equals(prefix+"Observation")) - return true; - if (xpp.getName().equals(prefix+"OperationDefinition")) - return true; - if (xpp.getName().equals(prefix+"OperationOutcome")) - return true; - if (xpp.getName().equals(prefix+"Organization")) - return true; - if (xpp.getName().equals(prefix+"Patient")) - return true; - if (xpp.getName().equals(prefix+"PaymentNotice")) - return true; - if (xpp.getName().equals(prefix+"PaymentReconciliation")) - return true; - if (xpp.getName().equals(prefix+"Person")) - return true; - if (xpp.getName().equals(prefix+"PlanDefinition")) - return true; - if (xpp.getName().equals(prefix+"Practitioner")) - return true; - if (xpp.getName().equals(prefix+"PractitionerRole")) - return true; - if (xpp.getName().equals(prefix+"Procedure")) - return true; - if (xpp.getName().equals(prefix+"ProcedureRequest")) - return true; - if (xpp.getName().equals(prefix+"ProcessRequest")) - return true; - if (xpp.getName().equals(prefix+"ProcessResponse")) - return true; - if (xpp.getName().equals(prefix+"Provenance")) - return true; - if (xpp.getName().equals(prefix+"Questionnaire")) - return true; - if (xpp.getName().equals(prefix+"QuestionnaireResponse")) - return true; - if (xpp.getName().equals(prefix+"RelatedPerson")) - return true; - if (xpp.getName().equals(prefix+"RequestGroup")) - return true; - if (xpp.getName().equals(prefix+"ResearchStudy")) - return true; - if (xpp.getName().equals(prefix+"ResearchSubject")) - return true; - if (xpp.getName().equals(prefix+"RiskAssessment")) - return true; - if (xpp.getName().equals(prefix+"Schedule")) - return true; - if (xpp.getName().equals(prefix+"SearchParameter")) - return true; - if (xpp.getName().equals(prefix+"Sequence")) - return true; - if (xpp.getName().equals(prefix+"ServiceDefinition")) - return true; - if (xpp.getName().equals(prefix+"Slot")) - return true; - if (xpp.getName().equals(prefix+"Specimen")) - return true; - if (xpp.getName().equals(prefix+"StructureDefinition")) - return true; - if (xpp.getName().equals(prefix+"StructureMap")) - return true; - if (xpp.getName().equals(prefix+"Subscription")) - return true; - if (xpp.getName().equals(prefix+"Substance")) - return true; - if (xpp.getName().equals(prefix+"SupplyDelivery")) - return true; - if (xpp.getName().equals(prefix+"SupplyRequest")) - return true; - if (xpp.getName().equals(prefix+"Task")) - return true; - if (xpp.getName().equals(prefix+"TestReport")) - return true; - if (xpp.getName().equals(prefix+"TestScript")) - return true; - if (xpp.getName().equals(prefix+"ValueSet")) - return true; - if (xpp.getName().equals(prefix+"VisionPrescription")) - return true; - if (xpp.getName().equals(prefix+"Date")) - return true; - if (xpp.getName().equals(prefix+"DateTime")) - return true; - if (xpp.getName().equals(prefix+"Code")) - return true; - if (xpp.getName().equals(prefix+"String")) - return true; - if (xpp.getName().equals(prefix+"Integer")) - return true; - if (xpp.getName().equals(prefix+"Oid")) - return true; - if (xpp.getName().equals(prefix+"Uri")) - return true; - if (xpp.getName().equals(prefix+"Uuid")) - return true; - if (xpp.getName().equals(prefix+"Instant")) - return true; - if (xpp.getName().equals(prefix+"Boolean")) - return true; - if (xpp.getName().equals(prefix+"Base64Binary")) - return true; - if (xpp.getName().equals(prefix+"UnsignedInt")) - return true; - if (xpp.getName().equals(prefix+"Markdown")) - return true; - if (xpp.getName().equals(prefix+"Time")) - return true; - if (xpp.getName().equals(prefix+"Id")) - return true; - if (xpp.getName().equals(prefix+"PositiveInt")) - return true; - if (xpp.getName().equals(prefix+"Decimal")) - return true; - return false; - } - protected void composeElementElements(Element element) throws IOException { - for (Extension e : element.getExtension()) { - composeExtension("extension", e); - } - } - - protected void composeBackboneElements(BackboneElement element) throws IOException { - composeElementElements(element); - for (Extension e : element.getModifierExtension()) { - composeExtension("modifierExtension", e); - } - } - - protected > void composeEnumeration(String name, Enumeration value, EnumFactory e) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) { - composeElementAttributes(value); - if (value.getValue() != null) - xml.attribute("value", e.toCode(value.getValue())); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDate(String name, DateType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// date - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDateTime(String name, DateTimeType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// dateTime - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCode(String name, CodeType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// code - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeString(String name, StringType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// string - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeInteger(String name, IntegerType value) throws IOException { - if (value != null) { // integer - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOid(String name, OidType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// oid - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeUri(String name, UriType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// uri - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeUuid(String name, UuidType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// uuid - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeInstant(String name, InstantType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// instant - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBoolean(String name, BooleanType value) throws IOException { - if (value != null) { // boolean - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBase64Binary(String name, Base64BinaryType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// base64Binary - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeUnsignedInt(String name, UnsignedIntType value) throws IOException { - if (value != null) { // unsignedInt - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMarkdown(String name, MarkdownType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// markdown - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTime(String name, TimeType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// time - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeId(String name, IdType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// id - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composePositiveInt(String name, PositiveIntType value) throws IOException { - if (value != null) { // positiveInt - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDecimal(String name, DecimalType value) throws IOException { - if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// decimal - composeElementAttributes(value); - if (value.asStringValue() != null) - xml.attribute("value", value.asStringValue()); - - xml.enter(FHIR_NS, name); - composeElementElements(value); - composeElementClose(value); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExtension(String name, Extension element) throws IOException { - if (element != null) { - composeElementAttributes(element); - if (element.hasUrlElement()) - xml.attribute("url", element.getUrlElement().getValue()); - xml.enter(FHIR_NS, name); - composeExtensionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExtensionElements(Extension element) throws IOException { - composeElementElements(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeNarrative(String name, Narrative element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNarrativeElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNarrativeElements(Narrative element) throws IOException { - composeElementElements(element); - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory()); - if (element.hasDiv()) { - composeXhtml("div", element.getDiv()); - } - } - - protected void composeDuration(String name, Duration element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeDurationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDurationElements(Duration element) throws IOException { - composeQuantityElements(element); - } - - protected void composeCount(String name, Count element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeCountElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCountElements(Count element) throws IOException { - composeQuantityElements(element); - } - - protected void composeMoney(String name, Money element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeMoneyElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMoneyElements(Money element) throws IOException { - composeQuantityElements(element); - } - - protected void composeDistance(String name, Distance element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeDistanceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDistanceElements(Distance element) throws IOException { - composeQuantityElements(element); - } - - protected void composeAge(String name, Age element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeAgeElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAgeElements(Age element) throws IOException { - composeQuantityElements(element); - } - - protected void composeReference(String name, Reference element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeReferenceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeReferenceElements(Reference element) throws IOException { - composeElementElements(element); - if (element.hasReferenceElement()) { - composeString("reference", element.getReferenceElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - } - - protected void composeQuantity(String name, Quantity element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeQuantityElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuantityElements(Quantity element) throws IOException { - composeElementElements(element); - if (element.hasValueElement()) { - composeDecimal("value", element.getValueElement()); - } - if (element.hasComparatorElement()) - composeEnumeration("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory()); - if (element.hasUnitElement()) { - composeString("unit", element.getUnitElement()); - } - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - } - - protected void composePeriod(String name, Period element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composePeriodElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePeriodElements(Period element) throws IOException { - composeElementElements(element); - if (element.hasStartElement()) { - composeDateTime("start", element.getStartElement()); - } - if (element.hasEndElement()) { - composeDateTime("end", element.getEndElement()); - } - } - - protected void composeAttachment(String name, Attachment element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeAttachmentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAttachmentElements(Attachment element) throws IOException { - composeElementElements(element); - if (element.hasContentTypeElement()) { - composeCode("contentType", element.getContentTypeElement()); - } - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - if (element.hasDataElement()) { - composeBase64Binary("data", element.getDataElement()); - } - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasSizeElement()) { - composeUnsignedInt("size", element.getSizeElement()); - } - if (element.hasHashElement()) { - composeBase64Binary("hash", element.getHashElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasCreationElement()) { - composeDateTime("creation", element.getCreationElement()); - } - } - - protected void composeRange(String name, Range element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeRangeElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRangeElements(Range element) throws IOException { - composeElementElements(element); - if (element.hasLow()) { - composeSimpleQuantity("low", element.getLow()); - } - if (element.hasHigh()) { - composeSimpleQuantity("high", element.getHigh()); - } - } - - protected void composeAnnotation(String name, Annotation element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeAnnotationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAnnotationElements(Annotation element) throws IOException { - composeElementElements(element); - if (element.hasAuthor()) { - composeType("author", element.getAuthor()); - } if (element.hasTimeElement()) { - composeDateTime("time", element.getTimeElement()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - } - - protected void composeIdentifier(String name, Identifier element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeIdentifierElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeIdentifierElements(Identifier element) throws IOException { - composeElementElements(element); - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasAssigner()) { - composeReference("assigner", element.getAssigner()); - } - } - - protected void composeCoding(String name, Coding element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeCodingElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodingElements(Coding element) throws IOException { - composeElementElements(element); - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasUserSelectedElement()) { - composeBoolean("userSelected", element.getUserSelectedElement()); - } - } - - protected void composeSignature(String name, Signature element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeSignatureElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSignatureElements(Signature element) throws IOException { - composeElementElements(element); - if (element.hasType()) { - for (Coding e : element.getType()) - composeCoding("type", e); - } - if (element.hasWhenElement()) { - composeInstant("when", element.getWhenElement()); - } - if (element.hasWho()) { - composeType("who", element.getWho()); - } if (element.hasOnBehalfOf()) { - composeType("onBehalfOf", element.getOnBehalfOf()); - } if (element.hasContentTypeElement()) { - composeCode("contentType", element.getContentTypeElement()); - } - if (element.hasBlobElement()) { - composeBase64Binary("blob", element.getBlobElement()); - } - } - - protected void composeSampledData(String name, SampledData element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeSampledDataElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSampledDataElements(SampledData element) throws IOException { - composeElementElements(element); - if (element.hasOrigin()) { - composeSimpleQuantity("origin", element.getOrigin()); - } - if (element.hasPeriodElement()) { - composeDecimal("period", element.getPeriodElement()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasLowerLimitElement()) { - composeDecimal("lowerLimit", element.getLowerLimitElement()); - } - if (element.hasUpperLimitElement()) { - composeDecimal("upperLimit", element.getUpperLimitElement()); - } - if (element.hasDimensionsElement()) { - composePositiveInt("dimensions", element.getDimensionsElement()); - } - if (element.hasDataElement()) { - composeString("data", element.getDataElement()); - } - } - - protected void composeRatio(String name, Ratio element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeRatioElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRatioElements(Ratio element) throws IOException { - composeElementElements(element); - if (element.hasNumerator()) { - composeQuantity("numerator", element.getNumerator()); - } - if (element.hasDenominator()) { - composeQuantity("denominator", element.getDenominator()); - } - } - - protected void composeCodeableConcept(String name, CodeableConcept element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeableConceptElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeableConceptElements(CodeableConcept element) throws IOException { - composeElementElements(element); - if (element.hasCoding()) { - for (Coding e : element.getCoding()) - composeCoding("coding", e); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - } - - protected void composeSimpleQuantity(String name, SimpleQuantity element) throws IOException { - if (element != null) { - composeTypeAttributes(element); - xml.enter(FHIR_NS, name); - composeSimpleQuantityElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSimpleQuantityElements(SimpleQuantity element) throws IOException { - composeElementElements(element); - if (element.hasValueElement()) { - composeDecimal("value", element.getValueElement()); - } - if (element.hasComparatorElement()) - composeEnumeration("comparator", element.getComparatorElement(), new SimpleQuantity.QuantityComparatorEnumFactory()); - if (element.hasUnitElement()) { - composeString("unit", element.getUnitElement()); - } - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - } - - protected void composeMeta(String name, Meta element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMetaElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMetaElements(Meta element) throws IOException { - composeElementElements(element); - if (element.hasVersionIdElement()) { - composeId("versionId", element.getVersionIdElement()); - } - if (element.hasLastUpdatedElement()) { - composeInstant("lastUpdated", element.getLastUpdatedElement()); - } - if (element.hasProfile()) { - for (UriType e : element.getProfile()) - composeUri("profile", e); - } - if (element.hasSecurity()) { - for (Coding e : element.getSecurity()) - composeCoding("security", e); - } - if (element.hasTag()) { - for (Coding e : element.getTag()) - composeCoding("tag", e); - } - } - - protected void composeAddress(String name, Address element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAddressElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAddressElements(Address element) throws IOException { - composeElementElements(element); - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new Address.AddressUseEnumFactory()); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Address.AddressTypeEnumFactory()); - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasLine()) { - for (StringType e : element.getLine()) - composeString("line", e); - } - if (element.hasCityElement()) { - composeString("city", element.getCityElement()); - } - if (element.hasDistrictElement()) { - composeString("district", element.getDistrictElement()); - } - if (element.hasStateElement()) { - composeString("state", element.getStateElement()); - } - if (element.hasPostalCodeElement()) { - composeString("postalCode", element.getPostalCodeElement()); - } - if (element.hasCountryElement()) { - composeString("country", element.getCountryElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeTriggerDefinition(String name, TriggerDefinition element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTriggerDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTriggerDefinitionElements(TriggerDefinition element) throws IOException { - composeElementElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory()); - if (element.hasEventNameElement()) { - composeString("eventName", element.getEventNameElement()); - } - if (element.hasEventTiming()) { - composeType("eventTiming", element.getEventTiming()); - } if (element.hasEventData()) { - composeDataRequirement("eventData", element.getEventData()); - } - if (element.hasEventCondition()) { - composeTriggerDefinitionTriggerDefinitionEventConditionComponent("eventCondition", element.getEventCondition()); - } - } - - protected void composeTriggerDefinitionTriggerDefinitionEventConditionComponent(String name, TriggerDefinition.TriggerDefinitionEventConditionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTriggerDefinitionTriggerDefinitionEventConditionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTriggerDefinitionTriggerDefinitionEventConditionComponentElements(TriggerDefinition.TriggerDefinitionEventConditionComponent element) throws IOException { - composeElementElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasLanguageElement()) { - composeString("language", element.getLanguageElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - } - - protected void composeContributor(String name, Contributor element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContributorElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContributorElements(Contributor element) throws IOException { - composeElementElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory()); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - } - - protected void composeDataRequirement(String name, DataRequirement element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDataRequirementElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDataRequirementElements(DataRequirement element) throws IOException { - composeElementElements(element); - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasProfile()) { - for (UriType e : element.getProfile()) - composeUri("profile", e); - } - if (element.hasMustSupport()) { - for (StringType e : element.getMustSupport()) - composeString("mustSupport", e); - } - if (element.hasCodeFilter()) { - for (DataRequirement.DataRequirementCodeFilterComponent e : element.getCodeFilter()) - composeDataRequirementDataRequirementCodeFilterComponent("codeFilter", e); - } - if (element.hasDateFilter()) { - for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter()) - composeDataRequirementDataRequirementDateFilterComponent("dateFilter", e); - } - } - - protected void composeDataRequirementDataRequirementCodeFilterComponent(String name, DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDataRequirementDataRequirementCodeFilterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDataRequirementDataRequirementCodeFilterComponentElements(DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { - composeElementElements(element); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasValueSet()) { - composeType("valueSet", element.getValueSet()); - } if (element.hasValueCode()) { - for (CodeType e : element.getValueCode()) - composeCode("valueCode", e); - } - if (element.hasValueCoding()) { - for (Coding e : element.getValueCoding()) - composeCoding("valueCoding", e); - } - if (element.hasValueCodeableConcept()) { - for (CodeableConcept e : element.getValueCodeableConcept()) - composeCodeableConcept("valueCodeableConcept", e); - } - } - - protected void composeDataRequirementDataRequirementDateFilterComponent(String name, DataRequirement.DataRequirementDateFilterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDataRequirementDataRequirementDateFilterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDataRequirementDataRequirementDateFilterComponentElements(DataRequirement.DataRequirementDateFilterComponent element) throws IOException { - composeElementElements(element); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeDosage(String name, Dosage element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDosageElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDosageElements(Dosage element) throws IOException { - composeElementElements(element); - if (element.hasSequenceElement()) { - composeInteger("sequence", element.getSequenceElement()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasAdditionalInstruction()) { - for (CodeableConcept e : element.getAdditionalInstruction()) - composeCodeableConcept("additionalInstruction", e); - } - if (element.hasPatientInstructionElement()) { - composeString("patientInstruction", element.getPatientInstructionElement()); - } - if (element.hasTiming()) { - composeTiming("timing", element.getTiming()); - } - if (element.hasAsNeeded()) { - composeType("asNeeded", element.getAsNeeded()); - } if (element.hasSite()) { - composeCodeableConcept("site", element.getSite()); - } - if (element.hasRoute()) { - composeCodeableConcept("route", element.getRoute()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasDose()) { - composeType("dose", element.getDose()); - } if (element.hasMaxDosePerPeriod()) { - composeRatio("maxDosePerPeriod", element.getMaxDosePerPeriod()); - } - if (element.hasMaxDosePerAdministration()) { - composeSimpleQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration()); - } - if (element.hasMaxDosePerLifetime()) { - composeSimpleQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime()); - } - if (element.hasRate()) { - composeType("rate", element.getRate()); - } } - - protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeRelatedArtifactElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRelatedArtifactElements(RelatedArtifact element) throws IOException { - composeElementElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory()); - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasCitationElement()) { - composeString("citation", element.getCitationElement()); - } - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasDocument()) { - composeAttachment("document", element.getDocument()); - } - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - } - - protected void composeContactDetail(String name, ContactDetail element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContactDetailElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContactDetailElements(ContactDetail element) throws IOException { - composeElementElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - } - - protected void composeHumanName(String name, HumanName element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeHumanNameElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeHumanNameElements(HumanName element) throws IOException { - composeElementElements(element); - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new HumanName.NameUseEnumFactory()); - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasFamilyElement()) { - composeString("family", element.getFamilyElement()); - } - if (element.hasGiven()) { - for (StringType e : element.getGiven()) - composeString("given", e); - } - if (element.hasPrefix()) { - for (StringType e : element.getPrefix()) - composeString("prefix", e); - } - if (element.hasSuffix()) { - for (StringType e : element.getSuffix()) - composeString("suffix", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeContactPoint(String name, ContactPoint element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContactPointElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContactPointElements(ContactPoint element) throws IOException { - composeElementElements(element); - if (element.hasSystemElement()) - composeEnumeration("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory()); - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory()); - if (element.hasRankElement()) { - composePositiveInt("rank", element.getRankElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeUsageContext(String name, UsageContext element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeUsageContextElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeUsageContextElements(UsageContext element) throws IOException { - composeElementElements(element); - if (element.hasCode()) { - composeCoding("code", element.getCode()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeTiming(String name, Timing element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTimingElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTimingElements(Timing element) throws IOException { - composeElementElements(element); - if (element.hasEvent()) { - for (DateTimeType e : element.getEvent()) - composeDateTime("event", e); - } - if (element.hasRepeat()) { - composeTimingTimingRepeatComponent("repeat", element.getRepeat()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - } - - protected void composeTimingTimingRepeatComponent(String name, Timing.TimingRepeatComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTimingTimingRepeatComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTimingTimingRepeatComponentElements(Timing.TimingRepeatComponent element) throws IOException { - composeElementElements(element); - if (element.hasBounds()) { - composeType("bounds", element.getBounds()); - } if (element.hasCountElement()) { - composeInteger("count", element.getCountElement()); - } - if (element.hasCountMaxElement()) { - composeInteger("countMax", element.getCountMaxElement()); - } - if (element.hasDurationElement()) { - composeDecimal("duration", element.getDurationElement()); - } - if (element.hasDurationMaxElement()) { - composeDecimal("durationMax", element.getDurationMaxElement()); - } - if (element.hasDurationUnitElement()) - composeEnumeration("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory()); - if (element.hasFrequencyElement()) { - composeInteger("frequency", element.getFrequencyElement()); - } - if (element.hasFrequencyMaxElement()) { - composeInteger("frequencyMax", element.getFrequencyMaxElement()); - } - if (element.hasPeriodElement()) { - composeDecimal("period", element.getPeriodElement()); - } - if (element.hasPeriodMaxElement()) { - composeDecimal("periodMax", element.getPeriodMaxElement()); - } - if (element.hasPeriodUnitElement()) - composeEnumeration("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory()); - if (element.hasDayOfWeek()) - for (Enumeration e : element.getDayOfWeek()) - composeEnumeration("dayOfWeek", e, new Timing.DayOfWeekEnumFactory()); - if (element.hasTimeOfDay()) { - for (TimeType e : element.getTimeOfDay()) - composeTime("timeOfDay", e); - } - if (element.hasWhen()) - for (Enumeration e : element.getWhen()) - composeEnumeration("when", e, new Timing.EventTimingEnumFactory()); - if (element.hasOffsetElement()) { - composeUnsignedInt("offset", element.getOffsetElement()); - } - } - - protected void composeElementDefinition(String name, ElementDefinition element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElements(ElementDefinition element) throws IOException { - composeElementElements(element); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasRepresentation()) - for (Enumeration e : element.getRepresentation()) - composeEnumeration("representation", e, new ElementDefinition.PropertyRepresentationEnumFactory()); - if (element.hasSliceNameElement()) { - composeString("sliceName", element.getSliceNameElement()); - } - if (element.hasLabelElement()) { - composeString("label", element.getLabelElement()); - } - if (element.hasCode()) { - for (Coding e : element.getCode()) - composeCoding("code", e); - } - if (element.hasSlicing()) { - composeElementDefinitionElementDefinitionSlicingComponent("slicing", element.getSlicing()); - } - if (element.hasShortElement()) { - composeString("short", element.getShortElement()); - } - if (element.hasDefinitionElement()) { - composeMarkdown("definition", element.getDefinitionElement()); - } - if (element.hasCommentElement()) { - composeMarkdown("comment", element.getCommentElement()); - } - if (element.hasRequirementsElement()) { - composeMarkdown("requirements", element.getRequirementsElement()); - } - if (element.hasAlias()) { - for (StringType e : element.getAlias()) - composeString("alias", e); - } - if (element.hasMinElement()) { - composeUnsignedInt("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - if (element.hasBase()) { - composeElementDefinitionElementDefinitionBaseComponent("base", element.getBase()); - } - if (element.hasContentReferenceElement()) { - composeUri("contentReference", element.getContentReferenceElement()); - } - if (element.hasType()) { - for (ElementDefinition.TypeRefComponent e : element.getType()) - composeElementDefinitionTypeRefComponent("type", e); - } - if (element.hasDefaultValue()) { - composeType("defaultValue", element.getDefaultValue()); - } if (element.hasMeaningWhenMissingElement()) { - composeMarkdown("meaningWhenMissing", element.getMeaningWhenMissingElement()); - } - if (element.hasOrderMeaningElement()) { - composeString("orderMeaning", element.getOrderMeaningElement()); - } - if (element.hasFixed()) { - composeType("fixed", element.getFixed()); - } if (element.hasPattern()) { - composeType("pattern", element.getPattern()); - } if (element.hasExample()) { - for (ElementDefinition.ElementDefinitionExampleComponent e : element.getExample()) - composeElementDefinitionElementDefinitionExampleComponent("example", e); - } - if (element.hasMinValue()) { - composeType("minValue", element.getMinValue()); - } if (element.hasMaxValue()) { - composeType("maxValue", element.getMaxValue()); - } if (element.hasMaxLengthElement()) { - composeInteger("maxLength", element.getMaxLengthElement()); - } - if (element.hasCondition()) { - for (IdType e : element.getCondition()) - composeId("condition", e); - } - if (element.hasConstraint()) { - for (ElementDefinition.ElementDefinitionConstraintComponent e : element.getConstraint()) - composeElementDefinitionElementDefinitionConstraintComponent("constraint", e); - } - if (element.hasMustSupportElement()) { - composeBoolean("mustSupport", element.getMustSupportElement()); - } - if (element.hasIsModifierElement()) { - composeBoolean("isModifier", element.getIsModifierElement()); - } - if (element.hasIsSummaryElement()) { - composeBoolean("isSummary", element.getIsSummaryElement()); - } - if (element.hasBinding()) { - composeElementDefinitionElementDefinitionBindingComponent("binding", element.getBinding()); - } - if (element.hasMapping()) { - for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping()) - composeElementDefinitionElementDefinitionMappingComponent("mapping", e); - } - } - - protected void composeElementDefinitionElementDefinitionSlicingComponent(String name, ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionSlicingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionSlicingComponentElements(ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { - composeElementElements(element); - if (element.hasDiscriminator()) { - for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator()) - composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent("discriminator", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasOrderedElement()) { - composeBoolean("ordered", element.getOrderedElement()); - } - if (element.hasRulesElement()) - composeEnumeration("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory()); - } - - protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentElements(ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { - composeElementElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory()); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - } - - protected void composeElementDefinitionElementDefinitionBaseComponent(String name, ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionBaseComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionBaseComponentElements(ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { - composeElementElements(element); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasMinElement()) { - composeUnsignedInt("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - } - - protected void composeElementDefinitionTypeRefComponent(String name, ElementDefinition.TypeRefComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionTypeRefComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionTypeRefComponentElements(ElementDefinition.TypeRefComponent element) throws IOException { - composeElementElements(element); - if (element.hasCodeElement()) { - composeUri("code", element.getCodeElement()); - } - if (element.hasProfileElement()) { - composeUri("profile", element.getProfileElement()); - } - if (element.hasTargetProfileElement()) { - composeUri("targetProfile", element.getTargetProfileElement()); - } - if (element.hasAggregation()) - for (Enumeration e : element.getAggregation()) - composeEnumeration("aggregation", e, new ElementDefinition.AggregationModeEnumFactory()); - if (element.hasVersioningElement()) - composeEnumeration("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory()); - } - - protected void composeElementDefinitionElementDefinitionExampleComponent(String name, ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionExampleComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionExampleComponentElements(ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { - composeElementElements(element); - if (element.hasLabelElement()) { - composeString("label", element.getLabelElement()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeElementDefinitionElementDefinitionConstraintComponent(String name, ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionConstraintComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionConstraintComponentElements(ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { - composeElementElements(element); - if (element.hasKeyElement()) { - composeId("key", element.getKeyElement()); - } - if (element.hasRequirementsElement()) { - composeString("requirements", element.getRequirementsElement()); - } - if (element.hasSeverityElement()) - composeEnumeration("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory()); - if (element.hasHumanElement()) { - composeString("human", element.getHumanElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - if (element.hasXpathElement()) { - composeString("xpath", element.getXpathElement()); - } - if (element.hasSourceElement()) { - composeUri("source", element.getSourceElement()); - } - } - - protected void composeElementDefinitionElementDefinitionBindingComponent(String name, ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionBindingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionBindingComponentElements(ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { - composeElementElements(element); - if (element.hasStrengthElement()) - composeEnumeration("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory()); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasValueSet()) { - composeType("valueSet", element.getValueSet()); - } } - - protected void composeElementDefinitionElementDefinitionMappingComponent(String name, ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeElementDefinitionElementDefinitionMappingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeElementDefinitionElementDefinitionMappingComponentElements(ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { - composeElementElements(element); - if (element.hasIdentityElement()) { - composeId("identity", element.getIdentityElement()); - } - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - if (element.hasMapElement()) { - composeString("map", element.getMapElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeParameterDefinition(String name, ParameterDefinition element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeParameterDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeParameterDefinitionElements(ParameterDefinition element) throws IOException { - composeElementElements(element); - if (element.hasNameElement()) { - composeCode("name", element.getNameElement()); - } - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory()); - if (element.hasMinElement()) { - composeInteger("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - } - - protected void composeDomainResourceAttributes(DomainResource element) throws IOException { - composeResourceAttributes(element); - } - - protected void composeDomainResourceElements(DomainResource element) throws IOException { - composeResourceElements(element); - if (element.hasText()) { - composeNarrative("text", element.getText()); - } - if (element.hasContained()) { - for (Resource e : element.getContained()) - { - xml.enter(FHIR_NS, "contained"); - composeResource(e); - xml.exit(FHIR_NS, "contained"); - } - } - if (element.hasExtension()) - for (Extension e : element.getExtension()) - composeExtension("extension", e); - if (element.hasModifierExtension()) { - for (Extension e : element.getModifierExtension()) - composeExtension("modifierExtension", e); - } - } - - protected void composeParameters(String name, Parameters element) throws IOException { - if (element != null) { - composeResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeParametersElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeParametersElements(Parameters element) throws IOException { - composeResourceElements(element); - if (element.hasParameter()) { - for (Parameters.ParametersParameterComponent e : element.getParameter()) - composeParametersParametersParameterComponent("parameter", e); - } - } - - protected void composeParametersParametersParameterComponent(String name, Parameters.ParametersParameterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeParametersParametersParameterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeParametersParametersParameterComponentElements(Parameters.ParametersParameterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasResource()) { - xml.enter(FHIR_NS, "resource"); - composeResource(element.getResource()); - xml.exit(FHIR_NS, "resource"); - } - if (element.hasPart()) { - for (Parameters.ParametersParameterComponent e : element.getPart()) - composeParametersParametersParameterComponent("part", e); - } - } - - protected void composeResourceAttributes(Resource element) throws IOException { - if (style != OutputStyle.CANONICAL) - for (String comment : element.getFormatCommentsPre()) - xml.comment(comment, getOutputStyle() == OutputStyle.PRETTY); - } - - protected void composeResourceElements(Resource element) throws IOException { - if (element.hasIdElement()) { - composeId("id", element.getIdElement()); - } - if (element.hasMeta()) { - composeMeta("meta", element.getMeta()); - } - if (element.hasImplicitRulesElement()) { - composeUri("implicitRules", element.getImplicitRulesElement()); - } - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - } - - protected void composeAccount(String name, Account element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeAccountElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAccountElements(Account element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Account.AccountStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasActive()) { - composePeriod("active", element.getActive()); - } - if (element.hasBalance()) { - composeMoney("balance", element.getBalance()); - } - if (element.hasCoverage()) { - for (Account.CoverageComponent e : element.getCoverage()) - composeAccountCoverageComponent("coverage", e); - } - if (element.hasOwner()) { - composeReference("owner", element.getOwner()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasGuarantor()) { - for (Account.GuarantorComponent e : element.getGuarantor()) - composeAccountGuarantorComponent("guarantor", e); - } - } - - protected void composeAccountCoverageComponent(String name, Account.CoverageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAccountCoverageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAccountCoverageComponentElements(Account.CoverageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasPriorityElement()) { - composePositiveInt("priority", element.getPriorityElement()); - } - } - - protected void composeAccountGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAccountGuarantorComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAccountGuarantorComponentElements(Account.GuarantorComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - if (element.hasOnHoldElement()) { - composeBoolean("onHold", element.getOnHoldElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeActivityDefinition(String name, ActivityDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeActivityDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeActivityDefinitionElements(ActivityDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasTopic()) { - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept("topic", e); - } - if (element.hasContributor()) { - for (Contributor e : element.getContributor()) - composeContributor("contributor", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - if (element.hasLibrary()) { - for (Reference e : element.getLibrary()) - composeReference("library", e); - } - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory()); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasParticipant()) { - for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant()) - composeActivityDefinitionActivityDefinitionParticipantComponent("participant", e); - } - if (element.hasProduct()) { - composeType("product", element.getProduct()); - } if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasDosage()) { - for (Dosage e : element.getDosage()) - composeDosage("dosage", e); - } - if (element.hasBodySite()) { - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept("bodySite", e); - } - if (element.hasTransform()) { - composeReference("transform", element.getTransform()); - } - if (element.hasDynamicValue()) { - for (ActivityDefinition.ActivityDefinitionDynamicValueComponent e : element.getDynamicValue()) - composeActivityDefinitionActivityDefinitionDynamicValueComponent("dynamicValue", e); - } - } - - protected void composeActivityDefinitionActivityDefinitionParticipantComponent(String name, ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeActivityDefinitionActivityDefinitionParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeActivityDefinitionActivityDefinitionParticipantComponentElements(ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory()); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - } - - protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeActivityDefinitionActivityDefinitionDynamicValueComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeActivityDefinitionActivityDefinitionDynamicValueComponentElements(ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasLanguageElement()) { - composeString("language", element.getLanguageElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - } - - protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeAdverseEventElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAdverseEventElements(AdverseEvent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasActualityElement()) - composeEnumeration("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory()); - if (element.hasCategoryElement()) - composeEnumeration("category", element.getCategoryElement(), new AdverseEvent.AdverseEventCategoryEnumFactory()); - if (element.hasEvent()) { - composeCodeableConcept("event", element.getEvent()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasResultingCondition()) { - for (Reference e : element.getResultingCondition()) - composeReference("resultingCondition", e); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasSeriousness()) { - composeCodeableConcept("seriousness", element.getSeriousness()); - } - if (element.hasSeverity()) { - composeCodeableConcept("severity", element.getSeverity()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasRecorder()) { - composeReference("recorder", element.getRecorder()); - } - if (element.hasEventParticipant()) { - composeReference("eventParticipant", element.getEventParticipant()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasSuspectEntity()) { - for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity()) - composeAdverseEventAdverseEventSuspectEntityComponent("suspectEntity", e); - } - if (element.hasSubjectMedicalHistory()) { - for (Reference e : element.getSubjectMedicalHistory()) - composeReference("subjectMedicalHistory", e); - } - if (element.hasReferenceDocument()) { - for (Reference e : element.getReferenceDocument()) - composeReference("referenceDocument", e); - } - if (element.hasStudy()) { - for (Reference e : element.getStudy()) - composeReference("study", e); - } - } - - protected void composeAdverseEventAdverseEventSuspectEntityComponent(String name, AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAdverseEventAdverseEventSuspectEntityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAdverseEventAdverseEventSuspectEntityComponentElements(AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasInstance()) { - composeReference("instance", element.getInstance()); - } - if (element.hasCausality()) { - for (AdverseEvent.AdverseEventSuspectEntityCausalityComponent e : element.getCausality()) - composeAdverseEventAdverseEventSuspectEntityCausalityComponent("causality", e); - } - } - - protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAdverseEventAdverseEventSuspectEntityCausalityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponentElements(AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAssessment()) { - composeCodeableConcept("assessment", element.getAssessment()); - } - if (element.hasProductRelatednessElement()) { - composeString("productRelatedness", element.getProductRelatednessElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - } - - protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeAllergyIntoleranceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAllergyIntoleranceElements(AllergyIntolerance element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasClinicalStatusElement()) - composeEnumeration("clinicalStatus", element.getClinicalStatusElement(), new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory()); - if (element.hasVerificationStatusElement()) - composeEnumeration("verificationStatus", element.getVerificationStatusElement(), new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory()); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory()); - if (element.hasCategory()) - for (Enumeration e : element.getCategory()) - composeEnumeration("category", e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory()); - if (element.hasCriticalityElement()) - composeEnumeration("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory()); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasOnset()) { - composeType("onset", element.getOnset()); - } if (element.hasAssertedDateElement()) { - composeDateTime("assertedDate", element.getAssertedDateElement()); - } - if (element.hasRecorder()) { - composeReference("recorder", element.getRecorder()); - } - if (element.hasAsserter()) { - composeReference("asserter", element.getAsserter()); - } - if (element.hasLastOccurrenceElement()) { - composeDateTime("lastOccurrence", element.getLastOccurrenceElement()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasReaction()) { - for (AllergyIntolerance.AllergyIntoleranceReactionComponent e : element.getReaction()) - composeAllergyIntoleranceAllergyIntoleranceReactionComponent("reaction", e); - } - } - - protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAllergyIntoleranceAllergyIntoleranceReactionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponentElements(AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSubstance()) { - composeCodeableConcept("substance", element.getSubstance()); - } - if (element.hasManifestation()) { - for (CodeableConcept e : element.getManifestation()) - composeCodeableConcept("manifestation", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasOnsetElement()) { - composeDateTime("onset", element.getOnsetElement()); - } - if (element.hasSeverityElement()) - composeEnumeration("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory()); - if (element.hasExposureRoute()) { - composeCodeableConcept("exposureRoute", element.getExposureRoute()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeAppointment(String name, Appointment element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeAppointmentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAppointmentElements(Appointment element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory()); - if (element.hasServiceCategory()) { - composeCodeableConcept("serviceCategory", element.getServiceCategory()); - } - if (element.hasServiceType()) { - for (CodeableConcept e : element.getServiceType()) - composeCodeableConcept("serviceType", e); - } - if (element.hasSpecialty()) { - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept("specialty", e); - } - if (element.hasAppointmentType()) { - composeCodeableConcept("appointmentType", element.getAppointmentType()); - } - if (element.hasReason()) { - for (CodeableConcept e : element.getReason()) - composeCodeableConcept("reason", e); - } - if (element.hasIndication()) { - for (Reference e : element.getIndication()) - composeReference("indication", e); - } - if (element.hasPriorityElement()) { - composeUnsignedInt("priority", element.getPriorityElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasSupportingInformation()) { - for (Reference e : element.getSupportingInformation()) - composeReference("supportingInformation", e); - } - if (element.hasStartElement()) { - composeInstant("start", element.getStartElement()); - } - if (element.hasEndElement()) { - composeInstant("end", element.getEndElement()); - } - if (element.hasMinutesDurationElement()) { - composePositiveInt("minutesDuration", element.getMinutesDurationElement()); - } - if (element.hasSlot()) { - for (Reference e : element.getSlot()) - composeReference("slot", e); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasIncomingReferral()) { - for (Reference e : element.getIncomingReferral()) - composeReference("incomingReferral", e); - } - if (element.hasParticipant()) { - for (Appointment.AppointmentParticipantComponent e : element.getParticipant()) - composeAppointmentAppointmentParticipantComponent("participant", e); - } - if (element.hasRequestedPeriod()) { - for (Period e : element.getRequestedPeriod()) - composePeriod("requestedPeriod", e); - } - } - - protected void composeAppointmentAppointmentParticipantComponent(String name, Appointment.AppointmentParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAppointmentAppointmentParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAppointmentAppointmentParticipantComponentElements(Appointment.AppointmentParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasRequiredElement()) - composeEnumeration("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory()); - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory()); - } - - protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeAppointmentResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAppointmentResponseElements(AppointmentResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasAppointment()) { - composeReference("appointment", element.getAppointment()); - } - if (element.hasStartElement()) { - composeInstant("start", element.getStartElement()); - } - if (element.hasEndElement()) { - composeInstant("end", element.getEndElement()); - } - if (element.hasParticipantType()) { - for (CodeableConcept e : element.getParticipantType()) - composeCodeableConcept("participantType", e); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasParticipantStatusElement()) - composeEnumeration("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.ParticipantStatusEnumFactory()); - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeAuditEvent(String name, AuditEvent element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeAuditEventElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAuditEventElements(AuditEvent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasSubtype()) { - for (Coding e : element.getSubtype()) - composeCoding("subtype", e); - } - if (element.hasActionElement()) - composeEnumeration("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory()); - if (element.hasRecordedElement()) { - composeInstant("recorded", element.getRecordedElement()); - } - if (element.hasOutcomeElement()) - composeEnumeration("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory()); - if (element.hasOutcomeDescElement()) { - composeString("outcomeDesc", element.getOutcomeDescElement()); - } - if (element.hasPurposeOfEvent()) { - for (CodeableConcept e : element.getPurposeOfEvent()) - composeCodeableConcept("purposeOfEvent", e); - } - if (element.hasAgent()) { - for (AuditEvent.AuditEventAgentComponent e : element.getAgent()) - composeAuditEventAuditEventAgentComponent("agent", e); - } - if (element.hasSource()) { - composeAuditEventAuditEventSourceComponent("source", element.getSource()); - } - if (element.hasEntity()) { - for (AuditEvent.AuditEventEntityComponent e : element.getEntity()) - composeAuditEventAuditEventEntityComponent("entity", e); - } - } - - protected void composeAuditEventAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAuditEventAuditEventAgentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAuditEventAuditEventAgentComponentElements(AuditEvent.AuditEventAgentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - for (CodeableConcept e : element.getRole()) - composeCodeableConcept("role", e); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - if (element.hasUserId()) { - composeIdentifier("userId", element.getUserId()); - } - if (element.hasAltIdElement()) { - composeString("altId", element.getAltIdElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasRequestorElement()) { - composeBoolean("requestor", element.getRequestorElement()); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasPolicy()) { - for (UriType e : element.getPolicy()) - composeUri("policy", e); - } - if (element.hasMedia()) { - composeCoding("media", element.getMedia()); - } - if (element.hasNetwork()) { - composeAuditEventAuditEventAgentNetworkComponent("network", element.getNetwork()); - } - if (element.hasPurposeOfUse()) { - for (CodeableConcept e : element.getPurposeOfUse()) - composeCodeableConcept("purposeOfUse", e); - } - } - - protected void composeAuditEventAuditEventAgentNetworkComponent(String name, AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAuditEventAuditEventAgentNetworkComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAuditEventAuditEventAgentNetworkComponentElements(AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAddressElement()) { - composeString("address", element.getAddressElement()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory()); - } - - protected void composeAuditEventAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAuditEventAuditEventSourceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAuditEventAuditEventSourceComponentElements(AuditEvent.AuditEventSourceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSiteElement()) { - composeString("site", element.getSiteElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasType()) { - for (Coding e : element.getType()) - composeCoding("type", e); - } - } - - protected void composeAuditEventAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAuditEventAuditEventEntityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAuditEventAuditEventEntityComponentElements(AuditEvent.AuditEventEntityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasRole()) { - composeCoding("role", element.getRole()); - } - if (element.hasLifecycle()) { - composeCoding("lifecycle", element.getLifecycle()); - } - if (element.hasSecurityLabel()) { - for (Coding e : element.getSecurityLabel()) - composeCoding("securityLabel", e); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasQueryElement()) { - composeBase64Binary("query", element.getQueryElement()); - } - if (element.hasDetail()) { - for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail()) - composeAuditEventAuditEventEntityDetailComponent("detail", e); - } - } - - protected void composeAuditEventAuditEventEntityDetailComponent(String name, AuditEvent.AuditEventEntityDetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeAuditEventAuditEventEntityDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeAuditEventAuditEventEntityDetailComponentElements(AuditEvent.AuditEventEntityDetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) { - composeString("type", element.getTypeElement()); - } - if (element.hasValueElement()) { - composeBase64Binary("value", element.getValueElement()); - } - } - - protected void composeBasic(String name, Basic element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeBasicElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBasicElements(Basic element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasCreatedElement()) { - composeDate("created", element.getCreatedElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - } - - protected void composeBinary(String name, Binary element) throws IOException { - if (element != null) { - composeResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeBinaryElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBinaryElements(Binary element) throws IOException { - composeResourceElements(element); - if (element.hasContentTypeElement()) { - composeCode("contentType", element.getContentTypeElement()); - } - if (element.hasSecurityContext()) { - composeReference("securityContext", element.getSecurityContext()); - } - if (element.hasContentElement()) { - composeBase64Binary("content", element.getContentElement()); - } - } - - protected void composeBodyStructure(String name, BodyStructure element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeBodyStructureElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBodyStructureElements(BodyStructure element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasMorphology()) { - composeCodeableConcept("morphology", element.getMorphology()); - } - if (element.hasLocation()) { - composeCodeableConcept("location", element.getLocation()); - } - if (element.hasLocationQualifier()) { - for (CodeableConcept e : element.getLocationQualifier()) - composeCodeableConcept("locationQualifier", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasImage()) { - for (Attachment e : element.getImage()) - composeAttachment("image", e); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - } - - protected void composeBundle(String name, Bundle element) throws IOException { - if (element != null) { - composeResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeBundleElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBundleElements(Bundle element) throws IOException { - composeResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory()); - if (element.hasTotalElement()) { - composeUnsignedInt("total", element.getTotalElement()); - } - if (element.hasLink()) { - for (Bundle.BundleLinkComponent e : element.getLink()) - composeBundleBundleLinkComponent("link", e); - } - if (element.hasEntry()) { - for (Bundle.BundleEntryComponent e : element.getEntry()) - composeBundleBundleEntryComponent("entry", e); - } - if (element.hasSignature()) { - composeSignature("signature", element.getSignature()); - } - } - - protected void composeBundleBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeBundleBundleLinkComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBundleBundleLinkComponentElements(Bundle.BundleLinkComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRelationElement()) { - composeString("relation", element.getRelationElement()); - } - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - } - - protected void composeBundleBundleEntryComponent(String name, Bundle.BundleEntryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeBundleBundleEntryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBundleBundleEntryComponentElements(Bundle.BundleEntryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLink()) { - for (Bundle.BundleLinkComponent e : element.getLink()) - composeBundleBundleLinkComponent("link", e); - } - if (element.hasFullUrlElement()) { - composeUri("fullUrl", element.getFullUrlElement()); - } - if (element.hasResource()) { - xml.enter(FHIR_NS, "resource"); - composeResource(element.getResource()); - xml.exit(FHIR_NS, "resource"); - } - if (element.hasSearch()) { - composeBundleBundleEntrySearchComponent("search", element.getSearch()); - } - if (element.hasRequest()) { - composeBundleBundleEntryRequestComponent("request", element.getRequest()); - } - if (element.hasResponse()) { - composeBundleBundleEntryResponseComponent("response", element.getResponse()); - } - } - - protected void composeBundleBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeBundleBundleEntrySearchComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBundleBundleEntrySearchComponentElements(Bundle.BundleEntrySearchComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory()); - if (element.hasScoreElement()) { - composeDecimal("score", element.getScoreElement()); - } - } - - protected void composeBundleBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeBundleBundleEntryRequestComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBundleBundleEntryRequestComponentElements(Bundle.BundleEntryRequestComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMethodElement()) - composeEnumeration("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory()); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIfNoneMatchElement()) { - composeString("ifNoneMatch", element.getIfNoneMatchElement()); - } - if (element.hasIfModifiedSinceElement()) { - composeInstant("ifModifiedSince", element.getIfModifiedSinceElement()); - } - if (element.hasIfMatchElement()) { - composeString("ifMatch", element.getIfMatchElement()); - } - if (element.hasIfNoneExistElement()) { - composeString("ifNoneExist", element.getIfNoneExistElement()); - } - } - - protected void composeBundleBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeBundleBundleEntryResponseComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeBundleBundleEntryResponseComponentElements(Bundle.BundleEntryResponseComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasStatusElement()) { - composeString("status", element.getStatusElement()); - } - if (element.hasLocationElement()) { - composeUri("location", element.getLocationElement()); - } - if (element.hasEtagElement()) { - composeString("etag", element.getEtagElement()); - } - if (element.hasLastModifiedElement()) { - composeInstant("lastModified", element.getLastModifiedElement()); - } - if (element.hasOutcome()) { - xml.enter(FHIR_NS, "outcome"); - composeResource(element.getOutcome()); - xml.exit(FHIR_NS, "outcome"); - } - } - - protected void composeCapabilityStatement(String name, CapabilityStatement element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementElements(CapabilityStatement element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new CapabilityStatement.CapabilityStatementKindEnumFactory()); - if (element.hasInstantiates()) { - for (UriType e : element.getInstantiates()) - composeUri("instantiates", e); - } - if (element.hasSoftware()) { - composeCapabilityStatementCapabilityStatementSoftwareComponent("software", element.getSoftware()); - } - if (element.hasImplementation()) { - composeCapabilityStatementCapabilityStatementImplementationComponent("implementation", element.getImplementation()); - } - if (element.hasFhirVersionElement()) { - composeId("fhirVersion", element.getFhirVersionElement()); - } - if (element.hasAcceptUnknownElement()) - composeEnumeration("acceptUnknown", element.getAcceptUnknownElement(), new CapabilityStatement.UnknownContentCodeEnumFactory()); - if (element.hasFormat()) { - for (CodeType e : element.getFormat()) - composeCode("format", e); - } - if (element.hasPatchFormat()) { - for (CodeType e : element.getPatchFormat()) - composeCode("patchFormat", e); - } - if (element.hasImplementationGuide()) { - for (UriType e : element.getImplementationGuide()) - composeUri("implementationGuide", e); - } - if (element.hasProfile()) { - for (Reference e : element.getProfile()) - composeReference("profile", e); - } - if (element.hasRest()) { - for (CapabilityStatement.CapabilityStatementRestComponent e : element.getRest()) - composeCapabilityStatementCapabilityStatementRestComponent("rest", e); - } - if (element.hasMessaging()) { - for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging()) - composeCapabilityStatementCapabilityStatementMessagingComponent("messaging", e); - } - if (element.hasDocument()) { - for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument()) - composeCapabilityStatementCapabilityStatementDocumentComponent("document", e); - } - } - - protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(String name, CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementSoftwareComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementSoftwareComponentElements(CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasReleaseDateElement()) { - composeDateTime("releaseDate", element.getReleaseDateElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementImplementationComponent(String name, CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementImplementationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementImplementationComponentElements(CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestComponent(String name, CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementRestComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestComponentElements(CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - if (element.hasSecurity()) { - composeCapabilityStatementCapabilityStatementRestSecurityComponent("security", element.getSecurity()); - } - if (element.hasResource()) { - for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource()) - composeCapabilityStatementCapabilityStatementRestResourceComponent("resource", e); - } - if (element.hasInteraction()) { - for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction()) - composeCapabilityStatementSystemInteractionComponent("interaction", e); - } - if (element.hasSearchParam()) { - for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent("searchParam", e); - } - if (element.hasOperation()) { - for (CapabilityStatement.CapabilityStatementRestOperationComponent e : element.getOperation()) - composeCapabilityStatementCapabilityStatementRestOperationComponent("operation", e); - } - if (element.hasCompartment()) { - for (UriType e : element.getCompartment()) - composeUri("compartment", e); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementRestSecurityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityComponentElements(CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCorsElement()) { - composeBoolean("cors", element.getCorsElement()); - } - if (element.hasService()) { - for (CodeableConcept e : element.getService()) - composeCodeableConcept("service", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasCertificate()) { - for (CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent e : element.getCertificate()) - composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent("certificate", e); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentElements(CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasBlobElement()) { - composeBase64Binary("blob", element.getBlobElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(String name, CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementRestResourceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceComponentElements(CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - if (element.hasDocumentationElement()) { - composeMarkdown("documentation", element.getDocumentationElement()); - } - if (element.hasInteraction()) { - for (CapabilityStatement.ResourceInteractionComponent e : element.getInteraction()) - composeCapabilityStatementResourceInteractionComponent("interaction", e); - } - if (element.hasVersioningElement()) - composeEnumeration("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory()); - if (element.hasReadHistoryElement()) { - composeBoolean("readHistory", element.getReadHistoryElement()); - } - if (element.hasUpdateCreateElement()) { - composeBoolean("updateCreate", element.getUpdateCreateElement()); - } - if (element.hasConditionalCreateElement()) { - composeBoolean("conditionalCreate", element.getConditionalCreateElement()); - } - if (element.hasConditionalReadElement()) - composeEnumeration("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory()); - if (element.hasConditionalUpdateElement()) { - composeBoolean("conditionalUpdate", element.getConditionalUpdateElement()); - } - if (element.hasConditionalDeleteElement()) - composeEnumeration("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory()); - if (element.hasReferencePolicy()) - for (Enumeration e : element.getReferencePolicy()) - composeEnumeration("referencePolicy", e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory()); - if (element.hasSearchInclude()) { - for (StringType e : element.getSearchInclude()) - composeString("searchInclude", e); - } - if (element.hasSearchRevInclude()) { - for (StringType e : element.getSearchRevInclude()) - composeString("searchRevInclude", e); - } - if (element.hasSearchParam()) { - for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent("searchParam", e); - } - } - - protected void composeCapabilityStatementResourceInteractionComponent(String name, CapabilityStatement.ResourceInteractionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementResourceInteractionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementResourceInteractionComponentElements(CapabilityStatement.ResourceInteractionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentElements(CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDefinitionElement()) { - composeUri("definition", element.getDefinitionElement()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeCapabilityStatementSystemInteractionComponent(String name, CapabilityStatement.SystemInteractionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementSystemInteractionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementSystemInteractionComponentElements(CapabilityStatement.SystemInteractionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestOperationComponent(String name, CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementRestOperationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementRestOperationComponentElements(CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingComponent(String name, CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementMessagingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingComponentElements(CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasEndpoint()) { - for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint()) - composeCapabilityStatementCapabilityStatementMessagingEndpointComponent("endpoint", e); - } - if (element.hasReliableCacheElement()) { - composeUnsignedInt("reliableCache", element.getReliableCacheElement()); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - if (element.hasSupportedMessage()) { - for (CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent e : element.getSupportedMessage()) - composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent("supportedMessage", e); - } - if (element.hasEvent()) { - for (CapabilityStatement.CapabilityStatementMessagingEventComponent e : element.getEvent()) - composeCapabilityStatementCapabilityStatementMessagingEventComponent("event", e); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementMessagingEndpointComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponentElements(CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasProtocol()) { - composeCoding("protocol", element.getProtocol()); - } - if (element.hasAddressElement()) { - composeUri("address", element.getAddressElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentElements(CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory()); - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEventComponent(String name, CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementMessagingEventComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementMessagingEventComponentElements(CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCoding("code", element.getCode()); - } - if (element.hasCategoryElement()) - composeEnumeration("category", element.getCategoryElement(), new CapabilityStatement.MessageSignificanceCategoryEnumFactory()); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory()); - if (element.hasFocusElement()) { - composeCode("focus", element.getFocusElement()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeCapabilityStatementCapabilityStatementDocumentComponent(String name, CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCapabilityStatementCapabilityStatementDocumentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCapabilityStatementCapabilityStatementDocumentComponentElements(CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - } - - protected void composeCarePlan(String name, CarePlan element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCarePlanElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCarePlanElements(CarePlan element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasReplaces()) { - for (Reference e : element.getReplaces()) - composeReference("replaces", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory()); - if (element.hasIntentElement()) - composeEnumeration("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasAuthor()) { - for (Reference e : element.getAuthor()) - composeReference("author", e); - } - if (element.hasCareTeam()) { - for (Reference e : element.getCareTeam()) - composeReference("careTeam", e); - } - if (element.hasAddresses()) { - for (Reference e : element.getAddresses()) - composeReference("addresses", e); - } - if (element.hasSupportingInfo()) { - for (Reference e : element.getSupportingInfo()) - composeReference("supportingInfo", e); - } - if (element.hasGoal()) { - for (Reference e : element.getGoal()) - composeReference("goal", e); - } - if (element.hasActivity()) { - for (CarePlan.CarePlanActivityComponent e : element.getActivity()) - composeCarePlanCarePlanActivityComponent("activity", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeCarePlanCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCarePlanCarePlanActivityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCarePlanCarePlanActivityComponentElements(CarePlan.CarePlanActivityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOutcomeCodeableConcept()) { - for (CodeableConcept e : element.getOutcomeCodeableConcept()) - composeCodeableConcept("outcomeCodeableConcept", e); - } - if (element.hasOutcomeReference()) { - for (Reference e : element.getOutcomeReference()) - composeReference("outcomeReference", e); - } - if (element.hasProgress()) { - for (Annotation e : element.getProgress()) - composeAnnotation("progress", e); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - if (element.hasDetail()) { - composeCarePlanCarePlanActivityDetailComponent("detail", element.getDetail()); - } - } - - protected void composeCarePlanCarePlanActivityDetailComponent(String name, CarePlan.CarePlanActivityDetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCarePlanCarePlanActivityDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCarePlanCarePlanActivityDetailComponentElements(CarePlan.CarePlanActivityDetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasGoal()) { - for (Reference e : element.getGoal()) - composeReference("goal", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory()); - if (element.hasStatusReasonElement()) { - composeString("statusReason", element.getStatusReasonElement()); - } - if (element.hasProhibitedElement()) { - composeBoolean("prohibited", element.getProhibitedElement()); - } - if (element.hasScheduled()) { - composeType("scheduled", element.getScheduled()); - } if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasPerformer()) { - for (Reference e : element.getPerformer()) - composeReference("performer", e); - } - if (element.hasProduct()) { - composeType("product", element.getProduct()); - } if (element.hasDailyAmount()) { - composeSimpleQuantity("dailyAmount", element.getDailyAmount()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - } - - protected void composeCareTeam(String name, CareTeam element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCareTeamElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCareTeamElements(CareTeam element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasParticipant()) { - for (CareTeam.CareTeamParticipantComponent e : element.getParticipant()) - composeCareTeamCareTeamParticipantComponent("participant", e); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasManagingOrganization()) { - for (Reference e : element.getManagingOrganization()) - composeReference("managingOrganization", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeCareTeamCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCareTeamCareTeamParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCareTeamCareTeamParticipantComponentElements(CareTeam.CareTeamParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasMember()) { - composeReference("member", element.getMember()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeChargeItem(String name, ChargeItem element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeChargeItemElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeChargeItemElements(ChargeItem element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasDefinition()) { - for (UriType e : element.getDefinition()) - composeUri("definition", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory()); - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasParticipant()) { - for (ChargeItem.ChargeItemParticipantComponent e : element.getParticipant()) - composeChargeItemChargeItemParticipantComponent("participant", e); - } - if (element.hasPerformingOrganization()) { - composeReference("performingOrganization", element.getPerformingOrganization()); - } - if (element.hasRequestingOrganization()) { - composeReference("requestingOrganization", element.getRequestingOrganization()); - } - if (element.hasQuantity()) { - composeQuantity("quantity", element.getQuantity()); - } - if (element.hasBodysite()) { - for (CodeableConcept e : element.getBodysite()) - composeCodeableConcept("bodysite", e); - } - if (element.hasFactorOverrideElement()) { - composeDecimal("factorOverride", element.getFactorOverrideElement()); - } - if (element.hasPriceOverride()) { - composeMoney("priceOverride", element.getPriceOverride()); - } - if (element.hasOverrideReasonElement()) { - composeString("overrideReason", element.getOverrideReasonElement()); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasEnteredDateElement()) { - composeDateTime("enteredDate", element.getEnteredDateElement()); - } - if (element.hasReason()) { - for (CodeableConcept e : element.getReason()) - composeCodeableConcept("reason", e); - } - if (element.hasService()) { - for (Reference e : element.getService()) - composeReference("service", e); - } - if (element.hasAccount()) { - for (Reference e : element.getAccount()) - composeReference("account", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasSupportingInformation()) { - for (Reference e : element.getSupportingInformation()) - composeReference("supportingInformation", e); - } - } - - protected void composeChargeItemChargeItemParticipantComponent(String name, ChargeItem.ChargeItemParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeChargeItemChargeItemParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeChargeItemChargeItemParticipantComponentElements(ChargeItem.ChargeItemParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - } - - protected void composeClaim(String name, Claim element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimElements(Claim element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - for (CodeableConcept e : element.getSubType()) - composeCodeableConcept("subType", e); - } - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new Claim.UseEnumFactory()); - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasBillablePeriod()) { - composePeriod("billablePeriod", element.getBillablePeriod()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasFundsReserve()) { - composeCodeableConcept("fundsReserve", element.getFundsReserve()); - } - if (element.hasRelated()) { - for (Claim.RelatedClaimComponent e : element.getRelated()) - composeClaimRelatedClaimComponent("related", e); - } - if (element.hasPrescription()) { - composeReference("prescription", element.getPrescription()); - } - if (element.hasOriginalPrescription()) { - composeReference("originalPrescription", element.getOriginalPrescription()); - } - if (element.hasPayee()) { - composeClaimPayeeComponent("payee", element.getPayee()); - } - if (element.hasReferral()) { - composeReference("referral", element.getReferral()); - } - if (element.hasFacility()) { - composeReference("facility", element.getFacility()); - } - if (element.hasCareTeam()) { - for (Claim.CareTeamComponent e : element.getCareTeam()) - composeClaimCareTeamComponent("careTeam", e); - } - if (element.hasInformation()) { - for (Claim.SpecialConditionComponent e : element.getInformation()) - composeClaimSpecialConditionComponent("information", e); - } - if (element.hasDiagnosis()) { - for (Claim.DiagnosisComponent e : element.getDiagnosis()) - composeClaimDiagnosisComponent("diagnosis", e); - } - if (element.hasProcedure()) { - for (Claim.ProcedureComponent e : element.getProcedure()) - composeClaimProcedureComponent("procedure", e); - } - if (element.hasInsurance()) { - for (Claim.InsuranceComponent e : element.getInsurance()) - composeClaimInsuranceComponent("insurance", e); - } - if (element.hasAccident()) { - composeClaimAccidentComponent("accident", element.getAccident()); - } - if (element.hasEmploymentImpacted()) { - composePeriod("employmentImpacted", element.getEmploymentImpacted()); - } - if (element.hasHospitalization()) { - composePeriod("hospitalization", element.getHospitalization()); - } - if (element.hasItem()) { - for (Claim.ItemComponent e : element.getItem()) - composeClaimItemComponent("item", e); - } - if (element.hasTotal()) { - composeMoney("total", element.getTotal()); - } - } - - protected void composeClaimRelatedClaimComponent(String name, Claim.RelatedClaimComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimRelatedClaimComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimRelatedClaimComponentElements(Claim.RelatedClaimComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasClaim()) { - composeReference("claim", element.getClaim()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasReference()) { - composeIdentifier("reference", element.getReference()); - } - } - - protected void composeClaimPayeeComponent(String name, Claim.PayeeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimPayeeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimPayeeComponentElements(Claim.PayeeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasResource()) { - composeCoding("resource", element.getResource()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - } - - protected void composeClaimCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimCareTeamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimCareTeamComponentElements(Claim.CareTeamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasResponsibleElement()) { - composeBoolean("responsible", element.getResponsibleElement()); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasQualification()) { - composeCodeableConcept("qualification", element.getQualification()); - } - } - - protected void composeClaimSpecialConditionComponent(String name, Claim.SpecialConditionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimSpecialConditionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimSpecialConditionComponentElements(Claim.SpecialConditionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - } - - protected void composeClaimDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimDiagnosisComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimDiagnosisComponentElements(Claim.DiagnosisComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasDiagnosis()) { - composeType("diagnosis", element.getDiagnosis()); - } if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasPackageCode()) { - composeCodeableConcept("packageCode", element.getPackageCode()); - } - } - - protected void composeClaimProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimProcedureComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimProcedureComponentElements(Claim.ProcedureComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasProcedure()) { - composeType("procedure", element.getProcedure()); - } } - - protected void composeClaimInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimInsuranceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimInsuranceComponentElements(Claim.InsuranceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasFocalElement()) { - composeBoolean("focal", element.getFocalElement()); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasBusinessArrangementElement()) { - composeString("businessArrangement", element.getBusinessArrangementElement()); - } - if (element.hasPreAuthRef()) { - for (StringType e : element.getPreAuthRef()) - composeString("preAuthRef", e); - } - if (element.hasClaimResponse()) { - composeReference("claimResponse", element.getClaimResponse()); - } - } - - protected void composeClaimAccidentComponent(String name, Claim.AccidentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimAccidentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimAccidentComponentElements(Claim.AccidentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDateElement()) { - composeDate("date", element.getDateElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLocation()) { - composeType("location", element.getLocation()); - } } - - protected void composeClaimItemComponent(String name, Claim.ItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimItemComponentElements(Claim.ItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasCareTeamLinkId()) { - for (PositiveIntType e : element.getCareTeamLinkId()) - composePositiveInt("careTeamLinkId", e); - } - if (element.hasDiagnosisLinkId()) { - for (PositiveIntType e : element.getDiagnosisLinkId()) - composePositiveInt("diagnosisLinkId", e); - } - if (element.hasProcedureLinkId()) { - for (PositiveIntType e : element.getProcedureLinkId()) - composePositiveInt("procedureLinkId", e); - } - if (element.hasInformationLinkId()) { - for (PositiveIntType e : element.getInformationLinkId()) - composePositiveInt("informationLinkId", e); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasProgramCode()) { - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept("programCode", e); - } - if (element.hasServiced()) { - composeType("serviced", element.getServiced()); - } if (element.hasLocation()) { - composeType("location", element.getLocation()); - } if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - for (Reference e : element.getUdi()) - composeReference("udi", e); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasSubSite()) { - for (CodeableConcept e : element.getSubSite()) - composeCodeableConcept("subSite", e); - } - if (element.hasEncounter()) { - for (Reference e : element.getEncounter()) - composeReference("encounter", e); - } - if (element.hasDetail()) { - for (Claim.DetailComponent e : element.getDetail()) - composeClaimDetailComponent("detail", e); - } - } - - protected void composeClaimDetailComponent(String name, Claim.DetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimDetailComponentElements(Claim.DetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasProgramCode()) { - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept("programCode", e); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - for (Reference e : element.getUdi()) - composeReference("udi", e); - } - if (element.hasSubDetail()) { - for (Claim.SubDetailComponent e : element.getSubDetail()) - composeClaimSubDetailComponent("subDetail", e); - } - } - - protected void composeClaimSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimSubDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimSubDetailComponentElements(Claim.SubDetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasProgramCode()) { - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept("programCode", e); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - for (Reference e : element.getUdi()) - composeReference("udi", e); - } - } - - protected void composeClaimResponse(String name, ClaimResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseElements(ClaimResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory()); - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeString("disposition", element.getDispositionElement()); - } - if (element.hasPayeeType()) { - composeCodeableConcept("payeeType", element.getPayeeType()); - } - if (element.hasItem()) { - for (ClaimResponse.ItemComponent e : element.getItem()) - composeClaimResponseItemComponent("item", e); - } - if (element.hasAddItem()) { - for (ClaimResponse.AddedItemComponent e : element.getAddItem()) - composeClaimResponseAddedItemComponent("addItem", e); - } - if (element.hasError()) { - for (ClaimResponse.ErrorComponent e : element.getError()) - composeClaimResponseErrorComponent("error", e); - } - if (element.hasTotalCost()) { - composeMoney("totalCost", element.getTotalCost()); - } - if (element.hasUnallocDeductable()) { - composeMoney("unallocDeductable", element.getUnallocDeductable()); - } - if (element.hasTotalBenefit()) { - composeMoney("totalBenefit", element.getTotalBenefit()); - } - if (element.hasPayment()) { - composeClaimResponsePaymentComponent("payment", element.getPayment()); - } - if (element.hasReserved()) { - composeCoding("reserved", element.getReserved()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasProcessNote()) { - for (ClaimResponse.NoteComponent e : element.getProcessNote()) - composeClaimResponseNoteComponent("processNote", e); - } - if (element.hasCommunicationRequest()) { - for (Reference e : element.getCommunicationRequest()) - composeReference("communicationRequest", e); - } - if (element.hasInsurance()) { - for (ClaimResponse.InsuranceComponent e : element.getInsurance()) - composeClaimResponseInsuranceComponent("insurance", e); - } - } - - protected void composeClaimResponseItemComponent(String name, ClaimResponse.ItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseItemComponentElements(ClaimResponse.ItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent("adjudication", e); - } - if (element.hasDetail()) { - for (ClaimResponse.ItemDetailComponent e : element.getDetail()) - composeClaimResponseItemDetailComponent("detail", e); - } - } - - protected void composeClaimResponseAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseAdjudicationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseAdjudicationComponentElements(ClaimResponse.AdjudicationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasValueElement()) { - composeDecimal("value", element.getValueElement()); - } - } - - protected void composeClaimResponseItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseItemDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseItemDetailComponentElements(ClaimResponse.ItemDetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent("adjudication", e); - } - if (element.hasSubDetail()) { - for (ClaimResponse.SubDetailComponent e : element.getSubDetail()) - composeClaimResponseSubDetailComponent("subDetail", e); - } - } - - protected void composeClaimResponseSubDetailComponent(String name, ClaimResponse.SubDetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseSubDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseSubDetailComponentElements(ClaimResponse.SubDetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent("adjudication", e); - } - } - - protected void composeClaimResponseAddedItemComponent(String name, ClaimResponse.AddedItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseAddedItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseAddedItemComponentElements(ClaimResponse.AddedItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkId()) { - for (PositiveIntType e : element.getSequenceLinkId()) - composePositiveInt("sequenceLinkId", e); - } - if (element.hasDetailSequenceLinkId()) { - for (PositiveIntType e : element.getDetailSequenceLinkId()) - composePositiveInt("detailSequenceLinkId", e); - } - if (element.hasSubdetailSequenceLinkId()) { - for (PositiveIntType e : element.getSubdetailSequenceLinkId()) - composePositiveInt("subdetailSequenceLinkId", e); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasFee()) { - composeMoney("fee", element.getFee()); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) - composeClaimResponseAdjudicationComponent("adjudication", e); - } - } - - protected void composeClaimResponseErrorComponent(String name, ClaimResponse.ErrorComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseErrorComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseErrorComponentElements(ClaimResponse.ErrorComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkIdElement()) { - composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); - } - if (element.hasDetailSequenceLinkIdElement()) { - composePositiveInt("detailSequenceLinkId", element.getDetailSequenceLinkIdElement()); - } - if (element.hasSubdetailSequenceLinkIdElement()) { - composePositiveInt("subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - } - - protected void composeClaimResponsePaymentComponent(String name, ClaimResponse.PaymentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponsePaymentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponsePaymentComponentElements(ClaimResponse.PaymentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAdjustment()) { - composeMoney("adjustment", element.getAdjustment()); - } - if (element.hasAdjustmentReason()) { - composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); - } - if (element.hasDateElement()) { - composeDate("date", element.getDateElement()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - } - - protected void composeClaimResponseNoteComponent(String name, ClaimResponse.NoteComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseNoteComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseNoteComponentElements(ClaimResponse.NoteComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNumberElement()) { - composePositiveInt("number", element.getNumberElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasLanguage()) { - composeCodeableConcept("language", element.getLanguage()); - } - } - - protected void composeClaimResponseInsuranceComponent(String name, ClaimResponse.InsuranceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClaimResponseInsuranceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClaimResponseInsuranceComponentElements(ClaimResponse.InsuranceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasFocalElement()) { - composeBoolean("focal", element.getFocalElement()); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasBusinessArrangementElement()) { - composeString("businessArrangement", element.getBusinessArrangementElement()); - } - if (element.hasPreAuthRef()) { - for (StringType e : element.getPreAuthRef()) - composeString("preAuthRef", e); - } - if (element.hasClaimResponse()) { - composeReference("claimResponse", element.getClaimResponse()); - } - } - - protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeClinicalImpressionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClinicalImpressionElements(ClinicalImpression element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ClinicalImpression.ClinicalImpressionStatusEnumFactory()); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasAssessor()) { - composeReference("assessor", element.getAssessor()); - } - if (element.hasPrevious()) { - composeReference("previous", element.getPrevious()); - } - if (element.hasProblem()) { - for (Reference e : element.getProblem()) - composeReference("problem", e); - } - if (element.hasInvestigation()) { - for (ClinicalImpression.ClinicalImpressionInvestigationComponent e : element.getInvestigation()) - composeClinicalImpressionClinicalImpressionInvestigationComponent("investigation", e); - } - if (element.hasProtocol()) { - for (UriType e : element.getProtocol()) - composeUri("protocol", e); - } - if (element.hasSummaryElement()) { - composeString("summary", element.getSummaryElement()); - } - if (element.hasFinding()) { - for (ClinicalImpression.ClinicalImpressionFindingComponent e : element.getFinding()) - composeClinicalImpressionClinicalImpressionFindingComponent("finding", e); - } - if (element.hasPrognosisCodeableConcept()) { - for (CodeableConcept e : element.getPrognosisCodeableConcept()) - composeCodeableConcept("prognosisCodeableConcept", e); - } - if (element.hasPrognosisReference()) { - for (Reference e : element.getPrognosisReference()) - composeReference("prognosisReference", e); - } - if (element.hasAction()) { - for (Reference e : element.getAction()) - composeReference("action", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(String name, ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClinicalImpressionClinicalImpressionInvestigationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClinicalImpressionClinicalImpressionInvestigationComponentElements(ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasItem()) { - for (Reference e : element.getItem()) - composeReference("item", e); - } - } - - protected void composeClinicalImpressionClinicalImpressionFindingComponent(String name, ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeClinicalImpressionClinicalImpressionFindingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeClinicalImpressionClinicalImpressionFindingComponentElements(ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasItem()) { - composeType("item", element.getItem()); - } if (element.hasBasisElement()) { - composeString("basis", element.getBasisElement()); - } - } - - protected void composeCodeSystem(String name, CodeSystem element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeSystemElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeSystemElements(CodeSystem element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasCaseSensitiveElement()) { - composeBoolean("caseSensitive", element.getCaseSensitiveElement()); - } - if (element.hasValueSetElement()) { - composeUri("valueSet", element.getValueSetElement()); - } - if (element.hasHierarchyMeaningElement()) - composeEnumeration("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory()); - if (element.hasCompositionalElement()) { - composeBoolean("compositional", element.getCompositionalElement()); - } - if (element.hasVersionNeededElement()) { - composeBoolean("versionNeeded", element.getVersionNeededElement()); - } - if (element.hasContentElement()) - composeEnumeration("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory()); - if (element.hasCountElement()) { - composeUnsignedInt("count", element.getCountElement()); - } - if (element.hasFilter()) { - for (CodeSystem.CodeSystemFilterComponent e : element.getFilter()) - composeCodeSystemCodeSystemFilterComponent("filter", e); - } - if (element.hasProperty()) { - for (CodeSystem.PropertyComponent e : element.getProperty()) - composeCodeSystemPropertyComponent("property", e); - } - if (element.hasConcept()) { - for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) - composeCodeSystemConceptDefinitionComponent("concept", e); - } - } - - protected void composeCodeSystemCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeSystemCodeSystemFilterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeSystemCodeSystemFilterComponentElements(CodeSystem.CodeSystemFilterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasOperator()) - for (Enumeration e : element.getOperator()) - composeEnumeration("operator", e, new CodeSystem.FilterOperatorEnumFactory()); - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeCodeSystemPropertyComponent(String name, CodeSystem.PropertyComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeSystemPropertyComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeSystemPropertyComponentElements(CodeSystem.PropertyComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasUriElement()) { - composeUri("uri", element.getUriElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory()); - } - - protected void composeCodeSystemConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeSystemConceptDefinitionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeSystemConceptDefinitionComponentElements(CodeSystem.ConceptDefinitionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasDefinitionElement()) { - composeString("definition", element.getDefinitionElement()); - } - if (element.hasDesignation()) { - for (CodeSystem.ConceptDefinitionDesignationComponent e : element.getDesignation()) - composeCodeSystemConceptDefinitionDesignationComponent("designation", e); - } - if (element.hasProperty()) { - for (CodeSystem.ConceptPropertyComponent e : element.getProperty()) - composeCodeSystemConceptPropertyComponent("property", e); - } - if (element.hasConcept()) { - for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) - composeCodeSystemConceptDefinitionComponent("concept", e); - } - } - - protected void composeCodeSystemConceptDefinitionDesignationComponent(String name, CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeSystemConceptDefinitionDesignationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeSystemConceptDefinitionDesignationComponentElements(CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeCodeSystemConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCodeSystemConceptPropertyComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCodeSystemConceptPropertyComponentElements(CodeSystem.ConceptPropertyComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeCommunication(String name, Communication element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCommunicationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCommunicationElements(Communication element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasInResponseTo()) { - for (Reference e : element.getInResponseTo()) - composeReference("inResponseTo", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory()); - if (element.hasNotDoneElement()) { - composeBoolean("notDone", element.getNotDoneElement()); - } - if (element.hasNotDoneReason()) { - composeCodeableConcept("notDoneReason", element.getNotDoneReason()); - } - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new Communication.CommunicationPriorityEnumFactory()); - if (element.hasMedium()) { - for (CodeableConcept e : element.getMedium()) - composeCodeableConcept("medium", e); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasRecipient()) { - for (Reference e : element.getRecipient()) - composeReference("recipient", e); - } - if (element.hasTopic()) { - for (Reference e : element.getTopic()) - composeReference("topic", e); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSentElement()) { - composeDateTime("sent", element.getSentElement()); - } - if (element.hasReceivedElement()) { - composeDateTime("received", element.getReceivedElement()); - } - if (element.hasSender()) { - composeReference("sender", element.getSender()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasPayload()) { - for (Communication.CommunicationPayloadComponent e : element.getPayload()) - composeCommunicationCommunicationPayloadComponent("payload", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeCommunicationCommunicationPayloadComponent(String name, Communication.CommunicationPayloadComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCommunicationCommunicationPayloadComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCommunicationCommunicationPayloadComponentElements(Communication.CommunicationPayloadComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } } - - protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCommunicationRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCommunicationRequestElements(CommunicationRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasReplaces()) { - for (Reference e : element.getReplaces()) - composeReference("replaces", e); - } - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new CommunicationRequest.CommunicationRequestStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new CommunicationRequest.CommunicationPriorityEnumFactory()); - if (element.hasMedium()) { - for (CodeableConcept e : element.getMedium()) - composeCodeableConcept("medium", e); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasRecipient()) { - for (Reference e : element.getRecipient()) - composeReference("recipient", e); - } - if (element.hasTopic()) { - for (Reference e : element.getTopic()) - composeReference("topic", e); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPayload()) { - for (CommunicationRequest.CommunicationRequestPayloadComponent e : element.getPayload()) - composeCommunicationRequestCommunicationRequestPayloadComponent("payload", e); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasSender()) { - composeReference("sender", element.getSender()); - } - if (element.hasRequester()) { - composeCommunicationRequestCommunicationRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeCommunicationRequestCommunicationRequestPayloadComponent(String name, CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCommunicationRequestCommunicationRequestPayloadComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCommunicationRequestCommunicationRequestPayloadComponentElements(CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } } - - protected void composeCommunicationRequestCommunicationRequestRequesterComponent(String name, CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCommunicationRequestCommunicationRequestRequesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCommunicationRequestCommunicationRequestRequesterComponentElements(CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCompartmentDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompartmentDefinitionElements(CompartmentDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory()); - if (element.hasSearchElement()) { - composeBoolean("search", element.getSearchElement()); - } - if (element.hasResource()) { - for (CompartmentDefinition.CompartmentDefinitionResourceComponent e : element.getResource()) - composeCompartmentDefinitionCompartmentDefinitionResourceComponent("resource", e); - } - } - - protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCompartmentDefinitionCompartmentDefinitionResourceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponentElements(CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasParam()) { - for (StringType e : element.getParam()) - composeString("param", e); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeComposition(String name, Composition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCompositionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompositionElements(Composition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasClass_()) { - composeCodeableConcept("class", element.getClass_()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasAuthor()) { - for (Reference e : element.getAuthor()) - composeReference("author", e); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasConfidentialityElement()) - composeEnumeration("confidentiality", element.getConfidentialityElement(), new Composition.DocumentConfidentialityEnumFactory()); - if (element.hasAttester()) { - for (Composition.CompositionAttesterComponent e : element.getAttester()) - composeCompositionCompositionAttesterComponent("attester", e); - } - if (element.hasCustodian()) { - composeReference("custodian", element.getCustodian()); - } - if (element.hasRelatesTo()) { - for (Composition.CompositionRelatesToComponent e : element.getRelatesTo()) - composeCompositionCompositionRelatesToComponent("relatesTo", e); - } - if (element.hasEvent()) { - for (Composition.CompositionEventComponent e : element.getEvent()) - composeCompositionCompositionEventComponent("event", e); - } - if (element.hasSection()) { - for (Composition.SectionComponent e : element.getSection()) - composeCompositionSectionComponent("section", e); - } - } - - protected void composeCompositionCompositionAttesterComponent(String name, Composition.CompositionAttesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCompositionCompositionAttesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompositionCompositionAttesterComponentElements(Composition.CompositionAttesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMode()) - for (Enumeration e : element.getMode()) - composeEnumeration("mode", e, new Composition.CompositionAttestationModeEnumFactory()); - if (element.hasTimeElement()) { - composeDateTime("time", element.getTimeElement()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - } - - protected void composeCompositionCompositionRelatesToComponent(String name, Composition.CompositionRelatesToComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCompositionCompositionRelatesToComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompositionCompositionRelatesToComponentElements(Composition.CompositionRelatesToComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory()); - if (element.hasTarget()) { - composeType("target", element.getTarget()); - } } - - protected void composeCompositionCompositionEventComponent(String name, Composition.CompositionEventComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCompositionCompositionEventComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompositionCompositionEventComponentElements(Composition.CompositionEventComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - for (CodeableConcept e : element.getCode()) - composeCodeableConcept("code", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasDetail()) { - for (Reference e : element.getDetail()) - composeReference("detail", e); - } - } - - protected void composeCompositionSectionComponent(String name, Composition.SectionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCompositionSectionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCompositionSectionComponentElements(Composition.SectionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasText()) { - composeNarrative("text", element.getText()); - } - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new Composition.SectionModeEnumFactory()); - if (element.hasOrderedBy()) { - composeCodeableConcept("orderedBy", element.getOrderedBy()); - } - if (element.hasEntry()) { - for (Reference e : element.getEntry()) - composeReference("entry", e); - } - if (element.hasEmptyReason()) { - composeCodeableConcept("emptyReason", element.getEmptyReason()); - } - if (element.hasSection()) { - for (Composition.SectionComponent e : element.getSection()) - composeCompositionSectionComponent("section", e); - } - } - - protected void composeConceptMap(String name, ConceptMap element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeConceptMapElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConceptMapElements(ConceptMap element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasSource()) { - composeType("source", element.getSource()); - } if (element.hasTarget()) { - composeType("target", element.getTarget()); - } if (element.hasGroup()) { - for (ConceptMap.ConceptMapGroupComponent e : element.getGroup()) - composeConceptMapConceptMapGroupComponent("group", e); - } - } - - protected void composeConceptMapConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConceptMapConceptMapGroupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConceptMapConceptMapGroupComponentElements(ConceptMap.ConceptMapGroupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSourceElement()) { - composeUri("source", element.getSourceElement()); - } - if (element.hasSourceVersionElement()) { - composeString("sourceVersion", element.getSourceVersionElement()); - } - if (element.hasTargetElement()) { - composeUri("target", element.getTargetElement()); - } - if (element.hasTargetVersionElement()) { - composeString("targetVersion", element.getTargetVersionElement()); - } - if (element.hasElement()) { - for (ConceptMap.SourceElementComponent e : element.getElement()) - composeConceptMapSourceElementComponent("element", e); - } - if (element.hasUnmapped()) { - composeConceptMapConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped()); - } - } - - protected void composeConceptMapSourceElementComponent(String name, ConceptMap.SourceElementComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConceptMapSourceElementComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConceptMapSourceElementComponentElements(ConceptMap.SourceElementComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasTarget()) { - for (ConceptMap.TargetElementComponent e : element.getTarget()) - composeConceptMapTargetElementComponent("target", e); - } - } - - protected void composeConceptMapTargetElementComponent(String name, ConceptMap.TargetElementComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConceptMapTargetElementComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConceptMapTargetElementComponentElements(ConceptMap.TargetElementComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasEquivalenceElement()) - composeEnumeration("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory()); - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasDependsOn()) { - for (ConceptMap.OtherElementComponent e : element.getDependsOn()) - composeConceptMapOtherElementComponent("dependsOn", e); - } - if (element.hasProduct()) { - for (ConceptMap.OtherElementComponent e : element.getProduct()) - composeConceptMapOtherElementComponent("product", e); - } - } - - protected void composeConceptMapOtherElementComponent(String name, ConceptMap.OtherElementComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConceptMapOtherElementComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConceptMapOtherElementComponentElements(ConceptMap.OtherElementComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasPropertyElement()) { - composeUri("property", element.getPropertyElement()); - } - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasCodeElement()) { - composeString("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - } - - protected void composeConceptMapConceptMapGroupUnmappedComponent(String name, ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConceptMapConceptMapGroupUnmappedComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConceptMapConceptMapGroupUnmappedComponentElements(ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory()); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - } - - protected void composeCondition(String name, Condition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeConditionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConditionElements(Condition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasClinicalStatusElement()) - composeEnumeration("clinicalStatus", element.getClinicalStatusElement(), new Condition.ConditionClinicalStatusEnumFactory()); - if (element.hasVerificationStatusElement()) - composeEnumeration("verificationStatus", element.getVerificationStatusElement(), new Condition.ConditionVerificationStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasSeverity()) { - composeCodeableConcept("severity", element.getSeverity()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasBodySite()) { - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept("bodySite", e); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOnset()) { - composeType("onset", element.getOnset()); - } if (element.hasAbatement()) { - composeType("abatement", element.getAbatement()); - } if (element.hasAssertedDateElement()) { - composeDateTime("assertedDate", element.getAssertedDateElement()); - } - if (element.hasAsserter()) { - composeReference("asserter", element.getAsserter()); - } - if (element.hasStage()) { - for (Condition.ConditionStageComponent e : element.getStage()) - composeConditionConditionStageComponent("stage", e); - } - if (element.hasEvidence()) { - for (Condition.ConditionEvidenceComponent e : element.getEvidence()) - composeConditionConditionEvidenceComponent("evidence", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeConditionConditionStageComponent(String name, Condition.ConditionStageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConditionConditionStageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConditionConditionStageComponentElements(Condition.ConditionStageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSummary()) { - composeCodeableConcept("summary", element.getSummary()); - } - if (element.hasAssessment()) { - for (Reference e : element.getAssessment()) - composeReference("assessment", e); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - } - - protected void composeConditionConditionEvidenceComponent(String name, Condition.ConditionEvidenceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConditionConditionEvidenceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConditionConditionEvidenceComponentElements(Condition.ConditionEvidenceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - for (CodeableConcept e : element.getCode()) - composeCodeableConcept("code", e); - } - if (element.hasDetail()) { - for (Reference e : element.getDetail()) - composeReference("detail", e); - } - } - - protected void composeConsent(String name, Consent element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeConsentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConsentElements(Consent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateTimeElement()) { - composeDateTime("dateTime", element.getDateTimeElement()); - } - if (element.hasConsentingParty()) { - for (Reference e : element.getConsentingParty()) - composeReference("consentingParty", e); - } - if (element.hasOrganization()) { - for (Reference e : element.getOrganization()) - composeReference("organization", e); - } - if (element.hasSource()) { - composeType("source", element.getSource()); - } if (element.hasPolicy()) { - for (Consent.ConsentPolicyComponent e : element.getPolicy()) - composeConsentConsentPolicyComponent("policy", e); - } - if (element.hasPolicyRuleElement()) { - composeUri("policyRule", element.getPolicyRuleElement()); - } - if (element.hasVerification()) { - for (Consent.ConsentVerificationComponent e : element.getVerification()) - composeConsentConsentVerificationComponent("verification", e); - } - if (element.hasProvision()) { - for (Consent.provisionComponent e : element.getProvision()) - composeConsentprovisionComponent("provision", e); - } - } - - protected void composeConsentConsentPolicyComponent(String name, Consent.ConsentPolicyComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConsentConsentPolicyComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConsentConsentPolicyComponentElements(Consent.ConsentPolicyComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAuthorityElement()) { - composeUri("authority", element.getAuthorityElement()); - } - if (element.hasUriElement()) { - composeUri("uri", element.getUriElement()); - } - } - - protected void composeConsentConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConsentConsentVerificationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConsentConsentVerificationComponentElements(Consent.ConsentVerificationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasVerifiedElement()) { - composeBoolean("verified", element.getVerifiedElement()); - } - if (element.hasVerifiedWith()) { - composeReference("verifiedWith", element.getVerifiedWith()); - } - if (element.hasVerificationDateElement()) { - composeDateTime("verificationDate", element.getVerificationDateElement()); - } - } - - protected void composeConsentprovisionComponent(String name, Consent.provisionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConsentprovisionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConsentprovisionComponentElements(Consent.provisionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory()); - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasActor()) { - for (Consent.provisionActorComponent e : element.getActor()) - composeConsentprovisionActorComponent("actor", e); - } - if (element.hasAction()) { - for (CodeableConcept e : element.getAction()) - composeCodeableConcept("action", e); - } - if (element.hasSecurityLabel()) { - for (Coding e : element.getSecurityLabel()) - composeCoding("securityLabel", e); - } - if (element.hasPurpose()) { - for (Coding e : element.getPurpose()) - composeCoding("purpose", e); - } - if (element.hasClass_()) { - for (Coding e : element.getClass_()) - composeCoding("class", e); - } - if (element.hasCode()) { - for (Coding e : element.getCode()) - composeCoding("code", e); - } - if (element.hasDataPeriod()) { - composePeriod("dataPeriod", element.getDataPeriod()); - } - if (element.hasData()) { - for (Consent.provisionDataComponent e : element.getData()) - composeConsentprovisionDataComponent("data", e); - } - if (element.hasProvision()) { - for (Consent.provisionComponent e : element.getProvision()) - composeConsentprovisionComponent("provision", e); - } - } - - protected void composeConsentprovisionActorComponent(String name, Consent.provisionActorComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConsentprovisionActorComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConsentprovisionActorComponentElements(Consent.provisionActorComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - } - - protected void composeConsentprovisionDataComponent(String name, Consent.provisionDataComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeConsentprovisionDataComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeConsentprovisionDataComponentElements(Consent.provisionDataComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMeaningElement()) - composeEnumeration("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory()); - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - } - - protected void composeContract(String name, Contract element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeContractElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractElements(Contract element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory()); - if (element.hasContentDerivative()) { - composeCodeableConcept("contentDerivative", element.getContentDerivative()); - } - if (element.hasIssuedElement()) { - composeDateTime("issued", element.getIssuedElement()); - } - if (element.hasApplies()) { - composePeriod("applies", element.getApplies()); - } - if (element.hasSubject()) { - for (Reference e : element.getSubject()) - composeReference("subject", e); - } - if (element.hasAuthority()) { - for (Reference e : element.getAuthority()) - composeReference("authority", e); - } - if (element.hasDomain()) { - for (Reference e : element.getDomain()) - composeReference("domain", e); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - for (CodeableConcept e : element.getSubType()) - composeCodeableConcept("subType", e); - } - if (element.hasTerm()) { - for (Contract.TermComponent e : element.getTerm()) - composeContractTermComponent("term", e); - } - if (element.hasSigner()) { - for (Contract.SignatoryComponent e : element.getSigner()) - composeContractSignatoryComponent("signer", e); - } - if (element.hasFriendly()) { - for (Contract.FriendlyLanguageComponent e : element.getFriendly()) - composeContractFriendlyLanguageComponent("friendly", e); - } - if (element.hasLegal()) { - for (Contract.LegalLanguageComponent e : element.getLegal()) - composeContractLegalLanguageComponent("legal", e); - } - if (element.hasRule()) { - composeContractComputableLanguageComponent("rule", element.getRule()); - } - if (element.hasLegallyBinding()) { - composeType("legallyBinding", element.getLegallyBinding()); - } } - - protected void composeContractTermComponent(String name, Contract.TermComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractTermComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractTermComponentElements(Contract.TermComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasIssuedElement()) { - composeDateTime("issued", element.getIssuedElement()); - } - if (element.hasApplies()) { - composePeriod("applies", element.getApplies()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - composeCodeableConcept("subType", element.getSubType()); - } - if (element.hasOffer()) { - composeContractContractOfferComponent("offer", element.getOffer()); - } - if (element.hasAsset()) { - for (Contract.ContractAssetComponent e : element.getAsset()) - composeContractContractAssetComponent("asset", e); - } - if (element.hasAgent()) { - for (Contract.AgentComponent e : element.getAgent()) - composeContractAgentComponent("agent", e); - } - if (element.hasAction()) { - for (CodeableConcept e : element.getAction()) - composeCodeableConcept("action", e); - } - if (element.hasActionReason()) { - for (CodeableConcept e : element.getActionReason()) - composeCodeableConcept("actionReason", e); - } - if (element.hasGroup()) { - for (Contract.TermComponent e : element.getGroup()) - composeContractTermComponent("group", e); - } - } - - protected void composeContractContractOfferComponent(String name, Contract.ContractOfferComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractContractOfferComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractContractOfferComponentElements(Contract.ContractOfferComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTopic()) { - composeReference("topic", element.getTopic()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasDecision()) { - composeCodeableConcept("decision", element.getDecision()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasLinkIdElement()) { - composeString("linkId", element.getLinkIdElement()); - } - } - - protected void composeContractContractAssetComponent(String name, Contract.ContractAssetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractContractAssetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractContractAssetComponentElements(Contract.ContractAssetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasClass_()) { - composeCoding("class", element.getClass_()); - } - if (element.hasCode()) { - composeCoding("code", element.getCode()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasDataPeriod()) { - composePeriod("dataPeriod", element.getDataPeriod()); - } - if (element.hasData()) { - for (Contract.AssetDataComponent e : element.getData()) - composeContractAssetDataComponent("data", e); - } - if (element.hasValuedItem()) { - for (Contract.ValuedItemComponent e : element.getValuedItem()) - composeContractValuedItemComponent("valuedItem", e); - } - if (element.hasSecurityLabel()) { - for (Coding e : element.getSecurityLabel()) - composeCoding("securityLabel", e); - } - } - - protected void composeContractAssetDataComponent(String name, Contract.AssetDataComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractAssetDataComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractAssetDataComponentElements(Contract.AssetDataComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMeaningElement()) - composeEnumeration("meaning", element.getMeaningElement(), new Contract.ContractDataMeaningEnumFactory()); - if (element.hasReference()) { - composeReference("reference", element.getReference()); - } - } - - protected void composeContractValuedItemComponent(String name, Contract.ValuedItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractValuedItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractValuedItemComponentElements(Contract.ValuedItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasEntity()) { - composeType("entity", element.getEntity()); - } if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasEffectiveTimeElement()) { - composeDateTime("effectiveTime", element.getEffectiveTimeElement()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasPointsElement()) { - composeDecimal("points", element.getPointsElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - } - - protected void composeContractAgentComponent(String name, Contract.AgentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractAgentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractAgentComponentElements(Contract.AgentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasRole()) { - for (CodeableConcept e : element.getRole()) - composeCodeableConcept("role", e); - } - } - - protected void composeContractSignatoryComponent(String name, Contract.SignatoryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractSignatoryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractSignatoryComponentElements(Contract.SignatoryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - if (element.hasSignature()) { - for (Signature e : element.getSignature()) - composeSignature("signature", e); - } - } - - protected void composeContractFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractFriendlyLanguageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractFriendlyLanguageComponentElements(Contract.FriendlyLanguageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } } - - protected void composeContractLegalLanguageComponent(String name, Contract.LegalLanguageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractLegalLanguageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractLegalLanguageComponentElements(Contract.LegalLanguageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } } - - protected void composeContractComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeContractComputableLanguageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeContractComputableLanguageComponentElements(Contract.ComputableLanguageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContent()) { - composeType("content", element.getContent()); - } } - - protected void composeCoverage(String name, Coverage element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeCoverageElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCoverageElements(Coverage element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasPolicyHolder()) { - composeReference("policyHolder", element.getPolicyHolder()); - } - if (element.hasSubscriber()) { - composeReference("subscriber", element.getSubscriber()); - } - if (element.hasSubscriberIdElement()) { - composeString("subscriberId", element.getSubscriberIdElement()); - } - if (element.hasBeneficiary()) { - composeReference("beneficiary", element.getBeneficiary()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasPayor()) { - for (Reference e : element.getPayor()) - composeReference("payor", e); - } - if (element.hasGrouping()) { - composeCoverageGroupComponent("grouping", element.getGrouping()); - } - if (element.hasDependentElement()) { - composeString("dependent", element.getDependentElement()); - } - if (element.hasSequenceElement()) { - composeString("sequence", element.getSequenceElement()); - } - if (element.hasOrderElement()) { - composePositiveInt("order", element.getOrderElement()); - } - if (element.hasNetworkElement()) { - composeString("network", element.getNetworkElement()); - } - if (element.hasContract()) { - for (Reference e : element.getContract()) - composeReference("contract", e); - } - } - - protected void composeCoverageGroupComponent(String name, Coverage.GroupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeCoverageGroupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeCoverageGroupComponentElements(Coverage.GroupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasGroupElement()) { - composeString("group", element.getGroupElement()); - } - if (element.hasGroupDisplayElement()) { - composeString("groupDisplay", element.getGroupDisplayElement()); - } - if (element.hasSubGroupElement()) { - composeString("subGroup", element.getSubGroupElement()); - } - if (element.hasSubGroupDisplayElement()) { - composeString("subGroupDisplay", element.getSubGroupDisplayElement()); - } - if (element.hasPlanElement()) { - composeString("plan", element.getPlanElement()); - } - if (element.hasPlanDisplayElement()) { - composeString("planDisplay", element.getPlanDisplayElement()); - } - if (element.hasSubPlanElement()) { - composeString("subPlan", element.getSubPlanElement()); - } - if (element.hasSubPlanDisplayElement()) { - composeString("subPlanDisplay", element.getSubPlanDisplayElement()); - } - if (element.hasClass_Element()) { - composeString("class", element.getClass_Element()); - } - if (element.hasClassDisplayElement()) { - composeString("classDisplay", element.getClassDisplayElement()); - } - if (element.hasSubClassElement()) { - composeString("subClass", element.getSubClassElement()); - } - if (element.hasSubClassDisplayElement()) { - composeString("subClassDisplay", element.getSubClassDisplayElement()); - } - } - - protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDetectedIssueElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDetectedIssueElements(DetectedIssue element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasSeverityElement()) - composeEnumeration("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory()); - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasImplicated()) { - for (Reference e : element.getImplicated()) - composeReference("implicated", e); - } - if (element.hasDetailElement()) { - composeString("detail", element.getDetailElement()); - } - if (element.hasReferenceElement()) { - composeUri("reference", element.getReferenceElement()); - } - if (element.hasMitigation()) { - for (DetectedIssue.DetectedIssueMitigationComponent e : element.getMitigation()) - composeDetectedIssueDetectedIssueMitigationComponent("mitigation", e); - } - } - - protected void composeDetectedIssueDetectedIssueMitigationComponent(String name, DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDetectedIssueDetectedIssueMitigationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDetectedIssueDetectedIssueMitigationComponentElements(DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAction()) { - composeCodeableConcept("action", element.getAction()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - } - - protected void composeDevice(String name, Device element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceElements(Device element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasUdi()) { - composeDeviceDeviceUdiComponent("udi", element.getUdi()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLotNumberElement()) { - composeString("lotNumber", element.getLotNumberElement()); - } - if (element.hasManufacturerElement()) { - composeString("manufacturer", element.getManufacturerElement()); - } - if (element.hasManufactureDateElement()) { - composeDateTime("manufactureDate", element.getManufactureDateElement()); - } - if (element.hasExpirationDateElement()) { - composeDateTime("expirationDate", element.getExpirationDateElement()); - } - if (element.hasModelElement()) { - composeString("model", element.getModelElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasOwner()) { - composeReference("owner", element.getOwner()); - } - if (element.hasContact()) { - for (ContactPoint e : element.getContact()) - composeContactPoint("contact", e); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasSafety()) { - for (CodeableConcept e : element.getSafety()) - composeCodeableConcept("safety", e); - } - } - - protected void composeDeviceDeviceUdiComponent(String name, Device.DeviceUdiComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceDeviceUdiComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceDeviceUdiComponentElements(Device.DeviceUdiComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDeviceIdentifierElement()) { - composeString("deviceIdentifier", element.getDeviceIdentifierElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasJurisdictionElement()) { - composeUri("jurisdiction", element.getJurisdictionElement()); - } - if (element.hasCarrierHRFElement()) { - composeString("carrierHRF", element.getCarrierHRFElement()); - } - if (element.hasCarrierAIDCElement()) { - composeBase64Binary("carrierAIDC", element.getCarrierAIDCElement()); - } - if (element.hasIssuerElement()) { - composeUri("issuer", element.getIssuerElement()); - } - if (element.hasEntryTypeElement()) - composeEnumeration("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory()); - } - - protected void composeDeviceComponent(String name, DeviceComponent element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceComponentElements(DeviceComponent element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLastSystemChangeElement()) { - composeInstant("lastSystemChange", element.getLastSystemChangeElement()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasParent()) { - composeReference("parent", element.getParent()); - } - if (element.hasOperationalStatus()) { - for (CodeableConcept e : element.getOperationalStatus()) - composeCodeableConcept("operationalStatus", e); - } - if (element.hasParameterGroup()) { - composeCodeableConcept("parameterGroup", element.getParameterGroup()); - } - if (element.hasMeasurementPrincipleElement()) - composeEnumeration("measurementPrinciple", element.getMeasurementPrincipleElement(), new DeviceComponent.MeasmntPrincipleEnumFactory()); - if (element.hasProductionSpecification()) { - for (DeviceComponent.DeviceComponentProductionSpecificationComponent e : element.getProductionSpecification()) - composeDeviceComponentDeviceComponentProductionSpecificationComponent("productionSpecification", e); - } - if (element.hasLanguageCode()) { - composeCodeableConcept("languageCode", element.getLanguageCode()); - } - } - - protected void composeDeviceComponentDeviceComponentProductionSpecificationComponent(String name, DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceComponentDeviceComponentProductionSpecificationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceComponentDeviceComponentProductionSpecificationComponentElements(DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSpecType()) { - composeCodeableConcept("specType", element.getSpecType()); - } - if (element.hasComponentId()) { - composeIdentifier("componentId", element.getComponentId()); - } - if (element.hasProductionSpecElement()) { - composeString("productionSpec", element.getProductionSpecElement()); - } - } - - protected void composeDeviceMetric(String name, DeviceMetric element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceMetricElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceMetricElements(DeviceMetric element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasUnit()) { - composeCodeableConcept("unit", element.getUnit()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasParent()) { - composeReference("parent", element.getParent()); - } - if (element.hasOperationalStatusElement()) - composeEnumeration("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory()); - if (element.hasColorElement()) - composeEnumeration("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory()); - if (element.hasCategoryElement()) - composeEnumeration("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory()); - if (element.hasMeasurementPeriod()) { - composeTiming("measurementPeriod", element.getMeasurementPeriod()); - } - if (element.hasCalibration()) { - for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration()) - composeDeviceMetricDeviceMetricCalibrationComponent("calibration", e); - } - } - - protected void composeDeviceMetricDeviceMetricCalibrationComponent(String name, DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceMetricDeviceMetricCalibrationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceMetricDeviceMetricCalibrationComponentElements(DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory()); - if (element.hasStateElement()) - composeEnumeration("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory()); - if (element.hasTimeElement()) { - composeInstant("time", element.getTimeElement()); - } - } - - protected void composeDeviceRequest(String name, DeviceRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceRequestElements(DeviceRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasPriorRequest()) { - for (Reference e : element.getPriorRequest()) - composeReference("priorRequest", e); - } - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory()); - if (element.hasIntent()) { - composeCodeableConcept("intent", element.getIntent()); - } - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory()); - if (element.hasCode()) { - composeType("code", element.getCode()); - } if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasRequester()) { - composeDeviceRequestDeviceRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasPerformerType()) { - composeCodeableConcept("performerType", element.getPerformerType()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasSupportingInfo()) { - for (Reference e : element.getSupportingInfo()) - composeReference("supportingInfo", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasRelevantHistory()) { - for (Reference e : element.getRelevantHistory()) - composeReference("relevantHistory", e); - } - } - - protected void composeDeviceRequestDeviceRequestRequesterComponent(String name, DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceRequestDeviceRequestRequesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceRequestDeviceRequestRequesterComponentElements(DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeDeviceUseStatement(String name, DeviceUseStatement element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDeviceUseStatementElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDeviceUseStatementElements(DeviceUseStatement element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new DeviceUseStatement.DeviceUseStatementStatusEnumFactory()); - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasWhenUsed()) { - composePeriod("whenUsed", element.getWhenUsed()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } if (element.hasRecordedOnElement()) { - composeDateTime("recordedOn", element.getRecordedOnElement()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasIndication()) { - for (CodeableConcept e : element.getIndication()) - composeCodeableConcept("indication", e); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDiagnosticReportElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDiagnosticReportElements(DiagnosticReport element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } if (element.hasIssuedElement()) { - composeInstant("issued", element.getIssuedElement()); - } - if (element.hasPerformer()) { - for (Reference e : element.getPerformer()) - composeReference("performer", e); - } - if (element.hasResultsInterpreter()) { - for (Reference e : element.getResultsInterpreter()) - composeReference("resultsInterpreter", e); - } - if (element.hasSpecimen()) { - for (Reference e : element.getSpecimen()) - composeReference("specimen", e); - } - if (element.hasResult()) { - for (Reference e : element.getResult()) - composeReference("result", e); - } - if (element.hasImagingStudy()) { - for (Reference e : element.getImagingStudy()) - composeReference("imagingStudy", e); - } - if (element.hasImage()) { - for (DiagnosticReport.DiagnosticReportImageComponent e : element.getImage()) - composeDiagnosticReportDiagnosticReportImageComponent("image", e); - } - if (element.hasConclusionElement()) { - composeString("conclusion", element.getConclusionElement()); - } - if (element.hasCodedDiagnosis()) { - for (CodeableConcept e : element.getCodedDiagnosis()) - composeCodeableConcept("codedDiagnosis", e); - } - if (element.hasPresentedForm()) { - for (Attachment e : element.getPresentedForm()) - composeAttachment("presentedForm", e); - } - } - - protected void composeDiagnosticReportDiagnosticReportImageComponent(String name, DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDiagnosticReportDiagnosticReportImageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDiagnosticReportDiagnosticReportImageComponentElements(DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasLink()) { - composeReference("link", element.getLink()); - } - } - - protected void composeDocumentManifest(String name, DocumentManifest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentManifestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentManifestElements(DocumentManifest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasMasterIdentifier()) { - composeIdentifier("masterIdentifier", element.getMasterIdentifier()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasAuthor()) { - for (Reference e : element.getAuthor()) - composeReference("author", e); - } - if (element.hasRecipient()) { - for (Reference e : element.getRecipient()) - composeReference("recipient", e); - } - if (element.hasSourceElement()) { - composeUri("source", element.getSourceElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasContent()) { - for (DocumentManifest.DocumentManifestContentComponent e : element.getContent()) - composeDocumentManifestDocumentManifestContentComponent("content", e); - } - if (element.hasRelated()) { - for (DocumentManifest.DocumentManifestRelatedComponent e : element.getRelated()) - composeDocumentManifestDocumentManifestRelatedComponent("related", e); - } - } - - protected void composeDocumentManifestDocumentManifestContentComponent(String name, DocumentManifest.DocumentManifestContentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentManifestDocumentManifestContentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentManifestDocumentManifestContentComponentElements(DocumentManifest.DocumentManifestContentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasP()) { - composeType("p", element.getP()); - } } - - protected void composeDocumentManifestDocumentManifestRelatedComponent(String name, DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentManifestDocumentManifestRelatedComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentManifestDocumentManifestRelatedComponentElements(DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasRef()) { - composeReference("ref", element.getRef()); - } - } - - protected void composeDocumentReference(String name, DocumentReference element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentReferenceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentReferenceElements(DocumentReference element) throws IOException { - composeDomainResourceElements(element); - if (element.hasMasterIdentifier()) { - composeIdentifier("masterIdentifier", element.getMasterIdentifier()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory()); - if (element.hasDocStatusElement()) - composeEnumeration("docStatus", element.getDocStatusElement(), new DocumentReference.ReferredDocumentStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasClass_()) { - composeCodeableConcept("class", element.getClass_()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasIndexedElement()) { - composeInstant("indexed", element.getIndexedElement()); - } - if (element.hasAuthor()) { - for (Reference e : element.getAuthor()) - composeReference("author", e); - } - if (element.hasAuthenticator()) { - composeReference("authenticator", element.getAuthenticator()); - } - if (element.hasCustodian()) { - composeReference("custodian", element.getCustodian()); - } - if (element.hasRelatesTo()) { - for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo()) - composeDocumentReferenceDocumentReferenceRelatesToComponent("relatesTo", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasSecurityLabel()) { - for (CodeableConcept e : element.getSecurityLabel()) - composeCodeableConcept("securityLabel", e); - } - if (element.hasContent()) { - for (DocumentReference.DocumentReferenceContentComponent e : element.getContent()) - composeDocumentReferenceDocumentReferenceContentComponent("content", e); - } - if (element.hasContext()) { - composeDocumentReferenceDocumentReferenceContextComponent("context", element.getContext()); - } - } - - protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(String name, DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentReferenceDocumentReferenceRelatesToComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentReferenceDocumentReferenceRelatesToComponentElements(DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory()); - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - } - - protected void composeDocumentReferenceDocumentReferenceContentComponent(String name, DocumentReference.DocumentReferenceContentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentReferenceDocumentReferenceContentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentReferenceDocumentReferenceContentComponentElements(DocumentReference.DocumentReferenceContentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAttachment()) { - composeAttachment("attachment", element.getAttachment()); - } - if (element.hasFormat()) { - composeCoding("format", element.getFormat()); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextComponent(String name, DocumentReference.DocumentReferenceContextComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentReferenceDocumentReferenceContextComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextComponentElements(DocumentReference.DocumentReferenceContextComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasEvent()) { - for (CodeableConcept e : element.getEvent()) - composeCodeableConcept("event", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasFacilityType()) { - composeCodeableConcept("facilityType", element.getFacilityType()); - } - if (element.hasPracticeSetting()) { - composeCodeableConcept("practiceSetting", element.getPracticeSetting()); - } - if (element.hasSourcePatientInfo()) { - composeReference("sourcePatientInfo", element.getSourcePatientInfo()); - } - if (element.hasRelated()) { - for (DocumentReference.DocumentReferenceContextRelatedComponent e : element.getRelated()) - composeDocumentReferenceDocumentReferenceContextRelatedComponent("related", e); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextRelatedComponent(String name, DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeDocumentReferenceDocumentReferenceContextRelatedComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeDocumentReferenceDocumentReferenceContextRelatedComponentElements(DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasRef()) { - composeReference("ref", element.getRef()); - } - } - - protected void composeEligibilityRequest(String name, EligibilityRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEligibilityRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEligibilityRequestElements(EligibilityRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new EligibilityRequest.EligibilityRequestStatusEnumFactory()); - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasServiced()) { - composeType("serviced", element.getServiced()); - } if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasFacility()) { - composeReference("facility", element.getFacility()); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasBusinessArrangementElement()) { - composeString("businessArrangement", element.getBusinessArrangementElement()); - } - if (element.hasBenefitCategory()) { - composeCodeableConcept("benefitCategory", element.getBenefitCategory()); - } - if (element.hasBenefitSubCategory()) { - composeCodeableConcept("benefitSubCategory", element.getBenefitSubCategory()); - } - } - - protected void composeEligibilityResponse(String name, EligibilityResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEligibilityResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEligibilityResponseElements(EligibilityResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new EligibilityResponse.EligibilityResponseStatusEnumFactory()); - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeString("disposition", element.getDispositionElement()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasInforceElement()) { - composeBoolean("inforce", element.getInforceElement()); - } - if (element.hasInsurance()) { - for (EligibilityResponse.InsuranceComponent e : element.getInsurance()) - composeEligibilityResponseInsuranceComponent("insurance", e); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasError()) { - for (EligibilityResponse.ErrorsComponent e : element.getError()) - composeEligibilityResponseErrorsComponent("error", e); - } - } - - protected void composeEligibilityResponseInsuranceComponent(String name, EligibilityResponse.InsuranceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEligibilityResponseInsuranceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEligibilityResponseInsuranceComponentElements(EligibilityResponse.InsuranceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasContract()) { - composeReference("contract", element.getContract()); - } - if (element.hasBenefitBalance()) { - for (EligibilityResponse.BenefitsComponent e : element.getBenefitBalance()) - composeEligibilityResponseBenefitsComponent("benefitBalance", e); - } - } - - protected void composeEligibilityResponseBenefitsComponent(String name, EligibilityResponse.BenefitsComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEligibilityResponseBenefitsComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEligibilityResponseBenefitsComponentElements(EligibilityResponse.BenefitsComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasSubCategory()) { - composeCodeableConcept("subCategory", element.getSubCategory()); - } - if (element.hasExcludedElement()) { - composeBoolean("excluded", element.getExcludedElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasNetwork()) { - composeCodeableConcept("network", element.getNetwork()); - } - if (element.hasUnit()) { - composeCodeableConcept("unit", element.getUnit()); - } - if (element.hasTerm()) { - composeCodeableConcept("term", element.getTerm()); - } - if (element.hasFinancial()) { - for (EligibilityResponse.BenefitComponent e : element.getFinancial()) - composeEligibilityResponseBenefitComponent("financial", e); - } - } - - protected void composeEligibilityResponseBenefitComponent(String name, EligibilityResponse.BenefitComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEligibilityResponseBenefitComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEligibilityResponseBenefitComponentElements(EligibilityResponse.BenefitComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAllowed()) { - composeType("allowed", element.getAllowed()); - } if (element.hasUsed()) { - composeType("used", element.getUsed()); - } } - - protected void composeEligibilityResponseErrorsComponent(String name, EligibilityResponse.ErrorsComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEligibilityResponseErrorsComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEligibilityResponseErrorsComponentElements(EligibilityResponse.ErrorsComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - } - - protected void composeEncounter(String name, Encounter element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterElements(Encounter element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory()); - if (element.hasStatusHistory()) { - for (Encounter.StatusHistoryComponent e : element.getStatusHistory()) - composeEncounterStatusHistoryComponent("statusHistory", e); - } - if (element.hasClass_()) { - composeCoding("class", element.getClass_()); - } - if (element.hasClassHistory()) { - for (Encounter.ClassHistoryComponent e : element.getClassHistory()) - composeEncounterClassHistoryComponent("classHistory", e); - } - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasEpisodeOfCare()) { - for (Reference e : element.getEpisodeOfCare()) - composeReference("episodeOfCare", e); - } - if (element.hasIncomingReferral()) { - for (Reference e : element.getIncomingReferral()) - composeReference("incomingReferral", e); - } - if (element.hasParticipant()) { - for (Encounter.EncounterParticipantComponent e : element.getParticipant()) - composeEncounterEncounterParticipantComponent("participant", e); - } - if (element.hasAppointment()) { - composeReference("appointment", element.getAppointment()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasLength()) { - composeDuration("length", element.getLength()); - } - if (element.hasReason()) { - for (CodeableConcept e : element.getReason()) - composeCodeableConcept("reason", e); - } - if (element.hasDiagnosis()) { - for (Encounter.DiagnosisComponent e : element.getDiagnosis()) - composeEncounterDiagnosisComponent("diagnosis", e); - } - if (element.hasAccount()) { - for (Reference e : element.getAccount()) - composeReference("account", e); - } - if (element.hasHospitalization()) { - composeEncounterEncounterHospitalizationComponent("hospitalization", element.getHospitalization()); - } - if (element.hasLocation()) { - for (Encounter.EncounterLocationComponent e : element.getLocation()) - composeEncounterEncounterLocationComponent("location", e); - } - if (element.hasServiceProvider()) { - composeReference("serviceProvider", element.getServiceProvider()); - } - if (element.hasPartOf()) { - composeReference("partOf", element.getPartOf()); - } - } - - protected void composeEncounterStatusHistoryComponent(String name, Encounter.StatusHistoryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterStatusHistoryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterStatusHistoryComponentElements(Encounter.StatusHistoryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory()); - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEncounterClassHistoryComponent(String name, Encounter.ClassHistoryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterClassHistoryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterClassHistoryComponentElements(Encounter.ClassHistoryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasClass_()) { - composeCoding("class", element.getClass_()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEncounterEncounterParticipantComponent(String name, Encounter.EncounterParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterEncounterParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterEncounterParticipantComponentElements(Encounter.EncounterParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasIndividual()) { - composeReference("individual", element.getIndividual()); - } - } - - protected void composeEncounterDiagnosisComponent(String name, Encounter.DiagnosisComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterDiagnosisComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterDiagnosisComponentElements(Encounter.DiagnosisComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCondition()) { - composeReference("condition", element.getCondition()); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasRankElement()) { - composePositiveInt("rank", element.getRankElement()); - } - } - - protected void composeEncounterEncounterHospitalizationComponent(String name, Encounter.EncounterHospitalizationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterEncounterHospitalizationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterEncounterHospitalizationComponentElements(Encounter.EncounterHospitalizationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasPreAdmissionIdentifier()) { - composeIdentifier("preAdmissionIdentifier", element.getPreAdmissionIdentifier()); - } - if (element.hasOrigin()) { - composeReference("origin", element.getOrigin()); - } - if (element.hasAdmitSource()) { - composeCodeableConcept("admitSource", element.getAdmitSource()); - } - if (element.hasReAdmission()) { - composeCodeableConcept("reAdmission", element.getReAdmission()); - } - if (element.hasDietPreference()) { - for (CodeableConcept e : element.getDietPreference()) - composeCodeableConcept("dietPreference", e); - } - if (element.hasSpecialCourtesy()) { - for (CodeableConcept e : element.getSpecialCourtesy()) - composeCodeableConcept("specialCourtesy", e); - } - if (element.hasSpecialArrangement()) { - for (CodeableConcept e : element.getSpecialArrangement()) - composeCodeableConcept("specialArrangement", e); - } - if (element.hasDestination()) { - composeReference("destination", element.getDestination()); - } - if (element.hasDischargeDisposition()) { - composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition()); - } - } - - protected void composeEncounterEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEncounterEncounterLocationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEncounterEncounterLocationComponentElements(Encounter.EncounterLocationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory()); - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEndpoint(String name, Endpoint element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEndpointElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEndpointElements(Endpoint element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory()); - if (element.hasConnectionType()) { - composeCoding("connectionType", element.getConnectionType()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasContact()) { - for (ContactPoint e : element.getContact()) - composeContactPoint("contact", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasPayloadType()) { - for (CodeableConcept e : element.getPayloadType()) - composeCodeableConcept("payloadType", e); - } - if (element.hasPayloadMimeType()) { - for (CodeType e : element.getPayloadMimeType()) - composeCode("payloadMimeType", e); - } - if (element.hasAddressElement()) { - composeUri("address", element.getAddressElement()); - } - if (element.hasHeader()) { - for (StringType e : element.getHeader()) - composeString("header", e); - } - } - - protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEnrollmentRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEnrollmentRequestElements(EnrollmentRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new EnrollmentRequest.EnrollmentRequestStatusEnumFactory()); - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasCandidate()) { - composeReference("candidate", element.getCandidate()); - } - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - } - - protected void composeEnrollmentResponse(String name, EnrollmentResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEnrollmentResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEnrollmentResponseElements(EnrollmentResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new EnrollmentResponse.EnrollmentResponseStatusEnumFactory()); - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeString("disposition", element.getDispositionElement()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - } - - protected void composeEpisodeOfCare(String name, EpisodeOfCare element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEpisodeOfCareElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEpisodeOfCareElements(EpisodeOfCare element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()); - if (element.hasStatusHistory()) { - for (EpisodeOfCare.EpisodeOfCareStatusHistoryComponent e : element.getStatusHistory()) - composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent("statusHistory", e); - } - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasDiagnosis()) { - for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis()) - composeEpisodeOfCareDiagnosisComponent("diagnosis", e); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasReferralRequest()) { - for (Reference e : element.getReferralRequest()) - composeReference("referralRequest", e); - } - if (element.hasCareManager()) { - composeReference("careManager", element.getCareManager()); - } - if (element.hasTeam()) { - for (Reference e : element.getTeam()) - composeReference("team", e); - } - if (element.hasAccount()) { - for (Reference e : element.getAccount()) - composeReference("account", e); - } - } - - protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentElements(EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()); - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeEpisodeOfCareDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeEpisodeOfCareDiagnosisComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEpisodeOfCareDiagnosisComponentElements(EpisodeOfCare.DiagnosisComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCondition()) { - composeReference("condition", element.getCondition()); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasRankElement()) { - composePositiveInt("rank", element.getRankElement()); - } - } - - protected void composeEventDefinition(String name, EventDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeEventDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeEventDefinitionElements(EventDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasTopic()) { - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept("topic", e); - } - if (element.hasContributor()) { - for (Contributor e : element.getContributor()) - composeContributor("contributor", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - } - - protected void composeExpansionProfile(String name, ExpansionProfile element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileElements(ExpansionProfile element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasFixedVersion()) { - for (ExpansionProfile.ExpansionProfileFixedVersionComponent e : element.getFixedVersion()) - composeExpansionProfileExpansionProfileFixedVersionComponent("fixedVersion", e); - } - if (element.hasExcludedSystem()) { - composeExpansionProfileExpansionProfileExcludedSystemComponent("excludedSystem", element.getExcludedSystem()); - } - if (element.hasIncludeDesignationsElement()) { - composeBoolean("includeDesignations", element.getIncludeDesignationsElement()); - } - if (element.hasDesignation()) { - composeExpansionProfileExpansionProfileDesignationComponent("designation", element.getDesignation()); - } - if (element.hasIncludeDefinitionElement()) { - composeBoolean("includeDefinition", element.getIncludeDefinitionElement()); - } - if (element.hasActiveOnlyElement()) { - composeBoolean("activeOnly", element.getActiveOnlyElement()); - } - if (element.hasExcludeNestedElement()) { - composeBoolean("excludeNested", element.getExcludeNestedElement()); - } - if (element.hasExcludeNotForUIElement()) { - composeBoolean("excludeNotForUI", element.getExcludeNotForUIElement()); - } - if (element.hasExcludePostCoordinatedElement()) { - composeBoolean("excludePostCoordinated", element.getExcludePostCoordinatedElement()); - } - if (element.hasDisplayLanguageElement()) { - composeCode("displayLanguage", element.getDisplayLanguageElement()); - } - if (element.hasLimitedExpansionElement()) { - composeBoolean("limitedExpansion", element.getLimitedExpansionElement()); - } - } - - protected void composeExpansionProfileExpansionProfileFixedVersionComponent(String name, ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileExpansionProfileFixedVersionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileExpansionProfileFixedVersionComponentElements(ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new ExpansionProfile.SystemVersionProcessingModeEnumFactory()); - } - - protected void composeExpansionProfileExpansionProfileExcludedSystemComponent(String name, ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileExpansionProfileExcludedSystemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileExpansionProfileExcludedSystemComponentElements(ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - } - - protected void composeExpansionProfileExpansionProfileDesignationComponent(String name, ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileExpansionProfileDesignationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileExpansionProfileDesignationComponentElements(ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasInclude()) { - composeExpansionProfileDesignationIncludeComponent("include", element.getInclude()); - } - if (element.hasExclude()) { - composeExpansionProfileDesignationExcludeComponent("exclude", element.getExclude()); - } - } - - protected void composeExpansionProfileDesignationIncludeComponent(String name, ExpansionProfile.DesignationIncludeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileDesignationIncludeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileDesignationIncludeComponentElements(ExpansionProfile.DesignationIncludeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDesignation()) { - for (ExpansionProfile.DesignationIncludeDesignationComponent e : element.getDesignation()) - composeExpansionProfileDesignationIncludeDesignationComponent("designation", e); - } - } - - protected void composeExpansionProfileDesignationIncludeDesignationComponent(String name, ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileDesignationIncludeDesignationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileDesignationIncludeDesignationComponentElements(ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - } - - protected void composeExpansionProfileDesignationExcludeComponent(String name, ExpansionProfile.DesignationExcludeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileDesignationExcludeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileDesignationExcludeComponentElements(ExpansionProfile.DesignationExcludeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDesignation()) { - for (ExpansionProfile.DesignationExcludeDesignationComponent e : element.getDesignation()) - composeExpansionProfileDesignationExcludeDesignationComponent("designation", e); - } - } - - protected void composeExpansionProfileDesignationExcludeDesignationComponent(String name, ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExpansionProfileDesignationExcludeDesignationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExpansionProfileDesignationExcludeDesignationComponentElements(ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - } - - protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitElements(ExplanationOfBenefit element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubType()) { - for (CodeableConcept e : element.getSubType()) - composeCodeableConcept("subType", e); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasBillablePeriod()) { - composePeriod("billablePeriod", element.getBillablePeriod()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasInsurer()) { - composeReference("insurer", element.getInsurer()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasReferral()) { - composeReference("referral", element.getReferral()); - } - if (element.hasFacility()) { - composeReference("facility", element.getFacility()); - } - if (element.hasClaim()) { - composeReference("claim", element.getClaim()); - } - if (element.hasClaimResponse()) { - composeReference("claimResponse", element.getClaimResponse()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeString("disposition", element.getDispositionElement()); - } - if (element.hasRelated()) { - for (ExplanationOfBenefit.RelatedClaimComponent e : element.getRelated()) - composeExplanationOfBenefitRelatedClaimComponent("related", e); - } - if (element.hasPrescription()) { - composeReference("prescription", element.getPrescription()); - } - if (element.hasOriginalPrescription()) { - composeReference("originalPrescription", element.getOriginalPrescription()); - } - if (element.hasPayee()) { - composeExplanationOfBenefitPayeeComponent("payee", element.getPayee()); - } - if (element.hasInformation()) { - for (ExplanationOfBenefit.SupportingInformationComponent e : element.getInformation()) - composeExplanationOfBenefitSupportingInformationComponent("information", e); - } - if (element.hasCareTeam()) { - for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam()) - composeExplanationOfBenefitCareTeamComponent("careTeam", e); - } - if (element.hasDiagnosis()) { - for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis()) - composeExplanationOfBenefitDiagnosisComponent("diagnosis", e); - } - if (element.hasProcedure()) { - for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure()) - composeExplanationOfBenefitProcedureComponent("procedure", e); - } - if (element.hasPrecedenceElement()) { - composePositiveInt("precedence", element.getPrecedenceElement()); - } - if (element.hasInsurance()) { - composeExplanationOfBenefitInsuranceComponent("insurance", element.getInsurance()); - } - if (element.hasAccident()) { - composeExplanationOfBenefitAccidentComponent("accident", element.getAccident()); - } - if (element.hasEmploymentImpacted()) { - composePeriod("employmentImpacted", element.getEmploymentImpacted()); - } - if (element.hasHospitalization()) { - composePeriod("hospitalization", element.getHospitalization()); - } - if (element.hasItem()) { - for (ExplanationOfBenefit.ItemComponent e : element.getItem()) - composeExplanationOfBenefitItemComponent("item", e); - } - if (element.hasAddItem()) { - for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem()) - composeExplanationOfBenefitAddedItemComponent("addItem", e); - } - if (element.hasTotalCost()) { - composeMoney("totalCost", element.getTotalCost()); - } - if (element.hasUnallocDeductable()) { - composeMoney("unallocDeductable", element.getUnallocDeductable()); - } - if (element.hasTotalBenefit()) { - composeMoney("totalBenefit", element.getTotalBenefit()); - } - if (element.hasPayment()) { - composeExplanationOfBenefitPaymentComponent("payment", element.getPayment()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasProcessNote()) { - for (ExplanationOfBenefit.NoteComponent e : element.getProcessNote()) - composeExplanationOfBenefitNoteComponent("processNote", e); - } - if (element.hasBenefitBalance()) { - for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance()) - composeExplanationOfBenefitBenefitBalanceComponent("benefitBalance", e); - } - } - - protected void composeExplanationOfBenefitRelatedClaimComponent(String name, ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitRelatedClaimComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitRelatedClaimComponentElements(ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasClaim()) { - composeReference("claim", element.getClaim()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasReference()) { - composeIdentifier("reference", element.getReference()); - } - } - - protected void composeExplanationOfBenefitPayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitPayeeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitPayeeComponentElements(ExplanationOfBenefit.PayeeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasResource()) { - composeCoding("resource", element.getResource()); - } - if (element.hasParty()) { - composeReference("party", element.getParty()); - } - } - - protected void composeExplanationOfBenefitSupportingInformationComponent(String name, ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitSupportingInformationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitSupportingInformationComponentElements(ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasReason()) { - composeCoding("reason", element.getReason()); - } - } - - protected void composeExplanationOfBenefitCareTeamComponent(String name, ExplanationOfBenefit.CareTeamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitCareTeamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitCareTeamComponentElements(ExplanationOfBenefit.CareTeamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasResponsibleElement()) { - composeBoolean("responsible", element.getResponsibleElement()); - } - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasQualification()) { - composeCodeableConcept("qualification", element.getQualification()); - } - } - - protected void composeExplanationOfBenefitDiagnosisComponent(String name, ExplanationOfBenefit.DiagnosisComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitDiagnosisComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitDiagnosisComponentElements(ExplanationOfBenefit.DiagnosisComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasDiagnosis()) { - composeType("diagnosis", element.getDiagnosis()); - } if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasPackageCode()) { - composeCodeableConcept("packageCode", element.getPackageCode()); - } - } - - protected void composeExplanationOfBenefitProcedureComponent(String name, ExplanationOfBenefit.ProcedureComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitProcedureComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitProcedureComponentElements(ExplanationOfBenefit.ProcedureComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasProcedure()) { - composeType("procedure", element.getProcedure()); - } } - - protected void composeExplanationOfBenefitInsuranceComponent(String name, ExplanationOfBenefit.InsuranceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitInsuranceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitInsuranceComponentElements(ExplanationOfBenefit.InsuranceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCoverage()) { - composeReference("coverage", element.getCoverage()); - } - if (element.hasPreAuthRef()) { - for (StringType e : element.getPreAuthRef()) - composeString("preAuthRef", e); - } - } - - protected void composeExplanationOfBenefitAccidentComponent(String name, ExplanationOfBenefit.AccidentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitAccidentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitAccidentComponentElements(ExplanationOfBenefit.AccidentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDateElement()) { - composeDate("date", element.getDateElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasLocation()) { - composeType("location", element.getLocation()); - } } - - protected void composeExplanationOfBenefitItemComponent(String name, ExplanationOfBenefit.ItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitItemComponentElements(ExplanationOfBenefit.ItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasCareTeamLinkId()) { - for (PositiveIntType e : element.getCareTeamLinkId()) - composePositiveInt("careTeamLinkId", e); - } - if (element.hasDiagnosisLinkId()) { - for (PositiveIntType e : element.getDiagnosisLinkId()) - composePositiveInt("diagnosisLinkId", e); - } - if (element.hasProcedureLinkId()) { - for (PositiveIntType e : element.getProcedureLinkId()) - composePositiveInt("procedureLinkId", e); - } - if (element.hasInformationLinkId()) { - for (PositiveIntType e : element.getInformationLinkId()) - composePositiveInt("informationLinkId", e); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasProgramCode()) { - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept("programCode", e); - } - if (element.hasServiced()) { - composeType("serviced", element.getServiced()); - } if (element.hasLocation()) { - composeType("location", element.getLocation()); - } if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - for (Reference e : element.getUdi()) - composeReference("udi", e); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasSubSite()) { - for (CodeableConcept e : element.getSubSite()) - composeCodeableConcept("subSite", e); - } - if (element.hasEncounter()) { - for (Reference e : element.getEncounter()) - composeReference("encounter", e); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent("adjudication", e); - } - if (element.hasDetail()) { - for (ExplanationOfBenefit.DetailComponent e : element.getDetail()) - composeExplanationOfBenefitDetailComponent("detail", e); - } - } - - protected void composeExplanationOfBenefitAdjudicationComponent(String name, ExplanationOfBenefit.AdjudicationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitAdjudicationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitAdjudicationComponentElements(ExplanationOfBenefit.AdjudicationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasValueElement()) { - composeDecimal("value", element.getValueElement()); - } - } - - protected void composeExplanationOfBenefitDetailComponent(String name, ExplanationOfBenefit.DetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitDetailComponentElements(ExplanationOfBenefit.DetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasProgramCode()) { - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept("programCode", e); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - for (Reference e : element.getUdi()) - composeReference("udi", e); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent("adjudication", e); - } - if (element.hasSubDetail()) { - for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail()) - composeExplanationOfBenefitSubDetailComponent("subDetail", e); - } - } - - protected void composeExplanationOfBenefitSubDetailComponent(String name, ExplanationOfBenefit.SubDetailComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitSubDetailComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitSubDetailComponentElements(ExplanationOfBenefit.SubDetailComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceElement()) { - composePositiveInt("sequence", element.getSequenceElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasRevenue()) { - composeCodeableConcept("revenue", element.getRevenue()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasProgramCode()) { - for (CodeableConcept e : element.getProgramCode()) - composeCodeableConcept("programCode", e); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasUnitPrice()) { - composeMoney("unitPrice", element.getUnitPrice()); - } - if (element.hasFactorElement()) { - composeDecimal("factor", element.getFactorElement()); - } - if (element.hasNet()) { - composeMoney("net", element.getNet()); - } - if (element.hasUdi()) { - for (Reference e : element.getUdi()) - composeReference("udi", e); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent("adjudication", e); - } - } - - protected void composeExplanationOfBenefitAddedItemComponent(String name, ExplanationOfBenefit.AddedItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitAddedItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitAddedItemComponentElements(ExplanationOfBenefit.AddedItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkId()) { - for (PositiveIntType e : element.getSequenceLinkId()) - composePositiveInt("sequenceLinkId", e); - } - if (element.hasDetailSequenceLinkId()) { - for (PositiveIntType e : element.getDetailSequenceLinkId()) - composePositiveInt("detailSequenceLinkId", e); - } - if (element.hasSubdetailSequenceLinkId()) { - for (PositiveIntType e : element.getSubdetailSequenceLinkId()) - composePositiveInt("subdetailSequenceLinkId", e); - } - if (element.hasService()) { - composeCodeableConcept("service", element.getService()); - } - if (element.hasModifier()) { - for (CodeableConcept e : element.getModifier()) - composeCodeableConcept("modifier", e); - } - if (element.hasFee()) { - composeMoney("fee", element.getFee()); - } - if (element.hasNoteNumber()) { - for (PositiveIntType e : element.getNoteNumber()) - composePositiveInt("noteNumber", e); - } - if (element.hasAdjudication()) { - for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) - composeExplanationOfBenefitAdjudicationComponent("adjudication", e); - } - } - - protected void composeExplanationOfBenefitPaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitPaymentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitPaymentComponentElements(ExplanationOfBenefit.PaymentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAdjustment()) { - composeMoney("adjustment", element.getAdjustment()); - } - if (element.hasAdjustmentReason()) { - composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); - } - if (element.hasDateElement()) { - composeDate("date", element.getDateElement()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - } - - protected void composeExplanationOfBenefitNoteComponent(String name, ExplanationOfBenefit.NoteComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitNoteComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitNoteComponentElements(ExplanationOfBenefit.NoteComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNumberElement()) { - composePositiveInt("number", element.getNumberElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasLanguage()) { - composeCodeableConcept("language", element.getLanguage()); - } - } - - protected void composeExplanationOfBenefitBenefitBalanceComponent(String name, ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitBenefitBalanceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitBenefitBalanceComponentElements(ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasSubCategory()) { - composeCodeableConcept("subCategory", element.getSubCategory()); - } - if (element.hasExcludedElement()) { - composeBoolean("excluded", element.getExcludedElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasNetwork()) { - composeCodeableConcept("network", element.getNetwork()); - } - if (element.hasUnit()) { - composeCodeableConcept("unit", element.getUnit()); - } - if (element.hasTerm()) { - composeCodeableConcept("term", element.getTerm()); - } - if (element.hasFinancial()) { - for (ExplanationOfBenefit.BenefitComponent e : element.getFinancial()) - composeExplanationOfBenefitBenefitComponent("financial", e); - } - } - - protected void composeExplanationOfBenefitBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeExplanationOfBenefitBenefitComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeExplanationOfBenefitBenefitComponentElements(ExplanationOfBenefit.BenefitComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAllowed()) { - composeType("allowed", element.getAllowed()); - } if (element.hasUsed()) { - composeType("used", element.getUsed()); - } } - - protected void composeFamilyMemberHistory(String name, FamilyMemberHistory element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeFamilyMemberHistoryElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeFamilyMemberHistoryElements(FamilyMemberHistory element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory()); - if (element.hasDataAbsentReason()) { - composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasGenderElement()) - composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); - if (element.hasBorn()) { - composeType("born", element.getBorn()); - } if (element.hasAge()) { - composeType("age", element.getAge()); - } if (element.hasEstimatedAgeElement()) { - composeBoolean("estimatedAge", element.getEstimatedAgeElement()); - } - if (element.hasDeceased()) { - composeType("deceased", element.getDeceased()); - } if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasCondition()) { - for (FamilyMemberHistory.FamilyMemberHistoryConditionComponent e : element.getCondition()) - composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent("condition", e); - } - } - - protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentElements(FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasOnset()) { - composeType("onset", element.getOnset()); - } if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeFlag(String name, Flag element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeFlagElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeFlagElements(Flag element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - } - - protected void composeGoal(String name, Goal element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeGoalElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGoalElements(Goal element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Goal.GoalStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasDescription()) { - composeCodeableConcept("description", element.getDescription()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasStart()) { - composeType("start", element.getStart()); - } if (element.hasTarget()) { - composeGoalGoalTargetComponent("target", element.getTarget()); - } - if (element.hasStatusDateElement()) { - composeDate("statusDate", element.getStatusDateElement()); - } - if (element.hasStatusReasonElement()) { - composeString("statusReason", element.getStatusReasonElement()); - } - if (element.hasExpressedBy()) { - composeReference("expressedBy", element.getExpressedBy()); - } - if (element.hasAddresses()) { - for (Reference e : element.getAddresses()) - composeReference("addresses", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasOutcomeCode()) { - for (CodeableConcept e : element.getOutcomeCode()) - composeCodeableConcept("outcomeCode", e); - } - if (element.hasOutcomeReference()) { - for (Reference e : element.getOutcomeReference()) - composeReference("outcomeReference", e); - } - } - - protected void composeGoalGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeGoalGoalTargetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGoalGoalTargetComponentElements(Goal.GoalTargetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMeasure()) { - composeCodeableConcept("measure", element.getMeasure()); - } - if (element.hasDetail()) { - composeType("detail", element.getDetail()); - } if (element.hasDue()) { - composeType("due", element.getDue()); - } } - - protected void composeGraphDefinition(String name, GraphDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeGraphDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGraphDefinitionElements(GraphDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasStartElement()) { - composeCode("start", element.getStartElement()); - } - if (element.hasProfileElement()) { - composeUri("profile", element.getProfileElement()); - } - if (element.hasLink()) { - for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) - composeGraphDefinitionGraphDefinitionLinkComponent("link", e); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkComponent(String name, GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeGraphDefinitionGraphDefinitionLinkComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkComponentElements(GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasSliceNameElement()) { - composeString("sliceName", element.getSliceNameElement()); - } - if (element.hasMinElement()) { - composeInteger("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasTarget()) { - for (GraphDefinition.GraphDefinitionLinkTargetComponent e : element.getTarget()) - composeGraphDefinitionGraphDefinitionLinkTargetComponent("target", e); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(String name, GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeGraphDefinitionGraphDefinitionLinkTargetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetComponentElements(GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasProfileElement()) { - composeUri("profile", element.getProfileElement()); - } - if (element.hasCompartment()) { - for (GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent e : element.getCompartment()) - composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent("compartment", e); - } - if (element.hasLink()) { - for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) - composeGraphDefinitionGraphDefinitionLinkComponent("link", e); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(String name, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentElements(GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory()); - if (element.hasRuleElement()) - composeEnumeration("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory()); - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - } - - protected void composeGroup(String name, Group element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeGroupElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGroupElements(Group element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Group.GroupTypeEnumFactory()); - if (element.hasActualElement()) { - composeBoolean("actual", element.getActualElement()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasQuantityElement()) { - composeUnsignedInt("quantity", element.getQuantityElement()); - } - if (element.hasCharacteristic()) { - for (Group.GroupCharacteristicComponent e : element.getCharacteristic()) - composeGroupGroupCharacteristicComponent("characteristic", e); - } - if (element.hasMember()) { - for (Group.GroupMemberComponent e : element.getMember()) - composeGroupGroupMemberComponent("member", e); - } - } - - protected void composeGroupGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeGroupGroupCharacteristicComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGroupGroupCharacteristicComponentElements(Group.GroupCharacteristicComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasExcludeElement()) { - composeBoolean("exclude", element.getExcludeElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeGroupGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeGroupGroupMemberComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGroupGroupMemberComponentElements(Group.GroupMemberComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasEntity()) { - composeReference("entity", element.getEntity()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasInactiveElement()) { - composeBoolean("inactive", element.getInactiveElement()); - } - } - - protected void composeGuidanceResponse(String name, GuidanceResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeGuidanceResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeGuidanceResponseElements(GuidanceResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasRequestIdElement()) { - composeId("requestId", element.getRequestIdElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasModule()) { - composeReference("module", element.getModule()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory()); - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrenceDateTimeElement()) { - composeDateTime("occurrenceDateTime", element.getOccurrenceDateTimeElement()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasEvaluationMessage()) { - for (Reference e : element.getEvaluationMessage()) - composeReference("evaluationMessage", e); - } - if (element.hasOutputParameters()) { - composeReference("outputParameters", element.getOutputParameters()); - } - if (element.hasResult()) { - composeReference("result", element.getResult()); - } - if (element.hasDataRequirement()) { - for (DataRequirement e : element.getDataRequirement()) - composeDataRequirement("dataRequirement", e); - } - } - - protected void composeHealthcareService(String name, HealthcareService element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeHealthcareServiceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeHealthcareServiceElements(HealthcareService element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasProvidedBy()) { - composeReference("providedBy", element.getProvidedBy()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasSpecialty()) { - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept("specialty", e); - } - if (element.hasLocation()) { - for (Reference e : element.getLocation()) - composeReference("location", e); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasExtraDetailsElement()) { - composeString("extraDetails", element.getExtraDetailsElement()); - } - if (element.hasPhoto()) { - composeAttachment("photo", element.getPhoto()); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasCoverageArea()) { - for (Reference e : element.getCoverageArea()) - composeReference("coverageArea", e); - } - if (element.hasServiceProvisionCode()) { - for (CodeableConcept e : element.getServiceProvisionCode()) - composeCodeableConcept("serviceProvisionCode", e); - } - if (element.hasEligibility()) { - composeCodeableConcept("eligibility", element.getEligibility()); - } - if (element.hasEligibilityNoteElement()) { - composeString("eligibilityNote", element.getEligibilityNoteElement()); - } - if (element.hasProgramName()) { - for (StringType e : element.getProgramName()) - composeString("programName", e); - } - if (element.hasCharacteristic()) { - for (CodeableConcept e : element.getCharacteristic()) - composeCodeableConcept("characteristic", e); - } - if (element.hasReferralMethod()) { - for (CodeableConcept e : element.getReferralMethod()) - composeCodeableConcept("referralMethod", e); - } - if (element.hasAppointmentRequiredElement()) { - composeBoolean("appointmentRequired", element.getAppointmentRequiredElement()); - } - if (element.hasAvailableTime()) { - for (HealthcareService.HealthcareServiceAvailableTimeComponent e : element.getAvailableTime()) - composeHealthcareServiceHealthcareServiceAvailableTimeComponent("availableTime", e); - } - if (element.hasNotAvailable()) { - for (HealthcareService.HealthcareServiceNotAvailableComponent e : element.getNotAvailable()) - composeHealthcareServiceHealthcareServiceNotAvailableComponent("notAvailable", e); - } - if (element.hasAvailabilityExceptionsElement()) { - composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - } - - protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(String name, HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeHealthcareServiceHealthcareServiceAvailableTimeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponentElements(HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDaysOfWeek()) - for (Enumeration e : element.getDaysOfWeek()) - composeEnumeration("daysOfWeek", e, new HealthcareService.DaysOfWeekEnumFactory()); - if (element.hasAllDayElement()) { - composeBoolean("allDay", element.getAllDayElement()); - } - if (element.hasAvailableStartTimeElement()) { - composeTime("availableStartTime", element.getAvailableStartTimeElement()); - } - if (element.hasAvailableEndTimeElement()) { - composeTime("availableEndTime", element.getAvailableEndTimeElement()); - } - } - - protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(String name, HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeHealthcareServiceHealthcareServiceNotAvailableComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeHealthcareServiceHealthcareServiceNotAvailableComponentElements(HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasDuring()) { - composePeriod("during", element.getDuring()); - } - } - - protected void composeImagingManifest(String name, ImagingManifest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingManifestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingManifestElements(ImagingManifest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasAuthoringTimeElement()) { - composeDateTime("authoringTime", element.getAuthoringTimeElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasStudy()) { - for (ImagingManifest.StudyComponent e : element.getStudy()) - composeImagingManifestStudyComponent("study", e); - } - } - - protected void composeImagingManifestStudyComponent(String name, ImagingManifest.StudyComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingManifestStudyComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingManifestStudyComponentElements(ImagingManifest.StudyComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasUidElement()) { - composeOid("uid", element.getUidElement()); - } - if (element.hasImagingStudy()) { - composeReference("imagingStudy", element.getImagingStudy()); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - if (element.hasSeries()) { - for (ImagingManifest.SeriesComponent e : element.getSeries()) - composeImagingManifestSeriesComponent("series", e); - } - } - - protected void composeImagingManifestSeriesComponent(String name, ImagingManifest.SeriesComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingManifestSeriesComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingManifestSeriesComponentElements(ImagingManifest.SeriesComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasUidElement()) { - composeOid("uid", element.getUidElement()); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - if (element.hasInstance()) { - for (ImagingManifest.InstanceComponent e : element.getInstance()) - composeImagingManifestInstanceComponent("instance", e); - } - } - - protected void composeImagingManifestInstanceComponent(String name, ImagingManifest.InstanceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingManifestInstanceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingManifestInstanceComponentElements(ImagingManifest.InstanceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSopClassElement()) { - composeOid("sopClass", element.getSopClassElement()); - } - if (element.hasUidElement()) { - composeOid("uid", element.getUidElement()); - } - if (element.hasFrameNumber()) { - for (UnsignedIntType e : element.getFrameNumber()) - composeUnsignedInt("frameNumber", e); - } - } - - protected void composeImagingStudy(String name, ImagingStudy element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingStudyElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingStudyElements(ImagingStudy element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUidElement()) { - composeOid("uid", element.getUidElement()); - } - if (element.hasAccession()) { - composeIdentifier("accession", element.getAccession()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasAvailabilityElement()) - composeEnumeration("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory()); - if (element.hasModalityList()) { - for (Coding e : element.getModalityList()) - composeCoding("modalityList", e); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasStartedElement()) { - composeDateTime("started", element.getStartedElement()); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasReferrer()) { - composeReference("referrer", element.getReferrer()); - } - if (element.hasInterpreter()) { - for (Reference e : element.getInterpreter()) - composeReference("interpreter", e); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - if (element.hasNumberOfSeriesElement()) { - composeUnsignedInt("numberOfSeries", element.getNumberOfSeriesElement()); - } - if (element.hasNumberOfInstancesElement()) { - composeUnsignedInt("numberOfInstances", element.getNumberOfInstancesElement()); - } - if (element.hasProcedureReference()) { - for (Reference e : element.getProcedureReference()) - composeReference("procedureReference", e); - } - if (element.hasProcedureCode()) { - for (CodeableConcept e : element.getProcedureCode()) - composeCodeableConcept("procedureCode", e); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasSeries()) { - for (ImagingStudy.ImagingStudySeriesComponent e : element.getSeries()) - composeImagingStudyImagingStudySeriesComponent("series", e); - } - } - - protected void composeImagingStudyImagingStudySeriesComponent(String name, ImagingStudy.ImagingStudySeriesComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingStudyImagingStudySeriesComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingStudyImagingStudySeriesComponentElements(ImagingStudy.ImagingStudySeriesComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasUidElement()) { - composeOid("uid", element.getUidElement()); - } - if (element.hasNumberElement()) { - composeUnsignedInt("number", element.getNumberElement()); - } - if (element.hasModality()) { - composeCoding("modality", element.getModality()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasNumberOfInstancesElement()) { - composeUnsignedInt("numberOfInstances", element.getNumberOfInstancesElement()); - } - if (element.hasAvailabilityElement()) - composeEnumeration("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory()); - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - if (element.hasBodySite()) { - composeCoding("bodySite", element.getBodySite()); - } - if (element.hasLaterality()) { - composeCoding("laterality", element.getLaterality()); - } - if (element.hasStartedElement()) { - composeDateTime("started", element.getStartedElement()); - } - if (element.hasPerformer()) { - for (Reference e : element.getPerformer()) - composeReference("performer", e); - } - if (element.hasInstance()) { - for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance()) - composeImagingStudyImagingStudySeriesInstanceComponent("instance", e); - } - } - - protected void composeImagingStudyImagingStudySeriesInstanceComponent(String name, ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImagingStudyImagingStudySeriesInstanceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImagingStudyImagingStudySeriesInstanceComponentElements(ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasUidElement()) { - composeOid("uid", element.getUidElement()); - } - if (element.hasNumberElement()) { - composeUnsignedInt("number", element.getNumberElement()); - } - if (element.hasSopClassElement()) { - composeOid("sopClass", element.getSopClassElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - } - - protected void composeImmunization(String name, Immunization element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationElements(Immunization element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory()); - if (element.hasNotGivenElement()) { - composeBoolean("notGiven", element.getNotGivenElement()); - } - if (element.hasVaccineCode()) { - composeCodeableConcept("vaccineCode", element.getVaccineCode()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPrimarySourceElement()) { - composeBoolean("primarySource", element.getPrimarySourceElement()); - } - if (element.hasReportOrigin()) { - composeCodeableConcept("reportOrigin", element.getReportOrigin()); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasManufacturer()) { - composeReference("manufacturer", element.getManufacturer()); - } - if (element.hasLotNumberElement()) { - composeString("lotNumber", element.getLotNumberElement()); - } - if (element.hasExpirationDateElement()) { - composeDate("expirationDate", element.getExpirationDateElement()); - } - if (element.hasSite()) { - composeCodeableConcept("site", element.getSite()); - } - if (element.hasRoute()) { - composeCodeableConcept("route", element.getRoute()); - } - if (element.hasDoseQuantity()) { - composeSimpleQuantity("doseQuantity", element.getDoseQuantity()); - } - if (element.hasPractitioner()) { - for (Immunization.ImmunizationPractitionerComponent e : element.getPractitioner()) - composeImmunizationImmunizationPractitionerComponent("practitioner", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasExplanation()) { - composeImmunizationImmunizationExplanationComponent("explanation", element.getExplanation()); - } - if (element.hasReaction()) { - for (Immunization.ImmunizationReactionComponent e : element.getReaction()) - composeImmunizationImmunizationReactionComponent("reaction", e); - } - if (element.hasVaccinationProtocol()) { - for (Immunization.ImmunizationVaccinationProtocolComponent e : element.getVaccinationProtocol()) - composeImmunizationImmunizationVaccinationProtocolComponent("vaccinationProtocol", e); - } - } - - protected void composeImmunizationImmunizationPractitionerComponent(String name, Immunization.ImmunizationPractitionerComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationImmunizationPractitionerComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationImmunizationPractitionerComponentElements(Immunization.ImmunizationPractitionerComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - } - - protected void composeImmunizationImmunizationExplanationComponent(String name, Immunization.ImmunizationExplanationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationImmunizationExplanationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationImmunizationExplanationComponentElements(Immunization.ImmunizationExplanationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasReason()) { - for (CodeableConcept e : element.getReason()) - composeCodeableConcept("reason", e); - } - if (element.hasReasonNotGiven()) { - for (CodeableConcept e : element.getReasonNotGiven()) - composeCodeableConcept("reasonNotGiven", e); - } - } - - protected void composeImmunizationImmunizationReactionComponent(String name, Immunization.ImmunizationReactionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationImmunizationReactionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationImmunizationReactionComponentElements(Immunization.ImmunizationReactionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasDetail()) { - composeReference("detail", element.getDetail()); - } - if (element.hasReportedElement()) { - composeBoolean("reported", element.getReportedElement()); - } - } - - protected void composeImmunizationImmunizationVaccinationProtocolComponent(String name, Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationImmunizationVaccinationProtocolComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationImmunizationVaccinationProtocolComponentElements(Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDoseSequenceElement()) { - composePositiveInt("doseSequence", element.getDoseSequenceElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasAuthority()) { - composeReference("authority", element.getAuthority()); - } - if (element.hasSeriesElement()) { - composeString("series", element.getSeriesElement()); - } - if (element.hasSeriesDosesElement()) { - composePositiveInt("seriesDoses", element.getSeriesDosesElement()); - } - if (element.hasTargetDisease()) { - for (CodeableConcept e : element.getTargetDisease()) - composeCodeableConcept("targetDisease", e); - } - if (element.hasDoseStatus()) { - composeCodeableConcept("doseStatus", element.getDoseStatus()); - } - if (element.hasDoseStatusReason()) { - composeCodeableConcept("doseStatusReason", element.getDoseStatusReason()); - } - } - - protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationRecommendationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationRecommendationElements(ImmunizationRecommendation element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasRecommendation()) { - for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent e : element.getRecommendation()) - composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent("recommendation", e); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentElements(ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasVaccineCode()) { - composeCodeableConcept("vaccineCode", element.getVaccineCode()); - } - if (element.hasTargetDisease()) { - composeCodeableConcept("targetDisease", element.getTargetDisease()); - } - if (element.hasDoseNumberElement()) { - composePositiveInt("doseNumber", element.getDoseNumberElement()); - } - if (element.hasForecastStatus()) { - composeCodeableConcept("forecastStatus", element.getForecastStatus()); - } - if (element.hasDateCriterion()) { - for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element.getDateCriterion()) - composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent("dateCriterion", e); - } - if (element.hasProtocol()) { - composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent("protocol", element.getProtocol()); - } - if (element.hasSupportingImmunization()) { - for (Reference e : element.getSupportingImmunization()) - composeReference("supportingImmunization", e); - } - if (element.hasSupportingPatientInformation()) { - for (Reference e : element.getSupportingPatientInformation()) - composeReference("supportingPatientInformation", e); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentElements(ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasValueElement()) { - composeDateTime("value", element.getValueElement()); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentElements(ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDoseSequenceElement()) { - composePositiveInt("doseSequence", element.getDoseSequenceElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasAuthority()) { - composeReference("authority", element.getAuthority()); - } - if (element.hasSeriesElement()) { - composeString("series", element.getSeriesElement()); - } - } - - protected void composeImplementationGuide(String name, ImplementationGuide element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeImplementationGuideElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImplementationGuideElements(ImplementationGuide element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasFhirVersionElement()) { - composeId("fhirVersion", element.getFhirVersionElement()); - } - if (element.hasDependency()) { - for (ImplementationGuide.ImplementationGuideDependencyComponent e : element.getDependency()) - composeImplementationGuideImplementationGuideDependencyComponent("dependency", e); - } - if (element.hasPackage()) { - for (ImplementationGuide.ImplementationGuidePackageComponent e : element.getPackage()) - composeImplementationGuideImplementationGuidePackageComponent("package", e); - } - if (element.hasGlobal()) { - for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal()) - composeImplementationGuideImplementationGuideGlobalComponent("global", e); - } - if (element.hasBinary()) { - for (UriType e : element.getBinary()) - composeUri("binary", e); - } - if (element.hasPage()) { - composeImplementationGuideImplementationGuidePageComponent("page", element.getPage()); - } - } - - protected void composeImplementationGuideImplementationGuideDependencyComponent(String name, ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImplementationGuideImplementationGuideDependencyComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImplementationGuideImplementationGuideDependencyComponentElements(ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new ImplementationGuide.GuideDependencyTypeEnumFactory()); - if (element.hasUriElement()) { - composeUri("uri", element.getUriElement()); - } - } - - protected void composeImplementationGuideImplementationGuidePackageComponent(String name, ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImplementationGuideImplementationGuidePackageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImplementationGuideImplementationGuidePackageComponentElements(ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasResource()) { - for (ImplementationGuide.ImplementationGuidePackageResourceComponent e : element.getResource()) - composeImplementationGuideImplementationGuidePackageResourceComponent("resource", e); - } - } - - protected void composeImplementationGuideImplementationGuidePackageResourceComponent(String name, ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImplementationGuideImplementationGuidePackageResourceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImplementationGuideImplementationGuidePackageResourceComponentElements(ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasExampleElement()) { - composeBoolean("example", element.getExampleElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasAcronymElement()) { - composeString("acronym", element.getAcronymElement()); - } - if (element.hasSource()) { - composeType("source", element.getSource()); - } if (element.hasExampleFor()) { - composeReference("exampleFor", element.getExampleFor()); - } - } - - protected void composeImplementationGuideImplementationGuideGlobalComponent(String name, ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImplementationGuideImplementationGuideGlobalComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImplementationGuideImplementationGuideGlobalComponentElements(ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - } - - protected void composeImplementationGuideImplementationGuidePageComponent(String name, ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeImplementationGuideImplementationGuidePageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeImplementationGuideImplementationGuidePageComponentElements(ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSourceElement()) { - composeUri("source", element.getSourceElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new ImplementationGuide.GuidePageKindEnumFactory()); - if (element.hasType()) { - for (CodeType e : element.getType()) - composeCode("type", e); - } - if (element.hasPackage()) { - for (StringType e : element.getPackage()) - composeString("package", e); - } - if (element.hasFormatElement()) { - composeCode("format", element.getFormatElement()); - } - if (element.hasPage()) { - for (ImplementationGuide.ImplementationGuidePageComponent e : element.getPage()) - composeImplementationGuideImplementationGuidePageComponent("page", e); - } - } - - protected void composeLibrary(String name, Library element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeLibraryElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeLibraryElements(Library element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasTopic()) { - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept("topic", e); - } - if (element.hasContributor()) { - for (Contributor e : element.getContributor()) - composeContributor("contributor", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - if (element.hasParameter()) { - for (ParameterDefinition e : element.getParameter()) - composeParameterDefinition("parameter", e); - } - if (element.hasDataRequirement()) { - for (DataRequirement e : element.getDataRequirement()) - composeDataRequirement("dataRequirement", e); - } - if (element.hasContent()) { - for (Attachment e : element.getContent()) - composeAttachment("content", e); - } - } - - protected void composeLinkage(String name, Linkage element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeLinkageElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeLinkageElements(Linkage element) throws IOException { - composeDomainResourceElements(element); - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasItem()) { - for (Linkage.LinkageItemComponent e : element.getItem()) - composeLinkageLinkageItemComponent("item", e); - } - } - - protected void composeLinkageLinkageItemComponent(String name, Linkage.LinkageItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeLinkageLinkageItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeLinkageLinkageItemComponentElements(Linkage.LinkageItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory()); - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - } - - protected void composeListResource(String name, ListResource element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeListResourceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeListResourceElements(ListResource element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory()); - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new ListResource.ListModeEnumFactory()); - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasOrderedBy()) { - composeCodeableConcept("orderedBy", element.getOrderedBy()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasEntry()) { - for (ListResource.ListEntryComponent e : element.getEntry()) - composeListResourceListEntryComponent("entry", e); - } - if (element.hasEmptyReason()) { - composeCodeableConcept("emptyReason", element.getEmptyReason()); - } - } - - protected void composeListResourceListEntryComponent(String name, ListResource.ListEntryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeListResourceListEntryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeListResourceListEntryComponentElements(ListResource.ListEntryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasFlag()) { - composeCodeableConcept("flag", element.getFlag()); - } - if (element.hasDeletedElement()) { - composeBoolean("deleted", element.getDeletedElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasItem()) { - composeReference("item", element.getItem()); - } - } - - protected void composeLocation(String name, Location element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeLocationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeLocationElements(Location element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Location.LocationStatusEnumFactory()); - if (element.hasOperationalStatus()) { - composeCoding("operationalStatus", element.getOperationalStatus()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasAlias()) { - for (StringType e : element.getAlias()) - composeString("alias", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new Location.LocationModeEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasAddress()) { - composeAddress("address", element.getAddress()); - } - if (element.hasPhysicalType()) { - composeCodeableConcept("physicalType", element.getPhysicalType()); - } - if (element.hasPosition()) { - composeLocationLocationPositionComponent("position", element.getPosition()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasPartOf()) { - composeReference("partOf", element.getPartOf()); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - } - - protected void composeLocationLocationPositionComponent(String name, Location.LocationPositionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeLocationLocationPositionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeLocationLocationPositionComponentElements(Location.LocationPositionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLongitudeElement()) { - composeDecimal("longitude", element.getLongitudeElement()); - } - if (element.hasLatitudeElement()) { - composeDecimal("latitude", element.getLatitudeElement()); - } - if (element.hasAltitudeElement()) { - composeDecimal("altitude", element.getAltitudeElement()); - } - } - - protected void composeMeasure(String name, Measure element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureElements(Measure element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasTopic()) { - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept("topic", e); - } - if (element.hasContributor()) { - for (Contributor e : element.getContributor()) - composeContributor("contributor", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - if (element.hasLibrary()) { - for (Reference e : element.getLibrary()) - composeReference("library", e); - } - if (element.hasDisclaimerElement()) { - composeMarkdown("disclaimer", element.getDisclaimerElement()); - } - if (element.hasScoring()) { - composeCodeableConcept("scoring", element.getScoring()); - } - if (element.hasCompositeScoring()) { - composeCodeableConcept("compositeScoring", element.getCompositeScoring()); - } - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasRiskAdjustmentElement()) { - composeString("riskAdjustment", element.getRiskAdjustmentElement()); - } - if (element.hasRateAggregationElement()) { - composeString("rateAggregation", element.getRateAggregationElement()); - } - if (element.hasRationaleElement()) { - composeMarkdown("rationale", element.getRationaleElement()); - } - if (element.hasClinicalRecommendationStatementElement()) { - composeMarkdown("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement()); - } - if (element.hasImprovementNotationElement()) { - composeString("improvementNotation", element.getImprovementNotationElement()); - } - if (element.hasDefinition()) { - for (MarkdownType e : element.getDefinition()) - composeMarkdown("definition", e); - } - if (element.hasGuidanceElement()) { - composeMarkdown("guidance", element.getGuidanceElement()); - } - if (element.hasSetElement()) { - composeString("set", element.getSetElement()); - } - if (element.hasGroup()) { - for (Measure.MeasureGroupComponent e : element.getGroup()) - composeMeasureMeasureGroupComponent("group", e); - } - if (element.hasSupplementalData()) { - for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData()) - composeMeasureMeasureSupplementalDataComponent("supplementalData", e); - } - } - - protected void composeMeasureMeasureGroupComponent(String name, Measure.MeasureGroupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureMeasureGroupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureMeasureGroupComponentElements(Measure.MeasureGroupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasPopulation()) { - for (Measure.MeasureGroupPopulationComponent e : element.getPopulation()) - composeMeasureMeasureGroupPopulationComponent("population", e); - } - if (element.hasStratifier()) { - for (Measure.MeasureGroupStratifierComponent e : element.getStratifier()) - composeMeasureMeasureGroupStratifierComponent("stratifier", e); - } - } - - protected void composeMeasureMeasureGroupPopulationComponent(String name, Measure.MeasureGroupPopulationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureMeasureGroupPopulationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureMeasureGroupPopulationComponentElements(Measure.MeasureGroupPopulationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasCriteriaElement()) { - composeString("criteria", element.getCriteriaElement()); - } - } - - protected void composeMeasureMeasureGroupStratifierComponent(String name, Measure.MeasureGroupStratifierComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureMeasureGroupStratifierComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureMeasureGroupStratifierComponentElements(Measure.MeasureGroupStratifierComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCriteriaElement()) { - composeString("criteria", element.getCriteriaElement()); - } - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - } - - protected void composeMeasureMeasureSupplementalDataComponent(String name, Measure.MeasureSupplementalDataComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureMeasureSupplementalDataComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureMeasureSupplementalDataComponentElements(Measure.MeasureSupplementalDataComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasUsage()) { - for (CodeableConcept e : element.getUsage()) - composeCodeableConcept("usage", e); - } - if (element.hasCriteriaElement()) { - composeString("criteria", element.getCriteriaElement()); - } - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - } - - protected void composeMeasureReport(String name, MeasureReport element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureReportElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureReportElements(MeasureReport element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory()); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory()); - if (element.hasMeasure()) { - composeReference("measure", element.getMeasure()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasReportingOrganization()) { - composeReference("reportingOrganization", element.getReportingOrganization()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasGroup()) { - for (MeasureReport.MeasureReportGroupComponent e : element.getGroup()) - composeMeasureReportMeasureReportGroupComponent("group", e); - } - if (element.hasEvaluatedResources()) { - composeReference("evaluatedResources", element.getEvaluatedResources()); - } - } - - protected void composeMeasureReportMeasureReportGroupComponent(String name, MeasureReport.MeasureReportGroupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureReportMeasureReportGroupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureReportMeasureReportGroupComponentElements(MeasureReport.MeasureReportGroupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasPopulation()) { - for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation()) - composeMeasureReportMeasureReportGroupPopulationComponent("population", e); - } - if (element.hasMeasureScoreElement()) { - composeDecimal("measureScore", element.getMeasureScoreElement()); - } - if (element.hasStratifier()) { - for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier()) - composeMeasureReportMeasureReportGroupStratifierComponent("stratifier", e); - } - } - - protected void composeMeasureReportMeasureReportGroupPopulationComponent(String name, MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureReportMeasureReportGroupPopulationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureReportMeasureReportGroupPopulationComponentElements(MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasCountElement()) { - composeInteger("count", element.getCountElement()); - } - if (element.hasPatients()) { - composeReference("patients", element.getPatients()); - } - } - - protected void composeMeasureReportMeasureReportGroupStratifierComponent(String name, MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureReportMeasureReportGroupStratifierComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureReportMeasureReportGroupStratifierComponentElements(MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStratum()) { - for (MeasureReport.StratifierGroupComponent e : element.getStratum()) - composeMeasureReportStratifierGroupComponent("stratum", e); - } - } - - protected void composeMeasureReportStratifierGroupComponent(String name, MeasureReport.StratifierGroupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureReportStratifierGroupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureReportStratifierGroupComponentElements(MeasureReport.StratifierGroupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - if (element.hasPopulation()) { - for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation()) - composeMeasureReportStratifierGroupPopulationComponent("population", e); - } - if (element.hasMeasureScoreElement()) { - composeDecimal("measureScore", element.getMeasureScoreElement()); - } - } - - protected void composeMeasureReportStratifierGroupPopulationComponent(String name, MeasureReport.StratifierGroupPopulationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMeasureReportStratifierGroupPopulationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMeasureReportStratifierGroupPopulationComponentElements(MeasureReport.StratifierGroupPopulationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasCountElement()) { - composeInteger("count", element.getCountElement()); - } - if (element.hasPatients()) { - composeReference("patients", element.getPatients()); - } - } - - protected void composeMedia(String name, Media element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMediaElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMediaElements(Media element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Media.DigitalMediaTypeEnumFactory()); - if (element.hasSubtype()) { - composeCodeableConcept("subtype", element.getSubtype()); - } - if (element.hasView()) { - composeCodeableConcept("view", element.getView()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasOperator()) { - composeReference("operator", element.getOperator()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasHeightElement()) { - composePositiveInt("height", element.getHeightElement()); - } - if (element.hasWidthElement()) { - composePositiveInt("width", element.getWidthElement()); - } - if (element.hasFramesElement()) { - composePositiveInt("frames", element.getFramesElement()); - } - if (element.hasDurationElement()) { - composeUnsignedInt("duration", element.getDurationElement()); - } - if (element.hasContent()) { - composeAttachment("content", element.getContent()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeMedication(String name, Medication element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationElements(Medication element) throws IOException { - composeDomainResourceElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory()); - if (element.hasIsBrandElement()) { - composeBoolean("isBrand", element.getIsBrandElement()); - } - if (element.hasIsOverTheCounterElement()) { - composeBoolean("isOverTheCounter", element.getIsOverTheCounterElement()); - } - if (element.hasManufacturer()) { - composeReference("manufacturer", element.getManufacturer()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasIngredient()) { - for (Medication.MedicationIngredientComponent e : element.getIngredient()) - composeMedicationMedicationIngredientComponent("ingredient", e); - } - if (element.hasPackage()) { - composeMedicationMedicationPackageComponent("package", element.getPackage()); - } - if (element.hasImage()) { - for (Attachment e : element.getImage()) - composeAttachment("image", e); - } - } - - protected void composeMedicationMedicationIngredientComponent(String name, Medication.MedicationIngredientComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationMedicationIngredientComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationMedicationIngredientComponentElements(Medication.MedicationIngredientComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasItem()) { - composeType("item", element.getItem()); - } if (element.hasIsActiveElement()) { - composeBoolean("isActive", element.getIsActiveElement()); - } - if (element.hasAmount()) { - composeRatio("amount", element.getAmount()); - } - } - - protected void composeMedicationMedicationPackageComponent(String name, Medication.MedicationPackageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationMedicationPackageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationMedicationPackageComponentElements(Medication.MedicationPackageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContainer()) { - composeCodeableConcept("container", element.getContainer()); - } - if (element.hasContent()) { - for (Medication.MedicationPackageContentComponent e : element.getContent()) - composeMedicationMedicationPackageContentComponent("content", e); - } - if (element.hasBatch()) { - for (Medication.MedicationPackageBatchComponent e : element.getBatch()) - composeMedicationMedicationPackageBatchComponent("batch", e); - } - } - - protected void composeMedicationMedicationPackageContentComponent(String name, Medication.MedicationPackageContentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationMedicationPackageContentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationMedicationPackageContentComponentElements(Medication.MedicationPackageContentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasItem()) { - composeType("item", element.getItem()); - } if (element.hasAmount()) { - composeSimpleQuantity("amount", element.getAmount()); - } - } - - protected void composeMedicationMedicationPackageBatchComponent(String name, Medication.MedicationPackageBatchComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationMedicationPackageBatchComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationMedicationPackageBatchComponentElements(Medication.MedicationPackageBatchComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLotNumberElement()) { - composeString("lotNumber", element.getLotNumberElement()); - } - if (element.hasExpirationDateElement()) { - composeDateTime("expirationDate", element.getExpirationDateElement()); - } - } - - protected void composeMedicationAdministration(String name, MedicationAdministration element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationAdministrationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationAdministrationElements(MedicationAdministration element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSupportingInformation()) { - for (Reference e : element.getSupportingInformation()) - composeReference("supportingInformation", e); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } if (element.hasPerformer()) { - for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer()) - composeMedicationAdministrationMedicationAdministrationPerformerComponent("performer", e); - } - if (element.hasNotGivenElement()) { - composeBoolean("notGiven", element.getNotGivenElement()); - } - if (element.hasReasonNotGiven()) { - for (CodeableConcept e : element.getReasonNotGiven()) - composeCodeableConcept("reasonNotGiven", e); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasDevice()) { - for (Reference e : element.getDevice()) - composeReference("device", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasDosage()) { - composeMedicationAdministrationMedicationAdministrationDosageComponent("dosage", element.getDosage()); - } - if (element.hasEventHistory()) { - for (Reference e : element.getEventHistory()) - composeReference("eventHistory", e); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(String name, MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationAdministrationMedicationAdministrationPerformerComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationPerformerComponentElements(MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(String name, MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationAdministrationMedicationAdministrationDosageComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationAdministrationMedicationAdministrationDosageComponentElements(MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasSite()) { - composeCodeableConcept("site", element.getSite()); - } - if (element.hasRoute()) { - composeCodeableConcept("route", element.getRoute()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasDose()) { - composeSimpleQuantity("dose", element.getDose()); - } - if (element.hasRate()) { - composeType("rate", element.getRate()); - } } - - protected void composeMedicationDispense(String name, MedicationDispense element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationDispenseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationDispenseElements(MedicationDispense element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSupportingInformation()) { - for (Reference e : element.getSupportingInformation()) - composeReference("supportingInformation", e); - } - if (element.hasPerformer()) { - for (MedicationDispense.MedicationDispensePerformerComponent e : element.getPerformer()) - composeMedicationDispenseMedicationDispensePerformerComponent("performer", e); - } - if (element.hasAuthorizingPrescription()) { - for (Reference e : element.getAuthorizingPrescription()) - composeReference("authorizingPrescription", e); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasDaysSupply()) { - composeSimpleQuantity("daysSupply", element.getDaysSupply()); - } - if (element.hasWhenPreparedElement()) { - composeDateTime("whenPrepared", element.getWhenPreparedElement()); - } - if (element.hasWhenHandedOverElement()) { - composeDateTime("whenHandedOver", element.getWhenHandedOverElement()); - } - if (element.hasDestination()) { - composeReference("destination", element.getDestination()); - } - if (element.hasReceiver()) { - for (Reference e : element.getReceiver()) - composeReference("receiver", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasDosageInstruction()) { - for (Dosage e : element.getDosageInstruction()) - composeDosage("dosageInstruction", e); - } - if (element.hasSubstitution()) { - composeMedicationDispenseMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution()); - } - if (element.hasDetectedIssue()) { - for (Reference e : element.getDetectedIssue()) - composeReference("detectedIssue", e); - } - if (element.hasNotDoneElement()) { - composeBoolean("notDone", element.getNotDoneElement()); - } - if (element.hasNotDoneReason()) { - composeType("notDoneReason", element.getNotDoneReason()); - } if (element.hasEventHistory()) { - for (Reference e : element.getEventHistory()) - composeReference("eventHistory", e); - } - } - - protected void composeMedicationDispenseMedicationDispensePerformerComponent(String name, MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationDispenseMedicationDispensePerformerComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationDispenseMedicationDispensePerformerComponentElements(MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(String name, MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationDispenseMedicationDispenseSubstitutionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationDispenseMedicationDispenseSubstitutionComponentElements(MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasWasSubstitutedElement()) { - composeBoolean("wasSubstituted", element.getWasSubstitutedElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasReason()) { - for (CodeableConcept e : element.getReason()) - composeCodeableConcept("reason", e); - } - if (element.hasResponsibleParty()) { - for (Reference e : element.getResponsibleParty()) - composeReference("responsibleParty", e); - } - } - - protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationRequestElements(MedicationRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new MedicationRequest.MedicationRequestStatusEnumFactory()); - if (element.hasIntentElement()) - composeEnumeration("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new MedicationRequest.MedicationRequestPriorityEnumFactory()); - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasSupportingInformation()) { - for (Reference e : element.getSupportingInformation()) - composeReference("supportingInformation", e); - } - if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasRequester()) { - composeMedicationRequestMedicationRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasRecorder()) { - composeReference("recorder", element.getRecorder()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasDosageInstruction()) { - for (Dosage e : element.getDosageInstruction()) - composeDosage("dosageInstruction", e); - } - if (element.hasDispenseRequest()) { - composeMedicationRequestMedicationRequestDispenseRequestComponent("dispenseRequest", element.getDispenseRequest()); - } - if (element.hasSubstitution()) { - composeMedicationRequestMedicationRequestSubstitutionComponent("substitution", element.getSubstitution()); - } - if (element.hasPriorPrescription()) { - composeReference("priorPrescription", element.getPriorPrescription()); - } - if (element.hasDetectedIssue()) { - for (Reference e : element.getDetectedIssue()) - composeReference("detectedIssue", e); - } - if (element.hasEventHistory()) { - for (Reference e : element.getEventHistory()) - composeReference("eventHistory", e); - } - } - - protected void composeMedicationRequestMedicationRequestRequesterComponent(String name, MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationRequestMedicationRequestRequesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationRequestMedicationRequestRequesterComponentElements(MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(String name, MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationRequestMedicationRequestDispenseRequestComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationRequestMedicationRequestDispenseRequestComponentElements(MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasValidityPeriod()) { - composePeriod("validityPeriod", element.getValidityPeriod()); - } - if (element.hasNumberOfRepeatsAllowedElement()) { - composeUnsignedInt("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasExpectedSupplyDuration()) { - composeDuration("expectedSupplyDuration", element.getExpectedSupplyDuration()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - } - - protected void composeMedicationRequestMedicationRequestSubstitutionComponent(String name, MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationRequestMedicationRequestSubstitutionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationRequestMedicationRequestSubstitutionComponentElements(MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAllowedElement()) { - composeBoolean("allowed", element.getAllowedElement()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - } - - protected void composeMedicationStatement(String name, MedicationStatement element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMedicationStatementElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMedicationStatementElements(MedicationStatement element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasMedication()) { - composeType("medication", element.getMedication()); - } if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } if (element.hasDateAssertedElement()) { - composeDateTime("dateAsserted", element.getDateAssertedElement()); - } - if (element.hasInformationSource()) { - composeReference("informationSource", element.getInformationSource()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasDerivedFrom()) { - for (Reference e : element.getDerivedFrom()) - composeReference("derivedFrom", e); - } - if (element.hasTakenElement()) - composeEnumeration("taken", element.getTakenElement(), new MedicationStatement.MedicationStatementTakenEnumFactory()); - if (element.hasReasonNotTaken()) { - for (CodeableConcept e : element.getReasonNotTaken()) - composeCodeableConcept("reasonNotTaken", e); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasDosage()) { - for (Dosage e : element.getDosage()) - composeDosage("dosage", e); - } - } - - protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageDefinitionElements(MessageDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasBase()) { - composeReference("base", element.getBase()); - } - if (element.hasParent()) { - for (Reference e : element.getParent()) - composeReference("parent", e); - } - if (element.hasReplaces()) { - for (Reference e : element.getReplaces()) - composeReference("replaces", e); - } - if (element.hasEvent()) { - composeCoding("event", element.getEvent()); - } - if (element.hasCategoryElement()) - composeEnumeration("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory()); - if (element.hasFocus()) { - for (MessageDefinition.MessageDefinitionFocusComponent e : element.getFocus()) - composeMessageDefinitionMessageDefinitionFocusComponent("focus", e); - } - if (element.hasResponseRequiredElement()) { - composeBoolean("responseRequired", element.getResponseRequiredElement()); - } - if (element.hasAllowedResponse()) { - for (MessageDefinition.MessageDefinitionAllowedResponseComponent e : element.getAllowedResponse()) - composeMessageDefinitionMessageDefinitionAllowedResponseComponent("allowedResponse", e); - } - } - - protected void composeMessageDefinitionMessageDefinitionFocusComponent(String name, MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageDefinitionMessageDefinitionFocusComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageDefinitionMessageDefinitionFocusComponentElements(MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - if (element.hasMinElement()) { - composeUnsignedInt("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - } - - protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageDefinitionMessageDefinitionAllowedResponseComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponentElements(MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMessage()) { - composeReference("message", element.getMessage()); - } - if (element.hasSituationElement()) { - composeMarkdown("situation", element.getSituationElement()); - } - } - - protected void composeMessageHeader(String name, MessageHeader element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageHeaderElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageHeaderElements(MessageHeader element) throws IOException { - composeDomainResourceElements(element); - if (element.hasEvent()) { - composeCoding("event", element.getEvent()); - } - if (element.hasDestination()) { - for (MessageHeader.MessageDestinationComponent e : element.getDestination()) - composeMessageHeaderMessageDestinationComponent("destination", e); - } - if (element.hasSender()) { - composeReference("sender", element.getSender()); - } - if (element.hasTimestampElement()) { - composeInstant("timestamp", element.getTimestampElement()); - } - if (element.hasEnterer()) { - composeReference("enterer", element.getEnterer()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasSource()) { - composeMessageHeaderMessageSourceComponent("source", element.getSource()); - } - if (element.hasResponsible()) { - composeReference("responsible", element.getResponsible()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasResponse()) { - composeMessageHeaderMessageHeaderResponseComponent("response", element.getResponse()); - } - if (element.hasFocus()) { - for (Reference e : element.getFocus()) - composeReference("focus", e); - } - } - - protected void composeMessageHeaderMessageDestinationComponent(String name, MessageHeader.MessageDestinationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageHeaderMessageDestinationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageHeaderMessageDestinationComponentElements(MessageHeader.MessageDestinationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasEndpointElement()) { - composeUri("endpoint", element.getEndpointElement()); - } - if (element.hasReceiver()) { - composeReference("receiver", element.getReceiver()); - } - } - - protected void composeMessageHeaderMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageHeaderMessageSourceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageHeaderMessageSourceComponentElements(MessageHeader.MessageSourceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasSoftwareElement()) { - composeString("software", element.getSoftwareElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasContact()) { - composeContactPoint("contact", element.getContact()); - } - if (element.hasEndpointElement()) { - composeUri("endpoint", element.getEndpointElement()); - } - } - - protected void composeMessageHeaderMessageHeaderResponseComponent(String name, MessageHeader.MessageHeaderResponseComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeMessageHeaderMessageHeaderResponseComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeMessageHeaderMessageHeaderResponseComponentElements(MessageHeader.MessageHeaderResponseComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifierElement()) { - composeId("identifier", element.getIdentifierElement()); - } - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory()); - if (element.hasDetails()) { - composeReference("details", element.getDetails()); - } - } - - protected void composeNamingSystem(String name, NamingSystem element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeNamingSystemElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNamingSystemElements(NamingSystem element) throws IOException { - composeDomainResourceElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory()); - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasResponsibleElement()) { - composeString("responsible", element.getResponsibleElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasUniqueId()) { - for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId()) - composeNamingSystemNamingSystemUniqueIdComponent("uniqueId", e); - } - if (element.hasReplacedBy()) { - composeReference("replacedBy", element.getReplacedBy()); - } - } - - protected void composeNamingSystemNamingSystemUniqueIdComponent(String name, NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNamingSystemNamingSystemUniqueIdComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNamingSystemNamingSystemUniqueIdComponentElements(NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory()); - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - if (element.hasPreferredElement()) { - composeBoolean("preferred", element.getPreferredElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderElements(NutritionOrder element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory()); - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateTimeElement()) { - composeDateTime("dateTime", element.getDateTimeElement()); - } - if (element.hasOrderer()) { - composeReference("orderer", element.getOrderer()); - } - if (element.hasAllergyIntolerance()) { - for (Reference e : element.getAllergyIntolerance()) - composeReference("allergyIntolerance", e); - } - if (element.hasFoodPreferenceModifier()) { - for (CodeableConcept e : element.getFoodPreferenceModifier()) - composeCodeableConcept("foodPreferenceModifier", e); - } - if (element.hasExcludeFoodModifier()) { - for (CodeableConcept e : element.getExcludeFoodModifier()) - composeCodeableConcept("excludeFoodModifier", e); - } - if (element.hasOralDiet()) { - composeNutritionOrderNutritionOrderOralDietComponent("oralDiet", element.getOralDiet()); - } - if (element.hasSupplement()) { - for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement()) - composeNutritionOrderNutritionOrderSupplementComponent("supplement", e); - } - if (element.hasEnteralFormula()) { - composeNutritionOrderNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula()); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietComponent(String name, NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderNutritionOrderOralDietComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietComponentElements(NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasSchedule()) { - for (Timing e : element.getSchedule()) - composeTiming("schedule", e); - } - if (element.hasNutrient()) { - for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient()) - composeNutritionOrderNutritionOrderOralDietNutrientComponent("nutrient", e); - } - if (element.hasTexture()) { - for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture()) - composeNutritionOrderNutritionOrderOralDietTextureComponent("texture", e); - } - if (element.hasFluidConsistencyType()) { - for (CodeableConcept e : element.getFluidConsistencyType()) - composeCodeableConcept("fluidConsistencyType", e); - } - if (element.hasInstructionElement()) { - composeString("instruction", element.getInstructionElement()); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderNutritionOrderOralDietNutrientComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietNutrientComponentElements(NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModifier()) { - composeCodeableConcept("modifier", element.getModifier()); - } - if (element.hasAmount()) { - composeSimpleQuantity("amount", element.getAmount()); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(String name, NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderNutritionOrderOralDietTextureComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderNutritionOrderOralDietTextureComponentElements(NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasModifier()) { - composeCodeableConcept("modifier", element.getModifier()); - } - if (element.hasFoodType()) { - composeCodeableConcept("foodType", element.getFoodType()); - } - } - - protected void composeNutritionOrderNutritionOrderSupplementComponent(String name, NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderNutritionOrderSupplementComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderNutritionOrderSupplementComponentElements(NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasProductNameElement()) { - composeString("productName", element.getProductNameElement()); - } - if (element.hasSchedule()) { - for (Timing e : element.getSchedule()) - composeTiming("schedule", e); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasInstructionElement()) { - composeString("instruction", element.getInstructionElement()); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderNutritionOrderEnteralFormulaComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaComponentElements(NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasBaseFormulaType()) { - composeCodeableConcept("baseFormulaType", element.getBaseFormulaType()); - } - if (element.hasBaseFormulaProductNameElement()) { - composeString("baseFormulaProductName", element.getBaseFormulaProductNameElement()); - } - if (element.hasAdditiveType()) { - composeCodeableConcept("additiveType", element.getAdditiveType()); - } - if (element.hasAdditiveProductNameElement()) { - composeString("additiveProductName", element.getAdditiveProductNameElement()); - } - if (element.hasCaloricDensity()) { - composeSimpleQuantity("caloricDensity", element.getCaloricDensity()); - } - if (element.hasRouteofAdministration()) { - composeCodeableConcept("routeofAdministration", element.getRouteofAdministration()); - } - if (element.hasAdministration()) { - for (NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent e : element.getAdministration()) - composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent("administration", e); - } - if (element.hasMaxVolumeToDeliver()) { - composeSimpleQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver()); - } - if (element.hasAdministrationInstructionElement()) { - composeString("administrationInstruction", element.getAdministrationInstructionElement()); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentElements(NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSchedule()) { - composeTiming("schedule", element.getSchedule()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasRate()) { - composeType("rate", element.getRate()); - } } - - protected void composeObservation(String name, Observation element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeObservationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeObservationElements(Observation element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasEffective()) { - composeType("effective", element.getEffective()); - } if (element.hasIssuedElement()) { - composeInstant("issued", element.getIssuedElement()); - } - if (element.hasPerformer()) { - for (Reference e : element.getPerformer()) - composeReference("performer", e); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasDataAbsentReason()) { - composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); - } - if (element.hasInterpretation()) { - composeCodeableConcept("interpretation", element.getInterpretation()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasSpecimen()) { - composeReference("specimen", element.getSpecimen()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasReferenceRange()) { - for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) - composeObservationObservationReferenceRangeComponent("referenceRange", e); - } - if (element.hasRelated()) { - for (Observation.ObservationRelatedComponent e : element.getRelated()) - composeObservationObservationRelatedComponent("related", e); - } - if (element.hasComponent()) { - for (Observation.ObservationComponentComponent e : element.getComponent()) - composeObservationObservationComponentComponent("component", e); - } - } - - protected void composeObservationObservationReferenceRangeComponent(String name, Observation.ObservationReferenceRangeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeObservationObservationReferenceRangeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeObservationObservationReferenceRangeComponentElements(Observation.ObservationReferenceRangeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLow()) { - composeSimpleQuantity("low", element.getLow()); - } - if (element.hasHigh()) { - composeSimpleQuantity("high", element.getHigh()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasAppliesTo()) { - for (CodeableConcept e : element.getAppliesTo()) - composeCodeableConcept("appliesTo", e); - } - if (element.hasAge()) { - composeRange("age", element.getAge()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - } - - protected void composeObservationObservationRelatedComponent(String name, Observation.ObservationRelatedComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeObservationObservationRelatedComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeObservationObservationRelatedComponentElements(Observation.ObservationRelatedComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Observation.ObservationRelationshipTypeEnumFactory()); - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - } - - protected void composeObservationObservationComponentComponent(String name, Observation.ObservationComponentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeObservationObservationComponentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeObservationObservationComponentComponentElements(Observation.ObservationComponentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasDataAbsentReason()) { - composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); - } - if (element.hasInterpretation()) { - composeCodeableConcept("interpretation", element.getInterpretation()); - } - if (element.hasReferenceRange()) { - for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) - composeObservationObservationReferenceRangeComponent("referenceRange", e); - } - } - - protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeOperationDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOperationDefinitionElements(OperationDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasIdempotentElement()) { - composeBoolean("idempotent", element.getIdempotentElement()); - } - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - if (element.hasBase()) { - composeReference("base", element.getBase()); - } - if (element.hasResource()) { - for (CodeType e : element.getResource()) - composeCode("resource", e); - } - if (element.hasSystemElement()) { - composeBoolean("system", element.getSystemElement()); - } - if (element.hasTypeElement()) { - composeBoolean("type", element.getTypeElement()); - } - if (element.hasInstanceElement()) { - composeBoolean("instance", element.getInstanceElement()); - } - if (element.hasParameter()) { - for (OperationDefinition.OperationDefinitionParameterComponent e : element.getParameter()) - composeOperationDefinitionOperationDefinitionParameterComponent("parameter", e); - } - if (element.hasOverload()) { - for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload()) - composeOperationDefinitionOperationDefinitionOverloadComponent("overload", e); - } - } - - protected void composeOperationDefinitionOperationDefinitionParameterComponent(String name, OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeOperationDefinitionOperationDefinitionParameterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOperationDefinitionOperationDefinitionParameterComponentElements(OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeCode("name", element.getNameElement()); - } - if (element.hasUseElement()) - composeEnumeration("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory()); - if (element.hasMinElement()) { - composeInteger("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasSearchTypeElement()) - composeEnumeration("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); - if (element.hasProfile()) { - composeReference("profile", element.getProfile()); - } - if (element.hasBinding()) { - composeOperationDefinitionOperationDefinitionParameterBindingComponent("binding", element.getBinding()); - } - if (element.hasPart()) { - for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart()) - composeOperationDefinitionOperationDefinitionParameterComponent("part", e); - } - } - - protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(String name, OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeOperationDefinitionOperationDefinitionParameterBindingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOperationDefinitionOperationDefinitionParameterBindingComponentElements(OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasStrengthElement()) - composeEnumeration("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory()); - if (element.hasValueSet()) { - composeType("valueSet", element.getValueSet()); - } } - - protected void composeOperationDefinitionOperationDefinitionOverloadComponent(String name, OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeOperationDefinitionOperationDefinitionOverloadComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOperationDefinitionOperationDefinitionOverloadComponentElements(OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasParameterName()) { - for (StringType e : element.getParameterName()) - composeString("parameterName", e); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeOperationOutcome(String name, OperationOutcome element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeOperationOutcomeElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOperationOutcomeElements(OperationOutcome element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIssue()) { - for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue()) - composeOperationOutcomeOperationOutcomeIssueComponent("issue", e); - } - } - - protected void composeOperationOutcomeOperationOutcomeIssueComponent(String name, OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeOperationOutcomeOperationOutcomeIssueComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOperationOutcomeOperationOutcomeIssueComponentElements(OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSeverityElement()) - composeEnumeration("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory()); - if (element.hasCodeElement()) - composeEnumeration("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory()); - if (element.hasDetails()) { - composeCodeableConcept("details", element.getDetails()); - } - if (element.hasDiagnosticsElement()) { - composeString("diagnostics", element.getDiagnosticsElement()); - } - if (element.hasLocation()) { - for (StringType e : element.getLocation()) - composeString("location", e); - } - if (element.hasExpression()) { - for (StringType e : element.getExpression()) - composeString("expression", e); - } - } - - protected void composeOrganization(String name, Organization element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeOrganizationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOrganizationElements(Organization element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasType()) { - for (CodeableConcept e : element.getType()) - composeCodeableConcept("type", e); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasAlias()) { - for (StringType e : element.getAlias()) - composeString("alias", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasAddress()) { - for (Address e : element.getAddress()) - composeAddress("address", e); - } - if (element.hasPartOf()) { - composeReference("partOf", element.getPartOf()); - } - if (element.hasContact()) { - for (Organization.OrganizationContactComponent e : element.getContact()) - composeOrganizationOrganizationContactComponent("contact", e); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - } - - protected void composeOrganizationOrganizationContactComponent(String name, Organization.OrganizationContactComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeOrganizationOrganizationContactComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeOrganizationOrganizationContactComponentElements(Organization.OrganizationContactComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasPurpose()) { - composeCodeableConcept("purpose", element.getPurpose()); - } - if (element.hasName()) { - composeHumanName("name", element.getName()); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasAddress()) { - composeAddress("address", element.getAddress()); - } - } - - protected void composePatient(String name, Patient element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePatientElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePatientElements(Patient element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasName()) { - for (HumanName e : element.getName()) - composeHumanName("name", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasGenderElement()) - composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); - if (element.hasBirthDateElement()) { - composeDate("birthDate", element.getBirthDateElement()); - } - if (element.hasDeceased()) { - composeType("deceased", element.getDeceased()); - } if (element.hasAddress()) { - for (Address e : element.getAddress()) - composeAddress("address", e); - } - if (element.hasMaritalStatus()) { - composeCodeableConcept("maritalStatus", element.getMaritalStatus()); - } - if (element.hasMultipleBirth()) { - composeType("multipleBirth", element.getMultipleBirth()); - } if (element.hasPhoto()) { - for (Attachment e : element.getPhoto()) - composeAttachment("photo", e); - } - if (element.hasContact()) { - for (Patient.ContactComponent e : element.getContact()) - composePatientContactComponent("contact", e); - } - if (element.hasAnimal()) { - composePatientAnimalComponent("animal", element.getAnimal()); - } - if (element.hasCommunication()) { - for (Patient.PatientCommunicationComponent e : element.getCommunication()) - composePatientPatientCommunicationComponent("communication", e); - } - if (element.hasGeneralPractitioner()) { - for (Reference e : element.getGeneralPractitioner()) - composeReference("generalPractitioner", e); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasLink()) { - for (Patient.PatientLinkComponent e : element.getLink()) - composePatientPatientLinkComponent("link", e); - } - } - - protected void composePatientContactComponent(String name, Patient.ContactComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePatientContactComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePatientContactComponentElements(Patient.ContactComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRelationship()) { - for (CodeableConcept e : element.getRelationship()) - composeCodeableConcept("relationship", e); - } - if (element.hasName()) { - composeHumanName("name", element.getName()); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasAddress()) { - composeAddress("address", element.getAddress()); - } - if (element.hasGenderElement()) - composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composePatientAnimalComponent(String name, Patient.AnimalComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePatientAnimalComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePatientAnimalComponentElements(Patient.AnimalComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSpecies()) { - composeCodeableConcept("species", element.getSpecies()); - } - if (element.hasBreed()) { - composeCodeableConcept("breed", element.getBreed()); - } - if (element.hasGenderStatus()) { - composeCodeableConcept("genderStatus", element.getGenderStatus()); - } - } - - protected void composePatientPatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePatientPatientCommunicationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePatientPatientCommunicationComponentElements(Patient.PatientCommunicationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLanguage()) { - composeCodeableConcept("language", element.getLanguage()); - } - if (element.hasPreferredElement()) { - composeBoolean("preferred", element.getPreferredElement()); - } - } - - protected void composePatientPatientLinkComponent(String name, Patient.PatientLinkComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePatientPatientLinkComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePatientPatientLinkComponentElements(Patient.PatientLinkComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOther()) { - composeReference("other", element.getOther()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory()); - } - - protected void composePaymentNotice(String name, PaymentNotice element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePaymentNoticeElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePaymentNoticeElements(PaymentNotice element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory()); - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasStatusDateElement()) { - composeDate("statusDate", element.getStatusDateElement()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasPaymentStatus()) { - composeCodeableConcept("paymentStatus", element.getPaymentStatus()); - } - } - - protected void composePaymentReconciliation(String name, PaymentReconciliation element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePaymentReconciliationElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePaymentReconciliationElements(PaymentReconciliation element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new PaymentReconciliation.PaymentReconciliationStatusEnumFactory()); - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeString("disposition", element.getDispositionElement()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasDetail()) { - for (PaymentReconciliation.DetailsComponent e : element.getDetail()) - composePaymentReconciliationDetailsComponent("detail", e); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasTotal()) { - composeMoney("total", element.getTotal()); - } - if (element.hasProcessNote()) { - for (PaymentReconciliation.NotesComponent e : element.getProcessNote()) - composePaymentReconciliationNotesComponent("processNote", e); - } - } - - protected void composePaymentReconciliationDetailsComponent(String name, PaymentReconciliation.DetailsComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePaymentReconciliationDetailsComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePaymentReconciliationDetailsComponentElements(PaymentReconciliation.DetailsComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasSubmitter()) { - composeReference("submitter", element.getSubmitter()); - } - if (element.hasPayee()) { - composeReference("payee", element.getPayee()); - } - if (element.hasDateElement()) { - composeDate("date", element.getDateElement()); - } - if (element.hasAmount()) { - composeMoney("amount", element.getAmount()); - } - } - - protected void composePaymentReconciliationNotesComponent(String name, PaymentReconciliation.NotesComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePaymentReconciliationNotesComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePaymentReconciliationNotesComponentElements(PaymentReconciliation.NotesComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - } - - protected void composePerson(String name, Person element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePersonElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePersonElements(Person element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasName()) { - for (HumanName e : element.getName()) - composeHumanName("name", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasGenderElement()) - composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); - if (element.hasBirthDateElement()) { - composeDate("birthDate", element.getBirthDateElement()); - } - if (element.hasAddress()) { - for (Address e : element.getAddress()) - composeAddress("address", e); - } - if (element.hasPhoto()) { - composeAttachment("photo", element.getPhoto()); - } - if (element.hasManagingOrganization()) { - composeReference("managingOrganization", element.getManagingOrganization()); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasLink()) { - for (Person.PersonLinkComponent e : element.getLink()) - composePersonPersonLinkComponent("link", e); - } - } - - protected void composePersonPersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePersonPersonLinkComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePersonPersonLinkComponentElements(Person.PersonLinkComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasAssuranceElement()) - composeEnumeration("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory()); - } - - protected void composePlanDefinition(String name, PlanDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionElements(PlanDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasTopic()) { - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept("topic", e); - } - if (element.hasContributor()) { - for (Contributor e : element.getContributor()) - composeContributor("contributor", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - if (element.hasLibrary()) { - for (Reference e : element.getLibrary()) - composeReference("library", e); - } - if (element.hasGoal()) { - for (PlanDefinition.PlanDefinitionGoalComponent e : element.getGoal()) - composePlanDefinitionPlanDefinitionGoalComponent("goal", e); - } - if (element.hasAction()) { - for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) - composePlanDefinitionPlanDefinitionActionComponent("action", e); - } - } - - protected void composePlanDefinitionPlanDefinitionGoalComponent(String name, PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionGoalComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionGoalComponentElements(PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasDescription()) { - composeCodeableConcept("description", element.getDescription()); - } - if (element.hasPriority()) { - composeCodeableConcept("priority", element.getPriority()); - } - if (element.hasStart()) { - composeCodeableConcept("start", element.getStart()); - } - if (element.hasAddresses()) { - for (CodeableConcept e : element.getAddresses()) - composeCodeableConcept("addresses", e); - } - if (element.hasDocumentation()) { - for (RelatedArtifact e : element.getDocumentation()) - composeRelatedArtifact("documentation", e); - } - if (element.hasTarget()) { - for (PlanDefinition.PlanDefinitionGoalTargetComponent e : element.getTarget()) - composePlanDefinitionPlanDefinitionGoalTargetComponent("target", e); - } - } - - protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(String name, PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionGoalTargetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionGoalTargetComponentElements(PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasMeasure()) { - composeCodeableConcept("measure", element.getMeasure()); - } - if (element.hasDetail()) { - composeType("detail", element.getDetail()); - } if (element.hasDue()) { - composeDuration("due", element.getDue()); - } - } - - protected void composePlanDefinitionPlanDefinitionActionComponent(String name, PlanDefinition.PlanDefinitionActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionActionComponentElements(PlanDefinition.PlanDefinitionActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLabelElement()) { - composeString("label", element.getLabelElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasTextEquivalentElement()) { - composeString("textEquivalent", element.getTextEquivalentElement()); - } - if (element.hasCode()) { - for (CodeableConcept e : element.getCode()) - composeCodeableConcept("code", e); - } - if (element.hasReason()) { - for (CodeableConcept e : element.getReason()) - composeCodeableConcept("reason", e); - } - if (element.hasDocumentation()) { - for (RelatedArtifact e : element.getDocumentation()) - composeRelatedArtifact("documentation", e); - } - if (element.hasGoalId()) { - for (IdType e : element.getGoalId()) - composeId("goalId", e); - } - if (element.hasTriggerDefinition()) { - for (TriggerDefinition e : element.getTriggerDefinition()) - composeTriggerDefinition("triggerDefinition", e); - } - if (element.hasCondition()) { - for (PlanDefinition.PlanDefinitionActionConditionComponent e : element.getCondition()) - composePlanDefinitionPlanDefinitionActionConditionComponent("condition", e); - } - if (element.hasInput()) { - for (DataRequirement e : element.getInput()) - composeDataRequirement("input", e); - } - if (element.hasOutput()) { - for (DataRequirement e : element.getOutput()) - composeDataRequirement("output", e); - } - if (element.hasRelatedAction()) { - for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction()) - composePlanDefinitionPlanDefinitionActionRelatedActionComponent("relatedAction", e); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } if (element.hasParticipant()) { - for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant()) - composePlanDefinitionPlanDefinitionActionParticipantComponent("participant", e); - } - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasGroupingBehaviorElement()) - composeEnumeration("groupingBehavior", element.getGroupingBehaviorElement(), new PlanDefinition.ActionGroupingBehaviorEnumFactory()); - if (element.hasSelectionBehaviorElement()) - composeEnumeration("selectionBehavior", element.getSelectionBehaviorElement(), new PlanDefinition.ActionSelectionBehaviorEnumFactory()); - if (element.hasRequiredBehaviorElement()) - composeEnumeration("requiredBehavior", element.getRequiredBehaviorElement(), new PlanDefinition.ActionRequiredBehaviorEnumFactory()); - if (element.hasPrecheckBehaviorElement()) - composeEnumeration("precheckBehavior", element.getPrecheckBehaviorElement(), new PlanDefinition.ActionPrecheckBehaviorEnumFactory()); - if (element.hasCardinalityBehaviorElement()) - composeEnumeration("cardinalityBehavior", element.getCardinalityBehaviorElement(), new PlanDefinition.ActionCardinalityBehaviorEnumFactory()); - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - if (element.hasTransform()) { - composeReference("transform", element.getTransform()); - } - if (element.hasDynamicValue()) { - for (PlanDefinition.PlanDefinitionActionDynamicValueComponent e : element.getDynamicValue()) - composePlanDefinitionPlanDefinitionActionDynamicValueComponent("dynamicValue", e); - } - if (element.hasAction()) { - for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) - composePlanDefinitionPlanDefinitionActionComponent("action", e); - } - } - - protected void composePlanDefinitionPlanDefinitionActionConditionComponent(String name, PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionActionConditionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionActionConditionComponentElements(PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory()); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasLanguageElement()) { - composeString("language", element.getLanguageElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - } - - protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionActionRelatedActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponentElements(PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasActionIdElement()) { - composeId("actionId", element.getActionIdElement()); - } - if (element.hasRelationshipElement()) - composeEnumeration("relationship", element.getRelationshipElement(), new PlanDefinition.ActionRelationshipTypeEnumFactory()); - if (element.hasOffset()) { - composeType("offset", element.getOffset()); - } } - - protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(String name, PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionActionParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionActionParticipantComponentElements(PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory()); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - } - - protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePlanDefinitionPlanDefinitionActionDynamicValueComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponentElements(PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasLanguageElement()) { - composeString("language", element.getLanguageElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - } - - protected void composePractitioner(String name, Practitioner element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePractitionerElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePractitionerElements(Practitioner element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasName()) { - for (HumanName e : element.getName()) - composeHumanName("name", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasAddress()) { - for (Address e : element.getAddress()) - composeAddress("address", e); - } - if (element.hasGenderElement()) - composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); - if (element.hasBirthDateElement()) { - composeDate("birthDate", element.getBirthDateElement()); - } - if (element.hasPhoto()) { - for (Attachment e : element.getPhoto()) - composeAttachment("photo", e); - } - if (element.hasQualification()) { - for (Practitioner.PractitionerQualificationComponent e : element.getQualification()) - composePractitionerPractitionerQualificationComponent("qualification", e); - } - if (element.hasCommunication()) { - for (CodeableConcept e : element.getCommunication()) - composeCodeableConcept("communication", e); - } - } - - protected void composePractitionerPractitionerQualificationComponent(String name, Practitioner.PractitionerQualificationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePractitionerPractitionerQualificationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePractitionerPractitionerQualificationComponentElements(Practitioner.PractitionerQualificationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasIssuer()) { - composeReference("issuer", element.getIssuer()); - } - } - - protected void composePractitionerRole(String name, PractitionerRole element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composePractitionerRoleElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePractitionerRoleElements(PractitionerRole element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasPractitioner()) { - composeReference("practitioner", element.getPractitioner()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasCode()) { - for (CodeableConcept e : element.getCode()) - composeCodeableConcept("code", e); - } - if (element.hasSpecialty()) { - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept("specialty", e); - } - if (element.hasLocation()) { - for (Reference e : element.getLocation()) - composeReference("location", e); - } - if (element.hasHealthcareService()) { - for (Reference e : element.getHealthcareService()) - composeReference("healthcareService", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasAvailableTime()) { - for (PractitionerRole.PractitionerRoleAvailableTimeComponent e : element.getAvailableTime()) - composePractitionerRolePractitionerRoleAvailableTimeComponent("availableTime", e); - } - if (element.hasNotAvailable()) { - for (PractitionerRole.PractitionerRoleNotAvailableComponent e : element.getNotAvailable()) - composePractitionerRolePractitionerRoleNotAvailableComponent("notAvailable", e); - } - if (element.hasAvailabilityExceptionsElement()) { - composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); - } - if (element.hasEndpoint()) { - for (Reference e : element.getEndpoint()) - composeReference("endpoint", e); - } - } - - protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(String name, PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePractitionerRolePractitionerRoleAvailableTimeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePractitionerRolePractitionerRoleAvailableTimeComponentElements(PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDaysOfWeek()) - for (Enumeration e : element.getDaysOfWeek()) - composeEnumeration("daysOfWeek", e, new PractitionerRole.DaysOfWeekEnumFactory()); - if (element.hasAllDayElement()) { - composeBoolean("allDay", element.getAllDayElement()); - } - if (element.hasAvailableStartTimeElement()) { - composeTime("availableStartTime", element.getAvailableStartTimeElement()); - } - if (element.hasAvailableEndTimeElement()) { - composeTime("availableEndTime", element.getAvailableEndTimeElement()); - } - } - - protected void composePractitionerRolePractitionerRoleNotAvailableComponent(String name, PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composePractitionerRolePractitionerRoleNotAvailableComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composePractitionerRolePractitionerRoleNotAvailableComponentElements(PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasDuring()) { - composePeriod("during", element.getDuring()); - } - } - - protected void composeProcedure(String name, Procedure element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeProcedureElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcedureElements(Procedure element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory()); - if (element.hasNotDoneElement()) { - composeBoolean("notDone", element.getNotDoneElement()); - } - if (element.hasNotDoneReason()) { - composeCodeableConcept("notDoneReason", element.getNotDoneReason()); - } - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasPerformed()) { - composeType("performed", element.getPerformed()); - } if (element.hasPerformer()) { - for (Procedure.ProcedurePerformerComponent e : element.getPerformer()) - composeProcedureProcedurePerformerComponent("performer", e); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasBodySite()) { - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept("bodySite", e); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasReport()) { - for (Reference e : element.getReport()) - composeReference("report", e); - } - if (element.hasComplication()) { - for (CodeableConcept e : element.getComplication()) - composeCodeableConcept("complication", e); - } - if (element.hasComplicationDetail()) { - for (Reference e : element.getComplicationDetail()) - composeReference("complicationDetail", e); - } - if (element.hasFollowUp()) { - for (CodeableConcept e : element.getFollowUp()) - composeCodeableConcept("followUp", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasFocalDevice()) { - for (Procedure.ProcedureFocalDeviceComponent e : element.getFocalDevice()) - composeProcedureProcedureFocalDeviceComponent("focalDevice", e); - } - if (element.hasUsedReference()) { - for (Reference e : element.getUsedReference()) - composeReference("usedReference", e); - } - if (element.hasUsedCode()) { - for (CodeableConcept e : element.getUsedCode()) - composeCodeableConcept("usedCode", e); - } - } - - protected void composeProcedureProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProcedureProcedurePerformerComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcedureProcedurePerformerComponentElements(Procedure.ProcedurePerformerComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - composeCodeableConcept("role", element.getRole()); - } - if (element.hasActor()) { - composeReference("actor", element.getActor()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeProcedureProcedureFocalDeviceComponent(String name, Procedure.ProcedureFocalDeviceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProcedureProcedureFocalDeviceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcedureProcedureFocalDeviceComponentElements(Procedure.ProcedureFocalDeviceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAction()) { - composeCodeableConcept("action", element.getAction()); - } - if (element.hasManipulated()) { - composeReference("manipulated", element.getManipulated()); - } - } - - protected void composeProcedureRequest(String name, ProcedureRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeProcedureRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcedureRequestElements(ProcedureRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasReplaces()) { - for (Reference e : element.getReplaces()) - composeReference("replaces", e); - } - if (element.hasRequisition()) { - composeIdentifier("requisition", element.getRequisition()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ProcedureRequest.ProcedureRequestStatusEnumFactory()); - if (element.hasIntentElement()) - composeEnumeration("intent", element.getIntentElement(), new ProcedureRequest.ProcedureRequestIntentEnumFactory()); - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new ProcedureRequest.ProcedureRequestPriorityEnumFactory()); - if (element.hasDoNotPerformElement()) { - composeBoolean("doNotPerform", element.getDoNotPerformElement()); - } - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasAsNeeded()) { - composeType("asNeeded", element.getAsNeeded()); - } if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasRequester()) { - composeProcedureRequestProcedureRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasPerformerType()) { - composeCodeableConcept("performerType", element.getPerformerType()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReasonCode()) { - for (CodeableConcept e : element.getReasonCode()) - composeCodeableConcept("reasonCode", e); - } - if (element.hasReasonReference()) { - for (Reference e : element.getReasonReference()) - composeReference("reasonReference", e); - } - if (element.hasSupportingInfo()) { - for (Reference e : element.getSupportingInfo()) - composeReference("supportingInfo", e); - } - if (element.hasSpecimen()) { - for (Reference e : element.getSpecimen()) - composeReference("specimen", e); - } - if (element.hasBodySite()) { - for (CodeableConcept e : element.getBodySite()) - composeCodeableConcept("bodySite", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasRelevantHistory()) { - for (Reference e : element.getRelevantHistory()) - composeReference("relevantHistory", e); - } - } - - protected void composeProcedureRequestProcedureRequestRequesterComponent(String name, ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProcedureRequestProcedureRequestRequesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcedureRequestProcedureRequestRequesterComponentElements(ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeProcessRequest(String name, ProcessRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeProcessRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcessRequestElements(ProcessRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ProcessRequest.ProcessRequestStatusEnumFactory()); - if (element.hasActionElement()) - composeEnumeration("action", element.getActionElement(), new ProcessRequest.ActionListEnumFactory()); - if (element.hasTarget()) { - composeReference("target", element.getTarget()); - } - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasProvider()) { - composeReference("provider", element.getProvider()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasResponse()) { - composeReference("response", element.getResponse()); - } - if (element.hasNullifyElement()) { - composeBoolean("nullify", element.getNullifyElement()); - } - if (element.hasReferenceElement()) { - composeString("reference", element.getReferenceElement()); - } - if (element.hasItem()) { - for (ProcessRequest.ItemsComponent e : element.getItem()) - composeProcessRequestItemsComponent("item", e); - } - if (element.hasInclude()) { - for (StringType e : element.getInclude()) - composeString("include", e); - } - if (element.hasExclude()) { - for (StringType e : element.getExclude()) - composeString("exclude", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeProcessRequestItemsComponent(String name, ProcessRequest.ItemsComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProcessRequestItemsComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcessRequestItemsComponentElements(ProcessRequest.ItemsComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSequenceLinkIdElement()) { - composeInteger("sequenceLinkId", element.getSequenceLinkIdElement()); - } - } - - protected void composeProcessResponse(String name, ProcessResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeProcessResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcessResponseElements(ProcessResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ProcessResponse.ProcessResponseStatusEnumFactory()); - if (element.hasCreatedElement()) { - composeDateTime("created", element.getCreatedElement()); - } - if (element.hasOrganization()) { - composeReference("organization", element.getOrganization()); - } - if (element.hasRequest()) { - composeReference("request", element.getRequest()); - } - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasDispositionElement()) { - composeString("disposition", element.getDispositionElement()); - } - if (element.hasRequestProvider()) { - composeReference("requestProvider", element.getRequestProvider()); - } - if (element.hasRequestOrganization()) { - composeReference("requestOrganization", element.getRequestOrganization()); - } - if (element.hasForm()) { - composeCodeableConcept("form", element.getForm()); - } - if (element.hasProcessNote()) { - for (ProcessResponse.ProcessResponseProcessNoteComponent e : element.getProcessNote()) - composeProcessResponseProcessResponseProcessNoteComponent("processNote", e); - } - if (element.hasError()) { - for (CodeableConcept e : element.getError()) - composeCodeableConcept("error", e); - } - if (element.hasCommunicationRequest()) { - for (Reference e : element.getCommunicationRequest()) - composeReference("communicationRequest", e); - } - } - - protected void composeProcessResponseProcessResponseProcessNoteComponent(String name, ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProcessResponseProcessResponseProcessNoteComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProcessResponseProcessResponseProcessNoteComponentElements(ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - } - - protected void composeProvenance(String name, Provenance element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeProvenanceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProvenanceElements(Provenance element) throws IOException { - composeDomainResourceElements(element); - if (element.hasTarget()) { - for (Reference e : element.getTarget()) - composeReference("target", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasRecordedElement()) { - composeInstant("recorded", element.getRecordedElement()); - } - if (element.hasPolicy()) { - for (UriType e : element.getPolicy()) - composeUri("policy", e); - } - if (element.hasLocation()) { - composeReference("location", element.getLocation()); - } - if (element.hasReason()) { - for (Coding e : element.getReason()) - composeCoding("reason", e); - } - if (element.hasActivity()) { - composeCoding("activity", element.getActivity()); - } - if (element.hasAgent()) { - for (Provenance.ProvenanceAgentComponent e : element.getAgent()) - composeProvenanceProvenanceAgentComponent("agent", e); - } - if (element.hasEntity()) { - for (Provenance.ProvenanceEntityComponent e : element.getEntity()) - composeProvenanceProvenanceEntityComponent("entity", e); - } - if (element.hasSignature()) { - for (Signature e : element.getSignature()) - composeSignature("signature", e); - } - } - - protected void composeProvenanceProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProvenanceProvenanceAgentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProvenanceProvenanceAgentComponentElements(Provenance.ProvenanceAgentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRole()) { - for (CodeableConcept e : element.getRole()) - composeCodeableConcept("role", e); - } - if (element.hasWho()) { - composeType("who", element.getWho()); - } if (element.hasOnBehalfOf()) { - composeType("onBehalfOf", element.getOnBehalfOf()); - } if (element.hasRelatedAgentType()) { - composeCodeableConcept("relatedAgentType", element.getRelatedAgentType()); - } - } - - protected void composeProvenanceProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeProvenanceProvenanceEntityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeProvenanceProvenanceEntityComponentElements(Provenance.ProvenanceEntityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRoleElement()) - composeEnumeration("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory()); - if (element.hasWhat()) { - composeType("what", element.getWhat()); - } if (element.hasAgent()) { - for (Provenance.ProvenanceAgentComponent e : element.getAgent()) - composeProvenanceProvenanceAgentComponent("agent", e); - } - } - - protected void composeQuestionnaire(String name, Questionnaire element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireElements(Questionnaire element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasCode()) { - for (Coding e : element.getCode()) - composeCoding("code", e); - } - if (element.hasSubjectType()) { - for (CodeType e : element.getSubjectType()) - composeCode("subjectType", e); - } - if (element.hasItem()) { - for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) - composeQuestionnaireQuestionnaireItemComponent("item", e); - } - } - - protected void composeQuestionnaireQuestionnaireItemComponent(String name, Questionnaire.QuestionnaireItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireQuestionnaireItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireQuestionnaireItemComponentElements(Questionnaire.QuestionnaireItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLinkIdElement()) { - composeString("linkId", element.getLinkIdElement()); - } - if (element.hasDefinitionElement()) { - composeUri("definition", element.getDefinitionElement()); - } - if (element.hasCode()) { - for (Coding e : element.getCode()) - composeCoding("code", e); - } - if (element.hasPrefixElement()) { - composeString("prefix", element.getPrefixElement()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory()); - if (element.hasEnableWhen()) { - for (Questionnaire.QuestionnaireItemEnableWhenComponent e : element.getEnableWhen()) - composeQuestionnaireQuestionnaireItemEnableWhenComponent("enableWhen", e); - } - if (element.hasRequiredElement()) { - composeBoolean("required", element.getRequiredElement()); - } - if (element.hasRepeatsElement()) { - composeBoolean("repeats", element.getRepeatsElement()); - } - if (element.hasReadOnlyElement()) { - composeBoolean("readOnly", element.getReadOnlyElement()); - } - if (element.hasMaxLengthElement()) { - composeInteger("maxLength", element.getMaxLengthElement()); - } - if (element.hasOptions()) { - composeReference("options", element.getOptions()); - } - if (element.hasOption()) { - for (Questionnaire.QuestionnaireItemOptionComponent e : element.getOption()) - composeQuestionnaireQuestionnaireItemOptionComponent("option", e); - } - if (element.hasInitial()) { - composeType("initial", element.getInitial()); - } if (element.hasItem()) { - for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) - composeQuestionnaireQuestionnaireItemComponent("item", e); - } - } - - protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(String name, Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireQuestionnaireItemEnableWhenComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireQuestionnaireItemEnableWhenComponentElements(Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasQuestionElement()) { - composeString("question", element.getQuestionElement()); - } - if (element.hasHasAnswerElement()) { - composeBoolean("hasAnswer", element.getHasAnswerElement()); - } - if (element.hasAnswer()) { - composeType("answer", element.getAnswer()); - } } - - protected void composeQuestionnaireQuestionnaireItemOptionComponent(String name, Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireQuestionnaireItemOptionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireQuestionnaireItemOptionComponentElements(Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireResponseElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireResponseElements(QuestionnaireResponse element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasParent()) { - for (Reference e : element.getParent()) - composeReference("parent", e); - } - if (element.hasQuestionnaire()) { - composeReference("questionnaire", element.getQuestionnaire()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory()); - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasAuthoredElement()) { - composeDateTime("authored", element.getAuthoredElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasSource()) { - composeReference("source", element.getSource()); - } - if (element.hasItem()) { - for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) - composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); - } - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireResponseQuestionnaireResponseItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemComponentElements(QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLinkIdElement()) { - composeString("linkId", element.getLinkIdElement()); - } - if (element.hasDefinitionElement()) { - composeUri("definition", element.getDefinitionElement()); - } - if (element.hasTextElement()) { - composeString("text", element.getTextElement()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasAnswer()) { - for (QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent e : element.getAnswer()) - composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent("answer", e); - } - if (element.hasItem()) { - for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) - composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); - } - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentElements(QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } if (element.hasItem()) { - for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) - composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); - } - } - - protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeRelatedPersonElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRelatedPersonElements(RelatedPerson element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasRelationship()) { - composeCodeableConcept("relationship", element.getRelationship()); - } - if (element.hasName()) { - for (HumanName e : element.getName()) - composeHumanName("name", e); - } - if (element.hasTelecom()) { - for (ContactPoint e : element.getTelecom()) - composeContactPoint("telecom", e); - } - if (element.hasGenderElement()) - composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); - if (element.hasBirthDateElement()) { - composeDate("birthDate", element.getBirthDateElement()); - } - if (element.hasAddress()) { - for (Address e : element.getAddress()) - composeAddress("address", e); - } - if (element.hasPhoto()) { - for (Attachment e : element.getPhoto()) - composeAttachment("photo", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - } - - protected void composeRequestGroup(String name, RequestGroup element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeRequestGroupElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRequestGroupElements(RequestGroup element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - for (Reference e : element.getDefinition()) - composeReference("definition", e); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasReplaces()) { - for (Reference e : element.getReplaces()) - composeReference("replaces", e); - } - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory()); - if (element.hasIntentElement()) - composeEnumeration("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory()); - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory()); - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasAuthor()) { - composeReference("author", element.getAuthor()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasAction()) { - for (RequestGroup.RequestGroupActionComponent e : element.getAction()) - composeRequestGroupRequestGroupActionComponent("action", e); - } - } - - protected void composeRequestGroupRequestGroupActionComponent(String name, RequestGroup.RequestGroupActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeRequestGroupRequestGroupActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRequestGroupRequestGroupActionComponentElements(RequestGroup.RequestGroupActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLabelElement()) { - composeString("label", element.getLabelElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasTextEquivalentElement()) { - composeString("textEquivalent", element.getTextEquivalentElement()); - } - if (element.hasCode()) { - for (CodeableConcept e : element.getCode()) - composeCodeableConcept("code", e); - } - if (element.hasDocumentation()) { - for (RelatedArtifact e : element.getDocumentation()) - composeRelatedArtifact("documentation", e); - } - if (element.hasCondition()) { - for (RequestGroup.RequestGroupActionConditionComponent e : element.getCondition()) - composeRequestGroupRequestGroupActionConditionComponent("condition", e); - } - if (element.hasRelatedAction()) { - for (RequestGroup.RequestGroupActionRelatedActionComponent e : element.getRelatedAction()) - composeRequestGroupRequestGroupActionRelatedActionComponent("relatedAction", e); - } - if (element.hasTiming()) { - composeType("timing", element.getTiming()); - } if (element.hasParticipant()) { - for (Reference e : element.getParticipant()) - composeReference("participant", e); - } - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasGroupingBehaviorElement()) - composeEnumeration("groupingBehavior", element.getGroupingBehaviorElement(), new RequestGroup.ActionGroupingBehaviorEnumFactory()); - if (element.hasSelectionBehaviorElement()) - composeEnumeration("selectionBehavior", element.getSelectionBehaviorElement(), new RequestGroup.ActionSelectionBehaviorEnumFactory()); - if (element.hasRequiredBehaviorElement()) - composeEnumeration("requiredBehavior", element.getRequiredBehaviorElement(), new RequestGroup.ActionRequiredBehaviorEnumFactory()); - if (element.hasPrecheckBehaviorElement()) - composeEnumeration("precheckBehavior", element.getPrecheckBehaviorElement(), new RequestGroup.ActionPrecheckBehaviorEnumFactory()); - if (element.hasCardinalityBehaviorElement()) - composeEnumeration("cardinalityBehavior", element.getCardinalityBehaviorElement(), new RequestGroup.ActionCardinalityBehaviorEnumFactory()); - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - if (element.hasAction()) { - for (RequestGroup.RequestGroupActionComponent e : element.getAction()) - composeRequestGroupRequestGroupActionComponent("action", e); - } - } - - protected void composeRequestGroupRequestGroupActionConditionComponent(String name, RequestGroup.RequestGroupActionConditionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeRequestGroupRequestGroupActionConditionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRequestGroupRequestGroupActionConditionComponentElements(RequestGroup.RequestGroupActionConditionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory()); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasLanguageElement()) { - composeString("language", element.getLanguageElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - } - - protected void composeRequestGroupRequestGroupActionRelatedActionComponent(String name, RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeRequestGroupRequestGroupActionRelatedActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRequestGroupRequestGroupActionRelatedActionComponentElements(RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasActionIdElement()) { - composeId("actionId", element.getActionIdElement()); - } - if (element.hasRelationshipElement()) - composeEnumeration("relationship", element.getRelationshipElement(), new RequestGroup.ActionRelationshipTypeEnumFactory()); - if (element.hasOffset()) { - composeType("offset", element.getOffset()); - } } - - protected void composeResearchStudy(String name, ResearchStudy element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeResearchStudyElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeResearchStudyElements(ResearchStudy element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasProtocol()) { - for (Reference e : element.getProtocol()) - composeReference("protocol", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasFocus()) { - for (CodeableConcept e : element.getFocus()) - composeCodeableConcept("focus", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - if (element.hasKeyword()) { - for (CodeableConcept e : element.getKeyword()) - composeCodeableConcept("keyword", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasEnrollment()) { - for (Reference e : element.getEnrollment()) - composeReference("enrollment", e); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasSponsor()) { - composeReference("sponsor", element.getSponsor()); - } - if (element.hasPrincipalInvestigator()) { - composeReference("principalInvestigator", element.getPrincipalInvestigator()); - } - if (element.hasSite()) { - for (Reference e : element.getSite()) - composeReference("site", e); - } - if (element.hasReasonStopped()) { - composeCodeableConcept("reasonStopped", element.getReasonStopped()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasArm()) { - for (ResearchStudy.ResearchStudyArmComponent e : element.getArm()) - composeResearchStudyResearchStudyArmComponent("arm", e); - } - } - - protected void composeResearchStudyResearchStudyArmComponent(String name, ResearchStudy.ResearchStudyArmComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeResearchStudyResearchStudyArmComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeResearchStudyResearchStudyArmComponentElements(ResearchStudy.ResearchStudyArmComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - } - - protected void composeResearchSubject(String name, ResearchSubject element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeResearchSubjectElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeResearchSubjectElements(ResearchSubject element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory()); - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasStudy()) { - composeReference("study", element.getStudy()); - } - if (element.hasIndividual()) { - composeReference("individual", element.getIndividual()); - } - if (element.hasAssignedArmElement()) { - composeString("assignedArm", element.getAssignedArmElement()); - } - if (element.hasActualArmElement()) { - composeString("actualArm", element.getActualArmElement()); - } - if (element.hasConsent()) { - composeReference("consent", element.getConsent()); - } - } - - protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeRiskAssessmentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRiskAssessmentElements(RiskAssessment element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasBasedOn()) { - composeReference("basedOn", element.getBasedOn()); - } - if (element.hasParent()) { - composeReference("parent", element.getParent()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory()); - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasCondition()) { - composeReference("condition", element.getCondition()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } if (element.hasBasis()) { - for (Reference e : element.getBasis()) - composeReference("basis", e); - } - if (element.hasPrediction()) { - for (RiskAssessment.RiskAssessmentPredictionComponent e : element.getPrediction()) - composeRiskAssessmentRiskAssessmentPredictionComponent("prediction", e); - } - if (element.hasMitigationElement()) { - composeString("mitigation", element.getMitigationElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeRiskAssessmentRiskAssessmentPredictionComponent(String name, RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeRiskAssessmentRiskAssessmentPredictionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeRiskAssessmentRiskAssessmentPredictionComponentElements(RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOutcome()) { - composeCodeableConcept("outcome", element.getOutcome()); - } - if (element.hasProbability()) { - composeType("probability", element.getProbability()); - } if (element.hasQualitativeRisk()) { - composeCodeableConcept("qualitativeRisk", element.getQualitativeRisk()); - } - if (element.hasRelativeRiskElement()) { - composeDecimal("relativeRisk", element.getRelativeRiskElement()); - } - if (element.hasWhen()) { - composeType("when", element.getWhen()); - } if (element.hasRationaleElement()) { - composeString("rationale", element.getRationaleElement()); - } - } - - protected void composeSchedule(String name, Schedule element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeScheduleElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeScheduleElements(Schedule element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasActiveElement()) { - composeBoolean("active", element.getActiveElement()); - } - if (element.hasServiceCategory()) { - composeCodeableConcept("serviceCategory", element.getServiceCategory()); - } - if (element.hasServiceType()) { - for (CodeableConcept e : element.getServiceType()) - composeCodeableConcept("serviceType", e); - } - if (element.hasSpecialty()) { - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept("specialty", e); - } - if (element.hasActor()) { - for (Reference e : element.getActor()) - composeReference("actor", e); - } - if (element.hasPlanningHorizon()) { - composePeriod("planningHorizon", element.getPlanningHorizon()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeSearchParameter(String name, SearchParameter element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSearchParameterElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSearchParameterElements(SearchParameter element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasBase()) { - for (CodeType e : element.getBase()) - composeCode("base", e); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); - if (element.hasDerivedFromElement()) { - composeUri("derivedFrom", element.getDerivedFromElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - if (element.hasXpathElement()) { - composeString("xpath", element.getXpathElement()); - } - if (element.hasXpathUsageElement()) - composeEnumeration("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory()); - if (element.hasTarget()) { - for (CodeType e : element.getTarget()) - composeCode("target", e); - } - if (element.hasComparator()) - for (Enumeration e : element.getComparator()) - composeEnumeration("comparator", e, new SearchParameter.SearchComparatorEnumFactory()); - if (element.hasModifier()) - for (Enumeration e : element.getModifier()) - composeEnumeration("modifier", e, new SearchParameter.SearchModifierCodeEnumFactory()); - if (element.hasChain()) { - for (StringType e : element.getChain()) - composeString("chain", e); - } - if (element.hasComponent()) { - for (SearchParameter.SearchParameterComponentComponent e : element.getComponent()) - composeSearchParameterSearchParameterComponentComponent("component", e); - } - } - - protected void composeSearchParameterSearchParameterComponentComponent(String name, SearchParameter.SearchParameterComponentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSearchParameterSearchParameterComponentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSearchParameterSearchParameterComponentComponentElements(SearchParameter.SearchParameterComponentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDefinition()) { - composeReference("definition", element.getDefinition()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - } - - protected void composeSequence(String name, Sequence element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSequenceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSequenceElements(Sequence element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Sequence.SequenceTypeEnumFactory()); - if (element.hasCoordinateSystemElement()) { - composeInteger("coordinateSystem", element.getCoordinateSystemElement()); - } - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasSpecimen()) { - composeReference("specimen", element.getSpecimen()); - } - if (element.hasDevice()) { - composeReference("device", element.getDevice()); - } - if (element.hasPerformer()) { - composeReference("performer", element.getPerformer()); - } - if (element.hasQuantity()) { - composeQuantity("quantity", element.getQuantity()); - } - if (element.hasReferenceSeq()) { - composeSequenceSequenceReferenceSeqComponent("referenceSeq", element.getReferenceSeq()); - } - if (element.hasVariant()) { - for (Sequence.SequenceVariantComponent e : element.getVariant()) - composeSequenceSequenceVariantComponent("variant", e); - } - if (element.hasObservedSeqElement()) { - composeString("observedSeq", element.getObservedSeqElement()); - } - if (element.hasQuality()) { - for (Sequence.SequenceQualityComponent e : element.getQuality()) - composeSequenceSequenceQualityComponent("quality", e); - } - if (element.hasReadCoverageElement()) { - composeInteger("readCoverage", element.getReadCoverageElement()); - } - if (element.hasRepository()) { - for (Sequence.SequenceRepositoryComponent e : element.getRepository()) - composeSequenceSequenceRepositoryComponent("repository", e); - } - if (element.hasPointer()) { - for (Reference e : element.getPointer()) - composeReference("pointer", e); - } - } - - protected void composeSequenceSequenceReferenceSeqComponent(String name, Sequence.SequenceReferenceSeqComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSequenceSequenceReferenceSeqComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSequenceSequenceReferenceSeqComponentElements(Sequence.SequenceReferenceSeqComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasChromosome()) { - composeCodeableConcept("chromosome", element.getChromosome()); - } - if (element.hasGenomeBuildElement()) { - composeString("genomeBuild", element.getGenomeBuildElement()); - } - if (element.hasReferenceSeqId()) { - composeCodeableConcept("referenceSeqId", element.getReferenceSeqId()); - } - if (element.hasReferenceSeqPointer()) { - composeReference("referenceSeqPointer", element.getReferenceSeqPointer()); - } - if (element.hasReferenceSeqStringElement()) { - composeString("referenceSeqString", element.getReferenceSeqStringElement()); - } - if (element.hasStrandElement()) { - composeInteger("strand", element.getStrandElement()); - } - if (element.hasWindowStartElement()) { - composeInteger("windowStart", element.getWindowStartElement()); - } - if (element.hasWindowEndElement()) { - composeInteger("windowEnd", element.getWindowEndElement()); - } - } - - protected void composeSequenceSequenceVariantComponent(String name, Sequence.SequenceVariantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSequenceSequenceVariantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSequenceSequenceVariantComponentElements(Sequence.SequenceVariantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasStartElement()) { - composeInteger("start", element.getStartElement()); - } - if (element.hasEndElement()) { - composeInteger("end", element.getEndElement()); - } - if (element.hasObservedAlleleElement()) { - composeString("observedAllele", element.getObservedAlleleElement()); - } - if (element.hasReferenceAlleleElement()) { - composeString("referenceAllele", element.getReferenceAlleleElement()); - } - if (element.hasCigarElement()) { - composeString("cigar", element.getCigarElement()); - } - if (element.hasVariantPointer()) { - composeReference("variantPointer", element.getVariantPointer()); - } - } - - protected void composeSequenceSequenceQualityComponent(String name, Sequence.SequenceQualityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSequenceSequenceQualityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSequenceSequenceQualityComponentElements(Sequence.SequenceQualityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Sequence.QualityTypeEnumFactory()); - if (element.hasStandardSequence()) { - composeCodeableConcept("standardSequence", element.getStandardSequence()); - } - if (element.hasStartElement()) { - composeInteger("start", element.getStartElement()); - } - if (element.hasEndElement()) { - composeInteger("end", element.getEndElement()); - } - if (element.hasScore()) { - composeQuantity("score", element.getScore()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasTruthTPElement()) { - composeDecimal("truthTP", element.getTruthTPElement()); - } - if (element.hasQueryTPElement()) { - composeDecimal("queryTP", element.getQueryTPElement()); - } - if (element.hasTruthFNElement()) { - composeDecimal("truthFN", element.getTruthFNElement()); - } - if (element.hasQueryFPElement()) { - composeDecimal("queryFP", element.getQueryFPElement()); - } - if (element.hasGtFPElement()) { - composeDecimal("gtFP", element.getGtFPElement()); - } - if (element.hasPrecisionElement()) { - composeDecimal("precision", element.getPrecisionElement()); - } - if (element.hasRecallElement()) { - composeDecimal("recall", element.getRecallElement()); - } - if (element.hasFScoreElement()) { - composeDecimal("fScore", element.getFScoreElement()); - } - } - - protected void composeSequenceSequenceRepositoryComponent(String name, Sequence.SequenceRepositoryComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSequenceSequenceRepositoryComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSequenceSequenceRepositoryComponentElements(Sequence.SequenceRepositoryComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Sequence.RepositoryTypeEnumFactory()); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDatasetIdElement()) { - composeString("datasetId", element.getDatasetIdElement()); - } - if (element.hasVariantsetIdElement()) { - composeString("variantsetId", element.getVariantsetIdElement()); - } - if (element.hasReadsetIdElement()) { - composeString("readsetId", element.getReadsetIdElement()); - } - } - - protected void composeServiceDefinition(String name, ServiceDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeServiceDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeServiceDefinitionElements(ServiceDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasUsageElement()) { - composeString("usage", element.getUsageElement()); - } - if (element.hasApprovalDateElement()) { - composeDate("approvalDate", element.getApprovalDateElement()); - } - if (element.hasLastReviewDateElement()) { - composeDate("lastReviewDate", element.getLastReviewDateElement()); - } - if (element.hasEffectivePeriod()) { - composePeriod("effectivePeriod", element.getEffectivePeriod()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasTopic()) { - for (CodeableConcept e : element.getTopic()) - composeCodeableConcept("topic", e); - } - if (element.hasContributor()) { - for (Contributor e : element.getContributor()) - composeContributor("contributor", e); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasRelatedArtifact()) { - for (RelatedArtifact e : element.getRelatedArtifact()) - composeRelatedArtifact("relatedArtifact", e); - } - if (element.hasTrigger()) { - for (TriggerDefinition e : element.getTrigger()) - composeTriggerDefinition("trigger", e); - } - if (element.hasDataRequirement()) { - for (DataRequirement e : element.getDataRequirement()) - composeDataRequirement("dataRequirement", e); - } - if (element.hasOperationDefinition()) { - composeReference("operationDefinition", element.getOperationDefinition()); - } - } - - protected void composeSlot(String name, Slot element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSlotElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSlotElements(Slot element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasServiceCategory()) { - composeCodeableConcept("serviceCategory", element.getServiceCategory()); - } - if (element.hasServiceType()) { - for (CodeableConcept e : element.getServiceType()) - composeCodeableConcept("serviceType", e); - } - if (element.hasSpecialty()) { - for (CodeableConcept e : element.getSpecialty()) - composeCodeableConcept("specialty", e); - } - if (element.hasAppointmentType()) { - composeCodeableConcept("appointmentType", element.getAppointmentType()); - } - if (element.hasSchedule()) { - composeReference("schedule", element.getSchedule()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory()); - if (element.hasStartElement()) { - composeInstant("start", element.getStartElement()); - } - if (element.hasEndElement()) { - composeInstant("end", element.getEndElement()); - } - if (element.hasOverbookedElement()) { - composeBoolean("overbooked", element.getOverbookedElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeSpecimen(String name, Specimen element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSpecimenElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSpecimenElements(Specimen element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasAccessionIdentifier()) { - composeIdentifier("accessionIdentifier", element.getAccessionIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory()); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSubject()) { - composeReference("subject", element.getSubject()); - } - if (element.hasReceivedTimeElement()) { - composeDateTime("receivedTime", element.getReceivedTimeElement()); - } - if (element.hasParent()) { - for (Reference e : element.getParent()) - composeReference("parent", e); - } - if (element.hasRequest()) { - for (Reference e : element.getRequest()) - composeReference("request", e); - } - if (element.hasCollection()) { - composeSpecimenSpecimenCollectionComponent("collection", element.getCollection()); - } - if (element.hasProcessing()) { - for (Specimen.SpecimenProcessingComponent e : element.getProcessing()) - composeSpecimenSpecimenProcessingComponent("processing", e); - } - if (element.hasContainer()) { - for (Specimen.SpecimenContainerComponent e : element.getContainer()) - composeSpecimenSpecimenContainerComponent("container", e); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - protected void composeSpecimenSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSpecimenSpecimenCollectionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSpecimenSpecimenCollectionComponentElements(Specimen.SpecimenCollectionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCollector()) { - composeReference("collector", element.getCollector()); - } - if (element.hasCollected()) { - composeType("collected", element.getCollected()); - } if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasMethod()) { - composeCodeableConcept("method", element.getMethod()); - } - if (element.hasBodySite()) { - composeCodeableConcept("bodySite", element.getBodySite()); - } - } - - protected void composeSpecimenSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSpecimenSpecimenProcessingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSpecimenSpecimenProcessingComponentElements(Specimen.SpecimenProcessingComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasProcedure()) { - composeCodeableConcept("procedure", element.getProcedure()); - } - if (element.hasAdditive()) { - for (Reference e : element.getAdditive()) - composeReference("additive", e); - } - if (element.hasTime()) { - composeType("time", element.getTime()); - } } - - protected void composeSpecimenSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSpecimenSpecimenContainerComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSpecimenSpecimenContainerComponentElements(Specimen.SpecimenContainerComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasCapacity()) { - composeSimpleQuantity("capacity", element.getCapacity()); - } - if (element.hasSpecimenQuantity()) { - composeSimpleQuantity("specimenQuantity", element.getSpecimenQuantity()); - } - if (element.hasAdditive()) { - composeType("additive", element.getAdditive()); - } } - - protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureDefinitionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureDefinitionElements(StructureDefinition element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasKeyword()) { - for (Coding e : element.getKeyword()) - composeCoding("keyword", e); - } - if (element.hasFhirVersionElement()) { - composeId("fhirVersion", element.getFhirVersionElement()); - } - if (element.hasMapping()) { - for (StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping()) - composeStructureDefinitionStructureDefinitionMappingComponent("mapping", e); - } - if (element.hasKindElement()) - composeEnumeration("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory()); - if (element.hasAbstractElement()) { - composeBoolean("abstract", element.getAbstractElement()); - } - if (element.hasContextTypeElement()) - composeEnumeration("contextType", element.getContextTypeElement(), new StructureDefinition.ExtensionContextEnumFactory()); - if (element.hasContext()) { - for (StringType e : element.getContext()) - composeString("context", e); - } - if (element.hasContextInvariant()) { - for (StringType e : element.getContextInvariant()) - composeString("contextInvariant", e); - } - if (element.hasTypeElement()) { - composeCode("type", element.getTypeElement()); - } - if (element.hasBaseDefinitionElement()) { - composeUri("baseDefinition", element.getBaseDefinitionElement()); - } - if (element.hasDerivationElement()) - composeEnumeration("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory()); - if (element.hasSnapshot()) { - composeStructureDefinitionStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot()); - } - if (element.hasDifferential()) { - composeStructureDefinitionStructureDefinitionDifferentialComponent("differential", element.getDifferential()); - } - } - - protected void composeStructureDefinitionStructureDefinitionMappingComponent(String name, StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureDefinitionStructureDefinitionMappingComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureDefinitionStructureDefinitionMappingComponentElements(StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentityElement()) { - composeId("identity", element.getIdentityElement()); - } - if (element.hasUriElement()) { - composeUri("uri", element.getUriElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasCommentElement()) { - composeString("comment", element.getCommentElement()); - } - } - - protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(String name, StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureDefinitionStructureDefinitionSnapshotComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureDefinitionStructureDefinitionSnapshotComponentElements(StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasElement()) { - for (ElementDefinition e : element.getElement()) - composeElementDefinition("element", e); - } - } - - protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(String name, StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureDefinitionStructureDefinitionDifferentialComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureDefinitionStructureDefinitionDifferentialComponentElements(StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasElement()) { - for (ElementDefinition e : element.getElement()) - composeElementDefinition("element", e); - } - } - - protected void composeStructureMap(String name, StructureMap element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapElements(StructureMap element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasStructure()) { - for (StructureMap.StructureMapStructureComponent e : element.getStructure()) - composeStructureMapStructureMapStructureComponent("structure", e); - } - if (element.hasImport()) { - for (UriType e : element.getImport()) - composeUri("import", e); - } - if (element.hasGroup()) { - for (StructureMap.StructureMapGroupComponent e : element.getGroup()) - composeStructureMapStructureMapGroupComponent("group", e); - } - } - - protected void composeStructureMapStructureMapStructureComponent(String name, StructureMap.StructureMapStructureComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapStructureComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapStructureComponentElements(StructureMap.StructureMapStructureComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory()); - if (element.hasAliasElement()) { - composeString("alias", element.getAliasElement()); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeStructureMapStructureMapGroupComponent(String name, StructureMap.StructureMapGroupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupComponentElements(StructureMap.StructureMapGroupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeId("name", element.getNameElement()); - } - if (element.hasExtendsElement()) { - composeId("extends", element.getExtendsElement()); - } - if (element.hasTypeModeElement()) - composeEnumeration("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - if (element.hasInput()) { - for (StructureMap.StructureMapGroupInputComponent e : element.getInput()) - composeStructureMapStructureMapGroupInputComponent("input", e); - } - if (element.hasRule()) { - for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) - composeStructureMapStructureMapGroupRuleComponent("rule", e); - } - } - - protected void composeStructureMapStructureMapGroupInputComponent(String name, StructureMap.StructureMapGroupInputComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupInputComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupInputComponentElements(StructureMap.StructureMapGroupInputComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeId("name", element.getNameElement()); - } - if (element.hasTypeElement()) { - composeString("type", element.getTypeElement()); - } - if (element.hasModeElement()) - composeEnumeration("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory()); - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeStructureMapStructureMapGroupRuleComponent(String name, StructureMap.StructureMapGroupRuleComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupRuleComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupRuleComponentElements(StructureMap.StructureMapGroupRuleComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeId("name", element.getNameElement()); - } - if (element.hasSource()) { - for (StructureMap.StructureMapGroupRuleSourceComponent e : element.getSource()) - composeStructureMapStructureMapGroupRuleSourceComponent("source", e); - } - if (element.hasTarget()) { - for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget()) - composeStructureMapStructureMapGroupRuleTargetComponent("target", e); - } - if (element.hasRule()) { - for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) - composeStructureMapStructureMapGroupRuleComponent("rule", e); - } - if (element.hasDependent()) { - for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent()) - composeStructureMapStructureMapGroupRuleDependentComponent("dependent", e); - } - if (element.hasDocumentationElement()) { - composeString("documentation", element.getDocumentationElement()); - } - } - - protected void composeStructureMapStructureMapGroupRuleSourceComponent(String name, StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupRuleSourceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupRuleSourceComponentElements(StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContextElement()) { - composeId("context", element.getContextElement()); - } - if (element.hasMinElement()) { - composeInteger("min", element.getMinElement()); - } - if (element.hasMaxElement()) { - composeString("max", element.getMaxElement()); - } - if (element.hasTypeElement()) { - composeString("type", element.getTypeElement()); - } - if (element.hasDefaultValue()) { - composeType("defaultValue", element.getDefaultValue()); - } if (element.hasElementElement()) { - composeString("element", element.getElementElement()); - } - if (element.hasListModeElement()) - composeEnumeration("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory()); - if (element.hasVariableElement()) { - composeId("variable", element.getVariableElement()); - } - if (element.hasConditionElement()) { - composeString("condition", element.getConditionElement()); - } - if (element.hasCheckElement()) { - composeString("check", element.getCheckElement()); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetComponent(String name, StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupRuleTargetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetComponentElements(StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasContextElement()) { - composeId("context", element.getContextElement()); - } - if (element.hasContextTypeElement()) - composeEnumeration("contextType", element.getContextTypeElement(), new StructureMap.StructureMapContextTypeEnumFactory()); - if (element.hasElementElement()) { - composeString("element", element.getElementElement()); - } - if (element.hasVariableElement()) { - composeId("variable", element.getVariableElement()); - } - if (element.hasListMode()) - for (Enumeration e : element.getListMode()) - composeEnumeration("listMode", e, new StructureMap.StructureMapTargetListModeEnumFactory()); - if (element.hasListRuleIdElement()) { - composeId("listRuleId", element.getListRuleIdElement()); - } - if (element.hasTransformElement()) - composeEnumeration("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory()); - if (element.hasParameter()) { - for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter()) - composeStructureMapStructureMapGroupRuleTargetParameterComponent("parameter", e); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupRuleTargetParameterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupRuleTargetParameterComponentElements(StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeStructureMapStructureMapGroupRuleDependentComponent(String name, StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeStructureMapStructureMapGroupRuleDependentComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeStructureMapStructureMapGroupRuleDependentComponentElements(StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeId("name", element.getNameElement()); - } - if (element.hasVariable()) { - for (StringType e : element.getVariable()) - composeString("variable", e); - } - } - - protected void composeSubscription(String name, Subscription element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSubscriptionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSubscriptionElements(Subscription element) throws IOException { - composeDomainResourceElements(element); - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory()); - if (element.hasContact()) { - for (ContactPoint e : element.getContact()) - composeContactPoint("contact", e); - } - if (element.hasEndElement()) { - composeInstant("end", element.getEndElement()); - } - if (element.hasReasonElement()) { - composeString("reason", element.getReasonElement()); - } - if (element.hasCriteriaElement()) { - composeString("criteria", element.getCriteriaElement()); - } - if (element.hasErrorElement()) { - composeString("error", element.getErrorElement()); - } - if (element.hasChannel()) { - composeSubscriptionSubscriptionChannelComponent("channel", element.getChannel()); - } - if (element.hasTag()) { - for (Coding e : element.getTag()) - composeCoding("tag", e); - } - } - - protected void composeSubscriptionSubscriptionChannelComponent(String name, Subscription.SubscriptionChannelComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSubscriptionSubscriptionChannelComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSubscriptionSubscriptionChannelComponentElements(Subscription.SubscriptionChannelComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory()); - if (element.hasEndpointElement()) { - composeUri("endpoint", element.getEndpointElement()); - } - if (element.hasPayloadElement()) { - composeString("payload", element.getPayloadElement()); - } - if (element.hasHeader()) { - for (StringType e : element.getHeader()) - composeString("header", e); - } - } - - protected void composeSubstance(String name, Substance element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSubstanceElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSubstanceElements(Substance element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory()); - if (element.hasCategory()) { - for (CodeableConcept e : element.getCategory()) - composeCodeableConcept("category", e); - } - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasInstance()) { - for (Substance.SubstanceInstanceComponent e : element.getInstance()) - composeSubstanceSubstanceInstanceComponent("instance", e); - } - if (element.hasIngredient()) { - for (Substance.SubstanceIngredientComponent e : element.getIngredient()) - composeSubstanceSubstanceIngredientComponent("ingredient", e); - } - } - - protected void composeSubstanceSubstanceInstanceComponent(String name, Substance.SubstanceInstanceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSubstanceSubstanceInstanceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSubstanceSubstanceInstanceComponentElements(Substance.SubstanceInstanceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasExpiryElement()) { - composeDateTime("expiry", element.getExpiryElement()); - } - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - } - - protected void composeSubstanceSubstanceIngredientComponent(String name, Substance.SubstanceIngredientComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSubstanceSubstanceIngredientComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSubstanceSubstanceIngredientComponentElements(Substance.SubstanceIngredientComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasQuantity()) { - composeRatio("quantity", element.getQuantity()); - } - if (element.hasSubstance()) { - composeType("substance", element.getSubstance()); - } } - - protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSupplyDeliveryElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSupplyDeliveryElements(SupplyDelivery element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory()); - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasSuppliedItem()) { - composeSupplyDeliverySupplyDeliverySuppliedItemComponent("suppliedItem", element.getSuppliedItem()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasSupplier()) { - composeReference("supplier", element.getSupplier()); - } - if (element.hasDestination()) { - composeReference("destination", element.getDestination()); - } - if (element.hasReceiver()) { - for (Reference e : element.getReceiver()) - composeReference("receiver", e); - } - } - - protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSupplyDeliverySupplyDeliverySuppliedItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponentElements(SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasQuantity()) { - composeSimpleQuantity("quantity", element.getQuantity()); - } - if (element.hasItem()) { - composeType("item", element.getItem()); - } } - - protected void composeSupplyRequest(String name, SupplyRequest element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeSupplyRequestElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSupplyRequestElements(SupplyRequest element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory()); - if (element.hasCategory()) { - composeCodeableConcept("category", element.getCategory()); - } - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory()); - if (element.hasOrderedItem()) { - composeSupplyRequestSupplyRequestOrderedItemComponent("orderedItem", element.getOrderedItem()); - } - if (element.hasOccurrence()) { - composeType("occurrence", element.getOccurrence()); - } if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasRequester()) { - composeSupplyRequestSupplyRequestRequesterComponent("requester", element.getRequester()); - } - if (element.hasSupplier()) { - for (Reference e : element.getSupplier()) - composeReference("supplier", e); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } if (element.hasDeliverFrom()) { - composeReference("deliverFrom", element.getDeliverFrom()); - } - if (element.hasDeliverTo()) { - composeReference("deliverTo", element.getDeliverTo()); - } - } - - protected void composeSupplyRequestSupplyRequestOrderedItemComponent(String name, SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSupplyRequestSupplyRequestOrderedItemComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSupplyRequestSupplyRequestOrderedItemComponentElements(SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasQuantity()) { - composeQuantity("quantity", element.getQuantity()); - } - if (element.hasItem()) { - composeType("item", element.getItem()); - } } - - protected void composeSupplyRequestSupplyRequestRequesterComponent(String name, SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeSupplyRequestSupplyRequestRequesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeSupplyRequestSupplyRequestRequesterComponentElements(SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeTask(String name, Task element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeTaskElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTaskElements(Task element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasDefinition()) { - composeType("definition", element.getDefinition()); - } if (element.hasBasedOn()) { - for (Reference e : element.getBasedOn()) - composeReference("basedOn", e); - } - if (element.hasGroupIdentifier()) { - composeIdentifier("groupIdentifier", element.getGroupIdentifier()); - } - if (element.hasPartOf()) { - for (Reference e : element.getPartOf()) - composeReference("partOf", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Task.TaskStatusEnumFactory()); - if (element.hasStatusReason()) { - composeCodeableConcept("statusReason", element.getStatusReason()); - } - if (element.hasBusinessStatus()) { - composeCodeableConcept("businessStatus", element.getBusinessStatus()); - } - if (element.hasIntentElement()) - composeEnumeration("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory()); - if (element.hasPriorityElement()) - composeEnumeration("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory()); - if (element.hasCode()) { - composeCodeableConcept("code", element.getCode()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasFocus()) { - composeReference("focus", element.getFocus()); - } - if (element.hasFor()) { - composeReference("for", element.getFor()); - } - if (element.hasContext()) { - composeReference("context", element.getContext()); - } - if (element.hasExecutionPeriod()) { - composePeriod("executionPeriod", element.getExecutionPeriod()); - } - if (element.hasAuthoredOnElement()) { - composeDateTime("authoredOn", element.getAuthoredOnElement()); - } - if (element.hasLastModifiedElement()) { - composeDateTime("lastModified", element.getLastModifiedElement()); - } - if (element.hasRequester()) { - composeTaskTaskRequesterComponent("requester", element.getRequester()); - } - if (element.hasPerformerType()) { - for (CodeableConcept e : element.getPerformerType()) - composeCodeableConcept("performerType", e); - } - if (element.hasOwner()) { - composeReference("owner", element.getOwner()); - } - if (element.hasReason()) { - composeCodeableConcept("reason", element.getReason()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - if (element.hasRelevantHistory()) { - for (Reference e : element.getRelevantHistory()) - composeReference("relevantHistory", e); - } - if (element.hasRestriction()) { - composeTaskTaskRestrictionComponent("restriction", element.getRestriction()); - } - if (element.hasInput()) { - for (Task.ParameterComponent e : element.getInput()) - composeTaskParameterComponent("input", e); - } - if (element.hasOutput()) { - for (Task.TaskOutputComponent e : element.getOutput()) - composeTaskTaskOutputComponent("output", e); - } - } - - protected void composeTaskTaskRequesterComponent(String name, Task.TaskRequesterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTaskTaskRequesterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTaskTaskRequesterComponentElements(Task.TaskRequesterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAgent()) { - composeReference("agent", element.getAgent()); - } - if (element.hasOnBehalfOf()) { - composeReference("onBehalfOf", element.getOnBehalfOf()); - } - } - - protected void composeTaskTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTaskTaskRestrictionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTaskTaskRestrictionComponentElements(Task.TaskRestrictionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRepetitionsElement()) { - composePositiveInt("repetitions", element.getRepetitionsElement()); - } - if (element.hasPeriod()) { - composePeriod("period", element.getPeriod()); - } - if (element.hasRecipient()) { - for (Reference e : element.getRecipient()) - composeReference("recipient", e); - } - } - - protected void composeTaskParameterComponent(String name, Task.ParameterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTaskParameterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTaskParameterComponentElements(Task.ParameterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeTaskTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTaskTaskOutputComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTaskTaskOutputComponentElements(Task.TaskOutputComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCodeableConcept("type", element.getType()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeTestReport(String name, TestReport element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportElements(TestReport element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory()); - if (element.hasTestScript()) { - composeReference("testScript", element.getTestScript()); - } - if (element.hasResultElement()) - composeEnumeration("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory()); - if (element.hasScoreElement()) { - composeDecimal("score", element.getScoreElement()); - } - if (element.hasTesterElement()) { - composeString("tester", element.getTesterElement()); - } - if (element.hasIssuedElement()) { - composeDateTime("issued", element.getIssuedElement()); - } - if (element.hasParticipant()) { - for (TestReport.TestReportParticipantComponent e : element.getParticipant()) - composeTestReportTestReportParticipantComponent("participant", e); - } - if (element.hasSetup()) { - composeTestReportTestReportSetupComponent("setup", element.getSetup()); - } - if (element.hasTest()) { - for (TestReport.TestReportTestComponent e : element.getTest()) - composeTestReportTestReportTestComponent("test", e); - } - if (element.hasTeardown()) { - composeTestReportTestReportTeardownComponent("teardown", element.getTeardown()); - } - } - - protected void composeTestReportTestReportParticipantComponent(String name, TestReport.TestReportParticipantComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportTestReportParticipantComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportTestReportParticipantComponentElements(TestReport.TestReportParticipantComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasTypeElement()) - composeEnumeration("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory()); - if (element.hasUriElement()) { - composeUri("uri", element.getUriElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - } - - protected void composeTestReportTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportTestReportSetupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportTestReportSetupComponentElements(TestReport.TestReportSetupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAction()) { - for (TestReport.SetupActionComponent e : element.getAction()) - composeTestReportSetupActionComponent("action", e); - } - } - - protected void composeTestReportSetupActionComponent(String name, TestReport.SetupActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportSetupActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportSetupActionComponentElements(TestReport.SetupActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOperation()) { - composeTestReportSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestReportSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestReportSetupActionOperationComponent(String name, TestReport.SetupActionOperationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportSetupActionOperationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportSetupActionOperationComponentElements(TestReport.SetupActionOperationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasResultElement()) - composeEnumeration("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory()); - if (element.hasMessageElement()) { - composeMarkdown("message", element.getMessageElement()); - } - if (element.hasDetailElement()) { - composeUri("detail", element.getDetailElement()); - } - } - - protected void composeTestReportSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportSetupActionAssertComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportSetupActionAssertComponentElements(TestReport.SetupActionAssertComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasResultElement()) - composeEnumeration("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory()); - if (element.hasMessageElement()) { - composeMarkdown("message", element.getMessageElement()); - } - if (element.hasDetailElement()) { - composeString("detail", element.getDetailElement()); - } - } - - protected void composeTestReportTestReportTestComponent(String name, TestReport.TestReportTestComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportTestReportTestComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportTestReportTestComponentElements(TestReport.TestReportTestComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasAction()) { - for (TestReport.TestActionComponent e : element.getAction()) - composeTestReportTestActionComponent("action", e); - } - } - - protected void composeTestReportTestActionComponent(String name, TestReport.TestActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportTestActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportTestActionComponentElements(TestReport.TestActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOperation()) { - composeTestReportSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestReportSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestReportTestReportTeardownComponent(String name, TestReport.TestReportTeardownComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportTestReportTeardownComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportTestReportTeardownComponentElements(TestReport.TestReportTeardownComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAction()) { - for (TestReport.TeardownActionComponent e : element.getAction()) - composeTestReportTeardownActionComponent("action", e); - } - } - - protected void composeTestReportTeardownActionComponent(String name, TestReport.TeardownActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestReportTeardownActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestReportTeardownActionComponentElements(TestReport.TeardownActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOperation()) { - composeTestReportSetupActionOperationComponent("operation", element.getOperation()); - } - } - - protected void composeTestScript(String name, TestScript element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptElements(TestScript element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - composeIdentifier("identifier", element.getIdentifier()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasOrigin()) { - for (TestScript.TestScriptOriginComponent e : element.getOrigin()) - composeTestScriptTestScriptOriginComponent("origin", e); - } - if (element.hasDestination()) { - for (TestScript.TestScriptDestinationComponent e : element.getDestination()) - composeTestScriptTestScriptDestinationComponent("destination", e); - } - if (element.hasMetadata()) { - composeTestScriptTestScriptMetadataComponent("metadata", element.getMetadata()); - } - if (element.hasFixture()) { - for (TestScript.TestScriptFixtureComponent e : element.getFixture()) - composeTestScriptTestScriptFixtureComponent("fixture", e); - } - if (element.hasProfile()) { - for (Reference e : element.getProfile()) - composeReference("profile", e); - } - if (element.hasVariable()) { - for (TestScript.TestScriptVariableComponent e : element.getVariable()) - composeTestScriptTestScriptVariableComponent("variable", e); - } - if (element.hasRule()) { - for (TestScript.TestScriptRuleComponent e : element.getRule()) - composeTestScriptTestScriptRuleComponent("rule", e); - } - if (element.hasRuleset()) { - for (TestScript.TestScriptRulesetComponent e : element.getRuleset()) - composeTestScriptTestScriptRulesetComponent("ruleset", e); - } - if (element.hasSetup()) { - composeTestScriptTestScriptSetupComponent("setup", element.getSetup()); - } - if (element.hasTest()) { - for (TestScript.TestScriptTestComponent e : element.getTest()) - composeTestScriptTestScriptTestComponent("test", e); - } - if (element.hasTeardown()) { - composeTestScriptTestScriptTeardownComponent("teardown", element.getTeardown()); - } - } - - protected void composeTestScriptTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptOriginComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptOriginComponentElements(TestScript.TestScriptOriginComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIndexElement()) { - composeInteger("index", element.getIndexElement()); - } - if (element.hasProfile()) { - composeCoding("profile", element.getProfile()); - } - } - - protected void composeTestScriptTestScriptDestinationComponent(String name, TestScript.TestScriptDestinationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptDestinationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptDestinationComponentElements(TestScript.TestScriptDestinationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIndexElement()) { - composeInteger("index", element.getIndexElement()); - } - if (element.hasProfile()) { - composeCoding("profile", element.getProfile()); - } - } - - protected void composeTestScriptTestScriptMetadataComponent(String name, TestScript.TestScriptMetadataComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptMetadataComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptMetadataComponentElements(TestScript.TestScriptMetadataComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLink()) { - for (TestScript.TestScriptMetadataLinkComponent e : element.getLink()) - composeTestScriptTestScriptMetadataLinkComponent("link", e); - } - if (element.hasCapability()) { - for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability()) - composeTestScriptTestScriptMetadataCapabilityComponent("capability", e); - } - } - - protected void composeTestScriptTestScriptMetadataLinkComponent(String name, TestScript.TestScriptMetadataLinkComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptMetadataLinkComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptMetadataLinkComponentElements(TestScript.TestScriptMetadataLinkComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - } - - protected void composeTestScriptTestScriptMetadataCapabilityComponent(String name, TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptMetadataCapabilityComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptMetadataCapabilityComponentElements(TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRequiredElement()) { - composeBoolean("required", element.getRequiredElement()); - } - if (element.hasValidatedElement()) { - composeBoolean("validated", element.getValidatedElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasOrigin()) { - for (IntegerType e : element.getOrigin()) - composeInteger("origin", e); - } - if (element.hasDestinationElement()) { - composeInteger("destination", element.getDestinationElement()); - } - if (element.hasLink()) { - for (UriType e : element.getLink()) - composeUri("link", e); - } - if (element.hasCapabilities()) { - composeReference("capabilities", element.getCapabilities()); - } - } - - protected void composeTestScriptTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptFixtureComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptFixtureComponentElements(TestScript.TestScriptFixtureComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAutocreateElement()) { - composeBoolean("autocreate", element.getAutocreateElement()); - } - if (element.hasAutodeleteElement()) { - composeBoolean("autodelete", element.getAutodeleteElement()); - } - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - } - - protected void composeTestScriptTestScriptVariableComponent(String name, TestScript.TestScriptVariableComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptVariableComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptVariableComponentElements(TestScript.TestScriptVariableComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDefaultValueElement()) { - composeString("defaultValue", element.getDefaultValueElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - if (element.hasHeaderFieldElement()) { - composeString("headerField", element.getHeaderFieldElement()); - } - if (element.hasHintElement()) { - composeString("hint", element.getHintElement()); - } - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasSourceIdElement()) { - composeId("sourceId", element.getSourceIdElement()); - } - } - - protected void composeTestScriptTestScriptRuleComponent(String name, TestScript.TestScriptRuleComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptRuleComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptRuleComponentElements(TestScript.TestScriptRuleComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - if (element.hasParam()) { - for (TestScript.RuleParamComponent e : element.getParam()) - composeTestScriptRuleParamComponent("param", e); - } - } - - protected void composeTestScriptRuleParamComponent(String name, TestScript.RuleParamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptRuleParamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptRuleParamComponentElements(TestScript.RuleParamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeTestScriptTestScriptRulesetComponent(String name, TestScript.TestScriptRulesetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptRulesetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptRulesetComponentElements(TestScript.TestScriptRulesetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasResource()) { - composeReference("resource", element.getResource()); - } - if (element.hasRule()) { - for (TestScript.RulesetRuleComponent e : element.getRule()) - composeTestScriptRulesetRuleComponent("rule", e); - } - } - - protected void composeTestScriptRulesetRuleComponent(String name, TestScript.RulesetRuleComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptRulesetRuleComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptRulesetRuleComponentElements(TestScript.RulesetRuleComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRuleIdElement()) { - composeId("ruleId", element.getRuleIdElement()); - } - if (element.hasParam()) { - for (TestScript.RulesetRuleParamComponent e : element.getParam()) - composeTestScriptRulesetRuleParamComponent("param", e); - } - } - - protected void composeTestScriptRulesetRuleParamComponent(String name, TestScript.RulesetRuleParamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptRulesetRuleParamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptRulesetRuleParamComponentElements(TestScript.RulesetRuleParamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeTestScriptTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptSetupComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptSetupComponentElements(TestScript.TestScriptSetupComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAction()) { - for (TestScript.SetupActionComponent e : element.getAction()) - composeTestScriptSetupActionComponent("action", e); - } - } - - protected void composeTestScriptSetupActionComponent(String name, TestScript.SetupActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptSetupActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptSetupActionComponentElements(TestScript.SetupActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOperation()) { - composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestScriptSetupActionOperationComponent(String name, TestScript.SetupActionOperationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptSetupActionOperationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptSetupActionOperationComponentElements(TestScript.SetupActionOperationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasType()) { - composeCoding("type", element.getType()); - } - if (element.hasResourceElement()) { - composeCode("resource", element.getResourceElement()); - } - if (element.hasLabelElement()) { - composeString("label", element.getLabelElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasAcceptElement()) - composeEnumeration("accept", element.getAcceptElement(), new TestScript.ContentTypeEnumFactory()); - if (element.hasContentTypeElement()) - composeEnumeration("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory()); - if (element.hasDestinationElement()) { - composeInteger("destination", element.getDestinationElement()); - } - if (element.hasEncodeRequestUrlElement()) { - composeBoolean("encodeRequestUrl", element.getEncodeRequestUrlElement()); - } - if (element.hasOriginElement()) { - composeInteger("origin", element.getOriginElement()); - } - if (element.hasParamsElement()) { - composeString("params", element.getParamsElement()); - } - if (element.hasRequestHeader()) { - for (TestScript.SetupActionOperationRequestHeaderComponent e : element.getRequestHeader()) - composeTestScriptSetupActionOperationRequestHeaderComponent("requestHeader", e); - } - if (element.hasRequestIdElement()) { - composeId("requestId", element.getRequestIdElement()); - } - if (element.hasResponseIdElement()) { - composeId("responseId", element.getResponseIdElement()); - } - if (element.hasSourceIdElement()) { - composeId("sourceId", element.getSourceIdElement()); - } - if (element.hasTargetIdElement()) { - composeId("targetId", element.getTargetIdElement()); - } - if (element.hasUrlElement()) { - composeString("url", element.getUrlElement()); - } - } - - protected void composeTestScriptSetupActionOperationRequestHeaderComponent(String name, TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptSetupActionOperationRequestHeaderComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptSetupActionOperationRequestHeaderComponentElements(TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasFieldElement()) { - composeString("field", element.getFieldElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeTestScriptSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptSetupActionAssertComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptSetupActionAssertComponentElements(TestScript.SetupActionAssertComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLabelElement()) { - composeString("label", element.getLabelElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasDirectionElement()) - composeEnumeration("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory()); - if (element.hasCompareToSourceIdElement()) { - composeString("compareToSourceId", element.getCompareToSourceIdElement()); - } - if (element.hasCompareToSourceExpressionElement()) { - composeString("compareToSourceExpression", element.getCompareToSourceExpressionElement()); - } - if (element.hasCompareToSourcePathElement()) { - composeString("compareToSourcePath", element.getCompareToSourcePathElement()); - } - if (element.hasContentTypeElement()) - composeEnumeration("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory()); - if (element.hasExpressionElement()) { - composeString("expression", element.getExpressionElement()); - } - if (element.hasHeaderFieldElement()) { - composeString("headerField", element.getHeaderFieldElement()); - } - if (element.hasMinimumIdElement()) { - composeString("minimumId", element.getMinimumIdElement()); - } - if (element.hasNavigationLinksElement()) { - composeBoolean("navigationLinks", element.getNavigationLinksElement()); - } - if (element.hasOperatorElement()) - composeEnumeration("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory()); - if (element.hasPathElement()) { - composeString("path", element.getPathElement()); - } - if (element.hasRequestMethodElement()) - composeEnumeration("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory()); - if (element.hasRequestURLElement()) { - composeString("requestURL", element.getRequestURLElement()); - } - if (element.hasResourceElement()) { - composeCode("resource", element.getResourceElement()); - } - if (element.hasResponseElement()) - composeEnumeration("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory()); - if (element.hasResponseCodeElement()) { - composeString("responseCode", element.getResponseCodeElement()); - } - if (element.hasRule()) { - composeTestScriptActionAssertRuleComponent("rule", element.getRule()); - } - if (element.hasRuleset()) { - composeTestScriptActionAssertRulesetComponent("ruleset", element.getRuleset()); - } - if (element.hasSourceIdElement()) { - composeId("sourceId", element.getSourceIdElement()); - } - if (element.hasValidateProfileIdElement()) { - composeId("validateProfileId", element.getValidateProfileIdElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - if (element.hasWarningOnlyElement()) { - composeBoolean("warningOnly", element.getWarningOnlyElement()); - } - } - - protected void composeTestScriptActionAssertRuleComponent(String name, TestScript.ActionAssertRuleComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptActionAssertRuleComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptActionAssertRuleComponentElements(TestScript.ActionAssertRuleComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRuleIdElement()) { - composeId("ruleId", element.getRuleIdElement()); - } - if (element.hasParam()) { - for (TestScript.ActionAssertRuleParamComponent e : element.getParam()) - composeTestScriptActionAssertRuleParamComponent("param", e); - } - } - - protected void composeTestScriptActionAssertRuleParamComponent(String name, TestScript.ActionAssertRuleParamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptActionAssertRuleParamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptActionAssertRuleParamComponentElements(TestScript.ActionAssertRuleParamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeTestScriptActionAssertRulesetComponent(String name, TestScript.ActionAssertRulesetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptActionAssertRulesetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptActionAssertRulesetComponentElements(TestScript.ActionAssertRulesetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRulesetIdElement()) { - composeId("rulesetId", element.getRulesetIdElement()); - } - if (element.hasRule()) { - for (TestScript.ActionAssertRulesetRuleComponent e : element.getRule()) - composeTestScriptActionAssertRulesetRuleComponent("rule", e); - } - } - - protected void composeTestScriptActionAssertRulesetRuleComponent(String name, TestScript.ActionAssertRulesetRuleComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptActionAssertRulesetRuleComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptActionAssertRulesetRuleComponentElements(TestScript.ActionAssertRulesetRuleComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasRuleIdElement()) { - composeId("ruleId", element.getRuleIdElement()); - } - if (element.hasParam()) { - for (TestScript.ActionAssertRulesetRuleParamComponent e : element.getParam()) - composeTestScriptActionAssertRulesetRuleParamComponent("param", e); - } - } - - protected void composeTestScriptActionAssertRulesetRuleParamComponent(String name, TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptActionAssertRulesetRuleParamComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptActionAssertRulesetRuleParamComponentElements(TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeTestScriptTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptTestComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptTestComponentElements(TestScript.TestScriptTestComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasDescriptionElement()) { - composeString("description", element.getDescriptionElement()); - } - if (element.hasAction()) { - for (TestScript.TestActionComponent e : element.getAction()) - composeTestScriptTestActionComponent("action", e); - } - } - - protected void composeTestScriptTestActionComponent(String name, TestScript.TestActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestActionComponentElements(TestScript.TestActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOperation()) { - composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); - } - if (element.hasAssert()) { - composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); - } - } - - protected void composeTestScriptTestScriptTeardownComponent(String name, TestScript.TestScriptTeardownComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTestScriptTeardownComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTestScriptTeardownComponentElements(TestScript.TestScriptTeardownComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasAction()) { - for (TestScript.TeardownActionComponent e : element.getAction()) - composeTestScriptTeardownActionComponent("action", e); - } - } - - protected void composeTestScriptTeardownActionComponent(String name, TestScript.TeardownActionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeTestScriptTeardownActionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeTestScriptTeardownActionComponentElements(TestScript.TeardownActionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasOperation()) { - composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); - } - } - - protected void composeValueSet(String name, ValueSet element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetElements(ValueSet element) throws IOException { - composeDomainResourceElements(element); - if (element.hasUrlElement()) { - composeUri("url", element.getUrlElement()); - } - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasTitleElement()) { - composeString("title", element.getTitleElement()); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); - if (element.hasExperimentalElement()) { - composeBoolean("experimental", element.getExperimentalElement()); - } - if (element.hasDateElement()) { - composeDateTime("date", element.getDateElement()); - } - if (element.hasPublisherElement()) { - composeString("publisher", element.getPublisherElement()); - } - if (element.hasContact()) { - for (ContactDetail e : element.getContact()) - composeContactDetail("contact", e); - } - if (element.hasDescriptionElement()) { - composeMarkdown("description", element.getDescriptionElement()); - } - if (element.hasUseContext()) { - for (UsageContext e : element.getUseContext()) - composeUsageContext("useContext", e); - } - if (element.hasJurisdiction()) { - for (CodeableConcept e : element.getJurisdiction()) - composeCodeableConcept("jurisdiction", e); - } - if (element.hasImmutableElement()) { - composeBoolean("immutable", element.getImmutableElement()); - } - if (element.hasPurposeElement()) { - composeMarkdown("purpose", element.getPurposeElement()); - } - if (element.hasCopyrightElement()) { - composeMarkdown("copyright", element.getCopyrightElement()); - } - if (element.hasExtensibleElement()) { - composeBoolean("extensible", element.getExtensibleElement()); - } - if (element.hasCompose()) { - composeValueSetValueSetComposeComponent("compose", element.getCompose()); - } - if (element.hasExpansion()) { - composeValueSetValueSetExpansionComponent("expansion", element.getExpansion()); - } - } - - protected void composeValueSetValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetValueSetComposeComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetValueSetComposeComponentElements(ValueSet.ValueSetComposeComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLockedDateElement()) { - composeDate("lockedDate", element.getLockedDateElement()); - } - if (element.hasInactiveElement()) { - composeBoolean("inactive", element.getInactiveElement()); - } - if (element.hasInclude()) { - for (ValueSet.ConceptSetComponent e : element.getInclude()) - composeValueSetConceptSetComponent("include", e); - } - if (element.hasExclude()) { - for (ValueSet.ConceptSetComponent e : element.getExclude()) - composeValueSetConceptSetComponent("exclude", e); - } - } - - protected void composeValueSetConceptSetComponent(String name, ValueSet.ConceptSetComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetConceptSetComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetConceptSetComponentElements(ValueSet.ConceptSetComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasConcept()) { - for (ValueSet.ConceptReferenceComponent e : element.getConcept()) - composeValueSetConceptReferenceComponent("concept", e); - } - if (element.hasFilter()) { - for (ValueSet.ConceptSetFilterComponent e : element.getFilter()) - composeValueSetConceptSetFilterComponent("filter", e); - } - if (element.hasValueSet()) { - for (UriType e : element.getValueSet()) - composeUri("valueSet", e); - } - } - - protected void composeValueSetConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetConceptReferenceComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetConceptReferenceComponentElements(ValueSet.ConceptReferenceComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasDesignation()) { - for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) - composeValueSetConceptReferenceDesignationComponent("designation", e); - } - } - - protected void composeValueSetConceptReferenceDesignationComponent(String name, ValueSet.ConceptReferenceDesignationComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetConceptReferenceDesignationComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetConceptReferenceDesignationComponentElements(ValueSet.ConceptReferenceDesignationComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasLanguageElement()) { - composeCode("language", element.getLanguageElement()); - } - if (element.hasUse()) { - composeCoding("use", element.getUse()); - } - if (element.hasValueElement()) { - composeString("value", element.getValueElement()); - } - } - - protected void composeValueSetConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetConceptSetFilterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetConceptSetFilterComponentElements(ValueSet.ConceptSetFilterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasPropertyElement()) { - composeCode("property", element.getPropertyElement()); - } - if (element.hasOpElement()) - composeEnumeration("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory()); - if (element.hasValueElement()) { - composeCode("value", element.getValueElement()); - } - } - - protected void composeValueSetValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetValueSetExpansionComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetValueSetExpansionComponentElements(ValueSet.ValueSetExpansionComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasIdentifierElement()) { - composeUri("identifier", element.getIdentifierElement()); - } - if (element.hasTimestampElement()) { - composeDateTime("timestamp", element.getTimestampElement()); - } - if (element.hasTotalElement()) { - composeInteger("total", element.getTotalElement()); - } - if (element.hasOffsetElement()) { - composeInteger("offset", element.getOffsetElement()); - } - if (element.hasParameter()) { - for (ValueSet.ValueSetExpansionParameterComponent e : element.getParameter()) - composeValueSetValueSetExpansionParameterComponent("parameter", e); - } - if (element.hasContains()) { - for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) - composeValueSetValueSetExpansionContainsComponent("contains", e); - } - } - - protected void composeValueSetValueSetExpansionParameterComponent(String name, ValueSet.ValueSetExpansionParameterComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetValueSetExpansionParameterComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetValueSetExpansionParameterComponentElements(ValueSet.ValueSetExpansionParameterComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasNameElement()) { - composeString("name", element.getNameElement()); - } - if (element.hasValue()) { - composeType("value", element.getValue()); - } } - - protected void composeValueSetValueSetExpansionContainsComponent(String name, ValueSet.ValueSetExpansionContainsComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeValueSetValueSetExpansionContainsComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeValueSetValueSetExpansionContainsComponentElements(ValueSet.ValueSetExpansionContainsComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasSystemElement()) { - composeUri("system", element.getSystemElement()); - } - if (element.hasAbstractElement()) { - composeBoolean("abstract", element.getAbstractElement()); - } - if (element.hasInactiveElement()) { - composeBoolean("inactive", element.getInactiveElement()); - } - if (element.hasVersionElement()) { - composeString("version", element.getVersionElement()); - } - if (element.hasCodeElement()) { - composeCode("code", element.getCodeElement()); - } - if (element.hasDisplayElement()) { - composeString("display", element.getDisplayElement()); - } - if (element.hasDesignation()) { - for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) - composeValueSetConceptReferenceDesignationComponent("designation", e); - } - if (element.hasContains()) { - for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) - composeValueSetValueSetExpansionContainsComponent("contains", e); - } - } - - protected void composeVisionPrescription(String name, VisionPrescription element) throws IOException { - if (element != null) { - composeDomainResourceAttributes(element); - xml.enter(FHIR_NS, name); - composeVisionPrescriptionElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeVisionPrescriptionElements(VisionPrescription element) throws IOException { - composeDomainResourceElements(element); - if (element.hasIdentifier()) { - for (Identifier e : element.getIdentifier()) - composeIdentifier("identifier", e); - } - if (element.hasStatusElement()) - composeEnumeration("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory()); - if (element.hasPatient()) { - composeReference("patient", element.getPatient()); - } - if (element.hasEncounter()) { - composeReference("encounter", element.getEncounter()); - } - if (element.hasDateWrittenElement()) { - composeDateTime("dateWritten", element.getDateWrittenElement()); - } - if (element.hasPrescriber()) { - composeReference("prescriber", element.getPrescriber()); - } - if (element.hasReason()) { - composeType("reason", element.getReason()); - } if (element.hasDispense()) { - for (VisionPrescription.VisionPrescriptionDispenseComponent e : element.getDispense()) - composeVisionPrescriptionVisionPrescriptionDispenseComponent("dispense", e); - } - } - - protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(String name, VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { - if (element != null) { - composeElementAttributes(element); - xml.enter(FHIR_NS, name); - composeVisionPrescriptionVisionPrescriptionDispenseComponentElements(element); - composeElementClose(element); - xml.exit(FHIR_NS, name); - } - } - - protected void composeVisionPrescriptionVisionPrescriptionDispenseComponentElements(VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { - composeBackboneElements(element); - if (element.hasProduct()) { - composeCodeableConcept("product", element.getProduct()); - } - if (element.hasEyeElement()) - composeEnumeration("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory()); - if (element.hasSphereElement()) { - composeDecimal("sphere", element.getSphereElement()); - } - if (element.hasCylinderElement()) { - composeDecimal("cylinder", element.getCylinderElement()); - } - if (element.hasAxisElement()) { - composeInteger("axis", element.getAxisElement()); - } - if (element.hasPrismElement()) { - composeDecimal("prism", element.getPrismElement()); - } - if (element.hasBaseElement()) - composeEnumeration("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory()); - if (element.hasAddElement()) { - composeDecimal("add", element.getAddElement()); - } - if (element.hasPowerElement()) { - composeDecimal("power", element.getPowerElement()); - } - if (element.hasBackCurveElement()) { - composeDecimal("backCurve", element.getBackCurveElement()); - } - if (element.hasDiameterElement()) { - composeDecimal("diameter", element.getDiameterElement()); - } - if (element.hasDuration()) { - composeSimpleQuantity("duration", element.getDuration()); - } - if (element.hasColorElement()) { - composeString("color", element.getColorElement()); - } - if (element.hasBrandElement()) { - composeString("brand", element.getBrandElement()); - } - if (element.hasNote()) { - for (Annotation e : element.getNote()) - composeAnnotation("note", e); - } - } - - @Override - protected void composeResource(Resource resource) throws IOException { - if (resource instanceof Parameters) - composeParameters("Parameters", (Parameters)resource); - else if (resource instanceof Account) - composeAccount("Account", (Account)resource); - else if (resource instanceof ActivityDefinition) - composeActivityDefinition("ActivityDefinition", (ActivityDefinition)resource); - else if (resource instanceof AdverseEvent) - composeAdverseEvent("AdverseEvent", (AdverseEvent)resource); - else if (resource instanceof AllergyIntolerance) - composeAllergyIntolerance("AllergyIntolerance", (AllergyIntolerance)resource); - else if (resource instanceof Appointment) - composeAppointment("Appointment", (Appointment)resource); - else if (resource instanceof AppointmentResponse) - composeAppointmentResponse("AppointmentResponse", (AppointmentResponse)resource); - else if (resource instanceof AuditEvent) - composeAuditEvent("AuditEvent", (AuditEvent)resource); - else if (resource instanceof Basic) - composeBasic("Basic", (Basic)resource); - else if (resource instanceof Binary) - composeBinary("Binary", (Binary)resource); - else if (resource instanceof BodyStructure) - composeBodyStructure("BodyStructure", (BodyStructure)resource); - else if (resource instanceof Bundle) - composeBundle("Bundle", (Bundle)resource); - else if (resource instanceof CapabilityStatement) - composeCapabilityStatement("CapabilityStatement", (CapabilityStatement)resource); - else if (resource instanceof CarePlan) - composeCarePlan("CarePlan", (CarePlan)resource); - else if (resource instanceof CareTeam) - composeCareTeam("CareTeam", (CareTeam)resource); - else if (resource instanceof ChargeItem) - composeChargeItem("ChargeItem", (ChargeItem)resource); - else if (resource instanceof Claim) - composeClaim("Claim", (Claim)resource); - else if (resource instanceof ClaimResponse) - composeClaimResponse("ClaimResponse", (ClaimResponse)resource); - else if (resource instanceof ClinicalImpression) - composeClinicalImpression("ClinicalImpression", (ClinicalImpression)resource); - else if (resource instanceof CodeSystem) - composeCodeSystem("CodeSystem", (CodeSystem)resource); - else if (resource instanceof Communication) - composeCommunication("Communication", (Communication)resource); - else if (resource instanceof CommunicationRequest) - composeCommunicationRequest("CommunicationRequest", (CommunicationRequest)resource); - else if (resource instanceof CompartmentDefinition) - composeCompartmentDefinition("CompartmentDefinition", (CompartmentDefinition)resource); - else if (resource instanceof Composition) - composeComposition("Composition", (Composition)resource); - else if (resource instanceof ConceptMap) - composeConceptMap("ConceptMap", (ConceptMap)resource); - else if (resource instanceof Condition) - composeCondition("Condition", (Condition)resource); - else if (resource instanceof Consent) - composeConsent("Consent", (Consent)resource); - else if (resource instanceof Contract) - composeContract("Contract", (Contract)resource); - else if (resource instanceof Coverage) - composeCoverage("Coverage", (Coverage)resource); - else if (resource instanceof DetectedIssue) - composeDetectedIssue("DetectedIssue", (DetectedIssue)resource); - else if (resource instanceof Device) - composeDevice("Device", (Device)resource); - else if (resource instanceof DeviceComponent) - composeDeviceComponent("DeviceComponent", (DeviceComponent)resource); - else if (resource instanceof DeviceMetric) - composeDeviceMetric("DeviceMetric", (DeviceMetric)resource); - else if (resource instanceof DeviceRequest) - composeDeviceRequest("DeviceRequest", (DeviceRequest)resource); - else if (resource instanceof DeviceUseStatement) - composeDeviceUseStatement("DeviceUseStatement", (DeviceUseStatement)resource); - else if (resource instanceof DiagnosticReport) - composeDiagnosticReport("DiagnosticReport", (DiagnosticReport)resource); - else if (resource instanceof DocumentManifest) - composeDocumentManifest("DocumentManifest", (DocumentManifest)resource); - else if (resource instanceof DocumentReference) - composeDocumentReference("DocumentReference", (DocumentReference)resource); - else if (resource instanceof EligibilityRequest) - composeEligibilityRequest("EligibilityRequest", (EligibilityRequest)resource); - else if (resource instanceof EligibilityResponse) - composeEligibilityResponse("EligibilityResponse", (EligibilityResponse)resource); - else if (resource instanceof Encounter) - composeEncounter("Encounter", (Encounter)resource); - else if (resource instanceof Endpoint) - composeEndpoint("Endpoint", (Endpoint)resource); - else if (resource instanceof EnrollmentRequest) - composeEnrollmentRequest("EnrollmentRequest", (EnrollmentRequest)resource); - else if (resource instanceof EnrollmentResponse) - composeEnrollmentResponse("EnrollmentResponse", (EnrollmentResponse)resource); - else if (resource instanceof EpisodeOfCare) - composeEpisodeOfCare("EpisodeOfCare", (EpisodeOfCare)resource); - else if (resource instanceof EventDefinition) - composeEventDefinition("EventDefinition", (EventDefinition)resource); - else if (resource instanceof ExpansionProfile) - composeExpansionProfile("ExpansionProfile", (ExpansionProfile)resource); - else if (resource instanceof ExplanationOfBenefit) - composeExplanationOfBenefit("ExplanationOfBenefit", (ExplanationOfBenefit)resource); - else if (resource instanceof FamilyMemberHistory) - composeFamilyMemberHistory("FamilyMemberHistory", (FamilyMemberHistory)resource); - else if (resource instanceof Flag) - composeFlag("Flag", (Flag)resource); - else if (resource instanceof Goal) - composeGoal("Goal", (Goal)resource); - else if (resource instanceof GraphDefinition) - composeGraphDefinition("GraphDefinition", (GraphDefinition)resource); - else if (resource instanceof Group) - composeGroup("Group", (Group)resource); - else if (resource instanceof GuidanceResponse) - composeGuidanceResponse("GuidanceResponse", (GuidanceResponse)resource); - else if (resource instanceof HealthcareService) - composeHealthcareService("HealthcareService", (HealthcareService)resource); - else if (resource instanceof ImagingManifest) - composeImagingManifest("ImagingManifest", (ImagingManifest)resource); - else if (resource instanceof ImagingStudy) - composeImagingStudy("ImagingStudy", (ImagingStudy)resource); - else if (resource instanceof Immunization) - composeImmunization("Immunization", (Immunization)resource); - else if (resource instanceof ImmunizationRecommendation) - composeImmunizationRecommendation("ImmunizationRecommendation", (ImmunizationRecommendation)resource); - else if (resource instanceof ImplementationGuide) - composeImplementationGuide("ImplementationGuide", (ImplementationGuide)resource); - else if (resource instanceof Library) - composeLibrary("Library", (Library)resource); - else if (resource instanceof Linkage) - composeLinkage("Linkage", (Linkage)resource); - else if (resource instanceof ListResource) - composeListResource("List", (ListResource)resource); - else if (resource instanceof Location) - composeLocation("Location", (Location)resource); - else if (resource instanceof Measure) - composeMeasure("Measure", (Measure)resource); - else if (resource instanceof MeasureReport) - composeMeasureReport("MeasureReport", (MeasureReport)resource); - else if (resource instanceof Media) - composeMedia("Media", (Media)resource); - else if (resource instanceof Medication) - composeMedication("Medication", (Medication)resource); - else if (resource instanceof MedicationAdministration) - composeMedicationAdministration("MedicationAdministration", (MedicationAdministration)resource); - else if (resource instanceof MedicationDispense) - composeMedicationDispense("MedicationDispense", (MedicationDispense)resource); - else if (resource instanceof MedicationRequest) - composeMedicationRequest("MedicationRequest", (MedicationRequest)resource); - else if (resource instanceof MedicationStatement) - composeMedicationStatement("MedicationStatement", (MedicationStatement)resource); - else if (resource instanceof MessageDefinition) - composeMessageDefinition("MessageDefinition", (MessageDefinition)resource); - else if (resource instanceof MessageHeader) - composeMessageHeader("MessageHeader", (MessageHeader)resource); - else if (resource instanceof NamingSystem) - composeNamingSystem("NamingSystem", (NamingSystem)resource); - else if (resource instanceof NutritionOrder) - composeNutritionOrder("NutritionOrder", (NutritionOrder)resource); - else if (resource instanceof Observation) - composeObservation("Observation", (Observation)resource); - else if (resource instanceof OperationDefinition) - composeOperationDefinition("OperationDefinition", (OperationDefinition)resource); - else if (resource instanceof OperationOutcome) - composeOperationOutcome("OperationOutcome", (OperationOutcome)resource); - else if (resource instanceof Organization) - composeOrganization("Organization", (Organization)resource); - else if (resource instanceof Patient) - composePatient("Patient", (Patient)resource); - else if (resource instanceof PaymentNotice) - composePaymentNotice("PaymentNotice", (PaymentNotice)resource); - else if (resource instanceof PaymentReconciliation) - composePaymentReconciliation("PaymentReconciliation", (PaymentReconciliation)resource); - else if (resource instanceof Person) - composePerson("Person", (Person)resource); - else if (resource instanceof PlanDefinition) - composePlanDefinition("PlanDefinition", (PlanDefinition)resource); - else if (resource instanceof Practitioner) - composePractitioner("Practitioner", (Practitioner)resource); - else if (resource instanceof PractitionerRole) - composePractitionerRole("PractitionerRole", (PractitionerRole)resource); - else if (resource instanceof Procedure) - composeProcedure("Procedure", (Procedure)resource); - else if (resource instanceof ProcedureRequest) - composeProcedureRequest("ProcedureRequest", (ProcedureRequest)resource); - else if (resource instanceof ProcessRequest) - composeProcessRequest("ProcessRequest", (ProcessRequest)resource); - else if (resource instanceof ProcessResponse) - composeProcessResponse("ProcessResponse", (ProcessResponse)resource); - else if (resource instanceof Provenance) - composeProvenance("Provenance", (Provenance)resource); - else if (resource instanceof Questionnaire) - composeQuestionnaire("Questionnaire", (Questionnaire)resource); - else if (resource instanceof QuestionnaireResponse) - composeQuestionnaireResponse("QuestionnaireResponse", (QuestionnaireResponse)resource); - else if (resource instanceof RelatedPerson) - composeRelatedPerson("RelatedPerson", (RelatedPerson)resource); - else if (resource instanceof RequestGroup) - composeRequestGroup("RequestGroup", (RequestGroup)resource); - else if (resource instanceof ResearchStudy) - composeResearchStudy("ResearchStudy", (ResearchStudy)resource); - else if (resource instanceof ResearchSubject) - composeResearchSubject("ResearchSubject", (ResearchSubject)resource); - else if (resource instanceof RiskAssessment) - composeRiskAssessment("RiskAssessment", (RiskAssessment)resource); - else if (resource instanceof Schedule) - composeSchedule("Schedule", (Schedule)resource); - else if (resource instanceof SearchParameter) - composeSearchParameter("SearchParameter", (SearchParameter)resource); - else if (resource instanceof Sequence) - composeSequence("Sequence", (Sequence)resource); - else if (resource instanceof ServiceDefinition) - composeServiceDefinition("ServiceDefinition", (ServiceDefinition)resource); - else if (resource instanceof Slot) - composeSlot("Slot", (Slot)resource); - else if (resource instanceof Specimen) - composeSpecimen("Specimen", (Specimen)resource); - else if (resource instanceof StructureDefinition) - composeStructureDefinition("StructureDefinition", (StructureDefinition)resource); - else if (resource instanceof StructureMap) - composeStructureMap("StructureMap", (StructureMap)resource); - else if (resource instanceof Subscription) - composeSubscription("Subscription", (Subscription)resource); - else if (resource instanceof Substance) - composeSubstance("Substance", (Substance)resource); - else if (resource instanceof SupplyDelivery) - composeSupplyDelivery("SupplyDelivery", (SupplyDelivery)resource); - else if (resource instanceof SupplyRequest) - composeSupplyRequest("SupplyRequest", (SupplyRequest)resource); - else if (resource instanceof Task) - composeTask("Task", (Task)resource); - else if (resource instanceof TestReport) - composeTestReport("TestReport", (TestReport)resource); - else if (resource instanceof TestScript) - composeTestScript("TestScript", (TestScript)resource); - else if (resource instanceof ValueSet) - composeValueSet("ValueSet", (ValueSet)resource); - else if (resource instanceof VisionPrescription) - composeVisionPrescription("VisionPrescription", (VisionPrescription)resource); - else if (resource instanceof Binary) - composeBinary("Binary", (Binary)resource); - else - throw new Error("Unhandled resource type "+resource.getClass().getName()); - } - - protected void composeResource(String name, Resource resource) throws IOException { - if (resource instanceof Parameters) - composeParameters(name, (Parameters)resource); - else if (resource instanceof Account) - composeAccount(name, (Account)resource); - else if (resource instanceof ActivityDefinition) - composeActivityDefinition(name, (ActivityDefinition)resource); - else if (resource instanceof AdverseEvent) - composeAdverseEvent(name, (AdverseEvent)resource); - else if (resource instanceof AllergyIntolerance) - composeAllergyIntolerance(name, (AllergyIntolerance)resource); - else if (resource instanceof Appointment) - composeAppointment(name, (Appointment)resource); - else if (resource instanceof AppointmentResponse) - composeAppointmentResponse(name, (AppointmentResponse)resource); - else if (resource instanceof AuditEvent) - composeAuditEvent(name, (AuditEvent)resource); - else if (resource instanceof Basic) - composeBasic(name, (Basic)resource); - else if (resource instanceof Binary) - composeBinary(name, (Binary)resource); - else if (resource instanceof BodyStructure) - composeBodyStructure(name, (BodyStructure)resource); - else if (resource instanceof Bundle) - composeBundle(name, (Bundle)resource); - else if (resource instanceof CapabilityStatement) - composeCapabilityStatement(name, (CapabilityStatement)resource); - else if (resource instanceof CarePlan) - composeCarePlan(name, (CarePlan)resource); - else if (resource instanceof CareTeam) - composeCareTeam(name, (CareTeam)resource); - else if (resource instanceof ChargeItem) - composeChargeItem(name, (ChargeItem)resource); - else if (resource instanceof Claim) - composeClaim(name, (Claim)resource); - else if (resource instanceof ClaimResponse) - composeClaimResponse(name, (ClaimResponse)resource); - else if (resource instanceof ClinicalImpression) - composeClinicalImpression(name, (ClinicalImpression)resource); - else if (resource instanceof CodeSystem) - composeCodeSystem(name, (CodeSystem)resource); - else if (resource instanceof Communication) - composeCommunication(name, (Communication)resource); - else if (resource instanceof CommunicationRequest) - composeCommunicationRequest(name, (CommunicationRequest)resource); - else if (resource instanceof CompartmentDefinition) - composeCompartmentDefinition(name, (CompartmentDefinition)resource); - else if (resource instanceof Composition) - composeComposition(name, (Composition)resource); - else if (resource instanceof ConceptMap) - composeConceptMap(name, (ConceptMap)resource); - else if (resource instanceof Condition) - composeCondition(name, (Condition)resource); - else if (resource instanceof Consent) - composeConsent(name, (Consent)resource); - else if (resource instanceof Contract) - composeContract(name, (Contract)resource); - else if (resource instanceof Coverage) - composeCoverage(name, (Coverage)resource); - else if (resource instanceof DetectedIssue) - composeDetectedIssue(name, (DetectedIssue)resource); - else if (resource instanceof Device) - composeDevice(name, (Device)resource); - else if (resource instanceof DeviceComponent) - composeDeviceComponent(name, (DeviceComponent)resource); - else if (resource instanceof DeviceMetric) - composeDeviceMetric(name, (DeviceMetric)resource); - else if (resource instanceof DeviceRequest) - composeDeviceRequest(name, (DeviceRequest)resource); - else if (resource instanceof DeviceUseStatement) - composeDeviceUseStatement(name, (DeviceUseStatement)resource); - else if (resource instanceof DiagnosticReport) - composeDiagnosticReport(name, (DiagnosticReport)resource); - else if (resource instanceof DocumentManifest) - composeDocumentManifest(name, (DocumentManifest)resource); - else if (resource instanceof DocumentReference) - composeDocumentReference(name, (DocumentReference)resource); - else if (resource instanceof EligibilityRequest) - composeEligibilityRequest(name, (EligibilityRequest)resource); - else if (resource instanceof EligibilityResponse) - composeEligibilityResponse(name, (EligibilityResponse)resource); - else if (resource instanceof Encounter) - composeEncounter(name, (Encounter)resource); - else if (resource instanceof Endpoint) - composeEndpoint(name, (Endpoint)resource); - else if (resource instanceof EnrollmentRequest) - composeEnrollmentRequest(name, (EnrollmentRequest)resource); - else if (resource instanceof EnrollmentResponse) - composeEnrollmentResponse(name, (EnrollmentResponse)resource); - else if (resource instanceof EpisodeOfCare) - composeEpisodeOfCare(name, (EpisodeOfCare)resource); - else if (resource instanceof EventDefinition) - composeEventDefinition(name, (EventDefinition)resource); - else if (resource instanceof ExpansionProfile) - composeExpansionProfile(name, (ExpansionProfile)resource); - else if (resource instanceof ExplanationOfBenefit) - composeExplanationOfBenefit(name, (ExplanationOfBenefit)resource); - else if (resource instanceof FamilyMemberHistory) - composeFamilyMemberHistory(name, (FamilyMemberHistory)resource); - else if (resource instanceof Flag) - composeFlag(name, (Flag)resource); - else if (resource instanceof Goal) - composeGoal(name, (Goal)resource); - else if (resource instanceof GraphDefinition) - composeGraphDefinition(name, (GraphDefinition)resource); - else if (resource instanceof Group) - composeGroup(name, (Group)resource); - else if (resource instanceof GuidanceResponse) - composeGuidanceResponse(name, (GuidanceResponse)resource); - else if (resource instanceof HealthcareService) - composeHealthcareService(name, (HealthcareService)resource); - else if (resource instanceof ImagingManifest) - composeImagingManifest(name, (ImagingManifest)resource); - else if (resource instanceof ImagingStudy) - composeImagingStudy(name, (ImagingStudy)resource); - else if (resource instanceof Immunization) - composeImmunization(name, (Immunization)resource); - else if (resource instanceof ImmunizationRecommendation) - composeImmunizationRecommendation(name, (ImmunizationRecommendation)resource); - else if (resource instanceof ImplementationGuide) - composeImplementationGuide(name, (ImplementationGuide)resource); - else if (resource instanceof Library) - composeLibrary(name, (Library)resource); - else if (resource instanceof Linkage) - composeLinkage(name, (Linkage)resource); - else if (resource instanceof ListResource) - composeListResource(name, (ListResource)resource); - else if (resource instanceof Location) - composeLocation(name, (Location)resource); - else if (resource instanceof Measure) - composeMeasure(name, (Measure)resource); - else if (resource instanceof MeasureReport) - composeMeasureReport(name, (MeasureReport)resource); - else if (resource instanceof Media) - composeMedia(name, (Media)resource); - else if (resource instanceof Medication) - composeMedication(name, (Medication)resource); - else if (resource instanceof MedicationAdministration) - composeMedicationAdministration(name, (MedicationAdministration)resource); - else if (resource instanceof MedicationDispense) - composeMedicationDispense(name, (MedicationDispense)resource); - else if (resource instanceof MedicationRequest) - composeMedicationRequest(name, (MedicationRequest)resource); - else if (resource instanceof MedicationStatement) - composeMedicationStatement(name, (MedicationStatement)resource); - else if (resource instanceof MessageDefinition) - composeMessageDefinition(name, (MessageDefinition)resource); - else if (resource instanceof MessageHeader) - composeMessageHeader(name, (MessageHeader)resource); - else if (resource instanceof NamingSystem) - composeNamingSystem(name, (NamingSystem)resource); - else if (resource instanceof NutritionOrder) - composeNutritionOrder(name, (NutritionOrder)resource); - else if (resource instanceof Observation) - composeObservation(name, (Observation)resource); - else if (resource instanceof OperationDefinition) - composeOperationDefinition(name, (OperationDefinition)resource); - else if (resource instanceof OperationOutcome) - composeOperationOutcome(name, (OperationOutcome)resource); - else if (resource instanceof Organization) - composeOrganization(name, (Organization)resource); - else if (resource instanceof Patient) - composePatient(name, (Patient)resource); - else if (resource instanceof PaymentNotice) - composePaymentNotice(name, (PaymentNotice)resource); - else if (resource instanceof PaymentReconciliation) - composePaymentReconciliation(name, (PaymentReconciliation)resource); - else if (resource instanceof Person) - composePerson(name, (Person)resource); - else if (resource instanceof PlanDefinition) - composePlanDefinition(name, (PlanDefinition)resource); - else if (resource instanceof Practitioner) - composePractitioner(name, (Practitioner)resource); - else if (resource instanceof PractitionerRole) - composePractitionerRole(name, (PractitionerRole)resource); - else if (resource instanceof Procedure) - composeProcedure(name, (Procedure)resource); - else if (resource instanceof ProcedureRequest) - composeProcedureRequest(name, (ProcedureRequest)resource); - else if (resource instanceof ProcessRequest) - composeProcessRequest(name, (ProcessRequest)resource); - else if (resource instanceof ProcessResponse) - composeProcessResponse(name, (ProcessResponse)resource); - else if (resource instanceof Provenance) - composeProvenance(name, (Provenance)resource); - else if (resource instanceof Questionnaire) - composeQuestionnaire(name, (Questionnaire)resource); - else if (resource instanceof QuestionnaireResponse) - composeQuestionnaireResponse(name, (QuestionnaireResponse)resource); - else if (resource instanceof RelatedPerson) - composeRelatedPerson(name, (RelatedPerson)resource); - else if (resource instanceof RequestGroup) - composeRequestGroup(name, (RequestGroup)resource); - else if (resource instanceof ResearchStudy) - composeResearchStudy(name, (ResearchStudy)resource); - else if (resource instanceof ResearchSubject) - composeResearchSubject(name, (ResearchSubject)resource); - else if (resource instanceof RiskAssessment) - composeRiskAssessment(name, (RiskAssessment)resource); - else if (resource instanceof Schedule) - composeSchedule(name, (Schedule)resource); - else if (resource instanceof SearchParameter) - composeSearchParameter(name, (SearchParameter)resource); - else if (resource instanceof Sequence) - composeSequence(name, (Sequence)resource); - else if (resource instanceof ServiceDefinition) - composeServiceDefinition(name, (ServiceDefinition)resource); - else if (resource instanceof Slot) - composeSlot(name, (Slot)resource); - else if (resource instanceof Specimen) - composeSpecimen(name, (Specimen)resource); - else if (resource instanceof StructureDefinition) - composeStructureDefinition(name, (StructureDefinition)resource); - else if (resource instanceof StructureMap) - composeStructureMap(name, (StructureMap)resource); - else if (resource instanceof Subscription) - composeSubscription(name, (Subscription)resource); - else if (resource instanceof Substance) - composeSubstance(name, (Substance)resource); - else if (resource instanceof SupplyDelivery) - composeSupplyDelivery(name, (SupplyDelivery)resource); - else if (resource instanceof SupplyRequest) - composeSupplyRequest(name, (SupplyRequest)resource); - else if (resource instanceof Task) - composeTask(name, (Task)resource); - else if (resource instanceof TestReport) - composeTestReport(name, (TestReport)resource); - else if (resource instanceof TestScript) - composeTestScript(name, (TestScript)resource); - else if (resource instanceof ValueSet) - composeValueSet(name, (ValueSet)resource); - else if (resource instanceof VisionPrescription) - composeVisionPrescription(name, (VisionPrescription)resource); - else if (resource instanceof Binary) - composeBinary(name, (Binary)resource); - else - throw new Error("Unhandled resource type "+resource.getClass().getName()); - } - - protected void composeType(String prefix, Type type) throws IOException { - if (type == null) - ; - else if (type instanceof SimpleQuantity) - composeSimpleQuantity(prefix+"SimpleQuantity", (SimpleQuantity) type); - else if (type instanceof Extension) - composeExtension(prefix+"Extension", (Extension) type); - else if (type instanceof Narrative) - composeNarrative(prefix+"Narrative", (Narrative) type); - else if (type instanceof Duration) - composeDuration(prefix+"Duration", (Duration) type); - else if (type instanceof Count) - composeCount(prefix+"Count", (Count) type); - else if (type instanceof Money) - composeMoney(prefix+"Money", (Money) type); - else if (type instanceof Distance) - composeDistance(prefix+"Distance", (Distance) type); - else if (type instanceof Age) - composeAge(prefix+"Age", (Age) type); - else if (type instanceof Reference) - composeReference(prefix+"Reference", (Reference) type); - else if (type instanceof Quantity) - composeQuantity(prefix+"Quantity", (Quantity) type); - else if (type instanceof Period) - composePeriod(prefix+"Period", (Period) type); - else if (type instanceof Attachment) - composeAttachment(prefix+"Attachment", (Attachment) type); - else if (type instanceof Range) - composeRange(prefix+"Range", (Range) type); - else if (type instanceof Annotation) - composeAnnotation(prefix+"Annotation", (Annotation) type); - else if (type instanceof Identifier) - composeIdentifier(prefix+"Identifier", (Identifier) type); - else if (type instanceof Coding) - composeCoding(prefix+"Coding", (Coding) type); - else if (type instanceof Signature) - composeSignature(prefix+"Signature", (Signature) type); - else if (type instanceof SampledData) - composeSampledData(prefix+"SampledData", (SampledData) type); - else if (type instanceof Ratio) - composeRatio(prefix+"Ratio", (Ratio) type); - else if (type instanceof CodeableConcept) - composeCodeableConcept(prefix+"CodeableConcept", (CodeableConcept) type); - else if (type instanceof Meta) - composeMeta(prefix+"Meta", (Meta) type); - else if (type instanceof Address) - composeAddress(prefix+"Address", (Address) type); - else if (type instanceof TriggerDefinition) - composeTriggerDefinition(prefix+"TriggerDefinition", (TriggerDefinition) type); - else if (type instanceof Contributor) - composeContributor(prefix+"Contributor", (Contributor) type); - else if (type instanceof DataRequirement) - composeDataRequirement(prefix+"DataRequirement", (DataRequirement) type); - else if (type instanceof Dosage) - composeDosage(prefix+"Dosage", (Dosage) type); - else if (type instanceof RelatedArtifact) - composeRelatedArtifact(prefix+"RelatedArtifact", (RelatedArtifact) type); - else if (type instanceof ContactDetail) - composeContactDetail(prefix+"ContactDetail", (ContactDetail) type); - else if (type instanceof HumanName) - composeHumanName(prefix+"HumanName", (HumanName) type); - else if (type instanceof ContactPoint) - composeContactPoint(prefix+"ContactPoint", (ContactPoint) type); - else if (type instanceof UsageContext) - composeUsageContext(prefix+"UsageContext", (UsageContext) type); - else if (type instanceof Timing) - composeTiming(prefix+"Timing", (Timing) type); - else if (type instanceof ElementDefinition) - composeElementDefinition(prefix+"ElementDefinition", (ElementDefinition) type); - else if (type instanceof ParameterDefinition) - composeParameterDefinition(prefix+"ParameterDefinition", (ParameterDefinition) type); - else if (type instanceof CodeType) - composeCode(prefix+"Code", (CodeType) type); - else if (type instanceof OidType) - composeOid(prefix+"Oid", (OidType) type); - else if (type instanceof UuidType) - composeUuid(prefix+"Uuid", (UuidType) type); - else if (type instanceof UnsignedIntType) - composeUnsignedInt(prefix+"UnsignedInt", (UnsignedIntType) type); - else if (type instanceof MarkdownType) - composeMarkdown(prefix+"Markdown", (MarkdownType) type); - else if (type instanceof IdType) - composeId(prefix+"Id", (IdType) type); - else if (type instanceof PositiveIntType) - composePositiveInt(prefix+"PositiveInt", (PositiveIntType) type); - else if (type instanceof DateType) - composeDate(prefix+"Date", (DateType) type); - else if (type instanceof DateTimeType) - composeDateTime(prefix+"DateTime", (DateTimeType) type); - else if (type instanceof StringType) - composeString(prefix+"String", (StringType) type); - else if (type instanceof IntegerType) - composeInteger(prefix+"Integer", (IntegerType) type); - else if (type instanceof UriType) - composeUri(prefix+"Uri", (UriType) type); - else if (type instanceof InstantType) - composeInstant(prefix+"Instant", (InstantType) type); - else if (type instanceof BooleanType) - composeBoolean(prefix+"Boolean", (BooleanType) type); - else if (type instanceof Base64BinaryType) - composeBase64Binary(prefix+"Base64Binary", (Base64BinaryType) type); - else if (type instanceof TimeType) - composeTime(prefix+"Time", (TimeType) type); - else if (type instanceof DecimalType) - composeDecimal(prefix+"Decimal", (DecimalType) type); - else - throw new Error("Unhandled type"); - } - -} - +package org.hl7.fhir.r4.formats; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import org.hl7.fhir.r4.model.DateType; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.IntegerType; +import org.hl7.fhir.r4.model.OidType; +import org.hl7.fhir.r4.model.UriType; +import org.hl7.fhir.r4.model.UuidType; +import org.hl7.fhir.r4.model.InstantType; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.Base64BinaryType; +import org.hl7.fhir.r4.model.UnsignedIntType; +import org.hl7.fhir.r4.model.MarkdownType; +import org.hl7.fhir.r4.model.TimeType; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.PositiveIntType; +import org.hl7.fhir.r4.model.DecimalType; +import org.hl7.fhir.r4.model.*; +import org.xmlpull.v1.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.exceptions.FHIRFormatError; +import org.hl7.fhir.exceptions.FHIRException; +import java.io.IOException; + +public class XmlParser extends XmlParserBase { + + public XmlParser() { + super(); + } + + public XmlParser(boolean allowUnknownContent) { + super(); + setAllowUnknownContent(allowUnknownContent); + } + + + protected boolean parseElementContent(int eventType, XmlPullParser xpp, Element res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extension")) + res.getExtension().add(parseExtension(xpp)); + else + return false; + + return true; + } + + protected boolean parseBackboneContent(int eventType, XmlPullParser xpp, BackboneElement res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) + res.getModifierExtension().add(parseExtension(xpp)); + else + return parseElementContent(eventType, xpp, res); + + return true; + } + + @SuppressWarnings("unchecked") + protected > Enumeration parseEnumeration(XmlPullParser xpp, E item, EnumFactory e) throws XmlPullParserException, IOException, FHIRFormatError { + Enumeration res = new Enumeration(e); + parseElementAttributes(xpp, res); + res.setValue((E) e.fromCode(xpp.getAttributeValue(null, "value"))); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected DateType parseDate(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DateType res = new DateType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected DateTimeType parseDateTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DateTimeType res = new DateTimeType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected CodeType parseCode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CodeType res = new CodeType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected StringType parseString(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + StringType res = new StringType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected IntegerType parseInteger(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + IntegerType res = new IntegerType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected OidType parseOid(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + OidType res = new OidType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected UriType parseUri(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + UriType res = new UriType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected UuidType parseUuid(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + UuidType res = new UuidType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected InstantType parseInstant(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + InstantType res = new InstantType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected BooleanType parseBoolean(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + BooleanType res = new BooleanType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected Base64BinaryType parseBase64Binary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Base64BinaryType res = new Base64BinaryType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected UnsignedIntType parseUnsignedInt(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + UnsignedIntType res = new UnsignedIntType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected MarkdownType parseMarkdown(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MarkdownType res = new MarkdownType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected TimeType parseTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + TimeType res = new TimeType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected IdType parseId(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + IdType res = new IdType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected PositiveIntType parsePositiveInt(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + PositiveIntType res = new PositiveIntType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected DecimalType parseDecimal(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DecimalType res = new DecimalType(xpp.getAttributeValue(null, "value")); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected Extension parseExtension(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Extension res = new Extension(); + parseElementAttributes(xpp, res); + if (xpp.getAttributeValue(null, "url") != null) + res.setUrl(xpp.getAttributeValue(null, "url")); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExtensionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExtensionContent(int eventType, XmlPullParser xpp, Extension res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Narrative parseNarrative(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Narrative res = new Narrative(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNarrativeContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNarrativeContent(int eventType, XmlPullParser xpp, Narrative res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Narrative.NarrativeStatus.NULL, new Narrative.NarrativeStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("div")) { + res.setDiv(parseXhtml(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Reference parseReference(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Reference res = new Reference(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseReferenceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseReferenceContent(int eventType, XmlPullParser xpp, Reference res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReferenceElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Quantity parseQuantity(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Quantity res = new Quantity(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuantityContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuantityContent(int eventType, XmlPullParser xpp, Quantity res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { + res.setComparatorElement(parseEnumeration(xpp, Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { + res.setUnitElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Period parsePeriod(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Period res = new Period(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePeriodContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePeriodContent(int eventType, XmlPullParser xpp, Period res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseDateTime(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Attachment parseAttachment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Attachment res = new Attachment(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAttachmentContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAttachmentContent(int eventType, XmlPullParser xpp, Attachment res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { + res.setContentTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { + res.setDataElement(parseBase64Binary(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("size")) { + res.setSizeElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hash")) { + res.setHashElement(parseBase64Binary(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("creation")) { + res.setCreationElement(parseDateTime(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Duration parseDuration(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Duration res = new Duration(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDurationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDurationContent(int eventType, XmlPullParser xpp, Duration res) throws XmlPullParserException, IOException, FHIRFormatError { + if (!parseQuantityContent(eventType, xpp, res)) + return false; + return true; + } + + protected Count parseCount(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Count res = new Count(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCountContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCountContent(int eventType, XmlPullParser xpp, Count res) throws XmlPullParserException, IOException, FHIRFormatError { + if (!parseQuantityContent(eventType, xpp, res)) + return false; + return true; + } + + protected Range parseRange(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Range res = new Range(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRangeContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRangeContent(int eventType, XmlPullParser xpp, Range res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("low")) { + res.setLow(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("high")) { + res.setHigh(parseSimpleQuantity(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Annotation parseAnnotation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Annotation res = new Annotation(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAnnotationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAnnotationContent(int eventType, XmlPullParser xpp, Annotation res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "author")) { + res.setAuthor(parseType("author", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { + res.setTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Money parseMoney(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Money res = new Money(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMoneyContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMoneyContent(int eventType, XmlPullParser xpp, Money res) throws XmlPullParserException, IOException, FHIRFormatError { + if (!parseQuantityContent(eventType, xpp, res)) + return false; + return true; + } + + protected Identifier parseIdentifier(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Identifier res = new Identifier(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseIdentifierContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseIdentifierContent(int eventType, XmlPullParser xpp, Identifier res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, Identifier.IdentifierUse.NULL, new Identifier.IdentifierUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assigner")) { + res.setAssigner(parseReference(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Coding parseCoding(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Coding res = new Coding(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodingContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodingContent(int eventType, XmlPullParser xpp, Coding res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("userSelected")) { + res.setUserSelectedElement(parseBoolean(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Signature parseSignature(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Signature res = new Signature(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSignatureContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSignatureContent(int eventType, XmlPullParser xpp, Signature res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("when")) { + res.setWhenElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "who")) { + res.setWho(parseType("who", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onBehalfOf")) { + res.setOnBehalfOf(parseType("onBehalfOf", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { + res.setContentTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("blob")) { + res.setBlobElement(parseBase64Binary(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected SampledData parseSampledData(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + SampledData res = new SampledData(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSampledDataContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSampledDataContent(int eventType, XmlPullParser xpp, SampledData res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { + res.setOrigin(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriodElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lowerLimit")) { + res.setLowerLimitElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("upperLimit")) { + res.setUpperLimitElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dimensions")) { + res.setDimensionsElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { + res.setDataElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Ratio parseRatio(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Ratio res = new Ratio(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRatioContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRatioContent(int eventType, XmlPullParser xpp, Ratio res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numerator")) { + res.setNumerator(parseQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("denominator")) { + res.setDenominator(parseQuantity(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Distance parseDistance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Distance res = new Distance(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDistanceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDistanceContent(int eventType, XmlPullParser xpp, Distance res) throws XmlPullParserException, IOException, FHIRFormatError { + if (!parseQuantityContent(eventType, xpp, res)) + return false; + return true; + } + + protected Age parseAge(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Age res = new Age(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAgeContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAgeContent(int eventType, XmlPullParser xpp, Age res) throws XmlPullParserException, IOException, FHIRFormatError { + if (!parseQuantityContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeableConcept parseCodeableConcept(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CodeableConcept res = new CodeableConcept(); + parseTypeAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeableConceptContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeableConceptContent(int eventType, XmlPullParser xpp, CodeableConcept res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coding")) { + res.getCoding().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected SimpleQuantity parseSimpleQuantity(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + SimpleQuantity res = new SimpleQuantity(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSimpleQuantityContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSimpleQuantityContent(int eventType, XmlPullParser xpp, SimpleQuantity res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { + res.setComparatorElement(parseEnumeration(xpp, Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { + res.setUnitElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Meta parseMeta(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Meta res = new Meta(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMetaContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMetaContent(int eventType, XmlPullParser xpp, Meta res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { + res.setVersionIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastUpdated")) { + res.setLastUpdatedElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.getProfile().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("security")) { + res.getSecurity().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tag")) { + res.getTag().add(parseCoding(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Address parseAddress(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Address res = new Address(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAddressContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAddressContent(int eventType, XmlPullParser xpp, Address res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, Address.AddressUse.NULL, new Address.AddressUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Address.AddressType.NULL, new Address.AddressTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("line")) { + res.getLine().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("city")) { + res.setCityElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("district")) { + res.setDistrictElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("state")) { + res.setStateElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("postalCode")) { + res.setPostalCodeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { + res.setCountryElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected TriggerDefinition parseTriggerDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + TriggerDefinition res = new TriggerDefinition(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTriggerDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTriggerDefinitionContent(int eventType, XmlPullParser xpp, TriggerDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, TriggerDefinition.TriggerType.NULL, new TriggerDefinition.TriggerTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { + res.setData(parseDataRequirement(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.setCondition(parseTriggerDefinitionTriggerDefinitionConditionComponent(xpp, res)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected TriggerDefinition.TriggerDefinitionConditionComponent parseTriggerDefinitionTriggerDefinitionConditionComponent(XmlPullParser xpp, TriggerDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + TriggerDefinition.TriggerDefinitionConditionComponent res = new TriggerDefinition.TriggerDefinitionConditionComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTriggerDefinitionTriggerDefinitionConditionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTriggerDefinitionTriggerDefinitionConditionComponentContent(int eventType, XmlPullParser xpp, TriggerDefinition owner, TriggerDefinition.TriggerDefinitionConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseEnumeration(xpp, TriggerDefinition.ExpressionLanguage.NULL, new TriggerDefinition.ExpressionLanguageEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contributor parseContributor(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Contributor res = new Contributor(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContributorContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContributorContent(int eventType, XmlPullParser xpp, Contributor res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Contributor.ContributorType.NULL, new Contributor.ContributorTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected DataRequirement parseDataRequirement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DataRequirement res = new DataRequirement(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDataRequirementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDataRequirementContent(int eventType, XmlPullParser xpp, DataRequirement res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.getProfile().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mustSupport")) { + res.getMustSupport().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codeFilter")) { + res.getCodeFilter().add(parseDataRequirementDataRequirementCodeFilterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateFilter")) { + res.getDateFilter().add(parseDataRequirementDataRequirementDateFilterComponent(xpp, res)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementDataRequirementCodeFilterComponent(XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { + DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDataRequirementDataRequirementCodeFilterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDataRequirementDataRequirementCodeFilterComponentContent(int eventType, XmlPullParser xpp, DataRequirement owner, DataRequirement.DataRequirementCodeFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "valueSet")) { + res.setValueSet(parseType("valueSet", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCoding(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDataRequirementDateFilterComponent(XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { + DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDataRequirementDataRequirementDateFilterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDataRequirementDataRequirementDateFilterComponentContent(int eventType, XmlPullParser xpp, DataRequirement owner, DataRequirement.DataRequirementDateFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Dosage parseDosage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Dosage res = new Dosage(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDosageContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDosageContent(int eventType, XmlPullParser xpp, Dosage res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalInstruction")) { + res.getAdditionalInstruction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientInstruction")) { + res.setPatientInstructionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timing")) { + res.setTiming(parseTiming(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "asNeeded")) { + res.setAsNeeded(parseType("asNeeded", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { + res.setSite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { + res.setRoute(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "dose")) { + res.setDose(parseType("dose", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerPeriod")) { + res.setMaxDosePerPeriod(parseRatio(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerAdministration")) { + res.setMaxDosePerAdministration(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerLifetime")) { + res.setMaxDosePerLifetime(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { + res.setRate(parseType("rate", xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected RelatedArtifact parseRelatedArtifact(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + RelatedArtifact res = new RelatedArtifact(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRelatedArtifactContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRelatedArtifactContent(int eventType, XmlPullParser xpp, RelatedArtifact res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, RelatedArtifact.RelatedArtifactType.NULL, new RelatedArtifact.RelatedArtifactTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("citation")) { + res.setCitationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("document")) { + res.setDocument(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseReference(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ContactDetail parseContactDetail(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ContactDetail res = new ContactDetail(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContactDetailContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContactDetailContent(int eventType, XmlPullParser xpp, ContactDetail res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected HumanName parseHumanName(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + HumanName res = new HumanName(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseHumanNameContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseHumanNameContent(int eventType, XmlPullParser xpp, HumanName res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, HumanName.NameUse.NULL, new HumanName.NameUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("family")) { + res.setFamilyElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("given")) { + res.getGiven().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { + res.getPrefix().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suffix")) { + res.getSuffix().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ContactPoint parseContactPoint(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ContactPoint res = new ContactPoint(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContactPointContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContactPointContent(int eventType, XmlPullParser xpp, ContactPoint res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseEnumeration(xpp, ContactPoint.ContactPointSystem.NULL, new ContactPoint.ContactPointSystemEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, ContactPoint.ContactPointUse.NULL, new ContactPoint.ContactPointUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { + res.setRankElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected UsageContext parseUsageContext(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + UsageContext res = new UsageContext(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseUsageContextContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseUsageContextContent(int eventType, XmlPullParser xpp, UsageContext res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Timing parseTiming(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Timing res = new Timing(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTimingContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTimingContent(int eventType, XmlPullParser xpp, Timing res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.getEvent().add(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeat")) { + res.setRepeat(parseTimingTimingRepeatComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected Timing.TimingRepeatComponent parseTimingTimingRepeatComponent(XmlPullParser xpp, Timing owner) throws XmlPullParserException, IOException, FHIRFormatError { + Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTimingTimingRepeatComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTimingTimingRepeatComponentContent(int eventType, XmlPullParser xpp, Timing owner, Timing.TimingRepeatComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "bounds")) { + res.setBounds(parseType("bounds", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { + res.setCountElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("countMax")) { + res.setCountMaxElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { + res.setDurationElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("durationMax")) { + res.setDurationMaxElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("durationUnit")) { + res.setDurationUnitElement(parseEnumeration(xpp, Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequency")) { + res.setFrequencyElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequencyMax")) { + res.setFrequencyMaxElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriodElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodMax")) { + res.setPeriodMaxElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodUnit")) { + res.setPeriodUnitElement(parseEnumeration(xpp, Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dayOfWeek")) { + res.getDayOfWeek().add(parseEnumeration(xpp, Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timeOfDay")) { + res.getTimeOfDay().add(parseTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("when")) { + res.getWhen().add(parseEnumeration(xpp, Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offset")) { + res.setOffsetElement(parseUnsignedInt(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition parseElementDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition res = new ElementDefinition(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionContent(int eventType, XmlPullParser xpp, ElementDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("representation")) { + res.getRepresentation().add(parseEnumeration(xpp, ElementDefinition.PropertyRepresentation.NULL, new ElementDefinition.PropertyRepresentationEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceName")) { + res.setSliceNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { + res.setLabelElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("slicing")) { + res.setSlicing(parseElementDefinitionElementDefinitionSlicingComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("short")) { + res.setShortElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinitionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirements")) { + res.setRequirementsElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { + res.getAlias().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { + res.setBase(parseElementDefinitionElementDefinitionBaseComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentReference")) { + res.setContentReferenceElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseElementDefinitionTypeRefComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "defaultValue")) { + res.setDefaultValue(parseType("defaultValue", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaningWhenMissing")) { + res.setMeaningWhenMissingElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderMeaning")) { + res.setOrderMeaningElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "fixed")) { + res.setFixed(parseType("fixed", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "pattern")) { + res.setPattern(parseType("pattern", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("example")) { + res.getExample().add(parseElementDefinitionElementDefinitionExampleComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "minValue")) { + res.setMinValue(parseType("minValue", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "maxValue")) { + res.setMaxValue(parseType("maxValue", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxLength")) { + res.setMaxLengthElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.getCondition().add(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("constraint")) { + res.getConstraint().add(parseElementDefinitionElementDefinitionConstraintComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mustSupport")) { + res.setMustSupportElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isModifier")) { + res.setIsModifierElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isSummary")) { + res.setIsSummaryElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binding")) { + res.setBinding(parseElementDefinitionElementDefinitionBindingComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mapping")) { + res.getMapping().add(parseElementDefinitionElementDefinitionMappingComponent(xpp, res)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionElementDefinitionSlicingComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionSlicingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionSlicingComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("discriminator")) { + res.getDiscriminator().add(parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ordered")) { + res.setOrderedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rules")) { + res.setRulesElement(parseEnumeration(xpp, ElementDefinition.SlicingRules.NULL, new ElementDefinition.SlicingRulesEnumFactory())); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, ElementDefinition.DiscriminatorType.NULL, new ElementDefinition.DiscriminatorTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionBaseComponent parseElementDefinitionElementDefinitionBaseComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionBaseComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionBaseComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionBaseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.TypeRefComponent parseElementDefinitionTypeRefComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionTypeRefComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionTypeRefComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.TypeRefComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfileElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetProfile")) { + res.setTargetProfileElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("aggregation")) { + res.getAggregation().add(parseEnumeration(xpp, ElementDefinition.AggregationMode.NULL, new ElementDefinition.AggregationModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versioning")) { + res.setVersioningElement(parseEnumeration(xpp, ElementDefinition.ReferenceVersionRules.NULL, new ElementDefinition.ReferenceVersionRulesEnumFactory())); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionExampleComponent parseElementDefinitionElementDefinitionExampleComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionExampleComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionExampleComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionExampleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { + res.setLabelElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionElementDefinitionConstraintComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionConstraintComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionConstraintComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionConstraintComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("key")) { + res.setKeyElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirements")) { + res.setRequirementsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { + res.setSeverityElement(parseEnumeration(xpp, ElementDefinition.ConstraintSeverity.NULL, new ElementDefinition.ConstraintSeverityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("human")) { + res.setHumanElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpath")) { + res.setXpathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSourceElement(parseUri(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionElementDefinitionBindingComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionBindingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionBindingComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionBindingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { + res.setStrengthElement(parseEnumeration(xpp, Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "valueSet")) { + res.setValueSet(parseType("valueSet", xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionElementDefinitionMappingComponent(XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseElementDefinitionElementDefinitionMappingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseElementDefinitionElementDefinitionMappingComponentContent(int eventType, XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionMappingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identity")) { + res.setIdentityElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("map")) { + res.setMapElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected ParameterDefinition parseParameterDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ParameterDefinition res = new ParameterDefinition(); + parseElementAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseParameterDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseParameterDefinitionContent(int eventType, XmlPullParser xpp, ParameterDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, ParameterDefinition.ParameterUse.NULL, new ParameterDefinition.ParameterUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseReference(xpp)); + } else if (!parseElementContent(eventType, xpp, res)) + return false; + return true; + } + + protected void parseDomainResourceAttributes(XmlPullParser xpp, DomainResource res) throws XmlPullParserException, IOException, FHIRFormatError { + parseResourceAttributes(xpp, res); + } + + protected boolean parseDomainResourceContent(int eventType, XmlPullParser xpp, DomainResource res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setText(parseNarrative(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contained")) { + res.getContained().add(parseResourceContained(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extension")) { + res.getExtension().add(parseExtension(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) { + res.getModifierExtension().add(parseExtension(xpp)); + } else + return parseResourceContent(eventType, xpp, res); + return true; + } + + protected Parameters parseParameters(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Parameters res = new Parameters(); + parseResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseParametersContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseParametersContent(int eventType, XmlPullParser xpp, Parameters res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { + res.getParameter().add(parseParametersParametersParameterComponent(xpp, res)); + } else if (!parseResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Parameters.ParametersParameterComponent parseParametersParametersParameterComponent(XmlPullParser xpp, Parameters owner) throws XmlPullParserException, IOException, FHIRFormatError { + Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseParametersParametersParameterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseParametersParametersParameterComponentContent(int eventType, XmlPullParser xpp, Parameters owner, Parameters.ParametersParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseResourceContained(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { + res.getPart().add(parseParametersParametersParameterComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected void parseResourceAttributes(XmlPullParser xpp, Resource res) throws XmlPullParserException, IOException, FHIRFormatError { + if (!comments.isEmpty()) { + res.getFormatCommentsPre().addAll(comments); + comments.clear(); + } + } + + protected boolean parseResourceContent(int eventType, XmlPullParser xpp, Resource res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("id")) { + res.setIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meta")) { + res.setMeta(parseMeta(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implicitRules")) { + res.setImplicitRulesElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else + return false; + return true; + } + + protected Account parseAccount(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Account res = new Account(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAccountContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAccountContent(int eventType, XmlPullParser xpp, Account res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Account.AccountStatus.NULL, new Account.AccountStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActive(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("balance")) { + res.setBalance(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.getCoverage().add(parseAccountCoverageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { + res.setOwner(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("guarantor")) { + res.getGuarantor().add(parseAccountGuarantorComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Account.CoverageComponent parseAccountCoverageComponent(XmlPullParser xpp, Account owner) throws XmlPullParserException, IOException, FHIRFormatError { + Account.CoverageComponent res = new Account.CoverageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAccountCoverageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAccountCoverageComponentContent(int eventType, XmlPullParser xpp, Account owner, Account.CoverageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parsePositiveInt(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Account.GuarantorComponent parseAccountGuarantorComponent(XmlPullParser xpp, Account owner) throws XmlPullParserException, IOException, FHIRFormatError { + Account.GuarantorComponent res = new Account.GuarantorComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAccountGuarantorComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAccountGuarantorComponentContent(int eventType, XmlPullParser xpp, Account owner, Account.GuarantorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { + res.setParty(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onHold")) { + res.setOnHoldElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ActivityDefinition parseActivityDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ActivityDefinition res = new ActivityDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseActivityDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseActivityDefinitionContent(int eventType, XmlPullParser xpp, ActivityDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { + res.getContributor().add(parseContributor(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { + res.getLibrary().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, ActivityDefinition.ActivityDefinitionKind.NULL, new ActivityDefinition.ActivityDefinitionKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseActivityDefinitionActivityDefinitionParticipantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { + res.setProduct(parseType("product", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { + res.getDosage().add(parseDosage(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.getBodySite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { + res.setTransform(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dynamicValue")) { + res.getDynamicValue().add(parseActivityDefinitionActivityDefinitionDynamicValueComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionActivityDefinitionParticipantComponent(XmlPullParser xpp, ActivityDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseActivityDefinitionActivityDefinitionParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseActivityDefinitionActivityDefinitionParticipantComponentContent(int eventType, XmlPullParser xpp, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, ActivityDefinition.ActivityParticipantType.NULL, new ActivityDefinition.ActivityParticipantTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionActivityDefinitionDynamicValueComponent(XmlPullParser xpp, ActivityDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseActivityDefinitionActivityDefinitionDynamicValueComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseActivityDefinitionActivityDefinitionDynamicValueComponentContent(int eventType, XmlPullParser xpp, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionDynamicValueComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AdverseEvent parseAdverseEvent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + AdverseEvent res = new AdverseEvent(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAdverseEventContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAdverseEventContent(int eventType, XmlPullParser xpp, AdverseEvent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actuality")) { + res.setActualityElement(parseEnumeration(xpp, AdverseEvent.AdverseEventActuality.NULL, new AdverseEvent.AdverseEventActualityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategoryElement(parseEnumeration(xpp, AdverseEvent.AdverseEventCategory.NULL, new AdverseEvent.AdverseEventCategoryEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.setEvent(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultingCondition")) { + res.getResultingCondition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("seriousness")) { + res.setSeriousness(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { + res.setSeverity(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcome(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { + res.setRecorder(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventParticipant")) { + res.setEventParticipant(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suspectEntity")) { + res.getSuspectEntity().add(parseAdverseEventAdverseEventSuspectEntityComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectMedicalHistory")) { + res.getSubjectMedicalHistory().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceDocument")) { + res.getReferenceDocument().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { + res.getStudy().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventAdverseEventSuspectEntityComponent(XmlPullParser xpp, AdverseEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAdverseEventAdverseEventSuspectEntityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAdverseEventAdverseEventSuspectEntityComponentContent(int eventType, XmlPullParser xpp, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { + res.setInstance(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("causality")) { + res.getCausality().add(parseAdverseEventAdverseEventSuspectEntityCausalityComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventAdverseEventSuspectEntityCausalityComponent(XmlPullParser xpp, AdverseEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAdverseEventAdverseEventSuspectEntityCausalityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAdverseEventAdverseEventSuspectEntityCausalityComponentContent(int eventType, XmlPullParser xpp, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessment")) { + res.setAssessment(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productRelatedness")) { + res.setProductRelatednessElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AllergyIntolerance parseAllergyIntolerance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + AllergyIntolerance res = new AllergyIntolerance(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAllergyIntoleranceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAllergyIntoleranceContent(int eventType, XmlPullParser xpp, AllergyIntolerance res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalStatus")) { + res.setClinicalStatusElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceClinicalStatus.NULL, new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationStatus")) { + res.setVerificationStatusElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceVerificationStatus.NULL, new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceType.NULL, new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceCategory.NULL, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criticality")) { + res.setCriticalityElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceCriticality.NULL, new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { + res.setOnset(parseType("onset", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assertedDate")) { + res.setAssertedDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { + res.setRecorder(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { + res.setAsserter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastOccurrence")) { + res.setLastOccurrenceElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reaction")) { + res.getReaction().add(parseAllergyIntoleranceAllergyIntoleranceReactionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceAllergyIntoleranceReactionComponent(XmlPullParser xpp, AllergyIntolerance owner) throws XmlPullParserException, IOException, FHIRFormatError { + AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAllergyIntoleranceAllergyIntoleranceReactionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAllergyIntoleranceAllergyIntoleranceReactionComponentContent(int eventType, XmlPullParser xpp, AllergyIntolerance owner, AllergyIntolerance.AllergyIntoleranceReactionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substance")) { + res.setSubstance(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manifestation")) { + res.getManifestation().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onset")) { + res.setOnsetElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { + res.setSeverityElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceSeverity.NULL, new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureRoute")) { + res.setExposureRoute(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Appointment parseAppointment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Appointment res = new Appointment(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAppointmentContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAppointmentContent(int eventType, XmlPullParser xpp, Appointment res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Appointment.AppointmentStatus.NULL, new Appointment.AppointmentStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { + res.setServiceCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { + res.getServiceType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { + res.getSpecialty().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentType")) { + res.setAppointmentType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("indication")) { + res.getIndication().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { + res.getSupportingInformation().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("minutesDuration")) { + res.setMinutesDurationElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("slot")) { + res.getSlot().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("incomingReferral")) { + res.getIncomingReferral().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseAppointmentAppointmentParticipantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestedPeriod")) { + res.getRequestedPeriod().add(parsePeriod(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Appointment.AppointmentParticipantComponent parseAppointmentAppointmentParticipantComponent(XmlPullParser xpp, Appointment owner) throws XmlPullParserException, IOException, FHIRFormatError { + Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAppointmentAppointmentParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAppointmentAppointmentParticipantComponentContent(int eventType, XmlPullParser xpp, Appointment owner, Appointment.AppointmentParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { + res.setRequiredElement(parseEnumeration(xpp, Appointment.ParticipantRequired.NULL, new Appointment.ParticipantRequiredEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Appointment.ParticipationStatus.NULL, new Appointment.ParticipationStatusEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AppointmentResponse parseAppointmentResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + AppointmentResponse res = new AppointmentResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAppointmentResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAppointmentResponseContent(int eventType, XmlPullParser xpp, AppointmentResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointment")) { + res.setAppointment(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantType")) { + res.getParticipantType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantStatus")) { + res.setParticipantStatusElement(parseEnumeration(xpp, AppointmentResponse.ParticipantStatus.NULL, new AppointmentResponse.ParticipantStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected AuditEvent parseAuditEvent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + AuditEvent res = new AuditEvent(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAuditEventContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAuditEventContent(int eventType, XmlPullParser xpp, AuditEvent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { + res.getSubtype().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.setActionElement(parseEnumeration(xpp, AuditEvent.AuditEventAction.NULL, new AuditEvent.AuditEventActionEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { + res.setRecordedElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, AuditEvent.AuditEventOutcome.NULL, new AuditEvent.AuditEventOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeDesc")) { + res.setOutcomeDescElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purposeOfEvent")) { + res.getPurposeOfEvent().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.getAgent().add(parseAuditEventAuditEventAgentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseAuditEventAuditEventSourceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { + res.getEntity().add(parseAuditEventAuditEventEntityComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected AuditEvent.AuditEventAgentComponent parseAuditEventAuditEventAgentComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAuditEventAuditEventAgentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAuditEventAuditEventAgentComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.getRole().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("userId")) { + res.setUserId(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("altId")) { + res.setAltIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestor")) { + res.setRequestorElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { + res.getPolicy().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("media")) { + res.setMedia(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { + res.setNetwork(parseAuditEventAuditEventAgentNetworkComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purposeOfUse")) { + res.getPurposeOfUse().add(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AuditEvent.AuditEventAgentNetworkComponent parseAuditEventAuditEventAgentNetworkComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AuditEvent.AuditEventAgentNetworkComponent res = new AuditEvent.AuditEventAgentNetworkComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAuditEventAuditEventAgentNetworkComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAuditEventAuditEventAgentNetworkComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventAgentNetworkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.setAddressElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, AuditEvent.AuditEventAgentNetworkType.NULL, new AuditEvent.AuditEventAgentNetworkTypeEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AuditEvent.AuditEventSourceComponent parseAuditEventAuditEventSourceComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAuditEventAuditEventSourceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAuditEventAuditEventSourceComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { + res.setSiteElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AuditEvent.AuditEventEntityComponent parseAuditEventAuditEventEntityComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAuditEventAuditEventEntityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAuditEventAuditEventEntityComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lifecycle")) { + res.setLifecycle(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { + res.getSecurityLabel().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("query")) { + res.setQueryElement(parseBase64Binary(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parseAuditEventAuditEventEntityDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventAuditEventEntityDetailComponent(XmlPullParser xpp, AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { + AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseAuditEventAuditEventEntityDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseAuditEventAuditEventEntityDetailComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, AuditEvent.AuditEventEntityDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Basic parseBasic(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Basic res = new Basic(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBasicContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBasicContent(int eventType, XmlPullParser xpp, Basic res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Binary parseBinary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Binary res = new Binary(); + parseResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBinaryContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBinaryContent(int eventType, XmlPullParser xpp, Binary res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { + res.setContentTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityContext")) { + res.setSecurityContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.setContentElement(parseBase64Binary(xpp)); + } else if (!parseResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected BodyStructure parseBodyStructure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + BodyStructure res = new BodyStructure(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBodyStructureContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBodyStructureContent(int eventType, XmlPullParser xpp, BodyStructure res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("morphology")) { + res.setMorphology(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("locationQualifier")) { + res.getLocationQualifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { + res.getImage().add(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Bundle parseBundle(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Bundle res = new Bundle(); + parseResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBundleContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBundleContent(int eventType, XmlPullParser xpp, Bundle res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Bundle.BundleType.NULL, new Bundle.BundleTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { + res.setTotalElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parseBundleBundleLinkComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { + res.getEntry().add(parseBundleBundleEntryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { + res.setSignature(parseSignature(xpp)); + } else if (!parseResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Bundle.BundleLinkComponent parseBundleBundleLinkComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { + Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBundleBundleLinkComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBundleBundleLinkComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relation")) { + res.setRelationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Bundle.BundleEntryComponent parseBundleBundleEntryComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { + Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBundleBundleEntryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBundleBundleEntryComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parseBundleBundleLinkComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fullUrl")) { + res.setFullUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseResourceContained(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("search")) { + res.setSearch(parseBundleBundleEntrySearchComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseBundleBundleEntryRequestComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseBundleBundleEntryResponseComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Bundle.BundleEntrySearchComponent parseBundleBundleEntrySearchComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { + Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBundleBundleEntrySearchComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBundleBundleEntrySearchComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntrySearchComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, Bundle.SearchEntryMode.NULL, new Bundle.SearchEntryModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { + res.setScoreElement(parseDecimal(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Bundle.BundleEntryRequestComponent parseBundleBundleEntryRequestComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { + Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBundleBundleEntryRequestComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBundleBundleEntryRequestComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntryRequestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethodElement(parseEnumeration(xpp, Bundle.HTTPVerb.NULL, new Bundle.HTTPVerbEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifNoneMatch")) { + res.setIfNoneMatchElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifModifiedSince")) { + res.setIfModifiedSinceElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifMatch")) { + res.setIfMatchElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifNoneExist")) { + res.setIfNoneExistElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Bundle.BundleEntryResponseComponent parseBundleBundleEntryResponseComponent(XmlPullParser xpp, Bundle owner) throws XmlPullParserException, IOException, FHIRFormatError { + Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseBundleBundleEntryResponseComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseBundleBundleEntryResponseComponentContent(int eventType, XmlPullParser xpp, Bundle owner, Bundle.BundleEntryResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocationElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("etag")) { + res.setEtagElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastModified")) { + res.setLastModifiedElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcome(parseResourceContained(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement parseCapabilityStatement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement res = new CapabilityStatement(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementContent(int eventType, XmlPullParser xpp, CapabilityStatement res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, CapabilityStatement.CapabilityStatementKind.NULL, new CapabilityStatement.CapabilityStatementKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiates")) { + res.getInstantiates().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { + res.setSoftware(parseCapabilityStatementCapabilityStatementSoftwareComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementation")) { + res.setImplementation(parseCapabilityStatementCapabilityStatementImplementationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { + res.setFhirVersionElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("acceptUnknown")) { + res.setAcceptUnknownElement(parseEnumeration(xpp, CapabilityStatement.UnknownContentCode.NULL, new CapabilityStatement.UnknownContentCodeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { + res.getFormat().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patchFormat")) { + res.getPatchFormat().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementationGuide")) { + res.getImplementationGuide().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.getProfile().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rest")) { + res.getRest().add(parseCapabilityStatementCapabilityStatementRestComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("messaging")) { + res.getMessaging().add(parseCapabilityStatementCapabilityStatementMessagingComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("document")) { + res.getDocument().add(parseCapabilityStatementCapabilityStatementDocumentComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementCapabilityStatementSoftwareComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementSoftwareComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementSoftwareComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementSoftwareComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("releaseDate")) { + res.setReleaseDateElement(parseDateTime(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementImplementationComponent parseCapabilityStatementCapabilityStatementImplementationComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementImplementationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementImplementationComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementImplementationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementCapabilityStatementRestComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementRestComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementRestComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, CapabilityStatement.RestfulCapabilityMode.NULL, new CapabilityStatement.RestfulCapabilityModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("security")) { + res.setSecurity(parseCapabilityStatementCapabilityStatementRestSecurityComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.getResource().add(parseCapabilityStatementCapabilityStatementRestResourceComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { + res.getInteraction().add(parseCapabilityStatementSystemInteractionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { + res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.getOperation().add(parseCapabilityStatementCapabilityStatementRestOperationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compartment")) { + res.getCompartment().add(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementCapabilityStatementRestSecurityComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementRestSecurityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementRestSecurityComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cors")) { + res.setCorsElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.getService().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("certificate")) { + res.getCertificate().add(parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res = new CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementRestSecurityCertificateComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("blob")) { + res.setBlobElement(parseBase64Binary(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementCapabilityStatementRestResourceComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementRestResourceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementRestResourceComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { + res.getInteraction().add(parseCapabilityStatementResourceInteractionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versioning")) { + res.setVersioningElement(parseEnumeration(xpp, CapabilityStatement.ResourceVersionPolicy.NULL, new CapabilityStatement.ResourceVersionPolicyEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readHistory")) { + res.setReadHistoryElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("updateCreate")) { + res.setUpdateCreateElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalCreate")) { + res.setConditionalCreateElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalRead")) { + res.setConditionalReadElement(parseEnumeration(xpp, CapabilityStatement.ConditionalReadStatus.NULL, new CapabilityStatement.ConditionalReadStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalUpdate")) { + res.setConditionalUpdateElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalDelete")) { + res.setConditionalDeleteElement(parseEnumeration(xpp, CapabilityStatement.ConditionalDeleteStatus.NULL, new CapabilityStatement.ConditionalDeleteStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referencePolicy")) { + res.getReferencePolicy().add(parseEnumeration(xpp, CapabilityStatement.ReferenceHandlingPolicy.NULL, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchInclude")) { + res.getSearchInclude().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchRevInclude")) { + res.getSearchRevInclude().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { + res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementResourceInteractionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementResourceInteractionComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.ResourceInteractionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, CapabilityStatement.TypeRestfulInteraction.NULL, new CapabilityStatement.TypeRestfulInteractionEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinitionElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.SystemInteractionComponent parseCapabilityStatementSystemInteractionComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementSystemInteractionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementSystemInteractionComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.SystemInteractionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, CapabilityStatement.SystemRestfulInteraction.NULL, new CapabilityStatement.SystemRestfulInteractionEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementRestOperationComponent parseCapabilityStatementCapabilityStatementRestOperationComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementRestOperationComponent res = new CapabilityStatement.CapabilityStatementRestOperationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementRestOperationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementRestOperationComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinition(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementMessagingComponent parseCapabilityStatementCapabilityStatementMessagingComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementMessagingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementMessagingComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reliableCache")) { + res.setReliableCacheElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportedMessage")) { + res.getSupportedMessage().add(parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.getEvent().add(parseCapabilityStatementCapabilityStatementMessagingEventComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementMessagingEndpointComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementMessagingEndpointComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEndpointComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { + res.setProtocol(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.setAddressElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinition(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementMessagingEventComponent parseCapabilityStatementCapabilityStatementMessagingEventComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementMessagingEventComponent res = new CapabilityStatement.CapabilityStatementMessagingEventComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementMessagingEventComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementMessagingEventComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingEventComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategoryElement(parseEnumeration(xpp, CapabilityStatement.MessageSignificanceCategory.NULL, new CapabilityStatement.MessageSignificanceCategoryEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, CapabilityStatement.EventCapabilityMode.NULL, new CapabilityStatement.EventCapabilityModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { + res.setFocusElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CapabilityStatement.CapabilityStatementDocumentComponent parseCapabilityStatementCapabilityStatementDocumentComponent(XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { + CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCapabilityStatementCapabilityStatementDocumentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCapabilityStatementCapabilityStatementDocumentComponentContent(int eventType, XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementDocumentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, CapabilityStatement.DocumentMode.NULL, new CapabilityStatement.DocumentModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CarePlan parseCarePlan(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CarePlan res = new CarePlan(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCarePlanContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCarePlanContent(int eventType, XmlPullParser xpp, CarePlan res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { + res.getReplaces().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, CarePlan.CarePlanStatus.NULL, new CarePlan.CarePlanStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { + res.setIntentElement(parseEnumeration(xpp, CarePlan.CarePlanIntent.NULL, new CarePlan.CarePlanIntentEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.getAuthor().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { + res.getCareTeam().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { + res.getAddresses().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { + res.getSupportingInfo().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { + res.getGoal().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activity")) { + res.getActivity().add(parseCarePlanCarePlanActivityComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CarePlan.CarePlanActivityComponent parseCarePlanCarePlanActivityComponent(XmlPullParser xpp, CarePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { + CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCarePlanCarePlanActivityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCarePlanCarePlanActivityComponentContent(int eventType, XmlPullParser xpp, CarePlan owner, CarePlan.CarePlanActivityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeCodeableConcept")) { + res.getOutcomeCodeableConcept().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeReference")) { + res.getOutcomeReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("progress")) { + res.getProgress().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.setDetail(parseCarePlanCarePlanActivityDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CarePlan.CarePlanActivityDetailComponent parseCarePlanCarePlanActivityDetailComponent(XmlPullParser xpp, CarePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { + CarePlan.CarePlanActivityDetailComponent res = new CarePlan.CarePlanActivityDetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCarePlanCarePlanActivityDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCarePlanCarePlanActivityDetailComponentContent(int eventType, XmlPullParser xpp, CarePlan owner, CarePlan.CarePlanActivityDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, CarePlan.CarePlanActivityKind.NULL, new CarePlan.CarePlanActivityKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinition(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { + res.getGoal().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, CarePlan.CarePlanActivityStatus.NULL, new CarePlan.CarePlanActivityStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { + res.setStatusReasonElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prohibited")) { + res.setProhibitedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "scheduled")) { + res.setScheduled(parseType("scheduled", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { + res.setProduct(parseType("product", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dailyAmount")) { + res.setDailyAmount(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CareTeam parseCareTeam(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CareTeam res = new CareTeam(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCareTeamContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCareTeamContent(int eventType, XmlPullParser xpp, CareTeam res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, CareTeam.CareTeamStatus.NULL, new CareTeam.CareTeamStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseCareTeamCareTeamParticipantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { + res.getManagingOrganization().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CareTeam.CareTeamParticipantComponent parseCareTeamCareTeamParticipantComponent(XmlPullParser xpp, CareTeam owner) throws XmlPullParserException, IOException, FHIRFormatError { + CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCareTeamCareTeamParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCareTeamCareTeamParticipantComponentContent(int eventType, XmlPullParser xpp, CareTeam owner, CareTeam.CareTeamParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("member")) { + res.setMember(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CatalogEntry parseCatalogEntry(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CatalogEntry res = new CatalogEntry(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCatalogEntryContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCatalogEntryContent(int eventType, XmlPullParser xpp, CatalogEntry res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurpose(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referencedItem")) { + res.setReferencedItem(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalIdentifier")) { + res.getAdditionalIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { + res.getClassification().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatus(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { + res.setValidityPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastUpdated")) { + res.setLastUpdatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalCharacteristic")) { + res.getAdditionalCharacteristic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalClassification")) { + res.getAdditionalClassification().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedItem")) { + res.getRelatedItem().add(parseCatalogEntryCatalogEntryRelatedItemComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CatalogEntry.CatalogEntryRelatedItemComponent parseCatalogEntryCatalogEntryRelatedItemComponent(XmlPullParser xpp, CatalogEntry owner) throws XmlPullParserException, IOException, FHIRFormatError { + CatalogEntry.CatalogEntryRelatedItemComponent res = new CatalogEntry.CatalogEntryRelatedItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCatalogEntryCatalogEntryRelatedItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCatalogEntryCatalogEntryRelatedItemComponentContent(int eventType, XmlPullParser xpp, CatalogEntry owner, CatalogEntry.CatalogEntryRelatedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationtype")) { + res.setRelationtype(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.setItem(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ChargeItem parseChargeItem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ChargeItem res = new ChargeItem(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseChargeItemContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseChargeItemContent(int eventType, XmlPullParser xpp, ChargeItem res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ChargeItem.ChargeItemStatus.NULL, new ChargeItem.ChargeItemStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseChargeItemChargeItemParticipantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performingOrganization")) { + res.setPerformingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestingOrganization")) { + res.setRequestingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodysite")) { + res.getBodysite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factorOverride")) { + res.setFactorOverrideElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priceOverride")) { + res.setPriceOverride(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overrideReason")) { + res.setOverrideReasonElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { + res.setEnterer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enteredDate")) { + res.setEnteredDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.getService().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { + res.getAccount().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { + res.getSupportingInformation().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ChargeItem.ChargeItemParticipantComponent parseChargeItemChargeItemParticipantComponent(XmlPullParser xpp, ChargeItem owner) throws XmlPullParserException, IOException, FHIRFormatError { + ChargeItem.ChargeItemParticipantComponent res = new ChargeItem.ChargeItemParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseChargeItemChargeItemParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseChargeItemChargeItemParticipantComponentContent(int eventType, XmlPullParser xpp, ChargeItem owner, ChargeItem.ChargeItemParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim parseClaim(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Claim res = new Claim(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimContent(int eventType, XmlPullParser xpp, Claim res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Claim.ClaimStatus.NULL, new Claim.ClaimStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { + res.getSubType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, Claim.Use.NULL, new Claim.UseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("billablePeriod")) { + res.setBillablePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { + res.setEnterer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { + res.setInsurer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriority(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundsReserve")) { + res.setFundsReserve(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { + res.getRelated().add(parseClaimRelatedClaimComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescription")) { + res.setPrescription(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("originalPrescription")) { + res.setOriginalPrescription(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { + res.setPayee(parseClaimPayeeComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referral")) { + res.setReferral(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { + res.setFacility(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { + res.getCareTeam().add(parseClaimCareTeamComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("information")) { + res.getInformation().add(parseClaimSpecialConditionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { + res.getDiagnosis().add(parseClaimDiagnosisComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { + res.getProcedure().add(parseClaimProcedureComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { + res.getInsurance().add(parseClaimInsuranceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accident")) { + res.setAccident(parseClaimAccidentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("employmentImpacted")) { + res.setEmploymentImpacted(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { + res.setHospitalization(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseClaimItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { + res.setTotal(parseMoney(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimRelatedClaimComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimRelatedClaimComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.RelatedClaimComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { + res.setClaim(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationship(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseIdentifier(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.PayeeComponent parseClaimPayeeComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.PayeeComponent res = new Claim.PayeeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimPayeeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimPayeeComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.PayeeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { + res.setParty(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.CareTeamComponent parseClaimCareTeamComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.CareTeamComponent res = new Claim.CareTeamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimCareTeamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimCareTeamComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.CareTeamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { + res.setResponsibleElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { + res.setQualification(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.SpecialConditionComponent parseClaimSpecialConditionComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.SpecialConditionComponent res = new Claim.SpecialConditionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimSpecialConditionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimSpecialConditionComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.SpecialConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.DiagnosisComponent parseClaimDiagnosisComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.DiagnosisComponent res = new Claim.DiagnosisComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimDiagnosisComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimDiagnosisComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { + res.setDiagnosis(parseType("diagnosis", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageCode")) { + res.setPackageCode(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.ProcedureComponent parseClaimProcedureComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.ProcedureComponent res = new Claim.ProcedureComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimProcedureComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimProcedureComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.ProcedureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "procedure")) { + res.setProcedure(parseType("procedure", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.InsuranceComponent parseClaimInsuranceComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.InsuranceComponent res = new Claim.InsuranceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimInsuranceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimInsuranceComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { + res.setFocalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { + res.setBusinessArrangementElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { + res.getPreAuthRef().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { + res.setClaimResponse(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.AccidentComponent parseClaimAccidentComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.AccidentComponent res = new Claim.AccidentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimAccidentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimAccidentComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.AccidentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { + res.setLocation(parseType("location", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.ItemComponent parseClaimItemComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.ItemComponent res = new Claim.ItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimItemComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeamLinkId")) { + res.getCareTeamLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosisLinkId")) { + res.getDiagnosisLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureLinkId")) { + res.getProcedureLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationLinkId")) { + res.getInformationLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { + res.setRevenue(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { + res.getProgramCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { + res.setServiced(parseType("serviced", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { + res.setLocation(parseType("location", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.getUdi().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { + res.getSubSite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.getEncounter().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parseClaimDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.DetailComponent parseClaimDetailComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.DetailComponent res = new Claim.DetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimDetailComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.DetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { + res.setRevenue(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { + res.getProgramCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.getUdi().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { + res.getSubDetail().add(parseClaimSubDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Claim.SubDetailComponent parseClaimSubDetailComponent(XmlPullParser xpp, Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { + Claim.SubDetailComponent res = new Claim.SubDetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimSubDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimSubDetailComponentContent(int eventType, XmlPullParser xpp, Claim owner, Claim.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { + res.setRevenue(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { + res.getProgramCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.getUdi().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse parseClaimResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse res = new ClaimResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseContent(int eventType, XmlPullParser xpp, ClaimResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ClaimResponse.ClaimResponseStatus.NULL, new ClaimResponse.ClaimResponseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { + res.setInsurer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { + res.setRequestProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { + res.setRequestOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, ClaimResponse.RemittanceOutcome.NULL, new ClaimResponse.RemittanceOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { + res.setDispositionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payeeType")) { + res.setPayeeType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseClaimResponseItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addItem")) { + res.getAddItem().add(parseClaimResponseAddedItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { + res.getError().add(parseClaimResponseErrorComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalCost")) { + res.setTotalCost(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unallocDeductable")) { + res.setUnallocDeductable(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalBenefit")) { + res.setTotalBenefit(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { + res.setPayment(parseClaimResponsePaymentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reserved")) { + res.setReserved(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { + res.setForm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { + res.getProcessNote().add(parseClaimResponseNoteComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationRequest")) { + res.getCommunicationRequest().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { + res.getInsurance().add(parseClaimResponseInsuranceComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseItemComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.setSequenceLinkIdElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parseClaimResponseItemDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseAdjudicationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseAdjudicationComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.AdjudicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseDecimal(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseItemDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseItemDetailComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.ItemDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.setSequenceLinkIdElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { + res.getSubDetail().add(parseClaimResponseSubDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseSubDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseSubDetailComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.setSequenceLinkIdElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseAddedItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseAddedItemComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.AddedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.getSequenceLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequenceLinkId")) { + res.getDetailSequenceLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequenceLinkId")) { + res.getSubdetailSequenceLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fee")) { + res.setFee(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.ErrorComponent parseClaimResponseErrorComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseErrorComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseErrorComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.ErrorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.setSequenceLinkIdElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequenceLinkId")) { + res.setDetailSequenceLinkIdElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequenceLinkId")) { + res.setSubdetailSequenceLinkIdElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.PaymentComponent parseClaimResponsePaymentComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponsePaymentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponsePaymentComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.PaymentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustment")) { + res.setAdjustment(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustmentReason")) { + res.setAdjustmentReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.NoteComponent parseClaimResponseNoteComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseNoteComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseNoteComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.NoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { + res.setNumberElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguage(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(XmlPullParser xpp, ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClaimResponseInsuranceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClaimResponseInsuranceComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, ClaimResponse.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { + res.setFocalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { + res.setBusinessArrangementElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { + res.getPreAuthRef().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { + res.setClaimResponse(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClinicalImpression parseClinicalImpression(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ClinicalImpression res = new ClinicalImpression(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClinicalImpressionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClinicalImpressionContent(int eventType, XmlPullParser xpp, ClinicalImpression res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ClinicalImpression.ClinicalImpressionStatus.NULL, new ClinicalImpression.ClinicalImpressionStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { + res.setEffective(parseType("effective", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessor")) { + res.setAssessor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("previous")) { + res.setPrevious(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("problem")) { + res.getProblem().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("investigation")) { + res.getInvestigation().add(parseClinicalImpressionClinicalImpressionInvestigationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { + res.getProtocol().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("summary")) { + res.setSummaryElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("finding")) { + res.getFinding().add(parseClinicalImpressionClinicalImpressionFindingComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prognosisCodeableConcept")) { + res.getPrognosisCodeableConcept().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prognosisReference")) { + res.getPrognosisReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClinicalImpression.ClinicalImpressionInvestigationComponent parseClinicalImpressionClinicalImpressionInvestigationComponent(XmlPullParser xpp, ClinicalImpression owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClinicalImpression.ClinicalImpressionInvestigationComponent res = new ClinicalImpression.ClinicalImpressionInvestigationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClinicalImpressionClinicalImpressionInvestigationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClinicalImpressionClinicalImpressionInvestigationComponentContent(int eventType, XmlPullParser xpp, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionInvestigationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionClinicalImpressionFindingComponent(XmlPullParser xpp, ClinicalImpression owner) throws XmlPullParserException, IOException, FHIRFormatError { + ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseClinicalImpressionClinicalImpressionFindingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseClinicalImpressionClinicalImpressionFindingComponentContent(int eventType, XmlPullParser xpp, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionFindingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { + res.setItem(parseType("item", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basis")) { + res.setBasisElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeSystem parseCodeSystem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CodeSystem res = new CodeSystem(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeSystemContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeSystemContent(int eventType, XmlPullParser xpp, CodeSystem res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("caseSensitive")) { + res.setCaseSensitiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { + res.setValueSetElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hierarchyMeaning")) { + res.setHierarchyMeaningElement(parseEnumeration(xpp, CodeSystem.CodeSystemHierarchyMeaning.NULL, new CodeSystem.CodeSystemHierarchyMeaningEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositional")) { + res.setCompositionalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionNeeded")) { + res.setVersionNeededElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.setContentElement(parseEnumeration(xpp, CodeSystem.CodeSystemContentMode.NULL, new CodeSystem.CodeSystemContentModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { + res.setCountElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { + res.getFilter().add(parseCodeSystemCodeSystemFilterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { + res.getProperty().add(parseCodeSystemPropertyComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { + res.getConcept().add(parseCodeSystemConceptDefinitionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeSystem.CodeSystemFilterComponent parseCodeSystemCodeSystemFilterComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { + CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeSystemCodeSystemFilterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeSystemCodeSystemFilterComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.CodeSystemFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { + res.getOperator().add(parseEnumeration(xpp, CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeSystem.PropertyComponent parseCodeSystemPropertyComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { + CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeSystemPropertyComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeSystemPropertyComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.PropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { + res.setUriElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, CodeSystem.PropertyType.NULL, new CodeSystem.PropertyTypeEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeSystem.ConceptDefinitionComponent parseCodeSystemConceptDefinitionComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { + CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeSystemConceptDefinitionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeSystemConceptDefinitionComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.ConceptDefinitionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinitionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { + res.getDesignation().add(parseCodeSystemConceptDefinitionDesignationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { + res.getProperty().add(parseCodeSystemConceptPropertyComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { + res.getConcept().add(parseCodeSystemConceptDefinitionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { + CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeSystemConceptDefinitionDesignationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeSystemConceptDefinitionDesignationComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.ConceptDefinitionDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUse(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { + CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCodeSystemConceptPropertyComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCodeSystemConceptPropertyComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, CodeSystem.ConceptPropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Communication parseCommunication(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Communication res = new Communication(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCommunicationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCommunicationContent(int eventType, XmlPullParser xpp, Communication res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inResponseTo")) { + res.getInResponseTo().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Communication.CommunicationStatus.NULL, new Communication.CommunicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDone")) { + res.setNotDoneElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDoneReason")) { + res.setNotDoneReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, Communication.CommunicationPriority.NULL, new Communication.CommunicationPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medium")) { + res.getMedium().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { + res.getRecipient().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sent")) { + res.setSentElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("received")) { + res.setReceivedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { + res.setSender(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { + res.getPayload().add(parseCommunicationCommunicationPayloadComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Communication.CommunicationPayloadComponent parseCommunicationCommunicationPayloadComponent(XmlPullParser xpp, Communication owner) throws XmlPullParserException, IOException, FHIRFormatError { + Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCommunicationCommunicationPayloadComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCommunicationCommunicationPayloadComponentContent(int eventType, XmlPullParser xpp, Communication owner, Communication.CommunicationPayloadComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { + res.setContent(parseType("content", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CommunicationRequest parseCommunicationRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CommunicationRequest res = new CommunicationRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCommunicationRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCommunicationRequestContent(int eventType, XmlPullParser xpp, CommunicationRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { + res.getReplaces().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { + res.setGroupIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, CommunicationRequest.CommunicationRequestStatus.NULL, new CommunicationRequest.CommunicationRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, CommunicationRequest.CommunicationPriority.NULL, new CommunicationRequest.CommunicationPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medium")) { + res.getMedium().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { + res.getRecipient().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { + res.getPayload().add(parseCommunicationRequestCommunicationRequestPayloadComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { + res.setSender(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { + res.setRequester(parseCommunicationRequestCommunicationRequestRequesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestCommunicationRequestPayloadComponent(XmlPullParser xpp, CommunicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCommunicationRequestCommunicationRequestPayloadComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCommunicationRequestCommunicationRequestPayloadComponentContent(int eventType, XmlPullParser xpp, CommunicationRequest owner, CommunicationRequest.CommunicationRequestPayloadComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { + res.setContent(parseType("content", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CommunicationRequest.CommunicationRequestRequesterComponent parseCommunicationRequestCommunicationRequestRequesterComponent(XmlPullParser xpp, CommunicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + CommunicationRequest.CommunicationRequestRequesterComponent res = new CommunicationRequest.CommunicationRequestRequesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCommunicationRequestCommunicationRequestRequesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCommunicationRequestCommunicationRequestRequesterComponentContent(int eventType, XmlPullParser xpp, CommunicationRequest owner, CommunicationRequest.CommunicationRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.setAgent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected CompartmentDefinition parseCompartmentDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + CompartmentDefinition res = new CompartmentDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompartmentDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompartmentDefinitionContent(int eventType, XmlPullParser xpp, CompartmentDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, CompartmentDefinition.CompartmentType.NULL, new CompartmentDefinition.CompartmentTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("search")) { + res.setSearchElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.getResource().add(parseCompartmentDefinitionCompartmentDefinitionResourceComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionCompartmentDefinitionResourceComponent(XmlPullParser xpp, CompartmentDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompartmentDefinitionCompartmentDefinitionResourceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompartmentDefinitionCompartmentDefinitionResourceComponentContent(int eventType, XmlPullParser xpp, CompartmentDefinition owner, CompartmentDefinition.CompartmentDefinitionResourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { + res.getParam().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Composition parseComposition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Composition res = new Composition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompositionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompositionContent(int eventType, XmlPullParser xpp, Composition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Composition.CompositionStatus.NULL, new Composition.CompositionStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.setClass_(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.getAuthor().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("confidentiality")) { + res.setConfidentialityElement(parseEnumeration(xpp, Composition.DocumentConfidentiality.NULL, new Composition.DocumentConfidentialityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attester")) { + res.getAttester().add(parseCompositionCompositionAttesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { + res.setCustodian(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatesTo")) { + res.getRelatesTo().add(parseCompositionCompositionRelatesToComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.getEvent().add(parseCompositionCompositionEventComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("section")) { + res.getSection().add(parseCompositionSectionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Composition.CompositionAttesterComponent parseCompositionCompositionAttesterComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { + Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompositionCompositionAttesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompositionCompositionAttesterComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.CompositionAttesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.getMode().add(parseEnumeration(xpp, Composition.CompositionAttestationMode.NULL, new Composition.CompositionAttestationModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { + res.setTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { + res.setParty(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Composition.CompositionRelatesToComponent parseCompositionCompositionRelatesToComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { + Composition.CompositionRelatesToComponent res = new Composition.CompositionRelatesToComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompositionCompositionRelatesToComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompositionCompositionRelatesToComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.CompositionRelatesToComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, Composition.DocumentRelationshipType.NULL, new Composition.DocumentRelationshipTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "target")) { + res.setTarget(parseType("target", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Composition.CompositionEventComponent parseCompositionCompositionEventComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { + Composition.CompositionEventComponent res = new Composition.CompositionEventComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompositionCompositionEventComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompositionCompositionEventComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.CompositionEventComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Composition.SectionComponent parseCompositionSectionComponent(XmlPullParser xpp, Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { + Composition.SectionComponent res = new Composition.SectionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCompositionSectionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCompositionSectionComponentContent(int eventType, XmlPullParser xpp, Composition owner, Composition.SectionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setText(parseNarrative(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, Composition.SectionMode.NULL, new Composition.SectionModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedBy")) { + res.setOrderedBy(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { + res.getEntry().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("emptyReason")) { + res.setEmptyReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("section")) { + res.getSection().add(parseCompositionSectionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ConceptMap parseConceptMap(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ConceptMap res = new ConceptMap(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConceptMapContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConceptMapContent(int eventType, XmlPullParser xpp, ConceptMap res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { + res.setSource(parseType("source", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "target")) { + res.setTarget(parseType("target", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { + res.getGroup().add(parseConceptMapConceptMapGroupComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ConceptMap.ConceptMapGroupComponent parseConceptMapConceptMapGroupComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConceptMapConceptMapGroupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConceptMapConceptMapGroupComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.ConceptMapGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSourceElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceVersion")) { + res.setSourceVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTargetElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetVersion")) { + res.setTargetVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { + res.getElement().add(parseConceptMapSourceElementComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unmapped")) { + res.setUnmapped(parseConceptMapConceptMapGroupUnmappedComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConceptMapSourceElementComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConceptMapSourceElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.SourceElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.getTarget().add(parseConceptMapTargetElementComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConceptMapTargetElementComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConceptMapTargetElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.TargetElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("equivalence")) { + res.setEquivalenceElement(parseEnumeration(xpp, Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependsOn")) { + res.getDependsOn().add(parseConceptMapOtherElementComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("product")) { + res.getProduct().add(parseConceptMapOtherElementComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConceptMapOtherElementComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConceptMapOtherElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.OtherElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { + res.setPropertyElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapConceptMapGroupUnmappedComponent(XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConceptMapConceptMapGroupUnmappedComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConceptMapConceptMapGroupUnmappedComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, ConceptMap.ConceptMapGroupUnmappedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, ConceptMap.ConceptMapGroupUnmappedMode.NULL, new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Condition parseCondition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Condition res = new Condition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConditionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConditionContent(int eventType, XmlPullParser xpp, Condition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalStatus")) { + res.setClinicalStatusElement(parseEnumeration(xpp, Condition.ConditionClinicalStatus.NULL, new Condition.ConditionClinicalStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationStatus")) { + res.setVerificationStatusElement(parseEnumeration(xpp, Condition.ConditionVerificationStatus.NULL, new Condition.ConditionVerificationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { + res.setSeverity(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.getBodySite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { + res.setOnset(parseType("onset", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "abatement")) { + res.setAbatement(parseType("abatement", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assertedDate")) { + res.setAssertedDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { + res.setAsserter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stage")) { + res.getStage().add(parseConditionConditionStageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evidence")) { + res.getEvidence().add(parseConditionConditionEvidenceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Condition.ConditionStageComponent parseConditionConditionStageComponent(XmlPullParser xpp, Condition owner) throws XmlPullParserException, IOException, FHIRFormatError { + Condition.ConditionStageComponent res = new Condition.ConditionStageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConditionConditionStageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConditionConditionStageComponentContent(int eventType, XmlPullParser xpp, Condition owner, Condition.ConditionStageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("summary")) { + res.setSummary(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessment")) { + res.getAssessment().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Condition.ConditionEvidenceComponent parseConditionConditionEvidenceComponent(XmlPullParser xpp, Condition owner) throws XmlPullParserException, IOException, FHIRFormatError { + Condition.ConditionEvidenceComponent res = new Condition.ConditionEvidenceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConditionConditionEvidenceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConditionConditionEvidenceComponentContent(int eventType, XmlPullParser xpp, Condition owner, Condition.ConditionEvidenceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Consent parseConsent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Consent res = new Consent(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConsentContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConsentContent(int eventType, XmlPullParser xpp, Consent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Consent.ConsentState.NULL, new Consent.ConsentStateEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateTime")) { + res.setDateTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("consentingParty")) { + res.getConsentingParty().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.getOrganization().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { + res.setSource(parseType("source", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { + res.getPolicy().add(parseConsentConsentPolicyComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policyRule")) { + res.setPolicyRule(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verification")) { + res.getVerification().add(parseConsentConsentVerificationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provision")) { + res.getProvision().add(parseConsentprovisionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Consent.ConsentPolicyComponent parseConsentConsentPolicyComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { + Consent.ConsentPolicyComponent res = new Consent.ConsentPolicyComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConsentConsentPolicyComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConsentConsentPolicyComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.ConsentPolicyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { + res.setAuthorityElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { + res.setUriElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Consent.ConsentVerificationComponent parseConsentConsentVerificationComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { + Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConsentConsentVerificationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConsentConsentVerificationComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.ConsentVerificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verified")) { + res.setVerifiedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verifiedWith")) { + res.setVerifiedWith(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationDate")) { + res.setVerificationDateElement(parseDateTime(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Consent.provisionComponent parseConsentprovisionComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { + Consent.provisionComponent res = new Consent.provisionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConsentprovisionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConsentprovisionComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.provisionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Consent.ConsentProvisionType.NULL, new Consent.ConsentProvisionTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.getActor().add(parseConsentprovisionActorComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { + res.getSecurityLabel().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.getPurpose().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.getClass_().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataPeriod")) { + res.setDataPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { + res.getData().add(parseConsentprovisionDataComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provision")) { + res.getProvision().add(parseConsentprovisionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Consent.provisionActorComponent parseConsentprovisionActorComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { + Consent.provisionActorComponent res = new Consent.provisionActorComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConsentprovisionActorComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConsentprovisionActorComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.provisionActorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Consent.provisionDataComponent parseConsentprovisionDataComponent(XmlPullParser xpp, Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { + Consent.provisionDataComponent res = new Consent.provisionDataComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseConsentprovisionDataComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseConsentprovisionDataComponentContent(int eventType, XmlPullParser xpp, Consent owner, Consent.provisionDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaning")) { + res.setMeaningElement(parseEnumeration(xpp, Consent.ConsentDataMeaning.NULL, new Consent.ConsentDataMeaningEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract parseContract(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Contract res = new Contract(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractContent(int eventType, XmlPullParser xpp, Contract res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Contract.ContractStatus.NULL, new Contract.ContractStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentDerivative")) { + res.setContentDerivative(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { + res.setIssuedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applies")) { + res.setApplies(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.getSubject().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { + res.getAuthority().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { + res.getDomain().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { + res.getSubType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { + res.getTerm().add(parseContractTermComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signer")) { + res.getSigner().add(parseContractSignatoryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("friendly")) { + res.getFriendly().add(parseContractFriendlyLanguageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legal")) { + res.getLegal().add(parseContractLegalLanguageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.setRule(parseContractComputableLanguageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "legallyBinding")) { + res.setLegallyBinding(parseType("legallyBinding", xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.TermComponent parseContractTermComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.TermComponent res = new Contract.TermComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractTermComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractTermComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.TermComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { + res.setIssuedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applies")) { + res.setApplies(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { + res.setSubType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offer")) { + res.setOffer(parseContractContractOfferComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asset")) { + res.getAsset().add(parseContractContractAssetComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.getAgent().add(parseContractAgentComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionReason")) { + res.getActionReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { + res.getGroup().add(parseContractTermComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.ContractOfferComponent parseContractContractOfferComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.ContractOfferComponent res = new Contract.ContractOfferComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractContractOfferComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractContractOfferComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ContractOfferComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.setTopic(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("decision")) { + res.setDecision(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { + res.setLinkIdElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.ContractAssetComponent parseContractContractAssetComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.ContractAssetComponent res = new Contract.ContractAssetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractContractAssetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractContractAssetComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ContractAssetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.setClass_(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataPeriod")) { + res.setDataPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { + res.getData().add(parseContractAssetDataComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valuedItem")) { + res.getValuedItem().add(parseContractValuedItemComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { + res.getSecurityLabel().add(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.AssetDataComponent parseContractAssetDataComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.AssetDataComponent res = new Contract.AssetDataComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractAssetDataComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractAssetDataComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.AssetDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaning")) { + res.setMeaningElement(parseEnumeration(xpp, Contract.ContractDataMeaning.NULL, new Contract.ContractDataMeaningEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.ValuedItemComponent parseContractValuedItemComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.ValuedItemComponent res = new Contract.ValuedItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractValuedItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractValuedItemComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ValuedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "entity")) { + res.setEntity(parseType("entity", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectiveTime")) { + res.setEffectiveTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("points")) { + res.setPointsElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.AgentComponent parseContractAgentComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.AgentComponent res = new Contract.AgentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractAgentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractAgentComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.AgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.getRole().add(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.SignatoryComponent parseContractSignatoryComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.SignatoryComponent res = new Contract.SignatoryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractSignatoryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractSignatoryComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.SignatoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { + res.setParty(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { + res.getSignature().add(parseSignature(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractFriendlyLanguageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractFriendlyLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.FriendlyLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { + res.setContent(parseType("content", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractLegalLanguageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractLegalLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.LegalLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { + res.setContent(parseType("content", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(XmlPullParser xpp, Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { + Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseContractComputableLanguageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseContractComputableLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, Contract.ComputableLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { + res.setContent(parseType("content", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Coverage parseCoverage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Coverage res = new Coverage(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCoverageContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCoverageContent(int eventType, XmlPullParser xpp, Coverage res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Coverage.CoverageStatus.NULL, new Coverage.CoverageStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policyHolder")) { + res.setPolicyHolder(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subscriber")) { + res.setSubscriber(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subscriberId")) { + res.setSubscriberIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("beneficiary")) { + res.setBeneficiary(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationship(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payor")) { + res.getPayor().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("grouping")) { + res.setGrouping(parseCoverageGroupComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependent")) { + res.setDependentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("order")) { + res.setOrderElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { + res.setNetworkElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contract")) { + res.getContract().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Coverage.GroupComponent parseCoverageGroupComponent(XmlPullParser xpp, Coverage owner) throws XmlPullParserException, IOException, FHIRFormatError { + Coverage.GroupComponent res = new Coverage.GroupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseCoverageGroupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseCoverageGroupComponentContent(int eventType, XmlPullParser xpp, Coverage owner, Coverage.GroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { + res.setGroupElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupDisplay")) { + res.setGroupDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subGroup")) { + res.setSubGroupElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subGroupDisplay")) { + res.setSubGroupDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("plan")) { + res.setPlanElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("planDisplay")) { + res.setPlanDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subPlan")) { + res.setSubPlanElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subPlanDisplay")) { + res.setSubPlanDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.setClass_Element(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classDisplay")) { + res.setClassDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subClass")) { + res.setSubClassElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subClassDisplay")) { + res.setSubClassDisplayElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DetectedIssue parseDetectedIssue(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DetectedIssue res = new DetectedIssue(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDetectedIssueContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDetectedIssueContent(int eventType, XmlPullParser xpp, DetectedIssue res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, DetectedIssue.DetectedIssueStatus.NULL, new DetectedIssue.DetectedIssueStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { + res.setSeverityElement(parseEnumeration(xpp, DetectedIssue.DetectedIssueSeverity.NULL, new DetectedIssue.DetectedIssueSeverityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implicated")) { + res.getImplicated().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.setDetailElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReferenceElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mitigation")) { + res.getMitigation().add(parseDetectedIssueDetectedIssueMitigationComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueDetectedIssueMitigationComponent(XmlPullParser xpp, DetectedIssue owner) throws XmlPullParserException, IOException, FHIRFormatError { + DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDetectedIssueDetectedIssueMitigationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDetectedIssueDetectedIssueMitigationComponentContent(int eventType, XmlPullParser xpp, DetectedIssue owner, DetectedIssue.DetectedIssueMitigationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.setAction(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Device parseDevice(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Device res = new Device(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceContent(int eventType, XmlPullParser xpp, Device res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.setUdi(parseDeviceDeviceUdiComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Device.FHIRDeviceStatus.NULL, new Device.FHIRDeviceStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { + res.setLotNumberElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { + res.setManufacturerElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufactureDate")) { + res.setManufactureDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { + res.setExpirationDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("model")) { + res.setModelElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { + res.setOwner(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("safety")) { + res.getSafety().add(parseCodeableConcept(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Device.DeviceUdiComponent parseDeviceDeviceUdiComponent(XmlPullParser xpp, Device owner) throws XmlPullParserException, IOException, FHIRFormatError { + Device.DeviceUdiComponent res = new Device.DeviceUdiComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceDeviceUdiComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceDeviceUdiComponentContent(int eventType, XmlPullParser xpp, Device owner, Device.DeviceUdiComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceIdentifier")) { + res.setDeviceIdentifierElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.setJurisdictionElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("carrierHRF")) { + res.setCarrierHRFElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("carrierAIDC")) { + res.setCarrierAIDCElement(parseBase64Binary(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { + res.setIssuerElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entryType")) { + res.setEntryTypeElement(parseEnumeration(xpp, Device.UDIEntryType.NULL, new Device.UDIEntryTypeEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceComponent parseDeviceComponent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceComponent res = new DeviceComponent(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceComponentContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceComponentContent(int eventType, XmlPullParser xpp, DeviceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastSystemChange")) { + res.setLastSystemChangeElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { + res.setParent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { + res.getOperationalStatus().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameterGroup")) { + res.setParameterGroup(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPrinciple")) { + res.setMeasurementPrincipleElement(parseEnumeration(xpp, DeviceComponent.MeasmntPrinciple.NULL, new DeviceComponent.MeasmntPrincipleEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productionSpecification")) { + res.getProductionSpecification().add(parseDeviceComponentDeviceComponentProductionSpecificationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("languageCode")) { + res.setLanguageCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { + res.getProperty().add(parseDeviceComponentDeviceComponentPropertyComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceComponent.DeviceComponentProductionSpecificationComponent parseDeviceComponentDeviceComponentProductionSpecificationComponent(XmlPullParser xpp, DeviceComponent owner) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceComponent.DeviceComponentProductionSpecificationComponent res = new DeviceComponent.DeviceComponentProductionSpecificationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceComponentDeviceComponentProductionSpecificationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceComponentDeviceComponentProductionSpecificationComponentContent(int eventType, XmlPullParser xpp, DeviceComponent owner, DeviceComponent.DeviceComponentProductionSpecificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specType")) { + res.setSpecType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("componentId")) { + res.setComponentId(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productionSpec")) { + res.setProductionSpecElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceComponent.DeviceComponentPropertyComponent parseDeviceComponentDeviceComponentPropertyComponent(XmlPullParser xpp, DeviceComponent owner) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceComponent.DeviceComponentPropertyComponent res = new DeviceComponent.DeviceComponentPropertyComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceComponentDeviceComponentPropertyComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceComponentDeviceComponentPropertyComponentContent(int eventType, XmlPullParser xpp, DeviceComponent owner, DeviceComponent.DeviceComponentPropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueQuantity")) { + res.getValueQuantity().add(parseQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueCode")) { + res.getValueCode().add(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceMetric parseDeviceMetric(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceMetric res = new DeviceMetric(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceMetricContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceMetricContent(int eventType, XmlPullParser xpp, DeviceMetric res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { + res.setUnit(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { + res.setParent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { + res.setOperationalStatusElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricOperationalStatus.NULL, new DeviceMetric.DeviceMetricOperationalStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { + res.setColorElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricColor.NULL, new DeviceMetric.DeviceMetricColorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategoryElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCategory.NULL, new DeviceMetric.DeviceMetricCategoryEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPeriod")) { + res.setMeasurementPeriod(parseTiming(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("calibration")) { + res.getCalibration().add(parseDeviceMetricDeviceMetricCalibrationComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricDeviceMetricCalibrationComponent(XmlPullParser xpp, DeviceMetric owner) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceMetricDeviceMetricCalibrationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceMetricDeviceMetricCalibrationComponentContent(int eventType, XmlPullParser xpp, DeviceMetric owner, DeviceMetric.DeviceMetricCalibrationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCalibrationType.NULL, new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("state")) { + res.setStateElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCalibrationState.NULL, new DeviceMetric.DeviceMetricCalibrationStateEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { + res.setTimeElement(parseInstant(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceRequest parseDeviceRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceRequest res = new DeviceRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceRequestContent(int eventType, XmlPullParser xpp, DeviceRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priorRequest")) { + res.getPriorRequest().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { + res.setGroupIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, DeviceRequest.DeviceRequestStatus.NULL, new DeviceRequest.DeviceRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { + res.setIntent(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, DeviceRequest.RequestPriority.NULL, new DeviceRequest.RequestPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "code")) { + res.setCode(parseType("code", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { + res.setRequester(parseDeviceRequestDeviceRequestRequesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { + res.setPerformerType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { + res.getSupportingInfo().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { + res.getRelevantHistory().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceRequest.DeviceRequestRequesterComponent parseDeviceRequestDeviceRequestRequesterComponent(XmlPullParser xpp, DeviceRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceRequest.DeviceRequestRequesterComponent res = new DeviceRequest.DeviceRequestRequesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceRequestDeviceRequestRequesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceRequestDeviceRequestRequesterComponentContent(int eventType, XmlPullParser xpp, DeviceRequest owner, DeviceRequest.DeviceRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.setAgent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DeviceUseStatement parseDeviceUseStatement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DeviceUseStatement res = new DeviceUseStatement(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDeviceUseStatementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDeviceUseStatementContent(int eventType, XmlPullParser xpp, DeviceUseStatement res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, DeviceUseStatement.DeviceUseStatementStatus.NULL, new DeviceUseStatement.DeviceUseStatementStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenUsed")) { + res.setWhenUsed(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recordedOn")) { + res.setRecordedOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { + res.setDevice(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("indication")) { + res.getIndication().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DiagnosticReport parseDiagnosticReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DiagnosticReport res = new DiagnosticReport(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDiagnosticReportContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDiagnosticReportContent(int eventType, XmlPullParser xpp, DiagnosticReport res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, DiagnosticReport.DiagnosticReportStatus.NULL, new DiagnosticReport.DiagnosticReportStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { + res.setEffective(parseType("effective", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { + res.setIssuedElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultsInterpreter")) { + res.getResultsInterpreter().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { + res.getSpecimen().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { + res.getResult().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imagingStudy")) { + res.getImagingStudy().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { + res.getImage().add(parseDiagnosticReportDiagnosticReportImageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conclusion")) { + res.setConclusionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codedDiagnosis")) { + res.getCodedDiagnosis().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("presentedForm")) { + res.getPresentedForm().add(parseAttachment(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DiagnosticReport.DiagnosticReportImageComponent parseDiagnosticReportDiagnosticReportImageComponent(XmlPullParser xpp, DiagnosticReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + DiagnosticReport.DiagnosticReportImageComponent res = new DiagnosticReport.DiagnosticReportImageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDiagnosticReportDiagnosticReportImageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDiagnosticReportDiagnosticReportImageComponentContent(int eventType, XmlPullParser xpp, DiagnosticReport owner, DiagnosticReport.DiagnosticReportImageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.setLink(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentManifest parseDocumentManifest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentManifest res = new DocumentManifest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentManifestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentManifestContent(int eventType, XmlPullParser xpp, DocumentManifest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterIdentifier")) { + res.setMasterIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.getAgent().add(parseDocumentManifestDocumentManifestAgentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { + res.getRecipient().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSourceElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.getContent().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { + res.getRelated().add(parseDocumentManifestDocumentManifestRelatedComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentManifest.DocumentManifestAgentComponent parseDocumentManifestDocumentManifestAgentComponent(XmlPullParser xpp, DocumentManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentManifest.DocumentManifestAgentComponent res = new DocumentManifest.DocumentManifestAgentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentManifestDocumentManifestAgentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentManifestDocumentManifestAgentComponentContent(int eventType, XmlPullParser xpp, DocumentManifest owner, DocumentManifest.DocumentManifestAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { + res.setWho(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentManifest.DocumentManifestRelatedComponent parseDocumentManifestDocumentManifestRelatedComponent(XmlPullParser xpp, DocumentManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentManifest.DocumentManifestRelatedComponent res = new DocumentManifest.DocumentManifestRelatedComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentManifestDocumentManifestRelatedComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentManifestDocumentManifestRelatedComponentContent(int eventType, XmlPullParser xpp, DocumentManifest owner, DocumentManifest.DocumentManifestRelatedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ref")) { + res.setRef(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentReference parseDocumentReference(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentReference res = new DocumentReference(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentReferenceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentReferenceContent(int eventType, XmlPullParser xpp, DocumentReference res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterIdentifier")) { + res.setMasterIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.DocumentReferenceStatus.NULL, new Enumerations.DocumentReferenceStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("docStatus")) { + res.setDocStatusElement(parseEnumeration(xpp, DocumentReference.ReferredDocumentStatus.NULL, new DocumentReference.ReferredDocumentStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.setClass_(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.getAgent().add(parseDocumentReferenceDocumentReferenceAgentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authenticator")) { + res.setAuthenticator(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { + res.setCustodian(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatesTo")) { + res.getRelatesTo().add(parseDocumentReferenceDocumentReferenceRelatesToComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { + res.getSecurityLabel().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.getContent().add(parseDocumentReferenceDocumentReferenceContentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseDocumentReferenceDocumentReferenceContextComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentReference.DocumentReferenceAgentComponent parseDocumentReferenceDocumentReferenceAgentComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentReference.DocumentReferenceAgentComponent res = new DocumentReference.DocumentReferenceAgentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentReferenceDocumentReferenceAgentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentReferenceDocumentReferenceAgentComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { + res.setWho(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceDocumentReferenceRelatesToComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentReferenceDocumentReferenceRelatesToComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentReferenceDocumentReferenceRelatesToComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceRelatesToComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, DocumentReference.DocumentRelationshipType.NULL, new DocumentReference.DocumentRelationshipTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceDocumentReferenceContentComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentReferenceDocumentReferenceContentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentReferenceDocumentReferenceContentComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceContentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attachment")) { + res.setAttachment(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { + res.setFormat(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentReference.DocumentReferenceContextComponent parseDocumentReferenceDocumentReferenceContextComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentReference.DocumentReferenceContextComponent res = new DocumentReference.DocumentReferenceContextComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentReferenceDocumentReferenceContextComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentReferenceDocumentReferenceContextComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceContextComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.getEvent().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facilityType")) { + res.setFacilityType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practiceSetting")) { + res.setPracticeSetting(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourcePatientInfo")) { + res.setSourcePatientInfo(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { + res.getRelated().add(parseDocumentReferenceDocumentReferenceContextRelatedComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected DocumentReference.DocumentReferenceContextRelatedComponent parseDocumentReferenceDocumentReferenceContextRelatedComponent(XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { + DocumentReference.DocumentReferenceContextRelatedComponent res = new DocumentReference.DocumentReferenceContextRelatedComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseDocumentReferenceDocumentReferenceContextRelatedComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseDocumentReferenceDocumentReferenceContextRelatedComponentContent(int eventType, XmlPullParser xpp, DocumentReference owner, DocumentReference.DocumentReferenceContextRelatedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ref")) { + res.setRef(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected EligibilityRequest parseEligibilityRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + EligibilityRequest res = new EligibilityRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEligibilityRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEligibilityRequestContent(int eventType, XmlPullParser xpp, EligibilityRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, EligibilityRequest.EligibilityRequestStatus.NULL, new EligibilityRequest.EligibilityRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriority(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { + res.setServiced(parseType("serviced", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { + res.setEnterer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { + res.setInsurer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { + res.setFacility(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { + res.setBusinessArrangementElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitCategory")) { + res.setBenefitCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitSubCategory")) { + res.setBenefitSubCategory(parseCodeableConcept(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected EligibilityResponse parseEligibilityResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + EligibilityResponse res = new EligibilityResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEligibilityResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEligibilityResponseContent(int eventType, XmlPullParser xpp, EligibilityResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, EligibilityResponse.EligibilityResponseStatus.NULL, new EligibilityResponse.EligibilityResponseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { + res.setRequestProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { + res.setRequestOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { + res.setDispositionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { + res.setInsurer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inforce")) { + res.setInforceElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { + res.getInsurance().add(parseEligibilityResponseInsuranceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { + res.setForm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { + res.getError().add(parseEligibilityResponseErrorsComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected EligibilityResponse.InsuranceComponent parseEligibilityResponseInsuranceComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + EligibilityResponse.InsuranceComponent res = new EligibilityResponse.InsuranceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEligibilityResponseInsuranceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEligibilityResponseInsuranceComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contract")) { + res.setContract(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitBalance")) { + res.getBenefitBalance().add(parseEligibilityResponseBenefitsComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected EligibilityResponse.BenefitsComponent parseEligibilityResponseBenefitsComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + EligibilityResponse.BenefitsComponent res = new EligibilityResponse.BenefitsComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEligibilityResponseBenefitsComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEligibilityResponseBenefitsComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.BenefitsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subCategory")) { + res.setSubCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excluded")) { + res.setExcludedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { + res.setNetwork(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { + res.setUnit(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { + res.setTerm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("financial")) { + res.getFinancial().add(parseEligibilityResponseBenefitComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected EligibilityResponse.BenefitComponent parseEligibilityResponseBenefitComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + EligibilityResponse.BenefitComponent res = new EligibilityResponse.BenefitComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEligibilityResponseBenefitComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEligibilityResponseBenefitComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.BenefitComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { + res.setAllowed(parseType("allowed", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "used")) { + res.setUsed(parseType("used", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected EligibilityResponse.ErrorsComponent parseEligibilityResponseErrorsComponent(XmlPullParser xpp, EligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + EligibilityResponse.ErrorsComponent res = new EligibilityResponse.ErrorsComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEligibilityResponseErrorsComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEligibilityResponseErrorsComponentContent(int eventType, XmlPullParser xpp, EligibilityResponse owner, EligibilityResponse.ErrorsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter parseEncounter(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter res = new Encounter(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterContent(int eventType, XmlPullParser xpp, Encounter res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusHistory")) { + res.getStatusHistory().add(parseEncounterStatusHistoryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.setClass_(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classHistory")) { + res.getClassHistory().add(parseEncounterClassHistoryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriority(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("episodeOfCare")) { + res.getEpisodeOfCare().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("incomingReferral")) { + res.getIncomingReferral().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseEncounterEncounterParticipantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointment")) { + res.setAppointment(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { + res.setLength(parseDuration(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { + res.getDiagnosis().add(parseEncounterDiagnosisComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { + res.getAccount().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { + res.setHospitalization(parseEncounterEncounterHospitalizationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.getLocation().add(parseEncounterEncounterLocationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceProvider")) { + res.setServiceProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.setPartOf(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter.StatusHistoryComponent parseEncounterStatusHistoryComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter.StatusHistoryComponent res = new Encounter.StatusHistoryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterStatusHistoryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterStatusHistoryComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.StatusHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter.ClassHistoryComponent parseEncounterClassHistoryComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter.ClassHistoryComponent res = new Encounter.ClassHistoryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterClassHistoryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterClassHistoryComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.ClassHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { + res.setClass_(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter.EncounterParticipantComponent parseEncounterEncounterParticipantComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterEncounterParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterEncounterParticipantComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.EncounterParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("individual")) { + res.setIndividual(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterDiagnosisComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterDiagnosisComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.setCondition(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { + res.setRankElement(parsePositiveInt(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter.EncounterHospitalizationComponent parseEncounterEncounterHospitalizationComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter.EncounterHospitalizationComponent res = new Encounter.EncounterHospitalizationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterEncounterHospitalizationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterEncounterHospitalizationComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.EncounterHospitalizationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAdmissionIdentifier")) { + res.setPreAdmissionIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { + res.setOrigin(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("admitSource")) { + res.setAdmitSource(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reAdmission")) { + res.setReAdmission(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dietPreference")) { + res.getDietPreference().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialCourtesy")) { + res.getSpecialCourtesy().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialArrangement")) { + res.getSpecialArrangement().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.setDestination(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dischargeDisposition")) { + res.setDischargeDisposition(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Encounter.EncounterLocationComponent parseEncounterEncounterLocationComponent(XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { + Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEncounterEncounterLocationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEncounterEncounterLocationComponentContent(int eventType, XmlPullParser xpp, Encounter owner, Encounter.EncounterLocationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterLocationStatus.NULL, new Encounter.EncounterLocationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Endpoint parseEndpoint(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Endpoint res = new Endpoint(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEndpointContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEndpointContent(int eventType, XmlPullParser xpp, Endpoint res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Endpoint.EndpointStatus.NULL, new Endpoint.EndpointStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("connectionType")) { + res.setConnectionType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { + res.setManagingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payloadType")) { + res.getPayloadType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payloadMimeType")) { + res.getPayloadMimeType().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.setAddressElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("header")) { + res.getHeader().add(parseString(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected EnrollmentRequest parseEnrollmentRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + EnrollmentRequest res = new EnrollmentRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEnrollmentRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEnrollmentRequestContent(int eventType, XmlPullParser xpp, EnrollmentRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, EnrollmentRequest.EnrollmentRequestStatus.NULL, new EnrollmentRequest.EnrollmentRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { + res.setInsurer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("candidate")) { + res.setCandidate(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected EnrollmentResponse parseEnrollmentResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + EnrollmentResponse res = new EnrollmentResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEnrollmentResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEnrollmentResponseContent(int eventType, XmlPullParser xpp, EnrollmentResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, EnrollmentResponse.EnrollmentResponseStatus.NULL, new EnrollmentResponse.EnrollmentResponseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { + res.setDispositionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { + res.setRequestProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { + res.setRequestOrganization(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected EpisodeOfCare parseEpisodeOfCare(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + EpisodeOfCare res = new EpisodeOfCare(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEpisodeOfCareContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEpisodeOfCareContent(int eventType, XmlPullParser xpp, EpisodeOfCare res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusHistory")) { + res.getStatusHistory().add(parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { + res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { + res.setManagingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referralRequest")) { + res.getReferralRequest().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careManager")) { + res.setCareManager(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("team")) { + res.getTeam().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { + res.getAccount().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(XmlPullParser xpp, EpisodeOfCare owner) throws XmlPullParserException, IOException, FHIRFormatError { + EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentContent(int eventType, XmlPullParser xpp, EpisodeOfCare owner, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, EpisodeOfCare.EpisodeOfCareStatus.NULL, new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected EpisodeOfCare.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(XmlPullParser xpp, EpisodeOfCare owner) throws XmlPullParserException, IOException, FHIRFormatError { + EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEpisodeOfCareDiagnosisComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEpisodeOfCareDiagnosisComponentContent(int eventType, XmlPullParser xpp, EpisodeOfCare owner, EpisodeOfCare.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.setCondition(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { + res.setRankElement(parsePositiveInt(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected EventDefinition parseEventDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + EventDefinition res = new EventDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseEventDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseEventDefinitionContent(int eventType, XmlPullParser xpp, EventDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { + res.getContributor().add(parseContributor(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("trigger")) { + res.setTrigger(parseTriggerDefinition(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario parseExampleScenario(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario res = new ExampleScenario(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioContent(int eventType, XmlPullParser xpp, ExampleScenario res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.getActor().add(parseExampleScenarioExampleScenarioActorComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { + res.getInstance().add(parseExampleScenarioExampleScenarioInstanceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("process")) { + res.setProcess(parseExampleScenarioExampleScenarioProcessComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("workflow")) { + res.getWorkflow().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioActorComponent parseExampleScenarioExampleScenarioActorComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioActorComponent res = new ExampleScenario.ExampleScenarioActorComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioActorComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioActorComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioActorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actorId")) { + res.setActorIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, ExampleScenario.ExampleScenarioActorType.NULL, new ExampleScenario.ExampleScenarioActorTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioInstanceComponent parseExampleScenarioExampleScenarioInstanceComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioInstanceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioInstanceComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resourceId")) { + res.setResourceIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resourceType")) { + res.setResourceTypeElement(parseEnumeration(xpp, ExampleScenario.FHIRResourceType.NULL, new ExampleScenario.FHIRResourceTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.getVersion().add(parseExampleScenarioExampleScenarioInstanceVersionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containedInstance")) { + res.getContainedInstance().add(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioInstanceVersionComponent parseExampleScenarioExampleScenarioInstanceVersionComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioInstanceVersionComponent res = new ExampleScenario.ExampleScenarioInstanceVersionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioInstanceVersionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioInstanceVersionComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceVersionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { + res.setVersionIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resourceId")) { + res.setResourceIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { + res.setVersionIdElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioProcessComponent parseExampleScenarioExampleScenarioProcessComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessComponent res = new ExampleScenario.ExampleScenarioProcessComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioProcessComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioProcessComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preConditions")) { + res.setPreConditionsElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("postConditions")) { + res.setPostConditionsElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("step")) { + res.getStep().add(parseExampleScenarioExampleScenarioProcessStepComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioProcessStepComponent parseExampleScenarioExampleScenarioProcessStepComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepComponent res = new ExampleScenario.ExampleScenarioProcessStepComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioProcessStepComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioProcessStepComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("process")) { + res.getProcess().add(parseExampleScenarioExampleScenarioProcessComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pause")) { + res.setPauseElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseExampleScenarioExampleScenarioProcessStepOperationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alternative")) { + res.setAlternative(parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioProcessStepOperationComponent parseExampleScenarioExampleScenarioProcessStepOperationComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepOperationComponent res = new ExampleScenario.ExampleScenarioProcessStepOperationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioProcessStepOperationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioProcessStepOperationComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { + res.setNumberElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initiator")) { + res.setInitiatorElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { + res.setReceiverElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initiatorActive")) { + res.setInitiatorActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiverActive")) { + res.setReceiverActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioProcessStepAlternativeComponent parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioProcessStepAlternativeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioProcessStepAlternativeComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("option")) { + res.getOption().add(parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentContent(int eventType, XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("step")) { + res.getStep().add(parseExampleScenarioExampleScenarioProcessStepComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pause")) { + res.getPause().add(parseBoolean(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile parseExpansionProfile(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile res = new ExpansionProfile(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileContent(int eventType, XmlPullParser xpp, ExpansionProfile res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fixedVersion")) { + res.getFixedVersion().add(parseExpansionProfileExpansionProfileFixedVersionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludedSystem")) { + res.setExcludedSystem(parseExpansionProfileExpansionProfileExcludedSystemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("includeDesignations")) { + res.setIncludeDesignationsElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { + res.setDesignation(parseExpansionProfileExpansionProfileDesignationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("includeDefinition")) { + res.setIncludeDefinitionElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activeOnly")) { + res.setActiveOnlyElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeNested")) { + res.setExcludeNestedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeNotForUI")) { + res.setExcludeNotForUIElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludePostCoordinated")) { + res.setExcludePostCoordinatedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("displayLanguage")) { + res.setDisplayLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("limitedExpansion")) { + res.setLimitedExpansionElement(parseBoolean(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.ExpansionProfileFixedVersionComponent parseExpansionProfileExpansionProfileFixedVersionComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.ExpansionProfileFixedVersionComponent res = new ExpansionProfile.ExpansionProfileFixedVersionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileExpansionProfileFixedVersionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileExpansionProfileFixedVersionComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.ExpansionProfileFixedVersionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, ExpansionProfile.SystemVersionProcessingMode.NULL, new ExpansionProfile.SystemVersionProcessingModeEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.ExpansionProfileExcludedSystemComponent parseExpansionProfileExpansionProfileExcludedSystemComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.ExpansionProfileExcludedSystemComponent res = new ExpansionProfile.ExpansionProfileExcludedSystemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileExpansionProfileExcludedSystemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileExpansionProfileExcludedSystemComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.ExpansionProfileExcludedSystemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.ExpansionProfileDesignationComponent parseExpansionProfileExpansionProfileDesignationComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.ExpansionProfileDesignationComponent res = new ExpansionProfile.ExpansionProfileDesignationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileExpansionProfileDesignationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileExpansionProfileDesignationComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.ExpansionProfileDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { + res.setInclude(parseExpansionProfileDesignationIncludeComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { + res.setExclude(parseExpansionProfileDesignationExcludeComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.DesignationIncludeComponent parseExpansionProfileDesignationIncludeComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.DesignationIncludeComponent res = new ExpansionProfile.DesignationIncludeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileDesignationIncludeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileDesignationIncludeComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationIncludeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { + res.getDesignation().add(parseExpansionProfileDesignationIncludeDesignationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.DesignationIncludeDesignationComponent parseExpansionProfileDesignationIncludeDesignationComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.DesignationIncludeDesignationComponent res = new ExpansionProfile.DesignationIncludeDesignationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileDesignationIncludeDesignationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileDesignationIncludeDesignationComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationIncludeDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUse(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.DesignationExcludeComponent parseExpansionProfileDesignationExcludeComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.DesignationExcludeComponent res = new ExpansionProfile.DesignationExcludeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileDesignationExcludeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileDesignationExcludeComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationExcludeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { + res.getDesignation().add(parseExpansionProfileDesignationExcludeDesignationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExpansionProfile.DesignationExcludeDesignationComponent parseExpansionProfileDesignationExcludeDesignationComponent(XmlPullParser xpp, ExpansionProfile owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExpansionProfile.DesignationExcludeDesignationComponent res = new ExpansionProfile.DesignationExcludeDesignationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExpansionProfileDesignationExcludeDesignationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExpansionProfileDesignationExcludeDesignationComponentContent(int eventType, XmlPullParser xpp, ExpansionProfile owner, ExpansionProfile.DesignationExcludeDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUse(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit parseExplanationOfBenefit(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit res = new ExplanationOfBenefit(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL, new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { + res.getSubType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("billablePeriod")) { + res.setBillablePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { + res.setEnterer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { + res.setInsurer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referral")) { + res.setReferral(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { + res.setFacility(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { + res.setClaim(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { + res.setClaimResponse(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, ExplanationOfBenefit.RemittanceOutcome.NULL, new ExplanationOfBenefit.RemittanceOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { + res.setDispositionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { + res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescription")) { + res.setPrescription(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("originalPrescription")) { + res.setOriginalPrescription(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { + res.setPayee(parseExplanationOfBenefitPayeeComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("information")) { + res.getInformation().add(parseExplanationOfBenefitSupportingInformationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { + res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { + res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { + res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precedence")) { + res.setPrecedenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { + res.setInsurance(parseExplanationOfBenefitInsuranceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accident")) { + res.setAccident(parseExplanationOfBenefitAccidentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("employmentImpacted")) { + res.setEmploymentImpacted(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { + res.setHospitalization(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseExplanationOfBenefitItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addItem")) { + res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalCost")) { + res.setTotalCost(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unallocDeductable")) { + res.setUnallocDeductable(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalBenefit")) { + res.setTotalBenefit(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { + res.setPayment(parseExplanationOfBenefitPaymentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { + res.setForm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { + res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitBalance")) { + res.getBenefitBalance().add(parseExplanationOfBenefitBenefitBalanceComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitRelatedClaimComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitRelatedClaimComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.RelatedClaimComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { + res.setClaim(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationship(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReference(parseIdentifier(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.PayeeComponent parseExplanationOfBenefitPayeeComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitPayeeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitPayeeComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.PayeeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { + res.setParty(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitSupportingInformationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitSupportingInformationComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.SupportingInformationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.CareTeamComponent parseExplanationOfBenefitCareTeamComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitCareTeamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitCareTeamComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.CareTeamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { + res.setResponsibleElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { + res.setQualification(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.DiagnosisComponent parseExplanationOfBenefitDiagnosisComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitDiagnosisComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitDiagnosisComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { + res.setDiagnosis(parseType("diagnosis", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageCode")) { + res.setPackageCode(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitProcedureComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitProcedureComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.ProcedureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "procedure")) { + res.setProcedure(parseType("procedure", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitInsuranceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitInsuranceComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { + res.setCoverage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { + res.getPreAuthRef().add(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitAccidentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitAccidentComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.AccidentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { + res.setLocation(parseType("location", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitItemComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeamLinkId")) { + res.getCareTeamLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosisLinkId")) { + res.getDiagnosisLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureLinkId")) { + res.getProcedureLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationLinkId")) { + res.getInformationLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { + res.setRevenue(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { + res.getProgramCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { + res.setServiced(parseType("serviced", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { + res.setLocation(parseType("location", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.getUdi().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { + res.getSubSite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.getEncounter().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parseExplanationOfBenefitDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitAdjudicationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitAdjudicationComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.AdjudicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseDecimal(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitDetailComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.DetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { + res.setRevenue(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { + res.getProgramCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.getUdi().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { + res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitSubDetailComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitSubDetailComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { + res.setSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { + res.setRevenue(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { + res.getProgramCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { + res.setUnitPrice(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { + res.setFactorElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { + res.setNet(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { + res.getUdi().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitAddedItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitAddedItemComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.getSequenceLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequenceLinkId")) { + res.getDetailSequenceLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequenceLinkId")) { + res.getSubdetailSequenceLinkId().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { + res.setService(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fee")) { + res.setFee(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { + res.getNoteNumber().add(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { + res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.PaymentComponent parseExplanationOfBenefitPaymentComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitPaymentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitPaymentComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.PaymentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustment")) { + res.setAdjustment(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustmentReason")) { + res.setAdjustmentReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.NoteComponent parseExplanationOfBenefitNoteComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitNoteComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitNoteComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.NoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { + res.setNumberElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguage(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitBenefitBalanceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitBenefitBalanceComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitBalanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subCategory")) { + res.setSubCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excluded")) { + res.setExcludedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { + res.setNetwork(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { + res.setUnit(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { + res.setTerm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("financial")) { + res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { + ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseExplanationOfBenefitBenefitComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseExplanationOfBenefitBenefitComponentContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { + res.setAllowed(parseType("allowed", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "used")) { + res.setUsed(parseType("used", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected FamilyMemberHistory parseFamilyMemberHistory(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + FamilyMemberHistory res = new FamilyMemberHistory(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseFamilyMemberHistoryContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseFamilyMemberHistoryContent(int eventType, XmlPullParser xpp, FamilyMemberHistory res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, FamilyMemberHistory.FamilyHistoryStatus.NULL, new FamilyMemberHistory.FamilyHistoryStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { + res.setDataAbsentReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationship(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { + res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "born")) { + res.setBorn(parseType("born", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "age")) { + res.setAge(parseType("age", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("estimatedAge")) { + res.setEstimatedAgeElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "deceased")) { + res.setDeceased(parseType("deceased", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.getCondition().add(parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(XmlPullParser xpp, FamilyMemberHistory owner) throws XmlPullParserException, IOException, FHIRFormatError { + FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentContent(int eventType, XmlPullParser xpp, FamilyMemberHistory owner, FamilyMemberHistory.FamilyMemberHistoryConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcome(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { + res.setOnset(parseType("onset", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Flag parseFlag(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Flag res = new Flag(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseFlagContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseFlagContent(int eventType, XmlPullParser xpp, Flag res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Flag.FlagStatus.NULL, new Flag.FlagStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Goal parseGoal(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Goal res = new Goal(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGoalContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGoalContent(int eventType, XmlPullParser xpp, Goal res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Goal.GoalStatus.NULL, new Goal.GoalStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriority(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescription(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "start")) { + res.setStart(parseType("start", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseGoalGoalTargetComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { + res.setStatusDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { + res.setStatusReasonElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expressedBy")) { + res.setExpressedBy(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { + res.getAddresses().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeCode")) { + res.getOutcomeCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeReference")) { + res.getOutcomeReference().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Goal.GoalTargetComponent parseGoalGoalTargetComponent(XmlPullParser xpp, Goal owner) throws XmlPullParserException, IOException, FHIRFormatError { + Goal.GoalTargetComponent res = new Goal.GoalTargetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGoalGoalTargetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGoalGoalTargetComponentContent(int eventType, XmlPullParser xpp, Goal owner, Goal.GoalTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { + res.setMeasure(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "detail")) { + res.setDetail(parseType("detail", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "due")) { + res.setDue(parseType("due", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected GraphDefinition parseGraphDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + GraphDefinition res = new GraphDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGraphDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGraphDefinitionContent(int eventType, XmlPullParser xpp, GraphDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfileElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionGraphDefinitionLinkComponent(XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGraphDefinitionGraphDefinitionLinkComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGraphDefinitionGraphDefinitionLinkComponentContent(int eventType, XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceName")) { + res.setSliceNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.getTarget().add(parseGraphDefinitionGraphDefinitionLinkTargetComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected GraphDefinition.GraphDefinitionLinkTargetComponent parseGraphDefinitionGraphDefinitionLinkTargetComponent(XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + GraphDefinition.GraphDefinitionLinkTargetComponent res = new GraphDefinition.GraphDefinitionLinkTargetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGraphDefinitionGraphDefinitionLinkTargetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGraphDefinitionGraphDefinitionLinkTargetComponentContent(int eventType, XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("params")) { + res.setParamsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfileElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compartment")) { + res.getCompartment().add(parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentContent(int eventType, XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, GraphDefinition.GraphCompartmentUse.NULL, new GraphDefinition.GraphCompartmentUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, GraphDefinition.CompartmentCode.NULL, new GraphDefinition.CompartmentCodeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.setRuleElement(parseEnumeration(xpp, GraphDefinition.GraphCompartmentRule.NULL, new GraphDefinition.GraphCompartmentRuleEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Group parseGroup(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Group res = new Group(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGroupContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGroupContent(int eventType, XmlPullParser xpp, Group res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Group.GroupType.NULL, new Group.GroupTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actual")) { + res.setActualElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantityElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { + res.getCharacteristic().add(parseGroupGroupCharacteristicComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("member")) { + res.getMember().add(parseGroupGroupMemberComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Group.GroupCharacteristicComponent parseGroupGroupCharacteristicComponent(XmlPullParser xpp, Group owner) throws XmlPullParserException, IOException, FHIRFormatError { + Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGroupGroupCharacteristicComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGroupGroupCharacteristicComponentContent(int eventType, XmlPullParser xpp, Group owner, Group.GroupCharacteristicComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { + res.setExcludeElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Group.GroupMemberComponent parseGroupGroupMemberComponent(XmlPullParser xpp, Group owner) throws XmlPullParserException, IOException, FHIRFormatError { + Group.GroupMemberComponent res = new Group.GroupMemberComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGroupGroupMemberComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGroupGroupMemberComponentContent(int eventType, XmlPullParser xpp, Group owner, Group.GroupMemberComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { + res.setEntity(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { + res.setInactiveElement(parseBoolean(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected GuidanceResponse parseGuidanceResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + GuidanceResponse res = new GuidanceResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseGuidanceResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseGuidanceResponseContent(int eventType, XmlPullParser xpp, GuidanceResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestId")) { + res.setRequestIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("module")) { + res.setModule(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, GuidanceResponse.GuidanceResponseStatus.NULL, new GuidanceResponse.GuidanceResponseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("occurrenceDateTime")) { + res.setOccurrenceDateTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { + res.setReason(parseType("reason", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evaluationMessage")) { + res.getEvaluationMessage().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outputParameters")) { + res.setOutputParameters(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { + res.setResult(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { + res.getDataRequirement().add(parseDataRequirement(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected HealthcareService parseHealthcareService(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + HealthcareService res = new HealthcareService(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseHealthcareServiceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseHealthcareServiceContent(int eventType, XmlPullParser xpp, HealthcareService res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("providedBy")) { + res.setProvidedBy(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { + res.getSpecialty().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.getLocation().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extraDetails")) { + res.setExtraDetailsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { + res.setPhoto(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverageArea")) { + res.getCoverageArea().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceProvisionCode")) { + res.getServiceProvisionCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eligibility")) { + res.setEligibility(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eligibilityNote")) { + res.setEligibilityNoteElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programName")) { + res.getProgramName().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { + res.getCharacteristic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referralMethod")) { + res.getReferralMethod().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentRequired")) { + res.setAppointmentRequiredElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableTime")) { + res.getAvailableTime().add(parseHealthcareServiceHealthcareServiceAvailableTimeComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notAvailable")) { + res.getNotAvailable().add(parseHealthcareServiceHealthcareServiceNotAvailableComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { + res.setAvailabilityExceptionsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected HealthcareService.HealthcareServiceAvailableTimeComponent parseHealthcareServiceHealthcareServiceAvailableTimeComponent(XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { + HealthcareService.HealthcareServiceAvailableTimeComponent res = new HealthcareService.HealthcareServiceAvailableTimeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseHealthcareServiceHealthcareServiceAvailableTimeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseHealthcareServiceHealthcareServiceAvailableTimeComponentContent(int eventType, XmlPullParser xpp, HealthcareService owner, HealthcareService.HealthcareServiceAvailableTimeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { + res.getDaysOfWeek().add(parseEnumeration(xpp, HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { + res.setAllDayElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableStartTime")) { + res.setAvailableStartTimeElement(parseTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableEndTime")) { + res.setAvailableEndTimeElement(parseTime(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected HealthcareService.HealthcareServiceNotAvailableComponent parseHealthcareServiceHealthcareServiceNotAvailableComponent(XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { + HealthcareService.HealthcareServiceNotAvailableComponent res = new HealthcareService.HealthcareServiceNotAvailableComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseHealthcareServiceHealthcareServiceNotAvailableComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseHealthcareServiceHealthcareServiceNotAvailableComponentContent(int eventType, XmlPullParser xpp, HealthcareService owner, HealthcareService.HealthcareServiceNotAvailableComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("during")) { + res.setDuring(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingManifest parseImagingManifest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingManifest res = new ImagingManifest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingManifestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingManifestContent(int eventType, XmlPullParser xpp, ImagingManifest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoringTime")) { + res.setAuthoringTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { + res.getStudy().add(parseImagingManifestStudyComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingManifest.StudyComponent parseImagingManifestStudyComponent(XmlPullParser xpp, ImagingManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingManifest.StudyComponent res = new ImagingManifest.StudyComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingManifestStudyComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingManifestStudyComponentContent(int eventType, XmlPullParser xpp, ImagingManifest owner, ImagingManifest.StudyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { + res.setUidElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imagingStudy")) { + res.setImagingStudy(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { + res.getSeries().add(parseImagingManifestSeriesComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingManifest.SeriesComponent parseImagingManifestSeriesComponent(XmlPullParser xpp, ImagingManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingManifest.SeriesComponent res = new ImagingManifest.SeriesComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingManifestSeriesComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingManifestSeriesComponentContent(int eventType, XmlPullParser xpp, ImagingManifest owner, ImagingManifest.SeriesComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { + res.setUidElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { + res.getInstance().add(parseImagingManifestInstanceComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingManifest.InstanceComponent parseImagingManifestInstanceComponent(XmlPullParser xpp, ImagingManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingManifest.InstanceComponent res = new ImagingManifest.InstanceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingManifestInstanceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingManifestInstanceComponentContent(int eventType, XmlPullParser xpp, ImagingManifest owner, ImagingManifest.InstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sopClass")) { + res.setSopClassElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { + res.setUidElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frameNumber")) { + res.getFrameNumber().add(parseUnsignedInt(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingStudy parseImagingStudy(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingStudy res = new ImagingStudy(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingStudyContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingStudyContent(int eventType, XmlPullParser xpp, ImagingStudy res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { + res.setUidElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accession")) { + res.setAccession(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availability")) { + res.setAvailabilityElement(parseEnumeration(xpp, ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modalityList")) { + res.getModalityList().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("started")) { + res.setStartedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referrer")) { + res.setReferrer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpreter")) { + res.getInterpreter().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfSeries")) { + res.setNumberOfSeriesElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfInstances")) { + res.setNumberOfInstancesElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureReference")) { + res.getProcedureReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureCode")) { + res.getProcedureCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { + res.getSeries().add(parseImagingStudyImagingStudySeriesComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudyImagingStudySeriesComponent(XmlPullParser xpp, ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingStudyImagingStudySeriesComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingStudyImagingStudySeriesComponentContent(int eventType, XmlPullParser xpp, ImagingStudy owner, ImagingStudy.ImagingStudySeriesComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { + res.setUidElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { + res.setNumberElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modality")) { + res.setModality(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfInstances")) { + res.setNumberOfInstancesElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availability")) { + res.setAvailabilityElement(parseEnumeration(xpp, ImagingStudy.InstanceAvailability.NULL, new ImagingStudy.InstanceAvailabilityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("laterality")) { + res.setLaterality(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("started")) { + res.setStartedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { + res.getInstance().add(parseImagingStudyImagingStudySeriesInstanceComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImagingStudy.ImagingStudySeriesInstanceComponent parseImagingStudyImagingStudySeriesInstanceComponent(XmlPullParser xpp, ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImagingStudyImagingStudySeriesInstanceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImagingStudyImagingStudySeriesInstanceComponentContent(int eventType, XmlPullParser xpp, ImagingStudy owner, ImagingStudy.ImagingStudySeriesInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { + res.setUidElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { + res.setNumberElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sopClass")) { + res.setSopClassElement(parseOid(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Immunization parseImmunization(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Immunization res = new Immunization(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationContent(int eventType, XmlPullParser xpp, Immunization res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Immunization.ImmunizationStatus.NULL, new Immunization.ImmunizationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notGiven")) { + res.setNotGivenElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccineCode")) { + res.setVaccineCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("primarySource")) { + res.setPrimarySourceElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reportOrigin")) { + res.setReportOrigin(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { + res.setManufacturer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { + res.setLotNumberElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { + res.setExpirationDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { + res.setSite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { + res.setRoute(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseQuantity")) { + res.setDoseQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practitioner")) { + res.getPractitioner().add(parseImmunizationImmunizationPractitionerComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("explanation")) { + res.setExplanation(parseImmunizationImmunizationExplanationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reaction")) { + res.getReaction().add(parseImmunizationImmunizationReactionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccinationProtocol")) { + res.getVaccinationProtocol().add(parseImmunizationImmunizationVaccinationProtocolComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Immunization.ImmunizationPractitionerComponent parseImmunizationImmunizationPractitionerComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { + Immunization.ImmunizationPractitionerComponent res = new Immunization.ImmunizationPractitionerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationImmunizationPractitionerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationImmunizationPractitionerComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationPractitionerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Immunization.ImmunizationExplanationComponent parseImmunizationImmunizationExplanationComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { + Immunization.ImmunizationExplanationComponent res = new Immunization.ImmunizationExplanationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationImmunizationExplanationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationImmunizationExplanationComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationExplanationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonNotGiven")) { + res.getReasonNotGiven().add(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Immunization.ImmunizationReactionComponent parseImmunizationImmunizationReactionComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { + Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationImmunizationReactionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationImmunizationReactionComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationReactionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.setDetail(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reported")) { + res.setReportedElement(parseBoolean(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Immunization.ImmunizationVaccinationProtocolComponent parseImmunizationImmunizationVaccinationProtocolComponent(XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { + Immunization.ImmunizationVaccinationProtocolComponent res = new Immunization.ImmunizationVaccinationProtocolComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationImmunizationVaccinationProtocolComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationImmunizationVaccinationProtocolComponentContent(int eventType, XmlPullParser xpp, Immunization owner, Immunization.ImmunizationVaccinationProtocolComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseSequence")) { + res.setDoseSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { + res.setAuthority(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { + res.setSeriesElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("seriesDoses")) { + res.setSeriesDosesElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { + res.getTargetDisease().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseStatus")) { + res.setDoseStatus(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseStatusReason")) { + res.setDoseStatusReason(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImmunizationRecommendation parseImmunizationRecommendation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ImmunizationRecommendation res = new ImmunizationRecommendation(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationRecommendationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationRecommendationContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recommendation")) { + res.getRecommendation().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccineCode")) { + res.setVaccineCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { + res.setTargetDisease(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseNumber")) { + res.setDoseNumberElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("forecastStatus")) { + res.setForecastStatus(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateCriterion")) { + res.getDateCriterion().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { + res.setProtocol(parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingImmunization")) { + res.getSupportingImmunization().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingPatientInformation")) { + res.getSupportingPatientInformation().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseDateTime(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentContent(int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseSequence")) { + res.setDoseSequenceElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { + res.setAuthority(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { + res.setSeriesElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImplementationGuide parseImplementationGuide(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ImplementationGuide res = new ImplementationGuide(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImplementationGuideContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImplementationGuideContent(int eventType, XmlPullParser xpp, ImplementationGuide res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { + res.setFhirVersionElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependency")) { + res.getDependency().add(parseImplementationGuideImplementationGuideDependencyComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("package")) { + res.getPackage().add(parseImplementationGuideImplementationGuidePackageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("global")) { + res.getGlobal().add(parseImplementationGuideImplementationGuideGlobalComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binary")) { + res.getBinary().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { + res.setPage(parseImplementationGuideImplementationGuidePageComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImplementationGuide.ImplementationGuideDependencyComponent parseImplementationGuideImplementationGuideDependencyComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuideDependencyComponent res = new ImplementationGuide.ImplementationGuideDependencyComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImplementationGuideImplementationGuideDependencyComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImplementationGuideImplementationGuideDependencyComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDependencyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, ImplementationGuide.GuideDependencyType.NULL, new ImplementationGuide.GuideDependencyTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { + res.setUriElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImplementationGuide.ImplementationGuidePackageComponent parseImplementationGuideImplementationGuidePackageComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuidePackageComponent res = new ImplementationGuide.ImplementationGuidePackageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImplementationGuideImplementationGuidePackageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImplementationGuideImplementationGuidePackageComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.getResource().add(parseImplementationGuideImplementationGuidePackageResourceComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImplementationGuide.ImplementationGuidePackageResourceComponent parseImplementationGuideImplementationGuidePackageResourceComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuidePackageResourceComponent res = new ImplementationGuide.ImplementationGuidePackageResourceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImplementationGuideImplementationGuidePackageResourceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImplementationGuideImplementationGuidePackageResourceComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePackageResourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("example")) { + res.setExampleElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("acronym")) { + res.setAcronymElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { + res.setSource(parseType("source", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exampleFor")) { + res.setExampleFor(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideImplementationGuideGlobalComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImplementationGuideImplementationGuideGlobalComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImplementationGuideImplementationGuideGlobalComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideGlobalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ImplementationGuide.ImplementationGuidePageComponent parseImplementationGuideImplementationGuidePageComponent(XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { + ImplementationGuide.ImplementationGuidePageComponent res = new ImplementationGuide.ImplementationGuidePageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseImplementationGuideImplementationGuidePageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseImplementationGuideImplementationGuidePageComponentContent(int eventType, XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuidePageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSourceElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, ImplementationGuide.GuidePageKind.NULL, new ImplementationGuide.GuidePageKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("package")) { + res.getPackage().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { + res.setFormatElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { + res.getPage().add(parseImplementationGuideImplementationGuidePageComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Library parseLibrary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Library res = new Library(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseLibraryContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseLibraryContent(int eventType, XmlPullParser xpp, Library res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { + res.getContributor().add(parseContributor(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { + res.getParameter().add(parseParameterDefinition(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { + res.getDataRequirement().add(parseDataRequirement(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.getContent().add(parseAttachment(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Linkage parseLinkage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Linkage res = new Linkage(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseLinkageContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseLinkageContent(int eventType, XmlPullParser xpp, Linkage res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseLinkageLinkageItemComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Linkage.LinkageItemComponent parseLinkageLinkageItemComponent(XmlPullParser xpp, Linkage owner) throws XmlPullParserException, IOException, FHIRFormatError { + Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseLinkageLinkageItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseLinkageLinkageItemComponentContent(int eventType, XmlPullParser xpp, Linkage owner, Linkage.LinkageItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Linkage.LinkageType.NULL, new Linkage.LinkageTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ListResource parseListResource(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ListResource res = new ListResource(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseListResourceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseListResourceContent(int eventType, XmlPullParser xpp, ListResource res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ListResource.ListStatus.NULL, new ListResource.ListStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, ListResource.ListMode.NULL, new ListResource.ListModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedBy")) { + res.setOrderedBy(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { + res.getEntry().add(parseListResourceListEntryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("emptyReason")) { + res.setEmptyReason(parseCodeableConcept(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ListResource.ListEntryComponent parseListResourceListEntryComponent(XmlPullParser xpp, ListResource owner) throws XmlPullParserException, IOException, FHIRFormatError { + ListResource.ListEntryComponent res = new ListResource.ListEntryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseListResourceListEntryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseListResourceListEntryComponentContent(int eventType, XmlPullParser xpp, ListResource owner, ListResource.ListEntryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("flag")) { + res.setFlag(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deleted")) { + res.setDeletedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.setItem(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Location parseLocation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Location res = new Location(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseLocationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseLocationContent(int eventType, XmlPullParser xpp, Location res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Location.LocationStatus.NULL, new Location.LocationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { + res.setOperationalStatus(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { + res.getAlias().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, Location.LocationMode.NULL, new Location.LocationModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.setAddress(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalType")) { + res.setPhysicalType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("position")) { + res.setPosition(parseLocationLocationPositionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { + res.setManagingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.setPartOf(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Location.LocationPositionComponent parseLocationLocationPositionComponent(XmlPullParser xpp, Location owner) throws XmlPullParserException, IOException, FHIRFormatError { + Location.LocationPositionComponent res = new Location.LocationPositionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseLocationLocationPositionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseLocationLocationPositionComponentContent(int eventType, XmlPullParser xpp, Location owner, Location.LocationPositionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("longitude")) { + res.setLongitudeElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("latitude")) { + res.setLatitudeElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("altitude")) { + res.setAltitudeElement(parseDecimal(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Measure parseMeasure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Measure res = new Measure(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureContent(int eventType, XmlPullParser xpp, Measure res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { + res.getContributor().add(parseContributor(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { + res.getLibrary().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disclaimer")) { + res.setDisclaimerElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scoring")) { + res.setScoring(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositeScoring")) { + res.setCompositeScoring(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("riskAdjustment")) { + res.setRiskAdjustmentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rateAggregation")) { + res.setRateAggregationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rationale")) { + res.setRationaleElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalRecommendationStatement")) { + res.setClinicalRecommendationStatementElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("improvementNotation")) { + res.setImprovementNotationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("guidance")) { + res.setGuidanceElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("set")) { + res.setSetElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { + res.getGroup().add(parseMeasureMeasureGroupComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplementalData")) { + res.getSupplementalData().add(parseMeasureMeasureSupplementalDataComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Measure.MeasureGroupComponent parseMeasureMeasureGroupComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { + Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureMeasureGroupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureMeasureGroupComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { + res.getPopulation().add(parseMeasureMeasureGroupPopulationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratifier")) { + res.getStratifier().add(parseMeasureMeasureGroupStratifierComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Measure.MeasureGroupPopulationComponent parseMeasureMeasureGroupPopulationComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { + Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureMeasureGroupPopulationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureMeasureGroupPopulationComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { + res.setCriteriaElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Measure.MeasureGroupStratifierComponent parseMeasureMeasureGroupStratifierComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { + Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureMeasureGroupStratifierComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureMeasureGroupStratifierComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureGroupStratifierComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { + res.setCriteriaElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Measure.MeasureSupplementalDataComponent parseMeasureMeasureSupplementalDataComponent(XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { + Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureMeasureSupplementalDataComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureMeasureSupplementalDataComponentContent(int eventType, XmlPullParser xpp, Measure owner, Measure.MeasureSupplementalDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.getUsage().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { + res.setCriteriaElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MeasureReport parseMeasureReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MeasureReport res = new MeasureReport(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureReportContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureReportContent(int eventType, XmlPullParser xpp, MeasureReport res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, MeasureReport.MeasureReportStatus.NULL, new MeasureReport.MeasureReportStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, MeasureReport.MeasureReportType.NULL, new MeasureReport.MeasureReportTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { + res.setMeasure(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reportingOrganization")) { + res.setReportingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { + res.getGroup().add(parseMeasureReportMeasureReportGroupComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evaluatedResources")) { + res.setEvaluatedResources(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MeasureReport.MeasureReportGroupComponent parseMeasureReportMeasureReportGroupComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureReportMeasureReportGroupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureReportMeasureReportGroupComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.MeasureReportGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { + res.getPopulation().add(parseMeasureReportMeasureReportGroupPopulationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measureScore")) { + res.setMeasureScoreElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratifier")) { + res.getStratifier().add(parseMeasureReportMeasureReportGroupStratifierComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportMeasureReportGroupPopulationComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureReportMeasureReportGroupPopulationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureReportMeasureReportGroupPopulationComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.MeasureReportGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { + res.setCountElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patients")) { + res.setPatients(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportMeasureReportGroupStratifierComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureReportMeasureReportGroupStratifierComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureReportMeasureReportGroupStratifierComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.MeasureReportGroupStratifierComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratum")) { + res.getStratum().add(parseMeasureReportStratifierGroupComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureReportStratifierGroupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureReportStratifierGroupComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.StratifierGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { + res.getPopulation().add(parseMeasureReportStratifierGroupPopulationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measureScore")) { + res.setMeasureScoreElement(parseDecimal(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent(XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMeasureReportStratifierGroupPopulationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMeasureReportStratifierGroupPopulationComponentContent(int eventType, XmlPullParser xpp, MeasureReport owner, MeasureReport.StratifierGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { + res.setCountElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patients")) { + res.setPatients(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Media parseMedia(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Media res = new Media(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMediaContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMediaContent(int eventType, XmlPullParser xpp, Media res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Media.DigitalMediaType.NULL, new Media.DigitalMediaTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { + res.setSubtype(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("view")) { + res.setView(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { + res.setOperator(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { + res.setDevice(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("height")) { + res.setHeightElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("width")) { + res.setWidthElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frames")) { + res.setFramesElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { + res.setDurationElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.setContent(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Medication parseMedication(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Medication res = new Medication(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationContent(int eventType, XmlPullParser xpp, Medication res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Medication.MedicationStatus.NULL, new Medication.MedicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isBrand")) { + res.setIsBrandElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isOverTheCounter")) { + res.setIsOverTheCounterElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { + res.setManufacturer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { + res.setForm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { + res.getIngredient().add(parseMedicationMedicationIngredientComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("package")) { + res.setPackage(parseMedicationMedicationPackageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { + res.getImage().add(parseAttachment(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Medication.MedicationIngredientComponent parseMedicationMedicationIngredientComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { + Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationMedicationIngredientComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationMedicationIngredientComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationIngredientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { + res.setItem(parseType("item", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isActive")) { + res.setIsActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseRatio(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Medication.MedicationPackageComponent parseMedicationMedicationPackageComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { + Medication.MedicationPackageComponent res = new Medication.MedicationPackageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationMedicationPackageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationMedicationPackageComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationPackageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("container")) { + res.setContainer(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { + res.getContent().add(parseMedicationMedicationPackageContentComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("batch")) { + res.getBatch().add(parseMedicationMedicationPackageBatchComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Medication.MedicationPackageContentComponent parseMedicationMedicationPackageContentComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { + Medication.MedicationPackageContentComponent res = new Medication.MedicationPackageContentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationMedicationPackageContentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationMedicationPackageContentComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationPackageContentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { + res.setItem(parseType("item", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseSimpleQuantity(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Medication.MedicationPackageBatchComponent parseMedicationMedicationPackageBatchComponent(XmlPullParser xpp, Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { + Medication.MedicationPackageBatchComponent res = new Medication.MedicationPackageBatchComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationMedicationPackageBatchComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationMedicationPackageBatchComponentContent(int eventType, XmlPullParser xpp, Medication owner, Medication.MedicationPackageBatchComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { + res.setLotNumberElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { + res.setExpirationDateElement(parseDateTime(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationAdministration parseMedicationAdministration(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationAdministration res = new MedicationAdministration(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationAdministrationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationAdministrationContent(int eventType, XmlPullParser xpp, MedicationAdministration res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, MedicationAdministration.MedicationAdministrationStatus.NULL, new MedicationAdministration.MedicationAdministrationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { + res.setMedication(parseType("medication", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { + res.getSupportingInformation().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { + res.setEffective(parseType("effective", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseMedicationAdministrationMedicationAdministrationPerformerComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notGiven")) { + res.setNotGivenElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonNotGiven")) { + res.getReasonNotGiven().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { + res.getDevice().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { + res.setDosage(parseMedicationAdministrationMedicationAdministrationDosageComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { + res.getEventHistory().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationMedicationAdministrationPerformerComponent(XmlPullParser xpp, MedicationAdministration owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationAdministrationMedicationAdministrationPerformerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationAdministrationMedicationAdministrationPerformerComponentContent(int eventType, XmlPullParser xpp, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationPerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationMedicationAdministrationDosageComponent(XmlPullParser xpp, MedicationAdministration owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationAdministrationMedicationAdministrationDosageComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationAdministrationMedicationAdministrationDosageComponentContent(int eventType, XmlPullParser xpp, MedicationAdministration owner, MedicationAdministration.MedicationAdministrationDosageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { + res.setSite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { + res.setRoute(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dose")) { + res.setDose(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { + res.setRate(parseType("rate", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationDispense parseMedicationDispense(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationDispense res = new MedicationDispense(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationDispenseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationDispenseContent(int eventType, XmlPullParser xpp, MedicationDispense res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, MedicationDispense.MedicationDispenseStatus.NULL, new MedicationDispense.MedicationDispenseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { + res.setMedication(parseType("medication", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { + res.getSupportingInformation().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseMedicationDispenseMedicationDispensePerformerComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorizingPrescription")) { + res.getAuthorizingPrescription().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysSupply")) { + res.setDaysSupply(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenPrepared")) { + res.setWhenPreparedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenHandedOver")) { + res.setWhenHandedOverElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.setDestination(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { + res.getReceiver().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosageInstruction")) { + res.getDosageInstruction().add(parseDosage(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { + res.setSubstitution(parseMedicationDispenseMedicationDispenseSubstitutionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detectedIssue")) { + res.getDetectedIssue().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDone")) { + res.setNotDoneElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "notDoneReason")) { + res.setNotDoneReason(parseType("notDoneReason", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { + res.getEventHistory().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispenseMedicationDispensePerformerComponent(XmlPullParser xpp, MedicationDispense owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationDispenseMedicationDispensePerformerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationDispenseMedicationDispensePerformerComponentContent(int eventType, XmlPullParser xpp, MedicationDispense owner, MedicationDispense.MedicationDispensePerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationDispense.MedicationDispenseSubstitutionComponent parseMedicationDispenseMedicationDispenseSubstitutionComponent(XmlPullParser xpp, MedicationDispense owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationDispenseMedicationDispenseSubstitutionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationDispenseMedicationDispenseSubstitutionComponentContent(int eventType, XmlPullParser xpp, MedicationDispense owner, MedicationDispense.MedicationDispenseSubstitutionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("wasSubstituted")) { + res.setWasSubstitutedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsibleParty")) { + res.getResponsibleParty().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationRequest parseMedicationRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationRequest res = new MedicationRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationRequestContent(int eventType, XmlPullParser xpp, MedicationRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { + res.setGroupIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestStatus.NULL, new MedicationRequest.MedicationRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { + res.setIntentElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestIntent.NULL, new MedicationRequest.MedicationRequestIntentEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestPriority.NULL, new MedicationRequest.MedicationRequestPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { + res.setMedication(parseType("medication", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { + res.getSupportingInformation().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { + res.setRequester(parseMedicationRequestMedicationRequestRequesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { + res.setRecorder(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosageInstruction")) { + res.getDosageInstruction().add(parseDosage(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dispenseRequest")) { + res.setDispenseRequest(parseMedicationRequestMedicationRequestDispenseRequestComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { + res.setSubstitution(parseMedicationRequestMedicationRequestSubstitutionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priorPrescription")) { + res.setPriorPrescription(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detectedIssue")) { + res.getDetectedIssue().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { + res.getEventHistory().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationRequest.MedicationRequestRequesterComponent parseMedicationRequestMedicationRequestRequesterComponent(XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationRequest.MedicationRequestRequesterComponent res = new MedicationRequest.MedicationRequestRequesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationRequestMedicationRequestRequesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationRequestMedicationRequestRequesterComponentContent(int eventType, XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.setAgent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestMedicationRequestDispenseRequestComponent(XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationRequestMedicationRequestDispenseRequestComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationRequestMedicationRequestDispenseRequestComponentContent(int eventType, XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestDispenseRequestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { + res.setValidityPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfRepeatsAllowed")) { + res.setNumberOfRepeatsAllowedElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expectedSupplyDuration")) { + res.setExpectedSupplyDuration(parseDuration(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationRequest.MedicationRequestSubstitutionComponent parseMedicationRequestMedicationRequestSubstitutionComponent(XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationRequestMedicationRequestSubstitutionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationRequestMedicationRequestSubstitutionComponentContent(int eventType, XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestSubstitutionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allowed")) { + res.setAllowedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MedicationStatement parseMedicationStatement(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MedicationStatement res = new MedicationStatement(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMedicationStatementContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMedicationStatementContent(int eventType, XmlPullParser xpp, MedicationStatement res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, MedicationStatement.MedicationStatementStatus.NULL, new MedicationStatement.MedicationStatementStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { + res.setMedication(parseType("medication", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { + res.setEffective(parseType("effective", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateAsserted")) { + res.setDateAssertedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationSource")) { + res.setInformationSource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { + res.getDerivedFrom().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("taken")) { + res.setTakenElement(parseEnumeration(xpp, MedicationStatement.MedicationStatementTaken.NULL, new MedicationStatement.MedicationStatementTakenEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonNotTaken")) { + res.getReasonNotTaken().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { + res.getDosage().add(parseDosage(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageDefinition parseMessageDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MessageDefinition res = new MessageDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageDefinitionContent(int eventType, XmlPullParser xpp, MessageDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { + res.setBase(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { + res.getParent().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { + res.getReplaces().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.setEventElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategoryElement(parseEnumeration(xpp, MessageDefinition.MessageSignificanceCategory.NULL, new MessageDefinition.MessageSignificanceCategoryEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { + res.getFocus().add(parseMessageDefinitionMessageDefinitionFocusComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseRequired")) { + res.setResponseRequiredElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allowedResponse")) { + res.getAllowedResponse().add(parseMessageDefinitionMessageDefinitionAllowedResponseComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionMessageDefinitionFocusComponent(XmlPullParser xpp, MessageDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageDefinitionMessageDefinitionFocusComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageDefinitionMessageDefinitionFocusComponentContent(int eventType, XmlPullParser xpp, MessageDefinition owner, MessageDefinition.MessageDefinitionFocusComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseUnsignedInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageDefinition.MessageDefinitionAllowedResponseComponent parseMessageDefinitionMessageDefinitionAllowedResponseComponent(XmlPullParser xpp, MessageDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageDefinitionMessageDefinitionAllowedResponseComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageDefinitionMessageDefinitionAllowedResponseComponentContent(int eventType, XmlPullParser xpp, MessageDefinition owner, MessageDefinition.MessageDefinitionAllowedResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { + res.setMessage(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("situation")) { + res.setSituationElement(parseMarkdown(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageHeader parseMessageHeader(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + MessageHeader res = new MessageHeader(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageHeaderContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageHeaderContent(int eventType, XmlPullParser xpp, MessageHeader res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { + res.setEvent(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.getDestination().add(parseMessageHeaderMessageDestinationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { + res.setSender(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timestamp")) { + res.setTimestampElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { + res.setEnterer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseMessageHeaderMessageSourceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { + res.setResponsible(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseMessageHeaderMessageHeaderResponseComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { + res.getFocus().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinitionElement(parseUri(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageHeader.MessageDestinationComponent parseMessageHeaderMessageDestinationComponent(XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { + MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageHeaderMessageDestinationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageHeaderMessageDestinationComponentContent(int eventType, XmlPullParser xpp, MessageHeader owner, MessageHeader.MessageDestinationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.setEndpointElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { + res.setReceiver(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { + MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageHeaderMessageSourceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageHeaderMessageSourceComponentContent(int eventType, XmlPullParser xpp, MessageHeader owner, MessageHeader.MessageSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { + res.setSoftwareElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.setContact(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.setEndpointElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderMessageHeaderResponseComponent(XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { + MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseMessageHeaderMessageHeaderResponseComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseMessageHeaderMessageHeaderResponseComponentContent(int eventType, XmlPullParser xpp, MessageHeader owner, MessageHeader.MessageHeaderResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifierElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, MessageHeader.ResponseType.NULL, new MessageHeader.ResponseTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("details")) { + res.setDetails(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NamingSystem parseNamingSystem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + NamingSystem res = new NamingSystem(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNamingSystemContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNamingSystemContent(int eventType, XmlPullParser xpp, NamingSystem res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, NamingSystem.NamingSystemType.NULL, new NamingSystem.NamingSystemTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { + res.setResponsibleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uniqueId")) { + res.getUniqueId().add(parseNamingSystemNamingSystemUniqueIdComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replacedBy")) { + res.setReplacedBy(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemNamingSystemUniqueIdComponent(XmlPullParser xpp, NamingSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { + NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNamingSystemNamingSystemUniqueIdComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNamingSystemNamingSystemUniqueIdComponentContent(int eventType, XmlPullParser xpp, NamingSystem owner, NamingSystem.NamingSystemUniqueIdComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, NamingSystem.NamingSystemIdentifierType.NULL, new NamingSystem.NamingSystemIdentifierTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { + res.setPreferredElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder parseNutritionOrder(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder res = new NutritionOrder(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderContent(int eventType, XmlPullParser xpp, NutritionOrder res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, NutritionOrder.NutritionOrderStatus.NULL, new NutritionOrder.NutritionOrderStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateTime")) { + res.setDateTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderer")) { + res.setOrderer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allergyIntolerance")) { + res.getAllergyIntolerance().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("foodPreferenceModifier")) { + res.getFoodPreferenceModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeFoodModifier")) { + res.getExcludeFoodModifier().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("oralDiet")) { + res.setOralDiet(parseNutritionOrderNutritionOrderOralDietComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplement")) { + res.getSupplement().add(parseNutritionOrderNutritionOrderSupplementComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enteralFormula")) { + res.setEnteralFormula(parseNutritionOrderNutritionOrderEnteralFormulaComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderNutritionOrderOralDietComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderNutritionOrderOralDietComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderNutritionOrderOralDietComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { + res.getSchedule().add(parseTiming(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nutrient")) { + res.getNutrient().add(parseNutritionOrderNutritionOrderOralDietNutrientComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("texture")) { + res.getTexture().add(parseNutritionOrderNutritionOrderOralDietTextureComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fluidConsistencyType")) { + res.getFluidConsistencyType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { + res.setInstructionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderNutritionOrderOralDietNutrientComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderNutritionOrderOralDietNutrientComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderNutritionOrderOralDietNutrientComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietNutrientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.setModifier(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseSimpleQuantity(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder.NutritionOrderOralDietTextureComponent parseNutritionOrderNutritionOrderOralDietTextureComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderNutritionOrderOralDietTextureComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderNutritionOrderOralDietTextureComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderOralDietTextureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.setModifier(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("foodType")) { + res.setFoodType(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder.NutritionOrderSupplementComponent parseNutritionOrderNutritionOrderSupplementComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderNutritionOrderSupplementComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderNutritionOrderSupplementComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderSupplementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productName")) { + res.setProductNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { + res.getSchedule().add(parseTiming(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { + res.setInstructionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder.NutritionOrderEnteralFormulaComponent parseNutritionOrderNutritionOrderEnteralFormulaComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderNutritionOrderEnteralFormulaComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderNutritionOrderEnteralFormulaComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseFormulaType")) { + res.setBaseFormulaType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseFormulaProductName")) { + res.setBaseFormulaProductNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additiveType")) { + res.setAdditiveType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additiveProductName")) { + res.setAdditiveProductNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("caloricDensity")) { + res.setCaloricDensity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("routeofAdministration")) { + res.setRouteofAdministration(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administration")) { + res.getAdministration().add(parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxVolumeToDeliver")) { + res.setMaxVolumeToDeliver(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administrationInstruction")) { + res.setAdministrationInstructionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { + NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentContent(int eventType, XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { + res.setSchedule(parseTiming(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { + res.setRate(parseType("rate", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Observation parseObservation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Observation res = new Observation(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseObservationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseObservationContent(int eventType, XmlPullParser xpp, Observation res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Observation.ObservationStatus.NULL, new Observation.ObservationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { + res.setEffective(parseType("effective", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { + res.setIssuedElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { + res.setDataAbsentReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpretation")) { + res.setInterpretation(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { + res.setSpecimen(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { + res.setDevice(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { + res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { + res.getRelated().add(parseObservationObservationRelatedComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { + res.getComponent().add(parseObservationObservationComponentComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Observation.ObservationReferenceRangeComponent parseObservationObservationReferenceRangeComponent(XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { + Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseObservationObservationReferenceRangeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseObservationObservationReferenceRangeComponentContent(int eventType, XmlPullParser xpp, Observation owner, Observation.ObservationReferenceRangeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("low")) { + res.setLow(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("high")) { + res.setHigh(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appliesTo")) { + res.getAppliesTo().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("age")) { + res.setAge(parseRange(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Observation.ObservationRelatedComponent parseObservationObservationRelatedComponent(XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { + Observation.ObservationRelatedComponent res = new Observation.ObservationRelatedComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseObservationObservationRelatedComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseObservationObservationRelatedComponentContent(int eventType, XmlPullParser xpp, Observation owner, Observation.ObservationRelatedComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Observation.ObservationRelationshipType.NULL, new Observation.ObservationRelationshipTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Observation.ObservationComponentComponent parseObservationObservationComponentComponent(XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { + Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseObservationObservationComponentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseObservationObservationComponentComponentContent(int eventType, XmlPullParser xpp, Observation owner, Observation.ObservationComponentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { + res.setDataAbsentReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpretation")) { + res.setInterpretation(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { + res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected OperationDefinition parseOperationDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + OperationDefinition res = new OperationDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOperationDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOperationDefinitionContent(int eventType, XmlPullParser xpp, OperationDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, OperationDefinition.OperationKind.NULL, new OperationDefinition.OperationKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("idempotent")) { + res.setIdempotentElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { + res.setBase(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.getResource().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { + res.setInstanceElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { + res.getParameter().add(parseOperationDefinitionOperationDefinitionParameterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overload")) { + res.getOverload().add(parseOperationDefinitionOperationDefinitionOverloadComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionOperationDefinitionParameterComponent(XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOperationDefinitionOperationDefinitionParameterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOperationDefinitionOperationDefinitionParameterComponentContent(int eventType, XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUseElement(parseEnumeration(xpp, OperationDefinition.OperationParameterUse.NULL, new OperationDefinition.OperationParameterUseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchType")) { + res.setSearchTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binding")) { + res.setBinding(parseOperationDefinitionOperationDefinitionParameterBindingComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { + res.getPart().add(parseOperationDefinitionOperationDefinitionParameterComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionOperationDefinitionParameterBindingComponent(XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOperationDefinitionOperationDefinitionParameterBindingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOperationDefinitionOperationDefinitionParameterBindingComponentContent(int eventType, XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterBindingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { + res.setStrengthElement(parseEnumeration(xpp, Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "valueSet")) { + res.setValueSet(parseType("valueSet", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected OperationDefinition.OperationDefinitionOverloadComponent parseOperationDefinitionOperationDefinitionOverloadComponent(XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOperationDefinitionOperationDefinitionOverloadComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOperationDefinitionOperationDefinitionOverloadComponentContent(int eventType, XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionOverloadComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameterName")) { + res.getParameterName().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected OperationOutcome parseOperationOutcome(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + OperationOutcome res = new OperationOutcome(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOperationOutcomeContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOperationOutcomeContent(int eventType, XmlPullParser xpp, OperationOutcome res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issue")) { + res.getIssue().add(parseOperationOutcomeOperationOutcomeIssueComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeOperationOutcomeIssueComponent(XmlPullParser xpp, OperationOutcome owner) throws XmlPullParserException, IOException, FHIRFormatError { + OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOperationOutcomeOperationOutcomeIssueComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOperationOutcomeOperationOutcomeIssueComponentContent(int eventType, XmlPullParser xpp, OperationOutcome owner, OperationOutcome.OperationOutcomeIssueComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { + res.setSeverityElement(parseEnumeration(xpp, OperationOutcome.IssueSeverity.NULL, new OperationOutcome.IssueSeverityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseEnumeration(xpp, OperationOutcome.IssueType.NULL, new OperationOutcome.IssueTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("details")) { + res.setDetails(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnostics")) { + res.setDiagnosticsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.getLocation().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.getExpression().add(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Organization parseOrganization(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Organization res = new Organization(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOrganizationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOrganizationContent(int eventType, XmlPullParser xpp, Organization res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.getType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { + res.getAlias().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.getAddress().add(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.setPartOf(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseOrganizationOrganizationContactComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Organization.OrganizationContactComponent parseOrganizationOrganizationContactComponent(XmlPullParser xpp, Organization owner) throws XmlPullParserException, IOException, FHIRFormatError { + Organization.OrganizationContactComponent res = new Organization.OrganizationContactComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseOrganizationOrganizationContactComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseOrganizationOrganizationContactComponentContent(int eventType, XmlPullParser xpp, Organization owner, Organization.OrganizationContactComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurpose(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setName(parseHumanName(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.setAddress(parseAddress(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Patient parsePatient(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Patient res = new Patient(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePatientContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePatientContent(int eventType, XmlPullParser xpp, Patient res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.getName().add(parseHumanName(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { + res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { + res.setBirthDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "deceased")) { + res.setDeceased(parseType("deceased", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.getAddress().add(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maritalStatus")) { + res.setMaritalStatus(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "multipleBirth")) { + res.setMultipleBirth(parseType("multipleBirth", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { + res.getPhoto().add(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parsePatientContactComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("animal")) { + res.setAnimal(parsePatientAnimalComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { + res.getCommunication().add(parsePatientPatientCommunicationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("generalPractitioner")) { + res.getGeneralPractitioner().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { + res.setManagingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parsePatientPatientLinkComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Patient.ContactComponent parsePatientContactComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { + Patient.ContactComponent res = new Patient.ContactComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePatientContactComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePatientContactComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.ContactComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.getRelationship().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setName(parseHumanName(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.setAddress(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { + res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Patient.AnimalComponent parsePatientAnimalComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { + Patient.AnimalComponent res = new Patient.AnimalComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePatientAnimalComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePatientAnimalComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.AnimalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("species")) { + res.setSpecies(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("breed")) { + res.setBreed(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("genderStatus")) { + res.setGenderStatus(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Patient.PatientCommunicationComponent parsePatientPatientCommunicationComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { + Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePatientPatientCommunicationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePatientPatientCommunicationComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.PatientCommunicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguage(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { + res.setPreferredElement(parseBoolean(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Patient.PatientLinkComponent parsePatientPatientLinkComponent(XmlPullParser xpp, Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { + Patient.PatientLinkComponent res = new Patient.PatientLinkComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePatientPatientLinkComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePatientPatientLinkComponentContent(int eventType, XmlPullParser xpp, Patient owner, Patient.PatientLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("other")) { + res.setOther(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Patient.LinkType.NULL, new Patient.LinkTypeEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PaymentNotice parsePaymentNotice(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + PaymentNotice res = new PaymentNotice(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePaymentNoticeContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePaymentNoticeContent(int eventType, XmlPullParser xpp, PaymentNotice res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, PaymentNotice.PaymentNoticeStatus.NULL, new PaymentNotice.PaymentNoticeStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { + res.setStatusDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentStatus")) { + res.setPaymentStatus(parseCodeableConcept(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected PaymentReconciliation parsePaymentReconciliation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + PaymentReconciliation res = new PaymentReconciliation(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePaymentReconciliationContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePaymentReconciliationContent(int eventType, XmlPullParser xpp, PaymentReconciliation res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, PaymentReconciliation.PaymentReconciliationStatus.NULL, new PaymentReconciliation.PaymentReconciliationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { + res.setDispositionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { + res.setRequestProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { + res.setRequestOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.getDetail().add(parsePaymentReconciliationDetailsComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { + res.setForm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { + res.setTotal(parseMoney(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { + res.getProcessNote().add(parsePaymentReconciliationNotesComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected PaymentReconciliation.DetailsComponent parsePaymentReconciliationDetailsComponent(XmlPullParser xpp, PaymentReconciliation owner) throws XmlPullParserException, IOException, FHIRFormatError { + PaymentReconciliation.DetailsComponent res = new PaymentReconciliation.DetailsComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePaymentReconciliationDetailsComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePaymentReconciliationDetailsComponentContent(int eventType, XmlPullParser xpp, PaymentReconciliation owner, PaymentReconciliation.DetailsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("submitter")) { + res.setSubmitter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { + res.setPayee(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { + res.setAmount(parseMoney(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PaymentReconciliation.NotesComponent parsePaymentReconciliationNotesComponent(XmlPullParser xpp, PaymentReconciliation owner) throws XmlPullParserException, IOException, FHIRFormatError { + PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePaymentReconciliationNotesComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePaymentReconciliationNotesComponentContent(int eventType, XmlPullParser xpp, PaymentReconciliation owner, PaymentReconciliation.NotesComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Person parsePerson(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Person res = new Person(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePersonContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePersonContent(int eventType, XmlPullParser xpp, Person res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.getName().add(parseHumanName(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { + res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { + res.setBirthDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.getAddress().add(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { + res.setPhoto(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { + res.setManagingOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parsePersonPersonLinkComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Person.PersonLinkComponent parsePersonPersonLinkComponent(XmlPullParser xpp, Person owner) throws XmlPullParserException, IOException, FHIRFormatError { + Person.PersonLinkComponent res = new Person.PersonLinkComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePersonPersonLinkComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePersonPersonLinkComponentContent(int eventType, XmlPullParser xpp, Person owner, Person.PersonLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assurance")) { + res.setAssuranceElement(parseEnumeration(xpp, Person.IdentityAssuranceLevel.NULL, new Person.IdentityAssuranceLevelEnumFactory())); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition parsePlanDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition res = new PlanDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionContent(int eventType, XmlPullParser xpp, PlanDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { + res.getContributor().add(parseContributor(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { + res.getLibrary().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { + res.getGoal().add(parsePlanDefinitionPlanDefinitionGoalComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionPlanDefinitionGoalComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionGoalComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionGoalComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescription(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriority(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStart(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { + res.getAddresses().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.getDocumentation().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.getTarget().add(parsePlanDefinitionPlanDefinitionGoalTargetComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionPlanDefinitionGoalTargetComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionGoalTargetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionGoalTargetComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionGoalTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { + res.setMeasure(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "detail")) { + res.setDetail(parseType("detail", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("due")) { + res.setDue(parseDuration(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionPlanDefinitionActionComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionActionComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { + res.setPrefixElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textEquivalent")) { + res.setTextEquivalentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.getDocumentation().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goalId")) { + res.getGoalId().add(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("triggerDefinition")) { + res.getTriggerDefinition().add(parseTriggerDefinition(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.getCondition().add(parsePlanDefinitionPlanDefinitionActionConditionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { + res.getInput().add(parseDataRequirement(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("output")) { + res.getOutput().add(parseDataRequirement(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAction")) { + res.getRelatedAction().add(parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parsePlanDefinitionPlanDefinitionActionParticipantComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingBehavior")) { + res.setGroupingBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionGroupingBehavior.NULL, new PlanDefinition.ActionGroupingBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("selectionBehavior")) { + res.setSelectionBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionSelectionBehavior.NULL, new PlanDefinition.ActionSelectionBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requiredBehavior")) { + res.setRequiredBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionRequiredBehavior.NULL, new PlanDefinition.ActionRequiredBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precheckBehavior")) { + res.setPrecheckBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionPrecheckBehavior.NULL, new PlanDefinition.ActionPrecheckBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cardinalityBehavior")) { + res.setCardinalityBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionCardinalityBehavior.NULL, new PlanDefinition.ActionCardinalityBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinition(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { + res.setTransform(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dynamicValue")) { + res.getDynamicValue().add(parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionPlanDefinitionActionConditionComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionActionConditionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionActionConditionComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, PlanDefinition.ActionConditionKind.NULL, new PlanDefinition.ActionConditionKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionActionRelatedActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionActionRelatedActionComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionRelatedActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionId")) { + res.setActionIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationshipElement(parseEnumeration(xpp, PlanDefinition.ActionRelationshipType.NULL, new PlanDefinition.ActionRelationshipTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "offset")) { + res.setOffset(parseType("offset", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionPlanDefinitionActionParticipantComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionActionParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionActionParticipantComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, PlanDefinition.ActionParticipantType.NULL, new PlanDefinition.ActionParticipantTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePlanDefinitionPlanDefinitionActionDynamicValueComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePlanDefinitionPlanDefinitionActionDynamicValueComponentContent(int eventType, XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionDynamicValueComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Practitioner parsePractitioner(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Practitioner res = new Practitioner(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePractitionerContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePractitionerContent(int eventType, XmlPullParser xpp, Practitioner res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.getName().add(parseHumanName(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.getAddress().add(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { + res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { + res.setBirthDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { + res.getPhoto().add(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { + res.getQualification().add(parsePractitionerPractitionerQualificationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { + res.getCommunication().add(parseCodeableConcept(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Practitioner.PractitionerQualificationComponent parsePractitionerPractitionerQualificationComponent(XmlPullParser xpp, Practitioner owner) throws XmlPullParserException, IOException, FHIRFormatError { + Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePractitionerPractitionerQualificationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePractitionerPractitionerQualificationComponentContent(int eventType, XmlPullParser xpp, Practitioner owner, Practitioner.PractitionerQualificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { + res.setIssuer(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PractitionerRole parsePractitionerRole(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + PractitionerRole res = new PractitionerRole(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePractitionerRoleContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePractitionerRoleContent(int eventType, XmlPullParser xpp, PractitionerRole res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practitioner")) { + res.setPractitioner(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { + res.getSpecialty().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.getLocation().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("healthcareService")) { + res.getHealthcareService().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableTime")) { + res.getAvailableTime().add(parsePractitionerRolePractitionerRoleAvailableTimeComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notAvailable")) { + res.getNotAvailable().add(parsePractitionerRolePractitionerRoleNotAvailableComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { + res.setAvailabilityExceptionsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.getEndpoint().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected PractitionerRole.PractitionerRoleAvailableTimeComponent parsePractitionerRolePractitionerRoleAvailableTimeComponent(XmlPullParser xpp, PractitionerRole owner) throws XmlPullParserException, IOException, FHIRFormatError { + PractitionerRole.PractitionerRoleAvailableTimeComponent res = new PractitionerRole.PractitionerRoleAvailableTimeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePractitionerRolePractitionerRoleAvailableTimeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePractitionerRolePractitionerRoleAvailableTimeComponentContent(int eventType, XmlPullParser xpp, PractitionerRole owner, PractitionerRole.PractitionerRoleAvailableTimeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { + res.getDaysOfWeek().add(parseEnumeration(xpp, PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { + res.setAllDayElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableStartTime")) { + res.setAvailableStartTimeElement(parseTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableEndTime")) { + res.setAvailableEndTimeElement(parseTime(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected PractitionerRole.PractitionerRoleNotAvailableComponent parsePractitionerRolePractitionerRoleNotAvailableComponent(XmlPullParser xpp, PractitionerRole owner) throws XmlPullParserException, IOException, FHIRFormatError { + PractitionerRole.PractitionerRoleNotAvailableComponent res = new PractitionerRole.PractitionerRoleNotAvailableComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parsePractitionerRolePractitionerRoleNotAvailableComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parsePractitionerRolePractitionerRoleNotAvailableComponentContent(int eventType, XmlPullParser xpp, PractitionerRole owner, PractitionerRole.PractitionerRoleNotAvailableComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("during")) { + res.setDuring(parsePeriod(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Procedure parseProcedure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Procedure res = new Procedure(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcedureContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcedureContent(int eventType, XmlPullParser xpp, Procedure res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Procedure.ProcedureStatus.NULL, new Procedure.ProcedureStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDone")) { + res.setNotDoneElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notDoneReason")) { + res.setNotDoneReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "performed")) { + res.setPerformed(parseType("performed", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.getPerformer().add(parseProcedureProcedurePerformerComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.getBodySite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcome(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("report")) { + res.getReport().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("complication")) { + res.getComplication().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("complicationDetail")) { + res.getComplicationDetail().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("followUp")) { + res.getFollowUp().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focalDevice")) { + res.getFocalDevice().add(parseProcedureProcedureFocalDeviceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usedReference")) { + res.getUsedReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usedCode")) { + res.getUsedCode().add(parseCodeableConcept(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Procedure.ProcedurePerformerComponent parseProcedureProcedurePerformerComponent(XmlPullParser xpp, Procedure owner) throws XmlPullParserException, IOException, FHIRFormatError { + Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcedureProcedurePerformerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcedureProcedurePerformerComponentContent(int eventType, XmlPullParser xpp, Procedure owner, Procedure.ProcedurePerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRole(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.setActor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Procedure.ProcedureFocalDeviceComponent parseProcedureProcedureFocalDeviceComponent(XmlPullParser xpp, Procedure owner) throws XmlPullParserException, IOException, FHIRFormatError { + Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcedureProcedureFocalDeviceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcedureProcedureFocalDeviceComponentContent(int eventType, XmlPullParser xpp, Procedure owner, Procedure.ProcedureFocalDeviceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.setAction(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manipulated")) { + res.setManipulated(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ProcedureRequest parseProcedureRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ProcedureRequest res = new ProcedureRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcedureRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcedureRequestContent(int eventType, XmlPullParser xpp, ProcedureRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { + res.getReplaces().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requisition")) { + res.setRequisition(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ProcedureRequest.ProcedureRequestStatus.NULL, new ProcedureRequest.ProcedureRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { + res.setIntentElement(parseEnumeration(xpp, ProcedureRequest.ProcedureRequestIntent.NULL, new ProcedureRequest.ProcedureRequestIntentEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, ProcedureRequest.ProcedureRequestPriority.NULL, new ProcedureRequest.ProcedureRequestPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { + res.setDoNotPerformElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "asNeeded")) { + res.setAsNeeded(parseType("asNeeded", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { + res.setRequester(parseProcedureRequestProcedureRequestRequesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { + res.setPerformerType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { + res.getSupportingInfo().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { + res.getSpecimen().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.getBodySite().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { + res.getRelevantHistory().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ProcedureRequest.ProcedureRequestRequesterComponent parseProcedureRequestProcedureRequestRequesterComponent(XmlPullParser xpp, ProcedureRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + ProcedureRequest.ProcedureRequestRequesterComponent res = new ProcedureRequest.ProcedureRequestRequesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcedureRequestProcedureRequestRequesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcedureRequestProcedureRequestRequesterComponentContent(int eventType, XmlPullParser xpp, ProcedureRequest owner, ProcedureRequest.ProcedureRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.setAgent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ProcessRequest parseProcessRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ProcessRequest res = new ProcessRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcessRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcessRequestContent(int eventType, XmlPullParser xpp, ProcessRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ProcessRequest.ProcessRequestStatus.NULL, new ProcessRequest.ProcessRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.setActionElement(parseEnumeration(xpp, ProcessRequest.ActionList.NULL, new ProcessRequest.ActionListEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.setTarget(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { + res.setProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponse(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nullify")) { + res.setNullifyElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { + res.setReferenceElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseProcessRequestItemsComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { + res.getInclude().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { + res.getExclude().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ProcessRequest.ItemsComponent parseProcessRequestItemsComponent(XmlPullParser xpp, ProcessRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + ProcessRequest.ItemsComponent res = new ProcessRequest.ItemsComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcessRequestItemsComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcessRequestItemsComponentContent(int eventType, XmlPullParser xpp, ProcessRequest owner, ProcessRequest.ItemsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceLinkId")) { + res.setSequenceLinkIdElement(parseInteger(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ProcessResponse parseProcessResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ProcessResponse res = new ProcessResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcessResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcessResponseContent(int eventType, XmlPullParser xpp, ProcessResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ProcessResponse.ProcessResponseStatus.NULL, new ProcessResponse.ProcessResponseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { + res.setCreatedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { + res.setOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.setRequest(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcomeElement(parseEnumeration(xpp, ProcessResponse.ProcessingOutcome.NULL, new ProcessResponse.ProcessingOutcomeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { + res.setDispositionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { + res.setRequestProvider(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestOrganization")) { + res.setRequestOrganization(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { + res.setForm(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { + res.getProcessNote().add(parseProcessResponseProcessResponseProcessNoteComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { + res.getError().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationRequest")) { + res.getCommunicationRequest().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ProcessResponse.ProcessResponseProcessNoteComponent parseProcessResponseProcessResponseProcessNoteComponent(XmlPullParser xpp, ProcessResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + ProcessResponse.ProcessResponseProcessNoteComponent res = new ProcessResponse.ProcessResponseProcessNoteComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProcessResponseProcessResponseProcessNoteComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProcessResponseProcessResponseProcessNoteComponentContent(int eventType, XmlPullParser xpp, ProcessResponse owner, ProcessResponse.ProcessResponseProcessNoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Provenance parseProvenance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Provenance res = new Provenance(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProvenanceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProvenanceContent(int eventType, XmlPullParser xpp, Provenance res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.getTarget().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occured")) { + res.setOccured(parseType("occured", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { + res.setRecordedElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { + res.getPolicy().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { + res.setLocation(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.getReason().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activity")) { + res.setActivity(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.getAgent().add(parseProvenanceProvenanceAgentComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { + res.getEntity().add(parseProvenanceProvenanceEntityComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { + res.getSignature().add(parseSignature(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Provenance.ProvenanceAgentComponent parseProvenanceProvenanceAgentComponent(XmlPullParser xpp, Provenance owner) throws XmlPullParserException, IOException, FHIRFormatError { + Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProvenanceProvenanceAgentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProvenanceProvenanceAgentComponentContent(int eventType, XmlPullParser xpp, Provenance owner, Provenance.ProvenanceAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.getRole().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "who")) { + res.setWho(parseType("who", xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onBehalfOf")) { + res.setOnBehalfOf(parseType("onBehalfOf", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Provenance.ProvenanceEntityComponent parseProvenanceProvenanceEntityComponent(XmlPullParser xpp, Provenance owner) throws XmlPullParserException, IOException, FHIRFormatError { + Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseProvenanceProvenanceEntityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseProvenanceProvenanceEntityComponentContent(int eventType, XmlPullParser xpp, Provenance owner, Provenance.ProvenanceEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { + res.setRoleElement(parseEnumeration(xpp, Provenance.ProvenanceEntityRole.NULL, new Provenance.ProvenanceEntityRoleEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "what")) { + res.setWhat(parseType("what", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.getAgent().add(parseProvenanceProvenanceAgentComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Questionnaire parseQuestionnaire(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Questionnaire res = new Questionnaire(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireContent(int eventType, XmlPullParser xpp, Questionnaire res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectType")) { + res.getSubjectType().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireQuestionnaireItemComponent(XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { + Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireQuestionnaireItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireQuestionnaireItemComponentContent(int eventType, XmlPullParser xpp, Questionnaire owner, Questionnaire.QuestionnaireItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { + res.setLinkIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinitionElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { + res.setPrefixElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Questionnaire.QuestionnaireItemType.NULL, new Questionnaire.QuestionnaireItemTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enableWhen")) { + res.getEnableWhen().add(parseQuestionnaireQuestionnaireItemEnableWhenComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { + res.setRequiredElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeats")) { + res.setRepeatsElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readOnly")) { + res.setReadOnlyElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxLength")) { + res.setMaxLengthElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("options")) { + res.setOptions(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("option")) { + res.getOption().add(parseQuestionnaireQuestionnaireItemOptionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "initial")) { + res.setInitial(parseType("initial", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireQuestionnaireItemEnableWhenComponent(XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { + Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireQuestionnaireItemEnableWhenComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireQuestionnaireItemEnableWhenComponentContent(int eventType, XmlPullParser xpp, Questionnaire owner, Questionnaire.QuestionnaireItemEnableWhenComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("question")) { + res.setQuestionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hasAnswer")) { + res.setHasAnswerElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "answer")) { + res.setAnswer(parseType("answer", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Questionnaire.QuestionnaireItemOptionComponent parseQuestionnaireQuestionnaireItemOptionComponent(XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { + Questionnaire.QuestionnaireItemOptionComponent res = new Questionnaire.QuestionnaireItemOptionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireQuestionnaireItemOptionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireQuestionnaireItemOptionComponentContent(int eventType, XmlPullParser xpp, Questionnaire owner, Questionnaire.QuestionnaireItemOptionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected QuestionnaireResponse parseQuestionnaireResponse(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + QuestionnaireResponse res = new QuestionnaireResponse(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireResponseContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireResponseContent(int eventType, XmlPullParser xpp, QuestionnaireResponse res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { + res.getParent().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("questionnaire")) { + res.setQuestionnaire(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, QuestionnaireResponse.QuestionnaireResponseStatus.NULL, new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authored")) { + res.setAuthoredElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.setSource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseQuestionnaireResponseItemComponent(XmlPullParser xpp, QuestionnaireResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireResponseQuestionnaireResponseItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireResponseQuestionnaireResponseItemComponentContent(int eventType, XmlPullParser xpp, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { + res.setLinkIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinitionElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { + res.setTextElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answer")) { + res.getAnswer().add(parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(XmlPullParser xpp, QuestionnaireResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { + QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentContent(int eventType, XmlPullParser xpp, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { + res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected RelatedPerson parseRelatedPerson(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + RelatedPerson res = new RelatedPerson(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRelatedPersonContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRelatedPersonContent(int eventType, XmlPullParser xpp, RelatedPerson res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationship(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.getName().add(parseHumanName(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { + res.getTelecom().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { + res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, new Enumerations.AdministrativeGenderEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { + res.setBirthDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { + res.getAddress().add(parseAddress(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { + res.getPhoto().add(parseAttachment(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected RequestGroup parseRequestGroup(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + RequestGroup res = new RequestGroup(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRequestGroupContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRequestGroupContent(int eventType, XmlPullParser xpp, RequestGroup res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.getDefinition().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { + res.getReplaces().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { + res.setGroupIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, RequestGroup.RequestStatus.NULL, new RequestGroup.RequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { + res.setIntentElement(parseEnumeration(xpp, RequestGroup.RequestIntent.NULL, new RequestGroup.RequestIntentEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, RequestGroup.RequestPriority.NULL, new RequestGroup.RequestPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { + res.setAuthor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.getReasonCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.getReasonReference().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseRequestGroupRequestGroupActionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected RequestGroup.RequestGroupActionComponent parseRequestGroupRequestGroupActionComponent(XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { + RequestGroup.RequestGroupActionComponent res = new RequestGroup.RequestGroupActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRequestGroupRequestGroupActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRequestGroupRequestGroupActionComponentContent(int eventType, XmlPullParser xpp, RequestGroup owner, RequestGroup.RequestGroupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { + res.setPrefixElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textEquivalent")) { + res.setTextEquivalentElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.getCode().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.getDocumentation().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.getCondition().add(parseRequestGroupRequestGroupActionConditionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAction")) { + res.getRelatedAction().add(parseRequestGroupRequestGroupActionRelatedActionComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { + res.setTiming(parseType("timing", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingBehavior")) { + res.setGroupingBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionGroupingBehavior.NULL, new RequestGroup.ActionGroupingBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("selectionBehavior")) { + res.setSelectionBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionSelectionBehavior.NULL, new RequestGroup.ActionSelectionBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requiredBehavior")) { + res.setRequiredBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionRequiredBehavior.NULL, new RequestGroup.ActionRequiredBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precheckBehavior")) { + res.setPrecheckBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionPrecheckBehavior.NULL, new RequestGroup.ActionPrecheckBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cardinalityBehavior")) { + res.setCardinalityBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionCardinalityBehavior.NULL, new RequestGroup.ActionCardinalityBehaviorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseRequestGroupRequestGroupActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected RequestGroup.RequestGroupActionConditionComponent parseRequestGroupRequestGroupActionConditionComponent(XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { + RequestGroup.RequestGroupActionConditionComponent res = new RequestGroup.RequestGroupActionConditionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRequestGroupRequestGroupActionConditionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRequestGroupRequestGroupActionConditionComponentContent(int eventType, XmlPullParser xpp, RequestGroup owner, RequestGroup.RequestGroupActionConditionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, RequestGroup.ActionConditionKind.NULL, new RequestGroup.ActionConditionKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected RequestGroup.RequestGroupActionRelatedActionComponent parseRequestGroupRequestGroupActionRelatedActionComponent(XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { + RequestGroup.RequestGroupActionRelatedActionComponent res = new RequestGroup.RequestGroupActionRelatedActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRequestGroupRequestGroupActionRelatedActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRequestGroupRequestGroupActionRelatedActionComponentContent(int eventType, XmlPullParser xpp, RequestGroup owner, RequestGroup.RequestGroupActionRelatedActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionId")) { + res.setActionIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { + res.setRelationshipElement(parseEnumeration(xpp, RequestGroup.ActionRelationshipType.NULL, new RequestGroup.ActionRelationshipTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "offset")) { + res.setOffset(parseType("offset", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ResearchStudy parseResearchStudy(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ResearchStudy res = new ResearchStudy(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseResearchStudyContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseResearchStudyContent(int eventType, XmlPullParser xpp, ResearchStudy res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { + res.getProtocol().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ResearchStudy.ResearchStudyStatus.NULL, new ResearchStudy.ResearchStudyStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { + res.getFocus().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("keyword")) { + res.getKeyword().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enrollment")) { + res.getEnrollment().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sponsor")) { + res.setSponsor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("principalInvestigator")) { + res.setPrincipalInvestigator(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { + res.getSite().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonStopped")) { + res.setReasonStopped(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("arm")) { + res.getArm().add(parseResearchStudyResearchStudyArmComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ResearchStudy.ResearchStudyArmComponent parseResearchStudyResearchStudyArmComponent(XmlPullParser xpp, ResearchStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { + ResearchStudy.ResearchStudyArmComponent res = new ResearchStudy.ResearchStudyArmComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseResearchStudyResearchStudyArmComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseResearchStudyResearchStudyArmComponentContent(int eventType, XmlPullParser xpp, ResearchStudy owner, ResearchStudy.ResearchStudyArmComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ResearchSubject parseResearchSubject(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ResearchSubject res = new ResearchSubject(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseResearchSubjectContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseResearchSubjectContent(int eventType, XmlPullParser xpp, ResearchSubject res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, ResearchSubject.ResearchSubjectStatus.NULL, new ResearchSubject.ResearchSubjectStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { + res.setStudy(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("individual")) { + res.setIndividual(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assignedArm")) { + res.setAssignedArmElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actualArm")) { + res.setActualArmElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("consent")) { + res.setConsent(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected RiskAssessment parseRiskAssessment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + RiskAssessment res = new RiskAssessment(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRiskAssessmentContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRiskAssessmentContent(int eventType, XmlPullParser xpp, RiskAssessment res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.setBasedOn(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { + res.setParent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, RiskAssessment.RiskAssessmentStatus.NULL, new RiskAssessment.RiskAssessmentStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.setCondition(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { + res.setReason(parseType("reason", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basis")) { + res.getBasis().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prediction")) { + res.getPrediction().add(parseRiskAssessmentRiskAssessmentPredictionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mitigation")) { + res.setMitigationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentRiskAssessmentPredictionComponent(XmlPullParser xpp, RiskAssessment owner) throws XmlPullParserException, IOException, FHIRFormatError { + RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseRiskAssessmentRiskAssessmentPredictionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseRiskAssessmentRiskAssessmentPredictionComponentContent(int eventType, XmlPullParser xpp, RiskAssessment owner, RiskAssessment.RiskAssessmentPredictionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { + res.setOutcome(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "probability")) { + res.setProbability(parseType("probability", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualitativeRisk")) { + res.setQualitativeRisk(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relativeRisk")) { + res.setRelativeRiskElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "when")) { + res.setWhen(parseType("when", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rationale")) { + res.setRationaleElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Schedule parseSchedule(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Schedule res = new Schedule(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseScheduleContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseScheduleContent(int eventType, XmlPullParser xpp, Schedule res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { + res.setActiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { + res.setServiceCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { + res.getServiceType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { + res.getSpecialty().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { + res.getActor().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("planningHorizon")) { + res.setPlanningHorizon(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected SearchParameter parseSearchParameter(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + SearchParameter res = new SearchParameter(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSearchParameterContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSearchParameterContent(int eventType, XmlPullParser xpp, SearchParameter res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { + res.getBase().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { + res.setDerivedFromElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpath")) { + res.setXpathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpathUsage")) { + res.setXpathUsageElement(parseEnumeration(xpp, SearchParameter.XPathUsageType.NULL, new SearchParameter.XPathUsageTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.getTarget().add(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { + res.getComparator().add(parseEnumeration(xpp, SearchParameter.SearchComparator.NULL, new SearchParameter.SearchComparatorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { + res.getModifier().add(parseEnumeration(xpp, SearchParameter.SearchModifierCode.NULL, new SearchParameter.SearchModifierCodeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("chain")) { + res.getChain().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { + res.getComponent().add(parseSearchParameterSearchParameterComponentComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected SearchParameter.SearchParameterComponentComponent parseSearchParameterSearchParameterComponentComponent(XmlPullParser xpp, SearchParameter owner) throws XmlPullParserException, IOException, FHIRFormatError { + SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSearchParameterSearchParameterComponentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSearchParameterSearchParameterComponentComponentContent(int eventType, XmlPullParser xpp, SearchParameter owner, SearchParameter.SearchParameterComponentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { + res.setDefinition(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence parseSequence(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence res = new Sequence(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceContent(int eventType, XmlPullParser xpp, Sequence res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Sequence.SequenceType.NULL, new Sequence.SequenceTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coordinateSystem")) { + res.setCoordinateSystemElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { + res.setSpecimen(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { + res.setDevice(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { + res.setPerformer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeq")) { + res.setReferenceSeq(parseSequenceSequenceReferenceSeqComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variant")) { + res.getVariant().add(parseSequenceSequenceVariantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observedSeq")) { + res.setObservedSeqElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quality")) { + res.getQuality().add(parseSequenceSequenceQualityComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readCoverage")) { + res.setReadCoverageElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repository")) { + res.getRepository().add(parseSequenceSequenceRepositoryComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pointer")) { + res.getPointer().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structureVariant")) { + res.getStructureVariant().add(parseSequenceSequenceStructureVariantComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceReferenceSeqComponent parseSequenceSequenceReferenceSeqComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceReferenceSeqComponent res = new Sequence.SequenceReferenceSeqComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceReferenceSeqComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceReferenceSeqComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceReferenceSeqComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("chromosome")) { + res.setChromosome(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("genomeBuild")) { + res.setGenomeBuildElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqId")) { + res.setReferenceSeqId(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqPointer")) { + res.setReferenceSeqPointer(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqString")) { + res.setReferenceSeqStringElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strand")) { + res.setStrandElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("windowStart")) { + res.setWindowStartElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("windowEnd")) { + res.setWindowEndElement(parseInteger(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceVariantComponent parseSequenceSequenceVariantComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceVariantComponent res = new Sequence.SequenceVariantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceVariantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceVariantComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceVariantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observedAllele")) { + res.setObservedAlleleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceAllele")) { + res.setReferenceAlleleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cigar")) { + res.setCigarElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantPointer")) { + res.setVariantPointer(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceQualityComponent parseSequenceSequenceQualityComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceQualityComponent res = new Sequence.SequenceQualityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceQualityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceQualityComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceQualityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Sequence.QualityType.NULL, new Sequence.QualityTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("standardSequence")) { + res.setStandardSequence(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { + res.setScore(parseQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("truthTP")) { + res.setTruthTPElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("queryTP")) { + res.setQueryTPElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("truthFN")) { + res.setTruthFNElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("queryFP")) { + res.setQueryFPElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gtFP")) { + res.setGtFPElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precision")) { + res.setPrecisionElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recall")) { + res.setRecallElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fScore")) { + res.setFScoreElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("roc")) { + res.setRoc(parseSequenceSequenceQualityRocComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceQualityRocComponent parseSequenceSequenceQualityRocComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceQualityRocComponent res = new Sequence.SequenceQualityRocComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceQualityRocComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceQualityRocComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceQualityRocComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { + res.getScore().add(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numTP")) { + res.getNumTP().add(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numFP")) { + res.getNumFP().add(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numFN")) { + res.getNumFN().add(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precision")) { + res.getPrecision().add(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sensitivity")) { + res.getSensitivity().add(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fMeasure")) { + res.getFMeasure().add(parseDecimal(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceRepositoryComponent parseSequenceSequenceRepositoryComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceRepositoryComponent res = new Sequence.SequenceRepositoryComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceRepositoryComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceRepositoryComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceRepositoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Sequence.RepositoryType.NULL, new Sequence.RepositoryTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("datasetId")) { + res.setDatasetIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantsetId")) { + res.setVariantsetIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readsetId")) { + res.setReadsetIdElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceStructureVariantComponent parseSequenceSequenceStructureVariantComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceStructureVariantComponent res = new Sequence.SequenceStructureVariantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceStructureVariantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceStructureVariantComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceStructureVariantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precision")) { + res.setPrecisionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reportedaCGHRatio")) { + res.setReportedaCGHRatioElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { + res.setLengthElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outer")) { + res.setOuter(parseSequenceSequenceStructureVariantOuterComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inner")) { + res.setInner(parseSequenceSequenceStructureVariantInnerComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceStructureVariantOuterComponent parseSequenceSequenceStructureVariantOuterComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceStructureVariantOuterComponent res = new Sequence.SequenceStructureVariantOuterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceStructureVariantOuterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceStructureVariantOuterComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceStructureVariantOuterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInteger(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Sequence.SequenceStructureVariantInnerComponent parseSequenceSequenceStructureVariantInnerComponent(XmlPullParser xpp, Sequence owner) throws XmlPullParserException, IOException, FHIRFormatError { + Sequence.SequenceStructureVariantInnerComponent res = new Sequence.SequenceStructureVariantInnerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSequenceSequenceStructureVariantInnerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSequenceSequenceStructureVariantInnerComponentContent(int eventType, XmlPullParser xpp, Sequence owner, Sequence.SequenceStructureVariantInnerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInteger(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ServiceDefinition parseServiceDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ServiceDefinition res = new ServiceDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseServiceDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseServiceDefinitionContent(int eventType, XmlPullParser xpp, ServiceDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { + res.setUsageElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { + res.setApprovalDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { + res.setLastReviewDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { + res.setEffectivePeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { + res.getTopic().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { + res.getContributor().add(parseContributor(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { + res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("trigger")) { + res.getTrigger().add(parseTriggerDefinition(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { + res.getDataRequirement().add(parseDataRequirement(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationDefinition")) { + res.setOperationDefinition(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Slot parseSlot(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Slot res = new Slot(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSlotContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSlotContent(int eventType, XmlPullParser xpp, Slot res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { + res.setServiceCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { + res.getServiceType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { + res.getSpecialty().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentType")) { + res.setAppointmentType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { + res.setSchedule(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Slot.SlotStatus.NULL, new Slot.SlotStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { + res.setStartElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overbooked")) { + res.setOverbookedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Specimen parseSpecimen(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Specimen res = new Specimen(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenContent(int eventType, XmlPullParser xpp, Specimen res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accessionIdentifier")) { + res.setAccessionIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Specimen.SpecimenStatus.NULL, new Specimen.SpecimenStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { + res.setSubject(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receivedTime")) { + res.setReceivedTimeElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { + res.getParent().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { + res.getRequest().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collection")) { + res.setCollection(parseSpecimenSpecimenCollectionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processing")) { + res.getProcessing().add(parseSpecimenSpecimenProcessingComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("container")) { + res.getContainer().add(parseSpecimenSpecimenContainerComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Specimen.SpecimenCollectionComponent parseSpecimenSpecimenCollectionComponent(XmlPullParser xpp, Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { + Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenSpecimenCollectionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenSpecimenCollectionComponentContent(int eventType, XmlPullParser xpp, Specimen owner, Specimen.SpecimenCollectionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collector")) { + res.setCollector(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "collected")) { + res.setCollected(parseType("collected", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { + res.setMethod(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { + res.setBodySite(parseCodeableConcept(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Specimen.SpecimenProcessingComponent parseSpecimenSpecimenProcessingComponent(XmlPullParser xpp, Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { + Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenSpecimenProcessingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenSpecimenProcessingComponentContent(int eventType, XmlPullParser xpp, Specimen owner, Specimen.SpecimenProcessingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { + res.setProcedure(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additive")) { + res.getAdditive().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "time")) { + res.setTime(parseType("time", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Specimen.SpecimenContainerComponent parseSpecimenSpecimenContainerComponent(XmlPullParser xpp, Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { + Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenSpecimenContainerComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenSpecimenContainerComponentContent(int eventType, XmlPullParser xpp, Specimen owner, Specimen.SpecimenContainerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capacity")) { + res.setCapacity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimenQuantity")) { + res.setSpecimenQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "additive")) { + res.setAdditive(parseType("additive", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected SpecimenDefinition parseSpecimenDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + SpecimenDefinition res = new SpecimenDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenDefinitionContent(int eventType, XmlPullParser xpp, SpecimenDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeCollected")) { + res.setTypeCollected(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientPreparation")) { + res.setPatientPreparationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timeAspect")) { + res.setTimeAspectElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collection")) { + res.getCollection().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimenToLab")) { + res.getSpecimenToLab().add(parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent res = new SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentContent(int eventType, XmlPullParser xpp, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isDerived")) { + res.setIsDerivedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preference")) { + res.setPreferenceElement(parseEnumeration(xpp, SpecimenDefinition.SpecimenContainedPreference.NULL, new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerMaterial")) { + res.setContainerMaterial(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerType")) { + res.setContainerType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerCap")) { + res.setContainerCap(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerDescription")) { + res.setContainerDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerCapacity")) { + res.setContainerCapacity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerMinimumVolume")) { + res.setContainerMinimumVolume(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerAdditive")) { + res.getContainerAdditive().add(parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containerPreparation")) { + res.setContainerPreparationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirement")) { + res.setRequirementElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("retentionTime")) { + res.setRetentionTime(parseDuration(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rejectionCriterion")) { + res.getRejectionCriterion().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("handling")) { + res.getHandling().add(parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent res = new SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentContent(int eventType, XmlPullParser xpp, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "additive")) { + res.setAdditive(parseType("additive", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent res = new SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentContent(int eventType, XmlPullParser xpp, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionSet")) { + res.setConditionSet(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tempRange")) { + res.setTempRange(parseRange(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDuration")) { + res.setMaxDuration(parseDuration(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lightExposure")) { + res.setLightExposureElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { + res.setInstructionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureDefinition parseStructureDefinition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + StructureDefinition res = new StructureDefinition(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureDefinitionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureDefinitionContent(int eventType, XmlPullParser xpp, StructureDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("keyword")) { + res.getKeyword().add(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { + res.setFhirVersionElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mapping")) { + res.getMapping().add(parseStructureDefinitionStructureDefinitionMappingComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { + res.setKindElement(parseEnumeration(xpp, StructureDefinition.StructureDefinitionKind.NULL, new StructureDefinition.StructureDefinitionKindEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abstract")) { + res.setAbstractElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextType")) { + res.setContextTypeElement(parseEnumeration(xpp, StructureDefinition.ExtensionContext.NULL, new StructureDefinition.ExtensionContextEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.getContext().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextInvariant")) { + res.getContextInvariant().add(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseDefinition")) { + res.setBaseDefinitionElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivation")) { + res.setDerivationElement(parseEnumeration(xpp, StructureDefinition.TypeDerivationRule.NULL, new StructureDefinition.TypeDerivationRuleEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("snapshot")) { + res.setSnapshot(parseStructureDefinitionStructureDefinitionSnapshotComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("differential")) { + res.setDifferential(parseStructureDefinitionStructureDefinitionDifferentialComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionStructureDefinitionMappingComponent(XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureDefinitionStructureDefinitionMappingComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureDefinitionStructureDefinitionMappingComponentContent(int eventType, XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionMappingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identity")) { + res.setIdentityElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { + res.setUriElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { + res.setCommentElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureDefinition.StructureDefinitionSnapshotComponent parseStructureDefinitionStructureDefinitionSnapshotComponent(XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureDefinitionStructureDefinitionSnapshotComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureDefinitionStructureDefinitionSnapshotComponentContent(int eventType, XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionSnapshotComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { + res.getElement().add(parseElementDefinition(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionStructureDefinitionDifferentialComponent(XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureDefinitionStructureDefinitionDifferentialComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureDefinitionStructureDefinitionDifferentialComponentContent(int eventType, XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionDifferentialComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { + res.getElement().add(parseElementDefinition(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap parseStructureMap(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap res = new StructureMap(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapContent(int eventType, XmlPullParser xpp, StructureMap res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structure")) { + res.getStructure().add(parseStructureMapStructureMapStructureComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("import")) { + res.getImport().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { + res.getGroup().add(parseStructureMapStructureMapGroupComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapStructureComponent parseStructureMapStructureMapStructureComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapStructureComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapStructureComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapStructureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, StructureMap.StructureMapModelMode.NULL, new StructureMap.StructureMapModelModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { + res.setAliasElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupComponent parseStructureMapStructureMapGroupComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extends")) { + res.setExtendsElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeMode")) { + res.setTypeModeElement(parseEnumeration(xpp, StructureMap.StructureMapGroupTypeMode.NULL, new StructureMap.StructureMapGroupTypeModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { + res.getInput().add(parseStructureMapStructureMapGroupInputComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupInputComponent parseStructureMapStructureMapGroupInputComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupInputComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupInputComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupInputComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { + res.setModeElement(parseEnumeration(xpp, StructureMap.StructureMapInputMode.NULL, new StructureMap.StructureMapInputModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupRuleComponent parseStructureMapStructureMapGroupRuleComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupRuleComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupRuleComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { + res.getSource().add(parseStructureMapStructureMapGroupRuleSourceComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { + res.getTarget().add(parseStructureMapStructureMapGroupRuleTargetComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependent")) { + res.getDependent().add(parseStructureMapStructureMapGroupRuleDependentComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { + res.setDocumentationElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapStructureMapGroupRuleSourceComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupRuleSourceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupRuleSourceComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContextElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { + res.setMinElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { + res.setMaxElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "defaultValue")) { + res.setDefaultValue(parseType("defaultValue", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { + res.setElementElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listMode")) { + res.setListModeElement(parseEnumeration(xpp, StructureMap.StructureMapSourceListMode.NULL, new StructureMap.StructureMapSourceListModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { + res.setVariableElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { + res.setConditionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("check")) { + res.setCheckElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupRuleTargetComponent parseStructureMapStructureMapGroupRuleTargetComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupRuleTargetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupRuleTargetComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContextElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextType")) { + res.setContextTypeElement(parseEnumeration(xpp, StructureMap.StructureMapContextType.NULL, new StructureMap.StructureMapContextTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { + res.setElementElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { + res.setVariableElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listMode")) { + res.getListMode().add(parseEnumeration(xpp, StructureMap.StructureMapTargetListMode.NULL, new StructureMap.StructureMapTargetListModeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listRuleId")) { + res.setListRuleIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { + res.setTransformElement(parseEnumeration(xpp, StructureMap.StructureMapTransform.NULL, new StructureMap.StructureMapTransformEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { + res.getParameter().add(parseStructureMapStructureMapGroupRuleTargetParameterComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapStructureMapGroupRuleTargetParameterComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupRuleTargetParameterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupRuleTargetParameterComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleTargetParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapStructureMapGroupRuleDependentComponent(XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { + StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseStructureMapStructureMapGroupRuleDependentComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseStructureMapStructureMapGroupRuleDependentComponentContent(int eventType, XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleDependentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { + res.getVariable().add(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Subscription parseSubscription(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Subscription res = new Subscription(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSubscriptionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSubscriptionContent(int eventType, XmlPullParser xpp, Subscription res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Subscription.SubscriptionStatus.NULL, new Subscription.SubscriptionStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactPoint(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { + res.setEndElement(parseInstant(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { + res.setReasonElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { + res.setCriteriaElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { + res.setErrorElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("channel")) { + res.setChannel(parseSubscriptionSubscriptionChannelComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tag")) { + res.getTag().add(parseCoding(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Subscription.SubscriptionChannelComponent parseSubscriptionSubscriptionChannelComponent(XmlPullParser xpp, Subscription owner) throws XmlPullParserException, IOException, FHIRFormatError { + Subscription.SubscriptionChannelComponent res = new Subscription.SubscriptionChannelComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSubscriptionSubscriptionChannelComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSubscriptionSubscriptionChannelComponentContent(int eventType, XmlPullParser xpp, Subscription owner, Subscription.SubscriptionChannelComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, Subscription.SubscriptionChannelType.NULL, new Subscription.SubscriptionChannelTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { + res.setEndpointElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { + res.setPayloadElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("header")) { + res.getHeader().add(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Substance parseSubstance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Substance res = new Substance(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSubstanceContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSubstanceContent(int eventType, XmlPullParser xpp, Substance res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Substance.FHIRSubstanceStatus.NULL, new Substance.FHIRSubstanceStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.getCategory().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { + res.getInstance().add(parseSubstanceSubstanceInstanceComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { + res.getIngredient().add(parseSubstanceSubstanceIngredientComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Substance.SubstanceInstanceComponent parseSubstanceSubstanceInstanceComponent(XmlPullParser xpp, Substance owner) throws XmlPullParserException, IOException, FHIRFormatError { + Substance.SubstanceInstanceComponent res = new Substance.SubstanceInstanceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSubstanceSubstanceInstanceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSubstanceSubstanceInstanceComponentContent(int eventType, XmlPullParser xpp, Substance owner, Substance.SubstanceInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expiry")) { + res.setExpiryElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Substance.SubstanceIngredientComponent parseSubstanceSubstanceIngredientComponent(XmlPullParser xpp, Substance owner) throws XmlPullParserException, IOException, FHIRFormatError { + Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSubstanceSubstanceIngredientComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSubstanceSubstanceIngredientComponentContent(int eventType, XmlPullParser xpp, Substance owner, Substance.SubstanceIngredientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseRatio(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "substance")) { + res.setSubstance(parseType("substance", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected SupplyDelivery parseSupplyDelivery(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + SupplyDelivery res = new SupplyDelivery(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSupplyDeliveryContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSupplyDeliveryContent(int eventType, XmlPullParser xpp, SupplyDelivery res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, SupplyDelivery.SupplyDeliveryStatus.NULL, new SupplyDelivery.SupplyDeliveryStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suppliedItem")) { + res.setSuppliedItem(parseSupplyDeliverySupplyDeliverySuppliedItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplier")) { + res.setSupplier(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.setDestination(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { + res.getReceiver().add(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySupplyDeliverySuppliedItemComponent(XmlPullParser xpp, SupplyDelivery owner) throws XmlPullParserException, IOException, FHIRFormatError { + SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSupplyDeliverySupplyDeliverySuppliedItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSupplyDeliverySupplyDeliverySuppliedItemComponentContent(int eventType, XmlPullParser xpp, SupplyDelivery owner, SupplyDelivery.SupplyDeliverySuppliedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { + res.setItem(parseType("item", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected SupplyRequest parseSupplyRequest(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + SupplyRequest res = new SupplyRequest(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSupplyRequestContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSupplyRequestContent(int eventType, XmlPullParser xpp, SupplyRequest res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, SupplyRequest.SupplyRequestStatus.NULL, new SupplyRequest.SupplyRequestStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { + res.setCategory(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, SupplyRequest.RequestPriority.NULL, new SupplyRequest.RequestPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedItem")) { + res.setOrderedItem(parseSupplyRequestSupplyRequestOrderedItemComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { + res.setOccurrence(parseType("occurrence", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { + res.setRequester(parseSupplyRequestSupplyRequestRequesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplier")) { + res.getSupplier().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { + res.setReason(parseType("reason", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deliverFrom")) { + res.setDeliverFrom(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deliverTo")) { + res.setDeliverTo(parseReference(xpp)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected SupplyRequest.SupplyRequestOrderedItemComponent parseSupplyRequestSupplyRequestOrderedItemComponent(XmlPullParser xpp, SupplyRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + SupplyRequest.SupplyRequestOrderedItemComponent res = new SupplyRequest.SupplyRequestOrderedItemComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSupplyRequestSupplyRequestOrderedItemComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSupplyRequestSupplyRequestOrderedItemComponentContent(int eventType, XmlPullParser xpp, SupplyRequest owner, SupplyRequest.SupplyRequestOrderedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { + res.setQuantity(parseQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { + res.setItem(parseType("item", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected SupplyRequest.SupplyRequestRequesterComponent parseSupplyRequestSupplyRequestRequesterComponent(XmlPullParser xpp, SupplyRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { + SupplyRequest.SupplyRequestRequesterComponent res = new SupplyRequest.SupplyRequestRequesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseSupplyRequestSupplyRequestRequesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseSupplyRequestSupplyRequestRequesterComponentContent(int eventType, XmlPullParser xpp, SupplyRequest owner, SupplyRequest.SupplyRequestRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.setAgent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Task parseTask(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + Task res = new Task(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTaskContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTaskContent(int eventType, XmlPullParser xpp, Task res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "definition")) { + res.setDefinition(parseType("definition", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { + res.getBasedOn().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { + res.setGroupIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { + res.getPartOf().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Task.TaskStatus.NULL, new Task.TaskStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { + res.setStatusReason(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessStatus")) { + res.setBusinessStatus(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { + res.setIntentElement(parseEnumeration(xpp, Task.TaskIntent.NULL, new Task.TaskIntentEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { + res.setPriorityElement(parseEnumeration(xpp, Task.TaskPriority.NULL, new Task.TaskPriorityEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { + res.setFocus(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("for")) { + res.setFor(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { + res.setContext(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("executionPeriod")) { + res.setExecutionPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { + res.setAuthoredOnElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastModified")) { + res.setLastModifiedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { + res.setRequester(parseTaskTaskRequesterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { + res.getPerformerType().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { + res.setOwner(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { + res.setReasonCode(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { + res.setReasonReference(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { + res.getRelevantHistory().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("restriction")) { + res.setRestriction(parseTaskTaskRestrictionComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { + res.getInput().add(parseTaskParameterComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("output")) { + res.getOutput().add(parseTaskTaskOutputComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected Task.TaskRequesterComponent parseTaskTaskRequesterComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { + Task.TaskRequesterComponent res = new Task.TaskRequesterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTaskTaskRequesterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTaskTaskRequesterComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.TaskRequesterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { + res.setAgent(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { + res.setOnBehalfOf(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Task.TaskRestrictionComponent parseTaskTaskRestrictionComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { + Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTaskTaskRestrictionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTaskTaskRestrictionComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.TaskRestrictionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repetitions")) { + res.setRepetitionsElement(parsePositiveInt(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { + res.setPeriod(parsePeriod(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { + res.getRecipient().add(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Task.ParameterComponent parseTaskParameterComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { + Task.ParameterComponent res = new Task.ParameterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTaskParameterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTaskParameterComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.ParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected Task.TaskOutputComponent parseTaskTaskOutputComponent(XmlPullParser xpp, Task owner) throws XmlPullParserException, IOException, FHIRFormatError { + Task.TaskOutputComponent res = new Task.TaskOutputComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTaskTaskOutputComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTaskTaskOutputComponentContent(int eventType, XmlPullParser xpp, Task owner, Task.TaskOutputComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport parseTestReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport res = new TestReport(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportContent(int eventType, XmlPullParser xpp, TestReport res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, TestReport.TestReportStatus.NULL, new TestReport.TestReportStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("testScript")) { + res.setTestScript(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { + res.setResultElement(parseEnumeration(xpp, TestReport.TestReportResult.NULL, new TestReport.TestReportResultEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { + res.setScoreElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tester")) { + res.setTesterElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { + res.setIssuedElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { + res.getParticipant().add(parseTestReportTestReportParticipantComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("setup")) { + res.setSetup(parseTestReportTestReportSetupComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("test")) { + res.getTest().add(parseTestReportTestReportTestComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("teardown")) { + res.setTeardown(parseTestReportTestReportTeardownComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.TestReportParticipantComponent parseTestReportTestReportParticipantComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportTestReportParticipantComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportTestReportParticipantComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setTypeElement(parseEnumeration(xpp, TestReport.TestReportParticipantType.NULL, new TestReport.TestReportParticipantTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { + res.setUriElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.TestReportSetupComponent parseTestReportTestReportSetupComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportTestReportSetupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportTestReportSetupComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportSetupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseTestReportSetupActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.SetupActionComponent res = new TestReport.SetupActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportSetupActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportSetupActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.SetupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { + res.setAssert(parseTestReportSetupActionAssertComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportSetupActionOperationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportSetupActionOperationComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.SetupActionOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { + res.setResultElement(parseEnumeration(xpp, TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { + res.setMessageElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.setDetailElement(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.SetupActionAssertComponent parseTestReportSetupActionAssertComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportSetupActionAssertComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportSetupActionAssertComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.SetupActionAssertComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { + res.setResultElement(parseEnumeration(xpp, TestReport.TestReportActionResult.NULL, new TestReport.TestReportActionResultEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { + res.setMessageElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { + res.setDetailElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.TestReportTestComponent parseTestReportTestReportTestComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportTestReportTestComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportTestReportTestComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportTestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseTestReportTestActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.TestActionComponent parseTestReportTestActionComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.TestActionComponent res = new TestReport.TestActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportTestActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportTestActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { + res.setAssert(parseTestReportSetupActionAssertComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.TestReportTeardownComponent parseTestReportTestReportTeardownComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportTestReportTeardownComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportTestReportTeardownComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TestReportTeardownComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseTestReportTeardownActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(XmlPullParser xpp, TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestReportTeardownActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestReportTeardownActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, TestReport.TeardownActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript parseTestScript(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript res = new TestScript(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptContent(int eventType, XmlPullParser xpp, TestScript res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifier(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { + res.getOrigin().add(parseTestScriptTestScriptOriginComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.getDestination().add(parseTestScriptTestScriptDestinationComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("metadata")) { + res.setMetadata(parseTestScriptTestScriptMetadataComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fixture")) { + res.getFixture().add(parseTestScriptTestScriptFixtureComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.getProfile().add(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { + res.getVariable().add(parseTestScriptTestScriptVariableComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.getRule().add(parseTestScriptTestScriptRuleComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleset")) { + res.getRuleset().add(parseTestScriptTestScriptRulesetComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("setup")) { + res.setSetup(parseTestScriptTestScriptSetupComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("test")) { + res.getTest().add(parseTestScriptTestScriptTestComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("teardown")) { + res.setTeardown(parseTestScriptTestScriptTeardownComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptOriginComponent parseTestScriptTestScriptOriginComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptOriginComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptOriginComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptOriginComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("index")) { + res.setIndexElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptDestinationComponent parseTestScriptTestScriptDestinationComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptDestinationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptDestinationComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptDestinationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("index")) { + res.setIndexElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { + res.setProfile(parseCoding(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptMetadataComponent parseTestScriptTestScriptMetadataComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptMetadataComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptMetadataComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptMetadataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parseTestScriptTestScriptMetadataLinkComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capability")) { + res.getCapability().add(parseTestScriptTestScriptMetadataCapabilityComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptMetadataLinkComponent parseTestScriptTestScriptMetadataLinkComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptMetadataLinkComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptMetadataLinkComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptMetadataLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptMetadataCapabilityComponent parseTestScriptTestScriptMetadataCapabilityComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptMetadataCapabilityComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptMetadataCapabilityComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptMetadataCapabilityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { + res.setRequiredElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validated")) { + res.setValidatedElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { + res.getOrigin().add(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.setDestinationElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { + res.getLink().add(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capabilities")) { + res.setCapabilities(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptFixtureComponent parseTestScriptTestScriptFixtureComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptFixtureComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptFixtureComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptFixtureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("autocreate")) { + res.setAutocreateElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("autodelete")) { + res.setAutodeleteElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseReference(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptVariableComponent parseTestScriptTestScriptVariableComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptVariableComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptVariableComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptVariableComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("defaultValue")) { + res.setDefaultValueElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("headerField")) { + res.setHeaderFieldElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hint")) { + res.setHintElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { + res.setSourceIdElement(parseId(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptRuleComponent parseTestScriptTestScriptRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptRuleComponent res = new TestScript.TestScriptRuleComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptRuleComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { + res.getParam().add(parseTestScriptRuleParamComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.RuleParamComponent parseTestScriptRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.RuleParamComponent res = new TestScript.RuleParamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptRuleParamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.RuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptRulesetComponent parseTestScriptTestScriptRulesetComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptRulesetComponent res = new TestScript.TestScriptRulesetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptRulesetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptRulesetComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptRulesetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResource(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.getRule().add(parseTestScriptRulesetRuleComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.RulesetRuleComponent parseTestScriptRulesetRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.RulesetRuleComponent res = new TestScript.RulesetRuleComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptRulesetRuleComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptRulesetRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.RulesetRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleId")) { + res.setRuleIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { + res.getParam().add(parseTestScriptRulesetRuleParamComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.RulesetRuleParamComponent parseTestScriptRulesetRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.RulesetRuleParamComponent res = new TestScript.RulesetRuleParamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptRulesetRuleParamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptRulesetRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.RulesetRuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptSetupComponent parseTestScriptTestScriptSetupComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptSetupComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptSetupComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptSetupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseTestScriptSetupActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.SetupActionComponent res = new TestScript.SetupActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptSetupActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptSetupActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { + res.setAssert(parseTestScriptSetupActionAssertComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptSetupActionOperationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptSetupActionOperationComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionOperationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { + res.setType(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResourceElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { + res.setLabelElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accept")) { + res.setAcceptElement(parseEnumeration(xpp, TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { + res.setContentTypeElement(parseEnumeration(xpp, TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { + res.setDestinationElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encodeRequestUrl")) { + res.setEncodeRequestUrlElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { + res.setOriginElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("params")) { + res.setParamsElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestHeader")) { + res.getRequestHeader().add(parseTestScriptSetupActionOperationRequestHeaderComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestId")) { + res.setRequestIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseId")) { + res.setResponseIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { + res.setSourceIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetId")) { + res.setTargetIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.SetupActionOperationRequestHeaderComponent parseTestScriptSetupActionOperationRequestHeaderComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptSetupActionOperationRequestHeaderComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptSetupActionOperationRequestHeaderComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionOperationRequestHeaderComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("field")) { + res.setFieldElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.SetupActionAssertComponent parseTestScriptSetupActionAssertComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptSetupActionAssertComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptSetupActionAssertComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.SetupActionAssertComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { + res.setLabelElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("direction")) { + res.setDirectionElement(parseEnumeration(xpp, TestScript.AssertionDirectionType.NULL, new TestScript.AssertionDirectionTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourceId")) { + res.setCompareToSourceIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourceExpression")) { + res.setCompareToSourceExpressionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourcePath")) { + res.setCompareToSourcePathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { + res.setContentTypeElement(parseEnumeration(xpp, TestScript.ContentType.NULL, new TestScript.ContentTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { + res.setExpressionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("headerField")) { + res.setHeaderFieldElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("minimumId")) { + res.setMinimumIdElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("navigationLinks")) { + res.setNavigationLinksElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { + res.setOperatorElement(parseEnumeration(xpp, TestScript.AssertionOperatorType.NULL, new TestScript.AssertionOperatorTypeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { + res.setPathElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestMethod")) { + res.setRequestMethodElement(parseEnumeration(xpp, TestScript.TestScriptRequestMethodCode.NULL, new TestScript.TestScriptRequestMethodCodeEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestURL")) { + res.setRequestURLElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { + res.setResourceElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { + res.setResponseElement(parseEnumeration(xpp, TestScript.AssertionResponseTypes.NULL, new TestScript.AssertionResponseTypesEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseCode")) { + res.setResponseCodeElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.setRule(parseTestScriptActionAssertRuleComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleset")) { + res.setRuleset(parseTestScriptActionAssertRulesetComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { + res.setSourceIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validateProfileId")) { + res.setValidateProfileIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("warningOnly")) { + res.setWarningOnlyElement(parseBoolean(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.ActionAssertRuleComponent parseTestScriptActionAssertRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.ActionAssertRuleComponent res = new TestScript.ActionAssertRuleComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptActionAssertRuleComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptActionAssertRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleId")) { + res.setRuleIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { + res.getParam().add(parseTestScriptActionAssertRuleParamComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.ActionAssertRuleParamComponent parseTestScriptActionAssertRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.ActionAssertRuleParamComponent res = new TestScript.ActionAssertRuleParamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptActionAssertRuleParamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptActionAssertRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.ActionAssertRulesetComponent parseTestScriptActionAssertRulesetComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.ActionAssertRulesetComponent res = new TestScript.ActionAssertRulesetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptActionAssertRulesetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptActionAssertRulesetComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRulesetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rulesetId")) { + res.setRulesetIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { + res.getRule().add(parseTestScriptActionAssertRulesetRuleComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.ActionAssertRulesetRuleComponent parseTestScriptActionAssertRulesetRuleComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.ActionAssertRulesetRuleComponent res = new TestScript.ActionAssertRulesetRuleComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptActionAssertRulesetRuleComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptActionAssertRulesetRuleComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRulesetRuleComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ruleId")) { + res.setRuleIdElement(parseId(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { + res.getParam().add(parseTestScriptActionAssertRulesetRuleParamComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.ActionAssertRulesetRuleParamComponent parseTestScriptActionAssertRulesetRuleParamComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.ActionAssertRulesetRuleParamComponent res = new TestScript.ActionAssertRulesetRuleParamComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptActionAssertRulesetRuleParamComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptActionAssertRulesetRuleParamComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.ActionAssertRulesetRuleParamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptTestComponent parseTestScriptTestScriptTestComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptTestComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptTestComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptTestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseTestScriptTestActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestActionComponent parseTestScriptTestActionComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestActionComponent res = new TestScript.TestActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { + res.setAssert(parseTestScriptSetupActionAssertComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TestScriptTeardownComponent parseTestScriptTestScriptTeardownComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTestScriptTeardownComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTestScriptTeardownComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TestScriptTeardownComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { + res.getAction().add(parseTestScriptTeardownActionComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { + TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseTestScriptTeardownActionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseTestScriptTeardownActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, TestScript.TeardownActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { + res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet parseValueSet(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet res = new ValueSet(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetContent(int eventType, XmlPullParser xpp, ValueSet res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { + res.setUrlElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { + res.setTitleElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { + res.setExperimentalElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { + res.setDateElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { + res.setPublisherElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { + res.getContact().add(parseContactDetail(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { + res.setDescriptionElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { + res.getUseContext().add(parseUsageContext(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { + res.getJurisdiction().add(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("immutable")) { + res.setImmutableElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { + res.setPurposeElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { + res.setCopyrightElement(parseMarkdown(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extensible")) { + res.setExtensibleElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compose")) { + res.setCompose(parseValueSetValueSetComposeComponent(xpp, res)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expansion")) { + res.setExpansion(parseValueSetValueSetExpansionComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ValueSetComposeComponent parseValueSetValueSetComposeComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetValueSetComposeComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetValueSetComposeComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetComposeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lockedDate")) { + res.setLockedDateElement(parseDate(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { + res.setInactiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { + res.getInclude().add(parseValueSetConceptSetComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { + res.getExclude().add(parseValueSetConceptSetComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetConceptSetComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetConceptSetComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptSetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { + res.getConcept().add(parseValueSetConceptReferenceComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { + res.getFilter().add(parseValueSetConceptSetFilterComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { + res.getValueSet().add(parseUri(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetConceptReferenceComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetConceptReferenceComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptReferenceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { + res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetConceptReferenceDesignationComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetConceptReferenceDesignationComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptReferenceDesignationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { + res.setLanguageElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { + res.setUse(parseCoding(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseString(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetConceptSetFilterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetConceptSetFilterComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ConceptSetFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { + res.setPropertyElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("op")) { + res.setOpElement(parseEnumeration(xpp, ValueSet.FilterOperator.NULL, new ValueSet.FilterOperatorEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { + res.setValueElement(parseCode(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ValueSetExpansionComponent parseValueSetValueSetExpansionComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetValueSetExpansionComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetValueSetExpansionComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetExpansionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.setIdentifierElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timestamp")) { + res.setTimestampElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { + res.setTotalElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offset")) { + res.setOffsetElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { + res.getParameter().add(parseValueSetValueSetExpansionParameterComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contains")) { + res.getContains().add(parseValueSetValueSetExpansionContainsComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ValueSetExpansionParameterComponent parseValueSetValueSetExpansionParameterComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetValueSetExpansionParameterComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetValueSetExpansionParameterComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetExpansionParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { + res.setNameElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { + res.setValue(parseType("value", xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected ValueSet.ValueSetExpansionContainsComponent parseValueSetValueSetExpansionContainsComponent(XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { + ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseValueSetValueSetExpansionContainsComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseValueSetValueSetExpansionContainsComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, ValueSet.ValueSetExpansionContainsComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { + res.setSystemElement(parseUri(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abstract")) { + res.setAbstractElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { + res.setInactiveElement(parseBoolean(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { + res.setVersionElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { + res.setCodeElement(parseCode(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { + res.setDisplayElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { + res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(xpp, owner)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contains")) { + res.getContains().add(parseValueSetValueSetExpansionContainsComponent(xpp, owner)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + protected VisionPrescription parseVisionPrescription(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + VisionPrescription res = new VisionPrescription(); + parseDomainResourceAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseVisionPrescriptionContent(eventType, xpp, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseVisionPrescriptionContent(int eventType, XmlPullParser xpp, VisionPrescription res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { + res.getIdentifier().add(parseIdentifier(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { + res.setStatusElement(parseEnumeration(xpp, VisionPrescription.VisionStatus.NULL, new VisionPrescription.VisionStatusEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { + res.setPatient(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { + res.setEncounter(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateWritten")) { + res.setDateWrittenElement(parseDateTime(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescriber")) { + res.setPrescriber(parseReference(xpp)); + } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reason")) { + res.setReason(parseType("reason", xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dispense")) { + res.getDispense().add(parseVisionPrescriptionVisionPrescriptionDispenseComponent(xpp, res)); + } else if (!parseDomainResourceContent(eventType, xpp, res)) + return false; + return true; + } + + protected VisionPrescription.VisionPrescriptionDispenseComponent parseVisionPrescriptionVisionPrescriptionDispenseComponent(XmlPullParser xpp, VisionPrescription owner) throws XmlPullParserException, IOException, FHIRFormatError { + VisionPrescription.VisionPrescriptionDispenseComponent res = new VisionPrescription.VisionPrescriptionDispenseComponent(); + parseBackboneAttributes(xpp, res); + next(xpp); + int eventType = nextNoWhitespace(xpp); + while (eventType != XmlPullParser.END_TAG) { + if (!parseVisionPrescriptionVisionPrescriptionDispenseComponentContent(eventType, xpp, owner, res)) + unknownContent(xpp); + eventType = nextNoWhitespace(xpp); + } + next(xpp); + parseElementClose(res); + return res; + } + + protected boolean parseVisionPrescriptionVisionPrescriptionDispenseComponentContent(int eventType, XmlPullParser xpp, VisionPrescription owner, VisionPrescription.VisionPrescriptionDispenseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { + if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("product")) { + res.setProduct(parseCodeableConcept(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eye")) { + res.setEyeElement(parseEnumeration(xpp, VisionPrescription.VisionEyes.NULL, new VisionPrescription.VisionEyesEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sphere")) { + res.setSphereElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cylinder")) { + res.setCylinderElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("axis")) { + res.setAxisElement(parseInteger(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prism")) { + res.setPrismElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { + res.setBaseElement(parseEnumeration(xpp, VisionPrescription.VisionBase.NULL, new VisionPrescription.VisionBaseEnumFactory())); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("add")) { + res.setAddElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("power")) { + res.setPowerElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("backCurve")) { + res.setBackCurveElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diameter")) { + res.setDiameterElement(parseDecimal(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { + res.setDuration(parseSimpleQuantity(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { + res.setColorElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("brand")) { + res.setBrandElement(parseString(xpp)); + } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { + res.getNote().add(parseAnnotation(xpp)); + } else if (!parseBackboneContent(eventType, xpp, res)) + return false; + return true; + } + + @Override + protected Resource parseResource(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + if (xpp.getName().equals("Parameters")) + return parseParameters(xpp); + else if (xpp.getName().equals("Account")) + return parseAccount(xpp); + else if (xpp.getName().equals("ActivityDefinition")) + return parseActivityDefinition(xpp); + else if (xpp.getName().equals("AdverseEvent")) + return parseAdverseEvent(xpp); + else if (xpp.getName().equals("AllergyIntolerance")) + return parseAllergyIntolerance(xpp); + else if (xpp.getName().equals("Appointment")) + return parseAppointment(xpp); + else if (xpp.getName().equals("AppointmentResponse")) + return parseAppointmentResponse(xpp); + else if (xpp.getName().equals("AuditEvent")) + return parseAuditEvent(xpp); + else if (xpp.getName().equals("Basic")) + return parseBasic(xpp); + else if (xpp.getName().equals("Binary")) + return parseBinary(xpp); + else if (xpp.getName().equals("BodyStructure")) + return parseBodyStructure(xpp); + else if (xpp.getName().equals("Bundle")) + return parseBundle(xpp); + else if (xpp.getName().equals("CapabilityStatement")) + return parseCapabilityStatement(xpp); + else if (xpp.getName().equals("CarePlan")) + return parseCarePlan(xpp); + else if (xpp.getName().equals("CareTeam")) + return parseCareTeam(xpp); + else if (xpp.getName().equals("CatalogEntry")) + return parseCatalogEntry(xpp); + else if (xpp.getName().equals("ChargeItem")) + return parseChargeItem(xpp); + else if (xpp.getName().equals("Claim")) + return parseClaim(xpp); + else if (xpp.getName().equals("ClaimResponse")) + return parseClaimResponse(xpp); + else if (xpp.getName().equals("ClinicalImpression")) + return parseClinicalImpression(xpp); + else if (xpp.getName().equals("CodeSystem")) + return parseCodeSystem(xpp); + else if (xpp.getName().equals("Communication")) + return parseCommunication(xpp); + else if (xpp.getName().equals("CommunicationRequest")) + return parseCommunicationRequest(xpp); + else if (xpp.getName().equals("CompartmentDefinition")) + return parseCompartmentDefinition(xpp); + else if (xpp.getName().equals("Composition")) + return parseComposition(xpp); + else if (xpp.getName().equals("ConceptMap")) + return parseConceptMap(xpp); + else if (xpp.getName().equals("Condition")) + return parseCondition(xpp); + else if (xpp.getName().equals("Consent")) + return parseConsent(xpp); + else if (xpp.getName().equals("Contract")) + return parseContract(xpp); + else if (xpp.getName().equals("Coverage")) + return parseCoverage(xpp); + else if (xpp.getName().equals("DetectedIssue")) + return parseDetectedIssue(xpp); + else if (xpp.getName().equals("Device")) + return parseDevice(xpp); + else if (xpp.getName().equals("DeviceComponent")) + return parseDeviceComponent(xpp); + else if (xpp.getName().equals("DeviceMetric")) + return parseDeviceMetric(xpp); + else if (xpp.getName().equals("DeviceRequest")) + return parseDeviceRequest(xpp); + else if (xpp.getName().equals("DeviceUseStatement")) + return parseDeviceUseStatement(xpp); + else if (xpp.getName().equals("DiagnosticReport")) + return parseDiagnosticReport(xpp); + else if (xpp.getName().equals("DocumentManifest")) + return parseDocumentManifest(xpp); + else if (xpp.getName().equals("DocumentReference")) + return parseDocumentReference(xpp); + else if (xpp.getName().equals("EligibilityRequest")) + return parseEligibilityRequest(xpp); + else if (xpp.getName().equals("EligibilityResponse")) + return parseEligibilityResponse(xpp); + else if (xpp.getName().equals("Encounter")) + return parseEncounter(xpp); + else if (xpp.getName().equals("Endpoint")) + return parseEndpoint(xpp); + else if (xpp.getName().equals("EnrollmentRequest")) + return parseEnrollmentRequest(xpp); + else if (xpp.getName().equals("EnrollmentResponse")) + return parseEnrollmentResponse(xpp); + else if (xpp.getName().equals("EpisodeOfCare")) + return parseEpisodeOfCare(xpp); + else if (xpp.getName().equals("EventDefinition")) + return parseEventDefinition(xpp); + else if (xpp.getName().equals("ExampleScenario")) + return parseExampleScenario(xpp); + else if (xpp.getName().equals("ExpansionProfile")) + return parseExpansionProfile(xpp); + else if (xpp.getName().equals("ExplanationOfBenefit")) + return parseExplanationOfBenefit(xpp); + else if (xpp.getName().equals("FamilyMemberHistory")) + return parseFamilyMemberHistory(xpp); + else if (xpp.getName().equals("Flag")) + return parseFlag(xpp); + else if (xpp.getName().equals("Goal")) + return parseGoal(xpp); + else if (xpp.getName().equals("GraphDefinition")) + return parseGraphDefinition(xpp); + else if (xpp.getName().equals("Group")) + return parseGroup(xpp); + else if (xpp.getName().equals("GuidanceResponse")) + return parseGuidanceResponse(xpp); + else if (xpp.getName().equals("HealthcareService")) + return parseHealthcareService(xpp); + else if (xpp.getName().equals("ImagingManifest")) + return parseImagingManifest(xpp); + else if (xpp.getName().equals("ImagingStudy")) + return parseImagingStudy(xpp); + else if (xpp.getName().equals("Immunization")) + return parseImmunization(xpp); + else if (xpp.getName().equals("ImmunizationRecommendation")) + return parseImmunizationRecommendation(xpp); + else if (xpp.getName().equals("ImplementationGuide")) + return parseImplementationGuide(xpp); + else if (xpp.getName().equals("Library")) + return parseLibrary(xpp); + else if (xpp.getName().equals("Linkage")) + return parseLinkage(xpp); + else if (xpp.getName().equals("List")) + return parseListResource(xpp); + else if (xpp.getName().equals("Location")) + return parseLocation(xpp); + else if (xpp.getName().equals("Measure")) + return parseMeasure(xpp); + else if (xpp.getName().equals("MeasureReport")) + return parseMeasureReport(xpp); + else if (xpp.getName().equals("Media")) + return parseMedia(xpp); + else if (xpp.getName().equals("Medication")) + return parseMedication(xpp); + else if (xpp.getName().equals("MedicationAdministration")) + return parseMedicationAdministration(xpp); + else if (xpp.getName().equals("MedicationDispense")) + return parseMedicationDispense(xpp); + else if (xpp.getName().equals("MedicationRequest")) + return parseMedicationRequest(xpp); + else if (xpp.getName().equals("MedicationStatement")) + return parseMedicationStatement(xpp); + else if (xpp.getName().equals("MessageDefinition")) + return parseMessageDefinition(xpp); + else if (xpp.getName().equals("MessageHeader")) + return parseMessageHeader(xpp); + else if (xpp.getName().equals("NamingSystem")) + return parseNamingSystem(xpp); + else if (xpp.getName().equals("NutritionOrder")) + return parseNutritionOrder(xpp); + else if (xpp.getName().equals("Observation")) + return parseObservation(xpp); + else if (xpp.getName().equals("OperationDefinition")) + return parseOperationDefinition(xpp); + else if (xpp.getName().equals("OperationOutcome")) + return parseOperationOutcome(xpp); + else if (xpp.getName().equals("Organization")) + return parseOrganization(xpp); + else if (xpp.getName().equals("Patient")) + return parsePatient(xpp); + else if (xpp.getName().equals("PaymentNotice")) + return parsePaymentNotice(xpp); + else if (xpp.getName().equals("PaymentReconciliation")) + return parsePaymentReconciliation(xpp); + else if (xpp.getName().equals("Person")) + return parsePerson(xpp); + else if (xpp.getName().equals("PlanDefinition")) + return parsePlanDefinition(xpp); + else if (xpp.getName().equals("Practitioner")) + return parsePractitioner(xpp); + else if (xpp.getName().equals("PractitionerRole")) + return parsePractitionerRole(xpp); + else if (xpp.getName().equals("Procedure")) + return parseProcedure(xpp); + else if (xpp.getName().equals("ProcedureRequest")) + return parseProcedureRequest(xpp); + else if (xpp.getName().equals("ProcessRequest")) + return parseProcessRequest(xpp); + else if (xpp.getName().equals("ProcessResponse")) + return parseProcessResponse(xpp); + else if (xpp.getName().equals("Provenance")) + return parseProvenance(xpp); + else if (xpp.getName().equals("Questionnaire")) + return parseQuestionnaire(xpp); + else if (xpp.getName().equals("QuestionnaireResponse")) + return parseQuestionnaireResponse(xpp); + else if (xpp.getName().equals("RelatedPerson")) + return parseRelatedPerson(xpp); + else if (xpp.getName().equals("RequestGroup")) + return parseRequestGroup(xpp); + else if (xpp.getName().equals("ResearchStudy")) + return parseResearchStudy(xpp); + else if (xpp.getName().equals("ResearchSubject")) + return parseResearchSubject(xpp); + else if (xpp.getName().equals("RiskAssessment")) + return parseRiskAssessment(xpp); + else if (xpp.getName().equals("Schedule")) + return parseSchedule(xpp); + else if (xpp.getName().equals("SearchParameter")) + return parseSearchParameter(xpp); + else if (xpp.getName().equals("Sequence")) + return parseSequence(xpp); + else if (xpp.getName().equals("ServiceDefinition")) + return parseServiceDefinition(xpp); + else if (xpp.getName().equals("Slot")) + return parseSlot(xpp); + else if (xpp.getName().equals("Specimen")) + return parseSpecimen(xpp); + else if (xpp.getName().equals("SpecimenDefinition")) + return parseSpecimenDefinition(xpp); + else if (xpp.getName().equals("StructureDefinition")) + return parseStructureDefinition(xpp); + else if (xpp.getName().equals("StructureMap")) + return parseStructureMap(xpp); + else if (xpp.getName().equals("Subscription")) + return parseSubscription(xpp); + else if (xpp.getName().equals("Substance")) + return parseSubstance(xpp); + else if (xpp.getName().equals("SupplyDelivery")) + return parseSupplyDelivery(xpp); + else if (xpp.getName().equals("SupplyRequest")) + return parseSupplyRequest(xpp); + else if (xpp.getName().equals("Task")) + return parseTask(xpp); + else if (xpp.getName().equals("TestReport")) + return parseTestReport(xpp); + else if (xpp.getName().equals("TestScript")) + return parseTestScript(xpp); + else if (xpp.getName().equals("ValueSet")) + return parseValueSet(xpp); + else if (xpp.getName().equals("VisionPrescription")) + return parseVisionPrescription(xpp); + else if (xpp.getName().equals("Binary")) + return parseBinary(xpp); + throw new FHIRFormatError("Unknown resource type "+xpp.getName()+""); + } + + protected Type parseType(String prefix, XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { + if (xpp.getName().equals(prefix+"date")) + return parseDate(xpp); + else if (xpp.getName().equals(prefix+"dateTime")) + return parseDateTime(xpp); + else if (xpp.getName().equals(prefix+"code")) + return parseCode(xpp); + else if (xpp.getName().equals(prefix+"string")) + return parseString(xpp); + else if (xpp.getName().equals(prefix+"integer")) + return parseInteger(xpp); + else if (xpp.getName().equals(prefix+"oid")) + return parseOid(xpp); + else if (xpp.getName().equals(prefix+"uri")) + return parseUri(xpp); + else if (xpp.getName().equals(prefix+"uuid")) + return parseUuid(xpp); + else if (xpp.getName().equals(prefix+"instant")) + return parseInstant(xpp); + else if (xpp.getName().equals(prefix+"boolean")) + return parseBoolean(xpp); + else if (xpp.getName().equals(prefix+"base64Binary")) + return parseBase64Binary(xpp); + else if (xpp.getName().equals(prefix+"unsignedInt")) + return parseUnsignedInt(xpp); + else if (xpp.getName().equals(prefix+"markdown")) + return parseMarkdown(xpp); + else if (xpp.getName().equals(prefix+"time")) + return parseTime(xpp); + else if (xpp.getName().equals(prefix+"id")) + return parseId(xpp); + else if (xpp.getName().equals(prefix+"positiveInt")) + return parsePositiveInt(xpp); + else if (xpp.getName().equals(prefix+"decimal")) + return parseDecimal(xpp); + else if (xpp.getName().equals(prefix+"Extension")) + return parseExtension(xpp); + else if (xpp.getName().equals(prefix+"Narrative")) + return parseNarrative(xpp); + else if (xpp.getName().equals(prefix+"Reference")) + return parseReference(xpp); + else if (xpp.getName().equals(prefix+"Quantity")) + return parseQuantity(xpp); + else if (xpp.getName().equals(prefix+"Period")) + return parsePeriod(xpp); + else if (xpp.getName().equals(prefix+"Attachment")) + return parseAttachment(xpp); + else if (xpp.getName().equals(prefix+"Duration")) + return parseDuration(xpp); + else if (xpp.getName().equals(prefix+"Count")) + return parseCount(xpp); + else if (xpp.getName().equals(prefix+"Range")) + return parseRange(xpp); + else if (xpp.getName().equals(prefix+"Annotation")) + return parseAnnotation(xpp); + else if (xpp.getName().equals(prefix+"Money")) + return parseMoney(xpp); + else if (xpp.getName().equals(prefix+"Identifier")) + return parseIdentifier(xpp); + else if (xpp.getName().equals(prefix+"Coding")) + return parseCoding(xpp); + else if (xpp.getName().equals(prefix+"Signature")) + return parseSignature(xpp); + else if (xpp.getName().equals(prefix+"SampledData")) + return parseSampledData(xpp); + else if (xpp.getName().equals(prefix+"Ratio")) + return parseRatio(xpp); + else if (xpp.getName().equals(prefix+"Distance")) + return parseDistance(xpp); + else if (xpp.getName().equals(prefix+"Age")) + return parseAge(xpp); + else if (xpp.getName().equals(prefix+"CodeableConcept")) + return parseCodeableConcept(xpp); + else if (xpp.getName().equals(prefix+"SimpleQuantity")) + return parseSimpleQuantity(xpp); + else if (xpp.getName().equals(prefix+"Meta")) + return parseMeta(xpp); + else if (xpp.getName().equals(prefix+"Address")) + return parseAddress(xpp); + else if (xpp.getName().equals(prefix+"TriggerDefinition")) + return parseTriggerDefinition(xpp); + else if (xpp.getName().equals(prefix+"Contributor")) + return parseContributor(xpp); + else if (xpp.getName().equals(prefix+"DataRequirement")) + return parseDataRequirement(xpp); + else if (xpp.getName().equals(prefix+"Dosage")) + return parseDosage(xpp); + else if (xpp.getName().equals(prefix+"RelatedArtifact")) + return parseRelatedArtifact(xpp); + else if (xpp.getName().equals(prefix+"ContactDetail")) + return parseContactDetail(xpp); + else if (xpp.getName().equals(prefix+"HumanName")) + return parseHumanName(xpp); + else if (xpp.getName().equals(prefix+"ContactPoint")) + return parseContactPoint(xpp); + else if (xpp.getName().equals(prefix+"UsageContext")) + return parseUsageContext(xpp); + else if (xpp.getName().equals(prefix+"Timing")) + return parseTiming(xpp); + else if (xpp.getName().equals(prefix+"ElementDefinition")) + return parseElementDefinition(xpp); + else if (xpp.getName().equals(prefix+"ParameterDefinition")) + return parseParameterDefinition(xpp); + else if (xpp.getName().equals(prefix+"Date")) + return parseDate(xpp); + else if (xpp.getName().equals(prefix+"DateTime")) + return parseDateTime(xpp); + else if (xpp.getName().equals(prefix+"Code")) + return parseCode(xpp); + else if (xpp.getName().equals(prefix+"String")) + return parseString(xpp); + else if (xpp.getName().equals(prefix+"Integer")) + return parseInteger(xpp); + else if (xpp.getName().equals(prefix+"Oid")) + return parseOid(xpp); + else if (xpp.getName().equals(prefix+"Uri")) + return parseUri(xpp); + else if (xpp.getName().equals(prefix+"Uuid")) + return parseUuid(xpp); + else if (xpp.getName().equals(prefix+"Instant")) + return parseInstant(xpp); + else if (xpp.getName().equals(prefix+"Boolean")) + return parseBoolean(xpp); + else if (xpp.getName().equals(prefix+"Base64Binary")) + return parseBase64Binary(xpp); + else if (xpp.getName().equals(prefix+"UnsignedInt")) + return parseUnsignedInt(xpp); + else if (xpp.getName().equals(prefix+"Markdown")) + return parseMarkdown(xpp); + else if (xpp.getName().equals(prefix+"Time")) + return parseTime(xpp); + else if (xpp.getName().equals(prefix+"Id")) + return parseId(xpp); + else if (xpp.getName().equals(prefix+"PositiveInt")) + return parsePositiveInt(xpp); + else if (xpp.getName().equals(prefix+"Decimal")) + return parseDecimal(xpp); + throw new FHIRFormatError("Unknown type "+xpp.getName()); + } + + protected Type parseType(XmlPullParser xpp, String type) throws XmlPullParserException, IOException, FHIRFormatError { + if (type.equals("date")) + return parseDate(xpp); + else if (type.equals("dateTime")) + return parseDateTime(xpp); + else if (type.equals("code")) + return parseCode(xpp); + else if (type.equals("string")) + return parseString(xpp); + else if (type.equals("integer")) + return parseInteger(xpp); + else if (type.equals("oid")) + return parseOid(xpp); + else if (type.equals("uri")) + return parseUri(xpp); + else if (type.equals("uuid")) + return parseUuid(xpp); + else if (type.equals("instant")) + return parseInstant(xpp); + else if (type.equals("boolean")) + return parseBoolean(xpp); + else if (type.equals("base64Binary")) + return parseBase64Binary(xpp); + else if (type.equals("unsignedInt")) + return parseUnsignedInt(xpp); + else if (type.equals("markdown")) + return parseMarkdown(xpp); + else if (type.equals("time")) + return parseTime(xpp); + else if (type.equals("id")) + return parseId(xpp); + else if (type.equals("positiveInt")) + return parsePositiveInt(xpp); + else if (type.equals("decimal")) + return parseDecimal(xpp); + else if (type.equals("Extension")) + return parseExtension(xpp); + else if (type.equals("Narrative")) + return parseNarrative(xpp); + else if (type.equals("Reference")) + return parseReference(xpp); + else if (type.equals("Quantity")) + return parseQuantity(xpp); + else if (type.equals("Period")) + return parsePeriod(xpp); + else if (type.equals("Attachment")) + return parseAttachment(xpp); + else if (type.equals("Duration")) + return parseDuration(xpp); + else if (type.equals("Count")) + return parseCount(xpp); + else if (type.equals("Range")) + return parseRange(xpp); + else if (type.equals("Annotation")) + return parseAnnotation(xpp); + else if (type.equals("Money")) + return parseMoney(xpp); + else if (type.equals("Identifier")) + return parseIdentifier(xpp); + else if (type.equals("Coding")) + return parseCoding(xpp); + else if (type.equals("Signature")) + return parseSignature(xpp); + else if (type.equals("SampledData")) + return parseSampledData(xpp); + else if (type.equals("Ratio")) + return parseRatio(xpp); + else if (type.equals("Distance")) + return parseDistance(xpp); + else if (type.equals("Age")) + return parseAge(xpp); + else if (type.equals("CodeableConcept")) + return parseCodeableConcept(xpp); + else if (type.equals("SimpleQuantity")) + return parseSimpleQuantity(xpp); + else if (type.equals("Meta")) + return parseMeta(xpp); + else if (type.equals("Address")) + return parseAddress(xpp); + else if (type.equals("TriggerDefinition")) + return parseTriggerDefinition(xpp); + else if (type.equals("Contributor")) + return parseContributor(xpp); + else if (type.equals("DataRequirement")) + return parseDataRequirement(xpp); + else if (type.equals("Dosage")) + return parseDosage(xpp); + else if (type.equals("RelatedArtifact")) + return parseRelatedArtifact(xpp); + else if (type.equals("ContactDetail")) + return parseContactDetail(xpp); + else if (type.equals("HumanName")) + return parseHumanName(xpp); + else if (type.equals("ContactPoint")) + return parseContactPoint(xpp); + else if (type.equals("UsageContext")) + return parseUsageContext(xpp); + else if (type.equals("Timing")) + return parseTiming(xpp); + else if (type.equals("ElementDefinition")) + return parseElementDefinition(xpp); + else if (type.equals("ParameterDefinition")) + return parseParameterDefinition(xpp); + throw new FHIRFormatError("Unknown type "+type); + } + + public Base parseFragment(XmlPullParser xpp, String type) throws XmlPullParserException, IOException, FHIRFormatError { + if (type.equals("Extension")) + return parseExtension(xpp); + else if (type.equals("Narrative")) + return parseNarrative(xpp); + else if (type.equals("Reference")) + return parseReference(xpp); + else if (type.equals("Quantity")) + return parseQuantity(xpp); + else if (type.equals("Period")) + return parsePeriod(xpp); + else if (type.equals("Attachment")) + return parseAttachment(xpp); + else if (type.equals("Duration")) + return parseDuration(xpp); + else if (type.equals("Count")) + return parseCount(xpp); + else if (type.equals("Range")) + return parseRange(xpp); + else if (type.equals("Annotation")) + return parseAnnotation(xpp); + else if (type.equals("Money")) + return parseMoney(xpp); + else if (type.equals("Identifier")) + return parseIdentifier(xpp); + else if (type.equals("Coding")) + return parseCoding(xpp); + else if (type.equals("Signature")) + return parseSignature(xpp); + else if (type.equals("SampledData")) + return parseSampledData(xpp); + else if (type.equals("Ratio")) + return parseRatio(xpp); + else if (type.equals("Distance")) + return parseDistance(xpp); + else if (type.equals("Age")) + return parseAge(xpp); + else if (type.equals("CodeableConcept")) + return parseCodeableConcept(xpp); + else if (type.equals("SimpleQuantity")) + return parseSimpleQuantity(xpp); + else if (type.equals("Meta")) + return parseMeta(xpp); + else if (type.equals("Address")) + return parseAddress(xpp); + else if (type.equals("TriggerDefinition")) + return parseTriggerDefinition(xpp); + else if (type.equals("Contributor")) + return parseContributor(xpp); + else if (type.equals("DataRequirement")) + return parseDataRequirement(xpp); + else if (type.equals("Dosage")) + return parseDosage(xpp); + else if (type.equals("RelatedArtifact")) + return parseRelatedArtifact(xpp); + else if (type.equals("ContactDetail")) + return parseContactDetail(xpp); + else if (type.equals("HumanName")) + return parseHumanName(xpp); + else if (type.equals("ContactPoint")) + return parseContactPoint(xpp); + else if (type.equals("UsageContext")) + return parseUsageContext(xpp); + else if (type.equals("Timing")) + return parseTiming(xpp); + else if (type.equals("ElementDefinition")) + return parseElementDefinition(xpp); + else if (type.equals("ParameterDefinition")) + return parseParameterDefinition(xpp); + else if (type.equals("Parameters")) + return parseParameters(xpp); + else if (type.equals("Account")) + return parseAccount(xpp); + else if (type.equals("ActivityDefinition")) + return parseActivityDefinition(xpp); + else if (type.equals("AdverseEvent")) + return parseAdverseEvent(xpp); + else if (type.equals("AllergyIntolerance")) + return parseAllergyIntolerance(xpp); + else if (type.equals("Appointment")) + return parseAppointment(xpp); + else if (type.equals("AppointmentResponse")) + return parseAppointmentResponse(xpp); + else if (type.equals("AuditEvent")) + return parseAuditEvent(xpp); + else if (type.equals("Basic")) + return parseBasic(xpp); + else if (type.equals("Binary")) + return parseBinary(xpp); + else if (type.equals("BodyStructure")) + return parseBodyStructure(xpp); + else if (type.equals("Bundle")) + return parseBundle(xpp); + else if (type.equals("CapabilityStatement")) + return parseCapabilityStatement(xpp); + else if (type.equals("CarePlan")) + return parseCarePlan(xpp); + else if (type.equals("CareTeam")) + return parseCareTeam(xpp); + else if (type.equals("CatalogEntry")) + return parseCatalogEntry(xpp); + else if (type.equals("ChargeItem")) + return parseChargeItem(xpp); + else if (type.equals("Claim")) + return parseClaim(xpp); + else if (type.equals("ClaimResponse")) + return parseClaimResponse(xpp); + else if (type.equals("ClinicalImpression")) + return parseClinicalImpression(xpp); + else if (type.equals("CodeSystem")) + return parseCodeSystem(xpp); + else if (type.equals("Communication")) + return parseCommunication(xpp); + else if (type.equals("CommunicationRequest")) + return parseCommunicationRequest(xpp); + else if (type.equals("CompartmentDefinition")) + return parseCompartmentDefinition(xpp); + else if (type.equals("Composition")) + return parseComposition(xpp); + else if (type.equals("ConceptMap")) + return parseConceptMap(xpp); + else if (type.equals("Condition")) + return parseCondition(xpp); + else if (type.equals("Consent")) + return parseConsent(xpp); + else if (type.equals("Contract")) + return parseContract(xpp); + else if (type.equals("Coverage")) + return parseCoverage(xpp); + else if (type.equals("DetectedIssue")) + return parseDetectedIssue(xpp); + else if (type.equals("Device")) + return parseDevice(xpp); + else if (type.equals("DeviceComponent")) + return parseDeviceComponent(xpp); + else if (type.equals("DeviceMetric")) + return parseDeviceMetric(xpp); + else if (type.equals("DeviceRequest")) + return parseDeviceRequest(xpp); + else if (type.equals("DeviceUseStatement")) + return parseDeviceUseStatement(xpp); + else if (type.equals("DiagnosticReport")) + return parseDiagnosticReport(xpp); + else if (type.equals("DocumentManifest")) + return parseDocumentManifest(xpp); + else if (type.equals("DocumentReference")) + return parseDocumentReference(xpp); + else if (type.equals("EligibilityRequest")) + return parseEligibilityRequest(xpp); + else if (type.equals("EligibilityResponse")) + return parseEligibilityResponse(xpp); + else if (type.equals("Encounter")) + return parseEncounter(xpp); + else if (type.equals("Endpoint")) + return parseEndpoint(xpp); + else if (type.equals("EnrollmentRequest")) + return parseEnrollmentRequest(xpp); + else if (type.equals("EnrollmentResponse")) + return parseEnrollmentResponse(xpp); + else if (type.equals("EpisodeOfCare")) + return parseEpisodeOfCare(xpp); + else if (type.equals("EventDefinition")) + return parseEventDefinition(xpp); + else if (type.equals("ExampleScenario")) + return parseExampleScenario(xpp); + else if (type.equals("ExpansionProfile")) + return parseExpansionProfile(xpp); + else if (type.equals("ExplanationOfBenefit")) + return parseExplanationOfBenefit(xpp); + else if (type.equals("FamilyMemberHistory")) + return parseFamilyMemberHistory(xpp); + else if (type.equals("Flag")) + return parseFlag(xpp); + else if (type.equals("Goal")) + return parseGoal(xpp); + else if (type.equals("GraphDefinition")) + return parseGraphDefinition(xpp); + else if (type.equals("Group")) + return parseGroup(xpp); + else if (type.equals("GuidanceResponse")) + return parseGuidanceResponse(xpp); + else if (type.equals("HealthcareService")) + return parseHealthcareService(xpp); + else if (type.equals("ImagingManifest")) + return parseImagingManifest(xpp); + else if (type.equals("ImagingStudy")) + return parseImagingStudy(xpp); + else if (type.equals("Immunization")) + return parseImmunization(xpp); + else if (type.equals("ImmunizationRecommendation")) + return parseImmunizationRecommendation(xpp); + else if (type.equals("ImplementationGuide")) + return parseImplementationGuide(xpp); + else if (type.equals("Library")) + return parseLibrary(xpp); + else if (type.equals("Linkage")) + return parseLinkage(xpp); + else if (type.equals("List")) + return parseListResource(xpp); + else if (type.equals("Location")) + return parseLocation(xpp); + else if (type.equals("Measure")) + return parseMeasure(xpp); + else if (type.equals("MeasureReport")) + return parseMeasureReport(xpp); + else if (type.equals("Media")) + return parseMedia(xpp); + else if (type.equals("Medication")) + return parseMedication(xpp); + else if (type.equals("MedicationAdministration")) + return parseMedicationAdministration(xpp); + else if (type.equals("MedicationDispense")) + return parseMedicationDispense(xpp); + else if (type.equals("MedicationRequest")) + return parseMedicationRequest(xpp); + else if (type.equals("MedicationStatement")) + return parseMedicationStatement(xpp); + else if (type.equals("MessageDefinition")) + return parseMessageDefinition(xpp); + else if (type.equals("MessageHeader")) + return parseMessageHeader(xpp); + else if (type.equals("NamingSystem")) + return parseNamingSystem(xpp); + else if (type.equals("NutritionOrder")) + return parseNutritionOrder(xpp); + else if (type.equals("Observation")) + return parseObservation(xpp); + else if (type.equals("OperationDefinition")) + return parseOperationDefinition(xpp); + else if (type.equals("OperationOutcome")) + return parseOperationOutcome(xpp); + else if (type.equals("Organization")) + return parseOrganization(xpp); + else if (type.equals("Patient")) + return parsePatient(xpp); + else if (type.equals("PaymentNotice")) + return parsePaymentNotice(xpp); + else if (type.equals("PaymentReconciliation")) + return parsePaymentReconciliation(xpp); + else if (type.equals("Person")) + return parsePerson(xpp); + else if (type.equals("PlanDefinition")) + return parsePlanDefinition(xpp); + else if (type.equals("Practitioner")) + return parsePractitioner(xpp); + else if (type.equals("PractitionerRole")) + return parsePractitionerRole(xpp); + else if (type.equals("Procedure")) + return parseProcedure(xpp); + else if (type.equals("ProcedureRequest")) + return parseProcedureRequest(xpp); + else if (type.equals("ProcessRequest")) + return parseProcessRequest(xpp); + else if (type.equals("ProcessResponse")) + return parseProcessResponse(xpp); + else if (type.equals("Provenance")) + return parseProvenance(xpp); + else if (type.equals("Questionnaire")) + return parseQuestionnaire(xpp); + else if (type.equals("QuestionnaireResponse")) + return parseQuestionnaireResponse(xpp); + else if (type.equals("RelatedPerson")) + return parseRelatedPerson(xpp); + else if (type.equals("RequestGroup")) + return parseRequestGroup(xpp); + else if (type.equals("ResearchStudy")) + return parseResearchStudy(xpp); + else if (type.equals("ResearchSubject")) + return parseResearchSubject(xpp); + else if (type.equals("RiskAssessment")) + return parseRiskAssessment(xpp); + else if (type.equals("Schedule")) + return parseSchedule(xpp); + else if (type.equals("SearchParameter")) + return parseSearchParameter(xpp); + else if (type.equals("Sequence")) + return parseSequence(xpp); + else if (type.equals("ServiceDefinition")) + return parseServiceDefinition(xpp); + else if (type.equals("Slot")) + return parseSlot(xpp); + else if (type.equals("Specimen")) + return parseSpecimen(xpp); + else if (type.equals("SpecimenDefinition")) + return parseSpecimenDefinition(xpp); + else if (type.equals("StructureDefinition")) + return parseStructureDefinition(xpp); + else if (type.equals("StructureMap")) + return parseStructureMap(xpp); + else if (type.equals("Subscription")) + return parseSubscription(xpp); + else if (type.equals("Substance")) + return parseSubstance(xpp); + else if (type.equals("SupplyDelivery")) + return parseSupplyDelivery(xpp); + else if (type.equals("SupplyRequest")) + return parseSupplyRequest(xpp); + else if (type.equals("Task")) + return parseTask(xpp); + else if (type.equals("TestReport")) + return parseTestReport(xpp); + else if (type.equals("TestScript")) + return parseTestScript(xpp); + else if (type.equals("ValueSet")) + return parseValueSet(xpp); + else if (type.equals("VisionPrescription")) + return parseVisionPrescription(xpp); + else if (type.equals("date")) + return parseDate(xpp); + else if (type.equals("dateTime")) + return parseDateTime(xpp); + else if (type.equals("code")) + return parseCode(xpp); + else if (type.equals("string")) + return parseString(xpp); + else if (type.equals("integer")) + return parseInteger(xpp); + else if (type.equals("oid")) + return parseOid(xpp); + else if (type.equals("uri")) + return parseUri(xpp); + else if (type.equals("uuid")) + return parseUuid(xpp); + else if (type.equals("instant")) + return parseInstant(xpp); + else if (type.equals("boolean")) + return parseBoolean(xpp); + else if (type.equals("base64Binary")) + return parseBase64Binary(xpp); + else if (type.equals("unsignedInt")) + return parseUnsignedInt(xpp); + else if (type.equals("markdown")) + return parseMarkdown(xpp); + else if (type.equals("time")) + return parseTime(xpp); + else if (type.equals("id")) + return parseId(xpp); + else if (type.equals("positiveInt")) + return parsePositiveInt(xpp); + else if (type.equals("decimal")) + return parseDecimal(xpp); + throw new FHIRFormatError("Unknown type "+type); + } + + private boolean nameIsTypeName(XmlPullParser xpp, String prefix) { + if (xpp.getName().equals(prefix+"Reference")) + return true; + if (xpp.getName().equals(prefix+"Quantity")) + return true; + if (xpp.getName().equals(prefix+"Period")) + return true; + if (xpp.getName().equals(prefix+"Attachment")) + return true; + if (xpp.getName().equals(prefix+"Duration")) + return true; + if (xpp.getName().equals(prefix+"Count")) + return true; + if (xpp.getName().equals(prefix+"Range")) + return true; + if (xpp.getName().equals(prefix+"Annotation")) + return true; + if (xpp.getName().equals(prefix+"Money")) + return true; + if (xpp.getName().equals(prefix+"Identifier")) + return true; + if (xpp.getName().equals(prefix+"Coding")) + return true; + if (xpp.getName().equals(prefix+"Signature")) + return true; + if (xpp.getName().equals(prefix+"SampledData")) + return true; + if (xpp.getName().equals(prefix+"Ratio")) + return true; + if (xpp.getName().equals(prefix+"Distance")) + return true; + if (xpp.getName().equals(prefix+"Age")) + return true; + if (xpp.getName().equals(prefix+"CodeableConcept")) + return true; + if (xpp.getName().equals(prefix+"SimpleQuantity")) + return true; + if (xpp.getName().equals(prefix+"Meta")) + return true; + if (xpp.getName().equals(prefix+"Address")) + return true; + if (xpp.getName().equals(prefix+"TriggerDefinition")) + return true; + if (xpp.getName().equals(prefix+"Contributor")) + return true; + if (xpp.getName().equals(prefix+"DataRequirement")) + return true; + if (xpp.getName().equals(prefix+"Dosage")) + return true; + if (xpp.getName().equals(prefix+"RelatedArtifact")) + return true; + if (xpp.getName().equals(prefix+"ContactDetail")) + return true; + if (xpp.getName().equals(prefix+"HumanName")) + return true; + if (xpp.getName().equals(prefix+"ContactPoint")) + return true; + if (xpp.getName().equals(prefix+"UsageContext")) + return true; + if (xpp.getName().equals(prefix+"Timing")) + return true; + if (xpp.getName().equals(prefix+"ElementDefinition")) + return true; + if (xpp.getName().equals(prefix+"ParameterDefinition")) + return true; + if (xpp.getName().equals(prefix+"Parameters")) + return true; + if (xpp.getName().equals(prefix+"Account")) + return true; + if (xpp.getName().equals(prefix+"ActivityDefinition")) + return true; + if (xpp.getName().equals(prefix+"AdverseEvent")) + return true; + if (xpp.getName().equals(prefix+"AllergyIntolerance")) + return true; + if (xpp.getName().equals(prefix+"Appointment")) + return true; + if (xpp.getName().equals(prefix+"AppointmentResponse")) + return true; + if (xpp.getName().equals(prefix+"AuditEvent")) + return true; + if (xpp.getName().equals(prefix+"Basic")) + return true; + if (xpp.getName().equals(prefix+"Binary")) + return true; + if (xpp.getName().equals(prefix+"BodyStructure")) + return true; + if (xpp.getName().equals(prefix+"Bundle")) + return true; + if (xpp.getName().equals(prefix+"CapabilityStatement")) + return true; + if (xpp.getName().equals(prefix+"CarePlan")) + return true; + if (xpp.getName().equals(prefix+"CareTeam")) + return true; + if (xpp.getName().equals(prefix+"CatalogEntry")) + return true; + if (xpp.getName().equals(prefix+"ChargeItem")) + return true; + if (xpp.getName().equals(prefix+"Claim")) + return true; + if (xpp.getName().equals(prefix+"ClaimResponse")) + return true; + if (xpp.getName().equals(prefix+"ClinicalImpression")) + return true; + if (xpp.getName().equals(prefix+"CodeSystem")) + return true; + if (xpp.getName().equals(prefix+"Communication")) + return true; + if (xpp.getName().equals(prefix+"CommunicationRequest")) + return true; + if (xpp.getName().equals(prefix+"CompartmentDefinition")) + return true; + if (xpp.getName().equals(prefix+"Composition")) + return true; + if (xpp.getName().equals(prefix+"ConceptMap")) + return true; + if (xpp.getName().equals(prefix+"Condition")) + return true; + if (xpp.getName().equals(prefix+"Consent")) + return true; + if (xpp.getName().equals(prefix+"Contract")) + return true; + if (xpp.getName().equals(prefix+"Coverage")) + return true; + if (xpp.getName().equals(prefix+"DetectedIssue")) + return true; + if (xpp.getName().equals(prefix+"Device")) + return true; + if (xpp.getName().equals(prefix+"DeviceComponent")) + return true; + if (xpp.getName().equals(prefix+"DeviceMetric")) + return true; + if (xpp.getName().equals(prefix+"DeviceRequest")) + return true; + if (xpp.getName().equals(prefix+"DeviceUseStatement")) + return true; + if (xpp.getName().equals(prefix+"DiagnosticReport")) + return true; + if (xpp.getName().equals(prefix+"DocumentManifest")) + return true; + if (xpp.getName().equals(prefix+"DocumentReference")) + return true; + if (xpp.getName().equals(prefix+"EligibilityRequest")) + return true; + if (xpp.getName().equals(prefix+"EligibilityResponse")) + return true; + if (xpp.getName().equals(prefix+"Encounter")) + return true; + if (xpp.getName().equals(prefix+"Endpoint")) + return true; + if (xpp.getName().equals(prefix+"EnrollmentRequest")) + return true; + if (xpp.getName().equals(prefix+"EnrollmentResponse")) + return true; + if (xpp.getName().equals(prefix+"EpisodeOfCare")) + return true; + if (xpp.getName().equals(prefix+"EventDefinition")) + return true; + if (xpp.getName().equals(prefix+"ExampleScenario")) + return true; + if (xpp.getName().equals(prefix+"ExpansionProfile")) + return true; + if (xpp.getName().equals(prefix+"ExplanationOfBenefit")) + return true; + if (xpp.getName().equals(prefix+"FamilyMemberHistory")) + return true; + if (xpp.getName().equals(prefix+"Flag")) + return true; + if (xpp.getName().equals(prefix+"Goal")) + return true; + if (xpp.getName().equals(prefix+"GraphDefinition")) + return true; + if (xpp.getName().equals(prefix+"Group")) + return true; + if (xpp.getName().equals(prefix+"GuidanceResponse")) + return true; + if (xpp.getName().equals(prefix+"HealthcareService")) + return true; + if (xpp.getName().equals(prefix+"ImagingManifest")) + return true; + if (xpp.getName().equals(prefix+"ImagingStudy")) + return true; + if (xpp.getName().equals(prefix+"Immunization")) + return true; + if (xpp.getName().equals(prefix+"ImmunizationRecommendation")) + return true; + if (xpp.getName().equals(prefix+"ImplementationGuide")) + return true; + if (xpp.getName().equals(prefix+"Library")) + return true; + if (xpp.getName().equals(prefix+"Linkage")) + return true; + if (xpp.getName().equals(prefix+"List")) + return true; + if (xpp.getName().equals(prefix+"Location")) + return true; + if (xpp.getName().equals(prefix+"Measure")) + return true; + if (xpp.getName().equals(prefix+"MeasureReport")) + return true; + if (xpp.getName().equals(prefix+"Media")) + return true; + if (xpp.getName().equals(prefix+"Medication")) + return true; + if (xpp.getName().equals(prefix+"MedicationAdministration")) + return true; + if (xpp.getName().equals(prefix+"MedicationDispense")) + return true; + if (xpp.getName().equals(prefix+"MedicationRequest")) + return true; + if (xpp.getName().equals(prefix+"MedicationStatement")) + return true; + if (xpp.getName().equals(prefix+"MessageDefinition")) + return true; + if (xpp.getName().equals(prefix+"MessageHeader")) + return true; + if (xpp.getName().equals(prefix+"NamingSystem")) + return true; + if (xpp.getName().equals(prefix+"NutritionOrder")) + return true; + if (xpp.getName().equals(prefix+"Observation")) + return true; + if (xpp.getName().equals(prefix+"OperationDefinition")) + return true; + if (xpp.getName().equals(prefix+"OperationOutcome")) + return true; + if (xpp.getName().equals(prefix+"Organization")) + return true; + if (xpp.getName().equals(prefix+"Patient")) + return true; + if (xpp.getName().equals(prefix+"PaymentNotice")) + return true; + if (xpp.getName().equals(prefix+"PaymentReconciliation")) + return true; + if (xpp.getName().equals(prefix+"Person")) + return true; + if (xpp.getName().equals(prefix+"PlanDefinition")) + return true; + if (xpp.getName().equals(prefix+"Practitioner")) + return true; + if (xpp.getName().equals(prefix+"PractitionerRole")) + return true; + if (xpp.getName().equals(prefix+"Procedure")) + return true; + if (xpp.getName().equals(prefix+"ProcedureRequest")) + return true; + if (xpp.getName().equals(prefix+"ProcessRequest")) + return true; + if (xpp.getName().equals(prefix+"ProcessResponse")) + return true; + if (xpp.getName().equals(prefix+"Provenance")) + return true; + if (xpp.getName().equals(prefix+"Questionnaire")) + return true; + if (xpp.getName().equals(prefix+"QuestionnaireResponse")) + return true; + if (xpp.getName().equals(prefix+"RelatedPerson")) + return true; + if (xpp.getName().equals(prefix+"RequestGroup")) + return true; + if (xpp.getName().equals(prefix+"ResearchStudy")) + return true; + if (xpp.getName().equals(prefix+"ResearchSubject")) + return true; + if (xpp.getName().equals(prefix+"RiskAssessment")) + return true; + if (xpp.getName().equals(prefix+"Schedule")) + return true; + if (xpp.getName().equals(prefix+"SearchParameter")) + return true; + if (xpp.getName().equals(prefix+"Sequence")) + return true; + if (xpp.getName().equals(prefix+"ServiceDefinition")) + return true; + if (xpp.getName().equals(prefix+"Slot")) + return true; + if (xpp.getName().equals(prefix+"Specimen")) + return true; + if (xpp.getName().equals(prefix+"SpecimenDefinition")) + return true; + if (xpp.getName().equals(prefix+"StructureDefinition")) + return true; + if (xpp.getName().equals(prefix+"StructureMap")) + return true; + if (xpp.getName().equals(prefix+"Subscription")) + return true; + if (xpp.getName().equals(prefix+"Substance")) + return true; + if (xpp.getName().equals(prefix+"SupplyDelivery")) + return true; + if (xpp.getName().equals(prefix+"SupplyRequest")) + return true; + if (xpp.getName().equals(prefix+"Task")) + return true; + if (xpp.getName().equals(prefix+"TestReport")) + return true; + if (xpp.getName().equals(prefix+"TestScript")) + return true; + if (xpp.getName().equals(prefix+"ValueSet")) + return true; + if (xpp.getName().equals(prefix+"VisionPrescription")) + return true; + if (xpp.getName().equals(prefix+"Date")) + return true; + if (xpp.getName().equals(prefix+"DateTime")) + return true; + if (xpp.getName().equals(prefix+"Code")) + return true; + if (xpp.getName().equals(prefix+"String")) + return true; + if (xpp.getName().equals(prefix+"Integer")) + return true; + if (xpp.getName().equals(prefix+"Oid")) + return true; + if (xpp.getName().equals(prefix+"Uri")) + return true; + if (xpp.getName().equals(prefix+"Uuid")) + return true; + if (xpp.getName().equals(prefix+"Instant")) + return true; + if (xpp.getName().equals(prefix+"Boolean")) + return true; + if (xpp.getName().equals(prefix+"Base64Binary")) + return true; + if (xpp.getName().equals(prefix+"UnsignedInt")) + return true; + if (xpp.getName().equals(prefix+"Markdown")) + return true; + if (xpp.getName().equals(prefix+"Time")) + return true; + if (xpp.getName().equals(prefix+"Id")) + return true; + if (xpp.getName().equals(prefix+"PositiveInt")) + return true; + if (xpp.getName().equals(prefix+"Decimal")) + return true; + return false; + } + protected void composeElementElements(Element element) throws IOException { + for (Extension e : element.getExtension()) { + composeExtension("extension", e); + } + } + + protected void composeBackboneElements(BackboneElement element) throws IOException { + composeElementElements(element); + for (Extension e : element.getModifierExtension()) { + composeExtension("modifierExtension", e); + } + } + + protected > void composeEnumeration(String name, Enumeration value, EnumFactory e) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) { + composeElementAttributes(value); + if (value.getValue() != null) + xml.attribute("value", e.toCode(value.getValue())); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDate(String name, DateType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// date + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDateTime(String name, DateTimeType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// dateTime + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCode(String name, CodeType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// code + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeString(String name, StringType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// string + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeInteger(String name, IntegerType value) throws IOException { + if (value != null) { // integer + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOid(String name, OidType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// oid + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeUri(String name, UriType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// uri + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeUuid(String name, UuidType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// uuid + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeInstant(String name, InstantType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// instant + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBoolean(String name, BooleanType value) throws IOException { + if (value != null) { // boolean + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBase64Binary(String name, Base64BinaryType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// base64Binary + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeUnsignedInt(String name, UnsignedIntType value) throws IOException { + if (value != null) { // unsignedInt + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMarkdown(String name, MarkdownType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// markdown + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTime(String name, TimeType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// time + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeId(String name, IdType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// id + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composePositiveInt(String name, PositiveIntType value) throws IOException { + if (value != null) { // positiveInt + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDecimal(String name, DecimalType value) throws IOException { + if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// decimal + composeElementAttributes(value); + if (value.asStringValue() != null) + xml.attribute("value", value.asStringValue()); + + xml.enter(FHIR_NS, name); + composeElementElements(value); + composeElementClose(value); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExtension(String name, Extension element) throws IOException { + if (element != null) { + composeElementAttributes(element); + if (element.hasUrlElement()) + xml.attribute("url", element.getUrlElement().getValue()); + xml.enter(FHIR_NS, name); + composeExtensionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExtensionElements(Extension element) throws IOException { + composeElementElements(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeNarrative(String name, Narrative element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNarrativeElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNarrativeElements(Narrative element) throws IOException { + composeElementElements(element); + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory()); + if (element.hasDiv()) { + composeXhtml("div", element.getDiv()); + } + } + + protected void composeDuration(String name, Duration element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeDurationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDurationElements(Duration element) throws IOException { + composeQuantityElements(element); + } + + protected void composeCount(String name, Count element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeCountElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCountElements(Count element) throws IOException { + composeQuantityElements(element); + } + + protected void composeMoney(String name, Money element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeMoneyElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMoneyElements(Money element) throws IOException { + composeQuantityElements(element); + } + + protected void composeDistance(String name, Distance element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeDistanceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDistanceElements(Distance element) throws IOException { + composeQuantityElements(element); + } + + protected void composeAge(String name, Age element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeAgeElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAgeElements(Age element) throws IOException { + composeQuantityElements(element); + } + + protected void composeReference(String name, Reference element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeReferenceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeReferenceElements(Reference element) throws IOException { + composeElementElements(element); + if (element.hasReferenceElement()) { + composeString("reference", element.getReferenceElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + } + + protected void composeQuantity(String name, Quantity element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeQuantityElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuantityElements(Quantity element) throws IOException { + composeElementElements(element); + if (element.hasValueElement()) { + composeDecimal("value", element.getValueElement()); + } + if (element.hasComparatorElement()) + composeEnumeration("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory()); + if (element.hasUnitElement()) { + composeString("unit", element.getUnitElement()); + } + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + } + + protected void composePeriod(String name, Period element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composePeriodElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePeriodElements(Period element) throws IOException { + composeElementElements(element); + if (element.hasStartElement()) { + composeDateTime("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeDateTime("end", element.getEndElement()); + } + } + + protected void composeAttachment(String name, Attachment element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeAttachmentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAttachmentElements(Attachment element) throws IOException { + composeElementElements(element); + if (element.hasContentTypeElement()) { + composeCode("contentType", element.getContentTypeElement()); + } + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + if (element.hasDataElement()) { + composeBase64Binary("data", element.getDataElement()); + } + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasSizeElement()) { + composeUnsignedInt("size", element.getSizeElement()); + } + if (element.hasHashElement()) { + composeBase64Binary("hash", element.getHashElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasCreationElement()) { + composeDateTime("creation", element.getCreationElement()); + } + } + + protected void composeRange(String name, Range element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeRangeElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRangeElements(Range element) throws IOException { + composeElementElements(element); + if (element.hasLow()) { + composeSimpleQuantity("low", element.getLow()); + } + if (element.hasHigh()) { + composeSimpleQuantity("high", element.getHigh()); + } + } + + protected void composeAnnotation(String name, Annotation element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeAnnotationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAnnotationElements(Annotation element) throws IOException { + composeElementElements(element); + if (element.hasAuthor()) { + composeType("author", element.getAuthor()); + } if (element.hasTimeElement()) { + composeDateTime("time", element.getTimeElement()); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + } + + protected void composeIdentifier(String name, Identifier element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeIdentifierElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeIdentifierElements(Identifier element) throws IOException { + composeElementElements(element); + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasAssigner()) { + composeReference("assigner", element.getAssigner()); + } + } + + protected void composeCoding(String name, Coding element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeCodingElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodingElements(Coding element) throws IOException { + composeElementElements(element); + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasUserSelectedElement()) { + composeBoolean("userSelected", element.getUserSelectedElement()); + } + } + + protected void composeSignature(String name, Signature element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeSignatureElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSignatureElements(Signature element) throws IOException { + composeElementElements(element); + if (element.hasType()) { + for (Coding e : element.getType()) + composeCoding("type", e); + } + if (element.hasWhenElement()) { + composeInstant("when", element.getWhenElement()); + } + if (element.hasWho()) { + composeType("who", element.getWho()); + } if (element.hasOnBehalfOf()) { + composeType("onBehalfOf", element.getOnBehalfOf()); + } if (element.hasContentTypeElement()) { + composeCode("contentType", element.getContentTypeElement()); + } + if (element.hasBlobElement()) { + composeBase64Binary("blob", element.getBlobElement()); + } + } + + protected void composeSampledData(String name, SampledData element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeSampledDataElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSampledDataElements(SampledData element) throws IOException { + composeElementElements(element); + if (element.hasOrigin()) { + composeSimpleQuantity("origin", element.getOrigin()); + } + if (element.hasPeriodElement()) { + composeDecimal("period", element.getPeriodElement()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasLowerLimitElement()) { + composeDecimal("lowerLimit", element.getLowerLimitElement()); + } + if (element.hasUpperLimitElement()) { + composeDecimal("upperLimit", element.getUpperLimitElement()); + } + if (element.hasDimensionsElement()) { + composePositiveInt("dimensions", element.getDimensionsElement()); + } + if (element.hasDataElement()) { + composeString("data", element.getDataElement()); + } + } + + protected void composeRatio(String name, Ratio element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeRatioElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRatioElements(Ratio element) throws IOException { + composeElementElements(element); + if (element.hasNumerator()) { + composeQuantity("numerator", element.getNumerator()); + } + if (element.hasDenominator()) { + composeQuantity("denominator", element.getDenominator()); + } + } + + protected void composeCodeableConcept(String name, CodeableConcept element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeableConceptElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeableConceptElements(CodeableConcept element) throws IOException { + composeElementElements(element); + if (element.hasCoding()) { + for (Coding e : element.getCoding()) + composeCoding("coding", e); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + } + + protected void composeSimpleQuantity(String name, SimpleQuantity element) throws IOException { + if (element != null) { + composeTypeAttributes(element); + xml.enter(FHIR_NS, name); + composeSimpleQuantityElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSimpleQuantityElements(SimpleQuantity element) throws IOException { + composeElementElements(element); + if (element.hasValueElement()) { + composeDecimal("value", element.getValueElement()); + } + if (element.hasComparatorElement()) + composeEnumeration("comparator", element.getComparatorElement(), new SimpleQuantity.QuantityComparatorEnumFactory()); + if (element.hasUnitElement()) { + composeString("unit", element.getUnitElement()); + } + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + } + + protected void composeMeta(String name, Meta element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMetaElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMetaElements(Meta element) throws IOException { + composeElementElements(element); + if (element.hasVersionIdElement()) { + composeId("versionId", element.getVersionIdElement()); + } + if (element.hasLastUpdatedElement()) { + composeInstant("lastUpdated", element.getLastUpdatedElement()); + } + if (element.hasProfile()) { + for (UriType e : element.getProfile()) + composeUri("profile", e); + } + if (element.hasSecurity()) { + for (Coding e : element.getSecurity()) + composeCoding("security", e); + } + if (element.hasTag()) { + for (Coding e : element.getTag()) + composeCoding("tag", e); + } + } + + protected void composeAddress(String name, Address element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAddressElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAddressElements(Address element) throws IOException { + composeElementElements(element); + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new Address.AddressUseEnumFactory()); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Address.AddressTypeEnumFactory()); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasLine()) { + for (StringType e : element.getLine()) + composeString("line", e); + } + if (element.hasCityElement()) { + composeString("city", element.getCityElement()); + } + if (element.hasDistrictElement()) { + composeString("district", element.getDistrictElement()); + } + if (element.hasStateElement()) { + composeString("state", element.getStateElement()); + } + if (element.hasPostalCodeElement()) { + composeString("postalCode", element.getPostalCodeElement()); + } + if (element.hasCountryElement()) { + composeString("country", element.getCountryElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeTriggerDefinition(String name, TriggerDefinition element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTriggerDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTriggerDefinitionElements(TriggerDefinition element) throws IOException { + composeElementElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory()); + if (element.hasNameElement()) { + composeUri("name", element.getNameElement()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasData()) { + composeDataRequirement("data", element.getData()); + } + if (element.hasCondition()) { + composeTriggerDefinitionTriggerDefinitionConditionComponent("condition", element.getCondition()); + } + } + + protected void composeTriggerDefinitionTriggerDefinitionConditionComponent(String name, TriggerDefinition.TriggerDefinitionConditionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTriggerDefinitionTriggerDefinitionConditionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTriggerDefinitionTriggerDefinitionConditionComponentElements(TriggerDefinition.TriggerDefinitionConditionComponent element) throws IOException { + composeElementElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasLanguageElement()) + composeEnumeration("language", element.getLanguageElement(), new TriggerDefinition.ExpressionLanguageEnumFactory()); + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + } + + protected void composeContributor(String name, Contributor element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContributorElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContributorElements(Contributor element) throws IOException { + composeElementElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory()); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + } + + protected void composeDataRequirement(String name, DataRequirement element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDataRequirementElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDataRequirementElements(DataRequirement element) throws IOException { + composeElementElements(element); + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasProfile()) { + for (UriType e : element.getProfile()) + composeUri("profile", e); + } + if (element.hasMustSupport()) { + for (StringType e : element.getMustSupport()) + composeString("mustSupport", e); + } + if (element.hasCodeFilter()) { + for (DataRequirement.DataRequirementCodeFilterComponent e : element.getCodeFilter()) + composeDataRequirementDataRequirementCodeFilterComponent("codeFilter", e); + } + if (element.hasDateFilter()) { + for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter()) + composeDataRequirementDataRequirementDateFilterComponent("dateFilter", e); + } + } + + protected void composeDataRequirementDataRequirementCodeFilterComponent(String name, DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDataRequirementDataRequirementCodeFilterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDataRequirementDataRequirementCodeFilterComponentElements(DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { + composeElementElements(element); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasValueSet()) { + composeType("valueSet", element.getValueSet()); + } if (element.hasCode()) { + for (Coding e : element.getCode()) + composeCoding("code", e); + } + } + + protected void composeDataRequirementDataRequirementDateFilterComponent(String name, DataRequirement.DataRequirementDateFilterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDataRequirementDataRequirementDateFilterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDataRequirementDataRequirementDateFilterComponentElements(DataRequirement.DataRequirementDateFilterComponent element) throws IOException { + composeElementElements(element); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeDosage(String name, Dosage element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDosageElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDosageElements(Dosage element) throws IOException { + composeElementElements(element); + if (element.hasSequenceElement()) { + composeInteger("sequence", element.getSequenceElement()); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasAdditionalInstruction()) { + for (CodeableConcept e : element.getAdditionalInstruction()) + composeCodeableConcept("additionalInstruction", e); + } + if (element.hasPatientInstructionElement()) { + composeString("patientInstruction", element.getPatientInstructionElement()); + } + if (element.hasTiming()) { + composeTiming("timing", element.getTiming()); + } + if (element.hasAsNeeded()) { + composeType("asNeeded", element.getAsNeeded()); + } if (element.hasSite()) { + composeCodeableConcept("site", element.getSite()); + } + if (element.hasRoute()) { + composeCodeableConcept("route", element.getRoute()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasDose()) { + composeType("dose", element.getDose()); + } if (element.hasMaxDosePerPeriod()) { + composeRatio("maxDosePerPeriod", element.getMaxDosePerPeriod()); + } + if (element.hasMaxDosePerAdministration()) { + composeSimpleQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration()); + } + if (element.hasMaxDosePerLifetime()) { + composeSimpleQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime()); + } + if (element.hasRate()) { + composeType("rate", element.getRate()); + } } + + protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeRelatedArtifactElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRelatedArtifactElements(RelatedArtifact element) throws IOException { + composeElementElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory()); + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasCitationElement()) { + composeString("citation", element.getCitationElement()); + } + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasDocument()) { + composeAttachment("document", element.getDocument()); + } + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + } + + protected void composeContactDetail(String name, ContactDetail element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContactDetailElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContactDetailElements(ContactDetail element) throws IOException { + composeElementElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + } + + protected void composeHumanName(String name, HumanName element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeHumanNameElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeHumanNameElements(HumanName element) throws IOException { + composeElementElements(element); + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new HumanName.NameUseEnumFactory()); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasFamilyElement()) { + composeString("family", element.getFamilyElement()); + } + if (element.hasGiven()) { + for (StringType e : element.getGiven()) + composeString("given", e); + } + if (element.hasPrefix()) { + for (StringType e : element.getPrefix()) + composeString("prefix", e); + } + if (element.hasSuffix()) { + for (StringType e : element.getSuffix()) + composeString("suffix", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeContactPoint(String name, ContactPoint element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContactPointElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContactPointElements(ContactPoint element) throws IOException { + composeElementElements(element); + if (element.hasSystemElement()) + composeEnumeration("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory()); + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory()); + if (element.hasRankElement()) { + composePositiveInt("rank", element.getRankElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeUsageContext(String name, UsageContext element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeUsageContextElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeUsageContextElements(UsageContext element) throws IOException { + composeElementElements(element); + if (element.hasCode()) { + composeCoding("code", element.getCode()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeTiming(String name, Timing element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTimingElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTimingElements(Timing element) throws IOException { + composeElementElements(element); + if (element.hasEvent()) { + for (DateTimeType e : element.getEvent()) + composeDateTime("event", e); + } + if (element.hasRepeat()) { + composeTimingTimingRepeatComponent("repeat", element.getRepeat()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + } + + protected void composeTimingTimingRepeatComponent(String name, Timing.TimingRepeatComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTimingTimingRepeatComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTimingTimingRepeatComponentElements(Timing.TimingRepeatComponent element) throws IOException { + composeElementElements(element); + if (element.hasBounds()) { + composeType("bounds", element.getBounds()); + } if (element.hasCountElement()) { + composeInteger("count", element.getCountElement()); + } + if (element.hasCountMaxElement()) { + composeInteger("countMax", element.getCountMaxElement()); + } + if (element.hasDurationElement()) { + composeDecimal("duration", element.getDurationElement()); + } + if (element.hasDurationMaxElement()) { + composeDecimal("durationMax", element.getDurationMaxElement()); + } + if (element.hasDurationUnitElement()) + composeEnumeration("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory()); + if (element.hasFrequencyElement()) { + composeInteger("frequency", element.getFrequencyElement()); + } + if (element.hasFrequencyMaxElement()) { + composeInteger("frequencyMax", element.getFrequencyMaxElement()); + } + if (element.hasPeriodElement()) { + composeDecimal("period", element.getPeriodElement()); + } + if (element.hasPeriodMaxElement()) { + composeDecimal("periodMax", element.getPeriodMaxElement()); + } + if (element.hasPeriodUnitElement()) + composeEnumeration("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory()); + if (element.hasDayOfWeek()) + for (Enumeration e : element.getDayOfWeek()) + composeEnumeration("dayOfWeek", e, new Timing.DayOfWeekEnumFactory()); + if (element.hasTimeOfDay()) { + for (TimeType e : element.getTimeOfDay()) + composeTime("timeOfDay", e); + } + if (element.hasWhen()) + for (Enumeration e : element.getWhen()) + composeEnumeration("when", e, new Timing.EventTimingEnumFactory()); + if (element.hasOffsetElement()) { + composeUnsignedInt("offset", element.getOffsetElement()); + } + } + + protected void composeElementDefinition(String name, ElementDefinition element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElements(ElementDefinition element) throws IOException { + composeElementElements(element); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasRepresentation()) + for (Enumeration e : element.getRepresentation()) + composeEnumeration("representation", e, new ElementDefinition.PropertyRepresentationEnumFactory()); + if (element.hasSliceNameElement()) { + composeString("sliceName", element.getSliceNameElement()); + } + if (element.hasLabelElement()) { + composeString("label", element.getLabelElement()); + } + if (element.hasCode()) { + for (Coding e : element.getCode()) + composeCoding("code", e); + } + if (element.hasSlicing()) { + composeElementDefinitionElementDefinitionSlicingComponent("slicing", element.getSlicing()); + } + if (element.hasShortElement()) { + composeString("short", element.getShortElement()); + } + if (element.hasDefinitionElement()) { + composeMarkdown("definition", element.getDefinitionElement()); + } + if (element.hasCommentElement()) { + composeMarkdown("comment", element.getCommentElement()); + } + if (element.hasRequirementsElement()) { + composeMarkdown("requirements", element.getRequirementsElement()); + } + if (element.hasAlias()) { + for (StringType e : element.getAlias()) + composeString("alias", e); + } + if (element.hasMinElement()) { + composeUnsignedInt("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + if (element.hasBase()) { + composeElementDefinitionElementDefinitionBaseComponent("base", element.getBase()); + } + if (element.hasContentReferenceElement()) { + composeUri("contentReference", element.getContentReferenceElement()); + } + if (element.hasType()) { + for (ElementDefinition.TypeRefComponent e : element.getType()) + composeElementDefinitionTypeRefComponent("type", e); + } + if (element.hasDefaultValue()) { + composeType("defaultValue", element.getDefaultValue()); + } if (element.hasMeaningWhenMissingElement()) { + composeMarkdown("meaningWhenMissing", element.getMeaningWhenMissingElement()); + } + if (element.hasOrderMeaningElement()) { + composeString("orderMeaning", element.getOrderMeaningElement()); + } + if (element.hasFixed()) { + composeType("fixed", element.getFixed()); + } if (element.hasPattern()) { + composeType("pattern", element.getPattern()); + } if (element.hasExample()) { + for (ElementDefinition.ElementDefinitionExampleComponent e : element.getExample()) + composeElementDefinitionElementDefinitionExampleComponent("example", e); + } + if (element.hasMinValue()) { + composeType("minValue", element.getMinValue()); + } if (element.hasMaxValue()) { + composeType("maxValue", element.getMaxValue()); + } if (element.hasMaxLengthElement()) { + composeInteger("maxLength", element.getMaxLengthElement()); + } + if (element.hasCondition()) { + for (IdType e : element.getCondition()) + composeId("condition", e); + } + if (element.hasConstraint()) { + for (ElementDefinition.ElementDefinitionConstraintComponent e : element.getConstraint()) + composeElementDefinitionElementDefinitionConstraintComponent("constraint", e); + } + if (element.hasMustSupportElement()) { + composeBoolean("mustSupport", element.getMustSupportElement()); + } + if (element.hasIsModifierElement()) { + composeBoolean("isModifier", element.getIsModifierElement()); + } + if (element.hasIsSummaryElement()) { + composeBoolean("isSummary", element.getIsSummaryElement()); + } + if (element.hasBinding()) { + composeElementDefinitionElementDefinitionBindingComponent("binding", element.getBinding()); + } + if (element.hasMapping()) { + for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping()) + composeElementDefinitionElementDefinitionMappingComponent("mapping", e); + } + } + + protected void composeElementDefinitionElementDefinitionSlicingComponent(String name, ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionSlicingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionSlicingComponentElements(ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { + composeElementElements(element); + if (element.hasDiscriminator()) { + for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator()) + composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent("discriminator", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasOrderedElement()) { + composeBoolean("ordered", element.getOrderedElement()); + } + if (element.hasRulesElement()) + composeEnumeration("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory()); + } + + protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(String name, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentElements(ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { + composeElementElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory()); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + } + + protected void composeElementDefinitionElementDefinitionBaseComponent(String name, ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionBaseComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionBaseComponentElements(ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { + composeElementElements(element); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasMinElement()) { + composeUnsignedInt("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + } + + protected void composeElementDefinitionTypeRefComponent(String name, ElementDefinition.TypeRefComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionTypeRefComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionTypeRefComponentElements(ElementDefinition.TypeRefComponent element) throws IOException { + composeElementElements(element); + if (element.hasCodeElement()) { + composeUri("code", element.getCodeElement()); + } + if (element.hasProfileElement()) { + composeUri("profile", element.getProfileElement()); + } + if (element.hasTargetProfileElement()) { + composeUri("targetProfile", element.getTargetProfileElement()); + } + if (element.hasAggregation()) + for (Enumeration e : element.getAggregation()) + composeEnumeration("aggregation", e, new ElementDefinition.AggregationModeEnumFactory()); + if (element.hasVersioningElement()) + composeEnumeration("versioning", element.getVersioningElement(), new ElementDefinition.ReferenceVersionRulesEnumFactory()); + } + + protected void composeElementDefinitionElementDefinitionExampleComponent(String name, ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionExampleComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionExampleComponentElements(ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { + composeElementElements(element); + if (element.hasLabelElement()) { + composeString("label", element.getLabelElement()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeElementDefinitionElementDefinitionConstraintComponent(String name, ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionConstraintComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionConstraintComponentElements(ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { + composeElementElements(element); + if (element.hasKeyElement()) { + composeId("key", element.getKeyElement()); + } + if (element.hasRequirementsElement()) { + composeString("requirements", element.getRequirementsElement()); + } + if (element.hasSeverityElement()) + composeEnumeration("severity", element.getSeverityElement(), new ElementDefinition.ConstraintSeverityEnumFactory()); + if (element.hasHumanElement()) { + composeString("human", element.getHumanElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + if (element.hasXpathElement()) { + composeString("xpath", element.getXpathElement()); + } + if (element.hasSourceElement()) { + composeUri("source", element.getSourceElement()); + } + } + + protected void composeElementDefinitionElementDefinitionBindingComponent(String name, ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionBindingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionBindingComponentElements(ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { + composeElementElements(element); + if (element.hasStrengthElement()) + composeEnumeration("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory()); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasValueSet()) { + composeType("valueSet", element.getValueSet()); + } } + + protected void composeElementDefinitionElementDefinitionMappingComponent(String name, ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeElementDefinitionElementDefinitionMappingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeElementDefinitionElementDefinitionMappingComponentElements(ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { + composeElementElements(element); + if (element.hasIdentityElement()) { + composeId("identity", element.getIdentityElement()); + } + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + if (element.hasMapElement()) { + composeString("map", element.getMapElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeParameterDefinition(String name, ParameterDefinition element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeParameterDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeParameterDefinitionElements(ParameterDefinition element) throws IOException { + composeElementElements(element); + if (element.hasNameElement()) { + composeCode("name", element.getNameElement()); + } + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory()); + if (element.hasMinElement()) { + composeInteger("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + } + + protected void composeDomainResourceAttributes(DomainResource element) throws IOException { + composeResourceAttributes(element); + } + + protected void composeDomainResourceElements(DomainResource element) throws IOException { + composeResourceElements(element); + if (element.hasText()) { + composeNarrative("text", element.getText()); + } + if (element.hasContained()) { + for (Resource e : element.getContained()) + { + xml.enter(FHIR_NS, "contained"); + composeResource(e); + xml.exit(FHIR_NS, "contained"); + } + } + if (element.hasExtension()) + for (Extension e : element.getExtension()) + composeExtension("extension", e); + if (element.hasModifierExtension()) { + for (Extension e : element.getModifierExtension()) + composeExtension("modifierExtension", e); + } + } + + protected void composeParameters(String name, Parameters element) throws IOException { + if (element != null) { + composeResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeParametersElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeParametersElements(Parameters element) throws IOException { + composeResourceElements(element); + if (element.hasParameter()) { + for (Parameters.ParametersParameterComponent e : element.getParameter()) + composeParametersParametersParameterComponent("parameter", e); + } + } + + protected void composeParametersParametersParameterComponent(String name, Parameters.ParametersParameterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeParametersParametersParameterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeParametersParametersParameterComponentElements(Parameters.ParametersParameterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasResource()) { + xml.enter(FHIR_NS, "resource"); + composeResource(element.getResource()); + xml.exit(FHIR_NS, "resource"); + } + if (element.hasPart()) { + for (Parameters.ParametersParameterComponent e : element.getPart()) + composeParametersParametersParameterComponent("part", e); + } + } + + protected void composeResourceAttributes(Resource element) throws IOException { + if (style != OutputStyle.CANONICAL) + for (String comment : element.getFormatCommentsPre()) + xml.comment(comment, getOutputStyle() == OutputStyle.PRETTY); + } + + protected void composeResourceElements(Resource element) throws IOException { + if (element.hasIdElement()) { + composeId("id", element.getIdElement()); + } + if (element.hasMeta()) { + composeMeta("meta", element.getMeta()); + } + if (element.hasImplicitRulesElement()) { + composeUri("implicitRules", element.getImplicitRulesElement()); + } + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + } + + protected void composeAccount(String name, Account element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeAccountElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAccountElements(Account element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Account.AccountStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasActive()) { + composePeriod("active", element.getActive()); + } + if (element.hasBalance()) { + composeMoney("balance", element.getBalance()); + } + if (element.hasCoverage()) { + for (Account.CoverageComponent e : element.getCoverage()) + composeAccountCoverageComponent("coverage", e); + } + if (element.hasOwner()) { + composeReference("owner", element.getOwner()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasGuarantor()) { + for (Account.GuarantorComponent e : element.getGuarantor()) + composeAccountGuarantorComponent("guarantor", e); + } + } + + protected void composeAccountCoverageComponent(String name, Account.CoverageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAccountCoverageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAccountCoverageComponentElements(Account.CoverageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasPriorityElement()) { + composePositiveInt("priority", element.getPriorityElement()); + } + } + + protected void composeAccountGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAccountGuarantorComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAccountGuarantorComponentElements(Account.GuarantorComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + if (element.hasOnHoldElement()) { + composeBoolean("onHold", element.getOnHoldElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeActivityDefinition(String name, ActivityDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeActivityDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeActivityDefinitionElements(ActivityDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasTopic()) { + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept("topic", e); + } + if (element.hasContributor()) { + for (Contributor e : element.getContributor()) + composeContributor("contributor", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasLibrary()) { + for (Reference e : element.getLibrary()) + composeReference("library", e); + } + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory()); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasParticipant()) { + for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant()) + composeActivityDefinitionActivityDefinitionParticipantComponent("participant", e); + } + if (element.hasProduct()) { + composeType("product", element.getProduct()); + } if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasDosage()) { + for (Dosage e : element.getDosage()) + composeDosage("dosage", e); + } + if (element.hasBodySite()) { + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept("bodySite", e); + } + if (element.hasTransform()) { + composeReference("transform", element.getTransform()); + } + if (element.hasDynamicValue()) { + for (ActivityDefinition.ActivityDefinitionDynamicValueComponent e : element.getDynamicValue()) + composeActivityDefinitionActivityDefinitionDynamicValueComponent("dynamicValue", e); + } + } + + protected void composeActivityDefinitionActivityDefinitionParticipantComponent(String name, ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeActivityDefinitionActivityDefinitionParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeActivityDefinitionActivityDefinitionParticipantComponentElements(ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory()); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + } + + protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(String name, ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeActivityDefinitionActivityDefinitionDynamicValueComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeActivityDefinitionActivityDefinitionDynamicValueComponentElements(ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasLanguageElement()) { + composeString("language", element.getLanguageElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + } + + protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeAdverseEventElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAdverseEventElements(AdverseEvent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasActualityElement()) + composeEnumeration("actuality", element.getActualityElement(), new AdverseEvent.AdverseEventActualityEnumFactory()); + if (element.hasCategoryElement()) + composeEnumeration("category", element.getCategoryElement(), new AdverseEvent.AdverseEventCategoryEnumFactory()); + if (element.hasEvent()) { + composeCodeableConcept("event", element.getEvent()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasResultingCondition()) { + for (Reference e : element.getResultingCondition()) + composeReference("resultingCondition", e); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasSeriousness()) { + composeCodeableConcept("seriousness", element.getSeriousness()); + } + if (element.hasSeverity()) { + composeCodeableConcept("severity", element.getSeverity()); + } + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasRecorder()) { + composeReference("recorder", element.getRecorder()); + } + if (element.hasEventParticipant()) { + composeReference("eventParticipant", element.getEventParticipant()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasSuspectEntity()) { + for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity()) + composeAdverseEventAdverseEventSuspectEntityComponent("suspectEntity", e); + } + if (element.hasSubjectMedicalHistory()) { + for (Reference e : element.getSubjectMedicalHistory()) + composeReference("subjectMedicalHistory", e); + } + if (element.hasReferenceDocument()) { + for (Reference e : element.getReferenceDocument()) + composeReference("referenceDocument", e); + } + if (element.hasStudy()) { + for (Reference e : element.getStudy()) + composeReference("study", e); + } + } + + protected void composeAdverseEventAdverseEventSuspectEntityComponent(String name, AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAdverseEventAdverseEventSuspectEntityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAdverseEventAdverseEventSuspectEntityComponentElements(AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasInstance()) { + composeReference("instance", element.getInstance()); + } + if (element.hasCausality()) { + for (AdverseEvent.AdverseEventSuspectEntityCausalityComponent e : element.getCausality()) + composeAdverseEventAdverseEventSuspectEntityCausalityComponent("causality", e); + } + } + + protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(String name, AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAdverseEventAdverseEventSuspectEntityCausalityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponentElements(AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAssessment()) { + composeCodeableConcept("assessment", element.getAssessment()); + } + if (element.hasProductRelatednessElement()) { + composeString("productRelatedness", element.getProductRelatednessElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + } + + protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeAllergyIntoleranceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAllergyIntoleranceElements(AllergyIntolerance element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasClinicalStatusElement()) + composeEnumeration("clinicalStatus", element.getClinicalStatusElement(), new AllergyIntolerance.AllergyIntoleranceClinicalStatusEnumFactory()); + if (element.hasVerificationStatusElement()) + composeEnumeration("verificationStatus", element.getVerificationStatusElement(), new AllergyIntolerance.AllergyIntoleranceVerificationStatusEnumFactory()); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory()); + if (element.hasCategory()) + for (Enumeration e : element.getCategory()) + composeEnumeration("category", e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory()); + if (element.hasCriticalityElement()) + composeEnumeration("criticality", element.getCriticalityElement(), new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory()); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasOnset()) { + composeType("onset", element.getOnset()); + } if (element.hasAssertedDateElement()) { + composeDateTime("assertedDate", element.getAssertedDateElement()); + } + if (element.hasRecorder()) { + composeReference("recorder", element.getRecorder()); + } + if (element.hasAsserter()) { + composeReference("asserter", element.getAsserter()); + } + if (element.hasLastOccurrenceElement()) { + composeDateTime("lastOccurrence", element.getLastOccurrenceElement()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasReaction()) { + for (AllergyIntolerance.AllergyIntoleranceReactionComponent e : element.getReaction()) + composeAllergyIntoleranceAllergyIntoleranceReactionComponent("reaction", e); + } + } + + protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(String name, AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAllergyIntoleranceAllergyIntoleranceReactionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponentElements(AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSubstance()) { + composeCodeableConcept("substance", element.getSubstance()); + } + if (element.hasManifestation()) { + for (CodeableConcept e : element.getManifestation()) + composeCodeableConcept("manifestation", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasOnsetElement()) { + composeDateTime("onset", element.getOnsetElement()); + } + if (element.hasSeverityElement()) + composeEnumeration("severity", element.getSeverityElement(), new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory()); + if (element.hasExposureRoute()) { + composeCodeableConcept("exposureRoute", element.getExposureRoute()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeAppointment(String name, Appointment element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeAppointmentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAppointmentElements(Appointment element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory()); + if (element.hasServiceCategory()) { + composeCodeableConcept("serviceCategory", element.getServiceCategory()); + } + if (element.hasServiceType()) { + for (CodeableConcept e : element.getServiceType()) + composeCodeableConcept("serviceType", e); + } + if (element.hasSpecialty()) { + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept("specialty", e); + } + if (element.hasAppointmentType()) { + composeCodeableConcept("appointmentType", element.getAppointmentType()); + } + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasIndication()) { + for (Reference e : element.getIndication()) + composeReference("indication", e); + } + if (element.hasPriorityElement()) { + composeUnsignedInt("priority", element.getPriorityElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasSupportingInformation()) { + for (Reference e : element.getSupportingInformation()) + composeReference("supportingInformation", e); + } + if (element.hasStartElement()) { + composeInstant("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInstant("end", element.getEndElement()); + } + if (element.hasMinutesDurationElement()) { + composePositiveInt("minutesDuration", element.getMinutesDurationElement()); + } + if (element.hasSlot()) { + for (Reference e : element.getSlot()) + composeReference("slot", e); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasIncomingReferral()) { + for (Reference e : element.getIncomingReferral()) + composeReference("incomingReferral", e); + } + if (element.hasParticipant()) { + for (Appointment.AppointmentParticipantComponent e : element.getParticipant()) + composeAppointmentAppointmentParticipantComponent("participant", e); + } + if (element.hasRequestedPeriod()) { + for (Period e : element.getRequestedPeriod()) + composePeriod("requestedPeriod", e); + } + } + + protected void composeAppointmentAppointmentParticipantComponent(String name, Appointment.AppointmentParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAppointmentAppointmentParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAppointmentAppointmentParticipantComponentElements(Appointment.AppointmentParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasRequiredElement()) + composeEnumeration("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory()); + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory()); + } + + protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeAppointmentResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAppointmentResponseElements(AppointmentResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasAppointment()) { + composeReference("appointment", element.getAppointment()); + } + if (element.hasStartElement()) { + composeInstant("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInstant("end", element.getEndElement()); + } + if (element.hasParticipantType()) { + for (CodeableConcept e : element.getParticipantType()) + composeCodeableConcept("participantType", e); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasParticipantStatusElement()) + composeEnumeration("participantStatus", element.getParticipantStatusElement(), new AppointmentResponse.ParticipantStatusEnumFactory()); + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeAuditEvent(String name, AuditEvent element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeAuditEventElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAuditEventElements(AuditEvent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasSubtype()) { + for (Coding e : element.getSubtype()) + composeCoding("subtype", e); + } + if (element.hasActionElement()) + composeEnumeration("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasRecordedElement()) { + composeInstant("recorded", element.getRecordedElement()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory()); + if (element.hasOutcomeDescElement()) { + composeString("outcomeDesc", element.getOutcomeDescElement()); + } + if (element.hasPurposeOfEvent()) { + for (CodeableConcept e : element.getPurposeOfEvent()) + composeCodeableConcept("purposeOfEvent", e); + } + if (element.hasAgent()) { + for (AuditEvent.AuditEventAgentComponent e : element.getAgent()) + composeAuditEventAuditEventAgentComponent("agent", e); + } + if (element.hasSource()) { + composeAuditEventAuditEventSourceComponent("source", element.getSource()); + } + if (element.hasEntity()) { + for (AuditEvent.AuditEventEntityComponent e : element.getEntity()) + composeAuditEventAuditEventEntityComponent("entity", e); + } + } + + protected void composeAuditEventAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAuditEventAuditEventAgentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAuditEventAuditEventAgentComponentElements(AuditEvent.AuditEventAgentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasRole()) { + for (CodeableConcept e : element.getRole()) + composeCodeableConcept("role", e); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + if (element.hasUserId()) { + composeIdentifier("userId", element.getUserId()); + } + if (element.hasAltIdElement()) { + composeString("altId", element.getAltIdElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasRequestorElement()) { + composeBoolean("requestor", element.getRequestorElement()); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasPolicy()) { + for (UriType e : element.getPolicy()) + composeUri("policy", e); + } + if (element.hasMedia()) { + composeCoding("media", element.getMedia()); + } + if (element.hasNetwork()) { + composeAuditEventAuditEventAgentNetworkComponent("network", element.getNetwork()); + } + if (element.hasPurposeOfUse()) { + for (CodeableConcept e : element.getPurposeOfUse()) + composeCodeableConcept("purposeOfUse", e); + } + } + + protected void composeAuditEventAuditEventAgentNetworkComponent(String name, AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAuditEventAuditEventAgentNetworkComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAuditEventAuditEventAgentNetworkComponentElements(AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAddressElement()) { + composeString("address", element.getAddressElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory()); + } + + protected void composeAuditEventAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAuditEventAuditEventSourceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAuditEventAuditEventSourceComponentElements(AuditEvent.AuditEventSourceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSiteElement()) { + composeString("site", element.getSiteElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasType()) { + for (Coding e : element.getType()) + composeCoding("type", e); + } + } + + protected void composeAuditEventAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAuditEventAuditEventEntityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAuditEventAuditEventEntityComponentElements(AuditEvent.AuditEventEntityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasRole()) { + composeCoding("role", element.getRole()); + } + if (element.hasLifecycle()) { + composeCoding("lifecycle", element.getLifecycle()); + } + if (element.hasSecurityLabel()) { + for (Coding e : element.getSecurityLabel()) + composeCoding("securityLabel", e); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasQueryElement()) { + composeBase64Binary("query", element.getQueryElement()); + } + if (element.hasDetail()) { + for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail()) + composeAuditEventAuditEventEntityDetailComponent("detail", e); + } + } + + protected void composeAuditEventAuditEventEntityDetailComponent(String name, AuditEvent.AuditEventEntityDetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeAuditEventAuditEventEntityDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeAuditEventAuditEventEntityDetailComponentElements(AuditEvent.AuditEventEntityDetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) { + composeString("type", element.getTypeElement()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeBasic(String name, Basic element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeBasicElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBasicElements(Basic element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasCreatedElement()) { + composeDate("created", element.getCreatedElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + } + + protected void composeBinary(String name, Binary element) throws IOException { + if (element != null) { + composeResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeBinaryElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBinaryElements(Binary element) throws IOException { + composeResourceElements(element); + if (element.hasContentTypeElement()) { + composeCode("contentType", element.getContentTypeElement()); + } + if (element.hasSecurityContext()) { + composeReference("securityContext", element.getSecurityContext()); + } + if (element.hasContentElement()) { + composeBase64Binary("content", element.getContentElement()); + } + } + + protected void composeBodyStructure(String name, BodyStructure element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeBodyStructureElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBodyStructureElements(BodyStructure element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasMorphology()) { + composeCodeableConcept("morphology", element.getMorphology()); + } + if (element.hasLocation()) { + composeCodeableConcept("location", element.getLocation()); + } + if (element.hasLocationQualifier()) { + for (CodeableConcept e : element.getLocationQualifier()) + composeCodeableConcept("locationQualifier", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasImage()) { + for (Attachment e : element.getImage()) + composeAttachment("image", e); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + } + + protected void composeBundle(String name, Bundle element) throws IOException { + if (element != null) { + composeResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeBundleElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBundleElements(Bundle element) throws IOException { + composeResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory()); + if (element.hasTotalElement()) { + composeUnsignedInt("total", element.getTotalElement()); + } + if (element.hasLink()) { + for (Bundle.BundleLinkComponent e : element.getLink()) + composeBundleBundleLinkComponent("link", e); + } + if (element.hasEntry()) { + for (Bundle.BundleEntryComponent e : element.getEntry()) + composeBundleBundleEntryComponent("entry", e); + } + if (element.hasSignature()) { + composeSignature("signature", element.getSignature()); + } + } + + protected void composeBundleBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeBundleBundleLinkComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBundleBundleLinkComponentElements(Bundle.BundleLinkComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRelationElement()) { + composeString("relation", element.getRelationElement()); + } + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + } + + protected void composeBundleBundleEntryComponent(String name, Bundle.BundleEntryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeBundleBundleEntryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBundleBundleEntryComponentElements(Bundle.BundleEntryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLink()) { + for (Bundle.BundleLinkComponent e : element.getLink()) + composeBundleBundleLinkComponent("link", e); + } + if (element.hasFullUrlElement()) { + composeUri("fullUrl", element.getFullUrlElement()); + } + if (element.hasResource()) { + xml.enter(FHIR_NS, "resource"); + composeResource(element.getResource()); + xml.exit(FHIR_NS, "resource"); + } + if (element.hasSearch()) { + composeBundleBundleEntrySearchComponent("search", element.getSearch()); + } + if (element.hasRequest()) { + composeBundleBundleEntryRequestComponent("request", element.getRequest()); + } + if (element.hasResponse()) { + composeBundleBundleEntryResponseComponent("response", element.getResponse()); + } + } + + protected void composeBundleBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeBundleBundleEntrySearchComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBundleBundleEntrySearchComponentElements(Bundle.BundleEntrySearchComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory()); + if (element.hasScoreElement()) { + composeDecimal("score", element.getScoreElement()); + } + } + + protected void composeBundleBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeBundleBundleEntryRequestComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBundleBundleEntryRequestComponentElements(Bundle.BundleEntryRequestComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMethodElement()) + composeEnumeration("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory()); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIfNoneMatchElement()) { + composeString("ifNoneMatch", element.getIfNoneMatchElement()); + } + if (element.hasIfModifiedSinceElement()) { + composeInstant("ifModifiedSince", element.getIfModifiedSinceElement()); + } + if (element.hasIfMatchElement()) { + composeString("ifMatch", element.getIfMatchElement()); + } + if (element.hasIfNoneExistElement()) { + composeString("ifNoneExist", element.getIfNoneExistElement()); + } + } + + protected void composeBundleBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeBundleBundleEntryResponseComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeBundleBundleEntryResponseComponentElements(Bundle.BundleEntryResponseComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStatusElement()) { + composeString("status", element.getStatusElement()); + } + if (element.hasLocationElement()) { + composeUri("location", element.getLocationElement()); + } + if (element.hasEtagElement()) { + composeString("etag", element.getEtagElement()); + } + if (element.hasLastModifiedElement()) { + composeInstant("lastModified", element.getLastModifiedElement()); + } + if (element.hasOutcome()) { + xml.enter(FHIR_NS, "outcome"); + composeResource(element.getOutcome()); + xml.exit(FHIR_NS, "outcome"); + } + } + + protected void composeCapabilityStatement(String name, CapabilityStatement element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementElements(CapabilityStatement element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new CapabilityStatement.CapabilityStatementKindEnumFactory()); + if (element.hasInstantiates()) { + for (UriType e : element.getInstantiates()) + composeUri("instantiates", e); + } + if (element.hasSoftware()) { + composeCapabilityStatementCapabilityStatementSoftwareComponent("software", element.getSoftware()); + } + if (element.hasImplementation()) { + composeCapabilityStatementCapabilityStatementImplementationComponent("implementation", element.getImplementation()); + } + if (element.hasFhirVersionElement()) { + composeId("fhirVersion", element.getFhirVersionElement()); + } + if (element.hasAcceptUnknownElement()) + composeEnumeration("acceptUnknown", element.getAcceptUnknownElement(), new CapabilityStatement.UnknownContentCodeEnumFactory()); + if (element.hasFormat()) { + for (CodeType e : element.getFormat()) + composeCode("format", e); + } + if (element.hasPatchFormat()) { + for (CodeType e : element.getPatchFormat()) + composeCode("patchFormat", e); + } + if (element.hasImplementationGuide()) { + for (UriType e : element.getImplementationGuide()) + composeUri("implementationGuide", e); + } + if (element.hasProfile()) { + for (Reference e : element.getProfile()) + composeReference("profile", e); + } + if (element.hasRest()) { + for (CapabilityStatement.CapabilityStatementRestComponent e : element.getRest()) + composeCapabilityStatementCapabilityStatementRestComponent("rest", e); + } + if (element.hasMessaging()) { + for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging()) + composeCapabilityStatementCapabilityStatementMessagingComponent("messaging", e); + } + if (element.hasDocument()) { + for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument()) + composeCapabilityStatementCapabilityStatementDocumentComponent("document", e); + } + } + + protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(String name, CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementSoftwareComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementSoftwareComponentElements(CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasReleaseDateElement()) { + composeDateTime("releaseDate", element.getReleaseDateElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementImplementationComponent(String name, CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementImplementationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementImplementationComponentElements(CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestComponent(String name, CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementRestComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestComponentElements(CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + if (element.hasSecurity()) { + composeCapabilityStatementCapabilityStatementRestSecurityComponent("security", element.getSecurity()); + } + if (element.hasResource()) { + for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource()) + composeCapabilityStatementCapabilityStatementRestResourceComponent("resource", e); + } + if (element.hasInteraction()) { + for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction()) + composeCapabilityStatementSystemInteractionComponent("interaction", e); + } + if (element.hasSearchParam()) { + for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent("searchParam", e); + } + if (element.hasOperation()) { + for (CapabilityStatement.CapabilityStatementRestOperationComponent e : element.getOperation()) + composeCapabilityStatementCapabilityStatementRestOperationComponent("operation", e); + } + if (element.hasCompartment()) { + for (UriType e : element.getCompartment()) + composeUri("compartment", e); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementRestSecurityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityComponentElements(CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCorsElement()) { + composeBoolean("cors", element.getCorsElement()); + } + if (element.hasService()) { + for (CodeableConcept e : element.getService()) + composeCodeableConcept("service", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasCertificate()) { + for (CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent e : element.getCertificate()) + composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent("certificate", e); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponentElements(CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasBlobElement()) { + composeBase64Binary("blob", element.getBlobElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(String name, CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementRestResourceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceComponentElements(CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + if (element.hasDocumentationElement()) { + composeMarkdown("documentation", element.getDocumentationElement()); + } + if (element.hasInteraction()) { + for (CapabilityStatement.ResourceInteractionComponent e : element.getInteraction()) + composeCapabilityStatementResourceInteractionComponent("interaction", e); + } + if (element.hasVersioningElement()) + composeEnumeration("versioning", element.getVersioningElement(), new CapabilityStatement.ResourceVersionPolicyEnumFactory()); + if (element.hasReadHistoryElement()) { + composeBoolean("readHistory", element.getReadHistoryElement()); + } + if (element.hasUpdateCreateElement()) { + composeBoolean("updateCreate", element.getUpdateCreateElement()); + } + if (element.hasConditionalCreateElement()) { + composeBoolean("conditionalCreate", element.getConditionalCreateElement()); + } + if (element.hasConditionalReadElement()) + composeEnumeration("conditionalRead", element.getConditionalReadElement(), new CapabilityStatement.ConditionalReadStatusEnumFactory()); + if (element.hasConditionalUpdateElement()) { + composeBoolean("conditionalUpdate", element.getConditionalUpdateElement()); + } + if (element.hasConditionalDeleteElement()) + composeEnumeration("conditionalDelete", element.getConditionalDeleteElement(), new CapabilityStatement.ConditionalDeleteStatusEnumFactory()); + if (element.hasReferencePolicy()) + for (Enumeration e : element.getReferencePolicy()) + composeEnumeration("referencePolicy", e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory()); + if (element.hasSearchInclude()) { + for (StringType e : element.getSearchInclude()) + composeString("searchInclude", e); + } + if (element.hasSearchRevInclude()) { + for (StringType e : element.getSearchRevInclude()) + composeString("searchRevInclude", e); + } + if (element.hasSearchParam()) { + for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent("searchParam", e); + } + } + + protected void composeCapabilityStatementResourceInteractionComponent(String name, CapabilityStatement.ResourceInteractionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementResourceInteractionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementResourceInteractionComponentElements(CapabilityStatement.ResourceInteractionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(String name, CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentElements(CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDefinitionElement()) { + composeUri("definition", element.getDefinitionElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeCapabilityStatementSystemInteractionComponent(String name, CapabilityStatement.SystemInteractionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementSystemInteractionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementSystemInteractionComponentElements(CapabilityStatement.SystemInteractionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new CapabilityStatement.SystemRestfulInteractionEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestOperationComponent(String name, CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementRestOperationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementRestOperationComponentElements(CapabilityStatement.CapabilityStatementRestOperationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingComponent(String name, CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementMessagingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingComponentElements(CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasEndpoint()) { + for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint()) + composeCapabilityStatementCapabilityStatementMessagingEndpointComponent("endpoint", e); + } + if (element.hasReliableCacheElement()) { + composeUnsignedInt("reliableCache", element.getReliableCacheElement()); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + if (element.hasSupportedMessage()) { + for (CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent e : element.getSupportedMessage()) + composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent("supportedMessage", e); + } + if (element.hasEvent()) { + for (CapabilityStatement.CapabilityStatementMessagingEventComponent e : element.getEvent()) + composeCapabilityStatementCapabilityStatementMessagingEventComponent("event", e); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(String name, CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementMessagingEndpointComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponentElements(CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasProtocol()) { + composeCoding("protocol", element.getProtocol()); + } + if (element.hasAddressElement()) { + composeUri("address", element.getAddressElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(String name, CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentElements(CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory()); + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEventComponent(String name, CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementMessagingEventComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementMessagingEventComponentElements(CapabilityStatement.CapabilityStatementMessagingEventComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCoding("code", element.getCode()); + } + if (element.hasCategoryElement()) + composeEnumeration("category", element.getCategoryElement(), new CapabilityStatement.MessageSignificanceCategoryEnumFactory()); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory()); + if (element.hasFocusElement()) { + composeCode("focus", element.getFocusElement()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeCapabilityStatementCapabilityStatementDocumentComponent(String name, CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCapabilityStatementCapabilityStatementDocumentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCapabilityStatementCapabilityStatementDocumentComponentElements(CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + } + + protected void composeCarePlan(String name, CarePlan element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCarePlanElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCarePlanElements(CarePlan element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasReplaces()) { + for (Reference e : element.getReplaces()) + composeReference("replaces", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory()); + if (element.hasIntentElement()) + composeEnumeration("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasAuthor()) { + for (Reference e : element.getAuthor()) + composeReference("author", e); + } + if (element.hasCareTeam()) { + for (Reference e : element.getCareTeam()) + composeReference("careTeam", e); + } + if (element.hasAddresses()) { + for (Reference e : element.getAddresses()) + composeReference("addresses", e); + } + if (element.hasSupportingInfo()) { + for (Reference e : element.getSupportingInfo()) + composeReference("supportingInfo", e); + } + if (element.hasGoal()) { + for (Reference e : element.getGoal()) + composeReference("goal", e); + } + if (element.hasActivity()) { + for (CarePlan.CarePlanActivityComponent e : element.getActivity()) + composeCarePlanCarePlanActivityComponent("activity", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeCarePlanCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCarePlanCarePlanActivityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCarePlanCarePlanActivityComponentElements(CarePlan.CarePlanActivityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOutcomeCodeableConcept()) { + for (CodeableConcept e : element.getOutcomeCodeableConcept()) + composeCodeableConcept("outcomeCodeableConcept", e); + } + if (element.hasOutcomeReference()) { + for (Reference e : element.getOutcomeReference()) + composeReference("outcomeReference", e); + } + if (element.hasProgress()) { + for (Annotation e : element.getProgress()) + composeAnnotation("progress", e); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + if (element.hasDetail()) { + composeCarePlanCarePlanActivityDetailComponent("detail", element.getDetail()); + } + } + + protected void composeCarePlanCarePlanActivityDetailComponent(String name, CarePlan.CarePlanActivityDetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCarePlanCarePlanActivityDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCarePlanCarePlanActivityDetailComponentElements(CarePlan.CarePlanActivityDetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new CarePlan.CarePlanActivityKindEnumFactory()); + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasGoal()) { + for (Reference e : element.getGoal()) + composeReference("goal", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory()); + if (element.hasStatusReasonElement()) { + composeString("statusReason", element.getStatusReasonElement()); + } + if (element.hasProhibitedElement()) { + composeBoolean("prohibited", element.getProhibitedElement()); + } + if (element.hasScheduled()) { + composeType("scheduled", element.getScheduled()); + } if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasPerformer()) { + for (Reference e : element.getPerformer()) + composeReference("performer", e); + } + if (element.hasProduct()) { + composeType("product", element.getProduct()); + } if (element.hasDailyAmount()) { + composeSimpleQuantity("dailyAmount", element.getDailyAmount()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + } + + protected void composeCareTeam(String name, CareTeam element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCareTeamElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCareTeamElements(CareTeam element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasParticipant()) { + for (CareTeam.CareTeamParticipantComponent e : element.getParticipant()) + composeCareTeamCareTeamParticipantComponent("participant", e); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasManagingOrganization()) { + for (Reference e : element.getManagingOrganization()) + composeReference("managingOrganization", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeCareTeamCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCareTeamCareTeamParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCareTeamCareTeamParticipantComponentElements(CareTeam.CareTeamParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasMember()) { + composeReference("member", element.getMember()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeCatalogEntry(String name, CatalogEntry element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCatalogEntryElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCatalogEntryElements(CatalogEntry element) throws IOException { + composeDomainResourceElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasPurpose()) { + composeCodeableConcept("purpose", element.getPurpose()); + } + if (element.hasReferencedItem()) { + composeReference("referencedItem", element.getReferencedItem()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasAdditionalIdentifier()) { + for (Identifier e : element.getAdditionalIdentifier()) + composeIdentifier("additionalIdentifier", e); + } + if (element.hasClassification()) { + for (Identifier e : element.getClassification()) + composeIdentifier("classification", e); + } + if (element.hasStatus()) { + composeCodeableConcept("status", element.getStatus()); + } + if (element.hasValidityPeriod()) { + composePeriod("validityPeriod", element.getValidityPeriod()); + } + if (element.hasLastUpdatedElement()) { + composeDateTime("lastUpdated", element.getLastUpdatedElement()); + } + if (element.hasAdditionalCharacteristic()) { + for (CodeableConcept e : element.getAdditionalCharacteristic()) + composeCodeableConcept("additionalCharacteristic", e); + } + if (element.hasAdditionalClassification()) { + for (CodeableConcept e : element.getAdditionalClassification()) + composeCodeableConcept("additionalClassification", e); + } + if (element.hasRelatedItem()) { + for (CatalogEntry.CatalogEntryRelatedItemComponent e : element.getRelatedItem()) + composeCatalogEntryCatalogEntryRelatedItemComponent("relatedItem", e); + } + } + + protected void composeCatalogEntryCatalogEntryRelatedItemComponent(String name, CatalogEntry.CatalogEntryRelatedItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCatalogEntryCatalogEntryRelatedItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCatalogEntryCatalogEntryRelatedItemComponentElements(CatalogEntry.CatalogEntryRelatedItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRelationtype()) { + composeCodeableConcept("relationtype", element.getRelationtype()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasItem()) { + composeReference("item", element.getItem()); + } + } + + protected void composeChargeItem(String name, ChargeItem element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeChargeItemElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeChargeItemElements(ChargeItem element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasDefinition()) { + for (UriType e : element.getDefinition()) + composeUri("definition", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory()); + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasParticipant()) { + for (ChargeItem.ChargeItemParticipantComponent e : element.getParticipant()) + composeChargeItemChargeItemParticipantComponent("participant", e); + } + if (element.hasPerformingOrganization()) { + composeReference("performingOrganization", element.getPerformingOrganization()); + } + if (element.hasRequestingOrganization()) { + composeReference("requestingOrganization", element.getRequestingOrganization()); + } + if (element.hasQuantity()) { + composeQuantity("quantity", element.getQuantity()); + } + if (element.hasBodysite()) { + for (CodeableConcept e : element.getBodysite()) + composeCodeableConcept("bodysite", e); + } + if (element.hasFactorOverrideElement()) { + composeDecimal("factorOverride", element.getFactorOverrideElement()); + } + if (element.hasPriceOverride()) { + composeMoney("priceOverride", element.getPriceOverride()); + } + if (element.hasOverrideReasonElement()) { + composeString("overrideReason", element.getOverrideReasonElement()); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasEnteredDateElement()) { + composeDateTime("enteredDate", element.getEnteredDateElement()); + } + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasService()) { + for (Reference e : element.getService()) + composeReference("service", e); + } + if (element.hasAccount()) { + for (Reference e : element.getAccount()) + composeReference("account", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasSupportingInformation()) { + for (Reference e : element.getSupportingInformation()) + composeReference("supportingInformation", e); + } + } + + protected void composeChargeItemChargeItemParticipantComponent(String name, ChargeItem.ChargeItemParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeChargeItemChargeItemParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeChargeItemChargeItemParticipantComponentElements(ChargeItem.ChargeItemParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + } + + protected void composeClaim(String name, Claim element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimElements(Claim element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + for (CodeableConcept e : element.getSubType()) + composeCodeableConcept("subType", e); + } + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new Claim.UseEnumFactory()); + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasBillablePeriod()) { + composePeriod("billablePeriod", element.getBillablePeriod()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasFundsReserve()) { + composeCodeableConcept("fundsReserve", element.getFundsReserve()); + } + if (element.hasRelated()) { + for (Claim.RelatedClaimComponent e : element.getRelated()) + composeClaimRelatedClaimComponent("related", e); + } + if (element.hasPrescription()) { + composeReference("prescription", element.getPrescription()); + } + if (element.hasOriginalPrescription()) { + composeReference("originalPrescription", element.getOriginalPrescription()); + } + if (element.hasPayee()) { + composeClaimPayeeComponent("payee", element.getPayee()); + } + if (element.hasReferral()) { + composeReference("referral", element.getReferral()); + } + if (element.hasFacility()) { + composeReference("facility", element.getFacility()); + } + if (element.hasCareTeam()) { + for (Claim.CareTeamComponent e : element.getCareTeam()) + composeClaimCareTeamComponent("careTeam", e); + } + if (element.hasInformation()) { + for (Claim.SpecialConditionComponent e : element.getInformation()) + composeClaimSpecialConditionComponent("information", e); + } + if (element.hasDiagnosis()) { + for (Claim.DiagnosisComponent e : element.getDiagnosis()) + composeClaimDiagnosisComponent("diagnosis", e); + } + if (element.hasProcedure()) { + for (Claim.ProcedureComponent e : element.getProcedure()) + composeClaimProcedureComponent("procedure", e); + } + if (element.hasInsurance()) { + for (Claim.InsuranceComponent e : element.getInsurance()) + composeClaimInsuranceComponent("insurance", e); + } + if (element.hasAccident()) { + composeClaimAccidentComponent("accident", element.getAccident()); + } + if (element.hasEmploymentImpacted()) { + composePeriod("employmentImpacted", element.getEmploymentImpacted()); + } + if (element.hasHospitalization()) { + composePeriod("hospitalization", element.getHospitalization()); + } + if (element.hasItem()) { + for (Claim.ItemComponent e : element.getItem()) + composeClaimItemComponent("item", e); + } + if (element.hasTotal()) { + composeMoney("total", element.getTotal()); + } + } + + protected void composeClaimRelatedClaimComponent(String name, Claim.RelatedClaimComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimRelatedClaimComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimRelatedClaimComponentElements(Claim.RelatedClaimComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasClaim()) { + composeReference("claim", element.getClaim()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasReference()) { + composeIdentifier("reference", element.getReference()); + } + } + + protected void composeClaimPayeeComponent(String name, Claim.PayeeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimPayeeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimPayeeComponentElements(Claim.PayeeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasResource()) { + composeCoding("resource", element.getResource()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + } + + protected void composeClaimCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimCareTeamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimCareTeamComponentElements(Claim.CareTeamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasResponsibleElement()) { + composeBoolean("responsible", element.getResponsibleElement()); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasQualification()) { + composeCodeableConcept("qualification", element.getQualification()); + } + } + + protected void composeClaimSpecialConditionComponent(String name, Claim.SpecialConditionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimSpecialConditionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimSpecialConditionComponentElements(Claim.SpecialConditionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + } + + protected void composeClaimDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimDiagnosisComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimDiagnosisComponentElements(Claim.DiagnosisComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasDiagnosis()) { + composeType("diagnosis", element.getDiagnosis()); + } if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasPackageCode()) { + composeCodeableConcept("packageCode", element.getPackageCode()); + } + } + + protected void composeClaimProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimProcedureComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimProcedureComponentElements(Claim.ProcedureComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasProcedure()) { + composeType("procedure", element.getProcedure()); + } } + + protected void composeClaimInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimInsuranceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimInsuranceComponentElements(Claim.InsuranceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasFocalElement()) { + composeBoolean("focal", element.getFocalElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasBusinessArrangementElement()) { + composeString("businessArrangement", element.getBusinessArrangementElement()); + } + if (element.hasPreAuthRef()) { + for (StringType e : element.getPreAuthRef()) + composeString("preAuthRef", e); + } + if (element.hasClaimResponse()) { + composeReference("claimResponse", element.getClaimResponse()); + } + } + + protected void composeClaimAccidentComponent(String name, Claim.AccidentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimAccidentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimAccidentComponentElements(Claim.AccidentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDateElement()) { + composeDate("date", element.getDateElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLocation()) { + composeType("location", element.getLocation()); + } } + + protected void composeClaimItemComponent(String name, Claim.ItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimItemComponentElements(Claim.ItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasCareTeamLinkId()) { + for (PositiveIntType e : element.getCareTeamLinkId()) + composePositiveInt("careTeamLinkId", e); + } + if (element.hasDiagnosisLinkId()) { + for (PositiveIntType e : element.getDiagnosisLinkId()) + composePositiveInt("diagnosisLinkId", e); + } + if (element.hasProcedureLinkId()) { + for (PositiveIntType e : element.getProcedureLinkId()) + composePositiveInt("procedureLinkId", e); + } + if (element.hasInformationLinkId()) { + for (PositiveIntType e : element.getInformationLinkId()) + composePositiveInt("informationLinkId", e); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasProgramCode()) { + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept("programCode", e); + } + if (element.hasServiced()) { + composeType("serviced", element.getServiced()); + } if (element.hasLocation()) { + composeType("location", element.getLocation()); + } if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + for (Reference e : element.getUdi()) + composeReference("udi", e); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasSubSite()) { + for (CodeableConcept e : element.getSubSite()) + composeCodeableConcept("subSite", e); + } + if (element.hasEncounter()) { + for (Reference e : element.getEncounter()) + composeReference("encounter", e); + } + if (element.hasDetail()) { + for (Claim.DetailComponent e : element.getDetail()) + composeClaimDetailComponent("detail", e); + } + } + + protected void composeClaimDetailComponent(String name, Claim.DetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimDetailComponentElements(Claim.DetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasProgramCode()) { + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept("programCode", e); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + for (Reference e : element.getUdi()) + composeReference("udi", e); + } + if (element.hasSubDetail()) { + for (Claim.SubDetailComponent e : element.getSubDetail()) + composeClaimSubDetailComponent("subDetail", e); + } + } + + protected void composeClaimSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimSubDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimSubDetailComponentElements(Claim.SubDetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasProgramCode()) { + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept("programCode", e); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + for (Reference e : element.getUdi()) + composeReference("udi", e); + } + } + + protected void composeClaimResponse(String name, ClaimResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseElements(ClaimResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory()); + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new ClaimResponse.RemittanceOutcomeEnumFactory()); + if (element.hasDispositionElement()) { + composeString("disposition", element.getDispositionElement()); + } + if (element.hasPayeeType()) { + composeCodeableConcept("payeeType", element.getPayeeType()); + } + if (element.hasItem()) { + for (ClaimResponse.ItemComponent e : element.getItem()) + composeClaimResponseItemComponent("item", e); + } + if (element.hasAddItem()) { + for (ClaimResponse.AddedItemComponent e : element.getAddItem()) + composeClaimResponseAddedItemComponent("addItem", e); + } + if (element.hasError()) { + for (ClaimResponse.ErrorComponent e : element.getError()) + composeClaimResponseErrorComponent("error", e); + } + if (element.hasTotalCost()) { + composeMoney("totalCost", element.getTotalCost()); + } + if (element.hasUnallocDeductable()) { + composeMoney("unallocDeductable", element.getUnallocDeductable()); + } + if (element.hasTotalBenefit()) { + composeMoney("totalBenefit", element.getTotalBenefit()); + } + if (element.hasPayment()) { + composeClaimResponsePaymentComponent("payment", element.getPayment()); + } + if (element.hasReserved()) { + composeCoding("reserved", element.getReserved()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasProcessNote()) { + for (ClaimResponse.NoteComponent e : element.getProcessNote()) + composeClaimResponseNoteComponent("processNote", e); + } + if (element.hasCommunicationRequest()) { + for (Reference e : element.getCommunicationRequest()) + composeReference("communicationRequest", e); + } + if (element.hasInsurance()) { + for (ClaimResponse.InsuranceComponent e : element.getInsurance()) + composeClaimResponseInsuranceComponent("insurance", e); + } + } + + protected void composeClaimResponseItemComponent(String name, ClaimResponse.ItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseItemComponentElements(ClaimResponse.ItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent("adjudication", e); + } + if (element.hasDetail()) { + for (ClaimResponse.ItemDetailComponent e : element.getDetail()) + composeClaimResponseItemDetailComponent("detail", e); + } + } + + protected void composeClaimResponseAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseAdjudicationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseAdjudicationComponentElements(ClaimResponse.AdjudicationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasValueElement()) { + composeDecimal("value", element.getValueElement()); + } + } + + protected void composeClaimResponseItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseItemDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseItemDetailComponentElements(ClaimResponse.ItemDetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent("adjudication", e); + } + if (element.hasSubDetail()) { + for (ClaimResponse.SubDetailComponent e : element.getSubDetail()) + composeClaimResponseSubDetailComponent("subDetail", e); + } + } + + protected void composeClaimResponseSubDetailComponent(String name, ClaimResponse.SubDetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseSubDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseSubDetailComponentElements(ClaimResponse.SubDetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent("adjudication", e); + } + } + + protected void composeClaimResponseAddedItemComponent(String name, ClaimResponse.AddedItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseAddedItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseAddedItemComponentElements(ClaimResponse.AddedItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkId()) { + for (PositiveIntType e : element.getSequenceLinkId()) + composePositiveInt("sequenceLinkId", e); + } + if (element.hasDetailSequenceLinkId()) { + for (PositiveIntType e : element.getDetailSequenceLinkId()) + composePositiveInt("detailSequenceLinkId", e); + } + if (element.hasSubdetailSequenceLinkId()) { + for (PositiveIntType e : element.getSubdetailSequenceLinkId()) + composePositiveInt("subdetailSequenceLinkId", e); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasFee()) { + composeMoney("fee", element.getFee()); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) + composeClaimResponseAdjudicationComponent("adjudication", e); + } + } + + protected void composeClaimResponseErrorComponent(String name, ClaimResponse.ErrorComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseErrorComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseErrorComponentElements(ClaimResponse.ErrorComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkIdElement()) { + composePositiveInt("sequenceLinkId", element.getSequenceLinkIdElement()); + } + if (element.hasDetailSequenceLinkIdElement()) { + composePositiveInt("detailSequenceLinkId", element.getDetailSequenceLinkIdElement()); + } + if (element.hasSubdetailSequenceLinkIdElement()) { + composePositiveInt("subdetailSequenceLinkId", element.getSubdetailSequenceLinkIdElement()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + } + + protected void composeClaimResponsePaymentComponent(String name, ClaimResponse.PaymentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponsePaymentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponsePaymentComponentElements(ClaimResponse.PaymentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAdjustment()) { + composeMoney("adjustment", element.getAdjustment()); + } + if (element.hasAdjustmentReason()) { + composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); + } + if (element.hasDateElement()) { + composeDate("date", element.getDateElement()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + } + + protected void composeClaimResponseNoteComponent(String name, ClaimResponse.NoteComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseNoteComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseNoteComponentElements(ClaimResponse.NoteComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNumberElement()) { + composePositiveInt("number", element.getNumberElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasLanguage()) { + composeCodeableConcept("language", element.getLanguage()); + } + } + + protected void composeClaimResponseInsuranceComponent(String name, ClaimResponse.InsuranceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClaimResponseInsuranceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClaimResponseInsuranceComponentElements(ClaimResponse.InsuranceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasFocalElement()) { + composeBoolean("focal", element.getFocalElement()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasBusinessArrangementElement()) { + composeString("businessArrangement", element.getBusinessArrangementElement()); + } + if (element.hasPreAuthRef()) { + for (StringType e : element.getPreAuthRef()) + composeString("preAuthRef", e); + } + if (element.hasClaimResponse()) { + composeReference("claimResponse", element.getClaimResponse()); + } + } + + protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeClinicalImpressionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClinicalImpressionElements(ClinicalImpression element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ClinicalImpression.ClinicalImpressionStatusEnumFactory()); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasAssessor()) { + composeReference("assessor", element.getAssessor()); + } + if (element.hasPrevious()) { + composeReference("previous", element.getPrevious()); + } + if (element.hasProblem()) { + for (Reference e : element.getProblem()) + composeReference("problem", e); + } + if (element.hasInvestigation()) { + for (ClinicalImpression.ClinicalImpressionInvestigationComponent e : element.getInvestigation()) + composeClinicalImpressionClinicalImpressionInvestigationComponent("investigation", e); + } + if (element.hasProtocol()) { + for (UriType e : element.getProtocol()) + composeUri("protocol", e); + } + if (element.hasSummaryElement()) { + composeString("summary", element.getSummaryElement()); + } + if (element.hasFinding()) { + for (ClinicalImpression.ClinicalImpressionFindingComponent e : element.getFinding()) + composeClinicalImpressionClinicalImpressionFindingComponent("finding", e); + } + if (element.hasPrognosisCodeableConcept()) { + for (CodeableConcept e : element.getPrognosisCodeableConcept()) + composeCodeableConcept("prognosisCodeableConcept", e); + } + if (element.hasPrognosisReference()) { + for (Reference e : element.getPrognosisReference()) + composeReference("prognosisReference", e); + } + if (element.hasAction()) { + for (Reference e : element.getAction()) + composeReference("action", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(String name, ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClinicalImpressionClinicalImpressionInvestigationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClinicalImpressionClinicalImpressionInvestigationComponentElements(ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasItem()) { + for (Reference e : element.getItem()) + composeReference("item", e); + } + } + + protected void composeClinicalImpressionClinicalImpressionFindingComponent(String name, ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeClinicalImpressionClinicalImpressionFindingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeClinicalImpressionClinicalImpressionFindingComponentElements(ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasItem()) { + composeType("item", element.getItem()); + } if (element.hasBasisElement()) { + composeString("basis", element.getBasisElement()); + } + } + + protected void composeCodeSystem(String name, CodeSystem element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeSystemElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeSystemElements(CodeSystem element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasCaseSensitiveElement()) { + composeBoolean("caseSensitive", element.getCaseSensitiveElement()); + } + if (element.hasValueSetElement()) { + composeUri("valueSet", element.getValueSetElement()); + } + if (element.hasHierarchyMeaningElement()) + composeEnumeration("hierarchyMeaning", element.getHierarchyMeaningElement(), new CodeSystem.CodeSystemHierarchyMeaningEnumFactory()); + if (element.hasCompositionalElement()) { + composeBoolean("compositional", element.getCompositionalElement()); + } + if (element.hasVersionNeededElement()) { + composeBoolean("versionNeeded", element.getVersionNeededElement()); + } + if (element.hasContentElement()) + composeEnumeration("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory()); + if (element.hasCountElement()) { + composeUnsignedInt("count", element.getCountElement()); + } + if (element.hasFilter()) { + for (CodeSystem.CodeSystemFilterComponent e : element.getFilter()) + composeCodeSystemCodeSystemFilterComponent("filter", e); + } + if (element.hasProperty()) { + for (CodeSystem.PropertyComponent e : element.getProperty()) + composeCodeSystemPropertyComponent("property", e); + } + if (element.hasConcept()) { + for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) + composeCodeSystemConceptDefinitionComponent("concept", e); + } + } + + protected void composeCodeSystemCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeSystemCodeSystemFilterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeSystemCodeSystemFilterComponentElements(CodeSystem.CodeSystemFilterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasOperator()) + for (Enumeration e : element.getOperator()) + composeEnumeration("operator", e, new CodeSystem.FilterOperatorEnumFactory()); + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeCodeSystemPropertyComponent(String name, CodeSystem.PropertyComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeSystemPropertyComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeSystemPropertyComponentElements(CodeSystem.PropertyComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasUriElement()) { + composeUri("uri", element.getUriElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory()); + } + + protected void composeCodeSystemConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeSystemConceptDefinitionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeSystemConceptDefinitionComponentElements(CodeSystem.ConceptDefinitionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasDefinitionElement()) { + composeString("definition", element.getDefinitionElement()); + } + if (element.hasDesignation()) { + for (CodeSystem.ConceptDefinitionDesignationComponent e : element.getDesignation()) + composeCodeSystemConceptDefinitionDesignationComponent("designation", e); + } + if (element.hasProperty()) { + for (CodeSystem.ConceptPropertyComponent e : element.getProperty()) + composeCodeSystemConceptPropertyComponent("property", e); + } + if (element.hasConcept()) { + for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) + composeCodeSystemConceptDefinitionComponent("concept", e); + } + } + + protected void composeCodeSystemConceptDefinitionDesignationComponent(String name, CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeSystemConceptDefinitionDesignationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeSystemConceptDefinitionDesignationComponentElements(CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeCodeSystemConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCodeSystemConceptPropertyComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCodeSystemConceptPropertyComponentElements(CodeSystem.ConceptPropertyComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeCommunication(String name, Communication element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCommunicationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCommunicationElements(Communication element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasInResponseTo()) { + for (Reference e : element.getInResponseTo()) + composeReference("inResponseTo", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory()); + if (element.hasNotDoneElement()) { + composeBoolean("notDone", element.getNotDoneElement()); + } + if (element.hasNotDoneReason()) { + composeCodeableConcept("notDoneReason", element.getNotDoneReason()); + } + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new Communication.CommunicationPriorityEnumFactory()); + if (element.hasMedium()) { + for (CodeableConcept e : element.getMedium()) + composeCodeableConcept("medium", e); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasRecipient()) { + for (Reference e : element.getRecipient()) + composeReference("recipient", e); + } + if (element.hasTopic()) { + for (Reference e : element.getTopic()) + composeReference("topic", e); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSentElement()) { + composeDateTime("sent", element.getSentElement()); + } + if (element.hasReceivedElement()) { + composeDateTime("received", element.getReceivedElement()); + } + if (element.hasSender()) { + composeReference("sender", element.getSender()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasPayload()) { + for (Communication.CommunicationPayloadComponent e : element.getPayload()) + composeCommunicationCommunicationPayloadComponent("payload", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeCommunicationCommunicationPayloadComponent(String name, Communication.CommunicationPayloadComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCommunicationCommunicationPayloadComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCommunicationCommunicationPayloadComponentElements(Communication.CommunicationPayloadComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } } + + protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCommunicationRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCommunicationRequestElements(CommunicationRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasReplaces()) { + for (Reference e : element.getReplaces()) + composeReference("replaces", e); + } + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new CommunicationRequest.CommunicationRequestStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new CommunicationRequest.CommunicationPriorityEnumFactory()); + if (element.hasMedium()) { + for (CodeableConcept e : element.getMedium()) + composeCodeableConcept("medium", e); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasRecipient()) { + for (Reference e : element.getRecipient()) + composeReference("recipient", e); + } + if (element.hasTopic()) { + for (Reference e : element.getTopic()) + composeReference("topic", e); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPayload()) { + for (CommunicationRequest.CommunicationRequestPayloadComponent e : element.getPayload()) + composeCommunicationRequestCommunicationRequestPayloadComponent("payload", e); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasSender()) { + composeReference("sender", element.getSender()); + } + if (element.hasRequester()) { + composeCommunicationRequestCommunicationRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeCommunicationRequestCommunicationRequestPayloadComponent(String name, CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCommunicationRequestCommunicationRequestPayloadComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCommunicationRequestCommunicationRequestPayloadComponentElements(CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } } + + protected void composeCommunicationRequestCommunicationRequestRequesterComponent(String name, CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCommunicationRequestCommunicationRequestRequesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCommunicationRequestCommunicationRequestRequesterComponentElements(CommunicationRequest.CommunicationRequestRequesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCompartmentDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompartmentDefinitionElements(CompartmentDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory()); + if (element.hasSearchElement()) { + composeBoolean("search", element.getSearchElement()); + } + if (element.hasResource()) { + for (CompartmentDefinition.CompartmentDefinitionResourceComponent e : element.getResource()) + composeCompartmentDefinitionCompartmentDefinitionResourceComponent("resource", e); + } + } + + protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(String name, CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCompartmentDefinitionCompartmentDefinitionResourceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponentElements(CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasParam()) { + for (StringType e : element.getParam()) + composeString("param", e); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeComposition(String name, Composition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCompositionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompositionElements(Composition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasClass_()) { + composeCodeableConcept("class", element.getClass_()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasAuthor()) { + for (Reference e : element.getAuthor()) + composeReference("author", e); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasConfidentialityElement()) + composeEnumeration("confidentiality", element.getConfidentialityElement(), new Composition.DocumentConfidentialityEnumFactory()); + if (element.hasAttester()) { + for (Composition.CompositionAttesterComponent e : element.getAttester()) + composeCompositionCompositionAttesterComponent("attester", e); + } + if (element.hasCustodian()) { + composeReference("custodian", element.getCustodian()); + } + if (element.hasRelatesTo()) { + for (Composition.CompositionRelatesToComponent e : element.getRelatesTo()) + composeCompositionCompositionRelatesToComponent("relatesTo", e); + } + if (element.hasEvent()) { + for (Composition.CompositionEventComponent e : element.getEvent()) + composeCompositionCompositionEventComponent("event", e); + } + if (element.hasSection()) { + for (Composition.SectionComponent e : element.getSection()) + composeCompositionSectionComponent("section", e); + } + } + + protected void composeCompositionCompositionAttesterComponent(String name, Composition.CompositionAttesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCompositionCompositionAttesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompositionCompositionAttesterComponentElements(Composition.CompositionAttesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMode()) + for (Enumeration e : element.getMode()) + composeEnumeration("mode", e, new Composition.CompositionAttestationModeEnumFactory()); + if (element.hasTimeElement()) { + composeDateTime("time", element.getTimeElement()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + } + + protected void composeCompositionCompositionRelatesToComponent(String name, Composition.CompositionRelatesToComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCompositionCompositionRelatesToComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompositionCompositionRelatesToComponentElements(Composition.CompositionRelatesToComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory()); + if (element.hasTarget()) { + composeType("target", element.getTarget()); + } } + + protected void composeCompositionCompositionEventComponent(String name, Composition.CompositionEventComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCompositionCompositionEventComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompositionCompositionEventComponentElements(Composition.CompositionEventComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + for (CodeableConcept e : element.getCode()) + composeCodeableConcept("code", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasDetail()) { + for (Reference e : element.getDetail()) + composeReference("detail", e); + } + } + + protected void composeCompositionSectionComponent(String name, Composition.SectionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCompositionSectionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCompositionSectionComponentElements(Composition.SectionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasText()) { + composeNarrative("text", element.getText()); + } + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new Composition.SectionModeEnumFactory()); + if (element.hasOrderedBy()) { + composeCodeableConcept("orderedBy", element.getOrderedBy()); + } + if (element.hasEntry()) { + for (Reference e : element.getEntry()) + composeReference("entry", e); + } + if (element.hasEmptyReason()) { + composeCodeableConcept("emptyReason", element.getEmptyReason()); + } + if (element.hasSection()) { + for (Composition.SectionComponent e : element.getSection()) + composeCompositionSectionComponent("section", e); + } + } + + protected void composeConceptMap(String name, ConceptMap element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeConceptMapElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConceptMapElements(ConceptMap element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasSource()) { + composeType("source", element.getSource()); + } if (element.hasTarget()) { + composeType("target", element.getTarget()); + } if (element.hasGroup()) { + for (ConceptMap.ConceptMapGroupComponent e : element.getGroup()) + composeConceptMapConceptMapGroupComponent("group", e); + } + } + + protected void composeConceptMapConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConceptMapConceptMapGroupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConceptMapConceptMapGroupComponentElements(ConceptMap.ConceptMapGroupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSourceElement()) { + composeUri("source", element.getSourceElement()); + } + if (element.hasSourceVersionElement()) { + composeString("sourceVersion", element.getSourceVersionElement()); + } + if (element.hasTargetElement()) { + composeUri("target", element.getTargetElement()); + } + if (element.hasTargetVersionElement()) { + composeString("targetVersion", element.getTargetVersionElement()); + } + if (element.hasElement()) { + for (ConceptMap.SourceElementComponent e : element.getElement()) + composeConceptMapSourceElementComponent("element", e); + } + if (element.hasUnmapped()) { + composeConceptMapConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped()); + } + } + + protected void composeConceptMapSourceElementComponent(String name, ConceptMap.SourceElementComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConceptMapSourceElementComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConceptMapSourceElementComponentElements(ConceptMap.SourceElementComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasTarget()) { + for (ConceptMap.TargetElementComponent e : element.getTarget()) + composeConceptMapTargetElementComponent("target", e); + } + } + + protected void composeConceptMapTargetElementComponent(String name, ConceptMap.TargetElementComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConceptMapTargetElementComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConceptMapTargetElementComponentElements(ConceptMap.TargetElementComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasEquivalenceElement()) + composeEnumeration("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory()); + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasDependsOn()) { + for (ConceptMap.OtherElementComponent e : element.getDependsOn()) + composeConceptMapOtherElementComponent("dependsOn", e); + } + if (element.hasProduct()) { + for (ConceptMap.OtherElementComponent e : element.getProduct()) + composeConceptMapOtherElementComponent("product", e); + } + } + + protected void composeConceptMapOtherElementComponent(String name, ConceptMap.OtherElementComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConceptMapOtherElementComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConceptMapOtherElementComponentElements(ConceptMap.OtherElementComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPropertyElement()) { + composeUri("property", element.getPropertyElement()); + } + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasCodeElement()) { + composeString("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + } + + protected void composeConceptMapConceptMapGroupUnmappedComponent(String name, ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConceptMapConceptMapGroupUnmappedComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConceptMapConceptMapGroupUnmappedComponentElements(ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory()); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + } + + protected void composeCondition(String name, Condition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeConditionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConditionElements(Condition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasClinicalStatusElement()) + composeEnumeration("clinicalStatus", element.getClinicalStatusElement(), new Condition.ConditionClinicalStatusEnumFactory()); + if (element.hasVerificationStatusElement()) + composeEnumeration("verificationStatus", element.getVerificationStatusElement(), new Condition.ConditionVerificationStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasSeverity()) { + composeCodeableConcept("severity", element.getSeverity()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasBodySite()) { + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept("bodySite", e); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOnset()) { + composeType("onset", element.getOnset()); + } if (element.hasAbatement()) { + composeType("abatement", element.getAbatement()); + } if (element.hasAssertedDateElement()) { + composeDateTime("assertedDate", element.getAssertedDateElement()); + } + if (element.hasAsserter()) { + composeReference("asserter", element.getAsserter()); + } + if (element.hasStage()) { + for (Condition.ConditionStageComponent e : element.getStage()) + composeConditionConditionStageComponent("stage", e); + } + if (element.hasEvidence()) { + for (Condition.ConditionEvidenceComponent e : element.getEvidence()) + composeConditionConditionEvidenceComponent("evidence", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeConditionConditionStageComponent(String name, Condition.ConditionStageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConditionConditionStageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConditionConditionStageComponentElements(Condition.ConditionStageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSummary()) { + composeCodeableConcept("summary", element.getSummary()); + } + if (element.hasAssessment()) { + for (Reference e : element.getAssessment()) + composeReference("assessment", e); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + } + + protected void composeConditionConditionEvidenceComponent(String name, Condition.ConditionEvidenceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConditionConditionEvidenceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConditionConditionEvidenceComponentElements(Condition.ConditionEvidenceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + for (CodeableConcept e : element.getCode()) + composeCodeableConcept("code", e); + } + if (element.hasDetail()) { + for (Reference e : element.getDetail()) + composeReference("detail", e); + } + } + + protected void composeConsent(String name, Consent element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeConsentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConsentElements(Consent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateTimeElement()) { + composeDateTime("dateTime", element.getDateTimeElement()); + } + if (element.hasConsentingParty()) { + for (Reference e : element.getConsentingParty()) + composeReference("consentingParty", e); + } + if (element.hasOrganization()) { + for (Reference e : element.getOrganization()) + composeReference("organization", e); + } + if (element.hasSource()) { + composeType("source", element.getSource()); + } if (element.hasPolicy()) { + for (Consent.ConsentPolicyComponent e : element.getPolicy()) + composeConsentConsentPolicyComponent("policy", e); + } + if (element.hasPolicyRule()) { + composeCodeableConcept("policyRule", element.getPolicyRule()); + } + if (element.hasVerification()) { + for (Consent.ConsentVerificationComponent e : element.getVerification()) + composeConsentConsentVerificationComponent("verification", e); + } + if (element.hasProvision()) { + for (Consent.provisionComponent e : element.getProvision()) + composeConsentprovisionComponent("provision", e); + } + } + + protected void composeConsentConsentPolicyComponent(String name, Consent.ConsentPolicyComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConsentConsentPolicyComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConsentConsentPolicyComponentElements(Consent.ConsentPolicyComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAuthorityElement()) { + composeUri("authority", element.getAuthorityElement()); + } + if (element.hasUriElement()) { + composeUri("uri", element.getUriElement()); + } + } + + protected void composeConsentConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConsentConsentVerificationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConsentConsentVerificationComponentElements(Consent.ConsentVerificationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasVerifiedElement()) { + composeBoolean("verified", element.getVerifiedElement()); + } + if (element.hasVerifiedWith()) { + composeReference("verifiedWith", element.getVerifiedWith()); + } + if (element.hasVerificationDateElement()) { + composeDateTime("verificationDate", element.getVerificationDateElement()); + } + } + + protected void composeConsentprovisionComponent(String name, Consent.provisionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConsentprovisionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConsentprovisionComponentElements(Consent.provisionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasActor()) { + for (Consent.provisionActorComponent e : element.getActor()) + composeConsentprovisionActorComponent("actor", e); + } + if (element.hasAction()) { + for (CodeableConcept e : element.getAction()) + composeCodeableConcept("action", e); + } + if (element.hasSecurityLabel()) { + for (Coding e : element.getSecurityLabel()) + composeCoding("securityLabel", e); + } + if (element.hasPurpose()) { + for (Coding e : element.getPurpose()) + composeCoding("purpose", e); + } + if (element.hasClass_()) { + for (Coding e : element.getClass_()) + composeCoding("class", e); + } + if (element.hasCode()) { + for (Coding e : element.getCode()) + composeCoding("code", e); + } + if (element.hasDataPeriod()) { + composePeriod("dataPeriod", element.getDataPeriod()); + } + if (element.hasData()) { + for (Consent.provisionDataComponent e : element.getData()) + composeConsentprovisionDataComponent("data", e); + } + if (element.hasProvision()) { + for (Consent.provisionComponent e : element.getProvision()) + composeConsentprovisionComponent("provision", e); + } + } + + protected void composeConsentprovisionActorComponent(String name, Consent.provisionActorComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConsentprovisionActorComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConsentprovisionActorComponentElements(Consent.provisionActorComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + } + + protected void composeConsentprovisionDataComponent(String name, Consent.provisionDataComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeConsentprovisionDataComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeConsentprovisionDataComponentElements(Consent.provisionDataComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMeaningElement()) + composeEnumeration("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory()); + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + } + + protected void composeContract(String name, Contract element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeContractElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractElements(Contract element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory()); + if (element.hasContentDerivative()) { + composeCodeableConcept("contentDerivative", element.getContentDerivative()); + } + if (element.hasIssuedElement()) { + composeDateTime("issued", element.getIssuedElement()); + } + if (element.hasApplies()) { + composePeriod("applies", element.getApplies()); + } + if (element.hasSubject()) { + for (Reference e : element.getSubject()) + composeReference("subject", e); + } + if (element.hasAuthority()) { + for (Reference e : element.getAuthority()) + composeReference("authority", e); + } + if (element.hasDomain()) { + for (Reference e : element.getDomain()) + composeReference("domain", e); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + for (CodeableConcept e : element.getSubType()) + composeCodeableConcept("subType", e); + } + if (element.hasTerm()) { + for (Contract.TermComponent e : element.getTerm()) + composeContractTermComponent("term", e); + } + if (element.hasSigner()) { + for (Contract.SignatoryComponent e : element.getSigner()) + composeContractSignatoryComponent("signer", e); + } + if (element.hasFriendly()) { + for (Contract.FriendlyLanguageComponent e : element.getFriendly()) + composeContractFriendlyLanguageComponent("friendly", e); + } + if (element.hasLegal()) { + for (Contract.LegalLanguageComponent e : element.getLegal()) + composeContractLegalLanguageComponent("legal", e); + } + if (element.hasRule()) { + composeContractComputableLanguageComponent("rule", element.getRule()); + } + if (element.hasLegallyBinding()) { + composeType("legallyBinding", element.getLegallyBinding()); + } } + + protected void composeContractTermComponent(String name, Contract.TermComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractTermComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractTermComponentElements(Contract.TermComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasIssuedElement()) { + composeDateTime("issued", element.getIssuedElement()); + } + if (element.hasApplies()) { + composePeriod("applies", element.getApplies()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + composeCodeableConcept("subType", element.getSubType()); + } + if (element.hasOffer()) { + composeContractContractOfferComponent("offer", element.getOffer()); + } + if (element.hasAsset()) { + for (Contract.ContractAssetComponent e : element.getAsset()) + composeContractContractAssetComponent("asset", e); + } + if (element.hasAgent()) { + for (Contract.AgentComponent e : element.getAgent()) + composeContractAgentComponent("agent", e); + } + if (element.hasAction()) { + for (CodeableConcept e : element.getAction()) + composeCodeableConcept("action", e); + } + if (element.hasActionReason()) { + for (CodeableConcept e : element.getActionReason()) + composeCodeableConcept("actionReason", e); + } + if (element.hasGroup()) { + for (Contract.TermComponent e : element.getGroup()) + composeContractTermComponent("group", e); + } + } + + protected void composeContractContractOfferComponent(String name, Contract.ContractOfferComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractContractOfferComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractContractOfferComponentElements(Contract.ContractOfferComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTopic()) { + composeReference("topic", element.getTopic()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasDecision()) { + composeCodeableConcept("decision", element.getDecision()); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasLinkIdElement()) { + composeString("linkId", element.getLinkIdElement()); + } + } + + protected void composeContractContractAssetComponent(String name, Contract.ContractAssetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractContractAssetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractContractAssetComponentElements(Contract.ContractAssetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasClass_()) { + composeCoding("class", element.getClass_()); + } + if (element.hasCode()) { + composeCoding("code", element.getCode()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasDataPeriod()) { + composePeriod("dataPeriod", element.getDataPeriod()); + } + if (element.hasData()) { + for (Contract.AssetDataComponent e : element.getData()) + composeContractAssetDataComponent("data", e); + } + if (element.hasValuedItem()) { + for (Contract.ValuedItemComponent e : element.getValuedItem()) + composeContractValuedItemComponent("valuedItem", e); + } + if (element.hasSecurityLabel()) { + for (Coding e : element.getSecurityLabel()) + composeCoding("securityLabel", e); + } + } + + protected void composeContractAssetDataComponent(String name, Contract.AssetDataComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractAssetDataComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractAssetDataComponentElements(Contract.AssetDataComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMeaningElement()) + composeEnumeration("meaning", element.getMeaningElement(), new Contract.ContractDataMeaningEnumFactory()); + if (element.hasReference()) { + composeReference("reference", element.getReference()); + } + } + + protected void composeContractValuedItemComponent(String name, Contract.ValuedItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractValuedItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractValuedItemComponentElements(Contract.ValuedItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasEntity()) { + composeType("entity", element.getEntity()); + } if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasEffectiveTimeElement()) { + composeDateTime("effectiveTime", element.getEffectiveTimeElement()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasPointsElement()) { + composeDecimal("points", element.getPointsElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + } + + protected void composeContractAgentComponent(String name, Contract.AgentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractAgentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractAgentComponentElements(Contract.AgentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasRole()) { + for (CodeableConcept e : element.getRole()) + composeCodeableConcept("role", e); + } + } + + protected void composeContractSignatoryComponent(String name, Contract.SignatoryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractSignatoryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractSignatoryComponentElements(Contract.SignatoryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + if (element.hasSignature()) { + for (Signature e : element.getSignature()) + composeSignature("signature", e); + } + } + + protected void composeContractFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractFriendlyLanguageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractFriendlyLanguageComponentElements(Contract.FriendlyLanguageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } } + + protected void composeContractLegalLanguageComponent(String name, Contract.LegalLanguageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractLegalLanguageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractLegalLanguageComponentElements(Contract.LegalLanguageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } } + + protected void composeContractComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeContractComputableLanguageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeContractComputableLanguageComponentElements(Contract.ComputableLanguageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContent()) { + composeType("content", element.getContent()); + } } + + protected void composeCoverage(String name, Coverage element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeCoverageElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCoverageElements(Coverage element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasPolicyHolder()) { + composeReference("policyHolder", element.getPolicyHolder()); + } + if (element.hasSubscriber()) { + composeReference("subscriber", element.getSubscriber()); + } + if (element.hasSubscriberIdElement()) { + composeString("subscriberId", element.getSubscriberIdElement()); + } + if (element.hasBeneficiary()) { + composeReference("beneficiary", element.getBeneficiary()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasPayor()) { + for (Reference e : element.getPayor()) + composeReference("payor", e); + } + if (element.hasGrouping()) { + composeCoverageGroupComponent("grouping", element.getGrouping()); + } + if (element.hasDependentElement()) { + composeString("dependent", element.getDependentElement()); + } + if (element.hasSequenceElement()) { + composeString("sequence", element.getSequenceElement()); + } + if (element.hasOrderElement()) { + composePositiveInt("order", element.getOrderElement()); + } + if (element.hasNetworkElement()) { + composeString("network", element.getNetworkElement()); + } + if (element.hasContract()) { + for (Reference e : element.getContract()) + composeReference("contract", e); + } + } + + protected void composeCoverageGroupComponent(String name, Coverage.GroupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeCoverageGroupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeCoverageGroupComponentElements(Coverage.GroupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasGroupElement()) { + composeString("group", element.getGroupElement()); + } + if (element.hasGroupDisplayElement()) { + composeString("groupDisplay", element.getGroupDisplayElement()); + } + if (element.hasSubGroupElement()) { + composeString("subGroup", element.getSubGroupElement()); + } + if (element.hasSubGroupDisplayElement()) { + composeString("subGroupDisplay", element.getSubGroupDisplayElement()); + } + if (element.hasPlanElement()) { + composeString("plan", element.getPlanElement()); + } + if (element.hasPlanDisplayElement()) { + composeString("planDisplay", element.getPlanDisplayElement()); + } + if (element.hasSubPlanElement()) { + composeString("subPlan", element.getSubPlanElement()); + } + if (element.hasSubPlanDisplayElement()) { + composeString("subPlanDisplay", element.getSubPlanDisplayElement()); + } + if (element.hasClass_Element()) { + composeString("class", element.getClass_Element()); + } + if (element.hasClassDisplayElement()) { + composeString("classDisplay", element.getClassDisplayElement()); + } + if (element.hasSubClassElement()) { + composeString("subClass", element.getSubClassElement()); + } + if (element.hasSubClassDisplayElement()) { + composeString("subClassDisplay", element.getSubClassDisplayElement()); + } + } + + protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDetectedIssueElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDetectedIssueElements(DetectedIssue element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory()); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasSeverityElement()) + composeEnumeration("severity", element.getSeverityElement(), new DetectedIssue.DetectedIssueSeverityEnumFactory()); + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasImplicated()) { + for (Reference e : element.getImplicated()) + composeReference("implicated", e); + } + if (element.hasDetailElement()) { + composeString("detail", element.getDetailElement()); + } + if (element.hasReferenceElement()) { + composeUri("reference", element.getReferenceElement()); + } + if (element.hasMitigation()) { + for (DetectedIssue.DetectedIssueMitigationComponent e : element.getMitigation()) + composeDetectedIssueDetectedIssueMitigationComponent("mitigation", e); + } + } + + protected void composeDetectedIssueDetectedIssueMitigationComponent(String name, DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDetectedIssueDetectedIssueMitigationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDetectedIssueDetectedIssueMitigationComponentElements(DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAction()) { + composeCodeableConcept("action", element.getAction()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + } + + protected void composeDevice(String name, Device element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceElements(Device element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasUdi()) { + composeDeviceDeviceUdiComponent("udi", element.getUdi()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLotNumberElement()) { + composeString("lotNumber", element.getLotNumberElement()); + } + if (element.hasManufacturerElement()) { + composeString("manufacturer", element.getManufacturerElement()); + } + if (element.hasManufactureDateElement()) { + composeDateTime("manufactureDate", element.getManufactureDateElement()); + } + if (element.hasExpirationDateElement()) { + composeDateTime("expirationDate", element.getExpirationDateElement()); + } + if (element.hasModelElement()) { + composeString("model", element.getModelElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasOwner()) { + composeReference("owner", element.getOwner()); + } + if (element.hasContact()) { + for (ContactPoint e : element.getContact()) + composeContactPoint("contact", e); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasSafety()) { + for (CodeableConcept e : element.getSafety()) + composeCodeableConcept("safety", e); + } + } + + protected void composeDeviceDeviceUdiComponent(String name, Device.DeviceUdiComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceDeviceUdiComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceDeviceUdiComponentElements(Device.DeviceUdiComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDeviceIdentifierElement()) { + composeString("deviceIdentifier", element.getDeviceIdentifierElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasJurisdictionElement()) { + composeUri("jurisdiction", element.getJurisdictionElement()); + } + if (element.hasCarrierHRFElement()) { + composeString("carrierHRF", element.getCarrierHRFElement()); + } + if (element.hasCarrierAIDCElement()) { + composeBase64Binary("carrierAIDC", element.getCarrierAIDCElement()); + } + if (element.hasIssuerElement()) { + composeUri("issuer", element.getIssuerElement()); + } + if (element.hasEntryTypeElement()) + composeEnumeration("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory()); + } + + protected void composeDeviceComponent(String name, DeviceComponent element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceComponentElements(DeviceComponent element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLastSystemChangeElement()) { + composeInstant("lastSystemChange", element.getLastSystemChangeElement()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasParent()) { + composeReference("parent", element.getParent()); + } + if (element.hasOperationalStatus()) { + for (CodeableConcept e : element.getOperationalStatus()) + composeCodeableConcept("operationalStatus", e); + } + if (element.hasParameterGroup()) { + composeCodeableConcept("parameterGroup", element.getParameterGroup()); + } + if (element.hasMeasurementPrincipleElement()) + composeEnumeration("measurementPrinciple", element.getMeasurementPrincipleElement(), new DeviceComponent.MeasmntPrincipleEnumFactory()); + if (element.hasProductionSpecification()) { + for (DeviceComponent.DeviceComponentProductionSpecificationComponent e : element.getProductionSpecification()) + composeDeviceComponentDeviceComponentProductionSpecificationComponent("productionSpecification", e); + } + if (element.hasLanguageCode()) { + composeCodeableConcept("languageCode", element.getLanguageCode()); + } + if (element.hasProperty()) { + for (DeviceComponent.DeviceComponentPropertyComponent e : element.getProperty()) + composeDeviceComponentDeviceComponentPropertyComponent("property", e); + } + } + + protected void composeDeviceComponentDeviceComponentProductionSpecificationComponent(String name, DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceComponentDeviceComponentProductionSpecificationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceComponentDeviceComponentProductionSpecificationComponentElements(DeviceComponent.DeviceComponentProductionSpecificationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSpecType()) { + composeCodeableConcept("specType", element.getSpecType()); + } + if (element.hasComponentId()) { + composeIdentifier("componentId", element.getComponentId()); + } + if (element.hasProductionSpecElement()) { + composeString("productionSpec", element.getProductionSpecElement()); + } + } + + protected void composeDeviceComponentDeviceComponentPropertyComponent(String name, DeviceComponent.DeviceComponentPropertyComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceComponentDeviceComponentPropertyComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceComponentDeviceComponentPropertyComponentElements(DeviceComponent.DeviceComponentPropertyComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasValueQuantity()) { + for (Quantity e : element.getValueQuantity()) + composeQuantity("valueQuantity", e); + } + if (element.hasValueCode()) { + for (CodeableConcept e : element.getValueCode()) + composeCodeableConcept("valueCode", e); + } + } + + protected void composeDeviceMetric(String name, DeviceMetric element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceMetricElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceMetricElements(DeviceMetric element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasUnit()) { + composeCodeableConcept("unit", element.getUnit()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasParent()) { + composeReference("parent", element.getParent()); + } + if (element.hasOperationalStatusElement()) + composeEnumeration("operationalStatus", element.getOperationalStatusElement(), new DeviceMetric.DeviceMetricOperationalStatusEnumFactory()); + if (element.hasColorElement()) + composeEnumeration("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory()); + if (element.hasCategoryElement()) + composeEnumeration("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory()); + if (element.hasMeasurementPeriod()) { + composeTiming("measurementPeriod", element.getMeasurementPeriod()); + } + if (element.hasCalibration()) { + for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration()) + composeDeviceMetricDeviceMetricCalibrationComponent("calibration", e); + } + } + + protected void composeDeviceMetricDeviceMetricCalibrationComponent(String name, DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceMetricDeviceMetricCalibrationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceMetricDeviceMetricCalibrationComponentElements(DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory()); + if (element.hasStateElement()) + composeEnumeration("state", element.getStateElement(), new DeviceMetric.DeviceMetricCalibrationStateEnumFactory()); + if (element.hasTimeElement()) { + composeInstant("time", element.getTimeElement()); + } + } + + protected void composeDeviceRequest(String name, DeviceRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceRequestElements(DeviceRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasPriorRequest()) { + for (Reference e : element.getPriorRequest()) + composeReference("priorRequest", e); + } + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory()); + if (element.hasIntent()) { + composeCodeableConcept("intent", element.getIntent()); + } + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory()); + if (element.hasCode()) { + composeType("code", element.getCode()); + } if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasRequester()) { + composeDeviceRequestDeviceRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasPerformerType()) { + composeCodeableConcept("performerType", element.getPerformerType()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasSupportingInfo()) { + for (Reference e : element.getSupportingInfo()) + composeReference("supportingInfo", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasRelevantHistory()) { + for (Reference e : element.getRelevantHistory()) + composeReference("relevantHistory", e); + } + } + + protected void composeDeviceRequestDeviceRequestRequesterComponent(String name, DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceRequestDeviceRequestRequesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceRequestDeviceRequestRequesterComponentElements(DeviceRequest.DeviceRequestRequesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeDeviceUseStatement(String name, DeviceUseStatement element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDeviceUseStatementElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDeviceUseStatementElements(DeviceUseStatement element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new DeviceUseStatement.DeviceUseStatementStatusEnumFactory()); + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasWhenUsed()) { + composePeriod("whenUsed", element.getWhenUsed()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasRecordedOnElement()) { + composeDateTime("recordedOn", element.getRecordedOnElement()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasIndication()) { + for (CodeableConcept e : element.getIndication()) + composeCodeableConcept("indication", e); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDiagnosticReportElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDiagnosticReportElements(DiagnosticReport element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new DiagnosticReport.DiagnosticReportStatusEnumFactory()); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } if (element.hasIssuedElement()) { + composeInstant("issued", element.getIssuedElement()); + } + if (element.hasPerformer()) { + for (Reference e : element.getPerformer()) + composeReference("performer", e); + } + if (element.hasResultsInterpreter()) { + for (Reference e : element.getResultsInterpreter()) + composeReference("resultsInterpreter", e); + } + if (element.hasSpecimen()) { + for (Reference e : element.getSpecimen()) + composeReference("specimen", e); + } + if (element.hasResult()) { + for (Reference e : element.getResult()) + composeReference("result", e); + } + if (element.hasImagingStudy()) { + for (Reference e : element.getImagingStudy()) + composeReference("imagingStudy", e); + } + if (element.hasImage()) { + for (DiagnosticReport.DiagnosticReportImageComponent e : element.getImage()) + composeDiagnosticReportDiagnosticReportImageComponent("image", e); + } + if (element.hasConclusionElement()) { + composeString("conclusion", element.getConclusionElement()); + } + if (element.hasCodedDiagnosis()) { + for (CodeableConcept e : element.getCodedDiagnosis()) + composeCodeableConcept("codedDiagnosis", e); + } + if (element.hasPresentedForm()) { + for (Attachment e : element.getPresentedForm()) + composeAttachment("presentedForm", e); + } + } + + protected void composeDiagnosticReportDiagnosticReportImageComponent(String name, DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDiagnosticReportDiagnosticReportImageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDiagnosticReportDiagnosticReportImageComponentElements(DiagnosticReport.DiagnosticReportImageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasLink()) { + composeReference("link", element.getLink()); + } + } + + protected void composeDocumentManifest(String name, DocumentManifest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentManifestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentManifestElements(DocumentManifest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasMasterIdentifier()) { + composeIdentifier("masterIdentifier", element.getMasterIdentifier()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasAgent()) { + for (DocumentManifest.DocumentManifestAgentComponent e : element.getAgent()) + composeDocumentManifestDocumentManifestAgentComponent("agent", e); + } + if (element.hasRecipient()) { + for (Reference e : element.getRecipient()) + composeReference("recipient", e); + } + if (element.hasSourceElement()) { + composeUri("source", element.getSourceElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasContent()) { + for (Reference e : element.getContent()) + composeReference("content", e); + } + if (element.hasRelated()) { + for (DocumentManifest.DocumentManifestRelatedComponent e : element.getRelated()) + composeDocumentManifestDocumentManifestRelatedComponent("related", e); + } + } + + protected void composeDocumentManifestDocumentManifestAgentComponent(String name, DocumentManifest.DocumentManifestAgentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentManifestDocumentManifestAgentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentManifestDocumentManifestAgentComponentElements(DocumentManifest.DocumentManifestAgentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasWho()) { + composeReference("who", element.getWho()); + } + } + + protected void composeDocumentManifestDocumentManifestRelatedComponent(String name, DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentManifestDocumentManifestRelatedComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentManifestDocumentManifestRelatedComponentElements(DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasRef()) { + composeReference("ref", element.getRef()); + } + } + + protected void composeDocumentReference(String name, DocumentReference element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentReferenceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentReferenceElements(DocumentReference element) throws IOException { + composeDomainResourceElements(element); + if (element.hasMasterIdentifier()) { + composeIdentifier("masterIdentifier", element.getMasterIdentifier()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory()); + if (element.hasDocStatusElement()) + composeEnumeration("docStatus", element.getDocStatusElement(), new DocumentReference.ReferredDocumentStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasClass_()) { + composeCodeableConcept("class", element.getClass_()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasDateElement()) { + composeInstant("date", element.getDateElement()); + } + if (element.hasAgent()) { + for (DocumentReference.DocumentReferenceAgentComponent e : element.getAgent()) + composeDocumentReferenceDocumentReferenceAgentComponent("agent", e); + } + if (element.hasAuthenticator()) { + composeReference("authenticator", element.getAuthenticator()); + } + if (element.hasCustodian()) { + composeReference("custodian", element.getCustodian()); + } + if (element.hasRelatesTo()) { + for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo()) + composeDocumentReferenceDocumentReferenceRelatesToComponent("relatesTo", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasSecurityLabel()) { + for (CodeableConcept e : element.getSecurityLabel()) + composeCodeableConcept("securityLabel", e); + } + if (element.hasContent()) { + for (DocumentReference.DocumentReferenceContentComponent e : element.getContent()) + composeDocumentReferenceDocumentReferenceContentComponent("content", e); + } + if (element.hasContext()) { + composeDocumentReferenceDocumentReferenceContextComponent("context", element.getContext()); + } + } + + protected void composeDocumentReferenceDocumentReferenceAgentComponent(String name, DocumentReference.DocumentReferenceAgentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentReferenceDocumentReferenceAgentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentReferenceDocumentReferenceAgentComponentElements(DocumentReference.DocumentReferenceAgentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasWho()) { + composeReference("who", element.getWho()); + } + } + + protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(String name, DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentReferenceDocumentReferenceRelatesToComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentReferenceDocumentReferenceRelatesToComponentElements(DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory()); + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + } + + protected void composeDocumentReferenceDocumentReferenceContentComponent(String name, DocumentReference.DocumentReferenceContentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentReferenceDocumentReferenceContentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentReferenceDocumentReferenceContentComponentElements(DocumentReference.DocumentReferenceContentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAttachment()) { + composeAttachment("attachment", element.getAttachment()); + } + if (element.hasFormat()) { + composeCoding("format", element.getFormat()); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextComponent(String name, DocumentReference.DocumentReferenceContextComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentReferenceDocumentReferenceContextComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextComponentElements(DocumentReference.DocumentReferenceContextComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasEvent()) { + for (CodeableConcept e : element.getEvent()) + composeCodeableConcept("event", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasFacilityType()) { + composeCodeableConcept("facilityType", element.getFacilityType()); + } + if (element.hasPracticeSetting()) { + composeCodeableConcept("practiceSetting", element.getPracticeSetting()); + } + if (element.hasSourcePatientInfo()) { + composeReference("sourcePatientInfo", element.getSourcePatientInfo()); + } + if (element.hasRelated()) { + for (DocumentReference.DocumentReferenceContextRelatedComponent e : element.getRelated()) + composeDocumentReferenceDocumentReferenceContextRelatedComponent("related", e); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextRelatedComponent(String name, DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeDocumentReferenceDocumentReferenceContextRelatedComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeDocumentReferenceDocumentReferenceContextRelatedComponentElements(DocumentReference.DocumentReferenceContextRelatedComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasRef()) { + composeReference("ref", element.getRef()); + } + } + + protected void composeEligibilityRequest(String name, EligibilityRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEligibilityRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEligibilityRequestElements(EligibilityRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new EligibilityRequest.EligibilityRequestStatusEnumFactory()); + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasServiced()) { + composeType("serviced", element.getServiced()); + } if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasFacility()) { + composeReference("facility", element.getFacility()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasBusinessArrangementElement()) { + composeString("businessArrangement", element.getBusinessArrangementElement()); + } + if (element.hasBenefitCategory()) { + composeCodeableConcept("benefitCategory", element.getBenefitCategory()); + } + if (element.hasBenefitSubCategory()) { + composeCodeableConcept("benefitSubCategory", element.getBenefitSubCategory()); + } + } + + protected void composeEligibilityResponse(String name, EligibilityResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEligibilityResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEligibilityResponseElements(EligibilityResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new EligibilityResponse.EligibilityResponseStatusEnumFactory()); + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory()); + if (element.hasDispositionElement()) { + composeString("disposition", element.getDispositionElement()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasInforceElement()) { + composeBoolean("inforce", element.getInforceElement()); + } + if (element.hasInsurance()) { + for (EligibilityResponse.InsuranceComponent e : element.getInsurance()) + composeEligibilityResponseInsuranceComponent("insurance", e); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasError()) { + for (EligibilityResponse.ErrorsComponent e : element.getError()) + composeEligibilityResponseErrorsComponent("error", e); + } + } + + protected void composeEligibilityResponseInsuranceComponent(String name, EligibilityResponse.InsuranceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEligibilityResponseInsuranceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEligibilityResponseInsuranceComponentElements(EligibilityResponse.InsuranceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasContract()) { + composeReference("contract", element.getContract()); + } + if (element.hasBenefitBalance()) { + for (EligibilityResponse.BenefitsComponent e : element.getBenefitBalance()) + composeEligibilityResponseBenefitsComponent("benefitBalance", e); + } + } + + protected void composeEligibilityResponseBenefitsComponent(String name, EligibilityResponse.BenefitsComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEligibilityResponseBenefitsComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEligibilityResponseBenefitsComponentElements(EligibilityResponse.BenefitsComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasSubCategory()) { + composeCodeableConcept("subCategory", element.getSubCategory()); + } + if (element.hasExcludedElement()) { + composeBoolean("excluded", element.getExcludedElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasNetwork()) { + composeCodeableConcept("network", element.getNetwork()); + } + if (element.hasUnit()) { + composeCodeableConcept("unit", element.getUnit()); + } + if (element.hasTerm()) { + composeCodeableConcept("term", element.getTerm()); + } + if (element.hasFinancial()) { + for (EligibilityResponse.BenefitComponent e : element.getFinancial()) + composeEligibilityResponseBenefitComponent("financial", e); + } + } + + protected void composeEligibilityResponseBenefitComponent(String name, EligibilityResponse.BenefitComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEligibilityResponseBenefitComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEligibilityResponseBenefitComponentElements(EligibilityResponse.BenefitComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAllowed()) { + composeType("allowed", element.getAllowed()); + } if (element.hasUsed()) { + composeType("used", element.getUsed()); + } } + + protected void composeEligibilityResponseErrorsComponent(String name, EligibilityResponse.ErrorsComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEligibilityResponseErrorsComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEligibilityResponseErrorsComponentElements(EligibilityResponse.ErrorsComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + } + + protected void composeEncounter(String name, Encounter element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterElements(Encounter element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory()); + if (element.hasStatusHistory()) { + for (Encounter.StatusHistoryComponent e : element.getStatusHistory()) + composeEncounterStatusHistoryComponent("statusHistory", e); + } + if (element.hasClass_()) { + composeCoding("class", element.getClass_()); + } + if (element.hasClassHistory()) { + for (Encounter.ClassHistoryComponent e : element.getClassHistory()) + composeEncounterClassHistoryComponent("classHistory", e); + } + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasEpisodeOfCare()) { + for (Reference e : element.getEpisodeOfCare()) + composeReference("episodeOfCare", e); + } + if (element.hasIncomingReferral()) { + for (Reference e : element.getIncomingReferral()) + composeReference("incomingReferral", e); + } + if (element.hasParticipant()) { + for (Encounter.EncounterParticipantComponent e : element.getParticipant()) + composeEncounterEncounterParticipantComponent("participant", e); + } + if (element.hasAppointment()) { + composeReference("appointment", element.getAppointment()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasLength()) { + composeDuration("length", element.getLength()); + } + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasDiagnosis()) { + for (Encounter.DiagnosisComponent e : element.getDiagnosis()) + composeEncounterDiagnosisComponent("diagnosis", e); + } + if (element.hasAccount()) { + for (Reference e : element.getAccount()) + composeReference("account", e); + } + if (element.hasHospitalization()) { + composeEncounterEncounterHospitalizationComponent("hospitalization", element.getHospitalization()); + } + if (element.hasLocation()) { + for (Encounter.EncounterLocationComponent e : element.getLocation()) + composeEncounterEncounterLocationComponent("location", e); + } + if (element.hasServiceProvider()) { + composeReference("serviceProvider", element.getServiceProvider()); + } + if (element.hasPartOf()) { + composeReference("partOf", element.getPartOf()); + } + } + + protected void composeEncounterStatusHistoryComponent(String name, Encounter.StatusHistoryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterStatusHistoryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterStatusHistoryComponentElements(Encounter.StatusHistoryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEncounterClassHistoryComponent(String name, Encounter.ClassHistoryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterClassHistoryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterClassHistoryComponentElements(Encounter.ClassHistoryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasClass_()) { + composeCoding("class", element.getClass_()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEncounterEncounterParticipantComponent(String name, Encounter.EncounterParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterEncounterParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterEncounterParticipantComponentElements(Encounter.EncounterParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasIndividual()) { + composeReference("individual", element.getIndividual()); + } + } + + protected void composeEncounterDiagnosisComponent(String name, Encounter.DiagnosisComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterDiagnosisComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterDiagnosisComponentElements(Encounter.DiagnosisComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCondition()) { + composeReference("condition", element.getCondition()); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasRankElement()) { + composePositiveInt("rank", element.getRankElement()); + } + } + + protected void composeEncounterEncounterHospitalizationComponent(String name, Encounter.EncounterHospitalizationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterEncounterHospitalizationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterEncounterHospitalizationComponentElements(Encounter.EncounterHospitalizationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPreAdmissionIdentifier()) { + composeIdentifier("preAdmissionIdentifier", element.getPreAdmissionIdentifier()); + } + if (element.hasOrigin()) { + composeReference("origin", element.getOrigin()); + } + if (element.hasAdmitSource()) { + composeCodeableConcept("admitSource", element.getAdmitSource()); + } + if (element.hasReAdmission()) { + composeCodeableConcept("reAdmission", element.getReAdmission()); + } + if (element.hasDietPreference()) { + for (CodeableConcept e : element.getDietPreference()) + composeCodeableConcept("dietPreference", e); + } + if (element.hasSpecialCourtesy()) { + for (CodeableConcept e : element.getSpecialCourtesy()) + composeCodeableConcept("specialCourtesy", e); + } + if (element.hasSpecialArrangement()) { + for (CodeableConcept e : element.getSpecialArrangement()) + composeCodeableConcept("specialArrangement", e); + } + if (element.hasDestination()) { + composeReference("destination", element.getDestination()); + } + if (element.hasDischargeDisposition()) { + composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition()); + } + } + + protected void composeEncounterEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEncounterEncounterLocationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEncounterEncounterLocationComponentElements(Encounter.EncounterLocationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEndpoint(String name, Endpoint element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEndpointElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEndpointElements(Endpoint element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory()); + if (element.hasConnectionType()) { + composeCoding("connectionType", element.getConnectionType()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasContact()) { + for (ContactPoint e : element.getContact()) + composeContactPoint("contact", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasPayloadType()) { + for (CodeableConcept e : element.getPayloadType()) + composeCodeableConcept("payloadType", e); + } + if (element.hasPayloadMimeType()) { + for (CodeType e : element.getPayloadMimeType()) + composeCode("payloadMimeType", e); + } + if (element.hasAddressElement()) { + composeUri("address", element.getAddressElement()); + } + if (element.hasHeader()) { + for (StringType e : element.getHeader()) + composeString("header", e); + } + } + + protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEnrollmentRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEnrollmentRequestElements(EnrollmentRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new EnrollmentRequest.EnrollmentRequestStatusEnumFactory()); + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasCandidate()) { + composeReference("candidate", element.getCandidate()); + } + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + } + + protected void composeEnrollmentResponse(String name, EnrollmentResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEnrollmentResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEnrollmentResponseElements(EnrollmentResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new EnrollmentResponse.EnrollmentResponseStatusEnumFactory()); + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory()); + if (element.hasDispositionElement()) { + composeString("disposition", element.getDispositionElement()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + } + + protected void composeEpisodeOfCare(String name, EpisodeOfCare element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEpisodeOfCareElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEpisodeOfCareElements(EpisodeOfCare element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()); + if (element.hasStatusHistory()) { + for (EpisodeOfCare.EpisodeOfCareStatusHistoryComponent e : element.getStatusHistory()) + composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent("statusHistory", e); + } + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasDiagnosis()) { + for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis()) + composeEpisodeOfCareDiagnosisComponent("diagnosis", e); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasReferralRequest()) { + for (Reference e : element.getReferralRequest()) + composeReference("referralRequest", e); + } + if (element.hasCareManager()) { + composeReference("careManager", element.getCareManager()); + } + if (element.hasTeam()) { + for (Reference e : element.getTeam()) + composeReference("team", e); + } + if (element.hasAccount()) { + for (Reference e : element.getAccount()) + composeReference("account", e); + } + } + + protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(String name, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentElements(EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeEpisodeOfCareDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeEpisodeOfCareDiagnosisComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEpisodeOfCareDiagnosisComponentElements(EpisodeOfCare.DiagnosisComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCondition()) { + composeReference("condition", element.getCondition()); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasRankElement()) { + composePositiveInt("rank", element.getRankElement()); + } + } + + protected void composeEventDefinition(String name, EventDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeEventDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeEventDefinitionElements(EventDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasTopic()) { + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept("topic", e); + } + if (element.hasContributor()) { + for (Contributor e : element.getContributor()) + composeContributor("contributor", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasTrigger()) { + composeTriggerDefinition("trigger", element.getTrigger()); + } + } + + protected void composeExampleScenario(String name, ExampleScenario element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioElements(ExampleScenario element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasActor()) { + for (ExampleScenario.ExampleScenarioActorComponent e : element.getActor()) + composeExampleScenarioExampleScenarioActorComponent("actor", e); + } + if (element.hasInstance()) { + for (ExampleScenario.ExampleScenarioInstanceComponent e : element.getInstance()) + composeExampleScenarioExampleScenarioInstanceComponent("instance", e); + } + if (element.hasProcess()) { + composeExampleScenarioExampleScenarioProcessComponent("process", element.getProcess()); + } + if (element.hasWorkflow()) { + for (Reference e : element.getWorkflow()) + composeReference("workflow", e); + } + } + + protected void composeExampleScenarioExampleScenarioActorComponent(String name, ExampleScenario.ExampleScenarioActorComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioActorComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioActorComponentElements(ExampleScenario.ExampleScenarioActorComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasActorIdElement()) { + composeString("actorId", element.getActorIdElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new ExampleScenario.ExampleScenarioActorTypeEnumFactory()); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceComponent(String name, ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioInstanceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceComponentElements(ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasResourceIdElement()) { + composeString("resourceId", element.getResourceIdElement()); + } + if (element.hasResourceTypeElement()) + composeEnumeration("resourceType", element.getResourceTypeElement(), new ExampleScenario.FHIRResourceTypeEnumFactory()); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasVersion()) { + for (ExampleScenario.ExampleScenarioInstanceVersionComponent e : element.getVersion()) + composeExampleScenarioExampleScenarioInstanceVersionComponent("version", e); + } + if (element.hasContainedInstance()) { + for (ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent e : element.getContainedInstance()) + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("containedInstance", e); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceVersionComponent(String name, ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioInstanceVersionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceVersionComponentElements(ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasVersionIdElement()) { + composeString("versionId", element.getVersionIdElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(String name, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentElements(ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasResourceIdElement()) { + composeString("resourceId", element.getResourceIdElement()); + } + if (element.hasVersionIdElement()) { + composeString("versionId", element.getVersionIdElement()); + } + } + + protected void composeExampleScenarioExampleScenarioProcessComponent(String name, ExampleScenario.ExampleScenarioProcessComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioProcessComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioProcessComponentElements(ExampleScenario.ExampleScenarioProcessComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPreConditionsElement()) { + composeMarkdown("preConditions", element.getPreConditionsElement()); + } + if (element.hasPostConditionsElement()) { + composeMarkdown("postConditions", element.getPostConditionsElement()); + } + if (element.hasStep()) { + for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep()) + composeExampleScenarioExampleScenarioProcessStepComponent("step", e); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepComponent(String name, ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioProcessStepComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepComponentElements(ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasProcess()) { + for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess()) + composeExampleScenarioExampleScenarioProcessComponent("process", e); + } + if (element.hasPauseElement()) { + composeBoolean("pause", element.getPauseElement()); + } + if (element.hasOperation()) { + composeExampleScenarioExampleScenarioProcessStepOperationComponent("operation", element.getOperation()); + } + if (element.hasAlternative()) { + composeExampleScenarioExampleScenarioProcessStepAlternativeComponent("alternative", element.getAlternative()); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepOperationComponent(String name, ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioProcessStepOperationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepOperationComponentElements(ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNumberElement()) { + composeString("number", element.getNumberElement()); + } + if (element.hasTypeElement()) { + composeString("type", element.getTypeElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasInitiatorElement()) { + composeString("initiator", element.getInitiatorElement()); + } + if (element.hasReceiverElement()) { + composeString("receiver", element.getReceiverElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasInitiatorActiveElement()) { + composeBoolean("initiatorActive", element.getInitiatorActiveElement()); + } + if (element.hasReceiverActiveElement()) { + composeBoolean("receiverActive", element.getReceiverActiveElement()); + } + if (element.hasRequest()) { + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("request", element.getRequest()); + } + if (element.hasResponse()) { + composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("response", element.getResponse()); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(String name, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioProcessStepAlternativeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponentElements(ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasOption()) { + for (ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent e : element.getOption()) + composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent("option", e); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponent(String name, ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExampleScenarioExampleScenarioProcessStepAlternativeOptionComponentElements(ExampleScenario.ExampleScenarioProcessStepAlternativeOptionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasStep()) { + for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep()) + composeExampleScenarioExampleScenarioProcessStepComponent("step", e); + } + if (element.hasPause()) { + for (BooleanType e : element.getPause()) + composeBoolean("pause", e); + } + } + + protected void composeExpansionProfile(String name, ExpansionProfile element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileElements(ExpansionProfile element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasFixedVersion()) { + for (ExpansionProfile.ExpansionProfileFixedVersionComponent e : element.getFixedVersion()) + composeExpansionProfileExpansionProfileFixedVersionComponent("fixedVersion", e); + } + if (element.hasExcludedSystem()) { + composeExpansionProfileExpansionProfileExcludedSystemComponent("excludedSystem", element.getExcludedSystem()); + } + if (element.hasIncludeDesignationsElement()) { + composeBoolean("includeDesignations", element.getIncludeDesignationsElement()); + } + if (element.hasDesignation()) { + composeExpansionProfileExpansionProfileDesignationComponent("designation", element.getDesignation()); + } + if (element.hasIncludeDefinitionElement()) { + composeBoolean("includeDefinition", element.getIncludeDefinitionElement()); + } + if (element.hasActiveOnlyElement()) { + composeBoolean("activeOnly", element.getActiveOnlyElement()); + } + if (element.hasExcludeNestedElement()) { + composeBoolean("excludeNested", element.getExcludeNestedElement()); + } + if (element.hasExcludeNotForUIElement()) { + composeBoolean("excludeNotForUI", element.getExcludeNotForUIElement()); + } + if (element.hasExcludePostCoordinatedElement()) { + composeBoolean("excludePostCoordinated", element.getExcludePostCoordinatedElement()); + } + if (element.hasDisplayLanguageElement()) { + composeCode("displayLanguage", element.getDisplayLanguageElement()); + } + if (element.hasLimitedExpansionElement()) { + composeBoolean("limitedExpansion", element.getLimitedExpansionElement()); + } + } + + protected void composeExpansionProfileExpansionProfileFixedVersionComponent(String name, ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileExpansionProfileFixedVersionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileExpansionProfileFixedVersionComponentElements(ExpansionProfile.ExpansionProfileFixedVersionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new ExpansionProfile.SystemVersionProcessingModeEnumFactory()); + } + + protected void composeExpansionProfileExpansionProfileExcludedSystemComponent(String name, ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileExpansionProfileExcludedSystemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileExpansionProfileExcludedSystemComponentElements(ExpansionProfile.ExpansionProfileExcludedSystemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + } + + protected void composeExpansionProfileExpansionProfileDesignationComponent(String name, ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileExpansionProfileDesignationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileExpansionProfileDesignationComponentElements(ExpansionProfile.ExpansionProfileDesignationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasInclude()) { + composeExpansionProfileDesignationIncludeComponent("include", element.getInclude()); + } + if (element.hasExclude()) { + composeExpansionProfileDesignationExcludeComponent("exclude", element.getExclude()); + } + } + + protected void composeExpansionProfileDesignationIncludeComponent(String name, ExpansionProfile.DesignationIncludeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileDesignationIncludeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileDesignationIncludeComponentElements(ExpansionProfile.DesignationIncludeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDesignation()) { + for (ExpansionProfile.DesignationIncludeDesignationComponent e : element.getDesignation()) + composeExpansionProfileDesignationIncludeDesignationComponent("designation", e); + } + } + + protected void composeExpansionProfileDesignationIncludeDesignationComponent(String name, ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileDesignationIncludeDesignationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileDesignationIncludeDesignationComponentElements(ExpansionProfile.DesignationIncludeDesignationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + } + + protected void composeExpansionProfileDesignationExcludeComponent(String name, ExpansionProfile.DesignationExcludeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileDesignationExcludeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileDesignationExcludeComponentElements(ExpansionProfile.DesignationExcludeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDesignation()) { + for (ExpansionProfile.DesignationExcludeDesignationComponent e : element.getDesignation()) + composeExpansionProfileDesignationExcludeDesignationComponent("designation", e); + } + } + + protected void composeExpansionProfileDesignationExcludeDesignationComponent(String name, ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExpansionProfileDesignationExcludeDesignationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExpansionProfileDesignationExcludeDesignationComponentElements(ExpansionProfile.DesignationExcludeDesignationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + } + + protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitElements(ExplanationOfBenefit element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubType()) { + for (CodeableConcept e : element.getSubType()) + composeCodeableConcept("subType", e); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasBillablePeriod()) { + composePeriod("billablePeriod", element.getBillablePeriod()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasInsurer()) { + composeReference("insurer", element.getInsurer()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasReferral()) { + composeReference("referral", element.getReferral()); + } + if (element.hasFacility()) { + composeReference("facility", element.getFacility()); + } + if (element.hasClaim()) { + composeReference("claim", element.getClaim()); + } + if (element.hasClaimResponse()) { + composeReference("claimResponse", element.getClaimResponse()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new ExplanationOfBenefit.RemittanceOutcomeEnumFactory()); + if (element.hasDispositionElement()) { + composeString("disposition", element.getDispositionElement()); + } + if (element.hasRelated()) { + for (ExplanationOfBenefit.RelatedClaimComponent e : element.getRelated()) + composeExplanationOfBenefitRelatedClaimComponent("related", e); + } + if (element.hasPrescription()) { + composeReference("prescription", element.getPrescription()); + } + if (element.hasOriginalPrescription()) { + composeReference("originalPrescription", element.getOriginalPrescription()); + } + if (element.hasPayee()) { + composeExplanationOfBenefitPayeeComponent("payee", element.getPayee()); + } + if (element.hasInformation()) { + for (ExplanationOfBenefit.SupportingInformationComponent e : element.getInformation()) + composeExplanationOfBenefitSupportingInformationComponent("information", e); + } + if (element.hasCareTeam()) { + for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam()) + composeExplanationOfBenefitCareTeamComponent("careTeam", e); + } + if (element.hasDiagnosis()) { + for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis()) + composeExplanationOfBenefitDiagnosisComponent("diagnosis", e); + } + if (element.hasProcedure()) { + for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure()) + composeExplanationOfBenefitProcedureComponent("procedure", e); + } + if (element.hasPrecedenceElement()) { + composePositiveInt("precedence", element.getPrecedenceElement()); + } + if (element.hasInsurance()) { + composeExplanationOfBenefitInsuranceComponent("insurance", element.getInsurance()); + } + if (element.hasAccident()) { + composeExplanationOfBenefitAccidentComponent("accident", element.getAccident()); + } + if (element.hasEmploymentImpacted()) { + composePeriod("employmentImpacted", element.getEmploymentImpacted()); + } + if (element.hasHospitalization()) { + composePeriod("hospitalization", element.getHospitalization()); + } + if (element.hasItem()) { + for (ExplanationOfBenefit.ItemComponent e : element.getItem()) + composeExplanationOfBenefitItemComponent("item", e); + } + if (element.hasAddItem()) { + for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem()) + composeExplanationOfBenefitAddedItemComponent("addItem", e); + } + if (element.hasTotalCost()) { + composeMoney("totalCost", element.getTotalCost()); + } + if (element.hasUnallocDeductable()) { + composeMoney("unallocDeductable", element.getUnallocDeductable()); + } + if (element.hasTotalBenefit()) { + composeMoney("totalBenefit", element.getTotalBenefit()); + } + if (element.hasPayment()) { + composeExplanationOfBenefitPaymentComponent("payment", element.getPayment()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasProcessNote()) { + for (ExplanationOfBenefit.NoteComponent e : element.getProcessNote()) + composeExplanationOfBenefitNoteComponent("processNote", e); + } + if (element.hasBenefitBalance()) { + for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance()) + composeExplanationOfBenefitBenefitBalanceComponent("benefitBalance", e); + } + } + + protected void composeExplanationOfBenefitRelatedClaimComponent(String name, ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitRelatedClaimComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitRelatedClaimComponentElements(ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasClaim()) { + composeReference("claim", element.getClaim()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasReference()) { + composeIdentifier("reference", element.getReference()); + } + } + + protected void composeExplanationOfBenefitPayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitPayeeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitPayeeComponentElements(ExplanationOfBenefit.PayeeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasResource()) { + composeCoding("resource", element.getResource()); + } + if (element.hasParty()) { + composeReference("party", element.getParty()); + } + } + + protected void composeExplanationOfBenefitSupportingInformationComponent(String name, ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitSupportingInformationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitSupportingInformationComponentElements(ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasReason()) { + composeCoding("reason", element.getReason()); + } + } + + protected void composeExplanationOfBenefitCareTeamComponent(String name, ExplanationOfBenefit.CareTeamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitCareTeamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitCareTeamComponentElements(ExplanationOfBenefit.CareTeamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasResponsibleElement()) { + composeBoolean("responsible", element.getResponsibleElement()); + } + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasQualification()) { + composeCodeableConcept("qualification", element.getQualification()); + } + } + + protected void composeExplanationOfBenefitDiagnosisComponent(String name, ExplanationOfBenefit.DiagnosisComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitDiagnosisComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitDiagnosisComponentElements(ExplanationOfBenefit.DiagnosisComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasDiagnosis()) { + composeType("diagnosis", element.getDiagnosis()); + } if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasPackageCode()) { + composeCodeableConcept("packageCode", element.getPackageCode()); + } + } + + protected void composeExplanationOfBenefitProcedureComponent(String name, ExplanationOfBenefit.ProcedureComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitProcedureComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitProcedureComponentElements(ExplanationOfBenefit.ProcedureComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasProcedure()) { + composeType("procedure", element.getProcedure()); + } } + + protected void composeExplanationOfBenefitInsuranceComponent(String name, ExplanationOfBenefit.InsuranceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitInsuranceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitInsuranceComponentElements(ExplanationOfBenefit.InsuranceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCoverage()) { + composeReference("coverage", element.getCoverage()); + } + if (element.hasPreAuthRef()) { + for (StringType e : element.getPreAuthRef()) + composeString("preAuthRef", e); + } + } + + protected void composeExplanationOfBenefitAccidentComponent(String name, ExplanationOfBenefit.AccidentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitAccidentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitAccidentComponentElements(ExplanationOfBenefit.AccidentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDateElement()) { + composeDate("date", element.getDateElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasLocation()) { + composeType("location", element.getLocation()); + } } + + protected void composeExplanationOfBenefitItemComponent(String name, ExplanationOfBenefit.ItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitItemComponentElements(ExplanationOfBenefit.ItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasCareTeamLinkId()) { + for (PositiveIntType e : element.getCareTeamLinkId()) + composePositiveInt("careTeamLinkId", e); + } + if (element.hasDiagnosisLinkId()) { + for (PositiveIntType e : element.getDiagnosisLinkId()) + composePositiveInt("diagnosisLinkId", e); + } + if (element.hasProcedureLinkId()) { + for (PositiveIntType e : element.getProcedureLinkId()) + composePositiveInt("procedureLinkId", e); + } + if (element.hasInformationLinkId()) { + for (PositiveIntType e : element.getInformationLinkId()) + composePositiveInt("informationLinkId", e); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasProgramCode()) { + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept("programCode", e); + } + if (element.hasServiced()) { + composeType("serviced", element.getServiced()); + } if (element.hasLocation()) { + composeType("location", element.getLocation()); + } if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + for (Reference e : element.getUdi()) + composeReference("udi", e); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasSubSite()) { + for (CodeableConcept e : element.getSubSite()) + composeCodeableConcept("subSite", e); + } + if (element.hasEncounter()) { + for (Reference e : element.getEncounter()) + composeReference("encounter", e); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent("adjudication", e); + } + if (element.hasDetail()) { + for (ExplanationOfBenefit.DetailComponent e : element.getDetail()) + composeExplanationOfBenefitDetailComponent("detail", e); + } + } + + protected void composeExplanationOfBenefitAdjudicationComponent(String name, ExplanationOfBenefit.AdjudicationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitAdjudicationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitAdjudicationComponentElements(ExplanationOfBenefit.AdjudicationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasValueElement()) { + composeDecimal("value", element.getValueElement()); + } + } + + protected void composeExplanationOfBenefitDetailComponent(String name, ExplanationOfBenefit.DetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitDetailComponentElements(ExplanationOfBenefit.DetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasProgramCode()) { + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept("programCode", e); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + for (Reference e : element.getUdi()) + composeReference("udi", e); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent("adjudication", e); + } + if (element.hasSubDetail()) { + for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail()) + composeExplanationOfBenefitSubDetailComponent("subDetail", e); + } + } + + protected void composeExplanationOfBenefitSubDetailComponent(String name, ExplanationOfBenefit.SubDetailComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitSubDetailComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitSubDetailComponentElements(ExplanationOfBenefit.SubDetailComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceElement()) { + composePositiveInt("sequence", element.getSequenceElement()); + } + if (element.hasRevenue()) { + composeCodeableConcept("revenue", element.getRevenue()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasProgramCode()) { + for (CodeableConcept e : element.getProgramCode()) + composeCodeableConcept("programCode", e); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasUnitPrice()) { + composeMoney("unitPrice", element.getUnitPrice()); + } + if (element.hasFactorElement()) { + composeDecimal("factor", element.getFactorElement()); + } + if (element.hasNet()) { + composeMoney("net", element.getNet()); + } + if (element.hasUdi()) { + for (Reference e : element.getUdi()) + composeReference("udi", e); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent("adjudication", e); + } + } + + protected void composeExplanationOfBenefitAddedItemComponent(String name, ExplanationOfBenefit.AddedItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitAddedItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitAddedItemComponentElements(ExplanationOfBenefit.AddedItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkId()) { + for (PositiveIntType e : element.getSequenceLinkId()) + composePositiveInt("sequenceLinkId", e); + } + if (element.hasDetailSequenceLinkId()) { + for (PositiveIntType e : element.getDetailSequenceLinkId()) + composePositiveInt("detailSequenceLinkId", e); + } + if (element.hasSubdetailSequenceLinkId()) { + for (PositiveIntType e : element.getSubdetailSequenceLinkId()) + composePositiveInt("subdetailSequenceLinkId", e); + } + if (element.hasService()) { + composeCodeableConcept("service", element.getService()); + } + if (element.hasModifier()) { + for (CodeableConcept e : element.getModifier()) + composeCodeableConcept("modifier", e); + } + if (element.hasFee()) { + composeMoney("fee", element.getFee()); + } + if (element.hasNoteNumber()) { + for (PositiveIntType e : element.getNoteNumber()) + composePositiveInt("noteNumber", e); + } + if (element.hasAdjudication()) { + for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) + composeExplanationOfBenefitAdjudicationComponent("adjudication", e); + } + } + + protected void composeExplanationOfBenefitPaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitPaymentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitPaymentComponentElements(ExplanationOfBenefit.PaymentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAdjustment()) { + composeMoney("adjustment", element.getAdjustment()); + } + if (element.hasAdjustmentReason()) { + composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); + } + if (element.hasDateElement()) { + composeDate("date", element.getDateElement()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + } + + protected void composeExplanationOfBenefitNoteComponent(String name, ExplanationOfBenefit.NoteComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitNoteComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitNoteComponentElements(ExplanationOfBenefit.NoteComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNumberElement()) { + composePositiveInt("number", element.getNumberElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasLanguage()) { + composeCodeableConcept("language", element.getLanguage()); + } + } + + protected void composeExplanationOfBenefitBenefitBalanceComponent(String name, ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitBenefitBalanceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitBenefitBalanceComponentElements(ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasSubCategory()) { + composeCodeableConcept("subCategory", element.getSubCategory()); + } + if (element.hasExcludedElement()) { + composeBoolean("excluded", element.getExcludedElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasNetwork()) { + composeCodeableConcept("network", element.getNetwork()); + } + if (element.hasUnit()) { + composeCodeableConcept("unit", element.getUnit()); + } + if (element.hasTerm()) { + composeCodeableConcept("term", element.getTerm()); + } + if (element.hasFinancial()) { + for (ExplanationOfBenefit.BenefitComponent e : element.getFinancial()) + composeExplanationOfBenefitBenefitComponent("financial", e); + } + } + + protected void composeExplanationOfBenefitBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeExplanationOfBenefitBenefitComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeExplanationOfBenefitBenefitComponentElements(ExplanationOfBenefit.BenefitComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAllowed()) { + composeType("allowed", element.getAllowed()); + } if (element.hasUsed()) { + composeType("used", element.getUsed()); + } } + + protected void composeFamilyMemberHistory(String name, FamilyMemberHistory element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeFamilyMemberHistoryElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeFamilyMemberHistoryElements(FamilyMemberHistory element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new FamilyMemberHistory.FamilyHistoryStatusEnumFactory()); + if (element.hasDataAbsentReason()) { + composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasGenderElement()) + composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); + if (element.hasBorn()) { + composeType("born", element.getBorn()); + } if (element.hasAge()) { + composeType("age", element.getAge()); + } if (element.hasEstimatedAgeElement()) { + composeBoolean("estimatedAge", element.getEstimatedAgeElement()); + } + if (element.hasDeceased()) { + composeType("deceased", element.getDeceased()); + } if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasCondition()) { + for (FamilyMemberHistory.FamilyMemberHistoryConditionComponent e : element.getCondition()) + composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent("condition", e); + } + } + + protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentElements(FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasOnset()) { + composeType("onset", element.getOnset()); + } if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeFlag(String name, Flag element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeFlagElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeFlagElements(Flag element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + } + + protected void composeGoal(String name, Goal element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeGoalElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGoalElements(Goal element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Goal.GoalStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasDescription()) { + composeCodeableConcept("description", element.getDescription()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasStart()) { + composeType("start", element.getStart()); + } if (element.hasTarget()) { + composeGoalGoalTargetComponent("target", element.getTarget()); + } + if (element.hasStatusDateElement()) { + composeDate("statusDate", element.getStatusDateElement()); + } + if (element.hasStatusReasonElement()) { + composeString("statusReason", element.getStatusReasonElement()); + } + if (element.hasExpressedBy()) { + composeReference("expressedBy", element.getExpressedBy()); + } + if (element.hasAddresses()) { + for (Reference e : element.getAddresses()) + composeReference("addresses", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasOutcomeCode()) { + for (CodeableConcept e : element.getOutcomeCode()) + composeCodeableConcept("outcomeCode", e); + } + if (element.hasOutcomeReference()) { + for (Reference e : element.getOutcomeReference()) + composeReference("outcomeReference", e); + } + } + + protected void composeGoalGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeGoalGoalTargetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGoalGoalTargetComponentElements(Goal.GoalTargetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMeasure()) { + composeCodeableConcept("measure", element.getMeasure()); + } + if (element.hasDetail()) { + composeType("detail", element.getDetail()); + } if (element.hasDue()) { + composeType("due", element.getDue()); + } } + + protected void composeGraphDefinition(String name, GraphDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeGraphDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGraphDefinitionElements(GraphDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasStartElement()) { + composeCode("start", element.getStartElement()); + } + if (element.hasProfileElement()) { + composeUri("profile", element.getProfileElement()); + } + if (element.hasLink()) { + for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) + composeGraphDefinitionGraphDefinitionLinkComponent("link", e); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkComponent(String name, GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeGraphDefinitionGraphDefinitionLinkComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkComponentElements(GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasSliceNameElement()) { + composeString("sliceName", element.getSliceNameElement()); + } + if (element.hasMinElement()) { + composeInteger("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasTarget()) { + for (GraphDefinition.GraphDefinitionLinkTargetComponent e : element.getTarget()) + composeGraphDefinitionGraphDefinitionLinkTargetComponent("target", e); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(String name, GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeGraphDefinitionGraphDefinitionLinkTargetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetComponentElements(GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasParamsElement()) { + composeString("params", element.getParamsElement()); + } + if (element.hasProfileElement()) { + composeUri("profile", element.getProfileElement()); + } + if (element.hasCompartment()) { + for (GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent e : element.getCompartment()) + composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent("compartment", e); + } + if (element.hasLink()) { + for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) + composeGraphDefinitionGraphDefinitionLinkComponent("link", e); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(String name, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentElements(GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory()); + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory()); + if (element.hasRuleElement()) + composeEnumeration("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory()); + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + } + + protected void composeGroup(String name, Group element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeGroupElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGroupElements(Group element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Group.GroupTypeEnumFactory()); + if (element.hasActualElement()) { + composeBoolean("actual", element.getActualElement()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasQuantityElement()) { + composeUnsignedInt("quantity", element.getQuantityElement()); + } + if (element.hasCharacteristic()) { + for (Group.GroupCharacteristicComponent e : element.getCharacteristic()) + composeGroupGroupCharacteristicComponent("characteristic", e); + } + if (element.hasMember()) { + for (Group.GroupMemberComponent e : element.getMember()) + composeGroupGroupMemberComponent("member", e); + } + } + + protected void composeGroupGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeGroupGroupCharacteristicComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGroupGroupCharacteristicComponentElements(Group.GroupCharacteristicComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasExcludeElement()) { + composeBoolean("exclude", element.getExcludeElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeGroupGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeGroupGroupMemberComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGroupGroupMemberComponentElements(Group.GroupMemberComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasEntity()) { + composeReference("entity", element.getEntity()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasInactiveElement()) { + composeBoolean("inactive", element.getInactiveElement()); + } + } + + protected void composeGuidanceResponse(String name, GuidanceResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeGuidanceResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeGuidanceResponseElements(GuidanceResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasRequestIdElement()) { + composeId("requestId", element.getRequestIdElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasModule()) { + composeReference("module", element.getModule()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new GuidanceResponse.GuidanceResponseStatusEnumFactory()); + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrenceDateTimeElement()) { + composeDateTime("occurrenceDateTime", element.getOccurrenceDateTimeElement()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasEvaluationMessage()) { + for (Reference e : element.getEvaluationMessage()) + composeReference("evaluationMessage", e); + } + if (element.hasOutputParameters()) { + composeReference("outputParameters", element.getOutputParameters()); + } + if (element.hasResult()) { + composeReference("result", element.getResult()); + } + if (element.hasDataRequirement()) { + for (DataRequirement e : element.getDataRequirement()) + composeDataRequirement("dataRequirement", e); + } + } + + protected void composeHealthcareService(String name, HealthcareService element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeHealthcareServiceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeHealthcareServiceElements(HealthcareService element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasProvidedBy()) { + composeReference("providedBy", element.getProvidedBy()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasSpecialty()) { + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept("specialty", e); + } + if (element.hasLocation()) { + for (Reference e : element.getLocation()) + composeReference("location", e); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasExtraDetailsElement()) { + composeString("extraDetails", element.getExtraDetailsElement()); + } + if (element.hasPhoto()) { + composeAttachment("photo", element.getPhoto()); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasCoverageArea()) { + for (Reference e : element.getCoverageArea()) + composeReference("coverageArea", e); + } + if (element.hasServiceProvisionCode()) { + for (CodeableConcept e : element.getServiceProvisionCode()) + composeCodeableConcept("serviceProvisionCode", e); + } + if (element.hasEligibility()) { + composeCodeableConcept("eligibility", element.getEligibility()); + } + if (element.hasEligibilityNoteElement()) { + composeString("eligibilityNote", element.getEligibilityNoteElement()); + } + if (element.hasProgramName()) { + for (StringType e : element.getProgramName()) + composeString("programName", e); + } + if (element.hasCharacteristic()) { + for (CodeableConcept e : element.getCharacteristic()) + composeCodeableConcept("characteristic", e); + } + if (element.hasReferralMethod()) { + for (CodeableConcept e : element.getReferralMethod()) + composeCodeableConcept("referralMethod", e); + } + if (element.hasAppointmentRequiredElement()) { + composeBoolean("appointmentRequired", element.getAppointmentRequiredElement()); + } + if (element.hasAvailableTime()) { + for (HealthcareService.HealthcareServiceAvailableTimeComponent e : element.getAvailableTime()) + composeHealthcareServiceHealthcareServiceAvailableTimeComponent("availableTime", e); + } + if (element.hasNotAvailable()) { + for (HealthcareService.HealthcareServiceNotAvailableComponent e : element.getNotAvailable()) + composeHealthcareServiceHealthcareServiceNotAvailableComponent("notAvailable", e); + } + if (element.hasAvailabilityExceptionsElement()) { + composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + } + + protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(String name, HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeHealthcareServiceHealthcareServiceAvailableTimeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponentElements(HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDaysOfWeek()) + for (Enumeration e : element.getDaysOfWeek()) + composeEnumeration("daysOfWeek", e, new HealthcareService.DaysOfWeekEnumFactory()); + if (element.hasAllDayElement()) { + composeBoolean("allDay", element.getAllDayElement()); + } + if (element.hasAvailableStartTimeElement()) { + composeTime("availableStartTime", element.getAvailableStartTimeElement()); + } + if (element.hasAvailableEndTimeElement()) { + composeTime("availableEndTime", element.getAvailableEndTimeElement()); + } + } + + protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(String name, HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeHealthcareServiceHealthcareServiceNotAvailableComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeHealthcareServiceHealthcareServiceNotAvailableComponentElements(HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasDuring()) { + composePeriod("during", element.getDuring()); + } + } + + protected void composeImagingManifest(String name, ImagingManifest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingManifestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingManifestElements(ImagingManifest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasAuthoringTimeElement()) { + composeDateTime("authoringTime", element.getAuthoringTimeElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasStudy()) { + for (ImagingManifest.StudyComponent e : element.getStudy()) + composeImagingManifestStudyComponent("study", e); + } + } + + protected void composeImagingManifestStudyComponent(String name, ImagingManifest.StudyComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingManifestStudyComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingManifestStudyComponentElements(ImagingManifest.StudyComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUidElement()) { + composeOid("uid", element.getUidElement()); + } + if (element.hasImagingStudy()) { + composeReference("imagingStudy", element.getImagingStudy()); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + if (element.hasSeries()) { + for (ImagingManifest.SeriesComponent e : element.getSeries()) + composeImagingManifestSeriesComponent("series", e); + } + } + + protected void composeImagingManifestSeriesComponent(String name, ImagingManifest.SeriesComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingManifestSeriesComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingManifestSeriesComponentElements(ImagingManifest.SeriesComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUidElement()) { + composeOid("uid", element.getUidElement()); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + if (element.hasInstance()) { + for (ImagingManifest.InstanceComponent e : element.getInstance()) + composeImagingManifestInstanceComponent("instance", e); + } + } + + protected void composeImagingManifestInstanceComponent(String name, ImagingManifest.InstanceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingManifestInstanceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingManifestInstanceComponentElements(ImagingManifest.InstanceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSopClassElement()) { + composeOid("sopClass", element.getSopClassElement()); + } + if (element.hasUidElement()) { + composeOid("uid", element.getUidElement()); + } + if (element.hasFrameNumber()) { + for (UnsignedIntType e : element.getFrameNumber()) + composeUnsignedInt("frameNumber", e); + } + } + + protected void composeImagingStudy(String name, ImagingStudy element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingStudyElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingStudyElements(ImagingStudy element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUidElement()) { + composeOid("uid", element.getUidElement()); + } + if (element.hasAccession()) { + composeIdentifier("accession", element.getAccession()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasAvailabilityElement()) + composeEnumeration("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory()); + if (element.hasModalityList()) { + for (Coding e : element.getModalityList()) + composeCoding("modalityList", e); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasStartedElement()) { + composeDateTime("started", element.getStartedElement()); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasReferrer()) { + composeReference("referrer", element.getReferrer()); + } + if (element.hasInterpreter()) { + for (Reference e : element.getInterpreter()) + composeReference("interpreter", e); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + if (element.hasNumberOfSeriesElement()) { + composeUnsignedInt("numberOfSeries", element.getNumberOfSeriesElement()); + } + if (element.hasNumberOfInstancesElement()) { + composeUnsignedInt("numberOfInstances", element.getNumberOfInstancesElement()); + } + if (element.hasProcedureReference()) { + for (Reference e : element.getProcedureReference()) + composeReference("procedureReference", e); + } + if (element.hasProcedureCode()) { + for (CodeableConcept e : element.getProcedureCode()) + composeCodeableConcept("procedureCode", e); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasSeries()) { + for (ImagingStudy.ImagingStudySeriesComponent e : element.getSeries()) + composeImagingStudyImagingStudySeriesComponent("series", e); + } + } + + protected void composeImagingStudyImagingStudySeriesComponent(String name, ImagingStudy.ImagingStudySeriesComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingStudyImagingStudySeriesComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingStudyImagingStudySeriesComponentElements(ImagingStudy.ImagingStudySeriesComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUidElement()) { + composeOid("uid", element.getUidElement()); + } + if (element.hasNumberElement()) { + composeUnsignedInt("number", element.getNumberElement()); + } + if (element.hasModality()) { + composeCoding("modality", element.getModality()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasNumberOfInstancesElement()) { + composeUnsignedInt("numberOfInstances", element.getNumberOfInstancesElement()); + } + if (element.hasAvailabilityElement()) + composeEnumeration("availability", element.getAvailabilityElement(), new ImagingStudy.InstanceAvailabilityEnumFactory()); + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + if (element.hasBodySite()) { + composeCoding("bodySite", element.getBodySite()); + } + if (element.hasLaterality()) { + composeCoding("laterality", element.getLaterality()); + } + if (element.hasStartedElement()) { + composeDateTime("started", element.getStartedElement()); + } + if (element.hasPerformer()) { + for (Reference e : element.getPerformer()) + composeReference("performer", e); + } + if (element.hasInstance()) { + for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance()) + composeImagingStudyImagingStudySeriesInstanceComponent("instance", e); + } + } + + protected void composeImagingStudyImagingStudySeriesInstanceComponent(String name, ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImagingStudyImagingStudySeriesInstanceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImagingStudyImagingStudySeriesInstanceComponentElements(ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUidElement()) { + composeOid("uid", element.getUidElement()); + } + if (element.hasNumberElement()) { + composeUnsignedInt("number", element.getNumberElement()); + } + if (element.hasSopClassElement()) { + composeOid("sopClass", element.getSopClassElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + } + + protected void composeImmunization(String name, Immunization element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationElements(Immunization element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory()); + if (element.hasNotGivenElement()) { + composeBoolean("notGiven", element.getNotGivenElement()); + } + if (element.hasVaccineCode()) { + composeCodeableConcept("vaccineCode", element.getVaccineCode()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPrimarySourceElement()) { + composeBoolean("primarySource", element.getPrimarySourceElement()); + } + if (element.hasReportOrigin()) { + composeCodeableConcept("reportOrigin", element.getReportOrigin()); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasManufacturer()) { + composeReference("manufacturer", element.getManufacturer()); + } + if (element.hasLotNumberElement()) { + composeString("lotNumber", element.getLotNumberElement()); + } + if (element.hasExpirationDateElement()) { + composeDate("expirationDate", element.getExpirationDateElement()); + } + if (element.hasSite()) { + composeCodeableConcept("site", element.getSite()); + } + if (element.hasRoute()) { + composeCodeableConcept("route", element.getRoute()); + } + if (element.hasDoseQuantity()) { + composeSimpleQuantity("doseQuantity", element.getDoseQuantity()); + } + if (element.hasPractitioner()) { + for (Immunization.ImmunizationPractitionerComponent e : element.getPractitioner()) + composeImmunizationImmunizationPractitionerComponent("practitioner", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasExplanation()) { + composeImmunizationImmunizationExplanationComponent("explanation", element.getExplanation()); + } + if (element.hasReaction()) { + for (Immunization.ImmunizationReactionComponent e : element.getReaction()) + composeImmunizationImmunizationReactionComponent("reaction", e); + } + if (element.hasVaccinationProtocol()) { + for (Immunization.ImmunizationVaccinationProtocolComponent e : element.getVaccinationProtocol()) + composeImmunizationImmunizationVaccinationProtocolComponent("vaccinationProtocol", e); + } + } + + protected void composeImmunizationImmunizationPractitionerComponent(String name, Immunization.ImmunizationPractitionerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationImmunizationPractitionerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationImmunizationPractitionerComponentElements(Immunization.ImmunizationPractitionerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + } + + protected void composeImmunizationImmunizationExplanationComponent(String name, Immunization.ImmunizationExplanationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationImmunizationExplanationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationImmunizationExplanationComponentElements(Immunization.ImmunizationExplanationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasReasonNotGiven()) { + for (CodeableConcept e : element.getReasonNotGiven()) + composeCodeableConcept("reasonNotGiven", e); + } + } + + protected void composeImmunizationImmunizationReactionComponent(String name, Immunization.ImmunizationReactionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationImmunizationReactionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationImmunizationReactionComponentElements(Immunization.ImmunizationReactionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasDetail()) { + composeReference("detail", element.getDetail()); + } + if (element.hasReportedElement()) { + composeBoolean("reported", element.getReportedElement()); + } + } + + protected void composeImmunizationImmunizationVaccinationProtocolComponent(String name, Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationImmunizationVaccinationProtocolComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationImmunizationVaccinationProtocolComponentElements(Immunization.ImmunizationVaccinationProtocolComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDoseSequenceElement()) { + composePositiveInt("doseSequence", element.getDoseSequenceElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasAuthority()) { + composeReference("authority", element.getAuthority()); + } + if (element.hasSeriesElement()) { + composeString("series", element.getSeriesElement()); + } + if (element.hasSeriesDosesElement()) { + composePositiveInt("seriesDoses", element.getSeriesDosesElement()); + } + if (element.hasTargetDisease()) { + for (CodeableConcept e : element.getTargetDisease()) + composeCodeableConcept("targetDisease", e); + } + if (element.hasDoseStatus()) { + composeCodeableConcept("doseStatus", element.getDoseStatus()); + } + if (element.hasDoseStatusReason()) { + composeCodeableConcept("doseStatusReason", element.getDoseStatusReason()); + } + } + + protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationRecommendationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationRecommendationElements(ImmunizationRecommendation element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasRecommendation()) { + for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent e : element.getRecommendation()) + composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent("recommendation", e); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentElements(ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasVaccineCode()) { + composeCodeableConcept("vaccineCode", element.getVaccineCode()); + } + if (element.hasTargetDisease()) { + composeCodeableConcept("targetDisease", element.getTargetDisease()); + } + if (element.hasDoseNumberElement()) { + composePositiveInt("doseNumber", element.getDoseNumberElement()); + } + if (element.hasForecastStatus()) { + composeCodeableConcept("forecastStatus", element.getForecastStatus()); + } + if (element.hasDateCriterion()) { + for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element.getDateCriterion()) + composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent("dateCriterion", e); + } + if (element.hasProtocol()) { + composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent("protocol", element.getProtocol()); + } + if (element.hasSupportingImmunization()) { + for (Reference e : element.getSupportingImmunization()) + composeReference("supportingImmunization", e); + } + if (element.hasSupportingPatientInformation()) { + for (Reference e : element.getSupportingPatientInformation()) + composeReference("supportingPatientInformation", e); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentElements(ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasValueElement()) { + composeDateTime("value", element.getValueElement()); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponent(String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationProtocolComponentElements(ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDoseSequenceElement()) { + composePositiveInt("doseSequence", element.getDoseSequenceElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasAuthority()) { + composeReference("authority", element.getAuthority()); + } + if (element.hasSeriesElement()) { + composeString("series", element.getSeriesElement()); + } + } + + protected void composeImplementationGuide(String name, ImplementationGuide element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeImplementationGuideElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImplementationGuideElements(ImplementationGuide element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasFhirVersionElement()) { + composeId("fhirVersion", element.getFhirVersionElement()); + } + if (element.hasDependency()) { + for (ImplementationGuide.ImplementationGuideDependencyComponent e : element.getDependency()) + composeImplementationGuideImplementationGuideDependencyComponent("dependency", e); + } + if (element.hasPackage()) { + for (ImplementationGuide.ImplementationGuidePackageComponent e : element.getPackage()) + composeImplementationGuideImplementationGuidePackageComponent("package", e); + } + if (element.hasGlobal()) { + for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal()) + composeImplementationGuideImplementationGuideGlobalComponent("global", e); + } + if (element.hasBinary()) { + for (UriType e : element.getBinary()) + composeUri("binary", e); + } + if (element.hasPage()) { + composeImplementationGuideImplementationGuidePageComponent("page", element.getPage()); + } + } + + protected void composeImplementationGuideImplementationGuideDependencyComponent(String name, ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImplementationGuideImplementationGuideDependencyComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImplementationGuideImplementationGuideDependencyComponentElements(ImplementationGuide.ImplementationGuideDependencyComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new ImplementationGuide.GuideDependencyTypeEnumFactory()); + if (element.hasUriElement()) { + composeUri("uri", element.getUriElement()); + } + } + + protected void composeImplementationGuideImplementationGuidePackageComponent(String name, ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImplementationGuideImplementationGuidePackageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImplementationGuideImplementationGuidePackageComponentElements(ImplementationGuide.ImplementationGuidePackageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasResource()) { + for (ImplementationGuide.ImplementationGuidePackageResourceComponent e : element.getResource()) + composeImplementationGuideImplementationGuidePackageResourceComponent("resource", e); + } + } + + protected void composeImplementationGuideImplementationGuidePackageResourceComponent(String name, ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImplementationGuideImplementationGuidePackageResourceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImplementationGuideImplementationGuidePackageResourceComponentElements(ImplementationGuide.ImplementationGuidePackageResourceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasExampleElement()) { + composeBoolean("example", element.getExampleElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasAcronymElement()) { + composeString("acronym", element.getAcronymElement()); + } + if (element.hasSource()) { + composeType("source", element.getSource()); + } if (element.hasExampleFor()) { + composeReference("exampleFor", element.getExampleFor()); + } + } + + protected void composeImplementationGuideImplementationGuideGlobalComponent(String name, ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImplementationGuideImplementationGuideGlobalComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImplementationGuideImplementationGuideGlobalComponentElements(ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + } + + protected void composeImplementationGuideImplementationGuidePageComponent(String name, ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeImplementationGuideImplementationGuidePageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeImplementationGuideImplementationGuidePageComponentElements(ImplementationGuide.ImplementationGuidePageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSourceElement()) { + composeUri("source", element.getSourceElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new ImplementationGuide.GuidePageKindEnumFactory()); + if (element.hasType()) { + for (CodeType e : element.getType()) + composeCode("type", e); + } + if (element.hasPackage()) { + for (StringType e : element.getPackage()) + composeString("package", e); + } + if (element.hasFormatElement()) { + composeCode("format", element.getFormatElement()); + } + if (element.hasPage()) { + for (ImplementationGuide.ImplementationGuidePageComponent e : element.getPage()) + composeImplementationGuideImplementationGuidePageComponent("page", e); + } + } + + protected void composeLibrary(String name, Library element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeLibraryElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeLibraryElements(Library element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasTopic()) { + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept("topic", e); + } + if (element.hasContributor()) { + for (Contributor e : element.getContributor()) + composeContributor("contributor", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasParameter()) { + for (ParameterDefinition e : element.getParameter()) + composeParameterDefinition("parameter", e); + } + if (element.hasDataRequirement()) { + for (DataRequirement e : element.getDataRequirement()) + composeDataRequirement("dataRequirement", e); + } + if (element.hasContent()) { + for (Attachment e : element.getContent()) + composeAttachment("content", e); + } + } + + protected void composeLinkage(String name, Linkage element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeLinkageElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeLinkageElements(Linkage element) throws IOException { + composeDomainResourceElements(element); + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasItem()) { + for (Linkage.LinkageItemComponent e : element.getItem()) + composeLinkageLinkageItemComponent("item", e); + } + } + + protected void composeLinkageLinkageItemComponent(String name, Linkage.LinkageItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeLinkageLinkageItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeLinkageLinkageItemComponentElements(Linkage.LinkageItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory()); + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + } + + protected void composeListResource(String name, ListResource element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeListResourceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeListResourceElements(ListResource element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory()); + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new ListResource.ListModeEnumFactory()); + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasOrderedBy()) { + composeCodeableConcept("orderedBy", element.getOrderedBy()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasEntry()) { + for (ListResource.ListEntryComponent e : element.getEntry()) + composeListResourceListEntryComponent("entry", e); + } + if (element.hasEmptyReason()) { + composeCodeableConcept("emptyReason", element.getEmptyReason()); + } + } + + protected void composeListResourceListEntryComponent(String name, ListResource.ListEntryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeListResourceListEntryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeListResourceListEntryComponentElements(ListResource.ListEntryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasFlag()) { + composeCodeableConcept("flag", element.getFlag()); + } + if (element.hasDeletedElement()) { + composeBoolean("deleted", element.getDeletedElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasItem()) { + composeReference("item", element.getItem()); + } + } + + protected void composeLocation(String name, Location element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeLocationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeLocationElements(Location element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Location.LocationStatusEnumFactory()); + if (element.hasOperationalStatus()) { + composeCoding("operationalStatus", element.getOperationalStatus()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasAlias()) { + for (StringType e : element.getAlias()) + composeString("alias", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new Location.LocationModeEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasAddress()) { + composeAddress("address", element.getAddress()); + } + if (element.hasPhysicalType()) { + composeCodeableConcept("physicalType", element.getPhysicalType()); + } + if (element.hasPosition()) { + composeLocationLocationPositionComponent("position", element.getPosition()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasPartOf()) { + composeReference("partOf", element.getPartOf()); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + } + + protected void composeLocationLocationPositionComponent(String name, Location.LocationPositionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeLocationLocationPositionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeLocationLocationPositionComponentElements(Location.LocationPositionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLongitudeElement()) { + composeDecimal("longitude", element.getLongitudeElement()); + } + if (element.hasLatitudeElement()) { + composeDecimal("latitude", element.getLatitudeElement()); + } + if (element.hasAltitudeElement()) { + composeDecimal("altitude", element.getAltitudeElement()); + } + } + + protected void composeMeasure(String name, Measure element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureElements(Measure element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasTopic()) { + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept("topic", e); + } + if (element.hasContributor()) { + for (Contributor e : element.getContributor()) + composeContributor("contributor", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasLibrary()) { + for (Reference e : element.getLibrary()) + composeReference("library", e); + } + if (element.hasDisclaimerElement()) { + composeMarkdown("disclaimer", element.getDisclaimerElement()); + } + if (element.hasScoring()) { + composeCodeableConcept("scoring", element.getScoring()); + } + if (element.hasCompositeScoring()) { + composeCodeableConcept("compositeScoring", element.getCompositeScoring()); + } + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasRiskAdjustmentElement()) { + composeString("riskAdjustment", element.getRiskAdjustmentElement()); + } + if (element.hasRateAggregationElement()) { + composeString("rateAggregation", element.getRateAggregationElement()); + } + if (element.hasRationaleElement()) { + composeMarkdown("rationale", element.getRationaleElement()); + } + if (element.hasClinicalRecommendationStatementElement()) { + composeMarkdown("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement()); + } + if (element.hasImprovementNotationElement()) { + composeString("improvementNotation", element.getImprovementNotationElement()); + } + if (element.hasDefinition()) { + for (MarkdownType e : element.getDefinition()) + composeMarkdown("definition", e); + } + if (element.hasGuidanceElement()) { + composeMarkdown("guidance", element.getGuidanceElement()); + } + if (element.hasSetElement()) { + composeString("set", element.getSetElement()); + } + if (element.hasGroup()) { + for (Measure.MeasureGroupComponent e : element.getGroup()) + composeMeasureMeasureGroupComponent("group", e); + } + if (element.hasSupplementalData()) { + for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData()) + composeMeasureMeasureSupplementalDataComponent("supplementalData", e); + } + } + + protected void composeMeasureMeasureGroupComponent(String name, Measure.MeasureGroupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureMeasureGroupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureMeasureGroupComponentElements(Measure.MeasureGroupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasPopulation()) { + for (Measure.MeasureGroupPopulationComponent e : element.getPopulation()) + composeMeasureMeasureGroupPopulationComponent("population", e); + } + if (element.hasStratifier()) { + for (Measure.MeasureGroupStratifierComponent e : element.getStratifier()) + composeMeasureMeasureGroupStratifierComponent("stratifier", e); + } + } + + protected void composeMeasureMeasureGroupPopulationComponent(String name, Measure.MeasureGroupPopulationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureMeasureGroupPopulationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureMeasureGroupPopulationComponentElements(Measure.MeasureGroupPopulationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasCriteriaElement()) { + composeString("criteria", element.getCriteriaElement()); + } + } + + protected void composeMeasureMeasureGroupStratifierComponent(String name, Measure.MeasureGroupStratifierComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureMeasureGroupStratifierComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureMeasureGroupStratifierComponentElements(Measure.MeasureGroupStratifierComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCriteriaElement()) { + composeString("criteria", element.getCriteriaElement()); + } + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + } + + protected void composeMeasureMeasureSupplementalDataComponent(String name, Measure.MeasureSupplementalDataComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureMeasureSupplementalDataComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureMeasureSupplementalDataComponentElements(Measure.MeasureSupplementalDataComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasUsage()) { + for (CodeableConcept e : element.getUsage()) + composeCodeableConcept("usage", e); + } + if (element.hasCriteriaElement()) { + composeString("criteria", element.getCriteriaElement()); + } + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + } + + protected void composeMeasureReport(String name, MeasureReport element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureReportElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureReportElements(MeasureReport element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory()); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory()); + if (element.hasMeasure()) { + composeReference("measure", element.getMeasure()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasReportingOrganization()) { + composeReference("reportingOrganization", element.getReportingOrganization()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasGroup()) { + for (MeasureReport.MeasureReportGroupComponent e : element.getGroup()) + composeMeasureReportMeasureReportGroupComponent("group", e); + } + if (element.hasEvaluatedResources()) { + composeReference("evaluatedResources", element.getEvaluatedResources()); + } + } + + protected void composeMeasureReportMeasureReportGroupComponent(String name, MeasureReport.MeasureReportGroupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureReportMeasureReportGroupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureReportMeasureReportGroupComponentElements(MeasureReport.MeasureReportGroupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasPopulation()) { + for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation()) + composeMeasureReportMeasureReportGroupPopulationComponent("population", e); + } + if (element.hasMeasureScoreElement()) { + composeDecimal("measureScore", element.getMeasureScoreElement()); + } + if (element.hasStratifier()) { + for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier()) + composeMeasureReportMeasureReportGroupStratifierComponent("stratifier", e); + } + } + + protected void composeMeasureReportMeasureReportGroupPopulationComponent(String name, MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureReportMeasureReportGroupPopulationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureReportMeasureReportGroupPopulationComponentElements(MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasCountElement()) { + composeInteger("count", element.getCountElement()); + } + if (element.hasPatients()) { + composeReference("patients", element.getPatients()); + } + } + + protected void composeMeasureReportMeasureReportGroupStratifierComponent(String name, MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureReportMeasureReportGroupStratifierComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureReportMeasureReportGroupStratifierComponentElements(MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStratum()) { + for (MeasureReport.StratifierGroupComponent e : element.getStratum()) + composeMeasureReportStratifierGroupComponent("stratum", e); + } + } + + protected void composeMeasureReportStratifierGroupComponent(String name, MeasureReport.StratifierGroupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureReportStratifierGroupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureReportStratifierGroupComponentElements(MeasureReport.StratifierGroupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + if (element.hasPopulation()) { + for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation()) + composeMeasureReportStratifierGroupPopulationComponent("population", e); + } + if (element.hasMeasureScoreElement()) { + composeDecimal("measureScore", element.getMeasureScoreElement()); + } + } + + protected void composeMeasureReportStratifierGroupPopulationComponent(String name, MeasureReport.StratifierGroupPopulationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMeasureReportStratifierGroupPopulationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMeasureReportStratifierGroupPopulationComponentElements(MeasureReport.StratifierGroupPopulationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasCountElement()) { + composeInteger("count", element.getCountElement()); + } + if (element.hasPatients()) { + composeReference("patients", element.getPatients()); + } + } + + protected void composeMedia(String name, Media element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMediaElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMediaElements(Media element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Media.DigitalMediaTypeEnumFactory()); + if (element.hasSubtype()) { + composeCodeableConcept("subtype", element.getSubtype()); + } + if (element.hasView()) { + composeCodeableConcept("view", element.getView()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasOperator()) { + composeReference("operator", element.getOperator()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasHeightElement()) { + composePositiveInt("height", element.getHeightElement()); + } + if (element.hasWidthElement()) { + composePositiveInt("width", element.getWidthElement()); + } + if (element.hasFramesElement()) { + composePositiveInt("frames", element.getFramesElement()); + } + if (element.hasDurationElement()) { + composeUnsignedInt("duration", element.getDurationElement()); + } + if (element.hasContent()) { + composeAttachment("content", element.getContent()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeMedication(String name, Medication element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationElements(Medication element) throws IOException { + composeDomainResourceElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory()); + if (element.hasIsBrandElement()) { + composeBoolean("isBrand", element.getIsBrandElement()); + } + if (element.hasIsOverTheCounterElement()) { + composeBoolean("isOverTheCounter", element.getIsOverTheCounterElement()); + } + if (element.hasManufacturer()) { + composeReference("manufacturer", element.getManufacturer()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasIngredient()) { + for (Medication.MedicationIngredientComponent e : element.getIngredient()) + composeMedicationMedicationIngredientComponent("ingredient", e); + } + if (element.hasPackage()) { + composeMedicationMedicationPackageComponent("package", element.getPackage()); + } + if (element.hasImage()) { + for (Attachment e : element.getImage()) + composeAttachment("image", e); + } + } + + protected void composeMedicationMedicationIngredientComponent(String name, Medication.MedicationIngredientComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationMedicationIngredientComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationMedicationIngredientComponentElements(Medication.MedicationIngredientComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasItem()) { + composeType("item", element.getItem()); + } if (element.hasIsActiveElement()) { + composeBoolean("isActive", element.getIsActiveElement()); + } + if (element.hasAmount()) { + composeRatio("amount", element.getAmount()); + } + } + + protected void composeMedicationMedicationPackageComponent(String name, Medication.MedicationPackageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationMedicationPackageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationMedicationPackageComponentElements(Medication.MedicationPackageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContainer()) { + composeCodeableConcept("container", element.getContainer()); + } + if (element.hasContent()) { + for (Medication.MedicationPackageContentComponent e : element.getContent()) + composeMedicationMedicationPackageContentComponent("content", e); + } + if (element.hasBatch()) { + for (Medication.MedicationPackageBatchComponent e : element.getBatch()) + composeMedicationMedicationPackageBatchComponent("batch", e); + } + } + + protected void composeMedicationMedicationPackageContentComponent(String name, Medication.MedicationPackageContentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationMedicationPackageContentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationMedicationPackageContentComponentElements(Medication.MedicationPackageContentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasItem()) { + composeType("item", element.getItem()); + } if (element.hasAmount()) { + composeSimpleQuantity("amount", element.getAmount()); + } + } + + protected void composeMedicationMedicationPackageBatchComponent(String name, Medication.MedicationPackageBatchComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationMedicationPackageBatchComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationMedicationPackageBatchComponentElements(Medication.MedicationPackageBatchComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLotNumberElement()) { + composeString("lotNumber", element.getLotNumberElement()); + } + if (element.hasExpirationDateElement()) { + composeDateTime("expirationDate", element.getExpirationDateElement()); + } + } + + protected void composeMedicationAdministration(String name, MedicationAdministration element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationAdministrationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationAdministrationElements(MedicationAdministration element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new MedicationAdministration.MedicationAdministrationStatusEnumFactory()); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSupportingInformation()) { + for (Reference e : element.getSupportingInformation()) + composeReference("supportingInformation", e); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } if (element.hasPerformer()) { + for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer()) + composeMedicationAdministrationMedicationAdministrationPerformerComponent("performer", e); + } + if (element.hasNotGivenElement()) { + composeBoolean("notGiven", element.getNotGivenElement()); + } + if (element.hasReasonNotGiven()) { + for (CodeableConcept e : element.getReasonNotGiven()) + composeCodeableConcept("reasonNotGiven", e); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasDevice()) { + for (Reference e : element.getDevice()) + composeReference("device", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasDosage()) { + composeMedicationAdministrationMedicationAdministrationDosageComponent("dosage", element.getDosage()); + } + if (element.hasEventHistory()) { + for (Reference e : element.getEventHistory()) + composeReference("eventHistory", e); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(String name, MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationAdministrationMedicationAdministrationPerformerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationPerformerComponentElements(MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(String name, MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationAdministrationMedicationAdministrationDosageComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationAdministrationMedicationAdministrationDosageComponentElements(MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasSite()) { + composeCodeableConcept("site", element.getSite()); + } + if (element.hasRoute()) { + composeCodeableConcept("route", element.getRoute()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasDose()) { + composeSimpleQuantity("dose", element.getDose()); + } + if (element.hasRate()) { + composeType("rate", element.getRate()); + } } + + protected void composeMedicationDispense(String name, MedicationDispense element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationDispenseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationDispenseElements(MedicationDispense element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new MedicationDispense.MedicationDispenseStatusEnumFactory()); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSupportingInformation()) { + for (Reference e : element.getSupportingInformation()) + composeReference("supportingInformation", e); + } + if (element.hasPerformer()) { + for (MedicationDispense.MedicationDispensePerformerComponent e : element.getPerformer()) + composeMedicationDispenseMedicationDispensePerformerComponent("performer", e); + } + if (element.hasAuthorizingPrescription()) { + for (Reference e : element.getAuthorizingPrescription()) + composeReference("authorizingPrescription", e); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasDaysSupply()) { + composeSimpleQuantity("daysSupply", element.getDaysSupply()); + } + if (element.hasWhenPreparedElement()) { + composeDateTime("whenPrepared", element.getWhenPreparedElement()); + } + if (element.hasWhenHandedOverElement()) { + composeDateTime("whenHandedOver", element.getWhenHandedOverElement()); + } + if (element.hasDestination()) { + composeReference("destination", element.getDestination()); + } + if (element.hasReceiver()) { + for (Reference e : element.getReceiver()) + composeReference("receiver", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasDosageInstruction()) { + for (Dosage e : element.getDosageInstruction()) + composeDosage("dosageInstruction", e); + } + if (element.hasSubstitution()) { + composeMedicationDispenseMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution()); + } + if (element.hasDetectedIssue()) { + for (Reference e : element.getDetectedIssue()) + composeReference("detectedIssue", e); + } + if (element.hasNotDoneElement()) { + composeBoolean("notDone", element.getNotDoneElement()); + } + if (element.hasNotDoneReason()) { + composeType("notDoneReason", element.getNotDoneReason()); + } if (element.hasEventHistory()) { + for (Reference e : element.getEventHistory()) + composeReference("eventHistory", e); + } + } + + protected void composeMedicationDispenseMedicationDispensePerformerComponent(String name, MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationDispenseMedicationDispensePerformerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationDispenseMedicationDispensePerformerComponentElements(MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(String name, MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationDispenseMedicationDispenseSubstitutionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationDispenseMedicationDispenseSubstitutionComponentElements(MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasWasSubstitutedElement()) { + composeBoolean("wasSubstituted", element.getWasSubstitutedElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasResponsibleParty()) { + for (Reference e : element.getResponsibleParty()) + composeReference("responsibleParty", e); + } + } + + protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationRequestElements(MedicationRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new MedicationRequest.MedicationRequestStatusEnumFactory()); + if (element.hasIntentElement()) + composeEnumeration("intent", element.getIntentElement(), new MedicationRequest.MedicationRequestIntentEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new MedicationRequest.MedicationRequestPriorityEnumFactory()); + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasSupportingInformation()) { + for (Reference e : element.getSupportingInformation()) + composeReference("supportingInformation", e); + } + if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasRequester()) { + composeMedicationRequestMedicationRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasRecorder()) { + composeReference("recorder", element.getRecorder()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasDosageInstruction()) { + for (Dosage e : element.getDosageInstruction()) + composeDosage("dosageInstruction", e); + } + if (element.hasDispenseRequest()) { + composeMedicationRequestMedicationRequestDispenseRequestComponent("dispenseRequest", element.getDispenseRequest()); + } + if (element.hasSubstitution()) { + composeMedicationRequestMedicationRequestSubstitutionComponent("substitution", element.getSubstitution()); + } + if (element.hasPriorPrescription()) { + composeReference("priorPrescription", element.getPriorPrescription()); + } + if (element.hasDetectedIssue()) { + for (Reference e : element.getDetectedIssue()) + composeReference("detectedIssue", e); + } + if (element.hasEventHistory()) { + for (Reference e : element.getEventHistory()) + composeReference("eventHistory", e); + } + } + + protected void composeMedicationRequestMedicationRequestRequesterComponent(String name, MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationRequestMedicationRequestRequesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationRequestMedicationRequestRequesterComponentElements(MedicationRequest.MedicationRequestRequesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(String name, MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationRequestMedicationRequestDispenseRequestComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationRequestMedicationRequestDispenseRequestComponentElements(MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasValidityPeriod()) { + composePeriod("validityPeriod", element.getValidityPeriod()); + } + if (element.hasNumberOfRepeatsAllowedElement()) { + composeUnsignedInt("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasExpectedSupplyDuration()) { + composeDuration("expectedSupplyDuration", element.getExpectedSupplyDuration()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + } + + protected void composeMedicationRequestMedicationRequestSubstitutionComponent(String name, MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationRequestMedicationRequestSubstitutionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationRequestMedicationRequestSubstitutionComponentElements(MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAllowedElement()) { + composeBoolean("allowed", element.getAllowedElement()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + } + + protected void composeMedicationStatement(String name, MedicationStatement element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMedicationStatementElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMedicationStatementElements(MedicationStatement element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new MedicationStatement.MedicationStatementStatusEnumFactory()); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasMedication()) { + composeType("medication", element.getMedication()); + } if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } if (element.hasDateAssertedElement()) { + composeDateTime("dateAsserted", element.getDateAssertedElement()); + } + if (element.hasInformationSource()) { + composeReference("informationSource", element.getInformationSource()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasDerivedFrom()) { + for (Reference e : element.getDerivedFrom()) + composeReference("derivedFrom", e); + } + if (element.hasTakenElement()) + composeEnumeration("taken", element.getTakenElement(), new MedicationStatement.MedicationStatementTakenEnumFactory()); + if (element.hasReasonNotTaken()) { + for (CodeableConcept e : element.getReasonNotTaken()) + composeCodeableConcept("reasonNotTaken", e); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasDosage()) { + for (Dosage e : element.getDosage()) + composeDosage("dosage", e); + } + } + + protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageDefinitionElements(MessageDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasBase()) { + composeReference("base", element.getBase()); + } + if (element.hasParent()) { + for (Reference e : element.getParent()) + composeReference("parent", e); + } + if (element.hasReplaces()) { + for (Reference e : element.getReplaces()) + composeReference("replaces", e); + } + if (element.hasEventElement()) { + composeUri("event", element.getEventElement()); + } + if (element.hasCategoryElement()) + composeEnumeration("category", element.getCategoryElement(), new MessageDefinition.MessageSignificanceCategoryEnumFactory()); + if (element.hasFocus()) { + for (MessageDefinition.MessageDefinitionFocusComponent e : element.getFocus()) + composeMessageDefinitionMessageDefinitionFocusComponent("focus", e); + } + if (element.hasResponseRequiredElement()) { + composeBoolean("responseRequired", element.getResponseRequiredElement()); + } + if (element.hasAllowedResponse()) { + for (MessageDefinition.MessageDefinitionAllowedResponseComponent e : element.getAllowedResponse()) + composeMessageDefinitionMessageDefinitionAllowedResponseComponent("allowedResponse", e); + } + } + + protected void composeMessageDefinitionMessageDefinitionFocusComponent(String name, MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageDefinitionMessageDefinitionFocusComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageDefinitionMessageDefinitionFocusComponentElements(MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + if (element.hasMinElement()) { + composeUnsignedInt("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + } + + protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(String name, MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageDefinitionMessageDefinitionAllowedResponseComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponentElements(MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMessage()) { + composeReference("message", element.getMessage()); + } + if (element.hasSituationElement()) { + composeMarkdown("situation", element.getSituationElement()); + } + } + + protected void composeMessageHeader(String name, MessageHeader element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageHeaderElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageHeaderElements(MessageHeader element) throws IOException { + composeDomainResourceElements(element); + if (element.hasEvent()) { + composeCoding("event", element.getEvent()); + } + if (element.hasDestination()) { + for (MessageHeader.MessageDestinationComponent e : element.getDestination()) + composeMessageHeaderMessageDestinationComponent("destination", e); + } + if (element.hasSender()) { + composeReference("sender", element.getSender()); + } + if (element.hasTimestampElement()) { + composeInstant("timestamp", element.getTimestampElement()); + } + if (element.hasEnterer()) { + composeReference("enterer", element.getEnterer()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasSource()) { + composeMessageHeaderMessageSourceComponent("source", element.getSource()); + } + if (element.hasResponsible()) { + composeReference("responsible", element.getResponsible()); + } + if (element.hasReason()) { + composeCodeableConcept("reason", element.getReason()); + } + if (element.hasResponse()) { + composeMessageHeaderMessageHeaderResponseComponent("response", element.getResponse()); + } + if (element.hasFocus()) { + for (Reference e : element.getFocus()) + composeReference("focus", e); + } + if (element.hasDefinitionElement()) { + composeUri("definition", element.getDefinitionElement()); + } + } + + protected void composeMessageHeaderMessageDestinationComponent(String name, MessageHeader.MessageDestinationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageHeaderMessageDestinationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageHeaderMessageDestinationComponentElements(MessageHeader.MessageDestinationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasEndpointElement()) { + composeUri("endpoint", element.getEndpointElement()); + } + if (element.hasReceiver()) { + composeReference("receiver", element.getReceiver()); + } + } + + protected void composeMessageHeaderMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageHeaderMessageSourceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageHeaderMessageSourceComponentElements(MessageHeader.MessageSourceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasSoftwareElement()) { + composeString("software", element.getSoftwareElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasContact()) { + composeContactPoint("contact", element.getContact()); + } + if (element.hasEndpointElement()) { + composeUri("endpoint", element.getEndpointElement()); + } + } + + protected void composeMessageHeaderMessageHeaderResponseComponent(String name, MessageHeader.MessageHeaderResponseComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeMessageHeaderMessageHeaderResponseComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeMessageHeaderMessageHeaderResponseComponentElements(MessageHeader.MessageHeaderResponseComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifierElement()) { + composeId("identifier", element.getIdentifierElement()); + } + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory()); + if (element.hasDetails()) { + composeReference("details", element.getDetails()); + } + } + + protected void composeNamingSystem(String name, NamingSystem element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeNamingSystemElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNamingSystemElements(NamingSystem element) throws IOException { + composeDomainResourceElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory()); + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasResponsibleElement()) { + composeString("responsible", element.getResponsibleElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasUniqueId()) { + for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId()) + composeNamingSystemNamingSystemUniqueIdComponent("uniqueId", e); + } + if (element.hasReplacedBy()) { + composeReference("replacedBy", element.getReplacedBy()); + } + } + + protected void composeNamingSystemNamingSystemUniqueIdComponent(String name, NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNamingSystemNamingSystemUniqueIdComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNamingSystemNamingSystemUniqueIdComponentElements(NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory()); + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + if (element.hasPreferredElement()) { + composeBoolean("preferred", element.getPreferredElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderElements(NutritionOrder element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory()); + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateTimeElement()) { + composeDateTime("dateTime", element.getDateTimeElement()); + } + if (element.hasOrderer()) { + composeReference("orderer", element.getOrderer()); + } + if (element.hasAllergyIntolerance()) { + for (Reference e : element.getAllergyIntolerance()) + composeReference("allergyIntolerance", e); + } + if (element.hasFoodPreferenceModifier()) { + for (CodeableConcept e : element.getFoodPreferenceModifier()) + composeCodeableConcept("foodPreferenceModifier", e); + } + if (element.hasExcludeFoodModifier()) { + for (CodeableConcept e : element.getExcludeFoodModifier()) + composeCodeableConcept("excludeFoodModifier", e); + } + if (element.hasOralDiet()) { + composeNutritionOrderNutritionOrderOralDietComponent("oralDiet", element.getOralDiet()); + } + if (element.hasSupplement()) { + for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement()) + composeNutritionOrderNutritionOrderSupplementComponent("supplement", e); + } + if (element.hasEnteralFormula()) { + composeNutritionOrderNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula()); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietComponent(String name, NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderNutritionOrderOralDietComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietComponentElements(NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasSchedule()) { + for (Timing e : element.getSchedule()) + composeTiming("schedule", e); + } + if (element.hasNutrient()) { + for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient()) + composeNutritionOrderNutritionOrderOralDietNutrientComponent("nutrient", e); + } + if (element.hasTexture()) { + for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture()) + composeNutritionOrderNutritionOrderOralDietTextureComponent("texture", e); + } + if (element.hasFluidConsistencyType()) { + for (CodeableConcept e : element.getFluidConsistencyType()) + composeCodeableConcept("fluidConsistencyType", e); + } + if (element.hasInstructionElement()) { + composeString("instruction", element.getInstructionElement()); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(String name, NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderNutritionOrderOralDietNutrientComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietNutrientComponentElements(NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModifier()) { + composeCodeableConcept("modifier", element.getModifier()); + } + if (element.hasAmount()) { + composeSimpleQuantity("amount", element.getAmount()); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(String name, NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderNutritionOrderOralDietTextureComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderNutritionOrderOralDietTextureComponentElements(NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasModifier()) { + composeCodeableConcept("modifier", element.getModifier()); + } + if (element.hasFoodType()) { + composeCodeableConcept("foodType", element.getFoodType()); + } + } + + protected void composeNutritionOrderNutritionOrderSupplementComponent(String name, NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderNutritionOrderSupplementComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderNutritionOrderSupplementComponentElements(NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasProductNameElement()) { + composeString("productName", element.getProductNameElement()); + } + if (element.hasSchedule()) { + for (Timing e : element.getSchedule()) + composeTiming("schedule", e); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasInstructionElement()) { + composeString("instruction", element.getInstructionElement()); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderNutritionOrderEnteralFormulaComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaComponentElements(NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasBaseFormulaType()) { + composeCodeableConcept("baseFormulaType", element.getBaseFormulaType()); + } + if (element.hasBaseFormulaProductNameElement()) { + composeString("baseFormulaProductName", element.getBaseFormulaProductNameElement()); + } + if (element.hasAdditiveType()) { + composeCodeableConcept("additiveType", element.getAdditiveType()); + } + if (element.hasAdditiveProductNameElement()) { + composeString("additiveProductName", element.getAdditiveProductNameElement()); + } + if (element.hasCaloricDensity()) { + composeSimpleQuantity("caloricDensity", element.getCaloricDensity()); + } + if (element.hasRouteofAdministration()) { + composeCodeableConcept("routeofAdministration", element.getRouteofAdministration()); + } + if (element.hasAdministration()) { + for (NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent e : element.getAdministration()) + composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent("administration", e); + } + if (element.hasMaxVolumeToDeliver()) { + composeSimpleQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver()); + } + if (element.hasAdministrationInstructionElement()) { + composeString("administrationInstruction", element.getAdministrationInstructionElement()); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(String name, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentElements(NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSchedule()) { + composeTiming("schedule", element.getSchedule()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasRate()) { + composeType("rate", element.getRate()); + } } + + protected void composeObservation(String name, Observation element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeObservationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeObservationElements(Observation element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasEffective()) { + composeType("effective", element.getEffective()); + } if (element.hasIssuedElement()) { + composeInstant("issued", element.getIssuedElement()); + } + if (element.hasPerformer()) { + for (Reference e : element.getPerformer()) + composeReference("performer", e); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasDataAbsentReason()) { + composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); + } + if (element.hasInterpretation()) { + composeCodeableConcept("interpretation", element.getInterpretation()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasSpecimen()) { + composeReference("specimen", element.getSpecimen()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasReferenceRange()) { + for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) + composeObservationObservationReferenceRangeComponent("referenceRange", e); + } + if (element.hasRelated()) { + for (Observation.ObservationRelatedComponent e : element.getRelated()) + composeObservationObservationRelatedComponent("related", e); + } + if (element.hasComponent()) { + for (Observation.ObservationComponentComponent e : element.getComponent()) + composeObservationObservationComponentComponent("component", e); + } + } + + protected void composeObservationObservationReferenceRangeComponent(String name, Observation.ObservationReferenceRangeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeObservationObservationReferenceRangeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeObservationObservationReferenceRangeComponentElements(Observation.ObservationReferenceRangeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLow()) { + composeSimpleQuantity("low", element.getLow()); + } + if (element.hasHigh()) { + composeSimpleQuantity("high", element.getHigh()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasAppliesTo()) { + for (CodeableConcept e : element.getAppliesTo()) + composeCodeableConcept("appliesTo", e); + } + if (element.hasAge()) { + composeRange("age", element.getAge()); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + } + + protected void composeObservationObservationRelatedComponent(String name, Observation.ObservationRelatedComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeObservationObservationRelatedComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeObservationObservationRelatedComponentElements(Observation.ObservationRelatedComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Observation.ObservationRelationshipTypeEnumFactory()); + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + } + + protected void composeObservationObservationComponentComponent(String name, Observation.ObservationComponentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeObservationObservationComponentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeObservationObservationComponentComponentElements(Observation.ObservationComponentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasDataAbsentReason()) { + composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); + } + if (element.hasInterpretation()) { + composeCodeableConcept("interpretation", element.getInterpretation()); + } + if (element.hasReferenceRange()) { + for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) + composeObservationObservationReferenceRangeComponent("referenceRange", e); + } + } + + protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeOperationDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOperationDefinitionElements(OperationDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasIdempotentElement()) { + composeBoolean("idempotent", element.getIdempotentElement()); + } + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + if (element.hasBase()) { + composeReference("base", element.getBase()); + } + if (element.hasResource()) { + for (CodeType e : element.getResource()) + composeCode("resource", e); + } + if (element.hasSystemElement()) { + composeBoolean("system", element.getSystemElement()); + } + if (element.hasTypeElement()) { + composeBoolean("type", element.getTypeElement()); + } + if (element.hasInstanceElement()) { + composeBoolean("instance", element.getInstanceElement()); + } + if (element.hasParameter()) { + for (OperationDefinition.OperationDefinitionParameterComponent e : element.getParameter()) + composeOperationDefinitionOperationDefinitionParameterComponent("parameter", e); + } + if (element.hasOverload()) { + for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload()) + composeOperationDefinitionOperationDefinitionOverloadComponent("overload", e); + } + } + + protected void composeOperationDefinitionOperationDefinitionParameterComponent(String name, OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeOperationDefinitionOperationDefinitionParameterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOperationDefinitionOperationDefinitionParameterComponentElements(OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeCode("name", element.getNameElement()); + } + if (element.hasUseElement()) + composeEnumeration("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory()); + if (element.hasMinElement()) { + composeInteger("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasSearchTypeElement()) + composeEnumeration("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); + if (element.hasProfile()) { + composeReference("profile", element.getProfile()); + } + if (element.hasBinding()) { + composeOperationDefinitionOperationDefinitionParameterBindingComponent("binding", element.getBinding()); + } + if (element.hasPart()) { + for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart()) + composeOperationDefinitionOperationDefinitionParameterComponent("part", e); + } + } + + protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(String name, OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeOperationDefinitionOperationDefinitionParameterBindingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOperationDefinitionOperationDefinitionParameterBindingComponentElements(OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStrengthElement()) + composeEnumeration("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory()); + if (element.hasValueSet()) { + composeType("valueSet", element.getValueSet()); + } } + + protected void composeOperationDefinitionOperationDefinitionOverloadComponent(String name, OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeOperationDefinitionOperationDefinitionOverloadComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOperationDefinitionOperationDefinitionOverloadComponentElements(OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasParameterName()) { + for (StringType e : element.getParameterName()) + composeString("parameterName", e); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeOperationOutcome(String name, OperationOutcome element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeOperationOutcomeElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOperationOutcomeElements(OperationOutcome element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIssue()) { + for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue()) + composeOperationOutcomeOperationOutcomeIssueComponent("issue", e); + } + } + + protected void composeOperationOutcomeOperationOutcomeIssueComponent(String name, OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeOperationOutcomeOperationOutcomeIssueComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOperationOutcomeOperationOutcomeIssueComponentElements(OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSeverityElement()) + composeEnumeration("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory()); + if (element.hasCodeElement()) + composeEnumeration("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory()); + if (element.hasDetails()) { + composeCodeableConcept("details", element.getDetails()); + } + if (element.hasDiagnosticsElement()) { + composeString("diagnostics", element.getDiagnosticsElement()); + } + if (element.hasLocation()) { + for (StringType e : element.getLocation()) + composeString("location", e); + } + if (element.hasExpression()) { + for (StringType e : element.getExpression()) + composeString("expression", e); + } + } + + protected void composeOrganization(String name, Organization element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeOrganizationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOrganizationElements(Organization element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasType()) { + for (CodeableConcept e : element.getType()) + composeCodeableConcept("type", e); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasAlias()) { + for (StringType e : element.getAlias()) + composeString("alias", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasAddress()) { + for (Address e : element.getAddress()) + composeAddress("address", e); + } + if (element.hasPartOf()) { + composeReference("partOf", element.getPartOf()); + } + if (element.hasContact()) { + for (Organization.OrganizationContactComponent e : element.getContact()) + composeOrganizationOrganizationContactComponent("contact", e); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + } + + protected void composeOrganizationOrganizationContactComponent(String name, Organization.OrganizationContactComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeOrganizationOrganizationContactComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeOrganizationOrganizationContactComponentElements(Organization.OrganizationContactComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPurpose()) { + composeCodeableConcept("purpose", element.getPurpose()); + } + if (element.hasName()) { + composeHumanName("name", element.getName()); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasAddress()) { + composeAddress("address", element.getAddress()); + } + } + + protected void composePatient(String name, Patient element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePatientElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePatientElements(Patient element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasName()) { + for (HumanName e : element.getName()) + composeHumanName("name", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasGenderElement()) + composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); + if (element.hasBirthDateElement()) { + composeDate("birthDate", element.getBirthDateElement()); + } + if (element.hasDeceased()) { + composeType("deceased", element.getDeceased()); + } if (element.hasAddress()) { + for (Address e : element.getAddress()) + composeAddress("address", e); + } + if (element.hasMaritalStatus()) { + composeCodeableConcept("maritalStatus", element.getMaritalStatus()); + } + if (element.hasMultipleBirth()) { + composeType("multipleBirth", element.getMultipleBirth()); + } if (element.hasPhoto()) { + for (Attachment e : element.getPhoto()) + composeAttachment("photo", e); + } + if (element.hasContact()) { + for (Patient.ContactComponent e : element.getContact()) + composePatientContactComponent("contact", e); + } + if (element.hasAnimal()) { + composePatientAnimalComponent("animal", element.getAnimal()); + } + if (element.hasCommunication()) { + for (Patient.PatientCommunicationComponent e : element.getCommunication()) + composePatientPatientCommunicationComponent("communication", e); + } + if (element.hasGeneralPractitioner()) { + for (Reference e : element.getGeneralPractitioner()) + composeReference("generalPractitioner", e); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasLink()) { + for (Patient.PatientLinkComponent e : element.getLink()) + composePatientPatientLinkComponent("link", e); + } + } + + protected void composePatientContactComponent(String name, Patient.ContactComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePatientContactComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePatientContactComponentElements(Patient.ContactComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRelationship()) { + for (CodeableConcept e : element.getRelationship()) + composeCodeableConcept("relationship", e); + } + if (element.hasName()) { + composeHumanName("name", element.getName()); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasAddress()) { + composeAddress("address", element.getAddress()); + } + if (element.hasGenderElement()) + composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composePatientAnimalComponent(String name, Patient.AnimalComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePatientAnimalComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePatientAnimalComponentElements(Patient.AnimalComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSpecies()) { + composeCodeableConcept("species", element.getSpecies()); + } + if (element.hasBreed()) { + composeCodeableConcept("breed", element.getBreed()); + } + if (element.hasGenderStatus()) { + composeCodeableConcept("genderStatus", element.getGenderStatus()); + } + } + + protected void composePatientPatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePatientPatientCommunicationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePatientPatientCommunicationComponentElements(Patient.PatientCommunicationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLanguage()) { + composeCodeableConcept("language", element.getLanguage()); + } + if (element.hasPreferredElement()) { + composeBoolean("preferred", element.getPreferredElement()); + } + } + + protected void composePatientPatientLinkComponent(String name, Patient.PatientLinkComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePatientPatientLinkComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePatientPatientLinkComponentElements(Patient.PatientLinkComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOther()) { + composeReference("other", element.getOther()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory()); + } + + protected void composePaymentNotice(String name, PaymentNotice element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePaymentNoticeElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePaymentNoticeElements(PaymentNotice element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory()); + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasStatusDateElement()) { + composeDate("statusDate", element.getStatusDateElement()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasPaymentStatus()) { + composeCodeableConcept("paymentStatus", element.getPaymentStatus()); + } + } + + protected void composePaymentReconciliation(String name, PaymentReconciliation element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePaymentReconciliationElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePaymentReconciliationElements(PaymentReconciliation element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new PaymentReconciliation.PaymentReconciliationStatusEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory()); + if (element.hasDispositionElement()) { + composeString("disposition", element.getDispositionElement()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasDetail()) { + for (PaymentReconciliation.DetailsComponent e : element.getDetail()) + composePaymentReconciliationDetailsComponent("detail", e); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasTotal()) { + composeMoney("total", element.getTotal()); + } + if (element.hasProcessNote()) { + for (PaymentReconciliation.NotesComponent e : element.getProcessNote()) + composePaymentReconciliationNotesComponent("processNote", e); + } + } + + protected void composePaymentReconciliationDetailsComponent(String name, PaymentReconciliation.DetailsComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePaymentReconciliationDetailsComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePaymentReconciliationDetailsComponentElements(PaymentReconciliation.DetailsComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasSubmitter()) { + composeReference("submitter", element.getSubmitter()); + } + if (element.hasPayee()) { + composeReference("payee", element.getPayee()); + } + if (element.hasDateElement()) { + composeDate("date", element.getDateElement()); + } + if (element.hasAmount()) { + composeMoney("amount", element.getAmount()); + } + } + + protected void composePaymentReconciliationNotesComponent(String name, PaymentReconciliation.NotesComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePaymentReconciliationNotesComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePaymentReconciliationNotesComponentElements(PaymentReconciliation.NotesComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + } + + protected void composePerson(String name, Person element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePersonElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePersonElements(Person element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasName()) { + for (HumanName e : element.getName()) + composeHumanName("name", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasGenderElement()) + composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); + if (element.hasBirthDateElement()) { + composeDate("birthDate", element.getBirthDateElement()); + } + if (element.hasAddress()) { + for (Address e : element.getAddress()) + composeAddress("address", e); + } + if (element.hasPhoto()) { + composeAttachment("photo", element.getPhoto()); + } + if (element.hasManagingOrganization()) { + composeReference("managingOrganization", element.getManagingOrganization()); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasLink()) { + for (Person.PersonLinkComponent e : element.getLink()) + composePersonPersonLinkComponent("link", e); + } + } + + protected void composePersonPersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePersonPersonLinkComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePersonPersonLinkComponentElements(Person.PersonLinkComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasAssuranceElement()) + composeEnumeration("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory()); + } + + protected void composePlanDefinition(String name, PlanDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionElements(PlanDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasTopic()) { + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept("topic", e); + } + if (element.hasContributor()) { + for (Contributor e : element.getContributor()) + composeContributor("contributor", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasLibrary()) { + for (Reference e : element.getLibrary()) + composeReference("library", e); + } + if (element.hasGoal()) { + for (PlanDefinition.PlanDefinitionGoalComponent e : element.getGoal()) + composePlanDefinitionPlanDefinitionGoalComponent("goal", e); + } + if (element.hasAction()) { + for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) + composePlanDefinitionPlanDefinitionActionComponent("action", e); + } + } + + protected void composePlanDefinitionPlanDefinitionGoalComponent(String name, PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionGoalComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionGoalComponentElements(PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasDescription()) { + composeCodeableConcept("description", element.getDescription()); + } + if (element.hasPriority()) { + composeCodeableConcept("priority", element.getPriority()); + } + if (element.hasStart()) { + composeCodeableConcept("start", element.getStart()); + } + if (element.hasAddresses()) { + for (CodeableConcept e : element.getAddresses()) + composeCodeableConcept("addresses", e); + } + if (element.hasDocumentation()) { + for (RelatedArtifact e : element.getDocumentation()) + composeRelatedArtifact("documentation", e); + } + if (element.hasTarget()) { + for (PlanDefinition.PlanDefinitionGoalTargetComponent e : element.getTarget()) + composePlanDefinitionPlanDefinitionGoalTargetComponent("target", e); + } + } + + protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(String name, PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionGoalTargetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionGoalTargetComponentElements(PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasMeasure()) { + composeCodeableConcept("measure", element.getMeasure()); + } + if (element.hasDetail()) { + composeType("detail", element.getDetail()); + } if (element.hasDue()) { + composeDuration("due", element.getDue()); + } + } + + protected void composePlanDefinitionPlanDefinitionActionComponent(String name, PlanDefinition.PlanDefinitionActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionActionComponentElements(PlanDefinition.PlanDefinitionActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPrefixElement()) { + composeString("prefix", element.getPrefixElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasTextEquivalentElement()) { + composeString("textEquivalent", element.getTextEquivalentElement()); + } + if (element.hasCode()) { + for (CodeableConcept e : element.getCode()) + composeCodeableConcept("code", e); + } + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasDocumentation()) { + for (RelatedArtifact e : element.getDocumentation()) + composeRelatedArtifact("documentation", e); + } + if (element.hasGoalId()) { + for (IdType e : element.getGoalId()) + composeId("goalId", e); + } + if (element.hasTriggerDefinition()) { + for (TriggerDefinition e : element.getTriggerDefinition()) + composeTriggerDefinition("triggerDefinition", e); + } + if (element.hasCondition()) { + for (PlanDefinition.PlanDefinitionActionConditionComponent e : element.getCondition()) + composePlanDefinitionPlanDefinitionActionConditionComponent("condition", e); + } + if (element.hasInput()) { + for (DataRequirement e : element.getInput()) + composeDataRequirement("input", e); + } + if (element.hasOutput()) { + for (DataRequirement e : element.getOutput()) + composeDataRequirement("output", e); + } + if (element.hasRelatedAction()) { + for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction()) + composePlanDefinitionPlanDefinitionActionRelatedActionComponent("relatedAction", e); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasParticipant()) { + for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant()) + composePlanDefinitionPlanDefinitionActionParticipantComponent("participant", e); + } + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasGroupingBehaviorElement()) + composeEnumeration("groupingBehavior", element.getGroupingBehaviorElement(), new PlanDefinition.ActionGroupingBehaviorEnumFactory()); + if (element.hasSelectionBehaviorElement()) + composeEnumeration("selectionBehavior", element.getSelectionBehaviorElement(), new PlanDefinition.ActionSelectionBehaviorEnumFactory()); + if (element.hasRequiredBehaviorElement()) + composeEnumeration("requiredBehavior", element.getRequiredBehaviorElement(), new PlanDefinition.ActionRequiredBehaviorEnumFactory()); + if (element.hasPrecheckBehaviorElement()) + composeEnumeration("precheckBehavior", element.getPrecheckBehaviorElement(), new PlanDefinition.ActionPrecheckBehaviorEnumFactory()); + if (element.hasCardinalityBehaviorElement()) + composeEnumeration("cardinalityBehavior", element.getCardinalityBehaviorElement(), new PlanDefinition.ActionCardinalityBehaviorEnumFactory()); + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + if (element.hasTransform()) { + composeReference("transform", element.getTransform()); + } + if (element.hasDynamicValue()) { + for (PlanDefinition.PlanDefinitionActionDynamicValueComponent e : element.getDynamicValue()) + composePlanDefinitionPlanDefinitionActionDynamicValueComponent("dynamicValue", e); + } + if (element.hasAction()) { + for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) + composePlanDefinitionPlanDefinitionActionComponent("action", e); + } + } + + protected void composePlanDefinitionPlanDefinitionActionConditionComponent(String name, PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionActionConditionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionActionConditionComponentElements(PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory()); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasLanguageElement()) { + composeString("language", element.getLanguageElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + } + + protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(String name, PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionActionRelatedActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponentElements(PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasActionIdElement()) { + composeId("actionId", element.getActionIdElement()); + } + if (element.hasRelationshipElement()) + composeEnumeration("relationship", element.getRelationshipElement(), new PlanDefinition.ActionRelationshipTypeEnumFactory()); + if (element.hasOffset()) { + composeType("offset", element.getOffset()); + } } + + protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(String name, PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionActionParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionActionParticipantComponentElements(PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory()); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + } + + protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(String name, PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePlanDefinitionPlanDefinitionActionDynamicValueComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponentElements(PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasLanguageElement()) { + composeString("language", element.getLanguageElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + } + + protected void composePractitioner(String name, Practitioner element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePractitionerElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePractitionerElements(Practitioner element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasName()) { + for (HumanName e : element.getName()) + composeHumanName("name", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasAddress()) { + for (Address e : element.getAddress()) + composeAddress("address", e); + } + if (element.hasGenderElement()) + composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); + if (element.hasBirthDateElement()) { + composeDate("birthDate", element.getBirthDateElement()); + } + if (element.hasPhoto()) { + for (Attachment e : element.getPhoto()) + composeAttachment("photo", e); + } + if (element.hasQualification()) { + for (Practitioner.PractitionerQualificationComponent e : element.getQualification()) + composePractitionerPractitionerQualificationComponent("qualification", e); + } + if (element.hasCommunication()) { + for (CodeableConcept e : element.getCommunication()) + composeCodeableConcept("communication", e); + } + } + + protected void composePractitionerPractitionerQualificationComponent(String name, Practitioner.PractitionerQualificationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePractitionerPractitionerQualificationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePractitionerPractitionerQualificationComponentElements(Practitioner.PractitionerQualificationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasIssuer()) { + composeReference("issuer", element.getIssuer()); + } + } + + protected void composePractitionerRole(String name, PractitionerRole element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composePractitionerRoleElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePractitionerRoleElements(PractitionerRole element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasPractitioner()) { + composeReference("practitioner", element.getPractitioner()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasCode()) { + for (CodeableConcept e : element.getCode()) + composeCodeableConcept("code", e); + } + if (element.hasSpecialty()) { + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept("specialty", e); + } + if (element.hasLocation()) { + for (Reference e : element.getLocation()) + composeReference("location", e); + } + if (element.hasHealthcareService()) { + for (Reference e : element.getHealthcareService()) + composeReference("healthcareService", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasAvailableTime()) { + for (PractitionerRole.PractitionerRoleAvailableTimeComponent e : element.getAvailableTime()) + composePractitionerRolePractitionerRoleAvailableTimeComponent("availableTime", e); + } + if (element.hasNotAvailable()) { + for (PractitionerRole.PractitionerRoleNotAvailableComponent e : element.getNotAvailable()) + composePractitionerRolePractitionerRoleNotAvailableComponent("notAvailable", e); + } + if (element.hasAvailabilityExceptionsElement()) { + composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); + } + if (element.hasEndpoint()) { + for (Reference e : element.getEndpoint()) + composeReference("endpoint", e); + } + } + + protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(String name, PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePractitionerRolePractitionerRoleAvailableTimeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePractitionerRolePractitionerRoleAvailableTimeComponentElements(PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDaysOfWeek()) + for (Enumeration e : element.getDaysOfWeek()) + composeEnumeration("daysOfWeek", e, new PractitionerRole.DaysOfWeekEnumFactory()); + if (element.hasAllDayElement()) { + composeBoolean("allDay", element.getAllDayElement()); + } + if (element.hasAvailableStartTimeElement()) { + composeTime("availableStartTime", element.getAvailableStartTimeElement()); + } + if (element.hasAvailableEndTimeElement()) { + composeTime("availableEndTime", element.getAvailableEndTimeElement()); + } + } + + protected void composePractitionerRolePractitionerRoleNotAvailableComponent(String name, PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composePractitionerRolePractitionerRoleNotAvailableComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composePractitionerRolePractitionerRoleNotAvailableComponentElements(PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasDuring()) { + composePeriod("during", element.getDuring()); + } + } + + protected void composeProcedure(String name, Procedure element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeProcedureElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcedureElements(Procedure element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory()); + if (element.hasNotDoneElement()) { + composeBoolean("notDone", element.getNotDoneElement()); + } + if (element.hasNotDoneReason()) { + composeCodeableConcept("notDoneReason", element.getNotDoneReason()); + } + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasPerformed()) { + composeType("performed", element.getPerformed()); + } if (element.hasPerformer()) { + for (Procedure.ProcedurePerformerComponent e : element.getPerformer()) + composeProcedureProcedurePerformerComponent("performer", e); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasBodySite()) { + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept("bodySite", e); + } + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasReport()) { + for (Reference e : element.getReport()) + composeReference("report", e); + } + if (element.hasComplication()) { + for (CodeableConcept e : element.getComplication()) + composeCodeableConcept("complication", e); + } + if (element.hasComplicationDetail()) { + for (Reference e : element.getComplicationDetail()) + composeReference("complicationDetail", e); + } + if (element.hasFollowUp()) { + for (CodeableConcept e : element.getFollowUp()) + composeCodeableConcept("followUp", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasFocalDevice()) { + for (Procedure.ProcedureFocalDeviceComponent e : element.getFocalDevice()) + composeProcedureProcedureFocalDeviceComponent("focalDevice", e); + } + if (element.hasUsedReference()) { + for (Reference e : element.getUsedReference()) + composeReference("usedReference", e); + } + if (element.hasUsedCode()) { + for (CodeableConcept e : element.getUsedCode()) + composeCodeableConcept("usedCode", e); + } + } + + protected void composeProcedureProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProcedureProcedurePerformerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcedureProcedurePerformerComponentElements(Procedure.ProcedurePerformerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRole()) { + composeCodeableConcept("role", element.getRole()); + } + if (element.hasActor()) { + composeReference("actor", element.getActor()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeProcedureProcedureFocalDeviceComponent(String name, Procedure.ProcedureFocalDeviceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProcedureProcedureFocalDeviceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcedureProcedureFocalDeviceComponentElements(Procedure.ProcedureFocalDeviceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAction()) { + composeCodeableConcept("action", element.getAction()); + } + if (element.hasManipulated()) { + composeReference("manipulated", element.getManipulated()); + } + } + + protected void composeProcedureRequest(String name, ProcedureRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeProcedureRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcedureRequestElements(ProcedureRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasReplaces()) { + for (Reference e : element.getReplaces()) + composeReference("replaces", e); + } + if (element.hasRequisition()) { + composeIdentifier("requisition", element.getRequisition()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ProcedureRequest.ProcedureRequestStatusEnumFactory()); + if (element.hasIntentElement()) + composeEnumeration("intent", element.getIntentElement(), new ProcedureRequest.ProcedureRequestIntentEnumFactory()); + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new ProcedureRequest.ProcedureRequestPriorityEnumFactory()); + if (element.hasDoNotPerformElement()) { + composeBoolean("doNotPerform", element.getDoNotPerformElement()); + } + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasAsNeeded()) { + composeType("asNeeded", element.getAsNeeded()); + } if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasRequester()) { + composeProcedureRequestProcedureRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasPerformerType()) { + composeCodeableConcept("performerType", element.getPerformerType()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasSupportingInfo()) { + for (Reference e : element.getSupportingInfo()) + composeReference("supportingInfo", e); + } + if (element.hasSpecimen()) { + for (Reference e : element.getSpecimen()) + composeReference("specimen", e); + } + if (element.hasBodySite()) { + for (CodeableConcept e : element.getBodySite()) + composeCodeableConcept("bodySite", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasRelevantHistory()) { + for (Reference e : element.getRelevantHistory()) + composeReference("relevantHistory", e); + } + } + + protected void composeProcedureRequestProcedureRequestRequesterComponent(String name, ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProcedureRequestProcedureRequestRequesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcedureRequestProcedureRequestRequesterComponentElements(ProcedureRequest.ProcedureRequestRequesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeProcessRequest(String name, ProcessRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeProcessRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcessRequestElements(ProcessRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ProcessRequest.ProcessRequestStatusEnumFactory()); + if (element.hasActionElement()) + composeEnumeration("action", element.getActionElement(), new ProcessRequest.ActionListEnumFactory()); + if (element.hasTarget()) { + composeReference("target", element.getTarget()); + } + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasProvider()) { + composeReference("provider", element.getProvider()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasResponse()) { + composeReference("response", element.getResponse()); + } + if (element.hasNullifyElement()) { + composeBoolean("nullify", element.getNullifyElement()); + } + if (element.hasReferenceElement()) { + composeString("reference", element.getReferenceElement()); + } + if (element.hasItem()) { + for (ProcessRequest.ItemsComponent e : element.getItem()) + composeProcessRequestItemsComponent("item", e); + } + if (element.hasInclude()) { + for (StringType e : element.getInclude()) + composeString("include", e); + } + if (element.hasExclude()) { + for (StringType e : element.getExclude()) + composeString("exclude", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeProcessRequestItemsComponent(String name, ProcessRequest.ItemsComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProcessRequestItemsComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcessRequestItemsComponentElements(ProcessRequest.ItemsComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSequenceLinkIdElement()) { + composeInteger("sequenceLinkId", element.getSequenceLinkIdElement()); + } + } + + protected void composeProcessResponse(String name, ProcessResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeProcessResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcessResponseElements(ProcessResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ProcessResponse.ProcessResponseStatusEnumFactory()); + if (element.hasCreatedElement()) { + composeDateTime("created", element.getCreatedElement()); + } + if (element.hasOrganization()) { + composeReference("organization", element.getOrganization()); + } + if (element.hasRequest()) { + composeReference("request", element.getRequest()); + } + if (element.hasOutcomeElement()) + composeEnumeration("outcome", element.getOutcomeElement(), new ProcessResponse.ProcessingOutcomeEnumFactory()); + if (element.hasDispositionElement()) { + composeString("disposition", element.getDispositionElement()); + } + if (element.hasRequestProvider()) { + composeReference("requestProvider", element.getRequestProvider()); + } + if (element.hasRequestOrganization()) { + composeReference("requestOrganization", element.getRequestOrganization()); + } + if (element.hasForm()) { + composeCodeableConcept("form", element.getForm()); + } + if (element.hasProcessNote()) { + for (ProcessResponse.ProcessResponseProcessNoteComponent e : element.getProcessNote()) + composeProcessResponseProcessResponseProcessNoteComponent("processNote", e); + } + if (element.hasError()) { + for (CodeableConcept e : element.getError()) + composeCodeableConcept("error", e); + } + if (element.hasCommunicationRequest()) { + for (Reference e : element.getCommunicationRequest()) + composeReference("communicationRequest", e); + } + } + + protected void composeProcessResponseProcessResponseProcessNoteComponent(String name, ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProcessResponseProcessResponseProcessNoteComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProcessResponseProcessResponseProcessNoteComponentElements(ProcessResponse.ProcessResponseProcessNoteComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + } + + protected void composeProvenance(String name, Provenance element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeProvenanceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProvenanceElements(Provenance element) throws IOException { + composeDomainResourceElements(element); + if (element.hasTarget()) { + for (Reference e : element.getTarget()) + composeReference("target", e); + } + if (element.hasOccured()) { + composeType("occured", element.getOccured()); + } if (element.hasRecordedElement()) { + composeInstant("recorded", element.getRecordedElement()); + } + if (element.hasPolicy()) { + for (UriType e : element.getPolicy()) + composeUri("policy", e); + } + if (element.hasLocation()) { + composeReference("location", element.getLocation()); + } + if (element.hasReason()) { + for (CodeableConcept e : element.getReason()) + composeCodeableConcept("reason", e); + } + if (element.hasActivity()) { + composeCodeableConcept("activity", element.getActivity()); + } + if (element.hasAgent()) { + for (Provenance.ProvenanceAgentComponent e : element.getAgent()) + composeProvenanceProvenanceAgentComponent("agent", e); + } + if (element.hasEntity()) { + for (Provenance.ProvenanceEntityComponent e : element.getEntity()) + composeProvenanceProvenanceEntityComponent("entity", e); + } + if (element.hasSignature()) { + for (Signature e : element.getSignature()) + composeSignature("signature", e); + } + } + + protected void composeProvenanceProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProvenanceProvenanceAgentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProvenanceProvenanceAgentComponentElements(Provenance.ProvenanceAgentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasRole()) { + for (CodeableConcept e : element.getRole()) + composeCodeableConcept("role", e); + } + if (element.hasWho()) { + composeType("who", element.getWho()); + } if (element.hasOnBehalfOf()) { + composeType("onBehalfOf", element.getOnBehalfOf()); + } } + + protected void composeProvenanceProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeProvenanceProvenanceEntityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeProvenanceProvenanceEntityComponentElements(Provenance.ProvenanceEntityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRoleElement()) + composeEnumeration("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory()); + if (element.hasWhat()) { + composeType("what", element.getWhat()); + } if (element.hasAgent()) { + for (Provenance.ProvenanceAgentComponent e : element.getAgent()) + composeProvenanceProvenanceAgentComponent("agent", e); + } + } + + protected void composeQuestionnaire(String name, Questionnaire element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireElements(Questionnaire element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasCode()) { + for (Coding e : element.getCode()) + composeCoding("code", e); + } + if (element.hasSubjectType()) { + for (CodeType e : element.getSubjectType()) + composeCode("subjectType", e); + } + if (element.hasItem()) { + for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) + composeQuestionnaireQuestionnaireItemComponent("item", e); + } + } + + protected void composeQuestionnaireQuestionnaireItemComponent(String name, Questionnaire.QuestionnaireItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireQuestionnaireItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireQuestionnaireItemComponentElements(Questionnaire.QuestionnaireItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLinkIdElement()) { + composeString("linkId", element.getLinkIdElement()); + } + if (element.hasDefinitionElement()) { + composeUri("definition", element.getDefinitionElement()); + } + if (element.hasCode()) { + for (Coding e : element.getCode()) + composeCoding("code", e); + } + if (element.hasPrefixElement()) { + composeString("prefix", element.getPrefixElement()); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory()); + if (element.hasEnableWhen()) { + for (Questionnaire.QuestionnaireItemEnableWhenComponent e : element.getEnableWhen()) + composeQuestionnaireQuestionnaireItemEnableWhenComponent("enableWhen", e); + } + if (element.hasRequiredElement()) { + composeBoolean("required", element.getRequiredElement()); + } + if (element.hasRepeatsElement()) { + composeBoolean("repeats", element.getRepeatsElement()); + } + if (element.hasReadOnlyElement()) { + composeBoolean("readOnly", element.getReadOnlyElement()); + } + if (element.hasMaxLengthElement()) { + composeInteger("maxLength", element.getMaxLengthElement()); + } + if (element.hasOptions()) { + composeReference("options", element.getOptions()); + } + if (element.hasOption()) { + for (Questionnaire.QuestionnaireItemOptionComponent e : element.getOption()) + composeQuestionnaireQuestionnaireItemOptionComponent("option", e); + } + if (element.hasInitial()) { + composeType("initial", element.getInitial()); + } if (element.hasItem()) { + for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) + composeQuestionnaireQuestionnaireItemComponent("item", e); + } + } + + protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(String name, Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireQuestionnaireItemEnableWhenComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireQuestionnaireItemEnableWhenComponentElements(Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasQuestionElement()) { + composeString("question", element.getQuestionElement()); + } + if (element.hasHasAnswerElement()) { + composeBoolean("hasAnswer", element.getHasAnswerElement()); + } + if (element.hasAnswer()) { + composeType("answer", element.getAnswer()); + } } + + protected void composeQuestionnaireQuestionnaireItemOptionComponent(String name, Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireQuestionnaireItemOptionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireQuestionnaireItemOptionComponentElements(Questionnaire.QuestionnaireItemOptionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireResponseElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireResponseElements(QuestionnaireResponse element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasParent()) { + for (Reference e : element.getParent()) + composeReference("parent", e); + } + if (element.hasQuestionnaire()) { + composeReference("questionnaire", element.getQuestionnaire()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory()); + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasAuthoredElement()) { + composeDateTime("authored", element.getAuthoredElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasSource()) { + composeReference("source", element.getSource()); + } + if (element.hasItem()) { + for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) + composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); + } + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireResponseQuestionnaireResponseItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemComponentElements(QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLinkIdElement()) { + composeString("linkId", element.getLinkIdElement()); + } + if (element.hasDefinitionElement()) { + composeUri("definition", element.getDefinitionElement()); + } + if (element.hasTextElement()) { + composeString("text", element.getTextElement()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasAnswer()) { + for (QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent e : element.getAnswer()) + composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent("answer", e); + } + if (element.hasItem()) { + for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) + composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); + } + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(String name, QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentElements(QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } if (element.hasItem()) { + for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) + composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); + } + } + + protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeRelatedPersonElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRelatedPersonElements(RelatedPerson element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasRelationship()) { + composeCodeableConcept("relationship", element.getRelationship()); + } + if (element.hasName()) { + for (HumanName e : element.getName()) + composeHumanName("name", e); + } + if (element.hasTelecom()) { + for (ContactPoint e : element.getTelecom()) + composeContactPoint("telecom", e); + } + if (element.hasGenderElement()) + composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); + if (element.hasBirthDateElement()) { + composeDate("birthDate", element.getBirthDateElement()); + } + if (element.hasAddress()) { + for (Address e : element.getAddress()) + composeAddress("address", e); + } + if (element.hasPhoto()) { + for (Attachment e : element.getPhoto()) + composeAttachment("photo", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + } + + protected void composeRequestGroup(String name, RequestGroup element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeRequestGroupElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRequestGroupElements(RequestGroup element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + for (Reference e : element.getDefinition()) + composeReference("definition", e); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasReplaces()) { + for (Reference e : element.getReplaces()) + composeReference("replaces", e); + } + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory()); + if (element.hasIntentElement()) + composeEnumeration("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory()); + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory()); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasAuthor()) { + composeReference("author", element.getAuthor()); + } + if (element.hasReasonCode()) { + for (CodeableConcept e : element.getReasonCode()) + composeCodeableConcept("reasonCode", e); + } + if (element.hasReasonReference()) { + for (Reference e : element.getReasonReference()) + composeReference("reasonReference", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasAction()) { + for (RequestGroup.RequestGroupActionComponent e : element.getAction()) + composeRequestGroupRequestGroupActionComponent("action", e); + } + } + + protected void composeRequestGroupRequestGroupActionComponent(String name, RequestGroup.RequestGroupActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeRequestGroupRequestGroupActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRequestGroupRequestGroupActionComponentElements(RequestGroup.RequestGroupActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPrefixElement()) { + composeString("prefix", element.getPrefixElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasTextEquivalentElement()) { + composeString("textEquivalent", element.getTextEquivalentElement()); + } + if (element.hasCode()) { + for (CodeableConcept e : element.getCode()) + composeCodeableConcept("code", e); + } + if (element.hasDocumentation()) { + for (RelatedArtifact e : element.getDocumentation()) + composeRelatedArtifact("documentation", e); + } + if (element.hasCondition()) { + for (RequestGroup.RequestGroupActionConditionComponent e : element.getCondition()) + composeRequestGroupRequestGroupActionConditionComponent("condition", e); + } + if (element.hasRelatedAction()) { + for (RequestGroup.RequestGroupActionRelatedActionComponent e : element.getRelatedAction()) + composeRequestGroupRequestGroupActionRelatedActionComponent("relatedAction", e); + } + if (element.hasTiming()) { + composeType("timing", element.getTiming()); + } if (element.hasParticipant()) { + for (Reference e : element.getParticipant()) + composeReference("participant", e); + } + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasGroupingBehaviorElement()) + composeEnumeration("groupingBehavior", element.getGroupingBehaviorElement(), new RequestGroup.ActionGroupingBehaviorEnumFactory()); + if (element.hasSelectionBehaviorElement()) + composeEnumeration("selectionBehavior", element.getSelectionBehaviorElement(), new RequestGroup.ActionSelectionBehaviorEnumFactory()); + if (element.hasRequiredBehaviorElement()) + composeEnumeration("requiredBehavior", element.getRequiredBehaviorElement(), new RequestGroup.ActionRequiredBehaviorEnumFactory()); + if (element.hasPrecheckBehaviorElement()) + composeEnumeration("precheckBehavior", element.getPrecheckBehaviorElement(), new RequestGroup.ActionPrecheckBehaviorEnumFactory()); + if (element.hasCardinalityBehaviorElement()) + composeEnumeration("cardinalityBehavior", element.getCardinalityBehaviorElement(), new RequestGroup.ActionCardinalityBehaviorEnumFactory()); + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + if (element.hasAction()) { + for (RequestGroup.RequestGroupActionComponent e : element.getAction()) + composeRequestGroupRequestGroupActionComponent("action", e); + } + } + + protected void composeRequestGroupRequestGroupActionConditionComponent(String name, RequestGroup.RequestGroupActionConditionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeRequestGroupRequestGroupActionConditionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRequestGroupRequestGroupActionConditionComponentElements(RequestGroup.RequestGroupActionConditionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory()); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasLanguageElement()) { + composeString("language", element.getLanguageElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + } + + protected void composeRequestGroupRequestGroupActionRelatedActionComponent(String name, RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeRequestGroupRequestGroupActionRelatedActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRequestGroupRequestGroupActionRelatedActionComponentElements(RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasActionIdElement()) { + composeId("actionId", element.getActionIdElement()); + } + if (element.hasRelationshipElement()) + composeEnumeration("relationship", element.getRelationshipElement(), new RequestGroup.ActionRelationshipTypeEnumFactory()); + if (element.hasOffset()) { + composeType("offset", element.getOffset()); + } } + + protected void composeResearchStudy(String name, ResearchStudy element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeResearchStudyElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeResearchStudyElements(ResearchStudy element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasProtocol()) { + for (Reference e : element.getProtocol()) + composeReference("protocol", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasFocus()) { + for (CodeableConcept e : element.getFocus()) + composeCodeableConcept("focus", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasKeyword()) { + for (CodeableConcept e : element.getKeyword()) + composeCodeableConcept("keyword", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasEnrollment()) { + for (Reference e : element.getEnrollment()) + composeReference("enrollment", e); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasSponsor()) { + composeReference("sponsor", element.getSponsor()); + } + if (element.hasPrincipalInvestigator()) { + composeReference("principalInvestigator", element.getPrincipalInvestigator()); + } + if (element.hasSite()) { + for (Reference e : element.getSite()) + composeReference("site", e); + } + if (element.hasReasonStopped()) { + composeCodeableConcept("reasonStopped", element.getReasonStopped()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasArm()) { + for (ResearchStudy.ResearchStudyArmComponent e : element.getArm()) + composeResearchStudyResearchStudyArmComponent("arm", e); + } + } + + protected void composeResearchStudyResearchStudyArmComponent(String name, ResearchStudy.ResearchStudyArmComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeResearchStudyResearchStudyArmComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeResearchStudyResearchStudyArmComponentElements(ResearchStudy.ResearchStudyArmComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + } + + protected void composeResearchSubject(String name, ResearchSubject element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeResearchSubjectElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeResearchSubjectElements(ResearchSubject element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory()); + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasStudy()) { + composeReference("study", element.getStudy()); + } + if (element.hasIndividual()) { + composeReference("individual", element.getIndividual()); + } + if (element.hasAssignedArmElement()) { + composeString("assignedArm", element.getAssignedArmElement()); + } + if (element.hasActualArmElement()) { + composeString("actualArm", element.getActualArmElement()); + } + if (element.hasConsent()) { + composeReference("consent", element.getConsent()); + } + } + + protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeRiskAssessmentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRiskAssessmentElements(RiskAssessment element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasBasedOn()) { + composeReference("basedOn", element.getBasedOn()); + } + if (element.hasParent()) { + composeReference("parent", element.getParent()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory()); + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasCondition()) { + composeReference("condition", element.getCondition()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } if (element.hasBasis()) { + for (Reference e : element.getBasis()) + composeReference("basis", e); + } + if (element.hasPrediction()) { + for (RiskAssessment.RiskAssessmentPredictionComponent e : element.getPrediction()) + composeRiskAssessmentRiskAssessmentPredictionComponent("prediction", e); + } + if (element.hasMitigationElement()) { + composeString("mitigation", element.getMitigationElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeRiskAssessmentRiskAssessmentPredictionComponent(String name, RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeRiskAssessmentRiskAssessmentPredictionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeRiskAssessmentRiskAssessmentPredictionComponentElements(RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOutcome()) { + composeCodeableConcept("outcome", element.getOutcome()); + } + if (element.hasProbability()) { + composeType("probability", element.getProbability()); + } if (element.hasQualitativeRisk()) { + composeCodeableConcept("qualitativeRisk", element.getQualitativeRisk()); + } + if (element.hasRelativeRiskElement()) { + composeDecimal("relativeRisk", element.getRelativeRiskElement()); + } + if (element.hasWhen()) { + composeType("when", element.getWhen()); + } if (element.hasRationaleElement()) { + composeString("rationale", element.getRationaleElement()); + } + } + + protected void composeSchedule(String name, Schedule element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeScheduleElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeScheduleElements(Schedule element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasActiveElement()) { + composeBoolean("active", element.getActiveElement()); + } + if (element.hasServiceCategory()) { + composeCodeableConcept("serviceCategory", element.getServiceCategory()); + } + if (element.hasServiceType()) { + for (CodeableConcept e : element.getServiceType()) + composeCodeableConcept("serviceType", e); + } + if (element.hasSpecialty()) { + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept("specialty", e); + } + if (element.hasActor()) { + for (Reference e : element.getActor()) + composeReference("actor", e); + } + if (element.hasPlanningHorizon()) { + composePeriod("planningHorizon", element.getPlanningHorizon()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeSearchParameter(String name, SearchParameter element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSearchParameterElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSearchParameterElements(SearchParameter element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasBase()) { + for (CodeType e : element.getBase()) + composeCode("base", e); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); + if (element.hasDerivedFromElement()) { + composeUri("derivedFrom", element.getDerivedFromElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + if (element.hasXpathElement()) { + composeString("xpath", element.getXpathElement()); + } + if (element.hasXpathUsageElement()) + composeEnumeration("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory()); + if (element.hasTarget()) { + for (CodeType e : element.getTarget()) + composeCode("target", e); + } + if (element.hasComparator()) + for (Enumeration e : element.getComparator()) + composeEnumeration("comparator", e, new SearchParameter.SearchComparatorEnumFactory()); + if (element.hasModifier()) + for (Enumeration e : element.getModifier()) + composeEnumeration("modifier", e, new SearchParameter.SearchModifierCodeEnumFactory()); + if (element.hasChain()) { + for (StringType e : element.getChain()) + composeString("chain", e); + } + if (element.hasComponent()) { + for (SearchParameter.SearchParameterComponentComponent e : element.getComponent()) + composeSearchParameterSearchParameterComponentComponent("component", e); + } + } + + protected void composeSearchParameterSearchParameterComponentComponent(String name, SearchParameter.SearchParameterComponentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSearchParameterSearchParameterComponentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSearchParameterSearchParameterComponentComponentElements(SearchParameter.SearchParameterComponentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDefinition()) { + composeReference("definition", element.getDefinition()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + } + + protected void composeSequence(String name, Sequence element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceElements(Sequence element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Sequence.SequenceTypeEnumFactory()); + if (element.hasCoordinateSystemElement()) { + composeInteger("coordinateSystem", element.getCoordinateSystemElement()); + } + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasSpecimen()) { + composeReference("specimen", element.getSpecimen()); + } + if (element.hasDevice()) { + composeReference("device", element.getDevice()); + } + if (element.hasPerformer()) { + composeReference("performer", element.getPerformer()); + } + if (element.hasQuantity()) { + composeQuantity("quantity", element.getQuantity()); + } + if (element.hasReferenceSeq()) { + composeSequenceSequenceReferenceSeqComponent("referenceSeq", element.getReferenceSeq()); + } + if (element.hasVariant()) { + for (Sequence.SequenceVariantComponent e : element.getVariant()) + composeSequenceSequenceVariantComponent("variant", e); + } + if (element.hasObservedSeqElement()) { + composeString("observedSeq", element.getObservedSeqElement()); + } + if (element.hasQuality()) { + for (Sequence.SequenceQualityComponent e : element.getQuality()) + composeSequenceSequenceQualityComponent("quality", e); + } + if (element.hasReadCoverageElement()) { + composeInteger("readCoverage", element.getReadCoverageElement()); + } + if (element.hasRepository()) { + for (Sequence.SequenceRepositoryComponent e : element.getRepository()) + composeSequenceSequenceRepositoryComponent("repository", e); + } + if (element.hasPointer()) { + for (Reference e : element.getPointer()) + composeReference("pointer", e); + } + if (element.hasStructureVariant()) { + for (Sequence.SequenceStructureVariantComponent e : element.getStructureVariant()) + composeSequenceSequenceStructureVariantComponent("structureVariant", e); + } + } + + protected void composeSequenceSequenceReferenceSeqComponent(String name, Sequence.SequenceReferenceSeqComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceReferenceSeqComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceReferenceSeqComponentElements(Sequence.SequenceReferenceSeqComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasChromosome()) { + composeCodeableConcept("chromosome", element.getChromosome()); + } + if (element.hasGenomeBuildElement()) { + composeString("genomeBuild", element.getGenomeBuildElement()); + } + if (element.hasReferenceSeqId()) { + composeCodeableConcept("referenceSeqId", element.getReferenceSeqId()); + } + if (element.hasReferenceSeqPointer()) { + composeReference("referenceSeqPointer", element.getReferenceSeqPointer()); + } + if (element.hasReferenceSeqStringElement()) { + composeString("referenceSeqString", element.getReferenceSeqStringElement()); + } + if (element.hasStrandElement()) { + composeInteger("strand", element.getStrandElement()); + } + if (element.hasWindowStartElement()) { + composeInteger("windowStart", element.getWindowStartElement()); + } + if (element.hasWindowEndElement()) { + composeInteger("windowEnd", element.getWindowEndElement()); + } + } + + protected void composeSequenceSequenceVariantComponent(String name, Sequence.SequenceVariantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceVariantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceVariantComponentElements(Sequence.SequenceVariantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStartElement()) { + composeInteger("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInteger("end", element.getEndElement()); + } + if (element.hasObservedAlleleElement()) { + composeString("observedAllele", element.getObservedAlleleElement()); + } + if (element.hasReferenceAlleleElement()) { + composeString("referenceAllele", element.getReferenceAlleleElement()); + } + if (element.hasCigarElement()) { + composeString("cigar", element.getCigarElement()); + } + if (element.hasVariantPointer()) { + composeReference("variantPointer", element.getVariantPointer()); + } + } + + protected void composeSequenceSequenceQualityComponent(String name, Sequence.SequenceQualityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceQualityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceQualityComponentElements(Sequence.SequenceQualityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Sequence.QualityTypeEnumFactory()); + if (element.hasStandardSequence()) { + composeCodeableConcept("standardSequence", element.getStandardSequence()); + } + if (element.hasStartElement()) { + composeInteger("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInteger("end", element.getEndElement()); + } + if (element.hasScore()) { + composeQuantity("score", element.getScore()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasTruthTPElement()) { + composeDecimal("truthTP", element.getTruthTPElement()); + } + if (element.hasQueryTPElement()) { + composeDecimal("queryTP", element.getQueryTPElement()); + } + if (element.hasTruthFNElement()) { + composeDecimal("truthFN", element.getTruthFNElement()); + } + if (element.hasQueryFPElement()) { + composeDecimal("queryFP", element.getQueryFPElement()); + } + if (element.hasGtFPElement()) { + composeDecimal("gtFP", element.getGtFPElement()); + } + if (element.hasPrecisionElement()) { + composeDecimal("precision", element.getPrecisionElement()); + } + if (element.hasRecallElement()) { + composeDecimal("recall", element.getRecallElement()); + } + if (element.hasFScoreElement()) { + composeDecimal("fScore", element.getFScoreElement()); + } + if (element.hasRoc()) { + composeSequenceSequenceQualityRocComponent("roc", element.getRoc()); + } + } + + protected void composeSequenceSequenceQualityRocComponent(String name, Sequence.SequenceQualityRocComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceQualityRocComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceQualityRocComponentElements(Sequence.SequenceQualityRocComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasScore()) { + for (IntegerType e : element.getScore()) + composeInteger("score", e); + } + if (element.hasNumTP()) { + for (IntegerType e : element.getNumTP()) + composeInteger("numTP", e); + } + if (element.hasNumFP()) { + for (IntegerType e : element.getNumFP()) + composeInteger("numFP", e); + } + if (element.hasNumFN()) { + for (IntegerType e : element.getNumFN()) + composeInteger("numFN", e); + } + if (element.hasPrecision()) { + for (DecimalType e : element.getPrecision()) + composeDecimal("precision", e); + } + if (element.hasSensitivity()) { + for (DecimalType e : element.getSensitivity()) + composeDecimal("sensitivity", e); + } + if (element.hasFMeasure()) { + for (DecimalType e : element.getFMeasure()) + composeDecimal("fMeasure", e); + } + } + + protected void composeSequenceSequenceRepositoryComponent(String name, Sequence.SequenceRepositoryComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceRepositoryComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceRepositoryComponentElements(Sequence.SequenceRepositoryComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Sequence.RepositoryTypeEnumFactory()); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDatasetIdElement()) { + composeString("datasetId", element.getDatasetIdElement()); + } + if (element.hasVariantsetIdElement()) { + composeString("variantsetId", element.getVariantsetIdElement()); + } + if (element.hasReadsetIdElement()) { + composeString("readsetId", element.getReadsetIdElement()); + } + } + + protected void composeSequenceSequenceStructureVariantComponent(String name, Sequence.SequenceStructureVariantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceStructureVariantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceStructureVariantComponentElements(Sequence.SequenceStructureVariantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPrecisionElement()) { + composeString("precision", element.getPrecisionElement()); + } + if (element.hasReportedaCGHRatioElement()) { + composeDecimal("reportedaCGHRatio", element.getReportedaCGHRatioElement()); + } + if (element.hasLengthElement()) { + composeInteger("length", element.getLengthElement()); + } + if (element.hasOuter()) { + composeSequenceSequenceStructureVariantOuterComponent("outer", element.getOuter()); + } + if (element.hasInner()) { + composeSequenceSequenceStructureVariantInnerComponent("inner", element.getInner()); + } + } + + protected void composeSequenceSequenceStructureVariantOuterComponent(String name, Sequence.SequenceStructureVariantOuterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceStructureVariantOuterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceStructureVariantOuterComponentElements(Sequence.SequenceStructureVariantOuterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStartElement()) { + composeInteger("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInteger("end", element.getEndElement()); + } + } + + protected void composeSequenceSequenceStructureVariantInnerComponent(String name, Sequence.SequenceStructureVariantInnerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSequenceSequenceStructureVariantInnerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSequenceSequenceStructureVariantInnerComponentElements(Sequence.SequenceStructureVariantInnerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasStartElement()) { + composeInteger("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInteger("end", element.getEndElement()); + } + } + + protected void composeServiceDefinition(String name, ServiceDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeServiceDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeServiceDefinitionElements(ServiceDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasUsageElement()) { + composeString("usage", element.getUsageElement()); + } + if (element.hasApprovalDateElement()) { + composeDate("approvalDate", element.getApprovalDateElement()); + } + if (element.hasLastReviewDateElement()) { + composeDate("lastReviewDate", element.getLastReviewDateElement()); + } + if (element.hasEffectivePeriod()) { + composePeriod("effectivePeriod", element.getEffectivePeriod()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasTopic()) { + for (CodeableConcept e : element.getTopic()) + composeCodeableConcept("topic", e); + } + if (element.hasContributor()) { + for (Contributor e : element.getContributor()) + composeContributor("contributor", e); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasRelatedArtifact()) { + for (RelatedArtifact e : element.getRelatedArtifact()) + composeRelatedArtifact("relatedArtifact", e); + } + if (element.hasTrigger()) { + for (TriggerDefinition e : element.getTrigger()) + composeTriggerDefinition("trigger", e); + } + if (element.hasDataRequirement()) { + for (DataRequirement e : element.getDataRequirement()) + composeDataRequirement("dataRequirement", e); + } + if (element.hasOperationDefinition()) { + composeReference("operationDefinition", element.getOperationDefinition()); + } + } + + protected void composeSlot(String name, Slot element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSlotElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSlotElements(Slot element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasServiceCategory()) { + composeCodeableConcept("serviceCategory", element.getServiceCategory()); + } + if (element.hasServiceType()) { + for (CodeableConcept e : element.getServiceType()) + composeCodeableConcept("serviceType", e); + } + if (element.hasSpecialty()) { + for (CodeableConcept e : element.getSpecialty()) + composeCodeableConcept("specialty", e); + } + if (element.hasAppointmentType()) { + composeCodeableConcept("appointmentType", element.getAppointmentType()); + } + if (element.hasSchedule()) { + composeReference("schedule", element.getSchedule()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory()); + if (element.hasStartElement()) { + composeInstant("start", element.getStartElement()); + } + if (element.hasEndElement()) { + composeInstant("end", element.getEndElement()); + } + if (element.hasOverbookedElement()) { + composeBoolean("overbooked", element.getOverbookedElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeSpecimen(String name, Specimen element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenElements(Specimen element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasAccessionIdentifier()) { + composeIdentifier("accessionIdentifier", element.getAccessionIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory()); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSubject()) { + composeReference("subject", element.getSubject()); + } + if (element.hasReceivedTimeElement()) { + composeDateTime("receivedTime", element.getReceivedTimeElement()); + } + if (element.hasParent()) { + for (Reference e : element.getParent()) + composeReference("parent", e); + } + if (element.hasRequest()) { + for (Reference e : element.getRequest()) + composeReference("request", e); + } + if (element.hasCollection()) { + composeSpecimenSpecimenCollectionComponent("collection", element.getCollection()); + } + if (element.hasProcessing()) { + for (Specimen.SpecimenProcessingComponent e : element.getProcessing()) + composeSpecimenSpecimenProcessingComponent("processing", e); + } + if (element.hasContainer()) { + for (Specimen.SpecimenContainerComponent e : element.getContainer()) + composeSpecimenSpecimenContainerComponent("container", e); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + protected void composeSpecimenSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenSpecimenCollectionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenSpecimenCollectionComponentElements(Specimen.SpecimenCollectionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCollector()) { + composeReference("collector", element.getCollector()); + } + if (element.hasCollected()) { + composeType("collected", element.getCollected()); + } if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasMethod()) { + composeCodeableConcept("method", element.getMethod()); + } + if (element.hasBodySite()) { + composeCodeableConcept("bodySite", element.getBodySite()); + } + } + + protected void composeSpecimenSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenSpecimenProcessingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenSpecimenProcessingComponentElements(Specimen.SpecimenProcessingComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasProcedure()) { + composeCodeableConcept("procedure", element.getProcedure()); + } + if (element.hasAdditive()) { + for (Reference e : element.getAdditive()) + composeReference("additive", e); + } + if (element.hasTime()) { + composeType("time", element.getTime()); + } } + + protected void composeSpecimenSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenSpecimenContainerComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenSpecimenContainerComponentElements(Specimen.SpecimenContainerComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasCapacity()) { + composeSimpleQuantity("capacity", element.getCapacity()); + } + if (element.hasSpecimenQuantity()) { + composeSimpleQuantity("specimenQuantity", element.getSpecimenQuantity()); + } + if (element.hasAdditive()) { + composeType("additive", element.getAdditive()); + } } + + protected void composeSpecimenDefinition(String name, SpecimenDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenDefinitionElements(SpecimenDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasTypeCollected()) { + composeCodeableConcept("typeCollected", element.getTypeCollected()); + } + if (element.hasPatientPreparationElement()) { + composeString("patientPreparation", element.getPatientPreparationElement()); + } + if (element.hasTimeAspectElement()) { + composeString("timeAspect", element.getTimeAspectElement()); + } + if (element.hasCollection()) { + for (CodeableConcept e : element.getCollection()) + composeCodeableConcept("collection", e); + } + if (element.hasSpecimenToLab()) { + for (SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent e : element.getSpecimenToLab()) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent("specimenToLab", e); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponent(String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabComponentElements(SpecimenDefinition.SpecimenDefinitionSpecimenToLabComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIsDerivedElement()) { + composeBoolean("isDerived", element.getIsDerivedElement()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasPreferenceElement()) + composeEnumeration("preference", element.getPreferenceElement(), new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory()); + if (element.hasContainerMaterial()) { + composeCodeableConcept("containerMaterial", element.getContainerMaterial()); + } + if (element.hasContainerType()) { + composeCodeableConcept("containerType", element.getContainerType()); + } + if (element.hasContainerCap()) { + composeCodeableConcept("containerCap", element.getContainerCap()); + } + if (element.hasContainerDescriptionElement()) { + composeString("containerDescription", element.getContainerDescriptionElement()); + } + if (element.hasContainerCapacity()) { + composeSimpleQuantity("containerCapacity", element.getContainerCapacity()); + } + if (element.hasContainerMinimumVolume()) { + composeSimpleQuantity("containerMinimumVolume", element.getContainerMinimumVolume()); + } + if (element.hasContainerAdditive()) { + for (SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent e : element.getContainerAdditive()) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent("containerAdditive", e); + } + if (element.hasContainerPreparationElement()) { + composeString("containerPreparation", element.getContainerPreparationElement()); + } + if (element.hasRequirementElement()) { + composeString("requirement", element.getRequirementElement()); + } + if (element.hasRetentionTime()) { + composeDuration("retentionTime", element.getRetentionTime()); + } + if (element.hasRejectionCriterion()) { + for (CodeableConcept e : element.getRejectionCriterion()) + composeCodeableConcept("rejectionCriterion", e); + } + if (element.hasHandling()) { + for (SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent e : element.getHandling()) + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent("handling", e); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponent(String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabContainerAdditiveComponentElements(SpecimenDefinition.SpecimenDefinitionSpecimenToLabContainerAdditiveComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAdditive()) { + composeType("additive", element.getAdditive()); + } } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponent(String name, SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSpecimenDefinitionSpecimenDefinitionSpecimenToLabHandlingComponentElements(SpecimenDefinition.SpecimenDefinitionSpecimenToLabHandlingComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasConditionSet()) { + composeCodeableConcept("conditionSet", element.getConditionSet()); + } + if (element.hasTempRange()) { + composeRange("tempRange", element.getTempRange()); + } + if (element.hasMaxDuration()) { + composeDuration("maxDuration", element.getMaxDuration()); + } + if (element.hasLightExposureElement()) { + composeString("lightExposure", element.getLightExposureElement()); + } + if (element.hasInstructionElement()) { + composeString("instruction", element.getInstructionElement()); + } + } + + protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureDefinitionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureDefinitionElements(StructureDefinition element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasKeyword()) { + for (Coding e : element.getKeyword()) + composeCoding("keyword", e); + } + if (element.hasFhirVersionElement()) { + composeId("fhirVersion", element.getFhirVersionElement()); + } + if (element.hasMapping()) { + for (StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping()) + composeStructureDefinitionStructureDefinitionMappingComponent("mapping", e); + } + if (element.hasKindElement()) + composeEnumeration("kind", element.getKindElement(), new StructureDefinition.StructureDefinitionKindEnumFactory()); + if (element.hasAbstractElement()) { + composeBoolean("abstract", element.getAbstractElement()); + } + if (element.hasContextTypeElement()) + composeEnumeration("contextType", element.getContextTypeElement(), new StructureDefinition.ExtensionContextEnumFactory()); + if (element.hasContext()) { + for (StringType e : element.getContext()) + composeString("context", e); + } + if (element.hasContextInvariant()) { + for (StringType e : element.getContextInvariant()) + composeString("contextInvariant", e); + } + if (element.hasTypeElement()) { + composeCode("type", element.getTypeElement()); + } + if (element.hasBaseDefinitionElement()) { + composeUri("baseDefinition", element.getBaseDefinitionElement()); + } + if (element.hasDerivationElement()) + composeEnumeration("derivation", element.getDerivationElement(), new StructureDefinition.TypeDerivationRuleEnumFactory()); + if (element.hasSnapshot()) { + composeStructureDefinitionStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot()); + } + if (element.hasDifferential()) { + composeStructureDefinitionStructureDefinitionDifferentialComponent("differential", element.getDifferential()); + } + } + + protected void composeStructureDefinitionStructureDefinitionMappingComponent(String name, StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureDefinitionStructureDefinitionMappingComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureDefinitionStructureDefinitionMappingComponentElements(StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentityElement()) { + composeId("identity", element.getIdentityElement()); + } + if (element.hasUriElement()) { + composeUri("uri", element.getUriElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasCommentElement()) { + composeString("comment", element.getCommentElement()); + } + } + + protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(String name, StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureDefinitionStructureDefinitionSnapshotComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureDefinitionStructureDefinitionSnapshotComponentElements(StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasElement()) { + for (ElementDefinition e : element.getElement()) + composeElementDefinition("element", e); + } + } + + protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(String name, StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureDefinitionStructureDefinitionDifferentialComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureDefinitionStructureDefinitionDifferentialComponentElements(StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasElement()) { + for (ElementDefinition e : element.getElement()) + composeElementDefinition("element", e); + } + } + + protected void composeStructureMap(String name, StructureMap element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapElements(StructureMap element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasStructure()) { + for (StructureMap.StructureMapStructureComponent e : element.getStructure()) + composeStructureMapStructureMapStructureComponent("structure", e); + } + if (element.hasImport()) { + for (UriType e : element.getImport()) + composeUri("import", e); + } + if (element.hasGroup()) { + for (StructureMap.StructureMapGroupComponent e : element.getGroup()) + composeStructureMapStructureMapGroupComponent("group", e); + } + } + + protected void composeStructureMapStructureMapStructureComponent(String name, StructureMap.StructureMapStructureComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapStructureComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapStructureComponentElements(StructureMap.StructureMapStructureComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory()); + if (element.hasAliasElement()) { + composeString("alias", element.getAliasElement()); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeStructureMapStructureMapGroupComponent(String name, StructureMap.StructureMapGroupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupComponentElements(StructureMap.StructureMapGroupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeId("name", element.getNameElement()); + } + if (element.hasExtendsElement()) { + composeId("extends", element.getExtendsElement()); + } + if (element.hasTypeModeElement()) + composeEnumeration("typeMode", element.getTypeModeElement(), new StructureMap.StructureMapGroupTypeModeEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + if (element.hasInput()) { + for (StructureMap.StructureMapGroupInputComponent e : element.getInput()) + composeStructureMapStructureMapGroupInputComponent("input", e); + } + if (element.hasRule()) { + for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) + composeStructureMapStructureMapGroupRuleComponent("rule", e); + } + } + + protected void composeStructureMapStructureMapGroupInputComponent(String name, StructureMap.StructureMapGroupInputComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupInputComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupInputComponentElements(StructureMap.StructureMapGroupInputComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeId("name", element.getNameElement()); + } + if (element.hasTypeElement()) { + composeString("type", element.getTypeElement()); + } + if (element.hasModeElement()) + composeEnumeration("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory()); + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeStructureMapStructureMapGroupRuleComponent(String name, StructureMap.StructureMapGroupRuleComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupRuleComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupRuleComponentElements(StructureMap.StructureMapGroupRuleComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeId("name", element.getNameElement()); + } + if (element.hasSource()) { + for (StructureMap.StructureMapGroupRuleSourceComponent e : element.getSource()) + composeStructureMapStructureMapGroupRuleSourceComponent("source", e); + } + if (element.hasTarget()) { + for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget()) + composeStructureMapStructureMapGroupRuleTargetComponent("target", e); + } + if (element.hasRule()) { + for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) + composeStructureMapStructureMapGroupRuleComponent("rule", e); + } + if (element.hasDependent()) { + for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent()) + composeStructureMapStructureMapGroupRuleDependentComponent("dependent", e); + } + if (element.hasDocumentationElement()) { + composeString("documentation", element.getDocumentationElement()); + } + } + + protected void composeStructureMapStructureMapGroupRuleSourceComponent(String name, StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupRuleSourceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupRuleSourceComponentElements(StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContextElement()) { + composeId("context", element.getContextElement()); + } + if (element.hasMinElement()) { + composeInteger("min", element.getMinElement()); + } + if (element.hasMaxElement()) { + composeString("max", element.getMaxElement()); + } + if (element.hasTypeElement()) { + composeString("type", element.getTypeElement()); + } + if (element.hasDefaultValue()) { + composeType("defaultValue", element.getDefaultValue()); + } if (element.hasElementElement()) { + composeString("element", element.getElementElement()); + } + if (element.hasListModeElement()) + composeEnumeration("listMode", element.getListModeElement(), new StructureMap.StructureMapSourceListModeEnumFactory()); + if (element.hasVariableElement()) { + composeId("variable", element.getVariableElement()); + } + if (element.hasConditionElement()) { + composeString("condition", element.getConditionElement()); + } + if (element.hasCheckElement()) { + composeString("check", element.getCheckElement()); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetComponent(String name, StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupRuleTargetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetComponentElements(StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasContextElement()) { + composeId("context", element.getContextElement()); + } + if (element.hasContextTypeElement()) + composeEnumeration("contextType", element.getContextTypeElement(), new StructureMap.StructureMapContextTypeEnumFactory()); + if (element.hasElementElement()) { + composeString("element", element.getElementElement()); + } + if (element.hasVariableElement()) { + composeId("variable", element.getVariableElement()); + } + if (element.hasListMode()) + for (Enumeration e : element.getListMode()) + composeEnumeration("listMode", e, new StructureMap.StructureMapTargetListModeEnumFactory()); + if (element.hasListRuleIdElement()) { + composeId("listRuleId", element.getListRuleIdElement()); + } + if (element.hasTransformElement()) + composeEnumeration("transform", element.getTransformElement(), new StructureMap.StructureMapTransformEnumFactory()); + if (element.hasParameter()) { + for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter()) + composeStructureMapStructureMapGroupRuleTargetParameterComponent("parameter", e); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(String name, StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupRuleTargetParameterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupRuleTargetParameterComponentElements(StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeStructureMapStructureMapGroupRuleDependentComponent(String name, StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeStructureMapStructureMapGroupRuleDependentComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeStructureMapStructureMapGroupRuleDependentComponentElements(StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeId("name", element.getNameElement()); + } + if (element.hasVariable()) { + for (StringType e : element.getVariable()) + composeString("variable", e); + } + } + + protected void composeSubscription(String name, Subscription element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSubscriptionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSubscriptionElements(Subscription element) throws IOException { + composeDomainResourceElements(element); + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory()); + if (element.hasContact()) { + for (ContactPoint e : element.getContact()) + composeContactPoint("contact", e); + } + if (element.hasEndElement()) { + composeInstant("end", element.getEndElement()); + } + if (element.hasReasonElement()) { + composeString("reason", element.getReasonElement()); + } + if (element.hasCriteriaElement()) { + composeString("criteria", element.getCriteriaElement()); + } + if (element.hasErrorElement()) { + composeString("error", element.getErrorElement()); + } + if (element.hasChannel()) { + composeSubscriptionSubscriptionChannelComponent("channel", element.getChannel()); + } + if (element.hasTag()) { + for (Coding e : element.getTag()) + composeCoding("tag", e); + } + } + + protected void composeSubscriptionSubscriptionChannelComponent(String name, Subscription.SubscriptionChannelComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSubscriptionSubscriptionChannelComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSubscriptionSubscriptionChannelComponentElements(Subscription.SubscriptionChannelComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory()); + if (element.hasEndpointElement()) { + composeUri("endpoint", element.getEndpointElement()); + } + if (element.hasPayloadElement()) { + composeString("payload", element.getPayloadElement()); + } + if (element.hasHeader()) { + for (StringType e : element.getHeader()) + composeString("header", e); + } + } + + protected void composeSubstance(String name, Substance element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSubstanceElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSubstanceElements(Substance element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory()); + if (element.hasCategory()) { + for (CodeableConcept e : element.getCategory()) + composeCodeableConcept("category", e); + } + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasInstance()) { + for (Substance.SubstanceInstanceComponent e : element.getInstance()) + composeSubstanceSubstanceInstanceComponent("instance", e); + } + if (element.hasIngredient()) { + for (Substance.SubstanceIngredientComponent e : element.getIngredient()) + composeSubstanceSubstanceIngredientComponent("ingredient", e); + } + } + + protected void composeSubstanceSubstanceInstanceComponent(String name, Substance.SubstanceInstanceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSubstanceSubstanceInstanceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSubstanceSubstanceInstanceComponentElements(Substance.SubstanceInstanceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasExpiryElement()) { + composeDateTime("expiry", element.getExpiryElement()); + } + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + } + + protected void composeSubstanceSubstanceIngredientComponent(String name, Substance.SubstanceIngredientComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSubstanceSubstanceIngredientComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSubstanceSubstanceIngredientComponentElements(Substance.SubstanceIngredientComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasQuantity()) { + composeRatio("quantity", element.getQuantity()); + } + if (element.hasSubstance()) { + composeType("substance", element.getSubstance()); + } } + + protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSupplyDeliveryElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSupplyDeliveryElements(SupplyDelivery element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory()); + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasSuppliedItem()) { + composeSupplyDeliverySupplyDeliverySuppliedItemComponent("suppliedItem", element.getSuppliedItem()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasSupplier()) { + composeReference("supplier", element.getSupplier()); + } + if (element.hasDestination()) { + composeReference("destination", element.getDestination()); + } + if (element.hasReceiver()) { + for (Reference e : element.getReceiver()) + composeReference("receiver", e); + } + } + + protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(String name, SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSupplyDeliverySupplyDeliverySuppliedItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponentElements(SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasQuantity()) { + composeSimpleQuantity("quantity", element.getQuantity()); + } + if (element.hasItem()) { + composeType("item", element.getItem()); + } } + + protected void composeSupplyRequest(String name, SupplyRequest element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeSupplyRequestElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSupplyRequestElements(SupplyRequest element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory()); + if (element.hasCategory()) { + composeCodeableConcept("category", element.getCategory()); + } + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory()); + if (element.hasOrderedItem()) { + composeSupplyRequestSupplyRequestOrderedItemComponent("orderedItem", element.getOrderedItem()); + } + if (element.hasOccurrence()) { + composeType("occurrence", element.getOccurrence()); + } if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasRequester()) { + composeSupplyRequestSupplyRequestRequesterComponent("requester", element.getRequester()); + } + if (element.hasSupplier()) { + for (Reference e : element.getSupplier()) + composeReference("supplier", e); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } if (element.hasDeliverFrom()) { + composeReference("deliverFrom", element.getDeliverFrom()); + } + if (element.hasDeliverTo()) { + composeReference("deliverTo", element.getDeliverTo()); + } + } + + protected void composeSupplyRequestSupplyRequestOrderedItemComponent(String name, SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSupplyRequestSupplyRequestOrderedItemComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSupplyRequestSupplyRequestOrderedItemComponentElements(SupplyRequest.SupplyRequestOrderedItemComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasQuantity()) { + composeQuantity("quantity", element.getQuantity()); + } + if (element.hasItem()) { + composeType("item", element.getItem()); + } } + + protected void composeSupplyRequestSupplyRequestRequesterComponent(String name, SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeSupplyRequestSupplyRequestRequesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeSupplyRequestSupplyRequestRequesterComponentElements(SupplyRequest.SupplyRequestRequesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeTask(String name, Task element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeTaskElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTaskElements(Task element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasDefinition()) { + composeType("definition", element.getDefinition()); + } if (element.hasBasedOn()) { + for (Reference e : element.getBasedOn()) + composeReference("basedOn", e); + } + if (element.hasGroupIdentifier()) { + composeIdentifier("groupIdentifier", element.getGroupIdentifier()); + } + if (element.hasPartOf()) { + for (Reference e : element.getPartOf()) + composeReference("partOf", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Task.TaskStatusEnumFactory()); + if (element.hasStatusReason()) { + composeCodeableConcept("statusReason", element.getStatusReason()); + } + if (element.hasBusinessStatus()) { + composeCodeableConcept("businessStatus", element.getBusinessStatus()); + } + if (element.hasIntentElement()) + composeEnumeration("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory()); + if (element.hasPriorityElement()) + composeEnumeration("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory()); + if (element.hasCode()) { + composeCodeableConcept("code", element.getCode()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasFocus()) { + composeReference("focus", element.getFocus()); + } + if (element.hasFor()) { + composeReference("for", element.getFor()); + } + if (element.hasContext()) { + composeReference("context", element.getContext()); + } + if (element.hasExecutionPeriod()) { + composePeriod("executionPeriod", element.getExecutionPeriod()); + } + if (element.hasAuthoredOnElement()) { + composeDateTime("authoredOn", element.getAuthoredOnElement()); + } + if (element.hasLastModifiedElement()) { + composeDateTime("lastModified", element.getLastModifiedElement()); + } + if (element.hasRequester()) { + composeTaskTaskRequesterComponent("requester", element.getRequester()); + } + if (element.hasPerformerType()) { + for (CodeableConcept e : element.getPerformerType()) + composeCodeableConcept("performerType", e); + } + if (element.hasOwner()) { + composeReference("owner", element.getOwner()); + } + if (element.hasReasonCode()) { + composeCodeableConcept("reasonCode", element.getReasonCode()); + } + if (element.hasReasonReference()) { + composeReference("reasonReference", element.getReasonReference()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + if (element.hasRelevantHistory()) { + for (Reference e : element.getRelevantHistory()) + composeReference("relevantHistory", e); + } + if (element.hasRestriction()) { + composeTaskTaskRestrictionComponent("restriction", element.getRestriction()); + } + if (element.hasInput()) { + for (Task.ParameterComponent e : element.getInput()) + composeTaskParameterComponent("input", e); + } + if (element.hasOutput()) { + for (Task.TaskOutputComponent e : element.getOutput()) + composeTaskTaskOutputComponent("output", e); + } + } + + protected void composeTaskTaskRequesterComponent(String name, Task.TaskRequesterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTaskTaskRequesterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTaskTaskRequesterComponentElements(Task.TaskRequesterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAgent()) { + composeReference("agent", element.getAgent()); + } + if (element.hasOnBehalfOf()) { + composeReference("onBehalfOf", element.getOnBehalfOf()); + } + } + + protected void composeTaskTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTaskTaskRestrictionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTaskTaskRestrictionComponentElements(Task.TaskRestrictionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRepetitionsElement()) { + composePositiveInt("repetitions", element.getRepetitionsElement()); + } + if (element.hasPeriod()) { + composePeriod("period", element.getPeriod()); + } + if (element.hasRecipient()) { + for (Reference e : element.getRecipient()) + composeReference("recipient", e); + } + } + + protected void composeTaskParameterComponent(String name, Task.ParameterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTaskParameterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTaskParameterComponentElements(Task.ParameterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeTaskTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTaskTaskOutputComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTaskTaskOutputComponentElements(Task.TaskOutputComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCodeableConcept("type", element.getType()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeTestReport(String name, TestReport element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportElements(TestReport element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory()); + if (element.hasTestScript()) { + composeReference("testScript", element.getTestScript()); + } + if (element.hasResultElement()) + composeEnumeration("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory()); + if (element.hasScoreElement()) { + composeDecimal("score", element.getScoreElement()); + } + if (element.hasTesterElement()) { + composeString("tester", element.getTesterElement()); + } + if (element.hasIssuedElement()) { + composeDateTime("issued", element.getIssuedElement()); + } + if (element.hasParticipant()) { + for (TestReport.TestReportParticipantComponent e : element.getParticipant()) + composeTestReportTestReportParticipantComponent("participant", e); + } + if (element.hasSetup()) { + composeTestReportTestReportSetupComponent("setup", element.getSetup()); + } + if (element.hasTest()) { + for (TestReport.TestReportTestComponent e : element.getTest()) + composeTestReportTestReportTestComponent("test", e); + } + if (element.hasTeardown()) { + composeTestReportTestReportTeardownComponent("teardown", element.getTeardown()); + } + } + + protected void composeTestReportTestReportParticipantComponent(String name, TestReport.TestReportParticipantComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportTestReportParticipantComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportTestReportParticipantComponentElements(TestReport.TestReportParticipantComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasTypeElement()) + composeEnumeration("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory()); + if (element.hasUriElement()) { + composeUri("uri", element.getUriElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + } + + protected void composeTestReportTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportTestReportSetupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportTestReportSetupComponentElements(TestReport.TestReportSetupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAction()) { + for (TestReport.SetupActionComponent e : element.getAction()) + composeTestReportSetupActionComponent("action", e); + } + } + + protected void composeTestReportSetupActionComponent(String name, TestReport.SetupActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportSetupActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportSetupActionComponentElements(TestReport.SetupActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOperation()) { + composeTestReportSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestReportSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestReportSetupActionOperationComponent(String name, TestReport.SetupActionOperationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportSetupActionOperationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportSetupActionOperationComponentElements(TestReport.SetupActionOperationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasResultElement()) + composeEnumeration("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory()); + if (element.hasMessageElement()) { + composeMarkdown("message", element.getMessageElement()); + } + if (element.hasDetailElement()) { + composeUri("detail", element.getDetailElement()); + } + } + + protected void composeTestReportSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportSetupActionAssertComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportSetupActionAssertComponentElements(TestReport.SetupActionAssertComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasResultElement()) + composeEnumeration("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory()); + if (element.hasMessageElement()) { + composeMarkdown("message", element.getMessageElement()); + } + if (element.hasDetailElement()) { + composeString("detail", element.getDetailElement()); + } + } + + protected void composeTestReportTestReportTestComponent(String name, TestReport.TestReportTestComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportTestReportTestComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportTestReportTestComponentElements(TestReport.TestReportTestComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasAction()) { + for (TestReport.TestActionComponent e : element.getAction()) + composeTestReportTestActionComponent("action", e); + } + } + + protected void composeTestReportTestActionComponent(String name, TestReport.TestActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportTestActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportTestActionComponentElements(TestReport.TestActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOperation()) { + composeTestReportSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestReportSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestReportTestReportTeardownComponent(String name, TestReport.TestReportTeardownComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportTestReportTeardownComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportTestReportTeardownComponentElements(TestReport.TestReportTeardownComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAction()) { + for (TestReport.TeardownActionComponent e : element.getAction()) + composeTestReportTeardownActionComponent("action", e); + } + } + + protected void composeTestReportTeardownActionComponent(String name, TestReport.TeardownActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestReportTeardownActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestReportTeardownActionComponentElements(TestReport.TeardownActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOperation()) { + composeTestReportSetupActionOperationComponent("operation", element.getOperation()); + } + } + + protected void composeTestScript(String name, TestScript element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptElements(TestScript element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + composeIdentifier("identifier", element.getIdentifier()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasOrigin()) { + for (TestScript.TestScriptOriginComponent e : element.getOrigin()) + composeTestScriptTestScriptOriginComponent("origin", e); + } + if (element.hasDestination()) { + for (TestScript.TestScriptDestinationComponent e : element.getDestination()) + composeTestScriptTestScriptDestinationComponent("destination", e); + } + if (element.hasMetadata()) { + composeTestScriptTestScriptMetadataComponent("metadata", element.getMetadata()); + } + if (element.hasFixture()) { + for (TestScript.TestScriptFixtureComponent e : element.getFixture()) + composeTestScriptTestScriptFixtureComponent("fixture", e); + } + if (element.hasProfile()) { + for (Reference e : element.getProfile()) + composeReference("profile", e); + } + if (element.hasVariable()) { + for (TestScript.TestScriptVariableComponent e : element.getVariable()) + composeTestScriptTestScriptVariableComponent("variable", e); + } + if (element.hasRule()) { + for (TestScript.TestScriptRuleComponent e : element.getRule()) + composeTestScriptTestScriptRuleComponent("rule", e); + } + if (element.hasRuleset()) { + for (TestScript.TestScriptRulesetComponent e : element.getRuleset()) + composeTestScriptTestScriptRulesetComponent("ruleset", e); + } + if (element.hasSetup()) { + composeTestScriptTestScriptSetupComponent("setup", element.getSetup()); + } + if (element.hasTest()) { + for (TestScript.TestScriptTestComponent e : element.getTest()) + composeTestScriptTestScriptTestComponent("test", e); + } + if (element.hasTeardown()) { + composeTestScriptTestScriptTeardownComponent("teardown", element.getTeardown()); + } + } + + protected void composeTestScriptTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptOriginComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptOriginComponentElements(TestScript.TestScriptOriginComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIndexElement()) { + composeInteger("index", element.getIndexElement()); + } + if (element.hasProfile()) { + composeCoding("profile", element.getProfile()); + } + } + + protected void composeTestScriptTestScriptDestinationComponent(String name, TestScript.TestScriptDestinationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptDestinationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptDestinationComponentElements(TestScript.TestScriptDestinationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIndexElement()) { + composeInteger("index", element.getIndexElement()); + } + if (element.hasProfile()) { + composeCoding("profile", element.getProfile()); + } + } + + protected void composeTestScriptTestScriptMetadataComponent(String name, TestScript.TestScriptMetadataComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptMetadataComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptMetadataComponentElements(TestScript.TestScriptMetadataComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLink()) { + for (TestScript.TestScriptMetadataLinkComponent e : element.getLink()) + composeTestScriptTestScriptMetadataLinkComponent("link", e); + } + if (element.hasCapability()) { + for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability()) + composeTestScriptTestScriptMetadataCapabilityComponent("capability", e); + } + } + + protected void composeTestScriptTestScriptMetadataLinkComponent(String name, TestScript.TestScriptMetadataLinkComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptMetadataLinkComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptMetadataLinkComponentElements(TestScript.TestScriptMetadataLinkComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + } + + protected void composeTestScriptTestScriptMetadataCapabilityComponent(String name, TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptMetadataCapabilityComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptMetadataCapabilityComponentElements(TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRequiredElement()) { + composeBoolean("required", element.getRequiredElement()); + } + if (element.hasValidatedElement()) { + composeBoolean("validated", element.getValidatedElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasOrigin()) { + for (IntegerType e : element.getOrigin()) + composeInteger("origin", e); + } + if (element.hasDestinationElement()) { + composeInteger("destination", element.getDestinationElement()); + } + if (element.hasLink()) { + for (UriType e : element.getLink()) + composeUri("link", e); + } + if (element.hasCapabilities()) { + composeReference("capabilities", element.getCapabilities()); + } + } + + protected void composeTestScriptTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptFixtureComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptFixtureComponentElements(TestScript.TestScriptFixtureComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAutocreateElement()) { + composeBoolean("autocreate", element.getAutocreateElement()); + } + if (element.hasAutodeleteElement()) { + composeBoolean("autodelete", element.getAutodeleteElement()); + } + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + } + + protected void composeTestScriptTestScriptVariableComponent(String name, TestScript.TestScriptVariableComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptVariableComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptVariableComponentElements(TestScript.TestScriptVariableComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDefaultValueElement()) { + composeString("defaultValue", element.getDefaultValueElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + if (element.hasHeaderFieldElement()) { + composeString("headerField", element.getHeaderFieldElement()); + } + if (element.hasHintElement()) { + composeString("hint", element.getHintElement()); + } + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasSourceIdElement()) { + composeId("sourceId", element.getSourceIdElement()); + } + } + + protected void composeTestScriptTestScriptRuleComponent(String name, TestScript.TestScriptRuleComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptRuleComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptRuleComponentElements(TestScript.TestScriptRuleComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + if (element.hasParam()) { + for (TestScript.RuleParamComponent e : element.getParam()) + composeTestScriptRuleParamComponent("param", e); + } + } + + protected void composeTestScriptRuleParamComponent(String name, TestScript.RuleParamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptRuleParamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptRuleParamComponentElements(TestScript.RuleParamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeTestScriptTestScriptRulesetComponent(String name, TestScript.TestScriptRulesetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptRulesetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptRulesetComponentElements(TestScript.TestScriptRulesetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasResource()) { + composeReference("resource", element.getResource()); + } + if (element.hasRule()) { + for (TestScript.RulesetRuleComponent e : element.getRule()) + composeTestScriptRulesetRuleComponent("rule", e); + } + } + + protected void composeTestScriptRulesetRuleComponent(String name, TestScript.RulesetRuleComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptRulesetRuleComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptRulesetRuleComponentElements(TestScript.RulesetRuleComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRuleIdElement()) { + composeId("ruleId", element.getRuleIdElement()); + } + if (element.hasParam()) { + for (TestScript.RulesetRuleParamComponent e : element.getParam()) + composeTestScriptRulesetRuleParamComponent("param", e); + } + } + + protected void composeTestScriptRulesetRuleParamComponent(String name, TestScript.RulesetRuleParamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptRulesetRuleParamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptRulesetRuleParamComponentElements(TestScript.RulesetRuleParamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeTestScriptTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptSetupComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptSetupComponentElements(TestScript.TestScriptSetupComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAction()) { + for (TestScript.SetupActionComponent e : element.getAction()) + composeTestScriptSetupActionComponent("action", e); + } + } + + protected void composeTestScriptSetupActionComponent(String name, TestScript.SetupActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptSetupActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptSetupActionComponentElements(TestScript.SetupActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOperation()) { + composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestScriptSetupActionOperationComponent(String name, TestScript.SetupActionOperationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptSetupActionOperationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptSetupActionOperationComponentElements(TestScript.SetupActionOperationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasType()) { + composeCoding("type", element.getType()); + } + if (element.hasResourceElement()) { + composeCode("resource", element.getResourceElement()); + } + if (element.hasLabelElement()) { + composeString("label", element.getLabelElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasAcceptElement()) + composeEnumeration("accept", element.getAcceptElement(), new TestScript.ContentTypeEnumFactory()); + if (element.hasContentTypeElement()) + composeEnumeration("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory()); + if (element.hasDestinationElement()) { + composeInteger("destination", element.getDestinationElement()); + } + if (element.hasEncodeRequestUrlElement()) { + composeBoolean("encodeRequestUrl", element.getEncodeRequestUrlElement()); + } + if (element.hasOriginElement()) { + composeInteger("origin", element.getOriginElement()); + } + if (element.hasParamsElement()) { + composeString("params", element.getParamsElement()); + } + if (element.hasRequestHeader()) { + for (TestScript.SetupActionOperationRequestHeaderComponent e : element.getRequestHeader()) + composeTestScriptSetupActionOperationRequestHeaderComponent("requestHeader", e); + } + if (element.hasRequestIdElement()) { + composeId("requestId", element.getRequestIdElement()); + } + if (element.hasResponseIdElement()) { + composeId("responseId", element.getResponseIdElement()); + } + if (element.hasSourceIdElement()) { + composeId("sourceId", element.getSourceIdElement()); + } + if (element.hasTargetIdElement()) { + composeId("targetId", element.getTargetIdElement()); + } + if (element.hasUrlElement()) { + composeString("url", element.getUrlElement()); + } + } + + protected void composeTestScriptSetupActionOperationRequestHeaderComponent(String name, TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptSetupActionOperationRequestHeaderComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptSetupActionOperationRequestHeaderComponentElements(TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasFieldElement()) { + composeString("field", element.getFieldElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeTestScriptSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptSetupActionAssertComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptSetupActionAssertComponentElements(TestScript.SetupActionAssertComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLabelElement()) { + composeString("label", element.getLabelElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasDirectionElement()) + composeEnumeration("direction", element.getDirectionElement(), new TestScript.AssertionDirectionTypeEnumFactory()); + if (element.hasCompareToSourceIdElement()) { + composeString("compareToSourceId", element.getCompareToSourceIdElement()); + } + if (element.hasCompareToSourceExpressionElement()) { + composeString("compareToSourceExpression", element.getCompareToSourceExpressionElement()); + } + if (element.hasCompareToSourcePathElement()) { + composeString("compareToSourcePath", element.getCompareToSourcePathElement()); + } + if (element.hasContentTypeElement()) + composeEnumeration("contentType", element.getContentTypeElement(), new TestScript.ContentTypeEnumFactory()); + if (element.hasExpressionElement()) { + composeString("expression", element.getExpressionElement()); + } + if (element.hasHeaderFieldElement()) { + composeString("headerField", element.getHeaderFieldElement()); + } + if (element.hasMinimumIdElement()) { + composeString("minimumId", element.getMinimumIdElement()); + } + if (element.hasNavigationLinksElement()) { + composeBoolean("navigationLinks", element.getNavigationLinksElement()); + } + if (element.hasOperatorElement()) + composeEnumeration("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory()); + if (element.hasPathElement()) { + composeString("path", element.getPathElement()); + } + if (element.hasRequestMethodElement()) + composeEnumeration("requestMethod", element.getRequestMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory()); + if (element.hasRequestURLElement()) { + composeString("requestURL", element.getRequestURLElement()); + } + if (element.hasResourceElement()) { + composeCode("resource", element.getResourceElement()); + } + if (element.hasResponseElement()) + composeEnumeration("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory()); + if (element.hasResponseCodeElement()) { + composeString("responseCode", element.getResponseCodeElement()); + } + if (element.hasRule()) { + composeTestScriptActionAssertRuleComponent("rule", element.getRule()); + } + if (element.hasRuleset()) { + composeTestScriptActionAssertRulesetComponent("ruleset", element.getRuleset()); + } + if (element.hasSourceIdElement()) { + composeId("sourceId", element.getSourceIdElement()); + } + if (element.hasValidateProfileIdElement()) { + composeId("validateProfileId", element.getValidateProfileIdElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + if (element.hasWarningOnlyElement()) { + composeBoolean("warningOnly", element.getWarningOnlyElement()); + } + } + + protected void composeTestScriptActionAssertRuleComponent(String name, TestScript.ActionAssertRuleComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptActionAssertRuleComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptActionAssertRuleComponentElements(TestScript.ActionAssertRuleComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRuleIdElement()) { + composeId("ruleId", element.getRuleIdElement()); + } + if (element.hasParam()) { + for (TestScript.ActionAssertRuleParamComponent e : element.getParam()) + composeTestScriptActionAssertRuleParamComponent("param", e); + } + } + + protected void composeTestScriptActionAssertRuleParamComponent(String name, TestScript.ActionAssertRuleParamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptActionAssertRuleParamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptActionAssertRuleParamComponentElements(TestScript.ActionAssertRuleParamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeTestScriptActionAssertRulesetComponent(String name, TestScript.ActionAssertRulesetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptActionAssertRulesetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptActionAssertRulesetComponentElements(TestScript.ActionAssertRulesetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRulesetIdElement()) { + composeId("rulesetId", element.getRulesetIdElement()); + } + if (element.hasRule()) { + for (TestScript.ActionAssertRulesetRuleComponent e : element.getRule()) + composeTestScriptActionAssertRulesetRuleComponent("rule", e); + } + } + + protected void composeTestScriptActionAssertRulesetRuleComponent(String name, TestScript.ActionAssertRulesetRuleComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptActionAssertRulesetRuleComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptActionAssertRulesetRuleComponentElements(TestScript.ActionAssertRulesetRuleComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasRuleIdElement()) { + composeId("ruleId", element.getRuleIdElement()); + } + if (element.hasParam()) { + for (TestScript.ActionAssertRulesetRuleParamComponent e : element.getParam()) + composeTestScriptActionAssertRulesetRuleParamComponent("param", e); + } + } + + protected void composeTestScriptActionAssertRulesetRuleParamComponent(String name, TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptActionAssertRulesetRuleParamComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptActionAssertRulesetRuleParamComponentElements(TestScript.ActionAssertRulesetRuleParamComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeTestScriptTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptTestComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptTestComponentElements(TestScript.TestScriptTestComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasDescriptionElement()) { + composeString("description", element.getDescriptionElement()); + } + if (element.hasAction()) { + for (TestScript.TestActionComponent e : element.getAction()) + composeTestScriptTestActionComponent("action", e); + } + } + + protected void composeTestScriptTestActionComponent(String name, TestScript.TestActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestActionComponentElements(TestScript.TestActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOperation()) { + composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); + } + if (element.hasAssert()) { + composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); + } + } + + protected void composeTestScriptTestScriptTeardownComponent(String name, TestScript.TestScriptTeardownComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTestScriptTeardownComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTestScriptTeardownComponentElements(TestScript.TestScriptTeardownComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasAction()) { + for (TestScript.TeardownActionComponent e : element.getAction()) + composeTestScriptTeardownActionComponent("action", e); + } + } + + protected void composeTestScriptTeardownActionComponent(String name, TestScript.TeardownActionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeTestScriptTeardownActionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeTestScriptTeardownActionComponentElements(TestScript.TeardownActionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasOperation()) { + composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); + } + } + + protected void composeValueSet(String name, ValueSet element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetElements(ValueSet element) throws IOException { + composeDomainResourceElements(element); + if (element.hasUrlElement()) { + composeUri("url", element.getUrlElement()); + } + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasTitleElement()) { + composeString("title", element.getTitleElement()); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); + if (element.hasExperimentalElement()) { + composeBoolean("experimental", element.getExperimentalElement()); + } + if (element.hasDateElement()) { + composeDateTime("date", element.getDateElement()); + } + if (element.hasPublisherElement()) { + composeString("publisher", element.getPublisherElement()); + } + if (element.hasContact()) { + for (ContactDetail e : element.getContact()) + composeContactDetail("contact", e); + } + if (element.hasDescriptionElement()) { + composeMarkdown("description", element.getDescriptionElement()); + } + if (element.hasUseContext()) { + for (UsageContext e : element.getUseContext()) + composeUsageContext("useContext", e); + } + if (element.hasJurisdiction()) { + for (CodeableConcept e : element.getJurisdiction()) + composeCodeableConcept("jurisdiction", e); + } + if (element.hasImmutableElement()) { + composeBoolean("immutable", element.getImmutableElement()); + } + if (element.hasPurposeElement()) { + composeMarkdown("purpose", element.getPurposeElement()); + } + if (element.hasCopyrightElement()) { + composeMarkdown("copyright", element.getCopyrightElement()); + } + if (element.hasExtensibleElement()) { + composeBoolean("extensible", element.getExtensibleElement()); + } + if (element.hasCompose()) { + composeValueSetValueSetComposeComponent("compose", element.getCompose()); + } + if (element.hasExpansion()) { + composeValueSetValueSetExpansionComponent("expansion", element.getExpansion()); + } + } + + protected void composeValueSetValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetValueSetComposeComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetValueSetComposeComponentElements(ValueSet.ValueSetComposeComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLockedDateElement()) { + composeDate("lockedDate", element.getLockedDateElement()); + } + if (element.hasInactiveElement()) { + composeBoolean("inactive", element.getInactiveElement()); + } + if (element.hasInclude()) { + for (ValueSet.ConceptSetComponent e : element.getInclude()) + composeValueSetConceptSetComponent("include", e); + } + if (element.hasExclude()) { + for (ValueSet.ConceptSetComponent e : element.getExclude()) + composeValueSetConceptSetComponent("exclude", e); + } + } + + protected void composeValueSetConceptSetComponent(String name, ValueSet.ConceptSetComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetConceptSetComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetConceptSetComponentElements(ValueSet.ConceptSetComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasConcept()) { + for (ValueSet.ConceptReferenceComponent e : element.getConcept()) + composeValueSetConceptReferenceComponent("concept", e); + } + if (element.hasFilter()) { + for (ValueSet.ConceptSetFilterComponent e : element.getFilter()) + composeValueSetConceptSetFilterComponent("filter", e); + } + if (element.hasValueSet()) { + for (UriType e : element.getValueSet()) + composeUri("valueSet", e); + } + } + + protected void composeValueSetConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetConceptReferenceComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetConceptReferenceComponentElements(ValueSet.ConceptReferenceComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasDesignation()) { + for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) + composeValueSetConceptReferenceDesignationComponent("designation", e); + } + } + + protected void composeValueSetConceptReferenceDesignationComponent(String name, ValueSet.ConceptReferenceDesignationComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetConceptReferenceDesignationComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetConceptReferenceDesignationComponentElements(ValueSet.ConceptReferenceDesignationComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasLanguageElement()) { + composeCode("language", element.getLanguageElement()); + } + if (element.hasUse()) { + composeCoding("use", element.getUse()); + } + if (element.hasValueElement()) { + composeString("value", element.getValueElement()); + } + } + + protected void composeValueSetConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetConceptSetFilterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetConceptSetFilterComponentElements(ValueSet.ConceptSetFilterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasPropertyElement()) { + composeCode("property", element.getPropertyElement()); + } + if (element.hasOpElement()) + composeEnumeration("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory()); + if (element.hasValueElement()) { + composeCode("value", element.getValueElement()); + } + } + + protected void composeValueSetValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetValueSetExpansionComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetValueSetExpansionComponentElements(ValueSet.ValueSetExpansionComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasIdentifierElement()) { + composeUri("identifier", element.getIdentifierElement()); + } + if (element.hasTimestampElement()) { + composeDateTime("timestamp", element.getTimestampElement()); + } + if (element.hasTotalElement()) { + composeInteger("total", element.getTotalElement()); + } + if (element.hasOffsetElement()) { + composeInteger("offset", element.getOffsetElement()); + } + if (element.hasParameter()) { + for (ValueSet.ValueSetExpansionParameterComponent e : element.getParameter()) + composeValueSetValueSetExpansionParameterComponent("parameter", e); + } + if (element.hasContains()) { + for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) + composeValueSetValueSetExpansionContainsComponent("contains", e); + } + } + + protected void composeValueSetValueSetExpansionParameterComponent(String name, ValueSet.ValueSetExpansionParameterComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetValueSetExpansionParameterComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetValueSetExpansionParameterComponentElements(ValueSet.ValueSetExpansionParameterComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasNameElement()) { + composeString("name", element.getNameElement()); + } + if (element.hasValue()) { + composeType("value", element.getValue()); + } } + + protected void composeValueSetValueSetExpansionContainsComponent(String name, ValueSet.ValueSetExpansionContainsComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeValueSetValueSetExpansionContainsComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeValueSetValueSetExpansionContainsComponentElements(ValueSet.ValueSetExpansionContainsComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasSystemElement()) { + composeUri("system", element.getSystemElement()); + } + if (element.hasAbstractElement()) { + composeBoolean("abstract", element.getAbstractElement()); + } + if (element.hasInactiveElement()) { + composeBoolean("inactive", element.getInactiveElement()); + } + if (element.hasVersionElement()) { + composeString("version", element.getVersionElement()); + } + if (element.hasCodeElement()) { + composeCode("code", element.getCodeElement()); + } + if (element.hasDisplayElement()) { + composeString("display", element.getDisplayElement()); + } + if (element.hasDesignation()) { + for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) + composeValueSetConceptReferenceDesignationComponent("designation", e); + } + if (element.hasContains()) { + for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) + composeValueSetValueSetExpansionContainsComponent("contains", e); + } + } + + protected void composeVisionPrescription(String name, VisionPrescription element) throws IOException { + if (element != null) { + composeDomainResourceAttributes(element); + xml.enter(FHIR_NS, name); + composeVisionPrescriptionElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeVisionPrescriptionElements(VisionPrescription element) throws IOException { + composeDomainResourceElements(element); + if (element.hasIdentifier()) { + for (Identifier e : element.getIdentifier()) + composeIdentifier("identifier", e); + } + if (element.hasStatusElement()) + composeEnumeration("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory()); + if (element.hasPatient()) { + composeReference("patient", element.getPatient()); + } + if (element.hasEncounter()) { + composeReference("encounter", element.getEncounter()); + } + if (element.hasDateWrittenElement()) { + composeDateTime("dateWritten", element.getDateWrittenElement()); + } + if (element.hasPrescriber()) { + composeReference("prescriber", element.getPrescriber()); + } + if (element.hasReason()) { + composeType("reason", element.getReason()); + } if (element.hasDispense()) { + for (VisionPrescription.VisionPrescriptionDispenseComponent e : element.getDispense()) + composeVisionPrescriptionVisionPrescriptionDispenseComponent("dispense", e); + } + } + + protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(String name, VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { + if (element != null) { + composeElementAttributes(element); + xml.enter(FHIR_NS, name); + composeVisionPrescriptionVisionPrescriptionDispenseComponentElements(element); + composeElementClose(element); + xml.exit(FHIR_NS, name); + } + } + + protected void composeVisionPrescriptionVisionPrescriptionDispenseComponentElements(VisionPrescription.VisionPrescriptionDispenseComponent element) throws IOException { + composeBackboneElements(element); + if (element.hasProduct()) { + composeCodeableConcept("product", element.getProduct()); + } + if (element.hasEyeElement()) + composeEnumeration("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory()); + if (element.hasSphereElement()) { + composeDecimal("sphere", element.getSphereElement()); + } + if (element.hasCylinderElement()) { + composeDecimal("cylinder", element.getCylinderElement()); + } + if (element.hasAxisElement()) { + composeInteger("axis", element.getAxisElement()); + } + if (element.hasPrismElement()) { + composeDecimal("prism", element.getPrismElement()); + } + if (element.hasBaseElement()) + composeEnumeration("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory()); + if (element.hasAddElement()) { + composeDecimal("add", element.getAddElement()); + } + if (element.hasPowerElement()) { + composeDecimal("power", element.getPowerElement()); + } + if (element.hasBackCurveElement()) { + composeDecimal("backCurve", element.getBackCurveElement()); + } + if (element.hasDiameterElement()) { + composeDecimal("diameter", element.getDiameterElement()); + } + if (element.hasDuration()) { + composeSimpleQuantity("duration", element.getDuration()); + } + if (element.hasColorElement()) { + composeString("color", element.getColorElement()); + } + if (element.hasBrandElement()) { + composeString("brand", element.getBrandElement()); + } + if (element.hasNote()) { + for (Annotation e : element.getNote()) + composeAnnotation("note", e); + } + } + + @Override + protected void composeResource(Resource resource) throws IOException { + if (resource instanceof Parameters) + composeParameters("Parameters", (Parameters)resource); + else if (resource instanceof Account) + composeAccount("Account", (Account)resource); + else if (resource instanceof ActivityDefinition) + composeActivityDefinition("ActivityDefinition", (ActivityDefinition)resource); + else if (resource instanceof AdverseEvent) + composeAdverseEvent("AdverseEvent", (AdverseEvent)resource); + else if (resource instanceof AllergyIntolerance) + composeAllergyIntolerance("AllergyIntolerance", (AllergyIntolerance)resource); + else if (resource instanceof Appointment) + composeAppointment("Appointment", (Appointment)resource); + else if (resource instanceof AppointmentResponse) + composeAppointmentResponse("AppointmentResponse", (AppointmentResponse)resource); + else if (resource instanceof AuditEvent) + composeAuditEvent("AuditEvent", (AuditEvent)resource); + else if (resource instanceof Basic) + composeBasic("Basic", (Basic)resource); + else if (resource instanceof Binary) + composeBinary("Binary", (Binary)resource); + else if (resource instanceof BodyStructure) + composeBodyStructure("BodyStructure", (BodyStructure)resource); + else if (resource instanceof Bundle) + composeBundle("Bundle", (Bundle)resource); + else if (resource instanceof CapabilityStatement) + composeCapabilityStatement("CapabilityStatement", (CapabilityStatement)resource); + else if (resource instanceof CarePlan) + composeCarePlan("CarePlan", (CarePlan)resource); + else if (resource instanceof CareTeam) + composeCareTeam("CareTeam", (CareTeam)resource); + else if (resource instanceof CatalogEntry) + composeCatalogEntry("CatalogEntry", (CatalogEntry)resource); + else if (resource instanceof ChargeItem) + composeChargeItem("ChargeItem", (ChargeItem)resource); + else if (resource instanceof Claim) + composeClaim("Claim", (Claim)resource); + else if (resource instanceof ClaimResponse) + composeClaimResponse("ClaimResponse", (ClaimResponse)resource); + else if (resource instanceof ClinicalImpression) + composeClinicalImpression("ClinicalImpression", (ClinicalImpression)resource); + else if (resource instanceof CodeSystem) + composeCodeSystem("CodeSystem", (CodeSystem)resource); + else if (resource instanceof Communication) + composeCommunication("Communication", (Communication)resource); + else if (resource instanceof CommunicationRequest) + composeCommunicationRequest("CommunicationRequest", (CommunicationRequest)resource); + else if (resource instanceof CompartmentDefinition) + composeCompartmentDefinition("CompartmentDefinition", (CompartmentDefinition)resource); + else if (resource instanceof Composition) + composeComposition("Composition", (Composition)resource); + else if (resource instanceof ConceptMap) + composeConceptMap("ConceptMap", (ConceptMap)resource); + else if (resource instanceof Condition) + composeCondition("Condition", (Condition)resource); + else if (resource instanceof Consent) + composeConsent("Consent", (Consent)resource); + else if (resource instanceof Contract) + composeContract("Contract", (Contract)resource); + else if (resource instanceof Coverage) + composeCoverage("Coverage", (Coverage)resource); + else if (resource instanceof DetectedIssue) + composeDetectedIssue("DetectedIssue", (DetectedIssue)resource); + else if (resource instanceof Device) + composeDevice("Device", (Device)resource); + else if (resource instanceof DeviceComponent) + composeDeviceComponent("DeviceComponent", (DeviceComponent)resource); + else if (resource instanceof DeviceMetric) + composeDeviceMetric("DeviceMetric", (DeviceMetric)resource); + else if (resource instanceof DeviceRequest) + composeDeviceRequest("DeviceRequest", (DeviceRequest)resource); + else if (resource instanceof DeviceUseStatement) + composeDeviceUseStatement("DeviceUseStatement", (DeviceUseStatement)resource); + else if (resource instanceof DiagnosticReport) + composeDiagnosticReport("DiagnosticReport", (DiagnosticReport)resource); + else if (resource instanceof DocumentManifest) + composeDocumentManifest("DocumentManifest", (DocumentManifest)resource); + else if (resource instanceof DocumentReference) + composeDocumentReference("DocumentReference", (DocumentReference)resource); + else if (resource instanceof EligibilityRequest) + composeEligibilityRequest("EligibilityRequest", (EligibilityRequest)resource); + else if (resource instanceof EligibilityResponse) + composeEligibilityResponse("EligibilityResponse", (EligibilityResponse)resource); + else if (resource instanceof Encounter) + composeEncounter("Encounter", (Encounter)resource); + else if (resource instanceof Endpoint) + composeEndpoint("Endpoint", (Endpoint)resource); + else if (resource instanceof EnrollmentRequest) + composeEnrollmentRequest("EnrollmentRequest", (EnrollmentRequest)resource); + else if (resource instanceof EnrollmentResponse) + composeEnrollmentResponse("EnrollmentResponse", (EnrollmentResponse)resource); + else if (resource instanceof EpisodeOfCare) + composeEpisodeOfCare("EpisodeOfCare", (EpisodeOfCare)resource); + else if (resource instanceof EventDefinition) + composeEventDefinition("EventDefinition", (EventDefinition)resource); + else if (resource instanceof ExampleScenario) + composeExampleScenario("ExampleScenario", (ExampleScenario)resource); + else if (resource instanceof ExpansionProfile) + composeExpansionProfile("ExpansionProfile", (ExpansionProfile)resource); + else if (resource instanceof ExplanationOfBenefit) + composeExplanationOfBenefit("ExplanationOfBenefit", (ExplanationOfBenefit)resource); + else if (resource instanceof FamilyMemberHistory) + composeFamilyMemberHistory("FamilyMemberHistory", (FamilyMemberHistory)resource); + else if (resource instanceof Flag) + composeFlag("Flag", (Flag)resource); + else if (resource instanceof Goal) + composeGoal("Goal", (Goal)resource); + else if (resource instanceof GraphDefinition) + composeGraphDefinition("GraphDefinition", (GraphDefinition)resource); + else if (resource instanceof Group) + composeGroup("Group", (Group)resource); + else if (resource instanceof GuidanceResponse) + composeGuidanceResponse("GuidanceResponse", (GuidanceResponse)resource); + else if (resource instanceof HealthcareService) + composeHealthcareService("HealthcareService", (HealthcareService)resource); + else if (resource instanceof ImagingManifest) + composeImagingManifest("ImagingManifest", (ImagingManifest)resource); + else if (resource instanceof ImagingStudy) + composeImagingStudy("ImagingStudy", (ImagingStudy)resource); + else if (resource instanceof Immunization) + composeImmunization("Immunization", (Immunization)resource); + else if (resource instanceof ImmunizationRecommendation) + composeImmunizationRecommendation("ImmunizationRecommendation", (ImmunizationRecommendation)resource); + else if (resource instanceof ImplementationGuide) + composeImplementationGuide("ImplementationGuide", (ImplementationGuide)resource); + else if (resource instanceof Library) + composeLibrary("Library", (Library)resource); + else if (resource instanceof Linkage) + composeLinkage("Linkage", (Linkage)resource); + else if (resource instanceof ListResource) + composeListResource("List", (ListResource)resource); + else if (resource instanceof Location) + composeLocation("Location", (Location)resource); + else if (resource instanceof Measure) + composeMeasure("Measure", (Measure)resource); + else if (resource instanceof MeasureReport) + composeMeasureReport("MeasureReport", (MeasureReport)resource); + else if (resource instanceof Media) + composeMedia("Media", (Media)resource); + else if (resource instanceof Medication) + composeMedication("Medication", (Medication)resource); + else if (resource instanceof MedicationAdministration) + composeMedicationAdministration("MedicationAdministration", (MedicationAdministration)resource); + else if (resource instanceof MedicationDispense) + composeMedicationDispense("MedicationDispense", (MedicationDispense)resource); + else if (resource instanceof MedicationRequest) + composeMedicationRequest("MedicationRequest", (MedicationRequest)resource); + else if (resource instanceof MedicationStatement) + composeMedicationStatement("MedicationStatement", (MedicationStatement)resource); + else if (resource instanceof MessageDefinition) + composeMessageDefinition("MessageDefinition", (MessageDefinition)resource); + else if (resource instanceof MessageHeader) + composeMessageHeader("MessageHeader", (MessageHeader)resource); + else if (resource instanceof NamingSystem) + composeNamingSystem("NamingSystem", (NamingSystem)resource); + else if (resource instanceof NutritionOrder) + composeNutritionOrder("NutritionOrder", (NutritionOrder)resource); + else if (resource instanceof Observation) + composeObservation("Observation", (Observation)resource); + else if (resource instanceof OperationDefinition) + composeOperationDefinition("OperationDefinition", (OperationDefinition)resource); + else if (resource instanceof OperationOutcome) + composeOperationOutcome("OperationOutcome", (OperationOutcome)resource); + else if (resource instanceof Organization) + composeOrganization("Organization", (Organization)resource); + else if (resource instanceof Patient) + composePatient("Patient", (Patient)resource); + else if (resource instanceof PaymentNotice) + composePaymentNotice("PaymentNotice", (PaymentNotice)resource); + else if (resource instanceof PaymentReconciliation) + composePaymentReconciliation("PaymentReconciliation", (PaymentReconciliation)resource); + else if (resource instanceof Person) + composePerson("Person", (Person)resource); + else if (resource instanceof PlanDefinition) + composePlanDefinition("PlanDefinition", (PlanDefinition)resource); + else if (resource instanceof Practitioner) + composePractitioner("Practitioner", (Practitioner)resource); + else if (resource instanceof PractitionerRole) + composePractitionerRole("PractitionerRole", (PractitionerRole)resource); + else if (resource instanceof Procedure) + composeProcedure("Procedure", (Procedure)resource); + else if (resource instanceof ProcedureRequest) + composeProcedureRequest("ProcedureRequest", (ProcedureRequest)resource); + else if (resource instanceof ProcessRequest) + composeProcessRequest("ProcessRequest", (ProcessRequest)resource); + else if (resource instanceof ProcessResponse) + composeProcessResponse("ProcessResponse", (ProcessResponse)resource); + else if (resource instanceof Provenance) + composeProvenance("Provenance", (Provenance)resource); + else if (resource instanceof Questionnaire) + composeQuestionnaire("Questionnaire", (Questionnaire)resource); + else if (resource instanceof QuestionnaireResponse) + composeQuestionnaireResponse("QuestionnaireResponse", (QuestionnaireResponse)resource); + else if (resource instanceof RelatedPerson) + composeRelatedPerson("RelatedPerson", (RelatedPerson)resource); + else if (resource instanceof RequestGroup) + composeRequestGroup("RequestGroup", (RequestGroup)resource); + else if (resource instanceof ResearchStudy) + composeResearchStudy("ResearchStudy", (ResearchStudy)resource); + else if (resource instanceof ResearchSubject) + composeResearchSubject("ResearchSubject", (ResearchSubject)resource); + else if (resource instanceof RiskAssessment) + composeRiskAssessment("RiskAssessment", (RiskAssessment)resource); + else if (resource instanceof Schedule) + composeSchedule("Schedule", (Schedule)resource); + else if (resource instanceof SearchParameter) + composeSearchParameter("SearchParameter", (SearchParameter)resource); + else if (resource instanceof Sequence) + composeSequence("Sequence", (Sequence)resource); + else if (resource instanceof ServiceDefinition) + composeServiceDefinition("ServiceDefinition", (ServiceDefinition)resource); + else if (resource instanceof Slot) + composeSlot("Slot", (Slot)resource); + else if (resource instanceof Specimen) + composeSpecimen("Specimen", (Specimen)resource); + else if (resource instanceof SpecimenDefinition) + composeSpecimenDefinition("SpecimenDefinition", (SpecimenDefinition)resource); + else if (resource instanceof StructureDefinition) + composeStructureDefinition("StructureDefinition", (StructureDefinition)resource); + else if (resource instanceof StructureMap) + composeStructureMap("StructureMap", (StructureMap)resource); + else if (resource instanceof Subscription) + composeSubscription("Subscription", (Subscription)resource); + else if (resource instanceof Substance) + composeSubstance("Substance", (Substance)resource); + else if (resource instanceof SupplyDelivery) + composeSupplyDelivery("SupplyDelivery", (SupplyDelivery)resource); + else if (resource instanceof SupplyRequest) + composeSupplyRequest("SupplyRequest", (SupplyRequest)resource); + else if (resource instanceof Task) + composeTask("Task", (Task)resource); + else if (resource instanceof TestReport) + composeTestReport("TestReport", (TestReport)resource); + else if (resource instanceof TestScript) + composeTestScript("TestScript", (TestScript)resource); + else if (resource instanceof ValueSet) + composeValueSet("ValueSet", (ValueSet)resource); + else if (resource instanceof VisionPrescription) + composeVisionPrescription("VisionPrescription", (VisionPrescription)resource); + else if (resource instanceof Binary) + composeBinary("Binary", (Binary)resource); + else + throw new Error("Unhandled resource type "+resource.getClass().getName()); + } + + protected void composeResource(String name, Resource resource) throws IOException { + if (resource instanceof Parameters) + composeParameters(name, (Parameters)resource); + else if (resource instanceof Account) + composeAccount(name, (Account)resource); + else if (resource instanceof ActivityDefinition) + composeActivityDefinition(name, (ActivityDefinition)resource); + else if (resource instanceof AdverseEvent) + composeAdverseEvent(name, (AdverseEvent)resource); + else if (resource instanceof AllergyIntolerance) + composeAllergyIntolerance(name, (AllergyIntolerance)resource); + else if (resource instanceof Appointment) + composeAppointment(name, (Appointment)resource); + else if (resource instanceof AppointmentResponse) + composeAppointmentResponse(name, (AppointmentResponse)resource); + else if (resource instanceof AuditEvent) + composeAuditEvent(name, (AuditEvent)resource); + else if (resource instanceof Basic) + composeBasic(name, (Basic)resource); + else if (resource instanceof Binary) + composeBinary(name, (Binary)resource); + else if (resource instanceof BodyStructure) + composeBodyStructure(name, (BodyStructure)resource); + else if (resource instanceof Bundle) + composeBundle(name, (Bundle)resource); + else if (resource instanceof CapabilityStatement) + composeCapabilityStatement(name, (CapabilityStatement)resource); + else if (resource instanceof CarePlan) + composeCarePlan(name, (CarePlan)resource); + else if (resource instanceof CareTeam) + composeCareTeam(name, (CareTeam)resource); + else if (resource instanceof CatalogEntry) + composeCatalogEntry(name, (CatalogEntry)resource); + else if (resource instanceof ChargeItem) + composeChargeItem(name, (ChargeItem)resource); + else if (resource instanceof Claim) + composeClaim(name, (Claim)resource); + else if (resource instanceof ClaimResponse) + composeClaimResponse(name, (ClaimResponse)resource); + else if (resource instanceof ClinicalImpression) + composeClinicalImpression(name, (ClinicalImpression)resource); + else if (resource instanceof CodeSystem) + composeCodeSystem(name, (CodeSystem)resource); + else if (resource instanceof Communication) + composeCommunication(name, (Communication)resource); + else if (resource instanceof CommunicationRequest) + composeCommunicationRequest(name, (CommunicationRequest)resource); + else if (resource instanceof CompartmentDefinition) + composeCompartmentDefinition(name, (CompartmentDefinition)resource); + else if (resource instanceof Composition) + composeComposition(name, (Composition)resource); + else if (resource instanceof ConceptMap) + composeConceptMap(name, (ConceptMap)resource); + else if (resource instanceof Condition) + composeCondition(name, (Condition)resource); + else if (resource instanceof Consent) + composeConsent(name, (Consent)resource); + else if (resource instanceof Contract) + composeContract(name, (Contract)resource); + else if (resource instanceof Coverage) + composeCoverage(name, (Coverage)resource); + else if (resource instanceof DetectedIssue) + composeDetectedIssue(name, (DetectedIssue)resource); + else if (resource instanceof Device) + composeDevice(name, (Device)resource); + else if (resource instanceof DeviceComponent) + composeDeviceComponent(name, (DeviceComponent)resource); + else if (resource instanceof DeviceMetric) + composeDeviceMetric(name, (DeviceMetric)resource); + else if (resource instanceof DeviceRequest) + composeDeviceRequest(name, (DeviceRequest)resource); + else if (resource instanceof DeviceUseStatement) + composeDeviceUseStatement(name, (DeviceUseStatement)resource); + else if (resource instanceof DiagnosticReport) + composeDiagnosticReport(name, (DiagnosticReport)resource); + else if (resource instanceof DocumentManifest) + composeDocumentManifest(name, (DocumentManifest)resource); + else if (resource instanceof DocumentReference) + composeDocumentReference(name, (DocumentReference)resource); + else if (resource instanceof EligibilityRequest) + composeEligibilityRequest(name, (EligibilityRequest)resource); + else if (resource instanceof EligibilityResponse) + composeEligibilityResponse(name, (EligibilityResponse)resource); + else if (resource instanceof Encounter) + composeEncounter(name, (Encounter)resource); + else if (resource instanceof Endpoint) + composeEndpoint(name, (Endpoint)resource); + else if (resource instanceof EnrollmentRequest) + composeEnrollmentRequest(name, (EnrollmentRequest)resource); + else if (resource instanceof EnrollmentResponse) + composeEnrollmentResponse(name, (EnrollmentResponse)resource); + else if (resource instanceof EpisodeOfCare) + composeEpisodeOfCare(name, (EpisodeOfCare)resource); + else if (resource instanceof EventDefinition) + composeEventDefinition(name, (EventDefinition)resource); + else if (resource instanceof ExampleScenario) + composeExampleScenario(name, (ExampleScenario)resource); + else if (resource instanceof ExpansionProfile) + composeExpansionProfile(name, (ExpansionProfile)resource); + else if (resource instanceof ExplanationOfBenefit) + composeExplanationOfBenefit(name, (ExplanationOfBenefit)resource); + else if (resource instanceof FamilyMemberHistory) + composeFamilyMemberHistory(name, (FamilyMemberHistory)resource); + else if (resource instanceof Flag) + composeFlag(name, (Flag)resource); + else if (resource instanceof Goal) + composeGoal(name, (Goal)resource); + else if (resource instanceof GraphDefinition) + composeGraphDefinition(name, (GraphDefinition)resource); + else if (resource instanceof Group) + composeGroup(name, (Group)resource); + else if (resource instanceof GuidanceResponse) + composeGuidanceResponse(name, (GuidanceResponse)resource); + else if (resource instanceof HealthcareService) + composeHealthcareService(name, (HealthcareService)resource); + else if (resource instanceof ImagingManifest) + composeImagingManifest(name, (ImagingManifest)resource); + else if (resource instanceof ImagingStudy) + composeImagingStudy(name, (ImagingStudy)resource); + else if (resource instanceof Immunization) + composeImmunization(name, (Immunization)resource); + else if (resource instanceof ImmunizationRecommendation) + composeImmunizationRecommendation(name, (ImmunizationRecommendation)resource); + else if (resource instanceof ImplementationGuide) + composeImplementationGuide(name, (ImplementationGuide)resource); + else if (resource instanceof Library) + composeLibrary(name, (Library)resource); + else if (resource instanceof Linkage) + composeLinkage(name, (Linkage)resource); + else if (resource instanceof ListResource) + composeListResource(name, (ListResource)resource); + else if (resource instanceof Location) + composeLocation(name, (Location)resource); + else if (resource instanceof Measure) + composeMeasure(name, (Measure)resource); + else if (resource instanceof MeasureReport) + composeMeasureReport(name, (MeasureReport)resource); + else if (resource instanceof Media) + composeMedia(name, (Media)resource); + else if (resource instanceof Medication) + composeMedication(name, (Medication)resource); + else if (resource instanceof MedicationAdministration) + composeMedicationAdministration(name, (MedicationAdministration)resource); + else if (resource instanceof MedicationDispense) + composeMedicationDispense(name, (MedicationDispense)resource); + else if (resource instanceof MedicationRequest) + composeMedicationRequest(name, (MedicationRequest)resource); + else if (resource instanceof MedicationStatement) + composeMedicationStatement(name, (MedicationStatement)resource); + else if (resource instanceof MessageDefinition) + composeMessageDefinition(name, (MessageDefinition)resource); + else if (resource instanceof MessageHeader) + composeMessageHeader(name, (MessageHeader)resource); + else if (resource instanceof NamingSystem) + composeNamingSystem(name, (NamingSystem)resource); + else if (resource instanceof NutritionOrder) + composeNutritionOrder(name, (NutritionOrder)resource); + else if (resource instanceof Observation) + composeObservation(name, (Observation)resource); + else if (resource instanceof OperationDefinition) + composeOperationDefinition(name, (OperationDefinition)resource); + else if (resource instanceof OperationOutcome) + composeOperationOutcome(name, (OperationOutcome)resource); + else if (resource instanceof Organization) + composeOrganization(name, (Organization)resource); + else if (resource instanceof Patient) + composePatient(name, (Patient)resource); + else if (resource instanceof PaymentNotice) + composePaymentNotice(name, (PaymentNotice)resource); + else if (resource instanceof PaymentReconciliation) + composePaymentReconciliation(name, (PaymentReconciliation)resource); + else if (resource instanceof Person) + composePerson(name, (Person)resource); + else if (resource instanceof PlanDefinition) + composePlanDefinition(name, (PlanDefinition)resource); + else if (resource instanceof Practitioner) + composePractitioner(name, (Practitioner)resource); + else if (resource instanceof PractitionerRole) + composePractitionerRole(name, (PractitionerRole)resource); + else if (resource instanceof Procedure) + composeProcedure(name, (Procedure)resource); + else if (resource instanceof ProcedureRequest) + composeProcedureRequest(name, (ProcedureRequest)resource); + else if (resource instanceof ProcessRequest) + composeProcessRequest(name, (ProcessRequest)resource); + else if (resource instanceof ProcessResponse) + composeProcessResponse(name, (ProcessResponse)resource); + else if (resource instanceof Provenance) + composeProvenance(name, (Provenance)resource); + else if (resource instanceof Questionnaire) + composeQuestionnaire(name, (Questionnaire)resource); + else if (resource instanceof QuestionnaireResponse) + composeQuestionnaireResponse(name, (QuestionnaireResponse)resource); + else if (resource instanceof RelatedPerson) + composeRelatedPerson(name, (RelatedPerson)resource); + else if (resource instanceof RequestGroup) + composeRequestGroup(name, (RequestGroup)resource); + else if (resource instanceof ResearchStudy) + composeResearchStudy(name, (ResearchStudy)resource); + else if (resource instanceof ResearchSubject) + composeResearchSubject(name, (ResearchSubject)resource); + else if (resource instanceof RiskAssessment) + composeRiskAssessment(name, (RiskAssessment)resource); + else if (resource instanceof Schedule) + composeSchedule(name, (Schedule)resource); + else if (resource instanceof SearchParameter) + composeSearchParameter(name, (SearchParameter)resource); + else if (resource instanceof Sequence) + composeSequence(name, (Sequence)resource); + else if (resource instanceof ServiceDefinition) + composeServiceDefinition(name, (ServiceDefinition)resource); + else if (resource instanceof Slot) + composeSlot(name, (Slot)resource); + else if (resource instanceof Specimen) + composeSpecimen(name, (Specimen)resource); + else if (resource instanceof SpecimenDefinition) + composeSpecimenDefinition(name, (SpecimenDefinition)resource); + else if (resource instanceof StructureDefinition) + composeStructureDefinition(name, (StructureDefinition)resource); + else if (resource instanceof StructureMap) + composeStructureMap(name, (StructureMap)resource); + else if (resource instanceof Subscription) + composeSubscription(name, (Subscription)resource); + else if (resource instanceof Substance) + composeSubstance(name, (Substance)resource); + else if (resource instanceof SupplyDelivery) + composeSupplyDelivery(name, (SupplyDelivery)resource); + else if (resource instanceof SupplyRequest) + composeSupplyRequest(name, (SupplyRequest)resource); + else if (resource instanceof Task) + composeTask(name, (Task)resource); + else if (resource instanceof TestReport) + composeTestReport(name, (TestReport)resource); + else if (resource instanceof TestScript) + composeTestScript(name, (TestScript)resource); + else if (resource instanceof ValueSet) + composeValueSet(name, (ValueSet)resource); + else if (resource instanceof VisionPrescription) + composeVisionPrescription(name, (VisionPrescription)resource); + else if (resource instanceof Binary) + composeBinary(name, (Binary)resource); + else + throw new Error("Unhandled resource type "+resource.getClass().getName()); + } + + protected void composeType(String prefix, Type type) throws IOException { + if (type == null) + ; + else if (type instanceof SimpleQuantity) + composeSimpleQuantity(prefix+"SimpleQuantity", (SimpleQuantity) type); + else if (type instanceof Extension) + composeExtension(prefix+"Extension", (Extension) type); + else if (type instanceof Narrative) + composeNarrative(prefix+"Narrative", (Narrative) type); + else if (type instanceof Duration) + composeDuration(prefix+"Duration", (Duration) type); + else if (type instanceof Count) + composeCount(prefix+"Count", (Count) type); + else if (type instanceof Money) + composeMoney(prefix+"Money", (Money) type); + else if (type instanceof Distance) + composeDistance(prefix+"Distance", (Distance) type); + else if (type instanceof Age) + composeAge(prefix+"Age", (Age) type); + else if (type instanceof Reference) + composeReference(prefix+"Reference", (Reference) type); + else if (type instanceof Quantity) + composeQuantity(prefix+"Quantity", (Quantity) type); + else if (type instanceof Period) + composePeriod(prefix+"Period", (Period) type); + else if (type instanceof Attachment) + composeAttachment(prefix+"Attachment", (Attachment) type); + else if (type instanceof Range) + composeRange(prefix+"Range", (Range) type); + else if (type instanceof Annotation) + composeAnnotation(prefix+"Annotation", (Annotation) type); + else if (type instanceof Identifier) + composeIdentifier(prefix+"Identifier", (Identifier) type); + else if (type instanceof Coding) + composeCoding(prefix+"Coding", (Coding) type); + else if (type instanceof Signature) + composeSignature(prefix+"Signature", (Signature) type); + else if (type instanceof SampledData) + composeSampledData(prefix+"SampledData", (SampledData) type); + else if (type instanceof Ratio) + composeRatio(prefix+"Ratio", (Ratio) type); + else if (type instanceof CodeableConcept) + composeCodeableConcept(prefix+"CodeableConcept", (CodeableConcept) type); + else if (type instanceof Meta) + composeMeta(prefix+"Meta", (Meta) type); + else if (type instanceof Address) + composeAddress(prefix+"Address", (Address) type); + else if (type instanceof TriggerDefinition) + composeTriggerDefinition(prefix+"TriggerDefinition", (TriggerDefinition) type); + else if (type instanceof Contributor) + composeContributor(prefix+"Contributor", (Contributor) type); + else if (type instanceof DataRequirement) + composeDataRequirement(prefix+"DataRequirement", (DataRequirement) type); + else if (type instanceof Dosage) + composeDosage(prefix+"Dosage", (Dosage) type); + else if (type instanceof RelatedArtifact) + composeRelatedArtifact(prefix+"RelatedArtifact", (RelatedArtifact) type); + else if (type instanceof ContactDetail) + composeContactDetail(prefix+"ContactDetail", (ContactDetail) type); + else if (type instanceof HumanName) + composeHumanName(prefix+"HumanName", (HumanName) type); + else if (type instanceof ContactPoint) + composeContactPoint(prefix+"ContactPoint", (ContactPoint) type); + else if (type instanceof UsageContext) + composeUsageContext(prefix+"UsageContext", (UsageContext) type); + else if (type instanceof Timing) + composeTiming(prefix+"Timing", (Timing) type); + else if (type instanceof ElementDefinition) + composeElementDefinition(prefix+"ElementDefinition", (ElementDefinition) type); + else if (type instanceof ParameterDefinition) + composeParameterDefinition(prefix+"ParameterDefinition", (ParameterDefinition) type); + else if (type instanceof CodeType) + composeCode(prefix+"Code", (CodeType) type); + else if (type instanceof OidType) + composeOid(prefix+"Oid", (OidType) type); + else if (type instanceof UuidType) + composeUuid(prefix+"Uuid", (UuidType) type); + else if (type instanceof UnsignedIntType) + composeUnsignedInt(prefix+"UnsignedInt", (UnsignedIntType) type); + else if (type instanceof MarkdownType) + composeMarkdown(prefix+"Markdown", (MarkdownType) type); + else if (type instanceof IdType) + composeId(prefix+"Id", (IdType) type); + else if (type instanceof PositiveIntType) + composePositiveInt(prefix+"PositiveInt", (PositiveIntType) type); + else if (type instanceof DateType) + composeDate(prefix+"Date", (DateType) type); + else if (type instanceof DateTimeType) + composeDateTime(prefix+"DateTime", (DateTimeType) type); + else if (type instanceof StringType) + composeString(prefix+"String", (StringType) type); + else if (type instanceof IntegerType) + composeInteger(prefix+"Integer", (IntegerType) type); + else if (type instanceof UriType) + composeUri(prefix+"Uri", (UriType) type); + else if (type instanceof InstantType) + composeInstant(prefix+"Instant", (InstantType) type); + else if (type instanceof BooleanType) + composeBoolean(prefix+"Boolean", (BooleanType) type); + else if (type instanceof Base64BinaryType) + composeBase64Binary(prefix+"Base64Binary", (Base64BinaryType) type); + else if (type instanceof TimeType) + composeTime(prefix+"Time", (TimeType) type); + else if (type instanceof DecimalType) + composeDecimal(prefix+"Decimal", (DecimalType) type); + else + throw new Error("Unhandled type"); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/GraphQLProvider.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/GraphQLProvider.java index fb55ad2c04c..4ac4d97c7ba 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/GraphQLProvider.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/hapi/rest/server/GraphQLProvider.java @@ -51,14 +51,6 @@ public class GraphQLProvider { myStorageServices = theStorageServices; } - @Initialize - public void initialize(RestfulServer theServer) { - ourLog.trace("Initializing GraphQL provider"); - if (theServer.getFhirContext().getVersion().getVersion() != FhirVersionEnum.R4) { - throw new ConfigurationException("Can not use " + getClass().getName() + " provider on server with FHIR " + theServer.getFhirContext().getVersion().getVersion().name() + " context"); - } - } - @GraphQL public String graphql(ServletRequestDetails theRequestDetails, @IdParam IIdType theId, @GraphQLQuery String theQuery) { @@ -89,6 +81,14 @@ public class GraphQLProvider { } } + @Initialize + public void initialize(RestfulServer theServer) { + ourLog.trace("Initializing GraphQL provider"); + if (theServer.getFhirContext().getVersion().getVersion() != FhirVersionEnum.R4) { + throw new ConfigurationException("Can not use " + getClass().getName() + " provider on server with FHIR " + theServer.getFhirContext().getVersion().getVersion().name() + " context"); + } + } + } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Account.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Account.java index aebd5d73445..641a05e8e94 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Account.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Account.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ActivityDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ActivityDefinition.java index ca05b18af6d..ba8fa7bf067 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ActivityDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ActivityDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -107,6 +107,10 @@ public class ActivityDefinition extends MetadataResource { * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. */ CARETEAM, + /** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ + CATALOGENTRY, /** * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. */ @@ -235,6 +239,10 @@ public class ActivityDefinition extends MetadataResource { * The EventDefinition resource provides a reusable description of when a particular event can occur. */ EVENTDEFINITION, + /** + * Example of workflow instance. + */ + EXAMPLESCENARIO, /** * Resource to define constraints on the Expansion of a FHIR ValueSet. */ @@ -336,7 +344,7 @@ public class ActivityDefinition extends MetadataResource { */ MEDICATIONREQUEST, /** - * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. */ MEDICATIONSTATEMENT, /** @@ -479,6 +487,10 @@ public class ActivityDefinition extends MetadataResource { * A sample to be used for analysis. */ SPECIMEN, + /** + * A kind of specimen with associated set of requirements. + */ + SPECIMENDEFINITION, /** * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. */ @@ -558,6 +570,8 @@ public class ActivityDefinition extends MetadataResource { return CAREPLAN; if ("CareTeam".equals(codeString)) return CARETEAM; + if ("CatalogEntry".equals(codeString)) + return CATALOGENTRY; if ("ChargeItem".equals(codeString)) return CHARGEITEM; if ("Claim".equals(codeString)) @@ -622,6 +636,8 @@ public class ActivityDefinition extends MetadataResource { return EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -744,6 +760,8 @@ public class ActivityDefinition extends MetadataResource { return SLOT; if ("Specimen".equals(codeString)) return SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -787,6 +805,7 @@ public class ActivityDefinition extends MetadataResource { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -819,6 +838,7 @@ public class ActivityDefinition extends MetadataResource { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -880,6 +900,7 @@ public class ActivityDefinition extends MetadataResource { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -910,6 +931,7 @@ public class ActivityDefinition extends MetadataResource { case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types"; case CAREPLAN: return "http://hl7.org/fhir/resource-types"; case CARETEAM: return "http://hl7.org/fhir/resource-types"; + case CATALOGENTRY: return "http://hl7.org/fhir/resource-types"; case CHARGEITEM: return "http://hl7.org/fhir/resource-types"; case CLAIM: return "http://hl7.org/fhir/resource-types"; case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; @@ -942,6 +964,7 @@ public class ActivityDefinition extends MetadataResource { case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types"; case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; @@ -1003,6 +1026,7 @@ public class ActivityDefinition extends MetadataResource { case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types"; case SLOT: return "http://hl7.org/fhir/resource-types"; case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; @@ -1033,6 +1057,7 @@ public class ActivityDefinition extends MetadataResource { case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog."; case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."; case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; @@ -1065,6 +1090,7 @@ public class ActivityDefinition extends MetadataResource { case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur."; + case EXAMPLESCENARIO: return "Example of workflow instance."; case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient."; @@ -1090,7 +1116,7 @@ public class ActivityDefinition extends MetadataResource { case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; - case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."; case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; @@ -1126,6 +1152,7 @@ public class ActivityDefinition extends MetadataResource { case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; case SPECIMEN: return "A sample to be used for analysis."; + case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements."; case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."; case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; @@ -1156,6 +1183,7 @@ public class ActivityDefinition extends MetadataResource { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -1188,6 +1216,7 @@ public class ActivityDefinition extends MetadataResource { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -1249,6 +1278,7 @@ public class ActivityDefinition extends MetadataResource { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -1298,6 +1328,8 @@ public class ActivityDefinition extends MetadataResource { return ActivityDefinitionKind.CAREPLAN; if ("CareTeam".equals(codeString)) return ActivityDefinitionKind.CARETEAM; + if ("CatalogEntry".equals(codeString)) + return ActivityDefinitionKind.CATALOGENTRY; if ("ChargeItem".equals(codeString)) return ActivityDefinitionKind.CHARGEITEM; if ("Claim".equals(codeString)) @@ -1362,6 +1394,8 @@ public class ActivityDefinition extends MetadataResource { return ActivityDefinitionKind.EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return ActivityDefinitionKind.EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return ActivityDefinitionKind.EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return ActivityDefinitionKind.EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -1484,6 +1518,8 @@ public class ActivityDefinition extends MetadataResource { return ActivityDefinitionKind.SLOT; if ("Specimen".equals(codeString)) return ActivityDefinitionKind.SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return ActivityDefinitionKind.SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return ActivityDefinitionKind.STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -1544,6 +1580,8 @@ public class ActivityDefinition extends MetadataResource { return new Enumeration(this, ActivityDefinitionKind.CAREPLAN); if ("CareTeam".equals(codeString)) return new Enumeration(this, ActivityDefinitionKind.CARETEAM); + if ("CatalogEntry".equals(codeString)) + return new Enumeration(this, ActivityDefinitionKind.CATALOGENTRY); if ("ChargeItem".equals(codeString)) return new Enumeration(this, ActivityDefinitionKind.CHARGEITEM); if ("Claim".equals(codeString)) @@ -1608,6 +1646,8 @@ public class ActivityDefinition extends MetadataResource { return new Enumeration(this, ActivityDefinitionKind.EPISODEOFCARE); if ("EventDefinition".equals(codeString)) return new Enumeration(this, ActivityDefinitionKind.EVENTDEFINITION); + if ("ExampleScenario".equals(codeString)) + return new Enumeration(this, ActivityDefinitionKind.EXAMPLESCENARIO); if ("ExpansionProfile".equals(codeString)) return new Enumeration(this, ActivityDefinitionKind.EXPANSIONPROFILE); if ("ExplanationOfBenefit".equals(codeString)) @@ -1730,6 +1770,8 @@ public class ActivityDefinition extends MetadataResource { return new Enumeration(this, ActivityDefinitionKind.SLOT); if ("Specimen".equals(codeString)) return new Enumeration(this, ActivityDefinitionKind.SPECIMEN); + if ("SpecimenDefinition".equals(codeString)) + return new Enumeration(this, ActivityDefinitionKind.SPECIMENDEFINITION); if ("StructureDefinition".equals(codeString)) return new Enumeration(this, ActivityDefinitionKind.STRUCTUREDEFINITION); if ("StructureMap".equals(codeString)) @@ -1783,6 +1825,8 @@ public class ActivityDefinition extends MetadataResource { return "CarePlan"; if (code == ActivityDefinitionKind.CARETEAM) return "CareTeam"; + if (code == ActivityDefinitionKind.CATALOGENTRY) + return "CatalogEntry"; if (code == ActivityDefinitionKind.CHARGEITEM) return "ChargeItem"; if (code == ActivityDefinitionKind.CLAIM) @@ -1847,6 +1891,8 @@ public class ActivityDefinition extends MetadataResource { return "EpisodeOfCare"; if (code == ActivityDefinitionKind.EVENTDEFINITION) return "EventDefinition"; + if (code == ActivityDefinitionKind.EXAMPLESCENARIO) + return "ExampleScenario"; if (code == ActivityDefinitionKind.EXPANSIONPROFILE) return "ExpansionProfile"; if (code == ActivityDefinitionKind.EXPLANATIONOFBENEFIT) @@ -1969,6 +2015,8 @@ public class ActivityDefinition extends MetadataResource { return "Slot"; if (code == ActivityDefinitionKind.SPECIMEN) return "Specimen"; + if (code == ActivityDefinitionKind.SPECIMENDEFINITION) + return "SpecimenDefinition"; if (code == ActivityDefinitionKind.STRUCTUREDEFINITION) return "StructureDefinition"; if (code == ActivityDefinitionKind.STRUCTUREMAP) diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Address.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Address.java index d673ab48570..d66c81b454a 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Address.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Address.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AdverseEvent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AdverseEvent.java index 16bd089b5e4..6d2c021d098 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AdverseEvent.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AdverseEvent.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1052,7 +1052,7 @@ public class AdverseEvent extends DomainResource { /** * This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented. */ - @Child(name = "subject", type = {Patient.class, ResearchSubject.class, Practitioner.class, Person.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "subject", type = {Patient.class, ResearchSubject.class, Practitioner.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Subject impacted by event", formalDefinition="This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented." ) protected Reference subject; @@ -2027,7 +2027,7 @@ public class AdverseEvent extends DomainResource { children.add(new Property("actuality", "code", "Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.", 0, 1, actuality)); children.add(new Property("category", "code", "The overall type of event, intended for search and filtering purposes.", 0, 1, category)); children.add(new Property("event", "CodeableConcept", "This element defines the specific type of event that occurred or that was prevented from occurring.", 0, 1, event)); - children.add(new Property("subject", "Reference(Patient|ResearchSubject|Practitioner|Person)", "This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.", 0, 1, subject)); + children.add(new Property("subject", "Reference(Patient|ResearchSubject|Practitioner|RelatedPerson)", "This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.", 0, 1, subject)); children.add(new Property("date", "dateTime", "The date (and perhaps time) when the adverse event occurred.", 0, 1, date)); children.add(new Property("resultingCondition", "Reference(Condition)", "Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).", 0, java.lang.Integer.MAX_VALUE, resultingCondition)); children.add(new Property("location", "Reference(Location)", "The information about where the adverse event occurred.", 0, 1, location)); @@ -2050,7 +2050,7 @@ public class AdverseEvent extends DomainResource { case 528866400: /*actuality*/ return new Property("actuality", "code", "Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.", 0, 1, actuality); case 50511102: /*category*/ return new Property("category", "code", "The overall type of event, intended for search and filtering purposes.", 0, 1, category); case 96891546: /*event*/ return new Property("event", "CodeableConcept", "This element defines the specific type of event that occurred or that was prevented from occurring.", 0, 1, event); - case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|ResearchSubject|Practitioner|Person)", "This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.", 0, 1, subject); + case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|ResearchSubject|Practitioner|RelatedPerson)", "This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.", 0, 1, subject); case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and perhaps time) when the adverse event occurred.", 0, 1, date); case -830261258: /*resultingCondition*/ return new Property("resultingCondition", "Reference(Condition)", "Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).", 0, java.lang.Integer.MAX_VALUE, resultingCondition); case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "The information about where the adverse event occurred.", 0, 1, location); @@ -2558,7 +2558,7 @@ public class AdverseEvent extends DomainResource { * Path: AdverseEvent.subject
*

*/ - @SearchParamDefinition(name="subject", path="AdverseEvent.subject", description="Subject impacted by event", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class, Person.class, Practitioner.class, ResearchSubject.class } ) + @SearchParamDefinition(name="subject", path="AdverseEvent.subject", description="Subject impacted by event", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class, Practitioner.class, RelatedPerson.class, ResearchSubject.class } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Age.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Age.java index 95d2c9e2c6a..75421bda852 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Age.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Age.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AllergyIntolerance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AllergyIntolerance.java index f6e072a383b..74efc4017e3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AllergyIntolerance.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AllergyIntolerance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Annotation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Annotation.java index 75e51664900..08f213def08 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Annotation.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Annotation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Appointment.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Appointment.java index 24879811a54..63a41b90ade 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Appointment.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Appointment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AppointmentResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AppointmentResponse.java index 661982207cd..8f3721f2503 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AppointmentResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AppointmentResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Attachment.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Attachment.java index 8e273fa01b1..8f5cb7793ae 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Attachment.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Attachment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AuditEvent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AuditEvent.java index 5a608593e5a..901a818d4ef 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AuditEvent.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/AuditEvent.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -195,7 +195,7 @@ public class AuditEvent extends DomainResource { */ _0, /** - * The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response). + * The action was not successful due to some kind of minor failure (often equivalent to an HTTP 400 response). */ _4, /** @@ -247,7 +247,7 @@ public class AuditEvent extends DomainResource { public String getDefinition() { switch (this) { case _0: return "The operation completed successfully (whether with warnings or not)."; - case _4: return "The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response)."; + case _4: return "The action was not successful due to some kind of minor failure (often equivalent to an HTTP 400 response)."; case _8: return "The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response)."; case _12: return "An error of such magnitude occurred that the system is no longer available for use (i.e. the system died)."; default: return "?"; @@ -455,10 +455,18 @@ public class AuditEvent extends DomainResource { @Block() public static class AuditEventAgentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specification of the participation type the user plays when performing the event. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How agent participated", formalDefinition="Specification of the participation type the user plays when performing the event." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type") + protected CodeableConcept type; + /** * The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context. */ - @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Agent role in the event", formalDefinition="The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-role-type") protected List role; @@ -466,7 +474,7 @@ public class AuditEvent extends DomainResource { /** * Direct reference to a resource that identifies the agent. */ - @Child(name = "reference", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "reference", type = {PractitionerRole.class, Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Direct reference to resource", formalDefinition="Direct reference to a resource that identifies the agent." ) protected Reference reference; @@ -478,35 +486,35 @@ public class AuditEvent extends DomainResource { /** * Unique identifier for the user actively participating in the event. */ - @Child(name = "userId", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "userId", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Unique identifier for the user", formalDefinition="Unique identifier for the user actively participating in the event." ) protected Identifier userId; /** * Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. */ - @Child(name = "altId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "altId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Alternative User id e.g. authentication", formalDefinition="Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available." ) protected StringType altId; /** * Human-meaningful name for the agent. */ - @Child(name = "name", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Child(name = "name", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Human-meaningful name for the agent", formalDefinition="Human-meaningful name for the agent." ) protected StringType name; /** * Indicator that the user is or is not the requestor, or initiator, for the event being audited. */ - @Child(name = "requestor", type = {BooleanType.class}, order=6, min=1, max=1, modifier=false, summary=false) + @Child(name = "requestor", type = {BooleanType.class}, order=7, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Whether user is initiator", formalDefinition="Indicator that the user is or is not the requestor, or initiator, for the event being audited." ) protected BooleanType requestor; /** * Where the event occurred. */ - @Child(name = "location", type = {Location.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Child(name = "location", type = {Location.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Where", formalDefinition="Where the event occurred." ) protected Reference location; @@ -518,14 +526,14 @@ public class AuditEvent extends DomainResource { /** * The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used. */ - @Child(name = "policy", type = {UriType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "policy", type = {UriType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Policy that authorized event", formalDefinition="The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used." ) protected List policy; /** * Type of media involved. Used when the event is about exporting/importing onto media. */ - @Child(name = "media", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Child(name = "media", type = {Coding.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Type of media", formalDefinition="Type of media involved. Used when the event is about exporting/importing onto media." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/dicm-405-mediatype") protected Coding media; @@ -533,19 +541,19 @@ public class AuditEvent extends DomainResource { /** * Logical network location for application activity, if the activity has a network location. */ - @Child(name = "network", type = {}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "network", type = {}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Logical network location for application activity", formalDefinition="Logical network location for application activity, if the activity has a network location." ) protected AuditEventAgentNetworkComponent network; /** * The reason (purpose of use), specific to this agent, that was used during the event being recorded. */ - @Child(name = "purposeOfUse", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "purposeOfUse", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Reason given for this user", formalDefinition="The reason (purpose of use), specific to this agent, that was used during the event being recorded." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-PurposeOfUse") protected List purposeOfUse; - private static final long serialVersionUID = 1205071410L; + private static final long serialVersionUID = 1434862021L; /** * Constructor @@ -562,6 +570,30 @@ public class AuditEvent extends DomainResource { this.requestor = requestor; } + /** + * @return {@link #type} (Specification of the participation type the user plays when performing the event.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEventAgentComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Specification of the participation type the user plays when performing the event.) + */ + public AuditEventAgentComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + /** * @return {@link #role} (The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.) */ @@ -1029,8 +1061,9 @@ public class AuditEvent extends DomainResource { protected void listChildren(List children) { super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "Specification of the participation type the user plays when performing the event.", 0, 1, type)); children.add(new Property("role", "CodeableConcept", "The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); - children.add(new Property("reference", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, 1, reference)); + children.add(new Property("reference", "Reference(PractitionerRole|Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, 1, reference)); children.add(new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, 1, userId)); children.add(new Property("altId", "string", "Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, 1, altId)); children.add(new Property("name", "string", "Human-meaningful name for the agent.", 0, 1, name)); @@ -1045,8 +1078,9 @@ public class AuditEvent extends DomainResource { @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specification of the participation type the user plays when performing the event.", 0, 1, type); case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.", 0, java.lang.Integer.MAX_VALUE, role); - case -925155509: /*reference*/ return new Property("reference", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, 1, reference); + case -925155509: /*reference*/ return new Property("reference", "Reference(PractitionerRole|Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, 1, reference); case -836030906: /*userId*/ return new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, 1, userId); case 92912804: /*altId*/ return new Property("altId", "string", "Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, 1, altId); case 3373707: /*name*/ return new Property("name", "string", "Human-meaningful name for the agent.", 0, 1, name); @@ -1064,6 +1098,7 @@ public class AuditEvent extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference case -836030906: /*userId*/ return this.userId == null ? new Base[0] : new Base[] {this.userId}; // Identifier @@ -1083,6 +1118,9 @@ public class AuditEvent extends DomainResource { @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; case 3506294: // role this.getRole().add(castToCodeableConcept(value)); // CodeableConcept return value; @@ -1123,7 +1161,9 @@ public class AuditEvent extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("role")) { + if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("role")) { this.getRole().add(castToCodeableConcept(value)); } else if (name.equals("reference")) { this.reference = castToReference(value); // Reference @@ -1153,6 +1193,7 @@ public class AuditEvent extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { + case 3575610: return getType(); case 3506294: return addRole(); case -925155509: return getReference(); case -836030906: return getUserId(); @@ -1172,6 +1213,7 @@ public class AuditEvent extends DomainResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; case 3506294: /*role*/ return new String[] {"CodeableConcept"}; case -925155509: /*reference*/ return new String[] {"Reference"}; case -836030906: /*userId*/ return new String[] {"Identifier"}; @@ -1190,7 +1232,11 @@ public class AuditEvent extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("role")) { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("role")) { return addRole(); } else if (name.equals("reference")) { @@ -1235,6 +1281,7 @@ public class AuditEvent extends DomainResource { public AuditEventAgentComponent copy() { AuditEventAgentComponent dst = new AuditEventAgentComponent(); copyValues(dst); + dst.type = type == null ? null : type.copy(); if (role != null) { dst.role = new ArrayList(); for (CodeableConcept i : role) @@ -1268,10 +1315,11 @@ public class AuditEvent extends DomainResource { if (!(other instanceof AuditEventAgentComponent)) return false; AuditEventAgentComponent o = (AuditEventAgentComponent) other; - return compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true) && compareDeep(userId, o.userId, true) - && compareDeep(altId, o.altId, true) && compareDeep(name, o.name, true) && compareDeep(requestor, o.requestor, true) - && compareDeep(location, o.location, true) && compareDeep(policy, o.policy, true) && compareDeep(media, o.media, true) - && compareDeep(network, o.network, true) && compareDeep(purposeOfUse, o.purposeOfUse, true); + return compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true) + && compareDeep(userId, o.userId, true) && compareDeep(altId, o.altId, true) && compareDeep(name, o.name, true) + && compareDeep(requestor, o.requestor, true) && compareDeep(location, o.location, true) && compareDeep(policy, o.policy, true) + && compareDeep(media, o.media, true) && compareDeep(network, o.network, true) && compareDeep(purposeOfUse, o.purposeOfUse, true) + ; } @Override @@ -1286,7 +1334,7 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, reference, userId + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role, reference, userId , altId, name, requestor, location, policy, media, network, purposeOfUse); } @@ -2594,13 +2642,13 @@ public class AuditEvent extends DomainResource { protected StringType type; /** - * The details, base64 encoded. Used to carry bulk information. + * The details value. */ - @Child(name = "value", type = {Base64BinaryType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Property value", formalDefinition="The details, base64 encoded. Used to carry bulk information." ) - protected Base64BinaryType value; + @Child(name = "value", type = {StringType.class, Base64BinaryType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Property value", formalDefinition="The details value." ) + protected Type value; - private static final long serialVersionUID = 11139504L; + private static final long serialVersionUID = -1035059584L; /** * Constructor @@ -2612,7 +2660,7 @@ public class AuditEvent extends DomainResource { /** * Constructor */ - public AuditEventEntityDetailComponent(StringType type, Base64BinaryType value) { + public AuditEventEntityDetailComponent(StringType type, Type value) { super(); this.type = type; this.value = value; @@ -2664,19 +2712,36 @@ public class AuditEvent extends DomainResource { } /** - * @return {@link #value} (The details, base64 encoded. Used to carry bulk information.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + * @return {@link #value} (The details value.) */ - public Base64BinaryType getValueElement() { - if (this.value == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AuditEventEntityDetailComponent.value"); - else if (Configuration.doAutoCreate()) - this.value = new Base64BinaryType(); // bb + public Type getValue() { return this.value; } - public boolean hasValueElement() { - return this.value != null && !this.value.isEmpty(); + /** + * @return {@link #value} (The details value.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (The details value.) + */ + public Base64BinaryType getValueBase64BinaryType() throws FHIRException { + if (!(this.value instanceof Base64BinaryType)) + throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Base64BinaryType) this.value; + } + + public boolean hasValueBase64BinaryType() { + return this.value instanceof Base64BinaryType; } public boolean hasValue() { @@ -2684,41 +2749,27 @@ public class AuditEvent extends DomainResource { } /** - * @param value {@link #value} (The details, base64 encoded. Used to carry bulk information.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + * @param value {@link #value} (The details value.) */ - public AuditEventEntityDetailComponent setValueElement(Base64BinaryType value) { + public AuditEventEntityDetailComponent setValue(Type value) { this.value = value; return this; } - /** - * @return The details, base64 encoded. Used to carry bulk information. - */ - public byte[] getValue() { - return this.value == null ? null : this.value.getValue(); - } - - /** - * @param value The details, base64 encoded. Used to carry bulk information. - */ - public AuditEventEntityDetailComponent setValue(byte[] value) { - if (this.value == null) - this.value = new Base64BinaryType(); - this.value.setValue(value); - return this; - } - protected void listChildren(List children) { super.listChildren(children); children.add(new Property("type", "string", "The type of extra detail provided in the value.", 0, 1, type)); - children.add(new Property("value", "base64Binary", "The details, base64 encoded. Used to carry bulk information.", 0, 1, value)); + children.add(new Property("value[x]", "string|base64Binary", "The details value.", 0, 1, value)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 3575610: /*type*/ return new Property("type", "string", "The type of extra detail provided in the value.", 0, 1, type); - case 111972721: /*value*/ return new Property("value", "base64Binary", "The details, base64 encoded. Used to carry bulk information.", 0, 1, value); + case -1410166417: /*value[x]*/ return new Property("value[x]", "string|base64Binary", "The details value.", 0, 1, value); + case 111972721: /*value*/ return new Property("value[x]", "string|base64Binary", "The details value.", 0, 1, value); + case -1424603934: /*valueString*/ return new Property("value[x]", "string|base64Binary", "The details value.", 0, 1, value); + case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "string|base64Binary", "The details value.", 0, 1, value); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -2728,7 +2779,7 @@ public class AuditEvent extends DomainResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // StringType - case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Base64BinaryType + case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type default: return super.getProperty(hash, name, checkValid); } @@ -2741,7 +2792,7 @@ public class AuditEvent extends DomainResource { this.type = castToString(value); // StringType return value; case 111972721: // value - this.value = castToBase64Binary(value); // Base64BinaryType + this.value = castToType(value); // Type return value; default: return super.setProperty(hash, name, value); } @@ -2752,8 +2803,8 @@ public class AuditEvent extends DomainResource { public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) { this.type = castToString(value); // StringType - } else if (name.equals("value")) { - this.value = castToBase64Binary(value); // Base64BinaryType + } else if (name.equals("value[x]")) { + this.value = castToType(value); // Type } else return super.setProperty(name, value); return value; @@ -2763,7 +2814,8 @@ public class AuditEvent extends DomainResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: return getTypeElement(); - case 111972721: return getValueElement(); + case -1410166417: return getValue(); + case 111972721: return getValue(); default: return super.makeProperty(hash, name); } @@ -2773,7 +2825,7 @@ public class AuditEvent extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: /*type*/ return new String[] {"string"}; - case 111972721: /*value*/ return new String[] {"base64Binary"}; + case 111972721: /*value*/ return new String[] {"string", "base64Binary"}; default: return super.getTypesForProperty(hash, name); } @@ -2784,8 +2836,13 @@ public class AuditEvent extends DomainResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); } - else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.value"); + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueBase64Binary")) { + this.value = new Base64BinaryType(); + return this.value; } else return super.addChild(name); @@ -2816,7 +2873,7 @@ public class AuditEvent extends DomainResource { if (!(other instanceof AuditEventEntityDetailComponent)) return false; AuditEventEntityDetailComponent o = (AuditEventEntityDetailComponent) other; - return compareValues(type, o.type, true) && compareValues(value, o.value, true); + return compareValues(type, o.type, true); } public boolean isEmpty() { @@ -2854,17 +2911,24 @@ public class AuditEvent extends DomainResource { @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-event-action") protected Enumeration action; + /** + * The period during which the activity occurred. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) + protected Period period; + /** * The time when the event occurred on the source. */ - @Child(name = "recorded", type = {InstantType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Child(name = "recorded", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Time when the event occurred on source", formalDefinition="The time when the event occurred on the source." ) protected InstantType recorded; /** * Indicates whether the event succeeded or failed. */ - @Child(name = "outcome", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "outcome", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Whether the event succeeded or failed", formalDefinition="Indicates whether the event succeeded or failed." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-event-outcome") protected Enumeration outcome; @@ -2872,14 +2936,14 @@ public class AuditEvent extends DomainResource { /** * A free text description of the outcome of the event. */ - @Child(name = "outcomeDesc", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "outcomeDesc", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Description of the event outcome", formalDefinition="A free text description of the outcome of the event." ) protected StringType outcomeDesc; /** * The purposeOfUse (reason) that was used during the event being recorded. */ - @Child(name = "purposeOfEvent", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "purposeOfEvent", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="The purposeOfUse of the event", formalDefinition="The purposeOfUse (reason) that was used during the event being recorded." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-PurposeOfUse") protected List purposeOfEvent; @@ -2887,25 +2951,25 @@ public class AuditEvent extends DomainResource { /** * An actor taking an active role in the event or activity that is logged. */ - @Child(name = "agent", type = {}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "agent", type = {}, order=8, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Actor involved in the event", formalDefinition="An actor taking an active role in the event or activity that is logged." ) protected List agent; /** * The system that is reporting the event. */ - @Child(name = "source", type = {}, order=8, min=1, max=1, modifier=false, summary=false) + @Child(name = "source", type = {}, order=9, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Audit Event Reporter", formalDefinition="The system that is reporting the event." ) protected AuditEventSourceComponent source; /** * Specific instances of data or objects that have been accessed. */ - @Child(name = "entity", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "entity", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Data or objects used", formalDefinition="Specific instances of data or objects that have been accessed." ) protected List entity; - private static final long serialVersionUID = 2102955199L; + private static final long serialVersionUID = 106433685L; /** * Constructor @@ -3050,6 +3114,30 @@ public class AuditEvent extends DomainResource { return this; } + /** + * @return {@link #period} (The period during which the activity occurred.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AuditEvent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during which the activity occurred.) + */ + public AuditEvent setPeriod(Period value) { + this.period = value; + return this; + } + /** * @return {@link #recorded} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value */ @@ -3381,6 +3469,7 @@ public class AuditEvent extends DomainResource { children.add(new Property("type", "Coding", "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.", 0, 1, type)); children.add(new Property("subtype", "Coding", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype)); children.add(new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, 1, action)); + children.add(new Property("period", "Period", "The period during which the activity occurred.", 0, 1, period)); children.add(new Property("recorded", "instant", "The time when the event occurred on the source.", 0, 1, recorded)); children.add(new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, 1, outcome)); children.add(new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, 1, outcomeDesc)); @@ -3396,6 +3485,7 @@ public class AuditEvent extends DomainResource { case 3575610: /*type*/ return new Property("type", "Coding", "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.", 0, 1, type); case -1867567750: /*subtype*/ return new Property("subtype", "Coding", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype); case -1422950858: /*action*/ return new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, 1, action); + case -991726143: /*period*/ return new Property("period", "Period", "The period during which the activity occurred.", 0, 1, period); case -799233872: /*recorded*/ return new Property("recorded", "instant", "The time when the event occurred on the source.", 0, 1, recorded); case -1106507950: /*outcome*/ return new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, 1, outcome); case 1062502659: /*outcomeDesc*/ return new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, 1, outcomeDesc); @@ -3414,6 +3504,7 @@ public class AuditEvent extends DomainResource { case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding case -1867567750: /*subtype*/ return this.subtype == null ? new Base[0] : this.subtype.toArray(new Base[this.subtype.size()]); // Coding case -1422950858: /*action*/ return this.action == null ? new Base[0] : new Base[] {this.action}; // Enumeration + case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // InstantType case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 1062502659: /*outcomeDesc*/ return this.outcomeDesc == null ? new Base[0] : new Base[] {this.outcomeDesc}; // StringType @@ -3439,6 +3530,9 @@ public class AuditEvent extends DomainResource { value = new AuditEventActionEnumFactory().fromType(castToCode(value)); this.action = (Enumeration) value; // Enumeration return value; + case -991726143: // period + this.period = castToPeriod(value); // Period + return value; case -799233872: // recorded this.recorded = castToInstant(value); // InstantType return value; @@ -3475,6 +3569,8 @@ public class AuditEvent extends DomainResource { } else if (name.equals("action")) { value = new AuditEventActionEnumFactory().fromType(castToCode(value)); this.action = (Enumeration) value; // Enumeration + } else if (name.equals("period")) { + this.period = castToPeriod(value); // Period } else if (name.equals("recorded")) { this.recorded = castToInstant(value); // InstantType } else if (name.equals("outcome")) { @@ -3501,6 +3597,7 @@ public class AuditEvent extends DomainResource { case 3575610: return getType(); case -1867567750: return addSubtype(); case -1422950858: return getActionElement(); + case -991726143: return getPeriod(); case -799233872: return getRecordedElement(); case -1106507950: return getOutcomeElement(); case 1062502659: return getOutcomeDescElement(); @@ -3519,6 +3616,7 @@ public class AuditEvent extends DomainResource { case 3575610: /*type*/ return new String[] {"Coding"}; case -1867567750: /*subtype*/ return new String[] {"Coding"}; case -1422950858: /*action*/ return new String[] {"code"}; + case -991726143: /*period*/ return new String[] {"Period"}; case -799233872: /*recorded*/ return new String[] {"instant"}; case -1106507950: /*outcome*/ return new String[] {"code"}; case 1062502659: /*outcomeDesc*/ return new String[] {"string"}; @@ -3543,6 +3641,10 @@ public class AuditEvent extends DomainResource { else if (name.equals("action")) { throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.action"); } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } else if (name.equals("recorded")) { throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.recorded"); } @@ -3584,6 +3686,7 @@ public class AuditEvent extends DomainResource { dst.subtype.add(i.copy()); }; dst.action = action == null ? null : action.copy(); + dst.period = period == null ? null : period.copy(); dst.recorded = recorded == null ? null : recorded.copy(); dst.outcome = outcome == null ? null : outcome.copy(); dst.outcomeDesc = outcomeDesc == null ? null : outcomeDesc.copy(); @@ -3618,9 +3721,10 @@ public class AuditEvent extends DomainResource { return false; AuditEvent o = (AuditEvent) other; return compareDeep(type, o.type, true) && compareDeep(subtype, o.subtype, true) && compareDeep(action, o.action, true) - && compareDeep(recorded, o.recorded, true) && compareDeep(outcome, o.outcome, true) && compareDeep(outcomeDesc, o.outcomeDesc, true) - && compareDeep(purposeOfEvent, o.purposeOfEvent, true) && compareDeep(agent, o.agent, true) && compareDeep(source, o.source, true) - && compareDeep(entity, o.entity, true); + && compareDeep(period, o.period, true) && compareDeep(recorded, o.recorded, true) && compareDeep(outcome, o.outcome, true) + && compareDeep(outcomeDesc, o.outcomeDesc, true) && compareDeep(purposeOfEvent, o.purposeOfEvent, true) + && compareDeep(agent, o.agent, true) && compareDeep(source, o.source, true) && compareDeep(entity, o.entity, true) + ; } @Override @@ -3635,8 +3739,8 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subtype, action, recorded - , outcome, outcomeDesc, purposeOfEvent, agent, source, entity); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subtype, action, period + , recorded, outcome, outcomeDesc, purposeOfEvent, agent, source, entity); } @Override @@ -3692,7 +3796,7 @@ public class AuditEvent extends DomainResource { * Path: AuditEvent.agent.reference
*

*/ - @SearchParamDefinition(name="agent", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) + @SearchParamDefinition(name="agent", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) public static final String SP_AGENT = "agent"; /** * Fluent Client search parameter constant for agent diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BackboneElement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BackboneElement.java index 550ddfb2c3d..341781f6f53 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BackboneElement.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BackboneElement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java index 297332126f7..392e289bd7c 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java @@ -2,14 +2,17 @@ package org.hl7.fhir.r4.model; import static org.apache.commons.lang3.StringUtils.isBlank; -import java.util.*; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.FastDateFormat; -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; import ca.uhn.fhir.parser.DataFormatException; public abstract class BaseDateTimeType extends PrimitiveType { @@ -205,6 +208,14 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.DAY_OF_MONTH); } + /** + * Sets the month with 1-index, e.g. 1=the first day of the month + */ + public BaseDateTimeType setDay(int theDay) { + setFieldValue(Calendar.DAY_OF_MONTH, theDay, null, 0, 31); + return this; + } + /** * Returns the default precision for the given datatype */ @@ -225,6 +236,14 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.HOUR_OF_DAY); } + /** + * Sets the hour of the day in a 24h clock, e.g. 13=1pm + */ + public BaseDateTimeType setHour(int theHour) { + setFieldValue(Calendar.HOUR_OF_DAY, theHour, null, 0, 23); + return this; + } + /** * Returns the milliseconds within the current second. *

@@ -236,6 +255,18 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.MILLISECOND); } + /** + * Sets the milliseconds within the current second. + *

+ * Note that this method sets the + * same value as {@link #setNanos(long)} but with less precision. + *

+ */ + public BaseDateTimeType setMillis(int theMillis) { + setFieldValue(Calendar.MILLISECOND, theMillis, null, 0, 999); + return this; + } + /** * Returns the minute of the hour in the range 0-59 */ @@ -243,6 +274,14 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.MINUTE); } + /** + * Sets the minute of the hour in the range 0-59 + */ + public BaseDateTimeType setMinute(int theMinute) { + setFieldValue(Calendar.MINUTE, theMinute, null, 0, 59); + return this; + } + /** * Returns the month with 0-index, e.g. 0=January */ @@ -250,6 +289,14 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.MONTH); } + /** + * Sets the month with 0-index, e.g. 0=January + */ + public BaseDateTimeType setMonth(int theMonth) { + setFieldValue(Calendar.MONTH, theMonth, null, 0, 11); + return this; + } + /** * Returns the nanoseconds within the current second *

@@ -266,6 +313,29 @@ public abstract class BaseDateTimeType extends PrimitiveType { return Long.parseLong(retVal); } + /** + * Sets the nanoseconds within the current second + *

+ * Note that this method sets the + * same value as {@link #setMillis(int)} but with more precision. + *

+ */ + public BaseDateTimeType setNanos(long theNanos) { + validateValueInRange(theNanos, 0, NANOS_PER_SECOND - 1); + String fractionalSeconds = StringUtils.leftPad(Long.toString(theNanos), 9, '0'); + + // Strip trailing 0s + for (int i = fractionalSeconds.length(); i > 0; i--) { + if (fractionalSeconds.charAt(i - 1) != '0') { + fractionalSeconds = fractionalSeconds.substring(0, i); + break; + } + } + int millis = (int) (theNanos / NANOS_PER_MILLIS); + setFieldValue(Calendar.MILLISECOND, millis, fractionalSeconds, 0, 999); + return this; + } + private int getOffsetIndex(String theValueString) { int plusIndex = theValueString.indexOf('+', 16); int minusIndex = theValueString.indexOf('-', 16); @@ -282,7 +352,7 @@ public abstract class BaseDateTimeType extends PrimitiveType { /** * Gets the precision for this datatype (using the default for the given type if not set) - * + * * @see #setPrecision(TemporalPrecisionEnum) */ public TemporalPrecisionEnum getPrecision() { @@ -292,6 +362,19 @@ public abstract class BaseDateTimeType extends PrimitiveType { return myPrecision; } + /** + * Sets the precision for this datatype + * + * @throws DataFormatException + */ + public void setPrecision(TemporalPrecisionEnum thePrecision) throws DataFormatException { + if (thePrecision == null) { + throw new NullPointerException("Precision may not be null"); + } + myPrecision = thePrecision; + updateStringValue(); + } + /** * Returns the second of the minute in the range 0-59 */ @@ -299,6 +382,14 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.SECOND); } + /** + * Sets the second of the minute in the range 0-59 + */ + public BaseDateTimeType setSecond(int theSecond) { + setFieldValue(Calendar.SECOND, theSecond, null, 0, 59); + return this; + } + /** * Returns the TimeZone associated with this dateTime's value. May return null if no timezone was * supplied. @@ -310,6 +401,13 @@ public abstract class BaseDateTimeType extends PrimitiveType { return myTimeZone; } + public BaseDateTimeType setTimeZone(TimeZone theTimeZone) { + myTimeZone = theTimeZone; + myTimeZoneZulu = false; + updateStringValue(); + return this; + } + /** * Returns the value of this object as a {@link GregorianCalendar} */ @@ -334,6 +432,14 @@ public abstract class BaseDateTimeType extends PrimitiveType { return getFieldValue(Calendar.YEAR); } + /** + * Sets the year, e.g. 2015 + */ + public BaseDateTimeType setYear(int theYear) { + setFieldValue(Calendar.YEAR, theYear, null, 0, 9999); + return this; + } + /** * To be implemented by subclasses to indicate whether the given precision is allowed by this type */ @@ -346,9 +452,16 @@ public abstract class BaseDateTimeType extends PrimitiveType { return myTimeZoneZulu; } + public BaseDateTimeType setTimeZoneZulu(boolean theTimeZoneZulu) { + myTimeZoneZulu = theTimeZoneZulu; + myTimeZone = null; + updateStringValue(); + return this; + } + /** * Returns true if this object represents a date that is today's date - * + * * @throws NullPointerException * if {@link #getValue()} returns null */ @@ -489,14 +602,6 @@ public abstract class BaseDateTimeType extends PrimitiveType { return retVal; } - /** - * Sets the month with 1-index, e.g. 1=the first day of the month - */ - public BaseDateTimeType setDay(int theDay) { - setFieldValue(Calendar.DAY_OF_MONTH, theDay, null, 0, 31); - return this; - } - private void setFieldValue(int theField, int theValue, String theFractionalSeconds, int theMinimum, int theMaximum) { validateValueInRange(theValue, theMinimum, theMaximum); Calendar cal; @@ -516,86 +621,6 @@ public abstract class BaseDateTimeType extends PrimitiveType { super.setValue(cal.getTime()); } - /** - * Sets the hour of the day in a 24h clock, e.g. 13=1pm - */ - public BaseDateTimeType setHour(int theHour) { - setFieldValue(Calendar.HOUR_OF_DAY, theHour, null, 0, 23); - return this; - } - - /** - * Sets the milliseconds within the current second. - *

- * Note that this method sets the - * same value as {@link #setNanos(long)} but with less precision. - *

- */ - public BaseDateTimeType setMillis(int theMillis) { - setFieldValue(Calendar.MILLISECOND, theMillis, null, 0, 999); - return this; - } - - /** - * Sets the minute of the hour in the range 0-59 - */ - public BaseDateTimeType setMinute(int theMinute) { - setFieldValue(Calendar.MINUTE, theMinute, null, 0, 59); - return this; - } - - /** - * Sets the month with 0-index, e.g. 0=January - */ - public BaseDateTimeType setMonth(int theMonth) { - setFieldValue(Calendar.MONTH, theMonth, null, 0, 11); - return this; - } - - /** - * Sets the nanoseconds within the current second - *

- * Note that this method sets the - * same value as {@link #setMillis(int)} but with more precision. - *

- */ - public BaseDateTimeType setNanos(long theNanos) { - validateValueInRange(theNanos, 0, NANOS_PER_SECOND - 1); - String fractionalSeconds = StringUtils.leftPad(Long.toString(theNanos), 9, '0'); - - // Strip trailing 0s - for (int i = fractionalSeconds.length(); i > 0; i--) { - if (fractionalSeconds.charAt(i - 1) != '0') { - fractionalSeconds = fractionalSeconds.substring(0, i); - break; - } - } - int millis = (int) (theNanos / NANOS_PER_MILLIS); - setFieldValue(Calendar.MILLISECOND, millis, fractionalSeconds, 0, 999); - return this; - } - - /** - * Sets the precision for this datatype - * - * @throws DataFormatException - */ - public void setPrecision(TemporalPrecisionEnum thePrecision) throws DataFormatException { - if (thePrecision == null) { - throw new NullPointerException("Precision may not be null"); - } - myPrecision = thePrecision; - updateStringValue(); - } - - /** - * Sets the second of the minute in the range 0-59 - */ - public BaseDateTimeType setSecond(int theSecond) { - setFieldValue(Calendar.SECOND, theSecond, null, 0, 59); - return this; - } - private BaseDateTimeType setTimeZone(String theWholeValue, String theValue) { if (isBlank(theValue)) { @@ -617,20 +642,6 @@ public abstract class BaseDateTimeType extends PrimitiveType { return this; } - public BaseDateTimeType setTimeZone(TimeZone theTimeZone) { - myTimeZone = theTimeZone; - myTimeZoneZulu = false; - updateStringValue(); - return this; - } - - public BaseDateTimeType setTimeZoneZulu(boolean theTimeZoneZulu) { - myTimeZoneZulu = theTimeZoneZulu; - myTimeZone = null; - updateStringValue(); - return this; - } - /** * Sets the value for this type using the given Java Date object as the time, and using the default precision for * this datatype (unless the precision is already set), as well as the local timezone as determined by the local operating @@ -646,7 +657,7 @@ public abstract class BaseDateTimeType extends PrimitiveType { * Sets the value for this type using the given Java Date object as the time, and using the specified precision, as * well as the local timezone as determined by the local operating system. Both of * these properties may be modified in subsequent calls if neccesary. - * + * * @param theValue * The date value * @param thePrecision @@ -718,14 +729,6 @@ public abstract class BaseDateTimeType extends PrimitiveType { } } - /** - * Sets the year, e.g. 2015 - */ - public BaseDateTimeType setYear(int theYear) { - setFieldValue(Calendar.YEAR, theYear, null, 0, 9999); - return this; - } - private void throwBadDateFormat(String theValue) { throw new DataFormatException("Invalid date/time format: \"" + theValue + "\""); } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Basic.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Basic.java index 4ec9ca716bc..1dba351d522 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Basic.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Basic.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Binary.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Binary.java index 75125a4a8d7..77e0d9000c4 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Binary.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Binary.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BodyStructure.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BodyStructure.java index f42bdcc3d40..0ed91e20739 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BodyStructure.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/BodyStructure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Bundle.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Bundle.java index 8c9cc726683..c31e572eed8 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Bundle.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Bundle.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CapabilityStatement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CapabilityStatement.java index fd0184bb7a8..43ff621813c 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CapabilityStatement.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CapabilityStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CarePlan.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CarePlan.java index aeffe35707e..a7cd84fb881 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CarePlan.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CarePlan.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -346,6 +346,194 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } } + public enum CarePlanActivityKind { + /** + * null + */ + APPOINTMENT, + /** + * null + */ + COMMUNICATIONREQUEST, + /** + * null + */ + DEVICEREQUEST, + /** + * null + */ + MEDICATIONREQUEST, + /** + * null + */ + NUTRITIONORDER, + /** + * null + */ + TASK, + /** + * null + */ + PROCEDUREREQUEST, + /** + * null + */ + VISIONPRESCRIPTION, + /** + * added to help the parsers with the generic types + */ + NULL; + public static CarePlanActivityKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Appointment".equals(codeString)) + return APPOINTMENT; + if ("CommunicationRequest".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("DeviceRequest".equals(codeString)) + return DEVICEREQUEST; + if ("MedicationRequest".equals(codeString)) + return MEDICATIONREQUEST; + if ("NutritionOrder".equals(codeString)) + return NUTRITIONORDER; + if ("Task".equals(codeString)) + return TASK; + if ("ProcedureRequest".equals(codeString)) + return PROCEDUREREQUEST; + if ("VisionPrescription".equals(codeString)) + return VISIONPRESCRIPTION; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown CarePlanActivityKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case APPOINTMENT: return "Appointment"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case DEVICEREQUEST: return "DeviceRequest"; + case MEDICATIONREQUEST: return "MedicationRequest"; + case NUTRITIONORDER: return "NutritionOrder"; + case TASK: return "Task"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case APPOINTMENT: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; + case TASK: return "http://hl7.org/fhir/resource-types"; + case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; + case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case APPOINTMENT: return ""; + case COMMUNICATIONREQUEST: return ""; + case DEVICEREQUEST: return ""; + case MEDICATIONREQUEST: return ""; + case NUTRITIONORDER: return ""; + case TASK: return ""; + case PROCEDUREREQUEST: return ""; + case VISIONPRESCRIPTION: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case APPOINTMENT: return "Appointment"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case DEVICEREQUEST: return "DeviceRequest"; + case MEDICATIONREQUEST: return "MedicationRequest"; + case NUTRITIONORDER: return "NutritionOrder"; + case TASK: return "Task"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + } + + public static class CarePlanActivityKindEnumFactory implements EnumFactory { + public CarePlanActivityKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Appointment".equals(codeString)) + return CarePlanActivityKind.APPOINTMENT; + if ("CommunicationRequest".equals(codeString)) + return CarePlanActivityKind.COMMUNICATIONREQUEST; + if ("DeviceRequest".equals(codeString)) + return CarePlanActivityKind.DEVICEREQUEST; + if ("MedicationRequest".equals(codeString)) + return CarePlanActivityKind.MEDICATIONREQUEST; + if ("NutritionOrder".equals(codeString)) + return CarePlanActivityKind.NUTRITIONORDER; + if ("Task".equals(codeString)) + return CarePlanActivityKind.TASK; + if ("ProcedureRequest".equals(codeString)) + return CarePlanActivityKind.PROCEDUREREQUEST; + if ("VisionPrescription".equals(codeString)) + return CarePlanActivityKind.VISIONPRESCRIPTION; + throw new IllegalArgumentException("Unknown CarePlanActivityKind code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Appointment".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.APPOINTMENT); + if ("CommunicationRequest".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.COMMUNICATIONREQUEST); + if ("DeviceRequest".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.DEVICEREQUEST); + if ("MedicationRequest".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.MEDICATIONREQUEST); + if ("NutritionOrder".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.NUTRITIONORDER); + if ("Task".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.TASK); + if ("ProcedureRequest".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.PROCEDUREREQUEST); + if ("VisionPrescription".equals(codeString)) + return new Enumeration(this, CarePlanActivityKind.VISIONPRESCRIPTION); + throw new FHIRException("Unknown CarePlanActivityKind code '"+codeString+"'"); + } + public String toCode(CarePlanActivityKind code) { + if (code == CarePlanActivityKind.APPOINTMENT) + return "Appointment"; + if (code == CarePlanActivityKind.COMMUNICATIONREQUEST) + return "CommunicationRequest"; + if (code == CarePlanActivityKind.DEVICEREQUEST) + return "DeviceRequest"; + if (code == CarePlanActivityKind.MEDICATIONREQUEST) + return "MedicationRequest"; + if (code == CarePlanActivityKind.NUTRITIONORDER) + return "NutritionOrder"; + if (code == CarePlanActivityKind.TASK) + return "Task"; + if (code == CarePlanActivityKind.PROCEDUREREQUEST) + return "ProcedureRequest"; + if (code == CarePlanActivityKind.VISIONPRESCRIPTION) + return "VisionPrescription"; + return "?"; + } + public String toSystem(CarePlanActivityKind code) { + return code.getSystem(); + } + } + public enum CarePlanActivityStatus { /** * Activity is planned but no action has yet been taken. @@ -1007,12 +1195,12 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Block() public static class CarePlanActivityDetailComponent extends BackboneElement implements IBaseBackboneElement { /** - * High-level categorization of the type of activity in a care plan. + * A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. */ - @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="diet | drug | encounter | observation | procedure | supply | other", formalDefinition="High-level categorization of the type of activity in a care plan." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-category") - protected CodeableConcept category; + @Child(name = "kind", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Kind of resource", formalDefinition="A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-kind") + protected Enumeration kind; /** * Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with. @@ -1148,7 +1336,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Description(shortDefinition="Extra info describing activity to perform", formalDefinition="This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc." ) protected StringType description; - private static final long serialVersionUID = -549984462L; + private static final long serialVersionUID = 677010887L; /** * Constructor @@ -1166,26 +1354,51 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } /** - * @return {@link #category} (High-level categorization of the type of activity in a care plan.) + * @return {@link #kind} (A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value */ - public CodeableConcept getCategory() { - if (this.category == null) + public Enumeration getKindElement() { + if (this.kind == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.category"); + throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.kind"); else if (Configuration.doAutoCreate()) - this.category = new CodeableConcept(); // cc - return this.category; + this.kind = new Enumeration(new CarePlanActivityKindEnumFactory()); // bb + return this.kind; } - public boolean hasCategory() { - return this.category != null && !this.category.isEmpty(); + public boolean hasKindElement() { + return this.kind != null && !this.kind.isEmpty(); + } + + public boolean hasKind() { + return this.kind != null && !this.kind.isEmpty(); } /** - * @param value {@link #category} (High-level categorization of the type of activity in a care plan.) + * @param value {@link #kind} (A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value */ - public CarePlanActivityDetailComponent setCategory(CodeableConcept value) { - this.category = value; + public CarePlanActivityDetailComponent setKindElement(Enumeration value) { + this.kind = value; + return this; + } + + /** + * @return A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. + */ + public CarePlanActivityKind getKind() { + return this.kind == null ? null : this.kind.getValue(); + } + + /** + * @param value A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. + */ + public CarePlanActivityDetailComponent setKind(CarePlanActivityKind value) { + if (value == null) + this.kind = null; + else { + if (this.kind == null) + this.kind = new Enumeration(new CarePlanActivityKindEnumFactory()); + this.kind.setValue(value); + } return this; } @@ -1903,7 +2116,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("category", "CodeableConcept", "High-level categorization of the type of activity in a care plan.", 0, 1, category)); + children.add(new Property("kind", "code", "A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest.", 0, 1, kind)); children.add(new Property("definition", "Reference(PlanDefinition|ActivityDefinition|Questionnaire)", "Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with.", 0, 1, definition)); children.add(new Property("code", "CodeableConcept", "Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.", 0, 1, code)); children.add(new Property("reasonCode", "CodeableConcept", "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); @@ -1924,7 +2137,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 50511102: /*category*/ return new Property("category", "CodeableConcept", "High-level categorization of the type of activity in a care plan.", 0, 1, category); + case 3292052: /*kind*/ return new Property("kind", "code", "A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest.", 0, 1, kind); case -1014418093: /*definition*/ return new Property("definition", "Reference(PlanDefinition|ActivityDefinition|Questionnaire)", "Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with.", 0, 1, definition); case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.", 0, 1, code); case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.", 0, java.lang.Integer.MAX_VALUE, reasonCode); @@ -1955,7 +2168,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept + case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Reference case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept @@ -1979,8 +2192,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { - case 50511102: // category - this.category = castToCodeableConcept(value); // CodeableConcept + case 3292052: // kind + value = new CarePlanActivityKindEnumFactory().fromType(castToCode(value)); + this.kind = (Enumeration) value; // Enumeration return value; case -1014418093: // definition this.definition = castToReference(value); // Reference @@ -2035,8 +2249,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("category")) { - this.category = castToCodeableConcept(value); // CodeableConcept + if (name.equals("kind")) { + value = new CarePlanActivityKindEnumFactory().fromType(castToCode(value)); + this.kind = (Enumeration) value; // Enumeration } else if (name.equals("definition")) { this.definition = castToReference(value); // Reference } else if (name.equals("code")) { @@ -2076,7 +2291,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case 50511102: return getCategory(); + case 3292052: return getKindElement(); case -1014418093: return getDefinition(); case 3059181: return getCode(); case 722137681: return addReasonCode(); @@ -2102,7 +2317,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { - case 50511102: /*category*/ return new String[] {"CodeableConcept"}; + case 3292052: /*kind*/ return new String[] {"code"}; case -1014418093: /*definition*/ return new String[] {"Reference"}; case 3059181: /*code*/ return new String[] {"CodeableConcept"}; case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; @@ -2125,9 +2340,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base addChild(String name) throws FHIRException { - if (name.equals("category")) { - this.category = new CodeableConcept(); - return this.category; + if (name.equals("kind")) { + throw new FHIRException("Cannot call addChild on a primitive type CarePlan.kind"); } else if (name.equals("definition")) { this.definition = new Reference(); @@ -2200,7 +2414,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use public CarePlanActivityDetailComponent copy() { CarePlanActivityDetailComponent dst = new CarePlanActivityDetailComponent(); copyValues(dst); - dst.category = category == null ? null : category.copy(); + dst.kind = kind == null ? null : kind.copy(); dst.definition = definition == null ? null : definition.copy(); dst.code = code == null ? null : code.copy(); if (reasonCode != null) { @@ -2242,7 +2456,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use if (!(other instanceof CarePlanActivityDetailComponent)) return false; CarePlanActivityDetailComponent o = (CarePlanActivityDetailComponent) other; - return compareDeep(category, o.category, true) && compareDeep(definition, o.definition, true) && compareDeep(code, o.code, true) + return compareDeep(kind, o.kind, true) && compareDeep(definition, o.definition, true) && compareDeep(code, o.code, true) && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(goal, o.goal, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(prohibited, o.prohibited, true) && compareDeep(scheduled, o.scheduled, true) && compareDeep(location, o.location, true) @@ -2257,14 +2471,15 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use if (!(other instanceof CarePlanActivityDetailComponent)) return false; CarePlanActivityDetailComponent o = (CarePlanActivityDetailComponent) other; - return compareValues(status, o.status, true) && compareValues(statusReason, o.statusReason, true) && compareValues(prohibited, o.prohibited, true) - && compareValues(description, o.description, true); + return compareValues(kind, o.kind, true) && compareValues(status, o.status, true) && compareValues(statusReason, o.statusReason, true) + && compareValues(prohibited, o.prohibited, true) && compareValues(description, o.description, true) + ; } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, definition, code - , reasonCode, reasonReference, goal, status, statusReason, prohibited, scheduled - , location, performer, product, dailyAmount, quantity, description); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, definition, code, reasonCode + , reasonReference, goal, status, statusReason, prohibited, scheduled, location + , performer, product, dailyAmount, quantity, description); } public String fhirType() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CareTeam.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CareTeam.java index a4c2c52f08e..9445b6fdc75 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CareTeam.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CareTeam.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CatalogEntry.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CatalogEntry.java new file mode 100644 index 00000000000..5e5d4666cae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CatalogEntry.java @@ -0,0 +1,1208 @@ +package org.hl7.fhir.r4.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import java.util.*; + +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ +@ResourceDef(name="CatalogEntry", profile="http://hl7.org/fhir/Profile/CatalogEntry") +public class CatalogEntry extends DomainResource { + + @Block() + public static class CatalogEntryRelatedItemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc. + */ + @Child(name = "relationtype", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of relation to the related item", formalDefinition="The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc." ) + protected CodeableConcept relationtype; + + /** + * The type of related item. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of related item - medication, devices", formalDefinition="The type of related item." ) + protected CodeableConcept type; + + /** + * The reference to the related item. + */ + @Child(name = "item", type = {Medication.class, Device.class, Procedure.class, CarePlan.class, Organization.class, Practitioner.class, HealthcareService.class, ServiceDefinition.class, CatalogEntry.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The reference to the related item", formalDefinition="The reference to the related item." ) + protected Reference item; + + /** + * The actual object that is the target of the reference (The reference to the related item.) + */ + protected Resource itemTarget; + + private static final long serialVersionUID = -921406858L; + + /** + * Constructor + */ + public CatalogEntryRelatedItemComponent() { + super(); + } + + /** + * Constructor + */ + public CatalogEntryRelatedItemComponent(CodeableConcept relationtype, Reference item) { + super(); + this.relationtype = relationtype; + this.item = item; + } + + /** + * @return {@link #relationtype} (The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.) + */ + public CodeableConcept getRelationtype() { + if (this.relationtype == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntryRelatedItemComponent.relationtype"); + else if (Configuration.doAutoCreate()) + this.relationtype = new CodeableConcept(); // cc + return this.relationtype; + } + + public boolean hasRelationtype() { + return this.relationtype != null && !this.relationtype.isEmpty(); + } + + /** + * @param value {@link #relationtype} (The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.) + */ + public CatalogEntryRelatedItemComponent setRelationtype(CodeableConcept value) { + this.relationtype = value; + return this; + } + + /** + * @return {@link #type} (The type of related item.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntryRelatedItemComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of related item.) + */ + public CatalogEntryRelatedItemComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #item} (The reference to the related item.) + */ + public Reference getItem() { + if (this.item == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntryRelatedItemComponent.item"); + else if (Configuration.doAutoCreate()) + this.item = new Reference(); // cc + return this.item; + } + + public boolean hasItem() { + return this.item != null && !this.item.isEmpty(); + } + + /** + * @param value {@link #item} (The reference to the related item.) + */ + public CatalogEntryRelatedItemComponent setItem(Reference value) { + this.item = value; + return this; + } + + /** + * @return {@link #item} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The reference to the related item.) + */ + public Resource getItemTarget() { + return this.itemTarget; + } + + /** + * @param value {@link #item} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The reference to the related item.) + */ + public CatalogEntryRelatedItemComponent setItemTarget(Resource value) { + this.itemTarget = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("relationtype", "CodeableConcept", "The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.", 0, 1, relationtype)); + children.add(new Property("type", "CodeableConcept", "The type of related item.", 0, 1, type)); + children.add(new Property("item", "Reference(Medication|Device|Procedure|CarePlan|Organization|Practitioner|HealthcareService|ServiceDefinition|CatalogEntry)", "The reference to the related item.", 0, 1, item)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -261805258: /*relationtype*/ return new Property("relationtype", "CodeableConcept", "The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.", 0, 1, relationtype); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of related item.", 0, 1, type); + case 3242771: /*item*/ return new Property("item", "Reference(Medication|Device|Procedure|CarePlan|Organization|Practitioner|HealthcareService|ServiceDefinition|CatalogEntry)", "The reference to the related item.", 0, 1, item); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -261805258: /*relationtype*/ return this.relationtype == null ? new Base[0] : new Base[] {this.relationtype}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -261805258: // relationtype + this.relationtype = castToCodeableConcept(value); // CodeableConcept + return value; + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; + case 3242771: // item + this.item = castToReference(value); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("relationtype")) { + this.relationtype = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("item")) { + this.item = castToReference(value); // Reference + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -261805258: return getRelationtype(); + case 3575610: return getType(); + case 3242771: return getItem(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -261805258: /*relationtype*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 3242771: /*item*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("relationtype")) { + this.relationtype = new CodeableConcept(); + return this.relationtype; + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("item")) { + this.item = new Reference(); + return this.item; + } + else + return super.addChild(name); + } + + public CatalogEntryRelatedItemComponent copy() { + CatalogEntryRelatedItemComponent dst = new CatalogEntryRelatedItemComponent(); + copyValues(dst); + dst.relationtype = relationtype == null ? null : relationtype.copy(); + dst.type = type == null ? null : type.copy(); + dst.item = item == null ? null : item.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CatalogEntryRelatedItemComponent)) + return false; + CatalogEntryRelatedItemComponent o = (CatalogEntryRelatedItemComponent) other; + return compareDeep(relationtype, o.relationtype, true) && compareDeep(type, o.type, true) && compareDeep(item, o.item, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CatalogEntryRelatedItemComponent)) + return false; + CatalogEntryRelatedItemComponent o = (CatalogEntryRelatedItemComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relationtype, type, item + ); + } + + public String fhirType() { + return "CatalogEntry.relatedItem"; + + } + + } + + /** + * The type of item - medication, device, service, protocol or other. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of item - medication, device, service, protocol or other", formalDefinition="The type of item - medication, device, service, protocol or other." ) + protected CodeableConcept type; + + /** + * Whether the entry represents an orderable item, or other. + */ + @Child(name = "purpose", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether the entry represents an orderable item, or other", formalDefinition="Whether the entry represents an orderable item, or other." ) + protected CodeableConcept purpose; + + /** + * Content of the catalog. + */ + @Child(name = "referencedItem", type = {Medication.class, Device.class, Procedure.class, CarePlan.class, Organization.class, Practitioner.class, HealthcareService.class, ServiceDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The item itself", formalDefinition="Content of the catalog." ) + protected Reference referencedItem; + + /** + * The actual object that is the target of the reference (Content of the catalog.) + */ + protected Resource referencedItemTarget; + + /** + * Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code. + */ + @Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier of the catalog item", formalDefinition="Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code." ) + protected Identifier identifier; + + /** + * Used in supporting related concepts, e.g. NDC to RxNorm. + */ + @Child(name = "additionalIdentifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Any additional identifier(s) for the catalog item, in the same granularity or concept", formalDefinition="Used in supporting related concepts, e.g. NDC to RxNorm." ) + protected List additionalIdentifier; + + /** + * Classes of devices, or ATC for medication. + */ + @Child(name = "classification", type = {Identifier.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Classification (category or class) of the item entry", formalDefinition="Classes of devices, or ATC for medication." ) + protected List classification; + + /** + * Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable. + */ + @Child(name = "status", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The status of the item, e.g. active, approved, deleted…", formalDefinition="Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable." ) + protected CodeableConcept status; + + /** + * The time period in which this catalog entry is expected to be active. + */ + @Child(name = "validityPeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The time period in which this catalog entry is expected to be active", formalDefinition="The time period in which this catalog entry is expected to be active." ) + protected Period validityPeriod; + + /** + * Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. + */ + @Child(name = "lastUpdated", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When was this catalog last updated", formalDefinition="Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated." ) + protected DateTimeType lastUpdated; + + /** + * Used for examplefor Out of Formulary, or any specifics. + */ + @Child(name = "additionalCharacteristic", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional characteristics of the catalog entry", formalDefinition="Used for examplefor Out of Formulary, or any specifics." ) + protected List additionalCharacteristic; + + /** + * User for example for ATC classification, or. + */ + @Child(name = "additionalClassification", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional classification of the catalog entry", formalDefinition="User for example for ATC classification, or." ) + protected List additionalClassification; + + /** + * Used for example, to point to a substance, or to a device used to administer a medication. + */ + @Child(name = "relatedItem", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="An item that this catalog entry is related to", formalDefinition="Used for example, to point to a substance, or to a device used to administer a medication." ) + protected List relatedItem; + + private static final long serialVersionUID = 359754478L; + + /** + * Constructor + */ + public CatalogEntry() { + super(); + } + + /** + * Constructor + */ + public CatalogEntry(CodeableConcept purpose, Reference referencedItem) { + super(); + this.purpose = purpose; + this.referencedItem = referencedItem; + } + + /** + * @return {@link #type} (The type of item - medication, device, service, protocol or other.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of item - medication, device, service, protocol or other.) + */ + public CatalogEntry setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #purpose} (Whether the entry represents an orderable item, or other.) + */ + public CodeableConcept getPurpose() { + if (this.purpose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.purpose"); + else if (Configuration.doAutoCreate()) + this.purpose = new CodeableConcept(); // cc + return this.purpose; + } + + public boolean hasPurpose() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + /** + * @param value {@link #purpose} (Whether the entry represents an orderable item, or other.) + */ + public CatalogEntry setPurpose(CodeableConcept value) { + this.purpose = value; + return this; + } + + /** + * @return {@link #referencedItem} (Content of the catalog.) + */ + public Reference getReferencedItem() { + if (this.referencedItem == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.referencedItem"); + else if (Configuration.doAutoCreate()) + this.referencedItem = new Reference(); // cc + return this.referencedItem; + } + + public boolean hasReferencedItem() { + return this.referencedItem != null && !this.referencedItem.isEmpty(); + } + + /** + * @param value {@link #referencedItem} (Content of the catalog.) + */ + public CatalogEntry setReferencedItem(Reference value) { + this.referencedItem = value; + return this; + } + + /** + * @return {@link #referencedItem} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Content of the catalog.) + */ + public Resource getReferencedItemTarget() { + return this.referencedItemTarget; + } + + /** + * @param value {@link #referencedItem} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Content of the catalog.) + */ + public CatalogEntry setReferencedItemTarget(Resource value) { + this.referencedItemTarget = value; + return this; + } + + /** + * @return {@link #identifier} (Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.) + */ + public CatalogEntry setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #additionalIdentifier} (Used in supporting related concepts, e.g. NDC to RxNorm.) + */ + public List getAdditionalIdentifier() { + if (this.additionalIdentifier == null) + this.additionalIdentifier = new ArrayList(); + return this.additionalIdentifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public CatalogEntry setAdditionalIdentifier(List theAdditionalIdentifier) { + this.additionalIdentifier = theAdditionalIdentifier; + return this; + } + + public boolean hasAdditionalIdentifier() { + if (this.additionalIdentifier == null) + return false; + for (Identifier item : this.additionalIdentifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addAdditionalIdentifier() { //3 + Identifier t = new Identifier(); + if (this.additionalIdentifier == null) + this.additionalIdentifier = new ArrayList(); + this.additionalIdentifier.add(t); + return t; + } + + public CatalogEntry addAdditionalIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.additionalIdentifier == null) + this.additionalIdentifier = new ArrayList(); + this.additionalIdentifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #additionalIdentifier}, creating it if it does not already exist + */ + public Identifier getAdditionalIdentifierFirstRep() { + if (getAdditionalIdentifier().isEmpty()) { + addAdditionalIdentifier(); + } + return getAdditionalIdentifier().get(0); + } + + /** + * @return {@link #classification} (Classes of devices, or ATC for medication.) + */ + public List getClassification() { + if (this.classification == null) + this.classification = new ArrayList(); + return this.classification; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public CatalogEntry setClassification(List theClassification) { + this.classification = theClassification; + return this; + } + + public boolean hasClassification() { + if (this.classification == null) + return false; + for (Identifier item : this.classification) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addClassification() { //3 + Identifier t = new Identifier(); + if (this.classification == null) + this.classification = new ArrayList(); + this.classification.add(t); + return t; + } + + public CatalogEntry addClassification(Identifier t) { //3 + if (t == null) + return this; + if (this.classification == null) + this.classification = new ArrayList(); + this.classification.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #classification}, creating it if it does not already exist + */ + public Identifier getClassificationFirstRep() { + if (getClassification().isEmpty()) { + addClassification(); + } + return getClassification().get(0); + } + + /** + * @return {@link #status} (Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.) + */ + public CodeableConcept getStatus() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.status"); + else if (Configuration.doAutoCreate()) + this.status = new CodeableConcept(); // cc + return this.status; + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.) + */ + public CatalogEntry setStatus(CodeableConcept value) { + this.status = value; + return this; + } + + /** + * @return {@link #validityPeriod} (The time period in which this catalog entry is expected to be active.) + */ + public Period getValidityPeriod() { + if (this.validityPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.validityPeriod"); + else if (Configuration.doAutoCreate()) + this.validityPeriod = new Period(); // cc + return this.validityPeriod; + } + + public boolean hasValidityPeriod() { + return this.validityPeriod != null && !this.validityPeriod.isEmpty(); + } + + /** + * @param value {@link #validityPeriod} (The time period in which this catalog entry is expected to be active.) + */ + public CatalogEntry setValidityPeriod(Period value) { + this.validityPeriod = value; + return this; + } + + /** + * @return {@link #lastUpdated} (Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value + */ + public DateTimeType getLastUpdatedElement() { + if (this.lastUpdated == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CatalogEntry.lastUpdated"); + else if (Configuration.doAutoCreate()) + this.lastUpdated = new DateTimeType(); // bb + return this.lastUpdated; + } + + public boolean hasLastUpdatedElement() { + return this.lastUpdated != null && !this.lastUpdated.isEmpty(); + } + + public boolean hasLastUpdated() { + return this.lastUpdated != null && !this.lastUpdated.isEmpty(); + } + + /** + * @param value {@link #lastUpdated} (Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value + */ + public CatalogEntry setLastUpdatedElement(DateTimeType value) { + this.lastUpdated = value; + return this; + } + + /** + * @return Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. + */ + public Date getLastUpdated() { + return this.lastUpdated == null ? null : this.lastUpdated.getValue(); + } + + /** + * @param value Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. + */ + public CatalogEntry setLastUpdated(Date value) { + if (value == null) + this.lastUpdated = null; + else { + if (this.lastUpdated == null) + this.lastUpdated = new DateTimeType(); + this.lastUpdated.setValue(value); + } + return this; + } + + /** + * @return {@link #additionalCharacteristic} (Used for examplefor Out of Formulary, or any specifics.) + */ + public List getAdditionalCharacteristic() { + if (this.additionalCharacteristic == null) + this.additionalCharacteristic = new ArrayList(); + return this.additionalCharacteristic; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public CatalogEntry setAdditionalCharacteristic(List theAdditionalCharacteristic) { + this.additionalCharacteristic = theAdditionalCharacteristic; + return this; + } + + public boolean hasAdditionalCharacteristic() { + if (this.additionalCharacteristic == null) + return false; + for (CodeableConcept item : this.additionalCharacteristic) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addAdditionalCharacteristic() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.additionalCharacteristic == null) + this.additionalCharacteristic = new ArrayList(); + this.additionalCharacteristic.add(t); + return t; + } + + public CatalogEntry addAdditionalCharacteristic(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.additionalCharacteristic == null) + this.additionalCharacteristic = new ArrayList(); + this.additionalCharacteristic.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #additionalCharacteristic}, creating it if it does not already exist + */ + public CodeableConcept getAdditionalCharacteristicFirstRep() { + if (getAdditionalCharacteristic().isEmpty()) { + addAdditionalCharacteristic(); + } + return getAdditionalCharacteristic().get(0); + } + + /** + * @return {@link #additionalClassification} (User for example for ATC classification, or.) + */ + public List getAdditionalClassification() { + if (this.additionalClassification == null) + this.additionalClassification = new ArrayList(); + return this.additionalClassification; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public CatalogEntry setAdditionalClassification(List theAdditionalClassification) { + this.additionalClassification = theAdditionalClassification; + return this; + } + + public boolean hasAdditionalClassification() { + if (this.additionalClassification == null) + return false; + for (CodeableConcept item : this.additionalClassification) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addAdditionalClassification() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.additionalClassification == null) + this.additionalClassification = new ArrayList(); + this.additionalClassification.add(t); + return t; + } + + public CatalogEntry addAdditionalClassification(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.additionalClassification == null) + this.additionalClassification = new ArrayList(); + this.additionalClassification.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #additionalClassification}, creating it if it does not already exist + */ + public CodeableConcept getAdditionalClassificationFirstRep() { + if (getAdditionalClassification().isEmpty()) { + addAdditionalClassification(); + } + return getAdditionalClassification().get(0); + } + + /** + * @return {@link #relatedItem} (Used for example, to point to a substance, or to a device used to administer a medication.) + */ + public List getRelatedItem() { + if (this.relatedItem == null) + this.relatedItem = new ArrayList(); + return this.relatedItem; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public CatalogEntry setRelatedItem(List theRelatedItem) { + this.relatedItem = theRelatedItem; + return this; + } + + public boolean hasRelatedItem() { + if (this.relatedItem == null) + return false; + for (CatalogEntryRelatedItemComponent item : this.relatedItem) + if (!item.isEmpty()) + return true; + return false; + } + + public CatalogEntryRelatedItemComponent addRelatedItem() { //3 + CatalogEntryRelatedItemComponent t = new CatalogEntryRelatedItemComponent(); + if (this.relatedItem == null) + this.relatedItem = new ArrayList(); + this.relatedItem.add(t); + return t; + } + + public CatalogEntry addRelatedItem(CatalogEntryRelatedItemComponent t) { //3 + if (t == null) + return this; + if (this.relatedItem == null) + this.relatedItem = new ArrayList(); + this.relatedItem.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #relatedItem}, creating it if it does not already exist + */ + public CatalogEntryRelatedItemComponent getRelatedItemFirstRep() { + if (getRelatedItem().isEmpty()) { + addRelatedItem(); + } + return getRelatedItem().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "The type of item - medication, device, service, protocol or other.", 0, 1, type)); + children.add(new Property("purpose", "CodeableConcept", "Whether the entry represents an orderable item, or other.", 0, 1, purpose)); + children.add(new Property("referencedItem", "Reference(Medication|Device|Procedure|CarePlan|Organization|Practitioner|HealthcareService|ServiceDefinition)", "Content of the catalog.", 0, 1, referencedItem)); + children.add(new Property("identifier", "Identifier", "Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.", 0, 1, identifier)); + children.add(new Property("additionalIdentifier", "Identifier", "Used in supporting related concepts, e.g. NDC to RxNorm.", 0, java.lang.Integer.MAX_VALUE, additionalIdentifier)); + children.add(new Property("classification", "Identifier", "Classes of devices, or ATC for medication.", 0, java.lang.Integer.MAX_VALUE, classification)); + children.add(new Property("status", "CodeableConcept", "Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.", 0, 1, status)); + children.add(new Property("validityPeriod", "Period", "The time period in which this catalog entry is expected to be active.", 0, 1, validityPeriod)); + children.add(new Property("lastUpdated", "dateTime", "Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.", 0, 1, lastUpdated)); + children.add(new Property("additionalCharacteristic", "CodeableConcept", "Used for examplefor Out of Formulary, or any specifics.", 0, java.lang.Integer.MAX_VALUE, additionalCharacteristic)); + children.add(new Property("additionalClassification", "CodeableConcept", "User for example for ATC classification, or.", 0, java.lang.Integer.MAX_VALUE, additionalClassification)); + children.add(new Property("relatedItem", "", "Used for example, to point to a substance, or to a device used to administer a medication.", 0, java.lang.Integer.MAX_VALUE, relatedItem)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of item - medication, device, service, protocol or other.", 0, 1, type); + case -220463842: /*purpose*/ return new Property("purpose", "CodeableConcept", "Whether the entry represents an orderable item, or other.", 0, 1, purpose); + case -1896630996: /*referencedItem*/ return new Property("referencedItem", "Reference(Medication|Device|Procedure|CarePlan|Organization|Practitioner|HealthcareService|ServiceDefinition)", "Content of the catalog.", 0, 1, referencedItem); + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.", 0, 1, identifier); + case 1195162672: /*additionalIdentifier*/ return new Property("additionalIdentifier", "Identifier", "Used in supporting related concepts, e.g. NDC to RxNorm.", 0, java.lang.Integer.MAX_VALUE, additionalIdentifier); + case 382350310: /*classification*/ return new Property("classification", "Identifier", "Classes of devices, or ATC for medication.", 0, java.lang.Integer.MAX_VALUE, classification); + case -892481550: /*status*/ return new Property("status", "CodeableConcept", "Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.", 0, 1, status); + case -1434195053: /*validityPeriod*/ return new Property("validityPeriod", "Period", "The time period in which this catalog entry is expected to be active.", 0, 1, validityPeriod); + case 1649733957: /*lastUpdated*/ return new Property("lastUpdated", "dateTime", "Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.", 0, 1, lastUpdated); + case -1638369886: /*additionalCharacteristic*/ return new Property("additionalCharacteristic", "CodeableConcept", "Used for examplefor Out of Formulary, or any specifics.", 0, java.lang.Integer.MAX_VALUE, additionalCharacteristic); + case -1622333459: /*additionalClassification*/ return new Property("additionalClassification", "CodeableConcept", "User for example for ATC classification, or.", 0, java.lang.Integer.MAX_VALUE, additionalClassification); + case 1112702430: /*relatedItem*/ return new Property("relatedItem", "", "Used for example, to point to a substance, or to a device used to administer a medication.", 0, java.lang.Integer.MAX_VALUE, relatedItem); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // CodeableConcept + case -1896630996: /*referencedItem*/ return this.referencedItem == null ? new Base[0] : new Base[] {this.referencedItem}; // Reference + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier + case 1195162672: /*additionalIdentifier*/ return this.additionalIdentifier == null ? new Base[0] : this.additionalIdentifier.toArray(new Base[this.additionalIdentifier.size()]); // Identifier + case 382350310: /*classification*/ return this.classification == null ? new Base[0] : this.classification.toArray(new Base[this.classification.size()]); // Identifier + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept + case -1434195053: /*validityPeriod*/ return this.validityPeriod == null ? new Base[0] : new Base[] {this.validityPeriod}; // Period + case 1649733957: /*lastUpdated*/ return this.lastUpdated == null ? new Base[0] : new Base[] {this.lastUpdated}; // DateTimeType + case -1638369886: /*additionalCharacteristic*/ return this.additionalCharacteristic == null ? new Base[0] : this.additionalCharacteristic.toArray(new Base[this.additionalCharacteristic.size()]); // CodeableConcept + case -1622333459: /*additionalClassification*/ return this.additionalClassification == null ? new Base[0] : this.additionalClassification.toArray(new Base[this.additionalClassification.size()]); // CodeableConcept + case 1112702430: /*relatedItem*/ return this.relatedItem == null ? new Base[0] : this.relatedItem.toArray(new Base[this.relatedItem.size()]); // CatalogEntryRelatedItemComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; + case -220463842: // purpose + this.purpose = castToCodeableConcept(value); // CodeableConcept + return value; + case -1896630996: // referencedItem + this.referencedItem = castToReference(value); // Reference + return value; + case -1618432855: // identifier + this.identifier = castToIdentifier(value); // Identifier + return value; + case 1195162672: // additionalIdentifier + this.getAdditionalIdentifier().add(castToIdentifier(value)); // Identifier + return value; + case 382350310: // classification + this.getClassification().add(castToIdentifier(value)); // Identifier + return value; + case -892481550: // status + this.status = castToCodeableConcept(value); // CodeableConcept + return value; + case -1434195053: // validityPeriod + this.validityPeriod = castToPeriod(value); // Period + return value; + case 1649733957: // lastUpdated + this.lastUpdated = castToDateTime(value); // DateTimeType + return value; + case -1638369886: // additionalCharacteristic + this.getAdditionalCharacteristic().add(castToCodeableConcept(value)); // CodeableConcept + return value; + case -1622333459: // additionalClassification + this.getAdditionalClassification().add(castToCodeableConcept(value)); // CodeableConcept + return value; + case 1112702430: // relatedItem + this.getRelatedItem().add((CatalogEntryRelatedItemComponent) value); // CatalogEntryRelatedItemComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("purpose")) { + this.purpose = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("referencedItem")) { + this.referencedItem = castToReference(value); // Reference + } else if (name.equals("identifier")) { + this.identifier = castToIdentifier(value); // Identifier + } else if (name.equals("additionalIdentifier")) { + this.getAdditionalIdentifier().add(castToIdentifier(value)); + } else if (name.equals("classification")) { + this.getClassification().add(castToIdentifier(value)); + } else if (name.equals("status")) { + this.status = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("validityPeriod")) { + this.validityPeriod = castToPeriod(value); // Period + } else if (name.equals("lastUpdated")) { + this.lastUpdated = castToDateTime(value); // DateTimeType + } else if (name.equals("additionalCharacteristic")) { + this.getAdditionalCharacteristic().add(castToCodeableConcept(value)); + } else if (name.equals("additionalClassification")) { + this.getAdditionalClassification().add(castToCodeableConcept(value)); + } else if (name.equals("relatedItem")) { + this.getRelatedItem().add((CatalogEntryRelatedItemComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: return getType(); + case -220463842: return getPurpose(); + case -1896630996: return getReferencedItem(); + case -1618432855: return getIdentifier(); + case 1195162672: return addAdditionalIdentifier(); + case 382350310: return addClassification(); + case -892481550: return getStatus(); + case -1434195053: return getValidityPeriod(); + case 1649733957: return getLastUpdatedElement(); + case -1638369886: return addAdditionalCharacteristic(); + case -1622333459: return addAdditionalClassification(); + case 1112702430: return addRelatedItem(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -220463842: /*purpose*/ return new String[] {"CodeableConcept"}; + case -1896630996: /*referencedItem*/ return new String[] {"Reference"}; + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case 1195162672: /*additionalIdentifier*/ return new String[] {"Identifier"}; + case 382350310: /*classification*/ return new String[] {"Identifier"}; + case -892481550: /*status*/ return new String[] {"CodeableConcept"}; + case -1434195053: /*validityPeriod*/ return new String[] {"Period"}; + case 1649733957: /*lastUpdated*/ return new String[] {"dateTime"}; + case -1638369886: /*additionalCharacteristic*/ return new String[] {"CodeableConcept"}; + case -1622333459: /*additionalClassification*/ return new String[] {"CodeableConcept"}; + case 1112702430: /*relatedItem*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("purpose")) { + this.purpose = new CodeableConcept(); + return this.purpose; + } + else if (name.equals("referencedItem")) { + this.referencedItem = new Reference(); + return this.referencedItem; + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("additionalIdentifier")) { + return addAdditionalIdentifier(); + } + else if (name.equals("classification")) { + return addClassification(); + } + else if (name.equals("status")) { + this.status = new CodeableConcept(); + return this.status; + } + else if (name.equals("validityPeriod")) { + this.validityPeriod = new Period(); + return this.validityPeriod; + } + else if (name.equals("lastUpdated")) { + throw new FHIRException("Cannot call addChild on a primitive type CatalogEntry.lastUpdated"); + } + else if (name.equals("additionalCharacteristic")) { + return addAdditionalCharacteristic(); + } + else if (name.equals("additionalClassification")) { + return addAdditionalClassification(); + } + else if (name.equals("relatedItem")) { + return addRelatedItem(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "CatalogEntry"; + + } + + public CatalogEntry copy() { + CatalogEntry dst = new CatalogEntry(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.purpose = purpose == null ? null : purpose.copy(); + dst.referencedItem = referencedItem == null ? null : referencedItem.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + if (additionalIdentifier != null) { + dst.additionalIdentifier = new ArrayList(); + for (Identifier i : additionalIdentifier) + dst.additionalIdentifier.add(i.copy()); + }; + if (classification != null) { + dst.classification = new ArrayList(); + for (Identifier i : classification) + dst.classification.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy(); + dst.lastUpdated = lastUpdated == null ? null : lastUpdated.copy(); + if (additionalCharacteristic != null) { + dst.additionalCharacteristic = new ArrayList(); + for (CodeableConcept i : additionalCharacteristic) + dst.additionalCharacteristic.add(i.copy()); + }; + if (additionalClassification != null) { + dst.additionalClassification = new ArrayList(); + for (CodeableConcept i : additionalClassification) + dst.additionalClassification.add(i.copy()); + }; + if (relatedItem != null) { + dst.relatedItem = new ArrayList(); + for (CatalogEntryRelatedItemComponent i : relatedItem) + dst.relatedItem.add(i.copy()); + }; + return dst; + } + + protected CatalogEntry typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CatalogEntry)) + return false; + CatalogEntry o = (CatalogEntry) other; + return compareDeep(type, o.type, true) && compareDeep(purpose, o.purpose, true) && compareDeep(referencedItem, o.referencedItem, true) + && compareDeep(identifier, o.identifier, true) && compareDeep(additionalIdentifier, o.additionalIdentifier, true) + && compareDeep(classification, o.classification, true) && compareDeep(status, o.status, true) && compareDeep(validityPeriod, o.validityPeriod, true) + && compareDeep(lastUpdated, o.lastUpdated, true) && compareDeep(additionalCharacteristic, o.additionalCharacteristic, true) + && compareDeep(additionalClassification, o.additionalClassification, true) && compareDeep(relatedItem, o.relatedItem, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CatalogEntry)) + return false; + CatalogEntry o = (CatalogEntry) other; + return compareValues(lastUpdated, o.lastUpdated, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, purpose, referencedItem + , identifier, additionalIdentifier, classification, status, validityPeriod, lastUpdated + , additionalCharacteristic, additionalClassification, relatedItem); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.CatalogEntry; + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ChargeItem.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ChargeItem.java index fdec0d5ebff..49333d1f28e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ChargeItem.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ChargeItem.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Claim.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Claim.java index c4fd94d90e1..871ec3b7e4b 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Claim.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Claim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -2490,10 +2490,17 @@ public class Claim extends DomainResource { @Description(shortDefinition="Is the focal Coverage", formalDefinition="A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) protected BooleanType focal; + /** + * The business identifier for the instance: claim number, pre-determination or pre-authorization number. + */ + @Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: claim number, pre-determination or pre-authorization number." ) + protected Identifier identifier; + /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name = "coverage", type = {Coverage.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Child(name = "coverage", type = {Coverage.class}, order=4, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) protected Reference coverage; @@ -2505,21 +2512,21 @@ public class Claim extends DomainResource { /** * The contract number of a business agreement which describes the terms and conditions. */ - @Child(name = "businessArrangement", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "businessArrangement", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) protected StringType businessArrangement; /** * A list of references from the Insurer to which these services pertain. */ - @Child(name = "preAuthRef", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "preAuthRef", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) protected List preAuthRef; /** * The Coverages adjudication details. */ - @Child(name = "claimResponse", type = {ClaimResponse.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Child(name = "claimResponse", type = {ClaimResponse.class}, order=7, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) protected Reference claimResponse; @@ -2528,7 +2535,7 @@ public class Claim extends DomainResource { */ protected ClaimResponse claimResponseTarget; - private static final long serialVersionUID = -1216535489L; + private static final long serialVersionUID = -1711744215L; /** * Constructor @@ -2637,6 +2644,30 @@ public class Claim extends DomainResource { return this; } + /** + * @return {@link #identifier} (The business identifier for the instance: claim number, pre-determination or pre-authorization number.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InsuranceComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The business identifier for the instance: claim number, pre-determination or pre-authorization number.) + */ + public InsuranceComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + /** * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ @@ -2839,6 +2870,7 @@ public class Claim extends DomainResource { super.listChildren(children); children.add(new Property("sequence", "positiveInt", "Sequence of coverage which serves to provide a link and convey coordination of benefit order.", 0, 1, sequence)); children.add(new Property("focal", "boolean", "A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, 1, focal)); + children.add(new Property("identifier", "Identifier", "The business identifier for the instance: claim number, pre-determination or pre-authorization number.", 0, 1, identifier)); children.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, 1, coverage)); children.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, 1, businessArrangement)); children.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); @@ -2850,6 +2882,7 @@ public class Claim extends DomainResource { switch (_hash) { case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "Sequence of coverage which serves to provide a link and convey coordination of benefit order.", 0, 1, sequence); case 97604197: /*focal*/ return new Property("focal", "boolean", "A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, 1, focal); + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The business identifier for the instance: claim number, pre-determination or pre-authorization number.", 0, 1, identifier); case -351767064: /*coverage*/ return new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, 1, coverage); case 259920682: /*businessArrangement*/ return new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, 1, businessArrangement); case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef); @@ -2864,6 +2897,7 @@ public class Claim extends DomainResource { switch (hash) { case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType case 97604197: /*focal*/ return this.focal == null ? new Base[0] : new Base[] {this.focal}; // BooleanType + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference case 259920682: /*businessArrangement*/ return this.businessArrangement == null ? new Base[0] : new Base[] {this.businessArrangement}; // StringType case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : this.preAuthRef.toArray(new Base[this.preAuthRef.size()]); // StringType @@ -2882,6 +2916,9 @@ public class Claim extends DomainResource { case 97604197: // focal this.focal = castToBoolean(value); // BooleanType return value; + case -1618432855: // identifier + this.identifier = castToIdentifier(value); // Identifier + return value; case -351767064: // coverage this.coverage = castToReference(value); // Reference return value; @@ -2905,6 +2942,8 @@ public class Claim extends DomainResource { this.sequence = castToPositiveInt(value); // PositiveIntType } else if (name.equals("focal")) { this.focal = castToBoolean(value); // BooleanType + } else if (name.equals("identifier")) { + this.identifier = castToIdentifier(value); // Identifier } else if (name.equals("coverage")) { this.coverage = castToReference(value); // Reference } else if (name.equals("businessArrangement")) { @@ -2923,6 +2962,7 @@ public class Claim extends DomainResource { switch (hash) { case 1349547969: return getSequenceElement(); case 97604197: return getFocalElement(); + case -1618432855: return getIdentifier(); case -351767064: return getCoverage(); case 259920682: return getBusinessArrangementElement(); case 522246568: return addPreAuthRefElement(); @@ -2937,6 +2977,7 @@ public class Claim extends DomainResource { switch (hash) { case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; case 97604197: /*focal*/ return new String[] {"boolean"}; + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; case -351767064: /*coverage*/ return new String[] {"Reference"}; case 259920682: /*businessArrangement*/ return new String[] {"string"}; case 522246568: /*preAuthRef*/ return new String[] {"string"}; @@ -2954,6 +2995,10 @@ public class Claim extends DomainResource { else if (name.equals("focal")) { throw new FHIRException("Cannot call addChild on a primitive type Claim.focal"); } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } else if (name.equals("coverage")) { this.coverage = new Reference(); return this.coverage; @@ -2977,6 +3022,7 @@ public class Claim extends DomainResource { copyValues(dst); dst.sequence = sequence == null ? null : sequence.copy(); dst.focal = focal == null ? null : focal.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); dst.coverage = coverage == null ? null : coverage.copy(); dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); if (preAuthRef != null) { @@ -2995,9 +3041,10 @@ public class Claim extends DomainResource { if (!(other instanceof InsuranceComponent)) return false; InsuranceComponent o = (InsuranceComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(preAuthRef, o.preAuthRef, true) - && compareDeep(claimResponse, o.claimResponse, true); + return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(coverage, o.coverage, true) && compareDeep(businessArrangement, o.businessArrangement, true) + && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true) + ; } @Override @@ -3012,8 +3059,8 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, focal, coverage - , businessArrangement, preAuthRef, claimResponse); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, focal, identifier + , coverage, businessArrangement, preAuthRef, claimResponse); } public String fhirType() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClaimResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClaimResponse.java index 926b1eaacb6..e0f8cc354c9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClaimResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClaimResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -174,6 +174,114 @@ public class ClaimResponse extends DomainResource { } } + public enum RemittanceOutcome { + /** + * The processing has completed without errors + */ + COMPLETE, + /** + * One or more errors have been detected in the Claim + */ + ERROR, + /** + * No errors have been detected in the Claim and some of the adjudication has been performed. + */ + PARTIAL, + /** + * added to help the parsers with the generic types + */ + NULL; + public static RemittanceOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("error".equals(codeString)) + return ERROR; + if ("partial".equals(codeString)) + return PARTIAL; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case ERROR: return "error"; + case PARTIAL: return "partial"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPLETE: return "http://hl7.org/fhir/remittance-outcome"; + case ERROR: return "http://hl7.org/fhir/remittance-outcome"; + case PARTIAL: return "http://hl7.org/fhir/remittance-outcome"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The processing has completed without errors"; + case ERROR: return "One or more errors have been detected in the Claim"; + case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Processing Complete"; + case ERROR: return "Error"; + case PARTIAL: return "Partial Processing"; + default: return "?"; + } + } + } + + public static class RemittanceOutcomeEnumFactory implements EnumFactory { + public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return RemittanceOutcome.COMPLETE; + if ("error".equals(codeString)) + return RemittanceOutcome.ERROR; + if ("partial".equals(codeString)) + return RemittanceOutcome.PARTIAL; + throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.COMPLETE); + if ("error".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.ERROR); + if ("partial".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.PARTIAL); + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode(RemittanceOutcome code) { + if (code == RemittanceOutcome.COMPLETE) + return "complete"; + if (code == RemittanceOutcome.ERROR) + return "error"; + if (code == RemittanceOutcome.PARTIAL) + return "partial"; + return "?"; + } + public String toSystem(RemittanceOutcome code) { + return code.getSystem(); + } + } + @Block() public static class ItemComponent extends BackboneElement implements IBaseBackboneElement { /** @@ -3201,10 +3309,10 @@ public class ClaimResponse extends DomainResource { /** * The note purpose: Print/Display. */ - @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Child(name = "type", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") - protected CodeableConcept type; + protected Enumeration type; /** * The note text. @@ -3221,7 +3329,7 @@ public class ClaimResponse extends DomainResource { @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") protected CodeableConcept language; - private static final long serialVersionUID = -944255449L; + private static final long serialVersionUID = -385184277L; /** * Constructor @@ -3276,29 +3384,54 @@ public class ClaimResponse extends DomainResource { } /** - * @return {@link #type} (The note purpose: Print/Display.) + * @return {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public CodeableConcept getType() { + public Enumeration getTypeElement() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create NoteComponent.type"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc + this.type = new Enumeration(new NoteTypeEnumFactory()); // bb return this.type; } + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + public boolean hasType() { return this.type != null && !this.type.isEmpty(); } /** - * @param value {@link #type} (The note purpose: Print/Display.) + * @param value {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public NoteComponent setType(CodeableConcept value) { + public NoteComponent setTypeElement(Enumeration value) { this.type = value; return this; } + /** + * @return The note purpose: Print/Display. + */ + public NoteType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The note purpose: Print/Display. + */ + public NoteComponent setType(NoteType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new NoteTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + /** * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ @@ -3375,7 +3508,7 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, 1, number)); - children.add(new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type)); + children.add(new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type)); children.add(new Property("text", "string", "The note text.", 0, 1, text)); children.add(new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, 1, language)); } @@ -3384,7 +3517,7 @@ public class ClaimResponse extends DomainResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case -1034364087: /*number*/ return new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, 1, number); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type); + case 3575610: /*type*/ return new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type); case 3556653: /*text*/ return new Property("text", "string", "The note text.", 0, 1, text); case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, 1, language); default: return super.getNamedProperty(_hash, _name, _checkValid); @@ -3396,7 +3529,7 @@ public class ClaimResponse extends DomainResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // PositiveIntType - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept default: return super.getProperty(hash, name, checkValid); @@ -3411,7 +3544,8 @@ public class ClaimResponse extends DomainResource { this.number = castToPositiveInt(value); // PositiveIntType return value; case 3575610: // type - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration return value; case 3556653: // text this.text = castToString(value); // StringType @@ -3429,7 +3563,8 @@ public class ClaimResponse extends DomainResource { if (name.equals("number")) { this.number = castToPositiveInt(value); // PositiveIntType } else if (name.equals("type")) { - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration } else if (name.equals("text")) { this.text = castToString(value); // StringType } else if (name.equals("language")) { @@ -3443,7 +3578,7 @@ public class ClaimResponse extends DomainResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -1034364087: return getNumberElement(); - case 3575610: return getType(); + case 3575610: return getTypeElement(); case 3556653: return getTextElement(); case -1613589672: return getLanguage(); default: return super.makeProperty(hash, name); @@ -3455,7 +3590,7 @@ public class ClaimResponse extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case -1034364087: /*number*/ return new String[] {"positiveInt"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"code"}; case 3556653: /*text*/ return new String[] {"string"}; case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; default: return super.getTypesForProperty(hash, name); @@ -3469,8 +3604,7 @@ public class ClaimResponse extends DomainResource { throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.number"); } else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.type"); } else if (name.equals("text")) { throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.text"); @@ -3511,7 +3645,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof NoteComponent)) return false; NoteComponent o = (NoteComponent) other; - return compareValues(number, o.number, true) && compareValues(text, o.text, true); + return compareValues(number, o.number, true) && compareValues(type, o.type, true) && compareValues(text, o.text, true) + ; } public boolean isEmpty() { @@ -4158,12 +4293,12 @@ public class ClaimResponse extends DomainResource { protected Claim requestTarget; /** - * Processing outcome errror, partial or complete processing. + * Transaction: error, complete, partial processing. */ - @Child(name = "outcome", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="complete | error | partial", formalDefinition="Processing outcome errror, partial or complete processing." ) + @Child(name = "outcome", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="complete | error | partial", formalDefinition="Transaction: error, complete, partial processing." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") - protected CodeableConcept outcome; + protected Enumeration outcome; /** * A description of the status of the adjudication. @@ -4271,7 +4406,7 @@ public class ClaimResponse extends DomainResource { @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List insurance; - private static final long serialVersionUID = -488591755L; + private static final long serialVersionUID = 676985103L; /** * Constructor @@ -4652,29 +4787,54 @@ public class ClaimResponse extends DomainResource { } /** - * @return {@link #outcome} (Processing outcome errror, partial or complete processing.) + * @return {@link #outcome} (Transaction: error, complete, partial processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public CodeableConcept getOutcome() { + public Enumeration getOutcomeElement() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ClaimResponse.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb return this.outcome; } + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (Processing outcome errror, partial or complete processing.) + * @param value {@link #outcome} (Transaction: error, complete, partial processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public ClaimResponse setOutcome(CodeableConcept value) { + public ClaimResponse setOutcomeElement(Enumeration value) { this.outcome = value; return this; } + /** + * @return Transaction: error, complete, partial processing. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction: error, complete, partial processing. + */ + public ClaimResponse setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + /** * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value */ @@ -5242,7 +5402,7 @@ public class ClaimResponse extends DomainResource { children.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); children.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization)); children.add(new Property("request", "Reference(Claim)", "Original request resource referrence.", 0, 1, request)); - children.add(new Property("outcome", "CodeableConcept", "Processing outcome errror, partial or complete processing.", 0, 1, outcome)); + children.add(new Property("outcome", "code", "Transaction: error, complete, partial processing.", 0, 1, outcome)); children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); children.add(new Property("payeeType", "CodeableConcept", "Party to be reimbursed: Subscriber, provider, other.", 0, 1, payeeType)); children.add(new Property("item", "", "The first tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, item)); @@ -5270,7 +5430,7 @@ public class ClaimResponse extends DomainResource { case 1601527200: /*requestProvider*/ return new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider); case 599053666: /*requestOrganization*/ return new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization); case 1095692943: /*request*/ return new Property("request", "Reference(Claim)", "Original request resource referrence.", 0, 1, request); - case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Processing outcome errror, partial or complete processing.", 0, 1, outcome); + case -1106507950: /*outcome*/ return new Property("outcome", "code", "Transaction: error, complete, partial processing.", 0, 1, outcome); case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); case -316321118: /*payeeType*/ return new Property("payeeType", "CodeableConcept", "Party to be reimbursed: Subscriber, provider, other.", 0, 1, payeeType); case 3242771: /*item*/ return new Property("item", "", "The first tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, item); @@ -5301,7 +5461,7 @@ public class ClaimResponse extends DomainResource { case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference - case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept + case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType case -316321118: /*payeeType*/ return this.payeeType == null ? new Base[0] : new Base[] {this.payeeType}; // CodeableConcept case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemComponent @@ -5350,7 +5510,8 @@ public class ClaimResponse extends DomainResource { this.request = castToReference(value); // Reference return value; case -1106507950: // outcome - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration return value; case 583380919: // disposition this.disposition = castToString(value); // StringType @@ -5419,7 +5580,8 @@ public class ClaimResponse extends DomainResource { } else if (name.equals("request")) { this.request = castToReference(value); // Reference } else if (name.equals("outcome")) { - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration } else if (name.equals("disposition")) { this.disposition = castToString(value); // StringType } else if (name.equals("payeeType")) { @@ -5464,7 +5626,7 @@ public class ClaimResponse extends DomainResource { case 1601527200: return getRequestProvider(); case 599053666: return getRequestOrganization(); case 1095692943: return getRequest(); - case -1106507950: return getOutcome(); + case -1106507950: return getOutcomeElement(); case 583380919: return getDispositionElement(); case -316321118: return getPayeeType(); case 3242771: return addItem(); @@ -5495,7 +5657,7 @@ public class ClaimResponse extends DomainResource { case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; case 599053666: /*requestOrganization*/ return new String[] {"Reference"}; case 1095692943: /*request*/ return new String[] {"Reference"}; - case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; + case -1106507950: /*outcome*/ return new String[] {"code"}; case 583380919: /*disposition*/ return new String[] {"string"}; case -316321118: /*payeeType*/ return new String[] {"CodeableConcept"}; case 3242771: /*item*/ return new String[] {}; @@ -5547,8 +5709,7 @@ public class ClaimResponse extends DomainResource { return this.request; } else if (name.equals("outcome")) { - this.outcome = new CodeableConcept(); - return this.outcome; + throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.outcome"); } else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.disposition"); @@ -5694,8 +5855,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof ClaimResponse)) return false; ClaimResponse o = (ClaimResponse) other; - return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) - ; + return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) + && compareValues(disposition, o.disposition, true); } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClinicalImpression.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClinicalImpression.java index 0c5312b0c18..af86ea8c8da 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClinicalImpression.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ClinicalImpression.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeSystem.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeSystem.java index 9799561b2f8..ea4726edd31 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeSystem.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeSystem.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeableConcept.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeableConcept.java index 9a6d5ed33ae..a1c944effad 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeableConcept.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CodeableConcept.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coding.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coding.java index e4fa8e877ab..03bfb744b33 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coding.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coding.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -513,6 +513,7 @@ public class Coding extends Type implements IBaseCoding, ICompositeType, ICoding , userSelected); } +// added from java-adornments.txt: @Override public boolean supportsVersion() { return true; @@ -524,5 +525,7 @@ public class Coding extends Type implements IBaseCoding, ICompositeType, ICoding } +// end addition + } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Communication.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Communication.java index f830f7a7647..af03dd97901 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Communication.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Communication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CommunicationRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CommunicationRequest.java index 8bba5b29649..50077dd714e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CommunicationRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CommunicationRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CompartmentDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CompartmentDefinition.java index 171855da9fb..0acbe9de428 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CompartmentDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/CompartmentDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Composition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Composition.java index bcf6efcdd8d..aa175156227 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Composition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Composition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -704,7 +704,7 @@ public class Composition extends DomainResource { /** * Who attested the composition in the specified way. */ - @Child(name = "party", type = {Patient.class, Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "party", type = {Patient.class, Practitioner.class, PractitionerRole.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Who attested the composition", formalDefinition="Who attested the composition in the specified way." ) protected Reference party; @@ -875,7 +875,7 @@ public class Composition extends DomainResource { super.listChildren(children); children.add(new Property("mode", "code", "The type of attestation the authenticator offers.", 0, java.lang.Integer.MAX_VALUE, mode)); children.add(new Property("time", "dateTime", "When the composition was attested by the party.", 0, 1, time)); - children.add(new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, 1, party)); + children.add(new Property("party", "Reference(Patient|Practitioner|PractitionerRole|Organization)", "Who attested the composition in the specified way.", 0, 1, party)); } @Override @@ -883,7 +883,7 @@ public class Composition extends DomainResource { switch (_hash) { case 3357091: /*mode*/ return new Property("mode", "code", "The type of attestation the authenticator offers.", 0, java.lang.Integer.MAX_VALUE, mode); case 3560141: /*time*/ return new Property("time", "dateTime", "When the composition was attested by the party.", 0, 1, time); - case 106437350: /*party*/ return new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, 1, party); + case 106437350: /*party*/ return new Property("party", "Reference(Patient|Practitioner|PractitionerRole|Organization)", "Who attested the composition in the specified way.", 0, 1, party); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -2271,7 +2271,7 @@ public class Composition extends DomainResource { /** * Identifies who is responsible for the information in the composition, not necessarily who typed it in. */ - @Child(name = "author", type = {Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "author", type = {Practitioner.class, PractitionerRole.class, Device.class, Patient.class, RelatedPerson.class}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition, not necessarily who typed it in." ) protected List author; /** @@ -3023,7 +3023,7 @@ public class Composition extends DomainResource { children.add(new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, 1, subject)); children.add(new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, 1, encounter)); children.add(new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, 1, date)); - children.add(new Property("author", "Reference(Practitioner|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author)); + children.add(new Property("author", "Reference(Practitioner|PractitionerRole|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author)); children.add(new Property("title", "string", "Official human-readable label for the composition.", 0, 1, title)); children.add(new Property("confidentiality", "code", "The code specifying the level of confidentiality of the Composition.", 0, 1, confidentiality)); children.add(new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester)); @@ -3043,7 +3043,7 @@ public class Composition extends DomainResource { case -1867885268: /*subject*/ return new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, 1, subject); case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, 1, encounter); case 3076014: /*date*/ return new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, 1, date); - case -1406328437: /*author*/ return new Property("author", "Reference(Practitioner|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author); + case -1406328437: /*author*/ return new Property("author", "Reference(Practitioner|PractitionerRole|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author); case 110371416: /*title*/ return new Property("title", "string", "Official human-readable label for the composition.", 0, 1, title); case -1923018202: /*confidentiality*/ return new Property("confidentiality", "code", "The code specifying the level of confidentiality of the Composition.", 0, 1, confidentiality); case 542920370: /*attester*/ return new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester); @@ -3477,7 +3477,7 @@ public class Composition extends DomainResource { * Path: Composition.author
*

*/ - @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Patient.class, Practitioner.class, RelatedPerson.class } ) + @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author @@ -3609,7 +3609,7 @@ public class Composition extends DomainResource { * Path: Composition.attester.party
*

*/ - @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Patient.class, Practitioner.class } ) + @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } ) public static final String SP_ATTESTER = "attester"; /** * Fluent Client search parameter constant for attester diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ConceptMap.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ConceptMap.java index c70f0356d57..a4e3f28009b 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ConceptMap.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ConceptMap.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Condition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Condition.java index a74ac5dd41e..43d435d63ea 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Condition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Condition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Consent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Consent.java index 6c5ad9db18e..d3105296692 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Consent.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Consent.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1017,10 +1017,10 @@ public class Consent extends DomainResource { protected List action; /** - * A set of security labels that define which resources are controlled by this rule. If more than one label is specified, all resources must have all the specified labels. + * A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception. */ @Child(name = "securityLabel", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Security Labels that define affected resources", formalDefinition="A set of security labels that define which resources are controlled by this rule. If more than one label is specified, all resources must have all the specified labels." ) + @Description(shortDefinition="Security Labels that define affected resources", formalDefinition="A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-labels") protected List securityLabel; @@ -1258,7 +1258,7 @@ public class Consent extends DomainResource { } /** - * @return {@link #securityLabel} (A set of security labels that define which resources are controlled by this rule. If more than one label is specified, all resources must have all the specified labels.) + * @return {@link #securityLabel} (A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.) */ public List getSecurityLabel() { if (this.securityLabel == null) @@ -1605,7 +1605,7 @@ public class Consent extends DomainResource { children.add(new Property("period", "Period", "The timeframe in this rule is valid.", 0, 1, period)); children.add(new Property("actor", "", "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", 0, java.lang.Integer.MAX_VALUE, actor)); children.add(new Property("action", "CodeableConcept", "Actions controlled by this Rule.", 0, java.lang.Integer.MAX_VALUE, action)); - children.add(new Property("securityLabel", "Coding", "A set of security labels that define which resources are controlled by this rule. If more than one label is specified, all resources must have all the specified labels.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); + children.add(new Property("securityLabel", "Coding", "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); children.add(new Property("purpose", "Coding", "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", 0, java.lang.Integer.MAX_VALUE, purpose)); children.add(new Property("class", "Coding", "The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", 0, java.lang.Integer.MAX_VALUE, class_)); children.add(new Property("code", "Coding", "If this code is found in an instance, then the rule applies.", 0, java.lang.Integer.MAX_VALUE, code)); @@ -1621,7 +1621,7 @@ public class Consent extends DomainResource { case -991726143: /*period*/ return new Property("period", "Period", "The timeframe in this rule is valid.", 0, 1, period); case 92645877: /*actor*/ return new Property("actor", "", "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", 0, java.lang.Integer.MAX_VALUE, actor); case -1422950858: /*action*/ return new Property("action", "CodeableConcept", "Actions controlled by this Rule.", 0, java.lang.Integer.MAX_VALUE, action); - case -722296940: /*securityLabel*/ return new Property("securityLabel", "Coding", "A set of security labels that define which resources are controlled by this rule. If more than one label is specified, all resources must have all the specified labels.", 0, java.lang.Integer.MAX_VALUE, securityLabel); + case -722296940: /*securityLabel*/ return new Property("securityLabel", "Coding", "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.", 0, java.lang.Integer.MAX_VALUE, securityLabel); case -220463842: /*purpose*/ return new Property("purpose", "Coding", "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", 0, java.lang.Integer.MAX_VALUE, purpose); case 94742904: /*class*/ return new Property("class", "Coding", "The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", 0, java.lang.Integer.MAX_VALUE, class_); case 3059181: /*code*/ return new Property("code", "Coding", "If this code is found in an instance, then the rule applies.", 0, java.lang.Integer.MAX_VALUE, code); @@ -2444,11 +2444,12 @@ public class Consent extends DomainResource { protected List policy; /** - * A referece to the specific computable policy. + * A reference to the specific base computable policy. */ - @Child(name = "policyRule", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Policy that this consents to", formalDefinition="A referece to the specific computable policy." ) - protected UriType policyRule; + @Child(name = "policyRule", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Policy that this consents to", formalDefinition="A reference to the specific base computable policy." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ActConsentDirective") + protected CodeableConcept policyRule; /** * Whether a treatment instruction (e.g. artifical respiration yes or no) was verified with the patient, his/her family or another authorized person. @@ -2461,10 +2462,10 @@ public class Consent extends DomainResource { * An exception to the base policy of this consent. An exception can be an addition or removal of access permissions. */ @Child(name = "provision", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Consent provision - addition or removal of permissions", formalDefinition="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." ) + @Description(shortDefinition="Constraints to the base Consent.policyRule", formalDefinition="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." ) protected List provision; - private static final long serialVersionUID = -79499195L; + private static final long serialVersionUID = -83391542L; /** * Constructor @@ -2947,54 +2948,29 @@ public class Consent extends DomainResource { } /** - * @return {@link #policyRule} (A referece to the specific computable policy.). This is the underlying object with id, value and extensions. The accessor "getPolicyRule" gives direct access to the value + * @return {@link #policyRule} (A reference to the specific base computable policy.) */ - public UriType getPolicyRuleElement() { + public CodeableConcept getPolicyRule() { if (this.policyRule == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Consent.policyRule"); else if (Configuration.doAutoCreate()) - this.policyRule = new UriType(); // bb + this.policyRule = new CodeableConcept(); // cc return this.policyRule; } - public boolean hasPolicyRuleElement() { - return this.policyRule != null && !this.policyRule.isEmpty(); - } - public boolean hasPolicyRule() { return this.policyRule != null && !this.policyRule.isEmpty(); } /** - * @param value {@link #policyRule} (A referece to the specific computable policy.). This is the underlying object with id, value and extensions. The accessor "getPolicyRule" gives direct access to the value + * @param value {@link #policyRule} (A reference to the specific base computable policy.) */ - public Consent setPolicyRuleElement(UriType value) { + public Consent setPolicyRule(CodeableConcept value) { this.policyRule = value; return this; } - /** - * @return A referece to the specific computable policy. - */ - public String getPolicyRule() { - return this.policyRule == null ? null : this.policyRule.getValue(); - } - - /** - * @param value A referece to the specific computable policy. - */ - public Consent setPolicyRule(String value) { - if (Utilities.noString(value)) - this.policyRule = null; - else { - if (this.policyRule == null) - this.policyRule = new UriType(); - this.policyRule.setValue(value); - } - return this; - } - /** * @return {@link #verification} (Whether a treatment instruction (e.g. artifical respiration yes or no) was verified with the patient, his/her family or another authorized person.) */ @@ -3112,7 +3088,7 @@ public class Consent extends DomainResource { children.add(new Property("organization", "Reference(Organization)", "The organization that manages the consent, and the framework within which it is executed.", 0, java.lang.Integer.MAX_VALUE, organization)); children.add(new Property("source[x]", "Attachment|Identifier|Reference(Consent|DocumentReference|Contract|QuestionnaireResponse)", "The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", 0, 1, source)); children.add(new Property("policy", "", "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", 0, java.lang.Integer.MAX_VALUE, policy)); - children.add(new Property("policyRule", "uri", "A referece to the specific computable policy.", 0, 1, policyRule)); + children.add(new Property("policyRule", "CodeableConcept", "A reference to the specific base computable policy.", 0, 1, policyRule)); children.add(new Property("verification", "", "Whether a treatment instruction (e.g. artifical respiration yes or no) was verified with the patient, his/her family or another authorized person.", 0, java.lang.Integer.MAX_VALUE, verification)); children.add(new Property("provision", "", "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.", 0, java.lang.Integer.MAX_VALUE, provision)); } @@ -3133,7 +3109,7 @@ public class Consent extends DomainResource { case -1985492188: /*sourceIdentifier*/ return new Property("source[x]", "Attachment|Identifier|Reference(Consent|DocumentReference|Contract|QuestionnaireResponse)", "The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", 0, 1, source); case -244259472: /*sourceReference*/ return new Property("source[x]", "Attachment|Identifier|Reference(Consent|DocumentReference|Contract|QuestionnaireResponse)", "The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", 0, 1, source); case -982670030: /*policy*/ return new Property("policy", "", "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", 0, java.lang.Integer.MAX_VALUE, policy); - case 1593493326: /*policyRule*/ return new Property("policyRule", "uri", "A referece to the specific computable policy.", 0, 1, policyRule); + case 1593493326: /*policyRule*/ return new Property("policyRule", "CodeableConcept", "A reference to the specific base computable policy.", 0, 1, policyRule); case -1484401125: /*verification*/ return new Property("verification", "", "Whether a treatment instruction (e.g. artifical respiration yes or no) was verified with the patient, his/her family or another authorized person.", 0, java.lang.Integer.MAX_VALUE, verification); case -547120939: /*provision*/ return new Property("provision", "", "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.", 0, java.lang.Integer.MAX_VALUE, provision); default: return super.getNamedProperty(_hash, _name, _checkValid); @@ -3153,7 +3129,7 @@ public class Consent extends DomainResource { case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : this.organization.toArray(new Base[this.organization.size()]); // Reference case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Type case -982670030: /*policy*/ return this.policy == null ? new Base[0] : this.policy.toArray(new Base[this.policy.size()]); // ConsentPolicyComponent - case 1593493326: /*policyRule*/ return this.policyRule == null ? new Base[0] : new Base[] {this.policyRule}; // UriType + case 1593493326: /*policyRule*/ return this.policyRule == null ? new Base[0] : new Base[] {this.policyRule}; // CodeableConcept case -1484401125: /*verification*/ return this.verification == null ? new Base[0] : this.verification.toArray(new Base[this.verification.size()]); // ConsentVerificationComponent case -547120939: /*provision*/ return this.provision == null ? new Base[0] : this.provision.toArray(new Base[this.provision.size()]); // provisionComponent default: return super.getProperty(hash, name, checkValid); @@ -3193,7 +3169,7 @@ public class Consent extends DomainResource { this.getPolicy().add((ConsentPolicyComponent) value); // ConsentPolicyComponent return value; case 1593493326: // policyRule - this.policyRule = castToUri(value); // UriType + this.policyRule = castToCodeableConcept(value); // CodeableConcept return value; case -1484401125: // verification this.getVerification().add((ConsentVerificationComponent) value); // ConsentVerificationComponent @@ -3228,7 +3204,7 @@ public class Consent extends DomainResource { } else if (name.equals("policy")) { this.getPolicy().add((ConsentPolicyComponent) value); } else if (name.equals("policyRule")) { - this.policyRule = castToUri(value); // UriType + this.policyRule = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("verification")) { this.getVerification().add((ConsentVerificationComponent) value); } else if (name.equals("provision")) { @@ -3251,7 +3227,7 @@ public class Consent extends DomainResource { case -1698413947: return getSource(); case -896505829: return getSource(); case -982670030: return addPolicy(); - case 1593493326: return getPolicyRuleElement(); + case 1593493326: return getPolicyRule(); case -1484401125: return addVerification(); case -547120939: return addProvision(); default: return super.makeProperty(hash, name); @@ -3271,7 +3247,7 @@ public class Consent extends DomainResource { case 1178922291: /*organization*/ return new String[] {"Reference"}; case -896505829: /*source*/ return new String[] {"Attachment", "Identifier", "Reference"}; case -982670030: /*policy*/ return new String[] {}; - case 1593493326: /*policyRule*/ return new String[] {"uri"}; + case 1593493326: /*policyRule*/ return new String[] {"CodeableConcept"}; case -1484401125: /*verification*/ return new String[] {}; case -547120939: /*provision*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); @@ -3320,7 +3296,8 @@ public class Consent extends DomainResource { return addPolicy(); } else if (name.equals("policyRule")) { - throw new FHIRException("Cannot call addChild on a primitive type Consent.policyRule"); + this.policyRule = new CodeableConcept(); + return this.policyRule; } else if (name.equals("verification")) { return addVerification(); @@ -3404,8 +3381,7 @@ public class Consent extends DomainResource { if (!(other instanceof Consent)) return false; Consent o = (Consent) other; - return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true) && compareValues(policyRule, o.policyRule, true) - ; + return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true); } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Constants.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Constants.java index 2b96ffe0b28..382d182fa3e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Constants.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Constants.java @@ -29,12 +29,12 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 public class Constants { public final static String VERSION = "3.1.0"; - public final static String REVISION = "12192"; - public final static String DATE = "Sat Jul 08 23:19:48 AEST 2017"; + public final static String REVISION = "12370"; + public final static String DATE = "Sat Sep 23 17:56:09 EDT 2017"; } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactDetail.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactDetail.java index 9f31fd26f45..338b3895356 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactDetail.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactDetail.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactPoint.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactPoint.java index 997c42e801a..cc78f8e3c01 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactPoint.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ContactPoint.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contract.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contract.java index 1a8c0efd72f..7a72085c969 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contract.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contract.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contributor.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contributor.java index aaf3bab1ca8..292eb41d984 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contributor.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Contributor.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Count.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Count.java index b2c725dd57d..a52ffd326c5 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Count.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Count.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coverage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coverage.java index 575266c97de..98b14a577c6 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coverage.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Coverage.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DataRequirement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DataRequirement.java index 0516f7c3691..99222feb049 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DataRequirement.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DataRequirement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -58,34 +58,20 @@ public class DataRequirement extends Type implements ICompositeType { protected StringType path; /** - * The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. + * The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. */ - @Child(name = "valueSet", type = {StringType.class, ValueSet.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Valueset for the filter", formalDefinition="The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset." ) + @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Valueset for the filter", formalDefinition="The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset." ) protected Type valueSet; /** - * The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. + * The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes. */ - @Child(name = "valueCode", type = {CodeType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="What code is expected", formalDefinition="The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes." ) - protected List valueCode; + @Child(name = "code", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="What code is expected", formalDefinition="The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes." ) + protected List code; - /** - * The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings. - */ - @Child(name = "valueCoding", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="What Coding is expected", formalDefinition="The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings." ) - protected List valueCoding; - - /** - * The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts. - */ - @Child(name = "valueCodeableConcept", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="What CodeableConcept is expected", formalDefinition="The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts." ) - protected List valueCodeableConcept; - - private static final long serialVersionUID = -888422840L; + private static final long serialVersionUID = -1836756746L; /** * Constructor @@ -148,27 +134,27 @@ public class DataRequirement extends Type implements ICompositeType { } /** - * @return {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + * @return {@link #valueSet} (The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) */ public Type getValueSet() { return this.valueSet; } /** - * @return {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + * @return {@link #valueSet} (The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) */ - public StringType getValueSetStringType() throws FHIRException { - if (!(this.valueSet instanceof StringType)) - throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); - return (StringType) this.valueSet; + public UriType getValueSetUriType() throws FHIRException { + if (!(this.valueSet instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (UriType) this.valueSet; } - public boolean hasValueSetStringType() { - return this.valueSet instanceof StringType; + public boolean hasValueSetUriType() { + return this.valueSet instanceof UriType; } /** - * @return {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + * @return {@link #valueSet} (The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) */ public Reference getValueSetReference() throws FHIRException { if (!(this.valueSet instanceof Reference)) @@ -185,7 +171,7 @@ public class DataRequirement extends Type implements ICompositeType { } /** - * @param value {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + * @param value {@link #valueSet} (The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) */ public DataRequirementCodeFilterComponent setValueSet(Type value) { this.valueSet = value; @@ -193,192 +179,74 @@ public class DataRequirement extends Type implements ICompositeType { } /** - * @return {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) + * @return {@link #code} (The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.) */ - public List getValueCode() { - if (this.valueCode == null) - this.valueCode = new ArrayList(); - return this.valueCode; + public List getCode() { + if (this.code == null) + this.code = new ArrayList(); + return this.code; } /** * @return Returns a reference to this for easy method chaining */ - public DataRequirementCodeFilterComponent setValueCode(List theValueCode) { - this.valueCode = theValueCode; + public DataRequirementCodeFilterComponent setCode(List theCode) { + this.code = theCode; return this; } - public boolean hasValueCode() { - if (this.valueCode == null) + public boolean hasCode() { + if (this.code == null) return false; - for (CodeType item : this.valueCode) + for (Coding item : this.code) if (!item.isEmpty()) return true; return false; } - /** - * @return {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) - */ - public CodeType addValueCodeElement() {//2 - CodeType t = new CodeType(); - if (this.valueCode == null) - this.valueCode = new ArrayList(); - this.valueCode.add(t); - return t; - } - - /** - * @param value {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) - */ - public DataRequirementCodeFilterComponent addValueCode(String value) { //1 - CodeType t = new CodeType(); - t.setValue(value); - if (this.valueCode == null) - this.valueCode = new ArrayList(); - this.valueCode.add(t); - return this; - } - - /** - * @param value {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) - */ - public boolean hasValueCode(String value) { - if (this.valueCode == null) - return false; - for (CodeType v : this.valueCode) - if (v.equals(value)) // code - return true; - return false; - } - - /** - * @return {@link #valueCoding} (The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.) - */ - public List getValueCoding() { - if (this.valueCoding == null) - this.valueCoding = new ArrayList(); - return this.valueCoding; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public DataRequirementCodeFilterComponent setValueCoding(List theValueCoding) { - this.valueCoding = theValueCoding; - return this; - } - - public boolean hasValueCoding() { - if (this.valueCoding == null) - return false; - for (Coding item : this.valueCoding) - if (!item.isEmpty()) - return true; - return false; - } - - public Coding addValueCoding() { //3 + public Coding addCode() { //3 Coding t = new Coding(); - if (this.valueCoding == null) - this.valueCoding = new ArrayList(); - this.valueCoding.add(t); + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); return t; } - public DataRequirementCodeFilterComponent addValueCoding(Coding t) { //3 + public DataRequirementCodeFilterComponent addCode(Coding t) { //3 if (t == null) return this; - if (this.valueCoding == null) - this.valueCoding = new ArrayList(); - this.valueCoding.add(t); + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); return this; } /** - * @return The first repetition of repeating field {@link #valueCoding}, creating it if it does not already exist + * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist */ - public Coding getValueCodingFirstRep() { - if (getValueCoding().isEmpty()) { - addValueCoding(); + public Coding getCodeFirstRep() { + if (getCode().isEmpty()) { + addCode(); } - return getValueCoding().get(0); - } - - /** - * @return {@link #valueCodeableConcept} (The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.) - */ - public List getValueCodeableConcept() { - if (this.valueCodeableConcept == null) - this.valueCodeableConcept = new ArrayList(); - return this.valueCodeableConcept; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public DataRequirementCodeFilterComponent setValueCodeableConcept(List theValueCodeableConcept) { - this.valueCodeableConcept = theValueCodeableConcept; - return this; - } - - public boolean hasValueCodeableConcept() { - if (this.valueCodeableConcept == null) - return false; - for (CodeableConcept item : this.valueCodeableConcept) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addValueCodeableConcept() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.valueCodeableConcept == null) - this.valueCodeableConcept = new ArrayList(); - this.valueCodeableConcept.add(t); - return t; - } - - public DataRequirementCodeFilterComponent addValueCodeableConcept(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.valueCodeableConcept == null) - this.valueCodeableConcept = new ArrayList(); - this.valueCodeableConcept.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #valueCodeableConcept}, creating it if it does not already exist - */ - public CodeableConcept getValueCodeableConceptFirstRep() { - if (getValueCodeableConcept().isEmpty()) { - addValueCodeableConcept(); - } - return getValueCodeableConcept().get(0); + return getCode().get(0); } protected void listChildren(List children) { super.listChildren(children); children.add(new Property("path", "string", "The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", 0, 1, path)); - children.add(new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet)); - children.add(new Property("valueCode", "code", "The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.", 0, java.lang.Integer.MAX_VALUE, valueCode)); - children.add(new Property("valueCoding", "Coding", "The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.", 0, java.lang.Integer.MAX_VALUE, valueCoding)); - children.add(new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept)); + children.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet)); + children.add(new Property("code", "Coding", "The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.", 0, java.lang.Integer.MAX_VALUE, code)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 3433509: /*path*/ return new Property("path", "string", "The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", 0, 1, path); - case -1438410321: /*valueSet[x]*/ return new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); - case -1410174671: /*valueSet*/ return new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); - case -1025157982: /*valueSetString*/ return new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); - case 295220506: /*valueSetReference*/ return new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); - case -766209282: /*valueCode*/ return new Property("valueCode", "code", "The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.", 0, java.lang.Integer.MAX_VALUE, valueCode); - case -1887705029: /*valueCoding*/ return new Property("valueCoding", "Coding", "The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.", 0, java.lang.Integer.MAX_VALUE, valueCoding); - case 924902896: /*valueCodeableConcept*/ return new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept); + case -1438410321: /*valueSet[x]*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); + case -1410174671: /*valueSet*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); + case -1438416261: /*valueSetUri*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); + case 295220506: /*valueSetReference*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, 1, valueSet); + case 3059181: /*code*/ return new Property("code", "Coding", "The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.", 0, java.lang.Integer.MAX_VALUE, code); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -389,9 +257,7 @@ public class DataRequirement extends Type implements ICompositeType { switch (hash) { case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type - case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeType - case -1887705029: /*valueCoding*/ return this.valueCoding == null ? new Base[0] : this.valueCoding.toArray(new Base[this.valueCoding.size()]); // Coding - case 924902896: /*valueCodeableConcept*/ return this.valueCodeableConcept == null ? new Base[0] : this.valueCodeableConcept.toArray(new Base[this.valueCodeableConcept.size()]); // CodeableConcept + case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding default: return super.getProperty(hash, name, checkValid); } @@ -406,14 +272,8 @@ public class DataRequirement extends Type implements ICompositeType { case -1410174671: // valueSet this.valueSet = castToType(value); // Type return value; - case -766209282: // valueCode - this.getValueCode().add(castToCode(value)); // CodeType - return value; - case -1887705029: // valueCoding - this.getValueCoding().add(castToCoding(value)); // Coding - return value; - case 924902896: // valueCodeableConcept - this.getValueCodeableConcept().add(castToCodeableConcept(value)); // CodeableConcept + case 3059181: // code + this.getCode().add(castToCoding(value)); // Coding return value; default: return super.setProperty(hash, name, value); } @@ -426,12 +286,8 @@ public class DataRequirement extends Type implements ICompositeType { this.path = castToString(value); // StringType } else if (name.equals("valueSet[x]")) { this.valueSet = castToType(value); // Type - } else if (name.equals("valueCode")) { - this.getValueCode().add(castToCode(value)); - } else if (name.equals("valueCoding")) { - this.getValueCoding().add(castToCoding(value)); - } else if (name.equals("valueCodeableConcept")) { - this.getValueCodeableConcept().add(castToCodeableConcept(value)); + } else if (name.equals("code")) { + this.getCode().add(castToCoding(value)); } else return super.setProperty(name, value); return value; @@ -443,9 +299,7 @@ public class DataRequirement extends Type implements ICompositeType { case 3433509: return getPathElement(); case -1438410321: return getValueSet(); case -1410174671: return getValueSet(); - case -766209282: return addValueCodeElement(); - case -1887705029: return addValueCoding(); - case 924902896: return addValueCodeableConcept(); + case 3059181: return addCode(); default: return super.makeProperty(hash, name); } @@ -455,10 +309,8 @@ public class DataRequirement extends Type implements ICompositeType { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 3433509: /*path*/ return new String[] {"string"}; - case -1410174671: /*valueSet*/ return new String[] {"string", "Reference"}; - case -766209282: /*valueCode*/ return new String[] {"code"}; - case -1887705029: /*valueCoding*/ return new String[] {"Coding"}; - case 924902896: /*valueCodeableConcept*/ return new String[] {"CodeableConcept"}; + case -1410174671: /*valueSet*/ return new String[] {"uri", "Reference"}; + case 3059181: /*code*/ return new String[] {"Coding"}; default: return super.getTypesForProperty(hash, name); } @@ -469,22 +321,16 @@ public class DataRequirement extends Type implements ICompositeType { if (name.equals("path")) { throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.path"); } - else if (name.equals("valueSetString")) { - this.valueSet = new StringType(); + else if (name.equals("valueSetUri")) { + this.valueSet = new UriType(); return this.valueSet; } else if (name.equals("valueSetReference")) { this.valueSet = new Reference(); return this.valueSet; } - else if (name.equals("valueCode")) { - throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.valueCode"); - } - else if (name.equals("valueCoding")) { - return addValueCoding(); - } - else if (name.equals("valueCodeableConcept")) { - return addValueCodeableConcept(); + else if (name.equals("code")) { + return addCode(); } else return super.addChild(name); @@ -495,20 +341,10 @@ public class DataRequirement extends Type implements ICompositeType { copyValues(dst); dst.path = path == null ? null : path.copy(); dst.valueSet = valueSet == null ? null : valueSet.copy(); - if (valueCode != null) { - dst.valueCode = new ArrayList(); - for (CodeType i : valueCode) - dst.valueCode.add(i.copy()); - }; - if (valueCoding != null) { - dst.valueCoding = new ArrayList(); - for (Coding i : valueCoding) - dst.valueCoding.add(i.copy()); - }; - if (valueCodeableConcept != null) { - dst.valueCodeableConcept = new ArrayList(); - for (CodeableConcept i : valueCodeableConcept) - dst.valueCodeableConcept.add(i.copy()); + if (code != null) { + dst.code = new ArrayList(); + for (Coding i : code) + dst.code.add(i.copy()); }; return dst; } @@ -520,8 +356,7 @@ public class DataRequirement extends Type implements ICompositeType { if (!(other instanceof DataRequirementCodeFilterComponent)) return false; DataRequirementCodeFilterComponent o = (DataRequirementCodeFilterComponent) other; - return compareDeep(path, o.path, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(valueCode, o.valueCode, true) - && compareDeep(valueCoding, o.valueCoding, true) && compareDeep(valueCodeableConcept, o.valueCodeableConcept, true) + return compareDeep(path, o.path, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(code, o.code, true) ; } @@ -532,12 +367,11 @@ public class DataRequirement extends Type implements ICompositeType { if (!(other instanceof DataRequirementCodeFilterComponent)) return false; DataRequirementCodeFilterComponent o = (DataRequirementCodeFilterComponent) other; - return compareValues(path, o.path, true) && compareValues(valueCode, o.valueCode, true); + return compareValues(path, o.path, true); } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, valueSet, valueCode - , valueCoding, valueCodeableConcept); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, valueSet, code); } public String fhirType() { @@ -842,17 +676,17 @@ public class DataRequirement extends Type implements ICompositeType { protected List mustSupport; /** - * Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. + * Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed. */ @Child(name = "codeFilter", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="What codes are expected", formalDefinition="Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data." ) + @Description(shortDefinition="What codes are expected", formalDefinition="Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed." ) protected List codeFilter; /** - * Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. + * Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed. */ @Child(name = "dateFilter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="What dates/date ranges are expected", formalDefinition="Date filters specify additional constraints on the data in terms of the applicable date range for specific elements." ) + @Description(shortDefinition="What dates/date ranges are expected", formalDefinition="Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed." ) protected List dateFilter; private static final long serialVersionUID = 274786645L; @@ -1040,7 +874,7 @@ public class DataRequirement extends Type implements ICompositeType { } /** - * @return {@link #codeFilter} (Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.) + * @return {@link #codeFilter} (Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.) */ public List getCodeFilter() { if (this.codeFilter == null) @@ -1093,7 +927,7 @@ public class DataRequirement extends Type implements ICompositeType { } /** - * @return {@link #dateFilter} (Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.) + * @return {@link #dateFilter} (Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.) */ public List getDateFilter() { if (this.dateFilter == null) @@ -1150,8 +984,8 @@ public class DataRequirement extends Type implements ICompositeType { children.add(new Property("type", "code", "The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.", 0, 1, type)); children.add(new Property("profile", "uri", "The profile of the required data, specified as the uri of the profile definition.", 0, java.lang.Integer.MAX_VALUE, profile)); children.add(new Property("mustSupport", "string", "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.", 0, java.lang.Integer.MAX_VALUE, mustSupport)); - children.add(new Property("codeFilter", "", "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.", 0, java.lang.Integer.MAX_VALUE, codeFilter)); - children.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); + children.add(new Property("codeFilter", "", "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.", 0, java.lang.Integer.MAX_VALUE, codeFilter)); + children.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); } @Override @@ -1160,8 +994,8 @@ public class DataRequirement extends Type implements ICompositeType { case 3575610: /*type*/ return new Property("type", "code", "The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.", 0, 1, type); case -309425751: /*profile*/ return new Property("profile", "uri", "The profile of the required data, specified as the uri of the profile definition.", 0, java.lang.Integer.MAX_VALUE, profile); case -1402857082: /*mustSupport*/ return new Property("mustSupport", "string", "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.", 0, java.lang.Integer.MAX_VALUE, mustSupport); - case -1303674939: /*codeFilter*/ return new Property("codeFilter", "", "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.", 0, java.lang.Integer.MAX_VALUE, codeFilter); - case 149531846: /*dateFilter*/ return new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter); + case -1303674939: /*codeFilter*/ return new Property("codeFilter", "", "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.", 0, java.lang.Integer.MAX_VALUE, codeFilter); + case 149531846: /*dateFilter*/ return new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.", 0, java.lang.Integer.MAX_VALUE, dateFilter); default: return super.getNamedProperty(_hash, _name, _checkValid); } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateTimeType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateTimeType.java index 1a3721371af..e569acbca9f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateTimeType.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateTimeType.java @@ -1,195 +1,197 @@ -/* -Copyright (c) 2011+, HL7, Inc -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -package org.hl7.fhir.r4.model; - -import java.util.*; -import java.util.zip.DataFormatException; - -import org.apache.commons.lang3.time.DateUtils; - -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; - -/** - * Represents a FHIR dateTime datatype. Valid precisions values for this type are: - *
    - *
  • {@link TemporalPrecisionEnum#YEAR} - *
  • {@link TemporalPrecisionEnum#MONTH} - *
  • {@link TemporalPrecisionEnum#DAY} - *
  • {@link TemporalPrecisionEnum#SECOND} - *
  • {@link TemporalPrecisionEnum#MILLI} - *
- */ -@DatatypeDef(name = "dateTime") -public class DateTimeType extends BaseDateTimeType { - - private static final long serialVersionUID = 3L; - - /** - * The default precision for this type - */ - public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.SECOND; - - /** - * Constructor - */ - public DateTimeType() { - super(); - } - - /** - * Create a new DateTimeDt with seconds precision and the local time zone - */ - public DateTimeType(Date theDate) { - super(theDate, DEFAULT_PRECISION, TimeZone.getDefault()); - } - - /** - * Constructor which accepts a date value and a precision value. Valid precisions values for this type are: - *
    - *
  • {@link TemporalPrecisionEnum#YEAR} - *
  • {@link TemporalPrecisionEnum#MONTH} - *
  • {@link TemporalPrecisionEnum#DAY} - *
  • {@link TemporalPrecisionEnum#SECOND} - *
  • {@link TemporalPrecisionEnum#MILLI} - *
- * - * @throws DataFormatException - * If the specified precision is not allowed for this type - */ - public DateTimeType(Date theDate, TemporalPrecisionEnum thePrecision) { - super(theDate, thePrecision, TimeZone.getDefault()); - } - - /** - * Create a new instance using a string date/time - * - * @throws DataFormatException - * If the specified precision is not allowed for this type - */ - public DateTimeType(String theValue) { - super(theValue); - } - - /** - * Constructor which accepts a date value, precision value, and time zone. Valid precisions values for this type - * are: - *
    - *
  • {@link TemporalPrecisionEnum#YEAR} - *
  • {@link TemporalPrecisionEnum#MONTH} - *
  • {@link TemporalPrecisionEnum#DAY} - *
  • {@link TemporalPrecisionEnum#SECOND} - *
  • {@link TemporalPrecisionEnum#MILLI} - *
- */ - public DateTimeType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone) { - super(theDate, thePrecision, theTimezone); - } - - /** - * Constructor - */ - public DateTimeType(Calendar theCalendar) { - if (theCalendar != null) { - setValue(theCalendar.getTime()); - setPrecision(DEFAULT_PRECISION); - setTimeZone(theCalendar.getTimeZone()); - } - } - - @Override - boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { - switch (thePrecision) { - case YEAR: - case MONTH: - case DAY: - case SECOND: - case MILLI: - return true; - default: - return false; - } - } - - /** - * Returns a new instance of DateTimeType with the current system time and SECOND precision and the system local time - * zone - */ - public static DateTimeType now() { - return new DateTimeType(new Date(), TemporalPrecisionEnum.SECOND, TimeZone.getDefault()); - } - - /** - * Returns the default precision for this datatype - * - * @see #DEFAULT_PRECISION - */ - @Override - protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { - return DEFAULT_PRECISION; - } - - @Override - public DateTimeType copy() { - return new DateTimeType(getValueAsString()); - } - - /** - * Creates a new instance by parsing an HL7 v3 format date time string - */ - public static DateTimeType parseV3(String theV3String) { - DateTimeType retVal = new DateTimeType(); - retVal.setValueAsV3String(theV3String); - return retVal; - } - - public static DateTimeType today() { - DateTimeType retVal = now(); - retVal.setPrecision(TemporalPrecisionEnum.DAY); - return retVal; - } - - public boolean getTzSign() { - return getTimeZone().getRawOffset() >= 0; - } - - public int getTzHour() { - return (int) (getTimeZone().getRawOffset() / DateUtils.MILLIS_PER_MINUTE) / 60; - } - - public int getTzMin() { - return (int) (getTimeZone().getRawOffset() / DateUtils.MILLIS_PER_MINUTE) % 60; - } - - - public String fhirType() { - return "dateTime"; - } -} +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +package org.hl7.fhir.r4.model; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; +import java.util.zip.DataFormatException; + +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import org.apache.commons.lang3.time.DateUtils; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a FHIR dateTime datatype. Valid precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#YEAR} + *
  • {@link TemporalPrecisionEnum#MONTH} + *
  • {@link TemporalPrecisionEnum#DAY} + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ +@DatatypeDef(name = "dateTime") +public class DateTimeType extends BaseDateTimeType { + + private static final long serialVersionUID = 3L; + + /** + * The default precision for this type + */ + public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.SECOND; + + /** + * Constructor + */ + public DateTimeType() { + super(); + } + + /** + * Create a new DateTimeDt with seconds precision and the local time zone + */ + public DateTimeType(Date theDate) { + super(theDate, DEFAULT_PRECISION, TimeZone.getDefault()); + } + + /** + * Constructor which accepts a date value and a precision value. Valid precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#YEAR} + *
  • {@link TemporalPrecisionEnum#MONTH} + *
  • {@link TemporalPrecisionEnum#DAY} + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ * + * @throws DataFormatException + * If the specified precision is not allowed for this type + */ + public DateTimeType(Date theDate, TemporalPrecisionEnum thePrecision) { + super(theDate, thePrecision, TimeZone.getDefault()); + } + + /** + * Create a new instance using a string date/time + * + * @throws DataFormatException + * If the specified precision is not allowed for this type + */ + public DateTimeType(String theValue) { + super(theValue); + } + + /** + * Constructor which accepts a date value, precision value, and time zone. Valid precisions values for this type + * are: + *
    + *
  • {@link TemporalPrecisionEnum#YEAR} + *
  • {@link TemporalPrecisionEnum#MONTH} + *
  • {@link TemporalPrecisionEnum#DAY} + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ + public DateTimeType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone) { + super(theDate, thePrecision, theTimezone); + } + + /** + * Constructor + */ + public DateTimeType(Calendar theCalendar) { + if (theCalendar != null) { + setValue(theCalendar.getTime()); + setPrecision(DEFAULT_PRECISION); + setTimeZone(theCalendar.getTimeZone()); + } + } + + @Override + boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { + switch (thePrecision) { + case YEAR: + case MONTH: + case DAY: + case SECOND: + case MILLI: + return true; + default: + return false; + } + } + + /** + * Returns a new instance of DateTimeType with the current system time and SECOND precision and the system local time + * zone + */ + public static DateTimeType now() { + return new DateTimeType(new Date(), TemporalPrecisionEnum.SECOND, TimeZone.getDefault()); + } + + /** + * Returns the default precision for this datatype + * + * @see #DEFAULT_PRECISION + */ + @Override + protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { + return DEFAULT_PRECISION; + } + + @Override + public DateTimeType copy() { + return new DateTimeType(getValueAsString()); + } + + /** + * Creates a new instance by parsing an HL7 v3 format date time string + */ + public static DateTimeType parseV3(String theV3String) { + DateTimeType retVal = new DateTimeType(); + retVal.setValueAsV3String(theV3String); + return retVal; + } + + public static DateTimeType today() { + DateTimeType retVal = now(); + retVal.setPrecision(TemporalPrecisionEnum.DAY); + return retVal; + } + + public boolean getTzSign() { + return getTimeZone().getRawOffset() >= 0; + } + + public int getTzHour() { + return (int) (getTimeZone().getRawOffset() / DateUtils.MILLIS_PER_MINUTE) / 60; + } + + public int getTzMin() { + return (int) (getTimeZone().getRawOffset() / DateUtils.MILLIS_PER_MINUTE) % 60; + } + + + public String fhirType() { + return "dateTime"; + } +} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateType.java index 65d5cf6ffba..3a5d71a5bad 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateType.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DateType.java @@ -1,179 +1,184 @@ -/* -Copyright (c) 2011+, HL7, Inc -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -package org.hl7.fhir.r4.model; - -/** - * Primitive type "date" in FHIR: any day in a gregorian calendar - */ -import java.util.*; - -import org.apache.commons.lang3.Validate; - -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; - -/** - * Represents a FHIR date datatype. Valid precisions values for this type are: - *
    - *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#YEAR} - *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#MONTH} - *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY} - *
- */ -@DatatypeDef(name = "date") -public class DateType extends BaseDateTimeType { - - private static final long serialVersionUID = 3L; - - /** - * The default precision for this type - */ - public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.DAY; - - /** - * Constructor - */ - public DateType() { - super(); - } - - /** - * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type - */ - public DateType(Date theDate) { - super(theDate, DEFAULT_PRECISION); - } - - /** - * Constructor which accepts a date value and a precision value. Valid precisions values for this type are: - *
    - *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#YEAR} - *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#MONTH} - *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY} - *
- * - * @throws ca.uhn.fhir.parser.DataFormatException - * If the specified precision is not allowed for this type - */ - public DateType(Date theDate, TemporalPrecisionEnum thePrecision) { - super(theDate, thePrecision); - } - - /** - * Constructor which accepts a date as a string in FHIR format - * - * @throws ca.uhn.fhir.parser.DataFormatException - * If the precision in the date string is not allowed for this type - */ - public DateType(String theDate) { - super(theDate); - } - - /** - * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type. - */ - public DateType(Calendar theCalendar) { - super(theCalendar.getTime(), DEFAULT_PRECISION); - setTimeZone(theCalendar.getTimeZone()); - } - - /** - * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type. - *

- * Use caution when using this constructor: The month is 0-indexed but the day is 1-indexed - * in order to match the bahaviour of the Java {@link Calendar} type. - *

- * - * @param theYear The year, e.g. 2015 - * @param theMonth The month, e.g. 0 for January - * @param theDay The day (1 indexed) e.g. 1 for the first day of the month - */ - public DateType(int theYear, int theMonth, int theDay) { - this(toCalendarZulu(theYear, theMonth, theDay)); - } - - private static GregorianCalendar toCalendarZulu(int theYear, int theMonth, int theDay) { - Validate.isTrue(theMonth >= 0, "theMonth must be between 0 and 11"); - Validate.isTrue(theMonth <= 11, "theMonth must be between 0 and 11"); - Validate.isTrue(theDay >= 1, "theMonth must be between 0 and 11"); - Validate.isTrue(theDay <= 31, "theMonth must be between 0 and 11"); - - GregorianCalendar retVal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); - retVal.set(Calendar.YEAR, theYear); - retVal.set(Calendar.MONTH, theMonth); - retVal.set(Calendar.DATE, theDay); - return retVal; - } - - @Override - boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { - switch (thePrecision) { - case YEAR: - case MONTH: - case DAY: - return true; - default: - return false; - } - } - - /** - * Returns the default precision for this datatype - * - * @see #DEFAULT_PRECISION - */ - @Override - protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { - return DEFAULT_PRECISION; - } - - @Override - public DateType copy() { - return new DateType(getValueAsString()); - } - - public static InstantType today() { - return new InstantType(new Date(), TemporalPrecisionEnum.DAY, TimeZone.getDefault()); - } - - /** - * Creates a new instance by parsing an HL7 v3 format date time string - */ - public static DateType parseV3(String theV3String) { - DateType retVal = new DateType(); - retVal.setValueAsV3String(theV3String); - return retVal; - } - - @Override - public String fhirType() { - return "date"; - } -} +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +package org.hl7.fhir.r4.model; + +import java.util.Calendar; + +/** + * Primitive type "date" in FHIR: any day in a gregorian calendar + */ + +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import org.apache.commons.lang3.Validate; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a FHIR date datatype. Valid precisions values for this type are: + *
    + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#YEAR} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#MONTH} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY} + *
+ */ +@DatatypeDef(name = "date") +public class DateType extends BaseDateTimeType { + + private static final long serialVersionUID = 3L; + + /** + * The default precision for this type + */ + public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.DAY; + + /** + * Constructor + */ + public DateType() { + super(); + } + + /** + * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type + */ + public DateType(Date theDate) { + super(theDate, DEFAULT_PRECISION); + } + + /** + * Constructor which accepts a date value and a precision value. Valid precisions values for this type are: + *
    + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#YEAR} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#MONTH} + *
  • {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY} + *
+ * + * @throws ca.uhn.fhir.parser.DataFormatException + * If the specified precision is not allowed for this type + */ + public DateType(Date theDate, TemporalPrecisionEnum thePrecision) { + super(theDate, thePrecision); + } + + /** + * Constructor which accepts a date as a string in FHIR format + * + * @throws ca.uhn.fhir.parser.DataFormatException + * If the precision in the date string is not allowed for this type + */ + public DateType(String theDate) { + super(theDate); + } + + /** + * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type. + */ + public DateType(Calendar theCalendar) { + super(theCalendar.getTime(), DEFAULT_PRECISION); + setTimeZone(theCalendar.getTimeZone()); + } + + /** + * Constructor which accepts a date value and uses the {@link #DEFAULT_PRECISION} for this type. + *

+ * Use caution when using this constructor: The month is 0-indexed but the day is 1-indexed + * in order to match the bahaviour of the Java {@link Calendar} type. + *

+ * + * @param theYear The year, e.g. 2015 + * @param theMonth The month, e.g. 0 for January + * @param theDay The day (1 indexed) e.g. 1 for the first day of the month + */ + public DateType(int theYear, int theMonth, int theDay) { + this(toCalendarZulu(theYear, theMonth, theDay)); + } + + private static GregorianCalendar toCalendarZulu(int theYear, int theMonth, int theDay) { + Validate.isTrue(theMonth >= 0, "theMonth must be between 0 and 11"); + Validate.isTrue(theMonth <= 11, "theMonth must be between 0 and 11"); + Validate.isTrue(theDay >= 1, "theMonth must be between 0 and 11"); + Validate.isTrue(theDay <= 31, "theMonth must be between 0 and 11"); + + GregorianCalendar retVal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + retVal.set(Calendar.YEAR, theYear); + retVal.set(Calendar.MONTH, theMonth); + retVal.set(Calendar.DATE, theDay); + return retVal; + } + + @Override + boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { + switch (thePrecision) { + case YEAR: + case MONTH: + case DAY: + return true; + default: + return false; + } + } + + /** + * Returns the default precision for this datatype + * + * @see #DEFAULT_PRECISION + */ + @Override + protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { + return DEFAULT_PRECISION; + } + + @Override + public DateType copy() { + return new DateType(getValueAsString()); + } + + public static InstantType today() { + return new InstantType(new Date(), TemporalPrecisionEnum.DAY, TimeZone.getDefault()); + } + + /** + * Creates a new instance by parsing an HL7 v3 format date time string + */ + public static DateType parseV3(String theV3String) { + DateType retVal = new DateType(); + retVal.setValueAsV3String(theV3String); + return retVal; + } + + @Override + public String fhirType() { + return "date"; + } +} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DetectedIssue.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DetectedIssue.java index 2211cca9de6..ffb7b71598b 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DetectedIssue.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DetectedIssue.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Device.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Device.java index 0d91b43d819..b635e47b98e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Device.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Device.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceComponent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceComponent.java index d08417d1202..01c6cf98e38 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceComponent.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceComponent.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -555,12 +555,330 @@ public class DeviceComponent extends DomainResource { } + @Block() + public static class DeviceComponentPropertyComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The code for the device property identifying the property being reported such as 'time capability'. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Code that specifies the property", formalDefinition="The code for the device property identifying the property being reported such as 'time capability'." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-component-property") + protected CodeableConcept type; + + /** + * The property value when the property being reported is a quantity such as the resolution of a real time clock. + */ + @Child(name = "valueQuantity", type = {Quantity.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Property value as a quantity", formalDefinition="The property value when the property being reported is a quantity such as the resolution of a real time clock." ) + protected List valueQuantity; + + /** + * The property value when the property being reported is a code, such as the code indicating that the device supports a real time clock using absolute time. + */ + @Child(name = "valueCode", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Property value as a code", formalDefinition="The property value when the property being reported is a code, such as the code indicating that the device supports a real time clock using absolute time." ) + protected List valueCode; + + private static final long serialVersionUID = 1512172633L; + /** - * The locally assigned unique identification by the software. For example: handle ID. + * Constructor */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Instance id assigned by the software stack", formalDefinition="The locally assigned unique identification by the software. For example: handle ID." ) - protected Identifier identifier; + public DeviceComponentPropertyComponent() { + super(); + } + + /** + * Constructor + */ + public DeviceComponentPropertyComponent(CodeableConcept type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The code for the device property identifying the property being reported such as 'time capability'.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DeviceComponentPropertyComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The code for the device property identifying the property being reported such as 'time capability'.) + */ + public DeviceComponentPropertyComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #valueQuantity} (The property value when the property being reported is a quantity such as the resolution of a real time clock.) + */ + public List getValueQuantity() { + if (this.valueQuantity == null) + this.valueQuantity = new ArrayList(); + return this.valueQuantity; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public DeviceComponentPropertyComponent setValueQuantity(List theValueQuantity) { + this.valueQuantity = theValueQuantity; + return this; + } + + public boolean hasValueQuantity() { + if (this.valueQuantity == null) + return false; + for (Quantity item : this.valueQuantity) + if (!item.isEmpty()) + return true; + return false; + } + + public Quantity addValueQuantity() { //3 + Quantity t = new Quantity(); + if (this.valueQuantity == null) + this.valueQuantity = new ArrayList(); + this.valueQuantity.add(t); + return t; + } + + public DeviceComponentPropertyComponent addValueQuantity(Quantity t) { //3 + if (t == null) + return this; + if (this.valueQuantity == null) + this.valueQuantity = new ArrayList(); + this.valueQuantity.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #valueQuantity}, creating it if it does not already exist + */ + public Quantity getValueQuantityFirstRep() { + if (getValueQuantity().isEmpty()) { + addValueQuantity(); + } + return getValueQuantity().get(0); + } + + /** + * @return {@link #valueCode} (The property value when the property being reported is a code, such as the code indicating that the device supports a real time clock using absolute time.) + */ + public List getValueCode() { + if (this.valueCode == null) + this.valueCode = new ArrayList(); + return this.valueCode; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public DeviceComponentPropertyComponent setValueCode(List theValueCode) { + this.valueCode = theValueCode; + return this; + } + + public boolean hasValueCode() { + if (this.valueCode == null) + return false; + for (CodeableConcept item : this.valueCode) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addValueCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); + return t; + } + + public DeviceComponentPropertyComponent addValueCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #valueCode}, creating it if it does not already exist + */ + public CodeableConcept getValueCodeFirstRep() { + if (getValueCode().isEmpty()) { + addValueCode(); + } + return getValueCode().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "The code for the device property identifying the property being reported such as 'time capability'.", 0, 1, type)); + children.add(new Property("valueQuantity", "Quantity", "The property value when the property being reported is a quantity such as the resolution of a real time clock.", 0, java.lang.Integer.MAX_VALUE, valueQuantity)); + children.add(new Property("valueCode", "CodeableConcept", "The property value when the property being reported is a code, such as the code indicating that the device supports a real time clock using absolute time.", 0, java.lang.Integer.MAX_VALUE, valueCode)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The code for the device property identifying the property being reported such as 'time capability'.", 0, 1, type); + case -2029823716: /*valueQuantity*/ return new Property("valueQuantity", "Quantity", "The property value when the property being reported is a quantity such as the resolution of a real time clock.", 0, java.lang.Integer.MAX_VALUE, valueQuantity); + case -766209282: /*valueCode*/ return new Property("valueCode", "CodeableConcept", "The property value when the property being reported is a code, such as the code indicating that the device supports a real time clock using absolute time.", 0, java.lang.Integer.MAX_VALUE, valueCode); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case -2029823716: /*valueQuantity*/ return this.valueQuantity == null ? new Base[0] : this.valueQuantity.toArray(new Base[this.valueQuantity.size()]); // Quantity + case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeableConcept + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; + case -2029823716: // valueQuantity + this.getValueQuantity().add(castToQuantity(value)); // Quantity + return value; + case -766209282: // valueCode + this.getValueCode().add(castToCodeableConcept(value)); // CodeableConcept + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("valueQuantity")) { + this.getValueQuantity().add(castToQuantity(value)); + } else if (name.equals("valueCode")) { + this.getValueCode().add(castToCodeableConcept(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: return getType(); + case -2029823716: return addValueQuantity(); + case -766209282: return addValueCode(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -2029823716: /*valueQuantity*/ return new String[] {"Quantity"}; + case -766209282: /*valueCode*/ return new String[] {"CodeableConcept"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("valueQuantity")) { + return addValueQuantity(); + } + else if (name.equals("valueCode")) { + return addValueCode(); + } + else + return super.addChild(name); + } + + public DeviceComponentPropertyComponent copy() { + DeviceComponentPropertyComponent dst = new DeviceComponentPropertyComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + if (valueQuantity != null) { + dst.valueQuantity = new ArrayList(); + for (Quantity i : valueQuantity) + dst.valueQuantity.add(i.copy()); + }; + if (valueCode != null) { + dst.valueCode = new ArrayList(); + for (CodeableConcept i : valueCode) + dst.valueCode.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DeviceComponentPropertyComponent)) + return false; + DeviceComponentPropertyComponent o = (DeviceComponentPropertyComponent) other; + return compareDeep(type, o.type, true) && compareDeep(valueQuantity, o.valueQuantity, true) && compareDeep(valueCode, o.valueCode, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DeviceComponentPropertyComponent)) + return false; + DeviceComponentPropertyComponent o = (DeviceComponentPropertyComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, valueQuantity, valueCode + ); + } + + public String fhirType() { + return "DeviceComponent.property"; + + } + + } + + /** + * Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID." ) + protected List identifier; /** * The component type as defined in the object-oriented or metric nomenclature partition. @@ -640,7 +958,14 @@ public class DeviceComponent extends DomainResource { @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") protected CodeableConcept languageCode; - private static final long serialVersionUID = 32987426L; + /** + * Other device properties expressed as a `type` which identifies the property and a value(s) either as a quantity or a code. + */ + @Child(name = "property", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other Attributes", formalDefinition="Other device properties expressed as a `type` which identifies the property and a value(s) either as a quantity or a code." ) + protected List property; + + private static final long serialVersionUID = -972124604L; /** * Constructor @@ -652,34 +977,62 @@ public class DeviceComponent extends DomainResource { /** * Constructor */ - public DeviceComponent(Identifier identifier, CodeableConcept type) { + public DeviceComponent(CodeableConcept type) { super(); - this.identifier = identifier; this.type = type; } /** - * @return {@link #identifier} (The locally assigned unique identification by the software. For example: handle ID.) + * @return {@link #identifier} (Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.) */ - public Identifier getIdentifier() { + public List getIdentifier() { if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DeviceComponent.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new Identifier(); // cc + this.identifier = new ArrayList(); return this.identifier; } + /** + * @return Returns a reference to this for easy method chaining + */ + public DeviceComponent setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public DeviceComponent addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; } /** - * @param value {@link #identifier} (The locally assigned unique identification by the software. For example: handle ID.) + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist */ - public DeviceComponent setIdentifier(Identifier value) { - this.identifier = value; - return this; + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); } /** @@ -1046,9 +1399,62 @@ public class DeviceComponent extends DomainResource { return this; } + /** + * @return {@link #property} (Other device properties expressed as a `type` which identifies the property and a value(s) either as a quantity or a code.) + */ + public List getProperty() { + if (this.property == null) + this.property = new ArrayList(); + return this.property; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public DeviceComponent setProperty(List theProperty) { + this.property = theProperty; + return this; + } + + public boolean hasProperty() { + if (this.property == null) + return false; + for (DeviceComponentPropertyComponent item : this.property) + if (!item.isEmpty()) + return true; + return false; + } + + public DeviceComponentPropertyComponent addProperty() { //3 + DeviceComponentPropertyComponent t = new DeviceComponentPropertyComponent(); + if (this.property == null) + this.property = new ArrayList(); + this.property.add(t); + return t; + } + + public DeviceComponent addProperty(DeviceComponentPropertyComponent t) { //3 + if (t == null) + return this; + if (this.property == null) + this.property = new ArrayList(); + this.property.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist + */ + public DeviceComponentPropertyComponent getPropertyFirstRep() { + if (getProperty().isEmpty()) { + addProperty(); + } + return getProperty().get(0); + } + protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("identifier", "Identifier", "The locally assigned unique identification by the software. For example: handle ID.", 0, 1, identifier)); + children.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier)); children.add(new Property("type", "CodeableConcept", "The component type as defined in the object-oriented or metric nomenclature partition.", 0, 1, type)); children.add(new Property("lastSystemChange", "instant", "The timestamp for the most recent system change which includes device configuration or setting change.", 0, 1, lastSystemChange)); children.add(new Property("source", "Reference(Device)", "The link to the source Device that contains administrative device information such as manufacture, serial number, etc.", 0, 1, source)); @@ -1058,12 +1464,13 @@ public class DeviceComponent extends DomainResource { children.add(new Property("measurementPrinciple", "code", "The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.", 0, 1, measurementPrinciple)); children.add(new Property("productionSpecification", "", "The production specification such as component revision, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, productionSpecification)); children.add(new Property("languageCode", "CodeableConcept", "The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.", 0, 1, languageCode)); + children.add(new Property("property", "", "Other device properties expressed as a `type` which identifies the property and a value(s) either as a quantity or a code.", 0, java.lang.Integer.MAX_VALUE, property)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The locally assigned unique identification by the software. For example: handle ID.", 0, 1, identifier); + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier); case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The component type as defined in the object-oriented or metric nomenclature partition.", 0, 1, type); case -2072475531: /*lastSystemChange*/ return new Property("lastSystemChange", "instant", "The timestamp for the most recent system change which includes device configuration or setting change.", 0, 1, lastSystemChange); case -896505829: /*source*/ return new Property("source", "Reference(Device)", "The link to the source Device that contains administrative device information such as manufacture, serial number, etc.", 0, 1, source); @@ -1073,6 +1480,7 @@ public class DeviceComponent extends DomainResource { case 24324384: /*measurementPrinciple*/ return new Property("measurementPrinciple", "code", "The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.", 0, 1, measurementPrinciple); case -455527222: /*productionSpecification*/ return new Property("productionSpecification", "", "The production specification such as component revision, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, productionSpecification); case -2092349083: /*languageCode*/ return new Property("languageCode", "CodeableConcept", "The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.", 0, 1, languageCode); + case -993141291: /*property*/ return new Property("property", "", "Other device properties expressed as a `type` which identifies the property and a value(s) either as a quantity or a code.", 0, java.lang.Integer.MAX_VALUE, property); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -1081,7 +1489,7 @@ public class DeviceComponent extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case -2072475531: /*lastSystemChange*/ return this.lastSystemChange == null ? new Base[0] : new Base[] {this.lastSystemChange}; // InstantType case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference @@ -1091,6 +1499,7 @@ public class DeviceComponent extends DomainResource { case 24324384: /*measurementPrinciple*/ return this.measurementPrinciple == null ? new Base[0] : new Base[] {this.measurementPrinciple}; // Enumeration case -455527222: /*productionSpecification*/ return this.productionSpecification == null ? new Base[0] : this.productionSpecification.toArray(new Base[this.productionSpecification.size()]); // DeviceComponentProductionSpecificationComponent case -2092349083: /*languageCode*/ return this.languageCode == null ? new Base[0] : new Base[] {this.languageCode}; // CodeableConcept + case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // DeviceComponentPropertyComponent default: return super.getProperty(hash, name, checkValid); } @@ -1100,7 +1509,7 @@ public class DeviceComponent extends DomainResource { public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1618432855: // identifier - this.identifier = castToIdentifier(value); // Identifier + this.getIdentifier().add(castToIdentifier(value)); // Identifier return value; case 3575610: // type this.type = castToCodeableConcept(value); // CodeableConcept @@ -1130,6 +1539,9 @@ public class DeviceComponent extends DomainResource { case -2092349083: // languageCode this.languageCode = castToCodeableConcept(value); // CodeableConcept return value; + case -993141291: // property + this.getProperty().add((DeviceComponentPropertyComponent) value); // DeviceComponentPropertyComponent + return value; default: return super.setProperty(hash, name, value); } @@ -1138,7 +1550,7 @@ public class DeviceComponent extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) { - this.identifier = castToIdentifier(value); // Identifier + this.getIdentifier().add(castToIdentifier(value)); } else if (name.equals("type")) { this.type = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("lastSystemChange")) { @@ -1158,6 +1570,8 @@ public class DeviceComponent extends DomainResource { this.getProductionSpecification().add((DeviceComponentProductionSpecificationComponent) value); } else if (name.equals("languageCode")) { this.languageCode = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("property")) { + this.getProperty().add((DeviceComponentPropertyComponent) value); } else return super.setProperty(name, value); return value; @@ -1166,7 +1580,7 @@ public class DeviceComponent extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case -1618432855: return getIdentifier(); + case -1618432855: return addIdentifier(); case 3575610: return getType(); case -2072475531: return getLastSystemChangeElement(); case -896505829: return getSource(); @@ -1176,6 +1590,7 @@ public class DeviceComponent extends DomainResource { case 24324384: return getMeasurementPrincipleElement(); case -455527222: return addProductionSpecification(); case -2092349083: return getLanguageCode(); + case -993141291: return addProperty(); default: return super.makeProperty(hash, name); } @@ -1194,6 +1609,7 @@ public class DeviceComponent extends DomainResource { case 24324384: /*measurementPrinciple*/ return new String[] {"code"}; case -455527222: /*productionSpecification*/ return new String[] {}; case -2092349083: /*languageCode*/ return new String[] {"CodeableConcept"}; + case -993141291: /*property*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); } @@ -1202,8 +1618,7 @@ public class DeviceComponent extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("identifier")) { - this.identifier = new Identifier(); - return this.identifier; + return addIdentifier(); } else if (name.equals("type")) { this.type = new CodeableConcept(); @@ -1237,6 +1652,9 @@ public class DeviceComponent extends DomainResource { this.languageCode = new CodeableConcept(); return this.languageCode; } + else if (name.equals("property")) { + return addProperty(); + } else return super.addChild(name); } @@ -1249,7 +1667,11 @@ public class DeviceComponent extends DomainResource { public DeviceComponent copy() { DeviceComponent dst = new DeviceComponent(); copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; dst.type = type == null ? null : type.copy(); dst.lastSystemChange = lastSystemChange == null ? null : lastSystemChange.copy(); dst.source = source == null ? null : source.copy(); @@ -1267,6 +1689,11 @@ public class DeviceComponent extends DomainResource { dst.productionSpecification.add(i.copy()); }; dst.languageCode = languageCode == null ? null : languageCode.copy(); + if (property != null) { + dst.property = new ArrayList(); + for (DeviceComponentPropertyComponent i : property) + dst.property.add(i.copy()); + }; return dst; } @@ -1285,7 +1712,7 @@ public class DeviceComponent extends DomainResource { && compareDeep(source, o.source, true) && compareDeep(parent, o.parent, true) && compareDeep(operationalStatus, o.operationalStatus, true) && compareDeep(parameterGroup, o.parameterGroup, true) && compareDeep(measurementPrinciple, o.measurementPrinciple, true) && compareDeep(productionSpecification, o.productionSpecification, true) && compareDeep(languageCode, o.languageCode, true) - ; + && compareDeep(property, o.property, true); } @Override @@ -1302,7 +1729,7 @@ public class DeviceComponent extends DomainResource { public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, lastSystemChange , source, parent, operationalStatus, parameterGroup, measurementPrinciple, productionSpecification - , languageCode); + , languageCode, property); } @Override diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceMetric.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceMetric.java index 90d5cec7596..30d2bdfa3cc 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceMetric.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceMetric.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1056,11 +1056,11 @@ public class DeviceMetric extends DomainResource { } /** - * Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device. + * Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID. */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Unique identifier of this DeviceMetric", formalDefinition="Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device." ) - protected Identifier identifier; + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID." ) + protected List identifier; /** * Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc. @@ -1140,7 +1140,7 @@ public class DeviceMetric extends DomainResource { @Description(shortDefinition="Describes the calibrations that have been performed or that are required to be performed", formalDefinition="Describes the calibrations that have been performed or that are required to be performed." ) protected List calibration; - private static final long serialVersionUID = -380567474L; + private static final long serialVersionUID = -384368228L; /** * Constructor @@ -1152,35 +1152,63 @@ public class DeviceMetric extends DomainResource { /** * Constructor */ - public DeviceMetric(Identifier identifier, CodeableConcept type, Enumeration category) { + public DeviceMetric(CodeableConcept type, Enumeration category) { super(); - this.identifier = identifier; this.type = type; this.category = category; } /** - * @return {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.) + * @return {@link #identifier} (Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID.) */ - public Identifier getIdentifier() { + public List getIdentifier() { if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DeviceMetric.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new Identifier(); // cc + this.identifier = new ArrayList(); return this.identifier; } + /** + * @return Returns a reference to this for easy method chaining + */ + public DeviceMetric setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public DeviceMetric addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; } /** - * @param value {@link #identifier} (Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.) + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist */ - public DeviceMetric setIdentifier(Identifier value) { - this.identifier = value; - return this; + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); } /** @@ -1541,7 +1569,7 @@ public class DeviceMetric extends DomainResource { protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("identifier", "Identifier", "Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.", 0, 1, identifier)); + children.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier)); children.add(new Property("type", "CodeableConcept", "Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.", 0, 1, type)); children.add(new Property("unit", "CodeableConcept", "Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.", 0, 1, unit)); children.add(new Property("source", "Reference(Device)", "Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.", 0, 1, source)); @@ -1556,7 +1584,7 @@ public class DeviceMetric extends DomainResource { @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.", 0, 1, identifier); + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier); case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.", 0, 1, type); case 3594628: /*unit*/ return new Property("unit", "CodeableConcept", "Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.", 0, 1, unit); case -896505829: /*source*/ return new Property("source", "Reference(Device)", "Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.", 0, 1, source); @@ -1574,7 +1602,7 @@ public class DeviceMetric extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // CodeableConcept case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference @@ -1593,7 +1621,7 @@ public class DeviceMetric extends DomainResource { public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1618432855: // identifier - this.identifier = castToIdentifier(value); // Identifier + this.getIdentifier().add(castToIdentifier(value)); // Identifier return value; case 3575610: // type this.type = castToCodeableConcept(value); // CodeableConcept @@ -1633,7 +1661,7 @@ public class DeviceMetric extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) { - this.identifier = castToIdentifier(value); // Identifier + this.getIdentifier().add(castToIdentifier(value)); } else if (name.equals("type")) { this.type = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("unit")) { @@ -1663,7 +1691,7 @@ public class DeviceMetric extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case -1618432855: return getIdentifier(); + case -1618432855: return addIdentifier(); case 3575610: return getType(); case 3594628: return getUnit(); case -896505829: return getSource(); @@ -1699,8 +1727,7 @@ public class DeviceMetric extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("identifier")) { - this.identifier = new Identifier(); - return this.identifier; + return addIdentifier(); } else if (name.equals("type")) { this.type = new CodeableConcept(); @@ -1746,7 +1773,11 @@ public class DeviceMetric extends DomainResource { public DeviceMetric copy() { DeviceMetric dst = new DeviceMetric(); copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; dst.type = type == null ? null : type.copy(); dst.unit = unit == null ? null : unit.copy(); dst.source = source == null ? null : source.copy(); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceRequest.java index 3186e45f82c..02663afd0dc 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceUseStatement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceUseStatement.java index 69bde659248..95068e24dac 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceUseStatement.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DeviceUseStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DiagnosticReport.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DiagnosticReport.java index 20a80c6a367..270c4d54fcb 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DiagnosticReport.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DiagnosticReport.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Distance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Distance.java index 41ec396fd9d..bf5d905df12 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Distance.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Distance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentManifest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentManifest.java index f2b117863d8..0bb387f7f97 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentManifest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentManifest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -50,88 +50,118 @@ import org.hl7.fhir.exceptions.FHIRException; public class DocumentManifest extends DomainResource { @Block() - public static class DocumentManifestContentComponent extends BackboneElement implements IBaseBackboneElement { + public static class DocumentManifestAgentComponent extends BackboneElement implements IBaseBackboneElement { /** - * The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed. + * Specification of the participation type the agent played. */ - @Child(name = "p", type = {Attachment.class, Reference.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed." ) - protected Type p; + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How agent participated", formalDefinition="Specification of the participation type the agent played." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type") + protected CodeableConcept type; - private static final long serialVersionUID = -347538500L; + /** + * Identifies who is the agent. Such as the author of the manifest, and adding documents to it. + */ + @Child(name = "who", type = {Practitioner.class, PractitionerRole.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what had an agent participation", formalDefinition="Identifies who is the agent. Such as the author of the manifest, and adding documents to it." ) + protected Reference who; + + /** + * The actual object that is the target of the reference (Identifies who is the agent. Such as the author of the manifest, and adding documents to it.) + */ + protected Resource whoTarget; + + private static final long serialVersionUID = -1480994789L; /** * Constructor */ - public DocumentManifestContentComponent() { + public DocumentManifestAgentComponent() { super(); } /** * Constructor */ - public DocumentManifestContentComponent(Type p) { + public DocumentManifestAgentComponent(Reference who) { super(); - this.p = p; + this.who = who; } /** - * @return {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + * @return {@link #type} (Specification of the participation type the agent played.) */ - public Type getP() { - return this.p; + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifestAgentComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); } /** - * @return {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + * @param value {@link #type} (Specification of the participation type the agent played.) */ - public Attachment getPAttachment() throws FHIRException { - if (!(this.p instanceof Attachment)) - throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.p.getClass().getName()+" was encountered"); - return (Attachment) this.p; - } - - public boolean hasPAttachment() { - return this.p instanceof Attachment; + public DocumentManifestAgentComponent setType(CodeableConcept value) { + this.type = value; + return this; } /** - * @return {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + * @return {@link #who} (Identifies who is the agent. Such as the author of the manifest, and adding documents to it.) */ - public Reference getPReference() throws FHIRException { - if (!(this.p instanceof Reference)) - throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.p.getClass().getName()+" was encountered"); - return (Reference) this.p; + public Reference getWho() { + if (this.who == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentManifestAgentComponent.who"); + else if (Configuration.doAutoCreate()) + this.who = new Reference(); // cc + return this.who; } - public boolean hasPReference() { - return this.p instanceof Reference; - } - - public boolean hasP() { - return this.p != null && !this.p.isEmpty(); + public boolean hasWho() { + return this.who != null && !this.who.isEmpty(); } /** - * @param value {@link #p} (The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.) + * @param value {@link #who} (Identifies who is the agent. Such as the author of the manifest, and adding documents to it.) */ - public DocumentManifestContentComponent setP(Type value) { - this.p = value; + public DocumentManifestAgentComponent setWho(Reference value) { + this.who = value; + return this; + } + + /** + * @return {@link #who} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies who is the agent. Such as the author of the manifest, and adding documents to it.) + */ + public Resource getWhoTarget() { + return this.whoTarget; + } + + /** + * @param value {@link #who} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies who is the agent. Such as the author of the manifest, and adding documents to it.) + */ + public DocumentManifestAgentComponent setWhoTarget(Resource value) { + this.whoTarget = value; return this; } protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, 1, p)); + children.add(new Property("type", "CodeableConcept", "Specification of the participation type the agent played.", 0, 1, type)); + children.add(new Property("who", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is the agent. Such as the author of the manifest, and adding documents to it.", 0, 1, who)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 3427856: /*p[x]*/ return new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, 1, p); - case 112: /*p*/ return new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, 1, p); - case 634874291: /*pAttachment*/ return new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, 1, p); - case 544136379: /*pReference*/ return new Property("p[x]", "Attachment|Reference(Any)", "The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.", 0, 1, p); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specification of the participation type the agent played.", 0, 1, type); + case 117694: /*who*/ return new Property("who", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is the agent. Such as the author of the manifest, and adding documents to it.", 0, 1, who); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -140,7 +170,8 @@ public class DocumentManifest extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case 112: /*p*/ return this.p == null ? new Base[0] : new Base[] {this.p}; // Type + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 117694: /*who*/ return this.who == null ? new Base[0] : new Base[] {this.who}; // Reference default: return super.getProperty(hash, name, checkValid); } @@ -149,8 +180,11 @@ public class DocumentManifest extends DomainResource { @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { - case 112: // p - this.p = castToType(value); // Type + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; + case 117694: // who + this.who = castToReference(value); // Reference return value; default: return super.setProperty(hash, name, value); } @@ -159,8 +193,10 @@ public class DocumentManifest extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("p[x]")) { - this.p = castToType(value); // Type + if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("who")) { + this.who = castToReference(value); // Reference } else return super.setProperty(name, value); return value; @@ -169,8 +205,8 @@ public class DocumentManifest extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case 3427856: return getP(); - case 112: return getP(); + case 3575610: return getType(); + case 117694: return getWho(); default: return super.makeProperty(hash, name); } @@ -179,7 +215,8 @@ public class DocumentManifest extends DomainResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { - case 112: /*p*/ return new String[] {"Attachment", "Reference"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 117694: /*who*/ return new String[] {"Reference"}; default: return super.getTypesForProperty(hash, name); } @@ -187,22 +224,23 @@ public class DocumentManifest extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("pAttachment")) { - this.p = new Attachment(); - return this.p; + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; } - else if (name.equals("pReference")) { - this.p = new Reference(); - return this.p; + else if (name.equals("who")) { + this.who = new Reference(); + return this.who; } else return super.addChild(name); } - public DocumentManifestContentComponent copy() { - DocumentManifestContentComponent dst = new DocumentManifestContentComponent(); + public DocumentManifestAgentComponent copy() { + DocumentManifestAgentComponent dst = new DocumentManifestAgentComponent(); copyValues(dst); - dst.p = p == null ? null : p.copy(); + dst.type = type == null ? null : type.copy(); + dst.who = who == null ? null : who.copy(); return dst; } @@ -210,28 +248,28 @@ public class DocumentManifest extends DomainResource { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof DocumentManifestContentComponent)) + if (!(other instanceof DocumentManifestAgentComponent)) return false; - DocumentManifestContentComponent o = (DocumentManifestContentComponent) other; - return compareDeep(p, o.p, true); + DocumentManifestAgentComponent o = (DocumentManifestAgentComponent) other; + return compareDeep(type, o.type, true) && compareDeep(who, o.who, true); } @Override public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof DocumentManifestContentComponent)) + if (!(other instanceof DocumentManifestAgentComponent)) return false; - DocumentManifestContentComponent o = (DocumentManifestContentComponent) other; + DocumentManifestAgentComponent o = (DocumentManifestAgentComponent) other; return true; } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(p); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, who); } public String fhirType() { - return "DocumentManifest.content"; + return "DocumentManifest.agent"; } @@ -242,14 +280,14 @@ public class DocumentManifest extends DomainResource { /** * Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers. */ - @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Identifiers of things that are related", formalDefinition="Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers." ) protected Identifier identifier; /** * Related Resource to this DocumentManifest. For example, Order, ProcedureRequest, Procedure, EligibilityRequest, etc. */ - @Child(name = "ref", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "ref", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentManifest. For example, Order, ProcedureRequest, Procedure, EligibilityRequest, etc." ) protected Reference ref; @@ -499,26 +537,21 @@ public class DocumentManifest extends DomainResource { /** * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). */ - @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="When this document manifest created", formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)." ) protected DateTimeType created; /** - * Identifies who is responsible for creating the manifest, and adding documents to it. + * An actor taking an active role in the manifest. */ - @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Who and/or what authored the manifest", formalDefinition="Identifies who is responsible for creating the manifest, and adding documents to it." ) - protected List author; - /** - * The actual objects that are the target of the reference (Identifies who is responsible for creating the manifest, and adding documents to it.) - */ - protected List authorTarget; - + @Child(name = "agent", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Agent involved", formalDefinition="An actor taking an active role in the manifest." ) + protected List agent; /** * A patient, practitioner, or organization for which this set of documents is intended. */ - @Child(name = "recipient", type = {Patient.class, Practitioner.class, RelatedPerson.class, Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "recipient", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Intended to get notified about this set of documents", formalDefinition="A patient, practitioner, or organization for which this set of documents is intended." ) protected List recipient; /** @@ -530,7 +563,7 @@ public class DocumentManifest extends DomainResource { /** * Identifies the source system, application, or software that produced the document manifest. */ - @Child(name = "source", type = {UriType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "source", type = {UriType.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." ) protected UriType source; @@ -542,20 +575,25 @@ public class DocumentManifest extends DomainResource { protected StringType description; /** - * The list of Documents included in the manifest. + * The list of Resources that consist of the parts of this manifest. */ - @Child(name = "content", type = {}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The items included", formalDefinition="The list of Documents included in the manifest." ) - protected List content; + @Child(name = "content", type = {Reference.class}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Items in manifest", formalDefinition="The list of Resources that consist of the parts of this manifest." ) + protected List content; + /** + * The actual objects that are the target of the reference (The list of Resources that consist of the parts of this manifest.) + */ + protected List contentTarget; + /** * Related identifiers or resources associated with the DocumentManifest. */ - @Child(name = "related", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "related", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Related things", formalDefinition="Related identifiers or resources associated with the DocumentManifest." ) protected List related; - private static final long serialVersionUID = -2081196115L; + private static final long serialVersionUID = -1607612345L; /** * Constructor @@ -807,66 +845,56 @@ public class DocumentManifest extends DomainResource { } /** - * @return {@link #author} (Identifies who is responsible for creating the manifest, and adding documents to it.) + * @return {@link #agent} (An actor taking an active role in the manifest.) */ - public List getAuthor() { - if (this.author == null) - this.author = new ArrayList(); - return this.author; + public List getAgent() { + if (this.agent == null) + this.agent = new ArrayList(); + return this.agent; } /** * @return Returns a reference to this for easy method chaining */ - public DocumentManifest setAuthor(List theAuthor) { - this.author = theAuthor; + public DocumentManifest setAgent(List theAgent) { + this.agent = theAgent; return this; } - public boolean hasAuthor() { - if (this.author == null) + public boolean hasAgent() { + if (this.agent == null) return false; - for (Reference item : this.author) + for (DocumentManifestAgentComponent item : this.agent) if (!item.isEmpty()) return true; return false; } - public Reference addAuthor() { //3 - Reference t = new Reference(); - if (this.author == null) - this.author = new ArrayList(); - this.author.add(t); + public DocumentManifestAgentComponent addAgent() { //3 + DocumentManifestAgentComponent t = new DocumentManifestAgentComponent(); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return t; } - public DocumentManifest addAuthor(Reference t) { //3 + public DocumentManifest addAgent(DocumentManifestAgentComponent t) { //3 if (t == null) return this; - if (this.author == null) - this.author = new ArrayList(); - this.author.add(t); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return this; } /** - * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist + * @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist */ - public Reference getAuthorFirstRep() { - if (getAuthor().isEmpty()) { - addAuthor(); + public DocumentManifestAgentComponent getAgentFirstRep() { + if (getAgent().isEmpty()) { + addAgent(); } - return getAuthor().get(0); - } - - /** - * @deprecated Use Reference#setResource(IBaseResource) instead - */ - @Deprecated - public List getAuthorTarget() { - if (this.authorTarget == null) - this.authorTarget = new ArrayList(); - return this.authorTarget; + return getAgent().get(0); } /** @@ -1031,18 +1059,18 @@ public class DocumentManifest extends DomainResource { } /** - * @return {@link #content} (The list of Documents included in the manifest.) + * @return {@link #content} (The list of Resources that consist of the parts of this manifest.) */ - public List getContent() { + public List getContent() { if (this.content == null) - this.content = new ArrayList(); + this.content = new ArrayList(); return this.content; } /** * @return Returns a reference to this for easy method chaining */ - public DocumentManifest setContent(List theContent) { + public DocumentManifest setContent(List theContent) { this.content = theContent; return this; } @@ -1050,25 +1078,25 @@ public class DocumentManifest extends DomainResource { public boolean hasContent() { if (this.content == null) return false; - for (DocumentManifestContentComponent item : this.content) + for (Reference item : this.content) if (!item.isEmpty()) return true; return false; } - public DocumentManifestContentComponent addContent() { //3 - DocumentManifestContentComponent t = new DocumentManifestContentComponent(); + public Reference addContent() { //3 + Reference t = new Reference(); if (this.content == null) - this.content = new ArrayList(); + this.content = new ArrayList(); this.content.add(t); return t; } - public DocumentManifest addContent(DocumentManifestContentComponent t) { //3 + public DocumentManifest addContent(Reference t) { //3 if (t == null) return this; if (this.content == null) - this.content = new ArrayList(); + this.content = new ArrayList(); this.content.add(t); return this; } @@ -1076,13 +1104,23 @@ public class DocumentManifest extends DomainResource { /** * @return The first repetition of repeating field {@link #content}, creating it if it does not already exist */ - public DocumentManifestContentComponent getContentFirstRep() { + public Reference getContentFirstRep() { if (getContent().isEmpty()) { addContent(); } return getContent().get(0); } + /** + * @deprecated Use Reference#setResource(IBaseResource) instead + */ + @Deprecated + public List getContentTarget() { + if (this.contentTarget == null) + this.contentTarget = new ArrayList(); + return this.contentTarget; + } + /** * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.) */ @@ -1144,11 +1182,11 @@ public class DocumentManifest extends DomainResource { children.add(new Property("type", "CodeableConcept", "Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.", 0, 1, type)); children.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, 1, subject)); children.add(new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, 1, created)); - children.add(new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for creating the manifest, and adding documents to it.", 0, java.lang.Integer.MAX_VALUE, author)); - children.add(new Property("recipient", "Reference(Patient|Practitioner|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient)); + children.add(new Property("agent", "", "An actor taking an active role in the manifest.", 0, java.lang.Integer.MAX_VALUE, agent)); + children.add(new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient)); children.add(new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, 1, source)); children.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description)); - children.add(new Property("content", "", "The list of Documents included in the manifest.", 0, java.lang.Integer.MAX_VALUE, content)); + children.add(new Property("content", "Reference(Any)", "The list of Resources that consist of the parts of this manifest.", 0, java.lang.Integer.MAX_VALUE, content)); children.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related)); } @@ -1161,11 +1199,11 @@ public class DocumentManifest extends DomainResource { case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.", 0, 1, type); case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, 1, subject); case 1028554472: /*created*/ return new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, 1, created); - case -1406328437: /*author*/ return new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for creating the manifest, and adding documents to it.", 0, java.lang.Integer.MAX_VALUE, author); - case 820081177: /*recipient*/ return new Property("recipient", "Reference(Patient|Practitioner|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient); + case 92750597: /*agent*/ return new Property("agent", "", "An actor taking an active role in the manifest.", 0, java.lang.Integer.MAX_VALUE, agent); + case 820081177: /*recipient*/ return new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient); case -896505829: /*source*/ return new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, 1, source); case -1724546052: /*description*/ return new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description); - case 951530617: /*content*/ return new Property("content", "", "The list of Documents included in the manifest.", 0, java.lang.Integer.MAX_VALUE, content); + case 951530617: /*content*/ return new Property("content", "Reference(Any)", "The list of Resources that consist of the parts of this manifest.", 0, java.lang.Integer.MAX_VALUE, content); case 1090493483: /*related*/ return new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -1181,11 +1219,11 @@ public class DocumentManifest extends DomainResource { case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType - case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference + case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // DocumentManifestAgentComponent case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType - case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // DocumentManifestContentComponent + case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // Reference case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // DocumentManifestRelatedComponent default: return super.getProperty(hash, name, checkValid); } @@ -1214,8 +1252,8 @@ public class DocumentManifest extends DomainResource { case 1028554472: // created this.created = castToDateTime(value); // DateTimeType return value; - case -1406328437: // author - this.getAuthor().add(castToReference(value)); // Reference + case 92750597: // agent + this.getAgent().add((DocumentManifestAgentComponent) value); // DocumentManifestAgentComponent return value; case 820081177: // recipient this.getRecipient().add(castToReference(value)); // Reference @@ -1227,7 +1265,7 @@ public class DocumentManifest extends DomainResource { this.description = castToString(value); // StringType return value; case 951530617: // content - this.getContent().add((DocumentManifestContentComponent) value); // DocumentManifestContentComponent + this.getContent().add(castToReference(value)); // Reference return value; case 1090493483: // related this.getRelated().add((DocumentManifestRelatedComponent) value); // DocumentManifestRelatedComponent @@ -1252,8 +1290,8 @@ public class DocumentManifest extends DomainResource { this.subject = castToReference(value); // Reference } else if (name.equals("created")) { this.created = castToDateTime(value); // DateTimeType - } else if (name.equals("author")) { - this.getAuthor().add(castToReference(value)); + } else if (name.equals("agent")) { + this.getAgent().add((DocumentManifestAgentComponent) value); } else if (name.equals("recipient")) { this.getRecipient().add(castToReference(value)); } else if (name.equals("source")) { @@ -1261,7 +1299,7 @@ public class DocumentManifest extends DomainResource { } else if (name.equals("description")) { this.description = castToString(value); // StringType } else if (name.equals("content")) { - this.getContent().add((DocumentManifestContentComponent) value); + this.getContent().add(castToReference(value)); } else if (name.equals("related")) { this.getRelated().add((DocumentManifestRelatedComponent) value); } else @@ -1278,7 +1316,7 @@ public class DocumentManifest extends DomainResource { case 3575610: return getType(); case -1867885268: return getSubject(); case 1028554472: return getCreatedElement(); - case -1406328437: return addAuthor(); + case 92750597: return addAgent(); case 820081177: return addRecipient(); case -896505829: return getSourceElement(); case -1724546052: return getDescriptionElement(); @@ -1298,11 +1336,11 @@ public class DocumentManifest extends DomainResource { case 3575610: /*type*/ return new String[] {"CodeableConcept"}; case -1867885268: /*subject*/ return new String[] {"Reference"}; case 1028554472: /*created*/ return new String[] {"dateTime"}; - case -1406328437: /*author*/ return new String[] {"Reference"}; + case 92750597: /*agent*/ return new String[] {}; case 820081177: /*recipient*/ return new String[] {"Reference"}; case -896505829: /*source*/ return new String[] {"uri"}; case -1724546052: /*description*/ return new String[] {"string"}; - case 951530617: /*content*/ return new String[] {}; + case 951530617: /*content*/ return new String[] {"Reference"}; case 1090493483: /*related*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); } @@ -1332,8 +1370,8 @@ public class DocumentManifest extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.created"); } - else if (name.equals("author")) { - return addAuthor(); + else if (name.equals("agent")) { + return addAgent(); } else if (name.equals("recipient")) { return addRecipient(); @@ -1372,10 +1410,10 @@ public class DocumentManifest extends DomainResource { dst.type = type == null ? null : type.copy(); dst.subject = subject == null ? null : subject.copy(); dst.created = created == null ? null : created.copy(); - if (author != null) { - dst.author = new ArrayList(); - for (Reference i : author) - dst.author.add(i.copy()); + if (agent != null) { + dst.agent = new ArrayList(); + for (DocumentManifestAgentComponent i : agent) + dst.agent.add(i.copy()); }; if (recipient != null) { dst.recipient = new ArrayList(); @@ -1385,8 +1423,8 @@ public class DocumentManifest extends DomainResource { dst.source = source == null ? null : source.copy(); dst.description = description == null ? null : description.copy(); if (content != null) { - dst.content = new ArrayList(); - for (DocumentManifestContentComponent i : content) + dst.content = new ArrayList(); + for (Reference i : content) dst.content.add(i.copy()); }; if (related != null) { @@ -1410,7 +1448,7 @@ public class DocumentManifest extends DomainResource { DocumentManifest o = (DocumentManifest) other; return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) - && compareDeep(created, o.created, true) && compareDeep(author, o.author, true) && compareDeep(recipient, o.recipient, true) + && compareDeep(created, o.created, true) && compareDeep(agent, o.agent, true) && compareDeep(recipient, o.recipient, true) && compareDeep(source, o.source, true) && compareDeep(description, o.description, true) && compareDeep(content, o.content, true) && compareDeep(related, o.related, true); } @@ -1428,7 +1466,7 @@ public class DocumentManifest extends DomainResource { public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier - , status, type, subject, created, author, recipient, source, description, content + , status, type, subject, created, agent, recipient, source, description, content , related); } @@ -1457,6 +1495,58 @@ public class DocumentManifest extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + /** + * Search parameter: agent + *

+ * Description: Who and/or what had an agent participation
+ * Type: reference
+ * Path: DocumentManifest.agent.who
+ *

+ */ + @SearchParamDefinition(name="agent", path="DocumentManifest.agent.who", description="Who and/or what had an agent participation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) + public static final String SP_AGENT = "agent"; + /** + * Fluent Client search parameter constant for agent + *

+ * Description: Who and/or what had an agent participation
+ * Type: reference
+ * Path: DocumentManifest.agent.who
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "DocumentManifest:agent". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("DocumentManifest:agent").toLocked(); + + /** + * Search parameter: item + *

+ * Description: Items in manifest
+ * Type: reference
+ * Path: DocumentManifest.content
+ *

+ */ + @SearchParamDefinition(name="item", path="DocumentManifest.content", description="Items in manifest", type="reference" ) + public static final String SP_ITEM = "item"; + /** + * Fluent Client search parameter constant for item + *

+ * Description: Items in manifest
+ * Type: reference
+ * Path: DocumentManifest.content
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ITEM); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "DocumentManifest:item". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("DocumentManifest:item").toLocked(); + /** * Search parameter: related-id *

@@ -1477,32 +1567,6 @@ public class DocumentManifest extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATED_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RELATED_ID); - /** - * Search parameter: content-ref - *

- * Description: Contents of this set of documents
- * Type: reference
- * Path: DocumentManifest.content.pReference
- *

- */ - @SearchParamDefinition(name="content-ref", path="DocumentManifest.content.p.as(Reference)", description="Contents of this set of documents", type="reference" ) - public static final String SP_CONTENT_REF = "content-ref"; - /** - * Fluent Client search parameter constant for content-ref - *

- * Description: Contents of this set of documents
- * Type: reference
- * Path: DocumentManifest.content.pReference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTENT_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTENT_REF); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "DocumentManifest:content-ref". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTENT_REF = new ca.uhn.fhir.model.api.Include("DocumentManifest:content-ref").toLocked(); - /** * Search parameter: subject *

@@ -1529,32 +1593,6 @@ public class DocumentManifest extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("DocumentManifest:subject").toLocked(); - /** - * Search parameter: author - *

- * Description: Who and/or what authored the manifest
- * Type: reference
- * Path: DocumentManifest.author
- *

- */ - @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) - public static final String SP_AUTHOR = "author"; - /** - * Fluent Client search parameter constant for author - *

- * Description: Who and/or what authored the manifest
- * Type: reference
- * Path: DocumentManifest.author
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "DocumentManifest:author". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("DocumentManifest:author").toLocked(); - /** * Search parameter: created *

@@ -1643,7 +1681,7 @@ public class DocumentManifest extends DomainResource { * Path: DocumentManifest.related.ref
*

*/ - @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" ) + @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_RELATED_REF = "related-ref"; /** * Fluent Client search parameter constant for related-ref @@ -1695,7 +1733,7 @@ public class DocumentManifest extends DomainResource { * Path: DocumentManifest.recipient
*

*/ - @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) + @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) public static final String SP_RECIPIENT = "recipient"; /** * Fluent Client search parameter constant for recipient diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentReference.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentReference.java index cc2d68e9a3d..7cd0bc28c56 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentReference.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DocumentReference.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -297,6 +297,232 @@ public class DocumentReference extends DomainResource { } } + @Block() + public static class DocumentReferenceAgentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Specification of the participation type the agent played. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How agent participated", formalDefinition="Specification of the participation type the agent played." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type") + protected CodeableConcept type; + + /** + * Identifies who is responsible for adding the information to the document. + */ + @Child(name = "who", type = {Practitioner.class, PractitionerRole.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) + protected Reference who; + + /** + * The actual object that is the target of the reference (Identifies who is responsible for adding the information to the document.) + */ + protected Resource whoTarget; + + private static final long serialVersionUID = -1480994789L; + + /** + * Constructor + */ + public DocumentReferenceAgentComponent() { + super(); + } + + /** + * Constructor + */ + public DocumentReferenceAgentComponent(Reference who) { + super(); + this.who = who; + } + + /** + * @return {@link #type} (Specification of the participation type the agent played.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceAgentComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Specification of the participation type the agent played.) + */ + public DocumentReferenceAgentComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #who} (Identifies who is responsible for adding the information to the document.) + */ + public Reference getWho() { + if (this.who == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DocumentReferenceAgentComponent.who"); + else if (Configuration.doAutoCreate()) + this.who = new Reference(); // cc + return this.who; + } + + public boolean hasWho() { + return this.who != null && !this.who.isEmpty(); + } + + /** + * @param value {@link #who} (Identifies who is responsible for adding the information to the document.) + */ + public DocumentReferenceAgentComponent setWho(Reference value) { + this.who = value; + return this; + } + + /** + * @return {@link #who} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies who is responsible for adding the information to the document.) + */ + public Resource getWhoTarget() { + return this.whoTarget; + } + + /** + * @param value {@link #who} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies who is responsible for adding the information to the document.) + */ + public DocumentReferenceAgentComponent setWhoTarget(Resource value) { + this.whoTarget = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "Specification of the participation type the agent played.", 0, 1, type)); + children.add(new Property("who", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for adding the information to the document.", 0, 1, who)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specification of the participation type the agent played.", 0, 1, type); + case 117694: /*who*/ return new Property("who", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for adding the information to the document.", 0, 1, who); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 117694: /*who*/ return this.who == null ? new Base[0] : new Base[] {this.who}; // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; + case 117694: // who + this.who = castToReference(value); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("who")) { + this.who = castToReference(value); // Reference + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: return getType(); + case 117694: return getWho(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 117694: /*who*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("who")) { + this.who = new Reference(); + return this.who; + } + else + return super.addChild(name); + } + + public DocumentReferenceAgentComponent copy() { + DocumentReferenceAgentComponent dst = new DocumentReferenceAgentComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.who = who == null ? null : who.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DocumentReferenceAgentComponent)) + return false; + DocumentReferenceAgentComponent o = (DocumentReferenceAgentComponent) other; + return compareDeep(type, o.type, true) && compareDeep(who, o.who, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DocumentReferenceAgentComponent)) + return false; + DocumentReferenceAgentComponent o = (DocumentReferenceAgentComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, who); + } + + public String fhirType() { + return "DocumentReference.agent"; + + } + + } + @Block() public static class DocumentReferenceRelatesToComponent extends BackboneElement implements IBaseBackboneElement { /** @@ -762,7 +988,7 @@ public class DocumentReference extends DomainResource { /** * Describes the clinical encounter or type of care that the document content is associated with. */ - @Child(name = "encounter", type = {Encounter.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "encounter", type = {Encounter.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Context of the document content", formalDefinition="Describes the clinical encounter or type of care that the document content is associated with." ) protected Reference encounter; @@ -774,7 +1000,7 @@ public class DocumentReference extends DomainResource { /** * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act. */ - @Child(name = "event", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "event", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Main clinical acts documented", formalDefinition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ActCode") protected List event; @@ -789,7 +1015,7 @@ public class DocumentReference extends DomainResource { /** * The kind of facility where the patient was seen. */ - @Child(name = "facilityType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "facilityType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Kind of facility where patient was seen", formalDefinition="The kind of facility where the patient was seen." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-facilitycodes") protected CodeableConcept facilityType; @@ -797,7 +1023,7 @@ public class DocumentReference extends DomainResource { /** * This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty. */ - @Child(name = "practiceSetting", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "practiceSetting", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Additional details about where the content was created (e.g. clinical specialty)", formalDefinition="This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes") protected CodeableConcept practiceSetting; @@ -805,7 +1031,7 @@ public class DocumentReference extends DomainResource { /** * The Patient Information as known when the document was published. May be a reference to a version specific, or contained. */ - @Child(name = "sourcePatientInfo", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "sourcePatientInfo", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Patient demographics from source", formalDefinition="The Patient Information as known when the document was published. May be a reference to a version specific, or contained." ) protected Reference sourcePatientInfo; @@ -817,7 +1043,7 @@ public class DocumentReference extends DomainResource { /** * Related identifiers or resources associated with the DocumentReference. */ - @Child(name = "related", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "related", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Related identifiers or resources", formalDefinition="Related identifiers or resources associated with the DocumentReference." ) protected List related; @@ -1310,14 +1536,14 @@ public class DocumentReference extends DomainResource { /** * Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing. */ - @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Identifier of related objects or events", formalDefinition="Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing." ) protected Identifier identifier; /** * Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing. */ - @Child(name = "ref", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "ref", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing." ) protected Reference ref; @@ -1555,7 +1781,7 @@ public class DocumentReference extends DomainResource { /** * Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced. */ - @Child(name = "type", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Kind of document (LOINC if possible)", formalDefinition="Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-doc-typecodes") protected CodeableConcept type; @@ -1583,33 +1809,28 @@ public class DocumentReference extends DomainResource { /** * When the document was created. */ - @Child(name = "created", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "created", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Document creation time", formalDefinition="When the document was created." ) protected DateTimeType created; /** * When the document reference was created. */ - @Child(name = "indexed", type = {InstantType.class}, order=8, min=1, max=1, modifier=false, summary=true) + @Child(name = "date", type = {InstantType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="When this document reference was created", formalDefinition="When the document reference was created." ) - protected InstantType indexed; + protected InstantType date; /** - * Identifies who is responsible for adding the information to the document. + * An actor taking an active role in the document. */ - @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." ) - protected List author; - /** - * The actual objects that are the target of the reference (Identifies who is responsible for adding the information to the document.) - */ - protected List authorTarget; - + @Child(name = "agent", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Agent involved", formalDefinition="An actor taking an active role in the document." ) + protected List agent; /** * Which person or organization authenticates that this document is valid. */ - @Child(name = "authenticator", type = {Practitioner.class, Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "authenticator", type = {Practitioner.class, Organization.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Who/what authenticated the document", formalDefinition="Which person or organization authenticates that this document is valid." ) protected Reference authenticator; @@ -1621,7 +1842,7 @@ public class DocumentReference extends DomainResource { /** * Identifies the organization or group who is responsible for ongoing maintenance of and access to the document. */ - @Child(name = "custodian", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "custodian", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Organization which maintains the document", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." ) protected Reference custodian; @@ -1666,7 +1887,7 @@ public class DocumentReference extends DomainResource { @Description(shortDefinition="Clinical context of document", formalDefinition="The clinical context in which the document was prepared." ) protected DocumentReferenceContextComponent context; - private static final long serialVersionUID = 1465770040L; + private static final long serialVersionUID = 1762186370L; /** * Constructor @@ -1678,11 +1899,9 @@ public class DocumentReference extends DomainResource { /** * Constructor */ - public DocumentReference(Enumeration status, CodeableConcept type, InstantType indexed) { + public DocumentReference(Enumeration status) { super(); this.status = status; - this.type = type; - this.indexed = indexed; } /** @@ -1993,111 +2212,105 @@ public class DocumentReference extends DomainResource { } /** - * @return {@link #indexed} (When the document reference was created.). This is the underlying object with id, value and extensions. The accessor "getIndexed" gives direct access to the value + * @return {@link #date} (When the document reference was created.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value */ - public InstantType getIndexedElement() { - if (this.indexed == null) + public InstantType getDateElement() { + if (this.date == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DocumentReference.indexed"); + throw new Error("Attempt to auto-create DocumentReference.date"); else if (Configuration.doAutoCreate()) - this.indexed = new InstantType(); // bb - return this.indexed; + this.date = new InstantType(); // bb + return this.date; } - public boolean hasIndexedElement() { - return this.indexed != null && !this.indexed.isEmpty(); + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); } - public boolean hasIndexed() { - return this.indexed != null && !this.indexed.isEmpty(); + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); } /** - * @param value {@link #indexed} (When the document reference was created.). This is the underlying object with id, value and extensions. The accessor "getIndexed" gives direct access to the value + * @param value {@link #date} (When the document reference was created.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value */ - public DocumentReference setIndexedElement(InstantType value) { - this.indexed = value; + public DocumentReference setDateElement(InstantType value) { + this.date = value; return this; } /** * @return When the document reference was created. */ - public Date getIndexed() { - return this.indexed == null ? null : this.indexed.getValue(); + public Date getDate() { + return this.date == null ? null : this.date.getValue(); } /** * @param value When the document reference was created. */ - public DocumentReference setIndexed(Date value) { - if (this.indexed == null) - this.indexed = new InstantType(); - this.indexed.setValue(value); + public DocumentReference setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new InstantType(); + this.date.setValue(value); + } return this; } /** - * @return {@link #author} (Identifies who is responsible for adding the information to the document.) + * @return {@link #agent} (An actor taking an active role in the document.) */ - public List getAuthor() { - if (this.author == null) - this.author = new ArrayList(); - return this.author; + public List getAgent() { + if (this.agent == null) + this.agent = new ArrayList(); + return this.agent; } /** * @return Returns a reference to this for easy method chaining */ - public DocumentReference setAuthor(List theAuthor) { - this.author = theAuthor; + public DocumentReference setAgent(List theAgent) { + this.agent = theAgent; return this; } - public boolean hasAuthor() { - if (this.author == null) + public boolean hasAgent() { + if (this.agent == null) return false; - for (Reference item : this.author) + for (DocumentReferenceAgentComponent item : this.agent) if (!item.isEmpty()) return true; return false; } - public Reference addAuthor() { //3 - Reference t = new Reference(); - if (this.author == null) - this.author = new ArrayList(); - this.author.add(t); + public DocumentReferenceAgentComponent addAgent() { //3 + DocumentReferenceAgentComponent t = new DocumentReferenceAgentComponent(); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return t; } - public DocumentReference addAuthor(Reference t) { //3 + public DocumentReference addAgent(DocumentReferenceAgentComponent t) { //3 if (t == null) return this; - if (this.author == null) - this.author = new ArrayList(); - this.author.add(t); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return this; } /** - * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist + * @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist */ - public Reference getAuthorFirstRep() { - if (getAuthor().isEmpty()) { - addAuthor(); + public DocumentReferenceAgentComponent getAgentFirstRep() { + if (getAgent().isEmpty()) { + addAgent(); } - return getAuthor().get(0); - } - - /** - * @deprecated Use Reference#setResource(IBaseResource) instead - */ - @Deprecated - public List getAuthorTarget() { - if (this.authorTarget == null) - this.authorTarget = new ArrayList(); - return this.authorTarget; + return getAgent().get(0); } /** @@ -2425,8 +2638,8 @@ public class DocumentReference extends DomainResource { children.add(new Property("class", "CodeableConcept", "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", 0, 1, class_)); children.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", 0, 1, subject)); children.add(new Property("created", "dateTime", "When the document was created.", 0, 1, created)); - children.add(new Property("indexed", "instant", "When the document reference was created.", 0, 1, indexed)); - children.add(new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for adding the information to the document.", 0, java.lang.Integer.MAX_VALUE, author)); + children.add(new Property("date", "instant", "When the document reference was created.", 0, 1, date)); + children.add(new Property("agent", "", "An actor taking an active role in the document.", 0, java.lang.Integer.MAX_VALUE, agent)); children.add(new Property("authenticator", "Reference(Practitioner|Organization)", "Which person or organization authenticates that this document is valid.", 0, 1, authenticator)); children.add(new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", 0, 1, custodian)); children.add(new Property("relatesTo", "", "Relationships that this document has with other document references that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo)); @@ -2447,8 +2660,8 @@ public class DocumentReference extends DomainResource { case 94742904: /*class*/ return new Property("class", "CodeableConcept", "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", 0, 1, class_); case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", 0, 1, subject); case 1028554472: /*created*/ return new Property("created", "dateTime", "When the document was created.", 0, 1, created); - case 1943292145: /*indexed*/ return new Property("indexed", "instant", "When the document reference was created.", 0, 1, indexed); - case -1406328437: /*author*/ return new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for adding the information to the document.", 0, java.lang.Integer.MAX_VALUE, author); + case 3076014: /*date*/ return new Property("date", "instant", "When the document reference was created.", 0, 1, date); + case 92750597: /*agent*/ return new Property("agent", "", "An actor taking an active role in the document.", 0, java.lang.Integer.MAX_VALUE, agent); case 1815000435: /*authenticator*/ return new Property("authenticator", "Reference(Practitioner|Organization)", "Which person or organization authenticates that this document is valid.", 0, 1, authenticator); case 1611297262: /*custodian*/ return new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", 0, 1, custodian); case -7765931: /*relatesTo*/ return new Property("relatesTo", "", "Relationships that this document has with other document references that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo); @@ -2472,8 +2685,8 @@ public class DocumentReference extends DomainResource { case 94742904: /*class*/ return this.class_ == null ? new Base[0] : new Base[] {this.class_}; // CodeableConcept case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType - case 1943292145: /*indexed*/ return this.indexed == null ? new Base[0] : new Base[] {this.indexed}; // InstantType - case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference + case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // InstantType + case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // DocumentReferenceAgentComponent case 1815000435: /*authenticator*/ return this.authenticator == null ? new Base[0] : new Base[] {this.authenticator}; // Reference case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference case -7765931: /*relatesTo*/ return this.relatesTo == null ? new Base[0] : this.relatesTo.toArray(new Base[this.relatesTo.size()]); // DocumentReferenceRelatesToComponent @@ -2515,11 +2728,11 @@ public class DocumentReference extends DomainResource { case 1028554472: // created this.created = castToDateTime(value); // DateTimeType return value; - case 1943292145: // indexed - this.indexed = castToInstant(value); // InstantType + case 3076014: // date + this.date = castToInstant(value); // InstantType return value; - case -1406328437: // author - this.getAuthor().add(castToReference(value)); // Reference + case 92750597: // agent + this.getAgent().add((DocumentReferenceAgentComponent) value); // DocumentReferenceAgentComponent return value; case 1815000435: // authenticator this.authenticator = castToReference(value); // Reference @@ -2567,10 +2780,10 @@ public class DocumentReference extends DomainResource { this.subject = castToReference(value); // Reference } else if (name.equals("created")) { this.created = castToDateTime(value); // DateTimeType - } else if (name.equals("indexed")) { - this.indexed = castToInstant(value); // InstantType - } else if (name.equals("author")) { - this.getAuthor().add(castToReference(value)); + } else if (name.equals("date")) { + this.date = castToInstant(value); // InstantType + } else if (name.equals("agent")) { + this.getAgent().add((DocumentReferenceAgentComponent) value); } else if (name.equals("authenticator")) { this.authenticator = castToReference(value); // Reference } else if (name.equals("custodian")) { @@ -2601,8 +2814,8 @@ public class DocumentReference extends DomainResource { case 94742904: return getClass_(); case -1867885268: return getSubject(); case 1028554472: return getCreatedElement(); - case 1943292145: return getIndexedElement(); - case -1406328437: return addAuthor(); + case 3076014: return getDateElement(); + case 92750597: return addAgent(); case 1815000435: return getAuthenticator(); case 1611297262: return getCustodian(); case -7765931: return addRelatesTo(); @@ -2626,8 +2839,8 @@ public class DocumentReference extends DomainResource { case 94742904: /*class*/ return new String[] {"CodeableConcept"}; case -1867885268: /*subject*/ return new String[] {"Reference"}; case 1028554472: /*created*/ return new String[] {"dateTime"}; - case 1943292145: /*indexed*/ return new String[] {"instant"}; - case -1406328437: /*author*/ return new String[] {"Reference"}; + case 3076014: /*date*/ return new String[] {"instant"}; + case 92750597: /*agent*/ return new String[] {}; case 1815000435: /*authenticator*/ return new String[] {"Reference"}; case 1611297262: /*custodian*/ return new String[] {"Reference"}; case -7765931: /*relatesTo*/ return new String[] {}; @@ -2670,11 +2883,11 @@ public class DocumentReference extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.created"); } - else if (name.equals("indexed")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.indexed"); + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.date"); } - else if (name.equals("author")) { - return addAuthor(); + else if (name.equals("agent")) { + return addAgent(); } else if (name.equals("authenticator")) { this.authenticator = new Reference(); @@ -2724,11 +2937,11 @@ public class DocumentReference extends DomainResource { dst.class_ = class_ == null ? null : class_.copy(); dst.subject = subject == null ? null : subject.copy(); dst.created = created == null ? null : created.copy(); - dst.indexed = indexed == null ? null : indexed.copy(); - if (author != null) { - dst.author = new ArrayList(); - for (Reference i : author) - dst.author.add(i.copy()); + dst.date = date == null ? null : date.copy(); + if (agent != null) { + dst.agent = new ArrayList(); + for (DocumentReferenceAgentComponent i : agent) + dst.agent.add(i.copy()); }; dst.authenticator = authenticator == null ? null : authenticator.copy(); dst.custodian = custodian == null ? null : custodian.copy(); @@ -2766,7 +2979,7 @@ public class DocumentReference extends DomainResource { return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(docStatus, o.docStatus, true) && compareDeep(type, o.type, true) && compareDeep(class_, o.class_, true) && compareDeep(subject, o.subject, true) && compareDeep(created, o.created, true) - && compareDeep(indexed, o.indexed, true) && compareDeep(author, o.author, true) && compareDeep(authenticator, o.authenticator, true) + && compareDeep(date, o.date, true) && compareDeep(agent, o.agent, true) && compareDeep(authenticator, o.authenticator, true) && compareDeep(custodian, o.custodian, true) && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(description, o.description, true) && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(content, o.content, true) && compareDeep(context, o.context, true) ; @@ -2780,12 +2993,12 @@ public class DocumentReference extends DomainResource { return false; DocumentReference o = (DocumentReference) other; return compareValues(status, o.status, true) && compareValues(docStatus, o.docStatus, true) && compareValues(created, o.created, true) - && compareValues(indexed, o.indexed, true) && compareValues(description, o.description, true); + && compareValues(date, o.date, true) && compareValues(description, o.description, true); } public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier - , status, docStatus, type, class_, subject, created, indexed, author, authenticator + , status, docStatus, type, class_, subject, created, date, agent, authenticator , custodian, relatesTo, description, securityLabel, content, context); } @@ -2794,6 +3007,26 @@ public class DocumentReference extends DomainResource { return ResourceType.DocumentReference; } + /** + * Search parameter: date + *

+ * Description: When this document reference was created
+ * Type: date
+ * Path: DocumentReference.date
+ *

+ */ + @SearchParamDefinition(name="date", path="DocumentReference.date", description="When this document reference was created", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: When this document reference was created
+ * Type: date
+ * Path: DocumentReference.date
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); + /** * Search parameter: securitylabel *

@@ -2814,6 +3047,32 @@ public class DocumentReference extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam SECURITYLABEL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SECURITYLABEL); + /** + * Search parameter: agent + *

+ * Description: Who and/or what authored the document
+ * Type: reference
+ * Path: DocumentReference.agent.who
+ *

+ */ + @SearchParamDefinition(name="agent", path="DocumentReference.agent.who", description="Who and/or what authored the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) + public static final String SP_AGENT = "agent"; + /** + * Fluent Client search parameter constant for agent + *

+ * Description: Who and/or what authored the document
+ * Type: reference
+ * Path: DocumentReference.agent.who
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "DocumentReference:agent". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("DocumentReference:agent").toLocked(); + /** * Search parameter: subject *

@@ -3138,52 +3397,6 @@ public class DocumentReference extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_CUSTODIAN = new ca.uhn.fhir.model.api.Include("DocumentReference:custodian").toLocked(); - /** - * Search parameter: indexed - *

- * Description: When this document reference was created
- * Type: date
- * Path: DocumentReference.indexed
- *

- */ - @SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference was created", type="date" ) - public static final String SP_INDEXED = "indexed"; - /** - * Fluent Client search parameter constant for indexed - *

- * Description: When this document reference was created
- * Type: date
- * Path: DocumentReference.indexed
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam INDEXED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_INDEXED); - - /** - * Search parameter: author - *

- * Description: Who and/or what authored the document
- * Type: reference
- * Path: DocumentReference.author
- *

- */ - @SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) - public static final String SP_AUTHOR = "author"; - /** - * Fluent Client search parameter constant for author - *

- * Description: Who and/or what authored the document
- * Type: reference
- * Path: DocumentReference.author
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "DocumentReference:author". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("DocumentReference:author").toLocked(); - /** * Search parameter: created *

@@ -3250,6 +3463,26 @@ public class DocumentReference extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("DocumentReference:encounter").toLocked(); + /** + * Search parameter: contenttype + *

+ * Description: Mime type of the content, with charset etc.
+ * Type: token
+ * Path: DocumentReference.content.attachment.contentType
+ *

+ */ + @SearchParamDefinition(name="contenttype", path="DocumentReference.content.attachment.contentType", description="Mime type of the content, with charset etc.", type="token" ) + public static final String SP_CONTENTTYPE = "contenttype"; + /** + * Fluent Client search parameter constant for contenttype + *

+ * Description: Mime type of the content, with charset etc.
+ * Type: token
+ * Path: DocumentReference.content.attachment.contentType
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTENTTYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTENTTYPE); + /** * Search parameter: related-ref *

diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DomainResource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DomainResource.java index f773c5d7159..31ab812573f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DomainResource.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/DomainResource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Dosage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Dosage.java index 498163df785..16304817a42 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Dosage.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Dosage.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -62,10 +62,10 @@ public class Dosage extends Type implements ICompositeType { protected StringType text; /** - * Supplemental instruction - e.g. "with meals". + * Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps"). */ @Child(name = "additionalInstruction", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Supplemental instruction - e.g. \"with meals\"", formalDefinition="Supplemental instruction - e.g. \"with meals\"." ) + @Description(shortDefinition="Supplemental instruction or warnings to the patient - e.g. \"with meals\", \"may cause drowsiness\"", formalDefinition="Supplemental instructions to the patient on how to take the medication (e.g. \"with meals\" or\"take half to one hour before food\") or warnings for the patient about the medication (e.g. \"may cause drowsiness\" or \"avoid exposure of skin to direct sunlight or sunlamps\")." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/additional-instruction-codes") protected List additionalInstruction; @@ -254,7 +254,7 @@ public class Dosage extends Type implements ICompositeType { } /** - * @return {@link #additionalInstruction} (Supplemental instruction - e.g. "with meals".) + * @return {@link #additionalInstruction} (Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps").) */ public List getAdditionalInstruction() { if (this.additionalInstruction == null) @@ -675,7 +675,7 @@ public class Dosage extends Type implements ICompositeType { super.listChildren(children); children.add(new Property("sequence", "integer", "Indicates the order in which the dosage instructions should be applied or interpreted.", 0, 1, sequence)); children.add(new Property("text", "string", "Free text dosage instructions e.g. SIG.", 0, 1, text)); - children.add(new Property("additionalInstruction", "CodeableConcept", "Supplemental instruction - e.g. \"with meals\".", 0, java.lang.Integer.MAX_VALUE, additionalInstruction)); + children.add(new Property("additionalInstruction", "CodeableConcept", "Supplemental instructions to the patient on how to take the medication (e.g. \"with meals\" or\"take half to one hour before food\") or warnings for the patient about the medication (e.g. \"may cause drowsiness\" or \"avoid exposure of skin to direct sunlight or sunlamps\").", 0, java.lang.Integer.MAX_VALUE, additionalInstruction)); children.add(new Property("patientInstruction", "string", "Instructions in terms that are understood by the patient or consumer.", 0, 1, patientInstruction)); children.add(new Property("timing", "Timing", "When medication should be administered.", 0, 1, timing)); children.add(new Property("asNeeded[x]", "boolean|CodeableConcept", "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).", 0, 1, asNeeded)); @@ -694,7 +694,7 @@ public class Dosage extends Type implements ICompositeType { switch (_hash) { case 1349547969: /*sequence*/ return new Property("sequence", "integer", "Indicates the order in which the dosage instructions should be applied or interpreted.", 0, 1, sequence); case 3556653: /*text*/ return new Property("text", "string", "Free text dosage instructions e.g. SIG.", 0, 1, text); - case 1623641575: /*additionalInstruction*/ return new Property("additionalInstruction", "CodeableConcept", "Supplemental instruction - e.g. \"with meals\".", 0, java.lang.Integer.MAX_VALUE, additionalInstruction); + case 1623641575: /*additionalInstruction*/ return new Property("additionalInstruction", "CodeableConcept", "Supplemental instructions to the patient on how to take the medication (e.g. \"with meals\" or\"take half to one hour before food\") or warnings for the patient about the medication (e.g. \"may cause drowsiness\" or \"avoid exposure of skin to direct sunlight or sunlamps\").", 0, java.lang.Integer.MAX_VALUE, additionalInstruction); case 737543241: /*patientInstruction*/ return new Property("patientInstruction", "string", "Instructions in terms that are understood by the patient or consumer.", 0, 1, patientInstruction); case -873664438: /*timing*/ return new Property("timing", "Timing", "When medication should be administered.", 0, 1, timing); case -544329575: /*asNeeded[x]*/ return new Property("asNeeded[x]", "boolean|CodeableConcept", "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).", 0, 1, asNeeded); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Duration.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Duration.java index ad2988746c9..831e68b8c02 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Duration.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Duration.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Element.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Element.java index 7f89f7489fe..625b74e2386 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Element.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Element.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ElementDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ElementDefinition.java index c94e46cd95a..82916b180d6 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ElementDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ElementDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityRequest.java index 208db52eb4e..8b2cf83c122 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityResponse.java index b6166f6af13..e2bf4020ec6 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EligibilityResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1687,10 +1687,10 @@ public class EligibilityResponse extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name = "outcome", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Child(name = "outcome", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="complete | error | partial", formalDefinition="Transaction status: error, complete." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") - protected CodeableConcept outcome; + protected Enumeration outcome; /** * A description of the status of the adjudication. @@ -1740,7 +1740,7 @@ public class EligibilityResponse extends DomainResource { @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." ) protected List error; - private static final long serialVersionUID = 954270539L; + private static final long serialVersionUID = -1850509253L; /** * Constructor @@ -2033,29 +2033,54 @@ public class EligibilityResponse extends DomainResource { } /** - * @return {@link #outcome} (Transaction status: error, complete.) + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public CodeableConcept getOutcome() { + public Enumeration getOutcomeElement() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create EligibilityResponse.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb return this.outcome; } + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (Transaction status: error, complete.) + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public EligibilityResponse setOutcome(CodeableConcept value) { + public EligibilityResponse setOutcomeElement(Enumeration value) { this.outcome = value; return this; } + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public EligibilityResponse setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + /** * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value */ @@ -2332,7 +2357,7 @@ public class EligibilityResponse extends DomainResource { children.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); children.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization)); children.add(new Property("request", "Reference(EligibilityRequest)", "Original request resource reference.", 0, 1, request)); - children.add(new Property("outcome", "CodeableConcept", "Transaction status: error, complete.", 0, 1, outcome)); + children.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, 1, outcome)); children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); children.add(new Property("insurer", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, insurer)); children.add(new Property("inforce", "boolean", "Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.", 0, 1, inforce)); @@ -2350,7 +2375,7 @@ public class EligibilityResponse extends DomainResource { case 1601527200: /*requestProvider*/ return new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider); case 599053666: /*requestOrganization*/ return new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization); case 1095692943: /*request*/ return new Property("request", "Reference(EligibilityRequest)", "Original request resource reference.", 0, 1, request); - case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Transaction status: error, complete.", 0, 1, outcome); + case -1106507950: /*outcome*/ return new Property("outcome", "code", "Transaction status: error, complete.", 0, 1, outcome); case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); case 1957615864: /*insurer*/ return new Property("insurer", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, insurer); case 1945431270: /*inforce*/ return new Property("inforce", "boolean", "Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.", 0, 1, inforce); @@ -2371,7 +2396,7 @@ public class EligibilityResponse extends DomainResource { case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference - case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept + case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType case 1957615864: /*insurer*/ return this.insurer == null ? new Base[0] : new Base[] {this.insurer}; // Reference case 1945431270: /*inforce*/ return this.inforce == null ? new Base[0] : new Base[] {this.inforce}; // BooleanType @@ -2406,7 +2431,8 @@ public class EligibilityResponse extends DomainResource { this.request = castToReference(value); // Reference return value; case -1106507950: // outcome - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration return value; case 583380919: // disposition this.disposition = castToString(value); // StringType @@ -2447,7 +2473,8 @@ public class EligibilityResponse extends DomainResource { } else if (name.equals("request")) { this.request = castToReference(value); // Reference } else if (name.equals("outcome")) { - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration } else if (name.equals("disposition")) { this.disposition = castToString(value); // StringType } else if (name.equals("insurer")) { @@ -2474,7 +2501,7 @@ public class EligibilityResponse extends DomainResource { case 1601527200: return getRequestProvider(); case 599053666: return getRequestOrganization(); case 1095692943: return getRequest(); - case -1106507950: return getOutcome(); + case -1106507950: return getOutcomeElement(); case 583380919: return getDispositionElement(); case 1957615864: return getInsurer(); case 1945431270: return getInforceElement(); @@ -2495,7 +2522,7 @@ public class EligibilityResponse extends DomainResource { case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; case 599053666: /*requestOrganization*/ return new String[] {"Reference"}; case 1095692943: /*request*/ return new String[] {"Reference"}; - case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; + case -1106507950: /*outcome*/ return new String[] {"code"}; case 583380919: /*disposition*/ return new String[] {"string"}; case 1957615864: /*insurer*/ return new String[] {"Reference"}; case 1945431270: /*inforce*/ return new String[] {"boolean"}; @@ -2531,8 +2558,7 @@ public class EligibilityResponse extends DomainResource { return this.request; } else if (name.equals("outcome")) { - this.outcome = new CodeableConcept(); - return this.outcome; + throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.outcome"); } else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.disposition"); @@ -2619,8 +2645,8 @@ public class EligibilityResponse extends DomainResource { if (!(other instanceof EligibilityResponse)) return false; EligibilityResponse o = (EligibilityResponse) other; - return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) - && compareValues(inforce, o.inforce, true); + return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) + && compareValues(disposition, o.disposition, true) && compareValues(inforce, o.inforce, true); } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Encounter.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Encounter.java index 9ed475047d1..0e44e3c267f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Encounter.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Encounter.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Endpoint.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Endpoint.java index ff36df6cae6..83b29ffd7e9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Endpoint.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Endpoint.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentRequest.java index 952bc6fb554..b442db06301 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentResponse.java index 3949cd938ff..312e44bff81 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EnrollmentResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -203,10 +203,10 @@ public class EnrollmentResponse extends DomainResource { /** * Processing status: error, complete. */ - @Child(name = "outcome", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Child(name = "outcome", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="complete | error | partial", formalDefinition="Processing status: error, complete." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") - protected CodeableConcept outcome; + protected Enumeration outcome; /** * A description of the status of the adjudication. @@ -258,7 +258,7 @@ public class EnrollmentResponse extends DomainResource { */ protected Organization requestOrganizationTarget; - private static final long serialVersionUID = -386781115L; + private static final long serialVersionUID = 1059816193L; /** * Constructor @@ -414,29 +414,54 @@ public class EnrollmentResponse extends DomainResource { } /** - * @return {@link #outcome} (Processing status: error, complete.) + * @return {@link #outcome} (Processing status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public CodeableConcept getOutcome() { + public Enumeration getOutcomeElement() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create EnrollmentResponse.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb return this.outcome; } + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (Processing status: error, complete.) + * @param value {@link #outcome} (Processing status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public EnrollmentResponse setOutcome(CodeableConcept value) { + public EnrollmentResponse setOutcomeElement(Enumeration value) { this.outcome = value; return this; } + /** + * @return Processing status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Processing status: error, complete. + */ + public EnrollmentResponse setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + /** * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value */ @@ -672,7 +697,7 @@ public class EnrollmentResponse extends DomainResource { children.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); children.add(new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, 1, request)); - children.add(new Property("outcome", "CodeableConcept", "Processing status: error, complete.", 0, 1, outcome)); + children.add(new Property("outcome", "code", "Processing status: error, complete.", 0, 1, outcome)); children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); children.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created)); children.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization)); @@ -686,7 +711,7 @@ public class EnrollmentResponse extends DomainResource { case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier); case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); case 1095692943: /*request*/ return new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, 1, request); - case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Processing status: error, complete.", 0, 1, outcome); + case -1106507950: /*outcome*/ return new Property("outcome", "code", "Processing status: error, complete.", 0, 1, outcome); case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created); case 1178922291: /*organization*/ return new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization); @@ -703,7 +728,7 @@ public class EnrollmentResponse extends DomainResource { case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference - case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept + case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference @@ -728,7 +753,8 @@ public class EnrollmentResponse extends DomainResource { this.request = castToReference(value); // Reference return value; case -1106507950: // outcome - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration return value; case 583380919: // disposition this.disposition = castToString(value); // StringType @@ -760,7 +786,8 @@ public class EnrollmentResponse extends DomainResource { } else if (name.equals("request")) { this.request = castToReference(value); // Reference } else if (name.equals("outcome")) { - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration } else if (name.equals("disposition")) { this.disposition = castToString(value); // StringType } else if (name.equals("created")) { @@ -782,7 +809,7 @@ public class EnrollmentResponse extends DomainResource { case -1618432855: return addIdentifier(); case -892481550: return getStatusElement(); case 1095692943: return getRequest(); - case -1106507950: return getOutcome(); + case -1106507950: return getOutcomeElement(); case 583380919: return getDispositionElement(); case 1028554472: return getCreatedElement(); case 1178922291: return getOrganization(); @@ -799,7 +826,7 @@ public class EnrollmentResponse extends DomainResource { case -1618432855: /*identifier*/ return new String[] {"Identifier"}; case -892481550: /*status*/ return new String[] {"code"}; case 1095692943: /*request*/ return new String[] {"Reference"}; - case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; + case -1106507950: /*outcome*/ return new String[] {"code"}; case 583380919: /*disposition*/ return new String[] {"string"}; case 1028554472: /*created*/ return new String[] {"dateTime"}; case 1178922291: /*organization*/ return new String[] {"Reference"}; @@ -823,8 +850,7 @@ public class EnrollmentResponse extends DomainResource { return this.request; } else if (name.equals("outcome")) { - this.outcome = new CodeableConcept(); - return this.outcome; + throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.outcome"); } else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.disposition"); @@ -896,8 +922,8 @@ public class EnrollmentResponse extends DomainResource { if (!(other instanceof EnrollmentResponse)) return false; EnrollmentResponse o = (EnrollmentResponse) other; - return compareValues(status, o.status, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true) - ; + return compareValues(status, o.status, true) && compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) + && compareValues(created, o.created, true); } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Enumerations.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Enumerations.java index 42d93a0d60a..d8bbb589c32 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Enumerations.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Enumerations.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import org.hl7.fhir.instance.model.api.*; @@ -1113,7 +1113,7 @@ public class Enumerations { */ TIMING, /** - * A description of a triggering event. + * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. */ TRIGGERDEFINITION, /** @@ -1463,7 +1463,7 @@ public class Enumerations { case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different signature approaches have different utilities."; case SIMPLEQUANTITY: return ""; case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."; - case TRIGGERDEFINITION: return "A description of a triggering event."; + case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."; case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."; case BASE64BINARY: return "A stream of bytes"; case BOOLEAN: return "Value of \"true\" or \"false\""; @@ -2139,7 +2139,7 @@ public class Enumerations { */ TIMING, /** - * A description of a triggering event. + * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. */ TRIGGERDEFINITION, /** @@ -2274,6 +2274,10 @@ public class Enumerations { * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. */ CARETEAM, + /** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ + CATALOGENTRY, /** * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. */ @@ -2402,6 +2406,10 @@ public class Enumerations { * The EventDefinition resource provides a reusable description of when a particular event can occur. */ EVENTDEFINITION, + /** + * Example of workflow instance. + */ + EXAMPLESCENARIO, /** * Resource to define constraints on the Expansion of a FHIR ValueSet. */ @@ -2503,7 +2511,7 @@ public class Enumerations { */ MEDICATIONREQUEST, /** - * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. */ MEDICATIONSTATEMENT, /** @@ -2646,6 +2654,10 @@ public class Enumerations { * A sample to be used for analysis. */ SPECIMEN, + /** + * A kind of specimen with associated set of requirements. + */ + SPECIMENDEFINITION, /** * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. */ @@ -2841,6 +2853,8 @@ public class Enumerations { return CAREPLAN; if ("CareTeam".equals(codeString)) return CARETEAM; + if ("CatalogEntry".equals(codeString)) + return CATALOGENTRY; if ("ChargeItem".equals(codeString)) return CHARGEITEM; if ("Claim".equals(codeString)) @@ -2905,6 +2919,8 @@ public class Enumerations { return EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -3027,6 +3043,8 @@ public class Enumerations { return SLOT; if ("Specimen".equals(codeString)) return SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -3125,6 +3143,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -3157,6 +3176,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -3218,6 +3238,7 @@ public class Enumerations { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -3304,6 +3325,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types"; case CAREPLAN: return "http://hl7.org/fhir/resource-types"; case CARETEAM: return "http://hl7.org/fhir/resource-types"; + case CATALOGENTRY: return "http://hl7.org/fhir/resource-types"; case CHARGEITEM: return "http://hl7.org/fhir/resource-types"; case CLAIM: return "http://hl7.org/fhir/resource-types"; case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; @@ -3336,6 +3358,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types"; case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; @@ -3397,6 +3420,7 @@ public class Enumerations { case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types"; case SLOT: return "http://hl7.org/fhir/resource-types"; case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; @@ -3449,7 +3473,7 @@ public class Enumerations { case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different signature approaches have different utilities."; case SIMPLEQUANTITY: return ""; case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."; - case TRIGGERDEFINITION: return "A description of a triggering event."; + case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."; case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."; case BASE64BINARY: return "A stream of bytes"; case BOOLEAN: return "Value of \"true\" or \"false\""; @@ -3483,6 +3507,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog."; case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."; case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; @@ -3515,6 +3540,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur."; + case EXAMPLESCENARIO: return "Example of workflow instance."; case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient."; @@ -3540,7 +3566,7 @@ public class Enumerations { case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; - case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."; case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; @@ -3576,6 +3602,7 @@ public class Enumerations { case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; case SPECIMEN: return "A sample to be used for analysis."; + case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements."; case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."; case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; @@ -3662,6 +3689,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -3694,6 +3722,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -3755,6 +3784,7 @@ public class Enumerations { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -3914,6 +3944,8 @@ public class Enumerations { return FHIRAllTypes.CAREPLAN; if ("CareTeam".equals(codeString)) return FHIRAllTypes.CARETEAM; + if ("CatalogEntry".equals(codeString)) + return FHIRAllTypes.CATALOGENTRY; if ("ChargeItem".equals(codeString)) return FHIRAllTypes.CHARGEITEM; if ("Claim".equals(codeString)) @@ -3978,6 +4010,8 @@ public class Enumerations { return FHIRAllTypes.EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return FHIRAllTypes.EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return FHIRAllTypes.EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return FHIRAllTypes.EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -4100,6 +4134,8 @@ public class Enumerations { return FHIRAllTypes.SLOT; if ("Specimen".equals(codeString)) return FHIRAllTypes.SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return FHIRAllTypes.SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return FHIRAllTypes.STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -4272,6 +4308,8 @@ public class Enumerations { return new Enumeration(this, FHIRAllTypes.CAREPLAN); if ("CareTeam".equals(codeString)) return new Enumeration(this, FHIRAllTypes.CARETEAM); + if ("CatalogEntry".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CATALOGENTRY); if ("ChargeItem".equals(codeString)) return new Enumeration(this, FHIRAllTypes.CHARGEITEM); if ("Claim".equals(codeString)) @@ -4336,6 +4374,8 @@ public class Enumerations { return new Enumeration(this, FHIRAllTypes.EPISODEOFCARE); if ("EventDefinition".equals(codeString)) return new Enumeration(this, FHIRAllTypes.EVENTDEFINITION); + if ("ExampleScenario".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.EXAMPLESCENARIO); if ("ExpansionProfile".equals(codeString)) return new Enumeration(this, FHIRAllTypes.EXPANSIONPROFILE); if ("ExplanationOfBenefit".equals(codeString)) @@ -4458,6 +4498,8 @@ public class Enumerations { return new Enumeration(this, FHIRAllTypes.SLOT); if ("Specimen".equals(codeString)) return new Enumeration(this, FHIRAllTypes.SPECIMEN); + if ("SpecimenDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SPECIMENDEFINITION); if ("StructureDefinition".equals(codeString)) return new Enumeration(this, FHIRAllTypes.STRUCTUREDEFINITION); if ("StructureMap".equals(codeString)) @@ -4623,6 +4665,8 @@ public class Enumerations { return "CarePlan"; if (code == FHIRAllTypes.CARETEAM) return "CareTeam"; + if (code == FHIRAllTypes.CATALOGENTRY) + return "CatalogEntry"; if (code == FHIRAllTypes.CHARGEITEM) return "ChargeItem"; if (code == FHIRAllTypes.CLAIM) @@ -4687,6 +4731,8 @@ public class Enumerations { return "EpisodeOfCare"; if (code == FHIRAllTypes.EVENTDEFINITION) return "EventDefinition"; + if (code == FHIRAllTypes.EXAMPLESCENARIO) + return "ExampleScenario"; if (code == FHIRAllTypes.EXPANSIONPROFILE) return "ExpansionProfile"; if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT) @@ -4809,6 +4855,8 @@ public class Enumerations { return "Slot"; if (code == FHIRAllTypes.SPECIMEN) return "Specimen"; + if (code == FHIRAllTypes.SPECIMENDEFINITION) + return "SpecimenDefinition"; if (code == FHIRAllTypes.STRUCTUREDEFINITION) return "StructureDefinition"; if (code == FHIRAllTypes.STRUCTUREMAP) @@ -4980,7 +5028,7 @@ public class Enumerations { */ TIMING, /** - * A description of a triggering event. + * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. */ TRIGGERDEFINITION, /** @@ -5115,6 +5163,10 @@ public class Enumerations { * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. */ CARETEAM, + /** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ + CATALOGENTRY, /** * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. */ @@ -5243,6 +5295,10 @@ public class Enumerations { * The EventDefinition resource provides a reusable description of when a particular event can occur. */ EVENTDEFINITION, + /** + * Example of workflow instance. + */ + EXAMPLESCENARIO, /** * Resource to define constraints on the Expansion of a FHIR ValueSet. */ @@ -5344,7 +5400,7 @@ public class Enumerations { */ MEDICATIONREQUEST, /** - * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. */ MEDICATIONSTATEMENT, /** @@ -5487,6 +5543,10 @@ public class Enumerations { * A sample to be used for analysis. */ SPECIMEN, + /** + * A kind of specimen with associated set of requirements. + */ + SPECIMENDEFINITION, /** * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. */ @@ -5674,6 +5734,8 @@ public class Enumerations { return CAREPLAN; if ("CareTeam".equals(codeString)) return CARETEAM; + if ("CatalogEntry".equals(codeString)) + return CATALOGENTRY; if ("ChargeItem".equals(codeString)) return CHARGEITEM; if ("Claim".equals(codeString)) @@ -5738,6 +5800,8 @@ public class Enumerations { return EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -5860,6 +5924,8 @@ public class Enumerations { return SLOT; if ("Specimen".equals(codeString)) return SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -5954,6 +6020,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -5986,6 +6053,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -6047,6 +6115,7 @@ public class Enumerations { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -6131,6 +6200,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types"; case CAREPLAN: return "http://hl7.org/fhir/resource-types"; case CARETEAM: return "http://hl7.org/fhir/resource-types"; + case CATALOGENTRY: return "http://hl7.org/fhir/resource-types"; case CHARGEITEM: return "http://hl7.org/fhir/resource-types"; case CLAIM: return "http://hl7.org/fhir/resource-types"; case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; @@ -6163,6 +6233,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types"; case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; @@ -6224,6 +6295,7 @@ public class Enumerations { case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types"; case SLOT: return "http://hl7.org/fhir/resource-types"; case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; @@ -6274,7 +6346,7 @@ public class Enumerations { case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different signature approaches have different utilities."; case SIMPLEQUANTITY: return ""; case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."; - case TRIGGERDEFINITION: return "A description of a triggering event."; + case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."; case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."; case BASE64BINARY: return "A stream of bytes"; case BOOLEAN: return "Value of \"true\" or \"false\""; @@ -6308,6 +6380,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog."; case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."; case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; @@ -6340,6 +6413,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur."; + case EXAMPLESCENARIO: return "Example of workflow instance."; case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient."; @@ -6365,7 +6439,7 @@ public class Enumerations { case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; - case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."; case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; @@ -6401,6 +6475,7 @@ public class Enumerations { case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; case SPECIMEN: return "A sample to be used for analysis."; + case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements."; case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."; case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; @@ -6485,6 +6560,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -6517,6 +6593,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -6578,6 +6655,7 @@ public class Enumerations { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -6735,6 +6813,8 @@ public class Enumerations { return FHIRDefinedType.CAREPLAN; if ("CareTeam".equals(codeString)) return FHIRDefinedType.CARETEAM; + if ("CatalogEntry".equals(codeString)) + return FHIRDefinedType.CATALOGENTRY; if ("ChargeItem".equals(codeString)) return FHIRDefinedType.CHARGEITEM; if ("Claim".equals(codeString)) @@ -6799,6 +6879,8 @@ public class Enumerations { return FHIRDefinedType.EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return FHIRDefinedType.EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return FHIRDefinedType.EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return FHIRDefinedType.EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -6921,6 +7003,8 @@ public class Enumerations { return FHIRDefinedType.SLOT; if ("Specimen".equals(codeString)) return FHIRDefinedType.SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return FHIRDefinedType.SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return FHIRDefinedType.STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -7089,6 +7173,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.CAREPLAN); if ("CareTeam".equals(codeString)) return new Enumeration(this, FHIRDefinedType.CARETEAM); + if ("CatalogEntry".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CATALOGENTRY); if ("ChargeItem".equals(codeString)) return new Enumeration(this, FHIRDefinedType.CHARGEITEM); if ("Claim".equals(codeString)) @@ -7153,6 +7239,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.EPISODEOFCARE); if ("EventDefinition".equals(codeString)) return new Enumeration(this, FHIRDefinedType.EVENTDEFINITION); + if ("ExampleScenario".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.EXAMPLESCENARIO); if ("ExpansionProfile".equals(codeString)) return new Enumeration(this, FHIRDefinedType.EXPANSIONPROFILE); if ("ExplanationOfBenefit".equals(codeString)) @@ -7275,6 +7363,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.SLOT); if ("Specimen".equals(codeString)) return new Enumeration(this, FHIRDefinedType.SPECIMEN); + if ("SpecimenDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.SPECIMENDEFINITION); if ("StructureDefinition".equals(codeString)) return new Enumeration(this, FHIRDefinedType.STRUCTUREDEFINITION); if ("StructureMap".equals(codeString)) @@ -7436,6 +7526,8 @@ public class Enumerations { return "CarePlan"; if (code == FHIRDefinedType.CARETEAM) return "CareTeam"; + if (code == FHIRDefinedType.CATALOGENTRY) + return "CatalogEntry"; if (code == FHIRDefinedType.CHARGEITEM) return "ChargeItem"; if (code == FHIRDefinedType.CLAIM) @@ -7500,6 +7592,8 @@ public class Enumerations { return "EpisodeOfCare"; if (code == FHIRDefinedType.EVENTDEFINITION) return "EventDefinition"; + if (code == FHIRDefinedType.EXAMPLESCENARIO) + return "ExampleScenario"; if (code == FHIRDefinedType.EXPANSIONPROFILE) return "ExpansionProfile"; if (code == FHIRDefinedType.EXPLANATIONOFBENEFIT) @@ -7622,6 +7716,8 @@ public class Enumerations { return "Slot"; if (code == FHIRDefinedType.SPECIMEN) return "Specimen"; + if (code == FHIRDefinedType.SPECIMENDEFINITION) + return "SpecimenDefinition"; if (code == FHIRDefinedType.STRUCTUREDEFINITION) return "StructureDefinition"; if (code == FHIRDefinedType.STRUCTUREMAP) @@ -8288,6 +8384,10 @@ public class Enumerations { * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. */ CARETEAM, + /** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ + CATALOGENTRY, /** * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. */ @@ -8416,6 +8516,10 @@ public class Enumerations { * The EventDefinition resource provides a reusable description of when a particular event can occur. */ EVENTDEFINITION, + /** + * Example of workflow instance. + */ + EXAMPLESCENARIO, /** * Resource to define constraints on the Expansion of a FHIR ValueSet. */ @@ -8517,7 +8621,7 @@ public class Enumerations { */ MEDICATIONREQUEST, /** - * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. */ MEDICATIONSTATEMENT, /** @@ -8660,6 +8764,10 @@ public class Enumerations { * A sample to be used for analysis. */ SPECIMEN, + /** + * A kind of specimen with associated set of requirements. + */ + SPECIMENDEFINITION, /** * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. */ @@ -8739,6 +8847,8 @@ public class Enumerations { return CAREPLAN; if ("CareTeam".equals(codeString)) return CARETEAM; + if ("CatalogEntry".equals(codeString)) + return CATALOGENTRY; if ("ChargeItem".equals(codeString)) return CHARGEITEM; if ("Claim".equals(codeString)) @@ -8803,6 +8913,8 @@ public class Enumerations { return EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -8925,6 +9037,8 @@ public class Enumerations { return SLOT; if ("Specimen".equals(codeString)) return SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -8965,6 +9079,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -8997,6 +9112,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -9058,6 +9174,7 @@ public class Enumerations { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -9088,6 +9205,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types"; case CAREPLAN: return "http://hl7.org/fhir/resource-types"; case CARETEAM: return "http://hl7.org/fhir/resource-types"; + case CATALOGENTRY: return "http://hl7.org/fhir/resource-types"; case CHARGEITEM: return "http://hl7.org/fhir/resource-types"; case CLAIM: return "http://hl7.org/fhir/resource-types"; case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; @@ -9120,6 +9238,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types"; case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; @@ -9181,6 +9300,7 @@ public class Enumerations { case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types"; case SLOT: return "http://hl7.org/fhir/resource-types"; case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; @@ -9211,6 +9331,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog."; case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."; case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; @@ -9243,6 +9364,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur."; + case EXAMPLESCENARIO: return "Example of workflow instance."; case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient."; @@ -9268,7 +9390,7 @@ public class Enumerations { case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; - case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."; case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; @@ -9304,6 +9426,7 @@ public class Enumerations { case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; case SPECIMEN: return "A sample to be used for analysis."; + case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements."; case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."; case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; @@ -9334,6 +9457,7 @@ public class Enumerations { case CAPABILITYSTATEMENT: return "CapabilityStatement"; case CAREPLAN: return "CarePlan"; case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; case CHARGEITEM: return "ChargeItem"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; @@ -9366,6 +9490,7 @@ public class Enumerations { case ENROLLMENTRESPONSE: return "EnrollmentResponse"; case EPISODEOFCARE: return "EpisodeOfCare"; case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; case EXPANSIONPROFILE: return "ExpansionProfile"; case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; @@ -9427,6 +9552,7 @@ public class Enumerations { case SERVICEDEFINITION: return "ServiceDefinition"; case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; case STRUCTUREDEFINITION: return "StructureDefinition"; case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; @@ -9476,6 +9602,8 @@ public class Enumerations { return ResourceType.CAREPLAN; if ("CareTeam".equals(codeString)) return ResourceType.CARETEAM; + if ("CatalogEntry".equals(codeString)) + return ResourceType.CATALOGENTRY; if ("ChargeItem".equals(codeString)) return ResourceType.CHARGEITEM; if ("Claim".equals(codeString)) @@ -9540,6 +9668,8 @@ public class Enumerations { return ResourceType.EPISODEOFCARE; if ("EventDefinition".equals(codeString)) return ResourceType.EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return ResourceType.EXAMPLESCENARIO; if ("ExpansionProfile".equals(codeString)) return ResourceType.EXPANSIONPROFILE; if ("ExplanationOfBenefit".equals(codeString)) @@ -9662,6 +9792,8 @@ public class Enumerations { return ResourceType.SLOT; if ("Specimen".equals(codeString)) return ResourceType.SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return ResourceType.SPECIMENDEFINITION; if ("StructureDefinition".equals(codeString)) return ResourceType.STRUCTUREDEFINITION; if ("StructureMap".equals(codeString)) @@ -9722,6 +9854,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.CAREPLAN); if ("CareTeam".equals(codeString)) return new Enumeration(this, ResourceType.CARETEAM); + if ("CatalogEntry".equals(codeString)) + return new Enumeration(this, ResourceType.CATALOGENTRY); if ("ChargeItem".equals(codeString)) return new Enumeration(this, ResourceType.CHARGEITEM); if ("Claim".equals(codeString)) @@ -9786,6 +9920,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.EPISODEOFCARE); if ("EventDefinition".equals(codeString)) return new Enumeration(this, ResourceType.EVENTDEFINITION); + if ("ExampleScenario".equals(codeString)) + return new Enumeration(this, ResourceType.EXAMPLESCENARIO); if ("ExpansionProfile".equals(codeString)) return new Enumeration(this, ResourceType.EXPANSIONPROFILE); if ("ExplanationOfBenefit".equals(codeString)) @@ -9908,6 +10044,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.SLOT); if ("Specimen".equals(codeString)) return new Enumeration(this, ResourceType.SPECIMEN); + if ("SpecimenDefinition".equals(codeString)) + return new Enumeration(this, ResourceType.SPECIMENDEFINITION); if ("StructureDefinition".equals(codeString)) return new Enumeration(this, ResourceType.STRUCTUREDEFINITION); if ("StructureMap".equals(codeString)) @@ -9961,6 +10099,8 @@ public class Enumerations { return "CarePlan"; if (code == ResourceType.CARETEAM) return "CareTeam"; + if (code == ResourceType.CATALOGENTRY) + return "CatalogEntry"; if (code == ResourceType.CHARGEITEM) return "ChargeItem"; if (code == ResourceType.CLAIM) @@ -10025,6 +10165,8 @@ public class Enumerations { return "EpisodeOfCare"; if (code == ResourceType.EVENTDEFINITION) return "EventDefinition"; + if (code == ResourceType.EXAMPLESCENARIO) + return "ExampleScenario"; if (code == ResourceType.EXPANSIONPROFILE) return "ExpansionProfile"; if (code == ResourceType.EXPLANATIONOFBENEFIT) @@ -10147,6 +10289,8 @@ public class Enumerations { return "Slot"; if (code == ResourceType.SPECIMEN) return "Specimen"; + if (code == ResourceType.SPECIMENDEFINITION) + return "SpecimenDefinition"; if (code == ResourceType.STRUCTUREDEFINITION) return "StructureDefinition"; if (code == ResourceType.STRUCTUREMAP) diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EpisodeOfCare.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EpisodeOfCare.java index fd9f81bb04c..16b1524f82a 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EpisodeOfCare.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EpisodeOfCare.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EventDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EventDefinition.java index 4404ef1a59d..b2682e05239 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EventDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/EventDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Fri, Aug 11, 2017 07:23+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExampleScenario.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExampleScenario.java new file mode 100644 index 00000000000..46550b63531 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExampleScenario.java @@ -0,0 +1,7374 @@ +package org.hl7.fhir.r4.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r4.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * Example of workflow instance. + */ +@ResourceDef(name="ExampleScenario", profile="http://hl7.org/fhir/Profile/ExampleScenario") +@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "useContext", "jurisdiction", "copyright", "description", "purpose", "actor", "instance", "process", "workflow"}) +public class ExampleScenario extends MetadataResource { + + public enum ExampleScenarioActorType { + /** + * A person + */ + PERSON, + /** + * A system + */ + ENTITY, + /** + * added to help the parsers with the generic types + */ + NULL; + public static ExampleScenarioActorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return PERSON; + if ("entity".equals(codeString)) + return ENTITY; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSON: return "person"; + case ENTITY: return "entity"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PERSON: return "http://hl7.org/fhir/examplescenario-actor-type"; + case ENTITY: return "http://hl7.org/fhir/examplescenario-actor-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PERSON: return "A person"; + case ENTITY: return "A system"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSON: return "Person"; + case ENTITY: return "System"; + default: return "?"; + } + } + } + + public static class ExampleScenarioActorTypeEnumFactory implements EnumFactory { + public ExampleScenarioActorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return ExampleScenarioActorType.PERSON; + if ("entity".equals(codeString)) + return ExampleScenarioActorType.ENTITY; + throw new IllegalArgumentException("Unknown ExampleScenarioActorType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return new Enumeration(this, ExampleScenarioActorType.PERSON); + if ("entity".equals(codeString)) + return new Enumeration(this, ExampleScenarioActorType.ENTITY); + throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'"); + } + public String toCode(ExampleScenarioActorType code) { + if (code == ExampleScenarioActorType.PERSON) + return "person"; + if (code == ExampleScenarioActorType.ENTITY) + return "entity"; + return "?"; + } + public String toSystem(ExampleScenarioActorType code) { + return code.getSystem(); + } + } + + public enum FHIRResourceType { + /** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc. + */ + ACCOUNT, + /** + * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context. + */ + ACTIVITYDEFINITION, + /** + * Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death. + */ + ADVERSEEVENT, + /** + * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. + */ + ALLERGYINTOLERANCE, + /** + * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). + */ + APPOINTMENT, + /** + * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. + */ + APPOINTMENTRESPONSE, + /** + * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. + */ + AUDITEVENT, + /** + * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. + */ + BASIC, + /** + * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. + */ + BINARY, + /** + * Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. + */ + BODYSTRUCTURE, + /** + * A container for a collection of resources. + */ + BUNDLE, + /** + * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. + */ + CAPABILITYSTATEMENT, + /** + * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. + */ + CAREPLAN, + /** + * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. + */ + CARETEAM, + /** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ + CATALOGENTRY, + /** + * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. + */ + CHARGEITEM, + /** + * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. + */ + CLAIM, + /** + * This resource provides the adjudication details from the processing of a Claim resource. + */ + CLAIMRESPONSE, + /** + * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. + */ + CLINICALIMPRESSION, + /** + * A code system resource specifies a set of codes drawn from one or more code systems. + */ + CODESYSTEM, + /** + * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. + */ + COMMUNICATION, + /** + * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. + */ + COMMUNICATIONREQUEST, + /** + * A compartment definition that defines how resources are accessed on a server. + */ + COMPARTMENTDEFINITION, + /** + * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. + */ + COMPOSITION, + /** + * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. + */ + CONCEPTMAP, + /** + * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. + */ + CONDITION, + /** + * A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. + */ + CONSENT, + /** + * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. + */ + CONTRACT, + /** + * Financial instrument which may be used to reimburse or pay for health care products and services. + */ + COVERAGE, + /** + * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. + */ + DETECTEDISSUE, + /** + * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + */ + DEVICE, + /** + * The characteristics, operational status and capabilities of a medical-related component of a medical device. + */ + DEVICECOMPONENT, + /** + * Describes a measurement, calculation or setting capability of a medical device. + */ + DEVICEMETRIC, + /** + * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. + */ + DEVICEREQUEST, + /** + * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. + */ + DEVICEUSESTATEMENT, + /** + * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. + */ + DIAGNOSTICREPORT, + /** + * A collection of documents compiled for a purpose together with metadata that applies to the collection. + */ + DOCUMENTMANIFEST, + /** + * A reference to a document. + */ + DOCUMENTREFERENCE, + /** + * A resource that includes narrative, extensions, and contained resources. + */ + DOMAINRESOURCE, + /** + * The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy. + */ + ELIGIBILITYREQUEST, + /** + * This resource provides eligibility and plan details from the processing of an Eligibility resource. + */ + ELIGIBILITYRESPONSE, + /** + * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. + */ + ENCOUNTER, + /** + * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information. + */ + ENDPOINT, + /** + * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. + */ + ENROLLMENTREQUEST, + /** + * This resource provides enrollment and plan details from the processing of an Enrollment resource. + */ + ENROLLMENTRESPONSE, + /** + * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. + */ + EPISODEOFCARE, + /** + * The EventDefinition resource provides a reusable description of when a particular event can occur. + */ + EVENTDEFINITION, + /** + * Example of workflow instance. + */ + EXAMPLESCENARIO, + /** + * Resource to define constraints on the Expansion of a FHIR ValueSet. + */ + EXPANSIONPROFILE, + /** + * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. + */ + EXPLANATIONOFBENEFIT, + /** + * Significant health conditions for a person related to the patient relevant in the context of care for the patient. + */ + FAMILYMEMBERHISTORY, + /** + * Prospective warnings of potential issues when providing care to the patient. + */ + FLAG, + /** + * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. + */ + GOAL, + /** + * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set. + */ + GRAPHDEFINITION, + /** + * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. + */ + GROUP, + /** + * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. + */ + GUIDANCERESPONSE, + /** + * The details of a healthcare service available at a location. + */ + HEALTHCARESERVICE, + /** + * A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection. + */ + IMAGINGMANIFEST, + /** + * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. + */ + IMAGINGSTUDY, + /** + * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. + */ + IMMUNIZATION, + /** + * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. + */ + IMMUNIZATIONRECOMMENDATION, + /** + * A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts. + */ + IMPLEMENTATIONGUIDE, + /** + * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets. + */ + LIBRARY, + /** + * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence". + */ + LINKAGE, + /** + * A set of information summarized from a list of other resources. + */ + LIST, + /** + * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. + */ + LOCATION, + /** + * The Measure resource provides the definition of a quality measure. + */ + MEASURE, + /** + * The MeasureReport resource contains the results of evaluating a measure. + */ + MEASUREREPORT, + /** + * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. + */ + MEDIA, + /** + * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. + */ + MEDICATION, + /** + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + */ + MEDICATIONADMINISTRATION, + /** + * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. + */ + MEDICATIONDISPENSE, + /** + * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns. + */ + MEDICATIONREQUEST, + /** + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + */ + MEDICATIONSTATEMENT, + /** + * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted. + */ + MESSAGEDEFINITION, + /** + * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. + */ + MESSAGEHEADER, + /** + * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. + */ + NAMINGSYSTEM, + /** + * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. + */ + NUTRITIONORDER, + /** + * Measurements and simple assertions made about a patient, device or other subject. + */ + OBSERVATION, + /** + * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). + */ + OPERATIONDEFINITION, + /** + * A collection of error, warning or information messages that result from a system action. + */ + OPERATIONOUTCOME, + /** + * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. + */ + ORGANIZATION, + /** + * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. + */ + PARAMETERS, + /** + * Demographics and other administrative information about an individual or animal receiving care or other health-related services. + */ + PATIENT, + /** + * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. + */ + PAYMENTNOTICE, + /** + * This resource provides payment details and claim references supporting a bulk payment. + */ + PAYMENTRECONCILIATION, + /** + * Demographics and administrative information about a person independent of a specific health-related context. + */ + PERSON, + /** + * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. + */ + PLANDEFINITION, + /** + * A person who is directly or indirectly involved in the provisioning of healthcare. + */ + PRACTITIONER, + /** + * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. + */ + PRACTITIONERROLE, + /** + * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. + */ + PROCEDURE, + /** + * A record of a request for diagnostic investigations, treatments, or operations to be performed. + */ + PROCEDUREREQUEST, + /** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ + PROCESSREQUEST, + /** + * This resource provides processing status, errors and notes from the processing of a resource. + */ + PROCESSRESPONSE, + /** + * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. + */ + PROVENANCE, + /** + * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. + */ + QUESTIONNAIRE, + /** + * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to. + */ + QUESTIONNAIRERESPONSE, + /** + * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ + RELATEDPERSON, + /** + * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one". + */ + REQUESTGROUP, + /** + * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects. + */ + RESEARCHSTUDY, + /** + * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects. + */ + RESEARCHSUBJECT, + /** + * This is the base resource type for everything. + */ + RESOURCE, + /** + * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. + */ + RISKASSESSMENT, + /** + * A container for slots of time that may be available for booking appointments. + */ + SCHEDULE, + /** + * A search parameter that defines a named search item that can be used to search/filter on a resource. + */ + SEARCHPARAMETER, + /** + * Raw data describing a biological sequence. + */ + SEQUENCE, + /** + * The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking. + */ + SERVICEDEFINITION, + /** + * A slot of time on a schedule that may be available for booking appointments. + */ + SLOT, + /** + * A sample to be used for analysis. + */ + SPECIMEN, + /** + * A kind of specimen with associated set of requirements. + */ + SPECIMENDEFINITION, + /** + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. + */ + STRUCTUREDEFINITION, + /** + * A Map of relationships between 2 structures that can be used to transform data. + */ + STRUCTUREMAP, + /** + * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. + */ + SUBSCRIPTION, + /** + * A homogeneous material with a definite composition. + */ + SUBSTANCE, + /** + * Record of delivery of what is supplied. + */ + SUPPLYDELIVERY, + /** + * A record of a request for a medication, substance or device used in the healthcare setting. + */ + SUPPLYREQUEST, + /** + * A task to be performed. + */ + TASK, + /** + * A summary of information based on the results of executing a TestScript. + */ + TESTREPORT, + /** + * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification. + */ + TESTSCRIPT, + /** + * A value set specifies a set of codes drawn from one or more code systems. + */ + VALUESET, + /** + * An authorization for the supply of glasses and/or contact lenses to a patient. + */ + VISIONPRESCRIPTION, + /** + * added to help the parsers with the generic types + */ + NULL; + public static FHIRResourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return ACCOUNT; + if ("ActivityDefinition".equals(codeString)) + return ACTIVITYDEFINITION; + if ("AdverseEvent".equals(codeString)) + return ADVERSEEVENT; + if ("AllergyIntolerance".equals(codeString)) + return ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return AUDITEVENT; + if ("Basic".equals(codeString)) + return BASIC; + if ("Binary".equals(codeString)) + return BINARY; + if ("BodyStructure".equals(codeString)) + return BODYSTRUCTURE; + if ("Bundle".equals(codeString)) + return BUNDLE; + if ("CapabilityStatement".equals(codeString)) + return CAPABILITYSTATEMENT; + if ("CarePlan".equals(codeString)) + return CAREPLAN; + if ("CareTeam".equals(codeString)) + return CARETEAM; + if ("CatalogEntry".equals(codeString)) + return CATALOGENTRY; + if ("ChargeItem".equals(codeString)) + return CHARGEITEM; + if ("Claim".equals(codeString)) + return CLAIM; + if ("ClaimResponse".equals(codeString)) + return CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return CLINICALIMPRESSION; + if ("CodeSystem".equals(codeString)) + return CODESYSTEM; + if ("Communication".equals(codeString)) + return COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return COMPARTMENTDEFINITION; + if ("Composition".equals(codeString)) + return COMPOSITION; + if ("ConceptMap".equals(codeString)) + return CONCEPTMAP; + if ("Condition".equals(codeString)) + return CONDITION; + if ("Consent".equals(codeString)) + return CONSENT; + if ("Contract".equals(codeString)) + return CONTRACT; + if ("Coverage".equals(codeString)) + return COVERAGE; + if ("DetectedIssue".equals(codeString)) + return DETECTEDISSUE; + if ("Device".equals(codeString)) + return DEVICE; + if ("DeviceComponent".equals(codeString)) + return DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return DEVICEMETRIC; + if ("DeviceRequest".equals(codeString)) + return DEVICEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return DEVICEUSESTATEMENT; + if ("DiagnosticReport".equals(codeString)) + return DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("Endpoint".equals(codeString)) + return ENDPOINT; + if ("EnrollmentRequest".equals(codeString)) + return ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return EPISODEOFCARE; + if ("EventDefinition".equals(codeString)) + return EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return EXAMPLESCENARIO; + if ("ExpansionProfile".equals(codeString)) + return EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FLAG; + if ("Goal".equals(codeString)) + return GOAL; + if ("GraphDefinition".equals(codeString)) + return GRAPHDEFINITION; + if ("Group".equals(codeString)) + return GROUP; + if ("GuidanceResponse".equals(codeString)) + return GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return HEALTHCARESERVICE; + if ("ImagingManifest".equals(codeString)) + return IMAGINGMANIFEST; + if ("ImagingStudy".equals(codeString)) + return IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return LIBRARY; + if ("Linkage".equals(codeString)) + return LINKAGE; + if ("List".equals(codeString)) + return LIST; + if ("Location".equals(codeString)) + return LOCATION; + if ("Measure".equals(codeString)) + return MEASURE; + if ("MeasureReport".equals(codeString)) + return MEASUREREPORT; + if ("Media".equals(codeString)) + return MEDIA; + if ("Medication".equals(codeString)) + return MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return MEDICATIONDISPENSE; + if ("MedicationRequest".equals(codeString)) + return MEDICATIONREQUEST; + if ("MedicationStatement".equals(codeString)) + return MEDICATIONSTATEMENT; + if ("MessageDefinition".equals(codeString)) + return MESSAGEDEFINITION; + if ("MessageHeader".equals(codeString)) + return MESSAGEHEADER; + if ("NamingSystem".equals(codeString)) + return NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return NUTRITIONORDER; + if ("Observation".equals(codeString)) + return OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return OPERATIONOUTCOME; + if ("Organization".equals(codeString)) + return ORGANIZATION; + if ("Parameters".equals(codeString)) + return PARAMETERS; + if ("Patient".equals(codeString)) + return PATIENT; + if ("PaymentNotice".equals(codeString)) + return PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return PERSON; + if ("PlanDefinition".equals(codeString)) + return PLANDEFINITION; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return PRACTITIONERROLE; + if ("Procedure".equals(codeString)) + return PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return PROVENANCE; + if ("Questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return QUESTIONNAIRERESPONSE; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("RequestGroup".equals(codeString)) + return REQUESTGROUP; + if ("ResearchStudy".equals(codeString)) + return RESEARCHSTUDY; + if ("ResearchSubject".equals(codeString)) + return RESEARCHSUBJECT; + if ("Resource".equals(codeString)) + return RESOURCE; + if ("RiskAssessment".equals(codeString)) + return RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return SCHEDULE; + if ("SearchParameter".equals(codeString)) + return SEARCHPARAMETER; + if ("Sequence".equals(codeString)) + return SEQUENCE; + if ("ServiceDefinition".equals(codeString)) + return SERVICEDEFINITION; + if ("Slot".equals(codeString)) + return SLOT; + if ("Specimen".equals(codeString)) + return SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return SPECIMENDEFINITION; + if ("StructureDefinition".equals(codeString)) + return STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return STRUCTUREMAP; + if ("Subscription".equals(codeString)) + return SUBSCRIPTION; + if ("Substance".equals(codeString)) + return SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return SUPPLYREQUEST; + if ("Task".equals(codeString)) + return TASK; + if ("TestReport".equals(codeString)) + return TESTREPORT; + if ("TestScript".equals(codeString)) + return TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return VALUESET; + if ("VisionPrescription".equals(codeString)) + return VISIONPRESCRIPTION; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown FHIRResourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCOUNT: return "Account"; + case ACTIVITYDEFINITION: return "ActivityDefinition"; + case ADVERSEEVENT: return "AdverseEvent"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSTRUCTURE: return "BodyStructure"; + case BUNDLE: return "Bundle"; + case CAPABILITYSTATEMENT: return "CapabilityStatement"; + case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; + case CHARGEITEM: return "ChargeItem"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case CODESYSTEM: return "CodeSystem"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONSENT: return "Consent"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEREQUEST: return "DeviceRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENDPOINT: return "Endpoint"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GRAPHDEFINITION: return "GraphDefinition"; + case GROUP: return "Group"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGMANIFEST: return "ImagingManifest"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LINKAGE: return "Linkage"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONREQUEST: return "MedicationRequest"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEDEFINITION: return "MessageDefinition"; + case MESSAGEHEADER: return "MessageHeader"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PLANDEFINITION: return "PlanDefinition"; + case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case RELATEDPERSON: return "RelatedPerson"; + case REQUESTGROUP: return "RequestGroup"; + case RESEARCHSTUDY: return "ResearchStudy"; + case RESEARCHSUBJECT: return "ResearchSubject"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SEQUENCE: return "Sequence"; + case SERVICEDEFINITION: return "ServiceDefinition"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; + case TESTREPORT: return "TestReport"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACCOUNT: return "http://hl7.org/fhir/resource-types"; + case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types"; + case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types"; + case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENT: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case AUDITEVENT: return "http://hl7.org/fhir/resource-types"; + case BASIC: return "http://hl7.org/fhir/resource-types"; + case BINARY: return "http://hl7.org/fhir/resource-types"; + case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types"; + case BUNDLE: return "http://hl7.org/fhir/resource-types"; + case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types"; + case CAREPLAN: return "http://hl7.org/fhir/resource-types"; + case CARETEAM: return "http://hl7.org/fhir/resource-types"; + case CATALOGENTRY: return "http://hl7.org/fhir/resource-types"; + case CHARGEITEM: return "http://hl7.org/fhir/resource-types"; + case CLAIM: return "http://hl7.org/fhir/resource-types"; + case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; + case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types"; + case CODESYSTEM: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATION: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case COMPOSITION: return "http://hl7.org/fhir/resource-types"; + case CONCEPTMAP: return "http://hl7.org/fhir/resource-types"; + case CONDITION: return "http://hl7.org/fhir/resource-types"; + case CONSENT: return "http://hl7.org/fhir/resource-types"; + case CONTRACT: return "http://hl7.org/fhir/resource-types"; + case COVERAGE: return "http://hl7.org/fhir/resource-types"; + case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types"; + case DEVICE: return "http://hl7.org/fhir/resource-types"; + case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types"; + case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types"; + case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types"; + case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ENCOUNTER: return "http://hl7.org/fhir/resource-types"; + case ENDPOINT: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; + case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types"; + case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; + case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; + case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; + case FLAG: return "http://hl7.org/fhir/resource-types"; + case GOAL: return "http://hl7.org/fhir/resource-types"; + case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types"; + case GROUP: return "http://hl7.org/fhir/resource-types"; + case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types"; + case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types"; + case IMAGINGMANIFEST: return "http://hl7.org/fhir/resource-types"; + case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATION: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types"; + case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types"; + case LIBRARY: return "http://hl7.org/fhir/resource-types"; + case LINKAGE: return "http://hl7.org/fhir/resource-types"; + case LIST: return "http://hl7.org/fhir/resource-types"; + case LOCATION: return "http://hl7.org/fhir/resource-types"; + case MEASURE: return "http://hl7.org/fhir/resource-types"; + case MEASUREREPORT: return "http://hl7.org/fhir/resource-types"; + case MEDIA: return "http://hl7.org/fhir/resource-types"; + case MEDICATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types"; + case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types"; + case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types"; + case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types"; + case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; + case OBSERVATION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types"; + case ORGANIZATION: return "http://hl7.org/fhir/resource-types"; + case PARAMETERS: return "http://hl7.org/fhir/resource-types"; + case PATIENT: return "http://hl7.org/fhir/resource-types"; + case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types"; + case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types"; + case PERSON: return "http://hl7.org/fhir/resource-types"; + case PLANDEFINITION: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONER: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types"; + case PROCEDURE: return "http://hl7.org/fhir/resource-types"; + case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types"; + case PROVENANCE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types"; + case RELATEDPERSON: return "http://hl7.org/fhir/resource-types"; + case REQUESTGROUP: return "http://hl7.org/fhir/resource-types"; + case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types"; + case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types"; + case RESOURCE: return "http://hl7.org/fhir/resource-types"; + case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types"; + case SCHEDULE: return "http://hl7.org/fhir/resource-types"; + case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types"; + case SEQUENCE: return "http://hl7.org/fhir/resource-types"; + case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types"; + case SLOT: return "http://hl7.org/fhir/resource-types"; + case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; + case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; + case SUBSTANCE: return "http://hl7.org/fhir/resource-types"; + case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types"; + case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types"; + case TASK: return "http://hl7.org/fhir/resource-types"; + case TESTREPORT: return "http://hl7.org/fhir/resource-types"; + case TESTSCRIPT: return "http://hl7.org/fhir/resource-types"; + case VALUESET: return "http://hl7.org/fhir/resource-types"; + case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc."; + case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context."; + case ADVERSEEVENT: return "Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death."; + case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."; + case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; + case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."; + case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage."; + case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."; + case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc."; + case BODYSTRUCTURE: return "Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; + case BUNDLE: return "A container for a collection of resources."; + case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; + case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog."; + case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."; + case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; + case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; + case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; + case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems."; + case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; + case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server."; + case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; + case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; + case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern."; + case CONSENT: return "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time."; + case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; + case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services."; + case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; + case DEVICE: return "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICECOMPONENT: return "The characteristics, operational status and capabilities of a medical-related component of a medical device."; + case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; + case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; + case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician."; + case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports."; + case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection."; + case DOCUMENTREFERENCE: return "A reference to a document."; + case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources."; + case ELIGIBILITYREQUEST: return "The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy."; + case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource."; + case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient."; + case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information."; + case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage."; + case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; + case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; + case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur."; + case EXAMPLESCENARIO: return "Example of workflow instance."; + case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; + case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; + case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient."; + case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; + case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; + case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set."; + case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken."; + case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGMANIFEST: return "A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection."; + case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; + case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; + case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification."; + case IMPLEMENTATIONGUIDE: return "A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts."; + case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets."; + case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\"."; + case LIST: return "A set of information summarized from a list of other resources."; + case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; + case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure."; + case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; + case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; + case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; + case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; + case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."; + case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; + case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; + case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; + case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; + case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction)."; + case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action."; + case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc."; + case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it."; + case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services."; + case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references."; + case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; + case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; + case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols."; + case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time."; + case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; + case PROCEDUREREQUEST: return "A record of a request for diagnostic investigations, treatments, or operations to be performed."; + case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; + case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource."; + case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."; + case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection."; + case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to."; + case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."; + case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\"."; + case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects."; + case RESEARCHSUBJECT: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects."; + case RESOURCE: return "This is the base resource type for everything."; + case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome."; + case SCHEDULE: return "A container for slots of time that may be available for booking appointments."; + case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource."; + case SEQUENCE: return "Raw data describing a biological sequence."; + case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; + case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; + case SPECIMEN: return "A sample to be used for analysis."; + case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements."; + case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."; + case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; + case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; + case SUBSTANCE: return "A homogeneous material with a definite composition."; + case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; + case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TASK: return "A task to be performed."; + case TESTREPORT: return "A summary of information based on the results of executing a TestScript."; + case TESTSCRIPT: return "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification."; + case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; + case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCOUNT: return "Account"; + case ACTIVITYDEFINITION: return "ActivityDefinition"; + case ADVERSEEVENT: return "AdverseEvent"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSTRUCTURE: return "BodyStructure"; + case BUNDLE: return "Bundle"; + case CAPABILITYSTATEMENT: return "CapabilityStatement"; + case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; + case CHARGEITEM: return "ChargeItem"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case CODESYSTEM: return "CodeSystem"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONSENT: return "Consent"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEREQUEST: return "DeviceRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENDPOINT: return "Endpoint"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GRAPHDEFINITION: return "GraphDefinition"; + case GROUP: return "Group"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGMANIFEST: return "ImagingManifest"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LINKAGE: return "Linkage"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONREQUEST: return "MedicationRequest"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEDEFINITION: return "MessageDefinition"; + case MESSAGEHEADER: return "MessageHeader"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PLANDEFINITION: return "PlanDefinition"; + case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case RELATEDPERSON: return "RelatedPerson"; + case REQUESTGROUP: return "RequestGroup"; + case RESEARCHSTUDY: return "ResearchStudy"; + case RESEARCHSUBJECT: return "ResearchSubject"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SEQUENCE: return "Sequence"; + case SERVICEDEFINITION: return "ServiceDefinition"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; + case TESTREPORT: return "TestReport"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + } + + public static class FHIRResourceTypeEnumFactory implements EnumFactory { + public FHIRResourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return FHIRResourceType.ACCOUNT; + if ("ActivityDefinition".equals(codeString)) + return FHIRResourceType.ACTIVITYDEFINITION; + if ("AdverseEvent".equals(codeString)) + return FHIRResourceType.ADVERSEEVENT; + if ("AllergyIntolerance".equals(codeString)) + return FHIRResourceType.ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return FHIRResourceType.APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return FHIRResourceType.APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return FHIRResourceType.AUDITEVENT; + if ("Basic".equals(codeString)) + return FHIRResourceType.BASIC; + if ("Binary".equals(codeString)) + return FHIRResourceType.BINARY; + if ("BodyStructure".equals(codeString)) + return FHIRResourceType.BODYSTRUCTURE; + if ("Bundle".equals(codeString)) + return FHIRResourceType.BUNDLE; + if ("CapabilityStatement".equals(codeString)) + return FHIRResourceType.CAPABILITYSTATEMENT; + if ("CarePlan".equals(codeString)) + return FHIRResourceType.CAREPLAN; + if ("CareTeam".equals(codeString)) + return FHIRResourceType.CARETEAM; + if ("CatalogEntry".equals(codeString)) + return FHIRResourceType.CATALOGENTRY; + if ("ChargeItem".equals(codeString)) + return FHIRResourceType.CHARGEITEM; + if ("Claim".equals(codeString)) + return FHIRResourceType.CLAIM; + if ("ClaimResponse".equals(codeString)) + return FHIRResourceType.CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return FHIRResourceType.CLINICALIMPRESSION; + if ("CodeSystem".equals(codeString)) + return FHIRResourceType.CODESYSTEM; + if ("Communication".equals(codeString)) + return FHIRResourceType.COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return FHIRResourceType.COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return FHIRResourceType.COMPARTMENTDEFINITION; + if ("Composition".equals(codeString)) + return FHIRResourceType.COMPOSITION; + if ("ConceptMap".equals(codeString)) + return FHIRResourceType.CONCEPTMAP; + if ("Condition".equals(codeString)) + return FHIRResourceType.CONDITION; + if ("Consent".equals(codeString)) + return FHIRResourceType.CONSENT; + if ("Contract".equals(codeString)) + return FHIRResourceType.CONTRACT; + if ("Coverage".equals(codeString)) + return FHIRResourceType.COVERAGE; + if ("DetectedIssue".equals(codeString)) + return FHIRResourceType.DETECTEDISSUE; + if ("Device".equals(codeString)) + return FHIRResourceType.DEVICE; + if ("DeviceComponent".equals(codeString)) + return FHIRResourceType.DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return FHIRResourceType.DEVICEMETRIC; + if ("DeviceRequest".equals(codeString)) + return FHIRResourceType.DEVICEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return FHIRResourceType.DEVICEUSESTATEMENT; + if ("DiagnosticReport".equals(codeString)) + return FHIRResourceType.DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return FHIRResourceType.DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return FHIRResourceType.DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return FHIRResourceType.DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return FHIRResourceType.ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return FHIRResourceType.ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return FHIRResourceType.ENCOUNTER; + if ("Endpoint".equals(codeString)) + return FHIRResourceType.ENDPOINT; + if ("EnrollmentRequest".equals(codeString)) + return FHIRResourceType.ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return FHIRResourceType.ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return FHIRResourceType.EPISODEOFCARE; + if ("EventDefinition".equals(codeString)) + return FHIRResourceType.EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return FHIRResourceType.EXAMPLESCENARIO; + if ("ExpansionProfile".equals(codeString)) + return FHIRResourceType.EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return FHIRResourceType.EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FHIRResourceType.FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FHIRResourceType.FLAG; + if ("Goal".equals(codeString)) + return FHIRResourceType.GOAL; + if ("GraphDefinition".equals(codeString)) + return FHIRResourceType.GRAPHDEFINITION; + if ("Group".equals(codeString)) + return FHIRResourceType.GROUP; + if ("GuidanceResponse".equals(codeString)) + return FHIRResourceType.GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return FHIRResourceType.HEALTHCARESERVICE; + if ("ImagingManifest".equals(codeString)) + return FHIRResourceType.IMAGINGMANIFEST; + if ("ImagingStudy".equals(codeString)) + return FHIRResourceType.IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return FHIRResourceType.IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return FHIRResourceType.IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return FHIRResourceType.IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return FHIRResourceType.LIBRARY; + if ("Linkage".equals(codeString)) + return FHIRResourceType.LINKAGE; + if ("List".equals(codeString)) + return FHIRResourceType.LIST; + if ("Location".equals(codeString)) + return FHIRResourceType.LOCATION; + if ("Measure".equals(codeString)) + return FHIRResourceType.MEASURE; + if ("MeasureReport".equals(codeString)) + return FHIRResourceType.MEASUREREPORT; + if ("Media".equals(codeString)) + return FHIRResourceType.MEDIA; + if ("Medication".equals(codeString)) + return FHIRResourceType.MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return FHIRResourceType.MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return FHIRResourceType.MEDICATIONDISPENSE; + if ("MedicationRequest".equals(codeString)) + return FHIRResourceType.MEDICATIONREQUEST; + if ("MedicationStatement".equals(codeString)) + return FHIRResourceType.MEDICATIONSTATEMENT; + if ("MessageDefinition".equals(codeString)) + return FHIRResourceType.MESSAGEDEFINITION; + if ("MessageHeader".equals(codeString)) + return FHIRResourceType.MESSAGEHEADER; + if ("NamingSystem".equals(codeString)) + return FHIRResourceType.NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return FHIRResourceType.NUTRITIONORDER; + if ("Observation".equals(codeString)) + return FHIRResourceType.OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return FHIRResourceType.OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return FHIRResourceType.OPERATIONOUTCOME; + if ("Organization".equals(codeString)) + return FHIRResourceType.ORGANIZATION; + if ("Parameters".equals(codeString)) + return FHIRResourceType.PARAMETERS; + if ("Patient".equals(codeString)) + return FHIRResourceType.PATIENT; + if ("PaymentNotice".equals(codeString)) + return FHIRResourceType.PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return FHIRResourceType.PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return FHIRResourceType.PERSON; + if ("PlanDefinition".equals(codeString)) + return FHIRResourceType.PLANDEFINITION; + if ("Practitioner".equals(codeString)) + return FHIRResourceType.PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return FHIRResourceType.PRACTITIONERROLE; + if ("Procedure".equals(codeString)) + return FHIRResourceType.PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return FHIRResourceType.PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return FHIRResourceType.PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return FHIRResourceType.PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return FHIRResourceType.PROVENANCE; + if ("Questionnaire".equals(codeString)) + return FHIRResourceType.QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return FHIRResourceType.QUESTIONNAIRERESPONSE; + if ("RelatedPerson".equals(codeString)) + return FHIRResourceType.RELATEDPERSON; + if ("RequestGroup".equals(codeString)) + return FHIRResourceType.REQUESTGROUP; + if ("ResearchStudy".equals(codeString)) + return FHIRResourceType.RESEARCHSTUDY; + if ("ResearchSubject".equals(codeString)) + return FHIRResourceType.RESEARCHSUBJECT; + if ("Resource".equals(codeString)) + return FHIRResourceType.RESOURCE; + if ("RiskAssessment".equals(codeString)) + return FHIRResourceType.RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return FHIRResourceType.SCHEDULE; + if ("SearchParameter".equals(codeString)) + return FHIRResourceType.SEARCHPARAMETER; + if ("Sequence".equals(codeString)) + return FHIRResourceType.SEQUENCE; + if ("ServiceDefinition".equals(codeString)) + return FHIRResourceType.SERVICEDEFINITION; + if ("Slot".equals(codeString)) + return FHIRResourceType.SLOT; + if ("Specimen".equals(codeString)) + return FHIRResourceType.SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return FHIRResourceType.SPECIMENDEFINITION; + if ("StructureDefinition".equals(codeString)) + return FHIRResourceType.STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return FHIRResourceType.STRUCTUREMAP; + if ("Subscription".equals(codeString)) + return FHIRResourceType.SUBSCRIPTION; + if ("Substance".equals(codeString)) + return FHIRResourceType.SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return FHIRResourceType.SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return FHIRResourceType.SUPPLYREQUEST; + if ("Task".equals(codeString)) + return FHIRResourceType.TASK; + if ("TestReport".equals(codeString)) + return FHIRResourceType.TESTREPORT; + if ("TestScript".equals(codeString)) + return FHIRResourceType.TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return FHIRResourceType.VALUESET; + if ("VisionPrescription".equals(codeString)) + return FHIRResourceType.VISIONPRESCRIPTION; + throw new IllegalArgumentException("Unknown FHIRResourceType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ACCOUNT); + if ("ActivityDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ACTIVITYDEFINITION); + if ("AdverseEvent".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ADVERSEEVENT); + if ("AllergyIntolerance".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ALLERGYINTOLERANCE); + if ("Appointment".equals(codeString)) + return new Enumeration(this, FHIRResourceType.APPOINTMENT); + if ("AppointmentResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.APPOINTMENTRESPONSE); + if ("AuditEvent".equals(codeString)) + return new Enumeration(this, FHIRResourceType.AUDITEVENT); + if ("Basic".equals(codeString)) + return new Enumeration(this, FHIRResourceType.BASIC); + if ("Binary".equals(codeString)) + return new Enumeration(this, FHIRResourceType.BINARY); + if ("BodyStructure".equals(codeString)) + return new Enumeration(this, FHIRResourceType.BODYSTRUCTURE); + if ("Bundle".equals(codeString)) + return new Enumeration(this, FHIRResourceType.BUNDLE); + if ("CapabilityStatement".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CAPABILITYSTATEMENT); + if ("CarePlan".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CAREPLAN); + if ("CareTeam".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CARETEAM); + if ("CatalogEntry".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CATALOGENTRY); + if ("ChargeItem".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CHARGEITEM); + if ("Claim".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CLAIM); + if ("ClaimResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CLAIMRESPONSE); + if ("ClinicalImpression".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CLINICALIMPRESSION); + if ("CodeSystem".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CODESYSTEM); + if ("Communication".equals(codeString)) + return new Enumeration(this, FHIRResourceType.COMMUNICATION); + if ("CommunicationRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.COMMUNICATIONREQUEST); + if ("CompartmentDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.COMPARTMENTDEFINITION); + if ("Composition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.COMPOSITION); + if ("ConceptMap".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CONCEPTMAP); + if ("Condition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CONDITION); + if ("Consent".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CONSENT); + if ("Contract".equals(codeString)) + return new Enumeration(this, FHIRResourceType.CONTRACT); + if ("Coverage".equals(codeString)) + return new Enumeration(this, FHIRResourceType.COVERAGE); + if ("DetectedIssue".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DETECTEDISSUE); + if ("Device".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DEVICE); + if ("DeviceComponent".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DEVICECOMPONENT); + if ("DeviceMetric".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DEVICEMETRIC); + if ("DeviceRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DEVICEREQUEST); + if ("DeviceUseStatement".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DEVICEUSESTATEMENT); + if ("DiagnosticReport".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DIAGNOSTICREPORT); + if ("DocumentManifest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DOCUMENTMANIFEST); + if ("DocumentReference".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DOCUMENTREFERENCE); + if ("DomainResource".equals(codeString)) + return new Enumeration(this, FHIRResourceType.DOMAINRESOURCE); + if ("EligibilityRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ELIGIBILITYREQUEST); + if ("EligibilityResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ELIGIBILITYRESPONSE); + if ("Encounter".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ENCOUNTER); + if ("Endpoint".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ENDPOINT); + if ("EnrollmentRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ENROLLMENTREQUEST); + if ("EnrollmentResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ENROLLMENTRESPONSE); + if ("EpisodeOfCare".equals(codeString)) + return new Enumeration(this, FHIRResourceType.EPISODEOFCARE); + if ("EventDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.EVENTDEFINITION); + if ("ExampleScenario".equals(codeString)) + return new Enumeration(this, FHIRResourceType.EXAMPLESCENARIO); + if ("ExpansionProfile".equals(codeString)) + return new Enumeration(this, FHIRResourceType.EXPANSIONPROFILE); + if ("ExplanationOfBenefit".equals(codeString)) + return new Enumeration(this, FHIRResourceType.EXPLANATIONOFBENEFIT); + if ("FamilyMemberHistory".equals(codeString)) + return new Enumeration(this, FHIRResourceType.FAMILYMEMBERHISTORY); + if ("Flag".equals(codeString)) + return new Enumeration(this, FHIRResourceType.FLAG); + if ("Goal".equals(codeString)) + return new Enumeration(this, FHIRResourceType.GOAL); + if ("GraphDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.GRAPHDEFINITION); + if ("Group".equals(codeString)) + return new Enumeration(this, FHIRResourceType.GROUP); + if ("GuidanceResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.GUIDANCERESPONSE); + if ("HealthcareService".equals(codeString)) + return new Enumeration(this, FHIRResourceType.HEALTHCARESERVICE); + if ("ImagingManifest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.IMAGINGMANIFEST); + if ("ImagingStudy".equals(codeString)) + return new Enumeration(this, FHIRResourceType.IMAGINGSTUDY); + if ("Immunization".equals(codeString)) + return new Enumeration(this, FHIRResourceType.IMMUNIZATION); + if ("ImmunizationRecommendation".equals(codeString)) + return new Enumeration(this, FHIRResourceType.IMMUNIZATIONRECOMMENDATION); + if ("ImplementationGuide".equals(codeString)) + return new Enumeration(this, FHIRResourceType.IMPLEMENTATIONGUIDE); + if ("Library".equals(codeString)) + return new Enumeration(this, FHIRResourceType.LIBRARY); + if ("Linkage".equals(codeString)) + return new Enumeration(this, FHIRResourceType.LINKAGE); + if ("List".equals(codeString)) + return new Enumeration(this, FHIRResourceType.LIST); + if ("Location".equals(codeString)) + return new Enumeration(this, FHIRResourceType.LOCATION); + if ("Measure".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEASURE); + if ("MeasureReport".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEASUREREPORT); + if ("Media".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEDIA); + if ("Medication".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEDICATION); + if ("MedicationAdministration".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEDICATIONADMINISTRATION); + if ("MedicationDispense".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEDICATIONDISPENSE); + if ("MedicationRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEDICATIONREQUEST); + if ("MedicationStatement".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MEDICATIONSTATEMENT); + if ("MessageDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MESSAGEDEFINITION); + if ("MessageHeader".equals(codeString)) + return new Enumeration(this, FHIRResourceType.MESSAGEHEADER); + if ("NamingSystem".equals(codeString)) + return new Enumeration(this, FHIRResourceType.NAMINGSYSTEM); + if ("NutritionOrder".equals(codeString)) + return new Enumeration(this, FHIRResourceType.NUTRITIONORDER); + if ("Observation".equals(codeString)) + return new Enumeration(this, FHIRResourceType.OBSERVATION); + if ("OperationDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.OPERATIONDEFINITION); + if ("OperationOutcome".equals(codeString)) + return new Enumeration(this, FHIRResourceType.OPERATIONOUTCOME); + if ("Organization".equals(codeString)) + return new Enumeration(this, FHIRResourceType.ORGANIZATION); + if ("Parameters".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PARAMETERS); + if ("Patient".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PATIENT); + if ("PaymentNotice".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PAYMENTNOTICE); + if ("PaymentReconciliation".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PAYMENTRECONCILIATION); + if ("Person".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PERSON); + if ("PlanDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PLANDEFINITION); + if ("Practitioner".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PRACTITIONER); + if ("PractitionerRole".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PRACTITIONERROLE); + if ("Procedure".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PROCEDURE); + if ("ProcedureRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PROCEDUREREQUEST); + if ("ProcessRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PROCESSREQUEST); + if ("ProcessResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PROCESSRESPONSE); + if ("Provenance".equals(codeString)) + return new Enumeration(this, FHIRResourceType.PROVENANCE); + if ("Questionnaire".equals(codeString)) + return new Enumeration(this, FHIRResourceType.QUESTIONNAIRE); + if ("QuestionnaireResponse".equals(codeString)) + return new Enumeration(this, FHIRResourceType.QUESTIONNAIRERESPONSE); + if ("RelatedPerson".equals(codeString)) + return new Enumeration(this, FHIRResourceType.RELATEDPERSON); + if ("RequestGroup".equals(codeString)) + return new Enumeration(this, FHIRResourceType.REQUESTGROUP); + if ("ResearchStudy".equals(codeString)) + return new Enumeration(this, FHIRResourceType.RESEARCHSTUDY); + if ("ResearchSubject".equals(codeString)) + return new Enumeration(this, FHIRResourceType.RESEARCHSUBJECT); + if ("Resource".equals(codeString)) + return new Enumeration(this, FHIRResourceType.RESOURCE); + if ("RiskAssessment".equals(codeString)) + return new Enumeration(this, FHIRResourceType.RISKASSESSMENT); + if ("Schedule".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SCHEDULE); + if ("SearchParameter".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SEARCHPARAMETER); + if ("Sequence".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SEQUENCE); + if ("ServiceDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SERVICEDEFINITION); + if ("Slot".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SLOT); + if ("Specimen".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SPECIMEN); + if ("SpecimenDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SPECIMENDEFINITION); + if ("StructureDefinition".equals(codeString)) + return new Enumeration(this, FHIRResourceType.STRUCTUREDEFINITION); + if ("StructureMap".equals(codeString)) + return new Enumeration(this, FHIRResourceType.STRUCTUREMAP); + if ("Subscription".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SUBSCRIPTION); + if ("Substance".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SUBSTANCE); + if ("SupplyDelivery".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SUPPLYDELIVERY); + if ("SupplyRequest".equals(codeString)) + return new Enumeration(this, FHIRResourceType.SUPPLYREQUEST); + if ("Task".equals(codeString)) + return new Enumeration(this, FHIRResourceType.TASK); + if ("TestReport".equals(codeString)) + return new Enumeration(this, FHIRResourceType.TESTREPORT); + if ("TestScript".equals(codeString)) + return new Enumeration(this, FHIRResourceType.TESTSCRIPT); + if ("ValueSet".equals(codeString)) + return new Enumeration(this, FHIRResourceType.VALUESET); + if ("VisionPrescription".equals(codeString)) + return new Enumeration(this, FHIRResourceType.VISIONPRESCRIPTION); + throw new FHIRException("Unknown FHIRResourceType code '"+codeString+"'"); + } + public String toCode(FHIRResourceType code) { + if (code == FHIRResourceType.ACCOUNT) + return "Account"; + if (code == FHIRResourceType.ACTIVITYDEFINITION) + return "ActivityDefinition"; + if (code == FHIRResourceType.ADVERSEEVENT) + return "AdverseEvent"; + if (code == FHIRResourceType.ALLERGYINTOLERANCE) + return "AllergyIntolerance"; + if (code == FHIRResourceType.APPOINTMENT) + return "Appointment"; + if (code == FHIRResourceType.APPOINTMENTRESPONSE) + return "AppointmentResponse"; + if (code == FHIRResourceType.AUDITEVENT) + return "AuditEvent"; + if (code == FHIRResourceType.BASIC) + return "Basic"; + if (code == FHIRResourceType.BINARY) + return "Binary"; + if (code == FHIRResourceType.BODYSTRUCTURE) + return "BodyStructure"; + if (code == FHIRResourceType.BUNDLE) + return "Bundle"; + if (code == FHIRResourceType.CAPABILITYSTATEMENT) + return "CapabilityStatement"; + if (code == FHIRResourceType.CAREPLAN) + return "CarePlan"; + if (code == FHIRResourceType.CARETEAM) + return "CareTeam"; + if (code == FHIRResourceType.CATALOGENTRY) + return "CatalogEntry"; + if (code == FHIRResourceType.CHARGEITEM) + return "ChargeItem"; + if (code == FHIRResourceType.CLAIM) + return "Claim"; + if (code == FHIRResourceType.CLAIMRESPONSE) + return "ClaimResponse"; + if (code == FHIRResourceType.CLINICALIMPRESSION) + return "ClinicalImpression"; + if (code == FHIRResourceType.CODESYSTEM) + return "CodeSystem"; + if (code == FHIRResourceType.COMMUNICATION) + return "Communication"; + if (code == FHIRResourceType.COMMUNICATIONREQUEST) + return "CommunicationRequest"; + if (code == FHIRResourceType.COMPARTMENTDEFINITION) + return "CompartmentDefinition"; + if (code == FHIRResourceType.COMPOSITION) + return "Composition"; + if (code == FHIRResourceType.CONCEPTMAP) + return "ConceptMap"; + if (code == FHIRResourceType.CONDITION) + return "Condition"; + if (code == FHIRResourceType.CONSENT) + return "Consent"; + if (code == FHIRResourceType.CONTRACT) + return "Contract"; + if (code == FHIRResourceType.COVERAGE) + return "Coverage"; + if (code == FHIRResourceType.DETECTEDISSUE) + return "DetectedIssue"; + if (code == FHIRResourceType.DEVICE) + return "Device"; + if (code == FHIRResourceType.DEVICECOMPONENT) + return "DeviceComponent"; + if (code == FHIRResourceType.DEVICEMETRIC) + return "DeviceMetric"; + if (code == FHIRResourceType.DEVICEREQUEST) + return "DeviceRequest"; + if (code == FHIRResourceType.DEVICEUSESTATEMENT) + return "DeviceUseStatement"; + if (code == FHIRResourceType.DIAGNOSTICREPORT) + return "DiagnosticReport"; + if (code == FHIRResourceType.DOCUMENTMANIFEST) + return "DocumentManifest"; + if (code == FHIRResourceType.DOCUMENTREFERENCE) + return "DocumentReference"; + if (code == FHIRResourceType.DOMAINRESOURCE) + return "DomainResource"; + if (code == FHIRResourceType.ELIGIBILITYREQUEST) + return "EligibilityRequest"; + if (code == FHIRResourceType.ELIGIBILITYRESPONSE) + return "EligibilityResponse"; + if (code == FHIRResourceType.ENCOUNTER) + return "Encounter"; + if (code == FHIRResourceType.ENDPOINT) + return "Endpoint"; + if (code == FHIRResourceType.ENROLLMENTREQUEST) + return "EnrollmentRequest"; + if (code == FHIRResourceType.ENROLLMENTRESPONSE) + return "EnrollmentResponse"; + if (code == FHIRResourceType.EPISODEOFCARE) + return "EpisodeOfCare"; + if (code == FHIRResourceType.EVENTDEFINITION) + return "EventDefinition"; + if (code == FHIRResourceType.EXAMPLESCENARIO) + return "ExampleScenario"; + if (code == FHIRResourceType.EXPANSIONPROFILE) + return "ExpansionProfile"; + if (code == FHIRResourceType.EXPLANATIONOFBENEFIT) + return "ExplanationOfBenefit"; + if (code == FHIRResourceType.FAMILYMEMBERHISTORY) + return "FamilyMemberHistory"; + if (code == FHIRResourceType.FLAG) + return "Flag"; + if (code == FHIRResourceType.GOAL) + return "Goal"; + if (code == FHIRResourceType.GRAPHDEFINITION) + return "GraphDefinition"; + if (code == FHIRResourceType.GROUP) + return "Group"; + if (code == FHIRResourceType.GUIDANCERESPONSE) + return "GuidanceResponse"; + if (code == FHIRResourceType.HEALTHCARESERVICE) + return "HealthcareService"; + if (code == FHIRResourceType.IMAGINGMANIFEST) + return "ImagingManifest"; + if (code == FHIRResourceType.IMAGINGSTUDY) + return "ImagingStudy"; + if (code == FHIRResourceType.IMMUNIZATION) + return "Immunization"; + if (code == FHIRResourceType.IMMUNIZATIONRECOMMENDATION) + return "ImmunizationRecommendation"; + if (code == FHIRResourceType.IMPLEMENTATIONGUIDE) + return "ImplementationGuide"; + if (code == FHIRResourceType.LIBRARY) + return "Library"; + if (code == FHIRResourceType.LINKAGE) + return "Linkage"; + if (code == FHIRResourceType.LIST) + return "List"; + if (code == FHIRResourceType.LOCATION) + return "Location"; + if (code == FHIRResourceType.MEASURE) + return "Measure"; + if (code == FHIRResourceType.MEASUREREPORT) + return "MeasureReport"; + if (code == FHIRResourceType.MEDIA) + return "Media"; + if (code == FHIRResourceType.MEDICATION) + return "Medication"; + if (code == FHIRResourceType.MEDICATIONADMINISTRATION) + return "MedicationAdministration"; + if (code == FHIRResourceType.MEDICATIONDISPENSE) + return "MedicationDispense"; + if (code == FHIRResourceType.MEDICATIONREQUEST) + return "MedicationRequest"; + if (code == FHIRResourceType.MEDICATIONSTATEMENT) + return "MedicationStatement"; + if (code == FHIRResourceType.MESSAGEDEFINITION) + return "MessageDefinition"; + if (code == FHIRResourceType.MESSAGEHEADER) + return "MessageHeader"; + if (code == FHIRResourceType.NAMINGSYSTEM) + return "NamingSystem"; + if (code == FHIRResourceType.NUTRITIONORDER) + return "NutritionOrder"; + if (code == FHIRResourceType.OBSERVATION) + return "Observation"; + if (code == FHIRResourceType.OPERATIONDEFINITION) + return "OperationDefinition"; + if (code == FHIRResourceType.OPERATIONOUTCOME) + return "OperationOutcome"; + if (code == FHIRResourceType.ORGANIZATION) + return "Organization"; + if (code == FHIRResourceType.PARAMETERS) + return "Parameters"; + if (code == FHIRResourceType.PATIENT) + return "Patient"; + if (code == FHIRResourceType.PAYMENTNOTICE) + return "PaymentNotice"; + if (code == FHIRResourceType.PAYMENTRECONCILIATION) + return "PaymentReconciliation"; + if (code == FHIRResourceType.PERSON) + return "Person"; + if (code == FHIRResourceType.PLANDEFINITION) + return "PlanDefinition"; + if (code == FHIRResourceType.PRACTITIONER) + return "Practitioner"; + if (code == FHIRResourceType.PRACTITIONERROLE) + return "PractitionerRole"; + if (code == FHIRResourceType.PROCEDURE) + return "Procedure"; + if (code == FHIRResourceType.PROCEDUREREQUEST) + return "ProcedureRequest"; + if (code == FHIRResourceType.PROCESSREQUEST) + return "ProcessRequest"; + if (code == FHIRResourceType.PROCESSRESPONSE) + return "ProcessResponse"; + if (code == FHIRResourceType.PROVENANCE) + return "Provenance"; + if (code == FHIRResourceType.QUESTIONNAIRE) + return "Questionnaire"; + if (code == FHIRResourceType.QUESTIONNAIRERESPONSE) + return "QuestionnaireResponse"; + if (code == FHIRResourceType.RELATEDPERSON) + return "RelatedPerson"; + if (code == FHIRResourceType.REQUESTGROUP) + return "RequestGroup"; + if (code == FHIRResourceType.RESEARCHSTUDY) + return "ResearchStudy"; + if (code == FHIRResourceType.RESEARCHSUBJECT) + return "ResearchSubject"; + if (code == FHIRResourceType.RESOURCE) + return "Resource"; + if (code == FHIRResourceType.RISKASSESSMENT) + return "RiskAssessment"; + if (code == FHIRResourceType.SCHEDULE) + return "Schedule"; + if (code == FHIRResourceType.SEARCHPARAMETER) + return "SearchParameter"; + if (code == FHIRResourceType.SEQUENCE) + return "Sequence"; + if (code == FHIRResourceType.SERVICEDEFINITION) + return "ServiceDefinition"; + if (code == FHIRResourceType.SLOT) + return "Slot"; + if (code == FHIRResourceType.SPECIMEN) + return "Specimen"; + if (code == FHIRResourceType.SPECIMENDEFINITION) + return "SpecimenDefinition"; + if (code == FHIRResourceType.STRUCTUREDEFINITION) + return "StructureDefinition"; + if (code == FHIRResourceType.STRUCTUREMAP) + return "StructureMap"; + if (code == FHIRResourceType.SUBSCRIPTION) + return "Subscription"; + if (code == FHIRResourceType.SUBSTANCE) + return "Substance"; + if (code == FHIRResourceType.SUPPLYDELIVERY) + return "SupplyDelivery"; + if (code == FHIRResourceType.SUPPLYREQUEST) + return "SupplyRequest"; + if (code == FHIRResourceType.TASK) + return "Task"; + if (code == FHIRResourceType.TESTREPORT) + return "TestReport"; + if (code == FHIRResourceType.TESTSCRIPT) + return "TestScript"; + if (code == FHIRResourceType.VALUESET) + return "ValueSet"; + if (code == FHIRResourceType.VISIONPRESCRIPTION) + return "VisionPrescription"; + return "?"; + } + public String toSystem(FHIRResourceType code) { + return code.getSystem(); + } + } + + @Block() + public static class ExampleScenarioActorComponent extends BackboneElement implements IBaseBackboneElement { + /** + * ID or acronym of actor. + */ + @Child(name = "actorId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="ID or acronym of the actor", formalDefinition="ID or acronym of actor." ) + protected StringType actorId; + + /** + * The type of actor - person or system. + */ + @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="person | entity", formalDefinition="The type of actor - person or system." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/examplescenario-actor-type") + protected Enumeration type; + + /** + * The name of the actor as shown in the page. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The name of the actor as shown in the page", formalDefinition="The name of the actor as shown in the page." ) + protected StringType name; + + /** + * The description of the actor. + */ + @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The description of the actor", formalDefinition="The description of the actor." ) + protected MarkdownType description; + + private static final long serialVersionUID = 1348364162L; + + /** + * Constructor + */ + public ExampleScenarioActorComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioActorComponent(StringType actorId, Enumeration type) { + super(); + this.actorId = actorId; + this.type = type; + } + + /** + * @return {@link #actorId} (ID or acronym of actor.). This is the underlying object with id, value and extensions. The accessor "getActorId" gives direct access to the value + */ + public StringType getActorIdElement() { + if (this.actorId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioActorComponent.actorId"); + else if (Configuration.doAutoCreate()) + this.actorId = new StringType(); // bb + return this.actorId; + } + + public boolean hasActorIdElement() { + return this.actorId != null && !this.actorId.isEmpty(); + } + + public boolean hasActorId() { + return this.actorId != null && !this.actorId.isEmpty(); + } + + /** + * @param value {@link #actorId} (ID or acronym of actor.). This is the underlying object with id, value and extensions. The accessor "getActorId" gives direct access to the value + */ + public ExampleScenarioActorComponent setActorIdElement(StringType value) { + this.actorId = value; + return this; + } + + /** + * @return ID or acronym of actor. + */ + public String getActorId() { + return this.actorId == null ? null : this.actorId.getValue(); + } + + /** + * @param value ID or acronym of actor. + */ + public ExampleScenarioActorComponent setActorId(String value) { + if (this.actorId == null) + this.actorId = new StringType(); + this.actorId.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of actor - person or system.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioActorComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ExampleScenarioActorTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of actor - person or system.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ExampleScenarioActorComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of actor - person or system. + */ + public ExampleScenarioActorType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of actor - person or system. + */ + public ExampleScenarioActorComponent setType(ExampleScenarioActorType value) { + if (this.type == null) + this.type = new Enumeration(new ExampleScenarioActorTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #name} (The name of the actor as shown in the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioActorComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the actor as shown in the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExampleScenarioActorComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the actor as shown in the page. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the actor as shown in the page. + */ + public ExampleScenarioActorComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (The description of the actor.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioActorComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The description of the actor.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenarioActorComponent setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return The description of the actor. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The description of the actor. + */ + public ExampleScenarioActorComponent setDescription(String value) { + if (value == null) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("actorId", "string", "ID or acronym of actor.", 0, 1, actorId)); + children.add(new Property("type", "code", "The type of actor - person or system.", 0, 1, type)); + children.add(new Property("name", "string", "The name of the actor as shown in the page.", 0, 1, name)); + children.add(new Property("description", "markdown", "The description of the actor.", 0, 1, description)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1161623056: /*actorId*/ return new Property("actorId", "string", "ID or acronym of actor.", 0, 1, actorId); + case 3575610: /*type*/ return new Property("type", "code", "The type of actor - person or system.", 0, 1, type); + case 3373707: /*name*/ return new Property("name", "string", "The name of the actor as shown in the page.", 0, 1, name); + case -1724546052: /*description*/ return new Property("description", "markdown", "The description of the actor.", 0, 1, description); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1161623056: /*actorId*/ return this.actorId == null ? new Base[0] : new Base[] {this.actorId}; // StringType + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1161623056: // actorId + this.actorId = castToString(value); // StringType + return value; + case 3575610: // type + value = new ExampleScenarioActorTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration + return value; + case 3373707: // name + this.name = castToString(value); // StringType + return value; + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("actorId")) { + this.actorId = castToString(value); // StringType + } else if (name.equals("type")) { + value = new ExampleScenarioActorTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration + } else if (name.equals("name")) { + this.name = castToString(value); // StringType + } else if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1161623056: return getActorIdElement(); + case 3575610: return getTypeElement(); + case 3373707: return getNameElement(); + case -1724546052: return getDescriptionElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1161623056: /*actorId*/ return new String[] {"string"}; + case 3575610: /*type*/ return new String[] {"code"}; + case 3373707: /*name*/ return new String[] {"string"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actorId")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.actorId"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.type"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else + return super.addChild(name); + } + + public ExampleScenarioActorComponent copy() { + ExampleScenarioActorComponent dst = new ExampleScenarioActorComponent(); + copyValues(dst); + dst.actorId = actorId == null ? null : actorId.copy(); + dst.type = type == null ? null : type.copy(); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioActorComponent)) + return false; + ExampleScenarioActorComponent o = (ExampleScenarioActorComponent) other; + return compareDeep(actorId, o.actorId, true) && compareDeep(type, o.type, true) && compareDeep(name, o.name, true) + && compareDeep(description, o.description, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioActorComponent)) + return false; + ExampleScenarioActorComponent o = (ExampleScenarioActorComponent) other; + return compareValues(actorId, o.actorId, true) && compareValues(type, o.type, true) && compareValues(name, o.name, true) + && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actorId, type, name, description + ); + } + + public String fhirType() { + return "ExampleScenario.actor"; + + } + + } + + @Block() + public static class ExampleScenarioInstanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The id of the resource for referencing. + */ + @Child(name = "resourceId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The id of the resource for referencing", formalDefinition="The id of the resource for referencing." ) + protected StringType resourceId; + + /** + * The type of the resource. + */ + @Child(name = "resourceType", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of the resource", formalDefinition="The type of the resource." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") + protected Enumeration resourceType; + + /** + * A short name for the resource instance. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A short name for the resource instance", formalDefinition="A short name for the resource instance." ) + protected StringType name; + + /** + * Human-friendly description of the resource instance. + */ + @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human-friendly description of the resource instance", formalDefinition="Human-friendly description of the resource instance." ) + protected MarkdownType description; + + /** + * A specific version of the resource. + */ + @Child(name = "version", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A specific version of the resource", formalDefinition="A specific version of the resource." ) + protected List version; + + /** + * Resources contained in the instance (e.g. the observations contained in a bundle). + */ + @Child(name = "containedInstance", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Resources contained in the instance", formalDefinition="Resources contained in the instance (e.g. the observations contained in a bundle)." ) + protected List containedInstance; + + private static final long serialVersionUID = -1131860669L; + + /** + * Constructor + */ + public ExampleScenarioInstanceComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioInstanceComponent(StringType resourceId, Enumeration resourceType) { + super(); + this.resourceId = resourceId; + this.resourceType = resourceType; + } + + /** + * @return {@link #resourceId} (The id of the resource for referencing.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value + */ + public StringType getResourceIdElement() { + if (this.resourceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.resourceId"); + else if (Configuration.doAutoCreate()) + this.resourceId = new StringType(); // bb + return this.resourceId; + } + + public boolean hasResourceIdElement() { + return this.resourceId != null && !this.resourceId.isEmpty(); + } + + public boolean hasResourceId() { + return this.resourceId != null && !this.resourceId.isEmpty(); + } + + /** + * @param value {@link #resourceId} (The id of the resource for referencing.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value + */ + public ExampleScenarioInstanceComponent setResourceIdElement(StringType value) { + this.resourceId = value; + return this; + } + + /** + * @return The id of the resource for referencing. + */ + public String getResourceId() { + return this.resourceId == null ? null : this.resourceId.getValue(); + } + + /** + * @param value The id of the resource for referencing. + */ + public ExampleScenarioInstanceComponent setResourceId(String value) { + if (this.resourceId == null) + this.resourceId = new StringType(); + this.resourceId.setValue(value); + return this; + } + + /** + * @return {@link #resourceType} (The type of the resource.). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value + */ + public Enumeration getResourceTypeElement() { + if (this.resourceType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.resourceType"); + else if (Configuration.doAutoCreate()) + this.resourceType = new Enumeration(new FHIRResourceTypeEnumFactory()); // bb + return this.resourceType; + } + + public boolean hasResourceTypeElement() { + return this.resourceType != null && !this.resourceType.isEmpty(); + } + + public boolean hasResourceType() { + return this.resourceType != null && !this.resourceType.isEmpty(); + } + + /** + * @param value {@link #resourceType} (The type of the resource.). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value + */ + public ExampleScenarioInstanceComponent setResourceTypeElement(Enumeration value) { + this.resourceType = value; + return this; + } + + /** + * @return The type of the resource. + */ + public FHIRResourceType getResourceType() { + return this.resourceType == null ? null : this.resourceType.getValue(); + } + + /** + * @param value The type of the resource. + */ + public ExampleScenarioInstanceComponent setResourceType(FHIRResourceType value) { + if (this.resourceType == null) + this.resourceType = new Enumeration(new FHIRResourceTypeEnumFactory()); + this.resourceType.setValue(value); + return this; + } + + /** + * @return {@link #name} (A short name for the resource instance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A short name for the resource instance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExampleScenarioInstanceComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A short name for the resource instance. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A short name for the resource instance. + */ + public ExampleScenarioInstanceComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (Human-friendly description of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Human-friendly description of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenarioInstanceComponent setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return Human-friendly description of the resource instance. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Human-friendly description of the resource instance. + */ + public ExampleScenarioInstanceComponent setDescription(String value) { + if (value == null) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (A specific version of the resource.) + */ + public List getVersion() { + if (this.version == null) + this.version = new ArrayList(); + return this.version; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioInstanceComponent setVersion(List theVersion) { + this.version = theVersion; + return this; + } + + public boolean hasVersion() { + if (this.version == null) + return false; + for (ExampleScenarioInstanceVersionComponent item : this.version) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioInstanceVersionComponent addVersion() { //3 + ExampleScenarioInstanceVersionComponent t = new ExampleScenarioInstanceVersionComponent(); + if (this.version == null) + this.version = new ArrayList(); + this.version.add(t); + return t; + } + + public ExampleScenarioInstanceComponent addVersion(ExampleScenarioInstanceVersionComponent t) { //3 + if (t == null) + return this; + if (this.version == null) + this.version = new ArrayList(); + this.version.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #version}, creating it if it does not already exist + */ + public ExampleScenarioInstanceVersionComponent getVersionFirstRep() { + if (getVersion().isEmpty()) { + addVersion(); + } + return getVersion().get(0); + } + + /** + * @return {@link #containedInstance} (Resources contained in the instance (e.g. the observations contained in a bundle).) + */ + public List getContainedInstance() { + if (this.containedInstance == null) + this.containedInstance = new ArrayList(); + return this.containedInstance; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioInstanceComponent setContainedInstance(List theContainedInstance) { + this.containedInstance = theContainedInstance; + return this; + } + + public boolean hasContainedInstance() { + if (this.containedInstance == null) + return false; + for (ExampleScenarioInstanceContainedInstanceComponent item : this.containedInstance) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioInstanceContainedInstanceComponent addContainedInstance() { //3 + ExampleScenarioInstanceContainedInstanceComponent t = new ExampleScenarioInstanceContainedInstanceComponent(); + if (this.containedInstance == null) + this.containedInstance = new ArrayList(); + this.containedInstance.add(t); + return t; + } + + public ExampleScenarioInstanceComponent addContainedInstance(ExampleScenarioInstanceContainedInstanceComponent t) { //3 + if (t == null) + return this; + if (this.containedInstance == null) + this.containedInstance = new ArrayList(); + this.containedInstance.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #containedInstance}, creating it if it does not already exist + */ + public ExampleScenarioInstanceContainedInstanceComponent getContainedInstanceFirstRep() { + if (getContainedInstance().isEmpty()) { + addContainedInstance(); + } + return getContainedInstance().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("resourceId", "string", "The id of the resource for referencing.", 0, 1, resourceId)); + children.add(new Property("resourceType", "code", "The type of the resource.", 0, 1, resourceType)); + children.add(new Property("name", "string", "A short name for the resource instance.", 0, 1, name)); + children.add(new Property("description", "markdown", "Human-friendly description of the resource instance.", 0, 1, description)); + children.add(new Property("version", "", "A specific version of the resource.", 0, java.lang.Integer.MAX_VALUE, version)); + children.add(new Property("containedInstance", "", "Resources contained in the instance (e.g. the observations contained in a bundle).", 0, java.lang.Integer.MAX_VALUE, containedInstance)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1345650231: /*resourceId*/ return new Property("resourceId", "string", "The id of the resource for referencing.", 0, 1, resourceId); + case -384364440: /*resourceType*/ return new Property("resourceType", "code", "The type of the resource.", 0, 1, resourceType); + case 3373707: /*name*/ return new Property("name", "string", "A short name for the resource instance.", 0, 1, name); + case -1724546052: /*description*/ return new Property("description", "markdown", "Human-friendly description of the resource instance.", 0, 1, description); + case 351608024: /*version*/ return new Property("version", "", "A specific version of the resource.", 0, java.lang.Integer.MAX_VALUE, version); + case -417062360: /*containedInstance*/ return new Property("containedInstance", "", "Resources contained in the instance (e.g. the observations contained in a bundle).", 0, java.lang.Integer.MAX_VALUE, containedInstance); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1345650231: /*resourceId*/ return this.resourceId == null ? new Base[0] : new Base[] {this.resourceId}; // StringType + case -384364440: /*resourceType*/ return this.resourceType == null ? new Base[0] : new Base[] {this.resourceType}; // Enumeration + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // ExampleScenarioInstanceVersionComponent + case -417062360: /*containedInstance*/ return this.containedInstance == null ? new Base[0] : this.containedInstance.toArray(new Base[this.containedInstance.size()]); // ExampleScenarioInstanceContainedInstanceComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1345650231: // resourceId + this.resourceId = castToString(value); // StringType + return value; + case -384364440: // resourceType + value = new FHIRResourceTypeEnumFactory().fromType(castToCode(value)); + this.resourceType = (Enumeration) value; // Enumeration + return value; + case 3373707: // name + this.name = castToString(value); // StringType + return value; + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + case 351608024: // version + this.getVersion().add((ExampleScenarioInstanceVersionComponent) value); // ExampleScenarioInstanceVersionComponent + return value; + case -417062360: // containedInstance + this.getContainedInstance().add((ExampleScenarioInstanceContainedInstanceComponent) value); // ExampleScenarioInstanceContainedInstanceComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("resourceId")) { + this.resourceId = castToString(value); // StringType + } else if (name.equals("resourceType")) { + value = new FHIRResourceTypeEnumFactory().fromType(castToCode(value)); + this.resourceType = (Enumeration) value; // Enumeration + } else if (name.equals("name")) { + this.name = castToString(value); // StringType + } else if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else if (name.equals("version")) { + this.getVersion().add((ExampleScenarioInstanceVersionComponent) value); + } else if (name.equals("containedInstance")) { + this.getContainedInstance().add((ExampleScenarioInstanceContainedInstanceComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1345650231: return getResourceIdElement(); + case -384364440: return getResourceTypeElement(); + case 3373707: return getNameElement(); + case -1724546052: return getDescriptionElement(); + case 351608024: return addVersion(); + case -417062360: return addContainedInstance(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1345650231: /*resourceId*/ return new String[] {"string"}; + case -384364440: /*resourceType*/ return new String[] {"code"}; + case 3373707: /*name*/ return new String[] {"string"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + case 351608024: /*version*/ return new String[] {}; + case -417062360: /*containedInstance*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("resourceId")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.resourceId"); + } + else if (name.equals("resourceType")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.resourceType"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else if (name.equals("version")) { + return addVersion(); + } + else if (name.equals("containedInstance")) { + return addContainedInstance(); + } + else + return super.addChild(name); + } + + public ExampleScenarioInstanceComponent copy() { + ExampleScenarioInstanceComponent dst = new ExampleScenarioInstanceComponent(); + copyValues(dst); + dst.resourceId = resourceId == null ? null : resourceId.copy(); + dst.resourceType = resourceType == null ? null : resourceType.copy(); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + if (version != null) { + dst.version = new ArrayList(); + for (ExampleScenarioInstanceVersionComponent i : version) + dst.version.add(i.copy()); + }; + if (containedInstance != null) { + dst.containedInstance = new ArrayList(); + for (ExampleScenarioInstanceContainedInstanceComponent i : containedInstance) + dst.containedInstance.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioInstanceComponent)) + return false; + ExampleScenarioInstanceComponent o = (ExampleScenarioInstanceComponent) other; + return compareDeep(resourceId, o.resourceId, true) && compareDeep(resourceType, o.resourceType, true) + && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(version, o.version, true) + && compareDeep(containedInstance, o.containedInstance, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioInstanceComponent)) + return false; + ExampleScenarioInstanceComponent o = (ExampleScenarioInstanceComponent) other; + return compareValues(resourceId, o.resourceId, true) && compareValues(resourceType, o.resourceType, true) + && compareValues(name, o.name, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceId, resourceType, name + , description, version, containedInstance); + } + + public String fhirType() { + return "ExampleScenario.instance"; + + } + + } + + @Block() + public static class ExampleScenarioInstanceVersionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The identifier of a specific version of a resource. + */ + @Child(name = "versionId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The identifier of a specific version of a resource", formalDefinition="The identifier of a specific version of a resource." ) + protected StringType versionId; + + /** + * The description of the resource version. + */ + @Child(name = "description", type = {MarkdownType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The description of the resource version", formalDefinition="The description of the resource version." ) + protected MarkdownType description; + + private static final long serialVersionUID = 960821913L; + + /** + * Constructor + */ + public ExampleScenarioInstanceVersionComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioInstanceVersionComponent(StringType versionId, MarkdownType description) { + super(); + this.versionId = versionId; + this.description = description; + } + + /** + * @return {@link #versionId} (The identifier of a specific version of a resource.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value + */ + public StringType getVersionIdElement() { + if (this.versionId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceVersionComponent.versionId"); + else if (Configuration.doAutoCreate()) + this.versionId = new StringType(); // bb + return this.versionId; + } + + public boolean hasVersionIdElement() { + return this.versionId != null && !this.versionId.isEmpty(); + } + + public boolean hasVersionId() { + return this.versionId != null && !this.versionId.isEmpty(); + } + + /** + * @param value {@link #versionId} (The identifier of a specific version of a resource.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value + */ + public ExampleScenarioInstanceVersionComponent setVersionIdElement(StringType value) { + this.versionId = value; + return this; + } + + /** + * @return The identifier of a specific version of a resource. + */ + public String getVersionId() { + return this.versionId == null ? null : this.versionId.getValue(); + } + + /** + * @param value The identifier of a specific version of a resource. + */ + public ExampleScenarioInstanceVersionComponent setVersionId(String value) { + if (this.versionId == null) + this.versionId = new StringType(); + this.versionId.setValue(value); + return this; + } + + /** + * @return {@link #description} (The description of the resource version.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceVersionComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The description of the resource version.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenarioInstanceVersionComponent setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return The description of the resource version. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The description of the resource version. + */ + public ExampleScenarioInstanceVersionComponent setDescription(String value) { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("versionId", "string", "The identifier of a specific version of a resource.", 0, 1, versionId)); + children.add(new Property("description", "markdown", "The description of the resource version.", 0, 1, description)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1407102957: /*versionId*/ return new Property("versionId", "string", "The identifier of a specific version of a resource.", 0, 1, versionId); + case -1724546052: /*description*/ return new Property("description", "markdown", "The description of the resource version.", 0, 1, description); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // StringType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1407102957: // versionId + this.versionId = castToString(value); // StringType + return value; + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("versionId")) { + this.versionId = castToString(value); // StringType + } else if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1407102957: return getVersionIdElement(); + case -1724546052: return getDescriptionElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1407102957: /*versionId*/ return new String[] {"string"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("versionId")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.versionId"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else + return super.addChild(name); + } + + public ExampleScenarioInstanceVersionComponent copy() { + ExampleScenarioInstanceVersionComponent dst = new ExampleScenarioInstanceVersionComponent(); + copyValues(dst); + dst.versionId = versionId == null ? null : versionId.copy(); + dst.description = description == null ? null : description.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioInstanceVersionComponent)) + return false; + ExampleScenarioInstanceVersionComponent o = (ExampleScenarioInstanceVersionComponent) other; + return compareDeep(versionId, o.versionId, true) && compareDeep(description, o.description, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioInstanceVersionComponent)) + return false; + ExampleScenarioInstanceVersionComponent o = (ExampleScenarioInstanceVersionComponent) other; + return compareValues(versionId, o.versionId, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(versionId, description); + } + + public String fhirType() { + return "ExampleScenario.instance.version"; + + } + + } + + @Block() + public static class ExampleScenarioInstanceContainedInstanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Each resource contained in the instance. + */ + @Child(name = "resourceId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Each resource contained in the instance", formalDefinition="Each resource contained in the instance." ) + protected StringType resourceId; + + /** + * A specific version of a resource contained in the instance. + */ + @Child(name = "versionId", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A specific version of a resource contained in the instance", formalDefinition="A specific version of a resource contained in the instance." ) + protected StringType versionId; + + private static final long serialVersionUID = 908084124L; + + /** + * Constructor + */ + public ExampleScenarioInstanceContainedInstanceComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioInstanceContainedInstanceComponent(StringType resourceId) { + super(); + this.resourceId = resourceId; + } + + /** + * @return {@link #resourceId} (Each resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value + */ + public StringType getResourceIdElement() { + if (this.resourceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceContainedInstanceComponent.resourceId"); + else if (Configuration.doAutoCreate()) + this.resourceId = new StringType(); // bb + return this.resourceId; + } + + public boolean hasResourceIdElement() { + return this.resourceId != null && !this.resourceId.isEmpty(); + } + + public boolean hasResourceId() { + return this.resourceId != null && !this.resourceId.isEmpty(); + } + + /** + * @param value {@link #resourceId} (Each resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value + */ + public ExampleScenarioInstanceContainedInstanceComponent setResourceIdElement(StringType value) { + this.resourceId = value; + return this; + } + + /** + * @return Each resource contained in the instance. + */ + public String getResourceId() { + return this.resourceId == null ? null : this.resourceId.getValue(); + } + + /** + * @param value Each resource contained in the instance. + */ + public ExampleScenarioInstanceContainedInstanceComponent setResourceId(String value) { + if (this.resourceId == null) + this.resourceId = new StringType(); + this.resourceId.setValue(value); + return this; + } + + /** + * @return {@link #versionId} (A specific version of a resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value + */ + public StringType getVersionIdElement() { + if (this.versionId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioInstanceContainedInstanceComponent.versionId"); + else if (Configuration.doAutoCreate()) + this.versionId = new StringType(); // bb + return this.versionId; + } + + public boolean hasVersionIdElement() { + return this.versionId != null && !this.versionId.isEmpty(); + } + + public boolean hasVersionId() { + return this.versionId != null && !this.versionId.isEmpty(); + } + + /** + * @param value {@link #versionId} (A specific version of a resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value + */ + public ExampleScenarioInstanceContainedInstanceComponent setVersionIdElement(StringType value) { + this.versionId = value; + return this; + } + + /** + * @return A specific version of a resource contained in the instance. + */ + public String getVersionId() { + return this.versionId == null ? null : this.versionId.getValue(); + } + + /** + * @param value A specific version of a resource contained in the instance. + */ + public ExampleScenarioInstanceContainedInstanceComponent setVersionId(String value) { + if (Utilities.noString(value)) + this.versionId = null; + else { + if (this.versionId == null) + this.versionId = new StringType(); + this.versionId.setValue(value); + } + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("resourceId", "string", "Each resource contained in the instance.", 0, 1, resourceId)); + children.add(new Property("versionId", "string", "A specific version of a resource contained in the instance.", 0, 1, versionId)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1345650231: /*resourceId*/ return new Property("resourceId", "string", "Each resource contained in the instance.", 0, 1, resourceId); + case -1407102957: /*versionId*/ return new Property("versionId", "string", "A specific version of a resource contained in the instance.", 0, 1, versionId); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1345650231: /*resourceId*/ return this.resourceId == null ? new Base[0] : new Base[] {this.resourceId}; // StringType + case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // StringType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1345650231: // resourceId + this.resourceId = castToString(value); // StringType + return value; + case -1407102957: // versionId + this.versionId = castToString(value); // StringType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("resourceId")) { + this.resourceId = castToString(value); // StringType + } else if (name.equals("versionId")) { + this.versionId = castToString(value); // StringType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1345650231: return getResourceIdElement(); + case -1407102957: return getVersionIdElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1345650231: /*resourceId*/ return new String[] {"string"}; + case -1407102957: /*versionId*/ return new String[] {"string"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("resourceId")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.resourceId"); + } + else if (name.equals("versionId")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.versionId"); + } + else + return super.addChild(name); + } + + public ExampleScenarioInstanceContainedInstanceComponent copy() { + ExampleScenarioInstanceContainedInstanceComponent dst = new ExampleScenarioInstanceContainedInstanceComponent(); + copyValues(dst); + dst.resourceId = resourceId == null ? null : resourceId.copy(); + dst.versionId = versionId == null ? null : versionId.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioInstanceContainedInstanceComponent)) + return false; + ExampleScenarioInstanceContainedInstanceComponent o = (ExampleScenarioInstanceContainedInstanceComponent) other; + return compareDeep(resourceId, o.resourceId, true) && compareDeep(versionId, o.versionId, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioInstanceContainedInstanceComponent)) + return false; + ExampleScenarioInstanceContainedInstanceComponent o = (ExampleScenarioInstanceContainedInstanceComponent) other; + return compareValues(resourceId, o.resourceId, true) && compareValues(versionId, o.versionId, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceId, versionId); + } + + public String fhirType() { + return "ExampleScenario.instance.containedInstance"; + + } + + } + + @Block() + public static class ExampleScenarioProcessComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The diagram title of the group of operations. + */ + @Child(name = "title", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The diagram title of the group of operations", formalDefinition="The diagram title of the group of operations." ) + protected StringType title; + + /** + * A longer description of the group of operations. + */ + @Child(name = "description", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A longer description of the group of operations", formalDefinition="A longer description of the group of operations." ) + protected MarkdownType description; + + /** + * Description of initial status before the process starts. + */ + @Child(name = "preConditions", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of initial status before the process starts", formalDefinition="Description of initial status before the process starts." ) + protected MarkdownType preConditions; + + /** + * Description of final status after the process ends. + */ + @Child(name = "postConditions", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of final status after the process ends", formalDefinition="Description of final status after the process ends." ) + protected MarkdownType postConditions; + + /** + * Each step of the process. + */ + @Child(name = "step", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Each step of the process", formalDefinition="Each step of the process." ) + protected List step; + + private static final long serialVersionUID = 325578043L; + + /** + * Constructor + */ + public ExampleScenarioProcessComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioProcessComponent(StringType title) { + super(); + this.title = title; + } + + /** + * @return {@link #title} (The diagram title of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The diagram title of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public ExampleScenarioProcessComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The diagram title of the group of operations. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The diagram title of the group of operations. + */ + public ExampleScenarioProcessComponent setTitle(String value) { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + return this; + } + + /** + * @return {@link #description} (A longer description of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A longer description of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenarioProcessComponent setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return A longer description of the group of operations. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A longer description of the group of operations. + */ + public ExampleScenarioProcessComponent setDescription(String value) { + if (value == null) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #preConditions} (Description of initial status before the process starts.). This is the underlying object with id, value and extensions. The accessor "getPreConditions" gives direct access to the value + */ + public MarkdownType getPreConditionsElement() { + if (this.preConditions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.preConditions"); + else if (Configuration.doAutoCreate()) + this.preConditions = new MarkdownType(); // bb + return this.preConditions; + } + + public boolean hasPreConditionsElement() { + return this.preConditions != null && !this.preConditions.isEmpty(); + } + + public boolean hasPreConditions() { + return this.preConditions != null && !this.preConditions.isEmpty(); + } + + /** + * @param value {@link #preConditions} (Description of initial status before the process starts.). This is the underlying object with id, value and extensions. The accessor "getPreConditions" gives direct access to the value + */ + public ExampleScenarioProcessComponent setPreConditionsElement(MarkdownType value) { + this.preConditions = value; + return this; + } + + /** + * @return Description of initial status before the process starts. + */ + public String getPreConditions() { + return this.preConditions == null ? null : this.preConditions.getValue(); + } + + /** + * @param value Description of initial status before the process starts. + */ + public ExampleScenarioProcessComponent setPreConditions(String value) { + if (value == null) + this.preConditions = null; + else { + if (this.preConditions == null) + this.preConditions = new MarkdownType(); + this.preConditions.setValue(value); + } + return this; + } + + /** + * @return {@link #postConditions} (Description of final status after the process ends.). This is the underlying object with id, value and extensions. The accessor "getPostConditions" gives direct access to the value + */ + public MarkdownType getPostConditionsElement() { + if (this.postConditions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.postConditions"); + else if (Configuration.doAutoCreate()) + this.postConditions = new MarkdownType(); // bb + return this.postConditions; + } + + public boolean hasPostConditionsElement() { + return this.postConditions != null && !this.postConditions.isEmpty(); + } + + public boolean hasPostConditions() { + return this.postConditions != null && !this.postConditions.isEmpty(); + } + + /** + * @param value {@link #postConditions} (Description of final status after the process ends.). This is the underlying object with id, value and extensions. The accessor "getPostConditions" gives direct access to the value + */ + public ExampleScenarioProcessComponent setPostConditionsElement(MarkdownType value) { + this.postConditions = value; + return this; + } + + /** + * @return Description of final status after the process ends. + */ + public String getPostConditions() { + return this.postConditions == null ? null : this.postConditions.getValue(); + } + + /** + * @param value Description of final status after the process ends. + */ + public ExampleScenarioProcessComponent setPostConditions(String value) { + if (value == null) + this.postConditions = null; + else { + if (this.postConditions == null) + this.postConditions = new MarkdownType(); + this.postConditions.setValue(value); + } + return this; + } + + /** + * @return {@link #step} (Each step of the process.) + */ + public List getStep() { + if (this.step == null) + this.step = new ArrayList(); + return this.step; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioProcessComponent setStep(List theStep) { + this.step = theStep; + return this; + } + + public boolean hasStep() { + if (this.step == null) + return false; + for (ExampleScenarioProcessStepComponent item : this.step) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioProcessStepComponent addStep() { //3 + ExampleScenarioProcessStepComponent t = new ExampleScenarioProcessStepComponent(); + if (this.step == null) + this.step = new ArrayList(); + this.step.add(t); + return t; + } + + public ExampleScenarioProcessComponent addStep(ExampleScenarioProcessStepComponent t) { //3 + if (t == null) + return this; + if (this.step == null) + this.step = new ArrayList(); + this.step.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #step}, creating it if it does not already exist + */ + public ExampleScenarioProcessStepComponent getStepFirstRep() { + if (getStep().isEmpty()) { + addStep(); + } + return getStep().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("title", "string", "The diagram title of the group of operations.", 0, 1, title)); + children.add(new Property("description", "markdown", "A longer description of the group of operations.", 0, 1, description)); + children.add(new Property("preConditions", "markdown", "Description of initial status before the process starts.", 0, 1, preConditions)); + children.add(new Property("postConditions", "markdown", "Description of final status after the process ends.", 0, 1, postConditions)); + children.add(new Property("step", "", "Each step of the process.", 0, java.lang.Integer.MAX_VALUE, step)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 110371416: /*title*/ return new Property("title", "string", "The diagram title of the group of operations.", 0, 1, title); + case -1724546052: /*description*/ return new Property("description", "markdown", "A longer description of the group of operations.", 0, 1, description); + case -1006692933: /*preConditions*/ return new Property("preConditions", "markdown", "Description of initial status before the process starts.", 0, 1, preConditions); + case 1738302328: /*postConditions*/ return new Property("postConditions", "markdown", "Description of final status after the process ends.", 0, 1, postConditions); + case 3540684: /*step*/ return new Property("step", "", "Each step of the process.", 0, java.lang.Integer.MAX_VALUE, step); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case -1006692933: /*preConditions*/ return this.preConditions == null ? new Base[0] : new Base[] {this.preConditions}; // MarkdownType + case 1738302328: /*postConditions*/ return this.postConditions == null ? new Base[0] : new Base[] {this.postConditions}; // MarkdownType + case 3540684: /*step*/ return this.step == null ? new Base[0] : this.step.toArray(new Base[this.step.size()]); // ExampleScenarioProcessStepComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 110371416: // title + this.title = castToString(value); // StringType + return value; + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + case -1006692933: // preConditions + this.preConditions = castToMarkdown(value); // MarkdownType + return value; + case 1738302328: // postConditions + this.postConditions = castToMarkdown(value); // MarkdownType + return value; + case 3540684: // step + this.getStep().add((ExampleScenarioProcessStepComponent) value); // ExampleScenarioProcessStepComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("title")) { + this.title = castToString(value); // StringType + } else if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else if (name.equals("preConditions")) { + this.preConditions = castToMarkdown(value); // MarkdownType + } else if (name.equals("postConditions")) { + this.postConditions = castToMarkdown(value); // MarkdownType + } else if (name.equals("step")) { + this.getStep().add((ExampleScenarioProcessStepComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 110371416: return getTitleElement(); + case -1724546052: return getDescriptionElement(); + case -1006692933: return getPreConditionsElement(); + case 1738302328: return getPostConditionsElement(); + case 3540684: return addStep(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 110371416: /*title*/ return new String[] {"string"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + case -1006692933: /*preConditions*/ return new String[] {"markdown"}; + case 1738302328: /*postConditions*/ return new String[] {"markdown"}; + case 3540684: /*step*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.title"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else if (name.equals("preConditions")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.preConditions"); + } + else if (name.equals("postConditions")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.postConditions"); + } + else if (name.equals("step")) { + return addStep(); + } + else + return super.addChild(name); + } + + public ExampleScenarioProcessComponent copy() { + ExampleScenarioProcessComponent dst = new ExampleScenarioProcessComponent(); + copyValues(dst); + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.preConditions = preConditions == null ? null : preConditions.copy(); + dst.postConditions = postConditions == null ? null : postConditions.copy(); + if (step != null) { + dst.step = new ArrayList(); + for (ExampleScenarioProcessStepComponent i : step) + dst.step.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioProcessComponent)) + return false; + ExampleScenarioProcessComponent o = (ExampleScenarioProcessComponent) other; + return compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(preConditions, o.preConditions, true) + && compareDeep(postConditions, o.postConditions, true) && compareDeep(step, o.step, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioProcessComponent)) + return false; + ExampleScenarioProcessComponent o = (ExampleScenarioProcessComponent) other; + return compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(preConditions, o.preConditions, true) + && compareValues(postConditions, o.postConditions, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, description, preConditions + , postConditions, step); + } + + public String fhirType() { + return "ExampleScenario.process"; + + } + + } + + @Block() + public static class ExampleScenarioProcessStepComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Nested process. + */ + @Child(name = "process", type = {ExampleScenarioProcessComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Nested process", formalDefinition="Nested process." ) + protected List process; + + /** + * If there is a pause in the flow. + */ + @Child(name = "pause", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="If there is a pause in the flow", formalDefinition="If there is a pause in the flow." ) + protected BooleanType pause; + + /** + * Each interaction or action. + */ + @Child(name = "operation", type = {}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Each interaction or action", formalDefinition="Each interaction or action." ) + protected ExampleScenarioProcessStepOperationComponent operation; + + /** + * Each interaction in the workflow. + */ + @Child(name = "alternative", type = {}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Each interaction in the process", formalDefinition="Each interaction in the workflow." ) + protected ExampleScenarioProcessStepAlternativeComponent alternative; + + private static final long serialVersionUID = -939172007L; + + /** + * Constructor + */ + public ExampleScenarioProcessStepComponent() { + super(); + } + + /** + * @return {@link #process} (Nested process.) + */ + public List getProcess() { + if (this.process == null) + this.process = new ArrayList(); + return this.process; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioProcessStepComponent setProcess(List theProcess) { + this.process = theProcess; + return this; + } + + public boolean hasProcess() { + if (this.process == null) + return false; + for (ExampleScenarioProcessComponent item : this.process) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioProcessComponent addProcess() { //3 + ExampleScenarioProcessComponent t = new ExampleScenarioProcessComponent(); + if (this.process == null) + this.process = new ArrayList(); + this.process.add(t); + return t; + } + + public ExampleScenarioProcessStepComponent addProcess(ExampleScenarioProcessComponent t) { //3 + if (t == null) + return this; + if (this.process == null) + this.process = new ArrayList(); + this.process.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #process}, creating it if it does not already exist + */ + public ExampleScenarioProcessComponent getProcessFirstRep() { + if (getProcess().isEmpty()) { + addProcess(); + } + return getProcess().get(0); + } + + /** + * @return {@link #pause} (If there is a pause in the flow.). This is the underlying object with id, value and extensions. The accessor "getPause" gives direct access to the value + */ + public BooleanType getPauseElement() { + if (this.pause == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.pause"); + else if (Configuration.doAutoCreate()) + this.pause = new BooleanType(); // bb + return this.pause; + } + + public boolean hasPauseElement() { + return this.pause != null && !this.pause.isEmpty(); + } + + public boolean hasPause() { + return this.pause != null && !this.pause.isEmpty(); + } + + /** + * @param value {@link #pause} (If there is a pause in the flow.). This is the underlying object with id, value and extensions. The accessor "getPause" gives direct access to the value + */ + public ExampleScenarioProcessStepComponent setPauseElement(BooleanType value) { + this.pause = value; + return this; + } + + /** + * @return If there is a pause in the flow. + */ + public boolean getPause() { + return this.pause == null || this.pause.isEmpty() ? false : this.pause.getValue(); + } + + /** + * @param value If there is a pause in the flow. + */ + public ExampleScenarioProcessStepComponent setPause(boolean value) { + if (this.pause == null) + this.pause = new BooleanType(); + this.pause.setValue(value); + return this; + } + + /** + * @return {@link #operation} (Each interaction or action.) + */ + public ExampleScenarioProcessStepOperationComponent getOperation() { + if (this.operation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.operation"); + else if (Configuration.doAutoCreate()) + this.operation = new ExampleScenarioProcessStepOperationComponent(); // cc + return this.operation; + } + + public boolean hasOperation() { + return this.operation != null && !this.operation.isEmpty(); + } + + /** + * @param value {@link #operation} (Each interaction or action.) + */ + public ExampleScenarioProcessStepComponent setOperation(ExampleScenarioProcessStepOperationComponent value) { + this.operation = value; + return this; + } + + /** + * @return {@link #alternative} (Each interaction in the workflow.) + */ + public ExampleScenarioProcessStepAlternativeComponent getAlternative() { + if (this.alternative == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.alternative"); + else if (Configuration.doAutoCreate()) + this.alternative = new ExampleScenarioProcessStepAlternativeComponent(); // cc + return this.alternative; + } + + public boolean hasAlternative() { + return this.alternative != null && !this.alternative.isEmpty(); + } + + /** + * @param value {@link #alternative} (Each interaction in the workflow.) + */ + public ExampleScenarioProcessStepComponent setAlternative(ExampleScenarioProcessStepAlternativeComponent value) { + this.alternative = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("process", "@ExampleScenario.process", "Nested process.", 0, java.lang.Integer.MAX_VALUE, process)); + children.add(new Property("pause", "boolean", "If there is a pause in the flow.", 0, 1, pause)); + children.add(new Property("operation", "", "Each interaction or action.", 0, 1, operation)); + children.add(new Property("alternative", "", "Each interaction in the workflow.", 0, 1, alternative)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -309518737: /*process*/ return new Property("process", "@ExampleScenario.process", "Nested process.", 0, java.lang.Integer.MAX_VALUE, process); + case 106440182: /*pause*/ return new Property("pause", "boolean", "If there is a pause in the flow.", 0, 1, pause); + case 1662702951: /*operation*/ return new Property("operation", "", "Each interaction or action.", 0, 1, operation); + case -196794451: /*alternative*/ return new Property("alternative", "", "Each interaction in the workflow.", 0, 1, alternative); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -309518737: /*process*/ return this.process == null ? new Base[0] : this.process.toArray(new Base[this.process.size()]); // ExampleScenarioProcessComponent + case 106440182: /*pause*/ return this.pause == null ? new Base[0] : new Base[] {this.pause}; // BooleanType + case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // ExampleScenarioProcessStepOperationComponent + case -196794451: /*alternative*/ return this.alternative == null ? new Base[0] : new Base[] {this.alternative}; // ExampleScenarioProcessStepAlternativeComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -309518737: // process + this.getProcess().add((ExampleScenarioProcessComponent) value); // ExampleScenarioProcessComponent + return value; + case 106440182: // pause + this.pause = castToBoolean(value); // BooleanType + return value; + case 1662702951: // operation + this.operation = (ExampleScenarioProcessStepOperationComponent) value; // ExampleScenarioProcessStepOperationComponent + return value; + case -196794451: // alternative + this.alternative = (ExampleScenarioProcessStepAlternativeComponent) value; // ExampleScenarioProcessStepAlternativeComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("process")) { + this.getProcess().add((ExampleScenarioProcessComponent) value); + } else if (name.equals("pause")) { + this.pause = castToBoolean(value); // BooleanType + } else if (name.equals("operation")) { + this.operation = (ExampleScenarioProcessStepOperationComponent) value; // ExampleScenarioProcessStepOperationComponent + } else if (name.equals("alternative")) { + this.alternative = (ExampleScenarioProcessStepAlternativeComponent) value; // ExampleScenarioProcessStepAlternativeComponent + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -309518737: return addProcess(); + case 106440182: return getPauseElement(); + case 1662702951: return getOperation(); + case -196794451: return getAlternative(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -309518737: /*process*/ return new String[] {"@ExampleScenario.process"}; + case 106440182: /*pause*/ return new String[] {"boolean"}; + case 1662702951: /*operation*/ return new String[] {}; + case -196794451: /*alternative*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("process")) { + return addProcess(); + } + else if (name.equals("pause")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.pause"); + } + else if (name.equals("operation")) { + this.operation = new ExampleScenarioProcessStepOperationComponent(); + return this.operation; + } + else if (name.equals("alternative")) { + this.alternative = new ExampleScenarioProcessStepAlternativeComponent(); + return this.alternative; + } + else + return super.addChild(name); + } + + public ExampleScenarioProcessStepComponent copy() { + ExampleScenarioProcessStepComponent dst = new ExampleScenarioProcessStepComponent(); + copyValues(dst); + if (process != null) { + dst.process = new ArrayList(); + for (ExampleScenarioProcessComponent i : process) + dst.process.add(i.copy()); + }; + dst.pause = pause == null ? null : pause.copy(); + dst.operation = operation == null ? null : operation.copy(); + dst.alternative = alternative == null ? null : alternative.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepComponent)) + return false; + ExampleScenarioProcessStepComponent o = (ExampleScenarioProcessStepComponent) other; + return compareDeep(process, o.process, true) && compareDeep(pause, o.pause, true) && compareDeep(operation, o.operation, true) + && compareDeep(alternative, o.alternative, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepComponent)) + return false; + ExampleScenarioProcessStepComponent o = (ExampleScenarioProcessStepComponent) other; + return compareValues(pause, o.pause, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(process, pause, operation + , alternative); + } + + public String fhirType() { + return "ExampleScenario.process.step"; + + } + + } + + @Block() + public static class ExampleScenarioProcessStepOperationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The sequential number of the interaction. + */ + @Child(name = "number", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The sequential number of the interaction", formalDefinition="The sequential number of the interaction." ) + protected StringType number; + + /** + * The type of operation - CRUD. + */ + @Child(name = "type", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of operation - CRUD", formalDefinition="The type of operation - CRUD." ) + protected StringType type; + + /** + * The human-friendly name of the interaction. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The human-friendly name of the interaction", formalDefinition="The human-friendly name of the interaction." ) + protected StringType name; + + /** + * Who starts the transaction. + */ + @Child(name = "initiator", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who starts the transaction", formalDefinition="Who starts the transaction." ) + protected StringType initiator; + + /** + * Who receives the transaction. + */ + @Child(name = "receiver", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who receives the transaction", formalDefinition="Who receives the transaction." ) + protected StringType receiver; + + /** + * A comment to be inserted in the diagram. + */ + @Child(name = "description", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="A comment to be inserted in the diagram", formalDefinition="A comment to be inserted in the diagram." ) + protected MarkdownType description; + + /** + * Whether the initiator is deactivated right after the transaction. + */ + @Child(name = "initiatorActive", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether the initiator is deactivated right after the transaction", formalDefinition="Whether the initiator is deactivated right after the transaction." ) + protected BooleanType initiatorActive; + + /** + * Whether the receiver is deactivated right after the transaction. + */ + @Child(name = "receiverActive", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether the receiver is deactivated right after the transaction", formalDefinition="Whether the receiver is deactivated right after the transaction." ) + protected BooleanType receiverActive; + + /** + * Each resource instance used by the initiator. + */ + @Child(name = "request", type = {ExampleScenarioInstanceContainedInstanceComponent.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Each resource instance used by the initiator", formalDefinition="Each resource instance used by the initiator." ) + protected ExampleScenarioInstanceContainedInstanceComponent request; + + /** + * Each resource instance used by the responder. + */ + @Child(name = "response", type = {ExampleScenarioInstanceContainedInstanceComponent.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Each resource instance used by the responder", formalDefinition="Each resource instance used by the responder." ) + protected ExampleScenarioInstanceContainedInstanceComponent response; + + private static final long serialVersionUID = 911241906L; + + /** + * Constructor + */ + public ExampleScenarioProcessStepOperationComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioProcessStepOperationComponent(StringType number) { + super(); + this.number = number; + } + + /** + * @return {@link #number} (The sequential number of the interaction.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public StringType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new StringType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (The sequential number of the interaction.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setNumberElement(StringType value) { + this.number = value; + return this; + } + + /** + * @return The sequential number of the interaction. + */ + public String getNumber() { + return this.number == null ? null : this.number.getValue(); + } + + /** + * @param value The sequential number of the interaction. + */ + public ExampleScenarioProcessStepOperationComponent setNumber(String value) { + if (this.number == null) + this.number = new StringType(); + this.number.setValue(value); + return this; + } + + /** + * @return {@link #type} (The type of operation - CRUD.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public StringType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new StringType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of operation - CRUD.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setTypeElement(StringType value) { + this.type = value; + return this; + } + + /** + * @return The type of operation - CRUD. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of operation - CRUD. + */ + public ExampleScenarioProcessStepOperationComponent setType(String value) { + if (Utilities.noString(value)) + this.type = null; + else { + if (this.type == null) + this.type = new StringType(); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (The human-friendly name of the interaction.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The human-friendly name of the interaction.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The human-friendly name of the interaction. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The human-friendly name of the interaction. + */ + public ExampleScenarioProcessStepOperationComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #initiator} (Who starts the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiator" gives direct access to the value + */ + public StringType getInitiatorElement() { + if (this.initiator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.initiator"); + else if (Configuration.doAutoCreate()) + this.initiator = new StringType(); // bb + return this.initiator; + } + + public boolean hasInitiatorElement() { + return this.initiator != null && !this.initiator.isEmpty(); + } + + public boolean hasInitiator() { + return this.initiator != null && !this.initiator.isEmpty(); + } + + /** + * @param value {@link #initiator} (Who starts the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiator" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setInitiatorElement(StringType value) { + this.initiator = value; + return this; + } + + /** + * @return Who starts the transaction. + */ + public String getInitiator() { + return this.initiator == null ? null : this.initiator.getValue(); + } + + /** + * @param value Who starts the transaction. + */ + public ExampleScenarioProcessStepOperationComponent setInitiator(String value) { + if (Utilities.noString(value)) + this.initiator = null; + else { + if (this.initiator == null) + this.initiator = new StringType(); + this.initiator.setValue(value); + } + return this; + } + + /** + * @return {@link #receiver} (Who receives the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiver" gives direct access to the value + */ + public StringType getReceiverElement() { + if (this.receiver == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.receiver"); + else if (Configuration.doAutoCreate()) + this.receiver = new StringType(); // bb + return this.receiver; + } + + public boolean hasReceiverElement() { + return this.receiver != null && !this.receiver.isEmpty(); + } + + public boolean hasReceiver() { + return this.receiver != null && !this.receiver.isEmpty(); + } + + /** + * @param value {@link #receiver} (Who receives the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiver" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setReceiverElement(StringType value) { + this.receiver = value; + return this; + } + + /** + * @return Who receives the transaction. + */ + public String getReceiver() { + return this.receiver == null ? null : this.receiver.getValue(); + } + + /** + * @param value Who receives the transaction. + */ + public ExampleScenarioProcessStepOperationComponent setReceiver(String value) { + if (Utilities.noString(value)) + this.receiver = null; + else { + if (this.receiver == null) + this.receiver = new StringType(); + this.receiver.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A comment to be inserted in the diagram.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A comment to be inserted in the diagram.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return A comment to be inserted in the diagram. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A comment to be inserted in the diagram. + */ + public ExampleScenarioProcessStepOperationComponent setDescription(String value) { + if (value == null) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #initiatorActive} (Whether the initiator is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiatorActive" gives direct access to the value + */ + public BooleanType getInitiatorActiveElement() { + if (this.initiatorActive == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.initiatorActive"); + else if (Configuration.doAutoCreate()) + this.initiatorActive = new BooleanType(); // bb + return this.initiatorActive; + } + + public boolean hasInitiatorActiveElement() { + return this.initiatorActive != null && !this.initiatorActive.isEmpty(); + } + + public boolean hasInitiatorActive() { + return this.initiatorActive != null && !this.initiatorActive.isEmpty(); + } + + /** + * @param value {@link #initiatorActive} (Whether the initiator is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiatorActive" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setInitiatorActiveElement(BooleanType value) { + this.initiatorActive = value; + return this; + } + + /** + * @return Whether the initiator is deactivated right after the transaction. + */ + public boolean getInitiatorActive() { + return this.initiatorActive == null || this.initiatorActive.isEmpty() ? false : this.initiatorActive.getValue(); + } + + /** + * @param value Whether the initiator is deactivated right after the transaction. + */ + public ExampleScenarioProcessStepOperationComponent setInitiatorActive(boolean value) { + if (this.initiatorActive == null) + this.initiatorActive = new BooleanType(); + this.initiatorActive.setValue(value); + return this; + } + + /** + * @return {@link #receiverActive} (Whether the receiver is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiverActive" gives direct access to the value + */ + public BooleanType getReceiverActiveElement() { + if (this.receiverActive == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.receiverActive"); + else if (Configuration.doAutoCreate()) + this.receiverActive = new BooleanType(); // bb + return this.receiverActive; + } + + public boolean hasReceiverActiveElement() { + return this.receiverActive != null && !this.receiverActive.isEmpty(); + } + + public boolean hasReceiverActive() { + return this.receiverActive != null && !this.receiverActive.isEmpty(); + } + + /** + * @param value {@link #receiverActive} (Whether the receiver is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiverActive" gives direct access to the value + */ + public ExampleScenarioProcessStepOperationComponent setReceiverActiveElement(BooleanType value) { + this.receiverActive = value; + return this; + } + + /** + * @return Whether the receiver is deactivated right after the transaction. + */ + public boolean getReceiverActive() { + return this.receiverActive == null || this.receiverActive.isEmpty() ? false : this.receiverActive.getValue(); + } + + /** + * @param value Whether the receiver is deactivated right after the transaction. + */ + public ExampleScenarioProcessStepOperationComponent setReceiverActive(boolean value) { + if (this.receiverActive == null) + this.receiverActive = new BooleanType(); + this.receiverActive.setValue(value); + return this; + } + + /** + * @return {@link #request} (Each resource instance used by the initiator.) + */ + public ExampleScenarioInstanceContainedInstanceComponent getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.request"); + else if (Configuration.doAutoCreate()) + this.request = new ExampleScenarioInstanceContainedInstanceComponent(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Each resource instance used by the initiator.) + */ + public ExampleScenarioProcessStepOperationComponent setRequest(ExampleScenarioInstanceContainedInstanceComponent value) { + this.request = value; + return this; + } + + /** + * @return {@link #response} (Each resource instance used by the responder.) + */ + public ExampleScenarioInstanceContainedInstanceComponent getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.response"); + else if (Configuration.doAutoCreate()) + this.response = new ExampleScenarioInstanceContainedInstanceComponent(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Each resource instance used by the responder.) + */ + public ExampleScenarioProcessStepOperationComponent setResponse(ExampleScenarioInstanceContainedInstanceComponent value) { + this.response = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("number", "string", "The sequential number of the interaction.", 0, 1, number)); + children.add(new Property("type", "string", "The type of operation - CRUD.", 0, 1, type)); + children.add(new Property("name", "string", "The human-friendly name of the interaction.", 0, 1, name)); + children.add(new Property("initiator", "string", "Who starts the transaction.", 0, 1, initiator)); + children.add(new Property("receiver", "string", "Who receives the transaction.", 0, 1, receiver)); + children.add(new Property("description", "markdown", "A comment to be inserted in the diagram.", 0, 1, description)); + children.add(new Property("initiatorActive", "boolean", "Whether the initiator is deactivated right after the transaction.", 0, 1, initiatorActive)); + children.add(new Property("receiverActive", "boolean", "Whether the receiver is deactivated right after the transaction.", 0, 1, receiverActive)); + children.add(new Property("request", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the initiator.", 0, 1, request)); + children.add(new Property("response", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the responder.", 0, 1, response)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1034364087: /*number*/ return new Property("number", "string", "The sequential number of the interaction.", 0, 1, number); + case 3575610: /*type*/ return new Property("type", "string", "The type of operation - CRUD.", 0, 1, type); + case 3373707: /*name*/ return new Property("name", "string", "The human-friendly name of the interaction.", 0, 1, name); + case -248987089: /*initiator*/ return new Property("initiator", "string", "Who starts the transaction.", 0, 1, initiator); + case -808719889: /*receiver*/ return new Property("receiver", "string", "Who receives the transaction.", 0, 1, receiver); + case -1724546052: /*description*/ return new Property("description", "markdown", "A comment to be inserted in the diagram.", 0, 1, description); + case 384339477: /*initiatorActive*/ return new Property("initiatorActive", "boolean", "Whether the initiator is deactivated right after the transaction.", 0, 1, initiatorActive); + case -285284907: /*receiverActive*/ return new Property("receiverActive", "boolean", "Whether the receiver is deactivated right after the transaction.", 0, 1, receiverActive); + case 1095692943: /*request*/ return new Property("request", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the initiator.", 0, 1, request); + case -340323263: /*response*/ return new Property("response", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the responder.", 0, 1, response); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // StringType + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // StringType + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case -248987089: /*initiator*/ return this.initiator == null ? new Base[0] : new Base[] {this.initiator}; // StringType + case -808719889: /*receiver*/ return this.receiver == null ? new Base[0] : new Base[] {this.receiver}; // StringType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case 384339477: /*initiatorActive*/ return this.initiatorActive == null ? new Base[0] : new Base[] {this.initiatorActive}; // BooleanType + case -285284907: /*receiverActive*/ return this.receiverActive == null ? new Base[0] : new Base[] {this.receiverActive}; // BooleanType + case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // ExampleScenarioInstanceContainedInstanceComponent + case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // ExampleScenarioInstanceContainedInstanceComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1034364087: // number + this.number = castToString(value); // StringType + return value; + case 3575610: // type + this.type = castToString(value); // StringType + return value; + case 3373707: // name + this.name = castToString(value); // StringType + return value; + case -248987089: // initiator + this.initiator = castToString(value); // StringType + return value; + case -808719889: // receiver + this.receiver = castToString(value); // StringType + return value; + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + case 384339477: // initiatorActive + this.initiatorActive = castToBoolean(value); // BooleanType + return value; + case -285284907: // receiverActive + this.receiverActive = castToBoolean(value); // BooleanType + return value; + case 1095692943: // request + this.request = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent + return value; + case -340323263: // response + this.response = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("number")) { + this.number = castToString(value); // StringType + } else if (name.equals("type")) { + this.type = castToString(value); // StringType + } else if (name.equals("name")) { + this.name = castToString(value); // StringType + } else if (name.equals("initiator")) { + this.initiator = castToString(value); // StringType + } else if (name.equals("receiver")) { + this.receiver = castToString(value); // StringType + } else if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else if (name.equals("initiatorActive")) { + this.initiatorActive = castToBoolean(value); // BooleanType + } else if (name.equals("receiverActive")) { + this.receiverActive = castToBoolean(value); // BooleanType + } else if (name.equals("request")) { + this.request = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent + } else if (name.equals("response")) { + this.response = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1034364087: return getNumberElement(); + case 3575610: return getTypeElement(); + case 3373707: return getNameElement(); + case -248987089: return getInitiatorElement(); + case -808719889: return getReceiverElement(); + case -1724546052: return getDescriptionElement(); + case 384339477: return getInitiatorActiveElement(); + case -285284907: return getReceiverActiveElement(); + case 1095692943: return getRequest(); + case -340323263: return getResponse(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1034364087: /*number*/ return new String[] {"string"}; + case 3575610: /*type*/ return new String[] {"string"}; + case 3373707: /*name*/ return new String[] {"string"}; + case -248987089: /*initiator*/ return new String[] {"string"}; + case -808719889: /*receiver*/ return new String[] {"string"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + case 384339477: /*initiatorActive*/ return new String[] {"boolean"}; + case -285284907: /*receiverActive*/ return new String[] {"boolean"}; + case 1095692943: /*request*/ return new String[] {"@ExampleScenario.instance.containedInstance"}; + case -340323263: /*response*/ return new String[] {"@ExampleScenario.instance.containedInstance"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.number"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.type"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name"); + } + else if (name.equals("initiator")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.initiator"); + } + else if (name.equals("receiver")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.receiver"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else if (name.equals("initiatorActive")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.initiatorActive"); + } + else if (name.equals("receiverActive")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.receiverActive"); + } + else if (name.equals("request")) { + this.request = new ExampleScenarioInstanceContainedInstanceComponent(); + return this.request; + } + else if (name.equals("response")) { + this.response = new ExampleScenarioInstanceContainedInstanceComponent(); + return this.response; + } + else + return super.addChild(name); + } + + public ExampleScenarioProcessStepOperationComponent copy() { + ExampleScenarioProcessStepOperationComponent dst = new ExampleScenarioProcessStepOperationComponent(); + copyValues(dst); + dst.number = number == null ? null : number.copy(); + dst.type = type == null ? null : type.copy(); + dst.name = name == null ? null : name.copy(); + dst.initiator = initiator == null ? null : initiator.copy(); + dst.receiver = receiver == null ? null : receiver.copy(); + dst.description = description == null ? null : description.copy(); + dst.initiatorActive = initiatorActive == null ? null : initiatorActive.copy(); + dst.receiverActive = receiverActive == null ? null : receiverActive.copy(); + dst.request = request == null ? null : request.copy(); + dst.response = response == null ? null : response.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepOperationComponent)) + return false; + ExampleScenarioProcessStepOperationComponent o = (ExampleScenarioProcessStepOperationComponent) other; + return compareDeep(number, o.number, true) && compareDeep(type, o.type, true) && compareDeep(name, o.name, true) + && compareDeep(initiator, o.initiator, true) && compareDeep(receiver, o.receiver, true) && compareDeep(description, o.description, true) + && compareDeep(initiatorActive, o.initiatorActive, true) && compareDeep(receiverActive, o.receiverActive, true) + && compareDeep(request, o.request, true) && compareDeep(response, o.response, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepOperationComponent)) + return false; + ExampleScenarioProcessStepOperationComponent o = (ExampleScenarioProcessStepOperationComponent) other; + return compareValues(number, o.number, true) && compareValues(type, o.type, true) && compareValues(name, o.name, true) + && compareValues(initiator, o.initiator, true) && compareValues(receiver, o.receiver, true) && compareValues(description, o.description, true) + && compareValues(initiatorActive, o.initiatorActive, true) && compareValues(receiverActive, o.receiverActive, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, name, initiator + , receiver, description, initiatorActive, receiverActive, request, response); + } + + public String fhirType() { + return "ExampleScenario.process.step.operation"; + + } + + } + + @Block() + public static class ExampleScenarioProcessStepAlternativeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of each alternative. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The name of each alternative", formalDefinition="The name of each alternative." ) + protected StringType name; + + /** + * Each of the possible options in an alternative. + */ + @Child(name = "option", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Each of the possible options in an alternative", formalDefinition="Each of the possible options in an alternative." ) + protected List option; + + private static final long serialVersionUID = 379920547L; + + /** + * Constructor + */ + public ExampleScenarioProcessStepAlternativeComponent() { + super(); + } + + /** + * @return {@link #name} (The name of each alternative.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepAlternativeComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of each alternative.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExampleScenarioProcessStepAlternativeComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of each alternative. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of each alternative. + */ + public ExampleScenarioProcessStepAlternativeComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #option} (Each of the possible options in an alternative.) + */ + public List getOption() { + if (this.option == null) + this.option = new ArrayList(); + return this.option; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioProcessStepAlternativeComponent setOption(List theOption) { + this.option = theOption; + return this; + } + + public boolean hasOption() { + if (this.option == null) + return false; + for (ExampleScenarioProcessStepAlternativeOptionComponent item : this.option) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioProcessStepAlternativeOptionComponent addOption() { //3 + ExampleScenarioProcessStepAlternativeOptionComponent t = new ExampleScenarioProcessStepAlternativeOptionComponent(); + if (this.option == null) + this.option = new ArrayList(); + this.option.add(t); + return t; + } + + public ExampleScenarioProcessStepAlternativeComponent addOption(ExampleScenarioProcessStepAlternativeOptionComponent t) { //3 + if (t == null) + return this; + if (this.option == null) + this.option = new ArrayList(); + this.option.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #option}, creating it if it does not already exist + */ + public ExampleScenarioProcessStepAlternativeOptionComponent getOptionFirstRep() { + if (getOption().isEmpty()) { + addOption(); + } + return getOption().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("name", "string", "The name of each alternative.", 0, 1, name)); + children.add(new Property("option", "", "Each of the possible options in an alternative.", 0, java.lang.Integer.MAX_VALUE, option)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3373707: /*name*/ return new Property("name", "string", "The name of each alternative.", 0, 1, name); + case -1010136971: /*option*/ return new Property("option", "", "Each of the possible options in an alternative.", 0, java.lang.Integer.MAX_VALUE, option); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case -1010136971: /*option*/ return this.option == null ? new Base[0] : this.option.toArray(new Base[this.option.size()]); // ExampleScenarioProcessStepAlternativeOptionComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3373707: // name + this.name = castToString(value); // StringType + return value; + case -1010136971: // option + this.getOption().add((ExampleScenarioProcessStepAlternativeOptionComponent) value); // ExampleScenarioProcessStepAlternativeOptionComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) { + this.name = castToString(value); // StringType + } else if (name.equals("option")) { + this.getOption().add((ExampleScenarioProcessStepAlternativeOptionComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3373707: return getNameElement(); + case -1010136971: return addOption(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3373707: /*name*/ return new String[] {"string"}; + case -1010136971: /*option*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name"); + } + else if (name.equals("option")) { + return addOption(); + } + else + return super.addChild(name); + } + + public ExampleScenarioProcessStepAlternativeComponent copy() { + ExampleScenarioProcessStepAlternativeComponent dst = new ExampleScenarioProcessStepAlternativeComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (option != null) { + dst.option = new ArrayList(); + for (ExampleScenarioProcessStepAlternativeOptionComponent i : option) + dst.option.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepAlternativeComponent)) + return false; + ExampleScenarioProcessStepAlternativeComponent o = (ExampleScenarioProcessStepAlternativeComponent) other; + return compareDeep(name, o.name, true) && compareDeep(option, o.option, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepAlternativeComponent)) + return false; + ExampleScenarioProcessStepAlternativeComponent o = (ExampleScenarioProcessStepAlternativeComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, option); + } + + public String fhirType() { + return "ExampleScenario.process.step.alternative"; + + } + + } + + @Block() + public static class ExampleScenarioProcessStepAlternativeOptionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A human-readable description of each option. + */ + @Child(name = "description", type = {MarkdownType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="A human-readable description of each option", formalDefinition="A human-readable description of each option." ) + protected MarkdownType description; + + /** + * What happens in each alternative option. + */ + @Child(name = "step", type = {ExampleScenarioProcessStepComponent.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What happens in each alternative option", formalDefinition="What happens in each alternative option." ) + protected List step; + + /** + * If there is a pause in the flow. + */ + @Child(name = "pause", type = {BooleanType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="If there is a pause in the flow", formalDefinition="If there is a pause in the flow." ) + protected List pause; + + private static final long serialVersionUID = -1719991565L; + + /** + * Constructor + */ + public ExampleScenarioProcessStepAlternativeOptionComponent() { + super(); + } + + /** + * Constructor + */ + public ExampleScenarioProcessStepAlternativeOptionComponent(MarkdownType description) { + super(); + this.description = description; + } + + /** + * @return {@link #description} (A human-readable description of each option.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenarioProcessStepAlternativeOptionComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A human-readable description of each option.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenarioProcessStepAlternativeOptionComponent setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return A human-readable description of each option. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A human-readable description of each option. + */ + public ExampleScenarioProcessStepAlternativeOptionComponent setDescription(String value) { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + return this; + } + + /** + * @return {@link #step} (What happens in each alternative option.) + */ + public List getStep() { + if (this.step == null) + this.step = new ArrayList(); + return this.step; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioProcessStepAlternativeOptionComponent setStep(List theStep) { + this.step = theStep; + return this; + } + + public boolean hasStep() { + if (this.step == null) + return false; + for (ExampleScenarioProcessStepComponent item : this.step) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioProcessStepComponent addStep() { //3 + ExampleScenarioProcessStepComponent t = new ExampleScenarioProcessStepComponent(); + if (this.step == null) + this.step = new ArrayList(); + this.step.add(t); + return t; + } + + public ExampleScenarioProcessStepAlternativeOptionComponent addStep(ExampleScenarioProcessStepComponent t) { //3 + if (t == null) + return this; + if (this.step == null) + this.step = new ArrayList(); + this.step.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #step}, creating it if it does not already exist + */ + public ExampleScenarioProcessStepComponent getStepFirstRep() { + if (getStep().isEmpty()) { + addStep(); + } + return getStep().get(0); + } + + /** + * @return {@link #pause} (If there is a pause in the flow.) + */ + public List getPause() { + if (this.pause == null) + this.pause = new ArrayList(); + return this.pause; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenarioProcessStepAlternativeOptionComponent setPause(List thePause) { + this.pause = thePause; + return this; + } + + public boolean hasPause() { + if (this.pause == null) + return false; + for (BooleanType item : this.pause) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #pause} (If there is a pause in the flow.) + */ + public BooleanType addPauseElement() {//2 + BooleanType t = new BooleanType(); + if (this.pause == null) + this.pause = new ArrayList(); + this.pause.add(t); + return t; + } + + /** + * @param value {@link #pause} (If there is a pause in the flow.) + */ + public ExampleScenarioProcessStepAlternativeOptionComponent addPause(boolean value) { //1 + BooleanType t = new BooleanType(); + t.setValue(value); + if (this.pause == null) + this.pause = new ArrayList(); + this.pause.add(t); + return this; + } + + /** + * @param value {@link #pause} (If there is a pause in the flow.) + */ + public boolean hasPause(boolean value) { + if (this.pause == null) + return false; + for (BooleanType v : this.pause) + if (v.equals(value)) // boolean + return true; + return false; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("description", "markdown", "A human-readable description of each option.", 0, 1, description)); + children.add(new Property("step", "@ExampleScenario.process.step", "What happens in each alternative option.", 0, java.lang.Integer.MAX_VALUE, step)); + children.add(new Property("pause", "boolean", "If there is a pause in the flow.", 0, java.lang.Integer.MAX_VALUE, pause)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1724546052: /*description*/ return new Property("description", "markdown", "A human-readable description of each option.", 0, 1, description); + case 3540684: /*step*/ return new Property("step", "@ExampleScenario.process.step", "What happens in each alternative option.", 0, java.lang.Integer.MAX_VALUE, step); + case 106440182: /*pause*/ return new Property("pause", "boolean", "If there is a pause in the flow.", 0, java.lang.Integer.MAX_VALUE, pause); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case 3540684: /*step*/ return this.step == null ? new Base[0] : this.step.toArray(new Base[this.step.size()]); // ExampleScenarioProcessStepComponent + case 106440182: /*pause*/ return this.pause == null ? new Base[0] : this.pause.toArray(new Base[this.pause.size()]); // BooleanType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + case 3540684: // step + this.getStep().add((ExampleScenarioProcessStepComponent) value); // ExampleScenarioProcessStepComponent + return value; + case 106440182: // pause + this.getPause().add(castToBoolean(value)); // BooleanType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else if (name.equals("step")) { + this.getStep().add((ExampleScenarioProcessStepComponent) value); + } else if (name.equals("pause")) { + this.getPause().add(castToBoolean(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1724546052: return getDescriptionElement(); + case 3540684: return addStep(); + case 106440182: return addPauseElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1724546052: /*description*/ return new String[] {"markdown"}; + case 3540684: /*step*/ return new String[] {"@ExampleScenario.process.step"}; + case 106440182: /*pause*/ return new String[] {"boolean"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else if (name.equals("step")) { + return addStep(); + } + else if (name.equals("pause")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.pause"); + } + else + return super.addChild(name); + } + + public ExampleScenarioProcessStepAlternativeOptionComponent copy() { + ExampleScenarioProcessStepAlternativeOptionComponent dst = new ExampleScenarioProcessStepAlternativeOptionComponent(); + copyValues(dst); + dst.description = description == null ? null : description.copy(); + if (step != null) { + dst.step = new ArrayList(); + for (ExampleScenarioProcessStepComponent i : step) + dst.step.add(i.copy()); + }; + if (pause != null) { + dst.pause = new ArrayList(); + for (BooleanType i : pause) + dst.pause.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepAlternativeOptionComponent)) + return false; + ExampleScenarioProcessStepAlternativeOptionComponent o = (ExampleScenarioProcessStepAlternativeOptionComponent) other; + return compareDeep(description, o.description, true) && compareDeep(step, o.step, true) && compareDeep(pause, o.pause, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenarioProcessStepAlternativeOptionComponent)) + return false; + ExampleScenarioProcessStepAlternativeOptionComponent o = (ExampleScenarioProcessStepAlternativeOptionComponent) other; + return compareValues(description, o.description, true) && compareValues(pause, o.pause, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, step, pause + ); + } + + public String fhirType() { + return "ExampleScenario.process.step.alternative.option"; + + } + + } + + /** + * A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional identifier for the example scenario", formalDefinition="A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance." ) + protected List identifier; + + /** + * A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario. + */ + @Child(name = "copyright", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario." ) + protected MarkdownType copyright; + + /** + * What is the example supposed to resolve. + */ + @Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="What is the example supposed to resolve", formalDefinition="What is the example supposed to resolve." ) + protected MarkdownType purpose; + + /** + * Actor participating in the resource. + */ + @Child(name = "actor", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Actor participating in the resource", formalDefinition="Actor participating in the resource." ) + protected List actor; + + /** + * Each resource and each version that is present in the workflow. + */ + @Child(name = "instance", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Each resource and each version that is present in the workflow", formalDefinition="Each resource and each version that is present in the workflow." ) + protected List instance; + + /** + * Each major process - a group of operations. + */ + @Child(name = "process", type = {}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Each major process - a group of operations", formalDefinition="Each major process - a group of operations." ) + protected ExampleScenarioProcessComponent process; + + /** + * Another nested workflow. + */ + @Child(name = "workflow", type = {ExampleScenario.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Another nested workflow", formalDefinition="Another nested workflow." ) + protected List workflow; + /** + * The actual objects that are the target of the reference (Another nested workflow.) + */ + protected List workflowTarget; + + + private static final long serialVersionUID = -1982575274L; + + /** + * Constructor + */ + public ExampleScenario() { + super(); + } + + /** + * Constructor + */ + public ExampleScenario(Enumeration status) { + super(); + this.status = status; + } + + /** + * @return {@link #url} (An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ExampleScenario setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions). + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions). + */ + public ExampleScenario setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public ExampleScenario addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist + */ + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public ExampleScenario setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. + */ + public ExampleScenario setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ExampleScenario setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation. + */ + public ExampleScenario setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (The name of the example as showin in the title page.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The name of the example as showin in the title page.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public ExampleScenario setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The name of the example as showin in the title page. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The name of the example as showin in the title page. + */ + public ExampleScenario setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The status of this example scenario. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new PublicationStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this example scenario. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ExampleScenario setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this example scenario. Enables tracking the life-cycle of the content. + */ + public PublicationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this example scenario. Enables tracking the life-cycle of the content. + */ + public ExampleScenario setStatus(PublicationStatus value) { + if (this.status == null) + this.status = new Enumeration(new PublicationStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public ExampleScenario setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public ExampleScenario setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #date} (The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ExampleScenario setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition'). + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition'). + */ + public ExampleScenario setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the example scenario.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the example scenario.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public ExampleScenario setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the example scenario. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the example scenario. + */ + public ExampleScenario setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setContact(List theContact) { + this.contact = theContact; + return this; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ContactDetail item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + public ContactDetail addContact() { //3 + ContactDetail t = new ContactDetail(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + public ExampleScenario addContact(ContactDetail t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist + */ + public ContactDetail getContactFirstRep() { + if (getContact().isEmpty()) { + addContact(); + } + return getContact().get(0); + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate example scenario instances.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setUseContext(List theUseContext) { + this.useContext = theUseContext; + return this; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (UsageContext item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + public UsageContext addUseContext() { //3 + UsageContext t = new UsageContext(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + public ExampleScenario addUseContext(UsageContext t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist + */ + public UsageContext getUseContextFirstRep() { + if (getUseContext().isEmpty()) { + addUseContext(); + } + return getUseContext().get(0); + } + + /** + * @return {@link #jurisdiction} (A legal or geographic region in which the example scenario is intended to be used.) + */ + public List getJurisdiction() { + if (this.jurisdiction == null) + this.jurisdiction = new ArrayList(); + return this.jurisdiction; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setJurisdiction(List theJurisdiction) { + this.jurisdiction = theJurisdiction; + return this; + } + + public boolean hasJurisdiction() { + if (this.jurisdiction == null) + return false; + for (CodeableConcept item : this.jurisdiction) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addJurisdiction() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.jurisdiction == null) + this.jurisdiction = new ArrayList(); + this.jurisdiction.add(t); + return t; + } + + public ExampleScenario addJurisdiction(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.jurisdiction == null) + this.jurisdiction = new ArrayList(); + this.jurisdiction.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist + */ + public CodeableConcept getJurisdictionFirstRep() { + if (getJurisdiction().isEmpty()) { + addJurisdiction(); + } + return getJurisdiction().get(0); + } + + /** + * @return {@link #copyright} (A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public MarkdownType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new MarkdownType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public ExampleScenario setCopyrightElement(MarkdownType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario. + */ + public ExampleScenario setCopyright(String value) { + if (value == null) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new MarkdownType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (Description of behaviour of the workflow example.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Description of behaviour of the workflow example.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ExampleScenario setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return Description of behaviour of the workflow example. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Description of behaviour of the workflow example. + */ + public ExampleScenario setDescription(String value) { + if (value == null) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #purpose} (What is the example supposed to resolve.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public MarkdownType getPurposeElement() { + if (this.purpose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.purpose"); + else if (Configuration.doAutoCreate()) + this.purpose = new MarkdownType(); // bb + return this.purpose; + } + + public boolean hasPurposeElement() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + public boolean hasPurpose() { + return this.purpose != null && !this.purpose.isEmpty(); + } + + /** + * @param value {@link #purpose} (What is the example supposed to resolve.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + */ + public ExampleScenario setPurposeElement(MarkdownType value) { + this.purpose = value; + return this; + } + + /** + * @return What is the example supposed to resolve. + */ + public String getPurpose() { + return this.purpose == null ? null : this.purpose.getValue(); + } + + /** + * @param value What is the example supposed to resolve. + */ + public ExampleScenario setPurpose(String value) { + if (value == null) + this.purpose = null; + else { + if (this.purpose == null) + this.purpose = new MarkdownType(); + this.purpose.setValue(value); + } + return this; + } + + /** + * @return {@link #actor} (Actor participating in the resource.) + */ + public List getActor() { + if (this.actor == null) + this.actor = new ArrayList(); + return this.actor; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setActor(List theActor) { + this.actor = theActor; + return this; + } + + public boolean hasActor() { + if (this.actor == null) + return false; + for (ExampleScenarioActorComponent item : this.actor) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioActorComponent addActor() { //3 + ExampleScenarioActorComponent t = new ExampleScenarioActorComponent(); + if (this.actor == null) + this.actor = new ArrayList(); + this.actor.add(t); + return t; + } + + public ExampleScenario addActor(ExampleScenarioActorComponent t) { //3 + if (t == null) + return this; + if (this.actor == null) + this.actor = new ArrayList(); + this.actor.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #actor}, creating it if it does not already exist + */ + public ExampleScenarioActorComponent getActorFirstRep() { + if (getActor().isEmpty()) { + addActor(); + } + return getActor().get(0); + } + + /** + * @return {@link #instance} (Each resource and each version that is present in the workflow.) + */ + public List getInstance() { + if (this.instance == null) + this.instance = new ArrayList(); + return this.instance; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setInstance(List theInstance) { + this.instance = theInstance; + return this; + } + + public boolean hasInstance() { + if (this.instance == null) + return false; + for (ExampleScenarioInstanceComponent item : this.instance) + if (!item.isEmpty()) + return true; + return false; + } + + public ExampleScenarioInstanceComponent addInstance() { //3 + ExampleScenarioInstanceComponent t = new ExampleScenarioInstanceComponent(); + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return t; + } + + public ExampleScenario addInstance(ExampleScenarioInstanceComponent t) { //3 + if (t == null) + return this; + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #instance}, creating it if it does not already exist + */ + public ExampleScenarioInstanceComponent getInstanceFirstRep() { + if (getInstance().isEmpty()) { + addInstance(); + } + return getInstance().get(0); + } + + /** + * @return {@link #process} (Each major process - a group of operations.) + */ + public ExampleScenarioProcessComponent getProcess() { + if (this.process == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExampleScenario.process"); + else if (Configuration.doAutoCreate()) + this.process = new ExampleScenarioProcessComponent(); // cc + return this.process; + } + + public boolean hasProcess() { + return this.process != null && !this.process.isEmpty(); + } + + /** + * @param value {@link #process} (Each major process - a group of operations.) + */ + public ExampleScenario setProcess(ExampleScenarioProcessComponent value) { + this.process = value; + return this; + } + + /** + * @return {@link #workflow} (Another nested workflow.) + */ + public List getWorkflow() { + if (this.workflow == null) + this.workflow = new ArrayList(); + return this.workflow; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ExampleScenario setWorkflow(List theWorkflow) { + this.workflow = theWorkflow; + return this; + } + + public boolean hasWorkflow() { + if (this.workflow == null) + return false; + for (Reference item : this.workflow) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addWorkflow() { //3 + Reference t = new Reference(); + if (this.workflow == null) + this.workflow = new ArrayList(); + this.workflow.add(t); + return t; + } + + public ExampleScenario addWorkflow(Reference t) { //3 + if (t == null) + return this; + if (this.workflow == null) + this.workflow = new ArrayList(); + this.workflow.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #workflow}, creating it if it does not already exist + */ + public Reference getWorkflowFirstRep() { + if (getWorkflow().isEmpty()) { + addWorkflow(); + } + return getWorkflow().get(0); + } + + /** + * @deprecated Use Reference#setResource(IBaseResource) instead + */ + @Deprecated + public List getWorkflowTarget() { + if (this.workflowTarget == null) + this.workflowTarget = new ArrayList(); + return this.workflowTarget; + } + + /** + * @deprecated Use Reference#setResource(IBaseResource) instead + */ + @Deprecated + public ExampleScenario addWorkflowTarget() { + ExampleScenario r = new ExampleScenario(); + if (this.workflowTarget == null) + this.workflowTarget = new ArrayList(); + this.workflowTarget.add(r); + return r; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("url", "uri", "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url)); + children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); + children.add(new Property("version", "string", "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version)); + children.add(new Property("name", "string", "A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); + children.add(new Property("title", "string", "The name of the example as showin in the title page.", 0, 1, title)); + children.add(new Property("status", "code", "The status of this example scenario. Enables tracking the life-cycle of the content.", 0, 1, status)); + children.add(new Property("experimental", "boolean", "A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental)); + children.add(new Property("date", "dateTime", "The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", 0, 1, date)); + children.add(new Property("publisher", "string", "The name of the individual or organization that published the example scenario.", 0, 1, publisher)); + children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate example scenario instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); + children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the example scenario is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); + children.add(new Property("copyright", "markdown", "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", 0, 1, copyright)); + children.add(new Property("description", "markdown", "Description of behaviour of the workflow example.", 0, 1, description)); + children.add(new Property("purpose", "markdown", "What is the example supposed to resolve.", 0, 1, purpose)); + children.add(new Property("actor", "", "Actor participating in the resource.", 0, java.lang.Integer.MAX_VALUE, actor)); + children.add(new Property("instance", "", "Each resource and each version that is present in the workflow.", 0, java.lang.Integer.MAX_VALUE, instance)); + children.add(new Property("process", "", "Each major process - a group of operations.", 0, 1, process)); + children.add(new Property("workflow", "Reference(ExampleScenario)", "Another nested workflow.", 0, java.lang.Integer.MAX_VALUE, workflow)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url); + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); + case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version); + case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); + case 110371416: /*title*/ return new Property("title", "string", "The name of the example as showin in the title page.", 0, 1, title); + case -892481550: /*status*/ return new Property("status", "code", "The status of this example scenario. Enables tracking the life-cycle of the content.", 0, 1, status); + case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental); + case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", 0, 1, date); + case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the individual or organization that published the example scenario.", 0, 1, publisher); + case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); + case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate example scenario instances.", 0, java.lang.Integer.MAX_VALUE, useContext); + case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the example scenario is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); + case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", 0, 1, copyright); + case -1724546052: /*description*/ return new Property("description", "markdown", "Description of behaviour of the workflow example.", 0, 1, description); + case -220463842: /*purpose*/ return new Property("purpose", "markdown", "What is the example supposed to resolve.", 0, 1, purpose); + case 92645877: /*actor*/ return new Property("actor", "", "Actor participating in the resource.", 0, java.lang.Integer.MAX_VALUE, actor); + case 555127957: /*instance*/ return new Property("instance", "", "Each resource and each version that is present in the workflow.", 0, java.lang.Integer.MAX_VALUE, instance); + case -309518737: /*process*/ return new Property("process", "", "Each major process - a group of operations.", 0, 1, process); + case 35379135: /*workflow*/ return new Property("workflow", "Reference(ExampleScenario)", "Another nested workflow.", 0, java.lang.Integer.MAX_VALUE, workflow); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier + case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType + case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType + case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType + case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail + case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext + case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept + case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType + case 92645877: /*actor*/ return this.actor == null ? new Base[0] : this.actor.toArray(new Base[this.actor.size()]); // ExampleScenarioActorComponent + case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // ExampleScenarioInstanceComponent + case -309518737: /*process*/ return this.process == null ? new Base[0] : new Base[] {this.process}; // ExampleScenarioProcessComponent + case 35379135: /*workflow*/ return this.workflow == null ? new Base[0] : this.workflow.toArray(new Base[this.workflow.size()]); // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 116079: // url + this.url = castToUri(value); // UriType + return value; + case -1618432855: // identifier + this.getIdentifier().add(castToIdentifier(value)); // Identifier + return value; + case 351608024: // version + this.version = castToString(value); // StringType + return value; + case 3373707: // name + this.name = castToString(value); // StringType + return value; + case 110371416: // title + this.title = castToString(value); // StringType + return value; + case -892481550: // status + value = new PublicationStatusEnumFactory().fromType(castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case -404562712: // experimental + this.experimental = castToBoolean(value); // BooleanType + return value; + case 3076014: // date + this.date = castToDateTime(value); // DateTimeType + return value; + case 1447404028: // publisher + this.publisher = castToString(value); // StringType + return value; + case 951526432: // contact + this.getContact().add(castToContactDetail(value)); // ContactDetail + return value; + case -669707736: // useContext + this.getUseContext().add(castToUsageContext(value)); // UsageContext + return value; + case -507075711: // jurisdiction + this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept + return value; + case 1522889671: // copyright + this.copyright = castToMarkdown(value); // MarkdownType + return value; + case -1724546052: // description + this.description = castToMarkdown(value); // MarkdownType + return value; + case -220463842: // purpose + this.purpose = castToMarkdown(value); // MarkdownType + return value; + case 92645877: // actor + this.getActor().add((ExampleScenarioActorComponent) value); // ExampleScenarioActorComponent + return value; + case 555127957: // instance + this.getInstance().add((ExampleScenarioInstanceComponent) value); // ExampleScenarioInstanceComponent + return value; + case -309518737: // process + this.process = (ExampleScenarioProcessComponent) value; // ExampleScenarioProcessComponent + return value; + case 35379135: // workflow + this.getWorkflow().add(castToReference(value)); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) { + this.url = castToUri(value); // UriType + } else if (name.equals("identifier")) { + this.getIdentifier().add(castToIdentifier(value)); + } else if (name.equals("version")) { + this.version = castToString(value); // StringType + } else if (name.equals("name")) { + this.name = castToString(value); // StringType + } else if (name.equals("title")) { + this.title = castToString(value); // StringType + } else if (name.equals("status")) { + value = new PublicationStatusEnumFactory().fromType(castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("experimental")) { + this.experimental = castToBoolean(value); // BooleanType + } else if (name.equals("date")) { + this.date = castToDateTime(value); // DateTimeType + } else if (name.equals("publisher")) { + this.publisher = castToString(value); // StringType + } else if (name.equals("contact")) { + this.getContact().add(castToContactDetail(value)); + } else if (name.equals("useContext")) { + this.getUseContext().add(castToUsageContext(value)); + } else if (name.equals("jurisdiction")) { + this.getJurisdiction().add(castToCodeableConcept(value)); + } else if (name.equals("copyright")) { + this.copyright = castToMarkdown(value); // MarkdownType + } else if (name.equals("description")) { + this.description = castToMarkdown(value); // MarkdownType + } else if (name.equals("purpose")) { + this.purpose = castToMarkdown(value); // MarkdownType + } else if (name.equals("actor")) { + this.getActor().add((ExampleScenarioActorComponent) value); + } else if (name.equals("instance")) { + this.getInstance().add((ExampleScenarioInstanceComponent) value); + } else if (name.equals("process")) { + this.process = (ExampleScenarioProcessComponent) value; // ExampleScenarioProcessComponent + } else if (name.equals("workflow")) { + this.getWorkflow().add(castToReference(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 116079: return getUrlElement(); + case -1618432855: return addIdentifier(); + case 351608024: return getVersionElement(); + case 3373707: return getNameElement(); + case 110371416: return getTitleElement(); + case -892481550: return getStatusElement(); + case -404562712: return getExperimentalElement(); + case 3076014: return getDateElement(); + case 1447404028: return getPublisherElement(); + case 951526432: return addContact(); + case -669707736: return addUseContext(); + case -507075711: return addJurisdiction(); + case 1522889671: return getCopyrightElement(); + case -1724546052: return getDescriptionElement(); + case -220463842: return getPurposeElement(); + case 92645877: return addActor(); + case 555127957: return addInstance(); + case -309518737: return getProcess(); + case 35379135: return addWorkflow(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 116079: /*url*/ return new String[] {"uri"}; + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case 351608024: /*version*/ return new String[] {"string"}; + case 3373707: /*name*/ return new String[] {"string"}; + case 110371416: /*title*/ return new String[] {"string"}; + case -892481550: /*status*/ return new String[] {"code"}; + case -404562712: /*experimental*/ return new String[] {"boolean"}; + case 3076014: /*date*/ return new String[] {"dateTime"}; + case 1447404028: /*publisher*/ return new String[] {"string"}; + case 951526432: /*contact*/ return new String[] {"ContactDetail"}; + case -669707736: /*useContext*/ return new String[] {"UsageContext"}; + case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; + case 1522889671: /*copyright*/ return new String[] {"markdown"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + case -220463842: /*purpose*/ return new String[] {"markdown"}; + case 92645877: /*actor*/ return new String[] {}; + case 555127957: /*instance*/ return new String[] {}; + case -309518737: /*process*/ return new String[] {}; + case 35379135: /*workflow*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.url"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.title"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.experimental"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.date"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("jurisdiction")) { + return addJurisdiction(); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.copyright"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description"); + } + else if (name.equals("purpose")) { + throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.purpose"); + } + else if (name.equals("actor")) { + return addActor(); + } + else if (name.equals("instance")) { + return addInstance(); + } + else if (name.equals("process")) { + this.process = new ExampleScenarioProcessComponent(); + return this.process; + } + else if (name.equals("workflow")) { + return addWorkflow(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ExampleScenario"; + + } + + public ExampleScenario copy() { + ExampleScenario dst = new ExampleScenario(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.title = title == null ? null : title.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.date = date == null ? null : date.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ContactDetail i : contact) + dst.contact.add(i.copy()); + }; + if (useContext != null) { + dst.useContext = new ArrayList(); + for (UsageContext i : useContext) + dst.useContext.add(i.copy()); + }; + if (jurisdiction != null) { + dst.jurisdiction = new ArrayList(); + for (CodeableConcept i : jurisdiction) + dst.jurisdiction.add(i.copy()); + }; + dst.copyright = copyright == null ? null : copyright.copy(); + dst.description = description == null ? null : description.copy(); + dst.purpose = purpose == null ? null : purpose.copy(); + if (actor != null) { + dst.actor = new ArrayList(); + for (ExampleScenarioActorComponent i : actor) + dst.actor.add(i.copy()); + }; + if (instance != null) { + dst.instance = new ArrayList(); + for (ExampleScenarioInstanceComponent i : instance) + dst.instance.add(i.copy()); + }; + dst.process = process == null ? null : process.copy(); + if (workflow != null) { + dst.workflow = new ArrayList(); + for (Reference i : workflow) + dst.workflow.add(i.copy()); + }; + return dst; + } + + protected ExampleScenario typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ExampleScenario)) + return false; + ExampleScenario o = (ExampleScenario) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(purpose, o.purpose, true) && compareDeep(actor, o.actor, true) && compareDeep(instance, o.instance, true) + && compareDeep(process, o.process, true) && compareDeep(workflow, o.workflow, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ExampleScenario)) + return false; + ExampleScenario o = (ExampleScenario) other; + return compareValues(copyright, o.copyright, true) && compareValues(purpose, o.purpose, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, copyright, purpose + , actor, instance, process, workflow); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ExampleScenario; + } + + /** + * Search parameter: date + *

+ * Description: The example scenario publication date
+ * Type: date
+ * Path: ExampleScenario.date
+ *

+ */ + @SearchParamDefinition(name="date", path="ExampleScenario.date", description="The example scenario publication date", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: The example scenario publication date
+ * Type: date
+ * Path: ExampleScenario.date
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); + + /** + * Search parameter: identifier + *

+ * Description: External identifier for the example scenario
+ * Type: token
+ * Path: ExampleScenario.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="ExampleScenario.identifier", description="External identifier for the example scenario", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: External identifier for the example scenario
+ * Type: token
+ * Path: ExampleScenario.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: jurisdiction + *

+ * Description: Intended jurisdiction for the example scenario
+ * Type: token
+ * Path: ExampleScenario.jurisdiction
+ *

+ */ + @SearchParamDefinition(name="jurisdiction", path="ExampleScenario.jurisdiction", description="Intended jurisdiction for the example scenario", type="token" ) + public static final String SP_JURISDICTION = "jurisdiction"; + /** + * Fluent Client search parameter constant for jurisdiction + *

+ * Description: Intended jurisdiction for the example scenario
+ * Type: token
+ * Path: ExampleScenario.jurisdiction
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); + + /** + * Search parameter: name + *

+ * Description: Computationally friendly name of the example scenario
+ * Type: string
+ * Path: ExampleScenario.name
+ *

+ */ + @SearchParamDefinition(name="name", path="ExampleScenario.name", description="Computationally friendly name of the example scenario", type="string" ) + public static final String SP_NAME = "name"; + /** + * Fluent Client search parameter constant for name + *

+ * Description: Computationally friendly name of the example scenario
+ * Type: string
+ * Path: ExampleScenario.name
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); + + /** + * Search parameter: description + *

+ * Description: The description of the example scenario
+ * Type: string
+ * Path: ExampleScenario.description
+ *

+ */ + @SearchParamDefinition(name="description", path="ExampleScenario.description", description="The description of the example scenario", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: The description of the example scenario
+ * Type: string
+ * Path: ExampleScenario.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: publisher + *

+ * Description: Name of the publisher of the example scenario
+ * Type: string
+ * Path: ExampleScenario.publisher
+ *

+ */ + @SearchParamDefinition(name="publisher", path="ExampleScenario.publisher", description="Name of the publisher of the example scenario", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + /** + * Fluent Client search parameter constant for publisher + *

+ * Description: Name of the publisher of the example scenario
+ * Type: string
+ * Path: ExampleScenario.publisher
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); + + /** + * Search parameter: title + *

+ * Description: The human-friendly name of the example scenario
+ * Type: string
+ * Path: ExampleScenario.title
+ *

+ */ + @SearchParamDefinition(name="title", path="ExampleScenario.title", description="The human-friendly name of the example scenario", type="string" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: The human-friendly name of the example scenario
+ * Type: string
+ * Path: ExampleScenario.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); + + /** + * Search parameter: version + *

+ * Description: The business version of the example scenario
+ * Type: token
+ * Path: ExampleScenario.version
+ *

+ */ + @SearchParamDefinition(name="version", path="ExampleScenario.version", description="The business version of the example scenario", type="token" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: The business version of the example scenario
+ * Type: token
+ * Path: ExampleScenario.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); + + /** + * Search parameter: url + *

+ * Description: The uri that identifies the example scenario
+ * Type: uri
+ * Path: ExampleScenario.url
+ *

+ */ + @SearchParamDefinition(name="url", path="ExampleScenario.url", description="The uri that identifies the example scenario", type="uri" ) + public static final String SP_URL = "url"; + /** + * Fluent Client search parameter constant for url + *

+ * Description: The uri that identifies the example scenario
+ * Type: uri
+ * Path: ExampleScenario.url
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); + + /** + * Search parameter: status + *

+ * Description: The current status of the example scenario
+ * Type: token
+ * Path: ExampleScenario.status
+ *

+ */ + @SearchParamDefinition(name="status", path="ExampleScenario.status", description="The current status of the example scenario", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: The current status of the example scenario
+ * Type: token
+ * Path: ExampleScenario.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExpansionProfile.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExpansionProfile.java index d30ebcd0906..59ab64fe384 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExpansionProfile.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExpansionProfile.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExplanationOfBenefit.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExplanationOfBenefit.java index e45bdd79173..4b7f4550107 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExplanationOfBenefit.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ExplanationOfBenefit.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -174,6 +174,114 @@ public class ExplanationOfBenefit extends DomainResource { } } + public enum RemittanceOutcome { + /** + * The processing has completed without errors + */ + COMPLETE, + /** + * One or more errors have been detected in the Claim + */ + ERROR, + /** + * No errors have been detected in the Claim and some of the adjudication has been performed. + */ + PARTIAL, + /** + * added to help the parsers with the generic types + */ + NULL; + public static RemittanceOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("error".equals(codeString)) + return ERROR; + if ("partial".equals(codeString)) + return PARTIAL; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case ERROR: return "error"; + case PARTIAL: return "partial"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPLETE: return "http://hl7.org/fhir/remittance-outcome"; + case ERROR: return "http://hl7.org/fhir/remittance-outcome"; + case PARTIAL: return "http://hl7.org/fhir/remittance-outcome"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The processing has completed without errors"; + case ERROR: return "One or more errors have been detected in the Claim"; + case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Processing Complete"; + case ERROR: return "Error"; + case PARTIAL: return "Partial Processing"; + default: return "?"; + } + } + } + + public static class RemittanceOutcomeEnumFactory implements EnumFactory { + public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return RemittanceOutcome.COMPLETE; + if ("error".equals(codeString)) + return RemittanceOutcome.ERROR; + if ("partial".equals(codeString)) + return RemittanceOutcome.PARTIAL; + throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.COMPLETE); + if ("error".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.ERROR); + if ("partial".equals(codeString)) + return new Enumeration(this, RemittanceOutcome.PARTIAL); + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode(RemittanceOutcome code) { + if (code == RemittanceOutcome.COMPLETE) + return "complete"; + if (code == RemittanceOutcome.ERROR) + return "error"; + if (code == RemittanceOutcome.PARTIAL) + return "partial"; + return "?"; + } + public String toSystem(RemittanceOutcome code) { + return code.getSystem(); + } + } + @Block() public static class RelatedClaimComponent extends BackboneElement implements IBaseBackboneElement { /** @@ -5063,18 +5171,10 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) protected PositiveIntType sequence; - /** - * The type of product or service. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode") - protected CodeableConcept type; - /** * The type of reveneu or cost center providing the product and/or service. */ - @Child(name = "revenue", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of reveneu or cost center providing the product and/or service." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") protected CodeableConcept revenue; @@ -5082,7 +5182,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * Health Care Service Type Codes to identify the classification of service or benefits. */ - @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Type of service or product", formalDefinition="Health Care Service Type Codes to identify the classification of service or benefits." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-subcategory") protected CodeableConcept category; @@ -5090,7 +5190,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'. */ - @Child(name = "service", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Child(name = "service", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Billing Code", formalDefinition="If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") protected CodeableConcept service; @@ -5098,7 +5198,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours. */ - @Child(name = "modifier", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") protected List modifier; @@ -5106,7 +5206,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. */ - @Child(name = "programCode", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "programCode", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code") protected List programCode; @@ -5114,35 +5214,35 @@ public class ExplanationOfBenefit extends DomainResource { /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=7, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name = "unitPrice", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Child(name = "unitPrice", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "factor", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Child(name = "net", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Device.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "udi", type = {Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) protected List udi; /** @@ -5154,25 +5254,25 @@ public class ExplanationOfBenefit extends DomainResource { /** * A list of note references to the notes provided below. */ - @Child(name = "noteNumber", type = {PositiveIntType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "noteNumber", type = {PositiveIntType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) protected List noteNumber; /** * The adjudications results. */ - @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Detail level adjudication details", formalDefinition="The adjudications results." ) protected List adjudication; /** * Third tier of goods and services. */ - @Child(name = "subDetail", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "subDetail", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) protected List subDetail; - private static final long serialVersionUID = -276371489L; + private static final long serialVersionUID = 1856934466L; /** * Constructor @@ -5184,10 +5284,9 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public DetailComponent(PositiveIntType sequence, CodeableConcept type) { + public DetailComponent(PositiveIntType sequence) { super(); this.sequence = sequence; - this.type = type; } /** @@ -5235,30 +5334,6 @@ public class ExplanationOfBenefit extends DomainResource { return this; } - /** - * @return {@link #type} (The type of product or service.) - */ - public CodeableConcept getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public DetailComponent setType(CodeableConcept value) { - this.type = value; - return this; - } - /** * @return {@link #revenue} (The type of reveneu or cost center providing the product and/or service.) */ @@ -5821,7 +5896,6 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("sequence", "positiveInt", "A service line number.", 0, 1, sequence)); - children.add(new Property("type", "CodeableConcept", "The type of product or service.", 0, 1, type)); children.add(new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue)); children.add(new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category)); children.add(new Property("service", "CodeableConcept", "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", 0, 1, service)); @@ -5841,7 +5915,6 @@ public class ExplanationOfBenefit extends DomainResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A service line number.", 0, 1, sequence); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of product or service.", 0, 1, type); case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue); case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category); case 1984153269: /*service*/ return new Property("service", "CodeableConcept", "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", 0, 1, service); @@ -5864,7 +5937,6 @@ public class ExplanationOfBenefit extends DomainResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // CodeableConcept @@ -5889,9 +5961,6 @@ public class ExplanationOfBenefit extends DomainResource { case 1349547969: // sequence this.sequence = castToPositiveInt(value); // PositiveIntType return value; - case 3575610: // type - this.type = castToCodeableConcept(value); // CodeableConcept - return value; case 1099842588: // revenue this.revenue = castToCodeableConcept(value); // CodeableConcept return value; @@ -5940,8 +6009,6 @@ public class ExplanationOfBenefit extends DomainResource { public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("sequence")) { this.sequence = castToPositiveInt(value); // PositiveIntType - } else if (name.equals("type")) { - this.type = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("revenue")) { this.revenue = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("category")) { @@ -5977,7 +6044,6 @@ public class ExplanationOfBenefit extends DomainResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 1349547969: return getSequenceElement(); - case 3575610: return getType(); case 1099842588: return getRevenue(); case 50511102: return getCategory(); case 1984153269: return getService(); @@ -6000,7 +6066,6 @@ public class ExplanationOfBenefit extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; case 50511102: /*category*/ return new String[] {"CodeableConcept"}; case 1984153269: /*service*/ return new String[] {"CodeableConcept"}; @@ -6024,10 +6089,6 @@ public class ExplanationOfBenefit extends DomainResource { if (name.equals("sequence")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.sequence"); } - else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; - } else if (name.equals("revenue")) { this.revenue = new CodeableConcept(); return this.revenue; @@ -6081,7 +6142,6 @@ public class ExplanationOfBenefit extends DomainResource { DetailComponent dst = new DetailComponent(); copyValues(dst); dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); dst.revenue = revenue == null ? null : revenue.copy(); dst.category = category == null ? null : category.copy(); dst.service = service == null ? null : service.copy(); @@ -6129,12 +6189,12 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof DetailComponent)) return false; DetailComponent o = (DetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(revenue, o.revenue, true) - && compareDeep(category, o.category, true) && compareDeep(service, o.service, true) && compareDeep(modifier, o.modifier, true) - && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) - && compareDeep(factor, o.factor, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(adjudication, o.adjudication, true) - && compareDeep(subDetail, o.subDetail, true); + return compareDeep(sequence, o.sequence, true) && compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) + && compareDeep(service, o.service, true) && compareDeep(modifier, o.modifier, true) && compareDeep(programCode, o.programCode, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) && compareDeep(noteNumber, o.noteNumber, true) + && compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true) + ; } @Override @@ -6149,9 +6209,9 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, revenue - , category, service, modifier, programCode, quantity, unitPrice, factor, net - , udi, noteNumber, adjudication, subDetail); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, revenue, category + , service, modifier, programCode, quantity, unitPrice, factor, net, udi, noteNumber + , adjudication, subDetail); } public String fhirType() { @@ -6170,18 +6230,10 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) protected PositiveIntType sequence; - /** - * The type of product or service. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode") - protected CodeableConcept type; - /** * The type of reveneu or cost center providing the product and/or service. */ - @Child(name = "revenue", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of reveneu or cost center providing the product and/or service." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") protected CodeableConcept revenue; @@ -6189,7 +6241,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * Health Care Service Type Codes to identify the classification of service or benefits. */ - @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Type of service or product", formalDefinition="Health Care Service Type Codes to identify the classification of service or benefits." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-subcategory") protected CodeableConcept category; @@ -6197,7 +6249,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). */ - @Child(name = "service", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Child(name = "service", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Billing Code", formalDefinition="A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI)." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") protected CodeableConcept service; @@ -6205,7 +6257,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours. */ - @Child(name = "modifier", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") protected List modifier; @@ -6213,7 +6265,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. */ - @Child(name = "programCode", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "programCode", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code") protected List programCode; @@ -6221,35 +6273,35 @@ public class ExplanationOfBenefit extends DomainResource { /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=7, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * The fee for an addittional service or product or charge. */ - @Child(name = "unitPrice", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Child(name = "unitPrice", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an addittional service or product or charge." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "factor", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Child(name = "net", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Device.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "udi", type = {Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) protected List udi; /** @@ -6261,18 +6313,18 @@ public class ExplanationOfBenefit extends DomainResource { /** * A list of note references to the notes provided below. */ - @Child(name = "noteNumber", type = {PositiveIntType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "noteNumber", type = {PositiveIntType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) protected List noteNumber; /** * The adjudications results. */ - @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Language if different from the resource", formalDefinition="The adjudications results." ) protected List adjudication; - private static final long serialVersionUID = 1621872130L; + private static final long serialVersionUID = -393180417L; /** * Constructor @@ -6284,10 +6336,9 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public SubDetailComponent(PositiveIntType sequence, CodeableConcept type) { + public SubDetailComponent(PositiveIntType sequence) { super(); this.sequence = sequence; - this.type = type; } /** @@ -6335,30 +6386,6 @@ public class ExplanationOfBenefit extends DomainResource { return this; } - /** - * @return {@link #type} (The type of product or service.) - */ - public CodeableConcept getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public SubDetailComponent setType(CodeableConcept value) { - this.type = value; - return this; - } - /** * @return {@link #revenue} (The type of reveneu or cost center providing the product and/or service.) */ @@ -6868,7 +6895,6 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("sequence", "positiveInt", "A service line number.", 0, 1, sequence)); - children.add(new Property("type", "CodeableConcept", "The type of product or service.", 0, 1, type)); children.add(new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue)); children.add(new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category)); children.add(new Property("service", "CodeableConcept", "A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).", 0, 1, service)); @@ -6887,7 +6913,6 @@ public class ExplanationOfBenefit extends DomainResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A service line number.", 0, 1, sequence); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of product or service.", 0, 1, type); case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue); case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category); case 1984153269: /*service*/ return new Property("service", "CodeableConcept", "A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).", 0, 1, service); @@ -6909,7 +6934,6 @@ public class ExplanationOfBenefit extends DomainResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // CodeableConcept @@ -6933,9 +6957,6 @@ public class ExplanationOfBenefit extends DomainResource { case 1349547969: // sequence this.sequence = castToPositiveInt(value); // PositiveIntType return value; - case 3575610: // type - this.type = castToCodeableConcept(value); // CodeableConcept - return value; case 1099842588: // revenue this.revenue = castToCodeableConcept(value); // CodeableConcept return value; @@ -6981,8 +7002,6 @@ public class ExplanationOfBenefit extends DomainResource { public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("sequence")) { this.sequence = castToPositiveInt(value); // PositiveIntType - } else if (name.equals("type")) { - this.type = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("revenue")) { this.revenue = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("category")) { @@ -7016,7 +7035,6 @@ public class ExplanationOfBenefit extends DomainResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 1349547969: return getSequenceElement(); - case 3575610: return getType(); case 1099842588: return getRevenue(); case 50511102: return getCategory(); case 1984153269: return getService(); @@ -7038,7 +7056,6 @@ public class ExplanationOfBenefit extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; case 50511102: /*category*/ return new String[] {"CodeableConcept"}; case 1984153269: /*service*/ return new String[] {"CodeableConcept"}; @@ -7061,10 +7078,6 @@ public class ExplanationOfBenefit extends DomainResource { if (name.equals("sequence")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.sequence"); } - else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; - } else if (name.equals("revenue")) { this.revenue = new CodeableConcept(); return this.revenue; @@ -7115,7 +7128,6 @@ public class ExplanationOfBenefit extends DomainResource { SubDetailComponent dst = new SubDetailComponent(); copyValues(dst); dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); dst.revenue = revenue == null ? null : revenue.copy(); dst.category = category == null ? null : category.copy(); dst.service = service == null ? null : service.copy(); @@ -7158,12 +7170,11 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof SubDetailComponent)) return false; SubDetailComponent o = (SubDetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(revenue, o.revenue, true) - && compareDeep(category, o.category, true) && compareDeep(service, o.service, true) && compareDeep(modifier, o.modifier, true) - && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) - && compareDeep(factor, o.factor, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(adjudication, o.adjudication, true) - ; + return compareDeep(sequence, o.sequence, true) && compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) + && compareDeep(service, o.service, true) && compareDeep(modifier, o.modifier, true) && compareDeep(programCode, o.programCode, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) && compareDeep(noteNumber, o.noteNumber, true) + && compareDeep(adjudication, o.adjudication, true); } @Override @@ -7178,9 +7189,9 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, revenue - , category, service, modifier, programCode, quantity, unitPrice, factor, net - , udi, noteNumber, adjudication); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, revenue, category + , service, modifier, programCode, quantity, unitPrice, factor, net, udi, noteNumber + , adjudication); } public String fhirType() { @@ -8317,10 +8328,10 @@ public class ExplanationOfBenefit extends DomainResource { /** * The note purpose: Print/Display. */ - @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Child(name = "type", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") - protected CodeableConcept type; + protected Enumeration type; /** * The note text. @@ -8337,7 +8348,7 @@ public class ExplanationOfBenefit extends DomainResource { @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") protected CodeableConcept language; - private static final long serialVersionUID = -944255449L; + private static final long serialVersionUID = -385184277L; /** * Constructor @@ -8392,29 +8403,54 @@ public class ExplanationOfBenefit extends DomainResource { } /** - * @return {@link #type} (The note purpose: Print/Display.) + * @return {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public CodeableConcept getType() { + public Enumeration getTypeElement() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create NoteComponent.type"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc + this.type = new Enumeration(new NoteTypeEnumFactory()); // bb return this.type; } + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + public boolean hasType() { return this.type != null && !this.type.isEmpty(); } /** - * @param value {@link #type} (The note purpose: Print/Display.) + * @param value {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public NoteComponent setType(CodeableConcept value) { + public NoteComponent setTypeElement(Enumeration value) { this.type = value; return this; } + /** + * @return The note purpose: Print/Display. + */ + public NoteType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The note purpose: Print/Display. + */ + public NoteComponent setType(NoteType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new NoteTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + /** * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ @@ -8491,7 +8527,7 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, 1, number)); - children.add(new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type)); + children.add(new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type)); children.add(new Property("text", "string", "The note text.", 0, 1, text)); children.add(new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, 1, language)); } @@ -8500,7 +8536,7 @@ public class ExplanationOfBenefit extends DomainResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case -1034364087: /*number*/ return new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, 1, number); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type); + case 3575610: /*type*/ return new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type); case 3556653: /*text*/ return new Property("text", "string", "The note text.", 0, 1, text); case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, 1, language); default: return super.getNamedProperty(_hash, _name, _checkValid); @@ -8512,7 +8548,7 @@ public class ExplanationOfBenefit extends DomainResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // PositiveIntType - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept default: return super.getProperty(hash, name, checkValid); @@ -8527,7 +8563,8 @@ public class ExplanationOfBenefit extends DomainResource { this.number = castToPositiveInt(value); // PositiveIntType return value; case 3575610: // type - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration return value; case 3556653: // text this.text = castToString(value); // StringType @@ -8545,7 +8582,8 @@ public class ExplanationOfBenefit extends DomainResource { if (name.equals("number")) { this.number = castToPositiveInt(value); // PositiveIntType } else if (name.equals("type")) { - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration } else if (name.equals("text")) { this.text = castToString(value); // StringType } else if (name.equals("language")) { @@ -8559,7 +8597,7 @@ public class ExplanationOfBenefit extends DomainResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -1034364087: return getNumberElement(); - case 3575610: return getType(); + case 3575610: return getTypeElement(); case 3556653: return getTextElement(); case -1613589672: return getLanguage(); default: return super.makeProperty(hash, name); @@ -8571,7 +8609,7 @@ public class ExplanationOfBenefit extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case -1034364087: /*number*/ return new String[] {"positiveInt"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"code"}; case 3556653: /*text*/ return new String[] {"string"}; case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; default: return super.getTypesForProperty(hash, name); @@ -8585,8 +8623,7 @@ public class ExplanationOfBenefit extends DomainResource { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.number"); } else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.type"); } else if (name.equals("text")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.text"); @@ -8627,7 +8664,8 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof NoteComponent)) return false; NoteComponent o = (NoteComponent) other; - return compareValues(number, o.number, true) && compareValues(text, o.text, true); + return compareValues(number, o.number, true) && compareValues(type, o.type, true) && compareValues(text, o.text, true) + ; } public boolean isEmpty() { @@ -9764,10 +9802,10 @@ public class ExplanationOfBenefit extends DomainResource { /** * Processing outcome errror, partial or complete processing. */ - @Child(name = "outcome", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Child(name = "outcome", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="complete | error | partial", formalDefinition="Processing outcome errror, partial or complete processing." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") - protected CodeableConcept outcome; + protected Enumeration outcome; /** * A description of the status of the adjudication. @@ -9941,7 +9979,7 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Balance by Benefit Category", formalDefinition="Balance by Benefit Category." ) protected List benefitBalance; - private static final long serialVersionUID = -820266197L; + private static final long serialVersionUID = -1348099765L; /** * Constructor @@ -10599,29 +10637,54 @@ public class ExplanationOfBenefit extends DomainResource { } /** - * @return {@link #outcome} (Processing outcome errror, partial or complete processing.) + * @return {@link #outcome} (Processing outcome errror, partial or complete processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public CodeableConcept getOutcome() { + public Enumeration getOutcomeElement() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ExplanationOfBenefit.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb return this.outcome; } + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (Processing outcome errror, partial or complete processing.) + * @param value {@link #outcome} (Processing outcome errror, partial or complete processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public ExplanationOfBenefit setOutcome(CodeableConcept value) { + public ExplanationOfBenefit setOutcomeElement(Enumeration value) { this.outcome = value; return this; } + /** + * @return Processing outcome errror, partial or complete processing. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Processing outcome errror, partial or complete processing. + */ + public ExplanationOfBenefit setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + /** * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value */ @@ -11533,7 +11596,7 @@ public class ExplanationOfBenefit extends DomainResource { children.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, 1, facility)); children.add(new Property("claim", "Reference(Claim)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, 1, claim)); children.add(new Property("claimResponse", "Reference(ClaimResponse)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, 1, claimResponse)); - children.add(new Property("outcome", "CodeableConcept", "Processing outcome errror, partial or complete processing.", 0, 1, outcome)); + children.add(new Property("outcome", "code", "Processing outcome errror, partial or complete processing.", 0, 1, outcome)); children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); children.add(new Property("related", "", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, related)); children.add(new Property("prescription", "Reference(MedicationRequest|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, 1, prescription)); @@ -11577,7 +11640,7 @@ public class ExplanationOfBenefit extends DomainResource { case 501116579: /*facility*/ return new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, 1, facility); case 94742588: /*claim*/ return new Property("claim", "Reference(Claim)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, 1, claim); case 689513629: /*claimResponse*/ return new Property("claimResponse", "Reference(ClaimResponse)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, 1, claimResponse); - case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Processing outcome errror, partial or complete processing.", 0, 1, outcome); + case -1106507950: /*outcome*/ return new Property("outcome", "code", "Processing outcome errror, partial or complete processing.", 0, 1, outcome); case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); case 1090493483: /*related*/ return new Property("related", "", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, related); case 460301338: /*prescription*/ return new Property("prescription", "Reference(MedicationRequest|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, 1, prescription); @@ -11624,7 +11687,7 @@ public class ExplanationOfBenefit extends DomainResource { case 501116579: /*facility*/ return this.facility == null ? new Base[0] : new Base[] {this.facility}; // Reference case 94742588: /*claim*/ return this.claim == null ? new Base[0] : new Base[] {this.claim}; // Reference case 689513629: /*claimResponse*/ return this.claimResponse == null ? new Base[0] : new Base[] {this.claimResponse}; // Reference - case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept + case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // RelatedClaimComponent case 460301338: /*prescription*/ return this.prescription == null ? new Base[0] : new Base[] {this.prescription}; // Reference @@ -11703,7 +11766,8 @@ public class ExplanationOfBenefit extends DomainResource { this.claimResponse = castToReference(value); // Reference return value; case -1106507950: // outcome - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration return value; case 583380919: // disposition this.disposition = castToString(value); // StringType @@ -11813,7 +11877,8 @@ public class ExplanationOfBenefit extends DomainResource { } else if (name.equals("claimResponse")) { this.claimResponse = castToReference(value); // Reference } else if (name.equals("outcome")) { - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration } else if (name.equals("disposition")) { this.disposition = castToString(value); // StringType } else if (name.equals("related")) { @@ -11883,7 +11948,7 @@ public class ExplanationOfBenefit extends DomainResource { case 501116579: return getFacility(); case 94742588: return getClaim(); case 689513629: return getClaimResponse(); - case -1106507950: return getOutcome(); + case -1106507950: return getOutcomeElement(); case 583380919: return getDispositionElement(); case 1090493483: return addRelated(); case 460301338: return getPrescription(); @@ -11930,7 +11995,7 @@ public class ExplanationOfBenefit extends DomainResource { case 501116579: /*facility*/ return new String[] {"Reference"}; case 94742588: /*claim*/ return new String[] {"Reference"}; case 689513629: /*claimResponse*/ return new String[] {"Reference"}; - case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; + case -1106507950: /*outcome*/ return new String[] {"code"}; case 583380919: /*disposition*/ return new String[] {"string"}; case 1090493483: /*related*/ return new String[] {}; case 460301338: /*prescription*/ return new String[] {"Reference"}; @@ -12018,8 +12083,7 @@ public class ExplanationOfBenefit extends DomainResource { return this.claimResponse; } else if (name.equals("outcome")) { - this.outcome = new CodeableConcept(); - return this.outcome; + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.outcome"); } else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.disposition"); @@ -12235,8 +12299,9 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof ExplanationOfBenefit)) return false; ExplanationOfBenefit o = (ExplanationOfBenefit) other; - return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) - && compareValues(precedence, o.precedence, true); + return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) + && compareValues(disposition, o.disposition, true) && compareValues(precedence, o.precedence, true) + ; } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Extension.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Extension.java index 6a2875ea9d9..e6817464fd9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Extension.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Extension.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/FamilyMemberHistory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/FamilyMemberHistory.java index e15b7aa1a66..86928f2d2e8 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/FamilyMemberHistory.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/FamilyMemberHistory.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Flag.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Flag.java index aa10d21353d..152c0992b0d 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Flag.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Flag.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -174,10 +174,10 @@ public class Flag extends DomainResource { /** * Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context. */ - @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/flag-category") - protected CodeableConcept category; + protected List category; /** * The coded value or textual component of the flag to display to the user. @@ -230,7 +230,7 @@ public class Flag extends DomainResource { */ protected Resource authorTarget; - private static final long serialVersionUID = -619061399L; + private static final long serialVersionUID = 163791439L; /** * Constructor @@ -350,25 +350,54 @@ public class Flag extends DomainResource { /** * @return {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.) */ - public CodeableConcept getCategory() { + public List getCategory() { if (this.category == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Flag.category"); - else if (Configuration.doAutoCreate()) - this.category = new CodeableConcept(); // cc + this.category = new ArrayList(); return this.category; } + /** + * @return Returns a reference to this for easy method chaining + */ + public Flag setCategory(List theCategory) { + this.category = theCategory; + return this; + } + public boolean hasCategory() { - return this.category != null && !this.category.isEmpty(); + if (this.category == null) + return false; + for (CodeableConcept item : this.category) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return t; + } + + public Flag addCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return this; } /** - * @param value {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.) + * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist */ - public Flag setCategory(CodeableConcept value) { - this.category = value; - return this; + public CodeableConcept getCategoryFirstRep() { + if (getCategory().isEmpty()) { + addCategory(); + } + return getCategory().get(0); } /** @@ -545,7 +574,7 @@ public class Flag extends DomainResource { super.listChildren(children); children.add(new Property("identifier", "Identifier", "Identifier assigned to the flag for external use (outside the FHIR environment).", 0, java.lang.Integer.MAX_VALUE, identifier)); children.add(new Property("status", "code", "Supports basic workflow.", 0, 1, status)); - children.add(new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", 0, 1, category)); + children.add(new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", 0, java.lang.Integer.MAX_VALUE, category)); children.add(new Property("code", "CodeableConcept", "The coded value or textual component of the flag to display to the user.", 0, 1, code)); children.add(new Property("subject", "Reference(Patient|Location|Group|Organization|Practitioner|PlanDefinition|Medication|Procedure)", "The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.", 0, 1, subject)); children.add(new Property("period", "Period", "The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.", 0, 1, period)); @@ -558,7 +587,7 @@ public class Flag extends DomainResource { switch (_hash) { case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier assigned to the flag for external use (outside the FHIR environment).", 0, java.lang.Integer.MAX_VALUE, identifier); case -892481550: /*status*/ return new Property("status", "code", "Supports basic workflow.", 0, 1, status); - case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", 0, 1, category); + case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", 0, java.lang.Integer.MAX_VALUE, category); case 3059181: /*code*/ return new Property("code", "CodeableConcept", "The coded value or textual component of the flag to display to the user.", 0, 1, code); case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Location|Group|Organization|Practitioner|PlanDefinition|Medication|Procedure)", "The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.", 0, 1, subject); case -991726143: /*period*/ return new Property("period", "Period", "The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.", 0, 1, period); @@ -574,7 +603,7 @@ public class Flag extends DomainResource { switch (hash) { case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept + case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period @@ -596,7 +625,7 @@ public class Flag extends DomainResource { this.status = (Enumeration) value; // Enumeration return value; case 50511102: // category - this.category = castToCodeableConcept(value); // CodeableConcept + this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept return value; case 3059181: // code this.code = castToCodeableConcept(value); // CodeableConcept @@ -626,7 +655,7 @@ public class Flag extends DomainResource { value = new FlagStatusEnumFactory().fromType(castToCode(value)); this.status = (Enumeration) value; // Enumeration } else if (name.equals("category")) { - this.category = castToCodeableConcept(value); // CodeableConcept + this.getCategory().add(castToCodeableConcept(value)); } else if (name.equals("code")) { this.code = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("subject")) { @@ -647,7 +676,7 @@ public class Flag extends DomainResource { switch (hash) { case -1618432855: return addIdentifier(); case -892481550: return getStatusElement(); - case 50511102: return getCategory(); + case 50511102: return addCategory(); case 3059181: return getCode(); case -1867885268: return getSubject(); case -991726143: return getPeriod(); @@ -683,8 +712,7 @@ public class Flag extends DomainResource { throw new FHIRException("Cannot call addChild on a primitive type Flag.status"); } else if (name.equals("category")) { - this.category = new CodeableConcept(); - return this.category; + return addCategory(); } else if (name.equals("code")) { this.code = new CodeableConcept(); @@ -724,7 +752,11 @@ public class Flag extends DomainResource { dst.identifier.add(i.copy()); }; dst.status = status == null ? null : status.copy(); - dst.category = category == null ? null : category.copy(); + if (category != null) { + dst.category = new ArrayList(); + for (CodeableConcept i : category) + dst.category.add(i.copy()); + }; dst.code = code == null ? null : code.copy(); dst.subject = subject == null ? null : subject.copy(); dst.period = period == null ? null : period.copy(); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Goal.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Goal.java index eeb3a020dc6..0a8db630247 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Goal.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Goal.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GraphDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GraphDefinition.java index 066e8b907de..61dbaf71af2 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GraphDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GraphDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -50,6 +50,98 @@ import org.hl7.fhir.exceptions.FHIRException; @ChildOrder(names={"url", "version", "name", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "start", "profile", "link"}) public class GraphDefinition extends MetadataResource { + public enum GraphCompartmentUse { + /** + * This compartment rule is a condition for whether the rule applies + */ + CONDITION, + /** + * This compartment rule is enforced on any relationships that meet the conditions + */ + REQUIREMENT, + /** + * added to help the parsers with the generic types + */ + NULL; + public static GraphCompartmentUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return CONDITION; + if ("requirement".equals(codeString)) + return REQUIREMENT; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown GraphCompartmentUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONDITION: return "condition"; + case REQUIREMENT: return "requirement"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CONDITION: return "http://hl7.org/fhir/graph-compartment-use"; + case REQUIREMENT: return "http://hl7.org/fhir/graph-compartment-use"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CONDITION: return "This compartment rule is a condition for whether the rule applies"; + case REQUIREMENT: return "This compartment rule is enforced on any relationships that meet the conditions"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONDITION: return "Condition"; + case REQUIREMENT: return "Requirement"; + default: return "?"; + } + } + } + + public static class GraphCompartmentUseEnumFactory implements EnumFactory { + public GraphCompartmentUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return GraphCompartmentUse.CONDITION; + if ("requirement".equals(codeString)) + return GraphCompartmentUse.REQUIREMENT; + throw new IllegalArgumentException("Unknown GraphCompartmentUse code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return new Enumeration(this, GraphCompartmentUse.CONDITION); + if ("requirement".equals(codeString)) + return new Enumeration(this, GraphCompartmentUse.REQUIREMENT); + throw new FHIRException("Unknown GraphCompartmentUse code '"+codeString+"'"); + } + public String toCode(GraphCompartmentUse code) { + if (code == GraphCompartmentUse.CONDITION) + return "condition"; + if (code == GraphCompartmentUse.REQUIREMENT) + return "requirement"; + return "?"; + } + public String toSystem(GraphCompartmentUse code) { + return code.getSystem(); + } + } + public enum CompartmentCode { /** * The compartment definition is for the patient compartment @@ -317,10 +409,10 @@ public class GraphDefinition extends MetadataResource { @Block() public static class GraphDefinitionLinkComponent extends BackboneElement implements IBaseBackboneElement { /** - * Path in the resource that contains the link. + * A FHIR expression that identifies one of FHIR References to other resources. */ - @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Path in the resource that contains the link", formalDefinition="Path in the resource that contains the link." ) + @Child(name = "path", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Path in the resource that contains the link", formalDefinition="A FHIR expression that identifies one of FHIR References to other resources." ) protected StringType path; /** @@ -354,7 +446,7 @@ public class GraphDefinition extends MetadataResource { /** * Potential target for the link. */ - @Child(name = "target", type = {}, order=6, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "target", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Potential target for the link", formalDefinition="Potential target for the link." ) protected List target; @@ -367,16 +459,8 @@ public class GraphDefinition extends MetadataResource { super(); } - /** - * Constructor - */ - public GraphDefinitionLinkComponent(StringType path) { - super(); - this.path = path; - } - /** - * @return {@link #path} (Path in the resource that contains the link.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + * @return {@link #path} (A FHIR expression that identifies one of FHIR References to other resources.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value */ public StringType getPathElement() { if (this.path == null) @@ -396,7 +480,7 @@ public class GraphDefinition extends MetadataResource { } /** - * @param value {@link #path} (Path in the resource that contains the link.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + * @param value {@link #path} (A FHIR expression that identifies one of FHIR References to other resources.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value */ public GraphDefinitionLinkComponent setPathElement(StringType value) { this.path = value; @@ -404,19 +488,23 @@ public class GraphDefinition extends MetadataResource { } /** - * @return Path in the resource that contains the link. + * @return A FHIR expression that identifies one of FHIR References to other resources. */ public String getPath() { return this.path == null ? null : this.path.getValue(); } /** - * @param value Path in the resource that contains the link. + * @param value A FHIR expression that identifies one of FHIR References to other resources. */ public GraphDefinitionLinkComponent setPath(String value) { + if (Utilities.noString(value)) + this.path = null; + else { if (this.path == null) this.path = new StringType(); this.path.setValue(value); + } return this; } @@ -667,7 +755,7 @@ public class GraphDefinition extends MetadataResource { protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("path", "string", "Path in the resource that contains the link.", 0, 1, path)); + children.add(new Property("path", "string", "A FHIR expression that identifies one of FHIR References to other resources.", 0, 1, path)); children.add(new Property("sliceName", "string", "Which slice (if profiled).", 0, 1, sliceName)); children.add(new Property("min", "integer", "Minimum occurrences for this link.", 0, 1, min)); children.add(new Property("max", "string", "Maximum occurrences for this link.", 0, 1, max)); @@ -678,7 +766,7 @@ public class GraphDefinition extends MetadataResource { @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 3433509: /*path*/ return new Property("path", "string", "Path in the resource that contains the link.", 0, 1, path); + case 3433509: /*path*/ return new Property("path", "string", "A FHIR expression that identifies one of FHIR References to other resources.", 0, 1, path); case -825289923: /*sliceName*/ return new Property("sliceName", "string", "Which slice (if profiled).", 0, 1, sliceName); case 108114: /*min*/ return new Property("min", "integer", "Minimum occurrences for this link.", 0, 1, min); case 107876: /*max*/ return new Property("max", "string", "Maximum occurrences for this link.", 0, 1, max); @@ -861,28 +949,35 @@ public class GraphDefinition extends MetadataResource { @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") protected CodeType type; + /** + * A set of parameters to look up. + */ + @Child(name = "params", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Criteria for reverse lookup", formalDefinition="A set of parameters to look up." ) + protected StringType params; + /** * Profile for the target resource. */ - @Child(name = "profile", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Child(name = "profile", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Profile for the target resource", formalDefinition="Profile for the target resource." ) protected UriType profile; /** * Compartment Consistency Rules. */ - @Child(name = "compartment", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "compartment", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Compartment Consistency Rules", formalDefinition="Compartment Consistency Rules." ) protected List compartment; /** * Additional links from target resource. */ - @Child(name = "link", type = {GraphDefinitionLinkComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "link", type = {GraphDefinitionLinkComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Additional links from target resource", formalDefinition="Additional links from target resource." ) protected List link; - private static final long serialVersionUID = -1862411341L; + private static final long serialVersionUID = -341158110L; /** * Constructor @@ -944,6 +1039,55 @@ public class GraphDefinition extends MetadataResource { return this; } + /** + * @return {@link #params} (A set of parameters to look up.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value + */ + public StringType getParamsElement() { + if (this.params == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GraphDefinitionLinkTargetComponent.params"); + else if (Configuration.doAutoCreate()) + this.params = new StringType(); // bb + return this.params; + } + + public boolean hasParamsElement() { + return this.params != null && !this.params.isEmpty(); + } + + public boolean hasParams() { + return this.params != null && !this.params.isEmpty(); + } + + /** + * @param value {@link #params} (A set of parameters to look up.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value + */ + public GraphDefinitionLinkTargetComponent setParamsElement(StringType value) { + this.params = value; + return this; + } + + /** + * @return A set of parameters to look up. + */ + public String getParams() { + return this.params == null ? null : this.params.getValue(); + } + + /** + * @param value A set of parameters to look up. + */ + public GraphDefinitionLinkTargetComponent setParams(String value) { + if (Utilities.noString(value)) + this.params = null; + else { + if (this.params == null) + this.params = new StringType(); + this.params.setValue(value); + } + return this; + } + /** * @return {@link #profile} (Profile for the target resource.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value */ @@ -1102,6 +1246,7 @@ public class GraphDefinition extends MetadataResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("type", "code", "Type of resource this link refers to.", 0, 1, type)); + children.add(new Property("params", "string", "A set of parameters to look up.", 0, 1, params)); children.add(new Property("profile", "uri", "Profile for the target resource.", 0, 1, profile)); children.add(new Property("compartment", "", "Compartment Consistency Rules.", 0, java.lang.Integer.MAX_VALUE, compartment)); children.add(new Property("link", "@GraphDefinition.link", "Additional links from target resource.", 0, java.lang.Integer.MAX_VALUE, link)); @@ -1111,6 +1256,7 @@ public class GraphDefinition extends MetadataResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 3575610: /*type*/ return new Property("type", "code", "Type of resource this link refers to.", 0, 1, type); + case -995427962: /*params*/ return new Property("params", "string", "A set of parameters to look up.", 0, 1, params); case -309425751: /*profile*/ return new Property("profile", "uri", "Profile for the target resource.", 0, 1, profile); case -397756334: /*compartment*/ return new Property("compartment", "", "Compartment Consistency Rules.", 0, java.lang.Integer.MAX_VALUE, compartment); case 3321850: /*link*/ return new Property("link", "@GraphDefinition.link", "Additional links from target resource.", 0, java.lang.Integer.MAX_VALUE, link); @@ -1123,6 +1269,7 @@ public class GraphDefinition extends MetadataResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType + case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // UriType case -397756334: /*compartment*/ return this.compartment == null ? new Base[0] : this.compartment.toArray(new Base[this.compartment.size()]); // GraphDefinitionLinkTargetCompartmentComponent case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // GraphDefinitionLinkComponent @@ -1137,6 +1284,9 @@ public class GraphDefinition extends MetadataResource { case 3575610: // type this.type = castToCode(value); // CodeType return value; + case -995427962: // params + this.params = castToString(value); // StringType + return value; case -309425751: // profile this.profile = castToUri(value); // UriType return value; @@ -1155,6 +1305,8 @@ public class GraphDefinition extends MetadataResource { public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) { this.type = castToCode(value); // CodeType + } else if (name.equals("params")) { + this.params = castToString(value); // StringType } else if (name.equals("profile")) { this.profile = castToUri(value); // UriType } else if (name.equals("compartment")) { @@ -1170,6 +1322,7 @@ public class GraphDefinition extends MetadataResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: return getTypeElement(); + case -995427962: return getParamsElement(); case -309425751: return getProfileElement(); case -397756334: return addCompartment(); case 3321850: return addLink(); @@ -1182,6 +1335,7 @@ public class GraphDefinition extends MetadataResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: /*type*/ return new String[] {"code"}; + case -995427962: /*params*/ return new String[] {"string"}; case -309425751: /*profile*/ return new String[] {"uri"}; case -397756334: /*compartment*/ return new String[] {}; case 3321850: /*link*/ return new String[] {"@GraphDefinition.link"}; @@ -1195,6 +1349,9 @@ public class GraphDefinition extends MetadataResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type GraphDefinition.type"); } + else if (name.equals("params")) { + throw new FHIRException("Cannot call addChild on a primitive type GraphDefinition.params"); + } else if (name.equals("profile")) { throw new FHIRException("Cannot call addChild on a primitive type GraphDefinition.profile"); } @@ -1212,6 +1369,7 @@ public class GraphDefinition extends MetadataResource { GraphDefinitionLinkTargetComponent dst = new GraphDefinitionLinkTargetComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); + dst.params = params == null ? null : params.copy(); dst.profile = profile == null ? null : profile.copy(); if (compartment != null) { dst.compartment = new ArrayList(); @@ -1233,8 +1391,8 @@ public class GraphDefinition extends MetadataResource { if (!(other instanceof GraphDefinitionLinkTargetComponent)) return false; GraphDefinitionLinkTargetComponent o = (GraphDefinitionLinkTargetComponent) other; - return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(compartment, o.compartment, true) - && compareDeep(link, o.link, true); + return compareDeep(type, o.type, true) && compareDeep(params, o.params, true) && compareDeep(profile, o.profile, true) + && compareDeep(compartment, o.compartment, true) && compareDeep(link, o.link, true); } @Override @@ -1244,11 +1402,12 @@ public class GraphDefinition extends MetadataResource { if (!(other instanceof GraphDefinitionLinkTargetComponent)) return false; GraphDefinitionLinkTargetComponent o = (GraphDefinitionLinkTargetComponent) other; - return compareValues(type, o.type, true) && compareValues(profile, o.profile, true); + return compareValues(type, o.type, true) && compareValues(params, o.params, true) && compareValues(profile, o.profile, true) + ; } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile, compartment + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, params, profile, compartment , link); } @@ -1261,10 +1420,18 @@ public class GraphDefinition extends MetadataResource { @Block() public static class GraphDefinitionLinkTargetCompartmentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed. + */ + @Child(name = "use", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="condition | requirement", formalDefinition="Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/graph-compartment-use") + protected Enumeration use; + /** * Identifies the compartment. */ - @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Identifies the compartment", formalDefinition="Identifies the compartment." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/compartment-type") protected Enumeration code; @@ -1272,7 +1439,7 @@ public class GraphDefinition extends MetadataResource { /** * identical | matching | different | no-rule | custom. */ - @Child(name = "rule", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Child(name = "rule", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="identical | matching | different | custom", formalDefinition="identical | matching | different | no-rule | custom." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/graph-compartment-rule") protected Enumeration rule; @@ -1280,18 +1447,18 @@ public class GraphDefinition extends MetadataResource { /** * Custom rule, as a FHIRPath expression. */ - @Child(name = "expression", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Custom rule, as a FHIRPath expression", formalDefinition="Custom rule, as a FHIRPath expression." ) protected StringType expression; /** * Documentation for FHIRPath expression. */ - @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Documentation for FHIRPath expression", formalDefinition="Documentation for FHIRPath expression." ) protected StringType description; - private static final long serialVersionUID = -1046660576L; + private static final long serialVersionUID = 1023364175L; /** * Constructor @@ -1303,12 +1470,58 @@ public class GraphDefinition extends MetadataResource { /** * Constructor */ - public GraphDefinitionLinkTargetCompartmentComponent(Enumeration code, Enumeration rule) { + public GraphDefinitionLinkTargetCompartmentComponent(Enumeration use, Enumeration code, Enumeration rule) { super(); + this.use = use; this.code = code; this.rule = rule; } + /** + * @return {@link #use} (Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public Enumeration getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GraphDefinitionLinkTargetCompartmentComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new Enumeration(new GraphCompartmentUseEnumFactory()); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public GraphDefinitionLinkTargetCompartmentComponent setUseElement(Enumeration value) { + this.use = value; + return this; + } + + /** + * @return Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed. + */ + public GraphCompartmentUse getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed. + */ + public GraphDefinitionLinkTargetCompartmentComponent setUse(GraphCompartmentUse value) { + if (this.use == null) + this.use = new Enumeration(new GraphCompartmentUseEnumFactory()); + this.use.setValue(value); + return this; + } + /** * @return {@link #code} (Identifies the compartment.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value */ @@ -1499,6 +1712,7 @@ public class GraphDefinition extends MetadataResource { protected void listChildren(List children) { super.listChildren(children); + children.add(new Property("use", "code", "Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.", 0, 1, use)); children.add(new Property("code", "code", "Identifies the compartment.", 0, 1, code)); children.add(new Property("rule", "code", "identical | matching | different | no-rule | custom.", 0, 1, rule)); children.add(new Property("expression", "string", "Custom rule, as a FHIRPath expression.", 0, 1, expression)); @@ -1508,6 +1722,7 @@ public class GraphDefinition extends MetadataResource { @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { + case 116103: /*use*/ return new Property("use", "code", "Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.", 0, 1, use); case 3059181: /*code*/ return new Property("code", "code", "Identifies the compartment.", 0, 1, code); case 3512060: /*rule*/ return new Property("rule", "code", "identical | matching | different | no-rule | custom.", 0, 1, rule); case -1795452264: /*expression*/ return new Property("expression", "string", "Custom rule, as a FHIRPath expression.", 0, 1, expression); @@ -1520,6 +1735,7 @@ public class GraphDefinition extends MetadataResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { + case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // Enumeration case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType @@ -1532,6 +1748,10 @@ public class GraphDefinition extends MetadataResource { @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { + case 116103: // use + value = new GraphCompartmentUseEnumFactory().fromType(castToCode(value)); + this.use = (Enumeration) value; // Enumeration + return value; case 3059181: // code value = new CompartmentCodeEnumFactory().fromType(castToCode(value)); this.code = (Enumeration) value; // Enumeration @@ -1553,7 +1773,10 @@ public class GraphDefinition extends MetadataResource { @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) { + if (name.equals("use")) { + value = new GraphCompartmentUseEnumFactory().fromType(castToCode(value)); + this.use = (Enumeration) value; // Enumeration + } else if (name.equals("code")) { value = new CompartmentCodeEnumFactory().fromType(castToCode(value)); this.code = (Enumeration) value; // Enumeration } else if (name.equals("rule")) { @@ -1571,6 +1794,7 @@ public class GraphDefinition extends MetadataResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { + case 116103: return getUseElement(); case 3059181: return getCodeElement(); case 3512060: return getRuleElement(); case -1795452264: return getExpressionElement(); @@ -1583,6 +1807,7 @@ public class GraphDefinition extends MetadataResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { + case 116103: /*use*/ return new String[] {"code"}; case 3059181: /*code*/ return new String[] {"code"}; case 3512060: /*rule*/ return new String[] {"code"}; case -1795452264: /*expression*/ return new String[] {"string"}; @@ -1594,7 +1819,10 @@ public class GraphDefinition extends MetadataResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { + if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type GraphDefinition.use"); + } + else if (name.equals("code")) { throw new FHIRException("Cannot call addChild on a primitive type GraphDefinition.code"); } else if (name.equals("rule")) { @@ -1613,6 +1841,7 @@ public class GraphDefinition extends MetadataResource { public GraphDefinitionLinkTargetCompartmentComponent copy() { GraphDefinitionLinkTargetCompartmentComponent dst = new GraphDefinitionLinkTargetCompartmentComponent(); copyValues(dst); + dst.use = use == null ? null : use.copy(); dst.code = code == null ? null : code.copy(); dst.rule = rule == null ? null : rule.copy(); dst.expression = expression == null ? null : expression.copy(); @@ -1627,8 +1856,9 @@ public class GraphDefinition extends MetadataResource { if (!(other instanceof GraphDefinitionLinkTargetCompartmentComponent)) return false; GraphDefinitionLinkTargetCompartmentComponent o = (GraphDefinitionLinkTargetCompartmentComponent) other; - return compareDeep(code, o.code, true) && compareDeep(rule, o.rule, true) && compareDeep(expression, o.expression, true) - && compareDeep(description, o.description, true); + return compareDeep(use, o.use, true) && compareDeep(code, o.code, true) && compareDeep(rule, o.rule, true) + && compareDeep(expression, o.expression, true) && compareDeep(description, o.description, true) + ; } @Override @@ -1638,13 +1868,14 @@ public class GraphDefinition extends MetadataResource { if (!(other instanceof GraphDefinitionLinkTargetCompartmentComponent)) return false; GraphDefinitionLinkTargetCompartmentComponent o = (GraphDefinitionLinkTargetCompartmentComponent) other; - return compareValues(code, o.code, true) && compareValues(rule, o.rule, true) && compareValues(expression, o.expression, true) - && compareValues(description, o.description, true); + return compareValues(use, o.use, true) && compareValues(code, o.code, true) && compareValues(rule, o.rule, true) + && compareValues(expression, o.expression, true) && compareValues(description, o.description, true) + ; } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, rule, expression, description - ); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, code, rule, expression + , description); } public String fhirType() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Group.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Group.java index 3d7ceb9412d..e37a8377fe3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Group.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Group.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GuidanceResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GuidanceResponse.java index 44beab677d8..7992a56f604 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GuidanceResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/GuidanceResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HealthcareService.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HealthcareService.java index 3bd19281638..dff266743a7 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HealthcareService.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HealthcareService.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HumanName.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HumanName.java index a2453360be5..7b52631c132 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HumanName.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/HumanName.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Identifier.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Identifier.java index 2081b3a4fb2..5a9ad8e41e9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Identifier.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Identifier.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingManifest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingManifest.java index ff6b15ef4ea..2cf961e505d 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingManifest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingManifest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingStudy.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingStudy.java index d7e43b19610..f15a5a4c5a4 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingStudy.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImagingStudy.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Immunization.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Immunization.java index 4e46ed39abf..0fa8b5445c3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Immunization.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Immunization.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImmunizationRecommendation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImmunizationRecommendation.java index 724485595cc..5eba1f7e5a4 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImmunizationRecommendation.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImmunizationRecommendation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImplementationGuide.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImplementationGuide.java index 1fb0b25c89c..e3fb19182e9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImplementationGuide.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ImplementationGuide.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/InstantType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/InstantType.java index 0dcfe50383c..e134ae2f57c 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/InstantType.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/InstantType.java @@ -1,222 +1,224 @@ -/* -Copyright (c) 2011+, HL7, Inc -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ -/** - * - */ -package org.hl7.fhir.r4.model; - -import java.util.*; -import java.util.zip.DataFormatException; - -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; - -/** - * Represents a FHIR instant datatype. Valid precisions values for this type are: - *
    - *
  • {@link TemporalPrecisionEnum#SECOND} - *
  • {@link TemporalPrecisionEnum#MILLI} - *
- */ -@DatatypeDef(name="instant") -public class InstantType extends BaseDateTimeType { - - private static final long serialVersionUID = 3L; - - /** - * The default precision for this type - */ - public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.MILLI; - - /** - * Constructor which creates an InstantDt with no timne value. Note - * that unlike the default constructor for the Java {@link Date} or - * {@link Calendar} objects, this constructor does not initialize the object - * with the current time. - * - * @see #withCurrentTime() to create a new object that has been initialized - * with the current time. - */ - public InstantType() { - super(); - } - - /** - * Create a new DateTimeDt - */ - public InstantType(Calendar theCalendar) { - super(theCalendar.getTime(), DEFAULT_PRECISION, theCalendar.getTimeZone()); - } - - /** - * Create a new instance using the given date, precision level, and time zone - * - * @throws DataFormatException - * If the specified precision is not allowed for this type - */ - public InstantType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone) { - super(theDate, thePrecision, theTimezone); - } - - - /** - * Create a new DateTimeDt using an existing value. Use this constructor with caution, - * as it may create more precision than warranted (since for example it is possible to pass in - * a DateTime with only a year, and this constructor will convert to an InstantDt with - * milliseconds precision). - */ - public InstantType(BaseDateTimeType theDateTime) { - // Do not call super(foo) here, we don't want to trigger a DataFormatException - setValue(theDateTime.getValue()); - setPrecision(DEFAULT_PRECISION); - setTimeZone(theDateTime.getTimeZone()); - } - - /** - * Create a new DateTimeDt with the given date/time and {@link TemporalPrecisionEnum#MILLI} precision - */ - public InstantType(Date theDate) { - super(theDate, DEFAULT_PRECISION, TimeZone.getDefault()); - } - - /** - * Constructor which accepts a date value and a precision value. Valid - * precisions values for this type are: - *
    - *
  • {@link TemporalPrecisionEnum#SECOND} - *
  • {@link TemporalPrecisionEnum#MILLI} - *
- */ - public InstantType(Date theDate, TemporalPrecisionEnum thePrecision) { - setValue(theDate); - setPrecision(thePrecision); - setTimeZone(TimeZone.getDefault()); - } - - /** - * Create a new InstantDt from a string value - * - * @param theString - * The string representation of the string. Must be in a valid - * format according to the FHIR specification - * @throws DataFormatException - */ - public InstantType(String theString) { - super(theString); - } - - /** - * Invokes {@link Date#after(Date)} on the contained Date against the given - * date - * - * @throws NullPointerException - * If the {@link #getValue() contained Date} is null - */ - public boolean after(Date theDate) { - return getValue().after(theDate); - } - - /** - * Invokes {@link Date#before(Date)} on the contained Date against the given - * date - * - * @throws NullPointerException - * If the {@link #getValue() contained Date} is null - */ - public boolean before(Date theDate) { - return getValue().before(theDate); - } - - /** - * Sets the value of this instant to the current time (from the system - * clock) and the local/default timezone (as retrieved using - * {@link TimeZone#getDefault()}. This TimeZone is generally obtained from - * the underlying OS. - */ - public void setToCurrentTimeInLocalTimeZone() { - setValue(new Date()); - setTimeZone(TimeZone.getDefault()); - } - - @Override - boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { - switch (thePrecision) { - case SECOND: - case MILLI: - return true; - default: - return false; - } - } - - /** - * Factory method which creates a new InstantDt with millisecond precision and initializes it with the - * current time and the system local timezone. - */ - public static InstantType withCurrentTime() { - return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); - } - - /** - * Returns the default precision for this datatype - * - * @see #DEFAULT_PRECISION - */ - @Override - protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { - return DEFAULT_PRECISION; - } - - - @Override - public InstantType copy() { - return new InstantType(getValueAsString()); - } - - /** - * Returns a new instance of DateTimeType with the current system time and MILLI precision and the system local time - * zone - */ - public static InstantType now() { - return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); - } - - /** - * Creates a new instance by parsing an HL7 v3 format date time string - */ - public static InstantType parseV3(String theV3String) { - InstantType retVal = new InstantType(); - retVal.setValueAsV3String(theV3String); - return retVal; - } - - public String fhirType() { - return "instant"; - } -} +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +/** + * + */ +package org.hl7.fhir.r4.model; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; +import java.util.zip.DataFormatException; + +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/** + * Represents a FHIR instant datatype. Valid precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ +@DatatypeDef(name="instant") +public class InstantType extends BaseDateTimeType { + + private static final long serialVersionUID = 3L; + + /** + * The default precision for this type + */ + public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.MILLI; + + /** + * Constructor which creates an InstantDt with no timne value. Note + * that unlike the default constructor for the Java {@link Date} or + * {@link Calendar} objects, this constructor does not initialize the object + * with the current time. + * + * @see #withCurrentTime() to create a new object that has been initialized + * with the current time. + */ + public InstantType() { + super(); + } + + /** + * Create a new DateTimeDt + */ + public InstantType(Calendar theCalendar) { + super(theCalendar.getTime(), DEFAULT_PRECISION, theCalendar.getTimeZone()); + } + + /** + * Create a new instance using the given date, precision level, and time zone + * + * @throws DataFormatException + * If the specified precision is not allowed for this type + */ + public InstantType(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone) { + super(theDate, thePrecision, theTimezone); + } + + + /** + * Create a new DateTimeDt using an existing value. Use this constructor with caution, + * as it may create more precision than warranted (since for example it is possible to pass in + * a DateTime with only a year, and this constructor will convert to an InstantDt with + * milliseconds precision). + */ + public InstantType(BaseDateTimeType theDateTime) { + // Do not call super(foo) here, we don't want to trigger a DataFormatException + setValue(theDateTime.getValue()); + setPrecision(DEFAULT_PRECISION); + setTimeZone(theDateTime.getTimeZone()); + } + + /** + * Create a new DateTimeDt with the given date/time and {@link TemporalPrecisionEnum#MILLI} precision + */ + public InstantType(Date theDate) { + super(theDate, DEFAULT_PRECISION, TimeZone.getDefault()); + } + + /** + * Constructor which accepts a date value and a precision value. Valid + * precisions values for this type are: + *
    + *
  • {@link TemporalPrecisionEnum#SECOND} + *
  • {@link TemporalPrecisionEnum#MILLI} + *
+ */ + public InstantType(Date theDate, TemporalPrecisionEnum thePrecision) { + setValue(theDate); + setPrecision(thePrecision); + setTimeZone(TimeZone.getDefault()); + } + + /** + * Create a new InstantDt from a string value + * + * @param theString + * The string representation of the string. Must be in a valid + * format according to the FHIR specification + * @throws DataFormatException + */ + public InstantType(String theString) { + super(theString); + } + + /** + * Invokes {@link Date#after(Date)} on the contained Date against the given + * date + * + * @throws NullPointerException + * If the {@link #getValue() contained Date} is null + */ + public boolean after(Date theDate) { + return getValue().after(theDate); + } + + /** + * Invokes {@link Date#before(Date)} on the contained Date against the given + * date + * + * @throws NullPointerException + * If the {@link #getValue() contained Date} is null + */ + public boolean before(Date theDate) { + return getValue().before(theDate); + } + + /** + * Sets the value of this instant to the current time (from the system + * clock) and the local/default timezone (as retrieved using + * {@link TimeZone#getDefault()}. This TimeZone is generally obtained from + * the underlying OS. + */ + public void setToCurrentTimeInLocalTimeZone() { + setValue(new Date()); + setTimeZone(TimeZone.getDefault()); + } + + @Override + boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) { + switch (thePrecision) { + case SECOND: + case MILLI: + return true; + default: + return false; + } + } + + /** + * Factory method which creates a new InstantDt with millisecond precision and initializes it with the + * current time and the system local timezone. + */ + public static InstantType withCurrentTime() { + return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); + } + + /** + * Returns the default precision for this datatype + * + * @see #DEFAULT_PRECISION + */ + @Override + protected TemporalPrecisionEnum getDefaultPrecisionForDatatype() { + return DEFAULT_PRECISION; + } + + + @Override + public InstantType copy() { + return new InstantType(getValueAsString()); + } + + /** + * Returns a new instance of DateTimeType with the current system time and MILLI precision and the system local time + * zone + */ + public static InstantType now() { + return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); + } + + /** + * Creates a new instance by parsing an HL7 v3 format date time string + */ + public static InstantType parseV3(String theV3String) { + InstantType retVal = new InstantType(); + retVal.setValueAsV3String(theV3String); + return retVal; + } + + public String fhirType() { + return "instant"; + } +} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Library.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Library.java index 707cba3e2b7..aacf84eaea3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Library.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Library.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Linkage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Linkage.java index 0d67560785c..0231e8df7d0 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Linkage.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Linkage.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java index 8da4fa19b13..5b0b43c0ba3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Location.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Location.java index a767578004d..8a393549221 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Location.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Location.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Measure.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Measure.java index b6be859db56..2b1d8a006e9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Measure.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Measure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MeasureReport.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MeasureReport.java index 61832def537..3cef2695bad 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MeasureReport.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MeasureReport.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Media.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Media.java index 0073bf9088a..a341da062e8 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Media.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Media.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Medication.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Medication.java index f9622522dd4..735ed57840f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Medication.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Medication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationAdministration.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationAdministration.java index b71f6a84025..0c291ffecd9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationAdministration.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationAdministration.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationDispense.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationDispense.java index e115a075ca7..c47ae1adfa5 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationDispense.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationDispense.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java index a25b06b05a6..1aa73212b60 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -253,6 +253,10 @@ public class MedicationRequest extends DomainResource { * The request represents an instance for the particular order, for example a medication administration record. */ INSTANCEORDER, + /** + * The request represents a component or opiton for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. + */ + OPTION, /** * added to help the parsers with the generic types */ @@ -268,6 +272,8 @@ public class MedicationRequest extends DomainResource { return ORDER; if ("instance-order".equals(codeString)) return INSTANCEORDER; + if ("option".equals(codeString)) + return OPTION; if (Configuration.isAcceptInvalidEnums()) return null; else @@ -279,6 +285,7 @@ public class MedicationRequest extends DomainResource { case PLAN: return "plan"; case ORDER: return "order"; case INSTANCEORDER: return "instance-order"; + case OPTION: return "option"; default: return "?"; } } @@ -288,6 +295,7 @@ public class MedicationRequest extends DomainResource { case PLAN: return "http://hl7.org/fhir/medication-request-intent"; case ORDER: return "http://hl7.org/fhir/medication-request-intent"; case INSTANCEORDER: return "http://hl7.org/fhir/medication-request-intent"; + case OPTION: return "http://hl7.org/fhir/medication-request-intent"; default: return "?"; } } @@ -297,6 +305,7 @@ public class MedicationRequest extends DomainResource { case PLAN: return "The request represents an intension to ensure something occurs without providing an authorization for others to act"; case ORDER: return "The request represents a request/demand and authorization for action"; case INSTANCEORDER: return "The request represents an instance for the particular order, for example a medication administration record."; + case OPTION: return "The request represents a component or opiton for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests."; default: return "?"; } } @@ -306,6 +315,7 @@ public class MedicationRequest extends DomainResource { case PLAN: return "Plan"; case ORDER: return "Order"; case INSTANCEORDER: return "Instance Order"; + case OPTION: return "Option"; default: return "?"; } } @@ -324,6 +334,8 @@ public class MedicationRequest extends DomainResource { return MedicationRequestIntent.ORDER; if ("instance-order".equals(codeString)) return MedicationRequestIntent.INSTANCEORDER; + if ("option".equals(codeString)) + return MedicationRequestIntent.OPTION; throw new IllegalArgumentException("Unknown MedicationRequestIntent code '"+codeString+"'"); } public Enumeration fromType(Base code) throws FHIRException { @@ -342,6 +354,8 @@ public class MedicationRequest extends DomainResource { return new Enumeration(this, MedicationRequestIntent.ORDER); if ("instance-order".equals(codeString)) return new Enumeration(this, MedicationRequestIntent.INSTANCEORDER); + if ("option".equals(codeString)) + return new Enumeration(this, MedicationRequestIntent.OPTION); throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'"); } public String toCode(MedicationRequestIntent code) { @@ -353,6 +367,8 @@ public class MedicationRequest extends DomainResource { return "order"; if (code == MedicationRequestIntent.INSTANCEORDER) return "instance-order"; + if (code == MedicationRequestIntent.OPTION) + return "option"; return "?"; } public String toSystem(MedicationRequestIntent code) { @@ -1393,17 +1409,17 @@ public class MedicationRequest extends DomainResource { * Whether the request is a proposal, plan, or an original order. */ @Child(name = "intent", type = {CodeType.class}, order=5, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="proposal | plan | order | instance-order", formalDefinition="Whether the request is a proposal, plan, or an original order." ) + @Description(shortDefinition="proposal | plan | order | instance-order | option", formalDefinition="Whether the request is a proposal, plan, or an original order." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-request-intent") protected Enumeration intent; /** - * Indicates the type of medication order and where the medication is expected to be consumed or administered. + * Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient) or the type of treatment (i.e. chemotherapy or endocrine). */ - @Child(name = "category", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Type of medication usage", formalDefinition="Indicates the type of medication order and where the medication is expected to be consumed or administered." ) + @Child(name = "category", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Type of medication usage", formalDefinition="Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient) or the type of treatment (i.e. chemotherapy or endocrine)." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-request-category") - protected CodeableConcept category; + protected List category; /** * Indicates how quickly the Medication Request should be addressed with respect to other requests. @@ -1579,7 +1595,7 @@ public class MedicationRequest extends DomainResource { protected List eventHistoryTarget; - private static final long serialVersionUID = 592527862L; + private static final long serialVersionUID = -511254308L; /** * Constructor @@ -1896,27 +1912,56 @@ public class MedicationRequest extends DomainResource { } /** - * @return {@link #category} (Indicates the type of medication order and where the medication is expected to be consumed or administered.) + * @return {@link #category} (Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient) or the type of treatment (i.e. chemotherapy or endocrine).) */ - public CodeableConcept getCategory() { + public List getCategory() { if (this.category == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationRequest.category"); - else if (Configuration.doAutoCreate()) - this.category = new CodeableConcept(); // cc + this.category = new ArrayList(); return this.category; } + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationRequest setCategory(List theCategory) { + this.category = theCategory; + return this; + } + public boolean hasCategory() { - return this.category != null && !this.category.isEmpty(); + if (this.category == null) + return false; + for (CodeableConcept item : this.category) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return t; + } + + public MedicationRequest addCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return this; } /** - * @param value {@link #category} (Indicates the type of medication order and where the medication is expected to be consumed or administered.) + * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist */ - public MedicationRequest setCategory(CodeableConcept value) { - this.category = value; - return this; + public CodeableConcept getCategoryFirstRep() { + if (getCategory().isEmpty()) { + addCategory(); + } + return getCategory().get(0); } /** @@ -2782,7 +2827,7 @@ public class MedicationRequest extends DomainResource { children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.", 0, 1, groupIdentifier)); children.add(new Property("status", "code", "A code specifying the current state of the order. Generally this will be active or completed state.", 0, 1, status)); children.add(new Property("intent", "code", "Whether the request is a proposal, plan, or an original order.", 0, 1, intent)); - children.add(new Property("category", "CodeableConcept", "Indicates the type of medication order and where the medication is expected to be consumed or administered.", 0, 1, category)); + children.add(new Property("category", "CodeableConcept", "Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient) or the type of treatment (i.e. chemotherapy or endocrine).", 0, java.lang.Integer.MAX_VALUE, category)); children.add(new Property("priority", "code", "Indicates how quickly the Medication Request should be addressed with respect to other requests.", 0, 1, priority)); children.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication)); children.add(new Property("subject", "Reference(Patient|Group)", "A link to a resource representing the person or set of individuals to whom the medication will be given.", 0, 1, subject)); @@ -2812,7 +2857,7 @@ public class MedicationRequest extends DomainResource { case -445338488: /*groupIdentifier*/ return new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.", 0, 1, groupIdentifier); case -892481550: /*status*/ return new Property("status", "code", "A code specifying the current state of the order. Generally this will be active or completed state.", 0, 1, status); case -1183762788: /*intent*/ return new Property("intent", "code", "Whether the request is a proposal, plan, or an original order.", 0, 1, intent); - case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Indicates the type of medication order and where the medication is expected to be consumed or administered.", 0, 1, category); + case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient) or the type of treatment (i.e. chemotherapy or endocrine).", 0, java.lang.Integer.MAX_VALUE, category); case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the Medication Request should be addressed with respect to other requests.", 0, 1, priority); case 1458402129: /*medication[x]*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); case 1998965455: /*medication*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); @@ -2848,7 +2893,7 @@ public class MedicationRequest extends DomainResource { case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration - case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept + case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration case 1998965455: /*medication*/ return this.medication == null ? new Base[0] : new Base[] {this.medication}; // Type case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference @@ -2896,7 +2941,7 @@ public class MedicationRequest extends DomainResource { this.intent = (Enumeration) value; // Enumeration return value; case 50511102: // category - this.category = castToCodeableConcept(value); // CodeableConcept + this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept return value; case -1165461084: // priority value = new MedicationRequestPriorityEnumFactory().fromType(castToCode(value)); @@ -2975,7 +3020,7 @@ public class MedicationRequest extends DomainResource { value = new MedicationRequestIntentEnumFactory().fromType(castToCode(value)); this.intent = (Enumeration) value; // Enumeration } else if (name.equals("category")) { - this.category = castToCodeableConcept(value); // CodeableConcept + this.getCategory().add(castToCodeableConcept(value)); } else if (name.equals("priority")) { value = new MedicationRequestPriorityEnumFactory().fromType(castToCode(value)); this.priority = (Enumeration) value; // Enumeration @@ -3027,7 +3072,7 @@ public class MedicationRequest extends DomainResource { case -445338488: return getGroupIdentifier(); case -892481550: return getStatusElement(); case -1183762788: return getIntentElement(); - case 50511102: return getCategory(); + case 50511102: return addCategory(); case -1165461084: return getPriorityElement(); case 1458402129: return getMedication(); case 1998965455: return getMedication(); @@ -3107,8 +3152,7 @@ public class MedicationRequest extends DomainResource { throw new FHIRException("Cannot call addChild on a primitive type MedicationRequest.intent"); } else if (name.equals("category")) { - this.category = new CodeableConcept(); - return this.category; + return addCategory(); } else if (name.equals("priority")) { throw new FHIRException("Cannot call addChild on a primitive type MedicationRequest.priority"); @@ -3207,7 +3251,11 @@ public class MedicationRequest extends DomainResource { dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy(); dst.status = status == null ? null : status.copy(); dst.intent = intent == null ? null : intent.copy(); - dst.category = category == null ? null : category.copy(); + if (category != null) { + dst.category = new ArrayList(); + for (CodeableConcept i : category) + dst.category.add(i.copy()); + }; dst.priority = priority == null ? null : priority.copy(); dst.medication = medication == null ? null : medication.copy(); dst.subject = subject == null ? null : subject.copy(); @@ -3555,6 +3603,32 @@ public class MedicationRequest extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MedicationRequest:patient").toLocked(); + /** + * Search parameter: intended-performer + *

+ * Description: Returns the intended performer of the administration of the medication request
+ * Type: reference
+ * Path: MedicationRequest.performer
+ *

+ */ + @SearchParamDefinition(name="intended-performer", path="MedicationRequest.performer", description="Returns the intended performer of the administration of the medication request", type="reference", target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) + public static final String SP_INTENDED_PERFORMER = "intended-performer"; + /** + * Fluent Client search parameter constant for intended-performer + *

+ * Description: Returns the intended performer of the administration of the medication request
+ * Type: reference
+ * Path: MedicationRequest.performer
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INTENDED_PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INTENDED_PERFORMER); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "MedicationRequest:intended-performer". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_INTENDED_PERFORMER = new ca.uhn.fhir.model.api.Include("MedicationRequest:intended-performer").toLocked(); + /** * Search parameter: context *

diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationStatement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationStatement.java index 5d668df4305..abb92a360cc 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationStatement.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MedicationStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -43,7 +43,7 @@ import ca.uhn.fhir.model.api.annotation.Block; import org.hl7.fhir.instance.model.api.*; import org.hl7.fhir.exceptions.FHIRException; /** - * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. */ @ResourceDef(name="MedicationStatement", profile="http://hl7.org/fhir/Profile/MedicationStatement") public class MedicationStatement extends DomainResource { @@ -412,10 +412,10 @@ public class MedicationStatement extends DomainResource { protected Type medication; /** - * The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true). + * The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No). */ @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=7, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The date/time or interval when the medication was taken", formalDefinition="The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true)." ) + @Description(shortDefinition="The date/time or interval when the medication is/was/will taken", formalDefinition="The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No)." ) protected Type effective; /** @@ -864,14 +864,14 @@ public class MedicationStatement extends DomainResource { } /** - * @return {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + * @return {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).) */ public Type getEffective() { return this.effective; } /** - * @return {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + * @return {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).) */ public DateTimeType getEffectiveDateTimeType() throws FHIRException { if (!(this.effective instanceof DateTimeType)) @@ -884,7 +884,7 @@ public class MedicationStatement extends DomainResource { } /** - * @return {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + * @return {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).) */ public Period getEffectivePeriod() throws FHIRException { if (!(this.effective instanceof Period)) @@ -901,7 +901,7 @@ public class MedicationStatement extends DomainResource { } /** - * @param value {@link #effective} (The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).) + * @param value {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).) */ public MedicationStatement setEffective(Type value) { this.effective = value; @@ -1427,7 +1427,7 @@ public class MedicationStatement extends DomainResource { children.add(new Property("status", "code", "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", 0, 1, status)); children.add(new Property("category", "CodeableConcept", "Indicates where type of medication statement and where the medication is expected to be consumed or administered.", 0, 1, category)); children.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication)); - children.add(new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, 1, effective)); + children.add(new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective)); children.add(new Property("dateAsserted", "dateTime", "The date when the medication statement was asserted by the information source.", 0, 1, dateAsserted)); children.add(new Property("informationSource", "Reference(Patient|Practitioner|RelatedPerson|Organization)", "The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g Claim or MedicationRequest.", 0, 1, informationSource)); children.add(new Property("subject", "Reference(Patient|Group)", "The person, animal or group who is/was taking the medication.", 0, 1, subject)); @@ -1453,10 +1453,10 @@ public class MedicationStatement extends DomainResource { case 1998965455: /*medication*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); case -209845038: /*medicationCodeableConcept*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); case 2104315196: /*medicationReference*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); - case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, 1, effective); - case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, 1, effective); - case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, 1, effective); - case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, 1, effective); + case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); + case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); + case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); + case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); case -1980855245: /*dateAsserted*/ return new Property("dateAsserted", "dateTime", "The date when the medication statement was asserted by the information source.", 0, 1, dateAsserted); case -2123220889: /*informationSource*/ return new Property("informationSource", "Reference(Patient|Practitioner|RelatedPerson|Organization)", "The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g Claim or MedicationRequest.", 0, 1, informationSource); case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The person, animal or group who is/was taking the medication.", 0, 1, subject); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageDefinition.java index f126cabb0b6..329609dcc4d 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -860,12 +860,11 @@ public class MessageDefinition extends MetadataResource { /** - * A coded identifier of a supported messaging event. + * Link to the defined event type. */ - @Child(name = "event", type = {Coding.class}, order=6, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Event type", formalDefinition="A coded identifier of a supported messaging event." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-events") - protected Coding event; + @Child(name = "event", type = {UriType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Link to the Event type", formalDefinition="Link to the defined event type." ) + protected UriType event; /** * The impact of the content of the message. @@ -896,7 +895,7 @@ public class MessageDefinition extends MetadataResource { @Description(shortDefinition="Responses to this message", formalDefinition="Indicates what types of messages may be sent as an application-level response to this message." ) protected List allowedResponse; - private static final long serialVersionUID = -219916580L; + private static final long serialVersionUID = 677490646L; /** * Constructor @@ -908,11 +907,10 @@ public class MessageDefinition extends MetadataResource { /** * Constructor */ - public MessageDefinition(Enumeration status, DateTimeType date, Coding event) { + public MessageDefinition(Enumeration status, DateTimeType date) { super(); this.status = status; this.date = date; - this.event = event; } /** @@ -1808,29 +1806,54 @@ public class MessageDefinition extends MetadataResource { } /** - * @return {@link #event} (A coded identifier of a supported messaging event.) + * @return {@link #event} (Link to the defined event type.). This is the underlying object with id, value and extensions. The accessor "getEvent" gives direct access to the value */ - public Coding getEvent() { + public UriType getEventElement() { if (this.event == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create MessageDefinition.event"); else if (Configuration.doAutoCreate()) - this.event = new Coding(); // cc + this.event = new UriType(); // bb return this.event; } + public boolean hasEventElement() { + return this.event != null && !this.event.isEmpty(); + } + public boolean hasEvent() { return this.event != null && !this.event.isEmpty(); } /** - * @param value {@link #event} (A coded identifier of a supported messaging event.) + * @param value {@link #event} (Link to the defined event type.). This is the underlying object with id, value and extensions. The accessor "getEvent" gives direct access to the value */ - public MessageDefinition setEvent(Coding value) { + public MessageDefinition setEventElement(UriType value) { this.event = value; return this; } + /** + * @return Link to the defined event type. + */ + public String getEvent() { + return this.event == null ? null : this.event.getValue(); + } + + /** + * @param value Link to the defined event type. + */ + public MessageDefinition setEvent(String value) { + if (Utilities.noString(value)) + this.event = null; + else { + if (this.event == null) + this.event = new UriType(); + this.event.setValue(value); + } + return this; + } + /** * @return {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value */ @@ -2051,7 +2074,7 @@ public class MessageDefinition extends MetadataResource { children.add(new Property("base", "Reference(MessageDefinition)", "The MessageDefinition that is the basis for the contents of this resource.", 0, 1, base)); children.add(new Property("parent", "Reference(ActivityDefinition|PlanDefinition)", "Identifies a protocol or workflow that this MessageDefinition represents a step in.", 0, java.lang.Integer.MAX_VALUE, parent)); children.add(new Property("replaces", "Reference(MessageDefinition)", "A MessageDefinition that is superseded by this definition.", 0, java.lang.Integer.MAX_VALUE, replaces)); - children.add(new Property("event", "Coding", "A coded identifier of a supported messaging event.", 0, 1, event)); + children.add(new Property("event", "uri", "Link to the defined event type.", 0, 1, event)); children.add(new Property("category", "code", "The impact of the content of the message.", 0, 1, category)); children.add(new Property("focus", "", "Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.", 0, java.lang.Integer.MAX_VALUE, focus)); children.add(new Property("responseRequired", "boolean", "Indicates whether a response is required for this message.", 0, 1, responseRequired)); @@ -2079,7 +2102,7 @@ public class MessageDefinition extends MetadataResource { case 3016401: /*base*/ return new Property("base", "Reference(MessageDefinition)", "The MessageDefinition that is the basis for the contents of this resource.", 0, 1, base); case -995424086: /*parent*/ return new Property("parent", "Reference(ActivityDefinition|PlanDefinition)", "Identifies a protocol or workflow that this MessageDefinition represents a step in.", 0, java.lang.Integer.MAX_VALUE, parent); case -430332865: /*replaces*/ return new Property("replaces", "Reference(MessageDefinition)", "A MessageDefinition that is superseded by this definition.", 0, java.lang.Integer.MAX_VALUE, replaces); - case 96891546: /*event*/ return new Property("event", "Coding", "A coded identifier of a supported messaging event.", 0, 1, event); + case 96891546: /*event*/ return new Property("event", "uri", "Link to the defined event type.", 0, 1, event); case 50511102: /*category*/ return new Property("category", "code", "The impact of the content of the message.", 0, 1, category); case 97604824: /*focus*/ return new Property("focus", "", "Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.", 0, java.lang.Integer.MAX_VALUE, focus); case 791597824: /*responseRequired*/ return new Property("responseRequired", "boolean", "Indicates whether a response is required for this message.", 0, 1, responseRequired); @@ -2110,7 +2133,7 @@ public class MessageDefinition extends MetadataResource { case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // Reference case -995424086: /*parent*/ return this.parent == null ? new Base[0] : this.parent.toArray(new Base[this.parent.size()]); // Reference case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference - case 96891546: /*event*/ return this.event == null ? new Base[0] : new Base[] {this.event}; // Coding + case 96891546: /*event*/ return this.event == null ? new Base[0] : new Base[] {this.event}; // UriType case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Enumeration case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // MessageDefinitionFocusComponent case 791597824: /*responseRequired*/ return this.responseRequired == null ? new Base[0] : new Base[] {this.responseRequired}; // BooleanType @@ -2179,7 +2202,7 @@ public class MessageDefinition extends MetadataResource { this.getReplaces().add(castToReference(value)); // Reference return value; case 96891546: // event - this.event = castToCoding(value); // Coding + this.event = castToUri(value); // UriType return value; case 50511102: // category value = new MessageSignificanceCategoryEnumFactory().fromType(castToCode(value)); @@ -2239,7 +2262,7 @@ public class MessageDefinition extends MetadataResource { } else if (name.equals("replaces")) { this.getReplaces().add(castToReference(value)); } else if (name.equals("event")) { - this.event = castToCoding(value); // Coding + this.event = castToUri(value); // UriType } else if (name.equals("category")) { value = new MessageSignificanceCategoryEnumFactory().fromType(castToCode(value)); this.category = (Enumeration) value; // Enumeration @@ -2275,7 +2298,7 @@ public class MessageDefinition extends MetadataResource { case 3016401: return getBase(); case -995424086: return addParent(); case -430332865: return addReplaces(); - case 96891546: return getEvent(); + case 96891546: return getEventElement(); case 50511102: return getCategoryElement(); case 97604824: return addFocus(); case 791597824: return getResponseRequiredElement(); @@ -2306,7 +2329,7 @@ public class MessageDefinition extends MetadataResource { case 3016401: /*base*/ return new String[] {"Reference"}; case -995424086: /*parent*/ return new String[] {"Reference"}; case -430332865: /*replaces*/ return new String[] {"Reference"}; - case 96891546: /*event*/ return new String[] {"Coding"}; + case 96891546: /*event*/ return new String[] {"uri"}; case 50511102: /*category*/ return new String[] {"code"}; case 97604824: /*focus*/ return new String[] {}; case 791597824: /*responseRequired*/ return new String[] {"boolean"}; @@ -2375,8 +2398,7 @@ public class MessageDefinition extends MetadataResource { return addReplaces(); } else if (name.equals("event")) { - this.event = new Coding(); - return this.event; + throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.event"); } else if (name.equals("category")) { throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.category"); @@ -2481,8 +2503,9 @@ public class MessageDefinition extends MetadataResource { if (!(other instanceof MessageDefinition)) return false; MessageDefinition o = (MessageDefinition) other; - return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(category, o.category, true) - && compareValues(responseRequired, o.responseRequired, true); + return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(event, o.event, true) + && compareValues(category, o.category, true) && compareValues(responseRequired, o.responseRequired, true) + ; } public boolean isEmpty() { @@ -2700,21 +2723,21 @@ public class MessageDefinition extends MetadataResource { * Search parameter: event *

* Description: The event that triggers the message
- * Type: token
+ * Type: uri
* Path: MessageDefinition.event
*

*/ - @SearchParamDefinition(name="event", path="MessageDefinition.event", description="The event that triggers the message", type="token" ) + @SearchParamDefinition(name="event", path="MessageDefinition.event", description="The event that triggers the message", type="uri" ) public static final String SP_EVENT = "event"; /** * Fluent Client search parameter constant for event *

* Description: The event that triggers the message
- * Type: token
+ * Type: uri
* Path: MessageDefinition.event
*

*/ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EVENT); + public static final ca.uhn.fhir.rest.gclient.UriClientParam EVENT = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_EVENT); /** * Search parameter: category diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageHeader.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageHeader.java index 60e387d8dfe..b74b50c38f9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageHeader.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MessageHeader.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1409,7 +1409,14 @@ public class MessageHeader extends DomainResource { protected List focusTarget; - private static final long serialVersionUID = 265309683L; + /** + * Permanent link to the MessageDefinition for this message. + */ + @Child(name = "definition", type = {UriType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Link to the definition for this message", formalDefinition="Permanent link to the MessageDefinition for this message." ) + protected UriType definition; + + private static final long serialVersionUID = 1392664358L; /** * Constructor @@ -1851,6 +1858,55 @@ public class MessageHeader extends DomainResource { return this.focusTarget; } + /** + * @return {@link #definition} (Permanent link to the MessageDefinition for this message.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public UriType getDefinitionElement() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MessageHeader.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new UriType(); // bb + return this.definition; + } + + public boolean hasDefinitionElement() { + return this.definition != null && !this.definition.isEmpty(); + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (Permanent link to the MessageDefinition for this message.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public MessageHeader setDefinitionElement(UriType value) { + this.definition = value; + return this; + } + + /** + * @return Permanent link to the MessageDefinition for this message. + */ + public String getDefinition() { + return this.definition == null ? null : this.definition.getValue(); + } + + /** + * @param value Permanent link to the MessageDefinition for this message. + */ + public MessageHeader setDefinition(String value) { + if (Utilities.noString(value)) + this.definition = null; + else { + if (this.definition == null) + this.definition = new UriType(); + this.definition.setValue(value); + } + return this; + } + protected void listChildren(List children) { super.listChildren(children); children.add(new Property("event", "Coding", "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\".", 0, 1, event)); @@ -1864,6 +1920,7 @@ public class MessageHeader extends DomainResource { children.add(new Property("reason", "CodeableConcept", "Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.", 0, 1, reason)); children.add(new Property("response", "", "Information about the message that this message is a response to. Only present if this message is a response.", 0, 1, response)); children.add(new Property("focus", "Reference(Any)", "The actual data of the message - a reference to the root/focus class of the event.", 0, java.lang.Integer.MAX_VALUE, focus)); + children.add(new Property("definition", "uri", "Permanent link to the MessageDefinition for this message.", 0, 1, definition)); } @Override @@ -1880,6 +1937,7 @@ public class MessageHeader extends DomainResource { case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.", 0, 1, reason); case -340323263: /*response*/ return new Property("response", "", "Information about the message that this message is a response to. Only present if this message is a response.", 0, 1, response); case 97604824: /*focus*/ return new Property("focus", "Reference(Any)", "The actual data of the message - a reference to the root/focus class of the event.", 0, java.lang.Integer.MAX_VALUE, focus); + case -1014418093: /*definition*/ return new Property("definition", "uri", "Permanent link to the MessageDefinition for this message.", 0, 1, definition); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -1899,6 +1957,7 @@ public class MessageHeader extends DomainResource { case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // MessageHeaderResponseComponent case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // Reference + case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // UriType default: return super.getProperty(hash, name, checkValid); } @@ -1940,6 +1999,9 @@ public class MessageHeader extends DomainResource { case 97604824: // focus this.getFocus().add(castToReference(value)); // Reference return value; + case -1014418093: // definition + this.definition = castToUri(value); // UriType + return value; default: return super.setProperty(hash, name, value); } @@ -1969,6 +2031,8 @@ public class MessageHeader extends DomainResource { this.response = (MessageHeaderResponseComponent) value; // MessageHeaderResponseComponent } else if (name.equals("focus")) { this.getFocus().add(castToReference(value)); + } else if (name.equals("definition")) { + this.definition = castToUri(value); // UriType } else return super.setProperty(name, value); return value; @@ -1988,6 +2052,7 @@ public class MessageHeader extends DomainResource { case -934964668: return getReason(); case -340323263: return getResponse(); case 97604824: return addFocus(); + case -1014418093: return getDefinitionElement(); default: return super.makeProperty(hash, name); } @@ -2007,6 +2072,7 @@ public class MessageHeader extends DomainResource { case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; case -340323263: /*response*/ return new String[] {}; case 97604824: /*focus*/ return new String[] {"Reference"}; + case -1014418093: /*definition*/ return new String[] {"uri"}; default: return super.getTypesForProperty(hash, name); } @@ -2055,6 +2121,9 @@ public class MessageHeader extends DomainResource { else if (name.equals("focus")) { return addFocus(); } + else if (name.equals("definition")) { + throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.definition"); + } else return super.addChild(name); } @@ -2086,6 +2155,7 @@ public class MessageHeader extends DomainResource { for (Reference i : focus) dst.focus.add(i.copy()); }; + dst.definition = definition == null ? null : definition.copy(); return dst; } @@ -2103,7 +2173,8 @@ public class MessageHeader extends DomainResource { return compareDeep(event, o.event, true) && compareDeep(destination, o.destination, true) && compareDeep(sender, o.sender, true) && compareDeep(timestamp, o.timestamp, true) && compareDeep(enterer, o.enterer, true) && compareDeep(author, o.author, true) && compareDeep(source, o.source, true) && compareDeep(responsible, o.responsible, true) && compareDeep(reason, o.reason, true) - && compareDeep(response, o.response, true) && compareDeep(focus, o.focus, true); + && compareDeep(response, o.response, true) && compareDeep(focus, o.focus, true) && compareDeep(definition, o.definition, true) + ; } @Override @@ -2113,12 +2184,14 @@ public class MessageHeader extends DomainResource { if (!(other instanceof MessageHeader)) return false; MessageHeader o = (MessageHeader) other; - return compareValues(timestamp, o.timestamp, true); + return compareValues(timestamp, o.timestamp, true) && compareValues(definition, o.definition, true) + ; } public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(event, destination, sender - , timestamp, enterer, author, source, responsible, reason, response, focus); + , timestamp, enterer, author, source, responsible, reason, response, focus, definition + ); } @Override diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Meta.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Meta.java index f2f200ecd71..41024408dd0 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Meta.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Meta.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MetadataResource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MetadataResource.java index 36440331592..6437fe53da1 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MetadataResource.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/MetadataResource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Money.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Money.java index 805bfe624cb..09de6a772df 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Money.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Money.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NamingSystem.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NamingSystem.java index 0dbb690fd1c..c76da63a29f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NamingSystem.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NamingSystem.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Narrative.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Narrative.java index 9d365b335e3..9a275de7c79 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Narrative.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Narrative.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; import org.hl7.fhir.utilities.xhtml.XhtmlNode; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NutritionOrder.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NutritionOrder.java index 85d11058ad5..7dfe446d8e3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NutritionOrder.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/NutritionOrder.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Observation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Observation.java index 2db872fba79..37428f8aacc 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Observation.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Observation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1099,7 +1099,7 @@ public class Observation extends DomainResource { /** * The information determined as a result of making the observation, if the information has a simple value. */ - @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, Range.class, Ratio.class, SampledData.class, Attachment.class, TimeType.class, DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Ratio.class, SampledData.class, Attachment.class, TimeType.class, DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Actual component result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) protected Type value; @@ -1213,6 +1213,32 @@ public class Observation extends DomainResource { return this.value instanceof StringType; } + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public BooleanType getValueBooleanType() throws FHIRException { + if (!(this.value instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (BooleanType) this.value; + } + + public boolean hasValueBooleanType() { + return this.value instanceof BooleanType; + } + + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public IntegerType getValueIntegerType() throws FHIRException { + if (!(this.value instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IntegerType) this.value; + } + + public boolean hasValueIntegerType() { + return this.value instanceof IntegerType; + } + /** * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) */ @@ -1420,7 +1446,7 @@ public class Observation extends DomainResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, 1, code)); - children.add(new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value)); + children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value)); children.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", 0, 1, dataAbsentReason)); children.add(new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", 0, 1, interpretation)); children.add(new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange)); @@ -1430,18 +1456,20 @@ public class Observation extends DomainResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, 1, code); - case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -1424603934: /*valueString*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 2030761548: /*valueRange*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 2030767386: /*valueRatio*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -962229101: /*valueSampledData*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -475566732: /*valueAttachment*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -765708322: /*valueTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 1047929900: /*valueDateTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1424603934: /*valueString*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 733421943: /*valueBoolean*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1668204915: /*valueInteger*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 2030761548: /*valueRange*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 2030767386: /*valueRatio*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -962229101: /*valueSampledData*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -475566732: /*valueAttachment*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -765708322: /*valueTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 1047929900: /*valueDateTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); case 1034315687: /*dataAbsentReason*/ return new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", 0, 1, dataAbsentReason); case -297950712: /*interpretation*/ return new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", 0, 1, interpretation); case -1912545102: /*referenceRange*/ return new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange); @@ -1521,7 +1549,7 @@ public class Observation extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 3059181: /*code*/ return new String[] {"CodeableConcept"}; - case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "Range", "Ratio", "SampledData", "Attachment", "time", "dateTime", "Period"}; + case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Ratio", "SampledData", "Attachment", "time", "dateTime", "Period"}; case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"}; case -297950712: /*interpretation*/ return new String[] {"CodeableConcept"}; case -1912545102: /*referenceRange*/ return new String[] {"@Observation.referenceRange"}; @@ -1548,6 +1576,14 @@ public class Observation extends DomainResource { this.value = new StringType(); return this.value; } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } else if (name.equals("valueRange")) { this.value = new Range(); return this.value; @@ -1710,7 +1746,7 @@ public class Observation extends DomainResource { /** * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself. */ - @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "effective", type = {DateTimeType.class, Period.class, Timing.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Clinically relevant time/time-period for observation", formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." ) protected Type effective; @@ -1736,7 +1772,7 @@ public class Observation extends DomainResource { /** * The information determined as a result of making the observation, if the information has a simple value. */ - @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, Range.class, Ratio.class, SampledData.class, Attachment.class, TimeType.class, DateTimeType.class, Period.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Ratio.class, SampledData.class, Attachment.class, TimeType.class, DateTimeType.class, Period.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Actual result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) protected Type value; @@ -2191,6 +2227,19 @@ public class Observation extends DomainResource { return this.effective instanceof Period; } + /** + * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) + */ + public Timing getEffectiveTiming() throws FHIRException { + if (!(this.effective instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.effective.getClass().getName()+" was encountered"); + return (Timing) this.effective; + } + + public boolean hasEffectiveTiming() { + return this.effective instanceof Timing; + } + public boolean hasEffective() { return this.effective != null && !this.effective.isEmpty(); } @@ -2374,6 +2423,19 @@ public class Observation extends DomainResource { return this.value instanceof BooleanType; } + /** + * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) + */ + public IntegerType getValueIntegerType() throws FHIRException { + if (!(this.value instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IntegerType) this.value; + } + + public boolean hasValueIntegerType() { + return this.value instanceof IntegerType; + } + /** * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) */ @@ -2873,10 +2935,10 @@ public class Observation extends DomainResource { children.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, 1, code)); children.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.", 0, 1, subject)); children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, 1, context)); - children.add(new Property("effective[x]", "dateTime|Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective)); + children.add(new Property("effective[x]", "dateTime|Period|Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective)); children.add(new Property("issued", "instant", "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", 0, 1, issued)); children.add(new Property("performer", "Reference(Practitioner|Organization|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer)); - children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value)); + children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value)); children.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, 1, dataAbsentReason)); children.add(new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", 0, 1, interpretation)); children.add(new Property("comment", "string", "May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.", 0, 1, comment)); @@ -2899,25 +2961,27 @@ public class Observation extends DomainResource { case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, 1, code); case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group|Device|Location)", "The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.", 0, 1, subject); case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, 1, context); - case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); - case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); - case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); - case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); + case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period|Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); + case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period|Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); + case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime|Period|Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); + case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "dateTime|Period|Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); + case -285872943: /*effectiveTiming*/ return new Property("effective[x]", "dateTime|Period|Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); case -1179159893: /*issued*/ return new Property("issued", "instant", "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", 0, 1, issued); case 481140686: /*performer*/ return new Property("performer", "Reference(Practitioner|Organization|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer); - case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -1424603934: /*valueString*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 733421943: /*valueBoolean*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 2030761548: /*valueRange*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 2030767386: /*valueRatio*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -962229101: /*valueSampledData*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -475566732: /*valueAttachment*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -765708322: /*valueTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case 1047929900: /*valueDateTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); - case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1424603934: /*valueString*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 733421943: /*valueBoolean*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1668204915: /*valueInteger*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 2030761548: /*valueRange*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 2030767386: /*valueRatio*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -962229101: /*valueSampledData*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -475566732: /*valueAttachment*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -765708322: /*valueTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case 1047929900: /*valueDateTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); + case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); case 1034315687: /*dataAbsentReason*/ return new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, 1, dataAbsentReason); case -297950712: /*interpretation*/ return new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", 0, 1, interpretation); case 950398559: /*comment*/ return new Property("comment", "string", "May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.", 0, 1, comment); @@ -3125,10 +3189,10 @@ public class Observation extends DomainResource { case 3059181: /*code*/ return new String[] {"CodeableConcept"}; case -1867885268: /*subject*/ return new String[] {"Reference"}; case 951530927: /*context*/ return new String[] {"Reference"}; - case -1468651097: /*effective*/ return new String[] {"dateTime", "Period"}; + case -1468651097: /*effective*/ return new String[] {"dateTime", "Period", "Timing"}; case -1179159893: /*issued*/ return new String[] {"instant"}; case 481140686: /*performer*/ return new String[] {"Reference"}; - case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "Range", "Ratio", "SampledData", "Attachment", "time", "dateTime", "Period"}; + case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Ratio", "SampledData", "Attachment", "time", "dateTime", "Period"}; case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"}; case -297950712: /*interpretation*/ return new String[] {"CodeableConcept"}; case 950398559: /*comment*/ return new String[] {"string"}; @@ -3178,6 +3242,10 @@ public class Observation extends DomainResource { this.effective = new Period(); return this.effective; } + else if (name.equals("effectiveTiming")) { + this.effective = new Timing(); + return this.effective; + } else if (name.equals("issued")) { throw new FHIRException("Cannot call addChild on a primitive type Observation.issued"); } @@ -3200,6 +3268,10 @@ public class Observation extends DomainResource { this.value = new BooleanType(); return this.value; } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } else if (name.equals("valueRange")) { this.value = new Range(); return this.value; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationDefinition.java index 27e5173a688..c2e34520418 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1620,7 +1620,7 @@ public class OperationDefinition extends MetadataResource { * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context). */ @Child(name = "type", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Invole at the type level?", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context)." ) + @Description(shortDefinition="Invoke at the type level?", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context)." ) protected BooleanType type; /** @@ -3369,17 +3369,17 @@ public class OperationDefinition extends MetadataResource { /** * Search parameter: type *

- * Description: Invole at the type level?
+ * Description: Invoke at the type level?
* Type: token
* Path: OperationDefinition.type
*

*/ - @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invole at the type level?", type="token" ) + @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at the type level?", type="token" ) public static final String SP_TYPE = "type"; /** * Fluent Client search parameter constant for type *

- * Description: Invole at the type level?
+ * Description: Invoke at the type level?
* Type: token
* Path: OperationDefinition.type
*

diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationOutcome.java index 7cadd653a93..6f1d967ec2d 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationOutcome.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/OperationOutcome.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Organization.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Organization.java index 2c958952f50..40bd1265bc1 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Organization.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Organization.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ParameterDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ParameterDefinition.java index e5137cd337a..42ca7aad412 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ParameterDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ParameterDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Parameters.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Parameters.java index a8bb5dbeba5..0026c8a027d 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Parameters.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Parameters.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Patient.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Patient.java index 9a08873af70..9e4857d763e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Patient.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Patient.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentNotice.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentNotice.java index 24792100fb7..45518e2fb53 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentNotice.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentNotice.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentReconciliation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentReconciliation.java index 17211e88ee1..88edb85f658 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentReconciliation.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PaymentReconciliation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -731,10 +731,10 @@ public class PaymentReconciliation extends DomainResource { /** * The note purpose: Print/Display. */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") - protected CodeableConcept type; + protected Enumeration type; /** * The note text. @@ -743,7 +743,7 @@ public class PaymentReconciliation extends DomainResource { @Description(shortDefinition="Comment on the processing", formalDefinition="The note text." ) protected StringType text; - private static final long serialVersionUID = 874830709L; + private static final long serialVersionUID = 529250161L; /** * Constructor @@ -753,29 +753,54 @@ public class PaymentReconciliation extends DomainResource { } /** - * @return {@link #type} (The note purpose: Print/Display.) + * @return {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public CodeableConcept getType() { + public Enumeration getTypeElement() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create NotesComponent.type"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc + this.type = new Enumeration(new NoteTypeEnumFactory()); // bb return this.type; } + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + public boolean hasType() { return this.type != null && !this.type.isEmpty(); } /** - * @param value {@link #type} (The note purpose: Print/Display.) + * @param value {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public NotesComponent setType(CodeableConcept value) { + public NotesComponent setTypeElement(Enumeration value) { this.type = value; return this; } + /** + * @return The note purpose: Print/Display. + */ + public NoteType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The note purpose: Print/Display. + */ + public NotesComponent setType(NoteType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new NoteTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + /** * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ @@ -827,14 +852,14 @@ public class PaymentReconciliation extends DomainResource { protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type)); + children.add(new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type)); children.add(new Property("text", "string", "The note text.", 0, 1, text)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type); + case 3575610: /*type*/ return new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type); case 3556653: /*text*/ return new Property("text", "string", "The note text.", 0, 1, text); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -844,7 +869,7 @@ public class PaymentReconciliation extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType default: return super.getProperty(hash, name, checkValid); } @@ -855,7 +880,8 @@ public class PaymentReconciliation extends DomainResource { public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3575610: // type - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration return value; case 3556653: // text this.text = castToString(value); // StringType @@ -868,7 +894,8 @@ public class PaymentReconciliation extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) { - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration } else if (name.equals("text")) { this.text = castToString(value); // StringType } else @@ -879,7 +906,7 @@ public class PaymentReconciliation extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case 3575610: return getType(); + case 3575610: return getTypeElement(); case 3556653: return getTextElement(); default: return super.makeProperty(hash, name); } @@ -889,7 +916,7 @@ public class PaymentReconciliation extends DomainResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"code"}; case 3556653: /*text*/ return new String[] {"string"}; default: return super.getTypesForProperty(hash, name); } @@ -899,8 +926,7 @@ public class PaymentReconciliation extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.type"); } else if (name.equals("text")) { throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.text"); @@ -934,7 +960,7 @@ public class PaymentReconciliation extends DomainResource { if (!(other instanceof NotesComponent)) return false; NotesComponent o = (NotesComponent) other; - return compareValues(text, o.text, true); + return compareValues(type, o.type, true) && compareValues(text, o.text, true); } public boolean isEmpty() { @@ -1004,10 +1030,10 @@ public class PaymentReconciliation extends DomainResource { /** * Transaction status: error, complete. */ - @Child(name = "outcome", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Child(name = "outcome", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="complete | error | partial", formalDefinition="Transaction status: error, complete." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") - protected CodeableConcept outcome; + protected Enumeration outcome; /** * A description of the status of the adjudication. @@ -1069,7 +1095,7 @@ public class PaymentReconciliation extends DomainResource { @Description(shortDefinition="Processing comments", formalDefinition="Suite of notes." ) protected List processNote; - private static final long serialVersionUID = -665475468L; + private static final long serialVersionUID = -1170502014L; /** * Constructor @@ -1342,29 +1368,54 @@ public class PaymentReconciliation extends DomainResource { } /** - * @return {@link #outcome} (Transaction status: error, complete.) + * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public CodeableConcept getOutcome() { + public Enumeration getOutcomeElement() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create PaymentReconciliation.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); // bb return this.outcome; } + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (Transaction status: error, complete.) + * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public PaymentReconciliation setOutcome(CodeableConcept value) { + public PaymentReconciliation setOutcomeElement(Enumeration value) { this.outcome = value; return this; } + /** + * @return Transaction status: error, complete. + */ + public RemittanceOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete. + */ + public PaymentReconciliation setOutcome(RemittanceOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new RemittanceOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + /** * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value */ @@ -1664,7 +1715,7 @@ public class PaymentReconciliation extends DomainResource { children.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created)); children.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization)); children.add(new Property("request", "Reference(ProcessRequest)", "Original request resource reference.", 0, 1, request)); - children.add(new Property("outcome", "CodeableConcept", "Transaction status: error, complete.", 0, 1, outcome)); + children.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, 1, outcome)); children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); children.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); children.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization)); @@ -1683,7 +1734,7 @@ public class PaymentReconciliation extends DomainResource { case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created); case 1178922291: /*organization*/ return new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization); case 1095692943: /*request*/ return new Property("request", "Reference(ProcessRequest)", "Original request resource reference.", 0, 1, request); - case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Transaction status: error, complete.", 0, 1, outcome); + case -1106507950: /*outcome*/ return new Property("outcome", "code", "Transaction status: error, complete.", 0, 1, outcome); case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); case 1601527200: /*requestProvider*/ return new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider); case 599053666: /*requestOrganization*/ return new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization); @@ -1705,7 +1756,7 @@ public class PaymentReconciliation extends DomainResource { case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference - case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept + case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference @@ -1741,7 +1792,8 @@ public class PaymentReconciliation extends DomainResource { this.request = castToReference(value); // Reference return value; case -1106507950: // outcome - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration return value; case 583380919: // disposition this.disposition = castToString(value); // StringType @@ -1785,7 +1837,8 @@ public class PaymentReconciliation extends DomainResource { } else if (name.equals("request")) { this.request = castToReference(value); // Reference } else if (name.equals("outcome")) { - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration } else if (name.equals("disposition")) { this.disposition = castToString(value); // StringType } else if (name.equals("requestProvider")) { @@ -1814,7 +1867,7 @@ public class PaymentReconciliation extends DomainResource { case 1028554472: return getCreatedElement(); case 1178922291: return getOrganization(); case 1095692943: return getRequest(); - case -1106507950: return getOutcome(); + case -1106507950: return getOutcomeElement(); case 583380919: return getDispositionElement(); case 1601527200: return getRequestProvider(); case 599053666: return getRequestOrganization(); @@ -1836,7 +1889,7 @@ public class PaymentReconciliation extends DomainResource { case 1028554472: /*created*/ return new String[] {"dateTime"}; case 1178922291: /*organization*/ return new String[] {"Reference"}; case 1095692943: /*request*/ return new String[] {"Reference"}; - case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; + case -1106507950: /*outcome*/ return new String[] {"code"}; case 583380919: /*disposition*/ return new String[] {"string"}; case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; case 599053666: /*requestOrganization*/ return new String[] {"Reference"}; @@ -1873,8 +1926,7 @@ public class PaymentReconciliation extends DomainResource { return this.request; } else if (name.equals("outcome")) { - this.outcome = new CodeableConcept(); - return this.outcome; + throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome"); } else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition"); @@ -1968,8 +2020,8 @@ public class PaymentReconciliation extends DomainResource { if (!(other instanceof PaymentReconciliation)) return false; PaymentReconciliation o = (PaymentReconciliation) other; - return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) - ; + return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) + && compareValues(disposition, o.disposition, true); } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Period.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Period.java index d309bb5766b..91d4409ae56 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Period.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Period.java @@ -1,320 +1,320 @@ -package org.hl7.fhir.r4.model; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 -import java.util.Date; -import java.util.List; - -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.ICompositeType; - -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.model.api.annotation.*; -/** - * A time period defined by a start and end date and optionally time. - */ -@DatatypeDef(name="Period") -public class Period extends Type implements ICompositeType { - - /** - * The start of the period. The boundary is inclusive. - */ - @Child(name = "start", type = {DateTimeType.class}, order=0, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Starting time with inclusive boundary", formalDefinition="The start of the period. The boundary is inclusive." ) - protected DateTimeType start; - - /** - * The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. - */ - @Child(name = "end", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="End time with inclusive boundary, if not ongoing", formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." ) - protected DateTimeType end; - - private static final long serialVersionUID = 649791751L; - - /** - * Constructor - */ - public Period() { - super(); - } - - /** - * @return {@link #start} (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public DateTimeType getStartElement() { - if (this.start == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Period.start"); - else if (Configuration.doAutoCreate()) - this.start = new DateTimeType(); // bb - return this.start; - } - - public boolean hasStartElement() { - return this.start != null && !this.start.isEmpty(); - } - - public boolean hasStart() { - return this.start != null && !this.start.isEmpty(); - } - - /** - * @param value {@link #start} (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public Period setStartElement(DateTimeType value) { - this.start = value; - return this; - } - - /** - * @return The start of the period. The boundary is inclusive. - */ - public Date getStart() { - return this.start == null ? null : this.start.getValue(); - } - - /** - * @param value The start of the period. The boundary is inclusive. - */ - public Period setStart(Date value) { - if (value == null) - this.start = null; - else { - if (this.start == null) - this.start = new DateTimeType(); - this.start.setValue(value); - } - return this; - } - - /** - * @return {@link #end} (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value - */ - public DateTimeType getEndElement() { - if (this.end == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Period.end"); - else if (Configuration.doAutoCreate()) - this.end = new DateTimeType(); // bb - return this.end; - } - - public boolean hasEndElement() { - return this.end != null && !this.end.isEmpty(); - } - - public boolean hasEnd() { - return this.end != null && !this.end.isEmpty(); - } - - /** - * @param value {@link #end} (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value - */ - public Period setEndElement(DateTimeType value) { - this.end = value; - return this; - } - - /** - * @return The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. - */ - public Date getEnd() { - return this.end == null ? null : this.end.getValue(); - } - - /** - * @param value The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. - */ - public Period setEnd(Date value) { - if (value == null) - this.end = null; - else { - if (this.end == null) - this.end = new DateTimeType(); - this.end.setValue(value); - } - return this; - } - - /** - * Sets the value for start () - * - *

- * Definition: - * The start of the period. The boundary is inclusive. - *

- */ - public Period setStart( Date theDate, TemporalPrecisionEnum thePrecision) { - start = new DateTimeType(theDate, thePrecision); - return this; - } - - /** - * Sets the value for end () - * - *

- * Definition: - * The end of the period. The boundary is inclusive. - *

- */ - public Period setEnd( Date theDate, TemporalPrecisionEnum thePrecision) { - end = new DateTimeType(theDate, thePrecision); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("start", "dateTime", "The start of the period. The boundary is inclusive.", 0, 1, start)); - children.add(new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, 1, end)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 109757538: /*start*/ return new Property("start", "dateTime", "The start of the period. The boundary is inclusive.", 0, 1, start); - case 100571: /*end*/ return new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, 1, end); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DateTimeType - case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // DateTimeType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 109757538: // start - this.start = castToDateTime(value); // DateTimeType - return value; - case 100571: // end - this.end = castToDateTime(value); // DateTimeType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("start")) { - this.start = castToDateTime(value); // DateTimeType - } else if (name.equals("end")) { - this.end = castToDateTime(value); // DateTimeType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 109757538: return getStartElement(); - case 100571: return getEndElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 109757538: /*start*/ return new String[] {"dateTime"}; - case 100571: /*end*/ return new String[] {"dateTime"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("start")) { - throw new FHIRException("Cannot call addChild on a primitive type Period.start"); - } - else if (name.equals("end")) { - throw new FHIRException("Cannot call addChild on a primitive type Period.end"); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "Period"; - - } - - public Period copy() { - Period dst = new Period(); - copyValues(dst); - dst.start = start == null ? null : start.copy(); - dst.end = end == null ? null : end.copy(); - return dst; - } - - protected Period typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Period)) - return false; - Period o = (Period) other; - return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Period)) - return false; - Period o = (Period) other; - return compareValues(start, o.start, true) && compareValues(end, o.end, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end); - } - - -} - +package org.hl7.fhir.r4.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.ICompositeType; + +import java.util.Date; +import java.util.List; +/** + * A time period defined by a start and end date and optionally time. + */ +@DatatypeDef(name="Period") +public class Period extends Type implements ICompositeType { + + private static final long serialVersionUID = 649791751L; + /** + * The start of the period. The boundary is inclusive. + */ + @Child(name = "start", type = {DateTimeType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Starting time with inclusive boundary", formalDefinition="The start of the period. The boundary is inclusive." ) + protected DateTimeType start; + /** + * The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. + */ + @Child(name = "end", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="End time with inclusive boundary, if not ongoing", formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." ) + protected DateTimeType end; + + /** + * Constructor + */ + public Period() { + super(); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Period.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Period.end"); + } + else + return super.addChild(name); + } + + public Period copy() { + Period dst = new Period(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Period)) + return false; + Period o = (Period) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Period)) + return false; + Period o = (Period) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true); + } + + public String fhirType() { + return "Period"; + + } + + /** + * @return The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. + */ + public Period setEnd(Date value) { + if (value == null) + this.end = null; + else { + if (this.end == null) + this.end = new DateTimeType(); + this.end.setValue(value); + } + return this; + } + + /** + * @return {@link #end} (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public DateTimeType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Period.end"); + else if (Configuration.doAutoCreate()) + this.end = new DateTimeType(); // bb + return this.end; + } + + /** + * @param value {@link #end} (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public Period setEndElement(DateTimeType value) { + this.end = value; + return this; + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 109757538: /*start*/ return new Property("start", "dateTime", "The start of the period. The boundary is inclusive.", 0, 1, start); + case 100571: /*end*/ return new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, 1, end); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DateTimeType + case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // DateTimeType + default: return super.getProperty(hash, name, checkValid); + } + + } + + /** + * @return The start of the period. The boundary is inclusive. + */ + public Date getStart() { + return this.start == null ? null : this.start.getValue(); + } + + /** + * @param value The start of the period. The boundary is inclusive. + */ + public Period setStart(Date value) { + if (value == null) + this.start = null; + else { + if (this.start == null) + this.start = new DateTimeType(); + this.start.setValue(value); + } + return this; + } + + /** + * @return {@link #start} (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public DateTimeType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Period.start"); + else if (Configuration.doAutoCreate()) + this.start = new DateTimeType(); // bb + return this.start; + } + + /** + * @param value {@link #start} (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public Period setStartElement(DateTimeType value) { + this.start = value; + return this; + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109757538: /*start*/ return new String[] {"dateTime"}; + case 100571: /*end*/ return new String[] {"dateTime"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("start", "dateTime", "The start of the period. The boundary is inclusive.", 0, 1, start)); + children.add(new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, 1, end)); + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109757538: return getStartElement(); + case 100571: return getEndElement(); + default: return super.makeProperty(hash, name); + } + + } + + /** + * Sets the value for end () + * + *

+ * Definition: + * The end of the period. The boundary is inclusive. + *

+ */ + public Period setEnd( Date theDate, TemporalPrecisionEnum thePrecision) { + end = new DateTimeType(theDate, thePrecision); + return this; + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 109757538: // start + this.start = castToDateTime(value); // DateTimeType + return value; + case 100571: // end + this.end = castToDateTime(value); // DateTimeType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) { + this.start = castToDateTime(value); // DateTimeType + } else if (name.equals("end")) { + this.end = castToDateTime(value); // DateTimeType + } else + return super.setProperty(name, value); + return value; + } + + /** + * Sets the value for start () + * + *

+ * Definition: + * The start of the period. The boundary is inclusive. + *

+ */ + public Period setStart( Date theDate, TemporalPrecisionEnum thePrecision) { + start = new DateTimeType(theDate, thePrecision); + return this; + } + + protected Period typedCopy() { + return copy(); + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Person.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Person.java index 23c6c8ca635..92523c04204 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Person.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Person.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PlanDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PlanDefinition.java index 7788ab94eb4..72ebbbbabe2 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PlanDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PlanDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1860,11 +1860,11 @@ public class PlanDefinition extends MetadataResource { @Block() public static class PlanDefinitionActionComponent extends BackboneElement implements IBaseBackboneElement { /** - * A user-visible label for the action. + * A user-visible prefix for the action. */ - @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="User-visible label for the action (e.g. 1. or A.)", formalDefinition="A user-visible label for the action." ) - protected StringType label; + @Child(name = "prefix", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="User-visible prefix for the action (e.g. 1. or A.)", formalDefinition="A user-visible prefix for the action." ) + protected StringType prefix; /** * The title of the action displayed to a user. @@ -2050,7 +2050,7 @@ public class PlanDefinition extends MetadataResource { @Description(shortDefinition="A sub-action", formalDefinition="Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition." ) protected List action; - private static final long serialVersionUID = -1404963512L; + private static final long serialVersionUID = 891308492L; /** * Constructor @@ -2060,50 +2060,50 @@ public class PlanDefinition extends MetadataResource { } /** - * @return {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + * @return {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value */ - public StringType getLabelElement() { - if (this.label == null) + public StringType getPrefixElement() { + if (this.prefix == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PlanDefinitionActionComponent.label"); + throw new Error("Attempt to auto-create PlanDefinitionActionComponent.prefix"); else if (Configuration.doAutoCreate()) - this.label = new StringType(); // bb - return this.label; + this.prefix = new StringType(); // bb + return this.prefix; } - public boolean hasLabelElement() { - return this.label != null && !this.label.isEmpty(); + public boolean hasPrefixElement() { + return this.prefix != null && !this.prefix.isEmpty(); } - public boolean hasLabel() { - return this.label != null && !this.label.isEmpty(); + public boolean hasPrefix() { + return this.prefix != null && !this.prefix.isEmpty(); } /** - * @param value {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + * @param value {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value */ - public PlanDefinitionActionComponent setLabelElement(StringType value) { - this.label = value; + public PlanDefinitionActionComponent setPrefixElement(StringType value) { + this.prefix = value; return this; } /** - * @return A user-visible label for the action. + * @return A user-visible prefix for the action. */ - public String getLabel() { - return this.label == null ? null : this.label.getValue(); + public String getPrefix() { + return this.prefix == null ? null : this.prefix.getValue(); } /** - * @param value A user-visible label for the action. + * @param value A user-visible prefix for the action. */ - public PlanDefinitionActionComponent setLabel(String value) { + public PlanDefinitionActionComponent setPrefix(String value) { if (Utilities.noString(value)) - this.label = null; + this.prefix = null; else { - if (this.label == null) - this.label = new StringType(); - this.label.setValue(value); + if (this.prefix == null) + this.prefix = new StringType(); + this.prefix.setValue(value); } return this; } @@ -3337,7 +3337,7 @@ public class PlanDefinition extends MetadataResource { protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("label", "string", "A user-visible label for the action.", 0, 1, label)); + children.add(new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix)); children.add(new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title)); children.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description)); children.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, 1, textEquivalent)); @@ -3367,7 +3367,7 @@ public class PlanDefinition extends MetadataResource { @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 102727412: /*label*/ return new Property("label", "string", "A user-visible label for the action.", 0, 1, label); + case -980110702: /*prefix*/ return new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix); case 110371416: /*title*/ return new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title); case -1724546052: /*description*/ return new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description); case -900391049: /*textEquivalent*/ return new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, 1, textEquivalent); @@ -3406,7 +3406,7 @@ public class PlanDefinition extends MetadataResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType + case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType @@ -3439,8 +3439,8 @@ public class PlanDefinition extends MetadataResource { @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { - case 102727412: // label - this.label = castToString(value); // StringType + case -980110702: // prefix + this.prefix = castToString(value); // StringType return value; case 110371416: // title this.title = castToString(value); // StringType @@ -3526,8 +3526,8 @@ public class PlanDefinition extends MetadataResource { @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("label")) { - this.label = castToString(value); // StringType + if (name.equals("prefix")) { + this.prefix = castToString(value); // StringType } else if (name.equals("title")) { this.title = castToString(value); // StringType } else if (name.equals("description")) { @@ -3589,7 +3589,7 @@ public class PlanDefinition extends MetadataResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case 102727412: return getLabelElement(); + case -980110702: return getPrefixElement(); case 110371416: return getTitleElement(); case -1724546052: return getDescriptionElement(); case -900391049: return getTextEquivalentElement(); @@ -3623,7 +3623,7 @@ public class PlanDefinition extends MetadataResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { - case 102727412: /*label*/ return new String[] {"string"}; + case -980110702: /*prefix*/ return new String[] {"string"}; case 110371416: /*title*/ return new String[] {"string"}; case -1724546052: /*description*/ return new String[] {"string"}; case -900391049: /*textEquivalent*/ return new String[] {"string"}; @@ -3655,8 +3655,8 @@ public class PlanDefinition extends MetadataResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("label")) { - throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.label"); + if (name.equals("prefix")) { + throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.prefix"); } else if (name.equals("title")) { throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.title"); @@ -3757,7 +3757,7 @@ public class PlanDefinition extends MetadataResource { public PlanDefinitionActionComponent copy() { PlanDefinitionActionComponent dst = new PlanDefinitionActionComponent(); copyValues(dst); - dst.label = label == null ? null : label.copy(); + dst.prefix = prefix == null ? null : prefix.copy(); dst.title = title == null ? null : title.copy(); dst.description = description == null ? null : description.copy(); dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); @@ -3840,7 +3840,7 @@ public class PlanDefinition extends MetadataResource { if (!(other instanceof PlanDefinitionActionComponent)) return false; PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other; - return compareDeep(label, o.label, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) + return compareDeep(prefix, o.prefix, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true) && compareDeep(documentation, o.documentation, true) && compareDeep(goalId, o.goalId, true) && compareDeep(triggerDefinition, o.triggerDefinition, true) && compareDeep(condition, o.condition, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true) @@ -3859,7 +3859,7 @@ public class PlanDefinition extends MetadataResource { if (!(other instanceof PlanDefinitionActionComponent)) return false; PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other; - return compareValues(label, o.label, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) + return compareValues(prefix, o.prefix, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(goalId, o.goalId, true) && compareValues(groupingBehavior, o.groupingBehavior, true) && compareValues(selectionBehavior, o.selectionBehavior, true) && compareValues(requiredBehavior, o.requiredBehavior, true) && compareValues(precheckBehavior, o.precheckBehavior, true) && compareValues(cardinalityBehavior, o.cardinalityBehavior, true) @@ -3867,7 +3867,7 @@ public class PlanDefinition extends MetadataResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, title, description + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(prefix, title, description , textEquivalent, code, reason, documentation, goalId, triggerDefinition, condition , input, output, relatedAction, timing, participant, type, groupingBehavior, selectionBehavior , requiredBehavior, precheckBehavior, cardinalityBehavior, definition, transform, dynamicValue diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Practitioner.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Practitioner.java index 1e580a7ad9d..0972ecd709e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Practitioner.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Practitioner.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PractitionerRole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PractitionerRole.java index d963e4465c0..bcdf88c1df8 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PractitionerRole.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/PractitionerRole.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Procedure.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Procedure.java index 2be5bfd581a..83dcea8ac77 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Procedure.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Procedure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcedureRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcedureRequest.java index 859f5cc60aa..858b8b74d1a 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcedureRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcedureRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -957,15 +957,15 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use * An explanation or justification for why this procedure is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation. */ @Child(name = "reasonCode", type = {CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this procedure is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation." ) + @Description(shortDefinition="Explanation/Justification for procedure or service", formalDefinition="An explanation or justification for why this procedure is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-reason") protected List reasonCode; /** * Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation. */ - @Child(name = "reasonReference", type = {Condition.class, Observation.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Explanation/Justification for test", formalDefinition="Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation." ) + @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Explanation/Justification for procedure or service", formalDefinition="Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation." ) protected List reasonReference; /** * The actual objects that are the target of the reference (Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation.) @@ -2412,7 +2412,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use children.add(new Property("performerType", "CodeableConcept", "Desired type of performer for doing the requested procedure.", 0, 1, performerType)); children.add(new Property("performer", "Reference(Practitioner|Organization|Patient|Device|RelatedPerson|HealthcareService)", "The desired perfomer for doing the requested procedure. For example, the surgeon, dermatopathologist, endoscopist, etc.", 0, 1, performer)); children.add(new Property("reasonCode", "CodeableConcept", "An explanation or justification for why this procedure is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); - children.add(new Property("reasonReference", "Reference(Condition|Observation)", "Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); + children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); children.add(new Property("supportingInfo", "Reference(Any)", "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as \"ask at order entry questions (AOEs)\". This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", 0, java.lang.Integer.MAX_VALUE, supportingInfo)); children.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the laboratory procedure will use.", 0, java.lang.Integer.MAX_VALUE, specimen)); children.add(new Property("bodySite", "CodeableConcept", "Anatomic location where the procedure should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite)); @@ -2451,7 +2451,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case -901444568: /*performerType*/ return new Property("performerType", "CodeableConcept", "Desired type of performer for doing the requested procedure.", 0, 1, performerType); case 481140686: /*performer*/ return new Property("performer", "Reference(Practitioner|Organization|Patient|Device|RelatedPerson|HealthcareService)", "The desired perfomer for doing the requested procedure. For example, the surgeon, dermatopathologist, endoscopist, etc.", 0, 1, performer); case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "An explanation or justification for why this procedure is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reasonCode); - case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation)", "Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reasonReference); + case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource that provides a justification for why this procedure is being requested. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reasonReference); case 1922406657: /*supportingInfo*/ return new Property("supportingInfo", "Reference(Any)", "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as \"ask at order entry questions (AOEs)\". This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", 0, java.lang.Integer.MAX_VALUE, supportingInfo); case -2132868344: /*specimen*/ return new Property("specimen", "Reference(Specimen)", "One or more specimens that the laboratory procedure will use.", 0, java.lang.Integer.MAX_VALUE, specimen); case 1702620169: /*bodySite*/ return new Property("bodySite", "CodeableConcept", "Anatomic location where the procedure should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessRequest.java index 0247ce8221f..b93ea1ef7c5 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessResponse.java index a07bbf01666..20fedfb1463 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProcessResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -173,15 +173,123 @@ public class ProcessResponse extends DomainResource { } } + public enum ProcessingOutcome { + /** + * The requested processing has completed. + */ + COMPLETE, + /** + * The requested processing has been suspended. + */ + PENDED, + /** + * The requested processing has terminated with some errors being found. + */ + ERROR, + /** + * added to help the parsers with the generic types + */ + NULL; + public static ProcessingOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("pended".equals(codeString)) + return PENDED; + if ("error".equals(codeString)) + return ERROR; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown ProcessingOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PENDED: return "pended"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPLETE: return "http://hl7.org/fhir/processoutcomecodes"; + case PENDED: return "http://hl7.org/fhir/processoutcomecodes"; + case ERROR: return "http://hl7.org/fhir/processoutcomecodes"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The requested processing has completed."; + case PENDED: return "The requested processing has been suspended."; + case ERROR: return "The requested processing has terminated with some errors being found."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PENDED: return "Pended"; + case ERROR: return "Error"; + default: return "?"; + } + } + } + + public static class ProcessingOutcomeEnumFactory implements EnumFactory { + public ProcessingOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return ProcessingOutcome.COMPLETE; + if ("pended".equals(codeString)) + return ProcessingOutcome.PENDED; + if ("error".equals(codeString)) + return ProcessingOutcome.ERROR; + throw new IllegalArgumentException("Unknown ProcessingOutcome code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return new Enumeration(this, ProcessingOutcome.COMPLETE); + if ("pended".equals(codeString)) + return new Enumeration(this, ProcessingOutcome.PENDED); + if ("error".equals(codeString)) + return new Enumeration(this, ProcessingOutcome.ERROR); + throw new FHIRException("Unknown ProcessingOutcome code '"+codeString+"'"); + } + public String toCode(ProcessingOutcome code) { + if (code == ProcessingOutcome.COMPLETE) + return "complete"; + if (code == ProcessingOutcome.PENDED) + return "pended"; + if (code == ProcessingOutcome.ERROR) + return "error"; + return "?"; + } + public String toSystem(ProcessingOutcome code) { + return code.getSystem(); + } + } + @Block() public static class ProcessResponseProcessNoteComponent extends BackboneElement implements IBaseBackboneElement { /** * The note purpose: Print/Display. */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") - protected CodeableConcept type; + protected Enumeration type; /** * The note text. @@ -190,7 +298,7 @@ public class ProcessResponse extends DomainResource { @Description(shortDefinition="Comment on the processing", formalDefinition="The note text." ) protected StringType text; - private static final long serialVersionUID = 874830709L; + private static final long serialVersionUID = 529250161L; /** * Constructor @@ -200,29 +308,54 @@ public class ProcessResponse extends DomainResource { } /** - * @return {@link #type} (The note purpose: Print/Display.) + * @return {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public CodeableConcept getType() { + public Enumeration getTypeElement() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessResponseProcessNoteComponent.type"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc + this.type = new Enumeration(new NoteTypeEnumFactory()); // bb return this.type; } + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + public boolean hasType() { return this.type != null && !this.type.isEmpty(); } /** - * @param value {@link #type} (The note purpose: Print/Display.) + * @param value {@link #type} (The note purpose: Print/Display.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public ProcessResponseProcessNoteComponent setType(CodeableConcept value) { + public ProcessResponseProcessNoteComponent setTypeElement(Enumeration value) { this.type = value; return this; } + /** + * @return The note purpose: Print/Display. + */ + public NoteType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The note purpose: Print/Display. + */ + public ProcessResponseProcessNoteComponent setType(NoteType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new NoteTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + /** * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ @@ -274,14 +407,14 @@ public class ProcessResponse extends DomainResource { protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type)); + children.add(new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type)); children.add(new Property("text", "string", "The note text.", 0, 1, text)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type); + case 3575610: /*type*/ return new Property("type", "code", "The note purpose: Print/Display.", 0, 1, type); case 3556653: /*text*/ return new Property("text", "string", "The note text.", 0, 1, text); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -291,7 +424,7 @@ public class ProcessResponse extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType default: return super.getProperty(hash, name, checkValid); } @@ -302,7 +435,8 @@ public class ProcessResponse extends DomainResource { public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3575610: // type - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration return value; case 3556653: // text this.text = castToString(value); // StringType @@ -315,7 +449,8 @@ public class ProcessResponse extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) { - this.type = castToCodeableConcept(value); // CodeableConcept + value = new NoteTypeEnumFactory().fromType(castToCode(value)); + this.type = (Enumeration) value; // Enumeration } else if (name.equals("text")) { this.text = castToString(value); // StringType } else @@ -326,7 +461,7 @@ public class ProcessResponse extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case 3575610: return getType(); + case 3575610: return getTypeElement(); case 3556653: return getTextElement(); default: return super.makeProperty(hash, name); } @@ -336,7 +471,7 @@ public class ProcessResponse extends DomainResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"code"}; case 3556653: /*text*/ return new String[] {"string"}; default: return super.getTypesForProperty(hash, name); } @@ -346,8 +481,7 @@ public class ProcessResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; + throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.type"); } else if (name.equals("text")) { throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.text"); @@ -381,7 +515,7 @@ public class ProcessResponse extends DomainResource { if (!(other instanceof ProcessResponseProcessNoteComponent)) return false; ProcessResponseProcessNoteComponent o = (ProcessResponseProcessNoteComponent) other; - return compareValues(text, o.text, true); + return compareValues(type, o.type, true) && compareValues(text, o.text, true); } public boolean isEmpty() { @@ -444,10 +578,10 @@ public class ProcessResponse extends DomainResource { /** * Transaction status: error, complete, held. */ - @Child(name = "outcome", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Child(name = "outcome", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Processing outcome", formalDefinition="Transaction status: error, complete, held." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/process-outcome") - protected CodeableConcept outcome; + protected Enumeration outcome; /** * A description of the status of the adjudication or processing. @@ -515,7 +649,7 @@ public class ProcessResponse extends DomainResource { protected List communicationRequestTarget; - private static final long serialVersionUID = -2058462467L; + private static final long serialVersionUID = -90462490L; /** * Constructor @@ -759,29 +893,54 @@ public class ProcessResponse extends DomainResource { } /** - * @return {@link #outcome} (Transaction status: error, complete, held.) + * @return {@link #outcome} (Transaction status: error, complete, held.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public CodeableConcept getOutcome() { + public Enumeration getOutcomeElement() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessResponse.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc + this.outcome = new Enumeration(new ProcessingOutcomeEnumFactory()); // bb return this.outcome; } + public boolean hasOutcomeElement() { + return this.outcome != null && !this.outcome.isEmpty(); + } + public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (Transaction status: error, complete, held.) + * @param value {@link #outcome} (Transaction status: error, complete, held.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ - public ProcessResponse setOutcome(CodeableConcept value) { + public ProcessResponse setOutcomeElement(Enumeration value) { this.outcome = value; return this; } + /** + * @return Transaction status: error, complete, held. + */ + public ProcessingOutcome getOutcome() { + return this.outcome == null ? null : this.outcome.getValue(); + } + + /** + * @param value Transaction status: error, complete, held. + */ + public ProcessResponse setOutcome(ProcessingOutcome value) { + if (value == null) + this.outcome = null; + else { + if (this.outcome == null) + this.outcome = new Enumeration(new ProcessingOutcomeEnumFactory()); + this.outcome.setValue(value); + } + return this; + } + /** * @return {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value */ @@ -1131,7 +1290,7 @@ public class ProcessResponse extends DomainResource { children.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created)); children.add(new Property("organization", "Reference(Organization)", "The organization who produced this adjudicated response.", 0, 1, organization)); children.add(new Property("request", "Reference(Any)", "Original request resource reference.", 0, 1, request)); - children.add(new Property("outcome", "CodeableConcept", "Transaction status: error, complete, held.", 0, 1, outcome)); + children.add(new Property("outcome", "code", "Transaction status: error, complete, held.", 0, 1, outcome)); children.add(new Property("disposition", "string", "A description of the status of the adjudication or processing.", 0, 1, disposition)); children.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); children.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization)); @@ -1149,7 +1308,7 @@ public class ProcessResponse extends DomainResource { case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created); case 1178922291: /*organization*/ return new Property("organization", "Reference(Organization)", "The organization who produced this adjudicated response.", 0, 1, organization); case 1095692943: /*request*/ return new Property("request", "Reference(Any)", "Original request resource reference.", 0, 1, request); - case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Transaction status: error, complete, held.", 0, 1, outcome); + case -1106507950: /*outcome*/ return new Property("outcome", "code", "Transaction status: error, complete, held.", 0, 1, outcome); case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication or processing.", 0, 1, disposition); case 1601527200: /*requestProvider*/ return new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider); case 599053666: /*requestOrganization*/ return new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization); @@ -1170,7 +1329,7 @@ public class ProcessResponse extends DomainResource { case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference - case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept + case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference @@ -1203,7 +1362,8 @@ public class ProcessResponse extends DomainResource { this.request = castToReference(value); // Reference return value; case -1106507950: // outcome - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new ProcessingOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration return value; case 583380919: // disposition this.disposition = castToString(value); // StringType @@ -1245,7 +1405,8 @@ public class ProcessResponse extends DomainResource { } else if (name.equals("request")) { this.request = castToReference(value); // Reference } else if (name.equals("outcome")) { - this.outcome = castToCodeableConcept(value); // CodeableConcept + value = new ProcessingOutcomeEnumFactory().fromType(castToCode(value)); + this.outcome = (Enumeration) value; // Enumeration } else if (name.equals("disposition")) { this.disposition = castToString(value); // StringType } else if (name.equals("requestProvider")) { @@ -1273,7 +1434,7 @@ public class ProcessResponse extends DomainResource { case 1028554472: return getCreatedElement(); case 1178922291: return getOrganization(); case 1095692943: return getRequest(); - case -1106507950: return getOutcome(); + case -1106507950: return getOutcomeElement(); case 583380919: return getDispositionElement(); case 1601527200: return getRequestProvider(); case 599053666: return getRequestOrganization(); @@ -1294,7 +1455,7 @@ public class ProcessResponse extends DomainResource { case 1028554472: /*created*/ return new String[] {"dateTime"}; case 1178922291: /*organization*/ return new String[] {"Reference"}; case 1095692943: /*request*/ return new String[] {"Reference"}; - case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; + case -1106507950: /*outcome*/ return new String[] {"code"}; case 583380919: /*disposition*/ return new String[] {"string"}; case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; case 599053666: /*requestOrganization*/ return new String[] {"Reference"}; @@ -1327,8 +1488,7 @@ public class ProcessResponse extends DomainResource { return this.request; } else if (name.equals("outcome")) { - this.outcome = new CodeableConcept(); - return this.outcome; + throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.outcome"); } else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.disposition"); @@ -1424,8 +1584,8 @@ public class ProcessResponse extends DomainResource { if (!(other instanceof ProcessResponse)) return false; ProcessResponse o = (ProcessResponse) other; - return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) - ; + return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) + && compareValues(disposition, o.disposition, true); } public boolean isEmpty() { diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Provenance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Provenance.java index 73077447463..decb0375323 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Provenance.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Provenance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -190,10 +190,18 @@ public class Provenance extends DomainResource { @Block() public static class ProvenanceAgentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The participation the agent had with respect to the activity. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How the agent participated", formalDefinition="The participation the agent had with respect to the activity." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type") + protected CodeableConcept type; + /** * The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity. */ - @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="What the agents role was", formalDefinition="The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-role-type") protected List role; @@ -201,26 +209,18 @@ public class Provenance extends DomainResource { /** * The individual, device or organization that participated in the event. */ - @Child(name = "who", type = {UriType.class, Practitioner.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Child(name = "who", type = {UriType.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=3, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Who participated", formalDefinition="The individual, device or organization that participated in the event." ) protected Type who; /** * The individual, device, or organization for whom the change was made. */ - @Child(name = "onBehalfOf", type = {UriType.class, Practitioner.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Child(name = "onBehalfOf", type = {UriType.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=4, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Who the agent is representing", formalDefinition="The individual, device, or organization for whom the change was made." ) protected Type onBehalfOf; - /** - * The type of relationship between agents. - */ - @Child(name = "relatedAgentType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Type of relationship between agents", formalDefinition="The type of relationship between agents." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-RoleLinkType") - protected CodeableConcept relatedAgentType; - - private static final long serialVersionUID = -1431948744L; + private static final long serialVersionUID = -764886968L; /** * Constructor @@ -237,6 +237,30 @@ public class Provenance extends DomainResource { this.who = who; } + /** + * @return {@link #type} (The participation the agent had with respect to the activity.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProvenanceAgentComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The participation the agent had with respect to the activity.) + */ + public ProvenanceAgentComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + /** * @return {@link #role} (The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.) */ @@ -380,51 +404,27 @@ public class Provenance extends DomainResource { return this; } - /** - * @return {@link #relatedAgentType} (The type of relationship between agents.) - */ - public CodeableConcept getRelatedAgentType() { - if (this.relatedAgentType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProvenanceAgentComponent.relatedAgentType"); - else if (Configuration.doAutoCreate()) - this.relatedAgentType = new CodeableConcept(); // cc - return this.relatedAgentType; - } - - public boolean hasRelatedAgentType() { - return this.relatedAgentType != null && !this.relatedAgentType.isEmpty(); - } - - /** - * @param value {@link #relatedAgentType} (The type of relationship between agents.) - */ - public ProvenanceAgentComponent setRelatedAgentType(CodeableConcept value) { - this.relatedAgentType = value; - return this; - } - protected void listChildren(List children) { super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "The participation the agent had with respect to the activity.", 0, 1, type)); children.add(new Property("role", "CodeableConcept", "The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.", 0, java.lang.Integer.MAX_VALUE, role)); - children.add(new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who)); - children.add(new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf)); - children.add(new Property("relatedAgentType", "CodeableConcept", "The type of relationship between agents.", 0, 1, relatedAgentType)); + children.add(new Property("who[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who)); + children.add(new Property("onBehalfOf[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The participation the agent had with respect to the activity.", 0, 1, type); case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.", 0, java.lang.Integer.MAX_VALUE, role); - case -788654078: /*who[x]*/ return new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); - case 117694: /*who*/ return new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); - case -788660018: /*whoUri*/ return new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); - case 1017243949: /*whoReference*/ return new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); - case 418120340: /*onBehalfOf[x]*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); - case -14402964: /*onBehalfOf*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); - case 418114400: /*onBehalfOfUri*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); - case -1136255425: /*onBehalfOfReference*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); - case 1228161012: /*relatedAgentType*/ return new Property("relatedAgentType", "CodeableConcept", "The type of relationship between agents.", 0, 1, relatedAgentType); + case -788654078: /*who[x]*/ return new Property("who[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); + case 117694: /*who*/ return new Property("who[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); + case -788660018: /*whoUri*/ return new Property("who[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); + case 1017243949: /*whoReference*/ return new Property("who[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, 1, who); + case 418120340: /*onBehalfOf[x]*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); + case -14402964: /*onBehalfOf*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); + case 418114400: /*onBehalfOfUri*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); + case -1136255425: /*onBehalfOfReference*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, 1, onBehalfOf); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -433,10 +433,10 @@ public class Provenance extends DomainResource { @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept case 117694: /*who*/ return this.who == null ? new Base[0] : new Base[] {this.who}; // Type case -14402964: /*onBehalfOf*/ return this.onBehalfOf == null ? new Base[0] : new Base[] {this.onBehalfOf}; // Type - case 1228161012: /*relatedAgentType*/ return this.relatedAgentType == null ? new Base[0] : new Base[] {this.relatedAgentType}; // CodeableConcept default: return super.getProperty(hash, name, checkValid); } @@ -445,6 +445,9 @@ public class Provenance extends DomainResource { @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; case 3506294: // role this.getRole().add(castToCodeableConcept(value)); // CodeableConcept return value; @@ -454,9 +457,6 @@ public class Provenance extends DomainResource { case -14402964: // onBehalfOf this.onBehalfOf = castToType(value); // Type return value; - case 1228161012: // relatedAgentType - this.relatedAgentType = castToCodeableConcept(value); // CodeableConcept - return value; default: return super.setProperty(hash, name, value); } @@ -464,14 +464,14 @@ public class Provenance extends DomainResource { @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("role")) { + if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("role")) { this.getRole().add(castToCodeableConcept(value)); } else if (name.equals("who[x]")) { this.who = castToType(value); // Type } else if (name.equals("onBehalfOf[x]")) { this.onBehalfOf = castToType(value); // Type - } else if (name.equals("relatedAgentType")) { - this.relatedAgentType = castToCodeableConcept(value); // CodeableConcept } else return super.setProperty(name, value); return value; @@ -480,12 +480,12 @@ public class Provenance extends DomainResource { @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { + case 3575610: return getType(); case 3506294: return addRole(); case -788654078: return getWho(); case 117694: return getWho(); case 418120340: return getOnBehalfOf(); case -14402964: return getOnBehalfOf(); - case 1228161012: return getRelatedAgentType(); default: return super.makeProperty(hash, name); } @@ -494,10 +494,10 @@ public class Provenance extends DomainResource { @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; case 3506294: /*role*/ return new String[] {"CodeableConcept"}; case 117694: /*who*/ return new String[] {"uri", "Reference"}; case -14402964: /*onBehalfOf*/ return new String[] {"uri", "Reference"}; - case 1228161012: /*relatedAgentType*/ return new String[] {"CodeableConcept"}; default: return super.getTypesForProperty(hash, name); } @@ -505,7 +505,11 @@ public class Provenance extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("role")) { + if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("role")) { return addRole(); } else if (name.equals("whoUri")) { @@ -524,10 +528,6 @@ public class Provenance extends DomainResource { this.onBehalfOf = new Reference(); return this.onBehalfOf; } - else if (name.equals("relatedAgentType")) { - this.relatedAgentType = new CodeableConcept(); - return this.relatedAgentType; - } else return super.addChild(name); } @@ -535,6 +535,7 @@ public class Provenance extends DomainResource { public ProvenanceAgentComponent copy() { ProvenanceAgentComponent dst = new ProvenanceAgentComponent(); copyValues(dst); + dst.type = type == null ? null : type.copy(); if (role != null) { dst.role = new ArrayList(); for (CodeableConcept i : role) @@ -542,7 +543,6 @@ public class Provenance extends DomainResource { }; dst.who = who == null ? null : who.copy(); dst.onBehalfOf = onBehalfOf == null ? null : onBehalfOf.copy(); - dst.relatedAgentType = relatedAgentType == null ? null : relatedAgentType.copy(); return dst; } @@ -553,8 +553,8 @@ public class Provenance extends DomainResource { if (!(other instanceof ProvenanceAgentComponent)) return false; ProvenanceAgentComponent o = (ProvenanceAgentComponent) other; - return compareDeep(role, o.role, true) && compareDeep(who, o.who, true) && compareDeep(onBehalfOf, o.onBehalfOf, true) - && compareDeep(relatedAgentType, o.relatedAgentType, true); + return compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(who, o.who, true) + && compareDeep(onBehalfOf, o.onBehalfOf, true); } @Override @@ -568,7 +568,7 @@ public class Provenance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, who, onBehalfOf, relatedAgentType + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role, who, onBehalfOf ); } @@ -949,9 +949,9 @@ public class Provenance extends DomainResource { /** * The period during which the activity occurred. */ - @Child(name = "period", type = {Period.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "occured", type = {Period.class, DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) - protected Period period; + protected Type occured; /** * The instant of time at which the activity was recorded. @@ -982,18 +982,18 @@ public class Provenance extends DomainResource { /** * The reason that the activity was taking place. */ - @Child(name = "reason", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "reason", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Reason the activity is occurring", formalDefinition="The reason that the activity was taking place." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-PurposeOfUse") - protected List reason; + protected List reason; /** * An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities. */ - @Child(name = "activity", type = {Coding.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Child(name = "activity", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Activity that occurred", formalDefinition="An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-activity-type") - protected Coding activity; + protected CodeableConcept activity; /** * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. @@ -1016,7 +1016,7 @@ public class Provenance extends DomainResource { @Description(shortDefinition="Signature on target", formalDefinition="A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated." ) protected List signature; - private static final long serialVersionUID = -1668640371L; + private static final long serialVersionUID = 1662030224L; /** * Constructor @@ -1097,26 +1097,47 @@ public class Provenance extends DomainResource { } /** - * @return {@link #period} (The period during which the activity occurred.) + * @return {@link #occured} (The period during which the activity occurred.) */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Provenance.period"); - else if (Configuration.doAutoCreate()) - this.period = new Period(); // cc - return this.period; - } - - public boolean hasPeriod() { - return this.period != null && !this.period.isEmpty(); + public Type getOccured() { + return this.occured; } /** - * @param value {@link #period} (The period during which the activity occurred.) + * @return {@link #occured} (The period during which the activity occurred.) */ - public Provenance setPeriod(Period value) { - this.period = value; + public Period getOccuredPeriod() throws FHIRException { + if (!(this.occured instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occured.getClass().getName()+" was encountered"); + return (Period) this.occured; + } + + public boolean hasOccuredPeriod() { + return this.occured instanceof Period; + } + + /** + * @return {@link #occured} (The period during which the activity occurred.) + */ + public DateTimeType getOccuredDateTimeType() throws FHIRException { + if (!(this.occured instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occured.getClass().getName()+" was encountered"); + return (DateTimeType) this.occured; + } + + public boolean hasOccuredDateTimeType() { + return this.occured instanceof DateTimeType; + } + + public boolean hasOccured() { + return this.occured != null && !this.occured.isEmpty(); + } + + /** + * @param value {@link #occured} (The period during which the activity occurred.) + */ + public Provenance setOccured(Type value) { + this.occured = value; return this; } @@ -1273,16 +1294,16 @@ public class Provenance extends DomainResource { /** * @return {@link #reason} (The reason that the activity was taking place.) */ - public List getReason() { + public List getReason() { if (this.reason == null) - this.reason = new ArrayList(); + this.reason = new ArrayList(); return this.reason; } /** * @return Returns a reference to this for easy method chaining */ - public Provenance setReason(List theReason) { + public Provenance setReason(List theReason) { this.reason = theReason; return this; } @@ -1290,25 +1311,25 @@ public class Provenance extends DomainResource { public boolean hasReason() { if (this.reason == null) return false; - for (Coding item : this.reason) + for (CodeableConcept item : this.reason) if (!item.isEmpty()) return true; return false; } - public Coding addReason() { //3 - Coding t = new Coding(); + public CodeableConcept addReason() { //3 + CodeableConcept t = new CodeableConcept(); if (this.reason == null) - this.reason = new ArrayList(); + this.reason = new ArrayList(); this.reason.add(t); return t; } - public Provenance addReason(Coding t) { //3 + public Provenance addReason(CodeableConcept t) { //3 if (t == null) return this; if (this.reason == null) - this.reason = new ArrayList(); + this.reason = new ArrayList(); this.reason.add(t); return this; } @@ -1316,7 +1337,7 @@ public class Provenance extends DomainResource { /** * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist */ - public Coding getReasonFirstRep() { + public CodeableConcept getReasonFirstRep() { if (getReason().isEmpty()) { addReason(); } @@ -1326,12 +1347,12 @@ public class Provenance extends DomainResource { /** * @return {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) */ - public Coding getActivity() { + public CodeableConcept getActivity() { if (this.activity == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Provenance.activity"); else if (Configuration.doAutoCreate()) - this.activity = new Coding(); // cc + this.activity = new CodeableConcept(); // cc return this.activity; } @@ -1342,7 +1363,7 @@ public class Provenance extends DomainResource { /** * @param value {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) */ - public Provenance setActivity(Coding value) { + public Provenance setActivity(CodeableConcept value) { this.activity = value; return this; } @@ -1509,12 +1530,12 @@ public class Provenance extends DomainResource { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("target", "Reference(Any)", "The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.", 0, java.lang.Integer.MAX_VALUE, target)); - children.add(new Property("period", "Period", "The period during which the activity occurred.", 0, 1, period)); + children.add(new Property("occured[x]", "Period|dateTime", "The period during which the activity occurred.", 0, 1, occured)); children.add(new Property("recorded", "instant", "The instant of time at which the activity was recorded.", 0, 1, recorded)); children.add(new Property("policy", "uri", "Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", 0, java.lang.Integer.MAX_VALUE, policy)); children.add(new Property("location", "Reference(Location)", "Where the activity occurred, if relevant.", 0, 1, location)); - children.add(new Property("reason", "Coding", "The reason that the activity was taking place.", 0, java.lang.Integer.MAX_VALUE, reason)); - children.add(new Property("activity", "Coding", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, 1, activity)); + children.add(new Property("reason", "CodeableConcept", "The reason that the activity was taking place.", 0, java.lang.Integer.MAX_VALUE, reason)); + children.add(new Property("activity", "CodeableConcept", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, 1, activity)); children.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); children.add(new Property("entity", "", "An entity used in this activity.", 0, java.lang.Integer.MAX_VALUE, entity)); children.add(new Property("signature", "Signature", "A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", 0, java.lang.Integer.MAX_VALUE, signature)); @@ -1524,12 +1545,15 @@ public class Provenance extends DomainResource { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case -880905839: /*target*/ return new Property("target", "Reference(Any)", "The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.", 0, java.lang.Integer.MAX_VALUE, target); - case -991726143: /*period*/ return new Property("period", "Period", "The period during which the activity occurred.", 0, 1, period); + case 1675820821: /*occured[x]*/ return new Property("occured[x]", "Period|dateTime", "The period during which the activity occurred.", 0, 1, occured); + case -1636993653: /*occured*/ return new Property("occured[x]", "Period|dateTime", "The period during which the activity occurred.", 0, 1, occured); + case -653507796: /*occuredPeriod*/ return new Property("occured[x]", "Period|dateTime", "The period during which the activity occurred.", 0, 1, occured); + case 403066438: /*occuredDateTime*/ return new Property("occured[x]", "Period|dateTime", "The period during which the activity occurred.", 0, 1, occured); case -799233872: /*recorded*/ return new Property("recorded", "instant", "The instant of time at which the activity was recorded.", 0, 1, recorded); case -982670030: /*policy*/ return new Property("policy", "uri", "Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", 0, java.lang.Integer.MAX_VALUE, policy); case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "Where the activity occurred, if relevant.", 0, 1, location); - case -934964668: /*reason*/ return new Property("reason", "Coding", "The reason that the activity was taking place.", 0, java.lang.Integer.MAX_VALUE, reason); - case -1655966961: /*activity*/ return new Property("activity", "Coding", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, 1, activity); + case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "The reason that the activity was taking place.", 0, java.lang.Integer.MAX_VALUE, reason); + case -1655966961: /*activity*/ return new Property("activity", "CodeableConcept", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, 1, activity); case 92750597: /*agent*/ return new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent); case -1298275357: /*entity*/ return new Property("entity", "", "An entity used in this activity.", 0, java.lang.Integer.MAX_VALUE, entity); case 1073584312: /*signature*/ return new Property("signature", "Signature", "A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", 0, java.lang.Integer.MAX_VALUE, signature); @@ -1542,12 +1566,12 @@ public class Provenance extends DomainResource { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // Reference - case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period + case -1636993653: /*occured*/ return this.occured == null ? new Base[0] : new Base[] {this.occured}; // Type case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // InstantType case -982670030: /*policy*/ return this.policy == null ? new Base[0] : this.policy.toArray(new Base[this.policy.size()]); // UriType case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference - case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // Coding - case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : new Base[] {this.activity}; // Coding + case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept + case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : new Base[] {this.activity}; // CodeableConcept case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // ProvenanceAgentComponent case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : this.entity.toArray(new Base[this.entity.size()]); // ProvenanceEntityComponent case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : this.signature.toArray(new Base[this.signature.size()]); // Signature @@ -1562,8 +1586,8 @@ public class Provenance extends DomainResource { case -880905839: // target this.getTarget().add(castToReference(value)); // Reference return value; - case -991726143: // period - this.period = castToPeriod(value); // Period + case -1636993653: // occured + this.occured = castToType(value); // Type return value; case -799233872: // recorded this.recorded = castToInstant(value); // InstantType @@ -1575,10 +1599,10 @@ public class Provenance extends DomainResource { this.location = castToReference(value); // Reference return value; case -934964668: // reason - this.getReason().add(castToCoding(value)); // Coding + this.getReason().add(castToCodeableConcept(value)); // CodeableConcept return value; case -1655966961: // activity - this.activity = castToCoding(value); // Coding + this.activity = castToCodeableConcept(value); // CodeableConcept return value; case 92750597: // agent this.getAgent().add((ProvenanceAgentComponent) value); // ProvenanceAgentComponent @@ -1598,8 +1622,8 @@ public class Provenance extends DomainResource { public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("target")) { this.getTarget().add(castToReference(value)); - } else if (name.equals("period")) { - this.period = castToPeriod(value); // Period + } else if (name.equals("occured[x]")) { + this.occured = castToType(value); // Type } else if (name.equals("recorded")) { this.recorded = castToInstant(value); // InstantType } else if (name.equals("policy")) { @@ -1607,9 +1631,9 @@ public class Provenance extends DomainResource { } else if (name.equals("location")) { this.location = castToReference(value); // Reference } else if (name.equals("reason")) { - this.getReason().add(castToCoding(value)); + this.getReason().add(castToCodeableConcept(value)); } else if (name.equals("activity")) { - this.activity = castToCoding(value); // Coding + this.activity = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("agent")) { this.getAgent().add((ProvenanceAgentComponent) value); } else if (name.equals("entity")) { @@ -1625,7 +1649,8 @@ public class Provenance extends DomainResource { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -880905839: return addTarget(); - case -991726143: return getPeriod(); + case 1675820821: return getOccured(); + case -1636993653: return getOccured(); case -799233872: return getRecordedElement(); case -982670030: return addPolicyElement(); case 1901043637: return getLocation(); @@ -1643,12 +1668,12 @@ public class Provenance extends DomainResource { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case -880905839: /*target*/ return new String[] {"Reference"}; - case -991726143: /*period*/ return new String[] {"Period"}; + case -1636993653: /*occured*/ return new String[] {"Period", "dateTime"}; case -799233872: /*recorded*/ return new String[] {"instant"}; case -982670030: /*policy*/ return new String[] {"uri"}; case 1901043637: /*location*/ return new String[] {"Reference"}; - case -934964668: /*reason*/ return new String[] {"Coding"}; - case -1655966961: /*activity*/ return new String[] {"Coding"}; + case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; + case -1655966961: /*activity*/ return new String[] {"CodeableConcept"}; case 92750597: /*agent*/ return new String[] {}; case -1298275357: /*entity*/ return new String[] {}; case 1073584312: /*signature*/ return new String[] {"Signature"}; @@ -1662,9 +1687,13 @@ public class Provenance extends DomainResource { if (name.equals("target")) { return addTarget(); } - else if (name.equals("period")) { - this.period = new Period(); - return this.period; + else if (name.equals("occuredPeriod")) { + this.occured = new Period(); + return this.occured; + } + else if (name.equals("occuredDateTime")) { + this.occured = new DateTimeType(); + return this.occured; } else if (name.equals("recorded")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.recorded"); @@ -1680,7 +1709,7 @@ public class Provenance extends DomainResource { return addReason(); } else if (name.equals("activity")) { - this.activity = new Coding(); + this.activity = new CodeableConcept(); return this.activity; } else if (name.equals("agent")) { @@ -1709,7 +1738,7 @@ public class Provenance extends DomainResource { for (Reference i : target) dst.target.add(i.copy()); }; - dst.period = period == null ? null : period.copy(); + dst.occured = occured == null ? null : occured.copy(); dst.recorded = recorded == null ? null : recorded.copy(); if (policy != null) { dst.policy = new ArrayList(); @@ -1718,8 +1747,8 @@ public class Provenance extends DomainResource { }; dst.location = location == null ? null : location.copy(); if (reason != null) { - dst.reason = new ArrayList(); - for (Coding i : reason) + dst.reason = new ArrayList(); + for (CodeableConcept i : reason) dst.reason.add(i.copy()); }; dst.activity = activity == null ? null : activity.copy(); @@ -1752,7 +1781,7 @@ public class Provenance extends DomainResource { if (!(other instanceof Provenance)) return false; Provenance o = (Provenance) other; - return compareDeep(target, o.target, true) && compareDeep(period, o.period, true) && compareDeep(recorded, o.recorded, true) + return compareDeep(target, o.target, true) && compareDeep(occured, o.occured, true) && compareDeep(recorded, o.recorded, true) && compareDeep(policy, o.policy, true) && compareDeep(location, o.location, true) && compareDeep(reason, o.reason, true) && compareDeep(activity, o.activity, true) && compareDeep(agent, o.agent, true) && compareDeep(entity, o.entity, true) && compareDeep(signature, o.signature, true); @@ -1769,7 +1798,7 @@ public class Provenance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(target, period, recorded + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(target, occured, recorded , policy, location, reason, activity, agent, entity, signature); } @@ -1804,6 +1833,26 @@ public class Provenance extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTITY_REF = new ca.uhn.fhir.model.api.Include("Provenance:entity-ref").toLocked(); + /** + * Search parameter: agent-type + *

+ * Description: How the agent participated
+ * Type: token
+ * Path: Provenance.agent.type
+ *

+ */ + @SearchParamDefinition(name="agent-type", path="Provenance.agent.type", description="How the agent participated", type="token" ) + public static final String SP_AGENT_TYPE = "agent-type"; + /** + * Fluent Client search parameter constant for agent-type + *

+ * Description: How the agent participated
+ * Type: token
+ * Path: Provenance.agent.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam AGENT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_AGENT_TYPE); + /** * Search parameter: agent *

@@ -1812,7 +1861,7 @@ public class Provenance extends DomainResource { * Path: Provenance.agent.who[x]
*

*/ - @SearchParamDefinition(name="agent", path="Provenance.agent.who", description="Who participated", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) + @SearchParamDefinition(name="agent", path="Provenance.agent.who", description="Who participated", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) public static final String SP_AGENT = "agent"; /** * Fluent Client search parameter constant for agent @@ -1876,46 +1925,6 @@ public class Provenance extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Provenance:patient").toLocked(); - /** - * Search parameter: start - *

- * Description: Starting time with inclusive boundary
- * Type: date
- * Path: Provenance.period.start
- *

- */ - @SearchParamDefinition(name="start", path="Provenance.period.start", description="Starting time with inclusive boundary", type="date" ) - public static final String SP_START = "start"; - /** - * Fluent Client search parameter constant for start - *

- * Description: Starting time with inclusive boundary
- * Type: date
- * Path: Provenance.period.start
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam START = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_START); - - /** - * Search parameter: end - *

- * Description: End time with inclusive boundary, if not ongoing
- * Type: date
- * Path: Provenance.period.end
- *

- */ - @SearchParamDefinition(name="end", path="Provenance.period.end", description="End time with inclusive boundary, if not ongoing", type="date" ) - public static final String SP_END = "end"; - /** - * Fluent Client search parameter constant for end - *

- * Description: End time with inclusive boundary, if not ongoing
- * Type: date
- * Path: Provenance.period.end
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam END = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_END); - /** * Search parameter: location *

@@ -1982,6 +1991,26 @@ public class Provenance extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam AGENT_ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_AGENT_ROLE); + /** + * Search parameter: when + *

+ * Description: When the activity occurred
+ * Type: date
+ * Path: Provenance.occuredDateTime
+ *

+ */ + @SearchParamDefinition(name="when", path="Provenance.occured.as(DateTime)", description="When the activity occurred", type="date" ) + public static final String SP_WHEN = "when"; + /** + * Fluent Client search parameter constant for when + *

+ * Description: When the activity occurred
+ * Type: date
+ * Path: Provenance.occuredDateTime
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam WHEN = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_WHEN); + /** * Search parameter: entity-id *

diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Quantity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Quantity.java index 97d11063ac4..2903cf3a750 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Quantity.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Quantity.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -702,6 +702,7 @@ public class Quantity extends Type implements ICompositeType, ICoding { , system, code); } +// added from java-adornments.txt: @Override public String getVersion() { @@ -733,5 +734,9 @@ public class Quantity extends Type implements ICompositeType, ICoding { return false; } + + +// end addition + } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Questionnaire.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Questionnaire.java index a194ef09318..f5b016cc95a 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Questionnaire.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Questionnaire.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -118,7 +118,7 @@ public class Questionnaire extends MetadataResource { REFERENCE, /** * Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity) -There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit whould be captured (or the a unit that has a ucum conversion from the provided unit) +There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit should be captured (or the a unit that has a ucum conversion from the provided unit) */ QUANTITY, /** @@ -229,7 +229,7 @@ There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-uni case OPENCHOICE: return "Answer is a Coding drawn from a list of options (as with the choice type) or a free-text entry in a string (valueCoding or valueString)"; case ATTACHMENT: return "Question with binary content such as a image, PDF, etc. as an answer (valueAttachment)"; case REFERENCE: return "Question with a reference to another resource (practitioner, organization, etc.) as an answer (valueReference)"; - case QUANTITY: return "Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity)\nThere is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit whould be captured (or the a unit that has a ucum conversion from the provided unit)"; + case QUANTITY: return "Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity)\nThere is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit should be captured (or the a unit that has a ucum conversion from the provided unit)"; default: return "?"; } } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/QuestionnaireResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/QuestionnaireResponse.java index bce7056dde8..10ad0049bf8 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/QuestionnaireResponse.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/QuestionnaireResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Range.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Range.java index 00ed184b923..1338e1d5a04 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Range.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Range.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Ratio.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Ratio.java index fabcd0d2e29..c3ee9becc50 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Ratio.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Ratio.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Reference.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Reference.java index f1abd9aa6be..ca5f5878069 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Reference.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Reference.java @@ -1,388 +1,388 @@ -package org.hl7.fhir.r4.model; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ChildOrder; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.api.annotation.Block; -import org.hl7.fhir.instance.model.api.*; -import org.hl7.fhir.exceptions.FHIRException; -/** - * A reference from one resource to another. - */ -@DatatypeDef(name="Reference") -public class Reference extends BaseReference implements IBaseReference, ICompositeType { - - /** - * A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. - */ - @Child(name = "reference", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Literal reference, Relative, internal or absolute URL", formalDefinition="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ) - protected StringType reference; - - /** - * An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference. - */ - @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Logical reference, when literal reference is not known", formalDefinition="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." ) - protected Identifier identifier; - - /** - * Plain text narrative that identifies the resource in addition to the resource reference. - */ - @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Text alternative for the resource", formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference." ) - protected StringType display; - - private static final long serialVersionUID = -909353281L; - - /** - * Constructor - */ - public Reference() { - super(); - } - - /** - * Constructor - * - * @param theReference The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123") - */ - public Reference(String theReference) { - super(theReference); - } - - /** - * Constructor - * - * @param theReference The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123") - */ - public Reference(IIdType theReference) { - super(theReference); - } - - /** - * Constructor - * - * @param theResource The resource represented by this reference - */ - public Reference(IAnyResource theResource) { - super(theResource); - } - - /** - * @return {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value - */ - public StringType getReferenceElement_() { - if (this.reference == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reference.reference"); - else if (Configuration.doAutoCreate()) - this.reference = new StringType(); // bb - return this.reference; - } - - public boolean hasReferenceElement() { - return this.reference != null && !this.reference.isEmpty(); - } - - public boolean hasReference() { - return this.reference != null && !this.reference.isEmpty(); - } - - /** - * @param value {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value - */ - public Reference setReferenceElement(StringType value) { - this.reference = value; - return this; - } - - /** - * @return A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. - */ - public String getReference() { - return this.reference == null ? null : this.reference.getValue(); - } - - /** - * @param value A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. - */ - public Reference setReference(String value) { - if (Utilities.noString(value)) - this.reference = null; - else { - if (this.reference == null) - this.reference = new StringType(); - this.reference.setValue(value); - } - return this; - } - - /** - * @return {@link #identifier} (An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.) - */ - public Identifier getIdentifier() { - if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reference.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new Identifier(); // cc - return this.identifier; - } - - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - /** - * @param value {@link #identifier} (An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.) - */ - public Reference setIdentifier(Identifier value) { - this.identifier = value; - return this; - } - - /** - * @return {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value - */ - public StringType getDisplayElement() { - if (this.display == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reference.display"); - else if (Configuration.doAutoCreate()) - this.display = new StringType(); // bb - return this.display; - } - - public boolean hasDisplayElement() { - return this.display != null && !this.display.isEmpty(); - } - - public boolean hasDisplay() { - return this.display != null && !this.display.isEmpty(); - } - - /** - * @param value {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value - */ - public Reference setDisplayElement(StringType value) { - this.display = value; - return this; - } - - /** - * @return Plain text narrative that identifies the resource in addition to the resource reference. - */ - public String getDisplay() { - return this.display == null ? null : this.display.getValue(); - } - - /** - * @param value Plain text narrative that identifies the resource in addition to the resource reference. - */ - public Reference setDisplay(String value) { - if (Utilities.noString(value)) - this.display = null; - else { - if (this.display == null) - this.display = new StringType(); - this.display.setValue(value); - } - return this; - } - - /** - * Convenience setter which sets the reference to the complete {@link IIdType#getValue() value} of the given - * reference. - * - * @param theReference The reference, or null - * @return - * @return Returns a reference to this - */ - public Reference setReferenceElement(IIdType theReference) { - if (theReference != null) { - setReference(theReference.getValue()); - } else { - setReference(null); - } - return this; - } - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, 1, reference)); - children.add(new Property("identifier", "Identifier", "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", 0, 1, identifier)); - children.add(new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, 1, display)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -925155509: /*reference*/ return new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, 1, reference); - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", 0, 1, identifier); - case 1671764162: /*display*/ return new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, 1, display); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // StringType - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier - case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -925155509: // reference - this.reference = castToString(value); // StringType - return value; - case -1618432855: // identifier - this.identifier = castToIdentifier(value); // Identifier - return value; - case 1671764162: // display - this.display = castToString(value); // StringType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("reference")) { - this.reference = castToString(value); // StringType - } else if (name.equals("identifier")) { - this.identifier = castToIdentifier(value); // Identifier - } else if (name.equals("display")) { - this.display = castToString(value); // StringType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -925155509: return getReferenceElement_(); - case -1618432855: return getIdentifier(); - case 1671764162: return getDisplayElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -925155509: /*reference*/ return new String[] {"string"}; - case -1618432855: /*identifier*/ return new String[] {"Identifier"}; - case 1671764162: /*display*/ return new String[] {"string"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("reference")) { - throw new FHIRException("Cannot call addChild on a primitive type Reference.reference"); - } - else if (name.equals("identifier")) { - this.identifier = new Identifier(); - return this.identifier; - } - else if (name.equals("display")) { - throw new FHIRException("Cannot call addChild on a primitive type Reference.display"); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "Reference"; - - } - - public Reference copy() { - Reference dst = new Reference(); - copyValues(dst); - dst.reference = reference == null ? null : reference.copy(); - dst.identifier = identifier == null ? null : identifier.copy(); - dst.display = display == null ? null : display.copy(); - return dst; - } - - protected Reference typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Reference)) - return false; - Reference o = (Reference) other; - return compareDeep(reference, o.reference, true) && compareDeep(identifier, o.identifier, true) - && compareDeep(display, o.display, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Reference)) - return false; - Reference o = (Reference) other; - return compareValues(reference, o.reference, true) && compareValues(display, o.display, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, identifier, display - ); - } - - -} - +package org.hl7.fhir.r4.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A reference from one resource to another. + */ +@DatatypeDef(name="Reference") +public class Reference extends BaseReference implements IBaseReference, ICompositeType { + + /** + * A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. + */ + @Child(name = "reference", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Literal reference, Relative, internal or absolute URL", formalDefinition="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ) + protected StringType reference; + + /** + * An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical reference, when literal reference is not known", formalDefinition="An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." ) + protected Identifier identifier; + + /** + * Plain text narrative that identifies the resource in addition to the resource reference. + */ + @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Text alternative for the resource", formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference." ) + protected StringType display; + + private static final long serialVersionUID = -909353281L; + + /** + * Constructor + */ + public Reference() { + super(); + } + + /** + * Constructor + * + * @param theReference The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123") + */ + public Reference(String theReference) { + super(theReference); + } + + /** + * Constructor + * + * @param theReference The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123") + */ + public Reference(IIdType theReference) { + super(theReference); + } + + /** + * Constructor + * + * @param theResource The resource represented by this reference + */ + public Reference(IAnyResource theResource) { + super(theResource); + } + + /** + * @return {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public StringType getReferenceElement_() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Reference.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new StringType(); // bb + return this.reference; + } + + public boolean hasReferenceElement() { + return this.reference != null && !this.reference.isEmpty(); + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public Reference setReferenceElement(StringType value) { + this.reference = value; + return this; + } + + /** + * @return A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. + */ + public String getReference() { + return this.reference == null ? null : this.reference.getValue(); + } + + /** + * @param value A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. + */ + public Reference setReference(String value) { + if (Utilities.noString(value)) + this.reference = null; + else { + if (this.reference == null) + this.reference = new StringType(); + this.reference.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Reference.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.) + */ + public Reference setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public StringType getDisplayElement() { + if (this.display == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Reference.display"); + else if (Configuration.doAutoCreate()) + this.display = new StringType(); // bb + return this.display; + } + + public boolean hasDisplayElement() { + return this.display != null && !this.display.isEmpty(); + } + + public boolean hasDisplay() { + return this.display != null && !this.display.isEmpty(); + } + + /** + * @param value {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value + */ + public Reference setDisplayElement(StringType value) { + this.display = value; + return this; + } + + /** + * @return Plain text narrative that identifies the resource in addition to the resource reference. + */ + public String getDisplay() { + return this.display == null ? null : this.display.getValue(); + } + + /** + * @param value Plain text narrative that identifies the resource in addition to the resource reference. + */ + public Reference setDisplay(String value) { + if (Utilities.noString(value)) + this.display = null; + else { + if (this.display == null) + this.display = new StringType(); + this.display.setValue(value); + } + return this; + } + + /** + * Convenience setter which sets the reference to the complete {@link IIdType#getValue() value} of the given + * reference. + * + * @param theReference The reference, or null + * @return + * @return Returns a reference to this + */ + public Reference setReferenceElement(IIdType theReference) { + if (theReference != null) { + setReference(theReference.getValue()); + } else { + setReference(null); + } + return this; + } + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, 1, reference)); + children.add(new Property("identifier", "Identifier", "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", 0, 1, identifier)); + children.add(new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, 1, display)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -925155509: /*reference*/ return new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, 1, reference); + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", 0, 1, identifier); + case 1671764162: /*display*/ return new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, 1, display); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // StringType + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier + case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -925155509: // reference + this.reference = castToString(value); // StringType + return value; + case -1618432855: // identifier + this.identifier = castToIdentifier(value); // Identifier + return value; + case 1671764162: // display + this.display = castToString(value); // StringType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("reference")) { + this.reference = castToString(value); // StringType + } else if (name.equals("identifier")) { + this.identifier = castToIdentifier(value); // Identifier + } else if (name.equals("display")) { + this.display = castToString(value); // StringType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -925155509: return (Base) getReferenceElement(); + case -1618432855: return getIdentifier(); + case 1671764162: return getDisplayElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -925155509: /*reference*/ return new String[] {"string"}; + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case 1671764162: /*display*/ return new String[] {"string"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("reference")) { + throw new FHIRException("Cannot call addChild on a primitive type Reference.reference"); + } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("display")) { + throw new FHIRException("Cannot call addChild on a primitive type Reference.display"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Reference"; + + } + + public Reference copy() { + Reference dst = new Reference(); + copyValues(dst); + dst.reference = reference == null ? null : reference.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.display = display == null ? null : display.copy(); + return dst; + } + + protected Reference typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Reference)) + return false; + Reference o = (Reference) other; + return compareDeep(reference, o.reference, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(display, o.display, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Reference)) + return false; + Reference o = (Reference) other; + return compareValues(reference, o.reference, true) && compareValues(display, o.display, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, identifier, display + ); + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedArtifact.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedArtifact.java index e0ebdefc1da..56f4efd2515 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedArtifact.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedArtifact.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedPerson.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedPerson.java index 205a0a6d24c..56ae62a93b9 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedPerson.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RelatedPerson.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RequestGroup.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RequestGroup.java index 81b6c9c9085..abfa11b339d 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RequestGroup.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RequestGroup.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1405,11 +1405,11 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Block() public static class RequestGroupActionComponent extends BackboneElement implements IBaseBackboneElement { /** - * A user-visible label for the action. + * A user-visible prefix for the action. */ - @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="User-visible label for the action (e.g. 1. or A.)", formalDefinition="A user-visible label for the action." ) - protected StringType label; + @Child(name = "prefix", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="User-visible prefix for the action (e.g. 1. or A.)", formalDefinition="A user-visible prefix for the action." ) + protected StringType prefix; /** * The title of the action displayed to a user. @@ -1546,7 +1546,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Description(shortDefinition="Sub action", formalDefinition="Sub actions." ) protected List action; - private static final long serialVersionUID = 362859874L; + private static final long serialVersionUID = -1597629210L; /** * Constructor @@ -1556,50 +1556,50 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } /** - * @return {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + * @return {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value */ - public StringType getLabelElement() { - if (this.label == null) + public StringType getPrefixElement() { + if (this.prefix == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create RequestGroupActionComponent.label"); + throw new Error("Attempt to auto-create RequestGroupActionComponent.prefix"); else if (Configuration.doAutoCreate()) - this.label = new StringType(); // bb - return this.label; + this.prefix = new StringType(); // bb + return this.prefix; } - public boolean hasLabelElement() { - return this.label != null && !this.label.isEmpty(); + public boolean hasPrefixElement() { + return this.prefix != null && !this.prefix.isEmpty(); } - public boolean hasLabel() { - return this.label != null && !this.label.isEmpty(); + public boolean hasPrefix() { + return this.prefix != null && !this.prefix.isEmpty(); } /** - * @param value {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + * @param value {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value */ - public RequestGroupActionComponent setLabelElement(StringType value) { - this.label = value; + public RequestGroupActionComponent setPrefixElement(StringType value) { + this.prefix = value; return this; } /** - * @return A user-visible label for the action. + * @return A user-visible prefix for the action. */ - public String getLabel() { - return this.label == null ? null : this.label.getValue(); + public String getPrefix() { + return this.prefix == null ? null : this.prefix.getValue(); } /** - * @param value A user-visible label for the action. + * @param value A user-visible prefix for the action. */ - public RequestGroupActionComponent setLabel(String value) { + public RequestGroupActionComponent setPrefix(String value) { if (Utilities.noString(value)) - this.label = null; + this.prefix = null; else { - if (this.label == null) - this.label = new StringType(); - this.label.setValue(value); + if (this.prefix == null) + this.prefix = new StringType(); + this.prefix.setValue(value); } return this; } @@ -2473,7 +2473,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use protected void listChildren(List children) { super.listChildren(children); - children.add(new Property("label", "string", "A user-visible label for the action.", 0, 1, label)); + children.add(new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix)); children.add(new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title)); children.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description)); children.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, 1, textEquivalent)); @@ -2496,7 +2496,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { - case 102727412: /*label*/ return new Property("label", "string", "A user-visible label for the action.", 0, 1, label); + case -980110702: /*prefix*/ return new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix); case 110371416: /*title*/ return new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title); case -1724546052: /*description*/ return new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description); case -900391049: /*textEquivalent*/ return new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, 1, textEquivalent); @@ -2528,7 +2528,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { - case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType + case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType @@ -2554,8 +2554,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { - case 102727412: // label - this.label = castToString(value); // StringType + case -980110702: // prefix + this.prefix = castToString(value); // StringType return value; case 110371416: // title this.title = castToString(value); // StringType @@ -2620,8 +2620,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("label")) { - this.label = castToString(value); // StringType + if (name.equals("prefix")) { + this.prefix = castToString(value); // StringType } else if (name.equals("title")) { this.title = castToString(value); // StringType } else if (name.equals("description")) { @@ -2669,7 +2669,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { - case 102727412: return getLabelElement(); + case -980110702: return getPrefixElement(); case 110371416: return getTitleElement(); case -1724546052: return getDescriptionElement(); case -900391049: return getTextEquivalentElement(); @@ -2696,7 +2696,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { - case 102727412: /*label*/ return new String[] {"string"}; + case -980110702: /*prefix*/ return new String[] {"string"}; case 110371416: /*title*/ return new String[] {"string"}; case -1724546052: /*description*/ return new String[] {"string"}; case -900391049: /*textEquivalent*/ return new String[] {"string"}; @@ -2721,8 +2721,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @Override public Base addChild(String name) throws FHIRException { - if (name.equals("label")) { - throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.label"); + if (name.equals("prefix")) { + throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.prefix"); } else if (name.equals("title")) { throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.title"); @@ -2801,7 +2801,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use public RequestGroupActionComponent copy() { RequestGroupActionComponent dst = new RequestGroupActionComponent(); copyValues(dst); - dst.label = label == null ? null : label.copy(); + dst.prefix = prefix == null ? null : prefix.copy(); dst.title = title == null ? null : title.copy(); dst.description = description == null ? null : description.copy(); dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); @@ -2853,7 +2853,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use if (!(other instanceof RequestGroupActionComponent)) return false; RequestGroupActionComponent o = (RequestGroupActionComponent) other; - return compareDeep(label, o.label, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) + return compareDeep(prefix, o.prefix, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true) && compareDeep(condition, o.condition, true) && compareDeep(relatedAction, o.relatedAction, true) && compareDeep(timing, o.timing, true) && compareDeep(participant, o.participant, true) && compareDeep(type, o.type, true) @@ -2870,7 +2870,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use if (!(other instanceof RequestGroupActionComponent)) return false; RequestGroupActionComponent o = (RequestGroupActionComponent) other; - return compareValues(label, o.label, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) + return compareValues(prefix, o.prefix, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(groupingBehavior, o.groupingBehavior, true) && compareValues(selectionBehavior, o.selectionBehavior, true) && compareValues(requiredBehavior, o.requiredBehavior, true) && compareValues(precheckBehavior, o.precheckBehavior, true) && compareValues(cardinalityBehavior, o.cardinalityBehavior, true) @@ -2878,7 +2878,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, title, description + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(prefix, title, description , textEquivalent, code, documentation, condition, relatedAction, timing, participant , type, groupingBehavior, selectionBehavior, requiredBehavior, precheckBehavior, cardinalityBehavior , resource, action); @@ -3687,10 +3687,17 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") protected Enumeration priority; + /** + * A code that identifies what the overall request group is. + */ + @Child(name = "code", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="What's being requested/ordered", formalDefinition="A code that identifies what the overall request group is." ) + protected CodeableConcept code; + /** * The subject for which the request group was created. */ - @Child(name = "subject", type = {Patient.class, Group.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Child(name = "subject", type = {Patient.class, Group.class}, order=9, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Who the request group is about", formalDefinition="The subject for which the request group was created." ) protected Reference subject; @@ -3702,7 +3709,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use /** * Describes the context of the request group, if any. */ - @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Encounter or Episode for the request group", formalDefinition="Describes the context of the request group, if any." ) protected Reference context; @@ -3714,14 +3721,14 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use /** * Indicates when the request group was created. */ - @Child(name = "authoredOn", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "authoredOn", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="When the request group was authored", formalDefinition="Indicates when the request group was created." ) protected DateTimeType authoredOn; /** * Provides a reference to the author of the request group. */ - @Child(name = "author", type = {Device.class, Practitioner.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Child(name = "author", type = {Device.class, Practitioner.class}, order=12, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Device or practitioner that authored the request group", formalDefinition="Provides a reference to the author of the request group." ) protected Reference author; @@ -3731,27 +3738,39 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use protected Resource authorTarget; /** - * Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response. + * Describes the reason for the request group in coded or textual form. */ - @Child(name = "reason", type = {CodeableConcept.class, Reference.class}, order=12, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Reason for the request group", formalDefinition="Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response." ) - protected Type reason; + @Child(name = "reasonCode", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Why the request group is needed", formalDefinition="Describes the reason for the request group in coded or textual form." ) + protected List reasonCode; + + /** + * Indicates another resource whose existence justifies this request group. + */ + @Child(name = "reasonReference", type = {Reference.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Why the request group is needed", formalDefinition="Indicates another resource whose existence justifies this request group." ) + protected List reasonReference; + /** + * The actual objects that are the target of the reference (Indicates another resource whose existence justifies this request group.) + */ + protected List reasonReferenceTarget; + /** * Provides a mechanism to communicate additional information about the response. */ - @Child(name = "note", type = {Annotation.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Additional notes about the response", formalDefinition="Provides a mechanism to communicate additional information about the response." ) protected List note; /** * The actions, if any, produced by the evaluation of the artifact. */ - @Child(name = "action", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "action", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Proposed actions, if any", formalDefinition="The actions, if any, produced by the evaluation of the artifact." ) protected List action; - private static final long serialVersionUID = -1812083587L; + private static final long serialVersionUID = -998106621L; /** * Constructor @@ -4174,6 +4193,30 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use return this; } + /** + * @return {@link #code} (A code that identifies what the overall request group is.) + */ + public CodeableConcept getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RequestGroup.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableConcept(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (A code that identifies what the overall request group is.) + */ + public RequestGroup setCode(CodeableConcept value) { + this.code = value; + return this; + } + /** * @return {@link #subject} (The subject for which the request group was created.) */ @@ -4341,48 +4384,119 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } /** - * @return {@link #reason} (Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.) + * @return {@link #reasonCode} (Describes the reason for the request group in coded or textual form.) */ - public Type getReason() { - return this.reason; + public List getReasonCode() { + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + return this.reasonCode; } /** - * @return {@link #reason} (Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.) + * @return Returns a reference to this for easy method chaining */ - public CodeableConcept getReasonCodeableConcept() throws FHIRException { - if (!(this.reason instanceof CodeableConcept)) - throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); - return (CodeableConcept) this.reason; + public RequestGroup setReasonCode(List theReasonCode) { + this.reasonCode = theReasonCode; + return this; } - public boolean hasReasonCodeableConcept() { - return this.reason instanceof CodeableConcept; + public boolean hasReasonCode() { + if (this.reasonCode == null) + return false; + for (CodeableConcept item : this.reasonCode) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addReasonCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + this.reasonCode.add(t); + return t; + } + + public RequestGroup addReasonCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + this.reasonCode.add(t); + return this; } /** - * @return {@link #reason} (Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.) + * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist */ - public Reference getReasonReference() throws FHIRException { - if (!(this.reason instanceof Reference)) - throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); - return (Reference) this.reason; + public CodeableConcept getReasonCodeFirstRep() { + if (getReasonCode().isEmpty()) { + addReasonCode(); + } + return getReasonCode().get(0); + } + + /** + * @return {@link #reasonReference} (Indicates another resource whose existence justifies this request group.) + */ + public List getReasonReference() { + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + return this.reasonReference; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public RequestGroup setReasonReference(List theReasonReference) { + this.reasonReference = theReasonReference; + return this; } public boolean hasReasonReference() { - return this.reason instanceof Reference; + if (this.reasonReference == null) + return false; + for (Reference item : this.reasonReference) + if (!item.isEmpty()) + return true; + return false; } - public boolean hasReason() { - return this.reason != null && !this.reason.isEmpty(); + public Reference addReasonReference() { //3 + Reference t = new Reference(); + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + this.reasonReference.add(t); + return t; + } + + public RequestGroup addReasonReference(Reference t) { //3 + if (t == null) + return this; + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + this.reasonReference.add(t); + return this; } /** - * @param value {@link #reason} (Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.) + * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist */ - public RequestGroup setReason(Type value) { - this.reason = value; - return this; + public Reference getReasonReferenceFirstRep() { + if (getReasonReference().isEmpty()) { + addReasonReference(); + } + return getReasonReference().get(0); + } + + /** + * @deprecated Use Reference#setResource(IBaseResource) instead + */ + @Deprecated + public List getReasonReferenceTarget() { + if (this.reasonReferenceTarget == null) + this.reasonReferenceTarget = new ArrayList(); + return this.reasonReferenceTarget; } /** @@ -4501,11 +4615,13 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use children.add(new Property("status", "code", "The current state of the request. For request groups, the status reflects the status of all the requests in the group.", 0, 1, status)); children.add(new Property("intent", "code", "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", 0, 1, intent)); children.add(new Property("priority", "code", "Indicates how quickly the request should be addressed with respect to other requests.", 0, 1, priority)); + children.add(new Property("code", "CodeableConcept", "A code that identifies what the overall request group is.", 0, 1, code)); children.add(new Property("subject", "Reference(Patient|Group)", "The subject for which the request group was created.", 0, 1, subject)); children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "Describes the context of the request group, if any.", 0, 1, context)); children.add(new Property("authoredOn", "dateTime", "Indicates when the request group was created.", 0, 1, authoredOn)); children.add(new Property("author", "Reference(Device|Practitioner)", "Provides a reference to the author of the request group.", 0, 1, author)); - children.add(new Property("reason[x]", "CodeableConcept|Reference(Any)", "Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, 1, reason)); + children.add(new Property("reasonCode", "CodeableConcept", "Describes the reason for the request group in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); + children.add(new Property("reasonReference", "Reference(Any)", "Indicates another resource whose existence justifies this request group.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); children.add(new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note)); children.add(new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action)); } @@ -4521,14 +4637,13 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case -892481550: /*status*/ return new Property("status", "code", "The current state of the request. For request groups, the status reflects the status of all the requests in the group.", 0, 1, status); case -1183762788: /*intent*/ return new Property("intent", "code", "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", 0, 1, intent); case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the request should be addressed with respect to other requests.", 0, 1, priority); + case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that identifies what the overall request group is.", 0, 1, code); case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The subject for which the request group was created.", 0, 1, subject); case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "Describes the context of the request group, if any.", 0, 1, context); case -1500852503: /*authoredOn*/ return new Property("authoredOn", "dateTime", "Indicates when the request group was created.", 0, 1, authoredOn); case -1406328437: /*author*/ return new Property("author", "Reference(Device|Practitioner)", "Provides a reference to the author of the request group.", 0, 1, author); - case -669418564: /*reason[x]*/ return new Property("reason[x]", "CodeableConcept|Reference(Any)", "Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, 1, reason); - case -934964668: /*reason*/ return new Property("reason[x]", "CodeableConcept|Reference(Any)", "Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, 1, reason); - case -610155331: /*reasonCodeableConcept*/ return new Property("reason[x]", "CodeableConcept|Reference(Any)", "Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, 1, reason); - case -1146218137: /*reasonReference*/ return new Property("reason[x]", "CodeableConcept|Reference(Any)", "Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, 1, reason); + case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Describes the reason for the request group in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode); + case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Any)", "Indicates another resource whose existence justifies this request group.", 0, java.lang.Integer.MAX_VALUE, reasonReference); case 3387378: /*note*/ return new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note); case -1422950858: /*action*/ return new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action); default: return super.getNamedProperty(_hash, _name, _checkValid); @@ -4547,11 +4662,13 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration + case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference - case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // Type + case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept + case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // RequestGroupActionComponent default: return super.getProperty(hash, name, checkValid); @@ -4589,6 +4706,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use value = new RequestPriorityEnumFactory().fromType(castToCode(value)); this.priority = (Enumeration) value; // Enumeration return value; + case 3059181: // code + this.code = castToCodeableConcept(value); // CodeableConcept + return value; case -1867885268: // subject this.subject = castToReference(value); // Reference return value; @@ -4601,8 +4721,11 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case -1406328437: // author this.author = castToReference(value); // Reference return value; - case -934964668: // reason - this.reason = castToType(value); // Type + case 722137681: // reasonCode + this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept + return value; + case -1146218137: // reasonReference + this.getReasonReference().add(castToReference(value)); // Reference return value; case 3387378: // note this.getNote().add(castToAnnotation(value)); // Annotation @@ -4636,6 +4759,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } else if (name.equals("priority")) { value = new RequestPriorityEnumFactory().fromType(castToCode(value)); this.priority = (Enumeration) value; // Enumeration + } else if (name.equals("code")) { + this.code = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("subject")) { this.subject = castToReference(value); // Reference } else if (name.equals("context")) { @@ -4644,8 +4769,10 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use this.authoredOn = castToDateTime(value); // DateTimeType } else if (name.equals("author")) { this.author = castToReference(value); // Reference - } else if (name.equals("reason[x]")) { - this.reason = castToType(value); // Type + } else if (name.equals("reasonCode")) { + this.getReasonCode().add(castToCodeableConcept(value)); + } else if (name.equals("reasonReference")) { + this.getReasonReference().add(castToReference(value)); } else if (name.equals("note")) { this.getNote().add(castToAnnotation(value)); } else if (name.equals("action")) { @@ -4666,12 +4793,13 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case -892481550: return getStatusElement(); case -1183762788: return getIntentElement(); case -1165461084: return getPriorityElement(); + case 3059181: return getCode(); case -1867885268: return getSubject(); case 951530927: return getContext(); case -1500852503: return getAuthoredOnElement(); case -1406328437: return getAuthor(); - case -669418564: return getReason(); - case -934964668: return getReason(); + case 722137681: return addReasonCode(); + case -1146218137: return addReasonReference(); case 3387378: return addNote(); case -1422950858: return addAction(); default: return super.makeProperty(hash, name); @@ -4690,11 +4818,13 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case -892481550: /*status*/ return new String[] {"code"}; case -1183762788: /*intent*/ return new String[] {"code"}; case -1165461084: /*priority*/ return new String[] {"code"}; + case 3059181: /*code*/ return new String[] {"CodeableConcept"}; case -1867885268: /*subject*/ return new String[] {"Reference"}; case 951530927: /*context*/ return new String[] {"Reference"}; case -1500852503: /*authoredOn*/ return new String[] {"dateTime"}; case -1406328437: /*author*/ return new String[] {"Reference"}; - case -934964668: /*reason*/ return new String[] {"CodeableConcept", "Reference"}; + case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; + case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; case 3387378: /*note*/ return new String[] {"Annotation"}; case -1422950858: /*action*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); @@ -4729,6 +4859,10 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use else if (name.equals("priority")) { throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.priority"); } + else if (name.equals("code")) { + this.code = new CodeableConcept(); + return this.code; + } else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; @@ -4744,13 +4878,11 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use this.author = new Reference(); return this.author; } - else if (name.equals("reasonCodeableConcept")) { - this.reason = new CodeableConcept(); - return this.reason; + else if (name.equals("reasonCode")) { + return addReasonCode(); } else if (name.equals("reasonReference")) { - this.reason = new Reference(); - return this.reason; + return addReasonReference(); } else if (name.equals("note")) { return addNote(); @@ -4794,11 +4926,21 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use dst.status = status == null ? null : status.copy(); dst.intent = intent == null ? null : intent.copy(); dst.priority = priority == null ? null : priority.copy(); + dst.code = code == null ? null : code.copy(); dst.subject = subject == null ? null : subject.copy(); dst.context = context == null ? null : context.copy(); dst.authoredOn = authoredOn == null ? null : authoredOn.copy(); dst.author = author == null ? null : author.copy(); - dst.reason = reason == null ? null : reason.copy(); + if (reasonCode != null) { + dst.reasonCode = new ArrayList(); + for (CodeableConcept i : reasonCode) + dst.reasonCode.add(i.copy()); + }; + if (reasonReference != null) { + dst.reasonReference = new ArrayList(); + for (Reference i : reasonReference) + dst.reasonReference.add(i.copy()); + }; if (note != null) { dst.note = new ArrayList(); for (Annotation i : note) @@ -4826,9 +4968,10 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use return compareDeep(identifier, o.identifier, true) && compareDeep(definition, o.definition, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(replaces, o.replaces, true) && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(status, o.status, true) && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) - && compareDeep(subject, o.subject, true) && compareDeep(context, o.context, true) && compareDeep(authoredOn, o.authoredOn, true) - && compareDeep(author, o.author, true) && compareDeep(reason, o.reason, true) && compareDeep(note, o.note, true) - && compareDeep(action, o.action, true); + && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(context, o.context, true) + && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(author, o.author, true) && compareDeep(reasonCode, o.reasonCode, true) + && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(note, o.note, true) && compareDeep(action, o.action, true) + ; } @Override @@ -4844,8 +4987,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definition, basedOn - , replaces, groupIdentifier, status, intent, priority, subject, context, authoredOn - , author, reason, note, action); + , replaces, groupIdentifier, status, intent, priority, code, subject, context + , authoredOn, author, reasonCode, reasonReference, note, action); } @Override @@ -4893,6 +5036,26 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + /** + * Search parameter: code + *

+ * Description: The code of the request group
+ * Type: token
+ * Path: RequestGroup.code
+ *

+ */ + @SearchParamDefinition(name="code", path="RequestGroup.code", description="The code of the request group", type="token" ) + public static final String SP_CODE = "code"; + /** + * Fluent Client search parameter constant for code + *

+ * Description: The code of the request group
+ * Type: token
+ * Path: RequestGroup.code
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); + /** * Search parameter: subject *

diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchStudy.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchStudy.java index 2fd83eea03b..ae90380dd43 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchStudy.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchStudy.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchSubject.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchSubject.java index b7f8d84609d..65328354fc1 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchSubject.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResearchSubject.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Resource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Resource.java index 385ee324ac3..9d45ef6bbce 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Resource.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Resource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceFactory.java index ba371cc406e..9bd417f8712 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceFactory.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceFactory.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import org.hl7.fhir.exceptions.FHIRException; @@ -40,6 +40,8 @@ public class ResourceFactory extends Factory { return new Appointment(); if ("Account".equals(name)) return new Account(); + if ("CatalogEntry".equals(name)) + return new CatalogEntry(); if ("EventDefinition".equals(name)) return new EventDefinition(); if ("DocumentManifest".equals(name)) @@ -238,6 +240,8 @@ public class ResourceFactory extends Factory { return new PaymentReconciliation(); if ("Condition".equals(name)) return new Condition(); + if ("SpecimenDefinition".equals(name)) + return new SpecimenDefinition(); if ("Composition".equals(name)) return new Composition(); if ("DetectedIssue".equals(name)) @@ -256,6 +260,8 @@ public class ResourceFactory extends Factory { return new ProcessResponse(); if ("NamingSystem".equals(name)) return new NamingSystem(); + if ("ExampleScenario".equals(name)) + return new ExampleScenario(); if ("Schedule".equals(name)) return new Schedule(); if ("SupplyDelivery".equals(name)) @@ -399,6 +405,7 @@ public class ResourceFactory extends Factory { case -871422185: return new CapabilityStatement(); case 57208314: return new CarePlan(); case 57320750: return new CareTeam(); + case -1007602695: return new CatalogEntry(); case -883723257: return new ChargeItem(); case 65189916: return new Claim(); case 1488475261: return new ClaimResponse(); @@ -441,6 +448,7 @@ public class ResourceFactory extends Factory { case 289362821: return new EnrollmentResponse(); case -1093178557: return new EpisodeOfCare(); case 1851868013: return new EventDefinition(); + case 1175230202: return new ExampleScenario(); case -1136815094: return new ExpansionProfile(); case -1001676601: return new ExplanationOfBenefit(); case 1391410207: return new Extension(); @@ -517,6 +525,7 @@ public class ResourceFactory extends Factory { case -1097468803: return new SimpleQuantity(); case 2579998: return new Slot(); case -2068224216: return new Specimen(); + case 863741595: return new SpecimenDefinition(); case 1133777670: return new StructureDefinition(); case 1958247177: return new StructureMap(); case 505523517: return new Subscription(); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceType.java index 277a548e99c..f9b91990fc8 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceType.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ResourceType.java @@ -2,7 +2,7 @@ package org.hl7.fhir.r4.model; import org.hl7.fhir.exceptions.FHIRException; -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 public enum ResourceType { Account, @@ -19,6 +19,7 @@ public enum ResourceType { CapabilityStatement, CarePlan, CareTeam, + CatalogEntry, ChargeItem, Claim, ClaimResponse, @@ -50,6 +51,7 @@ public enum ResourceType { EnrollmentResponse, EpisodeOfCare, EventDefinition, + ExampleScenario, ExpansionProfile, ExplanationOfBenefit, FamilyMemberHistory, @@ -110,6 +112,7 @@ public enum ResourceType { ServiceDefinition, Slot, Specimen, + SpecimenDefinition, StructureDefinition, StructureMap, Subscription, @@ -153,6 +156,8 @@ public enum ResourceType { return "careplan"; case CareTeam: return "careteam"; + case CatalogEntry: + return "catalogentry"; case ChargeItem: return "chargeitem"; case Claim: @@ -215,6 +220,8 @@ public enum ResourceType { return "episodeofcare"; case EventDefinition: return "eventdefinition"; + case ExampleScenario: + return "examplescenario"; case ExpansionProfile: return "expansionprofile"; case ExplanationOfBenefit: @@ -335,6 +342,8 @@ public enum ResourceType { return "slot"; case Specimen: return "specimen"; + case SpecimenDefinition: + return "specimendefinition"; case StructureDefinition: return "structuredefinition"; case StructureMap: @@ -391,6 +400,8 @@ public enum ResourceType { return CarePlan; if ("CareTeam".equals(code)) return CareTeam; + if ("CatalogEntry".equals(code)) + return CatalogEntry; if ("ChargeItem".equals(code)) return ChargeItem; if ("Claim".equals(code)) @@ -453,6 +464,8 @@ public enum ResourceType { return EpisodeOfCare; if ("EventDefinition".equals(code)) return EventDefinition; + if ("ExampleScenario".equals(code)) + return ExampleScenario; if ("ExpansionProfile".equals(code)) return ExpansionProfile; if ("ExplanationOfBenefit".equals(code)) @@ -573,6 +586,8 @@ public enum ResourceType { return Slot; if ("Specimen".equals(code)) return Specimen; + if ("SpecimenDefinition".equals(code)) + return SpecimenDefinition; if ("StructureDefinition".equals(code)) return StructureDefinition; if ("StructureMap".equals(code)) diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RiskAssessment.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RiskAssessment.java index 929254ff3eb..49c05f60565 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RiskAssessment.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/RiskAssessment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SampledData.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SampledData.java index bcfe6f27ea2..b900e9cbb68 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SampledData.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SampledData.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Schedule.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Schedule.java index 4d468d2aa22..3ba95d61e12 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Schedule.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Schedule.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SearchParameter.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SearchParameter.java index affe95e857b..f3594513177 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SearchParameter.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SearchParameter.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Sequence.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Sequence.java index 4b4bd403bce..dc0282e3f3a 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Sequence.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Sequence.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -1653,7 +1653,14 @@ public class Sequence extends DomainResource { @Description(shortDefinition="F-score", formalDefinition="Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall)." ) protected DecimalType fScore; - private static final long serialVersionUID = -383644463L; + /** + * Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff. + */ + @Child(name = "roc", type = {}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Receiver Operator Characteristic (ROC) Curve", formalDefinition="Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff." ) + protected SequenceQualityRocComponent roc; + + private static final long serialVersionUID = 147678016L; /** * Constructor @@ -2413,6 +2420,30 @@ public class Sequence extends DomainResource { return this; } + /** + * @return {@link #roc} (Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.) + */ + public SequenceQualityRocComponent getRoc() { + if (this.roc == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceQualityComponent.roc"); + else if (Configuration.doAutoCreate()) + this.roc = new SequenceQualityRocComponent(); // cc + return this.roc; + } + + public boolean hasRoc() { + return this.roc != null && !this.roc.isEmpty(); + } + + /** + * @param value {@link #roc} (Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.) + */ + public SequenceQualityComponent setRoc(SequenceQualityRocComponent value) { + this.roc = value; + return this; + } + protected void listChildren(List children) { super.listChildren(children); children.add(new Property("type", "code", "INDEL / SNP / Undefined variant.", 0, 1, type)); @@ -2429,6 +2460,7 @@ public class Sequence extends DomainResource { children.add(new Property("precision", "decimal", "QUERY.TP / (QUERY.TP + QUERY.FP).", 0, 1, precision)); children.add(new Property("recall", "decimal", "TRUTH.TP / (TRUTH.TP + TRUTH.FN).", 0, 1, recall)); children.add(new Property("fScore", "decimal", "Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).", 0, 1, fScore)); + children.add(new Property("roc", "", "Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.", 0, 1, roc)); } @Override @@ -2448,6 +2480,7 @@ public class Sequence extends DomainResource { case -1376177026: /*precision*/ return new Property("precision", "decimal", "QUERY.TP / (QUERY.TP + QUERY.FP).", 0, 1, precision); case -934922479: /*recall*/ return new Property("recall", "decimal", "TRUTH.TP / (TRUTH.TP + TRUTH.FN).", 0, 1, recall); case -1295082036: /*fScore*/ return new Property("fScore", "decimal", "Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).", 0, 1, fScore); + case 113094: /*roc*/ return new Property("roc", "", "Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.", 0, 1, roc); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -2470,6 +2503,7 @@ public class Sequence extends DomainResource { case -1376177026: /*precision*/ return this.precision == null ? new Base[0] : new Base[] {this.precision}; // DecimalType case -934922479: /*recall*/ return this.recall == null ? new Base[0] : new Base[] {this.recall}; // DecimalType case -1295082036: /*fScore*/ return this.fScore == null ? new Base[0] : new Base[] {this.fScore}; // DecimalType + case 113094: /*roc*/ return this.roc == null ? new Base[0] : new Base[] {this.roc}; // SequenceQualityRocComponent default: return super.getProperty(hash, name, checkValid); } @@ -2521,6 +2555,9 @@ public class Sequence extends DomainResource { case -1295082036: // fScore this.fScore = castToDecimal(value); // DecimalType return value; + case 113094: // roc + this.roc = (SequenceQualityRocComponent) value; // SequenceQualityRocComponent + return value; default: return super.setProperty(hash, name, value); } @@ -2557,6 +2594,8 @@ public class Sequence extends DomainResource { this.recall = castToDecimal(value); // DecimalType } else if (name.equals("fScore")) { this.fScore = castToDecimal(value); // DecimalType + } else if (name.equals("roc")) { + this.roc = (SequenceQualityRocComponent) value; // SequenceQualityRocComponent } else return super.setProperty(name, value); return value; @@ -2579,6 +2618,7 @@ public class Sequence extends DomainResource { case -1376177026: return getPrecisionElement(); case -934922479: return getRecallElement(); case -1295082036: return getFScoreElement(); + case 113094: return getRoc(); default: return super.makeProperty(hash, name); } @@ -2601,6 +2641,7 @@ public class Sequence extends DomainResource { case -1376177026: /*precision*/ return new String[] {"decimal"}; case -934922479: /*recall*/ return new String[] {"decimal"}; case -1295082036: /*fScore*/ return new String[] {"decimal"}; + case 113094: /*roc*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); } @@ -2653,6 +2694,10 @@ public class Sequence extends DomainResource { else if (name.equals("fScore")) { throw new FHIRException("Cannot call addChild on a primitive type Sequence.fScore"); } + else if (name.equals("roc")) { + this.roc = new SequenceQualityRocComponent(); + return this.roc; + } else return super.addChild(name); } @@ -2674,6 +2719,7 @@ public class Sequence extends DomainResource { dst.precision = precision == null ? null : precision.copy(); dst.recall = recall == null ? null : recall.copy(); dst.fScore = fScore == null ? null : fScore.copy(); + dst.roc = roc == null ? null : roc.copy(); return dst; } @@ -2689,7 +2735,7 @@ public class Sequence extends DomainResource { && compareDeep(method, o.method, true) && compareDeep(truthTP, o.truthTP, true) && compareDeep(queryTP, o.queryTP, true) && compareDeep(truthFN, o.truthFN, true) && compareDeep(queryFP, o.queryFP, true) && compareDeep(gtFP, o.gtFP, true) && compareDeep(precision, o.precision, true) && compareDeep(recall, o.recall, true) && compareDeep(fScore, o.fScore, true) - ; + && compareDeep(roc, o.roc, true); } @Override @@ -2708,7 +2754,7 @@ public class Sequence extends DomainResource { public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, standardSequence, start , end, score, method, truthTP, queryTP, truthFN, queryFP, gtFP, precision - , recall, fScore); + , recall, fScore, roc); } public String fhirType() { @@ -2716,6 +2762,718 @@ public class Sequence extends DomainResource { } + } + + @Block() + public static class SequenceQualityRocComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Invidual data point representing the GQ (genotype quality) score threshold. + */ + @Child(name = "score", type = {IntegerType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Genotype quality score", formalDefinition="Invidual data point representing the GQ (genotype quality) score threshold." ) + protected List score; + + /** + * The number of true positives if the GQ score threshold was set to "score" field value. + */ + @Child(name = "numTP", type = {IntegerType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Roc score true positive numbers", formalDefinition="The number of true positives if the GQ score threshold was set to \"score\" field value." ) + protected List numTP; + + /** + * The number of false positives if the GQ score threshold was set to "score" field value. + */ + @Child(name = "numFP", type = {IntegerType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Roc score false positive numbers", formalDefinition="The number of false positives if the GQ score threshold was set to \"score\" field value." ) + protected List numFP; + + /** + * The number of false negatives if the GQ score threshold was set to "score" field value. + */ + @Child(name = "numFN", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Roc score false negative numbers", formalDefinition="The number of false negatives if the GQ score threshold was set to \"score\" field value." ) + protected List numFN; + + /** + * Calculated precision if the GQ score threshold was set to "score" field value. + */ + @Child(name = "precision", type = {DecimalType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Precision of the GQ score", formalDefinition="Calculated precision if the GQ score threshold was set to \"score\" field value." ) + protected List precision; + + /** + * Calculated sensitivity if the GQ score threshold was set to "score" field value. + */ + @Child(name = "sensitivity", type = {DecimalType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Sensitivity of the GQ score", formalDefinition="Calculated sensitivity if the GQ score threshold was set to \"score\" field value." ) + protected List sensitivity; + + /** + * Calculated fScore if the GQ score threshold was set to "score" field value. + */ + @Child(name = "fMeasure", type = {DecimalType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="FScore of the GQ score", formalDefinition="Calculated fScore if the GQ score threshold was set to \"score\" field value." ) + protected List fMeasure; + + private static final long serialVersionUID = 1923392132L; + + /** + * Constructor + */ + public SequenceQualityRocComponent() { + super(); + } + + /** + * @return {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.) + */ + public List getScore() { + if (this.score == null) + this.score = new ArrayList(); + return this.score; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setScore(List theScore) { + this.score = theScore; + return this; + } + + public boolean hasScore() { + if (this.score == null) + return false; + for (IntegerType item : this.score) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.) + */ + public IntegerType addScoreElement() {//2 + IntegerType t = new IntegerType(); + if (this.score == null) + this.score = new ArrayList(); + this.score.add(t); + return t; + } + + /** + * @param value {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.) + */ + public SequenceQualityRocComponent addScore(int value) { //1 + IntegerType t = new IntegerType(); + t.setValue(value); + if (this.score == null) + this.score = new ArrayList(); + this.score.add(t); + return this; + } + + /** + * @param value {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.) + */ + public boolean hasScore(int value) { + if (this.score == null) + return false; + for (IntegerType v : this.score) + if (v.equals(value)) // integer + return true; + return false; + } + + /** + * @return {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.) + */ + public List getNumTP() { + if (this.numTP == null) + this.numTP = new ArrayList(); + return this.numTP; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setNumTP(List theNumTP) { + this.numTP = theNumTP; + return this; + } + + public boolean hasNumTP() { + if (this.numTP == null) + return false; + for (IntegerType item : this.numTP) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.) + */ + public IntegerType addNumTPElement() {//2 + IntegerType t = new IntegerType(); + if (this.numTP == null) + this.numTP = new ArrayList(); + this.numTP.add(t); + return t; + } + + /** + * @param value {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.) + */ + public SequenceQualityRocComponent addNumTP(int value) { //1 + IntegerType t = new IntegerType(); + t.setValue(value); + if (this.numTP == null) + this.numTP = new ArrayList(); + this.numTP.add(t); + return this; + } + + /** + * @param value {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.) + */ + public boolean hasNumTP(int value) { + if (this.numTP == null) + return false; + for (IntegerType v : this.numTP) + if (v.equals(value)) // integer + return true; + return false; + } + + /** + * @return {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.) + */ + public List getNumFP() { + if (this.numFP == null) + this.numFP = new ArrayList(); + return this.numFP; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setNumFP(List theNumFP) { + this.numFP = theNumFP; + return this; + } + + public boolean hasNumFP() { + if (this.numFP == null) + return false; + for (IntegerType item : this.numFP) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.) + */ + public IntegerType addNumFPElement() {//2 + IntegerType t = new IntegerType(); + if (this.numFP == null) + this.numFP = new ArrayList(); + this.numFP.add(t); + return t; + } + + /** + * @param value {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.) + */ + public SequenceQualityRocComponent addNumFP(int value) { //1 + IntegerType t = new IntegerType(); + t.setValue(value); + if (this.numFP == null) + this.numFP = new ArrayList(); + this.numFP.add(t); + return this; + } + + /** + * @param value {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.) + */ + public boolean hasNumFP(int value) { + if (this.numFP == null) + return false; + for (IntegerType v : this.numFP) + if (v.equals(value)) // integer + return true; + return false; + } + + /** + * @return {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.) + */ + public List getNumFN() { + if (this.numFN == null) + this.numFN = new ArrayList(); + return this.numFN; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setNumFN(List theNumFN) { + this.numFN = theNumFN; + return this; + } + + public boolean hasNumFN() { + if (this.numFN == null) + return false; + for (IntegerType item : this.numFN) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.) + */ + public IntegerType addNumFNElement() {//2 + IntegerType t = new IntegerType(); + if (this.numFN == null) + this.numFN = new ArrayList(); + this.numFN.add(t); + return t; + } + + /** + * @param value {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.) + */ + public SequenceQualityRocComponent addNumFN(int value) { //1 + IntegerType t = new IntegerType(); + t.setValue(value); + if (this.numFN == null) + this.numFN = new ArrayList(); + this.numFN.add(t); + return this; + } + + /** + * @param value {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.) + */ + public boolean hasNumFN(int value) { + if (this.numFN == null) + return false; + for (IntegerType v : this.numFN) + if (v.equals(value)) // integer + return true; + return false; + } + + /** + * @return {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.) + */ + public List getPrecision() { + if (this.precision == null) + this.precision = new ArrayList(); + return this.precision; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setPrecision(List thePrecision) { + this.precision = thePrecision; + return this; + } + + public boolean hasPrecision() { + if (this.precision == null) + return false; + for (DecimalType item : this.precision) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.) + */ + public DecimalType addPrecisionElement() {//2 + DecimalType t = new DecimalType(); + if (this.precision == null) + this.precision = new ArrayList(); + this.precision.add(t); + return t; + } + + /** + * @param value {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.) + */ + public SequenceQualityRocComponent addPrecision(BigDecimal value) { //1 + DecimalType t = new DecimalType(); + t.setValue(value); + if (this.precision == null) + this.precision = new ArrayList(); + this.precision.add(t); + return this; + } + + /** + * @param value {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.) + */ + public boolean hasPrecision(BigDecimal value) { + if (this.precision == null) + return false; + for (DecimalType v : this.precision) + if (v.equals(value)) // decimal + return true; + return false; + } + + /** + * @return {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.) + */ + public List getSensitivity() { + if (this.sensitivity == null) + this.sensitivity = new ArrayList(); + return this.sensitivity; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setSensitivity(List theSensitivity) { + this.sensitivity = theSensitivity; + return this; + } + + public boolean hasSensitivity() { + if (this.sensitivity == null) + return false; + for (DecimalType item : this.sensitivity) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.) + */ + public DecimalType addSensitivityElement() {//2 + DecimalType t = new DecimalType(); + if (this.sensitivity == null) + this.sensitivity = new ArrayList(); + this.sensitivity.add(t); + return t; + } + + /** + * @param value {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.) + */ + public SequenceQualityRocComponent addSensitivity(BigDecimal value) { //1 + DecimalType t = new DecimalType(); + t.setValue(value); + if (this.sensitivity == null) + this.sensitivity = new ArrayList(); + this.sensitivity.add(t); + return this; + } + + /** + * @param value {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.) + */ + public boolean hasSensitivity(BigDecimal value) { + if (this.sensitivity == null) + return false; + for (DecimalType v : this.sensitivity) + if (v.equals(value)) // decimal + return true; + return false; + } + + /** + * @return {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.) + */ + public List getFMeasure() { + if (this.fMeasure == null) + this.fMeasure = new ArrayList(); + return this.fMeasure; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SequenceQualityRocComponent setFMeasure(List theFMeasure) { + this.fMeasure = theFMeasure; + return this; + } + + public boolean hasFMeasure() { + if (this.fMeasure == null) + return false; + for (DecimalType item : this.fMeasure) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.) + */ + public DecimalType addFMeasureElement() {//2 + DecimalType t = new DecimalType(); + if (this.fMeasure == null) + this.fMeasure = new ArrayList(); + this.fMeasure.add(t); + return t; + } + + /** + * @param value {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.) + */ + public SequenceQualityRocComponent addFMeasure(BigDecimal value) { //1 + DecimalType t = new DecimalType(); + t.setValue(value); + if (this.fMeasure == null) + this.fMeasure = new ArrayList(); + this.fMeasure.add(t); + return this; + } + + /** + * @param value {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.) + */ + public boolean hasFMeasure(BigDecimal value) { + if (this.fMeasure == null) + return false; + for (DecimalType v : this.fMeasure) + if (v.equals(value)) // decimal + return true; + return false; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("score", "integer", "Invidual data point representing the GQ (genotype quality) score threshold.", 0, java.lang.Integer.MAX_VALUE, score)); + children.add(new Property("numTP", "integer", "The number of true positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numTP)); + children.add(new Property("numFP", "integer", "The number of false positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFP)); + children.add(new Property("numFN", "integer", "The number of false negatives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFN)); + children.add(new Property("precision", "decimal", "Calculated precision if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, precision)); + children.add(new Property("sensitivity", "decimal", "Calculated sensitivity if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, sensitivity)); + children.add(new Property("fMeasure", "decimal", "Calculated fScore if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, fMeasure)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 109264530: /*score*/ return new Property("score", "integer", "Invidual data point representing the GQ (genotype quality) score threshold.", 0, java.lang.Integer.MAX_VALUE, score); + case 105180290: /*numTP*/ return new Property("numTP", "integer", "The number of true positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numTP); + case 105179856: /*numFP*/ return new Property("numFP", "integer", "The number of false positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFP); + case 105179854: /*numFN*/ return new Property("numFN", "integer", "The number of false negatives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFN); + case -1376177026: /*precision*/ return new Property("precision", "decimal", "Calculated precision if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, precision); + case 564403871: /*sensitivity*/ return new Property("sensitivity", "decimal", "Calculated sensitivity if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, sensitivity); + case -18997736: /*fMeasure*/ return new Property("fMeasure", "decimal", "Calculated fScore if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, fMeasure); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 109264530: /*score*/ return this.score == null ? new Base[0] : this.score.toArray(new Base[this.score.size()]); // IntegerType + case 105180290: /*numTP*/ return this.numTP == null ? new Base[0] : this.numTP.toArray(new Base[this.numTP.size()]); // IntegerType + case 105179856: /*numFP*/ return this.numFP == null ? new Base[0] : this.numFP.toArray(new Base[this.numFP.size()]); // IntegerType + case 105179854: /*numFN*/ return this.numFN == null ? new Base[0] : this.numFN.toArray(new Base[this.numFN.size()]); // IntegerType + case -1376177026: /*precision*/ return this.precision == null ? new Base[0] : this.precision.toArray(new Base[this.precision.size()]); // DecimalType + case 564403871: /*sensitivity*/ return this.sensitivity == null ? new Base[0] : this.sensitivity.toArray(new Base[this.sensitivity.size()]); // DecimalType + case -18997736: /*fMeasure*/ return this.fMeasure == null ? new Base[0] : this.fMeasure.toArray(new Base[this.fMeasure.size()]); // DecimalType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 109264530: // score + this.getScore().add(castToInteger(value)); // IntegerType + return value; + case 105180290: // numTP + this.getNumTP().add(castToInteger(value)); // IntegerType + return value; + case 105179856: // numFP + this.getNumFP().add(castToInteger(value)); // IntegerType + return value; + case 105179854: // numFN + this.getNumFN().add(castToInteger(value)); // IntegerType + return value; + case -1376177026: // precision + this.getPrecision().add(castToDecimal(value)); // DecimalType + return value; + case 564403871: // sensitivity + this.getSensitivity().add(castToDecimal(value)); // DecimalType + return value; + case -18997736: // fMeasure + this.getFMeasure().add(castToDecimal(value)); // DecimalType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("score")) { + this.getScore().add(castToInteger(value)); + } else if (name.equals("numTP")) { + this.getNumTP().add(castToInteger(value)); + } else if (name.equals("numFP")) { + this.getNumFP().add(castToInteger(value)); + } else if (name.equals("numFN")) { + this.getNumFN().add(castToInteger(value)); + } else if (name.equals("precision")) { + this.getPrecision().add(castToDecimal(value)); + } else if (name.equals("sensitivity")) { + this.getSensitivity().add(castToDecimal(value)); + } else if (name.equals("fMeasure")) { + this.getFMeasure().add(castToDecimal(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109264530: return addScoreElement(); + case 105180290: return addNumTPElement(); + case 105179856: return addNumFPElement(); + case 105179854: return addNumFNElement(); + case -1376177026: return addPrecisionElement(); + case 564403871: return addSensitivityElement(); + case -18997736: return addFMeasureElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109264530: /*score*/ return new String[] {"integer"}; + case 105180290: /*numTP*/ return new String[] {"integer"}; + case 105179856: /*numFP*/ return new String[] {"integer"}; + case 105179854: /*numFN*/ return new String[] {"integer"}; + case -1376177026: /*precision*/ return new String[] {"decimal"}; + case 564403871: /*sensitivity*/ return new String[] {"decimal"}; + case -18997736: /*fMeasure*/ return new String[] {"decimal"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("score")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.score"); + } + else if (name.equals("numTP")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.numTP"); + } + else if (name.equals("numFP")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.numFP"); + } + else if (name.equals("numFN")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.numFN"); + } + else if (name.equals("precision")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.precision"); + } + else if (name.equals("sensitivity")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.sensitivity"); + } + else if (name.equals("fMeasure")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.fMeasure"); + } + else + return super.addChild(name); + } + + public SequenceQualityRocComponent copy() { + SequenceQualityRocComponent dst = new SequenceQualityRocComponent(); + copyValues(dst); + if (score != null) { + dst.score = new ArrayList(); + for (IntegerType i : score) + dst.score.add(i.copy()); + }; + if (numTP != null) { + dst.numTP = new ArrayList(); + for (IntegerType i : numTP) + dst.numTP.add(i.copy()); + }; + if (numFP != null) { + dst.numFP = new ArrayList(); + for (IntegerType i : numFP) + dst.numFP.add(i.copy()); + }; + if (numFN != null) { + dst.numFN = new ArrayList(); + for (IntegerType i : numFN) + dst.numFN.add(i.copy()); + }; + if (precision != null) { + dst.precision = new ArrayList(); + for (DecimalType i : precision) + dst.precision.add(i.copy()); + }; + if (sensitivity != null) { + dst.sensitivity = new ArrayList(); + for (DecimalType i : sensitivity) + dst.sensitivity.add(i.copy()); + }; + if (fMeasure != null) { + dst.fMeasure = new ArrayList(); + for (DecimalType i : fMeasure) + dst.fMeasure.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceQualityRocComponent)) + return false; + SequenceQualityRocComponent o = (SequenceQualityRocComponent) other; + return compareDeep(score, o.score, true) && compareDeep(numTP, o.numTP, true) && compareDeep(numFP, o.numFP, true) + && compareDeep(numFN, o.numFN, true) && compareDeep(precision, o.precision, true) && compareDeep(sensitivity, o.sensitivity, true) + && compareDeep(fMeasure, o.fMeasure, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceQualityRocComponent)) + return false; + SequenceQualityRocComponent o = (SequenceQualityRocComponent) other; + return compareValues(score, o.score, true) && compareValues(numTP, o.numTP, true) && compareValues(numFP, o.numFP, true) + && compareValues(numFN, o.numFN, true) && compareValues(precision, o.precision, true) && compareValues(sensitivity, o.sensitivity, true) + && compareValues(fMeasure, o.fMeasure, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(score, numTP, numFP, numFN + , precision, sensitivity, fMeasure); + } + + public String fhirType() { + return "Sequence.quality.roc"; + + } + } @Block() @@ -3253,6 +4011,905 @@ public class Sequence extends DomainResource { } + } + + @Block() + public static class SequenceStructureVariantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries. + */ + @Child(name = "precision", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Precision of boundaries", formalDefinition="Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries." ) + protected StringType precision; + + /** + * Structural Variant reported aCGH ratio. + */ + @Child(name = "reportedaCGHRatio", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant reported aCGH ratio", formalDefinition="Structural Variant reported aCGH ratio." ) + protected DecimalType reportedaCGHRatio; + + /** + * Length of the variant choromosome. + */ + @Child(name = "length", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Length", formalDefinition="Length of the variant choromosome." ) + protected IntegerType length; + + /** + * Structural variant outer. + */ + @Child(name = "outer", type = {}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural variant outer", formalDefinition="Structural variant outer." ) + protected SequenceStructureVariantOuterComponent outer; + + /** + * Structural variant inner. + */ + @Child(name = "inner", type = {}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural variant inner", formalDefinition="Structural variant inner." ) + protected SequenceStructureVariantInnerComponent inner; + + private static final long serialVersionUID = 313275793L; + + /** + * Constructor + */ + public SequenceStructureVariantComponent() { + super(); + } + + /** + * @return {@link #precision} (Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries.). This is the underlying object with id, value and extensions. The accessor "getPrecision" gives direct access to the value + */ + public StringType getPrecisionElement() { + if (this.precision == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantComponent.precision"); + else if (Configuration.doAutoCreate()) + this.precision = new StringType(); // bb + return this.precision; + } + + public boolean hasPrecisionElement() { + return this.precision != null && !this.precision.isEmpty(); + } + + public boolean hasPrecision() { + return this.precision != null && !this.precision.isEmpty(); + } + + /** + * @param value {@link #precision} (Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries.). This is the underlying object with id, value and extensions. The accessor "getPrecision" gives direct access to the value + */ + public SequenceStructureVariantComponent setPrecisionElement(StringType value) { + this.precision = value; + return this; + } + + /** + * @return Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries. + */ + public String getPrecision() { + return this.precision == null ? null : this.precision.getValue(); + } + + /** + * @param value Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries. + */ + public SequenceStructureVariantComponent setPrecision(String value) { + if (Utilities.noString(value)) + this.precision = null; + else { + if (this.precision == null) + this.precision = new StringType(); + this.precision.setValue(value); + } + return this; + } + + /** + * @return {@link #reportedaCGHRatio} (Structural Variant reported aCGH ratio.). This is the underlying object with id, value and extensions. The accessor "getReportedaCGHRatio" gives direct access to the value + */ + public DecimalType getReportedaCGHRatioElement() { + if (this.reportedaCGHRatio == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantComponent.reportedaCGHRatio"); + else if (Configuration.doAutoCreate()) + this.reportedaCGHRatio = new DecimalType(); // bb + return this.reportedaCGHRatio; + } + + public boolean hasReportedaCGHRatioElement() { + return this.reportedaCGHRatio != null && !this.reportedaCGHRatio.isEmpty(); + } + + public boolean hasReportedaCGHRatio() { + return this.reportedaCGHRatio != null && !this.reportedaCGHRatio.isEmpty(); + } + + /** + * @param value {@link #reportedaCGHRatio} (Structural Variant reported aCGH ratio.). This is the underlying object with id, value and extensions. The accessor "getReportedaCGHRatio" gives direct access to the value + */ + public SequenceStructureVariantComponent setReportedaCGHRatioElement(DecimalType value) { + this.reportedaCGHRatio = value; + return this; + } + + /** + * @return Structural Variant reported aCGH ratio. + */ + public BigDecimal getReportedaCGHRatio() { + return this.reportedaCGHRatio == null ? null : this.reportedaCGHRatio.getValue(); + } + + /** + * @param value Structural Variant reported aCGH ratio. + */ + public SequenceStructureVariantComponent setReportedaCGHRatio(BigDecimal value) { + if (value == null) + this.reportedaCGHRatio = null; + else { + if (this.reportedaCGHRatio == null) + this.reportedaCGHRatio = new DecimalType(); + this.reportedaCGHRatio.setValue(value); + } + return this; + } + + /** + * @param value Structural Variant reported aCGH ratio. + */ + public SequenceStructureVariantComponent setReportedaCGHRatio(long value) { + this.reportedaCGHRatio = new DecimalType(); + this.reportedaCGHRatio.setValue(value); + return this; + } + + /** + * @param value Structural Variant reported aCGH ratio. + */ + public SequenceStructureVariantComponent setReportedaCGHRatio(double value) { + this.reportedaCGHRatio = new DecimalType(); + this.reportedaCGHRatio.setValue(value); + return this; + } + + /** + * @return {@link #length} (Length of the variant choromosome.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value + */ + public IntegerType getLengthElement() { + if (this.length == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantComponent.length"); + else if (Configuration.doAutoCreate()) + this.length = new IntegerType(); // bb + return this.length; + } + + public boolean hasLengthElement() { + return this.length != null && !this.length.isEmpty(); + } + + public boolean hasLength() { + return this.length != null && !this.length.isEmpty(); + } + + /** + * @param value {@link #length} (Length of the variant choromosome.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value + */ + public SequenceStructureVariantComponent setLengthElement(IntegerType value) { + this.length = value; + return this; + } + + /** + * @return Length of the variant choromosome. + */ + public int getLength() { + return this.length == null || this.length.isEmpty() ? 0 : this.length.getValue(); + } + + /** + * @param value Length of the variant choromosome. + */ + public SequenceStructureVariantComponent setLength(int value) { + if (this.length == null) + this.length = new IntegerType(); + this.length.setValue(value); + return this; + } + + /** + * @return {@link #outer} (Structural variant outer.) + */ + public SequenceStructureVariantOuterComponent getOuter() { + if (this.outer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantComponent.outer"); + else if (Configuration.doAutoCreate()) + this.outer = new SequenceStructureVariantOuterComponent(); // cc + return this.outer; + } + + public boolean hasOuter() { + return this.outer != null && !this.outer.isEmpty(); + } + + /** + * @param value {@link #outer} (Structural variant outer.) + */ + public SequenceStructureVariantComponent setOuter(SequenceStructureVariantOuterComponent value) { + this.outer = value; + return this; + } + + /** + * @return {@link #inner} (Structural variant inner.) + */ + public SequenceStructureVariantInnerComponent getInner() { + if (this.inner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantComponent.inner"); + else if (Configuration.doAutoCreate()) + this.inner = new SequenceStructureVariantInnerComponent(); // cc + return this.inner; + } + + public boolean hasInner() { + return this.inner != null && !this.inner.isEmpty(); + } + + /** + * @param value {@link #inner} (Structural variant inner.) + */ + public SequenceStructureVariantComponent setInner(SequenceStructureVariantInnerComponent value) { + this.inner = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("precision", "string", "Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries.", 0, 1, precision)); + children.add(new Property("reportedaCGHRatio", "decimal", "Structural Variant reported aCGH ratio.", 0, 1, reportedaCGHRatio)); + children.add(new Property("length", "integer", "Length of the variant choromosome.", 0, 1, length)); + children.add(new Property("outer", "", "Structural variant outer.", 0, 1, outer)); + children.add(new Property("inner", "", "Structural variant inner.", 0, 1, inner)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1376177026: /*precision*/ return new Property("precision", "string", "Identify the exact boundaries of variant sequences. Each type of structure variant requires the DNA duplex to be broken and rejoined, and this creates a new sequence of bases at the rejoined sites, known as breakpoints or boundaries.", 0, 1, precision); + case -1872600587: /*reportedaCGHRatio*/ return new Property("reportedaCGHRatio", "decimal", "Structural Variant reported aCGH ratio.", 0, 1, reportedaCGHRatio); + case -1106363674: /*length*/ return new Property("length", "integer", "Length of the variant choromosome.", 0, 1, length); + case 106111099: /*outer*/ return new Property("outer", "", "Structural variant outer.", 0, 1, outer); + case 100355670: /*inner*/ return new Property("inner", "", "Structural variant inner.", 0, 1, inner); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1376177026: /*precision*/ return this.precision == null ? new Base[0] : new Base[] {this.precision}; // StringType + case -1872600587: /*reportedaCGHRatio*/ return this.reportedaCGHRatio == null ? new Base[0] : new Base[] {this.reportedaCGHRatio}; // DecimalType + case -1106363674: /*length*/ return this.length == null ? new Base[0] : new Base[] {this.length}; // IntegerType + case 106111099: /*outer*/ return this.outer == null ? new Base[0] : new Base[] {this.outer}; // SequenceStructureVariantOuterComponent + case 100355670: /*inner*/ return this.inner == null ? new Base[0] : new Base[] {this.inner}; // SequenceStructureVariantInnerComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1376177026: // precision + this.precision = castToString(value); // StringType + return value; + case -1872600587: // reportedaCGHRatio + this.reportedaCGHRatio = castToDecimal(value); // DecimalType + return value; + case -1106363674: // length + this.length = castToInteger(value); // IntegerType + return value; + case 106111099: // outer + this.outer = (SequenceStructureVariantOuterComponent) value; // SequenceStructureVariantOuterComponent + return value; + case 100355670: // inner + this.inner = (SequenceStructureVariantInnerComponent) value; // SequenceStructureVariantInnerComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("precision")) { + this.precision = castToString(value); // StringType + } else if (name.equals("reportedaCGHRatio")) { + this.reportedaCGHRatio = castToDecimal(value); // DecimalType + } else if (name.equals("length")) { + this.length = castToInteger(value); // IntegerType + } else if (name.equals("outer")) { + this.outer = (SequenceStructureVariantOuterComponent) value; // SequenceStructureVariantOuterComponent + } else if (name.equals("inner")) { + this.inner = (SequenceStructureVariantInnerComponent) value; // SequenceStructureVariantInnerComponent + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1376177026: return getPrecisionElement(); + case -1872600587: return getReportedaCGHRatioElement(); + case -1106363674: return getLengthElement(); + case 106111099: return getOuter(); + case 100355670: return getInner(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1376177026: /*precision*/ return new String[] {"string"}; + case -1872600587: /*reportedaCGHRatio*/ return new String[] {"decimal"}; + case -1106363674: /*length*/ return new String[] {"integer"}; + case 106111099: /*outer*/ return new String[] {}; + case 100355670: /*inner*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("precision")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.precision"); + } + else if (name.equals("reportedaCGHRatio")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.reportedaCGHRatio"); + } + else if (name.equals("length")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.length"); + } + else if (name.equals("outer")) { + this.outer = new SequenceStructureVariantOuterComponent(); + return this.outer; + } + else if (name.equals("inner")) { + this.inner = new SequenceStructureVariantInnerComponent(); + return this.inner; + } + else + return super.addChild(name); + } + + public SequenceStructureVariantComponent copy() { + SequenceStructureVariantComponent dst = new SequenceStructureVariantComponent(); + copyValues(dst); + dst.precision = precision == null ? null : precision.copy(); + dst.reportedaCGHRatio = reportedaCGHRatio == null ? null : reportedaCGHRatio.copy(); + dst.length = length == null ? null : length.copy(); + dst.outer = outer == null ? null : outer.copy(); + dst.inner = inner == null ? null : inner.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceStructureVariantComponent)) + return false; + SequenceStructureVariantComponent o = (SequenceStructureVariantComponent) other; + return compareDeep(precision, o.precision, true) && compareDeep(reportedaCGHRatio, o.reportedaCGHRatio, true) + && compareDeep(length, o.length, true) && compareDeep(outer, o.outer, true) && compareDeep(inner, o.inner, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceStructureVariantComponent)) + return false; + SequenceStructureVariantComponent o = (SequenceStructureVariantComponent) other; + return compareValues(precision, o.precision, true) && compareValues(reportedaCGHRatio, o.reportedaCGHRatio, true) + && compareValues(length, o.length, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(precision, reportedaCGHRatio + , length, outer, inner); + } + + public String fhirType() { + return "Sequence.structureVariant"; + + } + + } + + @Block() + public static class SequenceStructureVariantOuterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive. + */ + @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Outer Start", formalDefinition="Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive." ) + protected IntegerType start; + + /** + * Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position. + */ + @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Outer End", formalDefinition="Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." ) + protected IntegerType end; + + private static final long serialVersionUID = -1798864889L; + + /** + * Constructor + */ + public SequenceStructureVariantOuterComponent() { + super(); + } + + /** + * @return {@link #start} (Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public IntegerType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantOuterComponent.start"); + else if (Configuration.doAutoCreate()) + this.start = new IntegerType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public SequenceStructureVariantOuterComponent setStartElement(IntegerType value) { + this.start = value; + return this; + } + + /** + * @return Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive. + */ + public int getStart() { + return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue(); + } + + /** + * @param value Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive. + */ + public SequenceStructureVariantOuterComponent setStart(int value) { + if (this.start == null) + this.start = new IntegerType(); + this.start.setValue(value); + return this; + } + + /** + * @return {@link #end} (Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public IntegerType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantOuterComponent.end"); + else if (Configuration.doAutoCreate()) + this.end = new IntegerType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public SequenceStructureVariantOuterComponent setEndElement(IntegerType value) { + this.end = value; + return this; + } + + /** + * @return Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position. + */ + public int getEnd() { + return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue(); + } + + /** + * @param value Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position. + */ + public SequenceStructureVariantOuterComponent setEnd(int value) { + if (this.end == null) + this.end = new IntegerType(); + this.end.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("start", "integer", "Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start)); + children.add(new Property("end", "integer", "Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 109757538: /*start*/ return new Property("start", "integer", "Structural Variant Outer Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start); + case 100571: /*end*/ return new Property("end", "integer", "Structural Variant Outer End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType + case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 109757538: // start + this.start = castToInteger(value); // IntegerType + return value; + case 100571: // end + this.end = castToInteger(value); // IntegerType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) { + this.start = castToInteger(value); // IntegerType + } else if (name.equals("end")) { + this.end = castToInteger(value); // IntegerType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109757538: return getStartElement(); + case 100571: return getEndElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109757538: /*start*/ return new String[] {"integer"}; + case 100571: /*end*/ return new String[] {"integer"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.end"); + } + else + return super.addChild(name); + } + + public SequenceStructureVariantOuterComponent copy() { + SequenceStructureVariantOuterComponent dst = new SequenceStructureVariantOuterComponent(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceStructureVariantOuterComponent)) + return false; + SequenceStructureVariantOuterComponent o = (SequenceStructureVariantOuterComponent) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceStructureVariantOuterComponent)) + return false; + SequenceStructureVariantOuterComponent o = (SequenceStructureVariantOuterComponent) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end); + } + + public String fhirType() { + return "Sequence.structureVariant.outer"; + + } + + } + + @Block() + public static class SequenceStructureVariantInnerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive. + */ + @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Inner Start", formalDefinition="Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive." ) + protected IntegerType start; + + /** + * Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position. + */ + @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Inner End", formalDefinition="Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." ) + protected IntegerType end; + + private static final long serialVersionUID = -1798864889L; + + /** + * Constructor + */ + public SequenceStructureVariantInnerComponent() { + super(); + } + + /** + * @return {@link #start} (Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public IntegerType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantInnerComponent.start"); + else if (Configuration.doAutoCreate()) + this.start = new IntegerType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public SequenceStructureVariantInnerComponent setStartElement(IntegerType value) { + this.start = value; + return this; + } + + /** + * @return Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive. + */ + public int getStart() { + return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue(); + } + + /** + * @param value Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive. + */ + public SequenceStructureVariantInnerComponent setStart(int value) { + if (this.start == null) + this.start = new IntegerType(); + this.start.setValue(value); + return this; + } + + /** + * @return {@link #end} (Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public IntegerType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariantInnerComponent.end"); + else if (Configuration.doAutoCreate()) + this.end = new IntegerType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public SequenceStructureVariantInnerComponent setEndElement(IntegerType value) { + this.end = value; + return this; + } + + /** + * @return Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position. + */ + public int getEnd() { + return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue(); + } + + /** + * @param value Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position. + */ + public SequenceStructureVariantInnerComponent setEnd(int value) { + if (this.end == null) + this.end = new IntegerType(); + this.end.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("start", "integer", "Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start)); + children.add(new Property("end", "integer", "Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 109757538: /*start*/ return new Property("start", "integer", "Structural Variant Inner Start.If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start); + case 100571: /*end*/ return new Property("end", "integer", "Structural Variant Inner End. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType + case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 109757538: // start + this.start = castToInteger(value); // IntegerType + return value; + case 100571: // end + this.end = castToInteger(value); // IntegerType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) { + this.start = castToInteger(value); // IntegerType + } else if (name.equals("end")) { + this.end = castToInteger(value); // IntegerType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109757538: return getStartElement(); + case 100571: return getEndElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 109757538: /*start*/ return new String[] {"integer"}; + case 100571: /*end*/ return new String[] {"integer"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.end"); + } + else + return super.addChild(name); + } + + public SequenceStructureVariantInnerComponent copy() { + SequenceStructureVariantInnerComponent dst = new SequenceStructureVariantInnerComponent(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceStructureVariantInnerComponent)) + return false; + SequenceStructureVariantInnerComponent o = (SequenceStructureVariantInnerComponent) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceStructureVariantInnerComponent)) + return false; + SequenceStructureVariantInnerComponent o = (SequenceStructureVariantInnerComponent) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end); + } + + public String fhirType() { + return "Sequence.structureVariant.inner"; + + } + } /** @@ -3386,7 +5043,14 @@ public class Sequence extends DomainResource { protected List pointerTarget; - private static final long serialVersionUID = -2101352712L; + /** + * Information about chromosome structure variation. + */ + @Child(name = "structureVariant", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Structural variant", formalDefinition="Information about chromosome structure variation." ) + protected List structureVariant; + + private static final long serialVersionUID = 2091706446L; /** * Constructor @@ -4102,6 +5766,59 @@ public class Sequence extends DomainResource { return r; } + /** + * @return {@link #structureVariant} (Information about chromosome structure variation.) + */ + public List getStructureVariant() { + if (this.structureVariant == null) + this.structureVariant = new ArrayList(); + return this.structureVariant; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Sequence setStructureVariant(List theStructureVariant) { + this.structureVariant = theStructureVariant; + return this; + } + + public boolean hasStructureVariant() { + if (this.structureVariant == null) + return false; + for (SequenceStructureVariantComponent item : this.structureVariant) + if (!item.isEmpty()) + return true; + return false; + } + + public SequenceStructureVariantComponent addStructureVariant() { //3 + SequenceStructureVariantComponent t = new SequenceStructureVariantComponent(); + if (this.structureVariant == null) + this.structureVariant = new ArrayList(); + this.structureVariant.add(t); + return t; + } + + public Sequence addStructureVariant(SequenceStructureVariantComponent t) { //3 + if (t == null) + return this; + if (this.structureVariant == null) + this.structureVariant = new ArrayList(); + this.structureVariant.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #structureVariant}, creating it if it does not already exist + */ + public SequenceStructureVariantComponent getStructureVariantFirstRep() { + if (getStructureVariant().isEmpty()) { + addStructureVariant(); + } + return getStructureVariant().get(0); + } + protected void listChildren(List children) { super.listChildren(children); children.add(new Property("identifier", "Identifier", "A unique identifier for this particular sequence instance. This is a FHIR-defined id.", 0, java.lang.Integer.MAX_VALUE, identifier)); @@ -4119,6 +5836,7 @@ public class Sequence extends DomainResource { children.add(new Property("readCoverage", "integer", "Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", 0, 1, readCoverage)); children.add(new Property("repository", "", "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", 0, java.lang.Integer.MAX_VALUE, repository)); children.add(new Property("pointer", "Reference(Sequence)", "Pointer to next atomic sequence which at most contains one variant.", 0, java.lang.Integer.MAX_VALUE, pointer)); + children.add(new Property("structureVariant", "", "Information about chromosome structure variation.", 0, java.lang.Integer.MAX_VALUE, structureVariant)); } @Override @@ -4139,6 +5857,7 @@ public class Sequence extends DomainResource { case -1798816354: /*readCoverage*/ return new Property("readCoverage", "integer", "Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", 0, 1, readCoverage); case 1950800714: /*repository*/ return new Property("repository", "", "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", 0, java.lang.Integer.MAX_VALUE, repository); case -400605635: /*pointer*/ return new Property("pointer", "Reference(Sequence)", "Pointer to next atomic sequence which at most contains one variant.", 0, java.lang.Integer.MAX_VALUE, pointer); + case 757269394: /*structureVariant*/ return new Property("structureVariant", "", "Information about chromosome structure variation.", 0, java.lang.Integer.MAX_VALUE, structureVariant); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -4162,6 +5881,7 @@ public class Sequence extends DomainResource { case -1798816354: /*readCoverage*/ return this.readCoverage == null ? new Base[0] : new Base[] {this.readCoverage}; // IntegerType case 1950800714: /*repository*/ return this.repository == null ? new Base[0] : this.repository.toArray(new Base[this.repository.size()]); // SequenceRepositoryComponent case -400605635: /*pointer*/ return this.pointer == null ? new Base[0] : this.pointer.toArray(new Base[this.pointer.size()]); // Reference + case 757269394: /*structureVariant*/ return this.structureVariant == null ? new Base[0] : this.structureVariant.toArray(new Base[this.structureVariant.size()]); // SequenceStructureVariantComponent default: return super.getProperty(hash, name, checkValid); } @@ -4216,6 +5936,9 @@ public class Sequence extends DomainResource { case -400605635: // pointer this.getPointer().add(castToReference(value)); // Reference return value; + case 757269394: // structureVariant + this.getStructureVariant().add((SequenceStructureVariantComponent) value); // SequenceStructureVariantComponent + return value; default: return super.setProperty(hash, name, value); } @@ -4254,6 +5977,8 @@ public class Sequence extends DomainResource { this.getRepository().add((SequenceRepositoryComponent) value); } else if (name.equals("pointer")) { this.getPointer().add(castToReference(value)); + } else if (name.equals("structureVariant")) { + this.getStructureVariant().add((SequenceStructureVariantComponent) value); } else return super.setProperty(name, value); return value; @@ -4277,6 +6002,7 @@ public class Sequence extends DomainResource { case -1798816354: return getReadCoverageElement(); case 1950800714: return addRepository(); case -400605635: return addPointer(); + case 757269394: return addStructureVariant(); default: return super.makeProperty(hash, name); } @@ -4300,6 +6026,7 @@ public class Sequence extends DomainResource { case -1798816354: /*readCoverage*/ return new String[] {"integer"}; case 1950800714: /*repository*/ return new String[] {}; case -400605635: /*pointer*/ return new String[] {"Reference"}; + case 757269394: /*structureVariant*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); } @@ -4358,6 +6085,9 @@ public class Sequence extends DomainResource { else if (name.equals("pointer")) { return addPointer(); } + else if (name.equals("structureVariant")) { + return addStructureVariant(); + } else return super.addChild(name); } @@ -4405,6 +6135,11 @@ public class Sequence extends DomainResource { for (Reference i : pointer) dst.pointer.add(i.copy()); }; + if (structureVariant != null) { + dst.structureVariant = new ArrayList(); + for (SequenceStructureVariantComponent i : structureVariant) + dst.structureVariant.add(i.copy()); + }; return dst; } @@ -4424,7 +6159,8 @@ public class Sequence extends DomainResource { && compareDeep(performer, o.performer, true) && compareDeep(quantity, o.quantity, true) && compareDeep(referenceSeq, o.referenceSeq, true) && compareDeep(variant, o.variant, true) && compareDeep(observedSeq, o.observedSeq, true) && compareDeep(quality, o.quality, true) && compareDeep(readCoverage, o.readCoverage, true) && compareDeep(repository, o.repository, true) - && compareDeep(pointer, o.pointer, true); + && compareDeep(pointer, o.pointer, true) && compareDeep(structureVariant, o.structureVariant, true) + ; } @Override @@ -4442,7 +6178,7 @@ public class Sequence extends DomainResource { public boolean isEmpty() { return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, coordinateSystem , patient, specimen, device, performer, quantity, referenceSeq, variant, observedSeq - , quality, readCoverage, repository, pointer); + , quality, readCoverage, repository, pointer, structureVariant); } @Override diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ServiceDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ServiceDefinition.java index 9fc84966fdf..718e243772f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ServiceDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ServiceDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Signature.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Signature.java index 0f76c379eba..1592decaeee 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Signature.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Signature.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -78,17 +78,17 @@ public class Signature extends Type implements ICompositeType { protected Type onBehalfOf; /** - * A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. + * A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc. */ @Child(name = "contentType", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The technical format of the signature", formalDefinition="A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc." ) + @Description(shortDefinition="The technical format of the signature", formalDefinition="A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc." ) protected CodeType contentType; /** * The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty. */ @Child(name = "blob", type = {Base64BinaryType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The actual signature content (XML DigSig. JWT, picture, etc.)", formalDefinition="The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty." ) + @Description(shortDefinition="The actual signature content (XML DigSig. JWS, picture, etc.)", formalDefinition="The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty." ) protected Base64BinaryType blob; private static final long serialVersionUID = 1133697310L; @@ -298,7 +298,7 @@ public class Signature extends Type implements ICompositeType { } /** - * @return {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + * @return {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value */ public CodeType getContentTypeElement() { if (this.contentType == null) @@ -318,7 +318,7 @@ public class Signature extends Type implements ICompositeType { } /** - * @param value {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + * @param value {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value */ public Signature setContentTypeElement(CodeType value) { this.contentType = value; @@ -326,14 +326,14 @@ public class Signature extends Type implements ICompositeType { } /** - * @return A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. + * @return A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc. */ public String getContentType() { return this.contentType == null ? null : this.contentType.getValue(); } /** - * @param value A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. + * @param value A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc. */ public Signature setContentType(String value) { if (Utilities.noString(value)) @@ -401,7 +401,7 @@ public class Signature extends Type implements ICompositeType { children.add(new Property("when", "instant", "When the digital signature was signed.", 0, 1, when)); children.add(new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).", 0, 1, who)); children.add(new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the identity that is represented by the signature.", 0, 1, onBehalfOf)); - children.add(new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.", 0, 1, contentType)); + children.add(new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.", 0, 1, contentType)); children.add(new Property("blob", "base64Binary", "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", 0, 1, blob)); } @@ -418,7 +418,7 @@ public class Signature extends Type implements ICompositeType { case -14402964: /*onBehalfOf*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the identity that is represented by the signature.", 0, 1, onBehalfOf); case 418114400: /*onBehalfOfUri*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the identity that is represented by the signature.", 0, 1, onBehalfOf); case -1136255425: /*onBehalfOfReference*/ return new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the identity that is represented by the signature.", 0, 1, onBehalfOf); - case -389131437: /*contentType*/ return new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.", 0, 1, contentType); + case -389131437: /*contentType*/ return new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.", 0, 1, contentType); case 3026845: /*blob*/ return new Property("blob", "base64Binary", "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", 0, 1, blob); default: return super.getNamedProperty(_hash, _name, _checkValid); } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SimpleQuantity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SimpleQuantity.java index 0df1c8a67c5..2497ec3ce09 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SimpleQuantity.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SimpleQuantity.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Slot.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Slot.java index 3a7606058f1..676d51c0fc3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Slot.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Slot.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Specimen.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Specimen.java index d569274bc20..c6ad7da16d1 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Specimen.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Specimen.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SpecimenDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SpecimenDefinition.java new file mode 100644 index 00000000000..0c67de3b9d9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SpecimenDefinition.java @@ -0,0 +1,2317 @@ +package org.hl7.fhir.r4.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.exceptions.FHIRException; +/** + * A kind of specimen with associated set of requirements. + */ +@ResourceDef(name="SpecimenDefinition", profile="http://hl7.org/fhir/Profile/SpecimenDefinition") +public class SpecimenDefinition extends DomainResource { + + public enum SpecimenContainedPreference { + /** + * This type of contained specimen is preferred to collect this kind of specimen + */ + PREFERRED, + /** + * This type of conditioned specimen is an alternate + */ + ALTERNATE, + /** + * added to help the parsers with the generic types + */ + NULL; + public static SpecimenContainedPreference fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preferred".equals(codeString)) + return PREFERRED; + if ("alternate".equals(codeString)) + return ALTERNATE; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown SpecimenContainedPreference code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREFERRED: return "preferred"; + case ALTERNATE: return "alternate"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PREFERRED: return "http://hl7.org/fhir/specimen-contained-preference"; + case ALTERNATE: return "http://hl7.org/fhir/specimen-contained-preference"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PREFERRED: return "This type of contained specimen is preferred to collect this kind of specimen"; + case ALTERNATE: return "This type of conditioned specimen is an alternate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREFERRED: return "Preferred"; + case ALTERNATE: return "Alternate"; + default: return "?"; + } + } + } + + public static class SpecimenContainedPreferenceEnumFactory implements EnumFactory { + public SpecimenContainedPreference fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("preferred".equals(codeString)) + return SpecimenContainedPreference.PREFERRED; + if ("alternate".equals(codeString)) + return SpecimenContainedPreference.ALTERNATE; + throw new IllegalArgumentException("Unknown SpecimenContainedPreference code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("preferred".equals(codeString)) + return new Enumeration(this, SpecimenContainedPreference.PREFERRED); + if ("alternate".equals(codeString)) + return new Enumeration(this, SpecimenContainedPreference.ALTERNATE); + throw new FHIRException("Unknown SpecimenContainedPreference code '"+codeString+"'"); + } + public String toCode(SpecimenContainedPreference code) { + if (code == SpecimenContainedPreference.PREFERRED) + return "preferred"; + if (code == SpecimenContainedPreference.ALTERNATE) + return "alternate"; + return "?"; + } + public String toSystem(SpecimenContainedPreference code) { + return code.getSystem(); + } + } + + @Block() + public static class SpecimenDefinitionSpecimenToLabComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Primary of secondary specimen. + */ + @Child(name = "isDerived", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Primary or secondary specimen", formalDefinition="Primary of secondary specimen." ) + protected BooleanType isDerived; + + /** + * The kind of specimen conditioned for testing expected by lab. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of intended specimen", formalDefinition="The kind of specimen conditioned for testing expected by lab." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v2-0487") + protected CodeableConcept type; + + /** + * The preference for this type of conditioned specimen. + */ + @Child(name = "preference", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="preferred | alternate", formalDefinition="The preference for this type of conditioned specimen." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-contained-preference") + protected Enumeration preference; + + /** + * The type of material of the container. + */ + @Child(name = "containerMaterial", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Container material", formalDefinition="The type of material of the container." ) + protected CodeableConcept containerMaterial; + + /** + * The type of container used to contain this kind of specimen. + */ + @Child(name = "containerType", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Kind of container associated with the kind of specimen", formalDefinition="The type of container used to contain this kind of specimen." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-container-type") + protected CodeableConcept containerType; + + /** + * Color of container cap. + */ + @Child(name = "containerCap", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Color of container cap", formalDefinition="Color of container cap." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/container-cap") + protected CodeableConcept containerCap; + + /** + * The textual description of the kind of container. + */ + @Child(name = "containerDescription", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Container description", formalDefinition="The textual description of the kind of container." ) + protected StringType containerDescription; + + /** + * The capacity (volume or other measure) of this kind of container. + */ + @Child(name = "containerCapacity", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Container capacity", formalDefinition="The capacity (volume or other measure) of this kind of container." ) + protected SimpleQuantity containerCapacity; + + /** + * The minimum volume to be conditioned in the container. + */ + @Child(name = "containerMinimumVolume", type = {SimpleQuantity.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Minimum volume", formalDefinition="The minimum volume to be conditioned in the container." ) + protected SimpleQuantity containerMinimumVolume; + + /** + * Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA. + */ + @Child(name = "containerAdditive", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additive associated with container", formalDefinition="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." ) + protected List containerAdditive; + + /** + * Special processing that should be applied to the container for this kind of specimen. + */ + @Child(name = "containerPreparation", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specimen container preparation", formalDefinition="Special processing that should be applied to the container for this kind of specimen." ) + protected StringType containerPreparation; + + /** + * Requirements for delivery and special handling of this kind of conditioned specimen. + */ + @Child(name = "requirement", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specimen requirements", formalDefinition="Requirements for delivery and special handling of this kind of conditioned specimen." ) + protected StringType requirement; + + /** + * The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing. + */ + @Child(name = "retentionTime", type = {Duration.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specimen retention time", formalDefinition="The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing." ) + protected Duration retentionTime; + + /** + * Criterion for rejection of the specimen in its container by the laboratory. + */ + @Child(name = "rejectionCriterion", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Rejection criterion", formalDefinition="Criterion for rejection of the specimen in its container by the laboratory." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/rejection-criteria") + protected List rejectionCriterion; + + /** + * Set of instructions for conservation/transport of the specimen at a defined temperature interval, prior the testing process. + */ + @Child(name = "handling", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specimen handling before testing", formalDefinition="Set of instructions for conservation/transport of the specimen at a defined temperature interval, prior the testing process." ) + protected List handling; + + private static final long serialVersionUID = -239351274L; + + /** + * Constructor + */ + public SpecimenDefinitionSpecimenToLabComponent() { + super(); + } + + /** + * Constructor + */ + public SpecimenDefinitionSpecimenToLabComponent(BooleanType isDerived, Enumeration preference) { + super(); + this.isDerived = isDerived; + this.preference = preference; + } + + /** + * @return {@link #isDerived} (Primary of secondary specimen.). This is the underlying object with id, value and extensions. The accessor "getIsDerived" gives direct access to the value + */ + public BooleanType getIsDerivedElement() { + if (this.isDerived == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.isDerived"); + else if (Configuration.doAutoCreate()) + this.isDerived = new BooleanType(); // bb + return this.isDerived; + } + + public boolean hasIsDerivedElement() { + return this.isDerived != null && !this.isDerived.isEmpty(); + } + + public boolean hasIsDerived() { + return this.isDerived != null && !this.isDerived.isEmpty(); + } + + /** + * @param value {@link #isDerived} (Primary of secondary specimen.). This is the underlying object with id, value and extensions. The accessor "getIsDerived" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabComponent setIsDerivedElement(BooleanType value) { + this.isDerived = value; + return this; + } + + /** + * @return Primary of secondary specimen. + */ + public boolean getIsDerived() { + return this.isDerived == null || this.isDerived.isEmpty() ? false : this.isDerived.getValue(); + } + + /** + * @param value Primary of secondary specimen. + */ + public SpecimenDefinitionSpecimenToLabComponent setIsDerived(boolean value) { + if (this.isDerived == null) + this.isDerived = new BooleanType(); + this.isDerived.setValue(value); + return this; + } + + /** + * @return {@link #type} (The kind of specimen conditioned for testing expected by lab.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The kind of specimen conditioned for testing expected by lab.) + */ + public SpecimenDefinitionSpecimenToLabComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #preference} (The preference for this type of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getPreference" gives direct access to the value + */ + public Enumeration getPreferenceElement() { + if (this.preference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.preference"); + else if (Configuration.doAutoCreate()) + this.preference = new Enumeration(new SpecimenContainedPreferenceEnumFactory()); // bb + return this.preference; + } + + public boolean hasPreferenceElement() { + return this.preference != null && !this.preference.isEmpty(); + } + + public boolean hasPreference() { + return this.preference != null && !this.preference.isEmpty(); + } + + /** + * @param value {@link #preference} (The preference for this type of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getPreference" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabComponent setPreferenceElement(Enumeration value) { + this.preference = value; + return this; + } + + /** + * @return The preference for this type of conditioned specimen. + */ + public SpecimenContainedPreference getPreference() { + return this.preference == null ? null : this.preference.getValue(); + } + + /** + * @param value The preference for this type of conditioned specimen. + */ + public SpecimenDefinitionSpecimenToLabComponent setPreference(SpecimenContainedPreference value) { + if (this.preference == null) + this.preference = new Enumeration(new SpecimenContainedPreferenceEnumFactory()); + this.preference.setValue(value); + return this; + } + + /** + * @return {@link #containerMaterial} (The type of material of the container.) + */ + public CodeableConcept getContainerMaterial() { + if (this.containerMaterial == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerMaterial"); + else if (Configuration.doAutoCreate()) + this.containerMaterial = new CodeableConcept(); // cc + return this.containerMaterial; + } + + public boolean hasContainerMaterial() { + return this.containerMaterial != null && !this.containerMaterial.isEmpty(); + } + + /** + * @param value {@link #containerMaterial} (The type of material of the container.) + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerMaterial(CodeableConcept value) { + this.containerMaterial = value; + return this; + } + + /** + * @return {@link #containerType} (The type of container used to contain this kind of specimen.) + */ + public CodeableConcept getContainerType() { + if (this.containerType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerType"); + else if (Configuration.doAutoCreate()) + this.containerType = new CodeableConcept(); // cc + return this.containerType; + } + + public boolean hasContainerType() { + return this.containerType != null && !this.containerType.isEmpty(); + } + + /** + * @param value {@link #containerType} (The type of container used to contain this kind of specimen.) + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerType(CodeableConcept value) { + this.containerType = value; + return this; + } + + /** + * @return {@link #containerCap} (Color of container cap.) + */ + public CodeableConcept getContainerCap() { + if (this.containerCap == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerCap"); + else if (Configuration.doAutoCreate()) + this.containerCap = new CodeableConcept(); // cc + return this.containerCap; + } + + public boolean hasContainerCap() { + return this.containerCap != null && !this.containerCap.isEmpty(); + } + + /** + * @param value {@link #containerCap} (Color of container cap.) + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerCap(CodeableConcept value) { + this.containerCap = value; + return this; + } + + /** + * @return {@link #containerDescription} (The textual description of the kind of container.). This is the underlying object with id, value and extensions. The accessor "getContainerDescription" gives direct access to the value + */ + public StringType getContainerDescriptionElement() { + if (this.containerDescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerDescription"); + else if (Configuration.doAutoCreate()) + this.containerDescription = new StringType(); // bb + return this.containerDescription; + } + + public boolean hasContainerDescriptionElement() { + return this.containerDescription != null && !this.containerDescription.isEmpty(); + } + + public boolean hasContainerDescription() { + return this.containerDescription != null && !this.containerDescription.isEmpty(); + } + + /** + * @param value {@link #containerDescription} (The textual description of the kind of container.). This is the underlying object with id, value and extensions. The accessor "getContainerDescription" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerDescriptionElement(StringType value) { + this.containerDescription = value; + return this; + } + + /** + * @return The textual description of the kind of container. + */ + public String getContainerDescription() { + return this.containerDescription == null ? null : this.containerDescription.getValue(); + } + + /** + * @param value The textual description of the kind of container. + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerDescription(String value) { + if (Utilities.noString(value)) + this.containerDescription = null; + else { + if (this.containerDescription == null) + this.containerDescription = new StringType(); + this.containerDescription.setValue(value); + } + return this; + } + + /** + * @return {@link #containerCapacity} (The capacity (volume or other measure) of this kind of container.) + */ + public SimpleQuantity getContainerCapacity() { + if (this.containerCapacity == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerCapacity"); + else if (Configuration.doAutoCreate()) + this.containerCapacity = new SimpleQuantity(); // cc + return this.containerCapacity; + } + + public boolean hasContainerCapacity() { + return this.containerCapacity != null && !this.containerCapacity.isEmpty(); + } + + /** + * @param value {@link #containerCapacity} (The capacity (volume or other measure) of this kind of container.) + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerCapacity(SimpleQuantity value) { + this.containerCapacity = value; + return this; + } + + /** + * @return {@link #containerMinimumVolume} (The minimum volume to be conditioned in the container.) + */ + public SimpleQuantity getContainerMinimumVolume() { + if (this.containerMinimumVolume == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerMinimumVolume"); + else if (Configuration.doAutoCreate()) + this.containerMinimumVolume = new SimpleQuantity(); // cc + return this.containerMinimumVolume; + } + + public boolean hasContainerMinimumVolume() { + return this.containerMinimumVolume != null && !this.containerMinimumVolume.isEmpty(); + } + + /** + * @param value {@link #containerMinimumVolume} (The minimum volume to be conditioned in the container.) + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerMinimumVolume(SimpleQuantity value) { + this.containerMinimumVolume = value; + return this; + } + + /** + * @return {@link #containerAdditive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public List getContainerAdditive() { + if (this.containerAdditive == null) + this.containerAdditive = new ArrayList(); + return this.containerAdditive; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerAdditive(List theContainerAdditive) { + this.containerAdditive = theContainerAdditive; + return this; + } + + public boolean hasContainerAdditive() { + if (this.containerAdditive == null) + return false; + for (SpecimenDefinitionSpecimenToLabContainerAdditiveComponent item : this.containerAdditive) + if (!item.isEmpty()) + return true; + return false; + } + + public SpecimenDefinitionSpecimenToLabContainerAdditiveComponent addContainerAdditive() { //3 + SpecimenDefinitionSpecimenToLabContainerAdditiveComponent t = new SpecimenDefinitionSpecimenToLabContainerAdditiveComponent(); + if (this.containerAdditive == null) + this.containerAdditive = new ArrayList(); + this.containerAdditive.add(t); + return t; + } + + public SpecimenDefinitionSpecimenToLabComponent addContainerAdditive(SpecimenDefinitionSpecimenToLabContainerAdditiveComponent t) { //3 + if (t == null) + return this; + if (this.containerAdditive == null) + this.containerAdditive = new ArrayList(); + this.containerAdditive.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #containerAdditive}, creating it if it does not already exist + */ + public SpecimenDefinitionSpecimenToLabContainerAdditiveComponent getContainerAdditiveFirstRep() { + if (getContainerAdditive().isEmpty()) { + addContainerAdditive(); + } + return getContainerAdditive().get(0); + } + + /** + * @return {@link #containerPreparation} (Special processing that should be applied to the container for this kind of specimen.). This is the underlying object with id, value and extensions. The accessor "getContainerPreparation" gives direct access to the value + */ + public StringType getContainerPreparationElement() { + if (this.containerPreparation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.containerPreparation"); + else if (Configuration.doAutoCreate()) + this.containerPreparation = new StringType(); // bb + return this.containerPreparation; + } + + public boolean hasContainerPreparationElement() { + return this.containerPreparation != null && !this.containerPreparation.isEmpty(); + } + + public boolean hasContainerPreparation() { + return this.containerPreparation != null && !this.containerPreparation.isEmpty(); + } + + /** + * @param value {@link #containerPreparation} (Special processing that should be applied to the container for this kind of specimen.). This is the underlying object with id, value and extensions. The accessor "getContainerPreparation" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerPreparationElement(StringType value) { + this.containerPreparation = value; + return this; + } + + /** + * @return Special processing that should be applied to the container for this kind of specimen. + */ + public String getContainerPreparation() { + return this.containerPreparation == null ? null : this.containerPreparation.getValue(); + } + + /** + * @param value Special processing that should be applied to the container for this kind of specimen. + */ + public SpecimenDefinitionSpecimenToLabComponent setContainerPreparation(String value) { + if (Utilities.noString(value)) + this.containerPreparation = null; + else { + if (this.containerPreparation == null) + this.containerPreparation = new StringType(); + this.containerPreparation.setValue(value); + } + return this; + } + + /** + * @return {@link #requirement} (Requirements for delivery and special handling of this kind of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getRequirement" gives direct access to the value + */ + public StringType getRequirementElement() { + if (this.requirement == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.requirement"); + else if (Configuration.doAutoCreate()) + this.requirement = new StringType(); // bb + return this.requirement; + } + + public boolean hasRequirementElement() { + return this.requirement != null && !this.requirement.isEmpty(); + } + + public boolean hasRequirement() { + return this.requirement != null && !this.requirement.isEmpty(); + } + + /** + * @param value {@link #requirement} (Requirements for delivery and special handling of this kind of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getRequirement" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabComponent setRequirementElement(StringType value) { + this.requirement = value; + return this; + } + + /** + * @return Requirements for delivery and special handling of this kind of conditioned specimen. + */ + public String getRequirement() { + return this.requirement == null ? null : this.requirement.getValue(); + } + + /** + * @param value Requirements for delivery and special handling of this kind of conditioned specimen. + */ + public SpecimenDefinitionSpecimenToLabComponent setRequirement(String value) { + if (Utilities.noString(value)) + this.requirement = null; + else { + if (this.requirement == null) + this.requirement = new StringType(); + this.requirement.setValue(value); + } + return this; + } + + /** + * @return {@link #retentionTime} (The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.) + */ + public Duration getRetentionTime() { + if (this.retentionTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabComponent.retentionTime"); + else if (Configuration.doAutoCreate()) + this.retentionTime = new Duration(); // cc + return this.retentionTime; + } + + public boolean hasRetentionTime() { + return this.retentionTime != null && !this.retentionTime.isEmpty(); + } + + /** + * @param value {@link #retentionTime} (The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.) + */ + public SpecimenDefinitionSpecimenToLabComponent setRetentionTime(Duration value) { + this.retentionTime = value; + return this; + } + + /** + * @return {@link #rejectionCriterion} (Criterion for rejection of the specimen in its container by the laboratory.) + */ + public List getRejectionCriterion() { + if (this.rejectionCriterion == null) + this.rejectionCriterion = new ArrayList(); + return this.rejectionCriterion; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SpecimenDefinitionSpecimenToLabComponent setRejectionCriterion(List theRejectionCriterion) { + this.rejectionCriterion = theRejectionCriterion; + return this; + } + + public boolean hasRejectionCriterion() { + if (this.rejectionCriterion == null) + return false; + for (CodeableConcept item : this.rejectionCriterion) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addRejectionCriterion() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.rejectionCriterion == null) + this.rejectionCriterion = new ArrayList(); + this.rejectionCriterion.add(t); + return t; + } + + public SpecimenDefinitionSpecimenToLabComponent addRejectionCriterion(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.rejectionCriterion == null) + this.rejectionCriterion = new ArrayList(); + this.rejectionCriterion.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #rejectionCriterion}, creating it if it does not already exist + */ + public CodeableConcept getRejectionCriterionFirstRep() { + if (getRejectionCriterion().isEmpty()) { + addRejectionCriterion(); + } + return getRejectionCriterion().get(0); + } + + /** + * @return {@link #handling} (Set of instructions for conservation/transport of the specimen at a defined temperature interval, prior the testing process.) + */ + public List getHandling() { + if (this.handling == null) + this.handling = new ArrayList(); + return this.handling; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SpecimenDefinitionSpecimenToLabComponent setHandling(List theHandling) { + this.handling = theHandling; + return this; + } + + public boolean hasHandling() { + if (this.handling == null) + return false; + for (SpecimenDefinitionSpecimenToLabHandlingComponent item : this.handling) + if (!item.isEmpty()) + return true; + return false; + } + + public SpecimenDefinitionSpecimenToLabHandlingComponent addHandling() { //3 + SpecimenDefinitionSpecimenToLabHandlingComponent t = new SpecimenDefinitionSpecimenToLabHandlingComponent(); + if (this.handling == null) + this.handling = new ArrayList(); + this.handling.add(t); + return t; + } + + public SpecimenDefinitionSpecimenToLabComponent addHandling(SpecimenDefinitionSpecimenToLabHandlingComponent t) { //3 + if (t == null) + return this; + if (this.handling == null) + this.handling = new ArrayList(); + this.handling.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #handling}, creating it if it does not already exist + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent getHandlingFirstRep() { + if (getHandling().isEmpty()) { + addHandling(); + } + return getHandling().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("isDerived", "boolean", "Primary of secondary specimen.", 0, 1, isDerived)); + children.add(new Property("type", "CodeableConcept", "The kind of specimen conditioned for testing expected by lab.", 0, 1, type)); + children.add(new Property("preference", "code", "The preference for this type of conditioned specimen.", 0, 1, preference)); + children.add(new Property("containerMaterial", "CodeableConcept", "The type of material of the container.", 0, 1, containerMaterial)); + children.add(new Property("containerType", "CodeableConcept", "The type of container used to contain this kind of specimen.", 0, 1, containerType)); + children.add(new Property("containerCap", "CodeableConcept", "Color of container cap.", 0, 1, containerCap)); + children.add(new Property("containerDescription", "string", "The textual description of the kind of container.", 0, 1, containerDescription)); + children.add(new Property("containerCapacity", "SimpleQuantity", "The capacity (volume or other measure) of this kind of container.", 0, 1, containerCapacity)); + children.add(new Property("containerMinimumVolume", "SimpleQuantity", "The minimum volume to be conditioned in the container.", 0, 1, containerMinimumVolume)); + children.add(new Property("containerAdditive", "", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, java.lang.Integer.MAX_VALUE, containerAdditive)); + children.add(new Property("containerPreparation", "string", "Special processing that should be applied to the container for this kind of specimen.", 0, 1, containerPreparation)); + children.add(new Property("requirement", "string", "Requirements for delivery and special handling of this kind of conditioned specimen.", 0, 1, requirement)); + children.add(new Property("retentionTime", "Duration", "The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.", 0, 1, retentionTime)); + children.add(new Property("rejectionCriterion", "CodeableConcept", "Criterion for rejection of the specimen in its container by the laboratory.", 0, java.lang.Integer.MAX_VALUE, rejectionCriterion)); + children.add(new Property("handling", "", "Set of instructions for conservation/transport of the specimen at a defined temperature interval, prior the testing process.", 0, java.lang.Integer.MAX_VALUE, handling)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 976346515: /*isDerived*/ return new Property("isDerived", "boolean", "Primary of secondary specimen.", 0, 1, isDerived); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of specimen conditioned for testing expected by lab.", 0, 1, type); + case -1459831589: /*preference*/ return new Property("preference", "code", "The preference for this type of conditioned specimen.", 0, 1, preference); + case -207682360: /*containerMaterial*/ return new Property("containerMaterial", "CodeableConcept", "The type of material of the container.", 0, 1, containerMaterial); + case 1966942043: /*containerType*/ return new Property("containerType", "CodeableConcept", "The type of container used to contain this kind of specimen.", 0, 1, containerType); + case 2141642641: /*containerCap*/ return new Property("containerCap", "CodeableConcept", "Color of container cap.", 0, 1, containerCap); + case -1474644805: /*containerDescription*/ return new Property("containerDescription", "string", "The textual description of the kind of container.", 0, 1, containerDescription); + case -574573477: /*containerCapacity*/ return new Property("containerCapacity", "SimpleQuantity", "The capacity (volume or other measure) of this kind of container.", 0, 1, containerCapacity); + case -2037735993: /*containerMinimumVolume*/ return new Property("containerMinimumVolume", "SimpleQuantity", "The minimum volume to be conditioned in the container.", 0, 1, containerMinimumVolume); + case -1733338259: /*containerAdditive*/ return new Property("containerAdditive", "", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, java.lang.Integer.MAX_VALUE, containerAdditive); + case -1065527466: /*containerPreparation*/ return new Property("containerPreparation", "string", "Special processing that should be applied to the container for this kind of specimen.", 0, 1, containerPreparation); + case 363387971: /*requirement*/ return new Property("requirement", "string", "Requirements for delivery and special handling of this kind of conditioned specimen.", 0, 1, requirement); + case 1434969867: /*retentionTime*/ return new Property("retentionTime", "Duration", "The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.", 0, 1, retentionTime); + case -553706344: /*rejectionCriterion*/ return new Property("rejectionCriterion", "CodeableConcept", "Criterion for rejection of the specimen in its container by the laboratory.", 0, java.lang.Integer.MAX_VALUE, rejectionCriterion); + case 2072805: /*handling*/ return new Property("handling", "", "Set of instructions for conservation/transport of the specimen at a defined temperature interval, prior the testing process.", 0, java.lang.Integer.MAX_VALUE, handling); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 976346515: /*isDerived*/ return this.isDerived == null ? new Base[0] : new Base[] {this.isDerived}; // BooleanType + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case -1459831589: /*preference*/ return this.preference == null ? new Base[0] : new Base[] {this.preference}; // Enumeration + case -207682360: /*containerMaterial*/ return this.containerMaterial == null ? new Base[0] : new Base[] {this.containerMaterial}; // CodeableConcept + case 1966942043: /*containerType*/ return this.containerType == null ? new Base[0] : new Base[] {this.containerType}; // CodeableConcept + case 2141642641: /*containerCap*/ return this.containerCap == null ? new Base[0] : new Base[] {this.containerCap}; // CodeableConcept + case -1474644805: /*containerDescription*/ return this.containerDescription == null ? new Base[0] : new Base[] {this.containerDescription}; // StringType + case -574573477: /*containerCapacity*/ return this.containerCapacity == null ? new Base[0] : new Base[] {this.containerCapacity}; // SimpleQuantity + case -2037735993: /*containerMinimumVolume*/ return this.containerMinimumVolume == null ? new Base[0] : new Base[] {this.containerMinimumVolume}; // SimpleQuantity + case -1733338259: /*containerAdditive*/ return this.containerAdditive == null ? new Base[0] : this.containerAdditive.toArray(new Base[this.containerAdditive.size()]); // SpecimenDefinitionSpecimenToLabContainerAdditiveComponent + case -1065527466: /*containerPreparation*/ return this.containerPreparation == null ? new Base[0] : new Base[] {this.containerPreparation}; // StringType + case 363387971: /*requirement*/ return this.requirement == null ? new Base[0] : new Base[] {this.requirement}; // StringType + case 1434969867: /*retentionTime*/ return this.retentionTime == null ? new Base[0] : new Base[] {this.retentionTime}; // Duration + case -553706344: /*rejectionCriterion*/ return this.rejectionCriterion == null ? new Base[0] : this.rejectionCriterion.toArray(new Base[this.rejectionCriterion.size()]); // CodeableConcept + case 2072805: /*handling*/ return this.handling == null ? new Base[0] : this.handling.toArray(new Base[this.handling.size()]); // SpecimenDefinitionSpecimenToLabHandlingComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 976346515: // isDerived + this.isDerived = castToBoolean(value); // BooleanType + return value; + case 3575610: // type + this.type = castToCodeableConcept(value); // CodeableConcept + return value; + case -1459831589: // preference + value = new SpecimenContainedPreferenceEnumFactory().fromType(castToCode(value)); + this.preference = (Enumeration) value; // Enumeration + return value; + case -207682360: // containerMaterial + this.containerMaterial = castToCodeableConcept(value); // CodeableConcept + return value; + case 1966942043: // containerType + this.containerType = castToCodeableConcept(value); // CodeableConcept + return value; + case 2141642641: // containerCap + this.containerCap = castToCodeableConcept(value); // CodeableConcept + return value; + case -1474644805: // containerDescription + this.containerDescription = castToString(value); // StringType + return value; + case -574573477: // containerCapacity + this.containerCapacity = castToSimpleQuantity(value); // SimpleQuantity + return value; + case -2037735993: // containerMinimumVolume + this.containerMinimumVolume = castToSimpleQuantity(value); // SimpleQuantity + return value; + case -1733338259: // containerAdditive + this.getContainerAdditive().add((SpecimenDefinitionSpecimenToLabContainerAdditiveComponent) value); // SpecimenDefinitionSpecimenToLabContainerAdditiveComponent + return value; + case -1065527466: // containerPreparation + this.containerPreparation = castToString(value); // StringType + return value; + case 363387971: // requirement + this.requirement = castToString(value); // StringType + return value; + case 1434969867: // retentionTime + this.retentionTime = castToDuration(value); // Duration + return value; + case -553706344: // rejectionCriterion + this.getRejectionCriterion().add(castToCodeableConcept(value)); // CodeableConcept + return value; + case 2072805: // handling + this.getHandling().add((SpecimenDefinitionSpecimenToLabHandlingComponent) value); // SpecimenDefinitionSpecimenToLabHandlingComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("isDerived")) { + this.isDerived = castToBoolean(value); // BooleanType + } else if (name.equals("type")) { + this.type = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("preference")) { + value = new SpecimenContainedPreferenceEnumFactory().fromType(castToCode(value)); + this.preference = (Enumeration) value; // Enumeration + } else if (name.equals("containerMaterial")) { + this.containerMaterial = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("containerType")) { + this.containerType = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("containerCap")) { + this.containerCap = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("containerDescription")) { + this.containerDescription = castToString(value); // StringType + } else if (name.equals("containerCapacity")) { + this.containerCapacity = castToSimpleQuantity(value); // SimpleQuantity + } else if (name.equals("containerMinimumVolume")) { + this.containerMinimumVolume = castToSimpleQuantity(value); // SimpleQuantity + } else if (name.equals("containerAdditive")) { + this.getContainerAdditive().add((SpecimenDefinitionSpecimenToLabContainerAdditiveComponent) value); + } else if (name.equals("containerPreparation")) { + this.containerPreparation = castToString(value); // StringType + } else if (name.equals("requirement")) { + this.requirement = castToString(value); // StringType + } else if (name.equals("retentionTime")) { + this.retentionTime = castToDuration(value); // Duration + } else if (name.equals("rejectionCriterion")) { + this.getRejectionCriterion().add(castToCodeableConcept(value)); + } else if (name.equals("handling")) { + this.getHandling().add((SpecimenDefinitionSpecimenToLabHandlingComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 976346515: return getIsDerivedElement(); + case 3575610: return getType(); + case -1459831589: return getPreferenceElement(); + case -207682360: return getContainerMaterial(); + case 1966942043: return getContainerType(); + case 2141642641: return getContainerCap(); + case -1474644805: return getContainerDescriptionElement(); + case -574573477: return getContainerCapacity(); + case -2037735993: return getContainerMinimumVolume(); + case -1733338259: return addContainerAdditive(); + case -1065527466: return getContainerPreparationElement(); + case 363387971: return getRequirementElement(); + case 1434969867: return getRetentionTime(); + case -553706344: return addRejectionCriterion(); + case 2072805: return addHandling(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 976346515: /*isDerived*/ return new String[] {"boolean"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -1459831589: /*preference*/ return new String[] {"code"}; + case -207682360: /*containerMaterial*/ return new String[] {"CodeableConcept"}; + case 1966942043: /*containerType*/ return new String[] {"CodeableConcept"}; + case 2141642641: /*containerCap*/ return new String[] {"CodeableConcept"}; + case -1474644805: /*containerDescription*/ return new String[] {"string"}; + case -574573477: /*containerCapacity*/ return new String[] {"SimpleQuantity"}; + case -2037735993: /*containerMinimumVolume*/ return new String[] {"SimpleQuantity"}; + case -1733338259: /*containerAdditive*/ return new String[] {}; + case -1065527466: /*containerPreparation*/ return new String[] {"string"}; + case 363387971: /*requirement*/ return new String[] {"string"}; + case 1434969867: /*retentionTime*/ return new String[] {"Duration"}; + case -553706344: /*rejectionCriterion*/ return new String[] {"CodeableConcept"}; + case 2072805: /*handling*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("isDerived")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.isDerived"); + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("preference")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.preference"); + } + else if (name.equals("containerMaterial")) { + this.containerMaterial = new CodeableConcept(); + return this.containerMaterial; + } + else if (name.equals("containerType")) { + this.containerType = new CodeableConcept(); + return this.containerType; + } + else if (name.equals("containerCap")) { + this.containerCap = new CodeableConcept(); + return this.containerCap; + } + else if (name.equals("containerDescription")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.containerDescription"); + } + else if (name.equals("containerCapacity")) { + this.containerCapacity = new SimpleQuantity(); + return this.containerCapacity; + } + else if (name.equals("containerMinimumVolume")) { + this.containerMinimumVolume = new SimpleQuantity(); + return this.containerMinimumVolume; + } + else if (name.equals("containerAdditive")) { + return addContainerAdditive(); + } + else if (name.equals("containerPreparation")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.containerPreparation"); + } + else if (name.equals("requirement")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.requirement"); + } + else if (name.equals("retentionTime")) { + this.retentionTime = new Duration(); + return this.retentionTime; + } + else if (name.equals("rejectionCriterion")) { + return addRejectionCriterion(); + } + else if (name.equals("handling")) { + return addHandling(); + } + else + return super.addChild(name); + } + + public SpecimenDefinitionSpecimenToLabComponent copy() { + SpecimenDefinitionSpecimenToLabComponent dst = new SpecimenDefinitionSpecimenToLabComponent(); + copyValues(dst); + dst.isDerived = isDerived == null ? null : isDerived.copy(); + dst.type = type == null ? null : type.copy(); + dst.preference = preference == null ? null : preference.copy(); + dst.containerMaterial = containerMaterial == null ? null : containerMaterial.copy(); + dst.containerType = containerType == null ? null : containerType.copy(); + dst.containerCap = containerCap == null ? null : containerCap.copy(); + dst.containerDescription = containerDescription == null ? null : containerDescription.copy(); + dst.containerCapacity = containerCapacity == null ? null : containerCapacity.copy(); + dst.containerMinimumVolume = containerMinimumVolume == null ? null : containerMinimumVolume.copy(); + if (containerAdditive != null) { + dst.containerAdditive = new ArrayList(); + for (SpecimenDefinitionSpecimenToLabContainerAdditiveComponent i : containerAdditive) + dst.containerAdditive.add(i.copy()); + }; + dst.containerPreparation = containerPreparation == null ? null : containerPreparation.copy(); + dst.requirement = requirement == null ? null : requirement.copy(); + dst.retentionTime = retentionTime == null ? null : retentionTime.copy(); + if (rejectionCriterion != null) { + dst.rejectionCriterion = new ArrayList(); + for (CodeableConcept i : rejectionCriterion) + dst.rejectionCriterion.add(i.copy()); + }; + if (handling != null) { + dst.handling = new ArrayList(); + for (SpecimenDefinitionSpecimenToLabHandlingComponent i : handling) + dst.handling.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenDefinitionSpecimenToLabComponent)) + return false; + SpecimenDefinitionSpecimenToLabComponent o = (SpecimenDefinitionSpecimenToLabComponent) other; + return compareDeep(isDerived, o.isDerived, true) && compareDeep(type, o.type, true) && compareDeep(preference, o.preference, true) + && compareDeep(containerMaterial, o.containerMaterial, true) && compareDeep(containerType, o.containerType, true) + && compareDeep(containerCap, o.containerCap, true) && compareDeep(containerDescription, o.containerDescription, true) + && compareDeep(containerCapacity, o.containerCapacity, true) && compareDeep(containerMinimumVolume, o.containerMinimumVolume, true) + && compareDeep(containerAdditive, o.containerAdditive, true) && compareDeep(containerPreparation, o.containerPreparation, true) + && compareDeep(requirement, o.requirement, true) && compareDeep(retentionTime, o.retentionTime, true) + && compareDeep(rejectionCriterion, o.rejectionCriterion, true) && compareDeep(handling, o.handling, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenDefinitionSpecimenToLabComponent)) + return false; + SpecimenDefinitionSpecimenToLabComponent o = (SpecimenDefinitionSpecimenToLabComponent) other; + return compareValues(isDerived, o.isDerived, true) && compareValues(preference, o.preference, true) + && compareValues(containerDescription, o.containerDescription, true) && compareValues(containerPreparation, o.containerPreparation, true) + && compareValues(requirement, o.requirement, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(isDerived, type, preference + , containerMaterial, containerType, containerCap, containerDescription, containerCapacity + , containerMinimumVolume, containerAdditive, containerPreparation, requirement, retentionTime + , rejectionCriterion, handling); + } + + public String fhirType() { + return "SpecimenDefinition.specimenToLab"; + + } + + } + + @Block() + public static class SpecimenDefinitionSpecimenToLabContainerAdditiveComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA. + */ + @Child(name = "additive", type = {CodeableConcept.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additive associated with container", formalDefinition="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v2-0371") + protected Type additive; + + private static final long serialVersionUID = 1819209272L; + + /** + * Constructor + */ + public SpecimenDefinitionSpecimenToLabContainerAdditiveComponent() { + super(); + } + + /** + * Constructor + */ + public SpecimenDefinitionSpecimenToLabContainerAdditiveComponent(Type additive) { + super(); + this.additive = additive; + } + + /** + * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public Type getAdditive() { + return this.additive; + } + + /** + * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public CodeableConcept getAdditiveCodeableConcept() throws FHIRException { + if (!(this.additive instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.additive.getClass().getName()+" was encountered"); + return (CodeableConcept) this.additive; + } + + public boolean hasAdditiveCodeableConcept() { + return this.additive instanceof CodeableConcept; + } + + /** + * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public Reference getAdditiveReference() throws FHIRException { + if (!(this.additive instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.additive.getClass().getName()+" was encountered"); + return (Reference) this.additive; + } + + public boolean hasAdditiveReference() { + return this.additive instanceof Reference; + } + + public boolean hasAdditive() { + return this.additive != null && !this.additive.isEmpty(); + } + + /** + * @param value {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) + */ + public SpecimenDefinitionSpecimenToLabContainerAdditiveComponent setAdditive(Type value) { + this.additive = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 261915956: /*additive[x]*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); + case -1226589236: /*additive*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); + case 1330272821: /*additiveCodeableConcept*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); + case -386783009: /*additiveReference*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : new Base[] {this.additive}; // Type + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1226589236: // additive + this.additive = castToType(value); // Type + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("additive[x]")) { + this.additive = castToType(value); // Type + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 261915956: return getAdditive(); + case -1226589236: return getAdditive(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1226589236: /*additive*/ return new String[] {"CodeableConcept", "Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("additiveCodeableConcept")) { + this.additive = new CodeableConcept(); + return this.additive; + } + else if (name.equals("additiveReference")) { + this.additive = new Reference(); + return this.additive; + } + else + return super.addChild(name); + } + + public SpecimenDefinitionSpecimenToLabContainerAdditiveComponent copy() { + SpecimenDefinitionSpecimenToLabContainerAdditiveComponent dst = new SpecimenDefinitionSpecimenToLabContainerAdditiveComponent(); + copyValues(dst); + dst.additive = additive == null ? null : additive.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenDefinitionSpecimenToLabContainerAdditiveComponent)) + return false; + SpecimenDefinitionSpecimenToLabContainerAdditiveComponent o = (SpecimenDefinitionSpecimenToLabContainerAdditiveComponent) other; + return compareDeep(additive, o.additive, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenDefinitionSpecimenToLabContainerAdditiveComponent)) + return false; + SpecimenDefinitionSpecimenToLabContainerAdditiveComponent o = (SpecimenDefinitionSpecimenToLabContainerAdditiveComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(additive); + } + + public String fhirType() { + return "SpecimenDefinition.specimenToLab.containerAdditive"; + + } + + } + + @Block() + public static class SpecimenDefinitionSpecimenToLabHandlingComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Code representing the set of handling instructions. + */ + @Child(name = "conditionSet", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Conservation condition set", formalDefinition="Code representing the set of handling instructions." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/handling-condition") + protected CodeableConcept conditionSet; + + /** + * The temperature interval for this set of handling instructions. + */ + @Child(name = "tempRange", type = {Range.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Temperature range", formalDefinition="The temperature interval for this set of handling instructions." ) + protected Range tempRange; + + /** + * The maximum time interval of conservation of the specimen with these conditions. + */ + @Child(name = "maxDuration", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Maximum conservation time", formalDefinition="The maximum time interval of conservation of the specimen with these conditions." ) + protected Duration maxDuration; + + /** + * Textual instructions regarding the light exposure of the specimen prior testing. + */ + @Child(name = "lightExposure", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Light exposure", formalDefinition="Textual instructions regarding the light exposure of the specimen prior testing." ) + protected StringType lightExposure; + + /** + * Additional textual instructions for the conservation or transport of the specimen. + */ + @Child(name = "instruction", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Conservation instruction", formalDefinition="Additional textual instructions for the conservation or transport of the specimen." ) + protected StringType instruction; + + private static final long serialVersionUID = 1577777957L; + + /** + * Constructor + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent() { + super(); + } + + /** + * @return {@link #conditionSet} (Code representing the set of handling instructions.) + */ + public CodeableConcept getConditionSet() { + if (this.conditionSet == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabHandlingComponent.conditionSet"); + else if (Configuration.doAutoCreate()) + this.conditionSet = new CodeableConcept(); // cc + return this.conditionSet; + } + + public boolean hasConditionSet() { + return this.conditionSet != null && !this.conditionSet.isEmpty(); + } + + /** + * @param value {@link #conditionSet} (Code representing the set of handling instructions.) + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setConditionSet(CodeableConcept value) { + this.conditionSet = value; + return this; + } + + /** + * @return {@link #tempRange} (The temperature interval for this set of handling instructions.) + */ + public Range getTempRange() { + if (this.tempRange == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabHandlingComponent.tempRange"); + else if (Configuration.doAutoCreate()) + this.tempRange = new Range(); // cc + return this.tempRange; + } + + public boolean hasTempRange() { + return this.tempRange != null && !this.tempRange.isEmpty(); + } + + /** + * @param value {@link #tempRange} (The temperature interval for this set of handling instructions.) + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setTempRange(Range value) { + this.tempRange = value; + return this; + } + + /** + * @return {@link #maxDuration} (The maximum time interval of conservation of the specimen with these conditions.) + */ + public Duration getMaxDuration() { + if (this.maxDuration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabHandlingComponent.maxDuration"); + else if (Configuration.doAutoCreate()) + this.maxDuration = new Duration(); // cc + return this.maxDuration; + } + + public boolean hasMaxDuration() { + return this.maxDuration != null && !this.maxDuration.isEmpty(); + } + + /** + * @param value {@link #maxDuration} (The maximum time interval of conservation of the specimen with these conditions.) + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setMaxDuration(Duration value) { + this.maxDuration = value; + return this; + } + + /** + * @return {@link #lightExposure} (Textual instructions regarding the light exposure of the specimen prior testing.). This is the underlying object with id, value and extensions. The accessor "getLightExposure" gives direct access to the value + */ + public StringType getLightExposureElement() { + if (this.lightExposure == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabHandlingComponent.lightExposure"); + else if (Configuration.doAutoCreate()) + this.lightExposure = new StringType(); // bb + return this.lightExposure; + } + + public boolean hasLightExposureElement() { + return this.lightExposure != null && !this.lightExposure.isEmpty(); + } + + public boolean hasLightExposure() { + return this.lightExposure != null && !this.lightExposure.isEmpty(); + } + + /** + * @param value {@link #lightExposure} (Textual instructions regarding the light exposure of the specimen prior testing.). This is the underlying object with id, value and extensions. The accessor "getLightExposure" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setLightExposureElement(StringType value) { + this.lightExposure = value; + return this; + } + + /** + * @return Textual instructions regarding the light exposure of the specimen prior testing. + */ + public String getLightExposure() { + return this.lightExposure == null ? null : this.lightExposure.getValue(); + } + + /** + * @param value Textual instructions regarding the light exposure of the specimen prior testing. + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setLightExposure(String value) { + if (Utilities.noString(value)) + this.lightExposure = null; + else { + if (this.lightExposure == null) + this.lightExposure = new StringType(); + this.lightExposure.setValue(value); + } + return this; + } + + /** + * @return {@link #instruction} (Additional textual instructions for the conservation or transport of the specimen.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value + */ + public StringType getInstructionElement() { + if (this.instruction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinitionSpecimenToLabHandlingComponent.instruction"); + else if (Configuration.doAutoCreate()) + this.instruction = new StringType(); // bb + return this.instruction; + } + + public boolean hasInstructionElement() { + return this.instruction != null && !this.instruction.isEmpty(); + } + + public boolean hasInstruction() { + return this.instruction != null && !this.instruction.isEmpty(); + } + + /** + * @param value {@link #instruction} (Additional textual instructions for the conservation or transport of the specimen.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setInstructionElement(StringType value) { + this.instruction = value; + return this; + } + + /** + * @return Additional textual instructions for the conservation or transport of the specimen. + */ + public String getInstruction() { + return this.instruction == null ? null : this.instruction.getValue(); + } + + /** + * @param value Additional textual instructions for the conservation or transport of the specimen. + */ + public SpecimenDefinitionSpecimenToLabHandlingComponent setInstruction(String value) { + if (Utilities.noString(value)) + this.instruction = null; + else { + if (this.instruction == null) + this.instruction = new StringType(); + this.instruction.setValue(value); + } + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("conditionSet", "CodeableConcept", "Code representing the set of handling instructions.", 0, 1, conditionSet)); + children.add(new Property("tempRange", "Range", "The temperature interval for this set of handling instructions.", 0, 1, tempRange)); + children.add(new Property("maxDuration", "Duration", "The maximum time interval of conservation of the specimen with these conditions.", 0, 1, maxDuration)); + children.add(new Property("lightExposure", "string", "Textual instructions regarding the light exposure of the specimen prior testing.", 0, 1, lightExposure)); + children.add(new Property("instruction", "string", "Additional textual instructions for the conservation or transport of the specimen.", 0, 1, instruction)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1202651833: /*conditionSet*/ return new Property("conditionSet", "CodeableConcept", "Code representing the set of handling instructions.", 0, 1, conditionSet); + case 1957710281: /*tempRange*/ return new Property("tempRange", "Range", "The temperature interval for this set of handling instructions.", 0, 1, tempRange); + case 40284952: /*maxDuration*/ return new Property("maxDuration", "Duration", "The maximum time interval of conservation of the specimen with these conditions.", 0, 1, maxDuration); + case -1391615939: /*lightExposure*/ return new Property("lightExposure", "string", "Textual instructions regarding the light exposure of the specimen prior testing.", 0, 1, lightExposure); + case 301526158: /*instruction*/ return new Property("instruction", "string", "Additional textual instructions for the conservation or transport of the specimen.", 0, 1, instruction); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1202651833: /*conditionSet*/ return this.conditionSet == null ? new Base[0] : new Base[] {this.conditionSet}; // CodeableConcept + case 1957710281: /*tempRange*/ return this.tempRange == null ? new Base[0] : new Base[] {this.tempRange}; // Range + case 40284952: /*maxDuration*/ return this.maxDuration == null ? new Base[0] : new Base[] {this.maxDuration}; // Duration + case -1391615939: /*lightExposure*/ return this.lightExposure == null ? new Base[0] : new Base[] {this.lightExposure}; // StringType + case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // StringType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1202651833: // conditionSet + this.conditionSet = castToCodeableConcept(value); // CodeableConcept + return value; + case 1957710281: // tempRange + this.tempRange = castToRange(value); // Range + return value; + case 40284952: // maxDuration + this.maxDuration = castToDuration(value); // Duration + return value; + case -1391615939: // lightExposure + this.lightExposure = castToString(value); // StringType + return value; + case 301526158: // instruction + this.instruction = castToString(value); // StringType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("conditionSet")) { + this.conditionSet = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("tempRange")) { + this.tempRange = castToRange(value); // Range + } else if (name.equals("maxDuration")) { + this.maxDuration = castToDuration(value); // Duration + } else if (name.equals("lightExposure")) { + this.lightExposure = castToString(value); // StringType + } else if (name.equals("instruction")) { + this.instruction = castToString(value); // StringType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1202651833: return getConditionSet(); + case 1957710281: return getTempRange(); + case 40284952: return getMaxDuration(); + case -1391615939: return getLightExposureElement(); + case 301526158: return getInstructionElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1202651833: /*conditionSet*/ return new String[] {"CodeableConcept"}; + case 1957710281: /*tempRange*/ return new String[] {"Range"}; + case 40284952: /*maxDuration*/ return new String[] {"Duration"}; + case -1391615939: /*lightExposure*/ return new String[] {"string"}; + case 301526158: /*instruction*/ return new String[] {"string"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("conditionSet")) { + this.conditionSet = new CodeableConcept(); + return this.conditionSet; + } + else if (name.equals("tempRange")) { + this.tempRange = new Range(); + return this.tempRange; + } + else if (name.equals("maxDuration")) { + this.maxDuration = new Duration(); + return this.maxDuration; + } + else if (name.equals("lightExposure")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.lightExposure"); + } + else if (name.equals("instruction")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.instruction"); + } + else + return super.addChild(name); + } + + public SpecimenDefinitionSpecimenToLabHandlingComponent copy() { + SpecimenDefinitionSpecimenToLabHandlingComponent dst = new SpecimenDefinitionSpecimenToLabHandlingComponent(); + copyValues(dst); + dst.conditionSet = conditionSet == null ? null : conditionSet.copy(); + dst.tempRange = tempRange == null ? null : tempRange.copy(); + dst.maxDuration = maxDuration == null ? null : maxDuration.copy(); + dst.lightExposure = lightExposure == null ? null : lightExposure.copy(); + dst.instruction = instruction == null ? null : instruction.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenDefinitionSpecimenToLabHandlingComponent)) + return false; + SpecimenDefinitionSpecimenToLabHandlingComponent o = (SpecimenDefinitionSpecimenToLabHandlingComponent) other; + return compareDeep(conditionSet, o.conditionSet, true) && compareDeep(tempRange, o.tempRange, true) + && compareDeep(maxDuration, o.maxDuration, true) && compareDeep(lightExposure, o.lightExposure, true) + && compareDeep(instruction, o.instruction, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenDefinitionSpecimenToLabHandlingComponent)) + return false; + SpecimenDefinitionSpecimenToLabHandlingComponent o = (SpecimenDefinitionSpecimenToLabHandlingComponent) other; + return compareValues(lightExposure, o.lightExposure, true) && compareValues(instruction, o.instruction, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(conditionSet, tempRange, maxDuration + , lightExposure, instruction); + } + + public String fhirType() { + return "SpecimenDefinition.specimenToLab.handling"; + + } + + } + + /** + * A business identifier associated with the kind of specimen. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Business identifier of a kind of specimen", formalDefinition="A business identifier associated with the kind of specimen." ) + protected Identifier identifier; + + /** + * The kind of material to be collected. + */ + @Child(name = "typeCollected", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Kind of material to collect", formalDefinition="The kind of material to be collected." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v2-0487") + protected CodeableConcept typeCollected; + + /** + * Preparation of the patient for specimen collection. + */ + @Child(name = "patientPreparation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Patient preparation for collection", formalDefinition="Preparation of the patient for specimen collection." ) + protected StringType patientPreparation; + + /** + * Time aspect of specimen collection (duration or offset). + */ + @Child(name = "timeAspect", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time aspect for collection", formalDefinition="Time aspect of specimen collection (duration or offset)." ) + protected StringType timeAspect; + + /** + * The action to be performed for collecting the specimen. + */ + @Child(name = "collection", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specimen collection procedure", formalDefinition="The action to be performed for collecting the specimen." ) + protected List collection; + + /** + * Specimen conditioned in a container as expected by the testing laboratory. + */ + @Child(name = "specimenToLab", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specimen in container intended for testing by lab", formalDefinition="Specimen conditioned in a container as expected by the testing laboratory." ) + protected List specimenToLab; + + private static final long serialVersionUID = -2007444482L; + + /** + * Constructor + */ + public SpecimenDefinition() { + super(); + } + + /** + * @return {@link #identifier} (A business identifier associated with the kind of specimen.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinition.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (A business identifier associated with the kind of specimen.) + */ + public SpecimenDefinition setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #typeCollected} (The kind of material to be collected.) + */ + public CodeableConcept getTypeCollected() { + if (this.typeCollected == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinition.typeCollected"); + else if (Configuration.doAutoCreate()) + this.typeCollected = new CodeableConcept(); // cc + return this.typeCollected; + } + + public boolean hasTypeCollected() { + return this.typeCollected != null && !this.typeCollected.isEmpty(); + } + + /** + * @param value {@link #typeCollected} (The kind of material to be collected.) + */ + public SpecimenDefinition setTypeCollected(CodeableConcept value) { + this.typeCollected = value; + return this; + } + + /** + * @return {@link #patientPreparation} (Preparation of the patient for specimen collection.). This is the underlying object with id, value and extensions. The accessor "getPatientPreparation" gives direct access to the value + */ + public StringType getPatientPreparationElement() { + if (this.patientPreparation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinition.patientPreparation"); + else if (Configuration.doAutoCreate()) + this.patientPreparation = new StringType(); // bb + return this.patientPreparation; + } + + public boolean hasPatientPreparationElement() { + return this.patientPreparation != null && !this.patientPreparation.isEmpty(); + } + + public boolean hasPatientPreparation() { + return this.patientPreparation != null && !this.patientPreparation.isEmpty(); + } + + /** + * @param value {@link #patientPreparation} (Preparation of the patient for specimen collection.). This is the underlying object with id, value and extensions. The accessor "getPatientPreparation" gives direct access to the value + */ + public SpecimenDefinition setPatientPreparationElement(StringType value) { + this.patientPreparation = value; + return this; + } + + /** + * @return Preparation of the patient for specimen collection. + */ + public String getPatientPreparation() { + return this.patientPreparation == null ? null : this.patientPreparation.getValue(); + } + + /** + * @param value Preparation of the patient for specimen collection. + */ + public SpecimenDefinition setPatientPreparation(String value) { + if (Utilities.noString(value)) + this.patientPreparation = null; + else { + if (this.patientPreparation == null) + this.patientPreparation = new StringType(); + this.patientPreparation.setValue(value); + } + return this; + } + + /** + * @return {@link #timeAspect} (Time aspect of specimen collection (duration or offset).). This is the underlying object with id, value and extensions. The accessor "getTimeAspect" gives direct access to the value + */ + public StringType getTimeAspectElement() { + if (this.timeAspect == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenDefinition.timeAspect"); + else if (Configuration.doAutoCreate()) + this.timeAspect = new StringType(); // bb + return this.timeAspect; + } + + public boolean hasTimeAspectElement() { + return this.timeAspect != null && !this.timeAspect.isEmpty(); + } + + public boolean hasTimeAspect() { + return this.timeAspect != null && !this.timeAspect.isEmpty(); + } + + /** + * @param value {@link #timeAspect} (Time aspect of specimen collection (duration or offset).). This is the underlying object with id, value and extensions. The accessor "getTimeAspect" gives direct access to the value + */ + public SpecimenDefinition setTimeAspectElement(StringType value) { + this.timeAspect = value; + return this; + } + + /** + * @return Time aspect of specimen collection (duration or offset). + */ + public String getTimeAspect() { + return this.timeAspect == null ? null : this.timeAspect.getValue(); + } + + /** + * @param value Time aspect of specimen collection (duration or offset). + */ + public SpecimenDefinition setTimeAspect(String value) { + if (Utilities.noString(value)) + this.timeAspect = null; + else { + if (this.timeAspect == null) + this.timeAspect = new StringType(); + this.timeAspect.setValue(value); + } + return this; + } + + /** + * @return {@link #collection} (The action to be performed for collecting the specimen.) + */ + public List getCollection() { + if (this.collection == null) + this.collection = new ArrayList(); + return this.collection; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SpecimenDefinition setCollection(List theCollection) { + this.collection = theCollection; + return this; + } + + public boolean hasCollection() { + if (this.collection == null) + return false; + for (CodeableConcept item : this.collection) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addCollection() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.collection == null) + this.collection = new ArrayList(); + this.collection.add(t); + return t; + } + + public SpecimenDefinition addCollection(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.collection == null) + this.collection = new ArrayList(); + this.collection.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #collection}, creating it if it does not already exist + */ + public CodeableConcept getCollectionFirstRep() { + if (getCollection().isEmpty()) { + addCollection(); + } + return getCollection().get(0); + } + + /** + * @return {@link #specimenToLab} (Specimen conditioned in a container as expected by the testing laboratory.) + */ + public List getSpecimenToLab() { + if (this.specimenToLab == null) + this.specimenToLab = new ArrayList(); + return this.specimenToLab; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public SpecimenDefinition setSpecimenToLab(List theSpecimenToLab) { + this.specimenToLab = theSpecimenToLab; + return this; + } + + public boolean hasSpecimenToLab() { + if (this.specimenToLab == null) + return false; + for (SpecimenDefinitionSpecimenToLabComponent item : this.specimenToLab) + if (!item.isEmpty()) + return true; + return false; + } + + public SpecimenDefinitionSpecimenToLabComponent addSpecimenToLab() { //3 + SpecimenDefinitionSpecimenToLabComponent t = new SpecimenDefinitionSpecimenToLabComponent(); + if (this.specimenToLab == null) + this.specimenToLab = new ArrayList(); + this.specimenToLab.add(t); + return t; + } + + public SpecimenDefinition addSpecimenToLab(SpecimenDefinitionSpecimenToLabComponent t) { //3 + if (t == null) + return this; + if (this.specimenToLab == null) + this.specimenToLab = new ArrayList(); + this.specimenToLab.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #specimenToLab}, creating it if it does not already exist + */ + public SpecimenDefinitionSpecimenToLabComponent getSpecimenToLabFirstRep() { + if (getSpecimenToLab().isEmpty()) { + addSpecimenToLab(); + } + return getSpecimenToLab().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("identifier", "Identifier", "A business identifier associated with the kind of specimen.", 0, 1, identifier)); + children.add(new Property("typeCollected", "CodeableConcept", "The kind of material to be collected.", 0, 1, typeCollected)); + children.add(new Property("patientPreparation", "string", "Preparation of the patient for specimen collection.", 0, 1, patientPreparation)); + children.add(new Property("timeAspect", "string", "Time aspect of specimen collection (duration or offset).", 0, 1, timeAspect)); + children.add(new Property("collection", "CodeableConcept", "The action to be performed for collecting the specimen.", 0, java.lang.Integer.MAX_VALUE, collection)); + children.add(new Property("specimenToLab", "", "Specimen conditioned in a container as expected by the testing laboratory.", 0, java.lang.Integer.MAX_VALUE, specimenToLab)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A business identifier associated with the kind of specimen.", 0, 1, identifier); + case 588504367: /*typeCollected*/ return new Property("typeCollected", "CodeableConcept", "The kind of material to be collected.", 0, 1, typeCollected); + case -879411630: /*patientPreparation*/ return new Property("patientPreparation", "string", "Preparation of the patient for specimen collection.", 0, 1, patientPreparation); + case 276972933: /*timeAspect*/ return new Property("timeAspect", "string", "Time aspect of specimen collection (duration or offset).", 0, 1, timeAspect); + case -1741312354: /*collection*/ return new Property("collection", "CodeableConcept", "The action to be performed for collecting the specimen.", 0, java.lang.Integer.MAX_VALUE, collection); + case 1669658346: /*specimenToLab*/ return new Property("specimenToLab", "", "Specimen conditioned in a container as expected by the testing laboratory.", 0, java.lang.Integer.MAX_VALUE, specimenToLab); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier + case 588504367: /*typeCollected*/ return this.typeCollected == null ? new Base[0] : new Base[] {this.typeCollected}; // CodeableConcept + case -879411630: /*patientPreparation*/ return this.patientPreparation == null ? new Base[0] : new Base[] {this.patientPreparation}; // StringType + case 276972933: /*timeAspect*/ return this.timeAspect == null ? new Base[0] : new Base[] {this.timeAspect}; // StringType + case -1741312354: /*collection*/ return this.collection == null ? new Base[0] : this.collection.toArray(new Base[this.collection.size()]); // CodeableConcept + case 1669658346: /*specimenToLab*/ return this.specimenToLab == null ? new Base[0] : this.specimenToLab.toArray(new Base[this.specimenToLab.size()]); // SpecimenDefinitionSpecimenToLabComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1618432855: // identifier + this.identifier = castToIdentifier(value); // Identifier + return value; + case 588504367: // typeCollected + this.typeCollected = castToCodeableConcept(value); // CodeableConcept + return value; + case -879411630: // patientPreparation + this.patientPreparation = castToString(value); // StringType + return value; + case 276972933: // timeAspect + this.timeAspect = castToString(value); // StringType + return value; + case -1741312354: // collection + this.getCollection().add(castToCodeableConcept(value)); // CodeableConcept + return value; + case 1669658346: // specimenToLab + this.getSpecimenToLab().add((SpecimenDefinitionSpecimenToLabComponent) value); // SpecimenDefinitionSpecimenToLabComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = castToIdentifier(value); // Identifier + } else if (name.equals("typeCollected")) { + this.typeCollected = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("patientPreparation")) { + this.patientPreparation = castToString(value); // StringType + } else if (name.equals("timeAspect")) { + this.timeAspect = castToString(value); // StringType + } else if (name.equals("collection")) { + this.getCollection().add(castToCodeableConcept(value)); + } else if (name.equals("specimenToLab")) { + this.getSpecimenToLab().add((SpecimenDefinitionSpecimenToLabComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: return getIdentifier(); + case 588504367: return getTypeCollected(); + case -879411630: return getPatientPreparationElement(); + case 276972933: return getTimeAspectElement(); + case -1741312354: return addCollection(); + case 1669658346: return addSpecimenToLab(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case 588504367: /*typeCollected*/ return new String[] {"CodeableConcept"}; + case -879411630: /*patientPreparation*/ return new String[] {"string"}; + case 276972933: /*timeAspect*/ return new String[] {"string"}; + case -1741312354: /*collection*/ return new String[] {"CodeableConcept"}; + case 1669658346: /*specimenToLab*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("typeCollected")) { + this.typeCollected = new CodeableConcept(); + return this.typeCollected; + } + else if (name.equals("patientPreparation")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.patientPreparation"); + } + else if (name.equals("timeAspect")) { + throw new FHIRException("Cannot call addChild on a primitive type SpecimenDefinition.timeAspect"); + } + else if (name.equals("collection")) { + return addCollection(); + } + else if (name.equals("specimenToLab")) { + return addSpecimenToLab(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "SpecimenDefinition"; + + } + + public SpecimenDefinition copy() { + SpecimenDefinition dst = new SpecimenDefinition(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.typeCollected = typeCollected == null ? null : typeCollected.copy(); + dst.patientPreparation = patientPreparation == null ? null : patientPreparation.copy(); + dst.timeAspect = timeAspect == null ? null : timeAspect.copy(); + if (collection != null) { + dst.collection = new ArrayList(); + for (CodeableConcept i : collection) + dst.collection.add(i.copy()); + }; + if (specimenToLab != null) { + dst.specimenToLab = new ArrayList(); + for (SpecimenDefinitionSpecimenToLabComponent i : specimenToLab) + dst.specimenToLab.add(i.copy()); + }; + return dst; + } + + protected SpecimenDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SpecimenDefinition)) + return false; + SpecimenDefinition o = (SpecimenDefinition) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(typeCollected, o.typeCollected, true) + && compareDeep(patientPreparation, o.patientPreparation, true) && compareDeep(timeAspect, o.timeAspect, true) + && compareDeep(collection, o.collection, true) && compareDeep(specimenToLab, o.specimenToLab, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SpecimenDefinition)) + return false; + SpecimenDefinition o = (SpecimenDefinition) other; + return compareValues(patientPreparation, o.patientPreparation, true) && compareValues(timeAspect, o.timeAspect, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, typeCollected + , patientPreparation, timeAspect, collection, specimenToLab); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.SpecimenDefinition; + } + + /** + * Search parameter: container + *

+ * Description: The type of specimen conditioned in container expected by the lab
+ * Type: token
+ * Path: SpecimenDefinition.specimenToLab.containerType
+ *

+ */ + @SearchParamDefinition(name="container", path="SpecimenDefinition.specimenToLab.containerType", description="The type of specimen conditioned in container expected by the lab", type="token" ) + public static final String SP_CONTAINER = "container"; + /** + * Fluent Client search parameter constant for container + *

+ * Description: The type of specimen conditioned in container expected by the lab
+ * Type: token
+ * Path: SpecimenDefinition.specimenToLab.containerType
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTAINER); + + /** + * Search parameter: identifier + *

+ * Description: The unique identifier associated with the specimen
+ * Type: token
+ * Path: SpecimenDefinition.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="SpecimenDefinition.identifier", description="The unique identifier associated with the specimen", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: The unique identifier associated with the specimen
+ * Type: token
+ * Path: SpecimenDefinition.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: type + *

+ * Description: The type of collected specimen
+ * Type: token
+ * Path: SpecimenDefinition.typeCollected
+ *

+ */ + @SearchParamDefinition(name="type", path="SpecimenDefinition.typeCollected", description="The type of collected specimen", type="token" ) + public static final String SP_TYPE = "type"; + /** + * Fluent Client search parameter constant for type + *

+ * Description: The type of collected specimen
+ * Type: token
+ * Path: SpecimenDefinition.typeCollected
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureDefinition.java index 57e0c8c4bc3..7e7ec063205 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureMap.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureMap.java index 5c831b79557..c1bb57a72e0 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureMap.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/StructureMap.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Subscription.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Subscription.java index 39fea7180bd..1577784b042 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Subscription.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Subscription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Substance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Substance.java index 1b1708dcd54..0637d360609 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Substance.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Substance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyDelivery.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyDelivery.java index 5f1774a4dfd..84d4938488f 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyDelivery.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyDelivery.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyRequest.java index 96c0db849ad..286f92359b3 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyRequest.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/SupplyRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Task.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Task.java index a31ce720ba0..45100b3f249 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Task.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Task.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -2088,21 +2088,33 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use /** * A description or code indicating why this task needs to be performed. */ - @Child(name = "reason", type = {CodeableConcept.class}, order=21, min=0, max=1, modifier=false, summary=false) + @Child(name = "reasonCode", type = {CodeableConcept.class}, order=21, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Why task is needed", formalDefinition="A description or code indicating why this task needs to be performed." ) - protected CodeableConcept reason; + protected CodeableConcept reasonCode; + + /** + * A resource reference indicating why this task needs to be performed. + */ + @Child(name = "reasonReference", type = {Reference.class}, order=22, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why task is needed", formalDefinition="A resource reference indicating why this task needs to be performed." ) + protected Reference reasonReference; + + /** + * The actual object that is the target of the reference (A resource reference indicating why this task needs to be performed.) + */ + protected Resource reasonReferenceTarget; /** * Free-text information captured about the task as it progresses. */ - @Child(name = "note", type = {Annotation.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "note", type = {Annotation.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Comments made about the task", formalDefinition="Free-text information captured about the task as it progresses." ) protected List note; /** * Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task. */ - @Child(name = "relevantHistory", type = {Provenance.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "relevantHistory", type = {Provenance.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Key events in history of the Task", formalDefinition="Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task." ) protected List relevantHistory; /** @@ -2114,25 +2126,25 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use /** * If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned. */ - @Child(name = "restriction", type = {}, order=24, min=0, max=1, modifier=false, summary=false) + @Child(name = "restriction", type = {}, order=25, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Constraints on fulfillment tasks", formalDefinition="If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned." ) protected TaskRestrictionComponent restriction; /** * Additional information that may be needed in the execution of the task. */ - @Child(name = "input", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "input", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Information used to perform task", formalDefinition="Additional information that may be needed in the execution of the task." ) protected List input; /** * Outputs produced by the Task. */ - @Child(name = "output", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "output", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Information produced as part of task", formalDefinition="Outputs produced by the Task." ) protected List output; - private static final long serialVersionUID = 2060755798L; + private static final long serialVersionUID = 88497459L; /** * Constructor @@ -3026,26 +3038,65 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use } /** - * @return {@link #reason} (A description or code indicating why this task needs to be performed.) + * @return {@link #reasonCode} (A description or code indicating why this task needs to be performed.) */ - public CodeableConcept getReason() { - if (this.reason == null) + public CodeableConcept getReasonCode() { + if (this.reasonCode == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Task.reason"); + throw new Error("Attempt to auto-create Task.reasonCode"); else if (Configuration.doAutoCreate()) - this.reason = new CodeableConcept(); // cc - return this.reason; + this.reasonCode = new CodeableConcept(); // cc + return this.reasonCode; } - public boolean hasReason() { - return this.reason != null && !this.reason.isEmpty(); + public boolean hasReasonCode() { + return this.reasonCode != null && !this.reasonCode.isEmpty(); } /** - * @param value {@link #reason} (A description or code indicating why this task needs to be performed.) + * @param value {@link #reasonCode} (A description or code indicating why this task needs to be performed.) */ - public Task setReason(CodeableConcept value) { - this.reason = value; + public Task setReasonCode(CodeableConcept value) { + this.reasonCode = value; + return this; + } + + /** + * @return {@link #reasonReference} (A resource reference indicating why this task needs to be performed.) + */ + public Reference getReasonReference() { + if (this.reasonReference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.reasonReference"); + else if (Configuration.doAutoCreate()) + this.reasonReference = new Reference(); // cc + return this.reasonReference; + } + + public boolean hasReasonReference() { + return this.reasonReference != null && !this.reasonReference.isEmpty(); + } + + /** + * @param value {@link #reasonReference} (A resource reference indicating why this task needs to be performed.) + */ + public Task setReasonReference(Reference value) { + this.reasonReference = value; + return this; + } + + /** + * @return {@link #reasonReference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A resource reference indicating why this task needs to be performed.) + */ + public Resource getReasonReferenceTarget() { + return this.reasonReferenceTarget; + } + + /** + * @param value {@link #reasonReference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A resource reference indicating why this task needs to be performed.) + */ + public Task setReasonReferenceTarget(Resource value) { + this.reasonReferenceTarget = value; return this; } @@ -3330,7 +3381,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use children.add(new Property("requester", "", "The creator of the task.", 0, 1, requester)); children.add(new Property("performerType", "CodeableConcept", "The type of participant that can execute the task.", 0, java.lang.Integer.MAX_VALUE, performerType)); children.add(new Property("owner", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "Individual organization or Device currently responsible for task execution.", 0, 1, owner)); - children.add(new Property("reason", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reason)); + children.add(new Property("reasonCode", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode)); + children.add(new Property("reasonReference", "Reference(Any)", "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference)); children.add(new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note)); children.add(new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.", 0, java.lang.Integer.MAX_VALUE, relevantHistory)); children.add(new Property("restriction", "", "If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", 0, 1, restriction)); @@ -3365,7 +3417,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case 693933948: /*requester*/ return new Property("requester", "", "The creator of the task.", 0, 1, requester); case -901444568: /*performerType*/ return new Property("performerType", "CodeableConcept", "The type of participant that can execute the task.", 0, java.lang.Integer.MAX_VALUE, performerType); case 106164915: /*owner*/ return new Property("owner", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "Individual organization or Device currently responsible for task execution.", 0, 1, owner); - case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reason); + case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode); + case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Any)", "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference); case 3387378: /*note*/ return new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note); case 1538891575: /*relevantHistory*/ return new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.", 0, java.lang.Integer.MAX_VALUE, relevantHistory); case -1561062452: /*restriction*/ return new Property("restriction", "", "If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", 0, 1, restriction); @@ -3400,7 +3453,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // TaskRequesterComponent case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference - case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept + case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : new Base[] {this.reasonCode}; // CodeableConcept + case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : new Base[] {this.reasonReference}; // Reference case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference case -1561062452: /*restriction*/ return this.restriction == null ? new Base[0] : new Base[] {this.restriction}; // TaskRestrictionComponent @@ -3480,8 +3534,11 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case 106164915: // owner this.owner = castToReference(value); // Reference return value; - case -934964668: // reason - this.reason = castToCodeableConcept(value); // CodeableConcept + case 722137681: // reasonCode + this.reasonCode = castToCodeableConcept(value); // CodeableConcept + return value; + case -1146218137: // reasonReference + this.reasonReference = castToReference(value); // Reference return value; case 3387378: // note this.getNote().add(castToAnnotation(value)); // Annotation @@ -3550,8 +3607,10 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use this.getPerformerType().add(castToCodeableConcept(value)); } else if (name.equals("owner")) { this.owner = castToReference(value); // Reference - } else if (name.equals("reason")) { - this.reason = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("reasonCode")) { + this.reasonCode = castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("reasonReference")) { + this.reasonReference = castToReference(value); // Reference } else if (name.equals("note")) { this.getNote().add(castToAnnotation(value)); } else if (name.equals("relevantHistory")) { @@ -3592,7 +3651,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case 693933948: return getRequester(); case -901444568: return addPerformerType(); case 106164915: return getOwner(); - case -934964668: return getReason(); + case 722137681: return getReasonCode(); + case -1146218137: return getReasonReference(); case 3387378: return addNote(); case 1538891575: return addRelevantHistory(); case -1561062452: return getRestriction(); @@ -3627,7 +3687,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use case 693933948: /*requester*/ return new String[] {}; case -901444568: /*performerType*/ return new String[] {"CodeableConcept"}; case 106164915: /*owner*/ return new String[] {"Reference"}; - case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; + case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; + case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; case 3387378: /*note*/ return new String[] {"Annotation"}; case 1538891575: /*relevantHistory*/ return new String[] {"Reference"}; case -1561062452: /*restriction*/ return new String[] {}; @@ -3718,9 +3779,13 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use this.owner = new Reference(); return this.owner; } - else if (name.equals("reason")) { - this.reason = new CodeableConcept(); - return this.reason; + else if (name.equals("reasonCode")) { + this.reasonCode = new CodeableConcept(); + return this.reasonCode; + } + else if (name.equals("reasonReference")) { + this.reasonReference = new Reference(); + return this.reasonReference; } else if (name.equals("note")) { return addNote(); @@ -3787,7 +3852,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use dst.performerType.add(i.copy()); }; dst.owner = owner == null ? null : owner.copy(); - dst.reason = reason == null ? null : reason.copy(); + dst.reasonCode = reasonCode == null ? null : reasonCode.copy(); + dst.reasonReference = reasonReference == null ? null : reasonReference.copy(); if (note != null) { dst.note = new ArrayList(); for (Annotation i : note) @@ -3831,8 +3897,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use && compareDeep(for_, o.for_, true) && compareDeep(context, o.context, true) && compareDeep(executionPeriod, o.executionPeriod, true) && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(lastModified, o.lastModified, true) && compareDeep(requester, o.requester, true) && compareDeep(performerType, o.performerType, true) - && compareDeep(owner, o.owner, true) && compareDeep(reason, o.reason, true) && compareDeep(note, o.note, true) - && compareDeep(relevantHistory, o.relevantHistory, true) && compareDeep(restriction, o.restriction, true) + && compareDeep(owner, o.owner, true) && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) + && compareDeep(note, o.note, true) && compareDeep(relevantHistory, o.relevantHistory, true) && compareDeep(restriction, o.restriction, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true); } @@ -3852,8 +3918,8 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definition, basedOn , groupIdentifier, partOf, status, statusReason, businessStatus, intent, priority , code, description, focus, for_, context, executionPeriod, authoredOn, lastModified - , requester, performerType, owner, reason, note, relevantHistory, restriction - , input, output); + , requester, performerType, owner, reasonCode, reasonReference, note, relevantHistory + , restriction, input, output); } @Override diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestReport.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestReport.java index 4b1c8c759ed..0cdcbc65919 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestReport.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestReport.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestScript.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestScript.java index 8cd0d30b23e..15410e69bec 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestScript.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TestScript.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Timing.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Timing.java index b87b1d00ded..f0eb53225ec 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Timing.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/Timing.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TriggerDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TriggerDefinition.java index 346b74d2a3a..02b0006a54b 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TriggerDefinition.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/TriggerDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; @@ -42,20 +42,24 @@ import ca.uhn.fhir.model.api.annotation.Block; import org.hl7.fhir.instance.model.api.*; import org.hl7.fhir.exceptions.FHIRException; /** - * A description of a triggering event. + * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. */ @DatatypeDef(name="TriggerDefinition") public class TriggerDefinition extends Type implements ICompositeType { public enum TriggerType { /** - * The trigger occurs in response to a specific named event + * The trigger occurs in response to a specific named event, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided */ NAMEDEVENT, /** - * The trigger occurs at a specific time or periodically as described by a timing or schedule + * The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event */ PERIODIC, + /** + * The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed + */ + DATACHANGED, /** * The trigger occurs whenever data of a particular type is added */ @@ -87,6 +91,8 @@ public class TriggerDefinition extends Type implements ICompositeType { return NAMEDEVENT; if ("periodic".equals(codeString)) return PERIODIC; + if ("data-changed".equals(codeString)) + return DATACHANGED; if ("data-added".equals(codeString)) return DATAADDED; if ("data-modified".equals(codeString)) @@ -106,6 +112,7 @@ public class TriggerDefinition extends Type implements ICompositeType { switch (this) { case NAMEDEVENT: return "named-event"; case PERIODIC: return "periodic"; + case DATACHANGED: return "data-changed"; case DATAADDED: return "data-added"; case DATAMODIFIED: return "data-modified"; case DATAREMOVED: return "data-removed"; @@ -118,6 +125,7 @@ public class TriggerDefinition extends Type implements ICompositeType { switch (this) { case NAMEDEVENT: return "http://hl7.org/fhir/trigger-type"; case PERIODIC: return "http://hl7.org/fhir/trigger-type"; + case DATACHANGED: return "http://hl7.org/fhir/trigger-type"; case DATAADDED: return "http://hl7.org/fhir/trigger-type"; case DATAMODIFIED: return "http://hl7.org/fhir/trigger-type"; case DATAREMOVED: return "http://hl7.org/fhir/trigger-type"; @@ -128,8 +136,9 @@ public class TriggerDefinition extends Type implements ICompositeType { } public String getDefinition() { switch (this) { - case NAMEDEVENT: return "The trigger occurs in response to a specific named event"; - case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule"; + case NAMEDEVENT: return "The trigger occurs in response to a specific named event, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided"; + case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event"; + case DATACHANGED: return "The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed"; case DATAADDED: return "The trigger occurs whenever data of a particular type is added"; case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified"; case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed"; @@ -142,8 +151,9 @@ public class TriggerDefinition extends Type implements ICompositeType { switch (this) { case NAMEDEVENT: return "Named Event"; case PERIODIC: return "Periodic"; + case DATACHANGED: return "Data Changed"; case DATAADDED: return "Data Added"; - case DATAMODIFIED: return "Data Modified"; + case DATAMODIFIED: return "Data Updated"; case DATAREMOVED: return "Data Removed"; case DATAACCESSED: return "Data Accessed"; case DATAACCESSENDED: return "Data Access Ended"; @@ -161,6 +171,8 @@ public class TriggerDefinition extends Type implements ICompositeType { return TriggerType.NAMEDEVENT; if ("periodic".equals(codeString)) return TriggerType.PERIODIC; + if ("data-changed".equals(codeString)) + return TriggerType.DATACHANGED; if ("data-added".equals(codeString)) return TriggerType.DATAADDED; if ("data-modified".equals(codeString)) @@ -185,6 +197,8 @@ public class TriggerDefinition extends Type implements ICompositeType { return new Enumeration(this, TriggerType.NAMEDEVENT); if ("periodic".equals(codeString)) return new Enumeration(this, TriggerType.PERIODIC); + if ("data-changed".equals(codeString)) + return new Enumeration(this, TriggerType.DATACHANGED); if ("data-added".equals(codeString)) return new Enumeration(this, TriggerType.DATAADDED); if ("data-modified".equals(codeString)) @@ -202,6 +216,8 @@ public class TriggerDefinition extends Type implements ICompositeType { return "named-event"; if (code == TriggerType.PERIODIC) return "periodic"; + if (code == TriggerType.DATACHANGED) + return "data-changed"; if (code == TriggerType.DATAADDED) return "data-added"; if (code == TriggerType.DATAMODIFIED) @@ -219,8 +235,100 @@ public class TriggerDefinition extends Type implements ICompositeType { } } + public enum ExpressionLanguage { + /** + * Clinical Quality Language + */ + TEXT_CQL, + /** + * FHIRPath + */ + TEXT_FHIRPATH, + /** + * added to help the parsers with the generic types + */ + NULL; + public static ExpressionLanguage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("text/cql".equals(codeString)) + return TEXT_CQL; + if ("text/fhirpath".equals(codeString)) + return TEXT_FHIRPATH; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown ExpressionLanguage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TEXT_CQL: return "text/cql"; + case TEXT_FHIRPATH: return "text/fhirpath"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case TEXT_CQL: return "http://hl7.org/fhir/expression-language"; + case TEXT_FHIRPATH: return "http://hl7.org/fhir/expression-language"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case TEXT_CQL: return "Clinical Quality Language"; + case TEXT_FHIRPATH: return "FHIRPath"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TEXT_CQL: return "CQL"; + case TEXT_FHIRPATH: return "FHIRPath"; + default: return "?"; + } + } + } + + public static class ExpressionLanguageEnumFactory implements EnumFactory { + public ExpressionLanguage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("text/cql".equals(codeString)) + return ExpressionLanguage.TEXT_CQL; + if ("text/fhirpath".equals(codeString)) + return ExpressionLanguage.TEXT_FHIRPATH; + throw new IllegalArgumentException("Unknown ExpressionLanguage code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("text/cql".equals(codeString)) + return new Enumeration(this, ExpressionLanguage.TEXT_CQL); + if ("text/fhirpath".equals(codeString)) + return new Enumeration(this, ExpressionLanguage.TEXT_FHIRPATH); + throw new FHIRException("Unknown ExpressionLanguage code '"+codeString+"'"); + } + public String toCode(ExpressionLanguage code) { + if (code == ExpressionLanguage.TEXT_CQL) + return "text/cql"; + if (code == ExpressionLanguage.TEXT_FHIRPATH) + return "text/fhirpath"; + return "?"; + } + public String toSystem(ExpressionLanguage code) { + return code.getSystem(); + } + } + @Block() - public static class TriggerDefinitionEventConditionComponent extends Element implements IBaseDatatypeElement { + public static class TriggerDefinitionConditionComponent extends Element implements IBaseDatatypeElement { /** * A brief, natural language description of the condition that effectively communicates the intended semantics. */ @@ -231,33 +339,43 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * The media type of the language for the expression. */ - @Child(name = "language", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression." ) - protected StringType language; + @Child(name = "language", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="text/cql | text/fhirpath | etc", formalDefinition="The media type of the language for the expression." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/expression-language") + protected Enumeration language; /** * An expression that returns true or false, indicating whether or not the condition is satisfied. */ - @Child(name = "expression", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "expression", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether or not the condition is satisfied." ) protected StringType expression; - private static final long serialVersionUID = 1354288281L; + private static final long serialVersionUID = -1280303355L; /** * Constructor */ - public TriggerDefinitionEventConditionComponent() { + public TriggerDefinitionConditionComponent() { super(); } + /** + * Constructor + */ + public TriggerDefinitionConditionComponent(Enumeration language, StringType expression) { + super(); + this.language = language; + this.expression = expression; + } + /** * @return {@link #description} (A brief, natural language description of the condition that effectively communicates the intended semantics.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ public StringType getDescriptionElement() { if (this.description == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TriggerDefinitionEventConditionComponent.description"); + throw new Error("Attempt to auto-create TriggerDefinitionConditionComponent.description"); else if (Configuration.doAutoCreate()) this.description = new StringType(); // bb return this.description; @@ -274,7 +392,7 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @param value {@link #description} (A brief, natural language description of the condition that effectively communicates the intended semantics.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ - public TriggerDefinitionEventConditionComponent setDescriptionElement(StringType value) { + public TriggerDefinitionConditionComponent setDescriptionElement(StringType value) { this.description = value; return this; } @@ -289,7 +407,7 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @param value A brief, natural language description of the condition that effectively communicates the intended semantics. */ - public TriggerDefinitionEventConditionComponent setDescription(String value) { + public TriggerDefinitionConditionComponent setDescription(String value) { if (Utilities.noString(value)) this.description = null; else { @@ -303,12 +421,12 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @return {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value */ - public StringType getLanguageElement() { + public Enumeration getLanguageElement() { if (this.language == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TriggerDefinitionEventConditionComponent.language"); + throw new Error("Attempt to auto-create TriggerDefinitionConditionComponent.language"); else if (Configuration.doAutoCreate()) - this.language = new StringType(); // bb + this.language = new Enumeration(new ExpressionLanguageEnumFactory()); // bb return this.language; } @@ -323,7 +441,7 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @param value {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value */ - public TriggerDefinitionEventConditionComponent setLanguageElement(StringType value) { + public TriggerDefinitionConditionComponent setLanguageElement(Enumeration value) { this.language = value; return this; } @@ -331,21 +449,17 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @return The media type of the language for the expression. */ - public String getLanguage() { + public ExpressionLanguage getLanguage() { return this.language == null ? null : this.language.getValue(); } /** * @param value The media type of the language for the expression. */ - public TriggerDefinitionEventConditionComponent setLanguage(String value) { - if (Utilities.noString(value)) - this.language = null; - else { + public TriggerDefinitionConditionComponent setLanguage(ExpressionLanguage value) { if (this.language == null) - this.language = new StringType(); + this.language = new Enumeration(new ExpressionLanguageEnumFactory()); this.language.setValue(value); - } return this; } @@ -355,7 +469,7 @@ public class TriggerDefinition extends Type implements ICompositeType { public StringType getExpressionElement() { if (this.expression == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TriggerDefinitionEventConditionComponent.expression"); + throw new Error("Attempt to auto-create TriggerDefinitionConditionComponent.expression"); else if (Configuration.doAutoCreate()) this.expression = new StringType(); // bb return this.expression; @@ -372,7 +486,7 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @param value {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value */ - public TriggerDefinitionEventConditionComponent setExpressionElement(StringType value) { + public TriggerDefinitionConditionComponent setExpressionElement(StringType value) { this.expression = value; return this; } @@ -387,21 +501,17 @@ public class TriggerDefinition extends Type implements ICompositeType { /** * @param value An expression that returns true or false, indicating whether or not the condition is satisfied. */ - public TriggerDefinitionEventConditionComponent setExpression(String value) { - if (Utilities.noString(value)) - this.expression = null; - else { + public TriggerDefinitionConditionComponent setExpression(String value) { if (this.expression == null) this.expression = new StringType(); this.expression.setValue(value); - } return this; } protected void listChildren(List children) { super.listChildren(children); children.add(new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, 1, description)); - children.add(new Property("language", "string", "The media type of the language for the expression.", 0, 1, language)); + children.add(new Property("language", "code", "The media type of the language for the expression.", 0, 1, language)); children.add(new Property("expression", "string", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression)); } @@ -409,7 +519,7 @@ public class TriggerDefinition extends Type implements ICompositeType { public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case -1724546052: /*description*/ return new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, 1, description); - case -1613589672: /*language*/ return new Property("language", "string", "The media type of the language for the expression.", 0, 1, language); + case -1613589672: /*language*/ return new Property("language", "code", "The media type of the language for the expression.", 0, 1, language); case -1795452264: /*expression*/ return new Property("expression", "string", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -420,7 +530,7 @@ public class TriggerDefinition extends Type implements ICompositeType { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType - case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // StringType + case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // Enumeration case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType default: return super.getProperty(hash, name, checkValid); } @@ -434,7 +544,8 @@ public class TriggerDefinition extends Type implements ICompositeType { this.description = castToString(value); // StringType return value; case -1613589672: // language - this.language = castToString(value); // StringType + value = new ExpressionLanguageEnumFactory().fromType(castToCode(value)); + this.language = (Enumeration) value; // Enumeration return value; case -1795452264: // expression this.expression = castToString(value); // StringType @@ -449,7 +560,8 @@ public class TriggerDefinition extends Type implements ICompositeType { if (name.equals("description")) { this.description = castToString(value); // StringType } else if (name.equals("language")) { - this.language = castToString(value); // StringType + value = new ExpressionLanguageEnumFactory().fromType(castToCode(value)); + this.language = (Enumeration) value; // Enumeration } else if (name.equals("expression")) { this.expression = castToString(value); // StringType } else @@ -472,7 +584,7 @@ public class TriggerDefinition extends Type implements ICompositeType { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case -1724546052: /*description*/ return new String[] {"string"}; - case -1613589672: /*language*/ return new String[] {"string"}; + case -1613589672: /*language*/ return new String[] {"code"}; case -1795452264: /*expression*/ return new String[] {"string"}; default: return super.getTypesForProperty(hash, name); } @@ -494,8 +606,8 @@ public class TriggerDefinition extends Type implements ICompositeType { return super.addChild(name); } - public TriggerDefinitionEventConditionComponent copy() { - TriggerDefinitionEventConditionComponent dst = new TriggerDefinitionEventConditionComponent(); + public TriggerDefinitionConditionComponent copy() { + TriggerDefinitionConditionComponent dst = new TriggerDefinitionConditionComponent(); copyValues(dst); dst.description = description == null ? null : description.copy(); dst.language = language == null ? null : language.copy(); @@ -507,9 +619,9 @@ public class TriggerDefinition extends Type implements ICompositeType { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof TriggerDefinitionEventConditionComponent)) + if (!(other instanceof TriggerDefinitionConditionComponent)) return false; - TriggerDefinitionEventConditionComponent o = (TriggerDefinitionEventConditionComponent) other; + TriggerDefinitionConditionComponent o = (TriggerDefinitionConditionComponent) other; return compareDeep(description, o.description, true) && compareDeep(language, o.language, true) && compareDeep(expression, o.expression, true); } @@ -518,9 +630,9 @@ public class TriggerDefinition extends Type implements ICompositeType { public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof TriggerDefinitionEventConditionComponent)) + if (!(other instanceof TriggerDefinitionConditionComponent)) return false; - TriggerDefinitionEventConditionComponent o = (TriggerDefinitionEventConditionComponent) other; + TriggerDefinitionConditionComponent o = (TriggerDefinitionConditionComponent) other; return compareValues(description, o.description, true) && compareValues(language, o.language, true) && compareValues(expression, o.expression, true); } @@ -531,7 +643,7 @@ public class TriggerDefinition extends Type implements ICompositeType { } public String fhirType() { - return "TriggerDefinition.eventCondition"; + return "TriggerDefinition.condition"; } @@ -541,39 +653,39 @@ public class TriggerDefinition extends Type implements ICompositeType { * The type of triggering event. */ @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="named-event | periodic | data-added | data-modified | data-removed | data-accessed | data-access-ended", formalDefinition="The type of triggering event." ) + @Description(shortDefinition="named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended", formalDefinition="The type of triggering event." ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/trigger-type") protected Enumeration type; /** - * The name of the event (if this is a named-event trigger). + * A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context. */ - @Child(name = "eventName", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Triggering event name", formalDefinition="The name of the event (if this is a named-event trigger)." ) - protected StringType eventName; + @Child(name = "name", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name or URI that identifies the event", formalDefinition="A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context." ) + protected UriType name; /** - * The timing of the event (if this is a period trigger). + * The timing of the event (if this is a periodic trigger). */ - @Child(name = "eventTiming", type = {Timing.class, Schedule.class, DateType.class, DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Timing of the event", formalDefinition="The timing of the event (if this is a period trigger)." ) - protected Type eventTiming; + @Child(name = "timing", type = {Timing.class, Schedule.class, DateType.class, DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Timing of the event", formalDefinition="The timing of the event (if this is a periodic trigger)." ) + protected Type timing; /** * The triggering data of the event (if this is a data trigger). */ - @Child(name = "eventData", type = {DataRequirement.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "data", type = {DataRequirement.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Triggering data of the event", formalDefinition="The triggering data of the event (if this is a data trigger)." ) - protected DataRequirement eventData; + protected DataRequirement data; /** * A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires. */ - @Child(name = "eventCondition", type = {}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "condition", type = {}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Whether the event triggers", formalDefinition="A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires." ) - protected TriggerDefinitionEventConditionComponent eventCondition; + protected TriggerDefinitionConditionComponent condition; - private static final long serialVersionUID = -1377796374L; + private static final long serialVersionUID = 789050637L; /** * Constructor @@ -636,195 +748,195 @@ public class TriggerDefinition extends Type implements ICompositeType { } /** - * @return {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value + * @return {@link #name} (A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public StringType getEventNameElement() { - if (this.eventName == null) + public UriType getNameElement() { + if (this.name == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TriggerDefinition.eventName"); + throw new Error("Attempt to auto-create TriggerDefinition.name"); else if (Configuration.doAutoCreate()) - this.eventName = new StringType(); // bb - return this.eventName; + this.name = new UriType(); // bb + return this.name; } - public boolean hasEventNameElement() { - return this.eventName != null && !this.eventName.isEmpty(); + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); } - public boolean hasEventName() { - return this.eventName != null && !this.eventName.isEmpty(); + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); } /** - * @param value {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value + * @param value {@link #name} (A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public TriggerDefinition setEventNameElement(StringType value) { - this.eventName = value; + public TriggerDefinition setNameElement(UriType value) { + this.name = value; return this; } /** - * @return The name of the event (if this is a named-event trigger). + * @return A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context. */ - public String getEventName() { - return this.eventName == null ? null : this.eventName.getValue(); + public String getName() { + return this.name == null ? null : this.name.getValue(); } /** - * @param value The name of the event (if this is a named-event trigger). + * @param value A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context. */ - public TriggerDefinition setEventName(String value) { + public TriggerDefinition setName(String value) { if (Utilities.noString(value)) - this.eventName = null; + this.name = null; else { - if (this.eventName == null) - this.eventName = new StringType(); - this.eventName.setValue(value); + if (this.name == null) + this.name = new UriType(); + this.name.setValue(value); } return this; } /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + * @return {@link #timing} (The timing of the event (if this is a periodic trigger).) */ - public Type getEventTiming() { - return this.eventTiming; + public Type getTiming() { + return this.timing; } /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + * @return {@link #timing} (The timing of the event (if this is a periodic trigger).) */ - public Timing getEventTimingTiming() throws FHIRException { - if (!(this.eventTiming instanceof Timing)) - throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (Timing) this.eventTiming; + public Timing getTimingTiming() throws FHIRException { + if (!(this.timing instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (Timing) this.timing; } - public boolean hasEventTimingTiming() { - return this.eventTiming instanceof Timing; + public boolean hasTimingTiming() { + return this.timing instanceof Timing; } /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + * @return {@link #timing} (The timing of the event (if this is a periodic trigger).) */ - public Reference getEventTimingReference() throws FHIRException { - if (!(this.eventTiming instanceof Reference)) - throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (Reference) this.eventTiming; + public Reference getTimingReference() throws FHIRException { + if (!(this.timing instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (Reference) this.timing; } - public boolean hasEventTimingReference() { - return this.eventTiming instanceof Reference; + public boolean hasTimingReference() { + return this.timing instanceof Reference; } /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + * @return {@link #timing} (The timing of the event (if this is a periodic trigger).) */ - public DateType getEventTimingDateType() throws FHIRException { - if (!(this.eventTiming instanceof DateType)) - throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (DateType) this.eventTiming; + public DateType getTimingDateType() throws FHIRException { + if (!(this.timing instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (DateType) this.timing; } - public boolean hasEventTimingDateType() { - return this.eventTiming instanceof DateType; + public boolean hasTimingDateType() { + return this.timing instanceof DateType; } /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + * @return {@link #timing} (The timing of the event (if this is a periodic trigger).) */ - public DateTimeType getEventTimingDateTimeType() throws FHIRException { - if (!(this.eventTiming instanceof DateTimeType)) - throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (DateTimeType) this.eventTiming; + public DateTimeType getTimingDateTimeType() throws FHIRException { + if (!(this.timing instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered"); + return (DateTimeType) this.timing; } - public boolean hasEventTimingDateTimeType() { - return this.eventTiming instanceof DateTimeType; + public boolean hasTimingDateTimeType() { + return this.timing instanceof DateTimeType; } - public boolean hasEventTiming() { - return this.eventTiming != null && !this.eventTiming.isEmpty(); + public boolean hasTiming() { + return this.timing != null && !this.timing.isEmpty(); } /** - * @param value {@link #eventTiming} (The timing of the event (if this is a period trigger).) + * @param value {@link #timing} (The timing of the event (if this is a periodic trigger).) */ - public TriggerDefinition setEventTiming(Type value) { - this.eventTiming = value; + public TriggerDefinition setTiming(Type value) { + this.timing = value; return this; } /** - * @return {@link #eventData} (The triggering data of the event (if this is a data trigger).) + * @return {@link #data} (The triggering data of the event (if this is a data trigger).) */ - public DataRequirement getEventData() { - if (this.eventData == null) + public DataRequirement getData() { + if (this.data == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TriggerDefinition.eventData"); + throw new Error("Attempt to auto-create TriggerDefinition.data"); else if (Configuration.doAutoCreate()) - this.eventData = new DataRequirement(); // cc - return this.eventData; + this.data = new DataRequirement(); // cc + return this.data; } - public boolean hasEventData() { - return this.eventData != null && !this.eventData.isEmpty(); + public boolean hasData() { + return this.data != null && !this.data.isEmpty(); } /** - * @param value {@link #eventData} (The triggering data of the event (if this is a data trigger).) + * @param value {@link #data} (The triggering data of the event (if this is a data trigger).) */ - public TriggerDefinition setEventData(DataRequirement value) { - this.eventData = value; + public TriggerDefinition setData(DataRequirement value) { + this.data = value; return this; } /** - * @return {@link #eventCondition} (A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.) + * @return {@link #condition} (A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.) */ - public TriggerDefinitionEventConditionComponent getEventCondition() { - if (this.eventCondition == null) + public TriggerDefinitionConditionComponent getCondition() { + if (this.condition == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TriggerDefinition.eventCondition"); + throw new Error("Attempt to auto-create TriggerDefinition.condition"); else if (Configuration.doAutoCreate()) - this.eventCondition = new TriggerDefinitionEventConditionComponent(); // cc - return this.eventCondition; + this.condition = new TriggerDefinitionConditionComponent(); // cc + return this.condition; } - public boolean hasEventCondition() { - return this.eventCondition != null && !this.eventCondition.isEmpty(); + public boolean hasCondition() { + return this.condition != null && !this.condition.isEmpty(); } /** - * @param value {@link #eventCondition} (A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.) + * @param value {@link #condition} (A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.) */ - public TriggerDefinition setEventCondition(TriggerDefinitionEventConditionComponent value) { - this.eventCondition = value; + public TriggerDefinition setCondition(TriggerDefinitionConditionComponent value) { + this.condition = value; return this; } protected void listChildren(List children) { super.listChildren(children); children.add(new Property("type", "code", "The type of triggering event.", 0, 1, type)); - children.add(new Property("eventName", "string", "The name of the event (if this is a named-event trigger).", 0, 1, eventName)); - children.add(new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming)); - children.add(new Property("eventData", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, 1, eventData)); - children.add(new Property("eventCondition", "", "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.", 0, 1, eventCondition)); + children.add(new Property("name", "uri", "A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.", 0, 1, name)); + children.add(new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing)); + children.add(new Property("data", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, 1, data)); + children.add(new Property("condition", "", "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.", 0, 1, condition)); } @Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 3575610: /*type*/ return new Property("type", "code", "The type of triggering event.", 0, 1, type); - case 31228997: /*eventName*/ return new Property("eventName", "string", "The name of the event (if this is a named-event trigger).", 0, 1, eventName); - case 1120539260: /*eventTiming[x]*/ return new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming); - case 125465476: /*eventTiming*/ return new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming); - case 1285594350: /*eventTimingTiming*/ return new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming); - case -171794393: /*eventTimingReference*/ return new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming); - case 376272210: /*eventTimingDate*/ return new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming); - case -1923726529: /*eventTimingDateTime*/ return new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, 1, eventTiming); - case 30931300: /*eventData*/ return new Property("eventData", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, 1, eventData); - case 94594977: /*eventCondition*/ return new Property("eventCondition", "", "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.", 0, 1, eventCondition); + case 3373707: /*name*/ return new Property("name", "uri", "A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.", 0, 1, name); + case 164632566: /*timing[x]*/ return new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing); + case -873664438: /*timing*/ return new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing); + case -497554124: /*timingTiming*/ return new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing); + case -1792466399: /*timingReference*/ return new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing); + case 807935768: /*timingDate*/ return new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing); + case -1837458939: /*timingDateTime*/ return new Property("timing[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a periodic trigger).", 0, 1, timing); + case 3076010: /*data*/ return new Property("data", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, 1, data); + case -861311717: /*condition*/ return new Property("condition", "", "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.", 0, 1, condition); default: return super.getNamedProperty(_hash, _name, _checkValid); } @@ -834,10 +946,10 @@ public class TriggerDefinition extends Type implements ICompositeType { public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { switch (hash) { case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration - case 31228997: /*eventName*/ return this.eventName == null ? new Base[0] : new Base[] {this.eventName}; // StringType - case 125465476: /*eventTiming*/ return this.eventTiming == null ? new Base[0] : new Base[] {this.eventTiming}; // Type - case 30931300: /*eventData*/ return this.eventData == null ? new Base[0] : new Base[] {this.eventData}; // DataRequirement - case 94594977: /*eventCondition*/ return this.eventCondition == null ? new Base[0] : new Base[] {this.eventCondition}; // TriggerDefinitionEventConditionComponent + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // UriType + case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type + case 3076010: /*data*/ return this.data == null ? new Base[0] : new Base[] {this.data}; // DataRequirement + case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // TriggerDefinitionConditionComponent default: return super.getProperty(hash, name, checkValid); } @@ -850,17 +962,17 @@ public class TriggerDefinition extends Type implements ICompositeType { value = new TriggerTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration return value; - case 31228997: // eventName - this.eventName = castToString(value); // StringType + case 3373707: // name + this.name = castToUri(value); // UriType return value; - case 125465476: // eventTiming - this.eventTiming = castToType(value); // Type + case -873664438: // timing + this.timing = castToType(value); // Type return value; - case 30931300: // eventData - this.eventData = castToDataRequirement(value); // DataRequirement + case 3076010: // data + this.data = castToDataRequirement(value); // DataRequirement return value; - case 94594977: // eventCondition - this.eventCondition = (TriggerDefinitionEventConditionComponent) value; // TriggerDefinitionEventConditionComponent + case -861311717: // condition + this.condition = (TriggerDefinitionConditionComponent) value; // TriggerDefinitionConditionComponent return value; default: return super.setProperty(hash, name, value); } @@ -872,14 +984,14 @@ public class TriggerDefinition extends Type implements ICompositeType { if (name.equals("type")) { value = new TriggerTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration - } else if (name.equals("eventName")) { - this.eventName = castToString(value); // StringType - } else if (name.equals("eventTiming[x]")) { - this.eventTiming = castToType(value); // Type - } else if (name.equals("eventData")) { - this.eventData = castToDataRequirement(value); // DataRequirement - } else if (name.equals("eventCondition")) { - this.eventCondition = (TriggerDefinitionEventConditionComponent) value; // TriggerDefinitionEventConditionComponent + } else if (name.equals("name")) { + this.name = castToUri(value); // UriType + } else if (name.equals("timing[x]")) { + this.timing = castToType(value); // Type + } else if (name.equals("data")) { + this.data = castToDataRequirement(value); // DataRequirement + } else if (name.equals("condition")) { + this.condition = (TriggerDefinitionConditionComponent) value; // TriggerDefinitionConditionComponent } else return super.setProperty(name, value); return value; @@ -889,11 +1001,11 @@ public class TriggerDefinition extends Type implements ICompositeType { public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: return getTypeElement(); - case 31228997: return getEventNameElement(); - case 1120539260: return getEventTiming(); - case 125465476: return getEventTiming(); - case 30931300: return getEventData(); - case 94594977: return getEventCondition(); + case 3373707: return getNameElement(); + case 164632566: return getTiming(); + case -873664438: return getTiming(); + case 3076010: return getData(); + case -861311717: return getCondition(); default: return super.makeProperty(hash, name); } @@ -903,10 +1015,10 @@ public class TriggerDefinition extends Type implements ICompositeType { public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: /*type*/ return new String[] {"code"}; - case 31228997: /*eventName*/ return new String[] {"string"}; - case 125465476: /*eventTiming*/ return new String[] {"Timing", "Reference", "date", "dateTime"}; - case 30931300: /*eventData*/ return new String[] {"DataRequirement"}; - case 94594977: /*eventCondition*/ return new String[] {}; + case 3373707: /*name*/ return new String[] {"uri"}; + case -873664438: /*timing*/ return new String[] {"Timing", "Reference", "date", "dateTime"}; + case 3076010: /*data*/ return new String[] {"DataRequirement"}; + case -861311717: /*condition*/ return new String[] {}; default: return super.getTypesForProperty(hash, name); } @@ -917,32 +1029,32 @@ public class TriggerDefinition extends Type implements ICompositeType { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type TriggerDefinition.type"); } - else if (name.equals("eventName")) { - throw new FHIRException("Cannot call addChild on a primitive type TriggerDefinition.eventName"); + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TriggerDefinition.name"); } - else if (name.equals("eventTimingTiming")) { - this.eventTiming = new Timing(); - return this.eventTiming; + else if (name.equals("timingTiming")) { + this.timing = new Timing(); + return this.timing; } - else if (name.equals("eventTimingReference")) { - this.eventTiming = new Reference(); - return this.eventTiming; + else if (name.equals("timingReference")) { + this.timing = new Reference(); + return this.timing; } - else if (name.equals("eventTimingDate")) { - this.eventTiming = new DateType(); - return this.eventTiming; + else if (name.equals("timingDate")) { + this.timing = new DateType(); + return this.timing; } - else if (name.equals("eventTimingDateTime")) { - this.eventTiming = new DateTimeType(); - return this.eventTiming; + else if (name.equals("timingDateTime")) { + this.timing = new DateTimeType(); + return this.timing; } - else if (name.equals("eventData")) { - this.eventData = new DataRequirement(); - return this.eventData; + else if (name.equals("data")) { + this.data = new DataRequirement(); + return this.data; } - else if (name.equals("eventCondition")) { - this.eventCondition = new TriggerDefinitionEventConditionComponent(); - return this.eventCondition; + else if (name.equals("condition")) { + this.condition = new TriggerDefinitionConditionComponent(); + return this.condition; } else return super.addChild(name); @@ -957,10 +1069,10 @@ public class TriggerDefinition extends Type implements ICompositeType { TriggerDefinition dst = new TriggerDefinition(); copyValues(dst); dst.type = type == null ? null : type.copy(); - dst.eventName = eventName == null ? null : eventName.copy(); - dst.eventTiming = eventTiming == null ? null : eventTiming.copy(); - dst.eventData = eventData == null ? null : eventData.copy(); - dst.eventCondition = eventCondition == null ? null : eventCondition.copy(); + dst.name = name == null ? null : name.copy(); + dst.timing = timing == null ? null : timing.copy(); + dst.data = data == null ? null : data.copy(); + dst.condition = condition == null ? null : condition.copy(); return dst; } @@ -975,9 +1087,8 @@ public class TriggerDefinition extends Type implements ICompositeType { if (!(other instanceof TriggerDefinition)) return false; TriggerDefinition o = (TriggerDefinition) other; - return compareDeep(type, o.type, true) && compareDeep(eventName, o.eventName, true) && compareDeep(eventTiming, o.eventTiming, true) - && compareDeep(eventData, o.eventData, true) && compareDeep(eventCondition, o.eventCondition, true) - ; + return compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(timing, o.timing, true) + && compareDeep(data, o.data, true) && compareDeep(condition, o.condition, true); } @Override @@ -987,12 +1098,12 @@ public class TriggerDefinition extends Type implements ICompositeType { if (!(other instanceof TriggerDefinition)) return false; TriggerDefinition o = (TriggerDefinition) other; - return compareValues(type, o.type, true) && compareValues(eventName, o.eventName, true); + return compareValues(type, o.type, true) && compareValues(name, o.name, true); } public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, eventName, eventTiming - , eventData, eventCondition); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, name, timing, data + , condition); } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/UsageContext.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/UsageContext.java index 760d3a55d72..2e298e2442e 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/UsageContext.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/UsageContext.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ValueSet.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ValueSet.java index ed830b66168..bdaab96cf69 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ValueSet.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ValueSet.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/VisionPrescription.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/VisionPrescription.java index 628e0eaca83..3df15ebce43 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/VisionPrescription.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/VisionPrescription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.r4.model; */ -// Generated on Sat, Jul 8, 2017 23:19+1000 for FHIR v3.1.0 +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 import java.util.*; diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Child.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Child.java deleted file mode 100644 index 00015d407a4..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Child.java +++ /dev/null @@ -1,165 +0,0 @@ -package org.hl7.fhir.r4.model.annotations; - -/* - * #%L - * HAPI FHIR Structures - HL7.org DSTU2 - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.hl7.fhir.r4.model.Enumeration; -import org.hl7.fhir.r4.model.api.IBase; -import org.hl7.fhir.r4.model.api.IBaseEnumFactory; - -/** - * Field annotation for fields within resource and datatype definitions, indicating - * a child of that type. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(value= {ElementType.FIELD}) -public @interface Child { - - /** - * Constant value to supply for {@link #order()} when the order is defined - * elsewhere - */ - int ORDER_UNKNOWN = -1; - - /** - * Constant value to supply for {@link #max()} to indicate '*' (no maximum) - */ - int MAX_UNLIMITED = -1; - - /** - * Constant value to supply for {@link #order()} to indicate that this child should replace the - * entry in the superclass with the same name (and take its {@link Child#order() order} value - * in the process). This is useful if you wish to redefine an existing field in a resource/type - * definition in order to constrain/extend it. - */ - int REPLACE_PARENT = -2; - - /** - * The name of this field, as it will appear in serialized versions of the message - */ - String name(); - - /** - * The order in which this field comes within its parent. The first field should have a - * value of 0, the second a value of 1, etc. - */ - int order() default ORDER_UNKNOWN; - - /** - * The minimum number of repetitions allowed for this child - */ - int min() default 0; - - /** - * The maximum number of repetitions allowed for this child. Should be - * set to {@link #MAX_UNLIMITED} if there is no limit to the number of - * repetitions. - */ - int max() default 1; - - /** - * Lists the allowable types for this field, if the field supports multiple - * types (otherwise does not need to be populated). - *

- * For example, if this field supports either DateTimeDt or BooleanDt types, - * those two classes should be supplied here. - *

- */ - Class[] type() default {}; - - /** - * For children which accept an {@link Enumeration} as the type, this - * field indicates the type to use for the enum factory - */ - Class> enumFactory() default NoEnumFactory.class; - - /** - * Is this element a modifier? - */ - boolean modifier() default false; - - /** - * Should this element be included in the summary view - */ - boolean summary() default false; - - // Not implemented -// /** -// * This value is used when extending a built-in model class and defining a -// * field to replace a field within the built-in class. For example, the {@link Patient} -// * resource has a {@link Patient#getName() name} field, but if you wanted to extend Patient and -// * provide your own implementation of {@link HumanNameDt} (most likely your own subclass of -// * HumanNameDt which adds extensions of your choosing) you could do that using a replacement field. -// */ -// String replaces() default ""; - - public static class NoEnumFactory implements IBaseEnumFactory> { - - private NoEnumFactory() { - // non instantiable - } - - @Override - public Enum fromCode(String theCodeString) throws IllegalArgumentException { - return null; - } - - @Override - public String toCode(Enum theCode) { - return null; - } - - } - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/DatatypeDef.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/DatatypeDef.java deleted file mode 100644 index 68b0d839496..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/DatatypeDef.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.hl7.fhir.r4.model.annotations; - -/* - * #%L - * HAPI FHIR Structures - HL7.org DSTU2 - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.hl7.fhir.r4.model.api.IBaseDatatype; - -import ca.uhn.fhir.model.primitive.BoundCodeDt; -import ca.uhn.fhir.model.primitive.CodeDt; - -/** - * Class annotation to note a class which defines a datatype - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(value= {ElementType.TYPE}) -public @interface DatatypeDef { - - /** - * The defined name of this datatype - */ - String name(); - - /** - * Set this to true (default is false) for any types that are - * really only a specialization of another type. For example, - * {@link BoundCodeDt} is really just a specific type of - * {@link CodeDt} and not a separate datatype, so it should - * have this set to true. - */ - boolean isSpecialization() default false; - - /** - * Indicates that this datatype is a profile of the given datatype, which - * implies certain parsing/encoding rules (e.g. a choice element named - * foo[x] which allows a Markdown value will still be encoded as - * fooString because Markdown is a profile of string. - */ - Class profileOf() default IBaseDatatype.class; - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Description.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Description.java deleted file mode 100644 index 1ff960019a2..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Description.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.hl7.fhir.r4.model.annotations; - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation which may be placed on a resource/datatype definition, or a field, or - * a search parameter definition in order to provide documentation for that item. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(value= {ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER, ElementType.METHOD}) -public @interface Description { - - /** - * Optional short name for this child - */ - String shortDefinition() default ""; - - /** - * Optional formal definition for this child - */ - String formalDefinition() default ""; - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Extension.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Extension.java deleted file mode 100644 index a8d69e58268..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Extension.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.hl7.fhir.r4.model.annotations; - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Field modifier to be placed on a child field (a field also annotated with the {@link Child} annotation) which - * indicates that this field is an extension. - */ -@Target(value = { ElementType.FIELD }) -@Retention(RetentionPolicy.RUNTIME) -public @interface Extension { - - /** - * This parameter affects how the extension is treated when the element definition containing this resource is - * exported to a profile. - * - *

- * If set to true, the resource is taken to be a local resource and its definition is exported - * along with the reference. Use this option for extension defintions that you have added locally (i.e. within your - * own organization) - *

- * - *

- * If set to false, the resource is taken to be a remote resource and its definition is - * not exported to the profile. Use this option for extensions that are defined by other organizations (i.e. - * by regional authorities or jurisdictional governments) - *

- */ - boolean definedLocally(); - - /** - * Returns true if this extension is a modifier extension - */ - boolean isModifier(); - - /** - * The URL associated with this extension - */ - String url(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/SearchParamDefinition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/SearchParamDefinition.java deleted file mode 100644 index 2043d4f7278..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/SearchParamDefinition.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.hl7.fhir.r4.model.annotations; - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.hl7.fhir.r4.model.Resource; - -@Target(value=ElementType.FIELD) -@Retention(RetentionPolicy.RUNTIME) -public @interface SearchParamDefinition { - - /** - * The name for this parameter - */ - String name(); - - /** - * The path for this parameter - */ - String path(); - - /** - * A description of this parameter - */ - String description() default ""; - - /** - * The type for this parameter, e.g. "string", or "token" - */ - String type() default "string"; - - /** - * If the parameter is of type "composite", this parameter lists the names of the parameters - * which this parameter is a composite of. E.g. "name-value-token" is a composite of "name" and "value-token". - *

- * If the parameter is not a composite, this parameter must be empty - *

- */ - String[] compositeOf() default {}; - - /** - * For search params of type "reference", this can optionally be used to - * specify the resource type(s) that this parameter applies to. - */ - Class[] target() default {}; - - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IAnyResource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IAnyResource.java deleted file mode 100644 index 88015a52671..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IAnyResource.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IAnyResource extends IBaseResource { - - String getId(); - - IAnyResource setId(String theId); - - IIdType getIdElement(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBackboneElement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBackboneElement.java deleted file mode 100644 index 90f959f5fb2..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBackboneElement.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBackboneElement extends IBase { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBase.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBase.java deleted file mode 100644 index 4a6ed4587fc..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBase.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -/** - * This interface is a simple marker for anything which is an HL7 - * structure of some kind. It is provided mostly to simplify convergence - * between the HL7.org structures and the HAPI ones. - */ -public interface IBase { - - boolean isEmpty(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBinary.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBinary.java deleted file mode 100644 index f6664ce0527..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBinary.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseBinary extends IBaseResource { - - byte[] getContent(); - - String getContentAsBase64(); - - String getContentType(); - - IBaseBinary setContent(byte[] theContent); - - IBaseBinary setContentAsBase64(String theContent); - - IBaseBinary setContentType(String theContentType); -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBooleanDatatype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBooleanDatatype.java deleted file mode 100644 index f5725e475d2..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBooleanDatatype.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseBooleanDatatype extends IPrimitiveType { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBundle.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBundle.java deleted file mode 100644 index 21906c94ce5..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseBundle.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseBundle extends IBaseResource { - - /** - * Constant for links provided in the bundle. This constant is used in the - * link.type field to indicate that the given link is for - * the next page of results. - */ - public static final String LINK_NEXT = "next"; - - /** - * Constant for links provided in the bundle. This constant is used in the - * link.type field to indicate that the given link is for - * the previous page of results. - */ - public static final String LINK_PREV = "prev"; - - /** - * Constant for links provided in the bundle. This constant is used in the - * link.type field to indicate that the given link is for - * this bundle. - */ - public static final String LINK_SELF = "self"; - - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseCoding.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseCoding.java deleted file mode 100644 index ed831e695d3..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseCoding.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -public interface IBaseCoding { - - IBaseCoding setSystem(String theScheme); - - IBaseCoding setCode(String theTerm); - - IBaseCoding setDisplay(String theLabel); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseConformance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseConformance.java deleted file mode 100644 index 2763cda0a82..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseConformance.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - -public interface IBaseConformance extends IBaseResource { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDatatype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDatatype.java deleted file mode 100644 index 9fa3ee1fcfc..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDatatype.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseDatatype extends IBase { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDatatypeElement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDatatypeElement.java deleted file mode 100644 index 4ce4a707ebb..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDatatypeElement.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseDatatypeElement extends IBase { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDecimalDatatype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDecimalDatatype.java deleted file mode 100644 index 2cd327bbe8d..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseDecimalDatatype.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.math.BigDecimal; - -public interface IBaseDecimalDatatype extends IPrimitiveType { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseElement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseElement.java deleted file mode 100644 index ef6f4864d54..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseElement.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -public interface IBaseElement { - - IBaseElement setId(String theValue); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseEnumFactory.java deleted file mode 100644 index 72781afa101..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseEnumFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -public interface IBaseEnumFactory> { - - /** - * Read an enumeration value from the string that represents it on the XML or JSON - * - * @param codeString the value found in the XML or JSON - * @return the enumeration value - * @throws IllegalArgumentException is the value is not known - */ - public T fromCode(String codeString) throws IllegalArgumentException; - - /** - * Get the XML/JSON representation for an enumerated value - * - * @param code - the enumeration value - * @return the XML/JSON representation - */ - public String toCode(T code); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseEnumeration.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseEnumeration.java deleted file mode 100644 index a627e8db354..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseEnumeration.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -public interface IBaseEnumeration> extends IPrimitiveType { - - // Marker interface - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseExtension.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseExtension.java deleted file mode 100644 index 44b5ab408c9..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseExtension.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.util.List; - -public interface IBaseExtension extends ICompositeType { - - List getExtension(); - - String getUrl(); - - IBaseDatatype getValue(); - - T setUrl(String theUrl); - - T setValue(IBaseDatatype theValue); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseHasExtensions.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseHasExtensions.java deleted file mode 100644 index 4aac4eb9d4e..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseHasExtensions.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.util.List; - -public interface IBaseHasExtensions { - - public List> getExtension(); - - public IBaseExtension addExtension(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseHasModifierExtensions.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseHasModifierExtensions.java deleted file mode 100644 index 13a3d4ba105..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseHasModifierExtensions.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.util.List; - -public interface IBaseHasModifierExtensions { - - public List> getModifierExtension(); - - public IBaseExtension addModifierExtension(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseIntegerDatatype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseIntegerDatatype.java deleted file mode 100644 index ef454315d7b..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseIntegerDatatype.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseIntegerDatatype extends IPrimitiveType { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseMetaType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseMetaType.java deleted file mode 100644 index 98a011858a2..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseMetaType.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.util.Date; - -public interface IBaseMetaType extends ICompositeType { - - IBaseCoding addTag(); - - IBaseMetaType setLastUpdated(Date theHeaderDateValue); - - Date getLastUpdated(); - - String getVersionId(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseOperationOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseOperationOutcome.java deleted file mode 100644 index b390b17fe8f..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseOperationOutcome.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -public interface IBaseOperationOutcome extends IBaseResource { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseParameters.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseParameters.java deleted file mode 100644 index 0a90702578b..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseParameters extends IBaseResource { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseReference.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseReference.java deleted file mode 100644 index 47d64cc5aac..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseReference.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IBaseReference extends ICompositeType { - - IBaseResource getResource(); - - void setResource(IBaseResource theResource); - - IIdType getReferenceElement(); - - IBaseReference setReference(String theReference); - - IBase setDisplay(String theValue); - - IPrimitiveType getDisplayElement(); -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseResource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseResource.java deleted file mode 100644 index 0104cb6cbbd..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseResource.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -/** - * For now, this is a simple marker interface indicating that a class is a resource type. - * There are two concrete types of implementations of this interrface. The first are - * HL7.org's Resource structures (e.g. - * org.hl7.fhir.instance.model.Patient) and - * the second are HAPI's Resource structures, e.g. - * ca.uhn.fhir.model.dstu.resource.Patient) - */ -public interface IBaseResource extends IBase { - - IIdType getIdElement(); - - IBaseResource setId(String theId); - - IBaseResource setId(IIdType theId); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseXhtml.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseXhtml.java deleted file mode 100644 index 50d27edccc3..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IBaseXhtml.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - -public interface IBaseXhtml extends IPrimitiveType { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/ICompositeType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/ICompositeType.java deleted file mode 100644 index 1c1f68b294d..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/ICompositeType.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -public interface ICompositeType extends IBaseDatatype { - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IDomainResource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IDomainResource.java deleted file mode 100644 index 16157bf0ffb..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IDomainResource.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.util.List; - -public interface IDomainResource extends IAnyResource { - - List getContained(); - - INarrative getText(); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IIdType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IIdType.java deleted file mode 100644 index 00239159a9d..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IIdType.java +++ /dev/null @@ -1,138 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -/** - * Base interface for ID datatype. - * - *

- * Concrete Implementations: This interface is often returned and/or accepted by methods in HAPI's API - * where either {@link ca.uhn.fhir.model.primitive.IdDt} (the HAPI structure ID type) or - * org.hl7.fhir.instance.model.IdType (the RI structure ID type) will be used, depending on - * which version of the strctures your application is using. - *

- */ -public interface IIdType { - - void applyTo(IBaseResource theResource); - - /** - * Returns the server base URL if this ID contains one. For example, the base URL is - * the 'http://example.com/fhir' in the following ID: http://example.com/fhir/Patient/123/_history/55 - */ - String getBaseUrl(); - - /** - * Returns only the logical ID part of this ID. For example, given the ID - * "http://example,.com/fhir/Patient/123/_history/456", this method would - * return "123". - */ - String getIdPart(); - - /** - * Returns the ID part of this ID (e.g. in the ID http://example.com/Patient/123/_history/456 this would be the - * part "123") parsed as a {@link Long}. - * - * @throws NumberFormatException If the value can't be parsed as a long - */ - Long getIdPartAsLong(); - - String getResourceType(); - - /** - * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use {@link #getIdPart()} to get just the ID portion. - * - * @see #getIdPart() - */ - String getValue(); - - String getVersionIdPart(); - - /** - * Returns the version ID part of this ID (e.g. in the ID http://example.com/Patient/123/_history/456 this would be the - * part "456") parsed as a {@link Long}. - * - * @throws NumberFormatException If the value can't be parsed as a long - */ - Long getVersionIdPartAsLong(); - - boolean hasBaseUrl(); - - /** - * Returns true if this ID contains an actual ID part. For example, the ID part is - * the '123' in the following ID: http://example.com/fhir/Patient/123/_history/55 - */ - boolean hasIdPart(); - - boolean hasResourceType(); - - boolean hasVersionIdPart(); - - /** - * Returns true if this ID contains an absolute URL (in other words, a URL starting with "http://" or "https://" - */ - boolean isAbsolute(); - - boolean isEmpty(); - - /** - * Returns true if the {@link #getIdPart() ID part of this object} is valid according to the FHIR rules for valid IDs. - *

- * The FHIR specification states: - * Any combination of upper or lower case ASCII letters ('A'..'Z', and 'a'..'z', numerals ('0'..'9'), '-' and '.', with a length limit of 64 characters. (This might be an integer, an un-prefixed OID, UUID or any other identifier pattern that meets these constraints.) regex: [A-Za-z0-9\-\.]{1,64} - *

- */ - boolean isIdPartValid(); - - /** - * Returns true if the {@link #getIdPart() ID part of this object} contains - * only numbers - */ - boolean isIdPartValidLong(); - - /** - * Returns true if the ID is a local reference (in other words, it begins with the '#' character) - */ - boolean isLocal(); - - /** - * Returns true if the {@link #getVersionIdPart() version ID part of this object} contains - * only numbers - */ - boolean isVersionIdPartValidLong(); - - IIdType setValue(String theString); - - IIdType toUnqualified(); - - IIdType toUnqualifiedVersionless(); - - IIdType toVersionless(); - - IIdType withResourceType(String theResName); - - IIdType withServerBase(String theServerBase, String theResourceName); - - IIdType withVersion(String theVersion); - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/INarrative.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/INarrative.java deleted file mode 100644 index 6b7907bba3f..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/INarrative.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.hl7.fhir.r4.model.api; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface INarrative extends ICompositeType { - - boolean isEmpty(); - - // TODO: use less broad exception type here - public void setDivAsString(String theString) throws Exception; - - // TODO: use less broad exception type here - public String getDivAsString() throws Exception; - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IPrimitiveType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IPrimitiveType.java deleted file mode 100644 index dd04383e108..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/api/IPrimitiveType.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.hl7.fhir.r4.model.api; - - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IPrimitiveType extends IBaseDatatype { - - void setValueAsString(String theValue) throws IllegalArgumentException; - - String getValueAsString(); - - T getValue(); - - IPrimitiveType setValue(T theValue) throws IllegalArgumentException; - -} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AbstractTypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AbstractTypes.java new file mode 100644 index 00000000000..7c046d628dd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AbstractTypes.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AbstractTypes { + + /** + * A place holder that means any kind of data type + */ + TYPE, + /** + * A place holder that means any kind of resource + */ + ANY, + /** + * added to help the parsers + */ + NULL; + public static AbstractTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Type".equals(codeString)) + return TYPE; + if ("Any".equals(codeString)) + return ANY; + throw new FHIRException("Unknown AbstractTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TYPE: return "Type"; + case ANY: return "Any"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/abstract-types"; + } + public String getDefinition() { + switch (this) { + case TYPE: return "A place holder that means any kind of data type"; + case ANY: return "A place holder that means any kind of resource"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TYPE: return "Type"; + case ANY: return "Any"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AbstractTypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AbstractTypesEnumFactory.java new file mode 100644 index 00000000000..f6e98898c6f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AbstractTypesEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AbstractTypesEnumFactory implements EnumFactory { + + public AbstractTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Type".equals(codeString)) + return AbstractTypes.TYPE; + if ("Any".equals(codeString)) + return AbstractTypes.ANY; + throw new IllegalArgumentException("Unknown AbstractTypes code '"+codeString+"'"); + } + + public String toCode(AbstractTypes code) { + if (code == AbstractTypes.TYPE) + return "Type"; + if (code == AbstractTypes.ANY) + return "Any"; + return "?"; + } + + public String toSystem(AbstractTypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AccountStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AccountStatus.java new file mode 100644 index 00000000000..09f76d0de27 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AccountStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AccountStatus { + + /** + * This account is active and may be used. + */ + ACTIVE, + /** + * This account is inactive and should not be used to track financial information. + */ + INACTIVE, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static AccountStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/account-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "This account is active and may be used."; + case INACTIVE: return "This account is inactive and should not be used to track financial information."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AccountStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AccountStatusEnumFactory.java new file mode 100644 index 00000000000..9f9231bfff6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AccountStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AccountStatusEnumFactory implements EnumFactory { + + public AccountStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return AccountStatus.ACTIVE; + if ("inactive".equals(codeString)) + return AccountStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return AccountStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'"); + } + + public String toCode(AccountStatus code) { + if (code == AccountStatus.ACTIVE) + return "active"; + if (code == AccountStatus.INACTIVE) + return "inactive"; + if (code == AccountStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(AccountStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionCardinalityBehavior.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionCardinalityBehavior.java new file mode 100644 index 00000000000..c1097e8a145 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionCardinalityBehavior.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionCardinalityBehavior { + + /** + * The action may only be selected one time + */ + SINGLE, + /** + * The action may be selected multiple times + */ + MULTIPLE, + /** + * added to help the parsers + */ + NULL; + public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("single".equals(codeString)) + return SINGLE; + if ("multiple".equals(codeString)) + return MULTIPLE; + throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SINGLE: return "single"; + case MULTIPLE: return "multiple"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-cardinality-behavior"; + } + public String getDefinition() { + switch (this) { + case SINGLE: return "The action may only be selected one time"; + case MULTIPLE: return "The action may be selected multiple times"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SINGLE: return "Single"; + case MULTIPLE: return "Multiple"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionCardinalityBehaviorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionCardinalityBehaviorEnumFactory.java new file mode 100644 index 00000000000..f6316a94dae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionCardinalityBehaviorEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionCardinalityBehaviorEnumFactory implements EnumFactory { + + public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("single".equals(codeString)) + return ActionCardinalityBehavior.SINGLE; + if ("multiple".equals(codeString)) + return ActionCardinalityBehavior.MULTIPLE; + throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); + } + + public String toCode(ActionCardinalityBehavior code) { + if (code == ActionCardinalityBehavior.SINGLE) + return "single"; + if (code == ActionCardinalityBehavior.MULTIPLE) + return "multiple"; + return "?"; + } + + public String toSystem(ActionCardinalityBehavior code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionConditionKind.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionConditionKind.java new file mode 100644 index 00000000000..8cc286f070d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionConditionKind.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionConditionKind { + + /** + * The condition describes whether or not a given action is applicable + */ + APPLICABILITY, + /** + * The condition is a starting condition for the action + */ + START, + /** + * The condition is a stop, or exit condition for the action + */ + STOP, + /** + * added to help the parsers + */ + NULL; + public static ActionConditionKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("applicability".equals(codeString)) + return APPLICABILITY; + if ("start".equals(codeString)) + return START; + if ("stop".equals(codeString)) + return STOP; + throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case APPLICABILITY: return "applicability"; + case START: return "start"; + case STOP: return "stop"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-condition-kind"; + } + public String getDefinition() { + switch (this) { + case APPLICABILITY: return "The condition describes whether or not a given action is applicable"; + case START: return "The condition is a starting condition for the action"; + case STOP: return "The condition is a stop, or exit condition for the action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case APPLICABILITY: return "Applicability"; + case START: return "Start"; + case STOP: return "Stop"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionConditionKindEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionConditionKindEnumFactory.java new file mode 100644 index 00000000000..2d2b1fad80f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionConditionKindEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionConditionKindEnumFactory implements EnumFactory { + + public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("applicability".equals(codeString)) + return ActionConditionKind.APPLICABILITY; + if ("start".equals(codeString)) + return ActionConditionKind.START; + if ("stop".equals(codeString)) + return ActionConditionKind.STOP; + throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'"); + } + + public String toCode(ActionConditionKind code) { + if (code == ActionConditionKind.APPLICABILITY) + return "applicability"; + if (code == ActionConditionKind.START) + return "start"; + if (code == ActionConditionKind.STOP) + return "stop"; + return "?"; + } + + public String toSystem(ActionConditionKind code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionGroupingBehavior.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionGroupingBehavior.java new file mode 100644 index 00000000000..4f3af625e07 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionGroupingBehavior.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionGroupingBehavior { + + /** + * Any group marked with this behavior should be displayed as a visual group to the end user + */ + VISUALGROUP, + /** + * A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so + */ + LOGICALGROUP, + /** + * A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required action, in which case, it would be "ExactlyOne" + */ + SENTENCEGROUP, + /** + * added to help the parsers + */ + NULL; + public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("visual-group".equals(codeString)) + return VISUALGROUP; + if ("logical-group".equals(codeString)) + return LOGICALGROUP; + if ("sentence-group".equals(codeString)) + return SENTENCEGROUP; + throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case VISUALGROUP: return "visual-group"; + case LOGICALGROUP: return "logical-group"; + case SENTENCEGROUP: return "sentence-group"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-grouping-behavior"; + } + public String getDefinition() { + switch (this) { + case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user"; + case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so"; + case SENTENCEGROUP: return "A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required action, in which case, it would be \"ExactlyOne\""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case VISUALGROUP: return "Visual Group"; + case LOGICALGROUP: return "Logical Group"; + case SENTENCEGROUP: return "Sentence Group"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionGroupingBehaviorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionGroupingBehaviorEnumFactory.java new file mode 100644 index 00000000000..3be68a7ff64 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionGroupingBehaviorEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionGroupingBehaviorEnumFactory implements EnumFactory { + + public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("visual-group".equals(codeString)) + return ActionGroupingBehavior.VISUALGROUP; + if ("logical-group".equals(codeString)) + return ActionGroupingBehavior.LOGICALGROUP; + if ("sentence-group".equals(codeString)) + return ActionGroupingBehavior.SENTENCEGROUP; + throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'"); + } + + public String toCode(ActionGroupingBehavior code) { + if (code == ActionGroupingBehavior.VISUALGROUP) + return "visual-group"; + if (code == ActionGroupingBehavior.LOGICALGROUP) + return "logical-group"; + if (code == ActionGroupingBehavior.SENTENCEGROUP) + return "sentence-group"; + return "?"; + } + + public String toSystem(ActionGroupingBehavior code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionParticipantType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionParticipantType.java new file mode 100644 index 00000000000..ed5cb394049 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionParticipantType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionParticipantType { + + /** + * The participant is the patient under evaluation + */ + PATIENT, + /** + * The participant is a practitioner involved in the patient's care + */ + PRACTITIONER, + /** + * The participant is a person related to the patient + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static ActionParticipantType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return PATIENT; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("related-person".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "patient"; + case PRACTITIONER: return "practitioner"; + case RELATEDPERSON: return "related-person"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-participant-type"; + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The participant is the patient under evaluation"; + case PRACTITIONER: return "The participant is a practitioner involved in the patient's care"; + case RELATEDPERSON: return "The participant is a person related to the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case PRACTITIONER: return "Practitioner"; + case RELATEDPERSON: return "Related Person"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionParticipantTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionParticipantTypeEnumFactory.java new file mode 100644 index 00000000000..9465b5543e0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionParticipantTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionParticipantTypeEnumFactory implements EnumFactory { + + public ActionParticipantType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return ActionParticipantType.PATIENT; + if ("practitioner".equals(codeString)) + return ActionParticipantType.PRACTITIONER; + if ("related-person".equals(codeString)) + return ActionParticipantType.RELATEDPERSON; + throw new IllegalArgumentException("Unknown ActionParticipantType code '"+codeString+"'"); + } + + public String toCode(ActionParticipantType code) { + if (code == ActionParticipantType.PATIENT) + return "patient"; + if (code == ActionParticipantType.PRACTITIONER) + return "practitioner"; + if (code == ActionParticipantType.RELATEDPERSON) + return "related-person"; + return "?"; + } + + public String toSystem(ActionParticipantType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionPrecheckBehavior.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionPrecheckBehavior.java new file mode 100644 index 00000000000..0ca6f6edf9d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionPrecheckBehavior.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionPrecheckBehavior { + + /** + * An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider "pre-checking" such an action as a convenience for the user + */ + YES, + /** + * An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not "pre-check" such an action + */ + NO, + /** + * added to help the parsers + */ + NULL; + public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("yes".equals(codeString)) + return YES; + if ("no".equals(codeString)) + return NO; + throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case YES: return "yes"; + case NO: return "no"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-precheck-behavior"; + } + public String getDefinition() { + switch (this) { + case YES: return "An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider \"pre-checking\" such an action as a convenience for the user"; + case NO: return "An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not \"pre-check\" such an action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case YES: return "Yes"; + case NO: return "No"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionPrecheckBehaviorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionPrecheckBehaviorEnumFactory.java new file mode 100644 index 00000000000..1a7961173d3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionPrecheckBehaviorEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionPrecheckBehaviorEnumFactory implements EnumFactory { + + public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("yes".equals(codeString)) + return ActionPrecheckBehavior.YES; + if ("no".equals(codeString)) + return ActionPrecheckBehavior.NO; + throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); + } + + public String toCode(ActionPrecheckBehavior code) { + if (code == ActionPrecheckBehavior.YES) + return "yes"; + if (code == ActionPrecheckBehavior.NO) + return "no"; + return "?"; + } + + public String toSystem(ActionPrecheckBehavior code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRelationshipType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRelationshipType.java new file mode 100644 index 00000000000..346f084ab4c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRelationshipType.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionRelationshipType { + + /** + * The action must be performed before the start of the related action + */ + BEFORESTART, + /** + * The action must be performed before the related action + */ + BEFORE, + /** + * The action must be performed before the end of the related action + */ + BEFOREEND, + /** + * The action must be performed concurrent with the start of the related action + */ + CONCURRENTWITHSTART, + /** + * The action must be performed concurrent with the related action + */ + CONCURRENT, + /** + * The action must be performed concurrent with the end of the related action + */ + CONCURRENTWITHEND, + /** + * The action must be performed after the start of the related action + */ + AFTERSTART, + /** + * The action must be performed after the related action + */ + AFTER, + /** + * The action must be performed after the end of the related action + */ + AFTEREND, + /** + * added to help the parsers + */ + NULL; + public static ActionRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("before-start".equals(codeString)) + return BEFORESTART; + if ("before".equals(codeString)) + return BEFORE; + if ("before-end".equals(codeString)) + return BEFOREEND; + if ("concurrent-with-start".equals(codeString)) + return CONCURRENTWITHSTART; + if ("concurrent".equals(codeString)) + return CONCURRENT; + if ("concurrent-with-end".equals(codeString)) + return CONCURRENTWITHEND; + if ("after-start".equals(codeString)) + return AFTERSTART; + if ("after".equals(codeString)) + return AFTER; + if ("after-end".equals(codeString)) + return AFTEREND; + throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BEFORESTART: return "before-start"; + case BEFORE: return "before"; + case BEFOREEND: return "before-end"; + case CONCURRENTWITHSTART: return "concurrent-with-start"; + case CONCURRENT: return "concurrent"; + case CONCURRENTWITHEND: return "concurrent-with-end"; + case AFTERSTART: return "after-start"; + case AFTER: return "after"; + case AFTEREND: return "after-end"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-relationship-type"; + } + public String getDefinition() { + switch (this) { + case BEFORESTART: return "The action must be performed before the start of the related action"; + case BEFORE: return "The action must be performed before the related action"; + case BEFOREEND: return "The action must be performed before the end of the related action"; + case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action"; + case CONCURRENT: return "The action must be performed concurrent with the related action"; + case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action"; + case AFTERSTART: return "The action must be performed after the start of the related action"; + case AFTER: return "The action must be performed after the related action"; + case AFTEREND: return "The action must be performed after the end of the related action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BEFORESTART: return "Before Start"; + case BEFORE: return "Before"; + case BEFOREEND: return "Before End"; + case CONCURRENTWITHSTART: return "Concurrent With Start"; + case CONCURRENT: return "Concurrent"; + case CONCURRENTWITHEND: return "Concurrent With End"; + case AFTERSTART: return "After Start"; + case AFTER: return "After"; + case AFTEREND: return "After End"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRelationshipTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..bcf4aacad63 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRelationshipTypeEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionRelationshipTypeEnumFactory implements EnumFactory { + + public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("before-start".equals(codeString)) + return ActionRelationshipType.BEFORESTART; + if ("before".equals(codeString)) + return ActionRelationshipType.BEFORE; + if ("before-end".equals(codeString)) + return ActionRelationshipType.BEFOREEND; + if ("concurrent-with-start".equals(codeString)) + return ActionRelationshipType.CONCURRENTWITHSTART; + if ("concurrent".equals(codeString)) + return ActionRelationshipType.CONCURRENT; + if ("concurrent-with-end".equals(codeString)) + return ActionRelationshipType.CONCURRENTWITHEND; + if ("after-start".equals(codeString)) + return ActionRelationshipType.AFTERSTART; + if ("after".equals(codeString)) + return ActionRelationshipType.AFTER; + if ("after-end".equals(codeString)) + return ActionRelationshipType.AFTEREND; + throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'"); + } + + public String toCode(ActionRelationshipType code) { + if (code == ActionRelationshipType.BEFORESTART) + return "before-start"; + if (code == ActionRelationshipType.BEFORE) + return "before"; + if (code == ActionRelationshipType.BEFOREEND) + return "before-end"; + if (code == ActionRelationshipType.CONCURRENTWITHSTART) + return "concurrent-with-start"; + if (code == ActionRelationshipType.CONCURRENT) + return "concurrent"; + if (code == ActionRelationshipType.CONCURRENTWITHEND) + return "concurrent-with-end"; + if (code == ActionRelationshipType.AFTERSTART) + return "after-start"; + if (code == ActionRelationshipType.AFTER) + return "after"; + if (code == ActionRelationshipType.AFTEREND) + return "after-end"; + return "?"; + } + + public String toSystem(ActionRelationshipType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRequiredBehavior.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRequiredBehavior.java new file mode 100644 index 00000000000..d77e664e66a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRequiredBehavior.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionRequiredBehavior { + + /** + * An action with this behavior must be included in the actions processed by the end user; the end user may not choose not to include this action + */ + MUST, + /** + * An action with this behavior may be included in the set of actions processed by the end user + */ + COULD, + /** + * An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included + */ + MUSTUNLESSDOCUMENTED, + /** + * added to help the parsers + */ + NULL; + public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("must".equals(codeString)) + return MUST; + if ("could".equals(codeString)) + return COULD; + if ("must-unless-documented".equals(codeString)) + return MUSTUNLESSDOCUMENTED; + throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MUST: return "must"; + case COULD: return "could"; + case MUSTUNLESSDOCUMENTED: return "must-unless-documented"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-required-behavior"; + } + public String getDefinition() { + switch (this) { + case MUST: return "An action with this behavior must be included in the actions processed by the end user; the end user may not choose not to include this action"; + case COULD: return "An action with this behavior may be included in the set of actions processed by the end user"; + case MUSTUNLESSDOCUMENTED: return "An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MUST: return "Must"; + case COULD: return "Could"; + case MUSTUNLESSDOCUMENTED: return "Must Unless Documented"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRequiredBehaviorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRequiredBehaviorEnumFactory.java new file mode 100644 index 00000000000..2b85c010b79 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionRequiredBehaviorEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionRequiredBehaviorEnumFactory implements EnumFactory { + + public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("must".equals(codeString)) + return ActionRequiredBehavior.MUST; + if ("could".equals(codeString)) + return ActionRequiredBehavior.COULD; + if ("must-unless-documented".equals(codeString)) + return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; + throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'"); + } + + public String toCode(ActionRequiredBehavior code) { + if (code == ActionRequiredBehavior.MUST) + return "must"; + if (code == ActionRequiredBehavior.COULD) + return "could"; + if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED) + return "must-unless-documented"; + return "?"; + } + + public String toSystem(ActionRequiredBehavior code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionSelectionBehavior.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionSelectionBehavior.java new file mode 100644 index 00000000000..4ee4b5f9f41 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionSelectionBehavior.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionSelectionBehavior { + + /** + * Any number of the actions in the group may be chosen, from zero to all + */ + ANY, + /** + * All the actions in the group must be selected as a single unit + */ + ALL, + /** + * All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected + */ + ALLORNONE, + /** + * The end user must choose one and only one of the selectable actions in the group. The user may not choose none of the actions in the group + */ + EXACTLYONE, + /** + * The end user may choose zero or at most one of the actions in the group + */ + ATMOSTONE, + /** + * The end user must choose a minimum of one, and as many additional as desired + */ + ONEORMORE, + /** + * added to help the parsers + */ + NULL; + public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return ANY; + if ("all".equals(codeString)) + return ALL; + if ("all-or-none".equals(codeString)) + return ALLORNONE; + if ("exactly-one".equals(codeString)) + return EXACTLYONE; + if ("at-most-one".equals(codeString)) + return ATMOSTONE; + if ("one-or-more".equals(codeString)) + return ONEORMORE; + throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ANY: return "any"; + case ALL: return "all"; + case ALLORNONE: return "all-or-none"; + case EXACTLYONE: return "exactly-one"; + case ATMOSTONE: return "at-most-one"; + case ONEORMORE: return "one-or-more"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-selection-behavior"; + } + public String getDefinition() { + switch (this) { + case ANY: return "Any number of the actions in the group may be chosen, from zero to all"; + case ALL: return "All the actions in the group must be selected as a single unit"; + case ALLORNONE: return "All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected"; + case EXACTLYONE: return "The end user must choose one and only one of the selectable actions in the group. The user may not choose none of the actions in the group"; + case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group"; + case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ANY: return "Any"; + case ALL: return "All"; + case ALLORNONE: return "All Or None"; + case EXACTLYONE: return "Exactly One"; + case ATMOSTONE: return "At Most One"; + case ONEORMORE: return "One Or More"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionSelectionBehaviorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionSelectionBehaviorEnumFactory.java new file mode 100644 index 00000000000..cfd903e5ca1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionSelectionBehaviorEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionSelectionBehaviorEnumFactory implements EnumFactory { + + public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return ActionSelectionBehavior.ANY; + if ("all".equals(codeString)) + return ActionSelectionBehavior.ALL; + if ("all-or-none".equals(codeString)) + return ActionSelectionBehavior.ALLORNONE; + if ("exactly-one".equals(codeString)) + return ActionSelectionBehavior.EXACTLYONE; + if ("at-most-one".equals(codeString)) + return ActionSelectionBehavior.ATMOSTONE; + if ("one-or-more".equals(codeString)) + return ActionSelectionBehavior.ONEORMORE; + throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'"); + } + + public String toCode(ActionSelectionBehavior code) { + if (code == ActionSelectionBehavior.ANY) + return "any"; + if (code == ActionSelectionBehavior.ALL) + return "all"; + if (code == ActionSelectionBehavior.ALLORNONE) + return "all-or-none"; + if (code == ActionSelectionBehavior.EXACTLYONE) + return "exactly-one"; + if (code == ActionSelectionBehavior.ATMOSTONE) + return "at-most-one"; + if (code == ActionSelectionBehavior.ONEORMORE) + return "one-or-more"; + return "?"; + } + + public String toSystem(ActionSelectionBehavior code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionType.java new file mode 100644 index 00000000000..1b72430b8ac --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActionType { + + /** + * The action is to create a new resource + */ + CREATE, + /** + * The action is to update an existing resource + */ + UPDATE, + /** + * The action is to remove an existing resource + */ + REMOVE, + /** + * The action is to fire a specific event + */ + FIREEVENT, + /** + * added to help the parsers + */ + NULL; + public static ActionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("remove".equals(codeString)) + return REMOVE; + if ("fire-event".equals(codeString)) + return FIREEVENT; + throw new FHIRException("Unknown ActionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case REMOVE: return "remove"; + case FIREEVENT: return "fire-event"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/action-type"; + } + public String getDefinition() { + switch (this) { + case CREATE: return "The action is to create a new resource"; + case UPDATE: return "The action is to update an existing resource"; + case REMOVE: return "The action is to remove an existing resource"; + case FIREEVENT: return "The action is to fire a specific event"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Create"; + case UPDATE: return "Update"; + case REMOVE: return "Remove"; + case FIREEVENT: return "Fire Event"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionTypeEnumFactory.java new file mode 100644 index 00000000000..e1f6055d67d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionTypeEnumFactory implements EnumFactory { + + public ActionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return ActionType.CREATE; + if ("update".equals(codeString)) + return ActionType.UPDATE; + if ("remove".equals(codeString)) + return ActionType.REMOVE; + if ("fire-event".equals(codeString)) + return ActionType.FIREEVENT; + throw new IllegalArgumentException("Unknown ActionType code '"+codeString+"'"); + } + + public String toCode(ActionType code) { + if (code == ActionType.CREATE) + return "create"; + if (code == ActionType.UPDATE) + return "update"; + if (code == ActionType.REMOVE) + return "remove"; + if (code == ActionType.FIREEVENT) + return "fire-event"; + return "?"; + } + + public String toSystem(ActionType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Actionlist.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Actionlist.java new file mode 100644 index 00000000000..2263b011d42 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Actionlist.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Actionlist { + + /** + * Cancel, reverse or nullify the target resource. + */ + CANCEL, + /** + * Check for previously un-read/ not-retrieved resources. + */ + POLL, + /** + * Re-process the target resource. + */ + REPROCESS, + /** + * Retrieve the processing status of the target resource. + */ + STATUS, + /** + * added to help the parsers + */ + NULL; + public static Actionlist fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return CANCEL; + if ("poll".equals(codeString)) + return POLL; + if ("reprocess".equals(codeString)) + return REPROCESS; + if ("status".equals(codeString)) + return STATUS; + throw new FHIRException("Unknown Actionlist code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CANCEL: return "cancel"; + case POLL: return "poll"; + case REPROCESS: return "reprocess"; + case STATUS: return "status"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/actionlist"; + } + public String getDefinition() { + switch (this) { + case CANCEL: return "Cancel, reverse or nullify the target resource."; + case POLL: return "Check for previously un-read/ not-retrieved resources."; + case REPROCESS: return "Re-process the target resource."; + case STATUS: return "Retrieve the processing status of the target resource."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CANCEL: return "Cancel, Reverse or Nullify"; + case POLL: return "Poll"; + case REPROCESS: return "Re-Process"; + case STATUS: return "Status Check"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionlistEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionlistEnumFactory.java new file mode 100644 index 00000000000..233a0bbe97c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActionlistEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActionlistEnumFactory implements EnumFactory { + + public Actionlist fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return Actionlist.CANCEL; + if ("poll".equals(codeString)) + return Actionlist.POLL; + if ("reprocess".equals(codeString)) + return Actionlist.REPROCESS; + if ("status".equals(codeString)) + return Actionlist.STATUS; + throw new IllegalArgumentException("Unknown Actionlist code '"+codeString+"'"); + } + + public String toCode(Actionlist code) { + if (code == Actionlist.CANCEL) + return "cancel"; + if (code == Actionlist.POLL) + return "poll"; + if (code == Actionlist.REPROCESS) + return "reprocess"; + if (code == Actionlist.STATUS) + return "status"; + return "?"; + } + + public String toSystem(Actionlist code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActivityDefinitionCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActivityDefinitionCategory.java new file mode 100644 index 00000000000..0435d90ccfa --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActivityDefinitionCategory.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ActivityDefinitionCategory { + + /** + * The activity is intended to provide or is related to treatment of the patient + */ + TREATMENT, + /** + * The activity is intended to provide or is related to education of the patient + */ + EDUCATION, + /** + * The activity is intended to perform or is related to assessment of the patient + */ + ASSESSMENT, + /** + * added to help the parsers + */ + NULL; + public static ActivityDefinitionCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("treatment".equals(codeString)) + return TREATMENT; + if ("education".equals(codeString)) + return EDUCATION; + if ("assessment".equals(codeString)) + return ASSESSMENT; + throw new FHIRException("Unknown ActivityDefinitionCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TREATMENT: return "treatment"; + case EDUCATION: return "education"; + case ASSESSMENT: return "assessment"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/activity-definition-category"; + } + public String getDefinition() { + switch (this) { + case TREATMENT: return "The activity is intended to provide or is related to treatment of the patient"; + case EDUCATION: return "The activity is intended to provide or is related to education of the patient"; + case ASSESSMENT: return "The activity is intended to perform or is related to assessment of the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TREATMENT: return "Treatment"; + case EDUCATION: return "Education"; + case ASSESSMENT: return "Assessment"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActivityDefinitionCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActivityDefinitionCategoryEnumFactory.java new file mode 100644 index 00000000000..d2904a63655 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ActivityDefinitionCategoryEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ActivityDefinitionCategoryEnumFactory implements EnumFactory { + + public ActivityDefinitionCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("treatment".equals(codeString)) + return ActivityDefinitionCategory.TREATMENT; + if ("education".equals(codeString)) + return ActivityDefinitionCategory.EDUCATION; + if ("assessment".equals(codeString)) + return ActivityDefinitionCategory.ASSESSMENT; + throw new IllegalArgumentException("Unknown ActivityDefinitionCategory code '"+codeString+"'"); + } + + public String toCode(ActivityDefinitionCategory code) { + if (code == ActivityDefinitionCategory.TREATMENT) + return "treatment"; + if (code == ActivityDefinitionCategory.EDUCATION) + return "education"; + if (code == ActivityDefinitionCategory.ASSESSMENT) + return "assessment"; + return "?"; + } + + public String toSystem(ActivityDefinitionCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Additionalmaterials.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Additionalmaterials.java new file mode 100644 index 00000000000..bf1d76310ab --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Additionalmaterials.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Additionalmaterials { + + /** + * XRay + */ + XRAY, + /** + * Image + */ + IMAGE, + /** + * Email + */ + EMAIL, + /** + * Model + */ + MODEL, + /** + * Document + */ + DOCUMENT, + /** + * Other + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Additionalmaterials fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xray".equals(codeString)) + return XRAY; + if ("image".equals(codeString)) + return IMAGE; + if ("email".equals(codeString)) + return EMAIL; + if ("model".equals(codeString)) + return MODEL; + if ("document".equals(codeString)) + return DOCUMENT; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Additionalmaterials code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case XRAY: return "xray"; + case IMAGE: return "image"; + case EMAIL: return "email"; + case MODEL: return "model"; + case DOCUMENT: return "document"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/additionalmaterials"; + } + public String getDefinition() { + switch (this) { + case XRAY: return "XRay"; + case IMAGE: return "Image"; + case EMAIL: return "Email"; + case MODEL: return "Model"; + case DOCUMENT: return "Document"; + case OTHER: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case XRAY: return "XRay"; + case IMAGE: return "Image"; + case EMAIL: return "Email"; + case MODEL: return "Model"; + case DOCUMENT: return "Document"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdditionalmaterialsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdditionalmaterialsEnumFactory.java new file mode 100644 index 00000000000..eb7a72114af --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdditionalmaterialsEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdditionalmaterialsEnumFactory implements EnumFactory { + + public Additionalmaterials fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xray".equals(codeString)) + return Additionalmaterials.XRAY; + if ("image".equals(codeString)) + return Additionalmaterials.IMAGE; + if ("email".equals(codeString)) + return Additionalmaterials.EMAIL; + if ("model".equals(codeString)) + return Additionalmaterials.MODEL; + if ("document".equals(codeString)) + return Additionalmaterials.DOCUMENT; + if ("other".equals(codeString)) + return Additionalmaterials.OTHER; + throw new IllegalArgumentException("Unknown Additionalmaterials code '"+codeString+"'"); + } + + public String toCode(Additionalmaterials code) { + if (code == Additionalmaterials.XRAY) + return "xray"; + if (code == Additionalmaterials.IMAGE) + return "image"; + if (code == Additionalmaterials.EMAIL) + return "email"; + if (code == Additionalmaterials.MODEL) + return "model"; + if (code == Additionalmaterials.DOCUMENT) + return "document"; + if (code == Additionalmaterials.OTHER) + return "other"; + return "?"; + } + + public String toSystem(Additionalmaterials code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressType.java new file mode 100644 index 00000000000..b7a872e5279 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AddressType { + + /** + * Mailing addresses - PO Boxes and care-of addresses. + */ + POSTAL, + /** + * A physical address that can be visited. + */ + PHYSICAL, + /** + * An address that is both physical and postal. + */ + BOTH, + /** + * added to help the parsers + */ + NULL; + public static AddressType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("postal".equals(codeString)) + return POSTAL; + if ("physical".equals(codeString)) + return PHYSICAL; + if ("both".equals(codeString)) + return BOTH; + throw new FHIRException("Unknown AddressType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case POSTAL: return "postal"; + case PHYSICAL: return "physical"; + case BOTH: return "both"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/address-type"; + } + public String getDefinition() { + switch (this) { + case POSTAL: return "Mailing addresses - PO Boxes and care-of addresses."; + case PHYSICAL: return "A physical address that can be visited."; + case BOTH: return "An address that is both physical and postal."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case POSTAL: return "Postal"; + case PHYSICAL: return "Physical"; + case BOTH: return "Postal & Physical"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressTypeEnumFactory.java new file mode 100644 index 00000000000..199163054e0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AddressTypeEnumFactory implements EnumFactory { + + public AddressType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("postal".equals(codeString)) + return AddressType.POSTAL; + if ("physical".equals(codeString)) + return AddressType.PHYSICAL; + if ("both".equals(codeString)) + return AddressType.BOTH; + throw new IllegalArgumentException("Unknown AddressType code '"+codeString+"'"); + } + + public String toCode(AddressType code) { + if (code == AddressType.POSTAL) + return "postal"; + if (code == AddressType.PHYSICAL) + return "physical"; + if (code == AddressType.BOTH) + return "both"; + return "?"; + } + + public String toSystem(AddressType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressUse.java new file mode 100644 index 00000000000..78cd3cfc65a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressUse.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AddressUse { + + /** + * A communication address at a home. + */ + HOME, + /** + * An office address. First choice for business related contacts during business hours. + */ + WORK, + /** + * A temporary address. The period can provide more detailed information. + */ + TEMP, + /** + * This address is no longer in use (or was never correct, but retained for records). + */ + OLD, + /** + * added to help the parsers + */ + NULL; + public static AddressUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return HOME; + if ("work".equals(codeString)) + return WORK; + if ("temp".equals(codeString)) + return TEMP; + if ("old".equals(codeString)) + return OLD; + throw new FHIRException("Unknown AddressUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOME: return "home"; + case WORK: return "work"; + case TEMP: return "temp"; + case OLD: return "old"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/address-use"; + } + public String getDefinition() { + switch (this) { + case HOME: return "A communication address at a home."; + case WORK: return "An office address. First choice for business related contacts during business hours."; + case TEMP: return "A temporary address. The period can provide more detailed information."; + case OLD: return "This address is no longer in use (or was never correct, but retained for records)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOME: return "Home"; + case WORK: return "Work"; + case TEMP: return "Temporary"; + case OLD: return "Old / Incorrect"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressUseEnumFactory.java new file mode 100644 index 00000000000..0baff2d3532 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AddressUseEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AddressUseEnumFactory implements EnumFactory { + + public AddressUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return AddressUse.HOME; + if ("work".equals(codeString)) + return AddressUse.WORK; + if ("temp".equals(codeString)) + return AddressUse.TEMP; + if ("old".equals(codeString)) + return AddressUse.OLD; + throw new IllegalArgumentException("Unknown AddressUse code '"+codeString+"'"); + } + + public String toCode(AddressUse code) { + if (code == AddressUse.HOME) + return "home"; + if (code == AddressUse.WORK) + return "work"; + if (code == AddressUse.TEMP) + return "temp"; + if (code == AddressUse.OLD) + return "old"; + return "?"; + } + + public String toSystem(AddressUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Adjudication.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Adjudication.java new file mode 100644 index 00000000000..2e2350519c0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Adjudication.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Adjudication { + + /** + * Total submitted + */ + TOTAL, + /** + * Patient Co-Payment + */ + COPAY, + /** + * Amount of the change which is considered for adjudication + */ + ELIGIBLE, + /** + * Amount deducted from the eligible amount prior to adjudication + */ + DEDUCTIBLE, + /** + * Eligible Percentage + */ + ELIGPERCENT, + /** + * Emergency Department + */ + TAX, + /** + * Amount payable under the coverage + */ + BENEFIT, + /** + * added to help the parsers + */ + NULL; + public static Adjudication fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("total".equals(codeString)) + return TOTAL; + if ("copay".equals(codeString)) + return COPAY; + if ("eligible".equals(codeString)) + return ELIGIBLE; + if ("deductible".equals(codeString)) + return DEDUCTIBLE; + if ("eligpercent".equals(codeString)) + return ELIGPERCENT; + if ("tax".equals(codeString)) + return TAX; + if ("benefit".equals(codeString)) + return BENEFIT; + throw new FHIRException("Unknown Adjudication code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TOTAL: return "total"; + case COPAY: return "copay"; + case ELIGIBLE: return "eligible"; + case DEDUCTIBLE: return "deductible"; + case ELIGPERCENT: return "eligpercent"; + case TAX: return "tax"; + case BENEFIT: return "benefit"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adjudication"; + } + public String getDefinition() { + switch (this) { + case TOTAL: return "Total submitted"; + case COPAY: return "Patient Co-Payment"; + case ELIGIBLE: return "Amount of the change which is considered for adjudication"; + case DEDUCTIBLE: return "Amount deducted from the eligible amount prior to adjudication"; + case ELIGPERCENT: return "Eligible Percentage"; + case TAX: return "Emergency Department"; + case BENEFIT: return "Amount payable under the coverage"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TOTAL: return "Total"; + case COPAY: return "CoPay"; + case ELIGIBLE: return "Eligible Amount"; + case DEDUCTIBLE: return "Deductable"; + case ELIGPERCENT: return "Eligible %"; + case TAX: return "Emergency Department"; + case BENEFIT: return "Benefit Amount"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationEnumFactory.java new file mode 100644 index 00000000000..7955728aaf3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdjudicationEnumFactory implements EnumFactory { + + public Adjudication fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("total".equals(codeString)) + return Adjudication.TOTAL; + if ("copay".equals(codeString)) + return Adjudication.COPAY; + if ("eligible".equals(codeString)) + return Adjudication.ELIGIBLE; + if ("deductible".equals(codeString)) + return Adjudication.DEDUCTIBLE; + if ("eligpercent".equals(codeString)) + return Adjudication.ELIGPERCENT; + if ("tax".equals(codeString)) + return Adjudication.TAX; + if ("benefit".equals(codeString)) + return Adjudication.BENEFIT; + throw new IllegalArgumentException("Unknown Adjudication code '"+codeString+"'"); + } + + public String toCode(Adjudication code) { + if (code == Adjudication.TOTAL) + return "total"; + if (code == Adjudication.COPAY) + return "copay"; + if (code == Adjudication.ELIGIBLE) + return "eligible"; + if (code == Adjudication.DEDUCTIBLE) + return "deductible"; + if (code == Adjudication.ELIGPERCENT) + return "eligpercent"; + if (code == Adjudication.TAX) + return "tax"; + if (code == Adjudication.BENEFIT) + return "benefit"; + return "?"; + } + + public String toSystem(Adjudication code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationError.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationError.java new file mode 100644 index 00000000000..f03257df7e4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationError.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdjudicationError { + + /** + * Missing Identifier + */ + A001, + /** + * Missing Creation Date + */ + A002, + /** + * added to help the parsers + */ + NULL; + public static AdjudicationError fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a001".equals(codeString)) + return A001; + if ("a002".equals(codeString)) + return A002; + throw new FHIRException("Unknown AdjudicationError code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A001: return "a001"; + case A002: return "a002"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adjudication-error"; + } + public String getDefinition() { + switch (this) { + case A001: return "Missing Identifier"; + case A002: return "Missing Creation Date"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A001: return "Missing Identifier"; + case A002: return "Missing Creation Date"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationErrorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationErrorEnumFactory.java new file mode 100644 index 00000000000..c2f6567d58f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationErrorEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdjudicationErrorEnumFactory implements EnumFactory { + + public AdjudicationError fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a001".equals(codeString)) + return AdjudicationError.A001; + if ("a002".equals(codeString)) + return AdjudicationError.A002; + throw new IllegalArgumentException("Unknown AdjudicationError code '"+codeString+"'"); + } + + public String toCode(AdjudicationError code) { + if (code == AdjudicationError.A001) + return "a001"; + if (code == AdjudicationError.A002) + return "a002"; + return "?"; + } + + public String toSystem(AdjudicationError code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationReason.java new file mode 100644 index 00000000000..37cce937cd0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationReason.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdjudicationReason { + + /** + * Not covered + */ + AR001, + /** + * Plan Limit Reached + */ + AR002, + /** + * added to help the parsers + */ + NULL; + public static AdjudicationReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ar001".equals(codeString)) + return AR001; + if ("ar002".equals(codeString)) + return AR002; + throw new FHIRException("Unknown AdjudicationReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AR001: return "ar001"; + case AR002: return "ar002"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adjudication-reason"; + } + public String getDefinition() { + switch (this) { + case AR001: return "Not covered"; + case AR002: return "Plan Limit Reached"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AR001: return "Not covered"; + case AR002: return "Plan Limit Reached"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationReasonEnumFactory.java new file mode 100644 index 00000000000..ea9b27134ef --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdjudicationReasonEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdjudicationReasonEnumFactory implements EnumFactory { + + public AdjudicationReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ar001".equals(codeString)) + return AdjudicationReason.AR001; + if ("ar002".equals(codeString)) + return AdjudicationReason.AR002; + throw new IllegalArgumentException("Unknown AdjudicationReason code '"+codeString+"'"); + } + + public String toCode(AdjudicationReason code) { + if (code == AdjudicationReason.AR001) + return "ar001"; + if (code == AdjudicationReason.AR002) + return "ar002"; + return "?"; + } + + public String toSystem(AdjudicationReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdministrativeGender.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdministrativeGender.java new file mode 100644 index 00000000000..ca325eecd27 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdministrativeGender.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdministrativeGender { + + /** + * Male + */ + MALE, + /** + * Female + */ + FEMALE, + /** + * Other + */ + OTHER, + /** + * Unknown + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static AdministrativeGender fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return MALE; + if ("female".equals(codeString)) + return FEMALE; + if ("other".equals(codeString)) + return OTHER; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MALE: return "male"; + case FEMALE: return "female"; + case OTHER: return "other"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/administrative-gender"; + } + public String getDefinition() { + switch (this) { + case MALE: return "Male"; + case FEMALE: return "Female"; + case OTHER: return "Other"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MALE: return "Male"; + case FEMALE: return "Female"; + case OTHER: return "Other"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdministrativeGenderEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdministrativeGenderEnumFactory.java new file mode 100644 index 00000000000..fb92e2498ad --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdministrativeGenderEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdministrativeGenderEnumFactory implements EnumFactory { + + public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return AdministrativeGender.MALE; + if ("female".equals(codeString)) + return AdministrativeGender.FEMALE; + if ("other".equals(codeString)) + return AdministrativeGender.OTHER; + if ("unknown".equals(codeString)) + return AdministrativeGender.UNKNOWN; + throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'"); + } + + public String toCode(AdministrativeGender code) { + if (code == AdministrativeGender.MALE) + return "male"; + if (code == AdministrativeGender.FEMALE) + return "female"; + if (code == AdministrativeGender.OTHER) + return "other"; + if (code == AdministrativeGender.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(AdministrativeGender code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventActuality.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventActuality.java new file mode 100644 index 00000000000..38085b03422 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventActuality.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventActuality { + + /** + * null + */ + ACTUAL, + /** + * null + */ + POTENTIAL, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventActuality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("actual".equals(codeString)) + return ACTUAL; + if ("potential".equals(codeString)) + return POTENTIAL; + throw new FHIRException("Unknown AdverseEventActuality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTUAL: return "actual"; + case POTENTIAL: return "potential"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-actuality"; + } + public String getDefinition() { + switch (this) { + case ACTUAL: return ""; + case POTENTIAL: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTUAL: return "Adverse Event"; + case POTENTIAL: return "Potential Adverse Event"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventActualityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventActualityEnumFactory.java new file mode 100644 index 00000000000..47d144cd27b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventActualityEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventActualityEnumFactory implements EnumFactory { + + public AdverseEventActuality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("actual".equals(codeString)) + return AdverseEventActuality.ACTUAL; + if ("potential".equals(codeString)) + return AdverseEventActuality.POTENTIAL; + throw new IllegalArgumentException("Unknown AdverseEventActuality code '"+codeString+"'"); + } + + public String toCode(AdverseEventActuality code) { + if (code == AdverseEventActuality.ACTUAL) + return "actual"; + if (code == AdverseEventActuality.POTENTIAL) + return "potential"; + return "?"; + } + + public String toSystem(AdverseEventActuality code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCategory.java new file mode 100644 index 00000000000..f15a66ffa9c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCategory.java @@ -0,0 +1,195 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventCategory { + + /** + * null + */ + PRODUCTPROBLEM, + /** + * null + */ + PRODUCTQUALITY, + /** + * null + */ + PRODUCTUSEERROR, + /** + * null + */ + WRONGDOSE, + /** + * null + */ + INCORRECTPRESCRIBINGINFORMATION, + /** + * null + */ + WRONGTECHNIQUE, + /** + * null + */ + WRONGROUTEOFADMINISTRATION, + /** + * null + */ + WRONGRATE, + /** + * null + */ + WRONGDURATION, + /** + * null + */ + WRONGTIME, + /** + * null + */ + EXPIREDDRUG, + /** + * null + */ + MEDICALDEVICEUSEERROR, + /** + * null + */ + PROBLEMDIFFERENTMANUFACTURER, + /** + * null + */ + UNSAFEPHYSICALENVIRONMENT, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ProductProblem".equals(codeString)) + return PRODUCTPROBLEM; + if ("ProductQuality".equals(codeString)) + return PRODUCTQUALITY; + if ("ProductUseError".equals(codeString)) + return PRODUCTUSEERROR; + if ("WrongDose".equals(codeString)) + return WRONGDOSE; + if ("IncorrectPrescribingInformation".equals(codeString)) + return INCORRECTPRESCRIBINGINFORMATION; + if ("WrongTechnique".equals(codeString)) + return WRONGTECHNIQUE; + if ("WrongRouteOfAdministration".equals(codeString)) + return WRONGROUTEOFADMINISTRATION; + if ("WrongRate".equals(codeString)) + return WRONGRATE; + if ("WrongDuration".equals(codeString)) + return WRONGDURATION; + if ("WrongTime".equals(codeString)) + return WRONGTIME; + if ("ExpiredDrug".equals(codeString)) + return EXPIREDDRUG; + if ("MedicalDeviceUseError".equals(codeString)) + return MEDICALDEVICEUSEERROR; + if ("ProblemDifferentManufacturer".equals(codeString)) + return PROBLEMDIFFERENTMANUFACTURER; + if ("UnsafePhysicalEnvironment".equals(codeString)) + return UNSAFEPHYSICALENVIRONMENT; + throw new FHIRException("Unknown AdverseEventCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRODUCTPROBLEM: return "ProductProblem"; + case PRODUCTQUALITY: return "ProductQuality"; + case PRODUCTUSEERROR: return "ProductUseError"; + case WRONGDOSE: return "WrongDose"; + case INCORRECTPRESCRIBINGINFORMATION: return "IncorrectPrescribingInformation"; + case WRONGTECHNIQUE: return "WrongTechnique"; + case WRONGROUTEOFADMINISTRATION: return "WrongRouteOfAdministration"; + case WRONGRATE: return "WrongRate"; + case WRONGDURATION: return "WrongDuration"; + case WRONGTIME: return "WrongTime"; + case EXPIREDDRUG: return "ExpiredDrug"; + case MEDICALDEVICEUSEERROR: return "MedicalDeviceUseError"; + case PROBLEMDIFFERENTMANUFACTURER: return "ProblemDifferentManufacturer"; + case UNSAFEPHYSICALENVIRONMENT: return "UnsafePhysicalEnvironment"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-category"; + } + public String getDefinition() { + switch (this) { + case PRODUCTPROBLEM: return ""; + case PRODUCTQUALITY: return ""; + case PRODUCTUSEERROR: return ""; + case WRONGDOSE: return ""; + case INCORRECTPRESCRIBINGINFORMATION: return ""; + case WRONGTECHNIQUE: return ""; + case WRONGROUTEOFADMINISTRATION: return ""; + case WRONGRATE: return ""; + case WRONGDURATION: return ""; + case WRONGTIME: return ""; + case EXPIREDDRUG: return ""; + case MEDICALDEVICEUSEERROR: return ""; + case PROBLEMDIFFERENTMANUFACTURER: return ""; + case UNSAFEPHYSICALENVIRONMENT: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRODUCTPROBLEM: return "Product Problem"; + case PRODUCTQUALITY: return "Product Quality"; + case PRODUCTUSEERROR: return "Product Use Error"; + case WRONGDOSE: return "Wrong Dose"; + case INCORRECTPRESCRIBINGINFORMATION: return "Incorrect Prescribing Information"; + case WRONGTECHNIQUE: return "Wrong Technique"; + case WRONGROUTEOFADMINISTRATION: return "Wrong Route of Administration"; + case WRONGRATE: return "Wrong Rate"; + case WRONGDURATION: return "Wrong Duration"; + case WRONGTIME: return "Wrong Time"; + case EXPIREDDRUG: return "Expired Drug"; + case MEDICALDEVICEUSEERROR: return "Medical Device Use Error"; + case PROBLEMDIFFERENTMANUFACTURER: return "Problem with Different Manufacturer of Same Medicine"; + case UNSAFEPHYSICALENVIRONMENT: return "Unsafe Physical Environment"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCategoryEnumFactory.java new file mode 100644 index 00000000000..e601baa6c64 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCategoryEnumFactory.java @@ -0,0 +1,110 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventCategoryEnumFactory implements EnumFactory { + + public AdverseEventCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ProductProblem".equals(codeString)) + return AdverseEventCategory.PRODUCTPROBLEM; + if ("ProductQuality".equals(codeString)) + return AdverseEventCategory.PRODUCTQUALITY; + if ("ProductUseError".equals(codeString)) + return AdverseEventCategory.PRODUCTUSEERROR; + if ("WrongDose".equals(codeString)) + return AdverseEventCategory.WRONGDOSE; + if ("IncorrectPrescribingInformation".equals(codeString)) + return AdverseEventCategory.INCORRECTPRESCRIBINGINFORMATION; + if ("WrongTechnique".equals(codeString)) + return AdverseEventCategory.WRONGTECHNIQUE; + if ("WrongRouteOfAdministration".equals(codeString)) + return AdverseEventCategory.WRONGROUTEOFADMINISTRATION; + if ("WrongRate".equals(codeString)) + return AdverseEventCategory.WRONGRATE; + if ("WrongDuration".equals(codeString)) + return AdverseEventCategory.WRONGDURATION; + if ("WrongTime".equals(codeString)) + return AdverseEventCategory.WRONGTIME; + if ("ExpiredDrug".equals(codeString)) + return AdverseEventCategory.EXPIREDDRUG; + if ("MedicalDeviceUseError".equals(codeString)) + return AdverseEventCategory.MEDICALDEVICEUSEERROR; + if ("ProblemDifferentManufacturer".equals(codeString)) + return AdverseEventCategory.PROBLEMDIFFERENTMANUFACTURER; + if ("UnsafePhysicalEnvironment".equals(codeString)) + return AdverseEventCategory.UNSAFEPHYSICALENVIRONMENT; + throw new IllegalArgumentException("Unknown AdverseEventCategory code '"+codeString+"'"); + } + + public String toCode(AdverseEventCategory code) { + if (code == AdverseEventCategory.PRODUCTPROBLEM) + return "ProductProblem"; + if (code == AdverseEventCategory.PRODUCTQUALITY) + return "ProductQuality"; + if (code == AdverseEventCategory.PRODUCTUSEERROR) + return "ProductUseError"; + if (code == AdverseEventCategory.WRONGDOSE) + return "WrongDose"; + if (code == AdverseEventCategory.INCORRECTPRESCRIBINGINFORMATION) + return "IncorrectPrescribingInformation"; + if (code == AdverseEventCategory.WRONGTECHNIQUE) + return "WrongTechnique"; + if (code == AdverseEventCategory.WRONGROUTEOFADMINISTRATION) + return "WrongRouteOfAdministration"; + if (code == AdverseEventCategory.WRONGRATE) + return "WrongRate"; + if (code == AdverseEventCategory.WRONGDURATION) + return "WrongDuration"; + if (code == AdverseEventCategory.WRONGTIME) + return "WrongTime"; + if (code == AdverseEventCategory.EXPIREDDRUG) + return "ExpiredDrug"; + if (code == AdverseEventCategory.MEDICALDEVICEUSEERROR) + return "MedicalDeviceUseError"; + if (code == AdverseEventCategory.PROBLEMDIFFERENTMANUFACTURER) + return "ProblemDifferentManufacturer"; + if (code == AdverseEventCategory.UNSAFEPHYSICALENVIRONMENT) + return "UnsafePhysicalEnvironment"; + return "?"; + } + + public String toSystem(AdverseEventCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityAssess.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityAssess.java new file mode 100644 index 00000000000..74a991ca04a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityAssess.java @@ -0,0 +1,137 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventCausalityAssess { + + /** + * i) Event or laboratory test abnormality, with plausible time relationship to drug intake +ii) Cannot be explained by disease or other drugs +iii) Response to withdrawal plausible (pharmacologically, pathologically) +iv) Event definitive pharmacologically or phenomenologically (i.e. an objective and specific medical disorder or a recognized pharmacological phenomenon) +v) Re-challenge satisfactory, if necessary + */ + CERTAIN, + /** + * i) Event or laboratory test abnormality, with reasonable time relationship to drug intake +ii) Unlikely to be attributed to disease or other drugs +iii) Response to withdrawal clinically reasonable +iv) Re-challenge not required + */ + PROBABLYLIKELY, + /** + * i) Event or laboratory test abnormality, with reasonable time relationship to drug intake +ii) Could also be explained by disease or other drugs +iii) Information on drug withdrawal may be lacking or unclear + */ + POSSIBLE, + /** + * i) Event or laboratory test abnormality, with a time to drug intake that makes a relationship improbable (but not impossible) +ii) Disease or other drugs provide plausible explanations + */ + UNLIKELY, + /** + * i) Event or laboratory test abnormality +ii) More data for proper assessment needed, or +iii) Additional data under examination + */ + CONDITIONALCLASSIFIED, + /** + * i) Report suggesting an adverse reaction +ii) Cannot be judged because information is insufficient or contradictory +iii) Data cannot be supplemented or verified + */ + UNASSESSABLEUNCLASSIFIABLE, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventCausalityAssess fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Certain".equals(codeString)) + return CERTAIN; + if ("Probably-Likely".equals(codeString)) + return PROBABLYLIKELY; + if ("Possible".equals(codeString)) + return POSSIBLE; + if ("Unlikely".equals(codeString)) + return UNLIKELY; + if ("Conditional-Classified".equals(codeString)) + return CONDITIONALCLASSIFIED; + if ("Unassessable-Unclassifiable".equals(codeString)) + return UNASSESSABLEUNCLASSIFIABLE; + throw new FHIRException("Unknown AdverseEventCausalityAssess code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CERTAIN: return "Certain"; + case PROBABLYLIKELY: return "Probably-Likely"; + case POSSIBLE: return "Possible"; + case UNLIKELY: return "Unlikely"; + case CONDITIONALCLASSIFIED: return "Conditional-Classified"; + case UNASSESSABLEUNCLASSIFIABLE: return "Unassessable-Unclassifiable"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-causality-assess"; + } + public String getDefinition() { + switch (this) { + case CERTAIN: return "i) Event or laboratory test abnormality, with plausible time relationship to drug intake\nii) Cannot be explained by disease or other drugs\niii) Response to withdrawal plausible (pharmacologically, pathologically)\niv) Event definitive pharmacologically or phenomenologically (i.e. an objective and specific medical disorder or a recognized pharmacological phenomenon)\nv) Re-challenge satisfactory, if necessary"; + case PROBABLYLIKELY: return "i) Event or laboratory test abnormality, with reasonable time relationship to drug intake\nii) Unlikely to be attributed to disease or other drugs\niii) Response to withdrawal clinically reasonable\niv) Re-challenge not required"; + case POSSIBLE: return "i) Event or laboratory test abnormality, with reasonable time relationship to drug intake\nii) Could also be explained by disease or other drugs\niii) Information on drug withdrawal may be lacking or unclear"; + case UNLIKELY: return "i) Event or laboratory test abnormality, with a time to drug intake that makes a relationship improbable (but not impossible)\nii) Disease or other drugs provide plausible explanations"; + case CONDITIONALCLASSIFIED: return "i) Event or laboratory test abnormality\nii) More data for proper assessment needed, or\niii) Additional data under examination"; + case UNASSESSABLEUNCLASSIFIABLE: return "i) Report suggesting an adverse reaction\nii) Cannot be judged because information is insufficient or contradictory\niii) Data cannot be supplemented or verified"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CERTAIN: return "Certain"; + case PROBABLYLIKELY: return "Probably/Likely"; + case POSSIBLE: return "Possible"; + case UNLIKELY: return "Unlikely"; + case CONDITIONALCLASSIFIED: return "Conditional/Classified"; + case UNASSESSABLEUNCLASSIFIABLE: return "Unassessable/Unclassifiable"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityAssessEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityAssessEnumFactory.java new file mode 100644 index 00000000000..6c50d1ba39a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityAssessEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventCausalityAssessEnumFactory implements EnumFactory { + + public AdverseEventCausalityAssess fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Certain".equals(codeString)) + return AdverseEventCausalityAssess.CERTAIN; + if ("Probably-Likely".equals(codeString)) + return AdverseEventCausalityAssess.PROBABLYLIKELY; + if ("Possible".equals(codeString)) + return AdverseEventCausalityAssess.POSSIBLE; + if ("Unlikely".equals(codeString)) + return AdverseEventCausalityAssess.UNLIKELY; + if ("Conditional-Classified".equals(codeString)) + return AdverseEventCausalityAssess.CONDITIONALCLASSIFIED; + if ("Unassessable-Unclassifiable".equals(codeString)) + return AdverseEventCausalityAssess.UNASSESSABLEUNCLASSIFIABLE; + throw new IllegalArgumentException("Unknown AdverseEventCausalityAssess code '"+codeString+"'"); + } + + public String toCode(AdverseEventCausalityAssess code) { + if (code == AdverseEventCausalityAssess.CERTAIN) + return "Certain"; + if (code == AdverseEventCausalityAssess.PROBABLYLIKELY) + return "Probably-Likely"; + if (code == AdverseEventCausalityAssess.POSSIBLE) + return "Possible"; + if (code == AdverseEventCausalityAssess.UNLIKELY) + return "Unlikely"; + if (code == AdverseEventCausalityAssess.CONDITIONALCLASSIFIED) + return "Conditional-Classified"; + if (code == AdverseEventCausalityAssess.UNASSESSABLEUNCLASSIFIABLE) + return "Unassessable-Unclassifiable"; + return "?"; + } + + public String toSystem(AdverseEventCausalityAssess code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityMethod.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityMethod.java new file mode 100644 index 00000000000..b9f535b456b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityMethod.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventCausalityMethod { + + /** + * null + */ + PROBABILITYSCALE, + /** + * null + */ + BAYESIAN, + /** + * null + */ + CHECKLIST, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventCausalityMethod fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ProbabilityScale".equals(codeString)) + return PROBABILITYSCALE; + if ("Bayesian".equals(codeString)) + return BAYESIAN; + if ("Checklist".equals(codeString)) + return CHECKLIST; + throw new FHIRException("Unknown AdverseEventCausalityMethod code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROBABILITYSCALE: return "ProbabilityScale"; + case BAYESIAN: return "Bayesian"; + case CHECKLIST: return "Checklist"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-causality-method"; + } + public String getDefinition() { + switch (this) { + case PROBABILITYSCALE: return ""; + case BAYESIAN: return ""; + case CHECKLIST: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROBABILITYSCALE: return "Probability Scale"; + case BAYESIAN: return "Bayesian"; + case CHECKLIST: return "Checklist"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityMethodEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityMethodEnumFactory.java new file mode 100644 index 00000000000..50f0ec87316 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventCausalityMethodEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventCausalityMethodEnumFactory implements EnumFactory { + + public AdverseEventCausalityMethod fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ProbabilityScale".equals(codeString)) + return AdverseEventCausalityMethod.PROBABILITYSCALE; + if ("Bayesian".equals(codeString)) + return AdverseEventCausalityMethod.BAYESIAN; + if ("Checklist".equals(codeString)) + return AdverseEventCausalityMethod.CHECKLIST; + throw new IllegalArgumentException("Unknown AdverseEventCausalityMethod code '"+codeString+"'"); + } + + public String toCode(AdverseEventCausalityMethod code) { + if (code == AdverseEventCausalityMethod.PROBABILITYSCALE) + return "ProbabilityScale"; + if (code == AdverseEventCausalityMethod.BAYESIAN) + return "Bayesian"; + if (code == AdverseEventCausalityMethod.CHECKLIST) + return "Checklist"; + return "?"; + } + + public String toSystem(AdverseEventCausalityMethod code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventOutcome.java new file mode 100644 index 00000000000..ae906fe49e7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventOutcome.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventOutcome { + + /** + * null + */ + RESOLVED, + /** + * null + */ + RECOVERING, + /** + * null + */ + ONGOING, + /** + * null + */ + RESOLVEDWITHSEQUELAE, + /** + * null + */ + FATAL, + /** + * null + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("resolved".equals(codeString)) + return RESOLVED; + if ("recovering".equals(codeString)) + return RECOVERING; + if ("ongoing".equals(codeString)) + return ONGOING; + if ("resolvedWithSequelae".equals(codeString)) + return RESOLVEDWITHSEQUELAE; + if ("fatal".equals(codeString)) + return FATAL; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown AdverseEventOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESOLVED: return "resolved"; + case RECOVERING: return "recovering"; + case ONGOING: return "ongoing"; + case RESOLVEDWITHSEQUELAE: return "resolvedWithSequelae"; + case FATAL: return "fatal"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-outcome"; + } + public String getDefinition() { + switch (this) { + case RESOLVED: return ""; + case RECOVERING: return ""; + case ONGOING: return ""; + case RESOLVEDWITHSEQUELAE: return ""; + case FATAL: return ""; + case UNKNOWN: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESOLVED: return "Resolved"; + case RECOVERING: return "Recovering"; + case ONGOING: return "Ongoing"; + case RESOLVEDWITHSEQUELAE: return "Resolved with Sequelae"; + case FATAL: return "Fatal"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventOutcomeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventOutcomeEnumFactory.java new file mode 100644 index 00000000000..958a3f37268 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventOutcomeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventOutcomeEnumFactory implements EnumFactory { + + public AdverseEventOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("resolved".equals(codeString)) + return AdverseEventOutcome.RESOLVED; + if ("recovering".equals(codeString)) + return AdverseEventOutcome.RECOVERING; + if ("ongoing".equals(codeString)) + return AdverseEventOutcome.ONGOING; + if ("resolvedWithSequelae".equals(codeString)) + return AdverseEventOutcome.RESOLVEDWITHSEQUELAE; + if ("fatal".equals(codeString)) + return AdverseEventOutcome.FATAL; + if ("unknown".equals(codeString)) + return AdverseEventOutcome.UNKNOWN; + throw new IllegalArgumentException("Unknown AdverseEventOutcome code '"+codeString+"'"); + } + + public String toCode(AdverseEventOutcome code) { + if (code == AdverseEventOutcome.RESOLVED) + return "resolved"; + if (code == AdverseEventOutcome.RECOVERING) + return "recovering"; + if (code == AdverseEventOutcome.ONGOING) + return "ongoing"; + if (code == AdverseEventOutcome.RESOLVEDWITHSEQUELAE) + return "resolvedWithSequelae"; + if (code == AdverseEventOutcome.FATAL) + return "fatal"; + if (code == AdverseEventOutcome.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(AdverseEventOutcome code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeriousness.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeriousness.java new file mode 100644 index 00000000000..9597cc4c51a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeriousness.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventSeriousness { + + /** + * Non-serious + */ + NONSERIOUS, + /** + * Serious + */ + SERIOUS, + /** + * Results in death + */ + SERIOUSRESULTSINDEATH, + /** + * Is Life-threatening + */ + SERIOUSISLIFETHREATENING, + /** + * Requires inpatient hospitalization or causes prolongation of existing hospitalization + */ + SERIOUSRESULTSINHOSPITALIZATION, + /** + * Results in persistent or significant disability/incapacity + */ + SERIOUSRESULTSINDISABILITY, + /** + * Is a congenital anomaly/birth defect + */ + SERIOUSISBIRTHDEFECT, + /** + * Requires intervention to prevent permanent impairment or damage (i.e., an important medical event that requires medical judgement) + */ + SERIOUSREQUIRESPREVENTIMPAIRMENT, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventSeriousness fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Non-serious".equals(codeString)) + return NONSERIOUS; + if ("Serious".equals(codeString)) + return SERIOUS; + if ("SeriousResultsInDeath".equals(codeString)) + return SERIOUSRESULTSINDEATH; + if ("SeriousIsLifeThreatening".equals(codeString)) + return SERIOUSISLIFETHREATENING; + if ("SeriousResultsInHospitalization".equals(codeString)) + return SERIOUSRESULTSINHOSPITALIZATION; + if ("SeriousResultsInDisability".equals(codeString)) + return SERIOUSRESULTSINDISABILITY; + if ("SeriousIsBirthDefect".equals(codeString)) + return SERIOUSISBIRTHDEFECT; + if ("SeriousRequiresPreventImpairment".equals(codeString)) + return SERIOUSREQUIRESPREVENTIMPAIRMENT; + throw new FHIRException("Unknown AdverseEventSeriousness code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NONSERIOUS: return "Non-serious"; + case SERIOUS: return "Serious"; + case SERIOUSRESULTSINDEATH: return "SeriousResultsInDeath"; + case SERIOUSISLIFETHREATENING: return "SeriousIsLifeThreatening"; + case SERIOUSRESULTSINHOSPITALIZATION: return "SeriousResultsInHospitalization"; + case SERIOUSRESULTSINDISABILITY: return "SeriousResultsInDisability"; + case SERIOUSISBIRTHDEFECT: return "SeriousIsBirthDefect"; + case SERIOUSREQUIRESPREVENTIMPAIRMENT: return "SeriousRequiresPreventImpairment"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-seriousness"; + } + public String getDefinition() { + switch (this) { + case NONSERIOUS: return "Non-serious"; + case SERIOUS: return "Serious"; + case SERIOUSRESULTSINDEATH: return "Results in death"; + case SERIOUSISLIFETHREATENING: return "Is Life-threatening"; + case SERIOUSRESULTSINHOSPITALIZATION: return "Requires inpatient hospitalization or causes prolongation of existing hospitalization"; + case SERIOUSRESULTSINDISABILITY: return "Results in persistent or significant disability/incapacity"; + case SERIOUSISBIRTHDEFECT: return "Is a congenital anomaly/birth defect"; + case SERIOUSREQUIRESPREVENTIMPAIRMENT: return "Requires intervention to prevent permanent impairment or damage (i.e., an important medical event that requires medical judgement)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NONSERIOUS: return "Non-serious"; + case SERIOUS: return "Serious"; + case SERIOUSRESULTSINDEATH: return "Results in death"; + case SERIOUSISLIFETHREATENING: return "Is Life-threatening"; + case SERIOUSRESULTSINHOSPITALIZATION: return "Requires or prolongs inpatient hospitalization"; + case SERIOUSRESULTSINDISABILITY: return "Results in persistent or significant disability/incapacity"; + case SERIOUSISBIRTHDEFECT: return "Is a congenital anomaly/birth defect"; + case SERIOUSREQUIRESPREVENTIMPAIRMENT: return "Requires intervention to prevent permanent impairment"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeriousnessEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeriousnessEnumFactory.java new file mode 100644 index 00000000000..6f17947a07f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeriousnessEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventSeriousnessEnumFactory implements EnumFactory { + + public AdverseEventSeriousness fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Non-serious".equals(codeString)) + return AdverseEventSeriousness.NONSERIOUS; + if ("Serious".equals(codeString)) + return AdverseEventSeriousness.SERIOUS; + if ("SeriousResultsInDeath".equals(codeString)) + return AdverseEventSeriousness.SERIOUSRESULTSINDEATH; + if ("SeriousIsLifeThreatening".equals(codeString)) + return AdverseEventSeriousness.SERIOUSISLIFETHREATENING; + if ("SeriousResultsInHospitalization".equals(codeString)) + return AdverseEventSeriousness.SERIOUSRESULTSINHOSPITALIZATION; + if ("SeriousResultsInDisability".equals(codeString)) + return AdverseEventSeriousness.SERIOUSRESULTSINDISABILITY; + if ("SeriousIsBirthDefect".equals(codeString)) + return AdverseEventSeriousness.SERIOUSISBIRTHDEFECT; + if ("SeriousRequiresPreventImpairment".equals(codeString)) + return AdverseEventSeriousness.SERIOUSREQUIRESPREVENTIMPAIRMENT; + throw new IllegalArgumentException("Unknown AdverseEventSeriousness code '"+codeString+"'"); + } + + public String toCode(AdverseEventSeriousness code) { + if (code == AdverseEventSeriousness.NONSERIOUS) + return "Non-serious"; + if (code == AdverseEventSeriousness.SERIOUS) + return "Serious"; + if (code == AdverseEventSeriousness.SERIOUSRESULTSINDEATH) + return "SeriousResultsInDeath"; + if (code == AdverseEventSeriousness.SERIOUSISLIFETHREATENING) + return "SeriousIsLifeThreatening"; + if (code == AdverseEventSeriousness.SERIOUSRESULTSINHOSPITALIZATION) + return "SeriousResultsInHospitalization"; + if (code == AdverseEventSeriousness.SERIOUSRESULTSINDISABILITY) + return "SeriousResultsInDisability"; + if (code == AdverseEventSeriousness.SERIOUSISBIRTHDEFECT) + return "SeriousIsBirthDefect"; + if (code == AdverseEventSeriousness.SERIOUSREQUIRESPREVENTIMPAIRMENT) + return "SeriousRequiresPreventImpairment"; + return "?"; + } + + public String toSystem(AdverseEventSeriousness code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeverity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeverity.java new file mode 100644 index 00000000000..d84f99f5b26 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeverity.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AdverseEventSeverity { + + /** + * null + */ + MILD, + /** + * null + */ + MODERATE, + /** + * null + */ + SEVERE, + /** + * added to help the parsers + */ + NULL; + public static AdverseEventSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Mild".equals(codeString)) + return MILD; + if ("Moderate".equals(codeString)) + return MODERATE; + if ("Severe".equals(codeString)) + return SEVERE; + throw new FHIRException("Unknown AdverseEventSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MILD: return "Mild"; + case MODERATE: return "Moderate"; + case SEVERE: return "Severe"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/adverse-event-severity"; + } + public String getDefinition() { + switch (this) { + case MILD: return ""; + case MODERATE: return ""; + case SEVERE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MILD: return "Mild"; + case MODERATE: return "Moderate"; + case SEVERE: return "Severe"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeverityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeverityEnumFactory.java new file mode 100644 index 00000000000..cea98c5f78d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AdverseEventSeverityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AdverseEventSeverityEnumFactory implements EnumFactory { + + public AdverseEventSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Mild".equals(codeString)) + return AdverseEventSeverity.MILD; + if ("Moderate".equals(codeString)) + return AdverseEventSeverity.MODERATE; + if ("Severe".equals(codeString)) + return AdverseEventSeverity.SEVERE; + throw new IllegalArgumentException("Unknown AdverseEventSeverity code '"+codeString+"'"); + } + + public String toCode(AdverseEventSeverity code) { + if (code == AdverseEventSeverity.MILD) + return "Mild"; + if (code == AdverseEventSeverity.MODERATE) + return "Moderate"; + if (code == AdverseEventSeverity.SEVERE) + return "Severe"; + return "?"; + } + + public String toSystem(AdverseEventSeverity code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergIntolSubstanceExpRisk.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergIntolSubstanceExpRisk.java new file mode 100644 index 00000000000..9871391fc06 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergIntolSubstanceExpRisk.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AllergIntolSubstanceExpRisk { + + /** + * Known risk of allergy or intolerance reaction upon exposure to the specified substance. + */ + KNOWNREACTIONRISK, + /** + * No known risk of allergy or intolerance reaction upon exposure to the specified substance. + */ + NOKNOWNREACTIONRISK, + /** + * added to help the parsers + */ + NULL; + public static AllergIntolSubstanceExpRisk fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("known-reaction-risk".equals(codeString)) + return KNOWNREACTIONRISK; + if ("no-known-reaction-risk".equals(codeString)) + return NOKNOWNREACTIONRISK; + throw new FHIRException("Unknown AllergIntolSubstanceExpRisk code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case KNOWNREACTIONRISK: return "known-reaction-risk"; + case NOKNOWNREACTIONRISK: return "no-known-reaction-risk"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/allerg-intol-substance-exp-risk"; + } + public String getDefinition() { + switch (this) { + case KNOWNREACTIONRISK: return "Known risk of allergy or intolerance reaction upon exposure to the specified substance."; + case NOKNOWNREACTIONRISK: return "No known risk of allergy or intolerance reaction upon exposure to the specified substance."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case KNOWNREACTIONRISK: return "Known Reaction Risk"; + case NOKNOWNREACTIONRISK: return "No Known Reaction Risk"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergIntolSubstanceExpRiskEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergIntolSubstanceExpRiskEnumFactory.java new file mode 100644 index 00000000000..51c8b11e693 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergIntolSubstanceExpRiskEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AllergIntolSubstanceExpRiskEnumFactory implements EnumFactory { + + public AllergIntolSubstanceExpRisk fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("known-reaction-risk".equals(codeString)) + return AllergIntolSubstanceExpRisk.KNOWNREACTIONRISK; + if ("no-known-reaction-risk".equals(codeString)) + return AllergIntolSubstanceExpRisk.NOKNOWNREACTIONRISK; + throw new IllegalArgumentException("Unknown AllergIntolSubstanceExpRisk code '"+codeString+"'"); + } + + public String toCode(AllergIntolSubstanceExpRisk code) { + if (code == AllergIntolSubstanceExpRisk.KNOWNREACTIONRISK) + return "known-reaction-risk"; + if (code == AllergIntolSubstanceExpRisk.NOKNOWNREACTIONRISK) + return "no-known-reaction-risk"; + return "?"; + } + + public String toSystem(AllergIntolSubstanceExpRisk code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyClinicalStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyClinicalStatus.java new file mode 100644 index 00000000000..6cd81459d4a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyClinicalStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AllergyClinicalStatus { + + /** + * An active record of a risk of a reaction to the identified substance. + */ + ACTIVE, + /** + * An inactivated record of a risk of a reaction to the identified substance. + */ + INACTIVE, + /** + * A reaction to the identified substance has been clinically reassessed by testing or re-exposure and considered to be resolved. + */ + RESOLVED, + /** + * added to help the parsers + */ + NULL; + public static AllergyClinicalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("resolved".equals(codeString)) + return RESOLVED; + throw new FHIRException("Unknown AllergyClinicalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case RESOLVED: return "resolved"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/allergy-clinical-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "An active record of a risk of a reaction to the identified substance."; + case INACTIVE: return "An inactivated record of a risk of a reaction to the identified substance."; + case RESOLVED: return "A reaction to the identified substance has been clinically reassessed by testing or re-exposure and considered to be resolved."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case RESOLVED: return "Resolved"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyClinicalStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyClinicalStatusEnumFactory.java new file mode 100644 index 00000000000..52a262dc051 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyClinicalStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AllergyClinicalStatusEnumFactory implements EnumFactory { + + public AllergyClinicalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return AllergyClinicalStatus.ACTIVE; + if ("inactive".equals(codeString)) + return AllergyClinicalStatus.INACTIVE; + if ("resolved".equals(codeString)) + return AllergyClinicalStatus.RESOLVED; + throw new IllegalArgumentException("Unknown AllergyClinicalStatus code '"+codeString+"'"); + } + + public String toCode(AllergyClinicalStatus code) { + if (code == AllergyClinicalStatus.ACTIVE) + return "active"; + if (code == AllergyClinicalStatus.INACTIVE) + return "inactive"; + if (code == AllergyClinicalStatus.RESOLVED) + return "resolved"; + return "?"; + } + + public String toSystem(AllergyClinicalStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCategory.java new file mode 100644 index 00000000000..f5393d804db --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCategory.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AllergyIntoleranceCategory { + + /** + * Any substance consumed to provide nutritional support for the body. + */ + FOOD, + /** + * Substances administered to achieve a physiological effect. + */ + MEDICATION, + /** + * Any substances that are encountered in the environment, including any substance not already classified as food, medication, or biologic. + */ + ENVIRONMENT, + /** + * A preparation that is synthesized from living organisms or their products, especially a human or animal protein, such as a hormone or antitoxin, that is used as a diagnostic, preventive, or therapeutic agent. Examples of biologic medications include: vaccines; allergenic extracts, which are used for both diagnosis and treatment (for example, allergy shots); gene therapies; cellular therapies. There are other biologic products, such as tissues, that are not typically associated with allergies. + */ + BIOLOGIC, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("food".equals(codeString)) + return FOOD; + if ("medication".equals(codeString)) + return MEDICATION; + if ("environment".equals(codeString)) + return ENVIRONMENT; + if ("biologic".equals(codeString)) + return BIOLOGIC; + throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FOOD: return "food"; + case MEDICATION: return "medication"; + case ENVIRONMENT: return "environment"; + case BIOLOGIC: return "biologic"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/allergy-intolerance-category"; + } + public String getDefinition() { + switch (this) { + case FOOD: return "Any substance consumed to provide nutritional support for the body."; + case MEDICATION: return "Substances administered to achieve a physiological effect."; + case ENVIRONMENT: return "Any substances that are encountered in the environment, including any substance not already classified as food, medication, or biologic."; + case BIOLOGIC: return "A preparation that is synthesized from living organisms or their products, especially a human or animal protein, such as a hormone or antitoxin, that is used as a diagnostic, preventive, or therapeutic agent. Examples of biologic medications include: vaccines; allergenic extracts, which are used for both diagnosis and treatment (for example, allergy shots); gene therapies; cellular therapies. There are other biologic products, such as tissues, that are not typically associated with allergies."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FOOD: return "Food"; + case MEDICATION: return "Medication"; + case ENVIRONMENT: return "Environment"; + case BIOLOGIC: return "Biologic"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCategoryEnumFactory.java new file mode 100644 index 00000000000..12eb4b4bcae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCategoryEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AllergyIntoleranceCategoryEnumFactory implements EnumFactory { + + public AllergyIntoleranceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("food".equals(codeString)) + return AllergyIntoleranceCategory.FOOD; + if ("medication".equals(codeString)) + return AllergyIntoleranceCategory.MEDICATION; + if ("environment".equals(codeString)) + return AllergyIntoleranceCategory.ENVIRONMENT; + if ("biologic".equals(codeString)) + return AllergyIntoleranceCategory.BIOLOGIC; + throw new IllegalArgumentException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); + } + + public String toCode(AllergyIntoleranceCategory code) { + if (code == AllergyIntoleranceCategory.FOOD) + return "food"; + if (code == AllergyIntoleranceCategory.MEDICATION) + return "medication"; + if (code == AllergyIntoleranceCategory.ENVIRONMENT) + return "environment"; + if (code == AllergyIntoleranceCategory.BIOLOGIC) + return "biologic"; + return "?"; + } + + public String toSystem(AllergyIntoleranceCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCriticality.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCriticality.java new file mode 100644 index 00000000000..aec81a1ba2d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCriticality.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AllergyIntoleranceCriticality { + + /** + * Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure. + */ + LOW, + /** + * Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure. + */ + HIGH, + /** + * Unable to assess the worst case result of a future exposure. + */ + UNABLETOASSESS, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceCriticality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return LOW; + if ("high".equals(codeString)) + return HIGH; + if ("unable-to-assess".equals(codeString)) + return UNABLETOASSESS; + throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LOW: return "low"; + case HIGH: return "high"; + case UNABLETOASSESS: return "unable-to-assess"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/allergy-intolerance-criticality"; + } + public String getDefinition() { + switch (this) { + case LOW: return "Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure."; + case HIGH: return "Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure."; + case UNABLETOASSESS: return "Unable to assess the worst case result of a future exposure."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LOW: return "Low Risk"; + case HIGH: return "High Risk"; + case UNABLETOASSESS: return "Unable to Assess Risk"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCriticalityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCriticalityEnumFactory.java new file mode 100644 index 00000000000..381d94637ef --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceCriticalityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AllergyIntoleranceCriticalityEnumFactory implements EnumFactory { + + public AllergyIntoleranceCriticality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return AllergyIntoleranceCriticality.LOW; + if ("high".equals(codeString)) + return AllergyIntoleranceCriticality.HIGH; + if ("unable-to-assess".equals(codeString)) + return AllergyIntoleranceCriticality.UNABLETOASSESS; + throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + + public String toCode(AllergyIntoleranceCriticality code) { + if (code == AllergyIntoleranceCriticality.LOW) + return "low"; + if (code == AllergyIntoleranceCriticality.HIGH) + return "high"; + if (code == AllergyIntoleranceCriticality.UNABLETOASSESS) + return "unable-to-assess"; + return "?"; + } + + public String toSystem(AllergyIntoleranceCriticality code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceType.java new file mode 100644 index 00000000000..341832c2e0b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AllergyIntoleranceType { + + /** + * A propensity for hypersensitivity reaction(s) to a substance. These reactions are most typically type I hypersensitivity, plus other "allergy-like" reactions, including pseudoallergy. + */ + ALLERGY, + /** + * A propensity for adverse reactions to a substance that is not judged to be allergic or "allergy-like". These reactions are typically (but not necessarily) non-immune. They are to some degree idiosyncratic and/or individually specific (i.e. are not a reaction that is expected to occur with most or all patients given similar circumstances). + */ + INTOLERANCE, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergy".equals(codeString)) + return ALLERGY; + if ("intolerance".equals(codeString)) + return INTOLERANCE; + throw new FHIRException("Unknown AllergyIntoleranceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALLERGY: return "allergy"; + case INTOLERANCE: return "intolerance"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/allergy-intolerance-type"; + } + public String getDefinition() { + switch (this) { + case ALLERGY: return "A propensity for hypersensitivity reaction(s) to a substance. These reactions are most typically type I hypersensitivity, plus other \"allergy-like\" reactions, including pseudoallergy."; + case INTOLERANCE: return "A propensity for adverse reactions to a substance that is not judged to be allergic or \"allergy-like\". These reactions are typically (but not necessarily) non-immune. They are to some degree idiosyncratic and/or individually specific (i.e. are not a reaction that is expected to occur with most or all patients given similar circumstances)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALLERGY: return "Allergy"; + case INTOLERANCE: return "Intolerance"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceTypeEnumFactory.java new file mode 100644 index 00000000000..2c07dea2a6d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyIntoleranceTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AllergyIntoleranceTypeEnumFactory implements EnumFactory { + + public AllergyIntoleranceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergy".equals(codeString)) + return AllergyIntoleranceType.ALLERGY; + if ("intolerance".equals(codeString)) + return AllergyIntoleranceType.INTOLERANCE; + throw new IllegalArgumentException("Unknown AllergyIntoleranceType code '"+codeString+"'"); + } + + public String toCode(AllergyIntoleranceType code) { + if (code == AllergyIntoleranceType.ALLERGY) + return "allergy"; + if (code == AllergyIntoleranceType.INTOLERANCE) + return "intolerance"; + return "?"; + } + + public String toSystem(AllergyIntoleranceType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyVerificationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyVerificationStatus.java new file mode 100644 index 00000000000..3f0abf5c3d3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyVerificationStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AllergyVerificationStatus { + + /** + * A low level of certainty about the propensity for a reaction to the identified substance. + */ + UNCONFIRMED, + /** + * A high level of certainty about the propensity for a reaction to the identified substance, which may include clinical evidence by testing or rechallenge. + */ + CONFIRMED, + /** + * A propensity for a reaction to the identified substance has been disproven with a high level of clinical certainty, which may include testing or rechallenge, and is refuted. + */ + REFUTED, + /** + * The statement was entered in error and is not valid. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static AllergyVerificationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unconfirmed".equals(codeString)) + return UNCONFIRMED; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("refuted".equals(codeString)) + return REFUTED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown AllergyVerificationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNCONFIRMED: return "unconfirmed"; + case CONFIRMED: return "confirmed"; + case REFUTED: return "refuted"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/allergy-verification-status"; + } + public String getDefinition() { + switch (this) { + case UNCONFIRMED: return "A low level of certainty about the propensity for a reaction to the identified substance."; + case CONFIRMED: return "A high level of certainty about the propensity for a reaction to the identified substance, which may include clinical evidence by testing or rechallenge."; + case REFUTED: return "A propensity for a reaction to the identified substance has been disproven with a high level of clinical certainty, which may include testing or rechallenge, and is refuted."; + case ENTEREDINERROR: return "The statement was entered in error and is not valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNCONFIRMED: return "Unconfirmed"; + case CONFIRMED: return "Confirmed"; + case REFUTED: return "Refuted"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyVerificationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyVerificationStatusEnumFactory.java new file mode 100644 index 00000000000..4e644a9769f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AllergyVerificationStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AllergyVerificationStatusEnumFactory implements EnumFactory { + + public AllergyVerificationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unconfirmed".equals(codeString)) + return AllergyVerificationStatus.UNCONFIRMED; + if ("confirmed".equals(codeString)) + return AllergyVerificationStatus.CONFIRMED; + if ("refuted".equals(codeString)) + return AllergyVerificationStatus.REFUTED; + if ("entered-in-error".equals(codeString)) + return AllergyVerificationStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown AllergyVerificationStatus code '"+codeString+"'"); + } + + public String toCode(AllergyVerificationStatus code) { + if (code == AllergyVerificationStatus.UNCONFIRMED) + return "unconfirmed"; + if (code == AllergyVerificationStatus.CONFIRMED) + return "confirmed"; + if (code == AllergyVerificationStatus.REFUTED) + return "refuted"; + if (code == AllergyVerificationStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(AllergyVerificationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalGenderstatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalGenderstatus.java new file mode 100644 index 00000000000..ca11169131d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalGenderstatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AnimalGenderstatus { + + /** + * The animal has been sterilized, castrated or otherwise made infertile. + */ + NEUTERED, + /** + * The animal's reproductive organs are intact. + */ + INTACT, + /** + * Unable to determine whether the animal has been neutered. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static AnimalGenderstatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("neutered".equals(codeString)) + return NEUTERED; + if ("intact".equals(codeString)) + return INTACT; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown AnimalGenderstatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NEUTERED: return "neutered"; + case INTACT: return "intact"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/animal-genderstatus"; + } + public String getDefinition() { + switch (this) { + case NEUTERED: return "The animal has been sterilized, castrated or otherwise made infertile."; + case INTACT: return "The animal's reproductive organs are intact."; + case UNKNOWN: return "Unable to determine whether the animal has been neutered."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NEUTERED: return "Neutered"; + case INTACT: return "Intact"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalGenderstatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalGenderstatusEnumFactory.java new file mode 100644 index 00000000000..03fe224a2f0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalGenderstatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AnimalGenderstatusEnumFactory implements EnumFactory { + + public AnimalGenderstatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("neutered".equals(codeString)) + return AnimalGenderstatus.NEUTERED; + if ("intact".equals(codeString)) + return AnimalGenderstatus.INTACT; + if ("unknown".equals(codeString)) + return AnimalGenderstatus.UNKNOWN; + throw new IllegalArgumentException("Unknown AnimalGenderstatus code '"+codeString+"'"); + } + + public String toCode(AnimalGenderstatus code) { + if (code == AnimalGenderstatus.NEUTERED) + return "neutered"; + if (code == AnimalGenderstatus.INTACT) + return "intact"; + if (code == AnimalGenderstatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(AnimalGenderstatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalSpecies.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalSpecies.java new file mode 100644 index 00000000000..65ed7542356 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalSpecies.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AnimalSpecies { + + /** + * Canis lupus familiaris + */ + CANISLF, + /** + * Ovis aries + */ + OVISA, + /** + * Serinus canaria domestica + */ + SERINUSCD, + /** + * added to help the parsers + */ + NULL; + public static AnimalSpecies fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("canislf".equals(codeString)) + return CANISLF; + if ("ovisa".equals(codeString)) + return OVISA; + if ("serinuscd".equals(codeString)) + return SERINUSCD; + throw new FHIRException("Unknown AnimalSpecies code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CANISLF: return "canislf"; + case OVISA: return "ovisa"; + case SERINUSCD: return "serinuscd"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/animal-species"; + } + public String getDefinition() { + switch (this) { + case CANISLF: return "Canis lupus familiaris"; + case OVISA: return "Ovis aries"; + case SERINUSCD: return "Serinus canaria domestica"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CANISLF: return "Dog"; + case OVISA: return "Sheep"; + case SERINUSCD: return "Domestic Canary"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalSpeciesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalSpeciesEnumFactory.java new file mode 100644 index 00000000000..56a285115ce --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AnimalSpeciesEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AnimalSpeciesEnumFactory implements EnumFactory { + + public AnimalSpecies fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("canislf".equals(codeString)) + return AnimalSpecies.CANISLF; + if ("ovisa".equals(codeString)) + return AnimalSpecies.OVISA; + if ("serinuscd".equals(codeString)) + return AnimalSpecies.SERINUSCD; + throw new IllegalArgumentException("Unknown AnimalSpecies code '"+codeString+"'"); + } + + public String toCode(AnimalSpecies code) { + if (code == AnimalSpecies.CANISLF) + return "canislf"; + if (code == AnimalSpecies.OVISA) + return "ovisa"; + if (code == AnimalSpecies.SERINUSCD) + return "serinuscd"; + return "?"; + } + + public String toSystem(AnimalSpecies code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Appointmentstatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Appointmentstatus.java new file mode 100644 index 00000000000..6c645080959 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Appointmentstatus.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Appointmentstatus { + + /** + * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time may not be set yet. + */ + PROPOSED, + /** + * Some or all of the participant(s) have not finalized their acceptance of the appointment request. + */ + PENDING, + /** + * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. + */ + BOOKED, + /** + * Some of the patients have arrived. + */ + ARRIVED, + /** + * This appointment has completed and may have resulted in an encounter. + */ + FULFILLED, + /** + * The appointment has been cancelled. + */ + CANCELLED, + /** + * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). + */ + NOSHOW, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static Appointmentstatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("pending".equals(codeString)) + return PENDING; + if ("booked".equals(codeString)) + return BOOKED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("fulfilled".equals(codeString)) + return FULFILLED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("noshow".equals(codeString)) + return NOSHOW; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown Appointmentstatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case PENDING: return "pending"; + case BOOKED: return "booked"; + case ARRIVED: return "arrived"; + case FULFILLED: return "fulfilled"; + case CANCELLED: return "cancelled"; + case NOSHOW: return "noshow"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/appointmentstatus"; + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time may not be set yet."; + case PENDING: return "Some or all of the participant(s) have not finalized their acceptance of the appointment request."; + case BOOKED: return "All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified."; + case ARRIVED: return "Some of the patients have arrived."; + case FULFILLED: return "This appointment has completed and may have resulted in an encounter."; + case CANCELLED: return "The appointment has been cancelled."; + case NOSHOW: return "Some or all of the participant(s) have not/did not appear for the appointment (usually the patient)."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case PENDING: return "Pending"; + case BOOKED: return "Booked"; + case ARRIVED: return "Arrived"; + case FULFILLED: return "Fulfilled"; + case CANCELLED: return "Cancelled"; + case NOSHOW: return "No Show"; + case ENTEREDINERROR: return "Entered in error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AppointmentstatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AppointmentstatusEnumFactory.java new file mode 100644 index 00000000000..523282989e2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AppointmentstatusEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AppointmentstatusEnumFactory implements EnumFactory { + + public Appointmentstatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return Appointmentstatus.PROPOSED; + if ("pending".equals(codeString)) + return Appointmentstatus.PENDING; + if ("booked".equals(codeString)) + return Appointmentstatus.BOOKED; + if ("arrived".equals(codeString)) + return Appointmentstatus.ARRIVED; + if ("fulfilled".equals(codeString)) + return Appointmentstatus.FULFILLED; + if ("cancelled".equals(codeString)) + return Appointmentstatus.CANCELLED; + if ("noshow".equals(codeString)) + return Appointmentstatus.NOSHOW; + if ("entered-in-error".equals(codeString)) + return Appointmentstatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown Appointmentstatus code '"+codeString+"'"); + } + + public String toCode(Appointmentstatus code) { + if (code == Appointmentstatus.PROPOSED) + return "proposed"; + if (code == Appointmentstatus.PENDING) + return "pending"; + if (code == Appointmentstatus.BOOKED) + return "booked"; + if (code == Appointmentstatus.ARRIVED) + return "arrived"; + if (code == Appointmentstatus.FULFILLED) + return "fulfilled"; + if (code == Appointmentstatus.CANCELLED) + return "cancelled"; + if (code == Appointmentstatus.NOSHOW) + return "noshow"; + if (code == Appointmentstatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(Appointmentstatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertDirectionCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertDirectionCodes.java new file mode 100644 index 00000000000..26ebd8f91ec --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertDirectionCodes.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AssertDirectionCodes { + + /** + * The assertion is evaluated on the response. This is the default value. + */ + RESPONSE, + /** + * The assertion is evaluated on the request. + */ + REQUEST, + /** + * added to help the parsers + */ + NULL; + public static AssertDirectionCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("response".equals(codeString)) + return RESPONSE; + if ("request".equals(codeString)) + return REQUEST; + throw new FHIRException("Unknown AssertDirectionCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESPONSE: return "response"; + case REQUEST: return "request"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/assert-direction-codes"; + } + public String getDefinition() { + switch (this) { + case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; + case REQUEST: return "The assertion is evaluated on the request."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESPONSE: return "response"; + case REQUEST: return "request"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertDirectionCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertDirectionCodesEnumFactory.java new file mode 100644 index 00000000000..2b0a370a53a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertDirectionCodesEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AssertDirectionCodesEnumFactory implements EnumFactory { + + public AssertDirectionCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("response".equals(codeString)) + return AssertDirectionCodes.RESPONSE; + if ("request".equals(codeString)) + return AssertDirectionCodes.REQUEST; + throw new IllegalArgumentException("Unknown AssertDirectionCodes code '"+codeString+"'"); + } + + public String toCode(AssertDirectionCodes code) { + if (code == AssertDirectionCodes.RESPONSE) + return "response"; + if (code == AssertDirectionCodes.REQUEST) + return "request"; + return "?"; + } + + public String toSystem(AssertDirectionCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertOperatorCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertOperatorCodes.java new file mode 100644 index 00000000000..3573532c800 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertOperatorCodes.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AssertOperatorCodes { + + /** + * Default value. Equals comparison. + */ + EQUALS, + /** + * Not equals comparison. + */ + NOTEQUALS, + /** + * Compare value within a known set of values. + */ + IN, + /** + * Compare value not within a known set of values. + */ + NOTIN, + /** + * Compare value to be greater than a known value. + */ + GREATERTHAN, + /** + * Compare value to be less than a known value. + */ + LESSTHAN, + /** + * Compare value is empty. + */ + EMPTY, + /** + * Compare value is not empty. + */ + NOTEMPTY, + /** + * Compare value string contains a known value. + */ + CONTAINS, + /** + * Compare value string does not contain a known value. + */ + NOTCONTAINS, + /** + * Evaluate the fluentpath expression as a boolean condition. + */ + EVAL, + /** + * added to help the parsers + */ + NULL; + public static AssertOperatorCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("equals".equals(codeString)) + return EQUALS; + if ("notEquals".equals(codeString)) + return NOTEQUALS; + if ("in".equals(codeString)) + return IN; + if ("notIn".equals(codeString)) + return NOTIN; + if ("greaterThan".equals(codeString)) + return GREATERTHAN; + if ("lessThan".equals(codeString)) + return LESSTHAN; + if ("empty".equals(codeString)) + return EMPTY; + if ("notEmpty".equals(codeString)) + return NOTEMPTY; + if ("contains".equals(codeString)) + return CONTAINS; + if ("notContains".equals(codeString)) + return NOTCONTAINS; + if ("eval".equals(codeString)) + return EVAL; + throw new FHIRException("Unknown AssertOperatorCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EQUALS: return "equals"; + case NOTEQUALS: return "notEquals"; + case IN: return "in"; + case NOTIN: return "notIn"; + case GREATERTHAN: return "greaterThan"; + case LESSTHAN: return "lessThan"; + case EMPTY: return "empty"; + case NOTEMPTY: return "notEmpty"; + case CONTAINS: return "contains"; + case NOTCONTAINS: return "notContains"; + case EVAL: return "eval"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/assert-operator-codes"; + } + public String getDefinition() { + switch (this) { + case EQUALS: return "Default value. Equals comparison."; + case NOTEQUALS: return "Not equals comparison."; + case IN: return "Compare value within a known set of values."; + case NOTIN: return "Compare value not within a known set of values."; + case GREATERTHAN: return "Compare value to be greater than a known value."; + case LESSTHAN: return "Compare value to be less than a known value."; + case EMPTY: return "Compare value is empty."; + case NOTEMPTY: return "Compare value is not empty."; + case CONTAINS: return "Compare value string contains a known value."; + case NOTCONTAINS: return "Compare value string does not contain a known value."; + case EVAL: return "Evaluate the fluentpath expression as a boolean condition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EQUALS: return "equals"; + case NOTEQUALS: return "notEquals"; + case IN: return "in"; + case NOTIN: return "notIn"; + case GREATERTHAN: return "greaterThan"; + case LESSTHAN: return "lessThan"; + case EMPTY: return "empty"; + case NOTEMPTY: return "notEmpty"; + case CONTAINS: return "contains"; + case NOTCONTAINS: return "notContains"; + case EVAL: return "evaluate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertOperatorCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertOperatorCodesEnumFactory.java new file mode 100644 index 00000000000..a3f7d834319 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertOperatorCodesEnumFactory.java @@ -0,0 +1,98 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AssertOperatorCodesEnumFactory implements EnumFactory { + + public AssertOperatorCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("equals".equals(codeString)) + return AssertOperatorCodes.EQUALS; + if ("notEquals".equals(codeString)) + return AssertOperatorCodes.NOTEQUALS; + if ("in".equals(codeString)) + return AssertOperatorCodes.IN; + if ("notIn".equals(codeString)) + return AssertOperatorCodes.NOTIN; + if ("greaterThan".equals(codeString)) + return AssertOperatorCodes.GREATERTHAN; + if ("lessThan".equals(codeString)) + return AssertOperatorCodes.LESSTHAN; + if ("empty".equals(codeString)) + return AssertOperatorCodes.EMPTY; + if ("notEmpty".equals(codeString)) + return AssertOperatorCodes.NOTEMPTY; + if ("contains".equals(codeString)) + return AssertOperatorCodes.CONTAINS; + if ("notContains".equals(codeString)) + return AssertOperatorCodes.NOTCONTAINS; + if ("eval".equals(codeString)) + return AssertOperatorCodes.EVAL; + throw new IllegalArgumentException("Unknown AssertOperatorCodes code '"+codeString+"'"); + } + + public String toCode(AssertOperatorCodes code) { + if (code == AssertOperatorCodes.EQUALS) + return "equals"; + if (code == AssertOperatorCodes.NOTEQUALS) + return "notEquals"; + if (code == AssertOperatorCodes.IN) + return "in"; + if (code == AssertOperatorCodes.NOTIN) + return "notIn"; + if (code == AssertOperatorCodes.GREATERTHAN) + return "greaterThan"; + if (code == AssertOperatorCodes.LESSTHAN) + return "lessThan"; + if (code == AssertOperatorCodes.EMPTY) + return "empty"; + if (code == AssertOperatorCodes.NOTEMPTY) + return "notEmpty"; + if (code == AssertOperatorCodes.CONTAINS) + return "contains"; + if (code == AssertOperatorCodes.NOTCONTAINS) + return "notContains"; + if (code == AssertOperatorCodes.EVAL) + return "eval"; + return "?"; + } + + public String toSystem(AssertOperatorCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertResponseCodeTypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertResponseCodeTypes.java new file mode 100644 index 00000000000..ff073b1b094 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertResponseCodeTypes.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AssertResponseCodeTypes { + + /** + * Response code is 200. + */ + OKAY, + /** + * Response code is 201. + */ + CREATED, + /** + * Response code is 204. + */ + NOCONTENT, + /** + * Response code is 304. + */ + NOTMODIFIED, + /** + * Response code is 400. + */ + BAD, + /** + * Response code is 403. + */ + FORBIDDEN, + /** + * Response code is 404. + */ + NOTFOUND, + /** + * Response code is 405. + */ + METHODNOTALLOWED, + /** + * Response code is 409. + */ + CONFLICT, + /** + * Response code is 410. + */ + GONE, + /** + * Response code is 412. + */ + PRECONDITIONFAILED, + /** + * Response code is 422. + */ + UNPROCESSABLE, + /** + * added to help the parsers + */ + NULL; + public static AssertResponseCodeTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("okay".equals(codeString)) + return OKAY; + if ("created".equals(codeString)) + return CREATED; + if ("noContent".equals(codeString)) + return NOCONTENT; + if ("notModified".equals(codeString)) + return NOTMODIFIED; + if ("bad".equals(codeString)) + return BAD; + if ("forbidden".equals(codeString)) + return FORBIDDEN; + if ("notFound".equals(codeString)) + return NOTFOUND; + if ("methodNotAllowed".equals(codeString)) + return METHODNOTALLOWED; + if ("conflict".equals(codeString)) + return CONFLICT; + if ("gone".equals(codeString)) + return GONE; + if ("preconditionFailed".equals(codeString)) + return PRECONDITIONFAILED; + if ("unprocessable".equals(codeString)) + return UNPROCESSABLE; + throw new FHIRException("Unknown AssertResponseCodeTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OKAY: return "okay"; + case CREATED: return "created"; + case NOCONTENT: return "noContent"; + case NOTMODIFIED: return "notModified"; + case BAD: return "bad"; + case FORBIDDEN: return "forbidden"; + case NOTFOUND: return "notFound"; + case METHODNOTALLOWED: return "methodNotAllowed"; + case CONFLICT: return "conflict"; + case GONE: return "gone"; + case PRECONDITIONFAILED: return "preconditionFailed"; + case UNPROCESSABLE: return "unprocessable"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/assert-response-code-types"; + } + public String getDefinition() { + switch (this) { + case OKAY: return "Response code is 200."; + case CREATED: return "Response code is 201."; + case NOCONTENT: return "Response code is 204."; + case NOTMODIFIED: return "Response code is 304."; + case BAD: return "Response code is 400."; + case FORBIDDEN: return "Response code is 403."; + case NOTFOUND: return "Response code is 404."; + case METHODNOTALLOWED: return "Response code is 405."; + case CONFLICT: return "Response code is 409."; + case GONE: return "Response code is 410."; + case PRECONDITIONFAILED: return "Response code is 412."; + case UNPROCESSABLE: return "Response code is 422."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OKAY: return "okay"; + case CREATED: return "created"; + case NOCONTENT: return "noContent"; + case NOTMODIFIED: return "notModified"; + case BAD: return "bad"; + case FORBIDDEN: return "forbidden"; + case NOTFOUND: return "notFound"; + case METHODNOTALLOWED: return "methodNotAllowed"; + case CONFLICT: return "conflict"; + case GONE: return "gone"; + case PRECONDITIONFAILED: return "preconditionFailed"; + case UNPROCESSABLE: return "unprocessable"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertResponseCodeTypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertResponseCodeTypesEnumFactory.java new file mode 100644 index 00000000000..dae71a8be12 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AssertResponseCodeTypesEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AssertResponseCodeTypesEnumFactory implements EnumFactory { + + public AssertResponseCodeTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("okay".equals(codeString)) + return AssertResponseCodeTypes.OKAY; + if ("created".equals(codeString)) + return AssertResponseCodeTypes.CREATED; + if ("noContent".equals(codeString)) + return AssertResponseCodeTypes.NOCONTENT; + if ("notModified".equals(codeString)) + return AssertResponseCodeTypes.NOTMODIFIED; + if ("bad".equals(codeString)) + return AssertResponseCodeTypes.BAD; + if ("forbidden".equals(codeString)) + return AssertResponseCodeTypes.FORBIDDEN; + if ("notFound".equals(codeString)) + return AssertResponseCodeTypes.NOTFOUND; + if ("methodNotAllowed".equals(codeString)) + return AssertResponseCodeTypes.METHODNOTALLOWED; + if ("conflict".equals(codeString)) + return AssertResponseCodeTypes.CONFLICT; + if ("gone".equals(codeString)) + return AssertResponseCodeTypes.GONE; + if ("preconditionFailed".equals(codeString)) + return AssertResponseCodeTypes.PRECONDITIONFAILED; + if ("unprocessable".equals(codeString)) + return AssertResponseCodeTypes.UNPROCESSABLE; + throw new IllegalArgumentException("Unknown AssertResponseCodeTypes code '"+codeString+"'"); + } + + public String toCode(AssertResponseCodeTypes code) { + if (code == AssertResponseCodeTypes.OKAY) + return "okay"; + if (code == AssertResponseCodeTypes.CREATED) + return "created"; + if (code == AssertResponseCodeTypes.NOCONTENT) + return "noContent"; + if (code == AssertResponseCodeTypes.NOTMODIFIED) + return "notModified"; + if (code == AssertResponseCodeTypes.BAD) + return "bad"; + if (code == AssertResponseCodeTypes.FORBIDDEN) + return "forbidden"; + if (code == AssertResponseCodeTypes.NOTFOUND) + return "notFound"; + if (code == AssertResponseCodeTypes.METHODNOTALLOWED) + return "methodNotAllowed"; + if (code == AssertResponseCodeTypes.CONFLICT) + return "conflict"; + if (code == AssertResponseCodeTypes.GONE) + return "gone"; + if (code == AssertResponseCodeTypes.PRECONDITIONFAILED) + return "preconditionFailed"; + if (code == AssertResponseCodeTypes.UNPROCESSABLE) + return "unprocessable"; + return "?"; + } + + public String toSystem(AssertResponseCodeTypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityType.java new file mode 100644 index 00000000000..218b44ad5bc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AuditEntityType { + + /** + * Person + */ + _1, + /** + * System Object + */ + _2, + /** + * Organization + */ + _3, + /** + * Other + */ + _4, + /** + * added to help the parsers + */ + NULL; + public static AuditEntityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + throw new FHIRException("Unknown AuditEntityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/audit-entity-type"; + } + public String getDefinition() { + switch (this) { + case _1: return "Person"; + case _2: return "System Object"; + case _3: return "Organization"; + case _4: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Person"; + case _2: return "System Object"; + case _3: return "Organization"; + case _4: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityTypeEnumFactory.java new file mode 100644 index 00000000000..f19c0454063 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AuditEntityTypeEnumFactory implements EnumFactory { + + public AuditEntityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return AuditEntityType._1; + if ("2".equals(codeString)) + return AuditEntityType._2; + if ("3".equals(codeString)) + return AuditEntityType._3; + if ("4".equals(codeString)) + return AuditEntityType._4; + throw new IllegalArgumentException("Unknown AuditEntityType code '"+codeString+"'"); + } + + public String toCode(AuditEntityType code) { + if (code == AuditEntityType._1) + return "1"; + if (code == AuditEntityType._2) + return "2"; + if (code == AuditEntityType._3) + return "3"; + if (code == AuditEntityType._4) + return "4"; + return "?"; + } + + public String toSystem(AuditEntityType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventAction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventAction.java new file mode 100644 index 00000000000..9d971a45951 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventAction.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AuditEventAction { + + /** + * Create a new database object, such as placing an order. + */ + C, + /** + * Display or print data, such as a doctor census. + */ + R, + /** + * Update data, such as revise patient information. + */ + U, + /** + * Delete items, such as a doctor master file record. + */ + D, + /** + * Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation. + */ + E, + /** + * added to help the parsers + */ + NULL; + public static AuditEventAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("R".equals(codeString)) + return R; + if ("U".equals(codeString)) + return U; + if ("D".equals(codeString)) + return D; + if ("E".equals(codeString)) + return E; + throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case R: return "R"; + case U: return "U"; + case D: return "D"; + case E: return "E"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/audit-event-action"; + } + public String getDefinition() { + switch (this) { + case C: return "Create a new database object, such as placing an order."; + case R: return "Display or print data, such as a doctor census."; + case U: return "Update data, such as revise patient information."; + case D: return "Delete items, such as a doctor master file record."; + case E: return "Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "Create"; + case R: return "Read/View/Print"; + case U: return "Update"; + case D: return "Delete"; + case E: return "Execute"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventActionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventActionEnumFactory.java new file mode 100644 index 00000000000..56711c0f7fe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventActionEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AuditEventActionEnumFactory implements EnumFactory { + + public AuditEventAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return AuditEventAction.C; + if ("R".equals(codeString)) + return AuditEventAction.R; + if ("U".equals(codeString)) + return AuditEventAction.U; + if ("D".equals(codeString)) + return AuditEventAction.D; + if ("E".equals(codeString)) + return AuditEventAction.E; + throw new IllegalArgumentException("Unknown AuditEventAction code '"+codeString+"'"); + } + + public String toCode(AuditEventAction code) { + if (code == AuditEventAction.C) + return "C"; + if (code == AuditEventAction.R) + return "R"; + if (code == AuditEventAction.U) + return "U"; + if (code == AuditEventAction.D) + return "D"; + if (code == AuditEventAction.E) + return "E"; + return "?"; + } + + public String toSystem(AuditEventAction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventOutcome.java new file mode 100644 index 00000000000..95f9b9a32e9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventOutcome.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AuditEventOutcome { + + /** + * The operation completed successfully (whether with warnings or not). + */ + _0, + /** + * The action was not successful due to some kind of minor failure (often equivalent to an HTTP 400 response). + */ + _4, + /** + * The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response). + */ + _8, + /** + * An error of such magnitude occurred that the system is no longer available for use (i.e. the system died). + */ + _12, + /** + * added to help the parsers + */ + NULL; + public static AuditEventOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return _0; + if ("4".equals(codeString)) + return _4; + if ("8".equals(codeString)) + return _8; + if ("12".equals(codeString)) + return _12; + throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _0: return "0"; + case _4: return "4"; + case _8: return "8"; + case _12: return "12"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/audit-event-outcome"; + } + public String getDefinition() { + switch (this) { + case _0: return "The operation completed successfully (whether with warnings or not)."; + case _4: return "The action was not successful due to some kind of minor failure (often equivalent to an HTTP 400 response)."; + case _8: return "The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response)."; + case _12: return "An error of such magnitude occurred that the system is no longer available for use (i.e. the system died)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _0: return "Success"; + case _4: return "Minor failure"; + case _8: return "Serious failure"; + case _12: return "Major failure"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventOutcomeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventOutcomeEnumFactory.java new file mode 100644 index 00000000000..7ddb940926f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventOutcomeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AuditEventOutcomeEnumFactory implements EnumFactory { + + public AuditEventOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return AuditEventOutcome._0; + if ("4".equals(codeString)) + return AuditEventOutcome._4; + if ("8".equals(codeString)) + return AuditEventOutcome._8; + if ("12".equals(codeString)) + return AuditEventOutcome._12; + throw new IllegalArgumentException("Unknown AuditEventOutcome code '"+codeString+"'"); + } + + public String toCode(AuditEventOutcome code) { + if (code == AuditEventOutcome._0) + return "0"; + if (code == AuditEventOutcome._4) + return "4"; + if (code == AuditEventOutcome._8) + return "8"; + if (code == AuditEventOutcome._12) + return "12"; + return "?"; + } + + public String toSystem(AuditEventOutcome code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventType.java new file mode 100644 index 00000000000..32321cc6958 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventType.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AuditEventType { + + /** + * Audit Event: Execution of a RESTful operation as defined by FHIR. + */ + REST, + /** + * added to help the parsers + */ + NULL; + public static AuditEventType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("rest".equals(codeString)) + return REST; + throw new FHIRException("Unknown AuditEventType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REST: return "rest"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/audit-event-type"; + } + public String getDefinition() { + switch (this) { + case REST: return "Audit Event: Execution of a RESTful operation as defined by FHIR."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REST: return "RESTful Operation"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventTypeEnumFactory.java new file mode 100644 index 00000000000..d1d4722db9a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEventTypeEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AuditEventTypeEnumFactory implements EnumFactory { + + public AuditEventType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("rest".equals(codeString)) + return AuditEventType.REST; + throw new IllegalArgumentException("Unknown AuditEventType code '"+codeString+"'"); + } + + public String toCode(AuditEventType code) { + if (code == AuditEventType.REST) + return "rest"; + return "?"; + } + + public String toSystem(AuditEventType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditSourceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditSourceType.java new file mode 100644 index 00000000000..060a822be14 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditSourceType.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum AuditSourceType { + + /** + * End-user display device, diagnostic device. + */ + _1, + /** + * Data acquisition device or instrument. + */ + _2, + /** + * Web Server process or thread. + */ + _3, + /** + * Application Server process or thread. + */ + _4, + /** + * Database Server process or thread. + */ + _5, + /** + * Security server, e.g. a domain controller. + */ + _6, + /** + * ISO level 1-3 network component. + */ + _7, + /** + * ISO level 4-6 operating software. + */ + _8, + /** + * other kind of device (defined by DICOM, but some other code/system can be used). + */ + _9, + /** + * added to help the parsers + */ + NULL; + public static AuditSourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + throw new FHIRException("Unknown AuditSourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/security-source-type"; + } + public String getDefinition() { + switch (this) { + case _1: return "End-user display device, diagnostic device."; + case _2: return "Data acquisition device or instrument."; + case _3: return "Web Server process or thread."; + case _4: return "Application Server process or thread."; + case _5: return "Database Server process or thread."; + case _6: return "Security server, e.g. a domain controller."; + case _7: return "ISO level 1-3 network component."; + case _8: return "ISO level 4-6 operating software."; + case _9: return "other kind of device (defined by DICOM, but some other code/system can be used)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "User Device"; + case _2: return "Data Interface"; + case _3: return "Web Server"; + case _4: return "Application Server"; + case _5: return "Database Server"; + case _6: return "Security Server"; + case _7: return "Network Device"; + case _8: return "Network Router"; + case _9: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditSourceTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditSourceTypeEnumFactory.java new file mode 100644 index 00000000000..369896c2fa1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditSourceTypeEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class AuditSourceTypeEnumFactory implements EnumFactory { + + public AuditSourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return AuditSourceType._1; + if ("2".equals(codeString)) + return AuditSourceType._2; + if ("3".equals(codeString)) + return AuditSourceType._3; + if ("4".equals(codeString)) + return AuditSourceType._4; + if ("5".equals(codeString)) + return AuditSourceType._5; + if ("6".equals(codeString)) + return AuditSourceType._6; + if ("7".equals(codeString)) + return AuditSourceType._7; + if ("8".equals(codeString)) + return AuditSourceType._8; + if ("9".equals(codeString)) + return AuditSourceType._9; + throw new IllegalArgumentException("Unknown AuditSourceType code '"+codeString+"'"); + } + + public String toCode(AuditSourceType code) { + if (code == AuditSourceType._1) + return "1"; + if (code == AuditSourceType._2) + return "2"; + if (code == AuditSourceType._3) + return "3"; + if (code == AuditSourceType._4) + return "4"; + if (code == AuditSourceType._5) + return "5"; + if (code == AuditSourceType._6) + return "6"; + if (code == AuditSourceType._7) + return "7"; + if (code == AuditSourceType._8) + return "8"; + if (code == AuditSourceType._9) + return "9"; + return "?"; + } + + public String toSystem(AuditSourceType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BasicResourceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BasicResourceType.java new file mode 100644 index 00000000000..51d14ed7475 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BasicResourceType.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BasicResourceType { + + /** + * An assertion of permission for an activity or set of activities to occur, possibly subject to particular limitations; e.g. surgical consent, information disclosure consent, etc. + */ + CONSENT, + /** + * A request that care of a particular type be provided to a patient. Could involve the transfer of care, a consult, etc. + */ + REFERRAL, + /** + * An undesired reaction caused by exposure to some agent (e.g. a medication, immunization, food, or environmental agent). + */ + ADVEVENT, + /** + * A request that a time be scheduled for a type of service for a specified patient, potentially subject to other constraints + */ + APTMTREQ, + /** + * The transition of a patient or set of material from one location to another + */ + TRANSFER, + /** + * The specification of a set of food and/or other nutritional material to be delivered to a patient. + */ + DIET, + /** + * An occurrence of a non-care-related event in the healthcare domain, such as approvals, reviews, etc. + */ + ADMINACT, + /** + * Record of a situation where a subject was exposed to a substance. Usually of interest to public health. + */ + EXPOSURE, + /** + * A formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event + */ + INVESTIGATION, + /** + * A financial instrument used to track costs, charges or other amounts. + */ + ACCOUNT, + /** + * A request for payment for goods and/or services. Includes the idea of a healthcare insurance claim. + */ + INVOICE, + /** + * The determination of what will be paid against a particular invoice based on coverage, plan rules, etc. + */ + ADJUDICAT, + /** + * A request for a pre-determination of the cost that would be paid under an insurance plan for a hypothetical claim for goods or services + */ + PREDETREQ, + /** + * An adjudication of what would be paid under an insurance plan for a hypothetical claim for goods or services + */ + PREDETERMINE, + /** + * An investigation to determine information about a particular therapy or product + */ + STUDY, + /** + * A set of (possibly conditional) steps to be taken to achieve some aim. Includes study protocols, treatment protocols, emergency protocols, etc. + */ + PROTOCOL, + /** + * added to help the parsers + */ + NULL; + public static BasicResourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("consent".equals(codeString)) + return CONSENT; + if ("referral".equals(codeString)) + return REFERRAL; + if ("advevent".equals(codeString)) + return ADVEVENT; + if ("aptmtreq".equals(codeString)) + return APTMTREQ; + if ("transfer".equals(codeString)) + return TRANSFER; + if ("diet".equals(codeString)) + return DIET; + if ("adminact".equals(codeString)) + return ADMINACT; + if ("exposure".equals(codeString)) + return EXPOSURE; + if ("investigation".equals(codeString)) + return INVESTIGATION; + if ("account".equals(codeString)) + return ACCOUNT; + if ("invoice".equals(codeString)) + return INVOICE; + if ("adjudicat".equals(codeString)) + return ADJUDICAT; + if ("predetreq".equals(codeString)) + return PREDETREQ; + if ("predetermine".equals(codeString)) + return PREDETERMINE; + if ("study".equals(codeString)) + return STUDY; + if ("protocol".equals(codeString)) + return PROTOCOL; + throw new FHIRException("Unknown BasicResourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONSENT: return "consent"; + case REFERRAL: return "referral"; + case ADVEVENT: return "advevent"; + case APTMTREQ: return "aptmtreq"; + case TRANSFER: return "transfer"; + case DIET: return "diet"; + case ADMINACT: return "adminact"; + case EXPOSURE: return "exposure"; + case INVESTIGATION: return "investigation"; + case ACCOUNT: return "account"; + case INVOICE: return "invoice"; + case ADJUDICAT: return "adjudicat"; + case PREDETREQ: return "predetreq"; + case PREDETERMINE: return "predetermine"; + case STUDY: return "study"; + case PROTOCOL: return "protocol"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/basic-resource-type"; + } + public String getDefinition() { + switch (this) { + case CONSENT: return "An assertion of permission for an activity or set of activities to occur, possibly subject to particular limitations; e.g. surgical consent, information disclosure consent, etc."; + case REFERRAL: return "A request that care of a particular type be provided to a patient. Could involve the transfer of care, a consult, etc."; + case ADVEVENT: return "An undesired reaction caused by exposure to some agent (e.g. a medication, immunization, food, or environmental agent)."; + case APTMTREQ: return "A request that a time be scheduled for a type of service for a specified patient, potentially subject to other constraints"; + case TRANSFER: return "The transition of a patient or set of material from one location to another"; + case DIET: return "The specification of a set of food and/or other nutritional material to be delivered to a patient."; + case ADMINACT: return "An occurrence of a non-care-related event in the healthcare domain, such as approvals, reviews, etc."; + case EXPOSURE: return "Record of a situation where a subject was exposed to a substance. Usually of interest to public health."; + case INVESTIGATION: return "A formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event"; + case ACCOUNT: return "A financial instrument used to track costs, charges or other amounts."; + case INVOICE: return "A request for payment for goods and/or services. Includes the idea of a healthcare insurance claim."; + case ADJUDICAT: return "The determination of what will be paid against a particular invoice based on coverage, plan rules, etc."; + case PREDETREQ: return "A request for a pre-determination of the cost that would be paid under an insurance plan for a hypothetical claim for goods or services"; + case PREDETERMINE: return "An adjudication of what would be paid under an insurance plan for a hypothetical claim for goods or services"; + case STUDY: return "An investigation to determine information about a particular therapy or product"; + case PROTOCOL: return "A set of (possibly conditional) steps to be taken to achieve some aim. Includes study protocols, treatment protocols, emergency protocols, etc."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONSENT: return "Consent"; + case REFERRAL: return "Referral"; + case ADVEVENT: return "Adverse Event"; + case APTMTREQ: return "Appointment Request"; + case TRANSFER: return "Transfer"; + case DIET: return "Diet"; + case ADMINACT: return "Administrative Activity"; + case EXPOSURE: return "Exposure"; + case INVESTIGATION: return "Investigation"; + case ACCOUNT: return "Account"; + case INVOICE: return "Invoice"; + case ADJUDICAT: return "Invoice Adjudication"; + case PREDETREQ: return "Pre-determination Request"; + case PREDETERMINE: return "Predetermination"; + case STUDY: return "Study"; + case PROTOCOL: return "Protocol"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BasicResourceTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BasicResourceTypeEnumFactory.java new file mode 100644 index 00000000000..ee2d079a4c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BasicResourceTypeEnumFactory.java @@ -0,0 +1,118 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BasicResourceTypeEnumFactory implements EnumFactory { + + public BasicResourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("consent".equals(codeString)) + return BasicResourceType.CONSENT; + if ("referral".equals(codeString)) + return BasicResourceType.REFERRAL; + if ("advevent".equals(codeString)) + return BasicResourceType.ADVEVENT; + if ("aptmtreq".equals(codeString)) + return BasicResourceType.APTMTREQ; + if ("transfer".equals(codeString)) + return BasicResourceType.TRANSFER; + if ("diet".equals(codeString)) + return BasicResourceType.DIET; + if ("adminact".equals(codeString)) + return BasicResourceType.ADMINACT; + if ("exposure".equals(codeString)) + return BasicResourceType.EXPOSURE; + if ("investigation".equals(codeString)) + return BasicResourceType.INVESTIGATION; + if ("account".equals(codeString)) + return BasicResourceType.ACCOUNT; + if ("invoice".equals(codeString)) + return BasicResourceType.INVOICE; + if ("adjudicat".equals(codeString)) + return BasicResourceType.ADJUDICAT; + if ("predetreq".equals(codeString)) + return BasicResourceType.PREDETREQ; + if ("predetermine".equals(codeString)) + return BasicResourceType.PREDETERMINE; + if ("study".equals(codeString)) + return BasicResourceType.STUDY; + if ("protocol".equals(codeString)) + return BasicResourceType.PROTOCOL; + throw new IllegalArgumentException("Unknown BasicResourceType code '"+codeString+"'"); + } + + public String toCode(BasicResourceType code) { + if (code == BasicResourceType.CONSENT) + return "consent"; + if (code == BasicResourceType.REFERRAL) + return "referral"; + if (code == BasicResourceType.ADVEVENT) + return "advevent"; + if (code == BasicResourceType.APTMTREQ) + return "aptmtreq"; + if (code == BasicResourceType.TRANSFER) + return "transfer"; + if (code == BasicResourceType.DIET) + return "diet"; + if (code == BasicResourceType.ADMINACT) + return "adminact"; + if (code == BasicResourceType.EXPOSURE) + return "exposure"; + if (code == BasicResourceType.INVESTIGATION) + return "investigation"; + if (code == BasicResourceType.ACCOUNT) + return "account"; + if (code == BasicResourceType.INVOICE) + return "invoice"; + if (code == BasicResourceType.ADJUDICAT) + return "adjudicat"; + if (code == BasicResourceType.PREDETREQ) + return "predetreq"; + if (code == BasicResourceType.PREDETERMINE) + return "predetermine"; + if (code == BasicResourceType.STUDY) + return "study"; + if (code == BasicResourceType.PROTOCOL) + return "protocol"; + return "?"; + } + + public String toSystem(BasicResourceType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitCategory.java new file mode 100644 index 00000000000..b84dac15b12 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitCategory.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BenefitCategory { + + /** + * Dental and Oral Health Coverage + */ + ORAL, + /** + * Vision Health Coverage + */ + VISION, + /** + * Medical Health Coverage + */ + MEDICAL, + /** + * Pharmacy Coverage + */ + PHARMACY, + /** + * added to help the parsers + */ + NULL; + public static BenefitCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("oral".equals(codeString)) + return ORAL; + if ("vision".equals(codeString)) + return VISION; + if ("medical".equals(codeString)) + return MEDICAL; + if ("pharmacy".equals(codeString)) + return PHARMACY; + throw new FHIRException("Unknown BenefitCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORAL: return "oral"; + case VISION: return "vision"; + case MEDICAL: return "medical"; + case PHARMACY: return "pharmacy"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/benefit-category"; + } + public String getDefinition() { + switch (this) { + case ORAL: return "Dental and Oral Health Coverage"; + case VISION: return "Vision Health Coverage"; + case MEDICAL: return "Medical Health Coverage"; + case PHARMACY: return "Pharmacy Coverage"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORAL: return "Dental and Oral Health Coverage"; + case VISION: return "Vision Health Coverage"; + case MEDICAL: return "Medical Health Coverage"; + case PHARMACY: return "Pharmacy Coverage"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitCategoryEnumFactory.java new file mode 100644 index 00000000000..7c18c92e9d9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitCategoryEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BenefitCategoryEnumFactory implements EnumFactory { + + public BenefitCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("oral".equals(codeString)) + return BenefitCategory.ORAL; + if ("vision".equals(codeString)) + return BenefitCategory.VISION; + if ("medical".equals(codeString)) + return BenefitCategory.MEDICAL; + if ("pharmacy".equals(codeString)) + return BenefitCategory.PHARMACY; + throw new IllegalArgumentException("Unknown BenefitCategory code '"+codeString+"'"); + } + + public String toCode(BenefitCategory code) { + if (code == BenefitCategory.ORAL) + return "oral"; + if (code == BenefitCategory.VISION) + return "vision"; + if (code == BenefitCategory.MEDICAL) + return "medical"; + if (code == BenefitCategory.PHARMACY) + return "pharmacy"; + return "?"; + } + + public String toSystem(BenefitCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitNetwork.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitNetwork.java new file mode 100644 index 00000000000..06e63d9f81a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitNetwork.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BenefitNetwork { + + /** + * Services rendered by a Network provider + */ + IN, + /** + * Services rendered by a provider who is not in the Network + */ + OUT, + /** + * added to help the parsers + */ + NULL; + public static BenefitNetwork fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return IN; + if ("out".equals(codeString)) + return OUT; + throw new FHIRException("Unknown BenefitNetwork code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IN: return "in"; + case OUT: return "out"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/benefit-network"; + } + public String getDefinition() { + switch (this) { + case IN: return "Services rendered by a Network provider"; + case OUT: return "Services rendered by a provider who is not in the Network"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IN: return "In Network"; + case OUT: return "Out of Network"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitNetworkEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitNetworkEnumFactory.java new file mode 100644 index 00000000000..866b073fe48 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitNetworkEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BenefitNetworkEnumFactory implements EnumFactory { + + public BenefitNetwork fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return BenefitNetwork.IN; + if ("out".equals(codeString)) + return BenefitNetwork.OUT; + throw new IllegalArgumentException("Unknown BenefitNetwork code '"+codeString+"'"); + } + + public String toCode(BenefitNetwork code) { + if (code == BenefitNetwork.IN) + return "in"; + if (code == BenefitNetwork.OUT) + return "out"; + return "?"; + } + + public String toSystem(BenefitNetwork code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitSubcategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitSubcategory.java new file mode 100644 index 00000000000..a15825b4af2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitSubcategory.java @@ -0,0 +1,321 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BenefitSubcategory { + + /** + * Medical Care. + */ + _1, + /** + * Surgical. + */ + _2, + /** + * Consultation. + */ + _3, + /** + * Diagnostic XRay. + */ + _4, + /** + * Diagnostic Lab. + */ + _5, + /** + * Renal Supplies excluding Dialysis. + */ + _14, + /** + * Diagnostic Dental. + */ + _23, + /** + * Periodontics. + */ + _24, + /** + * Restorative. + */ + _25, + /** + * Endodontics. + */ + _26, + /** + * Maxillofacial Prosthetics. + */ + _27, + /** + * Adjunctive Dental Services. + */ + _28, + /** + * Health Benefit Plan Coverage. + */ + _30, + /** + * Dental Care. + */ + _35, + /** + * Dental Crowns. + */ + _36, + /** + * Dental Accident. + */ + _37, + /** + * Hospital Room and Board. + */ + _49, + /** + * Major Medical. + */ + _55, + /** + * Medically Related Transportation. + */ + _56, + /** + * In-vitro Fertilization. + */ + _61, + /** + * MRI Scan. + */ + _62, + /** + * Donor Procedures such as organ harvest. + */ + _63, + /** + * Maternity. + */ + _69, + /** + * Renal dialysis. + */ + _76, + /** + * Medical Coverage. + */ + F1, + /** + * Dental Coverage. + */ + F3, + /** + * Hearing Coverage. + */ + F4, + /** + * Vision Coverage. + */ + F6, + /** + * added to help the parsers + */ + NULL; + public static BenefitSubcategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("14".equals(codeString)) + return _14; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("30".equals(codeString)) + return _30; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("49".equals(codeString)) + return _49; + if ("55".equals(codeString)) + return _55; + if ("56".equals(codeString)) + return _56; + if ("61".equals(codeString)) + return _61; + if ("62".equals(codeString)) + return _62; + if ("63".equals(codeString)) + return _63; + if ("69".equals(codeString)) + return _69; + if ("76".equals(codeString)) + return _76; + if ("F1".equals(codeString)) + return F1; + if ("F3".equals(codeString)) + return F3; + if ("F4".equals(codeString)) + return F4; + if ("F6".equals(codeString)) + return F6; + throw new FHIRException("Unknown BenefitSubcategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _14: return "14"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _30: return "30"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _49: return "49"; + case _55: return "55"; + case _56: return "56"; + case _61: return "61"; + case _62: return "62"; + case _63: return "63"; + case _69: return "69"; + case _76: return "76"; + case F1: return "F1"; + case F3: return "F3"; + case F4: return "F4"; + case F6: return "F6"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/benefit-subcategory"; + } + public String getDefinition() { + switch (this) { + case _1: return "Medical Care."; + case _2: return "Surgical."; + case _3: return "Consultation."; + case _4: return "Diagnostic XRay."; + case _5: return "Diagnostic Lab."; + case _14: return "Renal Supplies excluding Dialysis."; + case _23: return "Diagnostic Dental."; + case _24: return "Periodontics."; + case _25: return "Restorative."; + case _26: return "Endodontics."; + case _27: return "Maxillofacial Prosthetics."; + case _28: return "Adjunctive Dental Services."; + case _30: return "Health Benefit Plan Coverage."; + case _35: return "Dental Care."; + case _36: return "Dental Crowns."; + case _37: return "Dental Accident."; + case _49: return "Hospital Room and Board."; + case _55: return "Major Medical."; + case _56: return "Medically Related Transportation."; + case _61: return "In-vitro Fertilization."; + case _62: return "MRI Scan."; + case _63: return "Donor Procedures such as organ harvest."; + case _69: return "Maternity."; + case _76: return "Renal dialysis."; + case F1: return "Medical Coverage."; + case F3: return "Dental Coverage."; + case F4: return "Hearing Coverage."; + case F6: return "Vision Coverage."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Medical Care"; + case _2: return "Surgical"; + case _3: return "Consultation"; + case _4: return "Diagnostic XRay"; + case _5: return "Diagnostic Lab"; + case _14: return "Renal Supplies"; + case _23: return "Diagnostic Dental"; + case _24: return "Periodontics"; + case _25: return "Restorative"; + case _26: return "Endodontics"; + case _27: return "Maxillofacial Prosthetics"; + case _28: return "Adjunctive Dental Services"; + case _30: return "Health Benefit Plan Coverage"; + case _35: return "Dental Care"; + case _36: return "Dental Crowns"; + case _37: return "Dental Accident"; + case _49: return "Hospital Room and Board"; + case _55: return "Major Medical"; + case _56: return "Medically Related Transportation"; + case _61: return "In-vitro Fertilization"; + case _62: return "MRI Scan"; + case _63: return "Donor Procedures"; + case _69: return "Maternity"; + case _76: return "Renal Dialysis"; + case F1: return "Medical Coverage"; + case F3: return "Dental Coverage"; + case F4: return "Hearing Coverage"; + case F6: return "Vision Coverage"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitSubcategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitSubcategoryEnumFactory.java new file mode 100644 index 00000000000..fd9ac6b23f7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitSubcategoryEnumFactory.java @@ -0,0 +1,166 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BenefitSubcategoryEnumFactory implements EnumFactory { + + public BenefitSubcategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return BenefitSubcategory._1; + if ("2".equals(codeString)) + return BenefitSubcategory._2; + if ("3".equals(codeString)) + return BenefitSubcategory._3; + if ("4".equals(codeString)) + return BenefitSubcategory._4; + if ("5".equals(codeString)) + return BenefitSubcategory._5; + if ("14".equals(codeString)) + return BenefitSubcategory._14; + if ("23".equals(codeString)) + return BenefitSubcategory._23; + if ("24".equals(codeString)) + return BenefitSubcategory._24; + if ("25".equals(codeString)) + return BenefitSubcategory._25; + if ("26".equals(codeString)) + return BenefitSubcategory._26; + if ("27".equals(codeString)) + return BenefitSubcategory._27; + if ("28".equals(codeString)) + return BenefitSubcategory._28; + if ("30".equals(codeString)) + return BenefitSubcategory._30; + if ("35".equals(codeString)) + return BenefitSubcategory._35; + if ("36".equals(codeString)) + return BenefitSubcategory._36; + if ("37".equals(codeString)) + return BenefitSubcategory._37; + if ("49".equals(codeString)) + return BenefitSubcategory._49; + if ("55".equals(codeString)) + return BenefitSubcategory._55; + if ("56".equals(codeString)) + return BenefitSubcategory._56; + if ("61".equals(codeString)) + return BenefitSubcategory._61; + if ("62".equals(codeString)) + return BenefitSubcategory._62; + if ("63".equals(codeString)) + return BenefitSubcategory._63; + if ("69".equals(codeString)) + return BenefitSubcategory._69; + if ("76".equals(codeString)) + return BenefitSubcategory._76; + if ("F1".equals(codeString)) + return BenefitSubcategory.F1; + if ("F3".equals(codeString)) + return BenefitSubcategory.F3; + if ("F4".equals(codeString)) + return BenefitSubcategory.F4; + if ("F6".equals(codeString)) + return BenefitSubcategory.F6; + throw new IllegalArgumentException("Unknown BenefitSubcategory code '"+codeString+"'"); + } + + public String toCode(BenefitSubcategory code) { + if (code == BenefitSubcategory._1) + return "1"; + if (code == BenefitSubcategory._2) + return "2"; + if (code == BenefitSubcategory._3) + return "3"; + if (code == BenefitSubcategory._4) + return "4"; + if (code == BenefitSubcategory._5) + return "5"; + if (code == BenefitSubcategory._14) + return "14"; + if (code == BenefitSubcategory._23) + return "23"; + if (code == BenefitSubcategory._24) + return "24"; + if (code == BenefitSubcategory._25) + return "25"; + if (code == BenefitSubcategory._26) + return "26"; + if (code == BenefitSubcategory._27) + return "27"; + if (code == BenefitSubcategory._28) + return "28"; + if (code == BenefitSubcategory._30) + return "30"; + if (code == BenefitSubcategory._35) + return "35"; + if (code == BenefitSubcategory._36) + return "36"; + if (code == BenefitSubcategory._37) + return "37"; + if (code == BenefitSubcategory._49) + return "49"; + if (code == BenefitSubcategory._55) + return "55"; + if (code == BenefitSubcategory._56) + return "56"; + if (code == BenefitSubcategory._61) + return "61"; + if (code == BenefitSubcategory._62) + return "62"; + if (code == BenefitSubcategory._63) + return "63"; + if (code == BenefitSubcategory._69) + return "69"; + if (code == BenefitSubcategory._76) + return "76"; + if (code == BenefitSubcategory.F1) + return "F1"; + if (code == BenefitSubcategory.F3) + return "F3"; + if (code == BenefitSubcategory.F4) + return "F4"; + if (code == BenefitSubcategory.F6) + return "F6"; + return "?"; + } + + public String toSystem(BenefitSubcategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTerm.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTerm.java new file mode 100644 index 00000000000..faca2acfe48 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTerm.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BenefitTerm { + + /** + * Annual, renewing on the anniversary + */ + ANNUAL, + /** + * Per day + */ + DAY, + /** + * For the total term, lifetime, of the policy or coverage + */ + LIFETIME, + /** + * added to help the parsers + */ + NULL; + public static BenefitTerm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("annual".equals(codeString)) + return ANNUAL; + if ("day".equals(codeString)) + return DAY; + if ("lifetime".equals(codeString)) + return LIFETIME; + throw new FHIRException("Unknown BenefitTerm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ANNUAL: return "annual"; + case DAY: return "day"; + case LIFETIME: return "lifetime"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/benefit-term"; + } + public String getDefinition() { + switch (this) { + case ANNUAL: return "Annual, renewing on the anniversary"; + case DAY: return "Per day"; + case LIFETIME: return "For the total term, lifetime, of the policy or coverage"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ANNUAL: return "Annual"; + case DAY: return "Day"; + case LIFETIME: return "Lifetime"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTermEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTermEnumFactory.java new file mode 100644 index 00000000000..5f017076504 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTermEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BenefitTermEnumFactory implements EnumFactory { + + public BenefitTerm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("annual".equals(codeString)) + return BenefitTerm.ANNUAL; + if ("day".equals(codeString)) + return BenefitTerm.DAY; + if ("lifetime".equals(codeString)) + return BenefitTerm.LIFETIME; + throw new IllegalArgumentException("Unknown BenefitTerm code '"+codeString+"'"); + } + + public String toCode(BenefitTerm code) { + if (code == BenefitTerm.ANNUAL) + return "annual"; + if (code == BenefitTerm.DAY) + return "day"; + if (code == BenefitTerm.LIFETIME) + return "lifetime"; + return "?"; + } + + public String toSystem(BenefitTerm code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitType.java new file mode 100644 index 00000000000..4023f8c9668 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitType.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BenefitType { + + /** + * Maximum benefit allowable. + */ + BENEFIT, + /** + * Cost to be incurred before benefits are applied + */ + DEDUCTIBLE, + /** + * Service visit + */ + VISIT, + /** + * Type of room + */ + ROOM, + /** + * Copayment per service + */ + COPAY, + /** + * Copayment percentage per service + */ + COPAYPERCENT, + /** + * Copayment maximum per service + */ + COPAYMAXIMUM, + /** + * Vision Exam + */ + VISIONEXAM, + /** + * Frames and lenses + */ + VISIONGLASSES, + /** + * Contact Lenses + */ + VISIONCONTACTS, + /** + * Medical Primary Health Coverage + */ + MEDICALPRIMARYCARE, + /** + * Pharmacy Dispense Coverage + */ + PHARMACYDISPENSE, + /** + * added to help the parsers + */ + NULL; + public static BenefitType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("benefit".equals(codeString)) + return BENEFIT; + if ("deductible".equals(codeString)) + return DEDUCTIBLE; + if ("visit".equals(codeString)) + return VISIT; + if ("room".equals(codeString)) + return ROOM; + if ("copay".equals(codeString)) + return COPAY; + if ("copay-percent".equals(codeString)) + return COPAYPERCENT; + if ("copay-maximum".equals(codeString)) + return COPAYMAXIMUM; + if ("vision-exam".equals(codeString)) + return VISIONEXAM; + if ("vision-glasses".equals(codeString)) + return VISIONGLASSES; + if ("vision-contacts".equals(codeString)) + return VISIONCONTACTS; + if ("medical-primarycare".equals(codeString)) + return MEDICALPRIMARYCARE; + if ("pharmacy-dispense".equals(codeString)) + return PHARMACYDISPENSE; + throw new FHIRException("Unknown BenefitType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BENEFIT: return "benefit"; + case DEDUCTIBLE: return "deductible"; + case VISIT: return "visit"; + case ROOM: return "room"; + case COPAY: return "copay"; + case COPAYPERCENT: return "copay-percent"; + case COPAYMAXIMUM: return "copay-maximum"; + case VISIONEXAM: return "vision-exam"; + case VISIONGLASSES: return "vision-glasses"; + case VISIONCONTACTS: return "vision-contacts"; + case MEDICALPRIMARYCARE: return "medical-primarycare"; + case PHARMACYDISPENSE: return "pharmacy-dispense"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/benefit-type"; + } + public String getDefinition() { + switch (this) { + case BENEFIT: return "Maximum benefit allowable."; + case DEDUCTIBLE: return "Cost to be incurred before benefits are applied"; + case VISIT: return "Service visit"; + case ROOM: return "Type of room"; + case COPAY: return "Copayment per service"; + case COPAYPERCENT: return "Copayment percentage per service"; + case COPAYMAXIMUM: return "Copayment maximum per service"; + case VISIONEXAM: return "Vision Exam"; + case VISIONGLASSES: return "Frames and lenses"; + case VISIONCONTACTS: return "Contact Lenses"; + case MEDICALPRIMARYCARE: return "Medical Primary Health Coverage"; + case PHARMACYDISPENSE: return "Pharmacy Dispense Coverage"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BENEFIT: return "Benefit"; + case DEDUCTIBLE: return "Deductible"; + case VISIT: return "Visit"; + case ROOM: return "Room"; + case COPAY: return "Copayment per service"; + case COPAYPERCENT: return "Copayment Percent per service"; + case COPAYMAXIMUM: return "Copayment maximum per service"; + case VISIONEXAM: return "Vision Exam"; + case VISIONGLASSES: return "Vision Glasses"; + case VISIONCONTACTS: return "Vision Contacts Coverage"; + case MEDICALPRIMARYCARE: return "Medical Primary Health Coverage"; + case PHARMACYDISPENSE: return "Pharmacy Dispense Coverage"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTypeEnumFactory.java new file mode 100644 index 00000000000..697e2f48992 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitTypeEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BenefitTypeEnumFactory implements EnumFactory { + + public BenefitType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("benefit".equals(codeString)) + return BenefitType.BENEFIT; + if ("deductible".equals(codeString)) + return BenefitType.DEDUCTIBLE; + if ("visit".equals(codeString)) + return BenefitType.VISIT; + if ("room".equals(codeString)) + return BenefitType.ROOM; + if ("copay".equals(codeString)) + return BenefitType.COPAY; + if ("copay-percent".equals(codeString)) + return BenefitType.COPAYPERCENT; + if ("copay-maximum".equals(codeString)) + return BenefitType.COPAYMAXIMUM; + if ("vision-exam".equals(codeString)) + return BenefitType.VISIONEXAM; + if ("vision-glasses".equals(codeString)) + return BenefitType.VISIONGLASSES; + if ("vision-contacts".equals(codeString)) + return BenefitType.VISIONCONTACTS; + if ("medical-primarycare".equals(codeString)) + return BenefitType.MEDICALPRIMARYCARE; + if ("pharmacy-dispense".equals(codeString)) + return BenefitType.PHARMACYDISPENSE; + throw new IllegalArgumentException("Unknown BenefitType code '"+codeString+"'"); + } + + public String toCode(BenefitType code) { + if (code == BenefitType.BENEFIT) + return "benefit"; + if (code == BenefitType.DEDUCTIBLE) + return "deductible"; + if (code == BenefitType.VISIT) + return "visit"; + if (code == BenefitType.ROOM) + return "room"; + if (code == BenefitType.COPAY) + return "copay"; + if (code == BenefitType.COPAYPERCENT) + return "copay-percent"; + if (code == BenefitType.COPAYMAXIMUM) + return "copay-maximum"; + if (code == BenefitType.VISIONEXAM) + return "vision-exam"; + if (code == BenefitType.VISIONGLASSES) + return "vision-glasses"; + if (code == BenefitType.VISIONCONTACTS) + return "vision-contacts"; + if (code == BenefitType.MEDICALPRIMARYCARE) + return "medical-primarycare"; + if (code == BenefitType.PHARMACYDISPENSE) + return "pharmacy-dispense"; + return "?"; + } + + public String toSystem(BenefitType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitUnit.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitUnit.java new file mode 100644 index 00000000000..91140186411 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitUnit.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BenefitUnit { + + /** + * A single individual + */ + INDIVIDUAL, + /** + * A family, typically includes self, spouse(s) and children to a defined age + */ + FAMILY, + /** + * added to help the parsers + */ + NULL; + public static BenefitUnit fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return INDIVIDUAL; + if ("family".equals(codeString)) + return FAMILY; + throw new FHIRException("Unknown BenefitUnit code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INDIVIDUAL: return "individual"; + case FAMILY: return "family"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/benefit-unit"; + } + public String getDefinition() { + switch (this) { + case INDIVIDUAL: return "A single individual"; + case FAMILY: return "A family, typically includes self, spouse(s) and children to a defined age"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INDIVIDUAL: return "Individual"; + case FAMILY: return "Family"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitUnitEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitUnitEnumFactory.java new file mode 100644 index 00000000000..d5829ee4cc5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BenefitUnitEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BenefitUnitEnumFactory implements EnumFactory { + + public BenefitUnit fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return BenefitUnit.INDIVIDUAL; + if ("family".equals(codeString)) + return BenefitUnit.FAMILY; + throw new IllegalArgumentException("Unknown BenefitUnit code '"+codeString+"'"); + } + + public String toCode(BenefitUnit code) { + if (code == BenefitUnit.INDIVIDUAL) + return "individual"; + if (code == BenefitUnit.FAMILY) + return "family"; + return "?"; + } + + public String toSystem(BenefitUnit code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BindingStrength.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BindingStrength.java new file mode 100644 index 00000000000..08b725c0f7b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BindingStrength.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BindingStrength { + + /** + * To be conformant, the concept in this element SHALL be from the specified value set + */ + REQUIRED, + /** + * To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead. + */ + EXTENSIBLE, + /** + * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant. + */ + PREFERRED, + /** + * Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included. + */ + EXAMPLE, + /** + * added to help the parsers + */ + NULL; + public static BindingStrength fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return REQUIRED; + if ("extensible".equals(codeString)) + return EXTENSIBLE; + if ("preferred".equals(codeString)) + return PREFERRED; + if ("example".equals(codeString)) + return EXAMPLE; + throw new FHIRException("Unknown BindingStrength code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUIRED: return "required"; + case EXTENSIBLE: return "extensible"; + case PREFERRED: return "preferred"; + case EXAMPLE: return "example"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/binding-strength"; + } + public String getDefinition() { + switch (this) { + case REQUIRED: return "To be conformant, the concept in this element SHALL be from the specified value set"; + case EXTENSIBLE: return "To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead."; + case PREFERRED: return "Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant."; + case EXAMPLE: return "Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUIRED: return "Required"; + case EXTENSIBLE: return "Extensible"; + case PREFERRED: return "Preferred"; + case EXAMPLE: return "Example"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BindingStrengthEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BindingStrengthEnumFactory.java new file mode 100644 index 00000000000..dffb843b8d3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BindingStrengthEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BindingStrengthEnumFactory implements EnumFactory { + + public BindingStrength fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return BindingStrength.REQUIRED; + if ("extensible".equals(codeString)) + return BindingStrength.EXTENSIBLE; + if ("preferred".equals(codeString)) + return BindingStrength.PREFERRED; + if ("example".equals(codeString)) + return BindingStrength.EXAMPLE; + throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'"); + } + + public String toCode(BindingStrength code) { + if (code == BindingStrength.REQUIRED) + return "required"; + if (code == BindingStrength.EXTENSIBLE) + return "extensible"; + if (code == BindingStrength.PREFERRED) + return "preferred"; + if (code == BindingStrength.EXAMPLE) + return "example"; + return "?"; + } + + public String toSystem(BindingStrength code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BundleType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BundleType.java new file mode 100644 index 00000000000..b8c49945f8e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BundleType.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum BundleType { + + /** + * The bundle is a document. The first resource is a Composition. + */ + DOCUMENT, + /** + * The bundle is a message. The first resource is a MessageHeader. + */ + MESSAGE, + /** + * The bundle is a transaction - intended to be processed by a server as an atomic commit. + */ + TRANSACTION, + /** + * The bundle is a transaction response. Because the response is a transaction response, the transaction has succeeded, and all responses are error free. + */ + TRANSACTIONRESPONSE, + /** + * The bundle is a transaction - intended to be processed by a server as a group of actions. + */ + BATCH, + /** + * The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success. + */ + BATCHRESPONSE, + /** + * The bundle is a list of resources from a history interaction on a server. + */ + HISTORY, + /** + * The bundle is a list of resources returned as a result of a search/query interaction, operation, or message. + */ + SEARCHSET, + /** + * The bundle is a set of resources collected into a single package for ease of distribution. + */ + COLLECTION, + /** + * added to help the parsers + */ + NULL; + public static BundleType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("document".equals(codeString)) + return DOCUMENT; + if ("message".equals(codeString)) + return MESSAGE; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("transaction-response".equals(codeString)) + return TRANSACTIONRESPONSE; + if ("batch".equals(codeString)) + return BATCH; + if ("batch-response".equals(codeString)) + return BATCHRESPONSE; + if ("history".equals(codeString)) + return HISTORY; + if ("searchset".equals(codeString)) + return SEARCHSET; + if ("collection".equals(codeString)) + return COLLECTION; + throw new FHIRException("Unknown BundleType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DOCUMENT: return "document"; + case MESSAGE: return "message"; + case TRANSACTION: return "transaction"; + case TRANSACTIONRESPONSE: return "transaction-response"; + case BATCH: return "batch"; + case BATCHRESPONSE: return "batch-response"; + case HISTORY: return "history"; + case SEARCHSET: return "searchset"; + case COLLECTION: return "collection"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/bundle-type"; + } + public String getDefinition() { + switch (this) { + case DOCUMENT: return "The bundle is a document. The first resource is a Composition."; + case MESSAGE: return "The bundle is a message. The first resource is a MessageHeader."; + case TRANSACTION: return "The bundle is a transaction - intended to be processed by a server as an atomic commit."; + case TRANSACTIONRESPONSE: return "The bundle is a transaction response. Because the response is a transaction response, the transaction has succeeded, and all responses are error free."; + case BATCH: return "The bundle is a transaction - intended to be processed by a server as a group of actions."; + case BATCHRESPONSE: return "The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success."; + case HISTORY: return "The bundle is a list of resources from a history interaction on a server."; + case SEARCHSET: return "The bundle is a list of resources returned as a result of a search/query interaction, operation, or message."; + case COLLECTION: return "The bundle is a set of resources collected into a single package for ease of distribution."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DOCUMENT: return "Document"; + case MESSAGE: return "Message"; + case TRANSACTION: return "Transaction"; + case TRANSACTIONRESPONSE: return "Transaction Response"; + case BATCH: return "Batch"; + case BATCHRESPONSE: return "Batch Response"; + case HISTORY: return "History List"; + case SEARCHSET: return "Search Results"; + case COLLECTION: return "Collection"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BundleTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BundleTypeEnumFactory.java new file mode 100644 index 00000000000..8bcc47a6de9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/BundleTypeEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class BundleTypeEnumFactory implements EnumFactory { + + public BundleType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("document".equals(codeString)) + return BundleType.DOCUMENT; + if ("message".equals(codeString)) + return BundleType.MESSAGE; + if ("transaction".equals(codeString)) + return BundleType.TRANSACTION; + if ("transaction-response".equals(codeString)) + return BundleType.TRANSACTIONRESPONSE; + if ("batch".equals(codeString)) + return BundleType.BATCH; + if ("batch-response".equals(codeString)) + return BundleType.BATCHRESPONSE; + if ("history".equals(codeString)) + return BundleType.HISTORY; + if ("searchset".equals(codeString)) + return BundleType.SEARCHSET; + if ("collection".equals(codeString)) + return BundleType.COLLECTION; + throw new IllegalArgumentException("Unknown BundleType code '"+codeString+"'"); + } + + public String toCode(BundleType code) { + if (code == BundleType.DOCUMENT) + return "document"; + if (code == BundleType.MESSAGE) + return "message"; + if (code == BundleType.TRANSACTION) + return "transaction"; + if (code == BundleType.TRANSACTIONRESPONSE) + return "transaction-response"; + if (code == BundleType.BATCH) + return "batch"; + if (code == BundleType.BATCHRESPONSE) + return "batch-response"; + if (code == BundleType.HISTORY) + return "history"; + if (code == BundleType.SEARCHSET) + return "searchset"; + if (code == BundleType.COLLECTION) + return "collection"; + return "?"; + } + + public String toSystem(BundleType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CapabilityStatementKind.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CapabilityStatementKind.java new file mode 100644 index 00000000000..cb3504198d1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CapabilityStatementKind.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CapabilityStatementKind { + + /** + * The CapabilityStatement instance represents the present capabilities of a specific system instance. This is the kind returned by OPTIONS for a FHIR server end-point. + */ + INSTANCE, + /** + * The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation. + */ + CAPABILITY, + /** + * The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'. + */ + REQUIREMENTS, + /** + * added to help the parsers + */ + NULL; + public static CapabilityStatementKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("capability".equals(codeString)) + return CAPABILITY; + if ("requirements".equals(codeString)) + return REQUIREMENTS; + throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case CAPABILITY: return "capability"; + case REQUIREMENTS: return "requirements"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/capability-statement-kind"; + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The CapabilityStatement instance represents the present capabilities of a specific system instance. This is the kind returned by OPTIONS for a FHIR server end-point."; + case CAPABILITY: return "The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation."; + case REQUIREMENTS: return "The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case CAPABILITY: return "Capability"; + case REQUIREMENTS: return "Requirements"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CapabilityStatementKindEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CapabilityStatementKindEnumFactory.java new file mode 100644 index 00000000000..2d22ec6880a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CapabilityStatementKindEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CapabilityStatementKindEnumFactory implements EnumFactory { + + public CapabilityStatementKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return CapabilityStatementKind.INSTANCE; + if ("capability".equals(codeString)) + return CapabilityStatementKind.CAPABILITY; + if ("requirements".equals(codeString)) + return CapabilityStatementKind.REQUIREMENTS; + throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'"); + } + + public String toCode(CapabilityStatementKind code) { + if (code == CapabilityStatementKind.INSTANCE) + return "instance"; + if (code == CapabilityStatementKind.CAPABILITY) + return "capability"; + if (code == CapabilityStatementKind.REQUIREMENTS) + return "requirements"; + return "?"; + } + + public String toSystem(CapabilityStatementKind code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityCategory.java new file mode 100644 index 00000000000..0fc7e252df2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityCategory.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Mon, Jul 31, 2017 18:51-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CarePlanActivityCategory { + + /** + * Plan for the patient to consume food of a specified nature + */ + DIET, + /** + * Plan for the patient to consume/receive a drug, vaccine or other product + */ + DRUG, + /** + * Plan to meet or communicate with the patient (in-patient, out-patient, phone call, etc.) + */ + ENCOUNTER, + /** + * Plan to capture information about a patient (vitals, labs, diagnostic images, etc.) + */ + OBSERVATION, + /** + * Plan to modify the patient in some way (surgery, physiotherapy, education, counseling, etc.) + */ + PROCEDURE, + /** + * Plan to provide something to the patient (medication, medical supply, etc.) + */ + SUPPLY, + /** + * Some other form of action + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static CarePlanActivityCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return DIET; + if ("drug".equals(codeString)) + return DRUG; + if ("encounter".equals(codeString)) + return ENCOUNTER; + if ("observation".equals(codeString)) + return OBSERVATION; + if ("procedure".equals(codeString)) + return PROCEDURE; + if ("supply".equals(codeString)) + return SUPPLY; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown CarePlanActivityCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIET: return "diet"; + case DRUG: return "drug"; + case ENCOUNTER: return "encounter"; + case OBSERVATION: return "observation"; + case PROCEDURE: return "procedure"; + case SUPPLY: return "supply"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-plan-activity-category"; + } + public String getDefinition() { + switch (this) { + case DIET: return "Plan for the patient to consume food of a specified nature"; + case DRUG: return "Plan for the patient to consume/receive a drug, vaccine or other product"; + case ENCOUNTER: return "Plan to meet or communicate with the patient (in-patient, out-patient, phone call, etc.)"; + case OBSERVATION: return "Plan to capture information about a patient (vitals, labs, diagnostic images, etc.)"; + case PROCEDURE: return "Plan to modify the patient in some way (surgery, physiotherapy, education, counseling, etc.)"; + case SUPPLY: return "Plan to provide something to the patient (medication, medical supply, etc.)"; + case OTHER: return "Some other form of action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIET: return "Diet"; + case DRUG: return "Drug"; + case ENCOUNTER: return "Encounter"; + case OBSERVATION: return "Observation"; + case PROCEDURE: return "Procedure"; + case SUPPLY: return "Supply"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityCategoryEnumFactory.java new file mode 100644 index 00000000000..3eca2cc3e88 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityCategoryEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Mon, Jul 31, 2017 18:51-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CarePlanActivityCategoryEnumFactory implements EnumFactory { + + public CarePlanActivityCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return CarePlanActivityCategory.DIET; + if ("drug".equals(codeString)) + return CarePlanActivityCategory.DRUG; + if ("encounter".equals(codeString)) + return CarePlanActivityCategory.ENCOUNTER; + if ("observation".equals(codeString)) + return CarePlanActivityCategory.OBSERVATION; + if ("procedure".equals(codeString)) + return CarePlanActivityCategory.PROCEDURE; + if ("supply".equals(codeString)) + return CarePlanActivityCategory.SUPPLY; + if ("other".equals(codeString)) + return CarePlanActivityCategory.OTHER; + throw new IllegalArgumentException("Unknown CarePlanActivityCategory code '"+codeString+"'"); + } + + public String toCode(CarePlanActivityCategory code) { + if (code == CarePlanActivityCategory.DIET) + return "diet"; + if (code == CarePlanActivityCategory.DRUG) + return "drug"; + if (code == CarePlanActivityCategory.ENCOUNTER) + return "encounter"; + if (code == CarePlanActivityCategory.OBSERVATION) + return "observation"; + if (code == CarePlanActivityCategory.PROCEDURE) + return "procedure"; + if (code == CarePlanActivityCategory.SUPPLY) + return "supply"; + if (code == CarePlanActivityCategory.OTHER) + return "other"; + return "?"; + } + + public String toSystem(CarePlanActivityCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityStatus.java new file mode 100644 index 00000000000..5c7f1e1e8a6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityStatus.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CarePlanActivityStatus { + + /** + * Activity is planned but no action has yet been taken. + */ + NOTSTARTED, + /** + * Appointment or other booking has occurred but activity has not yet begun. + */ + SCHEDULED, + /** + * Activity has been started but is not yet complete. + */ + INPROGRESS, + /** + * Activity was started but has temporarily ceased with an expectation of resumption at a future time. + */ + ONHOLD, + /** + * The activity has been completed (more or less) as planned. + */ + COMPLETED, + /** + * The planned activity has been withdrawn. + */ + CANCELLED, + /** + * The planned activity has been ended prior to completion after the activity was started. + */ + STOPPED, + /** + * The current state of the activity is not known. Note: This concept is not to be used for "other". + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static CarePlanActivityStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-started".equals(codeString)) + return NOTSTARTED; + if ("scheduled".equals(codeString)) + return SCHEDULED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("stopped".equals(codeString)) + return STOPPED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSTARTED: return "not-started"; + case SCHEDULED: return "scheduled"; + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case CANCELLED: return "cancelled"; + case STOPPED: return "stopped"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-plan-activity-status"; + } + public String getDefinition() { + switch (this) { + case NOTSTARTED: return "Activity is planned but no action has yet been taken."; + case SCHEDULED: return "Appointment or other booking has occurred but activity has not yet begun."; + case INPROGRESS: return "Activity has been started but is not yet complete."; + case ONHOLD: return "Activity was started but has temporarily ceased with an expectation of resumption at a future time."; + case COMPLETED: return "The activity has been completed (more or less) as planned."; + case CANCELLED: return "The planned activity has been withdrawn."; + case STOPPED: return "The planned activity has been ended prior to completion after the activity was started."; + case UNKNOWN: return "The current state of the activity is not known. Note: This concept is not to be used for \"other\"."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSTARTED: return "Not Started"; + case SCHEDULED: return "Scheduled"; + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case CANCELLED: return "Cancelled"; + case STOPPED: return "Stopped"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityStatusEnumFactory.java new file mode 100644 index 00000000000..5324e6cfcb9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanActivityStatusEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CarePlanActivityStatusEnumFactory implements EnumFactory { + + public CarePlanActivityStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-started".equals(codeString)) + return CarePlanActivityStatus.NOTSTARTED; + if ("scheduled".equals(codeString)) + return CarePlanActivityStatus.SCHEDULED; + if ("in-progress".equals(codeString)) + return CarePlanActivityStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return CarePlanActivityStatus.ONHOLD; + if ("completed".equals(codeString)) + return CarePlanActivityStatus.COMPLETED; + if ("cancelled".equals(codeString)) + return CarePlanActivityStatus.CANCELLED; + if ("stopped".equals(codeString)) + return CarePlanActivityStatus.STOPPED; + if ("unknown".equals(codeString)) + return CarePlanActivityStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown CarePlanActivityStatus code '"+codeString+"'"); + } + + public String toCode(CarePlanActivityStatus code) { + if (code == CarePlanActivityStatus.NOTSTARTED) + return "not-started"; + if (code == CarePlanActivityStatus.SCHEDULED) + return "scheduled"; + if (code == CarePlanActivityStatus.INPROGRESS) + return "in-progress"; + if (code == CarePlanActivityStatus.ONHOLD) + return "on-hold"; + if (code == CarePlanActivityStatus.COMPLETED) + return "completed"; + if (code == CarePlanActivityStatus.CANCELLED) + return "cancelled"; + if (code == CarePlanActivityStatus.STOPPED) + return "stopped"; + if (code == CarePlanActivityStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(CarePlanActivityStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanIntent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanIntent.java new file mode 100644 index 00000000000..45f240bdf0f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanIntent.java @@ -0,0 +1,107 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CarePlanIntent { + + /** + * The care plan is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act + */ + PROPOSAL, + /** + * The care plan represents an intention to ensure something occurs without providing an authorization for others to act + */ + PLAN, + /** + * The care plan represents a request/demand and authorization for action + */ + ORDER, + /** + * The care plan represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. + +Refer to [[[RequestGroup]]] for additional information on how this status is used + */ + OPTION, + /** + * added to help the parsers + */ + NULL; + public static CarePlanIntent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return PROPOSAL; + if ("plan".equals(codeString)) + return PLAN; + if ("order".equals(codeString)) + return ORDER; + if ("option".equals(codeString)) + return OPTION; + throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSAL: return "proposal"; + case PLAN: return "plan"; + case ORDER: return "order"; + case OPTION: return "option"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-plan-intent"; + } + public String getDefinition() { + switch (this) { + case PROPOSAL: return "The care plan is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act"; + case PLAN: return "The care plan represents an intention to ensure something occurs without providing an authorization for others to act"; + case ORDER: return "The care plan represents a request/demand and authorization for action"; + case OPTION: return "The care plan represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.\n\nRefer to [[[RequestGroup]]] for additional information on how this status is used"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSAL: return "Proposal"; + case PLAN: return "Plan"; + case ORDER: return "Order"; + case OPTION: return "Option"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanIntentEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanIntentEnumFactory.java new file mode 100644 index 00000000000..1f3997e34aa --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanIntentEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CarePlanIntentEnumFactory implements EnumFactory { + + public CarePlanIntent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return CarePlanIntent.PROPOSAL; + if ("plan".equals(codeString)) + return CarePlanIntent.PLAN; + if ("order".equals(codeString)) + return CarePlanIntent.ORDER; + if ("option".equals(codeString)) + return CarePlanIntent.OPTION; + throw new IllegalArgumentException("Unknown CarePlanIntent code '"+codeString+"'"); + } + + public String toCode(CarePlanIntent code) { + if (code == CarePlanIntent.PROPOSAL) + return "proposal"; + if (code == CarePlanIntent.PLAN) + return "plan"; + if (code == CarePlanIntent.ORDER) + return "order"; + if (code == CarePlanIntent.OPTION) + return "option"; + return "?"; + } + + public String toSystem(CarePlanIntent code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanStatus.java new file mode 100644 index 00000000000..448b5b069ad --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CarePlanStatus { + + /** + * The plan is in development or awaiting use but is not yet intended to be acted upon. + */ + DRAFT, + /** + * The plan is intended to be followed and used as part of patient care. + */ + ACTIVE, + /** + * The plan has been temporarily stopped but is expected to resume in the future. + */ + SUSPENDED, + /** + * The plan is no longer in use and is not expected to be followed or used in patient care. + */ + COMPLETED, + /** + * The plan was entered in error and voided. + */ + ENTEREDINERROR, + /** + * The plan has been terminated prior to reaching completion (though it may have been replaced by a new plan). + */ + CANCELLED, + /** + * The authoring system doesn't know the current state of the care plan. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static CarePlanStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown CarePlanStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case CANCELLED: return "cancelled"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-plan-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The plan is in development or awaiting use but is not yet intended to be acted upon."; + case ACTIVE: return "The plan is intended to be followed and used as part of patient care."; + case SUSPENDED: return "The plan has been temporarily stopped but is expected to resume in the future."; + case COMPLETED: return "The plan is no longer in use and is not expected to be followed or used in patient care."; + case ENTEREDINERROR: return "The plan was entered in error and voided."; + case CANCELLED: return "The plan has been terminated prior to reaching completion (though it may have been replaced by a new plan)."; + case UNKNOWN: return "The authoring system doesn't know the current state of the care plan."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Pending"; + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered In Error"; + case CANCELLED: return "Cancelled"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanStatusEnumFactory.java new file mode 100644 index 00000000000..12a36069523 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CarePlanStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CarePlanStatusEnumFactory implements EnumFactory { + + public CarePlanStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return CarePlanStatus.DRAFT; + if ("active".equals(codeString)) + return CarePlanStatus.ACTIVE; + if ("suspended".equals(codeString)) + return CarePlanStatus.SUSPENDED; + if ("completed".equals(codeString)) + return CarePlanStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return CarePlanStatus.ENTEREDINERROR; + if ("cancelled".equals(codeString)) + return CarePlanStatus.CANCELLED; + if ("unknown".equals(codeString)) + return CarePlanStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown CarePlanStatus code '"+codeString+"'"); + } + + public String toCode(CarePlanStatus code) { + if (code == CarePlanStatus.DRAFT) + return "draft"; + if (code == CarePlanStatus.ACTIVE) + return "active"; + if (code == CarePlanStatus.SUSPENDED) + return "suspended"; + if (code == CarePlanStatus.COMPLETED) + return "completed"; + if (code == CarePlanStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == CarePlanStatus.CANCELLED) + return "cancelled"; + if (code == CarePlanStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(CarePlanStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamCategory.java new file mode 100644 index 00000000000..6c84b88e112 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamCategory.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CareTeamCategory { + + /** + * This type of team focuses on one specific type of incident, which is non-patient specific. The incident is determined by the context of use. For example, code team (code red, code blue, medical emergency treatment) or the PICC line team. + */ + EVENT, + /** + * This type of team focuses on one specific encounter. The encounter is determined by the context of use. For example, during an inpatient encounter, the nutrition support care team + */ + ENCOUNTER, + /** + * This type of team focuses on one specific episode of care with a defined time period or self-limiting process (e.g. 10 visits). The episode of care is determined by the context of use. For example, a maternity care team over 9 months. + */ + EPISODE, + /** + * This type of team focuses on overall care coordination managing one or more conditions across the continuum of care ensuring there are smooth transitions of care. The members of the team are determined or selected by an individual or organization. When determined by an organization, the team may be assigned or based on the person's enrollment in a particular program. For example, disease management team or patient centered medical home team. + */ + LONGITUDINAL, + /** + * This type of team focuses on one specific condition. The condition is determined by the context of use. For example, a disease management team focused on one condition (e.g. diabetes). + */ + CONDITION, + /** + * This type of team is responsible for establishing, conducting, coordinating and monitoring the outcomes of clinical trials. The team focuses on research, clinical care and education. + */ + CLINICALRESEARCH, + /** + * added to help the parsers + */ + NULL; + public static CareTeamCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("event".equals(codeString)) + return EVENT; + if ("encounter".equals(codeString)) + return ENCOUNTER; + if ("episode".equals(codeString)) + return EPISODE; + if ("longitudinal".equals(codeString)) + return LONGITUDINAL; + if ("condition".equals(codeString)) + return CONDITION; + if ("clinical-research".equals(codeString)) + return CLINICALRESEARCH; + throw new FHIRException("Unknown CareTeamCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EVENT: return "event"; + case ENCOUNTER: return "encounter"; + case EPISODE: return "episode"; + case LONGITUDINAL: return "longitudinal"; + case CONDITION: return "condition"; + case CLINICALRESEARCH: return "clinical-research"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-team-category"; + } + public String getDefinition() { + switch (this) { + case EVENT: return "This type of team focuses on one specific type of incident, which is non-patient specific. The incident is determined by the context of use. For example, code team (code red, code blue, medical emergency treatment) or the PICC line team."; + case ENCOUNTER: return "This type of team focuses on one specific encounter. The encounter is determined by the context of use. For example, during an inpatient encounter, the nutrition support care team"; + case EPISODE: return "This type of team focuses on one specific episode of care with a defined time period or self-limiting process (e.g. 10 visits). The episode of care is determined by the context of use. For example, a maternity care team over 9 months."; + case LONGITUDINAL: return "This type of team focuses on overall care coordination managing one or more conditions across the continuum of care ensuring there are smooth transitions of care. The members of the team are determined or selected by an individual or organization. When determined by an organization, the team may be assigned or based on the person's enrollment in a particular program. For example, disease management team or patient centered medical home team."; + case CONDITION: return "This type of team focuses on one specific condition. The condition is determined by the context of use. For example, a disease management team focused on one condition (e.g. diabetes)."; + case CLINICALRESEARCH: return "This type of team is responsible for establishing, conducting, coordinating and monitoring the outcomes of clinical trials. The team focuses on research, clinical care and education."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EVENT: return "Event"; + case ENCOUNTER: return "Encounter"; + case EPISODE: return "Episode"; + case LONGITUDINAL: return "Longitudinal Care Coordination"; + case CONDITION: return "Condition"; + case CLINICALRESEARCH: return "Clinical Research"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamCategoryEnumFactory.java new file mode 100644 index 00000000000..68daaf7779d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamCategoryEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CareTeamCategoryEnumFactory implements EnumFactory { + + public CareTeamCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("event".equals(codeString)) + return CareTeamCategory.EVENT; + if ("encounter".equals(codeString)) + return CareTeamCategory.ENCOUNTER; + if ("episode".equals(codeString)) + return CareTeamCategory.EPISODE; + if ("longitudinal".equals(codeString)) + return CareTeamCategory.LONGITUDINAL; + if ("condition".equals(codeString)) + return CareTeamCategory.CONDITION; + if ("clinical-research".equals(codeString)) + return CareTeamCategory.CLINICALRESEARCH; + throw new IllegalArgumentException("Unknown CareTeamCategory code '"+codeString+"'"); + } + + public String toCode(CareTeamCategory code) { + if (code == CareTeamCategory.EVENT) + return "event"; + if (code == CareTeamCategory.ENCOUNTER) + return "encounter"; + if (code == CareTeamCategory.EPISODE) + return "episode"; + if (code == CareTeamCategory.LONGITUDINAL) + return "longitudinal"; + if (code == CareTeamCategory.CONDITION) + return "condition"; + if (code == CareTeamCategory.CLINICALRESEARCH) + return "clinical-research"; + return "?"; + } + + public String toSystem(CareTeamCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamStatus.java new file mode 100644 index 00000000000..5ca22a06790 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamStatus.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CareTeamStatus { + + /** + * The care team has been drafted and proposed, but not yet participating in the coordination and delivery of care. + */ + PROPOSED, + /** + * The care team is currently participating in the coordination and delivery of care. + */ + ACTIVE, + /** + * The care team is temporarily on hold or suspended and not participating in the coordination and delivery of care. + */ + SUSPENDED, + /** + * The care team was, but is no longer, participating in the coordination and delivery of care. + */ + INACTIVE, + /** + * The care team should have never existed. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static CareTeamStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown CareTeamStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/care-team-status"; + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The care team has been drafted and proposed, but not yet participating in the coordination and delivery of care."; + case ACTIVE: return "The care team is currently participating in the coordination and delivery of care."; + case SUSPENDED: return "The care team is temporarily on hold or suspended and not participating in the coordination and delivery of care."; + case INACTIVE: return "The care team was, but is no longer, participating in the coordination and delivery of care."; + case ENTEREDINERROR: return "The care team should have never existed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamStatusEnumFactory.java new file mode 100644 index 00000000000..e28c46cd0ab --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CareTeamStatusEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CareTeamStatusEnumFactory implements EnumFactory { + + public CareTeamStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return CareTeamStatus.PROPOSED; + if ("active".equals(codeString)) + return CareTeamStatus.ACTIVE; + if ("suspended".equals(codeString)) + return CareTeamStatus.SUSPENDED; + if ("inactive".equals(codeString)) + return CareTeamStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return CareTeamStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown CareTeamStatus code '"+codeString+"'"); + } + + public String toCode(CareTeamStatus code) { + if (code == CareTeamStatus.PROPOSED) + return "proposed"; + if (code == CareTeamStatus.ACTIVE) + return "active"; + if (code == CareTeamStatus.SUSPENDED) + return "suspended"; + if (code == CareTeamStatus.INACTIVE) + return "inactive"; + if (code == CareTeamStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(CareTeamStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemBillingcodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemBillingcodes.java new file mode 100644 index 00000000000..63024dfa92b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemBillingcodes.java @@ -0,0 +1,99 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ChargeitemBillingcodes { + + /** + * From German EBM billing system: +Unvorhergesehene Inanspruchnahme des Vertragsarztes durch einen Patienten;zwischen 19:00 und 22:00 Uhr;an Samstagen, Sonntagen und gesetzlichen Feiertagen, am 24.12. und 31.12. zwischen 07:00 und 19:00 Uhr + */ + _1100, + /** + * From German EBM billing system: +Notfallpauschale im organisierten Not(-fall)dienst und für nicht an der vertragsärztlichen Versorgung teilnehmende Ärzte, Institute und Krankenhäuser bei Inanspruchnahme;zwischen 07:00 und 19:00 Uhr + */ + _1210, + /** + * From German EBM billing system: +Grundpauschale für Ärzte, Institute und Krankenhäuser, die zur Erbringung von Leistungen innerhalb mindestens eines der Fachgebiete Anästhesiologie, Frauenheilkunde und Geburtshilfe, Haut- und Geschlechtskrankheiten, Mund-, Kiefer- und Gesichtschirurgie und Humangenetik ermächtigt sind + */ + _1320, + /** + * added to help the parsers + */ + NULL; + public static ChargeitemBillingcodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1100".equals(codeString)) + return _1100; + if ("1210".equals(codeString)) + return _1210; + if ("1320".equals(codeString)) + return _1320; + throw new FHIRException("Unknown ChargeitemBillingcodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1100: return "1100"; + case _1210: return "1210"; + case _1320: return "1320"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/chargeitem-billingcodes"; + } + public String getDefinition() { + switch (this) { + case _1100: return "From German EBM billing system:\nUnvorhergesehene Inanspruchnahme des Vertragsarztes durch einen Patienten;zwischen 19:00 und 22:00 Uhr;an Samstagen, Sonntagen und gesetzlichen Feiertagen, am 24.12. und 31.12. zwischen 07:00 und 19:00 Uhr"; + case _1210: return "From German EBM billing system:\nNotfallpauschale im organisierten Not(-fall)dienst und für nicht an der vertragsärztlichen Versorgung teilnehmende Ärzte, Institute und Krankenhäuser bei Inanspruchnahme;zwischen 07:00 und 19:00 Uhr"; + case _1320: return "From German EBM billing system:\nGrundpauschale für Ärzte, Institute und Krankenhäuser, die zur Erbringung von Leistungen innerhalb mindestens eines der Fachgebiete Anästhesiologie, Frauenheilkunde und Geburtshilfe, Haut- und Geschlechtskrankheiten, Mund-, Kiefer- und Gesichtschirurgie und Humangenetik ermächtigt sind"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1100: return "Unvorhergesehene Inanspruchnahme"; + case _1210: return "Notfallpauschale"; + case _1320: return "Grundpauschale"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemBillingcodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemBillingcodesEnumFactory.java new file mode 100644 index 00000000000..ad16be08b84 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemBillingcodesEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ChargeitemBillingcodesEnumFactory implements EnumFactory { + + public ChargeitemBillingcodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1100".equals(codeString)) + return ChargeitemBillingcodes._1100; + if ("1210".equals(codeString)) + return ChargeitemBillingcodes._1210; + if ("1320".equals(codeString)) + return ChargeitemBillingcodes._1320; + throw new IllegalArgumentException("Unknown ChargeitemBillingcodes code '"+codeString+"'"); + } + + public String toCode(ChargeitemBillingcodes code) { + if (code == ChargeitemBillingcodes._1100) + return "1100"; + if (code == ChargeitemBillingcodes._1210) + return "1210"; + if (code == ChargeitemBillingcodes._1320) + return "1320"; + return "?"; + } + + public String toSystem(ChargeitemBillingcodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemStatus.java new file mode 100644 index 00000000000..d741908c408 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ChargeitemStatus { + + /** + * The charge item has been entered, but the charged service is not yet complete, so it shall not be billed yet but might be used in the context of pre-authorization + */ + PLANNED, + /** + * The charge item is ready for billing + */ + BILLABLE, + /** + * The charge item has been determined to be not billable (e.g. due to rules associated with the billing code) + */ + NOTBILLABLE, + /** + * The processing of the charge was aborted + */ + ABORTED, + /** + * The charge item has been billed (e.g. a billing engine has generated financial transactions by applying the associated ruled for the charge item to the context of the Encounter, and placed them into Claims/Invoices + */ + BILLED, + /** + * The charge item has been entered in error and should not be processed for billing + */ + ENTEREDINERROR, + /** + * The authoring system does not know which of the status values currently applies for this charge item Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ChargeitemStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("billable".equals(codeString)) + return BILLABLE; + if ("not-billable".equals(codeString)) + return NOTBILLABLE; + if ("aborted".equals(codeString)) + return ABORTED; + if ("billed".equals(codeString)) + return BILLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ChargeitemStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case BILLABLE: return "billable"; + case NOTBILLABLE: return "not-billable"; + case ABORTED: return "aborted"; + case BILLED: return "billed"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/chargeitem-status"; + } + public String getDefinition() { + switch (this) { + case PLANNED: return "The charge item has been entered, but the charged service is not yet complete, so it shall not be billed yet but might be used in the context of pre-authorization"; + case BILLABLE: return "The charge item is ready for billing"; + case NOTBILLABLE: return "The charge item has been determined to be not billable (e.g. due to rules associated with the billing code)"; + case ABORTED: return "The processing of the charge was aborted"; + case BILLED: return "The charge item has been billed (e.g. a billing engine has generated financial transactions by applying the associated ruled for the charge item to the context of the Encounter, and placed them into Claims/Invoices"; + case ENTEREDINERROR: return "The charge item has been entered in error and should not be processed for billing"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this charge item Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case BILLABLE: return "Billable"; + case NOTBILLABLE: return "Not billable"; + case ABORTED: return "Aborted"; + case BILLED: return "Billed"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemStatusEnumFactory.java new file mode 100644 index 00000000000..9bb5fdd8dd7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChargeitemStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ChargeitemStatusEnumFactory implements EnumFactory { + + public ChargeitemStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return ChargeitemStatus.PLANNED; + if ("billable".equals(codeString)) + return ChargeitemStatus.BILLABLE; + if ("not-billable".equals(codeString)) + return ChargeitemStatus.NOTBILLABLE; + if ("aborted".equals(codeString)) + return ChargeitemStatus.ABORTED; + if ("billed".equals(codeString)) + return ChargeitemStatus.BILLED; + if ("entered-in-error".equals(codeString)) + return ChargeitemStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return ChargeitemStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown ChargeitemStatus code '"+codeString+"'"); + } + + public String toCode(ChargeitemStatus code) { + if (code == ChargeitemStatus.PLANNED) + return "planned"; + if (code == ChargeitemStatus.BILLABLE) + return "billable"; + if (code == ChargeitemStatus.NOTBILLABLE) + return "not-billable"; + if (code == ChargeitemStatus.ABORTED) + return "aborted"; + if (code == ChargeitemStatus.BILLED) + return "billed"; + if (code == ChargeitemStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == ChargeitemStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(ChargeitemStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChoiceListOrientation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChoiceListOrientation.java new file mode 100644 index 00000000000..9d1cd2b5843 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChoiceListOrientation.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ChoiceListOrientation { + + /** + * List choices along the horizontal axis + */ + HORIZONTAL, + /** + * List choices down the vertical axis + */ + VERTICAL, + /** + * added to help the parsers + */ + NULL; + public static ChoiceListOrientation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("horizontal".equals(codeString)) + return HORIZONTAL; + if ("vertical".equals(codeString)) + return VERTICAL; + throw new FHIRException("Unknown ChoiceListOrientation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HORIZONTAL: return "horizontal"; + case VERTICAL: return "vertical"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/choice-list-orientation"; + } + public String getDefinition() { + switch (this) { + case HORIZONTAL: return "List choices along the horizontal axis"; + case VERTICAL: return "List choices down the vertical axis"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HORIZONTAL: return "Horizontal"; + case VERTICAL: return "Vertical"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChoiceListOrientationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChoiceListOrientationEnumFactory.java new file mode 100644 index 00000000000..d2fec6832b9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChoiceListOrientationEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ChoiceListOrientationEnumFactory implements EnumFactory { + + public ChoiceListOrientation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("horizontal".equals(codeString)) + return ChoiceListOrientation.HORIZONTAL; + if ("vertical".equals(codeString)) + return ChoiceListOrientation.VERTICAL; + throw new IllegalArgumentException("Unknown ChoiceListOrientation code '"+codeString+"'"); + } + + public String toCode(ChoiceListOrientation code) { + if (code == ChoiceListOrientation.HORIZONTAL) + return "horizontal"; + if (code == ChoiceListOrientation.VERTICAL) + return "vertical"; + return "?"; + } + + public String toSystem(ChoiceListOrientation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChromosomeHuman.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChromosomeHuman.java new file mode 100644 index 00000000000..b82119eba6f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChromosomeHuman.java @@ -0,0 +1,285 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ChromosomeHuman { + + /** + * chromosome 1 + */ + _1, + /** + * chromosome 2 + */ + _2, + /** + * chromosome 3 + */ + _3, + /** + * chromosome 4 + */ + _4, + /** + * chromosome 5 + */ + _5, + /** + * chromosome 6 + */ + _6, + /** + * chromosome 7 + */ + _7, + /** + * chromosome 8 + */ + _8, + /** + * chromosome 9 + */ + _9, + /** + * chromosome 10 + */ + _10, + /** + * chromosome 11 + */ + _11, + /** + * chromosome 12 + */ + _12, + /** + * chromosome 13 + */ + _13, + /** + * chromosome 14 + */ + _14, + /** + * chromosome 15 + */ + _15, + /** + * chromosome 16 + */ + _16, + /** + * chromosome 17 + */ + _17, + /** + * chromosome 18 + */ + _18, + /** + * chromosome 19 + */ + _19, + /** + * chromosome 20 + */ + _20, + /** + * chromosome 21 + */ + _21, + /** + * chromosome 22 + */ + _22, + /** + * chromosome X + */ + X, + /** + * chromosome Y + */ + Y, + /** + * added to help the parsers + */ + NULL; + public static ChromosomeHuman fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("19".equals(codeString)) + return _19; + if ("20".equals(codeString)) + return _20; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("X".equals(codeString)) + return X; + if ("Y".equals(codeString)) + return Y; + throw new FHIRException("Unknown ChromosomeHuman code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _19: return "19"; + case _20: return "20"; + case _21: return "21"; + case _22: return "22"; + case X: return "X"; + case Y: return "Y"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/chromosome-human"; + } + public String getDefinition() { + switch (this) { + case _1: return "chromosome 1"; + case _2: return "chromosome 2"; + case _3: return "chromosome 3"; + case _4: return "chromosome 4"; + case _5: return "chromosome 5"; + case _6: return "chromosome 6"; + case _7: return "chromosome 7"; + case _8: return "chromosome 8"; + case _9: return "chromosome 9"; + case _10: return "chromosome 10"; + case _11: return "chromosome 11"; + case _12: return "chromosome 12"; + case _13: return "chromosome 13"; + case _14: return "chromosome 14"; + case _15: return "chromosome 15"; + case _16: return "chromosome 16"; + case _17: return "chromosome 17"; + case _18: return "chromosome 18"; + case _19: return "chromosome 19"; + case _20: return "chromosome 20"; + case _21: return "chromosome 21"; + case _22: return "chromosome 22"; + case X: return "chromosome X"; + case Y: return "chromosome Y"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "chromosome 1"; + case _2: return "chromosome 2"; + case _3: return "chromosome 3"; + case _4: return "chromosome 4"; + case _5: return "chromosome 5"; + case _6: return "chromosome 6"; + case _7: return "chromosome 7"; + case _8: return "chromosome 8"; + case _9: return "chromosome 9"; + case _10: return "chromosome 10"; + case _11: return "chromosome 11"; + case _12: return "chromosome 12"; + case _13: return "chromosome 13"; + case _14: return "chromosome 14"; + case _15: return "chromosome 15"; + case _16: return "chromosome 16"; + case _17: return "chromosome 17"; + case _18: return "chromosome 18"; + case _19: return "chromosome 19"; + case _20: return "chromosome 20"; + case _21: return "chromosome 21"; + case _22: return "chromosome 22"; + case X: return "chromosome X"; + case Y: return "chromosome Y"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChromosomeHumanEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChromosomeHumanEnumFactory.java new file mode 100644 index 00000000000..9bf9e420703 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ChromosomeHumanEnumFactory.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ChromosomeHumanEnumFactory implements EnumFactory { + + public ChromosomeHuman fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ChromosomeHuman._1; + if ("2".equals(codeString)) + return ChromosomeHuman._2; + if ("3".equals(codeString)) + return ChromosomeHuman._3; + if ("4".equals(codeString)) + return ChromosomeHuman._4; + if ("5".equals(codeString)) + return ChromosomeHuman._5; + if ("6".equals(codeString)) + return ChromosomeHuman._6; + if ("7".equals(codeString)) + return ChromosomeHuman._7; + if ("8".equals(codeString)) + return ChromosomeHuman._8; + if ("9".equals(codeString)) + return ChromosomeHuman._9; + if ("10".equals(codeString)) + return ChromosomeHuman._10; + if ("11".equals(codeString)) + return ChromosomeHuman._11; + if ("12".equals(codeString)) + return ChromosomeHuman._12; + if ("13".equals(codeString)) + return ChromosomeHuman._13; + if ("14".equals(codeString)) + return ChromosomeHuman._14; + if ("15".equals(codeString)) + return ChromosomeHuman._15; + if ("16".equals(codeString)) + return ChromosomeHuman._16; + if ("17".equals(codeString)) + return ChromosomeHuman._17; + if ("18".equals(codeString)) + return ChromosomeHuman._18; + if ("19".equals(codeString)) + return ChromosomeHuman._19; + if ("20".equals(codeString)) + return ChromosomeHuman._20; + if ("21".equals(codeString)) + return ChromosomeHuman._21; + if ("22".equals(codeString)) + return ChromosomeHuman._22; + if ("X".equals(codeString)) + return ChromosomeHuman.X; + if ("Y".equals(codeString)) + return ChromosomeHuman.Y; + throw new IllegalArgumentException("Unknown ChromosomeHuman code '"+codeString+"'"); + } + + public String toCode(ChromosomeHuman code) { + if (code == ChromosomeHuman._1) + return "1"; + if (code == ChromosomeHuman._2) + return "2"; + if (code == ChromosomeHuman._3) + return "3"; + if (code == ChromosomeHuman._4) + return "4"; + if (code == ChromosomeHuman._5) + return "5"; + if (code == ChromosomeHuman._6) + return "6"; + if (code == ChromosomeHuman._7) + return "7"; + if (code == ChromosomeHuman._8) + return "8"; + if (code == ChromosomeHuman._9) + return "9"; + if (code == ChromosomeHuman._10) + return "10"; + if (code == ChromosomeHuman._11) + return "11"; + if (code == ChromosomeHuman._12) + return "12"; + if (code == ChromosomeHuman._13) + return "13"; + if (code == ChromosomeHuman._14) + return "14"; + if (code == ChromosomeHuman._15) + return "15"; + if (code == ChromosomeHuman._16) + return "16"; + if (code == ChromosomeHuman._17) + return "17"; + if (code == ChromosomeHuman._18) + return "18"; + if (code == ChromosomeHuman._19) + return "19"; + if (code == ChromosomeHuman._20) + return "20"; + if (code == ChromosomeHuman._21) + return "21"; + if (code == ChromosomeHuman._22) + return "22"; + if (code == ChromosomeHuman.X) + return "X"; + if (code == ChromosomeHuman.Y) + return "Y"; + return "?"; + } + + public String toSystem(ChromosomeHuman code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimCareteamrole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimCareteamrole.java new file mode 100644 index 00000000000..15e6e4477dc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimCareteamrole.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimCareteamrole { + + /** + * The primary care provider. + */ + PRIMARY, + /** + * Assisting care provider. + */ + ASSIST, + /** + * Supervising care provider. + */ + SUPERVISOR, + /** + * Other role on the care team. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static ClaimCareteamrole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("primary".equals(codeString)) + return PRIMARY; + if ("assist".equals(codeString)) + return ASSIST; + if ("supervisor".equals(codeString)) + return SUPERVISOR; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown ClaimCareteamrole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRIMARY: return "primary"; + case ASSIST: return "assist"; + case SUPERVISOR: return "supervisor"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/claimcareteamrole"; + } + public String getDefinition() { + switch (this) { + case PRIMARY: return "The primary care provider."; + case ASSIST: return "Assisting care provider."; + case SUPERVISOR: return "Supervising care provider."; + case OTHER: return "Other role on the care team."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRIMARY: return "Primary provider"; + case ASSIST: return "Assisting Provider"; + case SUPERVISOR: return "Supervising Provider"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimCareteamroleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimCareteamroleEnumFactory.java new file mode 100644 index 00000000000..86deb029001 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimCareteamroleEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimCareteamroleEnumFactory implements EnumFactory { + + public ClaimCareteamrole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("primary".equals(codeString)) + return ClaimCareteamrole.PRIMARY; + if ("assist".equals(codeString)) + return ClaimCareteamrole.ASSIST; + if ("supervisor".equals(codeString)) + return ClaimCareteamrole.SUPERVISOR; + if ("other".equals(codeString)) + return ClaimCareteamrole.OTHER; + throw new IllegalArgumentException("Unknown ClaimCareteamrole code '"+codeString+"'"); + } + + public String toCode(ClaimCareteamrole code) { + if (code == ClaimCareteamrole.PRIMARY) + return "primary"; + if (code == ClaimCareteamrole.ASSIST) + return "assist"; + if (code == ClaimCareteamrole.SUPERVISOR) + return "supervisor"; + if (code == ClaimCareteamrole.OTHER) + return "other"; + return "?"; + } + + public String toSystem(ClaimCareteamrole code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimException.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimException.java new file mode 100644 index 00000000000..fab6ea41d4d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimException.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimException { + + /** + * Fulltime Student + */ + STUDENT, + /** + * Disabled + */ + DISABLED, + /** + * added to help the parsers + */ + NULL; + public static ClaimException fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("student".equals(codeString)) + return STUDENT; + if ("disabled".equals(codeString)) + return DISABLED; + throw new FHIRException("Unknown ClaimException code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case STUDENT: return "student"; + case DISABLED: return "disabled"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/claim-exception"; + } + public String getDefinition() { + switch (this) { + case STUDENT: return "Fulltime Student"; + case DISABLED: return "Disabled"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case STUDENT: return "Student (Fulltime)"; + case DISABLED: return "Disabled"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimExceptionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimExceptionEnumFactory.java new file mode 100644 index 00000000000..58f28a8d82f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimExceptionEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimExceptionEnumFactory implements EnumFactory { + + public ClaimException fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("student".equals(codeString)) + return ClaimException.STUDENT; + if ("disabled".equals(codeString)) + return ClaimException.DISABLED; + throw new IllegalArgumentException("Unknown ClaimException code '"+codeString+"'"); + } + + public String toCode(ClaimException code) { + if (code == ClaimException.STUDENT) + return "student"; + if (code == ClaimException.DISABLED) + return "disabled"; + return "?"; + } + + public String toSystem(ClaimException code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimInformationcategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimInformationcategory.java new file mode 100644 index 00000000000..092a540371e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimInformationcategory.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimInformationcategory { + + /** + * Codes conveying additional situation and condition information. + */ + INFO, + /** + * Discharge status and discharge to locations. + */ + DISCHARGE, + /** + * Period, start or end dates of aspects of the Condition. + */ + ONSET, + /** + * Nature and date of the related event eg. Last exam, service, Xray etc. + */ + RELATED, + /** + * Insurance policy exceptions. + */ + EXCEPTION, + /** + * Materials being forwarded, eg. Models, molds, images, documents. + */ + MATERIAL, + /** + * Materials attached such as images, documents and resources. + */ + ATTACHMENT, + /** + * Teeth which are missing for any reason, for example: prior extraction, never developed. + */ + MISSINGTOOTH, + /** + * The type of prosthesis and date of supply if a previously supplied prosthesis. + */ + PROSTHESIS, + /** + * Other information identified by the type.system. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static ClaimInformationcategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("info".equals(codeString)) + return INFO; + if ("discharge".equals(codeString)) + return DISCHARGE; + if ("onset".equals(codeString)) + return ONSET; + if ("related".equals(codeString)) + return RELATED; + if ("exception".equals(codeString)) + return EXCEPTION; + if ("material".equals(codeString)) + return MATERIAL; + if ("attachment".equals(codeString)) + return ATTACHMENT; + if ("missingtooth".equals(codeString)) + return MISSINGTOOTH; + if ("prosthesis".equals(codeString)) + return PROSTHESIS; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown ClaimInformationcategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INFO: return "info"; + case DISCHARGE: return "discharge"; + case ONSET: return "onset"; + case RELATED: return "related"; + case EXCEPTION: return "exception"; + case MATERIAL: return "material"; + case ATTACHMENT: return "attachment"; + case MISSINGTOOTH: return "missingtooth"; + case PROSTHESIS: return "prosthesis"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/claiminformationcategory"; + } + public String getDefinition() { + switch (this) { + case INFO: return "Codes conveying additional situation and condition information."; + case DISCHARGE: return "Discharge status and discharge to locations."; + case ONSET: return "Period, start or end dates of aspects of the Condition."; + case RELATED: return "Nature and date of the related event eg. Last exam, service, Xray etc."; + case EXCEPTION: return "Insurance policy exceptions."; + case MATERIAL: return "Materials being forwarded, eg. Models, molds, images, documents."; + case ATTACHMENT: return "Materials attached such as images, documents and resources."; + case MISSINGTOOTH: return "Teeth which are missing for any reason, for example: prior extraction, never developed."; + case PROSTHESIS: return "The type of prosthesis and date of supply if a previously supplied prosthesis."; + case OTHER: return "Other information identified by the type.system."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INFO: return "Information"; + case DISCHARGE: return "Discharge"; + case ONSET: return "Onset"; + case RELATED: return "Related Services"; + case EXCEPTION: return "Exception"; + case MATERIAL: return "Materials Forwarded"; + case ATTACHMENT: return "Attachment"; + case MISSINGTOOTH: return "Missing Tooth"; + case PROSTHESIS: return "Prosthesis"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimInformationcategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimInformationcategoryEnumFactory.java new file mode 100644 index 00000000000..cfc238d72b8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimInformationcategoryEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimInformationcategoryEnumFactory implements EnumFactory { + + public ClaimInformationcategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("info".equals(codeString)) + return ClaimInformationcategory.INFO; + if ("discharge".equals(codeString)) + return ClaimInformationcategory.DISCHARGE; + if ("onset".equals(codeString)) + return ClaimInformationcategory.ONSET; + if ("related".equals(codeString)) + return ClaimInformationcategory.RELATED; + if ("exception".equals(codeString)) + return ClaimInformationcategory.EXCEPTION; + if ("material".equals(codeString)) + return ClaimInformationcategory.MATERIAL; + if ("attachment".equals(codeString)) + return ClaimInformationcategory.ATTACHMENT; + if ("missingtooth".equals(codeString)) + return ClaimInformationcategory.MISSINGTOOTH; + if ("prosthesis".equals(codeString)) + return ClaimInformationcategory.PROSTHESIS; + if ("other".equals(codeString)) + return ClaimInformationcategory.OTHER; + throw new IllegalArgumentException("Unknown ClaimInformationcategory code '"+codeString+"'"); + } + + public String toCode(ClaimInformationcategory code) { + if (code == ClaimInformationcategory.INFO) + return "info"; + if (code == ClaimInformationcategory.DISCHARGE) + return "discharge"; + if (code == ClaimInformationcategory.ONSET) + return "onset"; + if (code == ClaimInformationcategory.RELATED) + return "related"; + if (code == ClaimInformationcategory.EXCEPTION) + return "exception"; + if (code == ClaimInformationcategory.MATERIAL) + return "material"; + if (code == ClaimInformationcategory.ATTACHMENT) + return "attachment"; + if (code == ClaimInformationcategory.MISSINGTOOTH) + return "missingtooth"; + if (code == ClaimInformationcategory.PROSTHESIS) + return "prosthesis"; + if (code == ClaimInformationcategory.OTHER) + return "other"; + return "?"; + } + + public String toSystem(ClaimInformationcategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimModifiers.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimModifiers.java new file mode 100644 index 00000000000..ba2d65acbac --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimModifiers.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimModifiers { + + /** + * Repair of prior service or installation. + */ + A, + /** + * Temporary service or installation. + */ + B, + /** + * Treatment associated with TMJ. + */ + C, + /** + * Implant or associated with an implant. + */ + E, + /** + * A Rush service or service performed outside of normal office hours. + */ + ROOH, + /** + * None. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static ClaimModifiers fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return A; + if ("b".equals(codeString)) + return B; + if ("c".equals(codeString)) + return C; + if ("e".equals(codeString)) + return E; + if ("rooh".equals(codeString)) + return ROOH; + if ("x".equals(codeString)) + return X; + throw new FHIRException("Unknown ClaimModifiers code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "a"; + case B: return "b"; + case C: return "c"; + case E: return "e"; + case ROOH: return "rooh"; + case X: return "x"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/modifiers"; + } + public String getDefinition() { + switch (this) { + case A: return "Repair of prior service or installation."; + case B: return "Temporary service or installation."; + case C: return "Treatment associated with TMJ."; + case E: return "Implant or associated with an implant."; + case ROOH: return "A Rush service or service performed outside of normal office hours."; + case X: return "None."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Repair of prior service or installation"; + case B: return "Temporary service or installation"; + case C: return "TMJ treatment"; + case E: return "Implant or associated with an implant"; + case ROOH: return "Rush or Outside of office hours"; + case X: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimModifiersEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimModifiersEnumFactory.java new file mode 100644 index 00000000000..6594b96e44d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimModifiersEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimModifiersEnumFactory implements EnumFactory { + + public ClaimModifiers fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return ClaimModifiers.A; + if ("b".equals(codeString)) + return ClaimModifiers.B; + if ("c".equals(codeString)) + return ClaimModifiers.C; + if ("e".equals(codeString)) + return ClaimModifiers.E; + if ("rooh".equals(codeString)) + return ClaimModifiers.ROOH; + if ("x".equals(codeString)) + return ClaimModifiers.X; + throw new IllegalArgumentException("Unknown ClaimModifiers code '"+codeString+"'"); + } + + public String toCode(ClaimModifiers code) { + if (code == ClaimModifiers.A) + return "a"; + if (code == ClaimModifiers.B) + return "b"; + if (code == ClaimModifiers.C) + return "c"; + if (code == ClaimModifiers.E) + return "e"; + if (code == ClaimModifiers.ROOH) + return "rooh"; + if (code == ClaimModifiers.X) + return "x"; + return "?"; + } + + public String toSystem(ClaimModifiers code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimSubtype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimSubtype.java new file mode 100644 index 00000000000..a878c93fc3f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimSubtype.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimSubtype { + + /** + * A claim for Orthodontic Services. + */ + ORTHO, + /** + * A claim for emergency services. + */ + EMERGENCY, + /** + * added to help the parsers + */ + NULL; + public static ClaimSubtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ortho".equals(codeString)) + return ORTHO; + if ("emergency".equals(codeString)) + return EMERGENCY; + throw new FHIRException("Unknown ClaimSubtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORTHO: return "ortho"; + case EMERGENCY: return "emergency"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-claimsubtype"; + } + public String getDefinition() { + switch (this) { + case ORTHO: return "A claim for Orthodontic Services."; + case EMERGENCY: return "A claim for emergency services."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORTHO: return "Orthodontic Claim"; + case EMERGENCY: return "Emergency Claim"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimSubtypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimSubtypeEnumFactory.java new file mode 100644 index 00000000000..b2ee352e5d2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimSubtypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimSubtypeEnumFactory implements EnumFactory { + + public ClaimSubtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ortho".equals(codeString)) + return ClaimSubtype.ORTHO; + if ("emergency".equals(codeString)) + return ClaimSubtype.EMERGENCY; + throw new IllegalArgumentException("Unknown ClaimSubtype code '"+codeString+"'"); + } + + public String toCode(ClaimSubtype code) { + if (code == ClaimSubtype.ORTHO) + return "ortho"; + if (code == ClaimSubtype.EMERGENCY) + return "emergency"; + return "?"; + } + + public String toSystem(ClaimSubtype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimType.java new file mode 100644 index 00000000000..0b42082939f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimType { + + /** + * Hospital, clinic and typically inpatient claims. + */ + INSTITUTIONAL, + /** + * Dental, Denture and Hygiene claims. + */ + ORAL, + /** + * Pharmacy claims for goods and services. + */ + PHARMACY, + /** + * Typically outpatient claims from Physician, Psychological, Chiropractor, Physiotherapy, Speech Pathology, rehabilitative, consulting. + */ + PROFESSIONAL, + /** + * Vision claims for professional services and products such as glasses and contact lenses. + */ + VISION, + /** + * added to help the parsers + */ + NULL; + public static ClaimType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return INSTITUTIONAL; + if ("oral".equals(codeString)) + return ORAL; + if ("pharmacy".equals(codeString)) + return PHARMACY; + if ("professional".equals(codeString)) + return PROFESSIONAL; + if ("vision".equals(codeString)) + return VISION; + throw new FHIRException("Unknown ClaimType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTITUTIONAL: return "institutional"; + case ORAL: return "oral"; + case PHARMACY: return "pharmacy"; + case PROFESSIONAL: return "professional"; + case VISION: return "vision"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-claimtype"; + } + public String getDefinition() { + switch (this) { + case INSTITUTIONAL: return "Hospital, clinic and typically inpatient claims."; + case ORAL: return "Dental, Denture and Hygiene claims."; + case PHARMACY: return "Pharmacy claims for goods and services."; + case PROFESSIONAL: return "Typically outpatient claims from Physician, Psychological, Chiropractor, Physiotherapy, Speech Pathology, rehabilitative, consulting."; + case VISION: return "Vision claims for professional services and products such as glasses and contact lenses."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTITUTIONAL: return "Institutional"; + case ORAL: return "Oral"; + case PHARMACY: return "Pharmacy"; + case PROFESSIONAL: return "Professional"; + case VISION: return "Vision"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimTypeEnumFactory.java new file mode 100644 index 00000000000..f59ee22642f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimTypeEnumFactory implements EnumFactory { + + public ClaimType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return ClaimType.INSTITUTIONAL; + if ("oral".equals(codeString)) + return ClaimType.ORAL; + if ("pharmacy".equals(codeString)) + return ClaimType.PHARMACY; + if ("professional".equals(codeString)) + return ClaimType.PROFESSIONAL; + if ("vision".equals(codeString)) + return ClaimType.VISION; + throw new IllegalArgumentException("Unknown ClaimType code '"+codeString+"'"); + } + + public String toCode(ClaimType code) { + if (code == ClaimType.INSTITUTIONAL) + return "institutional"; + if (code == ClaimType.ORAL) + return "oral"; + if (code == ClaimType.PHARMACY) + return "pharmacy"; + if (code == ClaimType.PROFESSIONAL) + return "professional"; + if (code == ClaimType.VISION) + return "vision"; + return "?"; + } + + public String toSystem(ClaimType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimUse.java new file mode 100644 index 00000000000..91494c14dbc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimUse.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClaimUse { + + /** + * The treatment is complete and this represents a Claim for the services. + */ + COMPLETE, + /** + * The treatment is proposed and this represents a Pre-authorization for the services. + */ + PROPOSED, + /** + * The treatment is proposed and this represents a Pre-determination for the services. + */ + EXPLORATORY, + /** + * A locally defined or otherwise resolved status. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static ClaimUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("exploratory".equals(codeString)) + return EXPLORATORY; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown ClaimUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PROPOSED: return "proposed"; + case EXPLORATORY: return "exploratory"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/claim-use"; + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; + case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; + case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; + case OTHER: return "A locally defined or otherwise resolved status."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PROPOSED: return "Proposed"; + case EXPLORATORY: return "Exploratory"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimUseEnumFactory.java new file mode 100644 index 00000000000..44f1c62cc28 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClaimUseEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClaimUseEnumFactory implements EnumFactory { + + public ClaimUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return ClaimUse.COMPLETE; + if ("proposed".equals(codeString)) + return ClaimUse.PROPOSED; + if ("exploratory".equals(codeString)) + return ClaimUse.EXPLORATORY; + if ("other".equals(codeString)) + return ClaimUse.OTHER; + throw new IllegalArgumentException("Unknown ClaimUse code '"+codeString+"'"); + } + + public String toCode(ClaimUse code) { + if (code == ClaimUse.COMPLETE) + return "complete"; + if (code == ClaimUse.PROPOSED) + return "proposed"; + if (code == ClaimUse.EXPLORATORY) + return "exploratory"; + if (code == ClaimUse.OTHER) + return "other"; + return "?"; + } + + public String toSystem(ClaimUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClinicalImpressionStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClinicalImpressionStatus.java new file mode 100644 index 00000000000..cbb9740d7c7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClinicalImpressionStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ClinicalImpressionStatus { + + /** + * The assessment is still on-going and results are not yet final. + */ + DRAFT, + /** + * The assessment is done and the results are final. + */ + COMPLETED, + /** + * This assessment was never actually done and the record is erroneous (e.g. Wrong patient). + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ClinicalImpressionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/clinical-impression-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The assessment is still on-going and results are not yet final."; + case COMPLETED: return "The assessment is done and the results are final."; + case ENTEREDINERROR: return "This assessment was never actually done and the record is erroneous (e.g. Wrong patient)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "In progress"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClinicalImpressionStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClinicalImpressionStatusEnumFactory.java new file mode 100644 index 00000000000..baca83b0160 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ClinicalImpressionStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ClinicalImpressionStatusEnumFactory implements EnumFactory { + + public ClinicalImpressionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ClinicalImpressionStatus.DRAFT; + if ("completed".equals(codeString)) + return ClinicalImpressionStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return ClinicalImpressionStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); + } + + public String toCode(ClinicalImpressionStatus code) { + if (code == ClinicalImpressionStatus.DRAFT) + return "draft"; + if (code == ClinicalImpressionStatus.COMPLETED) + return "completed"; + if (code == ClinicalImpressionStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(ClinicalImpressionStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemContentMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemContentMode.java new file mode 100644 index 00000000000..f50d7ac37fe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemContentMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CodesystemContentMode { + + /** + * None of the concepts defined by the code system are included in the code system resource + */ + NOTPRESENT, + /** + * A few representative concepts are included in the code system resource + */ + EXAMPLE, + /** + * A subset of the code system concepts are included in the code system resource + */ + FRAGMENT, + /** + * All the concepts defined by the code system are included in the code system resource + */ + COMPLETE, + /** + * added to help the parsers + */ + NULL; + public static CodesystemContentMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-present".equals(codeString)) + return NOTPRESENT; + if ("example".equals(codeString)) + return EXAMPLE; + if ("fragment".equals(codeString)) + return FRAGMENT; + if ("complete".equals(codeString)) + return COMPLETE; + throw new FHIRException("Unknown CodesystemContentMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTPRESENT: return "not-present"; + case EXAMPLE: return "example"; + case FRAGMENT: return "fragment"; + case COMPLETE: return "complete"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/codesystem-content-mode"; + } + public String getDefinition() { + switch (this) { + case NOTPRESENT: return "None of the concepts defined by the code system are included in the code system resource"; + case EXAMPLE: return "A few representative concepts are included in the code system resource"; + case FRAGMENT: return "A subset of the code system concepts are included in the code system resource"; + case COMPLETE: return "All the concepts defined by the code system are included in the code system resource"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTPRESENT: return "Not Present"; + case EXAMPLE: return "Example"; + case FRAGMENT: return "Fragment"; + case COMPLETE: return "Complete"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemContentModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemContentModeEnumFactory.java new file mode 100644 index 00000000000..e48ad2ba58a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemContentModeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CodesystemContentModeEnumFactory implements EnumFactory { + + public CodesystemContentMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-present".equals(codeString)) + return CodesystemContentMode.NOTPRESENT; + if ("example".equals(codeString)) + return CodesystemContentMode.EXAMPLE; + if ("fragment".equals(codeString)) + return CodesystemContentMode.FRAGMENT; + if ("complete".equals(codeString)) + return CodesystemContentMode.COMPLETE; + throw new IllegalArgumentException("Unknown CodesystemContentMode code '"+codeString+"'"); + } + + public String toCode(CodesystemContentMode code) { + if (code == CodesystemContentMode.NOTPRESENT) + return "not-present"; + if (code == CodesystemContentMode.EXAMPLE) + return "example"; + if (code == CodesystemContentMode.FRAGMENT) + return "fragment"; + if (code == CodesystemContentMode.COMPLETE) + return "complete"; + return "?"; + } + + public String toSystem(CodesystemContentMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemHierarchyMeaning.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemHierarchyMeaning.java new file mode 100644 index 00000000000..4e56cffca33 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemHierarchyMeaning.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CodesystemHierarchyMeaning { + + /** + * No particular relationship between the concepts can be assumed, except what can be determined by inspection of the definitions of the elements (possible reasons to use this: importing from a source where this is not defined, or where various parts of the hierarchy have different meanings) + */ + GROUPEDBY, + /** + * A hierarchy where the child concepts have an IS-A relationship with the parents - that is, all the properties of the parent are also true for its child concepts + */ + ISA, + /** + * Child elements list the individual parts of a composite whole (e.g. body site) + */ + PARTOF, + /** + * Child concepts in the hierarchy may have only one parent, and there is a presumption that the code system is a "closed world" meaning all things must be in the hierarchy. This results in concepts such as "not otherwise classified." + */ + CLASSIFIEDWITH, + /** + * added to help the parsers + */ + NULL; + public static CodesystemHierarchyMeaning fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("grouped-by".equals(codeString)) + return GROUPEDBY; + if ("is-a".equals(codeString)) + return ISA; + if ("part-of".equals(codeString)) + return PARTOF; + if ("classified-with".equals(codeString)) + return CLASSIFIEDWITH; + throw new FHIRException("Unknown CodesystemHierarchyMeaning code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUPEDBY: return "grouped-by"; + case ISA: return "is-a"; + case PARTOF: return "part-of"; + case CLASSIFIEDWITH: return "classified-with"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/codesystem-hierarchy-meaning"; + } + public String getDefinition() { + switch (this) { + case GROUPEDBY: return "No particular relationship between the concepts can be assumed, except what can be determined by inspection of the definitions of the elements (possible reasons to use this: importing from a source where this is not defined, or where various parts of the hierarchy have different meanings)"; + case ISA: return "A hierarchy where the child concepts have an IS-A relationship with the parents - that is, all the properties of the parent are also true for its child concepts"; + case PARTOF: return "Child elements list the individual parts of a composite whole (e.g. body site)"; + case CLASSIFIEDWITH: return "Child concepts in the hierarchy may have only one parent, and there is a presumption that the code system is a \"closed world\" meaning all things must be in the hierarchy. This results in concepts such as \"not otherwise classified.\""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUPEDBY: return "Grouped By"; + case ISA: return "Is-A"; + case PARTOF: return "Part Of"; + case CLASSIFIEDWITH: return "Classified With"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemHierarchyMeaningEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemHierarchyMeaningEnumFactory.java new file mode 100644 index 00000000000..77cbc9812b9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CodesystemHierarchyMeaningEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CodesystemHierarchyMeaningEnumFactory implements EnumFactory { + + public CodesystemHierarchyMeaning fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("grouped-by".equals(codeString)) + return CodesystemHierarchyMeaning.GROUPEDBY; + if ("is-a".equals(codeString)) + return CodesystemHierarchyMeaning.ISA; + if ("part-of".equals(codeString)) + return CodesystemHierarchyMeaning.PARTOF; + if ("classified-with".equals(codeString)) + return CodesystemHierarchyMeaning.CLASSIFIEDWITH; + throw new IllegalArgumentException("Unknown CodesystemHierarchyMeaning code '"+codeString+"'"); + } + + public String toCode(CodesystemHierarchyMeaning code) { + if (code == CodesystemHierarchyMeaning.GROUPEDBY) + return "grouped-by"; + if (code == CodesystemHierarchyMeaning.ISA) + return "is-a"; + if (code == CodesystemHierarchyMeaning.PARTOF) + return "part-of"; + if (code == CodesystemHierarchyMeaning.CLASSIFIEDWITH) + return "classified-with"; + return "?"; + } + + public String toSystem(CodesystemHierarchyMeaning code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommonTags.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommonTags.java new file mode 100644 index 00000000000..5e58aa7959a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommonTags.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CommonTags { + + /** + * This request is intended to be acted upon, not merely stored + */ + ACTIONABLE, + /** + * added to help the parsers + */ + NULL; + public static CommonTags fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("actionable".equals(codeString)) + return ACTIONABLE; + throw new FHIRException("Unknown CommonTags code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIONABLE: return "actionable"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/common-tags"; + } + public String getDefinition() { + switch (this) { + case ACTIONABLE: return "This request is intended to be acted upon, not merely stored"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIONABLE: return "Actionable"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommonTagsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommonTagsEnumFactory.java new file mode 100644 index 00000000000..b88a73d515a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommonTagsEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CommonTagsEnumFactory implements EnumFactory { + + public CommonTags fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("actionable".equals(codeString)) + return CommonTags.ACTIONABLE; + throw new IllegalArgumentException("Unknown CommonTags code '"+codeString+"'"); + } + + public String toCode(CommonTags code) { + if (code == CommonTags.ACTIONABLE) + return "actionable"; + return "?"; + } + + public String toSystem(CommonTags code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationCategory.java new file mode 100644 index 00000000000..615b84acc1b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationCategory.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CommunicationCategory { + + /** + * The communication conveys an alert. + */ + ALERT, + /** + * The communication conveys a notification. + */ + NOTIFICATION, + /** + * The communication conveys a reminder. + */ + REMINDER, + /** + * The communication conveys instruction. + */ + INSTRUCTION, + /** + * added to help the parsers + */ + NULL; + public static CommunicationCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alert".equals(codeString)) + return ALERT; + if ("notification".equals(codeString)) + return NOTIFICATION; + if ("reminder".equals(codeString)) + return REMINDER; + if ("instruction".equals(codeString)) + return INSTRUCTION; + throw new FHIRException("Unknown CommunicationCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALERT: return "alert"; + case NOTIFICATION: return "notification"; + case REMINDER: return "reminder"; + case INSTRUCTION: return "instruction"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/communication-category"; + } + public String getDefinition() { + switch (this) { + case ALERT: return "The communication conveys an alert."; + case NOTIFICATION: return "The communication conveys a notification."; + case REMINDER: return "The communication conveys a reminder."; + case INSTRUCTION: return "The communication conveys instruction."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALERT: return "Alert"; + case NOTIFICATION: return "Notification"; + case REMINDER: return "Reminder"; + case INSTRUCTION: return "Instruction"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationCategoryEnumFactory.java new file mode 100644 index 00000000000..0e0d21b0186 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationCategoryEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CommunicationCategoryEnumFactory implements EnumFactory { + + public CommunicationCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alert".equals(codeString)) + return CommunicationCategory.ALERT; + if ("notification".equals(codeString)) + return CommunicationCategory.NOTIFICATION; + if ("reminder".equals(codeString)) + return CommunicationCategory.REMINDER; + if ("instruction".equals(codeString)) + return CommunicationCategory.INSTRUCTION; + throw new IllegalArgumentException("Unknown CommunicationCategory code '"+codeString+"'"); + } + + public String toCode(CommunicationCategory code) { + if (code == CommunicationCategory.ALERT) + return "alert"; + if (code == CommunicationCategory.NOTIFICATION) + return "notification"; + if (code == CommunicationCategory.REMINDER) + return "reminder"; + if (code == CommunicationCategory.INSTRUCTION) + return "instruction"; + return "?"; + } + + public String toSystem(CommunicationCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationNotDoneReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationNotDoneReason.java new file mode 100644 index 00000000000..e149a66a65c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationNotDoneReason.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CommunicationNotDoneReason { + + /** + * The communication was not done due to an unknown reason. + */ + UNKNOWN, + /** + * The communication was not done due to a system error. + */ + SYSTEMERROR, + /** + * The communication was not done due to an invalid phone number. + */ + INVALIDPHONENUMBER, + /** + * The communication was not done due to the recipient being unavailable. + */ + RECIPIENTUNAVAILABLE, + /** + * The communication was not done due to a family objection. + */ + FAMILYOBJECTION, + /** + * The communication was not done due to a patient objection. + */ + PATIENTOBJECTION, + /** + * added to help the parsers + */ + NULL; + public static CommunicationNotDoneReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("system-error".equals(codeString)) + return SYSTEMERROR; + if ("invalid-phone-number".equals(codeString)) + return INVALIDPHONENUMBER; + if ("recipient-unavailable".equals(codeString)) + return RECIPIENTUNAVAILABLE; + if ("family-objection".equals(codeString)) + return FAMILYOBJECTION; + if ("patient-objection".equals(codeString)) + return PATIENTOBJECTION; + throw new FHIRException("Unknown CommunicationNotDoneReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNKNOWN: return "unknown"; + case SYSTEMERROR: return "system-error"; + case INVALIDPHONENUMBER: return "invalid-phone-number"; + case RECIPIENTUNAVAILABLE: return "recipient-unavailable"; + case FAMILYOBJECTION: return "family-objection"; + case PATIENTOBJECTION: return "patient-objection"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/communication-not-done-reason"; + } + public String getDefinition() { + switch (this) { + case UNKNOWN: return "The communication was not done due to an unknown reason."; + case SYSTEMERROR: return "The communication was not done due to a system error."; + case INVALIDPHONENUMBER: return "The communication was not done due to an invalid phone number."; + case RECIPIENTUNAVAILABLE: return "The communication was not done due to the recipient being unavailable."; + case FAMILYOBJECTION: return "The communication was not done due to a family objection."; + case PATIENTOBJECTION: return "The communication was not done due to a patient objection."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNKNOWN: return "Unknown"; + case SYSTEMERROR: return "System Error"; + case INVALIDPHONENUMBER: return "Invalid Phone Number"; + case RECIPIENTUNAVAILABLE: return "Recipient Unavailable"; + case FAMILYOBJECTION: return "Family Objection"; + case PATIENTOBJECTION: return "Patient Objection"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationNotDoneReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationNotDoneReasonEnumFactory.java new file mode 100644 index 00000000000..99f411413ed --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CommunicationNotDoneReasonEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CommunicationNotDoneReasonEnumFactory implements EnumFactory { + + public CommunicationNotDoneReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return CommunicationNotDoneReason.UNKNOWN; + if ("system-error".equals(codeString)) + return CommunicationNotDoneReason.SYSTEMERROR; + if ("invalid-phone-number".equals(codeString)) + return CommunicationNotDoneReason.INVALIDPHONENUMBER; + if ("recipient-unavailable".equals(codeString)) + return CommunicationNotDoneReason.RECIPIENTUNAVAILABLE; + if ("family-objection".equals(codeString)) + return CommunicationNotDoneReason.FAMILYOBJECTION; + if ("patient-objection".equals(codeString)) + return CommunicationNotDoneReason.PATIENTOBJECTION; + throw new IllegalArgumentException("Unknown CommunicationNotDoneReason code '"+codeString+"'"); + } + + public String toCode(CommunicationNotDoneReason code) { + if (code == CommunicationNotDoneReason.UNKNOWN) + return "unknown"; + if (code == CommunicationNotDoneReason.SYSTEMERROR) + return "system-error"; + if (code == CommunicationNotDoneReason.INVALIDPHONENUMBER) + return "invalid-phone-number"; + if (code == CommunicationNotDoneReason.RECIPIENTUNAVAILABLE) + return "recipient-unavailable"; + if (code == CommunicationNotDoneReason.FAMILYOBJECTION) + return "family-objection"; + if (code == CommunicationNotDoneReason.PATIENTOBJECTION) + return "patient-objection"; + return "?"; + } + + public String toSystem(CommunicationNotDoneReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompartmentType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompartmentType.java new file mode 100644 index 00000000000..304e7d4a136 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompartmentType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CompartmentType { + + /** + * The compartment definition is for the patient compartment + */ + PATIENT, + /** + * The compartment definition is for the encounter compartment + */ + ENCOUNTER, + /** + * The compartment definition is for the related-person compartment + */ + RELATEDPERSON, + /** + * The compartment definition is for the practitioner compartment + */ + PRACTITIONER, + /** + * The compartment definition is for the device compartment + */ + DEVICE, + /** + * added to help the parsers + */ + NULL; + public static CompartmentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Patient".equals(codeString)) + return PATIENT; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("Device".equals(codeString)) + return DEVICE; + throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "Patient"; + case ENCOUNTER: return "Encounter"; + case RELATEDPERSON: return "RelatedPerson"; + case PRACTITIONER: return "Practitioner"; + case DEVICE: return "Device"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/compartment-type"; + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The compartment definition is for the patient compartment"; + case ENCOUNTER: return "The compartment definition is for the encounter compartment"; + case RELATEDPERSON: return "The compartment definition is for the related-person compartment"; + case PRACTITIONER: return "The compartment definition is for the practitioner compartment"; + case DEVICE: return "The compartment definition is for the device compartment"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case ENCOUNTER: return "Encounter"; + case RELATEDPERSON: return "RelatedPerson"; + case PRACTITIONER: return "Practitioner"; + case DEVICE: return "Device"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompartmentTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompartmentTypeEnumFactory.java new file mode 100644 index 00000000000..636f7b123d2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompartmentTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CompartmentTypeEnumFactory implements EnumFactory { + + public CompartmentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Patient".equals(codeString)) + return CompartmentType.PATIENT; + if ("Encounter".equals(codeString)) + return CompartmentType.ENCOUNTER; + if ("RelatedPerson".equals(codeString)) + return CompartmentType.RELATEDPERSON; + if ("Practitioner".equals(codeString)) + return CompartmentType.PRACTITIONER; + if ("Device".equals(codeString)) + return CompartmentType.DEVICE; + throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'"); + } + + public String toCode(CompartmentType code) { + if (code == CompartmentType.PATIENT) + return "Patient"; + if (code == CompartmentType.ENCOUNTER) + return "Encounter"; + if (code == CompartmentType.RELATEDPERSON) + return "RelatedPerson"; + if (code == CompartmentType.PRACTITIONER) + return "Practitioner"; + if (code == CompartmentType.DEVICE) + return "Device"; + return "?"; + } + + public String toSystem(CompartmentType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositeMeasureScoring.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositeMeasureScoring.java new file mode 100644 index 00000000000..055613f0e3a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositeMeasureScoring.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CompositeMeasureScoring { + + /** + * Opportunity scoring combines the scores from component measures by combining the numerators and denominators for each component + */ + OPPORTUNITY, + /** + * All-or-nothing scoring includes an individual in the numerator of the composite measure if they are in the numerators of all of the component measures in which they are in the denominator + */ + ALLORNOTHING, + /** + * Linear scoring gives an individual a score based on the number of numerators in which they appear + */ + LINEAR, + /** + * Weighted scoring gives an individual a score based on a weighted factor for each component numerator in which they appear + */ + WEIGHTED, + /** + * added to help the parsers + */ + NULL; + public static CompositeMeasureScoring fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("opportunity".equals(codeString)) + return OPPORTUNITY; + if ("all-or-nothing".equals(codeString)) + return ALLORNOTHING; + if ("linear".equals(codeString)) + return LINEAR; + if ("weighted".equals(codeString)) + return WEIGHTED; + throw new FHIRException("Unknown CompositeMeasureScoring code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OPPORTUNITY: return "opportunity"; + case ALLORNOTHING: return "all-or-nothing"; + case LINEAR: return "linear"; + case WEIGHTED: return "weighted"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/composite-measure-scoring"; + } + public String getDefinition() { + switch (this) { + case OPPORTUNITY: return "Opportunity scoring combines the scores from component measures by combining the numerators and denominators for each component"; + case ALLORNOTHING: return "All-or-nothing scoring includes an individual in the numerator of the composite measure if they are in the numerators of all of the component measures in which they are in the denominator"; + case LINEAR: return "Linear scoring gives an individual a score based on the number of numerators in which they appear"; + case WEIGHTED: return "Weighted scoring gives an individual a score based on a weighted factor for each component numerator in which they appear"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OPPORTUNITY: return "Opportunity"; + case ALLORNOTHING: return "All-or-nothing"; + case LINEAR: return "Linear"; + case WEIGHTED: return "Weighted"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositeMeasureScoringEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositeMeasureScoringEnumFactory.java new file mode 100644 index 00000000000..a972c671d69 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositeMeasureScoringEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CompositeMeasureScoringEnumFactory implements EnumFactory { + + public CompositeMeasureScoring fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("opportunity".equals(codeString)) + return CompositeMeasureScoring.OPPORTUNITY; + if ("all-or-nothing".equals(codeString)) + return CompositeMeasureScoring.ALLORNOTHING; + if ("linear".equals(codeString)) + return CompositeMeasureScoring.LINEAR; + if ("weighted".equals(codeString)) + return CompositeMeasureScoring.WEIGHTED; + throw new IllegalArgumentException("Unknown CompositeMeasureScoring code '"+codeString+"'"); + } + + public String toCode(CompositeMeasureScoring code) { + if (code == CompositeMeasureScoring.OPPORTUNITY) + return "opportunity"; + if (code == CompositeMeasureScoring.ALLORNOTHING) + return "all-or-nothing"; + if (code == CompositeMeasureScoring.LINEAR) + return "linear"; + if (code == CompositeMeasureScoring.WEIGHTED) + return "weighted"; + return "?"; + } + + public String toSystem(CompositeMeasureScoring code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionAttestationMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionAttestationMode.java new file mode 100644 index 00000000000..061b868f74e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionAttestationMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CompositionAttestationMode { + + /** + * The person authenticated the content in their personal capacity. + */ + PERSONAL, + /** + * The person authenticated the content in their professional capacity. + */ + PROFESSIONAL, + /** + * The person authenticated the content and accepted legal responsibility for its content. + */ + LEGAL, + /** + * The organization authenticated the content as consistent with their policies and procedures. + */ + OFFICIAL, + /** + * added to help the parsers + */ + NULL; + public static CompositionAttestationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("personal".equals(codeString)) + return PERSONAL; + if ("professional".equals(codeString)) + return PROFESSIONAL; + if ("legal".equals(codeString)) + return LEGAL; + if ("official".equals(codeString)) + return OFFICIAL; + throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSONAL: return "personal"; + case PROFESSIONAL: return "professional"; + case LEGAL: return "legal"; + case OFFICIAL: return "official"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/composition-attestation-mode"; + } + public String getDefinition() { + switch (this) { + case PERSONAL: return "The person authenticated the content in their personal capacity."; + case PROFESSIONAL: return "The person authenticated the content in their professional capacity."; + case LEGAL: return "The person authenticated the content and accepted legal responsibility for its content."; + case OFFICIAL: return "The organization authenticated the content as consistent with their policies and procedures."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSONAL: return "Personal"; + case PROFESSIONAL: return "Professional"; + case LEGAL: return "Legal"; + case OFFICIAL: return "Official"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionAttestationModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionAttestationModeEnumFactory.java new file mode 100644 index 00000000000..16500184b2c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionAttestationModeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CompositionAttestationModeEnumFactory implements EnumFactory { + + public CompositionAttestationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("personal".equals(codeString)) + return CompositionAttestationMode.PERSONAL; + if ("professional".equals(codeString)) + return CompositionAttestationMode.PROFESSIONAL; + if ("legal".equals(codeString)) + return CompositionAttestationMode.LEGAL; + if ("official".equals(codeString)) + return CompositionAttestationMode.OFFICIAL; + throw new IllegalArgumentException("Unknown CompositionAttestationMode code '"+codeString+"'"); + } + + public String toCode(CompositionAttestationMode code) { + if (code == CompositionAttestationMode.PERSONAL) + return "personal"; + if (code == CompositionAttestationMode.PROFESSIONAL) + return "professional"; + if (code == CompositionAttestationMode.LEGAL) + return "legal"; + if (code == CompositionAttestationMode.OFFICIAL) + return "official"; + return "?"; + } + + public String toSystem(CompositionAttestationMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionStatus.java new file mode 100644 index 00000000000..0208ba07f1b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CompositionStatus { + + /** + * This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified. + */ + PRELIMINARY, + /** + * This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition. + */ + FINAL, + /** + * The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as "final" and the composition is complete and verified by an authorized person. + */ + AMENDED, + /** + * The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static CompositionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preliminary".equals(codeString)) + return PRELIMINARY; + if ("final".equals(codeString)) + return FINAL; + if ("amended".equals(codeString)) + return AMENDED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRELIMINARY: return "preliminary"; + case FINAL: return "final"; + case AMENDED: return "amended"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/composition-status"; + } + public String getDefinition() { + switch (this) { + case PRELIMINARY: return "This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified."; + case FINAL: return "This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition."; + case AMENDED: return "The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as \"final\" and the composition is complete and verified by an authorized person."; + case ENTEREDINERROR: return "The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRELIMINARY: return "Preliminary"; + case FINAL: return "Final"; + case AMENDED: return "Amended"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionStatusEnumFactory.java new file mode 100644 index 00000000000..67a8013c25c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CompositionStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CompositionStatusEnumFactory implements EnumFactory { + + public CompositionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preliminary".equals(codeString)) + return CompositionStatus.PRELIMINARY; + if ("final".equals(codeString)) + return CompositionStatus.FINAL; + if ("amended".equals(codeString)) + return CompositionStatus.AMENDED; + if ("entered-in-error".equals(codeString)) + return CompositionStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'"); + } + + public String toCode(CompositionStatus code) { + if (code == CompositionStatus.PRELIMINARY) + return "preliminary"; + if (code == CompositionStatus.FINAL) + return "final"; + if (code == CompositionStatus.AMENDED) + return "amended"; + if (code == CompositionStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(CompositionStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptMapEquivalence.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptMapEquivalence.java new file mode 100644 index 00000000000..1e2c843d59a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptMapEquivalence.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConceptMapEquivalence { + + /** + * The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known + */ + RELATEDTO, + /** + * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical). + */ + EQUIVALENT, + /** + * The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical). + */ + EQUAL, + /** + * The target mapping is wider in meaning than the source concept. + */ + WIDER, + /** + * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target). + */ + SUBSUMES, + /** + * The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally. + */ + NARROWER, + /** + * The target mapping specializes the meaning of the source concept (e.g. the target is-a source). + */ + SPECIALIZES, + /** + * The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally. + */ + INEXACT, + /** + * There is no match for this concept in the destination concept system. + */ + UNMATCHED, + /** + * This is an explicit assertion that there is no mapping between the source and target concept. + */ + DISJOINT, + /** + * added to help the parsers + */ + NULL; + public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("relatedto".equals(codeString)) + return RELATEDTO; + if ("equivalent".equals(codeString)) + return EQUIVALENT; + if ("equal".equals(codeString)) + return EQUAL; + if ("wider".equals(codeString)) + return WIDER; + if ("subsumes".equals(codeString)) + return SUBSUMES; + if ("narrower".equals(codeString)) + return NARROWER; + if ("specializes".equals(codeString)) + return SPECIALIZES; + if ("inexact".equals(codeString)) + return INEXACT; + if ("unmatched".equals(codeString)) + return UNMATCHED; + if ("disjoint".equals(codeString)) + return DISJOINT; + throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RELATEDTO: return "relatedto"; + case EQUIVALENT: return "equivalent"; + case EQUAL: return "equal"; + case WIDER: return "wider"; + case SUBSUMES: return "subsumes"; + case NARROWER: return "narrower"; + case SPECIALIZES: return "specializes"; + case INEXACT: return "inexact"; + case UNMATCHED: return "unmatched"; + case DISJOINT: return "disjoint"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/concept-map-equivalence"; + } + public String getDefinition() { + switch (this) { + case RELATEDTO: return "The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known"; + case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical)."; + case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical)."; + case WIDER: return "The target mapping is wider in meaning than the source concept."; + case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target)."; + case NARROWER: return "The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally."; + case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source)."; + case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally."; + case UNMATCHED: return "There is no match for this concept in the destination concept system."; + case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RELATEDTO: return "Related To"; + case EQUIVALENT: return "Equivalent"; + case EQUAL: return "Equal"; + case WIDER: return "Wider"; + case SUBSUMES: return "Subsumes"; + case NARROWER: return "Narrower"; + case SPECIALIZES: return "Specializes"; + case INEXACT: return "Inexact"; + case UNMATCHED: return "Unmatched"; + case DISJOINT: return "Disjoint"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptMapEquivalenceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptMapEquivalenceEnumFactory.java new file mode 100644 index 00000000000..c3b5d41721e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptMapEquivalenceEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConceptMapEquivalenceEnumFactory implements EnumFactory { + + public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("relatedto".equals(codeString)) + return ConceptMapEquivalence.RELATEDTO; + if ("equivalent".equals(codeString)) + return ConceptMapEquivalence.EQUIVALENT; + if ("equal".equals(codeString)) + return ConceptMapEquivalence.EQUAL; + if ("wider".equals(codeString)) + return ConceptMapEquivalence.WIDER; + if ("subsumes".equals(codeString)) + return ConceptMapEquivalence.SUBSUMES; + if ("narrower".equals(codeString)) + return ConceptMapEquivalence.NARROWER; + if ("specializes".equals(codeString)) + return ConceptMapEquivalence.SPECIALIZES; + if ("inexact".equals(codeString)) + return ConceptMapEquivalence.INEXACT; + if ("unmatched".equals(codeString)) + return ConceptMapEquivalence.UNMATCHED; + if ("disjoint".equals(codeString)) + return ConceptMapEquivalence.DISJOINT; + throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'"); + } + + public String toCode(ConceptMapEquivalence code) { + if (code == ConceptMapEquivalence.RELATEDTO) + return "relatedto"; + if (code == ConceptMapEquivalence.EQUIVALENT) + return "equivalent"; + if (code == ConceptMapEquivalence.EQUAL) + return "equal"; + if (code == ConceptMapEquivalence.WIDER) + return "wider"; + if (code == ConceptMapEquivalence.SUBSUMES) + return "subsumes"; + if (code == ConceptMapEquivalence.NARROWER) + return "narrower"; + if (code == ConceptMapEquivalence.SPECIALIZES) + return "specializes"; + if (code == ConceptMapEquivalence.INEXACT) + return "inexact"; + if (code == ConceptMapEquivalence.UNMATCHED) + return "unmatched"; + if (code == ConceptMapEquivalence.DISJOINT) + return "disjoint"; + return "?"; + } + + public String toSystem(ConceptMapEquivalence code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptProperties.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptProperties.java new file mode 100644 index 00000000000..40696db8f04 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptProperties.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConceptProperties { + + /** + * True if the concept is not considered active - e.g. not a valid concept any more. Property type is boolean, default value is false + */ + INACTIVE, + /** + * The date at which a concept was deprecated. Concepts that are deprecated but not inactive can still be used, but their use is discouraged, and they should be expected to be made inactive in a future release. Property type is dateTime + */ + DEPRECATED, + /** + * The concept is not intended to be chosen by the user - only intended to be used as a selector for other concepts. Note, though, that the interpretation of this is highly contextual; all concepts are selectable in some context. Property type is boolean, default value is false + */ + NOTSELECTABLE, + /** + * The concept identified in this property is a parent of the concept on which it is a property. The property type will be 'code'. The meaning of 'parent' is defined by the hierarchyMeaning attribute + */ + PARENT, + /** + * The concept identified in this property is a child of the concept on which it is a property. The property type will be 'code'. The meaning of 'child' is defined by the hierarchyMeaning attribute + */ + CHILD, + /** + * added to help the parsers + */ + NULL; + public static ConceptProperties fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("deprecated".equals(codeString)) + return DEPRECATED; + if ("notSelectable".equals(codeString)) + return NOTSELECTABLE; + if ("parent".equals(codeString)) + return PARENT; + if ("child".equals(codeString)) + return CHILD; + throw new FHIRException("Unknown ConceptProperties code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INACTIVE: return "inactive"; + case DEPRECATED: return "deprecated"; + case NOTSELECTABLE: return "notSelectable"; + case PARENT: return "parent"; + case CHILD: return "child"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/concept-properties"; + } + public String getDefinition() { + switch (this) { + case INACTIVE: return "True if the concept is not considered active - e.g. not a valid concept any more. Property type is boolean, default value is false"; + case DEPRECATED: return "The date at which a concept was deprecated. Concepts that are deprecated but not inactive can still be used, but their use is discouraged, and they should be expected to be made inactive in a future release. Property type is dateTime"; + case NOTSELECTABLE: return "The concept is not intended to be chosen by the user - only intended to be used as a selector for other concepts. Note, though, that the interpretation of this is highly contextual; all concepts are selectable in some context. Property type is boolean, default value is false"; + case PARENT: return "The concept identified in this property is a parent of the concept on which it is a property. The property type will be 'code'. The meaning of 'parent' is defined by the hierarchyMeaning attribute"; + case CHILD: return "The concept identified in this property is a child of the concept on which it is a property. The property type will be 'code'. The meaning of 'child' is defined by the hierarchyMeaning attribute"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INACTIVE: return "Inactive"; + case DEPRECATED: return "Deprecated"; + case NOTSELECTABLE: return "Not Selectable"; + case PARENT: return "Parent"; + case CHILD: return "Child"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertiesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertiesEnumFactory.java new file mode 100644 index 00000000000..c2042229517 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertiesEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConceptPropertiesEnumFactory implements EnumFactory { + + public ConceptProperties fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inactive".equals(codeString)) + return ConceptProperties.INACTIVE; + if ("deprecated".equals(codeString)) + return ConceptProperties.DEPRECATED; + if ("notSelectable".equals(codeString)) + return ConceptProperties.NOTSELECTABLE; + if ("parent".equals(codeString)) + return ConceptProperties.PARENT; + if ("child".equals(codeString)) + return ConceptProperties.CHILD; + throw new IllegalArgumentException("Unknown ConceptProperties code '"+codeString+"'"); + } + + public String toCode(ConceptProperties code) { + if (code == ConceptProperties.INACTIVE) + return "inactive"; + if (code == ConceptProperties.DEPRECATED) + return "deprecated"; + if (code == ConceptProperties.NOTSELECTABLE) + return "notSelectable"; + if (code == ConceptProperties.PARENT) + return "parent"; + if (code == ConceptProperties.CHILD) + return "child"; + return "?"; + } + + public String toSystem(ConceptProperties code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertyType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertyType.java new file mode 100644 index 00000000000..1b45a9b9561 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertyType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConceptPropertyType { + + /** + * The property value is a code that identifies a concept defined in the code system + */ + CODE, + /** + * The property value is a code defined in an external code system. This may be used for translations, but is not the intent + */ + CODING, + /** + * The property value is a string + */ + STRING, + /** + * The property value is a string (often used to assign ranking values to concepts for supporting score assessments) + */ + INTEGER, + /** + * The property value is a boolean true | false + */ + BOOLEAN, + /** + * The property is a date or a date + time + */ + DATETIME, + /** + * added to help the parsers + */ + NULL; + public static ConceptPropertyType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("code".equals(codeString)) + return CODE; + if ("Coding".equals(codeString)) + return CODING; + if ("string".equals(codeString)) + return STRING; + if ("integer".equals(codeString)) + return INTEGER; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("dateTime".equals(codeString)) + return DATETIME; + throw new FHIRException("Unknown ConceptPropertyType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CODE: return "code"; + case CODING: return "Coding"; + case STRING: return "string"; + case INTEGER: return "integer"; + case BOOLEAN: return "boolean"; + case DATETIME: return "dateTime"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/concept-property-type"; + } + public String getDefinition() { + switch (this) { + case CODE: return "The property value is a code that identifies a concept defined in the code system"; + case CODING: return "The property value is a code defined in an external code system. This may be used for translations, but is not the intent"; + case STRING: return "The property value is a string"; + case INTEGER: return "The property value is a string (often used to assign ranking values to concepts for supporting score assessments)"; + case BOOLEAN: return "The property value is a boolean true | false"; + case DATETIME: return "The property is a date or a date + time"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CODE: return "code (internal reference)"; + case CODING: return "Coding (external reference)"; + case STRING: return "string"; + case INTEGER: return "integer"; + case BOOLEAN: return "boolean"; + case DATETIME: return "dateTime"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertyTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertyTypeEnumFactory.java new file mode 100644 index 00000000000..812ba1b3c1c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptPropertyTypeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConceptPropertyTypeEnumFactory implements EnumFactory { + + public ConceptPropertyType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("code".equals(codeString)) + return ConceptPropertyType.CODE; + if ("Coding".equals(codeString)) + return ConceptPropertyType.CODING; + if ("string".equals(codeString)) + return ConceptPropertyType.STRING; + if ("integer".equals(codeString)) + return ConceptPropertyType.INTEGER; + if ("boolean".equals(codeString)) + return ConceptPropertyType.BOOLEAN; + if ("dateTime".equals(codeString)) + return ConceptPropertyType.DATETIME; + throw new IllegalArgumentException("Unknown ConceptPropertyType code '"+codeString+"'"); + } + + public String toCode(ConceptPropertyType code) { + if (code == ConceptPropertyType.CODE) + return "code"; + if (code == ConceptPropertyType.CODING) + return "Coding"; + if (code == ConceptPropertyType.STRING) + return "string"; + if (code == ConceptPropertyType.INTEGER) + return "integer"; + if (code == ConceptPropertyType.BOOLEAN) + return "boolean"; + if (code == ConceptPropertyType.DATETIME) + return "dateTime"; + return "?"; + } + + public String toSystem(ConceptPropertyType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptmapUnmappedMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptmapUnmappedMode.java new file mode 100644 index 00000000000..586f8423b53 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptmapUnmappedMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConceptmapUnmappedMode { + + /** + * Use the code as provided in the $translate request + */ + PROVIDED, + /** + * Use the code explicitly provided in the group.unmapped + */ + FIXED, + /** + * Use the map identified by the canonical URL in URL + */ + OTHERMAP, + /** + * added to help the parsers + */ + NULL; + public static ConceptmapUnmappedMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("provided".equals(codeString)) + return PROVIDED; + if ("fixed".equals(codeString)) + return FIXED; + if ("other-map".equals(codeString)) + return OTHERMAP; + throw new FHIRException("Unknown ConceptmapUnmappedMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROVIDED: return "provided"; + case FIXED: return "fixed"; + case OTHERMAP: return "other-map"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/conceptmap-unmapped-mode"; + } + public String getDefinition() { + switch (this) { + case PROVIDED: return "Use the code as provided in the $translate request"; + case FIXED: return "Use the code explicitly provided in the group.unmapped"; + case OTHERMAP: return "Use the map identified by the canonical URL in URL"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROVIDED: return "Provided Code"; + case FIXED: return "Fixed Code"; + case OTHERMAP: return "Other Map"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptmapUnmappedModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptmapUnmappedModeEnumFactory.java new file mode 100644 index 00000000000..6dbb4b8c2b6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConceptmapUnmappedModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConceptmapUnmappedModeEnumFactory implements EnumFactory { + + public ConceptmapUnmappedMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("provided".equals(codeString)) + return ConceptmapUnmappedMode.PROVIDED; + if ("fixed".equals(codeString)) + return ConceptmapUnmappedMode.FIXED; + if ("other-map".equals(codeString)) + return ConceptmapUnmappedMode.OTHERMAP; + throw new IllegalArgumentException("Unknown ConceptmapUnmappedMode code '"+codeString+"'"); + } + + public String toCode(ConceptmapUnmappedMode code) { + if (code == ConceptmapUnmappedMode.PROVIDED) + return "provided"; + if (code == ConceptmapUnmappedMode.FIXED) + return "fixed"; + if (code == ConceptmapUnmappedMode.OTHERMAP) + return "other-map"; + return "?"; + } + + public String toSystem(ConceptmapUnmappedMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionCategory.java new file mode 100644 index 00000000000..b7bf8ed3791 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionCategory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionCategory { + + /** + * An item on a problem list which can be managed over time and can be expressed by a practitioner (e.g. physician, nurse), patient, or related person. + */ + PROBLEMLISTITEM, + /** + * A point in time diagnosis (e.g. from a physician or nurse) in context of an encounter. + */ + ENCOUNTERDIAGNOSIS, + /** + * added to help the parsers + */ + NULL; + public static ConditionCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("problem-list-item".equals(codeString)) + return PROBLEMLISTITEM; + if ("encounter-diagnosis".equals(codeString)) + return ENCOUNTERDIAGNOSIS; + throw new FHIRException("Unknown ConditionCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROBLEMLISTITEM: return "problem-list-item"; + case ENCOUNTERDIAGNOSIS: return "encounter-diagnosis"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-category"; + } + public String getDefinition() { + switch (this) { + case PROBLEMLISTITEM: return "An item on a problem list which can be managed over time and can be expressed by a practitioner (e.g. physician, nurse), patient, or related person."; + case ENCOUNTERDIAGNOSIS: return "A point in time diagnosis (e.g. from a physician or nurse) in context of an encounter."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROBLEMLISTITEM: return "Problem List Item"; + case ENCOUNTERDIAGNOSIS: return "Encounter Diagnosis"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionCategoryEnumFactory.java new file mode 100644 index 00000000000..ecbc59fadd7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionCategoryEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConditionCategoryEnumFactory implements EnumFactory { + + public ConditionCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("problem-list-item".equals(codeString)) + return ConditionCategory.PROBLEMLISTITEM; + if ("encounter-diagnosis".equals(codeString)) + return ConditionCategory.ENCOUNTERDIAGNOSIS; + throw new IllegalArgumentException("Unknown ConditionCategory code '"+codeString+"'"); + } + + public String toCode(ConditionCategory code) { + if (code == ConditionCategory.PROBLEMLISTITEM) + return "problem-list-item"; + if (code == ConditionCategory.ENCOUNTERDIAGNOSIS) + return "encounter-diagnosis"; + return "?"; + } + + public String toSystem(ConditionCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionClinical.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionClinical.java new file mode 100644 index 00000000000..a5e87bd6967 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionClinical.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionClinical { + + /** + * The subject is currently experiencing the symptoms of the condition or there is evidence of the condition. + */ + ACTIVE, + /** + * The subject is experiencing a re-occurence or repeating of a previously resolved condition, e.g. urinary tract infection, pancreatitis, cholangitis, conjunctivitis. + */ + RECURRENCE, + /** + * The subject is experiencing a return of a condition, or signs and symptoms after a period of improvement or remission, e.g. relapse of cancer, multiple sclerosis, rheumatoid arthritis, systemic lupus erythematosus, bipolar disorder, [psychotic relapse of] schizophrenia, etc. + */ + RELAPSE, + /** + * The subject's condition is adequately or well managed such that the recommended evidence-based clinical outcome targets are met. + */ + WELLCONTROLLED, + /** + * The subject's condition is inadequately/poorly managed such that the recommended evidence-based clinical outcome targets are not met. + */ + POORLYCONTROLLED, + /** + * The subject is no longer experiencing the symptoms of the condition or there is no longer evidence of the condition. + */ + INACTIVE, + /** + * The subject is no longer experiencing the symptoms of the condition, but there is a risk of the symptoms returning. + */ + REMISSION, + /** + * The subject is no longer experiencing the symptoms of the condition and there is a negligible perceived risk of the symptoms returning. + */ + RESOLVED, + /** + * added to help the parsers + */ + NULL; + public static ConditionClinical fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("recurrence".equals(codeString)) + return RECURRENCE; + if ("relapse".equals(codeString)) + return RELAPSE; + if ("well-controlled".equals(codeString)) + return WELLCONTROLLED; + if ("poorly-controlled".equals(codeString)) + return POORLYCONTROLLED; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("remission".equals(codeString)) + return REMISSION; + if ("resolved".equals(codeString)) + return RESOLVED; + throw new FHIRException("Unknown ConditionClinical code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case RECURRENCE: return "recurrence"; + case RELAPSE: return "relapse"; + case WELLCONTROLLED: return "well-controlled"; + case POORLYCONTROLLED: return "poorly-controlled"; + case INACTIVE: return "inactive"; + case REMISSION: return "remission"; + case RESOLVED: return "resolved"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-clinical"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The subject is currently experiencing the symptoms of the condition or there is evidence of the condition."; + case RECURRENCE: return "The subject is experiencing a re-occurence or repeating of a previously resolved condition, e.g. urinary tract infection, pancreatitis, cholangitis, conjunctivitis."; + case RELAPSE: return "The subject is experiencing a return of a condition, or signs and symptoms after a period of improvement or remission, e.g. relapse of cancer, multiple sclerosis, rheumatoid arthritis, systemic lupus erythematosus, bipolar disorder, [psychotic relapse of] schizophrenia, etc."; + case WELLCONTROLLED: return "The subject's condition is adequately or well managed such that the recommended evidence-based clinical outcome targets are met."; + case POORLYCONTROLLED: return "The subject's condition is inadequately/poorly managed such that the recommended evidence-based clinical outcome targets are not met."; + case INACTIVE: return "The subject is no longer experiencing the symptoms of the condition or there is no longer evidence of the condition."; + case REMISSION: return "The subject is no longer experiencing the symptoms of the condition, but there is a risk of the symptoms returning."; + case RESOLVED: return "The subject is no longer experiencing the symptoms of the condition and there is a negligible perceived risk of the symptoms returning."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case RECURRENCE: return "Recurrence"; + case RELAPSE: return "Relapse"; + case WELLCONTROLLED: return "Well-Controlled"; + case POORLYCONTROLLED: return "Poorly-Controlled"; + case INACTIVE: return "Inactive"; + case REMISSION: return "Remission"; + case RESOLVED: return "Resolved"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionClinicalEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionClinicalEnumFactory.java new file mode 100644 index 00000000000..521a2bd345e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionClinicalEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConditionClinicalEnumFactory implements EnumFactory { + + public ConditionClinical fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ConditionClinical.ACTIVE; + if ("recurrence".equals(codeString)) + return ConditionClinical.RECURRENCE; + if ("relapse".equals(codeString)) + return ConditionClinical.RELAPSE; + if ("well-controlled".equals(codeString)) + return ConditionClinical.WELLCONTROLLED; + if ("poorly-controlled".equals(codeString)) + return ConditionClinical.POORLYCONTROLLED; + if ("inactive".equals(codeString)) + return ConditionClinical.INACTIVE; + if ("remission".equals(codeString)) + return ConditionClinical.REMISSION; + if ("resolved".equals(codeString)) + return ConditionClinical.RESOLVED; + throw new IllegalArgumentException("Unknown ConditionClinical code '"+codeString+"'"); + } + + public String toCode(ConditionClinical code) { + if (code == ConditionClinical.ACTIVE) + return "active"; + if (code == ConditionClinical.RECURRENCE) + return "recurrence"; + if (code == ConditionClinical.RELAPSE) + return "relapse"; + if (code == ConditionClinical.WELLCONTROLLED) + return "well-controlled"; + if (code == ConditionClinical.POORLYCONTROLLED) + return "poorly-controlled"; + if (code == ConditionClinical.INACTIVE) + return "inactive"; + if (code == ConditionClinical.REMISSION) + return "remission"; + if (code == ConditionClinical.RESOLVED) + return "resolved"; + return "?"; + } + + public String toSystem(ConditionClinical code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionState.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionState.java new file mode 100644 index 00000000000..19ad7cfafc3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionState.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionState { + + /** + * The condition is active. + */ + ACTIVE, + /** + * The condition is inactive, but not resolved. + */ + INACTIVE, + /** + * The condition is resolved. + */ + RESOLVED, + /** + * added to help the parsers + */ + NULL; + public static ConditionState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("resolved".equals(codeString)) + return RESOLVED; + throw new FHIRException("Unknown ConditionState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case RESOLVED: return "resolved"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-state"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The condition is active."; + case INACTIVE: return "The condition is inactive, but not resolved."; + case RESOLVED: return "The condition is resolved."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case RESOLVED: return "Resolved"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionStateEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionStateEnumFactory.java new file mode 100644 index 00000000000..66fc174e7e7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionStateEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConditionStateEnumFactory implements EnumFactory { + + public ConditionState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ConditionState.ACTIVE; + if ("inactive".equals(codeString)) + return ConditionState.INACTIVE; + if ("resolved".equals(codeString)) + return ConditionState.RESOLVED; + throw new IllegalArgumentException("Unknown ConditionState code '"+codeString+"'"); + } + + public String toCode(ConditionState code) { + if (code == ConditionState.ACTIVE) + return "active"; + if (code == ConditionState.INACTIVE) + return "inactive"; + if (code == ConditionState.RESOLVED) + return "resolved"; + return "?"; + } + + public String toSystem(ConditionState code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionVerStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionVerStatus.java new file mode 100644 index 00000000000..1d28afe56bd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionVerStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionVerStatus { + + /** + * There is not sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition. + */ + UNCONFIRMED, + /** + * This is a tentative diagnosis - still a candidate that is under consideration. + */ + PROVISIONAL, + /** + * One of a set of potential (and typically mutually exclusive) diagnoses asserted to further guide the diagnostic process and preliminary treatment. + */ + DIFFERENTIAL, + /** + * There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition. + */ + CONFIRMED, + /** + * This condition has been ruled out by diagnostic and clinical evidence. + */ + REFUTED, + /** + * The statement was entered in error and is not valid. + */ + ENTEREDINERROR, + /** + * The condition status is unknown. Note that "unknown" is a value of last resort and every attempt should be made to provide a meaningful value other than "unknown". + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ConditionVerStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unconfirmed".equals(codeString)) + return UNCONFIRMED; + if ("provisional".equals(codeString)) + return PROVISIONAL; + if ("differential".equals(codeString)) + return DIFFERENTIAL; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("refuted".equals(codeString)) + return REFUTED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ConditionVerStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNCONFIRMED: return "unconfirmed"; + case PROVISIONAL: return "provisional"; + case DIFFERENTIAL: return "differential"; + case CONFIRMED: return "confirmed"; + case REFUTED: return "refuted"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/condition-ver-status"; + } + public String getDefinition() { + switch (this) { + case UNCONFIRMED: return "There is not sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition."; + case PROVISIONAL: return "This is a tentative diagnosis - still a candidate that is under consideration."; + case DIFFERENTIAL: return "One of a set of potential (and typically mutually exclusive) diagnoses asserted to further guide the diagnostic process and preliminary treatment."; + case CONFIRMED: return "There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition."; + case REFUTED: return "This condition has been ruled out by diagnostic and clinical evidence."; + case ENTEREDINERROR: return "The statement was entered in error and is not valid."; + case UNKNOWN: return "The condition status is unknown. Note that \"unknown\" is a value of last resort and every attempt should be made to provide a meaningful value other than \"unknown\"."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNCONFIRMED: return "Unconfirmed"; + case PROVISIONAL: return "Provisional"; + case DIFFERENTIAL: return "Differential"; + case CONFIRMED: return "Confirmed"; + case REFUTED: return "Refuted"; + case ENTEREDINERROR: return "Entered In Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionVerStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionVerStatusEnumFactory.java new file mode 100644 index 00000000000..d0589ad8bd4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionVerStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConditionVerStatusEnumFactory implements EnumFactory { + + public ConditionVerStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unconfirmed".equals(codeString)) + return ConditionVerStatus.UNCONFIRMED; + if ("provisional".equals(codeString)) + return ConditionVerStatus.PROVISIONAL; + if ("differential".equals(codeString)) + return ConditionVerStatus.DIFFERENTIAL; + if ("confirmed".equals(codeString)) + return ConditionVerStatus.CONFIRMED; + if ("refuted".equals(codeString)) + return ConditionVerStatus.REFUTED; + if ("entered-in-error".equals(codeString)) + return ConditionVerStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return ConditionVerStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown ConditionVerStatus code '"+codeString+"'"); + } + + public String toCode(ConditionVerStatus code) { + if (code == ConditionVerStatus.UNCONFIRMED) + return "unconfirmed"; + if (code == ConditionVerStatus.PROVISIONAL) + return "provisional"; + if (code == ConditionVerStatus.DIFFERENTIAL) + return "differential"; + if (code == ConditionVerStatus.CONFIRMED) + return "confirmed"; + if (code == ConditionVerStatus.REFUTED) + return "refuted"; + if (code == ConditionVerStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == ConditionVerStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(ConditionVerStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalDeleteStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalDeleteStatus.java new file mode 100644 index 00000000000..e4aec8f5697 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalDeleteStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionalDeleteStatus { + + /** + * No support for conditional deletes. + */ + NOTSUPPORTED, + /** + * Conditional deletes are supported, but only single resources at a time. + */ + SINGLE, + /** + * Conditional deletes are supported, and multiple resources can be deleted in a single interaction. + */ + MULTIPLE, + /** + * added to help the parsers + */ + NULL; + public static ConditionalDeleteStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("single".equals(codeString)) + return SINGLE; + if ("multiple".equals(codeString)) + return MULTIPLE; + throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSUPPORTED: return "not-supported"; + case SINGLE: return "single"; + case MULTIPLE: return "multiple"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/conditional-delete-status"; + } + public String getDefinition() { + switch (this) { + case NOTSUPPORTED: return "No support for conditional deletes."; + case SINGLE: return "Conditional deletes are supported, but only single resources at a time."; + case MULTIPLE: return "Conditional deletes are supported, and multiple resources can be deleted in a single interaction."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSUPPORTED: return "Not Supported"; + case SINGLE: return "Single Deletes Supported"; + case MULTIPLE: return "Multiple Deletes Supported"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalDeleteStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalDeleteStatusEnumFactory.java new file mode 100644 index 00000000000..1d0ee542367 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalDeleteStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConditionalDeleteStatusEnumFactory implements EnumFactory { + + public ConditionalDeleteStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return ConditionalDeleteStatus.NOTSUPPORTED; + if ("single".equals(codeString)) + return ConditionalDeleteStatus.SINGLE; + if ("multiple".equals(codeString)) + return ConditionalDeleteStatus.MULTIPLE; + throw new IllegalArgumentException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); + } + + public String toCode(ConditionalDeleteStatus code) { + if (code == ConditionalDeleteStatus.NOTSUPPORTED) + return "not-supported"; + if (code == ConditionalDeleteStatus.SINGLE) + return "single"; + if (code == ConditionalDeleteStatus.MULTIPLE) + return "multiple"; + return "?"; + } + + public String toSystem(ConditionalDeleteStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalReadStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalReadStatus.java new file mode 100644 index 00000000000..556587d9ab7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalReadStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConditionalReadStatus { + + /** + * No support for conditional deletes. + */ + NOTSUPPORTED, + /** + * Conditional reads are supported, but only with the If-Modified-Since HTTP Header. + */ + MODIFIEDSINCE, + /** + * Conditional reads are supported, but only with the If-None-Match HTTP Header. + */ + NOTMATCH, + /** + * Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers. + */ + FULLSUPPORT, + /** + * added to help the parsers + */ + NULL; + public static ConditionalReadStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("modified-since".equals(codeString)) + return MODIFIEDSINCE; + if ("not-match".equals(codeString)) + return NOTMATCH; + if ("full-support".equals(codeString)) + return FULLSUPPORT; + throw new FHIRException("Unknown ConditionalReadStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSUPPORTED: return "not-supported"; + case MODIFIEDSINCE: return "modified-since"; + case NOTMATCH: return "not-match"; + case FULLSUPPORT: return "full-support"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/conditional-read-status"; + } + public String getDefinition() { + switch (this) { + case NOTSUPPORTED: return "No support for conditional deletes."; + case MODIFIEDSINCE: return "Conditional reads are supported, but only with the If-Modified-Since HTTP Header."; + case NOTMATCH: return "Conditional reads are supported, but only with the If-None-Match HTTP Header."; + case FULLSUPPORT: return "Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSUPPORTED: return "Not Supported"; + case MODIFIEDSINCE: return "If-Modified-Since"; + case NOTMATCH: return "If-None-Match"; + case FULLSUPPORT: return "Full Support"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalReadStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalReadStatusEnumFactory.java new file mode 100644 index 00000000000..24f4c4c8822 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConditionalReadStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConditionalReadStatusEnumFactory implements EnumFactory { + + public ConditionalReadStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return ConditionalReadStatus.NOTSUPPORTED; + if ("modified-since".equals(codeString)) + return ConditionalReadStatus.MODIFIEDSINCE; + if ("not-match".equals(codeString)) + return ConditionalReadStatus.NOTMATCH; + if ("full-support".equals(codeString)) + return ConditionalReadStatus.FULLSUPPORT; + throw new IllegalArgumentException("Unknown ConditionalReadStatus code '"+codeString+"'"); + } + + public String toCode(ConditionalReadStatus code) { + if (code == ConditionalReadStatus.NOTSUPPORTED) + return "not-supported"; + if (code == ConditionalReadStatus.MODIFIEDSINCE) + return "modified-since"; + if (code == ConditionalReadStatus.NOTMATCH) + return "not-match"; + if (code == ConditionalReadStatus.FULLSUPPORT) + return "full-support"; + return "?"; + } + + public String toSystem(ConditionalReadStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConformanceExpectation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConformanceExpectation.java new file mode 100644 index 00000000000..d9a4520e352 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConformanceExpectation.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConformanceExpectation { + + /** + * Support for the specified capability is required to be considered conformant. + */ + SHALL, + /** + * Support for the specified capability is strongly encouraged, and failure to support it should only occur after careful consideration. + */ + SHOULD, + /** + * Support for the specified capability is not necessary to be considered conformant, and the requirement should be considered strictly optional. + */ + MAY, + /** + * Support for the specified capability is strongly discouraged and should occur only after careful consideration. + */ + SHOULDNOT, + /** + * added to help the parsers + */ + NULL; + public static ConformanceExpectation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHALL".equals(codeString)) + return SHALL; + if ("SHOULD".equals(codeString)) + return SHOULD; + if ("MAY".equals(codeString)) + return MAY; + if ("SHOULD-NOT".equals(codeString)) + return SHOULDNOT; + throw new FHIRException("Unknown ConformanceExpectation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SHALL: return "SHALL"; + case SHOULD: return "SHOULD"; + case MAY: return "MAY"; + case SHOULDNOT: return "SHOULD-NOT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/conformance-expectation"; + } + public String getDefinition() { + switch (this) { + case SHALL: return "Support for the specified capability is required to be considered conformant."; + case SHOULD: return "Support for the specified capability is strongly encouraged, and failure to support it should only occur after careful consideration."; + case MAY: return "Support for the specified capability is not necessary to be considered conformant, and the requirement should be considered strictly optional."; + case SHOULDNOT: return "Support for the specified capability is strongly discouraged and should occur only after careful consideration."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SHALL: return "SHALL"; + case SHOULD: return "SHOULD"; + case MAY: return "MAY"; + case SHOULDNOT: return "SHOULD-NOT"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConformanceExpectationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConformanceExpectationEnumFactory.java new file mode 100644 index 00000000000..3e83d31e773 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConformanceExpectationEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConformanceExpectationEnumFactory implements EnumFactory { + + public ConformanceExpectation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHALL".equals(codeString)) + return ConformanceExpectation.SHALL; + if ("SHOULD".equals(codeString)) + return ConformanceExpectation.SHOULD; + if ("MAY".equals(codeString)) + return ConformanceExpectation.MAY; + if ("SHOULD-NOT".equals(codeString)) + return ConformanceExpectation.SHOULDNOT; + throw new IllegalArgumentException("Unknown ConformanceExpectation code '"+codeString+"'"); + } + + public String toCode(ConformanceExpectation code) { + if (code == ConformanceExpectation.SHALL) + return "SHALL"; + if (code == ConformanceExpectation.SHOULD) + return "SHOULD"; + if (code == ConformanceExpectation.MAY) + return "MAY"; + if (code == ConformanceExpectation.SHOULDNOT) + return "SHOULD-NOT"; + return "?"; + } + + public String toSystem(ConformanceExpectation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentAction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentAction.java new file mode 100644 index 00000000000..021ae109893 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentAction.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConsentAction { + + /** + * Gather/acquire information by an entity to achieve a stated purpose + */ + COLLECT, + /** + * Provide an entity access to information to achieve a stated purpose + */ + ACCESS, + /** + * Use of stored information by an entity fo the stated purpose + */ + USE, + /** + * Release / transfer of information to an entity + */ + DISCLOSE, + /** + * Allowing an entity to correct a patient's information + */ + CORRECT, + /** + * added to help the parsers + */ + NULL; + public static ConsentAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("collect".equals(codeString)) + return COLLECT; + if ("access".equals(codeString)) + return ACCESS; + if ("use".equals(codeString)) + return USE; + if ("disclose".equals(codeString)) + return DISCLOSE; + if ("correct".equals(codeString)) + return CORRECT; + throw new FHIRException("Unknown ConsentAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COLLECT: return "collect"; + case ACCESS: return "access"; + case USE: return "use"; + case DISCLOSE: return "disclose"; + case CORRECT: return "correct"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/consentaction"; + } + public String getDefinition() { + switch (this) { + case COLLECT: return "Gather/acquire information by an entity to achieve a stated purpose"; + case ACCESS: return "Provide an entity access to information to achieve a stated purpose"; + case USE: return "Use of stored information by an entity fo the stated purpose"; + case DISCLOSE: return "Release / transfer of information to an entity "; + case CORRECT: return "Allowing an entity to correct a patient's information"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COLLECT: return "Collect"; + case ACCESS: return "Access"; + case USE: return "Use"; + case DISCLOSE: return "Disclose"; + case CORRECT: return "Access and Correct"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentActionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentActionEnumFactory.java new file mode 100644 index 00000000000..ddbb24e5956 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentActionEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConsentActionEnumFactory implements EnumFactory { + + public ConsentAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("collect".equals(codeString)) + return ConsentAction.COLLECT; + if ("access".equals(codeString)) + return ConsentAction.ACCESS; + if ("use".equals(codeString)) + return ConsentAction.USE; + if ("disclose".equals(codeString)) + return ConsentAction.DISCLOSE; + if ("correct".equals(codeString)) + return ConsentAction.CORRECT; + throw new IllegalArgumentException("Unknown ConsentAction code '"+codeString+"'"); + } + + public String toCode(ConsentAction code) { + if (code == ConsentAction.COLLECT) + return "collect"; + if (code == ConsentAction.ACCESS) + return "access"; + if (code == ConsentAction.USE) + return "use"; + if (code == ConsentAction.DISCLOSE) + return "disclose"; + if (code == ConsentAction.CORRECT) + return "correct"; + return "?"; + } + + public String toSystem(ConsentAction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentCategory.java new file mode 100644 index 00000000000..04f6a4e8bfe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentCategory.java @@ -0,0 +1,312 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConsentCategory { + + /** + * Required elements in a written consent to a disclosure of information governed under 42 CFR Part 2. http://www.ecfr.gov/cgi-bin/text-idx?SID=69c4339acd2df9fab9dcbed15181917b&mc=true&node=pt42.1.2&rgn=div5 + */ + _42CFR2, + /** + * Any instructions, written or given verbally by a patient to a health care provider in anticipation of potential need for medical treatment. [2005 Honor My Wishes] + */ + ACD, + /** + * 45 CFR part 46 §46.116 General requirements for informed consent; and §46.117 Documentation of informed consent. https://www.gpo.gov/fdsys/pkg/FR-2017-01-19/pdf/2017-01058.pdf + */ + CRIC, + /** + * A legal document, signed by both the patient and their provider, stating a desire not to have CPR initiated in case of a cardiac event. Note: This form was replaced in 2003 with the Physician Orders for Life-Sustaining Treatment [POLST]. + */ + DNR, + /** + * Opt-in to disclosure of health information for emergency only consent directive. Comment: This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations. [ActConsentDirective (2.16.840.1.113883.1.11.20425)] + */ + EMRGONLY, + /** + * The consent to the performance of a medical or surgical procedure by a physician licensed to practice medicine and surgery, a licensed advanced practice nurse, or a licensed physician assistant executed by a married person who is a minor, by a parent who is a minor, by a pregnant woman who is a minor, or by any person 18 years of age or older, is not voidable because of such minority, and, for such purpose, a married person who is a minor, a parent who is a minor, a pregnant woman who is a minor, or any person 18 years of age or older, is deemed to have the same legal capacity to act and has the same powers and obligations as has a person of legal age. Consent by Minors to Medical Procedures Act. (410 ILCS 210/0.01) (from Ch. 111, par. 4500) Sec. 0.01. Short title. This Act may be cited as the Consent by Minors to Medical Procedures Act. (Source: P.A. 86-1324.) http://www.ilga.gov/legislation/ilcs/ilcs3.asp?ActID=1539&ChapterID=35 + */ + ILLINOISMINORPROCEDURE, + /** + * Patient’s document telling patient’s health care provider what the patient wants or does not want if the patient is diagnosed as being terminally ill and in a persistent vegetative state or in a permanently unconscious condition.[2005 Honor My Wishes] + */ + HCD, + /** + * HIPAA 45 CFR Section 164.508 Uses and disclosures for which an authorization is required. (a) Standard: Authorizations for uses and disclosures. (1) Authorization required: General rule. Except as otherwise permitted or required by this subchapter, a covered entity may not use or disclose protected health information without an authorization that is valid under this section. When a covered entity obtains or receives a valid authorization for its use or disclosure of protected health information, such use or disclosure must be consistent with such authorization. Usage Note: Authorizations governed under this regulation meet the definition of an opt in class of consent directive. + */ + HIPAAAUTH, + /** + * § 164.520 — Notice of privacy practices for protected health information. (1) Right to notice. Except as provided by paragraph (a)(2) or (3) of this section, an individual has a right to adequate notice of the uses and disclosures of protected health information that may be made by the covered entity, and of the individual's rights and the covered entity's legal duties with respect to protected health information. Usage Note: Restrictions governed under this regulation meet the definition of an implied with an opportunity to dissent class of consent directive. + */ + HIPAANPP, + /** + * HIPAA 45 CFR § 164.510 - Uses and disclosures requiring an opportunity for the individual to agree or to object. A covered entity may use or disclose protected health information, provided that the individual is informed in advance of the use or disclosure and has the opportunity to agree to or prohibit or restrict the use or disclosure, in accordance with the applicable requirements of this section. The covered entity may orally inform the individual of and obtain the individual's oral agreement or objection to a use or disclosure permitted by this section. Usage Note: Restrictions governed under this regulation meet the definition of an opt out with exception class of consent directive. + */ + HIPAARESTRICTIONS, + /** + * HIPAA 45 CFR § 164.508 - Uses and disclosures for which an authorization is required. (a) Standard: Authorizations for uses and disclosures. (3) Compound authorizations. An authorization for use or disclosure of protected health information may not be combined with any other document to create a compound authorization, except as follows: (i) An authorization for the use or disclosure of protected health information for a research study may be combined with any other type of written permission for the same or another research study. This exception includes combining an authorization for the use or disclosure of protected health information for a research study with another authorization for the same research study, with an authorization for the creation or maintenance of a research database or repository, or with a consent to participate in research. Where a covered health care provider has conditioned the provision of research-related treatment on the provision of one of the authorizations, as permitted under paragraph (b)(4)(i) of this section, any compound authorization created under this paragraph must clearly differentiate between the conditioned and unconditioned components and provide the individual with an opportunity to opt in to the research activities described in the unconditioned authorization. Usage Notes: See HHS http://www.hhs.gov/hipaa/for-professionals/special-topics/research/index.html and OCR http://www.hhs.gov/hipaa/for-professionals/special-topics/research/index.html + */ + HIPAARESEARCH, + /** + * HIPAA 45 CFR § 164.522(a)—Right To Request a Restriction of Uses and Disclosures. (vi) A covered entity must agree to the request of an individual to restrict disclosure of protected health information about the individual to a health plan if: (A) The disclosure is for the purpose of carrying out payment or health care operations and is not otherwise required by law; and (B) The protected health information pertains solely to a health care item or service for which the individual, or person other than the health plan on behalf of the individual, has paid the covered entity in full. Usage Note: Restrictions governed under this regulation meet the definition of an opt out with exception class of consent directive. Opt out is limited to disclosures to a payer for payment and operations purpose of use. See HL7 HIPAA Self-Pay code in ActPrivacyLaw (2.16.840.1.113883.1.11.20426). + */ + HIPAASELFPAY, + /** + * On January 1, 2015, the Michigan Department of Health and Human Services (MDHHS) released a standard consent form for the sharing of health information specific to behavioral health and substance use treatment in accordance with Public Act 129 of 2014. In Michigan, while providers are not required to use this new standard form (MDHHS-5515), they are required to accept it. Note: Form is available at http://www.michigan.gov/documents/mdhhs/Consent_to_Share_Behavioral_Health_Information_for_Care_Coordination_Purposes_548835_7.docx For more information see http://www.michigan.gov/documents/mdhhs/Behavioral_Health_Consent_Form_Background_Information_548864_7.pdf + */ + MDHHS5515, + /** + * The New York State Surgical and Invasive Procedure Protocol (NYSSIPP) applies to all operative and invasive procedures including endoscopy, general surgery or interventional radiology. Other procedures that involve puncture or incision of the skin, or insertion of an instrument or foreign material into the body are within the scope of the protocol. This protocol also applies to those anesthesia procedures either prior to a surgical procedure or independent of a surgical procedure such as spinal facet blocks. Example: Certain 'minor' procedures such as venipuncture, peripheral IV placement, insertion of nasogastric tube and foley catheter insertion are not within the scope of the protocol. From http://www.health.ny.gov/professionals/protocols_and_guidelines/surgical_and_invasive_procedure/nyssipp_faq.htm Note: HHC 100B-1 Form is available at http://www.downstate.edu/emergency_medicine/documents/Consent_CT_with_contrast.pdf + */ + NYSSIPP, + /** + * Acknowledgement of custodian notice of privacy practices. Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified. [ActConsentDirective (2.16.840.1.113883.1.11.20425)] + */ + NPP, + /** + * The Physician Order for Life-Sustaining Treatment form records a person’s health care wishes for end of life emergency treatment and translates them into an order by the physician. It must be reviewed and signed by both the patient and the physician, Advanced Registered Nurse Practitioner or Physician Assistant. [2005 Honor My Wishes] Comment: Opt-in Consent Directive with restrictions. + */ + POLST, + /** + * Consent to have healthcare information in an electronic health record accessed for research purposes. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)] + */ + RESEARCH, + /** + * Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897) + */ + RSDID, + /** + * Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)] + */ + RSREID, + /** + * SSA Form SSA-827 (Authorization to Disclose Information to the Social Security Administration (SSA))and its affiliated State disability determination services use Form SSA-827, Authorization to Disclose Information to the Social Security Administration (SSA) to obtain medical and other information needed to determine whether or not a claimant is disabled. Comment: Opt-in Consent Directive. Note: Form is available at https://www.socialsecurity.gov/forms/ssa-827-inst-sp.pdf + */ + SSA827, + /** + * VA Form 10-0484 Revocation for Release of Individually-Identifiable Health Information enables a veteran to revoke authorization for the VA to release specified copies of individually-identifiable health information with the non-VA health care provider organizations participating in the eHealth Exchange and partnering with VA. Comment: Opt-in Consent Directive with status = rescinded (aka 'revoked'). Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-0484-fill.pdf + */ + VA100484, + /** + * VA Form 10-0485 Request for and Authorization to Release Protected Health Information to eHealth Exchange enables a veteran to request and authorize a VA health care facility to release protected health information (PHI) for treatment purposes only to the communities that are participating in the eHealth Exchange, VLER Directive, and other Health Information Exchanges with who VA has an agreement. This information may consist of the diagnosis of Sickle Cell Anemia, the treatment of or referral for Drug Abuse, treatment of or referral for Alcohol Abuse or the treatment of or testing for infection with Human Immunodeficiency Virus. This authorization covers the diagnoses that I may have upon signing of the authorization and the diagnoses that I may acquire in the future including those protected by 38 U.S.C. 7332. Comment: Opt-in Consent Directive. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/10-0485-fill.pdf + */ + VA100485, + /** + * VA Form 10-5345 Request for and Authorization to Release Medical Records or Health Information enables a veteran to request and authorize the VA to release specified copies of protected health information (PHI), such as hospital summary or outpatient treatment notes, which may include information about conditions governed under Title 38 Section 7332 (drug abuse, alcoholism or alcohol abuse, testing for or infection with HIV, and sickle cell anemia). Comment: Opt-in Consent Directive. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-5345-fill.pdf + */ + VA105345, + /** + * VA Form 10-5345a Individuals' Request for a Copy of Their Own Health Information enables a veteran to request and authorize the VA to release specified copies of protected health information (PHI), such as hospital summary or outpatient treatment notes. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-5345a-fill.pdf + */ + VA105345A, + /** + * VA Form 10-5345a-MHV Individual’s Request for a Copy of their own health information from MyHealtheVet enables a veteran to receive a copy of all available personal health information to be delivered through the veteran’s My HealtheVet account. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-5345a-MHV-fill.pdf + */ + VA105345AMHV, + /** + * VA Form 10-10116 Revocation of Authorization for Use and Release of Individually Identifiable Health Information for Veterans Health Administration Research. Comment: Opt-in with Restriction Consent Directive with status = 'completed'. Note: Form is available at http://www.northerncalifornia.va.gov/northerncalifornia/services/rnd/docs/vha-10-10116.pdf + */ + VA1010116, + /** + * VA Form 21-4142 (Authorization and Consent to Release Information to the Department of Veterans Affairs (VA) enables a veteran to authorize the US Veterans Administration [VA] to request veteran’s health information from non-VA providers. Aka VA Compensation Application Note: Form is available at http://www.vba.va.gov/pubs/forms/VBA-21-4142-ARE.pdf . For additional information regarding VA Form 21-4142, refer to the following website: www.benefits.va.gov/compensation/consent_privateproviders + */ + VA214142, + /** + * added to help the parsers + */ + NULL; + public static ConsentCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("42-CFR-2".equals(codeString)) + return _42CFR2; + if ("ACD".equals(codeString)) + return ACD; + if ("CRIC".equals(codeString)) + return CRIC; + if ("DNR".equals(codeString)) + return DNR; + if ("EMRGONLY".equals(codeString)) + return EMRGONLY; + if ("Illinois-Minor-Procedure".equals(codeString)) + return ILLINOISMINORPROCEDURE; + if ("HCD".equals(codeString)) + return HCD; + if ("HIPAA-Auth".equals(codeString)) + return HIPAAAUTH; + if ("HIPAA-NPP".equals(codeString)) + return HIPAANPP; + if ("HIPAA-Restrictions".equals(codeString)) + return HIPAARESTRICTIONS; + if ("HIPAA-Research".equals(codeString)) + return HIPAARESEARCH; + if ("HIPAA-Self-Pay".equals(codeString)) + return HIPAASELFPAY; + if ("MDHHS-5515".equals(codeString)) + return MDHHS5515; + if ("NYSSIPP".equals(codeString)) + return NYSSIPP; + if ("NPP".equals(codeString)) + return NPP; + if ("POLST".equals(codeString)) + return POLST; + if ("RESEARCH".equals(codeString)) + return RESEARCH; + if ("RSDID".equals(codeString)) + return RSDID; + if ("RSREID".equals(codeString)) + return RSREID; + if ("SSA-827".equals(codeString)) + return SSA827; + if ("VA-10-0484".equals(codeString)) + return VA100484; + if ("VA-10-0485".equals(codeString)) + return VA100485; + if ("VA-10-5345".equals(codeString)) + return VA105345; + if ("VA-10-5345a".equals(codeString)) + return VA105345A; + if ("VA-10-5345a-MHV".equals(codeString)) + return VA105345AMHV; + if ("VA-10-10116".equals(codeString)) + return VA1010116; + if ("VA-21-4142".equals(codeString)) + return VA214142; + throw new FHIRException("Unknown ConsentCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _42CFR2: return "42-CFR-2"; + case ACD: return "ACD"; + case CRIC: return "CRIC"; + case DNR: return "DNR"; + case EMRGONLY: return "EMRGONLY"; + case ILLINOISMINORPROCEDURE: return "Illinois-Minor-Procedure"; + case HCD: return "HCD"; + case HIPAAAUTH: return "HIPAA-Auth"; + case HIPAANPP: return "HIPAA-NPP"; + case HIPAARESTRICTIONS: return "HIPAA-Restrictions"; + case HIPAARESEARCH: return "HIPAA-Research"; + case HIPAASELFPAY: return "HIPAA-Self-Pay"; + case MDHHS5515: return "MDHHS-5515"; + case NYSSIPP: return "NYSSIPP"; + case NPP: return "NPP"; + case POLST: return "POLST"; + case RESEARCH: return "RESEARCH"; + case RSDID: return "RSDID"; + case RSREID: return "RSREID"; + case SSA827: return "SSA-827"; + case VA100484: return "VA-10-0484"; + case VA100485: return "VA-10-0485"; + case VA105345: return "VA-10-5345"; + case VA105345A: return "VA-10-5345a"; + case VA105345AMHV: return "VA-10-5345a-MHV"; + case VA1010116: return "VA-10-10116"; + case VA214142: return "VA-21-4142"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/consentcategorycodes"; + } + public String getDefinition() { + switch (this) { + case _42CFR2: return "Required elements in a written consent to a disclosure of information governed under 42 CFR Part 2. http://www.ecfr.gov/cgi-bin/text-idx?SID=69c4339acd2df9fab9dcbed15181917b&mc=true&node=pt42.1.2&rgn=div5"; + case ACD: return "Any instructions, written or given verbally by a patient to a health care provider in anticipation of potential need for medical treatment. [2005 Honor My Wishes]"; + case CRIC: return "45 CFR part 46 §46.116 General requirements for informed consent; and §46.117 Documentation of informed consent. https://www.gpo.gov/fdsys/pkg/FR-2017-01-19/pdf/2017-01058.pdf"; + case DNR: return "A legal document, signed by both the patient and their provider, stating a desire not to have CPR initiated in case of a cardiac event. Note: This form was replaced in 2003 with the Physician Orders for Life-Sustaining Treatment [POLST]."; + case EMRGONLY: return "Opt-in to disclosure of health information for emergency only consent directive. Comment: This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations. [ActConsentDirective (2.16.840.1.113883.1.11.20425)]"; + case ILLINOISMINORPROCEDURE: return "The consent to the performance of a medical or surgical procedure by a physician licensed to practice medicine and surgery, a licensed advanced practice nurse, or a licensed physician assistant executed by a married person who is a minor, by a parent who is a minor, by a pregnant woman who is a minor, or by any person 18 years of age or older, is not voidable because of such minority, and, for such purpose, a married person who is a minor, a parent who is a minor, a pregnant woman who is a minor, or any person 18 years of age or older, is deemed to have the same legal capacity to act and has the same powers and obligations as has a person of legal age. Consent by Minors to Medical Procedures Act. (410 ILCS 210/0.01) (from Ch. 111, par. 4500) Sec. 0.01. Short title. This Act may be cited as the Consent by Minors to Medical Procedures Act. (Source: P.A. 86-1324.) http://www.ilga.gov/legislation/ilcs/ilcs3.asp?ActID=1539&ChapterID=35"; + case HCD: return "Patient’s document telling patient’s health care provider what the patient wants or does not want if the patient is diagnosed as being terminally ill and in a persistent vegetative state or in a permanently unconscious condition.[2005 Honor My Wishes]"; + case HIPAAAUTH: return "HIPAA 45 CFR Section 164.508 Uses and disclosures for which an authorization is required. (a) Standard: Authorizations for uses and disclosures. (1) Authorization required: General rule. Except as otherwise permitted or required by this subchapter, a covered entity may not use or disclose protected health information without an authorization that is valid under this section. When a covered entity obtains or receives a valid authorization for its use or disclosure of protected health information, such use or disclosure must be consistent with such authorization. Usage Note: Authorizations governed under this regulation meet the definition of an opt in class of consent directive."; + case HIPAANPP: return "§ 164.520 — Notice of privacy practices for protected health information. (1) Right to notice. Except as provided by paragraph (a)(2) or (3) of this section, an individual has a right to adequate notice of the uses and disclosures of protected health information that may be made by the covered entity, and of the individual's rights and the covered entity's legal duties with respect to protected health information. Usage Note: Restrictions governed under this regulation meet the definition of an implied with an opportunity to dissent class of consent directive."; + case HIPAARESTRICTIONS: return "HIPAA 45 CFR § 164.510 - Uses and disclosures requiring an opportunity for the individual to agree or to object. A covered entity may use or disclose protected health information, provided that the individual is informed in advance of the use or disclosure and has the opportunity to agree to or prohibit or restrict the use or disclosure, in accordance with the applicable requirements of this section. The covered entity may orally inform the individual of and obtain the individual's oral agreement or objection to a use or disclosure permitted by this section. Usage Note: Restrictions governed under this regulation meet the definition of an opt out with exception class of consent directive."; + case HIPAARESEARCH: return "HIPAA 45 CFR § 164.508 - Uses and disclosures for which an authorization is required. (a) Standard: Authorizations for uses and disclosures. (3) Compound authorizations. An authorization for use or disclosure of protected health information may not be combined with any other document to create a compound authorization, except as follows: (i) An authorization for the use or disclosure of protected health information for a research study may be combined with any other type of written permission for the same or another research study. This exception includes combining an authorization for the use or disclosure of protected health information for a research study with another authorization for the same research study, with an authorization for the creation or maintenance of a research database or repository, or with a consent to participate in research. Where a covered health care provider has conditioned the provision of research-related treatment on the provision of one of the authorizations, as permitted under paragraph (b)(4)(i) of this section, any compound authorization created under this paragraph must clearly differentiate between the conditioned and unconditioned components and provide the individual with an opportunity to opt in to the research activities described in the unconditioned authorization. Usage Notes: See HHS http://www.hhs.gov/hipaa/for-professionals/special-topics/research/index.html and OCR http://www.hhs.gov/hipaa/for-professionals/special-topics/research/index.html"; + case HIPAASELFPAY: return "HIPAA 45 CFR § 164.522(a)—Right To Request a Restriction of Uses and Disclosures. (vi) A covered entity must agree to the request of an individual to restrict disclosure of protected health information about the individual to a health plan if: (A) The disclosure is for the purpose of carrying out payment or health care operations and is not otherwise required by law; and (B) The protected health information pertains solely to a health care item or service for which the individual, or person other than the health plan on behalf of the individual, has paid the covered entity in full. Usage Note: Restrictions governed under this regulation meet the definition of an opt out with exception class of consent directive. Opt out is limited to disclosures to a payer for payment and operations purpose of use. See HL7 HIPAA Self-Pay code in ActPrivacyLaw (2.16.840.1.113883.1.11.20426)."; + case MDHHS5515: return "On January 1, 2015, the Michigan Department of Health and Human Services (MDHHS) released a standard consent form for the sharing of health information specific to behavioral health and substance use treatment in accordance with Public Act 129 of 2014. In Michigan, while providers are not required to use this new standard form (MDHHS-5515), they are required to accept it. Note: Form is available at http://www.michigan.gov/documents/mdhhs/Consent_to_Share_Behavioral_Health_Information_for_Care_Coordination_Purposes_548835_7.docx For more information see http://www.michigan.gov/documents/mdhhs/Behavioral_Health_Consent_Form_Background_Information_548864_7.pdf"; + case NYSSIPP: return "The New York State Surgical and Invasive Procedure Protocol (NYSSIPP) applies to all operative and invasive procedures including endoscopy, general surgery or interventional radiology. Other procedures that involve puncture or incision of the skin, or insertion of an instrument or foreign material into the body are within the scope of the protocol. This protocol also applies to those anesthesia procedures either prior to a surgical procedure or independent of a surgical procedure such as spinal facet blocks. Example: Certain 'minor' procedures such as venipuncture, peripheral IV placement, insertion of nasogastric tube and foley catheter insertion are not within the scope of the protocol. From http://www.health.ny.gov/professionals/protocols_and_guidelines/surgical_and_invasive_procedure/nyssipp_faq.htm Note: HHC 100B-1 Form is available at http://www.downstate.edu/emergency_medicine/documents/Consent_CT_with_contrast.pdf"; + case NPP: return "Acknowledgement of custodian notice of privacy practices. Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified. [ActConsentDirective (2.16.840.1.113883.1.11.20425)]"; + case POLST: return "The Physician Order for Life-Sustaining Treatment form records a person’s health care wishes for end of life emergency treatment and translates them into an order by the physician. It must be reviewed and signed by both the patient and the physician, Advanced Registered Nurse Practitioner or Physician Assistant. [2005 Honor My Wishes] Comment: Opt-in Consent Directive with restrictions."; + case RESEARCH: return "Consent to have healthcare information in an electronic health record accessed for research purposes. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)]"; + case RSDID: return "Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)"; + case RSREID: return "Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)]"; + case SSA827: return "SSA Form SSA-827 (Authorization to Disclose Information to the Social Security Administration (SSA))and its affiliated State disability determination services use Form SSA-827, Authorization to Disclose Information to the Social Security Administration (SSA) to obtain medical and other information needed to determine whether or not a claimant is disabled. Comment: Opt-in Consent Directive. Note: Form is available at https://www.socialsecurity.gov/forms/ssa-827-inst-sp.pdf "; + case VA100484: return "VA Form 10-0484 Revocation for Release of Individually-Identifiable Health Information enables a veteran to revoke authorization for the VA to release specified copies of individually-identifiable health information with the non-VA health care provider organizations participating in the eHealth Exchange and partnering with VA. Comment: Opt-in Consent Directive with status = rescinded (aka 'revoked'). Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-0484-fill.pdf"; + case VA100485: return "VA Form 10-0485 Request for and Authorization to Release Protected Health Information to eHealth Exchange enables a veteran to request and authorize a VA health care facility to release protected health information (PHI) for treatment purposes only to the communities that are participating in the eHealth Exchange, VLER Directive, and other Health Information Exchanges with who VA has an agreement. This information may consist of the diagnosis of Sickle Cell Anemia, the treatment of or referral for Drug Abuse, treatment of or referral for Alcohol Abuse or the treatment of or testing for infection with Human Immunodeficiency Virus. This authorization covers the diagnoses that I may have upon signing of the authorization and the diagnoses that I may acquire in the future including those protected by 38 U.S.C. 7332. Comment: Opt-in Consent Directive. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/10-0485-fill.pdf"; + case VA105345: return "VA Form 10-5345 Request for and Authorization to Release Medical Records or Health Information enables a veteran to request and authorize the VA to release specified copies of protected health information (PHI), such as hospital summary or outpatient treatment notes, which may include information about conditions governed under Title 38 Section 7332 (drug abuse, alcoholism or alcohol abuse, testing for or infection with HIV, and sickle cell anemia). Comment: Opt-in Consent Directive. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-5345-fill.pdf"; + case VA105345A: return "VA Form 10-5345a Individuals' Request for a Copy of Their Own Health Information enables a veteran to request and authorize the VA to release specified copies of protected health information (PHI), such as hospital summary or outpatient treatment notes. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-5345a-fill.pdf"; + case VA105345AMHV: return "VA Form 10-5345a-MHV Individual’s Request for a Copy of their own health information from MyHealtheVet enables a veteran to receive a copy of all available personal health information to be delivered through the veteran’s My HealtheVet account. Note: Form is available at http://www.va.gov/vaforms/medical/pdf/vha-10-5345a-MHV-fill.pdf"; + case VA1010116: return "VA Form 10-10116 Revocation of Authorization for Use and Release of Individually Identifiable Health Information for Veterans Health Administration Research. Comment: Opt-in with Restriction Consent Directive with status = 'completed'. Note: Form is available at http://www.northerncalifornia.va.gov/northerncalifornia/services/rnd/docs/vha-10-10116.pdf "; + case VA214142: return "VA Form 21-4142 (Authorization and Consent to Release Information to the Department of Veterans Affairs (VA) enables a veteran to authorize the US Veterans Administration [VA] to request veteran’s health information from non-VA providers. Aka VA Compensation Application Note: Form is available at http://www.vba.va.gov/pubs/forms/VBA-21-4142-ARE.pdf . For additional information regarding VA Form 21-4142, refer to the following website: www.benefits.va.gov/compensation/consent_privateproviders"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _42CFR2: return "42 CFR Part 2 Form of written consent"; + case ACD: return "Advance Directive"; + case CRIC: return "Common Rule Informed Consent"; + case DNR: return "Do Not Resuscitate"; + case EMRGONLY: return "Emergency Only"; + case ILLINOISMINORPROCEDURE: return "Illinois Consent by Minors to Medical Procedures"; + case HCD: return "Health Care Directive"; + case HIPAAAUTH: return "HIPAA Authorization"; + case HIPAANPP: return "HIPAA Notice of Privacy Practices"; + case HIPAARESTRICTIONS: return "HIPAA Restrictions"; + case HIPAARESEARCH: return "HIPAA Research Authorization"; + case HIPAASELFPAY: return "HIPAA Self-Pay Restriction"; + case MDHHS5515: return "Michigan MDHHS-5515 Consent to Share Behavioral Health Information for Care Coordination Purposes"; + case NYSSIPP: return "New York State Surgical and Invasive Procedure Protocol"; + case NPP: return "Notice of Privacy Practices"; + case POLST: return "POLST"; + case RESEARCH: return "Research Information Access"; + case RSDID: return "De-identified Information Access"; + case RSREID: return "Re-identifiable Information Access"; + case SSA827: return "Form SSA-827"; + case VA100484: return "VA Form 10-0484"; + case VA100485: return "VA Form 10-0485"; + case VA105345: return "VA Form 10-5345"; + case VA105345A: return "VA Form 10-5345a"; + case VA105345AMHV: return "VA Form 10-5345a-MHV"; + case VA1010116: return "VA Form 10-10-10116"; + case VA214142: return "VA Form 21-4142"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentCategoryEnumFactory.java new file mode 100644 index 00000000000..4f8b841f73e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentCategoryEnumFactory.java @@ -0,0 +1,162 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConsentCategoryEnumFactory implements EnumFactory { + + public ConsentCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("42-CFR-2".equals(codeString)) + return ConsentCategory._42CFR2; + if ("ACD".equals(codeString)) + return ConsentCategory.ACD; + if ("CRIC".equals(codeString)) + return ConsentCategory.CRIC; + if ("DNR".equals(codeString)) + return ConsentCategory.DNR; + if ("EMRGONLY".equals(codeString)) + return ConsentCategory.EMRGONLY; + if ("Illinois-Minor-Procedure".equals(codeString)) + return ConsentCategory.ILLINOISMINORPROCEDURE; + if ("HCD".equals(codeString)) + return ConsentCategory.HCD; + if ("HIPAA-Auth".equals(codeString)) + return ConsentCategory.HIPAAAUTH; + if ("HIPAA-NPP".equals(codeString)) + return ConsentCategory.HIPAANPP; + if ("HIPAA-Restrictions".equals(codeString)) + return ConsentCategory.HIPAARESTRICTIONS; + if ("HIPAA-Research".equals(codeString)) + return ConsentCategory.HIPAARESEARCH; + if ("HIPAA-Self-Pay".equals(codeString)) + return ConsentCategory.HIPAASELFPAY; + if ("MDHHS-5515".equals(codeString)) + return ConsentCategory.MDHHS5515; + if ("NYSSIPP".equals(codeString)) + return ConsentCategory.NYSSIPP; + if ("NPP".equals(codeString)) + return ConsentCategory.NPP; + if ("POLST".equals(codeString)) + return ConsentCategory.POLST; + if ("RESEARCH".equals(codeString)) + return ConsentCategory.RESEARCH; + if ("RSDID".equals(codeString)) + return ConsentCategory.RSDID; + if ("RSREID".equals(codeString)) + return ConsentCategory.RSREID; + if ("SSA-827".equals(codeString)) + return ConsentCategory.SSA827; + if ("VA-10-0484".equals(codeString)) + return ConsentCategory.VA100484; + if ("VA-10-0485".equals(codeString)) + return ConsentCategory.VA100485; + if ("VA-10-5345".equals(codeString)) + return ConsentCategory.VA105345; + if ("VA-10-5345a".equals(codeString)) + return ConsentCategory.VA105345A; + if ("VA-10-5345a-MHV".equals(codeString)) + return ConsentCategory.VA105345AMHV; + if ("VA-10-10116".equals(codeString)) + return ConsentCategory.VA1010116; + if ("VA-21-4142".equals(codeString)) + return ConsentCategory.VA214142; + throw new IllegalArgumentException("Unknown ConsentCategory code '"+codeString+"'"); + } + + public String toCode(ConsentCategory code) { + if (code == ConsentCategory._42CFR2) + return "42-CFR-2"; + if (code == ConsentCategory.ACD) + return "ACD"; + if (code == ConsentCategory.CRIC) + return "CRIC"; + if (code == ConsentCategory.DNR) + return "DNR"; + if (code == ConsentCategory.EMRGONLY) + return "EMRGONLY"; + if (code == ConsentCategory.ILLINOISMINORPROCEDURE) + return "Illinois-Minor-Procedure"; + if (code == ConsentCategory.HCD) + return "HCD"; + if (code == ConsentCategory.HIPAAAUTH) + return "HIPAA-Auth"; + if (code == ConsentCategory.HIPAANPP) + return "HIPAA-NPP"; + if (code == ConsentCategory.HIPAARESTRICTIONS) + return "HIPAA-Restrictions"; + if (code == ConsentCategory.HIPAARESEARCH) + return "HIPAA-Research"; + if (code == ConsentCategory.HIPAASELFPAY) + return "HIPAA-Self-Pay"; + if (code == ConsentCategory.MDHHS5515) + return "MDHHS-5515"; + if (code == ConsentCategory.NYSSIPP) + return "NYSSIPP"; + if (code == ConsentCategory.NPP) + return "NPP"; + if (code == ConsentCategory.POLST) + return "POLST"; + if (code == ConsentCategory.RESEARCH) + return "RESEARCH"; + if (code == ConsentCategory.RSDID) + return "RSDID"; + if (code == ConsentCategory.RSREID) + return "RSREID"; + if (code == ConsentCategory.SSA827) + return "SSA-827"; + if (code == ConsentCategory.VA100484) + return "VA-10-0484"; + if (code == ConsentCategory.VA100485) + return "VA-10-0485"; + if (code == ConsentCategory.VA105345) + return "VA-10-5345"; + if (code == ConsentCategory.VA105345A) + return "VA-10-5345a"; + if (code == ConsentCategory.VA105345AMHV) + return "VA-10-5345a-MHV"; + if (code == ConsentCategory.VA1010116) + return "VA-10-10116"; + if (code == ConsentCategory.VA214142) + return "VA-21-4142"; + return "?"; + } + + public String toSystem(ConsentCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentDataMeaning.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentDataMeaning.java new file mode 100644 index 00000000000..c8d18e92a63 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentDataMeaning.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConsentDataMeaning { + + /** + * The consent applies directly to the instance of the resource + */ + INSTANCE, + /** + * The consent applies directly to the instance of the resource and instances it refers to + */ + RELATED, + /** + * The consent applies directly to the instance of the resource and instances that refer to it + */ + DEPENDENTS, + /** + * The consent applies to instances of resources that are authored by + */ + AUTHOREDBY, + /** + * added to help the parsers + */ + NULL; + public static ConsentDataMeaning fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("related".equals(codeString)) + return RELATED; + if ("dependents".equals(codeString)) + return DEPENDENTS; + if ("authoredby".equals(codeString)) + return AUTHOREDBY; + throw new FHIRException("Unknown ConsentDataMeaning code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case RELATED: return "related"; + case DEPENDENTS: return "dependents"; + case AUTHOREDBY: return "authoredby"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/consent-data-meaning"; + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The consent applies directly to the instance of the resource"; + case RELATED: return "The consent applies directly to the instance of the resource and instances it refers to"; + case DEPENDENTS: return "The consent applies directly to the instance of the resource and instances that refer to it"; + case AUTHOREDBY: return "The consent applies to instances of resources that are authored by"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case RELATED: return "Related"; + case DEPENDENTS: return "Dependents"; + case AUTHOREDBY: return "AuthoredBy"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentDataMeaningEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentDataMeaningEnumFactory.java new file mode 100644 index 00000000000..9d7cfd03a38 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentDataMeaningEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConsentDataMeaningEnumFactory implements EnumFactory { + + public ConsentDataMeaning fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return ConsentDataMeaning.INSTANCE; + if ("related".equals(codeString)) + return ConsentDataMeaning.RELATED; + if ("dependents".equals(codeString)) + return ConsentDataMeaning.DEPENDENTS; + if ("authoredby".equals(codeString)) + return ConsentDataMeaning.AUTHOREDBY; + throw new IllegalArgumentException("Unknown ConsentDataMeaning code '"+codeString+"'"); + } + + public String toCode(ConsentDataMeaning code) { + if (code == ConsentDataMeaning.INSTANCE) + return "instance"; + if (code == ConsentDataMeaning.RELATED) + return "related"; + if (code == ConsentDataMeaning.DEPENDENTS) + return "dependents"; + if (code == ConsentDataMeaning.AUTHOREDBY) + return "authoredby"; + return "?"; + } + + public String toSystem(ConsentDataMeaning code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentProvisionType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentProvisionType.java new file mode 100644 index 00000000000..35dd8c64ccf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentProvisionType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConsentProvisionType { + + /** + * Consent is denied for actions meeting these rules + */ + DENY, + /** + * Consent is provided for actions meeting these rules + */ + PERMIT, + /** + * added to help the parsers + */ + NULL; + public static ConsentProvisionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("deny".equals(codeString)) + return DENY; + if ("permit".equals(codeString)) + return PERMIT; + throw new FHIRException("Unknown ConsentProvisionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DENY: return "deny"; + case PERMIT: return "permit"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/consent-provision-type"; + } + public String getDefinition() { + switch (this) { + case DENY: return "Consent is denied for actions meeting these rules"; + case PERMIT: return "Consent is provided for actions meeting these rules"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DENY: return "Opt Out"; + case PERMIT: return "Opt In"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentProvisionTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentProvisionTypeEnumFactory.java new file mode 100644 index 00000000000..4e9532faa07 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentProvisionTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConsentProvisionTypeEnumFactory implements EnumFactory { + + public ConsentProvisionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("deny".equals(codeString)) + return ConsentProvisionType.DENY; + if ("permit".equals(codeString)) + return ConsentProvisionType.PERMIT; + throw new IllegalArgumentException("Unknown ConsentProvisionType code '"+codeString+"'"); + } + + public String toCode(ConsentProvisionType code) { + if (code == ConsentProvisionType.DENY) + return "deny"; + if (code == ConsentProvisionType.PERMIT) + return "permit"; + return "?"; + } + + public String toSystem(ConsentProvisionType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentStateCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentStateCodes.java new file mode 100644 index 00000000000..9d11888d2d4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentStateCodes.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConsentStateCodes { + + /** + * The consent is in development or awaiting use but is not yet intended to be acted upon. + */ + DRAFT, + /** + * The consent has been proposed but not yet agreed to by all parties. The negotiation stage. + */ + PROPOSED, + /** + * The consent is to be followed and enforced. + */ + ACTIVE, + /** + * The consent has been rejected by one or more of the parties. + */ + REJECTED, + /** + * The consent is terminated or replaced. + */ + INACTIVE, + /** + * The consent was created wrongly (e.g. wrong patient) and should be ignored + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ConsentStateCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("active".equals(codeString)) + return ACTIVE; + if ("rejected".equals(codeString)) + return REJECTED; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ConsentStateCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case PROPOSED: return "proposed"; + case ACTIVE: return "active"; + case REJECTED: return "rejected"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/consent-state-codes"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The consent is in development or awaiting use but is not yet intended to be acted upon."; + case PROPOSED: return "The consent has been proposed but not yet agreed to by all parties. The negotiation stage."; + case ACTIVE: return "The consent is to be followed and enforced."; + case REJECTED: return "The consent has been rejected by one or more of the parties."; + case INACTIVE: return "The consent is terminated or replaced."; + case ENTEREDINERROR: return "The consent was created wrongly (e.g. wrong patient) and should be ignored"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Pending"; + case PROPOSED: return "Proposed"; + case ACTIVE: return "Active"; + case REJECTED: return "Rejected"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentStateCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentStateCodesEnumFactory.java new file mode 100644 index 00000000000..52215c88dfa --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentStateCodesEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConsentStateCodesEnumFactory implements EnumFactory { + + public ConsentStateCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ConsentStateCodes.DRAFT; + if ("proposed".equals(codeString)) + return ConsentStateCodes.PROPOSED; + if ("active".equals(codeString)) + return ConsentStateCodes.ACTIVE; + if ("rejected".equals(codeString)) + return ConsentStateCodes.REJECTED; + if ("inactive".equals(codeString)) + return ConsentStateCodes.INACTIVE; + if ("entered-in-error".equals(codeString)) + return ConsentStateCodes.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ConsentStateCodes code '"+codeString+"'"); + } + + public String toCode(ConsentStateCodes code) { + if (code == ConsentStateCodes.DRAFT) + return "draft"; + if (code == ConsentStateCodes.PROPOSED) + return "proposed"; + if (code == ConsentStateCodes.ACTIVE) + return "active"; + if (code == ConsentStateCodes.REJECTED) + return "rejected"; + if (code == ConsentStateCodes.INACTIVE) + return "inactive"; + if (code == ConsentStateCodes.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(ConsentStateCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConstraintSeverity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConstraintSeverity.java new file mode 100644 index 00000000000..b212c1b093c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConstraintSeverity.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ConstraintSeverity { + + /** + * If the constraint is violated, the resource is not conformant. + */ + ERROR, + /** + * If the constraint is violated, the resource is conformant, but it is not necessarily following best practice. + */ + WARNING, + /** + * added to help the parsers + */ + NULL; + public static ConstraintSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ERROR; + if ("warning".equals(codeString)) + return WARNING; + throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ERROR: return "error"; + case WARNING: return "warning"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/constraint-severity"; + } + public String getDefinition() { + switch (this) { + case ERROR: return "If the constraint is violated, the resource is not conformant."; + case WARNING: return "If the constraint is violated, the resource is conformant, but it is not necessarily following best practice."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ERROR: return "Error"; + case WARNING: return "Warning"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConstraintSeverityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConstraintSeverityEnumFactory.java new file mode 100644 index 00000000000..ee103efd63f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConstraintSeverityEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ConstraintSeverityEnumFactory implements EnumFactory { + + public ConstraintSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ConstraintSeverity.ERROR; + if ("warning".equals(codeString)) + return ConstraintSeverity.WARNING; + throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'"); + } + + public String toCode(ConstraintSeverity code) { + if (code == ConstraintSeverity.ERROR) + return "error"; + if (code == ConstraintSeverity.WARNING) + return "warning"; + return "?"; + } + + public String toSystem(ConstraintSeverity code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointSystem.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointSystem.java new file mode 100644 index 00000000000..976ceaa7dac --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointSystem.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContactPointSystem { + + /** + * The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. + */ + PHONE, + /** + * The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. + */ + FAX, + /** + * The value is an email address. + */ + EMAIL, + /** + * The value is a pager number. These may be local pager numbers that are only usable on a particular pager system. + */ + PAGER, + /** + * A contact that is not a phone, fax, pager or email address and is expressed as a URL. This is intended for various personal contacts including blogs, Skype, Twitter, Facebook, etc. Do not use for email addresses. + */ + URL, + /** + * A contact that can be used for sending an sms message (e.g. mobide phones, some landlines) + */ + SMS, + /** + * A contact that is not a phone, fax, page or email address and is not expressible as a URL. E.g. Internal mail address. This SHOULD NOT be used for contacts that are expressible as a URL (e.g. Skype, Twitter, Facebook, etc.) Extensions may be used to distinguish "other" contact types. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static ContactPointSystem fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("phone".equals(codeString)) + return PHONE; + if ("fax".equals(codeString)) + return FAX; + if ("email".equals(codeString)) + return EMAIL; + if ("pager".equals(codeString)) + return PAGER; + if ("url".equals(codeString)) + return URL; + if ("sms".equals(codeString)) + return SMS; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown ContactPointSystem code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PHONE: return "phone"; + case FAX: return "fax"; + case EMAIL: return "email"; + case PAGER: return "pager"; + case URL: return "url"; + case SMS: return "sms"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contact-point-system"; + } + public String getDefinition() { + switch (this) { + case PHONE: return "The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required."; + case FAX: return "The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required."; + case EMAIL: return "The value is an email address."; + case PAGER: return "The value is a pager number. These may be local pager numbers that are only usable on a particular pager system."; + case URL: return "A contact that is not a phone, fax, pager or email address and is expressed as a URL. This is intended for various personal contacts including blogs, Skype, Twitter, Facebook, etc. Do not use for email addresses."; + case SMS: return "A contact that can be used for sending an sms message (e.g. mobide phones, some landlines)"; + case OTHER: return "A contact that is not a phone, fax, page or email address and is not expressible as a URL. E.g. Internal mail address. This SHOULD NOT be used for contacts that are expressible as a URL (e.g. Skype, Twitter, Facebook, etc.) Extensions may be used to distinguish \"other\" contact types."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PHONE: return "Phone"; + case FAX: return "Fax"; + case EMAIL: return "Email"; + case PAGER: return "Pager"; + case URL: return "URL"; + case SMS: return "SMS"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointSystemEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointSystemEnumFactory.java new file mode 100644 index 00000000000..a74ee486340 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointSystemEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContactPointSystemEnumFactory implements EnumFactory { + + public ContactPointSystem fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("phone".equals(codeString)) + return ContactPointSystem.PHONE; + if ("fax".equals(codeString)) + return ContactPointSystem.FAX; + if ("email".equals(codeString)) + return ContactPointSystem.EMAIL; + if ("pager".equals(codeString)) + return ContactPointSystem.PAGER; + if ("url".equals(codeString)) + return ContactPointSystem.URL; + if ("sms".equals(codeString)) + return ContactPointSystem.SMS; + if ("other".equals(codeString)) + return ContactPointSystem.OTHER; + throw new IllegalArgumentException("Unknown ContactPointSystem code '"+codeString+"'"); + } + + public String toCode(ContactPointSystem code) { + if (code == ContactPointSystem.PHONE) + return "phone"; + if (code == ContactPointSystem.FAX) + return "fax"; + if (code == ContactPointSystem.EMAIL) + return "email"; + if (code == ContactPointSystem.PAGER) + return "pager"; + if (code == ContactPointSystem.URL) + return "url"; + if (code == ContactPointSystem.SMS) + return "sms"; + if (code == ContactPointSystem.OTHER) + return "other"; + return "?"; + } + + public String toSystem(ContactPointSystem code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointUse.java new file mode 100644 index 00000000000..f83ba42d2c9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointUse.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContactPointUse { + + /** + * A communication contact point at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. + */ + HOME, + /** + * An office contact point. First choice for business related contacts during business hours. + */ + WORK, + /** + * A temporary contact point. The period can provide more detailed information. + */ + TEMP, + /** + * This contact point is no longer in use (or was never correct, but retained for records). + */ + OLD, + /** + * A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business. + */ + MOBILE, + /** + * added to help the parsers + */ + NULL; + public static ContactPointUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return HOME; + if ("work".equals(codeString)) + return WORK; + if ("temp".equals(codeString)) + return TEMP; + if ("old".equals(codeString)) + return OLD; + if ("mobile".equals(codeString)) + return MOBILE; + throw new FHIRException("Unknown ContactPointUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOME: return "home"; + case WORK: return "work"; + case TEMP: return "temp"; + case OLD: return "old"; + case MOBILE: return "mobile"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contact-point-use"; + } + public String getDefinition() { + switch (this) { + case HOME: return "A communication contact point at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available."; + case WORK: return "An office contact point. First choice for business related contacts during business hours."; + case TEMP: return "A temporary contact point. The period can provide more detailed information."; + case OLD: return "This contact point is no longer in use (or was never correct, but retained for records)."; + case MOBILE: return "A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOME: return "Home"; + case WORK: return "Work"; + case TEMP: return "Temp"; + case OLD: return "Old"; + case MOBILE: return "Mobile"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointUseEnumFactory.java new file mode 100644 index 00000000000..3abb8c2bf06 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactPointUseEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContactPointUseEnumFactory implements EnumFactory { + + public ContactPointUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return ContactPointUse.HOME; + if ("work".equals(codeString)) + return ContactPointUse.WORK; + if ("temp".equals(codeString)) + return ContactPointUse.TEMP; + if ("old".equals(codeString)) + return ContactPointUse.OLD; + if ("mobile".equals(codeString)) + return ContactPointUse.MOBILE; + throw new IllegalArgumentException("Unknown ContactPointUse code '"+codeString+"'"); + } + + public String toCode(ContactPointUse code) { + if (code == ContactPointUse.HOME) + return "home"; + if (code == ContactPointUse.WORK) + return "work"; + if (code == ContactPointUse.TEMP) + return "temp"; + if (code == ContactPointUse.OLD) + return "old"; + if (code == ContactPointUse.MOBILE) + return "mobile"; + return "?"; + } + + public String toSystem(ContactPointUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactentityType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactentityType.java new file mode 100644 index 00000000000..294ace02fef --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactentityType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContactentityType { + + /** + * Contact details for information regarding to billing/general finance enquiries. + */ + BILL, + /** + * Contact details for administrative enquiries. + */ + ADMIN, + /** + * Contact details for issues related to Human Resources, such as staff matters, OH&S etc. + */ + HR, + /** + * Contact details for dealing with issues related to insurance claims/adjudication/payment. + */ + PAYOR, + /** + * Generic information contact for patients. + */ + PATINF, + /** + * Dedicated contact point for matters relating to press enquiries. + */ + PRESS, + /** + * added to help the parsers + */ + NULL; + public static ContactentityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BILL".equals(codeString)) + return BILL; + if ("ADMIN".equals(codeString)) + return ADMIN; + if ("HR".equals(codeString)) + return HR; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("PATINF".equals(codeString)) + return PATINF; + if ("PRESS".equals(codeString)) + return PRESS; + throw new FHIRException("Unknown ContactentityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BILL: return "BILL"; + case ADMIN: return "ADMIN"; + case HR: return "HR"; + case PAYOR: return "PAYOR"; + case PATINF: return "PATINF"; + case PRESS: return "PRESS"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contactentity-type"; + } + public String getDefinition() { + switch (this) { + case BILL: return "Contact details for information regarding to billing/general finance enquiries."; + case ADMIN: return "Contact details for administrative enquiries."; + case HR: return "Contact details for issues related to Human Resources, such as staff matters, OH&S etc."; + case PAYOR: return "Contact details for dealing with issues related to insurance claims/adjudication/payment."; + case PATINF: return "Generic information contact for patients."; + case PRESS: return "Dedicated contact point for matters relating to press enquiries."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BILL: return "Billing"; + case ADMIN: return "Administrative"; + case HR: return "Human Resource"; + case PAYOR: return "Payor"; + case PATINF: return "Patient"; + case PRESS: return "Press"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactentityTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactentityTypeEnumFactory.java new file mode 100644 index 00000000000..92d7a003ee8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContactentityTypeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContactentityTypeEnumFactory implements EnumFactory { + + public ContactentityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BILL".equals(codeString)) + return ContactentityType.BILL; + if ("ADMIN".equals(codeString)) + return ContactentityType.ADMIN; + if ("HR".equals(codeString)) + return ContactentityType.HR; + if ("PAYOR".equals(codeString)) + return ContactentityType.PAYOR; + if ("PATINF".equals(codeString)) + return ContactentityType.PATINF; + if ("PRESS".equals(codeString)) + return ContactentityType.PRESS; + throw new IllegalArgumentException("Unknown ContactentityType code '"+codeString+"'"); + } + + public String toCode(ContactentityType code) { + if (code == ContactentityType.BILL) + return "BILL"; + if (code == ContactentityType.ADMIN) + return "ADMIN"; + if (code == ContactentityType.HR) + return "HR"; + if (code == ContactentityType.PAYOR) + return "PAYOR"; + if (code == ContactentityType.PATINF) + return "PATINF"; + if (code == ContactentityType.PRESS) + return "PRESS"; + return "?"; + } + + public String toSystem(ContactentityType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContainerCap.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContainerCap.java new file mode 100644 index 00000000000..90c30ee9376 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContainerCap.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContainerCap { + + /** + * red cap + */ + RED, + /** + * yellow cap + */ + YELLOW, + /** + * grey cap + */ + GREY, + /** + * violet cap + */ + VIOLET, + /** + * blue cap + */ + BLUE, + /** + * black cap + */ + BLACK, + /** + * green cap + */ + GREEN, + /** + * added to help the parsers + */ + NULL; + public static ContainerCap fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("red".equals(codeString)) + return RED; + if ("yellow".equals(codeString)) + return YELLOW; + if ("grey".equals(codeString)) + return GREY; + if ("violet".equals(codeString)) + return VIOLET; + if ("blue".equals(codeString)) + return BLUE; + if ("black".equals(codeString)) + return BLACK; + if ("green".equals(codeString)) + return GREEN; + throw new FHIRException("Unknown ContainerCap code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RED: return "red"; + case YELLOW: return "yellow"; + case GREY: return "grey"; + case VIOLET: return "violet"; + case BLUE: return "blue"; + case BLACK: return "black"; + case GREEN: return "green"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/container-cap"; + } + public String getDefinition() { + switch (this) { + case RED: return "red cap"; + case YELLOW: return "yellow cap"; + case GREY: return "grey cap"; + case VIOLET: return "violet cap"; + case BLUE: return "blue cap"; + case BLACK: return "black cap"; + case GREEN: return "green cap"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RED: return "red cap"; + case YELLOW: return "yellow cap"; + case GREY: return "grey cap"; + case VIOLET: return "violet cap"; + case BLUE: return "blue cap"; + case BLACK: return "black cap"; + case GREEN: return "green cap"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContainerCapEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContainerCapEnumFactory.java new file mode 100644 index 00000000000..5f9eda86d63 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContainerCapEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContainerCapEnumFactory implements EnumFactory { + + public ContainerCap fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("red".equals(codeString)) + return ContainerCap.RED; + if ("yellow".equals(codeString)) + return ContainerCap.YELLOW; + if ("grey".equals(codeString)) + return ContainerCap.GREY; + if ("violet".equals(codeString)) + return ContainerCap.VIOLET; + if ("blue".equals(codeString)) + return ContainerCap.BLUE; + if ("black".equals(codeString)) + return ContainerCap.BLACK; + if ("green".equals(codeString)) + return ContainerCap.GREEN; + throw new IllegalArgumentException("Unknown ContainerCap code '"+codeString+"'"); + } + + public String toCode(ContainerCap code) { + if (code == ContainerCap.RED) + return "red"; + if (code == ContainerCap.YELLOW) + return "yellow"; + if (code == ContainerCap.GREY) + return "grey"; + if (code == ContainerCap.VIOLET) + return "violet"; + if (code == ContainerCap.BLUE) + return "blue"; + if (code == ContainerCap.BLACK) + return "black"; + if (code == ContainerCap.GREEN) + return "green"; + return "?"; + } + + public String toSystem(ContainerCap code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContentType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContentType.java new file mode 100644 index 00000000000..b684afef59b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContentType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContentType { + + /** + * XML content-type corresponding to the application/fhir+xml mime-type. + */ + XML, + /** + * JSON content-type corresponding to the application/fhir+json mime-type. + */ + JSON, + /** + * RDF content-type corresponding to the text/turtle mime-type. + */ + TTL, + /** + * Prevent the use of the corresponding http header. + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static ContentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xml".equals(codeString)) + return XML; + if ("json".equals(codeString)) + return JSON; + if ("ttl".equals(codeString)) + return TTL; + if ("none".equals(codeString)) + return NONE; + throw new FHIRException("Unknown ContentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case XML: return "xml"; + case JSON: return "json"; + case TTL: return "ttl"; + case NONE: return "none"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/content-type"; + } + public String getDefinition() { + switch (this) { + case XML: return "XML content-type corresponding to the application/fhir+xml mime-type."; + case JSON: return "JSON content-type corresponding to the application/fhir+json mime-type."; + case TTL: return "RDF content-type corresponding to the text/turtle mime-type."; + case NONE: return "Prevent the use of the corresponding http header."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case XML: return "xml"; + case JSON: return "json"; + case TTL: return "ttl"; + case NONE: return "none"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContentTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContentTypeEnumFactory.java new file mode 100644 index 00000000000..262460b2334 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContentTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContentTypeEnumFactory implements EnumFactory { + + public ContentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xml".equals(codeString)) + return ContentType.XML; + if ("json".equals(codeString)) + return ContentType.JSON; + if ("ttl".equals(codeString)) + return ContentType.TTL; + if ("none".equals(codeString)) + return ContentType.NONE; + throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); + } + + public String toCode(ContentType code) { + if (code == ContentType.XML) + return "xml"; + if (code == ContentType.JSON) + return "json"; + if (code == ContentType.TTL) + return "ttl"; + if (code == ContentType.NONE) + return "none"; + return "?"; + } + + public String toSystem(ContentType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractAction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractAction.java new file mode 100644 index 00000000000..5230d1af45a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractAction.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractAction { + + /** + * Definition for Action A + */ + ACTIONA, + /** + * Definition for Action B + */ + ACTIONB, + /** + * added to help the parsers + */ + NULL; + public static ContractAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("action-a".equals(codeString)) + return ACTIONA; + if ("action-b".equals(codeString)) + return ACTIONB; + throw new FHIRException("Unknown ContractAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIONA: return "action-a"; + case ACTIONB: return "action-b"; + default: return "?"; + } + } + public String getSystem() { + return "http://www.hl7.org/fhir/contractaction"; + } + public String getDefinition() { + switch (this) { + case ACTIONA: return "Definition for Action A"; + case ACTIONB: return "Definition for Action B"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIONA: return "Action A"; + case ACTIONB: return "Action B"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActionEnumFactory.java new file mode 100644 index 00000000000..7c743ea8296 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActionEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractActionEnumFactory implements EnumFactory { + + public ContractAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("action-a".equals(codeString)) + return ContractAction.ACTIONA; + if ("action-b".equals(codeString)) + return ContractAction.ACTIONB; + throw new IllegalArgumentException("Unknown ContractAction code '"+codeString+"'"); + } + + public String toCode(ContractAction code) { + if (code == ContractAction.ACTIONA) + return "action-a"; + if (code == ContractAction.ACTIONB) + return "action-b"; + return "?"; + } + + public String toSystem(ContractAction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActorrole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActorrole.java new file mode 100644 index 00000000000..788ee451189 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActorrole.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractActorrole { + + /** + * Someone who provides health care related services to people or animals including both clinical and support services. + */ + PRACTITIONER, + /** + * A receiver, human or animal, of health care related goods and services. + */ + PATIENT, + /** + * added to help the parsers + */ + NULL; + public static ContractActorrole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("patient".equals(codeString)) + return PATIENT; + throw new FHIRException("Unknown ContractActorrole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRACTITIONER: return "practitioner"; + case PATIENT: return "patient"; + default: return "?"; + } + } + public String getSystem() { + return "http://www.hl7.org/fhir/contractactorrole"; + } + public String getDefinition() { + switch (this) { + case PRACTITIONER: return "Someone who provides health care related services to people or animals including both clinical and support services."; + case PATIENT: return "A receiver, human or animal, of health care related goods and services."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRACTITIONER: return "Practitioner"; + case PATIENT: return "Patient"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActorroleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActorroleEnumFactory.java new file mode 100644 index 00000000000..79d11cd82c7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractActorroleEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractActorroleEnumFactory implements EnumFactory { + + public ContractActorrole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("practitioner".equals(codeString)) + return ContractActorrole.PRACTITIONER; + if ("patient".equals(codeString)) + return ContractActorrole.PATIENT; + throw new IllegalArgumentException("Unknown ContractActorrole code '"+codeString+"'"); + } + + public String toCode(ContractActorrole code) { + if (code == ContractActorrole.PRACTITIONER) + return "practitioner"; + if (code == ContractActorrole.PATIENT) + return "patient"; + return "?"; + } + + public String toSystem(ContractActorrole code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractContentDerivative.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractContentDerivative.java new file mode 100644 index 00000000000..dfee550735a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractContentDerivative.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractContentDerivative { + + /** + * Content derivative that conveys sufficient information needed to register the source basal content from which it is derived. This derivative content may be used to register the basal content as it changes status in its lifecycle. For example, content registration may occur when the basal content is created, updated, inactive, or deleted. + */ + REGISTRATION, + /** + * A content derivative that conveys sufficient information to locate and retrieve the content. + */ + RETRIEVAL, + /** + * Content derivative that has less than full fidelity to the basal information source from which it was 'transcribed'. It provides recipients with the full content representation they may require for compliance purposes, and typically include a reference to or an attached unstructured representation for recipients needing an exact copy of the legal agreement. + */ + STATEMENT, + /** + * A Content Derivative that conveys sufficient information to determine the authorized entities with which the content may be shared. + */ + SHAREABLE, + /** + * added to help the parsers + */ + NULL; + public static ContractContentDerivative fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registration".equals(codeString)) + return REGISTRATION; + if ("retrieval".equals(codeString)) + return RETRIEVAL; + if ("statement".equals(codeString)) + return STATEMENT; + if ("shareable".equals(codeString)) + return SHAREABLE; + throw new FHIRException("Unknown ContractContentDerivative code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REGISTRATION: return "registration"; + case RETRIEVAL: return "retrieval"; + case STATEMENT: return "statement"; + case SHAREABLE: return "shareable"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contract-content-derivative"; + } + public String getDefinition() { + switch (this) { + case REGISTRATION: return "Content derivative that conveys sufficient information needed to register the source basal content from which it is derived. This derivative content may be used to register the basal content as it changes status in its lifecycle. For example, content registration may occur when the basal content is created, updated, inactive, or deleted."; + case RETRIEVAL: return "A content derivative that conveys sufficient information to locate and retrieve the content."; + case STATEMENT: return "Content derivative that has less than full fidelity to the basal information source from which it was 'transcribed'. It provides recipients with the full content representation they may require for compliance purposes, and typically include a reference to or an attached unstructured representation for recipients needing an exact copy of the legal agreement."; + case SHAREABLE: return "A Content Derivative that conveys sufficient information to determine the authorized entities with which the content may be shared."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REGISTRATION: return "Content Registration"; + case RETRIEVAL: return "Content Retrieval"; + case STATEMENT: return "Content Statement"; + case SHAREABLE: return "Shareable Content"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractContentDerivativeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractContentDerivativeEnumFactory.java new file mode 100644 index 00000000000..296b97fa3da --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractContentDerivativeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractContentDerivativeEnumFactory implements EnumFactory { + + public ContractContentDerivative fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registration".equals(codeString)) + return ContractContentDerivative.REGISTRATION; + if ("retrieval".equals(codeString)) + return ContractContentDerivative.RETRIEVAL; + if ("statement".equals(codeString)) + return ContractContentDerivative.STATEMENT; + if ("shareable".equals(codeString)) + return ContractContentDerivative.SHAREABLE; + throw new IllegalArgumentException("Unknown ContractContentDerivative code '"+codeString+"'"); + } + + public String toCode(ContractContentDerivative code) { + if (code == ContractContentDerivative.REGISTRATION) + return "registration"; + if (code == ContractContentDerivative.RETRIEVAL) + return "retrieval"; + if (code == ContractContentDerivative.STATEMENT) + return "statement"; + if (code == ContractContentDerivative.SHAREABLE) + return "shareable"; + return "?"; + } + + public String toSystem(ContractContentDerivative code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractDataMeaning.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractDataMeaning.java new file mode 100644 index 00000000000..2580cdf5097 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractDataMeaning.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractDataMeaning { + + /** + * The consent applies directly to the instance of the resource + */ + INSTANCE, + /** + * The consent applies directly to the instance of the resource and instances it refers to + */ + RELATED, + /** + * The consent applies directly to the instance of the resource and instances that refer to it + */ + DEPENDENTS, + /** + * The consent applies to instances of resources that are authored by + */ + AUTHOREDBY, + /** + * added to help the parsers + */ + NULL; + public static ContractDataMeaning fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("related".equals(codeString)) + return RELATED; + if ("dependents".equals(codeString)) + return DEPENDENTS; + if ("authoredby".equals(codeString)) + return AUTHOREDBY; + throw new FHIRException("Unknown ContractDataMeaning code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case RELATED: return "related"; + case DEPENDENTS: return "dependents"; + case AUTHOREDBY: return "authoredby"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contract-data-meaning"; + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The consent applies directly to the instance of the resource"; + case RELATED: return "The consent applies directly to the instance of the resource and instances it refers to"; + case DEPENDENTS: return "The consent applies directly to the instance of the resource and instances that refer to it"; + case AUTHOREDBY: return "The consent applies to instances of resources that are authored by"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case RELATED: return "Related"; + case DEPENDENTS: return "Dependents"; + case AUTHOREDBY: return "AuthoredBy"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractDataMeaningEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractDataMeaningEnumFactory.java new file mode 100644 index 00000000000..f72a7e45e6d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractDataMeaningEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractDataMeaningEnumFactory implements EnumFactory { + + public ContractDataMeaning fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return ContractDataMeaning.INSTANCE; + if ("related".equals(codeString)) + return ContractDataMeaning.RELATED; + if ("dependents".equals(codeString)) + return ContractDataMeaning.DEPENDENTS; + if ("authoredby".equals(codeString)) + return ContractDataMeaning.AUTHOREDBY; + throw new IllegalArgumentException("Unknown ContractDataMeaning code '"+codeString+"'"); + } + + public String toCode(ContractDataMeaning code) { + if (code == ContractDataMeaning.INSTANCE) + return "instance"; + if (code == ContractDataMeaning.RELATED) + return "related"; + if (code == ContractDataMeaning.DEPENDENTS) + return "dependents"; + if (code == ContractDataMeaning.AUTHOREDBY) + return "authoredby"; + return "?"; + } + + public String toSystem(ContractDataMeaning code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSignerType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSignerType.java new file mode 100644 index 00000000000..977ef846fef --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSignerType.java @@ -0,0 +1,501 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractSignerType { + + /** + * A person who has corrected, edited, or amended pre-existing information. + */ + AMENDER, + /** + * A person in the role of verifier who attests to the accuracy of an act, but who does not have privileges to legally authenticate information content. An example would be a resident physician who sees a patient and dictates a note, then later signs it. The resident's signature constitutes an authentication. + */ + AUTHN, + /** + * An entity that authored specific content. There can be multiple authors of content, which may take such forms as a contract, a healthcare record entry or document, a policy, or a consent directive. + */ + AUT, + /** + * An entity that has a business or professional relationship with another entity in accordance with an agreement. + */ + AFFL, + /** + * An entity that acts or is authorized to act on behalf of another entity in accordance with an agreement. + */ + AGNT, + /** + * An agent role in which the agent is an Entity acting in the employ of an organization. The focus is on functional role on behalf of the organization, unlike the Employee role where the focus is on the 'Human Resources' relationship between the employee and the organization. + */ + ASSIGNED, + /** + * The member of a jurisdiction afforded certain rights and encumbered with certain obligation in accordance with jurisdictional policy. + */ + CIT, + /** + * A party that makes a claim for coverage under a policy. + */ + CLAIMANT, + /** + * The entity that co-authored content. There can be multiple co-authors of content,which may take such forms as a such as a contract, a healthcare record entry or document, a policy, or a consent directive. + */ + COAUTH, + /** + * A patient or patient representative who is the grantee in a healthcare related agreement such as a consent for healthcare services, advanced directive, or a privacy consent directive in accordance with jurisdictional, organizational, or patient policy. + */ + CONSENTER, + /** + * A person who has witnessed and attests to observing a patient being counseled about a healthcare related agreement such as a consent for healthcare services, advanced directive, or a privacy consent directive. + */ + CONSWIT, + /** + * A person or an organization that provides or receives information regarding another entity. Examples; patient NOK and emergency contacts; guarantor contact; employer contact. + */ + CONT, + /** + * A person who participates in the generation of and attest to veracity of content, but is not an author or co-author. For example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report. + */ + COPART, + /** + * An entity, which is the insured, that receives benefits such as healthcare services, reimbursement for out-of-pocket expenses, or compensation for losses through coverage under the terms of an insurance policy. The underwriter of that policy is the scoping entity. The covered party receives coverage because of some contractual or other relationship with the holder of that policy. Note that a particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder. + */ + COVPTY, + /** + * A party to whom some right or authority is delegated by a delegator. + */ + DELEGATEE, + /** + * A party that delegates a right or authority to another party. + */ + DELEGATOR, + /** + * A person covered under an insurance policy or program based on an association with a subscriber, which is recognized by the policy holder. The dependent has an association with the subscriber such as a financial dependency or personal relationship such as that of a spouse, or a natural or adopted child. The policy holder may be required by law to recognize certain associations or may have discretion about the associations. For example, a policy holder may dictate the criteria for the dependent status of adult children who are students, such as requiring full time enrollment, or may recognize domestic partners as dependents. Under certain circumstances, the dependent may be under the indirect authority of a responsible party acting as a surrogate for the subscriber, for example, if the subscriber is differently-abled or deceased, a guardian ad Lidem or estate executor may be appointed to assume the subscriber's legal standing in the relationship with the dependent. + */ + DEPEND, + /** + * A person who has been granted the authority to represent or act on another's behalf generally in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Unlike ordinary powers of attorney, durable powers can survive for long periods of time, and again, unlike standard powers of attorney, durable powers can continue after incompetency. + */ + DPOWATT, + /** + * An entity to be contacted in the event of an emergency + */ + EMGCON, + /** + * A person who attests to observing an occurrence. For example, the witness has observed a procedure and is attesting to this fact. + */ + EVTWIT, + /** + * A person who has been granted the authority to act as an estate executor for a deceased person who was the responsible party. + */ + EXCEST, + /** + * A person who grants to another person the authority to represent or act on that person's behalf. Examples include (1) exercising specific rights belonging to the grantee; (2) performing specific duties on behalf of a grantee; and (3) making specific decisions concerning a grantee. + */ + GRANTEE, + /** + * A person who has been granted the authority to represent or act on another's behalf. Examples include (1) exercising specific rights belonging to the grantee; (2) performing specific duties on behalf of a grantee; and (3) making specific decisions concerning a grantee. + */ + GRANTOR, + /** + * A person or organization contractually recognized by the issuer as an entity that has assumed fiscal responsibility (e.g., by making or giving a promise, assurance, or pledge) for another entity's financial obligations by guaranteeing to pay for amounts owed to a particular account. In a healthcare context, the account may be a patient's billing account for services rendered by a provider or a health plan premium account. + */ + GUAR, + /** + * A person or organization legally empowered with responsibility for the care of a ward. + */ + GUARD, + /** + * A person appointed by the court to look out for the best interests of a minor child during the course of legal proceedings. + */ + GUADLTM, + /** + * An entity that is the source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject. + */ + INF, + /** + * A person who converts spoken or written language into the language of key participants in an event such as when a provider is obtaining a patient's consent to treatment or permission to disclose information. + */ + INTPRT, + /** + * An entity that is the subject of an investigation. This role is scoped by the party responsible for the investigation. + */ + INSBJ, + /** + * A person who has been granted the authority to represent or act on another's behalf for healthcare related matters in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Examples include (1) exercising specific healthcare legal rights belonging to the grantee such as signing a consent directive; (2) performing specific healthcare related legal duties on behalf of a grantee such as claims payment; and (3) making specific healthcare legal decisions concerning a grantee such as consenting to healthcare services. + */ + HPOWATT, + /** + * An entity that is authorized to provide health care services by an authorizing organization or jurisdiction. + */ + HPROV, + /** + * A person in the role of verifier who attests to the accuracy of information content, and who has privileges to certify the legal authenticity of that content with a signature that constitutes a legal authentication. For example, a licensed physician who signs a consult authored by a resident physician who authenticated it. + */ + LEGAUTHN, + /** + * A party to an insurance policy under which the insurer agrees to indemnify for losses, provides benefits for, or renders services. A named insured may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subject that is the named insured under a comprehensive automobile, disability, or property and casualty policy. The named insured and may or may not be the policy holder. + */ + NMDINS, + /** + * A person, who is a type of contact, designated to receive notifications on behalf of another person who is a relative. + */ + NOK, + /** + * The party credentialed to legally attest to the contract binding by verifying the identity and capacity of the grantor and grantee, and witnessing their signing of the contract or agreement such as a real estate transaction, pre-nuptial agreement, or a will. + */ + NOTARY, + /** + * A person, animal, or other living subject that is the actual or potential recipient of health care services. + */ + PAT, + /** + * A person who has been granted the authority to represent or act on another's behalf generally in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Examples include (1) exercising specific legal rights belonging to the grantee such as signing a contract; (2) performing specific legal duties on behalf of a grantee such as making loan payments; and (3) making specific legal decisions concerning a grantee such as financial investment decisions. + */ + POWATT, + /** + * An entity that is the primary or sole author of information content. In the healthcare context, there can be only one primary author of health information content in a record entry or document. + */ + PRIMAUTH, + /** + * An entity that may, should receive, or has received information or an object to which it was primarily addressed. + */ + PRIRECIP, + /** + * An entity that may, should receive, or has received information or an object, which may not have been primarily addressed to it. For example, the staff of a provider, a clearinghouse, or other intermediary. + */ + RECIP, + /** + * An entity that has legal responsibility for another party. + */ + RESPRSN, + /** + * A person, device, or algorithm that has used approved criteria for filtered data for inclusion into the patient record. Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record. + */ + REVIEWER, + /** + * An entity entering the data into the originating system. This includes the transcriptionist for dictated text transcribed into electronic form. + */ + TRANS, + /** + * An automated data source that generates a signature along with content. Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record. + */ + SOURCE, + /** + * A person who has been granted the authority to represent or act on another's behalf for a limited set of specific matters in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Examples include (1) exercising specific legal rights belonging to the grantee such as drafting a will; (2) performing specific legal duties on behalf of a grantee such as making a reversible mortgage to pay for end of life expenses; and (3) making specific legal decisions concerning a grantee such as managing a trust. + */ + SPOWATT, + /** + * A person who validates a health information document for inclusion in the patient record. For example, a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record. + */ + VALID, + /** + * A person who asserts the correctness and appropriateness of an act or the recording of the act, and is accountable for the assertion that the act or the recording of the act complies with jurisdictional or organizational policy. For example, a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order. + */ + VERF, + /** + * A person witnessing the signature of another party. A witness is not knowledgeable about the content being signed, much less approves of anything stated in the content. For example, an advanced directive witness or a witness that a party to a contract signed that certain demographic or financial information is truthful. + */ + WIT, + /** + * added to help the parsers + */ + NULL; + public static ContractSignerType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AMENDER".equals(codeString)) + return AMENDER; + if ("AUTHN".equals(codeString)) + return AUTHN; + if ("AUT".equals(codeString)) + return AUT; + if ("AFFL".equals(codeString)) + return AFFL; + if ("AGNT".equals(codeString)) + return AGNT; + if ("ASSIGNED".equals(codeString)) + return ASSIGNED; + if ("CIT".equals(codeString)) + return CIT; + if ("CLAIMANT".equals(codeString)) + return CLAIMANT; + if ("COAUTH".equals(codeString)) + return COAUTH; + if ("CONSENTER".equals(codeString)) + return CONSENTER; + if ("CONSWIT".equals(codeString)) + return CONSWIT; + if ("CONT".equals(codeString)) + return CONT; + if ("COPART".equals(codeString)) + return COPART; + if ("COVPTY".equals(codeString)) + return COVPTY; + if ("DELEGATEE".equals(codeString)) + return DELEGATEE; + if ("delegator".equals(codeString)) + return DELEGATOR; + if ("DEPEND".equals(codeString)) + return DEPEND; + if ("DPOWATT".equals(codeString)) + return DPOWATT; + if ("EMGCON".equals(codeString)) + return EMGCON; + if ("EVTWIT".equals(codeString)) + return EVTWIT; + if ("EXCEST".equals(codeString)) + return EXCEST; + if ("GRANTEE".equals(codeString)) + return GRANTEE; + if ("GRANTOR".equals(codeString)) + return GRANTOR; + if ("GUAR".equals(codeString)) + return GUAR; + if ("GUARD".equals(codeString)) + return GUARD; + if ("GUADLTM".equals(codeString)) + return GUADLTM; + if ("INF".equals(codeString)) + return INF; + if ("INTPRT".equals(codeString)) + return INTPRT; + if ("INSBJ".equals(codeString)) + return INSBJ; + if ("HPOWATT".equals(codeString)) + return HPOWATT; + if ("HPROV".equals(codeString)) + return HPROV; + if ("LEGAUTHN".equals(codeString)) + return LEGAUTHN; + if ("NMDINS".equals(codeString)) + return NMDINS; + if ("NOK".equals(codeString)) + return NOK; + if ("NOTARY".equals(codeString)) + return NOTARY; + if ("PAT".equals(codeString)) + return PAT; + if ("POWATT".equals(codeString)) + return POWATT; + if ("PRIMAUTH".equals(codeString)) + return PRIMAUTH; + if ("PRIRECIP".equals(codeString)) + return PRIRECIP; + if ("RECIP".equals(codeString)) + return RECIP; + if ("RESPRSN".equals(codeString)) + return RESPRSN; + if ("REVIEWER".equals(codeString)) + return REVIEWER; + if ("TRANS".equals(codeString)) + return TRANS; + if ("SOURCE".equals(codeString)) + return SOURCE; + if ("SPOWATT".equals(codeString)) + return SPOWATT; + if ("VALID".equals(codeString)) + return VALID; + if ("VERF".equals(codeString)) + return VERF; + if ("WIT".equals(codeString)) + return WIT; + throw new FHIRException("Unknown ContractSignerType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AMENDER: return "AMENDER"; + case AUTHN: return "AUTHN"; + case AUT: return "AUT"; + case AFFL: return "AFFL"; + case AGNT: return "AGNT"; + case ASSIGNED: return "ASSIGNED"; + case CIT: return "CIT"; + case CLAIMANT: return "CLAIMANT"; + case COAUTH: return "COAUTH"; + case CONSENTER: return "CONSENTER"; + case CONSWIT: return "CONSWIT"; + case CONT: return "CONT"; + case COPART: return "COPART"; + case COVPTY: return "COVPTY"; + case DELEGATEE: return "DELEGATEE"; + case DELEGATOR: return "delegator"; + case DEPEND: return "DEPEND"; + case DPOWATT: return "DPOWATT"; + case EMGCON: return "EMGCON"; + case EVTWIT: return "EVTWIT"; + case EXCEST: return "EXCEST"; + case GRANTEE: return "GRANTEE"; + case GRANTOR: return "GRANTOR"; + case GUAR: return "GUAR"; + case GUARD: return "GUARD"; + case GUADLTM: return "GUADLTM"; + case INF: return "INF"; + case INTPRT: return "INTPRT"; + case INSBJ: return "INSBJ"; + case HPOWATT: return "HPOWATT"; + case HPROV: return "HPROV"; + case LEGAUTHN: return "LEGAUTHN"; + case NMDINS: return "NMDINS"; + case NOK: return "NOK"; + case NOTARY: return "NOTARY"; + case PAT: return "PAT"; + case POWATT: return "POWATT"; + case PRIMAUTH: return "PRIMAUTH"; + case PRIRECIP: return "PRIRECIP"; + case RECIP: return "RECIP"; + case RESPRSN: return "RESPRSN"; + case REVIEWER: return "REVIEWER"; + case TRANS: return "TRANS"; + case SOURCE: return "SOURCE"; + case SPOWATT: return "SPOWATT"; + case VALID: return "VALID"; + case VERF: return "VERF"; + case WIT: return "WIT"; + default: return "?"; + } + } + public String getSystem() { + return "http://www.hl7.org/fhir/contractsignertypecodes"; + } + public String getDefinition() { + switch (this) { + case AMENDER: return "A person who has corrected, edited, or amended pre-existing information."; + case AUTHN: return "A person in the role of verifier who attests to the accuracy of an act, but who does not have privileges to legally authenticate information content. An example would be a resident physician who sees a patient and dictates a note, then later signs it. The resident's signature constitutes an authentication."; + case AUT: return "An entity that authored specific content. There can be multiple authors of content, which may take such forms as a contract, a healthcare record entry or document, a policy, or a consent directive."; + case AFFL: return "An entity that has a business or professional relationship with another entity in accordance with an agreement."; + case AGNT: return "An entity that acts or is authorized to act on behalf of another entity in accordance with an agreement."; + case ASSIGNED: return "An agent role in which the agent is an Entity acting in the employ of an organization. The focus is on functional role on behalf of the organization, unlike the Employee role where the focus is on the 'Human Resources' relationship between the employee and the organization."; + case CIT: return "The member of a jurisdiction afforded certain rights and encumbered with certain obligation in accordance with jurisdictional policy."; + case CLAIMANT: return "A party that makes a claim for coverage under a policy."; + case COAUTH: return "The entity that co-authored content. There can be multiple co-authors of content,which may take such forms as a such as a contract, a healthcare record entry or document, a policy, or a consent directive."; + case CONSENTER: return "A patient or patient representative who is the grantee in a healthcare related agreement such as a consent for healthcare services, advanced directive, or a privacy consent directive in accordance with jurisdictional, organizational, or patient policy."; + case CONSWIT: return "A person who has witnessed and attests to observing a patient being counseled about a healthcare related agreement such as a consent for healthcare services, advanced directive, or a privacy consent directive."; + case CONT: return "A person or an organization that provides or receives information regarding another entity. Examples; patient NOK and emergency contacts; guarantor contact; employer contact."; + case COPART: return "A person who participates in the generation of and attest to veracity of content, but is not an author or co-author. For example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report."; + case COVPTY: return "An entity, which is the insured, that receives benefits such as healthcare services, reimbursement for out-of-pocket expenses, or compensation for losses through coverage under the terms of an insurance policy. The underwriter of that policy is the scoping entity. The covered party receives coverage because of some contractual or other relationship with the holder of that policy. Note that a particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder."; + case DELEGATEE: return "A party to whom some right or authority is delegated by a delegator."; + case DELEGATOR: return "A party that delegates a right or authority to another party."; + case DEPEND: return "A person covered under an insurance policy or program based on an association with a subscriber, which is recognized by the policy holder. The dependent has an association with the subscriber such as a financial dependency or personal relationship such as that of a spouse, or a natural or adopted child. The policy holder may be required by law to recognize certain associations or may have discretion about the associations. For example, a policy holder may dictate the criteria for the dependent status of adult children who are students, such as requiring full time enrollment, or may recognize domestic partners as dependents. Under certain circumstances, the dependent may be under the indirect authority of a responsible party acting as a surrogate for the subscriber, for example, if the subscriber is differently-abled or deceased, a guardian ad Lidem or estate executor may be appointed to assume the subscriber's legal standing in the relationship with the dependent."; + case DPOWATT: return "A person who has been granted the authority to represent or act on another's behalf generally in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Unlike ordinary powers of attorney, durable powers can survive for long periods of time, and again, unlike standard powers of attorney, durable powers can continue after incompetency."; + case EMGCON: return "An entity to be contacted in the event of an emergency"; + case EVTWIT: return "A person who attests to observing an occurrence. For example, the witness has observed a procedure and is attesting to this fact."; + case EXCEST: return "A person who has been granted the authority to act as an estate executor for a deceased person who was the responsible party."; + case GRANTEE: return "A person who grants to another person the authority to represent or act on that person's behalf. Examples include (1) exercising specific rights belonging to the grantee; (2) performing specific duties on behalf of a grantee; and (3) making specific decisions concerning a grantee."; + case GRANTOR: return "A person who has been granted the authority to represent or act on another's behalf. Examples include (1) exercising specific rights belonging to the grantee; (2) performing specific duties on behalf of a grantee; and (3) making specific decisions concerning a grantee."; + case GUAR: return "A person or organization contractually recognized by the issuer as an entity that has assumed fiscal responsibility (e.g., by making or giving a promise, assurance, or pledge) for another entity's financial obligations by guaranteeing to pay for amounts owed to a particular account. In a healthcare context, the account may be a patient's billing account for services rendered by a provider or a health plan premium account."; + case GUARD: return "A person or organization legally empowered with responsibility for the care of a ward."; + case GUADLTM: return "A person appointed by the court to look out for the best interests of a minor child during the course of legal proceedings."; + case INF: return "An entity that is the source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject."; + case INTPRT: return "A person who converts spoken or written language into the language of key participants in an event such as when a provider is obtaining a patient's consent to treatment or permission to disclose information."; + case INSBJ: return "An entity that is the subject of an investigation. This role is scoped by the party responsible for the investigation."; + case HPOWATT: return "A person who has been granted the authority to represent or act on another's behalf for healthcare related matters in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Examples include (1) exercising specific healthcare legal rights belonging to the grantee such as signing a consent directive; (2) performing specific healthcare related legal duties on behalf of a grantee such as claims payment; and (3) making specific healthcare legal decisions concerning a grantee such as consenting to healthcare services."; + case HPROV: return "An entity that is authorized to provide health care services by an authorizing organization or jurisdiction."; + case LEGAUTHN: return "A person in the role of verifier who attests to the accuracy of information content, and who has privileges to certify the legal authenticity of that content with a signature that constitutes a legal authentication. For example, a licensed physician who signs a consult authored by a resident physician who authenticated it."; + case NMDINS: return "A party to an insurance policy under which the insurer agrees to indemnify for losses, provides benefits for, or renders services. A named insured may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subject that is the named insured under a comprehensive automobile, disability, or property and casualty policy. The named insured and may or may not be the policy holder."; + case NOK: return "A person, who is a type of contact, designated to receive notifications on behalf of another person who is a relative."; + case NOTARY: return "The party credentialed to legally attest to the contract binding by verifying the identity and capacity of the grantor and grantee, and witnessing their signing of the contract or agreement such as a real estate transaction, pre-nuptial agreement, or a will."; + case PAT: return "A person, animal, or other living subject that is the actual or potential recipient of health care services."; + case POWATT: return "A person who has been granted the authority to represent or act on another's behalf generally in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Examples include (1) exercising specific legal rights belonging to the grantee such as signing a contract; (2) performing specific legal duties on behalf of a grantee such as making loan payments; and (3) making specific legal decisions concerning a grantee such as financial investment decisions."; + case PRIMAUTH: return "An entity that is the primary or sole author of information content. In the healthcare context, there can be only one primary author of health information content in a record entry or document."; + case PRIRECIP: return "An entity that may, should receive, or has received information or an object to which it was primarily addressed."; + case RECIP: return "An entity that may, should receive, or has received information or an object, which may not have been primarily addressed to it. For example, the staff of a provider, a clearinghouse, or other intermediary."; + case RESPRSN: return "An entity that has legal responsibility for another party."; + case REVIEWER: return "A person, device, or algorithm that has used approved criteria for filtered data for inclusion into the patient record. Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record."; + case TRANS: return "An entity entering the data into the originating system. This includes the transcriptionist for dictated text transcribed into electronic form."; + case SOURCE: return "An automated data source that generates a signature along with content. Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record."; + case SPOWATT: return "A person who has been granted the authority to represent or act on another's behalf for a limited set of specific matters in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. Examples include (1) exercising specific legal rights belonging to the grantee such as drafting a will; (2) performing specific legal duties on behalf of a grantee such as making a reversible mortgage to pay for end of life expenses; and (3) making specific legal decisions concerning a grantee such as managing a trust."; + case VALID: return "A person who validates a health information document for inclusion in the patient record. For example, a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record."; + case VERF: return "A person who asserts the correctness and appropriateness of an act or the recording of the act, and is accountable for the assertion that the act or the recording of the act complies with jurisdictional or organizational policy. For example, a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order."; + case WIT: return "A person witnessing the signature of another party. A witness is not knowledgeable about the content being signed, much less approves of anything stated in the content. For example, an advanced directive witness or a witness that a party to a contract signed that certain demographic or financial information is truthful."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AMENDER: return "Amender"; + case AUTHN: return "Authenticator"; + case AUT: return "Author"; + case AFFL: return "Affiliate"; + case AGNT: return "Agent"; + case ASSIGNED: return "Assigned Entity"; + case CIT: return "Citizen"; + case CLAIMANT: return "Claimant"; + case COAUTH: return "Co-Author"; + case CONSENTER: return "Consenter"; + case CONSWIT: return "Consent Witness"; + case CONT: return "Contact"; + case COPART: return "Co-Participant"; + case COVPTY: return "Covered Party"; + case DELEGATEE: return "Delegatee"; + case DELEGATOR: return "Delegator"; + case DEPEND: return "Dependent"; + case DPOWATT: return "Durable Power of Attorney"; + case EMGCON: return "Emergency Contact"; + case EVTWIT: return "Event Witness"; + case EXCEST: return "Executor of Estate"; + case GRANTEE: return "Grantee"; + case GRANTOR: return "Grantor"; + case GUAR: return "Guarantor"; + case GUARD: return "Guardian"; + case GUADLTM: return "Guardian ad lidem"; + case INF: return "Informant"; + case INTPRT: return "Interpreter"; + case INSBJ: return "Investigation Subject"; + case HPOWATT: return "Healthcare Power of Attorney"; + case HPROV: return "Healthcare Provider"; + case LEGAUTHN: return "Legal Authenticator"; + case NMDINS: return "Named Insured"; + case NOK: return "Next of Kin"; + case NOTARY: return "Notary"; + case PAT: return "Patient"; + case POWATT: return "Power of Attorney"; + case PRIMAUTH: return "Primary Author"; + case PRIRECIP: return "Primary Responsible Party "; + case RECIP: return "Recipient"; + case RESPRSN: return "Responsible Party"; + case REVIEWER: return "Reviewer"; + case TRANS: return "Transcriber"; + case SOURCE: return "Source"; + case SPOWATT: return "Special Power of Attorney"; + case VALID: return "Validator"; + case VERF: return "Verifier"; + case WIT: return "Witness"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSignerTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSignerTypeEnumFactory.java new file mode 100644 index 00000000000..e840ff53530 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSignerTypeEnumFactory.java @@ -0,0 +1,246 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractSignerTypeEnumFactory implements EnumFactory { + + public ContractSignerType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AMENDER".equals(codeString)) + return ContractSignerType.AMENDER; + if ("AUTHN".equals(codeString)) + return ContractSignerType.AUTHN; + if ("AUT".equals(codeString)) + return ContractSignerType.AUT; + if ("AFFL".equals(codeString)) + return ContractSignerType.AFFL; + if ("AGNT".equals(codeString)) + return ContractSignerType.AGNT; + if ("ASSIGNED".equals(codeString)) + return ContractSignerType.ASSIGNED; + if ("CIT".equals(codeString)) + return ContractSignerType.CIT; + if ("CLAIMANT".equals(codeString)) + return ContractSignerType.CLAIMANT; + if ("COAUTH".equals(codeString)) + return ContractSignerType.COAUTH; + if ("CONSENTER".equals(codeString)) + return ContractSignerType.CONSENTER; + if ("CONSWIT".equals(codeString)) + return ContractSignerType.CONSWIT; + if ("CONT".equals(codeString)) + return ContractSignerType.CONT; + if ("COPART".equals(codeString)) + return ContractSignerType.COPART; + if ("COVPTY".equals(codeString)) + return ContractSignerType.COVPTY; + if ("DELEGATEE".equals(codeString)) + return ContractSignerType.DELEGATEE; + if ("delegator".equals(codeString)) + return ContractSignerType.DELEGATOR; + if ("DEPEND".equals(codeString)) + return ContractSignerType.DEPEND; + if ("DPOWATT".equals(codeString)) + return ContractSignerType.DPOWATT; + if ("EMGCON".equals(codeString)) + return ContractSignerType.EMGCON; + if ("EVTWIT".equals(codeString)) + return ContractSignerType.EVTWIT; + if ("EXCEST".equals(codeString)) + return ContractSignerType.EXCEST; + if ("GRANTEE".equals(codeString)) + return ContractSignerType.GRANTEE; + if ("GRANTOR".equals(codeString)) + return ContractSignerType.GRANTOR; + if ("GUAR".equals(codeString)) + return ContractSignerType.GUAR; + if ("GUARD".equals(codeString)) + return ContractSignerType.GUARD; + if ("GUADLTM".equals(codeString)) + return ContractSignerType.GUADLTM; + if ("INF".equals(codeString)) + return ContractSignerType.INF; + if ("INTPRT".equals(codeString)) + return ContractSignerType.INTPRT; + if ("INSBJ".equals(codeString)) + return ContractSignerType.INSBJ; + if ("HPOWATT".equals(codeString)) + return ContractSignerType.HPOWATT; + if ("HPROV".equals(codeString)) + return ContractSignerType.HPROV; + if ("LEGAUTHN".equals(codeString)) + return ContractSignerType.LEGAUTHN; + if ("NMDINS".equals(codeString)) + return ContractSignerType.NMDINS; + if ("NOK".equals(codeString)) + return ContractSignerType.NOK; + if ("NOTARY".equals(codeString)) + return ContractSignerType.NOTARY; + if ("PAT".equals(codeString)) + return ContractSignerType.PAT; + if ("POWATT".equals(codeString)) + return ContractSignerType.POWATT; + if ("PRIMAUTH".equals(codeString)) + return ContractSignerType.PRIMAUTH; + if ("PRIRECIP".equals(codeString)) + return ContractSignerType.PRIRECIP; + if ("RECIP".equals(codeString)) + return ContractSignerType.RECIP; + if ("RESPRSN".equals(codeString)) + return ContractSignerType.RESPRSN; + if ("REVIEWER".equals(codeString)) + return ContractSignerType.REVIEWER; + if ("TRANS".equals(codeString)) + return ContractSignerType.TRANS; + if ("SOURCE".equals(codeString)) + return ContractSignerType.SOURCE; + if ("SPOWATT".equals(codeString)) + return ContractSignerType.SPOWATT; + if ("VALID".equals(codeString)) + return ContractSignerType.VALID; + if ("VERF".equals(codeString)) + return ContractSignerType.VERF; + if ("WIT".equals(codeString)) + return ContractSignerType.WIT; + throw new IllegalArgumentException("Unknown ContractSignerType code '"+codeString+"'"); + } + + public String toCode(ContractSignerType code) { + if (code == ContractSignerType.AMENDER) + return "AMENDER"; + if (code == ContractSignerType.AUTHN) + return "AUTHN"; + if (code == ContractSignerType.AUT) + return "AUT"; + if (code == ContractSignerType.AFFL) + return "AFFL"; + if (code == ContractSignerType.AGNT) + return "AGNT"; + if (code == ContractSignerType.ASSIGNED) + return "ASSIGNED"; + if (code == ContractSignerType.CIT) + return "CIT"; + if (code == ContractSignerType.CLAIMANT) + return "CLAIMANT"; + if (code == ContractSignerType.COAUTH) + return "COAUTH"; + if (code == ContractSignerType.CONSENTER) + return "CONSENTER"; + if (code == ContractSignerType.CONSWIT) + return "CONSWIT"; + if (code == ContractSignerType.CONT) + return "CONT"; + if (code == ContractSignerType.COPART) + return "COPART"; + if (code == ContractSignerType.COVPTY) + return "COVPTY"; + if (code == ContractSignerType.DELEGATEE) + return "DELEGATEE"; + if (code == ContractSignerType.DELEGATOR) + return "delegator"; + if (code == ContractSignerType.DEPEND) + return "DEPEND"; + if (code == ContractSignerType.DPOWATT) + return "DPOWATT"; + if (code == ContractSignerType.EMGCON) + return "EMGCON"; + if (code == ContractSignerType.EVTWIT) + return "EVTWIT"; + if (code == ContractSignerType.EXCEST) + return "EXCEST"; + if (code == ContractSignerType.GRANTEE) + return "GRANTEE"; + if (code == ContractSignerType.GRANTOR) + return "GRANTOR"; + if (code == ContractSignerType.GUAR) + return "GUAR"; + if (code == ContractSignerType.GUARD) + return "GUARD"; + if (code == ContractSignerType.GUADLTM) + return "GUADLTM"; + if (code == ContractSignerType.INF) + return "INF"; + if (code == ContractSignerType.INTPRT) + return "INTPRT"; + if (code == ContractSignerType.INSBJ) + return "INSBJ"; + if (code == ContractSignerType.HPOWATT) + return "HPOWATT"; + if (code == ContractSignerType.HPROV) + return "HPROV"; + if (code == ContractSignerType.LEGAUTHN) + return "LEGAUTHN"; + if (code == ContractSignerType.NMDINS) + return "NMDINS"; + if (code == ContractSignerType.NOK) + return "NOK"; + if (code == ContractSignerType.NOTARY) + return "NOTARY"; + if (code == ContractSignerType.PAT) + return "PAT"; + if (code == ContractSignerType.POWATT) + return "POWATT"; + if (code == ContractSignerType.PRIMAUTH) + return "PRIMAUTH"; + if (code == ContractSignerType.PRIRECIP) + return "PRIRECIP"; + if (code == ContractSignerType.RECIP) + return "RECIP"; + if (code == ContractSignerType.RESPRSN) + return "RESPRSN"; + if (code == ContractSignerType.REVIEWER) + return "REVIEWER"; + if (code == ContractSignerType.TRANS) + return "TRANS"; + if (code == ContractSignerType.SOURCE) + return "SOURCE"; + if (code == ContractSignerType.SPOWATT) + return "SPOWATT"; + if (code == ContractSignerType.VALID) + return "VALID"; + if (code == ContractSignerType.VERF) + return "VERF"; + if (code == ContractSignerType.WIT) + return "WIT"; + return "?"; + } + + public String toSystem(ContractSignerType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractStatus.java new file mode 100644 index 00000000000..4482f4a083e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractStatus.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractStatus { + + /** + * Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced. + */ + AMENDED, + /** + * Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced. + */ + APPENDED, + /** + * Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted. + */ + CANCELLED, + /** + * Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7.Comparable FHIR and v.3 status codes: on hold; pended; suspended. + */ + DISPUTED, + /** + * Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status. + */ + ENTEREDINERROR, + /** + * Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity. May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active. + */ + EXECUTABLE, + /** + * Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity. Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed. + */ + EXECUTED, + /** + * Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms. E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held. + */ + NEGOTIABLE, + /** + * Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template','form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new. + */ + OFFERED, + /** + * Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy. Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended. + */ + POLICY, + /** + * Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes: stopped; cancelled. + */ + REJECTED, + /** + * Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded. + */ + RENEWED, + /** + * A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. + */ + REVOKED, + /** + * Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated. + */ + RESOLVED, + /** + * Contract reaches its expiry date. It may or may not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted. + */ + TERMINATED, + /** + * added to help the parsers + */ + NULL; + public static ContractStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("amended".equals(codeString)) + return AMENDED; + if ("appended".equals(codeString)) + return APPENDED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("disputed".equals(codeString)) + return DISPUTED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("executable".equals(codeString)) + return EXECUTABLE; + if ("executed".equals(codeString)) + return EXECUTED; + if ("negotiable".equals(codeString)) + return NEGOTIABLE; + if ("offered".equals(codeString)) + return OFFERED; + if ("policy".equals(codeString)) + return POLICY; + if ("rejected".equals(codeString)) + return REJECTED; + if ("renewed".equals(codeString)) + return RENEWED; + if ("revoked".equals(codeString)) + return REVOKED; + if ("resolved".equals(codeString)) + return RESOLVED; + if ("terminated".equals(codeString)) + return TERMINATED; + throw new FHIRException("Unknown ContractStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AMENDED: return "amended"; + case APPENDED: return "appended"; + case CANCELLED: return "cancelled"; + case DISPUTED: return "disputed"; + case ENTEREDINERROR: return "entered-in-error"; + case EXECUTABLE: return "executable"; + case EXECUTED: return "executed"; + case NEGOTIABLE: return "negotiable"; + case OFFERED: return "offered"; + case POLICY: return "policy"; + case REJECTED: return "rejected"; + case RENEWED: return "renewed"; + case REVOKED: return "revoked"; + case RESOLVED: return "resolved"; + case TERMINATED: return "terminated"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contract-status"; + } + public String getDefinition() { + switch (this) { + case AMENDED: return "Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced."; + case APPENDED: return "Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced."; + case CANCELLED: return "Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted."; + case DISPUTED: return "Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7.Comparable FHIR and v.3 status codes: on hold; pended; suspended."; + case ENTEREDINERROR: return "Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status."; + case EXECUTABLE: return "Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity. May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active."; + case EXECUTED: return "Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity. Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed."; + case NEGOTIABLE: return "Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms. E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held."; + case OFFERED: return "Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template','form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new."; + case POLICY: return "Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy. Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended."; + case REJECTED: return " Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes: stopped; cancelled."; + case RENEWED: return "Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded."; + case REVOKED: return "A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified."; + case RESOLVED: return "Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated."; + case TERMINATED: return "Contract reaches its expiry date. It may or may not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AMENDED: return "Amended"; + case APPENDED: return "Appended"; + case CANCELLED: return "Cancelled"; + case DISPUTED: return "Disputed"; + case ENTEREDINERROR: return "Entered in Error"; + case EXECUTABLE: return "Executable"; + case EXECUTED: return "Executed"; + case NEGOTIABLE: return "Negotiable"; + case OFFERED: return "Offered"; + case POLICY: return "Policy"; + case REJECTED: return "Rejected"; + case RENEWED: return "Renewed"; + case REVOKED: return "Revoked"; + case RESOLVED: return "Resolved"; + case TERMINATED: return "Terminated"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractStatusEnumFactory.java new file mode 100644 index 00000000000..0d4fa772e69 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractStatusEnumFactory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractStatusEnumFactory implements EnumFactory { + + public ContractStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("amended".equals(codeString)) + return ContractStatus.AMENDED; + if ("appended".equals(codeString)) + return ContractStatus.APPENDED; + if ("cancelled".equals(codeString)) + return ContractStatus.CANCELLED; + if ("disputed".equals(codeString)) + return ContractStatus.DISPUTED; + if ("entered-in-error".equals(codeString)) + return ContractStatus.ENTEREDINERROR; + if ("executable".equals(codeString)) + return ContractStatus.EXECUTABLE; + if ("executed".equals(codeString)) + return ContractStatus.EXECUTED; + if ("negotiable".equals(codeString)) + return ContractStatus.NEGOTIABLE; + if ("offered".equals(codeString)) + return ContractStatus.OFFERED; + if ("policy".equals(codeString)) + return ContractStatus.POLICY; + if ("rejected".equals(codeString)) + return ContractStatus.REJECTED; + if ("renewed".equals(codeString)) + return ContractStatus.RENEWED; + if ("revoked".equals(codeString)) + return ContractStatus.REVOKED; + if ("resolved".equals(codeString)) + return ContractStatus.RESOLVED; + if ("terminated".equals(codeString)) + return ContractStatus.TERMINATED; + throw new IllegalArgumentException("Unknown ContractStatus code '"+codeString+"'"); + } + + public String toCode(ContractStatus code) { + if (code == ContractStatus.AMENDED) + return "amended"; + if (code == ContractStatus.APPENDED) + return "appended"; + if (code == ContractStatus.CANCELLED) + return "cancelled"; + if (code == ContractStatus.DISPUTED) + return "disputed"; + if (code == ContractStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == ContractStatus.EXECUTABLE) + return "executable"; + if (code == ContractStatus.EXECUTED) + return "executed"; + if (code == ContractStatus.NEGOTIABLE) + return "negotiable"; + if (code == ContractStatus.OFFERED) + return "offered"; + if (code == ContractStatus.POLICY) + return "policy"; + if (code == ContractStatus.REJECTED) + return "rejected"; + if (code == ContractStatus.RENEWED) + return "renewed"; + if (code == ContractStatus.REVOKED) + return "revoked"; + if (code == ContractStatus.RESOLVED) + return "resolved"; + if (code == ContractStatus.TERMINATED) + return "terminated"; + return "?"; + } + + public String toSystem(ContractStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSubtype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSubtype.java new file mode 100644 index 00000000000..65be1043fff --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSubtype.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractSubtype { + + /** + * Canadian health information disclosure policy. + */ + DISCLOSURECA, + /** + * United States health information disclosure policy. + */ + DISCLOSUREUS, + /** + * added to help the parsers + */ + NULL; + public static ContractSubtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("disclosure-ca".equals(codeString)) + return DISCLOSURECA; + if ("disclosure-us".equals(codeString)) + return DISCLOSUREUS; + throw new FHIRException("Unknown ContractSubtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DISCLOSURECA: return "disclosure-ca"; + case DISCLOSUREUS: return "disclosure-us"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contractsubtypecodes"; + } + public String getDefinition() { + switch (this) { + case DISCLOSURECA: return "Canadian health information disclosure policy."; + case DISCLOSUREUS: return "United States health information disclosure policy."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DISCLOSURECA: return "Disclosure-CA"; + case DISCLOSUREUS: return "Disclosure-US"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSubtypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSubtypeEnumFactory.java new file mode 100644 index 00000000000..f9ea4ef731c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractSubtypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractSubtypeEnumFactory implements EnumFactory { + + public ContractSubtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("disclosure-ca".equals(codeString)) + return ContractSubtype.DISCLOSURECA; + if ("disclosure-us".equals(codeString)) + return ContractSubtype.DISCLOSUREUS; + throw new IllegalArgumentException("Unknown ContractSubtype code '"+codeString+"'"); + } + + public String toCode(ContractSubtype code) { + if (code == ContractSubtype.DISCLOSURECA) + return "disclosure-ca"; + if (code == ContractSubtype.DISCLOSUREUS) + return "disclosure-us"; + return "?"; + } + + public String toSystem(ContractSubtype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermSubtype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermSubtype.java new file mode 100644 index 00000000000..a0ff580a59f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermSubtype.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractTermSubtype { + + /** + * Terms that go to the very root of a contract. + */ + CONDITION, + /** + * Less imperative than a condition, so the contract will survive a breach + */ + WARRANTY, + /** + * Breach of which may or may not go to the root of the contract depending upon the nature of the breach + */ + INNOMINATE, + /** + * added to help the parsers + */ + NULL; + public static ContractTermSubtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return CONDITION; + if ("warranty".equals(codeString)) + return WARRANTY; + if ("innominate".equals(codeString)) + return INNOMINATE; + throw new FHIRException("Unknown ContractTermSubtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONDITION: return "condition"; + case WARRANTY: return "warranty"; + case INNOMINATE: return "innominate"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contracttermsubtypecodes"; + } + public String getDefinition() { + switch (this) { + case CONDITION: return "Terms that go to the very root of a contract."; + case WARRANTY: return "Less imperative than a condition, so the contract will survive a breach"; + case INNOMINATE: return "Breach of which may or may not go to the root of the contract depending upon the nature of the breach"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONDITION: return "Condition"; + case WARRANTY: return "Warranty"; + case INNOMINATE: return "Innominate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermSubtypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermSubtypeEnumFactory.java new file mode 100644 index 00000000000..ebb42d8c167 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermSubtypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractTermSubtypeEnumFactory implements EnumFactory { + + public ContractTermSubtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return ContractTermSubtype.CONDITION; + if ("warranty".equals(codeString)) + return ContractTermSubtype.WARRANTY; + if ("innominate".equals(codeString)) + return ContractTermSubtype.INNOMINATE; + throw new IllegalArgumentException("Unknown ContractTermSubtype code '"+codeString+"'"); + } + + public String toCode(ContractTermSubtype code) { + if (code == ContractTermSubtype.CONDITION) + return "condition"; + if (code == ContractTermSubtype.WARRANTY) + return "warranty"; + if (code == ContractTermSubtype.INNOMINATE) + return "innominate"; + return "?"; + } + + public String toSystem(ContractTermSubtype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermType.java new file mode 100644 index 00000000000..1dc5e8d2213 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractTermType { + + /** + * Based on specialized statutes that deal with particular subjects. + */ + STATUTORY, + /** + * Execution of the term in the contract is conditional on the execution of other actions. + */ + SUBJECTTO, + /** + * added to help the parsers + */ + NULL; + public static ContractTermType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("statutory".equals(codeString)) + return STATUTORY; + if ("subject-to".equals(codeString)) + return SUBJECTTO; + throw new FHIRException("Unknown ContractTermType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case STATUTORY: return "statutory"; + case SUBJECTTO: return "subject-to"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contracttermtypecodes"; + } + public String getDefinition() { + switch (this) { + case STATUTORY: return "Based on specialized statutes that deal with particular subjects."; + case SUBJECTTO: return "Execution of the term in the contract is conditional on the execution of other actions."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case STATUTORY: return "Statutory"; + case SUBJECTTO: return "Subject To"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermTypeEnumFactory.java new file mode 100644 index 00000000000..d82c58db64d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTermTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractTermTypeEnumFactory implements EnumFactory { + + public ContractTermType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("statutory".equals(codeString)) + return ContractTermType.STATUTORY; + if ("subject-to".equals(codeString)) + return ContractTermType.SUBJECTTO; + throw new IllegalArgumentException("Unknown ContractTermType code '"+codeString+"'"); + } + + public String toCode(ContractTermType code) { + if (code == ContractTermType.STATUTORY) + return "statutory"; + if (code == ContractTermType.SUBJECTTO) + return "subject-to"; + return "?"; + } + + public String toSystem(ContractTermType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractType.java new file mode 100644 index 00000000000..5cd756082ef --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContractType { + + /** + * Privacy policy. + */ + PRIVACY, + /** + * Information disclosure policy. + */ + DISCLOSURE, + /** + * Health Insurance policy. + */ + HEALTHINSURANCE, + /** + * Contract to supply goods or services. + */ + SUPPLY, + /** + * Consent Directive. + */ + CONSENT, + /** + * added to help the parsers + */ + NULL; + public static ContractType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("privacy".equals(codeString)) + return PRIVACY; + if ("disclosure".equals(codeString)) + return DISCLOSURE; + if ("healthinsurance".equals(codeString)) + return HEALTHINSURANCE; + if ("supply".equals(codeString)) + return SUPPLY; + if ("consent".equals(codeString)) + return CONSENT; + throw new FHIRException("Unknown ContractType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRIVACY: return "privacy"; + case DISCLOSURE: return "disclosure"; + case HEALTHINSURANCE: return "healthinsurance"; + case SUPPLY: return "supply"; + case CONSENT: return "consent"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contracttypecodes"; + } + public String getDefinition() { + switch (this) { + case PRIVACY: return "Privacy policy."; + case DISCLOSURE: return "Information disclosure policy."; + case HEALTHINSURANCE: return "Health Insurance policy."; + case SUPPLY: return "Contract to supply goods or services."; + case CONSENT: return "Consent Directive."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRIVACY: return "Privacy"; + case DISCLOSURE: return "Disclosure"; + case HEALTHINSURANCE: return "Health Insurance"; + case SUPPLY: return "Supply Contract"; + case CONSENT: return "Consent"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTypeEnumFactory.java new file mode 100644 index 00000000000..796d8a0bc03 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContractTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContractTypeEnumFactory implements EnumFactory { + + public ContractType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("privacy".equals(codeString)) + return ContractType.PRIVACY; + if ("disclosure".equals(codeString)) + return ContractType.DISCLOSURE; + if ("healthinsurance".equals(codeString)) + return ContractType.HEALTHINSURANCE; + if ("supply".equals(codeString)) + return ContractType.SUPPLY; + if ("consent".equals(codeString)) + return ContractType.CONSENT; + throw new IllegalArgumentException("Unknown ContractType code '"+codeString+"'"); + } + + public String toCode(ContractType code) { + if (code == ContractType.PRIVACY) + return "privacy"; + if (code == ContractType.DISCLOSURE) + return "disclosure"; + if (code == ContractType.HEALTHINSURANCE) + return "healthinsurance"; + if (code == ContractType.SUPPLY) + return "supply"; + if (code == ContractType.CONSENT) + return "consent"; + return "?"; + } + + public String toSystem(ContractType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContributorType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContributorType.java new file mode 100644 index 00000000000..2b877eb49a3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContributorType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ContributorType { + + /** + * An author of the content of the module + */ + AUTHOR, + /** + * An editor of the content of the module + */ + EDITOR, + /** + * A reviewer of the content of the module + */ + REVIEWER, + /** + * An endorser of the content of the module + */ + ENDORSER, + /** + * added to help the parsers + */ + NULL; + public static ContributorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("author".equals(codeString)) + return AUTHOR; + if ("editor".equals(codeString)) + return EDITOR; + if ("reviewer".equals(codeString)) + return REVIEWER; + if ("endorser".equals(codeString)) + return ENDORSER; + throw new FHIRException("Unknown ContributorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AUTHOR: return "author"; + case EDITOR: return "editor"; + case REVIEWER: return "reviewer"; + case ENDORSER: return "endorser"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/contributor-type"; + } + public String getDefinition() { + switch (this) { + case AUTHOR: return "An author of the content of the module"; + case EDITOR: return "An editor of the content of the module"; + case REVIEWER: return "A reviewer of the content of the module"; + case ENDORSER: return "An endorser of the content of the module"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AUTHOR: return "Author"; + case EDITOR: return "Editor"; + case REVIEWER: return "Reviewer"; + case ENDORSER: return "Endorser"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContributorTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContributorTypeEnumFactory.java new file mode 100644 index 00000000000..034b604bacb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ContributorTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ContributorTypeEnumFactory implements EnumFactory { + + public ContributorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("author".equals(codeString)) + return ContributorType.AUTHOR; + if ("editor".equals(codeString)) + return ContributorType.EDITOR; + if ("reviewer".equals(codeString)) + return ContributorType.REVIEWER; + if ("endorser".equals(codeString)) + return ContributorType.ENDORSER; + throw new IllegalArgumentException("Unknown ContributorType code '"+codeString+"'"); + } + + public String toCode(ContributorType code) { + if (code == ContributorType.AUTHOR) + return "author"; + if (code == ContributorType.EDITOR) + return "editor"; + if (code == ContributorType.REVIEWER) + return "reviewer"; + if (code == ContributorType.ENDORSER) + return "endorser"; + return "?"; + } + + public String toSystem(ContributorType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CopyNumberEvent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CopyNumberEvent.java new file mode 100644 index 00000000000..391abb2512c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CopyNumberEvent.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CopyNumberEvent { + + /** + * amplificaiton + */ + AMP, + /** + * deletion + */ + DEL, + /** + * loss of function + */ + LOF, + /** + * added to help the parsers + */ + NULL; + public static CopyNumberEvent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("amp".equals(codeString)) + return AMP; + if ("del".equals(codeString)) + return DEL; + if ("lof".equals(codeString)) + return LOF; + throw new FHIRException("Unknown CopyNumberEvent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AMP: return "amp"; + case DEL: return "del"; + case LOF: return "lof"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/copy-number-event"; + } + public String getDefinition() { + switch (this) { + case AMP: return "amplificaiton"; + case DEL: return "deletion"; + case LOF: return "loss of function"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AMP: return "amplificaiton"; + case DEL: return "deletion"; + case LOF: return "loss of function"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CopyNumberEventEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CopyNumberEventEnumFactory.java new file mode 100644 index 00000000000..677249cece1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CopyNumberEventEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CopyNumberEventEnumFactory implements EnumFactory { + + public CopyNumberEvent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("amp".equals(codeString)) + return CopyNumberEvent.AMP; + if ("del".equals(codeString)) + return CopyNumberEvent.DEL; + if ("lof".equals(codeString)) + return CopyNumberEvent.LOF; + throw new IllegalArgumentException("Unknown CopyNumberEvent code '"+codeString+"'"); + } + + public String toCode(CopyNumberEvent code) { + if (code == CopyNumberEvent.AMP) + return "amp"; + if (code == CopyNumberEvent.DEL) + return "del"; + if (code == CopyNumberEvent.LOF) + return "lof"; + return "?"; + } + + public String toSystem(CopyNumberEvent code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageLevel.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageLevel.java new file mode 100644 index 00000000000..46a65b006da --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageLevel.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CoverageLevel { + + /** + * An employee group + */ + GROUP, + /** + * A sub-group of an employee group + */ + SUBGROUP, + /** + * A specific suite of benefits. + */ + PLAN, + /** + * A subset of a specific suite of benefits. + */ + SUBPLAN, + /** + * A class of benefits. + */ + CLASS, + /** + * A subset of a class of benefits. + */ + SUBCLASS, + /** + * added to help the parsers + */ + NULL; + public static CoverageLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return GROUP; + if ("subgroup".equals(codeString)) + return SUBGROUP; + if ("plan".equals(codeString)) + return PLAN; + if ("subplan".equals(codeString)) + return SUBPLAN; + if ("class".equals(codeString)) + return CLASS; + if ("subclass".equals(codeString)) + return SUBCLASS; + throw new FHIRException("Unknown CoverageLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUP: return "group"; + case SUBGROUP: return "subgroup"; + case PLAN: return "plan"; + case SUBPLAN: return "subplan"; + case CLASS: return "class"; + case SUBCLASS: return "subclass"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/coverage-level"; + } + public String getDefinition() { + switch (this) { + case GROUP: return "An employee group"; + case SUBGROUP: return "A sub-group of an employee group"; + case PLAN: return "A specific suite of benefits."; + case SUBPLAN: return "A subset of a specific suite of benefits."; + case CLASS: return "A class of benefits."; + case SUBCLASS: return "A subset of a class of benefits."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUP: return "Group"; + case SUBGROUP: return "SubGroup"; + case PLAN: return "Plan"; + case SUBPLAN: return "SubPlan"; + case CLASS: return "Class"; + case SUBCLASS: return "SubClass"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageLevelEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageLevelEnumFactory.java new file mode 100644 index 00000000000..09e91b1eb34 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageLevelEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CoverageLevelEnumFactory implements EnumFactory { + + public CoverageLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return CoverageLevel.GROUP; + if ("subgroup".equals(codeString)) + return CoverageLevel.SUBGROUP; + if ("plan".equals(codeString)) + return CoverageLevel.PLAN; + if ("subplan".equals(codeString)) + return CoverageLevel.SUBPLAN; + if ("class".equals(codeString)) + return CoverageLevel.CLASS; + if ("subclass".equals(codeString)) + return CoverageLevel.SUBCLASS; + throw new IllegalArgumentException("Unknown CoverageLevel code '"+codeString+"'"); + } + + public String toCode(CoverageLevel code) { + if (code == CoverageLevel.GROUP) + return "group"; + if (code == CoverageLevel.SUBGROUP) + return "subgroup"; + if (code == CoverageLevel.PLAN) + return "plan"; + if (code == CoverageLevel.SUBPLAN) + return "subplan"; + if (code == CoverageLevel.CLASS) + return "class"; + if (code == CoverageLevel.SUBCLASS) + return "subclass"; + return "?"; + } + + public String toSystem(CoverageLevel code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageSelfpay.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageSelfpay.java new file mode 100644 index 00000000000..6818e72e6d8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageSelfpay.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CoverageSelfpay { + + /** + * An individual or oraganization is paying directly for goods and services. + */ + PAY, + /** + * added to help the parsers + */ + NULL; + public static CoverageSelfpay fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pay".equals(codeString)) + return PAY; + throw new FHIRException("Unknown CoverageSelfpay code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAY: return "pay"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/coverage-selfpay"; + } + public String getDefinition() { + switch (this) { + case PAY: return "An individual or oraganization is paying directly for goods and services."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAY: return "Pay"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageSelfpayEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageSelfpayEnumFactory.java new file mode 100644 index 00000000000..cb21b2a9c5f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CoverageSelfpayEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CoverageSelfpayEnumFactory implements EnumFactory { + + public CoverageSelfpay fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pay".equals(codeString)) + return CoverageSelfpay.PAY; + throw new IllegalArgumentException("Unknown CoverageSelfpay code '"+codeString+"'"); + } + + public String toCode(CoverageSelfpay code) { + if (code == CoverageSelfpay.PAY) + return "pay"; + return "?"; + } + + public String toSystem(CoverageSelfpay code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifEvidenceQuality.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifEvidenceQuality.java new file mode 100644 index 00000000000..55186215494 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifEvidenceQuality.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CqifEvidenceQuality { + + /** + * High quality evidence + */ + HIGH, + /** + * Moderate quality evidence + */ + MODERATE, + /** + * Low quality evidence + */ + LOW, + /** + * Very low quality evidence + */ + VERYLOW, + /** + * added to help the parsers + */ + NULL; + public static CqifEvidenceQuality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return HIGH; + if ("moderate".equals(codeString)) + return MODERATE; + if ("low".equals(codeString)) + return LOW; + if ("very-low".equals(codeString)) + return VERYLOW; + throw new FHIRException("Unknown CqifEvidenceQuality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HIGH: return "high"; + case MODERATE: return "moderate"; + case LOW: return "low"; + case VERYLOW: return "very-low"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/evidence-quality"; + } + public String getDefinition() { + switch (this) { + case HIGH: return "High quality evidence"; + case MODERATE: return "Moderate quality evidence"; + case LOW: return "Low quality evidence"; + case VERYLOW: return "Very low quality evidence"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HIGH: return "High quality"; + case MODERATE: return "Moderate quality"; + case LOW: return "Low quality"; + case VERYLOW: return "Very low quality"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifEvidenceQualityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifEvidenceQualityEnumFactory.java new file mode 100644 index 00000000000..bb3c9e39b11 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifEvidenceQualityEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CqifEvidenceQualityEnumFactory implements EnumFactory { + + public CqifEvidenceQuality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return CqifEvidenceQuality.HIGH; + if ("moderate".equals(codeString)) + return CqifEvidenceQuality.MODERATE; + if ("low".equals(codeString)) + return CqifEvidenceQuality.LOW; + if ("very-low".equals(codeString)) + return CqifEvidenceQuality.VERYLOW; + throw new IllegalArgumentException("Unknown CqifEvidenceQuality code '"+codeString+"'"); + } + + public String toCode(CqifEvidenceQuality code) { + if (code == CqifEvidenceQuality.HIGH) + return "high"; + if (code == CqifEvidenceQuality.MODERATE) + return "moderate"; + if (code == CqifEvidenceQuality.LOW) + return "low"; + if (code == CqifEvidenceQuality.VERYLOW) + return "very-low"; + return "?"; + } + + public String toSystem(CqifEvidenceQuality code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifRecommendationStrength.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifRecommendationStrength.java new file mode 100644 index 00000000000..2c58a6ffac8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifRecommendationStrength.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum CqifRecommendationStrength { + + /** + * Strong recommendation + */ + STRONG, + /** + * Weak recommendation + */ + WEAK, + /** + * added to help the parsers + */ + NULL; + public static CqifRecommendationStrength fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("strong".equals(codeString)) + return STRONG; + if ("weak".equals(codeString)) + return WEAK; + throw new FHIRException("Unknown CqifRecommendationStrength code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case STRONG: return "strong"; + case WEAK: return "weak"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/recommendation-strength"; + } + public String getDefinition() { + switch (this) { + case STRONG: return "Strong recommendation"; + case WEAK: return "Weak recommendation"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case STRONG: return "Strong"; + case WEAK: return "Weak"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifRecommendationStrengthEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifRecommendationStrengthEnumFactory.java new file mode 100644 index 00000000000..dc722a92a26 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/CqifRecommendationStrengthEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class CqifRecommendationStrengthEnumFactory implements EnumFactory { + + public CqifRecommendationStrength fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("strong".equals(codeString)) + return CqifRecommendationStrength.STRONG; + if ("weak".equals(codeString)) + return CqifRecommendationStrength.WEAK; + throw new IllegalArgumentException("Unknown CqifRecommendationStrength code '"+codeString+"'"); + } + + public String toCode(CqifRecommendationStrength code) { + if (code == CqifRecommendationStrength.STRONG) + return "strong"; + if (code == CqifRecommendationStrength.WEAK) + return "weak"; + return "?"; + } + + public String toSystem(CqifRecommendationStrength code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataAbsentReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataAbsentReason.java new file mode 100644 index 00000000000..f202363a864 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataAbsentReason.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DataAbsentReason { + + /** + * The value is not known. + */ + UNKNOWN, + /** + * The source human does not know the value. + */ + ASKED, + /** + * There is reason to expect (from the workflow) that the value may become known. + */ + TEMP, + /** + * The workflow didn't lead to this value being known. + */ + NOTASKED, + /** + * The information is not available due to security, privacy or related reasons. + */ + MASKED, + /** + * The source system wasn't capable of supporting this element. + */ + UNSUPPORTED, + /** + * The content of the data is represented in the resource narrative. + */ + ASTEXT, + /** + * Some system or workflow process error means that the information is not available. + */ + ERROR, + /** + * NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value. + */ + NAN, + /** + * The value is not available because the observation procedure (test, etc.) was not performed. + */ + NOTPERFORMED, + /** + * added to help the parsers + */ + NULL; + public static DataAbsentReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("asked".equals(codeString)) + return ASKED; + if ("temp".equals(codeString)) + return TEMP; + if ("not-asked".equals(codeString)) + return NOTASKED; + if ("masked".equals(codeString)) + return MASKED; + if ("unsupported".equals(codeString)) + return UNSUPPORTED; + if ("astext".equals(codeString)) + return ASTEXT; + if ("error".equals(codeString)) + return ERROR; + if ("NaN".equals(codeString)) + return NAN; + if ("not-performed".equals(codeString)) + return NOTPERFORMED; + throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNKNOWN: return "unknown"; + case ASKED: return "asked"; + case TEMP: return "temp"; + case NOTASKED: return "not-asked"; + case MASKED: return "masked"; + case UNSUPPORTED: return "unsupported"; + case ASTEXT: return "astext"; + case ERROR: return "error"; + case NAN: return "NaN"; + case NOTPERFORMED: return "not-performed"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/data-absent-reason"; + } + public String getDefinition() { + switch (this) { + case UNKNOWN: return "The value is not known."; + case ASKED: return "The source human does not know the value."; + case TEMP: return "There is reason to expect (from the workflow) that the value may become known."; + case NOTASKED: return "The workflow didn't lead to this value being known."; + case MASKED: return "The information is not available due to security, privacy or related reasons."; + case UNSUPPORTED: return "The source system wasn't capable of supporting this element."; + case ASTEXT: return "The content of the data is represented in the resource narrative."; + case ERROR: return "Some system or workflow process error means that the information is not available."; + case NAN: return "NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value."; + case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNKNOWN: return "Unknown"; + case ASKED: return "Asked"; + case TEMP: return "Temp"; + case NOTASKED: return "Not Asked"; + case MASKED: return "Masked"; + case UNSUPPORTED: return "Unsupported"; + case ASTEXT: return "As Text"; + case ERROR: return "Error"; + case NAN: return "Not a Number"; + case NOTPERFORMED: return "Not Performed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataAbsentReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataAbsentReasonEnumFactory.java new file mode 100644 index 00000000000..35b5f812048 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataAbsentReasonEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DataAbsentReasonEnumFactory implements EnumFactory { + + public DataAbsentReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return DataAbsentReason.UNKNOWN; + if ("asked".equals(codeString)) + return DataAbsentReason.ASKED; + if ("temp".equals(codeString)) + return DataAbsentReason.TEMP; + if ("not-asked".equals(codeString)) + return DataAbsentReason.NOTASKED; + if ("masked".equals(codeString)) + return DataAbsentReason.MASKED; + if ("unsupported".equals(codeString)) + return DataAbsentReason.UNSUPPORTED; + if ("astext".equals(codeString)) + return DataAbsentReason.ASTEXT; + if ("error".equals(codeString)) + return DataAbsentReason.ERROR; + if ("NaN".equals(codeString)) + return DataAbsentReason.NAN; + if ("not-performed".equals(codeString)) + return DataAbsentReason.NOTPERFORMED; + throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'"); + } + + public String toCode(DataAbsentReason code) { + if (code == DataAbsentReason.UNKNOWN) + return "unknown"; + if (code == DataAbsentReason.ASKED) + return "asked"; + if (code == DataAbsentReason.TEMP) + return "temp"; + if (code == DataAbsentReason.NOTASKED) + return "not-asked"; + if (code == DataAbsentReason.MASKED) + return "masked"; + if (code == DataAbsentReason.UNSUPPORTED) + return "unsupported"; + if (code == DataAbsentReason.ASTEXT) + return "astext"; + if (code == DataAbsentReason.ERROR) + return "error"; + if (code == DataAbsentReason.NAN) + return "NaN"; + if (code == DataAbsentReason.NOTPERFORMED) + return "not-performed"; + return "?"; + } + + public String toSystem(DataAbsentReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataTypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataTypes.java new file mode 100644 index 00000000000..1ebb57df9a4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataTypes.java @@ -0,0 +1,555 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DataTypes { + + /** + * An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. + */ + ADDRESS, + /** + * A duration of time during which an organism (or a process) has existed. + */ + AGE, + /** + * A text note which also contains information about who made the statement and when. + */ + ANNOTATION, + /** + * For referring to data content defined in other formats. + */ + ATTACHMENT, + /** + * Base definition for all elements that are defined inside a resource - but not those in a data type. + */ + BACKBONEELEMENT, + /** + * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. + */ + CODEABLECONCEPT, + /** + * A reference to a code defined by a terminology system. + */ + CODING, + /** + * Specifies contact information for a person or organization. + */ + CONTACTDETAIL, + /** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + */ + CONTACTPOINT, + /** + * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers. + */ + CONTRIBUTOR, + /** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ + COUNT, + /** + * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data. + */ + DATAREQUIREMENT, + /** + * A length - a value with a unit that is a physical distance. + */ + DISTANCE, + /** + * Indicates how the medication is/was taken or should be taken by the patient. + */ + DOSAGE, + /** + * A length of time. + */ + DURATION, + /** + * Base definition for all elements in a resource. + */ + ELEMENT, + /** + * Captures constraints on each element within the resource, profile, or extension. + */ + ELEMENTDEFINITION, + /** + * Optional Extension Element - found in all resources. + */ + EXTENSION, + /** + * A human's name with the ability to identify parts and usage. + */ + HUMANNAME, + /** + * A technical identifier - identifies some entity uniquely and unambiguously. + */ + IDENTIFIER, + /** + * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. + */ + META, + /** + * An amount of economic utility in some recognized currency. + */ + MONEY, + /** + * A human-readable formatted text, including images. + */ + NARRATIVE, + /** + * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. + */ + PARAMETERDEFINITION, + /** + * A time period defined by a start and end date and optionally time. + */ + PERIOD, + /** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ + QUANTITY, + /** + * A set of ordered Quantities defined by a low and high limit. + */ + RANGE, + /** + * A relationship of two Quantity values - expressed as a numerator and a denominator. + */ + RATIO, + /** + * A reference from one resource to another. + */ + REFERENCE, + /** + * Related artifacts such as additional documentation, justification, or bibliographic references. + */ + RELATEDARTIFACT, + /** + * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. + */ + SAMPLEDDATA, + /** + * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different signature approaches have different utilities. + */ + SIGNATURE, + /** + * null + */ + SIMPLEQUANTITY, + /** + * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out. + */ + TIMING, + /** + * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. + */ + TRIGGERDEFINITION, + /** + * Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care). + */ + USAGECONTEXT, + /** + * A stream of bytes + */ + BASE64BINARY, + /** + * Value of "true" or "false" + */ + BOOLEAN, + /** + * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents + */ + CODE, + /** + * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates. + */ + DATE, + /** + * A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates. + */ + DATETIME, + /** + * A rational number with implicit precision + */ + DECIMAL, + /** + * Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive. + */ + ID, + /** + * An instant in time - known at least to the second + */ + INSTANT, + /** + * A whole number + */ + INTEGER, + /** + * A string that may contain markdown syntax for optional processing by a mark down presentation engine + */ + MARKDOWN, + /** + * An OID represented as a URI + */ + OID, + /** + * An integer with a value that is positive (e.g. >0) + */ + POSITIVEINT, + /** + * A sequence of Unicode characters + */ + STRING, + /** + * A time during the day, with no date specified + */ + TIME, + /** + * An integer with a value that is not negative (e.g. >= 0) + */ + UNSIGNEDINT, + /** + * String of characters used to identify a name or a resource + */ + URI, + /** + * A UUID, represented as a URI + */ + UUID, + /** + * XHTML format, as defined by W3C, but restricted usage (mainly, no active content) + */ + XHTML, + /** + * added to help the parsers + */ + NULL; + public static DataTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return ADDRESS; + if ("Age".equals(codeString)) + return AGE; + if ("Annotation".equals(codeString)) + return ANNOTATION; + if ("Attachment".equals(codeString)) + return ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return CODING; + if ("ContactDetail".equals(codeString)) + return CONTACTDETAIL; + if ("ContactPoint".equals(codeString)) + return CONTACTPOINT; + if ("Contributor".equals(codeString)) + return CONTRIBUTOR; + if ("Count".equals(codeString)) + return COUNT; + if ("DataRequirement".equals(codeString)) + return DATAREQUIREMENT; + if ("Distance".equals(codeString)) + return DISTANCE; + if ("Dosage".equals(codeString)) + return DOSAGE; + if ("Duration".equals(codeString)) + return DURATION; + if ("Element".equals(codeString)) + return ELEMENT; + if ("ElementDefinition".equals(codeString)) + return ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return EXTENSION; + if ("HumanName".equals(codeString)) + return HUMANNAME; + if ("Identifier".equals(codeString)) + return IDENTIFIER; + if ("Meta".equals(codeString)) + return META; + if ("Money".equals(codeString)) + return MONEY; + if ("Narrative".equals(codeString)) + return NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return PARAMETERDEFINITION; + if ("Period".equals(codeString)) + return PERIOD; + if ("Quantity".equals(codeString)) + return QUANTITY; + if ("Range".equals(codeString)) + return RANGE; + if ("Ratio".equals(codeString)) + return RATIO; + if ("Reference".equals(codeString)) + return REFERENCE; + if ("RelatedArtifact".equals(codeString)) + return RELATEDARTIFACT; + if ("SampledData".equals(codeString)) + return SAMPLEDDATA; + if ("Signature".equals(codeString)) + return SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return TIMING; + if ("TriggerDefinition".equals(codeString)) + return TRIGGERDEFINITION; + if ("UsageContext".equals(codeString)) + return USAGECONTEXT; + if ("base64Binary".equals(codeString)) + return BASE64BINARY; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("code".equals(codeString)) + return CODE; + if ("date".equals(codeString)) + return DATE; + if ("dateTime".equals(codeString)) + return DATETIME; + if ("decimal".equals(codeString)) + return DECIMAL; + if ("id".equals(codeString)) + return ID; + if ("instant".equals(codeString)) + return INSTANT; + if ("integer".equals(codeString)) + return INTEGER; + if ("markdown".equals(codeString)) + return MARKDOWN; + if ("oid".equals(codeString)) + return OID; + if ("positiveInt".equals(codeString)) + return POSITIVEINT; + if ("string".equals(codeString)) + return STRING; + if ("time".equals(codeString)) + return TIME; + if ("unsignedInt".equals(codeString)) + return UNSIGNEDINT; + if ("uri".equals(codeString)) + return URI; + if ("uuid".equals(codeString)) + return UUID; + if ("xhtml".equals(codeString)) + return XHTML; + throw new FHIRException("Unknown DataTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTDETAIL: return "ContactDetail"; + case CONTACTPOINT: return "ContactPoint"; + case CONTRIBUTOR: return "Contributor"; + case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; + case DISTANCE: return "Distance"; + case DOSAGE: return "Dosage"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case RELATEDARTIFACT: return "RelatedArtifact"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; + case USAGECONTEXT: return "UsageContext"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "xhtml"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/data-types"; + } + public String getDefinition() { + switch (this) { + case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world."; + case AGE: return "A duration of time during which an organism (or a process) has existed."; + case ANNOTATION: return "A text note which also contains information about who made the statement and when."; + case ATTACHMENT: return "For referring to data content defined in other formats."; + case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type."; + case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."; + case CODING: return "A reference to a code defined by a terminology system."; + case CONTACTDETAIL: return "Specifies contact information for a person or organization."; + case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."; + case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers."; + case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; + case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data."; + case DISTANCE: return "A length - a value with a unit that is a physical distance."; + case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient."; + case DURATION: return "A length of time."; + case ELEMENT: return "Base definition for all elements in a resource."; + case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension."; + case EXTENSION: return "Optional Extension Element - found in all resources."; + case HUMANNAME: return "A human's name with the ability to identify parts and usage."; + case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously."; + case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."; + case MONEY: return "An amount of economic utility in some recognized currency."; + case NARRATIVE: return "A human-readable formatted text, including images."; + case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse."; + case PERIOD: return "A time period defined by a start and end date and optionally time."; + case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; + case RANGE: return "A set of ordered Quantities defined by a low and high limit."; + case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator."; + case REFERENCE: return "A reference from one resource to another."; + case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references."; + case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data."; + case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different signature approaches have different utilities."; + case SIMPLEQUANTITY: return ""; + case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."; + case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."; + case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."; + case BASE64BINARY: return "A stream of bytes"; + case BOOLEAN: return "Value of \"true\" or \"false\""; + case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"; + case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."; + case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."; + case DECIMAL: return "A rational number with implicit precision"; + case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive."; + case INSTANT: return "An instant in time - known at least to the second"; + case INTEGER: return "A whole number"; + case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine"; + case OID: return "An OID represented as a URI"; + case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)"; + case STRING: return "A sequence of Unicode characters"; + case TIME: return "A time during the day, with no date specified"; + case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)"; + case URI: return "String of characters used to identify a name or a resource"; + case UUID: return "A UUID, represented as a URI"; + case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTDETAIL: return "ContactDetail"; + case CONTACTPOINT: return "ContactPoint"; + case CONTRIBUTOR: return "Contributor"; + case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; + case DISTANCE: return "Distance"; + case DOSAGE: return "Dosage"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case RELATEDARTIFACT: return "RelatedArtifact"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; + case USAGECONTEXT: return "UsageContext"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "XHTML"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataTypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataTypesEnumFactory.java new file mode 100644 index 00000000000..4d8235b838f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DataTypesEnumFactory.java @@ -0,0 +1,270 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DataTypesEnumFactory implements EnumFactory { + + public DataTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Address".equals(codeString)) + return DataTypes.ADDRESS; + if ("Age".equals(codeString)) + return DataTypes.AGE; + if ("Annotation".equals(codeString)) + return DataTypes.ANNOTATION; + if ("Attachment".equals(codeString)) + return DataTypes.ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return DataTypes.BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return DataTypes.CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return DataTypes.CODING; + if ("ContactDetail".equals(codeString)) + return DataTypes.CONTACTDETAIL; + if ("ContactPoint".equals(codeString)) + return DataTypes.CONTACTPOINT; + if ("Contributor".equals(codeString)) + return DataTypes.CONTRIBUTOR; + if ("Count".equals(codeString)) + return DataTypes.COUNT; + if ("DataRequirement".equals(codeString)) + return DataTypes.DATAREQUIREMENT; + if ("Distance".equals(codeString)) + return DataTypes.DISTANCE; + if ("Dosage".equals(codeString)) + return DataTypes.DOSAGE; + if ("Duration".equals(codeString)) + return DataTypes.DURATION; + if ("Element".equals(codeString)) + return DataTypes.ELEMENT; + if ("ElementDefinition".equals(codeString)) + return DataTypes.ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return DataTypes.EXTENSION; + if ("HumanName".equals(codeString)) + return DataTypes.HUMANNAME; + if ("Identifier".equals(codeString)) + return DataTypes.IDENTIFIER; + if ("Meta".equals(codeString)) + return DataTypes.META; + if ("Money".equals(codeString)) + return DataTypes.MONEY; + if ("Narrative".equals(codeString)) + return DataTypes.NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return DataTypes.PARAMETERDEFINITION; + if ("Period".equals(codeString)) + return DataTypes.PERIOD; + if ("Quantity".equals(codeString)) + return DataTypes.QUANTITY; + if ("Range".equals(codeString)) + return DataTypes.RANGE; + if ("Ratio".equals(codeString)) + return DataTypes.RATIO; + if ("Reference".equals(codeString)) + return DataTypes.REFERENCE; + if ("RelatedArtifact".equals(codeString)) + return DataTypes.RELATEDARTIFACT; + if ("SampledData".equals(codeString)) + return DataTypes.SAMPLEDDATA; + if ("Signature".equals(codeString)) + return DataTypes.SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return DataTypes.SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return DataTypes.TIMING; + if ("TriggerDefinition".equals(codeString)) + return DataTypes.TRIGGERDEFINITION; + if ("UsageContext".equals(codeString)) + return DataTypes.USAGECONTEXT; + if ("base64Binary".equals(codeString)) + return DataTypes.BASE64BINARY; + if ("boolean".equals(codeString)) + return DataTypes.BOOLEAN; + if ("code".equals(codeString)) + return DataTypes.CODE; + if ("date".equals(codeString)) + return DataTypes.DATE; + if ("dateTime".equals(codeString)) + return DataTypes.DATETIME; + if ("decimal".equals(codeString)) + return DataTypes.DECIMAL; + if ("id".equals(codeString)) + return DataTypes.ID; + if ("instant".equals(codeString)) + return DataTypes.INSTANT; + if ("integer".equals(codeString)) + return DataTypes.INTEGER; + if ("markdown".equals(codeString)) + return DataTypes.MARKDOWN; + if ("oid".equals(codeString)) + return DataTypes.OID; + if ("positiveInt".equals(codeString)) + return DataTypes.POSITIVEINT; + if ("string".equals(codeString)) + return DataTypes.STRING; + if ("time".equals(codeString)) + return DataTypes.TIME; + if ("unsignedInt".equals(codeString)) + return DataTypes.UNSIGNEDINT; + if ("uri".equals(codeString)) + return DataTypes.URI; + if ("uuid".equals(codeString)) + return DataTypes.UUID; + if ("xhtml".equals(codeString)) + return DataTypes.XHTML; + throw new IllegalArgumentException("Unknown DataTypes code '"+codeString+"'"); + } + + public String toCode(DataTypes code) { + if (code == DataTypes.ADDRESS) + return "Address"; + if (code == DataTypes.AGE) + return "Age"; + if (code == DataTypes.ANNOTATION) + return "Annotation"; + if (code == DataTypes.ATTACHMENT) + return "Attachment"; + if (code == DataTypes.BACKBONEELEMENT) + return "BackboneElement"; + if (code == DataTypes.CODEABLECONCEPT) + return "CodeableConcept"; + if (code == DataTypes.CODING) + return "Coding"; + if (code == DataTypes.CONTACTDETAIL) + return "ContactDetail"; + if (code == DataTypes.CONTACTPOINT) + return "ContactPoint"; + if (code == DataTypes.CONTRIBUTOR) + return "Contributor"; + if (code == DataTypes.COUNT) + return "Count"; + if (code == DataTypes.DATAREQUIREMENT) + return "DataRequirement"; + if (code == DataTypes.DISTANCE) + return "Distance"; + if (code == DataTypes.DOSAGE) + return "Dosage"; + if (code == DataTypes.DURATION) + return "Duration"; + if (code == DataTypes.ELEMENT) + return "Element"; + if (code == DataTypes.ELEMENTDEFINITION) + return "ElementDefinition"; + if (code == DataTypes.EXTENSION) + return "Extension"; + if (code == DataTypes.HUMANNAME) + return "HumanName"; + if (code == DataTypes.IDENTIFIER) + return "Identifier"; + if (code == DataTypes.META) + return "Meta"; + if (code == DataTypes.MONEY) + return "Money"; + if (code == DataTypes.NARRATIVE) + return "Narrative"; + if (code == DataTypes.PARAMETERDEFINITION) + return "ParameterDefinition"; + if (code == DataTypes.PERIOD) + return "Period"; + if (code == DataTypes.QUANTITY) + return "Quantity"; + if (code == DataTypes.RANGE) + return "Range"; + if (code == DataTypes.RATIO) + return "Ratio"; + if (code == DataTypes.REFERENCE) + return "Reference"; + if (code == DataTypes.RELATEDARTIFACT) + return "RelatedArtifact"; + if (code == DataTypes.SAMPLEDDATA) + return "SampledData"; + if (code == DataTypes.SIGNATURE) + return "Signature"; + if (code == DataTypes.SIMPLEQUANTITY) + return "SimpleQuantity"; + if (code == DataTypes.TIMING) + return "Timing"; + if (code == DataTypes.TRIGGERDEFINITION) + return "TriggerDefinition"; + if (code == DataTypes.USAGECONTEXT) + return "UsageContext"; + if (code == DataTypes.BASE64BINARY) + return "base64Binary"; + if (code == DataTypes.BOOLEAN) + return "boolean"; + if (code == DataTypes.CODE) + return "code"; + if (code == DataTypes.DATE) + return "date"; + if (code == DataTypes.DATETIME) + return "dateTime"; + if (code == DataTypes.DECIMAL) + return "decimal"; + if (code == DataTypes.ID) + return "id"; + if (code == DataTypes.INSTANT) + return "instant"; + if (code == DataTypes.INTEGER) + return "integer"; + if (code == DataTypes.MARKDOWN) + return "markdown"; + if (code == DataTypes.OID) + return "oid"; + if (code == DataTypes.POSITIVEINT) + return "positiveInt"; + if (code == DataTypes.STRING) + return "string"; + if (code == DataTypes.TIME) + return "time"; + if (code == DataTypes.UNSIGNEDINT) + return "unsignedInt"; + if (code == DataTypes.URI) + return "uri"; + if (code == DataTypes.UUID) + return "uuid"; + if (code == DataTypes.XHTML) + return "xhtml"; + return "?"; + } + + public String toSystem(DataTypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DaysOfWeek.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DaysOfWeek.java new file mode 100644 index 00000000000..962876f0c61 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DaysOfWeek.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DaysOfWeek { + + /** + * Monday + */ + MON, + /** + * Tuesday + */ + TUE, + /** + * Wednesday + */ + WED, + /** + * Thursday + */ + THU, + /** + * Friday + */ + FRI, + /** + * Saturday + */ + SAT, + /** + * Sunday + */ + SUN, + /** + * added to help the parsers + */ + NULL; + public static DaysOfWeek fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("mon".equals(codeString)) + return MON; + if ("tue".equals(codeString)) + return TUE; + if ("wed".equals(codeString)) + return WED; + if ("thu".equals(codeString)) + return THU; + if ("fri".equals(codeString)) + return FRI; + if ("sat".equals(codeString)) + return SAT; + if ("sun".equals(codeString)) + return SUN; + throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MON: return "mon"; + case TUE: return "tue"; + case WED: return "wed"; + case THU: return "thu"; + case FRI: return "fri"; + case SAT: return "sat"; + case SUN: return "sun"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/days-of-week"; + } + public String getDefinition() { + switch (this) { + case MON: return "Monday"; + case TUE: return "Tuesday"; + case WED: return "Wednesday"; + case THU: return "Thursday"; + case FRI: return "Friday"; + case SAT: return "Saturday"; + case SUN: return "Sunday"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MON: return "Monday"; + case TUE: return "Tuesday"; + case WED: return "Wednesday"; + case THU: return "Thursday"; + case FRI: return "Friday"; + case SAT: return "Saturday"; + case SUN: return "Sunday"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DaysOfWeekEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DaysOfWeekEnumFactory.java new file mode 100644 index 00000000000..28d3de3670b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DaysOfWeekEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DaysOfWeekEnumFactory implements EnumFactory { + + public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("mon".equals(codeString)) + return DaysOfWeek.MON; + if ("tue".equals(codeString)) + return DaysOfWeek.TUE; + if ("wed".equals(codeString)) + return DaysOfWeek.WED; + if ("thu".equals(codeString)) + return DaysOfWeek.THU; + if ("fri".equals(codeString)) + return DaysOfWeek.FRI; + if ("sat".equals(codeString)) + return DaysOfWeek.SAT; + if ("sun".equals(codeString)) + return DaysOfWeek.SUN; + throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'"); + } + + public String toCode(DaysOfWeek code) { + if (code == DaysOfWeek.MON) + return "mon"; + if (code == DaysOfWeek.TUE) + return "tue"; + if (code == DaysOfWeek.WED) + return "wed"; + if (code == DaysOfWeek.THU) + return "thu"; + if (code == DaysOfWeek.FRI) + return "fri"; + if (code == DaysOfWeek.SAT) + return "sat"; + if (code == DaysOfWeek.SUN) + return "sun"; + return "?"; + } + + public String toSystem(DaysOfWeek code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionStatus.java new file mode 100644 index 00000000000..ee56d6305e0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DefinitionStatus { + + /** + * The definition is in the design stage and is not yet considered to be "ready for use" + */ + DRAFT, + /** + * The definition is considered ready for use + */ + ACTIVE, + /** + * The definition should no longer be used + */ + WITHDRAWN, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static DefinitionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("withdrawn".equals(codeString)) + return WITHDRAWN; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown DefinitionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case WITHDRAWN: return "withdrawn"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/definition-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The definition is in the design stage and is not yet considered to be \"ready for use\""; + case ACTIVE: return "The definition is considered ready for use"; + case WITHDRAWN: return "The definition should no longer be used"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case WITHDRAWN: return "Withdrawn"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionStatusEnumFactory.java new file mode 100644 index 00000000000..b4beb184ba5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DefinitionStatusEnumFactory implements EnumFactory { + + public DefinitionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DefinitionStatus.DRAFT; + if ("active".equals(codeString)) + return DefinitionStatus.ACTIVE; + if ("withdrawn".equals(codeString)) + return DefinitionStatus.WITHDRAWN; + if ("unknown".equals(codeString)) + return DefinitionStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown DefinitionStatus code '"+codeString+"'"); + } + + public String toCode(DefinitionStatus code) { + if (code == DefinitionStatus.DRAFT) + return "draft"; + if (code == DefinitionStatus.ACTIVE) + return "active"; + if (code == DefinitionStatus.WITHDRAWN) + return "withdrawn"; + if (code == DefinitionStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(DefinitionStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionTopic.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionTopic.java new file mode 100644 index 00000000000..43d87af7098 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionTopic.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DefinitionTopic { + + /** + * The definition is related to treatment of the patient + */ + TREATMENT, + /** + * The definition is related to education of the patient + */ + EDUCATION, + /** + * The definition is related to assessment of the patient + */ + ASSESSMENT, + /** + * added to help the parsers + */ + NULL; + public static DefinitionTopic fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("treatment".equals(codeString)) + return TREATMENT; + if ("education".equals(codeString)) + return EDUCATION; + if ("assessment".equals(codeString)) + return ASSESSMENT; + throw new FHIRException("Unknown DefinitionTopic code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TREATMENT: return "treatment"; + case EDUCATION: return "education"; + case ASSESSMENT: return "assessment"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/definition-topic"; + } + public String getDefinition() { + switch (this) { + case TREATMENT: return "The definition is related to treatment of the patient"; + case EDUCATION: return "The definition is related to education of the patient"; + case ASSESSMENT: return "The definition is related to assessment of the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TREATMENT: return "Treatment"; + case EDUCATION: return "Education"; + case ASSESSMENT: return "Assessment"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionTopicEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionTopicEnumFactory.java new file mode 100644 index 00000000000..04c8f93b7e3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DefinitionTopicEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DefinitionTopicEnumFactory implements EnumFactory { + + public DefinitionTopic fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("treatment".equals(codeString)) + return DefinitionTopic.TREATMENT; + if ("education".equals(codeString)) + return DefinitionTopic.EDUCATION; + if ("assessment".equals(codeString)) + return DefinitionTopic.ASSESSMENT; + throw new IllegalArgumentException("Unknown DefinitionTopic code '"+codeString+"'"); + } + + public String toCode(DefinitionTopic code) { + if (code == DefinitionTopic.TREATMENT) + return "treatment"; + if (code == DefinitionTopic.EDUCATION) + return "education"; + if (code == DefinitionTopic.ASSESSMENT) + return "assessment"; + return "?"; + } + + public String toSystem(DefinitionTopic code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DetectedissueSeverity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DetectedissueSeverity.java new file mode 100644 index 00000000000..14f77b19bbc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DetectedissueSeverity.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DetectedissueSeverity { + + /** + * Indicates the issue may be life-threatening or has the potential to cause permanent injury. + */ + HIGH, + /** + * Indicates the issue may result in noticeable adverse consequences but is unlikely to be life-threatening or cause permanent injury. + */ + MODERATE, + /** + * Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subject. + */ + LOW, + /** + * added to help the parsers + */ + NULL; + public static DetectedissueSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return HIGH; + if ("moderate".equals(codeString)) + return MODERATE; + if ("low".equals(codeString)) + return LOW; + throw new FHIRException("Unknown DetectedissueSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HIGH: return "high"; + case MODERATE: return "moderate"; + case LOW: return "low"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/detectedissue-severity"; + } + public String getDefinition() { + switch (this) { + case HIGH: return "Indicates the issue may be life-threatening or has the potential to cause permanent injury."; + case MODERATE: return "Indicates the issue may result in noticeable adverse consequences but is unlikely to be life-threatening or cause permanent injury."; + case LOW: return "Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subject."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HIGH: return "High"; + case MODERATE: return "Moderate"; + case LOW: return "Low"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DetectedissueSeverityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DetectedissueSeverityEnumFactory.java new file mode 100644 index 00000000000..5c6e001cf49 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DetectedissueSeverityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DetectedissueSeverityEnumFactory implements EnumFactory { + + public DetectedissueSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high".equals(codeString)) + return DetectedissueSeverity.HIGH; + if ("moderate".equals(codeString)) + return DetectedissueSeverity.MODERATE; + if ("low".equals(codeString)) + return DetectedissueSeverity.LOW; + throw new IllegalArgumentException("Unknown DetectedissueSeverity code '"+codeString+"'"); + } + + public String toCode(DetectedissueSeverity code) { + if (code == DetectedissueSeverity.HIGH) + return "high"; + if (code == DetectedissueSeverity.MODERATE) + return "moderate"; + if (code == DetectedissueSeverity.LOW) + return "low"; + return "?"; + } + + public String toSystem(DetectedissueSeverity code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceAction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceAction.java new file mode 100644 index 00000000000..cdd24aaa2dc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceAction.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DeviceAction { + + /** + * The device was implanted in the patient during the procedure. + */ + IMPLANTED, + /** + * The device was explanted from the patient during the procedure. + */ + EXPLANTED, + /** + * The device remains in that patient, but its location, settings, or functionality was changed. + */ + MANIPULATED, + /** + * added to help the parsers + */ + NULL; + public static DeviceAction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("implanted".equals(codeString)) + return IMPLANTED; + if ("explanted".equals(codeString)) + return EXPLANTED; + if ("manipulated".equals(codeString)) + return MANIPULATED; + throw new FHIRException("Unknown DeviceAction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IMPLANTED: return "implanted"; + case EXPLANTED: return "explanted"; + case MANIPULATED: return "manipulated"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/device-action"; + } + public String getDefinition() { + switch (this) { + case IMPLANTED: return "The device was implanted in the patient during the procedure."; + case EXPLANTED: return "The device was explanted from the patient during the procedure."; + case MANIPULATED: return "The device remains in that patient, but its location, settings, or functionality was changed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IMPLANTED: return "Implanted"; + case EXPLANTED: return "Explanted"; + case MANIPULATED: return "Manipulated"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceActionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceActionEnumFactory.java new file mode 100644 index 00000000000..c6b30a154a9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceActionEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DeviceActionEnumFactory implements EnumFactory { + + public DeviceAction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("implanted".equals(codeString)) + return DeviceAction.IMPLANTED; + if ("explanted".equals(codeString)) + return DeviceAction.EXPLANTED; + if ("manipulated".equals(codeString)) + return DeviceAction.MANIPULATED; + throw new IllegalArgumentException("Unknown DeviceAction code '"+codeString+"'"); + } + + public String toCode(DeviceAction code) { + if (code == DeviceAction.IMPLANTED) + return "implanted"; + if (code == DeviceAction.EXPLANTED) + return "explanted"; + if (code == DeviceAction.MANIPULATED) + return "manipulated"; + return "?"; + } + + public String toSystem(DeviceAction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatementStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatementStatus.java new file mode 100644 index 00000000000..db7d732ec11 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatementStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DeviceStatementStatus { + + /** + * The device is still being used. + */ + ACTIVE, + /** + * The device is no longer being used. + */ + COMPLETED, + /** + * The statement was recorded incorrectly. + */ + ENTEREDINERROR, + /** + * The device may be used at some time in the future. + */ + INTENDED, + /** + * Actions implied by the statement have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * added to help the parsers + */ + NULL; + public static DeviceStatementStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("intended".equals(codeString)) + return INTENDED; + if ("stopped".equals(codeString)) + return STOPPED; + if ("on-hold".equals(codeString)) + return ONHOLD; + throw new FHIRException("Unknown DeviceStatementStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case INTENDED: return "intended"; + case STOPPED: return "stopped"; + case ONHOLD: return "on-hold"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/device-statement-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The device is still being used."; + case COMPLETED: return "The device is no longer being used."; + case ENTEREDINERROR: return "The statement was recorded incorrectly."; + case INTENDED: return "The device may be used at some time in the future."; + case STOPPED: return "Actions implied by the statement have been permanently halted, before all of them occurred."; + case ONHOLD: return "Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case INTENDED: return "Intended"; + case STOPPED: return "Stopped"; + case ONHOLD: return "On Hold"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatementStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatementStatusEnumFactory.java new file mode 100644 index 00000000000..91078119f85 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatementStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DeviceStatementStatusEnumFactory implements EnumFactory { + + public DeviceStatementStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return DeviceStatementStatus.ACTIVE; + if ("completed".equals(codeString)) + return DeviceStatementStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return DeviceStatementStatus.ENTEREDINERROR; + if ("intended".equals(codeString)) + return DeviceStatementStatus.INTENDED; + if ("stopped".equals(codeString)) + return DeviceStatementStatus.STOPPED; + if ("on-hold".equals(codeString)) + return DeviceStatementStatus.ONHOLD; + throw new IllegalArgumentException("Unknown DeviceStatementStatus code '"+codeString+"'"); + } + + public String toCode(DeviceStatementStatus code) { + if (code == DeviceStatementStatus.ACTIVE) + return "active"; + if (code == DeviceStatementStatus.COMPLETED) + return "completed"; + if (code == DeviceStatementStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == DeviceStatementStatus.INTENDED) + return "intended"; + if (code == DeviceStatementStatus.STOPPED) + return "stopped"; + if (code == DeviceStatementStatus.ONHOLD) + return "on-hold"; + return "?"; + } + + public String toSystem(DeviceStatementStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatus.java new file mode 100644 index 00000000000..93dcdeb9028 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DeviceStatus { + + /** + * The Device is available for use. Note: This means for *implanted devices* the device is implanted in the patient. + */ + ACTIVE, + /** + * The Device is no longer available for use (e.g. lost, expired, damaged). Note: This means for *implanted devices* the device has been removed from the patient. + */ + INACTIVE, + /** + * The Device was entered in error and voided. + */ + ENTEREDINERROR, + /** + * The status of the device has not been determined. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static DeviceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/device-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The Device is available for use. Note: This means for *implanted devices* the device is implanted in the patient."; + case INACTIVE: return "The Device is no longer available for use (e.g. lost, expired, damaged). Note: This means for *implanted devices* the device has been removed from the patient."; + case ENTEREDINERROR: return "The Device was entered in error and voided."; + case UNKNOWN: return "The status of the device has not been determined."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatusEnumFactory.java new file mode 100644 index 00000000000..978a248d02a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DeviceStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DeviceStatusEnumFactory implements EnumFactory { + + public DeviceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return DeviceStatus.ACTIVE; + if ("inactive".equals(codeString)) + return DeviceStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return DeviceStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return DeviceStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown DeviceStatus code '"+codeString+"'"); + } + + public String toCode(DeviceStatus code) { + if (code == DeviceStatus.ACTIVE) + return "active"; + if (code == DeviceStatus.INACTIVE) + return "inactive"; + if (code == DeviceStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == DeviceStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(DeviceStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosisRole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosisRole.java new file mode 100644 index 00000000000..6e68cfd9456 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosisRole.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DiagnosisRole { + + /** + * null + */ + AD, + /** + * null + */ + DD, + /** + * null + */ + CC, + /** + * null + */ + CM, + /** + * null + */ + PREOP, + /** + * null + */ + POSTOP, + /** + * null + */ + BILLING, + /** + * added to help the parsers + */ + NULL; + public static DiagnosisRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AD".equals(codeString)) + return AD; + if ("DD".equals(codeString)) + return DD; + if ("CC".equals(codeString)) + return CC; + if ("CM".equals(codeString)) + return CM; + if ("pre-op".equals(codeString)) + return PREOP; + if ("post-op".equals(codeString)) + return POSTOP; + if ("billing".equals(codeString)) + return BILLING; + throw new FHIRException("Unknown DiagnosisRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AD: return "AD"; + case DD: return "DD"; + case CC: return "CC"; + case CM: return "CM"; + case PREOP: return "pre-op"; + case POSTOP: return "post-op"; + case BILLING: return "billing"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/diagnosis-role"; + } + public String getDefinition() { + switch (this) { + case AD: return ""; + case DD: return ""; + case CC: return ""; + case CM: return ""; + case PREOP: return ""; + case POSTOP: return ""; + case BILLING: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AD: return "Admission diagnosis"; + case DD: return "Discharge diagnosis"; + case CC: return "Chief complaint"; + case CM: return "Comorbidity diagnosis"; + case PREOP: return "pre-op diagnosis"; + case POSTOP: return "post-op diagnosis"; + case BILLING: return "Billing"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosisRoleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosisRoleEnumFactory.java new file mode 100644 index 00000000000..a8a4d8df438 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosisRoleEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DiagnosisRoleEnumFactory implements EnumFactory { + + public DiagnosisRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AD".equals(codeString)) + return DiagnosisRole.AD; + if ("DD".equals(codeString)) + return DiagnosisRole.DD; + if ("CC".equals(codeString)) + return DiagnosisRole.CC; + if ("CM".equals(codeString)) + return DiagnosisRole.CM; + if ("pre-op".equals(codeString)) + return DiagnosisRole.PREOP; + if ("post-op".equals(codeString)) + return DiagnosisRole.POSTOP; + if ("billing".equals(codeString)) + return DiagnosisRole.BILLING; + throw new IllegalArgumentException("Unknown DiagnosisRole code '"+codeString+"'"); + } + + public String toCode(DiagnosisRole code) { + if (code == DiagnosisRole.AD) + return "AD"; + if (code == DiagnosisRole.DD) + return "DD"; + if (code == DiagnosisRole.CC) + return "CC"; + if (code == DiagnosisRole.CM) + return "CM"; + if (code == DiagnosisRole.PREOP) + return "pre-op"; + if (code == DiagnosisRole.POSTOP) + return "post-op"; + if (code == DiagnosisRole.BILLING) + return "billing"; + return "?"; + } + + public String toSystem(DiagnosisRole code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosticReportStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosticReportStatus.java new file mode 100644 index 00000000000..aba55ffc8f4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosticReportStatus.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DiagnosticReportStatus { + + /** + * The existence of the report is registered, but there is nothing yet available. + */ + REGISTERED, + /** + * This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified. + */ + PARTIAL, + /** + * Verified early results are available, but not all results are final. + */ + PRELIMINARY, + /** + * The report is complete and verified by an authorized person. + */ + FINAL, + /** + * Subsequent to being final, the report has been modified. This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued. + */ + AMENDED, + /** + * Subsequent to being final, the report has been modified to correct an error in the report or referenced results. + */ + CORRECTED, + /** + * Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged. + */ + APPENDED, + /** + * The report is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). + */ + CANCELLED, + /** + * The report has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) + */ + ENTEREDINERROR, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static DiagnosticReportStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return REGISTERED; + if ("partial".equals(codeString)) + return PARTIAL; + if ("preliminary".equals(codeString)) + return PRELIMINARY; + if ("final".equals(codeString)) + return FINAL; + if ("amended".equals(codeString)) + return AMENDED; + if ("corrected".equals(codeString)) + return CORRECTED; + if ("appended".equals(codeString)) + return APPENDED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REGISTERED: return "registered"; + case PARTIAL: return "partial"; + case PRELIMINARY: return "preliminary"; + case FINAL: return "final"; + case AMENDED: return "amended"; + case CORRECTED: return "corrected"; + case APPENDED: return "appended"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/diagnostic-report-status"; + } + public String getDefinition() { + switch (this) { + case REGISTERED: return "The existence of the report is registered, but there is nothing yet available."; + case PARTIAL: return "This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified."; + case PRELIMINARY: return "Verified early results are available, but not all results are final."; + case FINAL: return "The report is complete and verified by an authorized person."; + case AMENDED: return "Subsequent to being final, the report has been modified. This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued."; + case CORRECTED: return "Subsequent to being final, the report has been modified to correct an error in the report or referenced results."; + case APPENDED: return "Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged."; + case CANCELLED: return "The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; + case ENTEREDINERROR: return "The report has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REGISTERED: return "Registered"; + case PARTIAL: return "Partial"; + case PRELIMINARY: return "Preliminary"; + case FINAL: return "Final"; + case AMENDED: return "Amended"; + case CORRECTED: return "Corrected"; + case APPENDED: return "Appended"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosticReportStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosticReportStatusEnumFactory.java new file mode 100644 index 00000000000..c4eea4124b9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiagnosticReportStatusEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DiagnosticReportStatusEnumFactory implements EnumFactory { + + public DiagnosticReportStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return DiagnosticReportStatus.REGISTERED; + if ("partial".equals(codeString)) + return DiagnosticReportStatus.PARTIAL; + if ("preliminary".equals(codeString)) + return DiagnosticReportStatus.PRELIMINARY; + if ("final".equals(codeString)) + return DiagnosticReportStatus.FINAL; + if ("amended".equals(codeString)) + return DiagnosticReportStatus.AMENDED; + if ("corrected".equals(codeString)) + return DiagnosticReportStatus.CORRECTED; + if ("appended".equals(codeString)) + return DiagnosticReportStatus.APPENDED; + if ("cancelled".equals(codeString)) + return DiagnosticReportStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return DiagnosticReportStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return DiagnosticReportStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown DiagnosticReportStatus code '"+codeString+"'"); + } + + public String toCode(DiagnosticReportStatus code) { + if (code == DiagnosticReportStatus.REGISTERED) + return "registered"; + if (code == DiagnosticReportStatus.PARTIAL) + return "partial"; + if (code == DiagnosticReportStatus.PRELIMINARY) + return "preliminary"; + if (code == DiagnosticReportStatus.FINAL) + return "final"; + if (code == DiagnosticReportStatus.AMENDED) + return "amended"; + if (code == DiagnosticReportStatus.CORRECTED) + return "corrected"; + if (code == DiagnosticReportStatus.APPENDED) + return "appended"; + if (code == DiagnosticReportStatus.CANCELLED) + return "cancelled"; + if (code == DiagnosticReportStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == DiagnosticReportStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(DiagnosticReportStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DicomAuditLifecycle.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DicomAuditLifecycle.java new file mode 100644 index 00000000000..e246cebd3bc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DicomAuditLifecycle.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DicomAuditLifecycle { + + /** + * null + */ + _1, + /** + * null + */ + _2, + /** + * null + */ + _3, + /** + * null + */ + _4, + /** + * null + */ + _5, + /** + * null + */ + _6, + /** + * null + */ + _7, + /** + * null + */ + _8, + /** + * null + */ + _9, + /** + * null + */ + _10, + /** + * null + */ + _11, + /** + * null + */ + _12, + /** + * null + */ + _13, + /** + * null + */ + _14, + /** + * null + */ + _15, + /** + * added to help the parsers + */ + NULL; + public static DicomAuditLifecycle fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + throw new FHIRException("Unknown DicomAuditLifecycle code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/dicom-audit-lifecycle"; + } + public String getDefinition() { + switch (this) { + case _1: return ""; + case _2: return ""; + case _3: return ""; + case _4: return ""; + case _5: return ""; + case _6: return ""; + case _7: return ""; + case _8: return ""; + case _9: return ""; + case _10: return ""; + case _11: return ""; + case _12: return ""; + case _13: return ""; + case _14: return ""; + case _15: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Origination / Creation"; + case _2: return "Import / Copy"; + case _3: return "Amendment"; + case _4: return "Verification"; + case _5: return "Translation"; + case _6: return "Access / Use"; + case _7: return "De-identification"; + case _8: return "Aggregation / summarization / derivation"; + case _9: return "Report"; + case _10: return "Export"; + case _11: return "Disclosure"; + case _12: return "Receipt of disclosure"; + case _13: return "Archiving"; + case _14: return "Logical deletion"; + case _15: return "Permanent erasure / Physical destruction"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DicomAuditLifecycleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DicomAuditLifecycleEnumFactory.java new file mode 100644 index 00000000000..250313c8e22 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DicomAuditLifecycleEnumFactory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DicomAuditLifecycleEnumFactory implements EnumFactory { + + public DicomAuditLifecycle fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return DicomAuditLifecycle._1; + if ("2".equals(codeString)) + return DicomAuditLifecycle._2; + if ("3".equals(codeString)) + return DicomAuditLifecycle._3; + if ("4".equals(codeString)) + return DicomAuditLifecycle._4; + if ("5".equals(codeString)) + return DicomAuditLifecycle._5; + if ("6".equals(codeString)) + return DicomAuditLifecycle._6; + if ("7".equals(codeString)) + return DicomAuditLifecycle._7; + if ("8".equals(codeString)) + return DicomAuditLifecycle._8; + if ("9".equals(codeString)) + return DicomAuditLifecycle._9; + if ("10".equals(codeString)) + return DicomAuditLifecycle._10; + if ("11".equals(codeString)) + return DicomAuditLifecycle._11; + if ("12".equals(codeString)) + return DicomAuditLifecycle._12; + if ("13".equals(codeString)) + return DicomAuditLifecycle._13; + if ("14".equals(codeString)) + return DicomAuditLifecycle._14; + if ("15".equals(codeString)) + return DicomAuditLifecycle._15; + throw new IllegalArgumentException("Unknown DicomAuditLifecycle code '"+codeString+"'"); + } + + public String toCode(DicomAuditLifecycle code) { + if (code == DicomAuditLifecycle._1) + return "1"; + if (code == DicomAuditLifecycle._2) + return "2"; + if (code == DicomAuditLifecycle._3) + return "3"; + if (code == DicomAuditLifecycle._4) + return "4"; + if (code == DicomAuditLifecycle._5) + return "5"; + if (code == DicomAuditLifecycle._6) + return "6"; + if (code == DicomAuditLifecycle._7) + return "7"; + if (code == DicomAuditLifecycle._8) + return "8"; + if (code == DicomAuditLifecycle._9) + return "9"; + if (code == DicomAuditLifecycle._10) + return "10"; + if (code == DicomAuditLifecycle._11) + return "11"; + if (code == DicomAuditLifecycle._12) + return "12"; + if (code == DicomAuditLifecycle._13) + return "13"; + if (code == DicomAuditLifecycle._14) + return "14"; + if (code == DicomAuditLifecycle._15) + return "15"; + return "?"; + } + + public String toSystem(DicomAuditLifecycle code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaSubtype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaSubtype.java new file mode 100644 index 00000000000..75e98865dc7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaSubtype.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DigitalMediaSubtype { + + /** + * A diagram. Often used in diagnostic reports + */ + DIAGRAM, + /** + * A digital record of a fax document + */ + FAX, + /** + * A digital scan of a document. This is reserved for when there is not enough metadata to create a document reference + */ + SCAN, + /** + * A retinal image used for identification purposes + */ + RETINA, + /** + * A finger print scan used for identification purposes + */ + FINGERPRINT, + /** + * An iris scan used for identification purposes + */ + IRIS, + /** + * A palm scan used for identification purposes + */ + PALM, + /** + * A face scan used for identification purposes + */ + FACE, + /** + * added to help the parsers + */ + NULL; + public static DigitalMediaSubtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diagram".equals(codeString)) + return DIAGRAM; + if ("fax".equals(codeString)) + return FAX; + if ("scan".equals(codeString)) + return SCAN; + if ("retina".equals(codeString)) + return RETINA; + if ("fingerprint".equals(codeString)) + return FINGERPRINT; + if ("iris".equals(codeString)) + return IRIS; + if ("palm".equals(codeString)) + return PALM; + if ("face".equals(codeString)) + return FACE; + throw new FHIRException("Unknown DigitalMediaSubtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIAGRAM: return "diagram"; + case FAX: return "fax"; + case SCAN: return "scan"; + case RETINA: return "retina"; + case FINGERPRINT: return "fingerprint"; + case IRIS: return "iris"; + case PALM: return "palm"; + case FACE: return "face"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/media-subtype"; + } + public String getDefinition() { + switch (this) { + case DIAGRAM: return "A diagram. Often used in diagnostic reports"; + case FAX: return "A digital record of a fax document"; + case SCAN: return "A digital scan of a document. This is reserved for when there is not enough metadata to create a document reference"; + case RETINA: return "A retinal image used for identification purposes"; + case FINGERPRINT: return "A finger print scan used for identification purposes"; + case IRIS: return "An iris scan used for identification purposes"; + case PALM: return "A palm scan used for identification purposes"; + case FACE: return "A face scan used for identification purposes"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIAGRAM: return "Diagram"; + case FAX: return "Fax"; + case SCAN: return "Scanned Document"; + case RETINA: return "Retina scan"; + case FINGERPRINT: return "Fingerprint"; + case IRIS: return "Iris"; + case PALM: return "Palm"; + case FACE: return "Face"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaSubtypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaSubtypeEnumFactory.java new file mode 100644 index 00000000000..343e7a8c63a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaSubtypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DigitalMediaSubtypeEnumFactory implements EnumFactory { + + public DigitalMediaSubtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diagram".equals(codeString)) + return DigitalMediaSubtype.DIAGRAM; + if ("fax".equals(codeString)) + return DigitalMediaSubtype.FAX; + if ("scan".equals(codeString)) + return DigitalMediaSubtype.SCAN; + if ("retina".equals(codeString)) + return DigitalMediaSubtype.RETINA; + if ("fingerprint".equals(codeString)) + return DigitalMediaSubtype.FINGERPRINT; + if ("iris".equals(codeString)) + return DigitalMediaSubtype.IRIS; + if ("palm".equals(codeString)) + return DigitalMediaSubtype.PALM; + if ("face".equals(codeString)) + return DigitalMediaSubtype.FACE; + throw new IllegalArgumentException("Unknown DigitalMediaSubtype code '"+codeString+"'"); + } + + public String toCode(DigitalMediaSubtype code) { + if (code == DigitalMediaSubtype.DIAGRAM) + return "diagram"; + if (code == DigitalMediaSubtype.FAX) + return "fax"; + if (code == DigitalMediaSubtype.SCAN) + return "scan"; + if (code == DigitalMediaSubtype.RETINA) + return "retina"; + if (code == DigitalMediaSubtype.FINGERPRINT) + return "fingerprint"; + if (code == DigitalMediaSubtype.IRIS) + return "iris"; + if (code == DigitalMediaSubtype.PALM) + return "palm"; + if (code == DigitalMediaSubtype.FACE) + return "face"; + return "?"; + } + + public String toSystem(DigitalMediaSubtype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaType.java new file mode 100644 index 00000000000..18737d4dda5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DigitalMediaType { + + /** + * The media consists of one or more unmoving images, including photographs, computer-generated graphs and charts, and scanned documents + */ + PHOTO, + /** + * The media consists of a series of frames that capture a moving image + */ + VIDEO, + /** + * The media consists of a sound recording + */ + AUDIO, + /** + * added to help the parsers + */ + NULL; + public static DigitalMediaType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("photo".equals(codeString)) + return PHOTO; + if ("video".equals(codeString)) + return VIDEO; + if ("audio".equals(codeString)) + return AUDIO; + throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PHOTO: return "photo"; + case VIDEO: return "video"; + case AUDIO: return "audio"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/digital-media-type"; + } + public String getDefinition() { + switch (this) { + case PHOTO: return "The media consists of one or more unmoving images, including photographs, computer-generated graphs and charts, and scanned documents"; + case VIDEO: return "The media consists of a series of frames that capture a moving image"; + case AUDIO: return "The media consists of a sound recording"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PHOTO: return "Photo"; + case VIDEO: return "Video"; + case AUDIO: return "Audio"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaTypeEnumFactory.java new file mode 100644 index 00000000000..35dd056b94c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DigitalMediaTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DigitalMediaTypeEnumFactory implements EnumFactory { + + public DigitalMediaType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("photo".equals(codeString)) + return DigitalMediaType.PHOTO; + if ("video".equals(codeString)) + return DigitalMediaType.VIDEO; + if ("audio".equals(codeString)) + return DigitalMediaType.AUDIO; + throw new IllegalArgumentException("Unknown DigitalMediaType code '"+codeString+"'"); + } + + public String toCode(DigitalMediaType code) { + if (code == DigitalMediaType.PHOTO) + return "photo"; + if (code == DigitalMediaType.VIDEO) + return "video"; + if (code == DigitalMediaType.AUDIO) + return "audio"; + return "?"; + } + + public String toSystem(DigitalMediaType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiscriminatorType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiscriminatorType.java new file mode 100644 index 00000000000..233eddf6254 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiscriminatorType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DiscriminatorType { + + /** + * The slices have different values in the nominated element + */ + VALUE, + /** + * The slices are differentiated by the presence or absence of the nominated element + */ + EXISTS, + /** + * The slices have different values in the nominated element, as determined by testing them against the applicable ElementDefinition.pattern[x] + */ + PATTERN, + /** + * The slices are differentiated by type of the nominated element to a specifed profile + */ + TYPE, + /** + * The slices are differentiated by conformance of the nominated element to a specifed profile + */ + PROFILE, + /** + * added to help the parsers + */ + NULL; + public static DiscriminatorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("value".equals(codeString)) + return VALUE; + if ("exists".equals(codeString)) + return EXISTS; + if ("pattern".equals(codeString)) + return PATTERN; + if ("type".equals(codeString)) + return TYPE; + if ("profile".equals(codeString)) + return PROFILE; + throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case VALUE: return "value"; + case EXISTS: return "exists"; + case PATTERN: return "pattern"; + case TYPE: return "type"; + case PROFILE: return "profile"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/discriminator-type"; + } + public String getDefinition() { + switch (this) { + case VALUE: return "The slices have different values in the nominated element"; + case EXISTS: return "The slices are differentiated by the presence or absence of the nominated element"; + case PATTERN: return "The slices have different values in the nominated element, as determined by testing them against the applicable ElementDefinition.pattern[x]"; + case TYPE: return "The slices are differentiated by type of the nominated element to a specifed profile"; + case PROFILE: return "The slices are differentiated by conformance of the nominated element to a specifed profile"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case VALUE: return "Value"; + case EXISTS: return "Exists"; + case PATTERN: return "Pattern"; + case TYPE: return "Type"; + case PROFILE: return "Profile"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiscriminatorTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiscriminatorTypeEnumFactory.java new file mode 100644 index 00000000000..dabcd48b7ed --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DiscriminatorTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DiscriminatorTypeEnumFactory implements EnumFactory { + + public DiscriminatorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("value".equals(codeString)) + return DiscriminatorType.VALUE; + if ("exists".equals(codeString)) + return DiscriminatorType.EXISTS; + if ("pattern".equals(codeString)) + return DiscriminatorType.PATTERN; + if ("type".equals(codeString)) + return DiscriminatorType.TYPE; + if ("profile".equals(codeString)) + return DiscriminatorType.PROFILE; + throw new IllegalArgumentException("Unknown DiscriminatorType code '"+codeString+"'"); + } + + public String toCode(DiscriminatorType code) { + if (code == DiscriminatorType.VALUE) + return "value"; + if (code == DiscriminatorType.EXISTS) + return "exists"; + if (code == DiscriminatorType.PATTERN) + return "pattern"; + if (code == DiscriminatorType.TYPE) + return "type"; + if (code == DiscriminatorType.PROFILE) + return "profile"; + return "?"; + } + + public String toSystem(DiscriminatorType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentMode.java new file mode 100644 index 00000000000..d49f73c5aec --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DocumentMode { + + /** + * The application produces documents of the specified type. + */ + PRODUCER, + /** + * The application consumes documents of the specified type. + */ + CONSUMER, + /** + * added to help the parsers + */ + NULL; + public static DocumentMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("producer".equals(codeString)) + return PRODUCER; + if ("consumer".equals(codeString)) + return CONSUMER; + throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRODUCER: return "producer"; + case CONSUMER: return "consumer"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/document-mode"; + } + public String getDefinition() { + switch (this) { + case PRODUCER: return "The application produces documents of the specified type."; + case CONSUMER: return "The application consumes documents of the specified type."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRODUCER: return "Producer"; + case CONSUMER: return "Consumer"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentModeEnumFactory.java new file mode 100644 index 00000000000..7f5cba248f6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentModeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DocumentModeEnumFactory implements EnumFactory { + + public DocumentMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("producer".equals(codeString)) + return DocumentMode.PRODUCER; + if ("consumer".equals(codeString)) + return DocumentMode.CONSUMER; + throw new IllegalArgumentException("Unknown DocumentMode code '"+codeString+"'"); + } + + public String toCode(DocumentMode code) { + if (code == DocumentMode.PRODUCER) + return "producer"; + if (code == DocumentMode.CONSUMER) + return "consumer"; + return "?"; + } + + public String toSystem(DocumentMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentReferenceStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentReferenceStatus.java new file mode 100644 index 00000000000..d8232951808 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentReferenceStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DocumentReferenceStatus { + + /** + * This is the current reference for this document. + */ + CURRENT, + /** + * This reference has been superseded by another reference. + */ + SUPERSEDED, + /** + * This reference was created in error. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return CURRENT; + if ("superseded".equals(codeString)) + return SUPERSEDED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CURRENT: return "current"; + case SUPERSEDED: return "superseded"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/document-reference-status"; + } + public String getDefinition() { + switch (this) { + case CURRENT: return "This is the current reference for this document."; + case SUPERSEDED: return "This reference has been superseded by another reference."; + case ENTEREDINERROR: return "This reference was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CURRENT: return "Current"; + case SUPERSEDED: return "Superseded"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentReferenceStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentReferenceStatusEnumFactory.java new file mode 100644 index 00000000000..6957be5395a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentReferenceStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DocumentReferenceStatusEnumFactory implements EnumFactory { + + public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return DocumentReferenceStatus.CURRENT; + if ("superseded".equals(codeString)) + return DocumentReferenceStatus.SUPERSEDED; + if ("entered-in-error".equals(codeString)) + return DocumentReferenceStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'"); + } + + public String toCode(DocumentReferenceStatus code) { + if (code == DocumentReferenceStatus.CURRENT) + return "current"; + if (code == DocumentReferenceStatus.SUPERSEDED) + return "superseded"; + if (code == DocumentReferenceStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(DocumentReferenceStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentRelationshipType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentRelationshipType.java new file mode 100644 index 00000000000..2834c24a623 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentRelationshipType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum DocumentRelationshipType { + + /** + * This document logically replaces or supersedes the target document. + */ + REPLACES, + /** + * This document was generated by transforming the target document (e.g. format or language conversion). + */ + TRANSFORMS, + /** + * This document is a signature of the target document. + */ + SIGNS, + /** + * This document adds additional information to the target document. + */ + APPENDS, + /** + * added to help the parsers + */ + NULL; + public static DocumentRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("replaces".equals(codeString)) + return REPLACES; + if ("transforms".equals(codeString)) + return TRANSFORMS; + if ("signs".equals(codeString)) + return SIGNS; + if ("appends".equals(codeString)) + return APPENDS; + throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REPLACES: return "replaces"; + case TRANSFORMS: return "transforms"; + case SIGNS: return "signs"; + case APPENDS: return "appends"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/document-relationship-type"; + } + public String getDefinition() { + switch (this) { + case REPLACES: return "This document logically replaces or supersedes the target document."; + case TRANSFORMS: return "This document was generated by transforming the target document (e.g. format or language conversion)."; + case SIGNS: return "This document is a signature of the target document."; + case APPENDS: return "This document adds additional information to the target document."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REPLACES: return "Replaces"; + case TRANSFORMS: return "Transforms"; + case SIGNS: return "Signs"; + case APPENDS: return "Appends"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentRelationshipTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..a6d18c76adc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DocumentRelationshipTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class DocumentRelationshipTypeEnumFactory implements EnumFactory { + + public DocumentRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("replaces".equals(codeString)) + return DocumentRelationshipType.REPLACES; + if ("transforms".equals(codeString)) + return DocumentRelationshipType.TRANSFORMS; + if ("signs".equals(codeString)) + return DocumentRelationshipType.SIGNS; + if ("appends".equals(codeString)) + return DocumentRelationshipType.APPENDS; + throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'"); + } + + public String toCode(DocumentRelationshipType code) { + if (code == DocumentRelationshipType.REPLACES) + return "replaces"; + if (code == DocumentRelationshipType.TRANSFORMS) + return "transforms"; + if (code == DocumentRelationshipType.SIGNS) + return "signs"; + if (code == DocumentRelationshipType.APPENDS) + return "appends"; + return "?"; + } + + public String toSystem(DocumentRelationshipType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterAdmitSource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterAdmitSource.java new file mode 100644 index 00000000000..2404a2070f2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterAdmitSource.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterAdmitSource { + + /** + * The Patient has been transferred from another hospital for this encounter. + */ + HOSPTRANS, + /** + * The patient has been transferred from the emergency department within the hospital. This is typically used in the transition to an inpatient encounter + */ + EMD, + /** + * The patient has been transferred from an outpatient department within the hospital. + */ + OUTP, + /** + * The patient is a newborn and the encounter will track the baby related activities (as opposed to the Mothers encounter - that may be associated using the newborn encounters partof property) + */ + BORN, + /** + * The patient has been admitted due to a referred from a General Practitioner. + */ + GP, + /** + * The patient has been admitted due to a referred from a Specialist (as opposed to a General Practitioner). + */ + MP, + /** + * The patient has been transferred from a nursing home. + */ + NURSING, + /** + * The patient has been transferred from a psychiatric facility. + */ + PSYCH, + /** + * The patient has been transferred from a rehabilitiation facility or clinic. + */ + REHAB, + /** + * The patient has been admitted from a source otherwise not specified here. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static EncounterAdmitSource fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hosp-trans".equals(codeString)) + return HOSPTRANS; + if ("emd".equals(codeString)) + return EMD; + if ("outp".equals(codeString)) + return OUTP; + if ("born".equals(codeString)) + return BORN; + if ("gp".equals(codeString)) + return GP; + if ("mp".equals(codeString)) + return MP; + if ("nursing".equals(codeString)) + return NURSING; + if ("psych".equals(codeString)) + return PSYCH; + if ("rehab".equals(codeString)) + return REHAB; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown EncounterAdmitSource code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOSPTRANS: return "hosp-trans"; + case EMD: return "emd"; + case OUTP: return "outp"; + case BORN: return "born"; + case GP: return "gp"; + case MP: return "mp"; + case NURSING: return "nursing"; + case PSYCH: return "psych"; + case REHAB: return "rehab"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/admit-source"; + } + public String getDefinition() { + switch (this) { + case HOSPTRANS: return "The Patient has been transferred from another hospital for this encounter."; + case EMD: return "The patient has been transferred from the emergency department within the hospital. This is typically used in the transition to an inpatient encounter"; + case OUTP: return "The patient has been transferred from an outpatient department within the hospital."; + case BORN: return "The patient is a newborn and the encounter will track the baby related activities (as opposed to the Mothers encounter - that may be associated using the newborn encounters partof property)"; + case GP: return "The patient has been admitted due to a referred from a General Practitioner."; + case MP: return "The patient has been admitted due to a referred from a Specialist (as opposed to a General Practitioner)."; + case NURSING: return "The patient has been transferred from a nursing home."; + case PSYCH: return "The patient has been transferred from a psychiatric facility."; + case REHAB: return "The patient has been transferred from a rehabilitiation facility or clinic."; + case OTHER: return "The patient has been admitted from a source otherwise not specified here."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOSPTRANS: return "Transferred from other hospital"; + case EMD: return "From accident/emergency department"; + case OUTP: return "From outpatient department"; + case BORN: return "Born in hospital"; + case GP: return "General Practitioner referral"; + case MP: return "Medical Practitioner/physician referral"; + case NURSING: return "From nursing home"; + case PSYCH: return "From psychiatric hospital"; + case REHAB: return "From rehabilitation facility"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterAdmitSourceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterAdmitSourceEnumFactory.java new file mode 100644 index 00000000000..7908ccd2001 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterAdmitSourceEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterAdmitSourceEnumFactory implements EnumFactory { + + public EncounterAdmitSource fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hosp-trans".equals(codeString)) + return EncounterAdmitSource.HOSPTRANS; + if ("emd".equals(codeString)) + return EncounterAdmitSource.EMD; + if ("outp".equals(codeString)) + return EncounterAdmitSource.OUTP; + if ("born".equals(codeString)) + return EncounterAdmitSource.BORN; + if ("gp".equals(codeString)) + return EncounterAdmitSource.GP; + if ("mp".equals(codeString)) + return EncounterAdmitSource.MP; + if ("nursing".equals(codeString)) + return EncounterAdmitSource.NURSING; + if ("psych".equals(codeString)) + return EncounterAdmitSource.PSYCH; + if ("rehab".equals(codeString)) + return EncounterAdmitSource.REHAB; + if ("other".equals(codeString)) + return EncounterAdmitSource.OTHER; + throw new IllegalArgumentException("Unknown EncounterAdmitSource code '"+codeString+"'"); + } + + public String toCode(EncounterAdmitSource code) { + if (code == EncounterAdmitSource.HOSPTRANS) + return "hosp-trans"; + if (code == EncounterAdmitSource.EMD) + return "emd"; + if (code == EncounterAdmitSource.OUTP) + return "outp"; + if (code == EncounterAdmitSource.BORN) + return "born"; + if (code == EncounterAdmitSource.GP) + return "gp"; + if (code == EncounterAdmitSource.MP) + return "mp"; + if (code == EncounterAdmitSource.NURSING) + return "nursing"; + if (code == EncounterAdmitSource.PSYCH) + return "psych"; + if (code == EncounterAdmitSource.REHAB) + return "rehab"; + if (code == EncounterAdmitSource.OTHER) + return "other"; + return "?"; + } + + public String toSystem(EncounterAdmitSource code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDiet.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDiet.java new file mode 100644 index 00000000000..01bcca9db10 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDiet.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterDiet { + + /** + * Food without meat, poultry or seafood. + */ + VEGETARIAN, + /** + * Excludes dairy products. + */ + DAIRYFREE, + /** + * Excludes ingredients containing nuts. + */ + NUTFREE, + /** + * Excludes ingredients containing gluten. + */ + GLUTENFREE, + /** + * Food without meat, poultry, seafood, eggs, dairy products and other animal-derived substances. + */ + VEGAN, + /** + * Foods that conform to Islamic law. + */ + HALAL, + /** + * Foods that conform to Jewish dietary law. + */ + KOSHER, + /** + * added to help the parsers + */ + NULL; + public static EncounterDiet fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("vegetarian".equals(codeString)) + return VEGETARIAN; + if ("dairy-free".equals(codeString)) + return DAIRYFREE; + if ("nut-free".equals(codeString)) + return NUTFREE; + if ("gluten-free".equals(codeString)) + return GLUTENFREE; + if ("vegan".equals(codeString)) + return VEGAN; + if ("halal".equals(codeString)) + return HALAL; + if ("kosher".equals(codeString)) + return KOSHER; + throw new FHIRException("Unknown EncounterDiet code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case VEGETARIAN: return "vegetarian"; + case DAIRYFREE: return "dairy-free"; + case NUTFREE: return "nut-free"; + case GLUTENFREE: return "gluten-free"; + case VEGAN: return "vegan"; + case HALAL: return "halal"; + case KOSHER: return "kosher"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/diet"; + } + public String getDefinition() { + switch (this) { + case VEGETARIAN: return "Food without meat, poultry or seafood."; + case DAIRYFREE: return "Excludes dairy products."; + case NUTFREE: return "Excludes ingredients containing nuts."; + case GLUTENFREE: return "Excludes ingredients containing gluten."; + case VEGAN: return "Food without meat, poultry, seafood, eggs, dairy products and other animal-derived substances."; + case HALAL: return "Foods that conform to Islamic law."; + case KOSHER: return "Foods that conform to Jewish dietary law."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case VEGETARIAN: return "Vegetarian"; + case DAIRYFREE: return "Dairy Free"; + case NUTFREE: return "Nut Free"; + case GLUTENFREE: return "Gluten Free"; + case VEGAN: return "Vegan"; + case HALAL: return "Halal"; + case KOSHER: return "Kosher"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDietEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDietEnumFactory.java new file mode 100644 index 00000000000..73bb0259a2b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDietEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterDietEnumFactory implements EnumFactory { + + public EncounterDiet fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("vegetarian".equals(codeString)) + return EncounterDiet.VEGETARIAN; + if ("dairy-free".equals(codeString)) + return EncounterDiet.DAIRYFREE; + if ("nut-free".equals(codeString)) + return EncounterDiet.NUTFREE; + if ("gluten-free".equals(codeString)) + return EncounterDiet.GLUTENFREE; + if ("vegan".equals(codeString)) + return EncounterDiet.VEGAN; + if ("halal".equals(codeString)) + return EncounterDiet.HALAL; + if ("kosher".equals(codeString)) + return EncounterDiet.KOSHER; + throw new IllegalArgumentException("Unknown EncounterDiet code '"+codeString+"'"); + } + + public String toCode(EncounterDiet code) { + if (code == EncounterDiet.VEGETARIAN) + return "vegetarian"; + if (code == EncounterDiet.DAIRYFREE) + return "dairy-free"; + if (code == EncounterDiet.NUTFREE) + return "nut-free"; + if (code == EncounterDiet.GLUTENFREE) + return "gluten-free"; + if (code == EncounterDiet.VEGAN) + return "vegan"; + if (code == EncounterDiet.HALAL) + return "halal"; + if (code == EncounterDiet.KOSHER) + return "kosher"; + return "?"; + } + + public String toSystem(EncounterDiet code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDischargeDisposition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDischargeDisposition.java new file mode 100644 index 00000000000..b0df859dffc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDischargeDisposition.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterDischargeDisposition { + + /** + * The patient was dicharged and has indicated that they are going to return home afterwards. + */ + HOME, + /** + * The patient was transferred to another healthcare facility. + */ + OTHERHCF, + /** + * The patient has been discharged into palliative care. + */ + HOSP, + /** + * The patient has been discharged into long-term care where is likely to be monitored through an ongoing episode-of-care. + */ + LONG, + /** + * The patient self discharged against medical advice. + */ + AADVICE, + /** + * The patient has deceased during this encounter. + */ + EXP, + /** + * The patient has been transferred to a psychiatric facility. + */ + PSY, + /** + * The patient was discharged and is to receive post acute care rehabilitation services. + */ + REHAB, + /** + * The patient has been discharged to a skilled nursing facility for the patient to receive additional care. + */ + SNF, + /** + * The discharge disposition has not otherwise defined. + */ + OTH, + /** + * added to help the parsers + */ + NULL; + public static EncounterDischargeDisposition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return HOME; + if ("other-hcf".equals(codeString)) + return OTHERHCF; + if ("hosp".equals(codeString)) + return HOSP; + if ("long".equals(codeString)) + return LONG; + if ("aadvice".equals(codeString)) + return AADVICE; + if ("exp".equals(codeString)) + return EXP; + if ("psy".equals(codeString)) + return PSY; + if ("rehab".equals(codeString)) + return REHAB; + if ("snf".equals(codeString)) + return SNF; + if ("oth".equals(codeString)) + return OTH; + throw new FHIRException("Unknown EncounterDischargeDisposition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HOME: return "home"; + case OTHERHCF: return "other-hcf"; + case HOSP: return "hosp"; + case LONG: return "long"; + case AADVICE: return "aadvice"; + case EXP: return "exp"; + case PSY: return "psy"; + case REHAB: return "rehab"; + case SNF: return "snf"; + case OTH: return "oth"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/discharge-disposition"; + } + public String getDefinition() { + switch (this) { + case HOME: return "The patient was dicharged and has indicated that they are going to return home afterwards."; + case OTHERHCF: return "The patient was transferred to another healthcare facility."; + case HOSP: return "The patient has been discharged into palliative care."; + case LONG: return "The patient has been discharged into long-term care where is likely to be monitored through an ongoing episode-of-care."; + case AADVICE: return "The patient self discharged against medical advice."; + case EXP: return "The patient has deceased during this encounter."; + case PSY: return "The patient has been transferred to a psychiatric facility."; + case REHAB: return "The patient was discharged and is to receive post acute care rehabilitation services."; + case SNF: return "The patient has been discharged to a skilled nursing facility for the patient to receive additional care."; + case OTH: return "The discharge disposition has not otherwise defined."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HOME: return "Home"; + case OTHERHCF: return "Other healthcare facility"; + case HOSP: return "Hospice"; + case LONG: return "Long-term care"; + case AADVICE: return "Left against advice"; + case EXP: return "Expired"; + case PSY: return "Psychiatric hospital"; + case REHAB: return "Rehabilitation"; + case SNF: return "Skilled nursing facility"; + case OTH: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDischargeDispositionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDischargeDispositionEnumFactory.java new file mode 100644 index 00000000000..c7cba0d9211 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterDischargeDispositionEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterDischargeDispositionEnumFactory implements EnumFactory { + + public EncounterDischargeDisposition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("home".equals(codeString)) + return EncounterDischargeDisposition.HOME; + if ("other-hcf".equals(codeString)) + return EncounterDischargeDisposition.OTHERHCF; + if ("hosp".equals(codeString)) + return EncounterDischargeDisposition.HOSP; + if ("long".equals(codeString)) + return EncounterDischargeDisposition.LONG; + if ("aadvice".equals(codeString)) + return EncounterDischargeDisposition.AADVICE; + if ("exp".equals(codeString)) + return EncounterDischargeDisposition.EXP; + if ("psy".equals(codeString)) + return EncounterDischargeDisposition.PSY; + if ("rehab".equals(codeString)) + return EncounterDischargeDisposition.REHAB; + if ("snf".equals(codeString)) + return EncounterDischargeDisposition.SNF; + if ("oth".equals(codeString)) + return EncounterDischargeDisposition.OTH; + throw new IllegalArgumentException("Unknown EncounterDischargeDisposition code '"+codeString+"'"); + } + + public String toCode(EncounterDischargeDisposition code) { + if (code == EncounterDischargeDisposition.HOME) + return "home"; + if (code == EncounterDischargeDisposition.OTHERHCF) + return "other-hcf"; + if (code == EncounterDischargeDisposition.HOSP) + return "hosp"; + if (code == EncounterDischargeDisposition.LONG) + return "long"; + if (code == EncounterDischargeDisposition.AADVICE) + return "aadvice"; + if (code == EncounterDischargeDisposition.EXP) + return "exp"; + if (code == EncounterDischargeDisposition.PSY) + return "psy"; + if (code == EncounterDischargeDisposition.REHAB) + return "rehab"; + if (code == EncounterDischargeDisposition.SNF) + return "snf"; + if (code == EncounterDischargeDisposition.OTH) + return "oth"; + return "?"; + } + + public String toSystem(EncounterDischargeDisposition code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterLocationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterLocationStatus.java new file mode 100644 index 00000000000..0c9a1fc0a98 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterLocationStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterLocationStatus { + + /** + * The patient is planned to be moved to this location at some point in the future. + */ + PLANNED, + /** + * The patient is currently at this location, or was between the period specified. A system may update these records when the patient leaves the location to either reserved, or completed + */ + ACTIVE, + /** + * This location is held empty for this patient. + */ + RESERVED, + /** + * The patient was at this location during the period specified. Not to be used when the patient is currently at the location + */ + COMPLETED, + /** + * added to help the parsers + */ + NULL; + public static EncounterLocationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("active".equals(codeString)) + return ACTIVE; + if ("reserved".equals(codeString)) + return RESERVED; + if ("completed".equals(codeString)) + return COMPLETED; + throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case ACTIVE: return "active"; + case RESERVED: return "reserved"; + case COMPLETED: return "completed"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-location-status"; + } + public String getDefinition() { + switch (this) { + case PLANNED: return "The patient is planned to be moved to this location at some point in the future."; + case ACTIVE: return "The patient is currently at this location, or was between the period specified.\r\rA system may update these records when the patient leaves the location to either reserved, or completed"; + case RESERVED: return "This location is held empty for this patient."; + case COMPLETED: return "The patient was at this location during the period specified.\r\rNot to be used when the patient is currently at the location"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case ACTIVE: return "Active"; + case RESERVED: return "Reserved"; + case COMPLETED: return "Completed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterLocationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterLocationStatusEnumFactory.java new file mode 100644 index 00000000000..0fd2a8efa86 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterLocationStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterLocationStatusEnumFactory implements EnumFactory { + + public EncounterLocationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EncounterLocationStatus.PLANNED; + if ("active".equals(codeString)) + return EncounterLocationStatus.ACTIVE; + if ("reserved".equals(codeString)) + return EncounterLocationStatus.RESERVED; + if ("completed".equals(codeString)) + return EncounterLocationStatus.COMPLETED; + throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + + public String toCode(EncounterLocationStatus code) { + if (code == EncounterLocationStatus.PLANNED) + return "planned"; + if (code == EncounterLocationStatus.ACTIVE) + return "active"; + if (code == EncounterLocationStatus.RESERVED) + return "reserved"; + if (code == EncounterLocationStatus.COMPLETED) + return "completed"; + return "?"; + } + + public String toSystem(EncounterLocationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterParticipantType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterParticipantType.java new file mode 100644 index 00000000000..cbd57ed0110 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterParticipantType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterParticipantType { + + /** + * A translator who is facilitating communication with the patient during the encounter. + */ + TRANSLATOR, + /** + * A person to be contacted in case of an emergency during the encounter. + */ + EMERGENCY, + /** + * added to help the parsers + */ + NULL; + public static EncounterParticipantType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("translator".equals(codeString)) + return TRANSLATOR; + if ("emergency".equals(codeString)) + return EMERGENCY; + throw new FHIRException("Unknown EncounterParticipantType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TRANSLATOR: return "translator"; + case EMERGENCY: return "emergency"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/participant-type"; + } + public String getDefinition() { + switch (this) { + case TRANSLATOR: return "A translator who is facilitating communication with the patient during the encounter."; + case EMERGENCY: return "A person to be contacted in case of an emergency during the encounter."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TRANSLATOR: return "Translator"; + case EMERGENCY: return "Emergency"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterParticipantTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterParticipantTypeEnumFactory.java new file mode 100644 index 00000000000..bafc1338277 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterParticipantTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterParticipantTypeEnumFactory implements EnumFactory { + + public EncounterParticipantType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("translator".equals(codeString)) + return EncounterParticipantType.TRANSLATOR; + if ("emergency".equals(codeString)) + return EncounterParticipantType.EMERGENCY; + throw new IllegalArgumentException("Unknown EncounterParticipantType code '"+codeString+"'"); + } + + public String toCode(EncounterParticipantType code) { + if (code == EncounterParticipantType.TRANSLATOR) + return "translator"; + if (code == EncounterParticipantType.EMERGENCY) + return "emergency"; + return "?"; + } + + public String toSystem(EncounterParticipantType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterSpecialArrangements.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterSpecialArrangements.java new file mode 100644 index 00000000000..539f2514e62 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterSpecialArrangements.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterSpecialArrangements { + + /** + * The patient requires a wheelchair to be made available for the encounter. + */ + WHEEL, + /** + * An additional bed made available for a person accompanying the patient, for example a parent accompanying a child. + */ + ADDBED, + /** + * The patient is not fluent in the local language and requires an interpreter to be available. Refer to the Patient.Language property for the type of interpreter required. + */ + INT, + /** + * A person who accompanies a patient to provide assistive services necessary for the patient's care during the encounter. + */ + ATT, + /** + * The patient has a guide-dog and the location used for the encounter should be able to support the presence of the service animal. + */ + DOG, + /** + * added to help the parsers + */ + NULL; + public static EncounterSpecialArrangements fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("wheel".equals(codeString)) + return WHEEL; + if ("add-bed".equals(codeString)) + return ADDBED; + if ("int".equals(codeString)) + return INT; + if ("att".equals(codeString)) + return ATT; + if ("dog".equals(codeString)) + return DOG; + throw new FHIRException("Unknown EncounterSpecialArrangements code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case WHEEL: return "wheel"; + case ADDBED: return "add-bed"; + case INT: return "int"; + case ATT: return "att"; + case DOG: return "dog"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-special-arrangements"; + } + public String getDefinition() { + switch (this) { + case WHEEL: return "The patient requires a wheelchair to be made available for the encounter."; + case ADDBED: return "An additional bed made available for a person accompanying the patient, for example a parent accompanying a child."; + case INT: return "The patient is not fluent in the local language and requires an interpreter to be available. Refer to the Patient.Language property for the type of interpreter required."; + case ATT: return "A person who accompanies a patient to provide assistive services necessary for the patient's care during the encounter."; + case DOG: return "The patient has a guide-dog and the location used for the encounter should be able to support the presence of the service animal."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case WHEEL: return "Wheelchair"; + case ADDBED: return "Additional bedding"; + case INT: return "Interpreter"; + case ATT: return "Attendant"; + case DOG: return "Guide dog"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterSpecialArrangementsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterSpecialArrangementsEnumFactory.java new file mode 100644 index 00000000000..3f4b4156018 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterSpecialArrangementsEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterSpecialArrangementsEnumFactory implements EnumFactory { + + public EncounterSpecialArrangements fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("wheel".equals(codeString)) + return EncounterSpecialArrangements.WHEEL; + if ("add-bed".equals(codeString)) + return EncounterSpecialArrangements.ADDBED; + if ("int".equals(codeString)) + return EncounterSpecialArrangements.INT; + if ("att".equals(codeString)) + return EncounterSpecialArrangements.ATT; + if ("dog".equals(codeString)) + return EncounterSpecialArrangements.DOG; + throw new IllegalArgumentException("Unknown EncounterSpecialArrangements code '"+codeString+"'"); + } + + public String toCode(EncounterSpecialArrangements code) { + if (code == EncounterSpecialArrangements.WHEEL) + return "wheel"; + if (code == EncounterSpecialArrangements.ADDBED) + return "add-bed"; + if (code == EncounterSpecialArrangements.INT) + return "int"; + if (code == EncounterSpecialArrangements.ATT) + return "att"; + if (code == EncounterSpecialArrangements.DOG) + return "dog"; + return "?"; + } + + public String toSystem(EncounterSpecialArrangements code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterStatus.java new file mode 100644 index 00000000000..7d06547577d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterStatus.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterStatus { + + /** + * The Encounter has not yet started. + */ + PLANNED, + /** + * The Patient is present for the encounter, however is not currently meeting with a practitioner. + */ + ARRIVED, + /** + * The patient has been assessed for the priority of their treatment based on the severity of their condition. + */ + TRIAGED, + /** + * The Encounter has begun and the patient is present / the practitioner and the patient are meeting. + */ + INPROGRESS, + /** + * The Encounter has begun, but the patient is temporarily on leave. + */ + ONLEAVE, + /** + * The Encounter has ended. + */ + FINISHED, + /** + * The Encounter has ended before it has begun. + */ + CANCELLED, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * The encounter status is unknown. Note that "unknown" is a value of last resort and every attempt should be made to provide a meaningful value other than "unknown". + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static EncounterStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("triaged".equals(codeString)) + return TRIAGED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("onleave".equals(codeString)) + return ONLEAVE; + if ("finished".equals(codeString)) + return FINISHED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown EncounterStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case ARRIVED: return "arrived"; + case TRIAGED: return "triaged"; + case INPROGRESS: return "in-progress"; + case ONLEAVE: return "onleave"; + case FINISHED: return "finished"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-status"; + } + public String getDefinition() { + switch (this) { + case PLANNED: return "The Encounter has not yet started."; + case ARRIVED: return "The Patient is present for the encounter, however is not currently meeting with a practitioner."; + case TRIAGED: return "The patient has been assessed for the priority of their treatment based on the severity of their condition."; + case INPROGRESS: return "The Encounter has begun and the patient is present / the practitioner and the patient are meeting."; + case ONLEAVE: return "The Encounter has begun, but the patient is temporarily on leave."; + case FINISHED: return "The Encounter has ended."; + case CANCELLED: return "The Encounter has ended before it has begun."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + case UNKNOWN: return "The encounter status is unknown. Note that \"unknown\" is a value of last resort and every attempt should be made to provide a meaningful value other than \"unknown\"."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case ARRIVED: return "Arrived"; + case TRIAGED: return "Triaged"; + case INPROGRESS: return "In Progress"; + case ONLEAVE: return "On Leave"; + case FINISHED: return "Finished"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterStatusEnumFactory.java new file mode 100644 index 00000000000..7673df5b570 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterStatusEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterStatusEnumFactory implements EnumFactory { + + public EncounterStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EncounterStatus.PLANNED; + if ("arrived".equals(codeString)) + return EncounterStatus.ARRIVED; + if ("triaged".equals(codeString)) + return EncounterStatus.TRIAGED; + if ("in-progress".equals(codeString)) + return EncounterStatus.INPROGRESS; + if ("onleave".equals(codeString)) + return EncounterStatus.ONLEAVE; + if ("finished".equals(codeString)) + return EncounterStatus.FINISHED; + if ("cancelled".equals(codeString)) + return EncounterStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return EncounterStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return EncounterStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown EncounterStatus code '"+codeString+"'"); + } + + public String toCode(EncounterStatus code) { + if (code == EncounterStatus.PLANNED) + return "planned"; + if (code == EncounterStatus.ARRIVED) + return "arrived"; + if (code == EncounterStatus.TRIAGED) + return "triaged"; + if (code == EncounterStatus.INPROGRESS) + return "in-progress"; + if (code == EncounterStatus.ONLEAVE) + return "onleave"; + if (code == EncounterStatus.FINISHED) + return "finished"; + if (code == EncounterStatus.CANCELLED) + return "cancelled"; + if (code == EncounterStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == EncounterStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(EncounterStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterType.java new file mode 100644 index 00000000000..cc6ec8d1111 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EncounterType { + + /** + * null + */ + ADMS, + /** + * null + */ + BD_BMCLIN, + /** + * null + */ + CCS60, + /** + * null + */ + OKI, + /** + * added to help the parsers + */ + NULL; + public static EncounterType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADMS".equals(codeString)) + return ADMS; + if ("BD/BM-clin".equals(codeString)) + return BD_BMCLIN; + if ("CCS60".equals(codeString)) + return CCS60; + if ("OKI".equals(codeString)) + return OKI; + throw new FHIRException("Unknown EncounterType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADMS: return "ADMS"; + case BD_BMCLIN: return "BD/BM-clin"; + case CCS60: return "CCS60"; + case OKI: return "OKI"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/encounter-type"; + } + public String getDefinition() { + switch (this) { + case ADMS: return ""; + case BD_BMCLIN: return ""; + case CCS60: return ""; + case OKI: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADMS: return "Annual diabetes mellitus screening"; + case BD_BMCLIN: return "Bone drilling/bone marrow punction in clinic"; + case CCS60: return "Infant colon screening - 60 minutes"; + case OKI: return "Outpatient Kenacort injection"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterTypeEnumFactory.java new file mode 100644 index 00000000000..229817aa900 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EncounterTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EncounterTypeEnumFactory implements EnumFactory { + + public EncounterType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADMS".equals(codeString)) + return EncounterType.ADMS; + if ("BD/BM-clin".equals(codeString)) + return EncounterType.BD_BMCLIN; + if ("CCS60".equals(codeString)) + return EncounterType.CCS60; + if ("OKI".equals(codeString)) + return EncounterType.OKI; + throw new IllegalArgumentException("Unknown EncounterType code '"+codeString+"'"); + } + + public String toCode(EncounterType code) { + if (code == EncounterType.ADMS) + return "ADMS"; + if (code == EncounterType.BD_BMCLIN) + return "BD/BM-clin"; + if (code == EncounterType.CCS60) + return "CCS60"; + if (code == EncounterType.OKI) + return "OKI"; + return "?"; + } + + public String toSystem(EncounterType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointConnectionType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointConnectionType.java new file mode 100644 index 00000000000..5d3a2f32911 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointConnectionType.java @@ -0,0 +1,195 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EndpointConnectionType { + + /** + * IHE Cross Community Patient Discovery Profile (XCPD) - http://wiki.ihe.net/index.php/Cross-Community_Patient_Discovery + */ + IHEXCPD, + /** + * IHE Cross Community Access Profile (XCA) - http://wiki.ihe.net/index.php/Cross-Community_Access + */ + IHEXCA, + /** + * IHE Cross-Enterprise Document Reliable Exchange (XDR) - http://wiki.ihe.net/index.php/Cross-enterprise_Document_Reliable_Interchange + */ + IHEXDR, + /** + * IHE Cross-Enterprise Document Sharing (XDS) - http://wiki.ihe.net/index.php/Cross-Enterprise_Document_Sharing + */ + IHEXDS, + /** + * IHE Invoke Image Display (IID) - http://wiki.ihe.net/index.php/Invoke_Image_Display + */ + IHEIID, + /** + * DICOMweb RESTful Image Retrieve - http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.5.html + */ + DICOMWADORS, + /** + * DICOMweb RESTful Image query - http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.7.html + */ + DICOMQIDORS, + /** + * DICOMweb RESTful image sending and storage - http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.6.html + */ + DICOMSTOWRS, + /** + * DICOMweb Image Retrieve - http://dicom.nema.org/dicom/2013/output/chtml/part18/sect_6.3.html + */ + DICOMWADOURI, + /** + * Interact with the server interface using FHIR's RESTful interface. For details on its version/capabilities you should connect the the value in Endpoint.address and retrieve the FHIR CapabilityStatement. + */ + HL7FHIRREST, + /** + * Use the servers FHIR Messaging interface. Details can be found on the messaging.html page in the FHIR Specification. The FHIR server's base address is specified in the Endpoint.address property. + */ + HL7FHIRMSG, + /** + * HL7v2 messages over an LLP TCP connection + */ + HL7V2MLLP, + /** + * Email delivery using a digital certificate to encrypt the content using the public key, receiver must have the private key to decrypt the content + */ + SECUREEMAIL, + /** + * Direct Project information - http://wiki.directproject.org/ + */ + DIRECTPROJECT, + /** + * added to help the parsers + */ + NULL; + public static EndpointConnectionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ihe-xcpd".equals(codeString)) + return IHEXCPD; + if ("ihe-xca".equals(codeString)) + return IHEXCA; + if ("ihe-xdr".equals(codeString)) + return IHEXDR; + if ("ihe-xds".equals(codeString)) + return IHEXDS; + if ("ihe-iid".equals(codeString)) + return IHEIID; + if ("dicom-wado-rs".equals(codeString)) + return DICOMWADORS; + if ("dicom-qido-rs".equals(codeString)) + return DICOMQIDORS; + if ("dicom-stow-rs".equals(codeString)) + return DICOMSTOWRS; + if ("dicom-wado-uri".equals(codeString)) + return DICOMWADOURI; + if ("hl7-fhir-rest".equals(codeString)) + return HL7FHIRREST; + if ("hl7-fhir-msg".equals(codeString)) + return HL7FHIRMSG; + if ("hl7v2-mllp".equals(codeString)) + return HL7V2MLLP; + if ("secure-email".equals(codeString)) + return SECUREEMAIL; + if ("direct-project".equals(codeString)) + return DIRECTPROJECT; + throw new FHIRException("Unknown EndpointConnectionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IHEXCPD: return "ihe-xcpd"; + case IHEXCA: return "ihe-xca"; + case IHEXDR: return "ihe-xdr"; + case IHEXDS: return "ihe-xds"; + case IHEIID: return "ihe-iid"; + case DICOMWADORS: return "dicom-wado-rs"; + case DICOMQIDORS: return "dicom-qido-rs"; + case DICOMSTOWRS: return "dicom-stow-rs"; + case DICOMWADOURI: return "dicom-wado-uri"; + case HL7FHIRREST: return "hl7-fhir-rest"; + case HL7FHIRMSG: return "hl7-fhir-msg"; + case HL7V2MLLP: return "hl7v2-mllp"; + case SECUREEMAIL: return "secure-email"; + case DIRECTPROJECT: return "direct-project"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/endpoint-connection-type"; + } + public String getDefinition() { + switch (this) { + case IHEXCPD: return "IHE Cross Community Patient Discovery Profile (XCPD) - http://wiki.ihe.net/index.php/Cross-Community_Patient_Discovery"; + case IHEXCA: return "IHE Cross Community Access Profile (XCA) - http://wiki.ihe.net/index.php/Cross-Community_Access"; + case IHEXDR: return "IHE Cross-Enterprise Document Reliable Exchange (XDR) - http://wiki.ihe.net/index.php/Cross-enterprise_Document_Reliable_Interchange"; + case IHEXDS: return "IHE Cross-Enterprise Document Sharing (XDS) - http://wiki.ihe.net/index.php/Cross-Enterprise_Document_Sharing"; + case IHEIID: return "IHE Invoke Image Display (IID) - http://wiki.ihe.net/index.php/Invoke_Image_Display"; + case DICOMWADORS: return "DICOMweb RESTful Image Retrieve - http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.5.html"; + case DICOMQIDORS: return "DICOMweb RESTful Image query - http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.7.html"; + case DICOMSTOWRS: return "DICOMweb RESTful image sending and storage - http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.6.html"; + case DICOMWADOURI: return "DICOMweb Image Retrieve - http://dicom.nema.org/dicom/2013/output/chtml/part18/sect_6.3.html"; + case HL7FHIRREST: return "Interact with the server interface using FHIR's RESTful interface. For details on its version/capabilities you should connect the the value in Endpoint.address and retrieve the FHIR CapabilityStatement."; + case HL7FHIRMSG: return "Use the servers FHIR Messaging interface. Details can be found on the messaging.html page in the FHIR Specification. The FHIR server's base address is specified in the Endpoint.address property."; + case HL7V2MLLP: return "HL7v2 messages over an LLP TCP connection"; + case SECUREEMAIL: return "Email delivery using a digital certificate to encrypt the content using the public key, receiver must have the private key to decrypt the content"; + case DIRECTPROJECT: return "Direct Project information - http://wiki.directproject.org/"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IHEXCPD: return "IHE XCPD"; + case IHEXCA: return "IHE XCA"; + case IHEXDR: return "IHE XDR"; + case IHEXDS: return "IHE XDS"; + case IHEIID: return "IHE IID"; + case DICOMWADORS: return "DICOM WADO-RS"; + case DICOMQIDORS: return "DICOM QIDO-RS"; + case DICOMSTOWRS: return "DICOM STOW-RS"; + case DICOMWADOURI: return "DICOM WADO-URI"; + case HL7FHIRREST: return "HL7 FHIR"; + case HL7FHIRMSG: return "HL7 FHIR Messaging"; + case HL7V2MLLP: return "HL7 v2 MLLP"; + case SECUREEMAIL: return "Secure email"; + case DIRECTPROJECT: return "Direct Project"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointConnectionTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointConnectionTypeEnumFactory.java new file mode 100644 index 00000000000..9231f13f211 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointConnectionTypeEnumFactory.java @@ -0,0 +1,110 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EndpointConnectionTypeEnumFactory implements EnumFactory { + + public EndpointConnectionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ihe-xcpd".equals(codeString)) + return EndpointConnectionType.IHEXCPD; + if ("ihe-xca".equals(codeString)) + return EndpointConnectionType.IHEXCA; + if ("ihe-xdr".equals(codeString)) + return EndpointConnectionType.IHEXDR; + if ("ihe-xds".equals(codeString)) + return EndpointConnectionType.IHEXDS; + if ("ihe-iid".equals(codeString)) + return EndpointConnectionType.IHEIID; + if ("dicom-wado-rs".equals(codeString)) + return EndpointConnectionType.DICOMWADORS; + if ("dicom-qido-rs".equals(codeString)) + return EndpointConnectionType.DICOMQIDORS; + if ("dicom-stow-rs".equals(codeString)) + return EndpointConnectionType.DICOMSTOWRS; + if ("dicom-wado-uri".equals(codeString)) + return EndpointConnectionType.DICOMWADOURI; + if ("hl7-fhir-rest".equals(codeString)) + return EndpointConnectionType.HL7FHIRREST; + if ("hl7-fhir-msg".equals(codeString)) + return EndpointConnectionType.HL7FHIRMSG; + if ("hl7v2-mllp".equals(codeString)) + return EndpointConnectionType.HL7V2MLLP; + if ("secure-email".equals(codeString)) + return EndpointConnectionType.SECUREEMAIL; + if ("direct-project".equals(codeString)) + return EndpointConnectionType.DIRECTPROJECT; + throw new IllegalArgumentException("Unknown EndpointConnectionType code '"+codeString+"'"); + } + + public String toCode(EndpointConnectionType code) { + if (code == EndpointConnectionType.IHEXCPD) + return "ihe-xcpd"; + if (code == EndpointConnectionType.IHEXCA) + return "ihe-xca"; + if (code == EndpointConnectionType.IHEXDR) + return "ihe-xdr"; + if (code == EndpointConnectionType.IHEXDS) + return "ihe-xds"; + if (code == EndpointConnectionType.IHEIID) + return "ihe-iid"; + if (code == EndpointConnectionType.DICOMWADORS) + return "dicom-wado-rs"; + if (code == EndpointConnectionType.DICOMQIDORS) + return "dicom-qido-rs"; + if (code == EndpointConnectionType.DICOMSTOWRS) + return "dicom-stow-rs"; + if (code == EndpointConnectionType.DICOMWADOURI) + return "dicom-wado-uri"; + if (code == EndpointConnectionType.HL7FHIRREST) + return "hl7-fhir-rest"; + if (code == EndpointConnectionType.HL7FHIRMSG) + return "hl7-fhir-msg"; + if (code == EndpointConnectionType.HL7V2MLLP) + return "hl7v2-mllp"; + if (code == EndpointConnectionType.SECUREEMAIL) + return "secure-email"; + if (code == EndpointConnectionType.DIRECTPROJECT) + return "direct-project"; + return "?"; + } + + public String toSystem(EndpointConnectionType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointPayloadType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointPayloadType.java new file mode 100644 index 00000000000..2c48d21b169 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointPayloadType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EndpointPayloadType { + + /** + * Any payload type can be used with this endpoint, it is either a payload agnostic infrastructure (such as a storage repository), or some other type of endpoint where payload considerations are internally handled, and not available + */ + ANY, + /** + * This endpoint does not require any content to be sent, simply connecting to the endpoint is enough notification. This can be used as a 'ping' to wakeup a service to retrieve content, which could be to ensure security considerations are correctly handled + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static EndpointPayloadType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return ANY; + if ("none".equals(codeString)) + return NONE; + throw new FHIRException("Unknown EndpointPayloadType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ANY: return "any"; + case NONE: return "none"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/endpoint-payload-type"; + } + public String getDefinition() { + switch (this) { + case ANY: return "Any payload type can be used with this endpoint, it is either a payload agnostic infrastructure (such as a storage repository), or some other type of endpoint where payload considerations are internally handled, and not available"; + case NONE: return "This endpoint does not require any content to be sent, simply connecting to the endpoint is enough notification. This can be used as a 'ping' to wakeup a service to retrieve content, which could be to ensure security considerations are correctly handled"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ANY: return "Any"; + case NONE: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointPayloadTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointPayloadTypeEnumFactory.java new file mode 100644 index 00000000000..82b7fef5ef6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointPayloadTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EndpointPayloadTypeEnumFactory implements EnumFactory { + + public EndpointPayloadType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("any".equals(codeString)) + return EndpointPayloadType.ANY; + if ("none".equals(codeString)) + return EndpointPayloadType.NONE; + throw new IllegalArgumentException("Unknown EndpointPayloadType code '"+codeString+"'"); + } + + public String toCode(EndpointPayloadType code) { + if (code == EndpointPayloadType.ANY) + return "any"; + if (code == EndpointPayloadType.NONE) + return "none"; + return "?"; + } + + public String toSystem(EndpointPayloadType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointStatus.java new file mode 100644 index 00000000000..dc08502f964 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EndpointStatus { + + /** + * This endpoint is expected to be active and can be used + */ + ACTIVE, + /** + * This endpoint is temporarily unavailable + */ + SUSPENDED, + /** + * This endpoint has exceeded connectivity thresholds and is considered in an error state and should no longer be attempted to connect to until corrective action is taken + */ + ERROR, + /** + * This endpoint is no longer to be used + */ + OFF, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * This endpoint is not intended for production usage. + */ + TEST, + /** + * added to help the parsers + */ + NULL; + public static EndpointStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("error".equals(codeString)) + return ERROR; + if ("off".equals(codeString)) + return OFF; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("test".equals(codeString)) + return TEST; + throw new FHIRException("Unknown EndpointStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case ERROR: return "error"; + case OFF: return "off"; + case ENTEREDINERROR: return "entered-in-error"; + case TEST: return "test"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/endpoint-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "This endpoint is expected to be active and can be used"; + case SUSPENDED: return "This endpoint is temporarily unavailable"; + case ERROR: return "This endpoint has exceeded connectivity thresholds and is considered in an error state and should no longer be attempted to connect to until corrective action is taken"; + case OFF: return "This endpoint is no longer to be used"; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + case TEST: return "This endpoint is not intended for production usage."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case ERROR: return "Error"; + case OFF: return "Off"; + case ENTEREDINERROR: return "Entered in error"; + case TEST: return "Test"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointStatusEnumFactory.java new file mode 100644 index 00000000000..11b7e147c25 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EndpointStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EndpointStatusEnumFactory implements EnumFactory { + + public EndpointStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return EndpointStatus.ACTIVE; + if ("suspended".equals(codeString)) + return EndpointStatus.SUSPENDED; + if ("error".equals(codeString)) + return EndpointStatus.ERROR; + if ("off".equals(codeString)) + return EndpointStatus.OFF; + if ("entered-in-error".equals(codeString)) + return EndpointStatus.ENTEREDINERROR; + if ("test".equals(codeString)) + return EndpointStatus.TEST; + throw new IllegalArgumentException("Unknown EndpointStatus code '"+codeString+"'"); + } + + public String toCode(EndpointStatus code) { + if (code == EndpointStatus.ACTIVE) + return "active"; + if (code == EndpointStatus.SUSPENDED) + return "suspended"; + if (code == EndpointStatus.ERROR) + return "error"; + if (code == EndpointStatus.OFF) + return "off"; + if (code == EndpointStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == EndpointStatus.TEST) + return "test"; + return "?"; + } + + public String toSystem(EndpointStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EntformulaAdditive.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EntformulaAdditive.java new file mode 100644 index 00000000000..f8a93cab025 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EntformulaAdditive.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EntformulaAdditive { + + /** + * Modular lipid enteral formula component + */ + LIPID, + /** + * Modular protein enteral formula component + */ + PROTEIN, + /** + * Modular carbohydrate enteral formula component + */ + CARBOHYDRATE, + /** + * Modular fiber enteral formula component + */ + FIBER, + /** + * Added water + */ + WATER, + /** + * added to help the parsers + */ + NULL; + public static EntformulaAdditive fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lipid".equals(codeString)) + return LIPID; + if ("protein".equals(codeString)) + return PROTEIN; + if ("carbohydrate".equals(codeString)) + return CARBOHYDRATE; + if ("fiber".equals(codeString)) + return FIBER; + if ("water".equals(codeString)) + return WATER; + throw new FHIRException("Unknown EntformulaAdditive code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LIPID: return "lipid"; + case PROTEIN: return "protein"; + case CARBOHYDRATE: return "carbohydrate"; + case FIBER: return "fiber"; + case WATER: return "water"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/entformula-additive"; + } + public String getDefinition() { + switch (this) { + case LIPID: return "Modular lipid enteral formula component"; + case PROTEIN: return "Modular protein enteral formula component"; + case CARBOHYDRATE: return "Modular carbohydrate enteral formula component"; + case FIBER: return "Modular fiber enteral formula component"; + case WATER: return "Added water"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LIPID: return "Lipid"; + case PROTEIN: return "Protein"; + case CARBOHYDRATE: return "Carbohydrate"; + case FIBER: return "Fiber"; + case WATER: return "Water"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EntformulaAdditiveEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EntformulaAdditiveEnumFactory.java new file mode 100644 index 00000000000..bcab22d5e1d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EntformulaAdditiveEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EntformulaAdditiveEnumFactory implements EnumFactory { + + public EntformulaAdditive fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lipid".equals(codeString)) + return EntformulaAdditive.LIPID; + if ("protein".equals(codeString)) + return EntformulaAdditive.PROTEIN; + if ("carbohydrate".equals(codeString)) + return EntformulaAdditive.CARBOHYDRATE; + if ("fiber".equals(codeString)) + return EntformulaAdditive.FIBER; + if ("water".equals(codeString)) + return EntformulaAdditive.WATER; + throw new IllegalArgumentException("Unknown EntformulaAdditive code '"+codeString+"'"); + } + + public String toCode(EntformulaAdditive code) { + if (code == EntformulaAdditive.LIPID) + return "lipid"; + if (code == EntformulaAdditive.PROTEIN) + return "protein"; + if (code == EntformulaAdditive.CARBOHYDRATE) + return "carbohydrate"; + if (code == EntformulaAdditive.FIBER) + return "fiber"; + if (code == EntformulaAdditive.WATER) + return "water"; + return "?"; + } + + public String toSystem(EntformulaAdditive code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeOfCareStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeOfCareStatus.java new file mode 100644 index 00000000000..dd929ddf8f9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeOfCareStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EpisodeOfCareStatus { + + /** + * This episode of care is planned to start at the date specified in the period.start. During this status, an organization may perform assessments to determine if the patient is eligible to receive services, or be organizing to make resources available to provide care services. + */ + PLANNED, + /** + * This episode has been placed on a waitlist, pending the episode being made active (or cancelled). + */ + WAITLIST, + /** + * This episode of care is current. + */ + ACTIVE, + /** + * This episode of care is on hold, the organization has limited responsibility for the patient (such as while on respite). + */ + ONHOLD, + /** + * This episode of care is finished and the organization is not expecting to be providing further care to the patient. Can also be known as "closed", "completed" or other similar terms. + */ + FINISHED, + /** + * The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow. + */ + CANCELLED, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static EpisodeOfCareStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("waitlist".equals(codeString)) + return WAITLIST; + if ("active".equals(codeString)) + return ACTIVE; + if ("onhold".equals(codeString)) + return ONHOLD; + if ("finished".equals(codeString)) + return FINISHED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case WAITLIST: return "waitlist"; + case ACTIVE: return "active"; + case ONHOLD: return "onhold"; + case FINISHED: return "finished"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/episode-of-care-status"; + } + public String getDefinition() { + switch (this) { + case PLANNED: return "This episode of care is planned to start at the date specified in the period.start. During this status, an organization may perform assessments to determine if the patient is eligible to receive services, or be organizing to make resources available to provide care services."; + case WAITLIST: return "This episode has been placed on a waitlist, pending the episode being made active (or cancelled)."; + case ACTIVE: return "This episode of care is current."; + case ONHOLD: return "This episode of care is on hold, the organization has limited responsibility for the patient (such as while on respite)."; + case FINISHED: return "This episode of care is finished and the organization is not expecting to be providing further care to the patient. Can also be known as \"closed\", \"completed\" or other similar terms."; + case CANCELLED: return "The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case WAITLIST: return "Waitlist"; + case ACTIVE: return "Active"; + case ONHOLD: return "On Hold"; + case FINISHED: return "Finished"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeOfCareStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeOfCareStatusEnumFactory.java new file mode 100644 index 00000000000..c417f5dc544 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeOfCareStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EpisodeOfCareStatusEnumFactory implements EnumFactory { + + public EpisodeOfCareStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EpisodeOfCareStatus.PLANNED; + if ("waitlist".equals(codeString)) + return EpisodeOfCareStatus.WAITLIST; + if ("active".equals(codeString)) + return EpisodeOfCareStatus.ACTIVE; + if ("onhold".equals(codeString)) + return EpisodeOfCareStatus.ONHOLD; + if ("finished".equals(codeString)) + return EpisodeOfCareStatus.FINISHED; + if ("cancelled".equals(codeString)) + return EpisodeOfCareStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return EpisodeOfCareStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); + } + + public String toCode(EpisodeOfCareStatus code) { + if (code == EpisodeOfCareStatus.PLANNED) + return "planned"; + if (code == EpisodeOfCareStatus.WAITLIST) + return "waitlist"; + if (code == EpisodeOfCareStatus.ACTIVE) + return "active"; + if (code == EpisodeOfCareStatus.ONHOLD) + return "onhold"; + if (code == EpisodeOfCareStatus.FINISHED) + return "finished"; + if (code == EpisodeOfCareStatus.CANCELLED) + return "cancelled"; + if (code == EpisodeOfCareStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(EpisodeOfCareStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareType.java new file mode 100644 index 00000000000..ef6206085df --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EpisodeofcareType { + + /** + * null + */ + HACC, + /** + * null + */ + PAC, + /** + * null + */ + DIAB, + /** + * null + */ + DA, + /** + * null + */ + CACP, + /** + * added to help the parsers + */ + NULL; + public static EpisodeofcareType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hacc".equals(codeString)) + return HACC; + if ("pac".equals(codeString)) + return PAC; + if ("diab".equals(codeString)) + return DIAB; + if ("da".equals(codeString)) + return DA; + if ("cacp".equals(codeString)) + return CACP; + throw new FHIRException("Unknown EpisodeofcareType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HACC: return "hacc"; + case PAC: return "pac"; + case DIAB: return "diab"; + case DA: return "da"; + case CACP: return "cacp"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/episodeofcare-type"; + } + public String getDefinition() { + switch (this) { + case HACC: return ""; + case PAC: return ""; + case DIAB: return ""; + case DA: return ""; + case CACP: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HACC: return "Home and Community Care"; + case PAC: return "Post Acute Care"; + case DIAB: return "Post co-ordinated diabetes program"; + case DA: return "Drug and alcohol rehabilitation"; + case CACP: return "Community-based aged care"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareTypeEnumFactory.java new file mode 100644 index 00000000000..81d1196821f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EpisodeofcareTypeEnumFactory implements EnumFactory { + + public EpisodeofcareType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hacc".equals(codeString)) + return EpisodeofcareType.HACC; + if ("pac".equals(codeString)) + return EpisodeofcareType.PAC; + if ("diab".equals(codeString)) + return EpisodeofcareType.DIAB; + if ("da".equals(codeString)) + return EpisodeofcareType.DA; + if ("cacp".equals(codeString)) + return EpisodeofcareType.CACP; + throw new IllegalArgumentException("Unknown EpisodeofcareType code '"+codeString+"'"); + } + + public String toCode(EpisodeofcareType code) { + if (code == EpisodeofcareType.HACC) + return "hacc"; + if (code == EpisodeofcareType.PAC) + return "pac"; + if (code == EpisodeofcareType.DIAB) + return "diab"; + if (code == EpisodeofcareType.DA) + return "da"; + if (code == EpisodeofcareType.CACP) + return "cacp"; + return "?"; + } + + public String toSystem(EpisodeofcareType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventCapabilityMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventCapabilityMode.java new file mode 100644 index 00000000000..0fc0de7d047 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventCapabilityMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EventCapabilityMode { + + /** + * The application sends requests and receives responses. + */ + SENDER, + /** + * The application receives requests and sends responses. + */ + RECEIVER, + /** + * added to help the parsers + */ + NULL; + public static EventCapabilityMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("sender".equals(codeString)) + return SENDER; + if ("receiver".equals(codeString)) + return RECEIVER; + throw new FHIRException("Unknown EventCapabilityMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SENDER: return "sender"; + case RECEIVER: return "receiver"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/event-capability-mode"; + } + public String getDefinition() { + switch (this) { + case SENDER: return "The application sends requests and receives responses."; + case RECEIVER: return "The application receives requests and sends responses."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SENDER: return "Sender"; + case RECEIVER: return "Receiver"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventCapabilityModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventCapabilityModeEnumFactory.java new file mode 100644 index 00000000000..66e9d7320f8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventCapabilityModeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EventCapabilityModeEnumFactory implements EnumFactory { + + public EventCapabilityMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("sender".equals(codeString)) + return EventCapabilityMode.SENDER; + if ("receiver".equals(codeString)) + return EventCapabilityMode.RECEIVER; + throw new IllegalArgumentException("Unknown EventCapabilityMode code '"+codeString+"'"); + } + + public String toCode(EventCapabilityMode code) { + if (code == EventCapabilityMode.SENDER) + return "sender"; + if (code == EventCapabilityMode.RECEIVER) + return "receiver"; + return "?"; + } + + public String toSystem(EventCapabilityMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventStatus.java new file mode 100644 index 00000000000..dc81f4448db --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EventStatus { + + /** + * The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation). Preparation stages may be tracked for billing purposes. + */ + PREPARATION, + /** + * The event is currently occurring + */ + INPROGRESS, + /** + * The event has been temporarily stopped but is expected to resume in the future + */ + SUSPENDED, + /** + * The event was prior to the full completion of the intended actions + */ + ABORTED, + /** + * The event has now concluded + */ + COMPLETED, + /** + * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) + */ + ENTEREDINERROR, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static EventStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return PREPARATION; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("aborted".equals(codeString)) + return ABORTED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown EventStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREPARATION: return "preparation"; + case INPROGRESS: return "in-progress"; + case SUSPENDED: return "suspended"; + case ABORTED: return "aborted"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/event-status"; + } + public String getDefinition() { + switch (this) { + case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation). Preparation stages may be tracked for billing purposes."; + case INPROGRESS: return "The event is currently occurring"; + case SUSPENDED: return "The event has been temporarily stopped but is expected to resume in the future"; + case ABORTED: return "The event was prior to the full completion of the intended actions"; + case COMPLETED: return "The event has now concluded"; + case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREPARATION: return "Preparation"; + case INPROGRESS: return "In Progress"; + case SUSPENDED: return "Suspended"; + case ABORTED: return "Aborted"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventStatusEnumFactory.java new file mode 100644 index 00000000000..e2b7c40bac4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EventStatusEnumFactory implements EnumFactory { + + public EventStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return EventStatus.PREPARATION; + if ("in-progress".equals(codeString)) + return EventStatus.INPROGRESS; + if ("suspended".equals(codeString)) + return EventStatus.SUSPENDED; + if ("aborted".equals(codeString)) + return EventStatus.ABORTED; + if ("completed".equals(codeString)) + return EventStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return EventStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return EventStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown EventStatus code '"+codeString+"'"); + } + + public String toCode(EventStatus code) { + if (code == EventStatus.PREPARATION) + return "preparation"; + if (code == EventStatus.INPROGRESS) + return "in-progress"; + if (code == EventStatus.SUSPENDED) + return "suspended"; + if (code == EventStatus.ABORTED) + return "aborted"; + if (code == EventStatus.COMPLETED) + return "completed"; + if (code == EventStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == EventStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(EventStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventTiming.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventTiming.java new file mode 100644 index 00000000000..c54dba980e4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventTiming.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum EventTiming { + + /** + * event occurs during the morning + */ + MORN, + /** + * event occurs during the afternoon + */ + AFT, + /** + * event occurs during the evening + */ + EVE, + /** + * event occurs during the night + */ + NIGHT, + /** + * event occurs [offset] after subject goes to sleep + */ + PHS, + /** + * added to help the parsers + */ + NULL; + public static EventTiming fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MORN".equals(codeString)) + return MORN; + if ("AFT".equals(codeString)) + return AFT; + if ("EVE".equals(codeString)) + return EVE; + if ("NIGHT".equals(codeString)) + return NIGHT; + if ("PHS".equals(codeString)) + return PHS; + throw new FHIRException("Unknown EventTiming code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MORN: return "MORN"; + case AFT: return "AFT"; + case EVE: return "EVE"; + case NIGHT: return "NIGHT"; + case PHS: return "PHS"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/event-timing"; + } + public String getDefinition() { + switch (this) { + case MORN: return "event occurs during the morning"; + case AFT: return "event occurs during the afternoon"; + case EVE: return "event occurs during the evening"; + case NIGHT: return "event occurs during the night"; + case PHS: return "event occurs [offset] after subject goes to sleep"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MORN: return "Morning"; + case AFT: return "Afternoon"; + case EVE: return "Evening"; + case NIGHT: return "Night"; + case PHS: return "After Sleep"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventTimingEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventTimingEnumFactory.java new file mode 100644 index 00000000000..9f063756a11 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EventTimingEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class EventTimingEnumFactory implements EnumFactory { + + public EventTiming fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MORN".equals(codeString)) + return EventTiming.MORN; + if ("AFT".equals(codeString)) + return EventTiming.AFT; + if ("EVE".equals(codeString)) + return EventTiming.EVE; + if ("NIGHT".equals(codeString)) + return EventTiming.NIGHT; + if ("PHS".equals(codeString)) + return EventTiming.PHS; + throw new IllegalArgumentException("Unknown EventTiming code '"+codeString+"'"); + } + + public String toCode(EventTiming code) { + if (code == EventTiming.MORN) + return "MORN"; + if (code == EventTiming.AFT) + return "AFT"; + if (code == EventTiming.EVE) + return "EVE"; + if (code == EventTiming.NIGHT) + return "NIGHT"; + if (code == EventTiming.PHS) + return "PHS"; + return "?"; + } + + public String toSystem(EventTiming code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosisrelatedgroup.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosisrelatedgroup.java new file mode 100644 index 00000000000..082ea3051ac --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosisrelatedgroup.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExDiagnosisrelatedgroup { + + /** + * Normal Vaginal Delivery. + */ + _100, + /** + * Appendectomy without rupture or other complications. + */ + _101, + /** + * Emergency department treatment of a tooth abscess. + */ + _300, + /** + * Head trauma - concussion. + */ + _400, + /** + * added to help the parsers + */ + NULL; + public static ExDiagnosisrelatedgroup fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("100".equals(codeString)) + return _100; + if ("101".equals(codeString)) + return _101; + if ("300".equals(codeString)) + return _300; + if ("400".equals(codeString)) + return _400; + throw new FHIRException("Unknown ExDiagnosisrelatedgroup code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _100: return "100"; + case _101: return "101"; + case _300: return "300"; + case _400: return "400"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-diagnosisrelatedgroup"; + } + public String getDefinition() { + switch (this) { + case _100: return "Normal Vaginal Delivery."; + case _101: return "Appendectomy without rupture or other complications."; + case _300: return "Emergency department treatment of a tooth abscess."; + case _400: return "Head trauma - concussion."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _100: return "Normal Vaginal Delivery"; + case _101: return "Appendectomy - uncomplicated"; + case _300: return "Tooth abscess"; + case _400: return "Head trauma - concussion"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosisrelatedgroupEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosisrelatedgroupEnumFactory.java new file mode 100644 index 00000000000..41ddf08a438 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosisrelatedgroupEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExDiagnosisrelatedgroupEnumFactory implements EnumFactory { + + public ExDiagnosisrelatedgroup fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("100".equals(codeString)) + return ExDiagnosisrelatedgroup._100; + if ("101".equals(codeString)) + return ExDiagnosisrelatedgroup._101; + if ("300".equals(codeString)) + return ExDiagnosisrelatedgroup._300; + if ("400".equals(codeString)) + return ExDiagnosisrelatedgroup._400; + throw new IllegalArgumentException("Unknown ExDiagnosisrelatedgroup code '"+codeString+"'"); + } + + public String toCode(ExDiagnosisrelatedgroup code) { + if (code == ExDiagnosisrelatedgroup._100) + return "100"; + if (code == ExDiagnosisrelatedgroup._101) + return "101"; + if (code == ExDiagnosisrelatedgroup._300) + return "300"; + if (code == ExDiagnosisrelatedgroup._400) + return "400"; + return "?"; + } + + public String toSystem(ExDiagnosisrelatedgroup code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosistype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosistype.java new file mode 100644 index 00000000000..44bc7825c7d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosistype.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExDiagnosistype { + + /** + * The diagnosis given as the reason why the patient was admitted to the hospital. + */ + ADMITTING, + /** + * A diagnosis made on the basis of medical signs and patient-reported symptoms, rather than diagnostic tests. + */ + CLINICAL, + /** + * One of a set of the possible diagnoses that could be connected to the signs, symptoms, and lab findings. + */ + DIFFERENTIAL, + /** + * The diagnosis given when the patient is discharged from the hospital. + */ + DISCHARGE, + /** + * A diagnosis based significantly on laboratory reports or test results, rather than the physical examination of the patient. + */ + LABORATORY, + /** + * A diagnosis which identifies people's responses to situations in their lives, such as a readiness to change or a willingness to accept assistance. + */ + NURSING, + /** + * A diagnosis determined prior to birth. + */ + PRENATAL, + /** + * The single medical diagnosis that is most relevant to the patient's chief complaint or need for treatment. + */ + PRINCIPAL, + /** + * A diagnosis based primarily on the results from medical imaging studies. + */ + RADIOLOGY, + /** + * A diagnosis determined using telemedicine techniques. + */ + REMOTE, + /** + * The labeling of an illness in a specific historical event using modern knowledge, methods and disease classifications. + */ + RETROSPECTIVE, + /** + * A diagnosis determined by the patient. + */ + SELF, + /** + * added to help the parsers + */ + NULL; + public static ExDiagnosistype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("admitting".equals(codeString)) + return ADMITTING; + if ("clinical".equals(codeString)) + return CLINICAL; + if ("differential".equals(codeString)) + return DIFFERENTIAL; + if ("discharge".equals(codeString)) + return DISCHARGE; + if ("laboratory".equals(codeString)) + return LABORATORY; + if ("nursing".equals(codeString)) + return NURSING; + if ("prenatal".equals(codeString)) + return PRENATAL; + if ("principal".equals(codeString)) + return PRINCIPAL; + if ("radiology".equals(codeString)) + return RADIOLOGY; + if ("remote".equals(codeString)) + return REMOTE; + if ("retrospective".equals(codeString)) + return RETROSPECTIVE; + if ("self".equals(codeString)) + return SELF; + throw new FHIRException("Unknown ExDiagnosistype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADMITTING: return "admitting"; + case CLINICAL: return "clinical"; + case DIFFERENTIAL: return "differential"; + case DISCHARGE: return "discharge"; + case LABORATORY: return "laboratory"; + case NURSING: return "nursing"; + case PRENATAL: return "prenatal"; + case PRINCIPAL: return "principal"; + case RADIOLOGY: return "radiology"; + case REMOTE: return "remote"; + case RETROSPECTIVE: return "retrospective"; + case SELF: return "self"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-diagnosistype"; + } + public String getDefinition() { + switch (this) { + case ADMITTING: return "The diagnosis given as the reason why the patient was admitted to the hospital."; + case CLINICAL: return "A diagnosis made on the basis of medical signs and patient-reported symptoms, rather than diagnostic tests."; + case DIFFERENTIAL: return "One of a set of the possible diagnoses that could be connected to the signs, symptoms, and lab findings."; + case DISCHARGE: return "The diagnosis given when the patient is discharged from the hospital."; + case LABORATORY: return "A diagnosis based significantly on laboratory reports or test results, rather than the physical examination of the patient."; + case NURSING: return "A diagnosis which identifies people's responses to situations in their lives, such as a readiness to change or a willingness to accept assistance."; + case PRENATAL: return "A diagnosis determined prior to birth."; + case PRINCIPAL: return "The single medical diagnosis that is most relevant to the patient's chief complaint or need for treatment."; + case RADIOLOGY: return "A diagnosis based primarily on the results from medical imaging studies."; + case REMOTE: return "A diagnosis determined using telemedicine techniques."; + case RETROSPECTIVE: return "The labeling of an illness in a specific historical event using modern knowledge, methods and disease classifications."; + case SELF: return "A diagnosis determined by the patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADMITTING: return "Admitting Diagnosis"; + case CLINICAL: return "Clinical Diagnosis"; + case DIFFERENTIAL: return "Differential Diagnosis"; + case DISCHARGE: return "Discharge Diagnosis"; + case LABORATORY: return "Laboratory Diagnosis"; + case NURSING: return "Nursing Diagnosis"; + case PRENATAL: return "Prenatal Diagnosis"; + case PRINCIPAL: return "Principal Diagnosis"; + case RADIOLOGY: return "Radiology Diagnosis"; + case REMOTE: return "Remote Diagnosis"; + case RETROSPECTIVE: return "Retrospective Diagnosis"; + case SELF: return "Self Diagnosis"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosistypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosistypeEnumFactory.java new file mode 100644 index 00000000000..1391bd176e1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExDiagnosistypeEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExDiagnosistypeEnumFactory implements EnumFactory { + + public ExDiagnosistype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("admitting".equals(codeString)) + return ExDiagnosistype.ADMITTING; + if ("clinical".equals(codeString)) + return ExDiagnosistype.CLINICAL; + if ("differential".equals(codeString)) + return ExDiagnosistype.DIFFERENTIAL; + if ("discharge".equals(codeString)) + return ExDiagnosistype.DISCHARGE; + if ("laboratory".equals(codeString)) + return ExDiagnosistype.LABORATORY; + if ("nursing".equals(codeString)) + return ExDiagnosistype.NURSING; + if ("prenatal".equals(codeString)) + return ExDiagnosistype.PRENATAL; + if ("principal".equals(codeString)) + return ExDiagnosistype.PRINCIPAL; + if ("radiology".equals(codeString)) + return ExDiagnosistype.RADIOLOGY; + if ("remote".equals(codeString)) + return ExDiagnosistype.REMOTE; + if ("retrospective".equals(codeString)) + return ExDiagnosistype.RETROSPECTIVE; + if ("self".equals(codeString)) + return ExDiagnosistype.SELF; + throw new IllegalArgumentException("Unknown ExDiagnosistype code '"+codeString+"'"); + } + + public String toCode(ExDiagnosistype code) { + if (code == ExDiagnosistype.ADMITTING) + return "admitting"; + if (code == ExDiagnosistype.CLINICAL) + return "clinical"; + if (code == ExDiagnosistype.DIFFERENTIAL) + return "differential"; + if (code == ExDiagnosistype.DISCHARGE) + return "discharge"; + if (code == ExDiagnosistype.LABORATORY) + return "laboratory"; + if (code == ExDiagnosistype.NURSING) + return "nursing"; + if (code == ExDiagnosistype.PRENATAL) + return "prenatal"; + if (code == ExDiagnosistype.PRINCIPAL) + return "principal"; + if (code == ExDiagnosistype.RADIOLOGY) + return "radiology"; + if (code == ExDiagnosistype.REMOTE) + return "remote"; + if (code == ExDiagnosistype.RETROSPECTIVE) + return "retrospective"; + if (code == ExDiagnosistype.SELF) + return "self"; + return "?"; + } + + public String toSystem(ExDiagnosistype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExOnsettype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExOnsettype.java new file mode 100644 index 00000000000..93a4987bcbc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExOnsettype.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExOnsettype { + + /** + * Date of last examination. + */ + LXM, + /** + * Date when symptoms were first noticed. + */ + SYM, + /** + * Start date of last menstruation. + */ + LMN, + /** + * added to help the parsers + */ + NULL; + public static ExOnsettype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lxm".equals(codeString)) + return LXM; + if ("sym".equals(codeString)) + return SYM; + if ("lmn".equals(codeString)) + return LMN; + throw new FHIRException("Unknown ExOnsettype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LXM: return "lxm"; + case SYM: return "sym"; + case LMN: return "lmn"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-onsettype"; + } + public String getDefinition() { + switch (this) { + case LXM: return "Date of last examination."; + case SYM: return "Date when symptoms were first noticed."; + case LMN: return "Start date of last menstruation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LXM: return "Last Exam"; + case SYM: return "Start of Symptoms"; + case LMN: return "Last Menstruation"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExOnsettypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExOnsettypeEnumFactory.java new file mode 100644 index 00000000000..ad61c5b4ad9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExOnsettypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExOnsettypeEnumFactory implements EnumFactory { + + public ExOnsettype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lxm".equals(codeString)) + return ExOnsettype.LXM; + if ("sym".equals(codeString)) + return ExOnsettype.SYM; + if ("lmn".equals(codeString)) + return ExOnsettype.LMN; + throw new IllegalArgumentException("Unknown ExOnsettype code '"+codeString+"'"); + } + + public String toCode(ExOnsettype code) { + if (code == ExOnsettype.LXM) + return "lxm"; + if (code == ExOnsettype.SYM) + return "sym"; + if (code == ExOnsettype.LMN) + return "lmn"; + return "?"; + } + + public String toSystem(ExOnsettype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPayeeResourceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPayeeResourceType.java new file mode 100644 index 00000000000..c6172306a77 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPayeeResourceType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExPayeeResourceType { + + /** + * Organization resource + */ + ORGANIZATION, + /** + * Patient resource + */ + PATIENT, + /** + * Practitioner resource + */ + PRACTITIONER, + /** + * RelatedPerson resource + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static ExPayeeResourceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("organization".equals(codeString)) + return ORGANIZATION; + if ("patient".equals(codeString)) + return PATIENT; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("relatedperson".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown ExPayeeResourceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORGANIZATION: return "organization"; + case PATIENT: return "patient"; + case PRACTITIONER: return "practitioner"; + case RELATEDPERSON: return "relatedperson"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-payee-resource-type"; + } + public String getDefinition() { + switch (this) { + case ORGANIZATION: return "Organization resource"; + case PATIENT: return "Patient resource"; + case PRACTITIONER: return "Practitioner resource"; + case RELATEDPERSON: return "RelatedPerson resource"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORGANIZATION: return "Organization"; + case PATIENT: return "Patient"; + case PRACTITIONER: return "Practitioner"; + case RELATEDPERSON: return "RelatedPerson"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPayeeResourceTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPayeeResourceTypeEnumFactory.java new file mode 100644 index 00000000000..c233138ccde --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPayeeResourceTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExPayeeResourceTypeEnumFactory implements EnumFactory { + + public ExPayeeResourceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("organization".equals(codeString)) + return ExPayeeResourceType.ORGANIZATION; + if ("patient".equals(codeString)) + return ExPayeeResourceType.PATIENT; + if ("practitioner".equals(codeString)) + return ExPayeeResourceType.PRACTITIONER; + if ("relatedperson".equals(codeString)) + return ExPayeeResourceType.RELATEDPERSON; + throw new IllegalArgumentException("Unknown ExPayeeResourceType code '"+codeString+"'"); + } + + public String toCode(ExPayeeResourceType code) { + if (code == ExPayeeResourceType.ORGANIZATION) + return "organization"; + if (code == ExPayeeResourceType.PATIENT) + return "patient"; + if (code == ExPayeeResourceType.PRACTITIONER) + return "practitioner"; + if (code == ExPayeeResourceType.RELATEDPERSON) + return "relatedperson"; + return "?"; + } + + public String toSystem(ExPayeeResourceType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPaymenttype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPaymenttype.java new file mode 100644 index 00000000000..75c2c681db7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPaymenttype.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExPaymenttype { + + /** + * Complete (final) payment of the benefit under the Claim less any adjustments. + */ + COMPLETE, + /** + * Partial payment of the benefit under the Claim less any adjustments. + */ + PARTIAL, + /** + * added to help the parsers + */ + NULL; + public static ExPaymenttype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("partial".equals(codeString)) + return PARTIAL; + throw new FHIRException("Unknown ExPaymenttype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PARTIAL: return "partial"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-paymenttype"; + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "Complete (final) payment of the benefit under the Claim less any adjustments."; + case PARTIAL: return "Partial payment of the benefit under the Claim less any adjustments."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PARTIAL: return "Partial"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPaymenttypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPaymenttypeEnumFactory.java new file mode 100644 index 00000000000..b2901ecf621 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExPaymenttypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExPaymenttypeEnumFactory implements EnumFactory { + + public ExPaymenttype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return ExPaymenttype.COMPLETE; + if ("partial".equals(codeString)) + return ExPaymenttype.PARTIAL; + throw new IllegalArgumentException("Unknown ExPaymenttype code '"+codeString+"'"); + } + + public String toCode(ExPaymenttype code) { + if (code == ExPaymenttype.COMPLETE) + return "complete"; + if (code == ExPaymenttype.PARTIAL) + return "partial"; + return "?"; + } + + public String toSystem(ExPaymenttype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExProgramCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExProgramCode.java new file mode 100644 index 00000000000..40e3baa17c6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExProgramCode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExProgramCode { + + /** + * Child Asthma Program + */ + AS, + /** + * Hemodialysis Program. + */ + HD, + /** + * Autism Screening Program. + */ + AUSCR, + /** + * No program code applies. + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static ExProgramCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("as".equals(codeString)) + return AS; + if ("hd".equals(codeString)) + return HD; + if ("auscr".equals(codeString)) + return AUSCR; + if ("none".equals(codeString)) + return NONE; + throw new FHIRException("Unknown ExProgramCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AS: return "as"; + case HD: return "hd"; + case AUSCR: return "auscr"; + case NONE: return "none"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-programcode"; + } + public String getDefinition() { + switch (this) { + case AS: return "Child Asthma Program"; + case HD: return "Hemodialysis Program."; + case AUSCR: return "Autism Screening Program."; + case NONE: return "No program code applies."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AS: return "Child Asthma"; + case HD: return "Hemodialysis"; + case AUSCR: return "Autism Screening"; + case NONE: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExProgramCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExProgramCodeEnumFactory.java new file mode 100644 index 00000000000..4b18328c091 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExProgramCodeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExProgramCodeEnumFactory implements EnumFactory { + + public ExProgramCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("as".equals(codeString)) + return ExProgramCode.AS; + if ("hd".equals(codeString)) + return ExProgramCode.HD; + if ("auscr".equals(codeString)) + return ExProgramCode.AUSCR; + if ("none".equals(codeString)) + return ExProgramCode.NONE; + throw new IllegalArgumentException("Unknown ExProgramCode code '"+codeString+"'"); + } + + public String toCode(ExProgramCode code) { + if (code == ExProgramCode.AS) + return "as"; + if (code == ExProgramCode.HD) + return "hd"; + if (code == ExProgramCode.AUSCR) + return "auscr"; + if (code == ExProgramCode.NONE) + return "none"; + return "?"; + } + + public String toSystem(ExProgramCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExRevenueCenter.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExRevenueCenter.java new file mode 100644 index 00000000000..c9b3af293d8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExRevenueCenter.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExRevenueCenter { + + /** + * Anaesthesia. + */ + _0370, + /** + * Physical Therapy. + */ + _0420, + /** + * Physical Therapy - visit charge. + */ + _0421, + /** + * Speech-Language Pathology. + */ + _0440, + /** + * Speech-Language Pathology- visit charge + */ + _0441, + /** + * Emergency Room + */ + _0450, + /** + * Emergency Room - EM/EMTALA + */ + _0451, + /** + * Emergency Room - beyond EMTALA + */ + _0452, + /** + * Vision Clinic + */ + _0010, + /** + * added to help the parsers + */ + NULL; + public static ExRevenueCenter fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0370".equals(codeString)) + return _0370; + if ("0420".equals(codeString)) + return _0420; + if ("0421".equals(codeString)) + return _0421; + if ("0440".equals(codeString)) + return _0440; + if ("0441".equals(codeString)) + return _0441; + if ("0450".equals(codeString)) + return _0450; + if ("0451".equals(codeString)) + return _0451; + if ("0452".equals(codeString)) + return _0452; + if ("0010".equals(codeString)) + return _0010; + throw new FHIRException("Unknown ExRevenueCenter code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _0370: return "0370"; + case _0420: return "0420"; + case _0421: return "0421"; + case _0440: return "0440"; + case _0441: return "0441"; + case _0450: return "0450"; + case _0451: return "0451"; + case _0452: return "0452"; + case _0010: return "0010"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-revenue-center"; + } + public String getDefinition() { + switch (this) { + case _0370: return "Anaesthesia."; + case _0420: return "Physical Therapy."; + case _0421: return "Physical Therapy - visit charge."; + case _0440: return "Speech-Language Pathology."; + case _0441: return "Speech-Language Pathology- visit charge"; + case _0450: return "Emergency Room"; + case _0451: return "Emergency Room - EM/EMTALA"; + case _0452: return "Emergency Room - beyond EMTALA"; + case _0010: return "Vision Clinic"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _0370: return "Anaesthesia"; + case _0420: return "Physical Therapy"; + case _0421: return "Physical Therapy - "; + case _0440: return "Speech-Language Pathology"; + case _0441: return "Speech-Language Pathology - Visit"; + case _0450: return "Emergency Room"; + case _0451: return "Emergency Room - EM/EMTALA"; + case _0452: return "Emergency Room - beyond EMTALA"; + case _0010: return "Vision Clinic"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExRevenueCenterEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExRevenueCenterEnumFactory.java new file mode 100644 index 00000000000..bfb5810c732 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExRevenueCenterEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExRevenueCenterEnumFactory implements EnumFactory { + + public ExRevenueCenter fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0370".equals(codeString)) + return ExRevenueCenter._0370; + if ("0420".equals(codeString)) + return ExRevenueCenter._0420; + if ("0421".equals(codeString)) + return ExRevenueCenter._0421; + if ("0440".equals(codeString)) + return ExRevenueCenter._0440; + if ("0441".equals(codeString)) + return ExRevenueCenter._0441; + if ("0450".equals(codeString)) + return ExRevenueCenter._0450; + if ("0451".equals(codeString)) + return ExRevenueCenter._0451; + if ("0452".equals(codeString)) + return ExRevenueCenter._0452; + if ("0010".equals(codeString)) + return ExRevenueCenter._0010; + throw new IllegalArgumentException("Unknown ExRevenueCenter code '"+codeString+"'"); + } + + public String toCode(ExRevenueCenter code) { + if (code == ExRevenueCenter._0370) + return "0370"; + if (code == ExRevenueCenter._0420) + return "0420"; + if (code == ExRevenueCenter._0421) + return "0421"; + if (code == ExRevenueCenter._0440) + return "0440"; + if (code == ExRevenueCenter._0441) + return "0441"; + if (code == ExRevenueCenter._0450) + return "0450"; + if (code == ExRevenueCenter._0451) + return "0451"; + if (code == ExRevenueCenter._0452) + return "0452"; + if (code == ExRevenueCenter._0010) + return "0010"; + return "?"; + } + + public String toSystem(ExRevenueCenter code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExamplescenarioActorType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExamplescenarioActorType.java new file mode 100644 index 00000000000..b6d460cbac0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExamplescenarioActorType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExamplescenarioActorType { + + /** + * A person + */ + PERSON, + /** + * A system + */ + ENTITY, + /** + * added to help the parsers + */ + NULL; + public static ExamplescenarioActorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return PERSON; + if ("entity".equals(codeString)) + return ENTITY; + throw new FHIRException("Unknown ExamplescenarioActorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSON: return "person"; + case ENTITY: return "entity"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/examplescenario-actor-type"; + } + public String getDefinition() { + switch (this) { + case PERSON: return "A person"; + case ENTITY: return "A system"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSON: return "Person"; + case ENTITY: return "System"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExamplescenarioActorTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExamplescenarioActorTypeEnumFactory.java new file mode 100644 index 00000000000..c2cee4c7b6f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExamplescenarioActorTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExamplescenarioActorTypeEnumFactory implements EnumFactory { + + public ExamplescenarioActorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return ExamplescenarioActorType.PERSON; + if ("entity".equals(codeString)) + return ExamplescenarioActorType.ENTITY; + throw new IllegalArgumentException("Unknown ExamplescenarioActorType code '"+codeString+"'"); + } + + public String toCode(ExamplescenarioActorType code) { + if (code == ExamplescenarioActorType.PERSON) + return "person"; + if (code == ExamplescenarioActorType.ENTITY) + return "entity"; + return "?"; + } + + public String toSystem(ExamplescenarioActorType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExplanationofbenefitStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExplanationofbenefitStatus.java new file mode 100644 index 00000000000..f46ea1c78cc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExplanationofbenefitStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExplanationofbenefitStatus { + + /** + * The resource instance is currently in-force. + */ + ACTIVE, + /** + * The resource instance is withdrawn, rescinded or reversed. + */ + CANCELLED, + /** + * A new resource instance the contents of which is not complete. + */ + DRAFT, + /** + * The resource instance was entered in error. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ExplanationofbenefitStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("draft".equals(codeString)) + return DRAFT; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ExplanationofbenefitStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case DRAFT: return "draft"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/explanationofbenefit-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The resource instance is currently in-force."; + case CANCELLED: return "The resource instance is withdrawn, rescinded or reversed."; + case DRAFT: return "A new resource instance the contents of which is not complete."; + case ENTEREDINERROR: return "The resource instance was entered in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case CANCELLED: return "Cancelled"; + case DRAFT: return "Draft"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExplanationofbenefitStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExplanationofbenefitStatusEnumFactory.java new file mode 100644 index 00000000000..7f7bdf465c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExplanationofbenefitStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExplanationofbenefitStatusEnumFactory implements EnumFactory { + + public ExplanationofbenefitStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ExplanationofbenefitStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return ExplanationofbenefitStatus.CANCELLED; + if ("draft".equals(codeString)) + return ExplanationofbenefitStatus.DRAFT; + if ("entered-in-error".equals(codeString)) + return ExplanationofbenefitStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ExplanationofbenefitStatus code '"+codeString+"'"); + } + + public String toCode(ExplanationofbenefitStatus code) { + if (code == ExplanationofbenefitStatus.ACTIVE) + return "active"; + if (code == ExplanationofbenefitStatus.CANCELLED) + return "cancelled"; + if (code == ExplanationofbenefitStatus.DRAFT) + return "draft"; + if (code == ExplanationofbenefitStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(ExplanationofbenefitStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExpressionLanguage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExpressionLanguage.java new file mode 100644 index 00000000000..40cff5335d4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExpressionLanguage.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExpressionLanguage { + + /** + * Clinical Quality Language + */ + TEXT_CQL, + /** + * FHIRPath + */ + TEXT_FHIRPATH, + /** + * added to help the parsers + */ + NULL; + public static ExpressionLanguage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("text/cql".equals(codeString)) + return TEXT_CQL; + if ("text/fhirpath".equals(codeString)) + return TEXT_FHIRPATH; + throw new FHIRException("Unknown ExpressionLanguage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TEXT_CQL: return "text/cql"; + case TEXT_FHIRPATH: return "text/fhirpath"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/expression-language"; + } + public String getDefinition() { + switch (this) { + case TEXT_CQL: return "Clinical Quality Language"; + case TEXT_FHIRPATH: return "FHIRPath"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TEXT_CQL: return "CQL"; + case TEXT_FHIRPATH: return "FHIRPath"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExpressionLanguageEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExpressionLanguageEnumFactory.java new file mode 100644 index 00000000000..3fee4a29a0c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExpressionLanguageEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExpressionLanguageEnumFactory implements EnumFactory { + + public ExpressionLanguage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("text/cql".equals(codeString)) + return ExpressionLanguage.TEXT_CQL; + if ("text/fhirpath".equals(codeString)) + return ExpressionLanguage.TEXT_FHIRPATH; + throw new IllegalArgumentException("Unknown ExpressionLanguage code '"+codeString+"'"); + } + + public String toCode(ExpressionLanguage code) { + if (code == ExpressionLanguage.TEXT_CQL) + return "text/cql"; + if (code == ExpressionLanguage.TEXT_FHIRPATH) + return "text/fhirpath"; + return "?"; + } + + public String toSystem(ExpressionLanguage code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtensionContext.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtensionContext.java new file mode 100644 index 00000000000..51e7e38df4c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtensionContext.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExtensionContext { + + /** + * The context is all elements matching a particular resource element path. + */ + RESOURCE, + /** + * The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name). + */ + DATATYPE, + /** + * The context is a particular extension from a particular profile, a uri that identifies the extension definition. + */ + EXTENSION, + /** + * added to help the parsers + */ + NULL; + public static ExtensionContext fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("resource".equals(codeString)) + return RESOURCE; + if ("datatype".equals(codeString)) + return DATATYPE; + if ("extension".equals(codeString)) + return EXTENSION; + throw new FHIRException("Unknown ExtensionContext code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESOURCE: return "resource"; + case DATATYPE: return "datatype"; + case EXTENSION: return "extension"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/extension-context"; + } + public String getDefinition() { + switch (this) { + case RESOURCE: return "The context is all elements matching a particular resource element path."; + case DATATYPE: return "The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name)."; + case EXTENSION: return "The context is a particular extension from a particular profile, a uri that identifies the extension definition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESOURCE: return "Resource"; + case DATATYPE: return "Datatype"; + case EXTENSION: return "Extension"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtensionContextEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtensionContextEnumFactory.java new file mode 100644 index 00000000000..ada57d11fff --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtensionContextEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExtensionContextEnumFactory implements EnumFactory { + + public ExtensionContext fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("resource".equals(codeString)) + return ExtensionContext.RESOURCE; + if ("datatype".equals(codeString)) + return ExtensionContext.DATATYPE; + if ("extension".equals(codeString)) + return ExtensionContext.EXTENSION; + throw new IllegalArgumentException("Unknown ExtensionContext code '"+codeString+"'"); + } + + public String toCode(ExtensionContext code) { + if (code == ExtensionContext.RESOURCE) + return "resource"; + if (code == ExtensionContext.DATATYPE) + return "datatype"; + if (code == ExtensionContext.EXTENSION) + return "extension"; + return "?"; + } + + public String toSystem(ExtensionContext code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraActivityType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraActivityType.java new file mode 100644 index 00000000000..6f612d7da05 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraActivityType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExtraActivityType { + + /** + * Activity resulting in a structured collection of preexisting content that does not necessarily result in an integral object with semantic context making it more than the sum of component parts, from which components could be disaggregated without loss of semantic context, e.g., the assembly of multiple stand-alone documents. + */ + AGGREGATE, + /** + * Activity resulting in the structured compilation of new and preexisting content for the purposes of forming an integral object with semantic context making it more than the sum of component parts, which would be lost if decomposed. For example, the composition of a document that includes in whole or part other documents along with new content that result in a new document that has unique semantic meaning. + */ + COMPOSE, + /** + * The means used to associate a set of security attributes with a specific information object as part of the data structure for that object. [ISO-10181-3 Access Control] + */ + LABEL, + /** + * added to help the parsers + */ + NULL; + public static ExtraActivityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aggregate".equals(codeString)) + return AGGREGATE; + if ("compose".equals(codeString)) + return COMPOSE; + if ("label".equals(codeString)) + return LABEL; + throw new FHIRException("Unknown ExtraActivityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AGGREGATE: return "aggregate"; + case COMPOSE: return "compose"; + case LABEL: return "label"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/extra-activity-type"; + } + public String getDefinition() { + switch (this) { + case AGGREGATE: return "Activity resulting in a structured collection of preexisting content that does not necessarily result in an integral object with semantic context making it more than the sum of component parts, from which components could be disaggregated without loss of semantic context, e.g., the assembly of multiple stand-alone documents."; + case COMPOSE: return "Activity resulting in the structured compilation of new and preexisting content for the purposes of forming an integral object with semantic context making it more than the sum of component parts, which would be lost if decomposed. For example, the composition of a document that includes in whole or part other documents along with new content that result in a new document that has unique semantic meaning."; + case LABEL: return "The means used to associate a set of security attributes with a specific information object as part of the data structure for that object. [ISO-10181-3 Access Control]"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AGGREGATE: return "aggregate"; + case COMPOSE: return "compose"; + case LABEL: return "label"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraActivityTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraActivityTypeEnumFactory.java new file mode 100644 index 00000000000..619a228a529 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraActivityTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExtraActivityTypeEnumFactory implements EnumFactory { + + public ExtraActivityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aggregate".equals(codeString)) + return ExtraActivityType.AGGREGATE; + if ("compose".equals(codeString)) + return ExtraActivityType.COMPOSE; + if ("label".equals(codeString)) + return ExtraActivityType.LABEL; + throw new IllegalArgumentException("Unknown ExtraActivityType code '"+codeString+"'"); + } + + public String toCode(ExtraActivityType code) { + if (code == ExtraActivityType.AGGREGATE) + return "aggregate"; + if (code == ExtraActivityType.COMPOSE) + return "compose"; + if (code == ExtraActivityType.LABEL) + return "label"; + return "?"; + } + + public String toSystem(ExtraActivityType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraSecurityRoleType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraSecurityRoleType.java new file mode 100644 index 00000000000..f69a82c5fa5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraSecurityRoleType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ExtraSecurityRoleType { + + /** + * An entity providing authorization services to enable the electronic sharing of health-related information based on resource owner's preapproved permissions. For example, an UMA Authorization Server[UMA] + */ + AUTHSERVER, + /** + * An entity that collects information over which the data subject may have certain rights under policy or law to control that information's management and distribution by data collectors, including the right to access, retrieve, distribute, or delete that information. + */ + DATACOLLECTOR, + /** + * An entity that processes collected information over which the data subject may have certain rights under policy or law to control that information's management and distribution by data processors, including the right to access, retrieve, distribute, or delete that information. + */ + DATAPROCESSOR, + /** + * A person whose personal information is collected or processed, and who may have certain rights under policy or law to control that information's management and distribution by data collectors or processors, including the right to access, retrieve, distribute, or delete that information. + */ + DATASUBJECT, + /** + * The human user that has participated. + */ + HUMANUSER, + /** + * added to help the parsers + */ + NULL; + public static ExtraSecurityRoleType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("authserver".equals(codeString)) + return AUTHSERVER; + if ("datacollector".equals(codeString)) + return DATACOLLECTOR; + if ("dataprocessor".equals(codeString)) + return DATAPROCESSOR; + if ("datasubject".equals(codeString)) + return DATASUBJECT; + if ("humanuser".equals(codeString)) + return HUMANUSER; + throw new FHIRException("Unknown ExtraSecurityRoleType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AUTHSERVER: return "authserver"; + case DATACOLLECTOR: return "datacollector"; + case DATAPROCESSOR: return "dataprocessor"; + case DATASUBJECT: return "datasubject"; + case HUMANUSER: return "humanuser"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/extra-security-role-type"; + } + public String getDefinition() { + switch (this) { + case AUTHSERVER: return "An entity providing authorization services to enable the electronic sharing of health-related information based on resource owner's preapproved permissions. For example, an UMA Authorization Server[UMA]"; + case DATACOLLECTOR: return "An entity that collects information over which the data subject may have certain rights under policy or law to control that information's management and distribution by data collectors, including the right to access, retrieve, distribute, or delete that information. "; + case DATAPROCESSOR: return "An entity that processes collected information over which the data subject may have certain rights under policy or law to control that information's management and distribution by data processors, including the right to access, retrieve, distribute, or delete that information."; + case DATASUBJECT: return "A person whose personal information is collected or processed, and who may have certain rights under policy or law to control that information's management and distribution by data collectors or processors, including the right to access, retrieve, distribute, or delete that information."; + case HUMANUSER: return "The human user that has participated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AUTHSERVER: return "authorization server"; + case DATACOLLECTOR: return "data collector"; + case DATAPROCESSOR: return "data processor"; + case DATASUBJECT: return "data subject"; + case HUMANUSER: return "human user"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraSecurityRoleTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraSecurityRoleTypeEnumFactory.java new file mode 100644 index 00000000000..16aa7a452dc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ExtraSecurityRoleTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ExtraSecurityRoleTypeEnumFactory implements EnumFactory { + + public ExtraSecurityRoleType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("authserver".equals(codeString)) + return ExtraSecurityRoleType.AUTHSERVER; + if ("datacollector".equals(codeString)) + return ExtraSecurityRoleType.DATACOLLECTOR; + if ("dataprocessor".equals(codeString)) + return ExtraSecurityRoleType.DATAPROCESSOR; + if ("datasubject".equals(codeString)) + return ExtraSecurityRoleType.DATASUBJECT; + if ("humanuser".equals(codeString)) + return ExtraSecurityRoleType.HUMANUSER; + throw new IllegalArgumentException("Unknown ExtraSecurityRoleType code '"+codeString+"'"); + } + + public String toCode(ExtraSecurityRoleType code) { + if (code == ExtraSecurityRoleType.AUTHSERVER) + return "authserver"; + if (code == ExtraSecurityRoleType.DATACOLLECTOR) + return "datacollector"; + if (code == ExtraSecurityRoleType.DATAPROCESSOR) + return "dataprocessor"; + if (code == ExtraSecurityRoleType.DATASUBJECT) + return "datasubject"; + if (code == ExtraSecurityRoleType.HUMANUSER) + return "humanuser"; + return "?"; + } + + public String toSystem(ExtraSecurityRoleType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FhirVersions.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FhirVersions.java new file mode 100644 index 00000000000..6c85cb37a47 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FhirVersions.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FhirVersions { + + /** + * Oldest archived version of FHIR + */ + _0_01, + /** + * 1st Draft for Comment (Sept 2012 Ballot) + */ + _0_05, + /** + * 2nd Draft for Comment (January 2013 Ballot) + */ + _0_06, + /** + * DSTU 1 Ballot version + */ + _0_11, + /** + * DSTU 1 Official version + */ + _0_0_80, + /** + * DSTU 1 Official version Technical Errata #1 + */ + _0_0_81, + /** + * DSTU 1 Official version Technical Errata #2 + */ + _0_0_82, + /** + * Draft For Comment (January 2015 Ballot) + */ + _0_4_0, + /** + * DSTU 2 Ballot version (May 2015 Ballot) + */ + _0_5_0, + /** + * DSTU 2 QA Preview + CQIF Ballot (Sep 2015) + */ + _1_0_0, + /** + * DSTU 2 (Official version) + */ + _1_0_1, + /** + * GAO Ballot + draft changes to main FHIR standard + */ + _1_1_0, + /** + * CQF on FHIR Ballot + Connectathon 12 (Montreal) + */ + _1_4_0, + /** + * FHIR STU3 Ballot + Connectathon 13 (Baltimore) + */ + _1_6_0, + /** + * FHIR STU3 Candidate + Connectathon 14 (San Antonio) + */ + _1_8_0, + /** + * FHIR Release 3 (STU) + */ + _3_0_0, + /** + * FHIR Release 3 (STU) with 1 technical errata + */ + _3_0_1, + /** + * Current Development build + */ + _3_1_0, + /** + * added to help the parsers + */ + NULL; + public static FhirVersions fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0.01".equals(codeString)) + return _0_01; + if ("0.05".equals(codeString)) + return _0_05; + if ("0.06".equals(codeString)) + return _0_06; + if ("0.11".equals(codeString)) + return _0_11; + if ("0.0.80".equals(codeString)) + return _0_0_80; + if ("0.0.81".equals(codeString)) + return _0_0_81; + if ("0.0.82".equals(codeString)) + return _0_0_82; + if ("0.4.0".equals(codeString)) + return _0_4_0; + if ("0.5.0".equals(codeString)) + return _0_5_0; + if ("1.0.0".equals(codeString)) + return _1_0_0; + if ("1.0.1".equals(codeString)) + return _1_0_1; + if ("1.1.0".equals(codeString)) + return _1_1_0; + if ("1.4.0".equals(codeString)) + return _1_4_0; + if ("1.6.0".equals(codeString)) + return _1_6_0; + if ("1.8.0".equals(codeString)) + return _1_8_0; + if ("3.0.0".equals(codeString)) + return _3_0_0; + if ("3.0.1".equals(codeString)) + return _3_0_1; + if ("3.1.0".equals(codeString)) + return _3_1_0; + throw new FHIRException("Unknown FhirVersions code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _0_01: return "0.01"; + case _0_05: return "0.05"; + case _0_06: return "0.06"; + case _0_11: return "0.11"; + case _0_0_80: return "0.0.80"; + case _0_0_81: return "0.0.81"; + case _0_0_82: return "0.0.82"; + case _0_4_0: return "0.4.0"; + case _0_5_0: return "0.5.0"; + case _1_0_0: return "1.0.0"; + case _1_0_1: return "1.0.1"; + case _1_1_0: return "1.1.0"; + case _1_4_0: return "1.4.0"; + case _1_6_0: return "1.6.0"; + case _1_8_0: return "1.8.0"; + case _3_0_0: return "3.0.0"; + case _3_0_1: return "3.0.1"; + case _3_1_0: return "3.1.0"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/fhir-versions"; + } + public String getDefinition() { + switch (this) { + case _0_01: return "Oldest archived version of FHIR"; + case _0_05: return "1st Draft for Comment (Sept 2012 Ballot)"; + case _0_06: return "2nd Draft for Comment (January 2013 Ballot)"; + case _0_11: return "DSTU 1 Ballot version"; + case _0_0_80: return "DSTU 1 Official version"; + case _0_0_81: return "DSTU 1 Official version Technical Errata #1"; + case _0_0_82: return "DSTU 1 Official version Technical Errata #2"; + case _0_4_0: return "Draft For Comment (January 2015 Ballot)"; + case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot)"; + case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015)"; + case _1_0_1: return "DSTU 2 (Official version)"; + case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard"; + case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal)"; + case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore)"; + case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio)"; + case _3_0_0: return "FHIR Release 3 (STU)"; + case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata"; + case _3_1_0: return "Current Development build"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _0_01: return "0.01"; + case _0_05: return "0.05"; + case _0_06: return "0.06"; + case _0_11: return "0.11"; + case _0_0_80: return "0.0.80"; + case _0_0_81: return "0.0.81"; + case _0_0_82: return "0.0.82"; + case _0_4_0: return "0.4.0"; + case _0_5_0: return "0.5.0"; + case _1_0_0: return "1.0.0"; + case _1_0_1: return "1.0.1"; + case _1_1_0: return "1.1.0"; + case _1_4_0: return "1.4.0"; + case _1_6_0: return "1.6.0"; + case _1_8_0: return "1.8.0"; + case _3_0_0: return "3.0.0"; + case _3_0_1: return "3.0.1"; + case _3_1_0: return "3.1.0"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FhirVersionsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FhirVersionsEnumFactory.java new file mode 100644 index 00000000000..389bce2c879 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FhirVersionsEnumFactory.java @@ -0,0 +1,126 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FhirVersionsEnumFactory implements EnumFactory { + + public FhirVersions fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0.01".equals(codeString)) + return FhirVersions._0_01; + if ("0.05".equals(codeString)) + return FhirVersions._0_05; + if ("0.06".equals(codeString)) + return FhirVersions._0_06; + if ("0.11".equals(codeString)) + return FhirVersions._0_11; + if ("0.0.80".equals(codeString)) + return FhirVersions._0_0_80; + if ("0.0.81".equals(codeString)) + return FhirVersions._0_0_81; + if ("0.0.82".equals(codeString)) + return FhirVersions._0_0_82; + if ("0.4.0".equals(codeString)) + return FhirVersions._0_4_0; + if ("0.5.0".equals(codeString)) + return FhirVersions._0_5_0; + if ("1.0.0".equals(codeString)) + return FhirVersions._1_0_0; + if ("1.0.1".equals(codeString)) + return FhirVersions._1_0_1; + if ("1.1.0".equals(codeString)) + return FhirVersions._1_1_0; + if ("1.4.0".equals(codeString)) + return FhirVersions._1_4_0; + if ("1.6.0".equals(codeString)) + return FhirVersions._1_6_0; + if ("1.8.0".equals(codeString)) + return FhirVersions._1_8_0; + if ("3.0.0".equals(codeString)) + return FhirVersions._3_0_0; + if ("3.0.1".equals(codeString)) + return FhirVersions._3_0_1; + if ("3.1.0".equals(codeString)) + return FhirVersions._3_1_0; + throw new IllegalArgumentException("Unknown FhirVersions code '"+codeString+"'"); + } + + public String toCode(FhirVersions code) { + if (code == FhirVersions._0_01) + return "0.01"; + if (code == FhirVersions._0_05) + return "0.05"; + if (code == FhirVersions._0_06) + return "0.06"; + if (code == FhirVersions._0_11) + return "0.11"; + if (code == FhirVersions._0_0_80) + return "0.0.80"; + if (code == FhirVersions._0_0_81) + return "0.0.81"; + if (code == FhirVersions._0_0_82) + return "0.0.82"; + if (code == FhirVersions._0_4_0) + return "0.4.0"; + if (code == FhirVersions._0_5_0) + return "0.5.0"; + if (code == FhirVersions._1_0_0) + return "1.0.0"; + if (code == FhirVersions._1_0_1) + return "1.0.1"; + if (code == FhirVersions._1_1_0) + return "1.1.0"; + if (code == FhirVersions._1_4_0) + return "1.4.0"; + if (code == FhirVersions._1_6_0) + return "1.6.0"; + if (code == FhirVersions._1_8_0) + return "1.8.0"; + if (code == FhirVersions._3_0_0) + return "3.0.0"; + if (code == FhirVersions._3_0_1) + return "3.0.1"; + if (code == FhirVersions._3_1_0) + return "3.1.0"; + return "?"; + } + + public String toSystem(FhirVersions code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FilterOperator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FilterOperator.java new file mode 100644 index 00000000000..b54348925e7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FilterOperator.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FilterOperator { + + /** + * The specified property of the code equals the provided value. + */ + EQUAL, + /** + * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (i.e. include child codes) + */ + ISA, + /** + * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself (i.e. include child codes) + */ + DESCENDENTOF, + /** + * The specified property of the code does not have an is-a relationship with the provided value. + */ + ISNOTA, + /** + * The specified property of the code matches the regex specified in the provided value. + */ + REGEX, + /** + * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list). + */ + IN, + /** + * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list). + */ + NOTIN, + /** + * Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (e.g. include parent codes) + */ + GENERALIZES, + /** + * The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values) + */ + EXISTS, + /** + * added to help the parsers + */ + NULL; + public static FilterOperator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("=".equals(codeString)) + return EQUAL; + if ("is-a".equals(codeString)) + return ISA; + if ("descendent-of".equals(codeString)) + return DESCENDENTOF; + if ("is-not-a".equals(codeString)) + return ISNOTA; + if ("regex".equals(codeString)) + return REGEX; + if ("in".equals(codeString)) + return IN; + if ("not-in".equals(codeString)) + return NOTIN; + if ("generalizes".equals(codeString)) + return GENERALIZES; + if ("exists".equals(codeString)) + return EXISTS; + throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EQUAL: return "="; + case ISA: return "is-a"; + case DESCENDENTOF: return "descendent-of"; + case ISNOTA: return "is-not-a"; + case REGEX: return "regex"; + case IN: return "in"; + case NOTIN: return "not-in"; + case GENERALIZES: return "generalizes"; + case EXISTS: return "exists"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/filter-operator"; + } + public String getDefinition() { + switch (this) { + case EQUAL: return "The specified property of the code equals the provided value."; + case ISA: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (i.e. include child codes)"; + case DESCENDENTOF: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself (i.e. include child codes)"; + case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value."; + case REGEX: return "The specified property of the code matches the regex specified in the provided value."; + case IN: return "The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list)."; + case NOTIN: return "The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list)."; + case GENERALIZES: return "Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (e.g. include parent codes)"; + case EXISTS: return "The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EQUAL: return "Equals"; + case ISA: return "Is A (by subsumption)"; + case DESCENDENTOF: return "Descendent Of (by subsumption)"; + case ISNOTA: return "Not (Is A) (by subsumption)"; + case REGEX: return "Regular Expression"; + case IN: return "In Set"; + case NOTIN: return "Not in Set"; + case GENERALIZES: return "Generalizes (by Subsumption)"; + case EXISTS: return "Exists"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FilterOperatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FilterOperatorEnumFactory.java new file mode 100644 index 00000000000..ab2385c63be --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FilterOperatorEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FilterOperatorEnumFactory implements EnumFactory { + + public FilterOperator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("=".equals(codeString)) + return FilterOperator.EQUAL; + if ("is-a".equals(codeString)) + return FilterOperator.ISA; + if ("descendent-of".equals(codeString)) + return FilterOperator.DESCENDENTOF; + if ("is-not-a".equals(codeString)) + return FilterOperator.ISNOTA; + if ("regex".equals(codeString)) + return FilterOperator.REGEX; + if ("in".equals(codeString)) + return FilterOperator.IN; + if ("not-in".equals(codeString)) + return FilterOperator.NOTIN; + if ("generalizes".equals(codeString)) + return FilterOperator.GENERALIZES; + if ("exists".equals(codeString)) + return FilterOperator.EXISTS; + throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'"); + } + + public String toCode(FilterOperator code) { + if (code == FilterOperator.EQUAL) + return "="; + if (code == FilterOperator.ISA) + return "is-a"; + if (code == FilterOperator.DESCENDENTOF) + return "descendent-of"; + if (code == FilterOperator.ISNOTA) + return "is-not-a"; + if (code == FilterOperator.REGEX) + return "regex"; + if (code == FilterOperator.IN) + return "in"; + if (code == FilterOperator.NOTIN) + return "not-in"; + if (code == FilterOperator.GENERALIZES) + return "generalizes"; + if (code == FilterOperator.EXISTS) + return "exists"; + return "?"; + } + + public String toSystem(FilterOperator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagCategory.java new file mode 100644 index 00000000000..4a0e9fa3331 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagCategory.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FlagCategory { + + /** + * Flags related to the subject's dietary needs. + */ + DIET, + /** + * Flags related to the subject's medications. + */ + DRUG, + /** + * Flags related to performing laboratory tests and related processes (e.g. phlebotomy). + */ + LAB, + /** + * Flags related to administrative and financial processes. + */ + ADMIN, + /** + * Flags related to coming into contact with the patient. + */ + CONTACT, + /** + * Flags related to the subject's clinical data. + */ + CLINICAL, + /** + * Flags related to behavior. + */ + BEHAVIORAL, + /** + * Flags related to research. + */ + RESEARCH, + /** + * Flags related to subject's advance directives. + */ + ADVANCEDIRECTIVE, + /** + * Flags related to safety precautions. + */ + SAFETY, + /** + * added to help the parsers + */ + NULL; + public static FlagCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return DIET; + if ("drug".equals(codeString)) + return DRUG; + if ("lab".equals(codeString)) + return LAB; + if ("admin".equals(codeString)) + return ADMIN; + if ("contact".equals(codeString)) + return CONTACT; + if ("clinical".equals(codeString)) + return CLINICAL; + if ("behavioral".equals(codeString)) + return BEHAVIORAL; + if ("research".equals(codeString)) + return RESEARCH; + if ("advance-directive".equals(codeString)) + return ADVANCEDIRECTIVE; + if ("safety".equals(codeString)) + return SAFETY; + throw new FHIRException("Unknown FlagCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIET: return "diet"; + case DRUG: return "drug"; + case LAB: return "lab"; + case ADMIN: return "admin"; + case CONTACT: return "contact"; + case CLINICAL: return "clinical"; + case BEHAVIORAL: return "behavioral"; + case RESEARCH: return "research"; + case ADVANCEDIRECTIVE: return "advance-directive"; + case SAFETY: return "safety"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/flag-category"; + } + public String getDefinition() { + switch (this) { + case DIET: return "Flags related to the subject's dietary needs."; + case DRUG: return "Flags related to the subject's medications."; + case LAB: return "Flags related to performing laboratory tests and related processes (e.g. phlebotomy)."; + case ADMIN: return "Flags related to administrative and financial processes."; + case CONTACT: return "Flags related to coming into contact with the patient."; + case CLINICAL: return "Flags related to the subject's clinical data."; + case BEHAVIORAL: return "Flags related to behavior."; + case RESEARCH: return "Flags related to research."; + case ADVANCEDIRECTIVE: return "Flags related to subject's advance directives."; + case SAFETY: return "Flags related to safety precautions."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIET: return "Diet"; + case DRUG: return "Drug"; + case LAB: return "Lab"; + case ADMIN: return "Administrative"; + case CONTACT: return "Subject contact"; + case CLINICAL: return "Clinical"; + case BEHAVIORAL: return "Behavioral"; + case RESEARCH: return "Research"; + case ADVANCEDIRECTIVE: return "Advance Directive"; + case SAFETY: return "Safety"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagCategoryEnumFactory.java new file mode 100644 index 00000000000..1577dca800f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagCategoryEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FlagCategoryEnumFactory implements EnumFactory { + + public FlagCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("diet".equals(codeString)) + return FlagCategory.DIET; + if ("drug".equals(codeString)) + return FlagCategory.DRUG; + if ("lab".equals(codeString)) + return FlagCategory.LAB; + if ("admin".equals(codeString)) + return FlagCategory.ADMIN; + if ("contact".equals(codeString)) + return FlagCategory.CONTACT; + if ("clinical".equals(codeString)) + return FlagCategory.CLINICAL; + if ("behavioral".equals(codeString)) + return FlagCategory.BEHAVIORAL; + if ("research".equals(codeString)) + return FlagCategory.RESEARCH; + if ("advance-directive".equals(codeString)) + return FlagCategory.ADVANCEDIRECTIVE; + if ("safety".equals(codeString)) + return FlagCategory.SAFETY; + throw new IllegalArgumentException("Unknown FlagCategory code '"+codeString+"'"); + } + + public String toCode(FlagCategory code) { + if (code == FlagCategory.DIET) + return "diet"; + if (code == FlagCategory.DRUG) + return "drug"; + if (code == FlagCategory.LAB) + return "lab"; + if (code == FlagCategory.ADMIN) + return "admin"; + if (code == FlagCategory.CONTACT) + return "contact"; + if (code == FlagCategory.CLINICAL) + return "clinical"; + if (code == FlagCategory.BEHAVIORAL) + return "behavioral"; + if (code == FlagCategory.RESEARCH) + return "research"; + if (code == FlagCategory.ADVANCEDIRECTIVE) + return "advance-directive"; + if (code == FlagCategory.SAFETY) + return "safety"; + return "?"; + } + + public String toSystem(FlagCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagPriority.java new file mode 100644 index 00000000000..d70b29d38a6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagPriority.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FlagPriority { + + /** + * No alarm. + */ + PN, + /** + * Low priority. + */ + PL, + /** + * Medium priority. + */ + PM, + /** + * High priority. + */ + PH, + /** + * added to help the parsers + */ + NULL; + public static FlagPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PN".equals(codeString)) + return PN; + if ("PL".equals(codeString)) + return PL; + if ("PM".equals(codeString)) + return PM; + if ("PH".equals(codeString)) + return PH; + throw new FHIRException("Unknown FlagPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PN: return "PN"; + case PL: return "PL"; + case PM: return "PM"; + case PH: return "PH"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/flag-priority-code"; + } + public String getDefinition() { + switch (this) { + case PN: return "No alarm."; + case PL: return "Low priority."; + case PM: return "Medium priority."; + case PH: return "High priority."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PN: return "No alarm"; + case PL: return "Low priority"; + case PM: return "Medium priority"; + case PH: return "High priority"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagPriorityEnumFactory.java new file mode 100644 index 00000000000..6fbbfb17031 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagPriorityEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FlagPriorityEnumFactory implements EnumFactory { + + public FlagPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PN".equals(codeString)) + return FlagPriority.PN; + if ("PL".equals(codeString)) + return FlagPriority.PL; + if ("PM".equals(codeString)) + return FlagPriority.PM; + if ("PH".equals(codeString)) + return FlagPriority.PH; + throw new IllegalArgumentException("Unknown FlagPriority code '"+codeString+"'"); + } + + public String toCode(FlagPriority code) { + if (code == FlagPriority.PN) + return "PN"; + if (code == FlagPriority.PL) + return "PL"; + if (code == FlagPriority.PM) + return "PM"; + if (code == FlagPriority.PH) + return "PH"; + return "?"; + } + + public String toSystem(FlagPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagStatus.java new file mode 100644 index 00000000000..218fcbf80af --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FlagStatus { + + /** + * A current flag that should be displayed to a user. A system may use the category to determine which roles should view the flag. + */ + ACTIVE, + /** + * The flag does not need to be displayed any more. + */ + INACTIVE, + /** + * The flag was added in error, and should no longer be displayed. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static FlagStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown FlagStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/flag-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "A current flag that should be displayed to a user. A system may use the category to determine which roles should view the flag."; + case INACTIVE: return "The flag does not need to be displayed any more."; + case ENTEREDINERROR: return "The flag was added in error, and should no longer be displayed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagStatusEnumFactory.java new file mode 100644 index 00000000000..136a0061e04 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FlagStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FlagStatusEnumFactory implements EnumFactory { + + public FlagStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return FlagStatus.ACTIVE; + if ("inactive".equals(codeString)) + return FlagStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return FlagStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown FlagStatus code '"+codeString+"'"); + } + + public String toCode(FlagStatus code) { + if (code == FlagStatus.ACTIVE) + return "active"; + if (code == FlagStatus.INACTIVE) + return "inactive"; + if (code == FlagStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(FlagStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmConditions.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmConditions.java new file mode 100644 index 00000000000..2de56e1cd4c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmConditions.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FmConditions { + + /** + * Headache + */ + _123987, + /** + * added to help the parsers + */ + NULL; + public static FmConditions fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("123987".equals(codeString)) + return _123987; + throw new FHIRException("Unknown FmConditions code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _123987: return "123987"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/fm-conditions"; + } + public String getDefinition() { + switch (this) { + case _123987: return "Headache"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _123987: return "Headache"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmConditionsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmConditionsEnumFactory.java new file mode 100644 index 00000000000..97fd9706f15 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmConditionsEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FmConditionsEnumFactory implements EnumFactory { + + public FmConditions fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("123987".equals(codeString)) + return FmConditions._123987; + throw new IllegalArgumentException("Unknown FmConditions code '"+codeString+"'"); + } + + public String toCode(FmConditions code) { + if (code == FmConditions._123987) + return "123987"; + return "?"; + } + + public String toSystem(FmConditions code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmItemtype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmItemtype.java new file mode 100644 index 00000000000..b230c0618fb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmItemtype.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FmItemtype { + + /** + * A group of products and/or Services, amount ar the summary or detail level products and services. + */ + GROUP, + /** + * A billed product line item. + */ + PRODUCT, + /** + * A billed service line item. + */ + SERVICE, + /** + * added to help the parsers + */ + NULL; + public static FmItemtype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return GROUP; + if ("product".equals(codeString)) + return PRODUCT; + if ("service".equals(codeString)) + return SERVICE; + throw new FHIRException("Unknown FmItemtype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUP: return "group"; + case PRODUCT: return "product"; + case SERVICE: return "service"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-claimitemtype"; + } + public String getDefinition() { + switch (this) { + case GROUP: return "A group of products and/or Services, amount ar the summary or detail level products and services."; + case PRODUCT: return "A billed product line item."; + case SERVICE: return "A billed service line item."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUP: return "Group"; + case PRODUCT: return "Product"; + case SERVICE: return "Service"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmItemtypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmItemtypeEnumFactory.java new file mode 100644 index 00000000000..80eca8bbc5f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmItemtypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FmItemtypeEnumFactory implements EnumFactory { + + public FmItemtype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return FmItemtype.GROUP; + if ("product".equals(codeString)) + return FmItemtype.PRODUCT; + if ("service".equals(codeString)) + return FmItemtype.SERVICE; + throw new IllegalArgumentException("Unknown FmItemtype code '"+codeString+"'"); + } + + public String toCode(FmItemtype code) { + if (code == FmItemtype.GROUP) + return "group"; + if (code == FmItemtype.PRODUCT) + return "product"; + if (code == FmItemtype.SERVICE) + return "service"; + return "?"; + } + + public String toSystem(FmItemtype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmStatus.java new file mode 100644 index 00000000000..2ff2af1fcf3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum FmStatus { + + /** + * The instance is currently in-force. + */ + ACTIVE, + /** + * The instance is withdrawn, rescinded or reversed. + */ + CANCELLED, + /** + * A new instance the contents of which is not complete. + */ + DRAFT, + /** + * The instance was entered in error. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static FmStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("draft".equals(codeString)) + return DRAFT; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown FmStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case DRAFT: return "draft"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/fm-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The instance is currently in-force."; + case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; + case DRAFT: return "A new instance the contents of which is not complete."; + case ENTEREDINERROR: return "The instance was entered in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case CANCELLED: return "Cancelled"; + case DRAFT: return "Draft"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmStatusEnumFactory.java new file mode 100644 index 00000000000..1d0f2d08a17 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FmStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FmStatusEnumFactory implements EnumFactory { + + public FmStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return FmStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return FmStatus.CANCELLED; + if ("draft".equals(codeString)) + return FmStatus.DRAFT; + if ("entered-in-error".equals(codeString)) + return FmStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown FmStatus code '"+codeString+"'"); + } + + public String toCode(FmStatus code) { + if (code == FmStatus.ACTIVE) + return "active"; + if (code == FmStatus.CANCELLED) + return "cancelled"; + if (code == FmStatus.DRAFT) + return "draft"; + if (code == FmStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(FmStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Forms.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Forms.java new file mode 100644 index 00000000000..4f86c1aca08 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Forms.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Forms { + + /** + * Example: The #1 form to be used when printing this information. + */ + _1, + /** + * Example: The #2 form to be used when printing this information. + */ + _2, + /** + * added to help the parsers + */ + NULL; + public static Forms fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + throw new FHIRException("Unknown Forms code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/forms-codes"; + } + public String getDefinition() { + switch (this) { + case _1: return "Example: The #1 form to be used when printing this information."; + case _2: return "Example: The #2 form to be used when printing this information."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Form #1"; + case _2: return "Form #1"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FormsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FormsEnumFactory.java new file mode 100644 index 00000000000..e5ecf659454 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FormsEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FormsEnumFactory implements EnumFactory { + + public Forms fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return Forms._1; + if ("2".equals(codeString)) + return Forms._2; + throw new IllegalArgumentException("Unknown Forms code '"+codeString+"'"); + } + + public String toCode(Forms code) { + if (code == Forms._1) + return "1"; + if (code == Forms._2) + return "2"; + return "?"; + } + + public String toSystem(Forms code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Fundsreserve.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Fundsreserve.java new file mode 100644 index 00000000000..dbc0027ac66 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Fundsreserve.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Fundsreserve { + + /** + * The payor is requested to reserve funds for the provision of the named services by any provider for settlement of future claims related to this request. + */ + PATIENT, + /** + * The payor is requested to reserve funds solely for the named provider for settlement of future claims related to this request. + */ + PROVIDER, + /** + * The payor is not being requested to reserve any funds for the settlement of future claims. + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static Fundsreserve fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return PATIENT; + if ("provider".equals(codeString)) + return PROVIDER; + if ("none".equals(codeString)) + return NONE; + throw new FHIRException("Unknown Fundsreserve code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "patient"; + case PROVIDER: return "provider"; + case NONE: return "none"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/fundsreserve"; + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The payor is requested to reserve funds for the provision of the named services by any provider for settlement of future claims related to this request."; + case PROVIDER: return "The payor is requested to reserve funds solely for the named provider for settlement of future claims related to this request."; + case NONE: return "The payor is not being requested to reserve any funds for the settlement of future claims."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case PROVIDER: return "Provider"; + case NONE: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FundsreserveEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FundsreserveEnumFactory.java new file mode 100644 index 00000000000..ebaca37f436 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/FundsreserveEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class FundsreserveEnumFactory implements EnumFactory { + + public Fundsreserve fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return Fundsreserve.PATIENT; + if ("provider".equals(codeString)) + return Fundsreserve.PROVIDER; + if ("none".equals(codeString)) + return Fundsreserve.NONE; + throw new IllegalArgumentException("Unknown Fundsreserve code '"+codeString+"'"); + } + + public String toCode(Fundsreserve code) { + if (code == Fundsreserve.PATIENT) + return "patient"; + if (code == Fundsreserve.PROVIDER) + return "provider"; + if (code == Fundsreserve.NONE) + return "none"; + return "?"; + } + + public String toSystem(Fundsreserve code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalAcceptanceStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalAcceptanceStatus.java new file mode 100644 index 00000000000..8e2ce21d9b4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalAcceptanceStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalAcceptanceStatus { + + /** + * Stakeholder supports pursuit of the goal + */ + AGREE, + /** + * Stakeholder is not in support of the pursuit of the goal + */ + DISAGREE, + /** + * Stakeholder has not yet made a decision on whether they support the goal + */ + PENDING, + /** + * added to help the parsers + */ + NULL; + public static GoalAcceptanceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("agree".equals(codeString)) + return AGREE; + if ("disagree".equals(codeString)) + return DISAGREE; + if ("pending".equals(codeString)) + return PENDING; + throw new FHIRException("Unknown GoalAcceptanceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AGREE: return "agree"; + case DISAGREE: return "disagree"; + case PENDING: return "pending"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-acceptance-status"; + } + public String getDefinition() { + switch (this) { + case AGREE: return "Stakeholder supports pursuit of the goal"; + case DISAGREE: return "Stakeholder is not in support of the pursuit of the goal"; + case PENDING: return "Stakeholder has not yet made a decision on whether they support the goal"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AGREE: return "Agree"; + case DISAGREE: return "Disagree"; + case PENDING: return "Pending"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalAcceptanceStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalAcceptanceStatusEnumFactory.java new file mode 100644 index 00000000000..23e4596d82e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalAcceptanceStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GoalAcceptanceStatusEnumFactory implements EnumFactory { + + public GoalAcceptanceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("agree".equals(codeString)) + return GoalAcceptanceStatus.AGREE; + if ("disagree".equals(codeString)) + return GoalAcceptanceStatus.DISAGREE; + if ("pending".equals(codeString)) + return GoalAcceptanceStatus.PENDING; + throw new IllegalArgumentException("Unknown GoalAcceptanceStatus code '"+codeString+"'"); + } + + public String toCode(GoalAcceptanceStatus code) { + if (code == GoalAcceptanceStatus.AGREE) + return "agree"; + if (code == GoalAcceptanceStatus.DISAGREE) + return "disagree"; + if (code == GoalAcceptanceStatus.PENDING) + return "pending"; + return "?"; + } + + public String toSystem(GoalAcceptanceStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalCategory.java new file mode 100644 index 00000000000..83de43ff01f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalCategory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalCategory { + + /** + * Goals related to the consumption of food and/or beverages. + */ + DIETARY, + /** + * Goals related to the personal protection of the subject. + */ + SAFETY, + /** + * Goals related to the manner in which the subject acts. + */ + BEHAVIORAL, + /** + * Goals related to the practice of nursing or established by nurses. + */ + NURSING, + /** + * Goals related to the mobility and motor capability of the subject. + */ + PHYSIOTHERAPY, + /** + * added to help the parsers + */ + NULL; + public static GoalCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("dietary".equals(codeString)) + return DIETARY; + if ("safety".equals(codeString)) + return SAFETY; + if ("behavioral".equals(codeString)) + return BEHAVIORAL; + if ("nursing".equals(codeString)) + return NURSING; + if ("physiotherapy".equals(codeString)) + return PHYSIOTHERAPY; + throw new FHIRException("Unknown GoalCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIETARY: return "dietary"; + case SAFETY: return "safety"; + case BEHAVIORAL: return "behavioral"; + case NURSING: return "nursing"; + case PHYSIOTHERAPY: return "physiotherapy"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-category"; + } + public String getDefinition() { + switch (this) { + case DIETARY: return "Goals related to the consumption of food and/or beverages."; + case SAFETY: return "Goals related to the personal protection of the subject."; + case BEHAVIORAL: return "Goals related to the manner in which the subject acts."; + case NURSING: return "Goals related to the practice of nursing or established by nurses."; + case PHYSIOTHERAPY: return "Goals related to the mobility and motor capability of the subject."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIETARY: return "Dietary"; + case SAFETY: return "Safety"; + case BEHAVIORAL: return "Behavioral"; + case NURSING: return "Nursing"; + case PHYSIOTHERAPY: return "Physiotherapy"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalCategoryEnumFactory.java new file mode 100644 index 00000000000..3bc5db8ebb1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalCategoryEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GoalCategoryEnumFactory implements EnumFactory { + + public GoalCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("dietary".equals(codeString)) + return GoalCategory.DIETARY; + if ("safety".equals(codeString)) + return GoalCategory.SAFETY; + if ("behavioral".equals(codeString)) + return GoalCategory.BEHAVIORAL; + if ("nursing".equals(codeString)) + return GoalCategory.NURSING; + if ("physiotherapy".equals(codeString)) + return GoalCategory.PHYSIOTHERAPY; + throw new IllegalArgumentException("Unknown GoalCategory code '"+codeString+"'"); + } + + public String toCode(GoalCategory code) { + if (code == GoalCategory.DIETARY) + return "dietary"; + if (code == GoalCategory.SAFETY) + return "safety"; + if (code == GoalCategory.BEHAVIORAL) + return "behavioral"; + if (code == GoalCategory.NURSING) + return "nursing"; + if (code == GoalCategory.PHYSIOTHERAPY) + return "physiotherapy"; + return "?"; + } + + public String toSystem(GoalCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalPriority.java new file mode 100644 index 00000000000..a7eb8f88ad4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalPriority.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalPriority { + + /** + * Indicates that the goal is of considerable importance and should be a primary focus of care delivery. + */ + HIGHPRIORITY, + /** + * Indicates that the goal has a reasonable degree of importance and that concrete action should be taken towards the goal. Attainment is not as critical as high-priority goals. + */ + MEDIUMPRIORITY, + /** + * The goal is desirable but is not sufficiently important to devote significant resources to. Achievement of the goal may be sought when incidental to achieving other goals. + */ + LOWPRIORITY, + /** + * added to help the parsers + */ + NULL; + public static GoalPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high-priority".equals(codeString)) + return HIGHPRIORITY; + if ("medium-priority".equals(codeString)) + return MEDIUMPRIORITY; + if ("low-priority".equals(codeString)) + return LOWPRIORITY; + throw new FHIRException("Unknown GoalPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HIGHPRIORITY: return "high-priority"; + case MEDIUMPRIORITY: return "medium-priority"; + case LOWPRIORITY: return "low-priority"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-priority"; + } + public String getDefinition() { + switch (this) { + case HIGHPRIORITY: return "Indicates that the goal is of considerable importance and should be a primary focus of care delivery."; + case MEDIUMPRIORITY: return "Indicates that the goal has a reasonable degree of importance and that concrete action should be taken towards the goal. Attainment is not as critical as high-priority goals."; + case LOWPRIORITY: return "The goal is desirable but is not sufficiently important to devote significant resources to. Achievement of the goal may be sought when incidental to achieving other goals."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HIGHPRIORITY: return "High Priority"; + case MEDIUMPRIORITY: return "Medium Priority"; + case LOWPRIORITY: return "Low Priority"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalPriorityEnumFactory.java new file mode 100644 index 00000000000..d69f7bd331e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalPriorityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GoalPriorityEnumFactory implements EnumFactory { + + public GoalPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("high-priority".equals(codeString)) + return GoalPriority.HIGHPRIORITY; + if ("medium-priority".equals(codeString)) + return GoalPriority.MEDIUMPRIORITY; + if ("low-priority".equals(codeString)) + return GoalPriority.LOWPRIORITY; + throw new IllegalArgumentException("Unknown GoalPriority code '"+codeString+"'"); + } + + public String toCode(GoalPriority code) { + if (code == GoalPriority.HIGHPRIORITY) + return "high-priority"; + if (code == GoalPriority.MEDIUMPRIORITY) + return "medium-priority"; + if (code == GoalPriority.LOWPRIORITY) + return "low-priority"; + return "?"; + } + + public String toSystem(GoalPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalRelationshipType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalRelationshipType.java new file mode 100644 index 00000000000..35f8f43214e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalRelationshipType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalRelationshipType { + + /** + * Indicates that the target goal is one which must be met before striving for the current goal + */ + PREDECESSOR, + /** + * Indicates that the target goal is a desired objective once the current goal is met + */ + SUCCESSOR, + /** + * Indicates that this goal has been replaced by the target goal + */ + REPLACEMENT, + /** + * Indicates that the target goal is considered to be a "piece" of attaining this goal. + */ + MILESTONE, + /** + * Indicates that the relationship is not covered by one of the pre-defined codes. (An extension may convey more information about the meaning of the relationship.) + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static GoalRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("predecessor".equals(codeString)) + return PREDECESSOR; + if ("successor".equals(codeString)) + return SUCCESSOR; + if ("replacement".equals(codeString)) + return REPLACEMENT; + if ("milestone".equals(codeString)) + return MILESTONE; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown GoalRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREDECESSOR: return "predecessor"; + case SUCCESSOR: return "successor"; + case REPLACEMENT: return "replacement"; + case MILESTONE: return "milestone"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-relationship-type"; + } + public String getDefinition() { + switch (this) { + case PREDECESSOR: return "Indicates that the target goal is one which must be met before striving for the current goal"; + case SUCCESSOR: return "Indicates that the target goal is a desired objective once the current goal is met"; + case REPLACEMENT: return "Indicates that this goal has been replaced by the target goal"; + case MILESTONE: return "Indicates that the target goal is considered to be a \"piece\" of attaining this goal."; + case OTHER: return "Indicates that the relationship is not covered by one of the pre-defined codes. (An extension may convey more information about the meaning of the relationship.)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREDECESSOR: return "Predecessor"; + case SUCCESSOR: return "Successor"; + case REPLACEMENT: return "Replacement"; + case MILESTONE: return "Milestone"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalRelationshipTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..0045461965a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalRelationshipTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GoalRelationshipTypeEnumFactory implements EnumFactory { + + public GoalRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("predecessor".equals(codeString)) + return GoalRelationshipType.PREDECESSOR; + if ("successor".equals(codeString)) + return GoalRelationshipType.SUCCESSOR; + if ("replacement".equals(codeString)) + return GoalRelationshipType.REPLACEMENT; + if ("milestone".equals(codeString)) + return GoalRelationshipType.MILESTONE; + if ("other".equals(codeString)) + return GoalRelationshipType.OTHER; + throw new IllegalArgumentException("Unknown GoalRelationshipType code '"+codeString+"'"); + } + + public String toCode(GoalRelationshipType code) { + if (code == GoalRelationshipType.PREDECESSOR) + return "predecessor"; + if (code == GoalRelationshipType.SUCCESSOR) + return "successor"; + if (code == GoalRelationshipType.REPLACEMENT) + return "replacement"; + if (code == GoalRelationshipType.MILESTONE) + return "milestone"; + if (code == GoalRelationshipType.OTHER) + return "other"; + return "?"; + } + + public String toSystem(GoalRelationshipType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatus.java new file mode 100644 index 00000000000..d4086325db0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatus.java @@ -0,0 +1,186 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalStatus { + + /** + * A goal is proposed for this patient + */ + PROPOSED, + /** + * A proposed goal was accepted or acknowledged + */ + ACCEPTED, + /** + * A goal is planned for this patient + */ + PLANNED, + /** + * The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again) + */ + INPROGRESS, + /** + * The goal is on schedule for the planned timelines + */ + ONTARGET, + /** + * The goal is ahead of the planned timelines + */ + AHEADOFTARGET, + /** + * The goal is behind the planned timelines + */ + BEHINDTARGET, + /** + * The goal has been met, but ongoing activity is needed to sustain the goal objective + */ + SUSTAINING, + /** + * The goal has been met and no further action is needed + */ + ACHIEVED, + /** + * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time. + */ + ONHOLD, + /** + * The previously accepted goal is no longer being sought + */ + CANCELLED, + /** + * The goal was entered in error and voided. + */ + ENTEREDINERROR, + /** + * A proposed goal was rejected + */ + REJECTED, + /** + * added to help the parsers + */ + NULL; + public static GoalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("planned".equals(codeString)) + return PLANNED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-target".equals(codeString)) + return ONTARGET; + if ("ahead-of-target".equals(codeString)) + return AHEADOFTARGET; + if ("behind-target".equals(codeString)) + return BEHINDTARGET; + if ("sustaining".equals(codeString)) + return SUSTAINING; + if ("achieved".equals(codeString)) + return ACHIEVED; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("rejected".equals(codeString)) + return REJECTED; + throw new FHIRException("Unknown GoalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case ACCEPTED: return "accepted"; + case PLANNED: return "planned"; + case INPROGRESS: return "in-progress"; + case ONTARGET: return "on-target"; + case AHEADOFTARGET: return "ahead-of-target"; + case BEHINDTARGET: return "behind-target"; + case SUSTAINING: return "sustaining"; + case ACHIEVED: return "achieved"; + case ONHOLD: return "on-hold"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + case REJECTED: return "rejected"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-status"; + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "A goal is proposed for this patient"; + case ACCEPTED: return "A proposed goal was accepted or acknowledged"; + case PLANNED: return "A goal is planned for this patient"; + case INPROGRESS: return "The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again)"; + case ONTARGET: return "The goal is on schedule for the planned timelines"; + case AHEADOFTARGET: return "The goal is ahead of the planned timelines"; + case BEHINDTARGET: return "The goal is behind the planned timelines"; + case SUSTAINING: return "The goal has been met, but ongoing activity is needed to sustain the goal objective"; + case ACHIEVED: return "The goal has been met and no further action is needed"; + case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time."; + case CANCELLED: return "The previously accepted goal is no longer being sought"; + case ENTEREDINERROR: return "The goal was entered in error and voided."; + case REJECTED: return "A proposed goal was rejected"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case ACCEPTED: return "Accepted"; + case PLANNED: return "Planned"; + case INPROGRESS: return "In Progress"; + case ONTARGET: return "On Target"; + case AHEADOFTARGET: return "Ahead of Target"; + case BEHINDTARGET: return "Behind Target"; + case SUSTAINING: return "Sustaining"; + case ACHIEVED: return "Achieved"; + case ONHOLD: return "On Hold"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered In Error"; + case REJECTED: return "Rejected"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusEnumFactory.java new file mode 100644 index 00000000000..b7b3c0f145a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusEnumFactory.java @@ -0,0 +1,106 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GoalStatusEnumFactory implements EnumFactory { + + public GoalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return GoalStatus.PROPOSED; + if ("accepted".equals(codeString)) + return GoalStatus.ACCEPTED; + if ("planned".equals(codeString)) + return GoalStatus.PLANNED; + if ("in-progress".equals(codeString)) + return GoalStatus.INPROGRESS; + if ("on-target".equals(codeString)) + return GoalStatus.ONTARGET; + if ("ahead-of-target".equals(codeString)) + return GoalStatus.AHEADOFTARGET; + if ("behind-target".equals(codeString)) + return GoalStatus.BEHINDTARGET; + if ("sustaining".equals(codeString)) + return GoalStatus.SUSTAINING; + if ("achieved".equals(codeString)) + return GoalStatus.ACHIEVED; + if ("on-hold".equals(codeString)) + return GoalStatus.ONHOLD; + if ("cancelled".equals(codeString)) + return GoalStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return GoalStatus.ENTEREDINERROR; + if ("rejected".equals(codeString)) + return GoalStatus.REJECTED; + throw new IllegalArgumentException("Unknown GoalStatus code '"+codeString+"'"); + } + + public String toCode(GoalStatus code) { + if (code == GoalStatus.PROPOSED) + return "proposed"; + if (code == GoalStatus.ACCEPTED) + return "accepted"; + if (code == GoalStatus.PLANNED) + return "planned"; + if (code == GoalStatus.INPROGRESS) + return "in-progress"; + if (code == GoalStatus.ONTARGET) + return "on-target"; + if (code == GoalStatus.AHEADOFTARGET) + return "ahead-of-target"; + if (code == GoalStatus.BEHINDTARGET) + return "behind-target"; + if (code == GoalStatus.SUSTAINING) + return "sustaining"; + if (code == GoalStatus.ACHIEVED) + return "achieved"; + if (code == GoalStatus.ONHOLD) + return "on-hold"; + if (code == GoalStatus.CANCELLED) + return "cancelled"; + if (code == GoalStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == GoalStatus.REJECTED) + return "rejected"; + return "?"; + } + + public String toSystem(GoalStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusReason.java new file mode 100644 index 00000000000..f92a8f59c15 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusReason.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GoalStatusReason { + + /** + * Goal suspended or ended because of a surgical procedure. + */ + SURGERY, + /** + * Goal suspended or ended because of a significant life event (marital change, bereavement, etc.). + */ + LIFEEVENT, + /** + * Goal has been superseded by a new goal. + */ + REPLACED, + /** + * Patient wishes the goal to be set aside, at least temporarily. + */ + PATIENTREQUEST, + /** + * Goal can not be reached temporarily. + */ + TEMPNOTATTAINABLE, + /** + * Goal can not be reached permanently. + */ + PERMANENTNOTATTAINABLE, + /** + * Goal can not be reached due to financial barrier or reason. + */ + FINANCIALBARRIER, + /** + * Goal can not be reached due to a lack of transportation. + */ + LACKOFTRANSPORTATION, + /** + * Goal can not be reached due to a lack of social support. + */ + LACKOFSOCIALSUPPORT, + /** + * added to help the parsers + */ + NULL; + public static GoalStatusReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("surgery".equals(codeString)) + return SURGERY; + if ("life-event".equals(codeString)) + return LIFEEVENT; + if ("replaced".equals(codeString)) + return REPLACED; + if ("patient-request".equals(codeString)) + return PATIENTREQUEST; + if ("temp-not-attainable".equals(codeString)) + return TEMPNOTATTAINABLE; + if ("permanent-not-attainable".equals(codeString)) + return PERMANENTNOTATTAINABLE; + if ("financial-barrier".equals(codeString)) + return FINANCIALBARRIER; + if ("lack-of-transportation".equals(codeString)) + return LACKOFTRANSPORTATION; + if ("lack-of-social-support".equals(codeString)) + return LACKOFSOCIALSUPPORT; + throw new FHIRException("Unknown GoalStatusReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SURGERY: return "surgery"; + case LIFEEVENT: return "life-event"; + case REPLACED: return "replaced"; + case PATIENTREQUEST: return "patient-request"; + case TEMPNOTATTAINABLE: return "temp-not-attainable"; + case PERMANENTNOTATTAINABLE: return "permanent-not-attainable"; + case FINANCIALBARRIER: return "financial-barrier"; + case LACKOFTRANSPORTATION: return "lack-of-transportation"; + case LACKOFSOCIALSUPPORT: return "lack-of-social-support"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/goal-status-reason"; + } + public String getDefinition() { + switch (this) { + case SURGERY: return "Goal suspended or ended because of a surgical procedure."; + case LIFEEVENT: return "Goal suspended or ended because of a significant life event (marital change, bereavement, etc.)."; + case REPLACED: return "Goal has been superseded by a new goal."; + case PATIENTREQUEST: return "Patient wishes the goal to be set aside, at least temporarily."; + case TEMPNOTATTAINABLE: return "Goal can not be reached temporarily."; + case PERMANENTNOTATTAINABLE: return "Goal can not be reached permanently."; + case FINANCIALBARRIER: return "Goal can not be reached due to financial barrier or reason."; + case LACKOFTRANSPORTATION: return "Goal can not be reached due to a lack of transportation."; + case LACKOFSOCIALSUPPORT: return "Goal can not be reached due to a lack of social support."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SURGERY: return "Surgery"; + case LIFEEVENT: return "Life Event"; + case REPLACED: return "Replaced"; + case PATIENTREQUEST: return "Patient Request"; + case TEMPNOTATTAINABLE: return "Goal Not Attainable Temporarily"; + case PERMANENTNOTATTAINABLE: return "Goal Not Attainable Permanently"; + case FINANCIALBARRIER: return "Financial Reason"; + case LACKOFTRANSPORTATION: return "Lack Of Transportation"; + case LACKOFSOCIALSUPPORT: return "Lack Of Social Support"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusReasonEnumFactory.java new file mode 100644 index 00000000000..96a04b79b02 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GoalStatusReasonEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GoalStatusReasonEnumFactory implements EnumFactory { + + public GoalStatusReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("surgery".equals(codeString)) + return GoalStatusReason.SURGERY; + if ("life-event".equals(codeString)) + return GoalStatusReason.LIFEEVENT; + if ("replaced".equals(codeString)) + return GoalStatusReason.REPLACED; + if ("patient-request".equals(codeString)) + return GoalStatusReason.PATIENTREQUEST; + if ("temp-not-attainable".equals(codeString)) + return GoalStatusReason.TEMPNOTATTAINABLE; + if ("permanent-not-attainable".equals(codeString)) + return GoalStatusReason.PERMANENTNOTATTAINABLE; + if ("financial-barrier".equals(codeString)) + return GoalStatusReason.FINANCIALBARRIER; + if ("lack-of-transportation".equals(codeString)) + return GoalStatusReason.LACKOFTRANSPORTATION; + if ("lack-of-social-support".equals(codeString)) + return GoalStatusReason.LACKOFSOCIALSUPPORT; + throw new IllegalArgumentException("Unknown GoalStatusReason code '"+codeString+"'"); + } + + public String toCode(GoalStatusReason code) { + if (code == GoalStatusReason.SURGERY) + return "surgery"; + if (code == GoalStatusReason.LIFEEVENT) + return "life-event"; + if (code == GoalStatusReason.REPLACED) + return "replaced"; + if (code == GoalStatusReason.PATIENTREQUEST) + return "patient-request"; + if (code == GoalStatusReason.TEMPNOTATTAINABLE) + return "temp-not-attainable"; + if (code == GoalStatusReason.PERMANENTNOTATTAINABLE) + return "permanent-not-attainable"; + if (code == GoalStatusReason.FINANCIALBARRIER) + return "financial-barrier"; + if (code == GoalStatusReason.LACKOFTRANSPORTATION) + return "lack-of-transportation"; + if (code == GoalStatusReason.LACKOFSOCIALSUPPORT) + return "lack-of-social-support"; + return "?"; + } + + public String toSystem(GoalStatusReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentRule.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentRule.java new file mode 100644 index 00000000000..9806e8c73e4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentRule.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GraphCompartmentRule { + + /** + * The compartment must be identical (the same literal reference) + */ + IDENTICAL, + /** + * The compartment must be the same - the record must be about the same patient, but the reference may be different + */ + MATCHING, + /** + * The compartment must be different + */ + DIFFERENT, + /** + * The compartment rule is defined in the accompanying FHIRPath expression + */ + CUSTOM, + /** + * added to help the parsers + */ + NULL; + public static GraphCompartmentRule fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("identical".equals(codeString)) + return IDENTICAL; + if ("matching".equals(codeString)) + return MATCHING; + if ("different".equals(codeString)) + return DIFFERENT; + if ("custom".equals(codeString)) + return CUSTOM; + throw new FHIRException("Unknown GraphCompartmentRule code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IDENTICAL: return "identical"; + case MATCHING: return "matching"; + case DIFFERENT: return "different"; + case CUSTOM: return "custom"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/graph-compartment-rule"; + } + public String getDefinition() { + switch (this) { + case IDENTICAL: return "The compartment must be identical (the same literal reference)"; + case MATCHING: return "The compartment must be the same - the record must be about the same patient, but the reference may be different"; + case DIFFERENT: return "The compartment must be different"; + case CUSTOM: return "The compartment rule is defined in the accompanying FHIRPath expression"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IDENTICAL: return "Identical"; + case MATCHING: return "Matching"; + case DIFFERENT: return "Different"; + case CUSTOM: return "Custom"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentRuleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentRuleEnumFactory.java new file mode 100644 index 00000000000..8b08821b059 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentRuleEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GraphCompartmentRuleEnumFactory implements EnumFactory { + + public GraphCompartmentRule fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("identical".equals(codeString)) + return GraphCompartmentRule.IDENTICAL; + if ("matching".equals(codeString)) + return GraphCompartmentRule.MATCHING; + if ("different".equals(codeString)) + return GraphCompartmentRule.DIFFERENT; + if ("custom".equals(codeString)) + return GraphCompartmentRule.CUSTOM; + throw new IllegalArgumentException("Unknown GraphCompartmentRule code '"+codeString+"'"); + } + + public String toCode(GraphCompartmentRule code) { + if (code == GraphCompartmentRule.IDENTICAL) + return "identical"; + if (code == GraphCompartmentRule.MATCHING) + return "matching"; + if (code == GraphCompartmentRule.DIFFERENT) + return "different"; + if (code == GraphCompartmentRule.CUSTOM) + return "custom"; + return "?"; + } + + public String toSystem(GraphCompartmentRule code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentUse.java new file mode 100644 index 00000000000..4844ec8fe34 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentUse.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GraphCompartmentUse { + + /** + * This compartment rule is a condition for whether the rule applies + */ + CONDITION, + /** + * This compartment rule is enforced on any relationships that meet the conditions + */ + REQUIREMENT, + /** + * added to help the parsers + */ + NULL; + public static GraphCompartmentUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return CONDITION; + if ("requirement".equals(codeString)) + return REQUIREMENT; + throw new FHIRException("Unknown GraphCompartmentUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONDITION: return "condition"; + case REQUIREMENT: return "requirement"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/graph-compartment-use"; + } + public String getDefinition() { + switch (this) { + case CONDITION: return "This compartment rule is a condition for whether the rule applies"; + case REQUIREMENT: return "This compartment rule is enforced on any relationships that meet the conditions"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONDITION: return "Condition"; + case REQUIREMENT: return "Requirement"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentUseEnumFactory.java new file mode 100644 index 00000000000..6fa4dbed8d8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GraphCompartmentUseEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GraphCompartmentUseEnumFactory implements EnumFactory { + + public GraphCompartmentUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("condition".equals(codeString)) + return GraphCompartmentUse.CONDITION; + if ("requirement".equals(codeString)) + return GraphCompartmentUse.REQUIREMENT; + throw new IllegalArgumentException("Unknown GraphCompartmentUse code '"+codeString+"'"); + } + + public String toCode(GraphCompartmentUse code) { + if (code == GraphCompartmentUse.CONDITION) + return "condition"; + if (code == GraphCompartmentUse.REQUIREMENT) + return "requirement"; + return "?"; + } + + public String toSystem(GraphCompartmentUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GroupType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GroupType.java new file mode 100644 index 00000000000..f423d9b0f28 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GroupType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GroupType { + + /** + * Group contains "person" Patient resources + */ + PERSON, + /** + * Group contains "animal" Patient resources + */ + ANIMAL, + /** + * Group contains healthcare practitioner resources + */ + PRACTITIONER, + /** + * Group contains Device resources + */ + DEVICE, + /** + * Group contains Medication resources + */ + MEDICATION, + /** + * Group contains Substance resources + */ + SUBSTANCE, + /** + * added to help the parsers + */ + NULL; + public static GroupType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return PERSON; + if ("animal".equals(codeString)) + return ANIMAL; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("device".equals(codeString)) + return DEVICE; + if ("medication".equals(codeString)) + return MEDICATION; + if ("substance".equals(codeString)) + return SUBSTANCE; + throw new FHIRException("Unknown GroupType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSON: return "person"; + case ANIMAL: return "animal"; + case PRACTITIONER: return "practitioner"; + case DEVICE: return "device"; + case MEDICATION: return "medication"; + case SUBSTANCE: return "substance"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/group-type"; + } + public String getDefinition() { + switch (this) { + case PERSON: return "Group contains \"person\" Patient resources"; + case ANIMAL: return "Group contains \"animal\" Patient resources"; + case PRACTITIONER: return "Group contains healthcare practitioner resources"; + case DEVICE: return "Group contains Device resources"; + case MEDICATION: return "Group contains Medication resources"; + case SUBSTANCE: return "Group contains Substance resources"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSON: return "Person"; + case ANIMAL: return "Animal"; + case PRACTITIONER: return "Practitioner"; + case DEVICE: return "Device"; + case MEDICATION: return "Medication"; + case SUBSTANCE: return "Substance"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GroupTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GroupTypeEnumFactory.java new file mode 100644 index 00000000000..9844964ddde --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GroupTypeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GroupTypeEnumFactory implements EnumFactory { + + public GroupType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return GroupType.PERSON; + if ("animal".equals(codeString)) + return GroupType.ANIMAL; + if ("practitioner".equals(codeString)) + return GroupType.PRACTITIONER; + if ("device".equals(codeString)) + return GroupType.DEVICE; + if ("medication".equals(codeString)) + return GroupType.MEDICATION; + if ("substance".equals(codeString)) + return GroupType.SUBSTANCE; + throw new IllegalArgumentException("Unknown GroupType code '"+codeString+"'"); + } + + public String toCode(GroupType code) { + if (code == GroupType.PERSON) + return "person"; + if (code == GroupType.ANIMAL) + return "animal"; + if (code == GroupType.PRACTITIONER) + return "practitioner"; + if (code == GroupType.DEVICE) + return "device"; + if (code == GroupType.MEDICATION) + return "medication"; + if (code == GroupType.SUBSTANCE) + return "substance"; + return "?"; + } + + public String toSystem(GroupType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidanceResponseStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidanceResponseStatus.java new file mode 100644 index 00000000000..5ef6e607585 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidanceResponseStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GuidanceResponseStatus { + + /** + * The request was processed successfully + */ + SUCCESS, + /** + * The request was processed successfully, but more data may result in a more complete evaluation + */ + DATAREQUESTED, + /** + * The request was processed, but more data is required to complete the evaluation + */ + DATAREQUIRED, + /** + * The request is currently being processed + */ + INPROGRESS, + /** + * The request was not processed successfully + */ + FAILURE, + /** + * The response was entered in error + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static GuidanceResponseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("success".equals(codeString)) + return SUCCESS; + if ("data-requested".equals(codeString)) + return DATAREQUESTED; + if ("data-required".equals(codeString)) + return DATAREQUIRED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("failure".equals(codeString)) + return FAILURE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUCCESS: return "success"; + case DATAREQUESTED: return "data-requested"; + case DATAREQUIRED: return "data-required"; + case INPROGRESS: return "in-progress"; + case FAILURE: return "failure"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/guidance-response-status"; + } + public String getDefinition() { + switch (this) { + case SUCCESS: return "The request was processed successfully"; + case DATAREQUESTED: return "The request was processed successfully, but more data may result in a more complete evaluation"; + case DATAREQUIRED: return "The request was processed, but more data is required to complete the evaluation"; + case INPROGRESS: return "The request is currently being processed"; + case FAILURE: return "The request was not processed successfully"; + case ENTEREDINERROR: return "The response was entered in error"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUCCESS: return "Success"; + case DATAREQUESTED: return "Data Requested"; + case DATAREQUIRED: return "Data Required"; + case INPROGRESS: return "In Progress"; + case FAILURE: return "Failure"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidanceResponseStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidanceResponseStatusEnumFactory.java new file mode 100644 index 00000000000..854b6527488 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidanceResponseStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GuidanceResponseStatusEnumFactory implements EnumFactory { + + public GuidanceResponseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("success".equals(codeString)) + return GuidanceResponseStatus.SUCCESS; + if ("data-requested".equals(codeString)) + return GuidanceResponseStatus.DATAREQUESTED; + if ("data-required".equals(codeString)) + return GuidanceResponseStatus.DATAREQUIRED; + if ("in-progress".equals(codeString)) + return GuidanceResponseStatus.INPROGRESS; + if ("failure".equals(codeString)) + return GuidanceResponseStatus.FAILURE; + if ("entered-in-error".equals(codeString)) + return GuidanceResponseStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown GuidanceResponseStatus code '"+codeString+"'"); + } + + public String toCode(GuidanceResponseStatus code) { + if (code == GuidanceResponseStatus.SUCCESS) + return "success"; + if (code == GuidanceResponseStatus.DATAREQUESTED) + return "data-requested"; + if (code == GuidanceResponseStatus.DATAREQUIRED) + return "data-required"; + if (code == GuidanceResponseStatus.INPROGRESS) + return "in-progress"; + if (code == GuidanceResponseStatus.FAILURE) + return "failure"; + if (code == GuidanceResponseStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(GuidanceResponseStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuideDependencyType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuideDependencyType.java new file mode 100644 index 00000000000..273e7fde592 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuideDependencyType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GuideDependencyType { + + /** + * The guide is referred to by URL. + */ + REFERENCE, + /** + * The guide is embedded in this guide when published. + */ + INCLUSION, + /** + * added to help the parsers + */ + NULL; + public static GuideDependencyType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("reference".equals(codeString)) + return REFERENCE; + if ("inclusion".equals(codeString)) + return INCLUSION; + throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REFERENCE: return "reference"; + case INCLUSION: return "inclusion"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/guide-dependency-type"; + } + public String getDefinition() { + switch (this) { + case REFERENCE: return "The guide is referred to by URL."; + case INCLUSION: return "The guide is embedded in this guide when published."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REFERENCE: return "Reference"; + case INCLUSION: return "Inclusion"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuideDependencyTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuideDependencyTypeEnumFactory.java new file mode 100644 index 00000000000..66b20aa2c6f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuideDependencyTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GuideDependencyTypeEnumFactory implements EnumFactory { + + public GuideDependencyType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("reference".equals(codeString)) + return GuideDependencyType.REFERENCE; + if ("inclusion".equals(codeString)) + return GuideDependencyType.INCLUSION; + throw new IllegalArgumentException("Unknown GuideDependencyType code '"+codeString+"'"); + } + + public String toCode(GuideDependencyType code) { + if (code == GuideDependencyType.REFERENCE) + return "reference"; + if (code == GuideDependencyType.INCLUSION) + return "inclusion"; + return "?"; + } + + public String toSystem(GuideDependencyType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidePageKind.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidePageKind.java new file mode 100644 index 00000000000..a44441d77d5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidePageKind.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum GuidePageKind { + + /** + * This is a page of content that is included in the implementation guide. It has no particular function. + */ + PAGE, + /** + * This is a page that represents a human readable rendering of an example. + */ + EXAMPLE, + /** + * This is a page that represents a list of resources of one or more types. + */ + LIST, + /** + * This is a page showing where an included guide is injected. + */ + INCLUDE, + /** + * This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section. + */ + DIRECTORY, + /** + * This is a page that creates the listed resources as a dictionary. + */ + DICTIONARY, + /** + * This is a generated page that contains the table of contents. + */ + TOC, + /** + * This is a page that represents a presented resource. This is typically used for generated conformance resource presentations. + */ + RESOURCE, + /** + * added to help the parsers + */ + NULL; + public static GuidePageKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("page".equals(codeString)) + return PAGE; + if ("example".equals(codeString)) + return EXAMPLE; + if ("list".equals(codeString)) + return LIST; + if ("include".equals(codeString)) + return INCLUDE; + if ("directory".equals(codeString)) + return DIRECTORY; + if ("dictionary".equals(codeString)) + return DICTIONARY; + if ("toc".equals(codeString)) + return TOC; + if ("resource".equals(codeString)) + return RESOURCE; + throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAGE: return "page"; + case EXAMPLE: return "example"; + case LIST: return "list"; + case INCLUDE: return "include"; + case DIRECTORY: return "directory"; + case DICTIONARY: return "dictionary"; + case TOC: return "toc"; + case RESOURCE: return "resource"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/guide-page-kind"; + } + public String getDefinition() { + switch (this) { + case PAGE: return "This is a page of content that is included in the implementation guide. It has no particular function."; + case EXAMPLE: return "This is a page that represents a human readable rendering of an example."; + case LIST: return "This is a page that represents a list of resources of one or more types."; + case INCLUDE: return "This is a page showing where an included guide is injected."; + case DIRECTORY: return "This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section."; + case DICTIONARY: return "This is a page that creates the listed resources as a dictionary."; + case TOC: return "This is a generated page that contains the table of contents."; + case RESOURCE: return "This is a page that represents a presented resource. This is typically used for generated conformance resource presentations."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAGE: return "Page"; + case EXAMPLE: return "Example"; + case LIST: return "List"; + case INCLUDE: return "Include"; + case DIRECTORY: return "Directory"; + case DICTIONARY: return "Dictionary"; + case TOC: return "Table Of Contents"; + case RESOURCE: return "Resource"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidePageKindEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidePageKindEnumFactory.java new file mode 100644 index 00000000000..5573a6a0cf0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/GuidePageKindEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class GuidePageKindEnumFactory implements EnumFactory { + + public GuidePageKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("page".equals(codeString)) + return GuidePageKind.PAGE; + if ("example".equals(codeString)) + return GuidePageKind.EXAMPLE; + if ("list".equals(codeString)) + return GuidePageKind.LIST; + if ("include".equals(codeString)) + return GuidePageKind.INCLUDE; + if ("directory".equals(codeString)) + return GuidePageKind.DIRECTORY; + if ("dictionary".equals(codeString)) + return GuidePageKind.DICTIONARY; + if ("toc".equals(codeString)) + return GuidePageKind.TOC; + if ("resource".equals(codeString)) + return GuidePageKind.RESOURCE; + throw new IllegalArgumentException("Unknown GuidePageKind code '"+codeString+"'"); + } + + public String toCode(GuidePageKind code) { + if (code == GuidePageKind.PAGE) + return "page"; + if (code == GuidePageKind.EXAMPLE) + return "example"; + if (code == GuidePageKind.LIST) + return "list"; + if (code == GuidePageKind.INCLUDE) + return "include"; + if (code == GuidePageKind.DIRECTORY) + return "directory"; + if (code == GuidePageKind.DICTIONARY) + return "dictionary"; + if (code == GuidePageKind.TOC) + return "toc"; + if (code == GuidePageKind.RESOURCE) + return "resource"; + return "?"; + } + + public String toSystem(GuidePageKind code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HandlingCondition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HandlingCondition.java new file mode 100644 index 00000000000..182b0058a3a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HandlingCondition.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum HandlingCondition { + + /** + * room temperature + */ + ROOM, + /** + * refrigerated temperature + */ + REFRIGERATED, + /** + * frozen temperature + */ + FROZEN, + /** + * added to help the parsers + */ + NULL; + public static HandlingCondition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("room".equals(codeString)) + return ROOM; + if ("refrigerated".equals(codeString)) + return REFRIGERATED; + if ("frozen".equals(codeString)) + return FROZEN; + throw new FHIRException("Unknown HandlingCondition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROOM: return "room"; + case REFRIGERATED: return "refrigerated"; + case FROZEN: return "frozen"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/handling-condition"; + } + public String getDefinition() { + switch (this) { + case ROOM: return "room temperature"; + case REFRIGERATED: return "refrigerated temperature"; + case FROZEN: return "frozen temperature"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROOM: return "room temperature"; + case REFRIGERATED: return "refrigerated"; + case FROZEN: return "frozen"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HandlingConditionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HandlingConditionEnumFactory.java new file mode 100644 index 00000000000..59504f70a5d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HandlingConditionEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class HandlingConditionEnumFactory implements EnumFactory { + + public HandlingCondition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("room".equals(codeString)) + return HandlingCondition.ROOM; + if ("refrigerated".equals(codeString)) + return HandlingCondition.REFRIGERATED; + if ("frozen".equals(codeString)) + return HandlingCondition.FROZEN; + throw new IllegalArgumentException("Unknown HandlingCondition code '"+codeString+"'"); + } + + public String toCode(HandlingCondition code) { + if (code == HandlingCondition.ROOM) + return "room"; + if (code == HandlingCondition.REFRIGERATED) + return "refrigerated"; + if (code == HandlingCondition.FROZEN) + return "frozen"; + return "?"; + } + + public String toSystem(HandlingCondition code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryAbsentReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryAbsentReason.java new file mode 100644 index 00000000000..9a95aa54f0f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryAbsentReason.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum HistoryAbsentReason { + + /** + * Patient does not know the subject, e.g. the biological parent of an adopted patient. + */ + SUBJECTUNKNOWN, + /** + * The patient withheld or refused to share the information. + */ + WITHHELD, + /** + * Information cannot be obtained; e.g. unconscious patient + */ + UNABLETOOBTAIN, + /** + * Patient does not have the information now, but can provide the information at a later date. + */ + DEFERRED, + /** + * added to help the parsers + */ + NULL; + public static HistoryAbsentReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("subject-unknown".equals(codeString)) + return SUBJECTUNKNOWN; + if ("withheld".equals(codeString)) + return WITHHELD; + if ("unable-to-obtain".equals(codeString)) + return UNABLETOOBTAIN; + if ("deferred".equals(codeString)) + return DEFERRED; + throw new FHIRException("Unknown HistoryAbsentReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUBJECTUNKNOWN: return "subject-unknown"; + case WITHHELD: return "withheld"; + case UNABLETOOBTAIN: return "unable-to-obtain"; + case DEFERRED: return "deferred"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/history-absent-reason"; + } + public String getDefinition() { + switch (this) { + case SUBJECTUNKNOWN: return "Patient does not know the subject, e.g. the biological parent of an adopted patient."; + case WITHHELD: return "The patient withheld or refused to share the information."; + case UNABLETOOBTAIN: return "Information cannot be obtained; e.g. unconscious patient"; + case DEFERRED: return "Patient does not have the information now, but can provide the information at a later date."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUBJECTUNKNOWN: return "Subject Unknown"; + case WITHHELD: return "Information Withheld"; + case UNABLETOOBTAIN: return "Unable To Obtain"; + case DEFERRED: return "Deferred"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryAbsentReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryAbsentReasonEnumFactory.java new file mode 100644 index 00000000000..cd2c01bb91c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryAbsentReasonEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class HistoryAbsentReasonEnumFactory implements EnumFactory { + + public HistoryAbsentReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("subject-unknown".equals(codeString)) + return HistoryAbsentReason.SUBJECTUNKNOWN; + if ("withheld".equals(codeString)) + return HistoryAbsentReason.WITHHELD; + if ("unable-to-obtain".equals(codeString)) + return HistoryAbsentReason.UNABLETOOBTAIN; + if ("deferred".equals(codeString)) + return HistoryAbsentReason.DEFERRED; + throw new IllegalArgumentException("Unknown HistoryAbsentReason code '"+codeString+"'"); + } + + public String toCode(HistoryAbsentReason code) { + if (code == HistoryAbsentReason.SUBJECTUNKNOWN) + return "subject-unknown"; + if (code == HistoryAbsentReason.WITHHELD) + return "withheld"; + if (code == HistoryAbsentReason.UNABLETOOBTAIN) + return "unable-to-obtain"; + if (code == HistoryAbsentReason.DEFERRED) + return "deferred"; + return "?"; + } + + public String toSystem(HistoryAbsentReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryStatus.java new file mode 100644 index 00000000000..44ea6622acb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum HistoryStatus { + + /** + * Some health information is known and captured, but not complete - see notes for details. + */ + PARTIAL, + /** + * All available related health information is captured as of the date (and possibly time) when the family member history was taken. + */ + COMPLETED, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * Health information for this individual is unavailable/unknown. + */ + HEALTHUNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static HistoryStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("partial".equals(codeString)) + return PARTIAL; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("health-unknown".equals(codeString)) + return HEALTHUNKNOWN; + throw new FHIRException("Unknown HistoryStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PARTIAL: return "partial"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case HEALTHUNKNOWN: return "health-unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/history-status"; + } + public String getDefinition() { + switch (this) { + case PARTIAL: return "Some health information is known and captured, but not complete - see notes for details."; + case COMPLETED: return "All available related health information is captured as of the date (and possibly time) when the family member history was taken."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + case HEALTHUNKNOWN: return "Health information for this individual is unavailable/unknown."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PARTIAL: return "Partial"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in error"; + case HEALTHUNKNOWN: return "Health unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryStatusEnumFactory.java new file mode 100644 index 00000000000..2a6694f5dd5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HistoryStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class HistoryStatusEnumFactory implements EnumFactory { + + public HistoryStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("partial".equals(codeString)) + return HistoryStatus.PARTIAL; + if ("completed".equals(codeString)) + return HistoryStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return HistoryStatus.ENTEREDINERROR; + if ("health-unknown".equals(codeString)) + return HistoryStatus.HEALTHUNKNOWN; + throw new IllegalArgumentException("Unknown HistoryStatus code '"+codeString+"'"); + } + + public String toCode(HistoryStatus code) { + if (code == HistoryStatus.PARTIAL) + return "partial"; + if (code == HistoryStatus.COMPLETED) + return "completed"; + if (code == HistoryStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == HistoryStatus.HEALTHUNKNOWN) + return "health-unknown"; + return "?"; + } + + public String toSystem(HistoryStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Hl7WorkGroup.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Hl7WorkGroup.java new file mode 100644 index 00000000000..7ac4958e4cf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Hl7WorkGroup.java @@ -0,0 +1,276 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Hl7WorkGroup { + + /** + * Community Based Collaborative Care (http://www.hl7.org/Special/committees/cbcc/index.cfm) + */ + CBCC, + /** + * Clinical Decision Support (http://www.hl7.org/Special/committees/dss/index.cfm) + */ + CDS, + /** + * Clinical Quality Information (http://www.hl7.org/Special/committees/cqi/index.cfm) + */ + CQI, + /** + * Clinical Genomics (http://www.hl7.org/Special/committees/clingenomics/index.cfm) + */ + CG, + /** + * Health Care Devices (http://www.hl7.org/Special/committees/healthcaredevices/index.cfm) + */ + DEV, + /** + * Electronic Health Records (http://www.hl7.org/special/committees/ehr/index.cfm) + */ + EHR, + /** + * FHIR Infrastructure (http://www.hl7.org/Special/committees/fiwg/index.cfm) + */ + FHIR, + /** + * Financial Management (http://www.hl7.org/Special/committees/fm/index.cfm) + */ + FM, + /** + * Health Standards Integration (http://www.hl7.org/Special/committees/hsi/index.cfm) + */ + HSI, + /** + * Imaging Integration (http://www.hl7.org/Special/committees/imagemgt/index.cfm) + */ + II, + /** + * Infrastructure And Messaging (http://www.hl7.org/special/committees/inm/index.cfm) + */ + INM, + /** + * Implementable Technology Specifications (http://www.hl7.org/special/committees/xml/index.cfm) + */ + ITS, + /** + * Orders and Observations (http://www.hl7.org/Special/committees/orders/index.cfm) + */ + OO, + /** + * Patient Administration (http://www.hl7.org/Special/committees/pafm/index.cfm) + */ + PA, + /** + * Patient Care (http://www.hl7.org/Special/committees/patientcare/index.cfm) + */ + PC, + /** + * Public Health and Emergency Response (http://www.hl7.org/Special/committees/pher/index.cfm) + */ + PHER, + /** + * Pharmacy (http://www.hl7.org/Special/committees/medication/index.cfm) + */ + PHX, + /** + * Regulated Clinical Research Information Management (http://www.hl7.org/Special/committees/rcrim/index.cfm) + */ + RCRIM, + /** + * Structured Documents (http://www.hl7.org/Special/committees/structure/index.cfm) + */ + SD, + /** + * Security (http://www.hl7.org/Special/committees/secure/index.cfm) + */ + SEC, + /** + * US Realm Taskforce (http://wiki.hl7.org/index.php?title=US_Realm_Task_Force) + */ + US, + /** + * Vocabulary (http://www.hl7.org/Special/committees/Vocab/index.cfm) + */ + VOCAB, + /** + * Application Implementation and Design (http://www.hl7.org/Special/committees/java/index.cfm) + */ + AID, + /** + * added to help the parsers + */ + NULL; + public static Hl7WorkGroup fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cbcc".equals(codeString)) + return CBCC; + if ("cds".equals(codeString)) + return CDS; + if ("cqi".equals(codeString)) + return CQI; + if ("cg".equals(codeString)) + return CG; + if ("dev".equals(codeString)) + return DEV; + if ("ehr".equals(codeString)) + return EHR; + if ("fhir".equals(codeString)) + return FHIR; + if ("fm".equals(codeString)) + return FM; + if ("hsi".equals(codeString)) + return HSI; + if ("ii".equals(codeString)) + return II; + if ("inm".equals(codeString)) + return INM; + if ("its".equals(codeString)) + return ITS; + if ("oo".equals(codeString)) + return OO; + if ("pa".equals(codeString)) + return PA; + if ("pc".equals(codeString)) + return PC; + if ("pher".equals(codeString)) + return PHER; + if ("phx".equals(codeString)) + return PHX; + if ("rcrim".equals(codeString)) + return RCRIM; + if ("sd".equals(codeString)) + return SD; + if ("sec".equals(codeString)) + return SEC; + if ("us".equals(codeString)) + return US; + if ("vocab".equals(codeString)) + return VOCAB; + if ("aid".equals(codeString)) + return AID; + throw new FHIRException("Unknown Hl7WorkGroup code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CBCC: return "cbcc"; + case CDS: return "cds"; + case CQI: return "cqi"; + case CG: return "cg"; + case DEV: return "dev"; + case EHR: return "ehr"; + case FHIR: return "fhir"; + case FM: return "fm"; + case HSI: return "hsi"; + case II: return "ii"; + case INM: return "inm"; + case ITS: return "its"; + case OO: return "oo"; + case PA: return "pa"; + case PC: return "pc"; + case PHER: return "pher"; + case PHX: return "phx"; + case RCRIM: return "rcrim"; + case SD: return "sd"; + case SEC: return "sec"; + case US: return "us"; + case VOCAB: return "vocab"; + case AID: return "aid"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/hl7-work-group"; + } + public String getDefinition() { + switch (this) { + case CBCC: return "Community Based Collaborative Care (http://www.hl7.org/Special/committees/cbcc/index.cfm)"; + case CDS: return "Clinical Decision Support (http://www.hl7.org/Special/committees/dss/index.cfm)"; + case CQI: return "Clinical Quality Information (http://www.hl7.org/Special/committees/cqi/index.cfm)"; + case CG: return "Clinical Genomics (http://www.hl7.org/Special/committees/clingenomics/index.cfm)"; + case DEV: return "Health Care Devices (http://www.hl7.org/Special/committees/healthcaredevices/index.cfm)"; + case EHR: return "Electronic Health Records (http://www.hl7.org/special/committees/ehr/index.cfm)"; + case FHIR: return "FHIR Infrastructure (http://www.hl7.org/Special/committees/fiwg/index.cfm)"; + case FM: return "Financial Management (http://www.hl7.org/Special/committees/fm/index.cfm)"; + case HSI: return "Health Standards Integration (http://www.hl7.org/Special/committees/hsi/index.cfm)"; + case II: return "Imaging Integration (http://www.hl7.org/Special/committees/imagemgt/index.cfm)"; + case INM: return "Infrastructure And Messaging (http://www.hl7.org/special/committees/inm/index.cfm)"; + case ITS: return "Implementable Technology Specifications (http://www.hl7.org/special/committees/xml/index.cfm)"; + case OO: return "Orders and Observations (http://www.hl7.org/Special/committees/orders/index.cfm)"; + case PA: return "Patient Administration (http://www.hl7.org/Special/committees/pafm/index.cfm)"; + case PC: return "Patient Care (http://www.hl7.org/Special/committees/patientcare/index.cfm)"; + case PHER: return "Public Health and Emergency Response (http://www.hl7.org/Special/committees/pher/index.cfm)"; + case PHX: return "Pharmacy (http://www.hl7.org/Special/committees/medication/index.cfm)"; + case RCRIM: return "Regulated Clinical Research Information Management (http://www.hl7.org/Special/committees/rcrim/index.cfm)"; + case SD: return "Structured Documents (http://www.hl7.org/Special/committees/structure/index.cfm)"; + case SEC: return "Security (http://www.hl7.org/Special/committees/secure/index.cfm)"; + case US: return "US Realm Taskforce (http://wiki.hl7.org/index.php?title=US_Realm_Task_Force)"; + case VOCAB: return "Vocabulary (http://www.hl7.org/Special/committees/Vocab/index.cfm)"; + case AID: return "Application Implementation and Design (http://www.hl7.org/Special/committees/java/index.cfm)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CBCC: return "Community Based Collaborative Care"; + case CDS: return "Clinical Decision Support"; + case CQI: return "Clinical Quality Information"; + case CG: return "Clinical Genomics"; + case DEV: return "Health Care Devices"; + case EHR: return "Electronic Health Records"; + case FHIR: return "FHIR Infrastructure"; + case FM: return "Financial Management"; + case HSI: return "Health Standards Integration"; + case II: return "Imaging Integration"; + case INM: return "Infrastructure And Messaging"; + case ITS: return "Implementable Technology Specifications"; + case OO: return "Orders and Observations"; + case PA: return "Patient Administration"; + case PC: return "Patient Care"; + case PHER: return "Public Health and Emergency Response"; + case PHX: return "Pharmacy"; + case RCRIM: return "Regulated Clinical Research Information Management"; + case SD: return "Structured Documents"; + case SEC: return "Security"; + case US: return "US Realm Taskforce"; + case VOCAB: return "Vocabulary"; + case AID: return "Application Implementation and Design"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Hl7WorkGroupEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Hl7WorkGroupEnumFactory.java new file mode 100644 index 00000000000..0bbc10308a5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Hl7WorkGroupEnumFactory.java @@ -0,0 +1,146 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class Hl7WorkGroupEnumFactory implements EnumFactory { + + public Hl7WorkGroup fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cbcc".equals(codeString)) + return Hl7WorkGroup.CBCC; + if ("cds".equals(codeString)) + return Hl7WorkGroup.CDS; + if ("cqi".equals(codeString)) + return Hl7WorkGroup.CQI; + if ("cg".equals(codeString)) + return Hl7WorkGroup.CG; + if ("dev".equals(codeString)) + return Hl7WorkGroup.DEV; + if ("ehr".equals(codeString)) + return Hl7WorkGroup.EHR; + if ("fhir".equals(codeString)) + return Hl7WorkGroup.FHIR; + if ("fm".equals(codeString)) + return Hl7WorkGroup.FM; + if ("hsi".equals(codeString)) + return Hl7WorkGroup.HSI; + if ("ii".equals(codeString)) + return Hl7WorkGroup.II; + if ("inm".equals(codeString)) + return Hl7WorkGroup.INM; + if ("its".equals(codeString)) + return Hl7WorkGroup.ITS; + if ("oo".equals(codeString)) + return Hl7WorkGroup.OO; + if ("pa".equals(codeString)) + return Hl7WorkGroup.PA; + if ("pc".equals(codeString)) + return Hl7WorkGroup.PC; + if ("pher".equals(codeString)) + return Hl7WorkGroup.PHER; + if ("phx".equals(codeString)) + return Hl7WorkGroup.PHX; + if ("rcrim".equals(codeString)) + return Hl7WorkGroup.RCRIM; + if ("sd".equals(codeString)) + return Hl7WorkGroup.SD; + if ("sec".equals(codeString)) + return Hl7WorkGroup.SEC; + if ("us".equals(codeString)) + return Hl7WorkGroup.US; + if ("vocab".equals(codeString)) + return Hl7WorkGroup.VOCAB; + if ("aid".equals(codeString)) + return Hl7WorkGroup.AID; + throw new IllegalArgumentException("Unknown Hl7WorkGroup code '"+codeString+"'"); + } + + public String toCode(Hl7WorkGroup code) { + if (code == Hl7WorkGroup.CBCC) + return "cbcc"; + if (code == Hl7WorkGroup.CDS) + return "cds"; + if (code == Hl7WorkGroup.CQI) + return "cqi"; + if (code == Hl7WorkGroup.CG) + return "cg"; + if (code == Hl7WorkGroup.DEV) + return "dev"; + if (code == Hl7WorkGroup.EHR) + return "ehr"; + if (code == Hl7WorkGroup.FHIR) + return "fhir"; + if (code == Hl7WorkGroup.FM) + return "fm"; + if (code == Hl7WorkGroup.HSI) + return "hsi"; + if (code == Hl7WorkGroup.II) + return "ii"; + if (code == Hl7WorkGroup.INM) + return "inm"; + if (code == Hl7WorkGroup.ITS) + return "its"; + if (code == Hl7WorkGroup.OO) + return "oo"; + if (code == Hl7WorkGroup.PA) + return "pa"; + if (code == Hl7WorkGroup.PC) + return "pc"; + if (code == Hl7WorkGroup.PHER) + return "pher"; + if (code == Hl7WorkGroup.PHX) + return "phx"; + if (code == Hl7WorkGroup.RCRIM) + return "rcrim"; + if (code == Hl7WorkGroup.SD) + return "sd"; + if (code == Hl7WorkGroup.SEC) + return "sec"; + if (code == Hl7WorkGroup.US) + return "us"; + if (code == Hl7WorkGroup.VOCAB) + return "vocab"; + if (code == Hl7WorkGroup.AID) + return "aid"; + return "?"; + } + + public String toSystem(Hl7WorkGroup code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpOperations.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpOperations.java new file mode 100644 index 00000000000..10a8f3f8b7d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpOperations.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum HttpOperations { + + /** + * HTTP DELETE operation + */ + DELETE, + /** + * HTTP GET operation + */ + GET, + /** + * HTTP OPTIONS operation + */ + OPTIONS, + /** + * HTTP PATCH operation + */ + PATCH, + /** + * HTTP POST operation + */ + POST, + /** + * HTTP PUT operation + */ + PUT, + /** + * added to help the parsers + */ + NULL; + public static HttpOperations fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("delete".equals(codeString)) + return DELETE; + if ("get".equals(codeString)) + return GET; + if ("options".equals(codeString)) + return OPTIONS; + if ("patch".equals(codeString)) + return PATCH; + if ("post".equals(codeString)) + return POST; + if ("put".equals(codeString)) + return PUT; + throw new FHIRException("Unknown HttpOperations code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DELETE: return "delete"; + case GET: return "get"; + case OPTIONS: return "options"; + case PATCH: return "patch"; + case POST: return "post"; + case PUT: return "put"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/http-operations"; + } + public String getDefinition() { + switch (this) { + case DELETE: return "HTTP DELETE operation"; + case GET: return "HTTP GET operation"; + case OPTIONS: return "HTTP OPTIONS operation"; + case PATCH: return "HTTP PATCH operation"; + case POST: return "HTTP POST operation"; + case PUT: return "HTTP PUT operation"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DELETE: return "DELETE"; + case GET: return "GET"; + case OPTIONS: return "OPTIONS"; + case PATCH: return "PATCH"; + case POST: return "POST"; + case PUT: return "PUT"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpOperationsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpOperationsEnumFactory.java new file mode 100644 index 00000000000..0a4505a73e1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpOperationsEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class HttpOperationsEnumFactory implements EnumFactory { + + public HttpOperations fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("delete".equals(codeString)) + return HttpOperations.DELETE; + if ("get".equals(codeString)) + return HttpOperations.GET; + if ("options".equals(codeString)) + return HttpOperations.OPTIONS; + if ("patch".equals(codeString)) + return HttpOperations.PATCH; + if ("post".equals(codeString)) + return HttpOperations.POST; + if ("put".equals(codeString)) + return HttpOperations.PUT; + throw new IllegalArgumentException("Unknown HttpOperations code '"+codeString+"'"); + } + + public String toCode(HttpOperations code) { + if (code == HttpOperations.DELETE) + return "delete"; + if (code == HttpOperations.GET) + return "get"; + if (code == HttpOperations.OPTIONS) + return "options"; + if (code == HttpOperations.PATCH) + return "patch"; + if (code == HttpOperations.POST) + return "post"; + if (code == HttpOperations.PUT) + return "put"; + return "?"; + } + + public String toSystem(HttpOperations code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpVerb.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpVerb.java new file mode 100644 index 00000000000..88778c28e55 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpVerb.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum HttpVerb { + + /** + * HTTP GET + */ + GET, + /** + * HTTP POST + */ + POST, + /** + * HTTP PUT + */ + PUT, + /** + * HTTP DELETE + */ + DELETE, + /** + * added to help the parsers + */ + NULL; + public static HttpVerb fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GET".equals(codeString)) + return GET; + if ("POST".equals(codeString)) + return POST; + if ("PUT".equals(codeString)) + return PUT; + if ("DELETE".equals(codeString)) + return DELETE; + throw new FHIRException("Unknown HttpVerb code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GET: return "GET"; + case POST: return "POST"; + case PUT: return "PUT"; + case DELETE: return "DELETE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/http-verb"; + } + public String getDefinition() { + switch (this) { + case GET: return "HTTP GET"; + case POST: return "HTTP POST"; + case PUT: return "HTTP PUT"; + case DELETE: return "HTTP DELETE"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GET: return "GET"; + case POST: return "POST"; + case PUT: return "PUT"; + case DELETE: return "DELETE"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpVerbEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpVerbEnumFactory.java new file mode 100644 index 00000000000..8496b014a71 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/HttpVerbEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class HttpVerbEnumFactory implements EnumFactory { + + public HttpVerb fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GET".equals(codeString)) + return HttpVerb.GET; + if ("POST".equals(codeString)) + return HttpVerb.POST; + if ("PUT".equals(codeString)) + return HttpVerb.PUT; + if ("DELETE".equals(codeString)) + return HttpVerb.DELETE; + throw new IllegalArgumentException("Unknown HttpVerb code '"+codeString+"'"); + } + + public String toCode(HttpVerb code) { + if (code == HttpVerb.GET) + return "GET"; + if (code == HttpVerb.POST) + return "POST"; + if (code == HttpVerb.PUT) + return "PUT"; + if (code == HttpVerb.DELETE) + return "DELETE"; + return "?"; + } + + public String toSystem(HttpVerb code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Icd10Procedures.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Icd10Procedures.java new file mode 100644 index 00000000000..5bc8a83fcfc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Icd10Procedures.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Icd10Procedures { + + /** + * Procedure 1 + */ + _123001, + /** + * Procedure 2 + */ + _123002, + /** + * Procedure 3 + */ + _123003, + /** + * added to help the parsers + */ + NULL; + public static Icd10Procedures fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("123001".equals(codeString)) + return _123001; + if ("123002".equals(codeString)) + return _123002; + if ("123003".equals(codeString)) + return _123003; + throw new FHIRException("Unknown Icd10Procedures code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _123001: return "123001"; + case _123002: return "123002"; + case _123003: return "123003"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/sid/ex-icd-10-procedures"; + } + public String getDefinition() { + switch (this) { + case _123001: return "Procedure 1"; + case _123002: return "Procedure 2"; + case _123003: return "Procedure 3"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _123001: return "PROC-1"; + case _123002: return "PROC-2"; + case _123003: return "PROC-3"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Icd10ProceduresEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Icd10ProceduresEnumFactory.java new file mode 100644 index 00000000000..4e5702d0f69 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Icd10ProceduresEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class Icd10ProceduresEnumFactory implements EnumFactory { + + public Icd10Procedures fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("123001".equals(codeString)) + return Icd10Procedures._123001; + if ("123002".equals(codeString)) + return Icd10Procedures._123002; + if ("123003".equals(codeString)) + return Icd10Procedures._123003; + throw new IllegalArgumentException("Unknown Icd10Procedures code '"+codeString+"'"); + } + + public String toCode(Icd10Procedures code) { + if (code == Icd10Procedures._123001) + return "123001"; + if (code == Icd10Procedures._123002) + return "123002"; + if (code == Icd10Procedures._123003) + return "123003"; + return "?"; + } + + public String toSystem(Icd10Procedures code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierType.java new file mode 100644 index 00000000000..d94203cdf11 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum IdentifierType { + + /** + * A identifier assigned to a device using the Universal Device Identifier framework as defined by FDA (http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/). + */ + UDI, + /** + * An identifier affixed to an item by the manufacturer when it is first made, where each item has a different identifier. + */ + SNO, + /** + * An identifier issued by a governmental organization to an individual for the purpose of the receipt of social services and benefits. + */ + SB, + /** + * The identifier associated with the person or service that requests or places an order. + */ + PLAC, + /** + * The Identifier associated with the person, or service, who produces the observations or fulfills the order requested by the requestor. + */ + FILL, + /** + * added to help the parsers + */ + NULL; + public static IdentifierType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("UDI".equals(codeString)) + return UDI; + if ("SNO".equals(codeString)) + return SNO; + if ("SB".equals(codeString)) + return SB; + if ("PLAC".equals(codeString)) + return PLAC; + if ("FILL".equals(codeString)) + return FILL; + throw new FHIRException("Unknown IdentifierType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UDI: return "UDI"; + case SNO: return "SNO"; + case SB: return "SB"; + case PLAC: return "PLAC"; + case FILL: return "FILL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/identifier-type"; + } + public String getDefinition() { + switch (this) { + case UDI: return "A identifier assigned to a device using the Universal Device Identifier framework as defined by FDA (http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/)."; + case SNO: return "An identifier affixed to an item by the manufacturer when it is first made, where each item has a different identifier."; + case SB: return "An identifier issued by a governmental organization to an individual for the purpose of the receipt of social services and benefits."; + case PLAC: return "The identifier associated with the person or service that requests or places an order."; + case FILL: return "The Identifier associated with the person, or service, who produces the observations or fulfills the order requested by the requestor."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UDI: return "Universal Device Identifier"; + case SNO: return "Serial Number"; + case SB: return "Social Beneficiary Identifier"; + case PLAC: return "Placer Identifier"; + case FILL: return "Filler Identifier"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierTypeEnumFactory.java new file mode 100644 index 00000000000..636f08f6c57 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class IdentifierTypeEnumFactory implements EnumFactory { + + public IdentifierType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("UDI".equals(codeString)) + return IdentifierType.UDI; + if ("SNO".equals(codeString)) + return IdentifierType.SNO; + if ("SB".equals(codeString)) + return IdentifierType.SB; + if ("PLAC".equals(codeString)) + return IdentifierType.PLAC; + if ("FILL".equals(codeString)) + return IdentifierType.FILL; + throw new IllegalArgumentException("Unknown IdentifierType code '"+codeString+"'"); + } + + public String toCode(IdentifierType code) { + if (code == IdentifierType.UDI) + return "UDI"; + if (code == IdentifierType.SNO) + return "SNO"; + if (code == IdentifierType.SB) + return "SB"; + if (code == IdentifierType.PLAC) + return "PLAC"; + if (code == IdentifierType.FILL) + return "FILL"; + return "?"; + } + + public String toSystem(IdentifierType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierUse.java new file mode 100644 index 00000000000..e734846395b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierUse.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum IdentifierUse { + + /** + * The identifier recommended for display and use in real-world interactions. + */ + USUAL, + /** + * The identifier considered to be most trusted for the identification of this item. + */ + OFFICIAL, + /** + * A temporary identifier. + */ + TEMP, + /** + * An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context. + */ + SECONDARY, + /** + * added to help the parsers + */ + NULL; + public static IdentifierUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return USUAL; + if ("official".equals(codeString)) + return OFFICIAL; + if ("temp".equals(codeString)) + return TEMP; + if ("secondary".equals(codeString)) + return SECONDARY; + throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case USUAL: return "usual"; + case OFFICIAL: return "official"; + case TEMP: return "temp"; + case SECONDARY: return "secondary"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/identifier-use"; + } + public String getDefinition() { + switch (this) { + case USUAL: return "The identifier recommended for display and use in real-world interactions."; + case OFFICIAL: return "The identifier considered to be most trusted for the identification of this item."; + case TEMP: return "A temporary identifier."; + case SECONDARY: return "An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case USUAL: return "Usual"; + case OFFICIAL: return "Official"; + case TEMP: return "Temp"; + case SECONDARY: return "Secondary"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierUseEnumFactory.java new file mode 100644 index 00000000000..fe1edef4d6e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentifierUseEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class IdentifierUseEnumFactory implements EnumFactory { + + public IdentifierUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return IdentifierUse.USUAL; + if ("official".equals(codeString)) + return IdentifierUse.OFFICIAL; + if ("temp".equals(codeString)) + return IdentifierUse.TEMP; + if ("secondary".equals(codeString)) + return IdentifierUse.SECONDARY; + throw new IllegalArgumentException("Unknown IdentifierUse code '"+codeString+"'"); + } + + public String toCode(IdentifierUse code) { + if (code == IdentifierUse.USUAL) + return "usual"; + if (code == IdentifierUse.OFFICIAL) + return "official"; + if (code == IdentifierUse.TEMP) + return "temp"; + if (code == IdentifierUse.SECONDARY) + return "secondary"; + return "?"; + } + + public String toSystem(IdentifierUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentityAssuranceLevel.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentityAssuranceLevel.java new file mode 100644 index 00000000000..92cf3e25ade --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentityAssuranceLevel.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum IdentityAssuranceLevel { + + /** + * Little or no confidence in the asserted identity's accuracy. + */ + LEVEL1, + /** + * Some confidence in the asserted identity's accuracy. + */ + LEVEL2, + /** + * High confidence in the asserted identity's accuracy. + */ + LEVEL3, + /** + * Very high confidence in the asserted identity's accuracy. + */ + LEVEL4, + /** + * added to help the parsers + */ + NULL; + public static IdentityAssuranceLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("level1".equals(codeString)) + return LEVEL1; + if ("level2".equals(codeString)) + return LEVEL2; + if ("level3".equals(codeString)) + return LEVEL3; + if ("level4".equals(codeString)) + return LEVEL4; + throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LEVEL1: return "level1"; + case LEVEL2: return "level2"; + case LEVEL3: return "level3"; + case LEVEL4: return "level4"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/identity-assuranceLevel"; + } + public String getDefinition() { + switch (this) { + case LEVEL1: return "Little or no confidence in the asserted identity's accuracy."; + case LEVEL2: return "Some confidence in the asserted identity's accuracy."; + case LEVEL3: return "High confidence in the asserted identity's accuracy."; + case LEVEL4: return "Very high confidence in the asserted identity's accuracy."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LEVEL1: return "Level 1"; + case LEVEL2: return "Level 2"; + case LEVEL3: return "Level 3"; + case LEVEL4: return "Level 4"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentityAssuranceLevelEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentityAssuranceLevelEnumFactory.java new file mode 100644 index 00000000000..2a4ea2b2b4a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IdentityAssuranceLevelEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class IdentityAssuranceLevelEnumFactory implements EnumFactory { + + public IdentityAssuranceLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("level1".equals(codeString)) + return IdentityAssuranceLevel.LEVEL1; + if ("level2".equals(codeString)) + return IdentityAssuranceLevel.LEVEL2; + if ("level3".equals(codeString)) + return IdentityAssuranceLevel.LEVEL3; + if ("level4".equals(codeString)) + return IdentityAssuranceLevel.LEVEL4; + throw new IllegalArgumentException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); + } + + public String toCode(IdentityAssuranceLevel code) { + if (code == IdentityAssuranceLevel.LEVEL1) + return "level1"; + if (code == IdentityAssuranceLevel.LEVEL2) + return "level2"; + if (code == IdentityAssuranceLevel.LEVEL3) + return "level3"; + if (code == IdentityAssuranceLevel.LEVEL4) + return "level4"; + return "?"; + } + + public String toSystem(IdentityAssuranceLevel code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationOrigin.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationOrigin.java new file mode 100644 index 00000000000..92bc26ba10c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationOrigin.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ImmunizationOrigin { + + /** + * The data for the immunization event originated with another provider. + */ + PROVIDER, + /** + * The data for the immunization event originated with a written record for the patient. + */ + RECORD, + /** + * The data for the immunization event originated from the recollection of the patient or parent/guardian of the patient. + */ + RECALL, + /** + * The data for the immunization event originated with a school record for the patient. + */ + SCHOOL, + /** + * added to help the parsers + */ + NULL; + public static ImmunizationOrigin fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("provider".equals(codeString)) + return PROVIDER; + if ("record".equals(codeString)) + return RECORD; + if ("recall".equals(codeString)) + return RECALL; + if ("school".equals(codeString)) + return SCHOOL; + throw new FHIRException("Unknown ImmunizationOrigin code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROVIDER: return "provider"; + case RECORD: return "record"; + case RECALL: return "recall"; + case SCHOOL: return "school"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/immunization-origin"; + } + public String getDefinition() { + switch (this) { + case PROVIDER: return "The data for the immunization event originated with another provider."; + case RECORD: return "The data for the immunization event originated with a written record for the patient."; + case RECALL: return "The data for the immunization event originated from the recollection of the patient or parent/guardian of the patient."; + case SCHOOL: return "The data for the immunization event originated with a school record for the patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROVIDER: return "Other Provider"; + case RECORD: return "Written Record"; + case RECALL: return "Parent/Guardian/Patient Recall"; + case SCHOOL: return "School Record"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationOriginEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationOriginEnumFactory.java new file mode 100644 index 00000000000..e0cd19b70c7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationOriginEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ImmunizationOriginEnumFactory implements EnumFactory { + + public ImmunizationOrigin fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("provider".equals(codeString)) + return ImmunizationOrigin.PROVIDER; + if ("record".equals(codeString)) + return ImmunizationOrigin.RECORD; + if ("recall".equals(codeString)) + return ImmunizationOrigin.RECALL; + if ("school".equals(codeString)) + return ImmunizationOrigin.SCHOOL; + throw new IllegalArgumentException("Unknown ImmunizationOrigin code '"+codeString+"'"); + } + + public String toCode(ImmunizationOrigin code) { + if (code == ImmunizationOrigin.PROVIDER) + return "provider"; + if (code == ImmunizationOrigin.RECORD) + return "record"; + if (code == ImmunizationOrigin.RECALL) + return "recall"; + if (code == ImmunizationOrigin.SCHOOL) + return "school"; + return "?"; + } + + public String toSystem(ImmunizationOrigin code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationDateCriterion.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationDateCriterion.java new file mode 100644 index 00000000000..aef6db57d2a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationDateCriterion.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ImmunizationRecommendationDateCriterion { + + /** + * Date the next dose is considered due. + */ + DUE, + /** + * At the recommended date. + */ + RECOMMENDED, + /** + * As early as possible. + */ + EARLIEST, + /** + * Date the next dose is considered overdue. + */ + OVERDUE, + /** + * The latest date the next dose is to be given. + */ + LATEST, + /** + * added to help the parsers + */ + NULL; + public static ImmunizationRecommendationDateCriterion fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return DUE; + if ("recommended".equals(codeString)) + return RECOMMENDED; + if ("earliest".equals(codeString)) + return EARLIEST; + if ("overdue".equals(codeString)) + return OVERDUE; + if ("latest".equals(codeString)) + return LATEST; + throw new FHIRException("Unknown ImmunizationRecommendationDateCriterion code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DUE: return "due"; + case RECOMMENDED: return "recommended"; + case EARLIEST: return "earliest"; + case OVERDUE: return "overdue"; + case LATEST: return "latest"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/immunization-recommendation-date-criterion"; + } + public String getDefinition() { + switch (this) { + case DUE: return "Date the next dose is considered due."; + case RECOMMENDED: return "At the recommended date."; + case EARLIEST: return "As early as possible."; + case OVERDUE: return "Date the next dose is considered overdue."; + case LATEST: return "The latest date the next dose is to be given."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DUE: return "Due"; + case RECOMMENDED: return "Recommended"; + case EARLIEST: return "Earliest Date"; + case OVERDUE: return "Past Due Date"; + case LATEST: return "Latest"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationDateCriterionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationDateCriterionEnumFactory.java new file mode 100644 index 00000000000..64f58851244 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationDateCriterionEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ImmunizationRecommendationDateCriterionEnumFactory implements EnumFactory { + + public ImmunizationRecommendationDateCriterion fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return ImmunizationRecommendationDateCriterion.DUE; + if ("recommended".equals(codeString)) + return ImmunizationRecommendationDateCriterion.RECOMMENDED; + if ("earliest".equals(codeString)) + return ImmunizationRecommendationDateCriterion.EARLIEST; + if ("overdue".equals(codeString)) + return ImmunizationRecommendationDateCriterion.OVERDUE; + if ("latest".equals(codeString)) + return ImmunizationRecommendationDateCriterion.LATEST; + throw new IllegalArgumentException("Unknown ImmunizationRecommendationDateCriterion code '"+codeString+"'"); + } + + public String toCode(ImmunizationRecommendationDateCriterion code) { + if (code == ImmunizationRecommendationDateCriterion.DUE) + return "due"; + if (code == ImmunizationRecommendationDateCriterion.RECOMMENDED) + return "recommended"; + if (code == ImmunizationRecommendationDateCriterion.EARLIEST) + return "earliest"; + if (code == ImmunizationRecommendationDateCriterion.OVERDUE) + return "overdue"; + if (code == ImmunizationRecommendationDateCriterion.LATEST) + return "latest"; + return "?"; + } + + public String toSystem(ImmunizationRecommendationDateCriterion code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationStatus.java new file mode 100644 index 00000000000..978773ab450 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ImmunizationRecommendationStatus { + + /** + * The patient is due for their next vaccination. + */ + DUE, + /** + * The patient is considered overdue for their next vaccination. + */ + OVERDUE, + /** + * added to help the parsers + */ + NULL; + public static ImmunizationRecommendationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return DUE; + if ("overdue".equals(codeString)) + return OVERDUE; + throw new FHIRException("Unknown ImmunizationRecommendationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DUE: return "due"; + case OVERDUE: return "overdue"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/immunization-recommendation-status"; + } + public String getDefinition() { + switch (this) { + case DUE: return "The patient is due for their next vaccination."; + case OVERDUE: return "The patient is considered overdue for their next vaccination."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DUE: return "Due"; + case OVERDUE: return "Overdue"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationStatusEnumFactory.java new file mode 100644 index 00000000000..d8f68e5e353 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImmunizationRecommendationStatusEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ImmunizationRecommendationStatusEnumFactory implements EnumFactory { + + public ImmunizationRecommendationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("due".equals(codeString)) + return ImmunizationRecommendationStatus.DUE; + if ("overdue".equals(codeString)) + return ImmunizationRecommendationStatus.OVERDUE; + throw new IllegalArgumentException("Unknown ImmunizationRecommendationStatus code '"+codeString+"'"); + } + + public String toCode(ImmunizationRecommendationStatus code) { + if (code == ImmunizationRecommendationStatus.DUE) + return "due"; + if (code == ImmunizationRecommendationStatus.OVERDUE) + return "overdue"; + return "?"; + } + + public String toSystem(ImmunizationRecommendationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImplantStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImplantStatus.java new file mode 100644 index 00000000000..d04c4f66913 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImplantStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ImplantStatus { + + /** + * The implanted device is working normally + */ + FUNCTIONAL, + /** + * The implanted device is not working + */ + NONFUNCTIONAL, + /** + * The implanted device has been turned off + */ + DISABLED, + /** + * the functional status of the implant has not been determined + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ImplantStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("functional".equals(codeString)) + return FUNCTIONAL; + if ("non-functional".equals(codeString)) + return NONFUNCTIONAL; + if ("disabled".equals(codeString)) + return DISABLED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ImplantStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FUNCTIONAL: return "functional"; + case NONFUNCTIONAL: return "non-functional"; + case DISABLED: return "disabled"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/implant-status"; + } + public String getDefinition() { + switch (this) { + case FUNCTIONAL: return "The implanted device is working normally"; + case NONFUNCTIONAL: return "The implanted device is not working"; + case DISABLED: return "The implanted device has been turned off"; + case UNKNOWN: return "the functional status of the implant has not been determined"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FUNCTIONAL: return "Functional"; + case NONFUNCTIONAL: return "Non-Functional"; + case DISABLED: return "Disabled"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImplantStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImplantStatusEnumFactory.java new file mode 100644 index 00000000000..92adf795dea --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ImplantStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ImplantStatusEnumFactory implements EnumFactory { + + public ImplantStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("functional".equals(codeString)) + return ImplantStatus.FUNCTIONAL; + if ("non-functional".equals(codeString)) + return ImplantStatus.NONFUNCTIONAL; + if ("disabled".equals(codeString)) + return ImplantStatus.DISABLED; + if ("unknown".equals(codeString)) + return ImplantStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown ImplantStatus code '"+codeString+"'"); + } + + public String toCode(ImplantStatus code) { + if (code == ImplantStatus.FUNCTIONAL) + return "functional"; + if (code == ImplantStatus.NONFUNCTIONAL) + return "non-functional"; + if (code == ImplantStatus.DISABLED) + return "disabled"; + if (code == ImplantStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(ImplantStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Intervention.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Intervention.java new file mode 100644 index 00000000000..11c0af0bd56 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Intervention.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Intervention { + + /** + * Unknown + */ + UNKNOWN, + /** + * Other + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Intervention fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Intervention code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNKNOWN: return "unknown"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/intervention"; + } + public String getDefinition() { + switch (this) { + case UNKNOWN: return "Unknown"; + case OTHER: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNKNOWN: return "Unknown"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/InterventionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/InterventionEnumFactory.java new file mode 100644 index 00000000000..0378f02c42e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/InterventionEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class InterventionEnumFactory implements EnumFactory { + + public Intervention fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unknown".equals(codeString)) + return Intervention.UNKNOWN; + if ("other".equals(codeString)) + return Intervention.OTHER; + throw new IllegalArgumentException("Unknown Intervention code '"+codeString+"'"); + } + + public String toCode(Intervention code) { + if (code == Intervention.UNKNOWN) + return "unknown"; + if (code == Intervention.OTHER) + return "other"; + return "?"; + } + + public String toSystem(Intervention code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Iso21089Lifecycle.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Iso21089Lifecycle.java new file mode 100644 index 00000000000..057f806d77b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Iso21089Lifecycle.java @@ -0,0 +1,294 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Iso21089Lifecycle { + + /** + * occurs when an agent makes any change to record entry content currently residing in storage considered permanent (persistent) + */ + _2, + /** + * occurs when an agent causes the system to create and move archive artifacts containing record entry content, typically to long-term offline storage + */ + _14, + /** + * occurs when an agent causes the system to capture the agent’s digital signature (or equivalent indication) during formal validation of record entry content + */ + _4, + /** + * occurs when an agent causes the system to decode record entry content from a cipher + */ + _27, + /** + * occurs when an agent causes the system to scrub record entry content to reduce the association between a set of identifying data and the data subject in a way that may or may not be reversible + */ + _10, + /** + * occurs when an agent causes the system to tag record entry(ies) as obsolete, erroneous or untrustworthy, to warn against its future use + */ + _17, + /** + * occurs when an agent causes the system to permanently erase record entry content from the system + */ + _16, + /** + * occurs when an agent causes the system to release, transfer, provision access to, or otherwise divulge record entry content + */ + _7, + /** + * occurs when an agent causes the system to encode record entry content in a cipher + */ + _26, + /** + * occurs when an agent causes the system to selectively pull out a subset of record entry content, based on explicit criteria + */ + _13, + /** + * occurs when an agent causes the system to connect related record entries + */ + _21, + /** + * occurs when an agent causes the system to combine or join content from two or more record entries, resulting in a single logical record entry + */ + _19, + /** + * occurs when an agent causes the system to: a) initiate capture of potential record content, and b) incorporate that content into the storage considered a permanent part of the health record + */ + _1, + /** + * occurs when an agent causes the system to remove record entry content to reduce the association between a set of identifying data and the data subject in a way that may be reversible + */ + _11, + /** + * occurs when an agent causes the system to recreate or restore full status to record entries previously deleted or deprecated + */ + _18, + /** + * occurs when an agent causes the system to: a) initiate capture of data content from elseware, and b) incorporate that content into the storage considered a permanent part of the health record + */ + _9, + /** + * occurs when an agent causes the system to produce and deliver record entry content in a particular form and manner + */ + _6, + /** + * occurs when an agent causes the system to restore information to data that allows identification of information source and/or information subject + */ + _12, + /** + * occurs when an agent causes the system to remove a tag or other cues for special access management had required to fulfill organizational policy under the legal doctrine of “duty to preserve” + */ + _24, + /** + * occurs when an agent causes the system to recreate record entries and their content from a previous created archive artifact + */ + _15, + /** + * occurs when an agent causes the system to change the form, language or code system used to represent record entry content + */ + _3, + /** + * occurs when an agent causes the system to send record entry content from one (EHR/PHR/other) system to another + */ + _8, + /** + * occurs when an agent causes the system to disconnect two or more record entries previously connected, rendering them separate (disconnected) again + */ + _22, + /** + * occurs when an agent causes the system to reverse a previous record entry merge operation, rendering them separate again + */ + _20, + /** + * occurs when an agent causes the system to confirm compliance of data or data objects with regulations, requirements, specifications, or other imposed conditions based on organizational policy + */ + _25, + /** + * added to help the parsers + */ + NULL; + public static Iso21089Lifecycle fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("2".equals(codeString)) + return _2; + if ("14".equals(codeString)) + return _14; + if ("4".equals(codeString)) + return _4; + if ("27".equals(codeString)) + return _27; + if ("10".equals(codeString)) + return _10; + if ("17".equals(codeString)) + return _17; + if ("16".equals(codeString)) + return _16; + if ("7".equals(codeString)) + return _7; + if ("26".equals(codeString)) + return _26; + if ("13".equals(codeString)) + return _13; + if ("21".equals(codeString)) + return _21; + if ("19".equals(codeString)) + return _19; + if ("1".equals(codeString)) + return _1; + if ("11".equals(codeString)) + return _11; + if ("18".equals(codeString)) + return _18; + if ("9".equals(codeString)) + return _9; + if ("6".equals(codeString)) + return _6; + if ("12".equals(codeString)) + return _12; + if ("24".equals(codeString)) + return _24; + if ("15".equals(codeString)) + return _15; + if ("3".equals(codeString)) + return _3; + if ("8".equals(codeString)) + return _8; + if ("22".equals(codeString)) + return _22; + if ("20".equals(codeString)) + return _20; + if ("25".equals(codeString)) + return _25; + throw new FHIRException("Unknown Iso21089Lifecycle code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _2: return "2"; + case _14: return "14"; + case _4: return "4"; + case _27: return "27"; + case _10: return "10"; + case _17: return "17"; + case _16: return "16"; + case _7: return "7"; + case _26: return "26"; + case _13: return "13"; + case _21: return "21"; + case _19: return "19"; + case _1: return "1"; + case _11: return "11"; + case _18: return "18"; + case _9: return "9"; + case _6: return "6"; + case _12: return "12"; + case _24: return "24"; + case _15: return "15"; + case _3: return "3"; + case _8: return "8"; + case _22: return "22"; + case _20: return "20"; + case _25: return "25"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/iso-21089-lifecycle"; + } + public String getDefinition() { + switch (this) { + case _2: return "occurs when an agent makes any change to record entry content currently residing in storage considered permanent (persistent)"; + case _14: return "occurs when an agent causes the system to create and move archive artifacts containing record entry content, typically to long-term offline storage"; + case _4: return "occurs when an agent causes the system to capture the agent’s digital signature (or equivalent indication) during formal validation of record entry content"; + case _27: return "occurs when an agent causes the system to decode record entry content from a cipher"; + case _10: return "occurs when an agent causes the system to scrub record entry content to reduce the association between a set of identifying data and the data subject in a way that may or may not be reversible"; + case _17: return "occurs when an agent causes the system to tag record entry(ies) as obsolete, erroneous or untrustworthy, to warn against its future use"; + case _16: return "occurs when an agent causes the system to permanently erase record entry content from the system"; + case _7: return "occurs when an agent causes the system to release, transfer, provision access to, or otherwise divulge record entry content"; + case _26: return "occurs when an agent causes the system to encode record entry content in a cipher"; + case _13: return "occurs when an agent causes the system to selectively pull out a subset of record entry content, based on explicit criteria"; + case _21: return "occurs when an agent causes the system to connect related record entries"; + case _19: return "occurs when an agent causes the system to combine or join content from two or more record entries, resulting in a single logical record entry"; + case _1: return "occurs when an agent causes the system to: a) initiate capture of potential record content, and b) incorporate that content into the storage considered a permanent part of the health record"; + case _11: return "occurs when an agent causes the system to remove record entry content to reduce the association between a set of identifying data and the data subject in a way that may be reversible"; + case _18: return "occurs when an agent causes the system to recreate or restore full status to record entries previously deleted or deprecated"; + case _9: return "occurs when an agent causes the system to: a) initiate capture of data content from elseware, and b) incorporate that content into the storage considered a permanent part of the health record"; + case _6: return "occurs when an agent causes the system to produce and deliver record entry content in a particular form and manner"; + case _12: return "occurs when an agent causes the system to restore information to data that allows identification of information source and/or information subject"; + case _24: return "occurs when an agent causes the system to remove a tag or other cues for special access management had required to fulfill organizational policy under the legal doctrine of “duty to preserve”"; + case _15: return "occurs when an agent causes the system to recreate record entries and their content from a previous created archive artifact"; + case _3: return "occurs when an agent causes the system to change the form, language or code system used to represent record entry content"; + case _8: return "occurs when an agent causes the system to send record entry content from one (EHR/PHR/other) system to another"; + case _22: return "occurs when an agent causes the system to disconnect two or more record entries previously connected, rendering them separate (disconnected) again"; + case _20: return "occurs when an agent causes the system to reverse a previous record entry merge operation, rendering them separate again"; + case _25: return "occurs when an agent causes the system to confirm compliance of data or data objects with regulations, requirements, specifications, or other imposed conditions based on organizational policy"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _2: return "Amend (Update) - Lifeycle Event"; + case _14: return "Archive - Lifeycle Event"; + case _4: return "Attest - Lifecycle Event"; + case _27: return "Decrypt - Lifecycle Event"; + case _10: return "De-Identify (Anononymize) - Lifecycle Event"; + case _17: return "Deprecate - Lifecycle Event"; + case _16: return "Destroy/Delete - Lifecycle Event"; + case _7: return "Disclose - Lifecycle Event"; + case _26: return "Encrypt - Lifecycle Event"; + case _13: return "Extract - Lifecycle Event"; + case _21: return "Link - Lifecycle Event"; + case _19: return "Merge - Lifecycle Event"; + case _1: return "Originate/Retain - Record Lifecyle Event"; + case _11: return "Pseudonymize - Lifecycle Event"; + case _18: return "Re-activate - Lifecycle Event"; + case _9: return "Receive/Retain - Lifecycle Event"; + case _6: return "Report (Output) - Lifecycle Event"; + case _12: return "Re-identify - Lifecycle Event"; + case _24: return "Remove Legal Hold - Lifecycle Event"; + case _15: return "Restore - Lifecycle Event"; + case _3: return "Transform/Translate - Lifecycle Event"; + case _8: return "Transmit - Lifecycle Event"; + case _22: return "Unlink - Lifecycle Event"; + case _20: return "Unmerge - Lifecycle Event"; + case _25: return "Verify - Lifecycle Event"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Iso21089LifecycleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Iso21089LifecycleEnumFactory.java new file mode 100644 index 00000000000..dbb356babc3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Iso21089LifecycleEnumFactory.java @@ -0,0 +1,154 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class Iso21089LifecycleEnumFactory implements EnumFactory { + + public Iso21089Lifecycle fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("2".equals(codeString)) + return Iso21089Lifecycle._2; + if ("14".equals(codeString)) + return Iso21089Lifecycle._14; + if ("4".equals(codeString)) + return Iso21089Lifecycle._4; + if ("27".equals(codeString)) + return Iso21089Lifecycle._27; + if ("10".equals(codeString)) + return Iso21089Lifecycle._10; + if ("17".equals(codeString)) + return Iso21089Lifecycle._17; + if ("16".equals(codeString)) + return Iso21089Lifecycle._16; + if ("7".equals(codeString)) + return Iso21089Lifecycle._7; + if ("26".equals(codeString)) + return Iso21089Lifecycle._26; + if ("13".equals(codeString)) + return Iso21089Lifecycle._13; + if ("21".equals(codeString)) + return Iso21089Lifecycle._21; + if ("19".equals(codeString)) + return Iso21089Lifecycle._19; + if ("1".equals(codeString)) + return Iso21089Lifecycle._1; + if ("11".equals(codeString)) + return Iso21089Lifecycle._11; + if ("18".equals(codeString)) + return Iso21089Lifecycle._18; + if ("9".equals(codeString)) + return Iso21089Lifecycle._9; + if ("6".equals(codeString)) + return Iso21089Lifecycle._6; + if ("12".equals(codeString)) + return Iso21089Lifecycle._12; + if ("24".equals(codeString)) + return Iso21089Lifecycle._24; + if ("15".equals(codeString)) + return Iso21089Lifecycle._15; + if ("3".equals(codeString)) + return Iso21089Lifecycle._3; + if ("8".equals(codeString)) + return Iso21089Lifecycle._8; + if ("22".equals(codeString)) + return Iso21089Lifecycle._22; + if ("20".equals(codeString)) + return Iso21089Lifecycle._20; + if ("25".equals(codeString)) + return Iso21089Lifecycle._25; + throw new IllegalArgumentException("Unknown Iso21089Lifecycle code '"+codeString+"'"); + } + + public String toCode(Iso21089Lifecycle code) { + if (code == Iso21089Lifecycle._2) + return "2"; + if (code == Iso21089Lifecycle._14) + return "14"; + if (code == Iso21089Lifecycle._4) + return "4"; + if (code == Iso21089Lifecycle._27) + return "27"; + if (code == Iso21089Lifecycle._10) + return "10"; + if (code == Iso21089Lifecycle._17) + return "17"; + if (code == Iso21089Lifecycle._16) + return "16"; + if (code == Iso21089Lifecycle._7) + return "7"; + if (code == Iso21089Lifecycle._26) + return "26"; + if (code == Iso21089Lifecycle._13) + return "13"; + if (code == Iso21089Lifecycle._21) + return "21"; + if (code == Iso21089Lifecycle._19) + return "19"; + if (code == Iso21089Lifecycle._1) + return "1"; + if (code == Iso21089Lifecycle._11) + return "11"; + if (code == Iso21089Lifecycle._18) + return "18"; + if (code == Iso21089Lifecycle._9) + return "9"; + if (code == Iso21089Lifecycle._6) + return "6"; + if (code == Iso21089Lifecycle._12) + return "12"; + if (code == Iso21089Lifecycle._24) + return "24"; + if (code == Iso21089Lifecycle._15) + return "15"; + if (code == Iso21089Lifecycle._3) + return "3"; + if (code == Iso21089Lifecycle._8) + return "8"; + if (code == Iso21089Lifecycle._22) + return "22"; + if (code == Iso21089Lifecycle._20) + return "20"; + if (code == Iso21089Lifecycle._25) + return "25"; + return "?"; + } + + public String toSystem(Iso21089Lifecycle code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueSeverity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueSeverity.java new file mode 100644 index 00000000000..437b02a31ec --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueSeverity.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum IssueSeverity { + + /** + * The issue caused the action to fail, and no further checking could be performed. + */ + FATAL, + /** + * The issue is sufficiently important to cause the action to fail. + */ + ERROR, + /** + * The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired. + */ + WARNING, + /** + * The issue has no relation to the degree of success of the action. + */ + INFORMATION, + /** + * added to help the parsers + */ + NULL; + public static IssueSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fatal".equals(codeString)) + return FATAL; + if ("error".equals(codeString)) + return ERROR; + if ("warning".equals(codeString)) + return WARNING; + if ("information".equals(codeString)) + return INFORMATION; + throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FATAL: return "fatal"; + case ERROR: return "error"; + case WARNING: return "warning"; + case INFORMATION: return "information"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/issue-severity"; + } + public String getDefinition() { + switch (this) { + case FATAL: return "The issue caused the action to fail, and no further checking could be performed."; + case ERROR: return "The issue is sufficiently important to cause the action to fail."; + case WARNING: return "The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired."; + case INFORMATION: return "The issue has no relation to the degree of success of the action."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FATAL: return "Fatal"; + case ERROR: return "Error"; + case WARNING: return "Warning"; + case INFORMATION: return "Information"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueSeverityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueSeverityEnumFactory.java new file mode 100644 index 00000000000..cf57697a5c6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueSeverityEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class IssueSeverityEnumFactory implements EnumFactory { + + public IssueSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fatal".equals(codeString)) + return IssueSeverity.FATAL; + if ("error".equals(codeString)) + return IssueSeverity.ERROR; + if ("warning".equals(codeString)) + return IssueSeverity.WARNING; + if ("information".equals(codeString)) + return IssueSeverity.INFORMATION; + throw new IllegalArgumentException("Unknown IssueSeverity code '"+codeString+"'"); + } + + public String toCode(IssueSeverity code) { + if (code == IssueSeverity.FATAL) + return "fatal"; + if (code == IssueSeverity.ERROR) + return "error"; + if (code == IssueSeverity.WARNING) + return "warning"; + if (code == IssueSeverity.INFORMATION) + return "information"; + return "?"; + } + + public String toSystem(IssueSeverity code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueType.java new file mode 100644 index 00000000000..371e93cc51a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueType.java @@ -0,0 +1,330 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum IssueType { + + /** + * Content invalid against the specification or a profile. + */ + INVALID, + /** + * A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax. + */ + STRUCTURE, + /** + * A required element is missing. + */ + REQUIRED, + /** + * An element value is invalid. + */ + VALUE, + /** + * A content validation rule failed - e.g. a schematron rule. + */ + INVARIANT, + /** + * An authentication/authorization/permissions issue of some kind. + */ + SECURITY, + /** + * The client needs to initiate an authentication process. + */ + LOGIN, + /** + * The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable). + */ + UNKNOWN, + /** + * User session expired; a login may be required. + */ + EXPIRED, + /** + * The user does not have the rights to perform this action. + */ + FORBIDDEN, + /** + * Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes. + */ + SUPPRESSED, + /** + * Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged. + */ + PROCESSING, + /** + * The resource or profile is not supported. + */ + NOTSUPPORTED, + /** + * An attempt was made to create a duplicate record. + */ + DUPLICATE, + /** + * The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture. + */ + NOTFOUND, + /** + * Provided content is too long (typically, this is a denial of service protection type of error). + */ + TOOLONG, + /** + * The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code. + */ + CODEINVALID, + /** + * An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized. + */ + EXTENSION, + /** + * The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT. + */ + TOOCOSTLY, + /** + * The content/operation failed to pass some business rule, and so could not proceed. + */ + BUSINESSRULE, + /** + * Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.) + */ + CONFLICT, + /** + * Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete. + */ + INCOMPLETE, + /** + * Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved. + */ + TRANSIENT, + /** + * A resource/record locking failure (usually in an underlying database). + */ + LOCKERROR, + /** + * The persistent store is unavailable; e.g. the database is down for maintenance or similar action. + */ + NOSTORE, + /** + * An unexpected internal error has occurred. + */ + EXCEPTION, + /** + * An internal timeout has occurred. + */ + TIMEOUT, + /** + * The system is not prepared to handle this request due to load management. + */ + THROTTLED, + /** + * A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.). + */ + INFORMATIONAL, + /** + * added to help the parsers + */ + NULL; + public static IssueType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("invalid".equals(codeString)) + return INVALID; + if ("structure".equals(codeString)) + return STRUCTURE; + if ("required".equals(codeString)) + return REQUIRED; + if ("value".equals(codeString)) + return VALUE; + if ("invariant".equals(codeString)) + return INVARIANT; + if ("security".equals(codeString)) + return SECURITY; + if ("login".equals(codeString)) + return LOGIN; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("expired".equals(codeString)) + return EXPIRED; + if ("forbidden".equals(codeString)) + return FORBIDDEN; + if ("suppressed".equals(codeString)) + return SUPPRESSED; + if ("processing".equals(codeString)) + return PROCESSING; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("duplicate".equals(codeString)) + return DUPLICATE; + if ("not-found".equals(codeString)) + return NOTFOUND; + if ("too-long".equals(codeString)) + return TOOLONG; + if ("code-invalid".equals(codeString)) + return CODEINVALID; + if ("extension".equals(codeString)) + return EXTENSION; + if ("too-costly".equals(codeString)) + return TOOCOSTLY; + if ("business-rule".equals(codeString)) + return BUSINESSRULE; + if ("conflict".equals(codeString)) + return CONFLICT; + if ("incomplete".equals(codeString)) + return INCOMPLETE; + if ("transient".equals(codeString)) + return TRANSIENT; + if ("lock-error".equals(codeString)) + return LOCKERROR; + if ("no-store".equals(codeString)) + return NOSTORE; + if ("exception".equals(codeString)) + return EXCEPTION; + if ("timeout".equals(codeString)) + return TIMEOUT; + if ("throttled".equals(codeString)) + return THROTTLED; + if ("informational".equals(codeString)) + return INFORMATIONAL; + throw new FHIRException("Unknown IssueType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INVALID: return "invalid"; + case STRUCTURE: return "structure"; + case REQUIRED: return "required"; + case VALUE: return "value"; + case INVARIANT: return "invariant"; + case SECURITY: return "security"; + case LOGIN: return "login"; + case UNKNOWN: return "unknown"; + case EXPIRED: return "expired"; + case FORBIDDEN: return "forbidden"; + case SUPPRESSED: return "suppressed"; + case PROCESSING: return "processing"; + case NOTSUPPORTED: return "not-supported"; + case DUPLICATE: return "duplicate"; + case NOTFOUND: return "not-found"; + case TOOLONG: return "too-long"; + case CODEINVALID: return "code-invalid"; + case EXTENSION: return "extension"; + case TOOCOSTLY: return "too-costly"; + case BUSINESSRULE: return "business-rule"; + case CONFLICT: return "conflict"; + case INCOMPLETE: return "incomplete"; + case TRANSIENT: return "transient"; + case LOCKERROR: return "lock-error"; + case NOSTORE: return "no-store"; + case EXCEPTION: return "exception"; + case TIMEOUT: return "timeout"; + case THROTTLED: return "throttled"; + case INFORMATIONAL: return "informational"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/issue-type"; + } + public String getDefinition() { + switch (this) { + case INVALID: return "Content invalid against the specification or a profile."; + case STRUCTURE: return "A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax."; + case REQUIRED: return "A required element is missing."; + case VALUE: return "An element value is invalid."; + case INVARIANT: return "A content validation rule failed - e.g. a schematron rule."; + case SECURITY: return "An authentication/authorization/permissions issue of some kind."; + case LOGIN: return "The client needs to initiate an authentication process."; + case UNKNOWN: return "The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable)."; + case EXPIRED: return "User session expired; a login may be required."; + case FORBIDDEN: return "The user does not have the rights to perform this action."; + case SUPPRESSED: return "Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes."; + case PROCESSING: return "Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged."; + case NOTSUPPORTED: return "The resource or profile is not supported."; + case DUPLICATE: return "An attempt was made to create a duplicate record."; + case NOTFOUND: return "The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture."; + case TOOLONG: return "Provided content is too long (typically, this is a denial of service protection type of error)."; + case CODEINVALID: return "The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code."; + case EXTENSION: return "An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized."; + case TOOCOSTLY: return "The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT."; + case BUSINESSRULE: return "The content/operation failed to pass some business rule, and so could not proceed."; + case CONFLICT: return "Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.)"; + case INCOMPLETE: return "Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete."; + case TRANSIENT: return "Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved."; + case LOCKERROR: return "A resource/record locking failure (usually in an underlying database)."; + case NOSTORE: return "The persistent store is unavailable; e.g. the database is down for maintenance or similar action."; + case EXCEPTION: return "An unexpected internal error has occurred."; + case TIMEOUT: return "An internal timeout has occurred."; + case THROTTLED: return "The system is not prepared to handle this request due to load management."; + case INFORMATIONAL: return "A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INVALID: return "Invalid Content"; + case STRUCTURE: return "Structural Issue"; + case REQUIRED: return "Required element missing"; + case VALUE: return "Element value invalid"; + case INVARIANT: return "Validation rule failed"; + case SECURITY: return "Security Problem"; + case LOGIN: return "Login Required"; + case UNKNOWN: return "Unknown User"; + case EXPIRED: return "Session Expired"; + case FORBIDDEN: return "Forbidden"; + case SUPPRESSED: return "Information Suppressed"; + case PROCESSING: return "Processing Failure"; + case NOTSUPPORTED: return "Content not supported"; + case DUPLICATE: return "Duplicate"; + case NOTFOUND: return "Not Found"; + case TOOLONG: return "Content Too Long"; + case CODEINVALID: return "Invalid Code"; + case EXTENSION: return "Unacceptable Extension"; + case TOOCOSTLY: return "Operation Too Costly"; + case BUSINESSRULE: return "Business Rule Violation"; + case CONFLICT: return "Edit Version Conflict"; + case INCOMPLETE: return "Incomplete Results"; + case TRANSIENT: return "Transient Issue"; + case LOCKERROR: return "Lock Error"; + case NOSTORE: return "No Store Available"; + case EXCEPTION: return "Exception"; + case TIMEOUT: return "Timeout"; + case THROTTLED: return "Throttled"; + case INFORMATIONAL: return "Informational Note"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueTypeEnumFactory.java new file mode 100644 index 00000000000..2c9e4d7b3cf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/IssueTypeEnumFactory.java @@ -0,0 +1,170 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class IssueTypeEnumFactory implements EnumFactory { + + public IssueType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("invalid".equals(codeString)) + return IssueType.INVALID; + if ("structure".equals(codeString)) + return IssueType.STRUCTURE; + if ("required".equals(codeString)) + return IssueType.REQUIRED; + if ("value".equals(codeString)) + return IssueType.VALUE; + if ("invariant".equals(codeString)) + return IssueType.INVARIANT; + if ("security".equals(codeString)) + return IssueType.SECURITY; + if ("login".equals(codeString)) + return IssueType.LOGIN; + if ("unknown".equals(codeString)) + return IssueType.UNKNOWN; + if ("expired".equals(codeString)) + return IssueType.EXPIRED; + if ("forbidden".equals(codeString)) + return IssueType.FORBIDDEN; + if ("suppressed".equals(codeString)) + return IssueType.SUPPRESSED; + if ("processing".equals(codeString)) + return IssueType.PROCESSING; + if ("not-supported".equals(codeString)) + return IssueType.NOTSUPPORTED; + if ("duplicate".equals(codeString)) + return IssueType.DUPLICATE; + if ("not-found".equals(codeString)) + return IssueType.NOTFOUND; + if ("too-long".equals(codeString)) + return IssueType.TOOLONG; + if ("code-invalid".equals(codeString)) + return IssueType.CODEINVALID; + if ("extension".equals(codeString)) + return IssueType.EXTENSION; + if ("too-costly".equals(codeString)) + return IssueType.TOOCOSTLY; + if ("business-rule".equals(codeString)) + return IssueType.BUSINESSRULE; + if ("conflict".equals(codeString)) + return IssueType.CONFLICT; + if ("incomplete".equals(codeString)) + return IssueType.INCOMPLETE; + if ("transient".equals(codeString)) + return IssueType.TRANSIENT; + if ("lock-error".equals(codeString)) + return IssueType.LOCKERROR; + if ("no-store".equals(codeString)) + return IssueType.NOSTORE; + if ("exception".equals(codeString)) + return IssueType.EXCEPTION; + if ("timeout".equals(codeString)) + return IssueType.TIMEOUT; + if ("throttled".equals(codeString)) + return IssueType.THROTTLED; + if ("informational".equals(codeString)) + return IssueType.INFORMATIONAL; + throw new IllegalArgumentException("Unknown IssueType code '"+codeString+"'"); + } + + public String toCode(IssueType code) { + if (code == IssueType.INVALID) + return "invalid"; + if (code == IssueType.STRUCTURE) + return "structure"; + if (code == IssueType.REQUIRED) + return "required"; + if (code == IssueType.VALUE) + return "value"; + if (code == IssueType.INVARIANT) + return "invariant"; + if (code == IssueType.SECURITY) + return "security"; + if (code == IssueType.LOGIN) + return "login"; + if (code == IssueType.UNKNOWN) + return "unknown"; + if (code == IssueType.EXPIRED) + return "expired"; + if (code == IssueType.FORBIDDEN) + return "forbidden"; + if (code == IssueType.SUPPRESSED) + return "suppressed"; + if (code == IssueType.PROCESSING) + return "processing"; + if (code == IssueType.NOTSUPPORTED) + return "not-supported"; + if (code == IssueType.DUPLICATE) + return "duplicate"; + if (code == IssueType.NOTFOUND) + return "not-found"; + if (code == IssueType.TOOLONG) + return "too-long"; + if (code == IssueType.CODEINVALID) + return "code-invalid"; + if (code == IssueType.EXTENSION) + return "extension"; + if (code == IssueType.TOOCOSTLY) + return "too-costly"; + if (code == IssueType.BUSINESSRULE) + return "business-rule"; + if (code == IssueType.CONFLICT) + return "conflict"; + if (code == IssueType.INCOMPLETE) + return "incomplete"; + if (code == IssueType.TRANSIENT) + return "transient"; + if (code == IssueType.LOCKERROR) + return "lock-error"; + if (code == IssueType.NOSTORE) + return "no-store"; + if (code == IssueType.EXCEPTION) + return "exception"; + if (code == IssueType.TIMEOUT) + return "timeout"; + if (code == IssueType.THROTTLED) + return "throttled"; + if (code == IssueType.INFORMATIONAL) + return "informational"; + return "?"; + } + + public String toSystem(IssueType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ItemType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ItemType.java new file mode 100644 index 00000000000..f1163ff60ff --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ItemType.java @@ -0,0 +1,224 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ItemType { + + /** + * An item with no direct answer but should have at least one child item. + */ + GROUP, + /** + * Text for display that will not capture an answer or have child items. + */ + DISPLAY, + /** + * An item that defines a specific answer to be captured, and may have child items. +(the answer provided in the QuestionnaireResponse should be of the defined datatype) + */ + QUESTION, + /** + * Question with a yes/no answer (valueBoolean) + */ + BOOLEAN, + /** + * Question with is a real number answer (valueDecimal) + */ + DECIMAL, + /** + * Question with an integer answer (valueInteger) + */ + INTEGER, + /** + * Question with a date answer (valueDate) + */ + DATE, + /** + * Question with a date and time answer (valueDateTime) + */ + DATETIME, + /** + * Question with a time (hour:minute:second) answer independent of date. (valueTime) + */ + TIME, + /** + * Question with a short (few words to short sentence) free-text entry answer (valueString) + */ + STRING, + /** + * Question with a long (potentially multi-paragraph) free-text entry answer (valueString) + */ + TEXT, + /** + * Question with a URL (website, FTP site, etc.) answer (valueUri) + */ + URL, + /** + * Question with a Coding drawn from a list of options (specified in either the option property, or via the valueset referenced in the options property) as an answer (valueCoding) + */ + CHOICE, + /** + * Answer is a Coding drawn from a list of options (as with the choice type) or a free-text entry in a string (valueCoding or valueString) + */ + OPENCHOICE, + /** + * Question with binary content such as a image, PDF, etc. as an answer (valueAttachment) + */ + ATTACHMENT, + /** + * Question with a reference to another resource (practitioner, organization, etc.) as an answer (valueReference) + */ + REFERENCE, + /** + * Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity) +There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit should be captured (or the a unit that has a ucum conversion from the provided unit) + */ + QUANTITY, + /** + * added to help the parsers + */ + NULL; + public static ItemType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return GROUP; + if ("display".equals(codeString)) + return DISPLAY; + if ("question".equals(codeString)) + return QUESTION; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("decimal".equals(codeString)) + return DECIMAL; + if ("integer".equals(codeString)) + return INTEGER; + if ("date".equals(codeString)) + return DATE; + if ("dateTime".equals(codeString)) + return DATETIME; + if ("time".equals(codeString)) + return TIME; + if ("string".equals(codeString)) + return STRING; + if ("text".equals(codeString)) + return TEXT; + if ("url".equals(codeString)) + return URL; + if ("choice".equals(codeString)) + return CHOICE; + if ("open-choice".equals(codeString)) + return OPENCHOICE; + if ("attachment".equals(codeString)) + return ATTACHMENT; + if ("reference".equals(codeString)) + return REFERENCE; + if ("quantity".equals(codeString)) + return QUANTITY; + throw new FHIRException("Unknown ItemType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUP: return "group"; + case DISPLAY: return "display"; + case QUESTION: return "question"; + case BOOLEAN: return "boolean"; + case DECIMAL: return "decimal"; + case INTEGER: return "integer"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case TIME: return "time"; + case STRING: return "string"; + case TEXT: return "text"; + case URL: return "url"; + case CHOICE: return "choice"; + case OPENCHOICE: return "open-choice"; + case ATTACHMENT: return "attachment"; + case REFERENCE: return "reference"; + case QUANTITY: return "quantity"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/item-type"; + } + public String getDefinition() { + switch (this) { + case GROUP: return "An item with no direct answer but should have at least one child item."; + case DISPLAY: return "Text for display that will not capture an answer or have child items."; + case QUESTION: return "An item that defines a specific answer to be captured, and may have child items.\n(the answer provided in the QuestionnaireResponse should be of the defined datatype)"; + case BOOLEAN: return "Question with a yes/no answer (valueBoolean)"; + case DECIMAL: return "Question with is a real number answer (valueDecimal)"; + case INTEGER: return "Question with an integer answer (valueInteger)"; + case DATE: return "Question with a date answer (valueDate)"; + case DATETIME: return "Question with a date and time answer (valueDateTime)"; + case TIME: return "Question with a time (hour:minute:second) answer independent of date. (valueTime)"; + case STRING: return "Question with a short (few words to short sentence) free-text entry answer (valueString)"; + case TEXT: return "Question with a long (potentially multi-paragraph) free-text entry answer (valueString)"; + case URL: return "Question with a URL (website, FTP site, etc.) answer (valueUri)"; + case CHOICE: return "Question with a Coding drawn from a list of options (specified in either the option property, or via the valueset referenced in the options property) as an answer (valueCoding)"; + case OPENCHOICE: return "Answer is a Coding drawn from a list of options (as with the choice type) or a free-text entry in a string (valueCoding or valueString)"; + case ATTACHMENT: return "Question with binary content such as a image, PDF, etc. as an answer (valueAttachment)"; + case REFERENCE: return "Question with a reference to another resource (practitioner, organization, etc.) as an answer (valueReference)"; + case QUANTITY: return "Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity)\nThere is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit should be captured (or the a unit that has a ucum conversion from the provided unit)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUP: return "Group"; + case DISPLAY: return "Display"; + case QUESTION: return "Question"; + case BOOLEAN: return "Boolean"; + case DECIMAL: return "Decimal"; + case INTEGER: return "Integer"; + case DATE: return "Date"; + case DATETIME: return "Date Time"; + case TIME: return "Time"; + case STRING: return "String"; + case TEXT: return "Text"; + case URL: return "Url"; + case CHOICE: return "Choice"; + case OPENCHOICE: return "Open Choice"; + case ATTACHMENT: return "Attachment"; + case REFERENCE: return "Reference"; + case QUANTITY: return "Quantity"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ItemTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ItemTypeEnumFactory.java new file mode 100644 index 00000000000..2cae0d83f17 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ItemTypeEnumFactory.java @@ -0,0 +1,122 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ItemTypeEnumFactory implements EnumFactory { + + public ItemType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return ItemType.GROUP; + if ("display".equals(codeString)) + return ItemType.DISPLAY; + if ("question".equals(codeString)) + return ItemType.QUESTION; + if ("boolean".equals(codeString)) + return ItemType.BOOLEAN; + if ("decimal".equals(codeString)) + return ItemType.DECIMAL; + if ("integer".equals(codeString)) + return ItemType.INTEGER; + if ("date".equals(codeString)) + return ItemType.DATE; + if ("dateTime".equals(codeString)) + return ItemType.DATETIME; + if ("time".equals(codeString)) + return ItemType.TIME; + if ("string".equals(codeString)) + return ItemType.STRING; + if ("text".equals(codeString)) + return ItemType.TEXT; + if ("url".equals(codeString)) + return ItemType.URL; + if ("choice".equals(codeString)) + return ItemType.CHOICE; + if ("open-choice".equals(codeString)) + return ItemType.OPENCHOICE; + if ("attachment".equals(codeString)) + return ItemType.ATTACHMENT; + if ("reference".equals(codeString)) + return ItemType.REFERENCE; + if ("quantity".equals(codeString)) + return ItemType.QUANTITY; + throw new IllegalArgumentException("Unknown ItemType code '"+codeString+"'"); + } + + public String toCode(ItemType code) { + if (code == ItemType.GROUP) + return "group"; + if (code == ItemType.DISPLAY) + return "display"; + if (code == ItemType.QUESTION) + return "question"; + if (code == ItemType.BOOLEAN) + return "boolean"; + if (code == ItemType.DECIMAL) + return "decimal"; + if (code == ItemType.INTEGER) + return "integer"; + if (code == ItemType.DATE) + return "date"; + if (code == ItemType.DATETIME) + return "dateTime"; + if (code == ItemType.TIME) + return "time"; + if (code == ItemType.STRING) + return "string"; + if (code == ItemType.TEXT) + return "text"; + if (code == ItemType.URL) + return "url"; + if (code == ItemType.CHOICE) + return "choice"; + if (code == ItemType.OPENCHOICE) + return "open-choice"; + if (code == ItemType.ATTACHMENT) + return "attachment"; + if (code == ItemType.REFERENCE) + return "reference"; + if (code == ItemType.QUANTITY) + return "quantity"; + return "?"; + } + + public String toSystem(ItemType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LibraryType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LibraryType.java new file mode 100644 index 00000000000..0d906241c38 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LibraryType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LibraryType { + + /** + * The resource is a shareable library of formalized knowledge + */ + LOGICLIBRARY, + /** + * The resource is a definition of an information model + */ + MODELDEFINITION, + /** + * The resource is a collection of knowledge assets + */ + ASSETCOLLECTION, + /** + * The resource defines the dependencies, parameters, and data requirements for a particular module or evaluation context + */ + MODULEDEFINITION, + /** + * added to help the parsers + */ + NULL; + public static LibraryType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("logic-library".equals(codeString)) + return LOGICLIBRARY; + if ("model-definition".equals(codeString)) + return MODELDEFINITION; + if ("asset-collection".equals(codeString)) + return ASSETCOLLECTION; + if ("module-definition".equals(codeString)) + return MODULEDEFINITION; + throw new FHIRException("Unknown LibraryType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LOGICLIBRARY: return "logic-library"; + case MODELDEFINITION: return "model-definition"; + case ASSETCOLLECTION: return "asset-collection"; + case MODULEDEFINITION: return "module-definition"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/library-type"; + } + public String getDefinition() { + switch (this) { + case LOGICLIBRARY: return "The resource is a shareable library of formalized knowledge"; + case MODELDEFINITION: return "The resource is a definition of an information model"; + case ASSETCOLLECTION: return "The resource is a collection of knowledge assets"; + case MODULEDEFINITION: return "The resource defines the dependencies, parameters, and data requirements for a particular module or evaluation context"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LOGICLIBRARY: return "Logic Library"; + case MODELDEFINITION: return "Model Definition"; + case ASSETCOLLECTION: return "Asset Collection"; + case MODULEDEFINITION: return "Module Definition"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LibraryTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LibraryTypeEnumFactory.java new file mode 100644 index 00000000000..0643b316615 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LibraryTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class LibraryTypeEnumFactory implements EnumFactory { + + public LibraryType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("logic-library".equals(codeString)) + return LibraryType.LOGICLIBRARY; + if ("model-definition".equals(codeString)) + return LibraryType.MODELDEFINITION; + if ("asset-collection".equals(codeString)) + return LibraryType.ASSETCOLLECTION; + if ("module-definition".equals(codeString)) + return LibraryType.MODULEDEFINITION; + throw new IllegalArgumentException("Unknown LibraryType code '"+codeString+"'"); + } + + public String toCode(LibraryType code) { + if (code == LibraryType.LOGICLIBRARY) + return "logic-library"; + if (code == LibraryType.MODELDEFINITION) + return "model-definition"; + if (code == LibraryType.ASSETCOLLECTION) + return "asset-collection"; + if (code == LibraryType.MODULEDEFINITION) + return "module-definition"; + return "?"; + } + + public String toSystem(LibraryType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkType.java new file mode 100644 index 00000000000..1b2e66a0432 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LinkType { + + /** + * The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link. + */ + REPLACEDBY, + /** + * The patient resource containing this link is the current active patient record. The link points back to an inactive patient resource that has been merged into this resource, and should be consulted to retrieve additional referenced information. + */ + REPLACES, + /** + * The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information. + */ + REFER, + /** + * The patient resource containing this link is in use and valid, but points to another patient resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other patient resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid. + */ + SEEALSO, + /** + * added to help the parsers + */ + NULL; + public static LinkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("replaced-by".equals(codeString)) + return REPLACEDBY; + if ("replaces".equals(codeString)) + return REPLACES; + if ("refer".equals(codeString)) + return REFER; + if ("seealso".equals(codeString)) + return SEEALSO; + throw new FHIRException("Unknown LinkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REPLACEDBY: return "replaced-by"; + case REPLACES: return "replaces"; + case REFER: return "refer"; + case SEEALSO: return "seealso"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/link-type"; + } + public String getDefinition() { + switch (this) { + case REPLACEDBY: return "The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link."; + case REPLACES: return "The patient resource containing this link is the current active patient record. The link points back to an inactive patient resource that has been merged into this resource, and should be consulted to retrieve additional referenced information."; + case REFER: return "The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information."; + case SEEALSO: return "The patient resource containing this link is in use and valid, but points to another patient resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other patient resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REPLACEDBY: return "Replaced-by"; + case REPLACES: return "Replaces"; + case REFER: return "Refer"; + case SEEALSO: return "See also"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkTypeEnumFactory.java new file mode 100644 index 00000000000..4f26b524842 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class LinkTypeEnumFactory implements EnumFactory { + + public LinkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("replaced-by".equals(codeString)) + return LinkType.REPLACEDBY; + if ("replaces".equals(codeString)) + return LinkType.REPLACES; + if ("refer".equals(codeString)) + return LinkType.REFER; + if ("seealso".equals(codeString)) + return LinkType.SEEALSO; + throw new IllegalArgumentException("Unknown LinkType code '"+codeString+"'"); + } + + public String toCode(LinkType code) { + if (code == LinkType.REPLACEDBY) + return "replaced-by"; + if (code == LinkType.REPLACES) + return "replaces"; + if (code == LinkType.REFER) + return "refer"; + if (code == LinkType.SEEALSO) + return "seealso"; + return "?"; + } + + public String toSystem(LinkType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkageType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkageType.java new file mode 100644 index 00000000000..d05c41bd306 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkageType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LinkageType { + + /** + * The record represents the "source of truth" (from the perspective of this Linkage resource) for the underlying event/condition/etc. + */ + SOURCE, + /** + * The record represents the alternative view of the underlying event/condition/etc. The record may still be actively maintained, even though it is not considered to be the source of truth. + */ + ALTERNATE, + /** + * The record represents an obsolete record of the underlyng event/condition/etc. It is not expected to be actively maintained. + */ + HISTORICAL, + /** + * added to help the parsers + */ + NULL; + public static LinkageType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return SOURCE; + if ("alternate".equals(codeString)) + return ALTERNATE; + if ("historical".equals(codeString)) + return HISTORICAL; + throw new FHIRException("Unknown LinkageType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOURCE: return "source"; + case ALTERNATE: return "alternate"; + case HISTORICAL: return "historical"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/linkage-type"; + } + public String getDefinition() { + switch (this) { + case SOURCE: return "The record represents the \"source of truth\" (from the perspective of this Linkage resource) for the underlying event/condition/etc."; + case ALTERNATE: return "The record represents the alternative view of the underlying event/condition/etc. The record may still be actively maintained, even though it is not considered to be the source of truth."; + case HISTORICAL: return "The record represents an obsolete record of the underlyng event/condition/etc. It is not expected to be actively maintained."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOURCE: return "Source of truth"; + case ALTERNATE: return "Alternate record"; + case HISTORICAL: return "Historical/obsolete record"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkageTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkageTypeEnumFactory.java new file mode 100644 index 00000000000..4effd90e753 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LinkageTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class LinkageTypeEnumFactory implements EnumFactory { + + public LinkageType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return LinkageType.SOURCE; + if ("alternate".equals(codeString)) + return LinkageType.ALTERNATE; + if ("historical".equals(codeString)) + return LinkageType.HISTORICAL; + throw new IllegalArgumentException("Unknown LinkageType code '"+codeString+"'"); + } + + public String toCode(LinkageType code) { + if (code == LinkageType.SOURCE) + return "source"; + if (code == LinkageType.ALTERNATE) + return "alternate"; + if (code == LinkageType.HISTORICAL) + return "historical"; + return "?"; + } + + public String toSystem(LinkageType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListEmptyReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListEmptyReason.java new file mode 100644 index 00000000000..bdc25a44cf7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListEmptyReason.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListEmptyReason { + + /** + * Clinical judgment that there are no known items for this list after reasonable investigation. Note that this a positive statement by a clinical user, and not a default position asserted by a computer system in the lack of other information. Example uses: * For allergies: the patient or patient's agent/guardian has asserted that he/she is not aware of any allergies (NKA - nil known allergies) * For medications: the patient or patient's agent/guardian has asserted that the patient is known to be taking no medications * For diagnoses, problems and procedures: the patient or patient's agent/guardian has asserted that there is no known event to record. + */ + NILKNOWN, + /** + * The investigation to find out whether there are items for this list has not occurred. + */ + NOTASKED, + /** + * The content of the list was not provided due to privacy or confidentiality concerns. Note that it should not be assumed that this means that the particular information in question was withheld due to its contents - it can also be a policy decision. + */ + WITHHELD, + /** + * Information to populate this list cannot be obtained; e.g. unconscious patient. + */ + UNAVAILABLE, + /** + * The work to populate this list has not yet begun. + */ + NOTSTARTED, + /** + * This list has now closed or has ceased to be relevant or useful. + */ + CLOSED, + /** + * added to help the parsers + */ + NULL; + public static ListEmptyReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("nilknown".equals(codeString)) + return NILKNOWN; + if ("notasked".equals(codeString)) + return NOTASKED; + if ("withheld".equals(codeString)) + return WITHHELD; + if ("unavailable".equals(codeString)) + return UNAVAILABLE; + if ("notstarted".equals(codeString)) + return NOTSTARTED; + if ("closed".equals(codeString)) + return CLOSED; + throw new FHIRException("Unknown ListEmptyReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NILKNOWN: return "nilknown"; + case NOTASKED: return "notasked"; + case WITHHELD: return "withheld"; + case UNAVAILABLE: return "unavailable"; + case NOTSTARTED: return "notstarted"; + case CLOSED: return "closed"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-empty-reason"; + } + public String getDefinition() { + switch (this) { + case NILKNOWN: return "Clinical judgment that there are no known items for this list after reasonable investigation. Note that this a positive statement by a clinical user, and not a default position asserted by a computer system in the lack of other information. Example uses: * For allergies: the patient or patient's agent/guardian has asserted that he/she is not aware of any allergies (NKA - nil known allergies) * For medications: the patient or patient's agent/guardian has asserted that the patient is known to be taking no medications * For diagnoses, problems and procedures: the patient or patient's agent/guardian has asserted that there is no known event to record."; + case NOTASKED: return "The investigation to find out whether there are items for this list has not occurred."; + case WITHHELD: return "The content of the list was not provided due to privacy or confidentiality concerns. Note that it should not be assumed that this means that the particular information in question was withheld due to its contents - it can also be a policy decision."; + case UNAVAILABLE: return "Information to populate this list cannot be obtained; e.g. unconscious patient."; + case NOTSTARTED: return "The work to populate this list has not yet begun."; + case CLOSED: return "This list has now closed or has ceased to be relevant or useful."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NILKNOWN: return "Nil Known"; + case NOTASKED: return "Not Asked"; + case WITHHELD: return "Information Withheld"; + case UNAVAILABLE: return "Unavailable"; + case NOTSTARTED: return "Not Started"; + case CLOSED: return "Closed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListEmptyReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListEmptyReasonEnumFactory.java new file mode 100644 index 00000000000..be2ab539111 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListEmptyReasonEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ListEmptyReasonEnumFactory implements EnumFactory { + + public ListEmptyReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("nilknown".equals(codeString)) + return ListEmptyReason.NILKNOWN; + if ("notasked".equals(codeString)) + return ListEmptyReason.NOTASKED; + if ("withheld".equals(codeString)) + return ListEmptyReason.WITHHELD; + if ("unavailable".equals(codeString)) + return ListEmptyReason.UNAVAILABLE; + if ("notstarted".equals(codeString)) + return ListEmptyReason.NOTSTARTED; + if ("closed".equals(codeString)) + return ListEmptyReason.CLOSED; + throw new IllegalArgumentException("Unknown ListEmptyReason code '"+codeString+"'"); + } + + public String toCode(ListEmptyReason code) { + if (code == ListEmptyReason.NILKNOWN) + return "nilknown"; + if (code == ListEmptyReason.NOTASKED) + return "notasked"; + if (code == ListEmptyReason.WITHHELD) + return "withheld"; + if (code == ListEmptyReason.UNAVAILABLE) + return "unavailable"; + if (code == ListEmptyReason.NOTSTARTED) + return "notstarted"; + if (code == ListEmptyReason.CLOSED) + return "closed"; + return "?"; + } + + public String toSystem(ListEmptyReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListExampleCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListExampleCodes.java new file mode 100644 index 00000000000..a1b28594588 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListExampleCodes.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListExampleCodes { + + /** + * A list of alerts for the patient. + */ + ALERTS, + /** + * A list of part adverse reactions. + */ + ADVERSERXNS, + /** + * A list of Allergies for the patient. + */ + ALLERGIES, + /** + * A list of medication statements for the patient. + */ + MEDICATIONS, + /** + * A list of problems that the patient is known of have (or have had in the past). + */ + PROBLEMS, + /** + * A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list). + */ + WORKLIST, + /** + * A list of items waiting for an event (perhaps a surgical patient waiting list). + */ + WAITING, + /** + * A set of protocols to be followed. + */ + PROTOCOLS, + /** + * A set of care plans that apply in a particular context of care. + */ + PLANS, + /** + * added to help the parsers + */ + NULL; + public static ListExampleCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alerts".equals(codeString)) + return ALERTS; + if ("adverserxns".equals(codeString)) + return ADVERSERXNS; + if ("allergies".equals(codeString)) + return ALLERGIES; + if ("medications".equals(codeString)) + return MEDICATIONS; + if ("problems".equals(codeString)) + return PROBLEMS; + if ("worklist".equals(codeString)) + return WORKLIST; + if ("waiting".equals(codeString)) + return WAITING; + if ("protocols".equals(codeString)) + return PROTOCOLS; + if ("plans".equals(codeString)) + return PLANS; + throw new FHIRException("Unknown ListExampleCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALERTS: return "alerts"; + case ADVERSERXNS: return "adverserxns"; + case ALLERGIES: return "allergies"; + case MEDICATIONS: return "medications"; + case PROBLEMS: return "problems"; + case WORKLIST: return "worklist"; + case WAITING: return "waiting"; + case PROTOCOLS: return "protocols"; + case PLANS: return "plans"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-example-use-codes"; + } + public String getDefinition() { + switch (this) { + case ALERTS: return "A list of alerts for the patient."; + case ADVERSERXNS: return "A list of part adverse reactions."; + case ALLERGIES: return "A list of Allergies for the patient."; + case MEDICATIONS: return "A list of medication statements for the patient."; + case PROBLEMS: return "A list of problems that the patient is known of have (or have had in the past)."; + case WORKLIST: return "A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list)."; + case WAITING: return "A list of items waiting for an event (perhaps a surgical patient waiting list)."; + case PROTOCOLS: return "A set of protocols to be followed."; + case PLANS: return "A set of care plans that apply in a particular context of care."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALERTS: return "Alerts"; + case ADVERSERXNS: return "Adverse Reactions"; + case ALLERGIES: return "Allergies"; + case MEDICATIONS: return "Medication List"; + case PROBLEMS: return "Problem List"; + case WORKLIST: return "Worklist"; + case WAITING: return "Waiting List"; + case PROTOCOLS: return "Protocols"; + case PLANS: return "Care Plans"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListExampleCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListExampleCodesEnumFactory.java new file mode 100644 index 00000000000..3da76b6cbc6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListExampleCodesEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ListExampleCodesEnumFactory implements EnumFactory { + + public ListExampleCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alerts".equals(codeString)) + return ListExampleCodes.ALERTS; + if ("adverserxns".equals(codeString)) + return ListExampleCodes.ADVERSERXNS; + if ("allergies".equals(codeString)) + return ListExampleCodes.ALLERGIES; + if ("medications".equals(codeString)) + return ListExampleCodes.MEDICATIONS; + if ("problems".equals(codeString)) + return ListExampleCodes.PROBLEMS; + if ("worklist".equals(codeString)) + return ListExampleCodes.WORKLIST; + if ("waiting".equals(codeString)) + return ListExampleCodes.WAITING; + if ("protocols".equals(codeString)) + return ListExampleCodes.PROTOCOLS; + if ("plans".equals(codeString)) + return ListExampleCodes.PLANS; + throw new IllegalArgumentException("Unknown ListExampleCodes code '"+codeString+"'"); + } + + public String toCode(ListExampleCodes code) { + if (code == ListExampleCodes.ALERTS) + return "alerts"; + if (code == ListExampleCodes.ADVERSERXNS) + return "adverserxns"; + if (code == ListExampleCodes.ALLERGIES) + return "allergies"; + if (code == ListExampleCodes.MEDICATIONS) + return "medications"; + if (code == ListExampleCodes.PROBLEMS) + return "problems"; + if (code == ListExampleCodes.WORKLIST) + return "worklist"; + if (code == ListExampleCodes.WAITING) + return "waiting"; + if (code == ListExampleCodes.PROTOCOLS) + return "protocols"; + if (code == ListExampleCodes.PLANS) + return "plans"; + return "?"; + } + + public String toSystem(ListExampleCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListItemFlag.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListItemFlag.java new file mode 100644 index 00000000000..f63f43df04c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListItemFlag.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListItemFlag { + + /** + * No change has been made to the status of this medicine item. + */ + _01, + /** + * The medicine item has changed. The change may be described in an extension (not defined yet) + */ + _02, + /** + * The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition. + */ + _03, + /** + * A new medicine item has been prescribed + */ + _04, + /** + * Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines. + */ + _05, + /** + * Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures. + */ + _06, + /** + * added to help the parsers + */ + NULL; + public static ListItemFlag fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("01".equals(codeString)) + return _01; + if ("02".equals(codeString)) + return _02; + if ("03".equals(codeString)) + return _03; + if ("04".equals(codeString)) + return _04; + if ("05".equals(codeString)) + return _05; + if ("06".equals(codeString)) + return _06; + throw new FHIRException("Unknown ListItemFlag code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _01: return "01"; + case _02: return "02"; + case _03: return "03"; + case _04: return "04"; + case _05: return "05"; + case _06: return "06"; + default: return "?"; + } + } + public String getSystem() { + return "urn:oid:1.2.36.1.2001.1001.101.104.16592"; + } + public String getDefinition() { + switch (this) { + case _01: return "No change has been made to the status of this medicine item."; + case _02: return "The medicine item has changed. The change may be described in an extension (not defined yet)"; + case _03: return "The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition."; + case _04: return "A new medicine item has been prescribed"; + case _05: return "Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines."; + case _06: return "Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _01: return "Unchanged"; + case _02: return "Changed"; + case _03: return "Cancelled"; + case _04: return "Prescribed"; + case _05: return "Ceased"; + case _06: return "Suspended"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListItemFlagEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListItemFlagEnumFactory.java new file mode 100644 index 00000000000..6ede573fe48 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListItemFlagEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ListItemFlagEnumFactory implements EnumFactory { + + public ListItemFlag fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("01".equals(codeString)) + return ListItemFlag._01; + if ("02".equals(codeString)) + return ListItemFlag._02; + if ("03".equals(codeString)) + return ListItemFlag._03; + if ("04".equals(codeString)) + return ListItemFlag._04; + if ("05".equals(codeString)) + return ListItemFlag._05; + if ("06".equals(codeString)) + return ListItemFlag._06; + throw new IllegalArgumentException("Unknown ListItemFlag code '"+codeString+"'"); + } + + public String toCode(ListItemFlag code) { + if (code == ListItemFlag._01) + return "01"; + if (code == ListItemFlag._02) + return "02"; + if (code == ListItemFlag._03) + return "03"; + if (code == ListItemFlag._04) + return "04"; + if (code == ListItemFlag._05) + return "05"; + if (code == ListItemFlag._06) + return "06"; + return "?"; + } + + public String toSystem(ListItemFlag code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListMode.java new file mode 100644 index 00000000000..2b435851830 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListMode { + + /** + * This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes + */ + WORKING, + /** + * This list was prepared as a snapshot. It should not be assumed to be current + */ + SNAPSHOT, + /** + * A list that indicates where changes have been made or recommended + */ + CHANGES, + /** + * added to help the parsers + */ + NULL; + public static ListMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("working".equals(codeString)) + return WORKING; + if ("snapshot".equals(codeString)) + return SNAPSHOT; + if ("changes".equals(codeString)) + return CHANGES; + throw new FHIRException("Unknown ListMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case WORKING: return "working"; + case SNAPSHOT: return "snapshot"; + case CHANGES: return "changes"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-mode"; + } + public String getDefinition() { + switch (this) { + case WORKING: return "This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes"; + case SNAPSHOT: return "This list was prepared as a snapshot. It should not be assumed to be current"; + case CHANGES: return "A list that indicates where changes have been made or recommended"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case WORKING: return "Working List"; + case SNAPSHOT: return "Snapshot List"; + case CHANGES: return "Change List"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListModeEnumFactory.java new file mode 100644 index 00000000000..dbca71e4b68 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ListModeEnumFactory implements EnumFactory { + + public ListMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("working".equals(codeString)) + return ListMode.WORKING; + if ("snapshot".equals(codeString)) + return ListMode.SNAPSHOT; + if ("changes".equals(codeString)) + return ListMode.CHANGES; + throw new IllegalArgumentException("Unknown ListMode code '"+codeString+"'"); + } + + public String toCode(ListMode code) { + if (code == ListMode.WORKING) + return "working"; + if (code == ListMode.SNAPSHOT) + return "snapshot"; + if (code == ListMode.CHANGES) + return "changes"; + return "?"; + } + + public String toSystem(ListMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListOrder.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListOrder.java new file mode 100644 index 00000000000..9e68dc1af00 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListOrder.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListOrder { + + /** + * The list was sorted by a user. The criteria the user used are not specified. + */ + USER, + /** + * The list was sorted by the system. The criteria the user used are not specified; define additional codes to specify a particular order (or use other defined codes). + */ + SYSTEM, + /** + * The list is sorted by the data of the event. This can be used when the list has items which are dates with past or future events. + */ + EVENTDATE, + /** + * The list is sorted by the date the item was added to the list. Note that the date added to the list is not explicit in the list itself. + */ + ENTRYDATE, + /** + * The list is sorted by priority. The exact method in which priority has been determined is not specified. + */ + PRIORITY, + /** + * The list is sorted alphabetically by an unspecified property of the items in the list. + */ + ALPHABETIC, + /** + * The list is sorted categorically by an unspecified property of the items in the list. + */ + CATEGORY, + /** + * The list is sorted by patient, with items for each patient grouped together. + */ + PATIENT, + /** + * added to help the parsers + */ + NULL; + public static ListOrder fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("user".equals(codeString)) + return USER; + if ("system".equals(codeString)) + return SYSTEM; + if ("event-date".equals(codeString)) + return EVENTDATE; + if ("entry-date".equals(codeString)) + return ENTRYDATE; + if ("priority".equals(codeString)) + return PRIORITY; + if ("alphabetic".equals(codeString)) + return ALPHABETIC; + if ("category".equals(codeString)) + return CATEGORY; + if ("patient".equals(codeString)) + return PATIENT; + throw new FHIRException("Unknown ListOrder code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case USER: return "user"; + case SYSTEM: return "system"; + case EVENTDATE: return "event-date"; + case ENTRYDATE: return "entry-date"; + case PRIORITY: return "priority"; + case ALPHABETIC: return "alphabetic"; + case CATEGORY: return "category"; + case PATIENT: return "patient"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-order"; + } + public String getDefinition() { + switch (this) { + case USER: return "The list was sorted by a user. The criteria the user used are not specified."; + case SYSTEM: return "The list was sorted by the system. The criteria the user used are not specified; define additional codes to specify a particular order (or use other defined codes)."; + case EVENTDATE: return "The list is sorted by the data of the event. This can be used when the list has items which are dates with past or future events."; + case ENTRYDATE: return "The list is sorted by the date the item was added to the list. Note that the date added to the list is not explicit in the list itself."; + case PRIORITY: return "The list is sorted by priority. The exact method in which priority has been determined is not specified."; + case ALPHABETIC: return "The list is sorted alphabetically by an unspecified property of the items in the list."; + case CATEGORY: return "The list is sorted categorically by an unspecified property of the items in the list."; + case PATIENT: return "The list is sorted by patient, with items for each patient grouped together."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case USER: return "Sorted by User"; + case SYSTEM: return "Sorted by System"; + case EVENTDATE: return "Sorted by Event Date"; + case ENTRYDATE: return "Sorted by Item Date"; + case PRIORITY: return "Sorted by Priority"; + case ALPHABETIC: return "Sorted Alphabetically"; + case CATEGORY: return "Sorted by Category"; + case PATIENT: return "Sorted by Patient"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListOrderEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListOrderEnumFactory.java new file mode 100644 index 00000000000..50b0a38ca2d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListOrderEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ListOrderEnumFactory implements EnumFactory { + + public ListOrder fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("user".equals(codeString)) + return ListOrder.USER; + if ("system".equals(codeString)) + return ListOrder.SYSTEM; + if ("event-date".equals(codeString)) + return ListOrder.EVENTDATE; + if ("entry-date".equals(codeString)) + return ListOrder.ENTRYDATE; + if ("priority".equals(codeString)) + return ListOrder.PRIORITY; + if ("alphabetic".equals(codeString)) + return ListOrder.ALPHABETIC; + if ("category".equals(codeString)) + return ListOrder.CATEGORY; + if ("patient".equals(codeString)) + return ListOrder.PATIENT; + throw new IllegalArgumentException("Unknown ListOrder code '"+codeString+"'"); + } + + public String toCode(ListOrder code) { + if (code == ListOrder.USER) + return "user"; + if (code == ListOrder.SYSTEM) + return "system"; + if (code == ListOrder.EVENTDATE) + return "event-date"; + if (code == ListOrder.ENTRYDATE) + return "entry-date"; + if (code == ListOrder.PRIORITY) + return "priority"; + if (code == ListOrder.ALPHABETIC) + return "alphabetic"; + if (code == ListOrder.CATEGORY) + return "category"; + if (code == ListOrder.PATIENT) + return "patient"; + return "?"; + } + + public String toSystem(ListOrder code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListStatus.java new file mode 100644 index 00000000000..7a071258798 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ListStatus { + + /** + * The list is considered to be an active part of the patient's record. + */ + CURRENT, + /** + * The list is "old" and should no longer be considered accurate or relevant. + */ + RETIRED, + /** + * The list was never accurate. It is retained for medico-legal purposes only. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ListStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return CURRENT; + if ("retired".equals(codeString)) + return RETIRED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ListStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CURRENT: return "current"; + case RETIRED: return "retired"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/list-status"; + } + public String getDefinition() { + switch (this) { + case CURRENT: return "The list is considered to be an active part of the patient's record."; + case RETIRED: return "The list is \"old\" and should no longer be considered accurate or relevant."; + case ENTEREDINERROR: return "The list was never accurate. It is retained for medico-legal purposes only."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CURRENT: return "Current"; + case RETIRED: return "Retired"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListStatusEnumFactory.java new file mode 100644 index 00000000000..9c9f834d264 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ListStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ListStatusEnumFactory implements EnumFactory { + + public ListStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("current".equals(codeString)) + return ListStatus.CURRENT; + if ("retired".equals(codeString)) + return ListStatus.RETIRED; + if ("entered-in-error".equals(codeString)) + return ListStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ListStatus code '"+codeString+"'"); + } + + public String toCode(ListStatus code) { + if (code == ListStatus.CURRENT) + return "current"; + if (code == ListStatus.RETIRED) + return "retired"; + if (code == ListStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(ListStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationMode.java new file mode 100644 index 00000000000..92b28367469 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LocationMode { + + /** + * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). + */ + INSTANCE, + /** + * The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.). + */ + KIND, + /** + * added to help the parsers + */ + NULL; + public static LocationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("kind".equals(codeString)) + return KIND; + throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case KIND: return "kind"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/location-mode"; + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A)."; + case KIND: return "The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case KIND: return "Kind"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationModeEnumFactory.java new file mode 100644 index 00000000000..260873e5307 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationModeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class LocationModeEnumFactory implements EnumFactory { + + public LocationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return LocationMode.INSTANCE; + if ("kind".equals(codeString)) + return LocationMode.KIND; + throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'"); + } + + public String toCode(LocationMode code) { + if (code == LocationMode.INSTANCE) + return "instance"; + if (code == LocationMode.KIND) + return "kind"; + return "?"; + } + + public String toSystem(LocationMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationPhysicalType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationPhysicalType.java new file mode 100644 index 00000000000..052627ad5f6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationPhysicalType.java @@ -0,0 +1,195 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LocationPhysicalType { + + /** + * A collection of buildings or other locations such as a site or a campus. + */ + SI, + /** + * Any Building or structure. This may contain rooms, corridors, wings, etc. It may not have walls, or a roof, but is considered a defined/allocated space. + */ + BU, + /** + * A Wing within a Building, this often contains levels, rooms and corridors. + */ + WI, + /** + * A Ward is a section of a medical facility that may contain rooms and other types of location. + */ + WA, + /** + * A Level in a multi-level Building/Structure. + */ + LVL, + /** + * Any corridor within a Building, that may connect rooms. + */ + CO, + /** + * A space that is allocated as a room, it may have walls/roof etc., but does not require these. + */ + RO, + /** + * A space that is allocated for sleeping/laying on. This is not the physical bed/trolley that may be moved about, but the space it may occupy. + */ + BD, + /** + * A means of transportation. + */ + VE, + /** + * A residential dwelling. Usually used to reference a location that a person/patient may reside. + */ + HO, + /** + * A container that can store goods, equipment, medications or other items. + */ + CA, + /** + * A defined path to travel between 2 points that has a known name. + */ + RD, + /** + * A defined physical boundary of something, such as a flood risk zone, region, postcode + */ + AREA, + /** + * A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health), Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy), not just an physical boundry + */ + JDN, + /** + * added to help the parsers + */ + NULL; + public static LocationPhysicalType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("si".equals(codeString)) + return SI; + if ("bu".equals(codeString)) + return BU; + if ("wi".equals(codeString)) + return WI; + if ("wa".equals(codeString)) + return WA; + if ("lvl".equals(codeString)) + return LVL; + if ("co".equals(codeString)) + return CO; + if ("ro".equals(codeString)) + return RO; + if ("bd".equals(codeString)) + return BD; + if ("ve".equals(codeString)) + return VE; + if ("ho".equals(codeString)) + return HO; + if ("ca".equals(codeString)) + return CA; + if ("rd".equals(codeString)) + return RD; + if ("area".equals(codeString)) + return AREA; + if ("jdn".equals(codeString)) + return JDN; + throw new FHIRException("Unknown LocationPhysicalType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SI: return "si"; + case BU: return "bu"; + case WI: return "wi"; + case WA: return "wa"; + case LVL: return "lvl"; + case CO: return "co"; + case RO: return "ro"; + case BD: return "bd"; + case VE: return "ve"; + case HO: return "ho"; + case CA: return "ca"; + case RD: return "rd"; + case AREA: return "area"; + case JDN: return "jdn"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/location-physical-type"; + } + public String getDefinition() { + switch (this) { + case SI: return "A collection of buildings or other locations such as a site or a campus."; + case BU: return "Any Building or structure. This may contain rooms, corridors, wings, etc. It may not have walls, or a roof, but is considered a defined/allocated space."; + case WI: return "A Wing within a Building, this often contains levels, rooms and corridors."; + case WA: return "A Ward is a section of a medical facility that may contain rooms and other types of location."; + case LVL: return "A Level in a multi-level Building/Structure."; + case CO: return "Any corridor within a Building, that may connect rooms."; + case RO: return "A space that is allocated as a room, it may have walls/roof etc., but does not require these."; + case BD: return "A space that is allocated for sleeping/laying on. This is not the physical bed/trolley that may be moved about, but the space it may occupy."; + case VE: return "A means of transportation."; + case HO: return "A residential dwelling. Usually used to reference a location that a person/patient may reside."; + case CA: return "A container that can store goods, equipment, medications or other items."; + case RD: return "A defined path to travel between 2 points that has a known name."; + case AREA: return "A defined physical boundary of something, such as a flood risk zone, region, postcode"; + case JDN: return "A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health), Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy), not just an physical boundry"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SI: return "Site"; + case BU: return "Building"; + case WI: return "Wing"; + case WA: return "Ward"; + case LVL: return "Level"; + case CO: return "Corridor"; + case RO: return "Room"; + case BD: return "Bed"; + case VE: return "Vehicle"; + case HO: return "House"; + case CA: return "Cabinet"; + case RD: return "Road"; + case AREA: return "Area"; + case JDN: return "Jurisdiction"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationPhysicalTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationPhysicalTypeEnumFactory.java new file mode 100644 index 00000000000..f23b8ce69c0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationPhysicalTypeEnumFactory.java @@ -0,0 +1,110 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class LocationPhysicalTypeEnumFactory implements EnumFactory { + + public LocationPhysicalType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("si".equals(codeString)) + return LocationPhysicalType.SI; + if ("bu".equals(codeString)) + return LocationPhysicalType.BU; + if ("wi".equals(codeString)) + return LocationPhysicalType.WI; + if ("wa".equals(codeString)) + return LocationPhysicalType.WA; + if ("lvl".equals(codeString)) + return LocationPhysicalType.LVL; + if ("co".equals(codeString)) + return LocationPhysicalType.CO; + if ("ro".equals(codeString)) + return LocationPhysicalType.RO; + if ("bd".equals(codeString)) + return LocationPhysicalType.BD; + if ("ve".equals(codeString)) + return LocationPhysicalType.VE; + if ("ho".equals(codeString)) + return LocationPhysicalType.HO; + if ("ca".equals(codeString)) + return LocationPhysicalType.CA; + if ("rd".equals(codeString)) + return LocationPhysicalType.RD; + if ("area".equals(codeString)) + return LocationPhysicalType.AREA; + if ("jdn".equals(codeString)) + return LocationPhysicalType.JDN; + throw new IllegalArgumentException("Unknown LocationPhysicalType code '"+codeString+"'"); + } + + public String toCode(LocationPhysicalType code) { + if (code == LocationPhysicalType.SI) + return "si"; + if (code == LocationPhysicalType.BU) + return "bu"; + if (code == LocationPhysicalType.WI) + return "wi"; + if (code == LocationPhysicalType.WA) + return "wa"; + if (code == LocationPhysicalType.LVL) + return "lvl"; + if (code == LocationPhysicalType.CO) + return "co"; + if (code == LocationPhysicalType.RO) + return "ro"; + if (code == LocationPhysicalType.BD) + return "bd"; + if (code == LocationPhysicalType.VE) + return "ve"; + if (code == LocationPhysicalType.HO) + return "ho"; + if (code == LocationPhysicalType.CA) + return "ca"; + if (code == LocationPhysicalType.RD) + return "rd"; + if (code == LocationPhysicalType.AREA) + return "area"; + if (code == LocationPhysicalType.JDN) + return "jdn"; + return "?"; + } + + public String toSystem(LocationPhysicalType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationStatus.java new file mode 100644 index 00000000000..bc34466c2e0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum LocationStatus { + + /** + * The location is operational. + */ + ACTIVE, + /** + * The location is temporarily closed. + */ + SUSPENDED, + /** + * The location is no longer used. + */ + INACTIVE, + /** + * added to help the parsers + */ + NULL; + public static LocationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("inactive".equals(codeString)) + return INACTIVE; + throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case INACTIVE: return "inactive"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/location-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The location is operational."; + case SUSPENDED: return "The location is temporarily closed."; + case INACTIVE: return "The location is no longer used."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case INACTIVE: return "Inactive"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationStatusEnumFactory.java new file mode 100644 index 00000000000..03e0f86b47a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/LocationStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class LocationStatusEnumFactory implements EnumFactory { + + public LocationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return LocationStatus.ACTIVE; + if ("suspended".equals(codeString)) + return LocationStatus.SUSPENDED; + if ("inactive".equals(codeString)) + return LocationStatus.INACTIVE; + throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'"); + } + + public String toCode(LocationStatus code) { + if (code == LocationStatus.ACTIVE) + return "active"; + if (code == LocationStatus.SUSPENDED) + return "suspended"; + if (code == LocationStatus.INACTIVE) + return "inactive"; + return "?"; + } + + public String toSystem(LocationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapContextType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapContextType.java new file mode 100644 index 00000000000..faa5380f746 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapContextType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapContextType { + + /** + * The context specifies a type + */ + TYPE, + /** + * The context specifies a variable + */ + VARIABLE, + /** + * added to help the parsers + */ + NULL; + public static MapContextType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return TYPE; + if ("variable".equals(codeString)) + return VARIABLE; + throw new FHIRException("Unknown MapContextType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TYPE: return "type"; + case VARIABLE: return "variable"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-context-type"; + } + public String getDefinition() { + switch (this) { + case TYPE: return "The context specifies a type"; + case VARIABLE: return "The context specifies a variable"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TYPE: return "Type"; + case VARIABLE: return "Variable"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapContextTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapContextTypeEnumFactory.java new file mode 100644 index 00000000000..68b0ac4b0f7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapContextTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapContextTypeEnumFactory implements EnumFactory { + + public MapContextType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return MapContextType.TYPE; + if ("variable".equals(codeString)) + return MapContextType.VARIABLE; + throw new IllegalArgumentException("Unknown MapContextType code '"+codeString+"'"); + } + + public String toCode(MapContextType code) { + if (code == MapContextType.TYPE) + return "type"; + if (code == MapContextType.VARIABLE) + return "variable"; + return "?"; + } + + public String toSystem(MapContextType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapGroupTypeMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapGroupTypeMode.java new file mode 100644 index 00000000000..56c6e92d355 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapGroupTypeMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapGroupTypeMode { + + /** + * This group is not a default group for the types + */ + NONE, + /** + * This group is a default mapping group for the specified types and for the primary source type + */ + TYPES, + /** + * This group is a default mapping group for the specified types + */ + TYPEANDTYPES, + /** + * added to help the parsers + */ + NULL; + public static MapGroupTypeMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("none".equals(codeString)) + return NONE; + if ("types".equals(codeString)) + return TYPES; + if ("type-and-types".equals(codeString)) + return TYPEANDTYPES; + throw new FHIRException("Unknown MapGroupTypeMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NONE: return "none"; + case TYPES: return "types"; + case TYPEANDTYPES: return "type-and-types"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-group-type-mode"; + } + public String getDefinition() { + switch (this) { + case NONE: return "This group is not a default group for the types"; + case TYPES: return "This group is a default mapping group for the specified types and for the primary source type"; + case TYPEANDTYPES: return "This group is a default mapping group for the specified types"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NONE: return "Not a Default"; + case TYPES: return "Default for Type Combination"; + case TYPEANDTYPES: return "Default for type + combination"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapGroupTypeModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapGroupTypeModeEnumFactory.java new file mode 100644 index 00000000000..e2fa9a351b7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapGroupTypeModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapGroupTypeModeEnumFactory implements EnumFactory { + + public MapGroupTypeMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("none".equals(codeString)) + return MapGroupTypeMode.NONE; + if ("types".equals(codeString)) + return MapGroupTypeMode.TYPES; + if ("type-and-types".equals(codeString)) + return MapGroupTypeMode.TYPEANDTYPES; + throw new IllegalArgumentException("Unknown MapGroupTypeMode code '"+codeString+"'"); + } + + public String toCode(MapGroupTypeMode code) { + if (code == MapGroupTypeMode.NONE) + return "none"; + if (code == MapGroupTypeMode.TYPES) + return "types"; + if (code == MapGroupTypeMode.TYPEANDTYPES) + return "type-and-types"; + return "?"; + } + + public String toSystem(MapGroupTypeMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapInputMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapInputMode.java new file mode 100644 index 00000000000..6e5ffbebc0e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapInputMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapInputMode { + + /** + * Names an input instance used a source for mapping + */ + SOURCE, + /** + * Names an instance that is being populated + */ + TARGET, + /** + * added to help the parsers + */ + NULL; + public static MapInputMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return SOURCE; + if ("target".equals(codeString)) + return TARGET; + throw new FHIRException("Unknown MapInputMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOURCE: return "source"; + case TARGET: return "target"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-input-mode"; + } + public String getDefinition() { + switch (this) { + case SOURCE: return "Names an input instance used a source for mapping"; + case TARGET: return "Names an instance that is being populated"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOURCE: return "Source Instance"; + case TARGET: return "Target Instance"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapInputModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapInputModeEnumFactory.java new file mode 100644 index 00000000000..c82feea2188 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapInputModeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapInputModeEnumFactory implements EnumFactory { + + public MapInputMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return MapInputMode.SOURCE; + if ("target".equals(codeString)) + return MapInputMode.TARGET; + throw new IllegalArgumentException("Unknown MapInputMode code '"+codeString+"'"); + } + + public String toCode(MapInputMode code) { + if (code == MapInputMode.SOURCE) + return "source"; + if (code == MapInputMode.TARGET) + return "target"; + return "?"; + } + + public String toSystem(MapInputMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapModelMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapModelMode.java new file mode 100644 index 00000000000..9cfcca97d9e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapModelMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapModelMode { + + /** + * This structure describes an instance passed to the mapping engine that is used a source of data + */ + SOURCE, + /** + * This structure describes an instance that the mapping engine may ask for that is used a source of data + */ + QUERIED, + /** + * This structure describes an instance passed to the mapping engine that is used a target of data + */ + TARGET, + /** + * This structure describes an instance that the mapping engine may ask to create that is used a target of data + */ + PRODUCED, + /** + * added to help the parsers + */ + NULL; + public static MapModelMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return SOURCE; + if ("queried".equals(codeString)) + return QUERIED; + if ("target".equals(codeString)) + return TARGET; + if ("produced".equals(codeString)) + return PRODUCED; + throw new FHIRException("Unknown MapModelMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOURCE: return "source"; + case QUERIED: return "queried"; + case TARGET: return "target"; + case PRODUCED: return "produced"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-model-mode"; + } + public String getDefinition() { + switch (this) { + case SOURCE: return "This structure describes an instance passed to the mapping engine that is used a source of data"; + case QUERIED: return "This structure describes an instance that the mapping engine may ask for that is used a source of data"; + case TARGET: return "This structure describes an instance passed to the mapping engine that is used a target of data"; + case PRODUCED: return "This structure describes an instance that the mapping engine may ask to create that is used a target of data"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOURCE: return "Source Structure Definition"; + case QUERIED: return "Queried Structure Definition"; + case TARGET: return "Target Structure Definition"; + case PRODUCED: return "Produced Structure Definition"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapModelModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapModelModeEnumFactory.java new file mode 100644 index 00000000000..07c150a21eb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapModelModeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapModelModeEnumFactory implements EnumFactory { + + public MapModelMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return MapModelMode.SOURCE; + if ("queried".equals(codeString)) + return MapModelMode.QUERIED; + if ("target".equals(codeString)) + return MapModelMode.TARGET; + if ("produced".equals(codeString)) + return MapModelMode.PRODUCED; + throw new IllegalArgumentException("Unknown MapModelMode code '"+codeString+"'"); + } + + public String toCode(MapModelMode code) { + if (code == MapModelMode.SOURCE) + return "source"; + if (code == MapModelMode.QUERIED) + return "queried"; + if (code == MapModelMode.TARGET) + return "target"; + if (code == MapModelMode.PRODUCED) + return "produced"; + return "?"; + } + + public String toSystem(MapModelMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapSourceListMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapSourceListMode.java new file mode 100644 index 00000000000..e69ef1cb0a8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapSourceListMode.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapSourceListMode { + + /** + * Only process this rule for the first in the list + */ + FIRST, + /** + * Process this rule for all but the first + */ + NOTFIRST, + /** + * Only process this rule for the last in the list + */ + LAST, + /** + * Process this rule for all but the last + */ + NOTLAST, + /** + * Only process this rule is there is only item + */ + ONLYONE, + /** + * added to help the parsers + */ + NULL; + public static MapSourceListMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return FIRST; + if ("not_first".equals(codeString)) + return NOTFIRST; + if ("last".equals(codeString)) + return LAST; + if ("not_last".equals(codeString)) + return NOTLAST; + if ("only_one".equals(codeString)) + return ONLYONE; + throw new FHIRException("Unknown MapSourceListMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FIRST: return "first"; + case NOTFIRST: return "not_first"; + case LAST: return "last"; + case NOTLAST: return "not_last"; + case ONLYONE: return "only_one"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-source-list-mode"; + } + public String getDefinition() { + switch (this) { + case FIRST: return "Only process this rule for the first in the list"; + case NOTFIRST: return "Process this rule for all but the first"; + case LAST: return "Only process this rule for the last in the list"; + case NOTLAST: return "Process this rule for all but the last"; + case ONLYONE: return "Only process this rule is there is only item"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FIRST: return "First"; + case NOTFIRST: return "All but the first"; + case LAST: return "Last"; + case NOTLAST: return "All but the last"; + case ONLYONE: return "Enforce only one"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapSourceListModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapSourceListModeEnumFactory.java new file mode 100644 index 00000000000..71de39760c9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapSourceListModeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapSourceListModeEnumFactory implements EnumFactory { + + public MapSourceListMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return MapSourceListMode.FIRST; + if ("not_first".equals(codeString)) + return MapSourceListMode.NOTFIRST; + if ("last".equals(codeString)) + return MapSourceListMode.LAST; + if ("not_last".equals(codeString)) + return MapSourceListMode.NOTLAST; + if ("only_one".equals(codeString)) + return MapSourceListMode.ONLYONE; + throw new IllegalArgumentException("Unknown MapSourceListMode code '"+codeString+"'"); + } + + public String toCode(MapSourceListMode code) { + if (code == MapSourceListMode.FIRST) + return "first"; + if (code == MapSourceListMode.NOTFIRST) + return "not_first"; + if (code == MapSourceListMode.LAST) + return "last"; + if (code == MapSourceListMode.NOTLAST) + return "not_last"; + if (code == MapSourceListMode.ONLYONE) + return "only_one"; + return "?"; + } + + public String toSystem(MapSourceListMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTargetListMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTargetListMode.java new file mode 100644 index 00000000000..495ee89f673 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTargetListMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapTargetListMode { + + /** + * when the target list is being assembled, the items for this rule go first. If more that one rule defines a first item (for a given instance of mapping) then this is an error + */ + FIRST, + /** + * the target instance is shared with the target instances generated by another rule (up to the first common n items, then create new ones) + */ + SHARE, + /** + * when the target list is being assembled, the items for this rule go last. If more that one rule defines a last item (for a given instance of mapping) then this is an error + */ + LAST, + /** + * re-use the first item in the list, and keep adding content to it + */ + COLLATE, + /** + * added to help the parsers + */ + NULL; + public static MapTargetListMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return FIRST; + if ("share".equals(codeString)) + return SHARE; + if ("last".equals(codeString)) + return LAST; + if ("collate".equals(codeString)) + return COLLATE; + throw new FHIRException("Unknown MapTargetListMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FIRST: return "first"; + case SHARE: return "share"; + case LAST: return "last"; + case COLLATE: return "collate"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-target-list-mode"; + } + public String getDefinition() { + switch (this) { + case FIRST: return "when the target list is being assembled, the items for this rule go first. If more that one rule defines a first item (for a given instance of mapping) then this is an error"; + case SHARE: return "the target instance is shared with the target instances generated by another rule (up to the first common n items, then create new ones)"; + case LAST: return "when the target list is being assembled, the items for this rule go last. If more that one rule defines a last item (for a given instance of mapping) then this is an error"; + case COLLATE: return "re-use the first item in the list, and keep adding content to it"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FIRST: return "First"; + case SHARE: return "Share"; + case LAST: return "Last"; + case COLLATE: return "Collate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTargetListModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTargetListModeEnumFactory.java new file mode 100644 index 00000000000..5dd0ffe5eae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTargetListModeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapTargetListModeEnumFactory implements EnumFactory { + + public MapTargetListMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return MapTargetListMode.FIRST; + if ("share".equals(codeString)) + return MapTargetListMode.SHARE; + if ("last".equals(codeString)) + return MapTargetListMode.LAST; + if ("collate".equals(codeString)) + return MapTargetListMode.COLLATE; + throw new IllegalArgumentException("Unknown MapTargetListMode code '"+codeString+"'"); + } + + public String toCode(MapTargetListMode code) { + if (code == MapTargetListMode.FIRST) + return "first"; + if (code == MapTargetListMode.SHARE) + return "share"; + if (code == MapTargetListMode.LAST) + return "last"; + if (code == MapTargetListMode.COLLATE) + return "collate"; + return "?"; + } + + public String toSystem(MapTargetListMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTransform.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTransform.java new file mode 100644 index 00000000000..02480cd0804 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTransform.java @@ -0,0 +1,222 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MapTransform { + + /** + * create(type : string) - type is passed through to the application on the standard API, and must be known by it + */ + CREATE, + /** + * copy(source) + */ + COPY, + /** + * truncate(source, length) - source must be stringy type + */ + TRUNCATE, + /** + * escape(source, fmt1, fmt2) - change source from one kind of escaping to another (plain, java, xml, json). note that this is for when the string itself is escaped + */ + ESCAPE, + /** + * cast(source, type?) - case source from one type to another. target type can be left as implicit if there is one and only one target type known + */ + CAST, + /** + * append(source...) - source is element or string + */ + APPEND, + /** + * translate(source, uri_of_map) - use the translate operation + */ + TRANSLATE, + /** + * reference(source : object) - return a string that references the provided tree properly + */ + REFERENCE, + /** + * Perform a date operation. *Parameters to be documented* + */ + DATEOP, + /** + * Generate a random UUID (in lowercase). No Parameters + */ + UUID, + /** + * Return the appropriate string to put in a reference that refers to the resource provided as a parameter + */ + POINTER, + /** + * Execute the supplied fluentpath expression and use the value returned by that + */ + EVALUATE, + /** + * Create a CodeableConcept. Parameters = (text) or (system. Code[, display]) + */ + CC, + /** + * Create a Coding. Parameters = (system. Code[, display]) + */ + C, + /** + * Create a quantity. Parameters = (text) or (value, unit, [system, code]) where text is the natural representation e.g. [comparator]value[space]unit + */ + QTY, + /** + * Create an identifier. Parameters = (system, value[, type]) where type is a code from the identifier type value set + */ + ID, + /** + * Create a contact details. Parameters = (value) or (system, value). If no system is provided, the system should be inferred from the content of the value + */ + CP, + /** + * added to help the parsers + */ + NULL; + public static MapTransform fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("copy".equals(codeString)) + return COPY; + if ("truncate".equals(codeString)) + return TRUNCATE; + if ("escape".equals(codeString)) + return ESCAPE; + if ("cast".equals(codeString)) + return CAST; + if ("append".equals(codeString)) + return APPEND; + if ("translate".equals(codeString)) + return TRANSLATE; + if ("reference".equals(codeString)) + return REFERENCE; + if ("dateOp".equals(codeString)) + return DATEOP; + if ("uuid".equals(codeString)) + return UUID; + if ("pointer".equals(codeString)) + return POINTER; + if ("evaluate".equals(codeString)) + return EVALUATE; + if ("cc".equals(codeString)) + return CC; + if ("c".equals(codeString)) + return C; + if ("qty".equals(codeString)) + return QTY; + if ("id".equals(codeString)) + return ID; + if ("cp".equals(codeString)) + return CP; + throw new FHIRException("Unknown MapTransform code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case COPY: return "copy"; + case TRUNCATE: return "truncate"; + case ESCAPE: return "escape"; + case CAST: return "cast"; + case APPEND: return "append"; + case TRANSLATE: return "translate"; + case REFERENCE: return "reference"; + case DATEOP: return "dateOp"; + case UUID: return "uuid"; + case POINTER: return "pointer"; + case EVALUATE: return "evaluate"; + case CC: return "cc"; + case C: return "c"; + case QTY: return "qty"; + case ID: return "id"; + case CP: return "cp"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/map-transform"; + } + public String getDefinition() { + switch (this) { + case CREATE: return "create(type : string) - type is passed through to the application on the standard API, and must be known by it"; + case COPY: return "copy(source)"; + case TRUNCATE: return "truncate(source, length) - source must be stringy type"; + case ESCAPE: return "escape(source, fmt1, fmt2) - change source from one kind of escaping to another (plain, java, xml, json). note that this is for when the string itself is escaped"; + case CAST: return "cast(source, type?) - case source from one type to another. target type can be left as implicit if there is one and only one target type known"; + case APPEND: return "append(source...) - source is element or string"; + case TRANSLATE: return "translate(source, uri_of_map) - use the translate operation"; + case REFERENCE: return "reference(source : object) - return a string that references the provided tree properly"; + case DATEOP: return "Perform a date operation. *Parameters to be documented*"; + case UUID: return "Generate a random UUID (in lowercase). No Parameters"; + case POINTER: return "Return the appropriate string to put in a reference that refers to the resource provided as a parameter"; + case EVALUATE: return "Execute the supplied fluentpath expression and use the value returned by that"; + case CC: return "Create a CodeableConcept. Parameters = (text) or (system. Code[, display])"; + case C: return "Create a Coding. Parameters = (system. Code[, display])"; + case QTY: return "Create a quantity. Parameters = (text) or (value, unit, [system, code]) where text is the natural representation e.g. [comparator]value[space]unit"; + case ID: return "Create an identifier. Parameters = (system, value[, type]) where type is a code from the identifier type value set"; + case CP: return "Create a contact details. Parameters = (value) or (system, value). If no system is provided, the system should be inferred from the content of the value"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "create"; + case COPY: return "copy"; + case TRUNCATE: return "truncate"; + case ESCAPE: return "escape"; + case CAST: return "cast"; + case APPEND: return "append"; + case TRANSLATE: return "translate"; + case REFERENCE: return "reference"; + case DATEOP: return "dateOp"; + case UUID: return "uuid"; + case POINTER: return "pointer"; + case EVALUATE: return "evaluate"; + case CC: return "cc"; + case C: return "c"; + case QTY: return "qty"; + case ID: return "id"; + case CP: return "cp"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTransformEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTransformEnumFactory.java new file mode 100644 index 00000000000..bd305eb8702 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MapTransformEnumFactory.java @@ -0,0 +1,122 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MapTransformEnumFactory implements EnumFactory { + + public MapTransform fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return MapTransform.CREATE; + if ("copy".equals(codeString)) + return MapTransform.COPY; + if ("truncate".equals(codeString)) + return MapTransform.TRUNCATE; + if ("escape".equals(codeString)) + return MapTransform.ESCAPE; + if ("cast".equals(codeString)) + return MapTransform.CAST; + if ("append".equals(codeString)) + return MapTransform.APPEND; + if ("translate".equals(codeString)) + return MapTransform.TRANSLATE; + if ("reference".equals(codeString)) + return MapTransform.REFERENCE; + if ("dateOp".equals(codeString)) + return MapTransform.DATEOP; + if ("uuid".equals(codeString)) + return MapTransform.UUID; + if ("pointer".equals(codeString)) + return MapTransform.POINTER; + if ("evaluate".equals(codeString)) + return MapTransform.EVALUATE; + if ("cc".equals(codeString)) + return MapTransform.CC; + if ("c".equals(codeString)) + return MapTransform.C; + if ("qty".equals(codeString)) + return MapTransform.QTY; + if ("id".equals(codeString)) + return MapTransform.ID; + if ("cp".equals(codeString)) + return MapTransform.CP; + throw new IllegalArgumentException("Unknown MapTransform code '"+codeString+"'"); + } + + public String toCode(MapTransform code) { + if (code == MapTransform.CREATE) + return "create"; + if (code == MapTransform.COPY) + return "copy"; + if (code == MapTransform.TRUNCATE) + return "truncate"; + if (code == MapTransform.ESCAPE) + return "escape"; + if (code == MapTransform.CAST) + return "cast"; + if (code == MapTransform.APPEND) + return "append"; + if (code == MapTransform.TRANSLATE) + return "translate"; + if (code == MapTransform.REFERENCE) + return "reference"; + if (code == MapTransform.DATEOP) + return "dateOp"; + if (code == MapTransform.UUID) + return "uuid"; + if (code == MapTransform.POINTER) + return "pointer"; + if (code == MapTransform.EVALUATE) + return "evaluate"; + if (code == MapTransform.CC) + return "cc"; + if (code == MapTransform.C) + return "c"; + if (code == MapTransform.QTY) + return "qty"; + if (code == MapTransform.ID) + return "id"; + if (code == MapTransform.CP) + return "cp"; + return "?"; + } + + public String toSystem(MapTransform code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MaritalStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MaritalStatus.java new file mode 100644 index 00000000000..7da2f43da39 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MaritalStatus.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MaritalStatus { + + /** + * The person is not presently married. The marital history is not known or stated. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static MaritalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown MaritalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/marital-status"; + } + public String getDefinition() { + switch (this) { + case U: return "The person is not presently married. The marital history is not known or stated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case U: return "Unmarried"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MaritalStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MaritalStatusEnumFactory.java new file mode 100644 index 00000000000..c188e8cc378 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MaritalStatusEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MaritalStatusEnumFactory implements EnumFactory { + + public MaritalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("U".equals(codeString)) + return MaritalStatus.U; + throw new IllegalArgumentException("Unknown MaritalStatus code '"+codeString+"'"); + } + + public String toCode(MaritalStatus code) { + if (code == MaritalStatus.U) + return "U"; + return "?"; + } + + public String toSystem(MaritalStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MatchGrade.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MatchGrade.java new file mode 100644 index 00000000000..a4513c1cd41 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MatchGrade.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MatchGrade { + + /** + * This record meets the matching criteria to be automatically considered as a full match. + */ + CERTAIN, + /** + * This record is a close match, but not a certain match. Additional review (e.g. by a human) may be required before using this as a match. + */ + PROBABLE, + /** + * This record may be a matching one. Additional review (e.g. by a human) SHOULD be performed before using this as a match. + */ + POSSIBLE, + /** + * This record is known not to be a match. Note that usually non-matching records are not returned, but in some cases records previously or likely considered as a match may specifically be negated by the matching engine + */ + CERTAINLYNOT, + /** + * added to help the parsers + */ + NULL; + public static MatchGrade fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("certain".equals(codeString)) + return CERTAIN; + if ("probable".equals(codeString)) + return PROBABLE; + if ("possible".equals(codeString)) + return POSSIBLE; + if ("certainly-not".equals(codeString)) + return CERTAINLYNOT; + throw new FHIRException("Unknown MatchGrade code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CERTAIN: return "certain"; + case PROBABLE: return "probable"; + case POSSIBLE: return "possible"; + case CERTAINLYNOT: return "certainly-not"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/match-grade"; + } + public String getDefinition() { + switch (this) { + case CERTAIN: return "This record meets the matching criteria to be automatically considered as a full match."; + case PROBABLE: return "This record is a close match, but not a certain match. Additional review (e.g. by a human) may be required before using this as a match."; + case POSSIBLE: return "This record may be a matching one. Additional review (e.g. by a human) SHOULD be performed before using this as a match."; + case CERTAINLYNOT: return "This record is known not to be a match. Note that usually non-matching records are not returned, but in some cases records previously or likely considered as a match may specifically be negated by the matching engine"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CERTAIN: return "Certain Match"; + case PROBABLE: return "Probable Match"; + case POSSIBLE: return "Possible Match"; + case CERTAINLYNOT: return "Certainly Not a Match"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MatchGradeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MatchGradeEnumFactory.java new file mode 100644 index 00000000000..6759d0c9df8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MatchGradeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MatchGradeEnumFactory implements EnumFactory { + + public MatchGrade fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("certain".equals(codeString)) + return MatchGrade.CERTAIN; + if ("probable".equals(codeString)) + return MatchGrade.PROBABLE; + if ("possible".equals(codeString)) + return MatchGrade.POSSIBLE; + if ("certainly-not".equals(codeString)) + return MatchGrade.CERTAINLYNOT; + throw new IllegalArgumentException("Unknown MatchGrade code '"+codeString+"'"); + } + + public String toCode(MatchGrade code) { + if (code == MatchGrade.CERTAIN) + return "certain"; + if (code == MatchGrade.PROBABLE) + return "probable"; + if (code == MatchGrade.POSSIBLE) + return "possible"; + if (code == MatchGrade.CERTAINLYNOT) + return "certainly-not"; + return "?"; + } + + public String toSystem(MatchGrade code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureDataUsage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureDataUsage.java new file mode 100644 index 00000000000..199243d9461 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureDataUsage.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasureDataUsage { + + /** + * The data is intended to be provided as additional information alongside the measure results + */ + SUPPLEMENTALDATA, + /** + * The data is intended to be used to calculate and apply a risk adjustment model for the measure + */ + RISKADJUSTMENTFACTOR, + /** + * added to help the parsers + */ + NULL; + public static MeasureDataUsage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("supplemental-data".equals(codeString)) + return SUPPLEMENTALDATA; + if ("risk-adjustment-factor".equals(codeString)) + return RISKADJUSTMENTFACTOR; + throw new FHIRException("Unknown MeasureDataUsage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUPPLEMENTALDATA: return "supplemental-data"; + case RISKADJUSTMENTFACTOR: return "risk-adjustment-factor"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measure-data-usage"; + } + public String getDefinition() { + switch (this) { + case SUPPLEMENTALDATA: return "The data is intended to be provided as additional information alongside the measure results"; + case RISKADJUSTMENTFACTOR: return "The data is intended to be used to calculate and apply a risk adjustment model for the measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUPPLEMENTALDATA: return "Supplemental Data"; + case RISKADJUSTMENTFACTOR: return "Risk Adjustment Factor"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureDataUsageEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureDataUsageEnumFactory.java new file mode 100644 index 00000000000..1bbc6943291 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureDataUsageEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasureDataUsageEnumFactory implements EnumFactory { + + public MeasureDataUsage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("supplemental-data".equals(codeString)) + return MeasureDataUsage.SUPPLEMENTALDATA; + if ("risk-adjustment-factor".equals(codeString)) + return MeasureDataUsage.RISKADJUSTMENTFACTOR; + throw new IllegalArgumentException("Unknown MeasureDataUsage code '"+codeString+"'"); + } + + public String toCode(MeasureDataUsage code) { + if (code == MeasureDataUsage.SUPPLEMENTALDATA) + return "supplemental-data"; + if (code == MeasureDataUsage.RISKADJUSTMENTFACTOR) + return "risk-adjustment-factor"; + return "?"; + } + + public String toSystem(MeasureDataUsage code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurePopulation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurePopulation.java new file mode 100644 index 00000000000..9620ae38910 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurePopulation.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasurePopulation { + + /** + * The initial population refers to all patients or events to be evaluated by a quality measure involving patients who share a common set of specified characterstics. All patients or events counted (for example, as numerator, as denominator) are drawn from the initial population + */ + INITIALPOPULATION, + /** + * The upper portion of a fraction used to calculate a rate, proportion, or ratio. Also called the measure focus, it is the target process, condition, event, or outcome. Numerator criteria are the processes or outcomes expected for each patient, or event defined in the denominator. A numerator statement describes the clinical action that satisfies the conditions of the measure + */ + NUMERATOR, + /** + * Numerator exclusion criteria define patients or events to be removed from the numerator. Numerator exclusions are used in proportion and ratio measures to help narrow the numerator (for inverted measures) + */ + NUMERATOREXCLUSION, + /** + * The lower portion of a fraction used to calculate a rate, proportion, or ratio. The denominator can be the same as the initial population, or a subset of the initial population to further constrain the population for the purpose of the measure + */ + DENOMINATOR, + /** + * Denominator exclusion criteria define patients or events that should be removed from the denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator. For example, patients with bilateral lower extremity amputations would be listed as a denominator exclusion for a measure requiring foot exams + */ + DENOMINATOREXCLUSION, + /** + * Denominator exceptions are conditions that should remove a patient or event from the denominator of a measure only if the numerator criteria are not met. Denominator exception allows for adjustment of the calculated score for those providers with higher risk populations. Denominator exception criteria are only used in proportion measures + */ + DENOMINATOREXCEPTION, + /** + * Measure population criteria define the patients or events for which the individual observation for the measure should be taken. Measure populations are used for continuous variable measures rather than numerator and denominator criteria + */ + MEASUREPOPULATION, + /** + * Measure population criteria define the patients or events that should be removed from the measure population before determining the outcome of one or more continuous variables defined for the measure observation. Measure population exclusion criteria are used within continuous variable measures to help narrow the measure population + */ + MEASUREPOPULATIONEXCLUSION, + /** + * Defines the individual observation to be performed for each patient or event in the measure population. Measure observations for each case in the population are aggregated to determine the overall measure score for the population + */ + MEASUREOBSERVATION, + /** + * added to help the parsers + */ + NULL; + public static MeasurePopulation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("initial-population".equals(codeString)) + return INITIALPOPULATION; + if ("numerator".equals(codeString)) + return NUMERATOR; + if ("numerator-exclusion".equals(codeString)) + return NUMERATOREXCLUSION; + if ("denominator".equals(codeString)) + return DENOMINATOR; + if ("denominator-exclusion".equals(codeString)) + return DENOMINATOREXCLUSION; + if ("denominator-exception".equals(codeString)) + return DENOMINATOREXCEPTION; + if ("measure-population".equals(codeString)) + return MEASUREPOPULATION; + if ("measure-population-exclusion".equals(codeString)) + return MEASUREPOPULATIONEXCLUSION; + if ("measure-observation".equals(codeString)) + return MEASUREOBSERVATION; + throw new FHIRException("Unknown MeasurePopulation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INITIALPOPULATION: return "initial-population"; + case NUMERATOR: return "numerator"; + case NUMERATOREXCLUSION: return "numerator-exclusion"; + case DENOMINATOR: return "denominator"; + case DENOMINATOREXCLUSION: return "denominator-exclusion"; + case DENOMINATOREXCEPTION: return "denominator-exception"; + case MEASUREPOPULATION: return "measure-population"; + case MEASUREPOPULATIONEXCLUSION: return "measure-population-exclusion"; + case MEASUREOBSERVATION: return "measure-observation"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measure-population"; + } + public String getDefinition() { + switch (this) { + case INITIALPOPULATION: return "The initial population refers to all patients or events to be evaluated by a quality measure involving patients who share a common set of specified characterstics. All patients or events counted (for example, as numerator, as denominator) are drawn from the initial population"; + case NUMERATOR: return "The upper portion of a fraction used to calculate a rate, proportion, or ratio. Also called the measure focus, it is the target process, condition, event, or outcome. Numerator criteria are the processes or outcomes expected for each patient, or event defined in the denominator. A numerator statement describes the clinical action that satisfies the conditions of the measure"; + case NUMERATOREXCLUSION: return "Numerator exclusion criteria define patients or events to be removed from the numerator. Numerator exclusions are used in proportion and ratio measures to help narrow the numerator (for inverted measures)"; + case DENOMINATOR: return "The lower portion of a fraction used to calculate a rate, proportion, or ratio. The denominator can be the same as the initial population, or a subset of the initial population to further constrain the population for the purpose of the measure"; + case DENOMINATOREXCLUSION: return "Denominator exclusion criteria define patients or events that should be removed from the denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator. For example, patients with bilateral lower extremity amputations would be listed as a denominator exclusion for a measure requiring foot exams"; + case DENOMINATOREXCEPTION: return "Denominator exceptions are conditions that should remove a patient or event from the denominator of a measure only if the numerator criteria are not met. Denominator exception allows for adjustment of the calculated score for those providers with higher risk populations. Denominator exception criteria are only used in proportion measures"; + case MEASUREPOPULATION: return "Measure population criteria define the patients or events for which the individual observation for the measure should be taken. Measure populations are used for continuous variable measures rather than numerator and denominator criteria"; + case MEASUREPOPULATIONEXCLUSION: return "Measure population criteria define the patients or events that should be removed from the measure population before determining the outcome of one or more continuous variables defined for the measure observation. Measure population exclusion criteria are used within continuous variable measures to help narrow the measure population"; + case MEASUREOBSERVATION: return "Defines the individual observation to be performed for each patient or event in the measure population. Measure observations for each case in the population are aggregated to determine the overall measure score for the population"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INITIALPOPULATION: return "Initial Population"; + case NUMERATOR: return "Numerator"; + case NUMERATOREXCLUSION: return "Numerator Exclusion"; + case DENOMINATOR: return "Denominator"; + case DENOMINATOREXCLUSION: return "Denominator Exclusion"; + case DENOMINATOREXCEPTION: return "Denominator Exception"; + case MEASUREPOPULATION: return "Measure Population"; + case MEASUREPOPULATIONEXCLUSION: return "Measure Population Exclusion"; + case MEASUREOBSERVATION: return "Measure Observation"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurePopulationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurePopulationEnumFactory.java new file mode 100644 index 00000000000..049ddc775e3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurePopulationEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasurePopulationEnumFactory implements EnumFactory { + + public MeasurePopulation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("initial-population".equals(codeString)) + return MeasurePopulation.INITIALPOPULATION; + if ("numerator".equals(codeString)) + return MeasurePopulation.NUMERATOR; + if ("numerator-exclusion".equals(codeString)) + return MeasurePopulation.NUMERATOREXCLUSION; + if ("denominator".equals(codeString)) + return MeasurePopulation.DENOMINATOR; + if ("denominator-exclusion".equals(codeString)) + return MeasurePopulation.DENOMINATOREXCLUSION; + if ("denominator-exception".equals(codeString)) + return MeasurePopulation.DENOMINATOREXCEPTION; + if ("measure-population".equals(codeString)) + return MeasurePopulation.MEASUREPOPULATION; + if ("measure-population-exclusion".equals(codeString)) + return MeasurePopulation.MEASUREPOPULATIONEXCLUSION; + if ("measure-observation".equals(codeString)) + return MeasurePopulation.MEASUREOBSERVATION; + throw new IllegalArgumentException("Unknown MeasurePopulation code '"+codeString+"'"); + } + + public String toCode(MeasurePopulation code) { + if (code == MeasurePopulation.INITIALPOPULATION) + return "initial-population"; + if (code == MeasurePopulation.NUMERATOR) + return "numerator"; + if (code == MeasurePopulation.NUMERATOREXCLUSION) + return "numerator-exclusion"; + if (code == MeasurePopulation.DENOMINATOR) + return "denominator"; + if (code == MeasurePopulation.DENOMINATOREXCLUSION) + return "denominator-exclusion"; + if (code == MeasurePopulation.DENOMINATOREXCEPTION) + return "denominator-exception"; + if (code == MeasurePopulation.MEASUREPOPULATION) + return "measure-population"; + if (code == MeasurePopulation.MEASUREPOPULATIONEXCLUSION) + return "measure-population-exclusion"; + if (code == MeasurePopulation.MEASUREOBSERVATION) + return "measure-observation"; + return "?"; + } + + public String toSystem(MeasurePopulation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportStatus.java new file mode 100644 index 00000000000..1654caf9c6b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasureReportStatus { + + /** + * The report is complete and ready for use + */ + COMPLETE, + /** + * The report is currently being generated + */ + PENDING, + /** + * An error occurred attempting to generate the report + */ + ERROR, + /** + * added to help the parsers + */ + NULL; + public static MeasureReportStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("pending".equals(codeString)) + return PENDING; + if ("error".equals(codeString)) + return ERROR; + throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PENDING: return "pending"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measure-report-status"; + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The report is complete and ready for use"; + case PENDING: return "The report is currently being generated"; + case ERROR: return "An error occurred attempting to generate the report"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PENDING: return "Pending"; + case ERROR: return "Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportStatusEnumFactory.java new file mode 100644 index 00000000000..b61818b3f45 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasureReportStatusEnumFactory implements EnumFactory { + + public MeasureReportStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return MeasureReportStatus.COMPLETE; + if ("pending".equals(codeString)) + return MeasureReportStatus.PENDING; + if ("error".equals(codeString)) + return MeasureReportStatus.ERROR; + throw new IllegalArgumentException("Unknown MeasureReportStatus code '"+codeString+"'"); + } + + public String toCode(MeasureReportStatus code) { + if (code == MeasureReportStatus.COMPLETE) + return "complete"; + if (code == MeasureReportStatus.PENDING) + return "pending"; + if (code == MeasureReportStatus.ERROR) + return "error"; + return "?"; + } + + public String toSystem(MeasureReportStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportType.java new file mode 100644 index 00000000000..f2220d4c9de --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasureReportType { + + /** + * An individual report that provides information on the performance for a given measure with respect to a single patient + */ + INDIVIDUAL, + /** + * A patient list report that includes a listing of patients that satisfied each population criteria in the measure + */ + PATIENTLIST, + /** + * A summary report that returns the number of patients in each population criteria for the measure + */ + SUMMARY, + /** + * added to help the parsers + */ + NULL; + public static MeasureReportType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return INDIVIDUAL; + if ("patient-list".equals(codeString)) + return PATIENTLIST; + if ("summary".equals(codeString)) + return SUMMARY; + throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INDIVIDUAL: return "individual"; + case PATIENTLIST: return "patient-list"; + case SUMMARY: return "summary"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measure-report-type"; + } + public String getDefinition() { + switch (this) { + case INDIVIDUAL: return "An individual report that provides information on the performance for a given measure with respect to a single patient"; + case PATIENTLIST: return "A patient list report that includes a listing of patients that satisfied each population criteria in the measure"; + case SUMMARY: return "A summary report that returns the number of patients in each population criteria for the measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INDIVIDUAL: return "Individual"; + case PATIENTLIST: return "Patient List"; + case SUMMARY: return "Summary"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportTypeEnumFactory.java new file mode 100644 index 00000000000..7b5c0ae493c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureReportTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasureReportTypeEnumFactory implements EnumFactory { + + public MeasureReportType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return MeasureReportType.INDIVIDUAL; + if ("patient-list".equals(codeString)) + return MeasureReportType.PATIENTLIST; + if ("summary".equals(codeString)) + return MeasureReportType.SUMMARY; + throw new IllegalArgumentException("Unknown MeasureReportType code '"+codeString+"'"); + } + + public String toCode(MeasureReportType code) { + if (code == MeasureReportType.INDIVIDUAL) + return "individual"; + if (code == MeasureReportType.PATIENTLIST) + return "patient-list"; + if (code == MeasureReportType.SUMMARY) + return "summary"; + return "?"; + } + + public String toSystem(MeasureReportType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureScoring.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureScoring.java new file mode 100644 index 00000000000..c84e2cc3c0a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureScoring.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasureScoring { + + /** + * The measure score is defined using a proportion + */ + PROPORTION, + /** + * The measure score is defined using a ratio + */ + RATIO, + /** + * The score is defined by a calculation of some quantity + */ + CONTINUOUSVARIABLE, + /** + * The measure is a cohort definition + */ + COHORT, + /** + * added to help the parsers + */ + NULL; + public static MeasureScoring fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proportion".equals(codeString)) + return PROPORTION; + if ("ratio".equals(codeString)) + return RATIO; + if ("continuous-variable".equals(codeString)) + return CONTINUOUSVARIABLE; + if ("cohort".equals(codeString)) + return COHORT; + throw new FHIRException("Unknown MeasureScoring code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPORTION: return "proportion"; + case RATIO: return "ratio"; + case CONTINUOUSVARIABLE: return "continuous-variable"; + case COHORT: return "cohort"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measure-scoring"; + } + public String getDefinition() { + switch (this) { + case PROPORTION: return "The measure score is defined using a proportion"; + case RATIO: return "The measure score is defined using a ratio"; + case CONTINUOUSVARIABLE: return "The score is defined by a calculation of some quantity"; + case COHORT: return "The measure is a cohort definition"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPORTION: return "Proportion"; + case RATIO: return "Ratio"; + case CONTINUOUSVARIABLE: return "Continuous Variable"; + case COHORT: return "Cohort"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureScoringEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureScoringEnumFactory.java new file mode 100644 index 00000000000..762e7e6c551 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureScoringEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasureScoringEnumFactory implements EnumFactory { + + public MeasureScoring fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proportion".equals(codeString)) + return MeasureScoring.PROPORTION; + if ("ratio".equals(codeString)) + return MeasureScoring.RATIO; + if ("continuous-variable".equals(codeString)) + return MeasureScoring.CONTINUOUSVARIABLE; + if ("cohort".equals(codeString)) + return MeasureScoring.COHORT; + throw new IllegalArgumentException("Unknown MeasureScoring code '"+codeString+"'"); + } + + public String toCode(MeasureScoring code) { + if (code == MeasureScoring.PROPORTION) + return "proportion"; + if (code == MeasureScoring.RATIO) + return "ratio"; + if (code == MeasureScoring.CONTINUOUSVARIABLE) + return "continuous-variable"; + if (code == MeasureScoring.COHORT) + return "cohort"; + return "?"; + } + + public String toSystem(MeasureScoring code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureType.java new file mode 100644 index 00000000000..7a7485f2d1c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasureType { + + /** + * A measure which focuses on a process which leads to a certain outcome, meaning that a scientific basis exists for believing that the process, when executed well, will increase the probability of achieving a desired outcome + */ + PROCESS, + /** + * A measure that indicates the result of the performance (or non-performance) of a function or process + */ + OUTCOME, + /** + * A measure that focuses on a health care provider's capacity, systems, and processes to provide high-quality care + */ + STRUCTURE, + /** + * A measure that focuses on patient-reported information such as patient engagement or patient experience measures + */ + PATIENTREPORTEDOUTCOME, + /** + * A measure that combines multiple component measures in to a single quality measure + */ + COMPOSITE, + /** + * added to help the parsers + */ + NULL; + public static MeasureType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("process".equals(codeString)) + return PROCESS; + if ("outcome".equals(codeString)) + return OUTCOME; + if ("structure".equals(codeString)) + return STRUCTURE; + if ("patient-reported-outcome".equals(codeString)) + return PATIENTREPORTEDOUTCOME; + if ("composite".equals(codeString)) + return COMPOSITE; + throw new FHIRException("Unknown MeasureType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROCESS: return "process"; + case OUTCOME: return "outcome"; + case STRUCTURE: return "structure"; + case PATIENTREPORTEDOUTCOME: return "patient-reported-outcome"; + case COMPOSITE: return "composite"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measure-type"; + } + public String getDefinition() { + switch (this) { + case PROCESS: return "A measure which focuses on a process which leads to a certain outcome, meaning that a scientific basis exists for believing that the process, when executed well, will increase the probability of achieving a desired outcome"; + case OUTCOME: return "A measure that indicates the result of the performance (or non-performance) of a function or process"; + case STRUCTURE: return "A measure that focuses on a health care provider's capacity, systems, and processes to provide high-quality care"; + case PATIENTREPORTEDOUTCOME: return "A measure that focuses on patient-reported information such as patient engagement or patient experience measures"; + case COMPOSITE: return "A measure that combines multiple component measures in to a single quality measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROCESS: return "Process"; + case OUTCOME: return "Outcome"; + case STRUCTURE: return "Structure"; + case PATIENTREPORTEDOUTCOME: return "Patient Reported Outcome"; + case COMPOSITE: return "Composite"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureTypeEnumFactory.java new file mode 100644 index 00000000000..52fdf40f272 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasureTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasureTypeEnumFactory implements EnumFactory { + + public MeasureType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("process".equals(codeString)) + return MeasureType.PROCESS; + if ("outcome".equals(codeString)) + return MeasureType.OUTCOME; + if ("structure".equals(codeString)) + return MeasureType.STRUCTURE; + if ("patient-reported-outcome".equals(codeString)) + return MeasureType.PATIENTREPORTEDOUTCOME; + if ("composite".equals(codeString)) + return MeasureType.COMPOSITE; + throw new IllegalArgumentException("Unknown MeasureType code '"+codeString+"'"); + } + + public String toCode(MeasureType code) { + if (code == MeasureType.PROCESS) + return "process"; + if (code == MeasureType.OUTCOME) + return "outcome"; + if (code == MeasureType.STRUCTURE) + return "structure"; + if (code == MeasureType.PATIENTREPORTEDOUTCOME) + return "patient-reported-outcome"; + if (code == MeasureType.COMPOSITE) + return "composite"; + return "?"; + } + + public String toSystem(MeasureType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurementPrinciple.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurementPrinciple.java new file mode 100644 index 00000000000..7765fef29a0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurementPrinciple.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MeasurementPrinciple { + + /** + * Measurement principle isn't in the list. + */ + OTHER, + /** + * Measurement is done using the chemical principle. + */ + CHEMICAL, + /** + * Measurement is done using the electrical principle. + */ + ELECTRICAL, + /** + * Measurement is done using the impedance principle. + */ + IMPEDANCE, + /** + * Measurement is done using the nuclear principle. + */ + NUCLEAR, + /** + * Measurement is done using the optical principle. + */ + OPTICAL, + /** + * Measurement is done using the thermal principle. + */ + THERMAL, + /** + * Measurement is done using the biological principle. + */ + BIOLOGICAL, + /** + * Measurement is done using the mechanical principle. + */ + MECHANICAL, + /** + * Measurement is done using the acoustical principle. + */ + ACOUSTICAL, + /** + * Measurement is done using the manual principle. + */ + MANUAL, + /** + * added to help the parsers + */ + NULL; + public static MeasurementPrinciple fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("other".equals(codeString)) + return OTHER; + if ("chemical".equals(codeString)) + return CHEMICAL; + if ("electrical".equals(codeString)) + return ELECTRICAL; + if ("impedance".equals(codeString)) + return IMPEDANCE; + if ("nuclear".equals(codeString)) + return NUCLEAR; + if ("optical".equals(codeString)) + return OPTICAL; + if ("thermal".equals(codeString)) + return THERMAL; + if ("biological".equals(codeString)) + return BIOLOGICAL; + if ("mechanical".equals(codeString)) + return MECHANICAL; + if ("acoustical".equals(codeString)) + return ACOUSTICAL; + if ("manual".equals(codeString)) + return MANUAL; + throw new FHIRException("Unknown MeasurementPrinciple code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OTHER: return "other"; + case CHEMICAL: return "chemical"; + case ELECTRICAL: return "electrical"; + case IMPEDANCE: return "impedance"; + case NUCLEAR: return "nuclear"; + case OPTICAL: return "optical"; + case THERMAL: return "thermal"; + case BIOLOGICAL: return "biological"; + case MECHANICAL: return "mechanical"; + case ACOUSTICAL: return "acoustical"; + case MANUAL: return "manual"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/measurement-principle"; + } + public String getDefinition() { + switch (this) { + case OTHER: return "Measurement principle isn't in the list."; + case CHEMICAL: return "Measurement is done using the chemical principle."; + case ELECTRICAL: return "Measurement is done using the electrical principle."; + case IMPEDANCE: return "Measurement is done using the impedance principle."; + case NUCLEAR: return "Measurement is done using the nuclear principle."; + case OPTICAL: return "Measurement is done using the optical principle."; + case THERMAL: return "Measurement is done using the thermal principle."; + case BIOLOGICAL: return "Measurement is done using the biological principle."; + case MECHANICAL: return "Measurement is done using the mechanical principle."; + case ACOUSTICAL: return "Measurement is done using the acoustical principle."; + case MANUAL: return "Measurement is done using the manual principle."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OTHER: return "MSP Other"; + case CHEMICAL: return "MSP Chemical"; + case ELECTRICAL: return "MSP Electrical"; + case IMPEDANCE: return "MSP Impedance"; + case NUCLEAR: return "MSP Nuclear"; + case OPTICAL: return "MSP Optical"; + case THERMAL: return "MSP Thermal"; + case BIOLOGICAL: return "MSP Biological"; + case MECHANICAL: return "MSP Mechanical"; + case ACOUSTICAL: return "MSP Acoustical"; + case MANUAL: return "MSP Manual"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurementPrincipleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurementPrincipleEnumFactory.java new file mode 100644 index 00000000000..c510c28817b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MeasurementPrincipleEnumFactory.java @@ -0,0 +1,98 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MeasurementPrincipleEnumFactory implements EnumFactory { + + public MeasurementPrinciple fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("other".equals(codeString)) + return MeasurementPrinciple.OTHER; + if ("chemical".equals(codeString)) + return MeasurementPrinciple.CHEMICAL; + if ("electrical".equals(codeString)) + return MeasurementPrinciple.ELECTRICAL; + if ("impedance".equals(codeString)) + return MeasurementPrinciple.IMPEDANCE; + if ("nuclear".equals(codeString)) + return MeasurementPrinciple.NUCLEAR; + if ("optical".equals(codeString)) + return MeasurementPrinciple.OPTICAL; + if ("thermal".equals(codeString)) + return MeasurementPrinciple.THERMAL; + if ("biological".equals(codeString)) + return MeasurementPrinciple.BIOLOGICAL; + if ("mechanical".equals(codeString)) + return MeasurementPrinciple.MECHANICAL; + if ("acoustical".equals(codeString)) + return MeasurementPrinciple.ACOUSTICAL; + if ("manual".equals(codeString)) + return MeasurementPrinciple.MANUAL; + throw new IllegalArgumentException("Unknown MeasurementPrinciple code '"+codeString+"'"); + } + + public String toCode(MeasurementPrinciple code) { + if (code == MeasurementPrinciple.OTHER) + return "other"; + if (code == MeasurementPrinciple.CHEMICAL) + return "chemical"; + if (code == MeasurementPrinciple.ELECTRICAL) + return "electrical"; + if (code == MeasurementPrinciple.IMPEDANCE) + return "impedance"; + if (code == MeasurementPrinciple.NUCLEAR) + return "nuclear"; + if (code == MeasurementPrinciple.OPTICAL) + return "optical"; + if (code == MeasurementPrinciple.THERMAL) + return "thermal"; + if (code == MeasurementPrinciple.BIOLOGICAL) + return "biological"; + if (code == MeasurementPrinciple.MECHANICAL) + return "mechanical"; + if (code == MeasurementPrinciple.ACOUSTICAL) + return "acoustical"; + if (code == MeasurementPrinciple.MANUAL) + return "manual"; + return "?"; + } + + public String toSystem(MeasurementPrinciple code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminCategory.java new file mode 100644 index 00000000000..7852642a476 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminCategory.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationAdminCategory { + + /** + * Includes administrations in an inpatient or acute care setting + */ + INPATIENT, + /** + * Includes administrations in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office) + */ + OUTPATIENT, + /** + * Includes administrations by the patient in their home (this would include long term care or nursing homes, hospices, etc) + */ + COMMUNITY, + /** + * added to help the parsers + */ + NULL; + public static MedicationAdminCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return INPATIENT; + if ("outpatient".equals(codeString)) + return OUTPATIENT; + if ("community".equals(codeString)) + return COMMUNITY; + throw new FHIRException("Unknown MedicationAdminCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPATIENT: return "inpatient"; + case OUTPATIENT: return "outpatient"; + case COMMUNITY: return "community"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-admin-category"; + } + public String getDefinition() { + switch (this) { + case INPATIENT: return "Includes administrations in an inpatient or acute care setting"; + case OUTPATIENT: return "Includes administrations in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)"; + case COMMUNITY: return "Includes administrations by the patient in their home (this would include long term care or nursing homes, hospices, etc)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPATIENT: return "Inpatient"; + case OUTPATIENT: return "Outpatient"; + case COMMUNITY: return "Community"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminCategoryEnumFactory.java new file mode 100644 index 00000000000..95e81722604 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminCategoryEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationAdminCategoryEnumFactory implements EnumFactory { + + public MedicationAdminCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return MedicationAdminCategory.INPATIENT; + if ("outpatient".equals(codeString)) + return MedicationAdminCategory.OUTPATIENT; + if ("community".equals(codeString)) + return MedicationAdminCategory.COMMUNITY; + throw new IllegalArgumentException("Unknown MedicationAdminCategory code '"+codeString+"'"); + } + + public String toCode(MedicationAdminCategory code) { + if (code == MedicationAdminCategory.INPATIENT) + return "inpatient"; + if (code == MedicationAdminCategory.OUTPATIENT) + return "outpatient"; + if (code == MedicationAdminCategory.COMMUNITY) + return "community"; + return "?"; + } + + public String toSystem(MedicationAdminCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminStatus.java new file mode 100644 index 00000000000..c260bd16bb3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationAdminStatus { + + /** + * The administration has started but has not yet completed. + */ + INPROGRESS, + /** + * Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * All actions that are implied by the administration have occurred. + */ + COMPLETED, + /** + * The administration was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * Actions implied by the administration have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static MedicationAdminStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown MedicationAdminStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-admin-status"; + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The administration has started but has not yet completed."; + case ONHOLD: return "Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case COMPLETED: return "All actions that are implied by the administration have occurred."; + case ENTEREDINERROR: return "The administration was entered in error and therefore nullified."; + case STOPPED: return "Actions implied by the administration have been permanently halted, before all of them occurred."; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case STOPPED: return "Stopped"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminStatusEnumFactory.java new file mode 100644 index 00000000000..c340f94b10e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationAdminStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationAdminStatusEnumFactory implements EnumFactory { + + public MedicationAdminStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return MedicationAdminStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return MedicationAdminStatus.ONHOLD; + if ("completed".equals(codeString)) + return MedicationAdminStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationAdminStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationAdminStatus.STOPPED; + if ("unknown".equals(codeString)) + return MedicationAdminStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown MedicationAdminStatus code '"+codeString+"'"); + } + + public String toCode(MedicationAdminStatus code) { + if (code == MedicationAdminStatus.INPROGRESS) + return "in-progress"; + if (code == MedicationAdminStatus.ONHOLD) + return "on-hold"; + if (code == MedicationAdminStatus.COMPLETED) + return "completed"; + if (code == MedicationAdminStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationAdminStatus.STOPPED) + return "stopped"; + if (code == MedicationAdminStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(MedicationAdminStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategory.java new file mode 100644 index 00000000000..ef7f37ad2e4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategory.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationDispenseCategory { + + /** + * Includes dispenses for medications to be administered or consumed in an inpatient or acute care setting + */ + INPATIENT, + /** + * Includes dispenses for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office) + */ + OUTPATIENT, + /** + * Includes dispenses for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc) + */ + COMMUNITY, + /** + * added to help the parsers + */ + NULL; + public static MedicationDispenseCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return INPATIENT; + if ("outpatient".equals(codeString)) + return OUTPATIENT; + if ("community".equals(codeString)) + return COMMUNITY; + throw new FHIRException("Unknown MedicationDispenseCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPATIENT: return "inpatient"; + case OUTPATIENT: return "outpatient"; + case COMMUNITY: return "community"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-dispense-category"; + } + public String getDefinition() { + switch (this) { + case INPATIENT: return "Includes dispenses for medications to be administered or consumed in an inpatient or acute care setting"; + case OUTPATIENT: return "Includes dispenses for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)"; + case COMMUNITY: return "Includes dispenses for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPATIENT: return "Inpatient"; + case OUTPATIENT: return "Outpatient"; + case COMMUNITY: return "Community"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategoryEnumFactory.java new file mode 100644 index 00000000000..cfc194b6212 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategoryEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationDispenseCategoryEnumFactory implements EnumFactory { + + public MedicationDispenseCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return MedicationDispenseCategory.INPATIENT; + if ("outpatient".equals(codeString)) + return MedicationDispenseCategory.OUTPATIENT; + if ("community".equals(codeString)) + return MedicationDispenseCategory.COMMUNITY; + throw new IllegalArgumentException("Unknown MedicationDispenseCategory code '"+codeString+"'"); + } + + public String toCode(MedicationDispenseCategory code) { + if (code == MedicationDispenseCategory.INPATIENT) + return "inpatient"; + if (code == MedicationDispenseCategory.OUTPATIENT) + return "outpatient"; + if (code == MedicationDispenseCategory.COMMUNITY) + return "community"; + return "?"; + } + + public String toSystem(MedicationDispenseCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatus.java new file mode 100644 index 00000000000..d192538b8e7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationDispenseStatus { + + /** + * The core event has not started yet, but some staging activities have begun (e.g. initial compounding or packaging of medication). Preparation stages may be tracked for billing purposes. + */ + PREPARATION, + /** + * The dispense has started but has not yet completed. + */ + INPROGRESS, + /** + * Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called "suspended" + */ + ONHOLD, + /** + * All actions that are implied by the dispense have occurred. + */ + COMPLETED, + /** + * The dispense was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * Actions implied by the dispense have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * added to help the parsers + */ + NULL; + public static MedicationDispenseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return PREPARATION; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + throw new FHIRException("Unknown MedicationDispenseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREPARATION: return "preparation"; + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-dispense-status"; + } + public String getDefinition() { + switch (this) { + case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. initial compounding or packaging of medication). Preparation stages may be tracked for billing purposes."; + case INPROGRESS: return "The dispense has started but has not yet completed."; + case ONHOLD: return "Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called \"suspended\""; + case COMPLETED: return "All actions that are implied by the dispense have occurred."; + case ENTEREDINERROR: return "The dispense was entered in error and therefore nullified."; + case STOPPED: return "Actions implied by the dispense have been permanently halted, before all of them occurred."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREPARATION: return "Preparation"; + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in-Error"; + case STOPPED: return "Stopped"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatusEnumFactory.java new file mode 100644 index 00000000000..a4cf72b845b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationDispenseStatusEnumFactory implements EnumFactory { + + public MedicationDispenseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preparation".equals(codeString)) + return MedicationDispenseStatus.PREPARATION; + if ("in-progress".equals(codeString)) + return MedicationDispenseStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return MedicationDispenseStatus.ONHOLD; + if ("completed".equals(codeString)) + return MedicationDispenseStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationDispenseStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationDispenseStatus.STOPPED; + throw new IllegalArgumentException("Unknown MedicationDispenseStatus code '"+codeString+"'"); + } + + public String toCode(MedicationDispenseStatus code) { + if (code == MedicationDispenseStatus.PREPARATION) + return "preparation"; + if (code == MedicationDispenseStatus.INPROGRESS) + return "in-progress"; + if (code == MedicationDispenseStatus.ONHOLD) + return "on-hold"; + if (code == MedicationDispenseStatus.COMPLETED) + return "completed"; + if (code == MedicationDispenseStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationDispenseStatus.STOPPED) + return "stopped"; + return "?"; + } + + public String toSystem(MedicationDispenseStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationPackageForm.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationPackageForm.java new file mode 100644 index 00000000000..fb4b018c286 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationPackageForm.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationPackageForm { + + /** + * A sealed glass capsule containing a liquid + */ + AMPOULE, + /** + * A container, typically made of glass or plastic and with a narrow neck, used for storing liquids. + */ + BOTTLE, + /** + * A container with a flat base and sides, typically square or rectangular and having a lid. + */ + BOX, + /** + * A device of various configuration and composition used with a syringe for the application of anesthetic or other materials to a patient. + */ + CARTRIDGE, + /** + * A package intended to store pharmaceuticals. + */ + CONTAINER, + /** + * A long, hollow cylinder of metal, plastic, glass, etc., for holding medications, typically creams or ointments + */ + TUBE, + /** + * A dose of medicine prepared in an individual package for convenience, safety or monitoring. + */ + UNITDOSE, + /** + * A small container, typically cylindrical and made of glass, used especially for holding liquid medications. + */ + VIAL, + /** + * added to help the parsers + */ + NULL; + public static MedicationPackageForm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ampoule".equals(codeString)) + return AMPOULE; + if ("bottle".equals(codeString)) + return BOTTLE; + if ("box".equals(codeString)) + return BOX; + if ("cartridge".equals(codeString)) + return CARTRIDGE; + if ("container".equals(codeString)) + return CONTAINER; + if ("tube".equals(codeString)) + return TUBE; + if ("unitdose".equals(codeString)) + return UNITDOSE; + if ("vial".equals(codeString)) + return VIAL; + throw new FHIRException("Unknown MedicationPackageForm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AMPOULE: return "ampoule"; + case BOTTLE: return "bottle"; + case BOX: return "box"; + case CARTRIDGE: return "cartridge"; + case CONTAINER: return "container"; + case TUBE: return "tube"; + case UNITDOSE: return "unitdose"; + case VIAL: return "vial"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-package-form"; + } + public String getDefinition() { + switch (this) { + case AMPOULE: return "A sealed glass capsule containing a liquid"; + case BOTTLE: return "A container, typically made of glass or plastic and with a narrow neck, used for storing liquids."; + case BOX: return "A container with a flat base and sides, typically square or rectangular and having a lid."; + case CARTRIDGE: return "A device of various configuration and composition used with a syringe for the application of anesthetic or other materials to a patient."; + case CONTAINER: return "A package intended to store pharmaceuticals."; + case TUBE: return "A long, hollow cylinder of metal, plastic, glass, etc., for holding medications, typically creams or ointments"; + case UNITDOSE: return "A dose of medicine prepared in an individual package for convenience, safety or monitoring."; + case VIAL: return "A small container, typically cylindrical and made of glass, used especially for holding liquid medications."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AMPOULE: return "Ampoule"; + case BOTTLE: return "Bottle"; + case BOX: return "Box"; + case CARTRIDGE: return "Cartridge"; + case CONTAINER: return "Container"; + case TUBE: return "Tube"; + case UNITDOSE: return "Unit Dose Blister"; + case VIAL: return "Vial"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationPackageFormEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationPackageFormEnumFactory.java new file mode 100644 index 00000000000..8be62bc3fc2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationPackageFormEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationPackageFormEnumFactory implements EnumFactory { + + public MedicationPackageForm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ampoule".equals(codeString)) + return MedicationPackageForm.AMPOULE; + if ("bottle".equals(codeString)) + return MedicationPackageForm.BOTTLE; + if ("box".equals(codeString)) + return MedicationPackageForm.BOX; + if ("cartridge".equals(codeString)) + return MedicationPackageForm.CARTRIDGE; + if ("container".equals(codeString)) + return MedicationPackageForm.CONTAINER; + if ("tube".equals(codeString)) + return MedicationPackageForm.TUBE; + if ("unitdose".equals(codeString)) + return MedicationPackageForm.UNITDOSE; + if ("vial".equals(codeString)) + return MedicationPackageForm.VIAL; + throw new IllegalArgumentException("Unknown MedicationPackageForm code '"+codeString+"'"); + } + + public String toCode(MedicationPackageForm code) { + if (code == MedicationPackageForm.AMPOULE) + return "ampoule"; + if (code == MedicationPackageForm.BOTTLE) + return "bottle"; + if (code == MedicationPackageForm.BOX) + return "box"; + if (code == MedicationPackageForm.CARTRIDGE) + return "cartridge"; + if (code == MedicationPackageForm.CONTAINER) + return "container"; + if (code == MedicationPackageForm.TUBE) + return "tube"; + if (code == MedicationPackageForm.UNITDOSE) + return "unitdose"; + if (code == MedicationPackageForm.VIAL) + return "vial"; + return "?"; + } + + public String toSystem(MedicationPackageForm code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategory.java new file mode 100644 index 00000000000..6c19e0e5b32 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategory.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationRequestCategory { + + /** + * Includes orders for medications to be administered or consumed in an inpatient or acute care setting + */ + INPATIENT, + /** + * Includes orders for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office) + */ + OUTPATIENT, + /** + * Includes orders for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc) + */ + COMMUNITY, + /** + * added to help the parsers + */ + NULL; + public static MedicationRequestCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return INPATIENT; + if ("outpatient".equals(codeString)) + return OUTPATIENT; + if ("community".equals(codeString)) + return COMMUNITY; + throw new FHIRException("Unknown MedicationRequestCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPATIENT: return "inpatient"; + case OUTPATIENT: return "outpatient"; + case COMMUNITY: return "community"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-request-category"; + } + public String getDefinition() { + switch (this) { + case INPATIENT: return "Includes orders for medications to be administered or consumed in an inpatient or acute care setting"; + case OUTPATIENT: return "Includes orders for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)"; + case COMMUNITY: return "Includes orders for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPATIENT: return "Inpatient"; + case OUTPATIENT: return "Outpatient"; + case COMMUNITY: return "Community"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategoryEnumFactory.java new file mode 100644 index 00000000000..a71038e45e5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategoryEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationRequestCategoryEnumFactory implements EnumFactory { + + public MedicationRequestCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return MedicationRequestCategory.INPATIENT; + if ("outpatient".equals(codeString)) + return MedicationRequestCategory.OUTPATIENT; + if ("community".equals(codeString)) + return MedicationRequestCategory.COMMUNITY; + throw new IllegalArgumentException("Unknown MedicationRequestCategory code '"+codeString+"'"); + } + + public String toCode(MedicationRequestCategory code) { + if (code == MedicationRequestCategory.INPATIENT) + return "inpatient"; + if (code == MedicationRequestCategory.OUTPATIENT) + return "outpatient"; + if (code == MedicationRequestCategory.COMMUNITY) + return "community"; + return "?"; + } + + public String toSystem(MedicationRequestCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntent.java new file mode 100644 index 00000000000..51ca77c424a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntent.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationRequestIntent { + + /** + * The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act + */ + PROPOSAL, + /** + * The request represents an intension to ensure something occurs without providing an authorization for others to act + */ + PLAN, + /** + * The request represents a request/demand and authorization for action + */ + ORDER, + /** + * The request represents an instance for the particular order, for example a medication administration record. + */ + INSTANCEORDER, + /** + * The request represents a component or opiton for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. + */ + OPTION, + /** + * added to help the parsers + */ + NULL; + public static MedicationRequestIntent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return PROPOSAL; + if ("plan".equals(codeString)) + return PLAN; + if ("order".equals(codeString)) + return ORDER; + if ("instance-order".equals(codeString)) + return INSTANCEORDER; + if ("option".equals(codeString)) + return OPTION; + throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSAL: return "proposal"; + case PLAN: return "plan"; + case ORDER: return "order"; + case INSTANCEORDER: return "instance-order"; + case OPTION: return "option"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-request-intent"; + } + public String getDefinition() { + switch (this) { + case PROPOSAL: return "The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act"; + case PLAN: return "The request represents an intension to ensure something occurs without providing an authorization for others to act"; + case ORDER: return "The request represents a request/demand and authorization for action"; + case INSTANCEORDER: return "The request represents an instance for the particular order, for example a medication administration record."; + case OPTION: return "The request represents a component or opiton for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSAL: return "Proposal"; + case PLAN: return "Plan"; + case ORDER: return "Order"; + case INSTANCEORDER: return "Instance Order"; + case OPTION: return "Option"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntentEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntentEnumFactory.java new file mode 100644 index 00000000000..ffd96c8cb86 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntentEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationRequestIntentEnumFactory implements EnumFactory { + + public MedicationRequestIntent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return MedicationRequestIntent.PROPOSAL; + if ("plan".equals(codeString)) + return MedicationRequestIntent.PLAN; + if ("order".equals(codeString)) + return MedicationRequestIntent.ORDER; + if ("instance-order".equals(codeString)) + return MedicationRequestIntent.INSTANCEORDER; + if ("option".equals(codeString)) + return MedicationRequestIntent.OPTION; + throw new IllegalArgumentException("Unknown MedicationRequestIntent code '"+codeString+"'"); + } + + public String toCode(MedicationRequestIntent code) { + if (code == MedicationRequestIntent.PROPOSAL) + return "proposal"; + if (code == MedicationRequestIntent.PLAN) + return "plan"; + if (code == MedicationRequestIntent.ORDER) + return "order"; + if (code == MedicationRequestIntent.INSTANCEORDER) + return "instance-order"; + if (code == MedicationRequestIntent.OPTION) + return "option"; + return "?"; + } + + public String toSystem(MedicationRequestIntent code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestPriority.java new file mode 100644 index 00000000000..3e9fde182be --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestPriority.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationRequestPriority { + + /** + * The order has a normal priority . + */ + ROUTINE, + /** + * The order should be urgently. + */ + URGENT, + /** + * The order is time-critical. + */ + STAT, + /** + * The order should be acted on as soon as possible. + */ + ASAP, + /** + * added to help the parsers + */ + NULL; + public static MedicationRequestPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ROUTINE; + if ("urgent".equals(codeString)) + return URGENT; + if ("stat".equals(codeString)) + return STAT; + if ("asap".equals(codeString)) + return ASAP; + throw new FHIRException("Unknown MedicationRequestPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROUTINE: return "routine"; + case URGENT: return "urgent"; + case STAT: return "stat"; + case ASAP: return "asap"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-request-priority"; + } + public String getDefinition() { + switch (this) { + case ROUTINE: return "The order has a normal priority ."; + case URGENT: return "The order should be urgently."; + case STAT: return "The order is time-critical."; + case ASAP: return "The order should be acted on as soon as possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROUTINE: return "Routine"; + case URGENT: return "Urgent"; + case STAT: return "Stat"; + case ASAP: return "ASAP"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestPriorityEnumFactory.java new file mode 100644 index 00000000000..f89a6050e4e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestPriorityEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationRequestPriorityEnumFactory implements EnumFactory { + + public MedicationRequestPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return MedicationRequestPriority.ROUTINE; + if ("urgent".equals(codeString)) + return MedicationRequestPriority.URGENT; + if ("stat".equals(codeString)) + return MedicationRequestPriority.STAT; + if ("asap".equals(codeString)) + return MedicationRequestPriority.ASAP; + throw new IllegalArgumentException("Unknown MedicationRequestPriority code '"+codeString+"'"); + } + + public String toCode(MedicationRequestPriority code) { + if (code == MedicationRequestPriority.ROUTINE) + return "routine"; + if (code == MedicationRequestPriority.URGENT) + return "urgent"; + if (code == MedicationRequestPriority.STAT) + return "stat"; + if (code == MedicationRequestPriority.ASAP) + return "asap"; + return "?"; + } + + public String toSystem(MedicationRequestPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatus.java new file mode 100644 index 00000000000..77a1df0a34e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatus.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationRequestStatus { + + /** + * The prescription is 'actionable', but not all actions that are implied by it have occurred yet. + */ + ACTIVE, + /** + * Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * The prescription has been withdrawn. + */ + CANCELLED, + /** + * All actions that are implied by the prescription have occurred. + */ + COMPLETED, + /** + * The prescription was entered in error. + */ + ENTEREDINERROR, + /** + * Actions implied by the prescription are to be permanently halted, before all of them occurred. + */ + STOPPED, + /** + * The prescription is not yet 'actionable', i.e. it is a work in progress, requires sign-off or verification, and needs to be run through decision support process. + */ + DRAFT, + /** + * The authoring system does not know which of the status values currently applies for this request + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static MedicationRequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + if ("draft".equals(codeString)) + return DRAFT; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown MedicationRequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case ONHOLD: return "on-hold"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + case DRAFT: return "draft"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-request-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The prescription is 'actionable', but not all actions that are implied by it have occurred yet."; + case ONHOLD: return "Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case CANCELLED: return "The prescription has been withdrawn."; + case COMPLETED: return "All actions that are implied by the prescription have occurred."; + case ENTEREDINERROR: return "The prescription was entered in error."; + case STOPPED: return "Actions implied by the prescription are to be permanently halted, before all of them occurred."; + case DRAFT: return "The prescription is not yet 'actionable', i.e. it is a work in progress, requires sign-off or verification, and needs to be run through decision support process."; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case ONHOLD: return "On Hold"; + case CANCELLED: return "Cancelled"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered In Error"; + case STOPPED: return "Stopped"; + case DRAFT: return "Draft"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatusEnumFactory.java new file mode 100644 index 00000000000..045b1263d8d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatusEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationRequestStatusEnumFactory implements EnumFactory { + + public MedicationRequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return MedicationRequestStatus.ACTIVE; + if ("on-hold".equals(codeString)) + return MedicationRequestStatus.ONHOLD; + if ("cancelled".equals(codeString)) + return MedicationRequestStatus.CANCELLED; + if ("completed".equals(codeString)) + return MedicationRequestStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationRequestStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationRequestStatus.STOPPED; + if ("draft".equals(codeString)) + return MedicationRequestStatus.DRAFT; + if ("unknown".equals(codeString)) + return MedicationRequestStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown MedicationRequestStatus code '"+codeString+"'"); + } + + public String toCode(MedicationRequestStatus code) { + if (code == MedicationRequestStatus.ACTIVE) + return "active"; + if (code == MedicationRequestStatus.ONHOLD) + return "on-hold"; + if (code == MedicationRequestStatus.CANCELLED) + return "cancelled"; + if (code == MedicationRequestStatus.COMPLETED) + return "completed"; + if (code == MedicationRequestStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationRequestStatus.STOPPED) + return "stopped"; + if (code == MedicationRequestStatus.DRAFT) + return "draft"; + if (code == MedicationRequestStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(MedicationRequestStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementCategory.java new file mode 100644 index 00000000000..848eab1b0a0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementCategory.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationStatementCategory { + + /** + * Includes orders for medications to be administered or consumed in an inpatient or acute care setting + */ + INPATIENT, + /** + * Includes orders for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office) + */ + OUTPATIENT, + /** + * Includes orders for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc) + */ + COMMUNITY, + /** + * Includes statements about medication use, including over the counter medication, provided by the patient, agent or another provider + */ + PATIENTSPECIFIED, + /** + * added to help the parsers + */ + NULL; + public static MedicationStatementCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return INPATIENT; + if ("outpatient".equals(codeString)) + return OUTPATIENT; + if ("community".equals(codeString)) + return COMMUNITY; + if ("patientspecified".equals(codeString)) + return PATIENTSPECIFIED; + throw new FHIRException("Unknown MedicationStatementCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPATIENT: return "inpatient"; + case OUTPATIENT: return "outpatient"; + case COMMUNITY: return "community"; + case PATIENTSPECIFIED: return "patientspecified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-statement-category"; + } + public String getDefinition() { + switch (this) { + case INPATIENT: return "Includes orders for medications to be administered or consumed in an inpatient or acute care setting"; + case OUTPATIENT: return "Includes orders for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)"; + case COMMUNITY: return "Includes orders for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc)"; + case PATIENTSPECIFIED: return "Includes statements about medication use, including over the counter medication, provided by the patient, agent or another provider"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPATIENT: return "Inpatient"; + case OUTPATIENT: return "Outpatient"; + case COMMUNITY: return "Community"; + case PATIENTSPECIFIED: return "Patient Specified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementCategoryEnumFactory.java new file mode 100644 index 00000000000..a99c9c8af8a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementCategoryEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationStatementCategoryEnumFactory implements EnumFactory { + + public MedicationStatementCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("inpatient".equals(codeString)) + return MedicationStatementCategory.INPATIENT; + if ("outpatient".equals(codeString)) + return MedicationStatementCategory.OUTPATIENT; + if ("community".equals(codeString)) + return MedicationStatementCategory.COMMUNITY; + if ("patientspecified".equals(codeString)) + return MedicationStatementCategory.PATIENTSPECIFIED; + throw new IllegalArgumentException("Unknown MedicationStatementCategory code '"+codeString+"'"); + } + + public String toCode(MedicationStatementCategory code) { + if (code == MedicationStatementCategory.INPATIENT) + return "inpatient"; + if (code == MedicationStatementCategory.OUTPATIENT) + return "outpatient"; + if (code == MedicationStatementCategory.COMMUNITY) + return "community"; + if (code == MedicationStatementCategory.PATIENTSPECIFIED) + return "patientspecified"; + return "?"; + } + + public String toSystem(MedicationStatementCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementStatus.java new file mode 100644 index 00000000000..880f464583f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationStatementStatus { + + /** + * The medication is still being taken. + */ + ACTIVE, + /** + * The medication is no longer being taken. + */ + COMPLETED, + /** + * The statement was recorded incorrectly. + */ + ENTEREDINERROR, + /** + * The medication may be taken at some time in the future. + */ + INTENDED, + /** + * Actions implied by the statement have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * The state of the medication use is not currently known. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static MedicationStatementStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("intended".equals(codeString)) + return INTENDED; + if ("stopped".equals(codeString)) + return STOPPED; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown MedicationStatementStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case INTENDED: return "intended"; + case STOPPED: return "stopped"; + case ONHOLD: return "on-hold"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-statement-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The medication is still being taken."; + case COMPLETED: return "The medication is no longer being taken."; + case ENTEREDINERROR: return "The statement was recorded incorrectly."; + case INTENDED: return "The medication may be taken at some time in the future."; + case STOPPED: return "Actions implied by the statement have been permanently halted, before all of them occurred."; + case ONHOLD: return "Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case UNKNOWN: return "The state of the medication use is not currently known."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case INTENDED: return "Intended"; + case STOPPED: return "Stopped"; + case ONHOLD: return "On Hold"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementStatusEnumFactory.java new file mode 100644 index 00000000000..1f4def0b8dc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationStatementStatusEnumFactory implements EnumFactory { + + public MedicationStatementStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return MedicationStatementStatus.ACTIVE; + if ("completed".equals(codeString)) + return MedicationStatementStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationStatementStatus.ENTEREDINERROR; + if ("intended".equals(codeString)) + return MedicationStatementStatus.INTENDED; + if ("stopped".equals(codeString)) + return MedicationStatementStatus.STOPPED; + if ("on-hold".equals(codeString)) + return MedicationStatementStatus.ONHOLD; + if ("unknown".equals(codeString)) + return MedicationStatementStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown MedicationStatementStatus code '"+codeString+"'"); + } + + public String toCode(MedicationStatementStatus code) { + if (code == MedicationStatementStatus.ACTIVE) + return "active"; + if (code == MedicationStatementStatus.COMPLETED) + return "completed"; + if (code == MedicationStatementStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationStatementStatus.INTENDED) + return "intended"; + if (code == MedicationStatementStatus.STOPPED) + return "stopped"; + if (code == MedicationStatementStatus.ONHOLD) + return "on-hold"; + if (code == MedicationStatementStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(MedicationStatementStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementTaken.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementTaken.java new file mode 100644 index 00000000000..c08238cf648 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementTaken.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationStatementTaken { + + /** + * Positive assertion that patient has taken medication + */ + Y, + /** + * Negative assertion that patient has not taken medication + */ + N, + /** + * Unknown assertion if patient has taken medication + */ + UNK, + /** + * Patient reporting does not apply + */ + NA, + /** + * added to help the parsers + */ + NULL; + public static MedicationStatementTaken fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("y".equals(codeString)) + return Y; + if ("n".equals(codeString)) + return N; + if ("unk".equals(codeString)) + return UNK; + if ("na".equals(codeString)) + return NA; + throw new FHIRException("Unknown MedicationStatementTaken code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case Y: return "y"; + case N: return "n"; + case UNK: return "unk"; + case NA: return "na"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-statement-taken"; + } + public String getDefinition() { + switch (this) { + case Y: return "Positive assertion that patient has taken medication"; + case N: return "Negative assertion that patient has not taken medication"; + case UNK: return "Unknown assertion if patient has taken medication"; + case NA: return "Patient reporting does not apply"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case Y: return "Yes"; + case N: return "No"; + case UNK: return "Unknown"; + case NA: return "Not Applicable"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementTakenEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementTakenEnumFactory.java new file mode 100644 index 00000000000..907b6e61512 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatementTakenEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationStatementTakenEnumFactory implements EnumFactory { + + public MedicationStatementTaken fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("y".equals(codeString)) + return MedicationStatementTaken.Y; + if ("n".equals(codeString)) + return MedicationStatementTaken.N; + if ("unk".equals(codeString)) + return MedicationStatementTaken.UNK; + if ("na".equals(codeString)) + return MedicationStatementTaken.NA; + throw new IllegalArgumentException("Unknown MedicationStatementTaken code '"+codeString+"'"); + } + + public String toCode(MedicationStatementTaken code) { + if (code == MedicationStatementTaken.Y) + return "y"; + if (code == MedicationStatementTaken.N) + return "n"; + if (code == MedicationStatementTaken.UNK) + return "unk"; + if (code == MedicationStatementTaken.NA) + return "na"; + return "?"; + } + + public String toSystem(MedicationStatementTaken code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatus.java new file mode 100644 index 00000000000..4a16fd41ea0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MedicationStatus { + + /** + * The medication is available for use + */ + ACTIVE, + /** + * The medication is not available for use + */ + INACTIVE, + /** + * The medication was entered in error + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static MedicationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown MedicationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/medication-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The medication is available for use"; + case INACTIVE: return "The medication is not available for use"; + case ENTEREDINERROR: return "The medication was entered in error"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatusEnumFactory.java new file mode 100644 index 00000000000..74f6c70ea92 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MedicationStatusEnumFactory implements EnumFactory { + + public MedicationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return MedicationStatus.ACTIVE; + if ("inactive".equals(codeString)) + return MedicationStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return MedicationStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown MedicationStatus code '"+codeString+"'"); + } + + public String toCode(MedicationStatus code) { + if (code == MedicationStatus.ACTIVE) + return "active"; + if (code == MedicationStatus.INACTIVE) + return "inactive"; + if (code == MedicationStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(MedicationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageEvents.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageEvents.java new file mode 100644 index 00000000000..885b654db02 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageEvents.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageEvents { + + /** + * Change the status of a Medication Administration to show that it is complete. + */ + MEDICATIONADMINISTRATIONCOMPLETE, + /** + * Someone wishes to record that the record of administration of a medication is in error and should be ignored. + */ + MEDICATIONADMINISTRATIONNULLIFICATION, + /** + * Indicates that a medication has been recorded against the patient's record. + */ + MEDICATIONADMINISTRATIONRECORDING, + /** + * Update a Medication Administration record. + */ + MEDICATIONADMINISTRATIONUPDATE, + /** + * Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use. + */ + ADMINNOTIFY, + /** + * The definition of a code system is used to create a simple collection of codes suitable for use for data entry or validation. An expanded code system will be returned, or an error message. + */ + CODESYSTEMEXPAND, + /** + * Notification to convey information. + */ + COMMUNICATIONREQUEST, + /** + * Provide a diagnostic report, or update a previously provided diagnostic report. + */ + DIAGNOSTICREPORTPROVIDE, + /** + * Provide a simple observation or update a previously provided simple observation. + */ + OBSERVATIONPROVIDE, + /** + * Notification that two patient records actually identify the same patient. + */ + PATIENTLINK, + /** + * Notification that previous advice that two patient records concern the same patient is now considered incorrect. + */ + PATIENTUNLINK, + /** + * The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message. + */ + VALUESETEXPAND, + /** + * added to help the parsers + */ + NULL; + public static MessageEvents fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MedicationAdministration-Complete".equals(codeString)) + return MEDICATIONADMINISTRATIONCOMPLETE; + if ("MedicationAdministration-Nullification".equals(codeString)) + return MEDICATIONADMINISTRATIONNULLIFICATION; + if ("MedicationAdministration-Recording".equals(codeString)) + return MEDICATIONADMINISTRATIONRECORDING; + if ("MedicationAdministration-Update".equals(codeString)) + return MEDICATIONADMINISTRATIONUPDATE; + if ("admin-notify".equals(codeString)) + return ADMINNOTIFY; + if ("codesystem-expand".equals(codeString)) + return CODESYSTEMEXPAND; + if ("communication-request".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("diagnosticreport-provide".equals(codeString)) + return DIAGNOSTICREPORTPROVIDE; + if ("observation-provide".equals(codeString)) + return OBSERVATIONPROVIDE; + if ("patient-link".equals(codeString)) + return PATIENTLINK; + if ("patient-unlink".equals(codeString)) + return PATIENTUNLINK; + if ("valueset-expand".equals(codeString)) + return VALUESETEXPAND; + throw new FHIRException("Unknown MessageEvents code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete"; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification"; + case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording"; + case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update"; + case ADMINNOTIFY: return "admin-notify"; + case CODESYSTEMEXPAND: return "codesystem-expand"; + case COMMUNICATIONREQUEST: return "communication-request"; + case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide"; + case OBSERVATIONPROVIDE: return "observation-provide"; + case PATIENTLINK: return "patient-link"; + case PATIENTUNLINK: return "patient-unlink"; + case VALUESETEXPAND: return "valueset-expand"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/message-events"; + } + public String getDefinition() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "Change the status of a Medication Administration to show that it is complete."; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "Someone wishes to record that the record of administration of a medication is in error and should be ignored."; + case MEDICATIONADMINISTRATIONRECORDING: return "Indicates that a medication has been recorded against the patient's record."; + case MEDICATIONADMINISTRATIONUPDATE: return "Update a Medication Administration record."; + case ADMINNOTIFY: return "Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use."; + case CODESYSTEMEXPAND: return "The definition of a code system is used to create a simple collection of codes suitable for use for data entry or validation. An expanded code system will be returned, or an error message."; + case COMMUNICATIONREQUEST: return "Notification to convey information."; + case DIAGNOSTICREPORTPROVIDE: return "Provide a diagnostic report, or update a previously provided diagnostic report."; + case OBSERVATIONPROVIDE: return "Provide a simple observation or update a previously provided simple observation."; + case PATIENTLINK: return "Notification that two patient records actually identify the same patient."; + case PATIENTUNLINK: return "Notification that previous advice that two patient records concern the same patient is now considered incorrect."; + case VALUESETEXPAND: return "The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration Complete"; + case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration Nullification"; + case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration Recording"; + case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration Update"; + case ADMINNOTIFY: return "Admin Notify"; + case CODESYSTEMEXPAND: return "Codesystem Expand"; + case COMMUNICATIONREQUEST: return "Communication Request"; + case DIAGNOSTICREPORTPROVIDE: return "Diagnosticreport Provide"; + case OBSERVATIONPROVIDE: return "Observation Provide"; + case PATIENTLINK: return "Patient Link"; + case PATIENTUNLINK: return "Patient Unlink"; + case VALUESETEXPAND: return "Valueset Expand"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageEventsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageEventsEnumFactory.java new file mode 100644 index 00000000000..4e2a24a5524 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageEventsEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MessageEventsEnumFactory implements EnumFactory { + + public MessageEvents fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MedicationAdministration-Complete".equals(codeString)) + return MessageEvents.MEDICATIONADMINISTRATIONCOMPLETE; + if ("MedicationAdministration-Nullification".equals(codeString)) + return MessageEvents.MEDICATIONADMINISTRATIONNULLIFICATION; + if ("MedicationAdministration-Recording".equals(codeString)) + return MessageEvents.MEDICATIONADMINISTRATIONRECORDING; + if ("MedicationAdministration-Update".equals(codeString)) + return MessageEvents.MEDICATIONADMINISTRATIONUPDATE; + if ("admin-notify".equals(codeString)) + return MessageEvents.ADMINNOTIFY; + if ("codesystem-expand".equals(codeString)) + return MessageEvents.CODESYSTEMEXPAND; + if ("communication-request".equals(codeString)) + return MessageEvents.COMMUNICATIONREQUEST; + if ("diagnosticreport-provide".equals(codeString)) + return MessageEvents.DIAGNOSTICREPORTPROVIDE; + if ("observation-provide".equals(codeString)) + return MessageEvents.OBSERVATIONPROVIDE; + if ("patient-link".equals(codeString)) + return MessageEvents.PATIENTLINK; + if ("patient-unlink".equals(codeString)) + return MessageEvents.PATIENTUNLINK; + if ("valueset-expand".equals(codeString)) + return MessageEvents.VALUESETEXPAND; + throw new IllegalArgumentException("Unknown MessageEvents code '"+codeString+"'"); + } + + public String toCode(MessageEvents code) { + if (code == MessageEvents.MEDICATIONADMINISTRATIONCOMPLETE) + return "MedicationAdministration-Complete"; + if (code == MessageEvents.MEDICATIONADMINISTRATIONNULLIFICATION) + return "MedicationAdministration-Nullification"; + if (code == MessageEvents.MEDICATIONADMINISTRATIONRECORDING) + return "MedicationAdministration-Recording"; + if (code == MessageEvents.MEDICATIONADMINISTRATIONUPDATE) + return "MedicationAdministration-Update"; + if (code == MessageEvents.ADMINNOTIFY) + return "admin-notify"; + if (code == MessageEvents.CODESYSTEMEXPAND) + return "codesystem-expand"; + if (code == MessageEvents.COMMUNICATIONREQUEST) + return "communication-request"; + if (code == MessageEvents.DIAGNOSTICREPORTPROVIDE) + return "diagnosticreport-provide"; + if (code == MessageEvents.OBSERVATIONPROVIDE) + return "observation-provide"; + if (code == MessageEvents.PATIENTLINK) + return "patient-link"; + if (code == MessageEvents.PATIENTUNLINK) + return "patient-unlink"; + if (code == MessageEvents.VALUESETEXPAND) + return "valueset-expand"; + return "?"; + } + + public String toSystem(MessageEvents code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageReasonEncounter.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageReasonEncounter.java new file mode 100644 index 00000000000..850d50c9a90 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageReasonEncounter.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageReasonEncounter { + + /** + * The patient has been admitted. + */ + ADMIT, + /** + * The patient has been discharged. + */ + DISCHARGE, + /** + * The patient has temporarily left the institution. + */ + ABSENT, + /** + * The patient has returned from a temporary absence. + */ + RETURN, + /** + * The patient has been moved to a new location. + */ + MOVED, + /** + * Encounter details have been updated (e.g. to correct a coding error). + */ + EDIT, + /** + * added to help the parsers + */ + NULL; + public static MessageReasonEncounter fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("admit".equals(codeString)) + return ADMIT; + if ("discharge".equals(codeString)) + return DISCHARGE; + if ("absent".equals(codeString)) + return ABSENT; + if ("return".equals(codeString)) + return RETURN; + if ("moved".equals(codeString)) + return MOVED; + if ("edit".equals(codeString)) + return EDIT; + throw new FHIRException("Unknown MessageReasonEncounter code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADMIT: return "admit"; + case DISCHARGE: return "discharge"; + case ABSENT: return "absent"; + case RETURN: return "return"; + case MOVED: return "moved"; + case EDIT: return "edit"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/message-reasons-encounter"; + } + public String getDefinition() { + switch (this) { + case ADMIT: return "The patient has been admitted."; + case DISCHARGE: return "The patient has been discharged."; + case ABSENT: return "The patient has temporarily left the institution."; + case RETURN: return "The patient has returned from a temporary absence."; + case MOVED: return "The patient has been moved to a new location."; + case EDIT: return "Encounter details have been updated (e.g. to correct a coding error)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADMIT: return "Admit"; + case DISCHARGE: return "Discharge"; + case ABSENT: return "Absent"; + case RETURN: return "Returned"; + case MOVED: return "Moved"; + case EDIT: return "Edit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageReasonEncounterEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageReasonEncounterEnumFactory.java new file mode 100644 index 00000000000..a01d069bcf0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageReasonEncounterEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MessageReasonEncounterEnumFactory implements EnumFactory { + + public MessageReasonEncounter fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("admit".equals(codeString)) + return MessageReasonEncounter.ADMIT; + if ("discharge".equals(codeString)) + return MessageReasonEncounter.DISCHARGE; + if ("absent".equals(codeString)) + return MessageReasonEncounter.ABSENT; + if ("return".equals(codeString)) + return MessageReasonEncounter.RETURN; + if ("moved".equals(codeString)) + return MessageReasonEncounter.MOVED; + if ("edit".equals(codeString)) + return MessageReasonEncounter.EDIT; + throw new IllegalArgumentException("Unknown MessageReasonEncounter code '"+codeString+"'"); + } + + public String toCode(MessageReasonEncounter code) { + if (code == MessageReasonEncounter.ADMIT) + return "admit"; + if (code == MessageReasonEncounter.DISCHARGE) + return "discharge"; + if (code == MessageReasonEncounter.ABSENT) + return "absent"; + if (code == MessageReasonEncounter.RETURN) + return "return"; + if (code == MessageReasonEncounter.MOVED) + return "moved"; + if (code == MessageReasonEncounter.EDIT) + return "edit"; + return "?"; + } + + public String toSystem(MessageReasonEncounter code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageSignificanceCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageSignificanceCategory.java new file mode 100644 index 00000000000..0e2cc636f6b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageSignificanceCategory.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageSignificanceCategory { + + /** + * The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment. + */ + CONSEQUENCE, + /** + * The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful. + */ + CURRENCY, + /** + * The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications. + */ + NOTIFICATION, + /** + * added to help the parsers + */ + NULL; + public static MessageSignificanceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Consequence".equals(codeString)) + return CONSEQUENCE; + if ("Currency".equals(codeString)) + return CURRENCY; + if ("Notification".equals(codeString)) + return NOTIFICATION; + throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONSEQUENCE: return "Consequence"; + case CURRENCY: return "Currency"; + case NOTIFICATION: return "Notification"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/message-significance-category"; + } + public String getDefinition() { + switch (this) { + case CONSEQUENCE: return "The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment."; + case CURRENCY: return "The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful."; + case NOTIFICATION: return "The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONSEQUENCE: return "Consequence"; + case CURRENCY: return "Currency"; + case NOTIFICATION: return "Notification"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageSignificanceCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageSignificanceCategoryEnumFactory.java new file mode 100644 index 00000000000..465ab89cacf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageSignificanceCategoryEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MessageSignificanceCategoryEnumFactory implements EnumFactory { + + public MessageSignificanceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Consequence".equals(codeString)) + return MessageSignificanceCategory.CONSEQUENCE; + if ("Currency".equals(codeString)) + return MessageSignificanceCategory.CURRENCY; + if ("Notification".equals(codeString)) + return MessageSignificanceCategory.NOTIFICATION; + throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'"); + } + + public String toCode(MessageSignificanceCategory code) { + if (code == MessageSignificanceCategory.CONSEQUENCE) + return "Consequence"; + if (code == MessageSignificanceCategory.CURRENCY) + return "Currency"; + if (code == MessageSignificanceCategory.NOTIFICATION) + return "Notification"; + return "?"; + } + + public String toSystem(MessageSignificanceCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageTransport.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageTransport.java new file mode 100644 index 00000000000..a107bc7edd7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageTransport.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageTransport { + + /** + * The application sends or receives messages using HTTP POST (may be over http: or https:). + */ + HTTP, + /** + * The application sends or receives messages using File Transfer Protocol. + */ + FTP, + /** + * The application sends or receives messages using HL7's Minimal Lower Level Protocol. + */ + MLLP, + /** + * added to help the parsers + */ + NULL; + public static MessageTransport fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("http".equals(codeString)) + return HTTP; + if ("ftp".equals(codeString)) + return FTP; + if ("mllp".equals(codeString)) + return MLLP; + throw new FHIRException("Unknown MessageTransport code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HTTP: return "http"; + case FTP: return "ftp"; + case MLLP: return "mllp"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/message-transport"; + } + public String getDefinition() { + switch (this) { + case HTTP: return "The application sends or receives messages using HTTP POST (may be over http: or https:)."; + case FTP: return "The application sends or receives messages using File Transfer Protocol."; + case MLLP: return "The application sends or receives messages using HL7's Minimal Lower Level Protocol."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HTTP: return "HTTP"; + case FTP: return "FTP"; + case MLLP: return "MLLP"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageTransportEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageTransportEnumFactory.java new file mode 100644 index 00000000000..ebe7c98455f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageTransportEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MessageTransportEnumFactory implements EnumFactory { + + public MessageTransport fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("http".equals(codeString)) + return MessageTransport.HTTP; + if ("ftp".equals(codeString)) + return MessageTransport.FTP; + if ("mllp".equals(codeString)) + return MessageTransport.MLLP; + throw new IllegalArgumentException("Unknown MessageTransport code '"+codeString+"'"); + } + + public String toCode(MessageTransport code) { + if (code == MessageTransport.HTTP) + return "http"; + if (code == MessageTransport.FTP) + return "ftp"; + if (code == MessageTransport.MLLP) + return "mllp"; + return "?"; + } + + public String toSystem(MessageTransport code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageheaderResponseRequest.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageheaderResponseRequest.java new file mode 100644 index 00000000000..449ae35df53 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageheaderResponseRequest.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MessageheaderResponseRequest { + + /** + * initiator expects a response for this message + */ + ALWAYS, + /** + * initiator expects a response only if in error + */ + ONERROR, + /** + * initiator does not expect a response + */ + NEVER, + /** + * initiator expects a response only if successful + */ + ONSUCCESS, + /** + * added to help the parsers + */ + NULL; + public static MessageheaderResponseRequest fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("always".equals(codeString)) + return ALWAYS; + if ("on-error".equals(codeString)) + return ONERROR; + if ("never".equals(codeString)) + return NEVER; + if ("on-success".equals(codeString)) + return ONSUCCESS; + throw new FHIRException("Unknown MessageheaderResponseRequest code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALWAYS: return "always"; + case ONERROR: return "on-error"; + case NEVER: return "never"; + case ONSUCCESS: return "on-success"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/messageheader-response-request"; + } + public String getDefinition() { + switch (this) { + case ALWAYS: return "initiator expects a response for this message"; + case ONERROR: return "initiator expects a response only if in error"; + case NEVER: return "initiator does not expect a response"; + case ONSUCCESS: return "initiator expects a response only if successful"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALWAYS: return "Always"; + case ONERROR: return "Error/reject conditions only"; + case NEVER: return "Never"; + case ONSUCCESS: return "Successful completion only"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageheaderResponseRequestEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageheaderResponseRequestEnumFactory.java new file mode 100644 index 00000000000..ba7c2947aaf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MessageheaderResponseRequestEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MessageheaderResponseRequestEnumFactory implements EnumFactory { + + public MessageheaderResponseRequest fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("always".equals(codeString)) + return MessageheaderResponseRequest.ALWAYS; + if ("on-error".equals(codeString)) + return MessageheaderResponseRequest.ONERROR; + if ("never".equals(codeString)) + return MessageheaderResponseRequest.NEVER; + if ("on-success".equals(codeString)) + return MessageheaderResponseRequest.ONSUCCESS; + throw new IllegalArgumentException("Unknown MessageheaderResponseRequest code '"+codeString+"'"); + } + + public String toCode(MessageheaderResponseRequest code) { + if (code == MessageheaderResponseRequest.ALWAYS) + return "always"; + if (code == MessageheaderResponseRequest.ONERROR) + return "on-error"; + if (code == MessageheaderResponseRequest.NEVER) + return "never"; + if (code == MessageheaderResponseRequest.ONSUCCESS) + return "on-success"; + return "?"; + } + + public String toSystem(MessageheaderResponseRequest code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationState.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationState.java new file mode 100644 index 00000000000..ddf187814ba --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationState.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MetricCalibrationState { + + /** + * The metric has not been calibrated. + */ + NOTCALIBRATED, + /** + * The metric needs to be calibrated. + */ + CALIBRATIONREQUIRED, + /** + * The metric has been calibrated. + */ + CALIBRATED, + /** + * The state of calibration of this metric is unspecified. + */ + UNSPECIFIED, + /** + * added to help the parsers + */ + NULL; + public static MetricCalibrationState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-calibrated".equals(codeString)) + return NOTCALIBRATED; + if ("calibration-required".equals(codeString)) + return CALIBRATIONREQUIRED; + if ("calibrated".equals(codeString)) + return CALIBRATED; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + throw new FHIRException("Unknown MetricCalibrationState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTCALIBRATED: return "not-calibrated"; + case CALIBRATIONREQUIRED: return "calibration-required"; + case CALIBRATED: return "calibrated"; + case UNSPECIFIED: return "unspecified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/metric-calibration-state"; + } + public String getDefinition() { + switch (this) { + case NOTCALIBRATED: return "The metric has not been calibrated."; + case CALIBRATIONREQUIRED: return "The metric needs to be calibrated."; + case CALIBRATED: return "The metric has been calibrated."; + case UNSPECIFIED: return "The state of calibration of this metric is unspecified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTCALIBRATED: return "Not Calibrated"; + case CALIBRATIONREQUIRED: return "Calibration Required"; + case CALIBRATED: return "Calibrated"; + case UNSPECIFIED: return "Unspecified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationStateEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationStateEnumFactory.java new file mode 100644 index 00000000000..7385fcba784 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationStateEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MetricCalibrationStateEnumFactory implements EnumFactory { + + public MetricCalibrationState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-calibrated".equals(codeString)) + return MetricCalibrationState.NOTCALIBRATED; + if ("calibration-required".equals(codeString)) + return MetricCalibrationState.CALIBRATIONREQUIRED; + if ("calibrated".equals(codeString)) + return MetricCalibrationState.CALIBRATED; + if ("unspecified".equals(codeString)) + return MetricCalibrationState.UNSPECIFIED; + throw new IllegalArgumentException("Unknown MetricCalibrationState code '"+codeString+"'"); + } + + public String toCode(MetricCalibrationState code) { + if (code == MetricCalibrationState.NOTCALIBRATED) + return "not-calibrated"; + if (code == MetricCalibrationState.CALIBRATIONREQUIRED) + return "calibration-required"; + if (code == MetricCalibrationState.CALIBRATED) + return "calibrated"; + if (code == MetricCalibrationState.UNSPECIFIED) + return "unspecified"; + return "?"; + } + + public String toSystem(MetricCalibrationState code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationType.java new file mode 100644 index 00000000000..01a91ba9c77 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MetricCalibrationType { + + /** + * Metric calibration method has not been identified. + */ + UNSPECIFIED, + /** + * Offset metric calibration method + */ + OFFSET, + /** + * Gain metric calibration method + */ + GAIN, + /** + * Two-point metric calibration method + */ + TWOPOINT, + /** + * added to help the parsers + */ + NULL; + public static MetricCalibrationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + if ("offset".equals(codeString)) + return OFFSET; + if ("gain".equals(codeString)) + return GAIN; + if ("two-point".equals(codeString)) + return TWOPOINT; + throw new FHIRException("Unknown MetricCalibrationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNSPECIFIED: return "unspecified"; + case OFFSET: return "offset"; + case GAIN: return "gain"; + case TWOPOINT: return "two-point"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/metric-calibration-type"; + } + public String getDefinition() { + switch (this) { + case UNSPECIFIED: return "Metric calibration method has not been identified."; + case OFFSET: return "Offset metric calibration method"; + case GAIN: return "Gain metric calibration method"; + case TWOPOINT: return "Two-point metric calibration method"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNSPECIFIED: return "Unspecified"; + case OFFSET: return "Offset"; + case GAIN: return "Gain"; + case TWOPOINT: return "Two Point"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationTypeEnumFactory.java new file mode 100644 index 00000000000..060f4e12829 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCalibrationTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MetricCalibrationTypeEnumFactory implements EnumFactory { + + public MetricCalibrationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return MetricCalibrationType.UNSPECIFIED; + if ("offset".equals(codeString)) + return MetricCalibrationType.OFFSET; + if ("gain".equals(codeString)) + return MetricCalibrationType.GAIN; + if ("two-point".equals(codeString)) + return MetricCalibrationType.TWOPOINT; + throw new IllegalArgumentException("Unknown MetricCalibrationType code '"+codeString+"'"); + } + + public String toCode(MetricCalibrationType code) { + if (code == MetricCalibrationType.UNSPECIFIED) + return "unspecified"; + if (code == MetricCalibrationType.OFFSET) + return "offset"; + if (code == MetricCalibrationType.GAIN) + return "gain"; + if (code == MetricCalibrationType.TWOPOINT) + return "two-point"; + return "?"; + } + + public String toSystem(MetricCalibrationType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCategory.java new file mode 100644 index 00000000000..6f58d8fad3a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCategory.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MetricCategory { + + /** + * DeviceObservations generated for this DeviceMetric are measured. + */ + MEASUREMENT, + /** + * DeviceObservations generated for this DeviceMetric is a setting that will influence the behavior of the Device. + */ + SETTING, + /** + * DeviceObservations generated for this DeviceMetric are calculated. + */ + CALCULATION, + /** + * The category of this DeviceMetric is unspecified. + */ + UNSPECIFIED, + /** + * added to help the parsers + */ + NULL; + public static MetricCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("measurement".equals(codeString)) + return MEASUREMENT; + if ("setting".equals(codeString)) + return SETTING; + if ("calculation".equals(codeString)) + return CALCULATION; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + throw new FHIRException("Unknown MetricCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MEASUREMENT: return "measurement"; + case SETTING: return "setting"; + case CALCULATION: return "calculation"; + case UNSPECIFIED: return "unspecified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/metric-category"; + } + public String getDefinition() { + switch (this) { + case MEASUREMENT: return "DeviceObservations generated for this DeviceMetric are measured."; + case SETTING: return "DeviceObservations generated for this DeviceMetric is a setting that will influence the behavior of the Device."; + case CALCULATION: return "DeviceObservations generated for this DeviceMetric are calculated."; + case UNSPECIFIED: return "The category of this DeviceMetric is unspecified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MEASUREMENT: return "Measurement"; + case SETTING: return "Setting"; + case CALCULATION: return "Calculation"; + case UNSPECIFIED: return "Unspecified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCategoryEnumFactory.java new file mode 100644 index 00000000000..e82e3c1f035 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricCategoryEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MetricCategoryEnumFactory implements EnumFactory { + + public MetricCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("measurement".equals(codeString)) + return MetricCategory.MEASUREMENT; + if ("setting".equals(codeString)) + return MetricCategory.SETTING; + if ("calculation".equals(codeString)) + return MetricCategory.CALCULATION; + if ("unspecified".equals(codeString)) + return MetricCategory.UNSPECIFIED; + throw new IllegalArgumentException("Unknown MetricCategory code '"+codeString+"'"); + } + + public String toCode(MetricCategory code) { + if (code == MetricCategory.MEASUREMENT) + return "measurement"; + if (code == MetricCategory.SETTING) + return "setting"; + if (code == MetricCategory.CALCULATION) + return "calculation"; + if (code == MetricCategory.UNSPECIFIED) + return "unspecified"; + return "?"; + } + + public String toSystem(MetricCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricColor.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricColor.java new file mode 100644 index 00000000000..66787c3627a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricColor.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MetricColor { + + /** + * Color for representation - black. + */ + BLACK, + /** + * Color for representation - red. + */ + RED, + /** + * Color for representation - green. + */ + GREEN, + /** + * Color for representation - yellow. + */ + YELLOW, + /** + * Color for representation - blue. + */ + BLUE, + /** + * Color for representation - magenta. + */ + MAGENTA, + /** + * Color for representation - cyan. + */ + CYAN, + /** + * Color for representation - white. + */ + WHITE, + /** + * added to help the parsers + */ + NULL; + public static MetricColor fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("black".equals(codeString)) + return BLACK; + if ("red".equals(codeString)) + return RED; + if ("green".equals(codeString)) + return GREEN; + if ("yellow".equals(codeString)) + return YELLOW; + if ("blue".equals(codeString)) + return BLUE; + if ("magenta".equals(codeString)) + return MAGENTA; + if ("cyan".equals(codeString)) + return CYAN; + if ("white".equals(codeString)) + return WHITE; + throw new FHIRException("Unknown MetricColor code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BLACK: return "black"; + case RED: return "red"; + case GREEN: return "green"; + case YELLOW: return "yellow"; + case BLUE: return "blue"; + case MAGENTA: return "magenta"; + case CYAN: return "cyan"; + case WHITE: return "white"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/metric-color"; + } + public String getDefinition() { + switch (this) { + case BLACK: return "Color for representation - black."; + case RED: return "Color for representation - red."; + case GREEN: return "Color for representation - green."; + case YELLOW: return "Color for representation - yellow."; + case BLUE: return "Color for representation - blue."; + case MAGENTA: return "Color for representation - magenta."; + case CYAN: return "Color for representation - cyan."; + case WHITE: return "Color for representation - white."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BLACK: return "Color Black"; + case RED: return "Color Red"; + case GREEN: return "Color Green"; + case YELLOW: return "Color Yellow"; + case BLUE: return "Color Blue"; + case MAGENTA: return "Color Magenta"; + case CYAN: return "Color Cyan"; + case WHITE: return "Color White"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricColorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricColorEnumFactory.java new file mode 100644 index 00000000000..981e8ae0360 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricColorEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MetricColorEnumFactory implements EnumFactory { + + public MetricColor fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("black".equals(codeString)) + return MetricColor.BLACK; + if ("red".equals(codeString)) + return MetricColor.RED; + if ("green".equals(codeString)) + return MetricColor.GREEN; + if ("yellow".equals(codeString)) + return MetricColor.YELLOW; + if ("blue".equals(codeString)) + return MetricColor.BLUE; + if ("magenta".equals(codeString)) + return MetricColor.MAGENTA; + if ("cyan".equals(codeString)) + return MetricColor.CYAN; + if ("white".equals(codeString)) + return MetricColor.WHITE; + throw new IllegalArgumentException("Unknown MetricColor code '"+codeString+"'"); + } + + public String toCode(MetricColor code) { + if (code == MetricColor.BLACK) + return "black"; + if (code == MetricColor.RED) + return "red"; + if (code == MetricColor.GREEN) + return "green"; + if (code == MetricColor.YELLOW) + return "yellow"; + if (code == MetricColor.BLUE) + return "blue"; + if (code == MetricColor.MAGENTA) + return "magenta"; + if (code == MetricColor.CYAN) + return "cyan"; + if (code == MetricColor.WHITE) + return "white"; + return "?"; + } + + public String toSystem(MetricColor code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricOperationalStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricOperationalStatus.java new file mode 100644 index 00000000000..efd46352dea --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricOperationalStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MetricOperationalStatus { + + /** + * The DeviceMetric is operating and will generate DeviceObservations. + */ + ON, + /** + * The DeviceMetric is not operating. + */ + OFF, + /** + * The DeviceMetric is operating, but will not generate any DeviceObservations. + */ + STANDBY, + /** + * The DeviceMetric was entered in error. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static MetricOperationalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("on".equals(codeString)) + return ON; + if ("off".equals(codeString)) + return OFF; + if ("standby".equals(codeString)) + return STANDBY; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown MetricOperationalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ON: return "on"; + case OFF: return "off"; + case STANDBY: return "standby"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/metric-operational-status"; + } + public String getDefinition() { + switch (this) { + case ON: return "The DeviceMetric is operating and will generate DeviceObservations."; + case OFF: return "The DeviceMetric is not operating."; + case STANDBY: return "The DeviceMetric is operating, but will not generate any DeviceObservations."; + case ENTEREDINERROR: return "The DeviceMetric was entered in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ON: return "On"; + case OFF: return "Off"; + case STANDBY: return "Standby"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricOperationalStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricOperationalStatusEnumFactory.java new file mode 100644 index 00000000000..693172ef5ca --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MetricOperationalStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MetricOperationalStatusEnumFactory implements EnumFactory { + + public MetricOperationalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("on".equals(codeString)) + return MetricOperationalStatus.ON; + if ("off".equals(codeString)) + return MetricOperationalStatus.OFF; + if ("standby".equals(codeString)) + return MetricOperationalStatus.STANDBY; + if ("entered-in-error".equals(codeString)) + return MetricOperationalStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown MetricOperationalStatus code '"+codeString+"'"); + } + + public String toCode(MetricOperationalStatus code) { + if (code == MetricOperationalStatus.ON) + return "on"; + if (code == MetricOperationalStatus.OFF) + return "off"; + if (code == MetricOperationalStatus.STANDBY) + return "standby"; + if (code == MetricOperationalStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(MetricOperationalStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MissingToothReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MissingToothReason.java new file mode 100644 index 00000000000..0d2a4ab2f5f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MissingToothReason.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum MissingToothReason { + + /** + * Extraction + */ + E, + /** + * Congenital + */ + C, + /** + * Unknown + */ + U, + /** + * Other + */ + O, + /** + * added to help the parsers + */ + NULL; + public static MissingToothReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("e".equals(codeString)) + return E; + if ("c".equals(codeString)) + return C; + if ("u".equals(codeString)) + return U; + if ("o".equals(codeString)) + return O; + throw new FHIRException("Unknown MissingToothReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "e"; + case C: return "c"; + case U: return "u"; + case O: return "o"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/missingtoothreason"; + } + public String getDefinition() { + switch (this) { + case E: return "Extraction"; + case C: return "Congenital"; + case U: return "Unknown"; + case O: return "Other"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "E"; + case C: return "C"; + case U: return "U"; + case O: return "O"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MissingToothReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MissingToothReasonEnumFactory.java new file mode 100644 index 00000000000..f6ce3d246f9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MissingToothReasonEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class MissingToothReasonEnumFactory implements EnumFactory { + + public MissingToothReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("e".equals(codeString)) + return MissingToothReason.E; + if ("c".equals(codeString)) + return MissingToothReason.C; + if ("u".equals(codeString)) + return MissingToothReason.U; + if ("o".equals(codeString)) + return MissingToothReason.O; + throw new IllegalArgumentException("Unknown MissingToothReason code '"+codeString+"'"); + } + + public String toCode(MissingToothReason code) { + if (code == MissingToothReason.E) + return "e"; + if (code == MissingToothReason.C) + return "c"; + if (code == MissingToothReason.U) + return "u"; + if (code == MissingToothReason.O) + return "o"; + return "?"; + } + + public String toSystem(MissingToothReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameAssemblyOrder.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameAssemblyOrder.java new file mode 100644 index 00000000000..3a5c46547ae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameAssemblyOrder.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NameAssemblyOrder { + + /** + * null + */ + NL1, + /** + * null + */ + NL2, + /** + * null + */ + NL3, + /** + * null + */ + NL4, + /** + * added to help the parsers + */ + NULL; + public static NameAssemblyOrder fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NL1".equals(codeString)) + return NL1; + if ("NL2".equals(codeString)) + return NL2; + if ("NL3".equals(codeString)) + return NL3; + if ("NL4".equals(codeString)) + return NL4; + throw new FHIRException("Unknown NameAssemblyOrder code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NL1: return "NL1"; + case NL2: return "NL2"; + case NL3: return "NL3"; + case NL4: return "NL4"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/name-assembly-order"; + } + public String getDefinition() { + switch (this) { + case NL1: return ""; + case NL2: return ""; + case NL3: return ""; + case NL4: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NL1: return "Own Name"; + case NL2: return "Partner Name"; + case NL3: return "Partner Name followed by Maiden Name"; + case NL4: return "Own Name followed by Partner Name"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameAssemblyOrderEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameAssemblyOrderEnumFactory.java new file mode 100644 index 00000000000..a59c8a2375f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameAssemblyOrderEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NameAssemblyOrderEnumFactory implements EnumFactory { + + public NameAssemblyOrder fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NL1".equals(codeString)) + return NameAssemblyOrder.NL1; + if ("NL2".equals(codeString)) + return NameAssemblyOrder.NL2; + if ("NL3".equals(codeString)) + return NameAssemblyOrder.NL3; + if ("NL4".equals(codeString)) + return NameAssemblyOrder.NL4; + throw new IllegalArgumentException("Unknown NameAssemblyOrder code '"+codeString+"'"); + } + + public String toCode(NameAssemblyOrder code) { + if (code == NameAssemblyOrder.NL1) + return "NL1"; + if (code == NameAssemblyOrder.NL2) + return "NL2"; + if (code == NameAssemblyOrder.NL3) + return "NL3"; + if (code == NameAssemblyOrder.NL4) + return "NL4"; + return "?"; + } + + public String toSystem(NameAssemblyOrder code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameUse.java new file mode 100644 index 00000000000..7b54b627139 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameUse.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NameUse { + + /** + * Known as/conventional/the one you normally use + */ + USUAL, + /** + * The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called "legal name". + */ + OFFICIAL, + /** + * A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations. + */ + TEMP, + /** + * A name that is used to address the person in an informal manner, but is not part of their formal or usual name + */ + NICKNAME, + /** + * Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons) + */ + ANONYMOUS, + /** + * This name is no longer in use (or was never correct, but retained for records) + */ + OLD, + /** + * A name used prior to changing name because of marriage. This name use is for use by applications that collect and store names that were used prior to a marriage. Marriage naming customs vary greatly around the world, and are constantly changing. This term is not gender specific. The use of this term does not imply any particular history for a person's name + */ + MAIDEN, + /** + * added to help the parsers + */ + NULL; + public static NameUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return USUAL; + if ("official".equals(codeString)) + return OFFICIAL; + if ("temp".equals(codeString)) + return TEMP; + if ("nickname".equals(codeString)) + return NICKNAME; + if ("anonymous".equals(codeString)) + return ANONYMOUS; + if ("old".equals(codeString)) + return OLD; + if ("maiden".equals(codeString)) + return MAIDEN; + throw new FHIRException("Unknown NameUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case USUAL: return "usual"; + case OFFICIAL: return "official"; + case TEMP: return "temp"; + case NICKNAME: return "nickname"; + case ANONYMOUS: return "anonymous"; + case OLD: return "old"; + case MAIDEN: return "maiden"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/name-use"; + } + public String getDefinition() { + switch (this) { + case USUAL: return "Known as/conventional/the one you normally use"; + case OFFICIAL: return "The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called \"legal name\"."; + case TEMP: return "A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations."; + case NICKNAME: return "A name that is used to address the person in an informal manner, but is not part of their formal or usual name"; + case ANONYMOUS: return "Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons)"; + case OLD: return "This name is no longer in use (or was never correct, but retained for records)"; + case MAIDEN: return "A name used prior to changing name because of marriage. This name use is for use by applications that collect and store names that were used prior to a marriage. Marriage naming customs vary greatly around the world, and are constantly changing. This term is not gender specific. The use of this term does not imply any particular history for a person's name"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case USUAL: return "Usual"; + case OFFICIAL: return "Official"; + case TEMP: return "Temp"; + case NICKNAME: return "Nickname"; + case ANONYMOUS: return "Anonymous"; + case OLD: return "Old"; + case MAIDEN: return "Name changed for Marriage"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameUseEnumFactory.java new file mode 100644 index 00000000000..4da2235c57e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NameUseEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NameUseEnumFactory implements EnumFactory { + + public NameUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("usual".equals(codeString)) + return NameUse.USUAL; + if ("official".equals(codeString)) + return NameUse.OFFICIAL; + if ("temp".equals(codeString)) + return NameUse.TEMP; + if ("nickname".equals(codeString)) + return NameUse.NICKNAME; + if ("anonymous".equals(codeString)) + return NameUse.ANONYMOUS; + if ("old".equals(codeString)) + return NameUse.OLD; + if ("maiden".equals(codeString)) + return NameUse.MAIDEN; + throw new IllegalArgumentException("Unknown NameUse code '"+codeString+"'"); + } + + public String toCode(NameUse code) { + if (code == NameUse.USUAL) + return "usual"; + if (code == NameUse.OFFICIAL) + return "official"; + if (code == NameUse.TEMP) + return "temp"; + if (code == NameUse.NICKNAME) + return "nickname"; + if (code == NameUse.ANONYMOUS) + return "anonymous"; + if (code == NameUse.OLD) + return "old"; + if (code == NameUse.MAIDEN) + return "maiden"; + return "?"; + } + + public String toSystem(NameUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemIdentifierType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemIdentifierType.java new file mode 100644 index 00000000000..8759f4ec7a0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemIdentifierType.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NamingsystemIdentifierType { + + /** + * An ISO object identifier; e.g. 1.2.3.4.5. + */ + OID, + /** + * A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11. + */ + UUID, + /** + * A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org. + */ + URI, + /** + * Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static NamingsystemIdentifierType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("oid".equals(codeString)) + return OID; + if ("uuid".equals(codeString)) + return UUID; + if ("uri".equals(codeString)) + return URI; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown NamingsystemIdentifierType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OID: return "oid"; + case UUID: return "uuid"; + case URI: return "uri"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/namingsystem-identifier-type"; + } + public String getDefinition() { + switch (this) { + case OID: return "An ISO object identifier; e.g. 1.2.3.4.5."; + case UUID: return "A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11."; + case URI: return "A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org."; + case OTHER: return "Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OID: return "OID"; + case UUID: return "UUID"; + case URI: return "URI"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemIdentifierTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemIdentifierTypeEnumFactory.java new file mode 100644 index 00000000000..aa0b7e0fc06 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemIdentifierTypeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NamingsystemIdentifierTypeEnumFactory implements EnumFactory { + + public NamingsystemIdentifierType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("oid".equals(codeString)) + return NamingsystemIdentifierType.OID; + if ("uuid".equals(codeString)) + return NamingsystemIdentifierType.UUID; + if ("uri".equals(codeString)) + return NamingsystemIdentifierType.URI; + if ("other".equals(codeString)) + return NamingsystemIdentifierType.OTHER; + throw new IllegalArgumentException("Unknown NamingsystemIdentifierType code '"+codeString+"'"); + } + + public String toCode(NamingsystemIdentifierType code) { + if (code == NamingsystemIdentifierType.OID) + return "oid"; + if (code == NamingsystemIdentifierType.UUID) + return "uuid"; + if (code == NamingsystemIdentifierType.URI) + return "uri"; + if (code == NamingsystemIdentifierType.OTHER) + return "other"; + return "?"; + } + + public String toSystem(NamingsystemIdentifierType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemType.java new file mode 100644 index 00000000000..ac6f84a1934 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NamingsystemType { + + /** + * The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc. + */ + CODESYSTEM, + /** + * The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.). + */ + IDENTIFIER, + /** + * The naming system is used as the root for other identifiers and naming systems. + */ + ROOT, + /** + * added to help the parsers + */ + NULL; + public static NamingsystemType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("codesystem".equals(codeString)) + return CODESYSTEM; + if ("identifier".equals(codeString)) + return IDENTIFIER; + if ("root".equals(codeString)) + return ROOT; + throw new FHIRException("Unknown NamingsystemType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CODESYSTEM: return "codesystem"; + case IDENTIFIER: return "identifier"; + case ROOT: return "root"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/namingsystem-type"; + } + public String getDefinition() { + switch (this) { + case CODESYSTEM: return "The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc."; + case IDENTIFIER: return "The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.)."; + case ROOT: return "The naming system is used as the root for other identifiers and naming systems."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CODESYSTEM: return "Code System"; + case IDENTIFIER: return "Identifier"; + case ROOT: return "Root"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemTypeEnumFactory.java new file mode 100644 index 00000000000..891d3981bf9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NamingsystemTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NamingsystemTypeEnumFactory implements EnumFactory { + + public NamingsystemType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("codesystem".equals(codeString)) + return NamingsystemType.CODESYSTEM; + if ("identifier".equals(codeString)) + return NamingsystemType.IDENTIFIER; + if ("root".equals(codeString)) + return NamingsystemType.ROOT; + throw new IllegalArgumentException("Unknown NamingsystemType code '"+codeString+"'"); + } + + public String toCode(NamingsystemType code) { + if (code == NamingsystemType.CODESYSTEM) + return "codesystem"; + if (code == NamingsystemType.IDENTIFIER) + return "identifier"; + if (code == NamingsystemType.ROOT) + return "root"; + return "?"; + } + + public String toSystem(NamingsystemType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NarrativeStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NarrativeStatus.java new file mode 100644 index 00000000000..7aacce6d88f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NarrativeStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NarrativeStatus { + + /** + * The contents of the narrative are entirely generated from the structured data in the content. + */ + GENERATED, + /** + * The contents of the narrative are entirely generated from the structured data in the content and some of the content is generated from extensions + */ + EXTENSIONS, + /** + * The contents of the narrative may contain additional information not found in the structured data. Note that there is no computable way to determine what the extra information is, other than by human inspection + */ + ADDITIONAL, + /** + * The contents of the narrative are some equivalent of "No human-readable text provided in this case" + */ + EMPTY, + /** + * added to help the parsers + */ + NULL; + public static NarrativeStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("generated".equals(codeString)) + return GENERATED; + if ("extensions".equals(codeString)) + return EXTENSIONS; + if ("additional".equals(codeString)) + return ADDITIONAL; + if ("empty".equals(codeString)) + return EMPTY; + throw new FHIRException("Unknown NarrativeStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GENERATED: return "generated"; + case EXTENSIONS: return "extensions"; + case ADDITIONAL: return "additional"; + case EMPTY: return "empty"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/narrative-status"; + } + public String getDefinition() { + switch (this) { + case GENERATED: return "The contents of the narrative are entirely generated from the structured data in the content."; + case EXTENSIONS: return "The contents of the narrative are entirely generated from the structured data in the content and some of the content is generated from extensions"; + case ADDITIONAL: return "The contents of the narrative may contain additional information not found in the structured data. Note that there is no computable way to determine what the extra information is, other than by human inspection"; + case EMPTY: return "The contents of the narrative are some equivalent of \"No human-readable text provided in this case\""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GENERATED: return "Generated"; + case EXTENSIONS: return "Extensions"; + case ADDITIONAL: return "Additional"; + case EMPTY: return "Empty"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NarrativeStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NarrativeStatusEnumFactory.java new file mode 100644 index 00000000000..0011ecd7d8a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NarrativeStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NarrativeStatusEnumFactory implements EnumFactory { + + public NarrativeStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("generated".equals(codeString)) + return NarrativeStatus.GENERATED; + if ("extensions".equals(codeString)) + return NarrativeStatus.EXTENSIONS; + if ("additional".equals(codeString)) + return NarrativeStatus.ADDITIONAL; + if ("empty".equals(codeString)) + return NarrativeStatus.EMPTY; + throw new IllegalArgumentException("Unknown NarrativeStatus code '"+codeString+"'"); + } + + public String toCode(NarrativeStatus code) { + if (code == NarrativeStatus.GENERATED) + return "generated"; + if (code == NarrativeStatus.EXTENSIONS) + return "extensions"; + if (code == NarrativeStatus.ADDITIONAL) + return "additional"; + if (code == NarrativeStatus.EMPTY) + return "empty"; + return "?"; + } + + public String toSystem(NarrativeStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NetworkType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NetworkType.java new file mode 100644 index 00000000000..8f5c6549a40 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NetworkType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NetworkType { + + /** + * The machine name, including DNS name. + */ + _1, + /** + * The assigned Internet Protocol (IP) address. + */ + _2, + /** + * The assigned telephone number. + */ + _3, + /** + * The assigned email address. + */ + _4, + /** + * URI (User directory, HTTP-PUT, ftp, etc.). + */ + _5, + /** + * added to help the parsers + */ + NULL; + public static NetworkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + throw new FHIRException("Unknown NetworkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/network-type"; + } + public String getDefinition() { + switch (this) { + case _1: return "The machine name, including DNS name."; + case _2: return "The assigned Internet Protocol (IP) address."; + case _3: return "The assigned telephone number."; + case _4: return "The assigned email address."; + case _5: return "URI (User directory, HTTP-PUT, ftp, etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Machine Name"; + case _2: return "IP Address"; + case _3: return "Telephone Number"; + case _4: return "Email address"; + case _5: return "URI"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NetworkTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NetworkTypeEnumFactory.java new file mode 100644 index 00000000000..b67fa03508f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NetworkTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NetworkTypeEnumFactory implements EnumFactory { + + public NetworkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return NetworkType._1; + if ("2".equals(codeString)) + return NetworkType._2; + if ("3".equals(codeString)) + return NetworkType._3; + if ("4".equals(codeString)) + return NetworkType._4; + if ("5".equals(codeString)) + return NetworkType._5; + throw new IllegalArgumentException("Unknown NetworkType code '"+codeString+"'"); + } + + public String toCode(NetworkType code) { + if (code == NetworkType._1) + return "1"; + if (code == NetworkType._2) + return "2"; + if (code == NetworkType._3) + return "3"; + if (code == NetworkType._4) + return "4"; + if (code == NetworkType._5) + return "5"; + return "?"; + } + + public String toSystem(NetworkType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NoteType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NoteType.java new file mode 100644 index 00000000000..4ff67c05d5c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NoteType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NoteType { + + /** + * Display the note. + */ + DISPLAY, + /** + * Print the note on the form. + */ + PRINT, + /** + * Print the note for the operator. + */ + PRINTOPER, + /** + * added to help the parsers + */ + NULL; + public static NoteType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("display".equals(codeString)) + return DISPLAY; + if ("print".equals(codeString)) + return PRINT; + if ("printoper".equals(codeString)) + return PRINTOPER; + throw new FHIRException("Unknown NoteType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DISPLAY: return "display"; + case PRINT: return "print"; + case PRINTOPER: return "printoper"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/note-type"; + } + public String getDefinition() { + switch (this) { + case DISPLAY: return "Display the note."; + case PRINT: return "Print the note on the form."; + case PRINTOPER: return "Print the note for the operator."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DISPLAY: return "Display"; + case PRINT: return "Print (Form)"; + case PRINTOPER: return "Print (Operator)"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NoteTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NoteTypeEnumFactory.java new file mode 100644 index 00000000000..a45e135feb9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NoteTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NoteTypeEnumFactory implements EnumFactory { + + public NoteType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("display".equals(codeString)) + return NoteType.DISPLAY; + if ("print".equals(codeString)) + return NoteType.PRINT; + if ("printoper".equals(codeString)) + return NoteType.PRINTOPER; + throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'"); + } + + public String toCode(NoteType code) { + if (code == NoteType.DISPLAY) + return "display"; + if (code == NoteType.PRINT) + return "print"; + if (code == NoteType.PRINTOPER) + return "printoper"; + return "?"; + } + + public String toSystem(NoteType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NutritionRequestStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NutritionRequestStatus.java new file mode 100644 index 00000000000..cf75948ee9e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NutritionRequestStatus.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum NutritionRequestStatus { + + /** + * The request has been proposed. + */ + PROPOSED, + /** + * The request is in preliminary form prior to being sent. + */ + DRAFT, + /** + * The request has been planned. + */ + PLANNED, + /** + * The request has been placed. + */ + REQUESTED, + /** + * The request is 'actionable', but not all actions that are implied by it have occurred yet. + */ + ACTIVE, + /** + * Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called "suspended". + */ + ONHOLD, + /** + * All actions that are implied by the order have occurred and no continuation is planned (this will rarely be made explicit). + */ + COMPLETED, + /** + * The request has been withdrawn and is no longer actionable. + */ + CANCELLED, + /** + * The request was entered in error and voided. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static NutritionRequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("draft".equals(codeString)) + return DRAFT; + if ("planned".equals(codeString)) + return PLANNED; + if ("requested".equals(codeString)) + return REQUESTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown NutritionRequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case DRAFT: return "draft"; + case PLANNED: return "planned"; + case REQUESTED: return "requested"; + case ACTIVE: return "active"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/nutrition-request-status"; + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "The request has been proposed."; + case DRAFT: return "The request is in preliminary form prior to being sent."; + case PLANNED: return "The request has been planned."; + case REQUESTED: return "The request has been placed."; + case ACTIVE: return "The request is 'actionable', but not all actions that are implied by it have occurred yet."; + case ONHOLD: return "Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; + case COMPLETED: return "All actions that are implied by the order have occurred and no continuation is planned (this will rarely be made explicit)."; + case CANCELLED: return "The request has been withdrawn and is no longer actionable."; + case ENTEREDINERROR: return "The request was entered in error and voided."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case DRAFT: return "Draft"; + case PLANNED: return "Planned"; + case REQUESTED: return "Requested"; + case ACTIVE: return "Active"; + case ONHOLD: return "On-Hold"; + case COMPLETED: return "Completed"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NutritionRequestStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NutritionRequestStatusEnumFactory.java new file mode 100644 index 00000000000..1fe0a336cfc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/NutritionRequestStatusEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class NutritionRequestStatusEnumFactory implements EnumFactory { + + public NutritionRequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return NutritionRequestStatus.PROPOSED; + if ("draft".equals(codeString)) + return NutritionRequestStatus.DRAFT; + if ("planned".equals(codeString)) + return NutritionRequestStatus.PLANNED; + if ("requested".equals(codeString)) + return NutritionRequestStatus.REQUESTED; + if ("active".equals(codeString)) + return NutritionRequestStatus.ACTIVE; + if ("on-hold".equals(codeString)) + return NutritionRequestStatus.ONHOLD; + if ("completed".equals(codeString)) + return NutritionRequestStatus.COMPLETED; + if ("cancelled".equals(codeString)) + return NutritionRequestStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return NutritionRequestStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown NutritionRequestStatus code '"+codeString+"'"); + } + + public String toCode(NutritionRequestStatus code) { + if (code == NutritionRequestStatus.PROPOSED) + return "proposed"; + if (code == NutritionRequestStatus.DRAFT) + return "draft"; + if (code == NutritionRequestStatus.PLANNED) + return "planned"; + if (code == NutritionRequestStatus.REQUESTED) + return "requested"; + if (code == NutritionRequestStatus.ACTIVE) + return "active"; + if (code == NutritionRequestStatus.ONHOLD) + return "on-hold"; + if (code == NutritionRequestStatus.COMPLETED) + return "completed"; + if (code == NutritionRequestStatus.CANCELLED) + return "cancelled"; + if (code == NutritionRequestStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(NutritionRequestStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObjectRole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObjectRole.java new file mode 100644 index 00000000000..ecef7b1a147 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObjectRole.java @@ -0,0 +1,285 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObjectRole { + + /** + * This object is the patient that is the subject of care related to this event. It is identifiable by patient ID or equivalent. The patient may be either human or animal. + */ + _1, + /** + * This is a location identified as related to the event. This is usually the location where the event took place. Note that for shipping, the usual events are arrival at a location or departure from a location. + */ + _2, + /** + * This object is any kind of persistent document created as a result of the event. This could be a paper report, film, electronic report, DICOM Study, etc. Issues related to medical records life cycle management are conveyed elsewhere. + */ + _3, + /** + * A logical object related to a health record event. This is any healthcare specific resource (object) not restricted to FHIR defined Resources. + */ + _4, + /** + * This is any configurable file used to control creation of documents. Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc. + */ + _5, + /** + * A human participant not otherwise identified by some other category. + */ + _6, + /** + * (deprecated) + */ + _7, + /** + * Typically a licensed person who is providing or performing care related to the event, generally a physician. The key distinction between doctor and practitioner is with regards to their role, not the licensing. The doctor is the human who actually performed the work. The practitioner is the human or organization that is responsible for the work. + */ + _8, + /** + * A person or system that is being notified as part of the event. This is relevant in situations where automated systems provide notifications to other parties when an event took place. + */ + _9, + /** + * Insurance company, or any other organization who accepts responsibility for paying for the healthcare event. + */ + _10, + /** + * A person or active system object involved in the event with a security role. + */ + _11, + /** + * A person or system object involved in the event with the authority to modify security roles of other objects. + */ + _12, + /** + * A passive object, such as a role table, that is relevant to the event. + */ + _13, + /** + * (deprecated) Relevant to certain RBAC security methodologies. + */ + _14, + /** + * Any person or organization responsible for providing care. This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note the distinction between practitioner and the doctor that actually provided the care to the patient. + */ + _15, + /** + * The source or destination for data transfer, when it does not match some other role. + */ + _16, + /** + * A source or destination for data transfer that acts as an archive, database, or similar role. + */ + _17, + /** + * An object that holds schedule information. This could be an appointment book, availability information, etc. + */ + _18, + /** + * An organization or person that is the recipient of services. This could be an organization that is buying services for a patient, or a person that is buying services for an animal. + */ + _19, + /** + * An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS. + */ + _20, + /** + * A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP. + */ + _21, + /** + * (Deprecated) + */ + _22, + /** + * An object that specifies or controls the routing or delivery of items. For example, a distribution list is the routing criteria for mail. The items delivered may be documents, jobs, or other objects. + */ + _23, + /** + * The contents of a query. This is used to capture the contents of any kind of query. For security surveillance purposes knowing the queries being made is very important. + */ + _24, + /** + * added to help the parsers + */ + NULL; + public static ObjectRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("19".equals(codeString)) + return _19; + if ("20".equals(codeString)) + return _20; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + throw new FHIRException("Unknown ObjectRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _19: return "19"; + case _20: return "20"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/object-role"; + } + public String getDefinition() { + switch (this) { + case _1: return "This object is the patient that is the subject of care related to this event. It is identifiable by patient ID or equivalent. The patient may be either human or animal."; + case _2: return "This is a location identified as related to the event. This is usually the location where the event took place. Note that for shipping, the usual events are arrival at a location or departure from a location."; + case _3: return "This object is any kind of persistent document created as a result of the event. This could be a paper report, film, electronic report, DICOM Study, etc. Issues related to medical records life cycle management are conveyed elsewhere."; + case _4: return "A logical object related to a health record event. This is any healthcare specific resource (object) not restricted to FHIR defined Resources."; + case _5: return "This is any configurable file used to control creation of documents. Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc."; + case _6: return "A human participant not otherwise identified by some other category."; + case _7: return "(deprecated)"; + case _8: return "Typically a licensed person who is providing or performing care related to the event, generally a physician. The key distinction between doctor and practitioner is with regards to their role, not the licensing. The doctor is the human who actually performed the work. The practitioner is the human or organization that is responsible for the work."; + case _9: return "A person or system that is being notified as part of the event. This is relevant in situations where automated systems provide notifications to other parties when an event took place."; + case _10: return "Insurance company, or any other organization who accepts responsibility for paying for the healthcare event."; + case _11: return "A person or active system object involved in the event with a security role."; + case _12: return "A person or system object involved in the event with the authority to modify security roles of other objects."; + case _13: return "A passive object, such as a role table, that is relevant to the event."; + case _14: return "(deprecated) Relevant to certain RBAC security methodologies."; + case _15: return "Any person or organization responsible for providing care. This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note the distinction between practitioner and the doctor that actually provided the care to the patient."; + case _16: return "The source or destination for data transfer, when it does not match some other role."; + case _17: return "A source or destination for data transfer that acts as an archive, database, or similar role."; + case _18: return "An object that holds schedule information. This could be an appointment book, availability information, etc."; + case _19: return "An organization or person that is the recipient of services. This could be an organization that is buying services for a patient, or a person that is buying services for an animal."; + case _20: return "An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS."; + case _21: return "A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP."; + case _22: return "(Deprecated)"; + case _23: return "An object that specifies or controls the routing or delivery of items. For example, a distribution list is the routing criteria for mail. The items delivered may be documents, jobs, or other objects."; + case _24: return "The contents of a query. This is used to capture the contents of any kind of query. For security surveillance purposes knowing the queries being made is very important."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Patient"; + case _2: return "Location"; + case _3: return "Report"; + case _4: return "Domain Resource"; + case _5: return "Master file"; + case _6: return "User"; + case _7: return "List"; + case _8: return "Doctor"; + case _9: return "Subscriber"; + case _10: return "Guarantor"; + case _11: return "Security User Entity"; + case _12: return "Security User Group"; + case _13: return "Security Resource"; + case _14: return "Security Granularity Definition"; + case _15: return "Practitioner"; + case _16: return "Data Destination"; + case _17: return "Data Repository"; + case _18: return "Schedule"; + case _19: return "Customer"; + case _20: return "Job"; + case _21: return "Job Stream"; + case _22: return "Table"; + case _23: return "Routing Criteria"; + case _24: return "Query"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObjectRoleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObjectRoleEnumFactory.java new file mode 100644 index 00000000000..a61e42bada1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObjectRoleEnumFactory.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ObjectRoleEnumFactory implements EnumFactory { + + public ObjectRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ObjectRole._1; + if ("2".equals(codeString)) + return ObjectRole._2; + if ("3".equals(codeString)) + return ObjectRole._3; + if ("4".equals(codeString)) + return ObjectRole._4; + if ("5".equals(codeString)) + return ObjectRole._5; + if ("6".equals(codeString)) + return ObjectRole._6; + if ("7".equals(codeString)) + return ObjectRole._7; + if ("8".equals(codeString)) + return ObjectRole._8; + if ("9".equals(codeString)) + return ObjectRole._9; + if ("10".equals(codeString)) + return ObjectRole._10; + if ("11".equals(codeString)) + return ObjectRole._11; + if ("12".equals(codeString)) + return ObjectRole._12; + if ("13".equals(codeString)) + return ObjectRole._13; + if ("14".equals(codeString)) + return ObjectRole._14; + if ("15".equals(codeString)) + return ObjectRole._15; + if ("16".equals(codeString)) + return ObjectRole._16; + if ("17".equals(codeString)) + return ObjectRole._17; + if ("18".equals(codeString)) + return ObjectRole._18; + if ("19".equals(codeString)) + return ObjectRole._19; + if ("20".equals(codeString)) + return ObjectRole._20; + if ("21".equals(codeString)) + return ObjectRole._21; + if ("22".equals(codeString)) + return ObjectRole._22; + if ("23".equals(codeString)) + return ObjectRole._23; + if ("24".equals(codeString)) + return ObjectRole._24; + throw new IllegalArgumentException("Unknown ObjectRole code '"+codeString+"'"); + } + + public String toCode(ObjectRole code) { + if (code == ObjectRole._1) + return "1"; + if (code == ObjectRole._2) + return "2"; + if (code == ObjectRole._3) + return "3"; + if (code == ObjectRole._4) + return "4"; + if (code == ObjectRole._5) + return "5"; + if (code == ObjectRole._6) + return "6"; + if (code == ObjectRole._7) + return "7"; + if (code == ObjectRole._8) + return "8"; + if (code == ObjectRole._9) + return "9"; + if (code == ObjectRole._10) + return "10"; + if (code == ObjectRole._11) + return "11"; + if (code == ObjectRole._12) + return "12"; + if (code == ObjectRole._13) + return "13"; + if (code == ObjectRole._14) + return "14"; + if (code == ObjectRole._15) + return "15"; + if (code == ObjectRole._16) + return "16"; + if (code == ObjectRole._17) + return "17"; + if (code == ObjectRole._18) + return "18"; + if (code == ObjectRole._19) + return "19"; + if (code == ObjectRole._20) + return "20"; + if (code == ObjectRole._21) + return "21"; + if (code == ObjectRole._22) + return "22"; + if (code == ObjectRole._23) + return "23"; + if (code == ObjectRole._24) + return "24"; + return "?"; + } + + public String toSystem(ObjectRole code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationCategory.java new file mode 100644 index 00000000000..823484cae58 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationCategory.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObservationCategory { + + /** + * The Social History Observations define the patient's occupational, personal (e.g. lifestyle), social, and environmental history and health risk factors, as well as administrative data such as marital status, race, ethnicity and religious affiliation. + */ + SOCIALHISTORY, + /** + * Clinical observations measure the body's basic functions such as such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area. + */ + VITALSIGNS, + /** + * Observations generated by imaging. The scope includes observations, plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, nuclear medicine. + */ + IMAGING, + /** + * The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology, microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory. + */ + LABORATORY, + /** + * Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding lab and imaging (e.g. cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure, such as where a gastroenterologist reports the size of a polyp observed during a colonoscopy. + */ + PROCEDURE, + /** + * Assessment tool/survey instrument observations (e.g. Apgar Scores, Montreal Cognitive Assessment (MoCA)) + */ + SURVEY, + /** + * Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body. + */ + EXAM, + /** + * Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy) + */ + THERAPY, + /** + * added to help the parsers + */ + NULL; + public static ObservationCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("social-history".equals(codeString)) + return SOCIALHISTORY; + if ("vital-signs".equals(codeString)) + return VITALSIGNS; + if ("imaging".equals(codeString)) + return IMAGING; + if ("laboratory".equals(codeString)) + return LABORATORY; + if ("procedure".equals(codeString)) + return PROCEDURE; + if ("survey".equals(codeString)) + return SURVEY; + if ("exam".equals(codeString)) + return EXAM; + if ("therapy".equals(codeString)) + return THERAPY; + throw new FHIRException("Unknown ObservationCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOCIALHISTORY: return "social-history"; + case VITALSIGNS: return "vital-signs"; + case IMAGING: return "imaging"; + case LABORATORY: return "laboratory"; + case PROCEDURE: return "procedure"; + case SURVEY: return "survey"; + case EXAM: return "exam"; + case THERAPY: return "therapy"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/observation-category"; + } + public String getDefinition() { + switch (this) { + case SOCIALHISTORY: return "The Social History Observations define the patient's occupational, personal (e.g. lifestyle), social, and environmental history and health risk factors, as well as administrative data such as marital status, race, ethnicity and religious affiliation."; + case VITALSIGNS: return " Clinical observations measure the body's basic functions such as such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area."; + case IMAGING: return "Observations generated by imaging. The scope includes observations, plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, nuclear medicine."; + case LABORATORY: return "The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology, microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory."; + case PROCEDURE: return "Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding lab and imaging (e.g. cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure, such as where a gastroenterologist reports the size of a polyp observed during a colonoscopy."; + case SURVEY: return "Assessment tool/survey instrument observations (e.g. Apgar Scores, Montreal Cognitive Assessment (MoCA))"; + case EXAM: return "Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body."; + case THERAPY: return "Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOCIALHISTORY: return "Social History"; + case VITALSIGNS: return "Vital Signs"; + case IMAGING: return "Imaging"; + case LABORATORY: return "Laboratory"; + case PROCEDURE: return "Procedure"; + case SURVEY: return "Survey"; + case EXAM: return "Exam"; + case THERAPY: return "Therapy"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationCategoryEnumFactory.java new file mode 100644 index 00000000000..2ce393d5f73 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationCategoryEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ObservationCategoryEnumFactory implements EnumFactory { + + public ObservationCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("social-history".equals(codeString)) + return ObservationCategory.SOCIALHISTORY; + if ("vital-signs".equals(codeString)) + return ObservationCategory.VITALSIGNS; + if ("imaging".equals(codeString)) + return ObservationCategory.IMAGING; + if ("laboratory".equals(codeString)) + return ObservationCategory.LABORATORY; + if ("procedure".equals(codeString)) + return ObservationCategory.PROCEDURE; + if ("survey".equals(codeString)) + return ObservationCategory.SURVEY; + if ("exam".equals(codeString)) + return ObservationCategory.EXAM; + if ("therapy".equals(codeString)) + return ObservationCategory.THERAPY; + throw new IllegalArgumentException("Unknown ObservationCategory code '"+codeString+"'"); + } + + public String toCode(ObservationCategory code) { + if (code == ObservationCategory.SOCIALHISTORY) + return "social-history"; + if (code == ObservationCategory.VITALSIGNS) + return "vital-signs"; + if (code == ObservationCategory.IMAGING) + return "imaging"; + if (code == ObservationCategory.LABORATORY) + return "laboratory"; + if (code == ObservationCategory.PROCEDURE) + return "procedure"; + if (code == ObservationCategory.SURVEY) + return "survey"; + if (code == ObservationCategory.EXAM) + return "exam"; + if (code == ObservationCategory.THERAPY) + return "therapy"; + return "?"; + } + + public String toSystem(ObservationCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationRelationshiptypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationRelationshiptypes.java new file mode 100644 index 00000000000..9e86f115f85 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationRelationshiptypes.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObservationRelationshiptypes { + + /** + * This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group. + */ + HASMEMBER, + /** + * The target resource (Observation or QuestionnaireResponse) is part of the information from which this observation value is derived. (e.g. calculated anion gap, Apgar score) NOTE: "derived-from" is the only logical choice when referencing QuestionnaireResponse. + */ + DERIVEDFROM, + /** + * This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test). + */ + SEQUELTO, + /** + * This observation replaces a previous observation (i.e. a revised value). The target observation is now obsolete. + */ + REPLACES, + /** + * The value of the target observation qualifies (refines) the semantics of the source observation (e.g. a lipemia measure target from a plasma measure). + */ + QUALIFIEDBY, + /** + * The value of the target observation interferes (degrades quality, or prevents valid observation) with the semantics of the source observation (e.g. a hemolysis measure target from a plasma potassium measure, which has no value). + */ + INTERFEREDBY, + /** + * added to help the parsers + */ + NULL; + public static ObservationRelationshiptypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("has-member".equals(codeString)) + return HASMEMBER; + if ("derived-from".equals(codeString)) + return DERIVEDFROM; + if ("sequel-to".equals(codeString)) + return SEQUELTO; + if ("replaces".equals(codeString)) + return REPLACES; + if ("qualified-by".equals(codeString)) + return QUALIFIEDBY; + if ("interfered-by".equals(codeString)) + return INTERFEREDBY; + throw new FHIRException("Unknown ObservationRelationshiptypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HASMEMBER: return "has-member"; + case DERIVEDFROM: return "derived-from"; + case SEQUELTO: return "sequel-to"; + case REPLACES: return "replaces"; + case QUALIFIEDBY: return "qualified-by"; + case INTERFEREDBY: return "interfered-by"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/observation-relationshiptypes"; + } + public String getDefinition() { + switch (this) { + case HASMEMBER: return "This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group."; + case DERIVEDFROM: return "The target resource (Observation or QuestionnaireResponse) is part of the information from which this observation value is derived. (e.g. calculated anion gap, Apgar score) NOTE: \"derived-from\" is the only logical choice when referencing QuestionnaireResponse."; + case SEQUELTO: return "This observation follows the target observation (e.g. timed tests such as Glucose Tolerance Test)."; + case REPLACES: return "This observation replaces a previous observation (i.e. a revised value). The target observation is now obsolete."; + case QUALIFIEDBY: return "The value of the target observation qualifies (refines) the semantics of the source observation (e.g. a lipemia measure target from a plasma measure)."; + case INTERFEREDBY: return "The value of the target observation interferes (degrades quality, or prevents valid observation) with the semantics of the source observation (e.g. a hemolysis measure target from a plasma potassium measure, which has no value)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HASMEMBER: return "Has Member"; + case DERIVEDFROM: return "Derived From"; + case SEQUELTO: return "Sequel To"; + case REPLACES: return "Replaces"; + case QUALIFIEDBY: return "Qualified By"; + case INTERFEREDBY: return "Interfered By"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationRelationshiptypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationRelationshiptypesEnumFactory.java new file mode 100644 index 00000000000..f3171b237fc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationRelationshiptypesEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ObservationRelationshiptypesEnumFactory implements EnumFactory { + + public ObservationRelationshiptypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("has-member".equals(codeString)) + return ObservationRelationshiptypes.HASMEMBER; + if ("derived-from".equals(codeString)) + return ObservationRelationshiptypes.DERIVEDFROM; + if ("sequel-to".equals(codeString)) + return ObservationRelationshiptypes.SEQUELTO; + if ("replaces".equals(codeString)) + return ObservationRelationshiptypes.REPLACES; + if ("qualified-by".equals(codeString)) + return ObservationRelationshiptypes.QUALIFIEDBY; + if ("interfered-by".equals(codeString)) + return ObservationRelationshiptypes.INTERFEREDBY; + throw new IllegalArgumentException("Unknown ObservationRelationshiptypes code '"+codeString+"'"); + } + + public String toCode(ObservationRelationshiptypes code) { + if (code == ObservationRelationshiptypes.HASMEMBER) + return "has-member"; + if (code == ObservationRelationshiptypes.DERIVEDFROM) + return "derived-from"; + if (code == ObservationRelationshiptypes.SEQUELTO) + return "sequel-to"; + if (code == ObservationRelationshiptypes.REPLACES) + return "replaces"; + if (code == ObservationRelationshiptypes.QUALIFIEDBY) + return "qualified-by"; + if (code == ObservationRelationshiptypes.INTERFEREDBY) + return "interfered-by"; + return "?"; + } + + public String toSystem(ObservationRelationshiptypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatistics.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatistics.java new file mode 100644 index 00000000000..5db63190671 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatistics.java @@ -0,0 +1,258 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObservationStatistics { + + /** + * The [mean](https://en.wikipedia.org/wiki/Arithmetic_mean) of N measurements over the stated period + */ + AVERAGE, + /** + * The [maximum](https://en.wikipedia.org/wiki/Maximal_element) value of N measurements over the stated period + */ + MAXIMUM, + /** + * The [minimum](https://en.wikipedia.org/wiki/Minimal_element) value of N measurements over the stated period + */ + MINIMUM, + /** + * The [number] of valid measurements over the stated period that contributed to the other statistical outputs + */ + COUNT, + /** + * The total [number] of valid measurements over the stated period, including observations that were ignored because they did not contain valid result values + */ + TOTALCOUNT, + /** + * The [median](https://en.wikipedia.org/wiki/Median) of N measurements over the stated period + */ + MEDIAN, + /** + * The [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation) of N measurements over the stated period + */ + STDDEV, + /** + * The [sum](https://en.wikipedia.org/wiki/Summation) of N measurements over the stated period + */ + SUM, + /** + * The [variance](https://en.wikipedia.org/wiki/Variance) of N measurements over the stated period + */ + VARIANCE, + /** + * The 20th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period + */ + _20PERCENT, + /** + * The 80th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period + */ + _80PERCENT, + /** + * The lower [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period + */ + _4LOWER, + /** + * The upper [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period + */ + _4UPPER, + /** + * The difference between the upper and lower [Quartiles](https://en.wikipedia.org/wiki/Quartile) is called the Interquartile range. (IQR = Q3-Q1) Quartile deviation or Semi-interquartile range is one-half the difference between the first and the third quartiles. + */ + _4DEV, + /** + * The lowest of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population + */ + _51, + /** + * The second of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population + */ + _52, + /** + * The third of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population + */ + _53, + /** + * The fourth of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population + */ + _54, + /** + * Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive or negative, or even undefined. Source: [Wikipedia](https://en.wikipedia.org/wiki/Skewness) + */ + SKEW, + /** + * Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. Source: [Wikipedia](https://en.wikipedia.org/wiki/Kurtosis) + */ + KURTOSIS, + /** + * Linear regression is an approach for modeling two-dimensional sample points with one independent variable and one dependent variable (conventionally, the x and y coordinates in a Cartesian coordinate system) and finds a linear function (a non-vertical straight line) that, as accurately as possible, predicts the dependent variable values as a function of the independent variables. Source: [Wikipedia](https://en.wikipedia.org/wiki/Simple_linear_regression) This Statistic code will return both a gradient and an intercept value. + */ + REGRESSION, + /** + * added to help the parsers + */ + NULL; + public static ObservationStatistics fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("average".equals(codeString)) + return AVERAGE; + if ("maximum".equals(codeString)) + return MAXIMUM; + if ("minimum".equals(codeString)) + return MINIMUM; + if ("count".equals(codeString)) + return COUNT; + if ("totalcount".equals(codeString)) + return TOTALCOUNT; + if ("median".equals(codeString)) + return MEDIAN; + if ("std-dev".equals(codeString)) + return STDDEV; + if ("sum".equals(codeString)) + return SUM; + if ("variance".equals(codeString)) + return VARIANCE; + if ("20-percent".equals(codeString)) + return _20PERCENT; + if ("80-percent".equals(codeString)) + return _80PERCENT; + if ("4-lower".equals(codeString)) + return _4LOWER; + if ("4-upper".equals(codeString)) + return _4UPPER; + if ("4-dev".equals(codeString)) + return _4DEV; + if ("5-1".equals(codeString)) + return _51; + if ("5-2".equals(codeString)) + return _52; + if ("5-3".equals(codeString)) + return _53; + if ("5-4".equals(codeString)) + return _54; + if ("skew".equals(codeString)) + return SKEW; + if ("kurtosis".equals(codeString)) + return KURTOSIS; + if ("regression".equals(codeString)) + return REGRESSION; + throw new FHIRException("Unknown ObservationStatistics code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AVERAGE: return "average"; + case MAXIMUM: return "maximum"; + case MINIMUM: return "minimum"; + case COUNT: return "count"; + case TOTALCOUNT: return "totalcount"; + case MEDIAN: return "median"; + case STDDEV: return "std-dev"; + case SUM: return "sum"; + case VARIANCE: return "variance"; + case _20PERCENT: return "20-percent"; + case _80PERCENT: return "80-percent"; + case _4LOWER: return "4-lower"; + case _4UPPER: return "4-upper"; + case _4DEV: return "4-dev"; + case _51: return "5-1"; + case _52: return "5-2"; + case _53: return "5-3"; + case _54: return "5-4"; + case SKEW: return "skew"; + case KURTOSIS: return "kurtosis"; + case REGRESSION: return "regression"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/observation-statistics"; + } + public String getDefinition() { + switch (this) { + case AVERAGE: return "The [mean](https://en.wikipedia.org/wiki/Arithmetic_mean) of N measurements over the stated period"; + case MAXIMUM: return "The [maximum](https://en.wikipedia.org/wiki/Maximal_element) value of N measurements over the stated period"; + case MINIMUM: return "The [minimum](https://en.wikipedia.org/wiki/Minimal_element) value of N measurements over the stated period"; + case COUNT: return "The [number] of valid measurements over the stated period that contributed to the other statistical outputs"; + case TOTALCOUNT: return "The total [number] of valid measurements over the stated period, including observations that were ignored because they did not contain valid result values"; + case MEDIAN: return "The [median](https://en.wikipedia.org/wiki/Median) of N measurements over the stated period"; + case STDDEV: return "The [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation) of N measurements over the stated period"; + case SUM: return "The [sum](https://en.wikipedia.org/wiki/Summation) of N measurements over the stated period"; + case VARIANCE: return "The [variance](https://en.wikipedia.org/wiki/Variance) of N measurements over the stated period"; + case _20PERCENT: return "The 20th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period"; + case _80PERCENT: return "The 80th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period"; + case _4LOWER: return "The lower [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period"; + case _4UPPER: return "The upper [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period"; + case _4DEV: return "The difference between the upper and lower [Quartiles](https://en.wikipedia.org/wiki/Quartile) is called the Interquartile range. (IQR = Q3-Q1) Quartile deviation or Semi-interquartile range is one-half the difference between the first and the third quartiles."; + case _51: return "The lowest of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population"; + case _52: return "The second of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population"; + case _53: return "The third of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population"; + case _54: return "The fourth of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population"; + case SKEW: return "Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive or negative, or even undefined. Source: [Wikipedia](https://en.wikipedia.org/wiki/Skewness)"; + case KURTOSIS: return "Kurtosis is a measure of the \"tailedness\" of the probability distribution of a real-valued random variable. Source: [Wikipedia](https://en.wikipedia.org/wiki/Kurtosis)"; + case REGRESSION: return "Linear regression is an approach for modeling two-dimensional sample points with one independent variable and one dependent variable (conventionally, the x and y coordinates in a Cartesian coordinate system) and finds a linear function (a non-vertical straight line) that, as accurately as possible, predicts the dependent variable values as a function of the independent variables. Source: [Wikipedia](https://en.wikipedia.org/wiki/Simple_linear_regression) This Statistic code will return both a gradient and an intercept value."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AVERAGE: return "Average"; + case MAXIMUM: return "Maximum"; + case MINIMUM: return "Minimum"; + case COUNT: return "Count"; + case TOTALCOUNT: return "Total Count"; + case MEDIAN: return "Median"; + case STDDEV: return "Standard Deviation"; + case SUM: return "Sum"; + case VARIANCE: return "Variance"; + case _20PERCENT: return "20th Percentile"; + case _80PERCENT: return "80th Percentile"; + case _4LOWER: return "Lower Quartile"; + case _4UPPER: return "Upper Quartile"; + case _4DEV: return "Quartile Deviation"; + case _51: return "1st Quintile"; + case _52: return "2nd Quintile"; + case _53: return "3rd Quintile"; + case _54: return "4th Quintile"; + case SKEW: return "Skew"; + case KURTOSIS: return "Kurtosis"; + case REGRESSION: return "Regression"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatisticsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatisticsEnumFactory.java new file mode 100644 index 00000000000..62c84430e5f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatisticsEnumFactory.java @@ -0,0 +1,138 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ObservationStatisticsEnumFactory implements EnumFactory { + + public ObservationStatistics fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("average".equals(codeString)) + return ObservationStatistics.AVERAGE; + if ("maximum".equals(codeString)) + return ObservationStatistics.MAXIMUM; + if ("minimum".equals(codeString)) + return ObservationStatistics.MINIMUM; + if ("count".equals(codeString)) + return ObservationStatistics.COUNT; + if ("totalcount".equals(codeString)) + return ObservationStatistics.TOTALCOUNT; + if ("median".equals(codeString)) + return ObservationStatistics.MEDIAN; + if ("std-dev".equals(codeString)) + return ObservationStatistics.STDDEV; + if ("sum".equals(codeString)) + return ObservationStatistics.SUM; + if ("variance".equals(codeString)) + return ObservationStatistics.VARIANCE; + if ("20-percent".equals(codeString)) + return ObservationStatistics._20PERCENT; + if ("80-percent".equals(codeString)) + return ObservationStatistics._80PERCENT; + if ("4-lower".equals(codeString)) + return ObservationStatistics._4LOWER; + if ("4-upper".equals(codeString)) + return ObservationStatistics._4UPPER; + if ("4-dev".equals(codeString)) + return ObservationStatistics._4DEV; + if ("5-1".equals(codeString)) + return ObservationStatistics._51; + if ("5-2".equals(codeString)) + return ObservationStatistics._52; + if ("5-3".equals(codeString)) + return ObservationStatistics._53; + if ("5-4".equals(codeString)) + return ObservationStatistics._54; + if ("skew".equals(codeString)) + return ObservationStatistics.SKEW; + if ("kurtosis".equals(codeString)) + return ObservationStatistics.KURTOSIS; + if ("regression".equals(codeString)) + return ObservationStatistics.REGRESSION; + throw new IllegalArgumentException("Unknown ObservationStatistics code '"+codeString+"'"); + } + + public String toCode(ObservationStatistics code) { + if (code == ObservationStatistics.AVERAGE) + return "average"; + if (code == ObservationStatistics.MAXIMUM) + return "maximum"; + if (code == ObservationStatistics.MINIMUM) + return "minimum"; + if (code == ObservationStatistics.COUNT) + return "count"; + if (code == ObservationStatistics.TOTALCOUNT) + return "totalcount"; + if (code == ObservationStatistics.MEDIAN) + return "median"; + if (code == ObservationStatistics.STDDEV) + return "std-dev"; + if (code == ObservationStatistics.SUM) + return "sum"; + if (code == ObservationStatistics.VARIANCE) + return "variance"; + if (code == ObservationStatistics._20PERCENT) + return "20-percent"; + if (code == ObservationStatistics._80PERCENT) + return "80-percent"; + if (code == ObservationStatistics._4LOWER) + return "4-lower"; + if (code == ObservationStatistics._4UPPER) + return "4-upper"; + if (code == ObservationStatistics._4DEV) + return "4-dev"; + if (code == ObservationStatistics._51) + return "5-1"; + if (code == ObservationStatistics._52) + return "5-2"; + if (code == ObservationStatistics._53) + return "5-3"; + if (code == ObservationStatistics._54) + return "5-4"; + if (code == ObservationStatistics.SKEW) + return "skew"; + if (code == ObservationStatistics.KURTOSIS) + return "kurtosis"; + if (code == ObservationStatistics.REGRESSION) + return "regression"; + return "?"; + } + + public String toSystem(ObservationStatistics code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatus.java new file mode 100644 index 00000000000..58050c4dbd6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatus.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ObservationStatus { + + /** + * The existence of the observation is registered, but there is no result yet available. + */ + REGISTERED, + /** + * This is an initial or interim observation: data may be incomplete or unverified. + */ + PRELIMINARY, + /** + * The observation is complete. + */ + FINAL, + /** + * Subsequent to being Final, the observation has been modified subsequent. This includes updates/new information and corrections. + */ + AMENDED, + /** + * Subsequent to being Final, the observation has been modified to correct an error in the test result. + */ + CORRECTED, + /** + * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). + */ + CANCELLED, + /** + * The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) + */ + ENTEREDINERROR, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring system does not know which. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ObservationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return REGISTERED; + if ("preliminary".equals(codeString)) + return PRELIMINARY; + if ("final".equals(codeString)) + return FINAL; + if ("amended".equals(codeString)) + return AMENDED; + if ("corrected".equals(codeString)) + return CORRECTED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REGISTERED: return "registered"; + case PRELIMINARY: return "preliminary"; + case FINAL: return "final"; + case AMENDED: return "amended"; + case CORRECTED: return "corrected"; + case CANCELLED: return "cancelled"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/observation-status"; + } + public String getDefinition() { + switch (this) { + case REGISTERED: return "The existence of the observation is registered, but there is no result yet available."; + case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified."; + case FINAL: return "The observation is complete."; + case AMENDED: return "Subsequent to being Final, the observation has been modified subsequent. This includes updates/new information and corrections."; + case CORRECTED: return "Subsequent to being Final, the observation has been modified to correct an error in the test result."; + case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; + case ENTEREDINERROR: return "The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring system does not know which."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REGISTERED: return "Registered"; + case PRELIMINARY: return "Preliminary"; + case FINAL: return "Final"; + case AMENDED: return "Amended"; + case CORRECTED: return "Corrected"; + case CANCELLED: return "Cancelled"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatusEnumFactory.java new file mode 100644 index 00000000000..8cc178be736 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ObservationStatusEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ObservationStatusEnumFactory implements EnumFactory { + + public ObservationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("registered".equals(codeString)) + return ObservationStatus.REGISTERED; + if ("preliminary".equals(codeString)) + return ObservationStatus.PRELIMINARY; + if ("final".equals(codeString)) + return ObservationStatus.FINAL; + if ("amended".equals(codeString)) + return ObservationStatus.AMENDED; + if ("corrected".equals(codeString)) + return ObservationStatus.CORRECTED; + if ("cancelled".equals(codeString)) + return ObservationStatus.CANCELLED; + if ("entered-in-error".equals(codeString)) + return ObservationStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return ObservationStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown ObservationStatus code '"+codeString+"'"); + } + + public String toCode(ObservationStatus code) { + if (code == ObservationStatus.REGISTERED) + return "registered"; + if (code == ObservationStatus.PRELIMINARY) + return "preliminary"; + if (code == ObservationStatus.FINAL) + return "final"; + if (code == ObservationStatus.AMENDED) + return "amended"; + if (code == ObservationStatus.CORRECTED) + return "corrected"; + if (code == ObservationStatus.CANCELLED) + return "cancelled"; + if (code == ObservationStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == ObservationStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(ObservationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationKind.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationKind.java new file mode 100644 index 00000000000..396d43a1483 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationKind.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OperationKind { + + /** + * This operation is invoked as an operation. + */ + OPERATION, + /** + * This operation is a named query, invoked using the search mechanism. + */ + QUERY, + /** + * added to help the parsers + */ + NULL; + public static OperationKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("operation".equals(codeString)) + return OPERATION; + if ("query".equals(codeString)) + return QUERY; + throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OPERATION: return "operation"; + case QUERY: return "query"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/operation-kind"; + } + public String getDefinition() { + switch (this) { + case OPERATION: return "This operation is invoked as an operation."; + case QUERY: return "This operation is a named query, invoked using the search mechanism."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OPERATION: return "Operation"; + case QUERY: return "Query"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationKindEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationKindEnumFactory.java new file mode 100644 index 00000000000..ef911dcd775 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationKindEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class OperationKindEnumFactory implements EnumFactory { + + public OperationKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("operation".equals(codeString)) + return OperationKind.OPERATION; + if ("query".equals(codeString)) + return OperationKind.QUERY; + throw new IllegalArgumentException("Unknown OperationKind code '"+codeString+"'"); + } + + public String toCode(OperationKind code) { + if (code == OperationKind.OPERATION) + return "operation"; + if (code == OperationKind.QUERY) + return "query"; + return "?"; + } + + public String toSystem(OperationKind code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationOutcome.java new file mode 100644 index 00000000000..d247299e82d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationOutcome.java @@ -0,0 +1,519 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OperationOutcome { + + /** + * null + */ + MSGAUTHREQUIRED, + /** + * null + */ + MSGBADFORMAT, + /** + * null + */ + MSGBADSYNTAX, + /** + * null + */ + MSGCANTPARSECONTENT, + /** + * null + */ + MSGCANTPARSEROOT, + /** + * null + */ + MSGCREATED, + /** + * null + */ + MSGDATEFORMAT, + /** + * null + */ + MSGDELETED, + /** + * null + */ + MSGDELETEDDONE, + /** + * null + */ + MSGDELETEDID, + /** + * null + */ + MSGDUPLICATEID, + /** + * null + */ + MSGERRORPARSING, + /** + * null + */ + MSGIDINVALID, + /** + * null + */ + MSGIDTOOLONG, + /** + * null + */ + MSGINVALIDID, + /** + * null + */ + MSGJSONOBJECT, + /** + * null + */ + MSGLOCALFAIL, + /** + * null + */ + MSGNOMATCH, + /** + * null + */ + MSGNOEXIST, + /** + * null + */ + MSGNOMODULE, + /** + * null + */ + MSGNOSUMMARY, + /** + * null + */ + MSGOPNOTALLOWED, + /** + * null + */ + MSGPARAMCHAINED, + /** + * null + */ + MSGPARAMNOREPEAT, + /** + * null + */ + MSGPARAMUNKNOWN, + /** + * null + */ + MSGPARAMINVALID, + /** + * null + */ + MSGPARAMMODIFIERINVALID, + /** + * null + */ + MSGRESOURCEEXAMPLEPROTECTED, + /** + * null + */ + MSGRESOURCEIDFAIL, + /** + * null + */ + MSGRESOURCENOTALLOWED, + /** + * null + */ + MSGRESOURCEREQUIRED, + /** + * null + */ + MSGRESOURCEIDMISMATCH, + /** + * null + */ + MSGRESOURCEIDMISSING, + /** + * null + */ + MSGRESOURCETYPEMISMATCH, + /** + * null + */ + MSGSORTUNKNOWN, + /** + * null + */ + MSGTRANSACTIONDUPLICATEID, + /** + * null + */ + MSGTRANSACTIONMISSINGID, + /** + * null + */ + MSGUNHANDLEDNODETYPE, + /** + * null + */ + MSGUNKNOWNCONTENT, + /** + * null + */ + MSGUNKNOWNOPERATION, + /** + * null + */ + MSGUNKNOWNTYPE, + /** + * null + */ + MSGUPDATED, + /** + * null + */ + MSGVERSIONAWARE, + /** + * null + */ + MSGVERSIONAWARECONFLICT, + /** + * null + */ + MSGVERSIONAWAREURL, + /** + * null + */ + MSGWRONGNS, + /** + * null + */ + SEARCHMULTIPLE, + /** + * null + */ + UPDATEMULTIPLEMATCHES, + /** + * null + */ + DELETEMULTIPLEMATCHES, + /** + * null + */ + SEARCHNONE, + /** + * added to help the parsers + */ + NULL; + public static OperationOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MSG_AUTH_REQUIRED".equals(codeString)) + return MSGAUTHREQUIRED; + if ("MSG_BAD_FORMAT".equals(codeString)) + return MSGBADFORMAT; + if ("MSG_BAD_SYNTAX".equals(codeString)) + return MSGBADSYNTAX; + if ("MSG_CANT_PARSE_CONTENT".equals(codeString)) + return MSGCANTPARSECONTENT; + if ("MSG_CANT_PARSE_ROOT".equals(codeString)) + return MSGCANTPARSEROOT; + if ("MSG_CREATED".equals(codeString)) + return MSGCREATED; + if ("MSG_DATE_FORMAT".equals(codeString)) + return MSGDATEFORMAT; + if ("MSG_DELETED".equals(codeString)) + return MSGDELETED; + if ("MSG_DELETED_DONE".equals(codeString)) + return MSGDELETEDDONE; + if ("MSG_DELETED_ID".equals(codeString)) + return MSGDELETEDID; + if ("MSG_DUPLICATE_ID".equals(codeString)) + return MSGDUPLICATEID; + if ("MSG_ERROR_PARSING".equals(codeString)) + return MSGERRORPARSING; + if ("MSG_ID_INVALID".equals(codeString)) + return MSGIDINVALID; + if ("MSG_ID_TOO_LONG".equals(codeString)) + return MSGIDTOOLONG; + if ("MSG_INVALID_ID".equals(codeString)) + return MSGINVALIDID; + if ("MSG_JSON_OBJECT".equals(codeString)) + return MSGJSONOBJECT; + if ("MSG_LOCAL_FAIL".equals(codeString)) + return MSGLOCALFAIL; + if ("MSG_NO_MATCH".equals(codeString)) + return MSGNOMATCH; + if ("MSG_NO_EXIST".equals(codeString)) + return MSGNOEXIST; + if ("MSG_NO_MODULE".equals(codeString)) + return MSGNOMODULE; + if ("MSG_NO_SUMMARY".equals(codeString)) + return MSGNOSUMMARY; + if ("MSG_OP_NOT_ALLOWED".equals(codeString)) + return MSGOPNOTALLOWED; + if ("MSG_PARAM_CHAINED".equals(codeString)) + return MSGPARAMCHAINED; + if ("MSG_PARAM_NO_REPEAT".equals(codeString)) + return MSGPARAMNOREPEAT; + if ("MSG_PARAM_UNKNOWN".equals(codeString)) + return MSGPARAMUNKNOWN; + if ("MSG_PARAM_INVALID".equals(codeString)) + return MSGPARAMINVALID; + if ("MSG_PARAM_MODIFIER_INVALID".equals(codeString)) + return MSGPARAMMODIFIERINVALID; + if ("MSG_RESOURCE_EXAMPLE_PROTECTED".equals(codeString)) + return MSGRESOURCEEXAMPLEPROTECTED; + if ("MSG_RESOURCE_ID_FAIL".equals(codeString)) + return MSGRESOURCEIDFAIL; + if ("MSG_RESOURCE_NOT_ALLOWED".equals(codeString)) + return MSGRESOURCENOTALLOWED; + if ("MSG_RESOURCE_REQUIRED".equals(codeString)) + return MSGRESOURCEREQUIRED; + if ("MSG_RESOURCE_ID_MISMATCH".equals(codeString)) + return MSGRESOURCEIDMISMATCH; + if ("MSG_RESOURCE_ID_MISSING".equals(codeString)) + return MSGRESOURCEIDMISSING; + if ("MSG_RESOURCE_TYPE_MISMATCH".equals(codeString)) + return MSGRESOURCETYPEMISMATCH; + if ("MSG_SORT_UNKNOWN".equals(codeString)) + return MSGSORTUNKNOWN; + if ("MSG_TRANSACTION_DUPLICATE_ID".equals(codeString)) + return MSGTRANSACTIONDUPLICATEID; + if ("MSG_TRANSACTION_MISSING_ID".equals(codeString)) + return MSGTRANSACTIONMISSINGID; + if ("MSG_UNHANDLED_NODE_TYPE".equals(codeString)) + return MSGUNHANDLEDNODETYPE; + if ("MSG_UNKNOWN_CONTENT".equals(codeString)) + return MSGUNKNOWNCONTENT; + if ("MSG_UNKNOWN_OPERATION".equals(codeString)) + return MSGUNKNOWNOPERATION; + if ("MSG_UNKNOWN_TYPE".equals(codeString)) + return MSGUNKNOWNTYPE; + if ("MSG_UPDATED".equals(codeString)) + return MSGUPDATED; + if ("MSG_VERSION_AWARE".equals(codeString)) + return MSGVERSIONAWARE; + if ("MSG_VERSION_AWARE_CONFLICT".equals(codeString)) + return MSGVERSIONAWARECONFLICT; + if ("MSG_VERSION_AWARE_URL".equals(codeString)) + return MSGVERSIONAWAREURL; + if ("MSG_WRONG_NS".equals(codeString)) + return MSGWRONGNS; + if ("SEARCH_MULTIPLE".equals(codeString)) + return SEARCHMULTIPLE; + if ("UPDATE_MULTIPLE_MATCHES".equals(codeString)) + return UPDATEMULTIPLEMATCHES; + if ("DELETE_MULTIPLE_MATCHES".equals(codeString)) + return DELETEMULTIPLEMATCHES; + if ("SEARCH_NONE".equals(codeString)) + return SEARCHNONE; + throw new FHIRException("Unknown OperationOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MSGAUTHREQUIRED: return "MSG_AUTH_REQUIRED"; + case MSGBADFORMAT: return "MSG_BAD_FORMAT"; + case MSGBADSYNTAX: return "MSG_BAD_SYNTAX"; + case MSGCANTPARSECONTENT: return "MSG_CANT_PARSE_CONTENT"; + case MSGCANTPARSEROOT: return "MSG_CANT_PARSE_ROOT"; + case MSGCREATED: return "MSG_CREATED"; + case MSGDATEFORMAT: return "MSG_DATE_FORMAT"; + case MSGDELETED: return "MSG_DELETED"; + case MSGDELETEDDONE: return "MSG_DELETED_DONE"; + case MSGDELETEDID: return "MSG_DELETED_ID"; + case MSGDUPLICATEID: return "MSG_DUPLICATE_ID"; + case MSGERRORPARSING: return "MSG_ERROR_PARSING"; + case MSGIDINVALID: return "MSG_ID_INVALID"; + case MSGIDTOOLONG: return "MSG_ID_TOO_LONG"; + case MSGINVALIDID: return "MSG_INVALID_ID"; + case MSGJSONOBJECT: return "MSG_JSON_OBJECT"; + case MSGLOCALFAIL: return "MSG_LOCAL_FAIL"; + case MSGNOMATCH: return "MSG_NO_MATCH"; + case MSGNOEXIST: return "MSG_NO_EXIST"; + case MSGNOMODULE: return "MSG_NO_MODULE"; + case MSGNOSUMMARY: return "MSG_NO_SUMMARY"; + case MSGOPNOTALLOWED: return "MSG_OP_NOT_ALLOWED"; + case MSGPARAMCHAINED: return "MSG_PARAM_CHAINED"; + case MSGPARAMNOREPEAT: return "MSG_PARAM_NO_REPEAT"; + case MSGPARAMUNKNOWN: return "MSG_PARAM_UNKNOWN"; + case MSGPARAMINVALID: return "MSG_PARAM_INVALID"; + case MSGPARAMMODIFIERINVALID: return "MSG_PARAM_MODIFIER_INVALID"; + case MSGRESOURCEEXAMPLEPROTECTED: return "MSG_RESOURCE_EXAMPLE_PROTECTED"; + case MSGRESOURCEIDFAIL: return "MSG_RESOURCE_ID_FAIL"; + case MSGRESOURCENOTALLOWED: return "MSG_RESOURCE_NOT_ALLOWED"; + case MSGRESOURCEREQUIRED: return "MSG_RESOURCE_REQUIRED"; + case MSGRESOURCEIDMISMATCH: return "MSG_RESOURCE_ID_MISMATCH"; + case MSGRESOURCEIDMISSING: return "MSG_RESOURCE_ID_MISSING"; + case MSGRESOURCETYPEMISMATCH: return "MSG_RESOURCE_TYPE_MISMATCH"; + case MSGSORTUNKNOWN: return "MSG_SORT_UNKNOWN"; + case MSGTRANSACTIONDUPLICATEID: return "MSG_TRANSACTION_DUPLICATE_ID"; + case MSGTRANSACTIONMISSINGID: return "MSG_TRANSACTION_MISSING_ID"; + case MSGUNHANDLEDNODETYPE: return "MSG_UNHANDLED_NODE_TYPE"; + case MSGUNKNOWNCONTENT: return "MSG_UNKNOWN_CONTENT"; + case MSGUNKNOWNOPERATION: return "MSG_UNKNOWN_OPERATION"; + case MSGUNKNOWNTYPE: return "MSG_UNKNOWN_TYPE"; + case MSGUPDATED: return "MSG_UPDATED"; + case MSGVERSIONAWARE: return "MSG_VERSION_AWARE"; + case MSGVERSIONAWARECONFLICT: return "MSG_VERSION_AWARE_CONFLICT"; + case MSGVERSIONAWAREURL: return "MSG_VERSION_AWARE_URL"; + case MSGWRONGNS: return "MSG_WRONG_NS"; + case SEARCHMULTIPLE: return "SEARCH_MULTIPLE"; + case UPDATEMULTIPLEMATCHES: return "UPDATE_MULTIPLE_MATCHES"; + case DELETEMULTIPLEMATCHES: return "DELETE_MULTIPLE_MATCHES"; + case SEARCHNONE: return "SEARCH_NONE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/operation-outcome"; + } + public String getDefinition() { + switch (this) { + case MSGAUTHREQUIRED: return ""; + case MSGBADFORMAT: return ""; + case MSGBADSYNTAX: return ""; + case MSGCANTPARSECONTENT: return ""; + case MSGCANTPARSEROOT: return ""; + case MSGCREATED: return ""; + case MSGDATEFORMAT: return ""; + case MSGDELETED: return ""; + case MSGDELETEDDONE: return ""; + case MSGDELETEDID: return ""; + case MSGDUPLICATEID: return ""; + case MSGERRORPARSING: return ""; + case MSGIDINVALID: return ""; + case MSGIDTOOLONG: return ""; + case MSGINVALIDID: return ""; + case MSGJSONOBJECT: return ""; + case MSGLOCALFAIL: return ""; + case MSGNOMATCH: return ""; + case MSGNOEXIST: return ""; + case MSGNOMODULE: return ""; + case MSGNOSUMMARY: return ""; + case MSGOPNOTALLOWED: return ""; + case MSGPARAMCHAINED: return ""; + case MSGPARAMNOREPEAT: return ""; + case MSGPARAMUNKNOWN: return ""; + case MSGPARAMINVALID: return ""; + case MSGPARAMMODIFIERINVALID: return ""; + case MSGRESOURCEEXAMPLEPROTECTED: return ""; + case MSGRESOURCEIDFAIL: return ""; + case MSGRESOURCENOTALLOWED: return ""; + case MSGRESOURCEREQUIRED: return ""; + case MSGRESOURCEIDMISMATCH: return ""; + case MSGRESOURCEIDMISSING: return ""; + case MSGRESOURCETYPEMISMATCH: return ""; + case MSGSORTUNKNOWN: return ""; + case MSGTRANSACTIONDUPLICATEID: return ""; + case MSGTRANSACTIONMISSINGID: return ""; + case MSGUNHANDLEDNODETYPE: return ""; + case MSGUNKNOWNCONTENT: return ""; + case MSGUNKNOWNOPERATION: return ""; + case MSGUNKNOWNTYPE: return ""; + case MSGUPDATED: return ""; + case MSGVERSIONAWARE: return ""; + case MSGVERSIONAWARECONFLICT: return ""; + case MSGVERSIONAWAREURL: return ""; + case MSGWRONGNS: return ""; + case SEARCHMULTIPLE: return ""; + case UPDATEMULTIPLEMATCHES: return ""; + case DELETEMULTIPLEMATCHES: return ""; + case SEARCHNONE: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MSGAUTHREQUIRED: return "You must authenticate before you can use this service"; + case MSGBADFORMAT: return "Bad Syntax: \"%s\" must be a %s'"; + case MSGBADSYNTAX: return "Bad Syntax in %s"; + case MSGCANTPARSECONTENT: return "Unable to parse feed (entry content type = \"%s\")"; + case MSGCANTPARSEROOT: return "Unable to parse feed (root element name = \"%s\")"; + case MSGCREATED: return "New resource created"; + case MSGDATEFORMAT: return "The Date value %s is not in the correct format (Xml Date Format required)"; + case MSGDELETED: return "This resource has been deleted"; + case MSGDELETEDDONE: return "Resource deleted"; + case MSGDELETEDID: return "The resource \"%s\" has been deleted"; + case MSGDUPLICATEID: return "Duplicate Id %s for resource type %s"; + case MSGERRORPARSING: return "Error parsing resource Xml (%s)"; + case MSGIDINVALID: return "Id \"%s\" has an invalid character \"%s\""; + case MSGIDTOOLONG: return "Id \"%s\" too long (length limit 36)"; + case MSGINVALIDID: return "Id not accepted"; + case MSGJSONOBJECT: return "Json Source for a resource should start with an object"; + case MSGLOCALFAIL: return "Unable to resolve local reference to resource %s"; + case MSGNOMATCH: return "No Resource found matching the query \"%s\""; + case MSGNOEXIST: return "Resource Id \"%s\" does not exist"; + case MSGNOMODULE: return "No module could be found to handle the request \"%s\""; + case MSGNOSUMMARY: return "No Summary for this resource"; + case MSGOPNOTALLOWED: return "Operation %s not allowed for resource %s (due to local configuration)"; + case MSGPARAMCHAINED: return "Unknown chained parameter name \"%s\""; + case MSGPARAMNOREPEAT: return "Parameter \"%s\" is not allowed to repeat"; + case MSGPARAMUNKNOWN: return "Parameter \"%s\" not understood"; + case MSGPARAMINVALID: return "Parameter \"%s\" content is invalid"; + case MSGPARAMMODIFIERINVALID: return "Parameter \"%s\" modifier is invalid"; + case MSGRESOURCEEXAMPLEPROTECTED: return "Resources with identity \"example\" cannot be deleted (for testing/training purposes)"; + case MSGRESOURCEIDFAIL: return "unable to allocate resource id"; + case MSGRESOURCENOTALLOWED: return "Not allowed to submit a resource for this operation"; + case MSGRESOURCEREQUIRED: return "A resource is required"; + case MSGRESOURCEIDMISMATCH: return "Resource Id Mismatch"; + case MSGRESOURCEIDMISSING: return "Resource Id Missing"; + case MSGRESOURCETYPEMISMATCH: return "Resource Type Mismatch"; + case MSGSORTUNKNOWN: return "Unknown sort parameter name \"%s\""; + case MSGTRANSACTIONDUPLICATEID: return "Duplicate Identifier in transaction: %s"; + case MSGTRANSACTIONMISSINGID: return "Missing Identifier in transaction - an entry.id must be provided"; + case MSGUNHANDLEDNODETYPE: return "Unhandled xml node type \"%s\""; + case MSGUNKNOWNCONTENT: return "Unknown Content (%s) at %s"; + case MSGUNKNOWNOPERATION: return "unknown FHIR http operation"; + case MSGUNKNOWNTYPE: return "Resource Type \"%s\" not recognised"; + case MSGUPDATED: return "existing resource updated"; + case MSGVERSIONAWARE: return "Version aware updates are required for this resource"; + case MSGVERSIONAWARECONFLICT: return "Update Conflict (server current version = \"%s\", client version referenced = \"%s\")"; + case MSGVERSIONAWAREURL: return "Version specific URL not recognised"; + case MSGWRONGNS: return "This does not appear to be a FHIR element or resource (wrong namespace \"%s\")"; + case SEARCHMULTIPLE: return "Error: Multiple matches exist for %s search parameters \"%s\""; + case UPDATEMULTIPLEMATCHES: return "Error: Multiple matches exist for the conditional update"; + case DELETEMULTIPLEMATCHES: return "Error: Multiple matches exist for the conditional delete"; + case SEARCHNONE: return "Error: no processable search found for %s search parameters \"%s\""; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationOutcomeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationOutcomeEnumFactory.java new file mode 100644 index 00000000000..c0ec35be6e6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationOutcomeEnumFactory.java @@ -0,0 +1,254 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class OperationOutcomeEnumFactory implements EnumFactory { + + public OperationOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("MSG_AUTH_REQUIRED".equals(codeString)) + return OperationOutcome.MSGAUTHREQUIRED; + if ("MSG_BAD_FORMAT".equals(codeString)) + return OperationOutcome.MSGBADFORMAT; + if ("MSG_BAD_SYNTAX".equals(codeString)) + return OperationOutcome.MSGBADSYNTAX; + if ("MSG_CANT_PARSE_CONTENT".equals(codeString)) + return OperationOutcome.MSGCANTPARSECONTENT; + if ("MSG_CANT_PARSE_ROOT".equals(codeString)) + return OperationOutcome.MSGCANTPARSEROOT; + if ("MSG_CREATED".equals(codeString)) + return OperationOutcome.MSGCREATED; + if ("MSG_DATE_FORMAT".equals(codeString)) + return OperationOutcome.MSGDATEFORMAT; + if ("MSG_DELETED".equals(codeString)) + return OperationOutcome.MSGDELETED; + if ("MSG_DELETED_DONE".equals(codeString)) + return OperationOutcome.MSGDELETEDDONE; + if ("MSG_DELETED_ID".equals(codeString)) + return OperationOutcome.MSGDELETEDID; + if ("MSG_DUPLICATE_ID".equals(codeString)) + return OperationOutcome.MSGDUPLICATEID; + if ("MSG_ERROR_PARSING".equals(codeString)) + return OperationOutcome.MSGERRORPARSING; + if ("MSG_ID_INVALID".equals(codeString)) + return OperationOutcome.MSGIDINVALID; + if ("MSG_ID_TOO_LONG".equals(codeString)) + return OperationOutcome.MSGIDTOOLONG; + if ("MSG_INVALID_ID".equals(codeString)) + return OperationOutcome.MSGINVALIDID; + if ("MSG_JSON_OBJECT".equals(codeString)) + return OperationOutcome.MSGJSONOBJECT; + if ("MSG_LOCAL_FAIL".equals(codeString)) + return OperationOutcome.MSGLOCALFAIL; + if ("MSG_NO_MATCH".equals(codeString)) + return OperationOutcome.MSGNOMATCH; + if ("MSG_NO_EXIST".equals(codeString)) + return OperationOutcome.MSGNOEXIST; + if ("MSG_NO_MODULE".equals(codeString)) + return OperationOutcome.MSGNOMODULE; + if ("MSG_NO_SUMMARY".equals(codeString)) + return OperationOutcome.MSGNOSUMMARY; + if ("MSG_OP_NOT_ALLOWED".equals(codeString)) + return OperationOutcome.MSGOPNOTALLOWED; + if ("MSG_PARAM_CHAINED".equals(codeString)) + return OperationOutcome.MSGPARAMCHAINED; + if ("MSG_PARAM_NO_REPEAT".equals(codeString)) + return OperationOutcome.MSGPARAMNOREPEAT; + if ("MSG_PARAM_UNKNOWN".equals(codeString)) + return OperationOutcome.MSGPARAMUNKNOWN; + if ("MSG_PARAM_INVALID".equals(codeString)) + return OperationOutcome.MSGPARAMINVALID; + if ("MSG_PARAM_MODIFIER_INVALID".equals(codeString)) + return OperationOutcome.MSGPARAMMODIFIERINVALID; + if ("MSG_RESOURCE_EXAMPLE_PROTECTED".equals(codeString)) + return OperationOutcome.MSGRESOURCEEXAMPLEPROTECTED; + if ("MSG_RESOURCE_ID_FAIL".equals(codeString)) + return OperationOutcome.MSGRESOURCEIDFAIL; + if ("MSG_RESOURCE_NOT_ALLOWED".equals(codeString)) + return OperationOutcome.MSGRESOURCENOTALLOWED; + if ("MSG_RESOURCE_REQUIRED".equals(codeString)) + return OperationOutcome.MSGRESOURCEREQUIRED; + if ("MSG_RESOURCE_ID_MISMATCH".equals(codeString)) + return OperationOutcome.MSGRESOURCEIDMISMATCH; + if ("MSG_RESOURCE_ID_MISSING".equals(codeString)) + return OperationOutcome.MSGRESOURCEIDMISSING; + if ("MSG_RESOURCE_TYPE_MISMATCH".equals(codeString)) + return OperationOutcome.MSGRESOURCETYPEMISMATCH; + if ("MSG_SORT_UNKNOWN".equals(codeString)) + return OperationOutcome.MSGSORTUNKNOWN; + if ("MSG_TRANSACTION_DUPLICATE_ID".equals(codeString)) + return OperationOutcome.MSGTRANSACTIONDUPLICATEID; + if ("MSG_TRANSACTION_MISSING_ID".equals(codeString)) + return OperationOutcome.MSGTRANSACTIONMISSINGID; + if ("MSG_UNHANDLED_NODE_TYPE".equals(codeString)) + return OperationOutcome.MSGUNHANDLEDNODETYPE; + if ("MSG_UNKNOWN_CONTENT".equals(codeString)) + return OperationOutcome.MSGUNKNOWNCONTENT; + if ("MSG_UNKNOWN_OPERATION".equals(codeString)) + return OperationOutcome.MSGUNKNOWNOPERATION; + if ("MSG_UNKNOWN_TYPE".equals(codeString)) + return OperationOutcome.MSGUNKNOWNTYPE; + if ("MSG_UPDATED".equals(codeString)) + return OperationOutcome.MSGUPDATED; + if ("MSG_VERSION_AWARE".equals(codeString)) + return OperationOutcome.MSGVERSIONAWARE; + if ("MSG_VERSION_AWARE_CONFLICT".equals(codeString)) + return OperationOutcome.MSGVERSIONAWARECONFLICT; + if ("MSG_VERSION_AWARE_URL".equals(codeString)) + return OperationOutcome.MSGVERSIONAWAREURL; + if ("MSG_WRONG_NS".equals(codeString)) + return OperationOutcome.MSGWRONGNS; + if ("SEARCH_MULTIPLE".equals(codeString)) + return OperationOutcome.SEARCHMULTIPLE; + if ("UPDATE_MULTIPLE_MATCHES".equals(codeString)) + return OperationOutcome.UPDATEMULTIPLEMATCHES; + if ("DELETE_MULTIPLE_MATCHES".equals(codeString)) + return OperationOutcome.DELETEMULTIPLEMATCHES; + if ("SEARCH_NONE".equals(codeString)) + return OperationOutcome.SEARCHNONE; + throw new IllegalArgumentException("Unknown OperationOutcome code '"+codeString+"'"); + } + + public String toCode(OperationOutcome code) { + if (code == OperationOutcome.MSGAUTHREQUIRED) + return "MSG_AUTH_REQUIRED"; + if (code == OperationOutcome.MSGBADFORMAT) + return "MSG_BAD_FORMAT"; + if (code == OperationOutcome.MSGBADSYNTAX) + return "MSG_BAD_SYNTAX"; + if (code == OperationOutcome.MSGCANTPARSECONTENT) + return "MSG_CANT_PARSE_CONTENT"; + if (code == OperationOutcome.MSGCANTPARSEROOT) + return "MSG_CANT_PARSE_ROOT"; + if (code == OperationOutcome.MSGCREATED) + return "MSG_CREATED"; + if (code == OperationOutcome.MSGDATEFORMAT) + return "MSG_DATE_FORMAT"; + if (code == OperationOutcome.MSGDELETED) + return "MSG_DELETED"; + if (code == OperationOutcome.MSGDELETEDDONE) + return "MSG_DELETED_DONE"; + if (code == OperationOutcome.MSGDELETEDID) + return "MSG_DELETED_ID"; + if (code == OperationOutcome.MSGDUPLICATEID) + return "MSG_DUPLICATE_ID"; + if (code == OperationOutcome.MSGERRORPARSING) + return "MSG_ERROR_PARSING"; + if (code == OperationOutcome.MSGIDINVALID) + return "MSG_ID_INVALID"; + if (code == OperationOutcome.MSGIDTOOLONG) + return "MSG_ID_TOO_LONG"; + if (code == OperationOutcome.MSGINVALIDID) + return "MSG_INVALID_ID"; + if (code == OperationOutcome.MSGJSONOBJECT) + return "MSG_JSON_OBJECT"; + if (code == OperationOutcome.MSGLOCALFAIL) + return "MSG_LOCAL_FAIL"; + if (code == OperationOutcome.MSGNOMATCH) + return "MSG_NO_MATCH"; + if (code == OperationOutcome.MSGNOEXIST) + return "MSG_NO_EXIST"; + if (code == OperationOutcome.MSGNOMODULE) + return "MSG_NO_MODULE"; + if (code == OperationOutcome.MSGNOSUMMARY) + return "MSG_NO_SUMMARY"; + if (code == OperationOutcome.MSGOPNOTALLOWED) + return "MSG_OP_NOT_ALLOWED"; + if (code == OperationOutcome.MSGPARAMCHAINED) + return "MSG_PARAM_CHAINED"; + if (code == OperationOutcome.MSGPARAMNOREPEAT) + return "MSG_PARAM_NO_REPEAT"; + if (code == OperationOutcome.MSGPARAMUNKNOWN) + return "MSG_PARAM_UNKNOWN"; + if (code == OperationOutcome.MSGPARAMINVALID) + return "MSG_PARAM_INVALID"; + if (code == OperationOutcome.MSGPARAMMODIFIERINVALID) + return "MSG_PARAM_MODIFIER_INVALID"; + if (code == OperationOutcome.MSGRESOURCEEXAMPLEPROTECTED) + return "MSG_RESOURCE_EXAMPLE_PROTECTED"; + if (code == OperationOutcome.MSGRESOURCEIDFAIL) + return "MSG_RESOURCE_ID_FAIL"; + if (code == OperationOutcome.MSGRESOURCENOTALLOWED) + return "MSG_RESOURCE_NOT_ALLOWED"; + if (code == OperationOutcome.MSGRESOURCEREQUIRED) + return "MSG_RESOURCE_REQUIRED"; + if (code == OperationOutcome.MSGRESOURCEIDMISMATCH) + return "MSG_RESOURCE_ID_MISMATCH"; + if (code == OperationOutcome.MSGRESOURCEIDMISSING) + return "MSG_RESOURCE_ID_MISSING"; + if (code == OperationOutcome.MSGRESOURCETYPEMISMATCH) + return "MSG_RESOURCE_TYPE_MISMATCH"; + if (code == OperationOutcome.MSGSORTUNKNOWN) + return "MSG_SORT_UNKNOWN"; + if (code == OperationOutcome.MSGTRANSACTIONDUPLICATEID) + return "MSG_TRANSACTION_DUPLICATE_ID"; + if (code == OperationOutcome.MSGTRANSACTIONMISSINGID) + return "MSG_TRANSACTION_MISSING_ID"; + if (code == OperationOutcome.MSGUNHANDLEDNODETYPE) + return "MSG_UNHANDLED_NODE_TYPE"; + if (code == OperationOutcome.MSGUNKNOWNCONTENT) + return "MSG_UNKNOWN_CONTENT"; + if (code == OperationOutcome.MSGUNKNOWNOPERATION) + return "MSG_UNKNOWN_OPERATION"; + if (code == OperationOutcome.MSGUNKNOWNTYPE) + return "MSG_UNKNOWN_TYPE"; + if (code == OperationOutcome.MSGUPDATED) + return "MSG_UPDATED"; + if (code == OperationOutcome.MSGVERSIONAWARE) + return "MSG_VERSION_AWARE"; + if (code == OperationOutcome.MSGVERSIONAWARECONFLICT) + return "MSG_VERSION_AWARE_CONFLICT"; + if (code == OperationOutcome.MSGVERSIONAWAREURL) + return "MSG_VERSION_AWARE_URL"; + if (code == OperationOutcome.MSGWRONGNS) + return "MSG_WRONG_NS"; + if (code == OperationOutcome.SEARCHMULTIPLE) + return "SEARCH_MULTIPLE"; + if (code == OperationOutcome.UPDATEMULTIPLEMATCHES) + return "UPDATE_MULTIPLE_MATCHES"; + if (code == OperationOutcome.DELETEMULTIPLEMATCHES) + return "DELETE_MULTIPLE_MATCHES"; + if (code == OperationOutcome.SEARCHNONE) + return "SEARCH_NONE"; + return "?"; + } + + public String toSystem(OperationOutcome code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationParameterUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationParameterUse.java new file mode 100644 index 00000000000..d6d12ace2fc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationParameterUse.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OperationParameterUse { + + /** + * This is an input parameter. + */ + IN, + /** + * This is an output parameter. + */ + OUT, + /** + * added to help the parsers + */ + NULL; + public static OperationParameterUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return IN; + if ("out".equals(codeString)) + return OUT; + throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case IN: return "in"; + case OUT: return "out"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/operation-parameter-use"; + } + public String getDefinition() { + switch (this) { + case IN: return "This is an input parameter."; + case OUT: return "This is an output parameter."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case IN: return "In"; + case OUT: return "Out"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationParameterUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationParameterUseEnumFactory.java new file mode 100644 index 00000000000..3b8c7a3f7c2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationParameterUseEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class OperationParameterUseEnumFactory implements EnumFactory { + + public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in".equals(codeString)) + return OperationParameterUse.IN; + if ("out".equals(codeString)) + return OperationParameterUse.OUT; + throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'"); + } + + public String toCode(OperationParameterUse code) { + if (code == OperationParameterUse.IN) + return "in"; + if (code == OperationParameterUse.OUT) + return "out"; + return "?"; + } + + public String toSystem(OperationParameterUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationalStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationalStatus.java new file mode 100644 index 00000000000..ef2fb2c600d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationalStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OperationalStatus { + + /** + * The device is off. + */ + OFF, + /** + * The device is fully operational. + */ + ON, + /** + * The device is not ready. + */ + NOTREADY, + /** + * The device is ready but not actively operating. + */ + STANDBY, + /** + * The device transducer is diconnected. + */ + TRANSDUCDISCON, + /** + * The device hardware is disconnected. + */ + HWDISCON, + /** + * The device was entered in error. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static OperationalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("off".equals(codeString)) + return OFF; + if ("on".equals(codeString)) + return ON; + if ("not-ready".equals(codeString)) + return NOTREADY; + if ("standby".equals(codeString)) + return STANDBY; + if ("transduc-discon".equals(codeString)) + return TRANSDUCDISCON; + if ("hw-discon".equals(codeString)) + return HWDISCON; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown OperationalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OFF: return "off"; + case ON: return "on"; + case NOTREADY: return "not-ready"; + case STANDBY: return "standby"; + case TRANSDUCDISCON: return "transduc-discon"; + case HWDISCON: return "hw-discon"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/operational-status"; + } + public String getDefinition() { + switch (this) { + case OFF: return "The device is off."; + case ON: return "The device is fully operational."; + case NOTREADY: return "The device is not ready."; + case STANDBY: return "The device is ready but not actively operating."; + case TRANSDUCDISCON: return "The device transducer is diconnected."; + case HWDISCON: return "The device hardware is disconnected."; + case ENTEREDINERROR: return "The device was entered in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OFF: return "Off"; + case ON: return "On"; + case NOTREADY: return "Not Ready"; + case STANDBY: return "Standby"; + case TRANSDUCDISCON: return "Transducer Diconnected"; + case HWDISCON: return "Hardware Disconnectd"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationalStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationalStatusEnumFactory.java new file mode 100644 index 00000000000..f02bf0ffdae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OperationalStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class OperationalStatusEnumFactory implements EnumFactory { + + public OperationalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("off".equals(codeString)) + return OperationalStatus.OFF; + if ("on".equals(codeString)) + return OperationalStatus.ON; + if ("not-ready".equals(codeString)) + return OperationalStatus.NOTREADY; + if ("standby".equals(codeString)) + return OperationalStatus.STANDBY; + if ("transduc-discon".equals(codeString)) + return OperationalStatus.TRANSDUCDISCON; + if ("hw-discon".equals(codeString)) + return OperationalStatus.HWDISCON; + if ("entered-in-error".equals(codeString)) + return OperationalStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown OperationalStatus code '"+codeString+"'"); + } + + public String toCode(OperationalStatus code) { + if (code == OperationalStatus.OFF) + return "off"; + if (code == OperationalStatus.ON) + return "on"; + if (code == OperationalStatus.NOTREADY) + return "not-ready"; + if (code == OperationalStatus.STANDBY) + return "standby"; + if (code == OperationalStatus.TRANSDUCDISCON) + return "transduc-discon"; + if (code == OperationalStatus.HWDISCON) + return "hw-discon"; + if (code == OperationalStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(OperationalStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OralProsthodonticMaterial.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OralProsthodonticMaterial.java new file mode 100644 index 00000000000..89840c3155f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OralProsthodonticMaterial.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OralProsthodonticMaterial { + + /** + * Fixed Bridge + */ + _1, + /** + * Maryland Bridge + */ + _2, + /** + * Denture Acrylic + */ + _3, + /** + * Denture Chrome Cobalt + */ + _4, + /** + * added to help the parsers + */ + NULL; + public static OralProsthodonticMaterial fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + throw new FHIRException("Unknown OralProsthodonticMaterial code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-oralprostho"; + } + public String getDefinition() { + switch (this) { + case _1: return "Fixed Bridge"; + case _2: return "Maryland Bridge"; + case _3: return "Denture Acrylic"; + case _4: return "Denture Chrome Cobalt"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Fixed Bridge"; + case _2: return "Maryland Bridge"; + case _3: return "Denture Acrylic"; + case _4: return "Denture Chrome Cobalt"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OralProsthodonticMaterialEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OralProsthodonticMaterialEnumFactory.java new file mode 100644 index 00000000000..4ad2ce89a08 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OralProsthodonticMaterialEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class OralProsthodonticMaterialEnumFactory implements EnumFactory { + + public OralProsthodonticMaterial fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return OralProsthodonticMaterial._1; + if ("2".equals(codeString)) + return OralProsthodonticMaterial._2; + if ("3".equals(codeString)) + return OralProsthodonticMaterial._3; + if ("4".equals(codeString)) + return OralProsthodonticMaterial._4; + throw new IllegalArgumentException("Unknown OralProsthodonticMaterial code '"+codeString+"'"); + } + + public String toCode(OralProsthodonticMaterial code) { + if (code == OralProsthodonticMaterial._1) + return "1"; + if (code == OralProsthodonticMaterial._2) + return "2"; + if (code == OralProsthodonticMaterial._3) + return "3"; + if (code == OralProsthodonticMaterial._4) + return "4"; + return "?"; + } + + public String toSystem(OralProsthodonticMaterial code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OrganizationType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OrganizationType.java new file mode 100644 index 00000000000..b4ebe2bff14 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OrganizationType.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum OrganizationType { + + /** + * An organization that provides healthcare services. + */ + PROV, + /** + * A department or ward within a hospital (Generally is not applicable to top level organizations) + */ + DEPT, + /** + * An organizational team is usually a grouping of practitioners that perform a specific function within an organization (which could be a top level organization, or a department). + */ + TEAM, + /** + * A political body, often used when including organization records for government bodies such as a Federal Government, State or Local Government. + */ + GOVT, + /** + * A company that provides insurance to its subscribers that may include healthcare related policies. + */ + INS, + /** + * An educational institution that provides education or research facilities. + */ + EDU, + /** + * An organization that is identified as a part of a religious institution. + */ + RELI, + /** + * An organization that is identified as a Pharmaceutical/Clinical Research Sponsor. + */ + CRS, + /** + * An un-incorporated community group. + */ + CG, + /** + * An organization that is a registered business or corporation but not identified by other types. + */ + BUS, + /** + * Other type of organization not already specified. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static OrganizationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("prov".equals(codeString)) + return PROV; + if ("dept".equals(codeString)) + return DEPT; + if ("team".equals(codeString)) + return TEAM; + if ("govt".equals(codeString)) + return GOVT; + if ("ins".equals(codeString)) + return INS; + if ("edu".equals(codeString)) + return EDU; + if ("reli".equals(codeString)) + return RELI; + if ("crs".equals(codeString)) + return CRS; + if ("cg".equals(codeString)) + return CG; + if ("bus".equals(codeString)) + return BUS; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown OrganizationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROV: return "prov"; + case DEPT: return "dept"; + case TEAM: return "team"; + case GOVT: return "govt"; + case INS: return "ins"; + case EDU: return "edu"; + case RELI: return "reli"; + case CRS: return "crs"; + case CG: return "cg"; + case BUS: return "bus"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/organization-type"; + } + public String getDefinition() { + switch (this) { + case PROV: return "An organization that provides healthcare services."; + case DEPT: return "A department or ward within a hospital (Generally is not applicable to top level organizations)"; + case TEAM: return "An organizational team is usually a grouping of practitioners that perform a specific function within an organization (which could be a top level organization, or a department)."; + case GOVT: return "A political body, often used when including organization records for government bodies such as a Federal Government, State or Local Government."; + case INS: return "A company that provides insurance to its subscribers that may include healthcare related policies."; + case EDU: return "An educational institution that provides education or research facilities."; + case RELI: return "An organization that is identified as a part of a religious institution."; + case CRS: return "An organization that is identified as a Pharmaceutical/Clinical Research Sponsor."; + case CG: return "An un-incorporated community group."; + case BUS: return "An organization that is a registered business or corporation but not identified by other types."; + case OTHER: return "Other type of organization not already specified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROV: return "Healthcare Provider"; + case DEPT: return "Hospital Department"; + case TEAM: return "Organizational team"; + case GOVT: return "Government"; + case INS: return "Insurance Company"; + case EDU: return "Educational Institute"; + case RELI: return "Religious Institution"; + case CRS: return "Clinical Research Sponsor"; + case CG: return "Community Group"; + case BUS: return "Non-Healthcare Business or Corporation"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OrganizationTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OrganizationTypeEnumFactory.java new file mode 100644 index 00000000000..fefd36bd190 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/OrganizationTypeEnumFactory.java @@ -0,0 +1,98 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class OrganizationTypeEnumFactory implements EnumFactory { + + public OrganizationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("prov".equals(codeString)) + return OrganizationType.PROV; + if ("dept".equals(codeString)) + return OrganizationType.DEPT; + if ("team".equals(codeString)) + return OrganizationType.TEAM; + if ("govt".equals(codeString)) + return OrganizationType.GOVT; + if ("ins".equals(codeString)) + return OrganizationType.INS; + if ("edu".equals(codeString)) + return OrganizationType.EDU; + if ("reli".equals(codeString)) + return OrganizationType.RELI; + if ("crs".equals(codeString)) + return OrganizationType.CRS; + if ("cg".equals(codeString)) + return OrganizationType.CG; + if ("bus".equals(codeString)) + return OrganizationType.BUS; + if ("other".equals(codeString)) + return OrganizationType.OTHER; + throw new IllegalArgumentException("Unknown OrganizationType code '"+codeString+"'"); + } + + public String toCode(OrganizationType code) { + if (code == OrganizationType.PROV) + return "prov"; + if (code == OrganizationType.DEPT) + return "dept"; + if (code == OrganizationType.TEAM) + return "team"; + if (code == OrganizationType.GOVT) + return "govt"; + if (code == OrganizationType.INS) + return "ins"; + if (code == OrganizationType.EDU) + return "edu"; + if (code == OrganizationType.RELI) + return "reli"; + if (code == OrganizationType.CRS) + return "crs"; + if (code == OrganizationType.CG) + return "cg"; + if (code == OrganizationType.BUS) + return "bus"; + if (code == OrganizationType.OTHER) + return "other"; + return "?"; + } + + public String toSystem(OrganizationType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParameterGroup.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParameterGroup.java new file mode 100644 index 00000000000..ac54513450c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParameterGroup.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ParameterGroup { + + /** + * Haemodynamic Parameter Group - MDC_PGRP_HEMO + */ + HAEMODYNAMIC, + /** + * ECG Parameter Group - MDC_PGRP_ECG + */ + ECG, + /** + * Respiratory Parameter Group - MDC_PGRP_RESP + */ + RESPIRATORY, + /** + * Ventilation Parameter Group - MDC_PGRP_VENT + */ + VENTILATION, + /** + * Neurological Parameter Group - MDC_PGRP_NEURO + */ + NEUROLOGICAL, + /** + * Drug Delivery Parameter Group - MDC_PGRP_DRUG + */ + DRUGDELIVERY, + /** + * Fluid Chemistry Parameter Group - MDC_PGRP_FLUID + */ + FLUIDCHEMISTRY, + /** + * Blood Chemistry Parameter Group - MDC_PGRP_BLOOD_CHEM + */ + BLOODCHEMISTRY, + /** + * Miscellaneous Parameter Group - MDC_PGRP_MISC + */ + MISCELLANEOUS, + /** + * added to help the parsers + */ + NULL; + public static ParameterGroup fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("haemodynamic".equals(codeString)) + return HAEMODYNAMIC; + if ("ecg".equals(codeString)) + return ECG; + if ("respiratory".equals(codeString)) + return RESPIRATORY; + if ("ventilation".equals(codeString)) + return VENTILATION; + if ("neurological".equals(codeString)) + return NEUROLOGICAL; + if ("drug-delivery".equals(codeString)) + return DRUGDELIVERY; + if ("fluid-chemistry".equals(codeString)) + return FLUIDCHEMISTRY; + if ("blood-chemistry".equals(codeString)) + return BLOODCHEMISTRY; + if ("miscellaneous".equals(codeString)) + return MISCELLANEOUS; + throw new FHIRException("Unknown ParameterGroup code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HAEMODYNAMIC: return "haemodynamic"; + case ECG: return "ecg"; + case RESPIRATORY: return "respiratory"; + case VENTILATION: return "ventilation"; + case NEUROLOGICAL: return "neurological"; + case DRUGDELIVERY: return "drug-delivery"; + case FLUIDCHEMISTRY: return "fluid-chemistry"; + case BLOODCHEMISTRY: return "blood-chemistry"; + case MISCELLANEOUS: return "miscellaneous"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/parameter-group"; + } + public String getDefinition() { + switch (this) { + case HAEMODYNAMIC: return "Haemodynamic Parameter Group - MDC_PGRP_HEMO"; + case ECG: return "ECG Parameter Group - MDC_PGRP_ECG"; + case RESPIRATORY: return "Respiratory Parameter Group - MDC_PGRP_RESP"; + case VENTILATION: return "Ventilation Parameter Group - MDC_PGRP_VENT"; + case NEUROLOGICAL: return "Neurological Parameter Group - MDC_PGRP_NEURO"; + case DRUGDELIVERY: return "Drug Delivery Parameter Group - MDC_PGRP_DRUG"; + case FLUIDCHEMISTRY: return "Fluid Chemistry Parameter Group - MDC_PGRP_FLUID"; + case BLOODCHEMISTRY: return "Blood Chemistry Parameter Group - MDC_PGRP_BLOOD_CHEM"; + case MISCELLANEOUS: return "Miscellaneous Parameter Group - MDC_PGRP_MISC"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HAEMODYNAMIC: return "Haemodynamic Parameter Group"; + case ECG: return "ECG Parameter Group"; + case RESPIRATORY: return "Respiratory Parameter Group"; + case VENTILATION: return "Ventilation Parameter Group"; + case NEUROLOGICAL: return "Neurological Parameter Group"; + case DRUGDELIVERY: return "Drug Delivery Parameter Group"; + case FLUIDCHEMISTRY: return "Fluid Chemistry Parameter Group"; + case BLOODCHEMISTRY: return "Blood Chemistry Parameter Group"; + case MISCELLANEOUS: return "Miscellaneous Parameter Group"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParameterGroupEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParameterGroupEnumFactory.java new file mode 100644 index 00000000000..8d4aff685b1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParameterGroupEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ParameterGroupEnumFactory implements EnumFactory { + + public ParameterGroup fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("haemodynamic".equals(codeString)) + return ParameterGroup.HAEMODYNAMIC; + if ("ecg".equals(codeString)) + return ParameterGroup.ECG; + if ("respiratory".equals(codeString)) + return ParameterGroup.RESPIRATORY; + if ("ventilation".equals(codeString)) + return ParameterGroup.VENTILATION; + if ("neurological".equals(codeString)) + return ParameterGroup.NEUROLOGICAL; + if ("drug-delivery".equals(codeString)) + return ParameterGroup.DRUGDELIVERY; + if ("fluid-chemistry".equals(codeString)) + return ParameterGroup.FLUIDCHEMISTRY; + if ("blood-chemistry".equals(codeString)) + return ParameterGroup.BLOODCHEMISTRY; + if ("miscellaneous".equals(codeString)) + return ParameterGroup.MISCELLANEOUS; + throw new IllegalArgumentException("Unknown ParameterGroup code '"+codeString+"'"); + } + + public String toCode(ParameterGroup code) { + if (code == ParameterGroup.HAEMODYNAMIC) + return "haemodynamic"; + if (code == ParameterGroup.ECG) + return "ecg"; + if (code == ParameterGroup.RESPIRATORY) + return "respiratory"; + if (code == ParameterGroup.VENTILATION) + return "ventilation"; + if (code == ParameterGroup.NEUROLOGICAL) + return "neurological"; + if (code == ParameterGroup.DRUGDELIVERY) + return "drug-delivery"; + if (code == ParameterGroup.FLUIDCHEMISTRY) + return "fluid-chemistry"; + if (code == ParameterGroup.BLOODCHEMISTRY) + return "blood-chemistry"; + if (code == ParameterGroup.MISCELLANEOUS) + return "miscellaneous"; + return "?"; + } + + public String toSystem(ParameterGroup code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Participantrequired.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Participantrequired.java new file mode 100644 index 00000000000..83b49df9a8c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Participantrequired.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Participantrequired { + + /** + * The participant is required to attend the appointment. + */ + REQUIRED, + /** + * The participant may optionally attend the appointment. + */ + OPTIONAL, + /** + * The participant is excluded from the appointment, and may not be informed of the appointment taking place. (Appointment is about them, not for them - such as 2 doctors discussing results about a patient's test). + */ + INFORMATIONONLY, + /** + * added to help the parsers + */ + NULL; + public static Participantrequired fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return REQUIRED; + if ("optional".equals(codeString)) + return OPTIONAL; + if ("information-only".equals(codeString)) + return INFORMATIONONLY; + throw new FHIRException("Unknown Participantrequired code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUIRED: return "required"; + case OPTIONAL: return "optional"; + case INFORMATIONONLY: return "information-only"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/participantrequired"; + } + public String getDefinition() { + switch (this) { + case REQUIRED: return "The participant is required to attend the appointment."; + case OPTIONAL: return "The participant may optionally attend the appointment."; + case INFORMATIONONLY: return "The participant is excluded from the appointment, and may not be informed of the appointment taking place. (Appointment is about them, not for them - such as 2 doctors discussing results about a patient's test)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUIRED: return "Required"; + case OPTIONAL: return "Optional"; + case INFORMATIONONLY: return "Information Only"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParticipantrequiredEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParticipantrequiredEnumFactory.java new file mode 100644 index 00000000000..32b10ad7f05 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParticipantrequiredEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ParticipantrequiredEnumFactory implements EnumFactory { + + public Participantrequired fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("required".equals(codeString)) + return Participantrequired.REQUIRED; + if ("optional".equals(codeString)) + return Participantrequired.OPTIONAL; + if ("information-only".equals(codeString)) + return Participantrequired.INFORMATIONONLY; + throw new IllegalArgumentException("Unknown Participantrequired code '"+codeString+"'"); + } + + public String toCode(Participantrequired code) { + if (code == Participantrequired.REQUIRED) + return "required"; + if (code == Participantrequired.OPTIONAL) + return "optional"; + if (code == Participantrequired.INFORMATIONONLY) + return "information-only"; + return "?"; + } + + public String toSystem(Participantrequired code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Participationstatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Participationstatus.java new file mode 100644 index 00000000000..e56d4d522e5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Participationstatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Participationstatus { + + /** + * The participant has accepted the appointment. + */ + ACCEPTED, + /** + * The participant has declined the appointment and will not participate in the appointment. + */ + DECLINED, + /** + * The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur. + */ + TENTATIVE, + /** + * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses. + */ + NEEDSACTION, + /** + * added to help the parsers + */ + NULL; + public static Participationstatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("declined".equals(codeString)) + return DECLINED; + if ("tentative".equals(codeString)) + return TENTATIVE; + if ("needs-action".equals(codeString)) + return NEEDSACTION; + throw new FHIRException("Unknown Participationstatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCEPTED: return "accepted"; + case DECLINED: return "declined"; + case TENTATIVE: return "tentative"; + case NEEDSACTION: return "needs-action"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/participationstatus"; + } + public String getDefinition() { + switch (this) { + case ACCEPTED: return "The participant has accepted the appointment."; + case DECLINED: return "The participant has declined the appointment and will not participate in the appointment."; + case TENTATIVE: return "The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur."; + case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCEPTED: return "Accepted"; + case DECLINED: return "Declined"; + case TENTATIVE: return "Tentative"; + case NEEDSACTION: return "Needs Action"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParticipationstatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParticipationstatusEnumFactory.java new file mode 100644 index 00000000000..4a56de9bf6a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ParticipationstatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ParticipationstatusEnumFactory implements EnumFactory { + + public Participationstatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return Participationstatus.ACCEPTED; + if ("declined".equals(codeString)) + return Participationstatus.DECLINED; + if ("tentative".equals(codeString)) + return Participationstatus.TENTATIVE; + if ("needs-action".equals(codeString)) + return Participationstatus.NEEDSACTION; + throw new IllegalArgumentException("Unknown Participationstatus code '"+codeString+"'"); + } + + public String toCode(Participationstatus code) { + if (code == Participationstatus.ACCEPTED) + return "accepted"; + if (code == Participationstatus.DECLINED) + return "declined"; + if (code == Participationstatus.TENTATIVE) + return "tentative"; + if (code == Participationstatus.NEEDSACTION) + return "needs-action"; + return "?"; + } + + public String toSystem(Participationstatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Payeetype.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Payeetype.java new file mode 100644 index 00000000000..49248fa994c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Payeetype.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Payeetype { + + /** + * The subscriber (policy holder) will be reimbursed. + */ + SUBSCRIBER, + /** + * Any benefit payable will be paid to the provider (Assignment of Benefit). + */ + PROVIDER, + /** + * Any benefit payable will be paid to a third party such as a guarrantor. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static Payeetype fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("subscriber".equals(codeString)) + return SUBSCRIBER; + if ("provider".equals(codeString)) + return PROVIDER; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown Payeetype code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUBSCRIBER: return "subscriber"; + case PROVIDER: return "provider"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/payeetype"; + } + public String getDefinition() { + switch (this) { + case SUBSCRIBER: return "The subscriber (policy holder) will be reimbursed."; + case PROVIDER: return "Any benefit payable will be paid to the provider (Assignment of Benefit)."; + case OTHER: return "Any benefit payable will be paid to a third party such as a guarrantor."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUBSCRIBER: return "Subscriber"; + case PROVIDER: return "Provider"; + case OTHER: return "Provider"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PayeetypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PayeetypeEnumFactory.java new file mode 100644 index 00000000000..c917971176b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PayeetypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PayeetypeEnumFactory implements EnumFactory { + + public Payeetype fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("subscriber".equals(codeString)) + return Payeetype.SUBSCRIBER; + if ("provider".equals(codeString)) + return Payeetype.PROVIDER; + if ("other".equals(codeString)) + return Payeetype.OTHER; + throw new IllegalArgumentException("Unknown Payeetype code '"+codeString+"'"); + } + + public String toCode(Payeetype code) { + if (code == Payeetype.SUBSCRIBER) + return "subscriber"; + if (code == Payeetype.PROVIDER) + return "provider"; + if (code == Payeetype.OTHER) + return "other"; + return "?"; + } + + public String toSystem(Payeetype code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentAdjustmentReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentAdjustmentReason.java new file mode 100644 index 00000000000..5d143ebb60c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentAdjustmentReason.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PaymentAdjustmentReason { + + /** + * Prior Payment Reversal + */ + A001, + /** + * Prior Overpayment + */ + A002, + /** + * added to help the parsers + */ + NULL; + public static PaymentAdjustmentReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a001".equals(codeString)) + return A001; + if ("a002".equals(codeString)) + return A002; + throw new FHIRException("Unknown PaymentAdjustmentReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A001: return "a001"; + case A002: return "a002"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/payment-adjustment-reason"; + } + public String getDefinition() { + switch (this) { + case A001: return "Prior Payment Reversal"; + case A002: return "Prior Overpayment"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A001: return "Prior Payment Reversal"; + case A002: return "Prior Overpayment"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentAdjustmentReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentAdjustmentReasonEnumFactory.java new file mode 100644 index 00000000000..f95da3dd232 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentAdjustmentReasonEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PaymentAdjustmentReasonEnumFactory implements EnumFactory { + + public PaymentAdjustmentReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a001".equals(codeString)) + return PaymentAdjustmentReason.A001; + if ("a002".equals(codeString)) + return PaymentAdjustmentReason.A002; + throw new IllegalArgumentException("Unknown PaymentAdjustmentReason code '"+codeString+"'"); + } + + public String toCode(PaymentAdjustmentReason code) { + if (code == PaymentAdjustmentReason.A001) + return "a001"; + if (code == PaymentAdjustmentReason.A002) + return "a002"; + return "?"; + } + + public String toSystem(PaymentAdjustmentReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentStatus.java new file mode 100644 index 00000000000..4c5f2f36c73 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PaymentStatus { + + /** + * The payment has been sent physically or electronically. + */ + PAID, + /** + * The payment has been received by the payee. + */ + CLEARED, + /** + * added to help the parsers + */ + NULL; + public static PaymentStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("paid".equals(codeString)) + return PAID; + if ("cleared".equals(codeString)) + return CLEARED; + throw new FHIRException("Unknown PaymentStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAID: return "paid"; + case CLEARED: return "cleared"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/paymentstatus"; + } + public String getDefinition() { + switch (this) { + case PAID: return "The payment has been sent physically or electronically."; + case CLEARED: return "The payment has been received by the payee."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAID: return "Paid"; + case CLEARED: return "Cleared"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentStatusEnumFactory.java new file mode 100644 index 00000000000..3fc1e2792c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentStatusEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PaymentStatusEnumFactory implements EnumFactory { + + public PaymentStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("paid".equals(codeString)) + return PaymentStatus.PAID; + if ("cleared".equals(codeString)) + return PaymentStatus.CLEARED; + throw new IllegalArgumentException("Unknown PaymentStatus code '"+codeString+"'"); + } + + public String toCode(PaymentStatus code) { + if (code == PaymentStatus.PAID) + return "paid"; + if (code == PaymentStatus.CLEARED) + return "cleared"; + return "?"; + } + + public String toSystem(PaymentStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentType.java new file mode 100644 index 00000000000..a64e8f16202 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PaymentType { + + /** + * The amount is partial or complete settlement of the amounts due. + */ + PAYMENT, + /** + * The amount is an adjustment regarding claims already paid. + */ + ADJUSTMENT, + /** + * The amount is an advance against future claims. + */ + ADVANCE, + /** + * added to help the parsers + */ + NULL; + public static PaymentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("payment".equals(codeString)) + return PAYMENT; + if ("adjustment".equals(codeString)) + return ADJUSTMENT; + if ("advance".equals(codeString)) + return ADVANCE; + throw new FHIRException("Unknown PaymentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PAYMENT: return "payment"; + case ADJUSTMENT: return "adjustment"; + case ADVANCE: return "advance"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/payment-type"; + } + public String getDefinition() { + switch (this) { + case PAYMENT: return "The amount is partial or complete settlement of the amounts due."; + case ADJUSTMENT: return "The amount is an adjustment regarding claims already paid."; + case ADVANCE: return "The amount is an advance against future claims."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PAYMENT: return "Payment"; + case ADJUSTMENT: return "Adjustment"; + case ADVANCE: return "Advance"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentTypeEnumFactory.java new file mode 100644 index 00000000000..78cc0a5c819 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PaymentTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PaymentTypeEnumFactory implements EnumFactory { + + public PaymentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("payment".equals(codeString)) + return PaymentType.PAYMENT; + if ("adjustment".equals(codeString)) + return PaymentType.ADJUSTMENT; + if ("advance".equals(codeString)) + return PaymentType.ADVANCE; + throw new IllegalArgumentException("Unknown PaymentType code '"+codeString+"'"); + } + + public String toCode(PaymentType code) { + if (code == PaymentType.PAYMENT) + return "payment"; + if (code == PaymentType.ADJUSTMENT) + return "adjustment"; + if (code == PaymentType.ADVANCE) + return "advance"; + return "?"; + } + + public String toSystem(PaymentType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PlanDefinitionType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PlanDefinitionType.java new file mode 100644 index 00000000000..0249f8cce8e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PlanDefinitionType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PlanDefinitionType { + + /** + * A pre-defined and approved group of orders related to a particular clinical condition (e.g. hypertension treatment and monitoring) or stage of care (e.g. hospital admission to Coronary Care Unit). An order set is used as a checklist for the clinician when managing a patient with a specific condition. It is a structured collection of orders relevant to that condition and presented to the clinician in a computerized provider order entry (CPOE) system + */ + ORDERSET, + /** + * A set of activities that can be performed that have relationships in terms of order, pre-conditions, etc. + */ + PROTOCOL, + /** + * A decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of actions that should be taken whenever some condition is met in response to a particular event or events + */ + ECARULE, + /** + * added to help the parsers + */ + NULL; + public static PlanDefinitionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("order-set".equals(codeString)) + return ORDERSET; + if ("protocol".equals(codeString)) + return PROTOCOL; + if ("eca-rule".equals(codeString)) + return ECARULE; + throw new FHIRException("Unknown PlanDefinitionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORDERSET: return "order-set"; + case PROTOCOL: return "protocol"; + case ECARULE: return "eca-rule"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/plan-definition-type"; + } + public String getDefinition() { + switch (this) { + case ORDERSET: return "A pre-defined and approved group of orders related to a particular clinical condition (e.g. hypertension treatment and monitoring) or stage of care (e.g. hospital admission to Coronary Care Unit). An order set is used as a checklist for the clinician when managing a patient with a specific condition. It is a structured collection of orders relevant to that condition and presented to the clinician in a computerized provider order entry (CPOE) system"; + case PROTOCOL: return "A set of activities that can be performed that have relationships in terms of order, pre-conditions, etc."; + case ECARULE: return "A decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of actions that should be taken whenever some condition is met in response to a particular event or events"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORDERSET: return "Order Set"; + case PROTOCOL: return "Protocol"; + case ECARULE: return "ECA Rule"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PlanDefinitionTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PlanDefinitionTypeEnumFactory.java new file mode 100644 index 00000000000..d0729d85496 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PlanDefinitionTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PlanDefinitionTypeEnumFactory implements EnumFactory { + + public PlanDefinitionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("order-set".equals(codeString)) + return PlanDefinitionType.ORDERSET; + if ("protocol".equals(codeString)) + return PlanDefinitionType.PROTOCOL; + if ("eca-rule".equals(codeString)) + return PlanDefinitionType.ECARULE; + throw new IllegalArgumentException("Unknown PlanDefinitionType code '"+codeString+"'"); + } + + public String toCode(PlanDefinitionType code) { + if (code == PlanDefinitionType.ORDERSET) + return "order-set"; + if (code == PlanDefinitionType.PROTOCOL) + return "protocol"; + if (code == PlanDefinitionType.ECARULE) + return "eca-rule"; + return "?"; + } + + public String toSystem(PlanDefinitionType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PolicyholderRelationship.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PolicyholderRelationship.java new file mode 100644 index 00000000000..633020c3ec3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PolicyholderRelationship.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PolicyholderRelationship { + + /** + * The Beneficiary is a child of the Policyholder + */ + CHILD, + /** + * The Beneficiary is a parent of the Policyholder + */ + PARENT, + /** + * The Beneficiary is a spouse or equivalent of the Policyholder + */ + SPOUSE, + /** + * The Beneficiary is a common law spouse or equivalent of the Policyholder + */ + COMMON, + /** + * The Beneficiary has some other relationship the Policyholder + */ + OTHER, + /** + * The Beneficiary is the Policyholder + */ + SELF, + /** + * added to help the parsers + */ + NULL; + public static PolicyholderRelationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("child".equals(codeString)) + return CHILD; + if ("parent".equals(codeString)) + return PARENT; + if ("spouse".equals(codeString)) + return SPOUSE; + if ("common".equals(codeString)) + return COMMON; + if ("other".equals(codeString)) + return OTHER; + if ("self".equals(codeString)) + return SELF; + throw new FHIRException("Unknown PolicyholderRelationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CHILD: return "child"; + case PARENT: return "parent"; + case SPOUSE: return "spouse"; + case COMMON: return "common"; + case OTHER: return "other"; + case SELF: return "self"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/policyholder-relationship"; + } + public String getDefinition() { + switch (this) { + case CHILD: return "The Beneficiary is a child of the Policyholder"; + case PARENT: return "The Beneficiary is a parent of the Policyholder"; + case SPOUSE: return "The Beneficiary is a spouse or equivalent of the Policyholder"; + case COMMON: return "The Beneficiary is a common law spouse or equivalent of the Policyholder"; + case OTHER: return "The Beneficiary has some other relationship the Policyholder"; + case SELF: return "The Beneficiary is the Policyholder"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CHILD: return "Child"; + case PARENT: return "Parent"; + case SPOUSE: return "Spouse"; + case COMMON: return "Common Law Spouse"; + case OTHER: return "Other"; + case SELF: return "Self"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PolicyholderRelationshipEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PolicyholderRelationshipEnumFactory.java new file mode 100644 index 00000000000..6091f9f50fc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PolicyholderRelationshipEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PolicyholderRelationshipEnumFactory implements EnumFactory { + + public PolicyholderRelationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("child".equals(codeString)) + return PolicyholderRelationship.CHILD; + if ("parent".equals(codeString)) + return PolicyholderRelationship.PARENT; + if ("spouse".equals(codeString)) + return PolicyholderRelationship.SPOUSE; + if ("common".equals(codeString)) + return PolicyholderRelationship.COMMON; + if ("other".equals(codeString)) + return PolicyholderRelationship.OTHER; + if ("self".equals(codeString)) + return PolicyholderRelationship.SELF; + throw new IllegalArgumentException("Unknown PolicyholderRelationship code '"+codeString+"'"); + } + + public String toCode(PolicyholderRelationship code) { + if (code == PolicyholderRelationship.CHILD) + return "child"; + if (code == PolicyholderRelationship.PARENT) + return "parent"; + if (code == PolicyholderRelationship.SPOUSE) + return "spouse"; + if (code == PolicyholderRelationship.COMMON) + return "common"; + if (code == PolicyholderRelationship.OTHER) + return "other"; + if (code == PolicyholderRelationship.SELF) + return "self"; + return "?"; + } + + public String toSystem(PolicyholderRelationship code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerRole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerRole.java new file mode 100644 index 00000000000..687511a9a8b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerRole.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PractitionerRole { + + /** + * A qualified/registered medical practitioner + */ + DOCTOR, + /** + * A practitoner with nursing experience that may be qualified/registered + */ + NURSE, + /** + * A qualified/registered/licensed pharmacist + */ + PHARMACIST, + /** + * A practitioner that may perform research + */ + RESEARCHER, + /** + * Someone who is able to provide educational services + */ + TEACHER, + /** + * Someone who is qualified in Information and Communication Technologies + */ + ICT, + /** + * added to help the parsers + */ + NULL; + public static PractitionerRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("doctor".equals(codeString)) + return DOCTOR; + if ("nurse".equals(codeString)) + return NURSE; + if ("pharmacist".equals(codeString)) + return PHARMACIST; + if ("researcher".equals(codeString)) + return RESEARCHER; + if ("teacher".equals(codeString)) + return TEACHER; + if ("ict".equals(codeString)) + return ICT; + throw new FHIRException("Unknown PractitionerRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DOCTOR: return "doctor"; + case NURSE: return "nurse"; + case PHARMACIST: return "pharmacist"; + case RESEARCHER: return "researcher"; + case TEACHER: return "teacher"; + case ICT: return "ict"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/practitioner-role"; + } + public String getDefinition() { + switch (this) { + case DOCTOR: return "A qualified/registered medical practitioner"; + case NURSE: return "A practitoner with nursing experience that may be qualified/registered"; + case PHARMACIST: return "A qualified/registered/licensed pharmacist"; + case RESEARCHER: return "A practitioner that may perform research"; + case TEACHER: return "Someone who is able to provide educational services"; + case ICT: return "Someone who is qualified in Information and Communication Technologies"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DOCTOR: return "Doctor"; + case NURSE: return "Nurse"; + case PHARMACIST: return "Pharmacist"; + case RESEARCHER: return "Researcher"; + case TEACHER: return "Teacher/educator"; + case ICT: return "ICT professional"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerRoleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerRoleEnumFactory.java new file mode 100644 index 00000000000..199d9d3d80b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerRoleEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PractitionerRoleEnumFactory implements EnumFactory { + + public PractitionerRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("doctor".equals(codeString)) + return PractitionerRole.DOCTOR; + if ("nurse".equals(codeString)) + return PractitionerRole.NURSE; + if ("pharmacist".equals(codeString)) + return PractitionerRole.PHARMACIST; + if ("researcher".equals(codeString)) + return PractitionerRole.RESEARCHER; + if ("teacher".equals(codeString)) + return PractitionerRole.TEACHER; + if ("ict".equals(codeString)) + return PractitionerRole.ICT; + throw new IllegalArgumentException("Unknown PractitionerRole code '"+codeString+"'"); + } + + public String toCode(PractitionerRole code) { + if (code == PractitionerRole.DOCTOR) + return "doctor"; + if (code == PractitionerRole.NURSE) + return "nurse"; + if (code == PractitionerRole.PHARMACIST) + return "pharmacist"; + if (code == PractitionerRole.RESEARCHER) + return "researcher"; + if (code == PractitionerRole.TEACHER) + return "teacher"; + if (code == PractitionerRole.ICT) + return "ict"; + return "?"; + } + + public String toSystem(PractitionerRole code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerSpecialty.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerSpecialty.java new file mode 100644 index 00000000000..a9c315238c3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerSpecialty.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PractitionerSpecialty { + + /** + * null + */ + CARDIO, + /** + * null + */ + DENT, + /** + * null + */ + DIETARY, + /** + * null + */ + MIDW, + /** + * null + */ + SYSARCH, + /** + * added to help the parsers + */ + NULL; + public static PractitionerSpecialty fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cardio".equals(codeString)) + return CARDIO; + if ("dent".equals(codeString)) + return DENT; + if ("dietary".equals(codeString)) + return DIETARY; + if ("midw".equals(codeString)) + return MIDW; + if ("sysarch".equals(codeString)) + return SYSARCH; + throw new FHIRException("Unknown PractitionerSpecialty code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CARDIO: return "cardio"; + case DENT: return "dent"; + case DIETARY: return "dietary"; + case MIDW: return "midw"; + case SYSARCH: return "sysarch"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/practitioner-specialty"; + } + public String getDefinition() { + switch (this) { + case CARDIO: return ""; + case DENT: return ""; + case DIETARY: return ""; + case MIDW: return ""; + case SYSARCH: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CARDIO: return "Cardiologist"; + case DENT: return "Dentist"; + case DIETARY: return "Dietary consultant"; + case MIDW: return "Midwife"; + case SYSARCH: return "Systems architect"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerSpecialtyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerSpecialtyEnumFactory.java new file mode 100644 index 00000000000..2e9651c3b87 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PractitionerSpecialtyEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PractitionerSpecialtyEnumFactory implements EnumFactory { + + public PractitionerSpecialty fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("cardio".equals(codeString)) + return PractitionerSpecialty.CARDIO; + if ("dent".equals(codeString)) + return PractitionerSpecialty.DENT; + if ("dietary".equals(codeString)) + return PractitionerSpecialty.DIETARY; + if ("midw".equals(codeString)) + return PractitionerSpecialty.MIDW; + if ("sysarch".equals(codeString)) + return PractitionerSpecialty.SYSARCH; + throw new IllegalArgumentException("Unknown PractitionerSpecialty code '"+codeString+"'"); + } + + public String toCode(PractitionerSpecialty code) { + if (code == PractitionerSpecialty.CARDIO) + return "cardio"; + if (code == PractitionerSpecialty.DENT) + return "dent"; + if (code == PractitionerSpecialty.DIETARY) + return "dietary"; + if (code == PractitionerSpecialty.MIDW) + return "midw"; + if (code == PractitionerSpecialty.SYSARCH) + return "sysarch"; + return "?"; + } + + public String toSystem(PractitionerSpecialty code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcedureProgressStatusCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcedureProgressStatusCodes.java new file mode 100644 index 00000000000..7d91a987e34 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcedureProgressStatusCodes.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcedureProgressStatusCodes { + + /** + * A patient is in the Operating Room. + */ + INOPERATINGROOM, + /** + * The patient is prepared for a procedure. + */ + PREPARED, + /** + * The patient is under anesthesia. + */ + ANESTHESIAINDUCED, + /** + * The patient has open incision(s). + */ + OPENINCISION, + /** + * The patient has incision(s) closed. + */ + CLOSEDINCISION, + /** + * The patient is in the recovery room. + */ + INRECOVERYROOM, + /** + * added to help the parsers + */ + NULL; + public static ProcedureProgressStatusCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-operating-room".equals(codeString)) + return INOPERATINGROOM; + if ("prepared".equals(codeString)) + return PREPARED; + if ("anesthesia-induced".equals(codeString)) + return ANESTHESIAINDUCED; + if ("open-incision".equals(codeString)) + return OPENINCISION; + if ("closed-incision".equals(codeString)) + return CLOSEDINCISION; + if ("in-recovery-room".equals(codeString)) + return INRECOVERYROOM; + throw new FHIRException("Unknown ProcedureProgressStatusCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INOPERATINGROOM: return "in-operating-room"; + case PREPARED: return "prepared"; + case ANESTHESIAINDUCED: return "anesthesia-induced"; + case OPENINCISION: return "open-incision"; + case CLOSEDINCISION: return "closed-incision"; + case INRECOVERYROOM: return "in-recovery-room"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/procedure-progress-status-code"; + } + public String getDefinition() { + switch (this) { + case INOPERATINGROOM: return "A patient is in the Operating Room."; + case PREPARED: return "The patient is prepared for a procedure."; + case ANESTHESIAINDUCED: return "The patient is under anesthesia."; + case OPENINCISION: return "The patient has open incision(s)."; + case CLOSEDINCISION: return "The patient has incision(s) closed."; + case INRECOVERYROOM: return "The patient is in the recovery room."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INOPERATINGROOM: return "In Operating Room"; + case PREPARED: return "Prepared"; + case ANESTHESIAINDUCED: return "Anesthesia Induced"; + case OPENINCISION: return "Open Incision"; + case CLOSEDINCISION: return "Closed Incision"; + case INRECOVERYROOM: return "In Recovery Room"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcedureProgressStatusCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcedureProgressStatusCodesEnumFactory.java new file mode 100644 index 00000000000..5262e9185a7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcedureProgressStatusCodesEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ProcedureProgressStatusCodesEnumFactory implements EnumFactory { + + public ProcedureProgressStatusCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-operating-room".equals(codeString)) + return ProcedureProgressStatusCodes.INOPERATINGROOM; + if ("prepared".equals(codeString)) + return ProcedureProgressStatusCodes.PREPARED; + if ("anesthesia-induced".equals(codeString)) + return ProcedureProgressStatusCodes.ANESTHESIAINDUCED; + if ("open-incision".equals(codeString)) + return ProcedureProgressStatusCodes.OPENINCISION; + if ("closed-incision".equals(codeString)) + return ProcedureProgressStatusCodes.CLOSEDINCISION; + if ("in-recovery-room".equals(codeString)) + return ProcedureProgressStatusCodes.INRECOVERYROOM; + throw new IllegalArgumentException("Unknown ProcedureProgressStatusCodes code '"+codeString+"'"); + } + + public String toCode(ProcedureProgressStatusCodes code) { + if (code == ProcedureProgressStatusCodes.INOPERATINGROOM) + return "in-operating-room"; + if (code == ProcedureProgressStatusCodes.PREPARED) + return "prepared"; + if (code == ProcedureProgressStatusCodes.ANESTHESIAINDUCED) + return "anesthesia-induced"; + if (code == ProcedureProgressStatusCodes.OPENINCISION) + return "open-incision"; + if (code == ProcedureProgressStatusCodes.CLOSEDINCISION) + return "closed-incision"; + if (code == ProcedureProgressStatusCodes.INRECOVERYROOM) + return "in-recovery-room"; + return "?"; + } + + public String toSystem(ProcedureProgressStatusCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessOutcome.java new file mode 100644 index 00000000000..88b57c77a9c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessOutcome.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcessOutcome { + + /** + * The requested processing has completed. + */ + COMPLETE, + /** + * The requested processing has been suspended. + */ + PENDED, + /** + * The requested processing has terminated with some errors being found. + */ + ERROR, + /** + * added to help the parsers + */ + NULL; + public static ProcessOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("pended".equals(codeString)) + return PENDED; + if ("error".equals(codeString)) + return ERROR; + throw new FHIRException("Unknown ProcessOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PENDED: return "pended"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/processoutcomecodes"; + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The requested processing has completed."; + case PENDED: return "The requested processing has been suspended."; + case ERROR: return "The requested processing has terminated with some errors being found."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PENDED: return "Pended"; + case ERROR: return "Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessOutcomeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessOutcomeEnumFactory.java new file mode 100644 index 00000000000..84ad0e5a8ac --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessOutcomeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ProcessOutcomeEnumFactory implements EnumFactory { + + public ProcessOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return ProcessOutcome.COMPLETE; + if ("pended".equals(codeString)) + return ProcessOutcome.PENDED; + if ("error".equals(codeString)) + return ProcessOutcome.ERROR; + throw new IllegalArgumentException("Unknown ProcessOutcome code '"+codeString+"'"); + } + + public String toCode(ProcessOutcome code) { + if (code == ProcessOutcome.COMPLETE) + return "complete"; + if (code == ProcessOutcome.PENDED) + return "pended"; + if (code == ProcessOutcome.ERROR) + return "error"; + return "?"; + } + + public String toSystem(ProcessOutcome code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessPriority.java new file mode 100644 index 00000000000..d6fec513ab1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessPriority.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProcessPriority { + + /** + * Immediately in real time. + */ + STAT, + /** + * With best effort. + */ + NORMAL, + /** + * Later, when possible. + */ + DEFERRED, + /** + * added to help the parsers + */ + NULL; + public static ProcessPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("stat".equals(codeString)) + return STAT; + if ("normal".equals(codeString)) + return NORMAL; + if ("deferred".equals(codeString)) + return DEFERRED; + throw new FHIRException("Unknown ProcessPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case STAT: return "stat"; + case NORMAL: return "normal"; + case DEFERRED: return "deferred"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/processpriority"; + } + public String getDefinition() { + switch (this) { + case STAT: return "Immediately in real time."; + case NORMAL: return "With best effort."; + case DEFERRED: return "Later, when possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case STAT: return "Immediate"; + case NORMAL: return "Normal"; + case DEFERRED: return "Deferred"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessPriorityEnumFactory.java new file mode 100644 index 00000000000..2209bd6fb07 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProcessPriorityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ProcessPriorityEnumFactory implements EnumFactory { + + public ProcessPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("stat".equals(codeString)) + return ProcessPriority.STAT; + if ("normal".equals(codeString)) + return ProcessPriority.NORMAL; + if ("deferred".equals(codeString)) + return ProcessPriority.DEFERRED; + throw new IllegalArgumentException("Unknown ProcessPriority code '"+codeString+"'"); + } + + public String toCode(ProcessPriority code) { + if (code == ProcessPriority.STAT) + return "stat"; + if (code == ProcessPriority.NORMAL) + return "normal"; + if (code == ProcessPriority.DEFERRED) + return "deferred"; + return "?"; + } + + public String toSystem(ProcessPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PropertyRepresentation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PropertyRepresentation.java new file mode 100644 index 00000000000..c484751f139 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PropertyRepresentation.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PropertyRepresentation { + + /** + * In XML, this property is represented as an attribute not an element. + */ + XMLATTR, + /** + * This element is represented using the XML text attribute (primitives only) + */ + XMLTEXT, + /** + * The type of this element is indicated using xsi:type + */ + TYPEATTR, + /** + * Use CDA narrative instead of XHTML + */ + CDATEXT, + /** + * The property is represented using XHTML + */ + XHTML, + /** + * added to help the parsers + */ + NULL; + public static PropertyRepresentation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xmlAttr".equals(codeString)) + return XMLATTR; + if ("xmlText".equals(codeString)) + return XMLTEXT; + if ("typeAttr".equals(codeString)) + return TYPEATTR; + if ("cdaText".equals(codeString)) + return CDATEXT; + if ("xhtml".equals(codeString)) + return XHTML; + throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case XMLATTR: return "xmlAttr"; + case XMLTEXT: return "xmlText"; + case TYPEATTR: return "typeAttr"; + case CDATEXT: return "cdaText"; + case XHTML: return "xhtml"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/property-representation"; + } + public String getDefinition() { + switch (this) { + case XMLATTR: return "In XML, this property is represented as an attribute not an element."; + case XMLTEXT: return "This element is represented using the XML text attribute (primitives only)"; + case TYPEATTR: return "The type of this element is indicated using xsi:type"; + case CDATEXT: return "Use CDA narrative instead of XHTML"; + case XHTML: return "The property is represented using XHTML"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case XMLATTR: return "XML Attribute"; + case XMLTEXT: return "XML Text"; + case TYPEATTR: return "Type Attribute"; + case CDATEXT: return "CDA Text Format"; + case XHTML: return "XHTML"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PropertyRepresentationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PropertyRepresentationEnumFactory.java new file mode 100644 index 00000000000..a0681e7f346 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PropertyRepresentationEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PropertyRepresentationEnumFactory implements EnumFactory { + + public PropertyRepresentation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("xmlAttr".equals(codeString)) + return PropertyRepresentation.XMLATTR; + if ("xmlText".equals(codeString)) + return PropertyRepresentation.XMLTEXT; + if ("typeAttr".equals(codeString)) + return PropertyRepresentation.TYPEATTR; + if ("cdaText".equals(codeString)) + return PropertyRepresentation.CDATEXT; + if ("xhtml".equals(codeString)) + return PropertyRepresentation.XHTML; + throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'"); + } + + public String toCode(PropertyRepresentation code) { + if (code == PropertyRepresentation.XMLATTR) + return "xmlAttr"; + if (code == PropertyRepresentation.XMLTEXT) + return "xmlText"; + if (code == PropertyRepresentation.TYPEATTR) + return "typeAttr"; + if (code == PropertyRepresentation.CDATEXT) + return "cdaText"; + if (code == PropertyRepresentation.XHTML) + return "xhtml"; + return "?"; + } + + public String toSystem(PropertyRepresentation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProvenanceEntityRole.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProvenanceEntityRole.java new file mode 100644 index 00000000000..836202f9fbb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProvenanceEntityRole.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProvenanceEntityRole { + + /** + * A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a preexisting entity. + */ + DERIVATION, + /** + * A derivation for which the resulting entity is a revised version of some original. + */ + REVISION, + /** + * The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author. + */ + QUOTATION, + /** + * A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. + */ + SOURCE, + /** + * A derivation for which the entity is removed from accessibility usually through the use of the Delete operation. + */ + REMOVAL, + /** + * added to help the parsers + */ + NULL; + public static ProvenanceEntityRole fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("derivation".equals(codeString)) + return DERIVATION; + if ("revision".equals(codeString)) + return REVISION; + if ("quotation".equals(codeString)) + return QUOTATION; + if ("source".equals(codeString)) + return SOURCE; + if ("removal".equals(codeString)) + return REMOVAL; + throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DERIVATION: return "derivation"; + case REVISION: return "revision"; + case QUOTATION: return "quotation"; + case SOURCE: return "source"; + case REMOVAL: return "removal"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/provenance-entity-role"; + } + public String getDefinition() { + switch (this) { + case DERIVATION: return "A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a preexisting entity."; + case REVISION: return "A derivation for which the resulting entity is a revised version of some original."; + case QUOTATION: return "The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author."; + case SOURCE: return "A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight."; + case REMOVAL: return "A derivation for which the entity is removed from accessibility usually through the use of the Delete operation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DERIVATION: return "Derivation"; + case REVISION: return "Revision"; + case QUOTATION: return "Quotation"; + case SOURCE: return "Source"; + case REMOVAL: return "Removal"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProvenanceEntityRoleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProvenanceEntityRoleEnumFactory.java new file mode 100644 index 00000000000..1a2dd4e06f9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProvenanceEntityRoleEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ProvenanceEntityRoleEnumFactory implements EnumFactory { + + public ProvenanceEntityRole fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("derivation".equals(codeString)) + return ProvenanceEntityRole.DERIVATION; + if ("revision".equals(codeString)) + return ProvenanceEntityRole.REVISION; + if ("quotation".equals(codeString)) + return ProvenanceEntityRole.QUOTATION; + if ("source".equals(codeString)) + return ProvenanceEntityRole.SOURCE; + if ("removal".equals(codeString)) + return ProvenanceEntityRole.REMOVAL; + throw new IllegalArgumentException("Unknown ProvenanceEntityRole code '"+codeString+"'"); + } + + public String toCode(ProvenanceEntityRole code) { + if (code == ProvenanceEntityRole.DERIVATION) + return "derivation"; + if (code == ProvenanceEntityRole.REVISION) + return "revision"; + if (code == ProvenanceEntityRole.QUOTATION) + return "quotation"; + if (code == ProvenanceEntityRole.SOURCE) + return "source"; + if (code == ProvenanceEntityRole.REMOVAL) + return "removal"; + return "?"; + } + + public String toSystem(ProvenanceEntityRole code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProviderQualification.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProviderQualification.java new file mode 100644 index 00000000000..a7d0982b23b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProviderQualification.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ProviderQualification { + + /** + * Dentist General Practitioner (DDS, DDM). + */ + _311405, + /** + * Ophthalmologist. + */ + _604215, + /** + * Optometrist. + */ + _604210, + /** + * added to help the parsers + */ + NULL; + public static ProviderQualification fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("311405".equals(codeString)) + return _311405; + if ("604215".equals(codeString)) + return _604215; + if ("604210".equals(codeString)) + return _604210; + throw new FHIRException("Unknown ProviderQualification code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _311405: return "311405"; + case _604215: return "604215"; + case _604210: return "604210"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-providerqualification"; + } + public String getDefinition() { + switch (this) { + case _311405: return "Dentist General Practitioner (DDS, DDM)."; + case _604215: return "Ophthalmologist."; + case _604210: return "Optometrist."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _311405: return "Dentist"; + case _604215: return "Ophthalmologist"; + case _604210: return "Optometrist"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProviderQualificationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProviderQualificationEnumFactory.java new file mode 100644 index 00000000000..b335bb210f4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ProviderQualificationEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ProviderQualificationEnumFactory implements EnumFactory { + + public ProviderQualification fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("311405".equals(codeString)) + return ProviderQualification._311405; + if ("604215".equals(codeString)) + return ProviderQualification._604215; + if ("604210".equals(codeString)) + return ProviderQualification._604210; + throw new IllegalArgumentException("Unknown ProviderQualification code '"+codeString+"'"); + } + + public String toCode(ProviderQualification code) { + if (code == ProviderQualification._311405) + return "311405"; + if (code == ProviderQualification._604215) + return "604215"; + if (code == ProviderQualification._604210) + return "604210"; + return "?"; + } + + public String toSystem(ProviderQualification code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PublicationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PublicationStatus.java new file mode 100644 index 00000000000..f326e6777d0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PublicationStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum PublicationStatus { + + /** + * This resource is still under development and is not yet considered to be ready for normal use. + */ + DRAFT, + /** + * This resource is ready for normal use. + */ + ACTIVE, + /** + * This resource has been withdrawn or superseded and should no longer be used. + */ + RETIRED, + /** + * The authoring system does not know which of the status values currently applies for this resource. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static PublicationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("retired".equals(codeString)) + return RETIRED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case RETIRED: return "retired"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/publication-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "This resource is still under development and is not yet considered to be ready for normal use."; + case ACTIVE: return "This resource is ready for normal use."; + case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used."; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this resource. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case RETIRED: return "Retired"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PublicationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PublicationStatusEnumFactory.java new file mode 100644 index 00000000000..ab267af24b7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/PublicationStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class PublicationStatusEnumFactory implements EnumFactory { + + public PublicationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return PublicationStatus.DRAFT; + if ("active".equals(codeString)) + return PublicationStatus.ACTIVE; + if ("retired".equals(codeString)) + return PublicationStatus.RETIRED; + if ("unknown".equals(codeString)) + return PublicationStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'"); + } + + public String toCode(PublicationStatus code) { + if (code == PublicationStatus.DRAFT) + return "draft"; + if (code == PublicationStatus.ACTIVE) + return "active"; + if (code == PublicationStatus.RETIRED) + return "retired"; + if (code == PublicationStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(PublicationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QualityType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QualityType.java new file mode 100644 index 00000000000..e22519b92b0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QualityType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QualityType { + + /** + * INDEL Comparison + */ + INDEL, + /** + * SNP Comparison + */ + SNP, + /** + * UNKNOWN Comparison + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static QualityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("indel".equals(codeString)) + return INDEL; + if ("snp".equals(codeString)) + return SNP; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown QualityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INDEL: return "indel"; + case SNP: return "snp"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/quality-type"; + } + public String getDefinition() { + switch (this) { + case INDEL: return "INDEL Comparison"; + case SNP: return "SNP Comparison"; + case UNKNOWN: return "UNKNOWN Comparison"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INDEL: return "INDEL Comparison"; + case SNP: return "SNP Comparison"; + case UNKNOWN: return "UNKNOWN Comparison"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QualityTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QualityTypeEnumFactory.java new file mode 100644 index 00000000000..dfbbb2be270 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QualityTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QualityTypeEnumFactory implements EnumFactory { + + public QualityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("indel".equals(codeString)) + return QualityType.INDEL; + if ("snp".equals(codeString)) + return QualityType.SNP; + if ("unknown".equals(codeString)) + return QualityType.UNKNOWN; + throw new IllegalArgumentException("Unknown QualityType code '"+codeString+"'"); + } + + public String toCode(QualityType code) { + if (code == QualityType.INDEL) + return "indel"; + if (code == QualityType.SNP) + return "snp"; + if (code == QualityType.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(QualityType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuantityComparator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuantityComparator.java new file mode 100644 index 00000000000..01115f80a86 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuantityComparator.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuantityComparator { + + /** + * The actual value is less than the given value. + */ + LESS_THAN, + /** + * The actual value is less than or equal to the given value. + */ + LESS_OR_EQUAL, + /** + * The actual value is greater than or equal to the given value. + */ + GREATER_OR_EQUAL, + /** + * The actual value is greater than the given value. + */ + GREATER_THAN, + /** + * added to help the parsers + */ + NULL; + public static QuantityComparator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("<".equals(codeString)) + return LESS_THAN; + if ("<=".equals(codeString)) + return LESS_OR_EQUAL; + if (">=".equals(codeString)) + return GREATER_OR_EQUAL; + if (">".equals(codeString)) + return GREATER_THAN; + throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LESS_THAN: return "<"; + case LESS_OR_EQUAL: return "<="; + case GREATER_OR_EQUAL: return ">="; + case GREATER_THAN: return ">"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/quantity-comparator"; + } + public String getDefinition() { + switch (this) { + case LESS_THAN: return "The actual value is less than the given value."; + case LESS_OR_EQUAL: return "The actual value is less than or equal to the given value."; + case GREATER_OR_EQUAL: return "The actual value is greater than or equal to the given value."; + case GREATER_THAN: return "The actual value is greater than the given value."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LESS_THAN: return "Less than"; + case LESS_OR_EQUAL: return "Less or Equal to"; + case GREATER_OR_EQUAL: return "Greater or Equal to"; + case GREATER_THAN: return "Greater than"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuantityComparatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuantityComparatorEnumFactory.java new file mode 100644 index 00000000000..1c026ae1d7e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuantityComparatorEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QuantityComparatorEnumFactory implements EnumFactory { + + public QuantityComparator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("<".equals(codeString)) + return QuantityComparator.LESS_THAN; + if ("<=".equals(codeString)) + return QuantityComparator.LESS_OR_EQUAL; + if (">=".equals(codeString)) + return QuantityComparator.GREATER_OR_EQUAL; + if (">".equals(codeString)) + return QuantityComparator.GREATER_THAN; + throw new IllegalArgumentException("Unknown QuantityComparator code '"+codeString+"'"); + } + + public String toCode(QuantityComparator code) { + if (code == QuantityComparator.LESS_THAN) + return "<"; + if (code == QuantityComparator.LESS_OR_EQUAL) + return "<="; + if (code == QuantityComparator.GREATER_OR_EQUAL) + return ">="; + if (code == QuantityComparator.GREATER_THAN) + return ">"; + return "?"; + } + + public String toSystem(QuantityComparator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionMaxOccurs.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionMaxOccurs.java new file mode 100644 index 00000000000..a094d4f4102 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionMaxOccurs.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionMaxOccurs { + + /** + * Element can repeat an unlimited number of times + */ + ASTERISK, + /** + * added to help the parsers + */ + NULL; + public static QuestionMaxOccurs fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("*".equals(codeString)) + return ASTERISK; + throw new FHIRException("Unknown QuestionMaxOccurs code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ASTERISK: return "*"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/question-max-occurs"; + } + public String getDefinition() { + switch (this) { + case ASTERISK: return "Element can repeat an unlimited number of times"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ASTERISK: return "Repeating"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionMaxOccursEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionMaxOccursEnumFactory.java new file mode 100644 index 00000000000..822533a87a7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionMaxOccursEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QuestionMaxOccursEnumFactory implements EnumFactory { + + public QuestionMaxOccurs fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("*".equals(codeString)) + return QuestionMaxOccurs.ASTERISK; + throw new IllegalArgumentException("Unknown QuestionMaxOccurs code '"+codeString+"'"); + } + + public String toCode(QuestionMaxOccurs code) { + if (code == QuestionMaxOccurs.ASTERISK) + return "*"; + return "?"; + } + + public String toSystem(QuestionMaxOccurs code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireAnswersStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireAnswersStatus.java new file mode 100644 index 00000000000..f2f051e7e6a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireAnswersStatus.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionnaireAnswersStatus { + + /** + * This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it. + */ + INPROGRESS, + /** + * This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive. + */ + COMPLETED, + /** + * This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards. + */ + AMENDED, + /** + * This QuestionnaireResponse was entered in error and voided. + */ + ENTEREDINERROR, + /** + * This QuestionnaireResponse has been partially filled out with answers, but has been abandoned. It is unknown whether changes or additions are expected to be made to it. + */ + STOPPED, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireAnswersStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("amended".equals(codeString)) + return AMENDED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + throw new FHIRException("Unknown QuestionnaireAnswersStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case AMENDED: return "amended"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/questionnaire-answers-status"; + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it."; + case COMPLETED: return "This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive."; + case AMENDED: return "This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards."; + case ENTEREDINERROR: return "This QuestionnaireResponse was entered in error and voided."; + case STOPPED: return "This QuestionnaireResponse has been partially filled out with answers, but has been abandoned. It is unknown whether changes or additions are expected to be made to it."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Completed"; + case AMENDED: return "Amended"; + case ENTEREDINERROR: return "Entered in Error"; + case STOPPED: return "Stopped"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireAnswersStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireAnswersStatusEnumFactory.java new file mode 100644 index 00000000000..2a0419fd9a4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireAnswersStatusEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QuestionnaireAnswersStatusEnumFactory implements EnumFactory { + + public QuestionnaireAnswersStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return QuestionnaireAnswersStatus.INPROGRESS; + if ("completed".equals(codeString)) + return QuestionnaireAnswersStatus.COMPLETED; + if ("amended".equals(codeString)) + return QuestionnaireAnswersStatus.AMENDED; + if ("entered-in-error".equals(codeString)) + return QuestionnaireAnswersStatus.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return QuestionnaireAnswersStatus.STOPPED; + throw new IllegalArgumentException("Unknown QuestionnaireAnswersStatus code '"+codeString+"'"); + } + + public String toCode(QuestionnaireAnswersStatus code) { + if (code == QuestionnaireAnswersStatus.INPROGRESS) + return "in-progress"; + if (code == QuestionnaireAnswersStatus.COMPLETED) + return "completed"; + if (code == QuestionnaireAnswersStatus.AMENDED) + return "amended"; + if (code == QuestionnaireAnswersStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == QuestionnaireAnswersStatus.STOPPED) + return "stopped"; + return "?"; + } + + public String toSystem(QuestionnaireAnswersStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireDisplayCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireDisplayCategory.java new file mode 100644 index 00000000000..f217c08f178 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireDisplayCategory.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionnaireDisplayCategory { + + /** + * The text provides guidances on how to populate or use a portion of the questionnaire (or the questionnaire as a whole). + */ + INSTRUCTIONS, + /** + * The text provides guidance on how the information should be or will be handled from a security/confidentiality/access control perspective when completed + */ + SECURITY, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireDisplayCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instructions".equals(codeString)) + return INSTRUCTIONS; + if ("security".equals(codeString)) + return SECURITY; + throw new FHIRException("Unknown QuestionnaireDisplayCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTRUCTIONS: return "instructions"; + case SECURITY: return "security"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/questionnaire-display-category"; + } + public String getDefinition() { + switch (this) { + case INSTRUCTIONS: return "The text provides guidances on how to populate or use a portion of the questionnaire (or the questionnaire as a whole)."; + case SECURITY: return "The text provides guidance on how the information should be or will be handled from a security/confidentiality/access control perspective when completed"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTRUCTIONS: return "Instructions"; + case SECURITY: return "Security"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireDisplayCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireDisplayCategoryEnumFactory.java new file mode 100644 index 00000000000..f45b169fcfb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireDisplayCategoryEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QuestionnaireDisplayCategoryEnumFactory implements EnumFactory { + + public QuestionnaireDisplayCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instructions".equals(codeString)) + return QuestionnaireDisplayCategory.INSTRUCTIONS; + if ("security".equals(codeString)) + return QuestionnaireDisplayCategory.SECURITY; + throw new IllegalArgumentException("Unknown QuestionnaireDisplayCategory code '"+codeString+"'"); + } + + public String toCode(QuestionnaireDisplayCategory code) { + if (code == QuestionnaireDisplayCategory.INSTRUCTIONS) + return "instructions"; + if (code == QuestionnaireDisplayCategory.SECURITY) + return "security"; + return "?"; + } + + public String toSystem(QuestionnaireDisplayCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireItemControl.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireItemControl.java new file mode 100644 index 00000000000..2517f6c3930 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireItemControl.java @@ -0,0 +1,267 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionnaireItemControl { + + /** + * UI controls relevant to organizing groups of questions + */ + GROUP, + /** + * Questions within the group should be listed sequentially + */ + LIST, + /** + * Questions within the group are rows in the table with possible answers as columns + */ + TABLE, + /** + * The group is to be continuously visible at the top of the questionnaire + */ + HEADER, + /** + * The group is to be continuously visible at the bottom of the questionnaire + */ + FOOTER, + /** + * UI controls relevant to rendering questionnaire text items + */ + TEXT, + /** + * Text is displayed as a paragraph in a sequential position between sibling items (default behavior) + */ + INLINE, + /** + * Text is displayed immediately below or within the answer-entry area of the containing question item (typically as a guide for what to enter) + */ + PROMPT, + /** + * Text is displayed adjacent (horizontally or vertically) to the answer space for the parent question, typically to indicate a unit of measure + */ + UNIT, + /** + * Text is displayed to the left of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'lower' bound. E.g. 'Strongly disagree' + */ + LOWER, + /** + * Text is displayed to the right of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'upper' bound. E.g. 'Strongly agree' + */ + UPPER, + /** + * Text is temporarily visible over top of an item if the mouse is positioned over top of the text for the containing item + */ + FLYOVER, + /** + * Text is displayed in a dialog box or similar control if invoked by pushing a button or some other UI-appropriate action to request 'help' for a question, group or the questionnaire as a whole (depending what the text is nested within) + */ + HELP, + /** + * UI controls relevant to capturing question data + */ + QUESTION, + /** + * A control which provides a list of potential matches based on text entered into a control. Used for large choice sets where text-matching is an appropriate discovery mechanism. + */ + AUTOCOMPLETE, + /** + * A control where an item (or multiple items) can be selected from a list that is only displayed when the user is editing the field. + */ + DROPDOWN, + /** + * A control where choices are listed with a box beside them. The box can be toggled to select or de-select a given choice. Multiple selections may be possible. + */ + CHECKBOX, + /** + * A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match. Useful for large choice sets where text matching is not an appropriate discovery mechanism. Such screens must generally be tuned for the specific choice list structure. + */ + LOOKUP, + /** + * A control where choices are listed with a button beside them. The button can be toggled to select or de-select a given choice. Selecting one item deselects all others. + */ + RADIOBUTTON, + /** + * A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis. + */ + SLIDER, + /** + * A control where a list of numeric or other ordered values can be scrolled through via arrows. + */ + SPINNER, + /** + * A control where a user can type in their answer freely. + */ + TEXTBOX, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireItemControl fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return GROUP; + if ("list".equals(codeString)) + return LIST; + if ("table".equals(codeString)) + return TABLE; + if ("header".equals(codeString)) + return HEADER; + if ("footer".equals(codeString)) + return FOOTER; + if ("text".equals(codeString)) + return TEXT; + if ("inline".equals(codeString)) + return INLINE; + if ("prompt".equals(codeString)) + return PROMPT; + if ("unit".equals(codeString)) + return UNIT; + if ("lower".equals(codeString)) + return LOWER; + if ("upper".equals(codeString)) + return UPPER; + if ("flyover".equals(codeString)) + return FLYOVER; + if ("help".equals(codeString)) + return HELP; + if ("question".equals(codeString)) + return QUESTION; + if ("autocomplete".equals(codeString)) + return AUTOCOMPLETE; + if ("drop-down".equals(codeString)) + return DROPDOWN; + if ("check-box".equals(codeString)) + return CHECKBOX; + if ("lookup".equals(codeString)) + return LOOKUP; + if ("radio-button".equals(codeString)) + return RADIOBUTTON; + if ("slider".equals(codeString)) + return SLIDER; + if ("spinner".equals(codeString)) + return SPINNER; + if ("text-box".equals(codeString)) + return TEXTBOX; + throw new FHIRException("Unknown QuestionnaireItemControl code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GROUP: return "group"; + case LIST: return "list"; + case TABLE: return "table"; + case HEADER: return "header"; + case FOOTER: return "footer"; + case TEXT: return "text"; + case INLINE: return "inline"; + case PROMPT: return "prompt"; + case UNIT: return "unit"; + case LOWER: return "lower"; + case UPPER: return "upper"; + case FLYOVER: return "flyover"; + case HELP: return "help"; + case QUESTION: return "question"; + case AUTOCOMPLETE: return "autocomplete"; + case DROPDOWN: return "drop-down"; + case CHECKBOX: return "check-box"; + case LOOKUP: return "lookup"; + case RADIOBUTTON: return "radio-button"; + case SLIDER: return "slider"; + case SPINNER: return "spinner"; + case TEXTBOX: return "text-box"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/questionnaire-item-control"; + } + public String getDefinition() { + switch (this) { + case GROUP: return "UI controls relevant to organizing groups of questions"; + case LIST: return "Questions within the group should be listed sequentially"; + case TABLE: return "Questions within the group are rows in the table with possible answers as columns"; + case HEADER: return "The group is to be continuously visible at the top of the questionnaire"; + case FOOTER: return "The group is to be continuously visible at the bottom of the questionnaire"; + case TEXT: return "UI controls relevant to rendering questionnaire text items"; + case INLINE: return "Text is displayed as a paragraph in a sequential position between sibling items (default behavior)"; + case PROMPT: return "Text is displayed immediately below or within the answer-entry area of the containing question item (typically as a guide for what to enter)"; + case UNIT: return "Text is displayed adjacent (horizontally or vertically) to the answer space for the parent question, typically to indicate a unit of measure"; + case LOWER: return "Text is displayed to the left of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'lower' bound. E.g. 'Strongly disagree'"; + case UPPER: return "Text is displayed to the right of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'upper' bound. E.g. 'Strongly agree'"; + case FLYOVER: return "Text is temporarily visible over top of an item if the mouse is positioned over top of the text for the containing item"; + case HELP: return "Text is displayed in a dialog box or similar control if invoked by pushing a button or some other UI-appropriate action to request 'help' for a question, group or the questionnaire as a whole (depending what the text is nested within)"; + case QUESTION: return "UI controls relevant to capturing question data"; + case AUTOCOMPLETE: return "A control which provides a list of potential matches based on text entered into a control. Used for large choice sets where text-matching is an appropriate discovery mechanism."; + case DROPDOWN: return "A control where an item (or multiple items) can be selected from a list that is only displayed when the user is editing the field."; + case CHECKBOX: return "A control where choices are listed with a box beside them. The box can be toggled to select or de-select a given choice. Multiple selections may be possible."; + case LOOKUP: return "A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match. Useful for large choice sets where text matching is not an appropriate discovery mechanism. Such screens must generally be tuned for the specific choice list structure."; + case RADIOBUTTON: return "A control where choices are listed with a button beside them. The button can be toggled to select or de-select a given choice. Selecting one item deselects all others."; + case SLIDER: return "A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis."; + case SPINNER: return "A control where a list of numeric or other ordered values can be scrolled through via arrows."; + case TEXTBOX: return "A control where a user can type in their answer freely."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GROUP: return "group"; + case LIST: return "List"; + case TABLE: return "Table"; + case HEADER: return "Header"; + case FOOTER: return "Footer"; + case TEXT: return "text"; + case INLINE: return "In-line"; + case PROMPT: return "Prompt"; + case UNIT: return "Unit"; + case LOWER: return "Lower-bound"; + case UPPER: return "Upper-bound"; + case FLYOVER: return "Fly-over"; + case HELP: return "Help-Button"; + case QUESTION: return "question"; + case AUTOCOMPLETE: return "Auto-complete"; + case DROPDOWN: return "Drop down"; + case CHECKBOX: return "Check-box"; + case LOOKUP: return "Lookup"; + case RADIOBUTTON: return "Radio Button"; + case SLIDER: return "Slider"; + case SPINNER: return "Spinner"; + case TEXTBOX: return "Text Box"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireItemControlEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireItemControlEnumFactory.java new file mode 100644 index 00000000000..0f95f862246 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireItemControlEnumFactory.java @@ -0,0 +1,142 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QuestionnaireItemControlEnumFactory implements EnumFactory { + + public QuestionnaireItemControl fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("group".equals(codeString)) + return QuestionnaireItemControl.GROUP; + if ("list".equals(codeString)) + return QuestionnaireItemControl.LIST; + if ("table".equals(codeString)) + return QuestionnaireItemControl.TABLE; + if ("header".equals(codeString)) + return QuestionnaireItemControl.HEADER; + if ("footer".equals(codeString)) + return QuestionnaireItemControl.FOOTER; + if ("text".equals(codeString)) + return QuestionnaireItemControl.TEXT; + if ("inline".equals(codeString)) + return QuestionnaireItemControl.INLINE; + if ("prompt".equals(codeString)) + return QuestionnaireItemControl.PROMPT; + if ("unit".equals(codeString)) + return QuestionnaireItemControl.UNIT; + if ("lower".equals(codeString)) + return QuestionnaireItemControl.LOWER; + if ("upper".equals(codeString)) + return QuestionnaireItemControl.UPPER; + if ("flyover".equals(codeString)) + return QuestionnaireItemControl.FLYOVER; + if ("help".equals(codeString)) + return QuestionnaireItemControl.HELP; + if ("question".equals(codeString)) + return QuestionnaireItemControl.QUESTION; + if ("autocomplete".equals(codeString)) + return QuestionnaireItemControl.AUTOCOMPLETE; + if ("drop-down".equals(codeString)) + return QuestionnaireItemControl.DROPDOWN; + if ("check-box".equals(codeString)) + return QuestionnaireItemControl.CHECKBOX; + if ("lookup".equals(codeString)) + return QuestionnaireItemControl.LOOKUP; + if ("radio-button".equals(codeString)) + return QuestionnaireItemControl.RADIOBUTTON; + if ("slider".equals(codeString)) + return QuestionnaireItemControl.SLIDER; + if ("spinner".equals(codeString)) + return QuestionnaireItemControl.SPINNER; + if ("text-box".equals(codeString)) + return QuestionnaireItemControl.TEXTBOX; + throw new IllegalArgumentException("Unknown QuestionnaireItemControl code '"+codeString+"'"); + } + + public String toCode(QuestionnaireItemControl code) { + if (code == QuestionnaireItemControl.GROUP) + return "group"; + if (code == QuestionnaireItemControl.LIST) + return "list"; + if (code == QuestionnaireItemControl.TABLE) + return "table"; + if (code == QuestionnaireItemControl.HEADER) + return "header"; + if (code == QuestionnaireItemControl.FOOTER) + return "footer"; + if (code == QuestionnaireItemControl.TEXT) + return "text"; + if (code == QuestionnaireItemControl.INLINE) + return "inline"; + if (code == QuestionnaireItemControl.PROMPT) + return "prompt"; + if (code == QuestionnaireItemControl.UNIT) + return "unit"; + if (code == QuestionnaireItemControl.LOWER) + return "lower"; + if (code == QuestionnaireItemControl.UPPER) + return "upper"; + if (code == QuestionnaireItemControl.FLYOVER) + return "flyover"; + if (code == QuestionnaireItemControl.HELP) + return "help"; + if (code == QuestionnaireItemControl.QUESTION) + return "question"; + if (code == QuestionnaireItemControl.AUTOCOMPLETE) + return "autocomplete"; + if (code == QuestionnaireItemControl.DROPDOWN) + return "drop-down"; + if (code == QuestionnaireItemControl.CHECKBOX) + return "check-box"; + if (code == QuestionnaireItemControl.LOOKUP) + return "lookup"; + if (code == QuestionnaireItemControl.RADIOBUTTON) + return "radio-button"; + if (code == QuestionnaireItemControl.SLIDER) + return "slider"; + if (code == QuestionnaireItemControl.SPINNER) + return "spinner"; + if (code == QuestionnaireItemControl.TEXTBOX) + return "text-box"; + return "?"; + } + + public String toSystem(QuestionnaireItemControl code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireUsageMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireUsageMode.java new file mode 100644 index 00000000000..4ac5d43b7d2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireUsageMode.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum QuestionnaireUsageMode { + + /** + * Render the item regardless of usage mode + */ + CAPTUREDISPLAY, + /** + * Render the item only when capturing data + */ + CAPTURE, + /** + * Render the item only when displaying a completed form + */ + DISPLAY, + /** + * Render the item only when displaying a completed form and the item has been answered (or has child items that have been answered) + */ + DISPLAYNONEMPTY, + /** + * Render the item when capturing data or when displaying a completed form and the item has been answered (or has child items that have been answered) + */ + CAPTUREDISPLAYNONEMPTY, + /** + * added to help the parsers + */ + NULL; + public static QuestionnaireUsageMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("capture-display".equals(codeString)) + return CAPTUREDISPLAY; + if ("capture".equals(codeString)) + return CAPTURE; + if ("display".equals(codeString)) + return DISPLAY; + if ("display-non-empty".equals(codeString)) + return DISPLAYNONEMPTY; + if ("capture-display-non-empty".equals(codeString)) + return CAPTUREDISPLAYNONEMPTY; + throw new FHIRException("Unknown QuestionnaireUsageMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CAPTUREDISPLAY: return "capture-display"; + case CAPTURE: return "capture"; + case DISPLAY: return "display"; + case DISPLAYNONEMPTY: return "display-non-empty"; + case CAPTUREDISPLAYNONEMPTY: return "capture-display-non-empty"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/questionnaire-usage-mode"; + } + public String getDefinition() { + switch (this) { + case CAPTUREDISPLAY: return "Render the item regardless of usage mode"; + case CAPTURE: return "Render the item only when capturing data"; + case DISPLAY: return "Render the item only when displaying a completed form"; + case DISPLAYNONEMPTY: return "Render the item only when displaying a completed form and the item has been answered (or has child items that have been answered)"; + case CAPTUREDISPLAYNONEMPTY: return "Render the item when capturing data or when displaying a completed form and the item has been answered (or has child items that have been answered)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CAPTUREDISPLAY: return "Capture & Display"; + case CAPTURE: return "Capture Only"; + case DISPLAY: return "Display Only"; + case DISPLAYNONEMPTY: return "Display when Answered"; + case CAPTUREDISPLAYNONEMPTY: return "Capture or, if answered, Display"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireUsageModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireUsageModeEnumFactory.java new file mode 100644 index 00000000000..7da8eb53205 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/QuestionnaireUsageModeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class QuestionnaireUsageModeEnumFactory implements EnumFactory { + + public QuestionnaireUsageMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("capture-display".equals(codeString)) + return QuestionnaireUsageMode.CAPTUREDISPLAY; + if ("capture".equals(codeString)) + return QuestionnaireUsageMode.CAPTURE; + if ("display".equals(codeString)) + return QuestionnaireUsageMode.DISPLAY; + if ("display-non-empty".equals(codeString)) + return QuestionnaireUsageMode.DISPLAYNONEMPTY; + if ("capture-display-non-empty".equals(codeString)) + return QuestionnaireUsageMode.CAPTUREDISPLAYNONEMPTY; + throw new IllegalArgumentException("Unknown QuestionnaireUsageMode code '"+codeString+"'"); + } + + public String toCode(QuestionnaireUsageMode code) { + if (code == QuestionnaireUsageMode.CAPTUREDISPLAY) + return "capture-display"; + if (code == QuestionnaireUsageMode.CAPTURE) + return "capture"; + if (code == QuestionnaireUsageMode.DISPLAY) + return "display"; + if (code == QuestionnaireUsageMode.DISPLAYNONEMPTY) + return "display-non-empty"; + if (code == QuestionnaireUsageMode.CAPTUREDISPLAYNONEMPTY) + return "capture-display-non-empty"; + return "?"; + } + + public String toSystem(QuestionnaireUsageMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventCertainty.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventCertainty.java new file mode 100644 index 00000000000..bd3ec459c15 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventCertainty.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReactionEventCertainty { + + /** + * There is a low level of clinical certainty that the reaction was caused by the identified substance. + */ + UNLIKELY, + /** + * There is a high level of clinical certainty that the reaction was caused by the identified substance. + */ + LIKELY, + /** + * There is a very high level of clinical certainty that the reaction was due to the identified substance, which may include clinical evidence by testing or rechallenge. + */ + CONFIRMED, + /** + * The clinical certainty that the reaction was caused by the identified substance is unknown. It is an explicit assertion that certainty is not known. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static ReactionEventCertainty fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unlikely".equals(codeString)) + return UNLIKELY; + if ("likely".equals(codeString)) + return LIKELY; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown ReactionEventCertainty code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNLIKELY: return "unlikely"; + case LIKELY: return "likely"; + case CONFIRMED: return "confirmed"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reaction-event-certainty"; + } + public String getDefinition() { + switch (this) { + case UNLIKELY: return "There is a low level of clinical certainty that the reaction was caused by the identified substance."; + case LIKELY: return "There is a high level of clinical certainty that the reaction was caused by the identified substance."; + case CONFIRMED: return "There is a very high level of clinical certainty that the reaction was due to the identified substance, which may include clinical evidence by testing or rechallenge."; + case UNKNOWN: return "The clinical certainty that the reaction was caused by the identified substance is unknown. It is an explicit assertion that certainty is not known."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNLIKELY: return "Unlikely"; + case LIKELY: return "Likely"; + case CONFIRMED: return "Confirmed"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventCertaintyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventCertaintyEnumFactory.java new file mode 100644 index 00000000000..f0fcdc5bef4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventCertaintyEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReactionEventCertaintyEnumFactory implements EnumFactory { + + public ReactionEventCertainty fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unlikely".equals(codeString)) + return ReactionEventCertainty.UNLIKELY; + if ("likely".equals(codeString)) + return ReactionEventCertainty.LIKELY; + if ("confirmed".equals(codeString)) + return ReactionEventCertainty.CONFIRMED; + if ("unknown".equals(codeString)) + return ReactionEventCertainty.UNKNOWN; + throw new IllegalArgumentException("Unknown ReactionEventCertainty code '"+codeString+"'"); + } + + public String toCode(ReactionEventCertainty code) { + if (code == ReactionEventCertainty.UNLIKELY) + return "unlikely"; + if (code == ReactionEventCertainty.LIKELY) + return "likely"; + if (code == ReactionEventCertainty.CONFIRMED) + return "confirmed"; + if (code == ReactionEventCertainty.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(ReactionEventCertainty code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventSeverity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventSeverity.java new file mode 100644 index 00000000000..5d45040e986 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventSeverity.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReactionEventSeverity { + + /** + * Causes mild physiological effects. + */ + MILD, + /** + * Causes moderate physiological effects. + */ + MODERATE, + /** + * Causes severe physiological effects. + */ + SEVERE, + /** + * added to help the parsers + */ + NULL; + public static ReactionEventSeverity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("mild".equals(codeString)) + return MILD; + if ("moderate".equals(codeString)) + return MODERATE; + if ("severe".equals(codeString)) + return SEVERE; + throw new FHIRException("Unknown ReactionEventSeverity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MILD: return "mild"; + case MODERATE: return "moderate"; + case SEVERE: return "severe"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reaction-event-severity"; + } + public String getDefinition() { + switch (this) { + case MILD: return "Causes mild physiological effects."; + case MODERATE: return "Causes moderate physiological effects."; + case SEVERE: return "Causes severe physiological effects."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MILD: return "Mild"; + case MODERATE: return "Moderate"; + case SEVERE: return "Severe"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventSeverityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventSeverityEnumFactory.java new file mode 100644 index 00000000000..bcd40251711 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReactionEventSeverityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReactionEventSeverityEnumFactory implements EnumFactory { + + public ReactionEventSeverity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("mild".equals(codeString)) + return ReactionEventSeverity.MILD; + if ("moderate".equals(codeString)) + return ReactionEventSeverity.MODERATE; + if ("severe".equals(codeString)) + return ReactionEventSeverity.SEVERE; + throw new IllegalArgumentException("Unknown ReactionEventSeverity code '"+codeString+"'"); + } + + public String toCode(ReactionEventSeverity code) { + if (code == ReactionEventSeverity.MILD) + return "mild"; + if (code == ReactionEventSeverity.MODERATE) + return "moderate"; + if (code == ReactionEventSeverity.SEVERE) + return "severe"; + return "?"; + } + + public String toSystem(ReactionEventSeverity code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationGivenCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationGivenCodes.java new file mode 100644 index 00000000000..be9f9c3e9a3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationGivenCodes.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReasonMedicationGivenCodes { + + /** + * No reason known. + */ + A, + /** + * The administration was following an ordered protocol. + */ + B, + /** + * The administration was needed to treat an emergency. + */ + C, + /** + * added to help the parsers + */ + NULL; + public static ReasonMedicationGivenCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return A; + if ("b".equals(codeString)) + return B; + if ("c".equals(codeString)) + return C; + throw new FHIRException("Unknown ReasonMedicationGivenCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "a"; + case B: return "b"; + case C: return "c"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reason-medication-given"; + } + public String getDefinition() { + switch (this) { + case A: return "No reason known."; + case B: return "The administration was following an ordered protocol."; + case C: return "The administration was needed to treat an emergency."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "None"; + case B: return "Given as Ordered"; + case C: return "Emergency"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationGivenCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationGivenCodesEnumFactory.java new file mode 100644 index 00000000000..cc5c86eb7cf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationGivenCodesEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReasonMedicationGivenCodesEnumFactory implements EnumFactory { + + public ReasonMedicationGivenCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return ReasonMedicationGivenCodes.A; + if ("b".equals(codeString)) + return ReasonMedicationGivenCodes.B; + if ("c".equals(codeString)) + return ReasonMedicationGivenCodes.C; + throw new IllegalArgumentException("Unknown ReasonMedicationGivenCodes code '"+codeString+"'"); + } + + public String toCode(ReasonMedicationGivenCodes code) { + if (code == ReasonMedicationGivenCodes.A) + return "a"; + if (code == ReasonMedicationGivenCodes.B) + return "b"; + if (code == ReasonMedicationGivenCodes.C) + return "c"; + return "?"; + } + + public String toSystem(ReasonMedicationGivenCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationNotGivenCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationNotGivenCodes.java new file mode 100644 index 00000000000..5a07b57b72d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationNotGivenCodes.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReasonMedicationNotGivenCodes { + + /** + * No reason known. + */ + A, + /** + * The patient was not available when the dose was scheduled. + */ + B, + /** + * The patient was asleep when the dose was scheduled. + */ + C, + /** + * The patient was given the medication and immediately vomited it back. + */ + D, + /** + * added to help the parsers + */ + NULL; + public static ReasonMedicationNotGivenCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return A; + if ("b".equals(codeString)) + return B; + if ("c".equals(codeString)) + return C; + if ("d".equals(codeString)) + return D; + throw new FHIRException("Unknown ReasonMedicationNotGivenCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "a"; + case B: return "b"; + case C: return "c"; + case D: return "d"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reason-medication-not-given"; + } + public String getDefinition() { + switch (this) { + case A: return "No reason known."; + case B: return "The patient was not available when the dose was scheduled."; + case C: return "The patient was asleep when the dose was scheduled."; + case D: return "The patient was given the medication and immediately vomited it back."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "None"; + case B: return "Away"; + case C: return "Asleep"; + case D: return "Vomit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationNotGivenCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationNotGivenCodesEnumFactory.java new file mode 100644 index 00000000000..a4f475dcc0e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReasonMedicationNotGivenCodesEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReasonMedicationNotGivenCodesEnumFactory implements EnumFactory { + + public ReasonMedicationNotGivenCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("a".equals(codeString)) + return ReasonMedicationNotGivenCodes.A; + if ("b".equals(codeString)) + return ReasonMedicationNotGivenCodes.B; + if ("c".equals(codeString)) + return ReasonMedicationNotGivenCodes.C; + if ("d".equals(codeString)) + return ReasonMedicationNotGivenCodes.D; + throw new IllegalArgumentException("Unknown ReasonMedicationNotGivenCodes code '"+codeString+"'"); + } + + public String toCode(ReasonMedicationNotGivenCodes code) { + if (code == ReasonMedicationNotGivenCodes.A) + return "a"; + if (code == ReasonMedicationNotGivenCodes.B) + return "b"; + if (code == ReasonMedicationNotGivenCodes.C) + return "c"; + if (code == ReasonMedicationNotGivenCodes.D) + return "d"; + return "?"; + } + + public String toSystem(ReasonMedicationNotGivenCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceHandlingPolicy.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceHandlingPolicy.java new file mode 100644 index 00000000000..cb40f12abcb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceHandlingPolicy.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReferenceHandlingPolicy { + + /** + * The server supports and populates Literal references where they are known (this code does not guarantee that all references are literal; see 'enforced') + */ + LITERAL, + /** + * The server allows logical references + */ + LOGICAL, + /** + * The server will attempt to resolve logical references to literal references (if resolution fails, the server may still accept resources; see logical) + */ + RESOLVES, + /** + * The server enforces that references have integrity - e.g. it ensures that references can always be resolved. This is typically the case for clinical record systems, but often not the case for middleware/proxy systems + */ + ENFORCED, + /** + * The server does not support references that point to other servers + */ + LOCAL, + /** + * added to help the parsers + */ + NULL; + public static ReferenceHandlingPolicy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("literal".equals(codeString)) + return LITERAL; + if ("logical".equals(codeString)) + return LOGICAL; + if ("resolves".equals(codeString)) + return RESOLVES; + if ("enforced".equals(codeString)) + return ENFORCED; + if ("local".equals(codeString)) + return LOCAL; + throw new FHIRException("Unknown ReferenceHandlingPolicy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LITERAL: return "literal"; + case LOGICAL: return "logical"; + case RESOLVES: return "resolves"; + case ENFORCED: return "enforced"; + case LOCAL: return "local"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reference-handling-policy"; + } + public String getDefinition() { + switch (this) { + case LITERAL: return "The server supports and populates Literal references where they are known (this code does not guarantee that all references are literal; see 'enforced')"; + case LOGICAL: return "The server allows logical references"; + case RESOLVES: return "The server will attempt to resolve logical references to literal references (if resolution fails, the server may still accept resources; see logical)"; + case ENFORCED: return "The server enforces that references have integrity - e.g. it ensures that references can always be resolved. This is typically the case for clinical record systems, but often not the case for middleware/proxy systems"; + case LOCAL: return "The server does not support references that point to other servers"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LITERAL: return "Literal References"; + case LOGICAL: return "Logical References"; + case RESOLVES: return "Resolves References"; + case ENFORCED: return "Reference Integrity Enforced"; + case LOCAL: return "Local References Only"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceHandlingPolicyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceHandlingPolicyEnumFactory.java new file mode 100644 index 00000000000..2b5e89886c0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceHandlingPolicyEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReferenceHandlingPolicyEnumFactory implements EnumFactory { + + public ReferenceHandlingPolicy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("literal".equals(codeString)) + return ReferenceHandlingPolicy.LITERAL; + if ("logical".equals(codeString)) + return ReferenceHandlingPolicy.LOGICAL; + if ("resolves".equals(codeString)) + return ReferenceHandlingPolicy.RESOLVES; + if ("enforced".equals(codeString)) + return ReferenceHandlingPolicy.ENFORCED; + if ("local".equals(codeString)) + return ReferenceHandlingPolicy.LOCAL; + throw new IllegalArgumentException("Unknown ReferenceHandlingPolicy code '"+codeString+"'"); + } + + public String toCode(ReferenceHandlingPolicy code) { + if (code == ReferenceHandlingPolicy.LITERAL) + return "literal"; + if (code == ReferenceHandlingPolicy.LOGICAL) + return "logical"; + if (code == ReferenceHandlingPolicy.RESOLVES) + return "resolves"; + if (code == ReferenceHandlingPolicy.ENFORCED) + return "enforced"; + if (code == ReferenceHandlingPolicy.LOCAL) + return "local"; + return "?"; + } + + public String toSystem(ReferenceHandlingPolicy code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceVersionRules.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceVersionRules.java new file mode 100644 index 00000000000..fc6b3f8bae9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceVersionRules.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReferenceVersionRules { + + /** + * The reference may be either version independent or version specific + */ + EITHER, + /** + * The reference must be version independent + */ + INDEPENDENT, + /** + * The reference must be version specific + */ + SPECIFIC, + /** + * added to help the parsers + */ + NULL; + public static ReferenceVersionRules fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("either".equals(codeString)) + return EITHER; + if ("independent".equals(codeString)) + return INDEPENDENT; + if ("specific".equals(codeString)) + return SPECIFIC; + throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EITHER: return "either"; + case INDEPENDENT: return "independent"; + case SPECIFIC: return "specific"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/reference-version-rules"; + } + public String getDefinition() { + switch (this) { + case EITHER: return "The reference may be either version independent or version specific"; + case INDEPENDENT: return "The reference must be version independent"; + case SPECIFIC: return "The reference must be version specific"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EITHER: return "Either Specific or independent"; + case INDEPENDENT: return "Version independent"; + case SPECIFIC: return "Version Specific"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceVersionRulesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceVersionRulesEnumFactory.java new file mode 100644 index 00000000000..b9f02ffbc66 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferenceVersionRulesEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReferenceVersionRulesEnumFactory implements EnumFactory { + + public ReferenceVersionRules fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("either".equals(codeString)) + return ReferenceVersionRules.EITHER; + if ("independent".equals(codeString)) + return ReferenceVersionRules.INDEPENDENT; + if ("specific".equals(codeString)) + return ReferenceVersionRules.SPECIFIC; + throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'"); + } + + public String toCode(ReferenceVersionRules code) { + if (code == ReferenceVersionRules.EITHER) + return "either"; + if (code == ReferenceVersionRules.INDEPENDENT) + return "independent"; + if (code == ReferenceVersionRules.SPECIFIC) + return "specific"; + return "?"; + } + + public String toSystem(ReferenceVersionRules code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferencerangeMeaning.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferencerangeMeaning.java new file mode 100644 index 00000000000..c21d9c31ed3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferencerangeMeaning.java @@ -0,0 +1,186 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReferencerangeMeaning { + + /** + * General types of reference range. + */ + TYPE, + /** + * Based on 95th percentile for the relevant control population. + */ + NORMAL, + /** + * The range that is recommended by a relevant professional body. + */ + RECOMMENDED, + /** + * The range at which treatment would/should be considered. + */ + TREATMENT, + /** + * The optimal range for best therapeutic outcomes. + */ + THERAPEUTIC, + /** + * The optimal range for best therapeutic outcomes for a specimen taken immediately before administration. + */ + PRE, + /** + * The optimal range for best therapeutic outcomes for a specimen taken immediately after administration. + */ + POST, + /** + * Endocrine related states that change the expected value. + */ + ENDOCRINE, + /** + * An expected range in an individual prior to puberty. + */ + PREPUBERTY, + /** + * An expected range in an individual during the follicular stage of the cycle. + */ + FOLLICULAR, + /** + * An expected range in an individual during the follicular stage of the cycle. + */ + MIDCYCLE, + /** + * An expected range in an individual during the luteal stage of the cycle. + */ + LUTEAL, + /** + * An expected range in an individual post-menopause. + */ + POSTMEOPAUSAL, + /** + * added to help the parsers + */ + NULL; + public static ReferencerangeMeaning fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return TYPE; + if ("normal".equals(codeString)) + return NORMAL; + if ("recommended".equals(codeString)) + return RECOMMENDED; + if ("treatment".equals(codeString)) + return TREATMENT; + if ("therapeutic".equals(codeString)) + return THERAPEUTIC; + if ("pre".equals(codeString)) + return PRE; + if ("post".equals(codeString)) + return POST; + if ("endocrine".equals(codeString)) + return ENDOCRINE; + if ("pre-puberty".equals(codeString)) + return PREPUBERTY; + if ("follicular".equals(codeString)) + return FOLLICULAR; + if ("midcycle".equals(codeString)) + return MIDCYCLE; + if ("luteal".equals(codeString)) + return LUTEAL; + if ("postmeopausal".equals(codeString)) + return POSTMEOPAUSAL; + throw new FHIRException("Unknown ReferencerangeMeaning code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TYPE: return "type"; + case NORMAL: return "normal"; + case RECOMMENDED: return "recommended"; + case TREATMENT: return "treatment"; + case THERAPEUTIC: return "therapeutic"; + case PRE: return "pre"; + case POST: return "post"; + case ENDOCRINE: return "endocrine"; + case PREPUBERTY: return "pre-puberty"; + case FOLLICULAR: return "follicular"; + case MIDCYCLE: return "midcycle"; + case LUTEAL: return "luteal"; + case POSTMEOPAUSAL: return "postmeopausal"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/referencerange-meaning"; + } + public String getDefinition() { + switch (this) { + case TYPE: return "General types of reference range."; + case NORMAL: return "Based on 95th percentile for the relevant control population."; + case RECOMMENDED: return "The range that is recommended by a relevant professional body."; + case TREATMENT: return "The range at which treatment would/should be considered."; + case THERAPEUTIC: return "The optimal range for best therapeutic outcomes."; + case PRE: return "The optimal range for best therapeutic outcomes for a specimen taken immediately before administration."; + case POST: return "The optimal range for best therapeutic outcomes for a specimen taken immediately after administration."; + case ENDOCRINE: return "Endocrine related states that change the expected value."; + case PREPUBERTY: return "An expected range in an individual prior to puberty."; + case FOLLICULAR: return "An expected range in an individual during the follicular stage of the cycle."; + case MIDCYCLE: return "An expected range in an individual during the follicular stage of the cycle."; + case LUTEAL: return "An expected range in an individual during the luteal stage of the cycle."; + case POSTMEOPAUSAL: return "An expected range in an individual post-menopause."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TYPE: return "Type"; + case NORMAL: return "Normal Range"; + case RECOMMENDED: return "Recommended Range"; + case TREATMENT: return "Treatment Range"; + case THERAPEUTIC: return "Therapeutic Desired Level"; + case PRE: return "Pre Therapeutic Desired Level"; + case POST: return "Post Therapeutic Desired Level"; + case ENDOCRINE: return "Endocrine"; + case PREPUBERTY: return "Pre-Puberty"; + case FOLLICULAR: return "Follicular Stage"; + case MIDCYCLE: return "MidCycle"; + case LUTEAL: return "Luteal"; + case POSTMEOPAUSAL: return "Post-Menopause"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferencerangeMeaningEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferencerangeMeaningEnumFactory.java new file mode 100644 index 00000000000..eb282968381 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReferencerangeMeaningEnumFactory.java @@ -0,0 +1,106 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReferencerangeMeaningEnumFactory implements EnumFactory { + + public ReferencerangeMeaning fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return ReferencerangeMeaning.TYPE; + if ("normal".equals(codeString)) + return ReferencerangeMeaning.NORMAL; + if ("recommended".equals(codeString)) + return ReferencerangeMeaning.RECOMMENDED; + if ("treatment".equals(codeString)) + return ReferencerangeMeaning.TREATMENT; + if ("therapeutic".equals(codeString)) + return ReferencerangeMeaning.THERAPEUTIC; + if ("pre".equals(codeString)) + return ReferencerangeMeaning.PRE; + if ("post".equals(codeString)) + return ReferencerangeMeaning.POST; + if ("endocrine".equals(codeString)) + return ReferencerangeMeaning.ENDOCRINE; + if ("pre-puberty".equals(codeString)) + return ReferencerangeMeaning.PREPUBERTY; + if ("follicular".equals(codeString)) + return ReferencerangeMeaning.FOLLICULAR; + if ("midcycle".equals(codeString)) + return ReferencerangeMeaning.MIDCYCLE; + if ("luteal".equals(codeString)) + return ReferencerangeMeaning.LUTEAL; + if ("postmeopausal".equals(codeString)) + return ReferencerangeMeaning.POSTMEOPAUSAL; + throw new IllegalArgumentException("Unknown ReferencerangeMeaning code '"+codeString+"'"); + } + + public String toCode(ReferencerangeMeaning code) { + if (code == ReferencerangeMeaning.TYPE) + return "type"; + if (code == ReferencerangeMeaning.NORMAL) + return "normal"; + if (code == ReferencerangeMeaning.RECOMMENDED) + return "recommended"; + if (code == ReferencerangeMeaning.TREATMENT) + return "treatment"; + if (code == ReferencerangeMeaning.THERAPEUTIC) + return "therapeutic"; + if (code == ReferencerangeMeaning.PRE) + return "pre"; + if (code == ReferencerangeMeaning.POST) + return "post"; + if (code == ReferencerangeMeaning.ENDOCRINE) + return "endocrine"; + if (code == ReferencerangeMeaning.PREPUBERTY) + return "pre-puberty"; + if (code == ReferencerangeMeaning.FOLLICULAR) + return "follicular"; + if (code == ReferencerangeMeaning.MIDCYCLE) + return "midcycle"; + if (code == ReferencerangeMeaning.LUTEAL) + return "luteal"; + if (code == ReferencerangeMeaning.POSTMEOPAUSAL) + return "postmeopausal"; + return "?"; + } + + public String toSystem(ReferencerangeMeaning code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RejectionCriteria.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RejectionCriteria.java new file mode 100644 index 00000000000..9b529b244d2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RejectionCriteria.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RejectionCriteria { + + /** + * blood specimen hemolized + */ + HEMOLIZED, + /** + * insufficient quantity of specimen + */ + INSUFFICIENT, + /** + * specimen container broken + */ + BROKEN, + /** + * specimen clotted + */ + CLOTTED, + /** + * specimen temperature inappropriate + */ + WRONGTEMPERATURE, + /** + * added to help the parsers + */ + NULL; + public static RejectionCriteria fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hemolized".equals(codeString)) + return HEMOLIZED; + if ("insufficient".equals(codeString)) + return INSUFFICIENT; + if ("broken".equals(codeString)) + return BROKEN; + if ("clotted".equals(codeString)) + return CLOTTED; + if ("wrong-temperature".equals(codeString)) + return WRONGTEMPERATURE; + throw new FHIRException("Unknown RejectionCriteria code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HEMOLIZED: return "hemolized"; + case INSUFFICIENT: return "insufficient"; + case BROKEN: return "broken"; + case CLOTTED: return "clotted"; + case WRONGTEMPERATURE: return "wrong-temperature"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/rejection-criteria"; + } + public String getDefinition() { + switch (this) { + case HEMOLIZED: return "blood specimen hemolized"; + case INSUFFICIENT: return "insufficient quantity of specimen"; + case BROKEN: return "specimen container broken"; + case CLOTTED: return "specimen clotted"; + case WRONGTEMPERATURE: return "specimen temperature inappropriate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HEMOLIZED: return "specimen hemolized"; + case INSUFFICIENT: return "specimen volume insufficient"; + case BROKEN: return "broken specimen container"; + case CLOTTED: return "specimen clotted"; + case WRONGTEMPERATURE: return "specimen temperature inappropriate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RejectionCriteriaEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RejectionCriteriaEnumFactory.java new file mode 100644 index 00000000000..180ed2f809c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RejectionCriteriaEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RejectionCriteriaEnumFactory implements EnumFactory { + + public RejectionCriteria fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("hemolized".equals(codeString)) + return RejectionCriteria.HEMOLIZED; + if ("insufficient".equals(codeString)) + return RejectionCriteria.INSUFFICIENT; + if ("broken".equals(codeString)) + return RejectionCriteria.BROKEN; + if ("clotted".equals(codeString)) + return RejectionCriteria.CLOTTED; + if ("wrong-temperature".equals(codeString)) + return RejectionCriteria.WRONGTEMPERATURE; + throw new IllegalArgumentException("Unknown RejectionCriteria code '"+codeString+"'"); + } + + public String toCode(RejectionCriteria code) { + if (code == RejectionCriteria.HEMOLIZED) + return "hemolized"; + if (code == RejectionCriteria.INSUFFICIENT) + return "insufficient"; + if (code == RejectionCriteria.BROKEN) + return "broken"; + if (code == RejectionCriteria.CLOTTED) + return "clotted"; + if (code == RejectionCriteria.WRONGTEMPERATURE) + return "wrong-temperature"; + return "?"; + } + + public String toSystem(RejectionCriteria code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedArtifactType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedArtifactType.java new file mode 100644 index 00000000000..6b43db5bd4d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedArtifactType.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RelatedArtifactType { + + /** + * Additional documentation for the knowledge resource. This would include additional instructions on usage as well as additional information on clinical context or appropriateness + */ + DOCUMENTATION, + /** + * A summary of the justification for the knowledge resource including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the knowledge resource available to the consumer of interventions or results produced by the knowledge resource + */ + JUSTIFICATION, + /** + * Bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource + */ + CITATION, + /** + * The previous version of the knowledge resource + */ + PREDECESSOR, + /** + * The next version of the knowledge resource + */ + SUCCESSOR, + /** + * The knowledge resource is derived from the related artifact. This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting + */ + DERIVEDFROM, + /** + * The knowledge resource depends on the given related artifact + */ + DEPENDSON, + /** + * The knowledge resource is composed of the given related artifact + */ + COMPOSEDOF, + /** + * added to help the parsers + */ + NULL; + public static RelatedArtifactType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("documentation".equals(codeString)) + return DOCUMENTATION; + if ("justification".equals(codeString)) + return JUSTIFICATION; + if ("citation".equals(codeString)) + return CITATION; + if ("predecessor".equals(codeString)) + return PREDECESSOR; + if ("successor".equals(codeString)) + return SUCCESSOR; + if ("derived-from".equals(codeString)) + return DERIVEDFROM; + if ("depends-on".equals(codeString)) + return DEPENDSON; + if ("composed-of".equals(codeString)) + return COMPOSEDOF; + throw new FHIRException("Unknown RelatedArtifactType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DOCUMENTATION: return "documentation"; + case JUSTIFICATION: return "justification"; + case CITATION: return "citation"; + case PREDECESSOR: return "predecessor"; + case SUCCESSOR: return "successor"; + case DERIVEDFROM: return "derived-from"; + case DEPENDSON: return "depends-on"; + case COMPOSEDOF: return "composed-of"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/related-artifact-type"; + } + public String getDefinition() { + switch (this) { + case DOCUMENTATION: return "Additional documentation for the knowledge resource. This would include additional instructions on usage as well as additional information on clinical context or appropriateness"; + case JUSTIFICATION: return "A summary of the justification for the knowledge resource including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the knowledge resource available to the consumer of interventions or results produced by the knowledge resource"; + case CITATION: return "Bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource"; + case PREDECESSOR: return "The previous version of the knowledge resource"; + case SUCCESSOR: return "The next version of the knowledge resource"; + case DERIVEDFROM: return "The knowledge resource is derived from the related artifact. This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting"; + case DEPENDSON: return "The knowledge resource depends on the given related artifact"; + case COMPOSEDOF: return "The knowledge resource is composed of the given related artifact"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DOCUMENTATION: return "Documentation"; + case JUSTIFICATION: return "Justification"; + case CITATION: return "Citation"; + case PREDECESSOR: return "Predecessor"; + case SUCCESSOR: return "Successor"; + case DERIVEDFROM: return "Derived From"; + case DEPENDSON: return "Depends On"; + case COMPOSEDOF: return "Composed Of"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedArtifactTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedArtifactTypeEnumFactory.java new file mode 100644 index 00000000000..a1369591233 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedArtifactTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RelatedArtifactTypeEnumFactory implements EnumFactory { + + public RelatedArtifactType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("documentation".equals(codeString)) + return RelatedArtifactType.DOCUMENTATION; + if ("justification".equals(codeString)) + return RelatedArtifactType.JUSTIFICATION; + if ("citation".equals(codeString)) + return RelatedArtifactType.CITATION; + if ("predecessor".equals(codeString)) + return RelatedArtifactType.PREDECESSOR; + if ("successor".equals(codeString)) + return RelatedArtifactType.SUCCESSOR; + if ("derived-from".equals(codeString)) + return RelatedArtifactType.DERIVEDFROM; + if ("depends-on".equals(codeString)) + return RelatedArtifactType.DEPENDSON; + if ("composed-of".equals(codeString)) + return RelatedArtifactType.COMPOSEDOF; + throw new IllegalArgumentException("Unknown RelatedArtifactType code '"+codeString+"'"); + } + + public String toCode(RelatedArtifactType code) { + if (code == RelatedArtifactType.DOCUMENTATION) + return "documentation"; + if (code == RelatedArtifactType.JUSTIFICATION) + return "justification"; + if (code == RelatedArtifactType.CITATION) + return "citation"; + if (code == RelatedArtifactType.PREDECESSOR) + return "predecessor"; + if (code == RelatedArtifactType.SUCCESSOR) + return "successor"; + if (code == RelatedArtifactType.DERIVEDFROM) + return "derived-from"; + if (code == RelatedArtifactType.DEPENDSON) + return "depends-on"; + if (code == RelatedArtifactType.COMPOSEDOF) + return "composed-of"; + return "?"; + } + + public String toSystem(RelatedArtifactType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedClaimRelationship.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedClaimRelationship.java new file mode 100644 index 00000000000..f74a0055acf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedClaimRelationship.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RelatedClaimRelationship { + + /** + * A prior claim instance for the same intended suite of services. + */ + PRIOR, + /** + * A claim for a different suite of services which is related the suite claimed here. + */ + ASSOCIATED, + /** + * added to help the parsers + */ + NULL; + public static RelatedClaimRelationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("prior".equals(codeString)) + return PRIOR; + if ("associated".equals(codeString)) + return ASSOCIATED; + throw new FHIRException("Unknown RelatedClaimRelationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRIOR: return "prior"; + case ASSOCIATED: return "associated"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-relatedclaimrelationship"; + } + public String getDefinition() { + switch (this) { + case PRIOR: return "A prior claim instance for the same intended suite of services."; + case ASSOCIATED: return "A claim for a different suite of services which is related the suite claimed here."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRIOR: return "Prior Claim"; + case ASSOCIATED: return "Associated Claim"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedClaimRelationshipEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedClaimRelationshipEnumFactory.java new file mode 100644 index 00000000000..618459079c1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelatedClaimRelationshipEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RelatedClaimRelationshipEnumFactory implements EnumFactory { + + public RelatedClaimRelationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("prior".equals(codeString)) + return RelatedClaimRelationship.PRIOR; + if ("associated".equals(codeString)) + return RelatedClaimRelationship.ASSOCIATED; + throw new IllegalArgumentException("Unknown RelatedClaimRelationship code '"+codeString+"'"); + } + + public String toCode(RelatedClaimRelationship code) { + if (code == RelatedClaimRelationship.PRIOR) + return "prior"; + if (code == RelatedClaimRelationship.ASSOCIATED) + return "associated"; + return "?"; + } + + public String toSystem(RelatedClaimRelationship code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Relationship.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Relationship.java new file mode 100644 index 00000000000..0051ce77be8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Relationship.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Relationship { + + /** + * The patient is the subscriber (policy holder) + */ + _1, + /** + * The patient is the spouse or equivalent of the subscriber (policy holder) + */ + _2, + /** + * The patient is the child of the subscriber (policy holder) + */ + _3, + /** + * The patient is the common law spouse of the subscriber (policy holder) + */ + _4, + /** + * The patient has some other relationship, such as parent, to the subscriber (policy holder) + */ + _5, + /** + * added to help the parsers + */ + NULL; + public static Relationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + throw new FHIRException("Unknown Relationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/relationship"; + } + public String getDefinition() { + switch (this) { + case _1: return "The patient is the subscriber (policy holder)"; + case _2: return "The patient is the spouse or equivalent of the subscriber (policy holder)"; + case _3: return "The patient is the child of the subscriber (policy holder)"; + case _4: return "The patient is the common law spouse of the subscriber (policy holder)"; + case _5: return "The patient has some other relationship, such as parent, to the subscriber (policy holder)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Self"; + case _2: return "Spouse"; + case _3: return "Child"; + case _4: return "Common Law Spouse"; + case _5: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelationshipEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelationshipEnumFactory.java new file mode 100644 index 00000000000..5955bf7f295 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RelationshipEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RelationshipEnumFactory implements EnumFactory { + + public Relationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return Relationship._1; + if ("2".equals(codeString)) + return Relationship._2; + if ("3".equals(codeString)) + return Relationship._3; + if ("4".equals(codeString)) + return Relationship._4; + if ("5".equals(codeString)) + return Relationship._5; + throw new IllegalArgumentException("Unknown Relationship code '"+codeString+"'"); + } + + public String toCode(Relationship code) { + if (code == Relationship._1) + return "1"; + if (code == Relationship._2) + return "2"; + if (code == Relationship._3) + return "3"; + if (code == Relationship._4) + return "4"; + if (code == Relationship._5) + return "5"; + return "?"; + } + + public String toSystem(Relationship code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RemittanceOutcome.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RemittanceOutcome.java new file mode 100644 index 00000000000..e899a866f27 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RemittanceOutcome.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RemittanceOutcome { + + /** + * The processing has completed without errors + */ + COMPLETE, + /** + * One or more errors have been detected in the Claim + */ + ERROR, + /** + * No errors have been detected in the Claim and some of the adjudication has been performed. + */ + PARTIAL, + /** + * added to help the parsers + */ + NULL; + public static RemittanceOutcome fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("error".equals(codeString)) + return ERROR; + if ("partial".equals(codeString)) + return PARTIAL; + throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case ERROR: return "error"; + case PARTIAL: return "partial"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/remittance-outcome"; + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The processing has completed without errors"; + case ERROR: return "One or more errors have been detected in the Claim"; + case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Processing Complete"; + case ERROR: return "Error"; + case PARTIAL: return "Partial Processing"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RemittanceOutcomeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RemittanceOutcomeEnumFactory.java new file mode 100644 index 00000000000..4cb9c989f6f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RemittanceOutcomeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RemittanceOutcomeEnumFactory implements EnumFactory { + + public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return RemittanceOutcome.COMPLETE; + if ("error".equals(codeString)) + return RemittanceOutcome.ERROR; + if ("partial".equals(codeString)) + return RemittanceOutcome.PARTIAL; + throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'"); + } + + public String toCode(RemittanceOutcome code) { + if (code == RemittanceOutcome.COMPLETE) + return "complete"; + if (code == RemittanceOutcome.ERROR) + return "error"; + if (code == RemittanceOutcome.PARTIAL) + return "partial"; + return "?"; + } + + public String toSystem(RemittanceOutcome code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportActionResultCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportActionResultCodes.java new file mode 100644 index 00000000000..c1b6746c8bb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportActionResultCodes.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReportActionResultCodes { + + /** + * The action was successful. + */ + PASS, + /** + * The action was skipped. + */ + SKIP, + /** + * The action failed. + */ + FAIL, + /** + * The action passed but with warnings. + */ + WARNING, + /** + * The action encountered a fatal error and the engine was unable to process. + */ + ERROR, + /** + * added to help the parsers + */ + NULL; + public static ReportActionResultCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pass".equals(codeString)) + return PASS; + if ("skip".equals(codeString)) + return SKIP; + if ("fail".equals(codeString)) + return FAIL; + if ("warning".equals(codeString)) + return WARNING; + if ("error".equals(codeString)) + return ERROR; + throw new FHIRException("Unknown ReportActionResultCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PASS: return "pass"; + case SKIP: return "skip"; + case FAIL: return "fail"; + case WARNING: return "warning"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/report-action-result-codes"; + } + public String getDefinition() { + switch (this) { + case PASS: return "The action was successful."; + case SKIP: return "The action was skipped."; + case FAIL: return "The action failed."; + case WARNING: return "The action passed but with warnings."; + case ERROR: return "The action encountered a fatal error and the engine was unable to process."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PASS: return "Pass"; + case SKIP: return "Skip"; + case FAIL: return "Fail"; + case WARNING: return "Warning"; + case ERROR: return "Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportActionResultCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportActionResultCodesEnumFactory.java new file mode 100644 index 00000000000..88ae19f3d99 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportActionResultCodesEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReportActionResultCodesEnumFactory implements EnumFactory { + + public ReportActionResultCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pass".equals(codeString)) + return ReportActionResultCodes.PASS; + if ("skip".equals(codeString)) + return ReportActionResultCodes.SKIP; + if ("fail".equals(codeString)) + return ReportActionResultCodes.FAIL; + if ("warning".equals(codeString)) + return ReportActionResultCodes.WARNING; + if ("error".equals(codeString)) + return ReportActionResultCodes.ERROR; + throw new IllegalArgumentException("Unknown ReportActionResultCodes code '"+codeString+"'"); + } + + public String toCode(ReportActionResultCodes code) { + if (code == ReportActionResultCodes.PASS) + return "pass"; + if (code == ReportActionResultCodes.SKIP) + return "skip"; + if (code == ReportActionResultCodes.FAIL) + return "fail"; + if (code == ReportActionResultCodes.WARNING) + return "warning"; + if (code == ReportActionResultCodes.ERROR) + return "error"; + return "?"; + } + + public String toSystem(ReportActionResultCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportParticipantType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportParticipantType.java new file mode 100644 index 00000000000..c9eb13317b5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportParticipantType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReportParticipantType { + + /** + * The test execution engine. + */ + TESTENGINE, + /** + * A FHIR Client + */ + CLIENT, + /** + * A FHIR Server + */ + SERVER, + /** + * added to help the parsers + */ + NULL; + public static ReportParticipantType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("test-engine".equals(codeString)) + return TESTENGINE; + if ("client".equals(codeString)) + return CLIENT; + if ("server".equals(codeString)) + return SERVER; + throw new FHIRException("Unknown ReportParticipantType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TESTENGINE: return "test-engine"; + case CLIENT: return "client"; + case SERVER: return "server"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/report-participant-type"; + } + public String getDefinition() { + switch (this) { + case TESTENGINE: return "The test execution engine."; + case CLIENT: return "A FHIR Client"; + case SERVER: return "A FHIR Server"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TESTENGINE: return "Test Engine"; + case CLIENT: return "Client"; + case SERVER: return "Server"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportParticipantTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportParticipantTypeEnumFactory.java new file mode 100644 index 00000000000..219d8261f13 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportParticipantTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReportParticipantTypeEnumFactory implements EnumFactory { + + public ReportParticipantType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("test-engine".equals(codeString)) + return ReportParticipantType.TESTENGINE; + if ("client".equals(codeString)) + return ReportParticipantType.CLIENT; + if ("server".equals(codeString)) + return ReportParticipantType.SERVER; + throw new IllegalArgumentException("Unknown ReportParticipantType code '"+codeString+"'"); + } + + public String toCode(ReportParticipantType code) { + if (code == ReportParticipantType.TESTENGINE) + return "test-engine"; + if (code == ReportParticipantType.CLIENT) + return "client"; + if (code == ReportParticipantType.SERVER) + return "server"; + return "?"; + } + + public String toSystem(ReportParticipantType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportResultCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportResultCodes.java new file mode 100644 index 00000000000..9e6f6d65c11 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportResultCodes.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReportResultCodes { + + /** + * All test operations successfully passed all asserts + */ + PASS, + /** + * One or more test operations failed one or more asserts + */ + FAIL, + /** + * One or more test operations is pending execution completion + */ + PENDING, + /** + * added to help the parsers + */ + NULL; + public static ReportResultCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pass".equals(codeString)) + return PASS; + if ("fail".equals(codeString)) + return FAIL; + if ("pending".equals(codeString)) + return PENDING; + throw new FHIRException("Unknown ReportResultCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PASS: return "pass"; + case FAIL: return "fail"; + case PENDING: return "pending"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/report-result-codes"; + } + public String getDefinition() { + switch (this) { + case PASS: return "All test operations successfully passed all asserts"; + case FAIL: return "One or more test operations failed one or more asserts"; + case PENDING: return "One or more test operations is pending execution completion"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PASS: return "Pass"; + case FAIL: return "Fail"; + case PENDING: return "Pending"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportResultCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportResultCodesEnumFactory.java new file mode 100644 index 00000000000..1247b9a5966 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportResultCodesEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReportResultCodesEnumFactory implements EnumFactory { + + public ReportResultCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("pass".equals(codeString)) + return ReportResultCodes.PASS; + if ("fail".equals(codeString)) + return ReportResultCodes.FAIL; + if ("pending".equals(codeString)) + return ReportResultCodes.PENDING; + throw new IllegalArgumentException("Unknown ReportResultCodes code '"+codeString+"'"); + } + + public String toCode(ReportResultCodes code) { + if (code == ReportResultCodes.PASS) + return "pass"; + if (code == ReportResultCodes.FAIL) + return "fail"; + if (code == ReportResultCodes.PENDING) + return "pending"; + return "?"; + } + + public String toSystem(ReportResultCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportStatusCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportStatusCodes.java new file mode 100644 index 00000000000..89f7607b5e4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportStatusCodes.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ReportStatusCodes { + + /** + * All test operations have completed + */ + COMPLETED, + /** + * A test operations is currently executing + */ + INPROGRESS, + /** + * A test operation is waiting for an external client request + */ + WAITING, + /** + * The test script execution was manually stopped + */ + STOPPED, + /** + * This test report was entered or created in error + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ReportStatusCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("completed".equals(codeString)) + return COMPLETED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("waiting".equals(codeString)) + return WAITING; + if ("stopped".equals(codeString)) + return STOPPED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ReportStatusCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETED: return "completed"; + case INPROGRESS: return "in-progress"; + case WAITING: return "waiting"; + case STOPPED: return "stopped"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/report-status-codes"; + } + public String getDefinition() { + switch (this) { + case COMPLETED: return "All test operations have completed"; + case INPROGRESS: return "A test operations is currently executing"; + case WAITING: return "A test operation is waiting for an external client request"; + case STOPPED: return "The test script execution was manually stopped"; + case ENTEREDINERROR: return "This test report was entered or created in error"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETED: return "Completed"; + case INPROGRESS: return "In Progress"; + case WAITING: return "Waiting"; + case STOPPED: return "Stopped"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportStatusCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportStatusCodesEnumFactory.java new file mode 100644 index 00000000000..190f298afc0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ReportStatusCodesEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ReportStatusCodesEnumFactory implements EnumFactory { + + public ReportStatusCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("completed".equals(codeString)) + return ReportStatusCodes.COMPLETED; + if ("in-progress".equals(codeString)) + return ReportStatusCodes.INPROGRESS; + if ("waiting".equals(codeString)) + return ReportStatusCodes.WAITING; + if ("stopped".equals(codeString)) + return ReportStatusCodes.STOPPED; + if ("entered-in-error".equals(codeString)) + return ReportStatusCodes.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ReportStatusCodes code '"+codeString+"'"); + } + + public String toCode(ReportStatusCodes code) { + if (code == ReportStatusCodes.COMPLETED) + return "completed"; + if (code == ReportStatusCodes.INPROGRESS) + return "in-progress"; + if (code == ReportStatusCodes.WAITING) + return "waiting"; + if (code == ReportStatusCodes.STOPPED) + return "stopped"; + if (code == ReportStatusCodes.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(ReportStatusCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RepositoryType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RepositoryType.java new file mode 100644 index 00000000000..d3b21cab1cd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RepositoryType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RepositoryType { + + /** + * When URL is clicked, the resource can be seen directly (by webpage or by download link format) + */ + DIRECTLINK, + /** + * When the API method (e.g. [base_url]/[parameter]) related with the URL of the website is executed, the resource can be seen directly (usually in JSON or XML format) + */ + OPENAPI, + /** + * When logged into the website, the resource can be seen. + */ + LOGIN, + /** + * When logged in and follow the API in the website related with URL, the resource can be seen. + */ + OAUTH, + /** + * Some other complicated or particular way to get resource from URL. + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static RepositoryType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("directlink".equals(codeString)) + return DIRECTLINK; + if ("openapi".equals(codeString)) + return OPENAPI; + if ("login".equals(codeString)) + return LOGIN; + if ("oauth".equals(codeString)) + return OAUTH; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown RepositoryType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DIRECTLINK: return "directlink"; + case OPENAPI: return "openapi"; + case LOGIN: return "login"; + case OAUTH: return "oauth"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/repository-type"; + } + public String getDefinition() { + switch (this) { + case DIRECTLINK: return "When URL is clicked, the resource can be seen directly (by webpage or by download link format)"; + case OPENAPI: return "When the API method (e.g. [base_url]/[parameter]) related with the URL of the website is executed, the resource can be seen directly (usually in JSON or XML format)"; + case LOGIN: return "When logged into the website, the resource can be seen."; + case OAUTH: return "When logged in and follow the API in the website related with URL, the resource can be seen."; + case OTHER: return "Some other complicated or particular way to get resource from URL."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DIRECTLINK: return "Click and see"; + case OPENAPI: return "The URL is the RESTful or other kind of API that can access to the result."; + case LOGIN: return "Result cannot be access unless an account is logged in"; + case OAUTH: return "Result need to be fetched with API and need LOGIN( or cookies are required when visiting the link of resource)"; + case OTHER: return "Some other complicated or particular way to get resource from URL."; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RepositoryTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RepositoryTypeEnumFactory.java new file mode 100644 index 00000000000..f0c676855e9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RepositoryTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RepositoryTypeEnumFactory implements EnumFactory { + + public RepositoryType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("directlink".equals(codeString)) + return RepositoryType.DIRECTLINK; + if ("openapi".equals(codeString)) + return RepositoryType.OPENAPI; + if ("login".equals(codeString)) + return RepositoryType.LOGIN; + if ("oauth".equals(codeString)) + return RepositoryType.OAUTH; + if ("other".equals(codeString)) + return RepositoryType.OTHER; + throw new IllegalArgumentException("Unknown RepositoryType code '"+codeString+"'"); + } + + public String toCode(RepositoryType code) { + if (code == RepositoryType.DIRECTLINK) + return "directlink"; + if (code == RepositoryType.OPENAPI) + return "openapi"; + if (code == RepositoryType.LOGIN) + return "login"; + if (code == RepositoryType.OAUTH) + return "oauth"; + if (code == RepositoryType.OTHER) + return "other"; + return "?"; + } + + public String toSystem(RepositoryType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestIntent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestIntent.java new file mode 100644 index 00000000000..67688a847b5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestIntent.java @@ -0,0 +1,143 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RequestIntent { + + /** + * The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act + */ + PROPOSAL, + /** + * The request represents an intension to ensure something occurs without providing an authorization for others to act + */ + PLAN, + /** + * The request represents a request/demand and authorization for action + */ + ORDER, + /** + * The request represents an original authorization for action + */ + ORIGINALORDER, + /** + * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization + */ + REFLEXORDER, + /** + * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order + */ + FILLERORDER, + /** + * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug. + */ + INSTANCEORDER, + /** + * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. + +Refer to [[[RequestGroup]]] for additional information on how this status is used + */ + OPTION, + /** + * added to help the parsers + */ + NULL; + public static RequestIntent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return PROPOSAL; + if ("plan".equals(codeString)) + return PLAN; + if ("order".equals(codeString)) + return ORDER; + if ("original-order".equals(codeString)) + return ORIGINALORDER; + if ("reflex-order".equals(codeString)) + return REFLEXORDER; + if ("filler-order".equals(codeString)) + return FILLERORDER; + if ("instance-order".equals(codeString)) + return INSTANCEORDER; + if ("option".equals(codeString)) + return OPTION; + throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSAL: return "proposal"; + case PLAN: return "plan"; + case ORDER: return "order"; + case ORIGINALORDER: return "original-order"; + case REFLEXORDER: return "reflex-order"; + case FILLERORDER: return "filler-order"; + case INSTANCEORDER: return "instance-order"; + case OPTION: return "option"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/request-intent"; + } + public String getDefinition() { + switch (this) { + case PROPOSAL: return "The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act"; + case PLAN: return "The request represents an intension to ensure something occurs without providing an authorization for others to act"; + case ORDER: return "The request represents a request/demand and authorization for action"; + case ORIGINALORDER: return "The request represents an original authorization for action"; + case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization"; + case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order"; + case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug."; + case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.\n\nRefer to [[[RequestGroup]]] for additional information on how this status is used"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSAL: return "Proposal"; + case PLAN: return "Plan"; + case ORDER: return "Order"; + case ORIGINALORDER: return "Original Order"; + case REFLEXORDER: return "Reflex Order"; + case FILLERORDER: return "Filler Order"; + case INSTANCEORDER: return "Instance Order"; + case OPTION: return "Option"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestIntentEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestIntentEnumFactory.java new file mode 100644 index 00000000000..3f7e3dc2b0b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestIntentEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RequestIntentEnumFactory implements EnumFactory { + + public RequestIntent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return RequestIntent.PROPOSAL; + if ("plan".equals(codeString)) + return RequestIntent.PLAN; + if ("order".equals(codeString)) + return RequestIntent.ORDER; + if ("original-order".equals(codeString)) + return RequestIntent.ORIGINALORDER; + if ("reflex-order".equals(codeString)) + return RequestIntent.REFLEXORDER; + if ("filler-order".equals(codeString)) + return RequestIntent.FILLERORDER; + if ("instance-order".equals(codeString)) + return RequestIntent.INSTANCEORDER; + if ("option".equals(codeString)) + return RequestIntent.OPTION; + throw new IllegalArgumentException("Unknown RequestIntent code '"+codeString+"'"); + } + + public String toCode(RequestIntent code) { + if (code == RequestIntent.PROPOSAL) + return "proposal"; + if (code == RequestIntent.PLAN) + return "plan"; + if (code == RequestIntent.ORDER) + return "order"; + if (code == RequestIntent.ORIGINALORDER) + return "original-order"; + if (code == RequestIntent.REFLEXORDER) + return "reflex-order"; + if (code == RequestIntent.FILLERORDER) + return "filler-order"; + if (code == RequestIntent.INSTANCEORDER) + return "instance-order"; + if (code == RequestIntent.OPTION) + return "option"; + return "?"; + } + + public String toSystem(RequestIntent code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestPriority.java new file mode 100644 index 00000000000..60f2a3f3f3e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestPriority.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RequestPriority { + + /** + * The request has normal priority + */ + ROUTINE, + /** + * The request should be actioned promptly - higher priority than routine + */ + URGENT, + /** + * The request should be actioned as soon as possible - higher priority than urgent + */ + ASAP, + /** + * The request should be actioned immediately - highest possible priority. E.g. an emergency + */ + STAT, + /** + * added to help the parsers + */ + NULL; + public static RequestPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return ROUTINE; + if ("urgent".equals(codeString)) + return URGENT; + if ("asap".equals(codeString)) + return ASAP; + if ("stat".equals(codeString)) + return STAT; + throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROUTINE: return "routine"; + case URGENT: return "urgent"; + case ASAP: return "asap"; + case STAT: return "stat"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/request-priority"; + } + public String getDefinition() { + switch (this) { + case ROUTINE: return "The request has normal priority"; + case URGENT: return "The request should be actioned promptly - higher priority than routine"; + case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent"; + case STAT: return "The request should be actioned immediately - highest possible priority. E.g. an emergency"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROUTINE: return "Routine"; + case URGENT: return "Urgent"; + case ASAP: return "ASAP"; + case STAT: return "STAT"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestPriorityEnumFactory.java new file mode 100644 index 00000000000..272ed83657e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestPriorityEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RequestPriorityEnumFactory implements EnumFactory { + + public RequestPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("routine".equals(codeString)) + return RequestPriority.ROUTINE; + if ("urgent".equals(codeString)) + return RequestPriority.URGENT; + if ("asap".equals(codeString)) + return RequestPriority.ASAP; + if ("stat".equals(codeString)) + return RequestPriority.STAT; + throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'"); + } + + public String toCode(RequestPriority code) { + if (code == RequestPriority.ROUTINE) + return "routine"; + if (code == RequestPriority.URGENT) + return "urgent"; + if (code == RequestPriority.ASAP) + return "asap"; + if (code == RequestPriority.STAT) + return "stat"; + return "?"; + } + + public String toSystem(RequestPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestStatus.java new file mode 100644 index 00000000000..b8a4ef3ca6e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RequestStatus { + + /** + * The request has been created but is not yet complete or ready for action + */ + DRAFT, + /** + * The request is ready to be acted upon + */ + ACTIVE, + /** + * The authorization/request to act has been temporarily withdrawn but is expected to resume in the future + */ + SUSPENDED, + /** + * The authorization/request to act has been terminated prior to the full completion of the intended actions. No further activity should occur. + */ + CANCELLED, + /** + * Activity against the request has been sufficiently completed to the satisfaction of the requester + */ + COMPLETED, + /** + * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) + */ + ENTEREDINERROR, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" . One of the listed statuses is presumed to apply, but the system creating the request doesn't know. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static RequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/request-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The request has been created but is not yet complete or ready for action"; + case ACTIVE: return "The request is ready to be acted upon"; + case SUSPENDED: return "The authorization/request to act has been temporarily withdrawn but is expected to resume in the future"; + case CANCELLED: return "The authorization/request to act has been terminated prior to the full completion of the intended actions. No further activity should occur."; + case COMPLETED: return "Activity against the request has been sufficiently completed to the satisfaction of the requester"; + case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" . One of the listed statuses is presumed to apply, but the system creating the request doesn't know."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case CANCELLED: return "Cancelled"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestStatusEnumFactory.java new file mode 100644 index 00000000000..d8c1b7b5fb6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RequestStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RequestStatusEnumFactory implements EnumFactory { + + public RequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return RequestStatus.DRAFT; + if ("active".equals(codeString)) + return RequestStatus.ACTIVE; + if ("suspended".equals(codeString)) + return RequestStatus.SUSPENDED; + if ("cancelled".equals(codeString)) + return RequestStatus.CANCELLED; + if ("completed".equals(codeString)) + return RequestStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return RequestStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return RequestStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown RequestStatus code '"+codeString+"'"); + } + + public String toCode(RequestStatus code) { + if (code == RequestStatus.DRAFT) + return "draft"; + if (code == RequestStatus.ACTIVE) + return "active"; + if (code == RequestStatus.SUSPENDED) + return "suspended"; + if (code == RequestStatus.CANCELLED) + return "cancelled"; + if (code == RequestStatus.COMPLETED) + return "completed"; + if (code == RequestStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == RequestStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(RequestStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchStudyStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchStudyStatus.java new file mode 100644 index 00000000000..abd783ac399 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchStudyStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResearchStudyStatus { + + /** + * The study is undergoing design but the process of selecting study subjects and capturing data has not yet begun. + */ + DRAFT, + /** + * The study is currently being executed + */ + INPROGRESS, + /** + * Execution of the study has been temporarily paused + */ + SUSPENDED, + /** + * The study was terminated prior to the final determination of results + */ + STOPPED, + /** + * The information sought by the study has been gathered and compiled and no further work is being performed + */ + COMPLETED, + /** + * This study never actually existed. The record is retained for tracking purposes in the event decisions may have been made based on this erroneous information. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ResearchStudyStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("stopped".equals(codeString)) + return STOPPED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown ResearchStudyStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case INPROGRESS: return "in-progress"; + case SUSPENDED: return "suspended"; + case STOPPED: return "stopped"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/research-study-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The study is undergoing design but the process of selecting study subjects and capturing data has not yet begun."; + case INPROGRESS: return "The study is currently being executed"; + case SUSPENDED: return "Execution of the study has been temporarily paused"; + case STOPPED: return "The study was terminated prior to the final determination of results"; + case COMPLETED: return "The information sought by the study has been gathered and compiled and no further work is being performed"; + case ENTEREDINERROR: return "This study never actually existed. The record is retained for tracking purposes in the event decisions may have been made based on this erroneous information."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case INPROGRESS: return "In-progress"; + case SUSPENDED: return "Suspended"; + case STOPPED: return "Stopped"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchStudyStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchStudyStatusEnumFactory.java new file mode 100644 index 00000000000..0cde1844571 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchStudyStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResearchStudyStatusEnumFactory implements EnumFactory { + + public ResearchStudyStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ResearchStudyStatus.DRAFT; + if ("in-progress".equals(codeString)) + return ResearchStudyStatus.INPROGRESS; + if ("suspended".equals(codeString)) + return ResearchStudyStatus.SUSPENDED; + if ("stopped".equals(codeString)) + return ResearchStudyStatus.STOPPED; + if ("completed".equals(codeString)) + return ResearchStudyStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return ResearchStudyStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ResearchStudyStatus code '"+codeString+"'"); + } + + public String toCode(ResearchStudyStatus code) { + if (code == ResearchStudyStatus.DRAFT) + return "draft"; + if (code == ResearchStudyStatus.INPROGRESS) + return "in-progress"; + if (code == ResearchStudyStatus.SUSPENDED) + return "suspended"; + if (code == ResearchStudyStatus.STOPPED) + return "stopped"; + if (code == ResearchStudyStatus.COMPLETED) + return "completed"; + if (code == ResearchStudyStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(ResearchStudyStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchSubjectStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchSubjectStatus.java new file mode 100644 index 00000000000..82bbe6cd1c5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchSubjectStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResearchSubjectStatus { + + /** + * The subject has been identified as a potential participant in the study but has not yet agreed to participate + */ + CANDIDATE, + /** + * The subject has agreed to participate in the study but has not yet begun performing any action within the study + */ + ENROLLED, + /** + * The subject is currently being monitored and/or subject to treatment as part of the study + */ + ACTIVE, + /** + * The subject has temporarily discontinued monitoring/treatment as part of the study + */ + SUSPENDED, + /** + * The subject has permanently ended participation in the study prior to completion of the intended monitoring/treatment + */ + WITHDRAWN, + /** + * All intended monitoring/treatment of the subject has been completed and their engagement with the study is now ended + */ + COMPLETED, + /** + * added to help the parsers + */ + NULL; + public static ResearchSubjectStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("candidate".equals(codeString)) + return CANDIDATE; + if ("enrolled".equals(codeString)) + return ENROLLED; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("withdrawn".equals(codeString)) + return WITHDRAWN; + if ("completed".equals(codeString)) + return COMPLETED; + throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CANDIDATE: return "candidate"; + case ENROLLED: return "enrolled"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case WITHDRAWN: return "withdrawn"; + case COMPLETED: return "completed"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/research-subject-status"; + } + public String getDefinition() { + switch (this) { + case CANDIDATE: return "The subject has been identified as a potential participant in the study but has not yet agreed to participate"; + case ENROLLED: return "The subject has agreed to participate in the study but has not yet begun performing any action within the study"; + case ACTIVE: return "The subject is currently being monitored and/or subject to treatment as part of the study"; + case SUSPENDED: return "The subject has temporarily discontinued monitoring/treatment as part of the study"; + case WITHDRAWN: return "The subject has permanently ended participation in the study prior to completion of the intended monitoring/treatment"; + case COMPLETED: return "All intended monitoring/treatment of the subject has been completed and their engagement with the study is now ended"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CANDIDATE: return "Candidate"; + case ENROLLED: return "Enrolled"; + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case WITHDRAWN: return "Withdrawn"; + case COMPLETED: return "Completed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchSubjectStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchSubjectStatusEnumFactory.java new file mode 100644 index 00000000000..04fa2270bd7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResearchSubjectStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResearchSubjectStatusEnumFactory implements EnumFactory { + + public ResearchSubjectStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("candidate".equals(codeString)) + return ResearchSubjectStatus.CANDIDATE; + if ("enrolled".equals(codeString)) + return ResearchSubjectStatus.ENROLLED; + if ("active".equals(codeString)) + return ResearchSubjectStatus.ACTIVE; + if ("suspended".equals(codeString)) + return ResearchSubjectStatus.SUSPENDED; + if ("withdrawn".equals(codeString)) + return ResearchSubjectStatus.WITHDRAWN; + if ("completed".equals(codeString)) + return ResearchSubjectStatus.COMPLETED; + throw new IllegalArgumentException("Unknown ResearchSubjectStatus code '"+codeString+"'"); + } + + public String toCode(ResearchSubjectStatus code) { + if (code == ResearchSubjectStatus.CANDIDATE) + return "candidate"; + if (code == ResearchSubjectStatus.ENROLLED) + return "enrolled"; + if (code == ResearchSubjectStatus.ACTIVE) + return "active"; + if (code == ResearchSubjectStatus.SUSPENDED) + return "suspended"; + if (code == ResearchSubjectStatus.WITHDRAWN) + return "withdrawn"; + if (code == ResearchSubjectStatus.COMPLETED) + return "completed"; + return "?"; + } + + public String toSystem(ResearchSubjectStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceAggregationMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceAggregationMode.java new file mode 100644 index 00000000000..fb27cd03006 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceAggregationMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceAggregationMode { + + /** + * The reference is a local reference to a contained resource. + */ + CONTAINED, + /** + * The reference to a resource that has to be resolved externally to the resource that includes the reference. + */ + REFERENCED, + /** + * The resource the reference points to will be found in the same bundle as the resource that includes the reference. + */ + BUNDLED, + /** + * added to help the parsers + */ + NULL; + public static ResourceAggregationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("contained".equals(codeString)) + return CONTAINED; + if ("referenced".equals(codeString)) + return REFERENCED; + if ("bundled".equals(codeString)) + return BUNDLED; + throw new FHIRException("Unknown ResourceAggregationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CONTAINED: return "contained"; + case REFERENCED: return "referenced"; + case BUNDLED: return "bundled"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-aggregation-mode"; + } + public String getDefinition() { + switch (this) { + case CONTAINED: return "The reference is a local reference to a contained resource."; + case REFERENCED: return "The reference to a resource that has to be resolved externally to the resource that includes the reference."; + case BUNDLED: return "The resource the reference points to will be found in the same bundle as the resource that includes the reference."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CONTAINED: return "Contained"; + case REFERENCED: return "Referenced"; + case BUNDLED: return "Bundled"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceAggregationModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceAggregationModeEnumFactory.java new file mode 100644 index 00000000000..4e8673d11a4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceAggregationModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResourceAggregationModeEnumFactory implements EnumFactory { + + public ResourceAggregationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("contained".equals(codeString)) + return ResourceAggregationMode.CONTAINED; + if ("referenced".equals(codeString)) + return ResourceAggregationMode.REFERENCED; + if ("bundled".equals(codeString)) + return ResourceAggregationMode.BUNDLED; + throw new IllegalArgumentException("Unknown ResourceAggregationMode code '"+codeString+"'"); + } + + public String toCode(ResourceAggregationMode code) { + if (code == ResourceAggregationMode.CONTAINED) + return "contained"; + if (code == ResourceAggregationMode.REFERENCED) + return "referenced"; + if (code == ResourceAggregationMode.BUNDLED) + return "bundled"; + return "?"; + } + + public String toSystem(ResourceAggregationMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceSlicingRules.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceSlicingRules.java new file mode 100644 index 00000000000..7bd5c04fa42 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceSlicingRules.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceSlicingRules { + + /** + * No additional content is allowed other than that described by the slices in this profile. + */ + CLOSED, + /** + * Additional content is allowed anywhere in the list. + */ + OPEN, + /** + * Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required. + */ + OPENATEND, + /** + * added to help the parsers + */ + NULL; + public static ResourceSlicingRules fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("closed".equals(codeString)) + return CLOSED; + if ("open".equals(codeString)) + return OPEN; + if ("openAtEnd".equals(codeString)) + return OPENATEND; + throw new FHIRException("Unknown ResourceSlicingRules code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CLOSED: return "closed"; + case OPEN: return "open"; + case OPENATEND: return "openAtEnd"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-slicing-rules"; + } + public String getDefinition() { + switch (this) { + case CLOSED: return "No additional content is allowed other than that described by the slices in this profile."; + case OPEN: return "Additional content is allowed anywhere in the list."; + case OPENATEND: return "Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CLOSED: return "Closed"; + case OPEN: return "Open"; + case OPENATEND: return "Open at End"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceSlicingRulesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceSlicingRulesEnumFactory.java new file mode 100644 index 00000000000..e446709c32d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceSlicingRulesEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResourceSlicingRulesEnumFactory implements EnumFactory { + + public ResourceSlicingRules fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("closed".equals(codeString)) + return ResourceSlicingRules.CLOSED; + if ("open".equals(codeString)) + return ResourceSlicingRules.OPEN; + if ("openAtEnd".equals(codeString)) + return ResourceSlicingRules.OPENATEND; + throw new IllegalArgumentException("Unknown ResourceSlicingRules code '"+codeString+"'"); + } + + public String toCode(ResourceSlicingRules code) { + if (code == ResourceSlicingRules.CLOSED) + return "closed"; + if (code == ResourceSlicingRules.OPEN) + return "open"; + if (code == ResourceSlicingRules.OPENATEND) + return "openAtEnd"; + return "?"; + } + + public String toSystem(ResourceSlicingRules code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceStatus.java new file mode 100644 index 00000000000..fcb07744c5a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceStatus.java @@ -0,0 +1,348 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceStatus { + + /** + * The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record) + */ + ERROR, + /** + * The resource describes an action or plan that is proposed, and not yet approved by the participants + */ + PROPOSED, + /** + * The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future + */ + PLANNED, + /** + * The information in the resource is still being prepared and edited + */ + DRAFT, + /** + * A fulfiller has been asked to perform this action, but it has not yet occurred + */ + REQUESTED, + /** + * The fulfiller has received the request, but not yet agreed to carry out the action + */ + RECEIVED, + /** + * The fulfiller chose not to perform the action + */ + DECLINED, + /** + * The fulfiller has decided to perform the action, and plans are in train to do this in the future + */ + ACCEPTED, + /** + * The pre-conditions for the action are all fulfilled, and it is imminent + */ + ARRIVED, + /** + * The resource describes information that is currently valid or a process that is presently occuring + */ + ACTIVE, + /** + * The process described/requested in this resource has been halted for some reason + */ + SUSPENDED, + /** + * The process described/requested in the resource could not be completed, and no further action is planned + */ + FAILED, + /** + * The information in this resource has been replaced by information in another resource + */ + REPLACED, + /** + * The process described/requested in the resource has been completed, and no further action is planned + */ + COMPLETE, + /** + * The resource describes information that is no longer valid or a process that is stopped occurring + */ + INACTIVE, + /** + * The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned + */ + ABANDONED, + /** + * Authoring system does not know the status + */ + UNKNOWN, + /** + * The information in this resource is not yet approved + */ + UNCONFIRMED, + /** + * The information in this resource is approved + */ + CONFIRMED, + /** + * The issue identified by this resource is no longer of concern + */ + RESOLVED, + /** + * This information has been ruled out by testing and evaluation + */ + REFUTED, + /** + * Potentially true? + */ + DIFFERENTIAL, + /** + * This information is still being assembled + */ + PARTIAL, + /** + * not available at this time/location + */ + BUSYUNAVAILABLE, + /** + * Free for scheduling + */ + FREE, + /** + * Ready to act + */ + ONTARGET, + /** + * Ahead of the planned timelines + */ + AHEADOFTARGET, + /** + * + */ + BEHINDTARGET, + /** + * Behind the planned timelines + */ + NOTREADY, + /** + * The device transducer is diconnected + */ + TRANSDUCDISCON, + /** + * The hardware is diconnected + */ + HWDISCON, + /** + * added to help the parsers + */ + NULL; + public static ResourceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ERROR; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("planned".equals(codeString)) + return PLANNED; + if ("draft".equals(codeString)) + return DRAFT; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("declined".equals(codeString)) + return DECLINED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("failed".equals(codeString)) + return FAILED; + if ("replaced".equals(codeString)) + return REPLACED; + if ("complete".equals(codeString)) + return COMPLETE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("abandoned".equals(codeString)) + return ABANDONED; + if ("unknown".equals(codeString)) + return UNKNOWN; + if ("unconfirmed".equals(codeString)) + return UNCONFIRMED; + if ("confirmed".equals(codeString)) + return CONFIRMED; + if ("resolved".equals(codeString)) + return RESOLVED; + if ("refuted".equals(codeString)) + return REFUTED; + if ("differential".equals(codeString)) + return DIFFERENTIAL; + if ("partial".equals(codeString)) + return PARTIAL; + if ("busy-unavailable".equals(codeString)) + return BUSYUNAVAILABLE; + if ("free".equals(codeString)) + return FREE; + if ("on-target".equals(codeString)) + return ONTARGET; + if ("ahead-of-target".equals(codeString)) + return AHEADOFTARGET; + if ("behind-target".equals(codeString)) + return BEHINDTARGET; + if ("not-ready".equals(codeString)) + return NOTREADY; + if ("transduc-discon".equals(codeString)) + return TRANSDUCDISCON; + if ("hw-discon".equals(codeString)) + return HWDISCON; + throw new FHIRException("Unknown ResourceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ERROR: return "error"; + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case DECLINED: return "declined"; + case ACCEPTED: return "accepted"; + case ARRIVED: return "arrived"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case FAILED: return "failed"; + case REPLACED: return "replaced"; + case COMPLETE: return "complete"; + case INACTIVE: return "inactive"; + case ABANDONED: return "abandoned"; + case UNKNOWN: return "unknown"; + case UNCONFIRMED: return "unconfirmed"; + case CONFIRMED: return "confirmed"; + case RESOLVED: return "resolved"; + case REFUTED: return "refuted"; + case DIFFERENTIAL: return "differential"; + case PARTIAL: return "partial"; + case BUSYUNAVAILABLE: return "busy-unavailable"; + case FREE: return "free"; + case ONTARGET: return "on-target"; + case AHEADOFTARGET: return "ahead-of-target"; + case BEHINDTARGET: return "behind-target"; + case NOTREADY: return "not-ready"; + case TRANSDUCDISCON: return "transduc-discon"; + case HWDISCON: return "hw-discon"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-status"; + } + public String getDefinition() { + switch (this) { + case ERROR: return "The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record)"; + case PROPOSED: return "The resource describes an action or plan that is proposed, and not yet approved by the participants"; + case PLANNED: return "The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future"; + case DRAFT: return "The information in the resource is still being prepared and edited"; + case REQUESTED: return "A fulfiller has been asked to perform this action, but it has not yet occurred"; + case RECEIVED: return "The fulfiller has received the request, but not yet agreed to carry out the action"; + case DECLINED: return "The fulfiller chose not to perform the action"; + case ACCEPTED: return "The fulfiller has decided to perform the action, and plans are in train to do this in the future"; + case ARRIVED: return "The pre-conditions for the action are all fulfilled, and it is imminent"; + case ACTIVE: return "The resource describes information that is currently valid or a process that is presently occuring"; + case SUSPENDED: return "The process described/requested in this resource has been halted for some reason"; + case FAILED: return "The process described/requested in the resource could not be completed, and no further action is planned"; + case REPLACED: return "The information in this resource has been replaced by information in another resource"; + case COMPLETE: return "The process described/requested in the resource has been completed, and no further action is planned"; + case INACTIVE: return "The resource describes information that is no longer valid or a process that is stopped occurring"; + case ABANDONED: return "The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned"; + case UNKNOWN: return "Authoring system does not know the status"; + case UNCONFIRMED: return "The information in this resource is not yet approved"; + case CONFIRMED: return "The information in this resource is approved"; + case RESOLVED: return "The issue identified by this resource is no longer of concern"; + case REFUTED: return "This information has been ruled out by testing and evaluation"; + case DIFFERENTIAL: return "Potentially true?"; + case PARTIAL: return "This information is still being assembled"; + case BUSYUNAVAILABLE: return "not available at this time/location"; + case FREE: return "Free for scheduling"; + case ONTARGET: return "Ready to act"; + case AHEADOFTARGET: return "Ahead of the planned timelines"; + case BEHINDTARGET: return ""; + case NOTREADY: return "Behind the planned timelines"; + case TRANSDUCDISCON: return "The device transducer is diconnected"; + case HWDISCON: return "The hardware is diconnected"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ERROR: return "error"; + case PROPOSED: return "proposed"; + case PLANNED: return "planned"; + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case DECLINED: return "declined"; + case ACCEPTED: return "accepted"; + case ARRIVED: return "arrived"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case FAILED: return "failed"; + case REPLACED: return "replaced"; + case COMPLETE: return "complete"; + case INACTIVE: return "inactive"; + case ABANDONED: return "abandoned"; + case UNKNOWN: return "unknown"; + case UNCONFIRMED: return "unconfirmed"; + case CONFIRMED: return "confirmed"; + case RESOLVED: return "resolved"; + case REFUTED: return "refuted"; + case DIFFERENTIAL: return "differential"; + case PARTIAL: return "partial"; + case BUSYUNAVAILABLE: return "busy-unavailable"; + case FREE: return "free"; + case ONTARGET: return "on-target"; + case AHEADOFTARGET: return "ahead-of-target"; + case BEHINDTARGET: return "behind-target"; + case NOTREADY: return "not-ready"; + case TRANSDUCDISCON: return "transduc-discon"; + case HWDISCON: return "hw-discon"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceStatusEnumFactory.java new file mode 100644 index 00000000000..110043671b8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceStatusEnumFactory.java @@ -0,0 +1,178 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResourceStatusEnumFactory implements EnumFactory { + + public ResourceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("error".equals(codeString)) + return ResourceStatus.ERROR; + if ("proposed".equals(codeString)) + return ResourceStatus.PROPOSED; + if ("planned".equals(codeString)) + return ResourceStatus.PLANNED; + if ("draft".equals(codeString)) + return ResourceStatus.DRAFT; + if ("requested".equals(codeString)) + return ResourceStatus.REQUESTED; + if ("received".equals(codeString)) + return ResourceStatus.RECEIVED; + if ("declined".equals(codeString)) + return ResourceStatus.DECLINED; + if ("accepted".equals(codeString)) + return ResourceStatus.ACCEPTED; + if ("arrived".equals(codeString)) + return ResourceStatus.ARRIVED; + if ("active".equals(codeString)) + return ResourceStatus.ACTIVE; + if ("suspended".equals(codeString)) + return ResourceStatus.SUSPENDED; + if ("failed".equals(codeString)) + return ResourceStatus.FAILED; + if ("replaced".equals(codeString)) + return ResourceStatus.REPLACED; + if ("complete".equals(codeString)) + return ResourceStatus.COMPLETE; + if ("inactive".equals(codeString)) + return ResourceStatus.INACTIVE; + if ("abandoned".equals(codeString)) + return ResourceStatus.ABANDONED; + if ("unknown".equals(codeString)) + return ResourceStatus.UNKNOWN; + if ("unconfirmed".equals(codeString)) + return ResourceStatus.UNCONFIRMED; + if ("confirmed".equals(codeString)) + return ResourceStatus.CONFIRMED; + if ("resolved".equals(codeString)) + return ResourceStatus.RESOLVED; + if ("refuted".equals(codeString)) + return ResourceStatus.REFUTED; + if ("differential".equals(codeString)) + return ResourceStatus.DIFFERENTIAL; + if ("partial".equals(codeString)) + return ResourceStatus.PARTIAL; + if ("busy-unavailable".equals(codeString)) + return ResourceStatus.BUSYUNAVAILABLE; + if ("free".equals(codeString)) + return ResourceStatus.FREE; + if ("on-target".equals(codeString)) + return ResourceStatus.ONTARGET; + if ("ahead-of-target".equals(codeString)) + return ResourceStatus.AHEADOFTARGET; + if ("behind-target".equals(codeString)) + return ResourceStatus.BEHINDTARGET; + if ("not-ready".equals(codeString)) + return ResourceStatus.NOTREADY; + if ("transduc-discon".equals(codeString)) + return ResourceStatus.TRANSDUCDISCON; + if ("hw-discon".equals(codeString)) + return ResourceStatus.HWDISCON; + throw new IllegalArgumentException("Unknown ResourceStatus code '"+codeString+"'"); + } + + public String toCode(ResourceStatus code) { + if (code == ResourceStatus.ERROR) + return "error"; + if (code == ResourceStatus.PROPOSED) + return "proposed"; + if (code == ResourceStatus.PLANNED) + return "planned"; + if (code == ResourceStatus.DRAFT) + return "draft"; + if (code == ResourceStatus.REQUESTED) + return "requested"; + if (code == ResourceStatus.RECEIVED) + return "received"; + if (code == ResourceStatus.DECLINED) + return "declined"; + if (code == ResourceStatus.ACCEPTED) + return "accepted"; + if (code == ResourceStatus.ARRIVED) + return "arrived"; + if (code == ResourceStatus.ACTIVE) + return "active"; + if (code == ResourceStatus.SUSPENDED) + return "suspended"; + if (code == ResourceStatus.FAILED) + return "failed"; + if (code == ResourceStatus.REPLACED) + return "replaced"; + if (code == ResourceStatus.COMPLETE) + return "complete"; + if (code == ResourceStatus.INACTIVE) + return "inactive"; + if (code == ResourceStatus.ABANDONED) + return "abandoned"; + if (code == ResourceStatus.UNKNOWN) + return "unknown"; + if (code == ResourceStatus.UNCONFIRMED) + return "unconfirmed"; + if (code == ResourceStatus.CONFIRMED) + return "confirmed"; + if (code == ResourceStatus.RESOLVED) + return "resolved"; + if (code == ResourceStatus.REFUTED) + return "refuted"; + if (code == ResourceStatus.DIFFERENTIAL) + return "differential"; + if (code == ResourceStatus.PARTIAL) + return "partial"; + if (code == ResourceStatus.BUSYUNAVAILABLE) + return "busy-unavailable"; + if (code == ResourceStatus.FREE) + return "free"; + if (code == ResourceStatus.ONTARGET) + return "on-target"; + if (code == ResourceStatus.AHEADOFTARGET) + return "ahead-of-target"; + if (code == ResourceStatus.BEHINDTARGET) + return "behind-target"; + if (code == ResourceStatus.NOTREADY) + return "not-ready"; + if (code == ResourceStatus.TRANSDUCDISCON) + return "transduc-discon"; + if (code == ResourceStatus.HWDISCON) + return "hw-discon"; + return "?"; + } + + public String toSystem(ResourceStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypeLink.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypeLink.java new file mode 100644 index 00000000000..e9d13fae50b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypeLink.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceTypeLink { + + /** + * Organization resource + */ + ORGANIZATION, + /** + * Patient resource + */ + PATIENT, + /** + * Practitioner resource + */ + PRACTITIONER, + /** + * RelatedPerson resource + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static ResourceTypeLink fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("organization".equals(codeString)) + return ORGANIZATION; + if ("patient".equals(codeString)) + return PATIENT; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("relatedperson".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown ResourceTypeLink code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ORGANIZATION: return "organization"; + case PATIENT: return "patient"; + case PRACTITIONER: return "practitioner"; + case RELATEDPERSON: return "relatedperson"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-type-link"; + } + public String getDefinition() { + switch (this) { + case ORGANIZATION: return "Organization resource"; + case PATIENT: return "Patient resource"; + case PRACTITIONER: return "Practitioner resource"; + case RELATEDPERSON: return "RelatedPerson resource"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ORGANIZATION: return "Organization"; + case PATIENT: return "Patient"; + case PRACTITIONER: return "Practitioner"; + case RELATEDPERSON: return "RelatedPerson"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypeLinkEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypeLinkEnumFactory.java new file mode 100644 index 00000000000..52a566116b5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypeLinkEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResourceTypeLinkEnumFactory implements EnumFactory { + + public ResourceTypeLink fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("organization".equals(codeString)) + return ResourceTypeLink.ORGANIZATION; + if ("patient".equals(codeString)) + return ResourceTypeLink.PATIENT; + if ("practitioner".equals(codeString)) + return ResourceTypeLink.PRACTITIONER; + if ("relatedperson".equals(codeString)) + return ResourceTypeLink.RELATEDPERSON; + throw new IllegalArgumentException("Unknown ResourceTypeLink code '"+codeString+"'"); + } + + public String toCode(ResourceTypeLink code) { + if (code == ResourceTypeLink.ORGANIZATION) + return "organization"; + if (code == ResourceTypeLink.PATIENT) + return "patient"; + if (code == ResourceTypeLink.PRACTITIONER) + return "practitioner"; + if (code == ResourceTypeLink.RELATEDPERSON) + return "relatedperson"; + return "?"; + } + + public String toSystem(ResourceTypeLink code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypes.java new file mode 100644 index 00000000000..500a0ff57e3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypes.java @@ -0,0 +1,1158 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceTypes { + + /** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc. + */ + ACCOUNT, + /** + * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context. + */ + ACTIVITYDEFINITION, + /** + * Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death. + */ + ADVERSEEVENT, + /** + * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. + */ + ALLERGYINTOLERANCE, + /** + * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). + */ + APPOINTMENT, + /** + * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. + */ + APPOINTMENTRESPONSE, + /** + * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. + */ + AUDITEVENT, + /** + * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. + */ + BASIC, + /** + * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. + */ + BINARY, + /** + * Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. + */ + BODYSTRUCTURE, + /** + * A container for a collection of resources. + */ + BUNDLE, + /** + * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. + */ + CAPABILITYSTATEMENT, + /** + * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. + */ + CAREPLAN, + /** + * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. + */ + CARETEAM, + /** + * Catalog entries are wrappers that contextualize items included in a catalog. + */ + CATALOGENTRY, + /** + * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. + */ + CHARGEITEM, + /** + * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. + */ + CLAIM, + /** + * This resource provides the adjudication details from the processing of a Claim resource. + */ + CLAIMRESPONSE, + /** + * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. + */ + CLINICALIMPRESSION, + /** + * A code system resource specifies a set of codes drawn from one or more code systems. + */ + CODESYSTEM, + /** + * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. + */ + COMMUNICATION, + /** + * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. + */ + COMMUNICATIONREQUEST, + /** + * A compartment definition that defines how resources are accessed on a server. + */ + COMPARTMENTDEFINITION, + /** + * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. + */ + COMPOSITION, + /** + * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. + */ + CONCEPTMAP, + /** + * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. + */ + CONDITION, + /** + * A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. + */ + CONSENT, + /** + * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. + */ + CONTRACT, + /** + * Financial instrument which may be used to reimburse or pay for health care products and services. + */ + COVERAGE, + /** + * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. + */ + DETECTEDISSUE, + /** + * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + */ + DEVICE, + /** + * The characteristics, operational status and capabilities of a medical-related component of a medical device. + */ + DEVICECOMPONENT, + /** + * Describes a measurement, calculation or setting capability of a medical device. + */ + DEVICEMETRIC, + /** + * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. + */ + DEVICEREQUEST, + /** + * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. + */ + DEVICEUSESTATEMENT, + /** + * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. + */ + DIAGNOSTICREPORT, + /** + * A collection of documents compiled for a purpose together with metadata that applies to the collection. + */ + DOCUMENTMANIFEST, + /** + * A reference to a document. + */ + DOCUMENTREFERENCE, + /** + * A resource that includes narrative, extensions, and contained resources. + */ + DOMAINRESOURCE, + /** + * The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy. + */ + ELIGIBILITYREQUEST, + /** + * This resource provides eligibility and plan details from the processing of an Eligibility resource. + */ + ELIGIBILITYRESPONSE, + /** + * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. + */ + ENCOUNTER, + /** + * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information. + */ + ENDPOINT, + /** + * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. + */ + ENROLLMENTREQUEST, + /** + * This resource provides enrollment and plan details from the processing of an Enrollment resource. + */ + ENROLLMENTRESPONSE, + /** + * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. + */ + EPISODEOFCARE, + /** + * The EventDefinition resource provides a reusable description of when a particular event can occur. + */ + EVENTDEFINITION, + /** + * Example of workflow instance. + */ + EXAMPLESCENARIO, + /** + * Resource to define constraints on the Expansion of a FHIR ValueSet. + */ + EXPANSIONPROFILE, + /** + * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. + */ + EXPLANATIONOFBENEFIT, + /** + * Significant health conditions for a person related to the patient relevant in the context of care for the patient. + */ + FAMILYMEMBERHISTORY, + /** + * Prospective warnings of potential issues when providing care to the patient. + */ + FLAG, + /** + * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. + */ + GOAL, + /** + * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set. + */ + GRAPHDEFINITION, + /** + * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. + */ + GROUP, + /** + * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. + */ + GUIDANCERESPONSE, + /** + * The details of a healthcare service available at a location. + */ + HEALTHCARESERVICE, + /** + * A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection. + */ + IMAGINGMANIFEST, + /** + * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. + */ + IMAGINGSTUDY, + /** + * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. + */ + IMMUNIZATION, + /** + * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. + */ + IMMUNIZATIONRECOMMENDATION, + /** + * A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts. + */ + IMPLEMENTATIONGUIDE, + /** + * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets. + */ + LIBRARY, + /** + * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence". + */ + LINKAGE, + /** + * A set of information summarized from a list of other resources. + */ + LIST, + /** + * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. + */ + LOCATION, + /** + * The Measure resource provides the definition of a quality measure. + */ + MEASURE, + /** + * The MeasureReport resource contains the results of evaluating a measure. + */ + MEASUREREPORT, + /** + * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. + */ + MEDIA, + /** + * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. + */ + MEDICATION, + /** + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + */ + MEDICATIONADMINISTRATION, + /** + * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. + */ + MEDICATIONDISPENSE, + /** + * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns. + */ + MEDICATIONREQUEST, + /** + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + */ + MEDICATIONSTATEMENT, + /** + * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted. + */ + MESSAGEDEFINITION, + /** + * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. + */ + MESSAGEHEADER, + /** + * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. + */ + NAMINGSYSTEM, + /** + * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. + */ + NUTRITIONORDER, + /** + * Measurements and simple assertions made about a patient, device or other subject. + */ + OBSERVATION, + /** + * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). + */ + OPERATIONDEFINITION, + /** + * A collection of error, warning or information messages that result from a system action. + */ + OPERATIONOUTCOME, + /** + * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. + */ + ORGANIZATION, + /** + * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. + */ + PARAMETERS, + /** + * Demographics and other administrative information about an individual or animal receiving care or other health-related services. + */ + PATIENT, + /** + * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. + */ + PAYMENTNOTICE, + /** + * This resource provides payment details and claim references supporting a bulk payment. + */ + PAYMENTRECONCILIATION, + /** + * Demographics and administrative information about a person independent of a specific health-related context. + */ + PERSON, + /** + * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. + */ + PLANDEFINITION, + /** + * A person who is directly or indirectly involved in the provisioning of healthcare. + */ + PRACTITIONER, + /** + * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. + */ + PRACTITIONERROLE, + /** + * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. + */ + PROCEDURE, + /** + * A record of a request for diagnostic investigations, treatments, or operations to be performed. + */ + PROCEDUREREQUEST, + /** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ + PROCESSREQUEST, + /** + * This resource provides processing status, errors and notes from the processing of a resource. + */ + PROCESSRESPONSE, + /** + * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. + */ + PROVENANCE, + /** + * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. + */ + QUESTIONNAIRE, + /** + * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to. + */ + QUESTIONNAIRERESPONSE, + /** + * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ + RELATEDPERSON, + /** + * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one". + */ + REQUESTGROUP, + /** + * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects. + */ + RESEARCHSTUDY, + /** + * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects. + */ + RESEARCHSUBJECT, + /** + * This is the base resource type for everything. + */ + RESOURCE, + /** + * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. + */ + RISKASSESSMENT, + /** + * A container for slots of time that may be available for booking appointments. + */ + SCHEDULE, + /** + * A search parameter that defines a named search item that can be used to search/filter on a resource. + */ + SEARCHPARAMETER, + /** + * Raw data describing a biological sequence. + */ + SEQUENCE, + /** + * The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking. + */ + SERVICEDEFINITION, + /** + * A slot of time on a schedule that may be available for booking appointments. + */ + SLOT, + /** + * A sample to be used for analysis. + */ + SPECIMEN, + /** + * A kind of specimen with associated set of requirements. + */ + SPECIMENDEFINITION, + /** + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. + */ + STRUCTUREDEFINITION, + /** + * A Map of relationships between 2 structures that can be used to transform data. + */ + STRUCTUREMAP, + /** + * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. + */ + SUBSCRIPTION, + /** + * A homogeneous material with a definite composition. + */ + SUBSTANCE, + /** + * Record of delivery of what is supplied. + */ + SUPPLYDELIVERY, + /** + * A record of a request for a medication, substance or device used in the healthcare setting. + */ + SUPPLYREQUEST, + /** + * A task to be performed. + */ + TASK, + /** + * A summary of information based on the results of executing a TestScript. + */ + TESTREPORT, + /** + * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification. + */ + TESTSCRIPT, + /** + * A value set specifies a set of codes drawn from one or more code systems. + */ + VALUESET, + /** + * An authorization for the supply of glasses and/or contact lenses to a patient. + */ + VISIONPRESCRIPTION, + /** + * added to help the parsers + */ + NULL; + public static ResourceTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return ACCOUNT; + if ("ActivityDefinition".equals(codeString)) + return ACTIVITYDEFINITION; + if ("AdverseEvent".equals(codeString)) + return ADVERSEEVENT; + if ("AllergyIntolerance".equals(codeString)) + return ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return AUDITEVENT; + if ("Basic".equals(codeString)) + return BASIC; + if ("Binary".equals(codeString)) + return BINARY; + if ("BodyStructure".equals(codeString)) + return BODYSTRUCTURE; + if ("Bundle".equals(codeString)) + return BUNDLE; + if ("CapabilityStatement".equals(codeString)) + return CAPABILITYSTATEMENT; + if ("CarePlan".equals(codeString)) + return CAREPLAN; + if ("CareTeam".equals(codeString)) + return CARETEAM; + if ("CatalogEntry".equals(codeString)) + return CATALOGENTRY; + if ("ChargeItem".equals(codeString)) + return CHARGEITEM; + if ("Claim".equals(codeString)) + return CLAIM; + if ("ClaimResponse".equals(codeString)) + return CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return CLINICALIMPRESSION; + if ("CodeSystem".equals(codeString)) + return CODESYSTEM; + if ("Communication".equals(codeString)) + return COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return COMPARTMENTDEFINITION; + if ("Composition".equals(codeString)) + return COMPOSITION; + if ("ConceptMap".equals(codeString)) + return CONCEPTMAP; + if ("Condition".equals(codeString)) + return CONDITION; + if ("Consent".equals(codeString)) + return CONSENT; + if ("Contract".equals(codeString)) + return CONTRACT; + if ("Coverage".equals(codeString)) + return COVERAGE; + if ("DetectedIssue".equals(codeString)) + return DETECTEDISSUE; + if ("Device".equals(codeString)) + return DEVICE; + if ("DeviceComponent".equals(codeString)) + return DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return DEVICEMETRIC; + if ("DeviceRequest".equals(codeString)) + return DEVICEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return DEVICEUSESTATEMENT; + if ("DiagnosticReport".equals(codeString)) + return DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("Endpoint".equals(codeString)) + return ENDPOINT; + if ("EnrollmentRequest".equals(codeString)) + return ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return EPISODEOFCARE; + if ("EventDefinition".equals(codeString)) + return EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return EXAMPLESCENARIO; + if ("ExpansionProfile".equals(codeString)) + return EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FLAG; + if ("Goal".equals(codeString)) + return GOAL; + if ("GraphDefinition".equals(codeString)) + return GRAPHDEFINITION; + if ("Group".equals(codeString)) + return GROUP; + if ("GuidanceResponse".equals(codeString)) + return GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return HEALTHCARESERVICE; + if ("ImagingManifest".equals(codeString)) + return IMAGINGMANIFEST; + if ("ImagingStudy".equals(codeString)) + return IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return LIBRARY; + if ("Linkage".equals(codeString)) + return LINKAGE; + if ("List".equals(codeString)) + return LIST; + if ("Location".equals(codeString)) + return LOCATION; + if ("Measure".equals(codeString)) + return MEASURE; + if ("MeasureReport".equals(codeString)) + return MEASUREREPORT; + if ("Media".equals(codeString)) + return MEDIA; + if ("Medication".equals(codeString)) + return MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return MEDICATIONDISPENSE; + if ("MedicationRequest".equals(codeString)) + return MEDICATIONREQUEST; + if ("MedicationStatement".equals(codeString)) + return MEDICATIONSTATEMENT; + if ("MessageDefinition".equals(codeString)) + return MESSAGEDEFINITION; + if ("MessageHeader".equals(codeString)) + return MESSAGEHEADER; + if ("NamingSystem".equals(codeString)) + return NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return NUTRITIONORDER; + if ("Observation".equals(codeString)) + return OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return OPERATIONOUTCOME; + if ("Organization".equals(codeString)) + return ORGANIZATION; + if ("Parameters".equals(codeString)) + return PARAMETERS; + if ("Patient".equals(codeString)) + return PATIENT; + if ("PaymentNotice".equals(codeString)) + return PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return PERSON; + if ("PlanDefinition".equals(codeString)) + return PLANDEFINITION; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return PRACTITIONERROLE; + if ("Procedure".equals(codeString)) + return PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return PROVENANCE; + if ("Questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return QUESTIONNAIRERESPONSE; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("RequestGroup".equals(codeString)) + return REQUESTGROUP; + if ("ResearchStudy".equals(codeString)) + return RESEARCHSTUDY; + if ("ResearchSubject".equals(codeString)) + return RESEARCHSUBJECT; + if ("Resource".equals(codeString)) + return RESOURCE; + if ("RiskAssessment".equals(codeString)) + return RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return SCHEDULE; + if ("SearchParameter".equals(codeString)) + return SEARCHPARAMETER; + if ("Sequence".equals(codeString)) + return SEQUENCE; + if ("ServiceDefinition".equals(codeString)) + return SERVICEDEFINITION; + if ("Slot".equals(codeString)) + return SLOT; + if ("Specimen".equals(codeString)) + return SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return SPECIMENDEFINITION; + if ("StructureDefinition".equals(codeString)) + return STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return STRUCTUREMAP; + if ("Subscription".equals(codeString)) + return SUBSCRIPTION; + if ("Substance".equals(codeString)) + return SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return SUPPLYREQUEST; + if ("Task".equals(codeString)) + return TASK; + if ("TestReport".equals(codeString)) + return TESTREPORT; + if ("TestScript".equals(codeString)) + return TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return VALUESET; + if ("VisionPrescription".equals(codeString)) + return VISIONPRESCRIPTION; + throw new FHIRException("Unknown ResourceTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCOUNT: return "Account"; + case ACTIVITYDEFINITION: return "ActivityDefinition"; + case ADVERSEEVENT: return "AdverseEvent"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSTRUCTURE: return "BodyStructure"; + case BUNDLE: return "Bundle"; + case CAPABILITYSTATEMENT: return "CapabilityStatement"; + case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; + case CHARGEITEM: return "ChargeItem"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case CODESYSTEM: return "CodeSystem"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONSENT: return "Consent"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEREQUEST: return "DeviceRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENDPOINT: return "Endpoint"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GRAPHDEFINITION: return "GraphDefinition"; + case GROUP: return "Group"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGMANIFEST: return "ImagingManifest"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LINKAGE: return "Linkage"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONREQUEST: return "MedicationRequest"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEDEFINITION: return "MessageDefinition"; + case MESSAGEHEADER: return "MessageHeader"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PLANDEFINITION: return "PlanDefinition"; + case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case RELATEDPERSON: return "RelatedPerson"; + case REQUESTGROUP: return "RequestGroup"; + case RESEARCHSTUDY: return "ResearchStudy"; + case RESEARCHSUBJECT: return "ResearchSubject"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SEQUENCE: return "Sequence"; + case SERVICEDEFINITION: return "ServiceDefinition"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; + case TESTREPORT: return "TestReport"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-types"; + } + public String getDefinition() { + switch (this) { + case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc."; + case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context."; + case ADVERSEEVENT: return "Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death."; + case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."; + case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; + case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."; + case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage."; + case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."; + case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc."; + case BODYSTRUCTURE: return "Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; + case BUNDLE: return "A container for a collection of resources."; + case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; + case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog."; + case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."; + case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; + case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; + case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; + case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems."; + case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; + case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server."; + case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; + case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; + case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern."; + case CONSENT: return "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time."; + case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; + case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services."; + case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; + case DEVICE: return "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICECOMPONENT: return "The characteristics, operational status and capabilities of a medical-related component of a medical device."; + case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; + case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; + case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician."; + case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports."; + case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection."; + case DOCUMENTREFERENCE: return "A reference to a document."; + case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources."; + case ELIGIBILITYREQUEST: return "The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy."; + case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource."; + case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient."; + case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information."; + case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage."; + case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; + case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; + case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur."; + case EXAMPLESCENARIO: return "Example of workflow instance."; + case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; + case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; + case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient."; + case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; + case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; + case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set."; + case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken."; + case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGMANIFEST: return "A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection."; + case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; + case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; + case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification."; + case IMPLEMENTATIONGUIDE: return "A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts."; + case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets."; + case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\"."; + case LIST: return "A set of information summarized from a list of other resources."; + case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; + case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure."; + case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; + case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; + case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; + case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; + case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."; + case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; + case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; + case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; + case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; + case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction)."; + case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action."; + case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc."; + case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it."; + case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services."; + case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references."; + case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; + case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; + case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols."; + case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time."; + case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; + case PROCEDUREREQUEST: return "A record of a request for diagnostic investigations, treatments, or operations to be performed."; + case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; + case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource."; + case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."; + case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection."; + case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to."; + case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."; + case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\"."; + case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects."; + case RESEARCHSUBJECT: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects."; + case RESOURCE: return "This is the base resource type for everything."; + case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome."; + case SCHEDULE: return "A container for slots of time that may be available for booking appointments."; + case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource."; + case SEQUENCE: return "Raw data describing a biological sequence."; + case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; + case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; + case SPECIMEN: return "A sample to be used for analysis."; + case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements."; + case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."; + case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; + case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; + case SUBSTANCE: return "A homogeneous material with a definite composition."; + case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; + case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TASK: return "A task to be performed."; + case TESTREPORT: return "A summary of information based on the results of executing a TestScript."; + case TESTSCRIPT: return "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification."; + case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; + case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCOUNT: return "Account"; + case ACTIVITYDEFINITION: return "ActivityDefinition"; + case ADVERSEEVENT: return "AdverseEvent"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSTRUCTURE: return "BodyStructure"; + case BUNDLE: return "Bundle"; + case CAPABILITYSTATEMENT: return "CapabilityStatement"; + case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; + case CATALOGENTRY: return "CatalogEntry"; + case CHARGEITEM: return "ChargeItem"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case CODESYSTEM: return "CodeSystem"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONSENT: return "Consent"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEREQUEST: return "DeviceRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENDPOINT: return "Endpoint"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EVENTDEFINITION: return "EventDefinition"; + case EXAMPLESCENARIO: return "ExampleScenario"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GRAPHDEFINITION: return "GraphDefinition"; + case GROUP: return "Group"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGMANIFEST: return "ImagingManifest"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LINKAGE: return "Linkage"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONREQUEST: return "MedicationRequest"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEDEFINITION: return "MessageDefinition"; + case MESSAGEHEADER: return "MessageHeader"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PLANDEFINITION: return "PlanDefinition"; + case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case RELATEDPERSON: return "RelatedPerson"; + case REQUESTGROUP: return "RequestGroup"; + case RESEARCHSTUDY: return "ResearchStudy"; + case RESEARCHSUBJECT: return "ResearchSubject"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SEQUENCE: return "Sequence"; + case SERVICEDEFINITION: return "ServiceDefinition"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case SPECIMENDEFINITION: return "SpecimenDefinition"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; + case TESTREPORT: return "TestReport"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypesEnumFactory.java new file mode 100644 index 00000000000..970734729a8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceTypesEnumFactory.java @@ -0,0 +1,538 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResourceTypesEnumFactory implements EnumFactory { + + public ResourceTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Account".equals(codeString)) + return ResourceTypes.ACCOUNT; + if ("ActivityDefinition".equals(codeString)) + return ResourceTypes.ACTIVITYDEFINITION; + if ("AdverseEvent".equals(codeString)) + return ResourceTypes.ADVERSEEVENT; + if ("AllergyIntolerance".equals(codeString)) + return ResourceTypes.ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return ResourceTypes.APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return ResourceTypes.APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return ResourceTypes.AUDITEVENT; + if ("Basic".equals(codeString)) + return ResourceTypes.BASIC; + if ("Binary".equals(codeString)) + return ResourceTypes.BINARY; + if ("BodyStructure".equals(codeString)) + return ResourceTypes.BODYSTRUCTURE; + if ("Bundle".equals(codeString)) + return ResourceTypes.BUNDLE; + if ("CapabilityStatement".equals(codeString)) + return ResourceTypes.CAPABILITYSTATEMENT; + if ("CarePlan".equals(codeString)) + return ResourceTypes.CAREPLAN; + if ("CareTeam".equals(codeString)) + return ResourceTypes.CARETEAM; + if ("CatalogEntry".equals(codeString)) + return ResourceTypes.CATALOGENTRY; + if ("ChargeItem".equals(codeString)) + return ResourceTypes.CHARGEITEM; + if ("Claim".equals(codeString)) + return ResourceTypes.CLAIM; + if ("ClaimResponse".equals(codeString)) + return ResourceTypes.CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return ResourceTypes.CLINICALIMPRESSION; + if ("CodeSystem".equals(codeString)) + return ResourceTypes.CODESYSTEM; + if ("Communication".equals(codeString)) + return ResourceTypes.COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return ResourceTypes.COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return ResourceTypes.COMPARTMENTDEFINITION; + if ("Composition".equals(codeString)) + return ResourceTypes.COMPOSITION; + if ("ConceptMap".equals(codeString)) + return ResourceTypes.CONCEPTMAP; + if ("Condition".equals(codeString)) + return ResourceTypes.CONDITION; + if ("Consent".equals(codeString)) + return ResourceTypes.CONSENT; + if ("Contract".equals(codeString)) + return ResourceTypes.CONTRACT; + if ("Coverage".equals(codeString)) + return ResourceTypes.COVERAGE; + if ("DetectedIssue".equals(codeString)) + return ResourceTypes.DETECTEDISSUE; + if ("Device".equals(codeString)) + return ResourceTypes.DEVICE; + if ("DeviceComponent".equals(codeString)) + return ResourceTypes.DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return ResourceTypes.DEVICEMETRIC; + if ("DeviceRequest".equals(codeString)) + return ResourceTypes.DEVICEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return ResourceTypes.DEVICEUSESTATEMENT; + if ("DiagnosticReport".equals(codeString)) + return ResourceTypes.DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return ResourceTypes.DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return ResourceTypes.DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return ResourceTypes.DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ResourceTypes.ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ResourceTypes.ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ResourceTypes.ENCOUNTER; + if ("Endpoint".equals(codeString)) + return ResourceTypes.ENDPOINT; + if ("EnrollmentRequest".equals(codeString)) + return ResourceTypes.ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ResourceTypes.ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return ResourceTypes.EPISODEOFCARE; + if ("EventDefinition".equals(codeString)) + return ResourceTypes.EVENTDEFINITION; + if ("ExampleScenario".equals(codeString)) + return ResourceTypes.EXAMPLESCENARIO; + if ("ExpansionProfile".equals(codeString)) + return ResourceTypes.EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return ResourceTypes.EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return ResourceTypes.FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return ResourceTypes.FLAG; + if ("Goal".equals(codeString)) + return ResourceTypes.GOAL; + if ("GraphDefinition".equals(codeString)) + return ResourceTypes.GRAPHDEFINITION; + if ("Group".equals(codeString)) + return ResourceTypes.GROUP; + if ("GuidanceResponse".equals(codeString)) + return ResourceTypes.GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return ResourceTypes.HEALTHCARESERVICE; + if ("ImagingManifest".equals(codeString)) + return ResourceTypes.IMAGINGMANIFEST; + if ("ImagingStudy".equals(codeString)) + return ResourceTypes.IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return ResourceTypes.IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return ResourceTypes.IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return ResourceTypes.IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return ResourceTypes.LIBRARY; + if ("Linkage".equals(codeString)) + return ResourceTypes.LINKAGE; + if ("List".equals(codeString)) + return ResourceTypes.LIST; + if ("Location".equals(codeString)) + return ResourceTypes.LOCATION; + if ("Measure".equals(codeString)) + return ResourceTypes.MEASURE; + if ("MeasureReport".equals(codeString)) + return ResourceTypes.MEASUREREPORT; + if ("Media".equals(codeString)) + return ResourceTypes.MEDIA; + if ("Medication".equals(codeString)) + return ResourceTypes.MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return ResourceTypes.MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return ResourceTypes.MEDICATIONDISPENSE; + if ("MedicationRequest".equals(codeString)) + return ResourceTypes.MEDICATIONREQUEST; + if ("MedicationStatement".equals(codeString)) + return ResourceTypes.MEDICATIONSTATEMENT; + if ("MessageDefinition".equals(codeString)) + return ResourceTypes.MESSAGEDEFINITION; + if ("MessageHeader".equals(codeString)) + return ResourceTypes.MESSAGEHEADER; + if ("NamingSystem".equals(codeString)) + return ResourceTypes.NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return ResourceTypes.NUTRITIONORDER; + if ("Observation".equals(codeString)) + return ResourceTypes.OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return ResourceTypes.OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return ResourceTypes.OPERATIONOUTCOME; + if ("Organization".equals(codeString)) + return ResourceTypes.ORGANIZATION; + if ("Parameters".equals(codeString)) + return ResourceTypes.PARAMETERS; + if ("Patient".equals(codeString)) + return ResourceTypes.PATIENT; + if ("PaymentNotice".equals(codeString)) + return ResourceTypes.PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return ResourceTypes.PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return ResourceTypes.PERSON; + if ("PlanDefinition".equals(codeString)) + return ResourceTypes.PLANDEFINITION; + if ("Practitioner".equals(codeString)) + return ResourceTypes.PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return ResourceTypes.PRACTITIONERROLE; + if ("Procedure".equals(codeString)) + return ResourceTypes.PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return ResourceTypes.PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return ResourceTypes.PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return ResourceTypes.PROCESSRESPONSE; + if ("Provenance".equals(codeString)) + return ResourceTypes.PROVENANCE; + if ("Questionnaire".equals(codeString)) + return ResourceTypes.QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return ResourceTypes.QUESTIONNAIRERESPONSE; + if ("RelatedPerson".equals(codeString)) + return ResourceTypes.RELATEDPERSON; + if ("RequestGroup".equals(codeString)) + return ResourceTypes.REQUESTGROUP; + if ("ResearchStudy".equals(codeString)) + return ResourceTypes.RESEARCHSTUDY; + if ("ResearchSubject".equals(codeString)) + return ResourceTypes.RESEARCHSUBJECT; + if ("Resource".equals(codeString)) + return ResourceTypes.RESOURCE; + if ("RiskAssessment".equals(codeString)) + return ResourceTypes.RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return ResourceTypes.SCHEDULE; + if ("SearchParameter".equals(codeString)) + return ResourceTypes.SEARCHPARAMETER; + if ("Sequence".equals(codeString)) + return ResourceTypes.SEQUENCE; + if ("ServiceDefinition".equals(codeString)) + return ResourceTypes.SERVICEDEFINITION; + if ("Slot".equals(codeString)) + return ResourceTypes.SLOT; + if ("Specimen".equals(codeString)) + return ResourceTypes.SPECIMEN; + if ("SpecimenDefinition".equals(codeString)) + return ResourceTypes.SPECIMENDEFINITION; + if ("StructureDefinition".equals(codeString)) + return ResourceTypes.STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return ResourceTypes.STRUCTUREMAP; + if ("Subscription".equals(codeString)) + return ResourceTypes.SUBSCRIPTION; + if ("Substance".equals(codeString)) + return ResourceTypes.SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return ResourceTypes.SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return ResourceTypes.SUPPLYREQUEST; + if ("Task".equals(codeString)) + return ResourceTypes.TASK; + if ("TestReport".equals(codeString)) + return ResourceTypes.TESTREPORT; + if ("TestScript".equals(codeString)) + return ResourceTypes.TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return ResourceTypes.VALUESET; + if ("VisionPrescription".equals(codeString)) + return ResourceTypes.VISIONPRESCRIPTION; + throw new IllegalArgumentException("Unknown ResourceTypes code '"+codeString+"'"); + } + + public String toCode(ResourceTypes code) { + if (code == ResourceTypes.ACCOUNT) + return "Account"; + if (code == ResourceTypes.ACTIVITYDEFINITION) + return "ActivityDefinition"; + if (code == ResourceTypes.ADVERSEEVENT) + return "AdverseEvent"; + if (code == ResourceTypes.ALLERGYINTOLERANCE) + return "AllergyIntolerance"; + if (code == ResourceTypes.APPOINTMENT) + return "Appointment"; + if (code == ResourceTypes.APPOINTMENTRESPONSE) + return "AppointmentResponse"; + if (code == ResourceTypes.AUDITEVENT) + return "AuditEvent"; + if (code == ResourceTypes.BASIC) + return "Basic"; + if (code == ResourceTypes.BINARY) + return "Binary"; + if (code == ResourceTypes.BODYSTRUCTURE) + return "BodyStructure"; + if (code == ResourceTypes.BUNDLE) + return "Bundle"; + if (code == ResourceTypes.CAPABILITYSTATEMENT) + return "CapabilityStatement"; + if (code == ResourceTypes.CAREPLAN) + return "CarePlan"; + if (code == ResourceTypes.CARETEAM) + return "CareTeam"; + if (code == ResourceTypes.CATALOGENTRY) + return "CatalogEntry"; + if (code == ResourceTypes.CHARGEITEM) + return "ChargeItem"; + if (code == ResourceTypes.CLAIM) + return "Claim"; + if (code == ResourceTypes.CLAIMRESPONSE) + return "ClaimResponse"; + if (code == ResourceTypes.CLINICALIMPRESSION) + return "ClinicalImpression"; + if (code == ResourceTypes.CODESYSTEM) + return "CodeSystem"; + if (code == ResourceTypes.COMMUNICATION) + return "Communication"; + if (code == ResourceTypes.COMMUNICATIONREQUEST) + return "CommunicationRequest"; + if (code == ResourceTypes.COMPARTMENTDEFINITION) + return "CompartmentDefinition"; + if (code == ResourceTypes.COMPOSITION) + return "Composition"; + if (code == ResourceTypes.CONCEPTMAP) + return "ConceptMap"; + if (code == ResourceTypes.CONDITION) + return "Condition"; + if (code == ResourceTypes.CONSENT) + return "Consent"; + if (code == ResourceTypes.CONTRACT) + return "Contract"; + if (code == ResourceTypes.COVERAGE) + return "Coverage"; + if (code == ResourceTypes.DETECTEDISSUE) + return "DetectedIssue"; + if (code == ResourceTypes.DEVICE) + return "Device"; + if (code == ResourceTypes.DEVICECOMPONENT) + return "DeviceComponent"; + if (code == ResourceTypes.DEVICEMETRIC) + return "DeviceMetric"; + if (code == ResourceTypes.DEVICEREQUEST) + return "DeviceRequest"; + if (code == ResourceTypes.DEVICEUSESTATEMENT) + return "DeviceUseStatement"; + if (code == ResourceTypes.DIAGNOSTICREPORT) + return "DiagnosticReport"; + if (code == ResourceTypes.DOCUMENTMANIFEST) + return "DocumentManifest"; + if (code == ResourceTypes.DOCUMENTREFERENCE) + return "DocumentReference"; + if (code == ResourceTypes.DOMAINRESOURCE) + return "DomainResource"; + if (code == ResourceTypes.ELIGIBILITYREQUEST) + return "EligibilityRequest"; + if (code == ResourceTypes.ELIGIBILITYRESPONSE) + return "EligibilityResponse"; + if (code == ResourceTypes.ENCOUNTER) + return "Encounter"; + if (code == ResourceTypes.ENDPOINT) + return "Endpoint"; + if (code == ResourceTypes.ENROLLMENTREQUEST) + return "EnrollmentRequest"; + if (code == ResourceTypes.ENROLLMENTRESPONSE) + return "EnrollmentResponse"; + if (code == ResourceTypes.EPISODEOFCARE) + return "EpisodeOfCare"; + if (code == ResourceTypes.EVENTDEFINITION) + return "EventDefinition"; + if (code == ResourceTypes.EXAMPLESCENARIO) + return "ExampleScenario"; + if (code == ResourceTypes.EXPANSIONPROFILE) + return "ExpansionProfile"; + if (code == ResourceTypes.EXPLANATIONOFBENEFIT) + return "ExplanationOfBenefit"; + if (code == ResourceTypes.FAMILYMEMBERHISTORY) + return "FamilyMemberHistory"; + if (code == ResourceTypes.FLAG) + return "Flag"; + if (code == ResourceTypes.GOAL) + return "Goal"; + if (code == ResourceTypes.GRAPHDEFINITION) + return "GraphDefinition"; + if (code == ResourceTypes.GROUP) + return "Group"; + if (code == ResourceTypes.GUIDANCERESPONSE) + return "GuidanceResponse"; + if (code == ResourceTypes.HEALTHCARESERVICE) + return "HealthcareService"; + if (code == ResourceTypes.IMAGINGMANIFEST) + return "ImagingManifest"; + if (code == ResourceTypes.IMAGINGSTUDY) + return "ImagingStudy"; + if (code == ResourceTypes.IMMUNIZATION) + return "Immunization"; + if (code == ResourceTypes.IMMUNIZATIONRECOMMENDATION) + return "ImmunizationRecommendation"; + if (code == ResourceTypes.IMPLEMENTATIONGUIDE) + return "ImplementationGuide"; + if (code == ResourceTypes.LIBRARY) + return "Library"; + if (code == ResourceTypes.LINKAGE) + return "Linkage"; + if (code == ResourceTypes.LIST) + return "List"; + if (code == ResourceTypes.LOCATION) + return "Location"; + if (code == ResourceTypes.MEASURE) + return "Measure"; + if (code == ResourceTypes.MEASUREREPORT) + return "MeasureReport"; + if (code == ResourceTypes.MEDIA) + return "Media"; + if (code == ResourceTypes.MEDICATION) + return "Medication"; + if (code == ResourceTypes.MEDICATIONADMINISTRATION) + return "MedicationAdministration"; + if (code == ResourceTypes.MEDICATIONDISPENSE) + return "MedicationDispense"; + if (code == ResourceTypes.MEDICATIONREQUEST) + return "MedicationRequest"; + if (code == ResourceTypes.MEDICATIONSTATEMENT) + return "MedicationStatement"; + if (code == ResourceTypes.MESSAGEDEFINITION) + return "MessageDefinition"; + if (code == ResourceTypes.MESSAGEHEADER) + return "MessageHeader"; + if (code == ResourceTypes.NAMINGSYSTEM) + return "NamingSystem"; + if (code == ResourceTypes.NUTRITIONORDER) + return "NutritionOrder"; + if (code == ResourceTypes.OBSERVATION) + return "Observation"; + if (code == ResourceTypes.OPERATIONDEFINITION) + return "OperationDefinition"; + if (code == ResourceTypes.OPERATIONOUTCOME) + return "OperationOutcome"; + if (code == ResourceTypes.ORGANIZATION) + return "Organization"; + if (code == ResourceTypes.PARAMETERS) + return "Parameters"; + if (code == ResourceTypes.PATIENT) + return "Patient"; + if (code == ResourceTypes.PAYMENTNOTICE) + return "PaymentNotice"; + if (code == ResourceTypes.PAYMENTRECONCILIATION) + return "PaymentReconciliation"; + if (code == ResourceTypes.PERSON) + return "Person"; + if (code == ResourceTypes.PLANDEFINITION) + return "PlanDefinition"; + if (code == ResourceTypes.PRACTITIONER) + return "Practitioner"; + if (code == ResourceTypes.PRACTITIONERROLE) + return "PractitionerRole"; + if (code == ResourceTypes.PROCEDURE) + return "Procedure"; + if (code == ResourceTypes.PROCEDUREREQUEST) + return "ProcedureRequest"; + if (code == ResourceTypes.PROCESSREQUEST) + return "ProcessRequest"; + if (code == ResourceTypes.PROCESSRESPONSE) + return "ProcessResponse"; + if (code == ResourceTypes.PROVENANCE) + return "Provenance"; + if (code == ResourceTypes.QUESTIONNAIRE) + return "Questionnaire"; + if (code == ResourceTypes.QUESTIONNAIRERESPONSE) + return "QuestionnaireResponse"; + if (code == ResourceTypes.RELATEDPERSON) + return "RelatedPerson"; + if (code == ResourceTypes.REQUESTGROUP) + return "RequestGroup"; + if (code == ResourceTypes.RESEARCHSTUDY) + return "ResearchStudy"; + if (code == ResourceTypes.RESEARCHSUBJECT) + return "ResearchSubject"; + if (code == ResourceTypes.RESOURCE) + return "Resource"; + if (code == ResourceTypes.RISKASSESSMENT) + return "RiskAssessment"; + if (code == ResourceTypes.SCHEDULE) + return "Schedule"; + if (code == ResourceTypes.SEARCHPARAMETER) + return "SearchParameter"; + if (code == ResourceTypes.SEQUENCE) + return "Sequence"; + if (code == ResourceTypes.SERVICEDEFINITION) + return "ServiceDefinition"; + if (code == ResourceTypes.SLOT) + return "Slot"; + if (code == ResourceTypes.SPECIMEN) + return "Specimen"; + if (code == ResourceTypes.SPECIMENDEFINITION) + return "SpecimenDefinition"; + if (code == ResourceTypes.STRUCTUREDEFINITION) + return "StructureDefinition"; + if (code == ResourceTypes.STRUCTUREMAP) + return "StructureMap"; + if (code == ResourceTypes.SUBSCRIPTION) + return "Subscription"; + if (code == ResourceTypes.SUBSTANCE) + return "Substance"; + if (code == ResourceTypes.SUPPLYDELIVERY) + return "SupplyDelivery"; + if (code == ResourceTypes.SUPPLYREQUEST) + return "SupplyRequest"; + if (code == ResourceTypes.TASK) + return "Task"; + if (code == ResourceTypes.TESTREPORT) + return "TestReport"; + if (code == ResourceTypes.TESTSCRIPT) + return "TestScript"; + if (code == ResourceTypes.VALUESET) + return "ValueSet"; + if (code == ResourceTypes.VISIONPRESCRIPTION) + return "VisionPrescription"; + return "?"; + } + + public String toSystem(ResourceTypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceValidationMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceValidationMode.java new file mode 100644 index 00000000000..77e174f57e5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceValidationMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResourceValidationMode { + + /** + * The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints). + */ + CREATE, + /** + * The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate). + */ + UPDATE, + /** + * The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules). + */ + DELETE, + /** + * added to help the parsers + */ + NULL; + public static ResourceValidationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("delete".equals(codeString)) + return DELETE; + throw new FHIRException("Unknown ResourceValidationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case DELETE: return "delete"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/resource-validation-mode"; + } + public String getDefinition() { + switch (this) { + case CREATE: return "The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints)."; + case UPDATE: return "The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate)."; + case DELETE: return "The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Validate for Create"; + case UPDATE: return "Validate for Update"; + case DELETE: return "Validate for Delete"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceValidationModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceValidationModeEnumFactory.java new file mode 100644 index 00000000000..91e8631c231 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResourceValidationModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResourceValidationModeEnumFactory implements EnumFactory { + + public ResourceValidationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return ResourceValidationMode.CREATE; + if ("update".equals(codeString)) + return ResourceValidationMode.UPDATE; + if ("delete".equals(codeString)) + return ResourceValidationMode.DELETE; + throw new IllegalArgumentException("Unknown ResourceValidationMode code '"+codeString+"'"); + } + + public String toCode(ResourceValidationMode code) { + if (code == ResourceValidationMode.CREATE) + return "create"; + if (code == ResourceValidationMode.UPDATE) + return "update"; + if (code == ResourceValidationMode.DELETE) + return "delete"; + return "?"; + } + + public String toSystem(ResourceValidationMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResponseCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResponseCode.java new file mode 100644 index 00000000000..e3177917036 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResponseCode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ResponseCode { + + /** + * The message was accepted and processed without error. + */ + OK, + /** + * Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required. + */ + TRANSIENTERROR, + /** + * The message was rejected because of a problem with the content. There is no point in re-sending without change. The response narrative SHALL describe the issue. + */ + FATALERROR, + /** + * added to help the parsers + */ + NULL; + public static ResponseCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ok".equals(codeString)) + return OK; + if ("transient-error".equals(codeString)) + return TRANSIENTERROR; + if ("fatal-error".equals(codeString)) + return FATALERROR; + throw new FHIRException("Unknown ResponseCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OK: return "ok"; + case TRANSIENTERROR: return "transient-error"; + case FATALERROR: return "fatal-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/response-code"; + } + public String getDefinition() { + switch (this) { + case OK: return "The message was accepted and processed without error."; + case TRANSIENTERROR: return "Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required."; + case FATALERROR: return "The message was rejected because of a problem with the content. There is no point in re-sending without change. The response narrative SHALL describe the issue."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OK: return "OK"; + case TRANSIENTERROR: return "Transient Error"; + case FATALERROR: return "Fatal Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResponseCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResponseCodeEnumFactory.java new file mode 100644 index 00000000000..e03e06b2d71 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ResponseCodeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ResponseCodeEnumFactory implements EnumFactory { + + public ResponseCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ok".equals(codeString)) + return ResponseCode.OK; + if ("transient-error".equals(codeString)) + return ResponseCode.TRANSIENTERROR; + if ("fatal-error".equals(codeString)) + return ResponseCode.FATALERROR; + throw new IllegalArgumentException("Unknown ResponseCode code '"+codeString+"'"); + } + + public String toCode(ResponseCode code) { + if (code == ResponseCode.OK) + return "ok"; + if (code == ResponseCode.TRANSIENTERROR) + return "transient-error"; + if (code == ResponseCode.FATALERROR) + return "fatal-error"; + return "?"; + } + + public String toSystem(ResponseCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulCapabilityMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulCapabilityMode.java new file mode 100644 index 00000000000..6894bc83f36 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulCapabilityMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RestfulCapabilityMode { + + /** + * The application acts as a client for this resource. + */ + CLIENT, + /** + * The application acts as a server for this resource. + */ + SERVER, + /** + * added to help the parsers + */ + NULL; + public static RestfulCapabilityMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("client".equals(codeString)) + return CLIENT; + if ("server".equals(codeString)) + return SERVER; + throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CLIENT: return "client"; + case SERVER: return "server"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/restful-capability-mode"; + } + public String getDefinition() { + switch (this) { + case CLIENT: return "The application acts as a client for this resource."; + case SERVER: return "The application acts as a server for this resource."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CLIENT: return "Client"; + case SERVER: return "Server"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulCapabilityModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulCapabilityModeEnumFactory.java new file mode 100644 index 00000000000..f5a85eaeb28 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulCapabilityModeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RestfulCapabilityModeEnumFactory implements EnumFactory { + + public RestfulCapabilityMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("client".equals(codeString)) + return RestfulCapabilityMode.CLIENT; + if ("server".equals(codeString)) + return RestfulCapabilityMode.SERVER; + throw new IllegalArgumentException("Unknown RestfulCapabilityMode code '"+codeString+"'"); + } + + public String toCode(RestfulCapabilityMode code) { + if (code == RestfulCapabilityMode.CLIENT) + return "client"; + if (code == RestfulCapabilityMode.SERVER) + return "server"; + return "?"; + } + + public String toSystem(RestfulCapabilityMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulInteraction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulInteraction.java new file mode 100644 index 00000000000..c34a2488fbe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulInteraction.java @@ -0,0 +1,222 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RestfulInteraction { + + /** + * Read the current state of the resource. + */ + READ, + /** + * Read the state of a specific version of the resource. + */ + VREAD, + /** + * Update an existing resource by its id (or create it if it is new). + */ + UPDATE, + /** + * Update an existing resource by posting a set of changes to it. + */ + PATCH, + /** + * Delete a resource. + */ + DELETE, + /** + * Retrieve the change history for a particular resource, type of resource, or the entire system. + */ + HISTORY, + /** + * Retrieve the change history for a particular resource. + */ + HISTORYINSTANCE, + /** + * Retrieve the change history for all resources of a particular type. + */ + HISTORYTYPE, + /** + * Retrieve the change history for all resources on a system. + */ + HISTORYSYSTEM, + /** + * Create a new resource with a server assigned id. + */ + CREATE, + /** + * Search a resource type or all resources based on some filter criteria. + */ + SEARCH, + /** + * Search all resources of the specified type based on some filter criteria. + */ + SEARCHTYPE, + /** + * Search all resources based on some filter criteria. + */ + SEARCHSYSTEM, + /** + * Get a Capability Statement for the system. + */ + CAPABILITIES, + /** + * Update, create or delete a set of resources as a single transaction. + */ + TRANSACTION, + /** + * perform a set of a separate interactions in a single http operation + */ + BATCH, + /** + * Perform an operation as defined by an OperationDefinition. + */ + OPERATION, + /** + * added to help the parsers + */ + NULL; + public static RestfulInteraction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return READ; + if ("vread".equals(codeString)) + return VREAD; + if ("update".equals(codeString)) + return UPDATE; + if ("patch".equals(codeString)) + return PATCH; + if ("delete".equals(codeString)) + return DELETE; + if ("history".equals(codeString)) + return HISTORY; + if ("history-instance".equals(codeString)) + return HISTORYINSTANCE; + if ("history-type".equals(codeString)) + return HISTORYTYPE; + if ("history-system".equals(codeString)) + return HISTORYSYSTEM; + if ("create".equals(codeString)) + return CREATE; + if ("search".equals(codeString)) + return SEARCH; + if ("search-type".equals(codeString)) + return SEARCHTYPE; + if ("search-system".equals(codeString)) + return SEARCHSYSTEM; + if ("capabilities".equals(codeString)) + return CAPABILITIES; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("batch".equals(codeString)) + return BATCH; + if ("operation".equals(codeString)) + return OPERATION; + throw new FHIRException("Unknown RestfulInteraction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case READ: return "read"; + case VREAD: return "vread"; + case UPDATE: return "update"; + case PATCH: return "patch"; + case DELETE: return "delete"; + case HISTORY: return "history"; + case HISTORYINSTANCE: return "history-instance"; + case HISTORYTYPE: return "history-type"; + case HISTORYSYSTEM: return "history-system"; + case CREATE: return "create"; + case SEARCH: return "search"; + case SEARCHTYPE: return "search-type"; + case SEARCHSYSTEM: return "search-system"; + case CAPABILITIES: return "capabilities"; + case TRANSACTION: return "transaction"; + case BATCH: return "batch"; + case OPERATION: return "operation"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/restful-interaction"; + } + public String getDefinition() { + switch (this) { + case READ: return "Read the current state of the resource."; + case VREAD: return "Read the state of a specific version of the resource."; + case UPDATE: return "Update an existing resource by its id (or create it if it is new)."; + case PATCH: return "Update an existing resource by posting a set of changes to it."; + case DELETE: return "Delete a resource."; + case HISTORY: return "Retrieve the change history for a particular resource, type of resource, or the entire system."; + case HISTORYINSTANCE: return "Retrieve the change history for a particular resource."; + case HISTORYTYPE: return "Retrieve the change history for all resources of a particular type."; + case HISTORYSYSTEM: return "Retrieve the change history for all resources on a system."; + case CREATE: return "Create a new resource with a server assigned id."; + case SEARCH: return "Search a resource type or all resources based on some filter criteria."; + case SEARCHTYPE: return "Search all resources of the specified type based on some filter criteria."; + case SEARCHSYSTEM: return "Search all resources based on some filter criteria."; + case CAPABILITIES: return "Get a Capability Statement for the system."; + case TRANSACTION: return "Update, create or delete a set of resources as a single transaction."; + case BATCH: return "perform a set of a separate interactions in a single http operation"; + case OPERATION: return "Perform an operation as defined by an OperationDefinition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case READ: return "read"; + case VREAD: return "vread"; + case UPDATE: return "update"; + case PATCH: return "patch"; + case DELETE: return "delete"; + case HISTORY: return "history"; + case HISTORYINSTANCE: return "history-instance"; + case HISTORYTYPE: return "history-type"; + case HISTORYSYSTEM: return "history-system"; + case CREATE: return "create"; + case SEARCH: return "search"; + case SEARCHTYPE: return "search-type"; + case SEARCHSYSTEM: return "search-system"; + case CAPABILITIES: return "capabilities"; + case TRANSACTION: return "transaction"; + case BATCH: return "batch"; + case OPERATION: return "operation"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulInteractionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulInteractionEnumFactory.java new file mode 100644 index 00000000000..dab6f523d1e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulInteractionEnumFactory.java @@ -0,0 +1,122 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RestfulInteractionEnumFactory implements EnumFactory { + + public RestfulInteraction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return RestfulInteraction.READ; + if ("vread".equals(codeString)) + return RestfulInteraction.VREAD; + if ("update".equals(codeString)) + return RestfulInteraction.UPDATE; + if ("patch".equals(codeString)) + return RestfulInteraction.PATCH; + if ("delete".equals(codeString)) + return RestfulInteraction.DELETE; + if ("history".equals(codeString)) + return RestfulInteraction.HISTORY; + if ("history-instance".equals(codeString)) + return RestfulInteraction.HISTORYINSTANCE; + if ("history-type".equals(codeString)) + return RestfulInteraction.HISTORYTYPE; + if ("history-system".equals(codeString)) + return RestfulInteraction.HISTORYSYSTEM; + if ("create".equals(codeString)) + return RestfulInteraction.CREATE; + if ("search".equals(codeString)) + return RestfulInteraction.SEARCH; + if ("search-type".equals(codeString)) + return RestfulInteraction.SEARCHTYPE; + if ("search-system".equals(codeString)) + return RestfulInteraction.SEARCHSYSTEM; + if ("capabilities".equals(codeString)) + return RestfulInteraction.CAPABILITIES; + if ("transaction".equals(codeString)) + return RestfulInteraction.TRANSACTION; + if ("batch".equals(codeString)) + return RestfulInteraction.BATCH; + if ("operation".equals(codeString)) + return RestfulInteraction.OPERATION; + throw new IllegalArgumentException("Unknown RestfulInteraction code '"+codeString+"'"); + } + + public String toCode(RestfulInteraction code) { + if (code == RestfulInteraction.READ) + return "read"; + if (code == RestfulInteraction.VREAD) + return "vread"; + if (code == RestfulInteraction.UPDATE) + return "update"; + if (code == RestfulInteraction.PATCH) + return "patch"; + if (code == RestfulInteraction.DELETE) + return "delete"; + if (code == RestfulInteraction.HISTORY) + return "history"; + if (code == RestfulInteraction.HISTORYINSTANCE) + return "history-instance"; + if (code == RestfulInteraction.HISTORYTYPE) + return "history-type"; + if (code == RestfulInteraction.HISTORYSYSTEM) + return "history-system"; + if (code == RestfulInteraction.CREATE) + return "create"; + if (code == RestfulInteraction.SEARCH) + return "search"; + if (code == RestfulInteraction.SEARCHTYPE) + return "search-type"; + if (code == RestfulInteraction.SEARCHSYSTEM) + return "search-system"; + if (code == RestfulInteraction.CAPABILITIES) + return "capabilities"; + if (code == RestfulInteraction.TRANSACTION) + return "transaction"; + if (code == RestfulInteraction.BATCH) + return "batch"; + if (code == RestfulInteraction.OPERATION) + return "operation"; + return "?"; + } + + public String toSystem(RestfulInteraction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulSecurityService.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulSecurityService.java new file mode 100644 index 00000000000..08a6b8619df --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulSecurityService.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RestfulSecurityService { + + /** + * Oauth (unspecified version see oauth.net). + */ + OAUTH, + /** + * OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org/). + */ + SMARTONFHIR, + /** + * Microsoft NTLM Authentication. + */ + NTLM, + /** + * Basic authentication defined in HTTP specification. + */ + BASIC, + /** + * see http://www.ietf.org/rfc/rfc4120.txt. + */ + KERBEROS, + /** + * SSL where client must have a certificate registered with the server. + */ + CERTIFICATES, + /** + * added to help the parsers + */ + NULL; + public static RestfulSecurityService fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OAuth".equals(codeString)) + return OAUTH; + if ("SMART-on-FHIR".equals(codeString)) + return SMARTONFHIR; + if ("NTLM".equals(codeString)) + return NTLM; + if ("Basic".equals(codeString)) + return BASIC; + if ("Kerberos".equals(codeString)) + return KERBEROS; + if ("Certificates".equals(codeString)) + return CERTIFICATES; + throw new FHIRException("Unknown RestfulSecurityService code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OAUTH: return "OAuth"; + case SMARTONFHIR: return "SMART-on-FHIR"; + case NTLM: return "NTLM"; + case BASIC: return "Basic"; + case KERBEROS: return "Kerberos"; + case CERTIFICATES: return "Certificates"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/restful-security-service"; + } + public String getDefinition() { + switch (this) { + case OAUTH: return "Oauth (unspecified version see oauth.net)."; + case SMARTONFHIR: return "OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org/)."; + case NTLM: return "Microsoft NTLM Authentication."; + case BASIC: return "Basic authentication defined in HTTP specification."; + case KERBEROS: return "see http://www.ietf.org/rfc/rfc4120.txt."; + case CERTIFICATES: return "SSL where client must have a certificate registered with the server."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OAUTH: return "OAuth"; + case SMARTONFHIR: return "SMART-on-FHIR"; + case NTLM: return "NTLM"; + case BASIC: return "Basic"; + case KERBEROS: return "Kerberos"; + case CERTIFICATES: return "Certificates"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulSecurityServiceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulSecurityServiceEnumFactory.java new file mode 100644 index 00000000000..13b5e41319e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RestfulSecurityServiceEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RestfulSecurityServiceEnumFactory implements EnumFactory { + + public RestfulSecurityService fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OAuth".equals(codeString)) + return RestfulSecurityService.OAUTH; + if ("SMART-on-FHIR".equals(codeString)) + return RestfulSecurityService.SMARTONFHIR; + if ("NTLM".equals(codeString)) + return RestfulSecurityService.NTLM; + if ("Basic".equals(codeString)) + return RestfulSecurityService.BASIC; + if ("Kerberos".equals(codeString)) + return RestfulSecurityService.KERBEROS; + if ("Certificates".equals(codeString)) + return RestfulSecurityService.CERTIFICATES; + throw new IllegalArgumentException("Unknown RestfulSecurityService code '"+codeString+"'"); + } + + public String toCode(RestfulSecurityService code) { + if (code == RestfulSecurityService.OAUTH) + return "OAuth"; + if (code == RestfulSecurityService.SMARTONFHIR) + return "SMART-on-FHIR"; + if (code == RestfulSecurityService.NTLM) + return "NTLM"; + if (code == RestfulSecurityService.BASIC) + return "Basic"; + if (code == RestfulSecurityService.KERBEROS) + return "Kerberos"; + if (code == RestfulSecurityService.CERTIFICATES) + return "Certificates"; + return "?"; + } + + public String toSystem(RestfulSecurityService code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RiskProbability.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RiskProbability.java new file mode 100644 index 00000000000..ecc6dfbbcb8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RiskProbability.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum RiskProbability { + + /** + * The specified outcome is exceptionally unlikely. + */ + NEGLIGIBLE, + /** + * The specified outcome is possible but unlikely. + */ + LOW, + /** + * The specified outcome has a reasonable likelihood of occurrence. + */ + MODERATE, + /** + * The specified outcome is more likely to occur than not. + */ + HIGH, + /** + * The specified outcome is effectively guaranteed. + */ + CERTAIN, + /** + * added to help the parsers + */ + NULL; + public static RiskProbability fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("negligible".equals(codeString)) + return NEGLIGIBLE; + if ("low".equals(codeString)) + return LOW; + if ("moderate".equals(codeString)) + return MODERATE; + if ("high".equals(codeString)) + return HIGH; + if ("certain".equals(codeString)) + return CERTAIN; + throw new FHIRException("Unknown RiskProbability code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NEGLIGIBLE: return "negligible"; + case LOW: return "low"; + case MODERATE: return "moderate"; + case HIGH: return "high"; + case CERTAIN: return "certain"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/risk-probability"; + } + public String getDefinition() { + switch (this) { + case NEGLIGIBLE: return "The specified outcome is exceptionally unlikely."; + case LOW: return "The specified outcome is possible but unlikely."; + case MODERATE: return "The specified outcome has a reasonable likelihood of occurrence."; + case HIGH: return "The specified outcome is more likely to occur than not."; + case CERTAIN: return "The specified outcome is effectively guaranteed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NEGLIGIBLE: return "Negligible likelihood"; + case LOW: return "Low likelihood"; + case MODERATE: return "Moderate likelihood"; + case HIGH: return "High likelihood"; + case CERTAIN: return "Certain"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RiskProbabilityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RiskProbabilityEnumFactory.java new file mode 100644 index 00000000000..09f26c5e0f5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/RiskProbabilityEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class RiskProbabilityEnumFactory implements EnumFactory { + + public RiskProbability fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("negligible".equals(codeString)) + return RiskProbability.NEGLIGIBLE; + if ("low".equals(codeString)) + return RiskProbability.LOW; + if ("moderate".equals(codeString)) + return RiskProbability.MODERATE; + if ("high".equals(codeString)) + return RiskProbability.HIGH; + if ("certain".equals(codeString)) + return RiskProbability.CERTAIN; + throw new IllegalArgumentException("Unknown RiskProbability code '"+codeString+"'"); + } + + public String toCode(RiskProbability code) { + if (code == RiskProbability.NEGLIGIBLE) + return "negligible"; + if (code == RiskProbability.LOW) + return "low"; + if (code == RiskProbability.MODERATE) + return "moderate"; + if (code == RiskProbability.HIGH) + return "high"; + if (code == RiskProbability.CERTAIN) + return "certain"; + return "?"; + } + + public String toSystem(RiskProbability code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchComparator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchComparator.java new file mode 100644 index 00000000000..2d0ce1243a2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchComparator.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SearchComparator { + + /** + * the value for the parameter in the resource is equal to the provided value + */ + EQ, + /** + * the value for the parameter in the resource is not equal to the provided value + */ + NE, + /** + * the value for the parameter in the resource is greater than the provided value + */ + GT, + /** + * the value for the parameter in the resource is less than the provided value + */ + LT, + /** + * the value for the parameter in the resource is greater or equal to the provided value + */ + GE, + /** + * the value for the parameter in the resource is less or equal to the provided value + */ + LE, + /** + * the value for the parameter in the resource starts after the provided value + */ + SA, + /** + * the value for the parameter in the resource ends before the provided value + */ + EB, + /** + * the value for the parameter in the resource is approximately the same to the provided value. + */ + AP, + /** + * added to help the parsers + */ + NULL; + public static SearchComparator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("eq".equals(codeString)) + return EQ; + if ("ne".equals(codeString)) + return NE; + if ("gt".equals(codeString)) + return GT; + if ("lt".equals(codeString)) + return LT; + if ("ge".equals(codeString)) + return GE; + if ("le".equals(codeString)) + return LE; + if ("sa".equals(codeString)) + return SA; + if ("eb".equals(codeString)) + return EB; + if ("ap".equals(codeString)) + return AP; + throw new FHIRException("Unknown SearchComparator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EQ: return "eq"; + case NE: return "ne"; + case GT: return "gt"; + case LT: return "lt"; + case GE: return "ge"; + case LE: return "le"; + case SA: return "sa"; + case EB: return "eb"; + case AP: return "ap"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/search-comparator"; + } + public String getDefinition() { + switch (this) { + case EQ: return "the value for the parameter in the resource is equal to the provided value"; + case NE: return "the value for the parameter in the resource is not equal to the provided value"; + case GT: return "the value for the parameter in the resource is greater than the provided value"; + case LT: return "the value for the parameter in the resource is less than the provided value"; + case GE: return "the value for the parameter in the resource is greater or equal to the provided value"; + case LE: return "the value for the parameter in the resource is less or equal to the provided value"; + case SA: return "the value for the parameter in the resource starts after the provided value"; + case EB: return "the value for the parameter in the resource ends before the provided value"; + case AP: return "the value for the parameter in the resource is approximately the same to the provided value."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EQ: return "Equals"; + case NE: return "Not Equals"; + case GT: return "Greater Than"; + case LT: return "Less Then"; + case GE: return "Greater or Equals"; + case LE: return "Less of Equal"; + case SA: return "Starts After"; + case EB: return "Ends Before"; + case AP: return "Approximately"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchComparatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchComparatorEnumFactory.java new file mode 100644 index 00000000000..cfe61583c9d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchComparatorEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SearchComparatorEnumFactory implements EnumFactory { + + public SearchComparator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("eq".equals(codeString)) + return SearchComparator.EQ; + if ("ne".equals(codeString)) + return SearchComparator.NE; + if ("gt".equals(codeString)) + return SearchComparator.GT; + if ("lt".equals(codeString)) + return SearchComparator.LT; + if ("ge".equals(codeString)) + return SearchComparator.GE; + if ("le".equals(codeString)) + return SearchComparator.LE; + if ("sa".equals(codeString)) + return SearchComparator.SA; + if ("eb".equals(codeString)) + return SearchComparator.EB; + if ("ap".equals(codeString)) + return SearchComparator.AP; + throw new IllegalArgumentException("Unknown SearchComparator code '"+codeString+"'"); + } + + public String toCode(SearchComparator code) { + if (code == SearchComparator.EQ) + return "eq"; + if (code == SearchComparator.NE) + return "ne"; + if (code == SearchComparator.GT) + return "gt"; + if (code == SearchComparator.LT) + return "lt"; + if (code == SearchComparator.GE) + return "ge"; + if (code == SearchComparator.LE) + return "le"; + if (code == SearchComparator.SA) + return "sa"; + if (code == SearchComparator.EB) + return "eb"; + if (code == SearchComparator.AP) + return "ap"; + return "?"; + } + + public String toSystem(SearchComparator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchEntryMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchEntryMode.java new file mode 100644 index 00000000000..dd266659492 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchEntryMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SearchEntryMode { + + /** + * This resource matched the search specification. + */ + MATCH, + /** + * This resource is returned because it is referred to from another resource in the search set. + */ + INCLUDE, + /** + * An OperationOutcome that provides additional information about the processing of a search. + */ + OUTCOME, + /** + * added to help the parsers + */ + NULL; + public static SearchEntryMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("match".equals(codeString)) + return MATCH; + if ("include".equals(codeString)) + return INCLUDE; + if ("outcome".equals(codeString)) + return OUTCOME; + throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MATCH: return "match"; + case INCLUDE: return "include"; + case OUTCOME: return "outcome"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/search-entry-mode"; + } + public String getDefinition() { + switch (this) { + case MATCH: return "This resource matched the search specification."; + case INCLUDE: return "This resource is returned because it is referred to from another resource in the search set."; + case OUTCOME: return "An OperationOutcome that provides additional information about the processing of a search."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MATCH: return "Match"; + case INCLUDE: return "Include"; + case OUTCOME: return "Outcome"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchEntryModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchEntryModeEnumFactory.java new file mode 100644 index 00000000000..0a2f51dbd96 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchEntryModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SearchEntryModeEnumFactory implements EnumFactory { + + public SearchEntryMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("match".equals(codeString)) + return SearchEntryMode.MATCH; + if ("include".equals(codeString)) + return SearchEntryMode.INCLUDE; + if ("outcome".equals(codeString)) + return SearchEntryMode.OUTCOME; + throw new IllegalArgumentException("Unknown SearchEntryMode code '"+codeString+"'"); + } + + public String toCode(SearchEntryMode code) { + if (code == SearchEntryMode.MATCH) + return "match"; + if (code == SearchEntryMode.INCLUDE) + return "include"; + if (code == SearchEntryMode.OUTCOME) + return "outcome"; + return "?"; + } + + public String toSystem(SearchEntryMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchModifierCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchModifierCode.java new file mode 100644 index 00000000000..57095e1548b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchModifierCode.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SearchModifierCode { + + /** + * The search parameter returns resources that have a value or not. + */ + MISSING, + /** + * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). + */ + EXACT, + /** + * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. + */ + CONTAINS, + /** + * The search parameter returns resources that do not contain a match. + */ + NOT, + /** + * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. + */ + TEXT, + /** + * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. + */ + IN, + /** + * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. + */ + NOTIN, + /** + * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). + */ + BELOW, + /** + * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). + */ + ABOVE, + /** + * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). + */ + TYPE, + /** + * added to help the parsers + */ + NULL; + public static SearchModifierCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("missing".equals(codeString)) + return MISSING; + if ("exact".equals(codeString)) + return EXACT; + if ("contains".equals(codeString)) + return CONTAINS; + if ("not".equals(codeString)) + return NOT; + if ("text".equals(codeString)) + return TEXT; + if ("in".equals(codeString)) + return IN; + if ("not-in".equals(codeString)) + return NOTIN; + if ("below".equals(codeString)) + return BELOW; + if ("above".equals(codeString)) + return ABOVE; + if ("type".equals(codeString)) + return TYPE; + throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MISSING: return "missing"; + case EXACT: return "exact"; + case CONTAINS: return "contains"; + case NOT: return "not"; + case TEXT: return "text"; + case IN: return "in"; + case NOTIN: return "not-in"; + case BELOW: return "below"; + case ABOVE: return "above"; + case TYPE: return "type"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/search-modifier-code"; + } + public String getDefinition() { + switch (this) { + case MISSING: return "The search parameter returns resources that have a value or not."; + case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents)."; + case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched."; + case NOT: return "The search parameter returns resources that do not contain a match."; + case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text."; + case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set."; + case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set."; + case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships)."; + case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships)."; + case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MISSING: return "Missing"; + case EXACT: return "Exact"; + case CONTAINS: return "Contains"; + case NOT: return "Not"; + case TEXT: return "Text"; + case IN: return "In"; + case NOTIN: return "Not In"; + case BELOW: return "Below"; + case ABOVE: return "Above"; + case TYPE: return "Type"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchModifierCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchModifierCodeEnumFactory.java new file mode 100644 index 00000000000..82d006c1944 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchModifierCodeEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SearchModifierCodeEnumFactory implements EnumFactory { + + public SearchModifierCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("missing".equals(codeString)) + return SearchModifierCode.MISSING; + if ("exact".equals(codeString)) + return SearchModifierCode.EXACT; + if ("contains".equals(codeString)) + return SearchModifierCode.CONTAINS; + if ("not".equals(codeString)) + return SearchModifierCode.NOT; + if ("text".equals(codeString)) + return SearchModifierCode.TEXT; + if ("in".equals(codeString)) + return SearchModifierCode.IN; + if ("not-in".equals(codeString)) + return SearchModifierCode.NOTIN; + if ("below".equals(codeString)) + return SearchModifierCode.BELOW; + if ("above".equals(codeString)) + return SearchModifierCode.ABOVE; + if ("type".equals(codeString)) + return SearchModifierCode.TYPE; + throw new IllegalArgumentException("Unknown SearchModifierCode code '"+codeString+"'"); + } + + public String toCode(SearchModifierCode code) { + if (code == SearchModifierCode.MISSING) + return "missing"; + if (code == SearchModifierCode.EXACT) + return "exact"; + if (code == SearchModifierCode.CONTAINS) + return "contains"; + if (code == SearchModifierCode.NOT) + return "not"; + if (code == SearchModifierCode.TEXT) + return "text"; + if (code == SearchModifierCode.IN) + return "in"; + if (code == SearchModifierCode.NOTIN) + return "not-in"; + if (code == SearchModifierCode.BELOW) + return "below"; + if (code == SearchModifierCode.ABOVE) + return "above"; + if (code == SearchModifierCode.TYPE) + return "type"; + return "?"; + } + + public String toSystem(SearchModifierCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchParamType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchParamType.java new file mode 100644 index 00000000000..f0448fee7c1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchParamType.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SearchParamType { + + /** + * Search parameter SHALL be a number (a whole number, or a decimal). + */ + NUMBER, + /** + * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported. + */ + DATE, + /** + * Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces. + */ + STRING, + /** + * Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used. + */ + TOKEN, + /** + * A reference to another resource. + */ + REFERENCE, + /** + * A composite search parameter that combines a search on two values together. + */ + COMPOSITE, + /** + * A search parameter that searches on a quantity. + */ + QUANTITY, + /** + * A search parameter that searches on a URI (RFC 3986). + */ + URI, + /** + * added to help the parsers + */ + NULL; + public static SearchParamType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("number".equals(codeString)) + return NUMBER; + if ("date".equals(codeString)) + return DATE; + if ("string".equals(codeString)) + return STRING; + if ("token".equals(codeString)) + return TOKEN; + if ("reference".equals(codeString)) + return REFERENCE; + if ("composite".equals(codeString)) + return COMPOSITE; + if ("quantity".equals(codeString)) + return QUANTITY; + if ("uri".equals(codeString)) + return URI; + throw new FHIRException("Unknown SearchParamType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NUMBER: return "number"; + case DATE: return "date"; + case STRING: return "string"; + case TOKEN: return "token"; + case REFERENCE: return "reference"; + case COMPOSITE: return "composite"; + case QUANTITY: return "quantity"; + case URI: return "uri"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/search-param-type"; + } + public String getDefinition() { + switch (this) { + case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal)."; + case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported."; + case STRING: return "Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces."; + case TOKEN: return "Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a \"|\", depending on the modifier used."; + case REFERENCE: return "A reference to another resource."; + case COMPOSITE: return "A composite search parameter that combines a search on two values together."; + case QUANTITY: return "A search parameter that searches on a quantity."; + case URI: return "A search parameter that searches on a URI (RFC 3986)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NUMBER: return "Number"; + case DATE: return "Date/DateTime"; + case STRING: return "String"; + case TOKEN: return "Token"; + case REFERENCE: return "Reference"; + case COMPOSITE: return "Composite"; + case QUANTITY: return "Quantity"; + case URI: return "URI"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchParamTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchParamTypeEnumFactory.java new file mode 100644 index 00000000000..185e921cc39 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchParamTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SearchParamTypeEnumFactory implements EnumFactory { + + public SearchParamType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("number".equals(codeString)) + return SearchParamType.NUMBER; + if ("date".equals(codeString)) + return SearchParamType.DATE; + if ("string".equals(codeString)) + return SearchParamType.STRING; + if ("token".equals(codeString)) + return SearchParamType.TOKEN; + if ("reference".equals(codeString)) + return SearchParamType.REFERENCE; + if ("composite".equals(codeString)) + return SearchParamType.COMPOSITE; + if ("quantity".equals(codeString)) + return SearchParamType.QUANTITY; + if ("uri".equals(codeString)) + return SearchParamType.URI; + throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'"); + } + + public String toCode(SearchParamType code) { + if (code == SearchParamType.NUMBER) + return "number"; + if (code == SearchParamType.DATE) + return "date"; + if (code == SearchParamType.STRING) + return "string"; + if (code == SearchParamType.TOKEN) + return "token"; + if (code == SearchParamType.REFERENCE) + return "reference"; + if (code == SearchParamType.COMPOSITE) + return "composite"; + if (code == SearchParamType.QUANTITY) + return "quantity"; + if (code == SearchParamType.URI) + return "uri"; + return "?"; + } + + public String toSystem(SearchParamType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchXpathUsage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchXpathUsage.java new file mode 100644 index 00000000000..9fd6b3e20c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchXpathUsage.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SearchXpathUsage { + + /** + * The search parameter is derived directly from the selected nodes based on the type definitions. + */ + NORMAL, + /** + * The search parameter is derived by a phonetic transform from the selected nodes. + */ + PHONETIC, + /** + * The search parameter is based on a spatial transform of the selected nodes. + */ + NEARBY, + /** + * The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle. + */ + DISTANCE, + /** + * The interpretation of the xpath statement is unknown (and can't be automated). + */ + OTHER, + /** + * added to help the parsers + */ + NULL; + public static SearchXpathUsage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("phonetic".equals(codeString)) + return PHONETIC; + if ("nearby".equals(codeString)) + return NEARBY; + if ("distance".equals(codeString)) + return DISTANCE; + if ("other".equals(codeString)) + return OTHER; + throw new FHIRException("Unknown SearchXpathUsage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case PHONETIC: return "phonetic"; + case NEARBY: return "nearby"; + case DISTANCE: return "distance"; + case OTHER: return "other"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/search-xpath-usage"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The search parameter is derived directly from the selected nodes based on the type definitions."; + case PHONETIC: return "The search parameter is derived by a phonetic transform from the selected nodes."; + case NEARBY: return "The search parameter is based on a spatial transform of the selected nodes."; + case DISTANCE: return "The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle."; + case OTHER: return "The interpretation of the xpath statement is unknown (and can't be automated)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "Normal"; + case PHONETIC: return "Phonetic"; + case NEARBY: return "Nearby"; + case DISTANCE: return "Distance"; + case OTHER: return "Other"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchXpathUsageEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchXpathUsageEnumFactory.java new file mode 100644 index 00000000000..3682131b5f4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SearchXpathUsageEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SearchXpathUsageEnumFactory implements EnumFactory { + + public SearchXpathUsage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return SearchXpathUsage.NORMAL; + if ("phonetic".equals(codeString)) + return SearchXpathUsage.PHONETIC; + if ("nearby".equals(codeString)) + return SearchXpathUsage.NEARBY; + if ("distance".equals(codeString)) + return SearchXpathUsage.DISTANCE; + if ("other".equals(codeString)) + return SearchXpathUsage.OTHER; + throw new IllegalArgumentException("Unknown SearchXpathUsage code '"+codeString+"'"); + } + + public String toCode(SearchXpathUsage code) { + if (code == SearchXpathUsage.NORMAL) + return "normal"; + if (code == SearchXpathUsage.PHONETIC) + return "phonetic"; + if (code == SearchXpathUsage.NEARBY) + return "nearby"; + if (code == SearchXpathUsage.DISTANCE) + return "distance"; + if (code == SearchXpathUsage.OTHER) + return "other"; + return "?"; + } + + public String toSystem(SearchXpathUsage code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceType.java new file mode 100644 index 00000000000..49259faf2a0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SequenceType { + + /** + * Amino acid sequence + */ + AA, + /** + * DNA Sequence + */ + DNA, + /** + * RNA Sequence + */ + RNA, + /** + * added to help the parsers + */ + NULL; + public static SequenceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aa".equals(codeString)) + return AA; + if ("dna".equals(codeString)) + return DNA; + if ("rna".equals(codeString)) + return RNA; + throw new FHIRException("Unknown SequenceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AA: return "aa"; + case DNA: return "dna"; + case RNA: return "rna"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/sequence-type"; + } + public String getDefinition() { + switch (this) { + case AA: return "Amino acid sequence"; + case DNA: return "DNA Sequence"; + case RNA: return "RNA Sequence"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AA: return "AA Sequence"; + case DNA: return "DNA Sequence"; + case RNA: return "RNA Sequence"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceTypeEnumFactory.java new file mode 100644 index 00000000000..a87918eec9f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SequenceTypeEnumFactory implements EnumFactory { + + public SequenceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aa".equals(codeString)) + return SequenceType.AA; + if ("dna".equals(codeString)) + return SequenceType.DNA; + if ("rna".equals(codeString)) + return SequenceType.RNA; + throw new IllegalArgumentException("Unknown SequenceType code '"+codeString+"'"); + } + + public String toCode(SequenceType code) { + if (code == SequenceType.AA) + return "aa"; + if (code == SequenceType.DNA) + return "dna"; + if (code == SequenceType.RNA) + return "rna"; + return "?"; + } + + public String toSystem(SequenceType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceCategory.java new file mode 100644 index 00000000000..b53e2cf124d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceCategory.java @@ -0,0 +1,411 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceCategory { + + /** + * Adoption + */ + _1, + /** + * Aged Care + */ + _2, + /** + * Allied Health + */ + _34, + /** + * Alternative & Complementary Therapies + */ + _3, + /** + * Child Care and/or Kindergarten + */ + _4, + /** + * Child Development + */ + _5, + /** + * Child Protection & Family Services + */ + _6, + /** + * Community Health Care + */ + _7, + /** + * Counselling + */ + _8, + /** + * Crisis Line (GPAH use only) + */ + _36, + /** + * Death Services + */ + _9, + /** + * Dental + */ + _10, + /** + * Disability Support + */ + _11, + /** + * Drug/Alcohol + */ + _12, + /** + * Education & Learning + */ + _13, + /** + * Emergency Department + */ + _14, + /** + * Employment + */ + _15, + /** + * Financial & Material aid + */ + _16, + /** + * General Practice/GP (doctor) + */ + _17, + /** + * Hospital + */ + _35, + /** + * Housing/Homelessness + */ + _18, + /** + * Interpreting + */ + _19, + /** + * Justice + */ + _20, + /** + * Legal + */ + _21, + /** + * Mental Health + */ + _22, + /** + * NDIA + */ + _38, + /** + * Physical Activity & Recreation + */ + _23, + /** + * Regulation + */ + _24, + /** + * Respite/Carer Support + */ + _25, + /** + * Specialist Clinical Pathology - requires referral + */ + _26, + /** + * Specialist Medical - requires referral + */ + _27, + /** + * Specialist Obstetrics & Gynaecology - requires referral + */ + _28, + /** + * Specialist Paediatric - requires referral + */ + _29, + /** + * Specialist Radiology/Imaging - requires referral + */ + _30, + /** + * Specialist Surgical - requires referral + */ + _31, + /** + * Support group/s + */ + _32, + /** + * Test Message (HSD admin use only) + */ + _37, + /** + * Transport + */ + _33, + /** + * added to help the parsers + */ + NULL; + public static ServiceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("34".equals(codeString)) + return _34; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("36".equals(codeString)) + return _36; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("35".equals(codeString)) + return _35; + if ("18".equals(codeString)) + return _18; + if ("19".equals(codeString)) + return _19; + if ("20".equals(codeString)) + return _20; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("38".equals(codeString)) + return _38; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("29".equals(codeString)) + return _29; + if ("30".equals(codeString)) + return _30; + if ("31".equals(codeString)) + return _31; + if ("32".equals(codeString)) + return _32; + if ("37".equals(codeString)) + return _37; + if ("33".equals(codeString)) + return _33; + throw new FHIRException("Unknown ServiceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _34: return "34"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _36: return "36"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _35: return "35"; + case _18: return "18"; + case _19: return "19"; + case _20: return "20"; + case _21: return "21"; + case _22: return "22"; + case _38: return "38"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _29: return "29"; + case _30: return "30"; + case _31: return "31"; + case _32: return "32"; + case _37: return "37"; + case _33: return "33"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/service-category"; + } + public String getDefinition() { + switch (this) { + case _1: return "Adoption"; + case _2: return "Aged Care"; + case _34: return "Allied Health"; + case _3: return "Alternative & Complementary Therapies"; + case _4: return "Child Care and/or Kindergarten"; + case _5: return "Child Development"; + case _6: return "Child Protection & Family Services"; + case _7: return "Community Health Care"; + case _8: return "Counselling"; + case _36: return "Crisis Line (GPAH use only)"; + case _9: return "Death Services"; + case _10: return "Dental"; + case _11: return "Disability Support"; + case _12: return "Drug/Alcohol"; + case _13: return "Education & Learning"; + case _14: return "Emergency Department"; + case _15: return "Employment"; + case _16: return "Financial & Material aid"; + case _17: return "General Practice/GP (doctor)"; + case _35: return "Hospital"; + case _18: return "Housing/Homelessness"; + case _19: return "Interpreting"; + case _20: return "Justice"; + case _21: return "Legal"; + case _22: return "Mental Health"; + case _38: return "NDIA"; + case _23: return "Physical Activity & Recreation"; + case _24: return "Regulation"; + case _25: return "Respite/Carer Support"; + case _26: return "Specialist Clinical Pathology - requires referral"; + case _27: return "Specialist Medical - requires referral"; + case _28: return "Specialist Obstetrics & Gynaecology - requires referral"; + case _29: return "Specialist Paediatric - requires referral"; + case _30: return "Specialist Radiology/Imaging - requires referral"; + case _31: return "Specialist Surgical - requires referral"; + case _32: return "Support group/s"; + case _37: return "Test Message (HSD admin use only)"; + case _33: return "Transport"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Adoption"; + case _2: return "Aged Care"; + case _34: return "Allied Health"; + case _3: return "Alternative/Complementary Therapies"; + case _4: return "Child Care /Kindergarten"; + case _5: return "Child Development"; + case _6: return "Child Protection & Family Services"; + case _7: return "Community Health Care"; + case _8: return "Counselling"; + case _36: return "Crisis Line (GPAH use only)"; + case _9: return "Death Services"; + case _10: return "Dental"; + case _11: return "Disability Support"; + case _12: return "Drug/Alcohol"; + case _13: return "Education & Learning"; + case _14: return "Emergency Department"; + case _15: return "Employment"; + case _16: return "Financial & Material Aid"; + case _17: return "General Practice"; + case _35: return "Hospital"; + case _18: return "Housing/Homelessness"; + case _19: return "Interpreting"; + case _20: return "Justice"; + case _21: return "Legal"; + case _22: return "Mental Health"; + case _38: return "NDIA"; + case _23: return "Physical Activity & Recreation"; + case _24: return "Regulation"; + case _25: return "Respite/Carer Support"; + case _26: return "Specialist Clinical Pathology"; + case _27: return "Specialist Medical"; + case _28: return "Specialist Obstetrics & Gynaecology"; + case _29: return "Specialist Paediatric"; + case _30: return "Specialist Radiology/Imaging"; + case _31: return "Specialist Surgical"; + case _32: return "Support Group/s"; + case _37: return "Test Message (HSD admin)"; + case _33: return "Transport"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceCategoryEnumFactory.java new file mode 100644 index 00000000000..af87222de93 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceCategoryEnumFactory.java @@ -0,0 +1,206 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceCategoryEnumFactory implements EnumFactory { + + public ServiceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ServiceCategory._1; + if ("2".equals(codeString)) + return ServiceCategory._2; + if ("34".equals(codeString)) + return ServiceCategory._34; + if ("3".equals(codeString)) + return ServiceCategory._3; + if ("4".equals(codeString)) + return ServiceCategory._4; + if ("5".equals(codeString)) + return ServiceCategory._5; + if ("6".equals(codeString)) + return ServiceCategory._6; + if ("7".equals(codeString)) + return ServiceCategory._7; + if ("8".equals(codeString)) + return ServiceCategory._8; + if ("36".equals(codeString)) + return ServiceCategory._36; + if ("9".equals(codeString)) + return ServiceCategory._9; + if ("10".equals(codeString)) + return ServiceCategory._10; + if ("11".equals(codeString)) + return ServiceCategory._11; + if ("12".equals(codeString)) + return ServiceCategory._12; + if ("13".equals(codeString)) + return ServiceCategory._13; + if ("14".equals(codeString)) + return ServiceCategory._14; + if ("15".equals(codeString)) + return ServiceCategory._15; + if ("16".equals(codeString)) + return ServiceCategory._16; + if ("17".equals(codeString)) + return ServiceCategory._17; + if ("35".equals(codeString)) + return ServiceCategory._35; + if ("18".equals(codeString)) + return ServiceCategory._18; + if ("19".equals(codeString)) + return ServiceCategory._19; + if ("20".equals(codeString)) + return ServiceCategory._20; + if ("21".equals(codeString)) + return ServiceCategory._21; + if ("22".equals(codeString)) + return ServiceCategory._22; + if ("38".equals(codeString)) + return ServiceCategory._38; + if ("23".equals(codeString)) + return ServiceCategory._23; + if ("24".equals(codeString)) + return ServiceCategory._24; + if ("25".equals(codeString)) + return ServiceCategory._25; + if ("26".equals(codeString)) + return ServiceCategory._26; + if ("27".equals(codeString)) + return ServiceCategory._27; + if ("28".equals(codeString)) + return ServiceCategory._28; + if ("29".equals(codeString)) + return ServiceCategory._29; + if ("30".equals(codeString)) + return ServiceCategory._30; + if ("31".equals(codeString)) + return ServiceCategory._31; + if ("32".equals(codeString)) + return ServiceCategory._32; + if ("37".equals(codeString)) + return ServiceCategory._37; + if ("33".equals(codeString)) + return ServiceCategory._33; + throw new IllegalArgumentException("Unknown ServiceCategory code '"+codeString+"'"); + } + + public String toCode(ServiceCategory code) { + if (code == ServiceCategory._1) + return "1"; + if (code == ServiceCategory._2) + return "2"; + if (code == ServiceCategory._34) + return "34"; + if (code == ServiceCategory._3) + return "3"; + if (code == ServiceCategory._4) + return "4"; + if (code == ServiceCategory._5) + return "5"; + if (code == ServiceCategory._6) + return "6"; + if (code == ServiceCategory._7) + return "7"; + if (code == ServiceCategory._8) + return "8"; + if (code == ServiceCategory._36) + return "36"; + if (code == ServiceCategory._9) + return "9"; + if (code == ServiceCategory._10) + return "10"; + if (code == ServiceCategory._11) + return "11"; + if (code == ServiceCategory._12) + return "12"; + if (code == ServiceCategory._13) + return "13"; + if (code == ServiceCategory._14) + return "14"; + if (code == ServiceCategory._15) + return "15"; + if (code == ServiceCategory._16) + return "16"; + if (code == ServiceCategory._17) + return "17"; + if (code == ServiceCategory._35) + return "35"; + if (code == ServiceCategory._18) + return "18"; + if (code == ServiceCategory._19) + return "19"; + if (code == ServiceCategory._20) + return "20"; + if (code == ServiceCategory._21) + return "21"; + if (code == ServiceCategory._22) + return "22"; + if (code == ServiceCategory._38) + return "38"; + if (code == ServiceCategory._23) + return "23"; + if (code == ServiceCategory._24) + return "24"; + if (code == ServiceCategory._25) + return "25"; + if (code == ServiceCategory._26) + return "26"; + if (code == ServiceCategory._27) + return "27"; + if (code == ServiceCategory._28) + return "28"; + if (code == ServiceCategory._29) + return "29"; + if (code == ServiceCategory._30) + return "30"; + if (code == ServiceCategory._31) + return "31"; + if (code == ServiceCategory._32) + return "32"; + if (code == ServiceCategory._37) + return "37"; + if (code == ServiceCategory._33) + return "33"; + return "?"; + } + + public String toSystem(ServiceCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceModifiers.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceModifiers.java new file mode 100644 index 00000000000..80c29199dd0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceModifiers.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceModifiers { + + /** + * Services provided on the side of the road or such other non-conventional setting. + */ + SR, + /** + * Services provided outside or normal business hours. + */ + AH, + /** + * added to help the parsers + */ + NULL; + public static ServiceModifiers fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("sr".equals(codeString)) + return SR; + if ("ah".equals(codeString)) + return AH; + throw new FHIRException("Unknown ServiceModifiers code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SR: return "sr"; + case AH: return "ah"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-servicemodifier"; + } + public String getDefinition() { + switch (this) { + case SR: return "Services provided on the side of the road or such other non-conventional setting."; + case AH: return "Services provided outside or normal business hours."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SR: return "Side of the Road"; + case AH: return "After hours"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceModifiersEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceModifiersEnumFactory.java new file mode 100644 index 00000000000..9c78388ccd0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceModifiersEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceModifiersEnumFactory implements EnumFactory { + + public ServiceModifiers fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("sr".equals(codeString)) + return ServiceModifiers.SR; + if ("ah".equals(codeString)) + return ServiceModifiers.AH; + throw new IllegalArgumentException("Unknown ServiceModifiers code '"+codeString+"'"); + } + + public String toCode(ServiceModifiers code) { + if (code == ServiceModifiers.SR) + return "sr"; + if (code == ServiceModifiers.AH) + return "ah"; + return "?"; + } + + public String toSystem(ServiceModifiers code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePharmacy.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePharmacy.java new file mode 100644 index 00000000000..1449fc1b288 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePharmacy.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServicePharmacy { + + /** + * Smoking cessation + */ + SMOKECESS, + /** + * Flu Shot + */ + FLUSHOT, + /** + * The wholesale price of the medication. + */ + DRUGCOST, + /** + * The additional cost assessed on the drug. + */ + MARKUP, + /** + * The professional fee charged for dispensing the product or service. + */ + DISPENSEFEE, + /** + * The professional fee charged for compounding the medication. + */ + COMPOUNDFEE, + /** + * added to help the parsers + */ + NULL; + public static ServicePharmacy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("smokecess".equals(codeString)) + return SMOKECESS; + if ("flushot".equals(codeString)) + return FLUSHOT; + if ("drugcost".equals(codeString)) + return DRUGCOST; + if ("markup".equals(codeString)) + return MARKUP; + if ("dispensefee".equals(codeString)) + return DISPENSEFEE; + if ("compoundfee".equals(codeString)) + return COMPOUNDFEE; + throw new FHIRException("Unknown ServicePharmacy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SMOKECESS: return "smokecess"; + case FLUSHOT: return "flushot"; + case DRUGCOST: return "drugcost"; + case MARKUP: return "markup"; + case DISPENSEFEE: return "dispensefee"; + case COMPOUNDFEE: return "compoundfee"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-pharmaservice"; + } + public String getDefinition() { + switch (this) { + case SMOKECESS: return "Smoking cessation"; + case FLUSHOT: return "Flu Shot"; + case DRUGCOST: return "The wholesale price of the medication."; + case MARKUP: return "The additional cost assessed on the drug."; + case DISPENSEFEE: return "The professional fee charged for dispensing the product or service."; + case COMPOUNDFEE: return "The professional fee charged for compounding the medication."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SMOKECESS: return "Smoking cessation"; + case FLUSHOT: return "Flu Shot"; + case DRUGCOST: return "Drug Cost"; + case MARKUP: return "Markup"; + case DISPENSEFEE: return "Dispense Fee"; + case COMPOUNDFEE: return "Compounding Fee"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePharmacyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePharmacyEnumFactory.java new file mode 100644 index 00000000000..b81054f8a82 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePharmacyEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServicePharmacyEnumFactory implements EnumFactory { + + public ServicePharmacy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("smokecess".equals(codeString)) + return ServicePharmacy.SMOKECESS; + if ("flushot".equals(codeString)) + return ServicePharmacy.FLUSHOT; + if ("drugcost".equals(codeString)) + return ServicePharmacy.DRUGCOST; + if ("markup".equals(codeString)) + return ServicePharmacy.MARKUP; + if ("dispensefee".equals(codeString)) + return ServicePharmacy.DISPENSEFEE; + if ("compoundfee".equals(codeString)) + return ServicePharmacy.COMPOUNDFEE; + throw new IllegalArgumentException("Unknown ServicePharmacy code '"+codeString+"'"); + } + + public String toCode(ServicePharmacy code) { + if (code == ServicePharmacy.SMOKECESS) + return "smokecess"; + if (code == ServicePharmacy.FLUSHOT) + return "flushot"; + if (code == ServicePharmacy.DRUGCOST) + return "drugcost"; + if (code == ServicePharmacy.MARKUP) + return "markup"; + if (code == ServicePharmacy.DISPENSEFEE) + return "dispensefee"; + if (code == ServicePharmacy.COMPOUNDFEE) + return "compoundfee"; + return "?"; + } + + public String toSystem(ServicePharmacy code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePlace.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePlace.java new file mode 100644 index 00000000000..1820ff2f703 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePlace.java @@ -0,0 +1,222 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServicePlace { + + /** + * A facility or location where drugs and other medically related items and services are sold, dispensed, or otherwise provided directly to patients. + */ + _01, + /** + * A facility whose primary purpose is education. + */ + _03, + /** + * A facility or location whose primary purpose is to provide temporary housing to homeless individuals (e.g., emergency shelters, individual or family shelters). + */ + _04, + /** + * A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to American Indians and Alaska Natives who do not require hospitalization. + */ + _05, + /** + * A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services rendered by, or under the supervision of, physicians to American Indians and Alaska Natives admitted as inpatients or outpatients. + */ + _06, + /** + * A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members who do not require hospitalization. + */ + _07, + /** + * A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members admitted as inpatients or outpatients. + */ + _08, + /** + * A prison, jail, reformatory, work farm, detention center, or any other similar facility maintained by either Federal, State or local authorities for the purpose of confinement or rehabilitation of adult or juvenile criminal offenders. + */ + _09, + /** + * Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis. + */ + _11, + /** + * Location, other than a hospital or other facility, where the patient receives care in a private residence. + */ + _12, + /** + * Congregate residential facility with self-contained living units providing assessment of each resident's needs and on-site support 24 hours a day, 7 days a week, with the capacity to deliver or arrange for services including some health care and other services. + */ + _13, + /** + * A residence, with shared living areas, where clients receive supervision and other services such as social and/or behavioral services, custodial service, and minimal services (e.g., medication administration). + */ + _14, + /** + * A facility/unit that moves from place-to-place equipped to provide preventive, screening, diagnostic, and/or treatment services. + */ + _15, + /** + * portion of an off-campus hospital provider based department which provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services to sick or injured persons who do not require hospitalization or institutionalization. + */ + _19, + /** + * Location, distinct from a hospital emergency room, an office, or a clinic, whose purpose is to diagnose and treat illness or injury for unscheduled, ambulatory patients seeking immediate medical attention. + */ + _20, + /** + * A facility, other than psychiatric, which primarily provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services by, or under, the supervision of physicians to patients admitted for a variety of medical conditions. + */ + _21, + /** + * A land vehicle specifically designed, equipped and staffed for lifesaving and transporting the sick or injured. + */ + _41, + /** + * added to help the parsers + */ + NULL; + public static ServicePlace fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("01".equals(codeString)) + return _01; + if ("03".equals(codeString)) + return _03; + if ("04".equals(codeString)) + return _04; + if ("05".equals(codeString)) + return _05; + if ("06".equals(codeString)) + return _06; + if ("07".equals(codeString)) + return _07; + if ("08".equals(codeString)) + return _08; + if ("09".equals(codeString)) + return _09; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("19".equals(codeString)) + return _19; + if ("20".equals(codeString)) + return _20; + if ("21".equals(codeString)) + return _21; + if ("41".equals(codeString)) + return _41; + throw new FHIRException("Unknown ServicePlace code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _01: return "01"; + case _03: return "03"; + case _04: return "04"; + case _05: return "05"; + case _06: return "06"; + case _07: return "07"; + case _08: return "08"; + case _09: return "09"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _19: return "19"; + case _20: return "20"; + case _21: return "21"; + case _41: return "41"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-serviceplace"; + } + public String getDefinition() { + switch (this) { + case _01: return "A facility or location where drugs and other medically related items and services are sold, dispensed, or otherwise provided directly to patients."; + case _03: return "A facility whose primary purpose is education."; + case _04: return "A facility or location whose primary purpose is to provide temporary housing to homeless individuals (e.g., emergency shelters, individual or family shelters)."; + case _05: return "A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to American Indians and Alaska Natives who do not require hospitalization."; + case _06: return "A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services rendered by, or under the supervision of, physicians to American Indians and Alaska Natives admitted as inpatients or outpatients."; + case _07: return "A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members who do not require hospitalization."; + case _08: return "A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members admitted as inpatients or outpatients."; + case _09: return "A prison, jail, reformatory, work farm, detention center, or any other similar facility maintained by either Federal, State or local authorities for the purpose of confinement or rehabilitation of adult or juvenile criminal offenders."; + case _11: return "Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis."; + case _12: return "Location, other than a hospital or other facility, where the patient receives care in a private residence."; + case _13: return "Congregate residential facility with self-contained living units providing assessment of each resident's needs and on-site support 24 hours a day, 7 days a week, with the capacity to deliver or arrange for services including some health care and other services."; + case _14: return "A residence, with shared living areas, where clients receive supervision and other services such as social and/or behavioral services, custodial service, and minimal services (e.g., medication administration)."; + case _15: return "A facility/unit that moves from place-to-place equipped to provide preventive, screening, diagnostic, and/or treatment services."; + case _19: return "portion of an off-campus hospital provider based department which provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services to sick or injured persons who do not require hospitalization or institutionalization."; + case _20: return "Location, distinct from a hospital emergency room, an office, or a clinic, whose purpose is to diagnose and treat illness or injury for unscheduled, ambulatory patients seeking immediate medical attention."; + case _21: return "A facility, other than psychiatric, which primarily provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services by, or under, the supervision of physicians to patients admitted for a variety of medical conditions."; + case _41: return "A land vehicle specifically designed, equipped and staffed for lifesaving and transporting the sick or injured."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _01: return "Pharmacy"; + case _03: return "School"; + case _04: return "Homeless Shelter"; + case _05: return "Indian Health Service Free-standing Facility"; + case _06: return "Indian Health Service Provider-based Facility"; + case _07: return "Tribal 638 Free-Standing Facility"; + case _08: return "Tribal 638 Provider-Based Facility"; + case _09: return "Prison/Correctional Facility"; + case _11: return "Office"; + case _12: return "Home"; + case _13: return "Assisted Living Fa"; + case _14: return "Group Home"; + case _15: return "Mobile Unit"; + case _19: return "Off Campus-Outpatient Hospital"; + case _20: return "Urgent Care Facility"; + case _21: return "Inpatient Hospital"; + case _41: return "Ambulance—Land"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePlaceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePlaceEnumFactory.java new file mode 100644 index 00000000000..4db8fcc14ac --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServicePlaceEnumFactory.java @@ -0,0 +1,122 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServicePlaceEnumFactory implements EnumFactory { + + public ServicePlace fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("01".equals(codeString)) + return ServicePlace._01; + if ("03".equals(codeString)) + return ServicePlace._03; + if ("04".equals(codeString)) + return ServicePlace._04; + if ("05".equals(codeString)) + return ServicePlace._05; + if ("06".equals(codeString)) + return ServicePlace._06; + if ("07".equals(codeString)) + return ServicePlace._07; + if ("08".equals(codeString)) + return ServicePlace._08; + if ("09".equals(codeString)) + return ServicePlace._09; + if ("11".equals(codeString)) + return ServicePlace._11; + if ("12".equals(codeString)) + return ServicePlace._12; + if ("13".equals(codeString)) + return ServicePlace._13; + if ("14".equals(codeString)) + return ServicePlace._14; + if ("15".equals(codeString)) + return ServicePlace._15; + if ("19".equals(codeString)) + return ServicePlace._19; + if ("20".equals(codeString)) + return ServicePlace._20; + if ("21".equals(codeString)) + return ServicePlace._21; + if ("41".equals(codeString)) + return ServicePlace._41; + throw new IllegalArgumentException("Unknown ServicePlace code '"+codeString+"'"); + } + + public String toCode(ServicePlace code) { + if (code == ServicePlace._01) + return "01"; + if (code == ServicePlace._03) + return "03"; + if (code == ServicePlace._04) + return "04"; + if (code == ServicePlace._05) + return "05"; + if (code == ServicePlace._06) + return "06"; + if (code == ServicePlace._07) + return "07"; + if (code == ServicePlace._08) + return "08"; + if (code == ServicePlace._09) + return "09"; + if (code == ServicePlace._11) + return "11"; + if (code == ServicePlace._12) + return "12"; + if (code == ServicePlace._13) + return "13"; + if (code == ServicePlace._14) + return "14"; + if (code == ServicePlace._15) + return "15"; + if (code == ServicePlace._19) + return "19"; + if (code == ServicePlace._20) + return "20"; + if (code == ServicePlace._21) + return "21"; + if (code == ServicePlace._41) + return "41"; + return "?"; + } + + public String toSystem(ServicePlace code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProduct.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProduct.java new file mode 100644 index 00000000000..d9e415cf0f8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProduct.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceProduct { + + /** + * Exam + */ + EXAM, + /** + * Flu shot + */ + FLUSHOT, + /** + * added to help the parsers + */ + NULL; + public static ServiceProduct fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("exam".equals(codeString)) + return EXAM; + if ("flushot".equals(codeString)) + return FLUSHOT; + throw new FHIRException("Unknown ServiceProduct code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EXAM: return "exam"; + case FLUSHOT: return "flushot"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-serviceproduct"; + } + public String getDefinition() { + switch (this) { + case EXAM: return "Exam"; + case FLUSHOT: return "Flu shot"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EXAM: return "Exam"; + case FLUSHOT: return "Flu shot"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProductEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProductEnumFactory.java new file mode 100644 index 00000000000..e1d2f778a46 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProductEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceProductEnumFactory implements EnumFactory { + + public ServiceProduct fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("exam".equals(codeString)) + return ServiceProduct.EXAM; + if ("flushot".equals(codeString)) + return ServiceProduct.FLUSHOT; + throw new IllegalArgumentException("Unknown ServiceProduct code '"+codeString+"'"); + } + + public String toCode(ServiceProduct code) { + if (code == ServiceProduct.EXAM) + return "exam"; + if (code == ServiceProduct.FLUSHOT) + return "flushot"; + return "?"; + } + + public String toSystem(ServiceProduct code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProvisionConditions.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProvisionConditions.java new file mode 100644 index 00000000000..c9a50745ab3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProvisionConditions.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceProvisionConditions { + + /** + * This service is available for no patient cost. + */ + FREE, + /** + * There are discounts available on this service for qualifying patients. + */ + DISC, + /** + * Fees apply for this service. + */ + COST, + /** + * added to help the parsers + */ + NULL; + public static ServiceProvisionConditions fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("free".equals(codeString)) + return FREE; + if ("disc".equals(codeString)) + return DISC; + if ("cost".equals(codeString)) + return COST; + throw new FHIRException("Unknown ServiceProvisionConditions code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FREE: return "free"; + case DISC: return "disc"; + case COST: return "cost"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/service-provision-conditions"; + } + public String getDefinition() { + switch (this) { + case FREE: return "This service is available for no patient cost."; + case DISC: return "There are discounts available on this service for qualifying patients."; + case COST: return "Fees apply for this service."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FREE: return "Free"; + case DISC: return "Discounts Available"; + case COST: return "Fees apply"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProvisionConditionsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProvisionConditionsEnumFactory.java new file mode 100644 index 00000000000..7077ca47d43 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceProvisionConditionsEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceProvisionConditionsEnumFactory implements EnumFactory { + + public ServiceProvisionConditions fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("free".equals(codeString)) + return ServiceProvisionConditions.FREE; + if ("disc".equals(codeString)) + return ServiceProvisionConditions.DISC; + if ("cost".equals(codeString)) + return ServiceProvisionConditions.COST; + throw new IllegalArgumentException("Unknown ServiceProvisionConditions code '"+codeString+"'"); + } + + public String toCode(ServiceProvisionConditions code) { + if (code == ServiceProvisionConditions.FREE) + return "free"; + if (code == ServiceProvisionConditions.DISC) + return "disc"; + if (code == ServiceProvisionConditions.COST) + return "cost"; + return "?"; + } + + public String toSystem(ServiceProvisionConditions code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceReferralMethod.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceReferralMethod.java new file mode 100644 index 00000000000..2c09d4dcf79 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceReferralMethod.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceReferralMethod { + + /** + * Referrals may be accepted by fax. + */ + FAX, + /** + * Referrals may be accepted over the phone from a practitioner. + */ + PHONE, + /** + * Referrals may be accepted via a secure messaging system. To determine the types of secure messaging systems supported, refer to the identifiers collection. Callers will need to understand the specific identifier system used to know that they are able to transmit messages. + */ + ELEC, + /** + * Referrals may be accepted via a secure email. To send please encrypt with the services public key. + */ + SEMAIL, + /** + * Referrals may be accepted via regular postage (or hand delivered). + */ + MAIL, + /** + * added to help the parsers + */ + NULL; + public static ServiceReferralMethod fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fax".equals(codeString)) + return FAX; + if ("phone".equals(codeString)) + return PHONE; + if ("elec".equals(codeString)) + return ELEC; + if ("semail".equals(codeString)) + return SEMAIL; + if ("mail".equals(codeString)) + return MAIL; + throw new FHIRException("Unknown ServiceReferralMethod code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FAX: return "fax"; + case PHONE: return "phone"; + case ELEC: return "elec"; + case SEMAIL: return "semail"; + case MAIL: return "mail"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/service-referral-method"; + } + public String getDefinition() { + switch (this) { + case FAX: return "Referrals may be accepted by fax."; + case PHONE: return "Referrals may be accepted over the phone from a practitioner."; + case ELEC: return "Referrals may be accepted via a secure messaging system. To determine the types of secure messaging systems supported, refer to the identifiers collection. Callers will need to understand the specific identifier system used to know that they are able to transmit messages."; + case SEMAIL: return "Referrals may be accepted via a secure email. To send please encrypt with the services public key."; + case MAIL: return "Referrals may be accepted via regular postage (or hand delivered)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FAX: return "Fax"; + case PHONE: return "Phone"; + case ELEC: return "Secure Messaging"; + case SEMAIL: return "Secure Email"; + case MAIL: return "Mail"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceReferralMethodEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceReferralMethodEnumFactory.java new file mode 100644 index 00000000000..4027a98c5b4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceReferralMethodEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceReferralMethodEnumFactory implements EnumFactory { + + public ServiceReferralMethod fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("fax".equals(codeString)) + return ServiceReferralMethod.FAX; + if ("phone".equals(codeString)) + return ServiceReferralMethod.PHONE; + if ("elec".equals(codeString)) + return ServiceReferralMethod.ELEC; + if ("semail".equals(codeString)) + return ServiceReferralMethod.SEMAIL; + if ("mail".equals(codeString)) + return ServiceReferralMethod.MAIL; + throw new IllegalArgumentException("Unknown ServiceReferralMethod code '"+codeString+"'"); + } + + public String toCode(ServiceReferralMethod code) { + if (code == ServiceReferralMethod.FAX) + return "fax"; + if (code == ServiceReferralMethod.PHONE) + return "phone"; + if (code == ServiceReferralMethod.ELEC) + return "elec"; + if (code == ServiceReferralMethod.SEMAIL) + return "semail"; + if (code == ServiceReferralMethod.MAIL) + return "mail"; + return "?"; + } + + public String toSystem(ServiceReferralMethod code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceType.java new file mode 100644 index 00000000000..2427603f33f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceType.java @@ -0,0 +1,5433 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceType { + + /** + * Adoption & permanent care information/support + */ + _1, + /** + * Aged care assessment + */ + _2, + /** + * Aged Care information/referral + */ + _3, + /** + * Aged Residential Care + */ + _4, + /** + * Case management for older persons + */ + _5, + /** + * Delivered meals (meals on wheels) + */ + _6, + /** + * Friendly visiting + */ + _7, + /** + * Home care/housekeeping assistance + */ + _8, + /** + * Home maintenance and repair + */ + _9, + /** + * Personal alarms/alerts + */ + _10, + /** + * Personal care for older persons + */ + _11, + /** + * Planned activity groups + */ + _12, + /** + * Acupuncture + */ + _13, + /** + * Alexander technique therapy + */ + _14, + /** + * Aromatherapy + */ + _15, + /** + * Biorhythm services + */ + _16, + /** + * Bowen therapy + */ + _17, + /** + * Chinese herbal medicine + */ + _18, + /** + * Feldenkrais + */ + _19, + /** + * Homoeopathy + */ + _20, + /** + * Hydrotherapy + */ + _21, + /** + * Hypnotherapy + */ + _22, + /** + * Kinesiology + */ + _23, + /** + * Magnetic therapy + */ + _24, + /** + * Massage therapy + */ + _25, + /** + * Meditation + */ + _26, + /** + * Myotherapy + */ + _27, + /** + * Naturopathy + */ + _28, + /** + * Reflexology + */ + _29, + /** + * Reiki + */ + _30, + /** + * Relaxation therapy + */ + _31, + /** + * Shiatsu + */ + _32, + /** + * Western herbal medicine + */ + _33, + /** + * Family day care + */ + _34, + /** + * Holiday programs + */ + _35, + /** + * Kindergarten inclusion support for children with a disability + */ + _36, + /** + * Kindergarten/preschool + */ + _37, + /** + * Long day child care + */ + _38, + /** + * Occasional child care + */ + _39, + /** + * Outside school hours care + */ + _40, + /** + * Children's play programs + */ + _41, + /** + * Parenting & family management support/education + */ + _42, + /** + * Playgroup + */ + _43, + /** + * School nursing + */ + _44, + /** + * Toy library + */ + _45, + /** + * Child protection/child abuse report + */ + _46, + /** + * Foster care + */ + _47, + /** + * Residential/ out of home care + */ + _48, + /** + * Support for young people leaving care + */ + _49, + /** + * Audiology + */ + _50, + /** + * Blood donation + */ + _51, + /** + * Chiropractic + */ + _52, + /** + * Dietetics + */ + _53, + /** + * Family planning + */ + _54, + /** + * Health advocacy/Liaison service + */ + _55, + /** + * Health information/referral + */ + _56, + /** + * Immunization + */ + _57, + /** + * Maternal & child health + */ + _58, + /** + * Nursing + */ + _59, + /** + * Nutrition + */ + _60, + /** + * Occupational therapy + */ + _61, + /** + * Optometry + */ + _62, + /** + * Osteopathy + */ + _63, + /** + * Pharmacy + */ + _64, + /** + * Physiotherapy + */ + _65, + /** + * Podiatry + */ + _66, + /** + * Sexual health + */ + _67, + /** + * Speech pathology/therapy + */ + _68, + /** + * Bereavement counselling + */ + _69, + /** + * Crisis counselling + */ + _70, + /** + * Family counselling and/or family therapy + */ + _71, + /** + * Family violence counselling + */ + _72, + /** + * Financial counselling + */ + _73, + /** + * Generalist counselling + */ + _74, + /** + * Genetic counselling + */ + _75, + /** + * Health counselling + */ + _76, + /** + * Mediation + */ + _77, + /** + * Problem gambling counselling + */ + _78, + /** + * Relationship counselling + */ + _79, + /** + * Sexual assault counselling + */ + _80, + /** + * Trauma counselling + */ + _81, + /** + * Victims of crime counselling + */ + _82, + /** + * Cemetery operation + */ + _83, + /** + * Cremation + */ + _84, + /** + * Death service information + */ + _85, + /** + * Funeral services + */ + _86, + /** + * Endodontic + */ + _87, + /** + * General dental + */ + _88, + /** + * Oral medicine + */ + _89, + /** + * Oral surgery + */ + _90, + /** + * Orthodontic + */ + _91, + /** + * Paediatric Dentistry + */ + _92, + /** + * Periodontic + */ + _93, + /** + * Prosthodontic + */ + _94, + /** + * Acquired brain injury information/referral + */ + _95, + /** + * Disability advocacy + */ + _96, + /** + * Disability aids & equipment + */ + _97, + /** + * Disability case management + */ + _98, + /** + * Disability day programs & activities + */ + _99, + /** + * Disability information/referral + */ + _100, + /** + * Disability support packages + */ + _101, + /** + * Disability supported accommodation + */ + _102, + /** + * Early childhood intervention + */ + _103, + /** + * Hearing aids & equipment + */ + _104, + /** + * Drug and/or alcohol counselling + */ + _105, + /** + * Drug and/or alcohol information/referral + */ + _106, + /** + * Needle & Syringe exchange + */ + _107, + /** + * Non-residential alcohol and/or drug dependence treatment + */ + _108, + /** + * Pharmacotherapy (eg. methadone) program + */ + _109, + /** + * Quit program + */ + _110, + /** + * Residential alcohol and/or drug dependence treatment + */ + _111, + /** + * Adult/community education + */ + _112, + /** + * Higher education + */ + _113, + /** + * Primary education + */ + _114, + /** + * Secondary education + */ + _115, + /** + * Training & vocational education + */ + _116, + /** + * Emergency medical + */ + _117, + /** + * Employment placement and/or support + */ + _118, + /** + * Vocational Rehabilitation + */ + _119, + /** + * Workplace safety and/or accident prevention + */ + _120, + /** + * Financial assistance + */ + _121, + /** + * Financial information/advice + */ + _122, + /** + * Material aid + */ + _123, + /** + * General Practice/GP (doctor) + */ + _124, + /** + * Accommodation placement and/or support + */ + _125, + /** + * Crisis/emergency accommodation + */ + _126, + /** + * Homelessness support + */ + _127, + /** + * Housing information/referral + */ + _128, + /** + * Public rental housing + */ + _129, + /** + * Interpreting/Multilingual/Language service + */ + _130, + /** + * Juvenile Justice + */ + _131, + /** + * Legal advocacy + */ + _132, + /** + * Legal information/advice/referral + */ + _133, + /** + * Mental health advocacy + */ + _134, + /** + * Mental health assessment/triage/crisis response + */ + _135, + /** + * Mental health case management/continuing care + */ + _136, + /** + * Mental health information/referral + */ + _137, + /** + * Mental health inpatient services (hospital psychiatric unit) - requires referral + */ + _138, + /** + * Mental health non-residential rehabilitation + */ + _139, + /** + * Mental health residential rehabilitation/community care unit + */ + _140, + /** + * Psychiatry (requires referral) + */ + _141, + /** + * Psychology + */ + _142, + /** + * Martial arts + */ + _143, + /** + * Personal fitness training + */ + _144, + /** + * Physical activity group + */ + _145, + /** + * Physical activity programs + */ + _146, + /** + * Physical fitness testing + */ + _147, + /** + * Pilates + */ + _148, + /** + * Self defence + */ + _149, + /** + * Sporting club + */ + _150, + /** + * Yoga + */ + _151, + /** + * Food safety + */ + _152, + /** + * Health regulatory, inspection and/or certification + */ + _153, + /** + * Workplace health and/or safety inspection and/or certification + */ + _154, + /** + * Carer support + */ + _155, + /** + * Respite care + */ + _156, + /** + * Anatomical Pathology (including Cytopathology & Forensic Pathology) + */ + _157, + /** + * Pathology - Clinical Chemistry + */ + _158, + /** + * Pathology - General + */ + _159, + /** + * Pathology - Genetics + */ + _160, + /** + * Pathology - Haematology + */ + _161, + /** + * Pathology - Immunology + */ + _162, + /** + * Pathology - Microbiology + */ + _163, + /** + * Anaesthesiology - Pain Medicine + */ + _164, + /** + * Cardiology + */ + _165, + /** + * Clinical Genetics + */ + _166, + /** + * Clinical Pharmacology + */ + _167, + /** + * Dermatology + */ + _168, + /** + * Endocrinology + */ + _169, + /** + * Gastroenterology & Hepatology + */ + _170, + /** + * Geriatric medicine + */ + _171, + /** + * Immunology & Allergy + */ + _172, + /** + * Infectious diseases + */ + _173, + /** + * Intensive care medicine + */ + _174, + /** + * Medical Oncology + */ + _175, + /** + * Nephrology + */ + _176, + /** + * Neurology + */ + _177, + /** + * Occupational Medicine + */ + _178, + /** + * Palliative Medicine + */ + _179, + /** + * Public Health Medicine + */ + _180, + /** + * Rehabilitation Medicine + */ + _181, + /** + * Rheumatology + */ + _182, + /** + * Sleep Medicine + */ + _183, + /** + * Thoracic medicine + */ + _184, + /** + * Gynaecological Oncology + */ + _185, + /** + * Obstetrics & Gynaecology + */ + _186, + /** + * Reproductive Endocrinology & Infertility + */ + _187, + /** + * Urogynaecology + */ + _188, + /** + * Neonatology & Perinatology + */ + _189, + /** + * Paediatric Cardiology + */ + _190, + /** + * Paediatric Clinical Genetics + */ + _191, + /** + * Paediatric Clinical Pharmacology + */ + _192, + /** + * Paediatric Endocrinology + */ + _193, + /** + * Paediatric Gastroenterology & Hepatology + */ + _194, + /** + * Paediatric Haematology + */ + _195, + /** + * Paediatric Immunology & Allergy + */ + _196, + /** + * Paediatric Infectious diseases + */ + _197, + /** + * Paediatric intensive care medicine + */ + _198, + /** + * Paediatric Medical Oncology + */ + _199, + /** + * Paediatric Medicine + */ + _200, + /** + * Paediatric Nephrology + */ + _201, + /** + * Paediatric Neurology + */ + _202, + /** + * Paediatric Nuclear Medicine + */ + _203, + /** + * Paediatric Rehabilitation Medicine + */ + _204, + /** + * Paediatric Rheumatology + */ + _205, + /** + * Paediatric Sleep Medicine + */ + _206, + /** + * Paediatric Surgery + */ + _207, + /** + * Paediatric Thoracic Medicine + */ + _208, + /** + * Diagnostic Radiology/Xray/CT/Fluoroscopy + */ + _209, + /** + * Diagnostic Ultrasound + */ + _210, + /** + * Magnetic Resonance Imaging (MRI) + */ + _211, + /** + * Nuclear Medicine + */ + _212, + /** + * Obstetric & Gynaecological Ultrasound + */ + _213, + /** + * Radiation oncology + */ + _214, + /** + * Cardiothoracic surgery + */ + _215, + /** + * Neurosurgery + */ + _216, + /** + * Ophthalmology + */ + _217, + /** + * Orthopaedic surgery + */ + _218, + /** + * Otolaryngology - Head & Neck Surgery + */ + _219, + /** + * Plastic & Reconstructive Surgery + */ + _220, + /** + * Surgery - General + */ + _221, + /** + * Urology + */ + _222, + /** + * Vascular surgery + */ + _223, + /** + * Support groups + */ + _224, + /** + * Air ambulance + */ + _225, + /** + * Ambulance + */ + _226, + /** + * Blood transport + */ + _227, + /** + * Community bus + */ + _228, + /** + * Flying doctor service + */ + _229, + /** + * Patient transport + */ + _230, + /** + * A&E + */ + _231, + /** + * A&EP + */ + _232, + /** + * Abuse + */ + _233, + /** + * ACAS + */ + _234, + /** + * Access + */ + _235, + /** + * Accident + */ + _236, + /** + * Acute Inpatient Service's + */ + _237, + /** + * Adult Day Programs + */ + _238, + /** + * Adult Mental Health Services + */ + _239, + /** + * Advice + */ + _240, + /** + * Advocacy + */ + _241, + /** + * Aged Persons Mental Health Residential Units + */ + _242, + /** + * Aged Persons Mental Health Services + */ + _243, + /** + * Aged Persons Mental Health Teams + */ + _244, + /** + * Aids + */ + _245, + /** + * Al-Anon + */ + _246, + /** + * Alcohol + */ + _247, + /** + * Al-Teen + */ + _248, + /** + * Antenatal + */ + _249, + /** + * Anxiety + */ + _250, + /** + * Arthritis + */ + _251, + /** + * Assessment + */ + _252, + /** + * Assistance + */ + _253, + /** + * Asthma + */ + _254, + /** + * ATSS + */ + _255, + /** + * Attendant Care + */ + _256, + /** + * Babies + */ + _257, + /** + * Bathroom Modification + */ + _258, + /** + * Behaviour + */ + _259, + /** + * Behaviour Intervention + */ + _260, + /** + * Bereavement + */ + _261, + /** + * Bipolar + */ + _262, + /** + * Birth + */ + _263, + /** + * Birth Control + */ + _264, + /** + * Birthing Options + */ + _265, + /** + * BIST + */ + _266, + /** + * Blood + */ + _267, + /** + * Bone + */ + _268, + /** + * Bowel + */ + _269, + /** + * Brain + */ + _270, + /** + * Breast Feeding + */ + _271, + /** + * Breast Screen + */ + _272, + /** + * Brokerage + */ + _273, + /** + * Cancer + */ + _274, + /** + * Cancer Support + */ + _275, + /** + * Cardiovascular Disease + */ + _276, + /** + * Care Packages + */ + _277, + /** + * Carer + */ + _278, + /** + * Case Management + */ + _279, + /** + * Casualty + */ + _280, + /** + * Centrelink + */ + _281, + /** + * Chemists + */ + _282, + /** + * Child And Adolescent Mental Health Services + */ + _283, + /** + * Child Care + */ + _284, + /** + * Child Services + */ + _285, + /** + * Children + */ + _286, + /** + * Children's Services + */ + _287, + /** + * Cholesterol + */ + _288, + /** + * Clothing + */ + _289, + /** + * Community Based Accommodation + */ + _290, + /** + * Community Care Unit + */ + _291, + /** + * Community Child And Adolescent Mental Health Services + */ + _292, + /** + * Community Health + */ + _293, + /** + * Community Residential Unit + */ + _294, + /** + * Community Transport + */ + _295, + /** + * Companion Visiting + */ + _296, + /** + * Companionship + */ + _297, + /** + * Consumer Advice + */ + _298, + /** + * Consumer Issues + */ + _299, + /** + * Continuing Care Services + */ + _300, + /** + * Contraception Information + */ + _301, + /** + * Coordinating Bodies + */ + _302, + /** + * Correctional Services + */ + _303, + /** + * Council Environmental Health + */ + _304, + /** + * Counselling + */ + _305, + /** + * Criminal + */ + _306, + /** + * Crises + */ + _307, + /** + * Crisis Assessment And Treatment Services (Cats) + */ + _308, + /** + * Crisis Assistance + */ + _309, + /** + * Crisis Refuge + */ + _310, + /** + * Day Program + */ + _311, + /** + * Deaf + */ + _312, + /** + * Dental Hygiene + */ + _313, + /** + * Dentistry + */ + _314, + /** + * Dentures + */ + _315, + /** + * Depression + */ + _316, + /** + * Detoxification + */ + _317, + /** + * Diabetes + */ + _318, + /** + * Diaphragm Fitting + */ + _319, + /** + * Dieticians + */ + _320, + /** + * Disabled Parking + */ + _321, + /** + * District Nursing + */ + _322, + /** + * Divorce + */ + _323, + /** + * Doctors + */ + _324, + /** + * Drink-Drive + */ + _325, + /** + * Dual Diagnosis Services + */ + _326, + /** + * Early Choice + */ + _327, + /** + * Eating Disorder + */ + _328, + /** + * Emergency Relief + */ + _330, + /** + * Employment And Training + */ + _331, + /** + * Environment + */ + _332, + /** + * Equipment + */ + _333, + /** + * Exercise + */ + _334, + /** + * Facility + */ + _335, + /** + * Family Choice + */ + _336, + /** + * Family Law + */ + _337, + /** + * Family Options + */ + _338, + /** + * Family Services + */ + _339, + /** + * FFYA + */ + _340, + /** + * Financial Aid + */ + _341, + /** + * Fitness + */ + _342, + /** + * Flexible Care Packages + */ + _343, + /** + * Food + */ + _344, + /** + * Food Vouchers + */ + _345, + /** + * Forensic Mental Health Services + */ + _346, + /** + * Futures + */ + _347, + /** + * Futures For Young Adults + */ + _348, + /** + * General Practitioners + */ + _349, + /** + * Grants + */ + _350, + /** + * Grief + */ + _351, + /** + * Grief Counselling + */ + _352, + /** + * HACC + */ + _353, + /** + * Heart Disease + */ + _354, + /** + * Help + */ + _355, + /** + * High Blood Pressure + */ + _356, + /** + * Home Help + */ + _357, + /** + * Home Nursing + */ + _358, + /** + * Homefirst + */ + _359, + /** + * Hospice Care + */ + _360, + /** + * Hospital Services + */ + _361, + /** + * Hospital To Home + */ + _362, + /** + * Hostel + */ + _364, + /** + * Hostel Accommodation + */ + _365, + /** + * Household Items + */ + _366, + /** + * Hypertension + */ + _367, + /** + * Illness + */ + _368, + /** + * Independent Living + */ + _369, + /** + * Information + */ + _370, + /** + * Injury + */ + _371, + /** + * Intake + */ + _372, + /** + * Intensive Mobile Youth Outreach Services (Imyos) + */ + _373, + /** + * Intervention + */ + _374, + /** + * Job Searching + */ + _375, + /** + * Justice + */ + _376, + /** + * Leisure + */ + _377, + /** + * Loans + */ + _378, + /** + * Low Income Earners + */ + _379, + /** + * Lung + */ + _380, + /** + * Making A Difference + */ + _381, + /** + * Medical Services + */ + _382, + /** + * Medical Specialists + */ + _383, + /** + * Medication Administration + */ + _384, + /** + * Menstrual Information + */ + _385, + /** + * Methadone + */ + _386, + /** + * Mobile Support And Treatment Services (MSTS) + */ + _387, + /** + * Motor Neurone + */ + _388, + /** + * Multiple Sclerosis + */ + _389, + /** + * Neighbourhood House + */ + _390, + /** + * Nursing Home + */ + _391, + /** + * Nursing Mothers + */ + _392, + /** + * Obesity + */ + _393, + /** + * Occupational Health & Safety + */ + _394, + /** + * Optometrist + */ + _395, + /** + * Oral Hygiene + */ + _396, + /** + * Outpatients + */ + _397, + /** + * Outreach Service + */ + _398, + /** + * PADP + */ + _399, + /** + * Pain + */ + _400, + /** + * Pap Smear + */ + _401, + /** + * Parenting + */ + _402, + /** + * Peak Organisations + */ + _403, + /** + * Personal Care + */ + _404, + /** + * Pharmacies + */ + _405, + /** + * Phobias + */ + _406, + /** + * Physical + */ + _407, + /** + * Physical Activity + */ + _408, + /** + * Postnatal + */ + _409, + /** + * Pregnancy + */ + _410, + /** + * Pregnancy Tests + */ + _411, + /** + * Preschool + */ + _412, + /** + * Prescriptions + */ + _413, + /** + * Primary Mental Health And Early Intervention Teams + */ + _414, + /** + * Property Maintenance + */ + _415, + /** + * Prostate + */ + _416, + /** + * Psychiatric + */ + _417, + /** + * Psychiatric Disability Support Services - Home-Based Outreach + */ + _418, + /** + * Psychiatric Disability Support Services - Planned Respite + */ + _419, + /** + * Psychiatric Disability Support Services - Residential Rehabilitation + */ + _420, + /** + * Psychiatric Disability Support Services Home-Based Outreach + */ + _421, + /** + * Psychiatric Disability Support Services Mutual Support And Self Help + */ + _422, + /** + * Psychiatric Support + */ + _423, + /** + * Recreation + */ + _424, + /** + * Referral + */ + _425, + /** + * Refuge + */ + _426, + /** + * Rent Assistance + */ + _427, + /** + * Residential Facilities + */ + _428, + /** + * Residential Respite + */ + _429, + /** + * Respiratory + */ + _430, + /** + * Response + */ + _431, + /** + * Rooming Houses + */ + _432, + /** + * Safe Sex + */ + _433, + /** + * Secure Extended Care Inpatient Services + */ + _434, + /** + * Self Help + */ + _435, + /** + * Separation + */ + _436, + /** + * Services + */ + _437, + /** + * Sex Education + */ + _438, + /** + * Sexual Abuse + */ + _439, + /** + * Sexual Issues + */ + _440, + /** + * Sexually Transmitted Diseases + */ + _441, + /** + * SIDS + */ + _442, + /** + * Social Support + */ + _443, + /** + * Socialisation + */ + _444, + /** + * Special Needs + */ + _445, + /** + * Speech Therapist + */ + _446, + /** + * Splinting + */ + _447, + /** + * Sport + */ + _448, + /** + * Statewide And Specialist Services + */ + _449, + /** + * STD + */ + _450, + /** + * STI + */ + _451, + /** + * Stillbirth + */ + _452, + /** + * Stomal Care + */ + _453, + /** + * Stroke + */ + _454, + /** + * Substance Abuse + */ + _455, + /** + * Support + */ + _456, + /** + * Syringes + */ + _457, + /** + * Teeth + */ + _458, + /** + * Tenancy Advice + */ + _459, + /** + * Terminal Illness + */ + _460, + /** + * Therapy + */ + _461, + /** + * Transcription + */ + _462, + /** + * Translating Services + */ + _463, + /** + * Translator + */ + _464, + /** + * Transport + */ + _465, + /** + * Vertebrae + */ + _466, + /** + * Violence + */ + _467, + /** + * Vocational Guidance + */ + _468, + /** + * Weight + */ + _469, + /** + * Welfare Assistance + */ + _470, + /** + * Welfare Counselling + */ + _471, + /** + * Wheelchairs + */ + _472, + /** + * Wound Management + */ + _473, + /** + * Young People At Risk + */ + _474, + /** + * Further Description - Community Health Care + */ + _475, + /** + * Library + */ + _476, + /** + * Community Hours + */ + _477, + /** + * Further Description - Specialist Medical + */ + _478, + /** + * Hepatology + */ + _479, + /** + * Gastroenterology + */ + _480, + /** + * Gynaecology + */ + _481, + /** + * Obstetrics + */ + _482, + /** + * Further Description - Specialist Surgical + */ + _483, + /** + * Placement Protection + */ + _484, + /** + * Family Violence + */ + _485, + /** + * Integrated Family Services + */ + _486, + /** + * Diabetes Educator + */ + _488, + /** + * Kinship Care + */ + _489, + /** + * General Mental Health Services + */ + _490, + /** + * Exercise Physiology + */ + _491, + /** + * Medical Research + */ + _492, + /** + * Youth + */ + _493, + /** + * Youth Services + */ + _494, + /** + * Youth Health + */ + _495, + /** + * Child and Family Services + */ + _496, + /** + * Home Visits + */ + _497, + /** + * Mobile Services + */ + _498, + /** + * Before and/or After School Care + */ + _500, + /** + * Cancer Services + */ + _501, + /** + * Integrated Cancer Services + */ + _502, + /** + * Multidisciplinary Services + */ + _503, + /** + * Multidisciplinary Cancer Services + */ + _504, + /** + * Meetings + */ + _505, + /** + * Blood pressure monitoring + */ + _506, + /** + * Dose administration aid + */ + _507, + /** + * Medical Equipment Hire + */ + _508, + /** + * Parenting & family support/education + */ + _509, + /** + * Deputising Service + */ + _510, + /** + * Cancer Support Groups + */ + _513, + /** + * Community Cancer Services + */ + _514, + /** + * Disability Care Transport + */ + _530, + /** + * Aged Care Transport + */ + _531, + /** + * Diabetes Education service + */ + _532, + /** + * Cardiac Rehabilitation Service + */ + _533, + /** + * Young Adult Diabetes services (YADS) + */ + _534, + /** + * Pulmonary Rehabilitation Service + */ + _535, + /** + * Art therapy + */ + _536, + /** + * Medication Reviews + */ + _537, + /** + * Telephone Counselling + */ + _538, + /** + * Telephone Help Line + */ + _539, + /** + * Online Service + */ + _540, + /** + * Crisis - Mental Health + */ + _541, + /** + * Youth Crisis + */ + _542, + /** + * Sexual Assault + */ + _543, + /** + * GPAH Other + */ + _544, + /** + * Paediatric Dermatology + */ + _545, + /** + * Veterans Services + */ + _546, + /** + * Veterans + */ + _547, + /** + * Food Relief/food/meals + */ + _548, + /** + * Dementia Care + */ + _550, + /** + * Alzheimer + */ + _551, + /** + * Drug and/or alcohol support groups + */ + _552, + /** + * One on One Support/Mentoring/Coaching + */ + _553, + /** + * Chronic Disease Management + */ + _554, + /** + * Liaison Services + */ + _555, + /** + * Walk in Centre / non emergency + */ + _556, + /** + * Inpatients + */ + _557, + /** + * Spiritual Counselling + */ + _558, + /** + * Women's Health + */ + _559, + /** + * Men's Health + */ + _560, + /** + * Health education/Health awareness program + */ + _561, + /** + * Test Message + */ + _562, + /** + * Remedial Massage + */ + _563, + /** + * Adolescent Mental Health Services + */ + _564, + /** + * Youth drop in/assistance/support + */ + _565, + /** + * Aboriginal Health Worker + */ + _566, + /** + * Women's Health Clinic + */ + _567, + /** + * Men's Health Clinic + */ + _568, + /** + * Migrant Health Clinic + */ + _569, + /** + * Refugee Health Clinic + */ + _570, + /** + * Aboriginal Health Clinic + */ + _571, + /** + * Nurse Practitioner lead Clinic/s + */ + _572, + /** + * Nurse lead Clinic/s + */ + _573, + /** + * Culturally tailored support groups + */ + _574, + /** + * Culturally tailored health promotion + */ + _575, + /** + * Rehabilitation + */ + _576, + /** + * Education information/referral + */ + _577, + /** + * Social Work + */ + _580, + /** + * Haematology + */ + _581, + /** + * Maternity Shared Care + */ + _582, + /** + * Rehabilitation Service + */ + _583, + /** + * Cranio-Sacral Therapy + */ + _584, + /** + * Prosthetics & Orthotics + */ + _585, + /** + * Home Medicine Review + */ + _589, + /** + * GPAH - Medical + */ + _590, + /** + * Music Therapy + */ + _591, + /** + * Falls Prevention + */ + _593, + /** + * Accommodation/Tenancy + */ + _599, + /** + * Assess-Skill, Ability, Needs + */ + _600, + /** + * Assist Access/Maintain Employ + */ + _601, + /** + * Assist Prod-Pers Care/Safety + */ + _602, + /** + * Assist-Integrate School/Ed + */ + _603, + /** + * Assist-Life Stage, Transition + */ + _604, + /** + * Assist-Personal Activities + */ + _605, + /** + * Assist-Travel/Transport + */ + _606, + /** + * Assistive Equip-General Tasks + */ + _607, + /** + * Assistive Equip-Recreation + */ + _608, + /** + * Assistive Prod-Household Task + */ + _609, + /** + * Behaviour Support + */ + _610, + /** + * Comms & Info Equipment + */ + _611, + /** + * Community Nursing Care + */ + _612, + /** + * Daily Tasks/Shared Living + */ + _613, + /** + * Development-Life Skills + */ + _614, + /** + * Early Childhood Supports + */ + _615, + /** + * Equipment Special Assess Setup + */ + _616, + /** + * Hearing Equipment + */ + _617, + /** + * Home Modification + */ + _618, + /** + * Household Tasks + */ + _619, + /** + * Interpret/Translate + */ + _620, + /** + * Other Innovative Supports + */ + _621, + /** + * Participate Community + */ + _622, + /** + * Personal Mobility Equipment + */ + _623, + /** + * Physical Wellbeing + */ + _624, + /** + * Plan Management + */ + _625, + /** + * Therapeutic Supports + */ + _626, + /** + * Training-Travel Independence + */ + _627, + /** + * Vehicle modifications + */ + _628, + /** + * Vision Equipment + */ + _629, + /** + * added to help the parsers + */ + NULL; + public static ServiceType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("9".equals(codeString)) + return _9; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("19".equals(codeString)) + return _19; + if ("20".equals(codeString)) + return _20; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("29".equals(codeString)) + return _29; + if ("30".equals(codeString)) + return _30; + if ("31".equals(codeString)) + return _31; + if ("32".equals(codeString)) + return _32; + if ("33".equals(codeString)) + return _33; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("39".equals(codeString)) + return _39; + if ("40".equals(codeString)) + return _40; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + if ("49".equals(codeString)) + return _49; + if ("50".equals(codeString)) + return _50; + if ("51".equals(codeString)) + return _51; + if ("52".equals(codeString)) + return _52; + if ("53".equals(codeString)) + return _53; + if ("54".equals(codeString)) + return _54; + if ("55".equals(codeString)) + return _55; + if ("56".equals(codeString)) + return _56; + if ("57".equals(codeString)) + return _57; + if ("58".equals(codeString)) + return _58; + if ("59".equals(codeString)) + return _59; + if ("60".equals(codeString)) + return _60; + if ("61".equals(codeString)) + return _61; + if ("62".equals(codeString)) + return _62; + if ("63".equals(codeString)) + return _63; + if ("64".equals(codeString)) + return _64; + if ("65".equals(codeString)) + return _65; + if ("66".equals(codeString)) + return _66; + if ("67".equals(codeString)) + return _67; + if ("68".equals(codeString)) + return _68; + if ("69".equals(codeString)) + return _69; + if ("70".equals(codeString)) + return _70; + if ("71".equals(codeString)) + return _71; + if ("72".equals(codeString)) + return _72; + if ("73".equals(codeString)) + return _73; + if ("74".equals(codeString)) + return _74; + if ("75".equals(codeString)) + return _75; + if ("76".equals(codeString)) + return _76; + if ("77".equals(codeString)) + return _77; + if ("78".equals(codeString)) + return _78; + if ("79".equals(codeString)) + return _79; + if ("80".equals(codeString)) + return _80; + if ("81".equals(codeString)) + return _81; + if ("82".equals(codeString)) + return _82; + if ("83".equals(codeString)) + return _83; + if ("84".equals(codeString)) + return _84; + if ("85".equals(codeString)) + return _85; + if ("86".equals(codeString)) + return _86; + if ("87".equals(codeString)) + return _87; + if ("88".equals(codeString)) + return _88; + if ("89".equals(codeString)) + return _89; + if ("90".equals(codeString)) + return _90; + if ("91".equals(codeString)) + return _91; + if ("92".equals(codeString)) + return _92; + if ("93".equals(codeString)) + return _93; + if ("94".equals(codeString)) + return _94; + if ("95".equals(codeString)) + return _95; + if ("96".equals(codeString)) + return _96; + if ("97".equals(codeString)) + return _97; + if ("98".equals(codeString)) + return _98; + if ("99".equals(codeString)) + return _99; + if ("100".equals(codeString)) + return _100; + if ("101".equals(codeString)) + return _101; + if ("102".equals(codeString)) + return _102; + if ("103".equals(codeString)) + return _103; + if ("104".equals(codeString)) + return _104; + if ("105".equals(codeString)) + return _105; + if ("106".equals(codeString)) + return _106; + if ("107".equals(codeString)) + return _107; + if ("108".equals(codeString)) + return _108; + if ("109".equals(codeString)) + return _109; + if ("110".equals(codeString)) + return _110; + if ("111".equals(codeString)) + return _111; + if ("112".equals(codeString)) + return _112; + if ("113".equals(codeString)) + return _113; + if ("114".equals(codeString)) + return _114; + if ("115".equals(codeString)) + return _115; + if ("116".equals(codeString)) + return _116; + if ("117".equals(codeString)) + return _117; + if ("118".equals(codeString)) + return _118; + if ("119".equals(codeString)) + return _119; + if ("120".equals(codeString)) + return _120; + if ("121".equals(codeString)) + return _121; + if ("122".equals(codeString)) + return _122; + if ("123".equals(codeString)) + return _123; + if ("124".equals(codeString)) + return _124; + if ("125".equals(codeString)) + return _125; + if ("126".equals(codeString)) + return _126; + if ("127".equals(codeString)) + return _127; + if ("128".equals(codeString)) + return _128; + if ("129".equals(codeString)) + return _129; + if ("130".equals(codeString)) + return _130; + if ("131".equals(codeString)) + return _131; + if ("132".equals(codeString)) + return _132; + if ("133".equals(codeString)) + return _133; + if ("134".equals(codeString)) + return _134; + if ("135".equals(codeString)) + return _135; + if ("136".equals(codeString)) + return _136; + if ("137".equals(codeString)) + return _137; + if ("138".equals(codeString)) + return _138; + if ("139".equals(codeString)) + return _139; + if ("140".equals(codeString)) + return _140; + if ("141".equals(codeString)) + return _141; + if ("142".equals(codeString)) + return _142; + if ("143".equals(codeString)) + return _143; + if ("144".equals(codeString)) + return _144; + if ("145".equals(codeString)) + return _145; + if ("146".equals(codeString)) + return _146; + if ("147".equals(codeString)) + return _147; + if ("148".equals(codeString)) + return _148; + if ("149".equals(codeString)) + return _149; + if ("150".equals(codeString)) + return _150; + if ("151".equals(codeString)) + return _151; + if ("152".equals(codeString)) + return _152; + if ("153".equals(codeString)) + return _153; + if ("154".equals(codeString)) + return _154; + if ("155".equals(codeString)) + return _155; + if ("156".equals(codeString)) + return _156; + if ("157".equals(codeString)) + return _157; + if ("158".equals(codeString)) + return _158; + if ("159".equals(codeString)) + return _159; + if ("160".equals(codeString)) + return _160; + if ("161".equals(codeString)) + return _161; + if ("162".equals(codeString)) + return _162; + if ("163".equals(codeString)) + return _163; + if ("164".equals(codeString)) + return _164; + if ("165".equals(codeString)) + return _165; + if ("166".equals(codeString)) + return _166; + if ("167".equals(codeString)) + return _167; + if ("168".equals(codeString)) + return _168; + if ("169".equals(codeString)) + return _169; + if ("170".equals(codeString)) + return _170; + if ("171".equals(codeString)) + return _171; + if ("172".equals(codeString)) + return _172; + if ("173".equals(codeString)) + return _173; + if ("174".equals(codeString)) + return _174; + if ("175".equals(codeString)) + return _175; + if ("176".equals(codeString)) + return _176; + if ("177".equals(codeString)) + return _177; + if ("178".equals(codeString)) + return _178; + if ("179".equals(codeString)) + return _179; + if ("180".equals(codeString)) + return _180; + if ("181".equals(codeString)) + return _181; + if ("182".equals(codeString)) + return _182; + if ("183".equals(codeString)) + return _183; + if ("184".equals(codeString)) + return _184; + if ("185".equals(codeString)) + return _185; + if ("186".equals(codeString)) + return _186; + if ("187".equals(codeString)) + return _187; + if ("188".equals(codeString)) + return _188; + if ("189".equals(codeString)) + return _189; + if ("190".equals(codeString)) + return _190; + if ("191".equals(codeString)) + return _191; + if ("192".equals(codeString)) + return _192; + if ("193".equals(codeString)) + return _193; + if ("194".equals(codeString)) + return _194; + if ("195".equals(codeString)) + return _195; + if ("196".equals(codeString)) + return _196; + if ("197".equals(codeString)) + return _197; + if ("198".equals(codeString)) + return _198; + if ("199".equals(codeString)) + return _199; + if ("200".equals(codeString)) + return _200; + if ("201".equals(codeString)) + return _201; + if ("202".equals(codeString)) + return _202; + if ("203".equals(codeString)) + return _203; + if ("204".equals(codeString)) + return _204; + if ("205".equals(codeString)) + return _205; + if ("206".equals(codeString)) + return _206; + if ("207".equals(codeString)) + return _207; + if ("208".equals(codeString)) + return _208; + if ("209".equals(codeString)) + return _209; + if ("210".equals(codeString)) + return _210; + if ("211".equals(codeString)) + return _211; + if ("212".equals(codeString)) + return _212; + if ("213".equals(codeString)) + return _213; + if ("214".equals(codeString)) + return _214; + if ("215".equals(codeString)) + return _215; + if ("216".equals(codeString)) + return _216; + if ("217".equals(codeString)) + return _217; + if ("218".equals(codeString)) + return _218; + if ("219".equals(codeString)) + return _219; + if ("220".equals(codeString)) + return _220; + if ("221".equals(codeString)) + return _221; + if ("222".equals(codeString)) + return _222; + if ("223".equals(codeString)) + return _223; + if ("224".equals(codeString)) + return _224; + if ("225".equals(codeString)) + return _225; + if ("226".equals(codeString)) + return _226; + if ("227".equals(codeString)) + return _227; + if ("228".equals(codeString)) + return _228; + if ("229".equals(codeString)) + return _229; + if ("230".equals(codeString)) + return _230; + if ("231".equals(codeString)) + return _231; + if ("232".equals(codeString)) + return _232; + if ("233".equals(codeString)) + return _233; + if ("234".equals(codeString)) + return _234; + if ("235".equals(codeString)) + return _235; + if ("236".equals(codeString)) + return _236; + if ("237".equals(codeString)) + return _237; + if ("238".equals(codeString)) + return _238; + if ("239".equals(codeString)) + return _239; + if ("240".equals(codeString)) + return _240; + if ("241".equals(codeString)) + return _241; + if ("242".equals(codeString)) + return _242; + if ("243".equals(codeString)) + return _243; + if ("244".equals(codeString)) + return _244; + if ("245".equals(codeString)) + return _245; + if ("246".equals(codeString)) + return _246; + if ("247".equals(codeString)) + return _247; + if ("248".equals(codeString)) + return _248; + if ("249".equals(codeString)) + return _249; + if ("250".equals(codeString)) + return _250; + if ("251".equals(codeString)) + return _251; + if ("252".equals(codeString)) + return _252; + if ("253".equals(codeString)) + return _253; + if ("254".equals(codeString)) + return _254; + if ("255".equals(codeString)) + return _255; + if ("256".equals(codeString)) + return _256; + if ("257".equals(codeString)) + return _257; + if ("258".equals(codeString)) + return _258; + if ("259".equals(codeString)) + return _259; + if ("260".equals(codeString)) + return _260; + if ("261".equals(codeString)) + return _261; + if ("262".equals(codeString)) + return _262; + if ("263".equals(codeString)) + return _263; + if ("264".equals(codeString)) + return _264; + if ("265".equals(codeString)) + return _265; + if ("266".equals(codeString)) + return _266; + if ("267".equals(codeString)) + return _267; + if ("268".equals(codeString)) + return _268; + if ("269".equals(codeString)) + return _269; + if ("270".equals(codeString)) + return _270; + if ("271".equals(codeString)) + return _271; + if ("272".equals(codeString)) + return _272; + if ("273".equals(codeString)) + return _273; + if ("274".equals(codeString)) + return _274; + if ("275".equals(codeString)) + return _275; + if ("276".equals(codeString)) + return _276; + if ("277".equals(codeString)) + return _277; + if ("278".equals(codeString)) + return _278; + if ("279".equals(codeString)) + return _279; + if ("280".equals(codeString)) + return _280; + if ("281".equals(codeString)) + return _281; + if ("282".equals(codeString)) + return _282; + if ("283".equals(codeString)) + return _283; + if ("284".equals(codeString)) + return _284; + if ("285".equals(codeString)) + return _285; + if ("286".equals(codeString)) + return _286; + if ("287".equals(codeString)) + return _287; + if ("288".equals(codeString)) + return _288; + if ("289".equals(codeString)) + return _289; + if ("290".equals(codeString)) + return _290; + if ("291".equals(codeString)) + return _291; + if ("292".equals(codeString)) + return _292; + if ("293".equals(codeString)) + return _293; + if ("294".equals(codeString)) + return _294; + if ("295".equals(codeString)) + return _295; + if ("296".equals(codeString)) + return _296; + if ("297".equals(codeString)) + return _297; + if ("298".equals(codeString)) + return _298; + if ("299".equals(codeString)) + return _299; + if ("300".equals(codeString)) + return _300; + if ("301".equals(codeString)) + return _301; + if ("302".equals(codeString)) + return _302; + if ("303".equals(codeString)) + return _303; + if ("304".equals(codeString)) + return _304; + if ("305".equals(codeString)) + return _305; + if ("306".equals(codeString)) + return _306; + if ("307".equals(codeString)) + return _307; + if ("308".equals(codeString)) + return _308; + if ("309".equals(codeString)) + return _309; + if ("310".equals(codeString)) + return _310; + if ("311".equals(codeString)) + return _311; + if ("312".equals(codeString)) + return _312; + if ("313".equals(codeString)) + return _313; + if ("314".equals(codeString)) + return _314; + if ("315".equals(codeString)) + return _315; + if ("316".equals(codeString)) + return _316; + if ("317".equals(codeString)) + return _317; + if ("318".equals(codeString)) + return _318; + if ("319".equals(codeString)) + return _319; + if ("320".equals(codeString)) + return _320; + if ("321".equals(codeString)) + return _321; + if ("322".equals(codeString)) + return _322; + if ("323".equals(codeString)) + return _323; + if ("324".equals(codeString)) + return _324; + if ("325".equals(codeString)) + return _325; + if ("326".equals(codeString)) + return _326; + if ("327".equals(codeString)) + return _327; + if ("328".equals(codeString)) + return _328; + if ("330".equals(codeString)) + return _330; + if ("331".equals(codeString)) + return _331; + if ("332".equals(codeString)) + return _332; + if ("333".equals(codeString)) + return _333; + if ("334".equals(codeString)) + return _334; + if ("335".equals(codeString)) + return _335; + if ("336".equals(codeString)) + return _336; + if ("337".equals(codeString)) + return _337; + if ("338".equals(codeString)) + return _338; + if ("339".equals(codeString)) + return _339; + if ("340".equals(codeString)) + return _340; + if ("341".equals(codeString)) + return _341; + if ("342".equals(codeString)) + return _342; + if ("343".equals(codeString)) + return _343; + if ("344".equals(codeString)) + return _344; + if ("345".equals(codeString)) + return _345; + if ("346".equals(codeString)) + return _346; + if ("347".equals(codeString)) + return _347; + if ("348".equals(codeString)) + return _348; + if ("349".equals(codeString)) + return _349; + if ("350".equals(codeString)) + return _350; + if ("351".equals(codeString)) + return _351; + if ("352".equals(codeString)) + return _352; + if ("353".equals(codeString)) + return _353; + if ("354".equals(codeString)) + return _354; + if ("355".equals(codeString)) + return _355; + if ("356".equals(codeString)) + return _356; + if ("357".equals(codeString)) + return _357; + if ("358".equals(codeString)) + return _358; + if ("359".equals(codeString)) + return _359; + if ("360".equals(codeString)) + return _360; + if ("361".equals(codeString)) + return _361; + if ("362".equals(codeString)) + return _362; + if ("364".equals(codeString)) + return _364; + if ("365".equals(codeString)) + return _365; + if ("366".equals(codeString)) + return _366; + if ("367".equals(codeString)) + return _367; + if ("368".equals(codeString)) + return _368; + if ("369".equals(codeString)) + return _369; + if ("370".equals(codeString)) + return _370; + if ("371".equals(codeString)) + return _371; + if ("372".equals(codeString)) + return _372; + if ("373".equals(codeString)) + return _373; + if ("374".equals(codeString)) + return _374; + if ("375".equals(codeString)) + return _375; + if ("376".equals(codeString)) + return _376; + if ("377".equals(codeString)) + return _377; + if ("378".equals(codeString)) + return _378; + if ("379".equals(codeString)) + return _379; + if ("380".equals(codeString)) + return _380; + if ("381".equals(codeString)) + return _381; + if ("382".equals(codeString)) + return _382; + if ("383".equals(codeString)) + return _383; + if ("384".equals(codeString)) + return _384; + if ("385".equals(codeString)) + return _385; + if ("386".equals(codeString)) + return _386; + if ("387".equals(codeString)) + return _387; + if ("388".equals(codeString)) + return _388; + if ("389".equals(codeString)) + return _389; + if ("390".equals(codeString)) + return _390; + if ("391".equals(codeString)) + return _391; + if ("392".equals(codeString)) + return _392; + if ("393".equals(codeString)) + return _393; + if ("394".equals(codeString)) + return _394; + if ("395".equals(codeString)) + return _395; + if ("396".equals(codeString)) + return _396; + if ("397".equals(codeString)) + return _397; + if ("398".equals(codeString)) + return _398; + if ("399".equals(codeString)) + return _399; + if ("400".equals(codeString)) + return _400; + if ("401".equals(codeString)) + return _401; + if ("402".equals(codeString)) + return _402; + if ("403".equals(codeString)) + return _403; + if ("404".equals(codeString)) + return _404; + if ("405".equals(codeString)) + return _405; + if ("406".equals(codeString)) + return _406; + if ("407".equals(codeString)) + return _407; + if ("408".equals(codeString)) + return _408; + if ("409".equals(codeString)) + return _409; + if ("410".equals(codeString)) + return _410; + if ("411".equals(codeString)) + return _411; + if ("412".equals(codeString)) + return _412; + if ("413".equals(codeString)) + return _413; + if ("414".equals(codeString)) + return _414; + if ("415".equals(codeString)) + return _415; + if ("416".equals(codeString)) + return _416; + if ("417".equals(codeString)) + return _417; + if ("418".equals(codeString)) + return _418; + if ("419".equals(codeString)) + return _419; + if ("420".equals(codeString)) + return _420; + if ("421".equals(codeString)) + return _421; + if ("422".equals(codeString)) + return _422; + if ("423".equals(codeString)) + return _423; + if ("424".equals(codeString)) + return _424; + if ("425".equals(codeString)) + return _425; + if ("426".equals(codeString)) + return _426; + if ("427".equals(codeString)) + return _427; + if ("428".equals(codeString)) + return _428; + if ("429".equals(codeString)) + return _429; + if ("430".equals(codeString)) + return _430; + if ("431".equals(codeString)) + return _431; + if ("432".equals(codeString)) + return _432; + if ("433".equals(codeString)) + return _433; + if ("434".equals(codeString)) + return _434; + if ("435".equals(codeString)) + return _435; + if ("436".equals(codeString)) + return _436; + if ("437".equals(codeString)) + return _437; + if ("438".equals(codeString)) + return _438; + if ("439".equals(codeString)) + return _439; + if ("440".equals(codeString)) + return _440; + if ("441".equals(codeString)) + return _441; + if ("442".equals(codeString)) + return _442; + if ("443".equals(codeString)) + return _443; + if ("444".equals(codeString)) + return _444; + if ("445".equals(codeString)) + return _445; + if ("446".equals(codeString)) + return _446; + if ("447".equals(codeString)) + return _447; + if ("448".equals(codeString)) + return _448; + if ("449".equals(codeString)) + return _449; + if ("450".equals(codeString)) + return _450; + if ("451".equals(codeString)) + return _451; + if ("452".equals(codeString)) + return _452; + if ("453".equals(codeString)) + return _453; + if ("454".equals(codeString)) + return _454; + if ("455".equals(codeString)) + return _455; + if ("456".equals(codeString)) + return _456; + if ("457".equals(codeString)) + return _457; + if ("458".equals(codeString)) + return _458; + if ("459".equals(codeString)) + return _459; + if ("460".equals(codeString)) + return _460; + if ("461".equals(codeString)) + return _461; + if ("462".equals(codeString)) + return _462; + if ("463".equals(codeString)) + return _463; + if ("464".equals(codeString)) + return _464; + if ("465".equals(codeString)) + return _465; + if ("466".equals(codeString)) + return _466; + if ("467".equals(codeString)) + return _467; + if ("468".equals(codeString)) + return _468; + if ("469".equals(codeString)) + return _469; + if ("470".equals(codeString)) + return _470; + if ("471".equals(codeString)) + return _471; + if ("472".equals(codeString)) + return _472; + if ("473".equals(codeString)) + return _473; + if ("474".equals(codeString)) + return _474; + if ("475".equals(codeString)) + return _475; + if ("476".equals(codeString)) + return _476; + if ("477".equals(codeString)) + return _477; + if ("478".equals(codeString)) + return _478; + if ("479".equals(codeString)) + return _479; + if ("480".equals(codeString)) + return _480; + if ("481".equals(codeString)) + return _481; + if ("482".equals(codeString)) + return _482; + if ("483".equals(codeString)) + return _483; + if ("484".equals(codeString)) + return _484; + if ("485".equals(codeString)) + return _485; + if ("486".equals(codeString)) + return _486; + if ("488".equals(codeString)) + return _488; + if ("489".equals(codeString)) + return _489; + if ("490".equals(codeString)) + return _490; + if ("491".equals(codeString)) + return _491; + if ("492".equals(codeString)) + return _492; + if ("493".equals(codeString)) + return _493; + if ("494".equals(codeString)) + return _494; + if ("495".equals(codeString)) + return _495; + if ("496".equals(codeString)) + return _496; + if ("497".equals(codeString)) + return _497; + if ("498".equals(codeString)) + return _498; + if ("500".equals(codeString)) + return _500; + if ("501".equals(codeString)) + return _501; + if ("502".equals(codeString)) + return _502; + if ("503".equals(codeString)) + return _503; + if ("504".equals(codeString)) + return _504; + if ("505".equals(codeString)) + return _505; + if ("506".equals(codeString)) + return _506; + if ("507".equals(codeString)) + return _507; + if ("508".equals(codeString)) + return _508; + if ("509".equals(codeString)) + return _509; + if ("510".equals(codeString)) + return _510; + if ("513".equals(codeString)) + return _513; + if ("514".equals(codeString)) + return _514; + if ("530".equals(codeString)) + return _530; + if ("531".equals(codeString)) + return _531; + if ("532".equals(codeString)) + return _532; + if ("533".equals(codeString)) + return _533; + if ("534".equals(codeString)) + return _534; + if ("535".equals(codeString)) + return _535; + if ("536".equals(codeString)) + return _536; + if ("537".equals(codeString)) + return _537; + if ("538".equals(codeString)) + return _538; + if ("539".equals(codeString)) + return _539; + if ("540".equals(codeString)) + return _540; + if ("541".equals(codeString)) + return _541; + if ("542".equals(codeString)) + return _542; + if ("543".equals(codeString)) + return _543; + if ("544".equals(codeString)) + return _544; + if ("545".equals(codeString)) + return _545; + if ("546".equals(codeString)) + return _546; + if ("547".equals(codeString)) + return _547; + if ("548".equals(codeString)) + return _548; + if ("550".equals(codeString)) + return _550; + if ("551".equals(codeString)) + return _551; + if ("552".equals(codeString)) + return _552; + if ("553".equals(codeString)) + return _553; + if ("554".equals(codeString)) + return _554; + if ("555".equals(codeString)) + return _555; + if ("556".equals(codeString)) + return _556; + if ("557".equals(codeString)) + return _557; + if ("558".equals(codeString)) + return _558; + if ("559".equals(codeString)) + return _559; + if ("560".equals(codeString)) + return _560; + if ("561".equals(codeString)) + return _561; + if ("562".equals(codeString)) + return _562; + if ("563".equals(codeString)) + return _563; + if ("564".equals(codeString)) + return _564; + if ("565".equals(codeString)) + return _565; + if ("566".equals(codeString)) + return _566; + if ("567".equals(codeString)) + return _567; + if ("568".equals(codeString)) + return _568; + if ("569".equals(codeString)) + return _569; + if ("570".equals(codeString)) + return _570; + if ("571".equals(codeString)) + return _571; + if ("572".equals(codeString)) + return _572; + if ("573".equals(codeString)) + return _573; + if ("574".equals(codeString)) + return _574; + if ("575".equals(codeString)) + return _575; + if ("576".equals(codeString)) + return _576; + if ("577".equals(codeString)) + return _577; + if ("580".equals(codeString)) + return _580; + if ("581".equals(codeString)) + return _581; + if ("582".equals(codeString)) + return _582; + if ("583".equals(codeString)) + return _583; + if ("584".equals(codeString)) + return _584; + if ("585".equals(codeString)) + return _585; + if ("589".equals(codeString)) + return _589; + if ("590".equals(codeString)) + return _590; + if ("591".equals(codeString)) + return _591; + if ("593".equals(codeString)) + return _593; + if ("599".equals(codeString)) + return _599; + if ("600".equals(codeString)) + return _600; + if ("601".equals(codeString)) + return _601; + if ("602".equals(codeString)) + return _602; + if ("603".equals(codeString)) + return _603; + if ("604".equals(codeString)) + return _604; + if ("605".equals(codeString)) + return _605; + if ("606".equals(codeString)) + return _606; + if ("607".equals(codeString)) + return _607; + if ("608".equals(codeString)) + return _608; + if ("609".equals(codeString)) + return _609; + if ("610".equals(codeString)) + return _610; + if ("611".equals(codeString)) + return _611; + if ("612".equals(codeString)) + return _612; + if ("613".equals(codeString)) + return _613; + if ("614".equals(codeString)) + return _614; + if ("615".equals(codeString)) + return _615; + if ("616".equals(codeString)) + return _616; + if ("617".equals(codeString)) + return _617; + if ("618".equals(codeString)) + return _618; + if ("619".equals(codeString)) + return _619; + if ("620".equals(codeString)) + return _620; + if ("621".equals(codeString)) + return _621; + if ("622".equals(codeString)) + return _622; + if ("623".equals(codeString)) + return _623; + if ("624".equals(codeString)) + return _624; + if ("625".equals(codeString)) + return _625; + if ("626".equals(codeString)) + return _626; + if ("627".equals(codeString)) + return _627; + if ("628".equals(codeString)) + return _628; + if ("629".equals(codeString)) + return _629; + throw new FHIRException("Unknown ServiceType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _9: return "9"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _19: return "19"; + case _20: return "20"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _29: return "29"; + case _30: return "30"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _39: return "39"; + case _40: return "40"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + case _49: return "49"; + case _50: return "50"; + case _51: return "51"; + case _52: return "52"; + case _53: return "53"; + case _54: return "54"; + case _55: return "55"; + case _56: return "56"; + case _57: return "57"; + case _58: return "58"; + case _59: return "59"; + case _60: return "60"; + case _61: return "61"; + case _62: return "62"; + case _63: return "63"; + case _64: return "64"; + case _65: return "65"; + case _66: return "66"; + case _67: return "67"; + case _68: return "68"; + case _69: return "69"; + case _70: return "70"; + case _71: return "71"; + case _72: return "72"; + case _73: return "73"; + case _74: return "74"; + case _75: return "75"; + case _76: return "76"; + case _77: return "77"; + case _78: return "78"; + case _79: return "79"; + case _80: return "80"; + case _81: return "81"; + case _82: return "82"; + case _83: return "83"; + case _84: return "84"; + case _85: return "85"; + case _86: return "86"; + case _87: return "87"; + case _88: return "88"; + case _89: return "89"; + case _90: return "90"; + case _91: return "91"; + case _92: return "92"; + case _93: return "93"; + case _94: return "94"; + case _95: return "95"; + case _96: return "96"; + case _97: return "97"; + case _98: return "98"; + case _99: return "99"; + case _100: return "100"; + case _101: return "101"; + case _102: return "102"; + case _103: return "103"; + case _104: return "104"; + case _105: return "105"; + case _106: return "106"; + case _107: return "107"; + case _108: return "108"; + case _109: return "109"; + case _110: return "110"; + case _111: return "111"; + case _112: return "112"; + case _113: return "113"; + case _114: return "114"; + case _115: return "115"; + case _116: return "116"; + case _117: return "117"; + case _118: return "118"; + case _119: return "119"; + case _120: return "120"; + case _121: return "121"; + case _122: return "122"; + case _123: return "123"; + case _124: return "124"; + case _125: return "125"; + case _126: return "126"; + case _127: return "127"; + case _128: return "128"; + case _129: return "129"; + case _130: return "130"; + case _131: return "131"; + case _132: return "132"; + case _133: return "133"; + case _134: return "134"; + case _135: return "135"; + case _136: return "136"; + case _137: return "137"; + case _138: return "138"; + case _139: return "139"; + case _140: return "140"; + case _141: return "141"; + case _142: return "142"; + case _143: return "143"; + case _144: return "144"; + case _145: return "145"; + case _146: return "146"; + case _147: return "147"; + case _148: return "148"; + case _149: return "149"; + case _150: return "150"; + case _151: return "151"; + case _152: return "152"; + case _153: return "153"; + case _154: return "154"; + case _155: return "155"; + case _156: return "156"; + case _157: return "157"; + case _158: return "158"; + case _159: return "159"; + case _160: return "160"; + case _161: return "161"; + case _162: return "162"; + case _163: return "163"; + case _164: return "164"; + case _165: return "165"; + case _166: return "166"; + case _167: return "167"; + case _168: return "168"; + case _169: return "169"; + case _170: return "170"; + case _171: return "171"; + case _172: return "172"; + case _173: return "173"; + case _174: return "174"; + case _175: return "175"; + case _176: return "176"; + case _177: return "177"; + case _178: return "178"; + case _179: return "179"; + case _180: return "180"; + case _181: return "181"; + case _182: return "182"; + case _183: return "183"; + case _184: return "184"; + case _185: return "185"; + case _186: return "186"; + case _187: return "187"; + case _188: return "188"; + case _189: return "189"; + case _190: return "190"; + case _191: return "191"; + case _192: return "192"; + case _193: return "193"; + case _194: return "194"; + case _195: return "195"; + case _196: return "196"; + case _197: return "197"; + case _198: return "198"; + case _199: return "199"; + case _200: return "200"; + case _201: return "201"; + case _202: return "202"; + case _203: return "203"; + case _204: return "204"; + case _205: return "205"; + case _206: return "206"; + case _207: return "207"; + case _208: return "208"; + case _209: return "209"; + case _210: return "210"; + case _211: return "211"; + case _212: return "212"; + case _213: return "213"; + case _214: return "214"; + case _215: return "215"; + case _216: return "216"; + case _217: return "217"; + case _218: return "218"; + case _219: return "219"; + case _220: return "220"; + case _221: return "221"; + case _222: return "222"; + case _223: return "223"; + case _224: return "224"; + case _225: return "225"; + case _226: return "226"; + case _227: return "227"; + case _228: return "228"; + case _229: return "229"; + case _230: return "230"; + case _231: return "231"; + case _232: return "232"; + case _233: return "233"; + case _234: return "234"; + case _235: return "235"; + case _236: return "236"; + case _237: return "237"; + case _238: return "238"; + case _239: return "239"; + case _240: return "240"; + case _241: return "241"; + case _242: return "242"; + case _243: return "243"; + case _244: return "244"; + case _245: return "245"; + case _246: return "246"; + case _247: return "247"; + case _248: return "248"; + case _249: return "249"; + case _250: return "250"; + case _251: return "251"; + case _252: return "252"; + case _253: return "253"; + case _254: return "254"; + case _255: return "255"; + case _256: return "256"; + case _257: return "257"; + case _258: return "258"; + case _259: return "259"; + case _260: return "260"; + case _261: return "261"; + case _262: return "262"; + case _263: return "263"; + case _264: return "264"; + case _265: return "265"; + case _266: return "266"; + case _267: return "267"; + case _268: return "268"; + case _269: return "269"; + case _270: return "270"; + case _271: return "271"; + case _272: return "272"; + case _273: return "273"; + case _274: return "274"; + case _275: return "275"; + case _276: return "276"; + case _277: return "277"; + case _278: return "278"; + case _279: return "279"; + case _280: return "280"; + case _281: return "281"; + case _282: return "282"; + case _283: return "283"; + case _284: return "284"; + case _285: return "285"; + case _286: return "286"; + case _287: return "287"; + case _288: return "288"; + case _289: return "289"; + case _290: return "290"; + case _291: return "291"; + case _292: return "292"; + case _293: return "293"; + case _294: return "294"; + case _295: return "295"; + case _296: return "296"; + case _297: return "297"; + case _298: return "298"; + case _299: return "299"; + case _300: return "300"; + case _301: return "301"; + case _302: return "302"; + case _303: return "303"; + case _304: return "304"; + case _305: return "305"; + case _306: return "306"; + case _307: return "307"; + case _308: return "308"; + case _309: return "309"; + case _310: return "310"; + case _311: return "311"; + case _312: return "312"; + case _313: return "313"; + case _314: return "314"; + case _315: return "315"; + case _316: return "316"; + case _317: return "317"; + case _318: return "318"; + case _319: return "319"; + case _320: return "320"; + case _321: return "321"; + case _322: return "322"; + case _323: return "323"; + case _324: return "324"; + case _325: return "325"; + case _326: return "326"; + case _327: return "327"; + case _328: return "328"; + case _330: return "330"; + case _331: return "331"; + case _332: return "332"; + case _333: return "333"; + case _334: return "334"; + case _335: return "335"; + case _336: return "336"; + case _337: return "337"; + case _338: return "338"; + case _339: return "339"; + case _340: return "340"; + case _341: return "341"; + case _342: return "342"; + case _343: return "343"; + case _344: return "344"; + case _345: return "345"; + case _346: return "346"; + case _347: return "347"; + case _348: return "348"; + case _349: return "349"; + case _350: return "350"; + case _351: return "351"; + case _352: return "352"; + case _353: return "353"; + case _354: return "354"; + case _355: return "355"; + case _356: return "356"; + case _357: return "357"; + case _358: return "358"; + case _359: return "359"; + case _360: return "360"; + case _361: return "361"; + case _362: return "362"; + case _364: return "364"; + case _365: return "365"; + case _366: return "366"; + case _367: return "367"; + case _368: return "368"; + case _369: return "369"; + case _370: return "370"; + case _371: return "371"; + case _372: return "372"; + case _373: return "373"; + case _374: return "374"; + case _375: return "375"; + case _376: return "376"; + case _377: return "377"; + case _378: return "378"; + case _379: return "379"; + case _380: return "380"; + case _381: return "381"; + case _382: return "382"; + case _383: return "383"; + case _384: return "384"; + case _385: return "385"; + case _386: return "386"; + case _387: return "387"; + case _388: return "388"; + case _389: return "389"; + case _390: return "390"; + case _391: return "391"; + case _392: return "392"; + case _393: return "393"; + case _394: return "394"; + case _395: return "395"; + case _396: return "396"; + case _397: return "397"; + case _398: return "398"; + case _399: return "399"; + case _400: return "400"; + case _401: return "401"; + case _402: return "402"; + case _403: return "403"; + case _404: return "404"; + case _405: return "405"; + case _406: return "406"; + case _407: return "407"; + case _408: return "408"; + case _409: return "409"; + case _410: return "410"; + case _411: return "411"; + case _412: return "412"; + case _413: return "413"; + case _414: return "414"; + case _415: return "415"; + case _416: return "416"; + case _417: return "417"; + case _418: return "418"; + case _419: return "419"; + case _420: return "420"; + case _421: return "421"; + case _422: return "422"; + case _423: return "423"; + case _424: return "424"; + case _425: return "425"; + case _426: return "426"; + case _427: return "427"; + case _428: return "428"; + case _429: return "429"; + case _430: return "430"; + case _431: return "431"; + case _432: return "432"; + case _433: return "433"; + case _434: return "434"; + case _435: return "435"; + case _436: return "436"; + case _437: return "437"; + case _438: return "438"; + case _439: return "439"; + case _440: return "440"; + case _441: return "441"; + case _442: return "442"; + case _443: return "443"; + case _444: return "444"; + case _445: return "445"; + case _446: return "446"; + case _447: return "447"; + case _448: return "448"; + case _449: return "449"; + case _450: return "450"; + case _451: return "451"; + case _452: return "452"; + case _453: return "453"; + case _454: return "454"; + case _455: return "455"; + case _456: return "456"; + case _457: return "457"; + case _458: return "458"; + case _459: return "459"; + case _460: return "460"; + case _461: return "461"; + case _462: return "462"; + case _463: return "463"; + case _464: return "464"; + case _465: return "465"; + case _466: return "466"; + case _467: return "467"; + case _468: return "468"; + case _469: return "469"; + case _470: return "470"; + case _471: return "471"; + case _472: return "472"; + case _473: return "473"; + case _474: return "474"; + case _475: return "475"; + case _476: return "476"; + case _477: return "477"; + case _478: return "478"; + case _479: return "479"; + case _480: return "480"; + case _481: return "481"; + case _482: return "482"; + case _483: return "483"; + case _484: return "484"; + case _485: return "485"; + case _486: return "486"; + case _488: return "488"; + case _489: return "489"; + case _490: return "490"; + case _491: return "491"; + case _492: return "492"; + case _493: return "493"; + case _494: return "494"; + case _495: return "495"; + case _496: return "496"; + case _497: return "497"; + case _498: return "498"; + case _500: return "500"; + case _501: return "501"; + case _502: return "502"; + case _503: return "503"; + case _504: return "504"; + case _505: return "505"; + case _506: return "506"; + case _507: return "507"; + case _508: return "508"; + case _509: return "509"; + case _510: return "510"; + case _513: return "513"; + case _514: return "514"; + case _530: return "530"; + case _531: return "531"; + case _532: return "532"; + case _533: return "533"; + case _534: return "534"; + case _535: return "535"; + case _536: return "536"; + case _537: return "537"; + case _538: return "538"; + case _539: return "539"; + case _540: return "540"; + case _541: return "541"; + case _542: return "542"; + case _543: return "543"; + case _544: return "544"; + case _545: return "545"; + case _546: return "546"; + case _547: return "547"; + case _548: return "548"; + case _550: return "550"; + case _551: return "551"; + case _552: return "552"; + case _553: return "553"; + case _554: return "554"; + case _555: return "555"; + case _556: return "556"; + case _557: return "557"; + case _558: return "558"; + case _559: return "559"; + case _560: return "560"; + case _561: return "561"; + case _562: return "562"; + case _563: return "563"; + case _564: return "564"; + case _565: return "565"; + case _566: return "566"; + case _567: return "567"; + case _568: return "568"; + case _569: return "569"; + case _570: return "570"; + case _571: return "571"; + case _572: return "572"; + case _573: return "573"; + case _574: return "574"; + case _575: return "575"; + case _576: return "576"; + case _577: return "577"; + case _580: return "580"; + case _581: return "581"; + case _582: return "582"; + case _583: return "583"; + case _584: return "584"; + case _585: return "585"; + case _589: return "589"; + case _590: return "590"; + case _591: return "591"; + case _593: return "593"; + case _599: return "599"; + case _600: return "600"; + case _601: return "601"; + case _602: return "602"; + case _603: return "603"; + case _604: return "604"; + case _605: return "605"; + case _606: return "606"; + case _607: return "607"; + case _608: return "608"; + case _609: return "609"; + case _610: return "610"; + case _611: return "611"; + case _612: return "612"; + case _613: return "613"; + case _614: return "614"; + case _615: return "615"; + case _616: return "616"; + case _617: return "617"; + case _618: return "618"; + case _619: return "619"; + case _620: return "620"; + case _621: return "621"; + case _622: return "622"; + case _623: return "623"; + case _624: return "624"; + case _625: return "625"; + case _626: return "626"; + case _627: return "627"; + case _628: return "628"; + case _629: return "629"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/service-type"; + } + public String getDefinition() { + switch (this) { + case _1: return "Adoption & permanent care information/support"; + case _2: return "Aged care assessment"; + case _3: return "Aged Care information/referral"; + case _4: return "Aged Residential Care"; + case _5: return "Case management for older persons"; + case _6: return "Delivered meals (meals on wheels)"; + case _7: return "Friendly visiting"; + case _8: return "Home care/housekeeping assistance"; + case _9: return "Home maintenance and repair"; + case _10: return "Personal alarms/alerts"; + case _11: return "Personal care for older persons"; + case _12: return "Planned activity groups"; + case _13: return "Acupuncture"; + case _14: return "Alexander technique therapy"; + case _15: return "Aromatherapy"; + case _16: return "Biorhythm services"; + case _17: return "Bowen therapy"; + case _18: return "Chinese herbal medicine"; + case _19: return "Feldenkrais"; + case _20: return "Homoeopathy"; + case _21: return "Hydrotherapy"; + case _22: return "Hypnotherapy"; + case _23: return "Kinesiology"; + case _24: return "Magnetic therapy"; + case _25: return "Massage therapy"; + case _26: return "Meditation"; + case _27: return "Myotherapy"; + case _28: return "Naturopathy"; + case _29: return "Reflexology"; + case _30: return "Reiki"; + case _31: return "Relaxation therapy"; + case _32: return "Shiatsu"; + case _33: return "Western herbal medicine"; + case _34: return "Family day care"; + case _35: return "Holiday programs"; + case _36: return "Kindergarten inclusion support for children with a disability"; + case _37: return "Kindergarten/preschool"; + case _38: return "Long day child care"; + case _39: return "Occasional child care"; + case _40: return "Outside school hours care"; + case _41: return "Children's play programs"; + case _42: return "Parenting & family management support/education"; + case _43: return "Playgroup"; + case _44: return "School nursing"; + case _45: return "Toy library"; + case _46: return "Child protection/child abuse report"; + case _47: return "Foster care"; + case _48: return "Residential/ out of home care"; + case _49: return "Support for young people leaving care"; + case _50: return "Audiology"; + case _51: return "Blood donation"; + case _52: return "Chiropractic"; + case _53: return "Dietetics"; + case _54: return "Family planning"; + case _55: return "Health advocacy/Liaison service"; + case _56: return "Health information/referral"; + case _57: return "Immunization"; + case _58: return "Maternal & child health"; + case _59: return "Nursing"; + case _60: return "Nutrition"; + case _61: return "Occupational therapy"; + case _62: return "Optometry"; + case _63: return "Osteopathy"; + case _64: return "Pharmacy"; + case _65: return "Physiotherapy"; + case _66: return "Podiatry"; + case _67: return "Sexual health"; + case _68: return "Speech pathology/therapy"; + case _69: return "Bereavement counselling"; + case _70: return "Crisis counselling"; + case _71: return "Family counselling and/or family therapy"; + case _72: return "Family violence counselling"; + case _73: return "Financial counselling"; + case _74: return "Generalist counselling"; + case _75: return "Genetic counselling"; + case _76: return "Health counselling"; + case _77: return "Mediation"; + case _78: return "Problem gambling counselling"; + case _79: return "Relationship counselling"; + case _80: return "Sexual assault counselling"; + case _81: return "Trauma counselling"; + case _82: return "Victims of crime counselling"; + case _83: return "Cemetery operation"; + case _84: return "Cremation"; + case _85: return "Death service information"; + case _86: return "Funeral services"; + case _87: return "Endodontic"; + case _88: return "General dental"; + case _89: return "Oral medicine"; + case _90: return "Oral surgery"; + case _91: return "Orthodontic"; + case _92: return "Paediatric Dentistry"; + case _93: return "Periodontic"; + case _94: return "Prosthodontic"; + case _95: return "Acquired brain injury information/referral"; + case _96: return "Disability advocacy"; + case _97: return "Disability aids & equipment"; + case _98: return "Disability case management"; + case _99: return "Disability day programs & activities"; + case _100: return "Disability information/referral"; + case _101: return "Disability support packages"; + case _102: return "Disability supported accommodation"; + case _103: return "Early childhood intervention"; + case _104: return "Hearing aids & equipment"; + case _105: return "Drug and/or alcohol counselling"; + case _106: return "Drug and/or alcohol information/referral"; + case _107: return "Needle & Syringe exchange"; + case _108: return "Non-residential alcohol and/or drug dependence treatment"; + case _109: return "Pharmacotherapy (eg. methadone) program"; + case _110: return "Quit program"; + case _111: return "Residential alcohol and/or drug dependence treatment"; + case _112: return "Adult/community education"; + case _113: return "Higher education"; + case _114: return "Primary education"; + case _115: return "Secondary education"; + case _116: return "Training & vocational education"; + case _117: return "Emergency medical"; + case _118: return "Employment placement and/or support"; + case _119: return "Vocational Rehabilitation"; + case _120: return "Workplace safety and/or accident prevention"; + case _121: return "Financial assistance"; + case _122: return "Financial information/advice"; + case _123: return "Material aid"; + case _124: return "General Practice/GP (doctor)"; + case _125: return "Accommodation placement and/or support"; + case _126: return "Crisis/emergency accommodation"; + case _127: return "Homelessness support"; + case _128: return "Housing information/referral"; + case _129: return "Public rental housing"; + case _130: return "Interpreting/Multilingual/Language service"; + case _131: return "Juvenile Justice"; + case _132: return "Legal advocacy"; + case _133: return "Legal information/advice/referral"; + case _134: return "Mental health advocacy"; + case _135: return "Mental health assessment/triage/crisis response"; + case _136: return "Mental health case management/continuing care"; + case _137: return "Mental health information/referral"; + case _138: return "Mental health inpatient services (hospital psychiatric unit) - requires referral"; + case _139: return "Mental health non-residential rehabilitation"; + case _140: return "Mental health residential rehabilitation/community care unit"; + case _141: return "Psychiatry (requires referral)"; + case _142: return "Psychology"; + case _143: return "Martial arts"; + case _144: return "Personal fitness training"; + case _145: return "Physical activity group"; + case _146: return "Physical activity programs"; + case _147: return "Physical fitness testing"; + case _148: return "Pilates"; + case _149: return "Self defence"; + case _150: return "Sporting club"; + case _151: return "Yoga"; + case _152: return "Food safety"; + case _153: return "Health regulatory, inspection and/or certification"; + case _154: return "Workplace health and/or safety inspection and/or certification"; + case _155: return "Carer support"; + case _156: return "Respite care"; + case _157: return "Anatomical Pathology (including Cytopathology & Forensic Pathology)"; + case _158: return "Pathology - Clinical Chemistry"; + case _159: return "Pathology - General"; + case _160: return "Pathology - Genetics"; + case _161: return "Pathology - Haematology"; + case _162: return "Pathology - Immunology"; + case _163: return "Pathology - Microbiology"; + case _164: return "Anaesthesiology - Pain Medicine"; + case _165: return "Cardiology"; + case _166: return "Clinical Genetics"; + case _167: return "Clinical Pharmacology"; + case _168: return "Dermatology"; + case _169: return "Endocrinology"; + case _170: return "Gastroenterology & Hepatology"; + case _171: return "Geriatric medicine"; + case _172: return "Immunology & Allergy"; + case _173: return "Infectious diseases"; + case _174: return "Intensive care medicine"; + case _175: return "Medical Oncology"; + case _176: return "Nephrology"; + case _177: return "Neurology"; + case _178: return "Occupational Medicine"; + case _179: return "Palliative Medicine"; + case _180: return "Public Health Medicine"; + case _181: return "Rehabilitation Medicine"; + case _182: return "Rheumatology"; + case _183: return "Sleep Medicine"; + case _184: return "Thoracic medicine"; + case _185: return "Gynaecological Oncology"; + case _186: return "Obstetrics & Gynaecology"; + case _187: return "Reproductive Endocrinology & Infertility"; + case _188: return "Urogynaecology"; + case _189: return "Neonatology & Perinatology"; + case _190: return "Paediatric Cardiology"; + case _191: return "Paediatric Clinical Genetics"; + case _192: return "Paediatric Clinical Pharmacology"; + case _193: return "Paediatric Endocrinology"; + case _194: return "Paediatric Gastroenterology & Hepatology"; + case _195: return "Paediatric Haematology"; + case _196: return "Paediatric Immunology & Allergy"; + case _197: return "Paediatric Infectious diseases"; + case _198: return "Paediatric intensive care medicine"; + case _199: return "Paediatric Medical Oncology"; + case _200: return "Paediatric Medicine"; + case _201: return "Paediatric Nephrology"; + case _202: return "Paediatric Neurology"; + case _203: return "Paediatric Nuclear Medicine"; + case _204: return "Paediatric Rehabilitation Medicine"; + case _205: return "Paediatric Rheumatology"; + case _206: return "Paediatric Sleep Medicine"; + case _207: return "Paediatric Surgery"; + case _208: return "Paediatric Thoracic Medicine"; + case _209: return "Diagnostic Radiology/Xray/CT/Fluoroscopy"; + case _210: return "Diagnostic Ultrasound"; + case _211: return "Magnetic Resonance Imaging (MRI)"; + case _212: return "Nuclear Medicine"; + case _213: return "Obstetric & Gynaecological Ultrasound"; + case _214: return "Radiation oncology"; + case _215: return "Cardiothoracic surgery"; + case _216: return "Neurosurgery"; + case _217: return "Ophthalmology"; + case _218: return "Orthopaedic surgery"; + case _219: return "Otolaryngology - Head & Neck Surgery"; + case _220: return "Plastic & Reconstructive Surgery"; + case _221: return "Surgery - General"; + case _222: return "Urology"; + case _223: return "Vascular surgery"; + case _224: return "Support groups"; + case _225: return "Air ambulance"; + case _226: return "Ambulance"; + case _227: return "Blood transport"; + case _228: return "Community bus"; + case _229: return "Flying doctor service"; + case _230: return "Patient transport"; + case _231: return "A&E"; + case _232: return "A&EP"; + case _233: return "Abuse"; + case _234: return "ACAS"; + case _235: return "Access"; + case _236: return "Accident"; + case _237: return "Acute Inpatient Service's"; + case _238: return "Adult Day Programs"; + case _239: return "Adult Mental Health Services"; + case _240: return "Advice"; + case _241: return "Advocacy"; + case _242: return "Aged Persons Mental Health Residential Units"; + case _243: return "Aged Persons Mental Health Services"; + case _244: return "Aged Persons Mental Health Teams"; + case _245: return "Aids"; + case _246: return "Al-Anon"; + case _247: return "Alcohol"; + case _248: return "Al-Teen"; + case _249: return "Antenatal"; + case _250: return "Anxiety"; + case _251: return "Arthritis"; + case _252: return "Assessment"; + case _253: return "Assistance"; + case _254: return "Asthma"; + case _255: return "ATSS"; + case _256: return "Attendant Care"; + case _257: return "Babies"; + case _258: return "Bathroom Modification"; + case _259: return "Behaviour"; + case _260: return "Behaviour Intervention"; + case _261: return "Bereavement"; + case _262: return "Bipolar"; + case _263: return "Birth"; + case _264: return "Birth Control"; + case _265: return "Birthing Options"; + case _266: return "BIST"; + case _267: return "Blood"; + case _268: return "Bone"; + case _269: return "Bowel"; + case _270: return "Brain"; + case _271: return "Breast Feeding"; + case _272: return "Breast Screen"; + case _273: return "Brokerage"; + case _274: return "Cancer"; + case _275: return "Cancer Support"; + case _276: return "Cardiovascular Disease"; + case _277: return "Care Packages"; + case _278: return "Carer"; + case _279: return "Case Management"; + case _280: return "Casualty"; + case _281: return "Centrelink"; + case _282: return "Chemists"; + case _283: return "Child And Adolescent Mental Health Services"; + case _284: return "Child Care"; + case _285: return "Child Services"; + case _286: return "Children"; + case _287: return "Children's Services"; + case _288: return "Cholesterol"; + case _289: return "Clothing"; + case _290: return "Community Based Accommodation"; + case _291: return "Community Care Unit"; + case _292: return "Community Child And Adolescent Mental Health Services"; + case _293: return "Community Health"; + case _294: return "Community Residential Unit"; + case _295: return "Community Transport"; + case _296: return "Companion Visiting"; + case _297: return "Companionship"; + case _298: return "Consumer Advice"; + case _299: return "Consumer Issues"; + case _300: return "Continuing Care Services"; + case _301: return "Contraception Information"; + case _302: return "Coordinating Bodies"; + case _303: return "Correctional Services"; + case _304: return "Council Environmental Health"; + case _305: return "Counselling"; + case _306: return "Criminal"; + case _307: return "Crises"; + case _308: return "Crisis Assessment And Treatment Services (Cats)"; + case _309: return "Crisis Assistance"; + case _310: return "Crisis Refuge"; + case _311: return "Day Program"; + case _312: return "Deaf"; + case _313: return "Dental Hygiene"; + case _314: return "Dentistry"; + case _315: return "Dentures"; + case _316: return "Depression"; + case _317: return "Detoxification"; + case _318: return "Diabetes"; + case _319: return "Diaphragm Fitting"; + case _320: return "Dieticians"; + case _321: return "Disabled Parking"; + case _322: return "District Nursing"; + case _323: return "Divorce"; + case _324: return "Doctors"; + case _325: return "Drink-Drive"; + case _326: return "Dual Diagnosis Services"; + case _327: return "Early Choice"; + case _328: return "Eating Disorder"; + case _330: return "Emergency Relief"; + case _331: return "Employment And Training"; + case _332: return "Environment"; + case _333: return "Equipment"; + case _334: return "Exercise"; + case _335: return "Facility"; + case _336: return "Family Choice"; + case _337: return "Family Law"; + case _338: return "Family Options"; + case _339: return "Family Services"; + case _340: return "FFYA"; + case _341: return "Financial Aid"; + case _342: return "Fitness"; + case _343: return "Flexible Care Packages"; + case _344: return "Food"; + case _345: return "Food Vouchers"; + case _346: return "Forensic Mental Health Services"; + case _347: return "Futures"; + case _348: return "Futures For Young Adults"; + case _349: return "General Practitioners"; + case _350: return "Grants"; + case _351: return "Grief"; + case _352: return "Grief Counselling"; + case _353: return "HACC"; + case _354: return "Heart Disease"; + case _355: return "Help"; + case _356: return "High Blood Pressure"; + case _357: return "Home Help"; + case _358: return "Home Nursing"; + case _359: return "Homefirst"; + case _360: return "Hospice Care"; + case _361: return "Hospital Services"; + case _362: return "Hospital To Home"; + case _364: return "Hostel"; + case _365: return "Hostel Accommodation"; + case _366: return "Household Items"; + case _367: return "Hypertension"; + case _368: return "Illness"; + case _369: return "Independent Living"; + case _370: return "Information"; + case _371: return "Injury"; + case _372: return "Intake"; + case _373: return "Intensive Mobile Youth Outreach Services (Imyos)"; + case _374: return "Intervention"; + case _375: return "Job Searching"; + case _376: return "Justice"; + case _377: return "Leisure"; + case _378: return "Loans"; + case _379: return "Low Income Earners"; + case _380: return "Lung"; + case _381: return "Making A Difference"; + case _382: return "Medical Services"; + case _383: return "Medical Specialists"; + case _384: return "Medication Administration"; + case _385: return "Menstrual Information"; + case _386: return "Methadone"; + case _387: return "Mobile Support And Treatment Services (MSTS)"; + case _388: return "Motor Neurone"; + case _389: return "Multiple Sclerosis"; + case _390: return "Neighbourhood House"; + case _391: return "Nursing Home"; + case _392: return "Nursing Mothers"; + case _393: return "Obesity"; + case _394: return "Occupational Health & Safety"; + case _395: return "Optometrist"; + case _396: return "Oral Hygiene"; + case _397: return "Outpatients"; + case _398: return "Outreach Service"; + case _399: return "PADP"; + case _400: return "Pain"; + case _401: return "Pap Smear"; + case _402: return "Parenting"; + case _403: return "Peak Organisations"; + case _404: return "Personal Care"; + case _405: return "Pharmacies"; + case _406: return "Phobias"; + case _407: return "Physical"; + case _408: return "Physical Activity"; + case _409: return "Postnatal"; + case _410: return "Pregnancy"; + case _411: return "Pregnancy Tests"; + case _412: return "Preschool"; + case _413: return "Prescriptions"; + case _414: return "Primary Mental Health And Early Intervention Teams"; + case _415: return "Property Maintenance"; + case _416: return "Prostate"; + case _417: return "Psychiatric"; + case _418: return "Psychiatric Disability Support Services - Home-Based Outreach"; + case _419: return "Psychiatric Disability Support Services - Planned Respite"; + case _420: return "Psychiatric Disability Support Services - Residential Rehabilitation"; + case _421: return "Psychiatric Disability Support Services Home-Based Outreach"; + case _422: return "Psychiatric Disability Support Services Mutual Support And Self Help"; + case _423: return "Psychiatric Support"; + case _424: return "Recreation"; + case _425: return "Referral"; + case _426: return "Refuge"; + case _427: return "Rent Assistance"; + case _428: return "Residential Facilities"; + case _429: return "Residential Respite"; + case _430: return "Respiratory"; + case _431: return "Response"; + case _432: return "Rooming Houses"; + case _433: return "Safe Sex"; + case _434: return "Secure Extended Care Inpatient Services"; + case _435: return "Self Help"; + case _436: return "Separation"; + case _437: return "Services"; + case _438: return "Sex Education"; + case _439: return "Sexual Abuse"; + case _440: return "Sexual Issues"; + case _441: return "Sexually Transmitted Diseases"; + case _442: return "SIDS"; + case _443: return "Social Support"; + case _444: return "Socialisation"; + case _445: return "Special Needs"; + case _446: return "Speech Therapist"; + case _447: return "Splinting"; + case _448: return "Sport"; + case _449: return "Statewide And Specialist Services"; + case _450: return "STD"; + case _451: return "STI"; + case _452: return "Stillbirth"; + case _453: return "Stomal Care"; + case _454: return "Stroke"; + case _455: return "Substance Abuse"; + case _456: return "Support"; + case _457: return "Syringes"; + case _458: return "Teeth"; + case _459: return "Tenancy Advice"; + case _460: return "Terminal Illness"; + case _461: return "Therapy"; + case _462: return "Transcription"; + case _463: return "Translating Services"; + case _464: return "Translator"; + case _465: return "Transport"; + case _466: return "Vertebrae"; + case _467: return "Violence"; + case _468: return "Vocational Guidance"; + case _469: return "Weight"; + case _470: return "Welfare Assistance"; + case _471: return "Welfare Counselling"; + case _472: return "Wheelchairs"; + case _473: return "Wound Management"; + case _474: return "Young People At Risk"; + case _475: return "Further Description - Community Health Care"; + case _476: return "Library"; + case _477: return "Community Hours"; + case _478: return "Further Description - Specialist Medical"; + case _479: return "Hepatology"; + case _480: return "Gastroenterology"; + case _481: return "Gynaecology"; + case _482: return "Obstetrics"; + case _483: return "Further Description - Specialist Surgical"; + case _484: return "Placement Protection"; + case _485: return "Family Violence"; + case _486: return "Integrated Family Services"; + case _488: return "Diabetes Educator"; + case _489: return "Kinship Care"; + case _490: return "General Mental Health Services"; + case _491: return "Exercise Physiology"; + case _492: return "Medical Research"; + case _493: return "Youth"; + case _494: return "Youth Services"; + case _495: return "Youth Health"; + case _496: return "Child and Family Services"; + case _497: return "Home Visits"; + case _498: return "Mobile Services"; + case _500: return "Before and/or After School Care"; + case _501: return "Cancer Services"; + case _502: return "Integrated Cancer Services"; + case _503: return "Multidisciplinary Services"; + case _504: return "Multidisciplinary Cancer Services"; + case _505: return "Meetings"; + case _506: return "Blood pressure monitoring"; + case _507: return "Dose administration aid"; + case _508: return "Medical Equipment Hire"; + case _509: return "Parenting & family support/education"; + case _510: return "Deputising Service"; + case _513: return "Cancer Support Groups"; + case _514: return "Community Cancer Services"; + case _530: return "Disability Care Transport"; + case _531: return "Aged Care Transport"; + case _532: return "Diabetes Education service"; + case _533: return "Cardiac Rehabilitation Service "; + case _534: return "Young Adult Diabetes services (YADS)"; + case _535: return "Pulmonary Rehabilitation Service"; + case _536: return "Art therapy"; + case _537: return "Medication Reviews"; + case _538: return "Telephone Counselling"; + case _539: return "Telephone Help Line"; + case _540: return "Online Service"; + case _541: return "Crisis - Mental Health"; + case _542: return "Youth Crisis"; + case _543: return "Sexual Assault"; + case _544: return "GPAH Other"; + case _545: return "Paediatric Dermatology"; + case _546: return "Veterans Services"; + case _547: return "Veterans"; + case _548: return "Food Relief/food/meals"; + case _550: return "Dementia Care"; + case _551: return "Alzheimer"; + case _552: return "Drug and/or alcohol support groups"; + case _553: return "One on One Support/Mentoring/Coaching"; + case _554: return "Chronic Disease Management"; + case _555: return "Liaison Services"; + case _556: return "Walk in Centre / non emergency"; + case _557: return "Inpatients"; + case _558: return "Spiritual Counselling"; + case _559: return "Women's Health"; + case _560: return "Men's Health"; + case _561: return "Health education/Health awareness program"; + case _562: return "Test Message"; + case _563: return "Remedial Massage"; + case _564: return "Adolescent Mental Health Services"; + case _565: return "Youth drop in/assistance/support"; + case _566: return "Aboriginal Health Worker"; + case _567: return "Women's Health Clinic"; + case _568: return "Men's Health Clinic "; + case _569: return "Migrant Health Clinic"; + case _570: return "Refugee Health Clinic"; + case _571: return "Aboriginal Health Clinic"; + case _572: return "Nurse Practitioner lead Clinic/s"; + case _573: return "Nurse lead Clinic/s"; + case _574: return "Culturally tailored support groups"; + case _575: return "Culturally tailored health promotion"; + case _576: return "Rehabilitation"; + case _577: return "Education information/referral"; + case _580: return "Social Work"; + case _581: return "Haematology"; + case _582: return "Maternity Shared Care"; + case _583: return "Rehabilitation Service"; + case _584: return "Cranio-Sacral Therapy"; + case _585: return "Prosthetics & Orthotics"; + case _589: return "Home Medicine Review"; + case _590: return "GPAH - Medical"; + case _591: return "Music Therapy"; + case _593: return "Falls Prevention"; + case _599: return "Accommodation/Tenancy"; + case _600: return "Assess-Skill, Ability, Needs"; + case _601: return "Assist Access/Maintain Employ"; + case _602: return "Assist Prod-Pers Care/Safety"; + case _603: return "Assist-Integrate School/Ed"; + case _604: return "Assist-Life Stage, Transition"; + case _605: return "Assist-Personal Activities"; + case _606: return "Assist-Travel/Transport"; + case _607: return "Assistive Equip-General Tasks"; + case _608: return "Assistive Equip-Recreation"; + case _609: return "Assistive Prod-Household Task"; + case _610: return "Behaviour Support"; + case _611: return "Comms & Info Equipment"; + case _612: return "Community Nursing Care"; + case _613: return "Daily Tasks/Shared Living"; + case _614: return "Development-Life Skills"; + case _615: return "Early Childhood Supports"; + case _616: return "Equipment Special Assess Setup"; + case _617: return "Hearing Equipment"; + case _618: return "Home Modification"; + case _619: return "Household Tasks"; + case _620: return "Interpret/Translate"; + case _621: return "Other Innovative Supports"; + case _622: return "Participate Community"; + case _623: return "Personal Mobility Equipment"; + case _624: return "Physical Wellbeing"; + case _625: return "Plan Management"; + case _626: return "Therapeutic Supports"; + case _627: return "Training-Travel Independence"; + case _628: return "Vehicle modifications"; + case _629: return "Vision Equipment"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Adoption/Permanent Care Info/Support"; + case _2: return "Aged Care Assessment"; + case _3: return "Aged Care Information/Referral"; + case _4: return "Aged Residential Care"; + case _5: return "Case Management for Older Persons"; + case _6: return "Delivered Meals (Meals On Wheels)"; + case _7: return "Friendly Visiting"; + case _8: return "Home Care/Housekeeping Assistance"; + case _9: return "Home Maintenance and Repair"; + case _10: return "Personal Alarms/Alerts"; + case _11: return "Personal Care for Older Persons"; + case _12: return "Planned Activity Groups"; + case _13: return "Acupuncture"; + case _14: return "Alexander Technique Therapy"; + case _15: return "Aromatherapy"; + case _16: return "Biorhythm Services"; + case _17: return "Bowen Therapy"; + case _18: return "Chinese Herbal Medicine"; + case _19: return "Feldenkrais"; + case _20: return "Homoeopathy"; + case _21: return "Hydrotherapy"; + case _22: return "Hypnotherapy"; + case _23: return "Kinesiology"; + case _24: return "Magnetic Therapy"; + case _25: return "Massage Therapy"; + case _26: return "Meditation"; + case _27: return "Myotherapy"; + case _28: return "Naturopathy"; + case _29: return "Reflexology"; + case _30: return "Reiki"; + case _31: return "Relaxation Therapy"; + case _32: return "Shiatsu"; + case _33: return "Western Herbal Medicine"; + case _34: return "Family Day care"; + case _35: return "Holiday Programs"; + case _36: return "Kindergarten Inclusion Support "; + case _37: return "Kindergarten/Preschool"; + case _38: return "Long Day Child Care"; + case _39: return "Occasional Child Care"; + case _40: return "Outside School Hours Care"; + case _41: return "Children's Play Programs"; + case _42: return "Parenting/Family Support/Education"; + case _43: return "Playgroup"; + case _44: return "School Nursing"; + case _45: return "Toy Library"; + case _46: return "Child Protection/Child Abuse Report"; + case _47: return "Foster Care"; + case _48: return "Residential/Out-of-Home Care"; + case _49: return "Support - Young People Leaving Care"; + case _50: return "Audiology"; + case _51: return "Blood Donation"; + case _52: return "Chiropractic"; + case _53: return "Dietetics"; + case _54: return "Family Planning"; + case _55: return "Health Advocacy/Liaison Service"; + case _56: return "Health Information/Referral"; + case _57: return "Immunization"; + case _58: return "Maternal & Child Health"; + case _59: return "Nursing"; + case _60: return "Nutrition"; + case _61: return "Occupational Therapy"; + case _62: return "Optometry"; + case _63: return "Osteopathy"; + case _64: return "Pharmacy"; + case _65: return "Physiotherapy"; + case _66: return "Podiatry"; + case _67: return "Sexual Health"; + case _68: return "Speech Pathology/Therapy"; + case _69: return "Bereavement Counselling"; + case _70: return "Crisis Counselling"; + case _71: return "Family Counselling/Therapy"; + case _72: return "Family Violence Counselling"; + case _73: return "Financial Counselling"; + case _74: return "Generalist Counselling"; + case _75: return "Genetic Counselling"; + case _76: return "Health Counselling"; + case _77: return "Mediation"; + case _78: return "Problem Gambling Counselling"; + case _79: return "Relationship Counselling"; + case _80: return "Sexual Assault Counselling"; + case _81: return "Trauma Counselling"; + case _82: return "Victims of Crime Counselling"; + case _83: return "Cemetery Operation"; + case _84: return "Cremation"; + case _85: return "Death Service Information"; + case _86: return "Funeral Services"; + case _87: return "Endodontic"; + case _88: return "General Dental"; + case _89: return "Oral Medicine"; + case _90: return "Oral Surgery"; + case _91: return "Orthodontic"; + case _92: return "Paediatric Dentistry"; + case _93: return "Periodontic"; + case _94: return "Prosthodontic"; + case _95: return "Acquired Brain Injury Info/Referral"; + case _96: return "Disability Advocacy"; + case _97: return "Disability Aids & Equipment"; + case _98: return "Disability Case Management"; + case _99: return "Disability Day Programs/Activities"; + case _100: return "Disability Information/Referral"; + case _101: return "Disability Support Packages"; + case _102: return "Disability Supported Accommodation"; + case _103: return "Early Childhood Intervention"; + case _104: return "Hearing Aids & Equipment"; + case _105: return "Drug and/or Alcohol Counselling"; + case _106: return "Drug/Alcohol Information/Referral"; + case _107: return "Needle & Syringe Exchange"; + case _108: return "Non-resid. Alcohol/Drug Treatment "; + case _109: return "Pharmacotherapy"; + case _110: return "Quit Program"; + case _111: return "Residential Alcohol/Drug Treatment "; + case _112: return "Adult/Community Education"; + case _113: return "Higher Education"; + case _114: return "Primary Education"; + case _115: return "Secondary Education"; + case _116: return "Training & Vocational Education"; + case _117: return "Emergency Medical"; + case _118: return "Employment Placement and/or Support"; + case _119: return "Vocational Rehabilitation"; + case _120: return "Work Safety/Accident Prevention"; + case _121: return "Financial Assistance"; + case _122: return "Financial Information/Advice"; + case _123: return "Material Aid"; + case _124: return "General Practice"; + case _125: return "Accommodation Placement/Support"; + case _126: return "Crisis/Emergency Accommodation"; + case _127: return "Homelessness Support"; + case _128: return "Housing Information/Referral"; + case _129: return "Public Rental Housing"; + case _130: return "Interpreting/Multilingual Service"; + case _131: return "Juvenile Justice"; + case _132: return "Legal Advocacy"; + case _133: return "Legal Information/Advice/Referral"; + case _134: return "Mental Health Advocacy"; + case _135: return "Mental Health Assess/Triage/Crisis Response"; + case _136: return "Mental Health Case Management"; + case _137: return "Mental Health Information/Referral"; + case _138: return "Mental Health Inpatient Services"; + case _139: return "Mental Health Non-residential Rehab"; + case _140: return "Mental Health Residential Rehab/CCU"; + case _141: return "Psychiatry (Requires Referral)"; + case _142: return "Psychology"; + case _143: return "Martial Arts"; + case _144: return "Personal Fitness Training"; + case _145: return "Physical Activity Group"; + case _146: return "Physical Activity Programs"; + case _147: return "Physical Fitness Testing"; + case _148: return "Pilates"; + case _149: return "Self-Defence"; + case _150: return "Sporting Club"; + case _151: return "Yoga"; + case _152: return "Food Safety"; + case _153: return "Health Regulatory /Inspection /Cert."; + case _154: return "Work Health/Safety Inspection/Cert."; + case _155: return "Carer Support"; + case _156: return "Respite Care"; + case _157: return "Anatomical Pathology "; + case _158: return "Pathology - Clinical Chemistry"; + case _159: return "Pathology - General"; + case _160: return "Pathology - Genetics"; + case _161: return "Pathology - Haematology"; + case _162: return "Pathology - Immunology"; + case _163: return "Pathology - Microbiology"; + case _164: return "Anaesthesiology - Pain Medicine"; + case _165: return "Cardiology"; + case _166: return "Clinical Genetics"; + case _167: return "Clinical Pharmacology"; + case _168: return "Dermatology"; + case _169: return "Endocrinology"; + case _170: return "Gastroenterology & Hepatology"; + case _171: return "Geriatric Medicine"; + case _172: return "Immunology & Allergy"; + case _173: return "Infectious Diseases"; + case _174: return "Intensive Care Medicine"; + case _175: return "Medical Oncology"; + case _176: return "Nephrology"; + case _177: return "Neurology"; + case _178: return "Occupational Medicine"; + case _179: return "Palliative Medicine"; + case _180: return "Public Health Medicine"; + case _181: return "Rehabilitation Medicine"; + case _182: return "Rheumatology"; + case _183: return "Sleep Medicine"; + case _184: return "Thoracic Medicine"; + case _185: return "Gynaecological Oncology"; + case _186: return "Obstetrics & Gynaecology"; + case _187: return "Reproductive Endocrinology/Infertility"; + case _188: return "Urogynaecology"; + case _189: return "Neonatology & Perinatology"; + case _190: return "Paediatric Cardiology"; + case _191: return "Paediatric Clinical Genetics"; + case _192: return "Paediatric Clinical Pharmacology"; + case _193: return "Paediatric Endocrinology"; + case _194: return "Paed. Gastroenterology/Hepatology"; + case _195: return "Paediatric Haematology"; + case _196: return "Paediatric Immunology & Allergy"; + case _197: return "Paediatric Infectious Diseases"; + case _198: return "Paediatric Intensive Care Medicine"; + case _199: return "Paediatric Medical Oncology"; + case _200: return "Paediatric Medicine"; + case _201: return "Paediatric Nephrology"; + case _202: return "Paediatric Neurology"; + case _203: return "Paediatric Nuclear Medicine"; + case _204: return "Paediatric Rehabilitation Medicine"; + case _205: return "Paediatric Rheumatology"; + case _206: return "Paediatric Sleep Medicine"; + case _207: return "Paediatric Surgery"; + case _208: return "Paediatric Thoracic Medicine"; + case _209: return "Diag. Radiology /Xray /CT /Fluoroscopy"; + case _210: return "Diagnostic Ultrasound"; + case _211: return "Magnetic Resonance Imaging (MRI)"; + case _212: return "Nuclear Medicine"; + case _213: return "Obstetric/Gynaecological Ultrasound"; + case _214: return "Radiation Oncology"; + case _215: return "Cardiothoracic Surgery"; + case _216: return "Neurosurgery"; + case _217: return "Ophthalmology"; + case _218: return "Orthopaedic Surgery"; + case _219: return "Otolaryngology/Head & Neck Surgery"; + case _220: return "Plastic & Reconstructive Surgery"; + case _221: return "Surgery - General"; + case _222: return "Urology"; + case _223: return "Vascular Surgery"; + case _224: return "Support Groups"; + case _225: return "Air ambulance"; + case _226: return "Ambulance"; + case _227: return "Blood Transport"; + case _228: return "Community Bus"; + case _229: return "Flying Doctor Service"; + case _230: return "Patient Transport"; + case _231: return "A&E"; + case _232: return "A&EP"; + case _233: return "Abuse"; + case _234: return "ACAS"; + case _235: return "Access"; + case _236: return "Accident"; + case _237: return "Acute Inpatient Serv"; + case _238: return "Adult Day Programs"; + case _239: return "Adult Mental Health Services"; + case _240: return "Advice"; + case _241: return "Advocacy"; + case _242: return "Aged Persons Mental "; + case _243: return "Aged Persons Mental "; + case _244: return "Aged Persons Mental "; + case _245: return "Aids"; + case _246: return "Al-Anon"; + case _247: return "Alcohol"; + case _248: return "Al-Teen"; + case _249: return "Antenatal"; + case _250: return "Anxiety"; + case _251: return "Arthritis"; + case _252: return "Assessment"; + case _253: return "Assistance"; + case _254: return "Asthma"; + case _255: return "ATSS"; + case _256: return "Attendant Care"; + case _257: return "Babies"; + case _258: return "Bathroom Modificatio"; + case _259: return "Behaviour"; + case _260: return "Behaviour Interventi"; + case _261: return "Bereavement"; + case _262: return "Bipolar"; + case _263: return "Birth"; + case _264: return "Birth Control"; + case _265: return "Birthing Options"; + case _266: return "BIST"; + case _267: return "Blood"; + case _268: return "Bone"; + case _269: return "Bowel"; + case _270: return "Brain"; + case _271: return "Breast Feeding"; + case _272: return "Breast Screen"; + case _273: return "Brokerage"; + case _274: return "Cancer"; + case _275: return "Cancer Support"; + case _276: return "Cardiovascular Disea"; + case _277: return "Care Packages"; + case _278: return "Carer"; + case _279: return "Case Management"; + case _280: return "Casualty"; + case _281: return "Centrelink"; + case _282: return "Chemists"; + case _283: return "Child And Adolescent"; + case _284: return "Child Care"; + case _285: return "Child Services"; + case _286: return "Children"; + case _287: return "Children's Services"; + case _288: return "Cholesterol"; + case _289: return "Clothing"; + case _290: return "Community Based Acco"; + case _291: return "Community Care Unit"; + case _292: return "Community Child And "; + case _293: return "Community Health"; + case _294: return "Community Residentia"; + case _295: return "Community Transport"; + case _296: return "Companion Visiting"; + case _297: return "Companionship"; + case _298: return "Consumer Advice"; + case _299: return "Consumer Issues"; + case _300: return "Continuing Care Serv"; + case _301: return "Contraception Inform"; + case _302: return "Coordinating Bodies"; + case _303: return "Correctional Service"; + case _304: return "Council Environmenta"; + case _305: return "Counselling"; + case _306: return "Criminal"; + case _307: return "Crises"; + case _308: return "Crisis Assessment An"; + case _309: return "Crisis Assistance"; + case _310: return "Crisis Refuge"; + case _311: return "Day Program"; + case _312: return "Deaf"; + case _313: return "Dental Hygiene"; + case _314: return "Dentistry"; + case _315: return "Dentures"; + case _316: return "Depression"; + case _317: return "Detoxification"; + case _318: return "Diabetes"; + case _319: return "Diaphragm Fitting"; + case _320: return "Dieticians"; + case _321: return "Disabled Parking"; + case _322: return "District Nursing"; + case _323: return "Divorce"; + case _324: return "Doctors"; + case _325: return "Drink-Drive"; + case _326: return "Dual Diagnosis Servi"; + case _327: return "Early Choice"; + case _328: return "Eating Disorder"; + case _330: return "Emergency Relief"; + case _331: return "Employment And Train"; + case _332: return "Environment"; + case _333: return "Equipment"; + case _334: return "Exercise"; + case _335: return "Facility"; + case _336: return "Family Choice"; + case _337: return "Family Law"; + case _338: return "Family Options"; + case _339: return "Family Services"; + case _340: return "FFYA"; + case _341: return "Financial Aid"; + case _342: return "Fitness"; + case _343: return "Flexible Care Packag"; + case _344: return "Food"; + case _345: return "Food Vouchers"; + case _346: return "Forensic Mental Heal"; + case _347: return "Futures"; + case _348: return "Futures For Young Ad"; + case _349: return "General Practitioner"; + case _350: return "Grants"; + case _351: return "Grief"; + case _352: return "Grief Counselling"; + case _353: return "HACC"; + case _354: return "Heart Disease"; + case _355: return "Help"; + case _356: return "High Blood Pressure"; + case _357: return "Home Help"; + case _358: return "Home Nursing"; + case _359: return "Homefirst"; + case _360: return "Hospice Care"; + case _361: return "Hospital Services"; + case _362: return "Hospital To Home"; + case _364: return "Hostel"; + case _365: return "Hostel Accommodation"; + case _366: return "Household Items"; + case _367: return "Hypertension"; + case _368: return "Illness"; + case _369: return "Independent Living"; + case _370: return "Information"; + case _371: return "Injury"; + case _372: return "Intake"; + case _373: return "Intensive Mobile You"; + case _374: return "Intervention"; + case _375: return "Job Searching"; + case _376: return "Justice"; + case _377: return "Leisure"; + case _378: return "Loans"; + case _379: return "Low Income Earners"; + case _380: return "Lung"; + case _381: return "Making A Difference"; + case _382: return "Medical Services"; + case _383: return "Medical Specialists"; + case _384: return "Medication Administr"; + case _385: return "Menstrual Informatio"; + case _386: return "Methadone"; + case _387: return "Mobile Support And T"; + case _388: return "Motor Neurone"; + case _389: return "Multiple Sclerosis"; + case _390: return "Neighbourhood House"; + case _391: return "Nursing Home"; + case _392: return "Nursing Mothers"; + case _393: return "Obesity"; + case _394: return "Occupational Health "; + case _395: return "Optometrist"; + case _396: return "Oral Hygiene"; + case _397: return "Outpatients"; + case _398: return "Outreach Service"; + case _399: return "PADP"; + case _400: return "Pain"; + case _401: return "Pap Smear"; + case _402: return "Parenting"; + case _403: return "Peak Organisations"; + case _404: return "Personal Care"; + case _405: return "Pharmacies"; + case _406: return "Phobias"; + case _407: return "Physical"; + case _408: return "Physical Activity"; + case _409: return "Postnatal"; + case _410: return "Pregnancy"; + case _411: return "Pregnancy Tests"; + case _412: return "Preschool"; + case _413: return "Prescriptions"; + case _414: return "Primary Mental Healt"; + case _415: return "Property Maintenance"; + case _416: return "Prostate"; + case _417: return "Psychiatric"; + case _418: return "Psychiatric Disabili"; + case _419: return "Psychiatric Disabili"; + case _420: return "Psychiatric Disabili"; + case _421: return "Psychiatric Disabili"; + case _422: return "Psychiatric Disabili"; + case _423: return "Psychiatric Support"; + case _424: return "Recreation"; + case _425: return "Referral"; + case _426: return "Refuge"; + case _427: return "Rent Assistance"; + case _428: return "Residential Faciliti"; + case _429: return "Residential Respite"; + case _430: return "Respiratory"; + case _431: return "Response"; + case _432: return "Rooming Houses"; + case _433: return "Safe Sex"; + case _434: return "Secure Extended Care"; + case _435: return "Self Help"; + case _436: return "Separation"; + case _437: return "Services"; + case _438: return "Sex Education"; + case _439: return "Sexual Abuse"; + case _440: return "Sexual Issues"; + case _441: return "Sexually Transmitted"; + case _442: return "SIDS"; + case _443: return "Social Support"; + case _444: return "Socialisation"; + case _445: return "Special Needs"; + case _446: return "Speech Therapist"; + case _447: return "Splinting"; + case _448: return "Sport"; + case _449: return "Statewide And Specia"; + case _450: return "STD"; + case _451: return "STI"; + case _452: return "Stillbirth"; + case _453: return "Stomal Care"; + case _454: return "Stroke"; + case _455: return "Substance Abuse"; + case _456: return "Support"; + case _457: return "Syringes"; + case _458: return "Teeth"; + case _459: return "Tenancy Advice"; + case _460: return "Terminal Illness"; + case _461: return "Therapy"; + case _462: return "Transcription"; + case _463: return "Translating Services"; + case _464: return "Translator"; + case _465: return "Transport"; + case _466: return "Vertebrae"; + case _467: return "Violence"; + case _468: return "Vocational Guidance"; + case _469: return "Weight"; + case _470: return "Welfare Assistance"; + case _471: return "Welfare Counselling"; + case _472: return "Wheelchairs"; + case _473: return "Wound Management"; + case _474: return "Young People At Risk"; + case _475: return "Further Desc. - Community Health Care"; + case _476: return "Library"; + case _477: return "Community Hours"; + case _478: return "Further Desc. - Specialist Medical"; + case _479: return "Hepatology"; + case _480: return "Gastroenterology "; + case _481: return "Gynaecology"; + case _482: return "Obstetrics"; + case _483: return "Further Desc. - Specialist Surgical"; + case _484: return "Placement Protection"; + case _485: return "Family Violence"; + case _486: return "Integrated Family Services"; + case _488: return "Diabetes Educator"; + case _489: return "Kinship Care"; + case _490: return "General Mental Health Services"; + case _491: return "Exercise Physiology"; + case _492: return "Medical Research"; + case _493: return "Youth"; + case _494: return "Youth Services"; + case _495: return "Youth Health"; + case _496: return "Child and Family Ser"; + case _497: return "Home Visits"; + case _498: return "Mobile Services"; + case _500: return "Before and/or After "; + case _501: return "Cancer Services"; + case _502: return "Integrated Cancer Se"; + case _503: return "Multidisciplinary Se"; + case _504: return "Multidisciplinary Ca"; + case _505: return "Meetings"; + case _506: return "Blood pressure monit"; + case _507: return "Dose administration "; + case _508: return "Medical Equipment Hi"; + case _509: return "Parenting/Family Support/Education"; + case _510: return "Deputising Service"; + case _513: return "Cancer Support Groups"; + case _514: return "Community Cancer Services"; + case _530: return "Disability Care Transport"; + case _531: return "Aged Care Transport"; + case _532: return "Diabetes Education s"; + case _533: return "Cardiac Rehabilitati"; + case _534: return "Young Adult Diabetes"; + case _535: return "Pulmonary Rehabilita"; + case _536: return "Art therapy "; + case _537: return "Medication Reviews"; + case _538: return "Telephone Counselling"; + case _539: return "Telephone Help Line"; + case _540: return "Online Service"; + case _541: return "Crisis - Mental Health"; + case _542: return "Youth Crisis"; + case _543: return "Sexual Assault"; + case _544: return "GPAH Other"; + case _545: return "Paediatric Dermatology"; + case _546: return "Veterans Services"; + case _547: return "Veterans"; + case _548: return "Food Relief/Food/Meals"; + case _550: return "Dementia Care"; + case _551: return "Alzheimer"; + case _552: return "Drug and/or Alcohol Support Groups"; + case _553: return "1-on-1 Support /Mentoring /Coaching"; + case _554: return "Chronic Disease Management"; + case _555: return "Liaison Services"; + case _556: return "Walk-in Centre /Non-Emergency"; + case _557: return "Inpatients"; + case _558: return "Spiritual Counselling"; + case _559: return "Women's Health"; + case _560: return "Men's Health"; + case _561: return "Health Education/Awareness Program"; + case _562: return "Test Message"; + case _563: return "Remedial Massage"; + case _564: return "Adolescent Mental Health Services"; + case _565: return "Youth Drop In/Assistance/Support"; + case _566: return "Aboriginal Health Worker"; + case _567: return "Women's Health Clinic"; + case _568: return "Men's Health Clinic"; + case _569: return "Migrant Health Clinic"; + case _570: return "Refugee Health Clinic"; + case _571: return "Aboriginal Health Clinic"; + case _572: return "Nurse Practitioner Lead Clinic/s"; + case _573: return "Nurse Lead Clinic/s"; + case _574: return "Culturally Tailored Support Groups"; + case _575: return "Culturally Tailored Health Promotion"; + case _576: return "Rehabilitation"; + case _577: return "Education Information/Referral"; + case _580: return "Social Work"; + case _581: return "Haematology"; + case _582: return "Maternity Shared Car"; + case _583: return "Rehabilitation Servi"; + case _584: return "Cranio-sacral Therapy"; + case _585: return "Prosthetics & Orthotics"; + case _589: return "Home Medicine Review"; + case _590: return "GPAH - Medical"; + case _591: return "Music Therapy"; + case _593: return "Falls Prevention"; + case _599: return "Accommodation/Tenancy"; + case _600: return "Assess-Skill, Ability, Needs"; + case _601: return "Assist Access/Maintain Employ"; + case _602: return "Assist Prod-Pers Care/Safety"; + case _603: return "Assist-Integrate School/Ed"; + case _604: return "Assist-Life Stage, Transition"; + case _605: return "Assist-Personal Activities"; + case _606: return "Assist-Travel/Transport"; + case _607: return "Assistive Equip-General Tasks"; + case _608: return "Assistive Equip-Recreation"; + case _609: return "Assistive Prod-Household Task"; + case _610: return "Behaviour Support"; + case _611: return "Comms & Info Equipment"; + case _612: return "Community Nursing Care"; + case _613: return "Daily Tasks/Shared Living"; + case _614: return "Development-Life Skills"; + case _615: return "Early Childhood Supports"; + case _616: return "Equipment Special Assess Setup"; + case _617: return "Hearing Equipment"; + case _618: return "Home Modification"; + case _619: return "Household Tasks"; + case _620: return "Interpret/Translate"; + case _621: return "Other Innovative Supports"; + case _622: return "Participate Community"; + case _623: return "Personal Mobility Equipment"; + case _624: return "Physical Wellbeing"; + case _625: return "Plan Management"; + case _626: return "Therapeutic Supports"; + case _627: return "Training-Travel Independence"; + case _628: return "Vehicle modifications"; + case _629: return "Vision Equipment"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceTypeEnumFactory.java new file mode 100644 index 00000000000..6332112b50b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceTypeEnumFactory.java @@ -0,0 +1,2438 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceTypeEnumFactory implements EnumFactory { + + public ServiceType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return ServiceType._1; + if ("2".equals(codeString)) + return ServiceType._2; + if ("3".equals(codeString)) + return ServiceType._3; + if ("4".equals(codeString)) + return ServiceType._4; + if ("5".equals(codeString)) + return ServiceType._5; + if ("6".equals(codeString)) + return ServiceType._6; + if ("7".equals(codeString)) + return ServiceType._7; + if ("8".equals(codeString)) + return ServiceType._8; + if ("9".equals(codeString)) + return ServiceType._9; + if ("10".equals(codeString)) + return ServiceType._10; + if ("11".equals(codeString)) + return ServiceType._11; + if ("12".equals(codeString)) + return ServiceType._12; + if ("13".equals(codeString)) + return ServiceType._13; + if ("14".equals(codeString)) + return ServiceType._14; + if ("15".equals(codeString)) + return ServiceType._15; + if ("16".equals(codeString)) + return ServiceType._16; + if ("17".equals(codeString)) + return ServiceType._17; + if ("18".equals(codeString)) + return ServiceType._18; + if ("19".equals(codeString)) + return ServiceType._19; + if ("20".equals(codeString)) + return ServiceType._20; + if ("21".equals(codeString)) + return ServiceType._21; + if ("22".equals(codeString)) + return ServiceType._22; + if ("23".equals(codeString)) + return ServiceType._23; + if ("24".equals(codeString)) + return ServiceType._24; + if ("25".equals(codeString)) + return ServiceType._25; + if ("26".equals(codeString)) + return ServiceType._26; + if ("27".equals(codeString)) + return ServiceType._27; + if ("28".equals(codeString)) + return ServiceType._28; + if ("29".equals(codeString)) + return ServiceType._29; + if ("30".equals(codeString)) + return ServiceType._30; + if ("31".equals(codeString)) + return ServiceType._31; + if ("32".equals(codeString)) + return ServiceType._32; + if ("33".equals(codeString)) + return ServiceType._33; + if ("34".equals(codeString)) + return ServiceType._34; + if ("35".equals(codeString)) + return ServiceType._35; + if ("36".equals(codeString)) + return ServiceType._36; + if ("37".equals(codeString)) + return ServiceType._37; + if ("38".equals(codeString)) + return ServiceType._38; + if ("39".equals(codeString)) + return ServiceType._39; + if ("40".equals(codeString)) + return ServiceType._40; + if ("41".equals(codeString)) + return ServiceType._41; + if ("42".equals(codeString)) + return ServiceType._42; + if ("43".equals(codeString)) + return ServiceType._43; + if ("44".equals(codeString)) + return ServiceType._44; + if ("45".equals(codeString)) + return ServiceType._45; + if ("46".equals(codeString)) + return ServiceType._46; + if ("47".equals(codeString)) + return ServiceType._47; + if ("48".equals(codeString)) + return ServiceType._48; + if ("49".equals(codeString)) + return ServiceType._49; + if ("50".equals(codeString)) + return ServiceType._50; + if ("51".equals(codeString)) + return ServiceType._51; + if ("52".equals(codeString)) + return ServiceType._52; + if ("53".equals(codeString)) + return ServiceType._53; + if ("54".equals(codeString)) + return ServiceType._54; + if ("55".equals(codeString)) + return ServiceType._55; + if ("56".equals(codeString)) + return ServiceType._56; + if ("57".equals(codeString)) + return ServiceType._57; + if ("58".equals(codeString)) + return ServiceType._58; + if ("59".equals(codeString)) + return ServiceType._59; + if ("60".equals(codeString)) + return ServiceType._60; + if ("61".equals(codeString)) + return ServiceType._61; + if ("62".equals(codeString)) + return ServiceType._62; + if ("63".equals(codeString)) + return ServiceType._63; + if ("64".equals(codeString)) + return ServiceType._64; + if ("65".equals(codeString)) + return ServiceType._65; + if ("66".equals(codeString)) + return ServiceType._66; + if ("67".equals(codeString)) + return ServiceType._67; + if ("68".equals(codeString)) + return ServiceType._68; + if ("69".equals(codeString)) + return ServiceType._69; + if ("70".equals(codeString)) + return ServiceType._70; + if ("71".equals(codeString)) + return ServiceType._71; + if ("72".equals(codeString)) + return ServiceType._72; + if ("73".equals(codeString)) + return ServiceType._73; + if ("74".equals(codeString)) + return ServiceType._74; + if ("75".equals(codeString)) + return ServiceType._75; + if ("76".equals(codeString)) + return ServiceType._76; + if ("77".equals(codeString)) + return ServiceType._77; + if ("78".equals(codeString)) + return ServiceType._78; + if ("79".equals(codeString)) + return ServiceType._79; + if ("80".equals(codeString)) + return ServiceType._80; + if ("81".equals(codeString)) + return ServiceType._81; + if ("82".equals(codeString)) + return ServiceType._82; + if ("83".equals(codeString)) + return ServiceType._83; + if ("84".equals(codeString)) + return ServiceType._84; + if ("85".equals(codeString)) + return ServiceType._85; + if ("86".equals(codeString)) + return ServiceType._86; + if ("87".equals(codeString)) + return ServiceType._87; + if ("88".equals(codeString)) + return ServiceType._88; + if ("89".equals(codeString)) + return ServiceType._89; + if ("90".equals(codeString)) + return ServiceType._90; + if ("91".equals(codeString)) + return ServiceType._91; + if ("92".equals(codeString)) + return ServiceType._92; + if ("93".equals(codeString)) + return ServiceType._93; + if ("94".equals(codeString)) + return ServiceType._94; + if ("95".equals(codeString)) + return ServiceType._95; + if ("96".equals(codeString)) + return ServiceType._96; + if ("97".equals(codeString)) + return ServiceType._97; + if ("98".equals(codeString)) + return ServiceType._98; + if ("99".equals(codeString)) + return ServiceType._99; + if ("100".equals(codeString)) + return ServiceType._100; + if ("101".equals(codeString)) + return ServiceType._101; + if ("102".equals(codeString)) + return ServiceType._102; + if ("103".equals(codeString)) + return ServiceType._103; + if ("104".equals(codeString)) + return ServiceType._104; + if ("105".equals(codeString)) + return ServiceType._105; + if ("106".equals(codeString)) + return ServiceType._106; + if ("107".equals(codeString)) + return ServiceType._107; + if ("108".equals(codeString)) + return ServiceType._108; + if ("109".equals(codeString)) + return ServiceType._109; + if ("110".equals(codeString)) + return ServiceType._110; + if ("111".equals(codeString)) + return ServiceType._111; + if ("112".equals(codeString)) + return ServiceType._112; + if ("113".equals(codeString)) + return ServiceType._113; + if ("114".equals(codeString)) + return ServiceType._114; + if ("115".equals(codeString)) + return ServiceType._115; + if ("116".equals(codeString)) + return ServiceType._116; + if ("117".equals(codeString)) + return ServiceType._117; + if ("118".equals(codeString)) + return ServiceType._118; + if ("119".equals(codeString)) + return ServiceType._119; + if ("120".equals(codeString)) + return ServiceType._120; + if ("121".equals(codeString)) + return ServiceType._121; + if ("122".equals(codeString)) + return ServiceType._122; + if ("123".equals(codeString)) + return ServiceType._123; + if ("124".equals(codeString)) + return ServiceType._124; + if ("125".equals(codeString)) + return ServiceType._125; + if ("126".equals(codeString)) + return ServiceType._126; + if ("127".equals(codeString)) + return ServiceType._127; + if ("128".equals(codeString)) + return ServiceType._128; + if ("129".equals(codeString)) + return ServiceType._129; + if ("130".equals(codeString)) + return ServiceType._130; + if ("131".equals(codeString)) + return ServiceType._131; + if ("132".equals(codeString)) + return ServiceType._132; + if ("133".equals(codeString)) + return ServiceType._133; + if ("134".equals(codeString)) + return ServiceType._134; + if ("135".equals(codeString)) + return ServiceType._135; + if ("136".equals(codeString)) + return ServiceType._136; + if ("137".equals(codeString)) + return ServiceType._137; + if ("138".equals(codeString)) + return ServiceType._138; + if ("139".equals(codeString)) + return ServiceType._139; + if ("140".equals(codeString)) + return ServiceType._140; + if ("141".equals(codeString)) + return ServiceType._141; + if ("142".equals(codeString)) + return ServiceType._142; + if ("143".equals(codeString)) + return ServiceType._143; + if ("144".equals(codeString)) + return ServiceType._144; + if ("145".equals(codeString)) + return ServiceType._145; + if ("146".equals(codeString)) + return ServiceType._146; + if ("147".equals(codeString)) + return ServiceType._147; + if ("148".equals(codeString)) + return ServiceType._148; + if ("149".equals(codeString)) + return ServiceType._149; + if ("150".equals(codeString)) + return ServiceType._150; + if ("151".equals(codeString)) + return ServiceType._151; + if ("152".equals(codeString)) + return ServiceType._152; + if ("153".equals(codeString)) + return ServiceType._153; + if ("154".equals(codeString)) + return ServiceType._154; + if ("155".equals(codeString)) + return ServiceType._155; + if ("156".equals(codeString)) + return ServiceType._156; + if ("157".equals(codeString)) + return ServiceType._157; + if ("158".equals(codeString)) + return ServiceType._158; + if ("159".equals(codeString)) + return ServiceType._159; + if ("160".equals(codeString)) + return ServiceType._160; + if ("161".equals(codeString)) + return ServiceType._161; + if ("162".equals(codeString)) + return ServiceType._162; + if ("163".equals(codeString)) + return ServiceType._163; + if ("164".equals(codeString)) + return ServiceType._164; + if ("165".equals(codeString)) + return ServiceType._165; + if ("166".equals(codeString)) + return ServiceType._166; + if ("167".equals(codeString)) + return ServiceType._167; + if ("168".equals(codeString)) + return ServiceType._168; + if ("169".equals(codeString)) + return ServiceType._169; + if ("170".equals(codeString)) + return ServiceType._170; + if ("171".equals(codeString)) + return ServiceType._171; + if ("172".equals(codeString)) + return ServiceType._172; + if ("173".equals(codeString)) + return ServiceType._173; + if ("174".equals(codeString)) + return ServiceType._174; + if ("175".equals(codeString)) + return ServiceType._175; + if ("176".equals(codeString)) + return ServiceType._176; + if ("177".equals(codeString)) + return ServiceType._177; + if ("178".equals(codeString)) + return ServiceType._178; + if ("179".equals(codeString)) + return ServiceType._179; + if ("180".equals(codeString)) + return ServiceType._180; + if ("181".equals(codeString)) + return ServiceType._181; + if ("182".equals(codeString)) + return ServiceType._182; + if ("183".equals(codeString)) + return ServiceType._183; + if ("184".equals(codeString)) + return ServiceType._184; + if ("185".equals(codeString)) + return ServiceType._185; + if ("186".equals(codeString)) + return ServiceType._186; + if ("187".equals(codeString)) + return ServiceType._187; + if ("188".equals(codeString)) + return ServiceType._188; + if ("189".equals(codeString)) + return ServiceType._189; + if ("190".equals(codeString)) + return ServiceType._190; + if ("191".equals(codeString)) + return ServiceType._191; + if ("192".equals(codeString)) + return ServiceType._192; + if ("193".equals(codeString)) + return ServiceType._193; + if ("194".equals(codeString)) + return ServiceType._194; + if ("195".equals(codeString)) + return ServiceType._195; + if ("196".equals(codeString)) + return ServiceType._196; + if ("197".equals(codeString)) + return ServiceType._197; + if ("198".equals(codeString)) + return ServiceType._198; + if ("199".equals(codeString)) + return ServiceType._199; + if ("200".equals(codeString)) + return ServiceType._200; + if ("201".equals(codeString)) + return ServiceType._201; + if ("202".equals(codeString)) + return ServiceType._202; + if ("203".equals(codeString)) + return ServiceType._203; + if ("204".equals(codeString)) + return ServiceType._204; + if ("205".equals(codeString)) + return ServiceType._205; + if ("206".equals(codeString)) + return ServiceType._206; + if ("207".equals(codeString)) + return ServiceType._207; + if ("208".equals(codeString)) + return ServiceType._208; + if ("209".equals(codeString)) + return ServiceType._209; + if ("210".equals(codeString)) + return ServiceType._210; + if ("211".equals(codeString)) + return ServiceType._211; + if ("212".equals(codeString)) + return ServiceType._212; + if ("213".equals(codeString)) + return ServiceType._213; + if ("214".equals(codeString)) + return ServiceType._214; + if ("215".equals(codeString)) + return ServiceType._215; + if ("216".equals(codeString)) + return ServiceType._216; + if ("217".equals(codeString)) + return ServiceType._217; + if ("218".equals(codeString)) + return ServiceType._218; + if ("219".equals(codeString)) + return ServiceType._219; + if ("220".equals(codeString)) + return ServiceType._220; + if ("221".equals(codeString)) + return ServiceType._221; + if ("222".equals(codeString)) + return ServiceType._222; + if ("223".equals(codeString)) + return ServiceType._223; + if ("224".equals(codeString)) + return ServiceType._224; + if ("225".equals(codeString)) + return ServiceType._225; + if ("226".equals(codeString)) + return ServiceType._226; + if ("227".equals(codeString)) + return ServiceType._227; + if ("228".equals(codeString)) + return ServiceType._228; + if ("229".equals(codeString)) + return ServiceType._229; + if ("230".equals(codeString)) + return ServiceType._230; + if ("231".equals(codeString)) + return ServiceType._231; + if ("232".equals(codeString)) + return ServiceType._232; + if ("233".equals(codeString)) + return ServiceType._233; + if ("234".equals(codeString)) + return ServiceType._234; + if ("235".equals(codeString)) + return ServiceType._235; + if ("236".equals(codeString)) + return ServiceType._236; + if ("237".equals(codeString)) + return ServiceType._237; + if ("238".equals(codeString)) + return ServiceType._238; + if ("239".equals(codeString)) + return ServiceType._239; + if ("240".equals(codeString)) + return ServiceType._240; + if ("241".equals(codeString)) + return ServiceType._241; + if ("242".equals(codeString)) + return ServiceType._242; + if ("243".equals(codeString)) + return ServiceType._243; + if ("244".equals(codeString)) + return ServiceType._244; + if ("245".equals(codeString)) + return ServiceType._245; + if ("246".equals(codeString)) + return ServiceType._246; + if ("247".equals(codeString)) + return ServiceType._247; + if ("248".equals(codeString)) + return ServiceType._248; + if ("249".equals(codeString)) + return ServiceType._249; + if ("250".equals(codeString)) + return ServiceType._250; + if ("251".equals(codeString)) + return ServiceType._251; + if ("252".equals(codeString)) + return ServiceType._252; + if ("253".equals(codeString)) + return ServiceType._253; + if ("254".equals(codeString)) + return ServiceType._254; + if ("255".equals(codeString)) + return ServiceType._255; + if ("256".equals(codeString)) + return ServiceType._256; + if ("257".equals(codeString)) + return ServiceType._257; + if ("258".equals(codeString)) + return ServiceType._258; + if ("259".equals(codeString)) + return ServiceType._259; + if ("260".equals(codeString)) + return ServiceType._260; + if ("261".equals(codeString)) + return ServiceType._261; + if ("262".equals(codeString)) + return ServiceType._262; + if ("263".equals(codeString)) + return ServiceType._263; + if ("264".equals(codeString)) + return ServiceType._264; + if ("265".equals(codeString)) + return ServiceType._265; + if ("266".equals(codeString)) + return ServiceType._266; + if ("267".equals(codeString)) + return ServiceType._267; + if ("268".equals(codeString)) + return ServiceType._268; + if ("269".equals(codeString)) + return ServiceType._269; + if ("270".equals(codeString)) + return ServiceType._270; + if ("271".equals(codeString)) + return ServiceType._271; + if ("272".equals(codeString)) + return ServiceType._272; + if ("273".equals(codeString)) + return ServiceType._273; + if ("274".equals(codeString)) + return ServiceType._274; + if ("275".equals(codeString)) + return ServiceType._275; + if ("276".equals(codeString)) + return ServiceType._276; + if ("277".equals(codeString)) + return ServiceType._277; + if ("278".equals(codeString)) + return ServiceType._278; + if ("279".equals(codeString)) + return ServiceType._279; + if ("280".equals(codeString)) + return ServiceType._280; + if ("281".equals(codeString)) + return ServiceType._281; + if ("282".equals(codeString)) + return ServiceType._282; + if ("283".equals(codeString)) + return ServiceType._283; + if ("284".equals(codeString)) + return ServiceType._284; + if ("285".equals(codeString)) + return ServiceType._285; + if ("286".equals(codeString)) + return ServiceType._286; + if ("287".equals(codeString)) + return ServiceType._287; + if ("288".equals(codeString)) + return ServiceType._288; + if ("289".equals(codeString)) + return ServiceType._289; + if ("290".equals(codeString)) + return ServiceType._290; + if ("291".equals(codeString)) + return ServiceType._291; + if ("292".equals(codeString)) + return ServiceType._292; + if ("293".equals(codeString)) + return ServiceType._293; + if ("294".equals(codeString)) + return ServiceType._294; + if ("295".equals(codeString)) + return ServiceType._295; + if ("296".equals(codeString)) + return ServiceType._296; + if ("297".equals(codeString)) + return ServiceType._297; + if ("298".equals(codeString)) + return ServiceType._298; + if ("299".equals(codeString)) + return ServiceType._299; + if ("300".equals(codeString)) + return ServiceType._300; + if ("301".equals(codeString)) + return ServiceType._301; + if ("302".equals(codeString)) + return ServiceType._302; + if ("303".equals(codeString)) + return ServiceType._303; + if ("304".equals(codeString)) + return ServiceType._304; + if ("305".equals(codeString)) + return ServiceType._305; + if ("306".equals(codeString)) + return ServiceType._306; + if ("307".equals(codeString)) + return ServiceType._307; + if ("308".equals(codeString)) + return ServiceType._308; + if ("309".equals(codeString)) + return ServiceType._309; + if ("310".equals(codeString)) + return ServiceType._310; + if ("311".equals(codeString)) + return ServiceType._311; + if ("312".equals(codeString)) + return ServiceType._312; + if ("313".equals(codeString)) + return ServiceType._313; + if ("314".equals(codeString)) + return ServiceType._314; + if ("315".equals(codeString)) + return ServiceType._315; + if ("316".equals(codeString)) + return ServiceType._316; + if ("317".equals(codeString)) + return ServiceType._317; + if ("318".equals(codeString)) + return ServiceType._318; + if ("319".equals(codeString)) + return ServiceType._319; + if ("320".equals(codeString)) + return ServiceType._320; + if ("321".equals(codeString)) + return ServiceType._321; + if ("322".equals(codeString)) + return ServiceType._322; + if ("323".equals(codeString)) + return ServiceType._323; + if ("324".equals(codeString)) + return ServiceType._324; + if ("325".equals(codeString)) + return ServiceType._325; + if ("326".equals(codeString)) + return ServiceType._326; + if ("327".equals(codeString)) + return ServiceType._327; + if ("328".equals(codeString)) + return ServiceType._328; + if ("330".equals(codeString)) + return ServiceType._330; + if ("331".equals(codeString)) + return ServiceType._331; + if ("332".equals(codeString)) + return ServiceType._332; + if ("333".equals(codeString)) + return ServiceType._333; + if ("334".equals(codeString)) + return ServiceType._334; + if ("335".equals(codeString)) + return ServiceType._335; + if ("336".equals(codeString)) + return ServiceType._336; + if ("337".equals(codeString)) + return ServiceType._337; + if ("338".equals(codeString)) + return ServiceType._338; + if ("339".equals(codeString)) + return ServiceType._339; + if ("340".equals(codeString)) + return ServiceType._340; + if ("341".equals(codeString)) + return ServiceType._341; + if ("342".equals(codeString)) + return ServiceType._342; + if ("343".equals(codeString)) + return ServiceType._343; + if ("344".equals(codeString)) + return ServiceType._344; + if ("345".equals(codeString)) + return ServiceType._345; + if ("346".equals(codeString)) + return ServiceType._346; + if ("347".equals(codeString)) + return ServiceType._347; + if ("348".equals(codeString)) + return ServiceType._348; + if ("349".equals(codeString)) + return ServiceType._349; + if ("350".equals(codeString)) + return ServiceType._350; + if ("351".equals(codeString)) + return ServiceType._351; + if ("352".equals(codeString)) + return ServiceType._352; + if ("353".equals(codeString)) + return ServiceType._353; + if ("354".equals(codeString)) + return ServiceType._354; + if ("355".equals(codeString)) + return ServiceType._355; + if ("356".equals(codeString)) + return ServiceType._356; + if ("357".equals(codeString)) + return ServiceType._357; + if ("358".equals(codeString)) + return ServiceType._358; + if ("359".equals(codeString)) + return ServiceType._359; + if ("360".equals(codeString)) + return ServiceType._360; + if ("361".equals(codeString)) + return ServiceType._361; + if ("362".equals(codeString)) + return ServiceType._362; + if ("364".equals(codeString)) + return ServiceType._364; + if ("365".equals(codeString)) + return ServiceType._365; + if ("366".equals(codeString)) + return ServiceType._366; + if ("367".equals(codeString)) + return ServiceType._367; + if ("368".equals(codeString)) + return ServiceType._368; + if ("369".equals(codeString)) + return ServiceType._369; + if ("370".equals(codeString)) + return ServiceType._370; + if ("371".equals(codeString)) + return ServiceType._371; + if ("372".equals(codeString)) + return ServiceType._372; + if ("373".equals(codeString)) + return ServiceType._373; + if ("374".equals(codeString)) + return ServiceType._374; + if ("375".equals(codeString)) + return ServiceType._375; + if ("376".equals(codeString)) + return ServiceType._376; + if ("377".equals(codeString)) + return ServiceType._377; + if ("378".equals(codeString)) + return ServiceType._378; + if ("379".equals(codeString)) + return ServiceType._379; + if ("380".equals(codeString)) + return ServiceType._380; + if ("381".equals(codeString)) + return ServiceType._381; + if ("382".equals(codeString)) + return ServiceType._382; + if ("383".equals(codeString)) + return ServiceType._383; + if ("384".equals(codeString)) + return ServiceType._384; + if ("385".equals(codeString)) + return ServiceType._385; + if ("386".equals(codeString)) + return ServiceType._386; + if ("387".equals(codeString)) + return ServiceType._387; + if ("388".equals(codeString)) + return ServiceType._388; + if ("389".equals(codeString)) + return ServiceType._389; + if ("390".equals(codeString)) + return ServiceType._390; + if ("391".equals(codeString)) + return ServiceType._391; + if ("392".equals(codeString)) + return ServiceType._392; + if ("393".equals(codeString)) + return ServiceType._393; + if ("394".equals(codeString)) + return ServiceType._394; + if ("395".equals(codeString)) + return ServiceType._395; + if ("396".equals(codeString)) + return ServiceType._396; + if ("397".equals(codeString)) + return ServiceType._397; + if ("398".equals(codeString)) + return ServiceType._398; + if ("399".equals(codeString)) + return ServiceType._399; + if ("400".equals(codeString)) + return ServiceType._400; + if ("401".equals(codeString)) + return ServiceType._401; + if ("402".equals(codeString)) + return ServiceType._402; + if ("403".equals(codeString)) + return ServiceType._403; + if ("404".equals(codeString)) + return ServiceType._404; + if ("405".equals(codeString)) + return ServiceType._405; + if ("406".equals(codeString)) + return ServiceType._406; + if ("407".equals(codeString)) + return ServiceType._407; + if ("408".equals(codeString)) + return ServiceType._408; + if ("409".equals(codeString)) + return ServiceType._409; + if ("410".equals(codeString)) + return ServiceType._410; + if ("411".equals(codeString)) + return ServiceType._411; + if ("412".equals(codeString)) + return ServiceType._412; + if ("413".equals(codeString)) + return ServiceType._413; + if ("414".equals(codeString)) + return ServiceType._414; + if ("415".equals(codeString)) + return ServiceType._415; + if ("416".equals(codeString)) + return ServiceType._416; + if ("417".equals(codeString)) + return ServiceType._417; + if ("418".equals(codeString)) + return ServiceType._418; + if ("419".equals(codeString)) + return ServiceType._419; + if ("420".equals(codeString)) + return ServiceType._420; + if ("421".equals(codeString)) + return ServiceType._421; + if ("422".equals(codeString)) + return ServiceType._422; + if ("423".equals(codeString)) + return ServiceType._423; + if ("424".equals(codeString)) + return ServiceType._424; + if ("425".equals(codeString)) + return ServiceType._425; + if ("426".equals(codeString)) + return ServiceType._426; + if ("427".equals(codeString)) + return ServiceType._427; + if ("428".equals(codeString)) + return ServiceType._428; + if ("429".equals(codeString)) + return ServiceType._429; + if ("430".equals(codeString)) + return ServiceType._430; + if ("431".equals(codeString)) + return ServiceType._431; + if ("432".equals(codeString)) + return ServiceType._432; + if ("433".equals(codeString)) + return ServiceType._433; + if ("434".equals(codeString)) + return ServiceType._434; + if ("435".equals(codeString)) + return ServiceType._435; + if ("436".equals(codeString)) + return ServiceType._436; + if ("437".equals(codeString)) + return ServiceType._437; + if ("438".equals(codeString)) + return ServiceType._438; + if ("439".equals(codeString)) + return ServiceType._439; + if ("440".equals(codeString)) + return ServiceType._440; + if ("441".equals(codeString)) + return ServiceType._441; + if ("442".equals(codeString)) + return ServiceType._442; + if ("443".equals(codeString)) + return ServiceType._443; + if ("444".equals(codeString)) + return ServiceType._444; + if ("445".equals(codeString)) + return ServiceType._445; + if ("446".equals(codeString)) + return ServiceType._446; + if ("447".equals(codeString)) + return ServiceType._447; + if ("448".equals(codeString)) + return ServiceType._448; + if ("449".equals(codeString)) + return ServiceType._449; + if ("450".equals(codeString)) + return ServiceType._450; + if ("451".equals(codeString)) + return ServiceType._451; + if ("452".equals(codeString)) + return ServiceType._452; + if ("453".equals(codeString)) + return ServiceType._453; + if ("454".equals(codeString)) + return ServiceType._454; + if ("455".equals(codeString)) + return ServiceType._455; + if ("456".equals(codeString)) + return ServiceType._456; + if ("457".equals(codeString)) + return ServiceType._457; + if ("458".equals(codeString)) + return ServiceType._458; + if ("459".equals(codeString)) + return ServiceType._459; + if ("460".equals(codeString)) + return ServiceType._460; + if ("461".equals(codeString)) + return ServiceType._461; + if ("462".equals(codeString)) + return ServiceType._462; + if ("463".equals(codeString)) + return ServiceType._463; + if ("464".equals(codeString)) + return ServiceType._464; + if ("465".equals(codeString)) + return ServiceType._465; + if ("466".equals(codeString)) + return ServiceType._466; + if ("467".equals(codeString)) + return ServiceType._467; + if ("468".equals(codeString)) + return ServiceType._468; + if ("469".equals(codeString)) + return ServiceType._469; + if ("470".equals(codeString)) + return ServiceType._470; + if ("471".equals(codeString)) + return ServiceType._471; + if ("472".equals(codeString)) + return ServiceType._472; + if ("473".equals(codeString)) + return ServiceType._473; + if ("474".equals(codeString)) + return ServiceType._474; + if ("475".equals(codeString)) + return ServiceType._475; + if ("476".equals(codeString)) + return ServiceType._476; + if ("477".equals(codeString)) + return ServiceType._477; + if ("478".equals(codeString)) + return ServiceType._478; + if ("479".equals(codeString)) + return ServiceType._479; + if ("480".equals(codeString)) + return ServiceType._480; + if ("481".equals(codeString)) + return ServiceType._481; + if ("482".equals(codeString)) + return ServiceType._482; + if ("483".equals(codeString)) + return ServiceType._483; + if ("484".equals(codeString)) + return ServiceType._484; + if ("485".equals(codeString)) + return ServiceType._485; + if ("486".equals(codeString)) + return ServiceType._486; + if ("488".equals(codeString)) + return ServiceType._488; + if ("489".equals(codeString)) + return ServiceType._489; + if ("490".equals(codeString)) + return ServiceType._490; + if ("491".equals(codeString)) + return ServiceType._491; + if ("492".equals(codeString)) + return ServiceType._492; + if ("493".equals(codeString)) + return ServiceType._493; + if ("494".equals(codeString)) + return ServiceType._494; + if ("495".equals(codeString)) + return ServiceType._495; + if ("496".equals(codeString)) + return ServiceType._496; + if ("497".equals(codeString)) + return ServiceType._497; + if ("498".equals(codeString)) + return ServiceType._498; + if ("500".equals(codeString)) + return ServiceType._500; + if ("501".equals(codeString)) + return ServiceType._501; + if ("502".equals(codeString)) + return ServiceType._502; + if ("503".equals(codeString)) + return ServiceType._503; + if ("504".equals(codeString)) + return ServiceType._504; + if ("505".equals(codeString)) + return ServiceType._505; + if ("506".equals(codeString)) + return ServiceType._506; + if ("507".equals(codeString)) + return ServiceType._507; + if ("508".equals(codeString)) + return ServiceType._508; + if ("509".equals(codeString)) + return ServiceType._509; + if ("510".equals(codeString)) + return ServiceType._510; + if ("513".equals(codeString)) + return ServiceType._513; + if ("514".equals(codeString)) + return ServiceType._514; + if ("530".equals(codeString)) + return ServiceType._530; + if ("531".equals(codeString)) + return ServiceType._531; + if ("532".equals(codeString)) + return ServiceType._532; + if ("533".equals(codeString)) + return ServiceType._533; + if ("534".equals(codeString)) + return ServiceType._534; + if ("535".equals(codeString)) + return ServiceType._535; + if ("536".equals(codeString)) + return ServiceType._536; + if ("537".equals(codeString)) + return ServiceType._537; + if ("538".equals(codeString)) + return ServiceType._538; + if ("539".equals(codeString)) + return ServiceType._539; + if ("540".equals(codeString)) + return ServiceType._540; + if ("541".equals(codeString)) + return ServiceType._541; + if ("542".equals(codeString)) + return ServiceType._542; + if ("543".equals(codeString)) + return ServiceType._543; + if ("544".equals(codeString)) + return ServiceType._544; + if ("545".equals(codeString)) + return ServiceType._545; + if ("546".equals(codeString)) + return ServiceType._546; + if ("547".equals(codeString)) + return ServiceType._547; + if ("548".equals(codeString)) + return ServiceType._548; + if ("550".equals(codeString)) + return ServiceType._550; + if ("551".equals(codeString)) + return ServiceType._551; + if ("552".equals(codeString)) + return ServiceType._552; + if ("553".equals(codeString)) + return ServiceType._553; + if ("554".equals(codeString)) + return ServiceType._554; + if ("555".equals(codeString)) + return ServiceType._555; + if ("556".equals(codeString)) + return ServiceType._556; + if ("557".equals(codeString)) + return ServiceType._557; + if ("558".equals(codeString)) + return ServiceType._558; + if ("559".equals(codeString)) + return ServiceType._559; + if ("560".equals(codeString)) + return ServiceType._560; + if ("561".equals(codeString)) + return ServiceType._561; + if ("562".equals(codeString)) + return ServiceType._562; + if ("563".equals(codeString)) + return ServiceType._563; + if ("564".equals(codeString)) + return ServiceType._564; + if ("565".equals(codeString)) + return ServiceType._565; + if ("566".equals(codeString)) + return ServiceType._566; + if ("567".equals(codeString)) + return ServiceType._567; + if ("568".equals(codeString)) + return ServiceType._568; + if ("569".equals(codeString)) + return ServiceType._569; + if ("570".equals(codeString)) + return ServiceType._570; + if ("571".equals(codeString)) + return ServiceType._571; + if ("572".equals(codeString)) + return ServiceType._572; + if ("573".equals(codeString)) + return ServiceType._573; + if ("574".equals(codeString)) + return ServiceType._574; + if ("575".equals(codeString)) + return ServiceType._575; + if ("576".equals(codeString)) + return ServiceType._576; + if ("577".equals(codeString)) + return ServiceType._577; + if ("580".equals(codeString)) + return ServiceType._580; + if ("581".equals(codeString)) + return ServiceType._581; + if ("582".equals(codeString)) + return ServiceType._582; + if ("583".equals(codeString)) + return ServiceType._583; + if ("584".equals(codeString)) + return ServiceType._584; + if ("585".equals(codeString)) + return ServiceType._585; + if ("589".equals(codeString)) + return ServiceType._589; + if ("590".equals(codeString)) + return ServiceType._590; + if ("591".equals(codeString)) + return ServiceType._591; + if ("593".equals(codeString)) + return ServiceType._593; + if ("599".equals(codeString)) + return ServiceType._599; + if ("600".equals(codeString)) + return ServiceType._600; + if ("601".equals(codeString)) + return ServiceType._601; + if ("602".equals(codeString)) + return ServiceType._602; + if ("603".equals(codeString)) + return ServiceType._603; + if ("604".equals(codeString)) + return ServiceType._604; + if ("605".equals(codeString)) + return ServiceType._605; + if ("606".equals(codeString)) + return ServiceType._606; + if ("607".equals(codeString)) + return ServiceType._607; + if ("608".equals(codeString)) + return ServiceType._608; + if ("609".equals(codeString)) + return ServiceType._609; + if ("610".equals(codeString)) + return ServiceType._610; + if ("611".equals(codeString)) + return ServiceType._611; + if ("612".equals(codeString)) + return ServiceType._612; + if ("613".equals(codeString)) + return ServiceType._613; + if ("614".equals(codeString)) + return ServiceType._614; + if ("615".equals(codeString)) + return ServiceType._615; + if ("616".equals(codeString)) + return ServiceType._616; + if ("617".equals(codeString)) + return ServiceType._617; + if ("618".equals(codeString)) + return ServiceType._618; + if ("619".equals(codeString)) + return ServiceType._619; + if ("620".equals(codeString)) + return ServiceType._620; + if ("621".equals(codeString)) + return ServiceType._621; + if ("622".equals(codeString)) + return ServiceType._622; + if ("623".equals(codeString)) + return ServiceType._623; + if ("624".equals(codeString)) + return ServiceType._624; + if ("625".equals(codeString)) + return ServiceType._625; + if ("626".equals(codeString)) + return ServiceType._626; + if ("627".equals(codeString)) + return ServiceType._627; + if ("628".equals(codeString)) + return ServiceType._628; + if ("629".equals(codeString)) + return ServiceType._629; + throw new IllegalArgumentException("Unknown ServiceType code '"+codeString+"'"); + } + + public String toCode(ServiceType code) { + if (code == ServiceType._1) + return "1"; + if (code == ServiceType._2) + return "2"; + if (code == ServiceType._3) + return "3"; + if (code == ServiceType._4) + return "4"; + if (code == ServiceType._5) + return "5"; + if (code == ServiceType._6) + return "6"; + if (code == ServiceType._7) + return "7"; + if (code == ServiceType._8) + return "8"; + if (code == ServiceType._9) + return "9"; + if (code == ServiceType._10) + return "10"; + if (code == ServiceType._11) + return "11"; + if (code == ServiceType._12) + return "12"; + if (code == ServiceType._13) + return "13"; + if (code == ServiceType._14) + return "14"; + if (code == ServiceType._15) + return "15"; + if (code == ServiceType._16) + return "16"; + if (code == ServiceType._17) + return "17"; + if (code == ServiceType._18) + return "18"; + if (code == ServiceType._19) + return "19"; + if (code == ServiceType._20) + return "20"; + if (code == ServiceType._21) + return "21"; + if (code == ServiceType._22) + return "22"; + if (code == ServiceType._23) + return "23"; + if (code == ServiceType._24) + return "24"; + if (code == ServiceType._25) + return "25"; + if (code == ServiceType._26) + return "26"; + if (code == ServiceType._27) + return "27"; + if (code == ServiceType._28) + return "28"; + if (code == ServiceType._29) + return "29"; + if (code == ServiceType._30) + return "30"; + if (code == ServiceType._31) + return "31"; + if (code == ServiceType._32) + return "32"; + if (code == ServiceType._33) + return "33"; + if (code == ServiceType._34) + return "34"; + if (code == ServiceType._35) + return "35"; + if (code == ServiceType._36) + return "36"; + if (code == ServiceType._37) + return "37"; + if (code == ServiceType._38) + return "38"; + if (code == ServiceType._39) + return "39"; + if (code == ServiceType._40) + return "40"; + if (code == ServiceType._41) + return "41"; + if (code == ServiceType._42) + return "42"; + if (code == ServiceType._43) + return "43"; + if (code == ServiceType._44) + return "44"; + if (code == ServiceType._45) + return "45"; + if (code == ServiceType._46) + return "46"; + if (code == ServiceType._47) + return "47"; + if (code == ServiceType._48) + return "48"; + if (code == ServiceType._49) + return "49"; + if (code == ServiceType._50) + return "50"; + if (code == ServiceType._51) + return "51"; + if (code == ServiceType._52) + return "52"; + if (code == ServiceType._53) + return "53"; + if (code == ServiceType._54) + return "54"; + if (code == ServiceType._55) + return "55"; + if (code == ServiceType._56) + return "56"; + if (code == ServiceType._57) + return "57"; + if (code == ServiceType._58) + return "58"; + if (code == ServiceType._59) + return "59"; + if (code == ServiceType._60) + return "60"; + if (code == ServiceType._61) + return "61"; + if (code == ServiceType._62) + return "62"; + if (code == ServiceType._63) + return "63"; + if (code == ServiceType._64) + return "64"; + if (code == ServiceType._65) + return "65"; + if (code == ServiceType._66) + return "66"; + if (code == ServiceType._67) + return "67"; + if (code == ServiceType._68) + return "68"; + if (code == ServiceType._69) + return "69"; + if (code == ServiceType._70) + return "70"; + if (code == ServiceType._71) + return "71"; + if (code == ServiceType._72) + return "72"; + if (code == ServiceType._73) + return "73"; + if (code == ServiceType._74) + return "74"; + if (code == ServiceType._75) + return "75"; + if (code == ServiceType._76) + return "76"; + if (code == ServiceType._77) + return "77"; + if (code == ServiceType._78) + return "78"; + if (code == ServiceType._79) + return "79"; + if (code == ServiceType._80) + return "80"; + if (code == ServiceType._81) + return "81"; + if (code == ServiceType._82) + return "82"; + if (code == ServiceType._83) + return "83"; + if (code == ServiceType._84) + return "84"; + if (code == ServiceType._85) + return "85"; + if (code == ServiceType._86) + return "86"; + if (code == ServiceType._87) + return "87"; + if (code == ServiceType._88) + return "88"; + if (code == ServiceType._89) + return "89"; + if (code == ServiceType._90) + return "90"; + if (code == ServiceType._91) + return "91"; + if (code == ServiceType._92) + return "92"; + if (code == ServiceType._93) + return "93"; + if (code == ServiceType._94) + return "94"; + if (code == ServiceType._95) + return "95"; + if (code == ServiceType._96) + return "96"; + if (code == ServiceType._97) + return "97"; + if (code == ServiceType._98) + return "98"; + if (code == ServiceType._99) + return "99"; + if (code == ServiceType._100) + return "100"; + if (code == ServiceType._101) + return "101"; + if (code == ServiceType._102) + return "102"; + if (code == ServiceType._103) + return "103"; + if (code == ServiceType._104) + return "104"; + if (code == ServiceType._105) + return "105"; + if (code == ServiceType._106) + return "106"; + if (code == ServiceType._107) + return "107"; + if (code == ServiceType._108) + return "108"; + if (code == ServiceType._109) + return "109"; + if (code == ServiceType._110) + return "110"; + if (code == ServiceType._111) + return "111"; + if (code == ServiceType._112) + return "112"; + if (code == ServiceType._113) + return "113"; + if (code == ServiceType._114) + return "114"; + if (code == ServiceType._115) + return "115"; + if (code == ServiceType._116) + return "116"; + if (code == ServiceType._117) + return "117"; + if (code == ServiceType._118) + return "118"; + if (code == ServiceType._119) + return "119"; + if (code == ServiceType._120) + return "120"; + if (code == ServiceType._121) + return "121"; + if (code == ServiceType._122) + return "122"; + if (code == ServiceType._123) + return "123"; + if (code == ServiceType._124) + return "124"; + if (code == ServiceType._125) + return "125"; + if (code == ServiceType._126) + return "126"; + if (code == ServiceType._127) + return "127"; + if (code == ServiceType._128) + return "128"; + if (code == ServiceType._129) + return "129"; + if (code == ServiceType._130) + return "130"; + if (code == ServiceType._131) + return "131"; + if (code == ServiceType._132) + return "132"; + if (code == ServiceType._133) + return "133"; + if (code == ServiceType._134) + return "134"; + if (code == ServiceType._135) + return "135"; + if (code == ServiceType._136) + return "136"; + if (code == ServiceType._137) + return "137"; + if (code == ServiceType._138) + return "138"; + if (code == ServiceType._139) + return "139"; + if (code == ServiceType._140) + return "140"; + if (code == ServiceType._141) + return "141"; + if (code == ServiceType._142) + return "142"; + if (code == ServiceType._143) + return "143"; + if (code == ServiceType._144) + return "144"; + if (code == ServiceType._145) + return "145"; + if (code == ServiceType._146) + return "146"; + if (code == ServiceType._147) + return "147"; + if (code == ServiceType._148) + return "148"; + if (code == ServiceType._149) + return "149"; + if (code == ServiceType._150) + return "150"; + if (code == ServiceType._151) + return "151"; + if (code == ServiceType._152) + return "152"; + if (code == ServiceType._153) + return "153"; + if (code == ServiceType._154) + return "154"; + if (code == ServiceType._155) + return "155"; + if (code == ServiceType._156) + return "156"; + if (code == ServiceType._157) + return "157"; + if (code == ServiceType._158) + return "158"; + if (code == ServiceType._159) + return "159"; + if (code == ServiceType._160) + return "160"; + if (code == ServiceType._161) + return "161"; + if (code == ServiceType._162) + return "162"; + if (code == ServiceType._163) + return "163"; + if (code == ServiceType._164) + return "164"; + if (code == ServiceType._165) + return "165"; + if (code == ServiceType._166) + return "166"; + if (code == ServiceType._167) + return "167"; + if (code == ServiceType._168) + return "168"; + if (code == ServiceType._169) + return "169"; + if (code == ServiceType._170) + return "170"; + if (code == ServiceType._171) + return "171"; + if (code == ServiceType._172) + return "172"; + if (code == ServiceType._173) + return "173"; + if (code == ServiceType._174) + return "174"; + if (code == ServiceType._175) + return "175"; + if (code == ServiceType._176) + return "176"; + if (code == ServiceType._177) + return "177"; + if (code == ServiceType._178) + return "178"; + if (code == ServiceType._179) + return "179"; + if (code == ServiceType._180) + return "180"; + if (code == ServiceType._181) + return "181"; + if (code == ServiceType._182) + return "182"; + if (code == ServiceType._183) + return "183"; + if (code == ServiceType._184) + return "184"; + if (code == ServiceType._185) + return "185"; + if (code == ServiceType._186) + return "186"; + if (code == ServiceType._187) + return "187"; + if (code == ServiceType._188) + return "188"; + if (code == ServiceType._189) + return "189"; + if (code == ServiceType._190) + return "190"; + if (code == ServiceType._191) + return "191"; + if (code == ServiceType._192) + return "192"; + if (code == ServiceType._193) + return "193"; + if (code == ServiceType._194) + return "194"; + if (code == ServiceType._195) + return "195"; + if (code == ServiceType._196) + return "196"; + if (code == ServiceType._197) + return "197"; + if (code == ServiceType._198) + return "198"; + if (code == ServiceType._199) + return "199"; + if (code == ServiceType._200) + return "200"; + if (code == ServiceType._201) + return "201"; + if (code == ServiceType._202) + return "202"; + if (code == ServiceType._203) + return "203"; + if (code == ServiceType._204) + return "204"; + if (code == ServiceType._205) + return "205"; + if (code == ServiceType._206) + return "206"; + if (code == ServiceType._207) + return "207"; + if (code == ServiceType._208) + return "208"; + if (code == ServiceType._209) + return "209"; + if (code == ServiceType._210) + return "210"; + if (code == ServiceType._211) + return "211"; + if (code == ServiceType._212) + return "212"; + if (code == ServiceType._213) + return "213"; + if (code == ServiceType._214) + return "214"; + if (code == ServiceType._215) + return "215"; + if (code == ServiceType._216) + return "216"; + if (code == ServiceType._217) + return "217"; + if (code == ServiceType._218) + return "218"; + if (code == ServiceType._219) + return "219"; + if (code == ServiceType._220) + return "220"; + if (code == ServiceType._221) + return "221"; + if (code == ServiceType._222) + return "222"; + if (code == ServiceType._223) + return "223"; + if (code == ServiceType._224) + return "224"; + if (code == ServiceType._225) + return "225"; + if (code == ServiceType._226) + return "226"; + if (code == ServiceType._227) + return "227"; + if (code == ServiceType._228) + return "228"; + if (code == ServiceType._229) + return "229"; + if (code == ServiceType._230) + return "230"; + if (code == ServiceType._231) + return "231"; + if (code == ServiceType._232) + return "232"; + if (code == ServiceType._233) + return "233"; + if (code == ServiceType._234) + return "234"; + if (code == ServiceType._235) + return "235"; + if (code == ServiceType._236) + return "236"; + if (code == ServiceType._237) + return "237"; + if (code == ServiceType._238) + return "238"; + if (code == ServiceType._239) + return "239"; + if (code == ServiceType._240) + return "240"; + if (code == ServiceType._241) + return "241"; + if (code == ServiceType._242) + return "242"; + if (code == ServiceType._243) + return "243"; + if (code == ServiceType._244) + return "244"; + if (code == ServiceType._245) + return "245"; + if (code == ServiceType._246) + return "246"; + if (code == ServiceType._247) + return "247"; + if (code == ServiceType._248) + return "248"; + if (code == ServiceType._249) + return "249"; + if (code == ServiceType._250) + return "250"; + if (code == ServiceType._251) + return "251"; + if (code == ServiceType._252) + return "252"; + if (code == ServiceType._253) + return "253"; + if (code == ServiceType._254) + return "254"; + if (code == ServiceType._255) + return "255"; + if (code == ServiceType._256) + return "256"; + if (code == ServiceType._257) + return "257"; + if (code == ServiceType._258) + return "258"; + if (code == ServiceType._259) + return "259"; + if (code == ServiceType._260) + return "260"; + if (code == ServiceType._261) + return "261"; + if (code == ServiceType._262) + return "262"; + if (code == ServiceType._263) + return "263"; + if (code == ServiceType._264) + return "264"; + if (code == ServiceType._265) + return "265"; + if (code == ServiceType._266) + return "266"; + if (code == ServiceType._267) + return "267"; + if (code == ServiceType._268) + return "268"; + if (code == ServiceType._269) + return "269"; + if (code == ServiceType._270) + return "270"; + if (code == ServiceType._271) + return "271"; + if (code == ServiceType._272) + return "272"; + if (code == ServiceType._273) + return "273"; + if (code == ServiceType._274) + return "274"; + if (code == ServiceType._275) + return "275"; + if (code == ServiceType._276) + return "276"; + if (code == ServiceType._277) + return "277"; + if (code == ServiceType._278) + return "278"; + if (code == ServiceType._279) + return "279"; + if (code == ServiceType._280) + return "280"; + if (code == ServiceType._281) + return "281"; + if (code == ServiceType._282) + return "282"; + if (code == ServiceType._283) + return "283"; + if (code == ServiceType._284) + return "284"; + if (code == ServiceType._285) + return "285"; + if (code == ServiceType._286) + return "286"; + if (code == ServiceType._287) + return "287"; + if (code == ServiceType._288) + return "288"; + if (code == ServiceType._289) + return "289"; + if (code == ServiceType._290) + return "290"; + if (code == ServiceType._291) + return "291"; + if (code == ServiceType._292) + return "292"; + if (code == ServiceType._293) + return "293"; + if (code == ServiceType._294) + return "294"; + if (code == ServiceType._295) + return "295"; + if (code == ServiceType._296) + return "296"; + if (code == ServiceType._297) + return "297"; + if (code == ServiceType._298) + return "298"; + if (code == ServiceType._299) + return "299"; + if (code == ServiceType._300) + return "300"; + if (code == ServiceType._301) + return "301"; + if (code == ServiceType._302) + return "302"; + if (code == ServiceType._303) + return "303"; + if (code == ServiceType._304) + return "304"; + if (code == ServiceType._305) + return "305"; + if (code == ServiceType._306) + return "306"; + if (code == ServiceType._307) + return "307"; + if (code == ServiceType._308) + return "308"; + if (code == ServiceType._309) + return "309"; + if (code == ServiceType._310) + return "310"; + if (code == ServiceType._311) + return "311"; + if (code == ServiceType._312) + return "312"; + if (code == ServiceType._313) + return "313"; + if (code == ServiceType._314) + return "314"; + if (code == ServiceType._315) + return "315"; + if (code == ServiceType._316) + return "316"; + if (code == ServiceType._317) + return "317"; + if (code == ServiceType._318) + return "318"; + if (code == ServiceType._319) + return "319"; + if (code == ServiceType._320) + return "320"; + if (code == ServiceType._321) + return "321"; + if (code == ServiceType._322) + return "322"; + if (code == ServiceType._323) + return "323"; + if (code == ServiceType._324) + return "324"; + if (code == ServiceType._325) + return "325"; + if (code == ServiceType._326) + return "326"; + if (code == ServiceType._327) + return "327"; + if (code == ServiceType._328) + return "328"; + if (code == ServiceType._330) + return "330"; + if (code == ServiceType._331) + return "331"; + if (code == ServiceType._332) + return "332"; + if (code == ServiceType._333) + return "333"; + if (code == ServiceType._334) + return "334"; + if (code == ServiceType._335) + return "335"; + if (code == ServiceType._336) + return "336"; + if (code == ServiceType._337) + return "337"; + if (code == ServiceType._338) + return "338"; + if (code == ServiceType._339) + return "339"; + if (code == ServiceType._340) + return "340"; + if (code == ServiceType._341) + return "341"; + if (code == ServiceType._342) + return "342"; + if (code == ServiceType._343) + return "343"; + if (code == ServiceType._344) + return "344"; + if (code == ServiceType._345) + return "345"; + if (code == ServiceType._346) + return "346"; + if (code == ServiceType._347) + return "347"; + if (code == ServiceType._348) + return "348"; + if (code == ServiceType._349) + return "349"; + if (code == ServiceType._350) + return "350"; + if (code == ServiceType._351) + return "351"; + if (code == ServiceType._352) + return "352"; + if (code == ServiceType._353) + return "353"; + if (code == ServiceType._354) + return "354"; + if (code == ServiceType._355) + return "355"; + if (code == ServiceType._356) + return "356"; + if (code == ServiceType._357) + return "357"; + if (code == ServiceType._358) + return "358"; + if (code == ServiceType._359) + return "359"; + if (code == ServiceType._360) + return "360"; + if (code == ServiceType._361) + return "361"; + if (code == ServiceType._362) + return "362"; + if (code == ServiceType._364) + return "364"; + if (code == ServiceType._365) + return "365"; + if (code == ServiceType._366) + return "366"; + if (code == ServiceType._367) + return "367"; + if (code == ServiceType._368) + return "368"; + if (code == ServiceType._369) + return "369"; + if (code == ServiceType._370) + return "370"; + if (code == ServiceType._371) + return "371"; + if (code == ServiceType._372) + return "372"; + if (code == ServiceType._373) + return "373"; + if (code == ServiceType._374) + return "374"; + if (code == ServiceType._375) + return "375"; + if (code == ServiceType._376) + return "376"; + if (code == ServiceType._377) + return "377"; + if (code == ServiceType._378) + return "378"; + if (code == ServiceType._379) + return "379"; + if (code == ServiceType._380) + return "380"; + if (code == ServiceType._381) + return "381"; + if (code == ServiceType._382) + return "382"; + if (code == ServiceType._383) + return "383"; + if (code == ServiceType._384) + return "384"; + if (code == ServiceType._385) + return "385"; + if (code == ServiceType._386) + return "386"; + if (code == ServiceType._387) + return "387"; + if (code == ServiceType._388) + return "388"; + if (code == ServiceType._389) + return "389"; + if (code == ServiceType._390) + return "390"; + if (code == ServiceType._391) + return "391"; + if (code == ServiceType._392) + return "392"; + if (code == ServiceType._393) + return "393"; + if (code == ServiceType._394) + return "394"; + if (code == ServiceType._395) + return "395"; + if (code == ServiceType._396) + return "396"; + if (code == ServiceType._397) + return "397"; + if (code == ServiceType._398) + return "398"; + if (code == ServiceType._399) + return "399"; + if (code == ServiceType._400) + return "400"; + if (code == ServiceType._401) + return "401"; + if (code == ServiceType._402) + return "402"; + if (code == ServiceType._403) + return "403"; + if (code == ServiceType._404) + return "404"; + if (code == ServiceType._405) + return "405"; + if (code == ServiceType._406) + return "406"; + if (code == ServiceType._407) + return "407"; + if (code == ServiceType._408) + return "408"; + if (code == ServiceType._409) + return "409"; + if (code == ServiceType._410) + return "410"; + if (code == ServiceType._411) + return "411"; + if (code == ServiceType._412) + return "412"; + if (code == ServiceType._413) + return "413"; + if (code == ServiceType._414) + return "414"; + if (code == ServiceType._415) + return "415"; + if (code == ServiceType._416) + return "416"; + if (code == ServiceType._417) + return "417"; + if (code == ServiceType._418) + return "418"; + if (code == ServiceType._419) + return "419"; + if (code == ServiceType._420) + return "420"; + if (code == ServiceType._421) + return "421"; + if (code == ServiceType._422) + return "422"; + if (code == ServiceType._423) + return "423"; + if (code == ServiceType._424) + return "424"; + if (code == ServiceType._425) + return "425"; + if (code == ServiceType._426) + return "426"; + if (code == ServiceType._427) + return "427"; + if (code == ServiceType._428) + return "428"; + if (code == ServiceType._429) + return "429"; + if (code == ServiceType._430) + return "430"; + if (code == ServiceType._431) + return "431"; + if (code == ServiceType._432) + return "432"; + if (code == ServiceType._433) + return "433"; + if (code == ServiceType._434) + return "434"; + if (code == ServiceType._435) + return "435"; + if (code == ServiceType._436) + return "436"; + if (code == ServiceType._437) + return "437"; + if (code == ServiceType._438) + return "438"; + if (code == ServiceType._439) + return "439"; + if (code == ServiceType._440) + return "440"; + if (code == ServiceType._441) + return "441"; + if (code == ServiceType._442) + return "442"; + if (code == ServiceType._443) + return "443"; + if (code == ServiceType._444) + return "444"; + if (code == ServiceType._445) + return "445"; + if (code == ServiceType._446) + return "446"; + if (code == ServiceType._447) + return "447"; + if (code == ServiceType._448) + return "448"; + if (code == ServiceType._449) + return "449"; + if (code == ServiceType._450) + return "450"; + if (code == ServiceType._451) + return "451"; + if (code == ServiceType._452) + return "452"; + if (code == ServiceType._453) + return "453"; + if (code == ServiceType._454) + return "454"; + if (code == ServiceType._455) + return "455"; + if (code == ServiceType._456) + return "456"; + if (code == ServiceType._457) + return "457"; + if (code == ServiceType._458) + return "458"; + if (code == ServiceType._459) + return "459"; + if (code == ServiceType._460) + return "460"; + if (code == ServiceType._461) + return "461"; + if (code == ServiceType._462) + return "462"; + if (code == ServiceType._463) + return "463"; + if (code == ServiceType._464) + return "464"; + if (code == ServiceType._465) + return "465"; + if (code == ServiceType._466) + return "466"; + if (code == ServiceType._467) + return "467"; + if (code == ServiceType._468) + return "468"; + if (code == ServiceType._469) + return "469"; + if (code == ServiceType._470) + return "470"; + if (code == ServiceType._471) + return "471"; + if (code == ServiceType._472) + return "472"; + if (code == ServiceType._473) + return "473"; + if (code == ServiceType._474) + return "474"; + if (code == ServiceType._475) + return "475"; + if (code == ServiceType._476) + return "476"; + if (code == ServiceType._477) + return "477"; + if (code == ServiceType._478) + return "478"; + if (code == ServiceType._479) + return "479"; + if (code == ServiceType._480) + return "480"; + if (code == ServiceType._481) + return "481"; + if (code == ServiceType._482) + return "482"; + if (code == ServiceType._483) + return "483"; + if (code == ServiceType._484) + return "484"; + if (code == ServiceType._485) + return "485"; + if (code == ServiceType._486) + return "486"; + if (code == ServiceType._488) + return "488"; + if (code == ServiceType._489) + return "489"; + if (code == ServiceType._490) + return "490"; + if (code == ServiceType._491) + return "491"; + if (code == ServiceType._492) + return "492"; + if (code == ServiceType._493) + return "493"; + if (code == ServiceType._494) + return "494"; + if (code == ServiceType._495) + return "495"; + if (code == ServiceType._496) + return "496"; + if (code == ServiceType._497) + return "497"; + if (code == ServiceType._498) + return "498"; + if (code == ServiceType._500) + return "500"; + if (code == ServiceType._501) + return "501"; + if (code == ServiceType._502) + return "502"; + if (code == ServiceType._503) + return "503"; + if (code == ServiceType._504) + return "504"; + if (code == ServiceType._505) + return "505"; + if (code == ServiceType._506) + return "506"; + if (code == ServiceType._507) + return "507"; + if (code == ServiceType._508) + return "508"; + if (code == ServiceType._509) + return "509"; + if (code == ServiceType._510) + return "510"; + if (code == ServiceType._513) + return "513"; + if (code == ServiceType._514) + return "514"; + if (code == ServiceType._530) + return "530"; + if (code == ServiceType._531) + return "531"; + if (code == ServiceType._532) + return "532"; + if (code == ServiceType._533) + return "533"; + if (code == ServiceType._534) + return "534"; + if (code == ServiceType._535) + return "535"; + if (code == ServiceType._536) + return "536"; + if (code == ServiceType._537) + return "537"; + if (code == ServiceType._538) + return "538"; + if (code == ServiceType._539) + return "539"; + if (code == ServiceType._540) + return "540"; + if (code == ServiceType._541) + return "541"; + if (code == ServiceType._542) + return "542"; + if (code == ServiceType._543) + return "543"; + if (code == ServiceType._544) + return "544"; + if (code == ServiceType._545) + return "545"; + if (code == ServiceType._546) + return "546"; + if (code == ServiceType._547) + return "547"; + if (code == ServiceType._548) + return "548"; + if (code == ServiceType._550) + return "550"; + if (code == ServiceType._551) + return "551"; + if (code == ServiceType._552) + return "552"; + if (code == ServiceType._553) + return "553"; + if (code == ServiceType._554) + return "554"; + if (code == ServiceType._555) + return "555"; + if (code == ServiceType._556) + return "556"; + if (code == ServiceType._557) + return "557"; + if (code == ServiceType._558) + return "558"; + if (code == ServiceType._559) + return "559"; + if (code == ServiceType._560) + return "560"; + if (code == ServiceType._561) + return "561"; + if (code == ServiceType._562) + return "562"; + if (code == ServiceType._563) + return "563"; + if (code == ServiceType._564) + return "564"; + if (code == ServiceType._565) + return "565"; + if (code == ServiceType._566) + return "566"; + if (code == ServiceType._567) + return "567"; + if (code == ServiceType._568) + return "568"; + if (code == ServiceType._569) + return "569"; + if (code == ServiceType._570) + return "570"; + if (code == ServiceType._571) + return "571"; + if (code == ServiceType._572) + return "572"; + if (code == ServiceType._573) + return "573"; + if (code == ServiceType._574) + return "574"; + if (code == ServiceType._575) + return "575"; + if (code == ServiceType._576) + return "576"; + if (code == ServiceType._577) + return "577"; + if (code == ServiceType._580) + return "580"; + if (code == ServiceType._581) + return "581"; + if (code == ServiceType._582) + return "582"; + if (code == ServiceType._583) + return "583"; + if (code == ServiceType._584) + return "584"; + if (code == ServiceType._585) + return "585"; + if (code == ServiceType._589) + return "589"; + if (code == ServiceType._590) + return "590"; + if (code == ServiceType._591) + return "591"; + if (code == ServiceType._593) + return "593"; + if (code == ServiceType._599) + return "599"; + if (code == ServiceType._600) + return "600"; + if (code == ServiceType._601) + return "601"; + if (code == ServiceType._602) + return "602"; + if (code == ServiceType._603) + return "603"; + if (code == ServiceType._604) + return "604"; + if (code == ServiceType._605) + return "605"; + if (code == ServiceType._606) + return "606"; + if (code == ServiceType._607) + return "607"; + if (code == ServiceType._608) + return "608"; + if (code == ServiceType._609) + return "609"; + if (code == ServiceType._610) + return "610"; + if (code == ServiceType._611) + return "611"; + if (code == ServiceType._612) + return "612"; + if (code == ServiceType._613) + return "613"; + if (code == ServiceType._614) + return "614"; + if (code == ServiceType._615) + return "615"; + if (code == ServiceType._616) + return "616"; + if (code == ServiceType._617) + return "617"; + if (code == ServiceType._618) + return "618"; + if (code == ServiceType._619) + return "619"; + if (code == ServiceType._620) + return "620"; + if (code == ServiceType._621) + return "621"; + if (code == ServiceType._622) + return "622"; + if (code == ServiceType._623) + return "623"; + if (code == ServiceType._624) + return "624"; + if (code == ServiceType._625) + return "625"; + if (code == ServiceType._626) + return "626"; + if (code == ServiceType._627) + return "627"; + if (code == ServiceType._628) + return "628"; + if (code == ServiceType._629) + return "629"; + return "?"; + } + + public String toSystem(ServiceType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceUscls.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceUscls.java new file mode 100644 index 00000000000..88d1d421ee8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceUscls.java @@ -0,0 +1,249 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum ServiceUscls { + + /** + * Exam, comp, primary + */ + _1101, + /** + * Exam, comp, mixed + */ + _1102, + /** + * Exam, comp, permanent + */ + _1103, + /** + * Exam, recall + */ + _1201, + /** + * Exam, emergency + */ + _1205, + /** + * Radiograph, series (12) + */ + _2101, + /** + * Radiograph, series (16) + */ + _2102, + /** + * Radiograph, bytewing + */ + _2141, + /** + * Radiograph, panoramic + */ + _2601, + /** + * Polishing, 1 unit + */ + _11101, + /** + * Polishing, 2 unit + */ + _11102, + /** + * Polishing, 3 unit + */ + _11103, + /** + * Polishing, 4 unit + */ + _11104, + /** + * Amalgam, 1 surface + */ + _21211, + /** + * Amalgam, 2 surface + */ + _21212, + /** + * Crown, PFM + */ + _27211, + /** + * Maryland Bridge + */ + _67211, + /** + * Lab, commercial + */ + _99111, + /** + * Lab, in office + */ + _99333, + /** + * Expense + */ + _99555, + /** + * added to help the parsers + */ + NULL; + public static ServiceUscls fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1101".equals(codeString)) + return _1101; + if ("1102".equals(codeString)) + return _1102; + if ("1103".equals(codeString)) + return _1103; + if ("1201".equals(codeString)) + return _1201; + if ("1205".equals(codeString)) + return _1205; + if ("2101".equals(codeString)) + return _2101; + if ("2102".equals(codeString)) + return _2102; + if ("2141".equals(codeString)) + return _2141; + if ("2601".equals(codeString)) + return _2601; + if ("11101".equals(codeString)) + return _11101; + if ("11102".equals(codeString)) + return _11102; + if ("11103".equals(codeString)) + return _11103; + if ("11104".equals(codeString)) + return _11104; + if ("21211".equals(codeString)) + return _21211; + if ("21212".equals(codeString)) + return _21212; + if ("27211".equals(codeString)) + return _27211; + if ("67211".equals(codeString)) + return _67211; + if ("99111".equals(codeString)) + return _99111; + if ("99333".equals(codeString)) + return _99333; + if ("99555".equals(codeString)) + return _99555; + throw new FHIRException("Unknown ServiceUscls code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1101: return "1101"; + case _1102: return "1102"; + case _1103: return "1103"; + case _1201: return "1201"; + case _1205: return "1205"; + case _2101: return "2101"; + case _2102: return "2102"; + case _2141: return "2141"; + case _2601: return "2601"; + case _11101: return "11101"; + case _11102: return "11102"; + case _11103: return "11103"; + case _11104: return "11104"; + case _21211: return "21211"; + case _21212: return "21212"; + case _27211: return "27211"; + case _67211: return "67211"; + case _99111: return "99111"; + case _99333: return "99333"; + case _99555: return "99555"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-USCLS"; + } + public String getDefinition() { + switch (this) { + case _1101: return "Exam, comp, primary"; + case _1102: return "Exam, comp, mixed"; + case _1103: return "Exam, comp, permanent"; + case _1201: return "Exam, recall"; + case _1205: return "Exam, emergency"; + case _2101: return "Radiograph, series (12)"; + case _2102: return "Radiograph, series (16)"; + case _2141: return "Radiograph, bytewing"; + case _2601: return "Radiograph, panoramic"; + case _11101: return "Polishing, 1 unit"; + case _11102: return "Polishing, 2 unit"; + case _11103: return "Polishing, 3 unit"; + case _11104: return "Polishing, 4 unit"; + case _21211: return "Amalgam, 1 surface"; + case _21212: return "Amalgam, 2 surface"; + case _27211: return "Crown, PFM"; + case _67211: return "Maryland Bridge"; + case _99111: return "Lab, commercial"; + case _99333: return "Lab, in office"; + case _99555: return "Expense"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1101: return "Exam, comp, primary"; + case _1102: return "Exam, comp, mixed"; + case _1103: return "Exam, comp, permanent"; + case _1201: return "Exam, recall"; + case _1205: return "Exam, emergency"; + case _2101: return "Radiograph, series (12)"; + case _2102: return "Radiograph, series (16)"; + case _2141: return "Radiograph, bytewing"; + case _2601: return "Radiograph, panoramic"; + case _11101: return "Polishing, 1 unit"; + case _11102: return "Polishing, 2 unit"; + case _11103: return "Polishing, 3 unit"; + case _11104: return "Polishing, 4 unit"; + case _21211: return "Amalgam, 1 surface"; + case _21212: return "Amalgam, 2 surface"; + case _27211: return "Crown, PFM"; + case _67211: return "Maryland Bridge"; + case _99111: return "Lab, commercial"; + case _99333: return "Lab, in office"; + case _99555: return "Expense"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceUsclsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceUsclsEnumFactory.java new file mode 100644 index 00000000000..02ad407a500 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ServiceUsclsEnumFactory.java @@ -0,0 +1,134 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ServiceUsclsEnumFactory implements EnumFactory { + + public ServiceUscls fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1101".equals(codeString)) + return ServiceUscls._1101; + if ("1102".equals(codeString)) + return ServiceUscls._1102; + if ("1103".equals(codeString)) + return ServiceUscls._1103; + if ("1201".equals(codeString)) + return ServiceUscls._1201; + if ("1205".equals(codeString)) + return ServiceUscls._1205; + if ("2101".equals(codeString)) + return ServiceUscls._2101; + if ("2102".equals(codeString)) + return ServiceUscls._2102; + if ("2141".equals(codeString)) + return ServiceUscls._2141; + if ("2601".equals(codeString)) + return ServiceUscls._2601; + if ("11101".equals(codeString)) + return ServiceUscls._11101; + if ("11102".equals(codeString)) + return ServiceUscls._11102; + if ("11103".equals(codeString)) + return ServiceUscls._11103; + if ("11104".equals(codeString)) + return ServiceUscls._11104; + if ("21211".equals(codeString)) + return ServiceUscls._21211; + if ("21212".equals(codeString)) + return ServiceUscls._21212; + if ("27211".equals(codeString)) + return ServiceUscls._27211; + if ("67211".equals(codeString)) + return ServiceUscls._67211; + if ("99111".equals(codeString)) + return ServiceUscls._99111; + if ("99333".equals(codeString)) + return ServiceUscls._99333; + if ("99555".equals(codeString)) + return ServiceUscls._99555; + throw new IllegalArgumentException("Unknown ServiceUscls code '"+codeString+"'"); + } + + public String toCode(ServiceUscls code) { + if (code == ServiceUscls._1101) + return "1101"; + if (code == ServiceUscls._1102) + return "1102"; + if (code == ServiceUscls._1103) + return "1103"; + if (code == ServiceUscls._1201) + return "1201"; + if (code == ServiceUscls._1205) + return "1205"; + if (code == ServiceUscls._2101) + return "2101"; + if (code == ServiceUscls._2102) + return "2102"; + if (code == ServiceUscls._2141) + return "2141"; + if (code == ServiceUscls._2601) + return "2601"; + if (code == ServiceUscls._11101) + return "11101"; + if (code == ServiceUscls._11102) + return "11102"; + if (code == ServiceUscls._11103) + return "11103"; + if (code == ServiceUscls._11104) + return "11104"; + if (code == ServiceUscls._21211) + return "21211"; + if (code == ServiceUscls._21212) + return "21212"; + if (code == ServiceUscls._27211) + return "27211"; + if (code == ServiceUscls._67211) + return "67211"; + if (code == ServiceUscls._99111) + return "99111"; + if (code == ServiceUscls._99333) + return "99333"; + if (code == ServiceUscls._99555) + return "99555"; + return "?"; + } + + public String toSystem(ServiceUscls code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SignatureType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SignatureType.java new file mode 100644 index 00000000000..24e89e8f515 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SignatureType.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SignatureType { + + /** + * the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document. + */ + OID_1_2_840_10065_1_12_1_1, + /** + * the signature of a health information document coauthor. There can be multiple coauthors of a health information document. + */ + OID_1_2_840_10065_1_12_1_2, + /** + * the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.) + */ + OID_1_2_840_10065_1_12_1_3, + /** + * the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format. + */ + OID_1_2_840_10065_1_12_1_4, + /** + * a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.) + */ + OID_1_2_840_10065_1_12_1_5, + /** + * a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.) + */ + OID_1_2_840_10065_1_12_1_6, + /** + * the signature of an individual consenting to what is described in a health information document. + */ + OID_1_2_840_10065_1_12_1_7, + /** + * the signature of a witness to any other signature. + */ + OID_1_2_840_10065_1_12_1_8, + /** + * the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.) + */ + OID_1_2_840_10065_1_12_1_9, + /** + * the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.) + */ + OID_1_2_840_10065_1_12_1_10, + /** + * the signature of an individual who has witnessed the health care provider counselling a patient. + */ + OID_1_2_840_10065_1_12_1_11, + /** + * the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment. + */ + OID_1_2_840_10065_1_12_1_12, + /** + * the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.) + */ + OID_1_2_840_10065_1_12_1_13, + /** + * the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.) + */ + OID_1_2_840_10065_1_12_1_14, + /** + * the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand. + */ + OID_1_2_840_10065_1_12_1_15, + /** + * the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document. + */ + OID_1_2_840_10065_1_12_1_16, + /** + * the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record. + */ + OID_1_2_840_10065_1_12_1_17, + /** + * the signature by an entity or device trusted to provide accurate timestamps. This timestamp might be provided, for example, in the signature time attribute. + */ + OID_1_2_840_10065_1_12_1_18, + /** + * added to help the parsers + */ + NULL; + public static SignatureType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1.2.840.10065.1.12.1.1".equals(codeString)) + return OID_1_2_840_10065_1_12_1_1; + if ("1.2.840.10065.1.12.1.2".equals(codeString)) + return OID_1_2_840_10065_1_12_1_2; + if ("1.2.840.10065.1.12.1.3".equals(codeString)) + return OID_1_2_840_10065_1_12_1_3; + if ("1.2.840.10065.1.12.1.4".equals(codeString)) + return OID_1_2_840_10065_1_12_1_4; + if ("1.2.840.10065.1.12.1.5".equals(codeString)) + return OID_1_2_840_10065_1_12_1_5; + if ("1.2.840.10065.1.12.1.6".equals(codeString)) + return OID_1_2_840_10065_1_12_1_6; + if ("1.2.840.10065.1.12.1.7".equals(codeString)) + return OID_1_2_840_10065_1_12_1_7; + if ("1.2.840.10065.1.12.1.8".equals(codeString)) + return OID_1_2_840_10065_1_12_1_8; + if ("1.2.840.10065.1.12.1.9".equals(codeString)) + return OID_1_2_840_10065_1_12_1_9; + if ("1.2.840.10065.1.12.1.10".equals(codeString)) + return OID_1_2_840_10065_1_12_1_10; + if ("1.2.840.10065.1.12.1.11".equals(codeString)) + return OID_1_2_840_10065_1_12_1_11; + if ("1.2.840.10065.1.12.1.12".equals(codeString)) + return OID_1_2_840_10065_1_12_1_12; + if ("1.2.840.10065.1.12.1.13".equals(codeString)) + return OID_1_2_840_10065_1_12_1_13; + if ("1.2.840.10065.1.12.1.14".equals(codeString)) + return OID_1_2_840_10065_1_12_1_14; + if ("1.2.840.10065.1.12.1.15".equals(codeString)) + return OID_1_2_840_10065_1_12_1_15; + if ("1.2.840.10065.1.12.1.16".equals(codeString)) + return OID_1_2_840_10065_1_12_1_16; + if ("1.2.840.10065.1.12.1.17".equals(codeString)) + return OID_1_2_840_10065_1_12_1_17; + if ("1.2.840.10065.1.12.1.18".equals(codeString)) + return OID_1_2_840_10065_1_12_1_18; + throw new FHIRException("Unknown SignatureType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "1.2.840.10065.1.12.1.1"; + case OID_1_2_840_10065_1_12_1_2: return "1.2.840.10065.1.12.1.2"; + case OID_1_2_840_10065_1_12_1_3: return "1.2.840.10065.1.12.1.3"; + case OID_1_2_840_10065_1_12_1_4: return "1.2.840.10065.1.12.1.4"; + case OID_1_2_840_10065_1_12_1_5: return "1.2.840.10065.1.12.1.5"; + case OID_1_2_840_10065_1_12_1_6: return "1.2.840.10065.1.12.1.6"; + case OID_1_2_840_10065_1_12_1_7: return "1.2.840.10065.1.12.1.7"; + case OID_1_2_840_10065_1_12_1_8: return "1.2.840.10065.1.12.1.8"; + case OID_1_2_840_10065_1_12_1_9: return "1.2.840.10065.1.12.1.9"; + case OID_1_2_840_10065_1_12_1_10: return "1.2.840.10065.1.12.1.10"; + case OID_1_2_840_10065_1_12_1_11: return "1.2.840.10065.1.12.1.11"; + case OID_1_2_840_10065_1_12_1_12: return "1.2.840.10065.1.12.1.12"; + case OID_1_2_840_10065_1_12_1_13: return "1.2.840.10065.1.12.1.13"; + case OID_1_2_840_10065_1_12_1_14: return "1.2.840.10065.1.12.1.14"; + case OID_1_2_840_10065_1_12_1_15: return "1.2.840.10065.1.12.1.15"; + case OID_1_2_840_10065_1_12_1_16: return "1.2.840.10065.1.12.1.16"; + case OID_1_2_840_10065_1_12_1_17: return "1.2.840.10065.1.12.1.17"; + case OID_1_2_840_10065_1_12_1_18: return "1.2.840.10065.1.12.1.18"; + default: return "?"; + } + } + public String getSystem() { + return "urn:iso-astm:E1762-95:2013"; + } + public String getDefinition() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document."; + case OID_1_2_840_10065_1_12_1_2: return "the signature of a health information document coauthor. There can be multiple coauthors of a health information document."; + case OID_1_2_840_10065_1_12_1_3: return "the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.)"; + case OID_1_2_840_10065_1_12_1_4: return "the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format."; + case OID_1_2_840_10065_1_12_1_5: return "a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.)"; + case OID_1_2_840_10065_1_12_1_6: return "a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.)"; + case OID_1_2_840_10065_1_12_1_7: return "the signature of an individual consenting to what is described in a health information document."; + case OID_1_2_840_10065_1_12_1_8: return "the signature of a witness to any other signature."; + case OID_1_2_840_10065_1_12_1_9: return "the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.)"; + case OID_1_2_840_10065_1_12_1_10: return "the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.)"; + case OID_1_2_840_10065_1_12_1_11: return "the signature of an individual who has witnessed the health care provider counselling a patient."; + case OID_1_2_840_10065_1_12_1_12: return "the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment."; + case OID_1_2_840_10065_1_12_1_13: return "the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.)"; + case OID_1_2_840_10065_1_12_1_14: return "the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.)"; + case OID_1_2_840_10065_1_12_1_15: return "the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand."; + case OID_1_2_840_10065_1_12_1_16: return "the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document."; + case OID_1_2_840_10065_1_12_1_17: return "the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record."; + case OID_1_2_840_10065_1_12_1_18: return "the signature by an entity or device trusted to provide accurate timestamps. This timestamp might be provided, for example, in the signature time attribute."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OID_1_2_840_10065_1_12_1_1: return "Author's Signature"; + case OID_1_2_840_10065_1_12_1_2: return "Coauthor's Signature"; + case OID_1_2_840_10065_1_12_1_3: return "Co-participant's Signature"; + case OID_1_2_840_10065_1_12_1_4: return "Transcriptionist/Recorder Signature"; + case OID_1_2_840_10065_1_12_1_5: return "Verification Signature"; + case OID_1_2_840_10065_1_12_1_6: return "Validation Signature"; + case OID_1_2_840_10065_1_12_1_7: return "Consent Signature"; + case OID_1_2_840_10065_1_12_1_8: return "Signature Witness Signature"; + case OID_1_2_840_10065_1_12_1_9: return "Event Witness Signature"; + case OID_1_2_840_10065_1_12_1_10: return "Identity Witness Signature"; + case OID_1_2_840_10065_1_12_1_11: return "Consent Witness Signature"; + case OID_1_2_840_10065_1_12_1_12: return "Interpreter Signature"; + case OID_1_2_840_10065_1_12_1_13: return "Review Signature"; + case OID_1_2_840_10065_1_12_1_14: return "Source Signature"; + case OID_1_2_840_10065_1_12_1_15: return "Addendum Signature"; + case OID_1_2_840_10065_1_12_1_16: return "Modification Signature"; + case OID_1_2_840_10065_1_12_1_17: return "Administrative (Error/Edit) Signature"; + case OID_1_2_840_10065_1_12_1_18: return "Timestamp Signature"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SignatureTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SignatureTypeEnumFactory.java new file mode 100644 index 00000000000..6874e487562 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SignatureTypeEnumFactory.java @@ -0,0 +1,126 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SignatureTypeEnumFactory implements EnumFactory { + + public SignatureType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1.2.840.10065.1.12.1.1".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_1; + if ("1.2.840.10065.1.12.1.2".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_2; + if ("1.2.840.10065.1.12.1.3".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_3; + if ("1.2.840.10065.1.12.1.4".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_4; + if ("1.2.840.10065.1.12.1.5".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_5; + if ("1.2.840.10065.1.12.1.6".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_6; + if ("1.2.840.10065.1.12.1.7".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_7; + if ("1.2.840.10065.1.12.1.8".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_8; + if ("1.2.840.10065.1.12.1.9".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_9; + if ("1.2.840.10065.1.12.1.10".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_10; + if ("1.2.840.10065.1.12.1.11".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_11; + if ("1.2.840.10065.1.12.1.12".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_12; + if ("1.2.840.10065.1.12.1.13".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_13; + if ("1.2.840.10065.1.12.1.14".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_14; + if ("1.2.840.10065.1.12.1.15".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_15; + if ("1.2.840.10065.1.12.1.16".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_16; + if ("1.2.840.10065.1.12.1.17".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_17; + if ("1.2.840.10065.1.12.1.18".equals(codeString)) + return SignatureType.OID_1_2_840_10065_1_12_1_18; + throw new IllegalArgumentException("Unknown SignatureType code '"+codeString+"'"); + } + + public String toCode(SignatureType code) { + if (code == SignatureType.OID_1_2_840_10065_1_12_1_1) + return "1.2.840.10065.1.12.1.1"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_2) + return "1.2.840.10065.1.12.1.2"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_3) + return "1.2.840.10065.1.12.1.3"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_4) + return "1.2.840.10065.1.12.1.4"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_5) + return "1.2.840.10065.1.12.1.5"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_6) + return "1.2.840.10065.1.12.1.6"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_7) + return "1.2.840.10065.1.12.1.7"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_8) + return "1.2.840.10065.1.12.1.8"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_9) + return "1.2.840.10065.1.12.1.9"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_10) + return "1.2.840.10065.1.12.1.10"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_11) + return "1.2.840.10065.1.12.1.11"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_12) + return "1.2.840.10065.1.12.1.12"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_13) + return "1.2.840.10065.1.12.1.13"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_14) + return "1.2.840.10065.1.12.1.14"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_15) + return "1.2.840.10065.1.12.1.15"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_16) + return "1.2.840.10065.1.12.1.16"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_17) + return "1.2.840.10065.1.12.1.17"; + if (code == SignatureType.OID_1_2_840_10065_1_12_1_18) + return "1.2.840.10065.1.12.1.18"; + return "?"; + } + + public String toSystem(SignatureType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Slotstatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Slotstatus.java new file mode 100644 index 00000000000..3ebc0fbf2d1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Slotstatus.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Slotstatus { + + /** + * Indicates that the time interval is busy because one or more events have been scheduled for that interval. + */ + BUSY, + /** + * Indicates that the time interval is free for scheduling. + */ + FREE, + /** + * Indicates that the time interval is busy and that the interval can not be scheduled. + */ + BUSYUNAVAILABLE, + /** + * Indicates that the time interval is busy because one or more events have been tentatively scheduled for that interval. + */ + BUSYTENTATIVE, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static Slotstatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("busy".equals(codeString)) + return BUSY; + if ("free".equals(codeString)) + return FREE; + if ("busy-unavailable".equals(codeString)) + return BUSYUNAVAILABLE; + if ("busy-tentative".equals(codeString)) + return BUSYTENTATIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown Slotstatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BUSY: return "busy"; + case FREE: return "free"; + case BUSYUNAVAILABLE: return "busy-unavailable"; + case BUSYTENTATIVE: return "busy-tentative"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/slotstatus"; + } + public String getDefinition() { + switch (this) { + case BUSY: return "Indicates that the time interval is busy because one or more events have been scheduled for that interval."; + case FREE: return "Indicates that the time interval is free for scheduling."; + case BUSYUNAVAILABLE: return "Indicates that the time interval is busy and that the interval can not be scheduled."; + case BUSYTENTATIVE: return "Indicates that the time interval is busy because one or more events have been tentatively scheduled for that interval."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BUSY: return "Busy"; + case FREE: return "Free"; + case BUSYUNAVAILABLE: return "Busy (Unavailable)"; + case BUSYTENTATIVE: return "Busy (Tentative)"; + case ENTEREDINERROR: return "Entered in error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SlotstatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SlotstatusEnumFactory.java new file mode 100644 index 00000000000..e3dcae7d380 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SlotstatusEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SlotstatusEnumFactory implements EnumFactory { + + public Slotstatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("busy".equals(codeString)) + return Slotstatus.BUSY; + if ("free".equals(codeString)) + return Slotstatus.FREE; + if ("busy-unavailable".equals(codeString)) + return Slotstatus.BUSYUNAVAILABLE; + if ("busy-tentative".equals(codeString)) + return Slotstatus.BUSYTENTATIVE; + if ("entered-in-error".equals(codeString)) + return Slotstatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown Slotstatus code '"+codeString+"'"); + } + + public String toCode(Slotstatus code) { + if (code == Slotstatus.BUSY) + return "busy"; + if (code == Slotstatus.FREE) + return "free"; + if (code == Slotstatus.BUSYUNAVAILABLE) + return "busy-unavailable"; + if (code == Slotstatus.BUSYTENTATIVE) + return "busy-tentative"; + if (code == Slotstatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(Slotstatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecialValues.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecialValues.java new file mode 100644 index 00000000000..74b89bd8539 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecialValues.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SpecialValues { + + /** + * Boolean true. + */ + TRUE, + /** + * Boolean false. + */ + FALSE, + /** + * The content is greater than zero, but too small to be quantified. + */ + TRACE, + /** + * The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. + */ + SUFFICIENT, + /** + * The value is no longer available. + */ + WITHDRAWN, + /** + * The are no known applicable values in this context. + */ + NILKNOWN, + /** + * added to help the parsers + */ + NULL; + public static SpecialValues fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("true".equals(codeString)) + return TRUE; + if ("false".equals(codeString)) + return FALSE; + if ("trace".equals(codeString)) + return TRACE; + if ("sufficient".equals(codeString)) + return SUFFICIENT; + if ("withdrawn".equals(codeString)) + return WITHDRAWN; + if ("nil-known".equals(codeString)) + return NILKNOWN; + throw new FHIRException("Unknown SpecialValues code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TRUE: return "true"; + case FALSE: return "false"; + case TRACE: return "trace"; + case SUFFICIENT: return "sufficient"; + case WITHDRAWN: return "withdrawn"; + case NILKNOWN: return "nil-known"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/special-values"; + } + public String getDefinition() { + switch (this) { + case TRUE: return "Boolean true."; + case FALSE: return "Boolean false."; + case TRACE: return "The content is greater than zero, but too small to be quantified."; + case SUFFICIENT: return "The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material."; + case WITHDRAWN: return "The value is no longer available."; + case NILKNOWN: return "The are no known applicable values in this context."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TRUE: return "true"; + case FALSE: return "false"; + case TRACE: return "Trace Amount Detected"; + case SUFFICIENT: return "Sufficient Quantity"; + case WITHDRAWN: return "Value Withdrawn"; + case NILKNOWN: return "Nil Known"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecialValuesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecialValuesEnumFactory.java new file mode 100644 index 00000000000..2d1087c7178 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecialValuesEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SpecialValuesEnumFactory implements EnumFactory { + + public SpecialValues fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("true".equals(codeString)) + return SpecialValues.TRUE; + if ("false".equals(codeString)) + return SpecialValues.FALSE; + if ("trace".equals(codeString)) + return SpecialValues.TRACE; + if ("sufficient".equals(codeString)) + return SpecialValues.SUFFICIENT; + if ("withdrawn".equals(codeString)) + return SpecialValues.WITHDRAWN; + if ("nil-known".equals(codeString)) + return SpecialValues.NILKNOWN; + throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'"); + } + + public String toCode(SpecialValues code) { + if (code == SpecialValues.TRUE) + return "true"; + if (code == SpecialValues.FALSE) + return "false"; + if (code == SpecialValues.TRACE) + return "trace"; + if (code == SpecialValues.SUFFICIENT) + return "sufficient"; + if (code == SpecialValues.WITHDRAWN) + return "withdrawn"; + if (code == SpecialValues.NILKNOWN) + return "nil-known"; + return "?"; + } + + public String toSystem(SpecialValues code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecificationType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecificationType.java new file mode 100644 index 00000000000..9adf9ccf41b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecificationType.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SpecificationType { + + /** + * Unspecified Production Specification - MDC_ID_PROD_SPEC_UNSPECIFIED + */ + UNSPECIFIED, + /** + * Serial Number - MDC_ID_PROD_SPEC_SERIAL + */ + SERIALNUMBER, + /** + * Part Number - MDC_ID_PROD_SPEC_PART + */ + PARTNUMBER, + /** + * Hardware Revision - MDC_ID_PROD_SPEC_HW + */ + HARDWAREREVISION, + /** + * Software Revision - MDC_ID_PROD_SPEC_SW + */ + SOFTWAREREVISION, + /** + * Firmware Revision - MDC_ID_PROD_SPEC_FW + */ + FIRMWAREREVISION, + /** + * Protocol Revision - MDC_ID_PROD_SPEC_PROTOCOL + */ + PROTOCOLREVISION, + /** + * GMDN - MDC_ID_PROD_SPEC_GMDN + */ + GMDN, + /** + * added to help the parsers + */ + NULL; + public static SpecificationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return UNSPECIFIED; + if ("serial-number".equals(codeString)) + return SERIALNUMBER; + if ("part-number".equals(codeString)) + return PARTNUMBER; + if ("hardware-revision".equals(codeString)) + return HARDWAREREVISION; + if ("software-revision".equals(codeString)) + return SOFTWAREREVISION; + if ("firmware-revision".equals(codeString)) + return FIRMWAREREVISION; + if ("protocol-revision".equals(codeString)) + return PROTOCOLREVISION; + if ("gmdn".equals(codeString)) + return GMDN; + throw new FHIRException("Unknown SpecificationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UNSPECIFIED: return "unspecified"; + case SERIALNUMBER: return "serial-number"; + case PARTNUMBER: return "part-number"; + case HARDWAREREVISION: return "hardware-revision"; + case SOFTWAREREVISION: return "software-revision"; + case FIRMWAREREVISION: return "firmware-revision"; + case PROTOCOLREVISION: return "protocol-revision"; + case GMDN: return "gmdn"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/specification-type"; + } + public String getDefinition() { + switch (this) { + case UNSPECIFIED: return "Unspecified Production Specification - MDC_ID_PROD_SPEC_UNSPECIFIED"; + case SERIALNUMBER: return "Serial Number - MDC_ID_PROD_SPEC_SERIAL"; + case PARTNUMBER: return "Part Number - MDC_ID_PROD_SPEC_PART"; + case HARDWAREREVISION: return "Hardware Revision - MDC_ID_PROD_SPEC_HW"; + case SOFTWAREREVISION: return "Software Revision - MDC_ID_PROD_SPEC_SW"; + case FIRMWAREREVISION: return "Firmware Revision - MDC_ID_PROD_SPEC_FW"; + case PROTOCOLREVISION: return "Protocol Revision - MDC_ID_PROD_SPEC_PROTOCOL"; + case GMDN: return "GMDN - MDC_ID_PROD_SPEC_GMDN"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UNSPECIFIED: return "Unspecified Production Specification"; + case SERIALNUMBER: return "Serial Number"; + case PARTNUMBER: return "Part Number"; + case HARDWAREREVISION: return "Hardware Revision"; + case SOFTWAREREVISION: return "Software Revision"; + case FIRMWAREREVISION: return "Firmware Revision"; + case PROTOCOLREVISION: return "Protocol Revision"; + case GMDN: return "GMDN"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecificationTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecificationTypeEnumFactory.java new file mode 100644 index 00000000000..9f22ecbf5d0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecificationTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SpecificationTypeEnumFactory implements EnumFactory { + + public SpecificationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("unspecified".equals(codeString)) + return SpecificationType.UNSPECIFIED; + if ("serial-number".equals(codeString)) + return SpecificationType.SERIALNUMBER; + if ("part-number".equals(codeString)) + return SpecificationType.PARTNUMBER; + if ("hardware-revision".equals(codeString)) + return SpecificationType.HARDWAREREVISION; + if ("software-revision".equals(codeString)) + return SpecificationType.SOFTWAREREVISION; + if ("firmware-revision".equals(codeString)) + return SpecificationType.FIRMWAREREVISION; + if ("protocol-revision".equals(codeString)) + return SpecificationType.PROTOCOLREVISION; + if ("gmdn".equals(codeString)) + return SpecificationType.GMDN; + throw new IllegalArgumentException("Unknown SpecificationType code '"+codeString+"'"); + } + + public String toCode(SpecificationType code) { + if (code == SpecificationType.UNSPECIFIED) + return "unspecified"; + if (code == SpecificationType.SERIALNUMBER) + return "serial-number"; + if (code == SpecificationType.PARTNUMBER) + return "part-number"; + if (code == SpecificationType.HARDWAREREVISION) + return "hardware-revision"; + if (code == SpecificationType.SOFTWAREREVISION) + return "software-revision"; + if (code == SpecificationType.FIRMWAREREVISION) + return "firmware-revision"; + if (code == SpecificationType.PROTOCOLREVISION) + return "protocol-revision"; + if (code == SpecificationType.GMDN) + return "gmdn"; + return "?"; + } + + public String toSystem(SpecificationType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenContainedPreference.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenContainedPreference.java new file mode 100644 index 00000000000..e32c941b578 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenContainedPreference.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SpecimenContainedPreference { + + /** + * This type of contained specimen is preferred to collect this kind of specimen + */ + PREFERRED, + /** + * This type of conditioned specimen is an alternate + */ + ALTERNATE, + /** + * added to help the parsers + */ + NULL; + public static SpecimenContainedPreference fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preferred".equals(codeString)) + return PREFERRED; + if ("alternate".equals(codeString)) + return ALTERNATE; + throw new FHIRException("Unknown SpecimenContainedPreference code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PREFERRED: return "preferred"; + case ALTERNATE: return "alternate"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/specimen-contained-preference"; + } + public String getDefinition() { + switch (this) { + case PREFERRED: return "This type of contained specimen is preferred to collect this kind of specimen"; + case ALTERNATE: return "This type of conditioned specimen is an alternate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PREFERRED: return "Preferred"; + case ALTERNATE: return "Alternate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenContainedPreferenceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenContainedPreferenceEnumFactory.java new file mode 100644 index 00000000000..c491cae8e4b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenContainedPreferenceEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SpecimenContainedPreferenceEnumFactory implements EnumFactory { + + public SpecimenContainedPreference fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("preferred".equals(codeString)) + return SpecimenContainedPreference.PREFERRED; + if ("alternate".equals(codeString)) + return SpecimenContainedPreference.ALTERNATE; + throw new IllegalArgumentException("Unknown SpecimenContainedPreference code '"+codeString+"'"); + } + + public String toCode(SpecimenContainedPreference code) { + if (code == SpecimenContainedPreference.PREFERRED) + return "preferred"; + if (code == SpecimenContainedPreference.ALTERNATE) + return "alternate"; + return "?"; + } + + public String toSystem(SpecimenContainedPreference code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenStatus.java new file mode 100644 index 00000000000..1715bef1091 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SpecimenStatus { + + /** + * The physical specimen is present and in good condition. + */ + AVAILABLE, + /** + * There is no physical specimen because it is either lost, destroyed or consumed. + */ + UNAVAILABLE, + /** + * The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old. + */ + UNSATISFACTORY, + /** + * The specimen was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static SpecimenStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return AVAILABLE; + if ("unavailable".equals(codeString)) + return UNAVAILABLE; + if ("unsatisfactory".equals(codeString)) + return UNSATISFACTORY; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown SpecimenStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AVAILABLE: return "available"; + case UNAVAILABLE: return "unavailable"; + case UNSATISFACTORY: return "unsatisfactory"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/specimen-status"; + } + public String getDefinition() { + switch (this) { + case AVAILABLE: return "The physical specimen is present and in good condition."; + case UNAVAILABLE: return "There is no physical specimen because it is either lost, destroyed or consumed."; + case UNSATISFACTORY: return "The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old."; + case ENTEREDINERROR: return "The specimen was entered in error and therefore nullified."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AVAILABLE: return "Available"; + case UNAVAILABLE: return "Unavailable"; + case UNSATISFACTORY: return "Unsatisfactory"; + case ENTEREDINERROR: return "Entered-in-error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenStatusEnumFactory.java new file mode 100644 index 00000000000..b69160c0fc8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SpecimenStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SpecimenStatusEnumFactory implements EnumFactory { + + public SpecimenStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("available".equals(codeString)) + return SpecimenStatus.AVAILABLE; + if ("unavailable".equals(codeString)) + return SpecimenStatus.UNAVAILABLE; + if ("unsatisfactory".equals(codeString)) + return SpecimenStatus.UNSATISFACTORY; + if ("entered-in-error".equals(codeString)) + return SpecimenStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown SpecimenStatus code '"+codeString+"'"); + } + + public String toCode(SpecimenStatus code) { + if (code == SpecimenStatus.AVAILABLE) + return "available"; + if (code == SpecimenStatus.UNAVAILABLE) + return "unavailable"; + if (code == SpecimenStatus.UNSATISFACTORY) + return "unsatisfactory"; + if (code == SpecimenStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(SpecimenStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/StructureDefinitionKind.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/StructureDefinitionKind.java new file mode 100644 index 00000000000..bc37ce68dfe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/StructureDefinitionKind.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum StructureDefinitionKind { + + /** + * A primitive type that has a value and an extension. These can be used throughout Resource and extension definitions. Only the base specification can define primitive types. + */ + PRIMITIVETYPE, + /** + * A complex structure that defines a set of data elements. These can be used throughout Resource and extension definitions, and in logical models. + */ + COMPLEXTYPE, + /** + * A resource defined by the FHIR specification. + */ + RESOURCE, + /** + * A conceptual package of data that will be mapped to resources for implementation. + */ + LOGICAL, + /** + * added to help the parsers + */ + NULL; + public static StructureDefinitionKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("primitive-type".equals(codeString)) + return PRIMITIVETYPE; + if ("complex-type".equals(codeString)) + return COMPLEXTYPE; + if ("resource".equals(codeString)) + return RESOURCE; + if ("logical".equals(codeString)) + return LOGICAL; + throw new FHIRException("Unknown StructureDefinitionKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PRIMITIVETYPE: return "primitive-type"; + case COMPLEXTYPE: return "complex-type"; + case RESOURCE: return "resource"; + case LOGICAL: return "logical"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/structure-definition-kind"; + } + public String getDefinition() { + switch (this) { + case PRIMITIVETYPE: return "A primitive type that has a value and an extension. These can be used throughout Resource and extension definitions. Only the base specification can define primitive types."; + case COMPLEXTYPE: return "A complex structure that defines a set of data elements. These can be used throughout Resource and extension definitions, and in logical models."; + case RESOURCE: return "A resource defined by the FHIR specification."; + case LOGICAL: return "A conceptual package of data that will be mapped to resources for implementation."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PRIMITIVETYPE: return "Primitive Data Type"; + case COMPLEXTYPE: return "Complex Data Type"; + case RESOURCE: return "Resource"; + case LOGICAL: return "Logical Model"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/StructureDefinitionKindEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/StructureDefinitionKindEnumFactory.java new file mode 100644 index 00000000000..8e992e50865 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/StructureDefinitionKindEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class StructureDefinitionKindEnumFactory implements EnumFactory { + + public StructureDefinitionKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("primitive-type".equals(codeString)) + return StructureDefinitionKind.PRIMITIVETYPE; + if ("complex-type".equals(codeString)) + return StructureDefinitionKind.COMPLEXTYPE; + if ("resource".equals(codeString)) + return StructureDefinitionKind.RESOURCE; + if ("logical".equals(codeString)) + return StructureDefinitionKind.LOGICAL; + throw new IllegalArgumentException("Unknown StructureDefinitionKind code '"+codeString+"'"); + } + + public String toCode(StructureDefinitionKind code) { + if (code == StructureDefinitionKind.PRIMITIVETYPE) + return "primitive-type"; + if (code == StructureDefinitionKind.COMPLEXTYPE) + return "complex-type"; + if (code == StructureDefinitionKind.RESOURCE) + return "resource"; + if (code == StructureDefinitionKind.LOGICAL) + return "logical"; + return "?"; + } + + public String toSystem(StructureDefinitionKind code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionChannelType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionChannelType.java new file mode 100644 index 00000000000..966683162fa --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionChannelType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubscriptionChannelType { + + /** + * The channel is executed by making a post to the URI. If a payload is included, the URL is interpreted as the service base, and an update (PUT) is made. + */ + RESTHOOK, + /** + * The channel is executed by sending a packet across a web socket connection maintained by the client. The URL identifies the websocket, and the client binds to this URL. + */ + WEBSOCKET, + /** + * The channel is executed by sending an email to the email addressed in the URI (which must be a mailto:). + */ + EMAIL, + /** + * The channel is executed by sending an SMS message to the phone number identified in the URL (tel:). + */ + SMS, + /** + * The channel is executed by sending a message (e.g. a Bundle with a MessageHeader resource etc.) to the application identified in the URI. + */ + MESSAGE, + /** + * added to help the parsers + */ + NULL; + public static SubscriptionChannelType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("rest-hook".equals(codeString)) + return RESTHOOK; + if ("websocket".equals(codeString)) + return WEBSOCKET; + if ("email".equals(codeString)) + return EMAIL; + if ("sms".equals(codeString)) + return SMS; + if ("message".equals(codeString)) + return MESSAGE; + throw new FHIRException("Unknown SubscriptionChannelType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RESTHOOK: return "rest-hook"; + case WEBSOCKET: return "websocket"; + case EMAIL: return "email"; + case SMS: return "sms"; + case MESSAGE: return "message"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/subscription-channel-type"; + } + public String getDefinition() { + switch (this) { + case RESTHOOK: return "The channel is executed by making a post to the URI. If a payload is included, the URL is interpreted as the service base, and an update (PUT) is made."; + case WEBSOCKET: return "The channel is executed by sending a packet across a web socket connection maintained by the client. The URL identifies the websocket, and the client binds to this URL."; + case EMAIL: return "The channel is executed by sending an email to the email addressed in the URI (which must be a mailto:)."; + case SMS: return "The channel is executed by sending an SMS message to the phone number identified in the URL (tel:)."; + case MESSAGE: return "The channel is executed by sending a message (e.g. a Bundle with a MessageHeader resource etc.) to the application identified in the URI."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RESTHOOK: return "Rest Hook"; + case WEBSOCKET: return "Websocket"; + case EMAIL: return "Email"; + case SMS: return "SMS"; + case MESSAGE: return "Message"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionChannelTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionChannelTypeEnumFactory.java new file mode 100644 index 00000000000..869a557c386 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionChannelTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SubscriptionChannelTypeEnumFactory implements EnumFactory { + + public SubscriptionChannelType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("rest-hook".equals(codeString)) + return SubscriptionChannelType.RESTHOOK; + if ("websocket".equals(codeString)) + return SubscriptionChannelType.WEBSOCKET; + if ("email".equals(codeString)) + return SubscriptionChannelType.EMAIL; + if ("sms".equals(codeString)) + return SubscriptionChannelType.SMS; + if ("message".equals(codeString)) + return SubscriptionChannelType.MESSAGE; + throw new IllegalArgumentException("Unknown SubscriptionChannelType code '"+codeString+"'"); + } + + public String toCode(SubscriptionChannelType code) { + if (code == SubscriptionChannelType.RESTHOOK) + return "rest-hook"; + if (code == SubscriptionChannelType.WEBSOCKET) + return "websocket"; + if (code == SubscriptionChannelType.EMAIL) + return "email"; + if (code == SubscriptionChannelType.SMS) + return "sms"; + if (code == SubscriptionChannelType.MESSAGE) + return "message"; + return "?"; + } + + public String toSystem(SubscriptionChannelType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionStatus.java new file mode 100644 index 00000000000..9353eef410f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubscriptionStatus { + + /** + * The client has requested the subscription, and the server has not yet set it up. + */ + REQUESTED, + /** + * The subscription is active. + */ + ACTIVE, + /** + * The server has an error executing the notification. + */ + ERROR, + /** + * Too many errors have occurred or the subscription has expired. + */ + OFF, + /** + * added to help the parsers + */ + NULL; + public static SubscriptionStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return REQUESTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("error".equals(codeString)) + return ERROR; + if ("off".equals(codeString)) + return OFF; + throw new FHIRException("Unknown SubscriptionStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUESTED: return "requested"; + case ACTIVE: return "active"; + case ERROR: return "error"; + case OFF: return "off"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/subscription-status"; + } + public String getDefinition() { + switch (this) { + case REQUESTED: return "The client has requested the subscription, and the server has not yet set it up."; + case ACTIVE: return "The subscription is active."; + case ERROR: return "The server has an error executing the notification."; + case OFF: return "Too many errors have occurred or the subscription has expired."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUESTED: return "Requested"; + case ACTIVE: return "Active"; + case ERROR: return "Error"; + case OFF: return "Off"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionStatusEnumFactory.java new file mode 100644 index 00000000000..9b8930e01c3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SubscriptionStatusEnumFactory implements EnumFactory { + + public SubscriptionStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("requested".equals(codeString)) + return SubscriptionStatus.REQUESTED; + if ("active".equals(codeString)) + return SubscriptionStatus.ACTIVE; + if ("error".equals(codeString)) + return SubscriptionStatus.ERROR; + if ("off".equals(codeString)) + return SubscriptionStatus.OFF; + throw new IllegalArgumentException("Unknown SubscriptionStatus code '"+codeString+"'"); + } + + public String toCode(SubscriptionStatus code) { + if (code == SubscriptionStatus.REQUESTED) + return "requested"; + if (code == SubscriptionStatus.ACTIVE) + return "active"; + if (code == SubscriptionStatus.ERROR) + return "error"; + if (code == SubscriptionStatus.OFF) + return "off"; + return "?"; + } + + public String toSystem(SubscriptionStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionTag.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionTag.java new file mode 100644 index 00000000000..55e993f6d8a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionTag.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubscriptionTag { + + /** + * The message has been queued for processing on a destination systems. + */ + QUEUED, + /** + * The message has been delivered to its intended recipient. + */ + DELIVERED, + /** + * added to help the parsers + */ + NULL; + public static SubscriptionTag fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("queued".equals(codeString)) + return QUEUED; + if ("delivered".equals(codeString)) + return DELIVERED; + throw new FHIRException("Unknown SubscriptionTag code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case QUEUED: return "queued"; + case DELIVERED: return "delivered"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/subscription-tag"; + } + public String getDefinition() { + switch (this) { + case QUEUED: return "The message has been queued for processing on a destination systems."; + case DELIVERED: return "The message has been delivered to its intended recipient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case QUEUED: return "Queued"; + case DELIVERED: return "Delivered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionTagEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionTagEnumFactory.java new file mode 100644 index 00000000000..2709c0d82fd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubscriptionTagEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SubscriptionTagEnumFactory implements EnumFactory { + + public SubscriptionTag fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("queued".equals(codeString)) + return SubscriptionTag.QUEUED; + if ("delivered".equals(codeString)) + return SubscriptionTag.DELIVERED; + throw new IllegalArgumentException("Unknown SubscriptionTag code '"+codeString+"'"); + } + + public String toCode(SubscriptionTag code) { + if (code == SubscriptionTag.QUEUED) + return "queued"; + if (code == SubscriptionTag.DELIVERED) + return "delivered"; + return "?"; + } + + public String toSystem(SubscriptionTag code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceCategory.java new file mode 100644 index 00000000000..ef0d5bcf576 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceCategory.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubstanceCategory { + + /** + * A substance that causes an allergic reaction. + */ + ALLERGEN, + /** + * A substance that is produced by or extracted from a biological source. + */ + BIOLOGICAL, + /** + * A substance that comes directly from a human or an animal (e.g. blood, urine, feces, tears, etc.). + */ + BODY, + /** + * Any organic or inorganic substance of a particular molecular identity, including -- (i) any combination of such substances occurring in whole or in part as a result of a chemical reaction or occurring in nature and (ii) any element or uncombined radical (http://www.epa.gov/opptintr/import-export/pubs/importguide.pdf). + */ + CHEMICAL, + /** + * A food, dietary ingredient, or dietary supplement for human or animal. + */ + FOOD, + /** + * A substance intended for use in the diagnosis, cure, mitigation, treatment, or prevention of disease in man or other animals (Federal Food Drug and Cosmetic Act). + */ + DRUG, + /** + * A finished product which is not normally ingested, absorbed or injected (e.g. steel, iron, wood, plastic and paper). + */ + MATERIAL, + /** + * added to help the parsers + */ + NULL; + public static SubstanceCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergen".equals(codeString)) + return ALLERGEN; + if ("biological".equals(codeString)) + return BIOLOGICAL; + if ("body".equals(codeString)) + return BODY; + if ("chemical".equals(codeString)) + return CHEMICAL; + if ("food".equals(codeString)) + return FOOD; + if ("drug".equals(codeString)) + return DRUG; + if ("material".equals(codeString)) + return MATERIAL; + throw new FHIRException("Unknown SubstanceCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALLERGEN: return "allergen"; + case BIOLOGICAL: return "biological"; + case BODY: return "body"; + case CHEMICAL: return "chemical"; + case FOOD: return "food"; + case DRUG: return "drug"; + case MATERIAL: return "material"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/substance-category"; + } + public String getDefinition() { + switch (this) { + case ALLERGEN: return "A substance that causes an allergic reaction."; + case BIOLOGICAL: return "A substance that is produced by or extracted from a biological source."; + case BODY: return "A substance that comes directly from a human or an animal (e.g. blood, urine, feces, tears, etc.)."; + case CHEMICAL: return "Any organic or inorganic substance of a particular molecular identity, including -- (i) any combination of such substances occurring in whole or in part as a result of a chemical reaction or occurring in nature and (ii) any element or uncombined radical (http://www.epa.gov/opptintr/import-export/pubs/importguide.pdf)."; + case FOOD: return "A food, dietary ingredient, or dietary supplement for human or animal."; + case DRUG: return "A substance intended for use in the diagnosis, cure, mitigation, treatment, or prevention of disease in man or other animals (Federal Food Drug and Cosmetic Act)."; + case MATERIAL: return "A finished product which is not normally ingested, absorbed or injected (e.g. steel, iron, wood, plastic and paper)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALLERGEN: return "Allergen"; + case BIOLOGICAL: return "Biological Substance"; + case BODY: return "Body Substance"; + case CHEMICAL: return "Chemical"; + case FOOD: return "Dietary Substance"; + case DRUG: return "Drug or Medicament"; + case MATERIAL: return "Material"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceCategoryEnumFactory.java new file mode 100644 index 00000000000..a0875d47ffd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceCategoryEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SubstanceCategoryEnumFactory implements EnumFactory { + + public SubstanceCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("allergen".equals(codeString)) + return SubstanceCategory.ALLERGEN; + if ("biological".equals(codeString)) + return SubstanceCategory.BIOLOGICAL; + if ("body".equals(codeString)) + return SubstanceCategory.BODY; + if ("chemical".equals(codeString)) + return SubstanceCategory.CHEMICAL; + if ("food".equals(codeString)) + return SubstanceCategory.FOOD; + if ("drug".equals(codeString)) + return SubstanceCategory.DRUG; + if ("material".equals(codeString)) + return SubstanceCategory.MATERIAL; + throw new IllegalArgumentException("Unknown SubstanceCategory code '"+codeString+"'"); + } + + public String toCode(SubstanceCategory code) { + if (code == SubstanceCategory.ALLERGEN) + return "allergen"; + if (code == SubstanceCategory.BIOLOGICAL) + return "biological"; + if (code == SubstanceCategory.BODY) + return "body"; + if (code == SubstanceCategory.CHEMICAL) + return "chemical"; + if (code == SubstanceCategory.FOOD) + return "food"; + if (code == SubstanceCategory.DRUG) + return "drug"; + if (code == SubstanceCategory.MATERIAL) + return "material"; + return "?"; + } + + public String toSystem(SubstanceCategory code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceStatus.java new file mode 100644 index 00000000000..2e958d1433f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceStatus.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SubstanceStatus { + + /** + * The substance is considered for use or reference + */ + ACTIVE, + /** + * The substance is considered for reference, but not for use + */ + INACTIVE, + /** + * The substance was entered in error + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static SubstanceStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown SubstanceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/substance-status"; + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The substance is considered for use or reference"; + case INACTIVE: return "The substance is considered for reference, but not for use"; + case ENTEREDINERROR: return "The substance was entered in error"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceStatusEnumFactory.java new file mode 100644 index 00000000000..d5bdccb5bb3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SubstanceStatusEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SubstanceStatusEnumFactory implements EnumFactory { + + public SubstanceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return SubstanceStatus.ACTIVE; + if ("inactive".equals(codeString)) + return SubstanceStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return SubstanceStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown SubstanceStatus code '"+codeString+"'"); + } + + public String toCode(SubstanceStatus code) { + if (code == SubstanceStatus.ACTIVE) + return "active"; + if (code == SubstanceStatus.INACTIVE) + return "inactive"; + if (code == SubstanceStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(SubstanceStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryStatus.java new file mode 100644 index 00000000000..095a5072947 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryStatus.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplydeliveryStatus { + + /** + * Supply has been requested, but not delivered. + */ + INPROGRESS, + /** + * Supply has been delivered ("completed"). + */ + COMPLETED, + /** + * Delivery was not completed. + */ + ABANDONED, + /** + * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static SupplydeliveryStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("completed".equals(codeString)) + return COMPLETED; + if ("abandoned".equals(codeString)) + return ABANDONED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown SupplydeliveryStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case COMPLETED: return "completed"; + case ABANDONED: return "abandoned"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supplydelivery-status"; + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "Supply has been requested, but not delivered."; + case COMPLETED: return "Supply has been delivered (\"completed\")."; + case ABANDONED: return "Delivery was not completed."; + case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case COMPLETED: return "Delivered"; + case ABANDONED: return "Abandoned"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryStatusEnumFactory.java new file mode 100644 index 00000000000..85521121708 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryStatusEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SupplydeliveryStatusEnumFactory implements EnumFactory { + + public SupplydeliveryStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return SupplydeliveryStatus.INPROGRESS; + if ("completed".equals(codeString)) + return SupplydeliveryStatus.COMPLETED; + if ("abandoned".equals(codeString)) + return SupplydeliveryStatus.ABANDONED; + if ("entered-in-error".equals(codeString)) + return SupplydeliveryStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown SupplydeliveryStatus code '"+codeString+"'"); + } + + public String toCode(SupplydeliveryStatus code) { + if (code == SupplydeliveryStatus.INPROGRESS) + return "in-progress"; + if (code == SupplydeliveryStatus.COMPLETED) + return "completed"; + if (code == SupplydeliveryStatus.ABANDONED) + return "abandoned"; + if (code == SupplydeliveryStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(SupplydeliveryStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryType.java new file mode 100644 index 00000000000..1dd89973905 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplydeliveryType { + + /** + * Supply is a kind of medication. + */ + MEDICATION, + /** + * What is supplied (or requested) is a device. + */ + DEVICE, + /** + * added to help the parsers + */ + NULL; + public static SupplydeliveryType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("medication".equals(codeString)) + return MEDICATION; + if ("device".equals(codeString)) + return DEVICE; + throw new FHIRException("Unknown SupplydeliveryType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MEDICATION: return "medication"; + case DEVICE: return "device"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supply-item-type"; + } + public String getDefinition() { + switch (this) { + case MEDICATION: return "Supply is a kind of medication."; + case DEVICE: return "What is supplied (or requested) is a device."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MEDICATION: return "Medication"; + case DEVICE: return "Device"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryTypeEnumFactory.java new file mode 100644 index 00000000000..2ac2a73d634 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplydeliveryTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SupplydeliveryTypeEnumFactory implements EnumFactory { + + public SupplydeliveryType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("medication".equals(codeString)) + return SupplydeliveryType.MEDICATION; + if ("device".equals(codeString)) + return SupplydeliveryType.DEVICE; + throw new IllegalArgumentException("Unknown SupplydeliveryType code '"+codeString+"'"); + } + + public String toCode(SupplydeliveryType code) { + if (code == SupplydeliveryType.MEDICATION) + return "medication"; + if (code == SupplydeliveryType.DEVICE) + return "device"; + return "?"; + } + + public String toSystem(SupplydeliveryType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestKind.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestKind.java new file mode 100644 index 00000000000..4e5448496ca --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestKind.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplyrequestKind { + + /** + * Supply is stored and requested from central supply. + */ + CENTRAL, + /** + * Supply is not onsite and must be requested from an outside vendor using a non-stock requisition. + */ + NONSTOCK, + /** + * added to help the parsers + */ + NULL; + public static SupplyrequestKind fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("central".equals(codeString)) + return CENTRAL; + if ("nonstock".equals(codeString)) + return NONSTOCK; + throw new FHIRException("Unknown SupplyrequestKind code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CENTRAL: return "central"; + case NONSTOCK: return "nonstock"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supply-kind"; + } + public String getDefinition() { + switch (this) { + case CENTRAL: return "Supply is stored and requested from central supply."; + case NONSTOCK: return "Supply is not onsite and must be requested from an outside vendor using a non-stock requisition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CENTRAL: return "Central Supply"; + case NONSTOCK: return "Non-Stock"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestKindEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestKindEnumFactory.java new file mode 100644 index 00000000000..25390b66c05 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestKindEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SupplyrequestKindEnumFactory implements EnumFactory { + + public SupplyrequestKind fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("central".equals(codeString)) + return SupplyrequestKind.CENTRAL; + if ("nonstock".equals(codeString)) + return SupplyrequestKind.NONSTOCK; + throw new IllegalArgumentException("Unknown SupplyrequestKind code '"+codeString+"'"); + } + + public String toCode(SupplyrequestKind code) { + if (code == SupplyrequestKind.CENTRAL) + return "central"; + if (code == SupplyrequestKind.NONSTOCK) + return "nonstock"; + return "?"; + } + + public String toSystem(SupplyrequestKind code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestReason.java new file mode 100644 index 00000000000..7f82dda3d27 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestReason.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplyrequestReason { + + /** + * The supply has been requested for use in direct patient care. + */ + PATIENTCARE, + /** + * The supply has been requested for for creating or replenishing ward stock. + */ + WARDSTOCK, + /** + * added to help the parsers + */ + NULL; + public static SupplyrequestReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-care".equals(codeString)) + return PATIENTCARE; + if ("ward-stock".equals(codeString)) + return WARDSTOCK; + throw new FHIRException("Unknown SupplyrequestReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENTCARE: return "patient-care"; + case WARDSTOCK: return "ward-stock"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supplyrequest-reason"; + } + public String getDefinition() { + switch (this) { + case PATIENTCARE: return "The supply has been requested for use in direct patient care."; + case WARDSTOCK: return "The supply has been requested for for creating or replenishing ward stock."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENTCARE: return "Patient Care"; + case WARDSTOCK: return "Ward Stock"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestReasonEnumFactory.java new file mode 100644 index 00000000000..fc7849fb7c7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestReasonEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SupplyrequestReasonEnumFactory implements EnumFactory { + + public SupplyrequestReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient-care".equals(codeString)) + return SupplyrequestReason.PATIENTCARE; + if ("ward-stock".equals(codeString)) + return SupplyrequestReason.WARDSTOCK; + throw new IllegalArgumentException("Unknown SupplyrequestReason code '"+codeString+"'"); + } + + public String toCode(SupplyrequestReason code) { + if (code == SupplyrequestReason.PATIENTCARE) + return "patient-care"; + if (code == SupplyrequestReason.WARDSTOCK) + return "ward-stock"; + return "?"; + } + + public String toSystem(SupplyrequestReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestStatus.java new file mode 100644 index 00000000000..e37d787db14 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SupplyrequestStatus { + + /** + * The request has been created but is not yet complete or ready for action + */ + DRAFT, + /** + * The request is ready to be acted upon + */ + ACTIVE, + /** + * The authorization/request to act has been temporarily withdrawn but is expected to resume in the future + */ + SUSPENDED, + /** + * The authorization/request to act has been terminated prior to the full completion of the intended actions. No further activity should occur. + */ + CANCELLED, + /** + * Activity against the request has been sufficiently completed to the satisfaction of the requester + */ + COMPLETED, + /** + * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) + */ + ENTEREDINERROR, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static SupplyrequestStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown SupplyrequestStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/supplyrequest-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The request has been created but is not yet complete or ready for action"; + case ACTIVE: return "The request is ready to be acted upon"; + case SUSPENDED: return "The authorization/request to act has been temporarily withdrawn but is expected to resume in the future"; + case CANCELLED: return "The authorization/request to act has been terminated prior to the full completion of the intended actions. No further activity should occur."; + case COMPLETED: return "Activity against the request has been sufficiently completed to the satisfaction of the requester"; + case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case CANCELLED: return "Cancelled"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestStatusEnumFactory.java new file mode 100644 index 00000000000..9537214ac21 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SupplyrequestStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SupplyrequestStatusEnumFactory implements EnumFactory { + + public SupplyrequestStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return SupplyrequestStatus.DRAFT; + if ("active".equals(codeString)) + return SupplyrequestStatus.ACTIVE; + if ("suspended".equals(codeString)) + return SupplyrequestStatus.SUSPENDED; + if ("cancelled".equals(codeString)) + return SupplyrequestStatus.CANCELLED; + if ("completed".equals(codeString)) + return SupplyrequestStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return SupplyrequestStatus.ENTEREDINERROR; + if ("unknown".equals(codeString)) + return SupplyrequestStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown SupplyrequestStatus code '"+codeString+"'"); + } + + public String toCode(SupplyrequestStatus code) { + if (code == SupplyrequestStatus.DRAFT) + return "draft"; + if (code == SupplyrequestStatus.ACTIVE) + return "active"; + if (code == SupplyrequestStatus.SUSPENDED) + return "suspended"; + if (code == SupplyrequestStatus.CANCELLED) + return "cancelled"; + if (code == SupplyrequestStatus.COMPLETED) + return "completed"; + if (code == SupplyrequestStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == SupplyrequestStatus.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(SupplyrequestStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Surface.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Surface.java new file mode 100644 index 00000000000..3088ec2db34 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Surface.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Surface { + + /** + * The surface of a tooth that is closest to the midline (middle) of the face. + */ + M, + /** + * The chewing surface of posterior teeth. + */ + O, + /** + * The biting edge of anterior teeth. + */ + I, + /** + * The surface of a tooth that faces away from the midline of the face. + */ + D, + /** + * The surface of a posterior tooth facing the cheeks. + */ + B, + /** + * The surface of a tooth facing the lips. + */ + V, + /** + * The surface of a tooth facing the tongue. + */ + L, + /** + * The Mesioclusal surfaces of a tooth. + */ + MO, + /** + * The Distoclusal surfaces of a tooth. + */ + DO, + /** + * The Distoincisal surfaces of a tooth. + */ + DI, + /** + * The Mesioclusodistal surfaces of a tooth. + */ + MOD, + /** + * added to help the parsers + */ + NULL; + public static Surface fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return M; + if ("O".equals(codeString)) + return O; + if ("I".equals(codeString)) + return I; + if ("D".equals(codeString)) + return D; + if ("B".equals(codeString)) + return B; + if ("V".equals(codeString)) + return V; + if ("L".equals(codeString)) + return L; + if ("MO".equals(codeString)) + return MO; + if ("DO".equals(codeString)) + return DO; + if ("DI".equals(codeString)) + return DI; + if ("MOD".equals(codeString)) + return MOD; + throw new FHIRException("Unknown Surface code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case M: return "M"; + case O: return "O"; + case I: return "I"; + case D: return "D"; + case B: return "B"; + case V: return "V"; + case L: return "L"; + case MO: return "MO"; + case DO: return "DO"; + case DI: return "DI"; + case MOD: return "MOD"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/FDI-surface"; + } + public String getDefinition() { + switch (this) { + case M: return "The surface of a tooth that is closest to the midline (middle) of the face."; + case O: return "The chewing surface of posterior teeth."; + case I: return "The biting edge of anterior teeth."; + case D: return "The surface of a tooth that faces away from the midline of the face."; + case B: return "The surface of a posterior tooth facing the cheeks."; + case V: return "The surface of a tooth facing the lips."; + case L: return "The surface of a tooth facing the tongue."; + case MO: return "The Mesioclusal surfaces of a tooth."; + case DO: return "The Distoclusal surfaces of a tooth."; + case DI: return "The Distoincisal surfaces of a tooth."; + case MOD: return "The Mesioclusodistal surfaces of a tooth."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case M: return "Mesial"; + case O: return "Occlusal"; + case I: return "Incisal"; + case D: return "Distal"; + case B: return "Buccal"; + case V: return "Ventral"; + case L: return "Lingual"; + case MO: return "Mesioclusal"; + case DO: return "Distoclusal"; + case DI: return "Distoincisal"; + case MOD: return "Mesioclusodistal"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SurfaceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SurfaceEnumFactory.java new file mode 100644 index 00000000000..f1e10538573 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SurfaceEnumFactory.java @@ -0,0 +1,98 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SurfaceEnumFactory implements EnumFactory { + + public Surface fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return Surface.M; + if ("O".equals(codeString)) + return Surface.O; + if ("I".equals(codeString)) + return Surface.I; + if ("D".equals(codeString)) + return Surface.D; + if ("B".equals(codeString)) + return Surface.B; + if ("V".equals(codeString)) + return Surface.V; + if ("L".equals(codeString)) + return Surface.L; + if ("MO".equals(codeString)) + return Surface.MO; + if ("DO".equals(codeString)) + return Surface.DO; + if ("DI".equals(codeString)) + return Surface.DI; + if ("MOD".equals(codeString)) + return Surface.MOD; + throw new IllegalArgumentException("Unknown Surface code '"+codeString+"'"); + } + + public String toCode(Surface code) { + if (code == Surface.M) + return "M"; + if (code == Surface.O) + return "O"; + if (code == Surface.I) + return "I"; + if (code == Surface.D) + return "D"; + if (code == Surface.B) + return "B"; + if (code == Surface.V) + return "V"; + if (code == Surface.L) + return "L"; + if (code == Surface.MO) + return "MO"; + if (code == Surface.DO) + return "DO"; + if (code == Surface.DI) + return "DI"; + if (code == Surface.MOD) + return "MOD"; + return "?"; + } + + public String toSystem(Surface code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SystemVersionProcessingMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SystemVersionProcessingMode.java new file mode 100644 index 00000000000..a167f42c124 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SystemVersionProcessingMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum SystemVersionProcessingMode { + + /** + * Use this version of the code system if a value set doesn't specify a version + */ + DEFAULT, + /** + * Use this version of the code system. If a value set specifies a different version, the expansion operation should fail + */ + CHECK, + /** + * Use this version of the code system irrespective of which version is specified by a value set. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If a version is override, the version used SHALL explicitly be represented in the expansion parameters + */ + OVERRIDE, + /** + * added to help the parsers + */ + NULL; + public static SystemVersionProcessingMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("default".equals(codeString)) + return DEFAULT; + if ("check".equals(codeString)) + return CHECK; + if ("override".equals(codeString)) + return OVERRIDE; + throw new FHIRException("Unknown SystemVersionProcessingMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DEFAULT: return "default"; + case CHECK: return "check"; + case OVERRIDE: return "override"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/system-version-processing-mode"; + } + public String getDefinition() { + switch (this) { + case DEFAULT: return "Use this version of the code system if a value set doesn't specify a version"; + case CHECK: return "Use this version of the code system. If a value set specifies a different version, the expansion operation should fail"; + case OVERRIDE: return "Use this version of the code system irrespective of which version is specified by a value set. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If a version is override, the version used SHALL explicitly be represented in the expansion parameters"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DEFAULT: return "Default Version"; + case CHECK: return "Check ValueSet Version"; + case OVERRIDE: return "Override ValueSet Version"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SystemVersionProcessingModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SystemVersionProcessingModeEnumFactory.java new file mode 100644 index 00000000000..31f417e7eff --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SystemVersionProcessingModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class SystemVersionProcessingModeEnumFactory implements EnumFactory { + + public SystemVersionProcessingMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("default".equals(codeString)) + return SystemVersionProcessingMode.DEFAULT; + if ("check".equals(codeString)) + return SystemVersionProcessingMode.CHECK; + if ("override".equals(codeString)) + return SystemVersionProcessingMode.OVERRIDE; + throw new IllegalArgumentException("Unknown SystemVersionProcessingMode code '"+codeString+"'"); + } + + public String toCode(SystemVersionProcessingMode code) { + if (code == SystemVersionProcessingMode.DEFAULT) + return "default"; + if (code == SystemVersionProcessingMode.CHECK) + return "check"; + if (code == SystemVersionProcessingMode.OVERRIDE) + return "override"; + return "?"; + } + + public String toSystem(SystemVersionProcessingMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskPerformerType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskPerformerType.java new file mode 100644 index 00000000000..fe2b40c5929 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskPerformerType.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TaskPerformerType { + + /** + * A workflow participant that requests services. + */ + REQUESTER, + /** + * A workflow participant that dispatches services (assigns another task to a participant). + */ + DISPATCHER, + /** + * A workflow participant that schedules (dispatches and sets the time or date for performance of) services. + */ + SCHEDULER, + /** + * A workflow participant that performs services. + */ + PERFORMER, + /** + * A workflow participant that monitors task activity. + */ + MONITOR, + /** + * A workflow participant that manages task activity. + */ + MANAGER, + /** + * A workflow participant that acquires resources (specimens, images, etc) necessary to perform the task. + */ + ACQUIRER, + /** + * A workflow participant that reviews task inputs or outputs. + */ + REVIEWER, + /** + * added to help the parsers + */ + NULL; + public static TaskPerformerType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("requester".equals(codeString)) + return REQUESTER; + if ("dispatcher".equals(codeString)) + return DISPATCHER; + if ("scheduler".equals(codeString)) + return SCHEDULER; + if ("performer".equals(codeString)) + return PERFORMER; + if ("monitor".equals(codeString)) + return MONITOR; + if ("manager".equals(codeString)) + return MANAGER; + if ("acquirer".equals(codeString)) + return ACQUIRER; + if ("reviewer".equals(codeString)) + return REVIEWER; + throw new FHIRException("Unknown TaskPerformerType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REQUESTER: return "requester"; + case DISPATCHER: return "dispatcher"; + case SCHEDULER: return "scheduler"; + case PERFORMER: return "performer"; + case MONITOR: return "monitor"; + case MANAGER: return "manager"; + case ACQUIRER: return "acquirer"; + case REVIEWER: return "reviewer"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/task-performer-type"; + } + public String getDefinition() { + switch (this) { + case REQUESTER: return "A workflow participant that requests services."; + case DISPATCHER: return "A workflow participant that dispatches services (assigns another task to a participant)."; + case SCHEDULER: return "A workflow participant that schedules (dispatches and sets the time or date for performance of) services."; + case PERFORMER: return "A workflow participant that performs services."; + case MONITOR: return "A workflow participant that monitors task activity."; + case MANAGER: return "A workflow participant that manages task activity."; + case ACQUIRER: return "A workflow participant that acquires resources (specimens, images, etc) necessary to perform the task."; + case REVIEWER: return "A workflow participant that reviews task inputs or outputs."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REQUESTER: return "Requester"; + case DISPATCHER: return "Dispatcher"; + case SCHEDULER: return "Scheduler"; + case PERFORMER: return "Performer"; + case MONITOR: return "Monitor"; + case MANAGER: return "Manager"; + case ACQUIRER: return "Acquirer"; + case REVIEWER: return "Reviewer"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskPerformerTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskPerformerTypeEnumFactory.java new file mode 100644 index 00000000000..5bd7649dab2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskPerformerTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TaskPerformerTypeEnumFactory implements EnumFactory { + + public TaskPerformerType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("requester".equals(codeString)) + return TaskPerformerType.REQUESTER; + if ("dispatcher".equals(codeString)) + return TaskPerformerType.DISPATCHER; + if ("scheduler".equals(codeString)) + return TaskPerformerType.SCHEDULER; + if ("performer".equals(codeString)) + return TaskPerformerType.PERFORMER; + if ("monitor".equals(codeString)) + return TaskPerformerType.MONITOR; + if ("manager".equals(codeString)) + return TaskPerformerType.MANAGER; + if ("acquirer".equals(codeString)) + return TaskPerformerType.ACQUIRER; + if ("reviewer".equals(codeString)) + return TaskPerformerType.REVIEWER; + throw new IllegalArgumentException("Unknown TaskPerformerType code '"+codeString+"'"); + } + + public String toCode(TaskPerformerType code) { + if (code == TaskPerformerType.REQUESTER) + return "requester"; + if (code == TaskPerformerType.DISPATCHER) + return "dispatcher"; + if (code == TaskPerformerType.SCHEDULER) + return "scheduler"; + if (code == TaskPerformerType.PERFORMER) + return "performer"; + if (code == TaskPerformerType.MONITOR) + return "monitor"; + if (code == TaskPerformerType.MANAGER) + return "manager"; + if (code == TaskPerformerType.ACQUIRER) + return "acquirer"; + if (code == TaskPerformerType.REVIEWER) + return "reviewer"; + return "?"; + } + + public String toSystem(TaskPerformerType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskStatus.java new file mode 100644 index 00000000000..1235d9b86cc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskStatus.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TaskStatus { + + /** + * The task is not yet ready to be acted upon. + */ + DRAFT, + /** + * The task is ready to be acted upon and action is sought. + */ + REQUESTED, + /** + * A potential performer has claimed ownership of the task and is evaluating whether to perform it. + */ + RECEIVED, + /** + * The potential performer has agreed to execute the task but has not yet started work. + */ + ACCEPTED, + /** + * The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action. + */ + REJECTED, + /** + * Task is ready to be performed, but no action has yet been taken. Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given. + */ + READY, + /** + * The task was not completed. + */ + CANCELLED, + /** + * Task has been started but is not yet complete. + */ + INPROGRESS, + /** + * Task has been started but work has been paused. + */ + ONHOLD, + /** + * The task was attempted but could not be completed due to some error. + */ + FAILED, + /** + * The task has been completed. + */ + COMPLETED, + /** + * The task should never have existed and is retained only because of the possibility it may have used. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static TaskStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("ready".equals(codeString)) + return READY; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("failed".equals(codeString)) + return FAILED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new FHIRException("Unknown TaskStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case ACCEPTED: return "accepted"; + case REJECTED: return "rejected"; + case READY: return "ready"; + case CANCELLED: return "cancelled"; + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case FAILED: return "failed"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/task-status"; + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The task is not yet ready to be acted upon."; + case REQUESTED: return "The task is ready to be acted upon and action is sought."; + case RECEIVED: return "A potential performer has claimed ownership of the task and is evaluating whether to perform it."; + case ACCEPTED: return "The potential performer has agreed to execute the task but has not yet started work."; + case REJECTED: return "The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action."; + case READY: return "Task is ready to be performed, but no action has yet been taken. Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given."; + case CANCELLED: return "The task was not completed."; + case INPROGRESS: return "Task has been started but is not yet complete."; + case ONHOLD: return "Task has been started but work has been paused."; + case FAILED: return "The task was attempted but could not be completed due to some error."; + case COMPLETED: return "The task has been completed."; + case ENTEREDINERROR: return "The task should never have existed and is retained only because of the possibility it may have used."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case REQUESTED: return "Requested"; + case RECEIVED: return "Received"; + case ACCEPTED: return "Accepted"; + case REJECTED: return "Rejected"; + case READY: return "Ready"; + case CANCELLED: return "Cancelled"; + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case FAILED: return "Failed"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskStatusEnumFactory.java new file mode 100644 index 00000000000..3b67d0b8cbd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TaskStatusEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TaskStatusEnumFactory implements EnumFactory { + + public TaskStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return TaskStatus.DRAFT; + if ("requested".equals(codeString)) + return TaskStatus.REQUESTED; + if ("received".equals(codeString)) + return TaskStatus.RECEIVED; + if ("accepted".equals(codeString)) + return TaskStatus.ACCEPTED; + if ("rejected".equals(codeString)) + return TaskStatus.REJECTED; + if ("ready".equals(codeString)) + return TaskStatus.READY; + if ("cancelled".equals(codeString)) + return TaskStatus.CANCELLED; + if ("in-progress".equals(codeString)) + return TaskStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return TaskStatus.ONHOLD; + if ("failed".equals(codeString)) + return TaskStatus.FAILED; + if ("completed".equals(codeString)) + return TaskStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return TaskStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown TaskStatus code '"+codeString+"'"); + } + + public String toCode(TaskStatus code) { + if (code == TaskStatus.DRAFT) + return "draft"; + if (code == TaskStatus.REQUESTED) + return "requested"; + if (code == TaskStatus.RECEIVED) + return "received"; + if (code == TaskStatus.ACCEPTED) + return "accepted"; + if (code == TaskStatus.REJECTED) + return "rejected"; + if (code == TaskStatus.READY) + return "ready"; + if (code == TaskStatus.CANCELLED) + return "cancelled"; + if (code == TaskStatus.INPROGRESS) + return "in-progress"; + if (code == TaskStatus.ONHOLD) + return "on-hold"; + if (code == TaskStatus.FAILED) + return "failed"; + if (code == TaskStatus.COMPLETED) + return "completed"; + if (code == TaskStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + + public String toSystem(TaskStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Teeth.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Teeth.java new file mode 100644 index 00000000000..6fef5172187 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Teeth.java @@ -0,0 +1,357 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Teeth { + + /** + * Upper Right Tooth 1 from the central axis, permanent dentition. + */ + _11, + /** + * Upper Right Tooth 2 from the central axis, permanent dentition. + */ + _12, + /** + * Upper Right Tooth 3 from the central axis, permanent dentition. + */ + _13, + /** + * Upper Right Tooth 4 from the central axis, permanent dentition. + */ + _14, + /** + * Upper Right Tooth 5 from the central axis, permanent dentition. + */ + _15, + /** + * Upper Right Tooth 6 from the central axis, permanent dentition. + */ + _16, + /** + * Upper Right Tooth 7 from the central axis, permanent dentition. + */ + _17, + /** + * Upper Right Tooth 8 from the central axis, permanent dentition. + */ + _18, + /** + * Upper Left Tooth 1 from the central axis, permanent dentition. + */ + _21, + /** + * Upper Left Tooth 2 from the central axis, permanent dentition. + */ + _22, + /** + * Upper Left Tooth 3 from the central axis, permanent dentition. + */ + _23, + /** + * Upper Left Tooth 4 from the central axis, permanent dentition. + */ + _24, + /** + * Upper Left Tooth 5 from the central axis, permanent dentition. + */ + _25, + /** + * Upper Left Tooth 6 from the central axis, permanent dentition. + */ + _26, + /** + * Upper Left Tooth 7 from the central axis, permanent dentition. + */ + _27, + /** + * Upper Left Tooth 8 from the central axis, permanent dentition. + */ + _28, + /** + * Lower Left Tooth 1 from the central axis, permanent dentition. + */ + _31, + /** + * Lower Left Tooth 2 from the central axis, permanent dentition. + */ + _32, + /** + * Lower Left Tooth 3 from the central axis, permanent dentition. + */ + _33, + /** + * Lower Left Tooth 4 from the central axis, permanent dentition. + */ + _34, + /** + * Lower Left Tooth 5 from the central axis, permanent dentition. + */ + _35, + /** + * Lower Left Tooth 6 from the central axis, permanent dentition. + */ + _36, + /** + * Lower Left Tooth 7 from the central axis, permanent dentition. + */ + _37, + /** + * Lower Left Tooth 8 from the central axis, permanent dentition. + */ + _38, + /** + * Lower Right Tooth 1 from the central axis, permanent dentition. + */ + _41, + /** + * Lower Right Tooth 2 from the central axis, permanent dentition. + */ + _42, + /** + * Lower Right Tooth 3 from the central axis, permanent dentition. + */ + _43, + /** + * Lower Right Tooth 4 from the central axis, permanent dentition. + */ + _44, + /** + * Lower Right Tooth 5 from the central axis, permanent dentition. + */ + _45, + /** + * Lower Right Tooth 6 from the central axis, permanent dentition. + */ + _46, + /** + * Lower Right Tooth 7 from the central axis, permanent dentition. + */ + _47, + /** + * Lower Right Tooth 8 from the central axis, permanent dentition. + */ + _48, + /** + * added to help the parsers + */ + NULL; + public static Teeth fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("31".equals(codeString)) + return _31; + if ("32".equals(codeString)) + return _32; + if ("33".equals(codeString)) + return _33; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + throw new FHIRException("Unknown Teeth code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-fdi"; + } + public String getDefinition() { + switch (this) { + case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; + case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; + case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; + case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; + case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; + case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; + case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; + case _18: return "Upper Right Tooth 8 from the central axis, permanent dentition."; + case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; + case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; + case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; + case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; + case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; + case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; + case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; + case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; + case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; + case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; + case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; + case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; + case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; + case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; + case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; + case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; + case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; + case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; + case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; + case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; + case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; + case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; + case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; + case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TeethEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TeethEnumFactory.java new file mode 100644 index 00000000000..f364cd3063f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TeethEnumFactory.java @@ -0,0 +1,182 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TeethEnumFactory implements EnumFactory { + + public Teeth fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("11".equals(codeString)) + return Teeth._11; + if ("12".equals(codeString)) + return Teeth._12; + if ("13".equals(codeString)) + return Teeth._13; + if ("14".equals(codeString)) + return Teeth._14; + if ("15".equals(codeString)) + return Teeth._15; + if ("16".equals(codeString)) + return Teeth._16; + if ("17".equals(codeString)) + return Teeth._17; + if ("18".equals(codeString)) + return Teeth._18; + if ("21".equals(codeString)) + return Teeth._21; + if ("22".equals(codeString)) + return Teeth._22; + if ("23".equals(codeString)) + return Teeth._23; + if ("24".equals(codeString)) + return Teeth._24; + if ("25".equals(codeString)) + return Teeth._25; + if ("26".equals(codeString)) + return Teeth._26; + if ("27".equals(codeString)) + return Teeth._27; + if ("28".equals(codeString)) + return Teeth._28; + if ("31".equals(codeString)) + return Teeth._31; + if ("32".equals(codeString)) + return Teeth._32; + if ("33".equals(codeString)) + return Teeth._33; + if ("34".equals(codeString)) + return Teeth._34; + if ("35".equals(codeString)) + return Teeth._35; + if ("36".equals(codeString)) + return Teeth._36; + if ("37".equals(codeString)) + return Teeth._37; + if ("38".equals(codeString)) + return Teeth._38; + if ("41".equals(codeString)) + return Teeth._41; + if ("42".equals(codeString)) + return Teeth._42; + if ("43".equals(codeString)) + return Teeth._43; + if ("44".equals(codeString)) + return Teeth._44; + if ("45".equals(codeString)) + return Teeth._45; + if ("46".equals(codeString)) + return Teeth._46; + if ("47".equals(codeString)) + return Teeth._47; + if ("48".equals(codeString)) + return Teeth._48; + throw new IllegalArgumentException("Unknown Teeth code '"+codeString+"'"); + } + + public String toCode(Teeth code) { + if (code == Teeth._11) + return "11"; + if (code == Teeth._12) + return "12"; + if (code == Teeth._13) + return "13"; + if (code == Teeth._14) + return "14"; + if (code == Teeth._15) + return "15"; + if (code == Teeth._16) + return "16"; + if (code == Teeth._17) + return "17"; + if (code == Teeth._18) + return "18"; + if (code == Teeth._21) + return "21"; + if (code == Teeth._22) + return "22"; + if (code == Teeth._23) + return "23"; + if (code == Teeth._24) + return "24"; + if (code == Teeth._25) + return "25"; + if (code == Teeth._26) + return "26"; + if (code == Teeth._27) + return "27"; + if (code == Teeth._28) + return "28"; + if (code == Teeth._31) + return "31"; + if (code == Teeth._32) + return "32"; + if (code == Teeth._33) + return "33"; + if (code == Teeth._34) + return "34"; + if (code == Teeth._35) + return "35"; + if (code == Teeth._36) + return "36"; + if (code == Teeth._37) + return "37"; + if (code == Teeth._38) + return "38"; + if (code == Teeth._41) + return "41"; + if (code == Teeth._42) + return "42"; + if (code == Teeth._43) + return "43"; + if (code == Teeth._44) + return "44"; + if (code == Teeth._45) + return "45"; + if (code == Teeth._46) + return "46"; + if (code == Teeth._47) + return "47"; + if (code == Teeth._48) + return "48"; + return "?"; + } + + public String toSystem(Teeth code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptOperationCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptOperationCodes.java new file mode 100644 index 00000000000..919553b522b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptOperationCodes.java @@ -0,0 +1,546 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TestscriptOperationCodes { + + /** + * Read the current state of the resource. + */ + READ, + /** + * Read the state of a specific version of the resource. + */ + VREAD, + /** + * Update an existing resource by its id. + */ + UPDATE, + /** + * Update an existing resource by its id (or create it if it is new). + */ + UPDATECREATE, + /** + * Delete a resource. + */ + DELETE, + /** + * Conditionally delete a single resource based on search parameters. + */ + DELETECONDSINGLE, + /** + * Conditionally delete one or more resources based on search parameters. + */ + DELETECONDMULTIPLE, + /** + * Retrieve the change history for a particular resource or resource type. + */ + HISTORY, + /** + * Create a new resource with a server assigned id. + */ + CREATE, + /** + * Search based on some filter criteria. + */ + SEARCH, + /** + * Update, create or delete a set of resources as independent actions. + */ + BATCH, + /** + * Update, create or delete a set of resources as a single transaction. + */ + TRANSACTION, + /** + * Get a capability statement for the system. + */ + CAPABILITIES, + /** + * Realize a definition in a specific context + */ + APPLY, + /** + * Cancel Task + */ + CANCEL, + /** + * Closure Table Maintenance + */ + CLOSURE, + /** + * Code Composition based on supplied properties + */ + COMPOSE, + /** + * Test if a server implements a client's required operations + */ + CONFORMS, + /** + * Aggregates and return the parameters and data requirements as a single module definition library + */ + DATAREQUIREMENTS, + /** + * Generate a Document + */ + DOCUMENT, + /** + * Evaluate DecisionSupportRule / DecisionSupportServiceModule + */ + EVALUATE, + /** + * Evaluate Measure + */ + EVALUATEMEASURE, + /** + * Fetch Encounter/Patient Record + */ + EVERYTHING, + /** + * Value Set Expansion + */ + EXPAND, + /** + * Fail Task + */ + FAIL, + /** + * Find a functional list + */ + FIND, + /** + * Finish Task + */ + FINISH, + /** + * Test if a server implements a client's required operations + */ + IMPLEMENTS, + /** + * Concept Look Up + */ + LOOKUP, + /** + * Find patient matches using MPI based logic + */ + MATCH, + /** + * Access a list of profiles, tags, and security labels + */ + META, + /** + * Add profiles, tags, and security labels to a resource + */ + METAADD, + /** + * Delete profiles, tags, and security labels for a resource + */ + METADELETE, + /** + * Populate Questionnaire + */ + POPULATE, + /** + * Generate HTML for Questionnaire + */ + POPULATEHTML, + /** + * Generate a link to a Questionnaire completion webpage + */ + POPULATELINK, + /** + * Process Message + */ + PROCESSMESSAGE, + /** + * Build Questionnaire + */ + QUESTIONNAIRE, + /** + * Release Task + */ + RELEASE, + /** + * Reserve Task + */ + RESERVE, + /** + * Resume Task + */ + RESUME, + /** + * Set Task Input + */ + SETINPUT, + /** + * Set Task Output + */ + SETOUTPUT, + /** + * Start Task + */ + START, + /** + * Observation Statistics + */ + STATS, + /** + * Stop Task + */ + STOP, + /** + * Fetch a subset of the CapabilityStatement resource + */ + SUBSET, + /** + * Determine if code A is subsumed by code B + */ + SUBSUMES, + /** + * Suspend Task + */ + SUSPEND, + /** + * Model Instance Transformation + */ + TRANSFORM, + /** + * Concept Translation + */ + TRANSLATE, + /** + * Validate a resource + */ + VALIDATE, + /** + * Value Set based Validation + */ + VALIDATECODE, + /** + * added to help the parsers + */ + NULL; + public static TestscriptOperationCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return READ; + if ("vread".equals(codeString)) + return VREAD; + if ("update".equals(codeString)) + return UPDATE; + if ("updateCreate".equals(codeString)) + return UPDATECREATE; + if ("delete".equals(codeString)) + return DELETE; + if ("deleteCondSingle".equals(codeString)) + return DELETECONDSINGLE; + if ("deleteCondMultiple".equals(codeString)) + return DELETECONDMULTIPLE; + if ("history".equals(codeString)) + return HISTORY; + if ("create".equals(codeString)) + return CREATE; + if ("search".equals(codeString)) + return SEARCH; + if ("batch".equals(codeString)) + return BATCH; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("capabilities".equals(codeString)) + return CAPABILITIES; + if ("apply".equals(codeString)) + return APPLY; + if ("cancel".equals(codeString)) + return CANCEL; + if ("closure".equals(codeString)) + return CLOSURE; + if ("compose".equals(codeString)) + return COMPOSE; + if ("conforms".equals(codeString)) + return CONFORMS; + if ("data-requirements".equals(codeString)) + return DATAREQUIREMENTS; + if ("document".equals(codeString)) + return DOCUMENT; + if ("evaluate".equals(codeString)) + return EVALUATE; + if ("evaluate-measure".equals(codeString)) + return EVALUATEMEASURE; + if ("everything".equals(codeString)) + return EVERYTHING; + if ("expand".equals(codeString)) + return EXPAND; + if ("fail".equals(codeString)) + return FAIL; + if ("find".equals(codeString)) + return FIND; + if ("finish".equals(codeString)) + return FINISH; + if ("implements".equals(codeString)) + return IMPLEMENTS; + if ("lookup".equals(codeString)) + return LOOKUP; + if ("match".equals(codeString)) + return MATCH; + if ("meta".equals(codeString)) + return META; + if ("meta-add".equals(codeString)) + return METAADD; + if ("meta-delete".equals(codeString)) + return METADELETE; + if ("populate".equals(codeString)) + return POPULATE; + if ("populatehtml".equals(codeString)) + return POPULATEHTML; + if ("populatelink".equals(codeString)) + return POPULATELINK; + if ("process-message".equals(codeString)) + return PROCESSMESSAGE; + if ("questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("release".equals(codeString)) + return RELEASE; + if ("reserve".equals(codeString)) + return RESERVE; + if ("resume".equals(codeString)) + return RESUME; + if ("set-input".equals(codeString)) + return SETINPUT; + if ("set-output".equals(codeString)) + return SETOUTPUT; + if ("start".equals(codeString)) + return START; + if ("stats".equals(codeString)) + return STATS; + if ("stop".equals(codeString)) + return STOP; + if ("subset".equals(codeString)) + return SUBSET; + if ("subsumes".equals(codeString)) + return SUBSUMES; + if ("suspend".equals(codeString)) + return SUSPEND; + if ("transform".equals(codeString)) + return TRANSFORM; + if ("translate".equals(codeString)) + return TRANSLATE; + if ("validate".equals(codeString)) + return VALIDATE; + if ("validate-code".equals(codeString)) + return VALIDATECODE; + throw new FHIRException("Unknown TestscriptOperationCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case READ: return "read"; + case VREAD: return "vread"; + case UPDATE: return "update"; + case UPDATECREATE: return "updateCreate"; + case DELETE: return "delete"; + case DELETECONDSINGLE: return "deleteCondSingle"; + case DELETECONDMULTIPLE: return "deleteCondMultiple"; + case HISTORY: return "history"; + case CREATE: return "create"; + case SEARCH: return "search"; + case BATCH: return "batch"; + case TRANSACTION: return "transaction"; + case CAPABILITIES: return "capabilities"; + case APPLY: return "apply"; + case CANCEL: return "cancel"; + case CLOSURE: return "closure"; + case COMPOSE: return "compose"; + case CONFORMS: return "conforms"; + case DATAREQUIREMENTS: return "data-requirements"; + case DOCUMENT: return "document"; + case EVALUATE: return "evaluate"; + case EVALUATEMEASURE: return "evaluate-measure"; + case EVERYTHING: return "everything"; + case EXPAND: return "expand"; + case FAIL: return "fail"; + case FIND: return "find"; + case FINISH: return "finish"; + case IMPLEMENTS: return "implements"; + case LOOKUP: return "lookup"; + case MATCH: return "match"; + case META: return "meta"; + case METAADD: return "meta-add"; + case METADELETE: return "meta-delete"; + case POPULATE: return "populate"; + case POPULATEHTML: return "populatehtml"; + case POPULATELINK: return "populatelink"; + case PROCESSMESSAGE: return "process-message"; + case QUESTIONNAIRE: return "questionnaire"; + case RELEASE: return "release"; + case RESERVE: return "reserve"; + case RESUME: return "resume"; + case SETINPUT: return "set-input"; + case SETOUTPUT: return "set-output"; + case START: return "start"; + case STATS: return "stats"; + case STOP: return "stop"; + case SUBSET: return "subset"; + case SUBSUMES: return "subsumes"; + case SUSPEND: return "suspend"; + case TRANSFORM: return "transform"; + case TRANSLATE: return "translate"; + case VALIDATE: return "validate"; + case VALIDATECODE: return "validate-code"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/testscript-operation-codes"; + } + public String getDefinition() { + switch (this) { + case READ: return "Read the current state of the resource."; + case VREAD: return "Read the state of a specific version of the resource."; + case UPDATE: return "Update an existing resource by its id."; + case UPDATECREATE: return "Update an existing resource by its id (or create it if it is new)."; + case DELETE: return "Delete a resource."; + case DELETECONDSINGLE: return "Conditionally delete a single resource based on search parameters."; + case DELETECONDMULTIPLE: return "Conditionally delete one or more resources based on search parameters."; + case HISTORY: return "Retrieve the change history for a particular resource or resource type."; + case CREATE: return "Create a new resource with a server assigned id."; + case SEARCH: return "Search based on some filter criteria."; + case BATCH: return "Update, create or delete a set of resources as independent actions."; + case TRANSACTION: return "Update, create or delete a set of resources as a single transaction."; + case CAPABILITIES: return "Get a capability statement for the system."; + case APPLY: return "Realize a definition in a specific context"; + case CANCEL: return "Cancel Task"; + case CLOSURE: return "Closure Table Maintenance"; + case COMPOSE: return "Code Composition based on supplied properties"; + case CONFORMS: return "Test if a server implements a client's required operations"; + case DATAREQUIREMENTS: return "Aggregates and return the parameters and data requirements as a single module definition library"; + case DOCUMENT: return "Generate a Document"; + case EVALUATE: return "Evaluate DecisionSupportRule / DecisionSupportServiceModule"; + case EVALUATEMEASURE: return "Evaluate Measure"; + case EVERYTHING: return "Fetch Encounter/Patient Record"; + case EXPAND: return "Value Set Expansion"; + case FAIL: return "Fail Task"; + case FIND: return "Find a functional list"; + case FINISH: return "Finish Task"; + case IMPLEMENTS: return "Test if a server implements a client's required operations"; + case LOOKUP: return "Concept Look Up"; + case MATCH: return "Find patient matches using MPI based logic"; + case META: return "Access a list of profiles, tags, and security labels"; + case METAADD: return "Add profiles, tags, and security labels to a resource"; + case METADELETE: return "Delete profiles, tags, and security labels for a resource"; + case POPULATE: return "Populate Questionnaire"; + case POPULATEHTML: return "Generate HTML for Questionnaire"; + case POPULATELINK: return "Generate a link to a Questionnaire completion webpage"; + case PROCESSMESSAGE: return "Process Message"; + case QUESTIONNAIRE: return "Build Questionnaire"; + case RELEASE: return "Release Task"; + case RESERVE: return "Reserve Task"; + case RESUME: return "Resume Task"; + case SETINPUT: return "Set Task Input"; + case SETOUTPUT: return "Set Task Output"; + case START: return "Start Task"; + case STATS: return "Observation Statistics"; + case STOP: return "Stop Task"; + case SUBSET: return "Fetch a subset of the CapabilityStatement resource"; + case SUBSUMES: return "Determine if code A is subsumed by code B"; + case SUSPEND: return "Suspend Task"; + case TRANSFORM: return "Model Instance Transformation"; + case TRANSLATE: return "Concept Translation"; + case VALIDATE: return "Validate a resource"; + case VALIDATECODE: return "Value Set based Validation"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case READ: return "Read"; + case VREAD: return "Version Read"; + case UPDATE: return "Update"; + case UPDATECREATE: return "Create using Update"; + case DELETE: return "Delete"; + case DELETECONDSINGLE: return "Conditional Delete Single"; + case DELETECONDMULTIPLE: return "Conditional Delete Multiple"; + case HISTORY: return "History"; + case CREATE: return "Create"; + case SEARCH: return "Search"; + case BATCH: return "Batch"; + case TRANSACTION: return "Transaction"; + case CAPABILITIES: return "Capabilities"; + case APPLY: return "$apply"; + case CANCEL: return "$cancel"; + case CLOSURE: return "$closure"; + case COMPOSE: return "$compose"; + case CONFORMS: return "$conforms"; + case DATAREQUIREMENTS: return "$data-requirements"; + case DOCUMENT: return "$document"; + case EVALUATE: return "$evaluate"; + case EVALUATEMEASURE: return "$evaluate-measure"; + case EVERYTHING: return "$everything"; + case EXPAND: return "$expand"; + case FAIL: return "$fail"; + case FIND: return "$find"; + case FINISH: return "$finish"; + case IMPLEMENTS: return "$implements"; + case LOOKUP: return "$lookup"; + case MATCH: return "$match"; + case META: return "$meta"; + case METAADD: return "$meta-add"; + case METADELETE: return "$meta-delete"; + case POPULATE: return "$populate"; + case POPULATEHTML: return "$populatehtml"; + case POPULATELINK: return "$populatelink"; + case PROCESSMESSAGE: return "$process-message"; + case QUESTIONNAIRE: return "$questionnaire"; + case RELEASE: return "$release"; + case RESERVE: return "$reserve"; + case RESUME: return "$resume"; + case SETINPUT: return "$set-input"; + case SETOUTPUT: return "$set-output"; + case START: return "$start"; + case STATS: return "$stats"; + case STOP: return "$stop"; + case SUBSET: return "$subset"; + case SUBSUMES: return "$subsumes"; + case SUSPEND: return "$suspend"; + case TRANSFORM: return "$transform"; + case TRANSLATE: return "$translate"; + case VALIDATE: return "$validate"; + case VALIDATECODE: return "$validate-code"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptOperationCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptOperationCodesEnumFactory.java new file mode 100644 index 00000000000..0824ee2ad16 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptOperationCodesEnumFactory.java @@ -0,0 +1,266 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TestscriptOperationCodesEnumFactory implements EnumFactory { + + public TestscriptOperationCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("read".equals(codeString)) + return TestscriptOperationCodes.READ; + if ("vread".equals(codeString)) + return TestscriptOperationCodes.VREAD; + if ("update".equals(codeString)) + return TestscriptOperationCodes.UPDATE; + if ("updateCreate".equals(codeString)) + return TestscriptOperationCodes.UPDATECREATE; + if ("delete".equals(codeString)) + return TestscriptOperationCodes.DELETE; + if ("deleteCondSingle".equals(codeString)) + return TestscriptOperationCodes.DELETECONDSINGLE; + if ("deleteCondMultiple".equals(codeString)) + return TestscriptOperationCodes.DELETECONDMULTIPLE; + if ("history".equals(codeString)) + return TestscriptOperationCodes.HISTORY; + if ("create".equals(codeString)) + return TestscriptOperationCodes.CREATE; + if ("search".equals(codeString)) + return TestscriptOperationCodes.SEARCH; + if ("batch".equals(codeString)) + return TestscriptOperationCodes.BATCH; + if ("transaction".equals(codeString)) + return TestscriptOperationCodes.TRANSACTION; + if ("capabilities".equals(codeString)) + return TestscriptOperationCodes.CAPABILITIES; + if ("apply".equals(codeString)) + return TestscriptOperationCodes.APPLY; + if ("cancel".equals(codeString)) + return TestscriptOperationCodes.CANCEL; + if ("closure".equals(codeString)) + return TestscriptOperationCodes.CLOSURE; + if ("compose".equals(codeString)) + return TestscriptOperationCodes.COMPOSE; + if ("conforms".equals(codeString)) + return TestscriptOperationCodes.CONFORMS; + if ("data-requirements".equals(codeString)) + return TestscriptOperationCodes.DATAREQUIREMENTS; + if ("document".equals(codeString)) + return TestscriptOperationCodes.DOCUMENT; + if ("evaluate".equals(codeString)) + return TestscriptOperationCodes.EVALUATE; + if ("evaluate-measure".equals(codeString)) + return TestscriptOperationCodes.EVALUATEMEASURE; + if ("everything".equals(codeString)) + return TestscriptOperationCodes.EVERYTHING; + if ("expand".equals(codeString)) + return TestscriptOperationCodes.EXPAND; + if ("fail".equals(codeString)) + return TestscriptOperationCodes.FAIL; + if ("find".equals(codeString)) + return TestscriptOperationCodes.FIND; + if ("finish".equals(codeString)) + return TestscriptOperationCodes.FINISH; + if ("implements".equals(codeString)) + return TestscriptOperationCodes.IMPLEMENTS; + if ("lookup".equals(codeString)) + return TestscriptOperationCodes.LOOKUP; + if ("match".equals(codeString)) + return TestscriptOperationCodes.MATCH; + if ("meta".equals(codeString)) + return TestscriptOperationCodes.META; + if ("meta-add".equals(codeString)) + return TestscriptOperationCodes.METAADD; + if ("meta-delete".equals(codeString)) + return TestscriptOperationCodes.METADELETE; + if ("populate".equals(codeString)) + return TestscriptOperationCodes.POPULATE; + if ("populatehtml".equals(codeString)) + return TestscriptOperationCodes.POPULATEHTML; + if ("populatelink".equals(codeString)) + return TestscriptOperationCodes.POPULATELINK; + if ("process-message".equals(codeString)) + return TestscriptOperationCodes.PROCESSMESSAGE; + if ("questionnaire".equals(codeString)) + return TestscriptOperationCodes.QUESTIONNAIRE; + if ("release".equals(codeString)) + return TestscriptOperationCodes.RELEASE; + if ("reserve".equals(codeString)) + return TestscriptOperationCodes.RESERVE; + if ("resume".equals(codeString)) + return TestscriptOperationCodes.RESUME; + if ("set-input".equals(codeString)) + return TestscriptOperationCodes.SETINPUT; + if ("set-output".equals(codeString)) + return TestscriptOperationCodes.SETOUTPUT; + if ("start".equals(codeString)) + return TestscriptOperationCodes.START; + if ("stats".equals(codeString)) + return TestscriptOperationCodes.STATS; + if ("stop".equals(codeString)) + return TestscriptOperationCodes.STOP; + if ("subset".equals(codeString)) + return TestscriptOperationCodes.SUBSET; + if ("subsumes".equals(codeString)) + return TestscriptOperationCodes.SUBSUMES; + if ("suspend".equals(codeString)) + return TestscriptOperationCodes.SUSPEND; + if ("transform".equals(codeString)) + return TestscriptOperationCodes.TRANSFORM; + if ("translate".equals(codeString)) + return TestscriptOperationCodes.TRANSLATE; + if ("validate".equals(codeString)) + return TestscriptOperationCodes.VALIDATE; + if ("validate-code".equals(codeString)) + return TestscriptOperationCodes.VALIDATECODE; + throw new IllegalArgumentException("Unknown TestscriptOperationCodes code '"+codeString+"'"); + } + + public String toCode(TestscriptOperationCodes code) { + if (code == TestscriptOperationCodes.READ) + return "read"; + if (code == TestscriptOperationCodes.VREAD) + return "vread"; + if (code == TestscriptOperationCodes.UPDATE) + return "update"; + if (code == TestscriptOperationCodes.UPDATECREATE) + return "updateCreate"; + if (code == TestscriptOperationCodes.DELETE) + return "delete"; + if (code == TestscriptOperationCodes.DELETECONDSINGLE) + return "deleteCondSingle"; + if (code == TestscriptOperationCodes.DELETECONDMULTIPLE) + return "deleteCondMultiple"; + if (code == TestscriptOperationCodes.HISTORY) + return "history"; + if (code == TestscriptOperationCodes.CREATE) + return "create"; + if (code == TestscriptOperationCodes.SEARCH) + return "search"; + if (code == TestscriptOperationCodes.BATCH) + return "batch"; + if (code == TestscriptOperationCodes.TRANSACTION) + return "transaction"; + if (code == TestscriptOperationCodes.CAPABILITIES) + return "capabilities"; + if (code == TestscriptOperationCodes.APPLY) + return "apply"; + if (code == TestscriptOperationCodes.CANCEL) + return "cancel"; + if (code == TestscriptOperationCodes.CLOSURE) + return "closure"; + if (code == TestscriptOperationCodes.COMPOSE) + return "compose"; + if (code == TestscriptOperationCodes.CONFORMS) + return "conforms"; + if (code == TestscriptOperationCodes.DATAREQUIREMENTS) + return "data-requirements"; + if (code == TestscriptOperationCodes.DOCUMENT) + return "document"; + if (code == TestscriptOperationCodes.EVALUATE) + return "evaluate"; + if (code == TestscriptOperationCodes.EVALUATEMEASURE) + return "evaluate-measure"; + if (code == TestscriptOperationCodes.EVERYTHING) + return "everything"; + if (code == TestscriptOperationCodes.EXPAND) + return "expand"; + if (code == TestscriptOperationCodes.FAIL) + return "fail"; + if (code == TestscriptOperationCodes.FIND) + return "find"; + if (code == TestscriptOperationCodes.FINISH) + return "finish"; + if (code == TestscriptOperationCodes.IMPLEMENTS) + return "implements"; + if (code == TestscriptOperationCodes.LOOKUP) + return "lookup"; + if (code == TestscriptOperationCodes.MATCH) + return "match"; + if (code == TestscriptOperationCodes.META) + return "meta"; + if (code == TestscriptOperationCodes.METAADD) + return "meta-add"; + if (code == TestscriptOperationCodes.METADELETE) + return "meta-delete"; + if (code == TestscriptOperationCodes.POPULATE) + return "populate"; + if (code == TestscriptOperationCodes.POPULATEHTML) + return "populatehtml"; + if (code == TestscriptOperationCodes.POPULATELINK) + return "populatelink"; + if (code == TestscriptOperationCodes.PROCESSMESSAGE) + return "process-message"; + if (code == TestscriptOperationCodes.QUESTIONNAIRE) + return "questionnaire"; + if (code == TestscriptOperationCodes.RELEASE) + return "release"; + if (code == TestscriptOperationCodes.RESERVE) + return "reserve"; + if (code == TestscriptOperationCodes.RESUME) + return "resume"; + if (code == TestscriptOperationCodes.SETINPUT) + return "set-input"; + if (code == TestscriptOperationCodes.SETOUTPUT) + return "set-output"; + if (code == TestscriptOperationCodes.START) + return "start"; + if (code == TestscriptOperationCodes.STATS) + return "stats"; + if (code == TestscriptOperationCodes.STOP) + return "stop"; + if (code == TestscriptOperationCodes.SUBSET) + return "subset"; + if (code == TestscriptOperationCodes.SUBSUMES) + return "subsumes"; + if (code == TestscriptOperationCodes.SUSPEND) + return "suspend"; + if (code == TestscriptOperationCodes.TRANSFORM) + return "transform"; + if (code == TestscriptOperationCodes.TRANSLATE) + return "translate"; + if (code == TestscriptOperationCodes.VALIDATE) + return "validate"; + if (code == TestscriptOperationCodes.VALIDATECODE) + return "validate-code"; + return "?"; + } + + public String toSystem(TestscriptOperationCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileDestinationTypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileDestinationTypes.java new file mode 100644 index 00000000000..1684221dae0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileDestinationTypes.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TestscriptProfileDestinationTypes { + + /** + * General FHIR server used to respond to operations sent from a FHIR client. + */ + FHIRSERVER, + /** + * A FHIR server acting as a Structured Data Capture Form Manager. + */ + FHIRSDCFORMMANAGER, + /** + * A FHIR server acting as a Structured Data Capture Form Processor. + */ + FHIRSDCFORMPROCESSOR, + /** + * A FHIR server acting as a Structured Data Capture Form Receiver. + */ + FHIRSDCFORMRECEIVER, + /** + * added to help the parsers + */ + NULL; + public static TestscriptProfileDestinationTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-Server".equals(codeString)) + return FHIRSERVER; + if ("FHIR-SDC-FormManager".equals(codeString)) + return FHIRSDCFORMMANAGER; + if ("FHIR-SDC-FormProcessor".equals(codeString)) + return FHIRSDCFORMPROCESSOR; + if ("FHIR-SDC-FormReceiver".equals(codeString)) + return FHIRSDCFORMRECEIVER; + throw new FHIRException("Unknown TestscriptProfileDestinationTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FHIRSERVER: return "FHIR-Server"; + case FHIRSDCFORMMANAGER: return "FHIR-SDC-FormManager"; + case FHIRSDCFORMPROCESSOR: return "FHIR-SDC-FormProcessor"; + case FHIRSDCFORMRECEIVER: return "FHIR-SDC-FormReceiver"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/testscript-profile-destination-types"; + } + public String getDefinition() { + switch (this) { + case FHIRSERVER: return "General FHIR server used to respond to operations sent from a FHIR client."; + case FHIRSDCFORMMANAGER: return "A FHIR server acting as a Structured Data Capture Form Manager."; + case FHIRSDCFORMPROCESSOR: return "A FHIR server acting as a Structured Data Capture Form Processor."; + case FHIRSDCFORMRECEIVER: return "A FHIR server acting as a Structured Data Capture Form Receiver."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FHIRSERVER: return "FHIR Server"; + case FHIRSDCFORMMANAGER: return "FHIR SDC FormManager"; + case FHIRSDCFORMPROCESSOR: return "FHIR SDC FormProcessor"; + case FHIRSDCFORMRECEIVER: return "FHIR SDC FormReceiver"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileDestinationTypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileDestinationTypesEnumFactory.java new file mode 100644 index 00000000000..bd46cf72b47 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileDestinationTypesEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TestscriptProfileDestinationTypesEnumFactory implements EnumFactory { + + public TestscriptProfileDestinationTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-Server".equals(codeString)) + return TestscriptProfileDestinationTypes.FHIRSERVER; + if ("FHIR-SDC-FormManager".equals(codeString)) + return TestscriptProfileDestinationTypes.FHIRSDCFORMMANAGER; + if ("FHIR-SDC-FormProcessor".equals(codeString)) + return TestscriptProfileDestinationTypes.FHIRSDCFORMPROCESSOR; + if ("FHIR-SDC-FormReceiver".equals(codeString)) + return TestscriptProfileDestinationTypes.FHIRSDCFORMRECEIVER; + throw new IllegalArgumentException("Unknown TestscriptProfileDestinationTypes code '"+codeString+"'"); + } + + public String toCode(TestscriptProfileDestinationTypes code) { + if (code == TestscriptProfileDestinationTypes.FHIRSERVER) + return "FHIR-Server"; + if (code == TestscriptProfileDestinationTypes.FHIRSDCFORMMANAGER) + return "FHIR-SDC-FormManager"; + if (code == TestscriptProfileDestinationTypes.FHIRSDCFORMPROCESSOR) + return "FHIR-SDC-FormProcessor"; + if (code == TestscriptProfileDestinationTypes.FHIRSDCFORMRECEIVER) + return "FHIR-SDC-FormReceiver"; + return "?"; + } + + public String toSystem(TestscriptProfileDestinationTypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileOriginTypes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileOriginTypes.java new file mode 100644 index 00000000000..22604da065d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileOriginTypes.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TestscriptProfileOriginTypes { + + /** + * General FHIR client used to initiate operations against a FHIR server. + */ + FHIRCLIENT, + /** + * A FHIR client acting as a Structured Data Capture Form Filler. + */ + FHIRSDCFORMFILLER, + /** + * added to help the parsers + */ + NULL; + public static TestscriptProfileOriginTypes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-Client".equals(codeString)) + return FHIRCLIENT; + if ("FHIR-SDC-FormFiller".equals(codeString)) + return FHIRSDCFORMFILLER; + throw new FHIRException("Unknown TestscriptProfileOriginTypes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FHIRCLIENT: return "FHIR-Client"; + case FHIRSDCFORMFILLER: return "FHIR-SDC-FormFiller"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/testscript-profile-origin-types"; + } + public String getDefinition() { + switch (this) { + case FHIRCLIENT: return "General FHIR client used to initiate operations against a FHIR server."; + case FHIRSDCFORMFILLER: return "A FHIR client acting as a Structured Data Capture Form Filler."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FHIRCLIENT: return "FHIR Client"; + case FHIRSDCFORMFILLER: return "FHIR SDC FormFiller"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileOriginTypesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileOriginTypesEnumFactory.java new file mode 100644 index 00000000000..2b6977129e6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TestscriptProfileOriginTypesEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TestscriptProfileOriginTypesEnumFactory implements EnumFactory { + + public TestscriptProfileOriginTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FHIR-Client".equals(codeString)) + return TestscriptProfileOriginTypes.FHIRCLIENT; + if ("FHIR-SDC-FormFiller".equals(codeString)) + return TestscriptProfileOriginTypes.FHIRSDCFORMFILLER; + throw new IllegalArgumentException("Unknown TestscriptProfileOriginTypes code '"+codeString+"'"); + } + + public String toCode(TestscriptProfileOriginTypes code) { + if (code == TestscriptProfileOriginTypes.FHIRCLIENT) + return "FHIR-Client"; + if (code == TestscriptProfileOriginTypes.FHIRSDCFORMFILLER) + return "FHIR-SDC-FormFiller"; + return "?"; + } + + public String toSystem(TestscriptProfileOriginTypes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Tooth.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Tooth.java new file mode 100644 index 00000000000..3005c27ff39 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Tooth.java @@ -0,0 +1,438 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Tooth { + + /** + * Oral cavity. + */ + _0, + /** + * Permanent teeth Maxillary right. + */ + _1, + /** + * Permanent teeth Maxillary left. + */ + _2, + /** + * Permanent teeth Mandibular right. + */ + _3, + /** + * Permanent teeth Mandibular left. + */ + _4, + /** + * Deciduous teeth Maxillary right. + */ + _5, + /** + * Deciduous teeth Maxillary left. + */ + _6, + /** + * Deciduous teeth Mandibular right. + */ + _7, + /** + * Deciduous teeth Mandibular left. + */ + _8, + /** + * Upper Right Tooth 1 from the central axis, permanent dentition. + */ + _11, + /** + * Upper Right Tooth 2 from the central axis, permanent dentition. + */ + _12, + /** + * Upper Right Tooth 3 from the central axis, permanent dentition. + */ + _13, + /** + * Upper Right Tooth 4 from the central axis, permanent dentition. + */ + _14, + /** + * Upper Right Tooth 5 from the central axis, permanent dentition. + */ + _15, + /** + * Upper Right Tooth 6 from the central axis, permanent dentition. + */ + _16, + /** + * Upper Right Tooth 7 from the central axis, permanent dentition. + */ + _17, + /** + * Upper Right Tooth 8 from the central axis, permanent dentition. + */ + _18, + /** + * Upper Left Tooth 1 from the central axis, permanent dentition. + */ + _21, + /** + * Upper Left Tooth 2 from the central axis, permanent dentition. + */ + _22, + /** + * Upper Left Tooth 3 from the central axis, permanent dentition. + */ + _23, + /** + * Upper Left Tooth 4 from the central axis, permanent dentition. + */ + _24, + /** + * Upper Left Tooth 5 from the central axis, permanent dentition. + */ + _25, + /** + * Upper Left Tooth 6 from the central axis, permanent dentition. + */ + _26, + /** + * Upper Left Tooth 7 from the central axis, permanent dentition. + */ + _27, + /** + * Upper Left Tooth 8 from the central axis, permanent dentition. + */ + _28, + /** + * Lower Left Tooth 1 from the central axis, permanent dentition. + */ + _31, + /** + * Lower Left Tooth 2 from the central axis, permanent dentition. + */ + _32, + /** + * Lower Left Tooth 3 from the central axis, permanent dentition. + */ + _33, + /** + * Lower Left Tooth 4 from the central axis, permanent dentition. + */ + _34, + /** + * Lower Left Tooth 5 from the central axis, permanent dentition. + */ + _35, + /** + * Lower Left Tooth 6 from the central axis, permanent dentition. + */ + _36, + /** + * Lower Left Tooth 7 from the central axis, permanent dentition. + */ + _37, + /** + * Lower Left Tooth 8 from the central axis, permanent dentition. + */ + _38, + /** + * Lower Right Tooth 1 from the central axis, permanent dentition. + */ + _41, + /** + * Lower Right Tooth 2 from the central axis, permanent dentition. + */ + _42, + /** + * Lower Right Tooth 3 from the central axis, permanent dentition. + */ + _43, + /** + * Lower Right Tooth 4 from the central axis, permanent dentition. + */ + _44, + /** + * Lower Right Tooth 5 from the central axis, permanent dentition. + */ + _45, + /** + * Lower Right Tooth 6 from the central axis, permanent dentition. + */ + _46, + /** + * Lower Right Tooth 7 from the central axis, permanent dentition. + */ + _47, + /** + * Lower Right Tooth 8 from the central axis, permanent dentition. + */ + _48, + /** + * added to help the parsers + */ + NULL; + public static Tooth fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return _0; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("8".equals(codeString)) + return _8; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("21".equals(codeString)) + return _21; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("24".equals(codeString)) + return _24; + if ("25".equals(codeString)) + return _25; + if ("26".equals(codeString)) + return _26; + if ("27".equals(codeString)) + return _27; + if ("28".equals(codeString)) + return _28; + if ("31".equals(codeString)) + return _31; + if ("32".equals(codeString)) + return _32; + if ("33".equals(codeString)) + return _33; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + throw new FHIRException("Unknown Tooth code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _0: return "0"; + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-tooth"; + } + public String getDefinition() { + switch (this) { + case _0: return "Oral cavity."; + case _1: return "Permanent teeth Maxillary right."; + case _2: return "Permanent teeth Maxillary left."; + case _3: return "Permanent teeth Mandibular right."; + case _4: return "Permanent teeth Mandibular left."; + case _5: return "Deciduous teeth Maxillary right."; + case _6: return "Deciduous teeth Maxillary left."; + case _7: return "Deciduous teeth Mandibular right."; + case _8: return "Deciduous teeth Mandibular left."; + case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; + case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; + case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; + case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; + case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; + case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; + case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; + case _18: return "Upper Right Tooth 8 from the central axis, permanent dentition."; + case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; + case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; + case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; + case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; + case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; + case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; + case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; + case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; + case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; + case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; + case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; + case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; + case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; + case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; + case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; + case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; + case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; + case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; + case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; + case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; + case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; + case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; + case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; + case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _0: return "Oral cavity"; + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _8: return "8"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _21: return "21"; + case _22: return "22"; + case _23: return "23"; + case _24: return "24"; + case _25: return "25"; + case _26: return "26"; + case _27: return "27"; + case _28: return "28"; + case _31: return "31"; + case _32: return "32"; + case _33: return "33"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ToothEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ToothEnumFactory.java new file mode 100644 index 00000000000..23e546eeef3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ToothEnumFactory.java @@ -0,0 +1,218 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class ToothEnumFactory implements EnumFactory { + + public Tooth fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("0".equals(codeString)) + return Tooth._0; + if ("1".equals(codeString)) + return Tooth._1; + if ("2".equals(codeString)) + return Tooth._2; + if ("3".equals(codeString)) + return Tooth._3; + if ("4".equals(codeString)) + return Tooth._4; + if ("5".equals(codeString)) + return Tooth._5; + if ("6".equals(codeString)) + return Tooth._6; + if ("7".equals(codeString)) + return Tooth._7; + if ("8".equals(codeString)) + return Tooth._8; + if ("11".equals(codeString)) + return Tooth._11; + if ("12".equals(codeString)) + return Tooth._12; + if ("13".equals(codeString)) + return Tooth._13; + if ("14".equals(codeString)) + return Tooth._14; + if ("15".equals(codeString)) + return Tooth._15; + if ("16".equals(codeString)) + return Tooth._16; + if ("17".equals(codeString)) + return Tooth._17; + if ("18".equals(codeString)) + return Tooth._18; + if ("21".equals(codeString)) + return Tooth._21; + if ("22".equals(codeString)) + return Tooth._22; + if ("23".equals(codeString)) + return Tooth._23; + if ("24".equals(codeString)) + return Tooth._24; + if ("25".equals(codeString)) + return Tooth._25; + if ("26".equals(codeString)) + return Tooth._26; + if ("27".equals(codeString)) + return Tooth._27; + if ("28".equals(codeString)) + return Tooth._28; + if ("31".equals(codeString)) + return Tooth._31; + if ("32".equals(codeString)) + return Tooth._32; + if ("33".equals(codeString)) + return Tooth._33; + if ("34".equals(codeString)) + return Tooth._34; + if ("35".equals(codeString)) + return Tooth._35; + if ("36".equals(codeString)) + return Tooth._36; + if ("37".equals(codeString)) + return Tooth._37; + if ("38".equals(codeString)) + return Tooth._38; + if ("41".equals(codeString)) + return Tooth._41; + if ("42".equals(codeString)) + return Tooth._42; + if ("43".equals(codeString)) + return Tooth._43; + if ("44".equals(codeString)) + return Tooth._44; + if ("45".equals(codeString)) + return Tooth._45; + if ("46".equals(codeString)) + return Tooth._46; + if ("47".equals(codeString)) + return Tooth._47; + if ("48".equals(codeString)) + return Tooth._48; + throw new IllegalArgumentException("Unknown Tooth code '"+codeString+"'"); + } + + public String toCode(Tooth code) { + if (code == Tooth._0) + return "0"; + if (code == Tooth._1) + return "1"; + if (code == Tooth._2) + return "2"; + if (code == Tooth._3) + return "3"; + if (code == Tooth._4) + return "4"; + if (code == Tooth._5) + return "5"; + if (code == Tooth._6) + return "6"; + if (code == Tooth._7) + return "7"; + if (code == Tooth._8) + return "8"; + if (code == Tooth._11) + return "11"; + if (code == Tooth._12) + return "12"; + if (code == Tooth._13) + return "13"; + if (code == Tooth._14) + return "14"; + if (code == Tooth._15) + return "15"; + if (code == Tooth._16) + return "16"; + if (code == Tooth._17) + return "17"; + if (code == Tooth._18) + return "18"; + if (code == Tooth._21) + return "21"; + if (code == Tooth._22) + return "22"; + if (code == Tooth._23) + return "23"; + if (code == Tooth._24) + return "24"; + if (code == Tooth._25) + return "25"; + if (code == Tooth._26) + return "26"; + if (code == Tooth._27) + return "27"; + if (code == Tooth._28) + return "28"; + if (code == Tooth._31) + return "31"; + if (code == Tooth._32) + return "32"; + if (code == Tooth._33) + return "33"; + if (code == Tooth._34) + return "34"; + if (code == Tooth._35) + return "35"; + if (code == Tooth._36) + return "36"; + if (code == Tooth._37) + return "37"; + if (code == Tooth._38) + return "38"; + if (code == Tooth._41) + return "41"; + if (code == Tooth._42) + return "42"; + if (code == Tooth._43) + return "43"; + if (code == Tooth._44) + return "44"; + if (code == Tooth._45) + return "45"; + if (code == Tooth._46) + return "46"; + if (code == Tooth._47) + return "47"; + if (code == Tooth._48) + return "48"; + return "?"; + } + + public String toSystem(Tooth code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TransactionMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TransactionMode.java new file mode 100644 index 00000000000..fb0b788a198 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TransactionMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TransactionMode { + + /** + * Neither batch or transaction is supported. + */ + NOTSUPPORTED, + /** + * Batches are supported. + */ + BATCH, + /** + * Transactions are supported. + */ + TRANSACTION, + /** + * Both batches and transactions are supported. + */ + BOTH, + /** + * added to help the parsers + */ + NULL; + public static TransactionMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return NOTSUPPORTED; + if ("batch".equals(codeString)) + return BATCH; + if ("transaction".equals(codeString)) + return TRANSACTION; + if ("both".equals(codeString)) + return BOTH; + throw new FHIRException("Unknown TransactionMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOTSUPPORTED: return "not-supported"; + case BATCH: return "batch"; + case TRANSACTION: return "transaction"; + case BOTH: return "both"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/transaction-mode"; + } + public String getDefinition() { + switch (this) { + case NOTSUPPORTED: return "Neither batch or transaction is supported."; + case BATCH: return "Batches are supported."; + case TRANSACTION: return "Transactions are supported."; + case BOTH: return "Both batches and transactions are supported."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOTSUPPORTED: return "None"; + case BATCH: return "Batches supported"; + case TRANSACTION: return "Transactions Supported"; + case BOTH: return "Batches & Transactions"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TransactionModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TransactionModeEnumFactory.java new file mode 100644 index 00000000000..cb474f6b4f7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TransactionModeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TransactionModeEnumFactory implements EnumFactory { + + public TransactionMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("not-supported".equals(codeString)) + return TransactionMode.NOTSUPPORTED; + if ("batch".equals(codeString)) + return TransactionMode.BATCH; + if ("transaction".equals(codeString)) + return TransactionMode.TRANSACTION; + if ("both".equals(codeString)) + return TransactionMode.BOTH; + throw new IllegalArgumentException("Unknown TransactionMode code '"+codeString+"'"); + } + + public String toCode(TransactionMode code) { + if (code == TransactionMode.NOTSUPPORTED) + return "not-supported"; + if (code == TransactionMode.BATCH) + return "batch"; + if (code == TransactionMode.TRANSACTION) + return "transaction"; + if (code == TransactionMode.BOTH) + return "both"; + return "?"; + } + + public String toSystem(TransactionMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TriggerType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TriggerType.java new file mode 100644 index 00000000000..c7d6cb451bb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TriggerType.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TriggerType { + + /** + * The trigger occurs in response to a specific named event, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided + */ + NAMEDEVENT, + /** + * The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event + */ + PERIODIC, + /** + * The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed + */ + DATACHANGED, + /** + * The trigger occurs whenever data of a particular type is added + */ + DATAADDED, + /** + * The trigger occurs whenever data of a particular type is modified + */ + DATAMODIFIED, + /** + * The trigger occurs whenever data of a particular type is removed + */ + DATAREMOVED, + /** + * The trigger occurs whenever data of a particular type is accessed + */ + DATAACCESSED, + /** + * The trigger occurs whenever access to data of a particular type is completed + */ + DATAACCESSENDED, + /** + * added to help the parsers + */ + NULL; + public static TriggerType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return NAMEDEVENT; + if ("periodic".equals(codeString)) + return PERIODIC; + if ("data-changed".equals(codeString)) + return DATACHANGED; + if ("data-added".equals(codeString)) + return DATAADDED; + if ("data-modified".equals(codeString)) + return DATAMODIFIED; + if ("data-removed".equals(codeString)) + return DATAREMOVED; + if ("data-accessed".equals(codeString)) + return DATAACCESSED; + if ("data-access-ended".equals(codeString)) + return DATAACCESSENDED; + throw new FHIRException("Unknown TriggerType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NAMEDEVENT: return "named-event"; + case PERIODIC: return "periodic"; + case DATACHANGED: return "data-changed"; + case DATAADDED: return "data-added"; + case DATAMODIFIED: return "data-modified"; + case DATAREMOVED: return "data-removed"; + case DATAACCESSED: return "data-accessed"; + case DATAACCESSENDED: return "data-access-ended"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/trigger-type"; + } + public String getDefinition() { + switch (this) { + case NAMEDEVENT: return "The trigger occurs in response to a specific named event, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided"; + case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event"; + case DATACHANGED: return "The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed"; + case DATAADDED: return "The trigger occurs whenever data of a particular type is added"; + case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified"; + case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed"; + case DATAACCESSED: return "The trigger occurs whenever data of a particular type is accessed"; + case DATAACCESSENDED: return "The trigger occurs whenever access to data of a particular type is completed"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NAMEDEVENT: return "Named Event"; + case PERIODIC: return "Periodic"; + case DATACHANGED: return "Data Changed"; + case DATAADDED: return "Data Added"; + case DATAMODIFIED: return "Data Updated"; + case DATAREMOVED: return "Data Removed"; + case DATAACCESSED: return "Data Accessed"; + case DATAACCESSENDED: return "Data Access Ended"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TriggerTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TriggerTypeEnumFactory.java new file mode 100644 index 00000000000..b23a8aa69b3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TriggerTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TriggerTypeEnumFactory implements EnumFactory { + + public TriggerType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return TriggerType.NAMEDEVENT; + if ("periodic".equals(codeString)) + return TriggerType.PERIODIC; + if ("data-changed".equals(codeString)) + return TriggerType.DATACHANGED; + if ("data-added".equals(codeString)) + return TriggerType.DATAADDED; + if ("data-modified".equals(codeString)) + return TriggerType.DATAMODIFIED; + if ("data-removed".equals(codeString)) + return TriggerType.DATAREMOVED; + if ("data-accessed".equals(codeString)) + return TriggerType.DATAACCESSED; + if ("data-access-ended".equals(codeString)) + return TriggerType.DATAACCESSENDED; + throw new IllegalArgumentException("Unknown TriggerType code '"+codeString+"'"); + } + + public String toCode(TriggerType code) { + if (code == TriggerType.NAMEDEVENT) + return "named-event"; + if (code == TriggerType.PERIODIC) + return "periodic"; + if (code == TriggerType.DATACHANGED) + return "data-changed"; + if (code == TriggerType.DATAADDED) + return "data-added"; + if (code == TriggerType.DATAMODIFIED) + return "data-modified"; + if (code == TriggerType.DATAREMOVED) + return "data-removed"; + if (code == TriggerType.DATAACCESSED) + return "data-accessed"; + if (code == TriggerType.DATAACCESSENDED) + return "data-access-ended"; + return "?"; + } + + public String toSystem(TriggerType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TypeDerivationRule.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TypeDerivationRule.java new file mode 100644 index 00000000000..cce308050d1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TypeDerivationRule.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum TypeDerivationRule { + + /** + * This definition defines a new type that adds additional elements to the base type + */ + SPECIALIZATION, + /** + * This definition adds additional rules to an existing concrete type + */ + CONSTRAINT, + /** + * added to help the parsers + */ + NULL; + public static TypeDerivationRule fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("specialization".equals(codeString)) + return SPECIALIZATION; + if ("constraint".equals(codeString)) + return CONSTRAINT; + throw new FHIRException("Unknown TypeDerivationRule code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SPECIALIZATION: return "specialization"; + case CONSTRAINT: return "constraint"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/type-derivation-rule"; + } + public String getDefinition() { + switch (this) { + case SPECIALIZATION: return "This definition defines a new type that adds additional elements to the base type"; + case CONSTRAINT: return "This definition adds additional rules to an existing concrete type"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SPECIALIZATION: return "Specialization"; + case CONSTRAINT: return "Constraint"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TypeDerivationRuleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TypeDerivationRuleEnumFactory.java new file mode 100644 index 00000000000..5cdb5cc9a3b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/TypeDerivationRuleEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class TypeDerivationRuleEnumFactory implements EnumFactory { + + public TypeDerivationRule fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("specialization".equals(codeString)) + return TypeDerivationRule.SPECIALIZATION; + if ("constraint".equals(codeString)) + return TypeDerivationRule.CONSTRAINT; + throw new IllegalArgumentException("Unknown TypeDerivationRule code '"+codeString+"'"); + } + + public String toCode(TypeDerivationRule code) { + if (code == TypeDerivationRule.SPECIALIZATION) + return "specialization"; + if (code == TypeDerivationRule.CONSTRAINT) + return "constraint"; + return "?"; + } + + public String toSystem(TypeDerivationRule code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Udi.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Udi.java new file mode 100644 index 00000000000..caa40aef06c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/Udi.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum Udi { + + /** + * GUDID (FDA) US Repository + */ + GUDID, + /** + * added to help the parsers + */ + NULL; + public static Udi fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("gudid".equals(codeString)) + return GUDID; + throw new FHIRException("Unknown Udi code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GUDID: return "gudid"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-udi"; + } + public String getDefinition() { + switch (this) { + case GUDID: return "GUDID (FDA) US Repository"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GUDID: return "GUDID (FDA)"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEntryType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEntryType.java new file mode 100644 index 00000000000..b1b30ebc694 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEntryType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum UdiEntryType { + + /** + * A Barcode scanner captured the data from the device label + */ + BARCODE, + /** + * An RFID chip reader captured the data from the device label + */ + RFID, + /** + * The data was read from the label by a person and manually entered. (e.g. via a keyboard) + */ + MANUAL, + /** + * The data originated from a patient's implant card and read by an operator. + */ + CARD, + /** + * The data originated from a patient source and not directly scanned or read from a label or card. + */ + SELFREPORTED, + /** + * The method of data capture has not been determined + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static UdiEntryType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("barcode".equals(codeString)) + return BARCODE; + if ("rfid".equals(codeString)) + return RFID; + if ("manual".equals(codeString)) + return MANUAL; + if ("card".equals(codeString)) + return CARD; + if ("self-reported".equals(codeString)) + return SELFREPORTED; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new FHIRException("Unknown UdiEntryType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BARCODE: return "barcode"; + case RFID: return "rfid"; + case MANUAL: return "manual"; + case CARD: return "card"; + case SELFREPORTED: return "self-reported"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/udi-entry-type"; + } + public String getDefinition() { + switch (this) { + case BARCODE: return "A Barcode scanner captured the data from the device label"; + case RFID: return "An RFID chip reader captured the data from the device label"; + case MANUAL: return "The data was read from the label by a person and manually entered. (e.g. via a keyboard)"; + case CARD: return "The data originated from a patient's implant card and read by an operator."; + case SELFREPORTED: return "The data originated from a patient source and not directly scanned or read from a label or card."; + case UNKNOWN: return "The method of data capture has not been determined"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BARCODE: return "BarCode"; + case RFID: return "RFID"; + case MANUAL: return "Manual"; + case CARD: return "Card"; + case SELFREPORTED: return "Self Reported"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEntryTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEntryTypeEnumFactory.java new file mode 100644 index 00000000000..971d1963f77 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEntryTypeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class UdiEntryTypeEnumFactory implements EnumFactory { + + public UdiEntryType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("barcode".equals(codeString)) + return UdiEntryType.BARCODE; + if ("rfid".equals(codeString)) + return UdiEntryType.RFID; + if ("manual".equals(codeString)) + return UdiEntryType.MANUAL; + if ("card".equals(codeString)) + return UdiEntryType.CARD; + if ("self-reported".equals(codeString)) + return UdiEntryType.SELFREPORTED; + if ("unknown".equals(codeString)) + return UdiEntryType.UNKNOWN; + throw new IllegalArgumentException("Unknown UdiEntryType code '"+codeString+"'"); + } + + public String toCode(UdiEntryType code) { + if (code == UdiEntryType.BARCODE) + return "barcode"; + if (code == UdiEntryType.RFID) + return "rfid"; + if (code == UdiEntryType.MANUAL) + return "manual"; + if (code == UdiEntryType.CARD) + return "card"; + if (code == UdiEntryType.SELFREPORTED) + return "self-reported"; + if (code == UdiEntryType.UNKNOWN) + return "unknown"; + return "?"; + } + + public String toSystem(UdiEntryType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEnumFactory.java new file mode 100644 index 00000000000..5dbcc8ade15 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UdiEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class UdiEnumFactory implements EnumFactory { + + public Udi fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("gudid".equals(codeString)) + return Udi.GUDID; + throw new IllegalArgumentException("Unknown Udi code '"+codeString+"'"); + } + + public String toCode(Udi code) { + if (code == Udi.GUDID) + return "gudid"; + return "?"; + } + + public String toSystem(Udi code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UnknownContentCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UnknownContentCode.java new file mode 100644 index 00000000000..dd6fb28f6a4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UnknownContentCode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum UnknownContentCode { + + /** + * The application does not accept either unknown elements or extensions. + */ + NO, + /** + * The application accepts unknown extensions, but not unknown elements. + */ + EXTENSIONS, + /** + * The application accepts unknown elements, but not unknown extensions. + */ + ELEMENTS, + /** + * The application accepts unknown elements and extensions. + */ + BOTH, + /** + * added to help the parsers + */ + NULL; + public static UnknownContentCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("no".equals(codeString)) + return NO; + if ("extensions".equals(codeString)) + return EXTENSIONS; + if ("elements".equals(codeString)) + return ELEMENTS; + if ("both".equals(codeString)) + return BOTH; + throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NO: return "no"; + case EXTENSIONS: return "extensions"; + case ELEMENTS: return "elements"; + case BOTH: return "both"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/unknown-content-code"; + } + public String getDefinition() { + switch (this) { + case NO: return "The application does not accept either unknown elements or extensions."; + case EXTENSIONS: return "The application accepts unknown extensions, but not unknown elements."; + case ELEMENTS: return "The application accepts unknown elements, but not unknown extensions."; + case BOTH: return "The application accepts unknown elements and extensions."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NO: return "Neither Elements or Extensions"; + case EXTENSIONS: return "Unknown Extensions"; + case ELEMENTS: return "Unknown Elements"; + case BOTH: return "Unknown Elements and Extensions"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UnknownContentCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UnknownContentCodeEnumFactory.java new file mode 100644 index 00000000000..d8e4e70601f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UnknownContentCodeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class UnknownContentCodeEnumFactory implements EnumFactory { + + public UnknownContentCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("no".equals(codeString)) + return UnknownContentCode.NO; + if ("extensions".equals(codeString)) + return UnknownContentCode.EXTENSIONS; + if ("elements".equals(codeString)) + return UnknownContentCode.ELEMENTS; + if ("both".equals(codeString)) + return UnknownContentCode.BOTH; + throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'"); + } + + public String toCode(UnknownContentCode code) { + if (code == UnknownContentCode.NO) + return "no"; + if (code == UnknownContentCode.EXTENSIONS) + return "extensions"; + if (code == UnknownContentCode.ELEMENTS) + return "elements"; + if (code == UnknownContentCode.BOTH) + return "both"; + return "?"; + } + + public String toSystem(UnknownContentCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UsageContextType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UsageContextType.java new file mode 100644 index 00000000000..277164c9719 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UsageContextType.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum UsageContextType { + + /** + * The gender of the patient. For this context type, the value should be a code taken from the http://hl7.org/fhir/ValueSet/administrative-gender value set + */ + GENDER, + /** + * The age of the patient. For this context type, the value should be a range the specifies the applicable ages or a code from the MeSH value set http://hl7.org/fhir/ValueSet/v3-AgeGroupObservationValue + */ + AGE, + /** + * The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering as in http://hl7.org/fhir/ValueSet/condition-code. + */ + FOCUS, + /** + * The clinical specialty of the context in which the patient is being treated - For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from the NUCC Health Care provider taxonomy value set http://hl7.org/fhir/ValueSet/provider-taxonomy. + */ + USER, + /** + * The settings in which the artifact is intended for use. For example, admission, pre-op, etc. For example, the ActEncounterCode value set http://hl7.org/fhir/ValueSet/v3-ActEncounterCode + */ + WORKFLOW, + /** + * The context for the clinical task(s) represented by this artifact. Can be any task context represented by the HL7 ActTaskCode value set http://hl7.org/fhir/ValueSet/v3-ActTaskCode. General categories include: order entry, patient documentation and patient information review. + */ + TASK, + /** + * The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from either the HL7 ActEncounterCode http://hl7.org/fhir/ValueSet/v3-ActEncounterCode or NUCC non-individual provider codes http://hl7.org/fhir/ValueSet/provider-taxonomy + */ + VENUE, + /** + * The species to which an artifact applies. For example, SNOMED - 387961004 | Kingdom Animalia (organism). + */ + SPECIES, + /** + * added to help the parsers + */ + NULL; + public static UsageContextType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("gender".equals(codeString)) + return GENDER; + if ("age".equals(codeString)) + return AGE; + if ("focus".equals(codeString)) + return FOCUS; + if ("user".equals(codeString)) + return USER; + if ("workflow".equals(codeString)) + return WORKFLOW; + if ("task".equals(codeString)) + return TASK; + if ("venue".equals(codeString)) + return VENUE; + if ("species".equals(codeString)) + return SPECIES; + throw new FHIRException("Unknown UsageContextType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GENDER: return "gender"; + case AGE: return "age"; + case FOCUS: return "focus"; + case USER: return "user"; + case WORKFLOW: return "workflow"; + case TASK: return "task"; + case VENUE: return "venue"; + case SPECIES: return "species"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/usage-context-type"; + } + public String getDefinition() { + switch (this) { + case GENDER: return "The gender of the patient. For this context type, the value should be a code taken from the http://hl7.org/fhir/ValueSet/administrative-gender value set"; + case AGE: return "The age of the patient. For this context type, the value should be a range the specifies the applicable ages or a code from the MeSH value set http://hl7.org/fhir/ValueSet/v3-AgeGroupObservationValue"; + case FOCUS: return "The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering as in http://hl7.org/fhir/ValueSet/condition-code."; + case USER: return "The clinical specialty of the context in which the patient is being treated - For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from the NUCC Health Care provider taxonomy value set http://hl7.org/fhir/ValueSet/provider-taxonomy."; + case WORKFLOW: return "The settings in which the artifact is intended for use. For example, admission, pre-op, etc. For example, the ActEncounterCode value set http://hl7.org/fhir/ValueSet/v3-ActEncounterCode"; + case TASK: return "The context for the clinical task(s) represented by this artifact. Can be any task context represented by the HL7 ActTaskCode value set http://hl7.org/fhir/ValueSet/v3-ActTaskCode. General categories include: order entry, patient documentation and patient information review."; + case VENUE: return "The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from either the HL7 ActEncounterCode http://hl7.org/fhir/ValueSet/v3-ActEncounterCode or NUCC non-individual provider codes http://hl7.org/fhir/ValueSet/provider-taxonomy"; + case SPECIES: return "The species to which an artifact applies. For example, SNOMED - 387961004 | Kingdom Animalia (organism)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GENDER: return "Gender"; + case AGE: return "Age Range"; + case FOCUS: return "Clinical Focus"; + case USER: return "User Type"; + case WORKFLOW: return "Workflow Setting"; + case TASK: return "Workflow Task"; + case VENUE: return "Clinical Venue"; + case SPECIES: return "Species"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UsageContextTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UsageContextTypeEnumFactory.java new file mode 100644 index 00000000000..0b0fdd9659c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/UsageContextTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class UsageContextTypeEnumFactory implements EnumFactory { + + public UsageContextType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("gender".equals(codeString)) + return UsageContextType.GENDER; + if ("age".equals(codeString)) + return UsageContextType.AGE; + if ("focus".equals(codeString)) + return UsageContextType.FOCUS; + if ("user".equals(codeString)) + return UsageContextType.USER; + if ("workflow".equals(codeString)) + return UsageContextType.WORKFLOW; + if ("task".equals(codeString)) + return UsageContextType.TASK; + if ("venue".equals(codeString)) + return UsageContextType.VENUE; + if ("species".equals(codeString)) + return UsageContextType.SPECIES; + throw new IllegalArgumentException("Unknown UsageContextType code '"+codeString+"'"); + } + + public String toCode(UsageContextType code) { + if (code == UsageContextType.GENDER) + return "gender"; + if (code == UsageContextType.AGE) + return "age"; + if (code == UsageContextType.FOCUS) + return "focus"; + if (code == UsageContextType.USER) + return "user"; + if (code == UsageContextType.WORKFLOW) + return "workflow"; + if (code == UsageContextType.TASK) + return "task"; + if (code == UsageContextType.VENUE) + return "venue"; + if (code == UsageContextType.SPECIES) + return "species"; + return "?"; + } + + public String toSystem(UsageContextType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementCondition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementCondition.java new file mode 100644 index 00000000000..ce3ffa152ba --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementCondition.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementCondition { + + /** + * Always send an acknowledgement. + */ + AL, + /** + * Send an acknowledgement for error/reject conditions only. + */ + ER, + /** + * Never send an acknowledgement. + */ + NE, + /** + * Send an acknowledgement for successful completions only. + */ + SU, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementCondition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AL".equals(codeString)) + return AL; + if ("ER".equals(codeString)) + return ER; + if ("NE".equals(codeString)) + return NE; + if ("SU".equals(codeString)) + return SU; + throw new FHIRException("Unknown V3AcknowledgementCondition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AL: return "AL"; + case ER: return "ER"; + case NE: return "NE"; + case SU: return "SU"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementCondition"; + } + public String getDefinition() { + switch (this) { + case AL: return "Always send an acknowledgement."; + case ER: return "Send an acknowledgement for error/reject conditions only."; + case NE: return "Never send an acknowledgement."; + case SU: return "Send an acknowledgement for successful completions only."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AL: return "Always"; + case ER: return "Error/reject only"; + case NE: return "Never"; + case SU: return "Successful only"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementConditionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementConditionEnumFactory.java new file mode 100644 index 00000000000..9e3c7f573f4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementConditionEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AcknowledgementConditionEnumFactory implements EnumFactory { + + public V3AcknowledgementCondition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AL".equals(codeString)) + return V3AcknowledgementCondition.AL; + if ("ER".equals(codeString)) + return V3AcknowledgementCondition.ER; + if ("NE".equals(codeString)) + return V3AcknowledgementCondition.NE; + if ("SU".equals(codeString)) + return V3AcknowledgementCondition.SU; + throw new IllegalArgumentException("Unknown V3AcknowledgementCondition code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementCondition code) { + if (code == V3AcknowledgementCondition.AL) + return "AL"; + if (code == V3AcknowledgementCondition.ER) + return "ER"; + if (code == V3AcknowledgementCondition.NE) + return "NE"; + if (code == V3AcknowledgementCondition.SU) + return "SU"; + return "?"; + } + + public String toSystem(V3AcknowledgementCondition code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailCode.java new file mode 100644 index 00000000000..4af7527c8b0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailCode.java @@ -0,0 +1,321 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementDetailCode { + + /** + * Refelects rejections because elements of the communication are not supported in the current context. + */ + _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE, + /** + * The interaction (or: this version of the interaction) is not supported. + */ + NS200, + /** + * The Processing ID is not supported. + */ + NS202, + /** + * The Version ID is not supported. + */ + NS203, + /** + * The processing mode is not supported. + */ + NS250, + /** + * The Device.id of the sender is unknown. + */ + NS260, + /** + * The receiver requires information in the attentionLine classes for routing purposes. + */ + NS261, + /** + * An internal software component (database, application, queue mechanism, etc.) has failed, leading to inability to process the message. + */ + INTERR, + /** + * Rejection: The message can't be stored by the receiver due to an unspecified internal application issue. The message was neither processed nor stored by the receiving application. + */ + NOSTORE, + /** + * Error: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is unavailable. + */ + RTEDEST, + /** + * The destination of this message is unknown to the receiving application. The receiving application in the message does not match the application which received the message. The message was neither routed, processed nor stored by the receiving application. + */ + RTUDEST, + /** + * Warning: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is (temporarily) unavailable. The receiving application will forward the message as soon as the destination can be reached again. + */ + RTWDEST, + /** + * Reflects errors in the syntax or structure of the communication. + */ + SYN, + /** + * The attribute contained data of the wrong data type, e.g. a numeric attribute contained "FOO". + */ + SYN102, + /** + * Description: Required association or attribute missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message. + */ + SYN105, + /** + * Required association missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message. + */ + SYN100, + /** + * A required attribute is missing in a class. + */ + SYN101, + /** + * Description: The number of repetitions of a group of association or attributes is less than the required minimum for the standard or of one of the conformance profiles or templates identified in the message. + */ + SYN114, + /** + * Description: A coded attribute or datatype property violates one of the terminology constraints specified in the standard or one of the conformance profiles or templates declared by the instance. + */ + SYN106, + /** + * An attribute value was compared against the corresponding code system, and no match was found. + */ + SYN103, + /** + * An attribute value referenced a code system that is not valid for an attribute constrained to CNE. + */ + SYN104, + /** + * Description: A coded attribute is referencing a code that has been deprecated by the owning code system. + */ + SYN107, + /** + * Description: The number of repetitions of a (group of) association(s) or attribute(s) exceeds the limits of the standard or of one of the conformance profiles or templates identified in the message. + */ + SYN108, + /** + * The number of repetitions of a (group of) association(s) exceeds the limits of the standard or of one of the conformance profiles identified in the message. + */ + SYN110, + /** + * The number of repetitions of an attribute exceeds the limits of the standard or of one of the conformance profiles identified in the message. + */ + SYN112, + /** + * Description: An attribute or association identified as mandatory in a specification or declared conformance profile or template has been specified with a null flavor. + */ + SYN109, + /** + * Description: The value of an attribute or property differs from the fixed value asserted in the standard or one of the conformance profiles or templates declared in the message. + */ + SYN111, + /** + * Description: A formal constraint asserted in the standard or one of the conformance profiles or templates declared in the message has been violated. + */ + SYN113, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementDetailCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AcknowledgementDetailNotSupportedCode".equals(codeString)) + return _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE; + if ("NS200".equals(codeString)) + return NS200; + if ("NS202".equals(codeString)) + return NS202; + if ("NS203".equals(codeString)) + return NS203; + if ("NS250".equals(codeString)) + return NS250; + if ("NS260".equals(codeString)) + return NS260; + if ("NS261".equals(codeString)) + return NS261; + if ("INTERR".equals(codeString)) + return INTERR; + if ("NOSTORE".equals(codeString)) + return NOSTORE; + if ("RTEDEST".equals(codeString)) + return RTEDEST; + if ("RTUDEST".equals(codeString)) + return RTUDEST; + if ("RTWDEST".equals(codeString)) + return RTWDEST; + if ("SYN".equals(codeString)) + return SYN; + if ("SYN102".equals(codeString)) + return SYN102; + if ("SYN105".equals(codeString)) + return SYN105; + if ("SYN100".equals(codeString)) + return SYN100; + if ("SYN101".equals(codeString)) + return SYN101; + if ("SYN114".equals(codeString)) + return SYN114; + if ("SYN106".equals(codeString)) + return SYN106; + if ("SYN103".equals(codeString)) + return SYN103; + if ("SYN104".equals(codeString)) + return SYN104; + if ("SYN107".equals(codeString)) + return SYN107; + if ("SYN108".equals(codeString)) + return SYN108; + if ("SYN110".equals(codeString)) + return SYN110; + if ("SYN112".equals(codeString)) + return SYN112; + if ("SYN109".equals(codeString)) + return SYN109; + if ("SYN111".equals(codeString)) + return SYN111; + if ("SYN113".equals(codeString)) + return SYN113; + throw new FHIRException("Unknown V3AcknowledgementDetailCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE: return "_AcknowledgementDetailNotSupportedCode"; + case NS200: return "NS200"; + case NS202: return "NS202"; + case NS203: return "NS203"; + case NS250: return "NS250"; + case NS260: return "NS260"; + case NS261: return "NS261"; + case INTERR: return "INTERR"; + case NOSTORE: return "NOSTORE"; + case RTEDEST: return "RTEDEST"; + case RTUDEST: return "RTUDEST"; + case RTWDEST: return "RTWDEST"; + case SYN: return "SYN"; + case SYN102: return "SYN102"; + case SYN105: return "SYN105"; + case SYN100: return "SYN100"; + case SYN101: return "SYN101"; + case SYN114: return "SYN114"; + case SYN106: return "SYN106"; + case SYN103: return "SYN103"; + case SYN104: return "SYN104"; + case SYN107: return "SYN107"; + case SYN108: return "SYN108"; + case SYN110: return "SYN110"; + case SYN112: return "SYN112"; + case SYN109: return "SYN109"; + case SYN111: return "SYN111"; + case SYN113: return "SYN113"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementDetailCode"; + } + public String getDefinition() { + switch (this) { + case _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE: return "Refelects rejections because elements of the communication are not supported in the current context."; + case NS200: return "The interaction (or: this version of the interaction) is not supported."; + case NS202: return "The Processing ID is not supported."; + case NS203: return "The Version ID is not supported."; + case NS250: return "The processing mode is not supported."; + case NS260: return "The Device.id of the sender is unknown."; + case NS261: return "The receiver requires information in the attentionLine classes for routing purposes."; + case INTERR: return "An internal software component (database, application, queue mechanism, etc.) has failed, leading to inability to process the message."; + case NOSTORE: return "Rejection: The message can't be stored by the receiver due to an unspecified internal application issue. The message was neither processed nor stored by the receiving application."; + case RTEDEST: return "Error: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is unavailable."; + case RTUDEST: return "The destination of this message is unknown to the receiving application. The receiving application in the message does not match the application which received the message. The message was neither routed, processed nor stored by the receiving application."; + case RTWDEST: return "Warning: The destination of this message is known to the receiving application. Messages have been successfully routed to that destination in the past. The link to the destination application or an intermediate application is (temporarily) unavailable. The receiving application will forward the message as soon as the destination can be reached again."; + case SYN: return "Reflects errors in the syntax or structure of the communication."; + case SYN102: return "The attribute contained data of the wrong data type, e.g. a numeric attribute contained \"FOO\"."; + case SYN105: return "Description: Required association or attribute missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message."; + case SYN100: return "Required association missing in message; or the sequence of the classes is different than required by the standard or one of the conformance profiles identified in the message."; + case SYN101: return "A required attribute is missing in a class."; + case SYN114: return "Description: The number of repetitions of a group of association or attributes is less than the required minimum for the standard or of one of the conformance profiles or templates identified in the message."; + case SYN106: return "Description: A coded attribute or datatype property violates one of the terminology constraints specified in the standard or one of the conformance profiles or templates declared by the instance."; + case SYN103: return "An attribute value was compared against the corresponding code system, and no match was found."; + case SYN104: return "An attribute value referenced a code system that is not valid for an attribute constrained to CNE."; + case SYN107: return "Description: A coded attribute is referencing a code that has been deprecated by the owning code system."; + case SYN108: return "Description: The number of repetitions of a (group of) association(s) or attribute(s) exceeds the limits of the standard or of one of the conformance profiles or templates identified in the message."; + case SYN110: return "The number of repetitions of a (group of) association(s) exceeds the limits of the standard or of one of the conformance profiles identified in the message."; + case SYN112: return "The number of repetitions of an attribute exceeds the limits of the standard or of one of the conformance profiles identified in the message."; + case SYN109: return "Description: An attribute or association identified as mandatory in a specification or declared conformance profile or template has been specified with a null flavor."; + case SYN111: return "Description: The value of an attribute or property differs from the fixed value asserted in the standard or one of the conformance profiles or templates declared in the message."; + case SYN113: return "Description: A formal constraint asserted in the standard or one of the conformance profiles or templates declared in the message has been violated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE: return "AcknowledgementDetailNotSupportedCode"; + case NS200: return "Unsupported interaction"; + case NS202: return "Unsupported processing id"; + case NS203: return "Unsupported version id"; + case NS250: return "Unsupported processing Mode"; + case NS260: return "Unknown sender"; + case NS261: return "Unrecognized attentionline"; + case INTERR: return "Internal system error"; + case NOSTORE: return "No storage space for message."; + case RTEDEST: return "Message routing error, destination unreachable."; + case RTUDEST: return "Error: Message routing error, unknown destination."; + case RTWDEST: return "Message routing warning, destination unreachable."; + case SYN: return "Syntax error"; + case SYN102: return "Data type error"; + case SYN105: return "Required element missing"; + case SYN100: return "Required association missing"; + case SYN101: return "Required attribute missing"; + case SYN114: return "Insufficient repetitions"; + case SYN106: return "Terminology error"; + case SYN103: return "Value not found in code system"; + case SYN104: return "Invalid code system in CNE"; + case SYN107: return "Deprecated code"; + case SYN108: return "Number of repetitions exceeds limit"; + case SYN110: return "Number of association repetitions exceeds limit"; + case SYN112: return "Number of attribute repetitions exceeds limit"; + case SYN109: return "Mandatory element with null value"; + case SYN111: return "Value does not match fixed value"; + case SYN113: return "Formal constraint violation"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailCodeEnumFactory.java new file mode 100644 index 00000000000..2293ad8782c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailCodeEnumFactory.java @@ -0,0 +1,166 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AcknowledgementDetailCodeEnumFactory implements EnumFactory { + + public V3AcknowledgementDetailCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AcknowledgementDetailNotSupportedCode".equals(codeString)) + return V3AcknowledgementDetailCode._ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE; + if ("NS200".equals(codeString)) + return V3AcknowledgementDetailCode.NS200; + if ("NS202".equals(codeString)) + return V3AcknowledgementDetailCode.NS202; + if ("NS203".equals(codeString)) + return V3AcknowledgementDetailCode.NS203; + if ("NS250".equals(codeString)) + return V3AcknowledgementDetailCode.NS250; + if ("NS260".equals(codeString)) + return V3AcknowledgementDetailCode.NS260; + if ("NS261".equals(codeString)) + return V3AcknowledgementDetailCode.NS261; + if ("INTERR".equals(codeString)) + return V3AcknowledgementDetailCode.INTERR; + if ("NOSTORE".equals(codeString)) + return V3AcknowledgementDetailCode.NOSTORE; + if ("RTEDEST".equals(codeString)) + return V3AcknowledgementDetailCode.RTEDEST; + if ("RTUDEST".equals(codeString)) + return V3AcknowledgementDetailCode.RTUDEST; + if ("RTWDEST".equals(codeString)) + return V3AcknowledgementDetailCode.RTWDEST; + if ("SYN".equals(codeString)) + return V3AcknowledgementDetailCode.SYN; + if ("SYN102".equals(codeString)) + return V3AcknowledgementDetailCode.SYN102; + if ("SYN105".equals(codeString)) + return V3AcknowledgementDetailCode.SYN105; + if ("SYN100".equals(codeString)) + return V3AcknowledgementDetailCode.SYN100; + if ("SYN101".equals(codeString)) + return V3AcknowledgementDetailCode.SYN101; + if ("SYN114".equals(codeString)) + return V3AcknowledgementDetailCode.SYN114; + if ("SYN106".equals(codeString)) + return V3AcknowledgementDetailCode.SYN106; + if ("SYN103".equals(codeString)) + return V3AcknowledgementDetailCode.SYN103; + if ("SYN104".equals(codeString)) + return V3AcknowledgementDetailCode.SYN104; + if ("SYN107".equals(codeString)) + return V3AcknowledgementDetailCode.SYN107; + if ("SYN108".equals(codeString)) + return V3AcknowledgementDetailCode.SYN108; + if ("SYN110".equals(codeString)) + return V3AcknowledgementDetailCode.SYN110; + if ("SYN112".equals(codeString)) + return V3AcknowledgementDetailCode.SYN112; + if ("SYN109".equals(codeString)) + return V3AcknowledgementDetailCode.SYN109; + if ("SYN111".equals(codeString)) + return V3AcknowledgementDetailCode.SYN111; + if ("SYN113".equals(codeString)) + return V3AcknowledgementDetailCode.SYN113; + throw new IllegalArgumentException("Unknown V3AcknowledgementDetailCode code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementDetailCode code) { + if (code == V3AcknowledgementDetailCode._ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE) + return "_AcknowledgementDetailNotSupportedCode"; + if (code == V3AcknowledgementDetailCode.NS200) + return "NS200"; + if (code == V3AcknowledgementDetailCode.NS202) + return "NS202"; + if (code == V3AcknowledgementDetailCode.NS203) + return "NS203"; + if (code == V3AcknowledgementDetailCode.NS250) + return "NS250"; + if (code == V3AcknowledgementDetailCode.NS260) + return "NS260"; + if (code == V3AcknowledgementDetailCode.NS261) + return "NS261"; + if (code == V3AcknowledgementDetailCode.INTERR) + return "INTERR"; + if (code == V3AcknowledgementDetailCode.NOSTORE) + return "NOSTORE"; + if (code == V3AcknowledgementDetailCode.RTEDEST) + return "RTEDEST"; + if (code == V3AcknowledgementDetailCode.RTUDEST) + return "RTUDEST"; + if (code == V3AcknowledgementDetailCode.RTWDEST) + return "RTWDEST"; + if (code == V3AcknowledgementDetailCode.SYN) + return "SYN"; + if (code == V3AcknowledgementDetailCode.SYN102) + return "SYN102"; + if (code == V3AcknowledgementDetailCode.SYN105) + return "SYN105"; + if (code == V3AcknowledgementDetailCode.SYN100) + return "SYN100"; + if (code == V3AcknowledgementDetailCode.SYN101) + return "SYN101"; + if (code == V3AcknowledgementDetailCode.SYN114) + return "SYN114"; + if (code == V3AcknowledgementDetailCode.SYN106) + return "SYN106"; + if (code == V3AcknowledgementDetailCode.SYN103) + return "SYN103"; + if (code == V3AcknowledgementDetailCode.SYN104) + return "SYN104"; + if (code == V3AcknowledgementDetailCode.SYN107) + return "SYN107"; + if (code == V3AcknowledgementDetailCode.SYN108) + return "SYN108"; + if (code == V3AcknowledgementDetailCode.SYN110) + return "SYN110"; + if (code == V3AcknowledgementDetailCode.SYN112) + return "SYN112"; + if (code == V3AcknowledgementDetailCode.SYN109) + return "SYN109"; + if (code == V3AcknowledgementDetailCode.SYN111) + return "SYN111"; + if (code == V3AcknowledgementDetailCode.SYN113) + return "SYN113"; + return "?"; + } + + public String toSystem(V3AcknowledgementDetailCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailType.java new file mode 100644 index 00000000000..1860c4ef1f2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailType.java @@ -0,0 +1,135 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementDetailType { + + /** + * Definition:An issue which has prevented, or will prevent (unless a management is provided for the issue by the sender), the successful processing of an interaction. Response interactions which include an issue which is an Error are a 'rejection', indicating that the request was not successfully processed. + + + Example:Unable to find specified patient. + */ + E, + /** + * Definition: The message relates to an issue which has no bearing on the successful processing of the request. Information issues cannot be overridden by specifying a management. + + + Example: A Patient's coverage will expire in 5 days. + */ + I, + /** + * Definition: The message relates to an issue which cannot prevent the successful processing of a request, but which could result in the processing not having the ideal or intended effect. Managing a warning issue is not required for successful processing, but will suppress the warning from being raised. + + + Example: + + + Unexpected additional repetitions of phone number have been ignored. + */ + W, + /** + * null + */ + ERR, + /** + * null + */ + INFO, + /** + * null + */ + WARN, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementDetailType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("I".equals(codeString)) + return I; + if ("W".equals(codeString)) + return W; + if ("ERR".equals(codeString)) + return ERR; + if ("INFO".equals(codeString)) + return INFO; + if ("WARN".equals(codeString)) + return WARN; + throw new FHIRException("Unknown V3AcknowledgementDetailType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case I: return "I"; + case W: return "W"; + case ERR: return "ERR"; + case INFO: return "INFO"; + case WARN: return "WARN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementDetailType"; + } + public String getDefinition() { + switch (this) { + case E: return "Definition:An issue which has prevented, or will prevent (unless a management is provided for the issue by the sender), the successful processing of an interaction. Response interactions which include an issue which is an Error are a 'rejection', indicating that the request was not successfully processed. \r\n\n \n Example:Unable to find specified patient."; + case I: return "Definition: The message relates to an issue which has no bearing on the successful processing of the request. Information issues cannot be overridden by specifying a management.\r\n\n \n Example: A Patient's coverage will expire in 5 days."; + case W: return "Definition: The message relates to an issue which cannot prevent the successful processing of a request, but which could result in the processing not having the ideal or intended effect. Managing a warning issue is not required for successful processing, but will suppress the warning from being raised. \r\n\n \n Example:\n \r\n\n Unexpected additional repetitions of phone number have been ignored."; + case ERR: return ""; + case INFO: return ""; + case WARN: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "Error"; + case I: return "Information"; + case W: return "Warning"; + case ERR: return "ERR"; + case INFO: return "INFO"; + case WARN: return "WARN"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailTypeEnumFactory.java new file mode 100644 index 00000000000..3325f62e1e6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementDetailTypeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AcknowledgementDetailTypeEnumFactory implements EnumFactory { + + public V3AcknowledgementDetailType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return V3AcknowledgementDetailType.E; + if ("I".equals(codeString)) + return V3AcknowledgementDetailType.I; + if ("W".equals(codeString)) + return V3AcknowledgementDetailType.W; + if ("ERR".equals(codeString)) + return V3AcknowledgementDetailType.ERR; + if ("INFO".equals(codeString)) + return V3AcknowledgementDetailType.INFO; + if ("WARN".equals(codeString)) + return V3AcknowledgementDetailType.WARN; + throw new IllegalArgumentException("Unknown V3AcknowledgementDetailType code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementDetailType code) { + if (code == V3AcknowledgementDetailType.E) + return "E"; + if (code == V3AcknowledgementDetailType.I) + return "I"; + if (code == V3AcknowledgementDetailType.W) + return "W"; + if (code == V3AcknowledgementDetailType.ERR) + return "ERR"; + if (code == V3AcknowledgementDetailType.INFO) + return "INFO"; + if (code == V3AcknowledgementDetailType.WARN) + return "WARN"; + return "?"; + } + + public String toSystem(V3AcknowledgementDetailType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementType.java new file mode 100644 index 00000000000..5b126b97573 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementType.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AcknowledgementType { + + /** + * Receiving application successfully processed message. + */ + AA, + /** + * Receiving application found error in processing message. Sending error response with additional error detail information. + */ + AE, + /** + * Receiving application failed to process message for reason unrelated to content or format. Original message sender must decide on whether to automatically send message again. + */ + AR, + /** + * Receiving message handling service accepts responsibility for passing message onto receiving application. + */ + CA, + /** + * Receiving message handling service cannot accept message for any other reason (e.g. message sequence number, etc.). + */ + CE, + /** + * Receiving message handling service rejects message if interaction identifier, version or processing mode is incompatible with known receiving application role information. + */ + CR, + /** + * added to help the parsers + */ + NULL; + public static V3AcknowledgementType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AA".equals(codeString)) + return AA; + if ("AE".equals(codeString)) + return AE; + if ("AR".equals(codeString)) + return AR; + if ("CA".equals(codeString)) + return CA; + if ("CE".equals(codeString)) + return CE; + if ("CR".equals(codeString)) + return CR; + throw new FHIRException("Unknown V3AcknowledgementType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AA: return "AA"; + case AE: return "AE"; + case AR: return "AR"; + case CA: return "CA"; + case CE: return "CE"; + case CR: return "CR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AcknowledgementType"; + } + public String getDefinition() { + switch (this) { + case AA: return "Receiving application successfully processed message."; + case AE: return "Receiving application found error in processing message. Sending error response with additional error detail information."; + case AR: return "Receiving application failed to process message for reason unrelated to content or format. Original message sender must decide on whether to automatically send message again."; + case CA: return "Receiving message handling service accepts responsibility for passing message onto receiving application."; + case CE: return "Receiving message handling service cannot accept message for any other reason (e.g. message sequence number, etc.)."; + case CR: return "Receiving message handling service rejects message if interaction identifier, version or processing mode is incompatible with known receiving application role information."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AA: return "Application Acknowledgement Accept"; + case AE: return "Application Acknowledgement Error"; + case AR: return "Application Acknowledgement Reject"; + case CA: return "Accept Acknowledgement Commit Accept"; + case CE: return "Accept Acknowledgement Commit Error"; + case CR: return "Accept Acknowledgement Commit Reject"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementTypeEnumFactory.java new file mode 100644 index 00000000000..3f0d23d90c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AcknowledgementTypeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AcknowledgementTypeEnumFactory implements EnumFactory { + + public V3AcknowledgementType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AA".equals(codeString)) + return V3AcknowledgementType.AA; + if ("AE".equals(codeString)) + return V3AcknowledgementType.AE; + if ("AR".equals(codeString)) + return V3AcknowledgementType.AR; + if ("CA".equals(codeString)) + return V3AcknowledgementType.CA; + if ("CE".equals(codeString)) + return V3AcknowledgementType.CE; + if ("CR".equals(codeString)) + return V3AcknowledgementType.CR; + throw new IllegalArgumentException("Unknown V3AcknowledgementType code '"+codeString+"'"); + } + + public String toCode(V3AcknowledgementType code) { + if (code == V3AcknowledgementType.AA) + return "AA"; + if (code == V3AcknowledgementType.AE) + return "AE"; + if (code == V3AcknowledgementType.AR) + return "AR"; + if (code == V3AcknowledgementType.CA) + return "CA"; + if (code == V3AcknowledgementType.CE) + return "CE"; + if (code == V3AcknowledgementType.CR) + return "CR"; + return "?"; + } + + public String toSystem(V3AcknowledgementType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActClass.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActClass.java new file mode 100644 index 00000000000..916a06b14ae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActClass.java @@ -0,0 +1,1760 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActClass { + + /** + * A record of something that is being done, has been done, can be done, or is intended or requested to be done. + + + Examples:The kinds of acts that are common in health care are (1) a clinical observation, (2) an assessment of health condition (such as problems and diagnoses), (3) healthcare goals, (4) treatment services (such as medication, surgery, physical and psychological therapy), (5) assisting, monitoring or attending, (6) training and education services to patients and their next of kin, (7) and notary services (such as advanced directives or living will), (8) editing and maintaining documents, and many others. + + + Discussion and Rationale: Acts are the pivot of the RIM; all domain information and processes are represented primarily in Acts. Any profession or business, including healthcare, is primarily constituted of intentional and occasionally non-intentional actions, performed and recorded by responsible actors. An Act-instance is a record of such an action. + + Acts connect to Entities in their Roles through Participations and connect to other Acts through ActRelationships. Participations are the authors, performers and other responsible parties as well as subjects and beneficiaries (which includes tools and material used in the performance of the act, which are also subjects). The moodCode distinguishes between Acts that are meant as factual records, vs. records of intended or ordered services, and the other modalities in which act can appear. + + One of the Participations that all acts have (at least implicitly) is a primary author, who is responsible of the Act and who "owns" the act. Responsibility for the act means responsibility for what is being stated in the Act and as what it is stated. Ownership of the act is assumed in the sense of who may operationally modify the same act. Ownership and responsibility of the Act is not the same as ownership or responsibility of what the Act-object refers to in the real world. The same real world activity can be described by two people, each being the author of their Act, describing the same real world activity. Yet one can be a witness while the other can be a principal performer. The performer has responsibilities for the physical actions; the witness only has responsibility for making a true statement to the best of his or her ability. The two Act-instances may even disagree, but because each is properly attributed to its author, such disagreements can exist side by side and left to arbitration by a recipient of these Act-instances. + + In this sense, an Act-instance represents a "statement" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but "a faithful record of what clinicians have heard, seen, thought, and done." Rector and Nowlan go on saying that "the other requirements for a medical record, e.g., that it be attributable and permanent, follow naturally from this view." Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements. + + Rector and Nolan focus on the electronic medical record as a collection of statements, while attributed statements, these are still mostly factual statements. However, the Act class goes beyond this limitation to attributed factual statements, representing what is known as "speech-acts" in linguistics and philosophy. The notion of speech-act includes that there is pragmatic meaning in language utterances, aside from just factual statements; and that these utterances interact with the real world to change the state of affairs, even directly cause physical activities to happen. For example, an order is a speech act that (provided it is issued adequately) will cause the ordered action to be physically performed. The speech act theory has culminated in the seminal work by Austin (1962) [How to do things with words. Oxford University Press]. + + An activity in the real world may progress from defined, through planned and ordered to executed, which is represented as the mood of the Act. Even though one might think of a single activity as progressing from planned to executed, this progression is reflected by multiple Act-instances, each having one and only one mood that will not change along the Act-instance life cycle. This is because the attribution and content of speech acts along this progression of an activity may be different, and it is often critical that a permanent and faithful record be maintained of this progression. The specification of orders or promises or plans must not be overwritten by the specification of what was actually done, so as to allow comparing actions with their earlier specifications. Act-instances that describe this progression of the same real world activity are linked through the ActRelationships (of the relationship category "sequel"). + + Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent "objective state of affairs" or "real processes" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g., surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information. + */ + ACT, + /** + * Used to group a set of acts sharing a common context. Organizer structures can nest within other context structures - such as where a document is contained within a folder, or a folder is contained within an EHR extract. + */ + _ACTCLASSRECORDORGANIZER, + /** + * A context representing a grouped commitment of information to the EHR. It is considered the unit of modification of the record, the unit of transmission in record extracts, and the unit of attestation by authorizing clinicians. + + A composition represents part of a patient record originating from a single interaction between an authenticator and the record. + + Unless otherwise stated all statements within a composition have the same authenticator, apply to the same patient and were recorded in a single session of use of a single application. + + A composition contains organizers and entries. + */ + COMPOSITION, + /** + * The notion of a document comes particularly from the paper world, where it corresponds to the contents recorded on discrete pieces of paper. In the electronic world, a document is a kind of composition that bears resemblance to their paper world counter-parts. Documents typically are meant to be human-readable. + + HL7's notion of document differs from that described in the W3C XML Recommendation, in which a document refers specifically to the contents that fall between the root element's start-tag and end-tag. Not all XML documents are HL7 documents. + */ + DOC, + /** + * A clinical document is a documentation of clinical observations and services, with the following characteristics: + + + + Persistence - A clinical document continues to exist in an unaltered state, for a time period defined by local and regulatory requirements; + + + + Stewardship - A clinical document is maintained by a person or organization entrusted with its care; + + + + Potential for authentication - A clinical document is an assemblage of information that is intended to be legally authenticated; + + + + Wholeness - Authentication of a clinical document applies to the whole and does not apply to portions of the document without the full context of the document; + + + + Human readability - A clinical document is human readable. + */ + DOCCLIN, + /** + * A clinical document that conforms to Level One of the HL7 Clinical Document Architecture (CDA) + */ + CDALVLONE, + /** + * Description: Container of clinical statements. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or "container tree". + + The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R. + */ + CONTAINER, + /** + * A group of entries within a composition or topic that have a common characteristic - for example, Examination, Diagnosis, Management OR Subjective, Objective, Analysis, Plan. + + The distinction from Topic relates to value sets. For Category there is a bounded list of things like "Examination", "Diagnosis" or SOAP categories. For Topic the list is wide open to any clinical condition or reason for a part of an encounter. + + A CATEGORY MAY CONTAIN ENTRIES. + */ + CATEGORY, + /** + * A context that distinguishes the body of a document from the document header. This is seen, for instance, in HTML documents, which have discrete and elements. + */ + DOCBODY, + /** + * A context that subdivides the body of a document. Document sections are typically used for human navigation, to give a reader a clue as to the expected content. Document sections are used to organize and provide consistency to the contents of a document body. Document sections can contain document sections and can contain entries. + */ + DOCSECT, + /** + * A group of entries within a composition that are related to a common clinical theme - such as a specific disorder or problem, prevention, screening and provision of contraceptive services. + + A topic may contain categories and entries. + */ + TOPIC, + /** + * This context represents the part of a patient record conveyed in a single communication. It is drawn from a providing system for the purposes of communication to a requesting process (which might be another repository, a client application or a middleware service such as an electronic guideline engine), and supporting the faithful inclusion of the communicated data in the receiving system. + + An extract may be the entirety of the patient record as held by the sender or it may be a part of that record (e.g. changes since a specified date). + + An extract contains folders or compositions. + + An extract cannot contain another extract. + */ + EXTRACT, + /** + * A context that comprises all compositions. The EHR is an extract that includes the entire chart. + + + NOTE: In an exchange scenario, an EHR is a specialization of an extract. + */ + EHR, + /** + * A context representing the high-level organization of an extract e.g. to group parts of the record by episode, care team, clinical specialty, clinical condition, or source application. Internationally, this kind of organizing structure is used variably: in some centers and systems the folder is treated as an informal compartmentalization of the overall health record; in others it might represent a significant legal portion of the EHR relating to the originating enterprise or team. + + A folder contains compositions. + + Folders may be nested within folders. + */ + FOLDER, + /** + * Definition: An ACT that organizes a set of component acts into a semantic grouping that share a particular context such as timeframe, patient, etc. + + + UsageNotes: The focus in a GROUPER act is the grouping of the contained acts. For example "a request to group" (RQO), "a type of grouping that is allowed to occur" (DEF), etc. + + Unlike WorkingList, which represents a dynamic, shared, continuously updated collection to provide a "view" of a set of objects, GROUPER collections tend to be static and simply indicate a shared set of semantics. Note that sharing of semantics can be achieved using ACT as well. However, with GROUPER, the sole semantic is of grouping. + */ + GROUPER, + /** + * Description:An ACT that organizes a set of component acts into a semantic grouping that have a shared subject. The subject may be either a subject participation (SBJ), subject act relationship (SUBJ), or child participation/act relationship types. + + + Discussion: The focus in a CLUSTER act is the grouping of the contained acts. For example "a request to cluster" (RQO), "a type of cluster that is allowed to occur" (DEF), etc. + + + Examples: + + + + + Radiologic investigations that might include administration of a dye, followed by radiographic observations; + + + + "Isolate cluster" which includes all testing and specimen processing performed on a specific isolate; + + + + a set of actions to perform at a particular stage in a clinical trial. + */ + CLUSTER, + /** + * An accommodation is a service provided for a Person or other LivingSubject in which a place is provided for the subject to reside for a period of time. Commonly used to track the provision of ward, private and semi-private accommodations for a patient. + */ + ACCM, + /** + * A financial account established to track the net result of financial acts. + */ + ACCT, + /** + * A unit of work, a grouper of work items as defined by the system performing that work. Typically some laboratory order fulfillers communicate references to accessions in their communications regarding laboratory orders. Often one or more specimens are related to an accession such that in some environments the accession number is taken as an identifier for a specimen (group). + */ + ACSN, + /** + * A transformation process where a requested invoice is transformed into an agreed invoice. Represents the adjudication processing of an invoice (claim). Adjudication results can be adjudicated as submitted, with adjustments or refused. + + Adjudication results comprise 2 components: the adjudication processing results and a restated (or adjudicated) invoice or claim + */ + ADJUD, + /** + * An act representing a system action such as the change of state of another act or the initiation of a query. All control acts represent trigger events in the HL7 context. ControlActs may occur in different moods. + */ + CACT, + /** + * Sender asks addressee to do something depending on the focal Act of the payload. An example is "fulfill this order". Addressee has responsibilities to either reject the message or to act on it in an appropriate way (specified by the specific receiver responsibilities for the interaction). + */ + ACTN, + /** + * Sender sends payload to addressee as information. Addressee does not have responsibilities beyond serving addressee's own interest (i.e., read and memorize if you see fit). This is equivalent to an FYI on a memo. + */ + INFO, + /** + * Description: Sender transmits a status change pertaining to the focal act of the payload. This status of the focal act is the final state of the state transition. This can be either a request or an event, according to the mood of the control act. + */ + STC, + /** + * An agreement of obligation between two or more parties that is subject to contractual law and enforcement. + */ + CNTRCT, + /** + * A contract whose value is measured in monetary terms. + */ + FCNTRCT, + /** + * When used in the EVN mood, this concept means with respect to a covered party: + + + + A health care insurance policy or plan that is contractually binding between two or more parties; or + + + + A health care program, usually administered by government entities, that provides coverage to persons determined eligible under the terms of the program. + + + + + + When used in the definition (DEF) mood, COV means potential coverage for a patient who may or may not be a covered party. + + + + The concept's meaning is fully specified by the choice of ActCoverageTypeCode (abstract) ActProgramCode or ActInsurancePolicyCode. + */ + COV, + /** + * Definition: A worry that tends to persist over time and has as its subject a state or process. The subject of the worry has the potential to require intervention or management. + + + Examples: an observation result, procedure, substance administration, equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, allergy, and acute or chronic illness. + */ + CONC, + /** + * A public health case is a Concern about an observation or event that has a specific significance for public health. The creation of a PublicHealthCase initiates the tracking of the object of concern. The decision to track is related to but somewhat independent of the underlying event or observation. + + + UsageNotes: Typically a Public Health Case involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health. + + A public health case definition (Act.moodCode = "definition") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case. + */ + HCASE, + /** + * An Outbreak is a concern resulting from a series of public health cases. + + + UsageNotes: The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak and its ending date is the last date of onset among the cases assigned to the outbreak. The effectiveTime attribute is used to convey the relevant dates for the case. An outbreak definition (Act.moodCode = "definition" includes the criteria for the number, types and occurrence pattern of cases necessary to declare an outbreak and to judge the severity of an outbreak. + */ + OUTBR, + /** + * The Consent class represents informed consents and all similar medico-legal transactions between the patient (or his legal guardian) and the provider. Examples are informed consent for surgical procedures, informed consent for clinical trials, advanced beneficiary notice, against medical advice decline from service, release of information agreement, etc. + + The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act. + + The "signatures" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of "performer", the healthcare provider informing the patient, and "consenter", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public. + + Some consent has a minimum required delay between the consent and the service, so as to allow the patient to rethink his decisions. This minimum delay can be expressed in the act definition by the ActRelationship.pauseQuantity attribute that delays the service until the pause time has elapsed after the consent has been completed. + */ + CONS, + /** + * An Act where a container is registered either via an automated sensor, such as a barcode reader, or by manual receipt + */ + CONTREG, + /** + * An identified point during a clinical trial at which one or more actions are scheduled to be performed (definition mood), or are actually performed (event mood). The actions may or may not involve an encounter between the subject and a healthcare professional. + */ + CTTEVENT, + /** + * An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable. + + Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples: + */ + DISPACT, + /** + * An interaction between entities that provides opportunity for transmission of a physical, chemical, or biological agent from an exposure source entity to an exposure target entity. + + + Examples: The following examples are provided to indicate what interactions are considered exposures rather than other types of Acts: + + + + A patient accidentally receives three times the recommended dose of their medication due to a dosing error. + + + + This is a substance administration. Public health and/or safety authorities may also be interested in documenting this with an associated exposure. + + + + + + A patient accidentally is dispensed an incorrect medicine (e.g., clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore "exposed" to a medicine that there was no therapeutic indication for them to receive. + + + + There are several substance administrations in this example. Public health and/or safety authorities may also be interested in documenting this with associated exposures. + + + + + + In a busy medical ward, a patient is receiving chemotherapy for a lymphoma. Unfortunately, the IV infusion bag containing the medicine splits, spraying cytotoxic medication over the patient being treated and the patient in the adjacent bed. + + + + There are three substance administrations in this example. The first is the intended one (IV infusion) with its associated (implicit) exposure. There is an incident with an associated substance administration to the same patient involving the medication sprayed over the patient as well as an associated exposure. Additionally, the incident includes a substance administration involving the spraying of medication on the adjacent patient, also with an associated exposure. + + + + + + A patient who is a refugee from a war-torn African nation arrives in a busy inner city A&E department suffering from a cough with bloody sputum. Not understanding the registration and triage process, they sit in the waiting room for several hours before it is noticed that they have not booked in. As soon as they are being processed, it is suspected that they are suffering from TB. Vulnerable (immunosuppressed) patients who were sharing the waiting room with this patient may have been exposed to the tubercule bacillus, and must be traced for investigation. + + + + This is an exposure (or possibly multiple exposures) in the waiting room involving the refugee and everyone else in the waiting room during the period. There might also be a number of known or presumed substance administrations (coughing) via several possible routes. The substance administrations are only hypotheses until confirmed by further testing. + + + + + + A patient who has received an elective total hip replacement procedure suffers a prolonged stay in hospital, due to contracting an MRSA infection in the surgical wound site after the surgery. + + + + This is an exposure to MRSA. Although there was some sort of substance administration, it's possible the exact mechanism for introduction of the MRSA into the wound will not be identified. + + + + + + Routine maintenance of the X-ray machines at a local hospital reveals a serious breach of the shielding on one of the machines. Patients who have undergone investigations using that machine in the last month are likely to have been exposed to significantly higher doses of X-rays than was intended, and must be tracked for possible adverse effects. + + + + There has been an exposure of each patient who used the machine in the past 30 days. Some patients may have had substance administrations. + + + + + + A new member of staff is employed in the laundry processing room of a small cottage hospital, and a misreading of the instructions for adding detergents results in fifty times the usual concentration of cleaning materials being added to a batch of hospital bedding. As a result, several patients have been exposed to very high levels of detergents still present in the "clean" bedding, and have experienced dermatological reactions to this. + + + + There has been an incident with multiple exposures to several patients. Although there are substance administrations involving the application of the detergent to the skin of the patients, it is expected that the substance administrations would not be directly documented. + + + + + + Seven patients who are residents in a health care facility for the elderly mentally ill have developed respiratory problems. After several months of various tests having been performed and various medications prescribed to these patients, the problem is traced to their being "sensitive" to a new fungicide used in the wall plaster of the ward where these patients reside. + + + + The patients have been continuously exposed to the fungicide. Although there have been continuous substance administrations (via breathing) this would not normally be documented as a substance administration. + + + + + + A patient with osteoarthritis of the knees is treated symptomatically using analgesia, paracetamol (acetaminophen) 1g up to four times a day for pain relief. His GP does not realize that the patient has, 20 years previously (while at college) had severe alcohol addiction problems, and now, although this is completely under control, his liver has suffered significantly, leaving him more sensitive to hepatic toxicity from paracetamol use. Later that year, the patient returns with a noticeable level of jaundice. Paracetamol is immediately withdrawn and alternative solutions for the knee pain are sought. The jaundice gradually subsides with conservative management, but referral to the gastroenterologist is required for advice and monitoring. + + + + There is a substance administration with an associated exposure. The exposure component is based on the relative toxic level of the substance to a patient with a compromised liver function. + + + + + + A patient goes to their GP complaining of abdominal pain, having been discharged from the local hospital ten days' previously after an emergency appendectomy. The GP can find nothing particularly amiss, and presumes it is post operative surgical pain that will resolve. The patient returns a fortnight later, when the GP prescribes further analgesia, but does decide to request an outpatient surgical follow-up appointment. At this post-surgical outpatient review, the registrar decides to order an ultrasound, which, when performed three weeks later, shows a small faint inexplicable mass. A laparoscopy is then performed, as a day case procedure, and a piece of a surgical swab is removed from the patient's abdominal cavity. Thankfully, a full recovery then takes place. + + + + This is a procedural sequelae. There may be an Incident recorded for this also. + + + + + + A patient is slightly late for a regular pacemaker battery check in the Cardiology department of the local hospital. They are hurrying down the second floor corridor. A sudden summer squall has recently passed over the area, and rain has come in through an open corridor window leaving a small puddle on the corridor floor. In their haste, the patient slips in the puddle and falls so badly that they have to be taken to the A&E department, where it is discovered on investigation they have slightly torn the cruciate ligament in their left knee. + + + + This is not an exposure. There has been an incident. + + + + + + + Usage Notes: This class deals only with opportunity and not the outcome of the exposure; i.e. not all exposed parties will necessarily experience actual harm or benefit. + + Exposure differs from Substance Administration by the absence of the participation of a performer in the act. + + The following participations SHOULD be used with the following participations to distinguish the specific entities: + + + + The exposed entity participates via the "exposure target" (EXPTRGT) participation. + + + + An entity that has carried the agent transmitted in the exposure participates via the "exposure source" (EXSRC) participation. For example: + + + + a person or animal who carried an infectious disease and interacts (EXSRC) with another person or animal (EXPTRGT) transmitting the disease agent; + + + + a place or other environment (EXSRC) and a person or animal (EXPTRGT) who is exposed in the presence of this environment. + + + + + + When it is unknown whether a participating entity is the source of the agent (EXSRC) or the target of the transmission (EXPTRGT), the "exposure participant" (EXPART) is used. + + + + The physical (including energy), chemical or biological substance which is participating in the exposure uses the "exposure agent" (EXPAGNT) participation. There are at least three scenarios: + + + + the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g., ingredient role); or + + + + the player of the Role that participates as EXPAGNT is a mixture known to contain the chemical, radiological or biological substance of interest; or + + + + the player of the Role that participates as a EXPAGNT is known to carry the agent (i.e., the player is a fomite, vector, etc.). + + + + + + The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g., active, aborted, completed) and not the clinical status of the exposure (e.g., probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation. + + + Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g., the first one, concerning a dosing error). + */ + EXPOS, + /** + * Description: + + + An acquisition exposure act describes the proximity (location and time) through which the participating entity was potentially exposed to a physical (including energy), chemical or biological agent from another entity. The acquisition exposure act is used in conjunction with transmission exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion. + + + Constraints: The Acquisition Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPSRC (exposure source) participation must never be associated with the Transmission Exposure either directly or via context conduction. + */ + AEXPOS, + /** + * Description: + + + A transmission exposure act describes the proximity (time and location) over which the participating source entity was capable of transmitting a physical (including energy), chemical or biological substance agent to another entity. The transmission exposure act is used in conjunction with acquisition exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion. + + + Constraints: The Transmission Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPTRGT (exposure target) participation must never be associated with the Transmission Exposure either directly or via context conduction. + */ + TEXPOS, + /** + * An event that occurred outside of the control of one or more of the parties involved. Includes the concept of an accident. + */ + INC, + /** + * The act of transmitting information and understanding about a topic to a subject where the participation association must be SBJ. + + + Discussion: This act may be used to request that a patient or provider be informed about an Act, or to indicate that a person was informed about a particular act. + */ + INFRM, + /** + * Represents concepts related to invoice processing in health care + */ + INVE, + /** + * Working list collects a dynamic list of individual instances of Act via ActRelationship which reflects the need of an individual worker, team of workers, or an organization to manage lists of acts for many different clinical and administrative reasons. Examples of working lists include problem lists, goal lists, allergy lists, and to-do lists. + */ + LIST, + /** + * An officially or unofficially instituted program to track acts of a particular type or categorization. + */ + MPROT, + /** + * Description:An act that is intended to result in new information about a subject. The main difference between Observations and other Acts is that Observations have a value attribute. The code attribute of Observation and the value attribute of Observation must be considered in combination to determine the semantics of the observation. + + + Discussion: + + + Structurally, many observations are name-value-pairs, where the Observation.code (inherited from Act) is the name and the Observation.value is the value of the property. Such a construct is also known as a variable (a named feature that can assume a value) hence, the Observation class is always used to hold generic name-value-pairs or variables, even though the variable valuation may not be the result of an elaborate observation method. It may be a simple answer to a question or it may be an assertion or setting of a parameter. + + As with all Act statements, Observation statements describe what was done, and in the case of Observations, this includes a description of what was actually observed (results or answers); and those results or answers are part of the observation and not split off into other objects. + + The method of action is asserted by the Observation classCode or its subclasses at the least granular level, by the Observation.code attribute value at the medium level of granularity, and by the attribute value of observation.methodCode when a finer level of granularity is required. The method in whole or in part may also appear in the attribute value of Observation.value when using coded data types to express the value of the attribute. Relevant aspects of methodology may also be restated in value when the results themselves imply or state a methodology. + + An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g., blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g., the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations. + + Even though observations are professional acts (see Act) and as such are intentional actions, this does not require that every possible outcome of an observation be pondered in advance of it being actually made. For instance, differential white blood cell counts (WBC) rarely show blasts, but if they do, this is part of the WBC observation even though blasts might not be predefined in the structure of a normal WBC. + + Clinical documents commonly have Subjective and Objective findings, both of which are kinds of Observations. In addition, clinical documents commonly contain Assessments, which are also kinds of Observations. Thus, the establishment of a diagnosis is an Observation. + + + Examples: + + + + + Recording the results of a Family History Assessment + + + + Laboratory test and associated result + + + + Physical exam test and associated result + + + + Device temperature + + + + Soil lead level + */ + OBS, + /** + * Regions of Interest (ROI) within a subject Act. Primarily used for making secondary observations on a subset of a subject observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type "subject" (SUBJ), which must always be present. + */ + _ACTCLASSROI, + /** + * A Region of Interest (ROI) specified for a multidimensional observation, such as an Observation Series (OBSSER). The ROI is specified using a set of observation criteria, each delineating the boundary of the region in one of the dimensions in the multidimensional observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type subject (SUBJ), which must always be present. Each of the boundary criteria observations is connected with the ROI using ActRelationships of type "has component" (COMP). In each boundary criterion, the Act.code names the dimension and the Observation.value specifies the range of values inside the region. Typically the bounded dimension is continuous, and so the Observation.value will be an interval (IVL) data type. The Observation.value need not be specified if the respective dimension is only named but not constrained. For example, an ROI for the QT interval of a certain beat in ECG Lead II would contain 2 boundary criteria, one naming the interval in time (constrained), and the other naming the interval in ECG Lead II (only named, but not constrained). + */ + ROIBND, + /** + * A Region of Interest (ROI) specified for an image using an overlay shape. Typically used to make reference to specific regions in images, e.g., to specify the location of a radiologic finding in an image or to specify the site of a physical finding by "circling" a region in a schematic picture of a human body. The units of the coordinate values are in pixels. The origin is in the upper left hand corner, with positive X values going to the right and positive Y values going down. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type "subject" (SUBJ), which must always be present. + */ + ROIOVL, + /** + * The spatial relationship of a subject whether human, other animal, or plant, to a frame of reference such as gravity or a collection device. + */ + _SUBJECTPHYSICALPOSITION, + /** + * Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + _SUBJECTBODYPOSITION, + /** + * Lying on the left side. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + LLD, + /** + * Lying with the front or ventral surface downward; lying face down. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + PRN, + /** + * Lying on the right side. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + RLD, + /** + * A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + SFWL, + /** + * Resting the body on the buttocks, typically with upper torso erect or semi erect. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + SIT, + /** + * To be stationary, upright, vertical, on one's legs. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + STN, + /** + * Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + SUP, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + RTRD, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised. + + + + Deprecation Comment: + This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system. + */ + TRD, + /** + * An observation identifying a potential adverse outcome as a result of an Act or combination of Acts. + + + Examples: Detection of a drug-drug interaction; Identification of a late-submission for an invoice; Requesting discharge for a patient who does not meet hospital-defined discharge criteria. + + + Discussion: This class is commonly used for identifying 'business rule' or 'process' problems that may result in a refusal to carry out a particular request. In some circumstances it may be possible to 'bypass' a problem by modifying the request to acknowledge the issue and/or by providing some form of mitigation. + + + Constraints: the Act or Acts that may cause the the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id). + */ + ALRT, + /** + * Definition: An observation that is composed of a set of observations. These observations typically have a logical or practical grouping for generally accepted clinical or functional purposes, such as observations that are run together because of automation. A battery can define required and optional component observations and, in some cases, will define complex rules that determine whether or not a particular observation is made. BATTERY is a constraint on the Observation class in that it is understood to always be composed of component observations. + + + UsageNotes: The focus in a BATTERY is that it is composed of individual observations. In request (RQO) mood, a battery is a request to perform the component observations. In event (EVN) mood a battery is a reporting of associated set of observation events. In definition mood a battery is the definition of the associated set of observations. + + + Examples: Vital signs, Full blood count, Chemistry panel. + */ + BATTERY, + /** + * The set of actions that define an experiment to assess the effectiveness and/or safety of a biopharmaceutical product (food, drug, device, etc.). In definition mood, this set of actions is often embodied in a clinical trial protocol; in event mood, this designates the aggregate act of applying the actions to one or more subjects. + */ + CLNTRL, + /** + * An instance of Observation of a Condition at a point in time that includes any Observations or Procedures associated with that Condition as well as links to previous instances of Condition Node for the same Condition + + + + Deprecation Comment: + This concept has been deprecated because an alternative structure for tracking the evolution of a problem has been presented and adopted by the Care Provision Work Group. + */ + CNOD, + /** + * An observable finding or state that persists over time and tends to require intervention or management, and, therefore, distinguished from an Observation made at a point in time; may exist before an Observation of the Condition is made or after interventions to manage the Condition are undertaken. Examples: equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, chronic illness + */ + COND, + /** + * A public health case is an Observation representing a condition or event that has a specific significance for public health. Typically it involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health. An outbreak involving multiple individuals may be considered as a type of public health case. A public health case definition (Act.moodCode = "definition") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. There are also case definitions for outbreaks. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case. + */ + CASE, + /** + * An outbreak represents a series of public health cases. The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak, and its ending date is the last date of onset among the cases assigned to the outbreak. + */ + OUTB, + /** + * Class for holding attributes unique to diagnostic images. + */ + DGIMG, + /** + * Description:An observation of genomic phenomena. + */ + GEN, + /** + * Description:A determinant peptide in a polypeptide as described by polypeptide. + */ + DETPOL, + /** + * Description:An expression level of genes/proteins or other expressed genomic entities. + */ + EXP, + /** + * Description:The position of a gene (or other significant sequence) on the genome. + */ + LOC, + /** + * Description:A genomic phenomenon that is expressed externally in the organism. + */ + PHN, + /** + * Description:A polypeptide resulting from the translation of a gene. + */ + POL, + /** + * Description:A sequence of biomolecule like the DNA, RNA, protein and the like. + */ + SEQ, + /** + * Description:A variation in a sequence as described by BioSequence. + */ + SEQVAR, + /** + * An formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event. This investigation could be conducted at a local institutional level or at the level of a local or national government. + */ + INVSTG, + /** + * Container for Correlated Observation Sequences sharing a common frame of reference. All Observations of the same cd must be comparable and relative to the common frame of reference. For example, a 3-channel ECG device records a 12-lead ECG in 4 steps (3 leads at a time). Each of the separate 3-channel recordings would be in their own "OBSCOR". And, all 4 OBSCOR would be contained in one OBSSER because all the times are relative to the same origin (beginning of the recording) and all the ECG signals were from a fixed set of electrodes. + */ + OBSSER, + /** + * Container for Observation Sequences (Observations whose values are contained in LIST<>'s) having values correlated with each other. Each contained Observation Sequence LIST<> must be the same length. Values in the LIST<>'s are correlated based on index. E.g. the values in position 2 in all the LIST<>'s are correlated. This is analogous to a table where each column is an Observation Sequence with a LIST<> of values, and each row in the table is a correlation between the columns. For example, a 12-lead ECG would contain 13 sequences: one sequence for time, and a sequence for each of the 12 leads. + */ + OBSCOR, + /** + * An observation denoting the physical location of a person or thing based on a reference coordinate system. + */ + POS, + /** + * Description:An observation representing the degree to which the assignment of the spatial coordinates, based on a matching algorithm by a geocoding engine against a reference spatial database, matches true or accepted values. + */ + POSACC, + /** + * Description:An observation representing one of a set of numerical values used to determine the position of a place. The name of the coordinate value is determined by the reference coordinate system. + */ + POSCOORD, + /** + * An observation on a specimen in a laboratory environment that may affect processing, analysis or result interpretation + */ + SPCOBS, + /** + * An act which describes the process whereby a 'verifying party' validates either the existence of the Role attested to by some Credential or the actual Vetting act and its details. + */ + VERIF, + /** + * An Act that of taking on whole or partial responsibility for, or attention to, safety and well-being of a subject of care. + + + Discussion: A care provision event may exist without any other care actions taking place. For example, when a patient is assigned to the care of a particular health professional. + + In request (RQO) mood care provision communicates a referral, which is a request: + + + + from one party (linked as a participant of type author (AUT)), + + + + to another party (linked as a participant of type performer (PRF), + + + + to take responsibility for a scope specified by the code attribute, + + + + for an entity (linked as a participant of type subject (SBJ)). + + + + The scope of the care for which responsibility is taken is identified by code attribute. + + In event (EVN) mood care provision indicates the effective time interval of a specified scope of responsibility by a performer (PRF) or set of performers (PRF) for a subject (SBJ). + + + Examples: + + + + + Referral from GP to a specialist. + + + + Assignment of a patient or group of patients to the case list of a health professional. + + + + Assignment of inpatients to the care of particular nurses for a working shift. + */ + PCPR, + /** + * An interaction between a patient and healthcare participant(s) for the purpose of providing patient service(s) or assessing the health status of a patient. For example, outpatient visit to multiple departments, home health support (including physical therapy), inpatient hospital stay, emergency room visit, field visit (e.g., traffic accident), office visit, occupational therapy, telephone call. + */ + ENC, + /** + * Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by one party on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + */ + POLICY, + /** + * Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by a jurisdiction on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries. + */ + JURISPOL, + /** + * Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed by an organization on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A clinical or research protocols imposed by a payer, a malpractice insurer, or an institution to which a provider must adhere. A mandate imposed by a denominational institution for a provider to provide or withhold certain information from the patient about treatment options. + */ + ORGPOL, + /** + * Description:An ethical or clinical obligation, requirement, rule, or expectation imposed or strongly encouraged by organizations that oversee particular clinical domains or provider certification which define the boundaries within which a provider may practice and which may have legal basis or ramifications on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide. + */ + SCOPOL, + /** + * Description:A requirement, rule, or expectation typically documented as guidelines, protocols, or formularies imposed or strongly encouraged by an organization that oversees or has authority over the practices within a domain, and which may have legal basis or ramifications on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A payer may require a prescribing provider to adhere to formulary guidelines. An institution may adopt clinical guidelines and protocols and implement these within its electronic health record and decision support systems. + */ + STDPOL, + /** + * An Act whose immediate and primary outcome (post-condition) is the alteration of the physical condition of the subject. + + + Examples: : Procedures may involve the disruption of some body surface (e.g. an incision in a surgical procedure), but they also include conservative procedures such as reduction of a luxated join, chiropractic treatment, massage, balneotherapy, acupuncture, shiatsu, etc. Outside of clinical medicine, procedures may be such things as alteration of environments (e.g. straightening rivers, draining swamps, building dams) or the repair or change of machinery etc. + */ + PROC, + /** + * The act of introducing or otherwise applying a substance to the subject. + + + Discussion: The effect of the substance is typically established on a biochemical basis, however, that is not a requirement. For example, radiotherapy can largely be described in the same way, especially if it is a systemic therapy such as radio-iodine. This class also includes the application of chemical treatments to an area. + + + Examples: Chemotherapy protocol; Drug prescription; Vaccination record + */ + SBADM, + /** + * Description: The act of removing a substance from the subject. + */ + SBEXT, + /** + * A procedure for obtaining a specimen from a source entity. + */ + SPECCOLLECT, + /** + * Represents the act of maintaining information about the registration of its associated registered subject. The subject can be either an Act or a Role, and includes subjects such as lab exam definitions, drug protocol definitions, prescriptions, persons, patients, practitioners, and equipment. + + The registration may have a unique identifier - separate from the unique identification of the subject - as well as a core set of related participations and act relationships that characterize the registration event and aid in the disposition of the subject information by a receiving system. + */ + REG, + /** + * The act of examining and evaluating the subject, usually another act. For example, "This prescription needs to be reviewed in 2 months." + */ + REV, + /** + * A procedure or treatment performed on a specimen to prepare it for analysis + */ + SPCTRT, + /** + * Supply orders and deliveries are simple Acts that focus on the delivered product. The product is associated with the Supply Act via Participation.typeCode="product". With general Supply Acts, the precise identification of the Material (manufacturer, serial numbers, etc.) is important. Most of the detailed information about the Supply should be represented using the Material class. If delivery needs to be scheduled, tracked, and billed separately, one can associate a Transportation Act with the Supply Act. Pharmacy dispense services are represented as Supply Acts, associated with a SubstanceAdministration Act. The SubstanceAdministration class represents the administration of medication, while dispensing is supply. + */ + SPLY, + /** + * Diet services are supply services, with some aspects resembling Medication services: the detail of the diet is given as a description of the Material associated via Participation.typeCode="product". Medically relevant diet types may be communicated in the Diet.code attribute using domain ActDietCode, however, the detail of the food supplied and the various combinations of dishes should be communicated as Material instances. + + + Deprecation Note + + + + Class: Use either the Supply class (if dealing with what should be given to the patient) or SubstanceAdministration class (if dealing with what the patient should consume) + + + energyQuantity: This quantity can be conveyed by using a Content relationship with a quantity attribute expressing the calories + + + carbohydrateQuantity:This quantity can be conveyed using a Content relationship to an Entity with a code of carbohydrate and a quantity attribute on the content relationship. + */ + DIET, + /** + * The act of putting something away for safe keeping. The "something" may be physical object such as a specimen, or information, such as observations regarding a specimen. + */ + STORE, + /** + * Definition: Indicates that the subject Act has undergone or should undergo substitution of a type indicated by Act.code. + + Rationale: Used to specify "allowed" substitution when creating orders, "actual" susbstitution when sending events, as well as the reason for the substitution and who was responsible for it. + */ + SUBST, + /** + * Definition: The act of transferring information without the intent of imparting understanding about a topic to the subject that is the recipient or holder of the transferred information where the participation association must be RCV or HLD. + */ + TRFR, + /** + * Transportation is the moving of a payload (people or material) from a location of origin to a destination location. Thus, any transport service has the three target instances of type payload, origin, and destination, besides the targets that are generally used for any service (i.e., performer, device, etc.) + */ + TRNS, + /** + * A sub-class of Act representing any transaction between two accounts whose value is measured in monetary terms. + + In the "intent" mood, communicates a request for a transaction to be initiated, or communicates a transfer of value between two accounts. + + In the "event" mood, communicates the posting of a transaction to an account. + */ + XACT, + /** + * ActClassContainer + */ + _ACTCLASSCONTAINER, + /** + * This context represents the information acquired and recorded for an observation, a clinical statement such as a portion of the patient's history or an inference or assertion, or an action that might be intended or has actually been performed. This class may represent both the actual data describing the observation, inference, or action, and optionally the details supporting the clinical reasoning process such as a reference to an electronic guideline, decision support system, or other knowledge reference. + */ + ENTRY, + /** + * Organizer of entries. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or "organizer tree". + + The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R. + */ + ORGANIZER, + /** + * null + */ + DOCCNTNT, + /** + * null + */ + DOCLIST, + /** + * null + */ + DOCLSTITM, + /** + * null + */ + DOCPARA, + /** + * null + */ + DOCTBL, + /** + * null + */ + LINKHTML, + /** + * null + */ + LOCALATTR, + /** + * null + */ + LOCALMRKP, + /** + * null + */ + ORDERED, + /** + * null + */ + REFR, + /** + * null + */ + TBLCOL, + /** + * null + */ + TBLCOLGP, + /** + * null + */ + TBLDATA, + /** + * null + */ + TBLHDR, + /** + * null + */ + TBLROW, + /** + * null + */ + TBODY, + /** + * null + */ + TFOOT, + /** + * null + */ + THEAD, + /** + * null + */ + UNORDERED, + /** + * added to help the parsers + */ + NULL; + public static V3ActClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ACT".equals(codeString)) + return ACT; + if ("_ActClassRecordOrganizer".equals(codeString)) + return _ACTCLASSRECORDORGANIZER; + if ("COMPOSITION".equals(codeString)) + return COMPOSITION; + if ("DOC".equals(codeString)) + return DOC; + if ("DOCCLIN".equals(codeString)) + return DOCCLIN; + if ("CDALVLONE".equals(codeString)) + return CDALVLONE; + if ("CONTAINER".equals(codeString)) + return CONTAINER; + if ("CATEGORY".equals(codeString)) + return CATEGORY; + if ("DOCBODY".equals(codeString)) + return DOCBODY; + if ("DOCSECT".equals(codeString)) + return DOCSECT; + if ("TOPIC".equals(codeString)) + return TOPIC; + if ("EXTRACT".equals(codeString)) + return EXTRACT; + if ("EHR".equals(codeString)) + return EHR; + if ("FOLDER".equals(codeString)) + return FOLDER; + if ("GROUPER".equals(codeString)) + return GROUPER; + if ("CLUSTER".equals(codeString)) + return CLUSTER; + if ("ACCM".equals(codeString)) + return ACCM; + if ("ACCT".equals(codeString)) + return ACCT; + if ("ACSN".equals(codeString)) + return ACSN; + if ("ADJUD".equals(codeString)) + return ADJUD; + if ("CACT".equals(codeString)) + return CACT; + if ("ACTN".equals(codeString)) + return ACTN; + if ("INFO".equals(codeString)) + return INFO; + if ("STC".equals(codeString)) + return STC; + if ("CNTRCT".equals(codeString)) + return CNTRCT; + if ("FCNTRCT".equals(codeString)) + return FCNTRCT; + if ("COV".equals(codeString)) + return COV; + if ("CONC".equals(codeString)) + return CONC; + if ("HCASE".equals(codeString)) + return HCASE; + if ("OUTBR".equals(codeString)) + return OUTBR; + if ("CONS".equals(codeString)) + return CONS; + if ("CONTREG".equals(codeString)) + return CONTREG; + if ("CTTEVENT".equals(codeString)) + return CTTEVENT; + if ("DISPACT".equals(codeString)) + return DISPACT; + if ("EXPOS".equals(codeString)) + return EXPOS; + if ("AEXPOS".equals(codeString)) + return AEXPOS; + if ("TEXPOS".equals(codeString)) + return TEXPOS; + if ("INC".equals(codeString)) + return INC; + if ("INFRM".equals(codeString)) + return INFRM; + if ("INVE".equals(codeString)) + return INVE; + if ("LIST".equals(codeString)) + return LIST; + if ("MPROT".equals(codeString)) + return MPROT; + if ("OBS".equals(codeString)) + return OBS; + if ("_ActClassROI".equals(codeString)) + return _ACTCLASSROI; + if ("ROIBND".equals(codeString)) + return ROIBND; + if ("ROIOVL".equals(codeString)) + return ROIOVL; + if ("_SubjectPhysicalPosition".equals(codeString)) + return _SUBJECTPHYSICALPOSITION; + if ("_SubjectBodyPosition".equals(codeString)) + return _SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return LLD; + if ("PRN".equals(codeString)) + return PRN; + if ("RLD".equals(codeString)) + return RLD; + if ("SFWL".equals(codeString)) + return SFWL; + if ("SIT".equals(codeString)) + return SIT; + if ("STN".equals(codeString)) + return STN; + if ("SUP".equals(codeString)) + return SUP; + if ("RTRD".equals(codeString)) + return RTRD; + if ("TRD".equals(codeString)) + return TRD; + if ("ALRT".equals(codeString)) + return ALRT; + if ("BATTERY".equals(codeString)) + return BATTERY; + if ("CLNTRL".equals(codeString)) + return CLNTRL; + if ("CNOD".equals(codeString)) + return CNOD; + if ("COND".equals(codeString)) + return COND; + if ("CASE".equals(codeString)) + return CASE; + if ("OUTB".equals(codeString)) + return OUTB; + if ("DGIMG".equals(codeString)) + return DGIMG; + if ("GEN".equals(codeString)) + return GEN; + if ("DETPOL".equals(codeString)) + return DETPOL; + if ("EXP".equals(codeString)) + return EXP; + if ("LOC".equals(codeString)) + return LOC; + if ("PHN".equals(codeString)) + return PHN; + if ("POL".equals(codeString)) + return POL; + if ("SEQ".equals(codeString)) + return SEQ; + if ("SEQVAR".equals(codeString)) + return SEQVAR; + if ("INVSTG".equals(codeString)) + return INVSTG; + if ("OBSSER".equals(codeString)) + return OBSSER; + if ("OBSCOR".equals(codeString)) + return OBSCOR; + if ("POS".equals(codeString)) + return POS; + if ("POSACC".equals(codeString)) + return POSACC; + if ("POSCOORD".equals(codeString)) + return POSCOORD; + if ("SPCOBS".equals(codeString)) + return SPCOBS; + if ("VERIF".equals(codeString)) + return VERIF; + if ("PCPR".equals(codeString)) + return PCPR; + if ("ENC".equals(codeString)) + return ENC; + if ("POLICY".equals(codeString)) + return POLICY; + if ("JURISPOL".equals(codeString)) + return JURISPOL; + if ("ORGPOL".equals(codeString)) + return ORGPOL; + if ("SCOPOL".equals(codeString)) + return SCOPOL; + if ("STDPOL".equals(codeString)) + return STDPOL; + if ("PROC".equals(codeString)) + return PROC; + if ("SBADM".equals(codeString)) + return SBADM; + if ("SBEXT".equals(codeString)) + return SBEXT; + if ("SPECCOLLECT".equals(codeString)) + return SPECCOLLECT; + if ("REG".equals(codeString)) + return REG; + if ("REV".equals(codeString)) + return REV; + if ("SPCTRT".equals(codeString)) + return SPCTRT; + if ("SPLY".equals(codeString)) + return SPLY; + if ("DIET".equals(codeString)) + return DIET; + if ("STORE".equals(codeString)) + return STORE; + if ("SUBST".equals(codeString)) + return SUBST; + if ("TRFR".equals(codeString)) + return TRFR; + if ("TRNS".equals(codeString)) + return TRNS; + if ("XACT".equals(codeString)) + return XACT; + if ("_ActClassContainer".equals(codeString)) + return _ACTCLASSCONTAINER; + if ("ENTRY".equals(codeString)) + return ENTRY; + if ("ORGANIZER".equals(codeString)) + return ORGANIZER; + if ("DOCCNTNT".equals(codeString)) + return DOCCNTNT; + if ("DOCLIST".equals(codeString)) + return DOCLIST; + if ("DOCLSTITM".equals(codeString)) + return DOCLSTITM; + if ("DOCPARA".equals(codeString)) + return DOCPARA; + if ("DOCTBL".equals(codeString)) + return DOCTBL; + if ("LINKHTML".equals(codeString)) + return LINKHTML; + if ("LOCALATTR".equals(codeString)) + return LOCALATTR; + if ("LOCALMRKP".equals(codeString)) + return LOCALMRKP; + if ("ordered".equals(codeString)) + return ORDERED; + if ("REFR".equals(codeString)) + return REFR; + if ("TBLCOL".equals(codeString)) + return TBLCOL; + if ("TBLCOLGP".equals(codeString)) + return TBLCOLGP; + if ("TBLDATA".equals(codeString)) + return TBLDATA; + if ("TBLHDR".equals(codeString)) + return TBLHDR; + if ("TBLROW".equals(codeString)) + return TBLROW; + if ("tbody".equals(codeString)) + return TBODY; + if ("tfoot".equals(codeString)) + return TFOOT; + if ("thead".equals(codeString)) + return THEAD; + if ("unordered".equals(codeString)) + return UNORDERED; + throw new FHIRException("Unknown V3ActClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACT: return "ACT"; + case _ACTCLASSRECORDORGANIZER: return "_ActClassRecordOrganizer"; + case COMPOSITION: return "COMPOSITION"; + case DOC: return "DOC"; + case DOCCLIN: return "DOCCLIN"; + case CDALVLONE: return "CDALVLONE"; + case CONTAINER: return "CONTAINER"; + case CATEGORY: return "CATEGORY"; + case DOCBODY: return "DOCBODY"; + case DOCSECT: return "DOCSECT"; + case TOPIC: return "TOPIC"; + case EXTRACT: return "EXTRACT"; + case EHR: return "EHR"; + case FOLDER: return "FOLDER"; + case GROUPER: return "GROUPER"; + case CLUSTER: return "CLUSTER"; + case ACCM: return "ACCM"; + case ACCT: return "ACCT"; + case ACSN: return "ACSN"; + case ADJUD: return "ADJUD"; + case CACT: return "CACT"; + case ACTN: return "ACTN"; + case INFO: return "INFO"; + case STC: return "STC"; + case CNTRCT: return "CNTRCT"; + case FCNTRCT: return "FCNTRCT"; + case COV: return "COV"; + case CONC: return "CONC"; + case HCASE: return "HCASE"; + case OUTBR: return "OUTBR"; + case CONS: return "CONS"; + case CONTREG: return "CONTREG"; + case CTTEVENT: return "CTTEVENT"; + case DISPACT: return "DISPACT"; + case EXPOS: return "EXPOS"; + case AEXPOS: return "AEXPOS"; + case TEXPOS: return "TEXPOS"; + case INC: return "INC"; + case INFRM: return "INFRM"; + case INVE: return "INVE"; + case LIST: return "LIST"; + case MPROT: return "MPROT"; + case OBS: return "OBS"; + case _ACTCLASSROI: return "_ActClassROI"; + case ROIBND: return "ROIBND"; + case ROIOVL: return "ROIOVL"; + case _SUBJECTPHYSICALPOSITION: return "_SubjectPhysicalPosition"; + case _SUBJECTBODYPOSITION: return "_SubjectBodyPosition"; + case LLD: return "LLD"; + case PRN: return "PRN"; + case RLD: return "RLD"; + case SFWL: return "SFWL"; + case SIT: return "SIT"; + case STN: return "STN"; + case SUP: return "SUP"; + case RTRD: return "RTRD"; + case TRD: return "TRD"; + case ALRT: return "ALRT"; + case BATTERY: return "BATTERY"; + case CLNTRL: return "CLNTRL"; + case CNOD: return "CNOD"; + case COND: return "COND"; + case CASE: return "CASE"; + case OUTB: return "OUTB"; + case DGIMG: return "DGIMG"; + case GEN: return "GEN"; + case DETPOL: return "DETPOL"; + case EXP: return "EXP"; + case LOC: return "LOC"; + case PHN: return "PHN"; + case POL: return "POL"; + case SEQ: return "SEQ"; + case SEQVAR: return "SEQVAR"; + case INVSTG: return "INVSTG"; + case OBSSER: return "OBSSER"; + case OBSCOR: return "OBSCOR"; + case POS: return "POS"; + case POSACC: return "POSACC"; + case POSCOORD: return "POSCOORD"; + case SPCOBS: return "SPCOBS"; + case VERIF: return "VERIF"; + case PCPR: return "PCPR"; + case ENC: return "ENC"; + case POLICY: return "POLICY"; + case JURISPOL: return "JURISPOL"; + case ORGPOL: return "ORGPOL"; + case SCOPOL: return "SCOPOL"; + case STDPOL: return "STDPOL"; + case PROC: return "PROC"; + case SBADM: return "SBADM"; + case SBEXT: return "SBEXT"; + case SPECCOLLECT: return "SPECCOLLECT"; + case REG: return "REG"; + case REV: return "REV"; + case SPCTRT: return "SPCTRT"; + case SPLY: return "SPLY"; + case DIET: return "DIET"; + case STORE: return "STORE"; + case SUBST: return "SUBST"; + case TRFR: return "TRFR"; + case TRNS: return "TRNS"; + case XACT: return "XACT"; + case _ACTCLASSCONTAINER: return "_ActClassContainer"; + case ENTRY: return "ENTRY"; + case ORGANIZER: return "ORGANIZER"; + case DOCCNTNT: return "DOCCNTNT"; + case DOCLIST: return "DOCLIST"; + case DOCLSTITM: return "DOCLSTITM"; + case DOCPARA: return "DOCPARA"; + case DOCTBL: return "DOCTBL"; + case LINKHTML: return "LINKHTML"; + case LOCALATTR: return "LOCALATTR"; + case LOCALMRKP: return "LOCALMRKP"; + case ORDERED: return "ordered"; + case REFR: return "REFR"; + case TBLCOL: return "TBLCOL"; + case TBLCOLGP: return "TBLCOLGP"; + case TBLDATA: return "TBLDATA"; + case TBLHDR: return "TBLHDR"; + case TBLROW: return "TBLROW"; + case TBODY: return "tbody"; + case TFOOT: return "tfoot"; + case THEAD: return "thead"; + case UNORDERED: return "unordered"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActClass"; + } + public String getDefinition() { + switch (this) { + case ACT: return "A record of something that is being done, has been done, can be done, or is intended or requested to be done.\r\n\n \n Examples:The kinds of acts that are common in health care are (1) a clinical observation, (2) an assessment of health condition (such as problems and diagnoses), (3) healthcare goals, (4) treatment services (such as medication, surgery, physical and psychological therapy), (5) assisting, monitoring or attending, (6) training and education services to patients and their next of kin, (7) and notary services (such as advanced directives or living will), (8) editing and maintaining documents, and many others.\r\n\n \n Discussion and Rationale: Acts are the pivot of the RIM; all domain information and processes are represented primarily in Acts. Any profession or business, including healthcare, is primarily constituted of intentional and occasionally non-intentional actions, performed and recorded by responsible actors. An Act-instance is a record of such an action.\r\n\n Acts connect to Entities in their Roles through Participations and connect to other Acts through ActRelationships. Participations are the authors, performers and other responsible parties as well as subjects and beneficiaries (which includes tools and material used in the performance of the act, which are also subjects). The moodCode distinguishes between Acts that are meant as factual records, vs. records of intended or ordered services, and the other modalities in which act can appear.\r\n\n One of the Participations that all acts have (at least implicitly) is a primary author, who is responsible of the Act and who \"owns\" the act. Responsibility for the act means responsibility for what is being stated in the Act and as what it is stated. Ownership of the act is assumed in the sense of who may operationally modify the same act. Ownership and responsibility of the Act is not the same as ownership or responsibility of what the Act-object refers to in the real world. The same real world activity can be described by two people, each being the author of their Act, describing the same real world activity. Yet one can be a witness while the other can be a principal performer. The performer has responsibilities for the physical actions; the witness only has responsibility for making a true statement to the best of his or her ability. The two Act-instances may even disagree, but because each is properly attributed to its author, such disagreements can exist side by side and left to arbitration by a recipient of these Act-instances.\r\n\n In this sense, an Act-instance represents a \"statement\" according to Rector and Nowlan (1991) [Foundations for an electronic medical record. Methods Inf Med. 30.] Rector and Nowlan have emphasized the importance of understanding the medical record not as a collection of facts, but \"a faithful record of what clinicians have heard, seen, thought, and done.\" Rector and Nowlan go on saying that \"the other requirements for a medical record, e.g., that it be attributable and permanent, follow naturally from this view.\" Indeed the Act class is this attributable statement, and the rules of updating acts (discussed in the state-transition model, see Act.statusCode) versus generating new Act-instances are designed according to this principle of permanent attributable statements.\r\n\n Rector and Nolan focus on the electronic medical record as a collection of statements, while attributed statements, these are still mostly factual statements. However, the Act class goes beyond this limitation to attributed factual statements, representing what is known as \"speech-acts\" in linguistics and philosophy. The notion of speech-act includes that there is pragmatic meaning in language utterances, aside from just factual statements; and that these utterances interact with the real world to change the state of affairs, even directly cause physical activities to happen. For example, an order is a speech act that (provided it is issued adequately) will cause the ordered action to be physically performed. The speech act theory has culminated in the seminal work by Austin (1962) [How to do things with words. Oxford University Press].\r\n\n An activity in the real world may progress from defined, through planned and ordered to executed, which is represented as the mood of the Act. Even though one might think of a single activity as progressing from planned to executed, this progression is reflected by multiple Act-instances, each having one and only one mood that will not change along the Act-instance life cycle. This is because the attribution and content of speech acts along this progression of an activity may be different, and it is often critical that a permanent and faithful record be maintained of this progression. The specification of orders or promises or plans must not be overwritten by the specification of what was actually done, so as to allow comparing actions with their earlier specifications. Act-instances that describe this progression of the same real world activity are linked through the ActRelationships (of the relationship category \"sequel\").\r\n\n Act as statements or speech-acts are the only representation of real world facts or processes in the HL7 RIM. The truth about the real world is constructed through a combination (and arbitration) of such attributed statements only, and there is no class in the RIM whose objects represent \"objective state of affairs\" or \"real processes\" independent from attributed statements. As such, there is no distinction between an activity and its documentation. Every Act includes both to varying degrees. For example, a factual statement made about recent (but past) activities, authored (and signed) by the performer of such activities, is commonly known as a procedure report or original documentation (e.g., surgical procedure report, clinic note etc.). Conversely, a status update on an activity that is presently in progress, authored by the performer (or a close observer) is considered to capture that activity (and is later superceded by a full procedure report). However, both status update and procedure report are acts of the same kind, only distinguished by mood and state (see statusCode) and completeness of the information."; + case _ACTCLASSRECORDORGANIZER: return "Used to group a set of acts sharing a common context. Organizer structures can nest within other context structures - such as where a document is contained within a folder, or a folder is contained within an EHR extract."; + case COMPOSITION: return "A context representing a grouped commitment of information to the EHR. It is considered the unit of modification of the record, the unit of transmission in record extracts, and the unit of attestation by authorizing clinicians.\r\n\n A composition represents part of a patient record originating from a single interaction between an authenticator and the record.\r\n\n Unless otherwise stated all statements within a composition have the same authenticator, apply to the same patient and were recorded in a single session of use of a single application.\r\n\n A composition contains organizers and entries."; + case DOC: return "The notion of a document comes particularly from the paper world, where it corresponds to the contents recorded on discrete pieces of paper. In the electronic world, a document is a kind of composition that bears resemblance to their paper world counter-parts. Documents typically are meant to be human-readable.\r\n\n HL7's notion of document differs from that described in the W3C XML Recommendation, in which a document refers specifically to the contents that fall between the root element's start-tag and end-tag. Not all XML documents are HL7 documents."; + case DOCCLIN: return "A clinical document is a documentation of clinical observations and services, with the following characteristics:\r\n\n \n \n Persistence - A clinical document continues to exist in an unaltered state, for a time period defined by local and regulatory requirements; \r\n\n \n \n Stewardship - A clinical document is maintained by a person or organization entrusted with its care; \r\n\n \n \n Potential for authentication - A clinical document is an assemblage of information that is intended to be legally authenticated; \r\n\n \n \n Wholeness - Authentication of a clinical document applies to the whole and does not apply to portions of the document without the full context of the document;\r\n\n \n \n Human readability - A clinical document is human readable."; + case CDALVLONE: return "A clinical document that conforms to Level One of the HL7 Clinical Document Architecture (CDA)"; + case CONTAINER: return "Description: Container of clinical statements. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or \"container tree\".\r\n\n The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R."; + case CATEGORY: return "A group of entries within a composition or topic that have a common characteristic - for example, Examination, Diagnosis, Management OR Subjective, Objective, Analysis, Plan.\r\n\n The distinction from Topic relates to value sets. For Category there is a bounded list of things like \"Examination\", \"Diagnosis\" or SOAP categories. For Topic the list is wide open to any clinical condition or reason for a part of an encounter.\r\n\n A CATEGORY MAY CONTAIN ENTRIES."; + case DOCBODY: return "A context that distinguishes the body of a document from the document header. This is seen, for instance, in HTML documents, which have discrete and elements."; + case DOCSECT: return "A context that subdivides the body of a document. Document sections are typically used for human navigation, to give a reader a clue as to the expected content. Document sections are used to organize and provide consistency to the contents of a document body. Document sections can contain document sections and can contain entries."; + case TOPIC: return "A group of entries within a composition that are related to a common clinical theme - such as a specific disorder or problem, prevention, screening and provision of contraceptive services.\r\n\n A topic may contain categories and entries."; + case EXTRACT: return "This context represents the part of a patient record conveyed in a single communication. It is drawn from a providing system for the purposes of communication to a requesting process (which might be another repository, a client application or a middleware service such as an electronic guideline engine), and supporting the faithful inclusion of the communicated data in the receiving system.\r\n\n An extract may be the entirety of the patient record as held by the sender or it may be a part of that record (e.g. changes since a specified date).\r\n\n An extract contains folders or compositions.\r\n\n An extract cannot contain another extract."; + case EHR: return "A context that comprises all compositions. The EHR is an extract that includes the entire chart.\r\n\n \n NOTE: In an exchange scenario, an EHR is a specialization of an extract."; + case FOLDER: return "A context representing the high-level organization of an extract e.g. to group parts of the record by episode, care team, clinical specialty, clinical condition, or source application. Internationally, this kind of organizing structure is used variably: in some centers and systems the folder is treated as an informal compartmentalization of the overall health record; in others it might represent a significant legal portion of the EHR relating to the originating enterprise or team.\r\n\n A folder contains compositions.\r\n\n Folders may be nested within folders."; + case GROUPER: return "Definition: An ACT that organizes a set of component acts into a semantic grouping that share a particular context such as timeframe, patient, etc.\r\n\n \n UsageNotes: The focus in a GROUPER act is the grouping of the contained acts. For example \"a request to group\" (RQO), \"a type of grouping that is allowed to occur\" (DEF), etc.\r\n\n Unlike WorkingList, which represents a dynamic, shared, continuously updated collection to provide a \"view\" of a set of objects, GROUPER collections tend to be static and simply indicate a shared set of semantics. Note that sharing of semantics can be achieved using ACT as well. However, with GROUPER, the sole semantic is of grouping."; + case CLUSTER: return "Description:An ACT that organizes a set of component acts into a semantic grouping that have a shared subject. The subject may be either a subject participation (SBJ), subject act relationship (SUBJ), or child participation/act relationship types.\r\n\n \n Discussion: The focus in a CLUSTER act is the grouping of the contained acts. For example \"a request to cluster\" (RQO), \"a type of cluster that is allowed to occur\" (DEF), etc.\r\n\n \n Examples: \n \r\n\n \n \n Radiologic investigations that might include administration of a dye, followed by radiographic observations;\r\n\n \n \n \"Isolate cluster\" which includes all testing and specimen processing performed on a specific isolate;\r\n\n \n \n a set of actions to perform at a particular stage in a clinical trial."; + case ACCM: return "An accommodation is a service provided for a Person or other LivingSubject in which a place is provided for the subject to reside for a period of time. Commonly used to track the provision of ward, private and semi-private accommodations for a patient."; + case ACCT: return "A financial account established to track the net result of financial acts."; + case ACSN: return "A unit of work, a grouper of work items as defined by the system performing that work. Typically some laboratory order fulfillers communicate references to accessions in their communications regarding laboratory orders. Often one or more specimens are related to an accession such that in some environments the accession number is taken as an identifier for a specimen (group)."; + case ADJUD: return "A transformation process where a requested invoice is transformed into an agreed invoice. Represents the adjudication processing of an invoice (claim). Adjudication results can be adjudicated as submitted, with adjustments or refused.\r\n\n Adjudication results comprise 2 components: the adjudication processing results and a restated (or adjudicated) invoice or claim"; + case CACT: return "An act representing a system action such as the change of state of another act or the initiation of a query. All control acts represent trigger events in the HL7 context. ControlActs may occur in different moods."; + case ACTN: return "Sender asks addressee to do something depending on the focal Act of the payload. An example is \"fulfill this order\". Addressee has responsibilities to either reject the message or to act on it in an appropriate way (specified by the specific receiver responsibilities for the interaction)."; + case INFO: return "Sender sends payload to addressee as information. Addressee does not have responsibilities beyond serving addressee's own interest (i.e., read and memorize if you see fit). This is equivalent to an FYI on a memo."; + case STC: return "Description: Sender transmits a status change pertaining to the focal act of the payload. This status of the focal act is the final state of the state transition. This can be either a request or an event, according to the mood of the control act."; + case CNTRCT: return "An agreement of obligation between two or more parties that is subject to contractual law and enforcement."; + case FCNTRCT: return "A contract whose value is measured in monetary terms."; + case COV: return "When used in the EVN mood, this concept means with respect to a covered party:\r\n\n \n \n A health care insurance policy or plan that is contractually binding between two or more parties; or \r\n\n \n \n A health care program, usually administered by government entities, that provides coverage to persons determined eligible under the terms of the program.\r\n\n \n \n \n \n When used in the definition (DEF) mood, COV means potential coverage for a patient who may or may not be a covered party.\r\n\n \n \n The concept's meaning is fully specified by the choice of ActCoverageTypeCode (abstract) ActProgramCode or ActInsurancePolicyCode."; + case CONC: return "Definition: A worry that tends to persist over time and has as its subject a state or process. The subject of the worry has the potential to require intervention or management.\r\n\n \n Examples: an observation result, procedure, substance administration, equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, allergy, and acute or chronic illness."; + case HCASE: return "A public health case is a Concern about an observation or event that has a specific significance for public health. The creation of a PublicHealthCase initiates the tracking of the object of concern. The decision to track is related to but somewhat independent of the underlying event or observation.\r\n\n \n UsageNotes: Typically a Public Health Case involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health.\r\n\n A public health case definition (Act.moodCode = \"definition\") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case."; + case OUTBR: return "An Outbreak is a concern resulting from a series of public health cases.\r\n\n \n UsageNotes: The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak and its ending date is the last date of onset among the cases assigned to the outbreak. The effectiveTime attribute is used to convey the relevant dates for the case. An outbreak definition (Act.moodCode = \"definition\" includes the criteria for the number, types and occurrence pattern of cases necessary to declare an outbreak and to judge the severity of an outbreak."; + case CONS: return "The Consent class represents informed consents and all similar medico-legal transactions between the patient (or his legal guardian) and the provider. Examples are informed consent for surgical procedures, informed consent for clinical trials, advanced beneficiary notice, against medical advice decline from service, release of information agreement, etc.\r\n\n The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act.\r\n\n The \"signatures\" to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of \"performer\", the healthcare provider informing the patient, and \"consenter\", the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public.\r\n\n Some consent has a minimum required delay between the consent and the service, so as to allow the patient to rethink his decisions. This minimum delay can be expressed in the act definition by the ActRelationship.pauseQuantity attribute that delays the service until the pause time has elapsed after the consent has been completed."; + case CONTREG: return "An Act where a container is registered either via an automated sensor, such as a barcode reader, or by manual receipt"; + case CTTEVENT: return "An identified point during a clinical trial at which one or more actions are scheduled to be performed (definition mood), or are actually performed (event mood). The actions may or may not involve an encounter between the subject and a healthcare professional."; + case DISPACT: return "An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable.\r\n\n Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples:"; + case EXPOS: return "An interaction between entities that provides opportunity for transmission of a physical, chemical, or biological agent from an exposure source entity to an exposure target entity.\r\n\n \n Examples: The following examples are provided to indicate what interactions are considered exposures rather than other types of Acts:\r\n\n \n \n A patient accidentally receives three times the recommended dose of their medication due to a dosing error. \r\n\n \n \n This is a substance administration. Public health and/or safety authorities may also be interested in documenting this with an associated exposure.\r\n\n \n \n \n \n A patient accidentally is dispensed an incorrect medicine (e.g., clomiphene instead of clomipramine). They have taken several doses before the mistake is detected. They are therefore \"exposed\" to a medicine that there was no therapeutic indication for them to receive. \r\n\n \n \n There are several substance administrations in this example. Public health and/or safety authorities may also be interested in documenting this with associated exposures.\r\n\n \n \n \n \n In a busy medical ward, a patient is receiving chemotherapy for a lymphoma. Unfortunately, the IV infusion bag containing the medicine splits, spraying cytotoxic medication over the patient being treated and the patient in the adjacent bed. \r\n\n \n \n There are three substance administrations in this example. The first is the intended one (IV infusion) with its associated (implicit) exposure. There is an incident with an associated substance administration to the same patient involving the medication sprayed over the patient as well as an associated exposure. Additionally, the incident includes a substance administration involving the spraying of medication on the adjacent patient, also with an associated exposure.\r\n\n \n \n \n \n A patient who is a refugee from a war-torn African nation arrives in a busy inner city A&E department suffering from a cough with bloody sputum. Not understanding the registration and triage process, they sit in the waiting room for several hours before it is noticed that they have not booked in. As soon as they are being processed, it is suspected that they are suffering from TB. Vulnerable (immunosuppressed) patients who were sharing the waiting room with this patient may have been exposed to the tubercule bacillus, and must be traced for investigation. \r\n\n \n \n This is an exposure (or possibly multiple exposures) in the waiting room involving the refugee and everyone else in the waiting room during the period. There might also be a number of known or presumed substance administrations (coughing) via several possible routes. The substance administrations are only hypotheses until confirmed by further testing.\r\n\n \n \n \n \n A patient who has received an elective total hip replacement procedure suffers a prolonged stay in hospital, due to contracting an MRSA infection in the surgical wound site after the surgery. \r\n\n \n \n This is an exposure to MRSA. Although there was some sort of substance administration, it's possible the exact mechanism for introduction of the MRSA into the wound will not be identified.\r\n\n \n \n \n \n Routine maintenance of the X-ray machines at a local hospital reveals a serious breach of the shielding on one of the machines. Patients who have undergone investigations using that machine in the last month are likely to have been exposed to significantly higher doses of X-rays than was intended, and must be tracked for possible adverse effects. \r\n\n \n \n There has been an exposure of each patient who used the machine in the past 30 days. Some patients may have had substance administrations.\r\n\n \n \n \n \n A new member of staff is employed in the laundry processing room of a small cottage hospital, and a misreading of the instructions for adding detergents results in fifty times the usual concentration of cleaning materials being added to a batch of hospital bedding. As a result, several patients have been exposed to very high levels of detergents still present in the \"clean\" bedding, and have experienced dermatological reactions to this. \r\n\n \n \n There has been an incident with multiple exposures to several patients. Although there are substance administrations involving the application of the detergent to the skin of the patients, it is expected that the substance administrations would not be directly documented.\r\n\n \n \n \n \n Seven patients who are residents in a health care facility for the elderly mentally ill have developed respiratory problems. After several months of various tests having been performed and various medications prescribed to these patients, the problem is traced to their being \"sensitive\" to a new fungicide used in the wall plaster of the ward where these patients reside.\r\n\n \n \n The patients have been continuously exposed to the fungicide. Although there have been continuous substance administrations (via breathing) this would not normally be documented as a substance administration.\r\n\n \n \n \n \n A patient with osteoarthritis of the knees is treated symptomatically using analgesia, paracetamol (acetaminophen) 1g up to four times a day for pain relief. His GP does not realize that the patient has, 20 years previously (while at college) had severe alcohol addiction problems, and now, although this is completely under control, his liver has suffered significantly, leaving him more sensitive to hepatic toxicity from paracetamol use. Later that year, the patient returns with a noticeable level of jaundice. Paracetamol is immediately withdrawn and alternative solutions for the knee pain are sought. The jaundice gradually subsides with conservative management, but referral to the gastroenterologist is required for advice and monitoring. \r\n\n \n \n There is a substance administration with an associated exposure. The exposure component is based on the relative toxic level of the substance to a patient with a compromised liver function.\r\n\n \n \n \n \n A patient goes to their GP complaining of abdominal pain, having been discharged from the local hospital ten days' previously after an emergency appendectomy. The GP can find nothing particularly amiss, and presumes it is post operative surgical pain that will resolve. The patient returns a fortnight later, when the GP prescribes further analgesia, but does decide to request an outpatient surgical follow-up appointment. At this post-surgical outpatient review, the registrar decides to order an ultrasound, which, when performed three weeks later, shows a small faint inexplicable mass. A laparoscopy is then performed, as a day case procedure, and a piece of a surgical swab is removed from the patient's abdominal cavity. Thankfully, a full recovery then takes place. \r\n\n \n \n This is a procedural sequelae. There may be an Incident recorded for this also.\r\n\n \n \n \n \n A patient is slightly late for a regular pacemaker battery check in the Cardiology department of the local hospital. They are hurrying down the second floor corridor. A sudden summer squall has recently passed over the area, and rain has come in through an open corridor window leaving a small puddle on the corridor floor. In their haste, the patient slips in the puddle and falls so badly that they have to be taken to the A&E department, where it is discovered on investigation they have slightly torn the cruciate ligament in their left knee. \r\n\n \n \n This is not an exposure. There has been an incident. \r\n\n \n \n \n \n \n Usage Notes: This class deals only with opportunity and not the outcome of the exposure; i.e. not all exposed parties will necessarily experience actual harm or benefit.\r\n\n Exposure differs from Substance Administration by the absence of the participation of a performer in the act. \r\n\n The following participations SHOULD be used with the following participations to distinguish the specific entities:\r\n\n \n \n The exposed entity participates via the \"exposure target\" (EXPTRGT) participation.\r\n\n \n \n An entity that has carried the agent transmitted in the exposure participates via the \"exposure source\" (EXSRC) participation. For example: \r\n\n \n \n a person or animal who carried an infectious disease and interacts (EXSRC) with another person or animal (EXPTRGT) transmitting the disease agent;\r\n\n \n \n a place or other environment (EXSRC) and a person or animal (EXPTRGT) who is exposed in the presence of this environment.\r\n\n \n \n \n \n When it is unknown whether a participating entity is the source of the agent (EXSRC) or the target of the transmission (EXPTRGT), the \"exposure participant\" (EXPART) is used.\r\n\n \n \n The physical (including energy), chemical or biological substance which is participating in the exposure uses the \"exposure agent\" (EXPAGNT) participation. There are at least three scenarios:\r\n\n \n \n the player of the Role that participates as EXPAGNT is the chemical or biological substance mixed or carried by the scoper-entity of the Role (e.g., ingredient role); or \r\n\n \n \n the player of the Role that participates as EXPAGNT is a mixture known to contain the chemical, radiological or biological substance of interest; or \r\n\n \n \n the player of the Role that participates as a EXPAGNT is known to carry the agent (i.e., the player is a fomite, vector, etc.).\r\n\n \n \n \n \n The Exposure.statusCode attribute should be interpreted as the state of the Exposure business object (e.g., active, aborted, completed) and not the clinical status of the exposure (e.g., probable, confirmed). The clinical status of the exposure should be associated with the exposure via a subject observation.\r\n\n \n Design Comment: The usage notes require a clear criterion for determining whether an act is an exposure or substance administration-deleterious potential, uncertainty of actual transmission, or otherwise. SBADM states that the criterion is the presence of a performer-but there are examples above that call this criterion into question (e.g., the first one, concerning a dosing error)."; + case AEXPOS: return "Description: \n \r\n\n An acquisition exposure act describes the proximity (location and time) through which the participating entity was potentially exposed to a physical (including energy), chemical or biological agent from another entity. The acquisition exposure act is used in conjunction with transmission exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion.\r\n\n \n Constraints: The Acquisition Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPSRC (exposure source) participation must never be associated with the Transmission Exposure either directly or via context conduction."; + case TEXPOS: return "Description: \n \r\n\n A transmission exposure act describes the proximity (time and location) over which the participating source entity was capable of transmitting a physical (including energy), chemical or biological substance agent to another entity. The transmission exposure act is used in conjunction with acquisition exposure acts as part of an analysis technique for contact tracing. Although an exposure can be decomposed into transmission and acquisition exposures, there is no requirement that all exposures be treated in this fashion.\r\n\n \n Constraints: The Transmission Exposure inherits the participation constraints that apply to Exposure with the following exception. The EXPTRGT (exposure target) participation must never be associated with the Transmission Exposure either directly or via context conduction."; + case INC: return "An event that occurred outside of the control of one or more of the parties involved. Includes the concept of an accident."; + case INFRM: return "The act of transmitting information and understanding about a topic to a subject where the participation association must be SBJ.\r\n\n \n Discussion: This act may be used to request that a patient or provider be informed about an Act, or to indicate that a person was informed about a particular act."; + case INVE: return "Represents concepts related to invoice processing in health care"; + case LIST: return "Working list collects a dynamic list of individual instances of Act via ActRelationship which reflects the need of an individual worker, team of workers, or an organization to manage lists of acts for many different clinical and administrative reasons. Examples of working lists include problem lists, goal lists, allergy lists, and to-do lists."; + case MPROT: return "An officially or unofficially instituted program to track acts of a particular type or categorization."; + case OBS: return "Description:An act that is intended to result in new information about a subject. The main difference between Observations and other Acts is that Observations have a value attribute. The code attribute of Observation and the value attribute of Observation must be considered in combination to determine the semantics of the observation.\r\n\n \n Discussion:\n \r\n\n Structurally, many observations are name-value-pairs, where the Observation.code (inherited from Act) is the name and the Observation.value is the value of the property. Such a construct is also known as a variable (a named feature that can assume a value) hence, the Observation class is always used to hold generic name-value-pairs or variables, even though the variable valuation may not be the result of an elaborate observation method. It may be a simple answer to a question or it may be an assertion or setting of a parameter.\r\n\n As with all Act statements, Observation statements describe what was done, and in the case of Observations, this includes a description of what was actually observed (results or answers); and those results or answers are part of the observation and not split off into other objects. \r\n\n The method of action is asserted by the Observation classCode or its subclasses at the least granular level, by the Observation.code attribute value at the medium level of granularity, and by the attribute value of observation.methodCode when a finer level of granularity is required. The method in whole or in part may also appear in the attribute value of Observation.value when using coded data types to express the value of the attribute. Relevant aspects of methodology may also be restated in value when the results themselves imply or state a methodology.\r\n\n An observation may consist of component observations each having their own Observation.code and Observation.value. In this case, the composite observation may not have an Observation.value for itself. For instance, a white blood cell count consists of the sub-observations for the counts of the various granulocytes, lymphocytes and other normal or abnormal blood cells (e.g., blasts). The overall white blood cell count Observation itself may therefore not have a value by itself (even though it could have one, e.g., the sum total of white blood cells). Thus, as long as an Act is essentially an Act of recognizing and noting information about a subject, it is an Observation, regardless of whether it has a simple value by itself or whether it has sub-observations.\r\n\n Even though observations are professional acts (see Act) and as such are intentional actions, this does not require that every possible outcome of an observation be pondered in advance of it being actually made. For instance, differential white blood cell counts (WBC) rarely show blasts, but if they do, this is part of the WBC observation even though blasts might not be predefined in the structure of a normal WBC. \r\n\n Clinical documents commonly have Subjective and Objective findings, both of which are kinds of Observations. In addition, clinical documents commonly contain Assessments, which are also kinds of Observations. Thus, the establishment of a diagnosis is an Observation. \r\n\n \n Examples:\n \r\n\n \n \n Recording the results of a Family History Assessment\r\n\n \n \n Laboratory test and associated result\r\n\n \n \n Physical exam test and associated result\r\n\n \n \n Device temperature\r\n\n \n \n Soil lead level"; + case _ACTCLASSROI: return "Regions of Interest (ROI) within a subject Act. Primarily used for making secondary observations on a subset of a subject observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type \"subject\" (SUBJ), which must always be present."; + case ROIBND: return "A Region of Interest (ROI) specified for a multidimensional observation, such as an Observation Series (OBSSER). The ROI is specified using a set of observation criteria, each delineating the boundary of the region in one of the dimensions in the multidimensional observation. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type subject (SUBJ), which must always be present. Each of the boundary criteria observations is connected with the ROI using ActRelationships of type \"has component\" (COMP). In each boundary criterion, the Act.code names the dimension and the Observation.value specifies the range of values inside the region. Typically the bounded dimension is continuous, and so the Observation.value will be an interval (IVL) data type. The Observation.value need not be specified if the respective dimension is only named but not constrained. For example, an ROI for the QT interval of a certain beat in ECG Lead II would contain 2 boundary criteria, one naming the interval in time (constrained), and the other naming the interval in ECG Lead II (only named, but not constrained)."; + case ROIOVL: return "A Region of Interest (ROI) specified for an image using an overlay shape. Typically used to make reference to specific regions in images, e.g., to specify the location of a radiologic finding in an image or to specify the site of a physical finding by \"circling\" a region in a schematic picture of a human body. The units of the coordinate values are in pixels. The origin is in the upper left hand corner, with positive X values going to the right and positive Y values going down. The relationship between a ROI and its referenced Act is specified through an ActRelationship of type \"subject\" (SUBJ), which must always be present."; + case _SUBJECTPHYSICALPOSITION: return "The spatial relationship of a subject whether human, other animal, or plant, to a frame of reference such as gravity or a collection device."; + case _SUBJECTBODYPOSITION: return "Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case LLD: return "Lying on the left side.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case PRN: return "Lying with the front or ventral surface downward; lying face down.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case RLD: return "Lying on the right side.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case SFWL: return "A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case SIT: return "Resting the body on the buttocks, typically with upper torso erect or semi erect.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case STN: return "To be stationary, upright, vertical, on one's legs.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case SUP: return "Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case RTRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case TRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised.\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because it does not describe a type of Act (as it should in the ActClass code system), but rather encodes the result or value of an observation. The same code has been added to the ObservationValue code system."; + case ALRT: return "An observation identifying a potential adverse outcome as a result of an Act or combination of Acts.\r\n\n \n Examples: Detection of a drug-drug interaction; Identification of a late-submission for an invoice; Requesting discharge for a patient who does not meet hospital-defined discharge criteria.\r\n\n \n Discussion: This class is commonly used for identifying 'business rule' or 'process' problems that may result in a refusal to carry out a particular request. In some circumstances it may be possible to 'bypass' a problem by modifying the request to acknowledge the issue and/or by providing some form of mitigation.\r\n\n \n Constraints: the Act or Acts that may cause the the adverse outcome are the target of a subject ActRelationship. The subbtypes of this concept indicate the type of problem being detected (e.g. drug-drug interaction) while the Observation.value is used to repesent a specific problem code (e.g. specific drug-drug interaction id)."; + case BATTERY: return "Definition: An observation that is composed of a set of observations. These observations typically have a logical or practical grouping for generally accepted clinical or functional purposes, such as observations that are run together because of automation. A battery can define required and optional component observations and, in some cases, will define complex rules that determine whether or not a particular observation is made. BATTERY is a constraint on the Observation class in that it is understood to always be composed of component observations.\r\n\n \n UsageNotes: The focus in a BATTERY is that it is composed of individual observations. In request (RQO) mood, a battery is a request to perform the component observations. In event (EVN) mood a battery is a reporting of associated set of observation events. In definition mood a battery is the definition of the associated set of observations.\r\n\n \n Examples: Vital signs, Full blood count, Chemistry panel."; + case CLNTRL: return "The set of actions that define an experiment to assess the effectiveness and/or safety of a biopharmaceutical product (food, drug, device, etc.). In definition mood, this set of actions is often embodied in a clinical trial protocol; in event mood, this designates the aggregate act of applying the actions to one or more subjects."; + case CNOD: return "An instance of Observation of a Condition at a point in time that includes any Observations or Procedures associated with that Condition as well as links to previous instances of Condition Node for the same Condition\r\n\n \n \n Deprecation Comment: \n This concept has been deprecated because an alternative structure for tracking the evolution of a problem has been presented and adopted by the Care Provision Work Group."; + case COND: return "An observable finding or state that persists over time and tends to require intervention or management, and, therefore, distinguished from an Observation made at a point in time; may exist before an Observation of the Condition is made or after interventions to manage the Condition are undertaken. Examples: equipment repair status, device recall status, a health risk, a financial risk, public health risk, pregnancy, health maintenance, chronic illness"; + case CASE: return "A public health case is an Observation representing a condition or event that has a specific significance for public health. Typically it involves an instance or instances of a reportable infectious disease or other condition. The public health case can include a health-related event concerning a single individual or it may refer to multiple health-related events that are occurrences of the same disease or condition of interest to public health. An outbreak involving multiple individuals may be considered as a type of public health case. A public health case definition (Act.moodCode = \"definition\") includes the description of the clinical, laboratory, and epidemiologic indicators associated with a disease or condition of interest to public health. There are case definitions for conditions that are reportable, as well as for those that are not. There are also case definitions for outbreaks. A public health case definition is a construct used by public health for the purpose of counting cases, and should not be used as clinical indications for treatment. Examples include AIDS, toxic-shock syndrome, and salmonellosis and their associated indicators that are used to define a case."; + case OUTB: return "An outbreak represents a series of public health cases. The date on which an outbreak starts is the earliest date of onset among the cases assigned to the outbreak, and its ending date is the last date of onset among the cases assigned to the outbreak."; + case DGIMG: return "Class for holding attributes unique to diagnostic images."; + case GEN: return "Description:An observation of genomic phenomena."; + case DETPOL: return "Description:A determinant peptide in a polypeptide as described by polypeptide."; + case EXP: return "Description:An expression level of genes/proteins or other expressed genomic entities."; + case LOC: return "Description:The position of a gene (or other significant sequence) on the genome."; + case PHN: return "Description:A genomic phenomenon that is expressed externally in the organism."; + case POL: return "Description:A polypeptide resulting from the translation of a gene."; + case SEQ: return "Description:A sequence of biomolecule like the DNA, RNA, protein and the like."; + case SEQVAR: return "Description:A variation in a sequence as described by BioSequence."; + case INVSTG: return "An formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event. This investigation could be conducted at a local institutional level or at the level of a local or national government."; + case OBSSER: return "Container for Correlated Observation Sequences sharing a common frame of reference. All Observations of the same cd must be comparable and relative to the common frame of reference. For example, a 3-channel ECG device records a 12-lead ECG in 4 steps (3 leads at a time). Each of the separate 3-channel recordings would be in their own \"OBSCOR\". And, all 4 OBSCOR would be contained in one OBSSER because all the times are relative to the same origin (beginning of the recording) and all the ECG signals were from a fixed set of electrodes."; + case OBSCOR: return "Container for Observation Sequences (Observations whose values are contained in LIST<>'s) having values correlated with each other. Each contained Observation Sequence LIST<> must be the same length. Values in the LIST<>'s are correlated based on index. E.g. the values in position 2 in all the LIST<>'s are correlated. This is analogous to a table where each column is an Observation Sequence with a LIST<> of values, and each row in the table is a correlation between the columns. For example, a 12-lead ECG would contain 13 sequences: one sequence for time, and a sequence for each of the 12 leads."; + case POS: return "An observation denoting the physical location of a person or thing based on a reference coordinate system."; + case POSACC: return "Description:An observation representing the degree to which the assignment of the spatial coordinates, based on a matching algorithm by a geocoding engine against a reference spatial database, matches true or accepted values."; + case POSCOORD: return "Description:An observation representing one of a set of numerical values used to determine the position of a place. The name of the coordinate value is determined by the reference coordinate system."; + case SPCOBS: return "An observation on a specimen in a laboratory environment that may affect processing, analysis or result interpretation"; + case VERIF: return "An act which describes the process whereby a 'verifying party' validates either the existence of the Role attested to by some Credential or the actual Vetting act and its details."; + case PCPR: return "An Act that of taking on whole or partial responsibility for, or attention to, safety and well-being of a subject of care. \r\n\n \n Discussion: A care provision event may exist without any other care actions taking place. For example, when a patient is assigned to the care of a particular health professional.\r\n\n In request (RQO) mood care provision communicates a referral, which is a request:\r\n\n \n \n from one party (linked as a participant of type author (AUT)),\r\n\n \n \n to another party (linked as a participant of type performer (PRF),\r\n\n \n \n to take responsibility for a scope specified by the code attribute, \r\n\n \n \n for an entity (linked as a participant of type subject (SBJ)).\r\n\n \n \n The scope of the care for which responsibility is taken is identified by code attribute.\r\n\n In event (EVN) mood care provision indicates the effective time interval of a specified scope of responsibility by a performer (PRF) or set of performers (PRF) for a subject (SBJ).\r\n\n \n Examples:\n \r\n\n \n \n Referral from GP to a specialist.\r\n\n \n \n Assignment of a patient or group of patients to the case list of a health professional.\r\n\n \n \n Assignment of inpatients to the care of particular nurses for a working shift."; + case ENC: return "An interaction between a patient and healthcare participant(s) for the purpose of providing patient service(s) or assessing the health status of a patient. For example, outpatient visit to multiple departments, home health support (including physical therapy), inpatient hospital stay, emergency room visit, field visit (e.g., traffic accident), office visit, occupational therapy, telephone call."; + case POLICY: return "Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by one party on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed"; + case JURISPOL: return "Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by a jurisdiction on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries."; + case ORGPOL: return "Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed by an organization on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A clinical or research protocols imposed by a payer, a malpractice insurer, or an institution to which a provider must adhere. A mandate imposed by a denominational institution for a provider to provide or withhold certain information from the patient about treatment options."; + case SCOPOL: return "Description:An ethical or clinical obligation, requirement, rule, or expectation imposed or strongly encouraged by organizations that oversee particular clinical domains or provider certification which define the boundaries within which a provider may practice and which may have legal basis or ramifications on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide."; + case STDPOL: return "Description:A requirement, rule, or expectation typically documented as guidelines, protocols, or formularies imposed or strongly encouraged by an organization that oversees or has authority over the practices within a domain, and which may have legal basis or ramifications on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A payer may require a prescribing provider to adhere to formulary guidelines. An institution may adopt clinical guidelines and protocols and implement these within its electronic health record and decision support systems."; + case PROC: return "An Act whose immediate and primary outcome (post-condition) is the alteration of the physical condition of the subject.\r\n\n \n Examples: : Procedures may involve the disruption of some body surface (e.g. an incision in a surgical procedure), but they also include conservative procedures such as reduction of a luxated join, chiropractic treatment, massage, balneotherapy, acupuncture, shiatsu, etc. Outside of clinical medicine, procedures may be such things as alteration of environments (e.g. straightening rivers, draining swamps, building dams) or the repair or change of machinery etc."; + case SBADM: return "The act of introducing or otherwise applying a substance to the subject.\r\n\n \n Discussion: The effect of the substance is typically established on a biochemical basis, however, that is not a requirement. For example, radiotherapy can largely be described in the same way, especially if it is a systemic therapy such as radio-iodine. This class also includes the application of chemical treatments to an area.\r\n\n \n Examples: Chemotherapy protocol; Drug prescription; Vaccination record"; + case SBEXT: return "Description: The act of removing a substance from the subject."; + case SPECCOLLECT: return "A procedure for obtaining a specimen from a source entity."; + case REG: return "Represents the act of maintaining information about the registration of its associated registered subject. The subject can be either an Act or a Role, and includes subjects such as lab exam definitions, drug protocol definitions, prescriptions, persons, patients, practitioners, and equipment.\r\n\n The registration may have a unique identifier - separate from the unique identification of the subject - as well as a core set of related participations and act relationships that characterize the registration event and aid in the disposition of the subject information by a receiving system."; + case REV: return "The act of examining and evaluating the subject, usually another act. For example, \"This prescription needs to be reviewed in 2 months.\""; + case SPCTRT: return "A procedure or treatment performed on a specimen to prepare it for analysis"; + case SPLY: return "Supply orders and deliveries are simple Acts that focus on the delivered product. The product is associated with the Supply Act via Participation.typeCode=\"product\". With general Supply Acts, the precise identification of the Material (manufacturer, serial numbers, etc.) is important. Most of the detailed information about the Supply should be represented using the Material class. If delivery needs to be scheduled, tracked, and billed separately, one can associate a Transportation Act with the Supply Act. Pharmacy dispense services are represented as Supply Acts, associated with a SubstanceAdministration Act. The SubstanceAdministration class represents the administration of medication, while dispensing is supply."; + case DIET: return "Diet services are supply services, with some aspects resembling Medication services: the detail of the diet is given as a description of the Material associated via Participation.typeCode=\"product\". Medically relevant diet types may be communicated in the Diet.code attribute using domain ActDietCode, however, the detail of the food supplied and the various combinations of dishes should be communicated as Material instances.\r\n\n \n Deprecation Note\n \r\n\n \n Class: Use either the Supply class (if dealing with what should be given to the patient) or SubstanceAdministration class (if dealing with what the patient should consume)\r\n\n \n energyQuantity: This quantity can be conveyed by using a Content relationship with a quantity attribute expressing the calories\r\n\n \n carbohydrateQuantity:This quantity can be conveyed using a Content relationship to an Entity with a code of carbohydrate and a quantity attribute on the content relationship."; + case STORE: return "The act of putting something away for safe keeping. The \"something\" may be physical object such as a specimen, or information, such as observations regarding a specimen."; + case SUBST: return "Definition: Indicates that the subject Act has undergone or should undergo substitution of a type indicated by Act.code.\r\n\n Rationale: Used to specify \"allowed\" substitution when creating orders, \"actual\" susbstitution when sending events, as well as the reason for the substitution and who was responsible for it."; + case TRFR: return "Definition: The act of transferring information without the intent of imparting understanding about a topic to the subject that is the recipient or holder of the transferred information where the participation association must be RCV or HLD."; + case TRNS: return "Transportation is the moving of a payload (people or material) from a location of origin to a destination location. Thus, any transport service has the three target instances of type payload, origin, and destination, besides the targets that are generally used for any service (i.e., performer, device, etc.)"; + case XACT: return "A sub-class of Act representing any transaction between two accounts whose value is measured in monetary terms.\r\n\n In the \"intent\" mood, communicates a request for a transaction to be initiated, or communicates a transfer of value between two accounts.\r\n\n In the \"event\" mood, communicates the posting of a transaction to an account."; + case _ACTCLASSCONTAINER: return "ActClassContainer"; + case ENTRY: return "This context represents the information acquired and recorded for an observation, a clinical statement such as a portion of the patient's history or an inference or assertion, or an action that might be intended or has actually been performed. This class may represent both the actual data describing the observation, inference, or action, and optionally the details supporting the clinical reasoning process such as a reference to an electronic guideline, decision support system, or other knowledge reference."; + case ORGANIZER: return "Organizer of entries. Navigational. No semantic content. Knowledge of the section code is not required to interpret contained observations. Represents a heading in a heading structure, or \"organizer tree\".\r\n\n The record entries relating to a single clinical session are usually grouped under headings that represent phases of the encounter, or assist with layout and navigation. Clinical headings usually reflect the clinical workflow during a care session, and might also reflect the main author's reasoning processes. Much research has demonstrated that headings are used differently by different professional groups and specialties, and that headings are not used consistently enough to support safe automatic processing of the E H R."; + case DOCCNTNT: return ""; + case DOCLIST: return ""; + case DOCLSTITM: return ""; + case DOCPARA: return ""; + case DOCTBL: return ""; + case LINKHTML: return ""; + case LOCALATTR: return ""; + case LOCALMRKP: return ""; + case ORDERED: return ""; + case REFR: return ""; + case TBLCOL: return ""; + case TBLCOLGP: return ""; + case TBLDATA: return ""; + case TBLHDR: return ""; + case TBLROW: return ""; + case TBODY: return ""; + case TFOOT: return ""; + case THEAD: return ""; + case UNORDERED: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACT: return "act"; + case _ACTCLASSRECORDORGANIZER: return "record organizer"; + case COMPOSITION: return "composition"; + case DOC: return "document"; + case DOCCLIN: return "clinical document"; + case CDALVLONE: return "CDA Level One clinical document"; + case CONTAINER: return "record container"; + case CATEGORY: return "category"; + case DOCBODY: return "document body"; + case DOCSECT: return "document section"; + case TOPIC: return "topic"; + case EXTRACT: return "extract"; + case EHR: return "electronic health record"; + case FOLDER: return "folder"; + case GROUPER: return "grouper"; + case CLUSTER: return "Cluster"; + case ACCM: return "accommodation"; + case ACCT: return "account"; + case ACSN: return "accession"; + case ADJUD: return "financial adjudication"; + case CACT: return "control act"; + case ACTN: return "action"; + case INFO: return "information"; + case STC: return "state transition control"; + case CNTRCT: return "contract"; + case FCNTRCT: return "financial contract"; + case COV: return "coverage"; + case CONC: return "concern"; + case HCASE: return "public health case"; + case OUTBR: return "outbreak"; + case CONS: return "consent"; + case CONTREG: return "container registration"; + case CTTEVENT: return "clinical trial timepoint event"; + case DISPACT: return "disciplinary action"; + case EXPOS: return "exposure"; + case AEXPOS: return "acquisition exposure"; + case TEXPOS: return "transmission exposure"; + case INC: return "incident"; + case INFRM: return "inform"; + case INVE: return "invoice element"; + case LIST: return "working list"; + case MPROT: return "monitoring program"; + case OBS: return "observation"; + case _ACTCLASSROI: return "ActClassROI"; + case ROIBND: return "bounded ROI"; + case ROIOVL: return "overlay ROI"; + case _SUBJECTPHYSICALPOSITION: return "subject physical position"; + case _SUBJECTBODYPOSITION: return "subject body position"; + case LLD: return "left lateral decubitus"; + case PRN: return "prone"; + case RLD: return "right lateral decubitus"; + case SFWL: return "Semi-Fowler's"; + case SIT: return "sitting"; + case STN: return "standing"; + case SUP: return "supine"; + case RTRD: return "reverse trendelenburg"; + case TRD: return "trendelenburg"; + case ALRT: return "detected issue"; + case BATTERY: return "battery"; + case CLNTRL: return "clinical trial"; + case CNOD: return "Condition Node"; + case COND: return "Condition"; + case CASE: return "public health case"; + case OUTB: return "outbreak"; + case DGIMG: return "diagnostic image"; + case GEN: return "genomic observation"; + case DETPOL: return "determinant peptide"; + case EXP: return "expression level"; + case LOC: return "locus"; + case PHN: return "phenotype"; + case POL: return "polypeptide"; + case SEQ: return "bio sequence"; + case SEQVAR: return "bio sequence variation"; + case INVSTG: return "investigation"; + case OBSSER: return "observation series"; + case OBSCOR: return "correlated observation sequences"; + case POS: return "position"; + case POSACC: return "position accuracy"; + case POSCOORD: return "position coordinate"; + case SPCOBS: return "specimen observation"; + case VERIF: return "Verification"; + case PCPR: return "care provision"; + case ENC: return "encounter"; + case POLICY: return "policy"; + case JURISPOL: return "jurisdictional policy"; + case ORGPOL: return "organizational policy"; + case SCOPOL: return "scope of practice policy"; + case STDPOL: return "standard of practice policy"; + case PROC: return "procedure"; + case SBADM: return "substance administration"; + case SBEXT: return "Substance Extraction"; + case SPECCOLLECT: return "Specimen Collection"; + case REG: return "registration"; + case REV: return "review"; + case SPCTRT: return "specimen treatment"; + case SPLY: return "supply"; + case DIET: return "diet"; + case STORE: return "storage"; + case SUBST: return "Substitution"; + case TRFR: return "transfer"; + case TRNS: return "transportation"; + case XACT: return "financial transaction"; + case _ACTCLASSCONTAINER: return "ActClassContainer"; + case ENTRY: return "entry"; + case ORGANIZER: return "organizer"; + case DOCCNTNT: return "DOCCNTNT"; + case DOCLIST: return "DOCLIST"; + case DOCLSTITM: return "DOCLSTITM"; + case DOCPARA: return "DOCPARA"; + case DOCTBL: return "DOCTBL"; + case LINKHTML: return "LINKHTML"; + case LOCALATTR: return "LOCALATTR"; + case LOCALMRKP: return "LOCALMRKP"; + case ORDERED: return "ordered"; + case REFR: return "REFR"; + case TBLCOL: return "TBLCOL"; + case TBLCOLGP: return "TBLCOLGP"; + case TBLDATA: return "TBLDATA"; + case TBLHDR: return "TBLHDR"; + case TBLROW: return "TBLROW"; + case TBODY: return "tbody"; + case TFOOT: return "tfoot"; + case THEAD: return "thead"; + case UNORDERED: return "unordered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActClassEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActClassEnumFactory.java new file mode 100644 index 00000000000..b09e2baaf6a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActClassEnumFactory.java @@ -0,0 +1,550 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActClassEnumFactory implements EnumFactory { + + public V3ActClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ACT".equals(codeString)) + return V3ActClass.ACT; + if ("_ActClassRecordOrganizer".equals(codeString)) + return V3ActClass._ACTCLASSRECORDORGANIZER; + if ("COMPOSITION".equals(codeString)) + return V3ActClass.COMPOSITION; + if ("DOC".equals(codeString)) + return V3ActClass.DOC; + if ("DOCCLIN".equals(codeString)) + return V3ActClass.DOCCLIN; + if ("CDALVLONE".equals(codeString)) + return V3ActClass.CDALVLONE; + if ("CONTAINER".equals(codeString)) + return V3ActClass.CONTAINER; + if ("CATEGORY".equals(codeString)) + return V3ActClass.CATEGORY; + if ("DOCBODY".equals(codeString)) + return V3ActClass.DOCBODY; + if ("DOCSECT".equals(codeString)) + return V3ActClass.DOCSECT; + if ("TOPIC".equals(codeString)) + return V3ActClass.TOPIC; + if ("EXTRACT".equals(codeString)) + return V3ActClass.EXTRACT; + if ("EHR".equals(codeString)) + return V3ActClass.EHR; + if ("FOLDER".equals(codeString)) + return V3ActClass.FOLDER; + if ("GROUPER".equals(codeString)) + return V3ActClass.GROUPER; + if ("CLUSTER".equals(codeString)) + return V3ActClass.CLUSTER; + if ("ACCM".equals(codeString)) + return V3ActClass.ACCM; + if ("ACCT".equals(codeString)) + return V3ActClass.ACCT; + if ("ACSN".equals(codeString)) + return V3ActClass.ACSN; + if ("ADJUD".equals(codeString)) + return V3ActClass.ADJUD; + if ("CACT".equals(codeString)) + return V3ActClass.CACT; + if ("ACTN".equals(codeString)) + return V3ActClass.ACTN; + if ("INFO".equals(codeString)) + return V3ActClass.INFO; + if ("STC".equals(codeString)) + return V3ActClass.STC; + if ("CNTRCT".equals(codeString)) + return V3ActClass.CNTRCT; + if ("FCNTRCT".equals(codeString)) + return V3ActClass.FCNTRCT; + if ("COV".equals(codeString)) + return V3ActClass.COV; + if ("CONC".equals(codeString)) + return V3ActClass.CONC; + if ("HCASE".equals(codeString)) + return V3ActClass.HCASE; + if ("OUTBR".equals(codeString)) + return V3ActClass.OUTBR; + if ("CONS".equals(codeString)) + return V3ActClass.CONS; + if ("CONTREG".equals(codeString)) + return V3ActClass.CONTREG; + if ("CTTEVENT".equals(codeString)) + return V3ActClass.CTTEVENT; + if ("DISPACT".equals(codeString)) + return V3ActClass.DISPACT; + if ("EXPOS".equals(codeString)) + return V3ActClass.EXPOS; + if ("AEXPOS".equals(codeString)) + return V3ActClass.AEXPOS; + if ("TEXPOS".equals(codeString)) + return V3ActClass.TEXPOS; + if ("INC".equals(codeString)) + return V3ActClass.INC; + if ("INFRM".equals(codeString)) + return V3ActClass.INFRM; + if ("INVE".equals(codeString)) + return V3ActClass.INVE; + if ("LIST".equals(codeString)) + return V3ActClass.LIST; + if ("MPROT".equals(codeString)) + return V3ActClass.MPROT; + if ("OBS".equals(codeString)) + return V3ActClass.OBS; + if ("_ActClassROI".equals(codeString)) + return V3ActClass._ACTCLASSROI; + if ("ROIBND".equals(codeString)) + return V3ActClass.ROIBND; + if ("ROIOVL".equals(codeString)) + return V3ActClass.ROIOVL; + if ("_SubjectPhysicalPosition".equals(codeString)) + return V3ActClass._SUBJECTPHYSICALPOSITION; + if ("_SubjectBodyPosition".equals(codeString)) + return V3ActClass._SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return V3ActClass.LLD; + if ("PRN".equals(codeString)) + return V3ActClass.PRN; + if ("RLD".equals(codeString)) + return V3ActClass.RLD; + if ("SFWL".equals(codeString)) + return V3ActClass.SFWL; + if ("SIT".equals(codeString)) + return V3ActClass.SIT; + if ("STN".equals(codeString)) + return V3ActClass.STN; + if ("SUP".equals(codeString)) + return V3ActClass.SUP; + if ("RTRD".equals(codeString)) + return V3ActClass.RTRD; + if ("TRD".equals(codeString)) + return V3ActClass.TRD; + if ("ALRT".equals(codeString)) + return V3ActClass.ALRT; + if ("BATTERY".equals(codeString)) + return V3ActClass.BATTERY; + if ("CLNTRL".equals(codeString)) + return V3ActClass.CLNTRL; + if ("CNOD".equals(codeString)) + return V3ActClass.CNOD; + if ("COND".equals(codeString)) + return V3ActClass.COND; + if ("CASE".equals(codeString)) + return V3ActClass.CASE; + if ("OUTB".equals(codeString)) + return V3ActClass.OUTB; + if ("DGIMG".equals(codeString)) + return V3ActClass.DGIMG; + if ("GEN".equals(codeString)) + return V3ActClass.GEN; + if ("DETPOL".equals(codeString)) + return V3ActClass.DETPOL; + if ("EXP".equals(codeString)) + return V3ActClass.EXP; + if ("LOC".equals(codeString)) + return V3ActClass.LOC; + if ("PHN".equals(codeString)) + return V3ActClass.PHN; + if ("POL".equals(codeString)) + return V3ActClass.POL; + if ("SEQ".equals(codeString)) + return V3ActClass.SEQ; + if ("SEQVAR".equals(codeString)) + return V3ActClass.SEQVAR; + if ("INVSTG".equals(codeString)) + return V3ActClass.INVSTG; + if ("OBSSER".equals(codeString)) + return V3ActClass.OBSSER; + if ("OBSCOR".equals(codeString)) + return V3ActClass.OBSCOR; + if ("POS".equals(codeString)) + return V3ActClass.POS; + if ("POSACC".equals(codeString)) + return V3ActClass.POSACC; + if ("POSCOORD".equals(codeString)) + return V3ActClass.POSCOORD; + if ("SPCOBS".equals(codeString)) + return V3ActClass.SPCOBS; + if ("VERIF".equals(codeString)) + return V3ActClass.VERIF; + if ("PCPR".equals(codeString)) + return V3ActClass.PCPR; + if ("ENC".equals(codeString)) + return V3ActClass.ENC; + if ("POLICY".equals(codeString)) + return V3ActClass.POLICY; + if ("JURISPOL".equals(codeString)) + return V3ActClass.JURISPOL; + if ("ORGPOL".equals(codeString)) + return V3ActClass.ORGPOL; + if ("SCOPOL".equals(codeString)) + return V3ActClass.SCOPOL; + if ("STDPOL".equals(codeString)) + return V3ActClass.STDPOL; + if ("PROC".equals(codeString)) + return V3ActClass.PROC; + if ("SBADM".equals(codeString)) + return V3ActClass.SBADM; + if ("SBEXT".equals(codeString)) + return V3ActClass.SBEXT; + if ("SPECCOLLECT".equals(codeString)) + return V3ActClass.SPECCOLLECT; + if ("REG".equals(codeString)) + return V3ActClass.REG; + if ("REV".equals(codeString)) + return V3ActClass.REV; + if ("SPCTRT".equals(codeString)) + return V3ActClass.SPCTRT; + if ("SPLY".equals(codeString)) + return V3ActClass.SPLY; + if ("DIET".equals(codeString)) + return V3ActClass.DIET; + if ("STORE".equals(codeString)) + return V3ActClass.STORE; + if ("SUBST".equals(codeString)) + return V3ActClass.SUBST; + if ("TRFR".equals(codeString)) + return V3ActClass.TRFR; + if ("TRNS".equals(codeString)) + return V3ActClass.TRNS; + if ("XACT".equals(codeString)) + return V3ActClass.XACT; + if ("_ActClassContainer".equals(codeString)) + return V3ActClass._ACTCLASSCONTAINER; + if ("ENTRY".equals(codeString)) + return V3ActClass.ENTRY; + if ("ORGANIZER".equals(codeString)) + return V3ActClass.ORGANIZER; + if ("DOCCNTNT".equals(codeString)) + return V3ActClass.DOCCNTNT; + if ("DOCLIST".equals(codeString)) + return V3ActClass.DOCLIST; + if ("DOCLSTITM".equals(codeString)) + return V3ActClass.DOCLSTITM; + if ("DOCPARA".equals(codeString)) + return V3ActClass.DOCPARA; + if ("DOCTBL".equals(codeString)) + return V3ActClass.DOCTBL; + if ("LINKHTML".equals(codeString)) + return V3ActClass.LINKHTML; + if ("LOCALATTR".equals(codeString)) + return V3ActClass.LOCALATTR; + if ("LOCALMRKP".equals(codeString)) + return V3ActClass.LOCALMRKP; + if ("ordered".equals(codeString)) + return V3ActClass.ORDERED; + if ("REFR".equals(codeString)) + return V3ActClass.REFR; + if ("TBLCOL".equals(codeString)) + return V3ActClass.TBLCOL; + if ("TBLCOLGP".equals(codeString)) + return V3ActClass.TBLCOLGP; + if ("TBLDATA".equals(codeString)) + return V3ActClass.TBLDATA; + if ("TBLHDR".equals(codeString)) + return V3ActClass.TBLHDR; + if ("TBLROW".equals(codeString)) + return V3ActClass.TBLROW; + if ("tbody".equals(codeString)) + return V3ActClass.TBODY; + if ("tfoot".equals(codeString)) + return V3ActClass.TFOOT; + if ("thead".equals(codeString)) + return V3ActClass.THEAD; + if ("unordered".equals(codeString)) + return V3ActClass.UNORDERED; + throw new IllegalArgumentException("Unknown V3ActClass code '"+codeString+"'"); + } + + public String toCode(V3ActClass code) { + if (code == V3ActClass.ACT) + return "ACT"; + if (code == V3ActClass._ACTCLASSRECORDORGANIZER) + return "_ActClassRecordOrganizer"; + if (code == V3ActClass.COMPOSITION) + return "COMPOSITION"; + if (code == V3ActClass.DOC) + return "DOC"; + if (code == V3ActClass.DOCCLIN) + return "DOCCLIN"; + if (code == V3ActClass.CDALVLONE) + return "CDALVLONE"; + if (code == V3ActClass.CONTAINER) + return "CONTAINER"; + if (code == V3ActClass.CATEGORY) + return "CATEGORY"; + if (code == V3ActClass.DOCBODY) + return "DOCBODY"; + if (code == V3ActClass.DOCSECT) + return "DOCSECT"; + if (code == V3ActClass.TOPIC) + return "TOPIC"; + if (code == V3ActClass.EXTRACT) + return "EXTRACT"; + if (code == V3ActClass.EHR) + return "EHR"; + if (code == V3ActClass.FOLDER) + return "FOLDER"; + if (code == V3ActClass.GROUPER) + return "GROUPER"; + if (code == V3ActClass.CLUSTER) + return "CLUSTER"; + if (code == V3ActClass.ACCM) + return "ACCM"; + if (code == V3ActClass.ACCT) + return "ACCT"; + if (code == V3ActClass.ACSN) + return "ACSN"; + if (code == V3ActClass.ADJUD) + return "ADJUD"; + if (code == V3ActClass.CACT) + return "CACT"; + if (code == V3ActClass.ACTN) + return "ACTN"; + if (code == V3ActClass.INFO) + return "INFO"; + if (code == V3ActClass.STC) + return "STC"; + if (code == V3ActClass.CNTRCT) + return "CNTRCT"; + if (code == V3ActClass.FCNTRCT) + return "FCNTRCT"; + if (code == V3ActClass.COV) + return "COV"; + if (code == V3ActClass.CONC) + return "CONC"; + if (code == V3ActClass.HCASE) + return "HCASE"; + if (code == V3ActClass.OUTBR) + return "OUTBR"; + if (code == V3ActClass.CONS) + return "CONS"; + if (code == V3ActClass.CONTREG) + return "CONTREG"; + if (code == V3ActClass.CTTEVENT) + return "CTTEVENT"; + if (code == V3ActClass.DISPACT) + return "DISPACT"; + if (code == V3ActClass.EXPOS) + return "EXPOS"; + if (code == V3ActClass.AEXPOS) + return "AEXPOS"; + if (code == V3ActClass.TEXPOS) + return "TEXPOS"; + if (code == V3ActClass.INC) + return "INC"; + if (code == V3ActClass.INFRM) + return "INFRM"; + if (code == V3ActClass.INVE) + return "INVE"; + if (code == V3ActClass.LIST) + return "LIST"; + if (code == V3ActClass.MPROT) + return "MPROT"; + if (code == V3ActClass.OBS) + return "OBS"; + if (code == V3ActClass._ACTCLASSROI) + return "_ActClassROI"; + if (code == V3ActClass.ROIBND) + return "ROIBND"; + if (code == V3ActClass.ROIOVL) + return "ROIOVL"; + if (code == V3ActClass._SUBJECTPHYSICALPOSITION) + return "_SubjectPhysicalPosition"; + if (code == V3ActClass._SUBJECTBODYPOSITION) + return "_SubjectBodyPosition"; + if (code == V3ActClass.LLD) + return "LLD"; + if (code == V3ActClass.PRN) + return "PRN"; + if (code == V3ActClass.RLD) + return "RLD"; + if (code == V3ActClass.SFWL) + return "SFWL"; + if (code == V3ActClass.SIT) + return "SIT"; + if (code == V3ActClass.STN) + return "STN"; + if (code == V3ActClass.SUP) + return "SUP"; + if (code == V3ActClass.RTRD) + return "RTRD"; + if (code == V3ActClass.TRD) + return "TRD"; + if (code == V3ActClass.ALRT) + return "ALRT"; + if (code == V3ActClass.BATTERY) + return "BATTERY"; + if (code == V3ActClass.CLNTRL) + return "CLNTRL"; + if (code == V3ActClass.CNOD) + return "CNOD"; + if (code == V3ActClass.COND) + return "COND"; + if (code == V3ActClass.CASE) + return "CASE"; + if (code == V3ActClass.OUTB) + return "OUTB"; + if (code == V3ActClass.DGIMG) + return "DGIMG"; + if (code == V3ActClass.GEN) + return "GEN"; + if (code == V3ActClass.DETPOL) + return "DETPOL"; + if (code == V3ActClass.EXP) + return "EXP"; + if (code == V3ActClass.LOC) + return "LOC"; + if (code == V3ActClass.PHN) + return "PHN"; + if (code == V3ActClass.POL) + return "POL"; + if (code == V3ActClass.SEQ) + return "SEQ"; + if (code == V3ActClass.SEQVAR) + return "SEQVAR"; + if (code == V3ActClass.INVSTG) + return "INVSTG"; + if (code == V3ActClass.OBSSER) + return "OBSSER"; + if (code == V3ActClass.OBSCOR) + return "OBSCOR"; + if (code == V3ActClass.POS) + return "POS"; + if (code == V3ActClass.POSACC) + return "POSACC"; + if (code == V3ActClass.POSCOORD) + return "POSCOORD"; + if (code == V3ActClass.SPCOBS) + return "SPCOBS"; + if (code == V3ActClass.VERIF) + return "VERIF"; + if (code == V3ActClass.PCPR) + return "PCPR"; + if (code == V3ActClass.ENC) + return "ENC"; + if (code == V3ActClass.POLICY) + return "POLICY"; + if (code == V3ActClass.JURISPOL) + return "JURISPOL"; + if (code == V3ActClass.ORGPOL) + return "ORGPOL"; + if (code == V3ActClass.SCOPOL) + return "SCOPOL"; + if (code == V3ActClass.STDPOL) + return "STDPOL"; + if (code == V3ActClass.PROC) + return "PROC"; + if (code == V3ActClass.SBADM) + return "SBADM"; + if (code == V3ActClass.SBEXT) + return "SBEXT"; + if (code == V3ActClass.SPECCOLLECT) + return "SPECCOLLECT"; + if (code == V3ActClass.REG) + return "REG"; + if (code == V3ActClass.REV) + return "REV"; + if (code == V3ActClass.SPCTRT) + return "SPCTRT"; + if (code == V3ActClass.SPLY) + return "SPLY"; + if (code == V3ActClass.DIET) + return "DIET"; + if (code == V3ActClass.STORE) + return "STORE"; + if (code == V3ActClass.SUBST) + return "SUBST"; + if (code == V3ActClass.TRFR) + return "TRFR"; + if (code == V3ActClass.TRNS) + return "TRNS"; + if (code == V3ActClass.XACT) + return "XACT"; + if (code == V3ActClass._ACTCLASSCONTAINER) + return "_ActClassContainer"; + if (code == V3ActClass.ENTRY) + return "ENTRY"; + if (code == V3ActClass.ORGANIZER) + return "ORGANIZER"; + if (code == V3ActClass.DOCCNTNT) + return "DOCCNTNT"; + if (code == V3ActClass.DOCLIST) + return "DOCLIST"; + if (code == V3ActClass.DOCLSTITM) + return "DOCLSTITM"; + if (code == V3ActClass.DOCPARA) + return "DOCPARA"; + if (code == V3ActClass.DOCTBL) + return "DOCTBL"; + if (code == V3ActClass.LINKHTML) + return "LINKHTML"; + if (code == V3ActClass.LOCALATTR) + return "LOCALATTR"; + if (code == V3ActClass.LOCALMRKP) + return "LOCALMRKP"; + if (code == V3ActClass.ORDERED) + return "ordered"; + if (code == V3ActClass.REFR) + return "REFR"; + if (code == V3ActClass.TBLCOL) + return "TBLCOL"; + if (code == V3ActClass.TBLCOLGP) + return "TBLCOLGP"; + if (code == V3ActClass.TBLDATA) + return "TBLDATA"; + if (code == V3ActClass.TBLHDR) + return "TBLHDR"; + if (code == V3ActClass.TBLROW) + return "TBLROW"; + if (code == V3ActClass.TBODY) + return "tbody"; + if (code == V3ActClass.TFOOT) + return "tfoot"; + if (code == V3ActClass.THEAD) + return "thead"; + if (code == V3ActClass.UNORDERED) + return "unordered"; + return "?"; + } + + public String toSystem(V3ActClass code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActCode.java new file mode 100644 index 00000000000..120271e8c18 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActCode.java @@ -0,0 +1,10737 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActCode { + + /** + * An account represents a grouping of financial transactions that are tracked and reported together with a single balance. Examples of account codes (types) are Patient billing accounts (collection of charges), Cost centers; Cash. + */ + _ACTACCOUNTCODE, + /** + * An account for collecting charges, reversals, adjustments and payments, including deductibles, copayments, coinsurance (financial transactions) credited or debited to the account receivable account for a patient's encounter. + */ + ACCTRECEIVABLE, + /** + * Cash + */ + CASH, + /** + * Description: Types of advance payment to be made on a plastic card usually issued by a financial institution used of purchasing services and/or products. + */ + CC, + /** + * American Express + */ + AE, + /** + * Diner's Club + */ + DN, + /** + * Discover Card + */ + DV, + /** + * Master Card + */ + MC, + /** + * Visa + */ + V, + /** + * An account representing charges and credits (financial transactions) for a patient's encounter. + */ + PBILLACCT, + /** + * Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results. + */ + _ACTADJUDICATIONCODE, + /** + * Catagorization of grouping criteria for the associated transactions and/or summary (totals, subtotals). + */ + _ACTADJUDICATIONGROUPCODE, + /** + * Transaction counts and value totals by Contract Identifier. + */ + CONT, + /** + * Transaction counts and value totals for each calendar day within the date range specified. + */ + DAY, + /** + * Transaction counts and value totals by service location (e.g clinic). + */ + LOC, + /** + * Transaction counts and value totals for each calendar month within the date range specified. + */ + MONTH, + /** + * Transaction counts and value totals for the date range specified. + */ + PERIOD, + /** + * Transaction counts and value totals by Provider Identifier. + */ + PROV, + /** + * Transaction counts and value totals for each calendar week within the date range specified. + */ + WEEK, + /** + * Transaction counts and value totals for each calendar year within the date range specified. + */ + YEAR, + /** + * The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges). + + Also includes the concept 'Adjudicate as zero' and items not covered under a particular Policy. + + Invoice element can be reversed (nullified). + + Recommend that the invoice element is saved for DUR (Drug Utilization Reporting). + */ + AA, + /** + * The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges) without changing the amount. + + Invoice element can be reversed (nullified). + + Recommend that the invoice element is saved for DUR (Drug Utilization Reporting). + */ + ANF, + /** + * The invoice element has passed through the adjudication process but payment is refused due to one or more reasons. + + Includes items such as patient not covered, or invoice element is not constructed according to payer rules (e.g. 'invoice submitted too late'). + + If one invoice element line item in the invoice element structure is rejected, the remaining line items may not be adjudicated and the complete group is treated as rejected. + + A refused invoice element can be forwarded to the next payer (for Coordination of Benefits) or modified and resubmitted to refusing payer. + + Invoice element cannot be reversed (nullified) as there is nothing to reverse. + + Recommend that the invoice element is not saved for DUR (Drug Utilization Reporting). + */ + AR, + /** + * The invoice element was/will be paid exactly as submitted, without financial adjustment(s). + + If the dollar amount stays the same, but the billing codes have been amended or financial adjustments have been applied through the adjudication process, the invoice element is treated as "Adjudicated with Adjustment". + + If information items are included in the adjudication results that do not affect the monetary amounts paid, then this is still Adjudicated as Submitted (e.g. 'reached Plan Maximum on this Claim'). + + Invoice element can be reversed (nullified). + + Recommend that the invoice element is saved for DUR (Drug Utilization Reporting). + */ + AS, + /** + * Actions to be carried out by the recipient of the Adjudication Result information. + */ + _ACTADJUDICATIONRESULTACTIONCODE, + /** + * The adjudication result associated is to be displayed to the receiver of the adjudication result. + */ + DISPLAY, + /** + * The adjudication result associated is to be printed on the specified form, which is then provided to the covered party. + */ + FORM, + /** + * Definition:An identifying modifier code for healthcare interventions or procedures. + */ + _ACTBILLABLEMODIFIERCODE, + /** + * Description:CPT modifier codes are found in Appendix A of CPT 2000 Standard Edition. + */ + CPTM, + /** + * Description:HCPCS Level II (HCFA-assigned) and Carrier-assigned (Level III) modifiers are reported in Appendix A of CPT 2000 Standard Edition and in the Medicare Bulletin. + */ + HCPCSA, + /** + * The type of provision(s) made for reimbursing for the deliver of healthcare services and/or goods provided by a Provider, over a specified period. + */ + _ACTBILLINGARRANGEMENTCODE, + /** + * A billing arrangement where a Provider charges a lump sum to provide a prescribed group (volume) of services to a single patient which occur over a period of time. Services included in the block may vary. + + This billing arrangement is also known as Program of Care for some specific Payors and Program Fees for other Payors. + */ + BLK, + /** + * A billing arrangement where the payment made to a Provider is determined by analyzing one or more demographic attributes about the persons/patients who are enrolled with the Provider (in their practice). + */ + CAP, + /** + * A billing arrangement where a Provider charges a lump sum to provide a particular volume of one or more interventions/procedures or groups of interventions/procedures. + */ + CONTF, + /** + * A billing arrangement where a Provider charges for non-clinical items. This includes interest in arrears, mileage, etc. Clinical content is not included in Invoices submitted with this type of billing arrangement. + */ + FINBILL, + /** + * A billing arrangement where funding is based on a list of individuals registered as patients of the Provider. + */ + ROST, + /** + * A billing arrangement where a Provider charges a sum to provide a group (volume) of interventions/procedures to one or more patients within a defined period of time, typically on the same date. Interventions/procedures included in the session may vary. + */ + SESS, + /** + * A billing arrangement where a Provider charges a separate fee for each intervention/procedure/event or product. + + Fee for Service is used when an individual intervention/procedure/event is used for billing purposes. In other words, fees are associated with the intervention/procedure/event. For example, a specific CCI (Canadian Classification of Interventions) code has an associated fee and is used for billing purposes. + */ + FFS, + /** + * A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets) + */ + FFPS, + /** + * A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + FFCS, + /** + * A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + TFS, + /** + * Type of bounded ROI. + */ + _ACTBOUNDEDROICODE, + /** + * A fully specified bounded Region of Interest (ROI) delineates a ROI in which only those dimensions participate that are specified by boundary criteria, whereas all other dimensions are excluded. For example a ROI to mark an episode of "ST elevation" in a subset of the EKG leads V2, V3, and V4 would include 4 boundaries, one each for time, V2, V3, and V4. + */ + ROIFS, + /** + * A partially specified bounded Region of Interest (ROI) specifies a ROI in which at least all values in the dimensions specified by the boundary criteria participate. For example, if an episode of ventricular fibrillations (VFib) is observed, it usually doesn't make sense to exclude any EKG leads from the observation and the partially specified ROI would contain only one boundary for time indicating the time interval where VFib was observed. + */ + ROIPS, + /** + * Description:The type and scope of responsibility taken-on by the performer of the Act for a specific subject of care. + */ + _ACTCAREPROVISIONCODE, + /** + * Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by a credentialing agency, i.e. government or non-government agency. Failure in executing this Act may result in loss of credential to the person or organization who participates as performer of the Act. Excludes employment agreements. + + + Example:Hospital license; physician license; clinic accreditation. + */ + _ACTCREDENTIALEDCARECODE, + /** + * Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing individuals. + */ + _ACTCREDENTIALEDCAREPROVISIONPERSONCODE, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CACC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CAIC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CAMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CANC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CAPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CBGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCCC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CCSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CDEC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CDRC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CEMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CFPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CIMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CMGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board + */ + CNEC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CNMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CNQC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CNSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COMC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + COTC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPEC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPGC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPHC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPRC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CPYC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CROC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CRPC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CSUC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CTSC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CURC, + /** + * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. + */ + CVSC, + /** + * Description:Scope of responsibility taken-on for physician care of a patient as defined by a governmental licensing agency. + */ + LGPC, + /** + * Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing programs within organizations. + */ + _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AALC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AAMC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ABHC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ACAC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ACHC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AHOC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + ALTC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency. + */ + AOSC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CACS, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CAMI, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CAST, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CBAR, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CCAD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CCAR, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CDEP, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CDGD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CDIA, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CEPI, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CFEL, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CHFC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CHRO, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CHYP, + /** + * Description:. + */ + CMIH, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CMSC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + COJR, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CONC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + COPD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CORT, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CPAD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CPND, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CPST, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSDM, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSIC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSLD, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CSPT, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CTBU, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CVDC, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CWMA, + /** + * Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency. + */ + CWOH, + /** + * Domain provides codes that qualify the ActEncounterClass (ENC) + */ + _ACTENCOUNTERCODE, + /** + * A comprehensive term for health care provided in a healthcare facility (e.g. a practitioneraTMs office, clinic setting, or hospital) on a nonresident basis. The term ambulatory usually implies that the patient has come to the location and is not assigned to a bed. Sometimes referred to as an outpatient encounter. + */ + AMB, + /** + * A patient encounter that takes place at a dedicated healthcare service delivery location where the patient receives immediate evaluation and treatment, provided until the patient can be discharged or responsibility for the patient's care is transferred elsewhere (for example, the patient could be admitted as an inpatient or transferred to another facility.) + */ + EMER, + /** + * A patient encounter that takes place both outside a dedicated service delivery location and outside a patient's residence. Example locations might include an accident site and at a supermarket. + */ + FLD, + /** + * Healthcare encounter that takes place in the residence of the patient or a designee + */ + HH, + /** + * A patient encounter where a patient is admitted by a hospital or equivalent facility, assigned to a location where patients generally stay at least overnight and provided with room, board, and continuous nursing service. + */ + IMP, + /** + * An acute inpatient encounter. + */ + ACUTE, + /** + * Any category of inpatient encounter except 'acute' + */ + NONAC, + /** + * A patient encounter where patient is scheduled or planned to receive service delivery in the future, and the patient is given a pre-admission account number. When the patient comes back for subsequent service, the pre-admission encounter is selected and is encapsulated into the service registration, and a new account number is generated. + + + Usage Note: This is intended to be used in advance of encounter types such as ambulatory, inpatient encounter, virtual, etc. + */ + PRENC, + /** + * An encounter where the patient is admitted to a health care facility for a predetermined length of time, usually less than 24 hours. + */ + SS, + /** + * A patient encounter where the patient and the practitioner(s) are not in the same physical location. Examples include telephone conference, email exchange, robotic surgery, and televideo conference. + */ + VR, + /** + * General category of medical service provided to the patient during their encounter. + */ + _ACTMEDICALSERVICECODE, + /** + * Provision of Alternate Level of Care to a patient in an acute bed. Patient is waiting for placement in a long-term care facility and is unable to return home. + */ + ALC, + /** + * Provision of diagnosis and treatment of diseases and disorders affecting the heart + */ + CARD, + /** + * Provision of recurring care for chronic illness. + */ + CHR, + /** + * Provision of treatment for oral health and/or dental surgery. + */ + DNTL, + /** + * Provision of treatment for drug abuse. + */ + DRGRHB, + /** + * General care performed by a general practitioner or family doctor as a responsible provider for a patient. + */ + GENRL, + /** + * Provision of diagnostic and/or therapeutic treatment. + */ + MED, + /** + * Provision of care of women during pregnancy, childbirth and immediate postpartum period. Also known as Maternity. + */ + OBS, + /** + * Provision of treatment and/or diagnosis related to tumors and/or cancer. + */ + ONC, + /** + * Provision of care for patients who are living or dying from an advanced illness. + */ + PALL, + /** + * Provision of diagnosis and treatment of diseases and disorders affecting children. + */ + PED, + /** + * Pharmaceutical care performed by a pharmacist. + */ + PHAR, + /** + * Provision of treatment for physical injury. + */ + PHYRHB, + /** + * Provision of treatment of psychiatric disorder relating to mental illness. + */ + PSYCH, + /** + * Provision of surgical treatment. + */ + SURG, + /** + * Description: Coded types of attachments included to support a healthcare claim. + */ + _ACTCLAIMATTACHMENTCATEGORYCODE, + /** + * Description: Automobile Information Attachment + */ + AUTOATTCH, + /** + * Description: Document Attachment + */ + DOCUMENT, + /** + * Description: Health Record Attachment + */ + HEALTHREC, + /** + * Description: Image Attachment + */ + IMG, + /** + * Description: Lab Results Attachment + */ + LABRESULTS, + /** + * Description: Digital Model Attachment + */ + MODEL, + /** + * Description: Work Injury related additional Information Attachment + */ + WIATTCH, + /** + * Description: Digital X-Ray Attachment + */ + XRAY, + /** + * Definition: The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research. + */ + _ACTCONSENTTYPE, + /** + * Definition: Consent to have healthcare information collected in an electronic health record. This entails that the information may be used in analysis, modified, updated. + */ + ICOL, + /** + * Definition: Consent to have collected healthcare information disclosed. + */ + IDSCL, + /** + * Definition: Consent to access healthcare information. + */ + INFA, + /** + * Definition: Consent to access or "read" only, which entails that the information is not to be copied, screen printed, saved, emailed, stored, re-disclosed or altered in any way. This level ensures that data which is masked or to which access is restricted will not be. + + + Example: Opened and then emailed or screen printed for use outside of the consent directive purpose. + */ + INFAO, + /** + * Definition: Consent to access and save only, which entails that access to the saved copy will remain locked. + */ + INFASO, + /** + * Definition: Information re-disclosed without the patient's consent. + */ + IRDSCL, + /** + * Definition: Consent to have healthcare information in an electronic health record accessed for research purposes. + */ + RESEARCH, + /** + * Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance. + */ + RSDID, + /** + * Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent. + + + Example:: Where there is a need to inform the subject of potential health issues. + */ + RSREID, + /** + * Constrains the ActCode to the domain of Container Registration + */ + _ACTCONTAINERREGISTRATIONCODE, + /** + * Used by one system to inform another that it has received a container. + */ + ID, + /** + * Used by one system to inform another that the container is in position for specimen transfer (e.g., container removal from track, pipetting, etc.). + */ + IP, + /** + * Used by one system to inform another that the container has been released from that system. + */ + L, + /** + * Used by one system to inform another that the container did not arrive at its next expected location. + */ + M, + /** + * Used by one system to inform another that the specific container is being processed by the equipment. It is useful as a response to a query about Container Status, when the specific step of the process is not relevant. + */ + O, + /** + * Status is used by one system to inform another that the processing has been completed, but the container has not been released from that system. + */ + R, + /** + * Used by one system to inform another that the container is no longer available within the scope of the system (e.g., tube broken or discarded). + */ + X, + /** + * An observation form that determines parameters or attributes of an Act. Examples are the settings of a ventilator machine as parameters of a ventilator treatment act; the controls on dillution factors of a chemical analyzer as a parameter of a laboratory observation act; the settings of a physiologic measurement assembly (e.g., time skew) or the position of the body while measuring blood pressure. + + Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g., it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure). + */ + _ACTCONTROLVARIABLE, + /** + * Specifies whether or not automatic repeat testing is to be initiated on specimens. + */ + AUTO, + /** + * A baseline value for the measured test that is inherently contained in the diluent. In the calculation of the actual result for the measured test, this baseline value is normally considered. + */ + ENDC, + /** + * Specifies whether or not further testing may be automatically or manually initiated on specimens. + */ + REFLEX, + /** + * Response to an insurance coverage eligibility query or authorization request. + */ + _ACTCOVERAGECONFIRMATIONCODE, + /** + * Indication of authorization for healthcare service(s) and/or product(s). If authorization is approved, funds are set aside. + */ + _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE, + /** + * Authorization approved and funds have been set aside to pay for specified healthcare service(s) and/or product(s) within defined criteria for the authorization. + */ + AUTH, + /** + * Authorization for specified healthcare service(s) and/or product(s) denied. + */ + NAUTH, + /** + * Indication of eligibility coverage for healthcare service(s) and/or product(s). + */ + _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE, + /** + * Insurance coverage is in effect for healthcare service(s) and/or product(s). + */ + ELG, + /** + * Insurance coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility. + */ + NELG, + /** + * Criteria that are applicable to the authorized coverage. + */ + _ACTCOVERAGELIMITCODE, + /** + * Maximum amount paid or maximum number of services/products covered; or maximum amount or number covered during a specified time period under the policy or program. + */ + _ACTCOVERAGEQUANTITYLIMITCODE, + /** + * Codes representing the time period during which coverage is available; or financial participation requirements are in effect. + */ + COVPRD, + /** + * Definition: Maximum amount paid by payer or covered party; or maximum number of services or products covered under the policy or program during a covered party's lifetime. + */ + LFEMX, + /** + * Maximum net amount that will be covered for the product or service specified. + */ + NETAMT, + /** + * Definition: Maximum amount paid by payer or covered party; or maximum number of services/products covered under the policy or program by time period specified by the effective time on the act. + */ + PRDMX, + /** + * Maximum unit price that will be covered for the authorized product or service. + */ + UNITPRICE, + /** + * Maximum number of items that will be covered of the product or service specified. + */ + UNITQTY, + /** + * Definition: Codes representing the maximum coverate or financial participation requirements. + */ + COVMX, + /** + * Codes representing the types of covered parties that may receive covered benefits under a policy or program. + */ + _ACTCOVEREDPARTYLIMITCODE, + /** + * Definition: Set of codes indicating the type of insurance policy or program that pays for the cost of benefits provided to covered parties. + */ + _ACTCOVERAGETYPECODE, + /** + * Set of codes indicating the type of insurance policy or other source of funds to cover healthcare costs. + */ + _ACTINSURANCEPOLICYCODE, + /** + * Private insurance policy that provides coverage in addition to other policies (e.g. in addition to a Public Healthcare insurance policy). + */ + EHCPOL, + /** + * Insurance policy that provides for an allotment of funds replenished on a periodic (e.g. annual) basis. The use of the funds under this policy is at the discretion of the covered party. + */ + HSAPOL, + /** + * Insurance policy for injuries sustained in an automobile accident. Will also typically covered non-named parties to the policy, such as pedestrians and passengers. + */ + AUTOPOL, + /** + * Definition: An automobile insurance policy under which the insurance company will cover the cost of damages to an automobile owned by the named insured that are caused by accident or intentionally by another party. + */ + COL, + /** + * Definition: An automobile insurance policy under which the insurance company will indemnify a loss for which another motorist is liable if that motorist is unable to pay because he or she is uninsured. Coverage under the policy applies to bodily injury damages only. Injuries to the covered party caused by a hit-and-run driver are also covered. + */ + UNINSMOT, + /** + * Insurance policy funded by a public health system such as a provincial or national health plan. Examples include BC MSP (British Columbia Medical Services Plan) OHIP (Ontario Health Insurance Plan), NHS (National Health Service). + */ + PUBLICPOL, + /** + * Definition: A public or government health program that administers and funds coverage for dental care to assist program eligible who meet financial and health status criteria. + */ + DENTPRG, + /** + * Definition: A public or government health program that administers and funds coverage for health and social services to assist program eligible who meet financial and health status criteria related to a particular disease. + + + Example: Reproductive health, sexually transmitted disease, and end renal disease programs. + */ + DISEASEPRG, + /** + * Definition: A program that provides low-income, uninsured, and underserved women access to timely, high-quality screening and diagnostic services, to detect breast and cervical cancer at the earliest stages. + + + Example: To improve women's access to screening for breast and cervical cancers, Congress passed the Breast and Cervical Cancer Mortality Prevention Act of 1990, which guided CDC in creating the National Breast and Cervical Cancer Early Detection Program (NBCCEDP), which provides access to critical breast and cervical cancer screening services for underserved women in the United States. An estimated 7 to 10% of U.S. women of screening age are eligible to receive NBCCEDP services. Federal guidelines establish an eligibility baseline to direct services to uninsured and underinsured women at or below 250% of federal poverty level; ages 18 to 64 for cervical screening; ages 40 to 64 for breast screening. + */ + CANPRG, + /** + * Definition: A public or government program that administers publicly funded coverage of kidney dialysis and kidney transplant services. + + Example: In the U.S., the Medicare End-stage Renal Disease program (ESRD), the National Kidney Foundation (NKF) American Kidney Fund (AKF) The Organ Transplant Fund. + */ + ENDRENAL, + /** + * Definition: Government administered and funded HIV-AIDS program for beneficiaries meeting financial and health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors. + + + Example: In the U.S., the Ryan White program, which is administered by the Health Resources and Services Administration. + */ + HIVAIDS, + /** + * mandatory health program + */ + MANDPOL, + /** + * Definition: Government administered and funded mental health program for beneficiaries meeting financial and mental health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors. + + + Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA). + */ + MENTPRG, + /** + * Definition: Government administered and funded program to support provision of care to underserved populations through safety net clinics. + + + Example: In the U.S., safety net providers such as federally qualified health centers (FQHC) receive funding under PHSA Section 330 grants administered by the Health Resources and Services Administration. + */ + SAFNET, + /** + * Definition: Government administered and funded substance use program for beneficiaries meeting financial, substance use behavior, and health status criteria. Beneficiaries may be required to enroll as a result of legal proceedings. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors. + + + Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA). + */ + SUBPRG, + /** + * Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + */ + SUBSIDIZ, + /** + * Definition: A government health program that provides coverage through managed care contracts for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + + + Discussion: The structure and business processes for underwriting and administering a subsidized managed care program is further specified by the Underwriter and Payer Role.class and Role.code. + */ + SUBSIDMC, + /** + * Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria for a supplemental health policy or program such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + + + Example: Supplemental health coverage program may cover the cost of a health program or policy financial participations, such as the copays and the premiums, and may provide coverage for services in addition to those covered under the supplemented health program or policy. In the U.S., Medicaid programs may pay the premium for a covered party who is also covered under the Medicare program or a private health policy. + + + Discussion: The structure and business processes for underwriting and administering a subsidized supplemental retiree health program is further specified by the Underwriter and Payer Role.class and Role.code. + */ + SUBSUPP, + /** + * Insurance policy for injuries sustained in the work place or in the course of employment. + */ + WCBPOL, + /** + * Definition: Set of codes indicating the type of insurance policy. Insurance, in law and economics, is a form of risk management primarily used to hedge against the risk of potential financial loss. Insurance is defined as the equitable transfer of the risk of a potential loss, from one entity to another, in exchange for a premium and duty of care. A policy holder is an individual or an organization enters into a contract with an underwriter which stipulates that, in exchange for payment of a sum of money (a premium), one or more covered parties (insureds) is guaranteed compensation for losses resulting from certain perils under specified conditions. The underwriter analyzes the risk of loss, makes a decision as to whether the risk is insurable, and prices the premium accordingly. A policy provides benefits that indemnify or cover the cost of a loss incurred by a covered party, and may include coverage for services required to remediate a loss. An insurance policy contains pertinent facts about the policy holder, the insurance coverage, the covered parties, and the insurer. A policy may include exemptions and provisions specifying the extent to which the indemnification clause cannot be enforced for intentional tortious conduct of a covered party, e.g., whether the covered parties are jointly or severably insured. + + + Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g., an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType. + */ + _ACTINSURANCETYPECODE, + /** + * Definition: Set of codes indicating the type of health insurance policy that covers health services provided to covered parties. A health insurance policy is a written contract for insurance between the insurance company and the policyholder, and contains pertinent facts about the policy owner (the policy holder), the health insurance coverage, the insured subscribers and dependents, and the insurer. Health insurance is typically administered in accordance with a plan, which specifies (1) the type of health services and health conditions that will be covered under what circumstances (e.g., exclusion of a pre-existing condition, service must be deemed medically necessary; service must not be experimental; service must provided in accordance with a protocol; drug must be on a formulary; service must be prior authorized; or be a referral from a primary care provider); (2) the type and affiliation of providers (e.g., only allopathic physicians, only in network, only providers employed by an HMO); (3) financial participations required of covered parties (e.g., co-pays, coinsurance, deductibles, out-of-pocket); and (4) the manner in which services will be paid (e.g., under indemnity or fee-for-service health plans, the covered party typically pays out-of-pocket and then file a claim for reimbursement, while health plans that have contractual relationships with providers, i.e., network providers, typically do not allow the providers to bill the covered party for the cost of the service until after filing a claim with the payer and receiving reimbursement). + */ + _ACTHEALTHINSURANCETYPECODE, + /** + * Definition: A health insurance policy that that covers benefits for dental services. + */ + DENTAL, + /** + * Definition: A health insurance policy that covers benefits for healthcare services provided for named conditions under the policy, e.g., cancer, diabetes, or HIV-AIDS. + */ + DISEASE, + /** + * Definition: A health insurance policy that covers benefits for prescription drugs, pharmaceuticals, and supplies. + */ + DRUGPOL, + /** + * Definition: A health insurance policy that covers healthcare benefits by protecting covered parties from medical expenses arising from health conditions, sickness, or accidental injury as well as preventive care. Health insurance policies explicitly exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy. + + + Discussion: Health insurance policies are offered by health insurance plans that typically reimburse providers for covered services on a fee-for-service basis, that is, a fee that is the allowable amount that a provider may charge. This is in contrast to managed care plans, which typically prepay providers a per-member/per-month amount or capitation as reimbursement for all covered services rendered. Health insurance plans include indemnity and healthcare services plans. + */ + HIP, + /** + * Definition: An insurance policy that covers benefits for long-term care services people need when they no longer can care for themselves. This may be due to an accident, disability, prolonged illness or the simple process of aging. Long-term care services assist with activities of daily living including: + + + + Help at home with day-to-day activities, such as cooking, cleaning, bathing and dressing + + + + Care in the community, such as in an adult day care facility + + + + Supervised care provided in an assisted living facility + + + + Skilled care provided in a nursing home + */ + LTC, + /** + * Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well. + + Managed care policies specifically exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy. + + + Discussion: Managed care policies are offered by managed care plans that contract with selected providers or health care organizations to provide comprehensive health care at a discount to covered parties and coordinate the financing and delivery of health care. Managed care uses medical protocols and procedures agreed on by the medical profession to be cost effective, also known as medical practice guidelines. Providers are typically reimbursed for covered services by a capitated amount on a per member per month basis that may reflect difference in the health status and level of services anticipated to be needed by the member. + */ + MCPOL, + /** + * Definition: A policy for a health plan that has features of both an HMO and a FFS plan. Like an HMO, a POS plan encourages the use its HMO network to maintain discounted fees with participating providers, but recognizes that sometimes covered parties want to choose their own provider. The POS plan allows a covered party to use providers who are not part of the HMO network (non-participating providers). However, there is a greater cost associated with choosing these non-network providers. A covered party will usually pay deductibles and coinsurances that are substantially higher than the payments when he or she uses a plan provider. Use of non-participating providers often requires the covered party to pay the provider directly and then to file a claim for reimbursement, like in an FFS plan. + */ + POS, + /** + * Definition: A policy for a health plan that provides coverage for health care only through contracted or employed physicians and hospitals located in particular geographic or service areas. HMOs emphasize prevention and early detection of illness. Eligibility to enroll in an HMO is determined by where a covered party lives or works. + */ + HMO, + /** + * Definition: A network-based, managed care plan that allows a covered party to choose any health care provider. However, if care is received from a "preferred" (participating in-network) provider, there are generally higher benefit coverage and lower deductibles. + */ + PPO, + /** + * Definition: A health insurance policy that covers benefits for mental health services and prescriptions. + */ + MENTPOL, + /** + * Definition: A health insurance policy that covers benefits for substance use services. + */ + SUBPOL, + /** + * Definition: Set of codes for a policy that provides coverage for health care expenses arising from vision services. + + A health insurance policy that covers benefits for vision care services, prescriptions, and products. + */ + VISPOL, + /** + * Definition: An insurance policy that provides a regular payment to compensate for income lost due to the covered party's inability to work because of illness or injury. + */ + DIS, + /** + * Definition: An insurance policy under a benefit plan run by an employer or employee organization for the purpose of providing benefits other than pension-related to employees and their families. Typically provides health-related benefits, benefits for disability, disease or unemployment, or day care and scholarship benefits, among others. An employer sponsored health policy includes coverage of health care expenses arising from sickness or accidental injury, coverage for on-site medical clinics or for dental or vision benefits, which are typically provided under a separate policy. Coverage excludes health care expenses covered by accident or disability, workers' compensation, liability or automobile insurance. + */ + EWB, + /** + * Definition: An insurance policy that covers qualified benefits under a Flexible Benefit plan such as group medical insurance, long and short term disability income insurance, group term life insurance for employees only up to $50,000 face amount, specified disease coverage such as a cancer policy, dental and/or vision insurance, hospital indemnity insurance, accidental death and dismemberment insurance, a medical expense reimbursement plan and a dependent care reimbursement plan. + + + Discussion: See UnderwriterRoleTypeCode flexible benefit plan which is defined as a benefit plan that allows employees to choose from several life, health, disability, dental, and other insurance plans according to their individual needs. Also known as cafeteria plans. Authorized under Section 125 of the Revenue Act of 1978. + */ + FLEXP, + /** + * Definition: A policy under which the insurer agrees to pay a sum of money upon the occurrence of the covered partys death. In return, the policyholder agrees to pay a stipulated amount called a premium at regular intervals. Life insurance indemnifies the beneficiary for the loss of the insurable interest that a beneficiary has in the life of a covered party. For persons related by blood, a substantial interest established through love and affection, and for all other persons, a lawful and substantial economic interest in having the life of the insured continue. An insurable interest is required when purchasing life insurance on another person. Specific exclusions are often written into the contract to limit the liability of the insurer; for example claims resulting from suicide or relating to war, riot and civil commotion. + + + Discussion:A life insurance policy may be used by the covered party as a source of health care coverage in the case of a viatical settlement, which is the sale of a life insurance policy by the policy owner, before the policy matures. Such a sale, at a price discounted from the face amount of the policy but usually in excess of the premiums paid or current cash surrender value, provides the seller an immediate cash settlement. Generally, viatical settlements involve insured individuals with a life expectancy of less than two years. In countries without state-subsidized healthcare and high healthcare costs (e.g. United States), this is a practical way to pay extremely high health insurance premiums that severely ill people face. Some people are also familiar with life settlements, which are similar transactions but involve insureds with longer life expectancies (two to fifteen years). + */ + LIFE, + /** + * Definition: A policy that, after an initial premium or premiums, pays out a sum at pre-determined intervals. + + For example, a policy holder may pay $10,000, and in return receive $150 each month until he dies; or $1,000 for each of 14 years or death benefits if he dies before the full term of the annuity has elapsed. + */ + ANNU, + /** + * Definition: Life insurance under which the benefit is payable only if the insured dies during a specified period. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing. + */ + TLIFE, + /** + * Definition: Life insurance under which the benefit is payable upon the insuredaTMs death or diagnosis of a terminal illness. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing + */ + ULIFE, + /** + * Definition: A type of insurance that covers damage to or loss of the policyholderaTMs property by providing payments for damages to property damage or the injury or death of living subjects. The terms "casualty" and "liability" insurance are often used interchangeably. Both cover the policyholder's legal liability for damages caused to other persons and/or their property. + */ + PNC, + /** + * Definition: An agreement between two or more insurance companies by which the risk of loss is proportioned. Thus the risk of loss is spread and a disproportionately large loss under a single policy does not fall on one insurance company. Acceptance by an insurer, called a reinsurer, of all or part of the risk of loss of another insurance company. + + + Discussion: Reinsurance is a means by which an insurance company can protect itself against the risk of losses with other insurance companies. Individuals and corporations obtain insurance policies to provide protection for various risks (hurricanes, earthquakes, lawsuits, collisions, sickness and death, etc.). Reinsurers, in turn, provide insurance to insurance companies. + + For example, an HMO may purchase a reinsurance policy to protect itself from losing too much money from one insured's particularly expensive health care costs. An insurance company issuing an automobile liability policy, with a limit of $100,000 per accident may reinsure its liability in excess of $10,000. A fire insurance company which issues a large policy generally reinsures a portion of the risk with one or several other companies. Also called risk control insurance or stop-loss insurance. + */ + REI, + /** + * Definition: + + + + + A risk or part of a risk for which there is no normal insurance market available. + + + + Insurance written by unauthorized insurance companies. Surplus lines insurance is insurance placed with unauthorized insurance companies through licensed surplus lines agents or brokers. + */ + SURPL, + /** + * Definition: A form of insurance protection that provides additional liability coverage after the limits of your underlying policy are reached. An umbrella liability policy also protects you (the insured) in many situations not covered by the usual liability policies. + */ + UMBRL, + /** + * Definition: A set of codes used to indicate coverage under a program. A program is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health, financial, and demographic status. Programs are typically established or permitted by legislation with provisions for ongoing government oversight. Regulations may mandate the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency may be charged with implementing the program in accordance to the regulation. Risk of loss under a program in most cases would not meet what an underwriter would consider an insurable risk, i.e., the risk is not random in nature, not financially measurable, and likely requires subsidization with government funds. + + + Discussion: Programs do not have policy holders or subscribers. Program eligibles are enrolled based on health status, statutory eligibility, financial status, or age. Program eligibles who are covered parties under the program may be referred to as members, beneficiaries, eligibles, or recipients. Programs risk are underwritten by not for profit organizations such as governmental entities, and the beneficiaries typically do not pay for any or some portion of the cost of coverage. See CoveredPartyRoleType. + */ + _ACTPROGRAMTYPECODE, + /** + * Definition: A program that covers the cost of services provided directly to a beneficiary who typically has no other source of coverage without charge. + */ + CHAR, + /** + * Definition: A program that covers the cost of services provided to crime victims for injuries or losses related to the occurrence of a crime. + */ + CRIME, + /** + * Definition: An employee assistance program is run by an employer or employee organization for the purpose of providing benefits and covering all or part of the cost for employees to receive counseling, referrals, and advice in dealing with stressful issues in their lives. These may include substance abuse, bereavement, marital problems, weight issues, or general wellness issues. The services are usually provided by a third-party, rather than the company itself, and the company receives only summary statistical data from the service provider. Employee's names and services received are kept confidential. + */ + EAP, + /** + * Definition: A set of codes used to indicate a government program that is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health and financial status. Government programs are established or permitted by legislation with provisions for ongoing government oversight. Regulation mandates the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency is charged with implementing the program in accordance to the regulation + + + Example: Federal employee health benefit program in the U.S. + */ + GOVEMP, + /** + * Definition: A government program that provides health coverage to individuals who are considered medically uninsurable or high risk, and who have been denied health insurance due to a serious health condition. In certain cases, it also applies to those who have been quoted very high premiums a" again, due to a serious health condition. The pool charges premiums for coverage. Because the pool covers high-risk people, it incurs a higher level of claims than premiums can cover. The insurance industry pays into the pool to make up the difference and help it remain viable. + */ + HIRISK, + /** + * Definition: Services provided directly and through contracted and operated indigenous peoples health programs. + + + Example: Indian Health Service in the U.S. + */ + IND, + /** + * Definition: A government program that provides coverage for health services to military personnel, retirees, and dependents. A covered party who is a subscriber can choose from among Fee-for-Service (FFS) plans, and their Preferred Provider Organizations (PPO), or Plans offering a Point of Service (POS) Product, or Health Maintenance Organizations. + + + Example: In the U.S., TRICARE, CHAMPUS. + */ + MILITARY, + /** + * Definition: A government mandated program with specific eligibility requirements based on premium contributions made during employment, length of employment, age, and employment status, e.g., being retired, disabled, or a dependent of a covered party under this program. Benefits typically include ambulatory, inpatient, and long-term care, such as hospice care, home health care and respite care. + */ + RETIRE, + /** + * Definition: A social service program funded by a public or governmental entity. + + + Example: Programs providing habilitation, food, lodging, medicine, transportation, equipment, devices, products, education, training, counseling, alteration of living or work space, and other resources to persons meeting eligibility criteria. + */ + SOCIAL, + /** + * Definition: Services provided directly and through contracted and operated veteran health programs. + */ + VET, + /** + * Codes dealing with the management of Detected Issue observations + */ + _ACTDETECTEDISSUEMANAGEMENTCODE, + /** + * Codes dealing with the management of Detected Issue observations for the administrative and patient administrative acts domains. + */ + _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE, + /** + * Authorization Issue Management Code + */ + _AUTHORIZATIONISSUEMANAGEMENTCODE, + /** + * Used to temporarily override normal authorization rules to gain access to data in a case of emergency. Use of this override code will typically be monitored, and a procedure to verify its proper use may be triggered when used. + */ + EMAUTH, + /** + * Description: Indicates that the permissions have been externally verified and the request should be processed. + */ + _21, + /** + * Confirmed drug therapy appropriate + */ + _1, + /** + * Consulted other supplier/pharmacy, therapy confirmed + */ + _19, + /** + * Assessed patient, therapy is appropriate + */ + _2, + /** + * Description: The patient has the appropriate indication or diagnosis for the action to be taken. + */ + _22, + /** + * Description: It has been confirmed that the appropriate pre-requisite therapy has been tried. + */ + _23, + /** + * Patient gave adequate explanation + */ + _3, + /** + * Consulted other supply source, therapy still appropriate + */ + _4, + /** + * Consulted prescriber, therapy confirmed + */ + _5, + /** + * Consulted prescriber and recommended change, prescriber declined + */ + _6, + /** + * Concurrent therapy triggering alert is no longer on-going or planned + */ + _7, + /** + * Confirmed supply action appropriate + */ + _14, + /** + * Patient's existing supply was lost/wasted + */ + _15, + /** + * Supply date is due to patient vacation + */ + _16, + /** + * Supply date is intended to carry patient over weekend + */ + _17, + /** + * Supply is intended for use during a leave of absence from an institution. + */ + _18, + /** + * Description: Supply is different than expected as an additional quantity has been supplied in a separate dispense. + */ + _20, + /** + * Order is performed as issued, but other action taken to mitigate potential adverse effects + */ + _8, + /** + * Provided education or training to the patient on appropriate therapy use + */ + _10, + /** + * Instituted an additional therapy to mitigate potential negative effects + */ + _11, + /** + * Suspended existing therapy that triggered interaction for the duration of this therapy + */ + _12, + /** + * Aborted existing therapy that triggered interaction. + */ + _13, + /** + * Arranged to monitor patient for adverse effects + */ + _9, + /** + * Concepts that identify the type or nature of exposure interaction. Examples include "household", "care giver", "intimate partner", "common space", "common substance", etc. to further describe the nature of interaction. + */ + _ACTEXPOSURECODE, + /** + * Description: Exposure participants' interaction occurred in a child care setting + */ + CHLDCARE, + /** + * Description: An interaction where the exposure participants traveled in/on the same vehicle (not necessarily concurrently, e.g. both are passengers of the same plane, but on different flights of that plane). + */ + CONVEYNC, + /** + * Description: Exposure participants' interaction occurred during the course of health care delivery or in a health care delivery setting, but did not involve the direct provision of care (e.g. a janitor cleaning a patient's hospital room). + */ + HLTHCARE, + /** + * Description: Exposure interaction occurred in context of one providing care for the other, i.e. a babysitter providing care for a child, a home-care aide providing assistance to a paraplegic. + */ + HOMECARE, + /** + * Description: Exposure participants' interaction occurred when both were patients being treated in the same (acute) health care delivery facility. + */ + HOSPPTNT, + /** + * Description: Exposure participants' interaction occurred when one visited the other who was a patient being treated in a health care delivery facility. + */ + HOSPVSTR, + /** + * Description: Exposure interaction occurred in context of domestic interaction, i.e. both participants reside in the same household. + */ + HOUSEHLD, + /** + * Description: Exposure participants' interaction occurred in the course of one or both participants being incarcerated at a correctional facility + */ + INMATE, + /** + * Description: Exposure interaction was intimate, i.e. participants are intimate companions (e.g. spouses, domestic partners). + */ + INTIMATE, + /** + * Description: Exposure participants' interaction occurred in the course of one or both participants being resident at a long term care facility (second participant may be a visitor, worker, resident or a physical place or object within the facility). + */ + LTRMCARE, + /** + * Description: An interaction where the exposure participants were both present in the same location/place/space. + */ + PLACE, + /** + * Description: Exposure participants' interaction occurred during the course of health care delivery by a provider (e.g. a physician treating a patient in her office). + */ + PTNTCARE, + /** + * Description: Exposure participants' interaction occurred in an academic setting (e.g., participants are fellow students, or student and teacher). + */ + SCHOOL2, + /** + * Description: An interaction where the exposure participants are social associates or members of the same extended family + */ + SOCIAL2, + /** + * Description: An interaction where the exposure participants shared or co-used a common substance (e.g. drugs, needles, or common food item). + */ + SUBSTNCE, + /** + * Description: An interaction where the exposure participants traveled together in/on the same vehicle/trip (e.g. concurrent co-passengers). + */ + TRAVINT, + /** + * Description: Exposure interaction occurred in a work setting, i.e. participants are co-workers. + */ + WORK2, + /** + * ActFinancialTransactionCode + */ + _ACTFINANCIALTRANSACTIONCODE, + /** + * A type of transaction that represents a charge for a service or product. Expressed in monetary terms. + */ + CHRG, + /** + * A type of transaction that represents a reversal of a previous charge for a service or product. Expressed in monetary terms. It has the opposite effect of a standard charge. + */ + REV, + /** + * Set of codes indicating the type of incident or accident. + */ + _ACTINCIDENTCODE, + /** + * Incident or accident as the result of a motor vehicle accident + */ + MVA, + /** + * Incident or accident is the result of a school place accident. + */ + SCHOOL, + /** + * Incident or accident is the result of a sporting accident. + */ + SPT, + /** + * Incident or accident is the result of a work place accident + */ + WPA, + /** + * Description: The type of health information to which the subject of the information or the subject's delegate consents or dissents. + */ + _ACTINFORMATIONACCESSCODE, + /** + * Description: Provide consent to collect, use, disclose, or access adverse drug reaction information for a patient. + */ + ACADR, + /** + * Description: Provide consent to collect, use, disclose, or access all information for a patient. + */ + ACALL, + /** + * Description: Provide consent to collect, use, disclose, or access allergy information for a patient. + */ + ACALLG, + /** + * Description: Provide consent to collect, use, disclose, or access informational consent information for a patient. + */ + ACCONS, + /** + * Description: Provide consent to collect, use, disclose, or access demographics information for a patient. + */ + ACDEMO, + /** + * Description: Provide consent to collect, use, disclose, or access diagnostic imaging information for a patient. + */ + ACDI, + /** + * Description: Provide consent to collect, use, disclose, or access immunization information for a patient. + */ + ACIMMUN, + /** + * Description: Provide consent to collect, use, disclose, or access lab test result information for a patient. + */ + ACLAB, + /** + * Description: Provide consent to collect, use, disclose, or access medical condition information for a patient. + */ + ACMED, + /** + * Definition: Provide consent to view or access medical condition information for a patient. + */ + ACMEDC, + /** + * Description:Provide consent to collect, use, disclose, or access mental health information for a patient. + */ + ACMEN, + /** + * Description: Provide consent to collect, use, disclose, or access common observation information for a patient. + */ + ACOBS, + /** + * Description: Provide consent to collect, use, disclose, or access coverage policy or program for a patient. + */ + ACPOLPRG, + /** + * Description: Provide consent to collect, use, disclose, or access provider information for a patient. + */ + ACPROV, + /** + * Description: Provide consent to collect, use, disclose, or access professional service information for a patient. + */ + ACPSERV, + /** + * Description:Provide consent to collect, use, disclose, or access substance abuse information for a patient. + */ + ACSUBSTAB, + /** + * Concepts conveying the context in which authorization given under jurisdictional law, by organizational policy, or by a patient consent directive permits the collection, access, use or disclosure of specified patient health information. + */ + _ACTINFORMATIONACCESSCONTEXTCODE, + /** + * Authorization to collect, access, use, or disclose specified patient health information in accordance with jurisdictional law, organizational policy, or a patient's consent directive, which may be implied, deemed, opt-in, opt-out, or explicit. + */ + INFAUT, + /** + * Authorization to collect, access, use, or disclose specified patient health information as explicitly consented to by the subject of the information or the subject's representative. + */ + INFCON, + /** + * Authorization to collect, access, use, or disclose specified patient health information in accordance with judicial system protocol, such as in the case of a subpoena or court order. + */ + INFCRT, + /** + * Authorization to collect, access, use, or disclose specified patient health information where deemed necessary to avert potential danger to other persons in accordance with jurisdictional law, organizational policy, or standards of practice. For example, disclosure about a person threatening violence. + */ + INFDNG, + /** + * Authorization to collect, access, use, or disclose specified patient health information in accordance with emergency information transfer protocol dictated by jurisdictional law, organization policy, or standards of practice. For example, sharing of health information during disaster response. + */ + INFEMER, + /** + * Authorization to collect, access, use, or disclose specified patient health information necessary to avert potential public welfare risk in accordance with jurisdictional law, organizational policy, or standards of practice. For example, reporting that a person is a victim of abuse or demonstrating suicidal tendencies. + */ + INFPWR, + /** + * Authorization to collect, access, use, or disclose specified patient health information for public health, welfare, and safety purposes in accordance with jurisdictional law, organizational policy, or standards of practice. For example, public health reporting of notifiable conditions. + */ + INFREG, + /** + * Definition:Indicates the set of information types which may be manipulated or referenced, such as for recommending access restrictions. + */ + _ACTINFORMATIONCATEGORYCODE, + /** + * Description: All patient information. + */ + ALLCAT, + /** + * Definition:All information pertaining to a patient's allergy and intolerance records. + */ + ALLGCAT, + /** + * Description: All information pertaining to a patient's adverse drug reactions. + */ + ARCAT, + /** + * Definition:All information pertaining to a patient's common observation records (height, weight, blood pressure, temperature, etc.). + */ + COBSCAT, + /** + * Definition:All information pertaining to a patient's demographics (such as name, date of birth, gender, address, etc). + */ + DEMOCAT, + /** + * Definition:All information pertaining to a patient's diagnostic image records (orders & results). + */ + DICAT, + /** + * Definition:All information pertaining to a patient's vaccination records. + */ + IMMUCAT, + /** + * Description: All information pertaining to a patient's lab test records (orders & results) + */ + LABCAT, + /** + * Definition:All information pertaining to a patient's medical condition records. + */ + MEDCCAT, + /** + * Description: All information pertaining to a patient's mental health records. + */ + MENCAT, + /** + * Definition:All information pertaining to a patient's professional service records (such as smoking cessation, counseling, medication review, mental health). + */ + PSVCCAT, + /** + * Definition:All information pertaining to a patient's medication records (orders, dispenses and other active medications). + */ + RXCAT, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + */ + _ACTINVOICEELEMENTCODE, + /** + * Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee and other cost elements such as bonus, retroactive adjustment and transaction fees. + */ + _ACTINVOICEADJUDICATIONPAYMENTCODE, + /** + * Codes representing adjustments to a Payment Advice such as retroactive, clawback, garnishee, etc. + */ + _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE, + /** + * Payment initiated by the payor as the result of adjudicating a submitted invoice that arrived to the payor from an electronic source that did not provide a conformant set of HL7 messages (e.g. web claim submission). + */ + ALEC, + /** + * Bonus payments based on performance, volume, etc. as agreed to by the payor. + */ + BONUS, + /** + * An amount still owing to the payor but the payment is 0$ and this cannot be settled until a future payment is made. + */ + CFWD, + /** + * Fees deducted on behalf of a payee for tuition and continuing education. + */ + EDU, + /** + * Fees deducted on behalf of a payee for charges based on a shorter payment frequency (i.e. next day versus biweekly payments. + */ + EPYMT, + /** + * Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee. + */ + GARN, + /** + * Payment is based on a payment intent for a previously submitted Invoice, based on formal adjudication results.. + */ + INVOICE, + /** + * Payment initiated by the payor as the result of adjudicating a paper (original, may have been faxed) invoice. + */ + PINV, + /** + * An amount that was owed to the payor as indicated, by a carry forward adjusment, in a previous payment advice + */ + PPRD, + /** + * Professional association fee that is collected by the payor from the practitioner/provider on behalf of the association + */ + PROA, + /** + * Retroactive adjustment such as fee rate adjustment due to contract negotiations. + */ + RECOV, + /** + * Bonus payments based on performance, volume, etc. as agreed to by the payor. + */ + RETRO, + /** + * Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee. + */ + TRAN, + /** + * Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee, etc. + */ + _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE, + /** + * Transaction counts and value totals by invoice type (e.g. RXDINV - Pharmacy Dispense) + */ + INVTYPE, + /** + * Transaction counts and value totals by each instance of an invoice payee. + */ + PAYEE, + /** + * Transaction counts and value totals by each instance of an invoice payor. + */ + PAYOR, + /** + * Transaction counts and value totals by each instance of a messaging application on a single processor. It is a registered identifier known to the receivers. + */ + SENDAPP, + /** + * Codes representing a service or product that is being invoiced (billed). The code can represent such concepts as "office visit", "drug X", "wheelchair" and other billable items such as taxes, service charges and discounts. + */ + _ACTINVOICEDETAILCODE, + /** + * An identifying data string for healthcare products. + */ + _ACTINVOICEDETAILCLINICALPRODUCTCODE, + /** + * Description:United Nations Standard Products and Services Classification, managed by Uniform Code Council (UCC): www.unspsc.org + */ + UNSPSC, + /** + * An identifying data string for A substance used as a medication or in the preparation of medication. + */ + _ACTINVOICEDETAILDRUGPRODUCTCODE, + /** + * Description:Global Trade Item Number is an identifier for trade items developed by GS1 (comprising the former EAN International and Uniform Code Council). + */ + GTIN, + /** + * Description:Universal Product Code is one of a wide variety of bar code languages widely used in the United States and Canada for items in stores. + */ + UPC, + /** + * The detail item codes to identify charges or changes to the total billing of a claim due to insurance rules and payments. + */ + _ACTINVOICEDETAILGENERICCODE, + /** + * The billable item codes to identify adjudicator specified components to the total billing of a claim. + */ + _ACTINVOICEDETAILGENERICADJUDICATORCODE, + /** + * That portion of the eligible charges which a covered party must pay for each service and/or product. It is a percentage of the eligible amount for the service/product that is typically charged after the covered party has met the policy deductible. This amount represents the covered party's coinsurance that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results. + */ + COIN, + /** + * That portion of the eligible charges which a covered party must pay for each service and/or product. It is a defined amount per service/product of the eligible amount for the service/product. This amount represents the covered party's copayment that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results. + */ + COPAYMENT, + /** + * That portion of the eligible charges which a covered party must pay in a particular period (e.g. annual) before the benefits are payable by the adjudicator. This amount represents the covered party's deductible that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results. + */ + DEDUCTIBLE, + /** + * The guarantor, who may be the patient, pays the entire charge for a service. Reasons for such action may include: there is no insurance coverage for the service (e.g. cosmetic surgery); the patient wishes to self-pay for the service; or the insurer denies payment for the service due to contractual provisions such as the need for prior authorization. + */ + PAY, + /** + * That total amount of the eligible charges which a covered party must periodically pay for services and/or products prior to the Medicaid program providing any coverage. This amount represents the covered party's spend down that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results + */ + SPEND, + /** + * The covered party pays a percentage of the cost of covered services. + */ + COINS, + /** + * The billable item codes to identify modifications to a billable item charge. As for example after hours increase in the office visit fee. + */ + _ACTINVOICEDETAILGENERICMODIFIERCODE, + /** + * Premium paid on service fees in compensation for practicing outside of normal working hours. + */ + AFTHRS, + /** + * Premium paid on service fees in compensation for practicing in a remote location. + */ + ISOL, + /** + * Premium paid on service fees in compensation for practicing at a location other than normal working location. + */ + OOO, + /** + * The billable item codes to identify provider supplied charges or changes to the total billing of a claim. + */ + _ACTINVOICEDETAILGENERICPROVIDERCODE, + /** + * A charge to compensate the provider when a patient cancels an appointment with insufficient time for the provider to make another appointment with another patient. + */ + CANCAPT, + /** + * A reduction in the amount charged as a percentage of the amount. For example a 5% discount for volume purchase. + */ + DSC, + /** + * A premium on a service fee is requested because, due to extenuating circumstances, the service took an extraordinary amount of time or supplies. + */ + ESA, + /** + * Under agreement between the parties (payor and provider), a guaranteed level of income is established for the provider over a specific, pre-determined period of time. The normal course of business for the provider is submission of fee-for-service claims. Should the fee-for-service income during the specified period of time be less than the agreed to amount, a top-up amount is paid to the provider equal to the difference between the fee-for-service total and the guaranteed income amount for that period of time. The details of the agreement may specify (or not) a requirement for repayment to the payor in the event that the fee-for-service income exceeds the guaranteed amount. + */ + FFSTOP, + /** + * Anticipated or actual final fee associated with treating a patient. + */ + FNLFEE, + /** + * Anticipated or actual initial fee associated with treating a patient. + */ + FRSTFEE, + /** + * An increase in the amount charged as a percentage of the amount. For example, 12% markup on product cost. + */ + MARKUP, + /** + * A charge to compensate the provider when a patient does not show for an appointment. + */ + MISSAPT, + /** + * Anticipated or actual periodic fee associated with treating a patient. For example, expected billing cycle such as monthly, quarterly. The actual period (e.g. monthly, quarterly) is specified in the unit quantity of the Invoice Element. + */ + PERFEE, + /** + * The amount for a performance bonus that is being requested from a payor for the performance of certain services (childhood immunizations, influenza immunizations, mammograms, pap smears) on a sliding scale. That is, for 90% of childhood immunizations to a maximum of $2200/yr. An invoice is created at the end of the service period (one year) and a code is submitted indicating the percentage achieved and the dollar amount claimed. + */ + PERMBNS, + /** + * A charge is requested because the patient failed to pick up the item and it took an amount of time to return it to stock for future use. + */ + RESTOCK, + /** + * A charge to cover the cost of travel time and/or cost in conjuction with providing a service or product. It may be charged per kilometer or per hour based on the effective agreement. + */ + TRAVEL, + /** + * Premium paid on service fees in compensation for providing an expedited response to an urgent situation. + */ + URGENT, + /** + * The billable item codes to identify modifications to a billable item charge by a tax factor applied to the amount. As for example 7% provincial sales tax. + */ + _ACTINVOICEDETAILTAXCODE, + /** + * Federal tax on transactions such as the Goods and Services Tax (GST) + */ + FST, + /** + * Joint Federal/Provincial Sales Tax + */ + HST, + /** + * Tax levied by the provincial or state jurisdiction such as Provincial Sales Tax + */ + PST, + /** + * An identifying data string for medical facility accommodations. + */ + _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE, + /** + * Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type. + */ + _ACTENCOUNTERACCOMMODATIONCODE, + /** + * Description:Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type. + */ + _HL7ACCOMMODATIONCODE, + /** + * Accommodations used in the care of diseases that are transmitted through casual contact or respiratory transmission. + */ + I, + /** + * Accommodations in which there is only 1 bed. + */ + P, + /** + * Uniquely designed and elegantly decorated accommodations with many amenities available for an additional charge. + */ + S, + /** + * Accommodations in which there are 2 beds. + */ + SP, + /** + * Accommodations in which there are 3 or more beds. + */ + W, + /** + * An identifying data string for healthcare procedures. + */ + _ACTINVOICEDETAILCLINICALSERVICECODE, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + + Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements. + */ + _ACTINVOICEGROUPCODE, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + + Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements. + + The domain is only specified for an intermediate invoice element group (non-root or non-top level) for an Invoice. + */ + _ACTINVOICEINTERGROUPCODE, + /** + * A grouping of invoice element groups and details including the ones specifying the compound ingredients being invoiced. It may also contain generic detail items such as markup. + */ + CPNDDRGING, + /** + * A grouping of invoice element details including the one specifying an ingredient drug being invoiced. It may also contain generic detail items such as tax or markup. + */ + CPNDINDING, + /** + * A grouping of invoice element groups and details including the ones specifying the compound supplies being invoiced. It may also contain generic detail items such as markup. + */ + CPNDSUPING, + /** + * A grouping of invoice element details including the one specifying the drug being invoiced. It may also contain generic detail items such as markup. + */ + DRUGING, + /** + * A grouping of invoice element details including the ones specifying the frame fee and the frame dispensing cost that are being invoiced. + */ + FRAMEING, + /** + * A grouping of invoice element details including the ones specifying the lens fee and the lens dispensing cost that are being invoiced. + */ + LENSING, + /** + * A grouping of invoice element details including the one specifying the product (good or supply) being invoiced. It may also contain generic detail items such as tax or discount. + */ + PRDING, + /** + * Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results. + + Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements. + + Codes from this domain reflect the type of Invoice such as Pharmacy Dispense, Clinical Service and Clinical Product. The domain is only specified for the root (top level) invoice element group for an Invoice. + */ + _ACTINVOICEROOTGROUPCODE, + /** + * Clinical product invoice where the Invoice Grouping contains one or more billable item and is supported by clinical product(s). + + For example, a crutch or a wheelchair. + */ + CPINV, + /** + * Clinical Services Invoice which can be used to describe a single service, multiple services or repeated services. + + [1] Single Clinical services invoice where the Invoice Grouping contains one billable item and is supported by one clinical service. + + For example, a single service for an office visit or simple clinical procedure (e.g. knee mobilization). + + [2] Multiple Clinical services invoice where the Invoice Grouping contains more than one billable item, supported by one or more clinical services. The services can be distinct and over multiple dates, but for the same patient. This type of invoice includes a series of treatments which must be adjudicated together. + + For example, an adjustment and ultrasound for a chiropractic session where fees are associated for each of the services and adjudicated (invoiced) together. + + [3] Repeated Clinical services invoice where the Invoice Grouping contains one or more billable item, supported by the same clinical service repeated over a period of time. + + For example, the same Chiropractic adjustment (service or treatment) delivered on 3 separate occasions over a period of time at the discretion of the provider (e.g. month). + */ + CSINV, + /** + * A clinical Invoice Grouping consisting of one or more services and one or more product. Billing for these service(s) and product(s) are supported by multiple clinical billable events (acts). + + All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator. + + For example , a brace (product) invoiced together with the fitting (service). + */ + CSPINV, + /** + * Invoice Grouping without clinical justification. These will not require identification of participants and associations from a clinical context such as patient and provider. + + Examples are interest charges and mileage. + */ + FININV, + /** + * A clinical Invoice Grouping consisting of one or more oral health services. Billing for these service(s) are supported by multiple clinical billable events (acts). + + All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator. + */ + OHSINV, + /** + * HealthCare facility preferred accommodation invoice. + */ + PAINV, + /** + * Pharmacy dispense invoice for a compound. + */ + RXCINV, + /** + * Pharmacy dispense invoice not involving a compound + */ + RXDINV, + /** + * Clinical services invoice where the Invoice Group contains one billable item for multiple clinical services in one or more sessions. + */ + SBFINV, + /** + * Vision dispense invoice for up to 2 lens (left and right), frame and optional discount. Eye exams are invoiced as a clinical service invoice. + */ + VRXINV, + /** + * Identifies the different types of summary information that can be reported by queries dealing with Statement of Financial Activity (SOFA). The summary information is generally used to help resolve balance discrepancies between providers and payors. + */ + _ACTINVOICEELEMENTSUMMARYCODE, + /** + * Total counts and total net amounts adjudicated for all Invoice Groupings that were adjudicated within a time period based on the adjudication date of the Invoice Grouping. + */ + _INVOICEELEMENTADJUDICATED, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically. + */ + ADNFPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically. + */ + ADNFPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically. + */ + ADNFSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically. + */ + ADNFSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually. + */ + ADNFSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + ADNPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + ADNPSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + ADPPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + ADPPSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually. + */ + ADRFPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually. + */ + ADRFPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically. + */ + ADRFSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually. + */ + ADRFSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually. + */ + ADRFSPMNCT, + /** + * Total counts and total net amounts paid for all Invoice Groupings that were paid within a time period based on the payment date. + */ + _INVOICEELEMENTPAID, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically. + */ + PDNFPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically. + */ + PDNFPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically. + */ + PDNFSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently cancelled in the specified period and submitted electronically. + */ + PDNFSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually. + */ + PDNFSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically. + */ + PDNPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually. + */ + PDNPSPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPPPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPPPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPPPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPPPMNCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPSPELAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically. + */ + PDPPSPELCT, + /** + * Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPSPMNAT, + /** + * Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually. + */ + PDPPSPMNCT, + /** + * Total counts and total net amounts billed for all Invoice Groupings that were submitted within a time period. Adjudicated invoice elements are included. + */ + _INVOICEELEMENTSUBMITTED, + /** + * Identifies the total net amount billed for all submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBBLELAT, + /** + * Identifies the total number of submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBBLELCT, + /** + * Identifies the total net amount billed for all submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBNFELAT, + /** + * Identifies the total number of submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included. + */ + SBNFELCT, + /** + * Identifies the total net amount billed for all submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included. + */ + SBPDELAT, + /** + * Identifies the total number of submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included. + */ + SBPDELCT, + /** + * Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results. + */ + _ACTINVOICEOVERRIDECODE, + /** + * Insurance coverage problems have been encountered. Additional explanation information to be supplied. + */ + COVGE, + /** + * Electronic form with supporting or additional information to follow. + */ + EFORM, + /** + * Fax with supporting or additional information to follow. + */ + FAX, + /** + * The medical service was provided to a patient in good faith that they had medical coverage, although no evidence of coverage was available before service was rendered. + */ + GFTH, + /** + * Knowingly over the payor's published time limit for this invoice possibly due to a previous payor's delays in processing. Additional reason information will be supplied. + */ + LATE, + /** + * Manual review of the invoice is requested. Additional information to be supplied. This may be used in the case of an appeal. + */ + MANUAL, + /** + * The medical service and/or product was provided to a patient that has coverage in another jurisdiction. + */ + OOJ, + /** + * The service provided is required for orthodontic purposes. If the covered party has orthodontic coverage, then the service may be paid. + */ + ORTHO, + /** + * Paper documentation (or other physical format) with supporting or additional information to follow. + */ + PAPER, + /** + * Public Insurance has been exhausted. Invoice has not been sent to Public Insuror and therefore no Explanation Of Benefits (EOB) is provided with this Invoice submission. + */ + PIE, + /** + * Allows provider to explain lateness of invoice to a subsequent payor. + */ + PYRDELAY, + /** + * Rules of practice do not require a physician's referral for the provider to perform a billable service. + */ + REFNR, + /** + * The same service was delivered within a time period that would usually indicate a duplicate billing. However, the repeated service is a medical necessity and therefore not a duplicate. + */ + REPSERV, + /** + * The service provided is not related to another billed service. For example, 2 unrelated services provided on the same day to the same patient which may normally result in a refused payment for one of the items. + */ + UNRELAT, + /** + * The provider has received a verbal permission from an authoritative source to perform the service or supply the item being invoiced. + */ + VERBAUTH, + /** + * Provides codes associated with ActClass value of LIST (working list) + */ + _ACTLISTCODE, + /** + * ActObservationList + */ + _ACTOBSERVATIONLIST, + /** + * List of acts representing a care plan. The acts can be in a varierty of moods including event (EVN) to record acts that have been carried out as part of the care plan. + */ + CARELIST, + /** + * List of condition observations. + */ + CONDLIST, + /** + * List of intolerance observations. + */ + INTOLIST, + /** + * List of problem observations. + */ + PROBLIST, + /** + * List of risk factor observations. + */ + RISKLIST, + /** + * List of observations in goal mood. + */ + GOALLIST, + /** + * Codes used to identify different types of 'duration-based' working lists. Examples include "Continuous/Chronic", "Short-Term" and "As-Needed". + */ + _ACTTHERAPYDURATIONWORKINGLISTCODE, + /** + * Definition:A collection of concepts that identifies different types of 'duration-based' mediation working lists. + + + Examples:"Continuous/Chronic" "Short-Term" and "As Needed" + */ + _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE, + /** + * Definition:A list of medications which the patient is only expected to consume for the duration of the current order or limited set of orders and which is not expected to be renewed. + */ + ACU, + /** + * Definition:A list of medications which are expected to be continued beyond the present order and which the patient should be assumed to be taking unless explicitly stopped. + */ + CHRON, + /** + * Definition:A list of medications which the patient is intended to be administered only once. + */ + ONET, + /** + * Definition:A list of medications which the patient will consume intermittently based on the behavior of the condition for which the medication is indicated. + */ + PRN, + /** + * List of medications. + */ + MEDLIST, + /** + * List of current medications. + */ + CURMEDLIST, + /** + * List of discharge medications. + */ + DISCMEDLIST, + /** + * Historical list of medications. + */ + HISTMEDLIST, + /** + * Identifies types of monitoring programs + */ + _ACTMONITORINGPROTOCOLCODE, + /** + * A monitoring program that focuses on narcotics and/or commonly abused substances that are subject to legal restriction. + */ + CTLSUB, + /** + * Definition:A monitoring program that focuses on a drug which is under investigation and has not received regulatory approval for the condition being investigated + */ + INV, + /** + * Description:A drug that can be prescribed (and reimbursed) only if it meets certain criteria. + */ + LU, + /** + * Medicines designated in this way may be supplied for patient use without a prescription. The exact form of categorisation will vary in different realms. + */ + OTC, + /** + * Some form of prescription is required before the related medicine can be supplied for a patient. The exact form of regulation will vary in different realms. + */ + RX, + /** + * Definition:A drug that requires prior approval (to be reimbursed) before being dispensed + */ + SA, + /** + * Description:A drug that requires special access permission to be prescribed and dispensed. + */ + SAC, + /** + * Description:Concepts representing indications (reasons for clinical action) other than diagnosis and symptoms. + */ + _ACTNONOBSERVATIONINDICATIONCODE, + /** + * Description:Contrast agent required for imaging study. + */ + IND01, + /** + * Description:Provision of prescription or direction to consume a product for purposes of bowel clearance in preparation for a colonoscopy. + */ + IND02, + /** + * Description:Provision of medication as a preventative measure during a treatment or other period of increased risk. + */ + IND03, + /** + * Description:Provision of medication during pre-operative phase; e.g., antibiotics before dental surgery or bowel prep before colon surgery. + */ + IND04, + /** + * Description:Provision of medication for pregnancy --e.g., vitamins, antibiotic treatments for vaginal tract colonization, etc. + */ + IND05, + /** + * Identifies the type of verification investigation being undertaken with respect to the subject of the verification activity. + + + Examples: + + + + + Verification of eligibility for coverage under a policy or program - aka enrolled/covered by a policy or program + + + + Verification of record - e.g., person has record in an immunization registry + + + + Verification of enumeration - e.g. NPI + + + + Verification of Board Certification - provider specific + + + + Verification of Certification - e.g. JAHCO, NCQA, URAC + + + + Verification of Conformance - e.g. entity use with HIPAA, conformant to the CCHIT EHR system criteria + + + + Verification of Provider Credentials + + + + Verification of no adverse findings - e.g. on National Provider Data Bank, Health Integrity Protection Data Base (HIPDB) + */ + _ACTOBSERVATIONVERIFICATIONTYPE, + /** + * Definition:Indicates that the paper version of the record has, should be or is being verified against the electronic version. + */ + VFPAPER, + /** + * Code identifying the method or the movement of payment instructions. + + Codes are drawn from X12 data element 591 (PaymentMethodCode) + */ + _ACTPAYMENTCODE, + /** + * Automated Clearing House (ACH). + */ + ACH, + /** + * A written order to a bank to pay the amount specified from funds on deposit. + */ + CHK, + /** + * Electronic Funds Transfer (EFT) deposit into the payee's bank account + */ + DDP, + /** + * Non-Payment Data. + */ + NON, + /** + * Identifies types of dispensing events + */ + _ACTPHARMACYSUPPLYTYPE, + /** + * A fill providing sufficient supply for one day + */ + DF, + /** + * A supply action where there is no 'valid' order for the supplied medication. E.g. Emergency vacation supply, weekend supply (when prescriber is unavailable to provide a renewal prescription) + */ + EM, + /** + * An emergency supply where the expectation is that a formal order authorizing the supply will be provided at a later date. + */ + SO, + /** + * The initial fill against an order. (This includes initial fills against refill orders.) + */ + FF, + /** + * A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets). + */ + FFC, + /** + * A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) + */ + FFP, + /** + * A first fill where the strength supplied is less than the ordered strength. (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + FFSS, + /** + * A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance. + */ + TF, + /** + * A supply action to restock a smaller more local dispensary. + */ + FS, + /** + * A supply of a manufacturer sample + */ + MS, + /** + * A fill against an order that has already been filled (or partially filled) at least once. + */ + RF, + /** + * A supply action that provides sufficient material for a single dose. + */ + UD, + /** + * A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.) + */ + RFC, + /** + * A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFCS, + /** + * The first fill against an order that has already been filled at least once at another facility. + */ + RFF, + /** + * The first fill against an order that has already been filled at least once at another facility and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFFS, + /** + * A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) + */ + RFP, + /** + * A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFPS, + /** + * A fill against an order that has already been filled (or partially filled) at least once and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + RFS, + /** + * A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided. + */ + TB, + /** + * A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets). + */ + TBS, + /** + * A supply action that provides sufficient material for a single dose via multiple products. E.g. 2 50mg tablets for a 100mg unit dose. + */ + UDE, + /** + * Description:Types of policies that further specify the ActClassPolicy value set. + */ + _ACTPOLICYTYPE, + /** + * A policy deeming certain information to be private to an individual or organization. + + + Definition: A mandate, obligation, requirement, rule, or expectation relating to privacy. + + + Discussion: ActPrivacyPolicyType codes support the designation of the 1..* policies that are applicable to an Act such as a Consent Directive, a Role such as a VIP Patient, or an Entity such as a patient who is a minor. 1..* ActPrivacyPolicyType values may be associated with an Act or Role to indicate the policies that govern the assignment of an Act or Role confidentialityCode. Use of multiple ActPrivacyPolicyType values enables fine grain specification of applicable policies, but must be carefully assigned to ensure cogency and avoid creation of conflicting policy mandates. + + + Usage Note: Statutory title may be named in the ActClassPolicy Act Act.title to specify which privacy policy is being referenced. + */ + _ACTPRIVACYPOLICY, + /** + * Specifies the type of agreement between one or more grantor and grantee in which rights and obligations related to one or more shared items of interest are allocated. + + + Usage Note: Such agreements may be considered "consent directives" or "contracts" depending on the context, and are considered closely related or synonymous from a legal perspective. + + + Examples: + + + + Healthcare Privacy Consent Directive permitting or restricting in whole or part the collection, access, use, and disclosure of health information, and any associated handling caveats. + Healthcare Medical Consent Directive to receive medical procedures after being informed of risks and benefits, thereby reducing the grantee's liability. + Research Informed Consent for participation in clinical trials and disclosure of health information after being informed of risks and benefits, thereby reducing the grantee's liability. + Substitute decision maker delegation in which the grantee assumes responsibility to act on behalf of the grantor. + Contracts in which the agreement requires assent/dissent by the grantor of terms offered by a grantee, a consumer opts out of an "award" system for use of a retailer's marketing or credit card vendor's point collection cards in exchange for allowing purchase tracking and profiling. + A mobile device or App privacy policy and terms of service to which a user must agree in whole or in part in order to utilize the service. + Agreements between a client and an authorization server or between an authorization server and a resource operator and/or resource owner permitting or restricting e.g., collection, access, use, and disclosure of information, and any associated handling caveats. + */ + _ACTCONSENTDIRECTIVE, + /** + * This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations. + + + Definition: Opt-in to disclosure of health information for emergency only consent directive. + */ + EMRGONLY, + /** + * A grantor's terms of agreement to which a grantee may assent or dissent, and which may include an opportunity for a grantee to request restrictions or extensions. + + + Comment: A grantor typically is able to stipulate preferred terms of agreement when the grantor has control over the topic of the agreement, which a grantee must accept in full or may be offered an opportunity to extend or restrict certain terms. + + + Usage Note: If the grantor's term of agreement must be accepted in full, then this is considered "basic consent". If a grantee is offered an opportunity to extend or restrict certain terms, then the agreement is considered "granular consent". + + + Examples: + + + + Healthcare: A PHR account holder [grantor] may require any PHR user [grantee] to accept the terms of agreement in full, or may permit a PHR user to extend or restrict terms selected by the account holder or requested by the PHR user. + Non-healthcare: The owner of a resource server [grantor] may require any authorization server [grantee] to meet authorization requirements stipulated in the grantor's terms of agreement. + */ + GRANTORCHOICE, + /** + * A grantor's presumed assent to the grantee's terms of agreement is based on the grantor's behavior, which may result from not expressly assenting to the consent directive offered, or from having no right to assent or dissent offered by the grantee. + + + Comment: Implied or "implicit" consent occurs when the behavior of the grantor is understood by a reasonable person to signal agreement to the grantee's terms. + + + Usage Note: Implied consent with no opportunity to assent or dissent to certain terms is considered "basic consent". + + + Examples: + + + + Healthcare: A patient schedules an appointment with a provider, and either does not take the opportunity to expressly assent or dissent to the provider's consent directive, does not have an opportunity to do so, as in the case where emergency care is required, or simply behaves as though the patient [grantor] agrees to the rights granted to the provider [grantee] in an implicit consent directive. + An injured and unconscious patient is deemed to have assented to emergency treatment by those permitted to do so under jurisdictional laws, e.g., Good Samaritan laws. + Non-healthcare: Upon receiving a driver's license, the driver is deemed to have assented without explicitly consenting to undergoing field sobriety tests. + A corporation that does business in a foreign nation is deemed to have deemed to have assented without explicitly consenting to abide by that nation's laws. + */ + IMPLIED, + /** + * A grantor's presumed assent to the grantee's terms of agreement, which is based on the grantor's behavior, and includes a right to dissent to certain terms. + + + Comment: A grantor assenting to the grantee's terms of agreement may or may not exercise a right to dissent to grantor selected terms or to grantee's selected terms to which a grantor may dissent. + + + Usage Note: Implied or "implicit" consent with an "opportunity to dissent" occurs when the grantor's behavior is understood by a reasonable person to signal assent to the grantee's terms of agreement whether the grantor requests or the grantee approves further restrictions, is considered "granular consent". + + + Examples: + + + + Healthcare Examples: A healthcare provider deems a patient's assent to disclosure of health information to family members and friends, but offers an opportunity or permits the patient to dissent to such disclosures. + A health information exchanges deems a patient to have assented to disclosure of health information for treatment purposes, but offers the patient an opportunity to dissents to disclosure to particular provider organizations. + Non-healthcare Examples: A bank deems a banking customer's assent to specified collection, access, use, or disclosure of financial information as a requirement of holding a bank account, but provides the user an opportunity to limit third-party collection, access, use or disclosure of that information for marketing purposes. + */ + IMPLIEDD, + /** + * No notification or opportunity is provided for a grantor to assent or dissent to a grantee's terms of agreement. + + + Comment: A "No Consent" policy scheme provides no opportunity for accommodation of an individual's preferences, and may not comply with Fair Information Practice Principles [FIPP] by enabling the data subject to object, access collected information, correct errors, or have accounting of disclosures. + + + Usage Note: The grantee's terms of agreement, may be available to the grantor by reviewing the grantee's privacy policies, but there is no notice by which a grantor is apprised of the policy directly or able to acknowledge. + + + Examples: + + + + Healthcare: Without notification or an opportunity to assent or dissent, a patient's health information is automatically included in and available (often according to certain rules) through a health information exchange. Note that this differs from implied consent, where the patient is assumed to have consented. + Without notification or an opportunity to assent or dissent, a patient's health information is collected, accessed, used, or disclosed for research, public health, security, fraud prevention, court order, or law enforcement. + Non-healthcare: Without notification or an opportunity to assent or dissent, a consumer's healthcare or non-healthcare internet searches are aggregated for secondary uses such as behavioral tracking and profiling. + Without notification or an opportunity to assent or dissent, a consumer's location and activities in a shopping mall are tracked by RFID tags on purchased items. + */ + NOCONSENT, + /** + * Acknowledgement of custodian notice of privacy practices. + + + Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified. + */ + NOPP, + /** + * A grantor's assent to the terms of an agreement offered by a grantee without an opportunity for to dissent to any terms. + + + Comment: Acceptance of a grantee's terms pertaining, for example, to permissible activities, purposes of use, handling caveats, expiry date, and revocation policies. + + + Usage Note: Opt-in with no opportunity for a grantor to restrict certain permissions sought by the grantee is considered "basic consent". + + + Examples: + + + + Healthcare: A patient [grantor] signs a provider's [grantee's] consent directive form, which lists permissible collection, access, use, or disclosure activities, purposes of use, handling caveats, and revocation policies. + Non-healthcare: An employee [grantor] signs an employer's [grantee's] non-disclosure and non-compete agreement. + */ + OPTIN, + /** + * A grantor's assent to the grantee's terms of an agreement with an opportunity for to dissent to certain grantor or grantee selected terms. + + + Comment: A grantor dissenting to the grantee's terms of agreement may or may not exercise a right to assent to grantor's pre-approved restrictions or to grantee's selected terms to which a grantor may dissent. + + + Usage Note: Opt-in with restrictions is considered "granular consent" because the grantor has an opportunity to narrow the permissions sought by the grantee. + + + Examples: + + + + Healthcare: A patient assent to grantee's consent directive terms for collection, access, use, or disclosure of health information, and dissents to disclosure to certain recipients as allowed by the provider's pre-approved restriction list. + Non-Healthcare: A cell phone user assents to the cell phone's privacy practices and terms of use, but dissents from location tracking by turning off the cell phone's tracking capability. + */ + OPTINR, + /** + * A grantor's dissent to the terms of agreement offered by a grantee without an opportunity for to assent to any terms. + + + Comment: Rejection of a grantee's terms of agreement pertaining, for example, to permissible activities, purposes of use, handling caveats, expiry date, and revocation policies. + + + Usage Note: Opt-out with no opportunity for a grantor to permit certain permissions sought by the grantee is considered "basic consent". + + + Examples: + + + + Healthcare: A patient [grantor] declines to sign a provider's [grantee's] consent directive form, which lists permissible collection, access, use, or disclosure activities, purposes of use, handling caveats, revocation policies, and consequences of not assenting. + Non-healthcare: An employee [grantor] refuses to sign an employer's [grantee's] agreement not to join unions or participate in a strike where state law protects employee's collective bargaining rights. + A citizen [grantor] refuses to enroll in mandatory government [grantee] health insurance based on religious beliefs, which is an exemption. + */ + OPTOUT, + /** + * A grantor's dissent to the grantee's terms of agreement except for certain grantor or grantee selected terms. + + + Comment: A rejection of a grantee's terms of agreement while assenting to certain permissions sought by the grantee or requesting approval of additional grantor terms. + + + Usage Note: Opt-out with exceptions is considered a "granular consent" because the grantor has an opportunity to accept certain permissions sought by the grantee or request additional grantor terms, while rejecting other grantee terms. + + + Examples: + + + + Healthcare: A patient [grantor] dissents to a health information exchange consent directive with the exception of disclosure based on a limited "time to live" shared secret [e.g., a token or password], which the patient can give to a provider when seeking care. + Non-healthcare: A social media user [grantor] dissents from public access to their account, but assents to access to a circle of friends. + */ + OPTOUTE, + /** + * A jurisdictional mandate, regulation, obligation, requirement, rule, or expectation deeming certain information to be private to an individual or organization, which is imposed on: + + + The activity of a governed party + The behavior of a governed party + The manner in which an act is executed by a governed party + */ + _ACTPRIVACYLAW, + /** + * Definition: A jurisdictional mandate in the U.S. relating to privacy. + + + Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1. + */ + _ACTUSPRIVACYLAW, + /** + * 42 CFR Part 2 stipulates the right of an individual who has applied for or been given diagnosis or treatment for alcohol or drug abuse at a federally assisted program. + + + Definition: Non-disclosure of health information relating to health care paid for by a federally assisted substance abuse program without patient consent. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + _42CFRPART2, + /** + * U.S. Federal regulations governing the protection of human subjects in research (codified at Subpart A of 45 CFR part 46) that has been adopted by 15 U.S. Federal departments and agencies in an effort to promote uniformity, understanding, and compliance with human subject protections. Existing regulations governing the protection of human subjects in Food and Drug Administration (FDA)-regulated research (21 CFR parts 50, 56, 312, and 812) are separate from the Common Rule but include similar requirements. + + + Definition: U.S. federal laws governing research-related privacy policies. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. + */ + COMMONRULE, + /** + * The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Subpart E) permits access, use and disclosure of certain personal health information (PHI as defined under the law) for purposes of Treatment, Payment, and Operations, and requires that the provider ask that patients acknowledge the Provider's Notice of Privacy Practices as permitted conduct under the law. + + + Definition: Notification of HIPAA Privacy Practices. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. + */ + HIPAANOPP, + /** + * The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Section 164.508) requires authorization for certain uses and disclosure of psychotherapy notes. + + + Definition: Authorization that must be obtained for disclosure of psychotherapy notes. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + HIPAAPSYNOTES, + /** + * Section 13405(a) of the Health Information Technology for Economic and Clinical Health Act (HITECH) stipulates the right of an individual to have disclosures regarding certain health care items or services for which the individual pays out of pocket in full restricted from a health plan. + + + Definition: Non-disclosure of health information to a health plan relating to health care items or services for which an individual pays out of pocket in full. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + HIPAASELFPAY, + /** + * Title 38 Part 1-protected information may only be disclosed to a third party with the special written consent of the patient except where expressly authorized by 38 USC 7332. VA may disclose this information for specific purposes to: VA employees on a need to know basis - more restrictive than Privacy Act need to know; contractors who need the information in order to perform or fulfil the duties of the contract; and researchers who provide assurances that the information will not be identified in any report. This information may also be disclosed without consent where patient lacks decision-making capacity; in a medical emergency for the purpose of treating a condition which poses an immediate threat to the health of any individual and which requires immediate medical intervention; for eye, tissue, or organ donation purposes; and disclosure of HIV information for public health purposes. + + + Definition: Title 38 Part 1 - Section 1.462 Confidentiality restrictions. + + (a) General. The patient records to which Sections 1.460 through 1.499 of this part apply may be disclosed or used only as permitted by these regulations and may not otherwise be disclosed or used in any civil, criminal, administrative, or legislative proceedings conducted by any Federal, State, or local authority. Any disclosure made under these regulations must be limited to that information which is necessary to carry out the purpose of the disclosure. SUBCHAPTER III--PROTECTION OF PATIENT RIGHTS Sec. 7332. Confidentiality of certain medical records (a)(1) Records of the identity, diagnosis, prognosis, or treatment of any patient or subject which are maintained in connection with the performance of any program or activity (including education, training, treatment, rehabilitation, or research) relating to drug abuse, alcoholism or alcohol abuse, infection with the human immunodeficiency virus, or sickle cell anemia which is carried out by or for the Department under this title shall, except as provided in subsections (e) and (f), be confidential, and (section 5701 of this title to the contrary notwithstanding) such records may be disclosed only for the purposes and under the circumstances expressly authorized under subsection (b). + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + TITLE38SECTION7332, + /** + * A mandate, obligation, requirement, rule, or expectation characterizing the value or importance of a resource and may include its vulnerability. (Based on ISO7498-2:1989. Note: The vulnerability of personally identifiable sensitive information may be based on concerns that the unauthorized disclosure may result in social stigmatization or discrimination.) Description: Types of Sensitivity policy that apply to Acts or Roles. A sensitivity policy is adopted by an enterprise or group of enterprises (a 'policy domain') through a formal data use agreement that stipulates the value, importance, and vulnerability of information. A sensitivity code representing a sensitivity policy may be associated with criteria such as categories of information or sets of information identifiers (e.g., a value set of clinical codes or branch in a code system hierarchy). These criteria may in turn be used for the Policy Decision Point in a Security Engine. A sensitivity code may be used to set the confidentiality code used on information about Acts and Roles to trigger the security mechanisms required to control how security principals (i.e., a person, a machine, a software application) may act on the information (e.g., collection, access, use, or disclosure). Sensitivity codes are never assigned to the transport or business envelope containing patient specific information being exchanged outside of a policy domain as this would disclose the information intended to be protected by the policy. When sensitive information is exchanged with others outside of a policy domain, the confidentiality code on the transport or business envelope conveys the receiver's responsibilities and indicates the how the information is to be safeguarded without unauthorized disclosure of the sensitive information. This ensures that sensitive information is treated by receivers as the sender intends, accomplishing interoperability without point to point negotiations. + + + Usage Note: Sensitivity codes are not useful for interoperability outside of a policy domain because sensitivity policies are typically localized and vary drastically across policy domains even for the same information category because of differing organizational business rules, security policies, and jurisdictional requirements. For example, an employee's sensitivity code would make little sense for use outside of a policy domain. 'Taboo' would rarely be useful outside of a policy domain unless there are jurisdictional requirements requiring that a provider disclose sensitive information to a patient directly. Sensitivity codes may be more appropriate in a legacy system's Master Files in order to notify those who access a patient's orders and observations about the sensitivity policies that apply. Newer systems may have a security engine that uses a sensitivity policy's criteria directly. The specializable InformationSensitivityPolicy Act.code may be useful in some scenarios if used in combination with a sensitivity identifier and/or Act.title. + */ + _INFORMATIONSENSITIVITYPOLICY, + /** + * Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as "constraints around appropriate disclosure of information about this Act, regardless of mood." + + + Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values. + */ + _ACTINFORMATIONSENSITIVITYPOLICY, + /** + * Policy for handling alcohol or drug-abuse information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to alcohol or drug-abuse information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + ETH, + /** + * Policy for handling genetic disease information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to genetic disease information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + GDIS, + /** + * Policy for handling HIV or AIDS information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to HIV or AIDS information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + HIV, + /** + * Policy for handling psychiatry information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to psychiatry information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + PSY, + /** + * Policy for handling sickle cell disease information, which is afforded heightened confidentiality. Information handling protocols are based on organizational policies related to sickle cell disease information, which is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then the Act valued with this ActCode should be associated with an Act valued with any applicable laws from the ActPrivacyLaw code system. + */ + SCA, + /** + * Information about provision of social services. + + + Usage Note: This is a temporary addition to FHIR to be proposed in harmonization. + */ + SOC, + /** + * Policy for handling sexual assault, abuse, or domestic violence information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexual assault, abuse, or domestic violence information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + SDV, + /** + * Policy for handling sexuality and reproductive health information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexuality and reproductive health information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + SEX, + /** + * Policy for handling sexually transmitted disease information, which will be afforded heightened confidentiality. + Information handling protocols based on organizational policies related to sexually transmitted disease information that is deemed sensitive. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + STD, + /** + * Policy for handling information not to be initially disclosed or discussed with patient except by a physician assigned to patient in this case. Information handling protocols based on organizational policies related to sensitive patient information that must be initially discussed with the patient by an attending physician before being disclosed to the patient. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + + + Open Issue: This definition conflates a rule and a characteristic, and there may be a similar issue with ts sibling codes. + */ + TBOO, + /** + * Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as "constraints around appropriate disclosure of information about this Act, regardless of mood." + + + Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values. + */ + SICKLE, + /** + * Types of sensitivity policies that may apply to a sensitive attribute on an Entity. + + + Usage Note: EntitySensitivity codes are used to convey a policy that is applicable to sensitive information conveyed by an entity attribute. May be used to bind a Role.confidentialityCode associated with an Entity per organizational policy. Role.confidentialityCode is defined in the RIM as "an indication of the appropriate disclosure of information about this Role with respect to the playing Entity." + */ + _ENTITYSENSITIVITYPOLICYTYPE, + /** + * Policy for handling all demographic information about an information subject, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to all demographic about an information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DEMO, + /** + * Policy for handling information related to an information subject's date of birth, which will be afforded heightened confidentiality.Policies may govern sensitivity of information related to an information subject's date of birth, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DOB, + /** + * Policy for handling information related to an information subject's gender and sexual orientation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's gender and sexual orientation, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + GENDER, + /** + * Policy for handling information related to an information subject's living arrangement, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's living arrangement, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + LIVARG, + /** + * Policy for handling information related to an information subject's marital status, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's marital status, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + MARST, + /** + * Policy for handling information related to an information subject's race, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's race, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + RACE, + /** + * Policy for handling information related to an information subject's religious affiliation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's religion, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + REL, + /** + * Types of sensitivity policies that apply to Roles. + + + Usage Notes: RoleSensitivity codes are used to bind information to a Role.confidentialityCode per organizational policy. Role.confidentialityCode is defined in the RIM as "an indication of the appropriate disclosure of information about this Role with respect to the playing Entity." + */ + _ROLEINFORMATIONSENSITIVITYPOLICY, + /** + * Policy for handling trade secrets such as financial information or intellectual property, which will be afforded heightened confidentiality. Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. + + + Usage Notes: No patient related information may ever be of this confidentiality level. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + B, + /** + * Policy for handling information related to an employer which is deemed classified to protect an employee who is the information subject, and which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to an employer, such as law enforcement or national security, the identity of which could impact the privacy, well-being, or safety of an information subject who is an employee. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + EMPL, + /** + * Policy for handling information related to the location of the information subject, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to the location of the information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + LOCIS, + /** + * Policy for handling information related to a provider of sensitive services, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to providers who deliver sensitive healthcare services in order to protect the privacy, well-being, and safety of the provider and of patients receiving sensitive services. + + + Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + SSP, + /** + * Policy for handling information related to an adolescent, which will be afforded heightened confidentiality per applicable organizational or jurisdictional policy. An enterprise may have a policy that requires that adolescent patient information be provided heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location. + + + Usage Note: For use within an enterprise in which an adolescent is the information subject. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + ADOL, + /** + * Policy for handling information related to a celebrity (people of public interest (VIP), which will be afforded heightened confidentiality. Celebrities are people of public interest (VIP) about whose information an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive may include health information and patient role information including patient status, demographics, next of kin, and location. + + + Usage Note: For use within an enterprise in which the information subject is deemed a celebrity or very important person. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + CEL, + /** + * Policy for handling information related to a diagnosis, health condition or health problem, which will be afforded heightened confidentiality. Diagnostic, health condition or health problem related information may be deemed sensitive by organizational policy, and require heightened confidentiality. + + + Usage Note: For use within an enterprise that provides heightened confidentiality to diagnostic, health condition or health problem related information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DIA, + /** + * Policy for handling information related to a drug, which will be afforded heightened confidentiality. Drug information may be deemed sensitive by organizational policy, and require heightened confidentiality. + + + Usage Note: For use within an enterprise that provides heightened confidentiality to drug information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + DRGIS, + /** + * Policy for handling information related to an employee, which will be afforded heightened confidentiality. When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location. + + + Usage Note: Policy for handling information related to an employee, which will be afforded heightened confidentiality. Description: When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location. + */ + EMP, + /** + * Policy for handling information reported by the patient about another person, e.g., a family member, which will be afforded heightened confidentiality. Sensitive information reported by the patient about another person, e.g., family members may be deemed sensitive by default. The flag may be set or cleared on patient's request. + + + Usage Note: For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + PDS, + /** + * For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + + + Usage Note: For use within an enterprise that provides heightened confidentiality to certain types of information designated by a patient as sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code. + */ + PRS, + /** + * This is the healthcare analog to the US Intelligence Community's concept of a Special Access Program. Compartment codes may be used in as a field value in an initiator's clearance to indicate permission to access and use an IT Resource with a security label having the same compartment value in security category label field. + + Map: Aligns with ISO 2382-8 definition of Compartment - "A division of data into isolated blocks with separate security controls for the purpose of reducing risk." + */ + COMPT, + /** + * A group of health care entities, which may include health care providers, care givers, hospitals, facilities, health plans, and other health care constituents who coordinate care for reimbursement based on quality metrics for improving outcomes and lowering costs, and may be authorized to access the consumer's health information because of membership in that group. + + Security Compartment Labels assigned to a consumer's information use in accountable care workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a an accountable care workflow who is requesting access to that information + */ + ACOCOMPT, + /** + * Care coordination across participants in a care plan requires sharing of a healthcare consumer's information specific to that workflow. A care team member should only have access to that information while participating in that workflow or for other authorized uses. + + Security Compartment Labels assigned to a consumer's information use in care coordination workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a care team member workflow who is requesting access to that information + */ + CTCOMPT, + /** + * Financial management department members who have access to healthcare consumer information as part of a patient account, billing and claims workflows. + + Security Compartment Labels assigned to consumer information used in these workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a financial management workflow who is requesting access to that information. + */ + FMCOMPT, + /** + * A security category label field value, which indicates that access and use of an IT resource is restricted to members of human resources department or workflow. + */ + HRCOMPT, + /** + * Providers and care givers who have an established relationship per criteria determined by policy are considered to have an established care provision relations with a healthcare consumer, and may be authorized to access the consumer's health information because of that relationship. Providers and care givers should only have access to that information while participating in legitimate relationship workflows or for other authorized uses. + + Security Compartment Labels assigned to a consumer's information use in legitimate relationship workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a legitimate relationship workflow who is requesting access to that information. + */ + LRCOMPT, + /** + * Patient administration members who have access to healthcare consumer information as part of a patient administration workflows. + + Security Compartment Labels assigned to consumer information used in these workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a patient administration workflow who is requesting access to that information. + */ + PACOMPT, + /** + * A security category label field value, which indicates that access and use of an IT resource is restricted to members of a research project. + */ + RESCOMPT, + /** + * A security category label field value, which indicates that access and use of an IT resource is restricted to members of records management department or workflow. + */ + RMGTCOMPT, + /** + * A mandate, obligation, requirement, rule, or expectation conveyed as security metadata between senders and receivers required to establish the reliability, authenticity, and trustworthiness of their transactions. + + Trust security metadata are observation made about aspects of trust applicable to an IT resource (data, information object, service, or system capability). + + Trust applicable to IT resources is established and maintained in and among security domains, and may be comprised of observations about the domain's trust authority, trust framework, trust policy, trust interaction rules, means for assessing and monitoring adherence to trust policies, mechanisms that enforce trust, and quality and reliability measures of assurance in those mechanisms. [Based on ISO IEC 10181-1 and NIST SP 800-63-2] + + For example, identity proofing , level of assurance, and Trust Framework. + */ + ACTTRUSTPOLICYTYPE, + /** + * Type of security metadata about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework. + */ + TRSTACCRD, + /** + * Type of security metadata about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1] + */ + TRSTAGRE, + /** + * Type of security metadata about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol. + */ + TRSTASSUR, + /** + * Type of security metadata about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1] + */ + TRSTCERT, + /** + * Type of security metadata about a complete set of contracts, regulations, or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative] + */ + TRSTFWK, + /** + * Type of security metadata about a security architecture system component that supports enforcement of security policies. + */ + TRSTMEC, + /** + * Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed on benefit coverage under a policy or program by a sponsor, underwriter or payor on: + + + + The activity of another party + + + + The behavior of another party + + + + The manner in which an act is executed + + + + + Examples:A clinical protocol imposed by a payer to which a provider must adhere in order to be paid for providing the service. A formulary from which a provider must select prescribed drugs in order for the patient to incur a lower copay. + */ + COVPOL, + /** + * Types of security policies that further specify the ActClassPolicy value set. + + + Examples: + + + + obligation to encrypt + refrain from redisclosure without consent + */ + SECURITYPOLICY, + /** + * Conveys the mandated workflow action that an information custodian, receiver, or user must perform. + + + Usage Notes: Per ISO 22600-2, ObligationPolicy instances 'are event-triggered and define actions to be performed by manager agent'. Per HL7 Composite Security and Privacy Domain Analysis Model: This value set refers to the action required to receive the permission specified in the privacy rule. Per OASIS XACML, an obligation is an operation specified in a policy or policy that is performed in conjunction with the enforcement of an access control decision. + */ + OBLIGATIONPOLICY, + /** + * Custodian system must remove any information that could result in identifying the information subject. + */ + ANONY, + /** + * Custodian system must make available to an information subject upon request an accounting of certain disclosures of the individual’s protected health information over a period of time. Policy may dictate that the accounting include information about the information disclosed, the date of disclosure, the identification of the receiver, the purpose of the disclosure, the time in which the disclosing entity must provide a response and the time period for which accountings of disclosure can be requested. + */ + AOD, + /** + * Custodian system must monitor systems to ensure that all users are authorized to operate on information objects. + */ + AUDIT, + /** + * Custodian system must monitor and maintain retrievable log for each user and operation on information. + */ + AUDTR, + /** + * Custodian security system must retrieve, evaluate, and comply with the information handling directions of the Confidentiality Code associated with an information target. + */ + CPLYCC, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable information subject consent directives. + */ + CPLYCD, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable jurisdictional privacy policies associated with the target information. + */ + CPLYJPP, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable organizational privacy policies associated with the target information. + */ + CPLYOPP, + /** + * Custodian security system must retrieve, evaluate, and comply with the organizational security policies associated with the target information. + */ + CPLYOSP, + /** + * Custodian security system must retrieve, evaluate, and comply with applicable policies associated with the target information. + */ + CPLYPOL, + /** + * Custodian security system must declassify information assigned security labels by instantiating a new version of the classified information so as to break the binding of the classifying security label when assigning a new security label that marks the information as unclassified in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding. + */ + DECLASSIFYLABEL, + /** + * Custodian system must strip information of data that would allow the identification of the source of the information or the information subject. + */ + DEID, + /** + * Custodian system must remove target information from access after use. + */ + DELAU, + /** + * Custodian security system must downgrade information assigned security labels by instantiating a new version of the classified information so as to break the binding of the classifying security label when assigning a new security label that marks the information as classified at a less protected level in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding. + */ + DOWNGRDLABEL, + /** + * Custodian security system must assign and bind security labels derived from compilations of information by aggregation or disaggregation in order to classify information compiled in the information systems under its control for collection, access, use and disclosure in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding. + */ + DRIVLABEL, + /** + * Custodian system must render information unreadable by algorithmically transforming plaintext into ciphertext. + + + + + Usage Notes: A mathematical transposition of a file or data stream so that it cannot be deciphered at the receiving end without the proper key. Encryption is a security feature that assures that only the parties who are supposed to be participating in a videoconference or data transfer are able to do so. It can include a password, public and private keys, or a complex combination of all. (Per Infoway.) + */ + ENCRYPT, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext when "at rest" or in storage. + */ + ENCRYPTR, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while "in transit" or being transported by any means. + */ + ENCRYPTT, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while in use such that operations permitted on the target information are limited by the license granted to the end user. + */ + ENCRYPTU, + /** + * Custodian system must require human review and approval for permission requested. + */ + HUAPRV, + /** + * Custodian security system must assign and bind security labels in order to classify information created in the information systems under its control for collection, access, use and disclosure in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the assignment and binding. + + + Usage Note: In security systems, security policy label assignments do not change, they may supersede prior assignments, and such reassignments are always tracked for auditing and other purposes. + */ + LABEL, + /** + * Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext. User may be provided a key to decrypt per license or "shared secret". + */ + MASK, + /** + * Custodian must limit access and disclosure to the minimum information required to support an authorized user's purpose of use. + + + Usage Note: Limiting the information available for access and disclosure to that an authorized user or receiver "needs to know" in order to perform permitted workflow or purpose of use. + */ + MINEC, + /** + * Custodian security system must persist the binding of security labels to classify information received or imported by information systems under its control for collection, access, use and disclosure in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the assignment and binding. + */ + PERSISTLABEL, + /** + * Custodian must create and/or maintain human readable security label tags as required by policy. + + Map: Aligns with ISO 22600-3 Section A.3.4.3 description of privacy mark: "If present, the privacy-mark is not used for access control. The content of the privacy-mark may be defined by the security policy in force (identified by the security-policy-identifier) which may define a list of values to be used. Alternately, the value may be determined by the originator of the security-label." + */ + PRIVMARK, + /** + * Custodian system must strip information of data that would allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject. + */ + PSEUD, + /** + * Custodian system must remove information, which is not authorized to be access, used, or disclosed from records made available to otherwise authorized users. + */ + REDACT, + /** + * Custodian security system must declassify information assigned security labels by instantiating a new version of the classified information so as to break the binding of the classifying security label when assigning a new security label that marks the information as classified at a more protected level in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding. + */ + UPGRDLABEL, + /** + * Conveys prohibited actions which an information custodian, receiver, or user is not permitted to perform unless otherwise authorized or permitted under specified circumstances. + + + + + Usage Notes: ISO 22600-2 species that a Refrain Policy "defines actions the subjects must refrain from performing". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g., purpose of use, information type, user role, etc. + */ + REFRAINPOLICY, + /** + * Prohibition on disclosure without information subject's authorization. + */ + NOAUTH, + /** + * Prohibition on collection or storage of the information. + */ + NOCOLLECT, + /** + * Prohibition on disclosure without organizational approved patient restriction. + */ + NODSCLCD, + /** + * Prohibition on disclosure without a consent directive from the information subject. + */ + NODSCLCDS, + /** + * Prohibition on Integration into other records. + */ + NOINTEGRATE, + /** + * Prohibition on disclosure except to entities on specific access list. + */ + NOLIST, + /** + * Prohibition on disclosure without an interagency service agreement or memorandum of understanding (MOU). + */ + NOMOU, + /** + * Prohibition on disclosure without organizational authorization. + */ + NOORGPOL, + /** + * Prohibition on disclosing information to patient, family or caregivers without attending provider's authorization. + + + Usage Note: The information may be labeled with the ActInformationSensitivity TBOO code, triggering application of this RefrainPolicy code as a handling caveat controlling access. + + Maps to FHIR NOPAT: Typically, this is used on an Alert resource, when the alert records information on patient abuse or non-compliance. + + FHIR print name is "keep information from patient". Maps to the French realm - code: INVISIBLE_PATIENT. + + + displayName: Document non visible par le patient + codingScheme: 1.2.250.1.213.1.1.4.13 + + French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone). + */ + NOPAT, + /** + * Prohibition on collection of the information beyond time necessary to accomplish authorized purpose of use is prohibited. + */ + NOPERSISTP, + /** + * Prohibition on redisclosure without patient consent directive. + */ + NORDSCLCD, + /** + * Prohibition on redisclosure without a consent directive from the information subject. + */ + NORDSCLCDS, + /** + * Prohibition on disclosure without authorization under jurisdictional law. + */ + NORDSCLW, + /** + * Prohibition on associating de-identified or pseudonymized information with other information in a manner that could or does result in disclosing information intended to be masked. + */ + NORELINK, + /** + * Prohibition on use of the information beyond the purpose of use initially authorized. + */ + NOREUSE, + /** + * Prohibition on disclosure except to principals with access permission to specific VIP information. + */ + NOVIP, + /** + * Prohibition on disclosure except as permitted by the information originator. + */ + ORCON, + /** + * The method that a product is obtained for use by the subject of the supply act (e.g. patient). Product examples are consumable or durable goods. + */ + _ACTPRODUCTACQUISITIONCODE, + /** + * Temporary supply of a product without transfer of ownership for the product. + */ + LOAN, + /** + * Temporary supply of a product with financial compensation, without transfer of ownership for the product. + */ + RENT, + /** + * Transfer of ownership for a product. + */ + TRANSFER, + /** + * Transfer of ownership for a product for financial compensation. + */ + SALE, + /** + * Transportation of a specimen. + */ + _ACTSPECIMENTRANSPORTCODE, + /** + * Description:Specimen has been received by the participating organization/department. + */ + SREC, + /** + * Description:Specimen has been placed into storage at a participating location. + */ + SSTOR, + /** + * Description:Specimen has been put in transit to a participating receiver. + */ + STRAN, + /** + * Set of codes related to specimen treatments + */ + _ACTSPECIMENTREATMENTCODE, + /** + * The lowering of specimen pH through the addition of an acid + */ + ACID, + /** + * The act rendering alkaline by impregnating with an alkali; a conferring of alkaline qualities. + */ + ALK, + /** + * The removal of fibrin from whole blood or plasma through physical or chemical means + */ + DEFB, + /** + * The passage of a liquid through a filter, accomplished by gravity, pressure or vacuum (suction). + */ + FILT, + /** + * LDL Precipitation + */ + LDLP, + /** + * The act or process by which an acid and a base are combined in such proportions that the resulting compound is neutral. + */ + NEUT, + /** + * The addition of calcium back to a specimen after it was removed by chelating agents + */ + RECA, + /** + * The filtration of a colloidal substance through a semipermeable medium that allows only the passage of small molecules. + */ + UFIL, + /** + * Description: Describes the type of substance administration being performed. This should not be used to carry codes for identification of products. Use an associated role or entity to carry such information. + */ + _ACTSUBSTANCEADMINISTRATIONCODE, + /** + * The introduction of a drug into a subject with the intention of altering its biologic state with the intent of improving its health status. + */ + DRUG, + /** + * Description: The introduction of material into a subject with the intent of providing nutrition or other dietary supplements (e.g. minerals or vitamins). + */ + FD, + /** + * The introduction of an immunogen with the intent of stimulating an immune response, aimed at preventing subsequent infections by more viable agents. + */ + IMMUNIZ, + /** + * An additional immunization administration within a series intended to bolster or enhance immunity. + */ + BOOSTER, + /** + * The first immunization administration in a series intended to produce immunity + */ + INITIMMUNIZ, + /** + * Description: A task or action that a user may perform in a clinical information system (e.g., medication order entry, laboratory test results review, problem list entry). + */ + _ACTTASKCODE, + /** + * A clinician creates a request for a service to be performed for a given patient. + */ + OE, + /** + * A clinician creates a request for a laboratory test to be done for a given patient. + */ + LABOE, + /** + * A clinician creates a request for the administration of one or more medications to a given patient. + */ + MEDOE, + /** + * A person enters documentation about a given patient. + */ + PATDOC, + /** + * Description: A person reviews a list of known allergies of a given patient. + */ + ALLERLREV, + /** + * A clinician enters a clinical note about a given patient + */ + CLINNOTEE, + /** + * A clinician enters a diagnosis for a given patient. + */ + DIAGLISTE, + /** + * A person provides a discharge instruction to a patient. + */ + DISCHINSTE, + /** + * A clinician enters a discharge summary for a given patient. + */ + DISCHSUME, + /** + * A person provides a patient-specific education handout to a patient. + */ + PATEDUE, + /** + * A pathologist enters a report for a given patient. + */ + PATREPE, + /** + * A clinician enters a problem for a given patient. + */ + PROBLISTE, + /** + * A radiologist enters a report for a given patient. + */ + RADREPE, + /** + * Description: A person reviews a list of immunizations due or received for a given patient. + */ + IMMLREV, + /** + * Description: A person reviews a list of health care reminders for a given patient. + */ + REMLREV, + /** + * Description: A person reviews a list of wellness or preventive care reminders for a given patient. + */ + WELLREMLREV, + /** + * A person (e.g., clinician, the patient herself) reviews patient information in the electronic medical record. + */ + PATINFO, + /** + * Description: A person enters a known allergy for a given patient. + */ + ALLERLE, + /** + * A person reviews a recommendation/assessment provided automatically by a clinical decision support application for a given patient. + */ + CDSREV, + /** + * A person reviews a clinical note of a given patient. + */ + CLINNOTEREV, + /** + * A person reviews a discharge summary of a given patient. + */ + DISCHSUMREV, + /** + * A person reviews a list of diagnoses of a given patient. + */ + DIAGLISTREV, + /** + * Description: A person enters an immunization due or received for a given patient. + */ + IMMLE, + /** + * A person reviews a list of laboratory results of a given patient. + */ + LABRREV, + /** + * A person reviews a list of microbiology results of a given patient. + */ + MICRORREV, + /** + * A person reviews organisms of microbiology results of a given patient. + */ + MICROORGRREV, + /** + * A person reviews the sensitivity test of microbiology results of a given patient. + */ + MICROSENSRREV, + /** + * A person reviews a list of medication orders submitted to a given patient + */ + MLREV, + /** + * A clinician reviews a work list of medications to be administered to a given patient. + */ + MARWLREV, + /** + * A person reviews a list of orders submitted to a given patient. + */ + OREV, + /** + * A person reviews a pathology report of a given patient. + */ + PATREPREV, + /** + * A person reviews a list of problems of a given patient. + */ + PROBLISTREV, + /** + * A person reviews a radiology report of a given patient. + */ + RADREPREV, + /** + * Description: A person enters a health care reminder for a given patient. + */ + REMLE, + /** + * Description: A person enters a wellness or preventive care reminder for a given patient. + */ + WELLREMLE, + /** + * A person reviews a Risk Assessment Instrument report of a given patient. + */ + RISKASSESS, + /** + * A person reviews a Falls Risk Assessment Instrument report of a given patient. + */ + FALLRISK, + /** + * Characterizes how a transportation act was or will be carried out. + + + Examples: Via private transport, via public transit, via courier. + */ + _ACTTRANSPORTATIONMODECODE, + /** + * Definition: Characterizes how a patient was or will be transported to the site of a patient encounter. + + + Examples: Via ambulance, via public transit, on foot. + */ + _ACTPATIENTTRANSPORTATIONMODECODE, + /** + * pedestrian transport + */ + AFOOT, + /** + * ambulance transport + */ + AMBT, + /** + * fixed-wing ambulance transport + */ + AMBAIR, + /** + * ground ambulance transport + */ + AMBGRND, + /** + * helicopter ambulance transport + */ + AMBHELO, + /** + * law enforcement transport + */ + LAWENF, + /** + * private transport + */ + PRVTRN, + /** + * public transport + */ + PUBTRN, + /** + * Identifies the kinds of observations that can be performed + */ + _OBSERVATIONTYPE, + /** + * Identifies the type of observation that is made about a specimen that may affect its processing, analysis or further result interpretation + */ + _ACTSPECOBSCODE, + /** + * Describes the artificial blood identifier that is associated with the specimen. + */ + ARTBLD, + /** + * An observation that reports the dilution of a sample. + */ + DILUTION, + /** + * The dilution of a sample performed by automated equipment. The value is specified by the equipment + */ + AUTOHIGH, + /** + * The dilution of a sample performed by automated equipment. The value is specified by the equipment + */ + AUTOLOW, + /** + * The dilution of the specimen made prior to being loaded onto analytical equipment + */ + PRE, + /** + * The value of the dilution of a sample after it had been analyzed at a prior dilution value + */ + RERUN, + /** + * Domain provides codes that qualify the ActLabObsEnvfctsCode domain. (Environmental Factors) + */ + EVNFCTS, + /** + * An observation that relates to factors that may potentially cause interference with the observation + */ + INTFR, + /** + * The Fibrin Index of the specimen. In the case of only differentiating between Absent and Present, recommend using 0 and 1 + */ + FIBRIN, + /** + * An observation of the hemolysis index of the specimen in g/L + */ + HEMOLYSIS, + /** + * An observation that describes the icterus index of the specimen. It is recommended to use mMol/L of bilirubin + */ + ICTERUS, + /** + * An observation used to describe the Lipemia Index of the specimen. It is recommended to use the optical turbidity at 600 nm (in absorbance units). + */ + LIPEMIA, + /** + * An observation that reports the volume of a sample. + */ + VOLUME, + /** + * The available quantity of specimen. This is the current quantity minus any planned consumption (e.g., tests that are planned) + */ + AVAILABLE, + /** + * The quantity of specimen that is used each time the equipment uses this substance + */ + CONSUMPTION, + /** + * The current quantity of the specimen, i.e., initial quantity minus what has been actually used. + */ + CURRENT, + /** + * The initial quantity of the specimen in inventory + */ + INITIAL, + /** + * AnnotationType + */ + _ANNOTATIONTYPE, + /** + * Description:Provides a categorization for annotations recorded directly against the patient . + */ + _ACTPATIENTANNOTATIONTYPE, + /** + * Description:A note that is specific to a patient's diagnostic images, either historical, current or planned. + */ + ANNDI, + /** + * Description:A general or uncategorized note. + */ + ANNGEN, + /** + * A note that is specific to a patient's immunizations, either historical, current or planned. + */ + ANNIMM, + /** + * Description:A note that is specific to a patient's laboratory results, either historical, current or planned. + */ + ANNLAB, + /** + * Description:A note that is specific to a patient's medications, either historical, current or planned. + */ + ANNMED, + /** + * Description: None provided + */ + _GENETICOBSERVATIONTYPE, + /** + * Description: A DNA segment that contributes to phenotype/function. In the absence of demonstrated function a gene may be characterized by sequence, transcription or homology + */ + GENE, + /** + * Description: Observation codes which describe characteristics of the immunization material. + */ + _IMMUNIZATIONOBSERVATIONTYPE, + /** + * Description: Indicates the valid antigen count. + */ + OBSANTC, + /** + * Description: Indicates whether an antigen is valid or invalid. + */ + OBSANTV, + /** + * A code that is used to indicate the type of case safety report received from sender. The current code example reference is from the International Conference on Harmonisation (ICH) Expert Workgroup guideline on Clinical Safety Data Management: Data Elements for Transmission of Individual Case Safety Reports. The unknown/unavailable option allows the transmission of information from a secondary sender where the initial sender did not specify the type of report. + + Example concepts include: Spontaneous, Report from study, Other. + */ + _INDIVIDUALCASESAFETYREPORTTYPE, + /** + * Indicates that the ICSR is describing problems that a patient experienced after receiving a vaccine product. + */ + PATADVEVNT, + /** + * Indicates that the ICSR is describing a problem with the actual vaccine product such as physical defects (cloudy, particulate matter) or inability to confer immunity. + */ + VACPROBLEM, + /** + * Definition:The set of LOINC codes for the act of determining the period of time that has elapsed since an entity was born or created. + */ + _LOINCOBSERVATIONACTCONTEXTAGETYPE, + /** + * Definition:Estimated age. + */ + _216119, + /** + * Definition:Reported age. + */ + _216127, + /** + * Definition:Calculated age. + */ + _295535, + /** + * Definition:General specification of age with no implied method of determination. + */ + _305250, + /** + * Definition:Age at onset of associated adverse event; no implied method of determination. + */ + _309724, + /** + * MedicationObservationType + */ + _MEDICATIONOBSERVATIONTYPE, + /** + * Description:This observation represents an 'average' or 'expected' half-life typical of the product. + */ + REPHALFLIFE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, indicating whether it has one or more coatings such as sugar coating, film coating, or enteric coating. Only coatings to the external surface or the dosage form should be considered (for example, coatings to individual pellets or granules inside a capsule or tablet are excluded from consideration). + + + Constraints: The Observation.value must be a Boolean (BL) with true for the presence or false for the absence of one or more coatings on a solid dosage form. + */ + SPLCOATING, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the color or colors that most predominantly define the appearance of the dose form. SPLCOLOR is not an FDA specification for the actual color of solid dosage forms or the names of colors that can appear in labeling. + + + Constraints: The Observation.value must be a single coded value or a list of multiple coded values, specifying one or more distinct colors that approximate of the color(s) of distinct areas of the solid dosage form, such as the different sides of a tablet or one-part capsule, or the different halves of a two-part capsule. Bands on banded capsules, regardless of the color, are not considered when assigning an SPLCOLOR. Imprints on the dosage form, regardless of their color are not considered when assigning an SPLCOLOR. If more than one color exists on a particular side or half, then the most predominant color on that side or half is recorded. If the gelatin capsule shell is colorless and transparent, use the predominant color of the contents that appears through the colorless and transparent capsule shell. Colors can include: Black;Gray;White;Red;Pink;Purple;Green;Yellow;Orange;Brown;Blue;Turquoise. + */ + SPLCOLOR, + /** + * Description: A characteristic representing a single file reference that contains two or more views of the same dosage form of the product; in most cases this should represent front and back views of the dosage form, but occasionally additional views might be needed in order to capture all of the important physical characteristics of the dosage form. Any imprint and/or symbol should be clearly identifiable, and the viewer should not normally need to rotate the image in order to read it. Images that are submitted with SPL should be included in the same directory as the SPL file. + */ + SPLIMAGE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the alphanumeric text that appears on the solid dosage form, including text that is embossed, debossed, engraved or printed with ink. The presence of other non-textual distinguishing marks or symbols is recorded by SPLSYMBOL. + + + Examples: Included in SPLIMPRINT are alphanumeric text that appears on the bands of banded capsules and logos and other symbols that can be interpreted as letters or numbers. + + + Constraints: The Observation.value must be of type Character String (ST). Excluded from SPLIMPRINT are internal and external cut-outs in the form of alphanumeric text and the letter 'R' with a circle around it (when referring to a registered trademark) and the letters 'TM' (when referring to a 'trade mark'). To record text, begin on either side or part of the dosage form. Start at the top left and progress as one would normally read a book. Enter a semicolon to show separation between words or line divisions. + */ + SPLIMPRINT, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the number of equal pieces that the solid dosage form can be divided into using score line(s). + + + Example: One score line creating two equal pieces is given a value of 2, two parallel score lines creating three equal pieces is given a value of 3. + + + Constraints: Whether three parallel score lines create four equal pieces or two intersecting score lines create two equal pieces using one score line and four equal pieces using both score lines, both have the scoring value of 4. Solid dosage forms that are not scored are given a value of 1. Solid dosage forms that can only be divided into unequal pieces are given a null-value with nullFlavor other (OTH). + */ + SPLSCORING, + /** + * Description: A characteristic of an oral solid dosage form of a medicinal product, specifying the two dimensional representation of the solid dose form, in terms of the outside perimeter of a solid dosage form when the dosage form, resting on a flat surface, is viewed from directly above, including slight rounding of corners. SPLSHAPE does not include embossing, scoring, debossing, or internal cut-outs. SPLSHAPE is independent of the orientation of the imprint and logo. Shapes can include: Triangle (3 sided); Square; Round; Semicircle; Pentagon (5 sided); Diamond; Double circle; Bullet; Hexagon (6 sided); Rectangle; Gear; Capsule; Heptagon (7 sided); Trapezoid; Oval; Clover; Octagon (8 sided); Tear; Freeform. + */ + SPLSHAPE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the longest single dimension of the solid dosage form as a physical quantity in the dimension of length (e.g., 3 mm). The length is should be specified in millimeters and should be rounded to the nearest whole millimeter. + + + Example: SPLSIZE for a rectangular shaped tablet is the length and SPLSIZE for a round shaped tablet is the diameter. + */ + SPLSIZE, + /** + * Definition: A characteristic of an oral solid dosage form of a medicinal product, to describe whether or not the medicinal product has a mark or symbol appearing on it for easy and definite recognition. Score lines, letters, numbers, and internal and external cut-outs are not considered marks or symbols. See SPLSCORING and SPLIMPRINT for these characteristics. + + + Constraints: The Observation.value must be a Boolean (BL) with true indicating the presence and false for the absence of marks or symbols. + + + Example: + */ + SPLSYMBOL, + /** + * Distinguishes the kinds of coded observations that could be the trigger for clinical issue detection. These are observations that are not measurable, but instead can be defined with codes. Coded observation types include: Allergy, Intolerance, Medical Condition, Pregnancy status, etc. + */ + _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE, + /** + * Code for the mechanism by which disease was acquired by the living subject involved in the public health case. Includes sexually transmitted, airborne, bloodborne, vectorborne, foodborne, zoonotic, nosocomial, mechanical, dermal, congenital, environmental exposure, indeterminate. + */ + _CASETRANSMISSIONMODE, + /** + * Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation. + */ + AIRTRNS, + /** + * Communication of an agent from one animal to another proximate animal. + */ + ANANTRNS, + /** + * Communication of an agent from an animal to a proximate person. + */ + ANHUMTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with any body fluid. + */ + BDYFLDTRNS, + /** + * Communication of an agent to a living subject through direct contact with blood or blood products whether the contact with blood is part of a therapeutic procedure or not. + */ + BLDTRNS, + /** + * Communication of an agent from a living subject or environmental source to a living subject via agent migration through intact skin. + */ + DERMTRNS, + /** + * Communication of an agent from an environmental surface or source to a living subject by direct contact. + */ + ENVTRNS, + /** + * Communication of an agent from a living subject or environmental source to a living subject through oral contact with material contaminated by person or animal fecal material. + */ + FECTRNS, + /** + * Communication of an agent from an non-living material to a living subject through direct contact. + */ + FOMTRNS, + /** + * Communication of an agent from a food source to a living subject via oral consumption. + */ + FOODTRNS, + /** + * Communication of an agent from a person to a proximate person. + */ + HUMHUMTRNS, + /** + * Communication of an agent to a living subject via an undetermined route. + */ + INDTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with mammalian milk or colostrum. + */ + LACTTRNS, + /** + * Communication of an agent from any entity to a living subject while the living subject is in the patient role in a healthcare facility. + */ + NOSTRNS, + /** + * Communication of an agent from a living subject or environmental source to a living subject where the acquisition of the agent is not via the alimentary canal. + */ + PARTRNS, + /** + * Communication of an agent from a living subject to the progeny of that living subject via agent migration across the maternal-fetal placental membranes while in utero. + */ + PLACTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with genital or oral tissues as part of a sexual act. + */ + SEXTRNS, + /** + * Communication of an agent from one living subject to another living subject through direct contact with blood or blood products where the contact with blood is part of a therapeutic procedure. + */ + TRNSFTRNS, + /** + * Communication of an agent from a living subject acting as a required intermediary in the agent transmission process to a recipient living subject via direct contact. + */ + VECTRNS, + /** + * Communication of an agent from a contaminated water source to a living subject whether the water is ingested as a food or not. The route of entry of the water may be through any bodily orifice. + */ + WATTRNS, + /** + * Codes used to define various metadata aspects of a health quality measure. + */ + _OBSERVATIONQUALITYMEASUREATTRIBUTE, + /** + * Indicates that the observation is carrying out an aggregation calculation, contained in the value element. + */ + AGGREGATE, + /** + * Indicates what method is used in a quality measure to combine the component measure results included in an composite measure. + */ + CMPMSRMTH, + /** + * An attribute of a quality measure describing the weight this component measure score is to carry in determining the overall composite measure final score. The value is real value greater than 0 and less than 1.0. Each component measure score will be multiplied by its CMPMSRSCRWGHT and then summed with the other component measures to determine the final overall composite measure score. The sum across all CMPMSRSCRWGHT values within a single composite measure SHALL be 1.0. The value assigned is scoped to the composite measure referencing this component measure only. + */ + CMPMSRSCRWGHT, + /** + * Identifies the organization(s) who own the intellectual property represented by the eMeasure. + */ + COPY, + /** + * Summary of relevant clinical guidelines or other clinical recommendations supporting this eMeasure. + */ + CRS, + /** + * Description of individual terms, provided as needed. + */ + DEF, + /** + * Disclaimer information for the eMeasure. + */ + DISC, + /** + * The timestamp when the eMeasure was last packaged in the Measure Authoring Tool. + */ + FINALDT, + /** + * Used to allow measure developers to provide additional guidance for implementers to understand greater specificity than could be provided in the logic for data criteria. + */ + GUIDE, + /** + * Information on whether an increase or decrease in score is the preferred result +(e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range). + */ + IDUR, + /** + * Describes the items counted by the measure (e.g., patients, encounters, procedures, etc.) + */ + ITMCNT, + /** + * A significant word that aids in discoverability. + */ + KEY, + /** + * The end date of the measurement period. + */ + MEDT, + /** + * The start date of the measurement period. + */ + MSD, + /** + * The method of adjusting for clinical severity and conditions present at the start of care that can influence patient outcomes for making valid comparisons of outcome measures across providers. Indicates whether an eMeasure is subject to the statistical process for reducing, removing, or clarifying the influences of confounding factors to allow more useful comparisons. + */ + MSRADJ, + /** + * Describes how to combine information calculated based on logic in each of several populations into one summarized result. It can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure. (e.g., pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two). + + + Open Issue: The description does NOT align well with the definition used in the HQMF specfication; correct the MSGAGG definition, and the possible distinction of MSRAGG as a child of AGGREGATE. + */ + MSRAGG, + /** + * Information on whether an increase or decrease in score is the preferred result. This should reflect information on which way is better, an increase or decrease in score. + */ + MSRIMPROV, + /** + * The list of jurisdiction(s) for which the measure applies. + */ + MSRJUR, + /** + * Type of person or organization that is expected to report the issue. + */ + MSRRPTR, + /** + * The maximum time that may elapse following completion of the measure until the measure report must be sent to the receiver. + */ + MSRRPTTIME, + /** + * Indicates how the calculation is performed for the eMeasure +(e.g., proportion, continuous variable, ratio) + */ + MSRSCORE, + /** + * Location(s) in which care being measured is rendered + + Usage Note: MSRSET is used rather than RoleCode because the setting applies to what is being measured, as opposed to participating directly in the health quality measure documantion itself). + */ + MSRSET, + /** + * health quality measure topic type + */ + MSRTOPIC, + /** + * The time period for which the eMeasure applies. + */ + MSRTP, + /** + * Indicates whether the eMeasure is used to examine a process or an outcome over time +(e.g., Structure, Process, Outcome). + */ + MSRTYPE, + /** + * Succinct statement of the need for the measure. Usually includes statements pertaining to Importance criterion: impact, gap in care and evidence. + */ + RAT, + /** + * Identifies bibliographic citations or references to clinical practice guidelines, sources of evidence, or other relevant materials supporting the intent and rationale of the eMeasure. + */ + REF, + /** + * Comparison of results across strata can be used to show where disparities exist or where there is a need to expose differences in results. For example, Centers for Medicare & Medicaid Services (CMS) in the U.S. defines four required Supplemental Data Elements (payer, ethnicity, race, and gender), which are variables used to aggregate data into various subgroups. Additional supplemental data elements required for risk adjustment or other purposes of data aggregation can be included in the Supplemental Data Element section. + */ + SDE, + /** + * Describes the strata for which the measure is to be evaluated. There are three examples of reasons for stratification based on existing work. These include: (1) evaluate the measure based on different age groupings within the population described in the measure (e.g., evaluate the whole [age 14-25] and each sub-stratum [14-19] and [20-25]); (2) evaluate the eMeasure based on either a specific condition, a specific discharge location, or both; (3) evaluate the eMeasure based on different locations within a facility (e.g., evaluate the overall rate for all intensive care units and also some strata include additional findings [specific birth weights for neonatal intensive care units]). + */ + STRAT, + /** + * Can be a URL or hyperlinks that link to the transmission formats that are specified for a particular reporting program. + */ + TRANF, + /** + * Usage notes. + */ + USE, + /** + * ObservationSequenceType + */ + _OBSERVATIONSEQUENCETYPE, + /** + * A sequence of values in the "absolute" time domain. This is the same time domain that all HL7 timestamps use. It is time as measured by the Gregorian calendar + */ + TIMEABSOLUTE, + /** + * A sequence of values in a "relative" time domain. The time is measured relative to the earliest effective time in the Observation Series containing this sequence. + */ + TIMERELATIVE, + /** + * ObservationSeriesType + */ + _OBSERVATIONSERIESTYPE, + /** + * ECGObservationSeriesType + */ + _ECGOBSERVATIONSERIESTYPE, + /** + * This Observation Series type contains waveforms of a "representative beat" (a.k.a. "median beat" or "average beat"). The waveform samples are measured in relative time, relative to the beginning of the beat as defined by the Observation Series effective time. The waveforms are not directly acquired from the subject, but rather algorithmically derived from the "rhythm" waveforms. + */ + REPRESENTATIVEBEAT, + /** + * This Observation type contains ECG "rhythm" waveforms. The waveform samples are measured in absolute time (a.k.a. "subject time" or "effective time"). These waveforms are usually "raw" with some minimal amount of noise reduction and baseline filtering applied. + */ + RHYTHM, + /** + * Description: Reporting codes that are related to an immunization event. + */ + _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE, + /** + * Description: The class room associated with the patient during the immunization event. + */ + CLSSRM, + /** + * Description: The school grade or level the patient was in when immunized. + */ + GRADE, + /** + * Description: The school the patient attended when immunized. + */ + SCHL, + /** + * Description: The school division or district associated with the patient during the immunization event. + */ + SCHLDIV, + /** + * Description: The patient's teacher when immunized. + */ + TEACHER, + /** + * Observation types for specifying criteria used to assert that a subject is included in a particular population. + */ + _POPULATIONINCLUSIONOBSERVATIONTYPE, + /** + * Criteria which specify subjects who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator. + */ + DENEX, + /** + * Criteria which specify the removal of a subject, procedure or unit of measurement from the denominator, only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories: + + + Medical reasons + Patient (or subject) reasons + System reasons + */ + DENEXCEP, + /** + * Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). The denominator can be the same as the initial population, or it may be a subset of the initial population to further constrain it for the purpose of the eMeasure. Different measures within an eMeasure set may have different denominators. Continuous Variable eMeasures do not have a denominator, but instead define a measure population. + */ + DENOM, + /** + * Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). + */ + IPOP, + /** + * Criteria for specifying the patients to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods. + */ + IPPOP, + /** + * Criteria for specifying +the measure population as a narrative description (e.g., all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures. + */ + MSRPOPL, + /** + * Criteria for specifying subjects who should be removed from the eMeasure's Initial Population and Measure Population. Measure Population Exclusions are used in Continuous Variable measures to help narrow the Measure Population before determining the value(s) of the continuous variable(s). + */ + MSRPOPLEX, + /** + * Criteria for specifying the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator for proportion measures, or related to (but not directly derived from) the denominator for ratio measures (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period). + */ + NUMER, + /** + * Criteria for specifying instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion). Numerator Exclusions are used only in ratio eMeasures. + */ + NUMEX, + /** + * Types of observations that can be made about Preferences. + */ + _PREFERENCEOBSERVATIONTYPE, + /** + * An observation about how important a preference is to the target of the preference. + */ + PREFSTRENGTH, + /** + * Indicates that the observation is of an unexpected negative occurrence in the subject suspected to result from the subject's exposure to one or more agents. Observation values would be the symptom resulting from the reaction. + */ + ADVERSEREACTION, + /** + * Description:Refines classCode OBS to indicate an observation in which observation.value contains a finding or other nominalized statement, where the encoded information in Observation.value is not altered by Observation.code. For instance, observation.code="ASSERTION" and observation.value="fracture of femur present" is an assertion of a clinical finding of femur fracture. + */ + ASSERTION, + /** + * Definition:An observation that provides a characterization of the level of harm to an investigation subject as a result of a reaction or event. + */ + CASESER, + /** + * An observation that states whether the disease was likely acquired outside the jurisdiction of observation, and if so, the nature of the inter-jurisdictional relationship. + + + OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it. + */ + CDIO, + /** + * A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality. + */ + CRIT, + /** + * An observation that states the mechanism by which disease was acquired by the living subject involved in the public health case. + + + OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it. + */ + CTMO, + /** + * Includes all codes defining types of indications such as diagnosis, symptom and other indications such as contrast agents for lab tests. + */ + DX, + /** + * Admitting diagnosis are the diagnoses documented for administrative purposes as the basis for a hospital admission. + */ + ADMDX, + /** + * Discharge diagnosis are the diagnoses documented for administrative purposes as the time of hospital discharge. + */ + DISDX, + /** + * Intermediate diagnoses are those diagnoses documented for administrative purposes during the course of a hospital stay. + */ + INTDX, + /** + * The type of injury that the injury coding specifies. + */ + NOI, + /** + * Description: Accuracy determined as per the GIS tier code system. + */ + GISTIER, + /** + * Indicates that the observation is of a person’s living situation in a household including the household composition and circumstances. + */ + HHOBS, + /** + * There is a clinical issue for the therapy that makes continuation of the therapy inappropriate. + + + Open Issue: The definition of this code does not correctly represent the concept space of its specializations (children) + */ + ISSUE, + /** + * Identifies types of detectyed issues for Act class "ALRT" for the administrative and patient administrative acts domains. + */ + _ACTADMINISTRATIVEDETECTEDISSUECODE, + /** + * ActAdministrativeAuthorizationDetectedIssueCode + */ + _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE, + /** + * The requesting party has insufficient authorization to invoke the interaction. + */ + NAT, + /** + * Description: One or more records in the query response have been suppressed due to consent or privacy restrictions. + */ + SUPPRESSED, + /** + * Description:The specified element did not pass business-rule validation. + */ + VALIDAT, + /** + * The ID of the patient, order, etc., was not found. Used for transactions other than additions, e.g. transfer of a non-existent patient. + */ + KEY204, + /** + * The ID of the patient, order, etc., already exists. Used in response to addition transactions (Admit, New Order, etc.). + */ + KEY205, + /** + * There may be an issue with the patient complying with the intentions of the proposed therapy + */ + COMPLY, + /** + * The proposed therapy appears to duplicate an existing therapy + */ + DUPTHPY, + /** + * Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy, though the specific mechanisms of action vary. + */ + DUPTHPCLS, + /** + * Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy and uses the same mechanisms of action as the existing therapy. + */ + DUPTHPGEN, + /** + * Description:The proposed therapy is frequently misused or abused and therefore should be used with caution and/or monitoring. + */ + ABUSE, + /** + * Description:The request is suspected to have a fraudulent basis. + */ + FRAUD, + /** + * A similar or identical therapy was recently ordered by a different practitioner. + */ + PLYDOC, + /** + * This patient was recently supplied a similar or identical therapy from a different pharmacy or supplier. + */ + PLYPHRM, + /** + * Proposed dosage instructions for therapy differ from standard practice. + */ + DOSE, + /** + * Description:Proposed dosage is inappropriate due to patient's medical condition. + */ + DOSECOND, + /** + * Proposed length of therapy differs from standard practice. + */ + DOSEDUR, + /** + * Proposed length of therapy is longer than standard practice + */ + DOSEDURH, + /** + * Proposed length of therapy is longer than standard practice for the identified indication or diagnosis + */ + DOSEDURHIND, + /** + * Proposed length of therapy is shorter than that necessary for therapeutic effect + */ + DOSEDURL, + /** + * Proposed length of therapy is shorter than standard practice for the identified indication or diagnosis + */ + DOSEDURLIND, + /** + * Proposed dosage exceeds standard practice + */ + DOSEH, + /** + * Proposed dosage exceeds standard practice for the patient's age + */ + DOSEHINDA, + /** + * High Dose for Indication Alert + */ + DOSEHIND, + /** + * Proposed dosage exceeds standard practice for the patient's height or body surface area + */ + DOSEHINDSA, + /** + * Proposed dosage exceeds standard practice for the patient's weight + */ + DOSEHINDW, + /** + * Proposed dosage interval/timing differs from standard practice + */ + DOSEIVL, + /** + * Proposed dosage interval/timing differs from standard practice for the identified indication or diagnosis + */ + DOSEIVLIND, + /** + * Proposed dosage is below suggested therapeutic levels + */ + DOSEL, + /** + * Proposed dosage is below suggested therapeutic levels for the patient's age + */ + DOSELINDA, + /** + * Low Dose for Indication Alert + */ + DOSELIND, + /** + * Proposed dosage is below suggested therapeutic levels for the patient's height or body surface area + */ + DOSELINDSA, + /** + * Proposed dosage is below suggested therapeutic levels for the patient's weight + */ + DOSELINDW, + /** + * Description:The maximum quantity of this drug allowed to be administered within a particular time-range (month, year, lifetime) has been reached or exceeded. + */ + MDOSE, + /** + * Proposed therapy may be inappropriate or contraindicated due to conditions or characteristics of the patient + */ + OBSA, + /** + * Proposed therapy may be inappropriate or contraindicated due to patient age + */ + AGE, + /** + * Proposed therapy is outside of the standard practice for an adult patient. + */ + ADALRT, + /** + * Proposed therapy is outside of standard practice for a geriatric patient. + */ + GEALRT, + /** + * Proposed therapy is outside of the standard practice for a pediatric patient. + */ + PEALRT, + /** + * Proposed therapy may be inappropriate or contraindicated due to an existing/recent patient condition or diagnosis + */ + COND, + /** + * null + */ + HGHT, + /** + * Proposed therapy may be inappropriate or contraindicated when breast-feeding + */ + LACT, + /** + * Proposed therapy may be inappropriate or contraindicated during pregnancy + */ + PREG, + /** + * null + */ + WGHT, + /** + * Description:Proposed therapy may be inappropriate or contraindicated because of a common but non-patient specific reaction to the product. + + + Example:There is no record of a specific sensitivity for the patient, but the presence of the sensitivity is common and therefore caution is warranted. + */ + CREACT, + /** + * Proposed therapy may be inappropriate or contraindicated due to patient genetic indicators. + */ + GEN, + /** + * Proposed therapy may be inappropriate or contraindicated due to patient gender. + */ + GEND, + /** + * Proposed therapy may be inappropriate or contraindicated due to recent lab test results + */ + LAB, + /** + * Proposed therapy may be inappropriate or contraindicated based on the potential for a patient reaction to the proposed product + */ + REACT, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to the proposed product. (Allergies are immune based reactions.) + */ + ALGY, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to the proposed product. (Intolerances are non-immune based sensitivities.) + */ + INT, + /** + * Proposed therapy may be inappropriate or contraindicated because of a potential patient reaction to a cross-sensitivity related product. + */ + RREACT, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to a cross-sensitivity related product. (Allergies are immune based reactions.) + */ + RALG, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded prior adverse reaction to a cross-sensitivity related product. + */ + RAR, + /** + * Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to a cross-sensitivity related product. (Intolerances are non-immune based sensitivities.) + */ + RINT, + /** + * Description:A local business rule relating multiple elements has been violated. + */ + BUS, + /** + * Description:The specified code is not valid against the list of codes allowed for the element. + */ + CODEINVAL, + /** + * Description:The specified code has been deprecated and should no longer be used. Select another code from the code system. + */ + CODEDEPREC, + /** + * Description:The element does not follow the formatting or type rules defined for the field. + */ + FORMAT, + /** + * Description:The request is missing elements or contains elements which cause it to not meet the legal standards for actioning. + */ + ILLEGAL, + /** + * Description:The length of the data specified falls out of the range defined for the element. + */ + LENRANGE, + /** + * Description:The length of the data specified is greater than the maximum length defined for the element. + */ + LENLONG, + /** + * Description:The length of the data specified is less than the minimum length defined for the element. + */ + LENSHORT, + /** + * Description:The specified element must be specified with a non-null value under certain conditions. In this case, the conditions are true but the element is still missing or null. + */ + MISSCOND, + /** + * Description:The specified element is mandatory and was not included in the instance. + */ + MISSMAND, + /** + * Description:More than one element with the same value exists in the set. Duplicates not permission in this set in a set. + */ + NODUPS, + /** + * Description: Element in submitted message will not persist in data storage based on detected issue. + */ + NOPERSIST, + /** + * Description:The number of repeating elements falls outside the range of the allowed number of repetitions. + */ + REPRANGE, + /** + * Description:The number of repeating elements is above the maximum number of repetitions allowed. + */ + MAXOCCURS, + /** + * Description:The number of repeating elements is below the minimum number of repetitions allowed. + */ + MINOCCURS, + /** + * ActAdministrativeRuleDetectedIssueCode + */ + _ACTADMINISTRATIVERULEDETECTEDISSUECODE, + /** + * Description: Metadata associated with the identification (e.g. name or gender) does not match the identification being verified. + */ + KEY206, + /** + * Description: One or more records in the query response have a status of 'obsolete'. + */ + OBSOLETE, + /** + * Identifies types of detected issues regarding the administration or supply of an item to a patient. + */ + _ACTSUPPLIEDITEMDETECTEDISSUECODE, + /** + * Administration of the proposed therapy may be inappropriate or contraindicated as proposed + */ + _ADMINISTRATIONDETECTEDISSUECODE, + /** + * AppropriatenessDetectedIssueCode + */ + _APPROPRIATENESSDETECTEDISSUECODE, + /** + * InteractionDetectedIssueCode + */ + _INTERACTIONDETECTEDISSUECODE, + /** + * Proposed therapy may interact with certain foods + */ + FOOD, + /** + * Proposed therapy may interact with an existing or recent therapeutic product + */ + TPROD, + /** + * Proposed therapy may interact with an existing or recent drug therapy + */ + DRG, + /** + * Proposed therapy may interact with existing or recent natural health product therapy + */ + NHP, + /** + * Proposed therapy may interact with a non-prescription drug (e.g. alcohol, tobacco, Aspirin) + */ + NONRX, + /** + * Definition:The same or similar treatment has previously been attempted with the patient without achieving a positive effect. + */ + PREVINEF, + /** + * Description:Proposed therapy may be contraindicated or ineffective based on an existing or recent drug therapy. + */ + DACT, + /** + * Description:Proposed therapy may be inappropriate or ineffective based on the proposed start or end time. + */ + TIME, + /** + * Definition:Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy. + */ + ALRTENDLATE, + /** + * Definition:Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition. + */ + ALRTSTRTLATE, + /** + * Proposed therapy may be inappropriate or ineffective based on the proposed start or end time. + */ + _TIMINGDETECTEDISSUECODE, + /** + * Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy + */ + ENDLATE, + /** + * Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition + */ + STRTLATE, + /** + * Supplying the product at this time may be inappropriate or indicate compliance issues with the associated therapy + */ + _SUPPLYDETECTEDISSUECODE, + /** + * Definition:The requested action has already been performed and so this request has no effect + */ + ALLDONE, + /** + * Definition:The therapy being performed is in some way out of alignment with the requested therapy. + */ + FULFIL, + /** + * Definition:The status of the request being fulfilled has changed such that it is no longer actionable. This may be because the request has expired, has already been completely fulfilled or has been otherwise stopped or disabled. (Not used for 'suspended' orders.) + */ + NOTACTN, + /** + * Definition:The therapy being performed is not sufficiently equivalent to the therapy which was requested. + */ + NOTEQUIV, + /** + * Definition:The therapy being performed is not generically equivalent (having the identical biological action) to the therapy which was requested. + */ + NOTEQUIVGEN, + /** + * Definition:The therapy being performed is not therapeutically equivalent (having the same overall patient effect) to the therapy which was requested. + */ + NOTEQUIVTHER, + /** + * Definition:The therapy is being performed at a time which diverges from the time the therapy was requested + */ + TIMING, + /** + * Definition:The therapy action is being performed outside the bounds of the time period requested + */ + INTERVAL, + /** + * Definition:The therapy action is being performed too soon after the previous occurrence based on the requested frequency + */ + MINFREQ, + /** + * Definition:There should be no actions taken in fulfillment of a request that has been held or suspended. + */ + HELD, + /** + * The patient is receiving a subsequent fill significantly later than would be expected based on the amount previously supplied and the therapy dosage instructions + */ + TOOLATE, + /** + * The patient is receiving a subsequent fill significantly earlier than would be expected based on the amount previously supplied and the therapy dosage instructions + */ + TOOSOON, + /** + * Description: While the record was accepted in the repository, there is a more recent version of a record of this type. + */ + HISTORIC, + /** + * Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record. + */ + PATPREF, + /** + * Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record. An alternate therapy meeting those constraints is available. + */ + PATPREFALT, + /** + * Categorization of types of observation that capture the main clinical knowledge subject which may be a medication, a laboratory test, a disease. + */ + KSUBJ, + /** + * Categorization of types of observation that capture a knowledge subtopic which might be treatment, etiology, or prognosis. + */ + KSUBT, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to an agent. + */ + OINT, + /** + * Hypersensitivity to an agent caused by an immunologic response to an initial exposure + */ + ALG, + /** + * An allergy to a pharmaceutical product. + */ + DALG, + /** + * An allergy to a substance other than a drug or a food. E.g. Latex, pollen, etc. + */ + EALG, + /** + * An allergy to a substance generally consumed for nutritional purposes. + */ + FALG, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to a drug. + */ + DINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + DNAINT, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to environmental conditions. + */ + EINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + ENAINT, + /** + * Hypersensitivity resulting in an adverse reaction upon exposure to food. + */ + FINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + FNAINT, + /** + * Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure + */ + NAINT, + /** + * A subjective evaluation of the seriousness or intensity associated with another observation. + */ + SEV, + /** + * FDA label data + */ + _FDALABELDATA, + /** + * FDA label coating + */ + FDACOATING, + /** + * FDA label color + */ + FDACOLOR, + /** + * FDA label imprint code + */ + FDAIMPRINTCD, + /** + * FDA label logo + */ + FDALOGO, + /** + * FDA label scoring + */ + FDASCORING, + /** + * FDA label shape + */ + FDASHAPE, + /** + * FDA label size + */ + FDASIZE, + /** + * Shape of the region on the object being referenced + */ + _ROIOVERLAYSHAPE, + /** + * A circle defined by two (column,row) pairs. The first point is the center of the circle and the second point is a point on the perimeter of the circle. + */ + CIRCLE, + /** + * An ellipse defined by four (column,row) pairs, the first two points specifying the endpoints of the major axis and the second two points specifying the endpoints of the minor axis. + */ + ELLIPSE, + /** + * A single point denoted by a single (column,row) pair, or multiple points each denoted by a (column,row) pair. + */ + POINT, + /** + * A series of connected line segments with ordered vertices denoted by (column,row) pairs; if the first and last vertices are the same, it is a closed polygon. + */ + POLY, + /** + * Description:Indicates that result data has been corrected. + */ + C, + /** + * Code set to define specialized/allowed diets + */ + DIET, + /** + * A diet exclusively composed of oatmeal, semolina, or rice, to be extremely easy to eat and digest. + */ + BR, + /** + * A diet that uses carbohydrates sparingly. Typically with a restriction in daily energy content (e.g. 1600-2000 kcal). + */ + DM, + /** + * No enteral intake of foot or liquids whatsoever, no smoking. Typically 6 to 8 hours before anesthesia. + */ + FAST, + /** + * A diet consisting of a formula feeding, either for an infant or an adult, to provide nutrition either orally or through the gastrointestinal tract via tube, catheter or stoma. + */ + FORMULA, + /** + * Gluten free diet for celiac disease. + */ + GF, + /** + * A diet low in fat, particularly to patients with hepatic diseases. + */ + LF, + /** + * A low protein diet for patients with renal failure. + */ + LP, + /** + * A strictly liquid diet, that can be fully absorbed in the intestine, and therefore may not contain fiber. Used before enteral surgeries. + */ + LQ, + /** + * A diet low in sodium for patients with congestive heart failure and/or renal failure. + */ + LS, + /** + * A normal diet, i.e. no special preparations or restrictions for medical reasons. This is notwithstanding any preferences the patient might have regarding special foods, such as vegetarian, kosher, etc. + */ + N, + /** + * A no fat diet for acute hepatic diseases. + */ + NF, + /** + * Phenylketonuria diet. + */ + PAF, + /** + * Patient is supplied with parenteral nutrition, typically described in terms of i.v. medications. + */ + PAR, + /** + * A diet that seeks to reduce body fat, typically low energy content (800-1600 kcal). + */ + RD, + /** + * A diet that avoids ingredients that might cause digestion problems, e.g., avoid excessive fat, avoid too much fiber (cabbage, peas, beans). + */ + SCH, + /** + * A diet that is not intended to be complete but is added to other diets. + */ + SUPPLEMENT, + /** + * This is not really a diet, since it contains little nutritional value, but is essentially just water. Used before coloscopy examinations. + */ + T, + /** + * Diet with low content of the amino-acids valin, leucin, and isoleucin, for "maple syrup disease." + */ + VLI, + /** + * Definition: A public or government health program that administers and funds coverage for prescription drugs to assist program eligible who meet financial and health status criteria. + */ + DRUGPRG, + /** + * Description:Indicates that a result is complete. No further results are to come. This maps to the 'complete' state in the observation result status code. + */ + F, + /** + * Description:Indicates that a result is incomplete. There are further results to come. This maps to the 'active' state in the observation result status code. + */ + PRLMN, + /** + * An observation identifying security metadata about an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security metadata are used to name security labels. + + + Rationale: According to ISO/TS 22600-3:2009(E) A.9.1.7 SECURITY LABEL MATCHING, Security label matching compares the initiator's clearance to the target's security label. All of the following must be true for authorization to be granted: + + + The security policy identifiers shall be identical + The classification level of the initiator shall be greater than or equal to that of the target (that is, there shall be at least one value in the classification list of the clearance greater than or equal to the classification of the target), and + For each security category in the target label, there shall be a security category of the same type in the initiator's clearance and the initiator's classification level shall dominate that of the target. + + + Examples: SecurityObservationType security label fields include: + + + Confidentiality classification + Compartment category + Sensitivity category + Security mechanisms used to ensure data integrity or to perform authorized data transformation + Indicators of an IT resource completeness, veracity, reliability, trustworthiness, or provenance. + + + Usage Note: SecurityObservationType codes designate security label field types, which are valued with an applicable SecurityObservationValue code as the "security label tag". + */ + SECOBS, + /** + * Type of security metadata observation made about the category of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security category metadata is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: "A nonhierarchical grouping of sensitive information used to control access to data more finely than with hierarchical security classification alone." + + + Rationale: A security category observation supports requirement to specify the type of IT resource to facilitate application of appropriate levels of information security according to a range of levels of impact or consequences that might result from the unauthorized disclosure, modification, or use of the information or information system. A resource is assigned to a specific category of information (e.g., privacy, medical, proprietary, financial, investigative, contractor sensitive, security management) defined by an organization or in some instances, by a specific law, Executive Order, directive, policy, or regulation. [FIPS 199] + + + Examples: Types of security categories include: + + + Compartment: A division of data into isolated blocks with separate security controls for the purpose of reducing risk. (ISO 2382-8). A security label tag that "segments" an IT resource by indicating that access and use is restricted to members of a defined community or project. (HL7 Healthcare Classification System) + Sensitivity: The characteristic of an IT resource which implies its value or importance and may include its vulnerability. (ISO 7492-2) Privacy metadata for information perceived as undesirable to share. (HL7 Healthcare Classification System) + */ + SECCATOBS, + /** + * Type of security metadata observation made about the classification of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security classification is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: "The determination of which specific degree of protection against access the data or information requires, together with a designation of that degree of protection." Security classification metadata is based on an analysis of applicable policies and the risk of financial, reputational, or other harm that could result from unauthorized disclosure. + + + Rationale: A security classification observation may indicate that the confidentiality level indicated by an Act or Role confidentiality attribute has been overridden by the entity responsible for ascribing the SecurityClassificationObservationValue. This supports the business requirement for increasing or decreasing the level of confidentiality (classification or declassification) based on parameters beyond the original assignment of an Act or Role confidentiality. + + + Examples: Types of security classification include: HL7 Confidentiality Codes such as very restricted, unrestricted, and normal. Intelligence community examples include top secret, secret, and confidential. + + + Usage Note: Security classification observation type codes designate security label field types, which are valued with an applicable SecurityClassificationObservationValue code as the "security label tag". + */ + SECCLASSOBS, + /** + * Type of security metadata observation made about the control of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security control metadata convey instructions to users and receivers for secure distribution, transmission, and storage; dictate obligations or mandated actions; specify any action prohibited by refrain policy such as dissemination controls; and stipulate the permissible purpose of use of an IT resource. + + + Rationale: A security control observation supports requirement to specify applicable management, operational, and technical controls (i.e., safeguards or countermeasures) prescribed for an information system to protect the confidentiality, integrity, and availability of the system and its information. [FIPS 199] + + + Examples: Types of security control metadata include: + + + handling caveats + dissemination controls + obligations + refrain policies + purpose of use constraints + */ + SECCONOBS, + /** + * Type of security metadata observation made about the integrity of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. + + + Rationale: A security integrity observation supports the requirement to guard against improper information modification or destruction, and includes ensuring information non-repudiation and authenticity. (44 U.S.C., SEC. 3542) + + + Examples: Types of security integrity metadata include: + + + Integrity status, which indicates the completeness or workflow status of an IT resource (data, information object, service, or system capability) + Integrity confidence, which indicates the reliability and trustworthiness of an IT resource + Integrity control, which indicates pertinent handling caveats, obligations, refrain policies, and purpose of use for the resource + Data integrity, which indicate the security mechanisms used to ensure that the accuracy and consistency are preserved regardless of changes made (ISO/IEC DIS 2382-8) + Alteration integrity, which indicate the security mechanisms used for authorized transformations of the resource + Integrity provenance, which indicates the entity responsible for a report or assertion relayed "second-hand" about an IT resource + */ + SECINTOBS, + /** + * Type of security metadata observation made about the alteration integrity of an IT resource (data, information object, service, or system capability), which indicates the mechanism used for authorized transformations of the resource. + + + Examples: Types of security alteration integrity observation metadata, which may value the observation with a code used to indicate the mechanism used for authorized transformation of an IT resource, including: + + + translation + syntactic transformation + semantic mapping + redaction + masking + pseudonymization + anonymization + */ + SECALTINTOBS, + /** + * Type of security metadata observation made about the data integrity of an IT resource (data, information object, service, or system capability), which indicates the security mechanism used to preserve resource accuracy and consistency. Data integrity is defined by ISO 22600-23.3.21 as: "The property that data has not been altered or destroyed in an unauthorized manner", and by ISO/IEC 2382-8: The property of data whose accuracy and consistency are preserved regardless of changes made." + + + Examples: Types of security data integrity observation metadata, which may value the observation, include cryptographic hash function and digital signature. + */ + SECDATINTOBS, + /** + * Type of security metadata observation made about the integrity confidence of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. + + + Examples: Types of security integrity confidence observation metadata, which may value the observation, include highly reliable, uncertain reliability, and not reliable. + + + Usage Note: A security integrity confidence observation on an Act may indicate that a valued Act.uncertaintycode attribute has been overridden by the entity responsible for ascribing the SecurityIntegrityConfidenceObservationValue. This supports the business requirements for increasing or decreasing the assessment of the reliability or trustworthiness of an IT resource based on parameters beyond the original assignment of an Act statement level of uncertainty. + */ + SECINTCONOBS, + /** + * Type of security metadata observation made about the provenance integrity of an IT resource (data, information object, service, or system capability), which indicates the lifecycle completeness of an IT resource in terms of workflow status such as its creation, modification, suspension, and deletion; locations in which the resource has been collected or archived, from which it may be retrieved, and the history of its distribution and disclosure. Integrity provenance metadata about an IT resource may be used to assess its veracity, reliability, and trustworthiness. + + + Examples: Types of security integrity provenance observation metadata, which may value the observation about an IT resource, include: + + + completeness or workflow status, such as authentication + the entity responsible for original authoring or informing about an IT resource + the entity responsible for a report or assertion about an IT resource relayed “second-handâ€? + the entity responsible for excerpting, transforming, or compiling an IT resource + */ + SECINTPRVOBS, + /** + * Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that made assertions about the resource. The asserting entity may not be the original informant about the resource. + + + Examples: Types of security integrity provenance asserted by observation metadata, which may value the observation, including: + + + assertions about an IT resource by a patient + assertions about an IT resource by a clinician + assertions about an IT resource by a device + */ + SECINTPRVABOBS, + /** + * Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that reported the existence of the resource. The reporting entity may not be the original author of the resource. + + + Examples: Types of security integrity provenance reported by observation metadata, which may value the observation, include: + + + reports about an IT resource by a patient + reports about an IT resource by a clinician + reports about an IT resource by a device + */ + SECINTPRVRBOBS, + /** + * Type of security metadata observation made about the integrity status of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Indicates the completeness of an IT resource in terms of workflow status, which may impact users that are authorized to access and use the resource. + + + Examples: Types of security integrity status observation metadata, which may value the observation, include codes from the HL7 DocumentCompletion code system such as legally authenticated, in progress, and incomplete. + */ + SECINTSTOBS, + /** + * An observation identifying trust metadata about an IT resource (data, information object, service, or system capability), which may be used as a trust attribute to populate a computable trust policy, trust credential, trust assertion, or trust label field in a security label or trust policy, which are principally used for authentication, authorization, and access control decisions. + */ + SECTRSTOBS, + /** + * Type of security metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework. + */ + TRSTACCRDOBS, + /** + * Type of security metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1] + */ + TRSTAGREOBS, + /** + * Type of security metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1] + + + For example, + + + + A Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. For example, a particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants. + A Certificate Practice Statement (CSP), which is a statement of the practices which an Authority employs in issuing and managing certificates. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants.] + */ + TRSTCERTOBS, + /** + * Type of security metadata observation made about a complete set of contracts, regulations or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative] + */ + TRSTFWKOBS, + /** + * Type of security metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol. + */ + TRSTLOAOBS, + /** + * Type of security metadata observation made about a security architecture system component that supports enforcement of security policies. + */ + TRSTMECOBS, + /** + * Definition: A government health program that provides coverage on a fee for service basis for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. + + + Discussion: The structure and business processes for underwriting and administering a subsidized fee for service program is further specified by the Underwriter and Payer Role.class and Role.code. + */ + SUBSIDFFS, + /** + * Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well. + */ + WRKCOMP, + /** + * An identifying code for healthcare interventions/procedures. + */ + _ACTPROCEDURECODE, + /** + * Definition: An identifying code for billable services, as opposed to codes for similar services used to identify them for functional purposes. + */ + _ACTBILLABLESERVICECODE, + /** + * Domain provides the root for HL7-defined detailed or rich codes for the Act classes. + */ + _HL7DEFINEDACTCODES, + /** + * null + */ + COPAY, + /** + * null + */ + DEDUCT, + /** + * null + */ + DOSEIND, + /** + * null + */ + PRA, + /** + * The act of putting something away for safe keeping. The "something" may be physical object such as a specimen, or information, such as observations regarding a specimen. + */ + STORE, + /** + * added to help the parsers + */ + NULL; + public static V3ActCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActAccountCode".equals(codeString)) + return _ACTACCOUNTCODE; + if ("ACCTRECEIVABLE".equals(codeString)) + return ACCTRECEIVABLE; + if ("CASH".equals(codeString)) + return CASH; + if ("CC".equals(codeString)) + return CC; + if ("AE".equals(codeString)) + return AE; + if ("DN".equals(codeString)) + return DN; + if ("DV".equals(codeString)) + return DV; + if ("MC".equals(codeString)) + return MC; + if ("V".equals(codeString)) + return V; + if ("PBILLACCT".equals(codeString)) + return PBILLACCT; + if ("_ActAdjudicationCode".equals(codeString)) + return _ACTADJUDICATIONCODE; + if ("_ActAdjudicationGroupCode".equals(codeString)) + return _ACTADJUDICATIONGROUPCODE; + if ("CONT".equals(codeString)) + return CONT; + if ("DAY".equals(codeString)) + return DAY; + if ("LOC".equals(codeString)) + return LOC; + if ("MONTH".equals(codeString)) + return MONTH; + if ("PERIOD".equals(codeString)) + return PERIOD; + if ("PROV".equals(codeString)) + return PROV; + if ("WEEK".equals(codeString)) + return WEEK; + if ("YEAR".equals(codeString)) + return YEAR; + if ("AA".equals(codeString)) + return AA; + if ("ANF".equals(codeString)) + return ANF; + if ("AR".equals(codeString)) + return AR; + if ("AS".equals(codeString)) + return AS; + if ("_ActAdjudicationResultActionCode".equals(codeString)) + return _ACTADJUDICATIONRESULTACTIONCODE; + if ("DISPLAY".equals(codeString)) + return DISPLAY; + if ("FORM".equals(codeString)) + return FORM; + if ("_ActBillableModifierCode".equals(codeString)) + return _ACTBILLABLEMODIFIERCODE; + if ("CPTM".equals(codeString)) + return CPTM; + if ("HCPCSA".equals(codeString)) + return HCPCSA; + if ("_ActBillingArrangementCode".equals(codeString)) + return _ACTBILLINGARRANGEMENTCODE; + if ("BLK".equals(codeString)) + return BLK; + if ("CAP".equals(codeString)) + return CAP; + if ("CONTF".equals(codeString)) + return CONTF; + if ("FINBILL".equals(codeString)) + return FINBILL; + if ("ROST".equals(codeString)) + return ROST; + if ("SESS".equals(codeString)) + return SESS; + if ("FFS".equals(codeString)) + return FFS; + if ("FFPS".equals(codeString)) + return FFPS; + if ("FFCS".equals(codeString)) + return FFCS; + if ("TFS".equals(codeString)) + return TFS; + if ("_ActBoundedROICode".equals(codeString)) + return _ACTBOUNDEDROICODE; + if ("ROIFS".equals(codeString)) + return ROIFS; + if ("ROIPS".equals(codeString)) + return ROIPS; + if ("_ActCareProvisionCode".equals(codeString)) + return _ACTCAREPROVISIONCODE; + if ("_ActCredentialedCareCode".equals(codeString)) + return _ACTCREDENTIALEDCARECODE; + if ("_ActCredentialedCareProvisionPersonCode".equals(codeString)) + return _ACTCREDENTIALEDCAREPROVISIONPERSONCODE; + if ("CACC".equals(codeString)) + return CACC; + if ("CAIC".equals(codeString)) + return CAIC; + if ("CAMC".equals(codeString)) + return CAMC; + if ("CANC".equals(codeString)) + return CANC; + if ("CAPC".equals(codeString)) + return CAPC; + if ("CBGC".equals(codeString)) + return CBGC; + if ("CCCC".equals(codeString)) + return CCCC; + if ("CCGC".equals(codeString)) + return CCGC; + if ("CCPC".equals(codeString)) + return CCPC; + if ("CCSC".equals(codeString)) + return CCSC; + if ("CDEC".equals(codeString)) + return CDEC; + if ("CDRC".equals(codeString)) + return CDRC; + if ("CEMC".equals(codeString)) + return CEMC; + if ("CFPC".equals(codeString)) + return CFPC; + if ("CIMC".equals(codeString)) + return CIMC; + if ("CMGC".equals(codeString)) + return CMGC; + if ("CNEC".equals(codeString)) + return CNEC; + if ("CNMC".equals(codeString)) + return CNMC; + if ("CNQC".equals(codeString)) + return CNQC; + if ("CNSC".equals(codeString)) + return CNSC; + if ("COGC".equals(codeString)) + return COGC; + if ("COMC".equals(codeString)) + return COMC; + if ("COPC".equals(codeString)) + return COPC; + if ("COSC".equals(codeString)) + return COSC; + if ("COTC".equals(codeString)) + return COTC; + if ("CPEC".equals(codeString)) + return CPEC; + if ("CPGC".equals(codeString)) + return CPGC; + if ("CPHC".equals(codeString)) + return CPHC; + if ("CPRC".equals(codeString)) + return CPRC; + if ("CPSC".equals(codeString)) + return CPSC; + if ("CPYC".equals(codeString)) + return CPYC; + if ("CROC".equals(codeString)) + return CROC; + if ("CRPC".equals(codeString)) + return CRPC; + if ("CSUC".equals(codeString)) + return CSUC; + if ("CTSC".equals(codeString)) + return CTSC; + if ("CURC".equals(codeString)) + return CURC; + if ("CVSC".equals(codeString)) + return CVSC; + if ("LGPC".equals(codeString)) + return LGPC; + if ("_ActCredentialedCareProvisionProgramCode".equals(codeString)) + return _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE; + if ("AALC".equals(codeString)) + return AALC; + if ("AAMC".equals(codeString)) + return AAMC; + if ("ABHC".equals(codeString)) + return ABHC; + if ("ACAC".equals(codeString)) + return ACAC; + if ("ACHC".equals(codeString)) + return ACHC; + if ("AHOC".equals(codeString)) + return AHOC; + if ("ALTC".equals(codeString)) + return ALTC; + if ("AOSC".equals(codeString)) + return AOSC; + if ("CACS".equals(codeString)) + return CACS; + if ("CAMI".equals(codeString)) + return CAMI; + if ("CAST".equals(codeString)) + return CAST; + if ("CBAR".equals(codeString)) + return CBAR; + if ("CCAD".equals(codeString)) + return CCAD; + if ("CCAR".equals(codeString)) + return CCAR; + if ("CDEP".equals(codeString)) + return CDEP; + if ("CDGD".equals(codeString)) + return CDGD; + if ("CDIA".equals(codeString)) + return CDIA; + if ("CEPI".equals(codeString)) + return CEPI; + if ("CFEL".equals(codeString)) + return CFEL; + if ("CHFC".equals(codeString)) + return CHFC; + if ("CHRO".equals(codeString)) + return CHRO; + if ("CHYP".equals(codeString)) + return CHYP; + if ("CMIH".equals(codeString)) + return CMIH; + if ("CMSC".equals(codeString)) + return CMSC; + if ("COJR".equals(codeString)) + return COJR; + if ("CONC".equals(codeString)) + return CONC; + if ("COPD".equals(codeString)) + return COPD; + if ("CORT".equals(codeString)) + return CORT; + if ("CPAD".equals(codeString)) + return CPAD; + if ("CPND".equals(codeString)) + return CPND; + if ("CPST".equals(codeString)) + return CPST; + if ("CSDM".equals(codeString)) + return CSDM; + if ("CSIC".equals(codeString)) + return CSIC; + if ("CSLD".equals(codeString)) + return CSLD; + if ("CSPT".equals(codeString)) + return CSPT; + if ("CTBU".equals(codeString)) + return CTBU; + if ("CVDC".equals(codeString)) + return CVDC; + if ("CWMA".equals(codeString)) + return CWMA; + if ("CWOH".equals(codeString)) + return CWOH; + if ("_ActEncounterCode".equals(codeString)) + return _ACTENCOUNTERCODE; + if ("AMB".equals(codeString)) + return AMB; + if ("EMER".equals(codeString)) + return EMER; + if ("FLD".equals(codeString)) + return FLD; + if ("HH".equals(codeString)) + return HH; + if ("IMP".equals(codeString)) + return IMP; + if ("ACUTE".equals(codeString)) + return ACUTE; + if ("NONAC".equals(codeString)) + return NONAC; + if ("PRENC".equals(codeString)) + return PRENC; + if ("SS".equals(codeString)) + return SS; + if ("VR".equals(codeString)) + return VR; + if ("_ActMedicalServiceCode".equals(codeString)) + return _ACTMEDICALSERVICECODE; + if ("ALC".equals(codeString)) + return ALC; + if ("CARD".equals(codeString)) + return CARD; + if ("CHR".equals(codeString)) + return CHR; + if ("DNTL".equals(codeString)) + return DNTL; + if ("DRGRHB".equals(codeString)) + return DRGRHB; + if ("GENRL".equals(codeString)) + return GENRL; + if ("MED".equals(codeString)) + return MED; + if ("OBS".equals(codeString)) + return OBS; + if ("ONC".equals(codeString)) + return ONC; + if ("PALL".equals(codeString)) + return PALL; + if ("PED".equals(codeString)) + return PED; + if ("PHAR".equals(codeString)) + return PHAR; + if ("PHYRHB".equals(codeString)) + return PHYRHB; + if ("PSYCH".equals(codeString)) + return PSYCH; + if ("SURG".equals(codeString)) + return SURG; + if ("_ActClaimAttachmentCategoryCode".equals(codeString)) + return _ACTCLAIMATTACHMENTCATEGORYCODE; + if ("AUTOATTCH".equals(codeString)) + return AUTOATTCH; + if ("DOCUMENT".equals(codeString)) + return DOCUMENT; + if ("HEALTHREC".equals(codeString)) + return HEALTHREC; + if ("IMG".equals(codeString)) + return IMG; + if ("LABRESULTS".equals(codeString)) + return LABRESULTS; + if ("MODEL".equals(codeString)) + return MODEL; + if ("WIATTCH".equals(codeString)) + return WIATTCH; + if ("XRAY".equals(codeString)) + return XRAY; + if ("_ActConsentType".equals(codeString)) + return _ACTCONSENTTYPE; + if ("ICOL".equals(codeString)) + return ICOL; + if ("IDSCL".equals(codeString)) + return IDSCL; + if ("INFA".equals(codeString)) + return INFA; + if ("INFAO".equals(codeString)) + return INFAO; + if ("INFASO".equals(codeString)) + return INFASO; + if ("IRDSCL".equals(codeString)) + return IRDSCL; + if ("RESEARCH".equals(codeString)) + return RESEARCH; + if ("RSDID".equals(codeString)) + return RSDID; + if ("RSREID".equals(codeString)) + return RSREID; + if ("_ActContainerRegistrationCode".equals(codeString)) + return _ACTCONTAINERREGISTRATIONCODE; + if ("ID".equals(codeString)) + return ID; + if ("IP".equals(codeString)) + return IP; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("O".equals(codeString)) + return O; + if ("R".equals(codeString)) + return R; + if ("X".equals(codeString)) + return X; + if ("_ActControlVariable".equals(codeString)) + return _ACTCONTROLVARIABLE; + if ("AUTO".equals(codeString)) + return AUTO; + if ("ENDC".equals(codeString)) + return ENDC; + if ("REFLEX".equals(codeString)) + return REFLEX; + if ("_ActCoverageConfirmationCode".equals(codeString)) + return _ACTCOVERAGECONFIRMATIONCODE; + if ("_ActCoverageAuthorizationConfirmationCode".equals(codeString)) + return _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE; + if ("AUTH".equals(codeString)) + return AUTH; + if ("NAUTH".equals(codeString)) + return NAUTH; + if ("_ActCoverageEligibilityConfirmationCode".equals(codeString)) + return _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE; + if ("ELG".equals(codeString)) + return ELG; + if ("NELG".equals(codeString)) + return NELG; + if ("_ActCoverageLimitCode".equals(codeString)) + return _ACTCOVERAGELIMITCODE; + if ("_ActCoverageQuantityLimitCode".equals(codeString)) + return _ACTCOVERAGEQUANTITYLIMITCODE; + if ("COVPRD".equals(codeString)) + return COVPRD; + if ("LFEMX".equals(codeString)) + return LFEMX; + if ("NETAMT".equals(codeString)) + return NETAMT; + if ("PRDMX".equals(codeString)) + return PRDMX; + if ("UNITPRICE".equals(codeString)) + return UNITPRICE; + if ("UNITQTY".equals(codeString)) + return UNITQTY; + if ("COVMX".equals(codeString)) + return COVMX; + if ("_ActCoveredPartyLimitCode".equals(codeString)) + return _ACTCOVEREDPARTYLIMITCODE; + if ("_ActCoverageTypeCode".equals(codeString)) + return _ACTCOVERAGETYPECODE; + if ("_ActInsurancePolicyCode".equals(codeString)) + return _ACTINSURANCEPOLICYCODE; + if ("EHCPOL".equals(codeString)) + return EHCPOL; + if ("HSAPOL".equals(codeString)) + return HSAPOL; + if ("AUTOPOL".equals(codeString)) + return AUTOPOL; + if ("COL".equals(codeString)) + return COL; + if ("UNINSMOT".equals(codeString)) + return UNINSMOT; + if ("PUBLICPOL".equals(codeString)) + return PUBLICPOL; + if ("DENTPRG".equals(codeString)) + return DENTPRG; + if ("DISEASEPRG".equals(codeString)) + return DISEASEPRG; + if ("CANPRG".equals(codeString)) + return CANPRG; + if ("ENDRENAL".equals(codeString)) + return ENDRENAL; + if ("HIVAIDS".equals(codeString)) + return HIVAIDS; + if ("MANDPOL".equals(codeString)) + return MANDPOL; + if ("MENTPRG".equals(codeString)) + return MENTPRG; + if ("SAFNET".equals(codeString)) + return SAFNET; + if ("SUBPRG".equals(codeString)) + return SUBPRG; + if ("SUBSIDIZ".equals(codeString)) + return SUBSIDIZ; + if ("SUBSIDMC".equals(codeString)) + return SUBSIDMC; + if ("SUBSUPP".equals(codeString)) + return SUBSUPP; + if ("WCBPOL".equals(codeString)) + return WCBPOL; + if ("_ActInsuranceTypeCode".equals(codeString)) + return _ACTINSURANCETYPECODE; + if ("_ActHealthInsuranceTypeCode".equals(codeString)) + return _ACTHEALTHINSURANCETYPECODE; + if ("DENTAL".equals(codeString)) + return DENTAL; + if ("DISEASE".equals(codeString)) + return DISEASE; + if ("DRUGPOL".equals(codeString)) + return DRUGPOL; + if ("HIP".equals(codeString)) + return HIP; + if ("LTC".equals(codeString)) + return LTC; + if ("MCPOL".equals(codeString)) + return MCPOL; + if ("POS".equals(codeString)) + return POS; + if ("HMO".equals(codeString)) + return HMO; + if ("PPO".equals(codeString)) + return PPO; + if ("MENTPOL".equals(codeString)) + return MENTPOL; + if ("SUBPOL".equals(codeString)) + return SUBPOL; + if ("VISPOL".equals(codeString)) + return VISPOL; + if ("DIS".equals(codeString)) + return DIS; + if ("EWB".equals(codeString)) + return EWB; + if ("FLEXP".equals(codeString)) + return FLEXP; + if ("LIFE".equals(codeString)) + return LIFE; + if ("ANNU".equals(codeString)) + return ANNU; + if ("TLIFE".equals(codeString)) + return TLIFE; + if ("ULIFE".equals(codeString)) + return ULIFE; + if ("PNC".equals(codeString)) + return PNC; + if ("REI".equals(codeString)) + return REI; + if ("SURPL".equals(codeString)) + return SURPL; + if ("UMBRL".equals(codeString)) + return UMBRL; + if ("_ActProgramTypeCode".equals(codeString)) + return _ACTPROGRAMTYPECODE; + if ("CHAR".equals(codeString)) + return CHAR; + if ("CRIME".equals(codeString)) + return CRIME; + if ("EAP".equals(codeString)) + return EAP; + if ("GOVEMP".equals(codeString)) + return GOVEMP; + if ("HIRISK".equals(codeString)) + return HIRISK; + if ("IND".equals(codeString)) + return IND; + if ("MILITARY".equals(codeString)) + return MILITARY; + if ("RETIRE".equals(codeString)) + return RETIRE; + if ("SOCIAL".equals(codeString)) + return SOCIAL; + if ("VET".equals(codeString)) + return VET; + if ("_ActDetectedIssueManagementCode".equals(codeString)) + return _ACTDETECTEDISSUEMANAGEMENTCODE; + if ("_ActAdministrativeDetectedIssueManagementCode".equals(codeString)) + return _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE; + if ("_AuthorizationIssueManagementCode".equals(codeString)) + return _AUTHORIZATIONISSUEMANAGEMENTCODE; + if ("EMAUTH".equals(codeString)) + return EMAUTH; + if ("21".equals(codeString)) + return _21; + if ("1".equals(codeString)) + return _1; + if ("19".equals(codeString)) + return _19; + if ("2".equals(codeString)) + return _2; + if ("22".equals(codeString)) + return _22; + if ("23".equals(codeString)) + return _23; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("6".equals(codeString)) + return _6; + if ("7".equals(codeString)) + return _7; + if ("14".equals(codeString)) + return _14; + if ("15".equals(codeString)) + return _15; + if ("16".equals(codeString)) + return _16; + if ("17".equals(codeString)) + return _17; + if ("18".equals(codeString)) + return _18; + if ("20".equals(codeString)) + return _20; + if ("8".equals(codeString)) + return _8; + if ("10".equals(codeString)) + return _10; + if ("11".equals(codeString)) + return _11; + if ("12".equals(codeString)) + return _12; + if ("13".equals(codeString)) + return _13; + if ("9".equals(codeString)) + return _9; + if ("_ActExposureCode".equals(codeString)) + return _ACTEXPOSURECODE; + if ("CHLDCARE".equals(codeString)) + return CHLDCARE; + if ("CONVEYNC".equals(codeString)) + return CONVEYNC; + if ("HLTHCARE".equals(codeString)) + return HLTHCARE; + if ("HOMECARE".equals(codeString)) + return HOMECARE; + if ("HOSPPTNT".equals(codeString)) + return HOSPPTNT; + if ("HOSPVSTR".equals(codeString)) + return HOSPVSTR; + if ("HOUSEHLD".equals(codeString)) + return HOUSEHLD; + if ("INMATE".equals(codeString)) + return INMATE; + if ("INTIMATE".equals(codeString)) + return INTIMATE; + if ("LTRMCARE".equals(codeString)) + return LTRMCARE; + if ("PLACE".equals(codeString)) + return PLACE; + if ("PTNTCARE".equals(codeString)) + return PTNTCARE; + if ("SCHOOL2".equals(codeString)) + return SCHOOL2; + if ("SOCIAL2".equals(codeString)) + return SOCIAL2; + if ("SUBSTNCE".equals(codeString)) + return SUBSTNCE; + if ("TRAVINT".equals(codeString)) + return TRAVINT; + if ("WORK2".equals(codeString)) + return WORK2; + if ("_ActFinancialTransactionCode".equals(codeString)) + return _ACTFINANCIALTRANSACTIONCODE; + if ("CHRG".equals(codeString)) + return CHRG; + if ("REV".equals(codeString)) + return REV; + if ("_ActIncidentCode".equals(codeString)) + return _ACTINCIDENTCODE; + if ("MVA".equals(codeString)) + return MVA; + if ("SCHOOL".equals(codeString)) + return SCHOOL; + if ("SPT".equals(codeString)) + return SPT; + if ("WPA".equals(codeString)) + return WPA; + if ("_ActInformationAccessCode".equals(codeString)) + return _ACTINFORMATIONACCESSCODE; + if ("ACADR".equals(codeString)) + return ACADR; + if ("ACALL".equals(codeString)) + return ACALL; + if ("ACALLG".equals(codeString)) + return ACALLG; + if ("ACCONS".equals(codeString)) + return ACCONS; + if ("ACDEMO".equals(codeString)) + return ACDEMO; + if ("ACDI".equals(codeString)) + return ACDI; + if ("ACIMMUN".equals(codeString)) + return ACIMMUN; + if ("ACLAB".equals(codeString)) + return ACLAB; + if ("ACMED".equals(codeString)) + return ACMED; + if ("ACMEDC".equals(codeString)) + return ACMEDC; + if ("ACMEN".equals(codeString)) + return ACMEN; + if ("ACOBS".equals(codeString)) + return ACOBS; + if ("ACPOLPRG".equals(codeString)) + return ACPOLPRG; + if ("ACPROV".equals(codeString)) + return ACPROV; + if ("ACPSERV".equals(codeString)) + return ACPSERV; + if ("ACSUBSTAB".equals(codeString)) + return ACSUBSTAB; + if ("_ActInformationAccessContextCode".equals(codeString)) + return _ACTINFORMATIONACCESSCONTEXTCODE; + if ("INFAUT".equals(codeString)) + return INFAUT; + if ("INFCON".equals(codeString)) + return INFCON; + if ("INFCRT".equals(codeString)) + return INFCRT; + if ("INFDNG".equals(codeString)) + return INFDNG; + if ("INFEMER".equals(codeString)) + return INFEMER; + if ("INFPWR".equals(codeString)) + return INFPWR; + if ("INFREG".equals(codeString)) + return INFREG; + if ("_ActInformationCategoryCode".equals(codeString)) + return _ACTINFORMATIONCATEGORYCODE; + if ("ALLCAT".equals(codeString)) + return ALLCAT; + if ("ALLGCAT".equals(codeString)) + return ALLGCAT; + if ("ARCAT".equals(codeString)) + return ARCAT; + if ("COBSCAT".equals(codeString)) + return COBSCAT; + if ("DEMOCAT".equals(codeString)) + return DEMOCAT; + if ("DICAT".equals(codeString)) + return DICAT; + if ("IMMUCAT".equals(codeString)) + return IMMUCAT; + if ("LABCAT".equals(codeString)) + return LABCAT; + if ("MEDCCAT".equals(codeString)) + return MEDCCAT; + if ("MENCAT".equals(codeString)) + return MENCAT; + if ("PSVCCAT".equals(codeString)) + return PSVCCAT; + if ("RXCAT".equals(codeString)) + return RXCAT; + if ("_ActInvoiceElementCode".equals(codeString)) + return _ACTINVOICEELEMENTCODE; + if ("_ActInvoiceAdjudicationPaymentCode".equals(codeString)) + return _ACTINVOICEADJUDICATIONPAYMENTCODE; + if ("_ActInvoiceAdjudicationPaymentGroupCode".equals(codeString)) + return _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE; + if ("ALEC".equals(codeString)) + return ALEC; + if ("BONUS".equals(codeString)) + return BONUS; + if ("CFWD".equals(codeString)) + return CFWD; + if ("EDU".equals(codeString)) + return EDU; + if ("EPYMT".equals(codeString)) + return EPYMT; + if ("GARN".equals(codeString)) + return GARN; + if ("INVOICE".equals(codeString)) + return INVOICE; + if ("PINV".equals(codeString)) + return PINV; + if ("PPRD".equals(codeString)) + return PPRD; + if ("PROA".equals(codeString)) + return PROA; + if ("RECOV".equals(codeString)) + return RECOV; + if ("RETRO".equals(codeString)) + return RETRO; + if ("TRAN".equals(codeString)) + return TRAN; + if ("_ActInvoiceAdjudicationPaymentSummaryCode".equals(codeString)) + return _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE; + if ("INVTYPE".equals(codeString)) + return INVTYPE; + if ("PAYEE".equals(codeString)) + return PAYEE; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("SENDAPP".equals(codeString)) + return SENDAPP; + if ("_ActInvoiceDetailCode".equals(codeString)) + return _ACTINVOICEDETAILCODE; + if ("_ActInvoiceDetailClinicalProductCode".equals(codeString)) + return _ACTINVOICEDETAILCLINICALPRODUCTCODE; + if ("UNSPSC".equals(codeString)) + return UNSPSC; + if ("_ActInvoiceDetailDrugProductCode".equals(codeString)) + return _ACTINVOICEDETAILDRUGPRODUCTCODE; + if ("GTIN".equals(codeString)) + return GTIN; + if ("UPC".equals(codeString)) + return UPC; + if ("_ActInvoiceDetailGenericCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICCODE; + if ("_ActInvoiceDetailGenericAdjudicatorCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICADJUDICATORCODE; + if ("COIN".equals(codeString)) + return COIN; + if ("COPAYMENT".equals(codeString)) + return COPAYMENT; + if ("DEDUCTIBLE".equals(codeString)) + return DEDUCTIBLE; + if ("PAY".equals(codeString)) + return PAY; + if ("SPEND".equals(codeString)) + return SPEND; + if ("COINS".equals(codeString)) + return COINS; + if ("_ActInvoiceDetailGenericModifierCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICMODIFIERCODE; + if ("AFTHRS".equals(codeString)) + return AFTHRS; + if ("ISOL".equals(codeString)) + return ISOL; + if ("OOO".equals(codeString)) + return OOO; + if ("_ActInvoiceDetailGenericProviderCode".equals(codeString)) + return _ACTINVOICEDETAILGENERICPROVIDERCODE; + if ("CANCAPT".equals(codeString)) + return CANCAPT; + if ("DSC".equals(codeString)) + return DSC; + if ("ESA".equals(codeString)) + return ESA; + if ("FFSTOP".equals(codeString)) + return FFSTOP; + if ("FNLFEE".equals(codeString)) + return FNLFEE; + if ("FRSTFEE".equals(codeString)) + return FRSTFEE; + if ("MARKUP".equals(codeString)) + return MARKUP; + if ("MISSAPT".equals(codeString)) + return MISSAPT; + if ("PERFEE".equals(codeString)) + return PERFEE; + if ("PERMBNS".equals(codeString)) + return PERMBNS; + if ("RESTOCK".equals(codeString)) + return RESTOCK; + if ("TRAVEL".equals(codeString)) + return TRAVEL; + if ("URGENT".equals(codeString)) + return URGENT; + if ("_ActInvoiceDetailTaxCode".equals(codeString)) + return _ACTINVOICEDETAILTAXCODE; + if ("FST".equals(codeString)) + return FST; + if ("HST".equals(codeString)) + return HST; + if ("PST".equals(codeString)) + return PST; + if ("_ActInvoiceDetailPreferredAccommodationCode".equals(codeString)) + return _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE; + if ("_ActEncounterAccommodationCode".equals(codeString)) + return _ACTENCOUNTERACCOMMODATIONCODE; + if ("_HL7AccommodationCode".equals(codeString)) + return _HL7ACCOMMODATIONCODE; + if ("I".equals(codeString)) + return I; + if ("P".equals(codeString)) + return P; + if ("S".equals(codeString)) + return S; + if ("SP".equals(codeString)) + return SP; + if ("W".equals(codeString)) + return W; + if ("_ActInvoiceDetailClinicalServiceCode".equals(codeString)) + return _ACTINVOICEDETAILCLINICALSERVICECODE; + if ("_ActInvoiceGroupCode".equals(codeString)) + return _ACTINVOICEGROUPCODE; + if ("_ActInvoiceInterGroupCode".equals(codeString)) + return _ACTINVOICEINTERGROUPCODE; + if ("CPNDDRGING".equals(codeString)) + return CPNDDRGING; + if ("CPNDINDING".equals(codeString)) + return CPNDINDING; + if ("CPNDSUPING".equals(codeString)) + return CPNDSUPING; + if ("DRUGING".equals(codeString)) + return DRUGING; + if ("FRAMEING".equals(codeString)) + return FRAMEING; + if ("LENSING".equals(codeString)) + return LENSING; + if ("PRDING".equals(codeString)) + return PRDING; + if ("_ActInvoiceRootGroupCode".equals(codeString)) + return _ACTINVOICEROOTGROUPCODE; + if ("CPINV".equals(codeString)) + return CPINV; + if ("CSINV".equals(codeString)) + return CSINV; + if ("CSPINV".equals(codeString)) + return CSPINV; + if ("FININV".equals(codeString)) + return FININV; + if ("OHSINV".equals(codeString)) + return OHSINV; + if ("PAINV".equals(codeString)) + return PAINV; + if ("RXCINV".equals(codeString)) + return RXCINV; + if ("RXDINV".equals(codeString)) + return RXDINV; + if ("SBFINV".equals(codeString)) + return SBFINV; + if ("VRXINV".equals(codeString)) + return VRXINV; + if ("_ActInvoiceElementSummaryCode".equals(codeString)) + return _ACTINVOICEELEMENTSUMMARYCODE; + if ("_InvoiceElementAdjudicated".equals(codeString)) + return _INVOICEELEMENTADJUDICATED; + if ("ADNFPPELAT".equals(codeString)) + return ADNFPPELAT; + if ("ADNFPPELCT".equals(codeString)) + return ADNFPPELCT; + if ("ADNFPPMNAT".equals(codeString)) + return ADNFPPMNAT; + if ("ADNFPPMNCT".equals(codeString)) + return ADNFPPMNCT; + if ("ADNFSPELAT".equals(codeString)) + return ADNFSPELAT; + if ("ADNFSPELCT".equals(codeString)) + return ADNFSPELCT; + if ("ADNFSPMNAT".equals(codeString)) + return ADNFSPMNAT; + if ("ADNFSPMNCT".equals(codeString)) + return ADNFSPMNCT; + if ("ADNPPPELAT".equals(codeString)) + return ADNPPPELAT; + if ("ADNPPPELCT".equals(codeString)) + return ADNPPPELCT; + if ("ADNPPPMNAT".equals(codeString)) + return ADNPPPMNAT; + if ("ADNPPPMNCT".equals(codeString)) + return ADNPPPMNCT; + if ("ADNPSPELAT".equals(codeString)) + return ADNPSPELAT; + if ("ADNPSPELCT".equals(codeString)) + return ADNPSPELCT; + if ("ADNPSPMNAT".equals(codeString)) + return ADNPSPMNAT; + if ("ADNPSPMNCT".equals(codeString)) + return ADNPSPMNCT; + if ("ADPPPPELAT".equals(codeString)) + return ADPPPPELAT; + if ("ADPPPPELCT".equals(codeString)) + return ADPPPPELCT; + if ("ADPPPPMNAT".equals(codeString)) + return ADPPPPMNAT; + if ("ADPPPPMNCT".equals(codeString)) + return ADPPPPMNCT; + if ("ADPPSPELAT".equals(codeString)) + return ADPPSPELAT; + if ("ADPPSPELCT".equals(codeString)) + return ADPPSPELCT; + if ("ADPPSPMNAT".equals(codeString)) + return ADPPSPMNAT; + if ("ADPPSPMNCT".equals(codeString)) + return ADPPSPMNCT; + if ("ADRFPPELAT".equals(codeString)) + return ADRFPPELAT; + if ("ADRFPPELCT".equals(codeString)) + return ADRFPPELCT; + if ("ADRFPPMNAT".equals(codeString)) + return ADRFPPMNAT; + if ("ADRFPPMNCT".equals(codeString)) + return ADRFPPMNCT; + if ("ADRFSPELAT".equals(codeString)) + return ADRFSPELAT; + if ("ADRFSPELCT".equals(codeString)) + return ADRFSPELCT; + if ("ADRFSPMNAT".equals(codeString)) + return ADRFSPMNAT; + if ("ADRFSPMNCT".equals(codeString)) + return ADRFSPMNCT; + if ("_InvoiceElementPaid".equals(codeString)) + return _INVOICEELEMENTPAID; + if ("PDNFPPELAT".equals(codeString)) + return PDNFPPELAT; + if ("PDNFPPELCT".equals(codeString)) + return PDNFPPELCT; + if ("PDNFPPMNAT".equals(codeString)) + return PDNFPPMNAT; + if ("PDNFPPMNCT".equals(codeString)) + return PDNFPPMNCT; + if ("PDNFSPELAT".equals(codeString)) + return PDNFSPELAT; + if ("PDNFSPELCT".equals(codeString)) + return PDNFSPELCT; + if ("PDNFSPMNAT".equals(codeString)) + return PDNFSPMNAT; + if ("PDNFSPMNCT".equals(codeString)) + return PDNFSPMNCT; + if ("PDNPPPELAT".equals(codeString)) + return PDNPPPELAT; + if ("PDNPPPELCT".equals(codeString)) + return PDNPPPELCT; + if ("PDNPPPMNAT".equals(codeString)) + return PDNPPPMNAT; + if ("PDNPPPMNCT".equals(codeString)) + return PDNPPPMNCT; + if ("PDNPSPELAT".equals(codeString)) + return PDNPSPELAT; + if ("PDNPSPELCT".equals(codeString)) + return PDNPSPELCT; + if ("PDNPSPMNAT".equals(codeString)) + return PDNPSPMNAT; + if ("PDNPSPMNCT".equals(codeString)) + return PDNPSPMNCT; + if ("PDPPPPELAT".equals(codeString)) + return PDPPPPELAT; + if ("PDPPPPELCT".equals(codeString)) + return PDPPPPELCT; + if ("PDPPPPMNAT".equals(codeString)) + return PDPPPPMNAT; + if ("PDPPPPMNCT".equals(codeString)) + return PDPPPPMNCT; + if ("PDPPSPELAT".equals(codeString)) + return PDPPSPELAT; + if ("PDPPSPELCT".equals(codeString)) + return PDPPSPELCT; + if ("PDPPSPMNAT".equals(codeString)) + return PDPPSPMNAT; + if ("PDPPSPMNCT".equals(codeString)) + return PDPPSPMNCT; + if ("_InvoiceElementSubmitted".equals(codeString)) + return _INVOICEELEMENTSUBMITTED; + if ("SBBLELAT".equals(codeString)) + return SBBLELAT; + if ("SBBLELCT".equals(codeString)) + return SBBLELCT; + if ("SBNFELAT".equals(codeString)) + return SBNFELAT; + if ("SBNFELCT".equals(codeString)) + return SBNFELCT; + if ("SBPDELAT".equals(codeString)) + return SBPDELAT; + if ("SBPDELCT".equals(codeString)) + return SBPDELCT; + if ("_ActInvoiceOverrideCode".equals(codeString)) + return _ACTINVOICEOVERRIDECODE; + if ("COVGE".equals(codeString)) + return COVGE; + if ("EFORM".equals(codeString)) + return EFORM; + if ("FAX".equals(codeString)) + return FAX; + if ("GFTH".equals(codeString)) + return GFTH; + if ("LATE".equals(codeString)) + return LATE; + if ("MANUAL".equals(codeString)) + return MANUAL; + if ("OOJ".equals(codeString)) + return OOJ; + if ("ORTHO".equals(codeString)) + return ORTHO; + if ("PAPER".equals(codeString)) + return PAPER; + if ("PIE".equals(codeString)) + return PIE; + if ("PYRDELAY".equals(codeString)) + return PYRDELAY; + if ("REFNR".equals(codeString)) + return REFNR; + if ("REPSERV".equals(codeString)) + return REPSERV; + if ("UNRELAT".equals(codeString)) + return UNRELAT; + if ("VERBAUTH".equals(codeString)) + return VERBAUTH; + if ("_ActListCode".equals(codeString)) + return _ACTLISTCODE; + if ("_ActObservationList".equals(codeString)) + return _ACTOBSERVATIONLIST; + if ("CARELIST".equals(codeString)) + return CARELIST; + if ("CONDLIST".equals(codeString)) + return CONDLIST; + if ("INTOLIST".equals(codeString)) + return INTOLIST; + if ("PROBLIST".equals(codeString)) + return PROBLIST; + if ("RISKLIST".equals(codeString)) + return RISKLIST; + if ("GOALLIST".equals(codeString)) + return GOALLIST; + if ("_ActTherapyDurationWorkingListCode".equals(codeString)) + return _ACTTHERAPYDURATIONWORKINGLISTCODE; + if ("_ActMedicationTherapyDurationWorkingListCode".equals(codeString)) + return _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE; + if ("ACU".equals(codeString)) + return ACU; + if ("CHRON".equals(codeString)) + return CHRON; + if ("ONET".equals(codeString)) + return ONET; + if ("PRN".equals(codeString)) + return PRN; + if ("MEDLIST".equals(codeString)) + return MEDLIST; + if ("CURMEDLIST".equals(codeString)) + return CURMEDLIST; + if ("DISCMEDLIST".equals(codeString)) + return DISCMEDLIST; + if ("HISTMEDLIST".equals(codeString)) + return HISTMEDLIST; + if ("_ActMonitoringProtocolCode".equals(codeString)) + return _ACTMONITORINGPROTOCOLCODE; + if ("CTLSUB".equals(codeString)) + return CTLSUB; + if ("INV".equals(codeString)) + return INV; + if ("LU".equals(codeString)) + return LU; + if ("OTC".equals(codeString)) + return OTC; + if ("RX".equals(codeString)) + return RX; + if ("SA".equals(codeString)) + return SA; + if ("SAC".equals(codeString)) + return SAC; + if ("_ActNonObservationIndicationCode".equals(codeString)) + return _ACTNONOBSERVATIONINDICATIONCODE; + if ("IND01".equals(codeString)) + return IND01; + if ("IND02".equals(codeString)) + return IND02; + if ("IND03".equals(codeString)) + return IND03; + if ("IND04".equals(codeString)) + return IND04; + if ("IND05".equals(codeString)) + return IND05; + if ("_ActObservationVerificationType".equals(codeString)) + return _ACTOBSERVATIONVERIFICATIONTYPE; + if ("VFPAPER".equals(codeString)) + return VFPAPER; + if ("_ActPaymentCode".equals(codeString)) + return _ACTPAYMENTCODE; + if ("ACH".equals(codeString)) + return ACH; + if ("CHK".equals(codeString)) + return CHK; + if ("DDP".equals(codeString)) + return DDP; + if ("NON".equals(codeString)) + return NON; + if ("_ActPharmacySupplyType".equals(codeString)) + return _ACTPHARMACYSUPPLYTYPE; + if ("DF".equals(codeString)) + return DF; + if ("EM".equals(codeString)) + return EM; + if ("SO".equals(codeString)) + return SO; + if ("FF".equals(codeString)) + return FF; + if ("FFC".equals(codeString)) + return FFC; + if ("FFP".equals(codeString)) + return FFP; + if ("FFSS".equals(codeString)) + return FFSS; + if ("TF".equals(codeString)) + return TF; + if ("FS".equals(codeString)) + return FS; + if ("MS".equals(codeString)) + return MS; + if ("RF".equals(codeString)) + return RF; + if ("UD".equals(codeString)) + return UD; + if ("RFC".equals(codeString)) + return RFC; + if ("RFCS".equals(codeString)) + return RFCS; + if ("RFF".equals(codeString)) + return RFF; + if ("RFFS".equals(codeString)) + return RFFS; + if ("RFP".equals(codeString)) + return RFP; + if ("RFPS".equals(codeString)) + return RFPS; + if ("RFS".equals(codeString)) + return RFS; + if ("TB".equals(codeString)) + return TB; + if ("TBS".equals(codeString)) + return TBS; + if ("UDE".equals(codeString)) + return UDE; + if ("_ActPolicyType".equals(codeString)) + return _ACTPOLICYTYPE; + if ("_ActPrivacyPolicy".equals(codeString)) + return _ACTPRIVACYPOLICY; + if ("_ActConsentDirective".equals(codeString)) + return _ACTCONSENTDIRECTIVE; + if ("EMRGONLY".equals(codeString)) + return EMRGONLY; + if ("GRANTORCHOICE".equals(codeString)) + return GRANTORCHOICE; + if ("IMPLIED".equals(codeString)) + return IMPLIED; + if ("IMPLIEDD".equals(codeString)) + return IMPLIEDD; + if ("NOCONSENT".equals(codeString)) + return NOCONSENT; + if ("NOPP".equals(codeString)) + return NOPP; + if ("OPTIN".equals(codeString)) + return OPTIN; + if ("OPTINR".equals(codeString)) + return OPTINR; + if ("OPTOUT".equals(codeString)) + return OPTOUT; + if ("OPTOUTE".equals(codeString)) + return OPTOUTE; + if ("_ActPrivacyLaw".equals(codeString)) + return _ACTPRIVACYLAW; + if ("_ActUSPrivacyLaw".equals(codeString)) + return _ACTUSPRIVACYLAW; + if ("42CFRPart2".equals(codeString)) + return _42CFRPART2; + if ("CommonRule".equals(codeString)) + return COMMONRULE; + if ("HIPAANOPP".equals(codeString)) + return HIPAANOPP; + if ("HIPAAPsyNotes".equals(codeString)) + return HIPAAPSYNOTES; + if ("HIPAASelfPay".equals(codeString)) + return HIPAASELFPAY; + if ("Title38Section7332".equals(codeString)) + return TITLE38SECTION7332; + if ("_InformationSensitivityPolicy".equals(codeString)) + return _INFORMATIONSENSITIVITYPOLICY; + if ("_ActInformationSensitivityPolicy".equals(codeString)) + return _ACTINFORMATIONSENSITIVITYPOLICY; + if ("ETH".equals(codeString)) + return ETH; + if ("GDIS".equals(codeString)) + return GDIS; + if ("HIV".equals(codeString)) + return HIV; + if ("PSY".equals(codeString)) + return PSY; + if ("SCA".equals(codeString)) + return SCA; + if ("SOC".equals(codeString)) + return SOC; + if ("SDV".equals(codeString)) + return SDV; + if ("SEX".equals(codeString)) + return SEX; + if ("STD".equals(codeString)) + return STD; + if ("TBOO".equals(codeString)) + return TBOO; + if ("SICKLE".equals(codeString)) + return SICKLE; + if ("_EntitySensitivityPolicyType".equals(codeString)) + return _ENTITYSENSITIVITYPOLICYTYPE; + if ("DEMO".equals(codeString)) + return DEMO; + if ("DOB".equals(codeString)) + return DOB; + if ("GENDER".equals(codeString)) + return GENDER; + if ("LIVARG".equals(codeString)) + return LIVARG; + if ("MARST".equals(codeString)) + return MARST; + if ("RACE".equals(codeString)) + return RACE; + if ("REL".equals(codeString)) + return REL; + if ("_RoleInformationSensitivityPolicy".equals(codeString)) + return _ROLEINFORMATIONSENSITIVITYPOLICY; + if ("B".equals(codeString)) + return B; + if ("EMPL".equals(codeString)) + return EMPL; + if ("LOCIS".equals(codeString)) + return LOCIS; + if ("SSP".equals(codeString)) + return SSP; + if ("ADOL".equals(codeString)) + return ADOL; + if ("CEL".equals(codeString)) + return CEL; + if ("DIA".equals(codeString)) + return DIA; + if ("DRGIS".equals(codeString)) + return DRGIS; + if ("EMP".equals(codeString)) + return EMP; + if ("PDS".equals(codeString)) + return PDS; + if ("PRS".equals(codeString)) + return PRS; + if ("COMPT".equals(codeString)) + return COMPT; + if ("ACOCOMPT".equals(codeString)) + return ACOCOMPT; + if ("CTCOMPT".equals(codeString)) + return CTCOMPT; + if ("FMCOMPT".equals(codeString)) + return FMCOMPT; + if ("HRCOMPT".equals(codeString)) + return HRCOMPT; + if ("LRCOMPT".equals(codeString)) + return LRCOMPT; + if ("PACOMPT".equals(codeString)) + return PACOMPT; + if ("RESCOMPT".equals(codeString)) + return RESCOMPT; + if ("RMGTCOMPT".equals(codeString)) + return RMGTCOMPT; + if ("ActTrustPolicyType".equals(codeString)) + return ACTTRUSTPOLICYTYPE; + if ("TRSTACCRD".equals(codeString)) + return TRSTACCRD; + if ("TRSTAGRE".equals(codeString)) + return TRSTAGRE; + if ("TRSTASSUR".equals(codeString)) + return TRSTASSUR; + if ("TRSTCERT".equals(codeString)) + return TRSTCERT; + if ("TRSTFWK".equals(codeString)) + return TRSTFWK; + if ("TRSTMEC".equals(codeString)) + return TRSTMEC; + if ("COVPOL".equals(codeString)) + return COVPOL; + if ("SecurityPolicy".equals(codeString)) + return SECURITYPOLICY; + if ("ObligationPolicy".equals(codeString)) + return OBLIGATIONPOLICY; + if ("ANONY".equals(codeString)) + return ANONY; + if ("AOD".equals(codeString)) + return AOD; + if ("AUDIT".equals(codeString)) + return AUDIT; + if ("AUDTR".equals(codeString)) + return AUDTR; + if ("CPLYCC".equals(codeString)) + return CPLYCC; + if ("CPLYCD".equals(codeString)) + return CPLYCD; + if ("CPLYJPP".equals(codeString)) + return CPLYJPP; + if ("CPLYOPP".equals(codeString)) + return CPLYOPP; + if ("CPLYOSP".equals(codeString)) + return CPLYOSP; + if ("CPLYPOL".equals(codeString)) + return CPLYPOL; + if ("DECLASSIFYLABEL".equals(codeString)) + return DECLASSIFYLABEL; + if ("DEID".equals(codeString)) + return DEID; + if ("DELAU".equals(codeString)) + return DELAU; + if ("DOWNGRDLABEL".equals(codeString)) + return DOWNGRDLABEL; + if ("DRIVLABEL".equals(codeString)) + return DRIVLABEL; + if ("ENCRYPT".equals(codeString)) + return ENCRYPT; + if ("ENCRYPTR".equals(codeString)) + return ENCRYPTR; + if ("ENCRYPTT".equals(codeString)) + return ENCRYPTT; + if ("ENCRYPTU".equals(codeString)) + return ENCRYPTU; + if ("HUAPRV".equals(codeString)) + return HUAPRV; + if ("LABEL".equals(codeString)) + return LABEL; + if ("MASK".equals(codeString)) + return MASK; + if ("MINEC".equals(codeString)) + return MINEC; + if ("PERSISTLABEL".equals(codeString)) + return PERSISTLABEL; + if ("PRIVMARK".equals(codeString)) + return PRIVMARK; + if ("PSEUD".equals(codeString)) + return PSEUD; + if ("REDACT".equals(codeString)) + return REDACT; + if ("UPGRDLABEL".equals(codeString)) + return UPGRDLABEL; + if ("RefrainPolicy".equals(codeString)) + return REFRAINPOLICY; + if ("NOAUTH".equals(codeString)) + return NOAUTH; + if ("NOCOLLECT".equals(codeString)) + return NOCOLLECT; + if ("NODSCLCD".equals(codeString)) + return NODSCLCD; + if ("NODSCLCDS".equals(codeString)) + return NODSCLCDS; + if ("NOINTEGRATE".equals(codeString)) + return NOINTEGRATE; + if ("NOLIST".equals(codeString)) + return NOLIST; + if ("NOMOU".equals(codeString)) + return NOMOU; + if ("NOORGPOL".equals(codeString)) + return NOORGPOL; + if ("NOPAT".equals(codeString)) + return NOPAT; + if ("NOPERSISTP".equals(codeString)) + return NOPERSISTP; + if ("NORDSCLCD".equals(codeString)) + return NORDSCLCD; + if ("NORDSCLCDS".equals(codeString)) + return NORDSCLCDS; + if ("NORDSCLW".equals(codeString)) + return NORDSCLW; + if ("NORELINK".equals(codeString)) + return NORELINK; + if ("NOREUSE".equals(codeString)) + return NOREUSE; + if ("NOVIP".equals(codeString)) + return NOVIP; + if ("ORCON".equals(codeString)) + return ORCON; + if ("_ActProductAcquisitionCode".equals(codeString)) + return _ACTPRODUCTACQUISITIONCODE; + if ("LOAN".equals(codeString)) + return LOAN; + if ("RENT".equals(codeString)) + return RENT; + if ("TRANSFER".equals(codeString)) + return TRANSFER; + if ("SALE".equals(codeString)) + return SALE; + if ("_ActSpecimenTransportCode".equals(codeString)) + return _ACTSPECIMENTRANSPORTCODE; + if ("SREC".equals(codeString)) + return SREC; + if ("SSTOR".equals(codeString)) + return SSTOR; + if ("STRAN".equals(codeString)) + return STRAN; + if ("_ActSpecimenTreatmentCode".equals(codeString)) + return _ACTSPECIMENTREATMENTCODE; + if ("ACID".equals(codeString)) + return ACID; + if ("ALK".equals(codeString)) + return ALK; + if ("DEFB".equals(codeString)) + return DEFB; + if ("FILT".equals(codeString)) + return FILT; + if ("LDLP".equals(codeString)) + return LDLP; + if ("NEUT".equals(codeString)) + return NEUT; + if ("RECA".equals(codeString)) + return RECA; + if ("UFIL".equals(codeString)) + return UFIL; + if ("_ActSubstanceAdministrationCode".equals(codeString)) + return _ACTSUBSTANCEADMINISTRATIONCODE; + if ("DRUG".equals(codeString)) + return DRUG; + if ("FD".equals(codeString)) + return FD; + if ("IMMUNIZ".equals(codeString)) + return IMMUNIZ; + if ("BOOSTER".equals(codeString)) + return BOOSTER; + if ("INITIMMUNIZ".equals(codeString)) + return INITIMMUNIZ; + if ("_ActTaskCode".equals(codeString)) + return _ACTTASKCODE; + if ("OE".equals(codeString)) + return OE; + if ("LABOE".equals(codeString)) + return LABOE; + if ("MEDOE".equals(codeString)) + return MEDOE; + if ("PATDOC".equals(codeString)) + return PATDOC; + if ("ALLERLREV".equals(codeString)) + return ALLERLREV; + if ("CLINNOTEE".equals(codeString)) + return CLINNOTEE; + if ("DIAGLISTE".equals(codeString)) + return DIAGLISTE; + if ("DISCHINSTE".equals(codeString)) + return DISCHINSTE; + if ("DISCHSUME".equals(codeString)) + return DISCHSUME; + if ("PATEDUE".equals(codeString)) + return PATEDUE; + if ("PATREPE".equals(codeString)) + return PATREPE; + if ("PROBLISTE".equals(codeString)) + return PROBLISTE; + if ("RADREPE".equals(codeString)) + return RADREPE; + if ("IMMLREV".equals(codeString)) + return IMMLREV; + if ("REMLREV".equals(codeString)) + return REMLREV; + if ("WELLREMLREV".equals(codeString)) + return WELLREMLREV; + if ("PATINFO".equals(codeString)) + return PATINFO; + if ("ALLERLE".equals(codeString)) + return ALLERLE; + if ("CDSREV".equals(codeString)) + return CDSREV; + if ("CLINNOTEREV".equals(codeString)) + return CLINNOTEREV; + if ("DISCHSUMREV".equals(codeString)) + return DISCHSUMREV; + if ("DIAGLISTREV".equals(codeString)) + return DIAGLISTREV; + if ("IMMLE".equals(codeString)) + return IMMLE; + if ("LABRREV".equals(codeString)) + return LABRREV; + if ("MICRORREV".equals(codeString)) + return MICRORREV; + if ("MICROORGRREV".equals(codeString)) + return MICROORGRREV; + if ("MICROSENSRREV".equals(codeString)) + return MICROSENSRREV; + if ("MLREV".equals(codeString)) + return MLREV; + if ("MARWLREV".equals(codeString)) + return MARWLREV; + if ("OREV".equals(codeString)) + return OREV; + if ("PATREPREV".equals(codeString)) + return PATREPREV; + if ("PROBLISTREV".equals(codeString)) + return PROBLISTREV; + if ("RADREPREV".equals(codeString)) + return RADREPREV; + if ("REMLE".equals(codeString)) + return REMLE; + if ("WELLREMLE".equals(codeString)) + return WELLREMLE; + if ("RISKASSESS".equals(codeString)) + return RISKASSESS; + if ("FALLRISK".equals(codeString)) + return FALLRISK; + if ("_ActTransportationModeCode".equals(codeString)) + return _ACTTRANSPORTATIONMODECODE; + if ("_ActPatientTransportationModeCode".equals(codeString)) + return _ACTPATIENTTRANSPORTATIONMODECODE; + if ("AFOOT".equals(codeString)) + return AFOOT; + if ("AMBT".equals(codeString)) + return AMBT; + if ("AMBAIR".equals(codeString)) + return AMBAIR; + if ("AMBGRND".equals(codeString)) + return AMBGRND; + if ("AMBHELO".equals(codeString)) + return AMBHELO; + if ("LAWENF".equals(codeString)) + return LAWENF; + if ("PRVTRN".equals(codeString)) + return PRVTRN; + if ("PUBTRN".equals(codeString)) + return PUBTRN; + if ("_ObservationType".equals(codeString)) + return _OBSERVATIONTYPE; + if ("_ActSpecObsCode".equals(codeString)) + return _ACTSPECOBSCODE; + if ("ARTBLD".equals(codeString)) + return ARTBLD; + if ("DILUTION".equals(codeString)) + return DILUTION; + if ("AUTO-HIGH".equals(codeString)) + return AUTOHIGH; + if ("AUTO-LOW".equals(codeString)) + return AUTOLOW; + if ("PRE".equals(codeString)) + return PRE; + if ("RERUN".equals(codeString)) + return RERUN; + if ("EVNFCTS".equals(codeString)) + return EVNFCTS; + if ("INTFR".equals(codeString)) + return INTFR; + if ("FIBRIN".equals(codeString)) + return FIBRIN; + if ("HEMOLYSIS".equals(codeString)) + return HEMOLYSIS; + if ("ICTERUS".equals(codeString)) + return ICTERUS; + if ("LIPEMIA".equals(codeString)) + return LIPEMIA; + if ("VOLUME".equals(codeString)) + return VOLUME; + if ("AVAILABLE".equals(codeString)) + return AVAILABLE; + if ("CONSUMPTION".equals(codeString)) + return CONSUMPTION; + if ("CURRENT".equals(codeString)) + return CURRENT; + if ("INITIAL".equals(codeString)) + return INITIAL; + if ("_AnnotationType".equals(codeString)) + return _ANNOTATIONTYPE; + if ("_ActPatientAnnotationType".equals(codeString)) + return _ACTPATIENTANNOTATIONTYPE; + if ("ANNDI".equals(codeString)) + return ANNDI; + if ("ANNGEN".equals(codeString)) + return ANNGEN; + if ("ANNIMM".equals(codeString)) + return ANNIMM; + if ("ANNLAB".equals(codeString)) + return ANNLAB; + if ("ANNMED".equals(codeString)) + return ANNMED; + if ("_GeneticObservationType".equals(codeString)) + return _GENETICOBSERVATIONTYPE; + if ("GENE".equals(codeString)) + return GENE; + if ("_ImmunizationObservationType".equals(codeString)) + return _IMMUNIZATIONOBSERVATIONTYPE; + if ("OBSANTC".equals(codeString)) + return OBSANTC; + if ("OBSANTV".equals(codeString)) + return OBSANTV; + if ("_IndividualCaseSafetyReportType".equals(codeString)) + return _INDIVIDUALCASESAFETYREPORTTYPE; + if ("PAT_ADV_EVNT".equals(codeString)) + return PATADVEVNT; + if ("VAC_PROBLEM".equals(codeString)) + return VACPROBLEM; + if ("_LOINCObservationActContextAgeType".equals(codeString)) + return _LOINCOBSERVATIONACTCONTEXTAGETYPE; + if ("21611-9".equals(codeString)) + return _216119; + if ("21612-7".equals(codeString)) + return _216127; + if ("29553-5".equals(codeString)) + return _295535; + if ("30525-0".equals(codeString)) + return _305250; + if ("30972-4".equals(codeString)) + return _309724; + if ("_MedicationObservationType".equals(codeString)) + return _MEDICATIONOBSERVATIONTYPE; + if ("REP_HALF_LIFE".equals(codeString)) + return REPHALFLIFE; + if ("SPLCOATING".equals(codeString)) + return SPLCOATING; + if ("SPLCOLOR".equals(codeString)) + return SPLCOLOR; + if ("SPLIMAGE".equals(codeString)) + return SPLIMAGE; + if ("SPLIMPRINT".equals(codeString)) + return SPLIMPRINT; + if ("SPLSCORING".equals(codeString)) + return SPLSCORING; + if ("SPLSHAPE".equals(codeString)) + return SPLSHAPE; + if ("SPLSIZE".equals(codeString)) + return SPLSIZE; + if ("SPLSYMBOL".equals(codeString)) + return SPLSYMBOL; + if ("_ObservationIssueTriggerCodedObservationType".equals(codeString)) + return _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE; + if ("_CaseTransmissionMode".equals(codeString)) + return _CASETRANSMISSIONMODE; + if ("AIRTRNS".equals(codeString)) + return AIRTRNS; + if ("ANANTRNS".equals(codeString)) + return ANANTRNS; + if ("ANHUMTRNS".equals(codeString)) + return ANHUMTRNS; + if ("BDYFLDTRNS".equals(codeString)) + return BDYFLDTRNS; + if ("BLDTRNS".equals(codeString)) + return BLDTRNS; + if ("DERMTRNS".equals(codeString)) + return DERMTRNS; + if ("ENVTRNS".equals(codeString)) + return ENVTRNS; + if ("FECTRNS".equals(codeString)) + return FECTRNS; + if ("FOMTRNS".equals(codeString)) + return FOMTRNS; + if ("FOODTRNS".equals(codeString)) + return FOODTRNS; + if ("HUMHUMTRNS".equals(codeString)) + return HUMHUMTRNS; + if ("INDTRNS".equals(codeString)) + return INDTRNS; + if ("LACTTRNS".equals(codeString)) + return LACTTRNS; + if ("NOSTRNS".equals(codeString)) + return NOSTRNS; + if ("PARTRNS".equals(codeString)) + return PARTRNS; + if ("PLACTRNS".equals(codeString)) + return PLACTRNS; + if ("SEXTRNS".equals(codeString)) + return SEXTRNS; + if ("TRNSFTRNS".equals(codeString)) + return TRNSFTRNS; + if ("VECTRNS".equals(codeString)) + return VECTRNS; + if ("WATTRNS".equals(codeString)) + return WATTRNS; + if ("_ObservationQualityMeasureAttribute".equals(codeString)) + return _OBSERVATIONQUALITYMEASUREATTRIBUTE; + if ("AGGREGATE".equals(codeString)) + return AGGREGATE; + if ("CMPMSRMTH".equals(codeString)) + return CMPMSRMTH; + if ("CMPMSRSCRWGHT".equals(codeString)) + return CMPMSRSCRWGHT; + if ("COPY".equals(codeString)) + return COPY; + if ("CRS".equals(codeString)) + return CRS; + if ("DEF".equals(codeString)) + return DEF; + if ("DISC".equals(codeString)) + return DISC; + if ("FINALDT".equals(codeString)) + return FINALDT; + if ("GUIDE".equals(codeString)) + return GUIDE; + if ("IDUR".equals(codeString)) + return IDUR; + if ("ITMCNT".equals(codeString)) + return ITMCNT; + if ("KEY".equals(codeString)) + return KEY; + if ("MEDT".equals(codeString)) + return MEDT; + if ("MSD".equals(codeString)) + return MSD; + if ("MSRADJ".equals(codeString)) + return MSRADJ; + if ("MSRAGG".equals(codeString)) + return MSRAGG; + if ("MSRIMPROV".equals(codeString)) + return MSRIMPROV; + if ("MSRJUR".equals(codeString)) + return MSRJUR; + if ("MSRRPTR".equals(codeString)) + return MSRRPTR; + if ("MSRRPTTIME".equals(codeString)) + return MSRRPTTIME; + if ("MSRSCORE".equals(codeString)) + return MSRSCORE; + if ("MSRSET".equals(codeString)) + return MSRSET; + if ("MSRTOPIC".equals(codeString)) + return MSRTOPIC; + if ("MSRTP".equals(codeString)) + return MSRTP; + if ("MSRTYPE".equals(codeString)) + return MSRTYPE; + if ("RAT".equals(codeString)) + return RAT; + if ("REF".equals(codeString)) + return REF; + if ("SDE".equals(codeString)) + return SDE; + if ("STRAT".equals(codeString)) + return STRAT; + if ("TRANF".equals(codeString)) + return TRANF; + if ("USE".equals(codeString)) + return USE; + if ("_ObservationSequenceType".equals(codeString)) + return _OBSERVATIONSEQUENCETYPE; + if ("TIME_ABSOLUTE".equals(codeString)) + return TIMEABSOLUTE; + if ("TIME_RELATIVE".equals(codeString)) + return TIMERELATIVE; + if ("_ObservationSeriesType".equals(codeString)) + return _OBSERVATIONSERIESTYPE; + if ("_ECGObservationSeriesType".equals(codeString)) + return _ECGOBSERVATIONSERIESTYPE; + if ("REPRESENTATIVE_BEAT".equals(codeString)) + return REPRESENTATIVEBEAT; + if ("RHYTHM".equals(codeString)) + return RHYTHM; + if ("_PatientImmunizationRelatedObservationType".equals(codeString)) + return _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE; + if ("CLSSRM".equals(codeString)) + return CLSSRM; + if ("GRADE".equals(codeString)) + return GRADE; + if ("SCHL".equals(codeString)) + return SCHL; + if ("SCHLDIV".equals(codeString)) + return SCHLDIV; + if ("TEACHER".equals(codeString)) + return TEACHER; + if ("_PopulationInclusionObservationType".equals(codeString)) + return _POPULATIONINCLUSIONOBSERVATIONTYPE; + if ("DENEX".equals(codeString)) + return DENEX; + if ("DENEXCEP".equals(codeString)) + return DENEXCEP; + if ("DENOM".equals(codeString)) + return DENOM; + if ("IPOP".equals(codeString)) + return IPOP; + if ("IPPOP".equals(codeString)) + return IPPOP; + if ("MSRPOPL".equals(codeString)) + return MSRPOPL; + if ("MSRPOPLEX".equals(codeString)) + return MSRPOPLEX; + if ("NUMER".equals(codeString)) + return NUMER; + if ("NUMEX".equals(codeString)) + return NUMEX; + if ("_PreferenceObservationType".equals(codeString)) + return _PREFERENCEOBSERVATIONTYPE; + if ("PREFSTRENGTH".equals(codeString)) + return PREFSTRENGTH; + if ("ADVERSE_REACTION".equals(codeString)) + return ADVERSEREACTION; + if ("ASSERTION".equals(codeString)) + return ASSERTION; + if ("CASESER".equals(codeString)) + return CASESER; + if ("CDIO".equals(codeString)) + return CDIO; + if ("CRIT".equals(codeString)) + return CRIT; + if ("CTMO".equals(codeString)) + return CTMO; + if ("DX".equals(codeString)) + return DX; + if ("ADMDX".equals(codeString)) + return ADMDX; + if ("DISDX".equals(codeString)) + return DISDX; + if ("INTDX".equals(codeString)) + return INTDX; + if ("NOI".equals(codeString)) + return NOI; + if ("GISTIER".equals(codeString)) + return GISTIER; + if ("HHOBS".equals(codeString)) + return HHOBS; + if ("ISSUE".equals(codeString)) + return ISSUE; + if ("_ActAdministrativeDetectedIssueCode".equals(codeString)) + return _ACTADMINISTRATIVEDETECTEDISSUECODE; + if ("_ActAdministrativeAuthorizationDetectedIssueCode".equals(codeString)) + return _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE; + if ("NAT".equals(codeString)) + return NAT; + if ("SUPPRESSED".equals(codeString)) + return SUPPRESSED; + if ("VALIDAT".equals(codeString)) + return VALIDAT; + if ("KEY204".equals(codeString)) + return KEY204; + if ("KEY205".equals(codeString)) + return KEY205; + if ("COMPLY".equals(codeString)) + return COMPLY; + if ("DUPTHPY".equals(codeString)) + return DUPTHPY; + if ("DUPTHPCLS".equals(codeString)) + return DUPTHPCLS; + if ("DUPTHPGEN".equals(codeString)) + return DUPTHPGEN; + if ("ABUSE".equals(codeString)) + return ABUSE; + if ("FRAUD".equals(codeString)) + return FRAUD; + if ("PLYDOC".equals(codeString)) + return PLYDOC; + if ("PLYPHRM".equals(codeString)) + return PLYPHRM; + if ("DOSE".equals(codeString)) + return DOSE; + if ("DOSECOND".equals(codeString)) + return DOSECOND; + if ("DOSEDUR".equals(codeString)) + return DOSEDUR; + if ("DOSEDURH".equals(codeString)) + return DOSEDURH; + if ("DOSEDURHIND".equals(codeString)) + return DOSEDURHIND; + if ("DOSEDURL".equals(codeString)) + return DOSEDURL; + if ("DOSEDURLIND".equals(codeString)) + return DOSEDURLIND; + if ("DOSEH".equals(codeString)) + return DOSEH; + if ("DOSEHINDA".equals(codeString)) + return DOSEHINDA; + if ("DOSEHIND".equals(codeString)) + return DOSEHIND; + if ("DOSEHINDSA".equals(codeString)) + return DOSEHINDSA; + if ("DOSEHINDW".equals(codeString)) + return DOSEHINDW; + if ("DOSEIVL".equals(codeString)) + return DOSEIVL; + if ("DOSEIVLIND".equals(codeString)) + return DOSEIVLIND; + if ("DOSEL".equals(codeString)) + return DOSEL; + if ("DOSELINDA".equals(codeString)) + return DOSELINDA; + if ("DOSELIND".equals(codeString)) + return DOSELIND; + if ("DOSELINDSA".equals(codeString)) + return DOSELINDSA; + if ("DOSELINDW".equals(codeString)) + return DOSELINDW; + if ("MDOSE".equals(codeString)) + return MDOSE; + if ("OBSA".equals(codeString)) + return OBSA; + if ("AGE".equals(codeString)) + return AGE; + if ("ADALRT".equals(codeString)) + return ADALRT; + if ("GEALRT".equals(codeString)) + return GEALRT; + if ("PEALRT".equals(codeString)) + return PEALRT; + if ("COND".equals(codeString)) + return COND; + if ("HGHT".equals(codeString)) + return HGHT; + if ("LACT".equals(codeString)) + return LACT; + if ("PREG".equals(codeString)) + return PREG; + if ("WGHT".equals(codeString)) + return WGHT; + if ("CREACT".equals(codeString)) + return CREACT; + if ("GEN".equals(codeString)) + return GEN; + if ("GEND".equals(codeString)) + return GEND; + if ("LAB".equals(codeString)) + return LAB; + if ("REACT".equals(codeString)) + return REACT; + if ("ALGY".equals(codeString)) + return ALGY; + if ("INT".equals(codeString)) + return INT; + if ("RREACT".equals(codeString)) + return RREACT; + if ("RALG".equals(codeString)) + return RALG; + if ("RAR".equals(codeString)) + return RAR; + if ("RINT".equals(codeString)) + return RINT; + if ("BUS".equals(codeString)) + return BUS; + if ("CODE_INVAL".equals(codeString)) + return CODEINVAL; + if ("CODE_DEPREC".equals(codeString)) + return CODEDEPREC; + if ("FORMAT".equals(codeString)) + return FORMAT; + if ("ILLEGAL".equals(codeString)) + return ILLEGAL; + if ("LEN_RANGE".equals(codeString)) + return LENRANGE; + if ("LEN_LONG".equals(codeString)) + return LENLONG; + if ("LEN_SHORT".equals(codeString)) + return LENSHORT; + if ("MISSCOND".equals(codeString)) + return MISSCOND; + if ("MISSMAND".equals(codeString)) + return MISSMAND; + if ("NODUPS".equals(codeString)) + return NODUPS; + if ("NOPERSIST".equals(codeString)) + return NOPERSIST; + if ("REP_RANGE".equals(codeString)) + return REPRANGE; + if ("MAXOCCURS".equals(codeString)) + return MAXOCCURS; + if ("MINOCCURS".equals(codeString)) + return MINOCCURS; + if ("_ActAdministrativeRuleDetectedIssueCode".equals(codeString)) + return _ACTADMINISTRATIVERULEDETECTEDISSUECODE; + if ("KEY206".equals(codeString)) + return KEY206; + if ("OBSOLETE".equals(codeString)) + return OBSOLETE; + if ("_ActSuppliedItemDetectedIssueCode".equals(codeString)) + return _ACTSUPPLIEDITEMDETECTEDISSUECODE; + if ("_AdministrationDetectedIssueCode".equals(codeString)) + return _ADMINISTRATIONDETECTEDISSUECODE; + if ("_AppropriatenessDetectedIssueCode".equals(codeString)) + return _APPROPRIATENESSDETECTEDISSUECODE; + if ("_InteractionDetectedIssueCode".equals(codeString)) + return _INTERACTIONDETECTEDISSUECODE; + if ("FOOD".equals(codeString)) + return FOOD; + if ("TPROD".equals(codeString)) + return TPROD; + if ("DRG".equals(codeString)) + return DRG; + if ("NHP".equals(codeString)) + return NHP; + if ("NONRX".equals(codeString)) + return NONRX; + if ("PREVINEF".equals(codeString)) + return PREVINEF; + if ("DACT".equals(codeString)) + return DACT; + if ("TIME".equals(codeString)) + return TIME; + if ("ALRTENDLATE".equals(codeString)) + return ALRTENDLATE; + if ("ALRTSTRTLATE".equals(codeString)) + return ALRTSTRTLATE; + if ("_TimingDetectedIssueCode".equals(codeString)) + return _TIMINGDETECTEDISSUECODE; + if ("ENDLATE".equals(codeString)) + return ENDLATE; + if ("STRTLATE".equals(codeString)) + return STRTLATE; + if ("_SupplyDetectedIssueCode".equals(codeString)) + return _SUPPLYDETECTEDISSUECODE; + if ("ALLDONE".equals(codeString)) + return ALLDONE; + if ("FULFIL".equals(codeString)) + return FULFIL; + if ("NOTACTN".equals(codeString)) + return NOTACTN; + if ("NOTEQUIV".equals(codeString)) + return NOTEQUIV; + if ("NOTEQUIVGEN".equals(codeString)) + return NOTEQUIVGEN; + if ("NOTEQUIVTHER".equals(codeString)) + return NOTEQUIVTHER; + if ("TIMING".equals(codeString)) + return TIMING; + if ("INTERVAL".equals(codeString)) + return INTERVAL; + if ("MINFREQ".equals(codeString)) + return MINFREQ; + if ("HELD".equals(codeString)) + return HELD; + if ("TOOLATE".equals(codeString)) + return TOOLATE; + if ("TOOSOON".equals(codeString)) + return TOOSOON; + if ("HISTORIC".equals(codeString)) + return HISTORIC; + if ("PATPREF".equals(codeString)) + return PATPREF; + if ("PATPREFALT".equals(codeString)) + return PATPREFALT; + if ("KSUBJ".equals(codeString)) + return KSUBJ; + if ("KSUBT".equals(codeString)) + return KSUBT; + if ("OINT".equals(codeString)) + return OINT; + if ("ALG".equals(codeString)) + return ALG; + if ("DALG".equals(codeString)) + return DALG; + if ("EALG".equals(codeString)) + return EALG; + if ("FALG".equals(codeString)) + return FALG; + if ("DINT".equals(codeString)) + return DINT; + if ("DNAINT".equals(codeString)) + return DNAINT; + if ("EINT".equals(codeString)) + return EINT; + if ("ENAINT".equals(codeString)) + return ENAINT; + if ("FINT".equals(codeString)) + return FINT; + if ("FNAINT".equals(codeString)) + return FNAINT; + if ("NAINT".equals(codeString)) + return NAINT; + if ("SEV".equals(codeString)) + return SEV; + if ("_FDALabelData".equals(codeString)) + return _FDALABELDATA; + if ("FDACOATING".equals(codeString)) + return FDACOATING; + if ("FDACOLOR".equals(codeString)) + return FDACOLOR; + if ("FDAIMPRINTCD".equals(codeString)) + return FDAIMPRINTCD; + if ("FDALOGO".equals(codeString)) + return FDALOGO; + if ("FDASCORING".equals(codeString)) + return FDASCORING; + if ("FDASHAPE".equals(codeString)) + return FDASHAPE; + if ("FDASIZE".equals(codeString)) + return FDASIZE; + if ("_ROIOverlayShape".equals(codeString)) + return _ROIOVERLAYSHAPE; + if ("CIRCLE".equals(codeString)) + return CIRCLE; + if ("ELLIPSE".equals(codeString)) + return ELLIPSE; + if ("POINT".equals(codeString)) + return POINT; + if ("POLY".equals(codeString)) + return POLY; + if ("C".equals(codeString)) + return C; + if ("DIET".equals(codeString)) + return DIET; + if ("BR".equals(codeString)) + return BR; + if ("DM".equals(codeString)) + return DM; + if ("FAST".equals(codeString)) + return FAST; + if ("FORMULA".equals(codeString)) + return FORMULA; + if ("GF".equals(codeString)) + return GF; + if ("LF".equals(codeString)) + return LF; + if ("LP".equals(codeString)) + return LP; + if ("LQ".equals(codeString)) + return LQ; + if ("LS".equals(codeString)) + return LS; + if ("N".equals(codeString)) + return N; + if ("NF".equals(codeString)) + return NF; + if ("PAF".equals(codeString)) + return PAF; + if ("PAR".equals(codeString)) + return PAR; + if ("RD".equals(codeString)) + return RD; + if ("SCH".equals(codeString)) + return SCH; + if ("SUPPLEMENT".equals(codeString)) + return SUPPLEMENT; + if ("T".equals(codeString)) + return T; + if ("VLI".equals(codeString)) + return VLI; + if ("DRUGPRG".equals(codeString)) + return DRUGPRG; + if ("F".equals(codeString)) + return F; + if ("PRLMN".equals(codeString)) + return PRLMN; + if ("SECOBS".equals(codeString)) + return SECOBS; + if ("SECCATOBS".equals(codeString)) + return SECCATOBS; + if ("SECCLASSOBS".equals(codeString)) + return SECCLASSOBS; + if ("SECCONOBS".equals(codeString)) + return SECCONOBS; + if ("SECINTOBS".equals(codeString)) + return SECINTOBS; + if ("SECALTINTOBS".equals(codeString)) + return SECALTINTOBS; + if ("SECDATINTOBS".equals(codeString)) + return SECDATINTOBS; + if ("SECINTCONOBS".equals(codeString)) + return SECINTCONOBS; + if ("SECINTPRVOBS".equals(codeString)) + return SECINTPRVOBS; + if ("SECINTPRVABOBS".equals(codeString)) + return SECINTPRVABOBS; + if ("SECINTPRVRBOBS".equals(codeString)) + return SECINTPRVRBOBS; + if ("SECINTSTOBS".equals(codeString)) + return SECINTSTOBS; + if ("SECTRSTOBS".equals(codeString)) + return SECTRSTOBS; + if ("TRSTACCRDOBS".equals(codeString)) + return TRSTACCRDOBS; + if ("TRSTAGREOBS".equals(codeString)) + return TRSTAGREOBS; + if ("TRSTCERTOBS".equals(codeString)) + return TRSTCERTOBS; + if ("TRSTFWKOBS".equals(codeString)) + return TRSTFWKOBS; + if ("TRSTLOAOBS".equals(codeString)) + return TRSTLOAOBS; + if ("TRSTMECOBS".equals(codeString)) + return TRSTMECOBS; + if ("SUBSIDFFS".equals(codeString)) + return SUBSIDFFS; + if ("WRKCOMP".equals(codeString)) + return WRKCOMP; + if ("_ActProcedureCode".equals(codeString)) + return _ACTPROCEDURECODE; + if ("_ActBillableServiceCode".equals(codeString)) + return _ACTBILLABLESERVICECODE; + if ("_HL7DefinedActCodes".equals(codeString)) + return _HL7DEFINEDACTCODES; + if ("COPAY".equals(codeString)) + return COPAY; + if ("DEDUCT".equals(codeString)) + return DEDUCT; + if ("DOSEIND".equals(codeString)) + return DOSEIND; + if ("PRA".equals(codeString)) + return PRA; + if ("STORE".equals(codeString)) + return STORE; + throw new FHIRException("Unknown V3ActCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTACCOUNTCODE: return "_ActAccountCode"; + case ACCTRECEIVABLE: return "ACCTRECEIVABLE"; + case CASH: return "CASH"; + case CC: return "CC"; + case AE: return "AE"; + case DN: return "DN"; + case DV: return "DV"; + case MC: return "MC"; + case V: return "V"; + case PBILLACCT: return "PBILLACCT"; + case _ACTADJUDICATIONCODE: return "_ActAdjudicationCode"; + case _ACTADJUDICATIONGROUPCODE: return "_ActAdjudicationGroupCode"; + case CONT: return "CONT"; + case DAY: return "DAY"; + case LOC: return "LOC"; + case MONTH: return "MONTH"; + case PERIOD: return "PERIOD"; + case PROV: return "PROV"; + case WEEK: return "WEEK"; + case YEAR: return "YEAR"; + case AA: return "AA"; + case ANF: return "ANF"; + case AR: return "AR"; + case AS: return "AS"; + case _ACTADJUDICATIONRESULTACTIONCODE: return "_ActAdjudicationResultActionCode"; + case DISPLAY: return "DISPLAY"; + case FORM: return "FORM"; + case _ACTBILLABLEMODIFIERCODE: return "_ActBillableModifierCode"; + case CPTM: return "CPTM"; + case HCPCSA: return "HCPCSA"; + case _ACTBILLINGARRANGEMENTCODE: return "_ActBillingArrangementCode"; + case BLK: return "BLK"; + case CAP: return "CAP"; + case CONTF: return "CONTF"; + case FINBILL: return "FINBILL"; + case ROST: return "ROST"; + case SESS: return "SESS"; + case FFS: return "FFS"; + case FFPS: return "FFPS"; + case FFCS: return "FFCS"; + case TFS: return "TFS"; + case _ACTBOUNDEDROICODE: return "_ActBoundedROICode"; + case ROIFS: return "ROIFS"; + case ROIPS: return "ROIPS"; + case _ACTCAREPROVISIONCODE: return "_ActCareProvisionCode"; + case _ACTCREDENTIALEDCARECODE: return "_ActCredentialedCareCode"; + case _ACTCREDENTIALEDCAREPROVISIONPERSONCODE: return "_ActCredentialedCareProvisionPersonCode"; + case CACC: return "CACC"; + case CAIC: return "CAIC"; + case CAMC: return "CAMC"; + case CANC: return "CANC"; + case CAPC: return "CAPC"; + case CBGC: return "CBGC"; + case CCCC: return "CCCC"; + case CCGC: return "CCGC"; + case CCPC: return "CCPC"; + case CCSC: return "CCSC"; + case CDEC: return "CDEC"; + case CDRC: return "CDRC"; + case CEMC: return "CEMC"; + case CFPC: return "CFPC"; + case CIMC: return "CIMC"; + case CMGC: return "CMGC"; + case CNEC: return "CNEC"; + case CNMC: return "CNMC"; + case CNQC: return "CNQC"; + case CNSC: return "CNSC"; + case COGC: return "COGC"; + case COMC: return "COMC"; + case COPC: return "COPC"; + case COSC: return "COSC"; + case COTC: return "COTC"; + case CPEC: return "CPEC"; + case CPGC: return "CPGC"; + case CPHC: return "CPHC"; + case CPRC: return "CPRC"; + case CPSC: return "CPSC"; + case CPYC: return "CPYC"; + case CROC: return "CROC"; + case CRPC: return "CRPC"; + case CSUC: return "CSUC"; + case CTSC: return "CTSC"; + case CURC: return "CURC"; + case CVSC: return "CVSC"; + case LGPC: return "LGPC"; + case _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE: return "_ActCredentialedCareProvisionProgramCode"; + case AALC: return "AALC"; + case AAMC: return "AAMC"; + case ABHC: return "ABHC"; + case ACAC: return "ACAC"; + case ACHC: return "ACHC"; + case AHOC: return "AHOC"; + case ALTC: return "ALTC"; + case AOSC: return "AOSC"; + case CACS: return "CACS"; + case CAMI: return "CAMI"; + case CAST: return "CAST"; + case CBAR: return "CBAR"; + case CCAD: return "CCAD"; + case CCAR: return "CCAR"; + case CDEP: return "CDEP"; + case CDGD: return "CDGD"; + case CDIA: return "CDIA"; + case CEPI: return "CEPI"; + case CFEL: return "CFEL"; + case CHFC: return "CHFC"; + case CHRO: return "CHRO"; + case CHYP: return "CHYP"; + case CMIH: return "CMIH"; + case CMSC: return "CMSC"; + case COJR: return "COJR"; + case CONC: return "CONC"; + case COPD: return "COPD"; + case CORT: return "CORT"; + case CPAD: return "CPAD"; + case CPND: return "CPND"; + case CPST: return "CPST"; + case CSDM: return "CSDM"; + case CSIC: return "CSIC"; + case CSLD: return "CSLD"; + case CSPT: return "CSPT"; + case CTBU: return "CTBU"; + case CVDC: return "CVDC"; + case CWMA: return "CWMA"; + case CWOH: return "CWOH"; + case _ACTENCOUNTERCODE: return "_ActEncounterCode"; + case AMB: return "AMB"; + case EMER: return "EMER"; + case FLD: return "FLD"; + case HH: return "HH"; + case IMP: return "IMP"; + case ACUTE: return "ACUTE"; + case NONAC: return "NONAC"; + case PRENC: return "PRENC"; + case SS: return "SS"; + case VR: return "VR"; + case _ACTMEDICALSERVICECODE: return "_ActMedicalServiceCode"; + case ALC: return "ALC"; + case CARD: return "CARD"; + case CHR: return "CHR"; + case DNTL: return "DNTL"; + case DRGRHB: return "DRGRHB"; + case GENRL: return "GENRL"; + case MED: return "MED"; + case OBS: return "OBS"; + case ONC: return "ONC"; + case PALL: return "PALL"; + case PED: return "PED"; + case PHAR: return "PHAR"; + case PHYRHB: return "PHYRHB"; + case PSYCH: return "PSYCH"; + case SURG: return "SURG"; + case _ACTCLAIMATTACHMENTCATEGORYCODE: return "_ActClaimAttachmentCategoryCode"; + case AUTOATTCH: return "AUTOATTCH"; + case DOCUMENT: return "DOCUMENT"; + case HEALTHREC: return "HEALTHREC"; + case IMG: return "IMG"; + case LABRESULTS: return "LABRESULTS"; + case MODEL: return "MODEL"; + case WIATTCH: return "WIATTCH"; + case XRAY: return "XRAY"; + case _ACTCONSENTTYPE: return "_ActConsentType"; + case ICOL: return "ICOL"; + case IDSCL: return "IDSCL"; + case INFA: return "INFA"; + case INFAO: return "INFAO"; + case INFASO: return "INFASO"; + case IRDSCL: return "IRDSCL"; + case RESEARCH: return "RESEARCH"; + case RSDID: return "RSDID"; + case RSREID: return "RSREID"; + case _ACTCONTAINERREGISTRATIONCODE: return "_ActContainerRegistrationCode"; + case ID: return "ID"; + case IP: return "IP"; + case L: return "L"; + case M: return "M"; + case O: return "O"; + case R: return "R"; + case X: return "X"; + case _ACTCONTROLVARIABLE: return "_ActControlVariable"; + case AUTO: return "AUTO"; + case ENDC: return "ENDC"; + case REFLEX: return "REFLEX"; + case _ACTCOVERAGECONFIRMATIONCODE: return "_ActCoverageConfirmationCode"; + case _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE: return "_ActCoverageAuthorizationConfirmationCode"; + case AUTH: return "AUTH"; + case NAUTH: return "NAUTH"; + case _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE: return "_ActCoverageEligibilityConfirmationCode"; + case ELG: return "ELG"; + case NELG: return "NELG"; + case _ACTCOVERAGELIMITCODE: return "_ActCoverageLimitCode"; + case _ACTCOVERAGEQUANTITYLIMITCODE: return "_ActCoverageQuantityLimitCode"; + case COVPRD: return "COVPRD"; + case LFEMX: return "LFEMX"; + case NETAMT: return "NETAMT"; + case PRDMX: return "PRDMX"; + case UNITPRICE: return "UNITPRICE"; + case UNITQTY: return "UNITQTY"; + case COVMX: return "COVMX"; + case _ACTCOVEREDPARTYLIMITCODE: return "_ActCoveredPartyLimitCode"; + case _ACTCOVERAGETYPECODE: return "_ActCoverageTypeCode"; + case _ACTINSURANCEPOLICYCODE: return "_ActInsurancePolicyCode"; + case EHCPOL: return "EHCPOL"; + case HSAPOL: return "HSAPOL"; + case AUTOPOL: return "AUTOPOL"; + case COL: return "COL"; + case UNINSMOT: return "UNINSMOT"; + case PUBLICPOL: return "PUBLICPOL"; + case DENTPRG: return "DENTPRG"; + case DISEASEPRG: return "DISEASEPRG"; + case CANPRG: return "CANPRG"; + case ENDRENAL: return "ENDRENAL"; + case HIVAIDS: return "HIVAIDS"; + case MANDPOL: return "MANDPOL"; + case MENTPRG: return "MENTPRG"; + case SAFNET: return "SAFNET"; + case SUBPRG: return "SUBPRG"; + case SUBSIDIZ: return "SUBSIDIZ"; + case SUBSIDMC: return "SUBSIDMC"; + case SUBSUPP: return "SUBSUPP"; + case WCBPOL: return "WCBPOL"; + case _ACTINSURANCETYPECODE: return "_ActInsuranceTypeCode"; + case _ACTHEALTHINSURANCETYPECODE: return "_ActHealthInsuranceTypeCode"; + case DENTAL: return "DENTAL"; + case DISEASE: return "DISEASE"; + case DRUGPOL: return "DRUGPOL"; + case HIP: return "HIP"; + case LTC: return "LTC"; + case MCPOL: return "MCPOL"; + case POS: return "POS"; + case HMO: return "HMO"; + case PPO: return "PPO"; + case MENTPOL: return "MENTPOL"; + case SUBPOL: return "SUBPOL"; + case VISPOL: return "VISPOL"; + case DIS: return "DIS"; + case EWB: return "EWB"; + case FLEXP: return "FLEXP"; + case LIFE: return "LIFE"; + case ANNU: return "ANNU"; + case TLIFE: return "TLIFE"; + case ULIFE: return "ULIFE"; + case PNC: return "PNC"; + case REI: return "REI"; + case SURPL: return "SURPL"; + case UMBRL: return "UMBRL"; + case _ACTPROGRAMTYPECODE: return "_ActProgramTypeCode"; + case CHAR: return "CHAR"; + case CRIME: return "CRIME"; + case EAP: return "EAP"; + case GOVEMP: return "GOVEMP"; + case HIRISK: return "HIRISK"; + case IND: return "IND"; + case MILITARY: return "MILITARY"; + case RETIRE: return "RETIRE"; + case SOCIAL: return "SOCIAL"; + case VET: return "VET"; + case _ACTDETECTEDISSUEMANAGEMENTCODE: return "_ActDetectedIssueManagementCode"; + case _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE: return "_ActAdministrativeDetectedIssueManagementCode"; + case _AUTHORIZATIONISSUEMANAGEMENTCODE: return "_AuthorizationIssueManagementCode"; + case EMAUTH: return "EMAUTH"; + case _21: return "21"; + case _1: return "1"; + case _19: return "19"; + case _2: return "2"; + case _22: return "22"; + case _23: return "23"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case _6: return "6"; + case _7: return "7"; + case _14: return "14"; + case _15: return "15"; + case _16: return "16"; + case _17: return "17"; + case _18: return "18"; + case _20: return "20"; + case _8: return "8"; + case _10: return "10"; + case _11: return "11"; + case _12: return "12"; + case _13: return "13"; + case _9: return "9"; + case _ACTEXPOSURECODE: return "_ActExposureCode"; + case CHLDCARE: return "CHLDCARE"; + case CONVEYNC: return "CONVEYNC"; + case HLTHCARE: return "HLTHCARE"; + case HOMECARE: return "HOMECARE"; + case HOSPPTNT: return "HOSPPTNT"; + case HOSPVSTR: return "HOSPVSTR"; + case HOUSEHLD: return "HOUSEHLD"; + case INMATE: return "INMATE"; + case INTIMATE: return "INTIMATE"; + case LTRMCARE: return "LTRMCARE"; + case PLACE: return "PLACE"; + case PTNTCARE: return "PTNTCARE"; + case SCHOOL2: return "SCHOOL2"; + case SOCIAL2: return "SOCIAL2"; + case SUBSTNCE: return "SUBSTNCE"; + case TRAVINT: return "TRAVINT"; + case WORK2: return "WORK2"; + case _ACTFINANCIALTRANSACTIONCODE: return "_ActFinancialTransactionCode"; + case CHRG: return "CHRG"; + case REV: return "REV"; + case _ACTINCIDENTCODE: return "_ActIncidentCode"; + case MVA: return "MVA"; + case SCHOOL: return "SCHOOL"; + case SPT: return "SPT"; + case WPA: return "WPA"; + case _ACTINFORMATIONACCESSCODE: return "_ActInformationAccessCode"; + case ACADR: return "ACADR"; + case ACALL: return "ACALL"; + case ACALLG: return "ACALLG"; + case ACCONS: return "ACCONS"; + case ACDEMO: return "ACDEMO"; + case ACDI: return "ACDI"; + case ACIMMUN: return "ACIMMUN"; + case ACLAB: return "ACLAB"; + case ACMED: return "ACMED"; + case ACMEDC: return "ACMEDC"; + case ACMEN: return "ACMEN"; + case ACOBS: return "ACOBS"; + case ACPOLPRG: return "ACPOLPRG"; + case ACPROV: return "ACPROV"; + case ACPSERV: return "ACPSERV"; + case ACSUBSTAB: return "ACSUBSTAB"; + case _ACTINFORMATIONACCESSCONTEXTCODE: return "_ActInformationAccessContextCode"; + case INFAUT: return "INFAUT"; + case INFCON: return "INFCON"; + case INFCRT: return "INFCRT"; + case INFDNG: return "INFDNG"; + case INFEMER: return "INFEMER"; + case INFPWR: return "INFPWR"; + case INFREG: return "INFREG"; + case _ACTINFORMATIONCATEGORYCODE: return "_ActInformationCategoryCode"; + case ALLCAT: return "ALLCAT"; + case ALLGCAT: return "ALLGCAT"; + case ARCAT: return "ARCAT"; + case COBSCAT: return "COBSCAT"; + case DEMOCAT: return "DEMOCAT"; + case DICAT: return "DICAT"; + case IMMUCAT: return "IMMUCAT"; + case LABCAT: return "LABCAT"; + case MEDCCAT: return "MEDCCAT"; + case MENCAT: return "MENCAT"; + case PSVCCAT: return "PSVCCAT"; + case RXCAT: return "RXCAT"; + case _ACTINVOICEELEMENTCODE: return "_ActInvoiceElementCode"; + case _ACTINVOICEADJUDICATIONPAYMENTCODE: return "_ActInvoiceAdjudicationPaymentCode"; + case _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE: return "_ActInvoiceAdjudicationPaymentGroupCode"; + case ALEC: return "ALEC"; + case BONUS: return "BONUS"; + case CFWD: return "CFWD"; + case EDU: return "EDU"; + case EPYMT: return "EPYMT"; + case GARN: return "GARN"; + case INVOICE: return "INVOICE"; + case PINV: return "PINV"; + case PPRD: return "PPRD"; + case PROA: return "PROA"; + case RECOV: return "RECOV"; + case RETRO: return "RETRO"; + case TRAN: return "TRAN"; + case _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE: return "_ActInvoiceAdjudicationPaymentSummaryCode"; + case INVTYPE: return "INVTYPE"; + case PAYEE: return "PAYEE"; + case PAYOR: return "PAYOR"; + case SENDAPP: return "SENDAPP"; + case _ACTINVOICEDETAILCODE: return "_ActInvoiceDetailCode"; + case _ACTINVOICEDETAILCLINICALPRODUCTCODE: return "_ActInvoiceDetailClinicalProductCode"; + case UNSPSC: return "UNSPSC"; + case _ACTINVOICEDETAILDRUGPRODUCTCODE: return "_ActInvoiceDetailDrugProductCode"; + case GTIN: return "GTIN"; + case UPC: return "UPC"; + case _ACTINVOICEDETAILGENERICCODE: return "_ActInvoiceDetailGenericCode"; + case _ACTINVOICEDETAILGENERICADJUDICATORCODE: return "_ActInvoiceDetailGenericAdjudicatorCode"; + case COIN: return "COIN"; + case COPAYMENT: return "COPAYMENT"; + case DEDUCTIBLE: return "DEDUCTIBLE"; + case PAY: return "PAY"; + case SPEND: return "SPEND"; + case COINS: return "COINS"; + case _ACTINVOICEDETAILGENERICMODIFIERCODE: return "_ActInvoiceDetailGenericModifierCode"; + case AFTHRS: return "AFTHRS"; + case ISOL: return "ISOL"; + case OOO: return "OOO"; + case _ACTINVOICEDETAILGENERICPROVIDERCODE: return "_ActInvoiceDetailGenericProviderCode"; + case CANCAPT: return "CANCAPT"; + case DSC: return "DSC"; + case ESA: return "ESA"; + case FFSTOP: return "FFSTOP"; + case FNLFEE: return "FNLFEE"; + case FRSTFEE: return "FRSTFEE"; + case MARKUP: return "MARKUP"; + case MISSAPT: return "MISSAPT"; + case PERFEE: return "PERFEE"; + case PERMBNS: return "PERMBNS"; + case RESTOCK: return "RESTOCK"; + case TRAVEL: return "TRAVEL"; + case URGENT: return "URGENT"; + case _ACTINVOICEDETAILTAXCODE: return "_ActInvoiceDetailTaxCode"; + case FST: return "FST"; + case HST: return "HST"; + case PST: return "PST"; + case _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE: return "_ActInvoiceDetailPreferredAccommodationCode"; + case _ACTENCOUNTERACCOMMODATIONCODE: return "_ActEncounterAccommodationCode"; + case _HL7ACCOMMODATIONCODE: return "_HL7AccommodationCode"; + case I: return "I"; + case P: return "P"; + case S: return "S"; + case SP: return "SP"; + case W: return "W"; + case _ACTINVOICEDETAILCLINICALSERVICECODE: return "_ActInvoiceDetailClinicalServiceCode"; + case _ACTINVOICEGROUPCODE: return "_ActInvoiceGroupCode"; + case _ACTINVOICEINTERGROUPCODE: return "_ActInvoiceInterGroupCode"; + case CPNDDRGING: return "CPNDDRGING"; + case CPNDINDING: return "CPNDINDING"; + case CPNDSUPING: return "CPNDSUPING"; + case DRUGING: return "DRUGING"; + case FRAMEING: return "FRAMEING"; + case LENSING: return "LENSING"; + case PRDING: return "PRDING"; + case _ACTINVOICEROOTGROUPCODE: return "_ActInvoiceRootGroupCode"; + case CPINV: return "CPINV"; + case CSINV: return "CSINV"; + case CSPINV: return "CSPINV"; + case FININV: return "FININV"; + case OHSINV: return "OHSINV"; + case PAINV: return "PAINV"; + case RXCINV: return "RXCINV"; + case RXDINV: return "RXDINV"; + case SBFINV: return "SBFINV"; + case VRXINV: return "VRXINV"; + case _ACTINVOICEELEMENTSUMMARYCODE: return "_ActInvoiceElementSummaryCode"; + case _INVOICEELEMENTADJUDICATED: return "_InvoiceElementAdjudicated"; + case ADNFPPELAT: return "ADNFPPELAT"; + case ADNFPPELCT: return "ADNFPPELCT"; + case ADNFPPMNAT: return "ADNFPPMNAT"; + case ADNFPPMNCT: return "ADNFPPMNCT"; + case ADNFSPELAT: return "ADNFSPELAT"; + case ADNFSPELCT: return "ADNFSPELCT"; + case ADNFSPMNAT: return "ADNFSPMNAT"; + case ADNFSPMNCT: return "ADNFSPMNCT"; + case ADNPPPELAT: return "ADNPPPELAT"; + case ADNPPPELCT: return "ADNPPPELCT"; + case ADNPPPMNAT: return "ADNPPPMNAT"; + case ADNPPPMNCT: return "ADNPPPMNCT"; + case ADNPSPELAT: return "ADNPSPELAT"; + case ADNPSPELCT: return "ADNPSPELCT"; + case ADNPSPMNAT: return "ADNPSPMNAT"; + case ADNPSPMNCT: return "ADNPSPMNCT"; + case ADPPPPELAT: return "ADPPPPELAT"; + case ADPPPPELCT: return "ADPPPPELCT"; + case ADPPPPMNAT: return "ADPPPPMNAT"; + case ADPPPPMNCT: return "ADPPPPMNCT"; + case ADPPSPELAT: return "ADPPSPELAT"; + case ADPPSPELCT: return "ADPPSPELCT"; + case ADPPSPMNAT: return "ADPPSPMNAT"; + case ADPPSPMNCT: return "ADPPSPMNCT"; + case ADRFPPELAT: return "ADRFPPELAT"; + case ADRFPPELCT: return "ADRFPPELCT"; + case ADRFPPMNAT: return "ADRFPPMNAT"; + case ADRFPPMNCT: return "ADRFPPMNCT"; + case ADRFSPELAT: return "ADRFSPELAT"; + case ADRFSPELCT: return "ADRFSPELCT"; + case ADRFSPMNAT: return "ADRFSPMNAT"; + case ADRFSPMNCT: return "ADRFSPMNCT"; + case _INVOICEELEMENTPAID: return "_InvoiceElementPaid"; + case PDNFPPELAT: return "PDNFPPELAT"; + case PDNFPPELCT: return "PDNFPPELCT"; + case PDNFPPMNAT: return "PDNFPPMNAT"; + case PDNFPPMNCT: return "PDNFPPMNCT"; + case PDNFSPELAT: return "PDNFSPELAT"; + case PDNFSPELCT: return "PDNFSPELCT"; + case PDNFSPMNAT: return "PDNFSPMNAT"; + case PDNFSPMNCT: return "PDNFSPMNCT"; + case PDNPPPELAT: return "PDNPPPELAT"; + case PDNPPPELCT: return "PDNPPPELCT"; + case PDNPPPMNAT: return "PDNPPPMNAT"; + case PDNPPPMNCT: return "PDNPPPMNCT"; + case PDNPSPELAT: return "PDNPSPELAT"; + case PDNPSPELCT: return "PDNPSPELCT"; + case PDNPSPMNAT: return "PDNPSPMNAT"; + case PDNPSPMNCT: return "PDNPSPMNCT"; + case PDPPPPELAT: return "PDPPPPELAT"; + case PDPPPPELCT: return "PDPPPPELCT"; + case PDPPPPMNAT: return "PDPPPPMNAT"; + case PDPPPPMNCT: return "PDPPPPMNCT"; + case PDPPSPELAT: return "PDPPSPELAT"; + case PDPPSPELCT: return "PDPPSPELCT"; + case PDPPSPMNAT: return "PDPPSPMNAT"; + case PDPPSPMNCT: return "PDPPSPMNCT"; + case _INVOICEELEMENTSUBMITTED: return "_InvoiceElementSubmitted"; + case SBBLELAT: return "SBBLELAT"; + case SBBLELCT: return "SBBLELCT"; + case SBNFELAT: return "SBNFELAT"; + case SBNFELCT: return "SBNFELCT"; + case SBPDELAT: return "SBPDELAT"; + case SBPDELCT: return "SBPDELCT"; + case _ACTINVOICEOVERRIDECODE: return "_ActInvoiceOverrideCode"; + case COVGE: return "COVGE"; + case EFORM: return "EFORM"; + case FAX: return "FAX"; + case GFTH: return "GFTH"; + case LATE: return "LATE"; + case MANUAL: return "MANUAL"; + case OOJ: return "OOJ"; + case ORTHO: return "ORTHO"; + case PAPER: return "PAPER"; + case PIE: return "PIE"; + case PYRDELAY: return "PYRDELAY"; + case REFNR: return "REFNR"; + case REPSERV: return "REPSERV"; + case UNRELAT: return "UNRELAT"; + case VERBAUTH: return "VERBAUTH"; + case _ACTLISTCODE: return "_ActListCode"; + case _ACTOBSERVATIONLIST: return "_ActObservationList"; + case CARELIST: return "CARELIST"; + case CONDLIST: return "CONDLIST"; + case INTOLIST: return "INTOLIST"; + case PROBLIST: return "PROBLIST"; + case RISKLIST: return "RISKLIST"; + case GOALLIST: return "GOALLIST"; + case _ACTTHERAPYDURATIONWORKINGLISTCODE: return "_ActTherapyDurationWorkingListCode"; + case _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE: return "_ActMedicationTherapyDurationWorkingListCode"; + case ACU: return "ACU"; + case CHRON: return "CHRON"; + case ONET: return "ONET"; + case PRN: return "PRN"; + case MEDLIST: return "MEDLIST"; + case CURMEDLIST: return "CURMEDLIST"; + case DISCMEDLIST: return "DISCMEDLIST"; + case HISTMEDLIST: return "HISTMEDLIST"; + case _ACTMONITORINGPROTOCOLCODE: return "_ActMonitoringProtocolCode"; + case CTLSUB: return "CTLSUB"; + case INV: return "INV"; + case LU: return "LU"; + case OTC: return "OTC"; + case RX: return "RX"; + case SA: return "SA"; + case SAC: return "SAC"; + case _ACTNONOBSERVATIONINDICATIONCODE: return "_ActNonObservationIndicationCode"; + case IND01: return "IND01"; + case IND02: return "IND02"; + case IND03: return "IND03"; + case IND04: return "IND04"; + case IND05: return "IND05"; + case _ACTOBSERVATIONVERIFICATIONTYPE: return "_ActObservationVerificationType"; + case VFPAPER: return "VFPAPER"; + case _ACTPAYMENTCODE: return "_ActPaymentCode"; + case ACH: return "ACH"; + case CHK: return "CHK"; + case DDP: return "DDP"; + case NON: return "NON"; + case _ACTPHARMACYSUPPLYTYPE: return "_ActPharmacySupplyType"; + case DF: return "DF"; + case EM: return "EM"; + case SO: return "SO"; + case FF: return "FF"; + case FFC: return "FFC"; + case FFP: return "FFP"; + case FFSS: return "FFSS"; + case TF: return "TF"; + case FS: return "FS"; + case MS: return "MS"; + case RF: return "RF"; + case UD: return "UD"; + case RFC: return "RFC"; + case RFCS: return "RFCS"; + case RFF: return "RFF"; + case RFFS: return "RFFS"; + case RFP: return "RFP"; + case RFPS: return "RFPS"; + case RFS: return "RFS"; + case TB: return "TB"; + case TBS: return "TBS"; + case UDE: return "UDE"; + case _ACTPOLICYTYPE: return "_ActPolicyType"; + case _ACTPRIVACYPOLICY: return "_ActPrivacyPolicy"; + case _ACTCONSENTDIRECTIVE: return "_ActConsentDirective"; + case EMRGONLY: return "EMRGONLY"; + case GRANTORCHOICE: return "GRANTORCHOICE"; + case IMPLIED: return "IMPLIED"; + case IMPLIEDD: return "IMPLIEDD"; + case NOCONSENT: return "NOCONSENT"; + case NOPP: return "NOPP"; + case OPTIN: return "OPTIN"; + case OPTINR: return "OPTINR"; + case OPTOUT: return "OPTOUT"; + case OPTOUTE: return "OPTOUTE"; + case _ACTPRIVACYLAW: return "_ActPrivacyLaw"; + case _ACTUSPRIVACYLAW: return "_ActUSPrivacyLaw"; + case _42CFRPART2: return "42CFRPart2"; + case COMMONRULE: return "CommonRule"; + case HIPAANOPP: return "HIPAANOPP"; + case HIPAAPSYNOTES: return "HIPAAPsyNotes"; + case HIPAASELFPAY: return "HIPAASelfPay"; + case TITLE38SECTION7332: return "Title38Section7332"; + case _INFORMATIONSENSITIVITYPOLICY: return "_InformationSensitivityPolicy"; + case _ACTINFORMATIONSENSITIVITYPOLICY: return "_ActInformationSensitivityPolicy"; + case ETH: return "ETH"; + case GDIS: return "GDIS"; + case HIV: return "HIV"; + case PSY: return "PSY"; + case SCA: return "SCA"; + case SOC: return "SOC"; + case SDV: return "SDV"; + case SEX: return "SEX"; + case STD: return "STD"; + case TBOO: return "TBOO"; + case SICKLE: return "SICKLE"; + case _ENTITYSENSITIVITYPOLICYTYPE: return "_EntitySensitivityPolicyType"; + case DEMO: return "DEMO"; + case DOB: return "DOB"; + case GENDER: return "GENDER"; + case LIVARG: return "LIVARG"; + case MARST: return "MARST"; + case RACE: return "RACE"; + case REL: return "REL"; + case _ROLEINFORMATIONSENSITIVITYPOLICY: return "_RoleInformationSensitivityPolicy"; + case B: return "B"; + case EMPL: return "EMPL"; + case LOCIS: return "LOCIS"; + case SSP: return "SSP"; + case ADOL: return "ADOL"; + case CEL: return "CEL"; + case DIA: return "DIA"; + case DRGIS: return "DRGIS"; + case EMP: return "EMP"; + case PDS: return "PDS"; + case PRS: return "PRS"; + case COMPT: return "COMPT"; + case ACOCOMPT: return "ACOCOMPT"; + case CTCOMPT: return "CTCOMPT"; + case FMCOMPT: return "FMCOMPT"; + case HRCOMPT: return "HRCOMPT"; + case LRCOMPT: return "LRCOMPT"; + case PACOMPT: return "PACOMPT"; + case RESCOMPT: return "RESCOMPT"; + case RMGTCOMPT: return "RMGTCOMPT"; + case ACTTRUSTPOLICYTYPE: return "ActTrustPolicyType"; + case TRSTACCRD: return "TRSTACCRD"; + case TRSTAGRE: return "TRSTAGRE"; + case TRSTASSUR: return "TRSTASSUR"; + case TRSTCERT: return "TRSTCERT"; + case TRSTFWK: return "TRSTFWK"; + case TRSTMEC: return "TRSTMEC"; + case COVPOL: return "COVPOL"; + case SECURITYPOLICY: return "SecurityPolicy"; + case OBLIGATIONPOLICY: return "ObligationPolicy"; + case ANONY: return "ANONY"; + case AOD: return "AOD"; + case AUDIT: return "AUDIT"; + case AUDTR: return "AUDTR"; + case CPLYCC: return "CPLYCC"; + case CPLYCD: return "CPLYCD"; + case CPLYJPP: return "CPLYJPP"; + case CPLYOPP: return "CPLYOPP"; + case CPLYOSP: return "CPLYOSP"; + case CPLYPOL: return "CPLYPOL"; + case DECLASSIFYLABEL: return "DECLASSIFYLABEL"; + case DEID: return "DEID"; + case DELAU: return "DELAU"; + case DOWNGRDLABEL: return "DOWNGRDLABEL"; + case DRIVLABEL: return "DRIVLABEL"; + case ENCRYPT: return "ENCRYPT"; + case ENCRYPTR: return "ENCRYPTR"; + case ENCRYPTT: return "ENCRYPTT"; + case ENCRYPTU: return "ENCRYPTU"; + case HUAPRV: return "HUAPRV"; + case LABEL: return "LABEL"; + case MASK: return "MASK"; + case MINEC: return "MINEC"; + case PERSISTLABEL: return "PERSISTLABEL"; + case PRIVMARK: return "PRIVMARK"; + case PSEUD: return "PSEUD"; + case REDACT: return "REDACT"; + case UPGRDLABEL: return "UPGRDLABEL"; + case REFRAINPOLICY: return "RefrainPolicy"; + case NOAUTH: return "NOAUTH"; + case NOCOLLECT: return "NOCOLLECT"; + case NODSCLCD: return "NODSCLCD"; + case NODSCLCDS: return "NODSCLCDS"; + case NOINTEGRATE: return "NOINTEGRATE"; + case NOLIST: return "NOLIST"; + case NOMOU: return "NOMOU"; + case NOORGPOL: return "NOORGPOL"; + case NOPAT: return "NOPAT"; + case NOPERSISTP: return "NOPERSISTP"; + case NORDSCLCD: return "NORDSCLCD"; + case NORDSCLCDS: return "NORDSCLCDS"; + case NORDSCLW: return "NORDSCLW"; + case NORELINK: return "NORELINK"; + case NOREUSE: return "NOREUSE"; + case NOVIP: return "NOVIP"; + case ORCON: return "ORCON"; + case _ACTPRODUCTACQUISITIONCODE: return "_ActProductAcquisitionCode"; + case LOAN: return "LOAN"; + case RENT: return "RENT"; + case TRANSFER: return "TRANSFER"; + case SALE: return "SALE"; + case _ACTSPECIMENTRANSPORTCODE: return "_ActSpecimenTransportCode"; + case SREC: return "SREC"; + case SSTOR: return "SSTOR"; + case STRAN: return "STRAN"; + case _ACTSPECIMENTREATMENTCODE: return "_ActSpecimenTreatmentCode"; + case ACID: return "ACID"; + case ALK: return "ALK"; + case DEFB: return "DEFB"; + case FILT: return "FILT"; + case LDLP: return "LDLP"; + case NEUT: return "NEUT"; + case RECA: return "RECA"; + case UFIL: return "UFIL"; + case _ACTSUBSTANCEADMINISTRATIONCODE: return "_ActSubstanceAdministrationCode"; + case DRUG: return "DRUG"; + case FD: return "FD"; + case IMMUNIZ: return "IMMUNIZ"; + case BOOSTER: return "BOOSTER"; + case INITIMMUNIZ: return "INITIMMUNIZ"; + case _ACTTASKCODE: return "_ActTaskCode"; + case OE: return "OE"; + case LABOE: return "LABOE"; + case MEDOE: return "MEDOE"; + case PATDOC: return "PATDOC"; + case ALLERLREV: return "ALLERLREV"; + case CLINNOTEE: return "CLINNOTEE"; + case DIAGLISTE: return "DIAGLISTE"; + case DISCHINSTE: return "DISCHINSTE"; + case DISCHSUME: return "DISCHSUME"; + case PATEDUE: return "PATEDUE"; + case PATREPE: return "PATREPE"; + case PROBLISTE: return "PROBLISTE"; + case RADREPE: return "RADREPE"; + case IMMLREV: return "IMMLREV"; + case REMLREV: return "REMLREV"; + case WELLREMLREV: return "WELLREMLREV"; + case PATINFO: return "PATINFO"; + case ALLERLE: return "ALLERLE"; + case CDSREV: return "CDSREV"; + case CLINNOTEREV: return "CLINNOTEREV"; + case DISCHSUMREV: return "DISCHSUMREV"; + case DIAGLISTREV: return "DIAGLISTREV"; + case IMMLE: return "IMMLE"; + case LABRREV: return "LABRREV"; + case MICRORREV: return "MICRORREV"; + case MICROORGRREV: return "MICROORGRREV"; + case MICROSENSRREV: return "MICROSENSRREV"; + case MLREV: return "MLREV"; + case MARWLREV: return "MARWLREV"; + case OREV: return "OREV"; + case PATREPREV: return "PATREPREV"; + case PROBLISTREV: return "PROBLISTREV"; + case RADREPREV: return "RADREPREV"; + case REMLE: return "REMLE"; + case WELLREMLE: return "WELLREMLE"; + case RISKASSESS: return "RISKASSESS"; + case FALLRISK: return "FALLRISK"; + case _ACTTRANSPORTATIONMODECODE: return "_ActTransportationModeCode"; + case _ACTPATIENTTRANSPORTATIONMODECODE: return "_ActPatientTransportationModeCode"; + case AFOOT: return "AFOOT"; + case AMBT: return "AMBT"; + case AMBAIR: return "AMBAIR"; + case AMBGRND: return "AMBGRND"; + case AMBHELO: return "AMBHELO"; + case LAWENF: return "LAWENF"; + case PRVTRN: return "PRVTRN"; + case PUBTRN: return "PUBTRN"; + case _OBSERVATIONTYPE: return "_ObservationType"; + case _ACTSPECOBSCODE: return "_ActSpecObsCode"; + case ARTBLD: return "ARTBLD"; + case DILUTION: return "DILUTION"; + case AUTOHIGH: return "AUTO-HIGH"; + case AUTOLOW: return "AUTO-LOW"; + case PRE: return "PRE"; + case RERUN: return "RERUN"; + case EVNFCTS: return "EVNFCTS"; + case INTFR: return "INTFR"; + case FIBRIN: return "FIBRIN"; + case HEMOLYSIS: return "HEMOLYSIS"; + case ICTERUS: return "ICTERUS"; + case LIPEMIA: return "LIPEMIA"; + case VOLUME: return "VOLUME"; + case AVAILABLE: return "AVAILABLE"; + case CONSUMPTION: return "CONSUMPTION"; + case CURRENT: return "CURRENT"; + case INITIAL: return "INITIAL"; + case _ANNOTATIONTYPE: return "_AnnotationType"; + case _ACTPATIENTANNOTATIONTYPE: return "_ActPatientAnnotationType"; + case ANNDI: return "ANNDI"; + case ANNGEN: return "ANNGEN"; + case ANNIMM: return "ANNIMM"; + case ANNLAB: return "ANNLAB"; + case ANNMED: return "ANNMED"; + case _GENETICOBSERVATIONTYPE: return "_GeneticObservationType"; + case GENE: return "GENE"; + case _IMMUNIZATIONOBSERVATIONTYPE: return "_ImmunizationObservationType"; + case OBSANTC: return "OBSANTC"; + case OBSANTV: return "OBSANTV"; + case _INDIVIDUALCASESAFETYREPORTTYPE: return "_IndividualCaseSafetyReportType"; + case PATADVEVNT: return "PAT_ADV_EVNT"; + case VACPROBLEM: return "VAC_PROBLEM"; + case _LOINCOBSERVATIONACTCONTEXTAGETYPE: return "_LOINCObservationActContextAgeType"; + case _216119: return "21611-9"; + case _216127: return "21612-7"; + case _295535: return "29553-5"; + case _305250: return "30525-0"; + case _309724: return "30972-4"; + case _MEDICATIONOBSERVATIONTYPE: return "_MedicationObservationType"; + case REPHALFLIFE: return "REP_HALF_LIFE"; + case SPLCOATING: return "SPLCOATING"; + case SPLCOLOR: return "SPLCOLOR"; + case SPLIMAGE: return "SPLIMAGE"; + case SPLIMPRINT: return "SPLIMPRINT"; + case SPLSCORING: return "SPLSCORING"; + case SPLSHAPE: return "SPLSHAPE"; + case SPLSIZE: return "SPLSIZE"; + case SPLSYMBOL: return "SPLSYMBOL"; + case _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE: return "_ObservationIssueTriggerCodedObservationType"; + case _CASETRANSMISSIONMODE: return "_CaseTransmissionMode"; + case AIRTRNS: return "AIRTRNS"; + case ANANTRNS: return "ANANTRNS"; + case ANHUMTRNS: return "ANHUMTRNS"; + case BDYFLDTRNS: return "BDYFLDTRNS"; + case BLDTRNS: return "BLDTRNS"; + case DERMTRNS: return "DERMTRNS"; + case ENVTRNS: return "ENVTRNS"; + case FECTRNS: return "FECTRNS"; + case FOMTRNS: return "FOMTRNS"; + case FOODTRNS: return "FOODTRNS"; + case HUMHUMTRNS: return "HUMHUMTRNS"; + case INDTRNS: return "INDTRNS"; + case LACTTRNS: return "LACTTRNS"; + case NOSTRNS: return "NOSTRNS"; + case PARTRNS: return "PARTRNS"; + case PLACTRNS: return "PLACTRNS"; + case SEXTRNS: return "SEXTRNS"; + case TRNSFTRNS: return "TRNSFTRNS"; + case VECTRNS: return "VECTRNS"; + case WATTRNS: return "WATTRNS"; + case _OBSERVATIONQUALITYMEASUREATTRIBUTE: return "_ObservationQualityMeasureAttribute"; + case AGGREGATE: return "AGGREGATE"; + case CMPMSRMTH: return "CMPMSRMTH"; + case CMPMSRSCRWGHT: return "CMPMSRSCRWGHT"; + case COPY: return "COPY"; + case CRS: return "CRS"; + case DEF: return "DEF"; + case DISC: return "DISC"; + case FINALDT: return "FINALDT"; + case GUIDE: return "GUIDE"; + case IDUR: return "IDUR"; + case ITMCNT: return "ITMCNT"; + case KEY: return "KEY"; + case MEDT: return "MEDT"; + case MSD: return "MSD"; + case MSRADJ: return "MSRADJ"; + case MSRAGG: return "MSRAGG"; + case MSRIMPROV: return "MSRIMPROV"; + case MSRJUR: return "MSRJUR"; + case MSRRPTR: return "MSRRPTR"; + case MSRRPTTIME: return "MSRRPTTIME"; + case MSRSCORE: return "MSRSCORE"; + case MSRSET: return "MSRSET"; + case MSRTOPIC: return "MSRTOPIC"; + case MSRTP: return "MSRTP"; + case MSRTYPE: return "MSRTYPE"; + case RAT: return "RAT"; + case REF: return "REF"; + case SDE: return "SDE"; + case STRAT: return "STRAT"; + case TRANF: return "TRANF"; + case USE: return "USE"; + case _OBSERVATIONSEQUENCETYPE: return "_ObservationSequenceType"; + case TIMEABSOLUTE: return "TIME_ABSOLUTE"; + case TIMERELATIVE: return "TIME_RELATIVE"; + case _OBSERVATIONSERIESTYPE: return "_ObservationSeriesType"; + case _ECGOBSERVATIONSERIESTYPE: return "_ECGObservationSeriesType"; + case REPRESENTATIVEBEAT: return "REPRESENTATIVE_BEAT"; + case RHYTHM: return "RHYTHM"; + case _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE: return "_PatientImmunizationRelatedObservationType"; + case CLSSRM: return "CLSSRM"; + case GRADE: return "GRADE"; + case SCHL: return "SCHL"; + case SCHLDIV: return "SCHLDIV"; + case TEACHER: return "TEACHER"; + case _POPULATIONINCLUSIONOBSERVATIONTYPE: return "_PopulationInclusionObservationType"; + case DENEX: return "DENEX"; + case DENEXCEP: return "DENEXCEP"; + case DENOM: return "DENOM"; + case IPOP: return "IPOP"; + case IPPOP: return "IPPOP"; + case MSRPOPL: return "MSRPOPL"; + case MSRPOPLEX: return "MSRPOPLEX"; + case NUMER: return "NUMER"; + case NUMEX: return "NUMEX"; + case _PREFERENCEOBSERVATIONTYPE: return "_PreferenceObservationType"; + case PREFSTRENGTH: return "PREFSTRENGTH"; + case ADVERSEREACTION: return "ADVERSE_REACTION"; + case ASSERTION: return "ASSERTION"; + case CASESER: return "CASESER"; + case CDIO: return "CDIO"; + case CRIT: return "CRIT"; + case CTMO: return "CTMO"; + case DX: return "DX"; + case ADMDX: return "ADMDX"; + case DISDX: return "DISDX"; + case INTDX: return "INTDX"; + case NOI: return "NOI"; + case GISTIER: return "GISTIER"; + case HHOBS: return "HHOBS"; + case ISSUE: return "ISSUE"; + case _ACTADMINISTRATIVEDETECTEDISSUECODE: return "_ActAdministrativeDetectedIssueCode"; + case _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE: return "_ActAdministrativeAuthorizationDetectedIssueCode"; + case NAT: return "NAT"; + case SUPPRESSED: return "SUPPRESSED"; + case VALIDAT: return "VALIDAT"; + case KEY204: return "KEY204"; + case KEY205: return "KEY205"; + case COMPLY: return "COMPLY"; + case DUPTHPY: return "DUPTHPY"; + case DUPTHPCLS: return "DUPTHPCLS"; + case DUPTHPGEN: return "DUPTHPGEN"; + case ABUSE: return "ABUSE"; + case FRAUD: return "FRAUD"; + case PLYDOC: return "PLYDOC"; + case PLYPHRM: return "PLYPHRM"; + case DOSE: return "DOSE"; + case DOSECOND: return "DOSECOND"; + case DOSEDUR: return "DOSEDUR"; + case DOSEDURH: return "DOSEDURH"; + case DOSEDURHIND: return "DOSEDURHIND"; + case DOSEDURL: return "DOSEDURL"; + case DOSEDURLIND: return "DOSEDURLIND"; + case DOSEH: return "DOSEH"; + case DOSEHINDA: return "DOSEHINDA"; + case DOSEHIND: return "DOSEHIND"; + case DOSEHINDSA: return "DOSEHINDSA"; + case DOSEHINDW: return "DOSEHINDW"; + case DOSEIVL: return "DOSEIVL"; + case DOSEIVLIND: return "DOSEIVLIND"; + case DOSEL: return "DOSEL"; + case DOSELINDA: return "DOSELINDA"; + case DOSELIND: return "DOSELIND"; + case DOSELINDSA: return "DOSELINDSA"; + case DOSELINDW: return "DOSELINDW"; + case MDOSE: return "MDOSE"; + case OBSA: return "OBSA"; + case AGE: return "AGE"; + case ADALRT: return "ADALRT"; + case GEALRT: return "GEALRT"; + case PEALRT: return "PEALRT"; + case COND: return "COND"; + case HGHT: return "HGHT"; + case LACT: return "LACT"; + case PREG: return "PREG"; + case WGHT: return "WGHT"; + case CREACT: return "CREACT"; + case GEN: return "GEN"; + case GEND: return "GEND"; + case LAB: return "LAB"; + case REACT: return "REACT"; + case ALGY: return "ALGY"; + case INT: return "INT"; + case RREACT: return "RREACT"; + case RALG: return "RALG"; + case RAR: return "RAR"; + case RINT: return "RINT"; + case BUS: return "BUS"; + case CODEINVAL: return "CODE_INVAL"; + case CODEDEPREC: return "CODE_DEPREC"; + case FORMAT: return "FORMAT"; + case ILLEGAL: return "ILLEGAL"; + case LENRANGE: return "LEN_RANGE"; + case LENLONG: return "LEN_LONG"; + case LENSHORT: return "LEN_SHORT"; + case MISSCOND: return "MISSCOND"; + case MISSMAND: return "MISSMAND"; + case NODUPS: return "NODUPS"; + case NOPERSIST: return "NOPERSIST"; + case REPRANGE: return "REP_RANGE"; + case MAXOCCURS: return "MAXOCCURS"; + case MINOCCURS: return "MINOCCURS"; + case _ACTADMINISTRATIVERULEDETECTEDISSUECODE: return "_ActAdministrativeRuleDetectedIssueCode"; + case KEY206: return "KEY206"; + case OBSOLETE: return "OBSOLETE"; + case _ACTSUPPLIEDITEMDETECTEDISSUECODE: return "_ActSuppliedItemDetectedIssueCode"; + case _ADMINISTRATIONDETECTEDISSUECODE: return "_AdministrationDetectedIssueCode"; + case _APPROPRIATENESSDETECTEDISSUECODE: return "_AppropriatenessDetectedIssueCode"; + case _INTERACTIONDETECTEDISSUECODE: return "_InteractionDetectedIssueCode"; + case FOOD: return "FOOD"; + case TPROD: return "TPROD"; + case DRG: return "DRG"; + case NHP: return "NHP"; + case NONRX: return "NONRX"; + case PREVINEF: return "PREVINEF"; + case DACT: return "DACT"; + case TIME: return "TIME"; + case ALRTENDLATE: return "ALRTENDLATE"; + case ALRTSTRTLATE: return "ALRTSTRTLATE"; + case _TIMINGDETECTEDISSUECODE: return "_TimingDetectedIssueCode"; + case ENDLATE: return "ENDLATE"; + case STRTLATE: return "STRTLATE"; + case _SUPPLYDETECTEDISSUECODE: return "_SupplyDetectedIssueCode"; + case ALLDONE: return "ALLDONE"; + case FULFIL: return "FULFIL"; + case NOTACTN: return "NOTACTN"; + case NOTEQUIV: return "NOTEQUIV"; + case NOTEQUIVGEN: return "NOTEQUIVGEN"; + case NOTEQUIVTHER: return "NOTEQUIVTHER"; + case TIMING: return "TIMING"; + case INTERVAL: return "INTERVAL"; + case MINFREQ: return "MINFREQ"; + case HELD: return "HELD"; + case TOOLATE: return "TOOLATE"; + case TOOSOON: return "TOOSOON"; + case HISTORIC: return "HISTORIC"; + case PATPREF: return "PATPREF"; + case PATPREFALT: return "PATPREFALT"; + case KSUBJ: return "KSUBJ"; + case KSUBT: return "KSUBT"; + case OINT: return "OINT"; + case ALG: return "ALG"; + case DALG: return "DALG"; + case EALG: return "EALG"; + case FALG: return "FALG"; + case DINT: return "DINT"; + case DNAINT: return "DNAINT"; + case EINT: return "EINT"; + case ENAINT: return "ENAINT"; + case FINT: return "FINT"; + case FNAINT: return "FNAINT"; + case NAINT: return "NAINT"; + case SEV: return "SEV"; + case _FDALABELDATA: return "_FDALabelData"; + case FDACOATING: return "FDACOATING"; + case FDACOLOR: return "FDACOLOR"; + case FDAIMPRINTCD: return "FDAIMPRINTCD"; + case FDALOGO: return "FDALOGO"; + case FDASCORING: return "FDASCORING"; + case FDASHAPE: return "FDASHAPE"; + case FDASIZE: return "FDASIZE"; + case _ROIOVERLAYSHAPE: return "_ROIOverlayShape"; + case CIRCLE: return "CIRCLE"; + case ELLIPSE: return "ELLIPSE"; + case POINT: return "POINT"; + case POLY: return "POLY"; + case C: return "C"; + case DIET: return "DIET"; + case BR: return "BR"; + case DM: return "DM"; + case FAST: return "FAST"; + case FORMULA: return "FORMULA"; + case GF: return "GF"; + case LF: return "LF"; + case LP: return "LP"; + case LQ: return "LQ"; + case LS: return "LS"; + case N: return "N"; + case NF: return "NF"; + case PAF: return "PAF"; + case PAR: return "PAR"; + case RD: return "RD"; + case SCH: return "SCH"; + case SUPPLEMENT: return "SUPPLEMENT"; + case T: return "T"; + case VLI: return "VLI"; + case DRUGPRG: return "DRUGPRG"; + case F: return "F"; + case PRLMN: return "PRLMN"; + case SECOBS: return "SECOBS"; + case SECCATOBS: return "SECCATOBS"; + case SECCLASSOBS: return "SECCLASSOBS"; + case SECCONOBS: return "SECCONOBS"; + case SECINTOBS: return "SECINTOBS"; + case SECALTINTOBS: return "SECALTINTOBS"; + case SECDATINTOBS: return "SECDATINTOBS"; + case SECINTCONOBS: return "SECINTCONOBS"; + case SECINTPRVOBS: return "SECINTPRVOBS"; + case SECINTPRVABOBS: return "SECINTPRVABOBS"; + case SECINTPRVRBOBS: return "SECINTPRVRBOBS"; + case SECINTSTOBS: return "SECINTSTOBS"; + case SECTRSTOBS: return "SECTRSTOBS"; + case TRSTACCRDOBS: return "TRSTACCRDOBS"; + case TRSTAGREOBS: return "TRSTAGREOBS"; + case TRSTCERTOBS: return "TRSTCERTOBS"; + case TRSTFWKOBS: return "TRSTFWKOBS"; + case TRSTLOAOBS: return "TRSTLOAOBS"; + case TRSTMECOBS: return "TRSTMECOBS"; + case SUBSIDFFS: return "SUBSIDFFS"; + case WRKCOMP: return "WRKCOMP"; + case _ACTPROCEDURECODE: return "_ActProcedureCode"; + case _ACTBILLABLESERVICECODE: return "_ActBillableServiceCode"; + case _HL7DEFINEDACTCODES: return "_HL7DefinedActCodes"; + case COPAY: return "COPAY"; + case DEDUCT: return "DEDUCT"; + case DOSEIND: return "DOSEIND"; + case PRA: return "PRA"; + case STORE: return "STORE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActCode"; + } + public String getDefinition() { + switch (this) { + case _ACTACCOUNTCODE: return "An account represents a grouping of financial transactions that are tracked and reported together with a single balance. Examples of account codes (types) are Patient billing accounts (collection of charges), Cost centers; Cash."; + case ACCTRECEIVABLE: return "An account for collecting charges, reversals, adjustments and payments, including deductibles, copayments, coinsurance (financial transactions) credited or debited to the account receivable account for a patient's encounter."; + case CASH: return "Cash"; + case CC: return "Description: Types of advance payment to be made on a plastic card usually issued by a financial institution used of purchasing services and/or products."; + case AE: return "American Express"; + case DN: return "Diner's Club"; + case DV: return "Discover Card"; + case MC: return "Master Card"; + case V: return "Visa"; + case PBILLACCT: return "An account representing charges and credits (financial transactions) for a patient's encounter."; + case _ACTADJUDICATIONCODE: return "Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results."; + case _ACTADJUDICATIONGROUPCODE: return "Catagorization of grouping criteria for the associated transactions and/or summary (totals, subtotals)."; + case CONT: return "Transaction counts and value totals by Contract Identifier."; + case DAY: return "Transaction counts and value totals for each calendar day within the date range specified."; + case LOC: return "Transaction counts and value totals by service location (e.g clinic)."; + case MONTH: return "Transaction counts and value totals for each calendar month within the date range specified."; + case PERIOD: return "Transaction counts and value totals for the date range specified."; + case PROV: return "Transaction counts and value totals by Provider Identifier."; + case WEEK: return "Transaction counts and value totals for each calendar week within the date range specified."; + case YEAR: return "Transaction counts and value totals for each calendar year within the date range specified."; + case AA: return "The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges). \r\n\n Also includes the concept 'Adjudicate as zero' and items not covered under a particular Policy. \r\n\n Invoice element can be reversed (nullified). \r\n\n Recommend that the invoice element is saved for DUR (Drug Utilization Reporting)."; + case ANF: return "The invoice element has been accepted for payment but one or more adjustment(s) have been made to one or more invoice element line items (component charges) without changing the amount. \r\n\n Invoice element can be reversed (nullified). \r\n\n Recommend that the invoice element is saved for DUR (Drug Utilization Reporting)."; + case AR: return "The invoice element has passed through the adjudication process but payment is refused due to one or more reasons.\r\n\n Includes items such as patient not covered, or invoice element is not constructed according to payer rules (e.g. 'invoice submitted too late').\r\n\n If one invoice element line item in the invoice element structure is rejected, the remaining line items may not be adjudicated and the complete group is treated as rejected.\r\n\n A refused invoice element can be forwarded to the next payer (for Coordination of Benefits) or modified and resubmitted to refusing payer.\r\n\n Invoice element cannot be reversed (nullified) as there is nothing to reverse. \r\n\n Recommend that the invoice element is not saved for DUR (Drug Utilization Reporting)."; + case AS: return "The invoice element was/will be paid exactly as submitted, without financial adjustment(s).\r\n\n If the dollar amount stays the same, but the billing codes have been amended or financial adjustments have been applied through the adjudication process, the invoice element is treated as \"Adjudicated with Adjustment\".\r\n\n If information items are included in the adjudication results that do not affect the monetary amounts paid, then this is still Adjudicated as Submitted (e.g. 'reached Plan Maximum on this Claim'). \r\n\n Invoice element can be reversed (nullified). \r\n\n Recommend that the invoice element is saved for DUR (Drug Utilization Reporting)."; + case _ACTADJUDICATIONRESULTACTIONCODE: return "Actions to be carried out by the recipient of the Adjudication Result information."; + case DISPLAY: return "The adjudication result associated is to be displayed to the receiver of the adjudication result."; + case FORM: return "The adjudication result associated is to be printed on the specified form, which is then provided to the covered party."; + case _ACTBILLABLEMODIFIERCODE: return "Definition:An identifying modifier code for healthcare interventions or procedures."; + case CPTM: return "Description:CPT modifier codes are found in Appendix A of CPT 2000 Standard Edition."; + case HCPCSA: return "Description:HCPCS Level II (HCFA-assigned) and Carrier-assigned (Level III) modifiers are reported in Appendix A of CPT 2000 Standard Edition and in the Medicare Bulletin."; + case _ACTBILLINGARRANGEMENTCODE: return "The type of provision(s) made for reimbursing for the deliver of healthcare services and/or goods provided by a Provider, over a specified period."; + case BLK: return "A billing arrangement where a Provider charges a lump sum to provide a prescribed group (volume) of services to a single patient which occur over a period of time. Services included in the block may vary. \r\n\n This billing arrangement is also known as Program of Care for some specific Payors and Program Fees for other Payors."; + case CAP: return "A billing arrangement where the payment made to a Provider is determined by analyzing one or more demographic attributes about the persons/patients who are enrolled with the Provider (in their practice)."; + case CONTF: return "A billing arrangement where a Provider charges a lump sum to provide a particular volume of one or more interventions/procedures or groups of interventions/procedures."; + case FINBILL: return "A billing arrangement where a Provider charges for non-clinical items. This includes interest in arrears, mileage, etc. Clinical content is not included in Invoices submitted with this type of billing arrangement."; + case ROST: return "A billing arrangement where funding is based on a list of individuals registered as patients of the Provider."; + case SESS: return "A billing arrangement where a Provider charges a sum to provide a group (volume) of interventions/procedures to one or more patients within a defined period of time, typically on the same date. Interventions/procedures included in the session may vary."; + case FFS: return "A billing arrangement where a Provider charges a separate fee for each intervention/procedure/event or product.\r\n\n Fee for Service is used when an individual intervention/procedure/event is used for billing purposes. In other words, fees are associated with the intervention/procedure/event. For example, a specific CCI (Canadian Classification of Interventions) code has an associated fee and is used for billing purposes."; + case FFPS: return "A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)"; + case FFCS: return "A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets) and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case TFS: return "A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance and also where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case _ACTBOUNDEDROICODE: return "Type of bounded ROI."; + case ROIFS: return "A fully specified bounded Region of Interest (ROI) delineates a ROI in which only those dimensions participate that are specified by boundary criteria, whereas all other dimensions are excluded. For example a ROI to mark an episode of \"ST elevation\" in a subset of the EKG leads V2, V3, and V4 would include 4 boundaries, one each for time, V2, V3, and V4."; + case ROIPS: return "A partially specified bounded Region of Interest (ROI) specifies a ROI in which at least all values in the dimensions specified by the boundary criteria participate. For example, if an episode of ventricular fibrillations (VFib) is observed, it usually doesn't make sense to exclude any EKG leads from the observation and the partially specified ROI would contain only one boundary for time indicating the time interval where VFib was observed."; + case _ACTCAREPROVISIONCODE: return "Description:The type and scope of responsibility taken-on by the performer of the Act for a specific subject of care."; + case _ACTCREDENTIALEDCARECODE: return "Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by a credentialing agency, i.e. government or non-government agency. Failure in executing this Act may result in loss of credential to the person or organization who participates as performer of the Act. Excludes employment agreements.\r\n\n \n Example:Hospital license; physician license; clinic accreditation."; + case _ACTCREDENTIALEDCAREPROVISIONPERSONCODE: return "Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing individuals."; + case CACC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CAIC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CAMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CANC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CAPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CBGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCCC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CCSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CDEC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CDRC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CEMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CFPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CIMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CMGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CNEC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board"; + case CNMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CNQC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CNSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COMC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case COTC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPEC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPGC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPHC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPRC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CPYC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CROC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CRPC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CSUC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CTSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CURC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case CVSC: return "Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board."; + case LGPC: return "Description:Scope of responsibility taken-on for physician care of a patient as defined by a governmental licensing agency."; + case _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE: return "Description:The type and scope of legal and/or professional responsibility taken-on by the performer of the Act for a specific subject of care as described by an agency for credentialing programs within organizations."; + case AALC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case AAMC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ABHC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ACAC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ACHC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case AHOC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case ALTC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case AOSC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the respective accreditation agency."; + case CACS: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CAMI: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CAST: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CBAR: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CCAD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CCAR: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CDEP: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CDGD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CDIA: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CEPI: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CFEL: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CHFC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CHRO: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CHYP: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CMIH: return "Description:."; + case CMSC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case COJR: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CONC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case COPD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CORT: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CPAD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CPND: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CPST: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSDM: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSIC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSLD: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CSPT: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CTBU: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CVDC: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CWMA: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case CWOH: return "Description:Scope of responsibility taken on by an organization for care of a patient as defined by the disease management certification agency."; + case _ACTENCOUNTERCODE: return "Domain provides codes that qualify the ActEncounterClass (ENC)"; + case AMB: return "A comprehensive term for health care provided in a healthcare facility (e.g. a practitioneraTMs office, clinic setting, or hospital) on a nonresident basis. The term ambulatory usually implies that the patient has come to the location and is not assigned to a bed. Sometimes referred to as an outpatient encounter."; + case EMER: return "A patient encounter that takes place at a dedicated healthcare service delivery location where the patient receives immediate evaluation and treatment, provided until the patient can be discharged or responsibility for the patient's care is transferred elsewhere (for example, the patient could be admitted as an inpatient or transferred to another facility.)"; + case FLD: return "A patient encounter that takes place both outside a dedicated service delivery location and outside a patient's residence. Example locations might include an accident site and at a supermarket."; + case HH: return "Healthcare encounter that takes place in the residence of the patient or a designee"; + case IMP: return "A patient encounter where a patient is admitted by a hospital or equivalent facility, assigned to a location where patients generally stay at least overnight and provided with room, board, and continuous nursing service."; + case ACUTE: return "An acute inpatient encounter."; + case NONAC: return "Any category of inpatient encounter except 'acute'"; + case PRENC: return "A patient encounter where patient is scheduled or planned to receive service delivery in the future, and the patient is given a pre-admission account number. When the patient comes back for subsequent service, the pre-admission encounter is selected and is encapsulated into the service registration, and a new account number is generated.\r\n\n \n Usage Note: This is intended to be used in advance of encounter types such as ambulatory, inpatient encounter, virtual, etc."; + case SS: return "An encounter where the patient is admitted to a health care facility for a predetermined length of time, usually less than 24 hours."; + case VR: return "A patient encounter where the patient and the practitioner(s) are not in the same physical location. Examples include telephone conference, email exchange, robotic surgery, and televideo conference."; + case _ACTMEDICALSERVICECODE: return "General category of medical service provided to the patient during their encounter."; + case ALC: return "Provision of Alternate Level of Care to a patient in an acute bed. Patient is waiting for placement in a long-term care facility and is unable to return home."; + case CARD: return "Provision of diagnosis and treatment of diseases and disorders affecting the heart"; + case CHR: return "Provision of recurring care for chronic illness."; + case DNTL: return "Provision of treatment for oral health and/or dental surgery."; + case DRGRHB: return "Provision of treatment for drug abuse."; + case GENRL: return "General care performed by a general practitioner or family doctor as a responsible provider for a patient."; + case MED: return "Provision of diagnostic and/or therapeutic treatment."; + case OBS: return "Provision of care of women during pregnancy, childbirth and immediate postpartum period. Also known as Maternity."; + case ONC: return "Provision of treatment and/or diagnosis related to tumors and/or cancer."; + case PALL: return "Provision of care for patients who are living or dying from an advanced illness."; + case PED: return "Provision of diagnosis and treatment of diseases and disorders affecting children."; + case PHAR: return "Pharmaceutical care performed by a pharmacist."; + case PHYRHB: return "Provision of treatment for physical injury."; + case PSYCH: return "Provision of treatment of psychiatric disorder relating to mental illness."; + case SURG: return "Provision of surgical treatment."; + case _ACTCLAIMATTACHMENTCATEGORYCODE: return "Description: Coded types of attachments included to support a healthcare claim."; + case AUTOATTCH: return "Description: Automobile Information Attachment"; + case DOCUMENT: return "Description: Document Attachment"; + case HEALTHREC: return "Description: Health Record Attachment"; + case IMG: return "Description: Image Attachment"; + case LABRESULTS: return "Description: Lab Results Attachment"; + case MODEL: return "Description: Digital Model Attachment"; + case WIATTCH: return "Description: Work Injury related additional Information Attachment"; + case XRAY: return "Description: Digital X-Ray Attachment"; + case _ACTCONSENTTYPE: return "Definition: The type of consent directive, e.g., to consent or dissent to collect, access, or use in specific ways within an EHRS or for health information exchange; or to disclose health information for purposes such as research."; + case ICOL: return "Definition: Consent to have healthcare information collected in an electronic health record. This entails that the information may be used in analysis, modified, updated."; + case IDSCL: return "Definition: Consent to have collected healthcare information disclosed."; + case INFA: return "Definition: Consent to access healthcare information."; + case INFAO: return "Definition: Consent to access or \"read\" only, which entails that the information is not to be copied, screen printed, saved, emailed, stored, re-disclosed or altered in any way. This level ensures that data which is masked or to which access is restricted will not be.\r\n\n \n Example: Opened and then emailed or screen printed for use outside of the consent directive purpose."; + case INFASO: return "Definition: Consent to access and save only, which entails that access to the saved copy will remain locked."; + case IRDSCL: return "Definition: Information re-disclosed without the patient's consent."; + case RESEARCH: return "Definition: Consent to have healthcare information in an electronic health record accessed for research purposes."; + case RSDID: return "Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance."; + case RSREID: return "Definition: Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent.\r\n\n \n Example:: Where there is a need to inform the subject of potential health issues."; + case _ACTCONTAINERREGISTRATIONCODE: return "Constrains the ActCode to the domain of Container Registration"; + case ID: return "Used by one system to inform another that it has received a container."; + case IP: return "Used by one system to inform another that the container is in position for specimen transfer (e.g., container removal from track, pipetting, etc.)."; + case L: return "Used by one system to inform another that the container has been released from that system."; + case M: return "Used by one system to inform another that the container did not arrive at its next expected location."; + case O: return "Used by one system to inform another that the specific container is being processed by the equipment. It is useful as a response to a query about Container Status, when the specific step of the process is not relevant."; + case R: return "Status is used by one system to inform another that the processing has been completed, but the container has not been released from that system."; + case X: return "Used by one system to inform another that the container is no longer available within the scope of the system (e.g., tube broken or discarded)."; + case _ACTCONTROLVARIABLE: return "An observation form that determines parameters or attributes of an Act. Examples are the settings of a ventilator machine as parameters of a ventilator treatment act; the controls on dillution factors of a chemical analyzer as a parameter of a laboratory observation act; the settings of a physiologic measurement assembly (e.g., time skew) or the position of the body while measuring blood pressure.\r\n\n Control variables are forms of observations because just as with clinical observations, the Observation.code determines the parameter and the Observation.value assigns the value. While control variables sometimes can be observed (by noting the control settings or an actually measured feedback loop) they are not primary observations, in the sense that a control variable without a primary act is of no use (e.g., it makes no sense to record a blood pressure position without recording a blood pressure, whereas it does make sense to record a systolic blood pressure without a diastolic blood pressure)."; + case AUTO: return "Specifies whether or not automatic repeat testing is to be initiated on specimens."; + case ENDC: return "A baseline value for the measured test that is inherently contained in the diluent. In the calculation of the actual result for the measured test, this baseline value is normally considered."; + case REFLEX: return "Specifies whether or not further testing may be automatically or manually initiated on specimens."; + case _ACTCOVERAGECONFIRMATIONCODE: return "Response to an insurance coverage eligibility query or authorization request."; + case _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE: return "Indication of authorization for healthcare service(s) and/or product(s). If authorization is approved, funds are set aside."; + case AUTH: return "Authorization approved and funds have been set aside to pay for specified healthcare service(s) and/or product(s) within defined criteria for the authorization."; + case NAUTH: return "Authorization for specified healthcare service(s) and/or product(s) denied."; + case _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE: return "Indication of eligibility coverage for healthcare service(s) and/or product(s)."; + case ELG: return "Insurance coverage is in effect for healthcare service(s) and/or product(s)."; + case NELG: return "Insurance coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility."; + case _ACTCOVERAGELIMITCODE: return "Criteria that are applicable to the authorized coverage."; + case _ACTCOVERAGEQUANTITYLIMITCODE: return "Maximum amount paid or maximum number of services/products covered; or maximum amount or number covered during a specified time period under the policy or program."; + case COVPRD: return "Codes representing the time period during which coverage is available; or financial participation requirements are in effect."; + case LFEMX: return "Definition: Maximum amount paid by payer or covered party; or maximum number of services or products covered under the policy or program during a covered party's lifetime."; + case NETAMT: return "Maximum net amount that will be covered for the product or service specified."; + case PRDMX: return "Definition: Maximum amount paid by payer or covered party; or maximum number of services/products covered under the policy or program by time period specified by the effective time on the act."; + case UNITPRICE: return "Maximum unit price that will be covered for the authorized product or service."; + case UNITQTY: return "Maximum number of items that will be covered of the product or service specified."; + case COVMX: return "Definition: Codes representing the maximum coverate or financial participation requirements."; + case _ACTCOVEREDPARTYLIMITCODE: return "Codes representing the types of covered parties that may receive covered benefits under a policy or program."; + case _ACTCOVERAGETYPECODE: return "Definition: Set of codes indicating the type of insurance policy or program that pays for the cost of benefits provided to covered parties."; + case _ACTINSURANCEPOLICYCODE: return "Set of codes indicating the type of insurance policy or other source of funds to cover healthcare costs."; + case EHCPOL: return "Private insurance policy that provides coverage in addition to other policies (e.g. in addition to a Public Healthcare insurance policy)."; + case HSAPOL: return "Insurance policy that provides for an allotment of funds replenished on a periodic (e.g. annual) basis. The use of the funds under this policy is at the discretion of the covered party."; + case AUTOPOL: return "Insurance policy for injuries sustained in an automobile accident. Will also typically covered non-named parties to the policy, such as pedestrians and passengers."; + case COL: return "Definition: An automobile insurance policy under which the insurance company will cover the cost of damages to an automobile owned by the named insured that are caused by accident or intentionally by another party."; + case UNINSMOT: return "Definition: An automobile insurance policy under which the insurance company will indemnify a loss for which another motorist is liable if that motorist is unable to pay because he or she is uninsured. Coverage under the policy applies to bodily injury damages only. Injuries to the covered party caused by a hit-and-run driver are also covered."; + case PUBLICPOL: return "Insurance policy funded by a public health system such as a provincial or national health plan. Examples include BC MSP (British Columbia Medical Services Plan) OHIP (Ontario Health Insurance Plan), NHS (National Health Service)."; + case DENTPRG: return "Definition: A public or government health program that administers and funds coverage for dental care to assist program eligible who meet financial and health status criteria."; + case DISEASEPRG: return "Definition: A public or government health program that administers and funds coverage for health and social services to assist program eligible who meet financial and health status criteria related to a particular disease.\r\n\n \n Example: Reproductive health, sexually transmitted disease, and end renal disease programs."; + case CANPRG: return "Definition: A program that provides low-income, uninsured, and underserved women access to timely, high-quality screening and diagnostic services, to detect breast and cervical cancer at the earliest stages.\r\n\n \n Example: To improve women's access to screening for breast and cervical cancers, Congress passed the Breast and Cervical Cancer Mortality Prevention Act of 1990, which guided CDC in creating the National Breast and Cervical Cancer Early Detection Program (NBCCEDP), which provides access to critical breast and cervical cancer screening services for underserved women in the United States. An estimated 7 to 10% of U.S. women of screening age are eligible to receive NBCCEDP services. Federal guidelines establish an eligibility baseline to direct services to uninsured and underinsured women at or below 250% of federal poverty level; ages 18 to 64 for cervical screening; ages 40 to 64 for breast screening."; + case ENDRENAL: return "Definition: A public or government program that administers publicly funded coverage of kidney dialysis and kidney transplant services.\r\n\n Example: In the U.S., the Medicare End-stage Renal Disease program (ESRD), the National Kidney Foundation (NKF) American Kidney Fund (AKF) The Organ Transplant Fund."; + case HIVAIDS: return "Definition: Government administered and funded HIV-AIDS program for beneficiaries meeting financial and health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors.\r\n\n \n Example: In the U.S., the Ryan White program, which is administered by the Health Resources and Services Administration."; + case MANDPOL: return "mandatory health program"; + case MENTPRG: return "Definition: Government administered and funded mental health program for beneficiaries meeting financial and mental health status criteria. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors.\r\n\n \n Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA)."; + case SAFNET: return "Definition: Government administered and funded program to support provision of care to underserved populations through safety net clinics.\r\n\n \n Example: In the U.S., safety net providers such as federally qualified health centers (FQHC) receive funding under PHSA Section 330 grants administered by the Health Resources and Services Administration."; + case SUBPRG: return "Definition: Government administered and funded substance use program for beneficiaries meeting financial, substance use behavior, and health status criteria. Beneficiaries may be required to enroll as a result of legal proceedings. Administration, funding levels, eligibility criteria, covered benefits, provider types, and financial participation are typically set by a regulatory process. Payer responsibilities for administering the program may be delegated to contractors.\r\n\n \n Example: In the U.S., states receive funding for substance use programs from the Substance Abuse Mental Health Administration (SAMHSA)."; + case SUBSIDIZ: return "Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds."; + case SUBSIDMC: return "Definition: A government health program that provides coverage through managed care contracts for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds. \r\n\n \n Discussion: The structure and business processes for underwriting and administering a subsidized managed care program is further specified by the Underwriter and Payer Role.class and Role.code."; + case SUBSUPP: return "Definition: A government health program that provides coverage for health services to persons meeting eligibility criteria for a supplemental health policy or program such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds.\r\n\n \n Example: Supplemental health coverage program may cover the cost of a health program or policy financial participations, such as the copays and the premiums, and may provide coverage for services in addition to those covered under the supplemented health program or policy. In the U.S., Medicaid programs may pay the premium for a covered party who is also covered under the Medicare program or a private health policy.\r\n\n \n Discussion: The structure and business processes for underwriting and administering a subsidized supplemental retiree health program is further specified by the Underwriter and Payer Role.class and Role.code."; + case WCBPOL: return "Insurance policy for injuries sustained in the work place or in the course of employment."; + case _ACTINSURANCETYPECODE: return "Definition: Set of codes indicating the type of insurance policy. Insurance, in law and economics, is a form of risk management primarily used to hedge against the risk of potential financial loss. Insurance is defined as the equitable transfer of the risk of a potential loss, from one entity to another, in exchange for a premium and duty of care. A policy holder is an individual or an organization enters into a contract with an underwriter which stipulates that, in exchange for payment of a sum of money (a premium), one or more covered parties (insureds) is guaranteed compensation for losses resulting from certain perils under specified conditions. The underwriter analyzes the risk of loss, makes a decision as to whether the risk is insurable, and prices the premium accordingly. A policy provides benefits that indemnify or cover the cost of a loss incurred by a covered party, and may include coverage for services required to remediate a loss. An insurance policy contains pertinent facts about the policy holder, the insurance coverage, the covered parties, and the insurer. A policy may include exemptions and provisions specifying the extent to which the indemnification clause cannot be enforced for intentional tortious conduct of a covered party, e.g., whether the covered parties are jointly or severably insured.\r\n\n \n Discussion: In contrast to programs, an insurance policy has one or more policy holders, who own the policy. The policy holder may be the covered party, a relative of the covered party, a partnership, or a corporation, e.g., an employer. A subscriber of a self-insured health insurance policy is a policy holder. A subscriber of an employer sponsored health insurance policy is holds a certificate of coverage, but is not a policy holder; the policy holder is the employer. See CoveredRoleType."; + case _ACTHEALTHINSURANCETYPECODE: return "Definition: Set of codes indicating the type of health insurance policy that covers health services provided to covered parties. A health insurance policy is a written contract for insurance between the insurance company and the policyholder, and contains pertinent facts about the policy owner (the policy holder), the health insurance coverage, the insured subscribers and dependents, and the insurer. Health insurance is typically administered in accordance with a plan, which specifies (1) the type of health services and health conditions that will be covered under what circumstances (e.g., exclusion of a pre-existing condition, service must be deemed medically necessary; service must not be experimental; service must provided in accordance with a protocol; drug must be on a formulary; service must be prior authorized; or be a referral from a primary care provider); (2) the type and affiliation of providers (e.g., only allopathic physicians, only in network, only providers employed by an HMO); (3) financial participations required of covered parties (e.g., co-pays, coinsurance, deductibles, out-of-pocket); and (4) the manner in which services will be paid (e.g., under indemnity or fee-for-service health plans, the covered party typically pays out-of-pocket and then file a claim for reimbursement, while health plans that have contractual relationships with providers, i.e., network providers, typically do not allow the providers to bill the covered party for the cost of the service until after filing a claim with the payer and receiving reimbursement)."; + case DENTAL: return "Definition: A health insurance policy that that covers benefits for dental services."; + case DISEASE: return "Definition: A health insurance policy that covers benefits for healthcare services provided for named conditions under the policy, e.g., cancer, diabetes, or HIV-AIDS."; + case DRUGPOL: return "Definition: A health insurance policy that covers benefits for prescription drugs, pharmaceuticals, and supplies."; + case HIP: return "Definition: A health insurance policy that covers healthcare benefits by protecting covered parties from medical expenses arising from health conditions, sickness, or accidental injury as well as preventive care. Health insurance policies explicitly exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy.\r\n\n \n Discussion: Health insurance policies are offered by health insurance plans that typically reimburse providers for covered services on a fee-for-service basis, that is, a fee that is the allowable amount that a provider may charge. This is in contrast to managed care plans, which typically prepay providers a per-member/per-month amount or capitation as reimbursement for all covered services rendered. Health insurance plans include indemnity and healthcare services plans."; + case LTC: return "Definition: An insurance policy that covers benefits for long-term care services people need when they no longer can care for themselves. This may be due to an accident, disability, prolonged illness or the simple process of aging. Long-term care services assist with activities of daily living including:\r\n\n \n \n Help at home with day-to-day activities, such as cooking, cleaning, bathing and dressing\r\n\n \n \n Care in the community, such as in an adult day care facility\r\n\n \n \n Supervised care provided in an assisted living facility\r\n\n \n \n Skilled care provided in a nursing home"; + case MCPOL: return "Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well.\r\n\n Managed care policies specifically exclude coverage for losses insured under a disability policy, workers' compensation program, liability insurance (including automobile insurance); or for medical expenses, coverage for on-site medical clinics or for limited dental or vision benefits when these are provided under a separate policy.\r\n\n \n Discussion: Managed care policies are offered by managed care plans that contract with selected providers or health care organizations to provide comprehensive health care at a discount to covered parties and coordinate the financing and delivery of health care. Managed care uses medical protocols and procedures agreed on by the medical profession to be cost effective, also known as medical practice guidelines. Providers are typically reimbursed for covered services by a capitated amount on a per member per month basis that may reflect difference in the health status and level of services anticipated to be needed by the member."; + case POS: return "Definition: A policy for a health plan that has features of both an HMO and a FFS plan. Like an HMO, a POS plan encourages the use its HMO network to maintain discounted fees with participating providers, but recognizes that sometimes covered parties want to choose their own provider. The POS plan allows a covered party to use providers who are not part of the HMO network (non-participating providers). However, there is a greater cost associated with choosing these non-network providers. A covered party will usually pay deductibles and coinsurances that are substantially higher than the payments when he or she uses a plan provider. Use of non-participating providers often requires the covered party to pay the provider directly and then to file a claim for reimbursement, like in an FFS plan."; + case HMO: return "Definition: A policy for a health plan that provides coverage for health care only through contracted or employed physicians and hospitals located in particular geographic or service areas. HMOs emphasize prevention and early detection of illness. Eligibility to enroll in an HMO is determined by where a covered party lives or works."; + case PPO: return "Definition: A network-based, managed care plan that allows a covered party to choose any health care provider. However, if care is received from a \"preferred\" (participating in-network) provider, there are generally higher benefit coverage and lower deductibles."; + case MENTPOL: return "Definition: A health insurance policy that covers benefits for mental health services and prescriptions."; + case SUBPOL: return "Definition: A health insurance policy that covers benefits for substance use services."; + case VISPOL: return "Definition: Set of codes for a policy that provides coverage for health care expenses arising from vision services.\r\n\n A health insurance policy that covers benefits for vision care services, prescriptions, and products."; + case DIS: return "Definition: An insurance policy that provides a regular payment to compensate for income lost due to the covered party's inability to work because of illness or injury."; + case EWB: return "Definition: An insurance policy under a benefit plan run by an employer or employee organization for the purpose of providing benefits other than pension-related to employees and their families. Typically provides health-related benefits, benefits for disability, disease or unemployment, or day care and scholarship benefits, among others. An employer sponsored health policy includes coverage of health care expenses arising from sickness or accidental injury, coverage for on-site medical clinics or for dental or vision benefits, which are typically provided under a separate policy. Coverage excludes health care expenses covered by accident or disability, workers' compensation, liability or automobile insurance."; + case FLEXP: return "Definition: An insurance policy that covers qualified benefits under a Flexible Benefit plan such as group medical insurance, long and short term disability income insurance, group term life insurance for employees only up to $50,000 face amount, specified disease coverage such as a cancer policy, dental and/or vision insurance, hospital indemnity insurance, accidental death and dismemberment insurance, a medical expense reimbursement plan and a dependent care reimbursement plan.\r\n\n \n Discussion: See UnderwriterRoleTypeCode flexible benefit plan which is defined as a benefit plan that allows employees to choose from several life, health, disability, dental, and other insurance plans according to their individual needs. Also known as cafeteria plans. Authorized under Section 125 of the Revenue Act of 1978."; + case LIFE: return "Definition: A policy under which the insurer agrees to pay a sum of money upon the occurrence of the covered partys death. In return, the policyholder agrees to pay a stipulated amount called a premium at regular intervals. Life insurance indemnifies the beneficiary for the loss of the insurable interest that a beneficiary has in the life of a covered party. For persons related by blood, a substantial interest established through love and affection, and for all other persons, a lawful and substantial economic interest in having the life of the insured continue. An insurable interest is required when purchasing life insurance on another person. Specific exclusions are often written into the contract to limit the liability of the insurer; for example claims resulting from suicide or relating to war, riot and civil commotion.\r\n\n \n Discussion:A life insurance policy may be used by the covered party as a source of health care coverage in the case of a viatical settlement, which is the sale of a life insurance policy by the policy owner, before the policy matures. Such a sale, at a price discounted from the face amount of the policy but usually in excess of the premiums paid or current cash surrender value, provides the seller an immediate cash settlement. Generally, viatical settlements involve insured individuals with a life expectancy of less than two years. In countries without state-subsidized healthcare and high healthcare costs (e.g. United States), this is a practical way to pay extremely high health insurance premiums that severely ill people face. Some people are also familiar with life settlements, which are similar transactions but involve insureds with longer life expectancies (two to fifteen years)."; + case ANNU: return "Definition: A policy that, after an initial premium or premiums, pays out a sum at pre-determined intervals.\r\n\n For example, a policy holder may pay $10,000, and in return receive $150 each month until he dies; or $1,000 for each of 14 years or death benefits if he dies before the full term of the annuity has elapsed."; + case TLIFE: return "Definition: Life insurance under which the benefit is payable only if the insured dies during a specified period. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing."; + case ULIFE: return "Definition: Life insurance under which the benefit is payable upon the insuredaTMs death or diagnosis of a terminal illness. If an insured dies during that period, the beneficiary receives the death payments. If the insured survives, the policy ends and the beneficiary receives nothing"; + case PNC: return "Definition: A type of insurance that covers damage to or loss of the policyholderaTMs property by providing payments for damages to property damage or the injury or death of living subjects. The terms \"casualty\" and \"liability\" insurance are often used interchangeably. Both cover the policyholder's legal liability for damages caused to other persons and/or their property."; + case REI: return "Definition: An agreement between two or more insurance companies by which the risk of loss is proportioned. Thus the risk of loss is spread and a disproportionately large loss under a single policy does not fall on one insurance company. Acceptance by an insurer, called a reinsurer, of all or part of the risk of loss of another insurance company.\r\n\n \n Discussion: Reinsurance is a means by which an insurance company can protect itself against the risk of losses with other insurance companies. Individuals and corporations obtain insurance policies to provide protection for various risks (hurricanes, earthquakes, lawsuits, collisions, sickness and death, etc.). Reinsurers, in turn, provide insurance to insurance companies.\r\n\n For example, an HMO may purchase a reinsurance policy to protect itself from losing too much money from one insured's particularly expensive health care costs. An insurance company issuing an automobile liability policy, with a limit of $100,000 per accident may reinsure its liability in excess of $10,000. A fire insurance company which issues a large policy generally reinsures a portion of the risk with one or several other companies. Also called risk control insurance or stop-loss insurance."; + case SURPL: return "Definition: \n \r\n\n \n \n A risk or part of a risk for which there is no normal insurance market available.\r\n\n \n \n Insurance written by unauthorized insurance companies. Surplus lines insurance is insurance placed with unauthorized insurance companies through licensed surplus lines agents or brokers."; + case UMBRL: return "Definition: A form of insurance protection that provides additional liability coverage after the limits of your underlying policy are reached. An umbrella liability policy also protects you (the insured) in many situations not covered by the usual liability policies."; + case _ACTPROGRAMTYPECODE: return "Definition: A set of codes used to indicate coverage under a program. A program is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health, financial, and demographic status. Programs are typically established or permitted by legislation with provisions for ongoing government oversight. Regulations may mandate the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency may be charged with implementing the program in accordance to the regulation. Risk of loss under a program in most cases would not meet what an underwriter would consider an insurable risk, i.e., the risk is not random in nature, not financially measurable, and likely requires subsidization with government funds.\r\n\n \n Discussion: Programs do not have policy holders or subscribers. Program eligibles are enrolled based on health status, statutory eligibility, financial status, or age. Program eligibles who are covered parties under the program may be referred to as members, beneficiaries, eligibles, or recipients. Programs risk are underwritten by not for profit organizations such as governmental entities, and the beneficiaries typically do not pay for any or some portion of the cost of coverage. See CoveredPartyRoleType."; + case CHAR: return "Definition: A program that covers the cost of services provided directly to a beneficiary who typically has no other source of coverage without charge."; + case CRIME: return "Definition: A program that covers the cost of services provided to crime victims for injuries or losses related to the occurrence of a crime."; + case EAP: return "Definition: An employee assistance program is run by an employer or employee organization for the purpose of providing benefits and covering all or part of the cost for employees to receive counseling, referrals, and advice in dealing with stressful issues in their lives. These may include substance abuse, bereavement, marital problems, weight issues, or general wellness issues. The services are usually provided by a third-party, rather than the company itself, and the company receives only summary statistical data from the service provider. Employee's names and services received are kept confidential."; + case GOVEMP: return "Definition: A set of codes used to indicate a government program that is an organized structure for administering and funding coverage of a benefit package for covered parties meeting eligibility criteria, typically related to employment, health and financial status. Government programs are established or permitted by legislation with provisions for ongoing government oversight. Regulation mandates the structure of the program, the manner in which it is funded and administered, covered benefits, provider types, eligibility criteria and financial participation. A government agency is charged with implementing the program in accordance to the regulation\r\n\n \n Example: Federal employee health benefit program in the U.S."; + case HIRISK: return "Definition: A government program that provides health coverage to individuals who are considered medically uninsurable or high risk, and who have been denied health insurance due to a serious health condition. In certain cases, it also applies to those who have been quoted very high premiums a\" again, due to a serious health condition. The pool charges premiums for coverage. Because the pool covers high-risk people, it incurs a higher level of claims than premiums can cover. The insurance industry pays into the pool to make up the difference and help it remain viable."; + case IND: return "Definition: Services provided directly and through contracted and operated indigenous peoples health programs.\r\n\n \n Example: Indian Health Service in the U.S."; + case MILITARY: return "Definition: A government program that provides coverage for health services to military personnel, retirees, and dependents. A covered party who is a subscriber can choose from among Fee-for-Service (FFS) plans, and their Preferred Provider Organizations (PPO), or Plans offering a Point of Service (POS) Product, or Health Maintenance Organizations.\r\n\n \n Example: In the U.S., TRICARE, CHAMPUS."; + case RETIRE: return "Definition: A government mandated program with specific eligibility requirements based on premium contributions made during employment, length of employment, age, and employment status, e.g., being retired, disabled, or a dependent of a covered party under this program. Benefits typically include ambulatory, inpatient, and long-term care, such as hospice care, home health care and respite care."; + case SOCIAL: return "Definition: A social service program funded by a public or governmental entity.\r\n\n \n Example: Programs providing habilitation, food, lodging, medicine, transportation, equipment, devices, products, education, training, counseling, alteration of living or work space, and other resources to persons meeting eligibility criteria."; + case VET: return "Definition: Services provided directly and through contracted and operated veteran health programs."; + case _ACTDETECTEDISSUEMANAGEMENTCODE: return "Codes dealing with the management of Detected Issue observations"; + case _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE: return "Codes dealing with the management of Detected Issue observations for the administrative and patient administrative acts domains."; + case _AUTHORIZATIONISSUEMANAGEMENTCODE: return "Authorization Issue Management Code"; + case EMAUTH: return "Used to temporarily override normal authorization rules to gain access to data in a case of emergency. Use of this override code will typically be monitored, and a procedure to verify its proper use may be triggered when used."; + case _21: return "Description: Indicates that the permissions have been externally verified and the request should be processed."; + case _1: return "Confirmed drug therapy appropriate"; + case _19: return "Consulted other supplier/pharmacy, therapy confirmed"; + case _2: return "Assessed patient, therapy is appropriate"; + case _22: return "Description: The patient has the appropriate indication or diagnosis for the action to be taken."; + case _23: return "Description: It has been confirmed that the appropriate pre-requisite therapy has been tried."; + case _3: return "Patient gave adequate explanation"; + case _4: return "Consulted other supply source, therapy still appropriate"; + case _5: return "Consulted prescriber, therapy confirmed"; + case _6: return "Consulted prescriber and recommended change, prescriber declined"; + case _7: return "Concurrent therapy triggering alert is no longer on-going or planned"; + case _14: return "Confirmed supply action appropriate"; + case _15: return "Patient's existing supply was lost/wasted"; + case _16: return "Supply date is due to patient vacation"; + case _17: return "Supply date is intended to carry patient over weekend"; + case _18: return "Supply is intended for use during a leave of absence from an institution."; + case _20: return "Description: Supply is different than expected as an additional quantity has been supplied in a separate dispense."; + case _8: return "Order is performed as issued, but other action taken to mitigate potential adverse effects"; + case _10: return "Provided education or training to the patient on appropriate therapy use"; + case _11: return "Instituted an additional therapy to mitigate potential negative effects"; + case _12: return "Suspended existing therapy that triggered interaction for the duration of this therapy"; + case _13: return "Aborted existing therapy that triggered interaction."; + case _9: return "Arranged to monitor patient for adverse effects"; + case _ACTEXPOSURECODE: return "Concepts that identify the type or nature of exposure interaction. Examples include \"household\", \"care giver\", \"intimate partner\", \"common space\", \"common substance\", etc. to further describe the nature of interaction."; + case CHLDCARE: return "Description: Exposure participants' interaction occurred in a child care setting"; + case CONVEYNC: return "Description: An interaction where the exposure participants traveled in/on the same vehicle (not necessarily concurrently, e.g. both are passengers of the same plane, but on different flights of that plane)."; + case HLTHCARE: return "Description: Exposure participants' interaction occurred during the course of health care delivery or in a health care delivery setting, but did not involve the direct provision of care (e.g. a janitor cleaning a patient's hospital room)."; + case HOMECARE: return "Description: Exposure interaction occurred in context of one providing care for the other, i.e. a babysitter providing care for a child, a home-care aide providing assistance to a paraplegic."; + case HOSPPTNT: return "Description: Exposure participants' interaction occurred when both were patients being treated in the same (acute) health care delivery facility."; + case HOSPVSTR: return "Description: Exposure participants' interaction occurred when one visited the other who was a patient being treated in a health care delivery facility."; + case HOUSEHLD: return "Description: Exposure interaction occurred in context of domestic interaction, i.e. both participants reside in the same household."; + case INMATE: return "Description: Exposure participants' interaction occurred in the course of one or both participants being incarcerated at a correctional facility"; + case INTIMATE: return "Description: Exposure interaction was intimate, i.e. participants are intimate companions (e.g. spouses, domestic partners)."; + case LTRMCARE: return "Description: Exposure participants' interaction occurred in the course of one or both participants being resident at a long term care facility (second participant may be a visitor, worker, resident or a physical place or object within the facility)."; + case PLACE: return "Description: An interaction where the exposure participants were both present in the same location/place/space."; + case PTNTCARE: return "Description: Exposure participants' interaction occurred during the course of health care delivery by a provider (e.g. a physician treating a patient in her office)."; + case SCHOOL2: return "Description: Exposure participants' interaction occurred in an academic setting (e.g., participants are fellow students, or student and teacher)."; + case SOCIAL2: return "Description: An interaction where the exposure participants are social associates or members of the same extended family"; + case SUBSTNCE: return "Description: An interaction where the exposure participants shared or co-used a common substance (e.g. drugs, needles, or common food item)."; + case TRAVINT: return "Description: An interaction where the exposure participants traveled together in/on the same vehicle/trip (e.g. concurrent co-passengers)."; + case WORK2: return "Description: Exposure interaction occurred in a work setting, i.e. participants are co-workers."; + case _ACTFINANCIALTRANSACTIONCODE: return "ActFinancialTransactionCode"; + case CHRG: return "A type of transaction that represents a charge for a service or product. Expressed in monetary terms."; + case REV: return "A type of transaction that represents a reversal of a previous charge for a service or product. Expressed in monetary terms. It has the opposite effect of a standard charge."; + case _ACTINCIDENTCODE: return "Set of codes indicating the type of incident or accident."; + case MVA: return "Incident or accident as the result of a motor vehicle accident"; + case SCHOOL: return "Incident or accident is the result of a school place accident."; + case SPT: return "Incident or accident is the result of a sporting accident."; + case WPA: return "Incident or accident is the result of a work place accident"; + case _ACTINFORMATIONACCESSCODE: return "Description: The type of health information to which the subject of the information or the subject's delegate consents or dissents."; + case ACADR: return "Description: Provide consent to collect, use, disclose, or access adverse drug reaction information for a patient."; + case ACALL: return "Description: Provide consent to collect, use, disclose, or access all information for a patient."; + case ACALLG: return "Description: Provide consent to collect, use, disclose, or access allergy information for a patient."; + case ACCONS: return "Description: Provide consent to collect, use, disclose, or access informational consent information for a patient."; + case ACDEMO: return "Description: Provide consent to collect, use, disclose, or access demographics information for a patient."; + case ACDI: return "Description: Provide consent to collect, use, disclose, or access diagnostic imaging information for a patient."; + case ACIMMUN: return "Description: Provide consent to collect, use, disclose, or access immunization information for a patient."; + case ACLAB: return "Description: Provide consent to collect, use, disclose, or access lab test result information for a patient."; + case ACMED: return "Description: Provide consent to collect, use, disclose, or access medical condition information for a patient."; + case ACMEDC: return "Definition: Provide consent to view or access medical condition information for a patient."; + case ACMEN: return "Description:Provide consent to collect, use, disclose, or access mental health information for a patient."; + case ACOBS: return "Description: Provide consent to collect, use, disclose, or access common observation information for a patient."; + case ACPOLPRG: return "Description: Provide consent to collect, use, disclose, or access coverage policy or program for a patient."; + case ACPROV: return "Description: Provide consent to collect, use, disclose, or access provider information for a patient."; + case ACPSERV: return "Description: Provide consent to collect, use, disclose, or access professional service information for a patient."; + case ACSUBSTAB: return "Description:Provide consent to collect, use, disclose, or access substance abuse information for a patient."; + case _ACTINFORMATIONACCESSCONTEXTCODE: return "Concepts conveying the context in which authorization given under jurisdictional law, by organizational policy, or by a patient consent directive permits the collection, access, use or disclosure of specified patient health information."; + case INFAUT: return "Authorization to collect, access, use, or disclose specified patient health information in accordance with jurisdictional law, organizational policy, or a patient's consent directive, which may be implied, deemed, opt-in, opt-out, or explicit."; + case INFCON: return "Authorization to collect, access, use, or disclose specified patient health information as explicitly consented to by the subject of the information or the subject's representative."; + case INFCRT: return "Authorization to collect, access, use, or disclose specified patient health information in accordance with judicial system protocol, such as in the case of a subpoena or court order."; + case INFDNG: return "Authorization to collect, access, use, or disclose specified patient health information where deemed necessary to avert potential danger to other persons in accordance with jurisdictional law, organizational policy, or standards of practice. For example, disclosure about a person threatening violence."; + case INFEMER: return "Authorization to collect, access, use, or disclose specified patient health information in accordance with emergency information transfer protocol dictated by jurisdictional law, organization policy, or standards of practice. For example, sharing of health information during disaster response."; + case INFPWR: return "Authorization to collect, access, use, or disclose specified patient health information necessary to avert potential public welfare risk in accordance with jurisdictional law, organizational policy, or standards of practice. For example, reporting that a person is a victim of abuse or demonstrating suicidal tendencies."; + case INFREG: return "Authorization to collect, access, use, or disclose specified patient health information for public health, welfare, and safety purposes in accordance with jurisdictional law, organizational policy, or standards of practice. For example, public health reporting of notifiable conditions."; + case _ACTINFORMATIONCATEGORYCODE: return "Definition:Indicates the set of information types which may be manipulated or referenced, such as for recommending access restrictions."; + case ALLCAT: return "Description: All patient information."; + case ALLGCAT: return "Definition:All information pertaining to a patient's allergy and intolerance records."; + case ARCAT: return "Description: All information pertaining to a patient's adverse drug reactions."; + case COBSCAT: return "Definition:All information pertaining to a patient's common observation records (height, weight, blood pressure, temperature, etc.)."; + case DEMOCAT: return "Definition:All information pertaining to a patient's demographics (such as name, date of birth, gender, address, etc)."; + case DICAT: return "Definition:All information pertaining to a patient's diagnostic image records (orders & results)."; + case IMMUCAT: return "Definition:All information pertaining to a patient's vaccination records."; + case LABCAT: return "Description: All information pertaining to a patient's lab test records (orders & results)"; + case MEDCCAT: return "Definition:All information pertaining to a patient's medical condition records."; + case MENCAT: return "Description: All information pertaining to a patient's mental health records."; + case PSVCCAT: return "Definition:All information pertaining to a patient's professional service records (such as smoking cessation, counseling, medication review, mental health)."; + case RXCAT: return "Definition:All information pertaining to a patient's medication records (orders, dispenses and other active medications)."; + case _ACTINVOICEELEMENTCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results."; + case _ACTINVOICEADJUDICATIONPAYMENTCODE: return "Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee and other cost elements such as bonus, retroactive adjustment and transaction fees."; + case _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE: return "Codes representing adjustments to a Payment Advice such as retroactive, clawback, garnishee, etc."; + case ALEC: return "Payment initiated by the payor as the result of adjudicating a submitted invoice that arrived to the payor from an electronic source that did not provide a conformant set of HL7 messages (e.g. web claim submission)."; + case BONUS: return "Bonus payments based on performance, volume, etc. as agreed to by the payor."; + case CFWD: return "An amount still owing to the payor but the payment is 0$ and this cannot be settled until a future payment is made."; + case EDU: return "Fees deducted on behalf of a payee for tuition and continuing education."; + case EPYMT: return "Fees deducted on behalf of a payee for charges based on a shorter payment frequency (i.e. next day versus biweekly payments."; + case GARN: return "Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee."; + case INVOICE: return "Payment is based on a payment intent for a previously submitted Invoice, based on formal adjudication results.."; + case PINV: return "Payment initiated by the payor as the result of adjudicating a paper (original, may have been faxed) invoice."; + case PPRD: return "An amount that was owed to the payor as indicated, by a carry forward adjusment, in a previous payment advice"; + case PROA: return "Professional association fee that is collected by the payor from the practitioner/provider on behalf of the association"; + case RECOV: return "Retroactive adjustment such as fee rate adjustment due to contract negotiations."; + case RETRO: return "Bonus payments based on performance, volume, etc. as agreed to by the payor."; + case TRAN: return "Fees deducted on behalf of a payee for charges based on a per-transaction or time-period (e.g. monthly) fee."; + case _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE: return "Codes representing a grouping of invoice elements (totals, sub-totals), reported through a Payment Advice or a Statement of Financial Activity (SOFA). The code can represent summaries by day, location, payee, etc."; + case INVTYPE: return "Transaction counts and value totals by invoice type (e.g. RXDINV - Pharmacy Dispense)"; + case PAYEE: return "Transaction counts and value totals by each instance of an invoice payee."; + case PAYOR: return "Transaction counts and value totals by each instance of an invoice payor."; + case SENDAPP: return "Transaction counts and value totals by each instance of a messaging application on a single processor. It is a registered identifier known to the receivers."; + case _ACTINVOICEDETAILCODE: return "Codes representing a service or product that is being invoiced (billed). The code can represent such concepts as \"office visit\", \"drug X\", \"wheelchair\" and other billable items such as taxes, service charges and discounts."; + case _ACTINVOICEDETAILCLINICALPRODUCTCODE: return "An identifying data string for healthcare products."; + case UNSPSC: return "Description:United Nations Standard Products and Services Classification, managed by Uniform Code Council (UCC): www.unspsc.org"; + case _ACTINVOICEDETAILDRUGPRODUCTCODE: return "An identifying data string for A substance used as a medication or in the preparation of medication."; + case GTIN: return "Description:Global Trade Item Number is an identifier for trade items developed by GS1 (comprising the former EAN International and Uniform Code Council)."; + case UPC: return "Description:Universal Product Code is one of a wide variety of bar code languages widely used in the United States and Canada for items in stores."; + case _ACTINVOICEDETAILGENERICCODE: return "The detail item codes to identify charges or changes to the total billing of a claim due to insurance rules and payments."; + case _ACTINVOICEDETAILGENERICADJUDICATORCODE: return "The billable item codes to identify adjudicator specified components to the total billing of a claim."; + case COIN: return "That portion of the eligible charges which a covered party must pay for each service and/or product. It is a percentage of the eligible amount for the service/product that is typically charged after the covered party has met the policy deductible. This amount represents the covered party's coinsurance that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results."; + case COPAYMENT: return "That portion of the eligible charges which a covered party must pay for each service and/or product. It is a defined amount per service/product of the eligible amount for the service/product. This amount represents the covered party's copayment that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results."; + case DEDUCTIBLE: return "That portion of the eligible charges which a covered party must pay in a particular period (e.g. annual) before the benefits are payable by the adjudicator. This amount represents the covered party's deductible that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results."; + case PAY: return "The guarantor, who may be the patient, pays the entire charge for a service. Reasons for such action may include: there is no insurance coverage for the service (e.g. cosmetic surgery); the patient wishes to self-pay for the service; or the insurer denies payment for the service due to contractual provisions such as the need for prior authorization."; + case SPEND: return "That total amount of the eligible charges which a covered party must periodically pay for services and/or products prior to the Medicaid program providing any coverage. This amount represents the covered party's spend down that is applied to a particular adjudication result. It is expressed as a negative dollar amount in adjudication results"; + case COINS: return "The covered party pays a percentage of the cost of covered services."; + case _ACTINVOICEDETAILGENERICMODIFIERCODE: return "The billable item codes to identify modifications to a billable item charge. As for example after hours increase in the office visit fee."; + case AFTHRS: return "Premium paid on service fees in compensation for practicing outside of normal working hours."; + case ISOL: return "Premium paid on service fees in compensation for practicing in a remote location."; + case OOO: return "Premium paid on service fees in compensation for practicing at a location other than normal working location."; + case _ACTINVOICEDETAILGENERICPROVIDERCODE: return "The billable item codes to identify provider supplied charges or changes to the total billing of a claim."; + case CANCAPT: return "A charge to compensate the provider when a patient cancels an appointment with insufficient time for the provider to make another appointment with another patient."; + case DSC: return "A reduction in the amount charged as a percentage of the amount. For example a 5% discount for volume purchase."; + case ESA: return "A premium on a service fee is requested because, due to extenuating circumstances, the service took an extraordinary amount of time or supplies."; + case FFSTOP: return "Under agreement between the parties (payor and provider), a guaranteed level of income is established for the provider over a specific, pre-determined period of time. The normal course of business for the provider is submission of fee-for-service claims. Should the fee-for-service income during the specified period of time be less than the agreed to amount, a top-up amount is paid to the provider equal to the difference between the fee-for-service total and the guaranteed income amount for that period of time. The details of the agreement may specify (or not) a requirement for repayment to the payor in the event that the fee-for-service income exceeds the guaranteed amount."; + case FNLFEE: return "Anticipated or actual final fee associated with treating a patient."; + case FRSTFEE: return "Anticipated or actual initial fee associated with treating a patient."; + case MARKUP: return "An increase in the amount charged as a percentage of the amount. For example, 12% markup on product cost."; + case MISSAPT: return "A charge to compensate the provider when a patient does not show for an appointment."; + case PERFEE: return "Anticipated or actual periodic fee associated with treating a patient. For example, expected billing cycle such as monthly, quarterly. The actual period (e.g. monthly, quarterly) is specified in the unit quantity of the Invoice Element."; + case PERMBNS: return "The amount for a performance bonus that is being requested from a payor for the performance of certain services (childhood immunizations, influenza immunizations, mammograms, pap smears) on a sliding scale. That is, for 90% of childhood immunizations to a maximum of $2200/yr. An invoice is created at the end of the service period (one year) and a code is submitted indicating the percentage achieved and the dollar amount claimed."; + case RESTOCK: return "A charge is requested because the patient failed to pick up the item and it took an amount of time to return it to stock for future use."; + case TRAVEL: return "A charge to cover the cost of travel time and/or cost in conjuction with providing a service or product. It may be charged per kilometer or per hour based on the effective agreement."; + case URGENT: return "Premium paid on service fees in compensation for providing an expedited response to an urgent situation."; + case _ACTINVOICEDETAILTAXCODE: return "The billable item codes to identify modifications to a billable item charge by a tax factor applied to the amount. As for example 7% provincial sales tax."; + case FST: return "Federal tax on transactions such as the Goods and Services Tax (GST)"; + case HST: return "Joint Federal/Provincial Sales Tax"; + case PST: return "Tax levied by the provincial or state jurisdiction such as Provincial Sales Tax"; + case _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE: return "An identifying data string for medical facility accommodations."; + case _ACTENCOUNTERACCOMMODATIONCODE: return "Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type."; + case _HL7ACCOMMODATIONCODE: return "Description:Accommodation type. In Intent mood, represents the accommodation type requested. In Event mood, represents accommodation assigned/used. In Definition mood, represents the available accommodation type."; + case I: return "Accommodations used in the care of diseases that are transmitted through casual contact or respiratory transmission."; + case P: return "Accommodations in which there is only 1 bed."; + case S: return "Uniquely designed and elegantly decorated accommodations with many amenities available for an additional charge."; + case SP: return "Accommodations in which there are 2 beds."; + case W: return "Accommodations in which there are 3 or more beds."; + case _ACTINVOICEDETAILCLINICALSERVICECODE: return "An identifying data string for healthcare procedures."; + case _ACTINVOICEGROUPCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results.\r\n\n Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements."; + case _ACTINVOICEINTERGROUPCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results.\r\n\n Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements.\r\n\n The domain is only specified for an intermediate invoice element group (non-root or non-top level) for an Invoice."; + case CPNDDRGING: return "A grouping of invoice element groups and details including the ones specifying the compound ingredients being invoiced. It may also contain generic detail items such as markup."; + case CPNDINDING: return "A grouping of invoice element details including the one specifying an ingredient drug being invoiced. It may also contain generic detail items such as tax or markup."; + case CPNDSUPING: return "A grouping of invoice element groups and details including the ones specifying the compound supplies being invoiced. It may also contain generic detail items such as markup."; + case DRUGING: return "A grouping of invoice element details including the one specifying the drug being invoiced. It may also contain generic detail items such as markup."; + case FRAMEING: return "A grouping of invoice element details including the ones specifying the frame fee and the frame dispensing cost that are being invoiced."; + case LENSING: return "A grouping of invoice element details including the ones specifying the lens fee and the lens dispensing cost that are being invoiced."; + case PRDING: return "A grouping of invoice element details including the one specifying the product (good or supply) being invoiced. It may also contain generic detail items such as tax or discount."; + case _ACTINVOICEROOTGROUPCODE: return "Type of invoice element that is used to assist in describing an Invoice that is either submitted for adjudication or for which is returned on adjudication results.\r\n\n Invoice elements of this type signify a grouping of one or more children (detail) invoice elements. They do not have intrinsic costing associated with them, but merely reflect the sum of all costing for it's immediate children invoice elements.\r\n\n Codes from this domain reflect the type of Invoice such as Pharmacy Dispense, Clinical Service and Clinical Product. The domain is only specified for the root (top level) invoice element group for an Invoice."; + case CPINV: return "Clinical product invoice where the Invoice Grouping contains one or more billable item and is supported by clinical product(s).\r\n\n For example, a crutch or a wheelchair."; + case CSINV: return "Clinical Services Invoice which can be used to describe a single service, multiple services or repeated services.\r\n\n [1] Single Clinical services invoice where the Invoice Grouping contains one billable item and is supported by one clinical service.\r\n\n For example, a single service for an office visit or simple clinical procedure (e.g. knee mobilization).\r\n\n [2] Multiple Clinical services invoice where the Invoice Grouping contains more than one billable item, supported by one or more clinical services. The services can be distinct and over multiple dates, but for the same patient. This type of invoice includes a series of treatments which must be adjudicated together.\r\n\n For example, an adjustment and ultrasound for a chiropractic session where fees are associated for each of the services and adjudicated (invoiced) together.\r\n\n [3] Repeated Clinical services invoice where the Invoice Grouping contains one or more billable item, supported by the same clinical service repeated over a period of time.\r\n\n For example, the same Chiropractic adjustment (service or treatment) delivered on 3 separate occasions over a period of time at the discretion of the provider (e.g. month)."; + case CSPINV: return "A clinical Invoice Grouping consisting of one or more services and one or more product. Billing for these service(s) and product(s) are supported by multiple clinical billable events (acts).\r\n\n All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator.\r\n\n For example , a brace (product) invoiced together with the fitting (service)."; + case FININV: return "Invoice Grouping without clinical justification. These will not require identification of participants and associations from a clinical context such as patient and provider.\r\n\n Examples are interest charges and mileage."; + case OHSINV: return "A clinical Invoice Grouping consisting of one or more oral health services. Billing for these service(s) are supported by multiple clinical billable events (acts).\r\n\n All items in the Invoice Grouping must be adjudicated together to be acceptable to the Adjudicator."; + case PAINV: return "HealthCare facility preferred accommodation invoice."; + case RXCINV: return "Pharmacy dispense invoice for a compound."; + case RXDINV: return "Pharmacy dispense invoice not involving a compound"; + case SBFINV: return "Clinical services invoice where the Invoice Group contains one billable item for multiple clinical services in one or more sessions."; + case VRXINV: return "Vision dispense invoice for up to 2 lens (left and right), frame and optional discount. Eye exams are invoiced as a clinical service invoice."; + case _ACTINVOICEELEMENTSUMMARYCODE: return "Identifies the different types of summary information that can be reported by queries dealing with Statement of Financial Activity (SOFA). The summary information is generally used to help resolve balance discrepancies between providers and payors."; + case _INVOICEELEMENTADJUDICATED: return "Total counts and total net amounts adjudicated for all Invoice Groupings that were adjudicated within a time period based on the adjudication date of the Invoice Grouping."; + case ADNFPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically."; + case ADNFPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted electronically."; + case ADNFPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNFPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNFSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically."; + case ADNFSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently nullified in the specified period and submitted electronically."; + case ADNFSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNFSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date), subsequently cancelled in the specified period and submitted manually."; + case ADNPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADNPPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADNPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case ADNPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADNPSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case ADPPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADPPPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable prior to the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADPPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case ADPPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADPPSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as payable during the specified time period (based on adjudication date) that match a specified payee (e.g. pay provider) and submitted manually."; + case ADRFPPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically."; + case ADRFPPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted electronically."; + case ADRFPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually."; + case ADRFPPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused prior to the specified time period (based on adjudication date) and submitted manually."; + case ADRFSPELAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically."; + case ADRFSPELCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted electronically."; + case ADRFSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually."; + case ADRFSPMNCT: return "Identifies the total number of all Invoice Groupings that were adjudicated as refused during the specified time period (based on adjudication date) and submitted manually."; + case _INVOICEELEMENTPAID: return "Total counts and total net amounts paid for all Invoice Groupings that were paid within a time period based on the payment date."; + case PDNFPPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically."; + case PDNFPPELCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically."; + case PDNFPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNFPPMNCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNFSPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted electronically."; + case PDNFSPELCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently cancelled in the specified period and submitted electronically."; + case PDNFSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNFSPMNCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date), subsequently nullified in the specified period and submitted manually."; + case PDNPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPPPELCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDNPPPMNCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDNPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPSPELCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted electronically."; + case PDNPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDNPSPMNCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that do not match a specified payee (e.g. pay patient) and submitted manually."; + case PDPPPPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPPPELCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPPPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case PDPPPPMNCT: return "Identifies the total number of all Invoice Groupings that were paid prior to the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case PDPPSPELAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPSPELCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted electronically."; + case PDPPSPMNAT: return "Identifies the total net amount of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case PDPPSPMNCT: return "Identifies the total number of all Invoice Groupings that were paid during the specified time period (based on payment date) that match a specified payee (e.g. pay provider) and submitted manually."; + case _INVOICEELEMENTSUBMITTED: return "Total counts and total net amounts billed for all Invoice Groupings that were submitted within a time period. Adjudicated invoice elements are included."; + case SBBLELAT: return "Identifies the total net amount billed for all submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBBLELCT: return "Identifies the total number of submitted Invoice Groupings within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBNFELAT: return "Identifies the total net amount billed for all submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBNFELCT: return "Identifies the total number of submitted Invoice Groupings that were nullified within a time period and submitted electronically. Adjudicated invoice elements are included."; + case SBPDELAT: return "Identifies the total net amount billed for all submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included."; + case SBPDELCT: return "Identifies the total number of submitted Invoice Groupings that are pended or held by the payor, within a time period and submitted electronically. Adjudicated invoice elements are not included."; + case _ACTINVOICEOVERRIDECODE: return "Includes coded responses that will occur as a result of the adjudication of an electronic invoice at a summary level and provides guidance on interpretation of the referenced adjudication results."; + case COVGE: return "Insurance coverage problems have been encountered. Additional explanation information to be supplied."; + case EFORM: return "Electronic form with supporting or additional information to follow."; + case FAX: return "Fax with supporting or additional information to follow."; + case GFTH: return "The medical service was provided to a patient in good faith that they had medical coverage, although no evidence of coverage was available before service was rendered."; + case LATE: return "Knowingly over the payor's published time limit for this invoice possibly due to a previous payor's delays in processing. Additional reason information will be supplied."; + case MANUAL: return "Manual review of the invoice is requested. Additional information to be supplied. This may be used in the case of an appeal."; + case OOJ: return "The medical service and/or product was provided to a patient that has coverage in another jurisdiction."; + case ORTHO: return "The service provided is required for orthodontic purposes. If the covered party has orthodontic coverage, then the service may be paid."; + case PAPER: return "Paper documentation (or other physical format) with supporting or additional information to follow."; + case PIE: return "Public Insurance has been exhausted. Invoice has not been sent to Public Insuror and therefore no Explanation Of Benefits (EOB) is provided with this Invoice submission."; + case PYRDELAY: return "Allows provider to explain lateness of invoice to a subsequent payor."; + case REFNR: return "Rules of practice do not require a physician's referral for the provider to perform a billable service."; + case REPSERV: return "The same service was delivered within a time period that would usually indicate a duplicate billing. However, the repeated service is a medical necessity and therefore not a duplicate."; + case UNRELAT: return "The service provided is not related to another billed service. For example, 2 unrelated services provided on the same day to the same patient which may normally result in a refused payment for one of the items."; + case VERBAUTH: return "The provider has received a verbal permission from an authoritative source to perform the service or supply the item being invoiced."; + case _ACTLISTCODE: return "Provides codes associated with ActClass value of LIST (working list)"; + case _ACTOBSERVATIONLIST: return "ActObservationList"; + case CARELIST: return "List of acts representing a care plan. The acts can be in a varierty of moods including event (EVN) to record acts that have been carried out as part of the care plan."; + case CONDLIST: return "List of condition observations."; + case INTOLIST: return "List of intolerance observations."; + case PROBLIST: return "List of problem observations."; + case RISKLIST: return "List of risk factor observations."; + case GOALLIST: return "List of observations in goal mood."; + case _ACTTHERAPYDURATIONWORKINGLISTCODE: return "Codes used to identify different types of 'duration-based' working lists. Examples include \"Continuous/Chronic\", \"Short-Term\" and \"As-Needed\"."; + case _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE: return "Definition:A collection of concepts that identifies different types of 'duration-based' mediation working lists.\r\n\n \n Examples:\"Continuous/Chronic\" \"Short-Term\" and \"As Needed\""; + case ACU: return "Definition:A list of medications which the patient is only expected to consume for the duration of the current order or limited set of orders and which is not expected to be renewed."; + case CHRON: return "Definition:A list of medications which are expected to be continued beyond the present order and which the patient should be assumed to be taking unless explicitly stopped."; + case ONET: return "Definition:A list of medications which the patient is intended to be administered only once."; + case PRN: return "Definition:A list of medications which the patient will consume intermittently based on the behavior of the condition for which the medication is indicated."; + case MEDLIST: return "List of medications."; + case CURMEDLIST: return "List of current medications."; + case DISCMEDLIST: return "List of discharge medications."; + case HISTMEDLIST: return "Historical list of medications."; + case _ACTMONITORINGPROTOCOLCODE: return "Identifies types of monitoring programs"; + case CTLSUB: return "A monitoring program that focuses on narcotics and/or commonly abused substances that are subject to legal restriction."; + case INV: return "Definition:A monitoring program that focuses on a drug which is under investigation and has not received regulatory approval for the condition being investigated"; + case LU: return "Description:A drug that can be prescribed (and reimbursed) only if it meets certain criteria."; + case OTC: return "Medicines designated in this way may be supplied for patient use without a prescription. The exact form of categorisation will vary in different realms."; + case RX: return "Some form of prescription is required before the related medicine can be supplied for a patient. The exact form of regulation will vary in different realms."; + case SA: return "Definition:A drug that requires prior approval (to be reimbursed) before being dispensed"; + case SAC: return "Description:A drug that requires special access permission to be prescribed and dispensed."; + case _ACTNONOBSERVATIONINDICATIONCODE: return "Description:Concepts representing indications (reasons for clinical action) other than diagnosis and symptoms."; + case IND01: return "Description:Contrast agent required for imaging study."; + case IND02: return "Description:Provision of prescription or direction to consume a product for purposes of bowel clearance in preparation for a colonoscopy."; + case IND03: return "Description:Provision of medication as a preventative measure during a treatment or other period of increased risk."; + case IND04: return "Description:Provision of medication during pre-operative phase; e.g., antibiotics before dental surgery or bowel prep before colon surgery."; + case IND05: return "Description:Provision of medication for pregnancy --e.g., vitamins, antibiotic treatments for vaginal tract colonization, etc."; + case _ACTOBSERVATIONVERIFICATIONTYPE: return "Identifies the type of verification investigation being undertaken with respect to the subject of the verification activity.\r\n\n \n Examples:\n \r\n\n \n \n Verification of eligibility for coverage under a policy or program - aka enrolled/covered by a policy or program\r\n\n \n \n Verification of record - e.g., person has record in an immunization registry\r\n\n \n \n Verification of enumeration - e.g. NPI\r\n\n \n \n Verification of Board Certification - provider specific\r\n\n \n \n Verification of Certification - e.g. JAHCO, NCQA, URAC\r\n\n \n \n Verification of Conformance - e.g. entity use with HIPAA, conformant to the CCHIT EHR system criteria\r\n\n \n \n Verification of Provider Credentials\r\n\n \n \n Verification of no adverse findings - e.g. on National Provider Data Bank, Health Integrity Protection Data Base (HIPDB)"; + case VFPAPER: return "Definition:Indicates that the paper version of the record has, should be or is being verified against the electronic version."; + case _ACTPAYMENTCODE: return "Code identifying the method or the movement of payment instructions.\r\n\n Codes are drawn from X12 data element 591 (PaymentMethodCode)"; + case ACH: return "Automated Clearing House (ACH)."; + case CHK: return "A written order to a bank to pay the amount specified from funds on deposit."; + case DDP: return "Electronic Funds Transfer (EFT) deposit into the payee's bank account"; + case NON: return "Non-Payment Data."; + case _ACTPHARMACYSUPPLYTYPE: return "Identifies types of dispensing events"; + case DF: return "A fill providing sufficient supply for one day"; + case EM: return "A supply action where there is no 'valid' order for the supplied medication. E.g. Emergency vacation supply, weekend supply (when prescriber is unavailable to provide a renewal prescription)"; + case SO: return "An emergency supply where the expectation is that a formal order authorizing the supply will be provided at a later date."; + case FF: return "The initial fill against an order. (This includes initial fills against refill orders.)"; + case FFC: return "A first fill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets)."; + case FFP: return "A first fill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.)"; + case FFSS: return "A first fill where the strength supplied is less than the ordered strength. (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case TF: return "A fill where a small portion is provided to allow for determination of the therapy effectiveness and patient tolerance."; + case FS: return "A supply action to restock a smaller more local dispensary."; + case MS: return "A supply of a manufacturer sample"; + case RF: return "A fill against an order that has already been filled (or partially filled) at least once."; + case UD: return "A supply action that provides sufficient material for a single dose."; + case RFC: return "A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.)"; + case RFCS: return "A refill where the quantity supplied is equal to one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a complete fill would be for the full 90 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case RFF: return "The first fill against an order that has already been filled at least once at another facility."; + case RFFS: return "The first fill against an order that has already been filled at least once at another facility and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case RFP: return "A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.)"; + case RFPS: return "A refill where the quantity supplied is less than one full repetition of the ordered amount. (e.g. If the order was 90 tablets, 3 refills, a partial fill might be for only 30 tablets.) and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case RFS: return "A fill against an order that has already been filled (or partially filled) at least once and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case TB: return "A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided."; + case TBS: return "A fill where the remainder of a 'complete' fill is provided after a trial fill has been provided and where the strength supplied is less than the ordered strength (e.g. 10mg for an order of 50mg where a subsequent fill will dispense 40mg tablets)."; + case UDE: return "A supply action that provides sufficient material for a single dose via multiple products. E.g. 2 50mg tablets for a 100mg unit dose."; + case _ACTPOLICYTYPE: return "Description:Types of policies that further specify the ActClassPolicy value set."; + case _ACTPRIVACYPOLICY: return "A policy deeming certain information to be private to an individual or organization.\r\n\n \n Definition: A mandate, obligation, requirement, rule, or expectation relating to privacy.\r\n\n \n Discussion: ActPrivacyPolicyType codes support the designation of the 1..* policies that are applicable to an Act such as a Consent Directive, a Role such as a VIP Patient, or an Entity such as a patient who is a minor. 1..* ActPrivacyPolicyType values may be associated with an Act or Role to indicate the policies that govern the assignment of an Act or Role confidentialityCode. Use of multiple ActPrivacyPolicyType values enables fine grain specification of applicable policies, but must be carefully assigned to ensure cogency and avoid creation of conflicting policy mandates.\r\n\n \n Usage Note: Statutory title may be named in the ActClassPolicy Act Act.title to specify which privacy policy is being referenced."; + case _ACTCONSENTDIRECTIVE: return "Specifies the type of agreement between one or more grantor and grantee in which rights and obligations related to one or more shared items of interest are allocated.\r\n\n \n Usage Note: Such agreements may be considered \"consent directives\" or \"contracts\" depending on the context, and are considered closely related or synonymous from a legal perspective.\r\n\n \n Examples: \n \r\n\n \n Healthcare Privacy Consent Directive permitting or restricting in whole or part the collection, access, use, and disclosure of health information, and any associated handling caveats.\n Healthcare Medical Consent Directive to receive medical procedures after being informed of risks and benefits, thereby reducing the grantee's liability.\n Research Informed Consent for participation in clinical trials and disclosure of health information after being informed of risks and benefits, thereby reducing the grantee's liability.\n Substitute decision maker delegation in which the grantee assumes responsibility to act on behalf of the grantor.\n Contracts in which the agreement requires assent/dissent by the grantor of terms offered by a grantee, a consumer opts out of an \"award\" system for use of a retailer's marketing or credit card vendor's point collection cards in exchange for allowing purchase tracking and profiling.\n A mobile device or App privacy policy and terms of service to which a user must agree in whole or in part in order to utilize the service.\n Agreements between a client and an authorization server or between an authorization server and a resource operator and/or resource owner permitting or restricting e.g., collection, access, use, and disclosure of information, and any associated handling caveats."; + case EMRGONLY: return "This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations.\r\n\n \n Definition: Opt-in to disclosure of health information for emergency only consent directive."; + case GRANTORCHOICE: return "A grantor's terms of agreement to which a grantee may assent or dissent, and which may include an opportunity for a grantee to request restrictions or extensions.\r\n\n \n Comment: A grantor typically is able to stipulate preferred terms of agreement when the grantor has control over the topic of the agreement, which a grantee must accept in full or may be offered an opportunity to extend or restrict certain terms.\r\n\n \n Usage Note: If the grantor's term of agreement must be accepted in full, then this is considered \"basic consent\". If a grantee is offered an opportunity to extend or restrict certain terms, then the agreement is considered \"granular consent\".\r\n\n \n Examples: \n \r\n\n \n Healthcare: A PHR account holder [grantor] may require any PHR user [grantee] to accept the terms of agreement in full, or may permit a PHR user to extend or restrict terms selected by the account holder or requested by the PHR user.\n Non-healthcare: The owner of a resource server [grantor] may require any authorization server [grantee] to meet authorization requirements stipulated in the grantor's terms of agreement."; + case IMPLIED: return "A grantor's presumed assent to the grantee's terms of agreement is based on the grantor's behavior, which may result from not expressly assenting to the consent directive offered, or from having no right to assent or dissent offered by the grantee.\r\n\n \n Comment: Implied or \"implicit\" consent occurs when the behavior of the grantor is understood by a reasonable person to signal agreement to the grantee's terms.\r\n\n \n Usage Note: Implied consent with no opportunity to assent or dissent to certain terms is considered \"basic consent\".\r\n\n \n Examples: \n \r\n\n \n Healthcare: A patient schedules an appointment with a provider, and either does not take the opportunity to expressly assent or dissent to the provider's consent directive, does not have an opportunity to do so, as in the case where emergency care is required, or simply behaves as though the patient [grantor] agrees to the rights granted to the provider [grantee] in an implicit consent directive.\n An injured and unconscious patient is deemed to have assented to emergency treatment by those permitted to do so under jurisdictional laws, e.g., Good Samaritan laws.\n Non-healthcare: Upon receiving a driver's license, the driver is deemed to have assented without explicitly consenting to undergoing field sobriety tests.\n A corporation that does business in a foreign nation is deemed to have deemed to have assented without explicitly consenting to abide by that nation's laws."; + case IMPLIEDD: return "A grantor's presumed assent to the grantee's terms of agreement, which is based on the grantor's behavior, and includes a right to dissent to certain terms. \r\n\n \n Comment: A grantor assenting to the grantee's terms of agreement may or may not exercise a right to dissent to grantor selected terms or to grantee's selected terms to which a grantor may dissent.\r\n\n \n Usage Note: Implied or \"implicit\" consent with an \"opportunity to dissent\" occurs when the grantor's behavior is understood by a reasonable person to signal assent to the grantee's terms of agreement whether the grantor requests or the grantee approves further restrictions, is considered \"granular consent\".\r\n\n \n Examples: \n \r\n\n \n Healthcare Examples: A healthcare provider deems a patient's assent to disclosure of health information to family members and friends, but offers an opportunity or permits the patient to dissent to such disclosures.\n A health information exchanges deems a patient to have assented to disclosure of health information for treatment purposes, but offers the patient an opportunity to dissents to disclosure to particular provider organizations.\n Non-healthcare Examples: A bank deems a banking customer's assent to specified collection, access, use, or disclosure of financial information as a requirement of holding a bank account, but provides the user an opportunity to limit third-party collection, access, use or disclosure of that information for marketing purposes."; + case NOCONSENT: return "No notification or opportunity is provided for a grantor to assent or dissent to a grantee's terms of agreement.\r\n\n \n Comment: A \"No Consent\" policy scheme provides no opportunity for accommodation of an individual's preferences, and may not comply with Fair Information Practice Principles [FIPP] by enabling the data subject to object, access collected information, correct errors, or have accounting of disclosures.\r\n\n \n Usage Note: The grantee's terms of agreement, may be available to the grantor by reviewing the grantee's privacy policies, but there is no notice by which a grantor is apprised of the policy directly or able to acknowledge.\r\n\n \n Examples: \n \r\n\n \n Healthcare: Without notification or an opportunity to assent or dissent, a patient's health information is automatically included in and available (often according to certain rules) through a health information exchange. Note that this differs from implied consent, where the patient is assumed to have consented.\n Without notification or an opportunity to assent or dissent, a patient's health information is collected, accessed, used, or disclosed for research, public health, security, fraud prevention, court order, or law enforcement.\n Non-healthcare: Without notification or an opportunity to assent or dissent, a consumer's healthcare or non-healthcare internet searches are aggregated for secondary uses such as behavioral tracking and profiling.\n Without notification or an opportunity to assent or dissent, a consumer's location and activities in a shopping mall are tracked by RFID tags on purchased items."; + case NOPP: return "Acknowledgement of custodian notice of privacy practices.\r\n\n \n Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified."; + case OPTIN: return "A grantor's assent to the terms of an agreement offered by a grantee without an opportunity for to dissent to any terms.\r\n\n \n Comment: Acceptance of a grantee's terms pertaining, for example, to permissible activities, purposes of use, handling caveats, expiry date, and revocation policies.\r\n\n \n Usage Note: Opt-in with no opportunity for a grantor to restrict certain permissions sought by the grantee is considered \"basic consent\".\r\n\n \n Examples: \n \r\n\n \n Healthcare: A patient [grantor] signs a provider's [grantee's] consent directive form, which lists permissible collection, access, use, or disclosure activities, purposes of use, handling caveats, and revocation policies.\n Non-healthcare: An employee [grantor] signs an employer's [grantee's] non-disclosure and non-compete agreement."; + case OPTINR: return "A grantor's assent to the grantee's terms of an agreement with an opportunity for to dissent to certain grantor or grantee selected terms.\r\n\n \n Comment: A grantor dissenting to the grantee's terms of agreement may or may not exercise a right to assent to grantor's pre-approved restrictions or to grantee's selected terms to which a grantor may dissent.\r\n\n \n Usage Note: Opt-in with restrictions is considered \"granular consent\" because the grantor has an opportunity to narrow the permissions sought by the grantee.\r\n\n \n Examples: \n \r\n\n \n Healthcare: A patient assent to grantee's consent directive terms for collection, access, use, or disclosure of health information, and dissents to disclosure to certain recipients as allowed by the provider's pre-approved restriction list.\n Non-Healthcare: A cell phone user assents to the cell phone's privacy practices and terms of use, but dissents from location tracking by turning off the cell phone's tracking capability."; + case OPTOUT: return "A grantor's dissent to the terms of agreement offered by a grantee without an opportunity for to assent to any terms.\r\n\n \n Comment: Rejection of a grantee's terms of agreement pertaining, for example, to permissible activities, purposes of use, handling caveats, expiry date, and revocation policies.\r\n\n \n Usage Note: Opt-out with no opportunity for a grantor to permit certain permissions sought by the grantee is considered \"basic consent\".\r\n\n \n Examples: \n \r\n\n \n Healthcare: A patient [grantor] declines to sign a provider's [grantee's] consent directive form, which lists permissible collection, access, use, or disclosure activities, purposes of use, handling caveats, revocation policies, and consequences of not assenting.\n Non-healthcare: An employee [grantor] refuses to sign an employer's [grantee's] agreement not to join unions or participate in a strike where state law protects employee's collective bargaining rights.\n A citizen [grantor] refuses to enroll in mandatory government [grantee] health insurance based on religious beliefs, which is an exemption."; + case OPTOUTE: return "A grantor's dissent to the grantee's terms of agreement except for certain grantor or grantee selected terms.\r\n\n \n Comment: A rejection of a grantee's terms of agreement while assenting to certain permissions sought by the grantee or requesting approval of additional grantor terms.\r\n\n \n Usage Note: Opt-out with exceptions is considered a \"granular consent\" because the grantor has an opportunity to accept certain permissions sought by the grantee or request additional grantor terms, while rejecting other grantee terms.\r\n\n \n Examples: \n \r\n\n \n Healthcare: A patient [grantor] dissents to a health information exchange consent directive with the exception of disclosure based on a limited \"time to live\" shared secret [e.g., a token or password], which the patient can give to a provider when seeking care.\n Non-healthcare: A social media user [grantor] dissents from public access to their account, but assents to access to a circle of friends."; + case _ACTPRIVACYLAW: return "A jurisdictional mandate, regulation, obligation, requirement, rule, or expectation deeming certain information to be private to an individual or organization, which is imposed on:\r\n\n \n The activity of a governed party\n The behavior of a governed party\n The manner in which an act is executed by a governed party"; + case _ACTUSPRIVACYLAW: return "Definition: A jurisdictional mandate in the U.S. relating to privacy.\r\n\n \n Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1."; + case _42CFRPART2: return "42 CFR Part 2 stipulates the right of an individual who has applied for or been given diagnosis or treatment for alcohol or drug abuse at a federally assisted program.\r\n\n \n Definition: Non-disclosure of health information relating to health care paid for by a federally assisted substance abuse program without patient consent.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case COMMONRULE: return "U.S. Federal regulations governing the protection of human subjects in research (codified at Subpart A of 45 CFR part 46) that has been adopted by 15 U.S. Federal departments and agencies in an effort to promote uniformity, understanding, and compliance with human subject protections. Existing regulations governing the protection of human subjects in Food and Drug Administration (FDA)-regulated research (21 CFR parts 50, 56, 312, and 812) are separate from the Common Rule but include similar requirements.\r\n\n \n Definition: U.S. federal laws governing research-related privacy policies.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies."; + case HIPAANOPP: return "The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Subpart E) permits access, use and disclosure of certain personal health information (PHI as defined under the law) for purposes of Treatment, Payment, and Operations, and requires that the provider ask that patients acknowledge the Provider's Notice of Privacy Practices as permitted conduct under the law.\r\n\n \n Definition: Notification of HIPAA Privacy Practices.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies."; + case HIPAAPSYNOTES: return "The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Section 164.508) requires authorization for certain uses and disclosure of psychotherapy notes.\r\n\n \n Definition: Authorization that must be obtained for disclosure of psychotherapy notes.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case HIPAASELFPAY: return "Section 13405(a) of the Health Information Technology for Economic and Clinical Health Act (HITECH) stipulates the right of an individual to have disclosures regarding certain health care items or services for which the individual pays out of pocket in full restricted from a health plan.\r\n\n \n Definition: Non-disclosure of health information to a health plan relating to health care items or services for which an individual pays out of pocket in full.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case TITLE38SECTION7332: return "Title 38 Part 1-protected information may only be disclosed to a third party with the special written consent of the patient except where expressly authorized by 38 USC 7332. VA may disclose this information for specific purposes to: VA employees on a need to know basis - more restrictive than Privacy Act need to know; contractors who need the information in order to perform or fulfil the duties of the contract; and researchers who provide assurances that the information will not be identified in any report. This information may also be disclosed without consent where patient lacks decision-making capacity; in a medical emergency for the purpose of treating a condition which poses an immediate threat to the health of any individual and which requires immediate medical intervention; for eye, tissue, or organ donation purposes; and disclosure of HIV information for public health purposes.\r\n\n \n Definition: Title 38 Part 1 - Section 1.462 Confidentiality restrictions.\r\n\n (a) General. The patient records to which Sections 1.460 through 1.499 of this part apply may be disclosed or used only as permitted by these regulations and may not otherwise be disclosed or used in any civil, criminal, administrative, or legislative proceedings conducted by any Federal, State, or local authority. Any disclosure made under these regulations must be limited to that information which is necessary to carry out the purpose of the disclosure. SUBCHAPTER III--PROTECTION OF PATIENT RIGHTS Sec. 7332. Confidentiality of certain medical records (a)(1) Records of the identity, diagnosis, prognosis, or treatment of any patient or subject which are maintained in connection with the performance of any program or activity (including education, training, treatment, rehabilitation, or research) relating to drug abuse, alcoholism or alcohol abuse, infection with the human immunodeficiency virus, or sickle cell anemia which is carried out by or for the Department under this title shall, except as provided in subsections (e) and (f), be confidential, and (section 5701 of this title to the contrary notwithstanding) such records may be disclosed only for the purposes and under the circumstances expressly authorized under subsection (b).\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case _INFORMATIONSENSITIVITYPOLICY: return "A mandate, obligation, requirement, rule, or expectation characterizing the value or importance of a resource and may include its vulnerability. (Based on ISO7498-2:1989. Note: The vulnerability of personally identifiable sensitive information may be based on concerns that the unauthorized disclosure may result in social stigmatization or discrimination.) Description: Types of Sensitivity policy that apply to Acts or Roles. A sensitivity policy is adopted by an enterprise or group of enterprises (a 'policy domain') through a formal data use agreement that stipulates the value, importance, and vulnerability of information. A sensitivity code representing a sensitivity policy may be associated with criteria such as categories of information or sets of information identifiers (e.g., a value set of clinical codes or branch in a code system hierarchy). These criteria may in turn be used for the Policy Decision Point in a Security Engine. A sensitivity code may be used to set the confidentiality code used on information about Acts and Roles to trigger the security mechanisms required to control how security principals (i.e., a person, a machine, a software application) may act on the information (e.g., collection, access, use, or disclosure). Sensitivity codes are never assigned to the transport or business envelope containing patient specific information being exchanged outside of a policy domain as this would disclose the information intended to be protected by the policy. When sensitive information is exchanged with others outside of a policy domain, the confidentiality code on the transport or business envelope conveys the receiver's responsibilities and indicates the how the information is to be safeguarded without unauthorized disclosure of the sensitive information. This ensures that sensitive information is treated by receivers as the sender intends, accomplishing interoperability without point to point negotiations.\r\n\n \n Usage Note: Sensitivity codes are not useful for interoperability outside of a policy domain because sensitivity policies are typically localized and vary drastically across policy domains even for the same information category because of differing organizational business rules, security policies, and jurisdictional requirements. For example, an employee's sensitivity code would make little sense for use outside of a policy domain. 'Taboo' would rarely be useful outside of a policy domain unless there are jurisdictional requirements requiring that a provider disclose sensitive information to a patient directly. Sensitivity codes may be more appropriate in a legacy system's Master Files in order to notify those who access a patient's orders and observations about the sensitivity policies that apply. Newer systems may have a security engine that uses a sensitivity policy's criteria directly. The specializable InformationSensitivityPolicy Act.code may be useful in some scenarios if used in combination with a sensitivity identifier and/or Act.title."; + case _ACTINFORMATIONSENSITIVITYPOLICY: return "Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as \"constraints around appropriate disclosure of information about this Act, regardless of mood.\"\r\n\n \n Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values."; + case ETH: return "Policy for handling alcohol or drug-abuse information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to alcohol or drug-abuse information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case GDIS: return "Policy for handling genetic disease information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to genetic disease information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case HIV: return "Policy for handling HIV or AIDS information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to HIV or AIDS information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case PSY: return "Policy for handling psychiatry information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to psychiatry information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case SCA: return "Policy for handling sickle cell disease information, which is afforded heightened confidentiality. Information handling protocols are based on organizational policies related to sickle cell disease information, which is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then the Act valued with this ActCode should be associated with an Act valued with any applicable laws from the ActPrivacyLaw code system."; + case SOC: return "Information about provision of social services.\r\n\n \n Usage Note: This is a temporary addition to FHIR to be proposed in harmonization."; + case SDV: return "Policy for handling sexual assault, abuse, or domestic violence information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexual assault, abuse, or domestic violence information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case SEX: return "Policy for handling sexuality and reproductive health information, which will be afforded heightened confidentiality. Information handling protocols based on organizational policies related to sexuality and reproductive health information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case STD: return "Policy for handling sexually transmitted disease information, which will be afforded heightened confidentiality.\n Information handling protocols based on organizational policies related to sexually transmitted disease information that is deemed sensitive.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case TBOO: return "Policy for handling information not to be initially disclosed or discussed with patient except by a physician assigned to patient in this case. Information handling protocols based on organizational policies related to sensitive patient information that must be initially discussed with the patient by an attending physician before being disclosed to the patient.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code.\r\n\n \n Open Issue: This definition conflates a rule and a characteristic, and there may be a similar issue with ts sibling codes."; + case SICKLE: return "Types of sensitivity policies that apply to Acts. Act.confidentialityCode is defined in the RIM as \"constraints around appropriate disclosure of information about this Act, regardless of mood.\"\r\n\n \n Usage Note: ActSensitivity codes are used to bind information to an Act.confidentialityCode according to local sensitivity policy so that those confidentiality codes can then govern its handling across enterprises. Internally to a policy domain, however, local policies guide the access control system on how end users in that policy domain are able to use information tagged with these sensitivity values."; + case _ENTITYSENSITIVITYPOLICYTYPE: return "Types of sensitivity policies that may apply to a sensitive attribute on an Entity.\r\n\n \n Usage Note: EntitySensitivity codes are used to convey a policy that is applicable to sensitive information conveyed by an entity attribute. May be used to bind a Role.confidentialityCode associated with an Entity per organizational policy. Role.confidentialityCode is defined in the RIM as \"an indication of the appropriate disclosure of information about this Role with respect to the playing Entity.\""; + case DEMO: return "Policy for handling all demographic information about an information subject, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to all demographic about an information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case DOB: return "Policy for handling information related to an information subject's date of birth, which will be afforded heightened confidentiality.Policies may govern sensitivity of information related to an information subject's date of birth, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case GENDER: return "Policy for handling information related to an information subject's gender and sexual orientation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's gender and sexual orientation, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case LIVARG: return "Policy for handling information related to an information subject's living arrangement, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's living arrangement, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case MARST: return "Policy for handling information related to an information subject's marital status, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's marital status, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case RACE: return "Policy for handling information related to an information subject's race, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's race, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Note: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case REL: return "Policy for handling information related to an information subject's religious affiliation, which will be afforded heightened confidentiality. Policies may govern sensitivity of information related to an information subject's religion, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case _ROLEINFORMATIONSENSITIVITYPOLICY: return "Types of sensitivity policies that apply to Roles.\r\n\n \n Usage Notes: RoleSensitivity codes are used to bind information to a Role.confidentialityCode per organizational policy. Role.confidentialityCode is defined in the RIM as \"an indication of the appropriate disclosure of information about this Role with respect to the playing Entity.\""; + case B: return "Policy for handling trade secrets such as financial information or intellectual property, which will be afforded heightened confidentiality. Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality.\r\n\n \n Usage Notes: No patient related information may ever be of this confidentiality level. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case EMPL: return "Policy for handling information related to an employer which is deemed classified to protect an employee who is the information subject, and which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to an employer, such as law enforcement or national security, the identity of which could impact the privacy, well-being, or safety of an information subject who is an employee.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case LOCIS: return "Policy for handling information related to the location of the information subject, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to the location of the information subject, the disclosure of which could impact the privacy, well-being, or safety of that subject.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case SSP: return "Policy for handling information related to a provider of sensitive services, which will be afforded heightened confidentiality. Description: Policies may govern sensitivity of information related to providers who deliver sensitive healthcare services in order to protect the privacy, well-being, and safety of the provider and of patients receiving sensitive services.\r\n\n \n Usage Notes: If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case ADOL: return "Policy for handling information related to an adolescent, which will be afforded heightened confidentiality per applicable organizational or jurisdictional policy. An enterprise may have a policy that requires that adolescent patient information be provided heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location.\r\n\n \n Usage Note: For use within an enterprise in which an adolescent is the information subject. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case CEL: return "Policy for handling information related to a celebrity (people of public interest (VIP), which will be afforded heightened confidentiality. Celebrities are people of public interest (VIP) about whose information an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive may include health information and patient role information including patient status, demographics, next of kin, and location.\r\n\n \n Usage Note: For use within an enterprise in which the information subject is deemed a celebrity or very important person. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case DIA: return "Policy for handling information related to a diagnosis, health condition or health problem, which will be afforded heightened confidentiality. Diagnostic, health condition or health problem related information may be deemed sensitive by organizational policy, and require heightened confidentiality.\r\n\n \n Usage Note: For use within an enterprise that provides heightened confidentiality to diagnostic, health condition or health problem related information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case DRGIS: return "Policy for handling information related to a drug, which will be afforded heightened confidentiality. Drug information may be deemed sensitive by organizational policy, and require heightened confidentiality.\r\n\n \n Usage Note: For use within an enterprise that provides heightened confidentiality to drug information deemed sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case EMP: return "Policy for handling information related to an employee, which will be afforded heightened confidentiality. When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location.\r\n\n \n Usage Note: Policy for handling information related to an employee, which will be afforded heightened confidentiality. Description: When a patient is an employee, an enterprise may have a policy that requires heightened confidentiality. Information deemed sensitive typically includes health information and patient role information including patient status, demographics, next of kin, and location."; + case PDS: return "Policy for handling information reported by the patient about another person, e.g., a family member, which will be afforded heightened confidentiality. Sensitive information reported by the patient about another person, e.g., family members may be deemed sensitive by default. The flag may be set or cleared on patient's request. \r\n\n \n Usage Note: For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case PRS: return "For sensitive information relayed by or about a patient, which is deemed sensitive within the enterprise (i.e., by default regardless of whether the patient requested that the information be deemed sensitive.) If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code.\r\n\n \n Usage Note: For use within an enterprise that provides heightened confidentiality to certain types of information designated by a patient as sensitive. If there is a jurisdictional mandate, then use the applicable ActPrivacyLaw code system, and specify the law rather than or in addition to this more generic code."; + case COMPT: return "This is the healthcare analog to the US Intelligence Community's concept of a Special Access Program. Compartment codes may be used in as a field value in an initiator's clearance to indicate permission to access and use an IT Resource with a security label having the same compartment value in security category label field.\r\n\n Map: Aligns with ISO 2382-8 definition of Compartment - \"A division of data into isolated blocks with separate security controls for the purpose of reducing risk.\""; + case ACOCOMPT: return "A group of health care entities, which may include health care providers, care givers, hospitals, facilities, health plans, and other health care constituents who coordinate care for reimbursement based on quality metrics for improving outcomes and lowering costs, and may be authorized to access the consumer's health information because of membership in that group.\r\n\n Security Compartment Labels assigned to a consumer's information use in accountable care workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a an accountable care workflow who is requesting access to that information"; + case CTCOMPT: return "Care coordination across participants in a care plan requires sharing of a healthcare consumer's information specific to that workflow. A care team member should only have access to that information while participating in that workflow or for other authorized uses.\r\n\n Security Compartment Labels assigned to a consumer's information use in care coordination workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a care team member workflow who is requesting access to that information"; + case FMCOMPT: return "Financial management department members who have access to healthcare consumer information as part of a patient account, billing and claims workflows.\r\n\n Security Compartment Labels assigned to consumer information used in these workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a financial management workflow who is requesting access to that information."; + case HRCOMPT: return "A security category label field value, which indicates that access and use of an IT resource is restricted to members of human resources department or workflow."; + case LRCOMPT: return "Providers and care givers who have an established relationship per criteria determined by policy are considered to have an established care provision relations with a healthcare consumer, and may be authorized to access the consumer's health information because of that relationship. Providers and care givers should only have access to that information while participating in legitimate relationship workflows or for other authorized uses.\r\n\n Security Compartment Labels assigned to a consumer's information use in legitimate relationship workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a legitimate relationship workflow who is requesting access to that information."; + case PACOMPT: return "Patient administration members who have access to healthcare consumer information as part of a patient administration workflows.\r\n\n Security Compartment Labels assigned to consumer information used in these workflows should be met or exceeded by the Security Compartment attribute claimed by a participant in a patient administration workflow who is requesting access to that information."; + case RESCOMPT: return "A security category label field value, which indicates that access and use of an IT resource is restricted to members of a research project."; + case RMGTCOMPT: return "A security category label field value, which indicates that access and use of an IT resource is restricted to members of records management department or workflow."; + case ACTTRUSTPOLICYTYPE: return "A mandate, obligation, requirement, rule, or expectation conveyed as security metadata between senders and receivers required to establish the reliability, authenticity, and trustworthiness of their transactions.\r\n\n Trust security metadata are observation made about aspects of trust applicable to an IT resource (data, information object, service, or system capability).\r\n\n Trust applicable to IT resources is established and maintained in and among security domains, and may be comprised of observations about the domain's trust authority, trust framework, trust policy, trust interaction rules, means for assessing and monitoring adherence to trust policies, mechanisms that enforce trust, and quality and reliability measures of assurance in those mechanisms. [Based on ISO IEC 10181-1 and NIST SP 800-63-2]\r\n\n For example, identity proofing , level of assurance, and Trust Framework."; + case TRSTACCRD: return "Type of security metadata about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework."; + case TRSTAGRE: return "Type of security metadata about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1]"; + case TRSTASSUR: return "Type of security metadata about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol."; + case TRSTCERT: return "Type of security metadata about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1]"; + case TRSTFWK: return "Type of security metadata about a complete set of contracts, regulations, or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative]"; + case TRSTMEC: return "Type of security metadata about a security architecture system component that supports enforcement of security policies."; + case COVPOL: return "Description:A mandate, obligation, requirement, rule, or expectation unilaterally imposed on benefit coverage under a policy or program by a sponsor, underwriter or payor on:\r\n\n \n \n The activity of another party\r\n\n \n \n The behavior of another party\r\n\n \n \n The manner in which an act is executed\r\n\n \n \n \n Examples:A clinical protocol imposed by a payer to which a provider must adhere in order to be paid for providing the service. A formulary from which a provider must select prescribed drugs in order for the patient to incur a lower copay."; + case SECURITYPOLICY: return "Types of security policies that further specify the ActClassPolicy value set.\r\n\n \n Examples:\n \r\n\n \n obligation to encrypt\n refrain from redisclosure without consent"; + case OBLIGATIONPOLICY: return "Conveys the mandated workflow action that an information custodian, receiver, or user must perform. \r\n\n \n Usage Notes: Per ISO 22600-2, ObligationPolicy instances 'are event-triggered and define actions to be performed by manager agent'. Per HL7 Composite Security and Privacy Domain Analysis Model: This value set refers to the action required to receive the permission specified in the privacy rule. Per OASIS XACML, an obligation is an operation specified in a policy or policy that is performed in conjunction with the enforcement of an access control decision."; + case ANONY: return "Custodian system must remove any information that could result in identifying the information subject."; + case AOD: return "Custodian system must make available to an information subject upon request an accounting of certain disclosures of the individual’s protected health information over a period of time. Policy may dictate that the accounting include information about the information disclosed, the date of disclosure, the identification of the receiver, the purpose of the disclosure, the time in which the disclosing entity must provide a response and the time period for which accountings of disclosure can be requested."; + case AUDIT: return "Custodian system must monitor systems to ensure that all users are authorized to operate on information objects."; + case AUDTR: return "Custodian system must monitor and maintain retrievable log for each user and operation on information."; + case CPLYCC: return "Custodian security system must retrieve, evaluate, and comply with the information handling directions of the Confidentiality Code associated with an information target."; + case CPLYCD: return "Custodian security system must retrieve, evaluate, and comply with applicable information subject consent directives."; + case CPLYJPP: return "Custodian security system must retrieve, evaluate, and comply with applicable jurisdictional privacy policies associated with the target information."; + case CPLYOPP: return "Custodian security system must retrieve, evaluate, and comply with applicable organizational privacy policies associated with the target information."; + case CPLYOSP: return "Custodian security system must retrieve, evaluate, and comply with the organizational security policies associated with the target information."; + case CPLYPOL: return "Custodian security system must retrieve, evaluate, and comply with applicable policies associated with the target information."; + case DECLASSIFYLABEL: return "Custodian security system must declassify information assigned security labels by instantiating a new version of the classified information so as to break the binding of the classifying security label when assigning a new security label that marks the information as unclassified in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding."; + case DEID: return "Custodian system must strip information of data that would allow the identification of the source of the information or the information subject."; + case DELAU: return "Custodian system must remove target information from access after use."; + case DOWNGRDLABEL: return "Custodian security system must downgrade information assigned security labels by instantiating a new version of the classified information so as to break the binding of the classifying security label when assigning a new security label that marks the information as classified at a less protected level in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding."; + case DRIVLABEL: return "Custodian security system must assign and bind security labels derived from compilations of information by aggregation or disaggregation in order to classify information compiled in the information systems under its control for collection, access, use and disclosure in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding."; + case ENCRYPT: return "Custodian system must render information unreadable by algorithmically transforming plaintext into ciphertext. \r\n\n \r\n\n \n Usage Notes: A mathematical transposition of a file or data stream so that it cannot be deciphered at the receiving end without the proper key. Encryption is a security feature that assures that only the parties who are supposed to be participating in a videoconference or data transfer are able to do so. It can include a password, public and private keys, or a complex combination of all. (Per Infoway.)"; + case ENCRYPTR: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext when \"at rest\" or in storage."; + case ENCRYPTT: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while \"in transit\" or being transported by any means."; + case ENCRYPTU: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext while in use such that operations permitted on the target information are limited by the license granted to the end user."; + case HUAPRV: return "Custodian system must require human review and approval for permission requested."; + case LABEL: return "Custodian security system must assign and bind security labels in order to classify information created in the information systems under its control for collection, access, use and disclosure in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the assignment and binding.\r\n\n \n Usage Note: In security systems, security policy label assignments do not change, they may supersede prior assignments, and such reassignments are always tracked for auditing and other purposes."; + case MASK: return "Custodian system must render information unreadable and unusable by algorithmically transforming plaintext into ciphertext. User may be provided a key to decrypt per license or \"shared secret\"."; + case MINEC: return "Custodian must limit access and disclosure to the minimum information required to support an authorized user's purpose of use. \r\n\n \n Usage Note: Limiting the information available for access and disclosure to that an authorized user or receiver \"needs to know\" in order to perform permitted workflow or purpose of use."; + case PERSISTLABEL: return "Custodian security system must persist the binding of security labels to classify information received or imported by information systems under its control for collection, access, use and disclosure in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the assignment and binding."; + case PRIVMARK: return "Custodian must create and/or maintain human readable security label tags as required by policy.\r\n\n Map: Aligns with ISO 22600-3 Section A.3.4.3 description of privacy mark: \"If present, the privacy-mark is not used for access control. The content of the privacy-mark may be defined by the security policy in force (identified by the security-policy-identifier) which may define a list of values to be used. Alternately, the value may be determined by the originator of the security-label.\""; + case PSEUD: return "Custodian system must strip information of data that would allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject."; + case REDACT: return "Custodian system must remove information, which is not authorized to be access, used, or disclosed from records made available to otherwise authorized users."; + case UPGRDLABEL: return "Custodian security system must declassify information assigned security labels by instantiating a new version of the classified information so as to break the binding of the classifying security label when assigning a new security label that marks the information as classified at a more protected level in accordance with applicable jurisdictional privacy policies associated with the target information. The system must retain an immutable record of the previous assignment and binding."; + case REFRAINPOLICY: return "Conveys prohibited actions which an information custodian, receiver, or user is not permitted to perform unless otherwise authorized or permitted under specified circumstances.\r\n\n \r\n\n \n Usage Notes: ISO 22600-2 species that a Refrain Policy \"defines actions the subjects must refrain from performing\". Per HL7 Composite Security and Privacy Domain Analysis Model: May be used to indicate that a specific action is prohibited based on specific access control attributes e.g., purpose of use, information type, user role, etc."; + case NOAUTH: return "Prohibition on disclosure without information subject's authorization."; + case NOCOLLECT: return "Prohibition on collection or storage of the information."; + case NODSCLCD: return "Prohibition on disclosure without organizational approved patient restriction."; + case NODSCLCDS: return "Prohibition on disclosure without a consent directive from the information subject."; + case NOINTEGRATE: return "Prohibition on Integration into other records."; + case NOLIST: return "Prohibition on disclosure except to entities on specific access list."; + case NOMOU: return "Prohibition on disclosure without an interagency service agreement or memorandum of understanding (MOU)."; + case NOORGPOL: return "Prohibition on disclosure without organizational authorization."; + case NOPAT: return "Prohibition on disclosing information to patient, family or caregivers without attending provider's authorization.\r\n\n \n Usage Note: The information may be labeled with the ActInformationSensitivity TBOO code, triggering application of this RefrainPolicy code as a handling caveat controlling access.\r\n\n Maps to FHIR NOPAT: Typically, this is used on an Alert resource, when the alert records information on patient abuse or non-compliance.\r\n\n FHIR print name is \"keep information from patient\". Maps to the French realm - code: INVISIBLE_PATIENT.\r\n\n \n displayName: Document non visible par le patient\n codingScheme: 1.2.250.1.213.1.1.4.13\n \n French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone)."; + case NOPERSISTP: return "Prohibition on collection of the information beyond time necessary to accomplish authorized purpose of use is prohibited."; + case NORDSCLCD: return "Prohibition on redisclosure without patient consent directive."; + case NORDSCLCDS: return "Prohibition on redisclosure without a consent directive from the information subject."; + case NORDSCLW: return "Prohibition on disclosure without authorization under jurisdictional law."; + case NORELINK: return "Prohibition on associating de-identified or pseudonymized information with other information in a manner that could or does result in disclosing information intended to be masked."; + case NOREUSE: return "Prohibition on use of the information beyond the purpose of use initially authorized."; + case NOVIP: return "Prohibition on disclosure except to principals with access permission to specific VIP information."; + case ORCON: return "Prohibition on disclosure except as permitted by the information originator."; + case _ACTPRODUCTACQUISITIONCODE: return "The method that a product is obtained for use by the subject of the supply act (e.g. patient). Product examples are consumable or durable goods."; + case LOAN: return "Temporary supply of a product without transfer of ownership for the product."; + case RENT: return "Temporary supply of a product with financial compensation, without transfer of ownership for the product."; + case TRANSFER: return "Transfer of ownership for a product."; + case SALE: return "Transfer of ownership for a product for financial compensation."; + case _ACTSPECIMENTRANSPORTCODE: return "Transportation of a specimen."; + case SREC: return "Description:Specimen has been received by the participating organization/department."; + case SSTOR: return "Description:Specimen has been placed into storage at a participating location."; + case STRAN: return "Description:Specimen has been put in transit to a participating receiver."; + case _ACTSPECIMENTREATMENTCODE: return "Set of codes related to specimen treatments"; + case ACID: return "The lowering of specimen pH through the addition of an acid"; + case ALK: return "The act rendering alkaline by impregnating with an alkali; a conferring of alkaline qualities."; + case DEFB: return "The removal of fibrin from whole blood or plasma through physical or chemical means"; + case FILT: return "The passage of a liquid through a filter, accomplished by gravity, pressure or vacuum (suction)."; + case LDLP: return "LDL Precipitation"; + case NEUT: return "The act or process by which an acid and a base are combined in such proportions that the resulting compound is neutral."; + case RECA: return "The addition of calcium back to a specimen after it was removed by chelating agents"; + case UFIL: return "The filtration of a colloidal substance through a semipermeable medium that allows only the passage of small molecules."; + case _ACTSUBSTANCEADMINISTRATIONCODE: return "Description: Describes the type of substance administration being performed. This should not be used to carry codes for identification of products. Use an associated role or entity to carry such information."; + case DRUG: return "The introduction of a drug into a subject with the intention of altering its biologic state with the intent of improving its health status."; + case FD: return "Description: The introduction of material into a subject with the intent of providing nutrition or other dietary supplements (e.g. minerals or vitamins)."; + case IMMUNIZ: return "The introduction of an immunogen with the intent of stimulating an immune response, aimed at preventing subsequent infections by more viable agents."; + case BOOSTER: return "An additional immunization administration within a series intended to bolster or enhance immunity."; + case INITIMMUNIZ: return "The first immunization administration in a series intended to produce immunity"; + case _ACTTASKCODE: return "Description: A task or action that a user may perform in a clinical information system (e.g., medication order entry, laboratory test results review, problem list entry)."; + case OE: return "A clinician creates a request for a service to be performed for a given patient."; + case LABOE: return "A clinician creates a request for a laboratory test to be done for a given patient."; + case MEDOE: return "A clinician creates a request for the administration of one or more medications to a given patient."; + case PATDOC: return "A person enters documentation about a given patient."; + case ALLERLREV: return "Description: A person reviews a list of known allergies of a given patient."; + case CLINNOTEE: return "A clinician enters a clinical note about a given patient"; + case DIAGLISTE: return "A clinician enters a diagnosis for a given patient."; + case DISCHINSTE: return "A person provides a discharge instruction to a patient."; + case DISCHSUME: return "A clinician enters a discharge summary for a given patient."; + case PATEDUE: return "A person provides a patient-specific education handout to a patient."; + case PATREPE: return "A pathologist enters a report for a given patient."; + case PROBLISTE: return "A clinician enters a problem for a given patient."; + case RADREPE: return "A radiologist enters a report for a given patient."; + case IMMLREV: return "Description: A person reviews a list of immunizations due or received for a given patient."; + case REMLREV: return "Description: A person reviews a list of health care reminders for a given patient."; + case WELLREMLREV: return "Description: A person reviews a list of wellness or preventive care reminders for a given patient."; + case PATINFO: return "A person (e.g., clinician, the patient herself) reviews patient information in the electronic medical record."; + case ALLERLE: return "Description: A person enters a known allergy for a given patient."; + case CDSREV: return "A person reviews a recommendation/assessment provided automatically by a clinical decision support application for a given patient."; + case CLINNOTEREV: return "A person reviews a clinical note of a given patient."; + case DISCHSUMREV: return "A person reviews a discharge summary of a given patient."; + case DIAGLISTREV: return "A person reviews a list of diagnoses of a given patient."; + case IMMLE: return "Description: A person enters an immunization due or received for a given patient."; + case LABRREV: return "A person reviews a list of laboratory results of a given patient."; + case MICRORREV: return "A person reviews a list of microbiology results of a given patient."; + case MICROORGRREV: return "A person reviews organisms of microbiology results of a given patient."; + case MICROSENSRREV: return "A person reviews the sensitivity test of microbiology results of a given patient."; + case MLREV: return "A person reviews a list of medication orders submitted to a given patient"; + case MARWLREV: return "A clinician reviews a work list of medications to be administered to a given patient."; + case OREV: return "A person reviews a list of orders submitted to a given patient."; + case PATREPREV: return "A person reviews a pathology report of a given patient."; + case PROBLISTREV: return "A person reviews a list of problems of a given patient."; + case RADREPREV: return "A person reviews a radiology report of a given patient."; + case REMLE: return "Description: A person enters a health care reminder for a given patient."; + case WELLREMLE: return "Description: A person enters a wellness or preventive care reminder for a given patient."; + case RISKASSESS: return "A person reviews a Risk Assessment Instrument report of a given patient."; + case FALLRISK: return "A person reviews a Falls Risk Assessment Instrument report of a given patient."; + case _ACTTRANSPORTATIONMODECODE: return "Characterizes how a transportation act was or will be carried out.\r\n\n \n Examples: Via private transport, via public transit, via courier."; + case _ACTPATIENTTRANSPORTATIONMODECODE: return "Definition: Characterizes how a patient was or will be transported to the site of a patient encounter.\r\n\n \n Examples: Via ambulance, via public transit, on foot."; + case AFOOT: return "pedestrian transport"; + case AMBT: return "ambulance transport"; + case AMBAIR: return "fixed-wing ambulance transport"; + case AMBGRND: return "ground ambulance transport"; + case AMBHELO: return "helicopter ambulance transport"; + case LAWENF: return "law enforcement transport"; + case PRVTRN: return "private transport"; + case PUBTRN: return "public transport"; + case _OBSERVATIONTYPE: return "Identifies the kinds of observations that can be performed"; + case _ACTSPECOBSCODE: return "Identifies the type of observation that is made about a specimen that may affect its processing, analysis or further result interpretation"; + case ARTBLD: return "Describes the artificial blood identifier that is associated with the specimen."; + case DILUTION: return "An observation that reports the dilution of a sample."; + case AUTOHIGH: return "The dilution of a sample performed by automated equipment. The value is specified by the equipment"; + case AUTOLOW: return "The dilution of a sample performed by automated equipment. The value is specified by the equipment"; + case PRE: return "The dilution of the specimen made prior to being loaded onto analytical equipment"; + case RERUN: return "The value of the dilution of a sample after it had been analyzed at a prior dilution value"; + case EVNFCTS: return "Domain provides codes that qualify the ActLabObsEnvfctsCode domain. (Environmental Factors)"; + case INTFR: return "An observation that relates to factors that may potentially cause interference with the observation"; + case FIBRIN: return "The Fibrin Index of the specimen. In the case of only differentiating between Absent and Present, recommend using 0 and 1"; + case HEMOLYSIS: return "An observation of the hemolysis index of the specimen in g/L"; + case ICTERUS: return "An observation that describes the icterus index of the specimen. It is recommended to use mMol/L of bilirubin"; + case LIPEMIA: return "An observation used to describe the Lipemia Index of the specimen. It is recommended to use the optical turbidity at 600 nm (in absorbance units)."; + case VOLUME: return "An observation that reports the volume of a sample."; + case AVAILABLE: return "The available quantity of specimen. This is the current quantity minus any planned consumption (e.g., tests that are planned)"; + case CONSUMPTION: return "The quantity of specimen that is used each time the equipment uses this substance"; + case CURRENT: return "The current quantity of the specimen, i.e., initial quantity minus what has been actually used."; + case INITIAL: return "The initial quantity of the specimen in inventory"; + case _ANNOTATIONTYPE: return "AnnotationType"; + case _ACTPATIENTANNOTATIONTYPE: return "Description:Provides a categorization for annotations recorded directly against the patient ."; + case ANNDI: return "Description:A note that is specific to a patient's diagnostic images, either historical, current or planned."; + case ANNGEN: return "Description:A general or uncategorized note."; + case ANNIMM: return "A note that is specific to a patient's immunizations, either historical, current or planned."; + case ANNLAB: return "Description:A note that is specific to a patient's laboratory results, either historical, current or planned."; + case ANNMED: return "Description:A note that is specific to a patient's medications, either historical, current or planned."; + case _GENETICOBSERVATIONTYPE: return "Description: None provided"; + case GENE: return "Description: A DNA segment that contributes to phenotype/function. In the absence of demonstrated function a gene may be characterized by sequence, transcription or homology"; + case _IMMUNIZATIONOBSERVATIONTYPE: return "Description: Observation codes which describe characteristics of the immunization material."; + case OBSANTC: return "Description: Indicates the valid antigen count."; + case OBSANTV: return "Description: Indicates whether an antigen is valid or invalid."; + case _INDIVIDUALCASESAFETYREPORTTYPE: return "A code that is used to indicate the type of case safety report received from sender. The current code example reference is from the International Conference on Harmonisation (ICH) Expert Workgroup guideline on Clinical Safety Data Management: Data Elements for Transmission of Individual Case Safety Reports. The unknown/unavailable option allows the transmission of information from a secondary sender where the initial sender did not specify the type of report.\r\n\n Example concepts include: Spontaneous, Report from study, Other."; + case PATADVEVNT: return "Indicates that the ICSR is describing problems that a patient experienced after receiving a vaccine product."; + case VACPROBLEM: return "Indicates that the ICSR is describing a problem with the actual vaccine product such as physical defects (cloudy, particulate matter) or inability to confer immunity."; + case _LOINCOBSERVATIONACTCONTEXTAGETYPE: return "Definition:The set of LOINC codes for the act of determining the period of time that has elapsed since an entity was born or created."; + case _216119: return "Definition:Estimated age."; + case _216127: return "Definition:Reported age."; + case _295535: return "Definition:Calculated age."; + case _305250: return "Definition:General specification of age with no implied method of determination."; + case _309724: return "Definition:Age at onset of associated adverse event; no implied method of determination."; + case _MEDICATIONOBSERVATIONTYPE: return "MedicationObservationType"; + case REPHALFLIFE: return "Description:This observation represents an 'average' or 'expected' half-life typical of the product."; + case SPLCOATING: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, indicating whether it has one or more coatings such as sugar coating, film coating, or enteric coating. Only coatings to the external surface or the dosage form should be considered (for example, coatings to individual pellets or granules inside a capsule or tablet are excluded from consideration).\r\n\n \n Constraints: The Observation.value must be a Boolean (BL) with true for the presence or false for the absence of one or more coatings on a solid dosage form."; + case SPLCOLOR: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the color or colors that most predominantly define the appearance of the dose form. SPLCOLOR is not an FDA specification for the actual color of solid dosage forms or the names of colors that can appear in labeling.\r\n\n \n Constraints: The Observation.value must be a single coded value or a list of multiple coded values, specifying one or more distinct colors that approximate of the color(s) of distinct areas of the solid dosage form, such as the different sides of a tablet or one-part capsule, or the different halves of a two-part capsule. Bands on banded capsules, regardless of the color, are not considered when assigning an SPLCOLOR. Imprints on the dosage form, regardless of their color are not considered when assigning an SPLCOLOR. If more than one color exists on a particular side or half, then the most predominant color on that side or half is recorded. If the gelatin capsule shell is colorless and transparent, use the predominant color of the contents that appears through the colorless and transparent capsule shell. Colors can include: Black;Gray;White;Red;Pink;Purple;Green;Yellow;Orange;Brown;Blue;Turquoise."; + case SPLIMAGE: return "Description: A characteristic representing a single file reference that contains two or more views of the same dosage form of the product; in most cases this should represent front and back views of the dosage form, but occasionally additional views might be needed in order to capture all of the important physical characteristics of the dosage form. Any imprint and/or symbol should be clearly identifiable, and the viewer should not normally need to rotate the image in order to read it. Images that are submitted with SPL should be included in the same directory as the SPL file."; + case SPLIMPRINT: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the alphanumeric text that appears on the solid dosage form, including text that is embossed, debossed, engraved or printed with ink. The presence of other non-textual distinguishing marks or symbols is recorded by SPLSYMBOL.\r\n\n \n Examples: Included in SPLIMPRINT are alphanumeric text that appears on the bands of banded capsules and logos and other symbols that can be interpreted as letters or numbers.\r\n\n \n Constraints: The Observation.value must be of type Character String (ST). Excluded from SPLIMPRINT are internal and external cut-outs in the form of alphanumeric text and the letter 'R' with a circle around it (when referring to a registered trademark) and the letters 'TM' (when referring to a 'trade mark'). To record text, begin on either side or part of the dosage form. Start at the top left and progress as one would normally read a book. Enter a semicolon to show separation between words or line divisions."; + case SPLSCORING: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the number of equal pieces that the solid dosage form can be divided into using score line(s). \r\n\n \n Example: One score line creating two equal pieces is given a value of 2, two parallel score lines creating three equal pieces is given a value of 3.\r\n\n \n Constraints: Whether three parallel score lines create four equal pieces or two intersecting score lines create two equal pieces using one score line and four equal pieces using both score lines, both have the scoring value of 4. Solid dosage forms that are not scored are given a value of 1. Solid dosage forms that can only be divided into unequal pieces are given a null-value with nullFlavor other (OTH)."; + case SPLSHAPE: return "Description: A characteristic of an oral solid dosage form of a medicinal product, specifying the two dimensional representation of the solid dose form, in terms of the outside perimeter of a solid dosage form when the dosage form, resting on a flat surface, is viewed from directly above, including slight rounding of corners. SPLSHAPE does not include embossing, scoring, debossing, or internal cut-outs. SPLSHAPE is independent of the orientation of the imprint and logo. Shapes can include: Triangle (3 sided); Square; Round; Semicircle; Pentagon (5 sided); Diamond; Double circle; Bullet; Hexagon (6 sided); Rectangle; Gear; Capsule; Heptagon (7 sided); Trapezoid; Oval; Clover; Octagon (8 sided); Tear; Freeform."; + case SPLSIZE: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, specifying the longest single dimension of the solid dosage form as a physical quantity in the dimension of length (e.g., 3 mm). The length is should be specified in millimeters and should be rounded to the nearest whole millimeter.\r\n\n \n Example: SPLSIZE for a rectangular shaped tablet is the length and SPLSIZE for a round shaped tablet is the diameter."; + case SPLSYMBOL: return "Definition: A characteristic of an oral solid dosage form of a medicinal product, to describe whether or not the medicinal product has a mark or symbol appearing on it for easy and definite recognition. Score lines, letters, numbers, and internal and external cut-outs are not considered marks or symbols. See SPLSCORING and SPLIMPRINT for these characteristics.\r\n\n \n Constraints: The Observation.value must be a Boolean (BL) with true indicating the presence and false for the absence of marks or symbols.\r\n\n \n Example:"; + case _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE: return "Distinguishes the kinds of coded observations that could be the trigger for clinical issue detection. These are observations that are not measurable, but instead can be defined with codes. Coded observation types include: Allergy, Intolerance, Medical Condition, Pregnancy status, etc."; + case _CASETRANSMISSIONMODE: return "Code for the mechanism by which disease was acquired by the living subject involved in the public health case. Includes sexually transmitted, airborne, bloodborne, vectorborne, foodborne, zoonotic, nosocomial, mechanical, dermal, congenital, environmental exposure, indeterminate."; + case AIRTRNS: return "Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation."; + case ANANTRNS: return "Communication of an agent from one animal to another proximate animal."; + case ANHUMTRNS: return "Communication of an agent from an animal to a proximate person."; + case BDYFLDTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with any body fluid."; + case BLDTRNS: return "Communication of an agent to a living subject through direct contact with blood or blood products whether the contact with blood is part of a therapeutic procedure or not."; + case DERMTRNS: return "Communication of an agent from a living subject or environmental source to a living subject via agent migration through intact skin."; + case ENVTRNS: return "Communication of an agent from an environmental surface or source to a living subject by direct contact."; + case FECTRNS: return "Communication of an agent from a living subject or environmental source to a living subject through oral contact with material contaminated by person or animal fecal material."; + case FOMTRNS: return "Communication of an agent from an non-living material to a living subject through direct contact."; + case FOODTRNS: return "Communication of an agent from a food source to a living subject via oral consumption."; + case HUMHUMTRNS: return "Communication of an agent from a person to a proximate person."; + case INDTRNS: return "Communication of an agent to a living subject via an undetermined route."; + case LACTTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with mammalian milk or colostrum."; + case NOSTRNS: return "Communication of an agent from any entity to a living subject while the living subject is in the patient role in a healthcare facility."; + case PARTRNS: return "Communication of an agent from a living subject or environmental source to a living subject where the acquisition of the agent is not via the alimentary canal."; + case PLACTRNS: return "Communication of an agent from a living subject to the progeny of that living subject via agent migration across the maternal-fetal placental membranes while in utero."; + case SEXTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with genital or oral tissues as part of a sexual act."; + case TRNSFTRNS: return "Communication of an agent from one living subject to another living subject through direct contact with blood or blood products where the contact with blood is part of a therapeutic procedure."; + case VECTRNS: return "Communication of an agent from a living subject acting as a required intermediary in the agent transmission process to a recipient living subject via direct contact."; + case WATTRNS: return "Communication of an agent from a contaminated water source to a living subject whether the water is ingested as a food or not. The route of entry of the water may be through any bodily orifice."; + case _OBSERVATIONQUALITYMEASUREATTRIBUTE: return "Codes used to define various metadata aspects of a health quality measure."; + case AGGREGATE: return "Indicates that the observation is carrying out an aggregation calculation, contained in the value element."; + case CMPMSRMTH: return "Indicates what method is used in a quality measure to combine the component measure results included in an composite measure."; + case CMPMSRSCRWGHT: return "An attribute of a quality measure describing the weight this component measure score is to carry in determining the overall composite measure final score. The value is real value greater than 0 and less than 1.0. Each component measure score will be multiplied by its CMPMSRSCRWGHT and then summed with the other component measures to determine the final overall composite measure score. The sum across all CMPMSRSCRWGHT values within a single composite measure SHALL be 1.0. The value assigned is scoped to the composite measure referencing this component measure only."; + case COPY: return "Identifies the organization(s) who own the intellectual property represented by the eMeasure."; + case CRS: return "Summary of relevant clinical guidelines or other clinical recommendations supporting this eMeasure."; + case DEF: return "Description of individual terms, provided as needed."; + case DISC: return "Disclaimer information for the eMeasure."; + case FINALDT: return "The timestamp when the eMeasure was last packaged in the Measure Authoring Tool."; + case GUIDE: return "Used to allow measure developers to provide additional guidance for implementers to understand greater specificity than could be provided in the logic for data criteria."; + case IDUR: return "Information on whether an increase or decrease in score is the preferred result \n(e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range)."; + case ITMCNT: return "Describes the items counted by the measure (e.g., patients, encounters, procedures, etc.)"; + case KEY: return "A significant word that aids in discoverability."; + case MEDT: return "The end date of the measurement period."; + case MSD: return "The start date of the measurement period."; + case MSRADJ: return "The method of adjusting for clinical severity and conditions present at the start of care that can influence patient outcomes for making valid comparisons of outcome measures across providers. Indicates whether an eMeasure is subject to the statistical process for reducing, removing, or clarifying the influences of confounding factors to allow more useful comparisons."; + case MSRAGG: return "Describes how to combine information calculated based on logic in each of several populations into one summarized result. It can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure. (e.g., pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two). \r\n\n \n Open Issue: The description does NOT align well with the definition used in the HQMF specfication; correct the MSGAGG definition, and the possible distinction of MSRAGG as a child of AGGREGATE."; + case MSRIMPROV: return "Information on whether an increase or decrease in score is the preferred result. This should reflect information on which way is better, an increase or decrease in score."; + case MSRJUR: return "The list of jurisdiction(s) for which the measure applies."; + case MSRRPTR: return "Type of person or organization that is expected to report the issue."; + case MSRRPTTIME: return "The maximum time that may elapse following completion of the measure until the measure report must be sent to the receiver."; + case MSRSCORE: return "Indicates how the calculation is performed for the eMeasure \n(e.g., proportion, continuous variable, ratio)"; + case MSRSET: return "Location(s) in which care being measured is rendered\r\n\n Usage Note: MSRSET is used rather than RoleCode because the setting applies to what is being measured, as opposed to participating directly in the health quality measure documantion itself)."; + case MSRTOPIC: return "health quality measure topic type"; + case MSRTP: return "The time period for which the eMeasure applies."; + case MSRTYPE: return "Indicates whether the eMeasure is used to examine a process or an outcome over time \n(e.g., Structure, Process, Outcome)."; + case RAT: return "Succinct statement of the need for the measure. Usually includes statements pertaining to Importance criterion: impact, gap in care and evidence."; + case REF: return "Identifies bibliographic citations or references to clinical practice guidelines, sources of evidence, or other relevant materials supporting the intent and rationale of the eMeasure."; + case SDE: return "Comparison of results across strata can be used to show where disparities exist or where there is a need to expose differences in results. For example, Centers for Medicare & Medicaid Services (CMS) in the U.S. defines four required Supplemental Data Elements (payer, ethnicity, race, and gender), which are variables used to aggregate data into various subgroups. Additional supplemental data elements required for risk adjustment or other purposes of data aggregation can be included in the Supplemental Data Element section."; + case STRAT: return "Describes the strata for which the measure is to be evaluated. There are three examples of reasons for stratification based on existing work. These include: (1) evaluate the measure based on different age groupings within the population described in the measure (e.g., evaluate the whole [age 14-25] and each sub-stratum [14-19] and [20-25]); (2) evaluate the eMeasure based on either a specific condition, a specific discharge location, or both; (3) evaluate the eMeasure based on different locations within a facility (e.g., evaluate the overall rate for all intensive care units and also some strata include additional findings [specific birth weights for neonatal intensive care units])."; + case TRANF: return "Can be a URL or hyperlinks that link to the transmission formats that are specified for a particular reporting program."; + case USE: return "Usage notes."; + case _OBSERVATIONSEQUENCETYPE: return "ObservationSequenceType"; + case TIMEABSOLUTE: return "A sequence of values in the \"absolute\" time domain. This is the same time domain that all HL7 timestamps use. It is time as measured by the Gregorian calendar"; + case TIMERELATIVE: return "A sequence of values in a \"relative\" time domain. The time is measured relative to the earliest effective time in the Observation Series containing this sequence."; + case _OBSERVATIONSERIESTYPE: return "ObservationSeriesType"; + case _ECGOBSERVATIONSERIESTYPE: return "ECGObservationSeriesType"; + case REPRESENTATIVEBEAT: return "This Observation Series type contains waveforms of a \"representative beat\" (a.k.a. \"median beat\" or \"average beat\"). The waveform samples are measured in relative time, relative to the beginning of the beat as defined by the Observation Series effective time. The waveforms are not directly acquired from the subject, but rather algorithmically derived from the \"rhythm\" waveforms."; + case RHYTHM: return "This Observation type contains ECG \"rhythm\" waveforms. The waveform samples are measured in absolute time (a.k.a. \"subject time\" or \"effective time\"). These waveforms are usually \"raw\" with some minimal amount of noise reduction and baseline filtering applied."; + case _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE: return "Description: Reporting codes that are related to an immunization event."; + case CLSSRM: return "Description: The class room associated with the patient during the immunization event."; + case GRADE: return "Description: The school grade or level the patient was in when immunized."; + case SCHL: return "Description: The school the patient attended when immunized."; + case SCHLDIV: return "Description: The school division or district associated with the patient during the immunization event."; + case TEACHER: return "Description: The patient's teacher when immunized."; + case _POPULATIONINCLUSIONOBSERVATIONTYPE: return "Observation types for specifying criteria used to assert that a subject is included in a particular population."; + case DENEX: return "Criteria which specify subjects who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator."; + case DENEXCEP: return "Criteria which specify the removal of a subject, procedure or unit of measurement from the denominator, only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories:\r\n\n \n Medical reasons\n Patient (or subject) reasons\n System reasons"; + case DENOM: return "Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). The denominator can be the same as the initial population, or it may be a subset of the initial population to further constrain it for the purpose of the eMeasure. Different measures within an eMeasure set may have different denominators. Continuous Variable eMeasures do not have a denominator, but instead define a measure population."; + case IPOP: return "Criteria for specifying the entities to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs)."; + case IPPOP: return "Criteria for specifying the patients to be evaluated by a specific quality measure, based on a shared common set of characteristics (within a specific measurement set to which a given measure belongs). Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods."; + case MSRPOPL: return "Criteria for specifying\nthe measure population as a narrative description (e.g., all patients seen in the Emergency Department during the measurement period). This is used only in continuous variable eMeasures."; + case MSRPOPLEX: return "Criteria for specifying subjects who should be removed from the eMeasure's Initial Population and Measure Population. Measure Population Exclusions are used in Continuous Variable measures to help narrow the Measure Population before determining the value(s) of the continuous variable(s)."; + case NUMER: return "Criteria for specifying the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator for proportion measures, or related to (but not directly derived from) the denominator for ratio measures (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period)."; + case NUMEX: return "Criteria for specifying instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion). Numerator Exclusions are used only in ratio eMeasures."; + case _PREFERENCEOBSERVATIONTYPE: return "Types of observations that can be made about Preferences."; + case PREFSTRENGTH: return "An observation about how important a preference is to the target of the preference."; + case ADVERSEREACTION: return "Indicates that the observation is of an unexpected negative occurrence in the subject suspected to result from the subject's exposure to one or more agents. Observation values would be the symptom resulting from the reaction."; + case ASSERTION: return "Description:Refines classCode OBS to indicate an observation in which observation.value contains a finding or other nominalized statement, where the encoded information in Observation.value is not altered by Observation.code. For instance, observation.code=\"ASSERTION\" and observation.value=\"fracture of femur present\" is an assertion of a clinical finding of femur fracture."; + case CASESER: return "Definition:An observation that provides a characterization of the level of harm to an investigation subject as a result of a reaction or event."; + case CDIO: return "An observation that states whether the disease was likely acquired outside the jurisdiction of observation, and if so, the nature of the inter-jurisdictional relationship.\r\n\n \n OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it."; + case CRIT: return "A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality."; + case CTMO: return "An observation that states the mechanism by which disease was acquired by the living subject involved in the public health case.\r\n\n \n OpenIssue: This code could be moved to LOINC if it can be done before there are significant implemenations using it."; + case DX: return "Includes all codes defining types of indications such as diagnosis, symptom and other indications such as contrast agents for lab tests."; + case ADMDX: return "Admitting diagnosis are the diagnoses documented for administrative purposes as the basis for a hospital admission."; + case DISDX: return "Discharge diagnosis are the diagnoses documented for administrative purposes as the time of hospital discharge."; + case INTDX: return "Intermediate diagnoses are those diagnoses documented for administrative purposes during the course of a hospital stay."; + case NOI: return "The type of injury that the injury coding specifies."; + case GISTIER: return "Description: Accuracy determined as per the GIS tier code system."; + case HHOBS: return "Indicates that the observation is of a person’s living situation in a household including the household composition and circumstances."; + case ISSUE: return "There is a clinical issue for the therapy that makes continuation of the therapy inappropriate.\r\n\n \n Open Issue: The definition of this code does not correctly represent the concept space of its specializations (children)"; + case _ACTADMINISTRATIVEDETECTEDISSUECODE: return "Identifies types of detectyed issues for Act class \"ALRT\" for the administrative and patient administrative acts domains."; + case _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE: return "ActAdministrativeAuthorizationDetectedIssueCode"; + case NAT: return "The requesting party has insufficient authorization to invoke the interaction."; + case SUPPRESSED: return "Description: One or more records in the query response have been suppressed due to consent or privacy restrictions."; + case VALIDAT: return "Description:The specified element did not pass business-rule validation."; + case KEY204: return "The ID of the patient, order, etc., was not found. Used for transactions other than additions, e.g. transfer of a non-existent patient."; + case KEY205: return "The ID of the patient, order, etc., already exists. Used in response to addition transactions (Admit, New Order, etc.)."; + case COMPLY: return "There may be an issue with the patient complying with the intentions of the proposed therapy"; + case DUPTHPY: return "The proposed therapy appears to duplicate an existing therapy"; + case DUPTHPCLS: return "Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy, though the specific mechanisms of action vary."; + case DUPTHPGEN: return "Description:The proposed therapy appears to have the same intended therapeutic benefit as an existing therapy and uses the same mechanisms of action as the existing therapy."; + case ABUSE: return "Description:The proposed therapy is frequently misused or abused and therefore should be used with caution and/or monitoring."; + case FRAUD: return "Description:The request is suspected to have a fraudulent basis."; + case PLYDOC: return "A similar or identical therapy was recently ordered by a different practitioner."; + case PLYPHRM: return "This patient was recently supplied a similar or identical therapy from a different pharmacy or supplier."; + case DOSE: return "Proposed dosage instructions for therapy differ from standard practice."; + case DOSECOND: return "Description:Proposed dosage is inappropriate due to patient's medical condition."; + case DOSEDUR: return "Proposed length of therapy differs from standard practice."; + case DOSEDURH: return "Proposed length of therapy is longer than standard practice"; + case DOSEDURHIND: return "Proposed length of therapy is longer than standard practice for the identified indication or diagnosis"; + case DOSEDURL: return "Proposed length of therapy is shorter than that necessary for therapeutic effect"; + case DOSEDURLIND: return "Proposed length of therapy is shorter than standard practice for the identified indication or diagnosis"; + case DOSEH: return "Proposed dosage exceeds standard practice"; + case DOSEHINDA: return "Proposed dosage exceeds standard practice for the patient's age"; + case DOSEHIND: return "High Dose for Indication Alert"; + case DOSEHINDSA: return "Proposed dosage exceeds standard practice for the patient's height or body surface area"; + case DOSEHINDW: return "Proposed dosage exceeds standard practice for the patient's weight"; + case DOSEIVL: return "Proposed dosage interval/timing differs from standard practice"; + case DOSEIVLIND: return "Proposed dosage interval/timing differs from standard practice for the identified indication or diagnosis"; + case DOSEL: return "Proposed dosage is below suggested therapeutic levels"; + case DOSELINDA: return "Proposed dosage is below suggested therapeutic levels for the patient's age"; + case DOSELIND: return "Low Dose for Indication Alert"; + case DOSELINDSA: return "Proposed dosage is below suggested therapeutic levels for the patient's height or body surface area"; + case DOSELINDW: return "Proposed dosage is below suggested therapeutic levels for the patient's weight"; + case MDOSE: return "Description:The maximum quantity of this drug allowed to be administered within a particular time-range (month, year, lifetime) has been reached or exceeded."; + case OBSA: return "Proposed therapy may be inappropriate or contraindicated due to conditions or characteristics of the patient"; + case AGE: return "Proposed therapy may be inappropriate or contraindicated due to patient age"; + case ADALRT: return "Proposed therapy is outside of the standard practice for an adult patient."; + case GEALRT: return "Proposed therapy is outside of standard practice for a geriatric patient."; + case PEALRT: return "Proposed therapy is outside of the standard practice for a pediatric patient."; + case COND: return "Proposed therapy may be inappropriate or contraindicated due to an existing/recent patient condition or diagnosis"; + case HGHT: return ""; + case LACT: return "Proposed therapy may be inappropriate or contraindicated when breast-feeding"; + case PREG: return "Proposed therapy may be inappropriate or contraindicated during pregnancy"; + case WGHT: return ""; + case CREACT: return "Description:Proposed therapy may be inappropriate or contraindicated because of a common but non-patient specific reaction to the product.\r\n\n \n Example:There is no record of a specific sensitivity for the patient, but the presence of the sensitivity is common and therefore caution is warranted."; + case GEN: return "Proposed therapy may be inappropriate or contraindicated due to patient genetic indicators."; + case GEND: return "Proposed therapy may be inappropriate or contraindicated due to patient gender."; + case LAB: return "Proposed therapy may be inappropriate or contraindicated due to recent lab test results"; + case REACT: return "Proposed therapy may be inappropriate or contraindicated based on the potential for a patient reaction to the proposed product"; + case ALGY: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to the proposed product. (Allergies are immune based reactions.)"; + case INT: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to the proposed product. (Intolerances are non-immune based sensitivities.)"; + case RREACT: return "Proposed therapy may be inappropriate or contraindicated because of a potential patient reaction to a cross-sensitivity related product."; + case RALG: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient allergy to a cross-sensitivity related product. (Allergies are immune based reactions.)"; + case RAR: return "Proposed therapy may be inappropriate or contraindicated because of a recorded prior adverse reaction to a cross-sensitivity related product."; + case RINT: return "Proposed therapy may be inappropriate or contraindicated because of a recorded patient intolerance to a cross-sensitivity related product. (Intolerances are non-immune based sensitivities.)"; + case BUS: return "Description:A local business rule relating multiple elements has been violated."; + case CODEINVAL: return "Description:The specified code is not valid against the list of codes allowed for the element."; + case CODEDEPREC: return "Description:The specified code has been deprecated and should no longer be used. Select another code from the code system."; + case FORMAT: return "Description:The element does not follow the formatting or type rules defined for the field."; + case ILLEGAL: return "Description:The request is missing elements or contains elements which cause it to not meet the legal standards for actioning."; + case LENRANGE: return "Description:The length of the data specified falls out of the range defined for the element."; + case LENLONG: return "Description:The length of the data specified is greater than the maximum length defined for the element."; + case LENSHORT: return "Description:The length of the data specified is less than the minimum length defined for the element."; + case MISSCOND: return "Description:The specified element must be specified with a non-null value under certain conditions. In this case, the conditions are true but the element is still missing or null."; + case MISSMAND: return "Description:The specified element is mandatory and was not included in the instance."; + case NODUPS: return "Description:More than one element with the same value exists in the set. Duplicates not permission in this set in a set."; + case NOPERSIST: return "Description: Element in submitted message will not persist in data storage based on detected issue."; + case REPRANGE: return "Description:The number of repeating elements falls outside the range of the allowed number of repetitions."; + case MAXOCCURS: return "Description:The number of repeating elements is above the maximum number of repetitions allowed."; + case MINOCCURS: return "Description:The number of repeating elements is below the minimum number of repetitions allowed."; + case _ACTADMINISTRATIVERULEDETECTEDISSUECODE: return "ActAdministrativeRuleDetectedIssueCode"; + case KEY206: return "Description: Metadata associated with the identification (e.g. name or gender) does not match the identification being verified."; + case OBSOLETE: return "Description: One or more records in the query response have a status of 'obsolete'."; + case _ACTSUPPLIEDITEMDETECTEDISSUECODE: return "Identifies types of detected issues regarding the administration or supply of an item to a patient."; + case _ADMINISTRATIONDETECTEDISSUECODE: return "Administration of the proposed therapy may be inappropriate or contraindicated as proposed"; + case _APPROPRIATENESSDETECTEDISSUECODE: return "AppropriatenessDetectedIssueCode"; + case _INTERACTIONDETECTEDISSUECODE: return "InteractionDetectedIssueCode"; + case FOOD: return "Proposed therapy may interact with certain foods"; + case TPROD: return "Proposed therapy may interact with an existing or recent therapeutic product"; + case DRG: return "Proposed therapy may interact with an existing or recent drug therapy"; + case NHP: return "Proposed therapy may interact with existing or recent natural health product therapy"; + case NONRX: return "Proposed therapy may interact with a non-prescription drug (e.g. alcohol, tobacco, Aspirin)"; + case PREVINEF: return "Definition:The same or similar treatment has previously been attempted with the patient without achieving a positive effect."; + case DACT: return "Description:Proposed therapy may be contraindicated or ineffective based on an existing or recent drug therapy."; + case TIME: return "Description:Proposed therapy may be inappropriate or ineffective based on the proposed start or end time."; + case ALRTENDLATE: return "Definition:Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy."; + case ALRTSTRTLATE: return "Definition:Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition."; + case _TIMINGDETECTEDISSUECODE: return "Proposed therapy may be inappropriate or ineffective based on the proposed start or end time."; + case ENDLATE: return "Proposed therapy may be inappropriate or ineffective because the end of administration is too close to another planned therapy"; + case STRTLATE: return "Proposed therapy may be inappropriate or ineffective because the start of administration is too late after the onset of the condition"; + case _SUPPLYDETECTEDISSUECODE: return "Supplying the product at this time may be inappropriate or indicate compliance issues with the associated therapy"; + case ALLDONE: return "Definition:The requested action has already been performed and so this request has no effect"; + case FULFIL: return "Definition:The therapy being performed is in some way out of alignment with the requested therapy."; + case NOTACTN: return "Definition:The status of the request being fulfilled has changed such that it is no longer actionable. This may be because the request has expired, has already been completely fulfilled or has been otherwise stopped or disabled. (Not used for 'suspended' orders.)"; + case NOTEQUIV: return "Definition:The therapy being performed is not sufficiently equivalent to the therapy which was requested."; + case NOTEQUIVGEN: return "Definition:The therapy being performed is not generically equivalent (having the identical biological action) to the therapy which was requested."; + case NOTEQUIVTHER: return "Definition:The therapy being performed is not therapeutically equivalent (having the same overall patient effect) to the therapy which was requested."; + case TIMING: return "Definition:The therapy is being performed at a time which diverges from the time the therapy was requested"; + case INTERVAL: return "Definition:The therapy action is being performed outside the bounds of the time period requested"; + case MINFREQ: return "Definition:The therapy action is being performed too soon after the previous occurrence based on the requested frequency"; + case HELD: return "Definition:There should be no actions taken in fulfillment of a request that has been held or suspended."; + case TOOLATE: return "The patient is receiving a subsequent fill significantly later than would be expected based on the amount previously supplied and the therapy dosage instructions"; + case TOOSOON: return "The patient is receiving a subsequent fill significantly earlier than would be expected based on the amount previously supplied and the therapy dosage instructions"; + case HISTORIC: return "Description: While the record was accepted in the repository, there is a more recent version of a record of this type."; + case PATPREF: return "Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record."; + case PATPREFALT: return "Definition:The proposed therapy goes against preferences or consent constraints recorded in the patient's record. An alternate therapy meeting those constraints is available."; + case KSUBJ: return "Categorization of types of observation that capture the main clinical knowledge subject which may be a medication, a laboratory test, a disease."; + case KSUBT: return "Categorization of types of observation that capture a knowledge subtopic which might be treatment, etiology, or prognosis."; + case OINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to an agent."; + case ALG: return "Hypersensitivity to an agent caused by an immunologic response to an initial exposure"; + case DALG: return "An allergy to a pharmaceutical product."; + case EALG: return "An allergy to a substance other than a drug or a food. E.g. Latex, pollen, etc."; + case FALG: return "An allergy to a substance generally consumed for nutritional purposes."; + case DINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to a drug."; + case DNAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case EINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to environmental conditions."; + case ENAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case FINT: return "Hypersensitivity resulting in an adverse reaction upon exposure to food."; + case FNAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case NAINT: return "Hypersensitivity to an agent caused by a mechanism other than an immunologic response to an initial exposure"; + case SEV: return "A subjective evaluation of the seriousness or intensity associated with another observation."; + case _FDALABELDATA: return "FDA label data"; + case FDACOATING: return "FDA label coating"; + case FDACOLOR: return "FDA label color"; + case FDAIMPRINTCD: return "FDA label imprint code"; + case FDALOGO: return "FDA label logo"; + case FDASCORING: return "FDA label scoring"; + case FDASHAPE: return "FDA label shape"; + case FDASIZE: return "FDA label size"; + case _ROIOVERLAYSHAPE: return "Shape of the region on the object being referenced"; + case CIRCLE: return "A circle defined by two (column,row) pairs. The first point is the center of the circle and the second point is a point on the perimeter of the circle."; + case ELLIPSE: return "An ellipse defined by four (column,row) pairs, the first two points specifying the endpoints of the major axis and the second two points specifying the endpoints of the minor axis."; + case POINT: return "A single point denoted by a single (column,row) pair, or multiple points each denoted by a (column,row) pair."; + case POLY: return "A series of connected line segments with ordered vertices denoted by (column,row) pairs; if the first and last vertices are the same, it is a closed polygon."; + case C: return "Description:Indicates that result data has been corrected."; + case DIET: return "Code set to define specialized/allowed diets"; + case BR: return "A diet exclusively composed of oatmeal, semolina, or rice, to be extremely easy to eat and digest."; + case DM: return "A diet that uses carbohydrates sparingly. Typically with a restriction in daily energy content (e.g. 1600-2000 kcal)."; + case FAST: return "No enteral intake of foot or liquids whatsoever, no smoking. Typically 6 to 8 hours before anesthesia."; + case FORMULA: return "A diet consisting of a formula feeding, either for an infant or an adult, to provide nutrition either orally or through the gastrointestinal tract via tube, catheter or stoma."; + case GF: return "Gluten free diet for celiac disease."; + case LF: return "A diet low in fat, particularly to patients with hepatic diseases."; + case LP: return "A low protein diet for patients with renal failure."; + case LQ: return "A strictly liquid diet, that can be fully absorbed in the intestine, and therefore may not contain fiber. Used before enteral surgeries."; + case LS: return "A diet low in sodium for patients with congestive heart failure and/or renal failure."; + case N: return "A normal diet, i.e. no special preparations or restrictions for medical reasons. This is notwithstanding any preferences the patient might have regarding special foods, such as vegetarian, kosher, etc."; + case NF: return "A no fat diet for acute hepatic diseases."; + case PAF: return "Phenylketonuria diet."; + case PAR: return "Patient is supplied with parenteral nutrition, typically described in terms of i.v. medications."; + case RD: return "A diet that seeks to reduce body fat, typically low energy content (800-1600 kcal)."; + case SCH: return "A diet that avoids ingredients that might cause digestion problems, e.g., avoid excessive fat, avoid too much fiber (cabbage, peas, beans)."; + case SUPPLEMENT: return "A diet that is not intended to be complete but is added to other diets."; + case T: return "This is not really a diet, since it contains little nutritional value, but is essentially just water. Used before coloscopy examinations."; + case VLI: return "Diet with low content of the amino-acids valin, leucin, and isoleucin, for \"maple syrup disease.\""; + case DRUGPRG: return "Definition: A public or government health program that administers and funds coverage for prescription drugs to assist program eligible who meet financial and health status criteria."; + case F: return "Description:Indicates that a result is complete. No further results are to come. This maps to the 'complete' state in the observation result status code."; + case PRLMN: return "Description:Indicates that a result is incomplete. There are further results to come. This maps to the 'active' state in the observation result status code."; + case SECOBS: return "An observation identifying security metadata about an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security metadata are used to name security labels. \r\n\n \n Rationale: According to ISO/TS 22600-3:2009(E) A.9.1.7 SECURITY LABEL MATCHING, Security label matching compares the initiator's clearance to the target's security label. All of the following must be true for authorization to be granted:\r\n\n \n The security policy identifiers shall be identical\n The classification level of the initiator shall be greater than or equal to that of the target (that is, there shall be at least one value in the classification list of the clearance greater than or equal to the classification of the target), and \n For each security category in the target label, there shall be a security category of the same type in the initiator's clearance and the initiator's classification level shall dominate that of the target.\n \n \n Examples: SecurityObservationType security label fields include:\r\n\n \n Confidentiality classification\n Compartment category\n Sensitivity category\n Security mechanisms used to ensure data integrity or to perform authorized data transformation\n Indicators of an IT resource completeness, veracity, reliability, trustworthiness, or provenance.\n \n \n Usage Note: SecurityObservationType codes designate security label field types, which are valued with an applicable SecurityObservationValue code as the \"security label tag\"."; + case SECCATOBS: return "Type of security metadata observation made about the category of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security category metadata is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: \"A nonhierarchical grouping of sensitive information used to control access to data more finely than with hierarchical security classification alone.\"\r\n\n \n Rationale: A security category observation supports requirement to specify the type of IT resource to facilitate application of appropriate levels of information security according to a range of levels of impact or consequences that might result from the unauthorized disclosure, modification, or use of the information or information system. A resource is assigned to a specific category of information (e.g., privacy, medical, proprietary, financial, investigative, contractor sensitive, security management) defined by an organization or in some instances, by a specific law, Executive Order, directive, policy, or regulation. [FIPS 199]\r\n\n \n Examples: Types of security categories include:\r\n\n \n Compartment: A division of data into isolated blocks with separate security controls for the purpose of reducing risk. (ISO 2382-8). A security label tag that \"segments\" an IT resource by indicating that access and use is restricted to members of a defined community or project. (HL7 Healthcare Classification System) \n Sensitivity: The characteristic of an IT resource which implies its value or importance and may include its vulnerability. (ISO 7492-2) Privacy metadata for information perceived as undesirable to share. (HL7 Healthcare Classification System)"; + case SECCLASSOBS: return "Type of security metadata observation made about the classification of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security classification is defined by ISO/IEC 2382-8:1998(E/F)/ T-REC-X.812-1995 as: \"The determination of which specific degree of protection against access the data or information requires, together with a designation of that degree of protection.\" Security classification metadata is based on an analysis of applicable policies and the risk of financial, reputational, or other harm that could result from unauthorized disclosure.\r\n\n \n Rationale: A security classification observation may indicate that the confidentiality level indicated by an Act or Role confidentiality attribute has been overridden by the entity responsible for ascribing the SecurityClassificationObservationValue. This supports the business requirement for increasing or decreasing the level of confidentiality (classification or declassification) based on parameters beyond the original assignment of an Act or Role confidentiality.\r\n\n \n Examples: Types of security classification include: HL7 Confidentiality Codes such as very restricted, unrestricted, and normal. Intelligence community examples include top secret, secret, and confidential.\r\n\n \n Usage Note: Security classification observation type codes designate security label field types, which are valued with an applicable SecurityClassificationObservationValue code as the \"security label tag\"."; + case SECCONOBS: return "Type of security metadata observation made about the control of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Security control metadata convey instructions to users and receivers for secure distribution, transmission, and storage; dictate obligations or mandated actions; specify any action prohibited by refrain policy such as dissemination controls; and stipulate the permissible purpose of use of an IT resource. \r\n\n \n Rationale: A security control observation supports requirement to specify applicable management, operational, and technical controls (i.e., safeguards or countermeasures) prescribed for an information system to protect the confidentiality, integrity, and availability of the system and its information. [FIPS 199]\r\n\n \n Examples: Types of security control metadata include: \r\n\n \n handling caveats\n dissemination controls\n obligations\n refrain policies\n purpose of use constraints"; + case SECINTOBS: return "Type of security metadata observation made about the integrity of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions.\r\n\n \n Rationale: A security integrity observation supports the requirement to guard against improper information modification or destruction, and includes ensuring information non-repudiation and authenticity. (44 U.S.C., SEC. 3542)\r\n\n \n Examples: Types of security integrity metadata include: \r\n\n \n Integrity status, which indicates the completeness or workflow status of an IT resource (data, information object, service, or system capability)\n Integrity confidence, which indicates the reliability and trustworthiness of an IT resource\n Integrity control, which indicates pertinent handling caveats, obligations, refrain policies, and purpose of use for the resource\n Data integrity, which indicate the security mechanisms used to ensure that the accuracy and consistency are preserved regardless of changes made (ISO/IEC DIS 2382-8)\n Alteration integrity, which indicate the security mechanisms used for authorized transformations of the resource\n Integrity provenance, which indicates the entity responsible for a report or assertion relayed \"second-hand\" about an IT resource"; + case SECALTINTOBS: return "Type of security metadata observation made about the alteration integrity of an IT resource (data, information object, service, or system capability), which indicates the mechanism used for authorized transformations of the resource.\r\n\n \n Examples: Types of security alteration integrity observation metadata, which may value the observation with a code used to indicate the mechanism used for authorized transformation of an IT resource, including: \r\n\n \n translation\n syntactic transformation\n semantic mapping\n redaction\n masking\n pseudonymization\n anonymization"; + case SECDATINTOBS: return "Type of security metadata observation made about the data integrity of an IT resource (data, information object, service, or system capability), which indicates the security mechanism used to preserve resource accuracy and consistency. Data integrity is defined by ISO 22600-23.3.21 as: \"The property that data has not been altered or destroyed in an unauthorized manner\", and by ISO/IEC 2382-8: The property of data whose accuracy and consistency are preserved regardless of changes made.\"\r\n\n \n Examples: Types of security data integrity observation metadata, which may value the observation, include cryptographic hash function and digital signature."; + case SECINTCONOBS: return "Type of security metadata observation made about the integrity confidence of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions.\r\n\n \n Examples: Types of security integrity confidence observation metadata, which may value the observation, include highly reliable, uncertain reliability, and not reliable.\r\n\n \n Usage Note: A security integrity confidence observation on an Act may indicate that a valued Act.uncertaintycode attribute has been overridden by the entity responsible for ascribing the SecurityIntegrityConfidenceObservationValue. This supports the business requirements for increasing or decreasing the assessment of the reliability or trustworthiness of an IT resource based on parameters beyond the original assignment of an Act statement level of uncertainty."; + case SECINTPRVOBS: return "Type of security metadata observation made about the provenance integrity of an IT resource (data, information object, service, or system capability), which indicates the lifecycle completeness of an IT resource in terms of workflow status such as its creation, modification, suspension, and deletion; locations in which the resource has been collected or archived, from which it may be retrieved, and the history of its distribution and disclosure. Integrity provenance metadata about an IT resource may be used to assess its veracity, reliability, and trustworthiness.\r\n\n \n Examples: Types of security integrity provenance observation metadata, which may value the observation about an IT resource, include: \r\n\n \n completeness or workflow status, such as authentication\n the entity responsible for original authoring or informing about an IT resource\n the entity responsible for a report or assertion about an IT resource relayed “second-handâ€?\n the entity responsible for excerpting, transforming, or compiling an IT resource"; + case SECINTPRVABOBS: return "Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that made assertions about the resource. The asserting entity may not be the original informant about the resource.\r\n\n \n Examples: Types of security integrity provenance asserted by observation metadata, which may value the observation, including: \r\n\n \n assertions about an IT resource by a patient\n assertions about an IT resource by a clinician\n assertions about an IT resource by a device"; + case SECINTPRVRBOBS: return "Type of security metadata observation made about the integrity provenance of an IT resource (data, information object, service, or system capability), which indicates the entity that reported the existence of the resource. The reporting entity may not be the original author of the resource.\r\n\n \n Examples: Types of security integrity provenance reported by observation metadata, which may value the observation, include: \r\n\n \n reports about an IT resource by a patient\n reports about an IT resource by a clinician\n reports about an IT resource by a device"; + case SECINTSTOBS: return "Type of security metadata observation made about the integrity status of an IT resource (data, information object, service, or system capability), which may be used to make access control decisions. Indicates the completeness of an IT resource in terms of workflow status, which may impact users that are authorized to access and use the resource.\r\n\n \n Examples: Types of security integrity status observation metadata, which may value the observation, include codes from the HL7 DocumentCompletion code system such as legally authenticated, in progress, and incomplete."; + case SECTRSTOBS: return "An observation identifying trust metadata about an IT resource (data, information object, service, or system capability), which may be used as a trust attribute to populate a computable trust policy, trust credential, trust assertion, or trust label field in a security label or trust policy, which are principally used for authentication, authorization, and access control decisions."; + case TRSTACCRDOBS: return "Type of security metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework."; + case TRSTAGREOBS: return "Type of security metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1]"; + case TRSTCERTOBS: return "Type of security metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1]\r\n\n \n For example,\n \r\n\n \n A Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. For example, a particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants.\n A Certificate Practice Statement (CSP), which is a statement of the practices which an Authority employs in issuing and managing certificates. [Trust Service Principles and Criteria for Certification Authorities Version 2.0 March 2011 Copyright 2011 by Canadian Institute of Chartered Accountants.]"; + case TRSTFWKOBS: return "Type of security metadata observation made about a complete set of contracts, regulations or commitments that enable participating actors to rely on certain assertions by other actors to fulfill their information security requirements. [Kantara Initiative]"; + case TRSTLOAOBS: return "Type of security metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol."; + case TRSTMECOBS: return "Type of security metadata observation made about a security architecture system component that supports enforcement of security policies."; + case SUBSIDFFS: return "Definition: A government health program that provides coverage on a fee for service basis for health services to persons meeting eligibility criteria such as income, location of residence, access to other coverages, health condition, and age, the cost of which is to some extent subsidized by public funds.\r\n\n \n Discussion: The structure and business processes for underwriting and administering a subsidized fee for service program is further specified by the Underwriter and Payer Role.class and Role.code."; + case WRKCOMP: return "Definition: Government mandated program providing coverage, disability income, and vocational rehabilitation for injuries sustained in the work place or in the course of employment. Employers may either self-fund the program, purchase commercial coverage, or pay a premium to a government entity that administers the program. Employees may be required to pay premiums toward the cost of coverage as well."; + case _ACTPROCEDURECODE: return "An identifying code for healthcare interventions/procedures."; + case _ACTBILLABLESERVICECODE: return "Definition: An identifying code for billable services, as opposed to codes for similar services used to identify them for functional purposes."; + case _HL7DEFINEDACTCODES: return "Domain provides the root for HL7-defined detailed or rich codes for the Act classes."; + case COPAY: return ""; + case DEDUCT: return ""; + case DOSEIND: return ""; + case PRA: return ""; + case STORE: return "The act of putting something away for safe keeping. The \"something\" may be physical object such as a specimen, or information, such as observations regarding a specimen."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTACCOUNTCODE: return "ActAccountCode"; + case ACCTRECEIVABLE: return "account receivable"; + case CASH: return "Cash"; + case CC: return "credit card"; + case AE: return "American Express"; + case DN: return "Diner's Club"; + case DV: return "Discover Card"; + case MC: return "Master Card"; + case V: return "Visa"; + case PBILLACCT: return "patient billing account"; + case _ACTADJUDICATIONCODE: return "ActAdjudicationCode"; + case _ACTADJUDICATIONGROUPCODE: return "ActAdjudicationGroupCode"; + case CONT: return "contract"; + case DAY: return "day"; + case LOC: return "location"; + case MONTH: return "month"; + case PERIOD: return "period"; + case PROV: return "provider"; + case WEEK: return "week"; + case YEAR: return "year"; + case AA: return "adjudicated with adjustments"; + case ANF: return "adjudicated with adjustments and no financial impact"; + case AR: return "adjudicated as refused"; + case AS: return "adjudicated as submitted"; + case _ACTADJUDICATIONRESULTACTIONCODE: return "ActAdjudicationResultActionCode"; + case DISPLAY: return "Display"; + case FORM: return "Print on Form"; + case _ACTBILLABLEMODIFIERCODE: return "ActBillableModifierCode"; + case CPTM: return "CPT modifier codes"; + case HCPCSA: return "HCPCS Level II and Carrier-assigned"; + case _ACTBILLINGARRANGEMENTCODE: return "ActBillingArrangementCode"; + case BLK: return "block funding"; + case CAP: return "capitation funding"; + case CONTF: return "contract funding"; + case FINBILL: return "financial"; + case ROST: return "roster funding"; + case SESS: return "sessional funding"; + case FFS: return "fee for service"; + case FFPS: return "first fill, part fill, partial strength"; + case FFCS: return "first fill complete, partial strength"; + case TFS: return "trial fill partial strength"; + case _ACTBOUNDEDROICODE: return "ActBoundedROICode"; + case ROIFS: return "fully specified ROI"; + case ROIPS: return "partially specified ROI"; + case _ACTCAREPROVISIONCODE: return "act care provision"; + case _ACTCREDENTIALEDCARECODE: return "act credentialed care"; + case _ACTCREDENTIALEDCAREPROVISIONPERSONCODE: return "act credentialed care provision peron"; + case CACC: return "certified anatomic pathology and clinical pathology care"; + case CAIC: return "certified allergy and immunology care"; + case CAMC: return "certified aerospace medicine care"; + case CANC: return "certified anesthesiology care"; + case CAPC: return "certified anatomic pathology care"; + case CBGC: return "certified clinical biochemical genetics care"; + case CCCC: return "certified clinical cytogenetics care"; + case CCGC: return "certified clinical genetics (M.D.) care"; + case CCPC: return "certified clinical pathology care"; + case CCSC: return "certified colon and rectal surgery care"; + case CDEC: return "certified dermatology care"; + case CDRC: return "certified diagnostic radiology care"; + case CEMC: return "certified emergency medicine care"; + case CFPC: return "certified family practice care"; + case CIMC: return "certified internal medicine care"; + case CMGC: return "certified clinical molecular genetics care"; + case CNEC: return "certified neurology care"; + case CNMC: return "certified nuclear medicine care"; + case CNQC: return "certified neurology with special qualifications in child neurology care"; + case CNSC: return "certified neurological surgery care"; + case COGC: return "certified obstetrics and gynecology care"; + case COMC: return "certified occupational medicine care"; + case COPC: return "certified ophthalmology care"; + case COSC: return "certified orthopaedic surgery care"; + case COTC: return "certified otolaryngology care"; + case CPEC: return "certified pediatrics care"; + case CPGC: return "certified Ph.D. medical genetics care"; + case CPHC: return "certified public health and general preventive medicine care"; + case CPRC: return "certified physical medicine and rehabilitation care"; + case CPSC: return "certified plastic surgery care"; + case CPYC: return "certified psychiatry care"; + case CROC: return "certified radiation oncology care"; + case CRPC: return "certified radiological physics care"; + case CSUC: return "certified surgery care"; + case CTSC: return "certified thoracic surgery care"; + case CURC: return "certified urology care"; + case CVSC: return "certified vascular surgery care"; + case LGPC: return "licensed general physician care"; + case _ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE: return "act credentialed care provision program"; + case AALC: return "accredited assisted living care"; + case AAMC: return "accredited ambulatory care"; + case ABHC: return "accredited behavioral health care"; + case ACAC: return "accredited critical access hospital care"; + case ACHC: return "accredited hospital care"; + case AHOC: return "accredited home care"; + case ALTC: return "accredited long term care"; + case AOSC: return "accredited office-based surgery care"; + case CACS: return "certified acute coronary syndrome care"; + case CAMI: return "certified acute myocardial infarction care"; + case CAST: return "certified asthma care"; + case CBAR: return "certified bariatric surgery care"; + case CCAD: return "certified coronary artery disease care"; + case CCAR: return "certified cardiac care"; + case CDEP: return "certified depression care"; + case CDGD: return "certified digestive/gastrointestinal disorders care"; + case CDIA: return "certified diabetes care"; + case CEPI: return "certified epilepsy care"; + case CFEL: return "certified frail elderly care"; + case CHFC: return "certified heart failure care"; + case CHRO: return "certified high risk obstetrics care"; + case CHYP: return "certified hyperlipidemia care"; + case CMIH: return "certified migraine headache care"; + case CMSC: return "certified multiple sclerosis care"; + case COJR: return "certified orthopedic joint replacement care"; + case CONC: return "certified oncology care"; + case COPD: return "certified chronic obstructive pulmonary disease care"; + case CORT: return "certified organ transplant care"; + case CPAD: return "certified parkinsons disease care"; + case CPND: return "certified pneumonia disease care"; + case CPST: return "certified primary stroke center care"; + case CSDM: return "certified stroke disease management care"; + case CSIC: return "certified sickle cell care"; + case CSLD: return "certified sleep disorders care"; + case CSPT: return "certified spine treatment care"; + case CTBU: return "certified trauma/burn center care"; + case CVDC: return "certified vascular diseases care"; + case CWMA: return "certified wound management care"; + case CWOH: return "certified women's health care"; + case _ACTENCOUNTERCODE: return "ActEncounterCode"; + case AMB: return "ambulatory"; + case EMER: return "emergency"; + case FLD: return "field"; + case HH: return "home health"; + case IMP: return "inpatient encounter"; + case ACUTE: return "inpatient acute"; + case NONAC: return "inpatient non-acute"; + case PRENC: return "pre-admission"; + case SS: return "short stay"; + case VR: return "virtual"; + case _ACTMEDICALSERVICECODE: return "ActMedicalServiceCode"; + case ALC: return "Alternative Level of Care"; + case CARD: return "Cardiology"; + case CHR: return "Chronic"; + case DNTL: return "Dental"; + case DRGRHB: return "Drug Rehab"; + case GENRL: return "General"; + case MED: return "Medical"; + case OBS: return "Obstetrics"; + case ONC: return "Oncology"; + case PALL: return "Palliative"; + case PED: return "Pediatrics"; + case PHAR: return "Pharmaceutical"; + case PHYRHB: return "Physical Rehab"; + case PSYCH: return "Psychiatric"; + case SURG: return "Surgical"; + case _ACTCLAIMATTACHMENTCATEGORYCODE: return "ActClaimAttachmentCategoryCode"; + case AUTOATTCH: return "auto attachment"; + case DOCUMENT: return "document"; + case HEALTHREC: return "health record"; + case IMG: return "image attachment"; + case LABRESULTS: return "lab results"; + case MODEL: return "model"; + case WIATTCH: return "work injury report attachment"; + case XRAY: return "x-ray"; + case _ACTCONSENTTYPE: return "ActConsentType"; + case ICOL: return "information collection"; + case IDSCL: return "information disclosure"; + case INFA: return "information access"; + case INFAO: return "access only"; + case INFASO: return "access and save only"; + case IRDSCL: return "information redisclosure"; + case RESEARCH: return "research information access"; + case RSDID: return "de-identified information access"; + case RSREID: return "re-identifiable information access"; + case _ACTCONTAINERREGISTRATIONCODE: return "ActContainerRegistrationCode"; + case ID: return "Identified"; + case IP: return "In Position"; + case L: return "Left Equipment"; + case M: return "Missing"; + case O: return "In Process"; + case R: return "Process Completed"; + case X: return "Container Unavailable"; + case _ACTCONTROLVARIABLE: return "ActControlVariable"; + case AUTO: return "auto-repeat permission"; + case ENDC: return "endogenous content"; + case REFLEX: return "reflex permission"; + case _ACTCOVERAGECONFIRMATIONCODE: return "ActCoverageConfirmationCode"; + case _ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE: return "ActCoverageAuthorizationConfirmationCode"; + case AUTH: return "Authorized"; + case NAUTH: return "Not Authorized"; + case _ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE: return "ActCoverageEligibilityConfirmationCode"; + case ELG: return "Eligible"; + case NELG: return "Not Eligible"; + case _ACTCOVERAGELIMITCODE: return "ActCoverageLimitCode"; + case _ACTCOVERAGEQUANTITYLIMITCODE: return "ActCoverageQuantityLimitCode"; + case COVPRD: return "coverage period"; + case LFEMX: return "life time maximum"; + case NETAMT: return "Net Amount"; + case PRDMX: return "period maximum"; + case UNITPRICE: return "Unit Price"; + case UNITQTY: return "Unit Quantity"; + case COVMX: return "coverage maximum"; + case _ACTCOVEREDPARTYLIMITCODE: return "ActCoveredPartyLimitCode"; + case _ACTCOVERAGETYPECODE: return "ActCoverageTypeCode"; + case _ACTINSURANCEPOLICYCODE: return "ActInsurancePolicyCode"; + case EHCPOL: return "extended healthcare"; + case HSAPOL: return "health spending account"; + case AUTOPOL: return "automobile"; + case COL: return "collision coverage policy"; + case UNINSMOT: return "uninsured motorist policy"; + case PUBLICPOL: return "public healthcare"; + case DENTPRG: return "dental program"; + case DISEASEPRG: return "public health program"; + case CANPRG: return "women's cancer detection program"; + case ENDRENAL: return "end renal program"; + case HIVAIDS: return "HIV-AIDS program"; + case MANDPOL: return "mandatory health program"; + case MENTPRG: return "mental health program"; + case SAFNET: return "safety net clinic program"; + case SUBPRG: return "substance use program"; + case SUBSIDIZ: return "subsidized health program"; + case SUBSIDMC: return "subsidized managed care program"; + case SUBSUPP: return "subsidized supplemental health program"; + case WCBPOL: return "worker's compensation"; + case _ACTINSURANCETYPECODE: return "ActInsuranceTypeCode"; + case _ACTHEALTHINSURANCETYPECODE: return "ActHealthInsuranceTypeCode"; + case DENTAL: return "dental care policy"; + case DISEASE: return "disease specific policy"; + case DRUGPOL: return "drug policy"; + case HIP: return "health insurance plan policy"; + case LTC: return "long term care policy"; + case MCPOL: return "managed care policy"; + case POS: return "point of service policy"; + case HMO: return "health maintenance organization policy"; + case PPO: return "preferred provider organization policy"; + case MENTPOL: return "mental health policy"; + case SUBPOL: return "substance use policy"; + case VISPOL: return "vision care policy"; + case DIS: return "disability insurance policy"; + case EWB: return "employee welfare benefit plan policy"; + case FLEXP: return "flexible benefit plan policy"; + case LIFE: return "life insurance policy"; + case ANNU: return "annuity policy"; + case TLIFE: return "term life insurance policy"; + case ULIFE: return "universal life insurance policy"; + case PNC: return "property and casualty insurance policy"; + case REI: return "reinsurance policy"; + case SURPL: return "surplus line insurance policy"; + case UMBRL: return "umbrella liability insurance policy"; + case _ACTPROGRAMTYPECODE: return "ActProgramTypeCode"; + case CHAR: return "charity program"; + case CRIME: return "crime victim program"; + case EAP: return "employee assistance program"; + case GOVEMP: return "government employee health program"; + case HIRISK: return "high risk pool program"; + case IND: return "indigenous peoples health program"; + case MILITARY: return "military health program"; + case RETIRE: return "retiree health program"; + case SOCIAL: return "social service program"; + case VET: return "veteran health program"; + case _ACTDETECTEDISSUEMANAGEMENTCODE: return "ActDetectedIssueManagementCode"; + case _ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE: return "ActAdministrativeDetectedIssueManagementCode"; + case _AUTHORIZATIONISSUEMANAGEMENTCODE: return "Authorization Issue Management Code"; + case EMAUTH: return "emergency authorization override"; + case _21: return "authorization confirmed"; + case _1: return "Therapy Appropriate"; + case _19: return "Consulted Supplier"; + case _2: return "Assessed Patient"; + case _22: return "appropriate indication or diagnosis"; + case _23: return "prior therapy documented"; + case _3: return "Patient Explanation"; + case _4: return "Consulted Other Source"; + case _5: return "Consulted Prescriber"; + case _6: return "Prescriber Declined Change"; + case _7: return "Interacting Therapy No Longer Active/Planned"; + case _14: return "Supply Appropriate"; + case _15: return "Replacement"; + case _16: return "Vacation Supply"; + case _17: return "Weekend Supply"; + case _18: return "Leave of Absence"; + case _20: return "additional quantity on separate dispense"; + case _8: return "Other Action Taken"; + case _10: return "Provided Patient Education"; + case _11: return "Added Concurrent Therapy"; + case _12: return "Temporarily Suspended Concurrent Therapy"; + case _13: return "Stopped Concurrent Therapy"; + case _9: return "Instituted Ongoing Monitoring Program"; + case _ACTEXPOSURECODE: return "ActExposureCode"; + case CHLDCARE: return "Day care - Child care Interaction"; + case CONVEYNC: return "Common Conveyance Interaction"; + case HLTHCARE: return "Health Care Interaction - Not Patient Care"; + case HOMECARE: return "Care Giver Interaction"; + case HOSPPTNT: return "Hospital Patient Interaction"; + case HOSPVSTR: return "Hospital Visitor Interaction"; + case HOUSEHLD: return "Household Interaction"; + case INMATE: return "Inmate Interaction"; + case INTIMATE: return "Intimate Interaction"; + case LTRMCARE: return "Long Term Care Facility Interaction"; + case PLACE: return "Common Space Interaction"; + case PTNTCARE: return "Health Care Interaction - Patient Care"; + case SCHOOL2: return "School Interaction"; + case SOCIAL2: return "Social/Extended Family Interaction"; + case SUBSTNCE: return "Common Substance Interaction"; + case TRAVINT: return "Common Travel Interaction"; + case WORK2: return "Work Interaction"; + case _ACTFINANCIALTRANSACTIONCODE: return "ActFinancialTransactionCode"; + case CHRG: return "Standard Charge"; + case REV: return "Standard Charge Reversal"; + case _ACTINCIDENTCODE: return "ActIncidentCode"; + case MVA: return "Motor vehicle accident"; + case SCHOOL: return "School Accident"; + case SPT: return "Sporting Accident"; + case WPA: return "Workplace accident"; + case _ACTINFORMATIONACCESSCODE: return "ActInformationAccessCode"; + case ACADR: return "adverse drug reaction access"; + case ACALL: return "all access"; + case ACALLG: return "allergy access"; + case ACCONS: return "informational consent access"; + case ACDEMO: return "demographics access"; + case ACDI: return "diagnostic imaging access"; + case ACIMMUN: return "immunization access"; + case ACLAB: return "lab test result access"; + case ACMED: return "medication access"; + case ACMEDC: return "medical condition access"; + case ACMEN: return "mental health access"; + case ACOBS: return "common observations access"; + case ACPOLPRG: return "policy or program information access"; + case ACPROV: return "provider information access"; + case ACPSERV: return "professional service access"; + case ACSUBSTAB: return "substance abuse access"; + case _ACTINFORMATIONACCESSCONTEXTCODE: return "ActInformationAccessContextCode"; + case INFAUT: return "authorized information transfer"; + case INFCON: return "after explicit consent"; + case INFCRT: return "only on court order"; + case INFDNG: return "only if danger to others"; + case INFEMER: return "only in an emergency"; + case INFPWR: return "only if public welfare risk"; + case INFREG: return "regulatory information transfer"; + case _ACTINFORMATIONCATEGORYCODE: return "ActInformationCategoryCode"; + case ALLCAT: return "all categories"; + case ALLGCAT: return "allergy category"; + case ARCAT: return "adverse drug reaction category"; + case COBSCAT: return "common observation category"; + case DEMOCAT: return "demographics category"; + case DICAT: return "diagnostic image category"; + case IMMUCAT: return "immunization category"; + case LABCAT: return "lab test category"; + case MEDCCAT: return "medical condition category"; + case MENCAT: return "mental health category"; + case PSVCCAT: return "professional service category"; + case RXCAT: return "medication category"; + case _ACTINVOICEELEMENTCODE: return "ActInvoiceElementCode"; + case _ACTINVOICEADJUDICATIONPAYMENTCODE: return "ActInvoiceAdjudicationPaymentCode"; + case _ACTINVOICEADJUDICATIONPAYMENTGROUPCODE: return "ActInvoiceAdjudicationPaymentGroupCode"; + case ALEC: return "alternate electronic"; + case BONUS: return "bonus"; + case CFWD: return "carry forward adjusment"; + case EDU: return "education fees"; + case EPYMT: return "early payment fee"; + case GARN: return "garnishee"; + case INVOICE: return "submitted invoice"; + case PINV: return "paper invoice"; + case PPRD: return "prior period adjustment"; + case PROA: return "professional association deduction"; + case RECOV: return "recovery"; + case RETRO: return "retro adjustment"; + case TRAN: return "transaction fee"; + case _ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE: return "ActInvoiceAdjudicationPaymentSummaryCode"; + case INVTYPE: return "invoice type"; + case PAYEE: return "payee"; + case PAYOR: return "payor"; + case SENDAPP: return "sending application"; + case _ACTINVOICEDETAILCODE: return "ActInvoiceDetailCode"; + case _ACTINVOICEDETAILCLINICALPRODUCTCODE: return "ActInvoiceDetailClinicalProductCode"; + case UNSPSC: return "United Nations Standard Products and Services Classification"; + case _ACTINVOICEDETAILDRUGPRODUCTCODE: return "ActInvoiceDetailDrugProductCode"; + case GTIN: return "Global Trade Item Number"; + case UPC: return "Universal Product Code"; + case _ACTINVOICEDETAILGENERICCODE: return "ActInvoiceDetailGenericCode"; + case _ACTINVOICEDETAILGENERICADJUDICATORCODE: return "ActInvoiceDetailGenericAdjudicatorCode"; + case COIN: return "coinsurance"; + case COPAYMENT: return "patient co-pay"; + case DEDUCTIBLE: return "deductible"; + case PAY: return "payment"; + case SPEND: return "spend down"; + case COINS: return "co-insurance"; + case _ACTINVOICEDETAILGENERICMODIFIERCODE: return "ActInvoiceDetailGenericModifierCode"; + case AFTHRS: return "non-normal hours"; + case ISOL: return "isolation allowance"; + case OOO: return "out of office"; + case _ACTINVOICEDETAILGENERICPROVIDERCODE: return "ActInvoiceDetailGenericProviderCode"; + case CANCAPT: return "cancelled appointment"; + case DSC: return "discount"; + case ESA: return "extraordinary service assessment"; + case FFSTOP: return "fee for service top off"; + case FNLFEE: return "final fee"; + case FRSTFEE: return "first fee"; + case MARKUP: return "markup or up-charge"; + case MISSAPT: return "missed appointment"; + case PERFEE: return "periodic fee"; + case PERMBNS: return "performance bonus"; + case RESTOCK: return "restocking fee"; + case TRAVEL: return "travel"; + case URGENT: return "urgent"; + case _ACTINVOICEDETAILTAXCODE: return "ActInvoiceDetailTaxCode"; + case FST: return "federal sales tax"; + case HST: return "harmonized sales Tax"; + case PST: return "provincial/state sales tax"; + case _ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE: return "ActInvoiceDetailPreferredAccommodationCode"; + case _ACTENCOUNTERACCOMMODATIONCODE: return "ActEncounterAccommodationCode"; + case _HL7ACCOMMODATIONCODE: return "HL7AccommodationCode"; + case I: return "Isolation"; + case P: return "Private"; + case S: return "Suite"; + case SP: return "Semi-private"; + case W: return "Ward"; + case _ACTINVOICEDETAILCLINICALSERVICECODE: return "ActInvoiceDetailClinicalServiceCode"; + case _ACTINVOICEGROUPCODE: return "ActInvoiceGroupCode"; + case _ACTINVOICEINTERGROUPCODE: return "ActInvoiceInterGroupCode"; + case CPNDDRGING: return "compound drug invoice group"; + case CPNDINDING: return "compound ingredient invoice group"; + case CPNDSUPING: return "compound supply invoice group"; + case DRUGING: return "drug invoice group"; + case FRAMEING: return "frame invoice group"; + case LENSING: return "lens invoice group"; + case PRDING: return "product invoice group"; + case _ACTINVOICEROOTGROUPCODE: return "ActInvoiceRootGroupCode"; + case CPINV: return "clinical product invoice"; + case CSINV: return "clinical service invoice"; + case CSPINV: return "clinical service and product"; + case FININV: return "financial invoice"; + case OHSINV: return "oral health service"; + case PAINV: return "preferred accommodation invoice"; + case RXCINV: return "Rx compound invoice"; + case RXDINV: return "Rx dispense invoice"; + case SBFINV: return "sessional or block fee invoice"; + case VRXINV: return "vision dispense invoice"; + case _ACTINVOICEELEMENTSUMMARYCODE: return "ActInvoiceElementSummaryCode"; + case _INVOICEELEMENTADJUDICATED: return "InvoiceElementAdjudicated"; + case ADNFPPELAT: return "adjud. nullified prior-period electronic amount"; + case ADNFPPELCT: return "adjud. nullified prior-period electronic count"; + case ADNFPPMNAT: return "adjud. nullified prior-period manual amount"; + case ADNFPPMNCT: return "adjud. nullified prior-period manual count"; + case ADNFSPELAT: return "adjud. nullified same-period electronic amount"; + case ADNFSPELCT: return "adjud. nullified same-period electronic count"; + case ADNFSPMNAT: return "adjud. nullified same-period manual amount"; + case ADNFSPMNCT: return "adjud. nullified same-period manual count"; + case ADNPPPELAT: return "adjud. non-payee payable prior-period electronic amount"; + case ADNPPPELCT: return "adjud. non-payee payable prior-period electronic count"; + case ADNPPPMNAT: return "adjud. non-payee payable prior-period manual amount"; + case ADNPPPMNCT: return "adjud. non-payee payable prior-period manual count"; + case ADNPSPELAT: return "adjud. non-payee payable same-period electronic amount"; + case ADNPSPELCT: return "adjud. non-payee payable same-period electronic count"; + case ADNPSPMNAT: return "adjud. non-payee payable same-period manual amount"; + case ADNPSPMNCT: return "adjud. non-payee payable same-period manual count"; + case ADPPPPELAT: return "adjud. payee payable prior-period electronic amount"; + case ADPPPPELCT: return "adjud. payee payable prior-period electronic count"; + case ADPPPPMNAT: return "adjud. payee payable prior-period manual amout"; + case ADPPPPMNCT: return "adjud. payee payable prior-period manual count"; + case ADPPSPELAT: return "adjud. payee payable same-period electronic amount"; + case ADPPSPELCT: return "adjud. payee payable same-period electronic count"; + case ADPPSPMNAT: return "adjud. payee payable same-period manual amount"; + case ADPPSPMNCT: return "adjud. payee payable same-period manual count"; + case ADRFPPELAT: return "adjud. refused prior-period electronic amount"; + case ADRFPPELCT: return "adjud. refused prior-period electronic count"; + case ADRFPPMNAT: return "adjud. refused prior-period manual amount"; + case ADRFPPMNCT: return "adjud. refused prior-period manual count"; + case ADRFSPELAT: return "adjud. refused same-period electronic amount"; + case ADRFSPELCT: return "adjud. refused same-period electronic count"; + case ADRFSPMNAT: return "adjud. refused same-period manual amount"; + case ADRFSPMNCT: return "adjud. refused same-period manual count"; + case _INVOICEELEMENTPAID: return "InvoiceElementPaid"; + case PDNFPPELAT: return "paid nullified prior-period electronic amount"; + case PDNFPPELCT: return "paid nullified prior-period electronic count"; + case PDNFPPMNAT: return "paid nullified prior-period manual amount"; + case PDNFPPMNCT: return "paid nullified prior-period manual count"; + case PDNFSPELAT: return "paid nullified same-period electronic amount"; + case PDNFSPELCT: return "paid nullified same-period electronic count"; + case PDNFSPMNAT: return "paid nullified same-period manual amount"; + case PDNFSPMNCT: return "paid nullified same-period manual count"; + case PDNPPPELAT: return "paid non-payee payable prior-period electronic amount"; + case PDNPPPELCT: return "paid non-payee payable prior-period electronic count"; + case PDNPPPMNAT: return "paid non-payee payable prior-period manual amount"; + case PDNPPPMNCT: return "paid non-payee payable prior-period manual count"; + case PDNPSPELAT: return "paid non-payee payable same-period electronic amount"; + case PDNPSPELCT: return "paid non-payee payable same-period electronic count"; + case PDNPSPMNAT: return "paid non-payee payable same-period manual amount"; + case PDNPSPMNCT: return "paid non-payee payable same-period manual count"; + case PDPPPPELAT: return "paid payee payable prior-period electronic amount"; + case PDPPPPELCT: return "paid payee payable prior-period electronic count"; + case PDPPPPMNAT: return "paid payee payable prior-period manual amount"; + case PDPPPPMNCT: return "paid payee payable prior-period manual count"; + case PDPPSPELAT: return "paid payee payable same-period electronic amount"; + case PDPPSPELCT: return "paid payee payable same-period electronic count"; + case PDPPSPMNAT: return "paid payee payable same-period manual amount"; + case PDPPSPMNCT: return "paid payee payable same-period manual count"; + case _INVOICEELEMENTSUBMITTED: return "InvoiceElementSubmitted"; + case SBBLELAT: return "submitted billed electronic amount"; + case SBBLELCT: return "submitted billed electronic count"; + case SBNFELAT: return "submitted nullified electronic amount"; + case SBNFELCT: return "submitted cancelled electronic count"; + case SBPDELAT: return "submitted pending electronic amount"; + case SBPDELCT: return "submitted pending electronic count"; + case _ACTINVOICEOVERRIDECODE: return "ActInvoiceOverrideCode"; + case COVGE: return "coverage problem"; + case EFORM: return "electronic form to follow"; + case FAX: return "fax to follow"; + case GFTH: return "good faith indicator"; + case LATE: return "late invoice"; + case MANUAL: return "manual review"; + case OOJ: return "out of jurisdiction"; + case ORTHO: return "orthodontic service"; + case PAPER: return "paper documentation to follow"; + case PIE: return "public insurance exhausted"; + case PYRDELAY: return "delayed by a previous payor"; + case REFNR: return "referral not required"; + case REPSERV: return "repeated service"; + case UNRELAT: return "unrelated service"; + case VERBAUTH: return "verbal authorization"; + case _ACTLISTCODE: return "ActListCode"; + case _ACTOBSERVATIONLIST: return "ActObservationList"; + case CARELIST: return "care plan"; + case CONDLIST: return "condition list"; + case INTOLIST: return "intolerance list"; + case PROBLIST: return "problem list"; + case RISKLIST: return "risk factors"; + case GOALLIST: return "goal list"; + case _ACTTHERAPYDURATIONWORKINGLISTCODE: return "ActTherapyDurationWorkingListCode"; + case _ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE: return "act medication therapy duration working list"; + case ACU: return "short term/acute"; + case CHRON: return "continuous/chronic"; + case ONET: return "one time"; + case PRN: return "as needed"; + case MEDLIST: return "medication list"; + case CURMEDLIST: return "current medication list"; + case DISCMEDLIST: return "discharge medication list"; + case HISTMEDLIST: return "medication history"; + case _ACTMONITORINGPROTOCOLCODE: return "ActMonitoringProtocolCode"; + case CTLSUB: return "Controlled Substance"; + case INV: return "investigational"; + case LU: return "limited use"; + case OTC: return "non prescription medicine"; + case RX: return "prescription only medicine"; + case SA: return "special authorization"; + case SAC: return "special access"; + case _ACTNONOBSERVATIONINDICATIONCODE: return "ActNonObservationIndicationCode"; + case IND01: return "imaging study requiring contrast"; + case IND02: return "colonoscopy prep"; + case IND03: return "prophylaxis"; + case IND04: return "surgical prophylaxis"; + case IND05: return "pregnancy prophylaxis"; + case _ACTOBSERVATIONVERIFICATIONTYPE: return "act observation verification"; + case VFPAPER: return "verify paper"; + case _ACTPAYMENTCODE: return "ActPaymentCode"; + case ACH: return "Automated Clearing House"; + case CHK: return "Cheque"; + case DDP: return "Direct Deposit"; + case NON: return "Non-Payment Data"; + case _ACTPHARMACYSUPPLYTYPE: return "ActPharmacySupplyType"; + case DF: return "Daily Fill"; + case EM: return "Emergency Supply"; + case SO: return "Script Owing"; + case FF: return "First Fill"; + case FFC: return "First Fill - Complete"; + case FFP: return "First Fill - Part Fill"; + case FFSS: return "first fill, partial strength"; + case TF: return "Trial Fill"; + case FS: return "Floor stock"; + case MS: return "Manufacturer Sample"; + case RF: return "Refill"; + case UD: return "Unit Dose"; + case RFC: return "Refill - Complete"; + case RFCS: return "refill complete partial strength"; + case RFF: return "Refill (First fill this facility)"; + case RFFS: return "refill partial strength (first fill this facility)"; + case RFP: return "Refill - Part Fill"; + case RFPS: return "refill part fill partial strength"; + case RFS: return "refill partial strength"; + case TB: return "Trial Balance"; + case TBS: return "trial balance partial strength"; + case UDE: return "unit dose equivalent"; + case _ACTPOLICYTYPE: return "ActPolicyType"; + case _ACTPRIVACYPOLICY: return "ActPrivacyPolicy"; + case _ACTCONSENTDIRECTIVE: return "ActConsentDirective"; + case EMRGONLY: return "emergency only"; + case GRANTORCHOICE: return "grantor choice"; + case IMPLIED: return "implied consent"; + case IMPLIEDD: return "implied consent with opportunity to dissent"; + case NOCONSENT: return "no consent"; + case NOPP: return "notice of privacy practices"; + case OPTIN: return "opt-in"; + case OPTINR: return "opt-in with restrictions"; + case OPTOUT: return "op-out"; + case OPTOUTE: return "opt-out with exceptions"; + case _ACTPRIVACYLAW: return "ActPrivacyLaw"; + case _ACTUSPRIVACYLAW: return "_ActUSPrivacyLaw"; + case _42CFRPART2: return "42 CFR Part2"; + case COMMONRULE: return "Common Rule"; + case HIPAANOPP: return "HIPAA notice of privacy practices"; + case HIPAAPSYNOTES: return "HIPAA psychotherapy notes"; + case HIPAASELFPAY: return "HIPAA self-pay"; + case TITLE38SECTION7332: return "Title 38 Section 7332"; + case _INFORMATIONSENSITIVITYPOLICY: return "InformationSensitivityPolicy"; + case _ACTINFORMATIONSENSITIVITYPOLICY: return "ActInformationSensitivityPolicy"; + case ETH: return "substance abuse information sensitivity"; + case GDIS: return "genetic disease information sensitivity"; + case HIV: return "HIV/AIDS information sensitivity"; + case PSY: return "psychiatry information sensitivity"; + case SCA: return "sickle cell anemia"; + case SOC: return "social services sensitivity"; + case SDV: return "sexual assault, abuse, or domestic violence information sensitivity"; + case SEX: return "sexuality and reproductive health information sensitivity"; + case STD: return "sexually transmitted disease information sensitivity"; + case TBOO: return "taboo"; + case SICKLE: return "sickle cell"; + case _ENTITYSENSITIVITYPOLICYTYPE: return "EntityInformationSensitivityPolicy"; + case DEMO: return "all demographic information sensitivity"; + case DOB: return "date of birth information sensitivity"; + case GENDER: return "gender and sexual orientation information sensitivity"; + case LIVARG: return "living arrangement information sensitivity"; + case MARST: return "marital status information sensitivity"; + case RACE: return "race information sensitivity"; + case REL: return "religion information sensitivity"; + case _ROLEINFORMATIONSENSITIVITYPOLICY: return "RoleInformationSensitivityPolicy"; + case B: return "business information sensitivity"; + case EMPL: return "employer information sensitivity"; + case LOCIS: return "location information sensitivity"; + case SSP: return "sensitive service provider information sensitivity"; + case ADOL: return "adolescent information sensitivity"; + case CEL: return "celebrity information sensitivity"; + case DIA: return "diagnosis information sensitivity"; + case DRGIS: return "drug information sensitivity"; + case EMP: return "employee information sensitivity"; + case PDS: return "patient default sensitivity"; + case PRS: return "patient requested sensitivity"; + case COMPT: return "compartment"; + case ACOCOMPT: return "accountable care organization compartment"; + case CTCOMPT: return "care team compartment"; + case FMCOMPT: return "financial management compartment"; + case HRCOMPT: return "human resource compartment"; + case LRCOMPT: return "legitimate relationship compartment"; + case PACOMPT: return "patient administration compartment"; + case RESCOMPT: return "research project compartment"; + case RMGTCOMPT: return "records management compartment"; + case ACTTRUSTPOLICYTYPE: return "trust policy"; + case TRSTACCRD: return "trust accreditation"; + case TRSTAGRE: return "trust agreement"; + case TRSTASSUR: return "trust assurance"; + case TRSTCERT: return "trust certificate"; + case TRSTFWK: return "trust framework"; + case TRSTMEC: return "trust mechanism"; + case COVPOL: return "benefit policy"; + case SECURITYPOLICY: return "security policy"; + case OBLIGATIONPOLICY: return "obligation policy"; + case ANONY: return "anonymize"; + case AOD: return "accounting of disclosure"; + case AUDIT: return "audit"; + case AUDTR: return "audit trail"; + case CPLYCC: return "comply with confidentiality code"; + case CPLYCD: return "comply with consent directive"; + case CPLYJPP: return "comply with jurisdictional privacy policy"; + case CPLYOPP: return "comply with organizational privacy policy"; + case CPLYOSP: return "comply with organizational security policy"; + case CPLYPOL: return "comply with policy"; + case DECLASSIFYLABEL: return "declassify security label"; + case DEID: return "deidentify"; + case DELAU: return "delete after use"; + case DOWNGRDLABEL: return "downgrade security label"; + case DRIVLABEL: return "derive security label"; + case ENCRYPT: return "encrypt"; + case ENCRYPTR: return "encrypt at rest"; + case ENCRYPTT: return "encrypt in transit"; + case ENCRYPTU: return "encrypt in use"; + case HUAPRV: return "human approval"; + case LABEL: return "assign security label"; + case MASK: return "mask"; + case MINEC: return "minimum necessary"; + case PERSISTLABEL: return "persist security label"; + case PRIVMARK: return "privacy mark"; + case PSEUD: return "pseudonymize"; + case REDACT: return "redact"; + case UPGRDLABEL: return "upgrade security label"; + case REFRAINPOLICY: return "refrain policy"; + case NOAUTH: return "no disclosure without subject authorization"; + case NOCOLLECT: return "no collection"; + case NODSCLCD: return "no disclosure without consent directive"; + case NODSCLCDS: return "no disclosure without information subject's consent directive"; + case NOINTEGRATE: return "no integration"; + case NOLIST: return "no unlisted entity disclosure"; + case NOMOU: return "no disclosure without MOU"; + case NOORGPOL: return "no disclosure without organizational authorization"; + case NOPAT: return "no disclosure to patient, family or caregivers without attending provider's authorization"; + case NOPERSISTP: return "no collection beyond purpose of use"; + case NORDSCLCD: return "no redisclosure without consent directive"; + case NORDSCLCDS: return "no redisclosure without information subject's consent directive"; + case NORDSCLW: return "no disclosure without jurisdictional authorization"; + case NORELINK: return "no relinking"; + case NOREUSE: return "no reuse beyond purpose of use"; + case NOVIP: return "no unauthorized VIP disclosure"; + case ORCON: return "no disclosure without originator authorization"; + case _ACTPRODUCTACQUISITIONCODE: return "ActProductAcquisitionCode"; + case LOAN: return "Loan"; + case RENT: return "Rent"; + case TRANSFER: return "Transfer"; + case SALE: return "Sale"; + case _ACTSPECIMENTRANSPORTCODE: return "ActSpecimenTransportCode"; + case SREC: return "specimen received"; + case SSTOR: return "specimen in storage"; + case STRAN: return "specimen in transit"; + case _ACTSPECIMENTREATMENTCODE: return "ActSpecimenTreatmentCode"; + case ACID: return "Acidification"; + case ALK: return "Alkalization"; + case DEFB: return "Defibrination"; + case FILT: return "Filtration"; + case LDLP: return "LDL Precipitation"; + case NEUT: return "Neutralization"; + case RECA: return "Recalcification"; + case UFIL: return "Ultrafiltration"; + case _ACTSUBSTANCEADMINISTRATIONCODE: return "ActSubstanceAdministrationCode"; + case DRUG: return "Drug therapy"; + case FD: return "food"; + case IMMUNIZ: return "Immunization"; + case BOOSTER: return "Booster Immunization"; + case INITIMMUNIZ: return "Initial Immunization"; + case _ACTTASKCODE: return "ActTaskCode"; + case OE: return "order entry task"; + case LABOE: return "laboratory test order entry task"; + case MEDOE: return "medication order entry task"; + case PATDOC: return "patient documentation task"; + case ALLERLREV: return "allergy list review"; + case CLINNOTEE: return "clinical note entry task"; + case DIAGLISTE: return "diagnosis list entry task"; + case DISCHINSTE: return "discharge instruction entry"; + case DISCHSUME: return "discharge summary entry task"; + case PATEDUE: return "patient education entry"; + case PATREPE: return "pathology report entry task"; + case PROBLISTE: return "problem list entry task"; + case RADREPE: return "radiology report entry task"; + case IMMLREV: return "immunization list review"; + case REMLREV: return "reminder list review"; + case WELLREMLREV: return "wellness reminder list review"; + case PATINFO: return "patient information review task"; + case ALLERLE: return "allergy list entry"; + case CDSREV: return "clinical decision support intervention review"; + case CLINNOTEREV: return "clinical note review task"; + case DISCHSUMREV: return "discharge summary review task"; + case DIAGLISTREV: return "diagnosis list review task"; + case IMMLE: return "immunization list entry"; + case LABRREV: return "laboratory results review task"; + case MICRORREV: return "microbiology results review task"; + case MICROORGRREV: return "microbiology organisms results review task"; + case MICROSENSRREV: return "microbiology sensitivity test results review task"; + case MLREV: return "medication list review task"; + case MARWLREV: return "medication administration record work list review task"; + case OREV: return "orders review task"; + case PATREPREV: return "pathology report review task"; + case PROBLISTREV: return "problem list review task"; + case RADREPREV: return "radiology report review task"; + case REMLE: return "reminder list entry"; + case WELLREMLE: return "wellness reminder list entry"; + case RISKASSESS: return "risk assessment instrument task"; + case FALLRISK: return "falls risk assessment instrument task"; + case _ACTTRANSPORTATIONMODECODE: return "ActTransportationModeCode"; + case _ACTPATIENTTRANSPORTATIONMODECODE: return "ActPatientTransportationModeCode"; + case AFOOT: return "pedestrian transport"; + case AMBT: return "ambulance transport"; + case AMBAIR: return "fixed-wing ambulance transport"; + case AMBGRND: return "ground ambulance transport"; + case AMBHELO: return "helicopter ambulance transport"; + case LAWENF: return "law enforcement transport"; + case PRVTRN: return "private transport"; + case PUBTRN: return "public transport"; + case _OBSERVATIONTYPE: return "ObservationType"; + case _ACTSPECOBSCODE: return "ActSpecObsCode"; + case ARTBLD: return "ActSpecObsArtBldCode"; + case DILUTION: return "ActSpecObsDilutionCode"; + case AUTOHIGH: return "Auto-High Dilution"; + case AUTOLOW: return "Auto-Low Dilution"; + case PRE: return "Pre-Dilution"; + case RERUN: return "Rerun Dilution"; + case EVNFCTS: return "ActSpecObsEvntfctsCode"; + case INTFR: return "ActSpecObsInterferenceCode"; + case FIBRIN: return "Fibrin"; + case HEMOLYSIS: return "Hemolysis"; + case ICTERUS: return "Icterus"; + case LIPEMIA: return "Lipemia"; + case VOLUME: return "ActSpecObsVolumeCode"; + case AVAILABLE: return "Available Volume"; + case CONSUMPTION: return "Consumption Volume"; + case CURRENT: return "Current Volume"; + case INITIAL: return "Initial Volume"; + case _ANNOTATIONTYPE: return "AnnotationType"; + case _ACTPATIENTANNOTATIONTYPE: return "ActPatientAnnotationType"; + case ANNDI: return "diagnostic image note"; + case ANNGEN: return "general note"; + case ANNIMM: return "immunization note"; + case ANNLAB: return "laboratory note"; + case ANNMED: return "medication note"; + case _GENETICOBSERVATIONTYPE: return "GeneticObservationType"; + case GENE: return "gene"; + case _IMMUNIZATIONOBSERVATIONTYPE: return "ImmunizationObservationType"; + case OBSANTC: return "antigen count"; + case OBSANTV: return "antigen validity"; + case _INDIVIDUALCASESAFETYREPORTTYPE: return "Individual Case Safety Report Type"; + case PATADVEVNT: return "patient adverse event"; + case VACPROBLEM: return "vaccine product problem"; + case _LOINCOBSERVATIONACTCONTEXTAGETYPE: return "LOINCObservationActContextAgeType"; + case _216119: return "age patient qn est"; + case _216127: return "age patient qn reported"; + case _295535: return "age patient qn calc"; + case _305250: return "age patient qn definition"; + case _309724: return "age at onset of adverse event"; + case _MEDICATIONOBSERVATIONTYPE: return "MedicationObservationType"; + case REPHALFLIFE: return "representative half-life"; + case SPLCOATING: return "coating"; + case SPLCOLOR: return "color"; + case SPLIMAGE: return "image"; + case SPLIMPRINT: return "imprint"; + case SPLSCORING: return "scoring"; + case SPLSHAPE: return "shape"; + case SPLSIZE: return "size"; + case SPLSYMBOL: return "symbol"; + case _OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE: return "ObservationIssueTriggerCodedObservationType"; + case _CASETRANSMISSIONMODE: return "case transmission mode"; + case AIRTRNS: return "airborne transmission"; + case ANANTRNS: return "animal to animal transmission"; + case ANHUMTRNS: return "animal to human transmission"; + case BDYFLDTRNS: return "body fluid contact transmission"; + case BLDTRNS: return "blood borne transmission"; + case DERMTRNS: return "transdermal transmission"; + case ENVTRNS: return "environmental exposure transmission"; + case FECTRNS: return "fecal-oral transmission"; + case FOMTRNS: return "fomite transmission"; + case FOODTRNS: return "food-borne transmission"; + case HUMHUMTRNS: return "human to human transmission"; + case INDTRNS: return "indeterminate disease transmission mode"; + case LACTTRNS: return "lactation transmission"; + case NOSTRNS: return "nosocomial transmission"; + case PARTRNS: return "parenteral transmission"; + case PLACTRNS: return "transplacental transmission"; + case SEXTRNS: return "sexual transmission"; + case TRNSFTRNS: return "transfusion transmission"; + case VECTRNS: return "vector-borne transmission"; + case WATTRNS: return "water-borne transmission"; + case _OBSERVATIONQUALITYMEASUREATTRIBUTE: return "ObservationQualityMeasureAttribute"; + case AGGREGATE: return "aggregate measure observation"; + case CMPMSRMTH: return "composite measure method"; + case CMPMSRSCRWGHT: return "component measure scoring weight"; + case COPY: return "copyright"; + case CRS: return "clinical recommendation statement"; + case DEF: return "definition"; + case DISC: return "disclaimer"; + case FINALDT: return "finalized date/time"; + case GUIDE: return "guidance"; + case IDUR: return "improvement notation"; + case ITMCNT: return "items counted"; + case KEY: return "keyword"; + case MEDT: return "measurement end date"; + case MSD: return "measurement start date"; + case MSRADJ: return "risk adjustment"; + case MSRAGG: return "rate aggregation"; + case MSRIMPROV: return "health quality measure improvement notation"; + case MSRJUR: return "jurisdiction"; + case MSRRPTR: return "reporter type"; + case MSRRPTTIME: return "timeframe for reporting"; + case MSRSCORE: return "measure scoring"; + case MSRSET: return "health quality measure care setting"; + case MSRTOPIC: return "health quality measure topic type"; + case MSRTP: return "measurement period"; + case MSRTYPE: return "measure type"; + case RAT: return "rationale"; + case REF: return "reference"; + case SDE: return "supplemental data elements"; + case STRAT: return "stratification"; + case TRANF: return "transmission format"; + case USE: return "notice of use"; + case _OBSERVATIONSEQUENCETYPE: return "ObservationSequenceType"; + case TIMEABSOLUTE: return "absolute time sequence"; + case TIMERELATIVE: return "relative time sequence"; + case _OBSERVATIONSERIESTYPE: return "ObservationSeriesType"; + case _ECGOBSERVATIONSERIESTYPE: return "ECGObservationSeriesType"; + case REPRESENTATIVEBEAT: return "ECG representative beat waveforms"; + case RHYTHM: return "ECG rhythm waveforms"; + case _PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE: return "PatientImmunizationRelatedObservationType"; + case CLSSRM: return "classroom"; + case GRADE: return "grade"; + case SCHL: return "school"; + case SCHLDIV: return "school division"; + case TEACHER: return "teacher"; + case _POPULATIONINCLUSIONOBSERVATIONTYPE: return "PopulationInclusionObservationType"; + case DENEX: return "denominator exclusions"; + case DENEXCEP: return "denominator exceptions"; + case DENOM: return "denominator"; + case IPOP: return "initial population"; + case IPPOP: return "initial patient population"; + case MSRPOPL: return "measure population"; + case MSRPOPLEX: return "measure population exclusions"; + case NUMER: return "numerator"; + case NUMEX: return "numerator exclusions"; + case _PREFERENCEOBSERVATIONTYPE: return "_PreferenceObservationType"; + case PREFSTRENGTH: return "preference strength"; + case ADVERSEREACTION: return "Adverse Reaction"; + case ASSERTION: return "Assertion"; + case CASESER: return "case seriousness criteria"; + case CDIO: return "case disease imported observation"; + case CRIT: return "criticality"; + case CTMO: return "case transmission mode observation"; + case DX: return "ObservationDiagnosisTypes"; + case ADMDX: return "admitting diagnosis"; + case DISDX: return "discharge diagnosis"; + case INTDX: return "intermediate diagnosis"; + case NOI: return "nature of injury"; + case GISTIER: return "GIS tier"; + case HHOBS: return "household situation observation"; + case ISSUE: return "detected issue"; + case _ACTADMINISTRATIVEDETECTEDISSUECODE: return "ActAdministrativeDetectedIssueCode"; + case _ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE: return "ActAdministrativeAuthorizationDetectedIssueCode"; + case NAT: return "Insufficient authorization"; + case SUPPRESSED: return "record suppressed"; + case VALIDAT: return "validation issue"; + case KEY204: return "Unknown key identifier"; + case KEY205: return "Duplicate key identifier"; + case COMPLY: return "Compliance Alert"; + case DUPTHPY: return "Duplicate Therapy Alert"; + case DUPTHPCLS: return "duplicate therapeutic alass alert"; + case DUPTHPGEN: return "duplicate generic alert"; + case ABUSE: return "commonly abused/misused alert"; + case FRAUD: return "potential fraud"; + case PLYDOC: return "Poly-orderer Alert"; + case PLYPHRM: return "Poly-supplier Alert"; + case DOSE: return "Dosage problem"; + case DOSECOND: return "dosage-condition alert"; + case DOSEDUR: return "Dose-Duration Alert"; + case DOSEDURH: return "Dose-Duration High Alert"; + case DOSEDURHIND: return "Dose-Duration High for Indication Alert"; + case DOSEDURL: return "Dose-Duration Low Alert"; + case DOSEDURLIND: return "Dose-Duration Low for Indication Alert"; + case DOSEH: return "High Dose Alert"; + case DOSEHINDA: return "High Dose for Age Alert"; + case DOSEHIND: return "High Dose for Indication Alert"; + case DOSEHINDSA: return "High Dose for Height/Surface Area Alert"; + case DOSEHINDW: return "High Dose for Weight Alert"; + case DOSEIVL: return "Dose-Interval Alert"; + case DOSEIVLIND: return "Dose-Interval for Indication Alert"; + case DOSEL: return "Low Dose Alert"; + case DOSELINDA: return "Low Dose for Age Alert"; + case DOSELIND: return "Low Dose for Indication Alert"; + case DOSELINDSA: return "Low Dose for Height/Surface Area Alert"; + case DOSELINDW: return "Low Dose for Weight Alert"; + case MDOSE: return "maximum dosage reached"; + case OBSA: return "Observation Alert"; + case AGE: return "Age Alert"; + case ADALRT: return "adult alert"; + case GEALRT: return "geriatric alert"; + case PEALRT: return "pediatric alert"; + case COND: return "Condition Alert"; + case HGHT: return "HGHT"; + case LACT: return "Lactation Alert"; + case PREG: return "Pregnancy Alert"; + case WGHT: return "WGHT"; + case CREACT: return "common reaction alert"; + case GEN: return "Genetic Alert"; + case GEND: return "Gender Alert"; + case LAB: return "Lab Alert"; + case REACT: return "Reaction Alert"; + case ALGY: return "Allergy Alert"; + case INT: return "Intolerance Alert"; + case RREACT: return "Related Reaction Alert"; + case RALG: return "Related Allergy Alert"; + case RAR: return "Related Prior Reaction Alert"; + case RINT: return "Related Intolerance Alert"; + case BUS: return "business constraint violation"; + case CODEINVAL: return "code is not valid"; + case CODEDEPREC: return "code has been deprecated"; + case FORMAT: return "invalid format"; + case ILLEGAL: return "illegal"; + case LENRANGE: return "length out of range"; + case LENLONG: return "length is too long"; + case LENSHORT: return "length is too short"; + case MISSCOND: return "conditional element missing"; + case MISSMAND: return "mandatory element missing"; + case NODUPS: return "duplicate values are not permitted"; + case NOPERSIST: return "element will not be persisted"; + case REPRANGE: return "repetitions out of range"; + case MAXOCCURS: return "repetitions above maximum"; + case MINOCCURS: return "repetitions below minimum"; + case _ACTADMINISTRATIVERULEDETECTEDISSUECODE: return "ActAdministrativeRuleDetectedIssueCode"; + case KEY206: return "non-matching identification"; + case OBSOLETE: return "obsolete record returned"; + case _ACTSUPPLIEDITEMDETECTEDISSUECODE: return "ActSuppliedItemDetectedIssueCode"; + case _ADMINISTRATIONDETECTEDISSUECODE: return "AdministrationDetectedIssueCode"; + case _APPROPRIATENESSDETECTEDISSUECODE: return "AppropriatenessDetectedIssueCode"; + case _INTERACTIONDETECTEDISSUECODE: return "InteractionDetectedIssueCode"; + case FOOD: return "Food Interaction Alert"; + case TPROD: return "Therapeutic Product Alert"; + case DRG: return "Drug Interaction Alert"; + case NHP: return "Natural Health Product Alert"; + case NONRX: return "Non-Prescription Interaction Alert"; + case PREVINEF: return "previously ineffective"; + case DACT: return "drug action detected issue"; + case TIME: return "timing detected issue"; + case ALRTENDLATE: return "end too late alert"; + case ALRTSTRTLATE: return "start too late alert"; + case _TIMINGDETECTEDISSUECODE: return "TimingDetectedIssueCode"; + case ENDLATE: return "End Too Late Alert"; + case STRTLATE: return "Start Too Late Alert"; + case _SUPPLYDETECTEDISSUECODE: return "SupplyDetectedIssueCode"; + case ALLDONE: return "already performed"; + case FULFIL: return "fulfillment alert"; + case NOTACTN: return "no longer actionable"; + case NOTEQUIV: return "not equivalent alert"; + case NOTEQUIVGEN: return "not generically equivalent alert"; + case NOTEQUIVTHER: return "not therapeutically equivalent alert"; + case TIMING: return "event timing incorrect alert"; + case INTERVAL: return "outside requested time"; + case MINFREQ: return "too soon within frequency based on the usage"; + case HELD: return "held/suspended alert"; + case TOOLATE: return "Refill Too Late Alert"; + case TOOSOON: return "Refill Too Soon Alert"; + case HISTORIC: return "record recorded as historical"; + case PATPREF: return "violates stated preferences"; + case PATPREFALT: return "violates stated preferences, alternate available"; + case KSUBJ: return "knowledge subject"; + case KSUBT: return "knowledge subtopic"; + case OINT: return "intolerance"; + case ALG: return "Allergy"; + case DALG: return "Drug Allergy"; + case EALG: return "Environmental Allergy"; + case FALG: return "Food Allergy"; + case DINT: return "Drug Intolerance"; + case DNAINT: return "Drug Non-Allergy Intolerance"; + case EINT: return "Environmental Intolerance"; + case ENAINT: return "Environmental Non-Allergy Intolerance"; + case FINT: return "Food Intolerance"; + case FNAINT: return "Food Non-Allergy Intolerance"; + case NAINT: return "Non-Allergy Intolerance"; + case SEV: return "Severity Observation"; + case _FDALABELDATA: return "FDALabelData"; + case FDACOATING: return "coating"; + case FDACOLOR: return "color"; + case FDAIMPRINTCD: return "imprint code"; + case FDALOGO: return "logo"; + case FDASCORING: return "scoring"; + case FDASHAPE: return "shape"; + case FDASIZE: return "size"; + case _ROIOVERLAYSHAPE: return "ROIOverlayShape"; + case CIRCLE: return "circle"; + case ELLIPSE: return "ellipse"; + case POINT: return "point"; + case POLY: return "polyline"; + case C: return "corrected"; + case DIET: return "Diet"; + case BR: return "breikost (GE)"; + case DM: return "diabetes mellitus diet"; + case FAST: return "fasting"; + case FORMULA: return "formula diet"; + case GF: return "gluten free"; + case LF: return "low fat"; + case LP: return "low protein"; + case LQ: return "liquid"; + case LS: return "low sodium"; + case N: return "normal diet"; + case NF: return "no fat"; + case PAF: return "phenylalanine free"; + case PAR: return "parenteral"; + case RD: return "reduction diet"; + case SCH: return "schonkost (GE)"; + case SUPPLEMENT: return "nutritional supplement"; + case T: return "tea only"; + case VLI: return "low valin, leucin, isoleucin"; + case DRUGPRG: return "drug program"; + case F: return "final"; + case PRLMN: return "preliminary"; + case SECOBS: return "SecurityObservationType"; + case SECCATOBS: return "security category observation"; + case SECCLASSOBS: return "security classification observation"; + case SECCONOBS: return "security control observation"; + case SECINTOBS: return "security integrity observation"; + case SECALTINTOBS: return "security alteration integrity observation"; + case SECDATINTOBS: return "security data integrity observation"; + case SECINTCONOBS: return "security integrity confidence observation"; + case SECINTPRVOBS: return "security integrity provenance observation"; + case SECINTPRVABOBS: return "security integrity provenance asserted by observation"; + case SECINTPRVRBOBS: return "security integrity provenance reported by observation"; + case SECINTSTOBS: return "security integrity status observation"; + case SECTRSTOBS: return "SECTRSTOBS"; + case TRSTACCRDOBS: return "trust accreditation observation"; + case TRSTAGREOBS: return "trust agreement observation"; + case TRSTCERTOBS: return "trust certificate observation"; + case TRSTFWKOBS: return "trust framework observation"; + case TRSTLOAOBS: return "trust assurance observation"; + case TRSTMECOBS: return "trust mechanism observation"; + case SUBSIDFFS: return "subsidized fee for service program"; + case WRKCOMP: return "(workers compensation program"; + case _ACTPROCEDURECODE: return "ActProcedureCode"; + case _ACTBILLABLESERVICECODE: return "ActBillableServiceCode"; + case _HL7DEFINEDACTCODES: return "HL7DefinedActCodes"; + case COPAY: return "COPAY"; + case DEDUCT: return "DEDUCT"; + case DOSEIND: return "DOSEIND"; + case PRA: return "PRA"; + case STORE: return "Storage"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActCodeEnumFactory.java new file mode 100644 index 00000000000..aed8047c5e2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActCodeEnumFactory.java @@ -0,0 +1,4450 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActCodeEnumFactory implements EnumFactory { + + public V3ActCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActAccountCode".equals(codeString)) + return V3ActCode._ACTACCOUNTCODE; + if ("ACCTRECEIVABLE".equals(codeString)) + return V3ActCode.ACCTRECEIVABLE; + if ("CASH".equals(codeString)) + return V3ActCode.CASH; + if ("CC".equals(codeString)) + return V3ActCode.CC; + if ("AE".equals(codeString)) + return V3ActCode.AE; + if ("DN".equals(codeString)) + return V3ActCode.DN; + if ("DV".equals(codeString)) + return V3ActCode.DV; + if ("MC".equals(codeString)) + return V3ActCode.MC; + if ("V".equals(codeString)) + return V3ActCode.V; + if ("PBILLACCT".equals(codeString)) + return V3ActCode.PBILLACCT; + if ("_ActAdjudicationCode".equals(codeString)) + return V3ActCode._ACTADJUDICATIONCODE; + if ("_ActAdjudicationGroupCode".equals(codeString)) + return V3ActCode._ACTADJUDICATIONGROUPCODE; + if ("CONT".equals(codeString)) + return V3ActCode.CONT; + if ("DAY".equals(codeString)) + return V3ActCode.DAY; + if ("LOC".equals(codeString)) + return V3ActCode.LOC; + if ("MONTH".equals(codeString)) + return V3ActCode.MONTH; + if ("PERIOD".equals(codeString)) + return V3ActCode.PERIOD; + if ("PROV".equals(codeString)) + return V3ActCode.PROV; + if ("WEEK".equals(codeString)) + return V3ActCode.WEEK; + if ("YEAR".equals(codeString)) + return V3ActCode.YEAR; + if ("AA".equals(codeString)) + return V3ActCode.AA; + if ("ANF".equals(codeString)) + return V3ActCode.ANF; + if ("AR".equals(codeString)) + return V3ActCode.AR; + if ("AS".equals(codeString)) + return V3ActCode.AS; + if ("_ActAdjudicationResultActionCode".equals(codeString)) + return V3ActCode._ACTADJUDICATIONRESULTACTIONCODE; + if ("DISPLAY".equals(codeString)) + return V3ActCode.DISPLAY; + if ("FORM".equals(codeString)) + return V3ActCode.FORM; + if ("_ActBillableModifierCode".equals(codeString)) + return V3ActCode._ACTBILLABLEMODIFIERCODE; + if ("CPTM".equals(codeString)) + return V3ActCode.CPTM; + if ("HCPCSA".equals(codeString)) + return V3ActCode.HCPCSA; + if ("_ActBillingArrangementCode".equals(codeString)) + return V3ActCode._ACTBILLINGARRANGEMENTCODE; + if ("BLK".equals(codeString)) + return V3ActCode.BLK; + if ("CAP".equals(codeString)) + return V3ActCode.CAP; + if ("CONTF".equals(codeString)) + return V3ActCode.CONTF; + if ("FINBILL".equals(codeString)) + return V3ActCode.FINBILL; + if ("ROST".equals(codeString)) + return V3ActCode.ROST; + if ("SESS".equals(codeString)) + return V3ActCode.SESS; + if ("FFS".equals(codeString)) + return V3ActCode.FFS; + if ("FFPS".equals(codeString)) + return V3ActCode.FFPS; + if ("FFCS".equals(codeString)) + return V3ActCode.FFCS; + if ("TFS".equals(codeString)) + return V3ActCode.TFS; + if ("_ActBoundedROICode".equals(codeString)) + return V3ActCode._ACTBOUNDEDROICODE; + if ("ROIFS".equals(codeString)) + return V3ActCode.ROIFS; + if ("ROIPS".equals(codeString)) + return V3ActCode.ROIPS; + if ("_ActCareProvisionCode".equals(codeString)) + return V3ActCode._ACTCAREPROVISIONCODE; + if ("_ActCredentialedCareCode".equals(codeString)) + return V3ActCode._ACTCREDENTIALEDCARECODE; + if ("_ActCredentialedCareProvisionPersonCode".equals(codeString)) + return V3ActCode._ACTCREDENTIALEDCAREPROVISIONPERSONCODE; + if ("CACC".equals(codeString)) + return V3ActCode.CACC; + if ("CAIC".equals(codeString)) + return V3ActCode.CAIC; + if ("CAMC".equals(codeString)) + return V3ActCode.CAMC; + if ("CANC".equals(codeString)) + return V3ActCode.CANC; + if ("CAPC".equals(codeString)) + return V3ActCode.CAPC; + if ("CBGC".equals(codeString)) + return V3ActCode.CBGC; + if ("CCCC".equals(codeString)) + return V3ActCode.CCCC; + if ("CCGC".equals(codeString)) + return V3ActCode.CCGC; + if ("CCPC".equals(codeString)) + return V3ActCode.CCPC; + if ("CCSC".equals(codeString)) + return V3ActCode.CCSC; + if ("CDEC".equals(codeString)) + return V3ActCode.CDEC; + if ("CDRC".equals(codeString)) + return V3ActCode.CDRC; + if ("CEMC".equals(codeString)) + return V3ActCode.CEMC; + if ("CFPC".equals(codeString)) + return V3ActCode.CFPC; + if ("CIMC".equals(codeString)) + return V3ActCode.CIMC; + if ("CMGC".equals(codeString)) + return V3ActCode.CMGC; + if ("CNEC".equals(codeString)) + return V3ActCode.CNEC; + if ("CNMC".equals(codeString)) + return V3ActCode.CNMC; + if ("CNQC".equals(codeString)) + return V3ActCode.CNQC; + if ("CNSC".equals(codeString)) + return V3ActCode.CNSC; + if ("COGC".equals(codeString)) + return V3ActCode.COGC; + if ("COMC".equals(codeString)) + return V3ActCode.COMC; + if ("COPC".equals(codeString)) + return V3ActCode.COPC; + if ("COSC".equals(codeString)) + return V3ActCode.COSC; + if ("COTC".equals(codeString)) + return V3ActCode.COTC; + if ("CPEC".equals(codeString)) + return V3ActCode.CPEC; + if ("CPGC".equals(codeString)) + return V3ActCode.CPGC; + if ("CPHC".equals(codeString)) + return V3ActCode.CPHC; + if ("CPRC".equals(codeString)) + return V3ActCode.CPRC; + if ("CPSC".equals(codeString)) + return V3ActCode.CPSC; + if ("CPYC".equals(codeString)) + return V3ActCode.CPYC; + if ("CROC".equals(codeString)) + return V3ActCode.CROC; + if ("CRPC".equals(codeString)) + return V3ActCode.CRPC; + if ("CSUC".equals(codeString)) + return V3ActCode.CSUC; + if ("CTSC".equals(codeString)) + return V3ActCode.CTSC; + if ("CURC".equals(codeString)) + return V3ActCode.CURC; + if ("CVSC".equals(codeString)) + return V3ActCode.CVSC; + if ("LGPC".equals(codeString)) + return V3ActCode.LGPC; + if ("_ActCredentialedCareProvisionProgramCode".equals(codeString)) + return V3ActCode._ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE; + if ("AALC".equals(codeString)) + return V3ActCode.AALC; + if ("AAMC".equals(codeString)) + return V3ActCode.AAMC; + if ("ABHC".equals(codeString)) + return V3ActCode.ABHC; + if ("ACAC".equals(codeString)) + return V3ActCode.ACAC; + if ("ACHC".equals(codeString)) + return V3ActCode.ACHC; + if ("AHOC".equals(codeString)) + return V3ActCode.AHOC; + if ("ALTC".equals(codeString)) + return V3ActCode.ALTC; + if ("AOSC".equals(codeString)) + return V3ActCode.AOSC; + if ("CACS".equals(codeString)) + return V3ActCode.CACS; + if ("CAMI".equals(codeString)) + return V3ActCode.CAMI; + if ("CAST".equals(codeString)) + return V3ActCode.CAST; + if ("CBAR".equals(codeString)) + return V3ActCode.CBAR; + if ("CCAD".equals(codeString)) + return V3ActCode.CCAD; + if ("CCAR".equals(codeString)) + return V3ActCode.CCAR; + if ("CDEP".equals(codeString)) + return V3ActCode.CDEP; + if ("CDGD".equals(codeString)) + return V3ActCode.CDGD; + if ("CDIA".equals(codeString)) + return V3ActCode.CDIA; + if ("CEPI".equals(codeString)) + return V3ActCode.CEPI; + if ("CFEL".equals(codeString)) + return V3ActCode.CFEL; + if ("CHFC".equals(codeString)) + return V3ActCode.CHFC; + if ("CHRO".equals(codeString)) + return V3ActCode.CHRO; + if ("CHYP".equals(codeString)) + return V3ActCode.CHYP; + if ("CMIH".equals(codeString)) + return V3ActCode.CMIH; + if ("CMSC".equals(codeString)) + return V3ActCode.CMSC; + if ("COJR".equals(codeString)) + return V3ActCode.COJR; + if ("CONC".equals(codeString)) + return V3ActCode.CONC; + if ("COPD".equals(codeString)) + return V3ActCode.COPD; + if ("CORT".equals(codeString)) + return V3ActCode.CORT; + if ("CPAD".equals(codeString)) + return V3ActCode.CPAD; + if ("CPND".equals(codeString)) + return V3ActCode.CPND; + if ("CPST".equals(codeString)) + return V3ActCode.CPST; + if ("CSDM".equals(codeString)) + return V3ActCode.CSDM; + if ("CSIC".equals(codeString)) + return V3ActCode.CSIC; + if ("CSLD".equals(codeString)) + return V3ActCode.CSLD; + if ("CSPT".equals(codeString)) + return V3ActCode.CSPT; + if ("CTBU".equals(codeString)) + return V3ActCode.CTBU; + if ("CVDC".equals(codeString)) + return V3ActCode.CVDC; + if ("CWMA".equals(codeString)) + return V3ActCode.CWMA; + if ("CWOH".equals(codeString)) + return V3ActCode.CWOH; + if ("_ActEncounterCode".equals(codeString)) + return V3ActCode._ACTENCOUNTERCODE; + if ("AMB".equals(codeString)) + return V3ActCode.AMB; + if ("EMER".equals(codeString)) + return V3ActCode.EMER; + if ("FLD".equals(codeString)) + return V3ActCode.FLD; + if ("HH".equals(codeString)) + return V3ActCode.HH; + if ("IMP".equals(codeString)) + return V3ActCode.IMP; + if ("ACUTE".equals(codeString)) + return V3ActCode.ACUTE; + if ("NONAC".equals(codeString)) + return V3ActCode.NONAC; + if ("PRENC".equals(codeString)) + return V3ActCode.PRENC; + if ("SS".equals(codeString)) + return V3ActCode.SS; + if ("VR".equals(codeString)) + return V3ActCode.VR; + if ("_ActMedicalServiceCode".equals(codeString)) + return V3ActCode._ACTMEDICALSERVICECODE; + if ("ALC".equals(codeString)) + return V3ActCode.ALC; + if ("CARD".equals(codeString)) + return V3ActCode.CARD; + if ("CHR".equals(codeString)) + return V3ActCode.CHR; + if ("DNTL".equals(codeString)) + return V3ActCode.DNTL; + if ("DRGRHB".equals(codeString)) + return V3ActCode.DRGRHB; + if ("GENRL".equals(codeString)) + return V3ActCode.GENRL; + if ("MED".equals(codeString)) + return V3ActCode.MED; + if ("OBS".equals(codeString)) + return V3ActCode.OBS; + if ("ONC".equals(codeString)) + return V3ActCode.ONC; + if ("PALL".equals(codeString)) + return V3ActCode.PALL; + if ("PED".equals(codeString)) + return V3ActCode.PED; + if ("PHAR".equals(codeString)) + return V3ActCode.PHAR; + if ("PHYRHB".equals(codeString)) + return V3ActCode.PHYRHB; + if ("PSYCH".equals(codeString)) + return V3ActCode.PSYCH; + if ("SURG".equals(codeString)) + return V3ActCode.SURG; + if ("_ActClaimAttachmentCategoryCode".equals(codeString)) + return V3ActCode._ACTCLAIMATTACHMENTCATEGORYCODE; + if ("AUTOATTCH".equals(codeString)) + return V3ActCode.AUTOATTCH; + if ("DOCUMENT".equals(codeString)) + return V3ActCode.DOCUMENT; + if ("HEALTHREC".equals(codeString)) + return V3ActCode.HEALTHREC; + if ("IMG".equals(codeString)) + return V3ActCode.IMG; + if ("LABRESULTS".equals(codeString)) + return V3ActCode.LABRESULTS; + if ("MODEL".equals(codeString)) + return V3ActCode.MODEL; + if ("WIATTCH".equals(codeString)) + return V3ActCode.WIATTCH; + if ("XRAY".equals(codeString)) + return V3ActCode.XRAY; + if ("_ActConsentType".equals(codeString)) + return V3ActCode._ACTCONSENTTYPE; + if ("ICOL".equals(codeString)) + return V3ActCode.ICOL; + if ("IDSCL".equals(codeString)) + return V3ActCode.IDSCL; + if ("INFA".equals(codeString)) + return V3ActCode.INFA; + if ("INFAO".equals(codeString)) + return V3ActCode.INFAO; + if ("INFASO".equals(codeString)) + return V3ActCode.INFASO; + if ("IRDSCL".equals(codeString)) + return V3ActCode.IRDSCL; + if ("RESEARCH".equals(codeString)) + return V3ActCode.RESEARCH; + if ("RSDID".equals(codeString)) + return V3ActCode.RSDID; + if ("RSREID".equals(codeString)) + return V3ActCode.RSREID; + if ("_ActContainerRegistrationCode".equals(codeString)) + return V3ActCode._ACTCONTAINERREGISTRATIONCODE; + if ("ID".equals(codeString)) + return V3ActCode.ID; + if ("IP".equals(codeString)) + return V3ActCode.IP; + if ("L".equals(codeString)) + return V3ActCode.L; + if ("M".equals(codeString)) + return V3ActCode.M; + if ("O".equals(codeString)) + return V3ActCode.O; + if ("R".equals(codeString)) + return V3ActCode.R; + if ("X".equals(codeString)) + return V3ActCode.X; + if ("_ActControlVariable".equals(codeString)) + return V3ActCode._ACTCONTROLVARIABLE; + if ("AUTO".equals(codeString)) + return V3ActCode.AUTO; + if ("ENDC".equals(codeString)) + return V3ActCode.ENDC; + if ("REFLEX".equals(codeString)) + return V3ActCode.REFLEX; + if ("_ActCoverageConfirmationCode".equals(codeString)) + return V3ActCode._ACTCOVERAGECONFIRMATIONCODE; + if ("_ActCoverageAuthorizationConfirmationCode".equals(codeString)) + return V3ActCode._ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE; + if ("AUTH".equals(codeString)) + return V3ActCode.AUTH; + if ("NAUTH".equals(codeString)) + return V3ActCode.NAUTH; + if ("_ActCoverageEligibilityConfirmationCode".equals(codeString)) + return V3ActCode._ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE; + if ("ELG".equals(codeString)) + return V3ActCode.ELG; + if ("NELG".equals(codeString)) + return V3ActCode.NELG; + if ("_ActCoverageLimitCode".equals(codeString)) + return V3ActCode._ACTCOVERAGELIMITCODE; + if ("_ActCoverageQuantityLimitCode".equals(codeString)) + return V3ActCode._ACTCOVERAGEQUANTITYLIMITCODE; + if ("COVPRD".equals(codeString)) + return V3ActCode.COVPRD; + if ("LFEMX".equals(codeString)) + return V3ActCode.LFEMX; + if ("NETAMT".equals(codeString)) + return V3ActCode.NETAMT; + if ("PRDMX".equals(codeString)) + return V3ActCode.PRDMX; + if ("UNITPRICE".equals(codeString)) + return V3ActCode.UNITPRICE; + if ("UNITQTY".equals(codeString)) + return V3ActCode.UNITQTY; + if ("COVMX".equals(codeString)) + return V3ActCode.COVMX; + if ("_ActCoveredPartyLimitCode".equals(codeString)) + return V3ActCode._ACTCOVEREDPARTYLIMITCODE; + if ("_ActCoverageTypeCode".equals(codeString)) + return V3ActCode._ACTCOVERAGETYPECODE; + if ("_ActInsurancePolicyCode".equals(codeString)) + return V3ActCode._ACTINSURANCEPOLICYCODE; + if ("EHCPOL".equals(codeString)) + return V3ActCode.EHCPOL; + if ("HSAPOL".equals(codeString)) + return V3ActCode.HSAPOL; + if ("AUTOPOL".equals(codeString)) + return V3ActCode.AUTOPOL; + if ("COL".equals(codeString)) + return V3ActCode.COL; + if ("UNINSMOT".equals(codeString)) + return V3ActCode.UNINSMOT; + if ("PUBLICPOL".equals(codeString)) + return V3ActCode.PUBLICPOL; + if ("DENTPRG".equals(codeString)) + return V3ActCode.DENTPRG; + if ("DISEASEPRG".equals(codeString)) + return V3ActCode.DISEASEPRG; + if ("CANPRG".equals(codeString)) + return V3ActCode.CANPRG; + if ("ENDRENAL".equals(codeString)) + return V3ActCode.ENDRENAL; + if ("HIVAIDS".equals(codeString)) + return V3ActCode.HIVAIDS; + if ("MANDPOL".equals(codeString)) + return V3ActCode.MANDPOL; + if ("MENTPRG".equals(codeString)) + return V3ActCode.MENTPRG; + if ("SAFNET".equals(codeString)) + return V3ActCode.SAFNET; + if ("SUBPRG".equals(codeString)) + return V3ActCode.SUBPRG; + if ("SUBSIDIZ".equals(codeString)) + return V3ActCode.SUBSIDIZ; + if ("SUBSIDMC".equals(codeString)) + return V3ActCode.SUBSIDMC; + if ("SUBSUPP".equals(codeString)) + return V3ActCode.SUBSUPP; + if ("WCBPOL".equals(codeString)) + return V3ActCode.WCBPOL; + if ("_ActInsuranceTypeCode".equals(codeString)) + return V3ActCode._ACTINSURANCETYPECODE; + if ("_ActHealthInsuranceTypeCode".equals(codeString)) + return V3ActCode._ACTHEALTHINSURANCETYPECODE; + if ("DENTAL".equals(codeString)) + return V3ActCode.DENTAL; + if ("DISEASE".equals(codeString)) + return V3ActCode.DISEASE; + if ("DRUGPOL".equals(codeString)) + return V3ActCode.DRUGPOL; + if ("HIP".equals(codeString)) + return V3ActCode.HIP; + if ("LTC".equals(codeString)) + return V3ActCode.LTC; + if ("MCPOL".equals(codeString)) + return V3ActCode.MCPOL; + if ("POS".equals(codeString)) + return V3ActCode.POS; + if ("HMO".equals(codeString)) + return V3ActCode.HMO; + if ("PPO".equals(codeString)) + return V3ActCode.PPO; + if ("MENTPOL".equals(codeString)) + return V3ActCode.MENTPOL; + if ("SUBPOL".equals(codeString)) + return V3ActCode.SUBPOL; + if ("VISPOL".equals(codeString)) + return V3ActCode.VISPOL; + if ("DIS".equals(codeString)) + return V3ActCode.DIS; + if ("EWB".equals(codeString)) + return V3ActCode.EWB; + if ("FLEXP".equals(codeString)) + return V3ActCode.FLEXP; + if ("LIFE".equals(codeString)) + return V3ActCode.LIFE; + if ("ANNU".equals(codeString)) + return V3ActCode.ANNU; + if ("TLIFE".equals(codeString)) + return V3ActCode.TLIFE; + if ("ULIFE".equals(codeString)) + return V3ActCode.ULIFE; + if ("PNC".equals(codeString)) + return V3ActCode.PNC; + if ("REI".equals(codeString)) + return V3ActCode.REI; + if ("SURPL".equals(codeString)) + return V3ActCode.SURPL; + if ("UMBRL".equals(codeString)) + return V3ActCode.UMBRL; + if ("_ActProgramTypeCode".equals(codeString)) + return V3ActCode._ACTPROGRAMTYPECODE; + if ("CHAR".equals(codeString)) + return V3ActCode.CHAR; + if ("CRIME".equals(codeString)) + return V3ActCode.CRIME; + if ("EAP".equals(codeString)) + return V3ActCode.EAP; + if ("GOVEMP".equals(codeString)) + return V3ActCode.GOVEMP; + if ("HIRISK".equals(codeString)) + return V3ActCode.HIRISK; + if ("IND".equals(codeString)) + return V3ActCode.IND; + if ("MILITARY".equals(codeString)) + return V3ActCode.MILITARY; + if ("RETIRE".equals(codeString)) + return V3ActCode.RETIRE; + if ("SOCIAL".equals(codeString)) + return V3ActCode.SOCIAL; + if ("VET".equals(codeString)) + return V3ActCode.VET; + if ("_ActDetectedIssueManagementCode".equals(codeString)) + return V3ActCode._ACTDETECTEDISSUEMANAGEMENTCODE; + if ("_ActAdministrativeDetectedIssueManagementCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE; + if ("_AuthorizationIssueManagementCode".equals(codeString)) + return V3ActCode._AUTHORIZATIONISSUEMANAGEMENTCODE; + if ("EMAUTH".equals(codeString)) + return V3ActCode.EMAUTH; + if ("21".equals(codeString)) + return V3ActCode._21; + if ("1".equals(codeString)) + return V3ActCode._1; + if ("19".equals(codeString)) + return V3ActCode._19; + if ("2".equals(codeString)) + return V3ActCode._2; + if ("22".equals(codeString)) + return V3ActCode._22; + if ("23".equals(codeString)) + return V3ActCode._23; + if ("3".equals(codeString)) + return V3ActCode._3; + if ("4".equals(codeString)) + return V3ActCode._4; + if ("5".equals(codeString)) + return V3ActCode._5; + if ("6".equals(codeString)) + return V3ActCode._6; + if ("7".equals(codeString)) + return V3ActCode._7; + if ("14".equals(codeString)) + return V3ActCode._14; + if ("15".equals(codeString)) + return V3ActCode._15; + if ("16".equals(codeString)) + return V3ActCode._16; + if ("17".equals(codeString)) + return V3ActCode._17; + if ("18".equals(codeString)) + return V3ActCode._18; + if ("20".equals(codeString)) + return V3ActCode._20; + if ("8".equals(codeString)) + return V3ActCode._8; + if ("10".equals(codeString)) + return V3ActCode._10; + if ("11".equals(codeString)) + return V3ActCode._11; + if ("12".equals(codeString)) + return V3ActCode._12; + if ("13".equals(codeString)) + return V3ActCode._13; + if ("9".equals(codeString)) + return V3ActCode._9; + if ("_ActExposureCode".equals(codeString)) + return V3ActCode._ACTEXPOSURECODE; + if ("CHLDCARE".equals(codeString)) + return V3ActCode.CHLDCARE; + if ("CONVEYNC".equals(codeString)) + return V3ActCode.CONVEYNC; + if ("HLTHCARE".equals(codeString)) + return V3ActCode.HLTHCARE; + if ("HOMECARE".equals(codeString)) + return V3ActCode.HOMECARE; + if ("HOSPPTNT".equals(codeString)) + return V3ActCode.HOSPPTNT; + if ("HOSPVSTR".equals(codeString)) + return V3ActCode.HOSPVSTR; + if ("HOUSEHLD".equals(codeString)) + return V3ActCode.HOUSEHLD; + if ("INMATE".equals(codeString)) + return V3ActCode.INMATE; + if ("INTIMATE".equals(codeString)) + return V3ActCode.INTIMATE; + if ("LTRMCARE".equals(codeString)) + return V3ActCode.LTRMCARE; + if ("PLACE".equals(codeString)) + return V3ActCode.PLACE; + if ("PTNTCARE".equals(codeString)) + return V3ActCode.PTNTCARE; + if ("SCHOOL2".equals(codeString)) + return V3ActCode.SCHOOL2; + if ("SOCIAL2".equals(codeString)) + return V3ActCode.SOCIAL2; + if ("SUBSTNCE".equals(codeString)) + return V3ActCode.SUBSTNCE; + if ("TRAVINT".equals(codeString)) + return V3ActCode.TRAVINT; + if ("WORK2".equals(codeString)) + return V3ActCode.WORK2; + if ("_ActFinancialTransactionCode".equals(codeString)) + return V3ActCode._ACTFINANCIALTRANSACTIONCODE; + if ("CHRG".equals(codeString)) + return V3ActCode.CHRG; + if ("REV".equals(codeString)) + return V3ActCode.REV; + if ("_ActIncidentCode".equals(codeString)) + return V3ActCode._ACTINCIDENTCODE; + if ("MVA".equals(codeString)) + return V3ActCode.MVA; + if ("SCHOOL".equals(codeString)) + return V3ActCode.SCHOOL; + if ("SPT".equals(codeString)) + return V3ActCode.SPT; + if ("WPA".equals(codeString)) + return V3ActCode.WPA; + if ("_ActInformationAccessCode".equals(codeString)) + return V3ActCode._ACTINFORMATIONACCESSCODE; + if ("ACADR".equals(codeString)) + return V3ActCode.ACADR; + if ("ACALL".equals(codeString)) + return V3ActCode.ACALL; + if ("ACALLG".equals(codeString)) + return V3ActCode.ACALLG; + if ("ACCONS".equals(codeString)) + return V3ActCode.ACCONS; + if ("ACDEMO".equals(codeString)) + return V3ActCode.ACDEMO; + if ("ACDI".equals(codeString)) + return V3ActCode.ACDI; + if ("ACIMMUN".equals(codeString)) + return V3ActCode.ACIMMUN; + if ("ACLAB".equals(codeString)) + return V3ActCode.ACLAB; + if ("ACMED".equals(codeString)) + return V3ActCode.ACMED; + if ("ACMEDC".equals(codeString)) + return V3ActCode.ACMEDC; + if ("ACMEN".equals(codeString)) + return V3ActCode.ACMEN; + if ("ACOBS".equals(codeString)) + return V3ActCode.ACOBS; + if ("ACPOLPRG".equals(codeString)) + return V3ActCode.ACPOLPRG; + if ("ACPROV".equals(codeString)) + return V3ActCode.ACPROV; + if ("ACPSERV".equals(codeString)) + return V3ActCode.ACPSERV; + if ("ACSUBSTAB".equals(codeString)) + return V3ActCode.ACSUBSTAB; + if ("_ActInformationAccessContextCode".equals(codeString)) + return V3ActCode._ACTINFORMATIONACCESSCONTEXTCODE; + if ("INFAUT".equals(codeString)) + return V3ActCode.INFAUT; + if ("INFCON".equals(codeString)) + return V3ActCode.INFCON; + if ("INFCRT".equals(codeString)) + return V3ActCode.INFCRT; + if ("INFDNG".equals(codeString)) + return V3ActCode.INFDNG; + if ("INFEMER".equals(codeString)) + return V3ActCode.INFEMER; + if ("INFPWR".equals(codeString)) + return V3ActCode.INFPWR; + if ("INFREG".equals(codeString)) + return V3ActCode.INFREG; + if ("_ActInformationCategoryCode".equals(codeString)) + return V3ActCode._ACTINFORMATIONCATEGORYCODE; + if ("ALLCAT".equals(codeString)) + return V3ActCode.ALLCAT; + if ("ALLGCAT".equals(codeString)) + return V3ActCode.ALLGCAT; + if ("ARCAT".equals(codeString)) + return V3ActCode.ARCAT; + if ("COBSCAT".equals(codeString)) + return V3ActCode.COBSCAT; + if ("DEMOCAT".equals(codeString)) + return V3ActCode.DEMOCAT; + if ("DICAT".equals(codeString)) + return V3ActCode.DICAT; + if ("IMMUCAT".equals(codeString)) + return V3ActCode.IMMUCAT; + if ("LABCAT".equals(codeString)) + return V3ActCode.LABCAT; + if ("MEDCCAT".equals(codeString)) + return V3ActCode.MEDCCAT; + if ("MENCAT".equals(codeString)) + return V3ActCode.MENCAT; + if ("PSVCCAT".equals(codeString)) + return V3ActCode.PSVCCAT; + if ("RXCAT".equals(codeString)) + return V3ActCode.RXCAT; + if ("_ActInvoiceElementCode".equals(codeString)) + return V3ActCode._ACTINVOICEELEMENTCODE; + if ("_ActInvoiceAdjudicationPaymentCode".equals(codeString)) + return V3ActCode._ACTINVOICEADJUDICATIONPAYMENTCODE; + if ("_ActInvoiceAdjudicationPaymentGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEADJUDICATIONPAYMENTGROUPCODE; + if ("ALEC".equals(codeString)) + return V3ActCode.ALEC; + if ("BONUS".equals(codeString)) + return V3ActCode.BONUS; + if ("CFWD".equals(codeString)) + return V3ActCode.CFWD; + if ("EDU".equals(codeString)) + return V3ActCode.EDU; + if ("EPYMT".equals(codeString)) + return V3ActCode.EPYMT; + if ("GARN".equals(codeString)) + return V3ActCode.GARN; + if ("INVOICE".equals(codeString)) + return V3ActCode.INVOICE; + if ("PINV".equals(codeString)) + return V3ActCode.PINV; + if ("PPRD".equals(codeString)) + return V3ActCode.PPRD; + if ("PROA".equals(codeString)) + return V3ActCode.PROA; + if ("RECOV".equals(codeString)) + return V3ActCode.RECOV; + if ("RETRO".equals(codeString)) + return V3ActCode.RETRO; + if ("TRAN".equals(codeString)) + return V3ActCode.TRAN; + if ("_ActInvoiceAdjudicationPaymentSummaryCode".equals(codeString)) + return V3ActCode._ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE; + if ("INVTYPE".equals(codeString)) + return V3ActCode.INVTYPE; + if ("PAYEE".equals(codeString)) + return V3ActCode.PAYEE; + if ("PAYOR".equals(codeString)) + return V3ActCode.PAYOR; + if ("SENDAPP".equals(codeString)) + return V3ActCode.SENDAPP; + if ("_ActInvoiceDetailCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILCODE; + if ("_ActInvoiceDetailClinicalProductCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILCLINICALPRODUCTCODE; + if ("UNSPSC".equals(codeString)) + return V3ActCode.UNSPSC; + if ("_ActInvoiceDetailDrugProductCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILDRUGPRODUCTCODE; + if ("GTIN".equals(codeString)) + return V3ActCode.GTIN; + if ("UPC".equals(codeString)) + return V3ActCode.UPC; + if ("_ActInvoiceDetailGenericCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICCODE; + if ("_ActInvoiceDetailGenericAdjudicatorCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICADJUDICATORCODE; + if ("COIN".equals(codeString)) + return V3ActCode.COIN; + if ("COPAYMENT".equals(codeString)) + return V3ActCode.COPAYMENT; + if ("DEDUCTIBLE".equals(codeString)) + return V3ActCode.DEDUCTIBLE; + if ("PAY".equals(codeString)) + return V3ActCode.PAY; + if ("SPEND".equals(codeString)) + return V3ActCode.SPEND; + if ("COINS".equals(codeString)) + return V3ActCode.COINS; + if ("_ActInvoiceDetailGenericModifierCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICMODIFIERCODE; + if ("AFTHRS".equals(codeString)) + return V3ActCode.AFTHRS; + if ("ISOL".equals(codeString)) + return V3ActCode.ISOL; + if ("OOO".equals(codeString)) + return V3ActCode.OOO; + if ("_ActInvoiceDetailGenericProviderCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILGENERICPROVIDERCODE; + if ("CANCAPT".equals(codeString)) + return V3ActCode.CANCAPT; + if ("DSC".equals(codeString)) + return V3ActCode.DSC; + if ("ESA".equals(codeString)) + return V3ActCode.ESA; + if ("FFSTOP".equals(codeString)) + return V3ActCode.FFSTOP; + if ("FNLFEE".equals(codeString)) + return V3ActCode.FNLFEE; + if ("FRSTFEE".equals(codeString)) + return V3ActCode.FRSTFEE; + if ("MARKUP".equals(codeString)) + return V3ActCode.MARKUP; + if ("MISSAPT".equals(codeString)) + return V3ActCode.MISSAPT; + if ("PERFEE".equals(codeString)) + return V3ActCode.PERFEE; + if ("PERMBNS".equals(codeString)) + return V3ActCode.PERMBNS; + if ("RESTOCK".equals(codeString)) + return V3ActCode.RESTOCK; + if ("TRAVEL".equals(codeString)) + return V3ActCode.TRAVEL; + if ("URGENT".equals(codeString)) + return V3ActCode.URGENT; + if ("_ActInvoiceDetailTaxCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILTAXCODE; + if ("FST".equals(codeString)) + return V3ActCode.FST; + if ("HST".equals(codeString)) + return V3ActCode.HST; + if ("PST".equals(codeString)) + return V3ActCode.PST; + if ("_ActInvoiceDetailPreferredAccommodationCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE; + if ("_ActEncounterAccommodationCode".equals(codeString)) + return V3ActCode._ACTENCOUNTERACCOMMODATIONCODE; + if ("_HL7AccommodationCode".equals(codeString)) + return V3ActCode._HL7ACCOMMODATIONCODE; + if ("I".equals(codeString)) + return V3ActCode.I; + if ("P".equals(codeString)) + return V3ActCode.P; + if ("S".equals(codeString)) + return V3ActCode.S; + if ("SP".equals(codeString)) + return V3ActCode.SP; + if ("W".equals(codeString)) + return V3ActCode.W; + if ("_ActInvoiceDetailClinicalServiceCode".equals(codeString)) + return V3ActCode._ACTINVOICEDETAILCLINICALSERVICECODE; + if ("_ActInvoiceGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEGROUPCODE; + if ("_ActInvoiceInterGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEINTERGROUPCODE; + if ("CPNDDRGING".equals(codeString)) + return V3ActCode.CPNDDRGING; + if ("CPNDINDING".equals(codeString)) + return V3ActCode.CPNDINDING; + if ("CPNDSUPING".equals(codeString)) + return V3ActCode.CPNDSUPING; + if ("DRUGING".equals(codeString)) + return V3ActCode.DRUGING; + if ("FRAMEING".equals(codeString)) + return V3ActCode.FRAMEING; + if ("LENSING".equals(codeString)) + return V3ActCode.LENSING; + if ("PRDING".equals(codeString)) + return V3ActCode.PRDING; + if ("_ActInvoiceRootGroupCode".equals(codeString)) + return V3ActCode._ACTINVOICEROOTGROUPCODE; + if ("CPINV".equals(codeString)) + return V3ActCode.CPINV; + if ("CSINV".equals(codeString)) + return V3ActCode.CSINV; + if ("CSPINV".equals(codeString)) + return V3ActCode.CSPINV; + if ("FININV".equals(codeString)) + return V3ActCode.FININV; + if ("OHSINV".equals(codeString)) + return V3ActCode.OHSINV; + if ("PAINV".equals(codeString)) + return V3ActCode.PAINV; + if ("RXCINV".equals(codeString)) + return V3ActCode.RXCINV; + if ("RXDINV".equals(codeString)) + return V3ActCode.RXDINV; + if ("SBFINV".equals(codeString)) + return V3ActCode.SBFINV; + if ("VRXINV".equals(codeString)) + return V3ActCode.VRXINV; + if ("_ActInvoiceElementSummaryCode".equals(codeString)) + return V3ActCode._ACTINVOICEELEMENTSUMMARYCODE; + if ("_InvoiceElementAdjudicated".equals(codeString)) + return V3ActCode._INVOICEELEMENTADJUDICATED; + if ("ADNFPPELAT".equals(codeString)) + return V3ActCode.ADNFPPELAT; + if ("ADNFPPELCT".equals(codeString)) + return V3ActCode.ADNFPPELCT; + if ("ADNFPPMNAT".equals(codeString)) + return V3ActCode.ADNFPPMNAT; + if ("ADNFPPMNCT".equals(codeString)) + return V3ActCode.ADNFPPMNCT; + if ("ADNFSPELAT".equals(codeString)) + return V3ActCode.ADNFSPELAT; + if ("ADNFSPELCT".equals(codeString)) + return V3ActCode.ADNFSPELCT; + if ("ADNFSPMNAT".equals(codeString)) + return V3ActCode.ADNFSPMNAT; + if ("ADNFSPMNCT".equals(codeString)) + return V3ActCode.ADNFSPMNCT; + if ("ADNPPPELAT".equals(codeString)) + return V3ActCode.ADNPPPELAT; + if ("ADNPPPELCT".equals(codeString)) + return V3ActCode.ADNPPPELCT; + if ("ADNPPPMNAT".equals(codeString)) + return V3ActCode.ADNPPPMNAT; + if ("ADNPPPMNCT".equals(codeString)) + return V3ActCode.ADNPPPMNCT; + if ("ADNPSPELAT".equals(codeString)) + return V3ActCode.ADNPSPELAT; + if ("ADNPSPELCT".equals(codeString)) + return V3ActCode.ADNPSPELCT; + if ("ADNPSPMNAT".equals(codeString)) + return V3ActCode.ADNPSPMNAT; + if ("ADNPSPMNCT".equals(codeString)) + return V3ActCode.ADNPSPMNCT; + if ("ADPPPPELAT".equals(codeString)) + return V3ActCode.ADPPPPELAT; + if ("ADPPPPELCT".equals(codeString)) + return V3ActCode.ADPPPPELCT; + if ("ADPPPPMNAT".equals(codeString)) + return V3ActCode.ADPPPPMNAT; + if ("ADPPPPMNCT".equals(codeString)) + return V3ActCode.ADPPPPMNCT; + if ("ADPPSPELAT".equals(codeString)) + return V3ActCode.ADPPSPELAT; + if ("ADPPSPELCT".equals(codeString)) + return V3ActCode.ADPPSPELCT; + if ("ADPPSPMNAT".equals(codeString)) + return V3ActCode.ADPPSPMNAT; + if ("ADPPSPMNCT".equals(codeString)) + return V3ActCode.ADPPSPMNCT; + if ("ADRFPPELAT".equals(codeString)) + return V3ActCode.ADRFPPELAT; + if ("ADRFPPELCT".equals(codeString)) + return V3ActCode.ADRFPPELCT; + if ("ADRFPPMNAT".equals(codeString)) + return V3ActCode.ADRFPPMNAT; + if ("ADRFPPMNCT".equals(codeString)) + return V3ActCode.ADRFPPMNCT; + if ("ADRFSPELAT".equals(codeString)) + return V3ActCode.ADRFSPELAT; + if ("ADRFSPELCT".equals(codeString)) + return V3ActCode.ADRFSPELCT; + if ("ADRFSPMNAT".equals(codeString)) + return V3ActCode.ADRFSPMNAT; + if ("ADRFSPMNCT".equals(codeString)) + return V3ActCode.ADRFSPMNCT; + if ("_InvoiceElementPaid".equals(codeString)) + return V3ActCode._INVOICEELEMENTPAID; + if ("PDNFPPELAT".equals(codeString)) + return V3ActCode.PDNFPPELAT; + if ("PDNFPPELCT".equals(codeString)) + return V3ActCode.PDNFPPELCT; + if ("PDNFPPMNAT".equals(codeString)) + return V3ActCode.PDNFPPMNAT; + if ("PDNFPPMNCT".equals(codeString)) + return V3ActCode.PDNFPPMNCT; + if ("PDNFSPELAT".equals(codeString)) + return V3ActCode.PDNFSPELAT; + if ("PDNFSPELCT".equals(codeString)) + return V3ActCode.PDNFSPELCT; + if ("PDNFSPMNAT".equals(codeString)) + return V3ActCode.PDNFSPMNAT; + if ("PDNFSPMNCT".equals(codeString)) + return V3ActCode.PDNFSPMNCT; + if ("PDNPPPELAT".equals(codeString)) + return V3ActCode.PDNPPPELAT; + if ("PDNPPPELCT".equals(codeString)) + return V3ActCode.PDNPPPELCT; + if ("PDNPPPMNAT".equals(codeString)) + return V3ActCode.PDNPPPMNAT; + if ("PDNPPPMNCT".equals(codeString)) + return V3ActCode.PDNPPPMNCT; + if ("PDNPSPELAT".equals(codeString)) + return V3ActCode.PDNPSPELAT; + if ("PDNPSPELCT".equals(codeString)) + return V3ActCode.PDNPSPELCT; + if ("PDNPSPMNAT".equals(codeString)) + return V3ActCode.PDNPSPMNAT; + if ("PDNPSPMNCT".equals(codeString)) + return V3ActCode.PDNPSPMNCT; + if ("PDPPPPELAT".equals(codeString)) + return V3ActCode.PDPPPPELAT; + if ("PDPPPPELCT".equals(codeString)) + return V3ActCode.PDPPPPELCT; + if ("PDPPPPMNAT".equals(codeString)) + return V3ActCode.PDPPPPMNAT; + if ("PDPPPPMNCT".equals(codeString)) + return V3ActCode.PDPPPPMNCT; + if ("PDPPSPELAT".equals(codeString)) + return V3ActCode.PDPPSPELAT; + if ("PDPPSPELCT".equals(codeString)) + return V3ActCode.PDPPSPELCT; + if ("PDPPSPMNAT".equals(codeString)) + return V3ActCode.PDPPSPMNAT; + if ("PDPPSPMNCT".equals(codeString)) + return V3ActCode.PDPPSPMNCT; + if ("_InvoiceElementSubmitted".equals(codeString)) + return V3ActCode._INVOICEELEMENTSUBMITTED; + if ("SBBLELAT".equals(codeString)) + return V3ActCode.SBBLELAT; + if ("SBBLELCT".equals(codeString)) + return V3ActCode.SBBLELCT; + if ("SBNFELAT".equals(codeString)) + return V3ActCode.SBNFELAT; + if ("SBNFELCT".equals(codeString)) + return V3ActCode.SBNFELCT; + if ("SBPDELAT".equals(codeString)) + return V3ActCode.SBPDELAT; + if ("SBPDELCT".equals(codeString)) + return V3ActCode.SBPDELCT; + if ("_ActInvoiceOverrideCode".equals(codeString)) + return V3ActCode._ACTINVOICEOVERRIDECODE; + if ("COVGE".equals(codeString)) + return V3ActCode.COVGE; + if ("EFORM".equals(codeString)) + return V3ActCode.EFORM; + if ("FAX".equals(codeString)) + return V3ActCode.FAX; + if ("GFTH".equals(codeString)) + return V3ActCode.GFTH; + if ("LATE".equals(codeString)) + return V3ActCode.LATE; + if ("MANUAL".equals(codeString)) + return V3ActCode.MANUAL; + if ("OOJ".equals(codeString)) + return V3ActCode.OOJ; + if ("ORTHO".equals(codeString)) + return V3ActCode.ORTHO; + if ("PAPER".equals(codeString)) + return V3ActCode.PAPER; + if ("PIE".equals(codeString)) + return V3ActCode.PIE; + if ("PYRDELAY".equals(codeString)) + return V3ActCode.PYRDELAY; + if ("REFNR".equals(codeString)) + return V3ActCode.REFNR; + if ("REPSERV".equals(codeString)) + return V3ActCode.REPSERV; + if ("UNRELAT".equals(codeString)) + return V3ActCode.UNRELAT; + if ("VERBAUTH".equals(codeString)) + return V3ActCode.VERBAUTH; + if ("_ActListCode".equals(codeString)) + return V3ActCode._ACTLISTCODE; + if ("_ActObservationList".equals(codeString)) + return V3ActCode._ACTOBSERVATIONLIST; + if ("CARELIST".equals(codeString)) + return V3ActCode.CARELIST; + if ("CONDLIST".equals(codeString)) + return V3ActCode.CONDLIST; + if ("INTOLIST".equals(codeString)) + return V3ActCode.INTOLIST; + if ("PROBLIST".equals(codeString)) + return V3ActCode.PROBLIST; + if ("RISKLIST".equals(codeString)) + return V3ActCode.RISKLIST; + if ("GOALLIST".equals(codeString)) + return V3ActCode.GOALLIST; + if ("_ActTherapyDurationWorkingListCode".equals(codeString)) + return V3ActCode._ACTTHERAPYDURATIONWORKINGLISTCODE; + if ("_ActMedicationTherapyDurationWorkingListCode".equals(codeString)) + return V3ActCode._ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE; + if ("ACU".equals(codeString)) + return V3ActCode.ACU; + if ("CHRON".equals(codeString)) + return V3ActCode.CHRON; + if ("ONET".equals(codeString)) + return V3ActCode.ONET; + if ("PRN".equals(codeString)) + return V3ActCode.PRN; + if ("MEDLIST".equals(codeString)) + return V3ActCode.MEDLIST; + if ("CURMEDLIST".equals(codeString)) + return V3ActCode.CURMEDLIST; + if ("DISCMEDLIST".equals(codeString)) + return V3ActCode.DISCMEDLIST; + if ("HISTMEDLIST".equals(codeString)) + return V3ActCode.HISTMEDLIST; + if ("_ActMonitoringProtocolCode".equals(codeString)) + return V3ActCode._ACTMONITORINGPROTOCOLCODE; + if ("CTLSUB".equals(codeString)) + return V3ActCode.CTLSUB; + if ("INV".equals(codeString)) + return V3ActCode.INV; + if ("LU".equals(codeString)) + return V3ActCode.LU; + if ("OTC".equals(codeString)) + return V3ActCode.OTC; + if ("RX".equals(codeString)) + return V3ActCode.RX; + if ("SA".equals(codeString)) + return V3ActCode.SA; + if ("SAC".equals(codeString)) + return V3ActCode.SAC; + if ("_ActNonObservationIndicationCode".equals(codeString)) + return V3ActCode._ACTNONOBSERVATIONINDICATIONCODE; + if ("IND01".equals(codeString)) + return V3ActCode.IND01; + if ("IND02".equals(codeString)) + return V3ActCode.IND02; + if ("IND03".equals(codeString)) + return V3ActCode.IND03; + if ("IND04".equals(codeString)) + return V3ActCode.IND04; + if ("IND05".equals(codeString)) + return V3ActCode.IND05; + if ("_ActObservationVerificationType".equals(codeString)) + return V3ActCode._ACTOBSERVATIONVERIFICATIONTYPE; + if ("VFPAPER".equals(codeString)) + return V3ActCode.VFPAPER; + if ("_ActPaymentCode".equals(codeString)) + return V3ActCode._ACTPAYMENTCODE; + if ("ACH".equals(codeString)) + return V3ActCode.ACH; + if ("CHK".equals(codeString)) + return V3ActCode.CHK; + if ("DDP".equals(codeString)) + return V3ActCode.DDP; + if ("NON".equals(codeString)) + return V3ActCode.NON; + if ("_ActPharmacySupplyType".equals(codeString)) + return V3ActCode._ACTPHARMACYSUPPLYTYPE; + if ("DF".equals(codeString)) + return V3ActCode.DF; + if ("EM".equals(codeString)) + return V3ActCode.EM; + if ("SO".equals(codeString)) + return V3ActCode.SO; + if ("FF".equals(codeString)) + return V3ActCode.FF; + if ("FFC".equals(codeString)) + return V3ActCode.FFC; + if ("FFP".equals(codeString)) + return V3ActCode.FFP; + if ("FFSS".equals(codeString)) + return V3ActCode.FFSS; + if ("TF".equals(codeString)) + return V3ActCode.TF; + if ("FS".equals(codeString)) + return V3ActCode.FS; + if ("MS".equals(codeString)) + return V3ActCode.MS; + if ("RF".equals(codeString)) + return V3ActCode.RF; + if ("UD".equals(codeString)) + return V3ActCode.UD; + if ("RFC".equals(codeString)) + return V3ActCode.RFC; + if ("RFCS".equals(codeString)) + return V3ActCode.RFCS; + if ("RFF".equals(codeString)) + return V3ActCode.RFF; + if ("RFFS".equals(codeString)) + return V3ActCode.RFFS; + if ("RFP".equals(codeString)) + return V3ActCode.RFP; + if ("RFPS".equals(codeString)) + return V3ActCode.RFPS; + if ("RFS".equals(codeString)) + return V3ActCode.RFS; + if ("TB".equals(codeString)) + return V3ActCode.TB; + if ("TBS".equals(codeString)) + return V3ActCode.TBS; + if ("UDE".equals(codeString)) + return V3ActCode.UDE; + if ("_ActPolicyType".equals(codeString)) + return V3ActCode._ACTPOLICYTYPE; + if ("_ActPrivacyPolicy".equals(codeString)) + return V3ActCode._ACTPRIVACYPOLICY; + if ("_ActConsentDirective".equals(codeString)) + return V3ActCode._ACTCONSENTDIRECTIVE; + if ("EMRGONLY".equals(codeString)) + return V3ActCode.EMRGONLY; + if ("GRANTORCHOICE".equals(codeString)) + return V3ActCode.GRANTORCHOICE; + if ("IMPLIED".equals(codeString)) + return V3ActCode.IMPLIED; + if ("IMPLIEDD".equals(codeString)) + return V3ActCode.IMPLIEDD; + if ("NOCONSENT".equals(codeString)) + return V3ActCode.NOCONSENT; + if ("NOPP".equals(codeString)) + return V3ActCode.NOPP; + if ("OPTIN".equals(codeString)) + return V3ActCode.OPTIN; + if ("OPTINR".equals(codeString)) + return V3ActCode.OPTINR; + if ("OPTOUT".equals(codeString)) + return V3ActCode.OPTOUT; + if ("OPTOUTE".equals(codeString)) + return V3ActCode.OPTOUTE; + if ("_ActPrivacyLaw".equals(codeString)) + return V3ActCode._ACTPRIVACYLAW; + if ("_ActUSPrivacyLaw".equals(codeString)) + return V3ActCode._ACTUSPRIVACYLAW; + if ("42CFRPart2".equals(codeString)) + return V3ActCode._42CFRPART2; + if ("CommonRule".equals(codeString)) + return V3ActCode.COMMONRULE; + if ("HIPAANOPP".equals(codeString)) + return V3ActCode.HIPAANOPP; + if ("HIPAAPsyNotes".equals(codeString)) + return V3ActCode.HIPAAPSYNOTES; + if ("HIPAASelfPay".equals(codeString)) + return V3ActCode.HIPAASELFPAY; + if ("Title38Section7332".equals(codeString)) + return V3ActCode.TITLE38SECTION7332; + if ("_InformationSensitivityPolicy".equals(codeString)) + return V3ActCode._INFORMATIONSENSITIVITYPOLICY; + if ("_ActInformationSensitivityPolicy".equals(codeString)) + return V3ActCode._ACTINFORMATIONSENSITIVITYPOLICY; + if ("ETH".equals(codeString)) + return V3ActCode.ETH; + if ("GDIS".equals(codeString)) + return V3ActCode.GDIS; + if ("HIV".equals(codeString)) + return V3ActCode.HIV; + if ("PSY".equals(codeString)) + return V3ActCode.PSY; + if ("SCA".equals(codeString)) + return V3ActCode.SCA; + if ("SOC".equals(codeString)) + return V3ActCode.SOC; + if ("SDV".equals(codeString)) + return V3ActCode.SDV; + if ("SEX".equals(codeString)) + return V3ActCode.SEX; + if ("STD".equals(codeString)) + return V3ActCode.STD; + if ("TBOO".equals(codeString)) + return V3ActCode.TBOO; + if ("SICKLE".equals(codeString)) + return V3ActCode.SICKLE; + if ("_EntitySensitivityPolicyType".equals(codeString)) + return V3ActCode._ENTITYSENSITIVITYPOLICYTYPE; + if ("DEMO".equals(codeString)) + return V3ActCode.DEMO; + if ("DOB".equals(codeString)) + return V3ActCode.DOB; + if ("GENDER".equals(codeString)) + return V3ActCode.GENDER; + if ("LIVARG".equals(codeString)) + return V3ActCode.LIVARG; + if ("MARST".equals(codeString)) + return V3ActCode.MARST; + if ("RACE".equals(codeString)) + return V3ActCode.RACE; + if ("REL".equals(codeString)) + return V3ActCode.REL; + if ("_RoleInformationSensitivityPolicy".equals(codeString)) + return V3ActCode._ROLEINFORMATIONSENSITIVITYPOLICY; + if ("B".equals(codeString)) + return V3ActCode.B; + if ("EMPL".equals(codeString)) + return V3ActCode.EMPL; + if ("LOCIS".equals(codeString)) + return V3ActCode.LOCIS; + if ("SSP".equals(codeString)) + return V3ActCode.SSP; + if ("ADOL".equals(codeString)) + return V3ActCode.ADOL; + if ("CEL".equals(codeString)) + return V3ActCode.CEL; + if ("DIA".equals(codeString)) + return V3ActCode.DIA; + if ("DRGIS".equals(codeString)) + return V3ActCode.DRGIS; + if ("EMP".equals(codeString)) + return V3ActCode.EMP; + if ("PDS".equals(codeString)) + return V3ActCode.PDS; + if ("PRS".equals(codeString)) + return V3ActCode.PRS; + if ("COMPT".equals(codeString)) + return V3ActCode.COMPT; + if ("ACOCOMPT".equals(codeString)) + return V3ActCode.ACOCOMPT; + if ("CTCOMPT".equals(codeString)) + return V3ActCode.CTCOMPT; + if ("FMCOMPT".equals(codeString)) + return V3ActCode.FMCOMPT; + if ("HRCOMPT".equals(codeString)) + return V3ActCode.HRCOMPT; + if ("LRCOMPT".equals(codeString)) + return V3ActCode.LRCOMPT; + if ("PACOMPT".equals(codeString)) + return V3ActCode.PACOMPT; + if ("RESCOMPT".equals(codeString)) + return V3ActCode.RESCOMPT; + if ("RMGTCOMPT".equals(codeString)) + return V3ActCode.RMGTCOMPT; + if ("ActTrustPolicyType".equals(codeString)) + return V3ActCode.ACTTRUSTPOLICYTYPE; + if ("TRSTACCRD".equals(codeString)) + return V3ActCode.TRSTACCRD; + if ("TRSTAGRE".equals(codeString)) + return V3ActCode.TRSTAGRE; + if ("TRSTASSUR".equals(codeString)) + return V3ActCode.TRSTASSUR; + if ("TRSTCERT".equals(codeString)) + return V3ActCode.TRSTCERT; + if ("TRSTFWK".equals(codeString)) + return V3ActCode.TRSTFWK; + if ("TRSTMEC".equals(codeString)) + return V3ActCode.TRSTMEC; + if ("COVPOL".equals(codeString)) + return V3ActCode.COVPOL; + if ("SecurityPolicy".equals(codeString)) + return V3ActCode.SECURITYPOLICY; + if ("ObligationPolicy".equals(codeString)) + return V3ActCode.OBLIGATIONPOLICY; + if ("ANONY".equals(codeString)) + return V3ActCode.ANONY; + if ("AOD".equals(codeString)) + return V3ActCode.AOD; + if ("AUDIT".equals(codeString)) + return V3ActCode.AUDIT; + if ("AUDTR".equals(codeString)) + return V3ActCode.AUDTR; + if ("CPLYCC".equals(codeString)) + return V3ActCode.CPLYCC; + if ("CPLYCD".equals(codeString)) + return V3ActCode.CPLYCD; + if ("CPLYJPP".equals(codeString)) + return V3ActCode.CPLYJPP; + if ("CPLYOPP".equals(codeString)) + return V3ActCode.CPLYOPP; + if ("CPLYOSP".equals(codeString)) + return V3ActCode.CPLYOSP; + if ("CPLYPOL".equals(codeString)) + return V3ActCode.CPLYPOL; + if ("DECLASSIFYLABEL".equals(codeString)) + return V3ActCode.DECLASSIFYLABEL; + if ("DEID".equals(codeString)) + return V3ActCode.DEID; + if ("DELAU".equals(codeString)) + return V3ActCode.DELAU; + if ("DOWNGRDLABEL".equals(codeString)) + return V3ActCode.DOWNGRDLABEL; + if ("DRIVLABEL".equals(codeString)) + return V3ActCode.DRIVLABEL; + if ("ENCRYPT".equals(codeString)) + return V3ActCode.ENCRYPT; + if ("ENCRYPTR".equals(codeString)) + return V3ActCode.ENCRYPTR; + if ("ENCRYPTT".equals(codeString)) + return V3ActCode.ENCRYPTT; + if ("ENCRYPTU".equals(codeString)) + return V3ActCode.ENCRYPTU; + if ("HUAPRV".equals(codeString)) + return V3ActCode.HUAPRV; + if ("LABEL".equals(codeString)) + return V3ActCode.LABEL; + if ("MASK".equals(codeString)) + return V3ActCode.MASK; + if ("MINEC".equals(codeString)) + return V3ActCode.MINEC; + if ("PERSISTLABEL".equals(codeString)) + return V3ActCode.PERSISTLABEL; + if ("PRIVMARK".equals(codeString)) + return V3ActCode.PRIVMARK; + if ("PSEUD".equals(codeString)) + return V3ActCode.PSEUD; + if ("REDACT".equals(codeString)) + return V3ActCode.REDACT; + if ("UPGRDLABEL".equals(codeString)) + return V3ActCode.UPGRDLABEL; + if ("RefrainPolicy".equals(codeString)) + return V3ActCode.REFRAINPOLICY; + if ("NOAUTH".equals(codeString)) + return V3ActCode.NOAUTH; + if ("NOCOLLECT".equals(codeString)) + return V3ActCode.NOCOLLECT; + if ("NODSCLCD".equals(codeString)) + return V3ActCode.NODSCLCD; + if ("NODSCLCDS".equals(codeString)) + return V3ActCode.NODSCLCDS; + if ("NOINTEGRATE".equals(codeString)) + return V3ActCode.NOINTEGRATE; + if ("NOLIST".equals(codeString)) + return V3ActCode.NOLIST; + if ("NOMOU".equals(codeString)) + return V3ActCode.NOMOU; + if ("NOORGPOL".equals(codeString)) + return V3ActCode.NOORGPOL; + if ("NOPAT".equals(codeString)) + return V3ActCode.NOPAT; + if ("NOPERSISTP".equals(codeString)) + return V3ActCode.NOPERSISTP; + if ("NORDSCLCD".equals(codeString)) + return V3ActCode.NORDSCLCD; + if ("NORDSCLCDS".equals(codeString)) + return V3ActCode.NORDSCLCDS; + if ("NORDSCLW".equals(codeString)) + return V3ActCode.NORDSCLW; + if ("NORELINK".equals(codeString)) + return V3ActCode.NORELINK; + if ("NOREUSE".equals(codeString)) + return V3ActCode.NOREUSE; + if ("NOVIP".equals(codeString)) + return V3ActCode.NOVIP; + if ("ORCON".equals(codeString)) + return V3ActCode.ORCON; + if ("_ActProductAcquisitionCode".equals(codeString)) + return V3ActCode._ACTPRODUCTACQUISITIONCODE; + if ("LOAN".equals(codeString)) + return V3ActCode.LOAN; + if ("RENT".equals(codeString)) + return V3ActCode.RENT; + if ("TRANSFER".equals(codeString)) + return V3ActCode.TRANSFER; + if ("SALE".equals(codeString)) + return V3ActCode.SALE; + if ("_ActSpecimenTransportCode".equals(codeString)) + return V3ActCode._ACTSPECIMENTRANSPORTCODE; + if ("SREC".equals(codeString)) + return V3ActCode.SREC; + if ("SSTOR".equals(codeString)) + return V3ActCode.SSTOR; + if ("STRAN".equals(codeString)) + return V3ActCode.STRAN; + if ("_ActSpecimenTreatmentCode".equals(codeString)) + return V3ActCode._ACTSPECIMENTREATMENTCODE; + if ("ACID".equals(codeString)) + return V3ActCode.ACID; + if ("ALK".equals(codeString)) + return V3ActCode.ALK; + if ("DEFB".equals(codeString)) + return V3ActCode.DEFB; + if ("FILT".equals(codeString)) + return V3ActCode.FILT; + if ("LDLP".equals(codeString)) + return V3ActCode.LDLP; + if ("NEUT".equals(codeString)) + return V3ActCode.NEUT; + if ("RECA".equals(codeString)) + return V3ActCode.RECA; + if ("UFIL".equals(codeString)) + return V3ActCode.UFIL; + if ("_ActSubstanceAdministrationCode".equals(codeString)) + return V3ActCode._ACTSUBSTANCEADMINISTRATIONCODE; + if ("DRUG".equals(codeString)) + return V3ActCode.DRUG; + if ("FD".equals(codeString)) + return V3ActCode.FD; + if ("IMMUNIZ".equals(codeString)) + return V3ActCode.IMMUNIZ; + if ("BOOSTER".equals(codeString)) + return V3ActCode.BOOSTER; + if ("INITIMMUNIZ".equals(codeString)) + return V3ActCode.INITIMMUNIZ; + if ("_ActTaskCode".equals(codeString)) + return V3ActCode._ACTTASKCODE; + if ("OE".equals(codeString)) + return V3ActCode.OE; + if ("LABOE".equals(codeString)) + return V3ActCode.LABOE; + if ("MEDOE".equals(codeString)) + return V3ActCode.MEDOE; + if ("PATDOC".equals(codeString)) + return V3ActCode.PATDOC; + if ("ALLERLREV".equals(codeString)) + return V3ActCode.ALLERLREV; + if ("CLINNOTEE".equals(codeString)) + return V3ActCode.CLINNOTEE; + if ("DIAGLISTE".equals(codeString)) + return V3ActCode.DIAGLISTE; + if ("DISCHINSTE".equals(codeString)) + return V3ActCode.DISCHINSTE; + if ("DISCHSUME".equals(codeString)) + return V3ActCode.DISCHSUME; + if ("PATEDUE".equals(codeString)) + return V3ActCode.PATEDUE; + if ("PATREPE".equals(codeString)) + return V3ActCode.PATREPE; + if ("PROBLISTE".equals(codeString)) + return V3ActCode.PROBLISTE; + if ("RADREPE".equals(codeString)) + return V3ActCode.RADREPE; + if ("IMMLREV".equals(codeString)) + return V3ActCode.IMMLREV; + if ("REMLREV".equals(codeString)) + return V3ActCode.REMLREV; + if ("WELLREMLREV".equals(codeString)) + return V3ActCode.WELLREMLREV; + if ("PATINFO".equals(codeString)) + return V3ActCode.PATINFO; + if ("ALLERLE".equals(codeString)) + return V3ActCode.ALLERLE; + if ("CDSREV".equals(codeString)) + return V3ActCode.CDSREV; + if ("CLINNOTEREV".equals(codeString)) + return V3ActCode.CLINNOTEREV; + if ("DISCHSUMREV".equals(codeString)) + return V3ActCode.DISCHSUMREV; + if ("DIAGLISTREV".equals(codeString)) + return V3ActCode.DIAGLISTREV; + if ("IMMLE".equals(codeString)) + return V3ActCode.IMMLE; + if ("LABRREV".equals(codeString)) + return V3ActCode.LABRREV; + if ("MICRORREV".equals(codeString)) + return V3ActCode.MICRORREV; + if ("MICROORGRREV".equals(codeString)) + return V3ActCode.MICROORGRREV; + if ("MICROSENSRREV".equals(codeString)) + return V3ActCode.MICROSENSRREV; + if ("MLREV".equals(codeString)) + return V3ActCode.MLREV; + if ("MARWLREV".equals(codeString)) + return V3ActCode.MARWLREV; + if ("OREV".equals(codeString)) + return V3ActCode.OREV; + if ("PATREPREV".equals(codeString)) + return V3ActCode.PATREPREV; + if ("PROBLISTREV".equals(codeString)) + return V3ActCode.PROBLISTREV; + if ("RADREPREV".equals(codeString)) + return V3ActCode.RADREPREV; + if ("REMLE".equals(codeString)) + return V3ActCode.REMLE; + if ("WELLREMLE".equals(codeString)) + return V3ActCode.WELLREMLE; + if ("RISKASSESS".equals(codeString)) + return V3ActCode.RISKASSESS; + if ("FALLRISK".equals(codeString)) + return V3ActCode.FALLRISK; + if ("_ActTransportationModeCode".equals(codeString)) + return V3ActCode._ACTTRANSPORTATIONMODECODE; + if ("_ActPatientTransportationModeCode".equals(codeString)) + return V3ActCode._ACTPATIENTTRANSPORTATIONMODECODE; + if ("AFOOT".equals(codeString)) + return V3ActCode.AFOOT; + if ("AMBT".equals(codeString)) + return V3ActCode.AMBT; + if ("AMBAIR".equals(codeString)) + return V3ActCode.AMBAIR; + if ("AMBGRND".equals(codeString)) + return V3ActCode.AMBGRND; + if ("AMBHELO".equals(codeString)) + return V3ActCode.AMBHELO; + if ("LAWENF".equals(codeString)) + return V3ActCode.LAWENF; + if ("PRVTRN".equals(codeString)) + return V3ActCode.PRVTRN; + if ("PUBTRN".equals(codeString)) + return V3ActCode.PUBTRN; + if ("_ObservationType".equals(codeString)) + return V3ActCode._OBSERVATIONTYPE; + if ("_ActSpecObsCode".equals(codeString)) + return V3ActCode._ACTSPECOBSCODE; + if ("ARTBLD".equals(codeString)) + return V3ActCode.ARTBLD; + if ("DILUTION".equals(codeString)) + return V3ActCode.DILUTION; + if ("AUTO-HIGH".equals(codeString)) + return V3ActCode.AUTOHIGH; + if ("AUTO-LOW".equals(codeString)) + return V3ActCode.AUTOLOW; + if ("PRE".equals(codeString)) + return V3ActCode.PRE; + if ("RERUN".equals(codeString)) + return V3ActCode.RERUN; + if ("EVNFCTS".equals(codeString)) + return V3ActCode.EVNFCTS; + if ("INTFR".equals(codeString)) + return V3ActCode.INTFR; + if ("FIBRIN".equals(codeString)) + return V3ActCode.FIBRIN; + if ("HEMOLYSIS".equals(codeString)) + return V3ActCode.HEMOLYSIS; + if ("ICTERUS".equals(codeString)) + return V3ActCode.ICTERUS; + if ("LIPEMIA".equals(codeString)) + return V3ActCode.LIPEMIA; + if ("VOLUME".equals(codeString)) + return V3ActCode.VOLUME; + if ("AVAILABLE".equals(codeString)) + return V3ActCode.AVAILABLE; + if ("CONSUMPTION".equals(codeString)) + return V3ActCode.CONSUMPTION; + if ("CURRENT".equals(codeString)) + return V3ActCode.CURRENT; + if ("INITIAL".equals(codeString)) + return V3ActCode.INITIAL; + if ("_AnnotationType".equals(codeString)) + return V3ActCode._ANNOTATIONTYPE; + if ("_ActPatientAnnotationType".equals(codeString)) + return V3ActCode._ACTPATIENTANNOTATIONTYPE; + if ("ANNDI".equals(codeString)) + return V3ActCode.ANNDI; + if ("ANNGEN".equals(codeString)) + return V3ActCode.ANNGEN; + if ("ANNIMM".equals(codeString)) + return V3ActCode.ANNIMM; + if ("ANNLAB".equals(codeString)) + return V3ActCode.ANNLAB; + if ("ANNMED".equals(codeString)) + return V3ActCode.ANNMED; + if ("_GeneticObservationType".equals(codeString)) + return V3ActCode._GENETICOBSERVATIONTYPE; + if ("GENE".equals(codeString)) + return V3ActCode.GENE; + if ("_ImmunizationObservationType".equals(codeString)) + return V3ActCode._IMMUNIZATIONOBSERVATIONTYPE; + if ("OBSANTC".equals(codeString)) + return V3ActCode.OBSANTC; + if ("OBSANTV".equals(codeString)) + return V3ActCode.OBSANTV; + if ("_IndividualCaseSafetyReportType".equals(codeString)) + return V3ActCode._INDIVIDUALCASESAFETYREPORTTYPE; + if ("PAT_ADV_EVNT".equals(codeString)) + return V3ActCode.PATADVEVNT; + if ("VAC_PROBLEM".equals(codeString)) + return V3ActCode.VACPROBLEM; + if ("_LOINCObservationActContextAgeType".equals(codeString)) + return V3ActCode._LOINCOBSERVATIONACTCONTEXTAGETYPE; + if ("21611-9".equals(codeString)) + return V3ActCode._216119; + if ("21612-7".equals(codeString)) + return V3ActCode._216127; + if ("29553-5".equals(codeString)) + return V3ActCode._295535; + if ("30525-0".equals(codeString)) + return V3ActCode._305250; + if ("30972-4".equals(codeString)) + return V3ActCode._309724; + if ("_MedicationObservationType".equals(codeString)) + return V3ActCode._MEDICATIONOBSERVATIONTYPE; + if ("REP_HALF_LIFE".equals(codeString)) + return V3ActCode.REPHALFLIFE; + if ("SPLCOATING".equals(codeString)) + return V3ActCode.SPLCOATING; + if ("SPLCOLOR".equals(codeString)) + return V3ActCode.SPLCOLOR; + if ("SPLIMAGE".equals(codeString)) + return V3ActCode.SPLIMAGE; + if ("SPLIMPRINT".equals(codeString)) + return V3ActCode.SPLIMPRINT; + if ("SPLSCORING".equals(codeString)) + return V3ActCode.SPLSCORING; + if ("SPLSHAPE".equals(codeString)) + return V3ActCode.SPLSHAPE; + if ("SPLSIZE".equals(codeString)) + return V3ActCode.SPLSIZE; + if ("SPLSYMBOL".equals(codeString)) + return V3ActCode.SPLSYMBOL; + if ("_ObservationIssueTriggerCodedObservationType".equals(codeString)) + return V3ActCode._OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE; + if ("_CaseTransmissionMode".equals(codeString)) + return V3ActCode._CASETRANSMISSIONMODE; + if ("AIRTRNS".equals(codeString)) + return V3ActCode.AIRTRNS; + if ("ANANTRNS".equals(codeString)) + return V3ActCode.ANANTRNS; + if ("ANHUMTRNS".equals(codeString)) + return V3ActCode.ANHUMTRNS; + if ("BDYFLDTRNS".equals(codeString)) + return V3ActCode.BDYFLDTRNS; + if ("BLDTRNS".equals(codeString)) + return V3ActCode.BLDTRNS; + if ("DERMTRNS".equals(codeString)) + return V3ActCode.DERMTRNS; + if ("ENVTRNS".equals(codeString)) + return V3ActCode.ENVTRNS; + if ("FECTRNS".equals(codeString)) + return V3ActCode.FECTRNS; + if ("FOMTRNS".equals(codeString)) + return V3ActCode.FOMTRNS; + if ("FOODTRNS".equals(codeString)) + return V3ActCode.FOODTRNS; + if ("HUMHUMTRNS".equals(codeString)) + return V3ActCode.HUMHUMTRNS; + if ("INDTRNS".equals(codeString)) + return V3ActCode.INDTRNS; + if ("LACTTRNS".equals(codeString)) + return V3ActCode.LACTTRNS; + if ("NOSTRNS".equals(codeString)) + return V3ActCode.NOSTRNS; + if ("PARTRNS".equals(codeString)) + return V3ActCode.PARTRNS; + if ("PLACTRNS".equals(codeString)) + return V3ActCode.PLACTRNS; + if ("SEXTRNS".equals(codeString)) + return V3ActCode.SEXTRNS; + if ("TRNSFTRNS".equals(codeString)) + return V3ActCode.TRNSFTRNS; + if ("VECTRNS".equals(codeString)) + return V3ActCode.VECTRNS; + if ("WATTRNS".equals(codeString)) + return V3ActCode.WATTRNS; + if ("_ObservationQualityMeasureAttribute".equals(codeString)) + return V3ActCode._OBSERVATIONQUALITYMEASUREATTRIBUTE; + if ("AGGREGATE".equals(codeString)) + return V3ActCode.AGGREGATE; + if ("CMPMSRMTH".equals(codeString)) + return V3ActCode.CMPMSRMTH; + if ("CMPMSRSCRWGHT".equals(codeString)) + return V3ActCode.CMPMSRSCRWGHT; + if ("COPY".equals(codeString)) + return V3ActCode.COPY; + if ("CRS".equals(codeString)) + return V3ActCode.CRS; + if ("DEF".equals(codeString)) + return V3ActCode.DEF; + if ("DISC".equals(codeString)) + return V3ActCode.DISC; + if ("FINALDT".equals(codeString)) + return V3ActCode.FINALDT; + if ("GUIDE".equals(codeString)) + return V3ActCode.GUIDE; + if ("IDUR".equals(codeString)) + return V3ActCode.IDUR; + if ("ITMCNT".equals(codeString)) + return V3ActCode.ITMCNT; + if ("KEY".equals(codeString)) + return V3ActCode.KEY; + if ("MEDT".equals(codeString)) + return V3ActCode.MEDT; + if ("MSD".equals(codeString)) + return V3ActCode.MSD; + if ("MSRADJ".equals(codeString)) + return V3ActCode.MSRADJ; + if ("MSRAGG".equals(codeString)) + return V3ActCode.MSRAGG; + if ("MSRIMPROV".equals(codeString)) + return V3ActCode.MSRIMPROV; + if ("MSRJUR".equals(codeString)) + return V3ActCode.MSRJUR; + if ("MSRRPTR".equals(codeString)) + return V3ActCode.MSRRPTR; + if ("MSRRPTTIME".equals(codeString)) + return V3ActCode.MSRRPTTIME; + if ("MSRSCORE".equals(codeString)) + return V3ActCode.MSRSCORE; + if ("MSRSET".equals(codeString)) + return V3ActCode.MSRSET; + if ("MSRTOPIC".equals(codeString)) + return V3ActCode.MSRTOPIC; + if ("MSRTP".equals(codeString)) + return V3ActCode.MSRTP; + if ("MSRTYPE".equals(codeString)) + return V3ActCode.MSRTYPE; + if ("RAT".equals(codeString)) + return V3ActCode.RAT; + if ("REF".equals(codeString)) + return V3ActCode.REF; + if ("SDE".equals(codeString)) + return V3ActCode.SDE; + if ("STRAT".equals(codeString)) + return V3ActCode.STRAT; + if ("TRANF".equals(codeString)) + return V3ActCode.TRANF; + if ("USE".equals(codeString)) + return V3ActCode.USE; + if ("_ObservationSequenceType".equals(codeString)) + return V3ActCode._OBSERVATIONSEQUENCETYPE; + if ("TIME_ABSOLUTE".equals(codeString)) + return V3ActCode.TIMEABSOLUTE; + if ("TIME_RELATIVE".equals(codeString)) + return V3ActCode.TIMERELATIVE; + if ("_ObservationSeriesType".equals(codeString)) + return V3ActCode._OBSERVATIONSERIESTYPE; + if ("_ECGObservationSeriesType".equals(codeString)) + return V3ActCode._ECGOBSERVATIONSERIESTYPE; + if ("REPRESENTATIVE_BEAT".equals(codeString)) + return V3ActCode.REPRESENTATIVEBEAT; + if ("RHYTHM".equals(codeString)) + return V3ActCode.RHYTHM; + if ("_PatientImmunizationRelatedObservationType".equals(codeString)) + return V3ActCode._PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE; + if ("CLSSRM".equals(codeString)) + return V3ActCode.CLSSRM; + if ("GRADE".equals(codeString)) + return V3ActCode.GRADE; + if ("SCHL".equals(codeString)) + return V3ActCode.SCHL; + if ("SCHLDIV".equals(codeString)) + return V3ActCode.SCHLDIV; + if ("TEACHER".equals(codeString)) + return V3ActCode.TEACHER; + if ("_PopulationInclusionObservationType".equals(codeString)) + return V3ActCode._POPULATIONINCLUSIONOBSERVATIONTYPE; + if ("DENEX".equals(codeString)) + return V3ActCode.DENEX; + if ("DENEXCEP".equals(codeString)) + return V3ActCode.DENEXCEP; + if ("DENOM".equals(codeString)) + return V3ActCode.DENOM; + if ("IPOP".equals(codeString)) + return V3ActCode.IPOP; + if ("IPPOP".equals(codeString)) + return V3ActCode.IPPOP; + if ("MSRPOPL".equals(codeString)) + return V3ActCode.MSRPOPL; + if ("MSRPOPLEX".equals(codeString)) + return V3ActCode.MSRPOPLEX; + if ("NUMER".equals(codeString)) + return V3ActCode.NUMER; + if ("NUMEX".equals(codeString)) + return V3ActCode.NUMEX; + if ("_PreferenceObservationType".equals(codeString)) + return V3ActCode._PREFERENCEOBSERVATIONTYPE; + if ("PREFSTRENGTH".equals(codeString)) + return V3ActCode.PREFSTRENGTH; + if ("ADVERSE_REACTION".equals(codeString)) + return V3ActCode.ADVERSEREACTION; + if ("ASSERTION".equals(codeString)) + return V3ActCode.ASSERTION; + if ("CASESER".equals(codeString)) + return V3ActCode.CASESER; + if ("CDIO".equals(codeString)) + return V3ActCode.CDIO; + if ("CRIT".equals(codeString)) + return V3ActCode.CRIT; + if ("CTMO".equals(codeString)) + return V3ActCode.CTMO; + if ("DX".equals(codeString)) + return V3ActCode.DX; + if ("ADMDX".equals(codeString)) + return V3ActCode.ADMDX; + if ("DISDX".equals(codeString)) + return V3ActCode.DISDX; + if ("INTDX".equals(codeString)) + return V3ActCode.INTDX; + if ("NOI".equals(codeString)) + return V3ActCode.NOI; + if ("GISTIER".equals(codeString)) + return V3ActCode.GISTIER; + if ("HHOBS".equals(codeString)) + return V3ActCode.HHOBS; + if ("ISSUE".equals(codeString)) + return V3ActCode.ISSUE; + if ("_ActAdministrativeDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVEDETECTEDISSUECODE; + if ("_ActAdministrativeAuthorizationDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE; + if ("NAT".equals(codeString)) + return V3ActCode.NAT; + if ("SUPPRESSED".equals(codeString)) + return V3ActCode.SUPPRESSED; + if ("VALIDAT".equals(codeString)) + return V3ActCode.VALIDAT; + if ("KEY204".equals(codeString)) + return V3ActCode.KEY204; + if ("KEY205".equals(codeString)) + return V3ActCode.KEY205; + if ("COMPLY".equals(codeString)) + return V3ActCode.COMPLY; + if ("DUPTHPY".equals(codeString)) + return V3ActCode.DUPTHPY; + if ("DUPTHPCLS".equals(codeString)) + return V3ActCode.DUPTHPCLS; + if ("DUPTHPGEN".equals(codeString)) + return V3ActCode.DUPTHPGEN; + if ("ABUSE".equals(codeString)) + return V3ActCode.ABUSE; + if ("FRAUD".equals(codeString)) + return V3ActCode.FRAUD; + if ("PLYDOC".equals(codeString)) + return V3ActCode.PLYDOC; + if ("PLYPHRM".equals(codeString)) + return V3ActCode.PLYPHRM; + if ("DOSE".equals(codeString)) + return V3ActCode.DOSE; + if ("DOSECOND".equals(codeString)) + return V3ActCode.DOSECOND; + if ("DOSEDUR".equals(codeString)) + return V3ActCode.DOSEDUR; + if ("DOSEDURH".equals(codeString)) + return V3ActCode.DOSEDURH; + if ("DOSEDURHIND".equals(codeString)) + return V3ActCode.DOSEDURHIND; + if ("DOSEDURL".equals(codeString)) + return V3ActCode.DOSEDURL; + if ("DOSEDURLIND".equals(codeString)) + return V3ActCode.DOSEDURLIND; + if ("DOSEH".equals(codeString)) + return V3ActCode.DOSEH; + if ("DOSEHINDA".equals(codeString)) + return V3ActCode.DOSEHINDA; + if ("DOSEHIND".equals(codeString)) + return V3ActCode.DOSEHIND; + if ("DOSEHINDSA".equals(codeString)) + return V3ActCode.DOSEHINDSA; + if ("DOSEHINDW".equals(codeString)) + return V3ActCode.DOSEHINDW; + if ("DOSEIVL".equals(codeString)) + return V3ActCode.DOSEIVL; + if ("DOSEIVLIND".equals(codeString)) + return V3ActCode.DOSEIVLIND; + if ("DOSEL".equals(codeString)) + return V3ActCode.DOSEL; + if ("DOSELINDA".equals(codeString)) + return V3ActCode.DOSELINDA; + if ("DOSELIND".equals(codeString)) + return V3ActCode.DOSELIND; + if ("DOSELINDSA".equals(codeString)) + return V3ActCode.DOSELINDSA; + if ("DOSELINDW".equals(codeString)) + return V3ActCode.DOSELINDW; + if ("MDOSE".equals(codeString)) + return V3ActCode.MDOSE; + if ("OBSA".equals(codeString)) + return V3ActCode.OBSA; + if ("AGE".equals(codeString)) + return V3ActCode.AGE; + if ("ADALRT".equals(codeString)) + return V3ActCode.ADALRT; + if ("GEALRT".equals(codeString)) + return V3ActCode.GEALRT; + if ("PEALRT".equals(codeString)) + return V3ActCode.PEALRT; + if ("COND".equals(codeString)) + return V3ActCode.COND; + if ("HGHT".equals(codeString)) + return V3ActCode.HGHT; + if ("LACT".equals(codeString)) + return V3ActCode.LACT; + if ("PREG".equals(codeString)) + return V3ActCode.PREG; + if ("WGHT".equals(codeString)) + return V3ActCode.WGHT; + if ("CREACT".equals(codeString)) + return V3ActCode.CREACT; + if ("GEN".equals(codeString)) + return V3ActCode.GEN; + if ("GEND".equals(codeString)) + return V3ActCode.GEND; + if ("LAB".equals(codeString)) + return V3ActCode.LAB; + if ("REACT".equals(codeString)) + return V3ActCode.REACT; + if ("ALGY".equals(codeString)) + return V3ActCode.ALGY; + if ("INT".equals(codeString)) + return V3ActCode.INT; + if ("RREACT".equals(codeString)) + return V3ActCode.RREACT; + if ("RALG".equals(codeString)) + return V3ActCode.RALG; + if ("RAR".equals(codeString)) + return V3ActCode.RAR; + if ("RINT".equals(codeString)) + return V3ActCode.RINT; + if ("BUS".equals(codeString)) + return V3ActCode.BUS; + if ("CODE_INVAL".equals(codeString)) + return V3ActCode.CODEINVAL; + if ("CODE_DEPREC".equals(codeString)) + return V3ActCode.CODEDEPREC; + if ("FORMAT".equals(codeString)) + return V3ActCode.FORMAT; + if ("ILLEGAL".equals(codeString)) + return V3ActCode.ILLEGAL; + if ("LEN_RANGE".equals(codeString)) + return V3ActCode.LENRANGE; + if ("LEN_LONG".equals(codeString)) + return V3ActCode.LENLONG; + if ("LEN_SHORT".equals(codeString)) + return V3ActCode.LENSHORT; + if ("MISSCOND".equals(codeString)) + return V3ActCode.MISSCOND; + if ("MISSMAND".equals(codeString)) + return V3ActCode.MISSMAND; + if ("NODUPS".equals(codeString)) + return V3ActCode.NODUPS; + if ("NOPERSIST".equals(codeString)) + return V3ActCode.NOPERSIST; + if ("REP_RANGE".equals(codeString)) + return V3ActCode.REPRANGE; + if ("MAXOCCURS".equals(codeString)) + return V3ActCode.MAXOCCURS; + if ("MINOCCURS".equals(codeString)) + return V3ActCode.MINOCCURS; + if ("_ActAdministrativeRuleDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTADMINISTRATIVERULEDETECTEDISSUECODE; + if ("KEY206".equals(codeString)) + return V3ActCode.KEY206; + if ("OBSOLETE".equals(codeString)) + return V3ActCode.OBSOLETE; + if ("_ActSuppliedItemDetectedIssueCode".equals(codeString)) + return V3ActCode._ACTSUPPLIEDITEMDETECTEDISSUECODE; + if ("_AdministrationDetectedIssueCode".equals(codeString)) + return V3ActCode._ADMINISTRATIONDETECTEDISSUECODE; + if ("_AppropriatenessDetectedIssueCode".equals(codeString)) + return V3ActCode._APPROPRIATENESSDETECTEDISSUECODE; + if ("_InteractionDetectedIssueCode".equals(codeString)) + return V3ActCode._INTERACTIONDETECTEDISSUECODE; + if ("FOOD".equals(codeString)) + return V3ActCode.FOOD; + if ("TPROD".equals(codeString)) + return V3ActCode.TPROD; + if ("DRG".equals(codeString)) + return V3ActCode.DRG; + if ("NHP".equals(codeString)) + return V3ActCode.NHP; + if ("NONRX".equals(codeString)) + return V3ActCode.NONRX; + if ("PREVINEF".equals(codeString)) + return V3ActCode.PREVINEF; + if ("DACT".equals(codeString)) + return V3ActCode.DACT; + if ("TIME".equals(codeString)) + return V3ActCode.TIME; + if ("ALRTENDLATE".equals(codeString)) + return V3ActCode.ALRTENDLATE; + if ("ALRTSTRTLATE".equals(codeString)) + return V3ActCode.ALRTSTRTLATE; + if ("_TimingDetectedIssueCode".equals(codeString)) + return V3ActCode._TIMINGDETECTEDISSUECODE; + if ("ENDLATE".equals(codeString)) + return V3ActCode.ENDLATE; + if ("STRTLATE".equals(codeString)) + return V3ActCode.STRTLATE; + if ("_SupplyDetectedIssueCode".equals(codeString)) + return V3ActCode._SUPPLYDETECTEDISSUECODE; + if ("ALLDONE".equals(codeString)) + return V3ActCode.ALLDONE; + if ("FULFIL".equals(codeString)) + return V3ActCode.FULFIL; + if ("NOTACTN".equals(codeString)) + return V3ActCode.NOTACTN; + if ("NOTEQUIV".equals(codeString)) + return V3ActCode.NOTEQUIV; + if ("NOTEQUIVGEN".equals(codeString)) + return V3ActCode.NOTEQUIVGEN; + if ("NOTEQUIVTHER".equals(codeString)) + return V3ActCode.NOTEQUIVTHER; + if ("TIMING".equals(codeString)) + return V3ActCode.TIMING; + if ("INTERVAL".equals(codeString)) + return V3ActCode.INTERVAL; + if ("MINFREQ".equals(codeString)) + return V3ActCode.MINFREQ; + if ("HELD".equals(codeString)) + return V3ActCode.HELD; + if ("TOOLATE".equals(codeString)) + return V3ActCode.TOOLATE; + if ("TOOSOON".equals(codeString)) + return V3ActCode.TOOSOON; + if ("HISTORIC".equals(codeString)) + return V3ActCode.HISTORIC; + if ("PATPREF".equals(codeString)) + return V3ActCode.PATPREF; + if ("PATPREFALT".equals(codeString)) + return V3ActCode.PATPREFALT; + if ("KSUBJ".equals(codeString)) + return V3ActCode.KSUBJ; + if ("KSUBT".equals(codeString)) + return V3ActCode.KSUBT; + if ("OINT".equals(codeString)) + return V3ActCode.OINT; + if ("ALG".equals(codeString)) + return V3ActCode.ALG; + if ("DALG".equals(codeString)) + return V3ActCode.DALG; + if ("EALG".equals(codeString)) + return V3ActCode.EALG; + if ("FALG".equals(codeString)) + return V3ActCode.FALG; + if ("DINT".equals(codeString)) + return V3ActCode.DINT; + if ("DNAINT".equals(codeString)) + return V3ActCode.DNAINT; + if ("EINT".equals(codeString)) + return V3ActCode.EINT; + if ("ENAINT".equals(codeString)) + return V3ActCode.ENAINT; + if ("FINT".equals(codeString)) + return V3ActCode.FINT; + if ("FNAINT".equals(codeString)) + return V3ActCode.FNAINT; + if ("NAINT".equals(codeString)) + return V3ActCode.NAINT; + if ("SEV".equals(codeString)) + return V3ActCode.SEV; + if ("_FDALabelData".equals(codeString)) + return V3ActCode._FDALABELDATA; + if ("FDACOATING".equals(codeString)) + return V3ActCode.FDACOATING; + if ("FDACOLOR".equals(codeString)) + return V3ActCode.FDACOLOR; + if ("FDAIMPRINTCD".equals(codeString)) + return V3ActCode.FDAIMPRINTCD; + if ("FDALOGO".equals(codeString)) + return V3ActCode.FDALOGO; + if ("FDASCORING".equals(codeString)) + return V3ActCode.FDASCORING; + if ("FDASHAPE".equals(codeString)) + return V3ActCode.FDASHAPE; + if ("FDASIZE".equals(codeString)) + return V3ActCode.FDASIZE; + if ("_ROIOverlayShape".equals(codeString)) + return V3ActCode._ROIOVERLAYSHAPE; + if ("CIRCLE".equals(codeString)) + return V3ActCode.CIRCLE; + if ("ELLIPSE".equals(codeString)) + return V3ActCode.ELLIPSE; + if ("POINT".equals(codeString)) + return V3ActCode.POINT; + if ("POLY".equals(codeString)) + return V3ActCode.POLY; + if ("C".equals(codeString)) + return V3ActCode.C; + if ("DIET".equals(codeString)) + return V3ActCode.DIET; + if ("BR".equals(codeString)) + return V3ActCode.BR; + if ("DM".equals(codeString)) + return V3ActCode.DM; + if ("FAST".equals(codeString)) + return V3ActCode.FAST; + if ("FORMULA".equals(codeString)) + return V3ActCode.FORMULA; + if ("GF".equals(codeString)) + return V3ActCode.GF; + if ("LF".equals(codeString)) + return V3ActCode.LF; + if ("LP".equals(codeString)) + return V3ActCode.LP; + if ("LQ".equals(codeString)) + return V3ActCode.LQ; + if ("LS".equals(codeString)) + return V3ActCode.LS; + if ("N".equals(codeString)) + return V3ActCode.N; + if ("NF".equals(codeString)) + return V3ActCode.NF; + if ("PAF".equals(codeString)) + return V3ActCode.PAF; + if ("PAR".equals(codeString)) + return V3ActCode.PAR; + if ("RD".equals(codeString)) + return V3ActCode.RD; + if ("SCH".equals(codeString)) + return V3ActCode.SCH; + if ("SUPPLEMENT".equals(codeString)) + return V3ActCode.SUPPLEMENT; + if ("T".equals(codeString)) + return V3ActCode.T; + if ("VLI".equals(codeString)) + return V3ActCode.VLI; + if ("DRUGPRG".equals(codeString)) + return V3ActCode.DRUGPRG; + if ("F".equals(codeString)) + return V3ActCode.F; + if ("PRLMN".equals(codeString)) + return V3ActCode.PRLMN; + if ("SECOBS".equals(codeString)) + return V3ActCode.SECOBS; + if ("SECCATOBS".equals(codeString)) + return V3ActCode.SECCATOBS; + if ("SECCLASSOBS".equals(codeString)) + return V3ActCode.SECCLASSOBS; + if ("SECCONOBS".equals(codeString)) + return V3ActCode.SECCONOBS; + if ("SECINTOBS".equals(codeString)) + return V3ActCode.SECINTOBS; + if ("SECALTINTOBS".equals(codeString)) + return V3ActCode.SECALTINTOBS; + if ("SECDATINTOBS".equals(codeString)) + return V3ActCode.SECDATINTOBS; + if ("SECINTCONOBS".equals(codeString)) + return V3ActCode.SECINTCONOBS; + if ("SECINTPRVOBS".equals(codeString)) + return V3ActCode.SECINTPRVOBS; + if ("SECINTPRVABOBS".equals(codeString)) + return V3ActCode.SECINTPRVABOBS; + if ("SECINTPRVRBOBS".equals(codeString)) + return V3ActCode.SECINTPRVRBOBS; + if ("SECINTSTOBS".equals(codeString)) + return V3ActCode.SECINTSTOBS; + if ("SECTRSTOBS".equals(codeString)) + return V3ActCode.SECTRSTOBS; + if ("TRSTACCRDOBS".equals(codeString)) + return V3ActCode.TRSTACCRDOBS; + if ("TRSTAGREOBS".equals(codeString)) + return V3ActCode.TRSTAGREOBS; + if ("TRSTCERTOBS".equals(codeString)) + return V3ActCode.TRSTCERTOBS; + if ("TRSTFWKOBS".equals(codeString)) + return V3ActCode.TRSTFWKOBS; + if ("TRSTLOAOBS".equals(codeString)) + return V3ActCode.TRSTLOAOBS; + if ("TRSTMECOBS".equals(codeString)) + return V3ActCode.TRSTMECOBS; + if ("SUBSIDFFS".equals(codeString)) + return V3ActCode.SUBSIDFFS; + if ("WRKCOMP".equals(codeString)) + return V3ActCode.WRKCOMP; + if ("_ActProcedureCode".equals(codeString)) + return V3ActCode._ACTPROCEDURECODE; + if ("_ActBillableServiceCode".equals(codeString)) + return V3ActCode._ACTBILLABLESERVICECODE; + if ("_HL7DefinedActCodes".equals(codeString)) + return V3ActCode._HL7DEFINEDACTCODES; + if ("COPAY".equals(codeString)) + return V3ActCode.COPAY; + if ("DEDUCT".equals(codeString)) + return V3ActCode.DEDUCT; + if ("DOSEIND".equals(codeString)) + return V3ActCode.DOSEIND; + if ("PRA".equals(codeString)) + return V3ActCode.PRA; + if ("STORE".equals(codeString)) + return V3ActCode.STORE; + throw new IllegalArgumentException("Unknown V3ActCode code '"+codeString+"'"); + } + + public String toCode(V3ActCode code) { + if (code == V3ActCode._ACTACCOUNTCODE) + return "_ActAccountCode"; + if (code == V3ActCode.ACCTRECEIVABLE) + return "ACCTRECEIVABLE"; + if (code == V3ActCode.CASH) + return "CASH"; + if (code == V3ActCode.CC) + return "CC"; + if (code == V3ActCode.AE) + return "AE"; + if (code == V3ActCode.DN) + return "DN"; + if (code == V3ActCode.DV) + return "DV"; + if (code == V3ActCode.MC) + return "MC"; + if (code == V3ActCode.V) + return "V"; + if (code == V3ActCode.PBILLACCT) + return "PBILLACCT"; + if (code == V3ActCode._ACTADJUDICATIONCODE) + return "_ActAdjudicationCode"; + if (code == V3ActCode._ACTADJUDICATIONGROUPCODE) + return "_ActAdjudicationGroupCode"; + if (code == V3ActCode.CONT) + return "CONT"; + if (code == V3ActCode.DAY) + return "DAY"; + if (code == V3ActCode.LOC) + return "LOC"; + if (code == V3ActCode.MONTH) + return "MONTH"; + if (code == V3ActCode.PERIOD) + return "PERIOD"; + if (code == V3ActCode.PROV) + return "PROV"; + if (code == V3ActCode.WEEK) + return "WEEK"; + if (code == V3ActCode.YEAR) + return "YEAR"; + if (code == V3ActCode.AA) + return "AA"; + if (code == V3ActCode.ANF) + return "ANF"; + if (code == V3ActCode.AR) + return "AR"; + if (code == V3ActCode.AS) + return "AS"; + if (code == V3ActCode._ACTADJUDICATIONRESULTACTIONCODE) + return "_ActAdjudicationResultActionCode"; + if (code == V3ActCode.DISPLAY) + return "DISPLAY"; + if (code == V3ActCode.FORM) + return "FORM"; + if (code == V3ActCode._ACTBILLABLEMODIFIERCODE) + return "_ActBillableModifierCode"; + if (code == V3ActCode.CPTM) + return "CPTM"; + if (code == V3ActCode.HCPCSA) + return "HCPCSA"; + if (code == V3ActCode._ACTBILLINGARRANGEMENTCODE) + return "_ActBillingArrangementCode"; + if (code == V3ActCode.BLK) + return "BLK"; + if (code == V3ActCode.CAP) + return "CAP"; + if (code == V3ActCode.CONTF) + return "CONTF"; + if (code == V3ActCode.FINBILL) + return "FINBILL"; + if (code == V3ActCode.ROST) + return "ROST"; + if (code == V3ActCode.SESS) + return "SESS"; + if (code == V3ActCode.FFS) + return "FFS"; + if (code == V3ActCode.FFPS) + return "FFPS"; + if (code == V3ActCode.FFCS) + return "FFCS"; + if (code == V3ActCode.TFS) + return "TFS"; + if (code == V3ActCode._ACTBOUNDEDROICODE) + return "_ActBoundedROICode"; + if (code == V3ActCode.ROIFS) + return "ROIFS"; + if (code == V3ActCode.ROIPS) + return "ROIPS"; + if (code == V3ActCode._ACTCAREPROVISIONCODE) + return "_ActCareProvisionCode"; + if (code == V3ActCode._ACTCREDENTIALEDCARECODE) + return "_ActCredentialedCareCode"; + if (code == V3ActCode._ACTCREDENTIALEDCAREPROVISIONPERSONCODE) + return "_ActCredentialedCareProvisionPersonCode"; + if (code == V3ActCode.CACC) + return "CACC"; + if (code == V3ActCode.CAIC) + return "CAIC"; + if (code == V3ActCode.CAMC) + return "CAMC"; + if (code == V3ActCode.CANC) + return "CANC"; + if (code == V3ActCode.CAPC) + return "CAPC"; + if (code == V3ActCode.CBGC) + return "CBGC"; + if (code == V3ActCode.CCCC) + return "CCCC"; + if (code == V3ActCode.CCGC) + return "CCGC"; + if (code == V3ActCode.CCPC) + return "CCPC"; + if (code == V3ActCode.CCSC) + return "CCSC"; + if (code == V3ActCode.CDEC) + return "CDEC"; + if (code == V3ActCode.CDRC) + return "CDRC"; + if (code == V3ActCode.CEMC) + return "CEMC"; + if (code == V3ActCode.CFPC) + return "CFPC"; + if (code == V3ActCode.CIMC) + return "CIMC"; + if (code == V3ActCode.CMGC) + return "CMGC"; + if (code == V3ActCode.CNEC) + return "CNEC"; + if (code == V3ActCode.CNMC) + return "CNMC"; + if (code == V3ActCode.CNQC) + return "CNQC"; + if (code == V3ActCode.CNSC) + return "CNSC"; + if (code == V3ActCode.COGC) + return "COGC"; + if (code == V3ActCode.COMC) + return "COMC"; + if (code == V3ActCode.COPC) + return "COPC"; + if (code == V3ActCode.COSC) + return "COSC"; + if (code == V3ActCode.COTC) + return "COTC"; + if (code == V3ActCode.CPEC) + return "CPEC"; + if (code == V3ActCode.CPGC) + return "CPGC"; + if (code == V3ActCode.CPHC) + return "CPHC"; + if (code == V3ActCode.CPRC) + return "CPRC"; + if (code == V3ActCode.CPSC) + return "CPSC"; + if (code == V3ActCode.CPYC) + return "CPYC"; + if (code == V3ActCode.CROC) + return "CROC"; + if (code == V3ActCode.CRPC) + return "CRPC"; + if (code == V3ActCode.CSUC) + return "CSUC"; + if (code == V3ActCode.CTSC) + return "CTSC"; + if (code == V3ActCode.CURC) + return "CURC"; + if (code == V3ActCode.CVSC) + return "CVSC"; + if (code == V3ActCode.LGPC) + return "LGPC"; + if (code == V3ActCode._ACTCREDENTIALEDCAREPROVISIONPROGRAMCODE) + return "_ActCredentialedCareProvisionProgramCode"; + if (code == V3ActCode.AALC) + return "AALC"; + if (code == V3ActCode.AAMC) + return "AAMC"; + if (code == V3ActCode.ABHC) + return "ABHC"; + if (code == V3ActCode.ACAC) + return "ACAC"; + if (code == V3ActCode.ACHC) + return "ACHC"; + if (code == V3ActCode.AHOC) + return "AHOC"; + if (code == V3ActCode.ALTC) + return "ALTC"; + if (code == V3ActCode.AOSC) + return "AOSC"; + if (code == V3ActCode.CACS) + return "CACS"; + if (code == V3ActCode.CAMI) + return "CAMI"; + if (code == V3ActCode.CAST) + return "CAST"; + if (code == V3ActCode.CBAR) + return "CBAR"; + if (code == V3ActCode.CCAD) + return "CCAD"; + if (code == V3ActCode.CCAR) + return "CCAR"; + if (code == V3ActCode.CDEP) + return "CDEP"; + if (code == V3ActCode.CDGD) + return "CDGD"; + if (code == V3ActCode.CDIA) + return "CDIA"; + if (code == V3ActCode.CEPI) + return "CEPI"; + if (code == V3ActCode.CFEL) + return "CFEL"; + if (code == V3ActCode.CHFC) + return "CHFC"; + if (code == V3ActCode.CHRO) + return "CHRO"; + if (code == V3ActCode.CHYP) + return "CHYP"; + if (code == V3ActCode.CMIH) + return "CMIH"; + if (code == V3ActCode.CMSC) + return "CMSC"; + if (code == V3ActCode.COJR) + return "COJR"; + if (code == V3ActCode.CONC) + return "CONC"; + if (code == V3ActCode.COPD) + return "COPD"; + if (code == V3ActCode.CORT) + return "CORT"; + if (code == V3ActCode.CPAD) + return "CPAD"; + if (code == V3ActCode.CPND) + return "CPND"; + if (code == V3ActCode.CPST) + return "CPST"; + if (code == V3ActCode.CSDM) + return "CSDM"; + if (code == V3ActCode.CSIC) + return "CSIC"; + if (code == V3ActCode.CSLD) + return "CSLD"; + if (code == V3ActCode.CSPT) + return "CSPT"; + if (code == V3ActCode.CTBU) + return "CTBU"; + if (code == V3ActCode.CVDC) + return "CVDC"; + if (code == V3ActCode.CWMA) + return "CWMA"; + if (code == V3ActCode.CWOH) + return "CWOH"; + if (code == V3ActCode._ACTENCOUNTERCODE) + return "_ActEncounterCode"; + if (code == V3ActCode.AMB) + return "AMB"; + if (code == V3ActCode.EMER) + return "EMER"; + if (code == V3ActCode.FLD) + return "FLD"; + if (code == V3ActCode.HH) + return "HH"; + if (code == V3ActCode.IMP) + return "IMP"; + if (code == V3ActCode.ACUTE) + return "ACUTE"; + if (code == V3ActCode.NONAC) + return "NONAC"; + if (code == V3ActCode.PRENC) + return "PRENC"; + if (code == V3ActCode.SS) + return "SS"; + if (code == V3ActCode.VR) + return "VR"; + if (code == V3ActCode._ACTMEDICALSERVICECODE) + return "_ActMedicalServiceCode"; + if (code == V3ActCode.ALC) + return "ALC"; + if (code == V3ActCode.CARD) + return "CARD"; + if (code == V3ActCode.CHR) + return "CHR"; + if (code == V3ActCode.DNTL) + return "DNTL"; + if (code == V3ActCode.DRGRHB) + return "DRGRHB"; + if (code == V3ActCode.GENRL) + return "GENRL"; + if (code == V3ActCode.MED) + return "MED"; + if (code == V3ActCode.OBS) + return "OBS"; + if (code == V3ActCode.ONC) + return "ONC"; + if (code == V3ActCode.PALL) + return "PALL"; + if (code == V3ActCode.PED) + return "PED"; + if (code == V3ActCode.PHAR) + return "PHAR"; + if (code == V3ActCode.PHYRHB) + return "PHYRHB"; + if (code == V3ActCode.PSYCH) + return "PSYCH"; + if (code == V3ActCode.SURG) + return "SURG"; + if (code == V3ActCode._ACTCLAIMATTACHMENTCATEGORYCODE) + return "_ActClaimAttachmentCategoryCode"; + if (code == V3ActCode.AUTOATTCH) + return "AUTOATTCH"; + if (code == V3ActCode.DOCUMENT) + return "DOCUMENT"; + if (code == V3ActCode.HEALTHREC) + return "HEALTHREC"; + if (code == V3ActCode.IMG) + return "IMG"; + if (code == V3ActCode.LABRESULTS) + return "LABRESULTS"; + if (code == V3ActCode.MODEL) + return "MODEL"; + if (code == V3ActCode.WIATTCH) + return "WIATTCH"; + if (code == V3ActCode.XRAY) + return "XRAY"; + if (code == V3ActCode._ACTCONSENTTYPE) + return "_ActConsentType"; + if (code == V3ActCode.ICOL) + return "ICOL"; + if (code == V3ActCode.IDSCL) + return "IDSCL"; + if (code == V3ActCode.INFA) + return "INFA"; + if (code == V3ActCode.INFAO) + return "INFAO"; + if (code == V3ActCode.INFASO) + return "INFASO"; + if (code == V3ActCode.IRDSCL) + return "IRDSCL"; + if (code == V3ActCode.RESEARCH) + return "RESEARCH"; + if (code == V3ActCode.RSDID) + return "RSDID"; + if (code == V3ActCode.RSREID) + return "RSREID"; + if (code == V3ActCode._ACTCONTAINERREGISTRATIONCODE) + return "_ActContainerRegistrationCode"; + if (code == V3ActCode.ID) + return "ID"; + if (code == V3ActCode.IP) + return "IP"; + if (code == V3ActCode.L) + return "L"; + if (code == V3ActCode.M) + return "M"; + if (code == V3ActCode.O) + return "O"; + if (code == V3ActCode.R) + return "R"; + if (code == V3ActCode.X) + return "X"; + if (code == V3ActCode._ACTCONTROLVARIABLE) + return "_ActControlVariable"; + if (code == V3ActCode.AUTO) + return "AUTO"; + if (code == V3ActCode.ENDC) + return "ENDC"; + if (code == V3ActCode.REFLEX) + return "REFLEX"; + if (code == V3ActCode._ACTCOVERAGECONFIRMATIONCODE) + return "_ActCoverageConfirmationCode"; + if (code == V3ActCode._ACTCOVERAGEAUTHORIZATIONCONFIRMATIONCODE) + return "_ActCoverageAuthorizationConfirmationCode"; + if (code == V3ActCode.AUTH) + return "AUTH"; + if (code == V3ActCode.NAUTH) + return "NAUTH"; + if (code == V3ActCode._ACTCOVERAGEELIGIBILITYCONFIRMATIONCODE) + return "_ActCoverageEligibilityConfirmationCode"; + if (code == V3ActCode.ELG) + return "ELG"; + if (code == V3ActCode.NELG) + return "NELG"; + if (code == V3ActCode._ACTCOVERAGELIMITCODE) + return "_ActCoverageLimitCode"; + if (code == V3ActCode._ACTCOVERAGEQUANTITYLIMITCODE) + return "_ActCoverageQuantityLimitCode"; + if (code == V3ActCode.COVPRD) + return "COVPRD"; + if (code == V3ActCode.LFEMX) + return "LFEMX"; + if (code == V3ActCode.NETAMT) + return "NETAMT"; + if (code == V3ActCode.PRDMX) + return "PRDMX"; + if (code == V3ActCode.UNITPRICE) + return "UNITPRICE"; + if (code == V3ActCode.UNITQTY) + return "UNITQTY"; + if (code == V3ActCode.COVMX) + return "COVMX"; + if (code == V3ActCode._ACTCOVEREDPARTYLIMITCODE) + return "_ActCoveredPartyLimitCode"; + if (code == V3ActCode._ACTCOVERAGETYPECODE) + return "_ActCoverageTypeCode"; + if (code == V3ActCode._ACTINSURANCEPOLICYCODE) + return "_ActInsurancePolicyCode"; + if (code == V3ActCode.EHCPOL) + return "EHCPOL"; + if (code == V3ActCode.HSAPOL) + return "HSAPOL"; + if (code == V3ActCode.AUTOPOL) + return "AUTOPOL"; + if (code == V3ActCode.COL) + return "COL"; + if (code == V3ActCode.UNINSMOT) + return "UNINSMOT"; + if (code == V3ActCode.PUBLICPOL) + return "PUBLICPOL"; + if (code == V3ActCode.DENTPRG) + return "DENTPRG"; + if (code == V3ActCode.DISEASEPRG) + return "DISEASEPRG"; + if (code == V3ActCode.CANPRG) + return "CANPRG"; + if (code == V3ActCode.ENDRENAL) + return "ENDRENAL"; + if (code == V3ActCode.HIVAIDS) + return "HIVAIDS"; + if (code == V3ActCode.MANDPOL) + return "MANDPOL"; + if (code == V3ActCode.MENTPRG) + return "MENTPRG"; + if (code == V3ActCode.SAFNET) + return "SAFNET"; + if (code == V3ActCode.SUBPRG) + return "SUBPRG"; + if (code == V3ActCode.SUBSIDIZ) + return "SUBSIDIZ"; + if (code == V3ActCode.SUBSIDMC) + return "SUBSIDMC"; + if (code == V3ActCode.SUBSUPP) + return "SUBSUPP"; + if (code == V3ActCode.WCBPOL) + return "WCBPOL"; + if (code == V3ActCode._ACTINSURANCETYPECODE) + return "_ActInsuranceTypeCode"; + if (code == V3ActCode._ACTHEALTHINSURANCETYPECODE) + return "_ActHealthInsuranceTypeCode"; + if (code == V3ActCode.DENTAL) + return "DENTAL"; + if (code == V3ActCode.DISEASE) + return "DISEASE"; + if (code == V3ActCode.DRUGPOL) + return "DRUGPOL"; + if (code == V3ActCode.HIP) + return "HIP"; + if (code == V3ActCode.LTC) + return "LTC"; + if (code == V3ActCode.MCPOL) + return "MCPOL"; + if (code == V3ActCode.POS) + return "POS"; + if (code == V3ActCode.HMO) + return "HMO"; + if (code == V3ActCode.PPO) + return "PPO"; + if (code == V3ActCode.MENTPOL) + return "MENTPOL"; + if (code == V3ActCode.SUBPOL) + return "SUBPOL"; + if (code == V3ActCode.VISPOL) + return "VISPOL"; + if (code == V3ActCode.DIS) + return "DIS"; + if (code == V3ActCode.EWB) + return "EWB"; + if (code == V3ActCode.FLEXP) + return "FLEXP"; + if (code == V3ActCode.LIFE) + return "LIFE"; + if (code == V3ActCode.ANNU) + return "ANNU"; + if (code == V3ActCode.TLIFE) + return "TLIFE"; + if (code == V3ActCode.ULIFE) + return "ULIFE"; + if (code == V3ActCode.PNC) + return "PNC"; + if (code == V3ActCode.REI) + return "REI"; + if (code == V3ActCode.SURPL) + return "SURPL"; + if (code == V3ActCode.UMBRL) + return "UMBRL"; + if (code == V3ActCode._ACTPROGRAMTYPECODE) + return "_ActProgramTypeCode"; + if (code == V3ActCode.CHAR) + return "CHAR"; + if (code == V3ActCode.CRIME) + return "CRIME"; + if (code == V3ActCode.EAP) + return "EAP"; + if (code == V3ActCode.GOVEMP) + return "GOVEMP"; + if (code == V3ActCode.HIRISK) + return "HIRISK"; + if (code == V3ActCode.IND) + return "IND"; + if (code == V3ActCode.MILITARY) + return "MILITARY"; + if (code == V3ActCode.RETIRE) + return "RETIRE"; + if (code == V3ActCode.SOCIAL) + return "SOCIAL"; + if (code == V3ActCode.VET) + return "VET"; + if (code == V3ActCode._ACTDETECTEDISSUEMANAGEMENTCODE) + return "_ActDetectedIssueManagementCode"; + if (code == V3ActCode._ACTADMINISTRATIVEDETECTEDISSUEMANAGEMENTCODE) + return "_ActAdministrativeDetectedIssueManagementCode"; + if (code == V3ActCode._AUTHORIZATIONISSUEMANAGEMENTCODE) + return "_AuthorizationIssueManagementCode"; + if (code == V3ActCode.EMAUTH) + return "EMAUTH"; + if (code == V3ActCode._21) + return "21"; + if (code == V3ActCode._1) + return "1"; + if (code == V3ActCode._19) + return "19"; + if (code == V3ActCode._2) + return "2"; + if (code == V3ActCode._22) + return "22"; + if (code == V3ActCode._23) + return "23"; + if (code == V3ActCode._3) + return "3"; + if (code == V3ActCode._4) + return "4"; + if (code == V3ActCode._5) + return "5"; + if (code == V3ActCode._6) + return "6"; + if (code == V3ActCode._7) + return "7"; + if (code == V3ActCode._14) + return "14"; + if (code == V3ActCode._15) + return "15"; + if (code == V3ActCode._16) + return "16"; + if (code == V3ActCode._17) + return "17"; + if (code == V3ActCode._18) + return "18"; + if (code == V3ActCode._20) + return "20"; + if (code == V3ActCode._8) + return "8"; + if (code == V3ActCode._10) + return "10"; + if (code == V3ActCode._11) + return "11"; + if (code == V3ActCode._12) + return "12"; + if (code == V3ActCode._13) + return "13"; + if (code == V3ActCode._9) + return "9"; + if (code == V3ActCode._ACTEXPOSURECODE) + return "_ActExposureCode"; + if (code == V3ActCode.CHLDCARE) + return "CHLDCARE"; + if (code == V3ActCode.CONVEYNC) + return "CONVEYNC"; + if (code == V3ActCode.HLTHCARE) + return "HLTHCARE"; + if (code == V3ActCode.HOMECARE) + return "HOMECARE"; + if (code == V3ActCode.HOSPPTNT) + return "HOSPPTNT"; + if (code == V3ActCode.HOSPVSTR) + return "HOSPVSTR"; + if (code == V3ActCode.HOUSEHLD) + return "HOUSEHLD"; + if (code == V3ActCode.INMATE) + return "INMATE"; + if (code == V3ActCode.INTIMATE) + return "INTIMATE"; + if (code == V3ActCode.LTRMCARE) + return "LTRMCARE"; + if (code == V3ActCode.PLACE) + return "PLACE"; + if (code == V3ActCode.PTNTCARE) + return "PTNTCARE"; + if (code == V3ActCode.SCHOOL2) + return "SCHOOL2"; + if (code == V3ActCode.SOCIAL2) + return "SOCIAL2"; + if (code == V3ActCode.SUBSTNCE) + return "SUBSTNCE"; + if (code == V3ActCode.TRAVINT) + return "TRAVINT"; + if (code == V3ActCode.WORK2) + return "WORK2"; + if (code == V3ActCode._ACTFINANCIALTRANSACTIONCODE) + return "_ActFinancialTransactionCode"; + if (code == V3ActCode.CHRG) + return "CHRG"; + if (code == V3ActCode.REV) + return "REV"; + if (code == V3ActCode._ACTINCIDENTCODE) + return "_ActIncidentCode"; + if (code == V3ActCode.MVA) + return "MVA"; + if (code == V3ActCode.SCHOOL) + return "SCHOOL"; + if (code == V3ActCode.SPT) + return "SPT"; + if (code == V3ActCode.WPA) + return "WPA"; + if (code == V3ActCode._ACTINFORMATIONACCESSCODE) + return "_ActInformationAccessCode"; + if (code == V3ActCode.ACADR) + return "ACADR"; + if (code == V3ActCode.ACALL) + return "ACALL"; + if (code == V3ActCode.ACALLG) + return "ACALLG"; + if (code == V3ActCode.ACCONS) + return "ACCONS"; + if (code == V3ActCode.ACDEMO) + return "ACDEMO"; + if (code == V3ActCode.ACDI) + return "ACDI"; + if (code == V3ActCode.ACIMMUN) + return "ACIMMUN"; + if (code == V3ActCode.ACLAB) + return "ACLAB"; + if (code == V3ActCode.ACMED) + return "ACMED"; + if (code == V3ActCode.ACMEDC) + return "ACMEDC"; + if (code == V3ActCode.ACMEN) + return "ACMEN"; + if (code == V3ActCode.ACOBS) + return "ACOBS"; + if (code == V3ActCode.ACPOLPRG) + return "ACPOLPRG"; + if (code == V3ActCode.ACPROV) + return "ACPROV"; + if (code == V3ActCode.ACPSERV) + return "ACPSERV"; + if (code == V3ActCode.ACSUBSTAB) + return "ACSUBSTAB"; + if (code == V3ActCode._ACTINFORMATIONACCESSCONTEXTCODE) + return "_ActInformationAccessContextCode"; + if (code == V3ActCode.INFAUT) + return "INFAUT"; + if (code == V3ActCode.INFCON) + return "INFCON"; + if (code == V3ActCode.INFCRT) + return "INFCRT"; + if (code == V3ActCode.INFDNG) + return "INFDNG"; + if (code == V3ActCode.INFEMER) + return "INFEMER"; + if (code == V3ActCode.INFPWR) + return "INFPWR"; + if (code == V3ActCode.INFREG) + return "INFREG"; + if (code == V3ActCode._ACTINFORMATIONCATEGORYCODE) + return "_ActInformationCategoryCode"; + if (code == V3ActCode.ALLCAT) + return "ALLCAT"; + if (code == V3ActCode.ALLGCAT) + return "ALLGCAT"; + if (code == V3ActCode.ARCAT) + return "ARCAT"; + if (code == V3ActCode.COBSCAT) + return "COBSCAT"; + if (code == V3ActCode.DEMOCAT) + return "DEMOCAT"; + if (code == V3ActCode.DICAT) + return "DICAT"; + if (code == V3ActCode.IMMUCAT) + return "IMMUCAT"; + if (code == V3ActCode.LABCAT) + return "LABCAT"; + if (code == V3ActCode.MEDCCAT) + return "MEDCCAT"; + if (code == V3ActCode.MENCAT) + return "MENCAT"; + if (code == V3ActCode.PSVCCAT) + return "PSVCCAT"; + if (code == V3ActCode.RXCAT) + return "RXCAT"; + if (code == V3ActCode._ACTINVOICEELEMENTCODE) + return "_ActInvoiceElementCode"; + if (code == V3ActCode._ACTINVOICEADJUDICATIONPAYMENTCODE) + return "_ActInvoiceAdjudicationPaymentCode"; + if (code == V3ActCode._ACTINVOICEADJUDICATIONPAYMENTGROUPCODE) + return "_ActInvoiceAdjudicationPaymentGroupCode"; + if (code == V3ActCode.ALEC) + return "ALEC"; + if (code == V3ActCode.BONUS) + return "BONUS"; + if (code == V3ActCode.CFWD) + return "CFWD"; + if (code == V3ActCode.EDU) + return "EDU"; + if (code == V3ActCode.EPYMT) + return "EPYMT"; + if (code == V3ActCode.GARN) + return "GARN"; + if (code == V3ActCode.INVOICE) + return "INVOICE"; + if (code == V3ActCode.PINV) + return "PINV"; + if (code == V3ActCode.PPRD) + return "PPRD"; + if (code == V3ActCode.PROA) + return "PROA"; + if (code == V3ActCode.RECOV) + return "RECOV"; + if (code == V3ActCode.RETRO) + return "RETRO"; + if (code == V3ActCode.TRAN) + return "TRAN"; + if (code == V3ActCode._ACTINVOICEADJUDICATIONPAYMENTSUMMARYCODE) + return "_ActInvoiceAdjudicationPaymentSummaryCode"; + if (code == V3ActCode.INVTYPE) + return "INVTYPE"; + if (code == V3ActCode.PAYEE) + return "PAYEE"; + if (code == V3ActCode.PAYOR) + return "PAYOR"; + if (code == V3ActCode.SENDAPP) + return "SENDAPP"; + if (code == V3ActCode._ACTINVOICEDETAILCODE) + return "_ActInvoiceDetailCode"; + if (code == V3ActCode._ACTINVOICEDETAILCLINICALPRODUCTCODE) + return "_ActInvoiceDetailClinicalProductCode"; + if (code == V3ActCode.UNSPSC) + return "UNSPSC"; + if (code == V3ActCode._ACTINVOICEDETAILDRUGPRODUCTCODE) + return "_ActInvoiceDetailDrugProductCode"; + if (code == V3ActCode.GTIN) + return "GTIN"; + if (code == V3ActCode.UPC) + return "UPC"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICCODE) + return "_ActInvoiceDetailGenericCode"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICADJUDICATORCODE) + return "_ActInvoiceDetailGenericAdjudicatorCode"; + if (code == V3ActCode.COIN) + return "COIN"; + if (code == V3ActCode.COPAYMENT) + return "COPAYMENT"; + if (code == V3ActCode.DEDUCTIBLE) + return "DEDUCTIBLE"; + if (code == V3ActCode.PAY) + return "PAY"; + if (code == V3ActCode.SPEND) + return "SPEND"; + if (code == V3ActCode.COINS) + return "COINS"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICMODIFIERCODE) + return "_ActInvoiceDetailGenericModifierCode"; + if (code == V3ActCode.AFTHRS) + return "AFTHRS"; + if (code == V3ActCode.ISOL) + return "ISOL"; + if (code == V3ActCode.OOO) + return "OOO"; + if (code == V3ActCode._ACTINVOICEDETAILGENERICPROVIDERCODE) + return "_ActInvoiceDetailGenericProviderCode"; + if (code == V3ActCode.CANCAPT) + return "CANCAPT"; + if (code == V3ActCode.DSC) + return "DSC"; + if (code == V3ActCode.ESA) + return "ESA"; + if (code == V3ActCode.FFSTOP) + return "FFSTOP"; + if (code == V3ActCode.FNLFEE) + return "FNLFEE"; + if (code == V3ActCode.FRSTFEE) + return "FRSTFEE"; + if (code == V3ActCode.MARKUP) + return "MARKUP"; + if (code == V3ActCode.MISSAPT) + return "MISSAPT"; + if (code == V3ActCode.PERFEE) + return "PERFEE"; + if (code == V3ActCode.PERMBNS) + return "PERMBNS"; + if (code == V3ActCode.RESTOCK) + return "RESTOCK"; + if (code == V3ActCode.TRAVEL) + return "TRAVEL"; + if (code == V3ActCode.URGENT) + return "URGENT"; + if (code == V3ActCode._ACTINVOICEDETAILTAXCODE) + return "_ActInvoiceDetailTaxCode"; + if (code == V3ActCode.FST) + return "FST"; + if (code == V3ActCode.HST) + return "HST"; + if (code == V3ActCode.PST) + return "PST"; + if (code == V3ActCode._ACTINVOICEDETAILPREFERREDACCOMMODATIONCODE) + return "_ActInvoiceDetailPreferredAccommodationCode"; + if (code == V3ActCode._ACTENCOUNTERACCOMMODATIONCODE) + return "_ActEncounterAccommodationCode"; + if (code == V3ActCode._HL7ACCOMMODATIONCODE) + return "_HL7AccommodationCode"; + if (code == V3ActCode.I) + return "I"; + if (code == V3ActCode.P) + return "P"; + if (code == V3ActCode.S) + return "S"; + if (code == V3ActCode.SP) + return "SP"; + if (code == V3ActCode.W) + return "W"; + if (code == V3ActCode._ACTINVOICEDETAILCLINICALSERVICECODE) + return "_ActInvoiceDetailClinicalServiceCode"; + if (code == V3ActCode._ACTINVOICEGROUPCODE) + return "_ActInvoiceGroupCode"; + if (code == V3ActCode._ACTINVOICEINTERGROUPCODE) + return "_ActInvoiceInterGroupCode"; + if (code == V3ActCode.CPNDDRGING) + return "CPNDDRGING"; + if (code == V3ActCode.CPNDINDING) + return "CPNDINDING"; + if (code == V3ActCode.CPNDSUPING) + return "CPNDSUPING"; + if (code == V3ActCode.DRUGING) + return "DRUGING"; + if (code == V3ActCode.FRAMEING) + return "FRAMEING"; + if (code == V3ActCode.LENSING) + return "LENSING"; + if (code == V3ActCode.PRDING) + return "PRDING"; + if (code == V3ActCode._ACTINVOICEROOTGROUPCODE) + return "_ActInvoiceRootGroupCode"; + if (code == V3ActCode.CPINV) + return "CPINV"; + if (code == V3ActCode.CSINV) + return "CSINV"; + if (code == V3ActCode.CSPINV) + return "CSPINV"; + if (code == V3ActCode.FININV) + return "FININV"; + if (code == V3ActCode.OHSINV) + return "OHSINV"; + if (code == V3ActCode.PAINV) + return "PAINV"; + if (code == V3ActCode.RXCINV) + return "RXCINV"; + if (code == V3ActCode.RXDINV) + return "RXDINV"; + if (code == V3ActCode.SBFINV) + return "SBFINV"; + if (code == V3ActCode.VRXINV) + return "VRXINV"; + if (code == V3ActCode._ACTINVOICEELEMENTSUMMARYCODE) + return "_ActInvoiceElementSummaryCode"; + if (code == V3ActCode._INVOICEELEMENTADJUDICATED) + return "_InvoiceElementAdjudicated"; + if (code == V3ActCode.ADNFPPELAT) + return "ADNFPPELAT"; + if (code == V3ActCode.ADNFPPELCT) + return "ADNFPPELCT"; + if (code == V3ActCode.ADNFPPMNAT) + return "ADNFPPMNAT"; + if (code == V3ActCode.ADNFPPMNCT) + return "ADNFPPMNCT"; + if (code == V3ActCode.ADNFSPELAT) + return "ADNFSPELAT"; + if (code == V3ActCode.ADNFSPELCT) + return "ADNFSPELCT"; + if (code == V3ActCode.ADNFSPMNAT) + return "ADNFSPMNAT"; + if (code == V3ActCode.ADNFSPMNCT) + return "ADNFSPMNCT"; + if (code == V3ActCode.ADNPPPELAT) + return "ADNPPPELAT"; + if (code == V3ActCode.ADNPPPELCT) + return "ADNPPPELCT"; + if (code == V3ActCode.ADNPPPMNAT) + return "ADNPPPMNAT"; + if (code == V3ActCode.ADNPPPMNCT) + return "ADNPPPMNCT"; + if (code == V3ActCode.ADNPSPELAT) + return "ADNPSPELAT"; + if (code == V3ActCode.ADNPSPELCT) + return "ADNPSPELCT"; + if (code == V3ActCode.ADNPSPMNAT) + return "ADNPSPMNAT"; + if (code == V3ActCode.ADNPSPMNCT) + return "ADNPSPMNCT"; + if (code == V3ActCode.ADPPPPELAT) + return "ADPPPPELAT"; + if (code == V3ActCode.ADPPPPELCT) + return "ADPPPPELCT"; + if (code == V3ActCode.ADPPPPMNAT) + return "ADPPPPMNAT"; + if (code == V3ActCode.ADPPPPMNCT) + return "ADPPPPMNCT"; + if (code == V3ActCode.ADPPSPELAT) + return "ADPPSPELAT"; + if (code == V3ActCode.ADPPSPELCT) + return "ADPPSPELCT"; + if (code == V3ActCode.ADPPSPMNAT) + return "ADPPSPMNAT"; + if (code == V3ActCode.ADPPSPMNCT) + return "ADPPSPMNCT"; + if (code == V3ActCode.ADRFPPELAT) + return "ADRFPPELAT"; + if (code == V3ActCode.ADRFPPELCT) + return "ADRFPPELCT"; + if (code == V3ActCode.ADRFPPMNAT) + return "ADRFPPMNAT"; + if (code == V3ActCode.ADRFPPMNCT) + return "ADRFPPMNCT"; + if (code == V3ActCode.ADRFSPELAT) + return "ADRFSPELAT"; + if (code == V3ActCode.ADRFSPELCT) + return "ADRFSPELCT"; + if (code == V3ActCode.ADRFSPMNAT) + return "ADRFSPMNAT"; + if (code == V3ActCode.ADRFSPMNCT) + return "ADRFSPMNCT"; + if (code == V3ActCode._INVOICEELEMENTPAID) + return "_InvoiceElementPaid"; + if (code == V3ActCode.PDNFPPELAT) + return "PDNFPPELAT"; + if (code == V3ActCode.PDNFPPELCT) + return "PDNFPPELCT"; + if (code == V3ActCode.PDNFPPMNAT) + return "PDNFPPMNAT"; + if (code == V3ActCode.PDNFPPMNCT) + return "PDNFPPMNCT"; + if (code == V3ActCode.PDNFSPELAT) + return "PDNFSPELAT"; + if (code == V3ActCode.PDNFSPELCT) + return "PDNFSPELCT"; + if (code == V3ActCode.PDNFSPMNAT) + return "PDNFSPMNAT"; + if (code == V3ActCode.PDNFSPMNCT) + return "PDNFSPMNCT"; + if (code == V3ActCode.PDNPPPELAT) + return "PDNPPPELAT"; + if (code == V3ActCode.PDNPPPELCT) + return "PDNPPPELCT"; + if (code == V3ActCode.PDNPPPMNAT) + return "PDNPPPMNAT"; + if (code == V3ActCode.PDNPPPMNCT) + return "PDNPPPMNCT"; + if (code == V3ActCode.PDNPSPELAT) + return "PDNPSPELAT"; + if (code == V3ActCode.PDNPSPELCT) + return "PDNPSPELCT"; + if (code == V3ActCode.PDNPSPMNAT) + return "PDNPSPMNAT"; + if (code == V3ActCode.PDNPSPMNCT) + return "PDNPSPMNCT"; + if (code == V3ActCode.PDPPPPELAT) + return "PDPPPPELAT"; + if (code == V3ActCode.PDPPPPELCT) + return "PDPPPPELCT"; + if (code == V3ActCode.PDPPPPMNAT) + return "PDPPPPMNAT"; + if (code == V3ActCode.PDPPPPMNCT) + return "PDPPPPMNCT"; + if (code == V3ActCode.PDPPSPELAT) + return "PDPPSPELAT"; + if (code == V3ActCode.PDPPSPELCT) + return "PDPPSPELCT"; + if (code == V3ActCode.PDPPSPMNAT) + return "PDPPSPMNAT"; + if (code == V3ActCode.PDPPSPMNCT) + return "PDPPSPMNCT"; + if (code == V3ActCode._INVOICEELEMENTSUBMITTED) + return "_InvoiceElementSubmitted"; + if (code == V3ActCode.SBBLELAT) + return "SBBLELAT"; + if (code == V3ActCode.SBBLELCT) + return "SBBLELCT"; + if (code == V3ActCode.SBNFELAT) + return "SBNFELAT"; + if (code == V3ActCode.SBNFELCT) + return "SBNFELCT"; + if (code == V3ActCode.SBPDELAT) + return "SBPDELAT"; + if (code == V3ActCode.SBPDELCT) + return "SBPDELCT"; + if (code == V3ActCode._ACTINVOICEOVERRIDECODE) + return "_ActInvoiceOverrideCode"; + if (code == V3ActCode.COVGE) + return "COVGE"; + if (code == V3ActCode.EFORM) + return "EFORM"; + if (code == V3ActCode.FAX) + return "FAX"; + if (code == V3ActCode.GFTH) + return "GFTH"; + if (code == V3ActCode.LATE) + return "LATE"; + if (code == V3ActCode.MANUAL) + return "MANUAL"; + if (code == V3ActCode.OOJ) + return "OOJ"; + if (code == V3ActCode.ORTHO) + return "ORTHO"; + if (code == V3ActCode.PAPER) + return "PAPER"; + if (code == V3ActCode.PIE) + return "PIE"; + if (code == V3ActCode.PYRDELAY) + return "PYRDELAY"; + if (code == V3ActCode.REFNR) + return "REFNR"; + if (code == V3ActCode.REPSERV) + return "REPSERV"; + if (code == V3ActCode.UNRELAT) + return "UNRELAT"; + if (code == V3ActCode.VERBAUTH) + return "VERBAUTH"; + if (code == V3ActCode._ACTLISTCODE) + return "_ActListCode"; + if (code == V3ActCode._ACTOBSERVATIONLIST) + return "_ActObservationList"; + if (code == V3ActCode.CARELIST) + return "CARELIST"; + if (code == V3ActCode.CONDLIST) + return "CONDLIST"; + if (code == V3ActCode.INTOLIST) + return "INTOLIST"; + if (code == V3ActCode.PROBLIST) + return "PROBLIST"; + if (code == V3ActCode.RISKLIST) + return "RISKLIST"; + if (code == V3ActCode.GOALLIST) + return "GOALLIST"; + if (code == V3ActCode._ACTTHERAPYDURATIONWORKINGLISTCODE) + return "_ActTherapyDurationWorkingListCode"; + if (code == V3ActCode._ACTMEDICATIONTHERAPYDURATIONWORKINGLISTCODE) + return "_ActMedicationTherapyDurationWorkingListCode"; + if (code == V3ActCode.ACU) + return "ACU"; + if (code == V3ActCode.CHRON) + return "CHRON"; + if (code == V3ActCode.ONET) + return "ONET"; + if (code == V3ActCode.PRN) + return "PRN"; + if (code == V3ActCode.MEDLIST) + return "MEDLIST"; + if (code == V3ActCode.CURMEDLIST) + return "CURMEDLIST"; + if (code == V3ActCode.DISCMEDLIST) + return "DISCMEDLIST"; + if (code == V3ActCode.HISTMEDLIST) + return "HISTMEDLIST"; + if (code == V3ActCode._ACTMONITORINGPROTOCOLCODE) + return "_ActMonitoringProtocolCode"; + if (code == V3ActCode.CTLSUB) + return "CTLSUB"; + if (code == V3ActCode.INV) + return "INV"; + if (code == V3ActCode.LU) + return "LU"; + if (code == V3ActCode.OTC) + return "OTC"; + if (code == V3ActCode.RX) + return "RX"; + if (code == V3ActCode.SA) + return "SA"; + if (code == V3ActCode.SAC) + return "SAC"; + if (code == V3ActCode._ACTNONOBSERVATIONINDICATIONCODE) + return "_ActNonObservationIndicationCode"; + if (code == V3ActCode.IND01) + return "IND01"; + if (code == V3ActCode.IND02) + return "IND02"; + if (code == V3ActCode.IND03) + return "IND03"; + if (code == V3ActCode.IND04) + return "IND04"; + if (code == V3ActCode.IND05) + return "IND05"; + if (code == V3ActCode._ACTOBSERVATIONVERIFICATIONTYPE) + return "_ActObservationVerificationType"; + if (code == V3ActCode.VFPAPER) + return "VFPAPER"; + if (code == V3ActCode._ACTPAYMENTCODE) + return "_ActPaymentCode"; + if (code == V3ActCode.ACH) + return "ACH"; + if (code == V3ActCode.CHK) + return "CHK"; + if (code == V3ActCode.DDP) + return "DDP"; + if (code == V3ActCode.NON) + return "NON"; + if (code == V3ActCode._ACTPHARMACYSUPPLYTYPE) + return "_ActPharmacySupplyType"; + if (code == V3ActCode.DF) + return "DF"; + if (code == V3ActCode.EM) + return "EM"; + if (code == V3ActCode.SO) + return "SO"; + if (code == V3ActCode.FF) + return "FF"; + if (code == V3ActCode.FFC) + return "FFC"; + if (code == V3ActCode.FFP) + return "FFP"; + if (code == V3ActCode.FFSS) + return "FFSS"; + if (code == V3ActCode.TF) + return "TF"; + if (code == V3ActCode.FS) + return "FS"; + if (code == V3ActCode.MS) + return "MS"; + if (code == V3ActCode.RF) + return "RF"; + if (code == V3ActCode.UD) + return "UD"; + if (code == V3ActCode.RFC) + return "RFC"; + if (code == V3ActCode.RFCS) + return "RFCS"; + if (code == V3ActCode.RFF) + return "RFF"; + if (code == V3ActCode.RFFS) + return "RFFS"; + if (code == V3ActCode.RFP) + return "RFP"; + if (code == V3ActCode.RFPS) + return "RFPS"; + if (code == V3ActCode.RFS) + return "RFS"; + if (code == V3ActCode.TB) + return "TB"; + if (code == V3ActCode.TBS) + return "TBS"; + if (code == V3ActCode.UDE) + return "UDE"; + if (code == V3ActCode._ACTPOLICYTYPE) + return "_ActPolicyType"; + if (code == V3ActCode._ACTPRIVACYPOLICY) + return "_ActPrivacyPolicy"; + if (code == V3ActCode._ACTCONSENTDIRECTIVE) + return "_ActConsentDirective"; + if (code == V3ActCode.EMRGONLY) + return "EMRGONLY"; + if (code == V3ActCode.GRANTORCHOICE) + return "GRANTORCHOICE"; + if (code == V3ActCode.IMPLIED) + return "IMPLIED"; + if (code == V3ActCode.IMPLIEDD) + return "IMPLIEDD"; + if (code == V3ActCode.NOCONSENT) + return "NOCONSENT"; + if (code == V3ActCode.NOPP) + return "NOPP"; + if (code == V3ActCode.OPTIN) + return "OPTIN"; + if (code == V3ActCode.OPTINR) + return "OPTINR"; + if (code == V3ActCode.OPTOUT) + return "OPTOUT"; + if (code == V3ActCode.OPTOUTE) + return "OPTOUTE"; + if (code == V3ActCode._ACTPRIVACYLAW) + return "_ActPrivacyLaw"; + if (code == V3ActCode._ACTUSPRIVACYLAW) + return "_ActUSPrivacyLaw"; + if (code == V3ActCode._42CFRPART2) + return "42CFRPart2"; + if (code == V3ActCode.COMMONRULE) + return "CommonRule"; + if (code == V3ActCode.HIPAANOPP) + return "HIPAANOPP"; + if (code == V3ActCode.HIPAAPSYNOTES) + return "HIPAAPsyNotes"; + if (code == V3ActCode.HIPAASELFPAY) + return "HIPAASelfPay"; + if (code == V3ActCode.TITLE38SECTION7332) + return "Title38Section7332"; + if (code == V3ActCode._INFORMATIONSENSITIVITYPOLICY) + return "_InformationSensitivityPolicy"; + if (code == V3ActCode._ACTINFORMATIONSENSITIVITYPOLICY) + return "_ActInformationSensitivityPolicy"; + if (code == V3ActCode.ETH) + return "ETH"; + if (code == V3ActCode.GDIS) + return "GDIS"; + if (code == V3ActCode.HIV) + return "HIV"; + if (code == V3ActCode.PSY) + return "PSY"; + if (code == V3ActCode.SCA) + return "SCA"; + if (code == V3ActCode.SOC) + return "SOC"; + if (code == V3ActCode.SDV) + return "SDV"; + if (code == V3ActCode.SEX) + return "SEX"; + if (code == V3ActCode.STD) + return "STD"; + if (code == V3ActCode.TBOO) + return "TBOO"; + if (code == V3ActCode.SICKLE) + return "SICKLE"; + if (code == V3ActCode._ENTITYSENSITIVITYPOLICYTYPE) + return "_EntitySensitivityPolicyType"; + if (code == V3ActCode.DEMO) + return "DEMO"; + if (code == V3ActCode.DOB) + return "DOB"; + if (code == V3ActCode.GENDER) + return "GENDER"; + if (code == V3ActCode.LIVARG) + return "LIVARG"; + if (code == V3ActCode.MARST) + return "MARST"; + if (code == V3ActCode.RACE) + return "RACE"; + if (code == V3ActCode.REL) + return "REL"; + if (code == V3ActCode._ROLEINFORMATIONSENSITIVITYPOLICY) + return "_RoleInformationSensitivityPolicy"; + if (code == V3ActCode.B) + return "B"; + if (code == V3ActCode.EMPL) + return "EMPL"; + if (code == V3ActCode.LOCIS) + return "LOCIS"; + if (code == V3ActCode.SSP) + return "SSP"; + if (code == V3ActCode.ADOL) + return "ADOL"; + if (code == V3ActCode.CEL) + return "CEL"; + if (code == V3ActCode.DIA) + return "DIA"; + if (code == V3ActCode.DRGIS) + return "DRGIS"; + if (code == V3ActCode.EMP) + return "EMP"; + if (code == V3ActCode.PDS) + return "PDS"; + if (code == V3ActCode.PRS) + return "PRS"; + if (code == V3ActCode.COMPT) + return "COMPT"; + if (code == V3ActCode.ACOCOMPT) + return "ACOCOMPT"; + if (code == V3ActCode.CTCOMPT) + return "CTCOMPT"; + if (code == V3ActCode.FMCOMPT) + return "FMCOMPT"; + if (code == V3ActCode.HRCOMPT) + return "HRCOMPT"; + if (code == V3ActCode.LRCOMPT) + return "LRCOMPT"; + if (code == V3ActCode.PACOMPT) + return "PACOMPT"; + if (code == V3ActCode.RESCOMPT) + return "RESCOMPT"; + if (code == V3ActCode.RMGTCOMPT) + return "RMGTCOMPT"; + if (code == V3ActCode.ACTTRUSTPOLICYTYPE) + return "ActTrustPolicyType"; + if (code == V3ActCode.TRSTACCRD) + return "TRSTACCRD"; + if (code == V3ActCode.TRSTAGRE) + return "TRSTAGRE"; + if (code == V3ActCode.TRSTASSUR) + return "TRSTASSUR"; + if (code == V3ActCode.TRSTCERT) + return "TRSTCERT"; + if (code == V3ActCode.TRSTFWK) + return "TRSTFWK"; + if (code == V3ActCode.TRSTMEC) + return "TRSTMEC"; + if (code == V3ActCode.COVPOL) + return "COVPOL"; + if (code == V3ActCode.SECURITYPOLICY) + return "SecurityPolicy"; + if (code == V3ActCode.OBLIGATIONPOLICY) + return "ObligationPolicy"; + if (code == V3ActCode.ANONY) + return "ANONY"; + if (code == V3ActCode.AOD) + return "AOD"; + if (code == V3ActCode.AUDIT) + return "AUDIT"; + if (code == V3ActCode.AUDTR) + return "AUDTR"; + if (code == V3ActCode.CPLYCC) + return "CPLYCC"; + if (code == V3ActCode.CPLYCD) + return "CPLYCD"; + if (code == V3ActCode.CPLYJPP) + return "CPLYJPP"; + if (code == V3ActCode.CPLYOPP) + return "CPLYOPP"; + if (code == V3ActCode.CPLYOSP) + return "CPLYOSP"; + if (code == V3ActCode.CPLYPOL) + return "CPLYPOL"; + if (code == V3ActCode.DECLASSIFYLABEL) + return "DECLASSIFYLABEL"; + if (code == V3ActCode.DEID) + return "DEID"; + if (code == V3ActCode.DELAU) + return "DELAU"; + if (code == V3ActCode.DOWNGRDLABEL) + return "DOWNGRDLABEL"; + if (code == V3ActCode.DRIVLABEL) + return "DRIVLABEL"; + if (code == V3ActCode.ENCRYPT) + return "ENCRYPT"; + if (code == V3ActCode.ENCRYPTR) + return "ENCRYPTR"; + if (code == V3ActCode.ENCRYPTT) + return "ENCRYPTT"; + if (code == V3ActCode.ENCRYPTU) + return "ENCRYPTU"; + if (code == V3ActCode.HUAPRV) + return "HUAPRV"; + if (code == V3ActCode.LABEL) + return "LABEL"; + if (code == V3ActCode.MASK) + return "MASK"; + if (code == V3ActCode.MINEC) + return "MINEC"; + if (code == V3ActCode.PERSISTLABEL) + return "PERSISTLABEL"; + if (code == V3ActCode.PRIVMARK) + return "PRIVMARK"; + if (code == V3ActCode.PSEUD) + return "PSEUD"; + if (code == V3ActCode.REDACT) + return "REDACT"; + if (code == V3ActCode.UPGRDLABEL) + return "UPGRDLABEL"; + if (code == V3ActCode.REFRAINPOLICY) + return "RefrainPolicy"; + if (code == V3ActCode.NOAUTH) + return "NOAUTH"; + if (code == V3ActCode.NOCOLLECT) + return "NOCOLLECT"; + if (code == V3ActCode.NODSCLCD) + return "NODSCLCD"; + if (code == V3ActCode.NODSCLCDS) + return "NODSCLCDS"; + if (code == V3ActCode.NOINTEGRATE) + return "NOINTEGRATE"; + if (code == V3ActCode.NOLIST) + return "NOLIST"; + if (code == V3ActCode.NOMOU) + return "NOMOU"; + if (code == V3ActCode.NOORGPOL) + return "NOORGPOL"; + if (code == V3ActCode.NOPAT) + return "NOPAT"; + if (code == V3ActCode.NOPERSISTP) + return "NOPERSISTP"; + if (code == V3ActCode.NORDSCLCD) + return "NORDSCLCD"; + if (code == V3ActCode.NORDSCLCDS) + return "NORDSCLCDS"; + if (code == V3ActCode.NORDSCLW) + return "NORDSCLW"; + if (code == V3ActCode.NORELINK) + return "NORELINK"; + if (code == V3ActCode.NOREUSE) + return "NOREUSE"; + if (code == V3ActCode.NOVIP) + return "NOVIP"; + if (code == V3ActCode.ORCON) + return "ORCON"; + if (code == V3ActCode._ACTPRODUCTACQUISITIONCODE) + return "_ActProductAcquisitionCode"; + if (code == V3ActCode.LOAN) + return "LOAN"; + if (code == V3ActCode.RENT) + return "RENT"; + if (code == V3ActCode.TRANSFER) + return "TRANSFER"; + if (code == V3ActCode.SALE) + return "SALE"; + if (code == V3ActCode._ACTSPECIMENTRANSPORTCODE) + return "_ActSpecimenTransportCode"; + if (code == V3ActCode.SREC) + return "SREC"; + if (code == V3ActCode.SSTOR) + return "SSTOR"; + if (code == V3ActCode.STRAN) + return "STRAN"; + if (code == V3ActCode._ACTSPECIMENTREATMENTCODE) + return "_ActSpecimenTreatmentCode"; + if (code == V3ActCode.ACID) + return "ACID"; + if (code == V3ActCode.ALK) + return "ALK"; + if (code == V3ActCode.DEFB) + return "DEFB"; + if (code == V3ActCode.FILT) + return "FILT"; + if (code == V3ActCode.LDLP) + return "LDLP"; + if (code == V3ActCode.NEUT) + return "NEUT"; + if (code == V3ActCode.RECA) + return "RECA"; + if (code == V3ActCode.UFIL) + return "UFIL"; + if (code == V3ActCode._ACTSUBSTANCEADMINISTRATIONCODE) + return "_ActSubstanceAdministrationCode"; + if (code == V3ActCode.DRUG) + return "DRUG"; + if (code == V3ActCode.FD) + return "FD"; + if (code == V3ActCode.IMMUNIZ) + return "IMMUNIZ"; + if (code == V3ActCode.BOOSTER) + return "BOOSTER"; + if (code == V3ActCode.INITIMMUNIZ) + return "INITIMMUNIZ"; + if (code == V3ActCode._ACTTASKCODE) + return "_ActTaskCode"; + if (code == V3ActCode.OE) + return "OE"; + if (code == V3ActCode.LABOE) + return "LABOE"; + if (code == V3ActCode.MEDOE) + return "MEDOE"; + if (code == V3ActCode.PATDOC) + return "PATDOC"; + if (code == V3ActCode.ALLERLREV) + return "ALLERLREV"; + if (code == V3ActCode.CLINNOTEE) + return "CLINNOTEE"; + if (code == V3ActCode.DIAGLISTE) + return "DIAGLISTE"; + if (code == V3ActCode.DISCHINSTE) + return "DISCHINSTE"; + if (code == V3ActCode.DISCHSUME) + return "DISCHSUME"; + if (code == V3ActCode.PATEDUE) + return "PATEDUE"; + if (code == V3ActCode.PATREPE) + return "PATREPE"; + if (code == V3ActCode.PROBLISTE) + return "PROBLISTE"; + if (code == V3ActCode.RADREPE) + return "RADREPE"; + if (code == V3ActCode.IMMLREV) + return "IMMLREV"; + if (code == V3ActCode.REMLREV) + return "REMLREV"; + if (code == V3ActCode.WELLREMLREV) + return "WELLREMLREV"; + if (code == V3ActCode.PATINFO) + return "PATINFO"; + if (code == V3ActCode.ALLERLE) + return "ALLERLE"; + if (code == V3ActCode.CDSREV) + return "CDSREV"; + if (code == V3ActCode.CLINNOTEREV) + return "CLINNOTEREV"; + if (code == V3ActCode.DISCHSUMREV) + return "DISCHSUMREV"; + if (code == V3ActCode.DIAGLISTREV) + return "DIAGLISTREV"; + if (code == V3ActCode.IMMLE) + return "IMMLE"; + if (code == V3ActCode.LABRREV) + return "LABRREV"; + if (code == V3ActCode.MICRORREV) + return "MICRORREV"; + if (code == V3ActCode.MICROORGRREV) + return "MICROORGRREV"; + if (code == V3ActCode.MICROSENSRREV) + return "MICROSENSRREV"; + if (code == V3ActCode.MLREV) + return "MLREV"; + if (code == V3ActCode.MARWLREV) + return "MARWLREV"; + if (code == V3ActCode.OREV) + return "OREV"; + if (code == V3ActCode.PATREPREV) + return "PATREPREV"; + if (code == V3ActCode.PROBLISTREV) + return "PROBLISTREV"; + if (code == V3ActCode.RADREPREV) + return "RADREPREV"; + if (code == V3ActCode.REMLE) + return "REMLE"; + if (code == V3ActCode.WELLREMLE) + return "WELLREMLE"; + if (code == V3ActCode.RISKASSESS) + return "RISKASSESS"; + if (code == V3ActCode.FALLRISK) + return "FALLRISK"; + if (code == V3ActCode._ACTTRANSPORTATIONMODECODE) + return "_ActTransportationModeCode"; + if (code == V3ActCode._ACTPATIENTTRANSPORTATIONMODECODE) + return "_ActPatientTransportationModeCode"; + if (code == V3ActCode.AFOOT) + return "AFOOT"; + if (code == V3ActCode.AMBT) + return "AMBT"; + if (code == V3ActCode.AMBAIR) + return "AMBAIR"; + if (code == V3ActCode.AMBGRND) + return "AMBGRND"; + if (code == V3ActCode.AMBHELO) + return "AMBHELO"; + if (code == V3ActCode.LAWENF) + return "LAWENF"; + if (code == V3ActCode.PRVTRN) + return "PRVTRN"; + if (code == V3ActCode.PUBTRN) + return "PUBTRN"; + if (code == V3ActCode._OBSERVATIONTYPE) + return "_ObservationType"; + if (code == V3ActCode._ACTSPECOBSCODE) + return "_ActSpecObsCode"; + if (code == V3ActCode.ARTBLD) + return "ARTBLD"; + if (code == V3ActCode.DILUTION) + return "DILUTION"; + if (code == V3ActCode.AUTOHIGH) + return "AUTO-HIGH"; + if (code == V3ActCode.AUTOLOW) + return "AUTO-LOW"; + if (code == V3ActCode.PRE) + return "PRE"; + if (code == V3ActCode.RERUN) + return "RERUN"; + if (code == V3ActCode.EVNFCTS) + return "EVNFCTS"; + if (code == V3ActCode.INTFR) + return "INTFR"; + if (code == V3ActCode.FIBRIN) + return "FIBRIN"; + if (code == V3ActCode.HEMOLYSIS) + return "HEMOLYSIS"; + if (code == V3ActCode.ICTERUS) + return "ICTERUS"; + if (code == V3ActCode.LIPEMIA) + return "LIPEMIA"; + if (code == V3ActCode.VOLUME) + return "VOLUME"; + if (code == V3ActCode.AVAILABLE) + return "AVAILABLE"; + if (code == V3ActCode.CONSUMPTION) + return "CONSUMPTION"; + if (code == V3ActCode.CURRENT) + return "CURRENT"; + if (code == V3ActCode.INITIAL) + return "INITIAL"; + if (code == V3ActCode._ANNOTATIONTYPE) + return "_AnnotationType"; + if (code == V3ActCode._ACTPATIENTANNOTATIONTYPE) + return "_ActPatientAnnotationType"; + if (code == V3ActCode.ANNDI) + return "ANNDI"; + if (code == V3ActCode.ANNGEN) + return "ANNGEN"; + if (code == V3ActCode.ANNIMM) + return "ANNIMM"; + if (code == V3ActCode.ANNLAB) + return "ANNLAB"; + if (code == V3ActCode.ANNMED) + return "ANNMED"; + if (code == V3ActCode._GENETICOBSERVATIONTYPE) + return "_GeneticObservationType"; + if (code == V3ActCode.GENE) + return "GENE"; + if (code == V3ActCode._IMMUNIZATIONOBSERVATIONTYPE) + return "_ImmunizationObservationType"; + if (code == V3ActCode.OBSANTC) + return "OBSANTC"; + if (code == V3ActCode.OBSANTV) + return "OBSANTV"; + if (code == V3ActCode._INDIVIDUALCASESAFETYREPORTTYPE) + return "_IndividualCaseSafetyReportType"; + if (code == V3ActCode.PATADVEVNT) + return "PAT_ADV_EVNT"; + if (code == V3ActCode.VACPROBLEM) + return "VAC_PROBLEM"; + if (code == V3ActCode._LOINCOBSERVATIONACTCONTEXTAGETYPE) + return "_LOINCObservationActContextAgeType"; + if (code == V3ActCode._216119) + return "21611-9"; + if (code == V3ActCode._216127) + return "21612-7"; + if (code == V3ActCode._295535) + return "29553-5"; + if (code == V3ActCode._305250) + return "30525-0"; + if (code == V3ActCode._309724) + return "30972-4"; + if (code == V3ActCode._MEDICATIONOBSERVATIONTYPE) + return "_MedicationObservationType"; + if (code == V3ActCode.REPHALFLIFE) + return "REP_HALF_LIFE"; + if (code == V3ActCode.SPLCOATING) + return "SPLCOATING"; + if (code == V3ActCode.SPLCOLOR) + return "SPLCOLOR"; + if (code == V3ActCode.SPLIMAGE) + return "SPLIMAGE"; + if (code == V3ActCode.SPLIMPRINT) + return "SPLIMPRINT"; + if (code == V3ActCode.SPLSCORING) + return "SPLSCORING"; + if (code == V3ActCode.SPLSHAPE) + return "SPLSHAPE"; + if (code == V3ActCode.SPLSIZE) + return "SPLSIZE"; + if (code == V3ActCode.SPLSYMBOL) + return "SPLSYMBOL"; + if (code == V3ActCode._OBSERVATIONISSUETRIGGERCODEDOBSERVATIONTYPE) + return "_ObservationIssueTriggerCodedObservationType"; + if (code == V3ActCode._CASETRANSMISSIONMODE) + return "_CaseTransmissionMode"; + if (code == V3ActCode.AIRTRNS) + return "AIRTRNS"; + if (code == V3ActCode.ANANTRNS) + return "ANANTRNS"; + if (code == V3ActCode.ANHUMTRNS) + return "ANHUMTRNS"; + if (code == V3ActCode.BDYFLDTRNS) + return "BDYFLDTRNS"; + if (code == V3ActCode.BLDTRNS) + return "BLDTRNS"; + if (code == V3ActCode.DERMTRNS) + return "DERMTRNS"; + if (code == V3ActCode.ENVTRNS) + return "ENVTRNS"; + if (code == V3ActCode.FECTRNS) + return "FECTRNS"; + if (code == V3ActCode.FOMTRNS) + return "FOMTRNS"; + if (code == V3ActCode.FOODTRNS) + return "FOODTRNS"; + if (code == V3ActCode.HUMHUMTRNS) + return "HUMHUMTRNS"; + if (code == V3ActCode.INDTRNS) + return "INDTRNS"; + if (code == V3ActCode.LACTTRNS) + return "LACTTRNS"; + if (code == V3ActCode.NOSTRNS) + return "NOSTRNS"; + if (code == V3ActCode.PARTRNS) + return "PARTRNS"; + if (code == V3ActCode.PLACTRNS) + return "PLACTRNS"; + if (code == V3ActCode.SEXTRNS) + return "SEXTRNS"; + if (code == V3ActCode.TRNSFTRNS) + return "TRNSFTRNS"; + if (code == V3ActCode.VECTRNS) + return "VECTRNS"; + if (code == V3ActCode.WATTRNS) + return "WATTRNS"; + if (code == V3ActCode._OBSERVATIONQUALITYMEASUREATTRIBUTE) + return "_ObservationQualityMeasureAttribute"; + if (code == V3ActCode.AGGREGATE) + return "AGGREGATE"; + if (code == V3ActCode.CMPMSRMTH) + return "CMPMSRMTH"; + if (code == V3ActCode.CMPMSRSCRWGHT) + return "CMPMSRSCRWGHT"; + if (code == V3ActCode.COPY) + return "COPY"; + if (code == V3ActCode.CRS) + return "CRS"; + if (code == V3ActCode.DEF) + return "DEF"; + if (code == V3ActCode.DISC) + return "DISC"; + if (code == V3ActCode.FINALDT) + return "FINALDT"; + if (code == V3ActCode.GUIDE) + return "GUIDE"; + if (code == V3ActCode.IDUR) + return "IDUR"; + if (code == V3ActCode.ITMCNT) + return "ITMCNT"; + if (code == V3ActCode.KEY) + return "KEY"; + if (code == V3ActCode.MEDT) + return "MEDT"; + if (code == V3ActCode.MSD) + return "MSD"; + if (code == V3ActCode.MSRADJ) + return "MSRADJ"; + if (code == V3ActCode.MSRAGG) + return "MSRAGG"; + if (code == V3ActCode.MSRIMPROV) + return "MSRIMPROV"; + if (code == V3ActCode.MSRJUR) + return "MSRJUR"; + if (code == V3ActCode.MSRRPTR) + return "MSRRPTR"; + if (code == V3ActCode.MSRRPTTIME) + return "MSRRPTTIME"; + if (code == V3ActCode.MSRSCORE) + return "MSRSCORE"; + if (code == V3ActCode.MSRSET) + return "MSRSET"; + if (code == V3ActCode.MSRTOPIC) + return "MSRTOPIC"; + if (code == V3ActCode.MSRTP) + return "MSRTP"; + if (code == V3ActCode.MSRTYPE) + return "MSRTYPE"; + if (code == V3ActCode.RAT) + return "RAT"; + if (code == V3ActCode.REF) + return "REF"; + if (code == V3ActCode.SDE) + return "SDE"; + if (code == V3ActCode.STRAT) + return "STRAT"; + if (code == V3ActCode.TRANF) + return "TRANF"; + if (code == V3ActCode.USE) + return "USE"; + if (code == V3ActCode._OBSERVATIONSEQUENCETYPE) + return "_ObservationSequenceType"; + if (code == V3ActCode.TIMEABSOLUTE) + return "TIME_ABSOLUTE"; + if (code == V3ActCode.TIMERELATIVE) + return "TIME_RELATIVE"; + if (code == V3ActCode._OBSERVATIONSERIESTYPE) + return "_ObservationSeriesType"; + if (code == V3ActCode._ECGOBSERVATIONSERIESTYPE) + return "_ECGObservationSeriesType"; + if (code == V3ActCode.REPRESENTATIVEBEAT) + return "REPRESENTATIVE_BEAT"; + if (code == V3ActCode.RHYTHM) + return "RHYTHM"; + if (code == V3ActCode._PATIENTIMMUNIZATIONRELATEDOBSERVATIONTYPE) + return "_PatientImmunizationRelatedObservationType"; + if (code == V3ActCode.CLSSRM) + return "CLSSRM"; + if (code == V3ActCode.GRADE) + return "GRADE"; + if (code == V3ActCode.SCHL) + return "SCHL"; + if (code == V3ActCode.SCHLDIV) + return "SCHLDIV"; + if (code == V3ActCode.TEACHER) + return "TEACHER"; + if (code == V3ActCode._POPULATIONINCLUSIONOBSERVATIONTYPE) + return "_PopulationInclusionObservationType"; + if (code == V3ActCode.DENEX) + return "DENEX"; + if (code == V3ActCode.DENEXCEP) + return "DENEXCEP"; + if (code == V3ActCode.DENOM) + return "DENOM"; + if (code == V3ActCode.IPOP) + return "IPOP"; + if (code == V3ActCode.IPPOP) + return "IPPOP"; + if (code == V3ActCode.MSRPOPL) + return "MSRPOPL"; + if (code == V3ActCode.MSRPOPLEX) + return "MSRPOPLEX"; + if (code == V3ActCode.NUMER) + return "NUMER"; + if (code == V3ActCode.NUMEX) + return "NUMEX"; + if (code == V3ActCode._PREFERENCEOBSERVATIONTYPE) + return "_PreferenceObservationType"; + if (code == V3ActCode.PREFSTRENGTH) + return "PREFSTRENGTH"; + if (code == V3ActCode.ADVERSEREACTION) + return "ADVERSE_REACTION"; + if (code == V3ActCode.ASSERTION) + return "ASSERTION"; + if (code == V3ActCode.CASESER) + return "CASESER"; + if (code == V3ActCode.CDIO) + return "CDIO"; + if (code == V3ActCode.CRIT) + return "CRIT"; + if (code == V3ActCode.CTMO) + return "CTMO"; + if (code == V3ActCode.DX) + return "DX"; + if (code == V3ActCode.ADMDX) + return "ADMDX"; + if (code == V3ActCode.DISDX) + return "DISDX"; + if (code == V3ActCode.INTDX) + return "INTDX"; + if (code == V3ActCode.NOI) + return "NOI"; + if (code == V3ActCode.GISTIER) + return "GISTIER"; + if (code == V3ActCode.HHOBS) + return "HHOBS"; + if (code == V3ActCode.ISSUE) + return "ISSUE"; + if (code == V3ActCode._ACTADMINISTRATIVEDETECTEDISSUECODE) + return "_ActAdministrativeDetectedIssueCode"; + if (code == V3ActCode._ACTADMINISTRATIVEAUTHORIZATIONDETECTEDISSUECODE) + return "_ActAdministrativeAuthorizationDetectedIssueCode"; + if (code == V3ActCode.NAT) + return "NAT"; + if (code == V3ActCode.SUPPRESSED) + return "SUPPRESSED"; + if (code == V3ActCode.VALIDAT) + return "VALIDAT"; + if (code == V3ActCode.KEY204) + return "KEY204"; + if (code == V3ActCode.KEY205) + return "KEY205"; + if (code == V3ActCode.COMPLY) + return "COMPLY"; + if (code == V3ActCode.DUPTHPY) + return "DUPTHPY"; + if (code == V3ActCode.DUPTHPCLS) + return "DUPTHPCLS"; + if (code == V3ActCode.DUPTHPGEN) + return "DUPTHPGEN"; + if (code == V3ActCode.ABUSE) + return "ABUSE"; + if (code == V3ActCode.FRAUD) + return "FRAUD"; + if (code == V3ActCode.PLYDOC) + return "PLYDOC"; + if (code == V3ActCode.PLYPHRM) + return "PLYPHRM"; + if (code == V3ActCode.DOSE) + return "DOSE"; + if (code == V3ActCode.DOSECOND) + return "DOSECOND"; + if (code == V3ActCode.DOSEDUR) + return "DOSEDUR"; + if (code == V3ActCode.DOSEDURH) + return "DOSEDURH"; + if (code == V3ActCode.DOSEDURHIND) + return "DOSEDURHIND"; + if (code == V3ActCode.DOSEDURL) + return "DOSEDURL"; + if (code == V3ActCode.DOSEDURLIND) + return "DOSEDURLIND"; + if (code == V3ActCode.DOSEH) + return "DOSEH"; + if (code == V3ActCode.DOSEHINDA) + return "DOSEHINDA"; + if (code == V3ActCode.DOSEHIND) + return "DOSEHIND"; + if (code == V3ActCode.DOSEHINDSA) + return "DOSEHINDSA"; + if (code == V3ActCode.DOSEHINDW) + return "DOSEHINDW"; + if (code == V3ActCode.DOSEIVL) + return "DOSEIVL"; + if (code == V3ActCode.DOSEIVLIND) + return "DOSEIVLIND"; + if (code == V3ActCode.DOSEL) + return "DOSEL"; + if (code == V3ActCode.DOSELINDA) + return "DOSELINDA"; + if (code == V3ActCode.DOSELIND) + return "DOSELIND"; + if (code == V3ActCode.DOSELINDSA) + return "DOSELINDSA"; + if (code == V3ActCode.DOSELINDW) + return "DOSELINDW"; + if (code == V3ActCode.MDOSE) + return "MDOSE"; + if (code == V3ActCode.OBSA) + return "OBSA"; + if (code == V3ActCode.AGE) + return "AGE"; + if (code == V3ActCode.ADALRT) + return "ADALRT"; + if (code == V3ActCode.GEALRT) + return "GEALRT"; + if (code == V3ActCode.PEALRT) + return "PEALRT"; + if (code == V3ActCode.COND) + return "COND"; + if (code == V3ActCode.HGHT) + return "HGHT"; + if (code == V3ActCode.LACT) + return "LACT"; + if (code == V3ActCode.PREG) + return "PREG"; + if (code == V3ActCode.WGHT) + return "WGHT"; + if (code == V3ActCode.CREACT) + return "CREACT"; + if (code == V3ActCode.GEN) + return "GEN"; + if (code == V3ActCode.GEND) + return "GEND"; + if (code == V3ActCode.LAB) + return "LAB"; + if (code == V3ActCode.REACT) + return "REACT"; + if (code == V3ActCode.ALGY) + return "ALGY"; + if (code == V3ActCode.INT) + return "INT"; + if (code == V3ActCode.RREACT) + return "RREACT"; + if (code == V3ActCode.RALG) + return "RALG"; + if (code == V3ActCode.RAR) + return "RAR"; + if (code == V3ActCode.RINT) + return "RINT"; + if (code == V3ActCode.BUS) + return "BUS"; + if (code == V3ActCode.CODEINVAL) + return "CODE_INVAL"; + if (code == V3ActCode.CODEDEPREC) + return "CODE_DEPREC"; + if (code == V3ActCode.FORMAT) + return "FORMAT"; + if (code == V3ActCode.ILLEGAL) + return "ILLEGAL"; + if (code == V3ActCode.LENRANGE) + return "LEN_RANGE"; + if (code == V3ActCode.LENLONG) + return "LEN_LONG"; + if (code == V3ActCode.LENSHORT) + return "LEN_SHORT"; + if (code == V3ActCode.MISSCOND) + return "MISSCOND"; + if (code == V3ActCode.MISSMAND) + return "MISSMAND"; + if (code == V3ActCode.NODUPS) + return "NODUPS"; + if (code == V3ActCode.NOPERSIST) + return "NOPERSIST"; + if (code == V3ActCode.REPRANGE) + return "REP_RANGE"; + if (code == V3ActCode.MAXOCCURS) + return "MAXOCCURS"; + if (code == V3ActCode.MINOCCURS) + return "MINOCCURS"; + if (code == V3ActCode._ACTADMINISTRATIVERULEDETECTEDISSUECODE) + return "_ActAdministrativeRuleDetectedIssueCode"; + if (code == V3ActCode.KEY206) + return "KEY206"; + if (code == V3ActCode.OBSOLETE) + return "OBSOLETE"; + if (code == V3ActCode._ACTSUPPLIEDITEMDETECTEDISSUECODE) + return "_ActSuppliedItemDetectedIssueCode"; + if (code == V3ActCode._ADMINISTRATIONDETECTEDISSUECODE) + return "_AdministrationDetectedIssueCode"; + if (code == V3ActCode._APPROPRIATENESSDETECTEDISSUECODE) + return "_AppropriatenessDetectedIssueCode"; + if (code == V3ActCode._INTERACTIONDETECTEDISSUECODE) + return "_InteractionDetectedIssueCode"; + if (code == V3ActCode.FOOD) + return "FOOD"; + if (code == V3ActCode.TPROD) + return "TPROD"; + if (code == V3ActCode.DRG) + return "DRG"; + if (code == V3ActCode.NHP) + return "NHP"; + if (code == V3ActCode.NONRX) + return "NONRX"; + if (code == V3ActCode.PREVINEF) + return "PREVINEF"; + if (code == V3ActCode.DACT) + return "DACT"; + if (code == V3ActCode.TIME) + return "TIME"; + if (code == V3ActCode.ALRTENDLATE) + return "ALRTENDLATE"; + if (code == V3ActCode.ALRTSTRTLATE) + return "ALRTSTRTLATE"; + if (code == V3ActCode._TIMINGDETECTEDISSUECODE) + return "_TimingDetectedIssueCode"; + if (code == V3ActCode.ENDLATE) + return "ENDLATE"; + if (code == V3ActCode.STRTLATE) + return "STRTLATE"; + if (code == V3ActCode._SUPPLYDETECTEDISSUECODE) + return "_SupplyDetectedIssueCode"; + if (code == V3ActCode.ALLDONE) + return "ALLDONE"; + if (code == V3ActCode.FULFIL) + return "FULFIL"; + if (code == V3ActCode.NOTACTN) + return "NOTACTN"; + if (code == V3ActCode.NOTEQUIV) + return "NOTEQUIV"; + if (code == V3ActCode.NOTEQUIVGEN) + return "NOTEQUIVGEN"; + if (code == V3ActCode.NOTEQUIVTHER) + return "NOTEQUIVTHER"; + if (code == V3ActCode.TIMING) + return "TIMING"; + if (code == V3ActCode.INTERVAL) + return "INTERVAL"; + if (code == V3ActCode.MINFREQ) + return "MINFREQ"; + if (code == V3ActCode.HELD) + return "HELD"; + if (code == V3ActCode.TOOLATE) + return "TOOLATE"; + if (code == V3ActCode.TOOSOON) + return "TOOSOON"; + if (code == V3ActCode.HISTORIC) + return "HISTORIC"; + if (code == V3ActCode.PATPREF) + return "PATPREF"; + if (code == V3ActCode.PATPREFALT) + return "PATPREFALT"; + if (code == V3ActCode.KSUBJ) + return "KSUBJ"; + if (code == V3ActCode.KSUBT) + return "KSUBT"; + if (code == V3ActCode.OINT) + return "OINT"; + if (code == V3ActCode.ALG) + return "ALG"; + if (code == V3ActCode.DALG) + return "DALG"; + if (code == V3ActCode.EALG) + return "EALG"; + if (code == V3ActCode.FALG) + return "FALG"; + if (code == V3ActCode.DINT) + return "DINT"; + if (code == V3ActCode.DNAINT) + return "DNAINT"; + if (code == V3ActCode.EINT) + return "EINT"; + if (code == V3ActCode.ENAINT) + return "ENAINT"; + if (code == V3ActCode.FINT) + return "FINT"; + if (code == V3ActCode.FNAINT) + return "FNAINT"; + if (code == V3ActCode.NAINT) + return "NAINT"; + if (code == V3ActCode.SEV) + return "SEV"; + if (code == V3ActCode._FDALABELDATA) + return "_FDALabelData"; + if (code == V3ActCode.FDACOATING) + return "FDACOATING"; + if (code == V3ActCode.FDACOLOR) + return "FDACOLOR"; + if (code == V3ActCode.FDAIMPRINTCD) + return "FDAIMPRINTCD"; + if (code == V3ActCode.FDALOGO) + return "FDALOGO"; + if (code == V3ActCode.FDASCORING) + return "FDASCORING"; + if (code == V3ActCode.FDASHAPE) + return "FDASHAPE"; + if (code == V3ActCode.FDASIZE) + return "FDASIZE"; + if (code == V3ActCode._ROIOVERLAYSHAPE) + return "_ROIOverlayShape"; + if (code == V3ActCode.CIRCLE) + return "CIRCLE"; + if (code == V3ActCode.ELLIPSE) + return "ELLIPSE"; + if (code == V3ActCode.POINT) + return "POINT"; + if (code == V3ActCode.POLY) + return "POLY"; + if (code == V3ActCode.C) + return "C"; + if (code == V3ActCode.DIET) + return "DIET"; + if (code == V3ActCode.BR) + return "BR"; + if (code == V3ActCode.DM) + return "DM"; + if (code == V3ActCode.FAST) + return "FAST"; + if (code == V3ActCode.FORMULA) + return "FORMULA"; + if (code == V3ActCode.GF) + return "GF"; + if (code == V3ActCode.LF) + return "LF"; + if (code == V3ActCode.LP) + return "LP"; + if (code == V3ActCode.LQ) + return "LQ"; + if (code == V3ActCode.LS) + return "LS"; + if (code == V3ActCode.N) + return "N"; + if (code == V3ActCode.NF) + return "NF"; + if (code == V3ActCode.PAF) + return "PAF"; + if (code == V3ActCode.PAR) + return "PAR"; + if (code == V3ActCode.RD) + return "RD"; + if (code == V3ActCode.SCH) + return "SCH"; + if (code == V3ActCode.SUPPLEMENT) + return "SUPPLEMENT"; + if (code == V3ActCode.T) + return "T"; + if (code == V3ActCode.VLI) + return "VLI"; + if (code == V3ActCode.DRUGPRG) + return "DRUGPRG"; + if (code == V3ActCode.F) + return "F"; + if (code == V3ActCode.PRLMN) + return "PRLMN"; + if (code == V3ActCode.SECOBS) + return "SECOBS"; + if (code == V3ActCode.SECCATOBS) + return "SECCATOBS"; + if (code == V3ActCode.SECCLASSOBS) + return "SECCLASSOBS"; + if (code == V3ActCode.SECCONOBS) + return "SECCONOBS"; + if (code == V3ActCode.SECINTOBS) + return "SECINTOBS"; + if (code == V3ActCode.SECALTINTOBS) + return "SECALTINTOBS"; + if (code == V3ActCode.SECDATINTOBS) + return "SECDATINTOBS"; + if (code == V3ActCode.SECINTCONOBS) + return "SECINTCONOBS"; + if (code == V3ActCode.SECINTPRVOBS) + return "SECINTPRVOBS"; + if (code == V3ActCode.SECINTPRVABOBS) + return "SECINTPRVABOBS"; + if (code == V3ActCode.SECINTPRVRBOBS) + return "SECINTPRVRBOBS"; + if (code == V3ActCode.SECINTSTOBS) + return "SECINTSTOBS"; + if (code == V3ActCode.SECTRSTOBS) + return "SECTRSTOBS"; + if (code == V3ActCode.TRSTACCRDOBS) + return "TRSTACCRDOBS"; + if (code == V3ActCode.TRSTAGREOBS) + return "TRSTAGREOBS"; + if (code == V3ActCode.TRSTCERTOBS) + return "TRSTCERTOBS"; + if (code == V3ActCode.TRSTFWKOBS) + return "TRSTFWKOBS"; + if (code == V3ActCode.TRSTLOAOBS) + return "TRSTLOAOBS"; + if (code == V3ActCode.TRSTMECOBS) + return "TRSTMECOBS"; + if (code == V3ActCode.SUBSIDFFS) + return "SUBSIDFFS"; + if (code == V3ActCode.WRKCOMP) + return "WRKCOMP"; + if (code == V3ActCode._ACTPROCEDURECODE) + return "_ActProcedureCode"; + if (code == V3ActCode._ACTBILLABLESERVICECODE) + return "_ActBillableServiceCode"; + if (code == V3ActCode._HL7DEFINEDACTCODES) + return "_HL7DefinedActCodes"; + if (code == V3ActCode.COPAY) + return "COPAY"; + if (code == V3ActCode.DEDUCT) + return "DEDUCT"; + if (code == V3ActCode.DOSEIND) + return "DOSEIND"; + if (code == V3ActCode.PRA) + return "PRA"; + if (code == V3ActCode.STORE) + return "STORE"; + return "?"; + } + + public String toSystem(V3ActCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActExposureLevelCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActExposureLevelCode.java new file mode 100644 index 00000000000..ad45b3e397a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActExposureLevelCode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActExposureLevelCode { + + /** + * A qualitative measure of the degree of exposure to the causative agent. This includes concepts such as "low", "medium" and "high". This quantifies how the quantity that was available to be administered to the target differs from typical or background levels of the substance. + */ + _ACTEXPOSURELEVELCODE, + /** + * Description: Exposure to an agent at a relatively high level above background. + */ + HIGH, + /** + * Description: Exposure to an agent at a relatively low level above background. + */ + LOW, + /** + * Description: Exposure to an agent at a relatively moderate level above background.A + */ + MEDIUM, + /** + * added to help the parsers + */ + NULL; + public static V3ActExposureLevelCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActExposureLevelCode".equals(codeString)) + return _ACTEXPOSURELEVELCODE; + if ("HIGH".equals(codeString)) + return HIGH; + if ("LOW".equals(codeString)) + return LOW; + if ("MEDIUM".equals(codeString)) + return MEDIUM; + throw new FHIRException("Unknown V3ActExposureLevelCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTEXPOSURELEVELCODE: return "_ActExposureLevelCode"; + case HIGH: return "HIGH"; + case LOW: return "LOW"; + case MEDIUM: return "MEDIUM"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActExposureLevelCode"; + } + public String getDefinition() { + switch (this) { + case _ACTEXPOSURELEVELCODE: return "A qualitative measure of the degree of exposure to the causative agent. This includes concepts such as \"low\", \"medium\" and \"high\". This quantifies how the quantity that was available to be administered to the target differs from typical or background levels of the substance."; + case HIGH: return "Description: Exposure to an agent at a relatively high level above background."; + case LOW: return "Description: Exposure to an agent at a relatively low level above background."; + case MEDIUM: return "Description: Exposure to an agent at a relatively moderate level above background.A"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTEXPOSURELEVELCODE: return "ActExposureLevelCode"; + case HIGH: return "high"; + case LOW: return "low"; + case MEDIUM: return "medium"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActExposureLevelCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActExposureLevelCodeEnumFactory.java new file mode 100644 index 00000000000..faefd862552 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActExposureLevelCodeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActExposureLevelCodeEnumFactory implements EnumFactory { + + public V3ActExposureLevelCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActExposureLevelCode".equals(codeString)) + return V3ActExposureLevelCode._ACTEXPOSURELEVELCODE; + if ("HIGH".equals(codeString)) + return V3ActExposureLevelCode.HIGH; + if ("LOW".equals(codeString)) + return V3ActExposureLevelCode.LOW; + if ("MEDIUM".equals(codeString)) + return V3ActExposureLevelCode.MEDIUM; + throw new IllegalArgumentException("Unknown V3ActExposureLevelCode code '"+codeString+"'"); + } + + public String toCode(V3ActExposureLevelCode code) { + if (code == V3ActExposureLevelCode._ACTEXPOSURELEVELCODE) + return "_ActExposureLevelCode"; + if (code == V3ActExposureLevelCode.HIGH) + return "HIGH"; + if (code == V3ActExposureLevelCode.LOW) + return "LOW"; + if (code == V3ActExposureLevelCode.MEDIUM) + return "MEDIUM"; + return "?"; + } + + public String toSystem(V3ActExposureLevelCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActInvoiceElementModifier.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActInvoiceElementModifier.java new file mode 100644 index 00000000000..974306e2623 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActInvoiceElementModifier.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActInvoiceElementModifier { + + /** + * Electronic form with supporting information to follow. + */ + EFORM, + /** + * Fax with supporting information to follow. + */ + FAX, + /** + * Represents the last invoice from the perspective of the provider. + */ + LINV, + /** + * Paper documentation (or other physical format) with supporting information to follow. + */ + PAPER, + /** + * added to help the parsers + */ + NULL; + public static V3ActInvoiceElementModifier fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EFORM".equals(codeString)) + return EFORM; + if ("FAX".equals(codeString)) + return FAX; + if ("LINV".equals(codeString)) + return LINV; + if ("PAPER".equals(codeString)) + return PAPER; + throw new FHIRException("Unknown V3ActInvoiceElementModifier code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EFORM: return "EFORM"; + case FAX: return "FAX"; + case LINV: return "LINV"; + case PAPER: return "PAPER"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActInvoiceElementModifier"; + } + public String getDefinition() { + switch (this) { + case EFORM: return "Electronic form with supporting information to follow."; + case FAX: return "Fax with supporting information to follow."; + case LINV: return "Represents the last invoice from the perspective of the provider."; + case PAPER: return "Paper documentation (or other physical format) with supporting information to follow."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EFORM: return "Electronic Form To Follow"; + case FAX: return "Fax To Follow"; + case LINV: return "Last Invoice"; + case PAPER: return "Paper Documentation To Follow"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActInvoiceElementModifierEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActInvoiceElementModifierEnumFactory.java new file mode 100644 index 00000000000..31919e3e1a1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActInvoiceElementModifierEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActInvoiceElementModifierEnumFactory implements EnumFactory { + + public V3ActInvoiceElementModifier fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EFORM".equals(codeString)) + return V3ActInvoiceElementModifier.EFORM; + if ("FAX".equals(codeString)) + return V3ActInvoiceElementModifier.FAX; + if ("LINV".equals(codeString)) + return V3ActInvoiceElementModifier.LINV; + if ("PAPER".equals(codeString)) + return V3ActInvoiceElementModifier.PAPER; + throw new IllegalArgumentException("Unknown V3ActInvoiceElementModifier code '"+codeString+"'"); + } + + public String toCode(V3ActInvoiceElementModifier code) { + if (code == V3ActInvoiceElementModifier.EFORM) + return "EFORM"; + if (code == V3ActInvoiceElementModifier.FAX) + return "FAX"; + if (code == V3ActInvoiceElementModifier.LINV) + return "LINV"; + if (code == V3ActInvoiceElementModifier.PAPER) + return "PAPER"; + return "?"; + } + + public String toSystem(V3ActInvoiceElementModifier code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActMood.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActMood.java new file mode 100644 index 00000000000..8325f651cad --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActMood.java @@ -0,0 +1,372 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActMood { + + /** + * These are moods describing activities as they progress in the business cycle, from defined, through planned and ordered to completed. + */ + _ACTMOODCOMPLETIONTRACK, + /** + * Definition: A possible act. + */ + _ACTMOODPOTENTIAL, + /** + * Definition: A definition of a kind of act that can occur . + + + OpenIssue: The semantic constructs embodied in DEF and CRT moods seem indistinguishable, and their uses can readily be determined by the context in which these are used. Therefore, this OpenIssue has been created to declare that it is likely that ActMood.DEF will be "retired" in the future in favor of the more general ActMood.CRT. + */ + DEF, + /** + * Definition: A kind of act that defines a permission that has been granted. + */ + PERM, + /** + * Definition: A kind of act that may occur during the specified time period. + */ + SLOT, + /** + * Definition: An act that actually happens (may be an ongoing act or a documentation of a past act). + */ + EVN, + /** + * Definition: An intention or plan for an act. + + + >UsageNotes: The final outcome of the intent, the act that is intended to occur, is always an event. However the final outcome may be reached indirectly via steps through other intents, such as promise, permission request, or an appointment that may lead to an actual event to occur. Alternatively, the intended act may never occur. + */ + INT, + /** + * Definition: A desire to have an act occur. + */ + _ACTMOODDESIRE, + /** + * Definition: A request (or order) for an act that is part of a defined request/fulfillment cycle. + + + UsageNotes: Use of an HL7 defined request/fulfillment framework is not required to use this mood code. + */ + _ACTMOODACTREQUEST, + /** + * Definition: A request act that is specialized for the appointment scheduling request/fulfillment cycle. An appointment request is fulfilled only and completely by an appointment (APT), i.e., all that the appointment request intends is to create an appointment (the actual act may well not happen if that is the professional decision during the appointment). + */ + ARQ, + /** + * Definition: A request for a permission to perform the act. Typically a payer (or possibly a supervisor) is being requested to give permission to perform the act. As opposed to the RQO, the requestee is not asked to perform or cause to perform the act but only to give the permission. + */ + PERMRQ, + /** + * Definition: A request act that is specialized for an event request/fulfillment cycle. + + + UsageNotes: The fulfillment cycle may involve intermediary fulfilling acts in moods such as PRMS, APT, or even another RQO before being fulfilled by the final event. + + + UsageNotes: The concepts of a "request" and an "order" are viewed as different, because there is an implication of a mandate associated with order. In practice, however, this distinction has no general functional value in the inter-operation of health care computing. "Orders" are commonly refused for a variety of clinical and business reasons, and the notion of a "request" obligates the recipient (the fulfiller) to respond to the sender (the author). Indeed, in many regions, including Australia and Europe, the common term used is "request." + + Thus, the concept embodies both notions, as there is no useful distinction to be made. If a mandate is to be associated with a request, this will be embodied in the "local" business rules applied to the transactions. Should HL7 desire to provide a distinction between these in the future, the individual concepts could be added as specializations of this concept. + + The critical distinction here, is the difference between this concept and an "intent", of which it is a specialization. An intent involves decisions by a single party, the author. A request, however, involves decisions by two parties, the author and the fulfiller, with an obligation on the part of the fulfiller to respond to the request indicating that the fulfiller will indeed fulfill the request. + */ + RQO, + /** + * Definition: A suggestion that an act might be performed. Not an explicit request, and professional responsibility may or may not be present. + */ + PRP, + /** + * Definition: A suggestion that an act should be performed with an acceptance of some degree of professional responsibility for the resulting act. Not an explicit request. . + + + UsageNotes: Where there is no clear definition or applicable concept of "professional responsibilityâ€?, RMD becomes indistinguishable from PRP. . + */ + RMD, + /** + * Definition: A commitment to perform an act (may be either solicited or unsolicited). The committer becomes responsible to the other party for executing the act, and, as a consequence, the other party may rely on the first party to perform or cause to perform the act. + + + UsageNotes: Commitments may be retracted or cancelled. + */ + PRMS, + /** + * Definition: An act that has been scheduled to be performed at a specific place and time. + */ + APT, + /** + * Definition: An act that expresses condition statements for other acts. + */ + _ACTMOODPREDICATE, + /** + * Deprecation Comment: + This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to "true" and use the desired mood for your criterion. + + + Definition: A condition that must be true for the source act to be considered. + */ + CRT, + /** + * Deprecation Comment: + This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to "true" and use the desired mood for your criterion. + + + Definition: A criterion (CRT) that has_match = an event (EVN). + */ + EVN_CRT, + /** + * A criterion expressed over goals (ActMood.GOL). + */ + GOL_CRT, + /** + * A criterion expressed over intents (ActMood.INT). + */ + INT_CRT, + /** + * A criterion expressed over promises (ActMood.PRMS). + */ + PRMS_CRT, + /** + * A criterion expressed over requests or orders (ActMood.RQO). + */ + RQO_CRT, + /** + * A criterion expressed over risks (ActMood.RSK). + */ + RSK_CRT, + /** + * Definition: An act that is considered to have some noteworthy likelihood of occurring in the future (has_match = event). + + + Examples:Prognosis of a condition, Expected date of discharge from hospital, patient will likely need an emergency decompression of the intracranial pressure by morning. + + + UsageNotes:INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with expectation, which is a prediction that something will happen in the future. GOL (goal) reflects a hope rather than a prediction. RSK (risk) reflects a potential negative event that may or may not be expected to happen. + */ + EXPEC, + /** + * Definition: An expectation that is considered to be desirable to occur in the future + + + Examples:Target weight below 80Kg, Stop smoking, Regain ability to walk, goal is to administer thrombolytics to candidate patients presenting with acute myocardial infarction. + + + UsageNotes: INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with goal which doesn't represent an intention to act, merely a hope for an eventual result. A goal is distinct from the intended actions to reach that goal. "I will reduce the dose of drug x to 20mg" is an intent. "I hope to be able to get the patient to the point where I can reduce the dose of drug x to 20mg" is a goal. EXPEC (expectation) reflects a prediction rather than a hope. RSK (risk) reflects a potential negative event rather than a hope. + */ + GOL, + /** + * Definition:An act that may occur in the future and which is regarded as undesirable + + + Examples:Increased risk of DVT, at risk for sub-acute bacterial endocarditis. + + + UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen. + */ + RSK, + /** + * Definition: One of a set of acts that specify an option for the property values that the parent act may have. Typically used in definitions or orders to describe alternatives. An option can only be used as a group, that is, all assigned values must be used together. The actual mood of the act is the same as the parent act, and they must be linked by an actrelationship with type = OPTN. + */ + OPT, + /** + * added to help the parsers + */ + NULL; + public static V3ActMood fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActMoodCompletionTrack".equals(codeString)) + return _ACTMOODCOMPLETIONTRACK; + if ("_ActMoodPotential".equals(codeString)) + return _ACTMOODPOTENTIAL; + if ("DEF".equals(codeString)) + return DEF; + if ("PERM".equals(codeString)) + return PERM; + if ("SLOT".equals(codeString)) + return SLOT; + if ("EVN".equals(codeString)) + return EVN; + if ("INT".equals(codeString)) + return INT; + if ("_ActMoodDesire".equals(codeString)) + return _ACTMOODDESIRE; + if ("_ActMoodActRequest".equals(codeString)) + return _ACTMOODACTREQUEST; + if ("ARQ".equals(codeString)) + return ARQ; + if ("PERMRQ".equals(codeString)) + return PERMRQ; + if ("RQO".equals(codeString)) + return RQO; + if ("PRP".equals(codeString)) + return PRP; + if ("RMD".equals(codeString)) + return RMD; + if ("PRMS".equals(codeString)) + return PRMS; + if ("APT".equals(codeString)) + return APT; + if ("_ActMoodPredicate".equals(codeString)) + return _ACTMOODPREDICATE; + if ("CRT".equals(codeString)) + return CRT; + if ("EVN.CRT".equals(codeString)) + return EVN_CRT; + if ("GOL.CRT".equals(codeString)) + return GOL_CRT; + if ("INT.CRT".equals(codeString)) + return INT_CRT; + if ("PRMS.CRT".equals(codeString)) + return PRMS_CRT; + if ("RQO.CRT".equals(codeString)) + return RQO_CRT; + if ("RSK.CRT".equals(codeString)) + return RSK_CRT; + if ("EXPEC".equals(codeString)) + return EXPEC; + if ("GOL".equals(codeString)) + return GOL; + if ("RSK".equals(codeString)) + return RSK; + if ("OPT".equals(codeString)) + return OPT; + throw new FHIRException("Unknown V3ActMood code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTMOODCOMPLETIONTRACK: return "_ActMoodCompletionTrack"; + case _ACTMOODPOTENTIAL: return "_ActMoodPotential"; + case DEF: return "DEF"; + case PERM: return "PERM"; + case SLOT: return "SLOT"; + case EVN: return "EVN"; + case INT: return "INT"; + case _ACTMOODDESIRE: return "_ActMoodDesire"; + case _ACTMOODACTREQUEST: return "_ActMoodActRequest"; + case ARQ: return "ARQ"; + case PERMRQ: return "PERMRQ"; + case RQO: return "RQO"; + case PRP: return "PRP"; + case RMD: return "RMD"; + case PRMS: return "PRMS"; + case APT: return "APT"; + case _ACTMOODPREDICATE: return "_ActMoodPredicate"; + case CRT: return "CRT"; + case EVN_CRT: return "EVN.CRT"; + case GOL_CRT: return "GOL.CRT"; + case INT_CRT: return "INT.CRT"; + case PRMS_CRT: return "PRMS.CRT"; + case RQO_CRT: return "RQO.CRT"; + case RSK_CRT: return "RSK.CRT"; + case EXPEC: return "EXPEC"; + case GOL: return "GOL"; + case RSK: return "RSK"; + case OPT: return "OPT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActMood"; + } + public String getDefinition() { + switch (this) { + case _ACTMOODCOMPLETIONTRACK: return "These are moods describing activities as they progress in the business cycle, from defined, through planned and ordered to completed."; + case _ACTMOODPOTENTIAL: return "Definition: A possible act."; + case DEF: return "Definition: A definition of a kind of act that can occur .\r\n\n \n OpenIssue: The semantic constructs embodied in DEF and CRT moods seem indistinguishable, and their uses can readily be determined by the context in which these are used. Therefore, this OpenIssue has been created to declare that it is likely that ActMood.DEF will be \"retired\" in the future in favor of the more general ActMood.CRT."; + case PERM: return "Definition: A kind of act that defines a permission that has been granted."; + case SLOT: return "Definition: A kind of act that may occur during the specified time period."; + case EVN: return "Definition: An act that actually happens (may be an ongoing act or a documentation of a past act)."; + case INT: return "Definition: An intention or plan for an act. \r\n\n \n >UsageNotes: The final outcome of the intent, the act that is intended to occur, is always an event. However the final outcome may be reached indirectly via steps through other intents, such as promise, permission request, or an appointment that may lead to an actual event to occur. Alternatively, the intended act may never occur."; + case _ACTMOODDESIRE: return "Definition: A desire to have an act occur."; + case _ACTMOODACTREQUEST: return "Definition: A request (or order) for an act that is part of a defined request/fulfillment cycle.\r\n\n \n UsageNotes: Use of an HL7 defined request/fulfillment framework is not required to use this mood code."; + case ARQ: return "Definition: A request act that is specialized for the appointment scheduling request/fulfillment cycle. An appointment request is fulfilled only and completely by an appointment (APT), i.e., all that the appointment request intends is to create an appointment (the actual act may well not happen if that is the professional decision during the appointment)."; + case PERMRQ: return "Definition: A request for a permission to perform the act. Typically a payer (or possibly a supervisor) is being requested to give permission to perform the act. As opposed to the RQO, the requestee is not asked to perform or cause to perform the act but only to give the permission."; + case RQO: return "Definition: A request act that is specialized for an event request/fulfillment cycle. \r\n\n \n UsageNotes: The fulfillment cycle may involve intermediary fulfilling acts in moods such as PRMS, APT, or even another RQO before being fulfilled by the final event. \r\n\n \n UsageNotes: The concepts of a \"request\" and an \"order\" are viewed as different, because there is an implication of a mandate associated with order. In practice, however, this distinction has no general functional value in the inter-operation of health care computing. \"Orders\" are commonly refused for a variety of clinical and business reasons, and the notion of a \"request\" obligates the recipient (the fulfiller) to respond to the sender (the author). Indeed, in many regions, including Australia and Europe, the common term used is \"request.\"\r\n\n Thus, the concept embodies both notions, as there is no useful distinction to be made. If a mandate is to be associated with a request, this will be embodied in the \"local\" business rules applied to the transactions. Should HL7 desire to provide a distinction between these in the future, the individual concepts could be added as specializations of this concept.\r\n\n The critical distinction here, is the difference between this concept and an \"intent\", of which it is a specialization. An intent involves decisions by a single party, the author. A request, however, involves decisions by two parties, the author and the fulfiller, with an obligation on the part of the fulfiller to respond to the request indicating that the fulfiller will indeed fulfill the request."; + case PRP: return "Definition: A suggestion that an act might be performed. Not an explicit request, and professional responsibility may or may not be present."; + case RMD: return "Definition: A suggestion that an act should be performed with an acceptance of some degree of professional responsibility for the resulting act. Not an explicit request. .\r\n\n \n UsageNotes: Where there is no clear definition or applicable concept of \"professional responsibilityâ€?, RMD becomes indistinguishable from PRP. ."; + case PRMS: return "Definition: A commitment to perform an act (may be either solicited or unsolicited). The committer becomes responsible to the other party for executing the act, and, as a consequence, the other party may rely on the first party to perform or cause to perform the act.\r\n\n \n UsageNotes: Commitments may be retracted or cancelled."; + case APT: return "Definition: An act that has been scheduled to be performed at a specific place and time."; + case _ACTMOODPREDICATE: return "Definition: An act that expresses condition statements for other acts."; + case CRT: return "Deprecation Comment: \n This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to \"true\" and use the desired mood for your criterion.\r\n\n \n Definition: A condition that must be true for the source act to be considered."; + case EVN_CRT: return "Deprecation Comment: \n This concept This codes should no longer be used. Instead, set attribute Act.isCriterionInd to \"true\" and use the desired mood for your criterion.\r\n\n \n Definition: A criterion (CRT) that has_match = an event (EVN)."; + case GOL_CRT: return "A criterion expressed over goals (ActMood.GOL)."; + case INT_CRT: return "A criterion expressed over intents (ActMood.INT)."; + case PRMS_CRT: return "A criterion expressed over promises (ActMood.PRMS)."; + case RQO_CRT: return "A criterion expressed over requests or orders (ActMood.RQO)."; + case RSK_CRT: return "A criterion expressed over risks (ActMood.RSK)."; + case EXPEC: return "Definition: An act that is considered to have some noteworthy likelihood of occurring in the future (has_match = event).\r\n\n \n Examples:Prognosis of a condition, Expected date of discharge from hospital, patient will likely need an emergency decompression of the intracranial pressure by morning.\r\n\n \n UsageNotes:INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with expectation, which is a prediction that something will happen in the future. GOL (goal) reflects a hope rather than a prediction. RSK (risk) reflects a potential negative event that may or may not be expected to happen."; + case GOL: return "Definition: An expectation that is considered to be desirable to occur in the future \r\n\n \n Examples:Target weight below 80Kg, Stop smoking, Regain ability to walk, goal is to administer thrombolytics to candidate patients presenting with acute myocardial infarction.\r\n\n \n UsageNotes: INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with goal which doesn't represent an intention to act, merely a hope for an eventual result. A goal is distinct from the intended actions to reach that goal. \"I will reduce the dose of drug x to 20mg\" is an intent. \"I hope to be able to get the patient to the point where I can reduce the dose of drug x to 20mg\" is a goal. EXPEC (expectation) reflects a prediction rather than a hope. RSK (risk) reflects a potential negative event rather than a hope."; + case RSK: return "Definition:An act that may occur in the future and which is regarded as undesirable \r\n\n \n Examples:Increased risk of DVT, at risk for sub-acute bacterial endocarditis.\r\n\n \n UsageNotes:Note: An observation in RSK mood expresses the undesirable act, and not the underlying risk factor. A risk factor that is present (e.g. obesity, smoking, etc) should be expressed in event mood. INT (intent) reflects a plan for the future, which is a declaration to do something. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen. GOL (goal) reflects a hope to achieve something. EXPEC (expectation) is the prediction of a positive or negative event. This contrasts with RSK (risk), which is the potential that something negative will occur that may or may not ever happen, and may not be expected to happen."; + case OPT: return "Definition: One of a set of acts that specify an option for the property values that the parent act may have. Typically used in definitions or orders to describe alternatives. An option can only be used as a group, that is, all assigned values must be used together. The actual mood of the act is the same as the parent act, and they must be linked by an actrelationship with type = OPTN."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTMOODCOMPLETIONTRACK: return "ActMoodCompletionTrack"; + case _ACTMOODPOTENTIAL: return "potential"; + case DEF: return "definition"; + case PERM: return "permission"; + case SLOT: return "resource slot"; + case EVN: return "event (occurrence)"; + case INT: return "intent"; + case _ACTMOODDESIRE: return "desire"; + case _ACTMOODACTREQUEST: return "act request"; + case ARQ: return "appointment request"; + case PERMRQ: return "permission request"; + case RQO: return "request"; + case PRP: return "proposal"; + case RMD: return "recommendation"; + case PRMS: return "promise"; + case APT: return "appointment"; + case _ACTMOODPREDICATE: return "ActMoodPredicate"; + case CRT: return "criterion"; + case EVN_CRT: return "event criterion"; + case GOL_CRT: return "goal criterion"; + case INT_CRT: return "intent criterion"; + case PRMS_CRT: return "promise criterion"; + case RQO_CRT: return "request criterion"; + case RSK_CRT: return "risk criterion"; + case EXPEC: return "expectation"; + case GOL: return "Goal"; + case RSK: return "risk"; + case OPT: return "option"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActMoodEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActMoodEnumFactory.java new file mode 100644 index 00000000000..3534a18c9db --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActMoodEnumFactory.java @@ -0,0 +1,166 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActMoodEnumFactory implements EnumFactory { + + public V3ActMood fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActMoodCompletionTrack".equals(codeString)) + return V3ActMood._ACTMOODCOMPLETIONTRACK; + if ("_ActMoodPotential".equals(codeString)) + return V3ActMood._ACTMOODPOTENTIAL; + if ("DEF".equals(codeString)) + return V3ActMood.DEF; + if ("PERM".equals(codeString)) + return V3ActMood.PERM; + if ("SLOT".equals(codeString)) + return V3ActMood.SLOT; + if ("EVN".equals(codeString)) + return V3ActMood.EVN; + if ("INT".equals(codeString)) + return V3ActMood.INT; + if ("_ActMoodDesire".equals(codeString)) + return V3ActMood._ACTMOODDESIRE; + if ("_ActMoodActRequest".equals(codeString)) + return V3ActMood._ACTMOODACTREQUEST; + if ("ARQ".equals(codeString)) + return V3ActMood.ARQ; + if ("PERMRQ".equals(codeString)) + return V3ActMood.PERMRQ; + if ("RQO".equals(codeString)) + return V3ActMood.RQO; + if ("PRP".equals(codeString)) + return V3ActMood.PRP; + if ("RMD".equals(codeString)) + return V3ActMood.RMD; + if ("PRMS".equals(codeString)) + return V3ActMood.PRMS; + if ("APT".equals(codeString)) + return V3ActMood.APT; + if ("_ActMoodPredicate".equals(codeString)) + return V3ActMood._ACTMOODPREDICATE; + if ("CRT".equals(codeString)) + return V3ActMood.CRT; + if ("EVN.CRT".equals(codeString)) + return V3ActMood.EVN_CRT; + if ("GOL.CRT".equals(codeString)) + return V3ActMood.GOL_CRT; + if ("INT.CRT".equals(codeString)) + return V3ActMood.INT_CRT; + if ("PRMS.CRT".equals(codeString)) + return V3ActMood.PRMS_CRT; + if ("RQO.CRT".equals(codeString)) + return V3ActMood.RQO_CRT; + if ("RSK.CRT".equals(codeString)) + return V3ActMood.RSK_CRT; + if ("EXPEC".equals(codeString)) + return V3ActMood.EXPEC; + if ("GOL".equals(codeString)) + return V3ActMood.GOL; + if ("RSK".equals(codeString)) + return V3ActMood.RSK; + if ("OPT".equals(codeString)) + return V3ActMood.OPT; + throw new IllegalArgumentException("Unknown V3ActMood code '"+codeString+"'"); + } + + public String toCode(V3ActMood code) { + if (code == V3ActMood._ACTMOODCOMPLETIONTRACK) + return "_ActMoodCompletionTrack"; + if (code == V3ActMood._ACTMOODPOTENTIAL) + return "_ActMoodPotential"; + if (code == V3ActMood.DEF) + return "DEF"; + if (code == V3ActMood.PERM) + return "PERM"; + if (code == V3ActMood.SLOT) + return "SLOT"; + if (code == V3ActMood.EVN) + return "EVN"; + if (code == V3ActMood.INT) + return "INT"; + if (code == V3ActMood._ACTMOODDESIRE) + return "_ActMoodDesire"; + if (code == V3ActMood._ACTMOODACTREQUEST) + return "_ActMoodActRequest"; + if (code == V3ActMood.ARQ) + return "ARQ"; + if (code == V3ActMood.PERMRQ) + return "PERMRQ"; + if (code == V3ActMood.RQO) + return "RQO"; + if (code == V3ActMood.PRP) + return "PRP"; + if (code == V3ActMood.RMD) + return "RMD"; + if (code == V3ActMood.PRMS) + return "PRMS"; + if (code == V3ActMood.APT) + return "APT"; + if (code == V3ActMood._ACTMOODPREDICATE) + return "_ActMoodPredicate"; + if (code == V3ActMood.CRT) + return "CRT"; + if (code == V3ActMood.EVN_CRT) + return "EVN.CRT"; + if (code == V3ActMood.GOL_CRT) + return "GOL.CRT"; + if (code == V3ActMood.INT_CRT) + return "INT.CRT"; + if (code == V3ActMood.PRMS_CRT) + return "PRMS.CRT"; + if (code == V3ActMood.RQO_CRT) + return "RQO.CRT"; + if (code == V3ActMood.RSK_CRT) + return "RSK.CRT"; + if (code == V3ActMood.EXPEC) + return "EXPEC"; + if (code == V3ActMood.GOL) + return "GOL"; + if (code == V3ActMood.RSK) + return "RSK"; + if (code == V3ActMood.OPT) + return "OPT"; + return "?"; + } + + public String toSystem(V3ActMood code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActPriority.java new file mode 100644 index 00000000000..8af489630bb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActPriority.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActPriority { + + /** + * As soon as possible, next highest priority after stat. + */ + A, + /** + * Filler should contact the placer as soon as results are available, even for preliminary results. (Was "C" in HL7 version 2.3's reporting priority.) + */ + CR, + /** + * Filler should contact the placer (or target) to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) + */ + CS, + /** + * Filler should contact the placer to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) + */ + CSP, + /** + * Filler should contact the service recipient (target) to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) + */ + CSR, + /** + * Beneficial to the patient but not essential for survival. + */ + EL, + /** + * An unforeseen combination of circumstances or the resulting state that calls for immediate action. + */ + EM, + /** + * Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation. + */ + P, + /** + * An "as needed" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition. + */ + PRN, + /** + * Routine service, do at usual work hours. + */ + R, + /** + * A report should be prepared and sent as quickly as possible. + */ + RR, + /** + * With highest priority (e.g., emergency). + */ + S, + /** + * It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level). + */ + T, + /** + * Drug is to be used as directed by the prescriber. + */ + UD, + /** + * Calls for prompt action. + */ + UR, + /** + * added to help the parsers + */ + NULL; + public static V3ActPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("CR".equals(codeString)) + return CR; + if ("CS".equals(codeString)) + return CS; + if ("CSP".equals(codeString)) + return CSP; + if ("CSR".equals(codeString)) + return CSR; + if ("EL".equals(codeString)) + return EL; + if ("EM".equals(codeString)) + return EM; + if ("P".equals(codeString)) + return P; + if ("PRN".equals(codeString)) + return PRN; + if ("R".equals(codeString)) + return R; + if ("RR".equals(codeString)) + return RR; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + if ("UD".equals(codeString)) + return UD; + if ("UR".equals(codeString)) + return UR; + throw new FHIRException("Unknown V3ActPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case CR: return "CR"; + case CS: return "CS"; + case CSP: return "CSP"; + case CSR: return "CSR"; + case EL: return "EL"; + case EM: return "EM"; + case P: return "P"; + case PRN: return "PRN"; + case R: return "R"; + case RR: return "RR"; + case S: return "S"; + case T: return "T"; + case UD: return "UD"; + case UR: return "UR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActPriority"; + } + public String getDefinition() { + switch (this) { + case A: return "As soon as possible, next highest priority after stat."; + case CR: return "Filler should contact the placer as soon as results are available, even for preliminary results. (Was \"C\" in HL7 version 2.3's reporting priority.)"; + case CS: return "Filler should contact the placer (or target) to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; + case CSP: return "Filler should contact the placer to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; + case CSR: return "Filler should contact the service recipient (target) to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; + case EL: return "Beneficial to the patient but not essential for survival."; + case EM: return "An unforeseen combination of circumstances or the resulting state that calls for immediate action."; + case P: return "Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation."; + case PRN: return "An \"as needed\" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition."; + case R: return "Routine service, do at usual work hours."; + case RR: return "A report should be prepared and sent as quickly as possible."; + case S: return "With highest priority (e.g., emergency)."; + case T: return "It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level)."; + case UD: return "Drug is to be used as directed by the prescriber."; + case UR: return "Calls for prompt action."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "ASAP"; + case CR: return "callback results"; + case CS: return "callback for scheduling"; + case CSP: return "callback placer for scheduling"; + case CSR: return "contact recipient for scheduling"; + case EL: return "elective"; + case EM: return "emergency"; + case P: return "preop"; + case PRN: return "as needed"; + case R: return "routine"; + case RR: return "rush reporting"; + case S: return "stat"; + case T: return "timing critical"; + case UD: return "use as directed"; + case UR: return "urgent"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActPriorityEnumFactory.java new file mode 100644 index 00000000000..9db7de33746 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActPriorityEnumFactory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActPriorityEnumFactory implements EnumFactory { + + public V3ActPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3ActPriority.A; + if ("CR".equals(codeString)) + return V3ActPriority.CR; + if ("CS".equals(codeString)) + return V3ActPriority.CS; + if ("CSP".equals(codeString)) + return V3ActPriority.CSP; + if ("CSR".equals(codeString)) + return V3ActPriority.CSR; + if ("EL".equals(codeString)) + return V3ActPriority.EL; + if ("EM".equals(codeString)) + return V3ActPriority.EM; + if ("P".equals(codeString)) + return V3ActPriority.P; + if ("PRN".equals(codeString)) + return V3ActPriority.PRN; + if ("R".equals(codeString)) + return V3ActPriority.R; + if ("RR".equals(codeString)) + return V3ActPriority.RR; + if ("S".equals(codeString)) + return V3ActPriority.S; + if ("T".equals(codeString)) + return V3ActPriority.T; + if ("UD".equals(codeString)) + return V3ActPriority.UD; + if ("UR".equals(codeString)) + return V3ActPriority.UR; + throw new IllegalArgumentException("Unknown V3ActPriority code '"+codeString+"'"); + } + + public String toCode(V3ActPriority code) { + if (code == V3ActPriority.A) + return "A"; + if (code == V3ActPriority.CR) + return "CR"; + if (code == V3ActPriority.CS) + return "CS"; + if (code == V3ActPriority.CSP) + return "CSP"; + if (code == V3ActPriority.CSR) + return "CSR"; + if (code == V3ActPriority.EL) + return "EL"; + if (code == V3ActPriority.EM) + return "EM"; + if (code == V3ActPriority.P) + return "P"; + if (code == V3ActPriority.PRN) + return "PRN"; + if (code == V3ActPriority.R) + return "R"; + if (code == V3ActPriority.RR) + return "RR"; + if (code == V3ActPriority.S) + return "S"; + if (code == V3ActPriority.T) + return "T"; + if (code == V3ActPriority.UD) + return "UD"; + if (code == V3ActPriority.UR) + return "UR"; + return "?"; + } + + public String toSystem(V3ActPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActReason.java new file mode 100644 index 00000000000..16e6f946ebe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActReason.java @@ -0,0 +1,2663 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActReason { + + /** + * Identifies the reason the patient is assigned to this accommodation type + */ + _ACTACCOMMODATIONREASON, + /** + * Accommodation requested is not available. + */ + ACCREQNA, + /** + * Accommodation is assigned for floor convenience. + */ + FLRCNV, + /** + * Required for medical reasons(s). + */ + MEDNEC, + /** + * The Patient requested the action + */ + PAT, + /** + * Description:Codes used to specify reasons or criteria relating to coverage provided under a policy or program. May be used to convey reasons pertaining to coverage contractual provisions, including criteria for eligibility, coverage limitations, coverage maximums, or financial participation required of covered parties. + */ + _ACTCOVERAGEREASON, + /** + * Identifies the reason or rational for why a person is eligibile for benefits under an insurance policy or progam. + + + Examples: A person is a claimant under an automobile insurance policy are client deceased & adopted client has been given a new policy identifier. A new employee is eligible for health insurance as an employment benefit. A person meets a government program eligibility criteria for financial, age or health status. + */ + _ELIGIBILITYACTREASONCODE, + /** + * Identifies the reason or rational for why a person is not eligibile for benefits under an insurance policy. + + Examples are client deceased & adopted client has been given a new policy identifier. + */ + _ACTINELIGIBILITYREASON, + /** + * When a client has no contact with the health system for an extended period, coverage is suspended. Client will be reinstated to original start date upon proof of identification, residency etc. + + Example: Coverage may be suspended during a strike situation, when employer benefits for employees are not covered (i.e. not in effect). + */ + COVSUS, + /** + * Client deceased. + */ + DECSD, + /** + * Client was registered in error. + */ + REGERR, + /** + * Definition: Identifies the reason or rational for why a person is eligibile for benefits under an insurance policy or progam. + + + Examples: A person is a claimant under an automobile insurance policy are client deceased & adopted client has been given a new policy identifier. A new employee is eligible for health insurance as an employment benefit. A person meets a government program eligibility criteria for financial, age or health status. + */ + _COVERAGEELIGIBILITYREASON, + /** + * A person becomes eligible for a program based on age. + + + Example: In the U.S., a person who is 65 years of age or older is eligible for Medicare. + */ + AGE, + /** + * A person becomes eligible for insurance or a program because of crime related health condition or injury. + + + Example: A person is a claimant under the U.S. Crime Victims Compensation program. + */ + CRIME, + /** + * A person becomes a claimant under a disability income insurance policy or a disability rehabilitation program because of a health condition or injury which limits the person's ability to earn an income or function without institutionalization. + */ + DIS, + /** + * A person becomes eligible for insurance provided as an employment benefit based on employment status. + */ + EMPLOY, + /** + * A person becomes eligible for a program based on financial criteria. + + + Example: A person whose family income is below a financial threshold for eligibility for Medicaid or SCHIP. + */ + FINAN, + /** + * A person becomes eligible for a program because of a qualifying health condition or injury. + + + Examples: A person is determined to have a qualifying health conditions include pregnancy, HIV/AIDs, tuberculosis, end stage renal disease, breast or cervical cancer, or other condition requiring specialized health services, hospice, institutional or community based care provided under a program + */ + HEALTH, + /** + * A person becomes eligible for a program based on more than one criterion. + + + Examples: In the U.S., a child whose familiy income meets Medicaid financial thresholds and whose age is less than 18 is eligible for the Early and Periodic Screening, Diagnostic, and Treatment program (EPSDT). A person whose family income meets Medicaid financial thresholds and whose age is 65 years or older is eligible for Medicaid and Medicare, and are referred to as dual eligibles. + */ + MULTI, + /** + * A person becomes a claimant under a property and casualty insurance policy because of a related health condition or injury resulting from a circumstance covered under the terms of the policy. + + + Example: A person is a claimant under a homeowners insurance policy because of an injury sustained on the policyholderaTMs premises. + */ + PNC, + /** + * A person becomes eligible for a program based on statutory criteria. + + + Examples: A person is a member of an indigenous group, a veteran of military service, or in the U.S., a recipient of adoption assistance and foster care under Title IV-E of the Social Security. + */ + STATUTORY, + /** + * A person becomes a claimant under a motor vehicle accident insurance because of a motor vehicle accident related health condition or injury. + */ + VEHIC, + /** + * A person becomes eligible for insurance or a program because of a work related health condition or injury. + + + Example: A person is a claimant under the U.S. Black Lung Program. + */ + WORK, + /** + * Description:The rationale or purpose for an act relating to information management, such as archiving information for the purpose of complying with an enterprise data retention policy. + */ + _ACTINFORMATIONMANAGEMENTREASON, + /** + * Description:The rationale or purpose for an act relating to health information management, such as archiving information for the purpose of complying with an organization policy or jurisdictional law relating to data retention. + */ + _ACTHEALTHINFORMATIONMANAGEMENTREASON, + /** + * To perform one or more operations on information to which the patient has not consented as deemed necessary by authorized entities for providing care in the best interest of the patient; providing immediately needed health care for an emergent condition; or for protecting public or third party safety. + + + Usage Notes: Used to convey the reason that a provider or other entity may or has accessed personal healthcare information. Typically, this involves overriding the subject's consent directives. + */ + _ACTCONSENTINFORMATIONACCESSOVERRIDEREASON, + /** + * To perform one or more operations on information to which the patient has not consented by authorized entities for treating a condition which poses an immediate threat to the patient's health and which requires immediate medical intervention. + + + Usage Notes: The patient is unable to provide consent, but the provider determines they have an urgent healthcare related reason to access the record. + */ + OVRER, + /** + * To perform one or more operations on information to which the patient has not consented because deemed incompetent to provide consent. + + + Usage Note: Maps to v2 CON-16 Subject Competence Indicator (ID) 01791 Definition: Identifies whether the subject was deemed competent to provide consent. Refer to table HL7 Table 0136 - Yes/No Indicator and CON-23 Non-Subject Consenter Reason User-defined Table 0502 - Non-Subject Consenter Reason code NC "Subject is not competent to consent". + */ + OVRINCOMP, + /** + * To perform one or more operations on information to which the patient declined to consent for providing health care. + + + Usage Notes: The patient, while able to give consent, has not. However the provider believes it is in the patient's interest to access the record without patient consent. + */ + OVRPJ, + /** + * To perform one or more operations on information to which the patient has not consented for public safety reasons. + + + Usage Notes: The patient, while able to give consent, has not. However, the provider believes that access to masked patient information is justified because of concerns related to public safety. + */ + OVRPS, + /** + * To perform one or more operations on information to which the patient has not consented for third party safety. + + + Usage Notes: The patient, while able to give consent, has not. However, the provider believes that access to masked patient information is justified because of concerns related to the health and safety of one or more third parties. + */ + OVRTPS, + /** + * Reason for performing one or more operations on information, which may be permitted by source system's security policy in accordance with one or more privacy policies and consent directives. + + + Usage Notes: The rationale or purpose for an act relating to the management of personal health information, such as collecting personal health information for research or public health purposes. + */ + PURPOSEOFUSE, + /** + * To perform one or more operations on information for marketing services and products related to health care. + */ + HMARKT, + /** + * To perform one or more operations on information used for conducting administrative and contractual activities related to the provision of health care. + */ + HOPERAT, + /** + * To perform one or more operations on information used for cadaveric organ, eye or tissue donation. + */ + DONAT, + /** + * To perform one or more operations on information used for fraud detection and prevention processes. + */ + FRAUD, + /** + * To perform one or more operations on information used within government processes. + */ + GOV, + /** + * To perform one or more operations on information for conducting activities related to meeting accreditation criteria. + */ + HACCRED, + /** + * To perform one or more operations on information used for conducting activities required to meet a mandate. + */ + HCOMPL, + /** + * To perform one or more operations on information used for handling deceased patient matters. + */ + HDECD, + /** + * To perform one or more operation operations on information used to manage a patient directory. + + + Examples: + + + + facility + enterprise + payer + health information exchange patient directory + */ + HDIRECT, + /** + * To perform one or more operations on information for conducting activities required by legal proceeding. + */ + HLEGAL, + /** + * To perform one or more operations on information used for assessing results and comparative effectiveness achieved by health care practices and interventions. + */ + HOUTCOMS, + /** + * To perform one or more operations on information used for conducting activities to meet program accounting requirements. + */ + HPRGRP, + /** + * To perform one or more operations on information used for conducting administrative activities to improve health care quality. + */ + HQUALIMP, + /** + * To perform one or more operations on information to administer the electronic systems used for the delivery of health care. + */ + HSYSADMIN, + /** + * To perform one or more operations on information to assign, persist, and manage labels to healthcare data to characterize various aspects, such as its security classification, sensitivity, compartment, integrity, and provenance; applicable privacy, consent, security, provenance, and trust policies; and handling caveats such as purpose of use, obligations, and refrain policies. + + Label management includes classification of target data by constructing and binding of a label set per applicable policies, security policy information file semantics, and classification guides. Label management also includes process and procedures for subsequent revision of a label for, e.g., reclassification, downgrading classification, and declassification. + + Label revisions may be triggered by, e.g., expiry of classification period; changes in applicable policy, e.g., revocation of a consent directive; or changes in the governing policy domain in which the data is relocated or a copy of the data is sent. If a label is revised, an audit log should be kept and the provenance of the label changes should be tracked. + */ + LABELING, + /** + * To perform one or more operations on information to assign, persist, and manage metadata to healthcare data to characterize various aspects used for its indexing, discovery, retrieval, and processing by systems, applications, and end users. For example, master index identifier, media type, and location. + */ + METAMGT, + /** + * To perform one or more operations on information to administer health care coverage to an enrollee under a policy or program. + */ + MEMADMIN, + /** + * To perform one or more operations on information for conducting activities required by military processes, procedures, policies, or law. + */ + MILCDM, + /** + * To perform one or more operations on information used for operational activities conducted to administer the delivery of health care to a patient. + */ + PATADMIN, + /** + * To perform one or more operations on information in processes related to ensuring the safety of health care. + */ + PATSFTY, + /** + * To perform one or more operations on information used for monitoring performance of recommended health care practices and interventions. + */ + PERFMSR, + /** + * To perform one or more operations on information used within the health records management process. + */ + RECORDMGT, + /** + * To perform one or more operations on information to design, develop, implement, test, or deploy a healthcare system or application. + */ + SYSDEV, + /** + * To perform one or more operations on information that is simulated or synthetic health data used for testing system capabilities outside of a production or operational system environment. + + + Usage Note: Data marked with a HTEST security label enables an access control system to permit interfacing systems or end users provisioned with a clearance, which includes a HTEST purpose of use attribute, to test, verify, or validate that a system or application will operate in production as intended based on design specifications. + */ + HTEST, + /** + * To perform one or more operations on information used in training and education. + */ + TRAIN, + /** + * To perform one or more operations on information for conducting financial or contractual activities related to payment for provision of health care. + */ + HPAYMT, + /** + * To perform one or more operations on information for provision of additional clinical evidence in support of a request for coverage or payment for health services. + */ + CLMATTCH, + /** + * To perform one or more operations on information for conducting prior authorization or predetermination of coverage for services. + */ + COVAUTH, + /** + * To perform one or more operations on information for conducting activities related to coverage under a program or policy. + */ + COVERAGE, + /** + * To perform one or more operations on information used for conducting eligibility determination for coverage in a program or policy. May entail review of financial status or disability assessment. + */ + ELIGDTRM, + /** + * To perform one or more operations on information used for conducting eligibility verification of coverage in a program or policy. May entail provider contacting coverage source (e.g., government health program such as workers compensation or health plan) for confirmation of enrollment, eligibility for specific services, and any applicable copays. + */ + ELIGVER, + /** + * To perform one or more operations on information used for enrolling a covered party in a program or policy. May entail recording of covered party's and any dependent's demographic information and benefit choices. + */ + ENROLLM, + /** + * To perform one or more operations on information for the process of releasing military personnel from their service obligations, which may include determining service merit, discharge benefits, and disability assessment. + */ + MILDCRG, + /** + * To perform one or more operations on information about the amount remitted for a health care claim. + */ + REMITADV, + /** + * To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge. Use of the data iincludes basic and applied research such as biomedical, population origin or ancestry, translational research, and disease, discipline, specialty specific healthcare research and clinical trial research. + */ + HRESCH, + /** + * To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge. Use of the data must be related to specified biomedical basic or applied research. For example, research on rare plants to determine whether biologic properties may be useful for pharmaceutical development. May be used in combination with clinical trial and other healthcare research purposes of use. + */ + BIORCH, + /** + * To perform one or more operations on information for conducting scientific investigations in accordance with clinical trial protocols to obtain health care knowledge. + */ + CLINTRCH, + /** + * To perform one or more operations on information for conducting scientific investigations in accordance with clinical trial protocols to obtain health care knowledge without provision of patient care. May be post-coordinated or used with other purposes of use such as disease, discipline, specialty, population origins or ancestry, translational healthcare research. For example, a clinical trial conducted on laboratory specimens collected from a specified patient population. + */ + CLINTRCHNPC, + /** + * To perform one or more operations on information for conducting scientific investigations with patient care in accordance with clinical trial protocols to obtain health care knowledge. May be post-coordinated or used with other purposes of use such as disease, discipline, specialty, population origins or ancestry, translational healthcare research. For example, an "off-label" drug used for cancer therapy administer to a specified patient population. + */ + CLINTRCHPC, + /** + * To perform one or more operations on information in preparation for conducting scientific investigation to obtain health care knowledge, such as research on animals or review of patient health records, to determine the feasibility of a clinical trial study; assist with protocol design; or in preparation for institutional review board or ethics committee approval process. May be post-coordinated or used with other purposes of use such as disease, discipline, specialty, population origins or ancestry, translational healthcare research. + */ + PRECLINTRCH, + /** + * To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge. Use of the data must be related to specified conditions, diagnosis, or disease healthcare research. For example, conducting cancer research by testing reaction of tumor cells to certain biologics. May be used in combination with clinical trial and other healthcare research purposes of use. + */ + DSRCH, + /** + * To perform one or more operations on information, including genealogical pedigrees, historical records, surveys, family health data, health records, and genetic information, for conducting scientific investigations to obtain health care knowledge. Use of the data must be related to population origins and/or ancestry healthcare research. For example, gathering genetic specimens from a specific population in order to determine the ancestry and population origins of that group. May be used in combination with clinical trial and other healthcare research purposes of use. + */ + POARCH, + /** + * To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge related to evidence based medicine during the course of providing healthcare treatment. Sometimes referred to as "bench to bedside", which is the iterative feedback loop between healthcare research and clinical trials with input from information collected in the course of routine provision of healthcare. For example, by extending a patient encounter to conduct a survey related to a research topic such as attitudes about use of a wellness device that a patient agreed to use. May be used in combination with clinical trial and other healthcare research purposes of use. + */ + TRANSRCH, + /** + * To perform one or more operations on information in response to a patient's request. + */ + PATRQT, + /** + * To perform one or more operations on information in response to a request by a family member authorized by the patient. + */ + FAMRQT, + /** + * To perform one or more operations on information in response to a request by a person appointed as the patient's legal representative. + */ + PWATRNY, + /** + * To perform one or more operations on information in response to a request by a person authorized by the patient. + */ + SUPNWK, + /** + * To perform one or more operations on information for conducting public health activities, such as the reporting of notifiable conditions. + */ + PUBHLTH, + /** + * To perform one or more operations on information used for provision of immediately needed health care to a population of living subjects located in a disaster zone. + */ + DISASTER, + /** + * To perform one or more operations on information used to prevent injury or disease to living subjects who may be the target of violence. + */ + THREAT, + /** + * To perform one or more operations on information for provision of health care. + */ + TREAT, + /** + * To perform one or more operations on information for provision of health care coordination. + */ + CAREMGT, + /** + * To perform health care as part of the clinical trial protocol. + */ + CLINTRL, + /** + * To perform one or more operations on information for provision of immediately needed health care for an emergent condition. + */ + ETREAT, + /** + * To perform one or more operations on information for provision of health care to a population of living subjects, e.g., needle exchange program. + */ + POPHLTH, + /** + * Description:The rationale or purpose for an act relating to the management of personal information, such as disclosing personal tax information for the purpose of complying with a court order. + */ + _ACTINFORMATIONPRIVACYREASON, + /** + * Description: + */ + MARKT, + /** + * Description:Administrative and contractual processes required to support an activity, product, or service + */ + OPERAT, + /** + * Definition:To provide information as a result of a subpoena. + */ + LEGAL, + /** + * Description:Operational activities conducted for the purposes of meeting of criteria defined by an accrediting entity for an activity, product, or service + */ + ACCRED, + /** + * Description:Operational activities required to meet a mandate related to an activity, product, or service + */ + COMPL, + /** + * Description:Operational activities conducted to administer information relating to entities involves with an activity, product, or service + */ + ENADMIN, + /** + * Description:Operational activities conducted for the purposes of assessing the results of an activity, product, or service + */ + OUTCOMS, + /** + * Description:Operational activities conducted to meet program accounting requirements related to an activity, product, or service + */ + PRGRPT, + /** + * Description:Operational activities conducted for the purposes of improving the quality of an activity, product, or service + */ + QUALIMP, + /** + * Description:Operational activities conducted to administer the electronic systems used for an activity, product, or service + */ + SYSADMN, + /** + * Description:Administrative, financial, and contractual processes related to payment for an activity, product, or service + */ + PAYMT, + /** + * Description:Investigative activities conducted for the purposes of obtaining knowledge + */ + RESCH, + /** + * Description:Provision of a service, product, or capability to an individual or organization + */ + SRVC, + /** + * Description: Types of reasons why a substance is invalid for use. + */ + _ACTINVALIDREASON, + /** + * Description: Storage conditions caused the substance to be ineffective. + */ + ADVSTORAGE, + /** + * Description: Cold chain was not maintained for the substance. + */ + COLDCHNBRK, + /** + * Description: The lot from which the substance was drawn was expired. + */ + EXPLOT, + /** + * The substance was administered outside of the recommended schedule or practice. + */ + OUTSIDESCHED, + /** + * Description: The substance was recalled by the manufacturer. + */ + PRODRECALL, + /** + * Domain specifies the codes used to describe reasons why a Provider is cancelling an Invoice or Invoice Grouping. + */ + _ACTINVOICECANCELREASON, + /** + * The covered party (patient) specified with the Invoice is not correct. + */ + INCCOVPTY, + /** + * The billing information, specified in the Invoice Elements, is not correct. This could include incorrect costing for items included in the Invoice. + */ + INCINVOICE, + /** + * The policy specified with the Invoice is not correct. For example, it may belong to another Adjudicator or Covered Party. + */ + INCPOLICY, + /** + * The provider specified with the Invoice is not correct. + */ + INCPROV, + /** + * A coded description of the reason for why a patient did not receive a scheduled immunization. + + (important for public health strategy + */ + _ACTNOIMMUNIZATIONREASON, + /** + * Definition:Testing has shown that the patient already has immunity to the agent targeted by the immunization. + */ + IMMUNE, + /** + * Definition:The patient currently has a medical condition for which the vaccine is contraindicated or for which precaution is warranted. + */ + MEDPREC, + /** + * Definition:There was no supply of the product on hand to perform the service. + */ + OSTOCK, + /** + * Definition:The patient or their guardian objects to receiving the vaccine. + */ + PATOBJ, + /** + * Definition:The patient or their guardian objects to receiving the vaccine because of philosophical beliefs. + */ + PHILISOP, + /** + * Definition:The patient or their guardian objects to receiving the vaccine on religious grounds. + */ + RELIG, + /** + * Definition:The intended vaccine has expired or is otherwise believed to no longer be effective. + + + Example:Due to temperature exposure. + */ + VACEFF, + /** + * Definition:The patient or their guardian objects to receiving the vaccine because of concerns over its safety. + */ + VACSAF, + /** + * Indicates why a fulfiller refused to fulfill a supply order, and considered it important to notify other providers of their decision. E.g. "Suspect fraud", "Possible abuse", "Contraindicated". + + (used when capturing 'refusal to fill' annotations) + */ + _ACTSUPPLYFULFILLMENTREFUSALREASON, + /** + * Definition:The order has been stopped by the prescriber but this fact has not necessarily captured electronically. + + + Example:A verbal stop, a fax, etc. + */ + FRR01, + /** + * Definition:Order has not been fulfilled within a reasonable amount of time, and may not be current. + */ + FRR02, + /** + * Definition:Data needed to safely act on the order which was expected to become available independent of the order is not yet available + + + Example:Lab results, diagnostic imaging, etc. + */ + FRR03, + /** + * Definition:Product not available or manufactured. Cannot supply. + */ + FRR04, + /** + * Definition:The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product. + */ + FRR05, + /** + * Definition:Fulfiller not able to provide appropriate care associated with fulfilling the order. + + + Example:Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc. + */ + FRR06, + /** + * Definition:Specifies the reason that an event occurred in a clinical research study. + */ + _CLINICALRESEARCHEVENTREASON, + /** + * Definition:The event occurred so that a test or observation performed at a prior event could be performed again due to conditions set forth in the protocol. + */ + RET, + /** + * Definition:The event occurred due to it being scheduled in the research protocol. + */ + SCH, + /** + * Definition:The event occurred in order to terminate the subject's participation in the study. + */ + TRM, + /** + * Definition:The event that occurred was initiated by a study participant (e.g. the subject or the investigator), and did not occur for protocol reasons. + */ + UNS, + /** + * Definition:SSpecifies the reason that a test was performed or observation collected in a clinical research study. + + + Note:This set of codes are not strictly reasons, but are used in the currently Normative standard. Future revisions of the specification will model these as ActRelationships and thes codes may subsequently be retired. Thus, these codes should not be used for new specifications. + */ + _CLINICALRESEARCHOBSERVATIONREASON, + /** + * Definition:The observation or test was neither defined or scheduled in the study protocol. + */ + NPT, + /** + * Definition:The observation or test occurred due to it being defined in the research protocol, and during an activity or event that was scheduled in the protocol. + */ + PPT, + /** + * :The observation or test occurred as defined in the research protocol, but at a point in time not specified in the study protocol. + */ + UPT, + /** + * Description:Indicates why the prescription should be suspended. + */ + _COMBINEDPHARMACYORDERSUSPENDREASONCODE, + /** + * Description:This therapy has been ordered as a backup to a preferred therapy. This order will be released when and if the preferred therapy is unsuccessful. + */ + ALTCHOICE, + /** + * Description:Clarification is required before the order can be acted upon. + */ + CLARIF, + /** + * Description:The current level of the medication in the patient's system is too high. The medication is suspended to allow the level to subside to a safer level. + */ + DRUGHIGH, + /** + * Description:The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. + */ + HOSPADM, + /** + * Description:The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. + */ + LABINT, + /** + * Description:Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. + */ + NONAVAIL, + /** + * Description:The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. + */ + PREG, + /** + * Description:The patient is believed to be allergic to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. + */ + SALG, + /** + * Description:The drug interacts with a short-term treatment that is more urgently required. This order will be resumed when the short-term treatment is complete. + */ + SDDI, + /** + * Description:Another short-term co-occurring therapy fulfills the same purpose as this therapy. This therapy will be resumed when the co-occuring therapy is complete. + */ + SDUPTHER, + /** + * Description:The patient is believed to have an intolerance to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. + */ + SINTOL, + /** + * Description:The drug is contraindicated for patients receiving surgery and the patient is scheduled to be admitted for surgery in the near future. The drug will be resumed when the patient has sufficiently recovered from the surgery. + */ + SURG, + /** + * Description:The patient was previously receiving a medication contraindicated with the current medication. The current medication will remain on hold until the prior medication has been cleansed from their system. + */ + WASHOUT, + /** + * Description:Identifies reasons for nullifying (retracting) a particular control act. + */ + _CONTROLACTNULLIFICATIONREASONCODE, + /** + * Description:The decision on which the recorded information was based was changed before the decision had an effect. + + + Example:Aborted prescription before patient left office, released prescription before suspend took effect. + */ + ALTD, + /** + * Description:The information was recorded incorrectly or was recorded in the wrong record. + */ + EIE, + /** + * Description: There is no match for the record in the database. + */ + NORECMTCH, + /** + * Description: Reasons to refuse a transaction to be undone. + */ + _CONTROLACTNULLIFICATIONREFUSALREASONTYPE, + /** + * The record is already in the requested state. + */ + INRQSTATE, + /** + * Description: There is no match. + */ + NOMATCH, + /** + * Description: There is no match for the product in the master file repository. + */ + NOPRODMTCH, + /** + * Description: There is no match for the service in the master file repository. + */ + NOSERMTCH, + /** + * Description: There is no match for the record and version. + */ + NOVERMTCH, + /** + * Description: There is no permission. + */ + NOPERM, + /** + * Definition:The user does not have permission + */ + NOUSERPERM, + /** + * Description: The agent does not have permission. + */ + NOAGNTPERM, + /** + * Description: The user does not have permission. + */ + NOUSRPERM, + /** + * Description: The record and version requested to update is not the current version. + */ + WRNGVER, + /** + * Identifies why a specific query, request, or other trigger event occurred. + */ + _CONTROLACTREASON, + /** + * Description:Indicates the reason the medication order should be aborted. + */ + _MEDICATIONORDERABORTREASONCODE, + /** + * Description:The medication is no longer being manufactured or is otherwise no longer available. + */ + DISCONT, + /** + * Description:The therapy has been found to not have the desired therapeutic benefit on the patient. + */ + INEFFECT, + /** + * Description:Monitoring the patient while taking the medication, the decision has been made that the therapy is no longer appropriate. + */ + MONIT, + /** + * Description:The underlying condition has been resolved or has evolved such that a different treatment is no longer needed. + */ + NOREQ, + /** + * Description:The product does not have (or no longer has) coverage under the patientaTMs insurance policy. + */ + NOTCOVER, + /** + * Description:The patient refused to take the product. + */ + PREFUS, + /** + * Description:The manufacturer or other agency has requested that stocks of a medication be removed from circulation. + */ + RECALL, + /** + * Description:Item in current order is no longer in use as requested and a new one has/will be created to replace it. + */ + REPLACE, + /** + * Description:The medication is being re-prescribed at a different dosage. + */ + DOSECHG, + /** + * Description:Current order was issued with incorrect data and a new order has/will be created to replace it. + */ + REPLACEFIX, + /** + * Description: { + + public V3ActReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActAccommodationReason".equals(codeString)) + return V3ActReason._ACTACCOMMODATIONREASON; + if ("ACCREQNA".equals(codeString)) + return V3ActReason.ACCREQNA; + if ("FLRCNV".equals(codeString)) + return V3ActReason.FLRCNV; + if ("MEDNEC".equals(codeString)) + return V3ActReason.MEDNEC; + if ("PAT".equals(codeString)) + return V3ActReason.PAT; + if ("_ActCoverageReason".equals(codeString)) + return V3ActReason._ACTCOVERAGEREASON; + if ("_EligibilityActReasonCode".equals(codeString)) + return V3ActReason._ELIGIBILITYACTREASONCODE; + if ("_ActIneligibilityReason".equals(codeString)) + return V3ActReason._ACTINELIGIBILITYREASON; + if ("COVSUS".equals(codeString)) + return V3ActReason.COVSUS; + if ("DECSD".equals(codeString)) + return V3ActReason.DECSD; + if ("REGERR".equals(codeString)) + return V3ActReason.REGERR; + if ("_CoverageEligibilityReason".equals(codeString)) + return V3ActReason._COVERAGEELIGIBILITYREASON; + if ("AGE".equals(codeString)) + return V3ActReason.AGE; + if ("CRIME".equals(codeString)) + return V3ActReason.CRIME; + if ("DIS".equals(codeString)) + return V3ActReason.DIS; + if ("EMPLOY".equals(codeString)) + return V3ActReason.EMPLOY; + if ("FINAN".equals(codeString)) + return V3ActReason.FINAN; + if ("HEALTH".equals(codeString)) + return V3ActReason.HEALTH; + if ("MULTI".equals(codeString)) + return V3ActReason.MULTI; + if ("PNC".equals(codeString)) + return V3ActReason.PNC; + if ("STATUTORY".equals(codeString)) + return V3ActReason.STATUTORY; + if ("VEHIC".equals(codeString)) + return V3ActReason.VEHIC; + if ("WORK".equals(codeString)) + return V3ActReason.WORK; + if ("_ActInformationManagementReason".equals(codeString)) + return V3ActReason._ACTINFORMATIONMANAGEMENTREASON; + if ("_ActHealthInformationManagementReason".equals(codeString)) + return V3ActReason._ACTHEALTHINFORMATIONMANAGEMENTREASON; + if ("_ActConsentInformationAccessOverrideReason".equals(codeString)) + return V3ActReason._ACTCONSENTINFORMATIONACCESSOVERRIDEREASON; + if ("OVRER".equals(codeString)) + return V3ActReason.OVRER; + if ("OVRINCOMP".equals(codeString)) + return V3ActReason.OVRINCOMP; + if ("OVRPJ".equals(codeString)) + return V3ActReason.OVRPJ; + if ("OVRPS".equals(codeString)) + return V3ActReason.OVRPS; + if ("OVRTPS".equals(codeString)) + return V3ActReason.OVRTPS; + if ("PurposeOfUse".equals(codeString)) + return V3ActReason.PURPOSEOFUSE; + if ("HMARKT".equals(codeString)) + return V3ActReason.HMARKT; + if ("HOPERAT".equals(codeString)) + return V3ActReason.HOPERAT; + if ("DONAT".equals(codeString)) + return V3ActReason.DONAT; + if ("FRAUD".equals(codeString)) + return V3ActReason.FRAUD; + if ("GOV".equals(codeString)) + return V3ActReason.GOV; + if ("HACCRED".equals(codeString)) + return V3ActReason.HACCRED; + if ("HCOMPL".equals(codeString)) + return V3ActReason.HCOMPL; + if ("HDECD".equals(codeString)) + return V3ActReason.HDECD; + if ("HDIRECT".equals(codeString)) + return V3ActReason.HDIRECT; + if ("HLEGAL".equals(codeString)) + return V3ActReason.HLEGAL; + if ("HOUTCOMS".equals(codeString)) + return V3ActReason.HOUTCOMS; + if ("HPRGRP".equals(codeString)) + return V3ActReason.HPRGRP; + if ("HQUALIMP".equals(codeString)) + return V3ActReason.HQUALIMP; + if ("HSYSADMIN".equals(codeString)) + return V3ActReason.HSYSADMIN; + if ("LABELING".equals(codeString)) + return V3ActReason.LABELING; + if ("METAMGT".equals(codeString)) + return V3ActReason.METAMGT; + if ("MEMADMIN".equals(codeString)) + return V3ActReason.MEMADMIN; + if ("MILCDM".equals(codeString)) + return V3ActReason.MILCDM; + if ("PATADMIN".equals(codeString)) + return V3ActReason.PATADMIN; + if ("PATSFTY".equals(codeString)) + return V3ActReason.PATSFTY; + if ("PERFMSR".equals(codeString)) + return V3ActReason.PERFMSR; + if ("RECORDMGT".equals(codeString)) + return V3ActReason.RECORDMGT; + if ("SYSDEV".equals(codeString)) + return V3ActReason.SYSDEV; + if ("HTEST".equals(codeString)) + return V3ActReason.HTEST; + if ("TRAIN".equals(codeString)) + return V3ActReason.TRAIN; + if ("HPAYMT".equals(codeString)) + return V3ActReason.HPAYMT; + if ("CLMATTCH".equals(codeString)) + return V3ActReason.CLMATTCH; + if ("COVAUTH".equals(codeString)) + return V3ActReason.COVAUTH; + if ("COVERAGE".equals(codeString)) + return V3ActReason.COVERAGE; + if ("ELIGDTRM".equals(codeString)) + return V3ActReason.ELIGDTRM; + if ("ELIGVER".equals(codeString)) + return V3ActReason.ELIGVER; + if ("ENROLLM".equals(codeString)) + return V3ActReason.ENROLLM; + if ("MILDCRG".equals(codeString)) + return V3ActReason.MILDCRG; + if ("REMITADV".equals(codeString)) + return V3ActReason.REMITADV; + if ("HRESCH".equals(codeString)) + return V3ActReason.HRESCH; + if ("BIORCH".equals(codeString)) + return V3ActReason.BIORCH; + if ("CLINTRCH".equals(codeString)) + return V3ActReason.CLINTRCH; + if ("CLINTRCHNPC".equals(codeString)) + return V3ActReason.CLINTRCHNPC; + if ("CLINTRCHPC".equals(codeString)) + return V3ActReason.CLINTRCHPC; + if ("PRECLINTRCH".equals(codeString)) + return V3ActReason.PRECLINTRCH; + if ("DSRCH".equals(codeString)) + return V3ActReason.DSRCH; + if ("POARCH".equals(codeString)) + return V3ActReason.POARCH; + if ("TRANSRCH".equals(codeString)) + return V3ActReason.TRANSRCH; + if ("PATRQT".equals(codeString)) + return V3ActReason.PATRQT; + if ("FAMRQT".equals(codeString)) + return V3ActReason.FAMRQT; + if ("PWATRNY".equals(codeString)) + return V3ActReason.PWATRNY; + if ("SUPNWK".equals(codeString)) + return V3ActReason.SUPNWK; + if ("PUBHLTH".equals(codeString)) + return V3ActReason.PUBHLTH; + if ("DISASTER".equals(codeString)) + return V3ActReason.DISASTER; + if ("THREAT".equals(codeString)) + return V3ActReason.THREAT; + if ("TREAT".equals(codeString)) + return V3ActReason.TREAT; + if ("CAREMGT".equals(codeString)) + return V3ActReason.CAREMGT; + if ("CLINTRL".equals(codeString)) + return V3ActReason.CLINTRL; + if ("ETREAT".equals(codeString)) + return V3ActReason.ETREAT; + if ("POPHLTH".equals(codeString)) + return V3ActReason.POPHLTH; + if ("_ActInformationPrivacyReason".equals(codeString)) + return V3ActReason._ACTINFORMATIONPRIVACYREASON; + if ("MARKT".equals(codeString)) + return V3ActReason.MARKT; + if ("OPERAT".equals(codeString)) + return V3ActReason.OPERAT; + if ("LEGAL".equals(codeString)) + return V3ActReason.LEGAL; + if ("ACCRED".equals(codeString)) + return V3ActReason.ACCRED; + if ("COMPL".equals(codeString)) + return V3ActReason.COMPL; + if ("ENADMIN".equals(codeString)) + return V3ActReason.ENADMIN; + if ("OUTCOMS".equals(codeString)) + return V3ActReason.OUTCOMS; + if ("PRGRPT".equals(codeString)) + return V3ActReason.PRGRPT; + if ("QUALIMP".equals(codeString)) + return V3ActReason.QUALIMP; + if ("SYSADMN".equals(codeString)) + return V3ActReason.SYSADMN; + if ("PAYMT".equals(codeString)) + return V3ActReason.PAYMT; + if ("RESCH".equals(codeString)) + return V3ActReason.RESCH; + if ("SRVC".equals(codeString)) + return V3ActReason.SRVC; + if ("_ActInvalidReason".equals(codeString)) + return V3ActReason._ACTINVALIDREASON; + if ("ADVSTORAGE".equals(codeString)) + return V3ActReason.ADVSTORAGE; + if ("COLDCHNBRK".equals(codeString)) + return V3ActReason.COLDCHNBRK; + if ("EXPLOT".equals(codeString)) + return V3ActReason.EXPLOT; + if ("OUTSIDESCHED".equals(codeString)) + return V3ActReason.OUTSIDESCHED; + if ("PRODRECALL".equals(codeString)) + return V3ActReason.PRODRECALL; + if ("_ActInvoiceCancelReason".equals(codeString)) + return V3ActReason._ACTINVOICECANCELREASON; + if ("INCCOVPTY".equals(codeString)) + return V3ActReason.INCCOVPTY; + if ("INCINVOICE".equals(codeString)) + return V3ActReason.INCINVOICE; + if ("INCPOLICY".equals(codeString)) + return V3ActReason.INCPOLICY; + if ("INCPROV".equals(codeString)) + return V3ActReason.INCPROV; + if ("_ActNoImmunizationReason".equals(codeString)) + return V3ActReason._ACTNOIMMUNIZATIONREASON; + if ("IMMUNE".equals(codeString)) + return V3ActReason.IMMUNE; + if ("MEDPREC".equals(codeString)) + return V3ActReason.MEDPREC; + if ("OSTOCK".equals(codeString)) + return V3ActReason.OSTOCK; + if ("PATOBJ".equals(codeString)) + return V3ActReason.PATOBJ; + if ("PHILISOP".equals(codeString)) + return V3ActReason.PHILISOP; + if ("RELIG".equals(codeString)) + return V3ActReason.RELIG; + if ("VACEFF".equals(codeString)) + return V3ActReason.VACEFF; + if ("VACSAF".equals(codeString)) + return V3ActReason.VACSAF; + if ("_ActSupplyFulfillmentRefusalReason".equals(codeString)) + return V3ActReason._ACTSUPPLYFULFILLMENTREFUSALREASON; + if ("FRR01".equals(codeString)) + return V3ActReason.FRR01; + if ("FRR02".equals(codeString)) + return V3ActReason.FRR02; + if ("FRR03".equals(codeString)) + return V3ActReason.FRR03; + if ("FRR04".equals(codeString)) + return V3ActReason.FRR04; + if ("FRR05".equals(codeString)) + return V3ActReason.FRR05; + if ("FRR06".equals(codeString)) + return V3ActReason.FRR06; + if ("_ClinicalResearchEventReason".equals(codeString)) + return V3ActReason._CLINICALRESEARCHEVENTREASON; + if ("RET".equals(codeString)) + return V3ActReason.RET; + if ("SCH".equals(codeString)) + return V3ActReason.SCH; + if ("TRM".equals(codeString)) + return V3ActReason.TRM; + if ("UNS".equals(codeString)) + return V3ActReason.UNS; + if ("_ClinicalResearchObservationReason".equals(codeString)) + return V3ActReason._CLINICALRESEARCHOBSERVATIONREASON; + if ("NPT".equals(codeString)) + return V3ActReason.NPT; + if ("PPT".equals(codeString)) + return V3ActReason.PPT; + if ("UPT".equals(codeString)) + return V3ActReason.UPT; + if ("_CombinedPharmacyOrderSuspendReasonCode".equals(codeString)) + return V3ActReason._COMBINEDPHARMACYORDERSUSPENDREASONCODE; + if ("ALTCHOICE".equals(codeString)) + return V3ActReason.ALTCHOICE; + if ("CLARIF".equals(codeString)) + return V3ActReason.CLARIF; + if ("DRUGHIGH".equals(codeString)) + return V3ActReason.DRUGHIGH; + if ("HOSPADM".equals(codeString)) + return V3ActReason.HOSPADM; + if ("LABINT".equals(codeString)) + return V3ActReason.LABINT; + if ("NON-AVAIL".equals(codeString)) + return V3ActReason.NONAVAIL; + if ("PREG".equals(codeString)) + return V3ActReason.PREG; + if ("SALG".equals(codeString)) + return V3ActReason.SALG; + if ("SDDI".equals(codeString)) + return V3ActReason.SDDI; + if ("SDUPTHER".equals(codeString)) + return V3ActReason.SDUPTHER; + if ("SINTOL".equals(codeString)) + return V3ActReason.SINTOL; + if ("SURG".equals(codeString)) + return V3ActReason.SURG; + if ("WASHOUT".equals(codeString)) + return V3ActReason.WASHOUT; + if ("_ControlActNullificationReasonCode".equals(codeString)) + return V3ActReason._CONTROLACTNULLIFICATIONREASONCODE; + if ("ALTD".equals(codeString)) + return V3ActReason.ALTD; + if ("EIE".equals(codeString)) + return V3ActReason.EIE; + if ("NORECMTCH".equals(codeString)) + return V3ActReason.NORECMTCH; + if ("_ControlActNullificationRefusalReasonType".equals(codeString)) + return V3ActReason._CONTROLACTNULLIFICATIONREFUSALREASONTYPE; + if ("INRQSTATE".equals(codeString)) + return V3ActReason.INRQSTATE; + if ("NOMATCH".equals(codeString)) + return V3ActReason.NOMATCH; + if ("NOPRODMTCH".equals(codeString)) + return V3ActReason.NOPRODMTCH; + if ("NOSERMTCH".equals(codeString)) + return V3ActReason.NOSERMTCH; + if ("NOVERMTCH".equals(codeString)) + return V3ActReason.NOVERMTCH; + if ("NOPERM".equals(codeString)) + return V3ActReason.NOPERM; + if ("NOUSERPERM".equals(codeString)) + return V3ActReason.NOUSERPERM; + if ("NOAGNTPERM".equals(codeString)) + return V3ActReason.NOAGNTPERM; + if ("NOUSRPERM".equals(codeString)) + return V3ActReason.NOUSRPERM; + if ("WRNGVER".equals(codeString)) + return V3ActReason.WRNGVER; + if ("_ControlActReason".equals(codeString)) + return V3ActReason._CONTROLACTREASON; + if ("_MedicationOrderAbortReasonCode".equals(codeString)) + return V3ActReason._MEDICATIONORDERABORTREASONCODE; + if ("DISCONT".equals(codeString)) + return V3ActReason.DISCONT; + if ("INEFFECT".equals(codeString)) + return V3ActReason.INEFFECT; + if ("MONIT".equals(codeString)) + return V3ActReason.MONIT; + if ("NOREQ".equals(codeString)) + return V3ActReason.NOREQ; + if ("NOTCOVER".equals(codeString)) + return V3ActReason.NOTCOVER; + if ("PREFUS".equals(codeString)) + return V3ActReason.PREFUS; + if ("RECALL".equals(codeString)) + return V3ActReason.RECALL; + if ("REPLACE".equals(codeString)) + return V3ActReason.REPLACE; + if ("DOSECHG".equals(codeString)) + return V3ActReason.DOSECHG; + if ("REPLACEFIX".equals(codeString)) + return V3ActReason.REPLACEFIX; + if ("UNABLE".equals(codeString)) + return V3ActReason.UNABLE; + if ("_MedicationOrderReleaseReasonCode".equals(codeString)) + return V3ActReason._MEDICATIONORDERRELEASEREASONCODE; + if ("HOLDDONE".equals(codeString)) + return V3ActReason.HOLDDONE; + if ("HOLDINAP".equals(codeString)) + return V3ActReason.HOLDINAP; + if ("_ModifyPrescriptionReasonType".equals(codeString)) + return V3ActReason._MODIFYPRESCRIPTIONREASONTYPE; + if ("ADMINERROR".equals(codeString)) + return V3ActReason.ADMINERROR; + if ("CLINMOD".equals(codeString)) + return V3ActReason.CLINMOD; + if ("_PharmacySupplyEventAbortReason".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYEVENTABORTREASON; + if ("CONTRA".equals(codeString)) + return V3ActReason.CONTRA; + if ("FOABORT".equals(codeString)) + return V3ActReason.FOABORT; + if ("FOSUSP".equals(codeString)) + return V3ActReason.FOSUSP; + if ("NOPICK".equals(codeString)) + return V3ActReason.NOPICK; + if ("PATDEC".equals(codeString)) + return V3ActReason.PATDEC; + if ("QUANTCHG".equals(codeString)) + return V3ActReason.QUANTCHG; + if ("_PharmacySupplyEventStockReasonCode".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYEVENTSTOCKREASONCODE; + if ("FLRSTCK".equals(codeString)) + return V3ActReason.FLRSTCK; + if ("LTC".equals(codeString)) + return V3ActReason.LTC; + if ("OFFICE".equals(codeString)) + return V3ActReason.OFFICE; + if ("PHARM".equals(codeString)) + return V3ActReason.PHARM; + if ("PROG".equals(codeString)) + return V3ActReason.PROG; + if ("_PharmacySupplyRequestRenewalRefusalReasonCode".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYREQUESTRENEWALREFUSALREASONCODE; + if ("ALREADYRX".equals(codeString)) + return V3ActReason.ALREADYRX; + if ("FAMPHYS".equals(codeString)) + return V3ActReason.FAMPHYS; + if ("MODIFY".equals(codeString)) + return V3ActReason.MODIFY; + if ("NEEDAPMT".equals(codeString)) + return V3ActReason.NEEDAPMT; + if ("NOTAVAIL".equals(codeString)) + return V3ActReason.NOTAVAIL; + if ("NOTPAT".equals(codeString)) + return V3ActReason.NOTPAT; + if ("ONHOLD".equals(codeString)) + return V3ActReason.ONHOLD; + if ("PRNA".equals(codeString)) + return V3ActReason.PRNA; + if ("STOPMED".equals(codeString)) + return V3ActReason.STOPMED; + if ("TOOEARLY".equals(codeString)) + return V3ActReason.TOOEARLY; + if ("_SupplyOrderAbortReasonCode".equals(codeString)) + return V3ActReason._SUPPLYORDERABORTREASONCODE; + if ("IMPROV".equals(codeString)) + return V3ActReason.IMPROV; + if ("INTOL".equals(codeString)) + return V3ActReason.INTOL; + if ("NEWSTR".equals(codeString)) + return V3ActReason.NEWSTR; + if ("NEWTHER".equals(codeString)) + return V3ActReason.NEWTHER; + if ("_GenericUpdateReasonCode".equals(codeString)) + return V3ActReason._GENERICUPDATEREASONCODE; + if ("CHGDATA".equals(codeString)) + return V3ActReason.CHGDATA; + if ("FIXDATA".equals(codeString)) + return V3ActReason.FIXDATA; + if ("MDATA".equals(codeString)) + return V3ActReason.MDATA; + if ("NEWDATA".equals(codeString)) + return V3ActReason.NEWDATA; + if ("UMDATA".equals(codeString)) + return V3ActReason.UMDATA; + if ("_PatientProfileQueryReasonCode".equals(codeString)) + return V3ActReason._PATIENTPROFILEQUERYREASONCODE; + if ("ADMREV".equals(codeString)) + return V3ActReason.ADMREV; + if ("PATCAR".equals(codeString)) + return V3ActReason.PATCAR; + if ("PATREQ".equals(codeString)) + return V3ActReason.PATREQ; + if ("PRCREV".equals(codeString)) + return V3ActReason.PRCREV; + if ("REGUL".equals(codeString)) + return V3ActReason.REGUL; + if ("RSRCH".equals(codeString)) + return V3ActReason.RSRCH; + if ("VALIDATION".equals(codeString)) + return V3ActReason.VALIDATION; + if ("_PharmacySupplyRequestFulfillerRevisionRefusalReasonCode".equals(codeString)) + return V3ActReason._PHARMACYSUPPLYREQUESTFULFILLERREVISIONREFUSALREASONCODE; + if ("LOCKED".equals(codeString)) + return V3ActReason.LOCKED; + if ("UNKWNTARGET".equals(codeString)) + return V3ActReason.UNKWNTARGET; + if ("_RefusalReasonCode".equals(codeString)) + return V3ActReason._REFUSALREASONCODE; + if ("_SchedulingActReason".equals(codeString)) + return V3ActReason._SCHEDULINGACTREASON; + if ("BLK".equals(codeString)) + return V3ActReason.BLK; + if ("DEC".equals(codeString)) + return V3ActReason.DEC; + if ("FIN".equals(codeString)) + return V3ActReason.FIN; + if ("MED".equals(codeString)) + return V3ActReason.MED; + if ("MTG".equals(codeString)) + return V3ActReason.MTG; + if ("PHY".equals(codeString)) + return V3ActReason.PHY; + if ("_StatusRevisionRefusalReasonCode".equals(codeString)) + return V3ActReason._STATUSREVISIONREFUSALREASONCODE; + if ("FILLED".equals(codeString)) + return V3ActReason.FILLED; + if ("_SubstanceAdministrationPermissionRefusalReasonCode".equals(codeString)) + return V3ActReason._SUBSTANCEADMINISTRATIONPERMISSIONREFUSALREASONCODE; + if ("PATINELIG".equals(codeString)) + return V3ActReason.PATINELIG; + if ("PROTUNMET".equals(codeString)) + return V3ActReason.PROTUNMET; + if ("PROVUNAUTH".equals(codeString)) + return V3ActReason.PROVUNAUTH; + if ("_SubstanceAdminSubstitutionNotAllowedReason".equals(codeString)) + return V3ActReason._SUBSTANCEADMINSUBSTITUTIONNOTALLOWEDREASON; + if ("ALGINT".equals(codeString)) + return V3ActReason.ALGINT; + if ("COMPCON".equals(codeString)) + return V3ActReason.COMPCON; + if ("THERCHAR".equals(codeString)) + return V3ActReason.THERCHAR; + if ("TRIAL".equals(codeString)) + return V3ActReason.TRIAL; + if ("_SubstanceAdminSubstitutionReason".equals(codeString)) + return V3ActReason._SUBSTANCEADMINSUBSTITUTIONREASON; + if ("CT".equals(codeString)) + return V3ActReason.CT; + if ("FP".equals(codeString)) + return V3ActReason.FP; + if ("OS".equals(codeString)) + return V3ActReason.OS; + if ("RR".equals(codeString)) + return V3ActReason.RR; + if ("_TransferActReason".equals(codeString)) + return V3ActReason._TRANSFERACTREASON; + if ("ER".equals(codeString)) + return V3ActReason.ER; + if ("RQ".equals(codeString)) + return V3ActReason.RQ; + if ("_ActBillableServiceReason".equals(codeString)) + return V3ActReason._ACTBILLABLESERVICEREASON; + if ("_ActBillableClinicalServiceReason".equals(codeString)) + return V3ActReason._ACTBILLABLECLINICALSERVICEREASON; + if ("BONUS".equals(codeString)) + return V3ActReason.BONUS; + if ("CHD".equals(codeString)) + return V3ActReason.CHD; + if ("DEP".equals(codeString)) + return V3ActReason.DEP; + if ("ECH".equals(codeString)) + return V3ActReason.ECH; + if ("EDU".equals(codeString)) + return V3ActReason.EDU; + if ("EMP".equals(codeString)) + return V3ActReason.EMP; + if ("ESP".equals(codeString)) + return V3ActReason.ESP; + if ("FAM".equals(codeString)) + return V3ActReason.FAM; + if ("IND".equals(codeString)) + return V3ActReason.IND; + if ("INVOICE".equals(codeString)) + return V3ActReason.INVOICE; + if ("PROA".equals(codeString)) + return V3ActReason.PROA; + if ("RECOV".equals(codeString)) + return V3ActReason.RECOV; + if ("RETRO".equals(codeString)) + return V3ActReason.RETRO; + if ("SPC".equals(codeString)) + return V3ActReason.SPC; + if ("SPO".equals(codeString)) + return V3ActReason.SPO; + if ("TRAN".equals(codeString)) + return V3ActReason.TRAN; + throw new IllegalArgumentException("Unknown V3ActReason code '"+codeString+"'"); + } + + public String toCode(V3ActReason code) { + if (code == V3ActReason._ACTACCOMMODATIONREASON) + return "_ActAccommodationReason"; + if (code == V3ActReason.ACCREQNA) + return "ACCREQNA"; + if (code == V3ActReason.FLRCNV) + return "FLRCNV"; + if (code == V3ActReason.MEDNEC) + return "MEDNEC"; + if (code == V3ActReason.PAT) + return "PAT"; + if (code == V3ActReason._ACTCOVERAGEREASON) + return "_ActCoverageReason"; + if (code == V3ActReason._ELIGIBILITYACTREASONCODE) + return "_EligibilityActReasonCode"; + if (code == V3ActReason._ACTINELIGIBILITYREASON) + return "_ActIneligibilityReason"; + if (code == V3ActReason.COVSUS) + return "COVSUS"; + if (code == V3ActReason.DECSD) + return "DECSD"; + if (code == V3ActReason.REGERR) + return "REGERR"; + if (code == V3ActReason._COVERAGEELIGIBILITYREASON) + return "_CoverageEligibilityReason"; + if (code == V3ActReason.AGE) + return "AGE"; + if (code == V3ActReason.CRIME) + return "CRIME"; + if (code == V3ActReason.DIS) + return "DIS"; + if (code == V3ActReason.EMPLOY) + return "EMPLOY"; + if (code == V3ActReason.FINAN) + return "FINAN"; + if (code == V3ActReason.HEALTH) + return "HEALTH"; + if (code == V3ActReason.MULTI) + return "MULTI"; + if (code == V3ActReason.PNC) + return "PNC"; + if (code == V3ActReason.STATUTORY) + return "STATUTORY"; + if (code == V3ActReason.VEHIC) + return "VEHIC"; + if (code == V3ActReason.WORK) + return "WORK"; + if (code == V3ActReason._ACTINFORMATIONMANAGEMENTREASON) + return "_ActInformationManagementReason"; + if (code == V3ActReason._ACTHEALTHINFORMATIONMANAGEMENTREASON) + return "_ActHealthInformationManagementReason"; + if (code == V3ActReason._ACTCONSENTINFORMATIONACCESSOVERRIDEREASON) + return "_ActConsentInformationAccessOverrideReason"; + if (code == V3ActReason.OVRER) + return "OVRER"; + if (code == V3ActReason.OVRINCOMP) + return "OVRINCOMP"; + if (code == V3ActReason.OVRPJ) + return "OVRPJ"; + if (code == V3ActReason.OVRPS) + return "OVRPS"; + if (code == V3ActReason.OVRTPS) + return "OVRTPS"; + if (code == V3ActReason.PURPOSEOFUSE) + return "PurposeOfUse"; + if (code == V3ActReason.HMARKT) + return "HMARKT"; + if (code == V3ActReason.HOPERAT) + return "HOPERAT"; + if (code == V3ActReason.DONAT) + return "DONAT"; + if (code == V3ActReason.FRAUD) + return "FRAUD"; + if (code == V3ActReason.GOV) + return "GOV"; + if (code == V3ActReason.HACCRED) + return "HACCRED"; + if (code == V3ActReason.HCOMPL) + return "HCOMPL"; + if (code == V3ActReason.HDECD) + return "HDECD"; + if (code == V3ActReason.HDIRECT) + return "HDIRECT"; + if (code == V3ActReason.HLEGAL) + return "HLEGAL"; + if (code == V3ActReason.HOUTCOMS) + return "HOUTCOMS"; + if (code == V3ActReason.HPRGRP) + return "HPRGRP"; + if (code == V3ActReason.HQUALIMP) + return "HQUALIMP"; + if (code == V3ActReason.HSYSADMIN) + return "HSYSADMIN"; + if (code == V3ActReason.LABELING) + return "LABELING"; + if (code == V3ActReason.METAMGT) + return "METAMGT"; + if (code == V3ActReason.MEMADMIN) + return "MEMADMIN"; + if (code == V3ActReason.MILCDM) + return "MILCDM"; + if (code == V3ActReason.PATADMIN) + return "PATADMIN"; + if (code == V3ActReason.PATSFTY) + return "PATSFTY"; + if (code == V3ActReason.PERFMSR) + return "PERFMSR"; + if (code == V3ActReason.RECORDMGT) + return "RECORDMGT"; + if (code == V3ActReason.SYSDEV) + return "SYSDEV"; + if (code == V3ActReason.HTEST) + return "HTEST"; + if (code == V3ActReason.TRAIN) + return "TRAIN"; + if (code == V3ActReason.HPAYMT) + return "HPAYMT"; + if (code == V3ActReason.CLMATTCH) + return "CLMATTCH"; + if (code == V3ActReason.COVAUTH) + return "COVAUTH"; + if (code == V3ActReason.COVERAGE) + return "COVERAGE"; + if (code == V3ActReason.ELIGDTRM) + return "ELIGDTRM"; + if (code == V3ActReason.ELIGVER) + return "ELIGVER"; + if (code == V3ActReason.ENROLLM) + return "ENROLLM"; + if (code == V3ActReason.MILDCRG) + return "MILDCRG"; + if (code == V3ActReason.REMITADV) + return "REMITADV"; + if (code == V3ActReason.HRESCH) + return "HRESCH"; + if (code == V3ActReason.BIORCH) + return "BIORCH"; + if (code == V3ActReason.CLINTRCH) + return "CLINTRCH"; + if (code == V3ActReason.CLINTRCHNPC) + return "CLINTRCHNPC"; + if (code == V3ActReason.CLINTRCHPC) + return "CLINTRCHPC"; + if (code == V3ActReason.PRECLINTRCH) + return "PRECLINTRCH"; + if (code == V3ActReason.DSRCH) + return "DSRCH"; + if (code == V3ActReason.POARCH) + return "POARCH"; + if (code == V3ActReason.TRANSRCH) + return "TRANSRCH"; + if (code == V3ActReason.PATRQT) + return "PATRQT"; + if (code == V3ActReason.FAMRQT) + return "FAMRQT"; + if (code == V3ActReason.PWATRNY) + return "PWATRNY"; + if (code == V3ActReason.SUPNWK) + return "SUPNWK"; + if (code == V3ActReason.PUBHLTH) + return "PUBHLTH"; + if (code == V3ActReason.DISASTER) + return "DISASTER"; + if (code == V3ActReason.THREAT) + return "THREAT"; + if (code == V3ActReason.TREAT) + return "TREAT"; + if (code == V3ActReason.CAREMGT) + return "CAREMGT"; + if (code == V3ActReason.CLINTRL) + return "CLINTRL"; + if (code == V3ActReason.ETREAT) + return "ETREAT"; + if (code == V3ActReason.POPHLTH) + return "POPHLTH"; + if (code == V3ActReason._ACTINFORMATIONPRIVACYREASON) + return "_ActInformationPrivacyReason"; + if (code == V3ActReason.MARKT) + return "MARKT"; + if (code == V3ActReason.OPERAT) + return "OPERAT"; + if (code == V3ActReason.LEGAL) + return "LEGAL"; + if (code == V3ActReason.ACCRED) + return "ACCRED"; + if (code == V3ActReason.COMPL) + return "COMPL"; + if (code == V3ActReason.ENADMIN) + return "ENADMIN"; + if (code == V3ActReason.OUTCOMS) + return "OUTCOMS"; + if (code == V3ActReason.PRGRPT) + return "PRGRPT"; + if (code == V3ActReason.QUALIMP) + return "QUALIMP"; + if (code == V3ActReason.SYSADMN) + return "SYSADMN"; + if (code == V3ActReason.PAYMT) + return "PAYMT"; + if (code == V3ActReason.RESCH) + return "RESCH"; + if (code == V3ActReason.SRVC) + return "SRVC"; + if (code == V3ActReason._ACTINVALIDREASON) + return "_ActInvalidReason"; + if (code == V3ActReason.ADVSTORAGE) + return "ADVSTORAGE"; + if (code == V3ActReason.COLDCHNBRK) + return "COLDCHNBRK"; + if (code == V3ActReason.EXPLOT) + return "EXPLOT"; + if (code == V3ActReason.OUTSIDESCHED) + return "OUTSIDESCHED"; + if (code == V3ActReason.PRODRECALL) + return "PRODRECALL"; + if (code == V3ActReason._ACTINVOICECANCELREASON) + return "_ActInvoiceCancelReason"; + if (code == V3ActReason.INCCOVPTY) + return "INCCOVPTY"; + if (code == V3ActReason.INCINVOICE) + return "INCINVOICE"; + if (code == V3ActReason.INCPOLICY) + return "INCPOLICY"; + if (code == V3ActReason.INCPROV) + return "INCPROV"; + if (code == V3ActReason._ACTNOIMMUNIZATIONREASON) + return "_ActNoImmunizationReason"; + if (code == V3ActReason.IMMUNE) + return "IMMUNE"; + if (code == V3ActReason.MEDPREC) + return "MEDPREC"; + if (code == V3ActReason.OSTOCK) + return "OSTOCK"; + if (code == V3ActReason.PATOBJ) + return "PATOBJ"; + if (code == V3ActReason.PHILISOP) + return "PHILISOP"; + if (code == V3ActReason.RELIG) + return "RELIG"; + if (code == V3ActReason.VACEFF) + return "VACEFF"; + if (code == V3ActReason.VACSAF) + return "VACSAF"; + if (code == V3ActReason._ACTSUPPLYFULFILLMENTREFUSALREASON) + return "_ActSupplyFulfillmentRefusalReason"; + if (code == V3ActReason.FRR01) + return "FRR01"; + if (code == V3ActReason.FRR02) + return "FRR02"; + if (code == V3ActReason.FRR03) + return "FRR03"; + if (code == V3ActReason.FRR04) + return "FRR04"; + if (code == V3ActReason.FRR05) + return "FRR05"; + if (code == V3ActReason.FRR06) + return "FRR06"; + if (code == V3ActReason._CLINICALRESEARCHEVENTREASON) + return "_ClinicalResearchEventReason"; + if (code == V3ActReason.RET) + return "RET"; + if (code == V3ActReason.SCH) + return "SCH"; + if (code == V3ActReason.TRM) + return "TRM"; + if (code == V3ActReason.UNS) + return "UNS"; + if (code == V3ActReason._CLINICALRESEARCHOBSERVATIONREASON) + return "_ClinicalResearchObservationReason"; + if (code == V3ActReason.NPT) + return "NPT"; + if (code == V3ActReason.PPT) + return "PPT"; + if (code == V3ActReason.UPT) + return "UPT"; + if (code == V3ActReason._COMBINEDPHARMACYORDERSUSPENDREASONCODE) + return "_CombinedPharmacyOrderSuspendReasonCode"; + if (code == V3ActReason.ALTCHOICE) + return "ALTCHOICE"; + if (code == V3ActReason.CLARIF) + return "CLARIF"; + if (code == V3ActReason.DRUGHIGH) + return "DRUGHIGH"; + if (code == V3ActReason.HOSPADM) + return "HOSPADM"; + if (code == V3ActReason.LABINT) + return "LABINT"; + if (code == V3ActReason.NONAVAIL) + return "NON-AVAIL"; + if (code == V3ActReason.PREG) + return "PREG"; + if (code == V3ActReason.SALG) + return "SALG"; + if (code == V3ActReason.SDDI) + return "SDDI"; + if (code == V3ActReason.SDUPTHER) + return "SDUPTHER"; + if (code == V3ActReason.SINTOL) + return "SINTOL"; + if (code == V3ActReason.SURG) + return "SURG"; + if (code == V3ActReason.WASHOUT) + return "WASHOUT"; + if (code == V3ActReason._CONTROLACTNULLIFICATIONREASONCODE) + return "_ControlActNullificationReasonCode"; + if (code == V3ActReason.ALTD) + return "ALTD"; + if (code == V3ActReason.EIE) + return "EIE"; + if (code == V3ActReason.NORECMTCH) + return "NORECMTCH"; + if (code == V3ActReason._CONTROLACTNULLIFICATIONREFUSALREASONTYPE) + return "_ControlActNullificationRefusalReasonType"; + if (code == V3ActReason.INRQSTATE) + return "INRQSTATE"; + if (code == V3ActReason.NOMATCH) + return "NOMATCH"; + if (code == V3ActReason.NOPRODMTCH) + return "NOPRODMTCH"; + if (code == V3ActReason.NOSERMTCH) + return "NOSERMTCH"; + if (code == V3ActReason.NOVERMTCH) + return "NOVERMTCH"; + if (code == V3ActReason.NOPERM) + return "NOPERM"; + if (code == V3ActReason.NOUSERPERM) + return "NOUSERPERM"; + if (code == V3ActReason.NOAGNTPERM) + return "NOAGNTPERM"; + if (code == V3ActReason.NOUSRPERM) + return "NOUSRPERM"; + if (code == V3ActReason.WRNGVER) + return "WRNGVER"; + if (code == V3ActReason._CONTROLACTREASON) + return "_ControlActReason"; + if (code == V3ActReason._MEDICATIONORDERABORTREASONCODE) + return "_MedicationOrderAbortReasonCode"; + if (code == V3ActReason.DISCONT) + return "DISCONT"; + if (code == V3ActReason.INEFFECT) + return "INEFFECT"; + if (code == V3ActReason.MONIT) + return "MONIT"; + if (code == V3ActReason.NOREQ) + return "NOREQ"; + if (code == V3ActReason.NOTCOVER) + return "NOTCOVER"; + if (code == V3ActReason.PREFUS) + return "PREFUS"; + if (code == V3ActReason.RECALL) + return "RECALL"; + if (code == V3ActReason.REPLACE) + return "REPLACE"; + if (code == V3ActReason.DOSECHG) + return "DOSECHG"; + if (code == V3ActReason.REPLACEFIX) + return "REPLACEFIX"; + if (code == V3ActReason.UNABLE) + return "UNABLE"; + if (code == V3ActReason._MEDICATIONORDERRELEASEREASONCODE) + return "_MedicationOrderReleaseReasonCode"; + if (code == V3ActReason.HOLDDONE) + return "HOLDDONE"; + if (code == V3ActReason.HOLDINAP) + return "HOLDINAP"; + if (code == V3ActReason._MODIFYPRESCRIPTIONREASONTYPE) + return "_ModifyPrescriptionReasonType"; + if (code == V3ActReason.ADMINERROR) + return "ADMINERROR"; + if (code == V3ActReason.CLINMOD) + return "CLINMOD"; + if (code == V3ActReason._PHARMACYSUPPLYEVENTABORTREASON) + return "_PharmacySupplyEventAbortReason"; + if (code == V3ActReason.CONTRA) + return "CONTRA"; + if (code == V3ActReason.FOABORT) + return "FOABORT"; + if (code == V3ActReason.FOSUSP) + return "FOSUSP"; + if (code == V3ActReason.NOPICK) + return "NOPICK"; + if (code == V3ActReason.PATDEC) + return "PATDEC"; + if (code == V3ActReason.QUANTCHG) + return "QUANTCHG"; + if (code == V3ActReason._PHARMACYSUPPLYEVENTSTOCKREASONCODE) + return "_PharmacySupplyEventStockReasonCode"; + if (code == V3ActReason.FLRSTCK) + return "FLRSTCK"; + if (code == V3ActReason.LTC) + return "LTC"; + if (code == V3ActReason.OFFICE) + return "OFFICE"; + if (code == V3ActReason.PHARM) + return "PHARM"; + if (code == V3ActReason.PROG) + return "PROG"; + if (code == V3ActReason._PHARMACYSUPPLYREQUESTRENEWALREFUSALREASONCODE) + return "_PharmacySupplyRequestRenewalRefusalReasonCode"; + if (code == V3ActReason.ALREADYRX) + return "ALREADYRX"; + if (code == V3ActReason.FAMPHYS) + return "FAMPHYS"; + if (code == V3ActReason.MODIFY) + return "MODIFY"; + if (code == V3ActReason.NEEDAPMT) + return "NEEDAPMT"; + if (code == V3ActReason.NOTAVAIL) + return "NOTAVAIL"; + if (code == V3ActReason.NOTPAT) + return "NOTPAT"; + if (code == V3ActReason.ONHOLD) + return "ONHOLD"; + if (code == V3ActReason.PRNA) + return "PRNA"; + if (code == V3ActReason.STOPMED) + return "STOPMED"; + if (code == V3ActReason.TOOEARLY) + return "TOOEARLY"; + if (code == V3ActReason._SUPPLYORDERABORTREASONCODE) + return "_SupplyOrderAbortReasonCode"; + if (code == V3ActReason.IMPROV) + return "IMPROV"; + if (code == V3ActReason.INTOL) + return "INTOL"; + if (code == V3ActReason.NEWSTR) + return "NEWSTR"; + if (code == V3ActReason.NEWTHER) + return "NEWTHER"; + if (code == V3ActReason._GENERICUPDATEREASONCODE) + return "_GenericUpdateReasonCode"; + if (code == V3ActReason.CHGDATA) + return "CHGDATA"; + if (code == V3ActReason.FIXDATA) + return "FIXDATA"; + if (code == V3ActReason.MDATA) + return "MDATA"; + if (code == V3ActReason.NEWDATA) + return "NEWDATA"; + if (code == V3ActReason.UMDATA) + return "UMDATA"; + if (code == V3ActReason._PATIENTPROFILEQUERYREASONCODE) + return "_PatientProfileQueryReasonCode"; + if (code == V3ActReason.ADMREV) + return "ADMREV"; + if (code == V3ActReason.PATCAR) + return "PATCAR"; + if (code == V3ActReason.PATREQ) + return "PATREQ"; + if (code == V3ActReason.PRCREV) + return "PRCREV"; + if (code == V3ActReason.REGUL) + return "REGUL"; + if (code == V3ActReason.RSRCH) + return "RSRCH"; + if (code == V3ActReason.VALIDATION) + return "VALIDATION"; + if (code == V3ActReason._PHARMACYSUPPLYREQUESTFULFILLERREVISIONREFUSALREASONCODE) + return "_PharmacySupplyRequestFulfillerRevisionRefusalReasonCode"; + if (code == V3ActReason.LOCKED) + return "LOCKED"; + if (code == V3ActReason.UNKWNTARGET) + return "UNKWNTARGET"; + if (code == V3ActReason._REFUSALREASONCODE) + return "_RefusalReasonCode"; + if (code == V3ActReason._SCHEDULINGACTREASON) + return "_SchedulingActReason"; + if (code == V3ActReason.BLK) + return "BLK"; + if (code == V3ActReason.DEC) + return "DEC"; + if (code == V3ActReason.FIN) + return "FIN"; + if (code == V3ActReason.MED) + return "MED"; + if (code == V3ActReason.MTG) + return "MTG"; + if (code == V3ActReason.PHY) + return "PHY"; + if (code == V3ActReason._STATUSREVISIONREFUSALREASONCODE) + return "_StatusRevisionRefusalReasonCode"; + if (code == V3ActReason.FILLED) + return "FILLED"; + if (code == V3ActReason._SUBSTANCEADMINISTRATIONPERMISSIONREFUSALREASONCODE) + return "_SubstanceAdministrationPermissionRefusalReasonCode"; + if (code == V3ActReason.PATINELIG) + return "PATINELIG"; + if (code == V3ActReason.PROTUNMET) + return "PROTUNMET"; + if (code == V3ActReason.PROVUNAUTH) + return "PROVUNAUTH"; + if (code == V3ActReason._SUBSTANCEADMINSUBSTITUTIONNOTALLOWEDREASON) + return "_SubstanceAdminSubstitutionNotAllowedReason"; + if (code == V3ActReason.ALGINT) + return "ALGINT"; + if (code == V3ActReason.COMPCON) + return "COMPCON"; + if (code == V3ActReason.THERCHAR) + return "THERCHAR"; + if (code == V3ActReason.TRIAL) + return "TRIAL"; + if (code == V3ActReason._SUBSTANCEADMINSUBSTITUTIONREASON) + return "_SubstanceAdminSubstitutionReason"; + if (code == V3ActReason.CT) + return "CT"; + if (code == V3ActReason.FP) + return "FP"; + if (code == V3ActReason.OS) + return "OS"; + if (code == V3ActReason.RR) + return "RR"; + if (code == V3ActReason._TRANSFERACTREASON) + return "_TransferActReason"; + if (code == V3ActReason.ER) + return "ER"; + if (code == V3ActReason.RQ) + return "RQ"; + if (code == V3ActReason._ACTBILLABLESERVICEREASON) + return "_ActBillableServiceReason"; + if (code == V3ActReason._ACTBILLABLECLINICALSERVICEREASON) + return "_ActBillableClinicalServiceReason"; + if (code == V3ActReason.BONUS) + return "BONUS"; + if (code == V3ActReason.CHD) + return "CHD"; + if (code == V3ActReason.DEP) + return "DEP"; + if (code == V3ActReason.ECH) + return "ECH"; + if (code == V3ActReason.EDU) + return "EDU"; + if (code == V3ActReason.EMP) + return "EMP"; + if (code == V3ActReason.ESP) + return "ESP"; + if (code == V3ActReason.FAM) + return "FAM"; + if (code == V3ActReason.IND) + return "IND"; + if (code == V3ActReason.INVOICE) + return "INVOICE"; + if (code == V3ActReason.PROA) + return "PROA"; + if (code == V3ActReason.RECOV) + return "RECOV"; + if (code == V3ActReason.RETRO) + return "RETRO"; + if (code == V3ActReason.SPC) + return "SPC"; + if (code == V3ActReason.SPO) + return "SPO"; + if (code == V3ActReason.TRAN) + return "TRAN"; + return "?"; + } + + public String toSystem(V3ActReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipCheckpoint.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipCheckpoint.java new file mode 100644 index 00000000000..13311a8e206 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipCheckpoint.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipCheckpoint { + + /** + * Condition is tested every time before execution of the service (WHILE condition DO service). + */ + B, + /** + * Condition is tested at the end of a repeated service execution. The service is repeated only if the condition is true (DO service WHILE condition). + */ + E, + /** + * Condition is tested once before the service is executed (IF condition THEN service). + */ + S, + /** + * Condition must be true throughout the execution and the service is interrupted (asynchronously) as soon as the condition turns false (asynchronous WHILE loop). The service must be interruptible. + */ + T, + /** + * Condition is a loop checkpoint, i.e. it is a step of an activity plan and, if negative causes the containing loop to exit. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipCheckpoint fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return B; + if ("E".equals(codeString)) + return E; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ActRelationshipCheckpoint code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case B: return "B"; + case E: return "E"; + case S: return "S"; + case T: return "T"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipCheckpoint"; + } + public String getDefinition() { + switch (this) { + case B: return "Condition is tested every time before execution of the service (WHILE condition DO service)."; + case E: return "Condition is tested at the end of a repeated service execution. The service is repeated only if the condition is true (DO service WHILE condition)."; + case S: return "Condition is tested once before the service is executed (IF condition THEN service)."; + case T: return "Condition must be true throughout the execution and the service is interrupted (asynchronously) as soon as the condition turns false (asynchronous WHILE loop). The service must be interruptible."; + case X: return "Condition is a loop checkpoint, i.e. it is a step of an activity plan and, if negative causes the containing loop to exit."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case B: return "beginning"; + case E: return "end"; + case S: return "entry"; + case T: return "through"; + case X: return "exit"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipCheckpointEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipCheckpointEnumFactory.java new file mode 100644 index 00000000000..861cd3f23c4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipCheckpointEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActRelationshipCheckpointEnumFactory implements EnumFactory { + + public V3ActRelationshipCheckpoint fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return V3ActRelationshipCheckpoint.B; + if ("E".equals(codeString)) + return V3ActRelationshipCheckpoint.E; + if ("S".equals(codeString)) + return V3ActRelationshipCheckpoint.S; + if ("T".equals(codeString)) + return V3ActRelationshipCheckpoint.T; + if ("X".equals(codeString)) + return V3ActRelationshipCheckpoint.X; + throw new IllegalArgumentException("Unknown V3ActRelationshipCheckpoint code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipCheckpoint code) { + if (code == V3ActRelationshipCheckpoint.B) + return "B"; + if (code == V3ActRelationshipCheckpoint.E) + return "E"; + if (code == V3ActRelationshipCheckpoint.S) + return "S"; + if (code == V3ActRelationshipCheckpoint.T) + return "T"; + if (code == V3ActRelationshipCheckpoint.X) + return "X"; + return "?"; + } + + public String toSystem(V3ActRelationshipCheckpoint code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipJoin.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipJoin.java new file mode 100644 index 00000000000..249960f1b39 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipJoin.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipJoin { + + /** + * Detach this branch from the other branches so it will not be resynchronized with the other branches. + */ + D, + /** + * When all other concurrent branches are terminated, interrupt and discontinue this branch. + */ + K, + /** + * Wait for this branch to terminate. + */ + W, + /** + * Wait for any one of the branches in the set of exclusive wait branches to terminate, then discontinue all the other exclusive wait branches. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipJoin fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("K".equals(codeString)) + return K; + if ("W".equals(codeString)) + return W; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ActRelationshipJoin code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case K: return "K"; + case W: return "W"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipJoin"; + } + public String getDefinition() { + switch (this) { + case D: return "Detach this branch from the other branches so it will not be resynchronized with the other branches."; + case K: return "When all other concurrent branches are terminated, interrupt and discontinue this branch."; + case W: return "Wait for this branch to terminate."; + case X: return "Wait for any one of the branches in the set of exclusive wait branches to terminate, then discontinue all the other exclusive wait branches."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "detached"; + case K: return "kill"; + case W: return "wait"; + case X: return "exclusive wait"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipJoinEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipJoinEnumFactory.java new file mode 100644 index 00000000000..9212164ec07 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipJoinEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActRelationshipJoinEnumFactory implements EnumFactory { + + public V3ActRelationshipJoin fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3ActRelationshipJoin.D; + if ("K".equals(codeString)) + return V3ActRelationshipJoin.K; + if ("W".equals(codeString)) + return V3ActRelationshipJoin.W; + if ("X".equals(codeString)) + return V3ActRelationshipJoin.X; + throw new IllegalArgumentException("Unknown V3ActRelationshipJoin code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipJoin code) { + if (code == V3ActRelationshipJoin.D) + return "D"; + if (code == V3ActRelationshipJoin.K) + return "K"; + if (code == V3ActRelationshipJoin.W) + return "W"; + if (code == V3ActRelationshipJoin.X) + return "X"; + return "?"; + } + + public String toSystem(V3ActRelationshipJoin code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSplit.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSplit.java new file mode 100644 index 00000000000..a5589893a76 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSplit.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipSplit { + + /** + * The pre-condition associated with the branch is evaluated once and if true the branch may be entered. All other exclusive branches compete with each other and only one will be selected. This implements a COND, IF and CASE conditionals, or "XOR-split." The order in which the branches are considered may be specified in the priorityNumber attribute. + */ + E1, + /** + * A branch is selected as soon as the pre-condition associated with the branch evaluates to true. If the condition is false, the branch may be entered later, when the condition turns true. All other exclusive branches compete with each other and only one will be selected. Each waiting branch executes in parallel with the default join code wait (see below). The order in which the branches are considered may be specified in the Service_relationship.priority_nmb. + */ + EW, + /** + * A branch is executed if its associated preconditions permit. If associated preconditions do not permit, the branch is dropped. Inclusive branches are not suppressed and do not suppress other branches. + */ + I1, + /** + * A branch is executed as soon as its associated conditions permit. If the condition is false, the branch may be entered later, when the condition turns true. Inclusive branches are not suppressed and do not suppress other branches. Each waiting branch executes in parallel with the default join code wait (see below). + */ + IW, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipSplit fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E1".equals(codeString)) + return E1; + if ("EW".equals(codeString)) + return EW; + if ("I1".equals(codeString)) + return I1; + if ("IW".equals(codeString)) + return IW; + throw new FHIRException("Unknown V3ActRelationshipSplit code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E1: return "E1"; + case EW: return "EW"; + case I1: return "I1"; + case IW: return "IW"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipSplit"; + } + public String getDefinition() { + switch (this) { + case E1: return "The pre-condition associated with the branch is evaluated once and if true the branch may be entered. All other exclusive branches compete with each other and only one will be selected. This implements a COND, IF and CASE conditionals, or \"XOR-split.\" The order in which the branches are considered may be specified in the priorityNumber attribute."; + case EW: return "A branch is selected as soon as the pre-condition associated with the branch evaluates to true. If the condition is false, the branch may be entered later, when the condition turns true. All other exclusive branches compete with each other and only one will be selected. Each waiting branch executes in parallel with the default join code wait (see below). The order in which the branches are considered may be specified in the Service_relationship.priority_nmb."; + case I1: return "A branch is executed if its associated preconditions permit. If associated preconditions do not permit, the branch is dropped. Inclusive branches are not suppressed and do not suppress other branches."; + case IW: return "A branch is executed as soon as its associated conditions permit. If the condition is false, the branch may be entered later, when the condition turns true. Inclusive branches are not suppressed and do not suppress other branches. Each waiting branch executes in parallel with the default join code wait (see below)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E1: return "exclusive try once"; + case EW: return "exclusive wait"; + case I1: return "inclusive try once"; + case IW: return "inclusive wait"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSplitEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSplitEnumFactory.java new file mode 100644 index 00000000000..f128ea7b475 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSplitEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActRelationshipSplitEnumFactory implements EnumFactory { + + public V3ActRelationshipSplit fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E1".equals(codeString)) + return V3ActRelationshipSplit.E1; + if ("EW".equals(codeString)) + return V3ActRelationshipSplit.EW; + if ("I1".equals(codeString)) + return V3ActRelationshipSplit.I1; + if ("IW".equals(codeString)) + return V3ActRelationshipSplit.IW; + throw new IllegalArgumentException("Unknown V3ActRelationshipSplit code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipSplit code) { + if (code == V3ActRelationshipSplit.E1) + return "E1"; + if (code == V3ActRelationshipSplit.EW) + return "EW"; + if (code == V3ActRelationshipSplit.I1) + return "I1"; + if (code == V3ActRelationshipSplit.IW) + return "IW"; + return "?"; + } + + public String toSystem(V3ActRelationshipSplit code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSubset.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSubset.java new file mode 100644 index 00000000000..f7601f3d1c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSubset.java @@ -0,0 +1,197 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipSubset { + + /** + * Used to indicate that the participation is a filtered subset of the total participations of the same type owned by the Act. + + Used when there is a need to limit the participations to the first, the last, the next or some other filtered subset. + */ + _PARTICIPATIONSUBSET, + /** + * An occurrence that is scheduled to occur in the future. An Act whose effective time is greater than 'now', where 'now' is the time the instance is authored. + */ + FUTURE, + /** + * Represents a 'summary' of all acts that are scheduled to occur in the future (whose effective time is greater than 'now' where is the time the instance is authored.). The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. + */ + FUTSUM, + /** + * Restricted to the latest known occurrence that is scheduled to occur. The Act with the highest known effective time. + */ + LAST, + /** + * Restricted to the nearest recent known occurrence scheduled to occur in the future. The Act with the lowest effective time, still greater than 'now'. ('now' is the time the instance is authored.) + */ + NEXT, + /** + * An occurrence that occurred or was scheduled to occur in the past. An Act whose effective time is less than 'now'. ('now' is the time the instance is authored.) + */ + PAST, + /** + * Restricted to the earliest known occurrence that occurred or was scheduled to occur in the past. The Act with the lowest effective time. ('now' is the time the instance is authored.) + */ + FIRST, + /** + * Represents a 'summary' of all acts that previously occurred or were scheduled to occur. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. ('now' is the time the instance is authored.) + */ + PREVSUM, + /** + * Restricted to the most recent known occurrence that occurred or was scheduled to occur in the past. The Act with the most recent effective time, still less than 'now'. ('now' is the time the instance is authored.) + */ + RECENT, + /** + * Represents a 'summary' of all acts that have occurred or were scheduled to occur and which are scheduled to occur in the future. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. + */ + SUM, + /** + * ActRelationshipExpectedSubset + */ + ACTRELATIONSHIPEXPECTEDSUBSET, + /** + * ActRelationshipPastSubset + */ + ACTRELATIONSHIPPASTSUBSET, + /** + * The occurrence whose value attribute is greater than all other occurrences at the time the instance is created. + */ + MAX, + /** + * The occurrence whose value attribute is less than all other occurrences at the time the instance is created. + */ + MIN, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipSubset fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ParticipationSubset".equals(codeString)) + return _PARTICIPATIONSUBSET; + if ("FUTURE".equals(codeString)) + return FUTURE; + if ("FUTSUM".equals(codeString)) + return FUTSUM; + if ("LAST".equals(codeString)) + return LAST; + if ("NEXT".equals(codeString)) + return NEXT; + if ("PAST".equals(codeString)) + return PAST; + if ("FIRST".equals(codeString)) + return FIRST; + if ("PREVSUM".equals(codeString)) + return PREVSUM; + if ("RECENT".equals(codeString)) + return RECENT; + if ("SUM".equals(codeString)) + return SUM; + if ("ActRelationshipExpectedSubset".equals(codeString)) + return ACTRELATIONSHIPEXPECTEDSUBSET; + if ("ActRelationshipPastSubset".equals(codeString)) + return ACTRELATIONSHIPPASTSUBSET; + if ("MAX".equals(codeString)) + return MAX; + if ("MIN".equals(codeString)) + return MIN; + throw new FHIRException("Unknown V3ActRelationshipSubset code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _PARTICIPATIONSUBSET: return "_ParticipationSubset"; + case FUTURE: return "FUTURE"; + case FUTSUM: return "FUTSUM"; + case LAST: return "LAST"; + case NEXT: return "NEXT"; + case PAST: return "PAST"; + case FIRST: return "FIRST"; + case PREVSUM: return "PREVSUM"; + case RECENT: return "RECENT"; + case SUM: return "SUM"; + case ACTRELATIONSHIPEXPECTEDSUBSET: return "ActRelationshipExpectedSubset"; + case ACTRELATIONSHIPPASTSUBSET: return "ActRelationshipPastSubset"; + case MAX: return "MAX"; + case MIN: return "MIN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipSubset"; + } + public String getDefinition() { + switch (this) { + case _PARTICIPATIONSUBSET: return "Used to indicate that the participation is a filtered subset of the total participations of the same type owned by the Act. \r\n\n Used when there is a need to limit the participations to the first, the last, the next or some other filtered subset."; + case FUTURE: return "An occurrence that is scheduled to occur in the future. An Act whose effective time is greater than 'now', where 'now' is the time the instance is authored."; + case FUTSUM: return "Represents a 'summary' of all acts that are scheduled to occur in the future (whose effective time is greater than 'now' where is the time the instance is authored.). The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc."; + case LAST: return "Restricted to the latest known occurrence that is scheduled to occur. The Act with the highest known effective time."; + case NEXT: return "Restricted to the nearest recent known occurrence scheduled to occur in the future. The Act with the lowest effective time, still greater than 'now'. ('now' is the time the instance is authored.)"; + case PAST: return "An occurrence that occurred or was scheduled to occur in the past. An Act whose effective time is less than 'now'. ('now' is the time the instance is authored.)"; + case FIRST: return "Restricted to the earliest known occurrence that occurred or was scheduled to occur in the past. The Act with the lowest effective time. ('now' is the time the instance is authored.)"; + case PREVSUM: return "Represents a 'summary' of all acts that previously occurred or were scheduled to occur. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc. ('now' is the time the instance is authored.)"; + case RECENT: return "Restricted to the most recent known occurrence that occurred or was scheduled to occur in the past. The Act with the most recent effective time, still less than 'now'. ('now' is the time the instance is authored.)"; + case SUM: return "Represents a 'summary' of all acts that have occurred or were scheduled to occur and which are scheduled to occur in the future. The effectiveTime represents the outer boundary of all occurrences, repeatNumber represents the total number of repetitions, etc."; + case ACTRELATIONSHIPEXPECTEDSUBSET: return "ActRelationshipExpectedSubset"; + case ACTRELATIONSHIPPASTSUBSET: return "ActRelationshipPastSubset"; + case MAX: return "The occurrence whose value attribute is greater than all other occurrences at the time the instance is created."; + case MIN: return "The occurrence whose value attribute is less than all other occurrences at the time the instance is created."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _PARTICIPATIONSUBSET: return "ParticipationSubset"; + case FUTURE: return "expected future"; + case FUTSUM: return "future summary"; + case LAST: return "expected last"; + case NEXT: return "expected next"; + case PAST: return "previous"; + case FIRST: return "first known"; + case PREVSUM: return "previous summary"; + case RECENT: return "most recent"; + case SUM: return "summary"; + case ACTRELATIONSHIPEXPECTEDSUBSET: return "ActRelationshipExpectedSubset"; + case ACTRELATIONSHIPPASTSUBSET: return "ActRelationshipPastSubset"; + case MAX: return "maximum"; + case MIN: return "minimum"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSubsetEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSubsetEnumFactory.java new file mode 100644 index 00000000000..cebb0f706c6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipSubsetEnumFactory.java @@ -0,0 +1,110 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActRelationshipSubsetEnumFactory implements EnumFactory { + + public V3ActRelationshipSubset fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ParticipationSubset".equals(codeString)) + return V3ActRelationshipSubset._PARTICIPATIONSUBSET; + if ("FUTURE".equals(codeString)) + return V3ActRelationshipSubset.FUTURE; + if ("FUTSUM".equals(codeString)) + return V3ActRelationshipSubset.FUTSUM; + if ("LAST".equals(codeString)) + return V3ActRelationshipSubset.LAST; + if ("NEXT".equals(codeString)) + return V3ActRelationshipSubset.NEXT; + if ("PAST".equals(codeString)) + return V3ActRelationshipSubset.PAST; + if ("FIRST".equals(codeString)) + return V3ActRelationshipSubset.FIRST; + if ("PREVSUM".equals(codeString)) + return V3ActRelationshipSubset.PREVSUM; + if ("RECENT".equals(codeString)) + return V3ActRelationshipSubset.RECENT; + if ("SUM".equals(codeString)) + return V3ActRelationshipSubset.SUM; + if ("ActRelationshipExpectedSubset".equals(codeString)) + return V3ActRelationshipSubset.ACTRELATIONSHIPEXPECTEDSUBSET; + if ("ActRelationshipPastSubset".equals(codeString)) + return V3ActRelationshipSubset.ACTRELATIONSHIPPASTSUBSET; + if ("MAX".equals(codeString)) + return V3ActRelationshipSubset.MAX; + if ("MIN".equals(codeString)) + return V3ActRelationshipSubset.MIN; + throw new IllegalArgumentException("Unknown V3ActRelationshipSubset code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipSubset code) { + if (code == V3ActRelationshipSubset._PARTICIPATIONSUBSET) + return "_ParticipationSubset"; + if (code == V3ActRelationshipSubset.FUTURE) + return "FUTURE"; + if (code == V3ActRelationshipSubset.FUTSUM) + return "FUTSUM"; + if (code == V3ActRelationshipSubset.LAST) + return "LAST"; + if (code == V3ActRelationshipSubset.NEXT) + return "NEXT"; + if (code == V3ActRelationshipSubset.PAST) + return "PAST"; + if (code == V3ActRelationshipSubset.FIRST) + return "FIRST"; + if (code == V3ActRelationshipSubset.PREVSUM) + return "PREVSUM"; + if (code == V3ActRelationshipSubset.RECENT) + return "RECENT"; + if (code == V3ActRelationshipSubset.SUM) + return "SUM"; + if (code == V3ActRelationshipSubset.ACTRELATIONSHIPEXPECTEDSUBSET) + return "ActRelationshipExpectedSubset"; + if (code == V3ActRelationshipSubset.ACTRELATIONSHIPPASTSUBSET) + return "ActRelationshipPastSubset"; + if (code == V3ActRelationshipSubset.MAX) + return "MAX"; + if (code == V3ActRelationshipSubset.MIN) + return "MIN"; + return "?"; + } + + public String toSystem(V3ActRelationshipSubset code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipType.java new file mode 100644 index 00000000000..52b56c463a6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipType.java @@ -0,0 +1,1538 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActRelationshipType { + + /** + * Description: A directed association between a source Act and a target Act. + + + Usage Note: This code should never be transmitted in an instance as the value of ActRelationship.typeCode (attribute) + */ + ART, + /** + * ActClassTemporallyPertains + */ + _ACTCLASSTEMPORALLYPERTAINS, + /** + * Codes that describe the relationship between an Act and a financial instrument such as a financial transaction, account or invoice element. + */ + _ACTRELATIONSHIPACCOUNTING, + /** + * Expresses values for describing the relationship relationship between an InvoiceElement or InvoiceElementGroup and a billable act. + */ + _ACTRELATIONSHIPCOSTTRACKING, + /** + * A relationship that provides an ability to associate a financial transaction (target) as a charge to a clinical act (source). A clinical act may have a charge associated with the execution or delivery of the service. + + The financial transaction will define the charge (bill) for delivery or performance of the service. + + Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product. + */ + CHRG, + /** + * A relationship that provides an ability to associate a financial transaction (target) as a cost to a clinical act (source). A clinical act may have an inherit cost associated with the execution or delivery of the service. + + The financial transaction will define the cost of delivery or performance of the service. + + Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product. + */ + COST, + /** + * Expresses values for describing the relationship between a FinancialTransaction and an Account. + */ + _ACTRELATIONSHIPPOSTING, + /** + * A credit relationship ties a financial transaction (target) to an account (source). A credit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account credit will decrease the account balance. A non-asset account credit will decrease the account balance. + */ + CREDIT, + /** + * A debit relationship ties a financial transaction (target) to an account (source). A debit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account debit will increase the account balance. A non-asset account debit will decrease the account balance. + */ + DEBIT, + /** + * Specifies under what circumstances (target Act) the source-Act may, must, must not or has occurred + */ + _ACTRELATIONSHIPCONDITIONAL, + /** + * A contraindication is just a negation of a reason, i.e. it gives a condition under which the action is not to be done. Both, source and target can be any kind of service; target service is in criterion mood. How the strength of a contraindication is expressed (e.g., relative, absolute) is left as an open issue. The priorityNumber attribute could be used. + */ + CIND, + /** + * A requirement to be true before a service is performed. The target can be any service in criterion mood. For multiple pre-conditions a conjunction attribute (AND, OR, XOR) is applicable. + */ + PRCN, + /** + * Description: The reason or rationale for a service. A reason link is weaker than a trigger, it only suggests that some service may be or might have been a reason for some action, but not that this reason requires/required the action to be taken. Also, as opposed to the trigger, there is no strong timely relation between the reason and the action. As well as providing various types of information about the rationale for a service, the RSON act relationship is routinely used between a SBADM act and an OBS act to describe the indication for use of a medication. Child concepts may be used to describe types of indication. + + + Discussion: In prior releases, the code "SUGG" (suggests) was expressed as "an inversion of the reason link." That code has been retired in favor of the inversion indicator that is an attribute of ActRelationship. + */ + RSON, + /** + * Definition: The source act is performed to block the effects of the target act. This act relationship should be used when describing near miss type incidents where potential harm could have occurred, but the action described in the source act blocked the potential harmful effects of the incident actually occurring. + */ + BLOCK, + /** + * Description: The source act is intended to help establish the presence of a (an adverse) situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + DIAG, + /** + * Description: The source act is intented to provide immunity against the effects of the target act (the target act describes an infectious disease) + */ + IMM, + /** + * Description: The source act is intended to provide active immunity against the effects of the target act (the target act describes an infectious disease) + */ + ACTIMM, + /** + * Description: The source act is intended to provide passive immunity against the effects of the target act (the target act describes an infectious disease). + */ + PASSIMM, + /** + * The source act removes or lessens the occurrence or effect of the target act. + */ + MITGT, + /** + * Definition: The source act is performed to recover from the effects of the target act. + */ + RCVY, + /** + * Description: The source act is intended to reduce the risk of of an adverse situation to emerge as described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + PRYLX, + /** + * Description: The source act is intended to improve a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + TREAT, + /** + * Description: The source act is intended to offer an additional treatment for the management or cure of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. It is not a requirement that the non-adjunctive treatment is explicitly specified. + */ + ADJUNCT, + /** + * Description: The source act is intended to provide long term maintenance improvement or management of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. + */ + MTREAT, + /** + * Description: The source act is intended to provide palliation for the effects of the target act. + */ + PALLTREAT, + /** + * Description: The source act is intented to provide symptomatic relief for the effects of the target act. + */ + SYMP, + /** + * A pre-condition that if true should result in the source Act being executed. The target is in typically in criterion mood. When reported after the fact (i.e. the criterion has been met) it may be in Event mood. A delay between the trigger and the triggered action can be specified. + + + Discussion: This includes the concept of a required act for a service or financial instrument such as an insurance plan or policy. In such cases, the trigger is the occurrence of a specific condition such as coverage limits being exceeded. + */ + TRIG, + /** + * Abstract collector for ActRelationhsip types that relate two acts by their timing. + */ + _ACTRELATIONSHIPTEMPORALLYPERTAINS, + /** + * Abstract collector for ActRelationship types that relate two acts by their approximate timing. + */ + _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES, + /** + * A relationship in which the source act's effective time ends near the end of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is ENS + */ + ENE, + /** + * A relationship in which the source act's effective time ends with the end of the target act's effective time. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + ECW, + /** + * A relationship in which the source act's effective time is the same as the target act's effective time. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + CONCURRENT, + /** + * The source Act starts before the start of the target Act, and ends with the target Act. + + + UsageNote: Inverse code is SASECWE + */ + SBSECWE, + /** + * A relationship in which the source act's effective time ends near the start of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is ENE + */ + ENS, + /** + * The source Act ends when the target act starts (i.e. if we say "ActOne ECWS ActTwo", it means that ActOne ends when ActTwo starts, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is SCWE + */ + ECWS, + /** + * A relationship in which the source act's effective time starts near the end of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is SNS + */ + SNE, + /** + * The source Act starts when the target act ends (i.e. if we say "ActOne SCWE ActTwo", it means that ActOne starts when ActTwo ends, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is SBSECWS + */ + SCWE, + /** + * A relationship in which the source act's effective time starts near the start of the target act's effective time. Near is defined separately as a time interval. + + + Usage Note: Inverse code is SNE + */ + SNS, + /** + * A relationship in which the source act's effective time starts with the start of the target act's effective time. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + SCW, + /** + * The source Act starts with.the target Act and ends before the end of the target Act. + + + UsageNote: Inverse code is SCWSEAE + */ + SCWSEBE, + /** + * The source Act starts with the target Act, and ends after the end of the target Act. + */ + SCWSEAE, + /** + * A relationship in which the source act ends after the target act starts. + + + UsageNote: Inverse code is SBE + */ + EAS, + /** + * A relationship in which the source act ends after the target act ends. + + + UsageNote: Inverse code is EBE + */ + EAE, + /** + * The source Act starts after start of the target Act and ends after end of the target Act. + + + UsageNote: Inverse code is SBSEBE + */ + SASEAE, + /** + * The source Act contains the end of the target Act. + + + UsageNote: Inverse code is EDU + */ + SBEEAE, + /** + * The source Act start after the start of the target Act, and contains the end of the target Act. + + + UsageNote: Inverse code is SBSEASEBE + */ + SASSBEEAS, + /** + * The source Act contains the time of the target Act. + + + UsageNote: Inverse code is DURING + */ + SBSEAE, + /** + * The source Act starts after the start of the target Act (i.e. if we say "ActOne SAS ActTwo", it means that ActOne starts after the start of ActTwo, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is SBS + */ + SAS, + /** + * A relationship in which the source act starts after the target act ends. + + + UsageNote: Inverse code is EBS + */ + SAE, + /** + * A relationship in which the source act's effective time is wholly within the target act's effective time (including end points, as defined in the act's effective times) + + + UsageNote: Inverse code is SBSEAE + */ + DURING, + /** + * The source Act starts after start of the target Act, and ends with the target Act. + + + UsageNote: Inverse code is SBSECWE + */ + SASECWE, + /** + * A relationship in which the source act's effective time ends after or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is EBSORECWS + */ + EASORECWS, + /** + * A relationship in which the source act's effective time ends after or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is EBEORECW + */ + EAEORECW, + /** + * The source Act is independent of the time of the target Act. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + INDEPENDENT, + /** + * A relationship in which the source act's effective time starts after or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is SBEORSCWE + */ + SAEORSCWE, + /** + * A relationship in which the source act's effective time starts after or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is SBSORSCW + */ + SASORSCW, + /** + * A relationship in which the source act's effective time starts before or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is SAEORSCWE + */ + SBEORSCWE, + /** + * A relationship in which the source act's effective time overlaps the target act's effective time in any way. + + + UsageNote: This code is reflexive. Therefore its inverse code is itself. + */ + OVERLAP, + /** + * A relationship in which the source act ends within the target act's effective time (including end points, as defined in the act's effective times) + + + UsageNote: Inverse code is SBEEAE + */ + EDU, + /** + * The source Act contains the start of the target Act, and ends before the end of the target Act. + + + UsageNote: Inverse code is SASSBEEAS + */ + SBSEASEBE, + /** + * The source Act contains the start of the target Act. + + + UsageNote: Inverse code is SDU + */ + SBSEAS, + /** + * A relationship in which the source act starts within the target act's effective time (including end points, as defined in the act's effective times) + + + UsageNote: Inverse code is SBSEAS + */ + SDU, + /** + * The source Act starts before the end of the target Act (i.e. if we say "ActOne SBE ActTwo", it means that ActOne starts before the end of ActTwo, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is EAS + */ + SBE, + /** + * The source Act ends before the end of the target Act (i.e. if we say "ActOne EBE ActTwo", it means that ActOne ends before the end of ActTwo, therefore ActOne is the source and ActTwo is the target). + + + UsageNote: Inverse code is EAE + */ + EBE, + /** + * The source Act starts before the start of the target Act, and ends before the end of the target Act. + + + UsageNote: Inverse code is SASEAE + */ + SBSEBE, + /** + * A relationship in which the source act's effective time ends before or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is EASORECWS + */ + EBSORECWS, + /** + * A relationship in which the source act ends before the target act starts. + + + UsageNote: Inverse code is SAE + */ + EBS, + /** + * A relationship in which the source act's effective time ends before or concurrent with the end of the target act's effective time. + + + Usage Note: Inverse code is EAEORECW + */ + EBEORECW, + /** + * A relationship in which the source act's effective time starts before or concurrent with the start of the target act's effective time. + + + Usage Note: Inverse code is SASORSCW + */ + SBSORSCW, + /** + * A relationship in which the source act begins before the target act begins. + + + UsageNote: Inverse code is SAS + */ + SBS, + /** + * A relationship in which the target act authorizes or certifies the source act. + */ + AUTH, + /** + * Description: An assertion that an act was the cause of another act.This is stronger and more specific than the support link. The source (cause) is typically an observation, but may be any act, while the target may be any act. + + + Examples: + + + + a growth of Staphylococcus aureus may be considered the cause of an abscess + contamination of the infusion bag was deemed to be the cause of the infection that the patient experienced + lack of staff on the shift was deemed to be a supporting factor (proximal factor) causing the patient safety incident where the patient fell out of bed because the bed-sides had not been put up which caused the night patient to fall out of bed + */ + CAUS, + /** + * The target act is a component of the source act, with no semantics regarding composition or aggregation implied. + */ + COMP, + /** + * A relationship from an Act to a Control Variable. For example, if a Device makes an Observation, this relates the Observation to its Control Variables documenting the device's settings that influenced the observation. + */ + CTRLV, + /** + * The target Acts are aggregated by the source Act. Target Acts may have independent existence, participate in multiple ActRelationships, and do not contribute to the meaning of the source. + + + UsageNotes: This explicitly represents the conventional notion of aggregation. The target Act is part of a collection of Acts (no implication is made of cardinality, a source of Acts may contain zero, one, or more member target Acts). + + It is expected that this will be primarily used with _ActClassRecordOrganizer, BATTERY, and LIST + */ + MBR, + /** + * A collection of sub-services as steps or subtasks performed for the source service. Services may be performed sequentially or concurrently. + + + UsageNotes: Sequence of steps may be indicated by use of _ActRelationshipTemporallyPertains, as well as via ActRelationship.sequenceNumber, ActRelationship.pauseQuantity, Target.priorityCode. + + + OpenIssue: Need Additional guidelines on when each approach should be used. + */ + STEP, + /** + * The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act entered into the source Act by means of the target Transportation act. + */ + ARR, + /** + * The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act departed from the source Act by means of the target Transportation act. + */ + DEP, + /** + * The source Act is a composite of the target Acts. The target Acts do not have an existence independent of the source Act. + + + UsageNote: In UML 1.1, this is a "composition" defined as: + "A form of aggregation with strong ownership and coincident lifetime as part of the whole. Parts with non-fixed multiplicity may be created after the composite itself, but once created they live and die with it (i.e., they share lifetimes). Such parts can also be explicitly removed before the death of the composite. Composition may be recursive." + */ + PART, + /** + * A relationship in which the source act is covered by or is under the authority of a target act. A financial instrument such as an Invoice Element is covered by one or more specific instances of an Insurance Policy. + */ + COVBY, + /** + * Associates a derived Act with its input parameters. E.G., an anion-gap observation can be associated as being derived from given sodium-, (potassium-,), chloride-, and bicarbonate-observations. The narrative content (Act.text) of a source act is wholly machine-derived from the collection of target acts. + */ + DRIV, + /** + * Expresses an association that links two instances of the same act over time, indicating that the instance are part of the same episode, e.g. linking two condition nodes for episode of illness; linking two encounters for episode of encounter. + */ + ELNK, + /** + * Indicates that the target Act provides evidence in support of the action represented by the source Act. The target is not a 'reason' for the source act, but rather gives supporting information on why the source act is an appropriate course of action. Possible targets might be clinical trial results, journal articles, similar successful therapies, etc. + + + Rationale: Provides a mechanism for conveying clinical justification for non-approved or otherwise non-traditional therapies. + */ + EVID, + /** + * Description:The source act is aggravated by the target act. (Example "chest pain" EXACBY "exercise") + */ + EXACBY, + /** + * This is the inversion of support. Used to indicate that a given observation is explained by another observation or condition. + */ + EXPL, + /** + * the target act documents a set of circumstances (events, risks) which prevent successful completion, or degradation of quality of, the source Act. + + + UsageNote: This provides the semantics to document barriers to care + */ + INTF, + /** + * Items located + */ + ITEMSLOC, + /** + * A relationship that limits or restricts the source act by the elements of the target act. For example, an authorization may be limited by a financial amount (up to $500). Target Act must be in EVN.CRIT mood. + */ + LIMIT, + /** + * Definition: Indicates that the attributes and associations of the target act provide metadata (for example, identifiers, authorship, etc.) for the source act. + + + Constraint: Source act must have either a mood code that is not "EVN" (event) or its "isCriterion" attribute must set to "true". Target act must be an Act with a mood code of EVN and with isCriterionInd attribute set to "true". + */ + META, + /** + * An assertion that a new observation may be the manifestation of another existing observation or action. This assumption is attributed to the same actor who asserts the manifestation. This is stronger and more specific than an inverted support link. For example, an agitated appearance can be asserted to be the manifestation (effect) of a known hyperthyroxia. This expresses that one might not have realized a symptom if it would not be a common manifestation of a known condition. The target (cause) may be any service, while the source (manifestation) must be an observation. + */ + MFST, + /** + * Used to assign a "name" to a condition thread. Source is a condition node, target can be any service. + */ + NAME, + /** + * An observation that should follow or does actually follow as a result or consequence of a condition or action (sometimes called "post-conditional".) Target must be an observation as a goal, risk or any criterion. For complex outcomes a conjunction attribute (AND, OR, XOR) can be used. An outcome link is often inverted to describe an outcome assessment. + */ + OUTC, + /** + * The target act is a desired outcome of the source act. Source is any act (typically an intervention). Target must be an observation in criterion mood. + */ + _ACTRELATIONSIPOBJECTIVE, + /** + * A desired state that a service action aims to maintain. E.g., keep systolic blood pressure between 90 and 110 mm Hg. Source is an intervention service. Target must be an observation in criterion mood. + */ + OBJC, + /** + * A desired outcome that a service action aims to meet finally. Source is any service (typically an intervention). Target must be an observation in criterion mood. + */ + OBJF, + /** + * A goal that one defines given a patient's health condition. Subsequently planned actions aim to meet that goal. Source is an observation or condition node, target must be an observation in goal mood. + */ + GOAL, + /** + * A noteworthy undesired outcome of a patient's condition that is either likely enough to become an issue or is less likely but dangerous enough to be addressed. + */ + RISK, + /** + * This is a very unspecific relationship from one item of clinical information to another. It does not judge about the role the pertinent information plays. + */ + PERT, + /** + * A relationship in which the target act is a predecessor instance to the source act. Generally each of these instances is similar, but no identical. In healthcare coverage it is used to link a claim item to a previous claim item that might have claimed for the same set of services. + */ + PREV, + /** + * A relationship in which the target act is referred to by the source act. This permits a simple reference relationship that distinguishes between the referent and the referee. + */ + REFR, + /** + * Indicates that the source act makes use of (or will make use of) the information content of the target act. + + + UsageNotes: A usage relationship only makes sense if the target act is authored and occurs independently of the source act. Otherwise a simpler relationship such as COMP would be appropriate. + + + Rationale: There is a need when defining a clinical trial protocol to indicate that the protocol makes use of other protocol or treatment specifications. This is stronger than the assertion of "references". References may exist without usage, and in a clinical trial protocol is common to assert both: what other specifications does this trial use and what other specifications does it merely reference. + */ + USE, + /** + * Reference ranges are essentially descriptors of a class of result values assumed to be "normal", "abnormal", or "critical." Those can vary by sex, age, or any other criterion. Source and target are observations, the target is in criterion mood. This link type can act as a trigger in case of alarms being triggered by critical results. + */ + REFV, + /** + * Description:The source act is wholly or partially alleviated by the target act. (Example "chest pain" RELVBY "sublingual nitroglycerin administration") + */ + RELVBY, + /** + * An act relationship indicating that the source act follows the target act. The source act should in principle represent the same kind of act as the target. Source and target need not have the same mood code (mood will often differ). The target of a sequel is called antecedent. Examples for sequel relationships are: revision, transformation, derivation from a prototype (as a specialization is a derivation of a generalization), followup, realization, instantiation. + */ + SEQL, + /** + * An addendum (source) to an existing service object (target), containing supplemental information. The addendum is itself an original service object linked to the supplemented service object. The supplemented service object remains in place and its content and status are unaltered. + */ + APND, + /** + * Indicates that the target observation(s) provide an initial reference for the source observation or observation group. + + + UsageConstraints: Both source and target must be Observations or specializations thereof. + */ + BSLN, + /** + * Description:The source act complies with, adheres to, conforms to, or is permissible under (in whole or in part) the policy, contract, agreement, law, conformance criteria, certification guidelines or requirement conveyed by the target act. + + Examples for compliance relationships are: audits of adherence with a security policy, certificate of conformance to system certification requirements, or consent directive in compliance with or permissible under a privacy policy. + */ + COMPLY, + /** + * The source act documents the target act. + */ + DOC, + /** + * The source act fulfills (in whole or in part) the target act. Source act must be in a mood equal or more actual than the target act. + */ + FLFS, + /** + * The source act is a single occurrence of a repeatable target act. The source and target act can be in any mood on the "completion track" but the source act must be as far as or further along the track than the target act (i.e., the occurrence of an intent can be an event but not vice versa). + */ + OCCR, + /** + * Relates either an appointment request or an appointment to the order for the service being scheduled. + */ + OREF, + /** + * Associates a specific time (and associated resources) with a scheduling request or other intent. + */ + SCH, + /** + * The generalization relationship can be used to express categorical knowledge about services (e.g., amilorid, triamterene, and spironolactone have the common generalization potassium sparing diuretic). + */ + GEN, + /** + * A goal-evaluation links an observation (intent or actual) to a goal to indicate that the observation evaluates the goal. Given the goal and the observation, a "goal distance" (e.g., goal to observation) can be "calculated" and need not be sent explicitly. + */ + GEVL, + /** + * Used to capture the link between a potential service ("master" or plan) and an actual service, where the actual service instantiates the potential service. The instantiation may override the master's defaults. + */ + INST, + /** + * Definition: Used to link a newer version or 'snapshot' of a business object (source) to an older version or 'snapshot' of the same business object (target). + + + Usage:The identifier of the Act should be the same for both source and target. If the identifiers are distinct, RPLC should be used instead. + + Name from source to target = "modifiesPrior" + + Name from target to source = "modifiesByNew" + */ + MOD, + /** + * A trigger-match links an actual service (e.g., an observation or procedure that took place) with a service in criterion mood. For example if the trigger is "observation of pain" and pain is actually observed, and if that pain-observation caused the trigger to fire, that pain-observation can be linked with the trigger. + */ + MTCH, + /** + * A relationship between a source Act that provides more detailed properties to the target Act. + + The source act thus is a specialization of the target act, but instead of mentioning all the inherited properties it only mentions new property bindings or refinements. + + The typical use case is to specify certain alternative variants of one kind of Act. The priorityNumber attribute is used to weigh refinements as preferred over other alternative refinements. + + Example: several routing options for a drug are specified as one SubstanceAdministration for the general treatment with attached refinements for the various routing options. + */ + OPTN, + /** + * Description:A relationship in which the target act is carried out to determine whether an effect attributed to the source act can be recreated. + */ + RCHAL, + /** + * A relationship between a source Act that seeks to reverse or undo the action of the prior target Act. + + Example: A posted financial transaction (e.g., a debit transaction) was applied in error and must be reversed (e.g., by a credit transaction) the credit transaction is identified as an undo (or reversal) of the prior target transaction. + + Constraints: the "completion track" mood of the target Act must be equally or more "actual" than the source act. I.e., when the target act is EVN the source act can be EVN, or any INT. If the target act is INT, the source act can be INT. + */ + REV, + /** + * A replacement source act replaces an existing target act. The state of the target act being replaced becomes obselete, but the act is typically still retained in the system for historical reference. The source and target must be of the same type. + */ + RPLC, + /** + * Definition: A new act that carries forward the intention of the original act, but does not completely replace it. The status of the predecessor act must be 'completed'. The original act is the target act and the successor is the source act. + */ + SUCC, + /** + * A condition thread relationship specifically links condition nodes together to form a condition thread. The source is the new condition node and the target links to the most recent node of the existing condition thread. + */ + UPDT, + /** + * The source is an excerpt from the target. + */ + XCRPT, + /** + * The source is a direct quote from the target. + */ + VRXCRPT, + /** + * Used when the target Act is a transformation of the source Act. (For instance, used to show that a CDA document is a transformation of a DICOM SR document.) + */ + XFRM, + /** + * Used to indicate that an existing service is suggesting evidence for a new observation. The assumption of support is attributed to the same actor who asserts the observation. Source must be an observation, target may be any service (e.g., to indicate a status post). + */ + SPRT, + /** + * A specialization of "has support" (SPRT), used to relate a secondary observation to a Region of Interest on a multidimensional observation, if the ROI specifies the true boundaries of the secondary observation as opposed to only marking the approximate area. For example, if the start and end of an ST elevation episode is visible in an EKG, this relation would indicate the ROI bounds the "ST elevation" observation -- the ROI defines the true beginning and ending of the episode. Conversely, if a ROI simply contains ST elevation, but it does not define the bounds (start and end) of the episode, the more general "has support" relation is used. Likewise, if a ROI on an image defines the true bounds of a "1st degree burn", the relation "has bounded support" is used; but if the ROI only points to the approximate area of the burn, the general "has support" relation is used. + */ + SPRTBND, + /** + * Relates an Act to its subject Act that the first Act is primarily concerned with. + + Examples + + + + The first Act may be a ControlAct manipulating the subject Act + + + + The first act is a region of interest (ROI) that defines a region within the subject Act. + + + + The first act is a reporting or notification Act, that echos the subject Act for a specific new purpose. + + + + Constraints + + An Act may have multiple subject acts. + + Rationale + + The ActRelationshipType "has subject" is similar to the ParticipationType "subject", Acts that primarily operate on physical subjects use the Participation, those Acts that primarily operate on other Acts (other information) use the ActRelationship. + */ + SUBJ, + /** + * The target observation qualifies (refines) the semantics of the source observation. + + + UsageNote: This is not intended to replace concept refinement and qualification via vocabulary. It is used when there are multiple components which together provide the complete understanding of the source Act. + */ + QUALF, + /** + * An act that contains summary values for a list or set of subordinate acts. For example, a summary of transactions for a particular accounting period. + */ + SUMM, + /** + * Description:Indicates that the target Act represents the result of the source observation Act. + + + FormalConstraint: Source Act must be an Observation or specialization there-of. Source Act must not have the value attribute specified + + + UsageNote: This relationship allows the result of an observation to be fully expressed as RIM acts as opposed to being embedded in the value attribute. For example, sending a Document act as the result of an imaging observation, sending a list of Procedures and/or other acts as the result of a medical history observation. + + The valueNegationInd attribute on the source Act has the same semantics of "negated finding" when it applies to the target of a VALUE ActRelationship as it does to the value attribute. On the other hand, if the ActRelationship.negationInd is true for a VALUE ActRelationship, that means the specified observation does not have the indicated value but does not imply a negated finding. Because the semantics are extremely close, it is recommended that Observation.valueNegationInd be used, not ActRelationship.negationInd. + + + OpenIssue: The implications of negationInd on ActRelationship and the valueNegationind on Observation. + */ + VALUE, + /** + * curative indication + */ + CURE, + /** + * adjunct curative indication + */ + CURE_ADJ, + /** + * adjunct mitigation + */ + MTGT_ADJ, + /** + * null + */ + RACT, + /** + * null + */ + SUGG, + /** + * added to help the parsers + */ + NULL; + public static V3ActRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ART".equals(codeString)) + return ART; + if ("_ActClassTemporallyPertains".equals(codeString)) + return _ACTCLASSTEMPORALLYPERTAINS; + if ("_ActRelationshipAccounting".equals(codeString)) + return _ACTRELATIONSHIPACCOUNTING; + if ("_ActRelationshipCostTracking".equals(codeString)) + return _ACTRELATIONSHIPCOSTTRACKING; + if ("CHRG".equals(codeString)) + return CHRG; + if ("COST".equals(codeString)) + return COST; + if ("_ActRelationshipPosting".equals(codeString)) + return _ACTRELATIONSHIPPOSTING; + if ("CREDIT".equals(codeString)) + return CREDIT; + if ("DEBIT".equals(codeString)) + return DEBIT; + if ("_ActRelationshipConditional".equals(codeString)) + return _ACTRELATIONSHIPCONDITIONAL; + if ("CIND".equals(codeString)) + return CIND; + if ("PRCN".equals(codeString)) + return PRCN; + if ("RSON".equals(codeString)) + return RSON; + if ("BLOCK".equals(codeString)) + return BLOCK; + if ("DIAG".equals(codeString)) + return DIAG; + if ("IMM".equals(codeString)) + return IMM; + if ("ACTIMM".equals(codeString)) + return ACTIMM; + if ("PASSIMM".equals(codeString)) + return PASSIMM; + if ("MITGT".equals(codeString)) + return MITGT; + if ("RCVY".equals(codeString)) + return RCVY; + if ("PRYLX".equals(codeString)) + return PRYLX; + if ("TREAT".equals(codeString)) + return TREAT; + if ("ADJUNCT".equals(codeString)) + return ADJUNCT; + if ("MTREAT".equals(codeString)) + return MTREAT; + if ("PALLTREAT".equals(codeString)) + return PALLTREAT; + if ("SYMP".equals(codeString)) + return SYMP; + if ("TRIG".equals(codeString)) + return TRIG; + if ("_ActRelationshipTemporallyPertains".equals(codeString)) + return _ACTRELATIONSHIPTEMPORALLYPERTAINS; + if ("_ActRelationshipTemporallyPertainsApproximates".equals(codeString)) + return _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES; + if ("ENE".equals(codeString)) + return ENE; + if ("ECW".equals(codeString)) + return ECW; + if ("CONCURRENT".equals(codeString)) + return CONCURRENT; + if ("SBSECWE".equals(codeString)) + return SBSECWE; + if ("ENS".equals(codeString)) + return ENS; + if ("ECWS".equals(codeString)) + return ECWS; + if ("SNE".equals(codeString)) + return SNE; + if ("SCWE".equals(codeString)) + return SCWE; + if ("SNS".equals(codeString)) + return SNS; + if ("SCW".equals(codeString)) + return SCW; + if ("SCWSEBE".equals(codeString)) + return SCWSEBE; + if ("SCWSEAE".equals(codeString)) + return SCWSEAE; + if ("EAS".equals(codeString)) + return EAS; + if ("EAE".equals(codeString)) + return EAE; + if ("SASEAE".equals(codeString)) + return SASEAE; + if ("SBEEAE".equals(codeString)) + return SBEEAE; + if ("SASSBEEAS".equals(codeString)) + return SASSBEEAS; + if ("SBSEAE".equals(codeString)) + return SBSEAE; + if ("SAS".equals(codeString)) + return SAS; + if ("SAE".equals(codeString)) + return SAE; + if ("DURING".equals(codeString)) + return DURING; + if ("SASECWE".equals(codeString)) + return SASECWE; + if ("EASORECWS".equals(codeString)) + return EASORECWS; + if ("EAEORECW".equals(codeString)) + return EAEORECW; + if ("INDEPENDENT".equals(codeString)) + return INDEPENDENT; + if ("SAEORSCWE".equals(codeString)) + return SAEORSCWE; + if ("SASORSCW".equals(codeString)) + return SASORSCW; + if ("SBEORSCWE".equals(codeString)) + return SBEORSCWE; + if ("OVERLAP".equals(codeString)) + return OVERLAP; + if ("EDU".equals(codeString)) + return EDU; + if ("SBSEASEBE".equals(codeString)) + return SBSEASEBE; + if ("SBSEAS".equals(codeString)) + return SBSEAS; + if ("SDU".equals(codeString)) + return SDU; + if ("SBE".equals(codeString)) + return SBE; + if ("EBE".equals(codeString)) + return EBE; + if ("SBSEBE".equals(codeString)) + return SBSEBE; + if ("EBSORECWS".equals(codeString)) + return EBSORECWS; + if ("EBS".equals(codeString)) + return EBS; + if ("EBEORECW".equals(codeString)) + return EBEORECW; + if ("SBSORSCW".equals(codeString)) + return SBSORSCW; + if ("SBS".equals(codeString)) + return SBS; + if ("AUTH".equals(codeString)) + return AUTH; + if ("CAUS".equals(codeString)) + return CAUS; + if ("COMP".equals(codeString)) + return COMP; + if ("CTRLV".equals(codeString)) + return CTRLV; + if ("MBR".equals(codeString)) + return MBR; + if ("STEP".equals(codeString)) + return STEP; + if ("ARR".equals(codeString)) + return ARR; + if ("DEP".equals(codeString)) + return DEP; + if ("PART".equals(codeString)) + return PART; + if ("COVBY".equals(codeString)) + return COVBY; + if ("DRIV".equals(codeString)) + return DRIV; + if ("ELNK".equals(codeString)) + return ELNK; + if ("EVID".equals(codeString)) + return EVID; + if ("EXACBY".equals(codeString)) + return EXACBY; + if ("EXPL".equals(codeString)) + return EXPL; + if ("INTF".equals(codeString)) + return INTF; + if ("ITEMSLOC".equals(codeString)) + return ITEMSLOC; + if ("LIMIT".equals(codeString)) + return LIMIT; + if ("META".equals(codeString)) + return META; + if ("MFST".equals(codeString)) + return MFST; + if ("NAME".equals(codeString)) + return NAME; + if ("OUTC".equals(codeString)) + return OUTC; + if ("_ActRelationsipObjective".equals(codeString)) + return _ACTRELATIONSIPOBJECTIVE; + if ("OBJC".equals(codeString)) + return OBJC; + if ("OBJF".equals(codeString)) + return OBJF; + if ("GOAL".equals(codeString)) + return GOAL; + if ("RISK".equals(codeString)) + return RISK; + if ("PERT".equals(codeString)) + return PERT; + if ("PREV".equals(codeString)) + return PREV; + if ("REFR".equals(codeString)) + return REFR; + if ("USE".equals(codeString)) + return USE; + if ("REFV".equals(codeString)) + return REFV; + if ("RELVBY".equals(codeString)) + return RELVBY; + if ("SEQL".equals(codeString)) + return SEQL; + if ("APND".equals(codeString)) + return APND; + if ("BSLN".equals(codeString)) + return BSLN; + if ("COMPLY".equals(codeString)) + return COMPLY; + if ("DOC".equals(codeString)) + return DOC; + if ("FLFS".equals(codeString)) + return FLFS; + if ("OCCR".equals(codeString)) + return OCCR; + if ("OREF".equals(codeString)) + return OREF; + if ("SCH".equals(codeString)) + return SCH; + if ("GEN".equals(codeString)) + return GEN; + if ("GEVL".equals(codeString)) + return GEVL; + if ("INST".equals(codeString)) + return INST; + if ("MOD".equals(codeString)) + return MOD; + if ("MTCH".equals(codeString)) + return MTCH; + if ("OPTN".equals(codeString)) + return OPTN; + if ("RCHAL".equals(codeString)) + return RCHAL; + if ("REV".equals(codeString)) + return REV; + if ("RPLC".equals(codeString)) + return RPLC; + if ("SUCC".equals(codeString)) + return SUCC; + if ("UPDT".equals(codeString)) + return UPDT; + if ("XCRPT".equals(codeString)) + return XCRPT; + if ("VRXCRPT".equals(codeString)) + return VRXCRPT; + if ("XFRM".equals(codeString)) + return XFRM; + if ("SPRT".equals(codeString)) + return SPRT; + if ("SPRTBND".equals(codeString)) + return SPRTBND; + if ("SUBJ".equals(codeString)) + return SUBJ; + if ("QUALF".equals(codeString)) + return QUALF; + if ("SUMM".equals(codeString)) + return SUMM; + if ("VALUE".equals(codeString)) + return VALUE; + if ("CURE".equals(codeString)) + return CURE; + if ("CURE.ADJ".equals(codeString)) + return CURE_ADJ; + if ("MTGT.ADJ".equals(codeString)) + return MTGT_ADJ; + if ("RACT".equals(codeString)) + return RACT; + if ("SUGG".equals(codeString)) + return SUGG; + throw new FHIRException("Unknown V3ActRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ART: return "ART"; + case _ACTCLASSTEMPORALLYPERTAINS: return "_ActClassTemporallyPertains"; + case _ACTRELATIONSHIPACCOUNTING: return "_ActRelationshipAccounting"; + case _ACTRELATIONSHIPCOSTTRACKING: return "_ActRelationshipCostTracking"; + case CHRG: return "CHRG"; + case COST: return "COST"; + case _ACTRELATIONSHIPPOSTING: return "_ActRelationshipPosting"; + case CREDIT: return "CREDIT"; + case DEBIT: return "DEBIT"; + case _ACTRELATIONSHIPCONDITIONAL: return "_ActRelationshipConditional"; + case CIND: return "CIND"; + case PRCN: return "PRCN"; + case RSON: return "RSON"; + case BLOCK: return "BLOCK"; + case DIAG: return "DIAG"; + case IMM: return "IMM"; + case ACTIMM: return "ACTIMM"; + case PASSIMM: return "PASSIMM"; + case MITGT: return "MITGT"; + case RCVY: return "RCVY"; + case PRYLX: return "PRYLX"; + case TREAT: return "TREAT"; + case ADJUNCT: return "ADJUNCT"; + case MTREAT: return "MTREAT"; + case PALLTREAT: return "PALLTREAT"; + case SYMP: return "SYMP"; + case TRIG: return "TRIG"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINS: return "_ActRelationshipTemporallyPertains"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES: return "_ActRelationshipTemporallyPertainsApproximates"; + case ENE: return "ENE"; + case ECW: return "ECW"; + case CONCURRENT: return "CONCURRENT"; + case SBSECWE: return "SBSECWE"; + case ENS: return "ENS"; + case ECWS: return "ECWS"; + case SNE: return "SNE"; + case SCWE: return "SCWE"; + case SNS: return "SNS"; + case SCW: return "SCW"; + case SCWSEBE: return "SCWSEBE"; + case SCWSEAE: return "SCWSEAE"; + case EAS: return "EAS"; + case EAE: return "EAE"; + case SASEAE: return "SASEAE"; + case SBEEAE: return "SBEEAE"; + case SASSBEEAS: return "SASSBEEAS"; + case SBSEAE: return "SBSEAE"; + case SAS: return "SAS"; + case SAE: return "SAE"; + case DURING: return "DURING"; + case SASECWE: return "SASECWE"; + case EASORECWS: return "EASORECWS"; + case EAEORECW: return "EAEORECW"; + case INDEPENDENT: return "INDEPENDENT"; + case SAEORSCWE: return "SAEORSCWE"; + case SASORSCW: return "SASORSCW"; + case SBEORSCWE: return "SBEORSCWE"; + case OVERLAP: return "OVERLAP"; + case EDU: return "EDU"; + case SBSEASEBE: return "SBSEASEBE"; + case SBSEAS: return "SBSEAS"; + case SDU: return "SDU"; + case SBE: return "SBE"; + case EBE: return "EBE"; + case SBSEBE: return "SBSEBE"; + case EBSORECWS: return "EBSORECWS"; + case EBS: return "EBS"; + case EBEORECW: return "EBEORECW"; + case SBSORSCW: return "SBSORSCW"; + case SBS: return "SBS"; + case AUTH: return "AUTH"; + case CAUS: return "CAUS"; + case COMP: return "COMP"; + case CTRLV: return "CTRLV"; + case MBR: return "MBR"; + case STEP: return "STEP"; + case ARR: return "ARR"; + case DEP: return "DEP"; + case PART: return "PART"; + case COVBY: return "COVBY"; + case DRIV: return "DRIV"; + case ELNK: return "ELNK"; + case EVID: return "EVID"; + case EXACBY: return "EXACBY"; + case EXPL: return "EXPL"; + case INTF: return "INTF"; + case ITEMSLOC: return "ITEMSLOC"; + case LIMIT: return "LIMIT"; + case META: return "META"; + case MFST: return "MFST"; + case NAME: return "NAME"; + case OUTC: return "OUTC"; + case _ACTRELATIONSIPOBJECTIVE: return "_ActRelationsipObjective"; + case OBJC: return "OBJC"; + case OBJF: return "OBJF"; + case GOAL: return "GOAL"; + case RISK: return "RISK"; + case PERT: return "PERT"; + case PREV: return "PREV"; + case REFR: return "REFR"; + case USE: return "USE"; + case REFV: return "REFV"; + case RELVBY: return "RELVBY"; + case SEQL: return "SEQL"; + case APND: return "APND"; + case BSLN: return "BSLN"; + case COMPLY: return "COMPLY"; + case DOC: return "DOC"; + case FLFS: return "FLFS"; + case OCCR: return "OCCR"; + case OREF: return "OREF"; + case SCH: return "SCH"; + case GEN: return "GEN"; + case GEVL: return "GEVL"; + case INST: return "INST"; + case MOD: return "MOD"; + case MTCH: return "MTCH"; + case OPTN: return "OPTN"; + case RCHAL: return "RCHAL"; + case REV: return "REV"; + case RPLC: return "RPLC"; + case SUCC: return "SUCC"; + case UPDT: return "UPDT"; + case XCRPT: return "XCRPT"; + case VRXCRPT: return "VRXCRPT"; + case XFRM: return "XFRM"; + case SPRT: return "SPRT"; + case SPRTBND: return "SPRTBND"; + case SUBJ: return "SUBJ"; + case QUALF: return "QUALF"; + case SUMM: return "SUMM"; + case VALUE: return "VALUE"; + case CURE: return "CURE"; + case CURE_ADJ: return "CURE.ADJ"; + case MTGT_ADJ: return "MTGT.ADJ"; + case RACT: return "RACT"; + case SUGG: return "SUGG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActRelationshipType"; + } + public String getDefinition() { + switch (this) { + case ART: return "Description: A directed association between a source Act and a target Act.\r\n\n \n Usage Note: This code should never be transmitted in an instance as the value of ActRelationship.typeCode (attribute)"; + case _ACTCLASSTEMPORALLYPERTAINS: return "ActClassTemporallyPertains"; + case _ACTRELATIONSHIPACCOUNTING: return "Codes that describe the relationship between an Act and a financial instrument such as a financial transaction, account or invoice element."; + case _ACTRELATIONSHIPCOSTTRACKING: return "Expresses values for describing the relationship relationship between an InvoiceElement or InvoiceElementGroup and a billable act."; + case CHRG: return "A relationship that provides an ability to associate a financial transaction (target) as a charge to a clinical act (source). A clinical act may have a charge associated with the execution or delivery of the service.\r\n\n The financial transaction will define the charge (bill) for delivery or performance of the service.\r\n\n Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product."; + case COST: return "A relationship that provides an ability to associate a financial transaction (target) as a cost to a clinical act (source). A clinical act may have an inherit cost associated with the execution or delivery of the service.\r\n\n The financial transaction will define the cost of delivery or performance of the service.\r\n\n Charges and costs are distinct terms. A charge defines what is charged or billed to another organization or entity within an organization. The cost defines what it costs an organization to perform or deliver a service or product."; + case _ACTRELATIONSHIPPOSTING: return "Expresses values for describing the relationship between a FinancialTransaction and an Account."; + case CREDIT: return "A credit relationship ties a financial transaction (target) to an account (source). A credit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account credit will decrease the account balance. A non-asset account credit will decrease the account balance."; + case DEBIT: return "A debit relationship ties a financial transaction (target) to an account (source). A debit, once applied (posted), may have either a positive or negative effect on the account balance, depending on the type of account. An asset account debit will increase the account balance. A non-asset account debit will decrease the account balance."; + case _ACTRELATIONSHIPCONDITIONAL: return "Specifies under what circumstances (target Act) the source-Act may, must, must not or has occurred"; + case CIND: return "A contraindication is just a negation of a reason, i.e. it gives a condition under which the action is not to be done. Both, source and target can be any kind of service; target service is in criterion mood. How the strength of a contraindication is expressed (e.g., relative, absolute) is left as an open issue. The priorityNumber attribute could be used."; + case PRCN: return "A requirement to be true before a service is performed. The target can be any service in criterion mood. For multiple pre-conditions a conjunction attribute (AND, OR, XOR) is applicable."; + case RSON: return "Description: The reason or rationale for a service. A reason link is weaker than a trigger, it only suggests that some service may be or might have been a reason for some action, but not that this reason requires/required the action to be taken. Also, as opposed to the trigger, there is no strong timely relation between the reason and the action. As well as providing various types of information about the rationale for a service, the RSON act relationship is routinely used between a SBADM act and an OBS act to describe the indication for use of a medication. Child concepts may be used to describe types of indication. \r\n\n \n Discussion: In prior releases, the code \"SUGG\" (suggests) was expressed as \"an inversion of the reason link.\" That code has been retired in favor of the inversion indicator that is an attribute of ActRelationship."; + case BLOCK: return "Definition: The source act is performed to block the effects of the target act. This act relationship should be used when describing near miss type incidents where potential harm could have occurred, but the action described in the source act blocked the potential harmful effects of the incident actually occurring."; + case DIAG: return "Description: The source act is intended to help establish the presence of a (an adverse) situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case IMM: return "Description: The source act is intented to provide immunity against the effects of the target act (the target act describes an infectious disease)"; + case ACTIMM: return "Description: The source act is intended to provide active immunity against the effects of the target act (the target act describes an infectious disease)"; + case PASSIMM: return "Description: The source act is intended to provide passive immunity against the effects of the target act (the target act describes an infectious disease)."; + case MITGT: return "The source act removes or lessens the occurrence or effect of the target act."; + case RCVY: return "Definition: The source act is performed to recover from the effects of the target act."; + case PRYLX: return "Description: The source act is intended to reduce the risk of of an adverse situation to emerge as described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case TREAT: return "Description: The source act is intended to improve a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case ADJUNCT: return "Description: The source act is intended to offer an additional treatment for the management or cure of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature. It is not a requirement that the non-adjunctive treatment is explicitly specified."; + case MTREAT: return "Description: The source act is intended to provide long term maintenance improvement or management of a pre-existing adverse situation described by the target act. This is not limited to diseases but can apply to any adverse situation or condition of medical or technical nature."; + case PALLTREAT: return "Description: The source act is intended to provide palliation for the effects of the target act."; + case SYMP: return "Description: The source act is intented to provide symptomatic relief for the effects of the target act."; + case TRIG: return "A pre-condition that if true should result in the source Act being executed. The target is in typically in criterion mood. When reported after the fact (i.e. the criterion has been met) it may be in Event mood. A delay between the trigger and the triggered action can be specified.\r\n\n \n Discussion: This includes the concept of a required act for a service or financial instrument such as an insurance plan or policy. In such cases, the trigger is the occurrence of a specific condition such as coverage limits being exceeded."; + case _ACTRELATIONSHIPTEMPORALLYPERTAINS: return "Abstract collector for ActRelationhsip types that relate two acts by their timing."; + case _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES: return "Abstract collector for ActRelationship types that relate two acts by their approximate timing."; + case ENE: return "A relationship in which the source act's effective time ends near the end of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is ENS"; + case ECW: return "A relationship in which the source act's effective time ends with the end of the target act's effective time.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case CONCURRENT: return "A relationship in which the source act's effective time is the same as the target act's effective time.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case SBSECWE: return "The source Act starts before the start of the target Act, and ends with the target Act.\r\n\n \n UsageNote: Inverse code is SASECWE"; + case ENS: return "A relationship in which the source act's effective time ends near the start of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is ENE"; + case ECWS: return "The source Act ends when the target act starts (i.e. if we say \"ActOne ECWS ActTwo\", it means that ActOne ends when ActTwo starts, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is SCWE"; + case SNE: return "A relationship in which the source act's effective time starts near the end of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is SNS"; + case SCWE: return "The source Act starts when the target act ends (i.e. if we say \"ActOne SCWE ActTwo\", it means that ActOne starts when ActTwo ends, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is SBSECWS"; + case SNS: return "A relationship in which the source act's effective time starts near the start of the target act's effective time. Near is defined separately as a time interval.\r\n\n \n Usage Note: Inverse code is SNE"; + case SCW: return "A relationship in which the source act's effective time starts with the start of the target act's effective time.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case SCWSEBE: return "The source Act starts with.the target Act and ends before the end of the target Act.\r\n\n \n UsageNote: Inverse code is SCWSEAE"; + case SCWSEAE: return "The source Act starts with the target Act, and ends after the end of the target Act."; + case EAS: return "A relationship in which the source act ends after the target act starts.\r\n\n \n UsageNote: Inverse code is SBE"; + case EAE: return "A relationship in which the source act ends after the target act ends.\r\n\n \n UsageNote: Inverse code is EBE"; + case SASEAE: return "The source Act starts after start of the target Act and ends after end of the target Act.\r\n\n \n UsageNote: Inverse code is SBSEBE"; + case SBEEAE: return "The source Act contains the end of the target Act.\r\n\n \n UsageNote: Inverse code is EDU"; + case SASSBEEAS: return "The source Act start after the start of the target Act, and contains the end of the target Act.\r\n\n \n UsageNote: Inverse code is SBSEASEBE"; + case SBSEAE: return "The source Act contains the time of the target Act.\r\n\n \n UsageNote: Inverse code is DURING"; + case SAS: return "The source Act starts after the start of the target Act (i.e. if we say \"ActOne SAS ActTwo\", it means that ActOne starts after the start of ActTwo, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is SBS"; + case SAE: return "A relationship in which the source act starts after the target act ends.\r\n\n \n UsageNote: Inverse code is EBS"; + case DURING: return "A relationship in which the source act's effective time is wholly within the target act's effective time (including end points, as defined in the act's effective times)\r\n\n \n UsageNote: Inverse code is SBSEAE"; + case SASECWE: return "The source Act starts after start of the target Act, and ends with the target Act.\r\n\n \n UsageNote: Inverse code is SBSECWE"; + case EASORECWS: return "A relationship in which the source act's effective time ends after or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EBSORECWS"; + case EAEORECW: return "A relationship in which the source act's effective time ends after or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EBEORECW"; + case INDEPENDENT: return "The source Act is independent of the time of the target Act.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case SAEORSCWE: return "A relationship in which the source act's effective time starts after or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SBEORSCWE"; + case SASORSCW: return "A relationship in which the source act's effective time starts after or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SBSORSCW"; + case SBEORSCWE: return "A relationship in which the source act's effective time starts before or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SAEORSCWE"; + case OVERLAP: return "A relationship in which the source act's effective time overlaps the target act's effective time in any way.\r\n\n \n UsageNote: This code is reflexive. Therefore its inverse code is itself."; + case EDU: return "A relationship in which the source act ends within the target act's effective time (including end points, as defined in the act's effective times)\r\n\n \n UsageNote: Inverse code is SBEEAE"; + case SBSEASEBE: return "The source Act contains the start of the target Act, and ends before the end of the target Act.\r\n\n \n UsageNote: Inverse code is SASSBEEAS"; + case SBSEAS: return "The source Act contains the start of the target Act.\r\n\n \n UsageNote: Inverse code is SDU"; + case SDU: return "A relationship in which the source act starts within the target act's effective time (including end points, as defined in the act's effective times)\r\n\n \n UsageNote: Inverse code is SBSEAS"; + case SBE: return "The source Act starts before the end of the target Act (i.e. if we say \"ActOne SBE ActTwo\", it means that ActOne starts before the end of ActTwo, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is EAS"; + case EBE: return "The source Act ends before the end of the target Act (i.e. if we say \"ActOne EBE ActTwo\", it means that ActOne ends before the end of ActTwo, therefore ActOne is the source and ActTwo is the target).\r\n\n \n UsageNote: Inverse code is EAE"; + case SBSEBE: return "The source Act starts before the start of the target Act, and ends before the end of the target Act.\r\n\n \n UsageNote: Inverse code is SASEAE"; + case EBSORECWS: return "A relationship in which the source act's effective time ends before or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EASORECWS"; + case EBS: return "A relationship in which the source act ends before the target act starts.\r\n\n \n UsageNote: Inverse code is SAE"; + case EBEORECW: return "A relationship in which the source act's effective time ends before or concurrent with the end of the target act's effective time.\r\n\n \n Usage Note: Inverse code is EAEORECW"; + case SBSORSCW: return "A relationship in which the source act's effective time starts before or concurrent with the start of the target act's effective time.\r\n\n \n Usage Note: Inverse code is SASORSCW"; + case SBS: return "A relationship in which the source act begins before the target act begins.\r\n\n \n UsageNote: Inverse code is SAS"; + case AUTH: return "A relationship in which the target act authorizes or certifies the source act."; + case CAUS: return "Description: An assertion that an act was the cause of another act.This is stronger and more specific than the support link. The source (cause) is typically an observation, but may be any act, while the target may be any act.\r\n\n \n Examples:\n \r\n\n \n a growth of Staphylococcus aureus may be considered the cause of an abscess\n contamination of the infusion bag was deemed to be the cause of the infection that the patient experienced\n lack of staff on the shift was deemed to be a supporting factor (proximal factor) causing the patient safety incident where the patient fell out of bed because the bed-sides had not been put up which caused the night patient to fall out of bed"; + case COMP: return "The target act is a component of the source act, with no semantics regarding composition or aggregation implied."; + case CTRLV: return "A relationship from an Act to a Control Variable. For example, if a Device makes an Observation, this relates the Observation to its Control Variables documenting the device's settings that influenced the observation."; + case MBR: return "The target Acts are aggregated by the source Act. Target Acts may have independent existence, participate in multiple ActRelationships, and do not contribute to the meaning of the source.\r\n\n \n UsageNotes: This explicitly represents the conventional notion of aggregation. The target Act is part of a collection of Acts (no implication is made of cardinality, a source of Acts may contain zero, one, or more member target Acts).\r\n\n It is expected that this will be primarily used with _ActClassRecordOrganizer, BATTERY, and LIST"; + case STEP: return "A collection of sub-services as steps or subtasks performed for the source service. Services may be performed sequentially or concurrently.\r\n\n \n UsageNotes: Sequence of steps may be indicated by use of _ActRelationshipTemporallyPertains, as well as via ActRelationship.sequenceNumber, ActRelationship.pauseQuantity, Target.priorityCode.\r\n\n \n OpenIssue: Need Additional guidelines on when each approach should be used."; + case ARR: return "The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act entered into the source Act by means of the target Transportation act."; + case DEP: return "The relationship that links to a Transportation Act (target) from another Act (source) indicating that the subject of the source Act departed from the source Act by means of the target Transportation act."; + case PART: return "The source Act is a composite of the target Acts. The target Acts do not have an existence independent of the source Act.\r\n\n \n UsageNote: In UML 1.1, this is a \"composition\" defined as: \n \"A form of aggregation with strong ownership and coincident lifetime as part of the whole. Parts with non-fixed multiplicity may be created after the composite itself, but once created they live and die with it (i.e., they share lifetimes). Such parts can also be explicitly removed before the death of the composite. Composition may be recursive.\""; + case COVBY: return "A relationship in which the source act is covered by or is under the authority of a target act. A financial instrument such as an Invoice Element is covered by one or more specific instances of an Insurance Policy."; + case DRIV: return "Associates a derived Act with its input parameters. E.G., an anion-gap observation can be associated as being derived from given sodium-, (potassium-,), chloride-, and bicarbonate-observations. The narrative content (Act.text) of a source act is wholly machine-derived from the collection of target acts."; + case ELNK: return "Expresses an association that links two instances of the same act over time, indicating that the instance are part of the same episode, e.g. linking two condition nodes for episode of illness; linking two encounters for episode of encounter."; + case EVID: return "Indicates that the target Act provides evidence in support of the action represented by the source Act. The target is not a 'reason' for the source act, but rather gives supporting information on why the source act is an appropriate course of action. Possible targets might be clinical trial results, journal articles, similar successful therapies, etc.\r\n\n \n Rationale: Provides a mechanism for conveying clinical justification for non-approved or otherwise non-traditional therapies."; + case EXACBY: return "Description:The source act is aggravated by the target act. (Example \"chest pain\" EXACBY \"exercise\")"; + case EXPL: return "This is the inversion of support. Used to indicate that a given observation is explained by another observation or condition."; + case INTF: return "the target act documents a set of circumstances (events, risks) which prevent successful completion, or degradation of quality of, the source Act.\r\n\n \n UsageNote: This provides the semantics to document barriers to care"; + case ITEMSLOC: return "Items located"; + case LIMIT: return "A relationship that limits or restricts the source act by the elements of the target act. For example, an authorization may be limited by a financial amount (up to $500). Target Act must be in EVN.CRIT mood."; + case META: return "Definition: Indicates that the attributes and associations of the target act provide metadata (for example, identifiers, authorship, etc.) for the source act.\r\n\n \n Constraint: Source act must have either a mood code that is not \"EVN\" (event) or its \"isCriterion\" attribute must set to \"true\". Target act must be an Act with a mood code of EVN and with isCriterionInd attribute set to \"true\"."; + case MFST: return "An assertion that a new observation may be the manifestation of another existing observation or action. This assumption is attributed to the same actor who asserts the manifestation. This is stronger and more specific than an inverted support link. For example, an agitated appearance can be asserted to be the manifestation (effect) of a known hyperthyroxia. This expresses that one might not have realized a symptom if it would not be a common manifestation of a known condition. The target (cause) may be any service, while the source (manifestation) must be an observation."; + case NAME: return "Used to assign a \"name\" to a condition thread. Source is a condition node, target can be any service."; + case OUTC: return "An observation that should follow or does actually follow as a result or consequence of a condition or action (sometimes called \"post-conditional\".) Target must be an observation as a goal, risk or any criterion. For complex outcomes a conjunction attribute (AND, OR, XOR) can be used. An outcome link is often inverted to describe an outcome assessment."; + case _ACTRELATIONSIPOBJECTIVE: return "The target act is a desired outcome of the source act. Source is any act (typically an intervention). Target must be an observation in criterion mood."; + case OBJC: return "A desired state that a service action aims to maintain. E.g., keep systolic blood pressure between 90 and 110 mm Hg. Source is an intervention service. Target must be an observation in criterion mood."; + case OBJF: return "A desired outcome that a service action aims to meet finally. Source is any service (typically an intervention). Target must be an observation in criterion mood."; + case GOAL: return "A goal that one defines given a patient's health condition. Subsequently planned actions aim to meet that goal. Source is an observation or condition node, target must be an observation in goal mood."; + case RISK: return "A noteworthy undesired outcome of a patient's condition that is either likely enough to become an issue or is less likely but dangerous enough to be addressed."; + case PERT: return "This is a very unspecific relationship from one item of clinical information to another. It does not judge about the role the pertinent information plays."; + case PREV: return "A relationship in which the target act is a predecessor instance to the source act. Generally each of these instances is similar, but no identical. In healthcare coverage it is used to link a claim item to a previous claim item that might have claimed for the same set of services."; + case REFR: return "A relationship in which the target act is referred to by the source act. This permits a simple reference relationship that distinguishes between the referent and the referee."; + case USE: return "Indicates that the source act makes use of (or will make use of) the information content of the target act.\r\n\n \n UsageNotes: A usage relationship only makes sense if the target act is authored and occurs independently of the source act. Otherwise a simpler relationship such as COMP would be appropriate.\r\n\n \n Rationale: There is a need when defining a clinical trial protocol to indicate that the protocol makes use of other protocol or treatment specifications. This is stronger than the assertion of \"references\". References may exist without usage, and in a clinical trial protocol is common to assert both: what other specifications does this trial use and what other specifications does it merely reference."; + case REFV: return "Reference ranges are essentially descriptors of a class of result values assumed to be \"normal\", \"abnormal\", or \"critical.\" Those can vary by sex, age, or any other criterion. Source and target are observations, the target is in criterion mood. This link type can act as a trigger in case of alarms being triggered by critical results."; + case RELVBY: return "Description:The source act is wholly or partially alleviated by the target act. (Example \"chest pain\" RELVBY \"sublingual nitroglycerin administration\")"; + case SEQL: return "An act relationship indicating that the source act follows the target act. The source act should in principle represent the same kind of act as the target. Source and target need not have the same mood code (mood will often differ). The target of a sequel is called antecedent. Examples for sequel relationships are: revision, transformation, derivation from a prototype (as a specialization is a derivation of a generalization), followup, realization, instantiation."; + case APND: return "An addendum (source) to an existing service object (target), containing supplemental information. The addendum is itself an original service object linked to the supplemented service object. The supplemented service object remains in place and its content and status are unaltered."; + case BSLN: return "Indicates that the target observation(s) provide an initial reference for the source observation or observation group.\r\n\n \n UsageConstraints: Both source and target must be Observations or specializations thereof."; + case COMPLY: return "Description:The source act complies with, adheres to, conforms to, or is permissible under (in whole or in part) the policy, contract, agreement, law, conformance criteria, certification guidelines or requirement conveyed by the target act.\r\n\n Examples for compliance relationships are: audits of adherence with a security policy, certificate of conformance to system certification requirements, or consent directive in compliance with or permissible under a privacy policy."; + case DOC: return "The source act documents the target act."; + case FLFS: return "The source act fulfills (in whole or in part) the target act. Source act must be in a mood equal or more actual than the target act."; + case OCCR: return "The source act is a single occurrence of a repeatable target act. The source and target act can be in any mood on the \"completion track\" but the source act must be as far as or further along the track than the target act (i.e., the occurrence of an intent can be an event but not vice versa)."; + case OREF: return "Relates either an appointment request or an appointment to the order for the service being scheduled."; + case SCH: return "Associates a specific time (and associated resources) with a scheduling request or other intent."; + case GEN: return "The generalization relationship can be used to express categorical knowledge about services (e.g., amilorid, triamterene, and spironolactone have the common generalization potassium sparing diuretic)."; + case GEVL: return "A goal-evaluation links an observation (intent or actual) to a goal to indicate that the observation evaluates the goal. Given the goal and the observation, a \"goal distance\" (e.g., goal to observation) can be \"calculated\" and need not be sent explicitly."; + case INST: return "Used to capture the link between a potential service (\"master\" or plan) and an actual service, where the actual service instantiates the potential service. The instantiation may override the master's defaults."; + case MOD: return "Definition: Used to link a newer version or 'snapshot' of a business object (source) to an older version or 'snapshot' of the same business object (target).\r\n\n \n Usage:The identifier of the Act should be the same for both source and target. If the identifiers are distinct, RPLC should be used instead.\r\n\n Name from source to target = \"modifiesPrior\"\r\n\n Name from target to source = \"modifiesByNew\""; + case MTCH: return "A trigger-match links an actual service (e.g., an observation or procedure that took place) with a service in criterion mood. For example if the trigger is \"observation of pain\" and pain is actually observed, and if that pain-observation caused the trigger to fire, that pain-observation can be linked with the trigger."; + case OPTN: return "A relationship between a source Act that provides more detailed properties to the target Act.\r\n\n The source act thus is a specialization of the target act, but instead of mentioning all the inherited properties it only mentions new property bindings or refinements.\r\n\n The typical use case is to specify certain alternative variants of one kind of Act. The priorityNumber attribute is used to weigh refinements as preferred over other alternative refinements.\r\n\n Example: several routing options for a drug are specified as one SubstanceAdministration for the general treatment with attached refinements for the various routing options."; + case RCHAL: return "Description:A relationship in which the target act is carried out to determine whether an effect attributed to the source act can be recreated."; + case REV: return "A relationship between a source Act that seeks to reverse or undo the action of the prior target Act.\r\n\n Example: A posted financial transaction (e.g., a debit transaction) was applied in error and must be reversed (e.g., by a credit transaction) the credit transaction is identified as an undo (or reversal) of the prior target transaction.\r\n\n Constraints: the \"completion track\" mood of the target Act must be equally or more \"actual\" than the source act. I.e., when the target act is EVN the source act can be EVN, or any INT. If the target act is INT, the source act can be INT."; + case RPLC: return "A replacement source act replaces an existing target act. The state of the target act being replaced becomes obselete, but the act is typically still retained in the system for historical reference. The source and target must be of the same type."; + case SUCC: return "Definition: A new act that carries forward the intention of the original act, but does not completely replace it. The status of the predecessor act must be 'completed'. The original act is the target act and the successor is the source act."; + case UPDT: return "A condition thread relationship specifically links condition nodes together to form a condition thread. The source is the new condition node and the target links to the most recent node of the existing condition thread."; + case XCRPT: return "The source is an excerpt from the target."; + case VRXCRPT: return "The source is a direct quote from the target."; + case XFRM: return "Used when the target Act is a transformation of the source Act. (For instance, used to show that a CDA document is a transformation of a DICOM SR document.)"; + case SPRT: return "Used to indicate that an existing service is suggesting evidence for a new observation. The assumption of support is attributed to the same actor who asserts the observation. Source must be an observation, target may be any service (e.g., to indicate a status post)."; + case SPRTBND: return "A specialization of \"has support\" (SPRT), used to relate a secondary observation to a Region of Interest on a multidimensional observation, if the ROI specifies the true boundaries of the secondary observation as opposed to only marking the approximate area. For example, if the start and end of an ST elevation episode is visible in an EKG, this relation would indicate the ROI bounds the \"ST elevation\" observation -- the ROI defines the true beginning and ending of the episode. Conversely, if a ROI simply contains ST elevation, but it does not define the bounds (start and end) of the episode, the more general \"has support\" relation is used. Likewise, if a ROI on an image defines the true bounds of a \"1st degree burn\", the relation \"has bounded support\" is used; but if the ROI only points to the approximate area of the burn, the general \"has support\" relation is used."; + case SUBJ: return "Relates an Act to its subject Act that the first Act is primarily concerned with.\r\n\n Examples\r\n\n \n \n The first Act may be a ControlAct manipulating the subject Act \r\n\n \n \n The first act is a region of interest (ROI) that defines a region within the subject Act.\r\n\n \n \n The first act is a reporting or notification Act, that echos the subject Act for a specific new purpose.\r\n\n \n \n Constraints\r\n\n An Act may have multiple subject acts.\r\n\n Rationale\r\n\n The ActRelationshipType \"has subject\" is similar to the ParticipationType \"subject\", Acts that primarily operate on physical subjects use the Participation, those Acts that primarily operate on other Acts (other information) use the ActRelationship."; + case QUALF: return "The target observation qualifies (refines) the semantics of the source observation.\r\n\n \n UsageNote: This is not intended to replace concept refinement and qualification via vocabulary. It is used when there are multiple components which together provide the complete understanding of the source Act."; + case SUMM: return "An act that contains summary values for a list or set of subordinate acts. For example, a summary of transactions for a particular accounting period."; + case VALUE: return "Description:Indicates that the target Act represents the result of the source observation Act.\r\n\n \n FormalConstraint: Source Act must be an Observation or specialization there-of. Source Act must not have the value attribute specified\r\n\n \n UsageNote: This relationship allows the result of an observation to be fully expressed as RIM acts as opposed to being embedded in the value attribute. For example, sending a Document act as the result of an imaging observation, sending a list of Procedures and/or other acts as the result of a medical history observation.\r\n\n The valueNegationInd attribute on the source Act has the same semantics of \"negated finding\" when it applies to the target of a VALUE ActRelationship as it does to the value attribute. On the other hand, if the ActRelationship.negationInd is true for a VALUE ActRelationship, that means the specified observation does not have the indicated value but does not imply a negated finding. Because the semantics are extremely close, it is recommended that Observation.valueNegationInd be used, not ActRelationship.negationInd.\r\n\n \n OpenIssue: The implications of negationInd on ActRelationship and the valueNegationind on Observation."; + case CURE: return "curative indication"; + case CURE_ADJ: return "adjunct curative indication"; + case MTGT_ADJ: return "adjunct mitigation"; + case RACT: return ""; + case SUGG: return ""; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ART: return "act relationship type"; + case _ACTCLASSTEMPORALLYPERTAINS: return "ActClassTemporallyPertains"; + case _ACTRELATIONSHIPACCOUNTING: return "ActRelationshipAccounting"; + case _ACTRELATIONSHIPCOSTTRACKING: return "ActRelationshipCostTracking"; + case CHRG: return "has charge"; + case COST: return "has cost"; + case _ACTRELATIONSHIPPOSTING: return "ActRelationshipPosting"; + case CREDIT: return "has credit"; + case DEBIT: return "has debit"; + case _ACTRELATIONSHIPCONDITIONAL: return "ActRelationshipConditional"; + case CIND: return "has contra-indication"; + case PRCN: return "has pre-condition"; + case RSON: return "has reason"; + case BLOCK: return "blocks"; + case DIAG: return "diagnoses"; + case IMM: return "immunization against"; + case ACTIMM: return "active immunization against"; + case PASSIMM: return "passive immunization against"; + case MITGT: return "mitigates"; + case RCVY: return "recovers"; + case PRYLX: return "prophylaxis of"; + case TREAT: return "treats"; + case ADJUNCT: return "adjunctive treatment"; + case MTREAT: return "maintenance treatment"; + case PALLTREAT: return "palliates"; + case SYMP: return "symptomatic relief"; + case TRIG: return "has trigger"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINS: return "ActRelationshipTemporallyPertains"; + case _ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES: return "ActRelationshipTemporallyPertainsApproximates"; + case ENE: return "ends near end"; + case ECW: return "ends concurrent with"; + case CONCURRENT: return "concurrent with"; + case SBSECWE: return "starts before start of, ends with"; + case ENS: return "ends near start"; + case ECWS: return "ends concurrent with start of"; + case SNE: return "starts near end"; + case SCWE: return "starts concurrent with end of"; + case SNS: return "starts near start"; + case SCW: return "starts concurrent with"; + case SCWSEBE: return "starts with. ends before end of"; + case SCWSEAE: return "starts with, ends after end of"; + case EAS: return "ends after start of"; + case EAE: return "ends after end of"; + case SASEAE: return "starts after start of, ends after end of"; + case SBEEAE: return "contains end of"; + case SASSBEEAS: return "start after start of, contains end of"; + case SBSEAE: return "contains time of"; + case SAS: return "starts after start of"; + case SAE: return "starts after end of"; + case DURING: return "occurs during"; + case SASECWE: return "starts after start of, ends with"; + case EASORECWS: return "ends after or concurrent with start of"; + case EAEORECW: return "ends after or concurrent with end of"; + case INDEPENDENT: return "independent of time of"; + case SAEORSCWE: return "starts after or concurrent with end of"; + case SASORSCW: return "starts after or concurrent with start of"; + case SBEORSCWE: return "starts before or concurrent with end of"; + case OVERLAP: return "overlaps with"; + case EDU: return "ends during"; + case SBSEASEBE: return "contains start of, ends before end of"; + case SBSEAS: return "contains start of"; + case SDU: return "starts during"; + case SBE: return "starts before end of"; + case EBE: return "ends before end of"; + case SBSEBE: return "starts before start of, ends before end of"; + case EBSORECWS: return "ends before or concurrent with start of"; + case EBS: return "ends before start of"; + case EBEORECW: return "ends before or concurrent with end of"; + case SBSORSCW: return "starts before or concurrent with start of"; + case SBS: return "starts before start of"; + case AUTH: return "authorized by"; + case CAUS: return "is etiology for"; + case COMP: return "has component"; + case CTRLV: return "has control variable"; + case MBR: return "has member"; + case STEP: return "has step"; + case ARR: return "arrival"; + case DEP: return "departure"; + case PART: return "has part"; + case COVBY: return "covered by"; + case DRIV: return "is derived from"; + case ELNK: return "episodeLink"; + case EVID: return "provides evidence for"; + case EXACBY: return "exacerbated by"; + case EXPL: return "has explanation"; + case INTF: return "interfered by"; + case ITEMSLOC: return "items located"; + case LIMIT: return "limited by"; + case META: return "has metadata"; + case MFST: return "is manifestation of"; + case NAME: return "assigns name"; + case OUTC: return "has outcome"; + case _ACTRELATIONSIPOBJECTIVE: return "Act Relationsip Objective"; + case OBJC: return "has continuing objective"; + case OBJF: return "has final objective"; + case GOAL: return "has goal"; + case RISK: return "has risk"; + case PERT: return "has pertinent information"; + case PREV: return "has previous instance"; + case REFR: return "refers to"; + case USE: return "uses"; + case REFV: return "has reference values"; + case RELVBY: return "relieved by"; + case SEQL: return "is sequel"; + case APND: return "is appendage"; + case BSLN: return "has baseline"; + case COMPLY: return "complies with"; + case DOC: return "documents"; + case FLFS: return "fulfills"; + case OCCR: return "occurrence"; + case OREF: return "references order"; + case SCH: return "schedules request"; + case GEN: return "has generalization"; + case GEVL: return "evaluates (goal)"; + case INST: return "instantiates (master)"; + case MOD: return "modifies"; + case MTCH: return "matches (trigger)"; + case OPTN: return "has option"; + case RCHAL: return "re-challenge"; + case REV: return "reverses"; + case RPLC: return "replaces"; + case SUCC: return "succeeds"; + case UPDT: return "updates (condition)"; + case XCRPT: return "Excerpts"; + case VRXCRPT: return "Excerpt verbatim"; + case XFRM: return "transformation"; + case SPRT: return "has support"; + case SPRTBND: return "has bounded support"; + case SUBJ: return "has subject"; + case QUALF: return "has qualifier"; + case SUMM: return "summarized by"; + case VALUE: return "has value"; + case CURE: return "curative indication"; + case CURE_ADJ: return "adjunct curative indication"; + case MTGT_ADJ: return "adjunct mitigation"; + case RACT: return "RACT"; + case SUGG: return "SUGG"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipTypeEnumFactory.java new file mode 100644 index 00000000000..71e79309335 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActRelationshipTypeEnumFactory.java @@ -0,0 +1,602 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActRelationshipTypeEnumFactory implements EnumFactory { + + public V3ActRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ART".equals(codeString)) + return V3ActRelationshipType.ART; + if ("_ActClassTemporallyPertains".equals(codeString)) + return V3ActRelationshipType._ACTCLASSTEMPORALLYPERTAINS; + if ("_ActRelationshipAccounting".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPACCOUNTING; + if ("_ActRelationshipCostTracking".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPCOSTTRACKING; + if ("CHRG".equals(codeString)) + return V3ActRelationshipType.CHRG; + if ("COST".equals(codeString)) + return V3ActRelationshipType.COST; + if ("_ActRelationshipPosting".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPPOSTING; + if ("CREDIT".equals(codeString)) + return V3ActRelationshipType.CREDIT; + if ("DEBIT".equals(codeString)) + return V3ActRelationshipType.DEBIT; + if ("_ActRelationshipConditional".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPCONDITIONAL; + if ("CIND".equals(codeString)) + return V3ActRelationshipType.CIND; + if ("PRCN".equals(codeString)) + return V3ActRelationshipType.PRCN; + if ("RSON".equals(codeString)) + return V3ActRelationshipType.RSON; + if ("BLOCK".equals(codeString)) + return V3ActRelationshipType.BLOCK; + if ("DIAG".equals(codeString)) + return V3ActRelationshipType.DIAG; + if ("IMM".equals(codeString)) + return V3ActRelationshipType.IMM; + if ("ACTIMM".equals(codeString)) + return V3ActRelationshipType.ACTIMM; + if ("PASSIMM".equals(codeString)) + return V3ActRelationshipType.PASSIMM; + if ("MITGT".equals(codeString)) + return V3ActRelationshipType.MITGT; + if ("RCVY".equals(codeString)) + return V3ActRelationshipType.RCVY; + if ("PRYLX".equals(codeString)) + return V3ActRelationshipType.PRYLX; + if ("TREAT".equals(codeString)) + return V3ActRelationshipType.TREAT; + if ("ADJUNCT".equals(codeString)) + return V3ActRelationshipType.ADJUNCT; + if ("MTREAT".equals(codeString)) + return V3ActRelationshipType.MTREAT; + if ("PALLTREAT".equals(codeString)) + return V3ActRelationshipType.PALLTREAT; + if ("SYMP".equals(codeString)) + return V3ActRelationshipType.SYMP; + if ("TRIG".equals(codeString)) + return V3ActRelationshipType.TRIG; + if ("_ActRelationshipTemporallyPertains".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINS; + if ("_ActRelationshipTemporallyPertainsApproximates".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES; + if ("ENE".equals(codeString)) + return V3ActRelationshipType.ENE; + if ("ECW".equals(codeString)) + return V3ActRelationshipType.ECW; + if ("CONCURRENT".equals(codeString)) + return V3ActRelationshipType.CONCURRENT; + if ("SBSECWE".equals(codeString)) + return V3ActRelationshipType.SBSECWE; + if ("ENS".equals(codeString)) + return V3ActRelationshipType.ENS; + if ("ECWS".equals(codeString)) + return V3ActRelationshipType.ECWS; + if ("SNE".equals(codeString)) + return V3ActRelationshipType.SNE; + if ("SCWE".equals(codeString)) + return V3ActRelationshipType.SCWE; + if ("SNS".equals(codeString)) + return V3ActRelationshipType.SNS; + if ("SCW".equals(codeString)) + return V3ActRelationshipType.SCW; + if ("SCWSEBE".equals(codeString)) + return V3ActRelationshipType.SCWSEBE; + if ("SCWSEAE".equals(codeString)) + return V3ActRelationshipType.SCWSEAE; + if ("EAS".equals(codeString)) + return V3ActRelationshipType.EAS; + if ("EAE".equals(codeString)) + return V3ActRelationshipType.EAE; + if ("SASEAE".equals(codeString)) + return V3ActRelationshipType.SASEAE; + if ("SBEEAE".equals(codeString)) + return V3ActRelationshipType.SBEEAE; + if ("SASSBEEAS".equals(codeString)) + return V3ActRelationshipType.SASSBEEAS; + if ("SBSEAE".equals(codeString)) + return V3ActRelationshipType.SBSEAE; + if ("SAS".equals(codeString)) + return V3ActRelationshipType.SAS; + if ("SAE".equals(codeString)) + return V3ActRelationshipType.SAE; + if ("DURING".equals(codeString)) + return V3ActRelationshipType.DURING; + if ("SASECWE".equals(codeString)) + return V3ActRelationshipType.SASECWE; + if ("EASORECWS".equals(codeString)) + return V3ActRelationshipType.EASORECWS; + if ("EAEORECW".equals(codeString)) + return V3ActRelationshipType.EAEORECW; + if ("INDEPENDENT".equals(codeString)) + return V3ActRelationshipType.INDEPENDENT; + if ("SAEORSCWE".equals(codeString)) + return V3ActRelationshipType.SAEORSCWE; + if ("SASORSCW".equals(codeString)) + return V3ActRelationshipType.SASORSCW; + if ("SBEORSCWE".equals(codeString)) + return V3ActRelationshipType.SBEORSCWE; + if ("OVERLAP".equals(codeString)) + return V3ActRelationshipType.OVERLAP; + if ("EDU".equals(codeString)) + return V3ActRelationshipType.EDU; + if ("SBSEASEBE".equals(codeString)) + return V3ActRelationshipType.SBSEASEBE; + if ("SBSEAS".equals(codeString)) + return V3ActRelationshipType.SBSEAS; + if ("SDU".equals(codeString)) + return V3ActRelationshipType.SDU; + if ("SBE".equals(codeString)) + return V3ActRelationshipType.SBE; + if ("EBE".equals(codeString)) + return V3ActRelationshipType.EBE; + if ("SBSEBE".equals(codeString)) + return V3ActRelationshipType.SBSEBE; + if ("EBSORECWS".equals(codeString)) + return V3ActRelationshipType.EBSORECWS; + if ("EBS".equals(codeString)) + return V3ActRelationshipType.EBS; + if ("EBEORECW".equals(codeString)) + return V3ActRelationshipType.EBEORECW; + if ("SBSORSCW".equals(codeString)) + return V3ActRelationshipType.SBSORSCW; + if ("SBS".equals(codeString)) + return V3ActRelationshipType.SBS; + if ("AUTH".equals(codeString)) + return V3ActRelationshipType.AUTH; + if ("CAUS".equals(codeString)) + return V3ActRelationshipType.CAUS; + if ("COMP".equals(codeString)) + return V3ActRelationshipType.COMP; + if ("CTRLV".equals(codeString)) + return V3ActRelationshipType.CTRLV; + if ("MBR".equals(codeString)) + return V3ActRelationshipType.MBR; + if ("STEP".equals(codeString)) + return V3ActRelationshipType.STEP; + if ("ARR".equals(codeString)) + return V3ActRelationshipType.ARR; + if ("DEP".equals(codeString)) + return V3ActRelationshipType.DEP; + if ("PART".equals(codeString)) + return V3ActRelationshipType.PART; + if ("COVBY".equals(codeString)) + return V3ActRelationshipType.COVBY; + if ("DRIV".equals(codeString)) + return V3ActRelationshipType.DRIV; + if ("ELNK".equals(codeString)) + return V3ActRelationshipType.ELNK; + if ("EVID".equals(codeString)) + return V3ActRelationshipType.EVID; + if ("EXACBY".equals(codeString)) + return V3ActRelationshipType.EXACBY; + if ("EXPL".equals(codeString)) + return V3ActRelationshipType.EXPL; + if ("INTF".equals(codeString)) + return V3ActRelationshipType.INTF; + if ("ITEMSLOC".equals(codeString)) + return V3ActRelationshipType.ITEMSLOC; + if ("LIMIT".equals(codeString)) + return V3ActRelationshipType.LIMIT; + if ("META".equals(codeString)) + return V3ActRelationshipType.META; + if ("MFST".equals(codeString)) + return V3ActRelationshipType.MFST; + if ("NAME".equals(codeString)) + return V3ActRelationshipType.NAME; + if ("OUTC".equals(codeString)) + return V3ActRelationshipType.OUTC; + if ("_ActRelationsipObjective".equals(codeString)) + return V3ActRelationshipType._ACTRELATIONSIPOBJECTIVE; + if ("OBJC".equals(codeString)) + return V3ActRelationshipType.OBJC; + if ("OBJF".equals(codeString)) + return V3ActRelationshipType.OBJF; + if ("GOAL".equals(codeString)) + return V3ActRelationshipType.GOAL; + if ("RISK".equals(codeString)) + return V3ActRelationshipType.RISK; + if ("PERT".equals(codeString)) + return V3ActRelationshipType.PERT; + if ("PREV".equals(codeString)) + return V3ActRelationshipType.PREV; + if ("REFR".equals(codeString)) + return V3ActRelationshipType.REFR; + if ("USE".equals(codeString)) + return V3ActRelationshipType.USE; + if ("REFV".equals(codeString)) + return V3ActRelationshipType.REFV; + if ("RELVBY".equals(codeString)) + return V3ActRelationshipType.RELVBY; + if ("SEQL".equals(codeString)) + return V3ActRelationshipType.SEQL; + if ("APND".equals(codeString)) + return V3ActRelationshipType.APND; + if ("BSLN".equals(codeString)) + return V3ActRelationshipType.BSLN; + if ("COMPLY".equals(codeString)) + return V3ActRelationshipType.COMPLY; + if ("DOC".equals(codeString)) + return V3ActRelationshipType.DOC; + if ("FLFS".equals(codeString)) + return V3ActRelationshipType.FLFS; + if ("OCCR".equals(codeString)) + return V3ActRelationshipType.OCCR; + if ("OREF".equals(codeString)) + return V3ActRelationshipType.OREF; + if ("SCH".equals(codeString)) + return V3ActRelationshipType.SCH; + if ("GEN".equals(codeString)) + return V3ActRelationshipType.GEN; + if ("GEVL".equals(codeString)) + return V3ActRelationshipType.GEVL; + if ("INST".equals(codeString)) + return V3ActRelationshipType.INST; + if ("MOD".equals(codeString)) + return V3ActRelationshipType.MOD; + if ("MTCH".equals(codeString)) + return V3ActRelationshipType.MTCH; + if ("OPTN".equals(codeString)) + return V3ActRelationshipType.OPTN; + if ("RCHAL".equals(codeString)) + return V3ActRelationshipType.RCHAL; + if ("REV".equals(codeString)) + return V3ActRelationshipType.REV; + if ("RPLC".equals(codeString)) + return V3ActRelationshipType.RPLC; + if ("SUCC".equals(codeString)) + return V3ActRelationshipType.SUCC; + if ("UPDT".equals(codeString)) + return V3ActRelationshipType.UPDT; + if ("XCRPT".equals(codeString)) + return V3ActRelationshipType.XCRPT; + if ("VRXCRPT".equals(codeString)) + return V3ActRelationshipType.VRXCRPT; + if ("XFRM".equals(codeString)) + return V3ActRelationshipType.XFRM; + if ("SPRT".equals(codeString)) + return V3ActRelationshipType.SPRT; + if ("SPRTBND".equals(codeString)) + return V3ActRelationshipType.SPRTBND; + if ("SUBJ".equals(codeString)) + return V3ActRelationshipType.SUBJ; + if ("QUALF".equals(codeString)) + return V3ActRelationshipType.QUALF; + if ("SUMM".equals(codeString)) + return V3ActRelationshipType.SUMM; + if ("VALUE".equals(codeString)) + return V3ActRelationshipType.VALUE; + if ("CURE".equals(codeString)) + return V3ActRelationshipType.CURE; + if ("CURE.ADJ".equals(codeString)) + return V3ActRelationshipType.CURE_ADJ; + if ("MTGT.ADJ".equals(codeString)) + return V3ActRelationshipType.MTGT_ADJ; + if ("RACT".equals(codeString)) + return V3ActRelationshipType.RACT; + if ("SUGG".equals(codeString)) + return V3ActRelationshipType.SUGG; + throw new IllegalArgumentException("Unknown V3ActRelationshipType code '"+codeString+"'"); + } + + public String toCode(V3ActRelationshipType code) { + if (code == V3ActRelationshipType.ART) + return "ART"; + if (code == V3ActRelationshipType._ACTCLASSTEMPORALLYPERTAINS) + return "_ActClassTemporallyPertains"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPACCOUNTING) + return "_ActRelationshipAccounting"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPCOSTTRACKING) + return "_ActRelationshipCostTracking"; + if (code == V3ActRelationshipType.CHRG) + return "CHRG"; + if (code == V3ActRelationshipType.COST) + return "COST"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPPOSTING) + return "_ActRelationshipPosting"; + if (code == V3ActRelationshipType.CREDIT) + return "CREDIT"; + if (code == V3ActRelationshipType.DEBIT) + return "DEBIT"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPCONDITIONAL) + return "_ActRelationshipConditional"; + if (code == V3ActRelationshipType.CIND) + return "CIND"; + if (code == V3ActRelationshipType.PRCN) + return "PRCN"; + if (code == V3ActRelationshipType.RSON) + return "RSON"; + if (code == V3ActRelationshipType.BLOCK) + return "BLOCK"; + if (code == V3ActRelationshipType.DIAG) + return "DIAG"; + if (code == V3ActRelationshipType.IMM) + return "IMM"; + if (code == V3ActRelationshipType.ACTIMM) + return "ACTIMM"; + if (code == V3ActRelationshipType.PASSIMM) + return "PASSIMM"; + if (code == V3ActRelationshipType.MITGT) + return "MITGT"; + if (code == V3ActRelationshipType.RCVY) + return "RCVY"; + if (code == V3ActRelationshipType.PRYLX) + return "PRYLX"; + if (code == V3ActRelationshipType.TREAT) + return "TREAT"; + if (code == V3ActRelationshipType.ADJUNCT) + return "ADJUNCT"; + if (code == V3ActRelationshipType.MTREAT) + return "MTREAT"; + if (code == V3ActRelationshipType.PALLTREAT) + return "PALLTREAT"; + if (code == V3ActRelationshipType.SYMP) + return "SYMP"; + if (code == V3ActRelationshipType.TRIG) + return "TRIG"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINS) + return "_ActRelationshipTemporallyPertains"; + if (code == V3ActRelationshipType._ACTRELATIONSHIPTEMPORALLYPERTAINSAPPROXIMATES) + return "_ActRelationshipTemporallyPertainsApproximates"; + if (code == V3ActRelationshipType.ENE) + return "ENE"; + if (code == V3ActRelationshipType.ECW) + return "ECW"; + if (code == V3ActRelationshipType.CONCURRENT) + return "CONCURRENT"; + if (code == V3ActRelationshipType.SBSECWE) + return "SBSECWE"; + if (code == V3ActRelationshipType.ENS) + return "ENS"; + if (code == V3ActRelationshipType.ECWS) + return "ECWS"; + if (code == V3ActRelationshipType.SNE) + return "SNE"; + if (code == V3ActRelationshipType.SCWE) + return "SCWE"; + if (code == V3ActRelationshipType.SNS) + return "SNS"; + if (code == V3ActRelationshipType.SCW) + return "SCW"; + if (code == V3ActRelationshipType.SCWSEBE) + return "SCWSEBE"; + if (code == V3ActRelationshipType.SCWSEAE) + return "SCWSEAE"; + if (code == V3ActRelationshipType.EAS) + return "EAS"; + if (code == V3ActRelationshipType.EAE) + return "EAE"; + if (code == V3ActRelationshipType.SASEAE) + return "SASEAE"; + if (code == V3ActRelationshipType.SBEEAE) + return "SBEEAE"; + if (code == V3ActRelationshipType.SASSBEEAS) + return "SASSBEEAS"; + if (code == V3ActRelationshipType.SBSEAE) + return "SBSEAE"; + if (code == V3ActRelationshipType.SAS) + return "SAS"; + if (code == V3ActRelationshipType.SAE) + return "SAE"; + if (code == V3ActRelationshipType.DURING) + return "DURING"; + if (code == V3ActRelationshipType.SASECWE) + return "SASECWE"; + if (code == V3ActRelationshipType.EASORECWS) + return "EASORECWS"; + if (code == V3ActRelationshipType.EAEORECW) + return "EAEORECW"; + if (code == V3ActRelationshipType.INDEPENDENT) + return "INDEPENDENT"; + if (code == V3ActRelationshipType.SAEORSCWE) + return "SAEORSCWE"; + if (code == V3ActRelationshipType.SASORSCW) + return "SASORSCW"; + if (code == V3ActRelationshipType.SBEORSCWE) + return "SBEORSCWE"; + if (code == V3ActRelationshipType.OVERLAP) + return "OVERLAP"; + if (code == V3ActRelationshipType.EDU) + return "EDU"; + if (code == V3ActRelationshipType.SBSEASEBE) + return "SBSEASEBE"; + if (code == V3ActRelationshipType.SBSEAS) + return "SBSEAS"; + if (code == V3ActRelationshipType.SDU) + return "SDU"; + if (code == V3ActRelationshipType.SBE) + return "SBE"; + if (code == V3ActRelationshipType.EBE) + return "EBE"; + if (code == V3ActRelationshipType.SBSEBE) + return "SBSEBE"; + if (code == V3ActRelationshipType.EBSORECWS) + return "EBSORECWS"; + if (code == V3ActRelationshipType.EBS) + return "EBS"; + if (code == V3ActRelationshipType.EBEORECW) + return "EBEORECW"; + if (code == V3ActRelationshipType.SBSORSCW) + return "SBSORSCW"; + if (code == V3ActRelationshipType.SBS) + return "SBS"; + if (code == V3ActRelationshipType.AUTH) + return "AUTH"; + if (code == V3ActRelationshipType.CAUS) + return "CAUS"; + if (code == V3ActRelationshipType.COMP) + return "COMP"; + if (code == V3ActRelationshipType.CTRLV) + return "CTRLV"; + if (code == V3ActRelationshipType.MBR) + return "MBR"; + if (code == V3ActRelationshipType.STEP) + return "STEP"; + if (code == V3ActRelationshipType.ARR) + return "ARR"; + if (code == V3ActRelationshipType.DEP) + return "DEP"; + if (code == V3ActRelationshipType.PART) + return "PART"; + if (code == V3ActRelationshipType.COVBY) + return "COVBY"; + if (code == V3ActRelationshipType.DRIV) + return "DRIV"; + if (code == V3ActRelationshipType.ELNK) + return "ELNK"; + if (code == V3ActRelationshipType.EVID) + return "EVID"; + if (code == V3ActRelationshipType.EXACBY) + return "EXACBY"; + if (code == V3ActRelationshipType.EXPL) + return "EXPL"; + if (code == V3ActRelationshipType.INTF) + return "INTF"; + if (code == V3ActRelationshipType.ITEMSLOC) + return "ITEMSLOC"; + if (code == V3ActRelationshipType.LIMIT) + return "LIMIT"; + if (code == V3ActRelationshipType.META) + return "META"; + if (code == V3ActRelationshipType.MFST) + return "MFST"; + if (code == V3ActRelationshipType.NAME) + return "NAME"; + if (code == V3ActRelationshipType.OUTC) + return "OUTC"; + if (code == V3ActRelationshipType._ACTRELATIONSIPOBJECTIVE) + return "_ActRelationsipObjective"; + if (code == V3ActRelationshipType.OBJC) + return "OBJC"; + if (code == V3ActRelationshipType.OBJF) + return "OBJF"; + if (code == V3ActRelationshipType.GOAL) + return "GOAL"; + if (code == V3ActRelationshipType.RISK) + return "RISK"; + if (code == V3ActRelationshipType.PERT) + return "PERT"; + if (code == V3ActRelationshipType.PREV) + return "PREV"; + if (code == V3ActRelationshipType.REFR) + return "REFR"; + if (code == V3ActRelationshipType.USE) + return "USE"; + if (code == V3ActRelationshipType.REFV) + return "REFV"; + if (code == V3ActRelationshipType.RELVBY) + return "RELVBY"; + if (code == V3ActRelationshipType.SEQL) + return "SEQL"; + if (code == V3ActRelationshipType.APND) + return "APND"; + if (code == V3ActRelationshipType.BSLN) + return "BSLN"; + if (code == V3ActRelationshipType.COMPLY) + return "COMPLY"; + if (code == V3ActRelationshipType.DOC) + return "DOC"; + if (code == V3ActRelationshipType.FLFS) + return "FLFS"; + if (code == V3ActRelationshipType.OCCR) + return "OCCR"; + if (code == V3ActRelationshipType.OREF) + return "OREF"; + if (code == V3ActRelationshipType.SCH) + return "SCH"; + if (code == V3ActRelationshipType.GEN) + return "GEN"; + if (code == V3ActRelationshipType.GEVL) + return "GEVL"; + if (code == V3ActRelationshipType.INST) + return "INST"; + if (code == V3ActRelationshipType.MOD) + return "MOD"; + if (code == V3ActRelationshipType.MTCH) + return "MTCH"; + if (code == V3ActRelationshipType.OPTN) + return "OPTN"; + if (code == V3ActRelationshipType.RCHAL) + return "RCHAL"; + if (code == V3ActRelationshipType.REV) + return "REV"; + if (code == V3ActRelationshipType.RPLC) + return "RPLC"; + if (code == V3ActRelationshipType.SUCC) + return "SUCC"; + if (code == V3ActRelationshipType.UPDT) + return "UPDT"; + if (code == V3ActRelationshipType.XCRPT) + return "XCRPT"; + if (code == V3ActRelationshipType.VRXCRPT) + return "VRXCRPT"; + if (code == V3ActRelationshipType.XFRM) + return "XFRM"; + if (code == V3ActRelationshipType.SPRT) + return "SPRT"; + if (code == V3ActRelationshipType.SPRTBND) + return "SPRTBND"; + if (code == V3ActRelationshipType.SUBJ) + return "SUBJ"; + if (code == V3ActRelationshipType.QUALF) + return "QUALF"; + if (code == V3ActRelationshipType.SUMM) + return "SUMM"; + if (code == V3ActRelationshipType.VALUE) + return "VALUE"; + if (code == V3ActRelationshipType.CURE) + return "CURE"; + if (code == V3ActRelationshipType.CURE_ADJ) + return "CURE.ADJ"; + if (code == V3ActRelationshipType.MTGT_ADJ) + return "MTGT.ADJ"; + if (code == V3ActRelationshipType.RACT) + return "RACT"; + if (code == V3ActRelationshipType.SUGG) + return "SUGG"; + return "?"; + } + + public String toSystem(V3ActRelationshipType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActSite.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActSite.java new file mode 100644 index 00000000000..3173d9ecba5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActSite.java @@ -0,0 +1,555 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActSite { + + /** + * An anatomical location on a human which can be the focus of an act. + */ + _HUMANACTSITE, + /** + * The set of body locations to or through which a drug product may be administered. + */ + _HUMANSUBSTANCEADMINISTRATIONSITE, + /** + * bilateral ears + */ + BE, + /** + * bilateral nares + */ + BN, + /** + * buttock + */ + BU, + /** + * left arm + */ + LA, + /** + * left anterior chest + */ + LAC, + /** + * left antecubital fossa + */ + LACF, + /** + * left deltoid + */ + LD, + /** + * left ear + */ + LE, + /** + * left external jugular + */ + LEJ, + /** + * left foot + */ + LF, + /** + * left gluteus medius + */ + LG, + /** + * left hand + */ + LH, + /** + * left internal jugular + */ + LIJ, + /** + * left lower abd quadrant + */ + LLAQ, + /** + * left lower forearm + */ + LLFA, + /** + * left mid forearm + */ + LMFA, + /** + * left naris + */ + LN, + /** + * left posterior chest + */ + LPC, + /** + * left subclavian + */ + LSC, + /** + * left thigh + */ + LT, + /** + * left upper arm + */ + LUA, + /** + * left upper abd quadrant + */ + LUAQ, + /** + * left upper forearm + */ + LUFA, + /** + * left ventragluteal + */ + LVG, + /** + * left vastus lateralis + */ + LVL, + /** + * right eye + */ + OD, + /** + * left eye + */ + OS, + /** + * bilateral eyes + */ + OU, + /** + * perianal + */ + PA, + /** + * perineal + */ + PERIN, + /** + * right arm + */ + RA, + /** + * right anterior chest + */ + RAC, + /** + * right antecubital fossa + */ + RACF, + /** + * right deltoid + */ + RD, + /** + * right ear + */ + RE, + /** + * right external jugular + */ + REJ, + /** + * right foot + */ + RF, + /** + * right gluteus medius + */ + RG, + /** + * right hand + */ + RH, + /** + * right internal jugular + */ + RIJ, + /** + * right lower abd quadrant + */ + RLAQ, + /** + * right lower forearm + */ + RLFA, + /** + * right mid forearm + */ + RMFA, + /** + * right naris + */ + RN, + /** + * right posterior chest + */ + RPC, + /** + * right subclavian + */ + RSC, + /** + * right thigh + */ + RT, + /** + * right upper arm + */ + RUA, + /** + * right upper abd quadrant + */ + RUAQ, + /** + * right upper forearm + */ + RUFA, + /** + * right ventragluteal + */ + RVG, + /** + * right vastus lateralis + */ + RVL, + /** + * added to help the parsers + */ + NULL; + public static V3ActSite fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_HumanActSite".equals(codeString)) + return _HUMANACTSITE; + if ("_HumanSubstanceAdministrationSite".equals(codeString)) + return _HUMANSUBSTANCEADMINISTRATIONSITE; + if ("BE".equals(codeString)) + return BE; + if ("BN".equals(codeString)) + return BN; + if ("BU".equals(codeString)) + return BU; + if ("LA".equals(codeString)) + return LA; + if ("LAC".equals(codeString)) + return LAC; + if ("LACF".equals(codeString)) + return LACF; + if ("LD".equals(codeString)) + return LD; + if ("LE".equals(codeString)) + return LE; + if ("LEJ".equals(codeString)) + return LEJ; + if ("LF".equals(codeString)) + return LF; + if ("LG".equals(codeString)) + return LG; + if ("LH".equals(codeString)) + return LH; + if ("LIJ".equals(codeString)) + return LIJ; + if ("LLAQ".equals(codeString)) + return LLAQ; + if ("LLFA".equals(codeString)) + return LLFA; + if ("LMFA".equals(codeString)) + return LMFA; + if ("LN".equals(codeString)) + return LN; + if ("LPC".equals(codeString)) + return LPC; + if ("LSC".equals(codeString)) + return LSC; + if ("LT".equals(codeString)) + return LT; + if ("LUA".equals(codeString)) + return LUA; + if ("LUAQ".equals(codeString)) + return LUAQ; + if ("LUFA".equals(codeString)) + return LUFA; + if ("LVG".equals(codeString)) + return LVG; + if ("LVL".equals(codeString)) + return LVL; + if ("OD".equals(codeString)) + return OD; + if ("OS".equals(codeString)) + return OS; + if ("OU".equals(codeString)) + return OU; + if ("PA".equals(codeString)) + return PA; + if ("PERIN".equals(codeString)) + return PERIN; + if ("RA".equals(codeString)) + return RA; + if ("RAC".equals(codeString)) + return RAC; + if ("RACF".equals(codeString)) + return RACF; + if ("RD".equals(codeString)) + return RD; + if ("RE".equals(codeString)) + return RE; + if ("REJ".equals(codeString)) + return REJ; + if ("RF".equals(codeString)) + return RF; + if ("RG".equals(codeString)) + return RG; + if ("RH".equals(codeString)) + return RH; + if ("RIJ".equals(codeString)) + return RIJ; + if ("RLAQ".equals(codeString)) + return RLAQ; + if ("RLFA".equals(codeString)) + return RLFA; + if ("RMFA".equals(codeString)) + return RMFA; + if ("RN".equals(codeString)) + return RN; + if ("RPC".equals(codeString)) + return RPC; + if ("RSC".equals(codeString)) + return RSC; + if ("RT".equals(codeString)) + return RT; + if ("RUA".equals(codeString)) + return RUA; + if ("RUAQ".equals(codeString)) + return RUAQ; + if ("RUFA".equals(codeString)) + return RUFA; + if ("RVG".equals(codeString)) + return RVG; + if ("RVL".equals(codeString)) + return RVL; + throw new FHIRException("Unknown V3ActSite code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _HUMANACTSITE: return "_HumanActSite"; + case _HUMANSUBSTANCEADMINISTRATIONSITE: return "_HumanSubstanceAdministrationSite"; + case BE: return "BE"; + case BN: return "BN"; + case BU: return "BU"; + case LA: return "LA"; + case LAC: return "LAC"; + case LACF: return "LACF"; + case LD: return "LD"; + case LE: return "LE"; + case LEJ: return "LEJ"; + case LF: return "LF"; + case LG: return "LG"; + case LH: return "LH"; + case LIJ: return "LIJ"; + case LLAQ: return "LLAQ"; + case LLFA: return "LLFA"; + case LMFA: return "LMFA"; + case LN: return "LN"; + case LPC: return "LPC"; + case LSC: return "LSC"; + case LT: return "LT"; + case LUA: return "LUA"; + case LUAQ: return "LUAQ"; + case LUFA: return "LUFA"; + case LVG: return "LVG"; + case LVL: return "LVL"; + case OD: return "OD"; + case OS: return "OS"; + case OU: return "OU"; + case PA: return "PA"; + case PERIN: return "PERIN"; + case RA: return "RA"; + case RAC: return "RAC"; + case RACF: return "RACF"; + case RD: return "RD"; + case RE: return "RE"; + case REJ: return "REJ"; + case RF: return "RF"; + case RG: return "RG"; + case RH: return "RH"; + case RIJ: return "RIJ"; + case RLAQ: return "RLAQ"; + case RLFA: return "RLFA"; + case RMFA: return "RMFA"; + case RN: return "RN"; + case RPC: return "RPC"; + case RSC: return "RSC"; + case RT: return "RT"; + case RUA: return "RUA"; + case RUAQ: return "RUAQ"; + case RUFA: return "RUFA"; + case RVG: return "RVG"; + case RVL: return "RVL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActSite"; + } + public String getDefinition() { + switch (this) { + case _HUMANACTSITE: return "An anatomical location on a human which can be the focus of an act."; + case _HUMANSUBSTANCEADMINISTRATIONSITE: return "The set of body locations to or through which a drug product may be administered."; + case BE: return "bilateral ears"; + case BN: return "bilateral nares"; + case BU: return "buttock"; + case LA: return "left arm"; + case LAC: return "left anterior chest"; + case LACF: return "left antecubital fossa"; + case LD: return "left deltoid"; + case LE: return "left ear"; + case LEJ: return "left external jugular"; + case LF: return "left foot"; + case LG: return "left gluteus medius"; + case LH: return "left hand"; + case LIJ: return "left internal jugular"; + case LLAQ: return "left lower abd quadrant"; + case LLFA: return "left lower forearm"; + case LMFA: return "left mid forearm"; + case LN: return "left naris"; + case LPC: return "left posterior chest"; + case LSC: return "left subclavian"; + case LT: return "left thigh"; + case LUA: return "left upper arm"; + case LUAQ: return "left upper abd quadrant"; + case LUFA: return "left upper forearm"; + case LVG: return "left ventragluteal"; + case LVL: return "left vastus lateralis"; + case OD: return "right eye"; + case OS: return "left eye"; + case OU: return "bilateral eyes"; + case PA: return "perianal"; + case PERIN: return "perineal"; + case RA: return "right arm"; + case RAC: return "right anterior chest"; + case RACF: return "right antecubital fossa"; + case RD: return "right deltoid"; + case RE: return "right ear"; + case REJ: return "right external jugular"; + case RF: return "right foot"; + case RG: return "right gluteus medius"; + case RH: return "right hand"; + case RIJ: return "right internal jugular"; + case RLAQ: return "right lower abd quadrant"; + case RLFA: return "right lower forearm"; + case RMFA: return "right mid forearm"; + case RN: return "right naris"; + case RPC: return "right posterior chest"; + case RSC: return "right subclavian"; + case RT: return "right thigh"; + case RUA: return "right upper arm"; + case RUAQ: return "right upper abd quadrant"; + case RUFA: return "right upper forearm"; + case RVG: return "right ventragluteal"; + case RVL: return "right vastus lateralis"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _HUMANACTSITE: return "HumanActSite"; + case _HUMANSUBSTANCEADMINISTRATIONSITE: return "HumanSubstanceAdministrationSite"; + case BE: return "bilateral ears"; + case BN: return "bilateral nares"; + case BU: return "buttock"; + case LA: return "left arm"; + case LAC: return "left anterior chest"; + case LACF: return "left antecubital fossa"; + case LD: return "left deltoid"; + case LE: return "left ear"; + case LEJ: return "left external jugular"; + case LF: return "left foot"; + case LG: return "left gluteus medius"; + case LH: return "left hand"; + case LIJ: return "left internal jugular"; + case LLAQ: return "left lower abd quadrant"; + case LLFA: return "left lower forearm"; + case LMFA: return "left mid forearm"; + case LN: return "left naris"; + case LPC: return "left posterior chest"; + case LSC: return "left subclavian"; + case LT: return "left thigh"; + case LUA: return "left upper arm"; + case LUAQ: return "left upper abd quadrant"; + case LUFA: return "left upper forearm"; + case LVG: return "left ventragluteal"; + case LVL: return "left vastus lateralis"; + case OD: return "right eye"; + case OS: return "left eye"; + case OU: return "bilateral eyes"; + case PA: return "perianal"; + case PERIN: return "perineal"; + case RA: return "right arm"; + case RAC: return "right anterior chest"; + case RACF: return "right antecubital fossa"; + case RD: return "right deltoid"; + case RE: return "right ear"; + case REJ: return "right external jugular"; + case RF: return "right foot"; + case RG: return "right gluteus medius"; + case RH: return "right hand"; + case RIJ: return "right internal jugular"; + case RLAQ: return "right lower abd quadrant"; + case RLFA: return "right lower forearm"; + case RMFA: return "right mid forearm"; + case RN: return "right naris"; + case RPC: return "right posterior chest"; + case RSC: return "right subclavian"; + case RT: return "right thigh"; + case RUA: return "right upper arm"; + case RUAQ: return "right upper abd quadrant"; + case RUFA: return "right upper forearm"; + case RVG: return "right ventragluteal"; + case RVL: return "right vastus lateralis"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActSiteEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActSiteEnumFactory.java new file mode 100644 index 00000000000..bd498ba6dc6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActSiteEnumFactory.java @@ -0,0 +1,270 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActSiteEnumFactory implements EnumFactory { + + public V3ActSite fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_HumanActSite".equals(codeString)) + return V3ActSite._HUMANACTSITE; + if ("_HumanSubstanceAdministrationSite".equals(codeString)) + return V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE; + if ("BE".equals(codeString)) + return V3ActSite.BE; + if ("BN".equals(codeString)) + return V3ActSite.BN; + if ("BU".equals(codeString)) + return V3ActSite.BU; + if ("LA".equals(codeString)) + return V3ActSite.LA; + if ("LAC".equals(codeString)) + return V3ActSite.LAC; + if ("LACF".equals(codeString)) + return V3ActSite.LACF; + if ("LD".equals(codeString)) + return V3ActSite.LD; + if ("LE".equals(codeString)) + return V3ActSite.LE; + if ("LEJ".equals(codeString)) + return V3ActSite.LEJ; + if ("LF".equals(codeString)) + return V3ActSite.LF; + if ("LG".equals(codeString)) + return V3ActSite.LG; + if ("LH".equals(codeString)) + return V3ActSite.LH; + if ("LIJ".equals(codeString)) + return V3ActSite.LIJ; + if ("LLAQ".equals(codeString)) + return V3ActSite.LLAQ; + if ("LLFA".equals(codeString)) + return V3ActSite.LLFA; + if ("LMFA".equals(codeString)) + return V3ActSite.LMFA; + if ("LN".equals(codeString)) + return V3ActSite.LN; + if ("LPC".equals(codeString)) + return V3ActSite.LPC; + if ("LSC".equals(codeString)) + return V3ActSite.LSC; + if ("LT".equals(codeString)) + return V3ActSite.LT; + if ("LUA".equals(codeString)) + return V3ActSite.LUA; + if ("LUAQ".equals(codeString)) + return V3ActSite.LUAQ; + if ("LUFA".equals(codeString)) + return V3ActSite.LUFA; + if ("LVG".equals(codeString)) + return V3ActSite.LVG; + if ("LVL".equals(codeString)) + return V3ActSite.LVL; + if ("OD".equals(codeString)) + return V3ActSite.OD; + if ("OS".equals(codeString)) + return V3ActSite.OS; + if ("OU".equals(codeString)) + return V3ActSite.OU; + if ("PA".equals(codeString)) + return V3ActSite.PA; + if ("PERIN".equals(codeString)) + return V3ActSite.PERIN; + if ("RA".equals(codeString)) + return V3ActSite.RA; + if ("RAC".equals(codeString)) + return V3ActSite.RAC; + if ("RACF".equals(codeString)) + return V3ActSite.RACF; + if ("RD".equals(codeString)) + return V3ActSite.RD; + if ("RE".equals(codeString)) + return V3ActSite.RE; + if ("REJ".equals(codeString)) + return V3ActSite.REJ; + if ("RF".equals(codeString)) + return V3ActSite.RF; + if ("RG".equals(codeString)) + return V3ActSite.RG; + if ("RH".equals(codeString)) + return V3ActSite.RH; + if ("RIJ".equals(codeString)) + return V3ActSite.RIJ; + if ("RLAQ".equals(codeString)) + return V3ActSite.RLAQ; + if ("RLFA".equals(codeString)) + return V3ActSite.RLFA; + if ("RMFA".equals(codeString)) + return V3ActSite.RMFA; + if ("RN".equals(codeString)) + return V3ActSite.RN; + if ("RPC".equals(codeString)) + return V3ActSite.RPC; + if ("RSC".equals(codeString)) + return V3ActSite.RSC; + if ("RT".equals(codeString)) + return V3ActSite.RT; + if ("RUA".equals(codeString)) + return V3ActSite.RUA; + if ("RUAQ".equals(codeString)) + return V3ActSite.RUAQ; + if ("RUFA".equals(codeString)) + return V3ActSite.RUFA; + if ("RVG".equals(codeString)) + return V3ActSite.RVG; + if ("RVL".equals(codeString)) + return V3ActSite.RVL; + throw new IllegalArgumentException("Unknown V3ActSite code '"+codeString+"'"); + } + + public String toCode(V3ActSite code) { + if (code == V3ActSite._HUMANACTSITE) + return "_HumanActSite"; + if (code == V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE) + return "_HumanSubstanceAdministrationSite"; + if (code == V3ActSite.BE) + return "BE"; + if (code == V3ActSite.BN) + return "BN"; + if (code == V3ActSite.BU) + return "BU"; + if (code == V3ActSite.LA) + return "LA"; + if (code == V3ActSite.LAC) + return "LAC"; + if (code == V3ActSite.LACF) + return "LACF"; + if (code == V3ActSite.LD) + return "LD"; + if (code == V3ActSite.LE) + return "LE"; + if (code == V3ActSite.LEJ) + return "LEJ"; + if (code == V3ActSite.LF) + return "LF"; + if (code == V3ActSite.LG) + return "LG"; + if (code == V3ActSite.LH) + return "LH"; + if (code == V3ActSite.LIJ) + return "LIJ"; + if (code == V3ActSite.LLAQ) + return "LLAQ"; + if (code == V3ActSite.LLFA) + return "LLFA"; + if (code == V3ActSite.LMFA) + return "LMFA"; + if (code == V3ActSite.LN) + return "LN"; + if (code == V3ActSite.LPC) + return "LPC"; + if (code == V3ActSite.LSC) + return "LSC"; + if (code == V3ActSite.LT) + return "LT"; + if (code == V3ActSite.LUA) + return "LUA"; + if (code == V3ActSite.LUAQ) + return "LUAQ"; + if (code == V3ActSite.LUFA) + return "LUFA"; + if (code == V3ActSite.LVG) + return "LVG"; + if (code == V3ActSite.LVL) + return "LVL"; + if (code == V3ActSite.OD) + return "OD"; + if (code == V3ActSite.OS) + return "OS"; + if (code == V3ActSite.OU) + return "OU"; + if (code == V3ActSite.PA) + return "PA"; + if (code == V3ActSite.PERIN) + return "PERIN"; + if (code == V3ActSite.RA) + return "RA"; + if (code == V3ActSite.RAC) + return "RAC"; + if (code == V3ActSite.RACF) + return "RACF"; + if (code == V3ActSite.RD) + return "RD"; + if (code == V3ActSite.RE) + return "RE"; + if (code == V3ActSite.REJ) + return "REJ"; + if (code == V3ActSite.RF) + return "RF"; + if (code == V3ActSite.RG) + return "RG"; + if (code == V3ActSite.RH) + return "RH"; + if (code == V3ActSite.RIJ) + return "RIJ"; + if (code == V3ActSite.RLAQ) + return "RLAQ"; + if (code == V3ActSite.RLFA) + return "RLFA"; + if (code == V3ActSite.RMFA) + return "RMFA"; + if (code == V3ActSite.RN) + return "RN"; + if (code == V3ActSite.RPC) + return "RPC"; + if (code == V3ActSite.RSC) + return "RSC"; + if (code == V3ActSite.RT) + return "RT"; + if (code == V3ActSite.RUA) + return "RUA"; + if (code == V3ActSite.RUAQ) + return "RUAQ"; + if (code == V3ActSite.RUFA) + return "RUFA"; + if (code == V3ActSite.RVG) + return "RVG"; + if (code == V3ActSite.RVL) + return "RVL"; + return "?"; + } + + public String toSystem(V3ActSite code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActStatus.java new file mode 100644 index 00000000000..bff32ecd069 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActStatus.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActStatus { + + /** + * Encompasses the expected states of an Act, but excludes "nullified" and "obsolete" which represent unusual terminal states for the life-cycle. + */ + NORMAL, + /** + * The Act has been terminated prior to the originally intended completion. + */ + ABORTED, + /** + * The Act can be performed or is being performed + */ + ACTIVE, + /** + * The Act has been abandoned before activation. + */ + CANCELLED, + /** + * An Act that has terminated normally after all of its constituents have been performed. + */ + COMPLETED, + /** + * An Act that is still in the preparatory stages has been put aside. No action can occur until the Act is released. + */ + HELD, + /** + * An Act that is in the preparatory stages and may not yet be acted upon + */ + NEW, + /** + * An Act that has been activated (actions could or have been performed against it), but has been temporarily disabled. No further action should be taken against it until it is released + */ + SUSPENDED, + /** + * This Act instance was created in error and has been 'removed' and is treated as though it never existed. A record is retained for audit purposes only. + */ + NULLIFIED, + /** + * This Act instance has been replaced by a new instance. + */ + OBSOLETE, + /** + * added to help the parsers + */ + NULL; + public static V3ActStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("aborted".equals(codeString)) + return ABORTED; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("held".equals(codeString)) + return HELD; + if ("new".equals(codeString)) + return NEW; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("nullified".equals(codeString)) + return NULLIFIED; + if ("obsolete".equals(codeString)) + return OBSOLETE; + throw new FHIRException("Unknown V3ActStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ABORTED: return "aborted"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case HELD: return "held"; + case NEW: return "new"; + case SUSPENDED: return "suspended"; + case NULLIFIED: return "nullified"; + case OBSOLETE: return "obsolete"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "Encompasses the expected states of an Act, but excludes \"nullified\" and \"obsolete\" which represent unusual terminal states for the life-cycle."; + case ABORTED: return "The Act has been terminated prior to the originally intended completion."; + case ACTIVE: return "The Act can be performed or is being performed"; + case CANCELLED: return "The Act has been abandoned before activation."; + case COMPLETED: return "An Act that has terminated normally after all of its constituents have been performed."; + case HELD: return "An Act that is still in the preparatory stages has been put aside. No action can occur until the Act is released."; + case NEW: return "An Act that is in the preparatory stages and may not yet be acted upon"; + case SUSPENDED: return "An Act that has been activated (actions could or have been performed against it), but has been temporarily disabled. No further action should be taken against it until it is released"; + case NULLIFIED: return "This Act instance was created in error and has been 'removed' and is treated as though it never existed. A record is retained for audit purposes only."; + case OBSOLETE: return "This Act instance has been replaced by a new instance."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ABORTED: return "aborted"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case HELD: return "held"; + case NEW: return "new"; + case SUSPENDED: return "suspended"; + case NULLIFIED: return "nullified"; + case OBSOLETE: return "obsolete"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActStatusEnumFactory.java new file mode 100644 index 00000000000..8a78be58223 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActStatusEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActStatusEnumFactory implements EnumFactory { + + public V3ActStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3ActStatus.NORMAL; + if ("aborted".equals(codeString)) + return V3ActStatus.ABORTED; + if ("active".equals(codeString)) + return V3ActStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return V3ActStatus.CANCELLED; + if ("completed".equals(codeString)) + return V3ActStatus.COMPLETED; + if ("held".equals(codeString)) + return V3ActStatus.HELD; + if ("new".equals(codeString)) + return V3ActStatus.NEW; + if ("suspended".equals(codeString)) + return V3ActStatus.SUSPENDED; + if ("nullified".equals(codeString)) + return V3ActStatus.NULLIFIED; + if ("obsolete".equals(codeString)) + return V3ActStatus.OBSOLETE; + throw new IllegalArgumentException("Unknown V3ActStatus code '"+codeString+"'"); + } + + public String toCode(V3ActStatus code) { + if (code == V3ActStatus.NORMAL) + return "normal"; + if (code == V3ActStatus.ABORTED) + return "aborted"; + if (code == V3ActStatus.ACTIVE) + return "active"; + if (code == V3ActStatus.CANCELLED) + return "cancelled"; + if (code == V3ActStatus.COMPLETED) + return "completed"; + if (code == V3ActStatus.HELD) + return "held"; + if (code == V3ActStatus.NEW) + return "new"; + if (code == V3ActStatus.SUSPENDED) + return "suspended"; + if (code == V3ActStatus.NULLIFIED) + return "nullified"; + if (code == V3ActStatus.OBSOLETE) + return "obsolete"; + return "?"; + } + + public String toSystem(V3ActStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUSPrivacyLaw.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUSPrivacyLaw.java new file mode 100644 index 00000000000..8973a6bcdf5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUSPrivacyLaw.java @@ -0,0 +1,174 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActUSPrivacyLaw { + + /** + * Definition: A jurisdictional mandate in the U.S. relating to privacy. + + + Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1. + */ + _ACTUSPRIVACYLAW, + /** + * 42 CFR Part 2 stipulates the right of an individual who has applied for or been given diagnosis or treatment for alcohol or drug abuse at a federally assisted program. + + + Definition: Non-disclosure of health information relating to health care paid for by a federally assisted substance abuse program without patient consent. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + _42CFRPART2, + /** + * U.S. Federal regulations governing the protection of human subjects in research (codified at Subpart A of 45 CFR part 46) that has been adopted by 15 U.S. Federal departments and agencies in an effort to promote uniformity, understanding, and compliance with human subject protections. Existing regulations governing the protection of human subjects in Food and Drug Administration (FDA)-regulated research (21 CFR parts 50, 56, 312, and 812) are separate from the Common Rule but include similar requirements. + + + Definition: U.S. federal laws governing research-related privacy policies. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. + */ + COMMONRULE, + /** + * The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Subpart E) permits access, use and disclosure of certain personal health information (PHI as defined under the law) for purposes of Treatment, Payment, and Operations, and requires that the provider ask that patients acknowledge the Provider's Notice of Privacy Practices as permitted conduct under the law. + + + Definition: Notification of HIPAA Privacy Practices. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. + */ + HIPAANOPP, + /** + * The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Section 164.508) requires authorization for certain uses and disclosure of psychotherapy notes. + + + Definition: Authorization that must be obtained for disclosure of psychotherapy notes. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + HIPAAPSYNOTES, + /** + * Section 13405(a) of the Health Information Technology for Economic and Clinical Health Act (HITECH) stipulates the right of an individual to have disclosures regarding certain health care items or services for which the individual pays out of pocket in full restricted from a health plan. + + + Definition: Non-disclosure of health information to a health plan relating to health care items or services for which an individual pays out of pocket in full. + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + HIPAASELFPAY, + /** + * Title 38 Part 1-protected information may only be disclosed to a third party with the special written consent of the patient except where expressly authorized by 38 USC 7332. VA may disclose this information for specific purposes to: VA employees on a need to know basis - more restrictive than Privacy Act need to know; contractors who need the information in order to perform or fulfill the duties of the contract; and researchers who provide assurances that the information will not be identified in any report. This information may also be disclosed without consent where patient lacks decision-making capacity; in a medical emergency for the purpose of treating a condition which poses an immediate threat to the health of any individual and which requires immediate medical intervention; for eye, tissue, or organ donation purposes; and disclosure of HIV information for public health purposes. + + + Definition: Title 38 Part 1 - §1.462 Confidentiality restrictions. + + +(a) General. The patient records to which §§1.460 through 1.499 of this part apply may be disclosed or used only as permitted by these regulations and may not otherwise be disclosed or used in any civil, criminal, administrative, or legislative proceedings conducted by any Federal, State, or local authority. Any disclosure made under these regulations must be limited to that information which is necessary to carry out the purpose of the disclosure. SUBCHAPTER III--PROTECTION OF PATIENT RIGHTS Sec. 7332. Confidentiality of certain medical records (a)(1) Records of the identity, diagnosis, prognosis, or treatment of any patient or subject which are maintained in connection with the performance of any program or activity (including education, training, treatment, rehabilitation, or research) relating to drug abuse, alcoholism or alcohol abuse, infection with the human immunodeficiency virus, or sickle cell anemia which is carried out by or for the Department under this title shall, except as provided in subsections (e) and (f), be confidential, and (section 5701 of this title to the contrary notwithstanding) such records may be disclosed only for the purposes and under the circumstances expressly authorized under subsection (b). + + + Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies. + */ + TITLE38SECTION7332, + /** + * added to help the parsers + */ + NULL; + public static V3ActUSPrivacyLaw fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActUSPrivacyLaw".equals(codeString)) + return _ACTUSPRIVACYLAW; + if ("42CFRPart2".equals(codeString)) + return _42CFRPART2; + if ("CommonRule".equals(codeString)) + return COMMONRULE; + if ("HIPAANOPP".equals(codeString)) + return HIPAANOPP; + if ("HIPAAPsyNotes".equals(codeString)) + return HIPAAPSYNOTES; + if ("HIPAASelfPay".equals(codeString)) + return HIPAASELFPAY; + if ("Title38Section7332".equals(codeString)) + return TITLE38SECTION7332; + throw new FHIRException("Unknown V3ActUSPrivacyLaw code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTUSPRIVACYLAW: return "_ActUSPrivacyLaw"; + case _42CFRPART2: return "42CFRPart2"; + case COMMONRULE: return "CommonRule"; + case HIPAANOPP: return "HIPAANOPP"; + case HIPAAPSYNOTES: return "HIPAAPsyNotes"; + case HIPAASELFPAY: return "HIPAASelfPay"; + case TITLE38SECTION7332: return "Title38Section7332"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActUSPrivacyLaw"; + } + public String getDefinition() { + switch (this) { + case _ACTUSPRIVACYLAW: return "Definition: A jurisdictional mandate in the U.S. relating to privacy.\r\n\n \n Usage Note: ActPrivacyLaw codes may be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies. May be used to further specify rationale for assignment of other ActPrivacyPolicy codes in the US realm, e.g., ETH and 42CFRPart2 can be differentiated from ETH and Title38Part1."; + case _42CFRPART2: return "42 CFR Part 2 stipulates the right of an individual who has applied for or been given diagnosis or treatment for alcohol or drug abuse at a federally assisted program.\r\n\n \n Definition: Non-disclosure of health information relating to health care paid for by a federally assisted substance abuse program without patient consent.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case COMMONRULE: return "U.S. Federal regulations governing the protection of human subjects in research (codified at Subpart A of 45 CFR part 46) that has been adopted by 15 U.S. Federal departments and agencies in an effort to promote uniformity, understanding, and compliance with human subject protections. Existing regulations governing the protection of human subjects in Food and Drug Administration (FDA)-regulated research (21 CFR parts 50, 56, 312, and 812) are separate from the Common Rule but include similar requirements.\r\n\n \n Definition: U.S. federal laws governing research-related privacy policies.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies."; + case HIPAANOPP: return "The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Subpart E) permits access, use and disclosure of certain personal health information (PHI as defined under the law) for purposes of Treatment, Payment, and Operations, and requires that the provider ask that patients acknowledge the Provider's Notice of Privacy Practices as permitted conduct under the law.\r\n\n \n Definition: Notification of HIPAA Privacy Practices.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialtyCode complies."; + case HIPAAPSYNOTES: return "The U.S. Public Law 104-191 Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule (45 CFR Part 164 Section 164.508) requires authorization for certain uses and disclosure of psychotherapy notes.\r\n\n \n Definition: Authorization that must be obtained for disclosure of psychotherapy notes.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case HIPAASELFPAY: return "Section 13405(a) of the Health Information Technology for Economic and Clinical Health Act (HITECH) stipulates the right of an individual to have disclosures regarding certain health care items or services for which the individual pays out of pocket in full restricted from a health plan.\r\n\n \n Definition: Non-disclosure of health information to a health plan relating to health care items or services for which an individual pays out of pocket in full.\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + case TITLE38SECTION7332: return "Title 38 Part 1-protected information may only be disclosed to a third party with the special written consent of the patient except where expressly authorized by 38 USC 7332. VA may disclose this information for specific purposes to: VA employees on a need to know basis - more restrictive than Privacy Act need to know; contractors who need the information in order to perform or fulfill the duties of the contract; and researchers who provide assurances that the information will not be identified in any report. This information may also be disclosed without consent where patient lacks decision-making capacity; in a medical emergency for the purpose of treating a condition which poses an immediate threat to the health of any individual and which requires immediate medical intervention; for eye, tissue, or organ donation purposes; and disclosure of HIV information for public health purposes.\r\n\n \n Definition: Title 38 Part 1 - §1.462 Confidentiality restrictions.\r\n\n \n(a) General. The patient records to which §§1.460 through 1.499 of this part apply may be disclosed or used only as permitted by these regulations and may not otherwise be disclosed or used in any civil, criminal, administrative, or legislative proceedings conducted by any Federal, State, or local authority. Any disclosure made under these regulations must be limited to that information which is necessary to carry out the purpose of the disclosure. SUBCHAPTER III--PROTECTION OF PATIENT RIGHTS Sec. 7332. Confidentiality of certain medical records (a)(1) Records of the identity, diagnosis, prognosis, or treatment of any patient or subject which are maintained in connection with the performance of any program or activity (including education, training, treatment, rehabilitation, or research) relating to drug abuse, alcoholism or alcohol abuse, infection with the human immunodeficiency virus, or sickle cell anemia which is carried out by or for the Department under this title shall, except as provided in subsections (e) and (f), be confidential, and (section 5701 of this title to the contrary notwithstanding) such records may be disclosed only for the purposes and under the circumstances expressly authorized under subsection (b).\r\n\n \n Usage Note: May be associated with an Act or a Role to indicate the legal provision to which the assignment of an Act.confidentialityCode or Role.confidentialityCode complies."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTUSPRIVACYLAW: return "ActUSPrivacyLaw"; + case _42CFRPART2: return "42 CFR Part2"; + case COMMONRULE: return "Common Rule"; + case HIPAANOPP: return "HIPAA notice of privacy practices"; + case HIPAAPSYNOTES: return "HIPAA psychotherapy notes"; + case HIPAASELFPAY: return "HIPAA self-pay"; + case TITLE38SECTION7332: return "Title 38 Section 7332"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUSPrivacyLawEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUSPrivacyLawEnumFactory.java new file mode 100644 index 00000000000..971e1bbfbd1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUSPrivacyLawEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActUSPrivacyLawEnumFactory implements EnumFactory { + + public V3ActUSPrivacyLaw fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActUSPrivacyLaw".equals(codeString)) + return V3ActUSPrivacyLaw._ACTUSPRIVACYLAW; + if ("42CFRPart2".equals(codeString)) + return V3ActUSPrivacyLaw._42CFRPART2; + if ("CommonRule".equals(codeString)) + return V3ActUSPrivacyLaw.COMMONRULE; + if ("HIPAANOPP".equals(codeString)) + return V3ActUSPrivacyLaw.HIPAANOPP; + if ("HIPAAPsyNotes".equals(codeString)) + return V3ActUSPrivacyLaw.HIPAAPSYNOTES; + if ("HIPAASelfPay".equals(codeString)) + return V3ActUSPrivacyLaw.HIPAASELFPAY; + if ("Title38Section7332".equals(codeString)) + return V3ActUSPrivacyLaw.TITLE38SECTION7332; + throw new IllegalArgumentException("Unknown V3ActUSPrivacyLaw code '"+codeString+"'"); + } + + public String toCode(V3ActUSPrivacyLaw code) { + if (code == V3ActUSPrivacyLaw._ACTUSPRIVACYLAW) + return "_ActUSPrivacyLaw"; + if (code == V3ActUSPrivacyLaw._42CFRPART2) + return "42CFRPart2"; + if (code == V3ActUSPrivacyLaw.COMMONRULE) + return "CommonRule"; + if (code == V3ActUSPrivacyLaw.HIPAANOPP) + return "HIPAANOPP"; + if (code == V3ActUSPrivacyLaw.HIPAAPSYNOTES) + return "HIPAAPsyNotes"; + if (code == V3ActUSPrivacyLaw.HIPAASELFPAY) + return "HIPAASelfPay"; + if (code == V3ActUSPrivacyLaw.TITLE38SECTION7332) + return "Title38Section7332"; + return "?"; + } + + public String toSystem(V3ActUSPrivacyLaw code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUncertainty.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUncertainty.java new file mode 100644 index 00000000000..6f1f751c6c2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUncertainty.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ActUncertainty { + + /** + * Specifies that the act statement is made without explicit tagging of uncertainty. This is the normal statement, meaning that it is not free of errors and uncertainty may still exist. + */ + N, + /** + * Specifies that the originator of the Act statement does not have full confidence in the applicability (i.e., in event mood: factual truth) of the statement. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static V3ActUncertainty fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("N".equals(codeString)) + return N; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown V3ActUncertainty code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case N: return "N"; + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ActUncertainty"; + } + public String getDefinition() { + switch (this) { + case N: return "Specifies that the act statement is made without explicit tagging of uncertainty. This is the normal statement, meaning that it is not free of errors and uncertainty may still exist."; + case U: return "Specifies that the originator of the Act statement does not have full confidence in the applicability (i.e., in event mood: factual truth) of the statement."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case N: return "stated with no assertion of uncertainty"; + case U: return "stated with uncertainty"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUncertaintyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUncertaintyEnumFactory.java new file mode 100644 index 00000000000..49b42c6ce61 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ActUncertaintyEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ActUncertaintyEnumFactory implements EnumFactory { + + public V3ActUncertainty fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("N".equals(codeString)) + return V3ActUncertainty.N; + if ("U".equals(codeString)) + return V3ActUncertainty.U; + throw new IllegalArgumentException("Unknown V3ActUncertainty code '"+codeString+"'"); + } + + public String toCode(V3ActUncertainty code) { + if (code == V3ActUncertainty.N) + return "N"; + if (code == V3ActUncertainty.U) + return "U"; + return "?"; + } + + public String toSystem(V3ActUncertainty code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressPartType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressPartType.java new file mode 100644 index 00000000000..9152f849779 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressPartType.java @@ -0,0 +1,339 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AddressPartType { + + /** + * This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses). + */ + ADL, + /** + * Description: An address line is for either an additional locator, a delivery address or a street address. + */ + AL, + /** + * A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both. + */ + DAL, + /** + * Description: A street address line is frequently used instead of breaking out build number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both. + */ + SAL, + /** + * The numeric portion of a building number + */ + BNN, + /** + * The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building. + */ + BNR, + /** + * Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number + */ + BNS, + /** + * The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient + */ + CAR, + /** + * A geographic sub-unit delineated for demographic purposes. + */ + CEN, + /** + * Country + */ + CNT, + /** + * A sub-unit of a state or province. (49 of the United States of America use the term "county;" Louisiana uses the term "parish".) + */ + CPA, + /** + * The name of the city, town, village, or other community or delivery center + */ + CTY, + /** + * Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break. + */ + DEL, + /** + * Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc. + */ + DINST, + /** + * The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route. + */ + DINSTA, + /** + * A number, letter or name identifying a delivery installation. E.g., for Station A, the delivery installation qualifier would be 'A'. + */ + DINSTQ, + /** + * Direction (e.g., N, S, W, E) + */ + DIR, + /** + * Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc. + */ + DMOD, + /** + * Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number). + */ + DMODID, + /** + * A value that uniquely identifies the postal address. + */ + DPID, + /** + * Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets. + */ + INT, + /** + * A numbered box located in a post station. + */ + POB, + /** + * A subsection of a municipality + */ + PRE, + /** + * A sub-unit of a country with limited sovereignty in a federally organized country. + */ + STA, + /** + * The base name of a roadway or artery recognized by a municipality (excluding street type and direction) + */ + STB, + /** + * street name + */ + STR, + /** + * The designation given to the street. (e.g. Street, Avenue, Crescent, etc.) + */ + STTYP, + /** + * The number or name of a specific unit contained within a building or complex, as assigned by that building or complex. + */ + UNID, + /** + * Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor + */ + UNIT, + /** + * A postal code designating a region defined by the postal service. + */ + ZIP, + /** + * added to help the parsers + */ + NULL; + public static V3AddressPartType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADL".equals(codeString)) + return ADL; + if ("AL".equals(codeString)) + return AL; + if ("DAL".equals(codeString)) + return DAL; + if ("SAL".equals(codeString)) + return SAL; + if ("BNN".equals(codeString)) + return BNN; + if ("BNR".equals(codeString)) + return BNR; + if ("BNS".equals(codeString)) + return BNS; + if ("CAR".equals(codeString)) + return CAR; + if ("CEN".equals(codeString)) + return CEN; + if ("CNT".equals(codeString)) + return CNT; + if ("CPA".equals(codeString)) + return CPA; + if ("CTY".equals(codeString)) + return CTY; + if ("DEL".equals(codeString)) + return DEL; + if ("DINST".equals(codeString)) + return DINST; + if ("DINSTA".equals(codeString)) + return DINSTA; + if ("DINSTQ".equals(codeString)) + return DINSTQ; + if ("DIR".equals(codeString)) + return DIR; + if ("DMOD".equals(codeString)) + return DMOD; + if ("DMODID".equals(codeString)) + return DMODID; + if ("DPID".equals(codeString)) + return DPID; + if ("INT".equals(codeString)) + return INT; + if ("POB".equals(codeString)) + return POB; + if ("PRE".equals(codeString)) + return PRE; + if ("STA".equals(codeString)) + return STA; + if ("STB".equals(codeString)) + return STB; + if ("STR".equals(codeString)) + return STR; + if ("STTYP".equals(codeString)) + return STTYP; + if ("UNID".equals(codeString)) + return UNID; + if ("UNIT".equals(codeString)) + return UNIT; + if ("ZIP".equals(codeString)) + return ZIP; + throw new FHIRException("Unknown V3AddressPartType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADL: return "ADL"; + case AL: return "AL"; + case DAL: return "DAL"; + case SAL: return "SAL"; + case BNN: return "BNN"; + case BNR: return "BNR"; + case BNS: return "BNS"; + case CAR: return "CAR"; + case CEN: return "CEN"; + case CNT: return "CNT"; + case CPA: return "CPA"; + case CTY: return "CTY"; + case DEL: return "DEL"; + case DINST: return "DINST"; + case DINSTA: return "DINSTA"; + case DINSTQ: return "DINSTQ"; + case DIR: return "DIR"; + case DMOD: return "DMOD"; + case DMODID: return "DMODID"; + case DPID: return "DPID"; + case INT: return "INT"; + case POB: return "POB"; + case PRE: return "PRE"; + case STA: return "STA"; + case STB: return "STB"; + case STR: return "STR"; + case STTYP: return "STTYP"; + case UNID: return "UNID"; + case UNIT: return "UNIT"; + case ZIP: return "ZIP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AddressPartType"; + } + public String getDefinition() { + switch (this) { + case ADL: return "This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., \"3rd floor, Appt. 342\"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch \"t.o.\" means \"opposite to\" for house boats located across the street facing houses)."; + case AL: return "Description: An address line is for either an additional locator, a delivery address or a street address."; + case DAL: return "A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both."; + case SAL: return "Description: A street address line is frequently used instead of breaking out build number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both."; + case BNN: return "The numeric portion of a building number"; + case BNR: return "The number of a building, house or lot alongside the street. Also known as \"primary street number\". This does not number the street but rather the building."; + case BNS: return "Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number"; + case CAR: return "The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient"; + case CEN: return "A geographic sub-unit delineated for demographic purposes."; + case CNT: return "Country"; + case CPA: return "A sub-unit of a state or province. (49 of the United States of America use the term \"county;\" Louisiana uses the term \"parish\".)"; + case CTY: return "The name of the city, town, village, or other community or delivery center"; + case DEL: return "Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break."; + case DINST: return "Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc."; + case DINSTA: return "The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route."; + case DINSTQ: return "A number, letter or name identifying a delivery installation. E.g., for Station A, the delivery installation qualifier would be 'A'."; + case DIR: return "Direction (e.g., N, S, W, E)"; + case DMOD: return "Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc."; + case DMODID: return "Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number)."; + case DPID: return "A value that uniquely identifies the postal address."; + case INT: return "Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets."; + case POB: return "A numbered box located in a post station."; + case PRE: return "A subsection of a municipality"; + case STA: return "A sub-unit of a country with limited sovereignty in a federally organized country."; + case STB: return "The base name of a roadway or artery recognized by a municipality (excluding street type and direction)"; + case STR: return "street name"; + case STTYP: return "The designation given to the street. (e.g. Street, Avenue, Crescent, etc.)"; + case UNID: return "The number or name of a specific unit contained within a building or complex, as assigned by that building or complex."; + case UNIT: return "Indicates the type of specific unit contained within a building or complex. E.g. Appartment, Floor"; + case ZIP: return "A postal code designating a region defined by the postal service."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADL: return "additional locator"; + case AL: return "address line"; + case DAL: return "delivery address line"; + case SAL: return "street address line"; + case BNN: return "building number numeric"; + case BNR: return "building number"; + case BNS: return "building number suffix"; + case CAR: return "care of"; + case CEN: return "census tract"; + case CNT: return "country"; + case CPA: return "county or parish"; + case CTY: return "municipality"; + case DEL: return "delimiter"; + case DINST: return "delivery installation type"; + case DINSTA: return "delivery installation area"; + case DINSTQ: return "delivery installation qualifier"; + case DIR: return "direction"; + case DMOD: return "delivery mode"; + case DMODID: return "delivery mode identifier"; + case DPID: return "delivery point identifier"; + case INT: return "intersection"; + case POB: return "post box"; + case PRE: return "precinct"; + case STA: return "state or province"; + case STB: return "street name base"; + case STR: return "street name"; + case STTYP: return "street type"; + case UNID: return "unit identifier"; + case UNIT: return "unit designator"; + case ZIP: return "postal code"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressPartTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressPartTypeEnumFactory.java new file mode 100644 index 00000000000..553899f21bf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressPartTypeEnumFactory.java @@ -0,0 +1,174 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AddressPartTypeEnumFactory implements EnumFactory { + + public V3AddressPartType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ADL".equals(codeString)) + return V3AddressPartType.ADL; + if ("AL".equals(codeString)) + return V3AddressPartType.AL; + if ("DAL".equals(codeString)) + return V3AddressPartType.DAL; + if ("SAL".equals(codeString)) + return V3AddressPartType.SAL; + if ("BNN".equals(codeString)) + return V3AddressPartType.BNN; + if ("BNR".equals(codeString)) + return V3AddressPartType.BNR; + if ("BNS".equals(codeString)) + return V3AddressPartType.BNS; + if ("CAR".equals(codeString)) + return V3AddressPartType.CAR; + if ("CEN".equals(codeString)) + return V3AddressPartType.CEN; + if ("CNT".equals(codeString)) + return V3AddressPartType.CNT; + if ("CPA".equals(codeString)) + return V3AddressPartType.CPA; + if ("CTY".equals(codeString)) + return V3AddressPartType.CTY; + if ("DEL".equals(codeString)) + return V3AddressPartType.DEL; + if ("DINST".equals(codeString)) + return V3AddressPartType.DINST; + if ("DINSTA".equals(codeString)) + return V3AddressPartType.DINSTA; + if ("DINSTQ".equals(codeString)) + return V3AddressPartType.DINSTQ; + if ("DIR".equals(codeString)) + return V3AddressPartType.DIR; + if ("DMOD".equals(codeString)) + return V3AddressPartType.DMOD; + if ("DMODID".equals(codeString)) + return V3AddressPartType.DMODID; + if ("DPID".equals(codeString)) + return V3AddressPartType.DPID; + if ("INT".equals(codeString)) + return V3AddressPartType.INT; + if ("POB".equals(codeString)) + return V3AddressPartType.POB; + if ("PRE".equals(codeString)) + return V3AddressPartType.PRE; + if ("STA".equals(codeString)) + return V3AddressPartType.STA; + if ("STB".equals(codeString)) + return V3AddressPartType.STB; + if ("STR".equals(codeString)) + return V3AddressPartType.STR; + if ("STTYP".equals(codeString)) + return V3AddressPartType.STTYP; + if ("UNID".equals(codeString)) + return V3AddressPartType.UNID; + if ("UNIT".equals(codeString)) + return V3AddressPartType.UNIT; + if ("ZIP".equals(codeString)) + return V3AddressPartType.ZIP; + throw new IllegalArgumentException("Unknown V3AddressPartType code '"+codeString+"'"); + } + + public String toCode(V3AddressPartType code) { + if (code == V3AddressPartType.ADL) + return "ADL"; + if (code == V3AddressPartType.AL) + return "AL"; + if (code == V3AddressPartType.DAL) + return "DAL"; + if (code == V3AddressPartType.SAL) + return "SAL"; + if (code == V3AddressPartType.BNN) + return "BNN"; + if (code == V3AddressPartType.BNR) + return "BNR"; + if (code == V3AddressPartType.BNS) + return "BNS"; + if (code == V3AddressPartType.CAR) + return "CAR"; + if (code == V3AddressPartType.CEN) + return "CEN"; + if (code == V3AddressPartType.CNT) + return "CNT"; + if (code == V3AddressPartType.CPA) + return "CPA"; + if (code == V3AddressPartType.CTY) + return "CTY"; + if (code == V3AddressPartType.DEL) + return "DEL"; + if (code == V3AddressPartType.DINST) + return "DINST"; + if (code == V3AddressPartType.DINSTA) + return "DINSTA"; + if (code == V3AddressPartType.DINSTQ) + return "DINSTQ"; + if (code == V3AddressPartType.DIR) + return "DIR"; + if (code == V3AddressPartType.DMOD) + return "DMOD"; + if (code == V3AddressPartType.DMODID) + return "DMODID"; + if (code == V3AddressPartType.DPID) + return "DPID"; + if (code == V3AddressPartType.INT) + return "INT"; + if (code == V3AddressPartType.POB) + return "POB"; + if (code == V3AddressPartType.PRE) + return "PRE"; + if (code == V3AddressPartType.STA) + return "STA"; + if (code == V3AddressPartType.STB) + return "STB"; + if (code == V3AddressPartType.STR) + return "STR"; + if (code == V3AddressPartType.STTYP) + return "STTYP"; + if (code == V3AddressPartType.UNID) + return "UNID"; + if (code == V3AddressPartType.UNIT) + return "UNIT"; + if (code == V3AddressPartType.ZIP) + return "ZIP"; + return "?"; + } + + public String toSystem(V3AddressPartType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressUse.java new file mode 100644 index 00000000000..c669b45dadf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressUse.java @@ -0,0 +1,243 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AddressUse { + + /** + * Description: Address uses that can apply to both postal and telecommunication addresses. + */ + _GENERALADDRESSUSE, + /** + * Description: A flag indicating that the address is bad, in fact, useless. + */ + BAD, + /** + * Description: Indicates that the address is considered sensitive and should only be shared or published in accordance with organizational controls governing patient demographic information with increased sensitivity. Uses of Addresses. Lloyd to supply more complete description. + */ + CONF, + /** + * Description: A communication address at a home, attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. + */ + H, + /** + * Description: The primary home, to reach a person after business hours. + */ + HP, + /** + * Description: A vacation home, to reach a person while on vacation. + */ + HV, + /** + * This address is no longer in use. + + + Usage Note: Address may also carry valid time ranges. This code is used to cover the situations where it is known that the address is no longer valid, but no particular time range for its use is known. + */ + OLD, + /** + * Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information. + */ + TMP, + /** + * Description: An office address. First choice for business related contacts during business hours. + */ + WP, + /** + * Description: Indicates a work place address or telecommunication address that reaches the individual or organization directly without intermediaries. For phones, often referred to as a 'private line'. + */ + DIR, + /** + * Description: Indicates a work place address or telecommunication address that is a 'standard' address which may reach a reception service, mail-room, or other intermediary prior to the target entity. + */ + PUB, + /** + * Description: Address uses that only apply to postal addresses, not telecommunication addresses. + */ + _POSTALADDRESSUSE, + /** + * Description: Used primarily to visit an address. + */ + PHYS, + /** + * Description: Used to send mail. + */ + PST, + /** + * Description: Address uses that only apply to telecommunication addresses, not postal addresses. + */ + _TELECOMMUNICATIONADDRESSUSE, + /** + * Description: An automated answering machine used for less urgent cases and if the main purpose of contact is to leave a message or access an automated announcement. + */ + AS, + /** + * Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes. + */ + EC, + /** + * Description: A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business. + */ + MC, + /** + * Description: A paging device suitable to solicit a callback or to leave a very short message. + */ + PG, + /** + * added to help the parsers + */ + NULL; + public static V3AddressUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneralAddressUse".equals(codeString)) + return _GENERALADDRESSUSE; + if ("BAD".equals(codeString)) + return BAD; + if ("CONF".equals(codeString)) + return CONF; + if ("H".equals(codeString)) + return H; + if ("HP".equals(codeString)) + return HP; + if ("HV".equals(codeString)) + return HV; + if ("OLD".equals(codeString)) + return OLD; + if ("TMP".equals(codeString)) + return TMP; + if ("WP".equals(codeString)) + return WP; + if ("DIR".equals(codeString)) + return DIR; + if ("PUB".equals(codeString)) + return PUB; + if ("_PostalAddressUse".equals(codeString)) + return _POSTALADDRESSUSE; + if ("PHYS".equals(codeString)) + return PHYS; + if ("PST".equals(codeString)) + return PST; + if ("_TelecommunicationAddressUse".equals(codeString)) + return _TELECOMMUNICATIONADDRESSUSE; + if ("AS".equals(codeString)) + return AS; + if ("EC".equals(codeString)) + return EC; + if ("MC".equals(codeString)) + return MC; + if ("PG".equals(codeString)) + return PG; + throw new FHIRException("Unknown V3AddressUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _GENERALADDRESSUSE: return "_GeneralAddressUse"; + case BAD: return "BAD"; + case CONF: return "CONF"; + case H: return "H"; + case HP: return "HP"; + case HV: return "HV"; + case OLD: return "OLD"; + case TMP: return "TMP"; + case WP: return "WP"; + case DIR: return "DIR"; + case PUB: return "PUB"; + case _POSTALADDRESSUSE: return "_PostalAddressUse"; + case PHYS: return "PHYS"; + case PST: return "PST"; + case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; + case AS: return "AS"; + case EC: return "EC"; + case MC: return "MC"; + case PG: return "PG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AddressUse"; + } + public String getDefinition() { + switch (this) { + case _GENERALADDRESSUSE: return "Description: Address uses that can apply to both postal and telecommunication addresses."; + case BAD: return "Description: A flag indicating that the address is bad, in fact, useless."; + case CONF: return "Description: Indicates that the address is considered sensitive and should only be shared or published in accordance with organizational controls governing patient demographic information with increased sensitivity. Uses of Addresses. Lloyd to supply more complete description."; + case H: return "Description: A communication address at a home, attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available."; + case HP: return "Description: The primary home, to reach a person after business hours."; + case HV: return "Description: A vacation home, to reach a person while on vacation."; + case OLD: return "This address is no longer in use.\r\n\n \n Usage Note: Address may also carry valid time ranges. This code is used to cover the situations where it is known that the address is no longer valid, but no particular time range for its use is known."; + case TMP: return "Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information."; + case WP: return "Description: An office address. First choice for business related contacts during business hours."; + case DIR: return "Description: Indicates a work place address or telecommunication address that reaches the individual or organization directly without intermediaries. For phones, often referred to as a 'private line'."; + case PUB: return "Description: Indicates a work place address or telecommunication address that is a 'standard' address which may reach a reception service, mail-room, or other intermediary prior to the target entity."; + case _POSTALADDRESSUSE: return "Description: Address uses that only apply to postal addresses, not telecommunication addresses."; + case PHYS: return "Description: Used primarily to visit an address."; + case PST: return "Description: Used to send mail."; + case _TELECOMMUNICATIONADDRESSUSE: return "Description: Address uses that only apply to telecommunication addresses, not postal addresses."; + case AS: return "Description: An automated answering machine used for less urgent cases and if the main purpose of contact is to leave a message or access an automated announcement."; + case EC: return "Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes."; + case MC: return "Description: A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business."; + case PG: return "Description: A paging device suitable to solicit a callback or to leave a very short message."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _GENERALADDRESSUSE: return "_GeneralAddressUse"; + case BAD: return "bad address"; + case CONF: return "confidential address"; + case H: return "home address"; + case HP: return "primary home"; + case HV: return "vacation home"; + case OLD: return "no longer in use"; + case TMP: return "temporary address"; + case WP: return "work place"; + case DIR: return "direct"; + case PUB: return "public"; + case _POSTALADDRESSUSE: return "_PostalAddressUse"; + case PHYS: return "physical visit address"; + case PST: return "postal address"; + case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; + case AS: return "answering service"; + case EC: return "emergency contact"; + case MC: return "mobile contact)"; + case PG: return "pager"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressUseEnumFactory.java new file mode 100644 index 00000000000..6828741d18e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AddressUseEnumFactory.java @@ -0,0 +1,130 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AddressUseEnumFactory implements EnumFactory { + + public V3AddressUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneralAddressUse".equals(codeString)) + return V3AddressUse._GENERALADDRESSUSE; + if ("BAD".equals(codeString)) + return V3AddressUse.BAD; + if ("CONF".equals(codeString)) + return V3AddressUse.CONF; + if ("H".equals(codeString)) + return V3AddressUse.H; + if ("HP".equals(codeString)) + return V3AddressUse.HP; + if ("HV".equals(codeString)) + return V3AddressUse.HV; + if ("OLD".equals(codeString)) + return V3AddressUse.OLD; + if ("TMP".equals(codeString)) + return V3AddressUse.TMP; + if ("WP".equals(codeString)) + return V3AddressUse.WP; + if ("DIR".equals(codeString)) + return V3AddressUse.DIR; + if ("PUB".equals(codeString)) + return V3AddressUse.PUB; + if ("_PostalAddressUse".equals(codeString)) + return V3AddressUse._POSTALADDRESSUSE; + if ("PHYS".equals(codeString)) + return V3AddressUse.PHYS; + if ("PST".equals(codeString)) + return V3AddressUse.PST; + if ("_TelecommunicationAddressUse".equals(codeString)) + return V3AddressUse._TELECOMMUNICATIONADDRESSUSE; + if ("AS".equals(codeString)) + return V3AddressUse.AS; + if ("EC".equals(codeString)) + return V3AddressUse.EC; + if ("MC".equals(codeString)) + return V3AddressUse.MC; + if ("PG".equals(codeString)) + return V3AddressUse.PG; + throw new IllegalArgumentException("Unknown V3AddressUse code '"+codeString+"'"); + } + + public String toCode(V3AddressUse code) { + if (code == V3AddressUse._GENERALADDRESSUSE) + return "_GeneralAddressUse"; + if (code == V3AddressUse.BAD) + return "BAD"; + if (code == V3AddressUse.CONF) + return "CONF"; + if (code == V3AddressUse.H) + return "H"; + if (code == V3AddressUse.HP) + return "HP"; + if (code == V3AddressUse.HV) + return "HV"; + if (code == V3AddressUse.OLD) + return "OLD"; + if (code == V3AddressUse.TMP) + return "TMP"; + if (code == V3AddressUse.WP) + return "WP"; + if (code == V3AddressUse.DIR) + return "DIR"; + if (code == V3AddressUse.PUB) + return "PUB"; + if (code == V3AddressUse._POSTALADDRESSUSE) + return "_PostalAddressUse"; + if (code == V3AddressUse.PHYS) + return "PHYS"; + if (code == V3AddressUse.PST) + return "PST"; + if (code == V3AddressUse._TELECOMMUNICATIONADDRESSUSE) + return "_TelecommunicationAddressUse"; + if (code == V3AddressUse.AS) + return "AS"; + if (code == V3AddressUse.EC) + return "EC"; + if (code == V3AddressUse.MC) + return "MC"; + if (code == V3AddressUse.PG) + return "PG"; + return "?"; + } + + public String toSystem(V3AddressUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AdministrativeGender.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AdministrativeGender.java new file mode 100644 index 00000000000..caa148c09bc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AdministrativeGender.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AdministrativeGender { + + /** + * Female + */ + F, + /** + * Male + */ + M, + /** + * The gender of a person could not be uniquely defined as male or female, such as hermaphrodite. + */ + UN, + /** + * added to help the parsers + */ + NULL; + public static V3AdministrativeGender fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("F".equals(codeString)) + return F; + if ("M".equals(codeString)) + return M; + if ("UN".equals(codeString)) + return UN; + throw new FHIRException("Unknown V3AdministrativeGender code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case F: return "F"; + case M: return "M"; + case UN: return "UN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AdministrativeGender"; + } + public String getDefinition() { + switch (this) { + case F: return "Female"; + case M: return "Male"; + case UN: return "The gender of a person could not be uniquely defined as male or female, such as hermaphrodite."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case F: return "Female"; + case M: return "Male"; + case UN: return "Undifferentiated"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AdministrativeGenderEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AdministrativeGenderEnumFactory.java new file mode 100644 index 00000000000..532734cc7d9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AdministrativeGenderEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AdministrativeGenderEnumFactory implements EnumFactory { + + public V3AdministrativeGender fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("F".equals(codeString)) + return V3AdministrativeGender.F; + if ("M".equals(codeString)) + return V3AdministrativeGender.M; + if ("UN".equals(codeString)) + return V3AdministrativeGender.UN; + throw new IllegalArgumentException("Unknown V3AdministrativeGender code '"+codeString+"'"); + } + + public String toCode(V3AdministrativeGender code) { + if (code == V3AdministrativeGender.F) + return "F"; + if (code == V3AdministrativeGender.M) + return "M"; + if (code == V3AdministrativeGender.UN) + return "UN"; + return "?"; + } + + public String toSystem(V3AdministrativeGender code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AmericanIndianAlaskaNativeLanguages.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AmericanIndianAlaskaNativeLanguages.java new file mode 100644 index 00000000000..2643ea54204 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AmericanIndianAlaskaNativeLanguages.java @@ -0,0 +1,2364 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3AmericanIndianAlaskaNativeLanguages { + + /** + * Algic + */ + _ALGIC, + /** + * Algonquian + */ + _ALGONQUIAN, + /** + * Arapahoan + */ + _ARAPAHOAN, + /** + * ArapahoGrosVentre + */ + _ARAPAHOGROSVENTRE, + /** + * Arapaho + */ + XARP, + /** + * Gros Ventre + */ + XATS, + /** + * CreeMontagnais + */ + _CREEMONTAGNAIS, + /** + * Cree + */ + _CREE, + /** + * Western Cree + */ + XCRP, + /** + * EasternAlgonquin + */ + _EASTERNALGONQUIN, + /** + * Abenakian + */ + _ABENAKIAN, + /** + * Eastern Abenaki + */ + XAAQ, + /** + * Western Abenaki + */ + XABE, + /** + * Maliseet-Passamaquoddy + */ + XMAC, + /** + * Delawaran + */ + _DELAWARAN, + /** + * Unami Delaware + */ + XDEL, + /** + * Micmac + */ + XMIC, + /** + * Ojibwayan + */ + _OJIBWAYAN, + /** + * Southern Ojibwa + */ + XOJB, + /** + * Potawatami + */ + XPOT, + /** + * SaukFoxKickapoo + */ + _SAUKFOXKICKAPOO, + /** + * Kickapoo + */ + XKIC, + /** + * Mesquakie + */ + XSAC, + /** + * Shawnee + */ + XSJW, + /** + * Blackfoot + */ + XBLC, + /** + * Cheyenne + */ + XCHY, + /** + * Menominee + */ + XMEZ, + /** + * Ritwan + */ + _RITWAN, + /** + * Yurok + */ + XYUR, + /** + * Caddoan + */ + _CADDOAN, + /** + * NorthernCaddoan + */ + _NORTHERNCADDOAN, + /** + * Arikara + */ + XARI, + /** + * Pawnee + */ + XPAW, + /** + * Wichita + */ + XWIC, + /** + * SouthernCaddoan + */ + _SOUTHERNCADDOAN, + /** + * Caddo + */ + XCAD, + /** + * Chimakuan + */ + _CHIMAKUAN, + /** + * Quileute + */ + XQUI, + /** + * EskimoAleut + */ + _ESKIMOALEUT, + /** + * Aleut + */ + _ALEUT, + /** + * Aleut + */ + XALW, + /** + * Eskimoan + */ + _ESKIMOAN, + /** + * InuitInupiaq + */ + _INUITINUPIAQ, + /** + * North Alaskan Inuktitut + */ + XESI, + /** + * Northwest Alaska Inuktitut + */ + XESK, + /** + * SirenikskiYupik + */ + _SIRENIKSKIYUPIK, + /** + * Pacific Yupik Gulf + */ + XEMS, + /** + * Central Siberian Yupik + */ + XESS, + /** + * Central Alaskan Yupik + */ + XESU, + /** + * Hokan + */ + _HOKAN, + /** + * CochimiYuman + */ + _COCHIMIYUMAN, + /** + * Yuman + */ + _YUMAN, + /** + * DeltaCalifornia + */ + _DELTACALIFORNIA, + /** + * Diegueno + */ + _DIEGUENO, + /** + * Kumeyaay + */ + XDIH, + /** + * Cocopa + */ + XCOC, + /** + * Pai + */ + _PAI, + /** + * Havasupai + */ + XYUF, + /** + * River + */ + _RIVER, + /** + * Mohave + */ + XMOV, + /** + * Maricopa + */ + XMRC, + /** + * Quechan + */ + XYUM, + /** + * Palaihnihan + */ + _PALAIHNIHAN, + /** + * Achumawi + */ + XACH, + /** + * Atsugewi + */ + XATW, + /** + * Pomoan + */ + _POMOAN, + /** + * Kashaya + */ + XKJU, + /** + * Northeastern Pomo + */ + XPEF, + /** + * Southeastern Pomo + */ + XPEO, + /** + * Southern Pomo + */ + XPEQ, + /** + * Central Pomo + */ + XPOO, + /** + * Shasta + */ + _SHASTA, + /** + * Shasta + */ + XSHT, + /** + * Karok + */ + XKYH, + /** + * Washoe + */ + XWAS, + /** + * Iroquoian + */ + _IROQUOIAN, + /** + * NorthernIroquoian + */ + _NORTHERNIROQUOIAN, + /** + * Cayuga + */ + XCAY, + /** + * Mohawk + */ + XMOH, + /** + * Oneida + */ + XONE, + /** + * Onondaga + */ + XONO, + /** + * Seneca + */ + XSEE, + /** + * Tuscarora + */ + XTUS, + /** + * Cherokee + */ + XCER, + /** + * Keresan + */ + _KERESAN, + /** + * Rio Grande Keresan + */ + XKEE, + /** + * Acoma-Laguna + */ + XKJQ, + /** + * KiowaTanoan + */ + _KIOWATANOAN, + /** + * Tiwa + */ + _TIWA, + /** + * Northern Tiwa + */ + XTAO, + /** + * Southern Tiwa + */ + XTIX, + /** + * Kiowa + */ + XKIO, + /** + * Tewa + */ + XTEW, + /** + * Jemez + */ + XTOW, + /** + * Muskogean + */ + _MUSKOGEAN, + /** + * CentralMuskogean + */ + _CENTRALMUSKOGEAN, + /** + * Alabama + */ + XAKZ, + /** + * Koasati + */ + XCKU, + /** + * Mikasuki + */ + XMIK, + /** + * WesternMuskogean + */ + _WESTERNMUSKOGEAN, + /** + * Choctaw + */ + XCCT, + /** + * Chickasaw + */ + XCIC, + /** + * Creek + */ + XCRK, + /** + * Nadene + */ + _NADENE, + /** + * AthapaskanEyak + */ + _ATHAPASKANEYAK, + /** + * Athapaskan + */ + _ATHAPASKAN, + /** + * Apachean + */ + _APACHEAN, + /** + * EasternApachean + */ + _EASTERNAPACHEAN, + /** + * Jicarilla + */ + XAPJ, + /** + * Lipan + */ + XAPL, + /** + * WesternApachean + */ + _WESTERNAPACHEAN, + /** + * Mescalero-Chiricahua + */ + XAPM, + /** + * Western Apache + */ + XAPW, + /** + * Dine + */ + XNAV, + /** + * Kiowa Apache + */ + XAPK, + /** + * CentralAlaskaYukon + */ + _CENTRALALASKAYUKON, + /** + * KoyukonIngalik + */ + _KOYUKONINGALIK, + /** + * Holikachuk + */ + XHOI, + /** + * Degexit'an + */ + XING, + /** + * Koyukon + */ + XKOY, + /** + * KutchinHan + */ + _KUTCHINHAN, + /** + * Han + */ + XHAA, + /** + * Kutchin + */ + XKUC, + /** + * TananaTutchone + */ + _TANANATUTCHONE, + /** + * Tanana + */ + _TANANA, + /** + * Lower Tanana + */ + XTAA, + /** + * Upper Tanana + */ + XTAU, + /** + * Tanacross + */ + XTCB, + /** + * Upper Kuskokwim + */ + XKUU, + /** + * PacificCoastAthapaskan + */ + _PACIFICCOASTATHAPASKAN, + /** + * CaliforniaAthapaskan + */ + _CALIFORNIAATHAPASKAN, + /** + * Hupa + */ + XHUP, + /** + * Cahto + */ + XKTW, + /** + * OregonAthapaskan + */ + _OREGONATHAPASKAN, + /** + * Tolowa + */ + XTOL, + /** + * Tututni + */ + XTUU, + /** + * SouthernAlaska + */ + _SOUTHERNALASKA, + /** + * Ahtna + */ + XAHT, + /** + * Tanaina + */ + XTFN, + /** + * Eyak + */ + XEYA, + /** + * Tlingit + */ + XTLI, + /** + * Penutian + */ + _PENUTIAN, + /** + * Chinookan + */ + _CHINOOKAN, + /** + * UpperChinook + */ + _UPPERCHINOOK, + /** + * Kiksht + */ + XWAC, + /** + * Coosan + */ + _COOSAN, + /** + * Hanis + */ + XCOS, + /** + * Maiduan + */ + _MAIDUAN, + /** + * Northwest Maidu + */ + XMAI, + /** + * Northeast Maidu + */ + XNMU, + /** + * Nisenan + */ + XNSZ, + /** + * PlateauPenutian + */ + _PLATEAUPENUTIAN, + /** + * Sahaptian + */ + _SAHAPTIAN, + /** + * Umatilla + */ + XUMA, + /** + * Walla Walla + */ + XWAA, + /** + * Tenino + */ + XWAR, + /** + * Yakima + */ + XYAK, + /** + * Klamath-Modoc + */ + XKLA, + /** + * Nez Perce + */ + XNEZ, + /** + * Takelman + */ + _TAKELMAN, + /** + * Kalapuyan + */ + _KALAPUYAN, + /** + * Central Kalapuyan + */ + XKAL, + /** + * Tsimshianic + */ + _TSIMSHIANIC, + /** + * Coast Tsimshain + */ + XTSI, + /** + * Utian + */ + _UTIAN, + /** + * Miwokan + */ + _MIWOKAN, + /** + * EasternMiwok + */ + _EASTERNMIWOK, + /** + * Central Sierra Miwok + */ + XCSM, + /** + * Northern Sierra Miwok + */ + XNSQ, + /** + * Plains Miwok + */ + XPMW, + /** + * Southern Sierra Miwok + */ + XSKD, + /** + * WesternMiwok + */ + _WESTERNMIWOK, + /** + * Coast Miwok + */ + XCSI, + /** + * Lake Miwok + */ + XLMW, + /** + * Wintuan + */ + _WINTUAN, + /** + * Wintu-Nomlaki + */ + XWIT, + /** + * Yokutsan + */ + _YOKUTSAN, + /** + * Kings River + */ + XENH, + /** + * Gashowu + */ + XGSH, + /** + * Poso Creek + */ + XPYL, + /** + * Tule-Kaweah + */ + XTKH, + /** + * Pidgin + */ + _PIDGIN, + /** + * Chinook Wawa + */ + XCHH, + /** + * Salishan + */ + _SALISHAN, + /** + * CentralSalish + */ + _CENTRALSALISH, + /** + * Clallam + */ + XCLM, + /** + * Lushootseed + */ + XLUT, + /** + * Northern Straits + */ + XSTR, + /** + * InteriorSalish + */ + _INTERIORSALISH, + /** + * Columbian + */ + XCOL, + /** + * Coeur D'alene + */ + XCRD, + /** + * Kalispel + */ + XFLA, + /** + * Okanagan + */ + XOKA, + /** + * Tsamosan + */ + _TSAMOSAN, + /** + * Lower Chehalis + */ + XCEA, + /** + * Upper Chehalis + */ + XCJH, + /** + * Cowlitz + */ + XCOW, + /** + * Quinault + */ + XQUN, + /** + * SiouanCatawba + */ + _SIOUANCATAWBA, + /** + * Siouan + */ + _SIOUAN, + /** + * MississippiValley + */ + _MISSISSIPPIVALLEY, + /** + * ChiwereWinnebago + */ + _CHIWEREWINNEBAGO, + /** + * Chiwere + */ + XIOW, + /** + * Hocak + */ + XWIN, + /** + * Dakotan + */ + _DAKOTAN, + /** + * Assiniboine + */ + XASB, + /** + * Dakota + */ + XDHG, + /** + * Lakota + */ + XLKT, + /** + * Nakota + */ + XNKT, + /** + * Dhegiha + */ + _DHEGIHA, + /** + * Kansa + */ + XKAA, + /** + * Omaha-Ponca + */ + XOMA, + /** + * Osage + */ + XOSA, + /** + * Quapaw + */ + XQUA, + /** + * MissouriRiver + */ + _MISSOURIRIVER, + /** + * Crow + */ + XCRO, + /** + * Hidatsa + */ + XHID, + /** + * Mandan + */ + XMHQ, + /** + * UtoAztecan + */ + _UTOAZTECAN, + /** + * Numic + */ + _NUMIC, + /** + * CentralNumic + */ + _CENTRALNUMIC, + /** + * Comanche + */ + XCOM, + /** + * Panamint + */ + XPAR, + /** + * Shoshone + */ + XSHH, + /** + * SouthernNumic + */ + _SOUTHERNNUMIC, + /** + * Kawaiisu + */ + XKAW, + /** + * Ute-Southern Paiute + */ + XUTE, + /** + * WesternNumic + */ + _WESTERNNUMIC, + /** + * Mono + */ + XMON, + /** + * Northern Paiute-Bannock + */ + XPAO, + /** + * Takic + */ + _TAKIC, + /** + * Cupan + */ + _CUPAN, + /** + * Cahuilla + */ + XCHL, + /** + * Cupeno + */ + XCUP, + /** + * Luiseno + */ + XLUI, + /** + * SerranoGabrielino + */ + _SERRANOGABRIELINO, + /** + * Serrano + */ + XSER, + /** + * Taracahitan + */ + _TARACAHITAN, + /** + * Cahitan + */ + _CAHITAN, + /** + * Yaqui + */ + XYAQ, + /** + * Tepiman + */ + _TEPIMAN, + /** + * Papago-Pima + */ + XPAP, + /** + * Hopi + */ + XHOP, + /** + * Tubatululabal + */ + XTUB, + /** + * Wakashan + */ + _WAKASHAN, + /** + * Nootkan + */ + _NOOTKAN, + /** + * Makah + */ + XMYH, + /** + * Yukian + */ + _YUKIAN, + /** + * Wappo + */ + XWAO, + /** + * Yuki + */ + XYUK, + /** + * Haida + */ + XHAI, + /** + * Kootenai + */ + XKUN, + /** + * Plains Indian Sign Language + */ + XPSD, + /** + * Yuchi + */ + XYUC, + /** + * Zuni + */ + XZUN, + /** + * added to help the parsers + */ + NULL; + public static V3AmericanIndianAlaskaNativeLanguages fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Algic".equals(codeString)) + return _ALGIC; + if ("_Algonquian".equals(codeString)) + return _ALGONQUIAN; + if ("_Arapahoan".equals(codeString)) + return _ARAPAHOAN; + if ("_ArapahoGrosVentre".equals(codeString)) + return _ARAPAHOGROSVENTRE; + if ("x-ARP".equals(codeString)) + return XARP; + if ("x-ATS".equals(codeString)) + return XATS; + if ("_CreeMontagnais".equals(codeString)) + return _CREEMONTAGNAIS; + if ("_Cree".equals(codeString)) + return _CREE; + if ("x-CRP".equals(codeString)) + return XCRP; + if ("_EasternAlgonquin".equals(codeString)) + return _EASTERNALGONQUIN; + if ("_Abenakian".equals(codeString)) + return _ABENAKIAN; + if ("x-AAQ".equals(codeString)) + return XAAQ; + if ("x-ABE".equals(codeString)) + return XABE; + if ("x-MAC".equals(codeString)) + return XMAC; + if ("_Delawaran".equals(codeString)) + return _DELAWARAN; + if ("x-DEL".equals(codeString)) + return XDEL; + if ("x-MIC".equals(codeString)) + return XMIC; + if ("_Ojibwayan".equals(codeString)) + return _OJIBWAYAN; + if ("x-OJB".equals(codeString)) + return XOJB; + if ("x-POT".equals(codeString)) + return XPOT; + if ("_SaukFoxKickapoo".equals(codeString)) + return _SAUKFOXKICKAPOO; + if ("x-KIC".equals(codeString)) + return XKIC; + if ("x-SAC".equals(codeString)) + return XSAC; + if ("x-SJW".equals(codeString)) + return XSJW; + if ("x-BLC".equals(codeString)) + return XBLC; + if ("x-CHY".equals(codeString)) + return XCHY; + if ("x-MEZ".equals(codeString)) + return XMEZ; + if ("_Ritwan".equals(codeString)) + return _RITWAN; + if ("x-YUR".equals(codeString)) + return XYUR; + if ("_Caddoan".equals(codeString)) + return _CADDOAN; + if ("_NorthernCaddoan".equals(codeString)) + return _NORTHERNCADDOAN; + if ("x-ARI".equals(codeString)) + return XARI; + if ("x-PAW".equals(codeString)) + return XPAW; + if ("x-WIC".equals(codeString)) + return XWIC; + if ("_SouthernCaddoan".equals(codeString)) + return _SOUTHERNCADDOAN; + if ("x-CAD".equals(codeString)) + return XCAD; + if ("_Chimakuan".equals(codeString)) + return _CHIMAKUAN; + if ("x-QUI".equals(codeString)) + return XQUI; + if ("_EskimoAleut".equals(codeString)) + return _ESKIMOALEUT; + if ("_Aleut".equals(codeString)) + return _ALEUT; + if ("x-ALW".equals(codeString)) + return XALW; + if ("_Eskimoan".equals(codeString)) + return _ESKIMOAN; + if ("_InuitInupiaq".equals(codeString)) + return _INUITINUPIAQ; + if ("x-ESI".equals(codeString)) + return XESI; + if ("x-ESK".equals(codeString)) + return XESK; + if ("_SirenikskiYupik".equals(codeString)) + return _SIRENIKSKIYUPIK; + if ("x-EMS".equals(codeString)) + return XEMS; + if ("x-ESS".equals(codeString)) + return XESS; + if ("x-ESU".equals(codeString)) + return XESU; + if ("_Hokan".equals(codeString)) + return _HOKAN; + if ("_CochimiYuman".equals(codeString)) + return _COCHIMIYUMAN; + if ("_Yuman".equals(codeString)) + return _YUMAN; + if ("_DeltaCalifornia".equals(codeString)) + return _DELTACALIFORNIA; + if ("_Diegueno".equals(codeString)) + return _DIEGUENO; + if ("x-DIH".equals(codeString)) + return XDIH; + if ("x-COC".equals(codeString)) + return XCOC; + if ("_Pai".equals(codeString)) + return _PAI; + if ("x-YUF".equals(codeString)) + return XYUF; + if ("_River".equals(codeString)) + return _RIVER; + if ("x-MOV".equals(codeString)) + return XMOV; + if ("x-MRC".equals(codeString)) + return XMRC; + if ("x-YUM".equals(codeString)) + return XYUM; + if ("_Palaihnihan".equals(codeString)) + return _PALAIHNIHAN; + if ("x-ACH".equals(codeString)) + return XACH; + if ("x-ATW".equals(codeString)) + return XATW; + if ("_Pomoan".equals(codeString)) + return _POMOAN; + if ("x-KJU".equals(codeString)) + return XKJU; + if ("x-PEF".equals(codeString)) + return XPEF; + if ("x-PEO".equals(codeString)) + return XPEO; + if ("x-PEQ".equals(codeString)) + return XPEQ; + if ("x-POO".equals(codeString)) + return XPOO; + if ("_Shasta".equals(codeString)) + return _SHASTA; + if ("x-SHT".equals(codeString)) + return XSHT; + if ("x-KYH".equals(codeString)) + return XKYH; + if ("x-WAS".equals(codeString)) + return XWAS; + if ("_Iroquoian".equals(codeString)) + return _IROQUOIAN; + if ("_NorthernIroquoian".equals(codeString)) + return _NORTHERNIROQUOIAN; + if ("x-CAY".equals(codeString)) + return XCAY; + if ("x-MOH".equals(codeString)) + return XMOH; + if ("x-ONE".equals(codeString)) + return XONE; + if ("x-ONO".equals(codeString)) + return XONO; + if ("x-SEE".equals(codeString)) + return XSEE; + if ("x-TUS".equals(codeString)) + return XTUS; + if ("x-CER".equals(codeString)) + return XCER; + if ("_Keresan".equals(codeString)) + return _KERESAN; + if ("x-KEE".equals(codeString)) + return XKEE; + if ("x-KJQ".equals(codeString)) + return XKJQ; + if ("_KiowaTanoan".equals(codeString)) + return _KIOWATANOAN; + if ("_Tiwa".equals(codeString)) + return _TIWA; + if ("x-TAO".equals(codeString)) + return XTAO; + if ("x-TIX".equals(codeString)) + return XTIX; + if ("x-KIO".equals(codeString)) + return XKIO; + if ("x-TEW".equals(codeString)) + return XTEW; + if ("x-TOW".equals(codeString)) + return XTOW; + if ("_Muskogean".equals(codeString)) + return _MUSKOGEAN; + if ("_CentralMuskogean".equals(codeString)) + return _CENTRALMUSKOGEAN; + if ("x-AKZ".equals(codeString)) + return XAKZ; + if ("x-CKU".equals(codeString)) + return XCKU; + if ("x-MIK".equals(codeString)) + return XMIK; + if ("_WesternMuskogean".equals(codeString)) + return _WESTERNMUSKOGEAN; + if ("x-CCT".equals(codeString)) + return XCCT; + if ("x-CIC".equals(codeString)) + return XCIC; + if ("x-CRK".equals(codeString)) + return XCRK; + if ("_Nadene".equals(codeString)) + return _NADENE; + if ("_AthapaskanEyak".equals(codeString)) + return _ATHAPASKANEYAK; + if ("_Athapaskan".equals(codeString)) + return _ATHAPASKAN; + if ("_Apachean".equals(codeString)) + return _APACHEAN; + if ("_EasternApachean".equals(codeString)) + return _EASTERNAPACHEAN; + if ("x-APJ".equals(codeString)) + return XAPJ; + if ("x-APL".equals(codeString)) + return XAPL; + if ("_WesternApachean".equals(codeString)) + return _WESTERNAPACHEAN; + if ("x-APM".equals(codeString)) + return XAPM; + if ("x-APW".equals(codeString)) + return XAPW; + if ("x-NAV".equals(codeString)) + return XNAV; + if ("x-APK".equals(codeString)) + return XAPK; + if ("_CentralAlaskaYukon".equals(codeString)) + return _CENTRALALASKAYUKON; + if ("_KoyukonIngalik".equals(codeString)) + return _KOYUKONINGALIK; + if ("x-HOI".equals(codeString)) + return XHOI; + if ("x-ING".equals(codeString)) + return XING; + if ("x-KOY".equals(codeString)) + return XKOY; + if ("_KutchinHan".equals(codeString)) + return _KUTCHINHAN; + if ("x-HAA".equals(codeString)) + return XHAA; + if ("x-KUC".equals(codeString)) + return XKUC; + if ("_TananaTutchone".equals(codeString)) + return _TANANATUTCHONE; + if ("_Tanana".equals(codeString)) + return _TANANA; + if ("x-TAA".equals(codeString)) + return XTAA; + if ("x-TAU".equals(codeString)) + return XTAU; + if ("x-TCB".equals(codeString)) + return XTCB; + if ("x-KUU".equals(codeString)) + return XKUU; + if ("_PacificCoastAthapaskan".equals(codeString)) + return _PACIFICCOASTATHAPASKAN; + if ("_CaliforniaAthapaskan".equals(codeString)) + return _CALIFORNIAATHAPASKAN; + if ("x-HUP".equals(codeString)) + return XHUP; + if ("x-KTW".equals(codeString)) + return XKTW; + if ("_OregonAthapaskan".equals(codeString)) + return _OREGONATHAPASKAN; + if ("x-TOL".equals(codeString)) + return XTOL; + if ("x-TUU".equals(codeString)) + return XTUU; + if ("_SouthernAlaska".equals(codeString)) + return _SOUTHERNALASKA; + if ("x-AHT".equals(codeString)) + return XAHT; + if ("x-TFN".equals(codeString)) + return XTFN; + if ("x-EYA".equals(codeString)) + return XEYA; + if ("x-TLI".equals(codeString)) + return XTLI; + if ("_Penutian".equals(codeString)) + return _PENUTIAN; + if ("_Chinookan".equals(codeString)) + return _CHINOOKAN; + if ("_UpperChinook".equals(codeString)) + return _UPPERCHINOOK; + if ("x-WAC".equals(codeString)) + return XWAC; + if ("_Coosan".equals(codeString)) + return _COOSAN; + if ("x-COS".equals(codeString)) + return XCOS; + if ("_Maiduan".equals(codeString)) + return _MAIDUAN; + if ("x-MAI".equals(codeString)) + return XMAI; + if ("x-NMU".equals(codeString)) + return XNMU; + if ("x-NSZ".equals(codeString)) + return XNSZ; + if ("_PlateauPenutian".equals(codeString)) + return _PLATEAUPENUTIAN; + if ("_Sahaptian".equals(codeString)) + return _SAHAPTIAN; + if ("x-UMA".equals(codeString)) + return XUMA; + if ("x-WAA".equals(codeString)) + return XWAA; + if ("x-WAR".equals(codeString)) + return XWAR; + if ("x-YAK".equals(codeString)) + return XYAK; + if ("x-KLA".equals(codeString)) + return XKLA; + if ("x-NEZ".equals(codeString)) + return XNEZ; + if ("_Takelman".equals(codeString)) + return _TAKELMAN; + if ("_Kalapuyan".equals(codeString)) + return _KALAPUYAN; + if ("x-KAL".equals(codeString)) + return XKAL; + if ("_Tsimshianic".equals(codeString)) + return _TSIMSHIANIC; + if ("x-TSI".equals(codeString)) + return XTSI; + if ("_Utian".equals(codeString)) + return _UTIAN; + if ("_Miwokan".equals(codeString)) + return _MIWOKAN; + if ("_EasternMiwok".equals(codeString)) + return _EASTERNMIWOK; + if ("x-CSM".equals(codeString)) + return XCSM; + if ("x-NSQ".equals(codeString)) + return XNSQ; + if ("x-PMW".equals(codeString)) + return XPMW; + if ("x-SKD".equals(codeString)) + return XSKD; + if ("_WesternMiwok".equals(codeString)) + return _WESTERNMIWOK; + if ("x-CSI".equals(codeString)) + return XCSI; + if ("x-LMW".equals(codeString)) + return XLMW; + if ("_Wintuan".equals(codeString)) + return _WINTUAN; + if ("x-WIT".equals(codeString)) + return XWIT; + if ("_Yokutsan".equals(codeString)) + return _YOKUTSAN; + if ("x-ENH".equals(codeString)) + return XENH; + if ("x-GSH".equals(codeString)) + return XGSH; + if ("x-PYL".equals(codeString)) + return XPYL; + if ("x-TKH".equals(codeString)) + return XTKH; + if ("_Pidgin".equals(codeString)) + return _PIDGIN; + if ("x-CHH".equals(codeString)) + return XCHH; + if ("_Salishan".equals(codeString)) + return _SALISHAN; + if ("_CentralSalish".equals(codeString)) + return _CENTRALSALISH; + if ("x-CLM".equals(codeString)) + return XCLM; + if ("x-LUT".equals(codeString)) + return XLUT; + if ("x-STR".equals(codeString)) + return XSTR; + if ("_InteriorSalish".equals(codeString)) + return _INTERIORSALISH; + if ("x-COL".equals(codeString)) + return XCOL; + if ("x-CRD".equals(codeString)) + return XCRD; + if ("x-FLA".equals(codeString)) + return XFLA; + if ("x-OKA".equals(codeString)) + return XOKA; + if ("_Tsamosan".equals(codeString)) + return _TSAMOSAN; + if ("x-CEA".equals(codeString)) + return XCEA; + if ("x-CJH".equals(codeString)) + return XCJH; + if ("x-COW".equals(codeString)) + return XCOW; + if ("x-QUN".equals(codeString)) + return XQUN; + if ("_SiouanCatawba".equals(codeString)) + return _SIOUANCATAWBA; + if ("_Siouan".equals(codeString)) + return _SIOUAN; + if ("_MississippiValley".equals(codeString)) + return _MISSISSIPPIVALLEY; + if ("_ChiwereWinnebago".equals(codeString)) + return _CHIWEREWINNEBAGO; + if ("x-IOW".equals(codeString)) + return XIOW; + if ("x-WIN".equals(codeString)) + return XWIN; + if ("_Dakotan".equals(codeString)) + return _DAKOTAN; + if ("x-ASB".equals(codeString)) + return XASB; + if ("x-DHG".equals(codeString)) + return XDHG; + if ("x-LKT".equals(codeString)) + return XLKT; + if ("x-NKT".equals(codeString)) + return XNKT; + if ("_Dhegiha".equals(codeString)) + return _DHEGIHA; + if ("x-KAA".equals(codeString)) + return XKAA; + if ("x-OMA".equals(codeString)) + return XOMA; + if ("x-OSA".equals(codeString)) + return XOSA; + if ("x-QUA".equals(codeString)) + return XQUA; + if ("_MissouriRiver".equals(codeString)) + return _MISSOURIRIVER; + if ("x-CRO".equals(codeString)) + return XCRO; + if ("x-HID".equals(codeString)) + return XHID; + if ("x-MHQ".equals(codeString)) + return XMHQ; + if ("_UtoAztecan".equals(codeString)) + return _UTOAZTECAN; + if ("_Numic".equals(codeString)) + return _NUMIC; + if ("_CentralNumic".equals(codeString)) + return _CENTRALNUMIC; + if ("x-COM".equals(codeString)) + return XCOM; + if ("x-PAR".equals(codeString)) + return XPAR; + if ("x-SHH".equals(codeString)) + return XSHH; + if ("_SouthernNumic".equals(codeString)) + return _SOUTHERNNUMIC; + if ("x-KAW".equals(codeString)) + return XKAW; + if ("x-UTE".equals(codeString)) + return XUTE; + if ("_WesternNumic".equals(codeString)) + return _WESTERNNUMIC; + if ("x-MON".equals(codeString)) + return XMON; + if ("x-PAO".equals(codeString)) + return XPAO; + if ("_Takic".equals(codeString)) + return _TAKIC; + if ("_Cupan".equals(codeString)) + return _CUPAN; + if ("x-CHL".equals(codeString)) + return XCHL; + if ("x-CUP".equals(codeString)) + return XCUP; + if ("x-LUI".equals(codeString)) + return XLUI; + if ("_SerranoGabrielino".equals(codeString)) + return _SERRANOGABRIELINO; + if ("x-SER".equals(codeString)) + return XSER; + if ("_Taracahitan".equals(codeString)) + return _TARACAHITAN; + if ("_Cahitan".equals(codeString)) + return _CAHITAN; + if ("x-YAQ".equals(codeString)) + return XYAQ; + if ("_Tepiman".equals(codeString)) + return _TEPIMAN; + if ("x-PAP".equals(codeString)) + return XPAP; + if ("x-HOP".equals(codeString)) + return XHOP; + if ("x-TUB".equals(codeString)) + return XTUB; + if ("_Wakashan".equals(codeString)) + return _WAKASHAN; + if ("_Nootkan".equals(codeString)) + return _NOOTKAN; + if ("x-MYH".equals(codeString)) + return XMYH; + if ("_Yukian".equals(codeString)) + return _YUKIAN; + if ("x-WAO".equals(codeString)) + return XWAO; + if ("x-YUK".equals(codeString)) + return XYUK; + if ("x-HAI".equals(codeString)) + return XHAI; + if ("x-KUN".equals(codeString)) + return XKUN; + if ("x-PSD".equals(codeString)) + return XPSD; + if ("x-YUC".equals(codeString)) + return XYUC; + if ("x-ZUN".equals(codeString)) + return XZUN; + throw new FHIRException("Unknown V3AmericanIndianAlaskaNativeLanguages code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ALGIC: return "_Algic"; + case _ALGONQUIAN: return "_Algonquian"; + case _ARAPAHOAN: return "_Arapahoan"; + case _ARAPAHOGROSVENTRE: return "_ArapahoGrosVentre"; + case XARP: return "x-ARP"; + case XATS: return "x-ATS"; + case _CREEMONTAGNAIS: return "_CreeMontagnais"; + case _CREE: return "_Cree"; + case XCRP: return "x-CRP"; + case _EASTERNALGONQUIN: return "_EasternAlgonquin"; + case _ABENAKIAN: return "_Abenakian"; + case XAAQ: return "x-AAQ"; + case XABE: return "x-ABE"; + case XMAC: return "x-MAC"; + case _DELAWARAN: return "_Delawaran"; + case XDEL: return "x-DEL"; + case XMIC: return "x-MIC"; + case _OJIBWAYAN: return "_Ojibwayan"; + case XOJB: return "x-OJB"; + case XPOT: return "x-POT"; + case _SAUKFOXKICKAPOO: return "_SaukFoxKickapoo"; + case XKIC: return "x-KIC"; + case XSAC: return "x-SAC"; + case XSJW: return "x-SJW"; + case XBLC: return "x-BLC"; + case XCHY: return "x-CHY"; + case XMEZ: return "x-MEZ"; + case _RITWAN: return "_Ritwan"; + case XYUR: return "x-YUR"; + case _CADDOAN: return "_Caddoan"; + case _NORTHERNCADDOAN: return "_NorthernCaddoan"; + case XARI: return "x-ARI"; + case XPAW: return "x-PAW"; + case XWIC: return "x-WIC"; + case _SOUTHERNCADDOAN: return "_SouthernCaddoan"; + case XCAD: return "x-CAD"; + case _CHIMAKUAN: return "_Chimakuan"; + case XQUI: return "x-QUI"; + case _ESKIMOALEUT: return "_EskimoAleut"; + case _ALEUT: return "_Aleut"; + case XALW: return "x-ALW"; + case _ESKIMOAN: return "_Eskimoan"; + case _INUITINUPIAQ: return "_InuitInupiaq"; + case XESI: return "x-ESI"; + case XESK: return "x-ESK"; + case _SIRENIKSKIYUPIK: return "_SirenikskiYupik"; + case XEMS: return "x-EMS"; + case XESS: return "x-ESS"; + case XESU: return "x-ESU"; + case _HOKAN: return "_Hokan"; + case _COCHIMIYUMAN: return "_CochimiYuman"; + case _YUMAN: return "_Yuman"; + case _DELTACALIFORNIA: return "_DeltaCalifornia"; + case _DIEGUENO: return "_Diegueno"; + case XDIH: return "x-DIH"; + case XCOC: return "x-COC"; + case _PAI: return "_Pai"; + case XYUF: return "x-YUF"; + case _RIVER: return "_River"; + case XMOV: return "x-MOV"; + case XMRC: return "x-MRC"; + case XYUM: return "x-YUM"; + case _PALAIHNIHAN: return "_Palaihnihan"; + case XACH: return "x-ACH"; + case XATW: return "x-ATW"; + case _POMOAN: return "_Pomoan"; + case XKJU: return "x-KJU"; + case XPEF: return "x-PEF"; + case XPEO: return "x-PEO"; + case XPEQ: return "x-PEQ"; + case XPOO: return "x-POO"; + case _SHASTA: return "_Shasta"; + case XSHT: return "x-SHT"; + case XKYH: return "x-KYH"; + case XWAS: return "x-WAS"; + case _IROQUOIAN: return "_Iroquoian"; + case _NORTHERNIROQUOIAN: return "_NorthernIroquoian"; + case XCAY: return "x-CAY"; + case XMOH: return "x-MOH"; + case XONE: return "x-ONE"; + case XONO: return "x-ONO"; + case XSEE: return "x-SEE"; + case XTUS: return "x-TUS"; + case XCER: return "x-CER"; + case _KERESAN: return "_Keresan"; + case XKEE: return "x-KEE"; + case XKJQ: return "x-KJQ"; + case _KIOWATANOAN: return "_KiowaTanoan"; + case _TIWA: return "_Tiwa"; + case XTAO: return "x-TAO"; + case XTIX: return "x-TIX"; + case XKIO: return "x-KIO"; + case XTEW: return "x-TEW"; + case XTOW: return "x-TOW"; + case _MUSKOGEAN: return "_Muskogean"; + case _CENTRALMUSKOGEAN: return "_CentralMuskogean"; + case XAKZ: return "x-AKZ"; + case XCKU: return "x-CKU"; + case XMIK: return "x-MIK"; + case _WESTERNMUSKOGEAN: return "_WesternMuskogean"; + case XCCT: return "x-CCT"; + case XCIC: return "x-CIC"; + case XCRK: return "x-CRK"; + case _NADENE: return "_Nadene"; + case _ATHAPASKANEYAK: return "_AthapaskanEyak"; + case _ATHAPASKAN: return "_Athapaskan"; + case _APACHEAN: return "_Apachean"; + case _EASTERNAPACHEAN: return "_EasternApachean"; + case XAPJ: return "x-APJ"; + case XAPL: return "x-APL"; + case _WESTERNAPACHEAN: return "_WesternApachean"; + case XAPM: return "x-APM"; + case XAPW: return "x-APW"; + case XNAV: return "x-NAV"; + case XAPK: return "x-APK"; + case _CENTRALALASKAYUKON: return "_CentralAlaskaYukon"; + case _KOYUKONINGALIK: return "_KoyukonIngalik"; + case XHOI: return "x-HOI"; + case XING: return "x-ING"; + case XKOY: return "x-KOY"; + case _KUTCHINHAN: return "_KutchinHan"; + case XHAA: return "x-HAA"; + case XKUC: return "x-KUC"; + case _TANANATUTCHONE: return "_TananaTutchone"; + case _TANANA: return "_Tanana"; + case XTAA: return "x-TAA"; + case XTAU: return "x-TAU"; + case XTCB: return "x-TCB"; + case XKUU: return "x-KUU"; + case _PACIFICCOASTATHAPASKAN: return "_PacificCoastAthapaskan"; + case _CALIFORNIAATHAPASKAN: return "_CaliforniaAthapaskan"; + case XHUP: return "x-HUP"; + case XKTW: return "x-KTW"; + case _OREGONATHAPASKAN: return "_OregonAthapaskan"; + case XTOL: return "x-TOL"; + case XTUU: return "x-TUU"; + case _SOUTHERNALASKA: return "_SouthernAlaska"; + case XAHT: return "x-AHT"; + case XTFN: return "x-TFN"; + case XEYA: return "x-EYA"; + case XTLI: return "x-TLI"; + case _PENUTIAN: return "_Penutian"; + case _CHINOOKAN: return "_Chinookan"; + case _UPPERCHINOOK: return "_UpperChinook"; + case XWAC: return "x-WAC"; + case _COOSAN: return "_Coosan"; + case XCOS: return "x-COS"; + case _MAIDUAN: return "_Maiduan"; + case XMAI: return "x-MAI"; + case XNMU: return "x-NMU"; + case XNSZ: return "x-NSZ"; + case _PLATEAUPENUTIAN: return "_PlateauPenutian"; + case _SAHAPTIAN: return "_Sahaptian"; + case XUMA: return "x-UMA"; + case XWAA: return "x-WAA"; + case XWAR: return "x-WAR"; + case XYAK: return "x-YAK"; + case XKLA: return "x-KLA"; + case XNEZ: return "x-NEZ"; + case _TAKELMAN: return "_Takelman"; + case _KALAPUYAN: return "_Kalapuyan"; + case XKAL: return "x-KAL"; + case _TSIMSHIANIC: return "_Tsimshianic"; + case XTSI: return "x-TSI"; + case _UTIAN: return "_Utian"; + case _MIWOKAN: return "_Miwokan"; + case _EASTERNMIWOK: return "_EasternMiwok"; + case XCSM: return "x-CSM"; + case XNSQ: return "x-NSQ"; + case XPMW: return "x-PMW"; + case XSKD: return "x-SKD"; + case _WESTERNMIWOK: return "_WesternMiwok"; + case XCSI: return "x-CSI"; + case XLMW: return "x-LMW"; + case _WINTUAN: return "_Wintuan"; + case XWIT: return "x-WIT"; + case _YOKUTSAN: return "_Yokutsan"; + case XENH: return "x-ENH"; + case XGSH: return "x-GSH"; + case XPYL: return "x-PYL"; + case XTKH: return "x-TKH"; + case _PIDGIN: return "_Pidgin"; + case XCHH: return "x-CHH"; + case _SALISHAN: return "_Salishan"; + case _CENTRALSALISH: return "_CentralSalish"; + case XCLM: return "x-CLM"; + case XLUT: return "x-LUT"; + case XSTR: return "x-STR"; + case _INTERIORSALISH: return "_InteriorSalish"; + case XCOL: return "x-COL"; + case XCRD: return "x-CRD"; + case XFLA: return "x-FLA"; + case XOKA: return "x-OKA"; + case _TSAMOSAN: return "_Tsamosan"; + case XCEA: return "x-CEA"; + case XCJH: return "x-CJH"; + case XCOW: return "x-COW"; + case XQUN: return "x-QUN"; + case _SIOUANCATAWBA: return "_SiouanCatawba"; + case _SIOUAN: return "_Siouan"; + case _MISSISSIPPIVALLEY: return "_MississippiValley"; + case _CHIWEREWINNEBAGO: return "_ChiwereWinnebago"; + case XIOW: return "x-IOW"; + case XWIN: return "x-WIN"; + case _DAKOTAN: return "_Dakotan"; + case XASB: return "x-ASB"; + case XDHG: return "x-DHG"; + case XLKT: return "x-LKT"; + case XNKT: return "x-NKT"; + case _DHEGIHA: return "_Dhegiha"; + case XKAA: return "x-KAA"; + case XOMA: return "x-OMA"; + case XOSA: return "x-OSA"; + case XQUA: return "x-QUA"; + case _MISSOURIRIVER: return "_MissouriRiver"; + case XCRO: return "x-CRO"; + case XHID: return "x-HID"; + case XMHQ: return "x-MHQ"; + case _UTOAZTECAN: return "_UtoAztecan"; + case _NUMIC: return "_Numic"; + case _CENTRALNUMIC: return "_CentralNumic"; + case XCOM: return "x-COM"; + case XPAR: return "x-PAR"; + case XSHH: return "x-SHH"; + case _SOUTHERNNUMIC: return "_SouthernNumic"; + case XKAW: return "x-KAW"; + case XUTE: return "x-UTE"; + case _WESTERNNUMIC: return "_WesternNumic"; + case XMON: return "x-MON"; + case XPAO: return "x-PAO"; + case _TAKIC: return "_Takic"; + case _CUPAN: return "_Cupan"; + case XCHL: return "x-CHL"; + case XCUP: return "x-CUP"; + case XLUI: return "x-LUI"; + case _SERRANOGABRIELINO: return "_SerranoGabrielino"; + case XSER: return "x-SER"; + case _TARACAHITAN: return "_Taracahitan"; + case _CAHITAN: return "_Cahitan"; + case XYAQ: return "x-YAQ"; + case _TEPIMAN: return "_Tepiman"; + case XPAP: return "x-PAP"; + case XHOP: return "x-HOP"; + case XTUB: return "x-TUB"; + case _WAKASHAN: return "_Wakashan"; + case _NOOTKAN: return "_Nootkan"; + case XMYH: return "x-MYH"; + case _YUKIAN: return "_Yukian"; + case XWAO: return "x-WAO"; + case XYUK: return "x-YUK"; + case XHAI: return "x-HAI"; + case XKUN: return "x-KUN"; + case XPSD: return "x-PSD"; + case XYUC: return "x-YUC"; + case XZUN: return "x-ZUN"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/AmericanIndianAlaskaNativeLanguages"; + } + public String getDefinition() { + switch (this) { + case _ALGIC: return "Algic"; + case _ALGONQUIAN: return "Algonquian"; + case _ARAPAHOAN: return "Arapahoan"; + case _ARAPAHOGROSVENTRE: return "ArapahoGrosVentre"; + case XARP: return "Arapaho"; + case XATS: return "Gros Ventre"; + case _CREEMONTAGNAIS: return "CreeMontagnais"; + case _CREE: return "Cree"; + case XCRP: return "Western Cree"; + case _EASTERNALGONQUIN: return "EasternAlgonquin"; + case _ABENAKIAN: return "Abenakian"; + case XAAQ: return "Eastern Abenaki"; + case XABE: return "Western Abenaki"; + case XMAC: return "Maliseet-Passamaquoddy"; + case _DELAWARAN: return "Delawaran"; + case XDEL: return "Unami Delaware"; + case XMIC: return "Micmac"; + case _OJIBWAYAN: return "Ojibwayan"; + case XOJB: return "Southern Ojibwa"; + case XPOT: return "Potawatami"; + case _SAUKFOXKICKAPOO: return "SaukFoxKickapoo"; + case XKIC: return "Kickapoo"; + case XSAC: return "Mesquakie"; + case XSJW: return "Shawnee"; + case XBLC: return "Blackfoot"; + case XCHY: return "Cheyenne"; + case XMEZ: return "Menominee"; + case _RITWAN: return "Ritwan"; + case XYUR: return "Yurok"; + case _CADDOAN: return "Caddoan"; + case _NORTHERNCADDOAN: return "NorthernCaddoan"; + case XARI: return "Arikara"; + case XPAW: return "Pawnee"; + case XWIC: return "Wichita"; + case _SOUTHERNCADDOAN: return "SouthernCaddoan"; + case XCAD: return "Caddo"; + case _CHIMAKUAN: return "Chimakuan"; + case XQUI: return "Quileute"; + case _ESKIMOALEUT: return "EskimoAleut"; + case _ALEUT: return "Aleut"; + case XALW: return "Aleut"; + case _ESKIMOAN: return "Eskimoan"; + case _INUITINUPIAQ: return "InuitInupiaq"; + case XESI: return "North Alaskan Inuktitut"; + case XESK: return "Northwest Alaska Inuktitut"; + case _SIRENIKSKIYUPIK: return "SirenikskiYupik"; + case XEMS: return "Pacific Yupik Gulf"; + case XESS: return "Central Siberian Yupik"; + case XESU: return "Central Alaskan Yupik"; + case _HOKAN: return "Hokan"; + case _COCHIMIYUMAN: return "CochimiYuman"; + case _YUMAN: return "Yuman"; + case _DELTACALIFORNIA: return "DeltaCalifornia"; + case _DIEGUENO: return "Diegueno"; + case XDIH: return "Kumeyaay"; + case XCOC: return "Cocopa"; + case _PAI: return "Pai"; + case XYUF: return "Havasupai"; + case _RIVER: return "River"; + case XMOV: return "Mohave"; + case XMRC: return "Maricopa"; + case XYUM: return "Quechan"; + case _PALAIHNIHAN: return "Palaihnihan"; + case XACH: return "Achumawi"; + case XATW: return "Atsugewi"; + case _POMOAN: return "Pomoan"; + case XKJU: return "Kashaya"; + case XPEF: return "Northeastern Pomo"; + case XPEO: return "Southeastern Pomo"; + case XPEQ: return "Southern Pomo"; + case XPOO: return "Central Pomo"; + case _SHASTA: return "Shasta"; + case XSHT: return "Shasta"; + case XKYH: return "Karok"; + case XWAS: return "Washoe"; + case _IROQUOIAN: return "Iroquoian"; + case _NORTHERNIROQUOIAN: return "NorthernIroquoian"; + case XCAY: return "Cayuga"; + case XMOH: return "Mohawk"; + case XONE: return "Oneida"; + case XONO: return "Onondaga"; + case XSEE: return "Seneca"; + case XTUS: return "Tuscarora"; + case XCER: return "Cherokee"; + case _KERESAN: return "Keresan"; + case XKEE: return "Rio Grande Keresan"; + case XKJQ: return "Acoma-Laguna"; + case _KIOWATANOAN: return "KiowaTanoan"; + case _TIWA: return "Tiwa"; + case XTAO: return "Northern Tiwa"; + case XTIX: return "Southern Tiwa"; + case XKIO: return "Kiowa"; + case XTEW: return "Tewa"; + case XTOW: return "Jemez"; + case _MUSKOGEAN: return "Muskogean"; + case _CENTRALMUSKOGEAN: return "CentralMuskogean"; + case XAKZ: return "Alabama"; + case XCKU: return "Koasati"; + case XMIK: return "Mikasuki"; + case _WESTERNMUSKOGEAN: return "WesternMuskogean"; + case XCCT: return "Choctaw"; + case XCIC: return "Chickasaw"; + case XCRK: return "Creek"; + case _NADENE: return "Nadene"; + case _ATHAPASKANEYAK: return "AthapaskanEyak"; + case _ATHAPASKAN: return "Athapaskan"; + case _APACHEAN: return "Apachean"; + case _EASTERNAPACHEAN: return "EasternApachean"; + case XAPJ: return "Jicarilla"; + case XAPL: return "Lipan"; + case _WESTERNAPACHEAN: return "WesternApachean"; + case XAPM: return "Mescalero-Chiricahua"; + case XAPW: return "Western Apache"; + case XNAV: return "Dine"; + case XAPK: return "Kiowa Apache"; + case _CENTRALALASKAYUKON: return "CentralAlaskaYukon"; + case _KOYUKONINGALIK: return "KoyukonIngalik"; + case XHOI: return "Holikachuk"; + case XING: return "Degexit'an"; + case XKOY: return "Koyukon"; + case _KUTCHINHAN: return "KutchinHan"; + case XHAA: return "Han"; + case XKUC: return "Kutchin"; + case _TANANATUTCHONE: return "TananaTutchone"; + case _TANANA: return "Tanana"; + case XTAA: return "Lower Tanana"; + case XTAU: return "Upper Tanana"; + case XTCB: return "Tanacross"; + case XKUU: return "Upper Kuskokwim"; + case _PACIFICCOASTATHAPASKAN: return "PacificCoastAthapaskan"; + case _CALIFORNIAATHAPASKAN: return "CaliforniaAthapaskan"; + case XHUP: return "Hupa"; + case XKTW: return "Cahto"; + case _OREGONATHAPASKAN: return "OregonAthapaskan"; + case XTOL: return "Tolowa"; + case XTUU: return "Tututni"; + case _SOUTHERNALASKA: return "SouthernAlaska"; + case XAHT: return "Ahtna"; + case XTFN: return "Tanaina"; + case XEYA: return "Eyak"; + case XTLI: return "Tlingit"; + case _PENUTIAN: return "Penutian"; + case _CHINOOKAN: return "Chinookan"; + case _UPPERCHINOOK: return "UpperChinook"; + case XWAC: return "Kiksht"; + case _COOSAN: return "Coosan"; + case XCOS: return "Hanis"; + case _MAIDUAN: return "Maiduan"; + case XMAI: return "Northwest Maidu"; + case XNMU: return "Northeast Maidu"; + case XNSZ: return "Nisenan"; + case _PLATEAUPENUTIAN: return "PlateauPenutian"; + case _SAHAPTIAN: return "Sahaptian"; + case XUMA: return "Umatilla"; + case XWAA: return "Walla Walla"; + case XWAR: return "Tenino"; + case XYAK: return "Yakima"; + case XKLA: return "Klamath-Modoc"; + case XNEZ: return "Nez Perce"; + case _TAKELMAN: return "Takelman"; + case _KALAPUYAN: return "Kalapuyan"; + case XKAL: return "Central Kalapuyan"; + case _TSIMSHIANIC: return "Tsimshianic"; + case XTSI: return "Coast Tsimshain"; + case _UTIAN: return "Utian"; + case _MIWOKAN: return "Miwokan"; + case _EASTERNMIWOK: return "EasternMiwok"; + case XCSM: return "Central Sierra Miwok"; + case XNSQ: return "Northern Sierra Miwok"; + case XPMW: return "Plains Miwok"; + case XSKD: return "Southern Sierra Miwok"; + case _WESTERNMIWOK: return "WesternMiwok"; + case XCSI: return "Coast Miwok"; + case XLMW: return "Lake Miwok"; + case _WINTUAN: return "Wintuan"; + case XWIT: return "Wintu-Nomlaki"; + case _YOKUTSAN: return "Yokutsan"; + case XENH: return "Kings River"; + case XGSH: return "Gashowu"; + case XPYL: return "Poso Creek"; + case XTKH: return "Tule-Kaweah"; + case _PIDGIN: return "Pidgin"; + case XCHH: return "Chinook Wawa"; + case _SALISHAN: return "Salishan"; + case _CENTRALSALISH: return "CentralSalish"; + case XCLM: return "Clallam"; + case XLUT: return "Lushootseed"; + case XSTR: return "Northern Straits"; + case _INTERIORSALISH: return "InteriorSalish"; + case XCOL: return "Columbian"; + case XCRD: return "Coeur D'alene"; + case XFLA: return "Kalispel"; + case XOKA: return "Okanagan"; + case _TSAMOSAN: return "Tsamosan"; + case XCEA: return "Lower Chehalis"; + case XCJH: return "Upper Chehalis"; + case XCOW: return "Cowlitz"; + case XQUN: return "Quinault"; + case _SIOUANCATAWBA: return "SiouanCatawba"; + case _SIOUAN: return "Siouan"; + case _MISSISSIPPIVALLEY: return "MississippiValley"; + case _CHIWEREWINNEBAGO: return "ChiwereWinnebago"; + case XIOW: return "Chiwere"; + case XWIN: return "Hocak"; + case _DAKOTAN: return "Dakotan"; + case XASB: return "Assiniboine"; + case XDHG: return "Dakota"; + case XLKT: return "Lakota"; + case XNKT: return "Nakota"; + case _DHEGIHA: return "Dhegiha"; + case XKAA: return "Kansa"; + case XOMA: return "Omaha-Ponca"; + case XOSA: return "Osage"; + case XQUA: return "Quapaw"; + case _MISSOURIRIVER: return "MissouriRiver"; + case XCRO: return "Crow"; + case XHID: return "Hidatsa"; + case XMHQ: return "Mandan"; + case _UTOAZTECAN: return "UtoAztecan"; + case _NUMIC: return "Numic"; + case _CENTRALNUMIC: return "CentralNumic"; + case XCOM: return "Comanche"; + case XPAR: return "Panamint"; + case XSHH: return "Shoshone"; + case _SOUTHERNNUMIC: return "SouthernNumic"; + case XKAW: return "Kawaiisu"; + case XUTE: return "Ute-Southern Paiute"; + case _WESTERNNUMIC: return "WesternNumic"; + case XMON: return "Mono"; + case XPAO: return "Northern Paiute-Bannock"; + case _TAKIC: return "Takic"; + case _CUPAN: return "Cupan"; + case XCHL: return "Cahuilla"; + case XCUP: return "Cupeno"; + case XLUI: return "Luiseno"; + case _SERRANOGABRIELINO: return "SerranoGabrielino"; + case XSER: return "Serrano"; + case _TARACAHITAN: return "Taracahitan"; + case _CAHITAN: return "Cahitan"; + case XYAQ: return "Yaqui"; + case _TEPIMAN: return "Tepiman"; + case XPAP: return "Papago-Pima"; + case XHOP: return "Hopi"; + case XTUB: return "Tubatululabal"; + case _WAKASHAN: return "Wakashan"; + case _NOOTKAN: return "Nootkan"; + case XMYH: return "Makah"; + case _YUKIAN: return "Yukian"; + case XWAO: return "Wappo"; + case XYUK: return "Yuki"; + case XHAI: return "Haida"; + case XKUN: return "Kootenai"; + case XPSD: return "Plains Indian Sign Language"; + case XYUC: return "Yuchi"; + case XZUN: return "Zuni"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ALGIC: return "Algic"; + case _ALGONQUIAN: return "Algonquian"; + case _ARAPAHOAN: return "Arapahoan"; + case _ARAPAHOGROSVENTRE: return "ArapahoGrosVentre"; + case XARP: return "Arapaho"; + case XATS: return "Gros Ventre"; + case _CREEMONTAGNAIS: return "CreeMontagnais"; + case _CREE: return "Cree"; + case XCRP: return "Western Cree"; + case _EASTERNALGONQUIN: return "EasternAlgonquin"; + case _ABENAKIAN: return "Abenakian"; + case XAAQ: return "Eastern Abenaki"; + case XABE: return "Western Abenaki"; + case XMAC: return "Maliseet-Passamaquoddy"; + case _DELAWARAN: return "Delawaran"; + case XDEL: return "Unami Delaware"; + case XMIC: return "Micmac"; + case _OJIBWAYAN: return "Ojibwayan"; + case XOJB: return "Southern Ojibwa"; + case XPOT: return "Potawatami"; + case _SAUKFOXKICKAPOO: return "SaukFoxKickapoo"; + case XKIC: return "Kickapoo"; + case XSAC: return "Mesquakie"; + case XSJW: return "Shawnee"; + case XBLC: return "Blackfoot"; + case XCHY: return "Cheyenne"; + case XMEZ: return "Menominee"; + case _RITWAN: return "Ritwan"; + case XYUR: return "Yurok"; + case _CADDOAN: return "Caddoan"; + case _NORTHERNCADDOAN: return "NorthernCaddoan"; + case XARI: return "Arikara"; + case XPAW: return "Pawnee"; + case XWIC: return "Wichita"; + case _SOUTHERNCADDOAN: return "SouthernCaddoan"; + case XCAD: return "Caddo"; + case _CHIMAKUAN: return "Chimakuan"; + case XQUI: return "Quileute"; + case _ESKIMOALEUT: return "EskimoAleut"; + case _ALEUT: return "Aleut"; + case XALW: return "Aleut"; + case _ESKIMOAN: return "Eskimoan"; + case _INUITINUPIAQ: return "InuitInupiaq"; + case XESI: return "North Alaskan Inuktitut"; + case XESK: return "Northwest Alaska Inuktitut"; + case _SIRENIKSKIYUPIK: return "SirenikskiYupik"; + case XEMS: return "Pacific Yupik Gulf"; + case XESS: return "Central Siberian Yupik"; + case XESU: return "Central Alaskan Yupik"; + case _HOKAN: return "Hokan"; + case _COCHIMIYUMAN: return "CochimiYuman"; + case _YUMAN: return "Yuman"; + case _DELTACALIFORNIA: return "DeltaCalifornia"; + case _DIEGUENO: return "Diegueno"; + case XDIH: return "Kumeyaay"; + case XCOC: return "Cocopa"; + case _PAI: return "Pai"; + case XYUF: return "Havasupai"; + case _RIVER: return "River"; + case XMOV: return "Mohave"; + case XMRC: return "Maricopa"; + case XYUM: return "Quechan"; + case _PALAIHNIHAN: return "Palaihnihan"; + case XACH: return "Achumawi"; + case XATW: return "Atsugewi"; + case _POMOAN: return "Pomoan"; + case XKJU: return "Kashaya"; + case XPEF: return "Northeastern Pomo"; + case XPEO: return "Southeastern Pomo"; + case XPEQ: return "Southern Pomo"; + case XPOO: return "Central Pomo"; + case _SHASTA: return "Shasta"; + case XSHT: return "Shasta"; + case XKYH: return "Karok"; + case XWAS: return "Washoe"; + case _IROQUOIAN: return "Iroquoian"; + case _NORTHERNIROQUOIAN: return "NorthernIroquoian"; + case XCAY: return "Cayuga"; + case XMOH: return "Mohawk"; + case XONE: return "Oneida"; + case XONO: return "Onondaga"; + case XSEE: return "Seneca"; + case XTUS: return "Tuscarora"; + case XCER: return "Cherokee"; + case _KERESAN: return "Keresan"; + case XKEE: return "Rio Grande Keresan"; + case XKJQ: return "Acoma-Laguna"; + case _KIOWATANOAN: return "KiowaTanoan"; + case _TIWA: return "Tiwa"; + case XTAO: return "Northern Tiwa"; + case XTIX: return "Southern Tiwa"; + case XKIO: return "Kiowa"; + case XTEW: return "Tewa"; + case XTOW: return "Jemez"; + case _MUSKOGEAN: return "Muskogean"; + case _CENTRALMUSKOGEAN: return "CentralMuskogean"; + case XAKZ: return "Alabama"; + case XCKU: return "Koasati"; + case XMIK: return "Mikasuki"; + case _WESTERNMUSKOGEAN: return "WesternMuskogean"; + case XCCT: return "Choctaw"; + case XCIC: return "Chickasaw"; + case XCRK: return "Creek"; + case _NADENE: return "Nadene"; + case _ATHAPASKANEYAK: return "AthapaskanEyak"; + case _ATHAPASKAN: return "Athapaskan"; + case _APACHEAN: return "Apachean"; + case _EASTERNAPACHEAN: return "EasternApachean"; + case XAPJ: return "Jicarilla"; + case XAPL: return "Lipan"; + case _WESTERNAPACHEAN: return "WesternApachean"; + case XAPM: return "Mescalero-Chiricahua"; + case XAPW: return "Western Apache"; + case XNAV: return "Dine"; + case XAPK: return "Kiowa Apache"; + case _CENTRALALASKAYUKON: return "CentralAlaskaYukon"; + case _KOYUKONINGALIK: return "KoyukonIngalik"; + case XHOI: return "Holikachuk"; + case XING: return "Degexit'an"; + case XKOY: return "Koyukon"; + case _KUTCHINHAN: return "KutchinHan"; + case XHAA: return "Han"; + case XKUC: return "Kutchin"; + case _TANANATUTCHONE: return "TananaTutchone"; + case _TANANA: return "Tanana"; + case XTAA: return "Lower Tanana"; + case XTAU: return "Upper Tanana"; + case XTCB: return "Tanacross"; + case XKUU: return "Upper Kuskokwim"; + case _PACIFICCOASTATHAPASKAN: return "PacificCoastAthapaskan"; + case _CALIFORNIAATHAPASKAN: return "CaliforniaAthapaskan"; + case XHUP: return "Hupa"; + case XKTW: return "Cahto"; + case _OREGONATHAPASKAN: return "OregonAthapaskan"; + case XTOL: return "Tolowa"; + case XTUU: return "Tututni"; + case _SOUTHERNALASKA: return "SouthernAlaska"; + case XAHT: return "Ahtna"; + case XTFN: return "Tanaina"; + case XEYA: return "Eyak"; + case XTLI: return "Tlingit"; + case _PENUTIAN: return "Penutian"; + case _CHINOOKAN: return "Chinookan"; + case _UPPERCHINOOK: return "UpperChinook"; + case XWAC: return "Kiksht"; + case _COOSAN: return "Coosan"; + case XCOS: return "Hanis"; + case _MAIDUAN: return "Maiduan"; + case XMAI: return "Northwest Maidu"; + case XNMU: return "Northeast Maidu"; + case XNSZ: return "Nisenan"; + case _PLATEAUPENUTIAN: return "PlateauPenutian"; + case _SAHAPTIAN: return "Sahaptian"; + case XUMA: return "Umatilla"; + case XWAA: return "Walla Walla"; + case XWAR: return "Tenino"; + case XYAK: return "Yakima"; + case XKLA: return "Klamath-Modoc"; + case XNEZ: return "Nez Perce"; + case _TAKELMAN: return "Takelman"; + case _KALAPUYAN: return "Kalapuyan"; + case XKAL: return "Central Kalapuyan"; + case _TSIMSHIANIC: return "Tsimshianic"; + case XTSI: return "Coast Tsimshain"; + case _UTIAN: return "Utian"; + case _MIWOKAN: return "Miwokan"; + case _EASTERNMIWOK: return "EasternMiwok"; + case XCSM: return "Central Sierra Miwok"; + case XNSQ: return "Northern Sierra Miwok"; + case XPMW: return "Plains Miwok"; + case XSKD: return "Southern Sierra Miwok"; + case _WESTERNMIWOK: return "WesternMiwok"; + case XCSI: return "Coast Miwok"; + case XLMW: return "Lake Miwok"; + case _WINTUAN: return "Wintuan"; + case XWIT: return "Wintu-Nomlaki"; + case _YOKUTSAN: return "Yokutsan"; + case XENH: return "Kings River"; + case XGSH: return "Gashowu"; + case XPYL: return "Poso Creek"; + case XTKH: return "Tule-Kaweah"; + case _PIDGIN: return "Pidgin"; + case XCHH: return "Chinook Wawa"; + case _SALISHAN: return "Salishan"; + case _CENTRALSALISH: return "CentralSalish"; + case XCLM: return "Clallam"; + case XLUT: return "Lushootseed"; + case XSTR: return "Northern Straits"; + case _INTERIORSALISH: return "InteriorSalish"; + case XCOL: return "Columbian"; + case XCRD: return "Coeur D'alene"; + case XFLA: return "Kalispel"; + case XOKA: return "Okanagan"; + case _TSAMOSAN: return "Tsamosan"; + case XCEA: return "Lower Chehalis"; + case XCJH: return "Upper Chehalis"; + case XCOW: return "Cowlitz"; + case XQUN: return "Quinault"; + case _SIOUANCATAWBA: return "SiouanCatawba"; + case _SIOUAN: return "Siouan"; + case _MISSISSIPPIVALLEY: return "MississippiValley"; + case _CHIWEREWINNEBAGO: return "ChiwereWinnebago"; + case XIOW: return "Chiwere"; + case XWIN: return "Hocak"; + case _DAKOTAN: return "Dakotan"; + case XASB: return "Assiniboine"; + case XDHG: return "Dakota"; + case XLKT: return "Lakota"; + case XNKT: return "Nakota"; + case _DHEGIHA: return "Dhegiha"; + case XKAA: return "Kansa"; + case XOMA: return "Omaha-Ponca"; + case XOSA: return "Osage"; + case XQUA: return "Quapaw"; + case _MISSOURIRIVER: return "MissouriRiver"; + case XCRO: return "Crow"; + case XHID: return "Hidatsa"; + case XMHQ: return "Mandan"; + case _UTOAZTECAN: return "UtoAztecan"; + case _NUMIC: return "Numic"; + case _CENTRALNUMIC: return "CentralNumic"; + case XCOM: return "Comanche"; + case XPAR: return "Panamint"; + case XSHH: return "Shoshone"; + case _SOUTHERNNUMIC: return "SouthernNumic"; + case XKAW: return "Kawaiisu"; + case XUTE: return "Ute-Southern Paiute"; + case _WESTERNNUMIC: return "WesternNumic"; + case XMON: return "Mono"; + case XPAO: return "Northern Paiute-Bannock"; + case _TAKIC: return "Takic"; + case _CUPAN: return "Cupan"; + case XCHL: return "Cahuilla"; + case XCUP: return "Cupeno"; + case XLUI: return "Luiseno"; + case _SERRANOGABRIELINO: return "SerranoGabrielino"; + case XSER: return "Serrano"; + case _TARACAHITAN: return "Taracahitan"; + case _CAHITAN: return "Cahitan"; + case XYAQ: return "Yaqui"; + case _TEPIMAN: return "Tepiman"; + case XPAP: return "Papago-Pima"; + case XHOP: return "Hopi"; + case XTUB: return "Tubatululabal"; + case _WAKASHAN: return "Wakashan"; + case _NOOTKAN: return "Nootkan"; + case XMYH: return "Makah"; + case _YUKIAN: return "Yukian"; + case XWAO: return "Wappo"; + case XYUK: return "Yuki"; + case XHAI: return "Haida"; + case XKUN: return "Kootenai"; + case XPSD: return "Plains Indian Sign Language"; + case XYUC: return "Yuchi"; + case XZUN: return "Zuni"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java new file mode 100644 index 00000000000..c6ce02f59e2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3AmericanIndianAlaskaNativeLanguagesEnumFactory.java @@ -0,0 +1,1074 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3AmericanIndianAlaskaNativeLanguagesEnumFactory implements EnumFactory { + + public V3AmericanIndianAlaskaNativeLanguages fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Algic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ALGIC; + if ("_Algonquian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ALGONQUIAN; + if ("_Arapahoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ARAPAHOAN; + if ("_ArapahoGrosVentre".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ARAPAHOGROSVENTRE; + if ("x-ARP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XARP; + if ("x-ATS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XATS; + if ("_CreeMontagnais".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CREEMONTAGNAIS; + if ("_Cree".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CREE; + if ("x-CRP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRP; + if ("_EasternAlgonquin".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._EASTERNALGONQUIN; + if ("_Abenakian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ABENAKIAN; + if ("x-AAQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAAQ; + if ("x-ABE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XABE; + if ("x-MAC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMAC; + if ("_Delawaran".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DELAWARAN; + if ("x-DEL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XDEL; + if ("x-MIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMIC; + if ("_Ojibwayan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._OJIBWAYAN; + if ("x-OJB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOJB; + if ("x-POT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPOT; + if ("_SaukFoxKickapoo".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SAUKFOXKICKAPOO; + if ("x-KIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKIC; + if ("x-SAC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSAC; + if ("x-SJW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSJW; + if ("x-BLC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XBLC; + if ("x-CHY".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCHY; + if ("x-MEZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMEZ; + if ("_Ritwan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._RITWAN; + if ("x-YUR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUR; + if ("_Caddoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CADDOAN; + if ("_NorthernCaddoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NORTHERNCADDOAN; + if ("x-ARI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XARI; + if ("x-PAW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAW; + if ("x-WIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWIC; + if ("_SouthernCaddoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SOUTHERNCADDOAN; + if ("x-CAD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCAD; + if ("_Chimakuan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CHIMAKUAN; + if ("x-QUI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XQUI; + if ("_EskimoAleut".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ESKIMOALEUT; + if ("_Aleut".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ALEUT; + if ("x-ALW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XALW; + if ("_Eskimoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ESKIMOAN; + if ("_InuitInupiaq".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._INUITINUPIAQ; + if ("x-ESI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESI; + if ("x-ESK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESK; + if ("_SirenikskiYupik".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SIRENIKSKIYUPIK; + if ("x-EMS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XEMS; + if ("x-ESS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESS; + if ("x-ESU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XESU; + if ("_Hokan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._HOKAN; + if ("_CochimiYuman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._COCHIMIYUMAN; + if ("_Yuman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._YUMAN; + if ("_DeltaCalifornia".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DELTACALIFORNIA; + if ("_Diegueno".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DIEGUENO; + if ("x-DIH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XDIH; + if ("x-COC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOC; + if ("_Pai".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PAI; + if ("x-YUF".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUF; + if ("_River".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._RIVER; + if ("x-MOV".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMOV; + if ("x-MRC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMRC; + if ("x-YUM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUM; + if ("_Palaihnihan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PALAIHNIHAN; + if ("x-ACH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XACH; + if ("x-ATW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XATW; + if ("_Pomoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._POMOAN; + if ("x-KJU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKJU; + if ("x-PEF".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPEF; + if ("x-PEO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPEO; + if ("x-PEQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPEQ; + if ("x-POO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPOO; + if ("_Shasta".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SHASTA; + if ("x-SHT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSHT; + if ("x-KYH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKYH; + if ("x-WAS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAS; + if ("_Iroquoian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._IROQUOIAN; + if ("_NorthernIroquoian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NORTHERNIROQUOIAN; + if ("x-CAY".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCAY; + if ("x-MOH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMOH; + if ("x-ONE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XONE; + if ("x-ONO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XONO; + if ("x-SEE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSEE; + if ("x-TUS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTUS; + if ("x-CER".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCER; + if ("_Keresan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KERESAN; + if ("x-KEE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKEE; + if ("x-KJQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKJQ; + if ("_KiowaTanoan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KIOWATANOAN; + if ("_Tiwa".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TIWA; + if ("x-TAO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTAO; + if ("x-TIX".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTIX; + if ("x-KIO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKIO; + if ("x-TEW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTEW; + if ("x-TOW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTOW; + if ("_Muskogean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MUSKOGEAN; + if ("_CentralMuskogean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALMUSKOGEAN; + if ("x-AKZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAKZ; + if ("x-CKU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCKU; + if ("x-MIK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMIK; + if ("_WesternMuskogean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNMUSKOGEAN; + if ("x-CCT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCCT; + if ("x-CIC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCIC; + if ("x-CRK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRK; + if ("_Nadene".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NADENE; + if ("_AthapaskanEyak".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ATHAPASKANEYAK; + if ("_Athapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._ATHAPASKAN; + if ("_Apachean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._APACHEAN; + if ("_EasternApachean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._EASTERNAPACHEAN; + if ("x-APJ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPJ; + if ("x-APL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPL; + if ("_WesternApachean".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNAPACHEAN; + if ("x-APM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPM; + if ("x-APW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPW; + if ("x-NAV".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNAV; + if ("x-APK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAPK; + if ("_CentralAlaskaYukon".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALALASKAYUKON; + if ("_KoyukonIngalik".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KOYUKONINGALIK; + if ("x-HOI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHOI; + if ("x-ING".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XING; + if ("x-KOY".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKOY; + if ("_KutchinHan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KUTCHINHAN; + if ("x-HAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHAA; + if ("x-KUC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKUC; + if ("_TananaTutchone".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TANANATUTCHONE; + if ("_Tanana".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TANANA; + if ("x-TAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTAA; + if ("x-TAU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTAU; + if ("x-TCB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTCB; + if ("x-KUU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKUU; + if ("_PacificCoastAthapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PACIFICCOASTATHAPASKAN; + if ("_CaliforniaAthapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CALIFORNIAATHAPASKAN; + if ("x-HUP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHUP; + if ("x-KTW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKTW; + if ("_OregonAthapaskan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._OREGONATHAPASKAN; + if ("x-TOL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTOL; + if ("x-TUU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTUU; + if ("_SouthernAlaska".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SOUTHERNALASKA; + if ("x-AHT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XAHT; + if ("x-TFN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTFN; + if ("x-EYA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XEYA; + if ("x-TLI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTLI; + if ("_Penutian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PENUTIAN; + if ("_Chinookan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CHINOOKAN; + if ("_UpperChinook".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._UPPERCHINOOK; + if ("x-WAC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAC; + if ("_Coosan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._COOSAN; + if ("x-COS".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOS; + if ("_Maiduan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MAIDUAN; + if ("x-MAI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMAI; + if ("x-NMU".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNMU; + if ("x-NSZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNSZ; + if ("_PlateauPenutian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PLATEAUPENUTIAN; + if ("_Sahaptian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SAHAPTIAN; + if ("x-UMA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XUMA; + if ("x-WAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAA; + if ("x-WAR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAR; + if ("x-YAK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYAK; + if ("x-KLA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKLA; + if ("x-NEZ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNEZ; + if ("_Takelman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TAKELMAN; + if ("_Kalapuyan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._KALAPUYAN; + if ("x-KAL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKAL; + if ("_Tsimshianic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TSIMSHIANIC; + if ("x-TSI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTSI; + if ("_Utian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._UTIAN; + if ("_Miwokan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MIWOKAN; + if ("_EasternMiwok".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._EASTERNMIWOK; + if ("x-CSM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCSM; + if ("x-NSQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNSQ; + if ("x-PMW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPMW; + if ("x-SKD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSKD; + if ("_WesternMiwok".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNMIWOK; + if ("x-CSI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCSI; + if ("x-LMW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLMW; + if ("_Wintuan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WINTUAN; + if ("x-WIT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWIT; + if ("_Yokutsan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._YOKUTSAN; + if ("x-ENH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XENH; + if ("x-GSH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XGSH; + if ("x-PYL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPYL; + if ("x-TKH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTKH; + if ("_Pidgin".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._PIDGIN; + if ("x-CHH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCHH; + if ("_Salishan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SALISHAN; + if ("_CentralSalish".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALSALISH; + if ("x-CLM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCLM; + if ("x-LUT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLUT; + if ("x-STR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSTR; + if ("_InteriorSalish".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._INTERIORSALISH; + if ("x-COL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOL; + if ("x-CRD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRD; + if ("x-FLA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XFLA; + if ("x-OKA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOKA; + if ("_Tsamosan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TSAMOSAN; + if ("x-CEA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCEA; + if ("x-CJH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCJH; + if ("x-COW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOW; + if ("x-QUN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XQUN; + if ("_SiouanCatawba".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SIOUANCATAWBA; + if ("_Siouan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SIOUAN; + if ("_MississippiValley".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MISSISSIPPIVALLEY; + if ("_ChiwereWinnebago".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CHIWEREWINNEBAGO; + if ("x-IOW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XIOW; + if ("x-WIN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWIN; + if ("_Dakotan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DAKOTAN; + if ("x-ASB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XASB; + if ("x-DHG".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XDHG; + if ("x-LKT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLKT; + if ("x-NKT".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XNKT; + if ("_Dhegiha".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._DHEGIHA; + if ("x-KAA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKAA; + if ("x-OMA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOMA; + if ("x-OSA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XOSA; + if ("x-QUA".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XQUA; + if ("_MissouriRiver".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._MISSOURIRIVER; + if ("x-CRO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCRO; + if ("x-HID".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHID; + if ("x-MHQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMHQ; + if ("_UtoAztecan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._UTOAZTECAN; + if ("_Numic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NUMIC; + if ("_CentralNumic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CENTRALNUMIC; + if ("x-COM".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCOM; + if ("x-PAR".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAR; + if ("x-SHH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSHH; + if ("_SouthernNumic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SOUTHERNNUMIC; + if ("x-KAW".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKAW; + if ("x-UTE".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XUTE; + if ("_WesternNumic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WESTERNNUMIC; + if ("x-MON".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMON; + if ("x-PAO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAO; + if ("_Takic".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TAKIC; + if ("_Cupan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CUPAN; + if ("x-CHL".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCHL; + if ("x-CUP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XCUP; + if ("x-LUI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XLUI; + if ("_SerranoGabrielino".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._SERRANOGABRIELINO; + if ("x-SER".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XSER; + if ("_Taracahitan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TARACAHITAN; + if ("_Cahitan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._CAHITAN; + if ("x-YAQ".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYAQ; + if ("_Tepiman".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._TEPIMAN; + if ("x-PAP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPAP; + if ("x-HOP".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHOP; + if ("x-TUB".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XTUB; + if ("_Wakashan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._WAKASHAN; + if ("_Nootkan".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._NOOTKAN; + if ("x-MYH".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XMYH; + if ("_Yukian".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages._YUKIAN; + if ("x-WAO".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XWAO; + if ("x-YUK".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUK; + if ("x-HAI".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XHAI; + if ("x-KUN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XKUN; + if ("x-PSD".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XPSD; + if ("x-YUC".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XYUC; + if ("x-ZUN".equals(codeString)) + return V3AmericanIndianAlaskaNativeLanguages.XZUN; + throw new IllegalArgumentException("Unknown V3AmericanIndianAlaskaNativeLanguages code '"+codeString+"'"); + } + + public String toCode(V3AmericanIndianAlaskaNativeLanguages code) { + if (code == V3AmericanIndianAlaskaNativeLanguages._ALGIC) + return "_Algic"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ALGONQUIAN) + return "_Algonquian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ARAPAHOAN) + return "_Arapahoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ARAPAHOGROSVENTRE) + return "_ArapahoGrosVentre"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XARP) + return "x-ARP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XATS) + return "x-ATS"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CREEMONTAGNAIS) + return "_CreeMontagnais"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CREE) + return "_Cree"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRP) + return "x-CRP"; + if (code == V3AmericanIndianAlaskaNativeLanguages._EASTERNALGONQUIN) + return "_EasternAlgonquin"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ABENAKIAN) + return "_Abenakian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAAQ) + return "x-AAQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XABE) + return "x-ABE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMAC) + return "x-MAC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DELAWARAN) + return "_Delawaran"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XDEL) + return "x-DEL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMIC) + return "x-MIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._OJIBWAYAN) + return "_Ojibwayan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOJB) + return "x-OJB"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPOT) + return "x-POT"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SAUKFOXKICKAPOO) + return "_SaukFoxKickapoo"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKIC) + return "x-KIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSAC) + return "x-SAC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSJW) + return "x-SJW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XBLC) + return "x-BLC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCHY) + return "x-CHY"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMEZ) + return "x-MEZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._RITWAN) + return "_Ritwan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUR) + return "x-YUR"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CADDOAN) + return "_Caddoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NORTHERNCADDOAN) + return "_NorthernCaddoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XARI) + return "x-ARI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAW) + return "x-PAW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWIC) + return "x-WIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SOUTHERNCADDOAN) + return "_SouthernCaddoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCAD) + return "x-CAD"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CHIMAKUAN) + return "_Chimakuan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XQUI) + return "x-QUI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ESKIMOALEUT) + return "_EskimoAleut"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ALEUT) + return "_Aleut"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XALW) + return "x-ALW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ESKIMOAN) + return "_Eskimoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._INUITINUPIAQ) + return "_InuitInupiaq"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESI) + return "x-ESI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESK) + return "x-ESK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SIRENIKSKIYUPIK) + return "_SirenikskiYupik"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XEMS) + return "x-EMS"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESS) + return "x-ESS"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XESU) + return "x-ESU"; + if (code == V3AmericanIndianAlaskaNativeLanguages._HOKAN) + return "_Hokan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._COCHIMIYUMAN) + return "_CochimiYuman"; + if (code == V3AmericanIndianAlaskaNativeLanguages._YUMAN) + return "_Yuman"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DELTACALIFORNIA) + return "_DeltaCalifornia"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DIEGUENO) + return "_Diegueno"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XDIH) + return "x-DIH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOC) + return "x-COC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PAI) + return "_Pai"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUF) + return "x-YUF"; + if (code == V3AmericanIndianAlaskaNativeLanguages._RIVER) + return "_River"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMOV) + return "x-MOV"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMRC) + return "x-MRC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUM) + return "x-YUM"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PALAIHNIHAN) + return "_Palaihnihan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XACH) + return "x-ACH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XATW) + return "x-ATW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._POMOAN) + return "_Pomoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKJU) + return "x-KJU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPEF) + return "x-PEF"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPEO) + return "x-PEO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPEQ) + return "x-PEQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPOO) + return "x-POO"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SHASTA) + return "_Shasta"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSHT) + return "x-SHT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKYH) + return "x-KYH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAS) + return "x-WAS"; + if (code == V3AmericanIndianAlaskaNativeLanguages._IROQUOIAN) + return "_Iroquoian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NORTHERNIROQUOIAN) + return "_NorthernIroquoian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCAY) + return "x-CAY"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMOH) + return "x-MOH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XONE) + return "x-ONE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XONO) + return "x-ONO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSEE) + return "x-SEE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTUS) + return "x-TUS"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCER) + return "x-CER"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KERESAN) + return "_Keresan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKEE) + return "x-KEE"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKJQ) + return "x-KJQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KIOWATANOAN) + return "_KiowaTanoan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TIWA) + return "_Tiwa"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTAO) + return "x-TAO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTIX) + return "x-TIX"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKIO) + return "x-KIO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTEW) + return "x-TEW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTOW) + return "x-TOW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MUSKOGEAN) + return "_Muskogean"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALMUSKOGEAN) + return "_CentralMuskogean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAKZ) + return "x-AKZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCKU) + return "x-CKU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMIK) + return "x-MIK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNMUSKOGEAN) + return "_WesternMuskogean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCCT) + return "x-CCT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCIC) + return "x-CIC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRK) + return "x-CRK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NADENE) + return "_Nadene"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ATHAPASKANEYAK) + return "_AthapaskanEyak"; + if (code == V3AmericanIndianAlaskaNativeLanguages._ATHAPASKAN) + return "_Athapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._APACHEAN) + return "_Apachean"; + if (code == V3AmericanIndianAlaskaNativeLanguages._EASTERNAPACHEAN) + return "_EasternApachean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPJ) + return "x-APJ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPL) + return "x-APL"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNAPACHEAN) + return "_WesternApachean"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPM) + return "x-APM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPW) + return "x-APW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNAV) + return "x-NAV"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAPK) + return "x-APK"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALALASKAYUKON) + return "_CentralAlaskaYukon"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KOYUKONINGALIK) + return "_KoyukonIngalik"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHOI) + return "x-HOI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XING) + return "x-ING"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKOY) + return "x-KOY"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KUTCHINHAN) + return "_KutchinHan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHAA) + return "x-HAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKUC) + return "x-KUC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TANANATUTCHONE) + return "_TananaTutchone"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TANANA) + return "_Tanana"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTAA) + return "x-TAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTAU) + return "x-TAU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTCB) + return "x-TCB"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKUU) + return "x-KUU"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PACIFICCOASTATHAPASKAN) + return "_PacificCoastAthapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CALIFORNIAATHAPASKAN) + return "_CaliforniaAthapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHUP) + return "x-HUP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKTW) + return "x-KTW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._OREGONATHAPASKAN) + return "_OregonAthapaskan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTOL) + return "x-TOL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTUU) + return "x-TUU"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SOUTHERNALASKA) + return "_SouthernAlaska"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XAHT) + return "x-AHT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTFN) + return "x-TFN"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XEYA) + return "x-EYA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTLI) + return "x-TLI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PENUTIAN) + return "_Penutian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CHINOOKAN) + return "_Chinookan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._UPPERCHINOOK) + return "_UpperChinook"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAC) + return "x-WAC"; + if (code == V3AmericanIndianAlaskaNativeLanguages._COOSAN) + return "_Coosan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOS) + return "x-COS"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MAIDUAN) + return "_Maiduan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMAI) + return "x-MAI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNMU) + return "x-NMU"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNSZ) + return "x-NSZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PLATEAUPENUTIAN) + return "_PlateauPenutian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SAHAPTIAN) + return "_Sahaptian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XUMA) + return "x-UMA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAA) + return "x-WAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAR) + return "x-WAR"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYAK) + return "x-YAK"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKLA) + return "x-KLA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNEZ) + return "x-NEZ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TAKELMAN) + return "_Takelman"; + if (code == V3AmericanIndianAlaskaNativeLanguages._KALAPUYAN) + return "_Kalapuyan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKAL) + return "x-KAL"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TSIMSHIANIC) + return "_Tsimshianic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTSI) + return "x-TSI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._UTIAN) + return "_Utian"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MIWOKAN) + return "_Miwokan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._EASTERNMIWOK) + return "_EasternMiwok"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCSM) + return "x-CSM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNSQ) + return "x-NSQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPMW) + return "x-PMW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSKD) + return "x-SKD"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNMIWOK) + return "_WesternMiwok"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCSI) + return "x-CSI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLMW) + return "x-LMW"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WINTUAN) + return "_Wintuan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWIT) + return "x-WIT"; + if (code == V3AmericanIndianAlaskaNativeLanguages._YOKUTSAN) + return "_Yokutsan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XENH) + return "x-ENH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XGSH) + return "x-GSH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPYL) + return "x-PYL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTKH) + return "x-TKH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._PIDGIN) + return "_Pidgin"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCHH) + return "x-CHH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SALISHAN) + return "_Salishan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALSALISH) + return "_CentralSalish"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCLM) + return "x-CLM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLUT) + return "x-LUT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSTR) + return "x-STR"; + if (code == V3AmericanIndianAlaskaNativeLanguages._INTERIORSALISH) + return "_InteriorSalish"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOL) + return "x-COL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRD) + return "x-CRD"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XFLA) + return "x-FLA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOKA) + return "x-OKA"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TSAMOSAN) + return "_Tsamosan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCEA) + return "x-CEA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCJH) + return "x-CJH"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOW) + return "x-COW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XQUN) + return "x-QUN"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SIOUANCATAWBA) + return "_SiouanCatawba"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SIOUAN) + return "_Siouan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MISSISSIPPIVALLEY) + return "_MississippiValley"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CHIWEREWINNEBAGO) + return "_ChiwereWinnebago"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XIOW) + return "x-IOW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWIN) + return "x-WIN"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DAKOTAN) + return "_Dakotan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XASB) + return "x-ASB"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XDHG) + return "x-DHG"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLKT) + return "x-LKT"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XNKT) + return "x-NKT"; + if (code == V3AmericanIndianAlaskaNativeLanguages._DHEGIHA) + return "_Dhegiha"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKAA) + return "x-KAA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOMA) + return "x-OMA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XOSA) + return "x-OSA"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XQUA) + return "x-QUA"; + if (code == V3AmericanIndianAlaskaNativeLanguages._MISSOURIRIVER) + return "_MissouriRiver"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCRO) + return "x-CRO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHID) + return "x-HID"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMHQ) + return "x-MHQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._UTOAZTECAN) + return "_UtoAztecan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NUMIC) + return "_Numic"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CENTRALNUMIC) + return "_CentralNumic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCOM) + return "x-COM"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAR) + return "x-PAR"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSHH) + return "x-SHH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SOUTHERNNUMIC) + return "_SouthernNumic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKAW) + return "x-KAW"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XUTE) + return "x-UTE"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WESTERNNUMIC) + return "_WesternNumic"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMON) + return "x-MON"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAO) + return "x-PAO"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TAKIC) + return "_Takic"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CUPAN) + return "_Cupan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCHL) + return "x-CHL"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XCUP) + return "x-CUP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XLUI) + return "x-LUI"; + if (code == V3AmericanIndianAlaskaNativeLanguages._SERRANOGABRIELINO) + return "_SerranoGabrielino"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XSER) + return "x-SER"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TARACAHITAN) + return "_Taracahitan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._CAHITAN) + return "_Cahitan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYAQ) + return "x-YAQ"; + if (code == V3AmericanIndianAlaskaNativeLanguages._TEPIMAN) + return "_Tepiman"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPAP) + return "x-PAP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHOP) + return "x-HOP"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XTUB) + return "x-TUB"; + if (code == V3AmericanIndianAlaskaNativeLanguages._WAKASHAN) + return "_Wakashan"; + if (code == V3AmericanIndianAlaskaNativeLanguages._NOOTKAN) + return "_Nootkan"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XMYH) + return "x-MYH"; + if (code == V3AmericanIndianAlaskaNativeLanguages._YUKIAN) + return "_Yukian"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XWAO) + return "x-WAO"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUK) + return "x-YUK"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XHAI) + return "x-HAI"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XKUN) + return "x-KUN"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XPSD) + return "x-PSD"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XYUC) + return "x-YUC"; + if (code == V3AmericanIndianAlaskaNativeLanguages.XZUN) + return "x-ZUN"; + return "?"; + } + + public String toSystem(V3AmericanIndianAlaskaNativeLanguages code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Calendar.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Calendar.java new file mode 100644 index 00000000000..56ef0671622 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Calendar.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Calendar { + + /** + * The Gregorian calendar is the calendar in effect in most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar. + */ + GREG, + /** + * added to help the parsers + */ + NULL; + public static V3Calendar fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return GREG; + throw new FHIRException("Unknown V3Calendar code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GREG: return "GREG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Calendar"; + } + public String getDefinition() { + switch (this) { + case GREG: return "The Gregorian calendar is the calendar in effect in most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GREG: return "Gregorian"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarCycle.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarCycle.java new file mode 100644 index 00000000000..abe92cdc509 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarCycle.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CalendarCycle { + + /** + * CalendarCycleOneLetter + */ + _CALENDARCYCLEONELETTER, + /** + * week (continuous) + */ + CW, + /** + * year + */ + CY, + /** + * day of the month + */ + D, + /** + * day of the week (begins with Monday) + */ + DW, + /** + * hour of the day + */ + H, + /** + * month of the year + */ + M, + /** + * minute of the hour + */ + N, + /** + * second of the minute + */ + S, + /** + * CalendarCycleTwoLetter + */ + _CALENDARCYCLETWOLETTER, + /** + * day (continuous) + */ + CD, + /** + * hour (continuous) + */ + CH, + /** + * month (continuous) + */ + CM, + /** + * minute (continuous) + */ + CN, + /** + * second (continuous) + */ + CS, + /** + * day of the year + */ + DY, + /** + * week of the year + */ + WY, + /** + * The week with the month's first Thursday in it (analagous to the ISO 8601 definition for week of the year). + */ + WM, + /** + * added to help the parsers + */ + NULL; + public static V3CalendarCycle fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_CalendarCycleOneLetter".equals(codeString)) + return _CALENDARCYCLEONELETTER; + if ("CW".equals(codeString)) + return CW; + if ("CY".equals(codeString)) + return CY; + if ("D".equals(codeString)) + return D; + if ("DW".equals(codeString)) + return DW; + if ("H".equals(codeString)) + return H; + if ("M".equals(codeString)) + return M; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("_CalendarCycleTwoLetter".equals(codeString)) + return _CALENDARCYCLETWOLETTER; + if ("CD".equals(codeString)) + return CD; + if ("CH".equals(codeString)) + return CH; + if ("CM".equals(codeString)) + return CM; + if ("CN".equals(codeString)) + return CN; + if ("CS".equals(codeString)) + return CS; + if ("DY".equals(codeString)) + return DY; + if ("WY".equals(codeString)) + return WY; + if ("WM".equals(codeString)) + return WM; + throw new FHIRException("Unknown V3CalendarCycle code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CALENDARCYCLEONELETTER: return "_CalendarCycleOneLetter"; + case CW: return "CW"; + case CY: return "CY"; + case D: return "D"; + case DW: return "DW"; + case H: return "H"; + case M: return "M"; + case N: return "N"; + case S: return "S"; + case _CALENDARCYCLETWOLETTER: return "_CalendarCycleTwoLetter"; + case CD: return "CD"; + case CH: return "CH"; + case CM: return "CM"; + case CN: return "CN"; + case CS: return "CS"; + case DY: return "DY"; + case WY: return "WY"; + case WM: return "WM"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CalendarCycle"; + } + public String getDefinition() { + switch (this) { + case _CALENDARCYCLEONELETTER: return "CalendarCycleOneLetter"; + case CW: return "week (continuous)"; + case CY: return "year"; + case D: return "day of the month"; + case DW: return "day of the week (begins with Monday)"; + case H: return "hour of the day"; + case M: return "month of the year"; + case N: return "minute of the hour"; + case S: return "second of the minute"; + case _CALENDARCYCLETWOLETTER: return "CalendarCycleTwoLetter"; + case CD: return "day (continuous)"; + case CH: return "hour (continuous)"; + case CM: return "month (continuous)"; + case CN: return "minute (continuous)"; + case CS: return "second (continuous)"; + case DY: return "day of the year"; + case WY: return "week of the year"; + case WM: return "The week with the month's first Thursday in it (analagous to the ISO 8601 definition for week of the year)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CALENDARCYCLEONELETTER: return "CalendarCycleOneLetter"; + case CW: return "week (continuous)"; + case CY: return "year"; + case D: return "day of the month"; + case DW: return "day of the week (begins with Monday)"; + case H: return "hour of the day"; + case M: return "month of the year"; + case N: return "minute of the hour"; + case S: return "second of the minute"; + case _CALENDARCYCLETWOLETTER: return "CalendarCycleTwoLetter"; + case CD: return "day (continuous)"; + case CH: return "hour (continuous)"; + case CM: return "month (continuous)"; + case CN: return "minute (continuous)"; + case CS: return "second (continuous)"; + case DY: return "day of the year"; + case WY: return "week of the year"; + case WM: return "week of the month"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarCycleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarCycleEnumFactory.java new file mode 100644 index 00000000000..52fe69eb8e7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarCycleEnumFactory.java @@ -0,0 +1,126 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CalendarCycleEnumFactory implements EnumFactory { + + public V3CalendarCycle fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_CalendarCycleOneLetter".equals(codeString)) + return V3CalendarCycle._CALENDARCYCLEONELETTER; + if ("CW".equals(codeString)) + return V3CalendarCycle.CW; + if ("CY".equals(codeString)) + return V3CalendarCycle.CY; + if ("D".equals(codeString)) + return V3CalendarCycle.D; + if ("DW".equals(codeString)) + return V3CalendarCycle.DW; + if ("H".equals(codeString)) + return V3CalendarCycle.H; + if ("M".equals(codeString)) + return V3CalendarCycle.M; + if ("N".equals(codeString)) + return V3CalendarCycle.N; + if ("S".equals(codeString)) + return V3CalendarCycle.S; + if ("_CalendarCycleTwoLetter".equals(codeString)) + return V3CalendarCycle._CALENDARCYCLETWOLETTER; + if ("CD".equals(codeString)) + return V3CalendarCycle.CD; + if ("CH".equals(codeString)) + return V3CalendarCycle.CH; + if ("CM".equals(codeString)) + return V3CalendarCycle.CM; + if ("CN".equals(codeString)) + return V3CalendarCycle.CN; + if ("CS".equals(codeString)) + return V3CalendarCycle.CS; + if ("DY".equals(codeString)) + return V3CalendarCycle.DY; + if ("WY".equals(codeString)) + return V3CalendarCycle.WY; + if ("WM".equals(codeString)) + return V3CalendarCycle.WM; + throw new IllegalArgumentException("Unknown V3CalendarCycle code '"+codeString+"'"); + } + + public String toCode(V3CalendarCycle code) { + if (code == V3CalendarCycle._CALENDARCYCLEONELETTER) + return "_CalendarCycleOneLetter"; + if (code == V3CalendarCycle.CW) + return "CW"; + if (code == V3CalendarCycle.CY) + return "CY"; + if (code == V3CalendarCycle.D) + return "D"; + if (code == V3CalendarCycle.DW) + return "DW"; + if (code == V3CalendarCycle.H) + return "H"; + if (code == V3CalendarCycle.M) + return "M"; + if (code == V3CalendarCycle.N) + return "N"; + if (code == V3CalendarCycle.S) + return "S"; + if (code == V3CalendarCycle._CALENDARCYCLETWOLETTER) + return "_CalendarCycleTwoLetter"; + if (code == V3CalendarCycle.CD) + return "CD"; + if (code == V3CalendarCycle.CH) + return "CH"; + if (code == V3CalendarCycle.CM) + return "CM"; + if (code == V3CalendarCycle.CN) + return "CN"; + if (code == V3CalendarCycle.CS) + return "CS"; + if (code == V3CalendarCycle.DY) + return "DY"; + if (code == V3CalendarCycle.WY) + return "WY"; + if (code == V3CalendarCycle.WM) + return "WM"; + return "?"; + } + + public String toSystem(V3CalendarCycle code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarEnumFactory.java new file mode 100644 index 00000000000..e074dca7f67 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CalendarEnumFactory implements EnumFactory { + + public V3Calendar fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return V3Calendar.GREG; + throw new IllegalArgumentException("Unknown V3Calendar code '"+codeString+"'"); + } + + public String toCode(V3Calendar code) { + if (code == V3Calendar.GREG) + return "GREG"; + return "?"; + } + + public String toSystem(V3Calendar code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarType.java new file mode 100644 index 00000000000..8e5462bc988 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarType.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CalendarType { + + /** + * The Gregorian calendar is in effect in the most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar. + */ + GREG, + /** + * added to help the parsers + */ + NULL; + public static V3CalendarType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return GREG; + throw new FHIRException("Unknown V3CalendarType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GREG: return "GREG"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CalendarType"; + } + public String getDefinition() { + switch (this) { + case GREG: return "The Gregorian calendar is in effect in the most countries of Christian influence since approximately 1582. This calendar superceded the Julian calendar."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GREG: return "Gregorian"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarTypeEnumFactory.java new file mode 100644 index 00000000000..235ef026895 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CalendarTypeEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CalendarTypeEnumFactory implements EnumFactory { + + public V3CalendarType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GREG".equals(codeString)) + return V3CalendarType.GREG; + throw new IllegalArgumentException("Unknown V3CalendarType code '"+codeString+"'"); + } + + public String toCode(V3CalendarType code) { + if (code == V3CalendarType.GREG) + return "GREG"; + return "?"; + } + + public String toSystem(V3CalendarType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Charset.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Charset.java new file mode 100644 index 00000000000..a08f7822bf2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Charset.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Charset { + + /** + * HL7 is indifferent to the use of this Charset. + */ + EBCDIC, + /** + * Deprecated for HL7 use. + */ + ISO10646UCS2, + /** + * Deprecated for HL7 use. + */ + ISO10646UCS4, + /** + * HL7 is indifferent to the use of this Charset. + */ + ISO88591, + /** + * HL7 is indifferent to the use of this Charset. + */ + ISO88592, + /** + * HL7 is indifferent to the use of this Charset. + */ + ISO88595, + /** + * HL7 is indifferent to the use of this Charset. + */ + JIS2022JP, + /** + * Required for HL7 use. + */ + USASCII, + /** + * HL7 is indifferent to the use of this Charset. + */ + UTF7, + /** + * Required for Unicode support. + */ + UTF8, + /** + * added to help the parsers + */ + NULL; + public static V3Charset fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EBCDIC".equals(codeString)) + return EBCDIC; + if ("ISO-10646-UCS-2".equals(codeString)) + return ISO10646UCS2; + if ("ISO-10646-UCS-4".equals(codeString)) + return ISO10646UCS4; + if ("ISO-8859-1".equals(codeString)) + return ISO88591; + if ("ISO-8859-2".equals(codeString)) + return ISO88592; + if ("ISO-8859-5".equals(codeString)) + return ISO88595; + if ("JIS-2022-JP".equals(codeString)) + return JIS2022JP; + if ("US-ASCII".equals(codeString)) + return USASCII; + if ("UTF-7".equals(codeString)) + return UTF7; + if ("UTF-8".equals(codeString)) + return UTF8; + throw new FHIRException("Unknown V3Charset code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EBCDIC: return "EBCDIC"; + case ISO10646UCS2: return "ISO-10646-UCS-2"; + case ISO10646UCS4: return "ISO-10646-UCS-4"; + case ISO88591: return "ISO-8859-1"; + case ISO88592: return "ISO-8859-2"; + case ISO88595: return "ISO-8859-5"; + case JIS2022JP: return "JIS-2022-JP"; + case USASCII: return "US-ASCII"; + case UTF7: return "UTF-7"; + case UTF8: return "UTF-8"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Charset"; + } + public String getDefinition() { + switch (this) { + case EBCDIC: return "HL7 is indifferent to the use of this Charset."; + case ISO10646UCS2: return "Deprecated for HL7 use."; + case ISO10646UCS4: return "Deprecated for HL7 use."; + case ISO88591: return "HL7 is indifferent to the use of this Charset."; + case ISO88592: return "HL7 is indifferent to the use of this Charset."; + case ISO88595: return "HL7 is indifferent to the use of this Charset."; + case JIS2022JP: return "HL7 is indifferent to the use of this Charset."; + case USASCII: return "Required for HL7 use."; + case UTF7: return "HL7 is indifferent to the use of this Charset."; + case UTF8: return "Required for Unicode support."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EBCDIC: return "EBCDIC"; + case ISO10646UCS2: return "ISO-10646-UCS-2"; + case ISO10646UCS4: return "ISO-10646-UCS-4"; + case ISO88591: return "ISO-8859-1"; + case ISO88592: return "ISO-8859-2"; + case ISO88595: return "ISO-8859-5"; + case JIS2022JP: return "JIS-2022-JP"; + case USASCII: return "US-ASCII"; + case UTF7: return "UTF-7"; + case UTF8: return "UTF-8"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CharsetEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CharsetEnumFactory.java new file mode 100644 index 00000000000..b52a0e55804 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CharsetEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CharsetEnumFactory implements EnumFactory { + + public V3Charset fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EBCDIC".equals(codeString)) + return V3Charset.EBCDIC; + if ("ISO-10646-UCS-2".equals(codeString)) + return V3Charset.ISO10646UCS2; + if ("ISO-10646-UCS-4".equals(codeString)) + return V3Charset.ISO10646UCS4; + if ("ISO-8859-1".equals(codeString)) + return V3Charset.ISO88591; + if ("ISO-8859-2".equals(codeString)) + return V3Charset.ISO88592; + if ("ISO-8859-5".equals(codeString)) + return V3Charset.ISO88595; + if ("JIS-2022-JP".equals(codeString)) + return V3Charset.JIS2022JP; + if ("US-ASCII".equals(codeString)) + return V3Charset.USASCII; + if ("UTF-7".equals(codeString)) + return V3Charset.UTF7; + if ("UTF-8".equals(codeString)) + return V3Charset.UTF8; + throw new IllegalArgumentException("Unknown V3Charset code '"+codeString+"'"); + } + + public String toCode(V3Charset code) { + if (code == V3Charset.EBCDIC) + return "EBCDIC"; + if (code == V3Charset.ISO10646UCS2) + return "ISO-10646-UCS-2"; + if (code == V3Charset.ISO10646UCS4) + return "ISO-10646-UCS-4"; + if (code == V3Charset.ISO88591) + return "ISO-8859-1"; + if (code == V3Charset.ISO88592) + return "ISO-8859-2"; + if (code == V3Charset.ISO88595) + return "ISO-8859-5"; + if (code == V3Charset.JIS2022JP) + return "JIS-2022-JP"; + if (code == V3Charset.USASCII) + return "US-ASCII"; + if (code == V3Charset.UTF7) + return "UTF-7"; + if (code == V3Charset.UTF8) + return "UTF-8"; + return "?"; + } + + public String toSystem(V3Charset code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CodingRationale.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CodingRationale.java new file mode 100644 index 00000000000..3025cb4cd9a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CodingRationale.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CodingRationale { + + /** + * Description: Originally produced code. + */ + O, + /** + * Originally produced code, required by the specification describing the use of the coded concept. + */ + OR, + /** + * Description: Post-coded from free text source + */ + P, + /** + * Post-coded from free text source, required by the specification describing the use of the coded concept. + */ + PR, + /** + * Description: Required standard code for HL7. + */ + R, + /** + * HL7 Specified or Mandated + */ + HL7, + /** + * Both HL7 mandated and the original code (precoordination) + */ + SH, + /** + * Source (or original) code + */ + SRC, + /** + * added to help the parsers + */ + NULL; + public static V3CodingRationale fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("O".equals(codeString)) + return O; + if ("OR".equals(codeString)) + return OR; + if ("P".equals(codeString)) + return P; + if ("PR".equals(codeString)) + return PR; + if ("R".equals(codeString)) + return R; + if ("HL7".equals(codeString)) + return HL7; + if ("SH".equals(codeString)) + return SH; + if ("SRC".equals(codeString)) + return SRC; + throw new FHIRException("Unknown V3CodingRationale code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case O: return "O"; + case OR: return "OR"; + case P: return "P"; + case PR: return "PR"; + case R: return "R"; + case HL7: return "HL7"; + case SH: return "SH"; + case SRC: return "SRC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CodingRationale"; + } + public String getDefinition() { + switch (this) { + case O: return "Description: Originally produced code."; + case OR: return "Originally produced code, required by the specification describing the use of the coded concept."; + case P: return "Description: Post-coded from free text source"; + case PR: return "Post-coded from free text source, required by the specification describing the use of the coded concept."; + case R: return "Description: Required standard code for HL7."; + case HL7: return "HL7 Specified or Mandated"; + case SH: return "Both HL7 mandated and the original code (precoordination)"; + case SRC: return "Source (or original) code"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case O: return "originally produced code"; + case OR: return "original and required"; + case P: return "post-coded"; + case PR: return "post-coded and required"; + case R: return "required"; + case HL7: return "HL7 Specified or Mandated"; + case SH: return "Both HL7 mandated and the original code"; + case SRC: return "Source (or original) code"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CodingRationaleEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CodingRationaleEnumFactory.java new file mode 100644 index 00000000000..f5dd87efe65 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CodingRationaleEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CodingRationaleEnumFactory implements EnumFactory { + + public V3CodingRationale fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("O".equals(codeString)) + return V3CodingRationale.O; + if ("OR".equals(codeString)) + return V3CodingRationale.OR; + if ("P".equals(codeString)) + return V3CodingRationale.P; + if ("PR".equals(codeString)) + return V3CodingRationale.PR; + if ("R".equals(codeString)) + return V3CodingRationale.R; + if ("HL7".equals(codeString)) + return V3CodingRationale.HL7; + if ("SH".equals(codeString)) + return V3CodingRationale.SH; + if ("SRC".equals(codeString)) + return V3CodingRationale.SRC; + throw new IllegalArgumentException("Unknown V3CodingRationale code '"+codeString+"'"); + } + + public String toCode(V3CodingRationale code) { + if (code == V3CodingRationale.O) + return "O"; + if (code == V3CodingRationale.OR) + return "OR"; + if (code == V3CodingRationale.P) + return "P"; + if (code == V3CodingRationale.PR) + return "PR"; + if (code == V3CodingRationale.R) + return "R"; + if (code == V3CodingRationale.HL7) + return "HL7"; + if (code == V3CodingRationale.SH) + return "SH"; + if (code == V3CodingRationale.SRC) + return "SRC"; + return "?"; + } + + public String toSystem(V3CodingRationale code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CommunicationFunctionType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CommunicationFunctionType.java new file mode 100644 index 00000000000..30798d94b93 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CommunicationFunctionType.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CommunicationFunctionType { + + /** + * The entity is the receiver of the transmission. + */ + RCV, + /** + * The entity is the one to which the response or reply to the transmission should be sent. + */ + RSP, + /** + * The entity is the sender of the transmission. + */ + SND, + /** + * added to help the parsers + */ + NULL; + public static V3CommunicationFunctionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("RCV".equals(codeString)) + return RCV; + if ("RSP".equals(codeString)) + return RSP; + if ("SND".equals(codeString)) + return SND; + throw new FHIRException("Unknown V3CommunicationFunctionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RCV: return "RCV"; + case RSP: return "RSP"; + case SND: return "SND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CommunicationFunctionType"; + } + public String getDefinition() { + switch (this) { + case RCV: return "The entity is the receiver of the transmission."; + case RSP: return "The entity is the one to which the response or reply to the transmission should be sent."; + case SND: return "The entity is the sender of the transmission."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RCV: return "receiver"; + case RSP: return "respond to"; + case SND: return "sender"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CommunicationFunctionTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CommunicationFunctionTypeEnumFactory.java new file mode 100644 index 00000000000..367cb957480 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CommunicationFunctionTypeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CommunicationFunctionTypeEnumFactory implements EnumFactory { + + public V3CommunicationFunctionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("RCV".equals(codeString)) + return V3CommunicationFunctionType.RCV; + if ("RSP".equals(codeString)) + return V3CommunicationFunctionType.RSP; + if ("SND".equals(codeString)) + return V3CommunicationFunctionType.SND; + throw new IllegalArgumentException("Unknown V3CommunicationFunctionType code '"+codeString+"'"); + } + + public String toCode(V3CommunicationFunctionType code) { + if (code == V3CommunicationFunctionType.RCV) + return "RCV"; + if (code == V3CommunicationFunctionType.RSP) + return "RSP"; + if (code == V3CommunicationFunctionType.SND) + return "SND"; + return "?"; + } + + public String toSystem(V3CommunicationFunctionType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CompressionAlgorithm.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CompressionAlgorithm.java new file mode 100644 index 00000000000..6783d5c3fdf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CompressionAlgorithm.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3CompressionAlgorithm { + + /** + * bzip-2 compression format. See [http://www.bzip.org/] for more information. + */ + BZ, + /** + * The deflate compressed data format as specified in RFC 1951 [http://www.ietf.org/rfc/rfc1951.txt]. + */ + DF, + /** + * A compressed data format that is compatible with the widely used GZIP utility as specified in RFC 1952 [http://www.ietf.org/rfc/rfc1952.txt] (uses the deflate algorithm). + */ + GZ, + /** + * Original UNIX compress algorithm and file format using the LZC algorithm (a variant of LZW). Patent encumbered and less efficient than deflate. + */ + Z, + /** + * 7z compression file format. See [http://www.7-zip.org/7z.html] for more information. + */ + Z7, + /** + * A compressed data format that also uses the deflate algorithm. Specified as RFC 1950 [http://www.ietf.org/rfc/rfc1952.txt] + */ + ZL, + /** + * added to help the parsers + */ + NULL; + public static V3CompressionAlgorithm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BZ".equals(codeString)) + return BZ; + if ("DF".equals(codeString)) + return DF; + if ("GZ".equals(codeString)) + return GZ; + if ("Z".equals(codeString)) + return Z; + if ("Z7".equals(codeString)) + return Z7; + if ("ZL".equals(codeString)) + return ZL; + throw new FHIRException("Unknown V3CompressionAlgorithm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BZ: return "BZ"; + case DF: return "DF"; + case GZ: return "GZ"; + case Z: return "Z"; + case Z7: return "Z7"; + case ZL: return "ZL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/CompressionAlgorithm"; + } + public String getDefinition() { + switch (this) { + case BZ: return "bzip-2 compression format. See [http://www.bzip.org/] for more information."; + case DF: return "The deflate compressed data format as specified in RFC 1951 [http://www.ietf.org/rfc/rfc1951.txt]."; + case GZ: return "A compressed data format that is compatible with the widely used GZIP utility as specified in RFC 1952 [http://www.ietf.org/rfc/rfc1952.txt] (uses the deflate algorithm)."; + case Z: return "Original UNIX compress algorithm and file format using the LZC algorithm (a variant of LZW). Patent encumbered and less efficient than deflate."; + case Z7: return "7z compression file format. See [http://www.7-zip.org/7z.html] for more information."; + case ZL: return "A compressed data format that also uses the deflate algorithm. Specified as RFC 1950 [http://www.ietf.org/rfc/rfc1952.txt]"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BZ: return "bzip"; + case DF: return "deflate"; + case GZ: return "gzip"; + case Z: return "compress"; + case Z7: return "Z7"; + case ZL: return "zlib"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CompressionAlgorithmEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CompressionAlgorithmEnumFactory.java new file mode 100644 index 00000000000..4ac3e847bc7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3CompressionAlgorithmEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3CompressionAlgorithmEnumFactory implements EnumFactory { + + public V3CompressionAlgorithm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BZ".equals(codeString)) + return V3CompressionAlgorithm.BZ; + if ("DF".equals(codeString)) + return V3CompressionAlgorithm.DF; + if ("GZ".equals(codeString)) + return V3CompressionAlgorithm.GZ; + if ("Z".equals(codeString)) + return V3CompressionAlgorithm.Z; + if ("Z7".equals(codeString)) + return V3CompressionAlgorithm.Z7; + if ("ZL".equals(codeString)) + return V3CompressionAlgorithm.ZL; + throw new IllegalArgumentException("Unknown V3CompressionAlgorithm code '"+codeString+"'"); + } + + public String toCode(V3CompressionAlgorithm code) { + if (code == V3CompressionAlgorithm.BZ) + return "BZ"; + if (code == V3CompressionAlgorithm.DF) + return "DF"; + if (code == V3CompressionAlgorithm.GZ) + return "GZ"; + if (code == V3CompressionAlgorithm.Z) + return "Z"; + if (code == V3CompressionAlgorithm.Z7) + return "Z7"; + if (code == V3CompressionAlgorithm.ZL) + return "ZL"; + return "?"; + } + + public String toSystem(V3CompressionAlgorithm code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Confidentiality.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Confidentiality.java new file mode 100644 index 00000000000..8d857b4faca --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Confidentiality.java @@ -0,0 +1,339 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Confidentiality { + + /** + * A specializable code and its leaf codes used in Confidentiality value sets to value the Act.Confidentiality and Role.Confidentiality attribute in accordance with the definition for concept domain "Confidentiality". + */ + _CONFIDENTIALITY, + /** + * Definition: Privacy metadata indicating that the information has been de-identified, and there are mitigating circumstances that prevent re-identification, which minimize risk of harm from unauthorized disclosure. The information requires protection to maintain low sensitivity. + + + Examples: Includes anonymized, pseudonymized, or non-personally identifiable information such as HIPAA limited data sets. + + + Map: No clear map to ISO 13606-4 Sensitivity Level (1) Care Management: RECORD_COMPONENTs that might need to be accessed by a wide range of administrative staff to manage the subject of care's access to health services. + + + Usage Note: This metadata indicates the receiver may have an obligation to comply with a data use agreement. + */ + L, + /** + * Definition: Privacy metadata indicating moderately sensitive information, which presents moderate risk of harm if disclosed without authorization. + + + Examples: Includes allergies of non-sensitive nature used inform food service; health information a patient authorizes to be used for marketing, released to a bank for a health credit card or savings account; or information in personal health record systems that are not governed under health privacy laws. + + + Map: Partial Map to ISO 13606-4 Sensitivity Level (2) Clinical Management: Less sensitive RECORD_COMPONENTs that might need to be accessed by a wider range of personnel not all of whom are actively caring for the patient (e.g. radiology staff). + + + Usage Note: This metadata indicates that the receiver may be obligated to comply with the receiver's terms of use or privacy policies. + */ + M, + /** + * Definition: Privacy metadata indicating that the information is typical, non-stigmatizing health information, which presents typical risk of harm if disclosed without authorization. + + + Examples: In the US, this includes what HIPAA identifies as the minimum necessary protected health information (PHI) given a covered purpose of use (treatment, payment, or operations). Includes typical, non-stigmatizing health information disclosed in an application for health, workers compensation, disability, or life insurance. + + + Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations. + + + Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable jurisdictional privacy law or disclosure authorization. + */ + N, + /** + * Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment. + + + Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer. + + + Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations.. + + + Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable, prevailing (default) jurisdictional privacy law or disclosure authorization.. + */ + R, + /** + * Definition: Privacy metadata indicating that the information is not classified as sensitive. + + + Examples: Includes publicly available information, e.g., business name, phone, email or physical address. + + + Usage Note: This metadata indicates that the receiver has no obligation to consider additional policies when making access control decisions. Note that in some jurisdictions, personally identifiable information must be protected as confidential, so it would not be appropriate to assign a confidentiality code of "unrestricted" to that information even if it is publicly available. + */ + U, + /** + * . Privacy metadata indicating that the information is extremely sensitive and likely stigmatizing health information that presents a very high risk if disclosed without authorization. This information must be kept in the highest confidence. + + + Examples: Includes information about a victim of abuse, patient requested information sensitivity, and taboo subjects relating to health status that must be discussed with the patient by an attending provider before sharing with the patient. May also include information held under “legal lock� or attorney-client privilege + + + Map: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject. + + + Usage Note: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject. + */ + V, + /** + * Description: By accessing subject / role and relationship based rights (These concepts are mutually exclusive, one and only one is required for a valid confidentiality coding.) + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + _CONFIDENTIALITYBYACCESSKIND, + /** + * Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. However, no patient related information may ever be of this confidentiality level. + + + Deprecation Comment: Replced by ActCode.B + */ + B, + /** + * Description: Only clinicians may see this item, billing and administration persons can not access this item without special permission. + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + D, + /** + * Description: Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor type code). + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + I, + /** + * Description: By information type, only for service catalog entries (multiples allowed). Not to be used with actual patient data! + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + _CONFIDENTIALITYBYINFOTYPE, + /** + * Description: Alcohol/drug-abuse related item + + + Deprecation Comment:Replced by ActCode.ETH + */ + ETH, + /** + * Description: HIV and AIDS related item + + + Deprecation Comment:Replced by ActCode.HIV + */ + HIV, + /** + * Description: Psychiatry related item + + + Deprecation Comment:Replced by ActCode.PSY + */ + PSY, + /** + * Description: Sexual assault / domestic violence related item + + + Deprecation Comment:Replced by ActCode.SDV + */ + SDV, + /** + * Description: Modifiers of role based access rights (multiple allowed) + + + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + _CONFIDENTIALITYMODIFIERS, + /** + * Description: Celebrities are people of public interest (VIP) including employees, whose information require special protection. + + + Deprecation Comment:Replced by ActCode.CEL + */ + C, + /** + * Description: + +Information for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members. Information reported by the patient about family members is sensitive by default. Flag can be set or cleared on patient's request. + Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode + */ + S, + /** + * Description: Information not to be disclosed or discussed with patient except through physician assigned to patient in this case. This is usually a temporary constraint only, example use is a new fatal diagnosis or finding, such as malignancy or HIV. + + + Deprecation Note:Replced by ActCode.TBOO + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3Confidentiality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Confidentiality".equals(codeString)) + return _CONFIDENTIALITY; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("U".equals(codeString)) + return U; + if ("V".equals(codeString)) + return V; + if ("_ConfidentialityByAccessKind".equals(codeString)) + return _CONFIDENTIALITYBYACCESSKIND; + if ("B".equals(codeString)) + return B; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + if ("_ConfidentialityByInfoType".equals(codeString)) + return _CONFIDENTIALITYBYINFOTYPE; + if ("ETH".equals(codeString)) + return ETH; + if ("HIV".equals(codeString)) + return HIV; + if ("PSY".equals(codeString)) + return PSY; + if ("SDV".equals(codeString)) + return SDV; + if ("_ConfidentialityModifiers".equals(codeString)) + return _CONFIDENTIALITYMODIFIERS; + if ("C".equals(codeString)) + return C; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3Confidentiality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CONFIDENTIALITY: return "_Confidentiality"; + case L: return "L"; + case M: return "M"; + case N: return "N"; + case R: return "R"; + case U: return "U"; + case V: return "V"; + case _CONFIDENTIALITYBYACCESSKIND: return "_ConfidentialityByAccessKind"; + case B: return "B"; + case D: return "D"; + case I: return "I"; + case _CONFIDENTIALITYBYINFOTYPE: return "_ConfidentialityByInfoType"; + case ETH: return "ETH"; + case HIV: return "HIV"; + case PSY: return "PSY"; + case SDV: return "SDV"; + case _CONFIDENTIALITYMODIFIERS: return "_ConfidentialityModifiers"; + case C: return "C"; + case S: return "S"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Confidentiality"; + } + public String getDefinition() { + switch (this) { + case _CONFIDENTIALITY: return "A specializable code and its leaf codes used in Confidentiality value sets to value the Act.Confidentiality and Role.Confidentiality attribute in accordance with the definition for concept domain \"Confidentiality\"."; + case L: return "Definition: Privacy metadata indicating that the information has been de-identified, and there are mitigating circumstances that prevent re-identification, which minimize risk of harm from unauthorized disclosure. The information requires protection to maintain low sensitivity.\r\n\n \n Examples: Includes anonymized, pseudonymized, or non-personally identifiable information such as HIPAA limited data sets.\r\n\n \n Map: No clear map to ISO 13606-4 Sensitivity Level (1) Care Management: RECORD_COMPONENTs that might need to be accessed by a wide range of administrative staff to manage the subject of care's access to health services.\r\n\n \n Usage Note: This metadata indicates the receiver may have an obligation to comply with a data use agreement."; + case M: return "Definition: Privacy metadata indicating moderately sensitive information, which presents moderate risk of harm if disclosed without authorization.\r\n\n \n Examples: Includes allergies of non-sensitive nature used inform food service; health information a patient authorizes to be used for marketing, released to a bank for a health credit card or savings account; or information in personal health record systems that are not governed under health privacy laws.\r\n\n \n Map: Partial Map to ISO 13606-4 Sensitivity Level (2) Clinical Management: Less sensitive RECORD_COMPONENTs that might need to be accessed by a wider range of personnel not all of whom are actively caring for the patient (e.g. radiology staff).\r\n\n \n Usage Note: This metadata indicates that the receiver may be obligated to comply with the receiver's terms of use or privacy policies."; + case N: return "Definition: Privacy metadata indicating that the information is typical, non-stigmatizing health information, which presents typical risk of harm if disclosed without authorization.\r\n\n \n Examples: In the US, this includes what HIPAA identifies as the minimum necessary protected health information (PHI) given a covered purpose of use (treatment, payment, or operations). Includes typical, non-stigmatizing health information disclosed in an application for health, workers compensation, disability, or life insurance.\r\n\n \n Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations.\r\n\n \n Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable jurisdictional privacy law or disclosure authorization."; + case R: return "Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment.\r\n\n \n Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer.\r\n\n \n Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations..\r\n\n \n Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable, prevailing (default) jurisdictional privacy law or disclosure authorization.."; + case U: return "Definition: Privacy metadata indicating that the information is not classified as sensitive.\r\n\n \n Examples: Includes publicly available information, e.g., business name, phone, email or physical address.\r\n\n \n Usage Note: This metadata indicates that the receiver has no obligation to consider additional policies when making access control decisions. Note that in some jurisdictions, personally identifiable information must be protected as confidential, so it would not be appropriate to assign a confidentiality code of \"unrestricted\" to that information even if it is publicly available."; + case V: return ". Privacy metadata indicating that the information is extremely sensitive and likely stigmatizing health information that presents a very high risk if disclosed without authorization. This information must be kept in the highest confidence. \r\n\n \n Examples: Includes information about a victim of abuse, patient requested information sensitivity, and taboo subjects relating to health status that must be discussed with the patient by an attending provider before sharing with the patient. May also include information held under “legal lock� or attorney-client privilege\r\n\n \n Map: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject.\r\n\n \n Usage Note: This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject."; + case _CONFIDENTIALITYBYACCESSKIND: return "Description: By accessing subject / role and relationship based rights (These concepts are mutually exclusive, one and only one is required for a valid confidentiality coding.)\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case B: return "Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. However, no patient related information may ever be of this confidentiality level.\r\n\n \n Deprecation Comment: Replced by ActCode.B"; + case D: return "Description: Only clinicians may see this item, billing and administration persons can not access this item without special permission.\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case I: return "Description: Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor type code).\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case _CONFIDENTIALITYBYINFOTYPE: return "Description: By information type, only for service catalog entries (multiples allowed). Not to be used with actual patient data!\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case ETH: return "Description: Alcohol/drug-abuse related item\r\n\n \n Deprecation Comment:Replced by ActCode.ETH"; + case HIV: return "Description: HIV and AIDS related item\r\n\n \n Deprecation Comment:Replced by ActCode.HIV"; + case PSY: return "Description: Psychiatry related item\r\n\n \n Deprecation Comment:Replced by ActCode.PSY"; + case SDV: return "Description: Sexual assault / domestic violence related item\r\n\n \n Deprecation Comment:Replced by ActCode.SDV"; + case _CONFIDENTIALITYMODIFIERS: return "Description: Modifiers of role based access rights (multiple allowed)\r\n\n \n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case C: return "Description: Celebrities are people of public interest (VIP) including employees, whose information require special protection.\r\n\n \n Deprecation Comment:Replced by ActCode.CEL"; + case S: return "Description: \n \r\nInformation for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members. Information reported by the patient about family members is sensitive by default. Flag can be set or cleared on patient's request.\n Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode"; + case T: return "Description: Information not to be disclosed or discussed with patient except through physician assigned to patient in this case. This is usually a temporary constraint only, example use is a new fatal diagnosis or finding, such as malignancy or HIV.\r\n\n \n Deprecation Note:Replced by ActCode.TBOO"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CONFIDENTIALITY: return "Confidentiality"; + case L: return "low"; + case M: return "moderate"; + case N: return "normal"; + case R: return "restricted"; + case U: return "unrestricted"; + case V: return "very restricted"; + case _CONFIDENTIALITYBYACCESSKIND: return "ConfidentialityByAccessKind"; + case B: return "business"; + case D: return "clinician"; + case I: return "individual"; + case _CONFIDENTIALITYBYINFOTYPE: return "ConfidentialityByInfoType"; + case ETH: return "substance abuse related"; + case HIV: return "HIV related"; + case PSY: return "psychiatry relate"; + case SDV: return "sexual and domestic violence related"; + case _CONFIDENTIALITYMODIFIERS: return "ConfidentialityModifiers"; + case C: return "celebrity"; + case S: return "sensitive"; + case T: return "taboo"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ConfidentialityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ConfidentialityEnumFactory.java new file mode 100644 index 00000000000..fb5b240224f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ConfidentialityEnumFactory.java @@ -0,0 +1,134 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ConfidentialityEnumFactory implements EnumFactory { + + public V3Confidentiality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Confidentiality".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITY; + if ("L".equals(codeString)) + return V3Confidentiality.L; + if ("M".equals(codeString)) + return V3Confidentiality.M; + if ("N".equals(codeString)) + return V3Confidentiality.N; + if ("R".equals(codeString)) + return V3Confidentiality.R; + if ("U".equals(codeString)) + return V3Confidentiality.U; + if ("V".equals(codeString)) + return V3Confidentiality.V; + if ("_ConfidentialityByAccessKind".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITYBYACCESSKIND; + if ("B".equals(codeString)) + return V3Confidentiality.B; + if ("D".equals(codeString)) + return V3Confidentiality.D; + if ("I".equals(codeString)) + return V3Confidentiality.I; + if ("_ConfidentialityByInfoType".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITYBYINFOTYPE; + if ("ETH".equals(codeString)) + return V3Confidentiality.ETH; + if ("HIV".equals(codeString)) + return V3Confidentiality.HIV; + if ("PSY".equals(codeString)) + return V3Confidentiality.PSY; + if ("SDV".equals(codeString)) + return V3Confidentiality.SDV; + if ("_ConfidentialityModifiers".equals(codeString)) + return V3Confidentiality._CONFIDENTIALITYMODIFIERS; + if ("C".equals(codeString)) + return V3Confidentiality.C; + if ("S".equals(codeString)) + return V3Confidentiality.S; + if ("T".equals(codeString)) + return V3Confidentiality.T; + throw new IllegalArgumentException("Unknown V3Confidentiality code '"+codeString+"'"); + } + + public String toCode(V3Confidentiality code) { + if (code == V3Confidentiality._CONFIDENTIALITY) + return "_Confidentiality"; + if (code == V3Confidentiality.L) + return "L"; + if (code == V3Confidentiality.M) + return "M"; + if (code == V3Confidentiality.N) + return "N"; + if (code == V3Confidentiality.R) + return "R"; + if (code == V3Confidentiality.U) + return "U"; + if (code == V3Confidentiality.V) + return "V"; + if (code == V3Confidentiality._CONFIDENTIALITYBYACCESSKIND) + return "_ConfidentialityByAccessKind"; + if (code == V3Confidentiality.B) + return "B"; + if (code == V3Confidentiality.D) + return "D"; + if (code == V3Confidentiality.I) + return "I"; + if (code == V3Confidentiality._CONFIDENTIALITYBYINFOTYPE) + return "_ConfidentialityByInfoType"; + if (code == V3Confidentiality.ETH) + return "ETH"; + if (code == V3Confidentiality.HIV) + return "HIV"; + if (code == V3Confidentiality.PSY) + return "PSY"; + if (code == V3Confidentiality.SDV) + return "SDV"; + if (code == V3Confidentiality._CONFIDENTIALITYMODIFIERS) + return "_ConfidentialityModifiers"; + if (code == V3Confidentiality.C) + return "C"; + if (code == V3Confidentiality.S) + return "S"; + if (code == V3Confidentiality.T) + return "T"; + return "?"; + } + + public String toSystem(V3Confidentiality code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerCap.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerCap.java new file mode 100644 index 00000000000..347bd12d00b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerCap.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContainerCap { + + /** + * Cap types for medication containers + */ + _MEDICATIONCAP, + /** + * A cap designed to be difficult to open for children. Generally requires multiple simultaneous actions (e.g. squeeze and twist) to open. Used for products that may be dangerous if ingested or overdosed by children. + */ + CHILD, + /** + * A cap designed to be easily removed. For products intended to be opened by persons with limited strength or dexterity. + */ + EASY, + /** + * A non-reactive plastic film covering over the opening of a container. + */ + FILM, + /** + * A foil covering (type of foil not specified) over the opening of a container + */ + FOIL, + /** + * A non-threaded cap that forms a tight-fitting closure on a container by pushing the fitted end into the conatiner opening + */ + PUSH, + /** + * A threaded cap that is screwed onto the opening of a container + */ + SCR, + /** + * added to help the parsers + */ + NULL; + public static V3ContainerCap fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MedicationCap".equals(codeString)) + return _MEDICATIONCAP; + if ("CHILD".equals(codeString)) + return CHILD; + if ("EASY".equals(codeString)) + return EASY; + if ("FILM".equals(codeString)) + return FILM; + if ("FOIL".equals(codeString)) + return FOIL; + if ("PUSH".equals(codeString)) + return PUSH; + if ("SCR".equals(codeString)) + return SCR; + throw new FHIRException("Unknown V3ContainerCap code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _MEDICATIONCAP: return "_MedicationCap"; + case CHILD: return "CHILD"; + case EASY: return "EASY"; + case FILM: return "FILM"; + case FOIL: return "FOIL"; + case PUSH: return "PUSH"; + case SCR: return "SCR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContainerCap"; + } + public String getDefinition() { + switch (this) { + case _MEDICATIONCAP: return "Cap types for medication containers"; + case CHILD: return "A cap designed to be difficult to open for children. Generally requires multiple simultaneous actions (e.g. squeeze and twist) to open. Used for products that may be dangerous if ingested or overdosed by children."; + case EASY: return "A cap designed to be easily removed. For products intended to be opened by persons with limited strength or dexterity."; + case FILM: return "A non-reactive plastic film covering over the opening of a container."; + case FOIL: return "A foil covering (type of foil not specified) over the opening of a container"; + case PUSH: return "A non-threaded cap that forms a tight-fitting closure on a container by pushing the fitted end into the conatiner opening"; + case SCR: return "A threaded cap that is screwed onto the opening of a container"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _MEDICATIONCAP: return "MedicationCap"; + case CHILD: return "ChildProof"; + case EASY: return "EasyOpen"; + case FILM: return "Film"; + case FOIL: return "Foil"; + case PUSH: return "Push Cap"; + case SCR: return "Screw Cap"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerCapEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerCapEnumFactory.java new file mode 100644 index 00000000000..05403e11098 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerCapEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ContainerCapEnumFactory implements EnumFactory { + + public V3ContainerCap fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MedicationCap".equals(codeString)) + return V3ContainerCap._MEDICATIONCAP; + if ("CHILD".equals(codeString)) + return V3ContainerCap.CHILD; + if ("EASY".equals(codeString)) + return V3ContainerCap.EASY; + if ("FILM".equals(codeString)) + return V3ContainerCap.FILM; + if ("FOIL".equals(codeString)) + return V3ContainerCap.FOIL; + if ("PUSH".equals(codeString)) + return V3ContainerCap.PUSH; + if ("SCR".equals(codeString)) + return V3ContainerCap.SCR; + throw new IllegalArgumentException("Unknown V3ContainerCap code '"+codeString+"'"); + } + + public String toCode(V3ContainerCap code) { + if (code == V3ContainerCap._MEDICATIONCAP) + return "_MedicationCap"; + if (code == V3ContainerCap.CHILD) + return "CHILD"; + if (code == V3ContainerCap.EASY) + return "EASY"; + if (code == V3ContainerCap.FILM) + return "FILM"; + if (code == V3ContainerCap.FOIL) + return "FOIL"; + if (code == V3ContainerCap.PUSH) + return "PUSH"; + if (code == V3ContainerCap.SCR) + return "SCR"; + return "?"; + } + + public String toSystem(V3ContainerCap code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerSeparator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerSeparator.java new file mode 100644 index 00000000000..485966b6818 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerSeparator.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContainerSeparator { + + /** + * A gelatinous type of separator material. + */ + GEL, + /** + * No separator material is present in the container. + */ + NONE, + /** + * added to help the parsers + */ + NULL; + public static V3ContainerSeparator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GEL".equals(codeString)) + return GEL; + if ("NONE".equals(codeString)) + return NONE; + throw new FHIRException("Unknown V3ContainerSeparator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GEL: return "GEL"; + case NONE: return "NONE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContainerSeparator"; + } + public String getDefinition() { + switch (this) { + case GEL: return "A gelatinous type of separator material."; + case NONE: return "No separator material is present in the container."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GEL: return "Gel"; + case NONE: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerSeparatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerSeparatorEnumFactory.java new file mode 100644 index 00000000000..bf3337ae06d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContainerSeparatorEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ContainerSeparatorEnumFactory implements EnumFactory { + + public V3ContainerSeparator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("GEL".equals(codeString)) + return V3ContainerSeparator.GEL; + if ("NONE".equals(codeString)) + return V3ContainerSeparator.NONE; + throw new IllegalArgumentException("Unknown V3ContainerSeparator code '"+codeString+"'"); + } + + public String toCode(V3ContainerSeparator code) { + if (code == V3ContainerSeparator.GEL) + return "GEL"; + if (code == V3ContainerSeparator.NONE) + return "NONE"; + return "?"; + } + + public String toSystem(V3ContainerSeparator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContentProcessingMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContentProcessingMode.java new file mode 100644 index 00000000000..4fdc5f0717b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContentProcessingMode.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContentProcessingMode { + + /** + * Description:The content should be processed in a sequential fashion. + */ + SEQL, + /** + * Description:The content may be processed in any order. + */ + UNOR, + /** + * added to help the parsers + */ + NULL; + public static V3ContentProcessingMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return SEQL; + if ("UNOR".equals(codeString)) + return UNOR; + throw new FHIRException("Unknown V3ContentProcessingMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SEQL: return "SEQL"; + case UNOR: return "UNOR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContentProcessingMode"; + } + public String getDefinition() { + switch (this) { + case SEQL: return "Description:The content should be processed in a sequential fashion."; + case UNOR: return "Description:The content may be processed in any order."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SEQL: return "Sequential"; + case UNOR: return "Unordered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContentProcessingModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContentProcessingModeEnumFactory.java new file mode 100644 index 00000000000..53410aa3856 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContentProcessingModeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ContentProcessingModeEnumFactory implements EnumFactory { + + public V3ContentProcessingMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return V3ContentProcessingMode.SEQL; + if ("UNOR".equals(codeString)) + return V3ContentProcessingMode.UNOR; + throw new IllegalArgumentException("Unknown V3ContentProcessingMode code '"+codeString+"'"); + } + + public String toCode(V3ContentProcessingMode code) { + if (code == V3ContentProcessingMode.SEQL) + return "SEQL"; + if (code == V3ContentProcessingMode.UNOR) + return "UNOR"; + return "?"; + } + + public String toSystem(V3ContentProcessingMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContextControl.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContextControl.java new file mode 100644 index 00000000000..38469b9724c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContextControl.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ContextControl { + + /** + * The association adds to the existing context associated with the Act. Both this association and any associations propagated from ancestor Acts are interpreted as being related to this Act. + */ + _CONTEXTCONTROLADDITIVE, + /** + * The association adds to the existing context associated with the Act, but will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Additive, Non-Propagating" it means that the author will be added to the set of author participations that have propagated from ancestor Acts for the purpose of this Act. However only the previously propagated authors will propagate to any child Acts that allow context to be propagated. + */ + AN, + /** + * The association adds to the existing context associated with the Act, and will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Additive, Propagating" it means that the author will be added to the set of author participations that have propagated from ancestor Acts, and will itself propagate with the other authors to any child Acts that allow context to be propagated. + */ + AP, + /** + * The association applies only to the current Act and will not propagate to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd). + */ + _CONTEXTCONTROLNONPROPAGATING, + /** + * The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. However, this overriding association will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Overriding, Non-Propagating" it means that the author will replace the set of author participations that have propagated from ancestor Acts. Furthermore, no author participations whatsoever will propagate to any child Acts that allow context to be propagated. + */ + ON, + /** + * The association adds to the existing context associated with the Act, but replaces associations propagated from ancestor Acts whose typeCodes are the same or more specific. + */ + _CONTEXTCONTROLOVERRIDING, + /** + * The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. This overriding association will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Overriding, Propagating" it means that the author will replace the set of author participations that have propagated from ancestor Acts, and will itself be the only author to propagate to any child Acts that allow context to be propagated. + */ + OP, + /** + * The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd). + */ + _CONTEXTCONTROLPROPAGATING, + /** + * added to help the parsers + */ + NULL; + public static V3ContextControl fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ContextControlAdditive".equals(codeString)) + return _CONTEXTCONTROLADDITIVE; + if ("AN".equals(codeString)) + return AN; + if ("AP".equals(codeString)) + return AP; + if ("_ContextControlNonPropagating".equals(codeString)) + return _CONTEXTCONTROLNONPROPAGATING; + if ("ON".equals(codeString)) + return ON; + if ("_ContextControlOverriding".equals(codeString)) + return _CONTEXTCONTROLOVERRIDING; + if ("OP".equals(codeString)) + return OP; + if ("_ContextControlPropagating".equals(codeString)) + return _CONTEXTCONTROLPROPAGATING; + throw new FHIRException("Unknown V3ContextControl code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CONTEXTCONTROLADDITIVE: return "_ContextControlAdditive"; + case AN: return "AN"; + case AP: return "AP"; + case _CONTEXTCONTROLNONPROPAGATING: return "_ContextControlNonPropagating"; + case ON: return "ON"; + case _CONTEXTCONTROLOVERRIDING: return "_ContextControlOverriding"; + case OP: return "OP"; + case _CONTEXTCONTROLPROPAGATING: return "_ContextControlPropagating"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ContextControl"; + } + public String getDefinition() { + switch (this) { + case _CONTEXTCONTROLADDITIVE: return "The association adds to the existing context associated with the Act. Both this association and any associations propagated from ancestor Acts are interpreted as being related to this Act."; + case AN: return "The association adds to the existing context associated with the Act, but will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Additive, Non-Propagating\" it means that the author will be added to the set of author participations that have propagated from ancestor Acts for the purpose of this Act. However only the previously propagated authors will propagate to any child Acts that allow context to be propagated."; + case AP: return "The association adds to the existing context associated with the Act, and will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Additive, Propagating\" it means that the author will be added to the set of author participations that have propagated from ancestor Acts, and will itself propagate with the other authors to any child Acts that allow context to be propagated."; + case _CONTEXTCONTROLNONPROPAGATING: return "The association applies only to the current Act and will not propagate to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd)."; + case ON: return "The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. However, this overriding association will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Overriding, Non-Propagating\" it means that the author will replace the set of author participations that have propagated from ancestor Acts. Furthermore, no author participations whatsoever will propagate to any child Acts that allow context to be propagated."; + case _CONTEXTCONTROLOVERRIDING: return "The association adds to the existing context associated with the Act, but replaces associations propagated from ancestor Acts whose typeCodes are the same or more specific."; + case OP: return "The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. This overriding association will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Overriding, Propagating\" it means that the author will replace the set of author participations that have propagated from ancestor Acts, and will itself be the only author to propagate to any child Acts that allow context to be propagated."; + case _CONTEXTCONTROLPROPAGATING: return "The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CONTEXTCONTROLADDITIVE: return "ContextControlAdditive"; + case AN: return "additive, non-propagating"; + case AP: return "additive, propagating"; + case _CONTEXTCONTROLNONPROPAGATING: return "ContextControlNonPropagating"; + case ON: return "overriding, non-propagating"; + case _CONTEXTCONTROLOVERRIDING: return "ContextControlOverriding"; + case OP: return "overriding, propagating"; + case _CONTEXTCONTROLPROPAGATING: return "ContextControlPropagating"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContextControlEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContextControlEnumFactory.java new file mode 100644 index 00000000000..5f711e8e97b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ContextControlEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ContextControlEnumFactory implements EnumFactory { + + public V3ContextControl fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ContextControlAdditive".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLADDITIVE; + if ("AN".equals(codeString)) + return V3ContextControl.AN; + if ("AP".equals(codeString)) + return V3ContextControl.AP; + if ("_ContextControlNonPropagating".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLNONPROPAGATING; + if ("ON".equals(codeString)) + return V3ContextControl.ON; + if ("_ContextControlOverriding".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLOVERRIDING; + if ("OP".equals(codeString)) + return V3ContextControl.OP; + if ("_ContextControlPropagating".equals(codeString)) + return V3ContextControl._CONTEXTCONTROLPROPAGATING; + throw new IllegalArgumentException("Unknown V3ContextControl code '"+codeString+"'"); + } + + public String toCode(V3ContextControl code) { + if (code == V3ContextControl._CONTEXTCONTROLADDITIVE) + return "_ContextControlAdditive"; + if (code == V3ContextControl.AN) + return "AN"; + if (code == V3ContextControl.AP) + return "AP"; + if (code == V3ContextControl._CONTEXTCONTROLNONPROPAGATING) + return "_ContextControlNonPropagating"; + if (code == V3ContextControl.ON) + return "ON"; + if (code == V3ContextControl._CONTEXTCONTROLOVERRIDING) + return "_ContextControlOverriding"; + if (code == V3ContextControl.OP) + return "OP"; + if (code == V3ContextControl._CONTEXTCONTROLPROPAGATING) + return "_ContextControlPropagating"; + return "?"; + } + + public String toSystem(V3ContextControl code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DataOperation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DataOperation.java new file mode 100644 index 00000000000..b53191fdd00 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DataOperation.java @@ -0,0 +1,249 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DataOperation { + + /** + * Description:Act on an object or objects. + */ + OPERATE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the act of bringing an object into existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + CREATE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the removal of information about an object from memory or storage. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + DELETE, + /** + * Description:Fundamental operation in an IS that results only in initiating performance of a single or set of programs (i.e., software objects). Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + EXECUTE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the flow of information about an object to a subject. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + READ, + /** + * Definition:Fundamental operation in an Information System (IS) that results only in the revision or alteration of an object. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + UPDATE, + /** + * Description:Fundamental operation in an Information System (IS) that results only in the addition of information to an object already in existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. + */ + APPEND, + /** + * Description:Change the status of an object representing an Act. + */ + MODIFYSTATUS, + /** + * Description:Change the status of an object representing an Act to "aborted", i.e., terminated prior to the originally intended completion. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + ABORT, + /** + * Description:Change the status of an object representing an Act to "active", i.e., so it can be performed or is being performed, for the first time. (Contrast with REACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + ACTIVATE, + /** + * Description:Change the status of an object representing an Act to "cancelled", i.e., abandoned before activation. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + CANCEL, + /** + * Description:Change the status of an object representing an Act to "completed", i.e., terminated normally after all of its constituents have been performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + COMPLETE, + /** + * Description:Change the status of an object representing an Act to "held", i.e., put aside an Act that is still in preparatory stages. No action can occur until the Act is released. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + HOLD, + /** + * Description:Change the status of an object representing an Act to a normal state. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + JUMP, + /** + * Description:Change the status of an object representing an Act to "nullified", i.e., treat as though it never existed. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + NULLIFY, + /** + * Description:Change the status of an object representing an Act to "obsolete" when it has been replaced by a new instance. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + OBSOLETE, + /** + * Description:Change the status of a formerly active object representing an Act to "active", i.e., so it can again be performed or is being performed. (Contrast with ACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + REACTIVATE, + /** + * Description:Change the status of an object representing an Act so it is no longer "held", i.e., allow action to occur. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + RELEASE, + /** + * Description:Change the status of a suspended object representing an Act to "active", i.e., so it can be performed or is being performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model. + */ + RESUME, + /** + * Definition:Change the status of an object representing an Act to suspended, i.e., so it is temporarily not in service. + */ + SUSPEND, + /** + * added to help the parsers + */ + NULL; + public static V3DataOperation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OPERATE".equals(codeString)) + return OPERATE; + if ("CREATE".equals(codeString)) + return CREATE; + if ("DELETE".equals(codeString)) + return DELETE; + if ("EXECUTE".equals(codeString)) + return EXECUTE; + if ("READ".equals(codeString)) + return READ; + if ("UPDATE".equals(codeString)) + return UPDATE; + if ("APPEND".equals(codeString)) + return APPEND; + if ("MODIFYSTATUS".equals(codeString)) + return MODIFYSTATUS; + if ("ABORT".equals(codeString)) + return ABORT; + if ("ACTIVATE".equals(codeString)) + return ACTIVATE; + if ("CANCEL".equals(codeString)) + return CANCEL; + if ("COMPLETE".equals(codeString)) + return COMPLETE; + if ("HOLD".equals(codeString)) + return HOLD; + if ("JUMP".equals(codeString)) + return JUMP; + if ("NULLIFY".equals(codeString)) + return NULLIFY; + if ("OBSOLETE".equals(codeString)) + return OBSOLETE; + if ("REACTIVATE".equals(codeString)) + return REACTIVATE; + if ("RELEASE".equals(codeString)) + return RELEASE; + if ("RESUME".equals(codeString)) + return RESUME; + if ("SUSPEND".equals(codeString)) + return SUSPEND; + throw new FHIRException("Unknown V3DataOperation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case OPERATE: return "OPERATE"; + case CREATE: return "CREATE"; + case DELETE: return "DELETE"; + case EXECUTE: return "EXECUTE"; + case READ: return "READ"; + case UPDATE: return "UPDATE"; + case APPEND: return "APPEND"; + case MODIFYSTATUS: return "MODIFYSTATUS"; + case ABORT: return "ABORT"; + case ACTIVATE: return "ACTIVATE"; + case CANCEL: return "CANCEL"; + case COMPLETE: return "COMPLETE"; + case HOLD: return "HOLD"; + case JUMP: return "JUMP"; + case NULLIFY: return "NULLIFY"; + case OBSOLETE: return "OBSOLETE"; + case REACTIVATE: return "REACTIVATE"; + case RELEASE: return "RELEASE"; + case RESUME: return "RESUME"; + case SUSPEND: return "SUSPEND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DataOperation"; + } + public String getDefinition() { + switch (this) { + case OPERATE: return "Description:Act on an object or objects."; + case CREATE: return "Description:Fundamental operation in an Information System (IS) that results only in the act of bringing an object into existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case DELETE: return "Description:Fundamental operation in an Information System (IS) that results only in the removal of information about an object from memory or storage. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case EXECUTE: return "Description:Fundamental operation in an IS that results only in initiating performance of a single or set of programs (i.e., software objects). Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case READ: return "Description:Fundamental operation in an Information System (IS) that results only in the flow of information about an object to a subject. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case UPDATE: return "Definition:Fundamental operation in an Information System (IS) that results only in the revision or alteration of an object. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case APPEND: return "Description:Fundamental operation in an Information System (IS) that results only in the addition of information to an object already in existence. Note: The preceding definition is taken from the HL7 RBAC specification. There is no restriction on how the operation is invoked, e.g., via a user interface."; + case MODIFYSTATUS: return "Description:Change the status of an object representing an Act."; + case ABORT: return "Description:Change the status of an object representing an Act to \"aborted\", i.e., terminated prior to the originally intended completion. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case ACTIVATE: return "Description:Change the status of an object representing an Act to \"active\", i.e., so it can be performed or is being performed, for the first time. (Contrast with REACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case CANCEL: return "Description:Change the status of an object representing an Act to \"cancelled\", i.e., abandoned before activation. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case COMPLETE: return "Description:Change the status of an object representing an Act to \"completed\", i.e., terminated normally after all of its constituents have been performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case HOLD: return "Description:Change the status of an object representing an Act to \"held\", i.e., put aside an Act that is still in preparatory stages. No action can occur until the Act is released. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case JUMP: return "Description:Change the status of an object representing an Act to a normal state. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case NULLIFY: return "Description:Change the status of an object representing an Act to \"nullified\", i.e., treat as though it never existed. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case OBSOLETE: return "Description:Change the status of an object representing an Act to \"obsolete\" when it has been replaced by a new instance. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case REACTIVATE: return "Description:Change the status of a formerly active object representing an Act to \"active\", i.e., so it can again be performed or is being performed. (Contrast with ACTIVATE.) For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case RELEASE: return "Description:Change the status of an object representing an Act so it is no longer \"held\", i.e., allow action to occur. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case RESUME: return "Description:Change the status of a suspended object representing an Act to \"active\", i.e., so it can be performed or is being performed. For an HL7 Act, the state transitions per the HL7 Reference Information Model."; + case SUSPEND: return "Definition:Change the status of an object representing an Act to suspended, i.e., so it is temporarily not in service."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case OPERATE: return "operate"; + case CREATE: return "create"; + case DELETE: return "delete"; + case EXECUTE: return "execute"; + case READ: return "read"; + case UPDATE: return "revise"; + case APPEND: return "append"; + case MODIFYSTATUS: return "modify status"; + case ABORT: return "abort"; + case ACTIVATE: return "activate"; + case CANCEL: return "cancel"; + case COMPLETE: return "complete"; + case HOLD: return "hold"; + case JUMP: return "jump"; + case NULLIFY: return "nullify"; + case OBSOLETE: return "obsolete"; + case REACTIVATE: return "reactivate"; + case RELEASE: return "release"; + case RESUME: return "resume"; + case SUSPEND: return "suspend"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DataOperationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DataOperationEnumFactory.java new file mode 100644 index 00000000000..023f695a8de --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DataOperationEnumFactory.java @@ -0,0 +1,134 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3DataOperationEnumFactory implements EnumFactory { + + public V3DataOperation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("OPERATE".equals(codeString)) + return V3DataOperation.OPERATE; + if ("CREATE".equals(codeString)) + return V3DataOperation.CREATE; + if ("DELETE".equals(codeString)) + return V3DataOperation.DELETE; + if ("EXECUTE".equals(codeString)) + return V3DataOperation.EXECUTE; + if ("READ".equals(codeString)) + return V3DataOperation.READ; + if ("UPDATE".equals(codeString)) + return V3DataOperation.UPDATE; + if ("APPEND".equals(codeString)) + return V3DataOperation.APPEND; + if ("MODIFYSTATUS".equals(codeString)) + return V3DataOperation.MODIFYSTATUS; + if ("ABORT".equals(codeString)) + return V3DataOperation.ABORT; + if ("ACTIVATE".equals(codeString)) + return V3DataOperation.ACTIVATE; + if ("CANCEL".equals(codeString)) + return V3DataOperation.CANCEL; + if ("COMPLETE".equals(codeString)) + return V3DataOperation.COMPLETE; + if ("HOLD".equals(codeString)) + return V3DataOperation.HOLD; + if ("JUMP".equals(codeString)) + return V3DataOperation.JUMP; + if ("NULLIFY".equals(codeString)) + return V3DataOperation.NULLIFY; + if ("OBSOLETE".equals(codeString)) + return V3DataOperation.OBSOLETE; + if ("REACTIVATE".equals(codeString)) + return V3DataOperation.REACTIVATE; + if ("RELEASE".equals(codeString)) + return V3DataOperation.RELEASE; + if ("RESUME".equals(codeString)) + return V3DataOperation.RESUME; + if ("SUSPEND".equals(codeString)) + return V3DataOperation.SUSPEND; + throw new IllegalArgumentException("Unknown V3DataOperation code '"+codeString+"'"); + } + + public String toCode(V3DataOperation code) { + if (code == V3DataOperation.OPERATE) + return "OPERATE"; + if (code == V3DataOperation.CREATE) + return "CREATE"; + if (code == V3DataOperation.DELETE) + return "DELETE"; + if (code == V3DataOperation.EXECUTE) + return "EXECUTE"; + if (code == V3DataOperation.READ) + return "READ"; + if (code == V3DataOperation.UPDATE) + return "UPDATE"; + if (code == V3DataOperation.APPEND) + return "APPEND"; + if (code == V3DataOperation.MODIFYSTATUS) + return "MODIFYSTATUS"; + if (code == V3DataOperation.ABORT) + return "ABORT"; + if (code == V3DataOperation.ACTIVATE) + return "ACTIVATE"; + if (code == V3DataOperation.CANCEL) + return "CANCEL"; + if (code == V3DataOperation.COMPLETE) + return "COMPLETE"; + if (code == V3DataOperation.HOLD) + return "HOLD"; + if (code == V3DataOperation.JUMP) + return "JUMP"; + if (code == V3DataOperation.NULLIFY) + return "NULLIFY"; + if (code == V3DataOperation.OBSOLETE) + return "OBSOLETE"; + if (code == V3DataOperation.REACTIVATE) + return "REACTIVATE"; + if (code == V3DataOperation.RELEASE) + return "RELEASE"; + if (code == V3DataOperation.RESUME) + return "RESUME"; + if (code == V3DataOperation.SUSPEND) + return "SUSPEND"; + return "?"; + } + + public String toSystem(V3DataOperation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DeviceAlertLevel.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DeviceAlertLevel.java new file mode 100644 index 00000000000..2741047acb6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DeviceAlertLevel.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DeviceAlertLevel { + + /** + * Shut Down, Fix Problem and Re-initialize + */ + C, + /** + * No Corrective Action Needed + */ + N, + /** + * Corrective Action Required + */ + S, + /** + * Corrective Action Anticipated + */ + W, + /** + * added to help the parsers + */ + NULL; + public static V3DeviceAlertLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("W".equals(codeString)) + return W; + throw new FHIRException("Unknown V3DeviceAlertLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case N: return "N"; + case S: return "S"; + case W: return "W"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DeviceAlertLevel"; + } + public String getDefinition() { + switch (this) { + case C: return "Shut Down, Fix Problem and Re-initialize"; + case N: return "No Corrective Action Needed"; + case S: return "Corrective Action Required"; + case W: return "Corrective Action Anticipated"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "Critical"; + case N: return "Normal"; + case S: return "Serious"; + case W: return "Warning"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DeviceAlertLevelEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DeviceAlertLevelEnumFactory.java new file mode 100644 index 00000000000..09e749eff8f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DeviceAlertLevelEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3DeviceAlertLevelEnumFactory implements EnumFactory { + + public V3DeviceAlertLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return V3DeviceAlertLevel.C; + if ("N".equals(codeString)) + return V3DeviceAlertLevel.N; + if ("S".equals(codeString)) + return V3DeviceAlertLevel.S; + if ("W".equals(codeString)) + return V3DeviceAlertLevel.W; + throw new IllegalArgumentException("Unknown V3DeviceAlertLevel code '"+codeString+"'"); + } + + public String toCode(V3DeviceAlertLevel code) { + if (code == V3DeviceAlertLevel.C) + return "C"; + if (code == V3DeviceAlertLevel.N) + return "N"; + if (code == V3DeviceAlertLevel.S) + return "S"; + if (code == V3DeviceAlertLevel.W) + return "W"; + return "?"; + } + + public String toSystem(V3DeviceAlertLevel code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentCompletion.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentCompletion.java new file mode 100644 index 00000000000..aee8e1ab4a5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentCompletion.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DocumentCompletion { + + /** + * A completion status in which a document has been signed manually or electronically by one or more individuals who attest to its accuracy. No explicit determination is made that the assigned individual has performed the authentication. While the standard allows multiple instances of authentication, it would be typical to have a single instance of authentication, usually by the assigned individual. + */ + AU, + /** + * A completion status in which information has been orally recorded but not yet transcribed. + */ + DI, + /** + * A completion status in which document content, other than dictation, has been received but has not been translated into the final electronic format. Examples include paper documents, whether hand-written or typewritten, and intermediate electronic forms, such as voice to text. + */ + DO, + /** + * A completion status in which information is known to be missing from a transcribed document. + */ + IN, + /** + * A workflow status where the material has been assigned to personnel to perform the task of transcription. The document remains in this state until the document is transcribed. + */ + IP, + /** + * A completion status in which a document has been signed manually or electronically by the individual who is legally responsible for that document. This is the most mature state in the workflow progression. + */ + LA, + /** + * A completion status in which a document was created in error or was placed in the wrong chart. The document is no longer available. + */ + NU, + /** + * A completion status in which a document is transcribed but not authenticated. + */ + PA, + /** + * A completion status where the document is complete and there is no expectation that the document will be signed. + */ + UC, + /** + * added to help the parsers + */ + NULL; + public static V3DocumentCompletion fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AU".equals(codeString)) + return AU; + if ("DI".equals(codeString)) + return DI; + if ("DO".equals(codeString)) + return DO; + if ("IN".equals(codeString)) + return IN; + if ("IP".equals(codeString)) + return IP; + if ("LA".equals(codeString)) + return LA; + if ("NU".equals(codeString)) + return NU; + if ("PA".equals(codeString)) + return PA; + if ("UC".equals(codeString)) + return UC; + throw new FHIRException("Unknown V3DocumentCompletion code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AU: return "AU"; + case DI: return "DI"; + case DO: return "DO"; + case IN: return "IN"; + case IP: return "IP"; + case LA: return "LA"; + case NU: return "NU"; + case PA: return "PA"; + case UC: return "UC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DocumentCompletion"; + } + public String getDefinition() { + switch (this) { + case AU: return "A completion status in which a document has been signed manually or electronically by one or more individuals who attest to its accuracy. No explicit determination is made that the assigned individual has performed the authentication. While the standard allows multiple instances of authentication, it would be typical to have a single instance of authentication, usually by the assigned individual."; + case DI: return "A completion status in which information has been orally recorded but not yet transcribed."; + case DO: return "A completion status in which document content, other than dictation, has been received but has not been translated into the final electronic format. Examples include paper documents, whether hand-written or typewritten, and intermediate electronic forms, such as voice to text."; + case IN: return "A completion status in which information is known to be missing from a transcribed document."; + case IP: return "A workflow status where the material has been assigned to personnel to perform the task of transcription. The document remains in this state until the document is transcribed."; + case LA: return "A completion status in which a document has been signed manually or electronically by the individual who is legally responsible for that document. This is the most mature state in the workflow progression."; + case NU: return "A completion status in which a document was created in error or was placed in the wrong chart. The document is no longer available."; + case PA: return "A completion status in which a document is transcribed but not authenticated."; + case UC: return "A completion status where the document is complete and there is no expectation that the document will be signed."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AU: return "authenticated"; + case DI: return "dictated"; + case DO: return "documented"; + case IN: return "incomplete"; + case IP: return "in progress"; + case LA: return "legally authenticated"; + case NU: return "nullified document"; + case PA: return "pre-authenticated"; + case UC: return "unsigned completed document"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentCompletionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentCompletionEnumFactory.java new file mode 100644 index 00000000000..2c4b1e704de --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentCompletionEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3DocumentCompletionEnumFactory implements EnumFactory { + + public V3DocumentCompletion fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AU".equals(codeString)) + return V3DocumentCompletion.AU; + if ("DI".equals(codeString)) + return V3DocumentCompletion.DI; + if ("DO".equals(codeString)) + return V3DocumentCompletion.DO; + if ("IN".equals(codeString)) + return V3DocumentCompletion.IN; + if ("IP".equals(codeString)) + return V3DocumentCompletion.IP; + if ("LA".equals(codeString)) + return V3DocumentCompletion.LA; + if ("NU".equals(codeString)) + return V3DocumentCompletion.NU; + if ("PA".equals(codeString)) + return V3DocumentCompletion.PA; + if ("UC".equals(codeString)) + return V3DocumentCompletion.UC; + throw new IllegalArgumentException("Unknown V3DocumentCompletion code '"+codeString+"'"); + } + + public String toCode(V3DocumentCompletion code) { + if (code == V3DocumentCompletion.AU) + return "AU"; + if (code == V3DocumentCompletion.DI) + return "DI"; + if (code == V3DocumentCompletion.DO) + return "DO"; + if (code == V3DocumentCompletion.IN) + return "IN"; + if (code == V3DocumentCompletion.IP) + return "IP"; + if (code == V3DocumentCompletion.LA) + return "LA"; + if (code == V3DocumentCompletion.NU) + return "NU"; + if (code == V3DocumentCompletion.PA) + return "PA"; + if (code == V3DocumentCompletion.UC) + return "UC"; + return "?"; + } + + public String toSystem(V3DocumentCompletion code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentStorage.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentStorage.java new file mode 100644 index 00000000000..f17d4a4e0a1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentStorage.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3DocumentStorage { + + /** + * A storage status in which a document is available on-line. + */ + AC, + /** + * A storage status in which a document is available on-line and is also stored off-line for long-term access. + */ + AA, + /** + * A storage status in which a document has been stored off-line for long-term access. + */ + AR, + /** + * A storage status in which a document is no longer available in this system. + */ + PU, + /** + * added to help the parsers + */ + NULL; + public static V3DocumentStorage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return AC; + if ("AA".equals(codeString)) + return AA; + if ("AR".equals(codeString)) + return AR; + if ("PU".equals(codeString)) + return PU; + throw new FHIRException("Unknown V3DocumentStorage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AC: return "AC"; + case AA: return "AA"; + case AR: return "AR"; + case PU: return "PU"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/DocumentStorage"; + } + public String getDefinition() { + switch (this) { + case AC: return "A storage status in which a document is available on-line."; + case AA: return "A storage status in which a document is available on-line and is also stored off-line for long-term access."; + case AR: return "A storage status in which a document has been stored off-line for long-term access."; + case PU: return "A storage status in which a document is no longer available in this system."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AC: return "active"; + case AA: return "active and archived"; + case AR: return "archived (not active)"; + case PU: return "purged"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentStorageEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentStorageEnumFactory.java new file mode 100644 index 00000000000..907efab474d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3DocumentStorageEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3DocumentStorageEnumFactory implements EnumFactory { + + public V3DocumentStorage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return V3DocumentStorage.AC; + if ("AA".equals(codeString)) + return V3DocumentStorage.AA; + if ("AR".equals(codeString)) + return V3DocumentStorage.AR; + if ("PU".equals(codeString)) + return V3DocumentStorage.PU; + throw new IllegalArgumentException("Unknown V3DocumentStorage code '"+codeString+"'"); + } + + public String toCode(V3DocumentStorage code) { + if (code == V3DocumentStorage.AC) + return "AC"; + if (code == V3DocumentStorage.AA) + return "AA"; + if (code == V3DocumentStorage.AR) + return "AR"; + if (code == V3DocumentStorage.PU) + return "PU"; + return "?"; + } + + public String toSystem(V3DocumentStorage code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EducationLevel.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EducationLevel.java new file mode 100644 index 00000000000..96ef4312564 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EducationLevel.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EducationLevel { + + /** + * Associate's or technical degree complete + */ + ASSOC, + /** + * College or baccalaureate degree complete + */ + BD, + /** + * Elementary School + */ + ELEM, + /** + * Graduate or professional Degree complete + */ + GD, + /** + * High School or secondary school degree complete + */ + HS, + /** + * Some post-baccalaureate education + */ + PB, + /** + * Doctoral or post graduate education + */ + POSTG, + /** + * Some College education + */ + SCOL, + /** + * Some secondary or high school education + */ + SEC, + /** + * added to help the parsers + */ + NULL; + public static V3EducationLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ASSOC".equals(codeString)) + return ASSOC; + if ("BD".equals(codeString)) + return BD; + if ("ELEM".equals(codeString)) + return ELEM; + if ("GD".equals(codeString)) + return GD; + if ("HS".equals(codeString)) + return HS; + if ("PB".equals(codeString)) + return PB; + if ("POSTG".equals(codeString)) + return POSTG; + if ("SCOL".equals(codeString)) + return SCOL; + if ("SEC".equals(codeString)) + return SEC; + throw new FHIRException("Unknown V3EducationLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ASSOC: return "ASSOC"; + case BD: return "BD"; + case ELEM: return "ELEM"; + case GD: return "GD"; + case HS: return "HS"; + case PB: return "PB"; + case POSTG: return "POSTG"; + case SCOL: return "SCOL"; + case SEC: return "SEC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EducationLevel"; + } + public String getDefinition() { + switch (this) { + case ASSOC: return "Associate's or technical degree complete"; + case BD: return "College or baccalaureate degree complete"; + case ELEM: return "Elementary School"; + case GD: return "Graduate or professional Degree complete"; + case HS: return "High School or secondary school degree complete"; + case PB: return "Some post-baccalaureate education"; + case POSTG: return "Doctoral or post graduate education"; + case SCOL: return "Some College education"; + case SEC: return "Some secondary or high school education"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ASSOC: return "Associate's or technical degree complete"; + case BD: return "College or baccalaureate degree complete"; + case ELEM: return "Elementary School"; + case GD: return "Graduate or professional Degree complete"; + case HS: return "High School or secondary school degree complete"; + case PB: return "Some post-baccalaureate education"; + case POSTG: return "Doctoral or post graduate education"; + case SCOL: return "Some College education"; + case SEC: return "Some secondary or high school education"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EducationLevelEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EducationLevelEnumFactory.java new file mode 100644 index 00000000000..171710c175a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EducationLevelEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EducationLevelEnumFactory implements EnumFactory { + + public V3EducationLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ASSOC".equals(codeString)) + return V3EducationLevel.ASSOC; + if ("BD".equals(codeString)) + return V3EducationLevel.BD; + if ("ELEM".equals(codeString)) + return V3EducationLevel.ELEM; + if ("GD".equals(codeString)) + return V3EducationLevel.GD; + if ("HS".equals(codeString)) + return V3EducationLevel.HS; + if ("PB".equals(codeString)) + return V3EducationLevel.PB; + if ("POSTG".equals(codeString)) + return V3EducationLevel.POSTG; + if ("SCOL".equals(codeString)) + return V3EducationLevel.SCOL; + if ("SEC".equals(codeString)) + return V3EducationLevel.SEC; + throw new IllegalArgumentException("Unknown V3EducationLevel code '"+codeString+"'"); + } + + public String toCode(V3EducationLevel code) { + if (code == V3EducationLevel.ASSOC) + return "ASSOC"; + if (code == V3EducationLevel.BD) + return "BD"; + if (code == V3EducationLevel.ELEM) + return "ELEM"; + if (code == V3EducationLevel.GD) + return "GD"; + if (code == V3EducationLevel.HS) + return "HS"; + if (code == V3EducationLevel.PB) + return "PB"; + if (code == V3EducationLevel.POSTG) + return "POSTG"; + if (code == V3EducationLevel.SCOL) + return "SCOL"; + if (code == V3EducationLevel.SEC) + return "SEC"; + return "?"; + } + + public String toSystem(V3EducationLevel code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EmployeeJobClass.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EmployeeJobClass.java new file mode 100644 index 00000000000..1474b788ed5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EmployeeJobClass.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EmployeeJobClass { + + /** + * Employment in which the employee is expected to work at least a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week) + */ + FT, + /** + * Employment in which the employee is expected to work less than a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week) + */ + PT, + /** + * added to help the parsers + */ + NULL; + public static V3EmployeeJobClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FT".equals(codeString)) + return FT; + if ("PT".equals(codeString)) + return PT; + throw new FHIRException("Unknown V3EmployeeJobClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FT: return "FT"; + case PT: return "PT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EmployeeJobClass"; + } + public String getDefinition() { + switch (this) { + case FT: return "Employment in which the employee is expected to work at least a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week)"; + case PT: return "Employment in which the employee is expected to work less than a standard work week (defined by the US Bureau of Labor Statistics as 35-44 hours per week)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FT: return "full-time"; + case PT: return "part-time"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EmployeeJobClassEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EmployeeJobClassEnumFactory.java new file mode 100644 index 00000000000..3a79f88ade5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EmployeeJobClassEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EmployeeJobClassEnumFactory implements EnumFactory { + + public V3EmployeeJobClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("FT".equals(codeString)) + return V3EmployeeJobClass.FT; + if ("PT".equals(codeString)) + return V3EmployeeJobClass.PT; + throw new IllegalArgumentException("Unknown V3EmployeeJobClass code '"+codeString+"'"); + } + + public String toCode(V3EmployeeJobClass code) { + if (code == V3EmployeeJobClass.FT) + return "FT"; + if (code == V3EmployeeJobClass.PT) + return "PT"; + return "?"; + } + + public String toSystem(V3EmployeeJobClass code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterAdmissionSource.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterAdmissionSource.java new file mode 100644 index 00000000000..fe15dbde55c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterAdmissionSource.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EncounterAdmissionSource { + + /** + * emergency + */ + E, + /** + * labor and delivery + */ + LD, + /** + * newborn + */ + NB, + /** + * added to help the parsers + */ + NULL; + public static V3EncounterAdmissionSource fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("LD".equals(codeString)) + return LD; + if ("NB".equals(codeString)) + return NB; + throw new FHIRException("Unknown V3EncounterAdmissionSource code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case LD: return "LD"; + case NB: return "NB"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EncounterAdmissionSource"; + } + public String getDefinition() { + switch (this) { + case E: return "emergency"; + case LD: return "labor and delivery"; + case NB: return "newborn"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "emergency"; + case LD: return "labor and delivery"; + case NB: return "newborn"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterAdmissionSourceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterAdmissionSourceEnumFactory.java new file mode 100644 index 00000000000..8fe3af4479d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterAdmissionSourceEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EncounterAdmissionSourceEnumFactory implements EnumFactory { + + public V3EncounterAdmissionSource fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return V3EncounterAdmissionSource.E; + if ("LD".equals(codeString)) + return V3EncounterAdmissionSource.LD; + if ("NB".equals(codeString)) + return V3EncounterAdmissionSource.NB; + throw new IllegalArgumentException("Unknown V3EncounterAdmissionSource code '"+codeString+"'"); + } + + public String toCode(V3EncounterAdmissionSource code) { + if (code == V3EncounterAdmissionSource.E) + return "E"; + if (code == V3EncounterAdmissionSource.LD) + return "LD"; + if (code == V3EncounterAdmissionSource.NB) + return "NB"; + return "?"; + } + + public String toSystem(V3EncounterAdmissionSource code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterSpecialCourtesy.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterSpecialCourtesy.java new file mode 100644 index 00000000000..24319dd9355 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterSpecialCourtesy.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EncounterSpecialCourtesy { + + /** + * extended courtesy + */ + EXT, + /** + * normal courtesy + */ + NRM, + /** + * professional courtesy + */ + PRF, + /** + * Courtesies extended to the staff of the entity providing service. + */ + STF, + /** + * very important person + */ + VIP, + /** + * added to help the parsers + */ + NULL; + public static V3EncounterSpecialCourtesy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EXT".equals(codeString)) + return EXT; + if ("NRM".equals(codeString)) + return NRM; + if ("PRF".equals(codeString)) + return PRF; + if ("STF".equals(codeString)) + return STF; + if ("VIP".equals(codeString)) + return VIP; + throw new FHIRException("Unknown V3EncounterSpecialCourtesy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EXT: return "EXT"; + case NRM: return "NRM"; + case PRF: return "PRF"; + case STF: return "STF"; + case VIP: return "VIP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EncounterSpecialCourtesy"; + } + public String getDefinition() { + switch (this) { + case EXT: return "extended courtesy"; + case NRM: return "normal courtesy"; + case PRF: return "professional courtesy"; + case STF: return "Courtesies extended to the staff of the entity providing service."; + case VIP: return "very important person"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EXT: return "extended courtesy"; + case NRM: return "normal courtesy"; + case PRF: return "professional courtesy"; + case STF: return "staff"; + case VIP: return "very important person"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterSpecialCourtesyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterSpecialCourtesyEnumFactory.java new file mode 100644 index 00000000000..a6f6b496952 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EncounterSpecialCourtesyEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EncounterSpecialCourtesyEnumFactory implements EnumFactory { + + public V3EncounterSpecialCourtesy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("EXT".equals(codeString)) + return V3EncounterSpecialCourtesy.EXT; + if ("NRM".equals(codeString)) + return V3EncounterSpecialCourtesy.NRM; + if ("PRF".equals(codeString)) + return V3EncounterSpecialCourtesy.PRF; + if ("STF".equals(codeString)) + return V3EncounterSpecialCourtesy.STF; + if ("VIP".equals(codeString)) + return V3EncounterSpecialCourtesy.VIP; + throw new IllegalArgumentException("Unknown V3EncounterSpecialCourtesy code '"+codeString+"'"); + } + + public String toCode(V3EncounterSpecialCourtesy code) { + if (code == V3EncounterSpecialCourtesy.EXT) + return "EXT"; + if (code == V3EncounterSpecialCourtesy.NRM) + return "NRM"; + if (code == V3EncounterSpecialCourtesy.PRF) + return "PRF"; + if (code == V3EncounterSpecialCourtesy.STF) + return "STF"; + if (code == V3EncounterSpecialCourtesy.VIP) + return "VIP"; + return "?"; + } + + public String toSystem(V3EncounterSpecialCourtesy code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityClass.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityClass.java new file mode 100644 index 00000000000..811be46fc7e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityClass.java @@ -0,0 +1,315 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityClass { + + /** + * Corresponds to the Entity class + */ + ENT, + /** + * A health chart included to serve as a document receiving entity in the management of medical records. + */ + HCE, + /** + * Anything that essentially has the property of life, independent of current state (a dead human corpse is still essentially a living subject). + */ + LIV, + /** + * A subtype of living subject that includes all living things except the species Homo Sapiens. + */ + NLIV, + /** + * A living subject from the animal kingdom. + */ + ANM, + /** + * All single celled living organisms including protozoa, bacteria, yeast, viruses, etc. + */ + MIC, + /** + * A living subject from the order of plants. + */ + PLNT, + /** + * A living subject of the species homo sapiens. + */ + PSN, + /** + * Any thing that has extension in space and mass, may be of living or non-living origin. + */ + MAT, + /** + * A substance that is fully defined by an organic or inorganic chemical formula, includes mixtures of other chemical substances. Refine using, e.g., IUPAC codes. + */ + CHEM, + /** + * Naturally occurring, processed or manufactured entities that are primarily used as food for humans and animals. + */ + FOOD, + /** + * Corresponds to the ManufacturedMaterial class + */ + MMAT, + /** + * A container of other entities. + */ + CONT, + /** + * A type of container that can hold other containers or other holders. + */ + HOLD, + /** + * A subtype of ManufacturedMaterial used in an activity, without being substantially changed through that activity. The kind of device is identified by the code attribute inherited from Entity. + + + Usage: This includes durable (reusable) medical equipment as well as disposable equipment. + */ + DEV, + /** + * A physical artifact that stores information about the granting of authorization. + */ + CER, + /** + * Class to contain unique attributes of diagnostic imaging equipment. + */ + MODDV, + /** + * A social or legal structure formed by human beings. + */ + ORG, + /** + * An agency of the people of a state often assuming some authority over a certain matter. Includes government, governmental agencies, associations. + */ + PUB, + /** + * A politically organized body of people bonded by territory, culture, or ethnicity, having sovereignty (to a certain extent) granted by other states (enclosing or neighboring states). This includes countries (nations), provinces (e.g., one of the United States of America or a French departement), counties or municipalities. Refine using, e.g., ISO country codes, FIPS-PUB state codes, etc. + */ + STATE, + /** + * A politically organized body of people bonded by territory and known as a nation. + */ + NAT, + /** + * A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place may or may not be constant. + */ + PLC, + /** + * The territory of a city, town or other municipality. + */ + CITY, + /** + * The territory of a sovereign nation. + */ + COUNTRY, + /** + * The territory of a county, parish or other division of a state or province. + */ + COUNTY, + /** + * The territory of a state, province, department or other division of a sovereign country. + */ + PROVINCE, + /** + * A grouping of resources (personnel, material, or places) to be used for scheduling purposes. May be a pool of like-type resources, a team, or combination of personnel, material and places. + */ + RGRP, + /** + * added to help the parsers + */ + NULL; + public static V3EntityClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ENT".equals(codeString)) + return ENT; + if ("HCE".equals(codeString)) + return HCE; + if ("LIV".equals(codeString)) + return LIV; + if ("NLIV".equals(codeString)) + return NLIV; + if ("ANM".equals(codeString)) + return ANM; + if ("MIC".equals(codeString)) + return MIC; + if ("PLNT".equals(codeString)) + return PLNT; + if ("PSN".equals(codeString)) + return PSN; + if ("MAT".equals(codeString)) + return MAT; + if ("CHEM".equals(codeString)) + return CHEM; + if ("FOOD".equals(codeString)) + return FOOD; + if ("MMAT".equals(codeString)) + return MMAT; + if ("CONT".equals(codeString)) + return CONT; + if ("HOLD".equals(codeString)) + return HOLD; + if ("DEV".equals(codeString)) + return DEV; + if ("CER".equals(codeString)) + return CER; + if ("MODDV".equals(codeString)) + return MODDV; + if ("ORG".equals(codeString)) + return ORG; + if ("PUB".equals(codeString)) + return PUB; + if ("STATE".equals(codeString)) + return STATE; + if ("NAT".equals(codeString)) + return NAT; + if ("PLC".equals(codeString)) + return PLC; + if ("CITY".equals(codeString)) + return CITY; + if ("COUNTRY".equals(codeString)) + return COUNTRY; + if ("COUNTY".equals(codeString)) + return COUNTY; + if ("PROVINCE".equals(codeString)) + return PROVINCE; + if ("RGRP".equals(codeString)) + return RGRP; + throw new FHIRException("Unknown V3EntityClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ENT: return "ENT"; + case HCE: return "HCE"; + case LIV: return "LIV"; + case NLIV: return "NLIV"; + case ANM: return "ANM"; + case MIC: return "MIC"; + case PLNT: return "PLNT"; + case PSN: return "PSN"; + case MAT: return "MAT"; + case CHEM: return "CHEM"; + case FOOD: return "FOOD"; + case MMAT: return "MMAT"; + case CONT: return "CONT"; + case HOLD: return "HOLD"; + case DEV: return "DEV"; + case CER: return "CER"; + case MODDV: return "MODDV"; + case ORG: return "ORG"; + case PUB: return "PUB"; + case STATE: return "STATE"; + case NAT: return "NAT"; + case PLC: return "PLC"; + case CITY: return "CITY"; + case COUNTRY: return "COUNTRY"; + case COUNTY: return "COUNTY"; + case PROVINCE: return "PROVINCE"; + case RGRP: return "RGRP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityClass"; + } + public String getDefinition() { + switch (this) { + case ENT: return "Corresponds to the Entity class"; + case HCE: return "A health chart included to serve as a document receiving entity in the management of medical records."; + case LIV: return "Anything that essentially has the property of life, independent of current state (a dead human corpse is still essentially a living subject)."; + case NLIV: return "A subtype of living subject that includes all living things except the species Homo Sapiens."; + case ANM: return "A living subject from the animal kingdom."; + case MIC: return "All single celled living organisms including protozoa, bacteria, yeast, viruses, etc."; + case PLNT: return "A living subject from the order of plants."; + case PSN: return "A living subject of the species homo sapiens."; + case MAT: return "Any thing that has extension in space and mass, may be of living or non-living origin."; + case CHEM: return "A substance that is fully defined by an organic or inorganic chemical formula, includes mixtures of other chemical substances. Refine using, e.g., IUPAC codes."; + case FOOD: return "Naturally occurring, processed or manufactured entities that are primarily used as food for humans and animals."; + case MMAT: return "Corresponds to the ManufacturedMaterial class"; + case CONT: return "A container of other entities."; + case HOLD: return "A type of container that can hold other containers or other holders."; + case DEV: return "A subtype of ManufacturedMaterial used in an activity, without being substantially changed through that activity. The kind of device is identified by the code attribute inherited from Entity.\r\n\n \n Usage: This includes durable (reusable) medical equipment as well as disposable equipment."; + case CER: return "A physical artifact that stores information about the granting of authorization."; + case MODDV: return "Class to contain unique attributes of diagnostic imaging equipment."; + case ORG: return "A social or legal structure formed by human beings."; + case PUB: return "An agency of the people of a state often assuming some authority over a certain matter. Includes government, governmental agencies, associations."; + case STATE: return "A politically organized body of people bonded by territory, culture, or ethnicity, having sovereignty (to a certain extent) granted by other states (enclosing or neighboring states). This includes countries (nations), provinces (e.g., one of the United States of America or a French departement), counties or municipalities. Refine using, e.g., ISO country codes, FIPS-PUB state codes, etc."; + case NAT: return "A politically organized body of people bonded by territory and known as a nation."; + case PLC: return "A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place may or may not be constant."; + case CITY: return "The territory of a city, town or other municipality."; + case COUNTRY: return "The territory of a sovereign nation."; + case COUNTY: return "The territory of a county, parish or other division of a state or province."; + case PROVINCE: return "The territory of a state, province, department or other division of a sovereign country."; + case RGRP: return "A grouping of resources (personnel, material, or places) to be used for scheduling purposes. May be a pool of like-type resources, a team, or combination of personnel, material and places."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ENT: return "entity"; + case HCE: return "health chart entity"; + case LIV: return "living subject"; + case NLIV: return "non-person living subject"; + case ANM: return "animal"; + case MIC: return "microorganism"; + case PLNT: return "plant"; + case PSN: return "person"; + case MAT: return "material"; + case CHEM: return "chemical substance"; + case FOOD: return "food"; + case MMAT: return "manufactured material"; + case CONT: return "container"; + case HOLD: return "holder"; + case DEV: return "device"; + case CER: return "certificate representation"; + case MODDV: return "imaging modality"; + case ORG: return "organization"; + case PUB: return "public institution"; + case STATE: return "state"; + case NAT: return "Nation"; + case PLC: return "place"; + case CITY: return "city or town"; + case COUNTRY: return "country"; + case COUNTY: return "county or parish"; + case PROVINCE: return "state or province"; + case RGRP: return "group"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityClassEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityClassEnumFactory.java new file mode 100644 index 00000000000..18892977249 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityClassEnumFactory.java @@ -0,0 +1,162 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityClassEnumFactory implements EnumFactory { + + public V3EntityClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ENT".equals(codeString)) + return V3EntityClass.ENT; + if ("HCE".equals(codeString)) + return V3EntityClass.HCE; + if ("LIV".equals(codeString)) + return V3EntityClass.LIV; + if ("NLIV".equals(codeString)) + return V3EntityClass.NLIV; + if ("ANM".equals(codeString)) + return V3EntityClass.ANM; + if ("MIC".equals(codeString)) + return V3EntityClass.MIC; + if ("PLNT".equals(codeString)) + return V3EntityClass.PLNT; + if ("PSN".equals(codeString)) + return V3EntityClass.PSN; + if ("MAT".equals(codeString)) + return V3EntityClass.MAT; + if ("CHEM".equals(codeString)) + return V3EntityClass.CHEM; + if ("FOOD".equals(codeString)) + return V3EntityClass.FOOD; + if ("MMAT".equals(codeString)) + return V3EntityClass.MMAT; + if ("CONT".equals(codeString)) + return V3EntityClass.CONT; + if ("HOLD".equals(codeString)) + return V3EntityClass.HOLD; + if ("DEV".equals(codeString)) + return V3EntityClass.DEV; + if ("CER".equals(codeString)) + return V3EntityClass.CER; + if ("MODDV".equals(codeString)) + return V3EntityClass.MODDV; + if ("ORG".equals(codeString)) + return V3EntityClass.ORG; + if ("PUB".equals(codeString)) + return V3EntityClass.PUB; + if ("STATE".equals(codeString)) + return V3EntityClass.STATE; + if ("NAT".equals(codeString)) + return V3EntityClass.NAT; + if ("PLC".equals(codeString)) + return V3EntityClass.PLC; + if ("CITY".equals(codeString)) + return V3EntityClass.CITY; + if ("COUNTRY".equals(codeString)) + return V3EntityClass.COUNTRY; + if ("COUNTY".equals(codeString)) + return V3EntityClass.COUNTY; + if ("PROVINCE".equals(codeString)) + return V3EntityClass.PROVINCE; + if ("RGRP".equals(codeString)) + return V3EntityClass.RGRP; + throw new IllegalArgumentException("Unknown V3EntityClass code '"+codeString+"'"); + } + + public String toCode(V3EntityClass code) { + if (code == V3EntityClass.ENT) + return "ENT"; + if (code == V3EntityClass.HCE) + return "HCE"; + if (code == V3EntityClass.LIV) + return "LIV"; + if (code == V3EntityClass.NLIV) + return "NLIV"; + if (code == V3EntityClass.ANM) + return "ANM"; + if (code == V3EntityClass.MIC) + return "MIC"; + if (code == V3EntityClass.PLNT) + return "PLNT"; + if (code == V3EntityClass.PSN) + return "PSN"; + if (code == V3EntityClass.MAT) + return "MAT"; + if (code == V3EntityClass.CHEM) + return "CHEM"; + if (code == V3EntityClass.FOOD) + return "FOOD"; + if (code == V3EntityClass.MMAT) + return "MMAT"; + if (code == V3EntityClass.CONT) + return "CONT"; + if (code == V3EntityClass.HOLD) + return "HOLD"; + if (code == V3EntityClass.DEV) + return "DEV"; + if (code == V3EntityClass.CER) + return "CER"; + if (code == V3EntityClass.MODDV) + return "MODDV"; + if (code == V3EntityClass.ORG) + return "ORG"; + if (code == V3EntityClass.PUB) + return "PUB"; + if (code == V3EntityClass.STATE) + return "STATE"; + if (code == V3EntityClass.NAT) + return "NAT"; + if (code == V3EntityClass.PLC) + return "PLC"; + if (code == V3EntityClass.CITY) + return "CITY"; + if (code == V3EntityClass.COUNTRY) + return "COUNTRY"; + if (code == V3EntityClass.COUNTY) + return "COUNTY"; + if (code == V3EntityClass.PROVINCE) + return "PROVINCE"; + if (code == V3EntityClass.RGRP) + return "RGRP"; + return "?"; + } + + public String toSystem(V3EntityClass code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityCode.java new file mode 100644 index 00000000000..84c95576779 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityCode.java @@ -0,0 +1,1382 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityCode { + + /** + * Types of Material for EntityClass "MAT" + */ + _MATERIALENTITYCLASSTYPE, + /** + * Material intended to hold another material for purpose of storage or transport. + */ + _CONTAINERENTITYTYPE, + /** + * A material intended to hold other materials for purposes of storage or transportation + */ + PKG, + /** + * A container having dimensions that adjust somewhat based on the amount and shape of the material placed within it. + */ + _NONRIGIDCONTAINERENTITYTYPE, + /** + * A pouched or pendulous container. + */ + BAG, + /** + * A paper + */ + PACKT, + /** + * A small bag or container made of a soft material. + */ + PCH, + /** + * A small bag or packet containing a small portion of a substance. + */ + SACH, + /** + * A container having a fixed and inflexible dimensions and volume + */ + _RIGIDCONTAINERENTITYTYPE, + /** + * Container intended to contain sufficient material for only one use. + */ + _INDIVIDUALPACKAGEENTITYTYPE, + /** + * A small sealed glass container that holds a measured amount of a medicinal substance. + */ + AMP, + /** + * Individually dosed ophthalmic solution. One time eye dropper dispenser. + */ + MINIM, + /** + * Individually dosed inhalation solution. + */ + NEBAMP, + /** + * A container either glass or plastic and a narrow neck, for storing liquid. + */ + OVUL, + /** + * A container intended to contain sufficient material for more than one use. (I.e. Material is intended to be removed from the container at more than one discrete time period.) + */ + _MULTIUSECONTAINERENTITYTYPE, + /** + * A container, typically rounded, either glass or plastic with a narrow neck and capable of storing liquid. + */ + BOT, + /** + * A bottle of yellow to brown color. Used to store light-sensitive materials + */ + BOTA, + /** + * A bottle with a cap designed to release the contained liquid in droplets of a specific size. + */ + BOTD, + /** + * A bottle made of glass + */ + BOTG, + /** + * A bottle made of plastic + */ + BOTP, + /** + * A bottle made of polyethylene + */ + BOTPLY, + /** + * A 6-sided container commonly made from paper or cardboard used for solid forms. + */ + BOX, + /** + * A metal container in which a material is hermetically sealed to enable storage over long periods. + */ + CAN, + /** + * A sealed container of liquid or powder intended to be loaded into a device. + */ + CART, + /** + * A pressurized metal container holding a substance released as a spray or aerosol. + */ + CNSTR, + /** + * A container of glass, earthenware, plastic, etc. Top of the container has a diameter of similar size to the diameter of the container as a whole + */ + JAR, + /** + * A deep vessel for holding liquids, with a handle and often with a spout or lip shape for pouring. + */ + JUG, + /** + * A lidded container made of thin sheet metal. + */ + TIN, + /** + * An open flat bottomed round container. + */ + TUB, + /** + * A long hollow rigid or flexible cylinder. Material is extruded by squeezing the container. + */ + TUBE, + /** + * A small cylindrical glass for holding liquid medicines. + */ + VIAL, + /** + * A bubblepack. Medications sealed individually, separated into doses. + */ + BLSTRPK, + /** + * A bubble pack card. Multiple individual/separated doses. + */ + CARD, + /** + * A container intended to contain sufficient material for more than one use, but grouped or organized to provide individual access to sufficient material for a single use. Often used to ensure that the proper type and amount of material is consumed/expended for each use. + */ + COMPPKG, + /** + * Rotatable dispenser. Eg. Birth control package. + */ + DIALPK, + /** + * Object that is thin, flat, and circular. Doses of medication often contained in bubbles on the disk. + */ + DISK, + /** + * Special packaging that will help patients take their medications on a regular basis. + */ + DOSET, + /** + * A continuous strip of plastic sectioned into individual pouches, each one containing the quantity of 1 or more medications intended to be administered at a specific time + */ + STRIP, + /** + * A container for a diverse collection of products intended to be used together for some purpose (e.g. Medicinal kits often contain a syringe, a needle and the injectable medication). + */ + KIT, + /** + * A kit in which the components are interconnected. + */ + SYSTM, + /** + * A device with direct or indirect therapeutic purpose. Values for EntityCode when EntityClass = "DEV" + */ + _MEDICALDEVICE, + /** + * A device used to allow access to a part of a body + */ + _ACCESSMEDICALDEVICE, + /** + * A hollow tube used to administer a substance into a vein, artery or body cavity + */ + LINE, + /** + * A line used to administer a substance into an artery + */ + IALINE, + /** + * A line used to administer a substance into a vein + */ + IVLINE, + /** + * A device intended to administer a substance to a subject + */ + _ADMINISTRATIONMEDICALDEVICE, + /** + * A device intended to administer liquid into a subject via a + */ + _INJECTIONMEDICALDEVICE, + /** + * Automatically injects medication. + */ + AINJ, + /** + * A device which can contain a cartridge for injection purposes. Eg. Insulin pen. + */ + PEN, + /** + * A barrel with a plunger. + */ + SYR, + /** + * A device used to apply a liquid or powder to a surface. + */ + APLCTR, + /** + * A small device used for inhaling medicine in the form of a vapour or gas in order to ease a respiratory condition such as asthma or to relieve nasal congestion. + */ + INH, + /** + * The device used to inhale the doses of medication contained in the disk form. + */ + DSKS, + /** + * The device used to inhale the doses of medication contained in the disk form. + */ + DSKUNH, + /** + * Asthma medication delivery device. + */ + TRBINH, + /** + * A device that is used to raise, compress, or transfer liquids or gases and is operated by a piston or similar mechanism. + */ + PMP, + /** + * Set of codes related to specimen additives + */ + _SPECIMENADDITIVEENTITY, + /** + * ACD Solution A of trisodium citrate, 22.0g/L; citric acid, 8.0 g/L; and dextrose 24.5 g/L. Used in Blood banking and histocompatibilty testing + */ + ACDA, + /** + * ACD Solution B of trisodium citrate, 13.2g/L; citric acid, 4.8 g/L; and dextrose 14.7 g/L. Used in Blood banking and histocompatibilty testing. + */ + ACDB, + /** + * 50% V/V acetic acid in water. Used as a urine preservative + */ + ACET, + /** + * Sodium Chloride 3.0g, Potassium Chloride 0.2g, Calcium Chloride 0.1g, Magnesium Chloride 0.1g, Monopotassium Phosphate 0.2g, Disodium Phosphate 1.15g, Sodium Thiogly collate 1.0g, Distilled Water 1 liter + */ + AMIES, + /** + * Any medium used to maintain bacterial viability (e.g. Stuart's, Cary-Blair, Amies) + */ + BACTM, + /** + * Formaldehyde 4% w/v; methyl alcohol 1% w/v; phosphate buffering salts. Tissue preservative + */ + BF10, + /** + * Powdered boric acid (usually 10 g) added to 24-hour urine collections as a preservative. + */ + BOR, + /** + * Picric acid, saturated aqueous solution (750.0 ml), 37-40% formalin (250.0 ml), glacial acetic acid (50.0 ml). Tissue preservative. + */ + BOUIN, + /** + * 50% skim milk in 0.01 M phosphate-buffered saline. Maintain virus viability + */ + BSKM, + /** + * A 3.2% solution of Sodium Citrate in water. Used as a blood preservative + */ + C32, + /** + * A 3.8% solution of Sodium Citrate in water. Used as a blood preservative + */ + C38, + /** + * A modification of buffered 10% formalin used as a general tissue preservative. + */ + CARS, + /** + * Sodium Thioglycollate 1.5 g, Disodium Hydrogen Phosphate 1.1 g, Sodium Chloride 5.0 g, Calcium Chloride 0.09 g, Agar 5.0 g, per Liter of Water + */ + CARY, + /** + * Any of a number of non-nutritive buffered media used to maintain Chlamydia viability during transportation to the laboratory + */ + CHLTM, + /** + * Buffered tri-sodium citrate solution with theophylline, adenosine and dipyridamole + */ + CTAD, + /** + * Potassium EDTA 15% solution in water + */ + EDTK15, + /** + * Potassium EDTA 7.5% solution in water + */ + EDTK75, + /** + * Sodium fluoride and Disodium EDTA + */ + EDTN, + /** + * Any of a number of non-nutritive buffered media used to maintain enteric bacterial viability during transportation to the laboratory + */ + ENT, + /** + * A 10% v/v solution in water of formalin( a 37% solution of formaldehyde and water). Used for tissue preservation. + */ + F10, + /** + * Thrombin plus soybean trypsin inhibitor. For use in identifying fibrn degredation products. + */ + FDP, + /** + * Sodium fluoride, 10mg added as a urine preservative. + */ + FL10, + /** + * Sodium fluoride, 100mg added as a urine preservative. + */ + FL100, + /** + * A solution of HCl containing 6moles of hydrogen ion/L. Used as a Urine Preservative. + */ + HCL6, + /** + * Ammonium heparin + */ + HEPA, + /** + * Lithium heparin salt + */ + HEPL, + /** + * Sodium heparin salt + */ + HEPN, + /** + * 6N Nitric acid used to preserve urine for heavy metal analysis. + */ + HNO3, + /** + * A transport medium formulated to maintain Bordetella pertussis viability. + */ + JKM, + /** + * 5% Glutaraldehyde, 4% Formaldehyde in 0.08M buffer. Tissue preservation + */ + KARN, + /** + * Potassium oxalate and sodium fluoride in a 1.25:1 ratio + */ + KOX, + /** + * Iodoacetate lithium salt + */ + LIA, + /** + * Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with HEPES buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to + */ + M4, + /** + * Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Gentamicin and amphotericin B are used to inhibit c + */ + M4RT, + /** + * Modified Hank's balanced salt solution supplemented with protein stabilizers, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to inhibit c + */ + M5, + /** + * 1M potassium citrate, pH 7.0 2.5 ml, 0.1M magnesium sulfate 5.0 ml, 0.1M N-ethyl malemide 5.0 ml, dH2O 87.5 ml, ammonium sulfate 55gm. Preserve antigens for Immunofluorescence procedures + */ + MICHTM, + /** + * A buffered medium with ammonium sulfate added to preserve antigens for Immunofluorescence procedures + */ + MMDTM, + /** + * Sodium fluoride + */ + NAF, + /** + * No additive. Specifically identifes the specimen as having no additives. + */ + NONE, + /** + * 0.12 g NaCl, 0.004 g MgSO, 0.004 g, CaCl, 0.142 g Na2HPO4 and 0.136 g KH2PO4 per liter of distilled water. Maintain Acanthaoemba viability. + */ + PAGE, + /** + * Phenol. Urine preservative + */ + PHENOL, + /** + * Polyvinyl alcohol + */ + PVA, + /** + * A transport medium formulated to maintain Bordetella pertussis viability. + */ + RLM, + /** + * Diatomaceous earth. For glucose determination blood samples + */ + SILICA, + /** + * Sodium polyanethol sulfonate in saline. Anticomplementary and antiphagocytic properties. Used in blood culture collection. + */ + SPS, + /** + * Polymer separator gel with clot activator + */ + SST, + /** + * Sodium Glycerophosphate 10.0g, Calcium Chloride 0.1g, Mercaptoacetic Acid 1.0ml, Distilled Water 1 liter + */ + STUTM, + /** + * Thrombin. Accelerates clotting. + */ + THROM, + /** + * 2-Isopropyl-5-methyl phenol. A preservative for 24 Hr Urine samples + */ + THYMOL, + /** + * A nutritive medium with a reducing agent (sodium thioglycolate) which, due to a chemical reaction, removes oxygen from the broth. + */ + THYO, + /** + * Also known as Methylbenzene; Toluol; Phenylmethane. A preservative for 24 Hr Urine samples + */ + TOLU, + /** + * A buffered salt solution with antifungal agents added for the collection and transport of Ureaplasma specimens. + */ + URETM, + /** + * Sucrose 74.6g, Potassium hydrogenphosphate 0.52g, L-glutamic acid 0.72g, Bovine serum albumin 5.0g, Gentamicin 50mg, Potassium dihydrogenphosphate 1.25g, L-15 medium 9.9L, Water to 10L. Maintain Virus viability. + */ + VIRTM, + /** + * 3.8% Citrate buffered to a pH of 5.5 for Westergren Sedimentation Rate + */ + WEST, + /** + * A manufactured product that is produced from the raw blood oi a donor with the intention of using it in a recipient transfusion. + */ + BLDPRD, + /** + * A Type of medicine that creates an immune protection without the recipient experiencing the disease. + */ + VCCNE, + /** + * A substance whose therapeutic effect is produced by chemical action within the body. + */ + _DRUGENTITY, + /** + * Any substance or mixture of substances manufactured, sold or represented for use in: (a) the diagnosis, treatment, mitigation or prevention of a disease, disorder, abnormal physical state, or its symptoms, in human beings or animals; (b) restoring, correcting or modifying organic functions in human beings or animals. + */ + _CLINICALDRUG, + /** + * Indicates types of allergy and intolerance agents which are non-drugs. (E.g. foods, latex, etc.) + */ + _NONDRUGAGENTENTITY, + /** + * egg + */ + NDA01, + /** + * fish + */ + NDA02, + /** + * lactose + */ + NDA03, + /** + * peanut + */ + NDA04, + /** + * soy + */ + NDA05, + /** + * sulfites + */ + NDA06, + /** + * wheat or gluten + */ + NDA07, + /** + * isocyanates + */ + NDA08, + /** + * solvents + */ + NDA09, + /** + * oils + */ + NDA10, + /** + * venoms + */ + NDA11, + /** + * latex + */ + NDA12, + /** + * shellfish + */ + NDA13, + /** + * strawberries + */ + NDA14, + /** + * tomatoes + */ + NDA15, + /** + * dust + */ + NDA16, + /** + * dust mites + */ + NDA17, + /** + * Further classifies entities of classCode ORG. + */ + _ORGANIZATIONENTITYTYPE, + /** + * The group of persons who occupy a single housing unit. + */ + HHOLD, + /** + * Codes identifying nation states. Allows for finer grained specification of Entity with classcode <= NAT + + + Example:ISO3166 country codes. + */ + NAT, + /** + * An organization that provides religious rites of worship. + */ + RELIG, + /** + * Types of places for EntityClass "PLC" + */ + _PLACEENTITYTYPE, + /** + * The location of a bed + */ + BED, + /** + * The location of a building + */ + BLDG, + /** + * The location of a floor of a building + */ + FLOOR, + /** + * The location of a room + */ + ROOM, + /** + * The location of a wing of a building (e.g. East Wing). The same room number for the same floor number can be distinguished by wing number in some situations + */ + WING, + /** + * Codes to characterize a Resource Group using categories that typify its membership and/or function + + . + + + Example: PractitionerGroup + */ + _RESOURCEGROUPENTITYTYPE, + /** + * PractitionerGroup + */ + PRAC, + /** + * added to help the parsers + */ + NULL; + public static V3EntityCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MaterialEntityClassType".equals(codeString)) + return _MATERIALENTITYCLASSTYPE; + if ("_ContainerEntityType".equals(codeString)) + return _CONTAINERENTITYTYPE; + if ("PKG".equals(codeString)) + return PKG; + if ("_NonRigidContainerEntityType".equals(codeString)) + return _NONRIGIDCONTAINERENTITYTYPE; + if ("BAG".equals(codeString)) + return BAG; + if ("PACKT".equals(codeString)) + return PACKT; + if ("PCH".equals(codeString)) + return PCH; + if ("SACH".equals(codeString)) + return SACH; + if ("_RigidContainerEntityType".equals(codeString)) + return _RIGIDCONTAINERENTITYTYPE; + if ("_IndividualPackageEntityType".equals(codeString)) + return _INDIVIDUALPACKAGEENTITYTYPE; + if ("AMP".equals(codeString)) + return AMP; + if ("MINIM".equals(codeString)) + return MINIM; + if ("NEBAMP".equals(codeString)) + return NEBAMP; + if ("OVUL".equals(codeString)) + return OVUL; + if ("_MultiUseContainerEntityType".equals(codeString)) + return _MULTIUSECONTAINERENTITYTYPE; + if ("BOT".equals(codeString)) + return BOT; + if ("BOTA".equals(codeString)) + return BOTA; + if ("BOTD".equals(codeString)) + return BOTD; + if ("BOTG".equals(codeString)) + return BOTG; + if ("BOTP".equals(codeString)) + return BOTP; + if ("BOTPLY".equals(codeString)) + return BOTPLY; + if ("BOX".equals(codeString)) + return BOX; + if ("CAN".equals(codeString)) + return CAN; + if ("CART".equals(codeString)) + return CART; + if ("CNSTR".equals(codeString)) + return CNSTR; + if ("JAR".equals(codeString)) + return JAR; + if ("JUG".equals(codeString)) + return JUG; + if ("TIN".equals(codeString)) + return TIN; + if ("TUB".equals(codeString)) + return TUB; + if ("TUBE".equals(codeString)) + return TUBE; + if ("VIAL".equals(codeString)) + return VIAL; + if ("BLSTRPK".equals(codeString)) + return BLSTRPK; + if ("CARD".equals(codeString)) + return CARD; + if ("COMPPKG".equals(codeString)) + return COMPPKG; + if ("DIALPK".equals(codeString)) + return DIALPK; + if ("DISK".equals(codeString)) + return DISK; + if ("DOSET".equals(codeString)) + return DOSET; + if ("STRIP".equals(codeString)) + return STRIP; + if ("KIT".equals(codeString)) + return KIT; + if ("SYSTM".equals(codeString)) + return SYSTM; + if ("_MedicalDevice".equals(codeString)) + return _MEDICALDEVICE; + if ("_AccessMedicalDevice".equals(codeString)) + return _ACCESSMEDICALDEVICE; + if ("LINE".equals(codeString)) + return LINE; + if ("IALINE".equals(codeString)) + return IALINE; + if ("IVLINE".equals(codeString)) + return IVLINE; + if ("_AdministrationMedicalDevice".equals(codeString)) + return _ADMINISTRATIONMEDICALDEVICE; + if ("_InjectionMedicalDevice".equals(codeString)) + return _INJECTIONMEDICALDEVICE; + if ("AINJ".equals(codeString)) + return AINJ; + if ("PEN".equals(codeString)) + return PEN; + if ("SYR".equals(codeString)) + return SYR; + if ("APLCTR".equals(codeString)) + return APLCTR; + if ("INH".equals(codeString)) + return INH; + if ("DSKS".equals(codeString)) + return DSKS; + if ("DSKUNH".equals(codeString)) + return DSKUNH; + if ("TRBINH".equals(codeString)) + return TRBINH; + if ("PMP".equals(codeString)) + return PMP; + if ("_SpecimenAdditiveEntity".equals(codeString)) + return _SPECIMENADDITIVEENTITY; + if ("ACDA".equals(codeString)) + return ACDA; + if ("ACDB".equals(codeString)) + return ACDB; + if ("ACET".equals(codeString)) + return ACET; + if ("AMIES".equals(codeString)) + return AMIES; + if ("BACTM".equals(codeString)) + return BACTM; + if ("BF10".equals(codeString)) + return BF10; + if ("BOR".equals(codeString)) + return BOR; + if ("BOUIN".equals(codeString)) + return BOUIN; + if ("BSKM".equals(codeString)) + return BSKM; + if ("C32".equals(codeString)) + return C32; + if ("C38".equals(codeString)) + return C38; + if ("CARS".equals(codeString)) + return CARS; + if ("CARY".equals(codeString)) + return CARY; + if ("CHLTM".equals(codeString)) + return CHLTM; + if ("CTAD".equals(codeString)) + return CTAD; + if ("EDTK15".equals(codeString)) + return EDTK15; + if ("EDTK75".equals(codeString)) + return EDTK75; + if ("EDTN".equals(codeString)) + return EDTN; + if ("ENT".equals(codeString)) + return ENT; + if ("F10".equals(codeString)) + return F10; + if ("FDP".equals(codeString)) + return FDP; + if ("FL10".equals(codeString)) + return FL10; + if ("FL100".equals(codeString)) + return FL100; + if ("HCL6".equals(codeString)) + return HCL6; + if ("HEPA".equals(codeString)) + return HEPA; + if ("HEPL".equals(codeString)) + return HEPL; + if ("HEPN".equals(codeString)) + return HEPN; + if ("HNO3".equals(codeString)) + return HNO3; + if ("JKM".equals(codeString)) + return JKM; + if ("KARN".equals(codeString)) + return KARN; + if ("KOX".equals(codeString)) + return KOX; + if ("LIA".equals(codeString)) + return LIA; + if ("M4".equals(codeString)) + return M4; + if ("M4RT".equals(codeString)) + return M4RT; + if ("M5".equals(codeString)) + return M5; + if ("MICHTM".equals(codeString)) + return MICHTM; + if ("MMDTM".equals(codeString)) + return MMDTM; + if ("NAF".equals(codeString)) + return NAF; + if ("NONE".equals(codeString)) + return NONE; + if ("PAGE".equals(codeString)) + return PAGE; + if ("PHENOL".equals(codeString)) + return PHENOL; + if ("PVA".equals(codeString)) + return PVA; + if ("RLM".equals(codeString)) + return RLM; + if ("SILICA".equals(codeString)) + return SILICA; + if ("SPS".equals(codeString)) + return SPS; + if ("SST".equals(codeString)) + return SST; + if ("STUTM".equals(codeString)) + return STUTM; + if ("THROM".equals(codeString)) + return THROM; + if ("THYMOL".equals(codeString)) + return THYMOL; + if ("THYO".equals(codeString)) + return THYO; + if ("TOLU".equals(codeString)) + return TOLU; + if ("URETM".equals(codeString)) + return URETM; + if ("VIRTM".equals(codeString)) + return VIRTM; + if ("WEST".equals(codeString)) + return WEST; + if ("BLDPRD".equals(codeString)) + return BLDPRD; + if ("VCCNE".equals(codeString)) + return VCCNE; + if ("_DrugEntity".equals(codeString)) + return _DRUGENTITY; + if ("_ClinicalDrug".equals(codeString)) + return _CLINICALDRUG; + if ("_NonDrugAgentEntity".equals(codeString)) + return _NONDRUGAGENTENTITY; + if ("NDA01".equals(codeString)) + return NDA01; + if ("NDA02".equals(codeString)) + return NDA02; + if ("NDA03".equals(codeString)) + return NDA03; + if ("NDA04".equals(codeString)) + return NDA04; + if ("NDA05".equals(codeString)) + return NDA05; + if ("NDA06".equals(codeString)) + return NDA06; + if ("NDA07".equals(codeString)) + return NDA07; + if ("NDA08".equals(codeString)) + return NDA08; + if ("NDA09".equals(codeString)) + return NDA09; + if ("NDA10".equals(codeString)) + return NDA10; + if ("NDA11".equals(codeString)) + return NDA11; + if ("NDA12".equals(codeString)) + return NDA12; + if ("NDA13".equals(codeString)) + return NDA13; + if ("NDA14".equals(codeString)) + return NDA14; + if ("NDA15".equals(codeString)) + return NDA15; + if ("NDA16".equals(codeString)) + return NDA16; + if ("NDA17".equals(codeString)) + return NDA17; + if ("_OrganizationEntityType".equals(codeString)) + return _ORGANIZATIONENTITYTYPE; + if ("HHOLD".equals(codeString)) + return HHOLD; + if ("NAT".equals(codeString)) + return NAT; + if ("RELIG".equals(codeString)) + return RELIG; + if ("_PlaceEntityType".equals(codeString)) + return _PLACEENTITYTYPE; + if ("BED".equals(codeString)) + return BED; + if ("BLDG".equals(codeString)) + return BLDG; + if ("FLOOR".equals(codeString)) + return FLOOR; + if ("ROOM".equals(codeString)) + return ROOM; + if ("WING".equals(codeString)) + return WING; + if ("_ResourceGroupEntityType".equals(codeString)) + return _RESOURCEGROUPENTITYTYPE; + if ("PRAC".equals(codeString)) + return PRAC; + throw new FHIRException("Unknown V3EntityCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _MATERIALENTITYCLASSTYPE: return "_MaterialEntityClassType"; + case _CONTAINERENTITYTYPE: return "_ContainerEntityType"; + case PKG: return "PKG"; + case _NONRIGIDCONTAINERENTITYTYPE: return "_NonRigidContainerEntityType"; + case BAG: return "BAG"; + case PACKT: return "PACKT"; + case PCH: return "PCH"; + case SACH: return "SACH"; + case _RIGIDCONTAINERENTITYTYPE: return "_RigidContainerEntityType"; + case _INDIVIDUALPACKAGEENTITYTYPE: return "_IndividualPackageEntityType"; + case AMP: return "AMP"; + case MINIM: return "MINIM"; + case NEBAMP: return "NEBAMP"; + case OVUL: return "OVUL"; + case _MULTIUSECONTAINERENTITYTYPE: return "_MultiUseContainerEntityType"; + case BOT: return "BOT"; + case BOTA: return "BOTA"; + case BOTD: return "BOTD"; + case BOTG: return "BOTG"; + case BOTP: return "BOTP"; + case BOTPLY: return "BOTPLY"; + case BOX: return "BOX"; + case CAN: return "CAN"; + case CART: return "CART"; + case CNSTR: return "CNSTR"; + case JAR: return "JAR"; + case JUG: return "JUG"; + case TIN: return "TIN"; + case TUB: return "TUB"; + case TUBE: return "TUBE"; + case VIAL: return "VIAL"; + case BLSTRPK: return "BLSTRPK"; + case CARD: return "CARD"; + case COMPPKG: return "COMPPKG"; + case DIALPK: return "DIALPK"; + case DISK: return "DISK"; + case DOSET: return "DOSET"; + case STRIP: return "STRIP"; + case KIT: return "KIT"; + case SYSTM: return "SYSTM"; + case _MEDICALDEVICE: return "_MedicalDevice"; + case _ACCESSMEDICALDEVICE: return "_AccessMedicalDevice"; + case LINE: return "LINE"; + case IALINE: return "IALINE"; + case IVLINE: return "IVLINE"; + case _ADMINISTRATIONMEDICALDEVICE: return "_AdministrationMedicalDevice"; + case _INJECTIONMEDICALDEVICE: return "_InjectionMedicalDevice"; + case AINJ: return "AINJ"; + case PEN: return "PEN"; + case SYR: return "SYR"; + case APLCTR: return "APLCTR"; + case INH: return "INH"; + case DSKS: return "DSKS"; + case DSKUNH: return "DSKUNH"; + case TRBINH: return "TRBINH"; + case PMP: return "PMP"; + case _SPECIMENADDITIVEENTITY: return "_SpecimenAdditiveEntity"; + case ACDA: return "ACDA"; + case ACDB: return "ACDB"; + case ACET: return "ACET"; + case AMIES: return "AMIES"; + case BACTM: return "BACTM"; + case BF10: return "BF10"; + case BOR: return "BOR"; + case BOUIN: return "BOUIN"; + case BSKM: return "BSKM"; + case C32: return "C32"; + case C38: return "C38"; + case CARS: return "CARS"; + case CARY: return "CARY"; + case CHLTM: return "CHLTM"; + case CTAD: return "CTAD"; + case EDTK15: return "EDTK15"; + case EDTK75: return "EDTK75"; + case EDTN: return "EDTN"; + case ENT: return "ENT"; + case F10: return "F10"; + case FDP: return "FDP"; + case FL10: return "FL10"; + case FL100: return "FL100"; + case HCL6: return "HCL6"; + case HEPA: return "HEPA"; + case HEPL: return "HEPL"; + case HEPN: return "HEPN"; + case HNO3: return "HNO3"; + case JKM: return "JKM"; + case KARN: return "KARN"; + case KOX: return "KOX"; + case LIA: return "LIA"; + case M4: return "M4"; + case M4RT: return "M4RT"; + case M5: return "M5"; + case MICHTM: return "MICHTM"; + case MMDTM: return "MMDTM"; + case NAF: return "NAF"; + case NONE: return "NONE"; + case PAGE: return "PAGE"; + case PHENOL: return "PHENOL"; + case PVA: return "PVA"; + case RLM: return "RLM"; + case SILICA: return "SILICA"; + case SPS: return "SPS"; + case SST: return "SST"; + case STUTM: return "STUTM"; + case THROM: return "THROM"; + case THYMOL: return "THYMOL"; + case THYO: return "THYO"; + case TOLU: return "TOLU"; + case URETM: return "URETM"; + case VIRTM: return "VIRTM"; + case WEST: return "WEST"; + case BLDPRD: return "BLDPRD"; + case VCCNE: return "VCCNE"; + case _DRUGENTITY: return "_DrugEntity"; + case _CLINICALDRUG: return "_ClinicalDrug"; + case _NONDRUGAGENTENTITY: return "_NonDrugAgentEntity"; + case NDA01: return "NDA01"; + case NDA02: return "NDA02"; + case NDA03: return "NDA03"; + case NDA04: return "NDA04"; + case NDA05: return "NDA05"; + case NDA06: return "NDA06"; + case NDA07: return "NDA07"; + case NDA08: return "NDA08"; + case NDA09: return "NDA09"; + case NDA10: return "NDA10"; + case NDA11: return "NDA11"; + case NDA12: return "NDA12"; + case NDA13: return "NDA13"; + case NDA14: return "NDA14"; + case NDA15: return "NDA15"; + case NDA16: return "NDA16"; + case NDA17: return "NDA17"; + case _ORGANIZATIONENTITYTYPE: return "_OrganizationEntityType"; + case HHOLD: return "HHOLD"; + case NAT: return "NAT"; + case RELIG: return "RELIG"; + case _PLACEENTITYTYPE: return "_PlaceEntityType"; + case BED: return "BED"; + case BLDG: return "BLDG"; + case FLOOR: return "FLOOR"; + case ROOM: return "ROOM"; + case WING: return "WING"; + case _RESOURCEGROUPENTITYTYPE: return "_ResourceGroupEntityType"; + case PRAC: return "PRAC"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityCode"; + } + public String getDefinition() { + switch (this) { + case _MATERIALENTITYCLASSTYPE: return "Types of Material for EntityClass \"MAT\""; + case _CONTAINERENTITYTYPE: return "Material intended to hold another material for purpose of storage or transport."; + case PKG: return "A material intended to hold other materials for purposes of storage or transportation"; + case _NONRIGIDCONTAINERENTITYTYPE: return "A container having dimensions that adjust somewhat based on the amount and shape of the material placed within it."; + case BAG: return "A pouched or pendulous container."; + case PACKT: return "A paper"; + case PCH: return "A small bag or container made of a soft material."; + case SACH: return "A small bag or packet containing a small portion of a substance."; + case _RIGIDCONTAINERENTITYTYPE: return "A container having a fixed and inflexible dimensions and volume"; + case _INDIVIDUALPACKAGEENTITYTYPE: return "Container intended to contain sufficient material for only one use."; + case AMP: return "A small sealed glass container that holds a measured amount of a medicinal substance."; + case MINIM: return "Individually dosed ophthalmic solution. One time eye dropper dispenser."; + case NEBAMP: return "Individually dosed inhalation solution."; + case OVUL: return "A container either glass or plastic and a narrow neck, for storing liquid."; + case _MULTIUSECONTAINERENTITYTYPE: return "A container intended to contain sufficient material for more than one use. (I.e. Material is intended to be removed from the container at more than one discrete time period.)"; + case BOT: return "A container, typically rounded, either glass or plastic with a narrow neck and capable of storing liquid."; + case BOTA: return "A bottle of yellow to brown color. Used to store light-sensitive materials"; + case BOTD: return "A bottle with a cap designed to release the contained liquid in droplets of a specific size."; + case BOTG: return "A bottle made of glass"; + case BOTP: return "A bottle made of plastic"; + case BOTPLY: return "A bottle made of polyethylene"; + case BOX: return "A 6-sided container commonly made from paper or cardboard used for solid forms."; + case CAN: return "A metal container in which a material is hermetically sealed to enable storage over long periods."; + case CART: return "A sealed container of liquid or powder intended to be loaded into a device."; + case CNSTR: return "A pressurized metal container holding a substance released as a spray or aerosol."; + case JAR: return "A container of glass, earthenware, plastic, etc. Top of the container has a diameter of similar size to the diameter of the container as a whole"; + case JUG: return "A deep vessel for holding liquids, with a handle and often with a spout or lip shape for pouring."; + case TIN: return "A lidded container made of thin sheet metal."; + case TUB: return "An open flat bottomed round container."; + case TUBE: return "A long hollow rigid or flexible cylinder. Material is extruded by squeezing the container."; + case VIAL: return "A small cylindrical glass for holding liquid medicines."; + case BLSTRPK: return "A bubblepack. Medications sealed individually, separated into doses."; + case CARD: return "A bubble pack card. Multiple individual/separated doses."; + case COMPPKG: return "A container intended to contain sufficient material for more than one use, but grouped or organized to provide individual access to sufficient material for a single use. Often used to ensure that the proper type and amount of material is consumed/expended for each use."; + case DIALPK: return "Rotatable dispenser. Eg. Birth control package."; + case DISK: return "Object that is thin, flat, and circular. Doses of medication often contained in bubbles on the disk."; + case DOSET: return "Special packaging that will help patients take their medications on a regular basis."; + case STRIP: return "A continuous strip of plastic sectioned into individual pouches, each one containing the quantity of 1 or more medications intended to be administered at a specific time"; + case KIT: return "A container for a diverse collection of products intended to be used together for some purpose (e.g. Medicinal kits often contain a syringe, a needle and the injectable medication)."; + case SYSTM: return "A kit in which the components are interconnected."; + case _MEDICALDEVICE: return "A device with direct or indirect therapeutic purpose. Values for EntityCode when EntityClass = \"DEV\""; + case _ACCESSMEDICALDEVICE: return "A device used to allow access to a part of a body"; + case LINE: return "A hollow tube used to administer a substance into a vein, artery or body cavity"; + case IALINE: return "A line used to administer a substance into an artery"; + case IVLINE: return "A line used to administer a substance into a vein"; + case _ADMINISTRATIONMEDICALDEVICE: return "A device intended to administer a substance to a subject"; + case _INJECTIONMEDICALDEVICE: return "A device intended to administer liquid into a subject via a"; + case AINJ: return "Automatically injects medication."; + case PEN: return "A device which can contain a cartridge for injection purposes. Eg. Insulin pen."; + case SYR: return "A barrel with a plunger."; + case APLCTR: return "A device used to apply a liquid or powder to a surface."; + case INH: return "A small device used for inhaling medicine in the form of a vapour or gas in order to ease a respiratory condition such as asthma or to relieve nasal congestion."; + case DSKS: return "The device used to inhale the doses of medication contained in the disk form."; + case DSKUNH: return "The device used to inhale the doses of medication contained in the disk form."; + case TRBINH: return "Asthma medication delivery device."; + case PMP: return "A device that is used to raise, compress, or transfer liquids or gases and is operated by a piston or similar mechanism."; + case _SPECIMENADDITIVEENTITY: return "Set of codes related to specimen additives"; + case ACDA: return "ACD Solution A of trisodium citrate, 22.0g/L; citric acid, 8.0 g/L; and dextrose 24.5 g/L. Used in Blood banking and histocompatibilty testing"; + case ACDB: return "ACD Solution B of trisodium citrate, 13.2g/L; citric acid, 4.8 g/L; and dextrose 14.7 g/L. Used in Blood banking and histocompatibilty testing."; + case ACET: return "50% V/V acetic acid in water. Used as a urine preservative"; + case AMIES: return "Sodium Chloride 3.0g, Potassium Chloride 0.2g, Calcium Chloride 0.1g, Magnesium Chloride 0.1g, Monopotassium Phosphate 0.2g, Disodium Phosphate 1.15g, Sodium Thiogly collate 1.0g, Distilled Water 1 liter"; + case BACTM: return "Any medium used to maintain bacterial viability (e.g. Stuart's, Cary-Blair, Amies)"; + case BF10: return "Formaldehyde 4% w/v; methyl alcohol 1% w/v; phosphate buffering salts. Tissue preservative"; + case BOR: return "Powdered boric acid (usually 10 g) added to 24-hour urine collections as a preservative."; + case BOUIN: return "Picric acid, saturated aqueous solution (750.0 ml), 37-40% formalin (250.0 ml), glacial acetic acid (50.0 ml). Tissue preservative."; + case BSKM: return "50% skim milk in 0.01 M phosphate-buffered saline. Maintain virus viability"; + case C32: return "A 3.2% solution of Sodium Citrate in water. Used as a blood preservative"; + case C38: return "A 3.8% solution of Sodium Citrate in water. Used as a blood preservative"; + case CARS: return "A modification of buffered 10% formalin used as a general tissue preservative."; + case CARY: return "Sodium Thioglycollate 1.5 g, Disodium Hydrogen Phosphate 1.1 g, Sodium Chloride 5.0 g, Calcium Chloride 0.09 g, Agar 5.0 g, per Liter of Water"; + case CHLTM: return "Any of a number of non-nutritive buffered media used to maintain Chlamydia viability during transportation to the laboratory"; + case CTAD: return "Buffered tri-sodium citrate solution with theophylline, adenosine and dipyridamole"; + case EDTK15: return "Potassium EDTA 15% solution in water"; + case EDTK75: return "Potassium EDTA 7.5% solution in water"; + case EDTN: return "Sodium fluoride and Disodium EDTA"; + case ENT: return "Any of a number of non-nutritive buffered media used to maintain enteric bacterial viability during transportation to the laboratory"; + case F10: return "A 10% v/v solution in water of formalin( a 37% solution of formaldehyde and water). Used for tissue preservation."; + case FDP: return "Thrombin plus soybean trypsin inhibitor. For use in identifying fibrn degredation products."; + case FL10: return "Sodium fluoride, 10mg added as a urine preservative."; + case FL100: return "Sodium fluoride, 100mg added as a urine preservative."; + case HCL6: return "A solution of HCl containing 6moles of hydrogen ion/L. Used as a Urine Preservative."; + case HEPA: return "Ammonium heparin"; + case HEPL: return "Lithium heparin salt"; + case HEPN: return "Sodium heparin salt"; + case HNO3: return "6N Nitric acid used to preserve urine for heavy metal analysis."; + case JKM: return "A transport medium formulated to maintain Bordetella pertussis viability."; + case KARN: return "5% Glutaraldehyde, 4% Formaldehyde in 0.08M buffer. Tissue preservation"; + case KOX: return "Potassium oxalate and sodium fluoride in a 1.25:1 ratio"; + case LIA: return "Iodoacetate lithium salt"; + case M4: return "Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with HEPES buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to"; + case M4RT: return "Modified Hank's balanced salt solution supplemented with bovine serum albumin, gelatin, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Gentamicin and amphotericin B are used to inhibit c"; + case M5: return "Modified Hank's balanced salt solution supplemented with protein stabilizers, sucrose and glutamic acid. It is buffered to pH 7.3+ or - 0.2 with Hepes buffer. Phenol red is used to indicate pH. Vancomycin, Amphotericin B and Colistin are used to inhibit c"; + case MICHTM: return "1M potassium citrate, pH 7.0 2.5 ml, 0.1M magnesium sulfate 5.0 ml, 0.1M N-ethyl malemide 5.0 ml, dH2O 87.5 ml, ammonium sulfate 55gm. Preserve antigens for Immunofluorescence procedures"; + case MMDTM: return "A buffered medium with ammonium sulfate added to preserve antigens for Immunofluorescence procedures"; + case NAF: return "Sodium fluoride"; + case NONE: return "No additive. Specifically identifes the specimen as having no additives."; + case PAGE: return "0.12 g NaCl, 0.004 g MgSO, 0.004 g, CaCl, 0.142 g Na2HPO4 and 0.136 g KH2PO4 per liter of distilled water. Maintain Acanthaoemba viability."; + case PHENOL: return "Phenol. Urine preservative"; + case PVA: return "Polyvinyl alcohol"; + case RLM: return "A transport medium formulated to maintain Bordetella pertussis viability."; + case SILICA: return "Diatomaceous earth. For glucose determination blood samples"; + case SPS: return "Sodium polyanethol sulfonate in saline. Anticomplementary and antiphagocytic properties. Used in blood culture collection."; + case SST: return "Polymer separator gel with clot activator"; + case STUTM: return "Sodium Glycerophosphate 10.0g, Calcium Chloride 0.1g, Mercaptoacetic Acid 1.0ml, Distilled Water 1 liter"; + case THROM: return "Thrombin. Accelerates clotting."; + case THYMOL: return "2-Isopropyl-5-methyl phenol. A preservative for 24 Hr Urine samples"; + case THYO: return "A nutritive medium with a reducing agent (sodium thioglycolate) which, due to a chemical reaction, removes oxygen from the broth."; + case TOLU: return "Also known as Methylbenzene; Toluol; Phenylmethane. A preservative for 24 Hr Urine samples"; + case URETM: return "A buffered salt solution with antifungal agents added for the collection and transport of Ureaplasma specimens."; + case VIRTM: return "Sucrose 74.6g, Potassium hydrogenphosphate 0.52g, L-glutamic acid 0.72g, Bovine serum albumin 5.0g, Gentamicin 50mg, Potassium dihydrogenphosphate 1.25g, L-15 medium 9.9L, Water to 10L. Maintain Virus viability."; + case WEST: return "3.8% Citrate buffered to a pH of 5.5 for Westergren Sedimentation Rate"; + case BLDPRD: return "A manufactured product that is produced from the raw blood oi a donor with the intention of using it in a recipient transfusion."; + case VCCNE: return "A Type of medicine that creates an immune protection without the recipient experiencing the disease."; + case _DRUGENTITY: return "A substance whose therapeutic effect is produced by chemical action within the body."; + case _CLINICALDRUG: return "Any substance or mixture of substances manufactured, sold or represented for use in: (a) the diagnosis, treatment, mitigation or prevention of a disease, disorder, abnormal physical state, or its symptoms, in human beings or animals; (b) restoring, correcting or modifying organic functions in human beings or animals."; + case _NONDRUGAGENTENTITY: return "Indicates types of allergy and intolerance agents which are non-drugs. (E.g. foods, latex, etc.)"; + case NDA01: return "egg"; + case NDA02: return "fish"; + case NDA03: return "lactose"; + case NDA04: return "peanut"; + case NDA05: return "soy"; + case NDA06: return "sulfites"; + case NDA07: return "wheat or gluten"; + case NDA08: return "isocyanates"; + case NDA09: return "solvents"; + case NDA10: return "oils"; + case NDA11: return "venoms"; + case NDA12: return "latex"; + case NDA13: return "shellfish"; + case NDA14: return "strawberries"; + case NDA15: return "tomatoes"; + case NDA16: return "dust"; + case NDA17: return "dust mites"; + case _ORGANIZATIONENTITYTYPE: return "Further classifies entities of classCode ORG."; + case HHOLD: return "The group of persons who occupy a single housing unit."; + case NAT: return "Codes identifying nation states. Allows for finer grained specification of Entity with classcode <= NAT\r\n\n \n Example:ISO3166 country codes."; + case RELIG: return "An organization that provides religious rites of worship."; + case _PLACEENTITYTYPE: return "Types of places for EntityClass \"PLC\""; + case BED: return "The location of a bed"; + case BLDG: return "The location of a building"; + case FLOOR: return "The location of a floor of a building"; + case ROOM: return "The location of a room"; + case WING: return "The location of a wing of a building (e.g. East Wing). The same room number for the same floor number can be distinguished by wing number in some situations"; + case _RESOURCEGROUPENTITYTYPE: return "Codes to characterize a Resource Group using categories that typify its membership and/or function\r\n\n .\r\n\n \n Example: PractitionerGroup"; + case PRAC: return "PractitionerGroup"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _MATERIALENTITYCLASSTYPE: return "MaterialEntityClassType"; + case _CONTAINERENTITYTYPE: return "ContainerEntityType"; + case PKG: return "Package"; + case _NONRIGIDCONTAINERENTITYTYPE: return "NonRigidContainerEntityType"; + case BAG: return "Bag"; + case PACKT: return "Packet"; + case PCH: return "Pouch"; + case SACH: return "Sachet"; + case _RIGIDCONTAINERENTITYTYPE: return "RigidContainerEntityType"; + case _INDIVIDUALPACKAGEENTITYTYPE: return "IndividualPackageEntityType"; + case AMP: return "Ampule"; + case MINIM: return "Minim"; + case NEBAMP: return "Nebuamp"; + case OVUL: return "Ovule"; + case _MULTIUSECONTAINERENTITYTYPE: return "MultiUseContainerEntityType"; + case BOT: return "Bottle"; + case BOTA: return "Amber Bottle"; + case BOTD: return "Dropper Bottle"; + case BOTG: return "Glass Bottle"; + case BOTP: return "Plastic Bottle"; + case BOTPLY: return "Polyethylene Bottle"; + case BOX: return "Box"; + case CAN: return "Can"; + case CART: return "Cartridge"; + case CNSTR: return "Canister"; + case JAR: return "Jar"; + case JUG: return "Jug"; + case TIN: return "Tin"; + case TUB: return "Tub"; + case TUBE: return "Tube"; + case VIAL: return "Vial"; + case BLSTRPK: return "Blister Pack"; + case CARD: return "Card"; + case COMPPKG: return "Compliance Package"; + case DIALPK: return "Dial Pack"; + case DISK: return "Disk"; + case DOSET: return "Dosette"; + case STRIP: return "Strip"; + case KIT: return "Kit"; + case SYSTM: return "System"; + case _MEDICALDEVICE: return "MedicalDevice"; + case _ACCESSMEDICALDEVICE: return "AccessMedicalDevice"; + case LINE: return "Line"; + case IALINE: return "Intra-arterial Line"; + case IVLINE: return "Intraveneous Line"; + case _ADMINISTRATIONMEDICALDEVICE: return "AdministrationMedicalDevice"; + case _INJECTIONMEDICALDEVICE: return "InjectionMedicalDevice"; + case AINJ: return "AutoInjector"; + case PEN: return "Pen"; + case SYR: return "Syringe"; + case APLCTR: return "Applicator"; + case INH: return "Inhaler"; + case DSKS: return "Diskus"; + case DSKUNH: return "Diskhaler"; + case TRBINH: return "Turbuhaler"; + case PMP: return "Pump"; + case _SPECIMENADDITIVEENTITY: return "SpecimenAdditiveEntity"; + case ACDA: return "ACD Solution A"; + case ACDB: return "ACD Solution B"; + case ACET: return "Acetic Acid"; + case AMIES: return "Amies transport medium"; + case BACTM: return "Bacterial Transport medium"; + case BF10: return "Buffered 10% formalin"; + case BOR: return "Boric Acid"; + case BOUIN: return "Bouin's solution"; + case BSKM: return "Buffered skim milk"; + case C32: return "3.2% Citrate"; + case C38: return "3.8% Citrate"; + case CARS: return "Carson's Modified 10% formalin"; + case CARY: return "Cary Blair Medium"; + case CHLTM: return "Chlamydia transport medium"; + case CTAD: return "CTAD"; + case EDTK15: return "Potassium/K EDTA 15%"; + case EDTK75: return "Potassium/K EDTA 7.5%"; + case EDTN: return "Sodium/Na EDTA"; + case ENT: return "Enteric bacteria transport medium"; + case F10: return "10% Formalin"; + case FDP: return "Thrombin NIH; soybean trypsin inhibitor"; + case FL10: return "Sodium Fluoride, 10mg"; + case FL100: return "Sodium Fluoride, 100mg"; + case HCL6: return "6N HCL"; + case HEPA: return "Ammonium heparin"; + case HEPL: return "Lithium/Li Heparin"; + case HEPN: return "Sodium/Na Heparin"; + case HNO3: return "Nitric Acid"; + case JKM: return "Jones Kendrick Medium"; + case KARN: return "Karnovsky's fixative"; + case KOX: return "Potassium Oxalate"; + case LIA: return "Lithium iodoacetate"; + case M4: return "M4"; + case M4RT: return "M4-RT"; + case M5: return "M5"; + case MICHTM: return "Michel's transport medium"; + case MMDTM: return "MMD transport medium"; + case NAF: return "Sodium Fluoride"; + case NONE: return "None"; + case PAGE: return "Page's Saline"; + case PHENOL: return "Phenol"; + case PVA: return "Polyvinylalcohol"; + case RLM: return "Reagan Lowe Medium"; + case SILICA: return "Siliceous earth"; + case SPS: return "Sodium polyanethol sulfonate 0.35% in 0.85% sodium chloride"; + case SST: return "Serum Separator Tube"; + case STUTM: return "Stuart transport medium"; + case THROM: return "Thrombin"; + case THYMOL: return "Thymol"; + case THYO: return "Thyoglycolate broth"; + case TOLU: return "Toluene"; + case URETM: return "Ureaplasma transport medium"; + case VIRTM: return "Viral Transport medium"; + case WEST: return "Buffered Citrate"; + case BLDPRD: return "Blood Product"; + case VCCNE: return "Vaccine"; + case _DRUGENTITY: return "DrugEntity"; + case _CLINICALDRUG: return "ClinicalDrug"; + case _NONDRUGAGENTENTITY: return "NonDrugAgentEntity"; + case NDA01: return "egg"; + case NDA02: return "fish"; + case NDA03: return "lactose"; + case NDA04: return "peanut"; + case NDA05: return "soy"; + case NDA06: return "sulfites"; + case NDA07: return "wheat or gluten"; + case NDA08: return "isocyanates"; + case NDA09: return "solvents"; + case NDA10: return "oils"; + case NDA11: return "venoms"; + case NDA12: return "latex"; + case NDA13: return "shellfish"; + case NDA14: return "strawberries"; + case NDA15: return "tomatoes"; + case NDA16: return "dust"; + case NDA17: return "dust mites"; + case _ORGANIZATIONENTITYTYPE: return "OrganizationEntityType"; + case HHOLD: return "household"; + case NAT: return "NationEntityType"; + case RELIG: return "religious institution"; + case _PLACEENTITYTYPE: return "PlaceEntityType"; + case BED: return "Bed Location"; + case BLDG: return "Building Location"; + case FLOOR: return "Floor Location"; + case ROOM: return "Room Location"; + case WING: return "Wing Location"; + case _RESOURCEGROUPENTITYTYPE: return "ResourceGroupEntityType"; + case PRAC: return "PractitionerGroup"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityCodeEnumFactory.java new file mode 100644 index 00000000000..261019f95ae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityCodeEnumFactory.java @@ -0,0 +1,634 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityCodeEnumFactory implements EnumFactory { + + public V3EntityCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_MaterialEntityClassType".equals(codeString)) + return V3EntityCode._MATERIALENTITYCLASSTYPE; + if ("_ContainerEntityType".equals(codeString)) + return V3EntityCode._CONTAINERENTITYTYPE; + if ("PKG".equals(codeString)) + return V3EntityCode.PKG; + if ("_NonRigidContainerEntityType".equals(codeString)) + return V3EntityCode._NONRIGIDCONTAINERENTITYTYPE; + if ("BAG".equals(codeString)) + return V3EntityCode.BAG; + if ("PACKT".equals(codeString)) + return V3EntityCode.PACKT; + if ("PCH".equals(codeString)) + return V3EntityCode.PCH; + if ("SACH".equals(codeString)) + return V3EntityCode.SACH; + if ("_RigidContainerEntityType".equals(codeString)) + return V3EntityCode._RIGIDCONTAINERENTITYTYPE; + if ("_IndividualPackageEntityType".equals(codeString)) + return V3EntityCode._INDIVIDUALPACKAGEENTITYTYPE; + if ("AMP".equals(codeString)) + return V3EntityCode.AMP; + if ("MINIM".equals(codeString)) + return V3EntityCode.MINIM; + if ("NEBAMP".equals(codeString)) + return V3EntityCode.NEBAMP; + if ("OVUL".equals(codeString)) + return V3EntityCode.OVUL; + if ("_MultiUseContainerEntityType".equals(codeString)) + return V3EntityCode._MULTIUSECONTAINERENTITYTYPE; + if ("BOT".equals(codeString)) + return V3EntityCode.BOT; + if ("BOTA".equals(codeString)) + return V3EntityCode.BOTA; + if ("BOTD".equals(codeString)) + return V3EntityCode.BOTD; + if ("BOTG".equals(codeString)) + return V3EntityCode.BOTG; + if ("BOTP".equals(codeString)) + return V3EntityCode.BOTP; + if ("BOTPLY".equals(codeString)) + return V3EntityCode.BOTPLY; + if ("BOX".equals(codeString)) + return V3EntityCode.BOX; + if ("CAN".equals(codeString)) + return V3EntityCode.CAN; + if ("CART".equals(codeString)) + return V3EntityCode.CART; + if ("CNSTR".equals(codeString)) + return V3EntityCode.CNSTR; + if ("JAR".equals(codeString)) + return V3EntityCode.JAR; + if ("JUG".equals(codeString)) + return V3EntityCode.JUG; + if ("TIN".equals(codeString)) + return V3EntityCode.TIN; + if ("TUB".equals(codeString)) + return V3EntityCode.TUB; + if ("TUBE".equals(codeString)) + return V3EntityCode.TUBE; + if ("VIAL".equals(codeString)) + return V3EntityCode.VIAL; + if ("BLSTRPK".equals(codeString)) + return V3EntityCode.BLSTRPK; + if ("CARD".equals(codeString)) + return V3EntityCode.CARD; + if ("COMPPKG".equals(codeString)) + return V3EntityCode.COMPPKG; + if ("DIALPK".equals(codeString)) + return V3EntityCode.DIALPK; + if ("DISK".equals(codeString)) + return V3EntityCode.DISK; + if ("DOSET".equals(codeString)) + return V3EntityCode.DOSET; + if ("STRIP".equals(codeString)) + return V3EntityCode.STRIP; + if ("KIT".equals(codeString)) + return V3EntityCode.KIT; + if ("SYSTM".equals(codeString)) + return V3EntityCode.SYSTM; + if ("_MedicalDevice".equals(codeString)) + return V3EntityCode._MEDICALDEVICE; + if ("_AccessMedicalDevice".equals(codeString)) + return V3EntityCode._ACCESSMEDICALDEVICE; + if ("LINE".equals(codeString)) + return V3EntityCode.LINE; + if ("IALINE".equals(codeString)) + return V3EntityCode.IALINE; + if ("IVLINE".equals(codeString)) + return V3EntityCode.IVLINE; + if ("_AdministrationMedicalDevice".equals(codeString)) + return V3EntityCode._ADMINISTRATIONMEDICALDEVICE; + if ("_InjectionMedicalDevice".equals(codeString)) + return V3EntityCode._INJECTIONMEDICALDEVICE; + if ("AINJ".equals(codeString)) + return V3EntityCode.AINJ; + if ("PEN".equals(codeString)) + return V3EntityCode.PEN; + if ("SYR".equals(codeString)) + return V3EntityCode.SYR; + if ("APLCTR".equals(codeString)) + return V3EntityCode.APLCTR; + if ("INH".equals(codeString)) + return V3EntityCode.INH; + if ("DSKS".equals(codeString)) + return V3EntityCode.DSKS; + if ("DSKUNH".equals(codeString)) + return V3EntityCode.DSKUNH; + if ("TRBINH".equals(codeString)) + return V3EntityCode.TRBINH; + if ("PMP".equals(codeString)) + return V3EntityCode.PMP; + if ("_SpecimenAdditiveEntity".equals(codeString)) + return V3EntityCode._SPECIMENADDITIVEENTITY; + if ("ACDA".equals(codeString)) + return V3EntityCode.ACDA; + if ("ACDB".equals(codeString)) + return V3EntityCode.ACDB; + if ("ACET".equals(codeString)) + return V3EntityCode.ACET; + if ("AMIES".equals(codeString)) + return V3EntityCode.AMIES; + if ("BACTM".equals(codeString)) + return V3EntityCode.BACTM; + if ("BF10".equals(codeString)) + return V3EntityCode.BF10; + if ("BOR".equals(codeString)) + return V3EntityCode.BOR; + if ("BOUIN".equals(codeString)) + return V3EntityCode.BOUIN; + if ("BSKM".equals(codeString)) + return V3EntityCode.BSKM; + if ("C32".equals(codeString)) + return V3EntityCode.C32; + if ("C38".equals(codeString)) + return V3EntityCode.C38; + if ("CARS".equals(codeString)) + return V3EntityCode.CARS; + if ("CARY".equals(codeString)) + return V3EntityCode.CARY; + if ("CHLTM".equals(codeString)) + return V3EntityCode.CHLTM; + if ("CTAD".equals(codeString)) + return V3EntityCode.CTAD; + if ("EDTK15".equals(codeString)) + return V3EntityCode.EDTK15; + if ("EDTK75".equals(codeString)) + return V3EntityCode.EDTK75; + if ("EDTN".equals(codeString)) + return V3EntityCode.EDTN; + if ("ENT".equals(codeString)) + return V3EntityCode.ENT; + if ("F10".equals(codeString)) + return V3EntityCode.F10; + if ("FDP".equals(codeString)) + return V3EntityCode.FDP; + if ("FL10".equals(codeString)) + return V3EntityCode.FL10; + if ("FL100".equals(codeString)) + return V3EntityCode.FL100; + if ("HCL6".equals(codeString)) + return V3EntityCode.HCL6; + if ("HEPA".equals(codeString)) + return V3EntityCode.HEPA; + if ("HEPL".equals(codeString)) + return V3EntityCode.HEPL; + if ("HEPN".equals(codeString)) + return V3EntityCode.HEPN; + if ("HNO3".equals(codeString)) + return V3EntityCode.HNO3; + if ("JKM".equals(codeString)) + return V3EntityCode.JKM; + if ("KARN".equals(codeString)) + return V3EntityCode.KARN; + if ("KOX".equals(codeString)) + return V3EntityCode.KOX; + if ("LIA".equals(codeString)) + return V3EntityCode.LIA; + if ("M4".equals(codeString)) + return V3EntityCode.M4; + if ("M4RT".equals(codeString)) + return V3EntityCode.M4RT; + if ("M5".equals(codeString)) + return V3EntityCode.M5; + if ("MICHTM".equals(codeString)) + return V3EntityCode.MICHTM; + if ("MMDTM".equals(codeString)) + return V3EntityCode.MMDTM; + if ("NAF".equals(codeString)) + return V3EntityCode.NAF; + if ("NONE".equals(codeString)) + return V3EntityCode.NONE; + if ("PAGE".equals(codeString)) + return V3EntityCode.PAGE; + if ("PHENOL".equals(codeString)) + return V3EntityCode.PHENOL; + if ("PVA".equals(codeString)) + return V3EntityCode.PVA; + if ("RLM".equals(codeString)) + return V3EntityCode.RLM; + if ("SILICA".equals(codeString)) + return V3EntityCode.SILICA; + if ("SPS".equals(codeString)) + return V3EntityCode.SPS; + if ("SST".equals(codeString)) + return V3EntityCode.SST; + if ("STUTM".equals(codeString)) + return V3EntityCode.STUTM; + if ("THROM".equals(codeString)) + return V3EntityCode.THROM; + if ("THYMOL".equals(codeString)) + return V3EntityCode.THYMOL; + if ("THYO".equals(codeString)) + return V3EntityCode.THYO; + if ("TOLU".equals(codeString)) + return V3EntityCode.TOLU; + if ("URETM".equals(codeString)) + return V3EntityCode.URETM; + if ("VIRTM".equals(codeString)) + return V3EntityCode.VIRTM; + if ("WEST".equals(codeString)) + return V3EntityCode.WEST; + if ("BLDPRD".equals(codeString)) + return V3EntityCode.BLDPRD; + if ("VCCNE".equals(codeString)) + return V3EntityCode.VCCNE; + if ("_DrugEntity".equals(codeString)) + return V3EntityCode._DRUGENTITY; + if ("_ClinicalDrug".equals(codeString)) + return V3EntityCode._CLINICALDRUG; + if ("_NonDrugAgentEntity".equals(codeString)) + return V3EntityCode._NONDRUGAGENTENTITY; + if ("NDA01".equals(codeString)) + return V3EntityCode.NDA01; + if ("NDA02".equals(codeString)) + return V3EntityCode.NDA02; + if ("NDA03".equals(codeString)) + return V3EntityCode.NDA03; + if ("NDA04".equals(codeString)) + return V3EntityCode.NDA04; + if ("NDA05".equals(codeString)) + return V3EntityCode.NDA05; + if ("NDA06".equals(codeString)) + return V3EntityCode.NDA06; + if ("NDA07".equals(codeString)) + return V3EntityCode.NDA07; + if ("NDA08".equals(codeString)) + return V3EntityCode.NDA08; + if ("NDA09".equals(codeString)) + return V3EntityCode.NDA09; + if ("NDA10".equals(codeString)) + return V3EntityCode.NDA10; + if ("NDA11".equals(codeString)) + return V3EntityCode.NDA11; + if ("NDA12".equals(codeString)) + return V3EntityCode.NDA12; + if ("NDA13".equals(codeString)) + return V3EntityCode.NDA13; + if ("NDA14".equals(codeString)) + return V3EntityCode.NDA14; + if ("NDA15".equals(codeString)) + return V3EntityCode.NDA15; + if ("NDA16".equals(codeString)) + return V3EntityCode.NDA16; + if ("NDA17".equals(codeString)) + return V3EntityCode.NDA17; + if ("_OrganizationEntityType".equals(codeString)) + return V3EntityCode._ORGANIZATIONENTITYTYPE; + if ("HHOLD".equals(codeString)) + return V3EntityCode.HHOLD; + if ("NAT".equals(codeString)) + return V3EntityCode.NAT; + if ("RELIG".equals(codeString)) + return V3EntityCode.RELIG; + if ("_PlaceEntityType".equals(codeString)) + return V3EntityCode._PLACEENTITYTYPE; + if ("BED".equals(codeString)) + return V3EntityCode.BED; + if ("BLDG".equals(codeString)) + return V3EntityCode.BLDG; + if ("FLOOR".equals(codeString)) + return V3EntityCode.FLOOR; + if ("ROOM".equals(codeString)) + return V3EntityCode.ROOM; + if ("WING".equals(codeString)) + return V3EntityCode.WING; + if ("_ResourceGroupEntityType".equals(codeString)) + return V3EntityCode._RESOURCEGROUPENTITYTYPE; + if ("PRAC".equals(codeString)) + return V3EntityCode.PRAC; + throw new IllegalArgumentException("Unknown V3EntityCode code '"+codeString+"'"); + } + + public String toCode(V3EntityCode code) { + if (code == V3EntityCode._MATERIALENTITYCLASSTYPE) + return "_MaterialEntityClassType"; + if (code == V3EntityCode._CONTAINERENTITYTYPE) + return "_ContainerEntityType"; + if (code == V3EntityCode.PKG) + return "PKG"; + if (code == V3EntityCode._NONRIGIDCONTAINERENTITYTYPE) + return "_NonRigidContainerEntityType"; + if (code == V3EntityCode.BAG) + return "BAG"; + if (code == V3EntityCode.PACKT) + return "PACKT"; + if (code == V3EntityCode.PCH) + return "PCH"; + if (code == V3EntityCode.SACH) + return "SACH"; + if (code == V3EntityCode._RIGIDCONTAINERENTITYTYPE) + return "_RigidContainerEntityType"; + if (code == V3EntityCode._INDIVIDUALPACKAGEENTITYTYPE) + return "_IndividualPackageEntityType"; + if (code == V3EntityCode.AMP) + return "AMP"; + if (code == V3EntityCode.MINIM) + return "MINIM"; + if (code == V3EntityCode.NEBAMP) + return "NEBAMP"; + if (code == V3EntityCode.OVUL) + return "OVUL"; + if (code == V3EntityCode._MULTIUSECONTAINERENTITYTYPE) + return "_MultiUseContainerEntityType"; + if (code == V3EntityCode.BOT) + return "BOT"; + if (code == V3EntityCode.BOTA) + return "BOTA"; + if (code == V3EntityCode.BOTD) + return "BOTD"; + if (code == V3EntityCode.BOTG) + return "BOTG"; + if (code == V3EntityCode.BOTP) + return "BOTP"; + if (code == V3EntityCode.BOTPLY) + return "BOTPLY"; + if (code == V3EntityCode.BOX) + return "BOX"; + if (code == V3EntityCode.CAN) + return "CAN"; + if (code == V3EntityCode.CART) + return "CART"; + if (code == V3EntityCode.CNSTR) + return "CNSTR"; + if (code == V3EntityCode.JAR) + return "JAR"; + if (code == V3EntityCode.JUG) + return "JUG"; + if (code == V3EntityCode.TIN) + return "TIN"; + if (code == V3EntityCode.TUB) + return "TUB"; + if (code == V3EntityCode.TUBE) + return "TUBE"; + if (code == V3EntityCode.VIAL) + return "VIAL"; + if (code == V3EntityCode.BLSTRPK) + return "BLSTRPK"; + if (code == V3EntityCode.CARD) + return "CARD"; + if (code == V3EntityCode.COMPPKG) + return "COMPPKG"; + if (code == V3EntityCode.DIALPK) + return "DIALPK"; + if (code == V3EntityCode.DISK) + return "DISK"; + if (code == V3EntityCode.DOSET) + return "DOSET"; + if (code == V3EntityCode.STRIP) + return "STRIP"; + if (code == V3EntityCode.KIT) + return "KIT"; + if (code == V3EntityCode.SYSTM) + return "SYSTM"; + if (code == V3EntityCode._MEDICALDEVICE) + return "_MedicalDevice"; + if (code == V3EntityCode._ACCESSMEDICALDEVICE) + return "_AccessMedicalDevice"; + if (code == V3EntityCode.LINE) + return "LINE"; + if (code == V3EntityCode.IALINE) + return "IALINE"; + if (code == V3EntityCode.IVLINE) + return "IVLINE"; + if (code == V3EntityCode._ADMINISTRATIONMEDICALDEVICE) + return "_AdministrationMedicalDevice"; + if (code == V3EntityCode._INJECTIONMEDICALDEVICE) + return "_InjectionMedicalDevice"; + if (code == V3EntityCode.AINJ) + return "AINJ"; + if (code == V3EntityCode.PEN) + return "PEN"; + if (code == V3EntityCode.SYR) + return "SYR"; + if (code == V3EntityCode.APLCTR) + return "APLCTR"; + if (code == V3EntityCode.INH) + return "INH"; + if (code == V3EntityCode.DSKS) + return "DSKS"; + if (code == V3EntityCode.DSKUNH) + return "DSKUNH"; + if (code == V3EntityCode.TRBINH) + return "TRBINH"; + if (code == V3EntityCode.PMP) + return "PMP"; + if (code == V3EntityCode._SPECIMENADDITIVEENTITY) + return "_SpecimenAdditiveEntity"; + if (code == V3EntityCode.ACDA) + return "ACDA"; + if (code == V3EntityCode.ACDB) + return "ACDB"; + if (code == V3EntityCode.ACET) + return "ACET"; + if (code == V3EntityCode.AMIES) + return "AMIES"; + if (code == V3EntityCode.BACTM) + return "BACTM"; + if (code == V3EntityCode.BF10) + return "BF10"; + if (code == V3EntityCode.BOR) + return "BOR"; + if (code == V3EntityCode.BOUIN) + return "BOUIN"; + if (code == V3EntityCode.BSKM) + return "BSKM"; + if (code == V3EntityCode.C32) + return "C32"; + if (code == V3EntityCode.C38) + return "C38"; + if (code == V3EntityCode.CARS) + return "CARS"; + if (code == V3EntityCode.CARY) + return "CARY"; + if (code == V3EntityCode.CHLTM) + return "CHLTM"; + if (code == V3EntityCode.CTAD) + return "CTAD"; + if (code == V3EntityCode.EDTK15) + return "EDTK15"; + if (code == V3EntityCode.EDTK75) + return "EDTK75"; + if (code == V3EntityCode.EDTN) + return "EDTN"; + if (code == V3EntityCode.ENT) + return "ENT"; + if (code == V3EntityCode.F10) + return "F10"; + if (code == V3EntityCode.FDP) + return "FDP"; + if (code == V3EntityCode.FL10) + return "FL10"; + if (code == V3EntityCode.FL100) + return "FL100"; + if (code == V3EntityCode.HCL6) + return "HCL6"; + if (code == V3EntityCode.HEPA) + return "HEPA"; + if (code == V3EntityCode.HEPL) + return "HEPL"; + if (code == V3EntityCode.HEPN) + return "HEPN"; + if (code == V3EntityCode.HNO3) + return "HNO3"; + if (code == V3EntityCode.JKM) + return "JKM"; + if (code == V3EntityCode.KARN) + return "KARN"; + if (code == V3EntityCode.KOX) + return "KOX"; + if (code == V3EntityCode.LIA) + return "LIA"; + if (code == V3EntityCode.M4) + return "M4"; + if (code == V3EntityCode.M4RT) + return "M4RT"; + if (code == V3EntityCode.M5) + return "M5"; + if (code == V3EntityCode.MICHTM) + return "MICHTM"; + if (code == V3EntityCode.MMDTM) + return "MMDTM"; + if (code == V3EntityCode.NAF) + return "NAF"; + if (code == V3EntityCode.NONE) + return "NONE"; + if (code == V3EntityCode.PAGE) + return "PAGE"; + if (code == V3EntityCode.PHENOL) + return "PHENOL"; + if (code == V3EntityCode.PVA) + return "PVA"; + if (code == V3EntityCode.RLM) + return "RLM"; + if (code == V3EntityCode.SILICA) + return "SILICA"; + if (code == V3EntityCode.SPS) + return "SPS"; + if (code == V3EntityCode.SST) + return "SST"; + if (code == V3EntityCode.STUTM) + return "STUTM"; + if (code == V3EntityCode.THROM) + return "THROM"; + if (code == V3EntityCode.THYMOL) + return "THYMOL"; + if (code == V3EntityCode.THYO) + return "THYO"; + if (code == V3EntityCode.TOLU) + return "TOLU"; + if (code == V3EntityCode.URETM) + return "URETM"; + if (code == V3EntityCode.VIRTM) + return "VIRTM"; + if (code == V3EntityCode.WEST) + return "WEST"; + if (code == V3EntityCode.BLDPRD) + return "BLDPRD"; + if (code == V3EntityCode.VCCNE) + return "VCCNE"; + if (code == V3EntityCode._DRUGENTITY) + return "_DrugEntity"; + if (code == V3EntityCode._CLINICALDRUG) + return "_ClinicalDrug"; + if (code == V3EntityCode._NONDRUGAGENTENTITY) + return "_NonDrugAgentEntity"; + if (code == V3EntityCode.NDA01) + return "NDA01"; + if (code == V3EntityCode.NDA02) + return "NDA02"; + if (code == V3EntityCode.NDA03) + return "NDA03"; + if (code == V3EntityCode.NDA04) + return "NDA04"; + if (code == V3EntityCode.NDA05) + return "NDA05"; + if (code == V3EntityCode.NDA06) + return "NDA06"; + if (code == V3EntityCode.NDA07) + return "NDA07"; + if (code == V3EntityCode.NDA08) + return "NDA08"; + if (code == V3EntityCode.NDA09) + return "NDA09"; + if (code == V3EntityCode.NDA10) + return "NDA10"; + if (code == V3EntityCode.NDA11) + return "NDA11"; + if (code == V3EntityCode.NDA12) + return "NDA12"; + if (code == V3EntityCode.NDA13) + return "NDA13"; + if (code == V3EntityCode.NDA14) + return "NDA14"; + if (code == V3EntityCode.NDA15) + return "NDA15"; + if (code == V3EntityCode.NDA16) + return "NDA16"; + if (code == V3EntityCode.NDA17) + return "NDA17"; + if (code == V3EntityCode._ORGANIZATIONENTITYTYPE) + return "_OrganizationEntityType"; + if (code == V3EntityCode.HHOLD) + return "HHOLD"; + if (code == V3EntityCode.NAT) + return "NAT"; + if (code == V3EntityCode.RELIG) + return "RELIG"; + if (code == V3EntityCode._PLACEENTITYTYPE) + return "_PlaceEntityType"; + if (code == V3EntityCode.BED) + return "BED"; + if (code == V3EntityCode.BLDG) + return "BLDG"; + if (code == V3EntityCode.FLOOR) + return "FLOOR"; + if (code == V3EntityCode.ROOM) + return "ROOM"; + if (code == V3EntityCode.WING) + return "WING"; + if (code == V3EntityCode._RESOURCEGROUPENTITYTYPE) + return "_ResourceGroupEntityType"; + if (code == V3EntityCode.PRAC) + return "PRAC"; + return "?"; + } + + public String toSystem(V3EntityCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityDeterminer.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityDeterminer.java new file mode 100644 index 00000000000..5e3d1895571 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityDeterminer.java @@ -0,0 +1,117 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityDeterminer { + + /** + * Description:A determiner that specifies that the Entity object represents a particular physical thing (as opposed to a universal, kind, or class of physical thing). + + + Discussion: It does not matter whether an INSTANCE still exists as a whole at the point in time (or process) when we mention it, for example, a drug product lot is an INSTANCE even though it has been portioned out for retail purpose. + */ + INSTANCE, + /** + * A determiner that specifies that the Entity object represents a particular collection of physical things (as opposed to a universal, kind, or class of physical thing). While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals. + */ + GROUP, + /** + * Description:A determiner that specifies that the Entity object represents a universal, kind or class of physical thing (as opposed to a particular thing). + */ + KIND, + /** + * A determiner that specifies that the Entity object represents a universal, kind or class of collections physical things. While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals. + */ + GROUPKIND, + /** + * The described quantified determiner indicates that the given Entity is taken as a general description of a specific amount of a thing. For example, QUANTIFIED_KIND of syringe (quantity = 3,) stands for exactly three syringes. + */ + QUANTIFIEDKIND, + /** + * added to help the parsers + */ + NULL; + public static V3EntityDeterminer fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("INSTANCE".equals(codeString)) + return INSTANCE; + if ("GROUP".equals(codeString)) + return GROUP; + if ("KIND".equals(codeString)) + return KIND; + if ("GROUPKIND".equals(codeString)) + return GROUPKIND; + if ("QUANTIFIED_KIND".equals(codeString)) + return QUANTIFIEDKIND; + throw new FHIRException("Unknown V3EntityDeterminer code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "INSTANCE"; + case GROUP: return "GROUP"; + case KIND: return "KIND"; + case GROUPKIND: return "GROUPKIND"; + case QUANTIFIEDKIND: return "QUANTIFIED_KIND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityDeterminer"; + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "Description:A determiner that specifies that the Entity object represents a particular physical thing (as opposed to a universal, kind, or class of physical thing).\r\n\n \n Discussion: It does not matter whether an INSTANCE still exists as a whole at the point in time (or process) when we mention it, for example, a drug product lot is an INSTANCE even though it has been portioned out for retail purpose."; + case GROUP: return "A determiner that specifies that the Entity object represents a particular collection of physical things (as opposed to a universal, kind, or class of physical thing). While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals."; + case KIND: return "Description:A determiner that specifies that the Entity object represents a universal, kind or class of physical thing (as opposed to a particular thing)."; + case GROUPKIND: return "A determiner that specifies that the Entity object represents a universal, kind or class of collections physical things. While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals."; + case QUANTIFIEDKIND: return "The described quantified determiner indicates that the given Entity is taken as a general description of a specific amount of a thing. For example, QUANTIFIED_KIND of syringe (quantity = 3,) stands for exactly three syringes."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "specific"; + case GROUP: return "specific group"; + case KIND: return "described"; + case GROUPKIND: return "described group"; + case QUANTIFIEDKIND: return "described quantified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityDeterminerEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityDeterminerEnumFactory.java new file mode 100644 index 00000000000..7063cd7222c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityDeterminerEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityDeterminerEnumFactory implements EnumFactory { + + public V3EntityDeterminer fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("INSTANCE".equals(codeString)) + return V3EntityDeterminer.INSTANCE; + if ("GROUP".equals(codeString)) + return V3EntityDeterminer.GROUP; + if ("KIND".equals(codeString)) + return V3EntityDeterminer.KIND; + if ("GROUPKIND".equals(codeString)) + return V3EntityDeterminer.GROUPKIND; + if ("QUANTIFIED_KIND".equals(codeString)) + return V3EntityDeterminer.QUANTIFIEDKIND; + throw new IllegalArgumentException("Unknown V3EntityDeterminer code '"+codeString+"'"); + } + + public String toCode(V3EntityDeterminer code) { + if (code == V3EntityDeterminer.INSTANCE) + return "INSTANCE"; + if (code == V3EntityDeterminer.GROUP) + return "GROUP"; + if (code == V3EntityDeterminer.KIND) + return "KIND"; + if (code == V3EntityDeterminer.GROUPKIND) + return "GROUPKIND"; + if (code == V3EntityDeterminer.QUANTIFIEDKIND) + return "QUANTIFIED_KIND"; + return "?"; + } + + public String toSystem(V3EntityDeterminer code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityHandling.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityHandling.java new file mode 100644 index 00000000000..b4d5f6aa2c6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityHandling.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityHandling { + + /** + * Keep at ambient temperature, 22 +/- 2C + */ + AMB, + /** + * Critical to keep at body temperature 36-38C + */ + C37, + /** + * Critical ambient - must not be refrigerated or frozen. + */ + CAMB, + /** + * Critical. Do not expose to atmosphere. Do not uncap. + */ + CATM, + /** + * Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing. + */ + CFRZ, + /** + * Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing. + */ + CREF, + /** + * Deep Frozen -16 to -20C. + */ + DFRZ, + /** + * Keep in a dry environment + */ + DRY, + /** + * Keep frozen below 0 ?C + */ + FRZ, + /** + * Container is free of heavy metals, including lead. + */ + MTLF, + /** + * Keep in liquid nitrogen + */ + NTR, + /** + * Protect from light (eg. Wrap in aluminum foil). + */ + PRTL, + /** + * Do not shake + */ + PSA, + /** + * Protect against shock + */ + PSO, + /** + * Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence. + */ + REF, + /** + * Shake thoroughly before using + */ + SBU, + /** + * Ultra cold frozen -75 to -85C. Ultra cold freezer is typically at temperature of dry ice. + */ + UFRZ, + /** + * Keep upright, do not turn upside down + */ + UPR, + /** + * added to help the parsers + */ + NULL; + public static V3EntityHandling fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AMB".equals(codeString)) + return AMB; + if ("C37".equals(codeString)) + return C37; + if ("CAMB".equals(codeString)) + return CAMB; + if ("CATM".equals(codeString)) + return CATM; + if ("CFRZ".equals(codeString)) + return CFRZ; + if ("CREF".equals(codeString)) + return CREF; + if ("DFRZ".equals(codeString)) + return DFRZ; + if ("DRY".equals(codeString)) + return DRY; + if ("FRZ".equals(codeString)) + return FRZ; + if ("MTLF".equals(codeString)) + return MTLF; + if ("NTR".equals(codeString)) + return NTR; + if ("PRTL".equals(codeString)) + return PRTL; + if ("PSA".equals(codeString)) + return PSA; + if ("PSO".equals(codeString)) + return PSO; + if ("REF".equals(codeString)) + return REF; + if ("SBU".equals(codeString)) + return SBU; + if ("UFRZ".equals(codeString)) + return UFRZ; + if ("UPR".equals(codeString)) + return UPR; + throw new FHIRException("Unknown V3EntityHandling code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AMB: return "AMB"; + case C37: return "C37"; + case CAMB: return "CAMB"; + case CATM: return "CATM"; + case CFRZ: return "CFRZ"; + case CREF: return "CREF"; + case DFRZ: return "DFRZ"; + case DRY: return "DRY"; + case FRZ: return "FRZ"; + case MTLF: return "MTLF"; + case NTR: return "NTR"; + case PRTL: return "PRTL"; + case PSA: return "PSA"; + case PSO: return "PSO"; + case REF: return "REF"; + case SBU: return "SBU"; + case UFRZ: return "UFRZ"; + case UPR: return "UPR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityHandling"; + } + public String getDefinition() { + switch (this) { + case AMB: return "Keep at ambient temperature, 22 +/- 2C"; + case C37: return "Critical to keep at body temperature 36-38C"; + case CAMB: return "Critical ambient - must not be refrigerated or frozen."; + case CATM: return "Critical. Do not expose to atmosphere. Do not uncap."; + case CFRZ: return "Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing."; + case CREF: return "Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing."; + case DFRZ: return "Deep Frozen -16 to -20C."; + case DRY: return "Keep in a dry environment"; + case FRZ: return "Keep frozen below 0 ?C"; + case MTLF: return "Container is free of heavy metals, including lead."; + case NTR: return "Keep in liquid nitrogen"; + case PRTL: return "Protect from light (eg. Wrap in aluminum foil)."; + case PSA: return "Do not shake"; + case PSO: return "Protect against shock"; + case REF: return "Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence."; + case SBU: return "Shake thoroughly before using"; + case UFRZ: return "Ultra cold frozen -75 to -85C. Ultra cold freezer is typically at temperature of dry ice."; + case UPR: return "Keep upright, do not turn upside down"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AMB: return "Ambient Temperature"; + case C37: return "Body Temperature"; + case CAMB: return "Critical Ambient temperature"; + case CATM: return "Protect from Air"; + case CFRZ: return "Critical frozen"; + case CREF: return "Critical refrigerated temperature"; + case DFRZ: return "Deep Frozen"; + case DRY: return "dry"; + case FRZ: return "frozen"; + case MTLF: return "Metal Free"; + case NTR: return "nitrogen"; + case PRTL: return "Protect from Light"; + case PSA: return "do not shake"; + case PSO: return "no shock"; + case REF: return "Refrigerated temperature"; + case SBU: return "Shake before use"; + case UFRZ: return "Ultra frozen"; + case UPR: return "upright"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityHandlingEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityHandlingEnumFactory.java new file mode 100644 index 00000000000..52bfbd0289a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityHandlingEnumFactory.java @@ -0,0 +1,126 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityHandlingEnumFactory implements EnumFactory { + + public V3EntityHandling fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AMB".equals(codeString)) + return V3EntityHandling.AMB; + if ("C37".equals(codeString)) + return V3EntityHandling.C37; + if ("CAMB".equals(codeString)) + return V3EntityHandling.CAMB; + if ("CATM".equals(codeString)) + return V3EntityHandling.CATM; + if ("CFRZ".equals(codeString)) + return V3EntityHandling.CFRZ; + if ("CREF".equals(codeString)) + return V3EntityHandling.CREF; + if ("DFRZ".equals(codeString)) + return V3EntityHandling.DFRZ; + if ("DRY".equals(codeString)) + return V3EntityHandling.DRY; + if ("FRZ".equals(codeString)) + return V3EntityHandling.FRZ; + if ("MTLF".equals(codeString)) + return V3EntityHandling.MTLF; + if ("NTR".equals(codeString)) + return V3EntityHandling.NTR; + if ("PRTL".equals(codeString)) + return V3EntityHandling.PRTL; + if ("PSA".equals(codeString)) + return V3EntityHandling.PSA; + if ("PSO".equals(codeString)) + return V3EntityHandling.PSO; + if ("REF".equals(codeString)) + return V3EntityHandling.REF; + if ("SBU".equals(codeString)) + return V3EntityHandling.SBU; + if ("UFRZ".equals(codeString)) + return V3EntityHandling.UFRZ; + if ("UPR".equals(codeString)) + return V3EntityHandling.UPR; + throw new IllegalArgumentException("Unknown V3EntityHandling code '"+codeString+"'"); + } + + public String toCode(V3EntityHandling code) { + if (code == V3EntityHandling.AMB) + return "AMB"; + if (code == V3EntityHandling.C37) + return "C37"; + if (code == V3EntityHandling.CAMB) + return "CAMB"; + if (code == V3EntityHandling.CATM) + return "CATM"; + if (code == V3EntityHandling.CFRZ) + return "CFRZ"; + if (code == V3EntityHandling.CREF) + return "CREF"; + if (code == V3EntityHandling.DFRZ) + return "DFRZ"; + if (code == V3EntityHandling.DRY) + return "DRY"; + if (code == V3EntityHandling.FRZ) + return "FRZ"; + if (code == V3EntityHandling.MTLF) + return "MTLF"; + if (code == V3EntityHandling.NTR) + return "NTR"; + if (code == V3EntityHandling.PRTL) + return "PRTL"; + if (code == V3EntityHandling.PSA) + return "PSA"; + if (code == V3EntityHandling.PSO) + return "PSO"; + if (code == V3EntityHandling.REF) + return "REF"; + if (code == V3EntityHandling.SBU) + return "SBU"; + if (code == V3EntityHandling.UFRZ) + return "UFRZ"; + if (code == V3EntityHandling.UPR) + return "UPR"; + return "?"; + } + + public String toSystem(V3EntityHandling code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifier.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifier.java new file mode 100644 index 00000000000..ce78463f02f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifier.java @@ -0,0 +1,444 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartQualifier { + + /** + * OrganizationNamePartQualifier + */ + _ORGANIZATIONNAMEPARTQUALIFIER, + /** + * Indicates that a prefix like "Dr." or a suffix like "M.D." or "Ph.D." is an academic title. + */ + AC, + /** + * The name the person was given at the time of adoption. + */ + AD, + /** + * A name that a person had shortly after being born. Usually for family names but may be used to mark given names at birth that may have changed later. + */ + BR, + /** + * A callme name is (usually a given name) that is preferred when a person is directly addressed. + */ + CL, + /** + * Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. Initials may consist of more than one letter, e.g., "Ph." could stand for "Philippe" or "Th." for "Thomas". + */ + IN, + /** + * For organizations a suffix indicating the legal status, e.g., "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc. + */ + LS, + /** + * In Europe and Asia, there are still people with nobility titles (aristocrats). German "von" is generally a nobility title, not a mere voorvoegsel. Others are "Earl of" or "His Majesty King of..." etc. Rarely used nowadays, but some systems do keep track of this. + */ + NB, + /** + * Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential suffices. + */ + PR, + /** + * The name assumed from the partner in a marital relationship (hence the "SP"). Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names. + */ + SP, + /** + * Indicates that a prefix or a suffix is a title that applies to the whole name, not just the adjacent name part. + */ + TITLE, + /** + * A Dutch "voorvoegsel" is something like "van" or "de" that might have indicated nobility in the past but no longer so. Similar prefixes exist in other languages such as Spanish, French or Portugese. + */ + VV, + /** + * Description: Medication Name Parts are a means of specifying a range of acceptable "official" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under "doseForm" or "route" or "strength" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated. + */ + PHARMACEUTICALENTITYNAMEPARTQUALIFIERS, + /** + * Description: This refers to the container if present in the medicinal product name. + + EXAMPLES: + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe + */ + CON, + /** + * Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products. + + EXAMPLES: + + + + For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen. + */ + DEV, + /** + * Description: This refers to a flavor of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'CoughCure Linctus Orange Flavor', the flavor part is "Orange" + For 'Wonderdrug Syrup Cherry Flavor', the flavor part is "Cherry" + */ + FLAV, + /** + * Description: This refers to the formulation of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is "Sugar Free" + For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is "gluten-free" + */ + FORMUL, + /** + * Description: This refers to the pharmaceutical form/ if present in the medicinal product name. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: Soft Capsules + + + + For Ludiomil 25mg-Filmtabletten: Filmtabletten + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection + */ + FRM, + /** + * Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. + + EXAMPLES: + + + + Agenerase + + + + Optaflu + + + + Ludiomil + */ + INV, + /** + * Description: This refers to the target population for the medicinal product if present in the medicinal product name + + + Examples: + + + + For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is "children" + For 'Adult Chesty Cough Syrup', the target population part is "adult" + */ + POPUL, + /** + * Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + EXAMPLES: + + + + For Agenerase: N/A + + + + For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season) + + + + For Ludiomil: N/A + */ + SCI, + /** + * Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: 50mg + + + + For Ludiomil 25mg-Filmtabletten: 25 mg + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A + */ + STR, + /** + * Description: This refers to a time or time period that may be specified in the text of the medicinal product name + + + Example: + + + + For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is "2008/2009 season" + */ + TIME, + /** + * Description: This refers to trademark/company element if present in the medicinal product name. + + EXAMPLES: + + + + for Insulin Human Winthrop Comb 15: Winthrop + */ + TMK, + /** + * Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + + + Examples: + + + + For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: "Heartburn Relief" + For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is "Soothing Coughs" + */ + USE, + /** + * PersonNamePartQualifier + */ + _PERSONNAMEPARTQUALIFIER, + /** + * PersonNamePartAffixTypes + */ + _PERSONNAMEPARTAFFIXTYPES, + /** + * PersonNamePartChangeQualifier + */ + _PERSONNAMEPARTCHANGEQUALIFIER, + /** + * PersonNamePartMiscQualifier + */ + _PERSONNAMEPARTMISCQUALIFIER, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartQualifier fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_OrganizationNamePartQualifier".equals(codeString)) + return _ORGANIZATIONNAMEPARTQUALIFIER; + if ("AC".equals(codeString)) + return AC; + if ("AD".equals(codeString)) + return AD; + if ("BR".equals(codeString)) + return BR; + if ("CL".equals(codeString)) + return CL; + if ("IN".equals(codeString)) + return IN; + if ("LS".equals(codeString)) + return LS; + if ("NB".equals(codeString)) + return NB; + if ("PR".equals(codeString)) + return PR; + if ("SP".equals(codeString)) + return SP; + if ("TITLE".equals(codeString)) + return TITLE; + if ("VV".equals(codeString)) + return VV; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return CON; + if ("DEV".equals(codeString)) + return DEV; + if ("FLAV".equals(codeString)) + return FLAV; + if ("FORMUL".equals(codeString)) + return FORMUL; + if ("FRM".equals(codeString)) + return FRM; + if ("INV".equals(codeString)) + return INV; + if ("POPUL".equals(codeString)) + return POPUL; + if ("SCI".equals(codeString)) + return SCI; + if ("STR".equals(codeString)) + return STR; + if ("TIME".equals(codeString)) + return TIME; + if ("TMK".equals(codeString)) + return TMK; + if ("USE".equals(codeString)) + return USE; + if ("_PersonNamePartQualifier".equals(codeString)) + return _PERSONNAMEPARTQUALIFIER; + if ("_PersonNamePartAffixTypes".equals(codeString)) + return _PERSONNAMEPARTAFFIXTYPES; + if ("_PersonNamePartChangeQualifier".equals(codeString)) + return _PERSONNAMEPARTCHANGEQUALIFIER; + if ("_PersonNamePartMiscQualifier".equals(codeString)) + return _PERSONNAMEPARTMISCQUALIFIER; + throw new FHIRException("Unknown V3EntityNamePartQualifier code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ORGANIZATIONNAMEPARTQUALIFIER: return "_OrganizationNamePartQualifier"; + case AC: return "AC"; + case AD: return "AD"; + case BR: return "BR"; + case CL: return "CL"; + case IN: return "IN"; + case LS: return "LS"; + case NB: return "NB"; + case PR: return "PR"; + case SP: return "SP"; + case TITLE: return "TITLE"; + case VV: return "VV"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "CON"; + case DEV: return "DEV"; + case FLAV: return "FLAV"; + case FORMUL: return "FORMUL"; + case FRM: return "FRM"; + case INV: return "INV"; + case POPUL: return "POPUL"; + case SCI: return "SCI"; + case STR: return "STR"; + case TIME: return "TIME"; + case TMK: return "TMK"; + case USE: return "USE"; + case _PERSONNAMEPARTQUALIFIER: return "_PersonNamePartQualifier"; + case _PERSONNAMEPARTAFFIXTYPES: return "_PersonNamePartAffixTypes"; + case _PERSONNAMEPARTCHANGEQUALIFIER: return "_PersonNamePartChangeQualifier"; + case _PERSONNAMEPARTMISCQUALIFIER: return "_PersonNamePartMiscQualifier"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartQualifier"; + } + public String getDefinition() { + switch (this) { + case _ORGANIZATIONNAMEPARTQUALIFIER: return "OrganizationNamePartQualifier"; + case AC: return "Indicates that a prefix like \"Dr.\" or a suffix like \"M.D.\" or \"Ph.D.\" is an academic title."; + case AD: return "The name the person was given at the time of adoption."; + case BR: return "A name that a person had shortly after being born. Usually for family names but may be used to mark given names at birth that may have changed later."; + case CL: return "A callme name is (usually a given name) that is preferred when a person is directly addressed."; + case IN: return "Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. Initials may consist of more than one letter, e.g., \"Ph.\" could stand for \"Philippe\" or \"Th.\" for \"Thomas\"."; + case LS: return "For organizations a suffix indicating the legal status, e.g., \"Inc.\", \"Co.\", \"AG\", \"GmbH\", \"B.V.\" \"S.A.\", \"Ltd.\" etc."; + case NB: return "In Europe and Asia, there are still people with nobility titles (aristocrats). German \"von\" is generally a nobility title, not a mere voorvoegsel. Others are \"Earl of\" or \"His Majesty King of...\" etc. Rarely used nowadays, but some systems do keep track of this."; + case PR: return "Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential suffices."; + case SP: return "The name assumed from the partner in a marital relationship (hence the \"SP\"). Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names."; + case TITLE: return "Indicates that a prefix or a suffix is a title that applies to the whole name, not just the adjacent name part."; + case VV: return "A Dutch \"voorvoegsel\" is something like \"van\" or \"de\" that might have indicated nobility in the past but no longer so. Similar prefixes exist in other languages such as Spanish, French or Portugese."; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "Description: Medication Name Parts are a means of specifying a range of acceptable \"official\" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under \"doseForm\" or \"route\" or \"strength\" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated."; + case CON: return "Description: This refers to the container if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe"; + case DEV: return "Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products.\r\n\n EXAMPLES: \r\n\n \n \n For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen."; + case FLAV: return "Description: This refers to a flavor of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'CoughCure Linctus Orange Flavor', the flavor part is \"Orange\"\n For 'Wonderdrug Syrup Cherry Flavor', the flavor part is \"Cherry\""; + case FORMUL: return "Description: This refers to the formulation of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is \"Sugar Free\"\n For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is \"gluten-free\""; + case FRM: return "Description: This refers to the pharmaceutical form/ if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase 50 mg soft capsules: Soft Capsules\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: Filmtabletten\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection"; + case INV: return "Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. \r\n\n EXAMPLES: \r\n\n \n \n Agenerase\r\n\n \n \n Optaflu\r\n\n \n \n Ludiomil"; + case POPUL: return "Description: This refers to the target population for the medicinal product if present in the medicinal product name\r\n\n \n Examples:\n \r\n\n \n For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is \"children\"\n For 'Adult Chesty Cough Syrup', the target population part is \"adult\""; + case SCI: return "Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase: N/A\r\n\n \n \n For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season)\r\n\n \n \n For Ludiomil: N/A"; + case STR: return "Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required.\r\n\n EXAMPLES:\r\n\n \n \n For Agenerase 50 mg soft capsules: 50mg\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: 25 mg\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A"; + case TIME: return "Description: This refers to a time or time period that may be specified in the text of the medicinal product name\r\n\n \n Example:\n \r\n\n \n For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is \"2008/2009 season\""; + case TMK: return "Description: This refers to trademark/company element if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n for Insulin Human Winthrop Comb 15: Winthrop"; + case USE: return "Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\n\r\n\n \n Examples:\n \r\n\n \n For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: \"Heartburn Relief\"\n For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is \"Soothing Coughs\""; + case _PERSONNAMEPARTQUALIFIER: return "PersonNamePartQualifier"; + case _PERSONNAMEPARTAFFIXTYPES: return "PersonNamePartAffixTypes"; + case _PERSONNAMEPARTCHANGEQUALIFIER: return "PersonNamePartChangeQualifier"; + case _PERSONNAMEPARTMISCQUALIFIER: return "PersonNamePartMiscQualifier"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ORGANIZATIONNAMEPARTQUALIFIER: return "OrganizationNamePartQualifier"; + case AC: return "academic"; + case AD: return "adopted"; + case BR: return "birth"; + case CL: return "callme"; + case IN: return "initial"; + case LS: return "Legal status"; + case NB: return "nobility"; + case PR: return "professional"; + case SP: return "spouse"; + case TITLE: return "title"; + case VV: return "voorvoegsel"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "container name"; + case DEV: return "device name"; + case FLAV: return "FlavorName"; + case FORMUL: return "FormulationPartName"; + case FRM: return "form name"; + case INV: return "invented name"; + case POPUL: return "TargetPopulationName"; + case SCI: return "scientific name"; + case STR: return "strength name"; + case TIME: return "TimeOrPeriodName"; + case TMK: return "trademark name"; + case USE: return "intended use name"; + case _PERSONNAMEPARTQUALIFIER: return "PersonNamePartQualifier"; + case _PERSONNAMEPARTAFFIXTYPES: return "PersonNamePartAffixTypes"; + case _PERSONNAMEPARTCHANGEQUALIFIER: return "PersonNamePartChangeQualifier"; + case _PERSONNAMEPARTMISCQUALIFIER: return "PersonNamePartMiscQualifier"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierEnumFactory.java new file mode 100644 index 00000000000..36d25a71f86 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierEnumFactory.java @@ -0,0 +1,170 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityNamePartQualifierEnumFactory implements EnumFactory { + + public V3EntityNamePartQualifier fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_OrganizationNamePartQualifier".equals(codeString)) + return V3EntityNamePartQualifier._ORGANIZATIONNAMEPARTQUALIFIER; + if ("AC".equals(codeString)) + return V3EntityNamePartQualifier.AC; + if ("AD".equals(codeString)) + return V3EntityNamePartQualifier.AD; + if ("BR".equals(codeString)) + return V3EntityNamePartQualifier.BR; + if ("CL".equals(codeString)) + return V3EntityNamePartQualifier.CL; + if ("IN".equals(codeString)) + return V3EntityNamePartQualifier.IN; + if ("LS".equals(codeString)) + return V3EntityNamePartQualifier.LS; + if ("NB".equals(codeString)) + return V3EntityNamePartQualifier.NB; + if ("PR".equals(codeString)) + return V3EntityNamePartQualifier.PR; + if ("SP".equals(codeString)) + return V3EntityNamePartQualifier.SP; + if ("TITLE".equals(codeString)) + return V3EntityNamePartQualifier.TITLE; + if ("VV".equals(codeString)) + return V3EntityNamePartQualifier.VV; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return V3EntityNamePartQualifier.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return V3EntityNamePartQualifier.CON; + if ("DEV".equals(codeString)) + return V3EntityNamePartQualifier.DEV; + if ("FLAV".equals(codeString)) + return V3EntityNamePartQualifier.FLAV; + if ("FORMUL".equals(codeString)) + return V3EntityNamePartQualifier.FORMUL; + if ("FRM".equals(codeString)) + return V3EntityNamePartQualifier.FRM; + if ("INV".equals(codeString)) + return V3EntityNamePartQualifier.INV; + if ("POPUL".equals(codeString)) + return V3EntityNamePartQualifier.POPUL; + if ("SCI".equals(codeString)) + return V3EntityNamePartQualifier.SCI; + if ("STR".equals(codeString)) + return V3EntityNamePartQualifier.STR; + if ("TIME".equals(codeString)) + return V3EntityNamePartQualifier.TIME; + if ("TMK".equals(codeString)) + return V3EntityNamePartQualifier.TMK; + if ("USE".equals(codeString)) + return V3EntityNamePartQualifier.USE; + if ("_PersonNamePartQualifier".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTQUALIFIER; + if ("_PersonNamePartAffixTypes".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTAFFIXTYPES; + if ("_PersonNamePartChangeQualifier".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTCHANGEQUALIFIER; + if ("_PersonNamePartMiscQualifier".equals(codeString)) + return V3EntityNamePartQualifier._PERSONNAMEPARTMISCQUALIFIER; + throw new IllegalArgumentException("Unknown V3EntityNamePartQualifier code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartQualifier code) { + if (code == V3EntityNamePartQualifier._ORGANIZATIONNAMEPARTQUALIFIER) + return "_OrganizationNamePartQualifier"; + if (code == V3EntityNamePartQualifier.AC) + return "AC"; + if (code == V3EntityNamePartQualifier.AD) + return "AD"; + if (code == V3EntityNamePartQualifier.BR) + return "BR"; + if (code == V3EntityNamePartQualifier.CL) + return "CL"; + if (code == V3EntityNamePartQualifier.IN) + return "IN"; + if (code == V3EntityNamePartQualifier.LS) + return "LS"; + if (code == V3EntityNamePartQualifier.NB) + return "NB"; + if (code == V3EntityNamePartQualifier.PR) + return "PR"; + if (code == V3EntityNamePartQualifier.SP) + return "SP"; + if (code == V3EntityNamePartQualifier.TITLE) + return "TITLE"; + if (code == V3EntityNamePartQualifier.VV) + return "VV"; + if (code == V3EntityNamePartQualifier.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS) + return "PharmaceuticalEntityNamePartQualifiers"; + if (code == V3EntityNamePartQualifier.CON) + return "CON"; + if (code == V3EntityNamePartQualifier.DEV) + return "DEV"; + if (code == V3EntityNamePartQualifier.FLAV) + return "FLAV"; + if (code == V3EntityNamePartQualifier.FORMUL) + return "FORMUL"; + if (code == V3EntityNamePartQualifier.FRM) + return "FRM"; + if (code == V3EntityNamePartQualifier.INV) + return "INV"; + if (code == V3EntityNamePartQualifier.POPUL) + return "POPUL"; + if (code == V3EntityNamePartQualifier.SCI) + return "SCI"; + if (code == V3EntityNamePartQualifier.STR) + return "STR"; + if (code == V3EntityNamePartQualifier.TIME) + return "TIME"; + if (code == V3EntityNamePartQualifier.TMK) + return "TMK"; + if (code == V3EntityNamePartQualifier.USE) + return "USE"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTQUALIFIER) + return "_PersonNamePartQualifier"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTAFFIXTYPES) + return "_PersonNamePartAffixTypes"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTCHANGEQUALIFIER) + return "_PersonNamePartChangeQualifier"; + if (code == V3EntityNamePartQualifier._PERSONNAMEPARTMISCQUALIFIER) + return "_PersonNamePartMiscQualifier"; + return "?"; + } + + public String toSystem(V3EntityNamePartQualifier code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierR2.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierR2.java new file mode 100644 index 00000000000..dd7f433710b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierR2.java @@ -0,0 +1,435 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartQualifierR2 { + + /** + * Description:A name part a person acquired. The name part may be acquired by adoption, or the person may have chosen to use the name part for some other reason. + + + Note: this differs from an Other/Psuedonym/Alias in that an acquired name part is acquired on a formal basis rather than an informal one (e.g. registered as part of the official name). + */ + AD, + /** + * Description:The name assumed from the partner in a marital relationship. Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names. + */ + SP, + /** + * Description:A name that a person was given at birth or established as a consequence of adoption. + + + Note: This is not used for temporary names assigned at birth such as "Baby of Smith" a" which is just a name with a use code of "TEMP". + */ + BR, + /** + * Description:Used to indicate which of the various name parts is used when interacting with the person. + */ + CL, + /** + * Description:Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. In some languages, initials may consist of more than one letter, e.g., "Ph" could stand for "Philippe" or "Th" For "Thomas". + */ + IN, + /** + * Description:For organizations a suffix indicating the legal status, e.g., "Inc.", "Co.", "AG", "GmbH", "B.V." "S.A.", "Ltd." etc. + */ + LS, + /** + * Description:Indicates that the name part is a middle name. + + + Usage Notes: In general, the english "middle name" concept is all of the given names after the first. This qualifier may be used to explicitly indicate which given names are considered to be middle names. The middle name qualifier may also be used with family names. This is a Scandinavian use case, matching the concept of "mellomnavn","mellannamn". Note that there are specific rules that indicate what names may be taken as a mellannamn in different Scandinavian countries. + */ + MID, + /** + * Description:A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). + */ + PFX, + /** + * Description: Medication Name Parts are a means of specifying a range of acceptable "official" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under "doseForm" or "route" or "strength" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated. + */ + PHARMACEUTICALENTITYNAMEPARTQUALIFIERS, + /** + * Description: This refers to the container if present in the medicinal product name. + + EXAMPLES: + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe + */ + CON, + /** + * Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products. + + EXAMPLES: + + + + For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen. + */ + DEV, + /** + * Description: This refers to a flavor of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'CoughCure Linctus Orange Flavor', the flavor part is "Orange" + For 'Wonderdrug Syrup Cherry Flavor', the flavor part is "Cherry" + */ + FLAV, + /** + * Description: This refers to the formulation of the medicinal product if present in the medicinal product name. + + + Examples: + + + + For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is "Sugar Free" + For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is "gluten-free" + */ + FORMUL, + /** + * Description: This refers to the pharmaceutical form/ if present in the medicinal product name. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: Soft Capsules + + + + For Ludiomil 25mg-Filmtabletten: Filmtabletten + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection + */ + FRM, + /** + * Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. + + EXAMPLES: + + + + Agenerase + + + + Optaflu + + + + Ludiomil + */ + INV, + /** + * Description: This refers to the target population for the medicinal product if present in the medicinal product name + + + Examples: + + + + For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is "children" + For 'Adult Chesty Cough Syrup', the target population part is "adult" + */ + POPUL, + /** + * Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + EXAMPLES: + + + + For Agenerase: N/A + + + + For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season) + + + + For Ludiomil: N/A + */ + SCI, + /** + * Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required. + + EXAMPLES: + + + + For Agenerase 50 mg soft capsules: 50mg + + + + For Ludiomil 25mg-Filmtabletten: 25 mg + + + + For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A + */ + STR, + /** + * Description: This refers to a time or time period that may be specified in the text of the medicinal product name + + + Example: + + + + For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is "2008/2009 season" + */ + TIME, + /** + * Description: This refers to trademark/company element if present in the medicinal product name. + + EXAMPLES: + + + + for Insulin Human Winthrop Comb 15: Winthrop + */ + TMK, + /** + * Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name. + + + + Examples: + + + + For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: "Heartburn Relief" + For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is "Soothing Coughs" + */ + USE, + /** + * Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). + */ + SFX, + /** + * Description:Extra information about the style of a title + */ + TITLESTYLES, + /** + * Description:Indicates that a title like "Dr.", "M.D." or "Ph.D." is an academic title. + */ + AC, + /** + * Description:A honorific such as "The Right Honourable" or "Weledelgeleerde Heer". + */ + HON, + /** + * Description:A nobility title such as Sir, Count, Grafin. + */ + NB, + /** + * Description:Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential titles. + */ + PR, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartQualifierR2 fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AD".equals(codeString)) + return AD; + if ("SP".equals(codeString)) + return SP; + if ("BR".equals(codeString)) + return BR; + if ("CL".equals(codeString)) + return CL; + if ("IN".equals(codeString)) + return IN; + if ("LS".equals(codeString)) + return LS; + if ("MID".equals(codeString)) + return MID; + if ("PFX".equals(codeString)) + return PFX; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return CON; + if ("DEV".equals(codeString)) + return DEV; + if ("FLAV".equals(codeString)) + return FLAV; + if ("FORMUL".equals(codeString)) + return FORMUL; + if ("FRM".equals(codeString)) + return FRM; + if ("INV".equals(codeString)) + return INV; + if ("POPUL".equals(codeString)) + return POPUL; + if ("SCI".equals(codeString)) + return SCI; + if ("STR".equals(codeString)) + return STR; + if ("TIME".equals(codeString)) + return TIME; + if ("TMK".equals(codeString)) + return TMK; + if ("USE".equals(codeString)) + return USE; + if ("SFX".equals(codeString)) + return SFX; + if ("TitleStyles".equals(codeString)) + return TITLESTYLES; + if ("AC".equals(codeString)) + return AC; + if ("HON".equals(codeString)) + return HON; + if ("NB".equals(codeString)) + return NB; + if ("PR".equals(codeString)) + return PR; + throw new FHIRException("Unknown V3EntityNamePartQualifierR2 code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AD: return "AD"; + case SP: return "SP"; + case BR: return "BR"; + case CL: return "CL"; + case IN: return "IN"; + case LS: return "LS"; + case MID: return "MID"; + case PFX: return "PFX"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "CON"; + case DEV: return "DEV"; + case FLAV: return "FLAV"; + case FORMUL: return "FORMUL"; + case FRM: return "FRM"; + case INV: return "INV"; + case POPUL: return "POPUL"; + case SCI: return "SCI"; + case STR: return "STR"; + case TIME: return "TIME"; + case TMK: return "TMK"; + case USE: return "USE"; + case SFX: return "SFX"; + case TITLESTYLES: return "TitleStyles"; + case AC: return "AC"; + case HON: return "HON"; + case NB: return "NB"; + case PR: return "PR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartQualifierR2"; + } + public String getDefinition() { + switch (this) { + case AD: return "Description:A name part a person acquired. The name part may be acquired by adoption, or the person may have chosen to use the name part for some other reason.\r\n\n \n Note: this differs from an Other/Psuedonym/Alias in that an acquired name part is acquired on a formal basis rather than an informal one (e.g. registered as part of the official name)."; + case SP: return "Description:The name assumed from the partner in a marital relationship. Usually the spouse's family name. Note that no inference about gender can be made from the existence of spouse names."; + case BR: return "Description:A name that a person was given at birth or established as a consequence of adoption. \r\n\n \n Note: This is not used for temporary names assigned at birth such as \"Baby of Smith\" a\" which is just a name with a use code of \"TEMP\"."; + case CL: return "Description:Used to indicate which of the various name parts is used when interacting with the person."; + case IN: return "Description:Indicates that a name part is just an initial. Initials do not imply a trailing period since this would not work with non-Latin scripts. In some languages, initials may consist of more than one letter, e.g., \"Ph\" could stand for \"Philippe\" or \"Th\" For \"Thomas\"."; + case LS: return "Description:For organizations a suffix indicating the legal status, e.g., \"Inc.\", \"Co.\", \"AG\", \"GmbH\", \"B.V.\" \"S.A.\", \"Ltd.\" etc."; + case MID: return "Description:Indicates that the name part is a middle name.\r\n\n \n Usage Notes: In general, the english \"middle name\" concept is all of the given names after the first. This qualifier may be used to explicitly indicate which given names are considered to be middle names. The middle name qualifier may also be used with family names. This is a Scandinavian use case, matching the concept of \"mellomnavn\",\"mellannamn\". Note that there are specific rules that indicate what names may be taken as a mellannamn in different Scandinavian countries."; + case PFX: return "Description:A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though)."; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "Description: Medication Name Parts are a means of specifying a range of acceptable \"official\" forms of the name of a product. They are used as patterns against which input name strings may be matched for automatic identification of products from input text reports. While they cover the concepts held under \"doseForm\" or \"route\" or \"strength\" the name parts are not the same and do not fit into a controlled vocabulary in the same way. By specifying up to 8 name parts a much larger range of possible names can be generated."; + case CON: return "Description: This refers to the container if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): pre-filled syringe"; + case DEV: return "Description: This refers to the qualifiers in the name for devices and is at the moment mainly applicable to insulins and inhalation products.\r\n\n EXAMPLES: \r\n\n \n \n For the medicinal product Actrapid FlexPen 100 IU/ml Solution for injection Subcutaneous use: FlexPen."; + case FLAV: return "Description: This refers to a flavor of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'CoughCure Linctus Orange Flavor', the flavor part is \"Orange\"\n For 'Wonderdrug Syrup Cherry Flavor', the flavor part is \"Cherry\""; + case FORMUL: return "Description: This refers to the formulation of the medicinal product if present in the medicinal product name.\r\n\n \n Examples:\n \r\n\n \n For 'SpecialMed Sugar Free Cough Syrup', the formulation name part is \"Sugar Free\"\n For 'QuickCure Gluten-free Bulk Fibre', the formulation name part is \"gluten-free\""; + case FRM: return "Description: This refers to the pharmaceutical form/ if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase 50 mg soft capsules: Soft Capsules\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: Filmtabletten\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): suspension for injection"; + case INV: return "Description: This refers to the product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name and, if appropriate, whether it is intended e.g. for babies, children or adults. \r\n\n EXAMPLES: \r\n\n \n \n Agenerase\r\n\n \n \n Optaflu\r\n\n \n \n Ludiomil"; + case POPUL: return "Description: This refers to the target population for the medicinal product if present in the medicinal product name\r\n\n \n Examples:\n \r\n\n \n For 'Broncho-Drug 3.5 mg-capsules for children', the target population part is \"children\"\n For 'Adult Chesty Cough Syrup', the target population part is \"adult\""; + case SCI: return "Description: This refers to the product common or scientific name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\r\n\n EXAMPLES: \r\n\n \n \n For Agenerase: N/A\r\n\n \n \n For Optaflu: Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season)\r\n\n \n \n For Ludiomil: N/A"; + case STR: return "Description: This refers to the strength if present in the medicinal product name. The use of decimal points should be accommodated if required.\r\n\n EXAMPLES:\r\n\n \n \n For Agenerase 50 mg soft capsules: 50mg\r\n\n \n \n For Ludiomil 25mg-Filmtabletten: 25 mg\r\n\n \n \n For Optaflu suspension for injection in pre-filled syringe Influenza vaccine (surface antigen, inactivated, prepared in cell culture) (2007/2008 season): N/A"; + case TIME: return "Description: This refers to a time or time period that may be specified in the text of the medicinal product name\r\n\n \n Example:\n \r\n\n \n For an influenza vaccine 'Drug-FLU season 2008/2009', the time/period part is \"2008/2009 season\""; + case TMK: return "Description: This refers to trademark/company element if present in the medicinal product name.\r\n\n EXAMPLES: \r\n\n \n \n for Insulin Human Winthrop Comb 15: Winthrop"; + case USE: return "Description: This refers to the intended use if present in the medicinal product name without the trademark or the name of the marketing authorization holder or any other descriptor reflected in the product name.\n\r\n\n \n Examples:\n \r\n\n \n For 'Drug-BI Caplets - Heartburn Relief', the intended use part is: \"Heartburn Relief\"\n For 'Medicine Honey Syrup for Soothing Coughs' the intended use part is \"Soothing Coughs\""; + case SFX: return "Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though)."; + case TITLESTYLES: return "Description:Extra information about the style of a title"; + case AC: return "Description:Indicates that a title like \"Dr.\", \"M.D.\" or \"Ph.D.\" is an academic title."; + case HON: return "Description:A honorific such as \"The Right Honourable\" or \"Weledelgeleerde Heer\"."; + case NB: return "Description:A nobility title such as Sir, Count, Grafin."; + case PR: return "Description:Primarily in the British Imperial culture people tend to have an abbreviation of their professional organization as part of their credential titles."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AD: return "acquired"; + case SP: return "spouse"; + case BR: return "birth"; + case CL: return "callme"; + case IN: return "initial"; + case LS: return "legal status"; + case MID: return "middle name"; + case PFX: return "prefix"; + case PHARMACEUTICALENTITYNAMEPARTQUALIFIERS: return "PharmaceuticalEntityNamePartQualifiers"; + case CON: return "container name"; + case DEV: return "device name"; + case FLAV: return "FlavorName"; + case FORMUL: return "FormulationPartName"; + case FRM: return "form name"; + case INV: return "invented name"; + case POPUL: return "TargetPopulationName"; + case SCI: return "scientific name"; + case STR: return "strength name"; + case TIME: return "TimeOrPeriodName"; + case TMK: return "trademark name"; + case USE: return "intended use name"; + case SFX: return "suffix"; + case TITLESTYLES: return "TitleStyles"; + case AC: return "academic"; + case HON: return "honorific"; + case NB: return "nobility"; + case PR: return "professional"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierR2EnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierR2EnumFactory.java new file mode 100644 index 00000000000..d1361aa3d3c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartQualifierR2EnumFactory.java @@ -0,0 +1,162 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityNamePartQualifierR2EnumFactory implements EnumFactory { + + public V3EntityNamePartQualifierR2 fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AD".equals(codeString)) + return V3EntityNamePartQualifierR2.AD; + if ("SP".equals(codeString)) + return V3EntityNamePartQualifierR2.SP; + if ("BR".equals(codeString)) + return V3EntityNamePartQualifierR2.BR; + if ("CL".equals(codeString)) + return V3EntityNamePartQualifierR2.CL; + if ("IN".equals(codeString)) + return V3EntityNamePartQualifierR2.IN; + if ("LS".equals(codeString)) + return V3EntityNamePartQualifierR2.LS; + if ("MID".equals(codeString)) + return V3EntityNamePartQualifierR2.MID; + if ("PFX".equals(codeString)) + return V3EntityNamePartQualifierR2.PFX; + if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) + return V3EntityNamePartQualifierR2.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; + if ("CON".equals(codeString)) + return V3EntityNamePartQualifierR2.CON; + if ("DEV".equals(codeString)) + return V3EntityNamePartQualifierR2.DEV; + if ("FLAV".equals(codeString)) + return V3EntityNamePartQualifierR2.FLAV; + if ("FORMUL".equals(codeString)) + return V3EntityNamePartQualifierR2.FORMUL; + if ("FRM".equals(codeString)) + return V3EntityNamePartQualifierR2.FRM; + if ("INV".equals(codeString)) + return V3EntityNamePartQualifierR2.INV; + if ("POPUL".equals(codeString)) + return V3EntityNamePartQualifierR2.POPUL; + if ("SCI".equals(codeString)) + return V3EntityNamePartQualifierR2.SCI; + if ("STR".equals(codeString)) + return V3EntityNamePartQualifierR2.STR; + if ("TIME".equals(codeString)) + return V3EntityNamePartQualifierR2.TIME; + if ("TMK".equals(codeString)) + return V3EntityNamePartQualifierR2.TMK; + if ("USE".equals(codeString)) + return V3EntityNamePartQualifierR2.USE; + if ("SFX".equals(codeString)) + return V3EntityNamePartQualifierR2.SFX; + if ("TitleStyles".equals(codeString)) + return V3EntityNamePartQualifierR2.TITLESTYLES; + if ("AC".equals(codeString)) + return V3EntityNamePartQualifierR2.AC; + if ("HON".equals(codeString)) + return V3EntityNamePartQualifierR2.HON; + if ("NB".equals(codeString)) + return V3EntityNamePartQualifierR2.NB; + if ("PR".equals(codeString)) + return V3EntityNamePartQualifierR2.PR; + throw new IllegalArgumentException("Unknown V3EntityNamePartQualifierR2 code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartQualifierR2 code) { + if (code == V3EntityNamePartQualifierR2.AD) + return "AD"; + if (code == V3EntityNamePartQualifierR2.SP) + return "SP"; + if (code == V3EntityNamePartQualifierR2.BR) + return "BR"; + if (code == V3EntityNamePartQualifierR2.CL) + return "CL"; + if (code == V3EntityNamePartQualifierR2.IN) + return "IN"; + if (code == V3EntityNamePartQualifierR2.LS) + return "LS"; + if (code == V3EntityNamePartQualifierR2.MID) + return "MID"; + if (code == V3EntityNamePartQualifierR2.PFX) + return "PFX"; + if (code == V3EntityNamePartQualifierR2.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS) + return "PharmaceuticalEntityNamePartQualifiers"; + if (code == V3EntityNamePartQualifierR2.CON) + return "CON"; + if (code == V3EntityNamePartQualifierR2.DEV) + return "DEV"; + if (code == V3EntityNamePartQualifierR2.FLAV) + return "FLAV"; + if (code == V3EntityNamePartQualifierR2.FORMUL) + return "FORMUL"; + if (code == V3EntityNamePartQualifierR2.FRM) + return "FRM"; + if (code == V3EntityNamePartQualifierR2.INV) + return "INV"; + if (code == V3EntityNamePartQualifierR2.POPUL) + return "POPUL"; + if (code == V3EntityNamePartQualifierR2.SCI) + return "SCI"; + if (code == V3EntityNamePartQualifierR2.STR) + return "STR"; + if (code == V3EntityNamePartQualifierR2.TIME) + return "TIME"; + if (code == V3EntityNamePartQualifierR2.TMK) + return "TMK"; + if (code == V3EntityNamePartQualifierR2.USE) + return "USE"; + if (code == V3EntityNamePartQualifierR2.SFX) + return "SFX"; + if (code == V3EntityNamePartQualifierR2.TITLESTYLES) + return "TitleStyles"; + if (code == V3EntityNamePartQualifierR2.AC) + return "AC"; + if (code == V3EntityNamePartQualifierR2.HON) + return "HON"; + if (code == V3EntityNamePartQualifierR2.NB) + return "NB"; + if (code == V3EntityNamePartQualifierR2.PR) + return "PR"; + return "?"; + } + + public String toSystem(V3EntityNamePartQualifierR2 code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartType.java new file mode 100644 index 00000000000..e4b5ad68c21 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartType.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartType { + + /** + * A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space. + */ + DEL, + /** + * Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. + */ + FAM, + /** + * Given name (don't call it "first name" since this given names do not always come first) + */ + GIV, + /** + * A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). Note that prefixes can be inverted. + */ + PFX, + /** + * Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). Suffices cannot be inverted. + */ + SFX, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return DEL; + if ("FAM".equals(codeString)) + return FAM; + if ("GIV".equals(codeString)) + return GIV; + if ("PFX".equals(codeString)) + return PFX; + if ("SFX".equals(codeString)) + return SFX; + throw new FHIRException("Unknown V3EntityNamePartType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DEL: return "DEL"; + case FAM: return "FAM"; + case GIV: return "GIV"; + case PFX: return "PFX"; + case SFX: return "SFX"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartType"; + } + public String getDefinition() { + switch (this) { + case DEL: return "A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space."; + case FAM: return "Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."; + case GIV: return "Given name (don't call it \"first name\" since this given names do not always come first)"; + case PFX: return "A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). Note that prefixes can be inverted."; + case SFX: return "Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). Suffices cannot be inverted."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DEL: return "delimiter"; + case FAM: return "family"; + case GIV: return "given"; + case PFX: return "prefix"; + case SFX: return "suffix"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeEnumFactory.java new file mode 100644 index 00000000000..51f3f890b1a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityNamePartTypeEnumFactory implements EnumFactory { + + public V3EntityNamePartType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return V3EntityNamePartType.DEL; + if ("FAM".equals(codeString)) + return V3EntityNamePartType.FAM; + if ("GIV".equals(codeString)) + return V3EntityNamePartType.GIV; + if ("PFX".equals(codeString)) + return V3EntityNamePartType.PFX; + if ("SFX".equals(codeString)) + return V3EntityNamePartType.SFX; + throw new IllegalArgumentException("Unknown V3EntityNamePartType code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartType code) { + if (code == V3EntityNamePartType.DEL) + return "DEL"; + if (code == V3EntityNamePartType.FAM) + return "FAM"; + if (code == V3EntityNamePartType.GIV) + return "GIV"; + if (code == V3EntityNamePartType.PFX) + return "PFX"; + if (code == V3EntityNamePartType.SFX) + return "SFX"; + return "?"; + } + + public String toSystem(V3EntityNamePartType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeR2.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeR2.java new file mode 100644 index 00000000000..9d09852adaf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeR2.java @@ -0,0 +1,108 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNamePartTypeR2 { + + /** + * Description:A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space. + */ + DEL, + /** + * Description:Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. + */ + FAM, + /** + * Description:Given name. Note: don't call it "first name" since the given names do not always come first. + */ + GIV, + /** + * Description:Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc. + + + Note:Title name parts include name parts that come after the name such as qualifications, even if they are not always considered to be titles. + */ + TITLE, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNamePartTypeR2 fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return DEL; + if ("FAM".equals(codeString)) + return FAM; + if ("GIV".equals(codeString)) + return GIV; + if ("TITLE".equals(codeString)) + return TITLE; + throw new FHIRException("Unknown V3EntityNamePartTypeR2 code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DEL: return "DEL"; + case FAM: return "FAM"; + case GIV: return "GIV"; + case TITLE: return "TITLE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNamePartTypeR2"; + } + public String getDefinition() { + switch (this) { + case DEL: return "Description:A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space."; + case FAM: return "Description:Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."; + case GIV: return "Description:Given name. Note: don't call it \"first name\" since the given names do not always come first."; + case TITLE: return "Description:Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc.\r\n\n \n Note:Title name parts include name parts that come after the name such as qualifications, even if they are not always considered to be titles."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DEL: return "delimiter"; + case FAM: return "family"; + case GIV: return "given"; + case TITLE: return "title"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeR2EnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeR2EnumFactory.java new file mode 100644 index 00000000000..dc9ea5eafed --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNamePartTypeR2EnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityNamePartTypeR2EnumFactory implements EnumFactory { + + public V3EntityNamePartTypeR2 fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("DEL".equals(codeString)) + return V3EntityNamePartTypeR2.DEL; + if ("FAM".equals(codeString)) + return V3EntityNamePartTypeR2.FAM; + if ("GIV".equals(codeString)) + return V3EntityNamePartTypeR2.GIV; + if ("TITLE".equals(codeString)) + return V3EntityNamePartTypeR2.TITLE; + throw new IllegalArgumentException("Unknown V3EntityNamePartTypeR2 code '"+codeString+"'"); + } + + public String toCode(V3EntityNamePartTypeR2 code) { + if (code == V3EntityNamePartTypeR2.DEL) + return "DEL"; + if (code == V3EntityNamePartTypeR2.FAM) + return "FAM"; + if (code == V3EntityNamePartTypeR2.GIV) + return "GIV"; + if (code == V3EntityNamePartTypeR2.TITLE) + return "TITLE"; + return "?"; + } + + public String toSystem(V3EntityNamePartTypeR2 code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUse.java new file mode 100644 index 00000000000..d0bfd6352c0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUse.java @@ -0,0 +1,206 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNameUse { + + /** + * Identifies the different representations of a name. The representation may affect how the name is used. (E.g. use of Ideographic for formal communications.) + */ + _NAMEREPRESENTATIONUSE, + /** + * Alphabetic transcription of name (Japanese: romaji) + */ + ABC, + /** + * Ideographic representation of name (e.g., Japanese kanji, Chinese characters) + */ + IDE, + /** + * Syllabic transcription of name (e.g., Japanese kana, Korean hangul) + */ + SYL, + /** + * A name assigned to a person. Reasons some organizations assign alternate names may include not knowing the person's name, or to maintain anonymity. Some, but not necessarily all, of the name types that people call "alias" may fit into this category. + */ + ASGN, + /** + * As recorded on a license, record, certificate, etc. (only if different from legal name) + */ + C, + /** + * e.g. Chief Red Cloud + */ + I, + /** + * Known as/conventional/the one you use + */ + L, + /** + * Definition:The formal name as registered in an official (government) registry, but which name might not be commonly used. Particularly used in countries with a law system based on Napoleonic law. + */ + OR, + /** + * A self asserted name that the person is using or has used. + */ + P, + /** + * Includes writer's pseudonym, stage name, etc + */ + A, + /** + * e.g. Sister Mary Francis, Brother John + */ + R, + /** + * A name intended for use in searching or matching. + */ + SRCH, + /** + * A name spelled phonetically. + + There are a variety of phonetic spelling algorithms. This code value does not distinguish between these.Discussion: + */ + PHON, + /** + * A name spelled according to the SoundEx algorithm. + */ + SNDX, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNameUse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NameRepresentationUse".equals(codeString)) + return _NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return ABC; + if ("IDE".equals(codeString)) + return IDE; + if ("SYL".equals(codeString)) + return SYL; + if ("ASGN".equals(codeString)) + return ASGN; + if ("C".equals(codeString)) + return C; + if ("I".equals(codeString)) + return I; + if ("L".equals(codeString)) + return L; + if ("OR".equals(codeString)) + return OR; + if ("P".equals(codeString)) + return P; + if ("A".equals(codeString)) + return A; + if ("R".equals(codeString)) + return R; + if ("SRCH".equals(codeString)) + return SRCH; + if ("PHON".equals(codeString)) + return PHON; + if ("SNDX".equals(codeString)) + return SNDX; + throw new FHIRException("Unknown V3EntityNameUse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _NAMEREPRESENTATIONUSE: return "_NameRepresentationUse"; + case ABC: return "ABC"; + case IDE: return "IDE"; + case SYL: return "SYL"; + case ASGN: return "ASGN"; + case C: return "C"; + case I: return "I"; + case L: return "L"; + case OR: return "OR"; + case P: return "P"; + case A: return "A"; + case R: return "R"; + case SRCH: return "SRCH"; + case PHON: return "PHON"; + case SNDX: return "SNDX"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNameUse"; + } + public String getDefinition() { + switch (this) { + case _NAMEREPRESENTATIONUSE: return "Identifies the different representations of a name. The representation may affect how the name is used. (E.g. use of Ideographic for formal communications.)"; + case ABC: return "Alphabetic transcription of name (Japanese: romaji)"; + case IDE: return "Ideographic representation of name (e.g., Japanese kanji, Chinese characters)"; + case SYL: return "Syllabic transcription of name (e.g., Japanese kana, Korean hangul)"; + case ASGN: return "A name assigned to a person. Reasons some organizations assign alternate names may include not knowing the person's name, or to maintain anonymity. Some, but not necessarily all, of the name types that people call \"alias\" may fit into this category."; + case C: return "As recorded on a license, record, certificate, etc. (only if different from legal name)"; + case I: return "e.g. Chief Red Cloud"; + case L: return "Known as/conventional/the one you use"; + case OR: return "Definition:The formal name as registered in an official (government) registry, but which name might not be commonly used. Particularly used in countries with a law system based on Napoleonic law."; + case P: return "A self asserted name that the person is using or has used."; + case A: return "Includes writer's pseudonym, stage name, etc"; + case R: return "e.g. Sister Mary Francis, Brother John"; + case SRCH: return "A name intended for use in searching or matching."; + case PHON: return "A name spelled phonetically.\r\n\n There are a variety of phonetic spelling algorithms. This code value does not distinguish between these.Discussion:"; + case SNDX: return "A name spelled according to the SoundEx algorithm."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; + case ABC: return "Alphabetic"; + case IDE: return "Ideographic"; + case SYL: return "Syllabic"; + case ASGN: return "assigned"; + case C: return "License"; + case I: return "Indigenous/Tribal"; + case L: return "Legal"; + case OR: return "official registry"; + case P: return "pseudonym"; + case A: return "Artist/Stage"; + case R: return "Religious"; + case SRCH: return "search"; + case PHON: return "phonetic"; + case SNDX: return "Soundex"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseEnumFactory.java new file mode 100644 index 00000000000..99e866309d1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseEnumFactory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityNameUseEnumFactory implements EnumFactory { + + public V3EntityNameUse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NameRepresentationUse".equals(codeString)) + return V3EntityNameUse._NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return V3EntityNameUse.ABC; + if ("IDE".equals(codeString)) + return V3EntityNameUse.IDE; + if ("SYL".equals(codeString)) + return V3EntityNameUse.SYL; + if ("ASGN".equals(codeString)) + return V3EntityNameUse.ASGN; + if ("C".equals(codeString)) + return V3EntityNameUse.C; + if ("I".equals(codeString)) + return V3EntityNameUse.I; + if ("L".equals(codeString)) + return V3EntityNameUse.L; + if ("OR".equals(codeString)) + return V3EntityNameUse.OR; + if ("P".equals(codeString)) + return V3EntityNameUse.P; + if ("A".equals(codeString)) + return V3EntityNameUse.A; + if ("R".equals(codeString)) + return V3EntityNameUse.R; + if ("SRCH".equals(codeString)) + return V3EntityNameUse.SRCH; + if ("PHON".equals(codeString)) + return V3EntityNameUse.PHON; + if ("SNDX".equals(codeString)) + return V3EntityNameUse.SNDX; + throw new IllegalArgumentException("Unknown V3EntityNameUse code '"+codeString+"'"); + } + + public String toCode(V3EntityNameUse code) { + if (code == V3EntityNameUse._NAMEREPRESENTATIONUSE) + return "_NameRepresentationUse"; + if (code == V3EntityNameUse.ABC) + return "ABC"; + if (code == V3EntityNameUse.IDE) + return "IDE"; + if (code == V3EntityNameUse.SYL) + return "SYL"; + if (code == V3EntityNameUse.ASGN) + return "ASGN"; + if (code == V3EntityNameUse.C) + return "C"; + if (code == V3EntityNameUse.I) + return "I"; + if (code == V3EntityNameUse.L) + return "L"; + if (code == V3EntityNameUse.OR) + return "OR"; + if (code == V3EntityNameUse.P) + return "P"; + if (code == V3EntityNameUse.A) + return "A"; + if (code == V3EntityNameUse.R) + return "R"; + if (code == V3EntityNameUse.SRCH) + return "SRCH"; + if (code == V3EntityNameUse.PHON) + return "PHON"; + if (code == V3EntityNameUse.SNDX) + return "SNDX"; + return "?"; + } + + public String toSystem(V3EntityNameUse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseR2.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseR2.java new file mode 100644 index 00000000000..0014931439a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseR2.java @@ -0,0 +1,231 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityNameUseR2 { + + /** + * Description:A name that a person has assumed or has been assumed to them. + */ + ASSUMED, + /** + * Description:A name used in a Professional or Business context . Examples: Continuing to use a maiden name in a professional context, or using a stage performing name (some of these names are also pseudonyms) + */ + A, + /** + * Description:Anonymous assigned name (used to protect a persons identity for privacy reasons) + */ + ANON, + /** + * Description:e.g . Chief Red Cloud + */ + I, + /** + * Description:A non-official name by which the person is sometimes known. (This may also be used to record informal names such as a nickname) + */ + P, + /** + * Description:A name assumed as part of a religious vocation . e.g . Sister Mary Francis, Brother John + */ + R, + /** + * Description:Known as/conventional/the one you normally use + */ + C, + /** + * Description:A name used prior to marriage.Note that marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store maiden names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically + */ + M, + /** + * Description:Identifies the different representations of a name . The representation may affect how the name is used . (E.g . use of Ideographic for formal communications.) + */ + NAMEREPRESENTATIONUSE, + /** + * Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji) + */ + ABC, + /** + * Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters) + */ + IDE, + /** + * Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul) + */ + SYL, + /** + * Description:This name is no longer in use (note: Names may also carry valid time ranges . This code is used to cover the situations where it is known that the name is no longer valid, but no particular time range for its use is known) + */ + OLD, + /** + * Description:This name should no longer be used when interacting with the person (i.e . in addition to no longer being used, the name should not be even mentioned when interacting with the person)Note: applications are not required to compare names labeled "Do Not Use" and other names in order to eliminate name parts that are common between the other name and a name labeled "Do Not Use". + */ + DN, + /** + * Description:The formal name as registered in an official (government) registry, but which name might not be commonly used . May correspond to the concept of legal name + */ + OR, + /** + * Description:The name as understood by the data enterer, i.e. a close approximation of a phonetic spelling of the name, not based on a phonetic algorithm. + */ + PHON, + /** + * Description:A name intended for use in searching or matching. This is used when the name is incomplete and contains enough details for search matching, but not enough for other uses. + */ + SRCH, + /** + * Description:A temporary name. Note that a name valid time can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3EntityNameUseR2 fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Assumed".equals(codeString)) + return ASSUMED; + if ("A".equals(codeString)) + return A; + if ("ANON".equals(codeString)) + return ANON; + if ("I".equals(codeString)) + return I; + if ("P".equals(codeString)) + return P; + if ("R".equals(codeString)) + return R; + if ("C".equals(codeString)) + return C; + if ("M".equals(codeString)) + return M; + if ("NameRepresentationUse".equals(codeString)) + return NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return ABC; + if ("IDE".equals(codeString)) + return IDE; + if ("SYL".equals(codeString)) + return SYL; + if ("OLD".equals(codeString)) + return OLD; + if ("DN".equals(codeString)) + return DN; + if ("OR".equals(codeString)) + return OR; + if ("PHON".equals(codeString)) + return PHON; + if ("SRCH".equals(codeString)) + return SRCH; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3EntityNameUseR2 code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ASSUMED: return "Assumed"; + case A: return "A"; + case ANON: return "ANON"; + case I: return "I"; + case P: return "P"; + case R: return "R"; + case C: return "C"; + case M: return "M"; + case NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; + case ABC: return "ABC"; + case IDE: return "IDE"; + case SYL: return "SYL"; + case OLD: return "OLD"; + case DN: return "DN"; + case OR: return "OR"; + case PHON: return "PHON"; + case SRCH: return "SRCH"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityNameUseR2"; + } + public String getDefinition() { + switch (this) { + case ASSUMED: return "Description:A name that a person has assumed or has been assumed to them."; + case A: return "Description:A name used in a Professional or Business context . Examples: Continuing to use a maiden name in a professional context, or using a stage performing name (some of these names are also pseudonyms)"; + case ANON: return "Description:Anonymous assigned name (used to protect a persons identity for privacy reasons)"; + case I: return "Description:e.g . Chief Red Cloud"; + case P: return "Description:A non-official name by which the person is sometimes known. (This may also be used to record informal names such as a nickname)"; + case R: return "Description:A name assumed as part of a religious vocation . e.g . Sister Mary Francis, Brother John"; + case C: return "Description:Known as/conventional/the one you normally use"; + case M: return "Description:A name used prior to marriage.Note that marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store maiden names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically"; + case NAMEREPRESENTATIONUSE: return "Description:Identifies the different representations of a name . The representation may affect how the name is used . (E.g . use of Ideographic for formal communications.)"; + case ABC: return "Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji)"; + case IDE: return "Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)"; + case SYL: return "Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)"; + case OLD: return "Description:This name is no longer in use (note: Names may also carry valid time ranges . This code is used to cover the situations where it is known that the name is no longer valid, but no particular time range for its use is known)"; + case DN: return "Description:This name should no longer be used when interacting with the person (i.e . in addition to no longer being used, the name should not be even mentioned when interacting with the person)Note: applications are not required to compare names labeled \"Do Not Use\" and other names in order to eliminate name parts that are common between the other name and a name labeled \"Do Not Use\"."; + case OR: return "Description:The formal name as registered in an official (government) registry, but which name might not be commonly used . May correspond to the concept of legal name"; + case PHON: return "Description:The name as understood by the data enterer, i.e. a close approximation of a phonetic spelling of the name, not based on a phonetic algorithm."; + case SRCH: return "Description:A name intended for use in searching or matching. This is used when the name is incomplete and contains enough details for search matching, but not enough for other uses."; + case T: return "Description:A temporary name. Note that a name valid time can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ASSUMED: return "Assumed"; + case A: return "business name"; + case ANON: return "Anonymous"; + case I: return "Indigenous/Tribal"; + case P: return "Other/Pseudonym/Alias"; + case R: return "religious"; + case C: return "customary"; + case M: return "maiden name"; + case NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; + case ABC: return "alphabetic"; + case IDE: return "ideographic"; + case SYL: return "syllabic"; + case OLD: return "no longer in use"; + case DN: return "do not use"; + case OR: return "official registry name"; + case PHON: return "phonetic"; + case SRCH: return "search"; + case T: return "temporary"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseR2EnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseR2EnumFactory.java new file mode 100644 index 00000000000..269c893afe3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityNameUseR2EnumFactory.java @@ -0,0 +1,126 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityNameUseR2EnumFactory implements EnumFactory { + + public V3EntityNameUseR2 fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Assumed".equals(codeString)) + return V3EntityNameUseR2.ASSUMED; + if ("A".equals(codeString)) + return V3EntityNameUseR2.A; + if ("ANON".equals(codeString)) + return V3EntityNameUseR2.ANON; + if ("I".equals(codeString)) + return V3EntityNameUseR2.I; + if ("P".equals(codeString)) + return V3EntityNameUseR2.P; + if ("R".equals(codeString)) + return V3EntityNameUseR2.R; + if ("C".equals(codeString)) + return V3EntityNameUseR2.C; + if ("M".equals(codeString)) + return V3EntityNameUseR2.M; + if ("NameRepresentationUse".equals(codeString)) + return V3EntityNameUseR2.NAMEREPRESENTATIONUSE; + if ("ABC".equals(codeString)) + return V3EntityNameUseR2.ABC; + if ("IDE".equals(codeString)) + return V3EntityNameUseR2.IDE; + if ("SYL".equals(codeString)) + return V3EntityNameUseR2.SYL; + if ("OLD".equals(codeString)) + return V3EntityNameUseR2.OLD; + if ("DN".equals(codeString)) + return V3EntityNameUseR2.DN; + if ("OR".equals(codeString)) + return V3EntityNameUseR2.OR; + if ("PHON".equals(codeString)) + return V3EntityNameUseR2.PHON; + if ("SRCH".equals(codeString)) + return V3EntityNameUseR2.SRCH; + if ("T".equals(codeString)) + return V3EntityNameUseR2.T; + throw new IllegalArgumentException("Unknown V3EntityNameUseR2 code '"+codeString+"'"); + } + + public String toCode(V3EntityNameUseR2 code) { + if (code == V3EntityNameUseR2.ASSUMED) + return "Assumed"; + if (code == V3EntityNameUseR2.A) + return "A"; + if (code == V3EntityNameUseR2.ANON) + return "ANON"; + if (code == V3EntityNameUseR2.I) + return "I"; + if (code == V3EntityNameUseR2.P) + return "P"; + if (code == V3EntityNameUseR2.R) + return "R"; + if (code == V3EntityNameUseR2.C) + return "C"; + if (code == V3EntityNameUseR2.M) + return "M"; + if (code == V3EntityNameUseR2.NAMEREPRESENTATIONUSE) + return "NameRepresentationUse"; + if (code == V3EntityNameUseR2.ABC) + return "ABC"; + if (code == V3EntityNameUseR2.IDE) + return "IDE"; + if (code == V3EntityNameUseR2.SYL) + return "SYL"; + if (code == V3EntityNameUseR2.OLD) + return "OLD"; + if (code == V3EntityNameUseR2.DN) + return "DN"; + if (code == V3EntityNameUseR2.OR) + return "OR"; + if (code == V3EntityNameUseR2.PHON) + return "PHON"; + if (code == V3EntityNameUseR2.SRCH) + return "SRCH"; + if (code == V3EntityNameUseR2.T) + return "T"; + return "?"; + } + + public String toSystem(V3EntityNameUseR2 code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityRisk.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityRisk.java new file mode 100644 index 00000000000..ef0658567c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityRisk.java @@ -0,0 +1,168 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityRisk { + + /** + * A danger that can be associated with certain living subjects, including humans. + */ + AGG, + /** + * The dangers associated with normal biological materials. I.e. potential risk of unknown infections. Routine biological materials from living subjects. + */ + BIO, + /** + * Material is corrosive and may cause severe injury to skin, mucous membranes and eyes. Avoid any unprotected contact. + */ + COR, + /** + * The entity is at risk for escaping from containment or control. + */ + ESC, + /** + * Material is highly inflammable and in certain mixtures (with air) may lead to explosions. Keep away from fire, sparks and excessive heat. + */ + IFL, + /** + * Material is an explosive mixture. Keep away from fire, sparks, and heat. + */ + EXP, + /** + * Material known to be infectious with human pathogenic microorganisms. Those who handle this material must take precautions for their protection. + */ + INF, + /** + * Material contains microorganisms that is an environmental hazard. Must be handled with special care. + */ + BHZ, + /** + * Material is solid and sharp (e.g., cannulas). Dispose in hard container. + */ + INJ, + /** + * Material is poisonous to humans and/or animals. Special care must be taken to avoid incorporation, even of small amounts. + */ + POI, + /** + * Material is a source for ionizing radiation and must be handled with special care to avoid injury of those who handle it and to avoid environmental hazards. + */ + RAD, + /** + * added to help the parsers + */ + NULL; + public static V3EntityRisk fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AGG".equals(codeString)) + return AGG; + if ("BIO".equals(codeString)) + return BIO; + if ("COR".equals(codeString)) + return COR; + if ("ESC".equals(codeString)) + return ESC; + if ("IFL".equals(codeString)) + return IFL; + if ("EXP".equals(codeString)) + return EXP; + if ("INF".equals(codeString)) + return INF; + if ("BHZ".equals(codeString)) + return BHZ; + if ("INJ".equals(codeString)) + return INJ; + if ("POI".equals(codeString)) + return POI; + if ("RAD".equals(codeString)) + return RAD; + throw new FHIRException("Unknown V3EntityRisk code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AGG: return "AGG"; + case BIO: return "BIO"; + case COR: return "COR"; + case ESC: return "ESC"; + case IFL: return "IFL"; + case EXP: return "EXP"; + case INF: return "INF"; + case BHZ: return "BHZ"; + case INJ: return "INJ"; + case POI: return "POI"; + case RAD: return "RAD"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityRisk"; + } + public String getDefinition() { + switch (this) { + case AGG: return "A danger that can be associated with certain living subjects, including humans."; + case BIO: return "The dangers associated with normal biological materials. I.e. potential risk of unknown infections. Routine biological materials from living subjects."; + case COR: return "Material is corrosive and may cause severe injury to skin, mucous membranes and eyes. Avoid any unprotected contact."; + case ESC: return "The entity is at risk for escaping from containment or control."; + case IFL: return "Material is highly inflammable and in certain mixtures (with air) may lead to explosions. Keep away from fire, sparks and excessive heat."; + case EXP: return "Material is an explosive mixture. Keep away from fire, sparks, and heat."; + case INF: return "Material known to be infectious with human pathogenic microorganisms. Those who handle this material must take precautions for their protection."; + case BHZ: return "Material contains microorganisms that is an environmental hazard. Must be handled with special care."; + case INJ: return "Material is solid and sharp (e.g., cannulas). Dispose in hard container."; + case POI: return "Material is poisonous to humans and/or animals. Special care must be taken to avoid incorporation, even of small amounts."; + case RAD: return "Material is a source for ionizing radiation and must be handled with special care to avoid injury of those who handle it and to avoid environmental hazards."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AGG: return "aggressive"; + case BIO: return "Biological"; + case COR: return "Corrosive"; + case ESC: return "Escape Risk"; + case IFL: return "inflammable"; + case EXP: return "explosive"; + case INF: return "infectious"; + case BHZ: return "biohazard"; + case INJ: return "injury hazard"; + case POI: return "poison"; + case RAD: return "radioactive"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityRiskEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityRiskEnumFactory.java new file mode 100644 index 00000000000..8b21cdfa0db --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityRiskEnumFactory.java @@ -0,0 +1,98 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityRiskEnumFactory implements EnumFactory { + + public V3EntityRisk fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AGG".equals(codeString)) + return V3EntityRisk.AGG; + if ("BIO".equals(codeString)) + return V3EntityRisk.BIO; + if ("COR".equals(codeString)) + return V3EntityRisk.COR; + if ("ESC".equals(codeString)) + return V3EntityRisk.ESC; + if ("IFL".equals(codeString)) + return V3EntityRisk.IFL; + if ("EXP".equals(codeString)) + return V3EntityRisk.EXP; + if ("INF".equals(codeString)) + return V3EntityRisk.INF; + if ("BHZ".equals(codeString)) + return V3EntityRisk.BHZ; + if ("INJ".equals(codeString)) + return V3EntityRisk.INJ; + if ("POI".equals(codeString)) + return V3EntityRisk.POI; + if ("RAD".equals(codeString)) + return V3EntityRisk.RAD; + throw new IllegalArgumentException("Unknown V3EntityRisk code '"+codeString+"'"); + } + + public String toCode(V3EntityRisk code) { + if (code == V3EntityRisk.AGG) + return "AGG"; + if (code == V3EntityRisk.BIO) + return "BIO"; + if (code == V3EntityRisk.COR) + return "COR"; + if (code == V3EntityRisk.ESC) + return "ESC"; + if (code == V3EntityRisk.IFL) + return "IFL"; + if (code == V3EntityRisk.EXP) + return "EXP"; + if (code == V3EntityRisk.INF) + return "INF"; + if (code == V3EntityRisk.BHZ) + return "BHZ"; + if (code == V3EntityRisk.INJ) + return "INJ"; + if (code == V3EntityRisk.POI) + return "POI"; + if (code == V3EntityRisk.RAD) + return "RAD"; + return "?"; + } + + public String toSystem(V3EntityRisk code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityStatus.java new file mode 100644 index 00000000000..3f82abf4d90 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityStatus.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EntityStatus { + + /** + * The 'typical' state. Excludes "nullified" which represents the termination state of an Entity record instance that was created in error. + */ + NORMAL, + /** + * The state representing the fact that the Entity record is currently active. + */ + ACTIVE, + /** + * Definition: The state representing the fact that the entity is inactive. + */ + INACTIVE, + /** + * The state representing the normal termination of an Entity record. + */ + TERMINATED, + /** + * The state representing the termination of an Entity record instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3EntityStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("terminated".equals(codeString)) + return TERMINATED; + if ("nullified".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3EntityStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EntityStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The 'typical' state. Excludes \"nullified\" which represents the termination state of an Entity record instance that was created in error."; + case ACTIVE: return "The state representing the fact that the Entity record is currently active."; + case INACTIVE: return "Definition: The state representing the fact that the entity is inactive."; + case TERMINATED: return "The state representing the normal termination of an Entity record."; + case NULLIFIED: return "The state representing the termination of an Entity record instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityStatusEnumFactory.java new file mode 100644 index 00000000000..837c126ce47 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EntityStatusEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EntityStatusEnumFactory implements EnumFactory { + + public V3EntityStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3EntityStatus.NORMAL; + if ("active".equals(codeString)) + return V3EntityStatus.ACTIVE; + if ("inactive".equals(codeString)) + return V3EntityStatus.INACTIVE; + if ("terminated".equals(codeString)) + return V3EntityStatus.TERMINATED; + if ("nullified".equals(codeString)) + return V3EntityStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3EntityStatus code '"+codeString+"'"); + } + + public String toCode(V3EntityStatus code) { + if (code == V3EntityStatus.NORMAL) + return "normal"; + if (code == V3EntityStatus.ACTIVE) + return "active"; + if (code == V3EntityStatus.INACTIVE) + return "inactive"; + if (code == V3EntityStatus.TERMINATED) + return "terminated"; + if (code == V3EntityStatus.NULLIFIED) + return "nullified"; + return "?"; + } + + public String toSystem(V3EntityStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EquipmentAlertLevel.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EquipmentAlertLevel.java new file mode 100644 index 00000000000..e6945dc0031 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EquipmentAlertLevel.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3EquipmentAlertLevel { + + /** + * Shut Down, Fix Problem and Re-init + */ + C, + /** + * No Corrective Action Needed + */ + N, + /** + * Corrective Action Required + */ + S, + /** + * Corrective Action Anticipated + */ + W, + /** + * added to help the parsers + */ + NULL; + public static V3EquipmentAlertLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("W".equals(codeString)) + return W; + throw new FHIRException("Unknown V3EquipmentAlertLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case N: return "N"; + case S: return "S"; + case W: return "W"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/EquipmentAlertLevel"; + } + public String getDefinition() { + switch (this) { + case C: return "Shut Down, Fix Problem and Re-init"; + case N: return "No Corrective Action Needed"; + case S: return "Corrective Action Required"; + case W: return "Corrective Action Anticipated"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "Critical"; + case N: return "Normal"; + case S: return "Serious"; + case W: return "Warning"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EquipmentAlertLevelEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EquipmentAlertLevelEnumFactory.java new file mode 100644 index 00000000000..e0794a532be --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EquipmentAlertLevelEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EquipmentAlertLevelEnumFactory implements EnumFactory { + + public V3EquipmentAlertLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return V3EquipmentAlertLevel.C; + if ("N".equals(codeString)) + return V3EquipmentAlertLevel.N; + if ("S".equals(codeString)) + return V3EquipmentAlertLevel.S; + if ("W".equals(codeString)) + return V3EquipmentAlertLevel.W; + throw new IllegalArgumentException("Unknown V3EquipmentAlertLevel code '"+codeString+"'"); + } + + public String toCode(V3EquipmentAlertLevel code) { + if (code == V3EquipmentAlertLevel.C) + return "C"; + if (code == V3EquipmentAlertLevel.N) + return "N"; + if (code == V3EquipmentAlertLevel.S) + return "S"; + if (code == V3EquipmentAlertLevel.W) + return "W"; + return "?"; + } + + public String toSystem(V3EquipmentAlertLevel code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Ethnicity.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Ethnicity.java new file mode 100644 index 00000000000..10b6bc68e76 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Ethnicity.java @@ -0,0 +1,456 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Ethnicity { + + /** + * Hispanic or Latino + */ + _21352, + /** + * Spaniard + */ + _21378, + /** + * Andalusian + */ + _21386, + /** + * Asturian + */ + _21394, + /** + * Castillian + */ + _21402, + /** + * Catalonian + */ + _21410, + /** + * Belearic Islander + */ + _21428, + /** + * Gallego + */ + _21436, + /** + * Valencian + */ + _21444, + /** + * Canarian + */ + _21451, + /** + * Spanish Basque + */ + _21469, + /** + * Mexican + */ + _21485, + /** + * Mexican American + */ + _21493, + /** + * Mexicano + */ + _21501, + /** + * Chicano + */ + _21519, + /** + * La Raza + */ + _21527, + /** + * Mexican American Indian + */ + _21535, + /** + * Central American + */ + _21550, + /** + * Costa Rican + */ + _21568, + /** + * Guatemalan + */ + _21576, + /** + * Honduran + */ + _21584, + /** + * Nicaraguan + */ + _21592, + /** + * Panamanian + */ + _21600, + /** + * Salvadoran + */ + _21618, + /** + * Central American Indian + */ + _21626, + /** + * Canal Zone + */ + _21634, + /** + * South American + */ + _21659, + /** + * Argentinean + */ + _21667, + /** + * Bolivian + */ + _21675, + /** + * Chilean + */ + _21683, + /** + * Colombian + */ + _21691, + /** + * Ecuadorian + */ + _21709, + /** + * Paraguayan + */ + _21717, + /** + * Peruvian + */ + _21725, + /** + * Uruguayan + */ + _21733, + /** + * Venezuelan + */ + _21741, + /** + * South American Indian + */ + _21758, + /** + * Criollo + */ + _21766, + /** + * Latin American + */ + _21782, + /** + * Puerto Rican + */ + _21808, + /** + * Cuban + */ + _21824, + /** + * Dominican + */ + _21840, + /** + * Note that this term remains in the table for completeness, even though within HL7, the notion of "not otherwise coded" term is deprecated. + */ + _21865, + /** + * added to help the parsers + */ + NULL; + public static V3Ethnicity fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("2135-2".equals(codeString)) + return _21352; + if ("2137-8".equals(codeString)) + return _21378; + if ("2138-6".equals(codeString)) + return _21386; + if ("2139-4".equals(codeString)) + return _21394; + if ("2140-2".equals(codeString)) + return _21402; + if ("2141-0".equals(codeString)) + return _21410; + if ("2142-8".equals(codeString)) + return _21428; + if ("2143-6".equals(codeString)) + return _21436; + if ("2144-4".equals(codeString)) + return _21444; + if ("2145-1".equals(codeString)) + return _21451; + if ("2146-9".equals(codeString)) + return _21469; + if ("2148-5".equals(codeString)) + return _21485; + if ("2149-3".equals(codeString)) + return _21493; + if ("2150-1".equals(codeString)) + return _21501; + if ("2151-9".equals(codeString)) + return _21519; + if ("2152-7".equals(codeString)) + return _21527; + if ("2153-5".equals(codeString)) + return _21535; + if ("2155-0".equals(codeString)) + return _21550; + if ("2156-8".equals(codeString)) + return _21568; + if ("2157-6".equals(codeString)) + return _21576; + if ("2158-4".equals(codeString)) + return _21584; + if ("2159-2".equals(codeString)) + return _21592; + if ("2160-0".equals(codeString)) + return _21600; + if ("2161-8".equals(codeString)) + return _21618; + if ("2162-6".equals(codeString)) + return _21626; + if ("2163-4".equals(codeString)) + return _21634; + if ("2165-9".equals(codeString)) + return _21659; + if ("2166-7".equals(codeString)) + return _21667; + if ("2167-5".equals(codeString)) + return _21675; + if ("2168-3".equals(codeString)) + return _21683; + if ("2169-1".equals(codeString)) + return _21691; + if ("2170-9".equals(codeString)) + return _21709; + if ("2171-7".equals(codeString)) + return _21717; + if ("2172-5".equals(codeString)) + return _21725; + if ("2173-3".equals(codeString)) + return _21733; + if ("2174-1".equals(codeString)) + return _21741; + if ("2175-8".equals(codeString)) + return _21758; + if ("2176-6".equals(codeString)) + return _21766; + if ("2178-2".equals(codeString)) + return _21782; + if ("2180-8".equals(codeString)) + return _21808; + if ("2182-4".equals(codeString)) + return _21824; + if ("2184-0".equals(codeString)) + return _21840; + if ("2186-5".equals(codeString)) + return _21865; + throw new FHIRException("Unknown V3Ethnicity code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _21352: return "2135-2"; + case _21378: return "2137-8"; + case _21386: return "2138-6"; + case _21394: return "2139-4"; + case _21402: return "2140-2"; + case _21410: return "2141-0"; + case _21428: return "2142-8"; + case _21436: return "2143-6"; + case _21444: return "2144-4"; + case _21451: return "2145-1"; + case _21469: return "2146-9"; + case _21485: return "2148-5"; + case _21493: return "2149-3"; + case _21501: return "2150-1"; + case _21519: return "2151-9"; + case _21527: return "2152-7"; + case _21535: return "2153-5"; + case _21550: return "2155-0"; + case _21568: return "2156-8"; + case _21576: return "2157-6"; + case _21584: return "2158-4"; + case _21592: return "2159-2"; + case _21600: return "2160-0"; + case _21618: return "2161-8"; + case _21626: return "2162-6"; + case _21634: return "2163-4"; + case _21659: return "2165-9"; + case _21667: return "2166-7"; + case _21675: return "2167-5"; + case _21683: return "2168-3"; + case _21691: return "2169-1"; + case _21709: return "2170-9"; + case _21717: return "2171-7"; + case _21725: return "2172-5"; + case _21733: return "2173-3"; + case _21741: return "2174-1"; + case _21758: return "2175-8"; + case _21766: return "2176-6"; + case _21782: return "2178-2"; + case _21808: return "2180-8"; + case _21824: return "2182-4"; + case _21840: return "2184-0"; + case _21865: return "2186-5"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Ethnicity"; + } + public String getDefinition() { + switch (this) { + case _21352: return "Hispanic or Latino"; + case _21378: return "Spaniard"; + case _21386: return "Andalusian"; + case _21394: return "Asturian"; + case _21402: return "Castillian"; + case _21410: return "Catalonian"; + case _21428: return "Belearic Islander"; + case _21436: return "Gallego"; + case _21444: return "Valencian"; + case _21451: return "Canarian"; + case _21469: return "Spanish Basque"; + case _21485: return "Mexican"; + case _21493: return "Mexican American"; + case _21501: return "Mexicano"; + case _21519: return "Chicano"; + case _21527: return "La Raza"; + case _21535: return "Mexican American Indian"; + case _21550: return "Central American"; + case _21568: return "Costa Rican"; + case _21576: return "Guatemalan"; + case _21584: return "Honduran"; + case _21592: return "Nicaraguan"; + case _21600: return "Panamanian"; + case _21618: return "Salvadoran"; + case _21626: return "Central American Indian"; + case _21634: return "Canal Zone"; + case _21659: return "South American"; + case _21667: return "Argentinean"; + case _21675: return "Bolivian"; + case _21683: return "Chilean"; + case _21691: return "Colombian"; + case _21709: return "Ecuadorian"; + case _21717: return "Paraguayan"; + case _21725: return "Peruvian"; + case _21733: return "Uruguayan"; + case _21741: return "Venezuelan"; + case _21758: return "South American Indian"; + case _21766: return "Criollo"; + case _21782: return "Latin American"; + case _21808: return "Puerto Rican"; + case _21824: return "Cuban"; + case _21840: return "Dominican"; + case _21865: return "Note that this term remains in the table for completeness, even though within HL7, the notion of \"not otherwise coded\" term is deprecated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _21352: return "Hispanic or Latino"; + case _21378: return "Spaniard"; + case _21386: return "Andalusian"; + case _21394: return "Asturian"; + case _21402: return "Castillian"; + case _21410: return "Catalonian"; + case _21428: return "Belearic Islander"; + case _21436: return "Gallego"; + case _21444: return "Valencian"; + case _21451: return "Canarian"; + case _21469: return "Spanish Basque"; + case _21485: return "Mexican"; + case _21493: return "Mexican American"; + case _21501: return "Mexicano"; + case _21519: return "Chicano"; + case _21527: return "La Raza"; + case _21535: return "Mexican American Indian"; + case _21550: return "Central American"; + case _21568: return "Costa Rican"; + case _21576: return "Guatemalan"; + case _21584: return "Honduran"; + case _21592: return "Nicaraguan"; + case _21600: return "Panamanian"; + case _21618: return "Salvadoran"; + case _21626: return "Central American Indian"; + case _21634: return "Canal Zone"; + case _21659: return "South American"; + case _21667: return "Argentinean"; + case _21675: return "Bolivian"; + case _21683: return "Chilean"; + case _21691: return "Colombian"; + case _21709: return "Ecuadorian"; + case _21717: return "Paraguayan"; + case _21725: return "Peruvian"; + case _21733: return "Uruguayan"; + case _21741: return "Venezuelan"; + case _21758: return "South American Indian"; + case _21766: return "Criollo"; + case _21782: return "Latin American"; + case _21808: return "Puerto Rican"; + case _21824: return "Cuban"; + case _21840: return "Dominican"; + case _21865: return "Not Hispanic or Latino"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EthnicityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EthnicityEnumFactory.java new file mode 100644 index 00000000000..ffbd296524e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3EthnicityEnumFactory.java @@ -0,0 +1,226 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3EthnicityEnumFactory implements EnumFactory { + + public V3Ethnicity fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("2135-2".equals(codeString)) + return V3Ethnicity._21352; + if ("2137-8".equals(codeString)) + return V3Ethnicity._21378; + if ("2138-6".equals(codeString)) + return V3Ethnicity._21386; + if ("2139-4".equals(codeString)) + return V3Ethnicity._21394; + if ("2140-2".equals(codeString)) + return V3Ethnicity._21402; + if ("2141-0".equals(codeString)) + return V3Ethnicity._21410; + if ("2142-8".equals(codeString)) + return V3Ethnicity._21428; + if ("2143-6".equals(codeString)) + return V3Ethnicity._21436; + if ("2144-4".equals(codeString)) + return V3Ethnicity._21444; + if ("2145-1".equals(codeString)) + return V3Ethnicity._21451; + if ("2146-9".equals(codeString)) + return V3Ethnicity._21469; + if ("2148-5".equals(codeString)) + return V3Ethnicity._21485; + if ("2149-3".equals(codeString)) + return V3Ethnicity._21493; + if ("2150-1".equals(codeString)) + return V3Ethnicity._21501; + if ("2151-9".equals(codeString)) + return V3Ethnicity._21519; + if ("2152-7".equals(codeString)) + return V3Ethnicity._21527; + if ("2153-5".equals(codeString)) + return V3Ethnicity._21535; + if ("2155-0".equals(codeString)) + return V3Ethnicity._21550; + if ("2156-8".equals(codeString)) + return V3Ethnicity._21568; + if ("2157-6".equals(codeString)) + return V3Ethnicity._21576; + if ("2158-4".equals(codeString)) + return V3Ethnicity._21584; + if ("2159-2".equals(codeString)) + return V3Ethnicity._21592; + if ("2160-0".equals(codeString)) + return V3Ethnicity._21600; + if ("2161-8".equals(codeString)) + return V3Ethnicity._21618; + if ("2162-6".equals(codeString)) + return V3Ethnicity._21626; + if ("2163-4".equals(codeString)) + return V3Ethnicity._21634; + if ("2165-9".equals(codeString)) + return V3Ethnicity._21659; + if ("2166-7".equals(codeString)) + return V3Ethnicity._21667; + if ("2167-5".equals(codeString)) + return V3Ethnicity._21675; + if ("2168-3".equals(codeString)) + return V3Ethnicity._21683; + if ("2169-1".equals(codeString)) + return V3Ethnicity._21691; + if ("2170-9".equals(codeString)) + return V3Ethnicity._21709; + if ("2171-7".equals(codeString)) + return V3Ethnicity._21717; + if ("2172-5".equals(codeString)) + return V3Ethnicity._21725; + if ("2173-3".equals(codeString)) + return V3Ethnicity._21733; + if ("2174-1".equals(codeString)) + return V3Ethnicity._21741; + if ("2175-8".equals(codeString)) + return V3Ethnicity._21758; + if ("2176-6".equals(codeString)) + return V3Ethnicity._21766; + if ("2178-2".equals(codeString)) + return V3Ethnicity._21782; + if ("2180-8".equals(codeString)) + return V3Ethnicity._21808; + if ("2182-4".equals(codeString)) + return V3Ethnicity._21824; + if ("2184-0".equals(codeString)) + return V3Ethnicity._21840; + if ("2186-5".equals(codeString)) + return V3Ethnicity._21865; + throw new IllegalArgumentException("Unknown V3Ethnicity code '"+codeString+"'"); + } + + public String toCode(V3Ethnicity code) { + if (code == V3Ethnicity._21352) + return "2135-2"; + if (code == V3Ethnicity._21378) + return "2137-8"; + if (code == V3Ethnicity._21386) + return "2138-6"; + if (code == V3Ethnicity._21394) + return "2139-4"; + if (code == V3Ethnicity._21402) + return "2140-2"; + if (code == V3Ethnicity._21410) + return "2141-0"; + if (code == V3Ethnicity._21428) + return "2142-8"; + if (code == V3Ethnicity._21436) + return "2143-6"; + if (code == V3Ethnicity._21444) + return "2144-4"; + if (code == V3Ethnicity._21451) + return "2145-1"; + if (code == V3Ethnicity._21469) + return "2146-9"; + if (code == V3Ethnicity._21485) + return "2148-5"; + if (code == V3Ethnicity._21493) + return "2149-3"; + if (code == V3Ethnicity._21501) + return "2150-1"; + if (code == V3Ethnicity._21519) + return "2151-9"; + if (code == V3Ethnicity._21527) + return "2152-7"; + if (code == V3Ethnicity._21535) + return "2153-5"; + if (code == V3Ethnicity._21550) + return "2155-0"; + if (code == V3Ethnicity._21568) + return "2156-8"; + if (code == V3Ethnicity._21576) + return "2157-6"; + if (code == V3Ethnicity._21584) + return "2158-4"; + if (code == V3Ethnicity._21592) + return "2159-2"; + if (code == V3Ethnicity._21600) + return "2160-0"; + if (code == V3Ethnicity._21618) + return "2161-8"; + if (code == V3Ethnicity._21626) + return "2162-6"; + if (code == V3Ethnicity._21634) + return "2163-4"; + if (code == V3Ethnicity._21659) + return "2165-9"; + if (code == V3Ethnicity._21667) + return "2166-7"; + if (code == V3Ethnicity._21675) + return "2167-5"; + if (code == V3Ethnicity._21683) + return "2168-3"; + if (code == V3Ethnicity._21691) + return "2169-1"; + if (code == V3Ethnicity._21709) + return "2170-9"; + if (code == V3Ethnicity._21717) + return "2171-7"; + if (code == V3Ethnicity._21725) + return "2172-5"; + if (code == V3Ethnicity._21733) + return "2173-3"; + if (code == V3Ethnicity._21741) + return "2174-1"; + if (code == V3Ethnicity._21758) + return "2175-8"; + if (code == V3Ethnicity._21766) + return "2176-6"; + if (code == V3Ethnicity._21782) + return "2178-2"; + if (code == V3Ethnicity._21808) + return "2180-8"; + if (code == V3Ethnicity._21824) + return "2182-4"; + if (code == V3Ethnicity._21840) + return "2184-0"; + if (code == V3Ethnicity._21865) + return "2186-5"; + return "?"; + } + + public String toSystem(V3Ethnicity code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ExposureMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ExposureMode.java new file mode 100644 index 00000000000..8a86af554b7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ExposureMode.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ExposureMode { + + /** + * Code for the mechanism by which the exposure agent was exchanged or potentially exchanged by the participants involved in the exposure. + */ + _EXPOSUREMODE, + /** + * Description: Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation. + */ + AIRBORNE, + /** + * Description: Communication of an agent from a living subject or environmental source to a living subject through direct physical contact. + */ + CONTACT, + /** + * Description: Communication of an agent from a food source to a living subject via oral consumption. + */ + FOODBORNE, + /** + * Description: Communication of an agent to a living subject by contact and/or consumption via an aqueous medium + */ + WATERBORNE, + /** + * added to help the parsers + */ + NULL; + public static V3ExposureMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ExposureMode".equals(codeString)) + return _EXPOSUREMODE; + if ("AIRBORNE".equals(codeString)) + return AIRBORNE; + if ("CONTACT".equals(codeString)) + return CONTACT; + if ("FOODBORNE".equals(codeString)) + return FOODBORNE; + if ("WATERBORNE".equals(codeString)) + return WATERBORNE; + throw new FHIRException("Unknown V3ExposureMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _EXPOSUREMODE: return "_ExposureMode"; + case AIRBORNE: return "AIRBORNE"; + case CONTACT: return "CONTACT"; + case FOODBORNE: return "FOODBORNE"; + case WATERBORNE: return "WATERBORNE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ExposureMode"; + } + public String getDefinition() { + switch (this) { + case _EXPOSUREMODE: return "Code for the mechanism by which the exposure agent was exchanged or potentially exchanged by the participants involved in the exposure."; + case AIRBORNE: return "Description: Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation."; + case CONTACT: return "Description: Communication of an agent from a living subject or environmental source to a living subject through direct physical contact."; + case FOODBORNE: return "Description: Communication of an agent from a food source to a living subject via oral consumption."; + case WATERBORNE: return "Description: Communication of an agent to a living subject by contact and/or consumption via an aqueous medium"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _EXPOSUREMODE: return "ExposureMode"; + case AIRBORNE: return "airborne"; + case CONTACT: return "contact"; + case FOODBORNE: return "foodborne"; + case WATERBORNE: return "waterborne"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ExposureModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ExposureModeEnumFactory.java new file mode 100644 index 00000000000..80583f2f805 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ExposureModeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ExposureModeEnumFactory implements EnumFactory { + + public V3ExposureMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ExposureMode".equals(codeString)) + return V3ExposureMode._EXPOSUREMODE; + if ("AIRBORNE".equals(codeString)) + return V3ExposureMode.AIRBORNE; + if ("CONTACT".equals(codeString)) + return V3ExposureMode.CONTACT; + if ("FOODBORNE".equals(codeString)) + return V3ExposureMode.FOODBORNE; + if ("WATERBORNE".equals(codeString)) + return V3ExposureMode.WATERBORNE; + throw new IllegalArgumentException("Unknown V3ExposureMode code '"+codeString+"'"); + } + + public String toCode(V3ExposureMode code) { + if (code == V3ExposureMode._EXPOSUREMODE) + return "_ExposureMode"; + if (code == V3ExposureMode.AIRBORNE) + return "AIRBORNE"; + if (code == V3ExposureMode.CONTACT) + return "CONTACT"; + if (code == V3ExposureMode.FOODBORNE) + return "FOODBORNE"; + if (code == V3ExposureMode.WATERBORNE) + return "WATERBORNE"; + return "?"; + } + + public String toSystem(V3ExposureMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GTSAbbreviation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GTSAbbreviation.java new file mode 100644 index 00000000000..11f90d40f26 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GTSAbbreviation.java @@ -0,0 +1,402 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3GTSAbbreviation { + + /** + * Every morning at institution specified times. + */ + AM, + /** + * Two times a day at institution specified time + */ + BID, + /** + * Regular business days (Monday to Friday excluding holidays) + */ + JB, + /** + * Regular weekends (Saturday and Sunday excluding holidays) + */ + JE, + /** + * Holidays + */ + JH, + /** + * Christian Holidays (Roman/Gregorian [Western] Tradition.) + */ + _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN, + /** + * Easter Sunday. The Easter date is a rather complex calculation based on Astronomical tables describing full moon dates. Details can be found at [http://www.assa.org.au/edm.html, and http://aa.usno.navy.mil/AA/faq/docs/easter.html]. Note that the Christian Orthodox Holidays are based on the Julian calendar. + */ + JHCHREAS, + /** + * Good Friday, is the Friday right before Easter Sunday. + */ + JHCHRGFR, + /** + * New Year's Day (January 1) + */ + JHCHRNEW, + /** + * Pentecost Sunday, is seven weeks after Easter (the 50th day of Easter). + */ + JHCHRPEN, + /** + * Christmas Eve (December 24) + */ + JHCHRXME, + /** + * Christmas Day (December 25) + */ + JHCHRXMS, + /** + * Description:The Netherlands National Holidays. + */ + JHNNL, + /** + * Description:Liberation day (May 5 every five years) + */ + JHNNLLD, + /** + * Description:Queen's day (April 30) + */ + JHNNLQD, + /** + * Description:Sinterklaas (December 5) + */ + JHNNLSK, + /** + * United States National Holidays (public holidays for federal employees established by U.S. Federal law 5 U.S.C. 6103). + */ + JHNUS, + /** + * Columbus Day, the second Monday in October. + */ + JHNUSCLM, + /** + * Independence Day (4th of July) + */ + JHNUSIND, + /** + * Alternative Monday after 4th of July Weekend [5 U.S.C. 6103(b)]. + */ + JHNUSIND1, + /** + * Alternative Friday before 4th of July Weekend [5 U.S.C. 6103(b)]. + */ + JHNUSIND5, + /** + * Labor Day, the first Monday in September. + */ + JHNUSLBR, + /** + * Memorial Day, the last Monday in May. + */ + JHNUSMEM, + /** + * Friday before Memorial Day Weekend + */ + JHNUSMEM5, + /** + * Saturday of Memorial Day Weekend + */ + JHNUSMEM6, + /** + * Dr. Martin Luther King, Jr. Day, the third Monday in January. + */ + JHNUSMLK, + /** + * Washington's Birthday (Presidential Day) the third Monday in February. + */ + JHNUSPRE, + /** + * Thanksgiving Day, the fourth Thursday in November. + */ + JHNUSTKS, + /** + * Friday after Thanksgiving. + */ + JHNUSTKS5, + /** + * Veteran's Day, November 11. + */ + JHNUSVET, + /** + * Every afternoon at institution specified times. + */ + PM, + /** + * Every 4 hours at institution specified time + */ + Q4H, + /** + * Every 6 hours at institution specified time + */ + Q6H, + /** + * Every day at institution specified times. + */ + QD, + /** + * Four times a day at institution specified time + */ + QID, + /** + * Every other day at institution specified times. + */ + QOD, + /** + * Three times a day at institution specified time + */ + TID, + /** + * added to help the parsers + */ + NULL; + public static V3GTSAbbreviation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AM".equals(codeString)) + return AM; + if ("BID".equals(codeString)) + return BID; + if ("JB".equals(codeString)) + return JB; + if ("JE".equals(codeString)) + return JE; + if ("JH".equals(codeString)) + return JH; + if ("_GTSAbbreviationHolidaysChristianRoman".equals(codeString)) + return _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN; + if ("JHCHREAS".equals(codeString)) + return JHCHREAS; + if ("JHCHRGFR".equals(codeString)) + return JHCHRGFR; + if ("JHCHRNEW".equals(codeString)) + return JHCHRNEW; + if ("JHCHRPEN".equals(codeString)) + return JHCHRPEN; + if ("JHCHRXME".equals(codeString)) + return JHCHRXME; + if ("JHCHRXMS".equals(codeString)) + return JHCHRXMS; + if ("JHNNL".equals(codeString)) + return JHNNL; + if ("JHNNLLD".equals(codeString)) + return JHNNLLD; + if ("JHNNLQD".equals(codeString)) + return JHNNLQD; + if ("JHNNLSK".equals(codeString)) + return JHNNLSK; + if ("JHNUS".equals(codeString)) + return JHNUS; + if ("JHNUSCLM".equals(codeString)) + return JHNUSCLM; + if ("JHNUSIND".equals(codeString)) + return JHNUSIND; + if ("JHNUSIND1".equals(codeString)) + return JHNUSIND1; + if ("JHNUSIND5".equals(codeString)) + return JHNUSIND5; + if ("JHNUSLBR".equals(codeString)) + return JHNUSLBR; + if ("JHNUSMEM".equals(codeString)) + return JHNUSMEM; + if ("JHNUSMEM5".equals(codeString)) + return JHNUSMEM5; + if ("JHNUSMEM6".equals(codeString)) + return JHNUSMEM6; + if ("JHNUSMLK".equals(codeString)) + return JHNUSMLK; + if ("JHNUSPRE".equals(codeString)) + return JHNUSPRE; + if ("JHNUSTKS".equals(codeString)) + return JHNUSTKS; + if ("JHNUSTKS5".equals(codeString)) + return JHNUSTKS5; + if ("JHNUSVET".equals(codeString)) + return JHNUSVET; + if ("PM".equals(codeString)) + return PM; + if ("Q4H".equals(codeString)) + return Q4H; + if ("Q6H".equals(codeString)) + return Q6H; + if ("QD".equals(codeString)) + return QD; + if ("QID".equals(codeString)) + return QID; + if ("QOD".equals(codeString)) + return QOD; + if ("TID".equals(codeString)) + return TID; + throw new FHIRException("Unknown V3GTSAbbreviation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AM: return "AM"; + case BID: return "BID"; + case JB: return "JB"; + case JE: return "JE"; + case JH: return "JH"; + case _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN: return "_GTSAbbreviationHolidaysChristianRoman"; + case JHCHREAS: return "JHCHREAS"; + case JHCHRGFR: return "JHCHRGFR"; + case JHCHRNEW: return "JHCHRNEW"; + case JHCHRPEN: return "JHCHRPEN"; + case JHCHRXME: return "JHCHRXME"; + case JHCHRXMS: return "JHCHRXMS"; + case JHNNL: return "JHNNL"; + case JHNNLLD: return "JHNNLLD"; + case JHNNLQD: return "JHNNLQD"; + case JHNNLSK: return "JHNNLSK"; + case JHNUS: return "JHNUS"; + case JHNUSCLM: return "JHNUSCLM"; + case JHNUSIND: return "JHNUSIND"; + case JHNUSIND1: return "JHNUSIND1"; + case JHNUSIND5: return "JHNUSIND5"; + case JHNUSLBR: return "JHNUSLBR"; + case JHNUSMEM: return "JHNUSMEM"; + case JHNUSMEM5: return "JHNUSMEM5"; + case JHNUSMEM6: return "JHNUSMEM6"; + case JHNUSMLK: return "JHNUSMLK"; + case JHNUSPRE: return "JHNUSPRE"; + case JHNUSTKS: return "JHNUSTKS"; + case JHNUSTKS5: return "JHNUSTKS5"; + case JHNUSVET: return "JHNUSVET"; + case PM: return "PM"; + case Q4H: return "Q4H"; + case Q6H: return "Q6H"; + case QD: return "QD"; + case QID: return "QID"; + case QOD: return "QOD"; + case TID: return "TID"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/GTSAbbreviation"; + } + public String getDefinition() { + switch (this) { + case AM: return "Every morning at institution specified times."; + case BID: return "Two times a day at institution specified time"; + case JB: return "Regular business days (Monday to Friday excluding holidays)"; + case JE: return "Regular weekends (Saturday and Sunday excluding holidays)"; + case JH: return "Holidays"; + case _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN: return "Christian Holidays (Roman/Gregorian [Western] Tradition.)"; + case JHCHREAS: return "Easter Sunday. The Easter date is a rather complex calculation based on Astronomical tables describing full moon dates. Details can be found at [http://www.assa.org.au/edm.html, and http://aa.usno.navy.mil/AA/faq/docs/easter.html]. Note that the Christian Orthodox Holidays are based on the Julian calendar."; + case JHCHRGFR: return "Good Friday, is the Friday right before Easter Sunday."; + case JHCHRNEW: return "New Year's Day (January 1)"; + case JHCHRPEN: return "Pentecost Sunday, is seven weeks after Easter (the 50th day of Easter)."; + case JHCHRXME: return "Christmas Eve (December 24)"; + case JHCHRXMS: return "Christmas Day (December 25)"; + case JHNNL: return "Description:The Netherlands National Holidays."; + case JHNNLLD: return "Description:Liberation day (May 5 every five years)"; + case JHNNLQD: return "Description:Queen's day (April 30)"; + case JHNNLSK: return "Description:Sinterklaas (December 5)"; + case JHNUS: return "United States National Holidays (public holidays for federal employees established by U.S. Federal law 5 U.S.C. 6103)."; + case JHNUSCLM: return "Columbus Day, the second Monday in October."; + case JHNUSIND: return "Independence Day (4th of July)"; + case JHNUSIND1: return "Alternative Monday after 4th of July Weekend [5 U.S.C. 6103(b)]."; + case JHNUSIND5: return "Alternative Friday before 4th of July Weekend [5 U.S.C. 6103(b)]."; + case JHNUSLBR: return "Labor Day, the first Monday in September."; + case JHNUSMEM: return "Memorial Day, the last Monday in May."; + case JHNUSMEM5: return "Friday before Memorial Day Weekend"; + case JHNUSMEM6: return "Saturday of Memorial Day Weekend"; + case JHNUSMLK: return "Dr. Martin Luther King, Jr. Day, the third Monday in January."; + case JHNUSPRE: return "Washington's Birthday (Presidential Day) the third Monday in February."; + case JHNUSTKS: return "Thanksgiving Day, the fourth Thursday in November."; + case JHNUSTKS5: return "Friday after Thanksgiving."; + case JHNUSVET: return "Veteran's Day, November 11."; + case PM: return "Every afternoon at institution specified times."; + case Q4H: return "Every 4 hours at institution specified time"; + case Q6H: return "Every 6 hours at institution specified time"; + case QD: return "Every day at institution specified times."; + case QID: return "Four times a day at institution specified time"; + case QOD: return "Every other day at institution specified times."; + case TID: return "Three times a day at institution specified time"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AM: return "AM"; + case BID: return "BID"; + case JB: return "JB"; + case JE: return "JE"; + case JH: return "GTSAbbreviationHolidays"; + case _GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN: return "GTSAbbreviationHolidaysChristianRoman"; + case JHCHREAS: return "JHCHREAS"; + case JHCHRGFR: return "JHCHRGFR"; + case JHCHRNEW: return "JHCHRNEW"; + case JHCHRPEN: return "JHCHRPEN"; + case JHCHRXME: return "JHCHRXME"; + case JHCHRXMS: return "JHCHRXMS"; + case JHNNL: return "The Netherlands National Holidays"; + case JHNNLLD: return "Liberation day (May 5 every five years)"; + case JHNNLQD: return "Queen's day (April 30)"; + case JHNNLSK: return "Sinterklaas (December 5)"; + case JHNUS: return "GTSAbbreviationHolidaysUSNational"; + case JHNUSCLM: return "JHNUSCLM"; + case JHNUSIND: return "JHNUSIND"; + case JHNUSIND1: return "JHNUSIND1"; + case JHNUSIND5: return "JHNUSIND5"; + case JHNUSLBR: return "JHNUSLBR"; + case JHNUSMEM: return "JHNUSMEM"; + case JHNUSMEM5: return "JHNUSMEM5"; + case JHNUSMEM6: return "JHNUSMEM6"; + case JHNUSMLK: return "JHNUSMLK"; + case JHNUSPRE: return "JHNUSPRE"; + case JHNUSTKS: return "JHNUSTKS"; + case JHNUSTKS5: return "JHNUSTKS5"; + case JHNUSVET: return "JHNUSVET"; + case PM: return "PM"; + case Q4H: return "Q4H"; + case Q6H: return "Q6H"; + case QD: return "QD"; + case QID: return "QID"; + case QOD: return "QOD"; + case TID: return "TID"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GTSAbbreviationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GTSAbbreviationEnumFactory.java new file mode 100644 index 00000000000..e591e6cd034 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GTSAbbreviationEnumFactory.java @@ -0,0 +1,202 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3GTSAbbreviationEnumFactory implements EnumFactory { + + public V3GTSAbbreviation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AM".equals(codeString)) + return V3GTSAbbreviation.AM; + if ("BID".equals(codeString)) + return V3GTSAbbreviation.BID; + if ("JB".equals(codeString)) + return V3GTSAbbreviation.JB; + if ("JE".equals(codeString)) + return V3GTSAbbreviation.JE; + if ("JH".equals(codeString)) + return V3GTSAbbreviation.JH; + if ("_GTSAbbreviationHolidaysChristianRoman".equals(codeString)) + return V3GTSAbbreviation._GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN; + if ("JHCHREAS".equals(codeString)) + return V3GTSAbbreviation.JHCHREAS; + if ("JHCHRGFR".equals(codeString)) + return V3GTSAbbreviation.JHCHRGFR; + if ("JHCHRNEW".equals(codeString)) + return V3GTSAbbreviation.JHCHRNEW; + if ("JHCHRPEN".equals(codeString)) + return V3GTSAbbreviation.JHCHRPEN; + if ("JHCHRXME".equals(codeString)) + return V3GTSAbbreviation.JHCHRXME; + if ("JHCHRXMS".equals(codeString)) + return V3GTSAbbreviation.JHCHRXMS; + if ("JHNNL".equals(codeString)) + return V3GTSAbbreviation.JHNNL; + if ("JHNNLLD".equals(codeString)) + return V3GTSAbbreviation.JHNNLLD; + if ("JHNNLQD".equals(codeString)) + return V3GTSAbbreviation.JHNNLQD; + if ("JHNNLSK".equals(codeString)) + return V3GTSAbbreviation.JHNNLSK; + if ("JHNUS".equals(codeString)) + return V3GTSAbbreviation.JHNUS; + if ("JHNUSCLM".equals(codeString)) + return V3GTSAbbreviation.JHNUSCLM; + if ("JHNUSIND".equals(codeString)) + return V3GTSAbbreviation.JHNUSIND; + if ("JHNUSIND1".equals(codeString)) + return V3GTSAbbreviation.JHNUSIND1; + if ("JHNUSIND5".equals(codeString)) + return V3GTSAbbreviation.JHNUSIND5; + if ("JHNUSLBR".equals(codeString)) + return V3GTSAbbreviation.JHNUSLBR; + if ("JHNUSMEM".equals(codeString)) + return V3GTSAbbreviation.JHNUSMEM; + if ("JHNUSMEM5".equals(codeString)) + return V3GTSAbbreviation.JHNUSMEM5; + if ("JHNUSMEM6".equals(codeString)) + return V3GTSAbbreviation.JHNUSMEM6; + if ("JHNUSMLK".equals(codeString)) + return V3GTSAbbreviation.JHNUSMLK; + if ("JHNUSPRE".equals(codeString)) + return V3GTSAbbreviation.JHNUSPRE; + if ("JHNUSTKS".equals(codeString)) + return V3GTSAbbreviation.JHNUSTKS; + if ("JHNUSTKS5".equals(codeString)) + return V3GTSAbbreviation.JHNUSTKS5; + if ("JHNUSVET".equals(codeString)) + return V3GTSAbbreviation.JHNUSVET; + if ("PM".equals(codeString)) + return V3GTSAbbreviation.PM; + if ("Q4H".equals(codeString)) + return V3GTSAbbreviation.Q4H; + if ("Q6H".equals(codeString)) + return V3GTSAbbreviation.Q6H; + if ("QD".equals(codeString)) + return V3GTSAbbreviation.QD; + if ("QID".equals(codeString)) + return V3GTSAbbreviation.QID; + if ("QOD".equals(codeString)) + return V3GTSAbbreviation.QOD; + if ("TID".equals(codeString)) + return V3GTSAbbreviation.TID; + throw new IllegalArgumentException("Unknown V3GTSAbbreviation code '"+codeString+"'"); + } + + public String toCode(V3GTSAbbreviation code) { + if (code == V3GTSAbbreviation.AM) + return "AM"; + if (code == V3GTSAbbreviation.BID) + return "BID"; + if (code == V3GTSAbbreviation.JB) + return "JB"; + if (code == V3GTSAbbreviation.JE) + return "JE"; + if (code == V3GTSAbbreviation.JH) + return "JH"; + if (code == V3GTSAbbreviation._GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN) + return "_GTSAbbreviationHolidaysChristianRoman"; + if (code == V3GTSAbbreviation.JHCHREAS) + return "JHCHREAS"; + if (code == V3GTSAbbreviation.JHCHRGFR) + return "JHCHRGFR"; + if (code == V3GTSAbbreviation.JHCHRNEW) + return "JHCHRNEW"; + if (code == V3GTSAbbreviation.JHCHRPEN) + return "JHCHRPEN"; + if (code == V3GTSAbbreviation.JHCHRXME) + return "JHCHRXME"; + if (code == V3GTSAbbreviation.JHCHRXMS) + return "JHCHRXMS"; + if (code == V3GTSAbbreviation.JHNNL) + return "JHNNL"; + if (code == V3GTSAbbreviation.JHNNLLD) + return "JHNNLLD"; + if (code == V3GTSAbbreviation.JHNNLQD) + return "JHNNLQD"; + if (code == V3GTSAbbreviation.JHNNLSK) + return "JHNNLSK"; + if (code == V3GTSAbbreviation.JHNUS) + return "JHNUS"; + if (code == V3GTSAbbreviation.JHNUSCLM) + return "JHNUSCLM"; + if (code == V3GTSAbbreviation.JHNUSIND) + return "JHNUSIND"; + if (code == V3GTSAbbreviation.JHNUSIND1) + return "JHNUSIND1"; + if (code == V3GTSAbbreviation.JHNUSIND5) + return "JHNUSIND5"; + if (code == V3GTSAbbreviation.JHNUSLBR) + return "JHNUSLBR"; + if (code == V3GTSAbbreviation.JHNUSMEM) + return "JHNUSMEM"; + if (code == V3GTSAbbreviation.JHNUSMEM5) + return "JHNUSMEM5"; + if (code == V3GTSAbbreviation.JHNUSMEM6) + return "JHNUSMEM6"; + if (code == V3GTSAbbreviation.JHNUSMLK) + return "JHNUSMLK"; + if (code == V3GTSAbbreviation.JHNUSPRE) + return "JHNUSPRE"; + if (code == V3GTSAbbreviation.JHNUSTKS) + return "JHNUSTKS"; + if (code == V3GTSAbbreviation.JHNUSTKS5) + return "JHNUSTKS5"; + if (code == V3GTSAbbreviation.JHNUSVET) + return "JHNUSVET"; + if (code == V3GTSAbbreviation.PM) + return "PM"; + if (code == V3GTSAbbreviation.Q4H) + return "Q4H"; + if (code == V3GTSAbbreviation.Q6H) + return "Q6H"; + if (code == V3GTSAbbreviation.QD) + return "QD"; + if (code == V3GTSAbbreviation.QID) + return "QID"; + if (code == V3GTSAbbreviation.QOD) + return "QOD"; + if (code == V3GTSAbbreviation.TID) + return "TID"; + return "?"; + } + + public String toSystem(V3GTSAbbreviation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GenderStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GenderStatus.java new file mode 100644 index 00000000000..c9b3776fc5c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GenderStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3GenderStatus { + + /** + * Reproductively intact + */ + I, + /** + * Reproductively neutered + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3GenderStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return I; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3GenderStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case I: return "I"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/GenderStatus"; + } + public String getDefinition() { + switch (this) { + case I: return "Reproductively intact"; + case N: return "Reproductively neutered"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case I: return "Intact"; + case N: return "Neutered"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GenderStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GenderStatusEnumFactory.java new file mode 100644 index 00000000000..2e23a451a47 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3GenderStatusEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3GenderStatusEnumFactory implements EnumFactory { + + public V3GenderStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return V3GenderStatus.I; + if ("N".equals(codeString)) + return V3GenderStatus.N; + throw new IllegalArgumentException("Unknown V3GenderStatus code '"+codeString+"'"); + } + + public String toCode(V3GenderStatus code) { + if (code == V3GenderStatus.I) + return "I"; + if (code == V3GenderStatus.N) + return "N"; + return "?"; + } + + public String toSystem(V3GenderStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HL7UpdateMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HL7UpdateMode.java new file mode 100644 index 00000000000..8115d27fcff --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HL7UpdateMode.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3HL7UpdateMode { + + /** + * Description:The item was (or is to be) added, having not been present immediately before. (If it is already present, this may be treated as an error condition.) + */ + A, + /** + * Description:The item was (or is to be) either added or replaced. + */ + AR, + /** + * Description:The item was (or is to be) removed (sometimes referred to as deleted). If the item is part of a collection, delete any matching items. + */ + D, + /** + * Description:This item is part of the identifying information for this object. + */ + K, + /** + * Description:There was (or is to be) no change to the item. This is primarily used when this element has not changed, but other attributes in the instance have changed. + */ + N, + /** + * Description:The item existed previously and has (or is to be) revised. (If an item does not already exist, this may be treated as an error condition.) + */ + R, + /** + * Description:This item provides enough information to allow a processing system to locate the full applicable record by identifying the object. + */ + REF, + /** + * Description:Description:It is not specified whether or what kind of change has occurred to the item, or whether the item is present as a reference or identifying property. + */ + U, + /** + * These concepts apply when the element and/or message is updating a set of items. + */ + _SETUPDATEMODE, + /** + * Add the message element to the collection of items on the receiving system that correspond to the message element. + */ + ESA, + /** + * Change the item on the receiving system that corresponds to this message element; if a matching element does not exist, add a new one created with the values in the message. + */ + ESAC, + /** + * Change the item on the receiving system that corresponds to this message element; do not process if a matching element does not exist. + */ + ESC, + /** + * Delete the item on the receiving system that corresponds to this message element. + */ + ESD, + /** + * Description: AU: If this item exists, update it with these values. If it does not exist, create it with these values. If the item is part of the collection, update each item that matches this item, and if no items match, add a new item to the collection. + */ + AU, + /** + * Ignore this role, it is not relevant to the update. + */ + I, + /** + * Verify - this message element must match a value already in the receiving systems database in order to process the message. + */ + V, + /** + * added to help the parsers + */ + NULL; + public static V3HL7UpdateMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("AR".equals(codeString)) + return AR; + if ("D".equals(codeString)) + return D; + if ("K".equals(codeString)) + return K; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("REF".equals(codeString)) + return REF; + if ("U".equals(codeString)) + return U; + if ("_SetUpdateMode".equals(codeString)) + return _SETUPDATEMODE; + if ("ESA".equals(codeString)) + return ESA; + if ("ESAC".equals(codeString)) + return ESAC; + if ("ESC".equals(codeString)) + return ESC; + if ("ESD".equals(codeString)) + return ESD; + if ("AU".equals(codeString)) + return AU; + if ("I".equals(codeString)) + return I; + if ("V".equals(codeString)) + return V; + throw new FHIRException("Unknown V3HL7UpdateMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case AR: return "AR"; + case D: return "D"; + case K: return "K"; + case N: return "N"; + case R: return "R"; + case REF: return "REF"; + case U: return "U"; + case _SETUPDATEMODE: return "_SetUpdateMode"; + case ESA: return "ESA"; + case ESAC: return "ESAC"; + case ESC: return "ESC"; + case ESD: return "ESD"; + case AU: return "AU"; + case I: return "I"; + case V: return "V"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/HL7UpdateMode"; + } + public String getDefinition() { + switch (this) { + case A: return "Description:The item was (or is to be) added, having not been present immediately before. (If it is already present, this may be treated as an error condition.)"; + case AR: return "Description:The item was (or is to be) either added or replaced."; + case D: return "Description:The item was (or is to be) removed (sometimes referred to as deleted). If the item is part of a collection, delete any matching items."; + case K: return "Description:This item is part of the identifying information for this object."; + case N: return "Description:There was (or is to be) no change to the item. This is primarily used when this element has not changed, but other attributes in the instance have changed."; + case R: return "Description:The item existed previously and has (or is to be) revised. (If an item does not already exist, this may be treated as an error condition.)"; + case REF: return "Description:This item provides enough information to allow a processing system to locate the full applicable record by identifying the object."; + case U: return "Description:Description:It is not specified whether or what kind of change has occurred to the item, or whether the item is present as a reference or identifying property."; + case _SETUPDATEMODE: return "These concepts apply when the element and/or message is updating a set of items."; + case ESA: return "Add the message element to the collection of items on the receiving system that correspond to the message element."; + case ESAC: return "Change the item on the receiving system that corresponds to this message element; if a matching element does not exist, add a new one created with the values in the message."; + case ESC: return "Change the item on the receiving system that corresponds to this message element; do not process if a matching element does not exist."; + case ESD: return "Delete the item on the receiving system that corresponds to this message element."; + case AU: return "Description: AU: If this item exists, update it with these values. If it does not exist, create it with these values. If the item is part of the collection, update each item that matches this item, and if no items match, add a new item to the collection."; + case I: return "Ignore this role, it is not relevant to the update."; + case V: return "Verify - this message element must match a value already in the receiving systems database in order to process the message."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Add"; + case AR: return "Add or Replace"; + case D: return "Remove"; + case K: return "Key"; + case N: return "No Change"; + case R: return "Replace"; + case REF: return "Reference"; + case U: return "Unknown"; + case _SETUPDATEMODE: return "SetUpdateMode"; + case ESA: return "Set Add"; + case ESAC: return "Set Add or Change"; + case ESC: return "Set Change"; + case ESD: return "Set Delete"; + case AU: return "Add or Update"; + case I: return "Ignore"; + case V: return "Verify"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HL7UpdateModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HL7UpdateModeEnumFactory.java new file mode 100644 index 00000000000..db614d64437 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HL7UpdateModeEnumFactory.java @@ -0,0 +1,118 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3HL7UpdateModeEnumFactory implements EnumFactory { + + public V3HL7UpdateMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3HL7UpdateMode.A; + if ("AR".equals(codeString)) + return V3HL7UpdateMode.AR; + if ("D".equals(codeString)) + return V3HL7UpdateMode.D; + if ("K".equals(codeString)) + return V3HL7UpdateMode.K; + if ("N".equals(codeString)) + return V3HL7UpdateMode.N; + if ("R".equals(codeString)) + return V3HL7UpdateMode.R; + if ("REF".equals(codeString)) + return V3HL7UpdateMode.REF; + if ("U".equals(codeString)) + return V3HL7UpdateMode.U; + if ("_SetUpdateMode".equals(codeString)) + return V3HL7UpdateMode._SETUPDATEMODE; + if ("ESA".equals(codeString)) + return V3HL7UpdateMode.ESA; + if ("ESAC".equals(codeString)) + return V3HL7UpdateMode.ESAC; + if ("ESC".equals(codeString)) + return V3HL7UpdateMode.ESC; + if ("ESD".equals(codeString)) + return V3HL7UpdateMode.ESD; + if ("AU".equals(codeString)) + return V3HL7UpdateMode.AU; + if ("I".equals(codeString)) + return V3HL7UpdateMode.I; + if ("V".equals(codeString)) + return V3HL7UpdateMode.V; + throw new IllegalArgumentException("Unknown V3HL7UpdateMode code '"+codeString+"'"); + } + + public String toCode(V3HL7UpdateMode code) { + if (code == V3HL7UpdateMode.A) + return "A"; + if (code == V3HL7UpdateMode.AR) + return "AR"; + if (code == V3HL7UpdateMode.D) + return "D"; + if (code == V3HL7UpdateMode.K) + return "K"; + if (code == V3HL7UpdateMode.N) + return "N"; + if (code == V3HL7UpdateMode.R) + return "R"; + if (code == V3HL7UpdateMode.REF) + return "REF"; + if (code == V3HL7UpdateMode.U) + return "U"; + if (code == V3HL7UpdateMode._SETUPDATEMODE) + return "_SetUpdateMode"; + if (code == V3HL7UpdateMode.ESA) + return "ESA"; + if (code == V3HL7UpdateMode.ESAC) + return "ESAC"; + if (code == V3HL7UpdateMode.ESC) + return "ESC"; + if (code == V3HL7UpdateMode.ESD) + return "ESD"; + if (code == V3HL7UpdateMode.AU) + return "AU"; + if (code == V3HL7UpdateMode.I) + return "I"; + if (code == V3HL7UpdateMode.V) + return "V"; + return "?"; + } + + public String toSystem(V3HL7UpdateMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7Realm.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7Realm.java new file mode 100644 index 00000000000..2a00aaf7282 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7Realm.java @@ -0,0 +1,474 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Hl7Realm { + + /** + * Description: Concepts that can be used as Binding Realms when creating Binding Statements. These codes are permitted to appear in the InfrastructureRoot.realmCode attribute. + */ + BINDINGREALMS, + /** + * Description: Realm codes for official HL7 organizational bodies. This includes both the HL7 International organization as well as all recognized international affiliates (past and present). These groups have the ability to bind vocabulary and develop artifacts. As well, they have the ability to have "ownership" over other binding realms and namespace realms via the owningAffiliate property of those other realm codes. + */ + AFFILIATEREALMS, + /** + * Description: Realm code for use of Argentina + */ + AR, + /** + * Description: Realm code for use of Austria + */ + AT, + /** + * Description: Realm code for use of Australia + */ + AU, + /** + * Description: Realm code for use of Brazil + */ + BR, + /** + * Description: Realm code for use of Canada + */ + CA, + /** + * Description: Realm code for use of Switzerland + */ + CH, + /** + * Description: Realm code for use of Chile + */ + CL, + /** + * Description: Realm code for use of China + */ + CN, + /** + * Description: Realm code for use of Localized Version + */ + CO, + /** + * Description: Realm code for use of Czech Republic + */ + CZ, + /** + * Description: Realm code for use of Germany + */ + DE, + /** + * Description: Realm code for use of Denmark + */ + DK, + /** + * Description: Realm code for use of Spain + */ + ES, + /** + * Description: Realm code for use of Finland + */ + FI, + /** + * Description: Realm code for use of France + */ + FR, + /** + * Description: Realm code for use of Greece + */ + GR, + /** + * Description: Realm code for use of Croatia + */ + HR, + /** + * Description: Realm code for use of Ireland + */ + IE, + /** + * Description: Realm code for use of India + */ + IN, + /** + * Description: Realm code for use of Italy + */ + IT, + /** + * Description: Realm code for use of Japan + */ + JP, + /** + * Description: Realm code for use of Korea + */ + KR, + /** + * Description: Realm code for use of Lithuania + */ + LT, + /** + * Description: Realm code for use of Mexico + */ + MX, + /** + * Description: Realm code for use of The Netherlands + */ + NL, + /** + * Description: Realm code for use of New Zealand + */ + NZ, + /** + * Description: Realm code for use of Romania + */ + RO, + /** + * Description: Realm code for use of Russian Federation + */ + RU, + /** + * Description: Realm code for use of Sweden + */ + SE, + /** + * Description: Realm code for use of Localized Version + */ + SG, + /** + * Description: Realm code for use of Southern Africa + */ + SOA, + /** + * Description: Realm code for use of Turkey + */ + TR, + /** + * Description: Realm code for use of Taiwan + */ + TW, + /** + * Description: Realm code for use of United Kingdom + */ + UK, + /** + * Description: Realm code for use of United States of America + */ + US, + /** + * Description: Realm code for use of Universal realm or context, used in every instance + */ + UV, + /** + * Description: Realm code for use of Uruguay + */ + UY, + /** + * Description: Realm code for use of Unclassified Realm + */ + C1, + /** + * Description: Realm code for use of Great Britain + */ + GB, + /** + * Description: Realm code for use of Representative Realm + */ + R1, + /** + * Description: Realm code for use of Example Realm + */ + X1, + /** + * Description: Codes that can be used in the "realm" portion of HL7 v3 artifact identifiers. + */ + NAMESPACEREALMS, + /** + * Description: An artifact created for local use only. This realm namespace has no owning affiliate. Its use is uncontrolled, i.e. anyone can create artifacts using this realm namespace. Because of this, there is a significant likelihood of artifact identifier collisions. Implementers are encouraged to register their artifacts under an affiliate owned and controlled namespace to avoid such collision problems where possible. + */ + ZZ, + /** + * added to help the parsers + */ + NULL; + public static V3Hl7Realm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BindingRealms".equals(codeString)) + return BINDINGREALMS; + if ("AffiliateRealms".equals(codeString)) + return AFFILIATEREALMS; + if ("AR".equals(codeString)) + return AR; + if ("AT".equals(codeString)) + return AT; + if ("AU".equals(codeString)) + return AU; + if ("BR".equals(codeString)) + return BR; + if ("CA".equals(codeString)) + return CA; + if ("CH".equals(codeString)) + return CH; + if ("CL".equals(codeString)) + return CL; + if ("CN".equals(codeString)) + return CN; + if ("CO".equals(codeString)) + return CO; + if ("CZ".equals(codeString)) + return CZ; + if ("DE".equals(codeString)) + return DE; + if ("DK".equals(codeString)) + return DK; + if ("ES".equals(codeString)) + return ES; + if ("FI".equals(codeString)) + return FI; + if ("FR".equals(codeString)) + return FR; + if ("GR".equals(codeString)) + return GR; + if ("HR".equals(codeString)) + return HR; + if ("IE".equals(codeString)) + return IE; + if ("IN".equals(codeString)) + return IN; + if ("IT".equals(codeString)) + return IT; + if ("JP".equals(codeString)) + return JP; + if ("KR".equals(codeString)) + return KR; + if ("LT".equals(codeString)) + return LT; + if ("MX".equals(codeString)) + return MX; + if ("NL".equals(codeString)) + return NL; + if ("NZ".equals(codeString)) + return NZ; + if ("RO".equals(codeString)) + return RO; + if ("RU".equals(codeString)) + return RU; + if ("SE".equals(codeString)) + return SE; + if ("SG".equals(codeString)) + return SG; + if ("SOA".equals(codeString)) + return SOA; + if ("TR".equals(codeString)) + return TR; + if ("TW".equals(codeString)) + return TW; + if ("UK".equals(codeString)) + return UK; + if ("US".equals(codeString)) + return US; + if ("UV".equals(codeString)) + return UV; + if ("UY".equals(codeString)) + return UY; + if ("C1".equals(codeString)) + return C1; + if ("GB".equals(codeString)) + return GB; + if ("R1".equals(codeString)) + return R1; + if ("X1".equals(codeString)) + return X1; + if ("NamespaceRealms".equals(codeString)) + return NAMESPACEREALMS; + if ("ZZ".equals(codeString)) + return ZZ; + throw new FHIRException("Unknown V3Hl7Realm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BINDINGREALMS: return "BindingRealms"; + case AFFILIATEREALMS: return "AffiliateRealms"; + case AR: return "AR"; + case AT: return "AT"; + case AU: return "AU"; + case BR: return "BR"; + case CA: return "CA"; + case CH: return "CH"; + case CL: return "CL"; + case CN: return "CN"; + case CO: return "CO"; + case CZ: return "CZ"; + case DE: return "DE"; + case DK: return "DK"; + case ES: return "ES"; + case FI: return "FI"; + case FR: return "FR"; + case GR: return "GR"; + case HR: return "HR"; + case IE: return "IE"; + case IN: return "IN"; + case IT: return "IT"; + case JP: return "JP"; + case KR: return "KR"; + case LT: return "LT"; + case MX: return "MX"; + case NL: return "NL"; + case NZ: return "NZ"; + case RO: return "RO"; + case RU: return "RU"; + case SE: return "SE"; + case SG: return "SG"; + case SOA: return "SOA"; + case TR: return "TR"; + case TW: return "TW"; + case UK: return "UK"; + case US: return "US"; + case UV: return "UV"; + case UY: return "UY"; + case C1: return "C1"; + case GB: return "GB"; + case R1: return "R1"; + case X1: return "X1"; + case NAMESPACEREALMS: return "NamespaceRealms"; + case ZZ: return "ZZ"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/hl7Realm"; + } + public String getDefinition() { + switch (this) { + case BINDINGREALMS: return "Description: Concepts that can be used as Binding Realms when creating Binding Statements. These codes are permitted to appear in the InfrastructureRoot.realmCode attribute."; + case AFFILIATEREALMS: return "Description: Realm codes for official HL7 organizational bodies. This includes both the HL7 International organization as well as all recognized international affiliates (past and present). These groups have the ability to bind vocabulary and develop artifacts. As well, they have the ability to have \"ownership\" over other binding realms and namespace realms via the owningAffiliate property of those other realm codes."; + case AR: return "Description: Realm code for use of Argentina"; + case AT: return "Description: Realm code for use of Austria"; + case AU: return "Description: Realm code for use of Australia"; + case BR: return "Description: Realm code for use of Brazil"; + case CA: return "Description: Realm code for use of Canada"; + case CH: return "Description: Realm code for use of Switzerland"; + case CL: return "Description: Realm code for use of Chile"; + case CN: return "Description: Realm code for use of China"; + case CO: return "Description: Realm code for use of Localized Version"; + case CZ: return "Description: Realm code for use of Czech Republic"; + case DE: return "Description: Realm code for use of Germany"; + case DK: return "Description: Realm code for use of Denmark"; + case ES: return "Description: Realm code for use of Spain"; + case FI: return "Description: Realm code for use of Finland"; + case FR: return "Description: Realm code for use of France"; + case GR: return "Description: Realm code for use of Greece"; + case HR: return "Description: Realm code for use of Croatia"; + case IE: return "Description: Realm code for use of Ireland"; + case IN: return "Description: Realm code for use of India"; + case IT: return "Description: Realm code for use of Italy"; + case JP: return "Description: Realm code for use of Japan"; + case KR: return "Description: Realm code for use of Korea"; + case LT: return "Description: Realm code for use of Lithuania"; + case MX: return "Description: Realm code for use of Mexico"; + case NL: return "Description: Realm code for use of The Netherlands"; + case NZ: return "Description: Realm code for use of New Zealand"; + case RO: return "Description: Realm code for use of Romania"; + case RU: return "Description: Realm code for use of Russian Federation"; + case SE: return "Description: Realm code for use of Sweden"; + case SG: return "Description: Realm code for use of Localized Version"; + case SOA: return "Description: Realm code for use of Southern Africa"; + case TR: return "Description: Realm code for use of Turkey"; + case TW: return "Description: Realm code for use of Taiwan"; + case UK: return "Description: Realm code for use of United Kingdom"; + case US: return "Description: Realm code for use of United States of America"; + case UV: return "Description: Realm code for use of Universal realm or context, used in every instance"; + case UY: return "Description: Realm code for use of Uruguay"; + case C1: return "Description: Realm code for use of Unclassified Realm"; + case GB: return "Description: Realm code for use of Great Britain"; + case R1: return "Description: Realm code for use of Representative Realm"; + case X1: return "Description: Realm code for use of Example Realm"; + case NAMESPACEREALMS: return "Description: Codes that can be used in the \"realm\" portion of HL7 v3 artifact identifiers."; + case ZZ: return "Description: An artifact created for local use only. This realm namespace has no owning affiliate. Its use is uncontrolled, i.e. anyone can create artifacts using this realm namespace. Because of this, there is a significant likelihood of artifact identifier collisions. Implementers are encouraged to register their artifacts under an affiliate owned and controlled namespace to avoid such collision problems where possible."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BINDINGREALMS: return "binding realms"; + case AFFILIATEREALMS: return "Affiliate Realms"; + case AR: return "Argentina"; + case AT: return "Austria"; + case AU: return "Australia"; + case BR: return "Brazil"; + case CA: return "Canada"; + case CH: return "Switzerland"; + case CL: return "Chile"; + case CN: return "China"; + case CO: return "Columbia"; + case CZ: return "Czech Republic"; + case DE: return "Germany"; + case DK: return "Denmark"; + case ES: return "Spain"; + case FI: return "Finland"; + case FR: return "France"; + case GR: return "Greece"; + case HR: return "Croatia"; + case IE: return "Ireland"; + case IN: return "India"; + case IT: return "Italy"; + case JP: return "Japan"; + case KR: return "Korea"; + case LT: return "Lithuania"; + case MX: return "Mexico"; + case NL: return "The Netherlands"; + case NZ: return "New Zealand"; + case RO: return "Romania"; + case RU: return "Russian Federation"; + case SE: return "Sweden"; + case SG: return "Singapore"; + case SOA: return "Southern Africa"; + case TR: return "Turkey"; + case TW: return "Taiwan"; + case UK: return "United Kingdom"; + case US: return "United States of America"; + case UV: return "Universal"; + case UY: return "Uruguay"; + case C1: return "Unclassified Realm"; + case GB: return "Great Britain"; + case R1: return "Representative Realm"; + case X1: return "Example Realm"; + case NAMESPACEREALMS: return "namespace realms"; + case ZZ: return "Localized Version"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7RealmEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7RealmEnumFactory.java new file mode 100644 index 00000000000..87745c97422 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7RealmEnumFactory.java @@ -0,0 +1,234 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3Hl7RealmEnumFactory implements EnumFactory { + + public V3Hl7Realm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BindingRealms".equals(codeString)) + return V3Hl7Realm.BINDINGREALMS; + if ("AffiliateRealms".equals(codeString)) + return V3Hl7Realm.AFFILIATEREALMS; + if ("AR".equals(codeString)) + return V3Hl7Realm.AR; + if ("AT".equals(codeString)) + return V3Hl7Realm.AT; + if ("AU".equals(codeString)) + return V3Hl7Realm.AU; + if ("BR".equals(codeString)) + return V3Hl7Realm.BR; + if ("CA".equals(codeString)) + return V3Hl7Realm.CA; + if ("CH".equals(codeString)) + return V3Hl7Realm.CH; + if ("CL".equals(codeString)) + return V3Hl7Realm.CL; + if ("CN".equals(codeString)) + return V3Hl7Realm.CN; + if ("CO".equals(codeString)) + return V3Hl7Realm.CO; + if ("CZ".equals(codeString)) + return V3Hl7Realm.CZ; + if ("DE".equals(codeString)) + return V3Hl7Realm.DE; + if ("DK".equals(codeString)) + return V3Hl7Realm.DK; + if ("ES".equals(codeString)) + return V3Hl7Realm.ES; + if ("FI".equals(codeString)) + return V3Hl7Realm.FI; + if ("FR".equals(codeString)) + return V3Hl7Realm.FR; + if ("GR".equals(codeString)) + return V3Hl7Realm.GR; + if ("HR".equals(codeString)) + return V3Hl7Realm.HR; + if ("IE".equals(codeString)) + return V3Hl7Realm.IE; + if ("IN".equals(codeString)) + return V3Hl7Realm.IN; + if ("IT".equals(codeString)) + return V3Hl7Realm.IT; + if ("JP".equals(codeString)) + return V3Hl7Realm.JP; + if ("KR".equals(codeString)) + return V3Hl7Realm.KR; + if ("LT".equals(codeString)) + return V3Hl7Realm.LT; + if ("MX".equals(codeString)) + return V3Hl7Realm.MX; + if ("NL".equals(codeString)) + return V3Hl7Realm.NL; + if ("NZ".equals(codeString)) + return V3Hl7Realm.NZ; + if ("RO".equals(codeString)) + return V3Hl7Realm.RO; + if ("RU".equals(codeString)) + return V3Hl7Realm.RU; + if ("SE".equals(codeString)) + return V3Hl7Realm.SE; + if ("SG".equals(codeString)) + return V3Hl7Realm.SG; + if ("SOA".equals(codeString)) + return V3Hl7Realm.SOA; + if ("TR".equals(codeString)) + return V3Hl7Realm.TR; + if ("TW".equals(codeString)) + return V3Hl7Realm.TW; + if ("UK".equals(codeString)) + return V3Hl7Realm.UK; + if ("US".equals(codeString)) + return V3Hl7Realm.US; + if ("UV".equals(codeString)) + return V3Hl7Realm.UV; + if ("UY".equals(codeString)) + return V3Hl7Realm.UY; + if ("C1".equals(codeString)) + return V3Hl7Realm.C1; + if ("GB".equals(codeString)) + return V3Hl7Realm.GB; + if ("R1".equals(codeString)) + return V3Hl7Realm.R1; + if ("X1".equals(codeString)) + return V3Hl7Realm.X1; + if ("NamespaceRealms".equals(codeString)) + return V3Hl7Realm.NAMESPACEREALMS; + if ("ZZ".equals(codeString)) + return V3Hl7Realm.ZZ; + throw new IllegalArgumentException("Unknown V3Hl7Realm code '"+codeString+"'"); + } + + public String toCode(V3Hl7Realm code) { + if (code == V3Hl7Realm.BINDINGREALMS) + return "BindingRealms"; + if (code == V3Hl7Realm.AFFILIATEREALMS) + return "AffiliateRealms"; + if (code == V3Hl7Realm.AR) + return "AR"; + if (code == V3Hl7Realm.AT) + return "AT"; + if (code == V3Hl7Realm.AU) + return "AU"; + if (code == V3Hl7Realm.BR) + return "BR"; + if (code == V3Hl7Realm.CA) + return "CA"; + if (code == V3Hl7Realm.CH) + return "CH"; + if (code == V3Hl7Realm.CL) + return "CL"; + if (code == V3Hl7Realm.CN) + return "CN"; + if (code == V3Hl7Realm.CO) + return "CO"; + if (code == V3Hl7Realm.CZ) + return "CZ"; + if (code == V3Hl7Realm.DE) + return "DE"; + if (code == V3Hl7Realm.DK) + return "DK"; + if (code == V3Hl7Realm.ES) + return "ES"; + if (code == V3Hl7Realm.FI) + return "FI"; + if (code == V3Hl7Realm.FR) + return "FR"; + if (code == V3Hl7Realm.GR) + return "GR"; + if (code == V3Hl7Realm.HR) + return "HR"; + if (code == V3Hl7Realm.IE) + return "IE"; + if (code == V3Hl7Realm.IN) + return "IN"; + if (code == V3Hl7Realm.IT) + return "IT"; + if (code == V3Hl7Realm.JP) + return "JP"; + if (code == V3Hl7Realm.KR) + return "KR"; + if (code == V3Hl7Realm.LT) + return "LT"; + if (code == V3Hl7Realm.MX) + return "MX"; + if (code == V3Hl7Realm.NL) + return "NL"; + if (code == V3Hl7Realm.NZ) + return "NZ"; + if (code == V3Hl7Realm.RO) + return "RO"; + if (code == V3Hl7Realm.RU) + return "RU"; + if (code == V3Hl7Realm.SE) + return "SE"; + if (code == V3Hl7Realm.SG) + return "SG"; + if (code == V3Hl7Realm.SOA) + return "SOA"; + if (code == V3Hl7Realm.TR) + return "TR"; + if (code == V3Hl7Realm.TW) + return "TW"; + if (code == V3Hl7Realm.UK) + return "UK"; + if (code == V3Hl7Realm.US) + return "US"; + if (code == V3Hl7Realm.UV) + return "UV"; + if (code == V3Hl7Realm.UY) + return "UY"; + if (code == V3Hl7Realm.C1) + return "C1"; + if (code == V3Hl7Realm.GB) + return "GB"; + if (code == V3Hl7Realm.R1) + return "R1"; + if (code == V3Hl7Realm.X1) + return "X1"; + if (code == V3Hl7Realm.NAMESPACEREALMS) + return "NamespaceRealms"; + if (code == V3Hl7Realm.ZZ) + return "ZZ"; + return "?"; + } + + public String toSystem(V3Hl7Realm code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7V3Conformance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7V3Conformance.java new file mode 100644 index 00000000000..c294657894d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7V3Conformance.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Hl7V3Conformance { + + /** + * Description: Implementers receiving this property must not raise an error if the data is received, but will not perform any useful function with the data. This conformance level is not used in profiles or other artifacts that are specific to the "sender" or "initiator" of a communication. + */ + I, + /** + * Description: All implementers are prohibited from transmitting this content, and may raise an error if they receive it. + */ + NP, + /** + * Description: All implementers must support this property. I.e. they must be able to transmit, or to receive and usefully handle the concept. + */ + R, + /** + * Description: The element is considered "required" (i.e. must be supported) from the perspective of systems that consume instances, but is "undetermined" for systems that generate instances. Used only as part of specifications that define both initiator and consumer expectations. + */ + RC, + /** + * Description: The element is considered "required" (i.e. must be supported) from the perspective of systems that generate instances, but is "undetermined" for systems that consume instances. Used only as part of specifications that define both initiator and consumer expectations. + */ + RI, + /** + * Description: The conformance expectations for this element have not yet been determined. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static V3Hl7V3Conformance fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return I; + if ("NP".equals(codeString)) + return NP; + if ("R".equals(codeString)) + return R; + if ("RC".equals(codeString)) + return RC; + if ("RI".equals(codeString)) + return RI; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown V3Hl7V3Conformance code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case I: return "I"; + case NP: return "NP"; + case R: return "R"; + case RC: return "RC"; + case RI: return "RI"; + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/hl7V3Conformance"; + } + public String getDefinition() { + switch (this) { + case I: return "Description: Implementers receiving this property must not raise an error if the data is received, but will not perform any useful function with the data. This conformance level is not used in profiles or other artifacts that are specific to the \"sender\" or \"initiator\" of a communication."; + case NP: return "Description: All implementers are prohibited from transmitting this content, and may raise an error if they receive it."; + case R: return "Description: All implementers must support this property. I.e. they must be able to transmit, or to receive and usefully handle the concept."; + case RC: return "Description: The element is considered \"required\" (i.e. must be supported) from the perspective of systems that consume instances, but is \"undetermined\" for systems that generate instances. Used only as part of specifications that define both initiator and consumer expectations."; + case RI: return "Description: The element is considered \"required\" (i.e. must be supported) from the perspective of systems that generate instances, but is \"undetermined\" for systems that consume instances. Used only as part of specifications that define both initiator and consumer expectations."; + case U: return "Description: The conformance expectations for this element have not yet been determined."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case I: return "ignored"; + case NP: return "not permitted"; + case R: return "required"; + case RC: return "required for consumer"; + case RI: return "required for initiator"; + case U: return "undetermined"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7V3ConformanceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7V3ConformanceEnumFactory.java new file mode 100644 index 00000000000..c8eefb48d0b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Hl7V3ConformanceEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3Hl7V3ConformanceEnumFactory implements EnumFactory { + + public V3Hl7V3Conformance fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return V3Hl7V3Conformance.I; + if ("NP".equals(codeString)) + return V3Hl7V3Conformance.NP; + if ("R".equals(codeString)) + return V3Hl7V3Conformance.R; + if ("RC".equals(codeString)) + return V3Hl7V3Conformance.RC; + if ("RI".equals(codeString)) + return V3Hl7V3Conformance.RI; + if ("U".equals(codeString)) + return V3Hl7V3Conformance.U; + throw new IllegalArgumentException("Unknown V3Hl7V3Conformance code '"+codeString+"'"); + } + + public String toCode(V3Hl7V3Conformance code) { + if (code == V3Hl7V3Conformance.I) + return "I"; + if (code == V3Hl7V3Conformance.NP) + return "NP"; + if (code == V3Hl7V3Conformance.R) + return "R"; + if (code == V3Hl7V3Conformance.RC) + return "RC"; + if (code == V3Hl7V3Conformance.RI) + return "RI"; + if (code == V3Hl7V3Conformance.U) + return "U"; + return "?"; + } + + public String toSystem(V3Hl7V3Conformance code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HtmlLinkType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HtmlLinkType.java new file mode 100644 index 00000000000..bd3a2a95ffd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HtmlLinkType.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3HtmlLinkType { + + /** + * Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media). + */ + ALTERNATE, + /** + * Refers to a document serving as an appendix in a collection of documents. + */ + APPENDIX, + /** + * Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document. + */ + BOOKMARK, + /** + * Refers to a document serving as a chapter in a collection of documents. + */ + CHAPTER, + /** + * Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents"). + */ + CONTENTS, + /** + * Refers to a copyright statement for the current document. + */ + COPYRIGHT, + /** + * Refers to a document providing a glossary of terms that pertain to the current document. + */ + GLOSSARY, + /** + * Refers to a document offering help (more information, links to other sources of information, etc.). + */ + HELP, + /** + * Refers to a document providing an index for the current document. + */ + INDEX, + /** + * Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time. + */ + NEXT, + /** + * Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous". + */ + PREV, + /** + * Refers to a document serving as a section in a collection of documents. + */ + SECTION, + /** + * Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection. + */ + START, + /** + * Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type "Alternate" for user-selectable alternate style sheets. + */ + STYLESHEET, + /** + * Refers to a document serving as a subsection in a collection of documents. + */ + SUBSECTION, + /** + * added to help the parsers + */ + NULL; + public static V3HtmlLinkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alternate".equals(codeString)) + return ALTERNATE; + if ("appendix".equals(codeString)) + return APPENDIX; + if ("bookmark".equals(codeString)) + return BOOKMARK; + if ("chapter".equals(codeString)) + return CHAPTER; + if ("contents".equals(codeString)) + return CONTENTS; + if ("copyright".equals(codeString)) + return COPYRIGHT; + if ("glossary".equals(codeString)) + return GLOSSARY; + if ("help".equals(codeString)) + return HELP; + if ("index".equals(codeString)) + return INDEX; + if ("next".equals(codeString)) + return NEXT; + if ("prev".equals(codeString)) + return PREV; + if ("section".equals(codeString)) + return SECTION; + if ("start".equals(codeString)) + return START; + if ("stylesheet".equals(codeString)) + return STYLESHEET; + if ("subsection".equals(codeString)) + return SUBSECTION; + throw new FHIRException("Unknown V3HtmlLinkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALTERNATE: return "alternate"; + case APPENDIX: return "appendix"; + case BOOKMARK: return "bookmark"; + case CHAPTER: return "chapter"; + case CONTENTS: return "contents"; + case COPYRIGHT: return "copyright"; + case GLOSSARY: return "glossary"; + case HELP: return "help"; + case INDEX: return "index"; + case NEXT: return "next"; + case PREV: return "prev"; + case SECTION: return "section"; + case START: return "start"; + case STYLESHEET: return "stylesheet"; + case SUBSECTION: return "subsection"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/HtmlLinkType"; + } + public String getDefinition() { + switch (this) { + case ALTERNATE: return "Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media)."; + case APPENDIX: return "Refers to a document serving as an appendix in a collection of documents."; + case BOOKMARK: return "Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document."; + case CHAPTER: return "Refers to a document serving as a chapter in a collection of documents."; + case CONTENTS: return "Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from \"Table of Contents\")."; + case COPYRIGHT: return "Refers to a copyright statement for the current document."; + case GLOSSARY: return "Refers to a document providing a glossary of terms that pertain to the current document."; + case HELP: return "Refers to a document offering help (more information, links to other sources of information, etc.)."; + case INDEX: return "Refers to a document providing an index for the current document."; + case NEXT: return "Refers to the next document in a linear sequence of documents. User agents may choose to preload the \"next\" document, to reduce the perceived load time."; + case PREV: return "Refers to the previous document in an ordered series of documents. Some user agents also support the synonym \"Previous\"."; + case SECTION: return "Refers to a document serving as a section in a collection of documents."; + case START: return "Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection."; + case STYLESHEET: return "Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type \"Alternate\" for user-selectable alternate style sheets."; + case SUBSECTION: return "Refers to a document serving as a subsection in a collection of documents."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALTERNATE: return "alternate"; + case APPENDIX: return "appendix"; + case BOOKMARK: return "bookmark"; + case CHAPTER: return "chapter"; + case CONTENTS: return "contents"; + case COPYRIGHT: return "copyright"; + case GLOSSARY: return "glossary"; + case HELP: return "help"; + case INDEX: return "index"; + case NEXT: return "next"; + case PREV: return "prev"; + case SECTION: return "section"; + case START: return "start"; + case STYLESHEET: return "stylesheet"; + case SUBSECTION: return "subsection"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HtmlLinkTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HtmlLinkTypeEnumFactory.java new file mode 100644 index 00000000000..c93c88cec48 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3HtmlLinkTypeEnumFactory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3HtmlLinkTypeEnumFactory implements EnumFactory { + + public V3HtmlLinkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("alternate".equals(codeString)) + return V3HtmlLinkType.ALTERNATE; + if ("appendix".equals(codeString)) + return V3HtmlLinkType.APPENDIX; + if ("bookmark".equals(codeString)) + return V3HtmlLinkType.BOOKMARK; + if ("chapter".equals(codeString)) + return V3HtmlLinkType.CHAPTER; + if ("contents".equals(codeString)) + return V3HtmlLinkType.CONTENTS; + if ("copyright".equals(codeString)) + return V3HtmlLinkType.COPYRIGHT; + if ("glossary".equals(codeString)) + return V3HtmlLinkType.GLOSSARY; + if ("help".equals(codeString)) + return V3HtmlLinkType.HELP; + if ("index".equals(codeString)) + return V3HtmlLinkType.INDEX; + if ("next".equals(codeString)) + return V3HtmlLinkType.NEXT; + if ("prev".equals(codeString)) + return V3HtmlLinkType.PREV; + if ("section".equals(codeString)) + return V3HtmlLinkType.SECTION; + if ("start".equals(codeString)) + return V3HtmlLinkType.START; + if ("stylesheet".equals(codeString)) + return V3HtmlLinkType.STYLESHEET; + if ("subsection".equals(codeString)) + return V3HtmlLinkType.SUBSECTION; + throw new IllegalArgumentException("Unknown V3HtmlLinkType code '"+codeString+"'"); + } + + public String toCode(V3HtmlLinkType code) { + if (code == V3HtmlLinkType.ALTERNATE) + return "alternate"; + if (code == V3HtmlLinkType.APPENDIX) + return "appendix"; + if (code == V3HtmlLinkType.BOOKMARK) + return "bookmark"; + if (code == V3HtmlLinkType.CHAPTER) + return "chapter"; + if (code == V3HtmlLinkType.CONTENTS) + return "contents"; + if (code == V3HtmlLinkType.COPYRIGHT) + return "copyright"; + if (code == V3HtmlLinkType.GLOSSARY) + return "glossary"; + if (code == V3HtmlLinkType.HELP) + return "help"; + if (code == V3HtmlLinkType.INDEX) + return "index"; + if (code == V3HtmlLinkType.NEXT) + return "next"; + if (code == V3HtmlLinkType.PREV) + return "prev"; + if (code == V3HtmlLinkType.SECTION) + return "section"; + if (code == V3HtmlLinkType.START) + return "start"; + if (code == V3HtmlLinkType.STYLESHEET) + return "stylesheet"; + if (code == V3HtmlLinkType.SUBSECTION) + return "subsection"; + return "?"; + } + + public String toSystem(V3HtmlLinkType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierReliability.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierReliability.java new file mode 100644 index 00000000000..99d94d487b3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierReliability.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3IdentifierReliability { + + /** + * Description: The identifier was issued by the system responsible for constructing the instance. + */ + ISS, + /** + * Description: The identifier was provided to the system that constructed the instance, but has not been verified. e.g. a Drivers license entered manually into a system by a user. + */ + UNV, + /** + * Description: The identifier was not issued by the system responsible for constructing the instance, but the system that captured the id has verified the identifier with the issuing authority, or with another system that has verified the identifier. + */ + VRF, + /** + * added to help the parsers + */ + NULL; + public static V3IdentifierReliability fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ISS".equals(codeString)) + return ISS; + if ("UNV".equals(codeString)) + return UNV; + if ("VRF".equals(codeString)) + return VRF; + throw new FHIRException("Unknown V3IdentifierReliability code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ISS: return "ISS"; + case UNV: return "UNV"; + case VRF: return "VRF"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/IdentifierReliability"; + } + public String getDefinition() { + switch (this) { + case ISS: return "Description: The identifier was issued by the system responsible for constructing the instance."; + case UNV: return "Description: The identifier was provided to the system that constructed the instance, but has not been verified. e.g. a Drivers license entered manually into a system by a user."; + case VRF: return "Description: The identifier was not issued by the system responsible for constructing the instance, but the system that captured the id has verified the identifier with the issuing authority, or with another system that has verified the identifier."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ISS: return "Issued by System"; + case UNV: return "Unverified by system"; + case VRF: return "Verified by system"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierReliabilityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierReliabilityEnumFactory.java new file mode 100644 index 00000000000..31654d5f242 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierReliabilityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3IdentifierReliabilityEnumFactory implements EnumFactory { + + public V3IdentifierReliability fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ISS".equals(codeString)) + return V3IdentifierReliability.ISS; + if ("UNV".equals(codeString)) + return V3IdentifierReliability.UNV; + if ("VRF".equals(codeString)) + return V3IdentifierReliability.VRF; + throw new IllegalArgumentException("Unknown V3IdentifierReliability code '"+codeString+"'"); + } + + public String toCode(V3IdentifierReliability code) { + if (code == V3IdentifierReliability.ISS) + return "ISS"; + if (code == V3IdentifierReliability.UNV) + return "UNV"; + if (code == V3IdentifierReliability.VRF) + return "VRF"; + return "?"; + } + + public String toSystem(V3IdentifierReliability code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierScope.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierScope.java new file mode 100644 index 00000000000..b25893a6d85 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierScope.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3IdentifierScope { + + /** + * Description: An identifier whose scope is defined by the business practices associated with the object. In contrast to the other scope identifiers, the scope of the use of the id is not necessarily restricted to a single object, but may be reused for other objects closely associated with the object due to business practice. + */ + BUSN, + /** + * Description: The identifier associated with a particular object. It remains consistent as the object undergoes state transitions. + */ + OBJ, + /** + * Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object. I.e. The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated). + + + NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes. + */ + VER, + /** + * Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object. + + + Example The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated). + + + NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes. + */ + VW, + /** + * added to help the parsers + */ + NULL; + public static V3IdentifierScope fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BUSN".equals(codeString)) + return BUSN; + if ("OBJ".equals(codeString)) + return OBJ; + if ("VER".equals(codeString)) + return VER; + if ("VW".equals(codeString)) + return VW; + throw new FHIRException("Unknown V3IdentifierScope code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BUSN: return "BUSN"; + case OBJ: return "OBJ"; + case VER: return "VER"; + case VW: return "VW"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/IdentifierScope"; + } + public String getDefinition() { + switch (this) { + case BUSN: return "Description: An identifier whose scope is defined by the business practices associated with the object. In contrast to the other scope identifiers, the scope of the use of the id is not necessarily restricted to a single object, but may be reused for other objects closely associated with the object due to business practice."; + case OBJ: return "Description: The identifier associated with a particular object. It remains consistent as the object undergoes state transitions."; + case VER: return "Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object. I.e. The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated).\r\n\n \n NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes."; + case VW: return "Description: An identifier that references a particular object as it existed at a given point in time. The identifier SHALL change with each state transition on the object.\r\n\n \n Example The version identifier of an object prior to a 'suspend' state transition is distinct from the identifier of the object after the state transition. Each version identifier can be tied to exactly one ControlAct event which brought that version into being (though the control act may never be instantiated).\r\n\n \n NOTE: Applications that do not support versioning of objects must ignore and not persist these ids to avoid confusion resulting from leaving the same identifier on an object that undergoes changes."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BUSN: return "Business Identifier"; + case OBJ: return "Object Identifier"; + case VER: return "Version Identifier"; + case VW: return "View Specific Identifier"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierScopeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierScopeEnumFactory.java new file mode 100644 index 00000000000..b35c8a39d07 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IdentifierScopeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3IdentifierScopeEnumFactory implements EnumFactory { + + public V3IdentifierScope fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BUSN".equals(codeString)) + return V3IdentifierScope.BUSN; + if ("OBJ".equals(codeString)) + return V3IdentifierScope.OBJ; + if ("VER".equals(codeString)) + return V3IdentifierScope.VER; + if ("VW".equals(codeString)) + return V3IdentifierScope.VW; + throw new IllegalArgumentException("Unknown V3IdentifierScope code '"+codeString+"'"); + } + + public String toCode(V3IdentifierScope code) { + if (code == V3IdentifierScope.BUSN) + return "BUSN"; + if (code == V3IdentifierScope.OBJ) + return "OBJ"; + if (code == V3IdentifierScope.VER) + return "VER"; + if (code == V3IdentifierScope.VW) + return "VW"; + return "?"; + } + + public String toSystem(V3IdentifierScope code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IntegrityCheckAlgorithm.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IntegrityCheckAlgorithm.java new file mode 100644 index 00000000000..bcdde54255b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IntegrityCheckAlgorithm.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3IntegrityCheckAlgorithm { + + /** + * This algorithm is defined in FIPS PUB 180-1: Secure Hash Standard. As of April 17, 1995. + */ + SHA1, + /** + * This algorithm is defined in FIPS PUB 180-2: Secure Hash Standard. + */ + SHA256, + /** + * added to help the parsers + */ + NULL; + public static V3IntegrityCheckAlgorithm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHA-1".equals(codeString)) + return SHA1; + if ("SHA-256".equals(codeString)) + return SHA256; + throw new FHIRException("Unknown V3IntegrityCheckAlgorithm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SHA1: return "SHA-1"; + case SHA256: return "SHA-256"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/IntegrityCheckAlgorithm"; + } + public String getDefinition() { + switch (this) { + case SHA1: return "This algorithm is defined in FIPS PUB 180-1: Secure Hash Standard. As of April 17, 1995."; + case SHA256: return "This algorithm is defined in FIPS PUB 180-2: Secure Hash Standard."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SHA1: return "secure hash algorithm - 1"; + case SHA256: return "secure hash algorithm - 256"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IntegrityCheckAlgorithmEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IntegrityCheckAlgorithmEnumFactory.java new file mode 100644 index 00000000000..61d4b0b90d8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3IntegrityCheckAlgorithmEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3IntegrityCheckAlgorithmEnumFactory implements EnumFactory { + + public V3IntegrityCheckAlgorithm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SHA-1".equals(codeString)) + return V3IntegrityCheckAlgorithm.SHA1; + if ("SHA-256".equals(codeString)) + return V3IntegrityCheckAlgorithm.SHA256; + throw new IllegalArgumentException("Unknown V3IntegrityCheckAlgorithm code '"+codeString+"'"); + } + + public String toCode(V3IntegrityCheckAlgorithm code) { + if (code == V3IntegrityCheckAlgorithm.SHA1) + return "SHA-1"; + if (code == V3IntegrityCheckAlgorithm.SHA256) + return "SHA-256"; + return "?"; + } + + public String toSystem(V3IntegrityCheckAlgorithm code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityMode.java new file mode 100644 index 00000000000..d744da214a7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityMode.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LanguageAbilityMode { + + /** + * Expressed signed + */ + ESGN, + /** + * Expressed spoken + */ + ESP, + /** + * Expressed written + */ + EWR, + /** + * Received signed + */ + RSGN, + /** + * Received spoken + */ + RSP, + /** + * Received written + */ + RWR, + /** + * added to help the parsers + */ + NULL; + public static V3LanguageAbilityMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ESGN".equals(codeString)) + return ESGN; + if ("ESP".equals(codeString)) + return ESP; + if ("EWR".equals(codeString)) + return EWR; + if ("RSGN".equals(codeString)) + return RSGN; + if ("RSP".equals(codeString)) + return RSP; + if ("RWR".equals(codeString)) + return RWR; + throw new FHIRException("Unknown V3LanguageAbilityMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ESGN: return "ESGN"; + case ESP: return "ESP"; + case EWR: return "EWR"; + case RSGN: return "RSGN"; + case RSP: return "RSP"; + case RWR: return "RWR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LanguageAbilityMode"; + } + public String getDefinition() { + switch (this) { + case ESGN: return "Expressed signed"; + case ESP: return "Expressed spoken"; + case EWR: return "Expressed written"; + case RSGN: return "Received signed"; + case RSP: return "Received spoken"; + case RWR: return "Received written"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ESGN: return "Expressed signed"; + case ESP: return "Expressed spoken"; + case EWR: return "Expressed written"; + case RSGN: return "Received signed"; + case RSP: return "Received spoken"; + case RWR: return "Received written"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityModeEnumFactory.java new file mode 100644 index 00000000000..cb09e4347ea --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityModeEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3LanguageAbilityModeEnumFactory implements EnumFactory { + + public V3LanguageAbilityMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ESGN".equals(codeString)) + return V3LanguageAbilityMode.ESGN; + if ("ESP".equals(codeString)) + return V3LanguageAbilityMode.ESP; + if ("EWR".equals(codeString)) + return V3LanguageAbilityMode.EWR; + if ("RSGN".equals(codeString)) + return V3LanguageAbilityMode.RSGN; + if ("RSP".equals(codeString)) + return V3LanguageAbilityMode.RSP; + if ("RWR".equals(codeString)) + return V3LanguageAbilityMode.RWR; + throw new IllegalArgumentException("Unknown V3LanguageAbilityMode code '"+codeString+"'"); + } + + public String toCode(V3LanguageAbilityMode code) { + if (code == V3LanguageAbilityMode.ESGN) + return "ESGN"; + if (code == V3LanguageAbilityMode.ESP) + return "ESP"; + if (code == V3LanguageAbilityMode.EWR) + return "EWR"; + if (code == V3LanguageAbilityMode.RSGN) + return "RSGN"; + if (code == V3LanguageAbilityMode.RSP) + return "RSP"; + if (code == V3LanguageAbilityMode.RWR) + return "RWR"; + return "?"; + } + + public String toSystem(V3LanguageAbilityMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityProficiency.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityProficiency.java new file mode 100644 index 00000000000..baef5520e8f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityProficiency.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LanguageAbilityProficiency { + + /** + * Excellent + */ + E, + /** + * Fair + */ + F, + /** + * Good + */ + G, + /** + * Poor + */ + P, + /** + * added to help the parsers + */ + NULL; + public static V3LanguageAbilityProficiency fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("G".equals(codeString)) + return G; + if ("P".equals(codeString)) + return P; + throw new FHIRException("Unknown V3LanguageAbilityProficiency code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case E: return "E"; + case F: return "F"; + case G: return "G"; + case P: return "P"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LanguageAbilityProficiency"; + } + public String getDefinition() { + switch (this) { + case E: return "Excellent"; + case F: return "Fair"; + case G: return "Good"; + case P: return "Poor"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case E: return "Excellent"; + case F: return "Fair"; + case G: return "Good"; + case P: return "Poor"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityProficiencyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityProficiencyEnumFactory.java new file mode 100644 index 00000000000..61476d1c293 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LanguageAbilityProficiencyEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3LanguageAbilityProficiencyEnumFactory implements EnumFactory { + + public V3LanguageAbilityProficiency fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("E".equals(codeString)) + return V3LanguageAbilityProficiency.E; + if ("F".equals(codeString)) + return V3LanguageAbilityProficiency.F; + if ("G".equals(codeString)) + return V3LanguageAbilityProficiency.G; + if ("P".equals(codeString)) + return V3LanguageAbilityProficiency.P; + throw new IllegalArgumentException("Unknown V3LanguageAbilityProficiency code '"+codeString+"'"); + } + + public String toCode(V3LanguageAbilityProficiency code) { + if (code == V3LanguageAbilityProficiency.E) + return "E"; + if (code == V3LanguageAbilityProficiency.F) + return "F"; + if (code == V3LanguageAbilityProficiency.G) + return "G"; + if (code == V3LanguageAbilityProficiency.P) + return "P"; + return "?"; + } + + public String toSystem(V3LanguageAbilityProficiency code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LivingArrangement.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LivingArrangement.java new file mode 100644 index 00000000000..b596393ddb4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LivingArrangement.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LivingArrangement { + + /** + * Definition: Living arrangements lacking a permanent residence. + */ + HL, + /** + * Nomadic + */ + M, + /** + * Transient + */ + T, + /** + * Institution + */ + I, + /** + * Definition: A group living arrangement specifically for the care of those in need of temporary and crisis housing assistance. Examples include domestic violence shelters, shelters for displaced or homeless individuals, Salvation Army, Jesus House, etc. Community based services may be provided. + */ + CS, + /** + * Group Home + */ + G, + /** + * Nursing Home + */ + N, + /** + * Extended care facility + */ + X, + /** + * Definition: A living arrangement within a private residence for single family. + */ + PR, + /** + * Independent Household + */ + H, + /** + * Retirement Community + */ + R, + /** + * Definition: Assisted living in a single family residence for persons with physical, behavioral, or functional health, or socio-economic challenges. There may or may not be on-site supervision but the housing is designed to assist the client with developing independent living skills. Community based services may be provided. + */ + SL, + /** + * added to help the parsers + */ + NULL; + public static V3LivingArrangement fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("HL".equals(codeString)) + return HL; + if ("M".equals(codeString)) + return M; + if ("T".equals(codeString)) + return T; + if ("I".equals(codeString)) + return I; + if ("CS".equals(codeString)) + return CS; + if ("G".equals(codeString)) + return G; + if ("N".equals(codeString)) + return N; + if ("X".equals(codeString)) + return X; + if ("PR".equals(codeString)) + return PR; + if ("H".equals(codeString)) + return H; + if ("R".equals(codeString)) + return R; + if ("SL".equals(codeString)) + return SL; + throw new FHIRException("Unknown V3LivingArrangement code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case HL: return "HL"; + case M: return "M"; + case T: return "T"; + case I: return "I"; + case CS: return "CS"; + case G: return "G"; + case N: return "N"; + case X: return "X"; + case PR: return "PR"; + case H: return "H"; + case R: return "R"; + case SL: return "SL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LivingArrangement"; + } + public String getDefinition() { + switch (this) { + case HL: return "Definition: Living arrangements lacking a permanent residence."; + case M: return "Nomadic"; + case T: return "Transient"; + case I: return "Institution"; + case CS: return "Definition: A group living arrangement specifically for the care of those in need of temporary and crisis housing assistance. Examples include domestic violence shelters, shelters for displaced or homeless individuals, Salvation Army, Jesus House, etc. Community based services may be provided."; + case G: return "Group Home"; + case N: return "Nursing Home"; + case X: return "Extended care facility"; + case PR: return "Definition: A living arrangement within a private residence for single family."; + case H: return "Independent Household"; + case R: return "Retirement Community"; + case SL: return "Definition: Assisted living in a single family residence for persons with physical, behavioral, or functional health, or socio-economic challenges. There may or may not be on-site supervision but the housing is designed to assist the client with developing independent living skills. Community based services may be provided."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case HL: return "homeless"; + case M: return "Nomadic"; + case T: return "Transient"; + case I: return "Institution"; + case CS: return "community shelter"; + case G: return "Group Home"; + case N: return "Nursing Home"; + case X: return "Extended care facility"; + case PR: return "private residence"; + case H: return "Independent Household"; + case R: return "Retirement Community"; + case SL: return "supported living"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LivingArrangementEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LivingArrangementEnumFactory.java new file mode 100644 index 00000000000..e0c73685046 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LivingArrangementEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3LivingArrangementEnumFactory implements EnumFactory { + + public V3LivingArrangement fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("HL".equals(codeString)) + return V3LivingArrangement.HL; + if ("M".equals(codeString)) + return V3LivingArrangement.M; + if ("T".equals(codeString)) + return V3LivingArrangement.T; + if ("I".equals(codeString)) + return V3LivingArrangement.I; + if ("CS".equals(codeString)) + return V3LivingArrangement.CS; + if ("G".equals(codeString)) + return V3LivingArrangement.G; + if ("N".equals(codeString)) + return V3LivingArrangement.N; + if ("X".equals(codeString)) + return V3LivingArrangement.X; + if ("PR".equals(codeString)) + return V3LivingArrangement.PR; + if ("H".equals(codeString)) + return V3LivingArrangement.H; + if ("R".equals(codeString)) + return V3LivingArrangement.R; + if ("SL".equals(codeString)) + return V3LivingArrangement.SL; + throw new IllegalArgumentException("Unknown V3LivingArrangement code '"+codeString+"'"); + } + + public String toCode(V3LivingArrangement code) { + if (code == V3LivingArrangement.HL) + return "HL"; + if (code == V3LivingArrangement.M) + return "M"; + if (code == V3LivingArrangement.T) + return "T"; + if (code == V3LivingArrangement.I) + return "I"; + if (code == V3LivingArrangement.CS) + return "CS"; + if (code == V3LivingArrangement.G) + return "G"; + if (code == V3LivingArrangement.N) + return "N"; + if (code == V3LivingArrangement.X) + return "X"; + if (code == V3LivingArrangement.PR) + return "PR"; + if (code == V3LivingArrangement.H) + return "H"; + if (code == V3LivingArrangement.R) + return "R"; + if (code == V3LivingArrangement.SL) + return "SL"; + return "?"; + } + + public String toSystem(V3LivingArrangement code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalMarkupIgnore.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalMarkupIgnore.java new file mode 100644 index 00000000000..8ce90bd39c2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalMarkupIgnore.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LocalMarkupIgnore { + + /** + * all + */ + ALL, + /** + * markup + */ + MARKUP, + /** + * added to help the parsers + */ + NULL; + public static V3LocalMarkupIgnore fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return ALL; + if ("markup".equals(codeString)) + return MARKUP; + throw new FHIRException("Unknown V3LocalMarkupIgnore code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALL: return "all"; + case MARKUP: return "markup"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LocalMarkupIgnore"; + } + public String getDefinition() { + switch (this) { + case ALL: return "all"; + case MARKUP: return "markup"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALL: return "all"; + case MARKUP: return "markup"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalMarkupIgnoreEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalMarkupIgnoreEnumFactory.java new file mode 100644 index 00000000000..69e21ee5191 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalMarkupIgnoreEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3LocalMarkupIgnoreEnumFactory implements EnumFactory { + + public V3LocalMarkupIgnore fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return V3LocalMarkupIgnore.ALL; + if ("markup".equals(codeString)) + return V3LocalMarkupIgnore.MARKUP; + throw new IllegalArgumentException("Unknown V3LocalMarkupIgnore code '"+codeString+"'"); + } + + public String toCode(V3LocalMarkupIgnore code) { + if (code == V3LocalMarkupIgnore.ALL) + return "all"; + if (code == V3LocalMarkupIgnore.MARKUP) + return "markup"; + return "?"; + } + + public String toSystem(V3LocalMarkupIgnore code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalRemoteControlState.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalRemoteControlState.java new file mode 100644 index 00000000000..4262ab47e11 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalRemoteControlState.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3LocalRemoteControlState { + + /** + * An equipment can either work autonomously ('Local' control state). + */ + L, + /** + * An equipment can be controlled by another system, e.g., LAS computer ('Remote' control state). + */ + R, + /** + * added to help the parsers + */ + NULL; + public static V3LocalRemoteControlState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("L".equals(codeString)) + return L; + if ("R".equals(codeString)) + return R; + throw new FHIRException("Unknown V3LocalRemoteControlState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case L: return "L"; + case R: return "R"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/LocalRemoteControlState"; + } + public String getDefinition() { + switch (this) { + case L: return "An equipment can either work autonomously ('Local' control state)."; + case R: return "An equipment can be controlled by another system, e.g., LAS computer ('Remote' control state)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case L: return "Local"; + case R: return "Remote"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalRemoteControlStateEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalRemoteControlStateEnumFactory.java new file mode 100644 index 00000000000..cf637cc3218 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3LocalRemoteControlStateEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3LocalRemoteControlStateEnumFactory implements EnumFactory { + + public V3LocalRemoteControlState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("L".equals(codeString)) + return V3LocalRemoteControlState.L; + if ("R".equals(codeString)) + return V3LocalRemoteControlState.R; + throw new IllegalArgumentException("Unknown V3LocalRemoteControlState code '"+codeString+"'"); + } + + public String toCode(V3LocalRemoteControlState code) { + if (code == V3LocalRemoteControlState.L) + return "L"; + if (code == V3LocalRemoteControlState.R) + return "R"; + return "?"; + } + + public String toSystem(V3LocalRemoteControlState code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ManagedParticipationStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ManagedParticipationStatus.java new file mode 100644 index 00000000000..796e2178e23 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ManagedParticipationStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ManagedParticipationStatus { + + /** + * The 'typical' state. Excludes "nullified" which represents the termination state of a participation instance that was created in error. + */ + NORMAL, + /** + * The state representing the fact that the Participation is in progress. + */ + ACTIVE, + /** + * The terminal state resulting from cancellation of the Participation prior to activation. + */ + CANCELLED, + /** + * The terminal state representing the successful completion of the Participation. + */ + COMPLETED, + /** + * The state representing that fact that the Participation has not yet become active. + */ + PENDING, + /** + * The state representing the termination of a Participation instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3ManagedParticipationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("pending".equals(codeString)) + return PENDING; + if ("nullified".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3ManagedParticipationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case PENDING: return "pending"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ManagedParticipationStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The 'typical' state. Excludes \"nullified\" which represents the termination state of a participation instance that was created in error."; + case ACTIVE: return "The state representing the fact that the Participation is in progress."; + case CANCELLED: return "The terminal state resulting from cancellation of the Participation prior to activation."; + case COMPLETED: return "The terminal state representing the successful completion of the Participation."; + case PENDING: return "The state representing that fact that the Participation has not yet become active."; + case NULLIFIED: return "The state representing the termination of a Participation instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case PENDING: return "pending"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ManagedParticipationStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ManagedParticipationStatusEnumFactory.java new file mode 100644 index 00000000000..ad69cb5bbd2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ManagedParticipationStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ManagedParticipationStatusEnumFactory implements EnumFactory { + + public V3ManagedParticipationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3ManagedParticipationStatus.NORMAL; + if ("active".equals(codeString)) + return V3ManagedParticipationStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return V3ManagedParticipationStatus.CANCELLED; + if ("completed".equals(codeString)) + return V3ManagedParticipationStatus.COMPLETED; + if ("pending".equals(codeString)) + return V3ManagedParticipationStatus.PENDING; + if ("nullified".equals(codeString)) + return V3ManagedParticipationStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3ManagedParticipationStatus code '"+codeString+"'"); + } + + public String toCode(V3ManagedParticipationStatus code) { + if (code == V3ManagedParticipationStatus.NORMAL) + return "normal"; + if (code == V3ManagedParticipationStatus.ACTIVE) + return "active"; + if (code == V3ManagedParticipationStatus.CANCELLED) + return "cancelled"; + if (code == V3ManagedParticipationStatus.COMPLETED) + return "completed"; + if (code == V3ManagedParticipationStatus.PENDING) + return "pending"; + if (code == V3ManagedParticipationStatus.NULLIFIED) + return "nullified"; + return "?"; + } + + public String toSystem(V3ManagedParticipationStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MapRelationship.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MapRelationship.java new file mode 100644 index 00000000000..8484a8003f5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MapRelationship.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3MapRelationship { + + /** + * The first concept is at a more abstract level than the second concept. For example, Hepatitis is broader than Hepatitis A, and endocrine disease is broader than Diabetes Mellitus. Broader than is the opposite of the narrower than relationship. + */ + BT, + /** + * The two concepts have identical meaning. + */ + E, + /** + * The first concept is at a more detailed level than the second concept. For example, Pennicillin G is narrower than Pennicillin, and vellus hair is narrower than hair. Narrower than is the opposite of broader than. + */ + NT, + /** + * added to help the parsers + */ + NULL; + public static V3MapRelationship fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BT".equals(codeString)) + return BT; + if ("E".equals(codeString)) + return E; + if ("NT".equals(codeString)) + return NT; + throw new FHIRException("Unknown V3MapRelationship code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BT: return "BT"; + case E: return "E"; + case NT: return "NT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/MapRelationship"; + } + public String getDefinition() { + switch (this) { + case BT: return "The first concept is at a more abstract level than the second concept. For example, Hepatitis is broader than Hepatitis A, and endocrine disease is broader than Diabetes Mellitus. Broader than is the opposite of the narrower than relationship."; + case E: return "The two concepts have identical meaning."; + case NT: return "The first concept is at a more detailed level than the second concept. For example, Pennicillin G is narrower than Pennicillin, and vellus hair is narrower than hair. Narrower than is the opposite of broader than."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BT: return "Broader Than"; + case E: return "Exact"; + case NT: return "Narrower Than"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MapRelationshipEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MapRelationshipEnumFactory.java new file mode 100644 index 00000000000..5ce0a723f9c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MapRelationshipEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3MapRelationshipEnumFactory implements EnumFactory { + + public V3MapRelationship fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BT".equals(codeString)) + return V3MapRelationship.BT; + if ("E".equals(codeString)) + return V3MapRelationship.E; + if ("NT".equals(codeString)) + return V3MapRelationship.NT; + throw new IllegalArgumentException("Unknown V3MapRelationship code '"+codeString+"'"); + } + + public String toCode(V3MapRelationship code) { + if (code == V3MapRelationship.BT) + return "BT"; + if (code == V3MapRelationship.E) + return "E"; + if (code == V3MapRelationship.NT) + return "NT"; + return "?"; + } + + public String toSystem(V3MapRelationship code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MaritalStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MaritalStatus.java new file mode 100644 index 00000000000..074c96862fb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MaritalStatus.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3MaritalStatus { + + /** + * Marriage contract has been declared null and to not have existed + */ + A, + /** + * Marriage contract has been declared dissolved and inactive + */ + D, + /** + * Subject to an Interlocutory Decree. + */ + I, + /** + * Legally Separated + */ + L, + /** + * A current marriage contract is active + */ + M, + /** + * More than 1 current spouse + */ + P, + /** + * No marriage contract has ever been entered + */ + S, + /** + * Person declares that a domestic partner relationship exists. + */ + T, + /** + * Currently not in a marriage contract. + */ + U, + /** + * The spouse has died + */ + W, + /** + * added to help the parsers + */ + NULL; + public static V3MaritalStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("P".equals(codeString)) + return P; + if ("S".equals(codeString)) + return S; + if ("T".equals(codeString)) + return T; + if ("U".equals(codeString)) + return U; + if ("W".equals(codeString)) + return W; + throw new FHIRException("Unknown V3MaritalStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case D: return "D"; + case I: return "I"; + case L: return "L"; + case M: return "M"; + case P: return "P"; + case S: return "S"; + case T: return "T"; + case U: return "U"; + case W: return "W"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/MaritalStatus"; + } + public String getDefinition() { + switch (this) { + case A: return "Marriage contract has been declared null and to not have existed"; + case D: return "Marriage contract has been declared dissolved and inactive"; + case I: return "Subject to an Interlocutory Decree."; + case L: return "Legally Separated"; + case M: return "A current marriage contract is active"; + case P: return "More than 1 current spouse"; + case S: return "No marriage contract has ever been entered"; + case T: return "Person declares that a domestic partner relationship exists."; + case U: return "Currently not in a marriage contract."; + case W: return "The spouse has died"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Annulled"; + case D: return "Divorced"; + case I: return "Interlocutory"; + case L: return "Legally Separated"; + case M: return "Married"; + case P: return "Polygamous"; + case S: return "Never Married"; + case T: return "Domestic partner"; + case U: return "unmarried"; + case W: return "Widowed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MaritalStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MaritalStatusEnumFactory.java new file mode 100644 index 00000000000..4424b24f88c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MaritalStatusEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3MaritalStatusEnumFactory implements EnumFactory { + + public V3MaritalStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3MaritalStatus.A; + if ("D".equals(codeString)) + return V3MaritalStatus.D; + if ("I".equals(codeString)) + return V3MaritalStatus.I; + if ("L".equals(codeString)) + return V3MaritalStatus.L; + if ("M".equals(codeString)) + return V3MaritalStatus.M; + if ("P".equals(codeString)) + return V3MaritalStatus.P; + if ("S".equals(codeString)) + return V3MaritalStatus.S; + if ("T".equals(codeString)) + return V3MaritalStatus.T; + if ("U".equals(codeString)) + return V3MaritalStatus.U; + if ("W".equals(codeString)) + return V3MaritalStatus.W; + throw new IllegalArgumentException("Unknown V3MaritalStatus code '"+codeString+"'"); + } + + public String toCode(V3MaritalStatus code) { + if (code == V3MaritalStatus.A) + return "A"; + if (code == V3MaritalStatus.D) + return "D"; + if (code == V3MaritalStatus.I) + return "I"; + if (code == V3MaritalStatus.L) + return "L"; + if (code == V3MaritalStatus.M) + return "M"; + if (code == V3MaritalStatus.P) + return "P"; + if (code == V3MaritalStatus.S) + return "S"; + if (code == V3MaritalStatus.T) + return "T"; + if (code == V3MaritalStatus.U) + return "U"; + if (code == V3MaritalStatus.W) + return "W"; + return "?"; + } + + public String toSystem(V3MaritalStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MessageWaitingPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MessageWaitingPriority.java new file mode 100644 index 00000000000..09dd5f29507 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MessageWaitingPriority.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3MessageWaitingPriority { + + /** + * High priority messages are available + */ + H, + /** + * Low priority messages are available + */ + L, + /** + * Medium priority messages are available + */ + M, + /** + * added to help the parsers + */ + NULL; + public static V3MessageWaitingPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("H".equals(codeString)) + return H; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + throw new FHIRException("Unknown V3MessageWaitingPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case H: return "H"; + case L: return "L"; + case M: return "M"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/MessageWaitingPriority"; + } + public String getDefinition() { + switch (this) { + case H: return "High priority messages are available"; + case L: return "Low priority messages are available"; + case M: return "Medium priority messages are available"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case H: return "High"; + case L: return "Low"; + case M: return "Medium"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MessageWaitingPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MessageWaitingPriorityEnumFactory.java new file mode 100644 index 00000000000..f62c96fbb2d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3MessageWaitingPriorityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3MessageWaitingPriorityEnumFactory implements EnumFactory { + + public V3MessageWaitingPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("H".equals(codeString)) + return V3MessageWaitingPriority.H; + if ("L".equals(codeString)) + return V3MessageWaitingPriority.L; + if ("M".equals(codeString)) + return V3MessageWaitingPriority.M; + throw new IllegalArgumentException("Unknown V3MessageWaitingPriority code '"+codeString+"'"); + } + + public String toCode(V3MessageWaitingPriority code) { + if (code == V3MessageWaitingPriority.H) + return "H"; + if (code == V3MessageWaitingPriority.L) + return "L"; + if (code == V3MessageWaitingPriority.M) + return "M"; + return "?"; + } + + public String toSystem(V3MessageWaitingPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ModifyIndicator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ModifyIndicator.java new file mode 100644 index 00000000000..829c42fab80 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ModifyIndicator.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ModifyIndicator { + + /** + * Modified subscription to a query server. + */ + M, + /** + * New subscription to a query server. + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3ModifyIndicator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return M; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3ModifyIndicator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case M: return "M"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ModifyIndicator"; + } + public String getDefinition() { + switch (this) { + case M: return "Modified subscription to a query server."; + case N: return "New subscription to a query server."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case M: return "Modified subscription"; + case N: return "New subscription"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ModifyIndicatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ModifyIndicatorEnumFactory.java new file mode 100644 index 00000000000..3840030d77f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ModifyIndicatorEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ModifyIndicatorEnumFactory implements EnumFactory { + + public V3ModifyIndicator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("M".equals(codeString)) + return V3ModifyIndicator.M; + if ("N".equals(codeString)) + return V3ModifyIndicator.N; + throw new IllegalArgumentException("Unknown V3ModifyIndicator code '"+codeString+"'"); + } + + public String toCode(V3ModifyIndicator code) { + if (code == V3ModifyIndicator.M) + return "M"; + if (code == V3ModifyIndicator.N) + return "N"; + return "?"; + } + + public String toSystem(V3ModifyIndicator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3NullFlavor.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3NullFlavor.java new file mode 100644 index 00000000000..69e21f4b3e0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3NullFlavor.java @@ -0,0 +1,244 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3NullFlavor { + + /** + * Description:The value is exceptional (missing, omitted, incomplete, improper). No information as to the reason for being an exceptional value is provided. This is the most general exceptional value. It is also the default exceptional value. + */ + NI, + /** + * Description:The value as represented in the instance is not a member of the set of permitted data values in the constrained value domain of a variable. + */ + INV, + /** + * Description:An actual value may exist, but it must be derived from the provided information (usually an EXPR generic data type extension will be used to convey the derivation expressionexpression . + */ + DER, + /** + * Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g., concept not provided by required code system). + + + Usage Notes: This flavor and its specializations are most commonly used with the CD datatype and its flavors. However, it may apply to *any* datatype where the constraints of the type are tighter than can be conveyed. For example, a PQ that is for a true measured amount whose units are not supported in UCUM, a need to convey a REAL when the type has been constrained to INT, etc. + + With coded datatypes, this null flavor may only be used if the vocabulary binding has a coding strength of CNE. By definition, all local codes and original text are part of the value set if the coding strength is CWE. + */ + OTH, + /** + * Negative infinity of numbers. + */ + NINF, + /** + * Positive infinity of numbers. + */ + PINF, + /** + * Description: The actual value has not yet been encoded within the approved value domain. + + + Example: Original text or a local code has been specified but translation or encoding to the approved value set has not yet occurred due to limitations of the sending system. Original text has been captured for a PQ, but not attempt has been made to split the value and unit or to encode the unit in UCUM. + + + Usage Notes: If it is known that it is not possible to encode the concept, OTH should be used instead. However, use of UNC does not necessarily guarantee the concept will be encodable, only that encoding has not been attempted. + + Data type properties such as original text and translations may be present when this null flavor is included. + */ + UNC, + /** + * There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information. + + Note: using this null flavor does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail. + */ + MSK, + /** + * Known to have no proper value (e.g., last menstrual period for a male). + */ + NA, + /** + * Description:A proper value is applicable, but not known. + + + Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless: + + + Those properties themselves directly translate to a semantic of "unknown". (E.g. a local code sent as a translation that conveys 'unknown') + Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of "H" and a URL prefix of "tel:" to convey that it is the home phone number that is unknown.) + */ + UNK, + /** + * Information was sought but not found (e.g., patient was asked but didn't know) + */ + ASKU, + /** + * Information is not available at this time but it is expected that it will be available later. + */ + NAV, + /** + * This information has not been sought (e.g., patient was not asked) + */ + NASK, + /** + * Information is not available at this time (with no expectation regarding whether it will or will not be available in the future). + */ + NAVU, + /** + * Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water. + */ + QS, + /** + * The content is greater than zero, but too small to be quantified. + */ + TRC, + /** + * Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults. + */ + NP, + /** + * added to help the parsers + */ + NULL; + public static V3NullFlavor fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NI".equals(codeString)) + return NI; + if ("INV".equals(codeString)) + return INV; + if ("DER".equals(codeString)) + return DER; + if ("OTH".equals(codeString)) + return OTH; + if ("NINF".equals(codeString)) + return NINF; + if ("PINF".equals(codeString)) + return PINF; + if ("UNC".equals(codeString)) + return UNC; + if ("MSK".equals(codeString)) + return MSK; + if ("NA".equals(codeString)) + return NA; + if ("UNK".equals(codeString)) + return UNK; + if ("ASKU".equals(codeString)) + return ASKU; + if ("NAV".equals(codeString)) + return NAV; + if ("NASK".equals(codeString)) + return NASK; + if ("NAVU".equals(codeString)) + return NAVU; + if ("QS".equals(codeString)) + return QS; + if ("TRC".equals(codeString)) + return TRC; + if ("NP".equals(codeString)) + return NP; + throw new FHIRException("Unknown V3NullFlavor code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NI: return "NI"; + case INV: return "INV"; + case DER: return "DER"; + case OTH: return "OTH"; + case NINF: return "NINF"; + case PINF: return "PINF"; + case UNC: return "UNC"; + case MSK: return "MSK"; + case NA: return "NA"; + case UNK: return "UNK"; + case ASKU: return "ASKU"; + case NAV: return "NAV"; + case NASK: return "NASK"; + case NAVU: return "NAVU"; + case QS: return "QS"; + case TRC: return "TRC"; + case NP: return "NP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/NullFlavor"; + } + public String getDefinition() { + switch (this) { + case NI: return "Description:The value is exceptional (missing, omitted, incomplete, improper). No information as to the reason for being an exceptional value is provided. This is the most general exceptional value. It is also the default exceptional value."; + case INV: return "Description:The value as represented in the instance is not a member of the set of permitted data values in the constrained value domain of a variable."; + case DER: return "Description:An actual value may exist, but it must be derived from the provided information (usually an EXPR generic data type extension will be used to convey the derivation expressionexpression ."; + case OTH: return "Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g., concept not provided by required code system).\r\n\n \n Usage Notes: This flavor and its specializations are most commonly used with the CD datatype and its flavors. However, it may apply to *any* datatype where the constraints of the type are tighter than can be conveyed. For example, a PQ that is for a true measured amount whose units are not supported in UCUM, a need to convey a REAL when the type has been constrained to INT, etc.\r\n\n With coded datatypes, this null flavor may only be used if the vocabulary binding has a coding strength of CNE. By definition, all local codes and original text are part of the value set if the coding strength is CWE."; + case NINF: return "Negative infinity of numbers."; + case PINF: return "Positive infinity of numbers."; + case UNC: return "Description: The actual value has not yet been encoded within the approved value domain.\r\n\n \n Example: Original text or a local code has been specified but translation or encoding to the approved value set has not yet occurred due to limitations of the sending system. Original text has been captured for a PQ, but not attempt has been made to split the value and unit or to encode the unit in UCUM.\r\n\n \n Usage Notes: If it is known that it is not possible to encode the concept, OTH should be used instead. However, use of UNC does not necessarily guarantee the concept will be encodable, only that encoding has not been attempted.\r\n\n Data type properties such as original text and translations may be present when this null flavor is included."; + case MSK: return "There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information.\r\n\n Note: using this null flavor does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail."; + case NA: return "Known to have no proper value (e.g., last menstrual period for a male)."; + case UNK: return "Description:A proper value is applicable, but not known.\r\n\n \n Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless:\r\n\n \n Those properties themselves directly translate to a semantic of \"unknown\". (E.g. a local code sent as a translation that conveys 'unknown')\n Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of \"H\" and a URL prefix of \"tel:\" to convey that it is the home phone number that is unknown.)"; + case ASKU: return "Information was sought but not found (e.g., patient was asked but didn't know)"; + case NAV: return "Information is not available at this time but it is expected that it will be available later."; + case NASK: return "This information has not been sought (e.g., patient was not asked)"; + case NAVU: return "Information is not available at this time (with no expectation regarding whether it will or will not be available in the future)."; + case QS: return "Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material. e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water."; + case TRC: return "The content is greater than zero, but too small to be quantified."; + case NP: return "Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NI: return "NoInformation"; + case INV: return "invalid"; + case DER: return "derived"; + case OTH: return "other"; + case NINF: return "negative infinity"; + case PINF: return "positive infinity"; + case UNC: return "un-encoded"; + case MSK: return "masked"; + case NA: return "not applicable"; + case UNK: return "unknown"; + case ASKU: return "asked but unknown"; + case NAV: return "temporarily unavailable"; + case NASK: return "not asked"; + case NAVU: return "Not available"; + case QS: return "Sufficient Quantity"; + case TRC: return "trace"; + case NP: return "not present"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3NullFlavorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3NullFlavorEnumFactory.java new file mode 100644 index 00000000000..d183fc50387 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3NullFlavorEnumFactory.java @@ -0,0 +1,122 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3NullFlavorEnumFactory implements EnumFactory { + + public V3NullFlavor fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NI".equals(codeString)) + return V3NullFlavor.NI; + if ("INV".equals(codeString)) + return V3NullFlavor.INV; + if ("DER".equals(codeString)) + return V3NullFlavor.DER; + if ("OTH".equals(codeString)) + return V3NullFlavor.OTH; + if ("NINF".equals(codeString)) + return V3NullFlavor.NINF; + if ("PINF".equals(codeString)) + return V3NullFlavor.PINF; + if ("UNC".equals(codeString)) + return V3NullFlavor.UNC; + if ("MSK".equals(codeString)) + return V3NullFlavor.MSK; + if ("NA".equals(codeString)) + return V3NullFlavor.NA; + if ("UNK".equals(codeString)) + return V3NullFlavor.UNK; + if ("ASKU".equals(codeString)) + return V3NullFlavor.ASKU; + if ("NAV".equals(codeString)) + return V3NullFlavor.NAV; + if ("NASK".equals(codeString)) + return V3NullFlavor.NASK; + if ("NAVU".equals(codeString)) + return V3NullFlavor.NAVU; + if ("QS".equals(codeString)) + return V3NullFlavor.QS; + if ("TRC".equals(codeString)) + return V3NullFlavor.TRC; + if ("NP".equals(codeString)) + return V3NullFlavor.NP; + throw new IllegalArgumentException("Unknown V3NullFlavor code '"+codeString+"'"); + } + + public String toCode(V3NullFlavor code) { + if (code == V3NullFlavor.NI) + return "NI"; + if (code == V3NullFlavor.INV) + return "INV"; + if (code == V3NullFlavor.DER) + return "DER"; + if (code == V3NullFlavor.OTH) + return "OTH"; + if (code == V3NullFlavor.NINF) + return "NINF"; + if (code == V3NullFlavor.PINF) + return "PINF"; + if (code == V3NullFlavor.UNC) + return "UNC"; + if (code == V3NullFlavor.MSK) + return "MSK"; + if (code == V3NullFlavor.NA) + return "NA"; + if (code == V3NullFlavor.UNK) + return "UNK"; + if (code == V3NullFlavor.ASKU) + return "ASKU"; + if (code == V3NullFlavor.NAV) + return "NAV"; + if (code == V3NullFlavor.NASK) + return "NASK"; + if (code == V3NullFlavor.NAVU) + return "NAVU"; + if (code == V3NullFlavor.QS) + return "QS"; + if (code == V3NullFlavor.TRC) + return "TRC"; + if (code == V3NullFlavor.NP) + return "NP"; + return "?"; + } + + public String toSystem(V3NullFlavor code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationInterpretation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationInterpretation.java new file mode 100644 index 00000000000..585997a144d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationInterpretation.java @@ -0,0 +1,702 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ObservationInterpretation { + + /** + * Codes that specify interpretation of genetic analysis, such as "positive", "negative", "carrier", "responsive", etc. + */ + _GENETICOBSERVATIONINTERPRETATION, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + */ + CAR, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + + + + Deprecation Comment: + This code is currently the same string as the print name for this concept and is inconsistent with the conventions being used for the other codes in the coding system, as it is a full word with initial capitalization, rather than an all upper case mnemonic. The recommendation from OO is to deprecate the code "Carrier" and to add "CAR" as the new active code representation for this concept. + */ + CARRIER, + /** + * Interpretations of change of quantity and/or severity. At most one of B or W and one of U or D allowed. + */ + _OBSERVATIONINTERPRETATIONCHANGE, + /** + * The current result or observation value has improved compared to the previous result or observation value (the change is significant as defined in the respective test procedure). + + [Note: This can be applied to quantitative or qualitative observations.] + */ + B, + /** + * The current result has decreased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure). + */ + D, + /** + * The current result has increased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure). + */ + U, + /** + * The current result or observation value has degraded compared to the previous result or observation value (the change is significant as defined in the respective test procedure). + + [Note: This can be applied to quantitative or qualitative observations.] + */ + W, + /** + * Technical exceptions resulting in the inability to provide an interpretation. At most one allowed. Does not imply normality or severity. + */ + _OBSERVATIONINTERPRETATIONEXCEPTIONS, + /** + * The result is below the minimum detection limit (the test procedure or equipment is the limiting factor). + + Synonyms: Below analytical limit, low off scale. + */ + LESS_THAN, + /** + * The result is above the maximum quantifiable limit (the test procedure or equipment is the limiting factor). + + Synonyms: Above analytical limit, high off scale. + */ + GREATER_THAN, + /** + * A valid result cannot be obtained for the specified component / analyte due to the presence of anti-complementary substances in the sample. + + + + Deprecation Comment: + This code is being deprecated to match the status in V2 Table 0078 "Interpretation Codes. + */ + AC, + /** + * There is insufficient evidence that the species in question is a good target for therapy with the drug. A categorical interpretation is not possible. + + [Note: A MIC with "IE" and/or a comment may be reported (without an accompanying S, I or R-categorization).] + */ + IE, + /** + * A result cannot be considered valid for the specified component / analyte or organism due to failure in the quality control testing component. + + + + Deprecation Comment: + This code is being deprecated to match the status in V2 Table 0078 "Interpretation Codes. + */ + QCF, + /** + * A valid result cannot be obtained for the specified organism or cell line due to the presence of cytotoxic substances in the sample or culture. + + + + Deprecation Comment: + This code is being deprecated to match the status in V2 Table 0078 "Interpretation Codes. + */ + TOX, + /** + * Interpretation of normality or degree of abnormality (including critical or "alert" level). Concepts in this category are mutually exclusive, i.e., at most one is allowed. + */ + _OBSERVATIONINTERPRETATIONNORMALITY, + /** + * The result or observation value is outside the reference range or expected norm (as defined for the respective test procedure). + + [Note: Typically applies to non-numeric results.] + */ + A, + /** + * The result or observation value is outside a reference range or expected norm at a level at which immediate action should be considered for patient safety (as defined for the respective test procedure). + + [Note: Typically applies to non-numeric results. Analogous to critical/panic limits for numeric results.] + */ + AA, + /** + * The result for a quantitative observation is above a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure). + + Synonym: Above upper panic limits. + */ + HH, + /** + * The result for a quantitative observation is below a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure). + + Synonym: Below lower panic limits. + */ + LL, + /** + * The result for a quantitative observation is above the upper limit of the reference range (as defined for the respective test procedure). + + Synonym: Above high normal + */ + H, + /** + * A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'H' and 'HH'.] + + + Deprecation Comment: The code 'H>' is being deprecated in order to align with the use of the code 'HU' for "Very high" in V2 Table 0078 "Interpretation Codes". + + [Note: The use of code 'H>' is non-preferred, as this code is deprecated and on track to be retired; use code 'HU' instead. + */ + H_, + /** + * A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician. + */ + HU, + /** + * The result for a quantitative observation is below the lower limit of the reference range (as defined for the respective test procedure). + + Synonym: Below low normal + */ + L, + /** + * A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'L' and 'LL'.] + + + Deprecation Comment: The code 'L<' is being deprecated in order to align with the use of the code 'LU' for "Very low" in V2 Table 0078 "Interpretation Codes". + + [Note: The use of code 'L<' is non-preferred, as this code is deprecated and on track to be retired; use code 'LU' instead. + */ + L_, + /** + * A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician. + */ + LU, + /** + * The result or observation value is within the reference range or expected norm (as defined for the respective test procedure). + + [Note: Applies to numeric or non-numeric results.] + */ + N, + /** + * Interpretations of anti-microbial susceptibility testing results (microbiology). At most one allowed. + */ + _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY, + /** + * Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with uncertain therapeutic effect. Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) +Projects: ISO 20776-1, ISO 20776-2 + + [Note 1: Bacterial strains are categorized as intermediate by applying the appropriate breakpoints in a defined phenotypic test system.] + + [Note 2: This class of susceptibility implies that an infection due to the isolate can be appropriately treated in body sites where the drugs are physiologically concentrated or when a high dosage of drug can be used.] + + [Note 3: This class also indicates a "buffer zone," to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.] + + [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).] + */ + I, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + + + + Deprecation Comment: + This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012). + */ + MS, + /** + * A category used for isolates for which only a susceptible interpretive criterion has been designated because of the absence or rare occurrence of resistant strains. Isolates that have MICs above or zone diameters below the value indicated for the susceptible breakpoint should be reported as non-susceptible. + + NOTE 1: An isolate that is interpreted as non-susceptible does not necessarily mean that the isolate has a resistance mechanism. It is possible that isolates with MICs above the susceptible breakpoint that lack resistance mechanisms may be encountered within the wild-type distribution subsequent to the time the susceptible-only breakpoint is set. + + NOTE 2: For strains yielding results in the "nonsusceptible" category, organism identification and antimicrobial susceptibility test results should be confirmed. + + Synonym: decreased susceptibility. + */ + NS, + /** + * Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic failure. +Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) +Projects: ISO 20776-1, ISO 20776-2 + + [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.] + + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).] + */ + R, + /** + * A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective. + + + Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside. + + + Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found. + */ + SYNR, + /** + * Bacterial strain inhibited by in vitro concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic success. +Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) +Synonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2 + + [Note 1: Bacterial strains are categorized as susceptible by applying the appropriate breakpoints in a defined phenotypic system.] + + [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).] + */ + S, + /** + * A category that includes isolates with antimicrobial agent minimum inhibitory concentrations (MICs) that approach usually attainable blood and tissue levels and for which response rates may be lower than for susceptible isolates. + + Reference: CLSI document M44-A2 2009 "Method for antifungal disk diffusion susceptibility testing of yeasts; approved guideline - second edition" - page 2. + */ + SDD, + /** + * A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective. + + + Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside. + + + Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found. + */ + SYNS, + /** + * The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder. + + + + Deprecation Comment: + This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012). + */ + VS, + /** + * The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported. + + + Example: A positive result on a Hepatitis screening test. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. +These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. +Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + */ + EX, + /** + * The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported. + + + Example: A positive result on a Hepatitis screening test. + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + */ + HX, + /** + * The numeric observation/test result is interpreted as being below the low threshold value for a particular protocol within which the result is being reported. + + Example: A Total White Blood Cell Count falling below a protocol-defined threshold value of 3000/mm^3 + Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. + */ + LX, + /** + * Hold for Medical Review + + + Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 "Interpretation Codes." + */ + HM, + /** + * Interpretations of the presence or absence of a component / analyte or organism in a test or of a sign in a clinical observation. In keeping with laboratory data processing practice, these concepts provide a categorical interpretation of the "meaning" of the quantitative value for the same observation. + */ + OBSERVATIONINTERPRETATIONDETECTION, + /** + * The specified component / analyte, organism or clinical sign could neither be declared positive / negative nor detected / not detected by the performed test or procedure. + + + Usage Note: For example, if the specimen was degraded, poorly processed, or was missing the required anatomic structures, then "indeterminate" (i.e. "cannot be determined") is the appropriate response, not "equivocal". + */ + IND, + /** + * The test or procedure was successfully performed, but the results are borderline and can neither be declared positive / negative nor detected / not detected according to the current established criteria. + */ + E, + /** + * An absence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure. + + [Note: Negative does not necessarily imply the complete absence of the specified item.] + */ + NEG, + /** + * The presence of the specified component / analyte, organism or clinical sign could not be determined within the limit of detection of the performed test or procedure. + */ + ND, + /** + * A presence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure. + */ + POS, + /** + * The measurement of the specified component / analyte, organism or clinical sign above the limit of detection of the performed test or procedure. + */ + DET, + /** + * Interpretation of the observed result taking into account additional information (contraindicators) about the patient's situation. Concepts in this category are mutually exclusive, i.e., at most one is allowed. + */ + OBSERVATIONINTERPRETATIONEXPECTATION, + /** + * This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Expected" (e.g., presence of drugs in a patient that is taking prescription medication for pain management). + */ + EXP, + /** + * This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Unexpected" (e.g., presence of non-prescribed drugs in a patient that is taking prescription medication for pain management). + */ + UNE, + /** + * Interpretation qualifiers in separate OBX segments + + + Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 "Interpretation Codes." + */ + OBX, + /** + * Interpretations of the presence and level of reactivity of the specified component / analyte with the reagent in the performed laboratory test. + */ + REACTIVITYOBSERVATIONINTERPRETATION, + /** + * An absence finding used to indicate that the specified component / analyte did not react measurably with the reagent. + */ + NR, + /** + * A presence finding used to indicate that the specified component / analyte reacted with the reagent above the reliably measurable limit of the performed test. + */ + RR, + /** + * A weighted presence finding used to indicate that the specified component / analyte reacted with the reagent, but below the reliably measurable limit of the performed test. + */ + WR, + /** + * added to help the parsers + */ + NULL; + public static V3ObservationInterpretation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneticObservationInterpretation".equals(codeString)) + return _GENETICOBSERVATIONINTERPRETATION; + if ("CAR".equals(codeString)) + return CAR; + if ("Carrier".equals(codeString)) + return CARRIER; + if ("_ObservationInterpretationChange".equals(codeString)) + return _OBSERVATIONINTERPRETATIONCHANGE; + if ("B".equals(codeString)) + return B; + if ("D".equals(codeString)) + return D; + if ("U".equals(codeString)) + return U; + if ("W".equals(codeString)) + return W; + if ("_ObservationInterpretationExceptions".equals(codeString)) + return _OBSERVATIONINTERPRETATIONEXCEPTIONS; + if ("<".equals(codeString)) + return LESS_THAN; + if (">".equals(codeString)) + return GREATER_THAN; + if ("AC".equals(codeString)) + return AC; + if ("IE".equals(codeString)) + return IE; + if ("QCF".equals(codeString)) + return QCF; + if ("TOX".equals(codeString)) + return TOX; + if ("_ObservationInterpretationNormality".equals(codeString)) + return _OBSERVATIONINTERPRETATIONNORMALITY; + if ("A".equals(codeString)) + return A; + if ("AA".equals(codeString)) + return AA; + if ("HH".equals(codeString)) + return HH; + if ("LL".equals(codeString)) + return LL; + if ("H".equals(codeString)) + return H; + if ("H>".equals(codeString)) + return H_; + if ("HU".equals(codeString)) + return HU; + if ("L".equals(codeString)) + return L; + if ("L<".equals(codeString)) + return L_; + if ("LU".equals(codeString)) + return LU; + if ("N".equals(codeString)) + return N; + if ("_ObservationInterpretationSusceptibility".equals(codeString)) + return _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY; + if ("I".equals(codeString)) + return I; + if ("MS".equals(codeString)) + return MS; + if ("NS".equals(codeString)) + return NS; + if ("R".equals(codeString)) + return R; + if ("SYN-R".equals(codeString)) + return SYNR; + if ("S".equals(codeString)) + return S; + if ("SDD".equals(codeString)) + return SDD; + if ("SYN-S".equals(codeString)) + return SYNS; + if ("VS".equals(codeString)) + return VS; + if ("EX".equals(codeString)) + return EX; + if ("HX".equals(codeString)) + return HX; + if ("LX".equals(codeString)) + return LX; + if ("HM".equals(codeString)) + return HM; + if ("ObservationInterpretationDetection".equals(codeString)) + return OBSERVATIONINTERPRETATIONDETECTION; + if ("IND".equals(codeString)) + return IND; + if ("E".equals(codeString)) + return E; + if ("NEG".equals(codeString)) + return NEG; + if ("ND".equals(codeString)) + return ND; + if ("POS".equals(codeString)) + return POS; + if ("DET".equals(codeString)) + return DET; + if ("ObservationInterpretationExpectation".equals(codeString)) + return OBSERVATIONINTERPRETATIONEXPECTATION; + if ("EXP".equals(codeString)) + return EXP; + if ("UNE".equals(codeString)) + return UNE; + if ("OBX".equals(codeString)) + return OBX; + if ("ReactivityObservationInterpretation".equals(codeString)) + return REACTIVITYOBSERVATIONINTERPRETATION; + if ("NR".equals(codeString)) + return NR; + if ("RR".equals(codeString)) + return RR; + if ("WR".equals(codeString)) + return WR; + throw new FHIRException("Unknown V3ObservationInterpretation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _GENETICOBSERVATIONINTERPRETATION: return "_GeneticObservationInterpretation"; + case CAR: return "CAR"; + case CARRIER: return "Carrier"; + case _OBSERVATIONINTERPRETATIONCHANGE: return "_ObservationInterpretationChange"; + case B: return "B"; + case D: return "D"; + case U: return "U"; + case W: return "W"; + case _OBSERVATIONINTERPRETATIONEXCEPTIONS: return "_ObservationInterpretationExceptions"; + case LESS_THAN: return "<"; + case GREATER_THAN: return ">"; + case AC: return "AC"; + case IE: return "IE"; + case QCF: return "QCF"; + case TOX: return "TOX"; + case _OBSERVATIONINTERPRETATIONNORMALITY: return "_ObservationInterpretationNormality"; + case A: return "A"; + case AA: return "AA"; + case HH: return "HH"; + case LL: return "LL"; + case H: return "H"; + case H_: return "H>"; + case HU: return "HU"; + case L: return "L"; + case L_: return "L<"; + case LU: return "LU"; + case N: return "N"; + case _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY: return "_ObservationInterpretationSusceptibility"; + case I: return "I"; + case MS: return "MS"; + case NS: return "NS"; + case R: return "R"; + case SYNR: return "SYN-R"; + case S: return "S"; + case SDD: return "SDD"; + case SYNS: return "SYN-S"; + case VS: return "VS"; + case EX: return "EX"; + case HX: return "HX"; + case LX: return "LX"; + case HM: return "HM"; + case OBSERVATIONINTERPRETATIONDETECTION: return "ObservationInterpretationDetection"; + case IND: return "IND"; + case E: return "E"; + case NEG: return "NEG"; + case ND: return "ND"; + case POS: return "POS"; + case DET: return "DET"; + case OBSERVATIONINTERPRETATIONEXPECTATION: return "ObservationInterpretationExpectation"; + case EXP: return "EXP"; + case UNE: return "UNE"; + case OBX: return "OBX"; + case REACTIVITYOBSERVATIONINTERPRETATION: return "ReactivityObservationInterpretation"; + case NR: return "NR"; + case RR: return "RR"; + case WR: return "WR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ObservationInterpretation"; + } + public String getDefinition() { + switch (this) { + case _GENETICOBSERVATIONINTERPRETATION: return "Codes that specify interpretation of genetic analysis, such as \"positive\", \"negative\", \"carrier\", \"responsive\", etc."; + case CAR: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder."; + case CARRIER: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This code is currently the same string as the print name for this concept and is inconsistent with the conventions being used for the other codes in the coding system, as it is a full word with initial capitalization, rather than an all upper case mnemonic. The recommendation from OO is to deprecate the code \"Carrier\" and to add \"CAR\" as the new active code representation for this concept."; + case _OBSERVATIONINTERPRETATIONCHANGE: return "Interpretations of change of quantity and/or severity. At most one of B or W and one of U or D allowed."; + case B: return "The current result or observation value has improved compared to the previous result or observation value (the change is significant as defined in the respective test procedure).\r\n\n [Note: This can be applied to quantitative or qualitative observations.]"; + case D: return "The current result has decreased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure)."; + case U: return "The current result has increased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure)."; + case W: return "The current result or observation value has degraded compared to the previous result or observation value (the change is significant as defined in the respective test procedure).\r\n\n [Note: This can be applied to quantitative or qualitative observations.]"; + case _OBSERVATIONINTERPRETATIONEXCEPTIONS: return "Technical exceptions resulting in the inability to provide an interpretation. At most one allowed. Does not imply normality or severity."; + case LESS_THAN: return "The result is below the minimum detection limit (the test procedure or equipment is the limiting factor).\r\n\n Synonyms: Below analytical limit, low off scale."; + case GREATER_THAN: return "The result is above the maximum quantifiable limit (the test procedure or equipment is the limiting factor).\r\n\n Synonyms: Above analytical limit, high off scale."; + case AC: return "A valid result cannot be obtained for the specified component / analyte due to the presence of anti-complementary substances in the sample.\r\n\n \n \n Deprecation Comment: \n This code is being deprecated to match the status in V2 Table 0078 \"Interpretation Codes."; + case IE: return "There is insufficient evidence that the species in question is a good target for therapy with the drug. A categorical interpretation is not possible.\r\n\n [Note: A MIC with \"IE\" and/or a comment may be reported (without an accompanying S, I or R-categorization).]"; + case QCF: return "A result cannot be considered valid for the specified component / analyte or organism due to failure in the quality control testing component.\r\n\n \n \n Deprecation Comment: \n This code is being deprecated to match the status in V2 Table 0078 \"Interpretation Codes."; + case TOX: return "A valid result cannot be obtained for the specified organism or cell line due to the presence of cytotoxic substances in the sample or culture.\r\n\n \n \n Deprecation Comment: \n This code is being deprecated to match the status in V2 Table 0078 \"Interpretation Codes."; + case _OBSERVATIONINTERPRETATIONNORMALITY: return "Interpretation of normality or degree of abnormality (including critical or \"alert\" level). Concepts in this category are mutually exclusive, i.e., at most one is allowed."; + case A: return "The result or observation value is outside the reference range or expected norm (as defined for the respective test procedure).\r\n\n [Note: Typically applies to non-numeric results.]"; + case AA: return "The result or observation value is outside a reference range or expected norm at a level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n [Note: Typically applies to non-numeric results. Analogous to critical/panic limits for numeric results.]"; + case HH: return "The result for a quantitative observation is above a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n Synonym: Above upper panic limits."; + case LL: return "The result for a quantitative observation is below a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n Synonym: Below lower panic limits."; + case H: return "The result for a quantitative observation is above the upper limit of the reference range (as defined for the respective test procedure).\r\n\n Synonym: Above high normal"; + case H_: return "A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'H' and 'HH'.]\r\n\n \n Deprecation Comment: The code 'H>' is being deprecated in order to align with the use of the code 'HU' for \"Very high\" in V2 Table 0078 \"Interpretation Codes\".\r\n\n [Note: The use of code 'H>' is non-preferred, as this code is deprecated and on track to be retired; use code 'HU' instead."; + case HU: return "A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician."; + case L: return "The result for a quantitative observation is below the lower limit of the reference range (as defined for the respective test procedure).\r\n\n Synonym: Below low normal"; + case L_: return "A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'L' and 'LL'.]\r\n\n \n Deprecation Comment: The code 'L<' is being deprecated in order to align with the use of the code 'LU' for \"Very low\" in V2 Table 0078 \"Interpretation Codes\".\r\n\n [Note: The use of code 'L<' is non-preferred, as this code is deprecated and on track to be retired; use code 'LU' instead."; + case LU: return "A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician."; + case N: return "The result or observation value is within the reference range or expected norm (as defined for the respective test procedure).\r\n\n [Note: Applies to numeric or non-numeric results.]"; + case _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY: return "Interpretations of anti-microbial susceptibility testing results (microbiology). At most one allowed."; + case I: return "Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with uncertain therapeutic effect. Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm)\nProjects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as intermediate by applying the appropriate breakpoints in a defined phenotypic test system.]\r\n\n [Note 2: This class of susceptibility implies that an infection due to the isolate can be appropriately treated in body sites where the drugs are physiologically concentrated or when a high dosage of drug can be used.]\r\n\n [Note 3: This class also indicates a \"buffer zone,\" to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.]\r\n\n [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"; + case MS: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012)."; + case NS: return "A category used for isolates for which only a susceptible interpretive criterion has been designated because of the absence or rare occurrence of resistant strains. Isolates that have MICs above or zone diameters below the value indicated for the susceptible breakpoint should be reported as non-susceptible.\r\n\n NOTE 1: An isolate that is interpreted as non-susceptible does not necessarily mean that the isolate has a resistance mechanism. It is possible that isolates with MICs above the susceptible breakpoint that lack resistance mechanisms may be encountered within the wild-type distribution subsequent to the time the susceptible-only breakpoint is set. \r\n\n NOTE 2: For strains yielding results in the \"nonsusceptible\" category, organism identification and antimicrobial susceptibility test results should be confirmed.\r\n\n Synonym: decreased susceptibility."; + case R: return "Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic failure.\nReference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) \nProjects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.]\r\n\n [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"; + case SYNR: return "A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective. \r\n\n \n Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside.\r\n\n \n Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found."; + case S: return "Bacterial strain inhibited by in vitro concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic success.\nReference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm)\nSynonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as susceptible by applying the appropriate breakpoints in a defined phenotypic system.]\r\n\n [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]"; + case SDD: return "A category that includes isolates with antimicrobial agent minimum inhibitory concentrations (MICs) that approach usually attainable blood and tissue levels and for which response rates may be lower than for susceptible isolates.\r\n\n Reference: CLSI document M44-A2 2009 \"Method for antifungal disk diffusion susceptibility testing of yeasts; approved guideline - second edition\" - page 2."; + case SYNS: return "A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective. \r\n\n \n Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside.\r\n\n \n Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found."; + case VS: return "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012)."; + case EX: return "The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported.\n\r\n\n Example: A positive result on a Hepatitis screening test.\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects.\nThese concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal \"030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455\". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes.\nMembers of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."; + case HX: return "The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported.\n\r\n\n Example: A positive result on a Hepatitis screening test.\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal \"030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455\". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."; + case LX: return "The numeric observation/test result is interpreted as being below the low threshold value for a particular protocol within which the result is being reported.\r\n\n Example: A Total White Blood Cell Count falling below a protocol-defined threshold value of 3000/mm^3\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal \"030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455\". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held."; + case HM: return "Hold for Medical Review\r\n\n \n Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 \"Interpretation Codes.\""; + case OBSERVATIONINTERPRETATIONDETECTION: return "Interpretations of the presence or absence of a component / analyte or organism in a test or of a sign in a clinical observation. In keeping with laboratory data processing practice, these concepts provide a categorical interpretation of the \"meaning\" of the quantitative value for the same observation."; + case IND: return "The specified component / analyte, organism or clinical sign could neither be declared positive / negative nor detected / not detected by the performed test or procedure.\r\n\n \n Usage Note: For example, if the specimen was degraded, poorly processed, or was missing the required anatomic structures, then \"indeterminate\" (i.e. \"cannot be determined\") is the appropriate response, not \"equivocal\"."; + case E: return "The test or procedure was successfully performed, but the results are borderline and can neither be declared positive / negative nor detected / not detected according to the current established criteria."; + case NEG: return "An absence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure.\r\n\n [Note: Negative does not necessarily imply the complete absence of the specified item.]"; + case ND: return "The presence of the specified component / analyte, organism or clinical sign could not be determined within the limit of detection of the performed test or procedure."; + case POS: return "A presence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure."; + case DET: return "The measurement of the specified component / analyte, organism or clinical sign above the limit of detection of the performed test or procedure."; + case OBSERVATIONINTERPRETATIONEXPECTATION: return "Interpretation of the observed result taking into account additional information (contraindicators) about the patient's situation. Concepts in this category are mutually exclusive, i.e., at most one is allowed."; + case EXP: return "This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be \"Expected\" (e.g., presence of drugs in a patient that is taking prescription medication for pain management)."; + case UNE: return "This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be \"Unexpected\" (e.g., presence of non-prescribed drugs in a patient that is taking prescription medication for pain management)."; + case OBX: return "Interpretation qualifiers in separate OBX segments\r\n\n \n Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 \"Interpretation Codes.\""; + case REACTIVITYOBSERVATIONINTERPRETATION: return "Interpretations of the presence and level of reactivity of the specified component / analyte with the reagent in the performed laboratory test."; + case NR: return "An absence finding used to indicate that the specified component / analyte did not react measurably with the reagent."; + case RR: return "A presence finding used to indicate that the specified component / analyte reacted with the reagent above the reliably measurable limit of the performed test."; + case WR: return "A weighted presence finding used to indicate that the specified component / analyte reacted with the reagent, but below the reliably measurable limit of the performed test."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _GENETICOBSERVATIONINTERPRETATION: return "GeneticObservationInterpretation"; + case CAR: return "Carrier"; + case CARRIER: return "Carrier"; + case _OBSERVATIONINTERPRETATIONCHANGE: return "ObservationInterpretationChange"; + case B: return "Better"; + case D: return "Significant change down"; + case U: return "Significant change up"; + case W: return "Worse"; + case _OBSERVATIONINTERPRETATIONEXCEPTIONS: return "ObservationInterpretationExceptions"; + case LESS_THAN: return "Off scale low"; + case GREATER_THAN: return "Off scale high"; + case AC: return "Anti-complementary substances present"; + case IE: return "Insufficient evidence"; + case QCF: return "Quality control failure"; + case TOX: return "Cytotoxic substance present"; + case _OBSERVATIONINTERPRETATIONNORMALITY: return "ObservationInterpretationNormality"; + case A: return "Abnormal"; + case AA: return "Critical abnormal"; + case HH: return "Critical high"; + case LL: return "Critical low"; + case H: return "High"; + case H_: return "Significantly high"; + case HU: return "Significantly high"; + case L: return "Low"; + case L_: return "Significantly low"; + case LU: return "Significantly low"; + case N: return "Normal"; + case _OBSERVATIONINTERPRETATIONSUSCEPTIBILITY: return "ObservationInterpretationSusceptibility"; + case I: return "Intermediate"; + case MS: return "moderately susceptible"; + case NS: return "Non-susceptible"; + case R: return "Resistant"; + case SYNR: return "Synergy - resistant"; + case S: return "Susceptible"; + case SDD: return "Susceptible-dose dependent"; + case SYNS: return "Synergy - susceptible"; + case VS: return "very susceptible"; + case EX: return "outside threshold"; + case HX: return "above high threshold"; + case LX: return "below low threshold"; + case HM: return "Hold for Medical Review"; + case OBSERVATIONINTERPRETATIONDETECTION: return "ObservationInterpretationDetection"; + case IND: return "Indeterminate"; + case E: return "Equivocal"; + case NEG: return "Negative"; + case ND: return "Not detected"; + case POS: return "Positive"; + case DET: return "Detected"; + case OBSERVATIONINTERPRETATIONEXPECTATION: return "ObservationInterpretationExpectation"; + case EXP: return "Expected"; + case UNE: return "Unexpected"; + case OBX: return "Interpretation qualifiers in separate OBX segments"; + case REACTIVITYOBSERVATIONINTERPRETATION: return "ReactivityObservationInterpretation"; + case NR: return "Non-reactive"; + case RR: return "Reactive"; + case WR: return "Weakly reactive"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationInterpretationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationInterpretationEnumFactory.java new file mode 100644 index 00000000000..8cad71ccfe5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationInterpretationEnumFactory.java @@ -0,0 +1,278 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ObservationInterpretationEnumFactory implements EnumFactory { + + public V3ObservationInterpretation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_GeneticObservationInterpretation".equals(codeString)) + return V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION; + if ("CAR".equals(codeString)) + return V3ObservationInterpretation.CAR; + if ("Carrier".equals(codeString)) + return V3ObservationInterpretation.CARRIER; + if ("_ObservationInterpretationChange".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE; + if ("B".equals(codeString)) + return V3ObservationInterpretation.B; + if ("D".equals(codeString)) + return V3ObservationInterpretation.D; + if ("U".equals(codeString)) + return V3ObservationInterpretation.U; + if ("W".equals(codeString)) + return V3ObservationInterpretation.W; + if ("_ObservationInterpretationExceptions".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS; + if ("<".equals(codeString)) + return V3ObservationInterpretation.LESS_THAN; + if (">".equals(codeString)) + return V3ObservationInterpretation.GREATER_THAN; + if ("AC".equals(codeString)) + return V3ObservationInterpretation.AC; + if ("IE".equals(codeString)) + return V3ObservationInterpretation.IE; + if ("QCF".equals(codeString)) + return V3ObservationInterpretation.QCF; + if ("TOX".equals(codeString)) + return V3ObservationInterpretation.TOX; + if ("_ObservationInterpretationNormality".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY; + if ("A".equals(codeString)) + return V3ObservationInterpretation.A; + if ("AA".equals(codeString)) + return V3ObservationInterpretation.AA; + if ("HH".equals(codeString)) + return V3ObservationInterpretation.HH; + if ("LL".equals(codeString)) + return V3ObservationInterpretation.LL; + if ("H".equals(codeString)) + return V3ObservationInterpretation.H; + if ("H>".equals(codeString)) + return V3ObservationInterpretation.H_; + if ("HU".equals(codeString)) + return V3ObservationInterpretation.HU; + if ("L".equals(codeString)) + return V3ObservationInterpretation.L; + if ("L<".equals(codeString)) + return V3ObservationInterpretation.L_; + if ("LU".equals(codeString)) + return V3ObservationInterpretation.LU; + if ("N".equals(codeString)) + return V3ObservationInterpretation.N; + if ("_ObservationInterpretationSusceptibility".equals(codeString)) + return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY; + if ("I".equals(codeString)) + return V3ObservationInterpretation.I; + if ("MS".equals(codeString)) + return V3ObservationInterpretation.MS; + if ("NS".equals(codeString)) + return V3ObservationInterpretation.NS; + if ("R".equals(codeString)) + return V3ObservationInterpretation.R; + if ("SYN-R".equals(codeString)) + return V3ObservationInterpretation.SYNR; + if ("S".equals(codeString)) + return V3ObservationInterpretation.S; + if ("SDD".equals(codeString)) + return V3ObservationInterpretation.SDD; + if ("SYN-S".equals(codeString)) + return V3ObservationInterpretation.SYNS; + if ("VS".equals(codeString)) + return V3ObservationInterpretation.VS; + if ("EX".equals(codeString)) + return V3ObservationInterpretation.EX; + if ("HX".equals(codeString)) + return V3ObservationInterpretation.HX; + if ("LX".equals(codeString)) + return V3ObservationInterpretation.LX; + if ("HM".equals(codeString)) + return V3ObservationInterpretation.HM; + if ("ObservationInterpretationDetection".equals(codeString)) + return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION; + if ("IND".equals(codeString)) + return V3ObservationInterpretation.IND; + if ("E".equals(codeString)) + return V3ObservationInterpretation.E; + if ("NEG".equals(codeString)) + return V3ObservationInterpretation.NEG; + if ("ND".equals(codeString)) + return V3ObservationInterpretation.ND; + if ("POS".equals(codeString)) + return V3ObservationInterpretation.POS; + if ("DET".equals(codeString)) + return V3ObservationInterpretation.DET; + if ("ObservationInterpretationExpectation".equals(codeString)) + return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION; + if ("EXP".equals(codeString)) + return V3ObservationInterpretation.EXP; + if ("UNE".equals(codeString)) + return V3ObservationInterpretation.UNE; + if ("OBX".equals(codeString)) + return V3ObservationInterpretation.OBX; + if ("ReactivityObservationInterpretation".equals(codeString)) + return V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION; + if ("NR".equals(codeString)) + return V3ObservationInterpretation.NR; + if ("RR".equals(codeString)) + return V3ObservationInterpretation.RR; + if ("WR".equals(codeString)) + return V3ObservationInterpretation.WR; + throw new IllegalArgumentException("Unknown V3ObservationInterpretation code '"+codeString+"'"); + } + + public String toCode(V3ObservationInterpretation code) { + if (code == V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION) + return "_GeneticObservationInterpretation"; + if (code == V3ObservationInterpretation.CAR) + return "CAR"; + if (code == V3ObservationInterpretation.CARRIER) + return "Carrier"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE) + return "_ObservationInterpretationChange"; + if (code == V3ObservationInterpretation.B) + return "B"; + if (code == V3ObservationInterpretation.D) + return "D"; + if (code == V3ObservationInterpretation.U) + return "U"; + if (code == V3ObservationInterpretation.W) + return "W"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS) + return "_ObservationInterpretationExceptions"; + if (code == V3ObservationInterpretation.LESS_THAN) + return "<"; + if (code == V3ObservationInterpretation.GREATER_THAN) + return ">"; + if (code == V3ObservationInterpretation.AC) + return "AC"; + if (code == V3ObservationInterpretation.IE) + return "IE"; + if (code == V3ObservationInterpretation.QCF) + return "QCF"; + if (code == V3ObservationInterpretation.TOX) + return "TOX"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY) + return "_ObservationInterpretationNormality"; + if (code == V3ObservationInterpretation.A) + return "A"; + if (code == V3ObservationInterpretation.AA) + return "AA"; + if (code == V3ObservationInterpretation.HH) + return "HH"; + if (code == V3ObservationInterpretation.LL) + return "LL"; + if (code == V3ObservationInterpretation.H) + return "H"; + if (code == V3ObservationInterpretation.H_) + return "H>"; + if (code == V3ObservationInterpretation.HU) + return "HU"; + if (code == V3ObservationInterpretation.L) + return "L"; + if (code == V3ObservationInterpretation.L_) + return "L<"; + if (code == V3ObservationInterpretation.LU) + return "LU"; + if (code == V3ObservationInterpretation.N) + return "N"; + if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY) + return "_ObservationInterpretationSusceptibility"; + if (code == V3ObservationInterpretation.I) + return "I"; + if (code == V3ObservationInterpretation.MS) + return "MS"; + if (code == V3ObservationInterpretation.NS) + return "NS"; + if (code == V3ObservationInterpretation.R) + return "R"; + if (code == V3ObservationInterpretation.SYNR) + return "SYN-R"; + if (code == V3ObservationInterpretation.S) + return "S"; + if (code == V3ObservationInterpretation.SDD) + return "SDD"; + if (code == V3ObservationInterpretation.SYNS) + return "SYN-S"; + if (code == V3ObservationInterpretation.VS) + return "VS"; + if (code == V3ObservationInterpretation.EX) + return "EX"; + if (code == V3ObservationInterpretation.HX) + return "HX"; + if (code == V3ObservationInterpretation.LX) + return "LX"; + if (code == V3ObservationInterpretation.HM) + return "HM"; + if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION) + return "ObservationInterpretationDetection"; + if (code == V3ObservationInterpretation.IND) + return "IND"; + if (code == V3ObservationInterpretation.E) + return "E"; + if (code == V3ObservationInterpretation.NEG) + return "NEG"; + if (code == V3ObservationInterpretation.ND) + return "ND"; + if (code == V3ObservationInterpretation.POS) + return "POS"; + if (code == V3ObservationInterpretation.DET) + return "DET"; + if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION) + return "ObservationInterpretationExpectation"; + if (code == V3ObservationInterpretation.EXP) + return "EXP"; + if (code == V3ObservationInterpretation.UNE) + return "UNE"; + if (code == V3ObservationInterpretation.OBX) + return "OBX"; + if (code == V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION) + return "ReactivityObservationInterpretation"; + if (code == V3ObservationInterpretation.NR) + return "NR"; + if (code == V3ObservationInterpretation.RR) + return "RR"; + if (code == V3ObservationInterpretation.WR) + return "WR"; + return "?"; + } + + public String toSystem(V3ObservationInterpretation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationMethod.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationMethod.java new file mode 100644 index 00000000000..bf3a608c7bd --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationMethod.java @@ -0,0 +1,2821 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ObservationMethod { + + /** + * Provides codes for decision methods, initially for assessing the causality of events. + */ + _DECISIONOBSERVATIONMETHOD, + /** + * Reaching a decision through the application of an algorithm designed to weigh the different factors involved. + */ + ALGM, + /** + * Reaching a decision through the use of Bayesian statistical analysis. + */ + BYCL, + /** + * Reaching a decision by consideration of the totality of factors involved in order to reach a judgement. + */ + GINT, + /** + * A code that provides additional detail about the means or technique used to ascertain the genetic analysis. Example, PCR, Micro Array + */ + _GENETICOBSERVATIONMETHOD, + /** + * Description: Polymerase Chain Reaction + */ + PCR, + /** + * Provides additional detail about the aggregation methods used to compute the aggregated values for an observation. This is an abstract code. + */ + _OBSERVATIONMETHODAGGREGATE, + /** + * Average of non-null values in the referenced set of values + */ + AVERAGE, + /** + * Count of non-null values in the referenced set of values + */ + COUNT, + /** + * Largest of all non-null values in the referenced set of values. + */ + MAX, + /** + * The median of all non-null values in the referenced set of values. + */ + MEDIAN, + /** + * Smallest of all non-null values in the referenced set of values. + */ + MIN, + /** + * The most common value of all non-null values in the referenced set of values. + */ + MODE, + /** + * Standard Deviation of the values in the referenced set of values, computed over the population. + */ + STDEV_P, + /** + * Standard Deviation of the values in the referenced set of values, computed over a sample of the population. + */ + STDEV_S, + /** + * Sum of non-null values in the referenced set of values + */ + SUM, + /** + * Variance of the values in the referenced set of values, computed over the population. + */ + VARIANCE_P, + /** + * Variance of the values in the referenced set of values, computed over a sample of the population. + */ + VARIANCE_S, + /** + * VerificationMethod + */ + _VERIFICATIONMETHOD, + /** + * Verification by means of document. + + + Example: Fax, letter, attachment to e-mail. + */ + VDOC, + /** + * verification by means of a response to an electronic query + + + Example: query message to a Covered Party registry application or Coverage Administrator. + */ + VREG, + /** + * Verification by means of electronic token. + + + Example: smartcard, magnetic swipe card, RFID device. + */ + VTOKEN, + /** + * Verification by means of voice. + + + Example: By speaking with or calling the Coverage Administrator or Covered Party + */ + VVOICE, + /** + * Complement fixation + */ + _0001, + /** + * Computed axial tomography + */ + _0002, + /** + * Susceptibility, High Level Aminoglycoside Resistance agar test + */ + _0003, + /** + * Visual, Macroscopic observation + */ + _0004, + /** + * Computed, Magnetic resonance + */ + _0005, + /** + * Computed, Morphometry + */ + _0006, + /** + * Computed, Positron emission tomography + */ + _0007, + /** + * SAMHSA drug assay confirmation + */ + _0008, + /** + * SAMHSA drug assay screening + */ + _0009, + /** + * Serum Neutralization + */ + _0010, + /** + * Titration + */ + _0011, + /** + * Ultrasound + */ + _0012, + /** + * X-ray crystallography + */ + _0013, + /** + * Agglutination + */ + _0014, + /** + * Agglutination, Buffered acidified plate + */ + _0015, + /** + * Agglutination, Card + */ + _0016, + /** + * Agglutination, Hemagglutination + */ + _0017, + /** + * Agglutination, Hemagglutination inhibition + */ + _0018, + /** + * Agglutination, Latex + */ + _0019, + /** + * Agglutination, Plate + */ + _0020, + /** + * Agglutination, Rapid Plate + */ + _0021, + /** + * Agglutination, RBC + */ + _0022, + /** + * Agglutination, Rivanol + */ + _0023, + /** + * Agglutination, Tube + */ + _0024, + /** + * Bioassay + */ + _0025, + /** + * Bioassay, Animal Inoculation + */ + _0026, + /** + * Bioassay, Cytotoxicity + */ + _0027, + /** + * Bioassay, Embryo Infective Dose 50 + */ + _0028, + /** + * Bioassay, Embryo Lethal Dose 50 + */ + _0029, + /** + * Bioassay, Mouse intercerebral inoculation + */ + _0030, + /** + * Bioassay, qualitative + */ + _0031, + /** + * Bioassay, quantitative + */ + _0032, + /** + * Chemical + */ + _0033, + /** + * Chemical, Differential light absorption + */ + _0034, + /** + * Chemical, Dipstick + */ + _0035, + /** + * Chemical, Dipstick colorimetric laboratory test + */ + _0036, + /** + * Chemical, Test strip + */ + _0037, + /** + * Chromatography + */ + _0038, + /** + * Chromatography, Affinity + */ + _0039, + /** + * Chromatography, Gas liquid + */ + _0040, + /** + * Chromatography, High performance liquid + */ + _0041, + /** + * Chromatography, Liquid + */ + _0042, + /** + * Chromatography, Protein A affinity + */ + _0043, + /** + * Coagulation + */ + _0044, + /** + * Coagulation, Tilt tube + */ + _0045, + /** + * Coagulation, Tilt tube reptilase induced + */ + _0046, + /** + * Count, Automated + */ + _0047, + /** + * Count, Manual + */ + _0048, + /** + * Count, Platelet, Rees-Ecker + */ + _0049, + /** + * Culture, Aerobic + */ + _0050, + /** + * Culture, Anaerobic + */ + _0051, + /** + * Culture, Chicken Embryo + */ + _0052, + /** + * Culture, Delayed secondary enrichment + */ + _0053, + /** + * Culture, Microaerophilic + */ + _0054, + /** + * Culture, Quantitative microbial, cup + */ + _0055, + /** + * Culture, Quantitative microbial, droplet + */ + _0056, + /** + * Culture, Quantitative microbial, filter paper + */ + _0057, + /** + * Culture, Quantitative microbial, pad + */ + _0058, + /** + * Culture, Quantitative microbial, pour plate + */ + _0059, + /** + * Culture, Quantitative microbial, surface streak + */ + _0060, + /** + * Culture, Somatic Cell + */ + _0061, + /** + * Diffusion, Agar + */ + _0062, + /** + * Diffusion, Agar Gel Immunodiffusion + */ + _0063, + /** + * Electrophoresis + */ + _0064, + /** + * Electrophoresis, Agaorse gel + */ + _0065, + /** + * Electrophoresis, citrate agar + */ + _0066, + /** + * Electrophoresis, Immuno + */ + _0067, + /** + * Electrophoresis, Polyacrylamide gel + */ + _0068, + /** + * Electrophoresis, Starch gel + */ + _0069, + /** + * ELISA + */ + _0070, + /** + * ELISA, antigen capture + */ + _0071, + /** + * ELISA, avidin biotin peroxidase complex + */ + _0072, + /** + * ELISA, Kinetic + */ + _0073, + /** + * ELISA, peroxidase-antiperoxidase + */ + _0074, + /** + * Identification, API 20 Strep + */ + _0075, + /** + * Identification, API 20A + */ + _0076, + /** + * Identification, API 20C AUX + */ + _0077, + /** + * Identification, API 20E + */ + _0078, + /** + * Identification, API 20NE + */ + _0079, + /** + * Identification, API 50 CH + */ + _0080, + /** + * Identification, API An-IDENT + */ + _0081, + /** + * Identification, API Coryne + */ + _0082, + /** + * Identification, API Rapid 20E + */ + _0083, + /** + * Identification, API Staph + */ + _0084, + /** + * Identification, API ZYM + */ + _0085, + /** + * Identification, Bacterial + */ + _0086, + /** + * Identification, mini VIDAS + */ + _0087, + /** + * Identification, Phage susceptibility typing + */ + _0088, + /** + * Identification, Quad-FERM+ + */ + _0089, + /** + * Identification, RAPIDEC Staph + */ + _0090, + /** + * Identification, Staphaurex + */ + _0091, + /** + * Identification, VIDAS + */ + _0092, + /** + * Identification, Vitek + */ + _0093, + /** + * Identification, VITEK 2 + */ + _0094, + /** + * Immune stain + */ + _0095, + /** + * Immune stain, Immunofluorescent antibody, direct + */ + _0096, + /** + * Immune stain, Immunofluorescent antibody, indirect + */ + _0097, + /** + * Immune stain, Immunoperoxidase, Avidin-Biotin Complex + */ + _0098, + /** + * Immune stain, Immunoperoxidase, Peroxidase anti-peroxidase complex + */ + _0099, + /** + * Immune stain, Immunoperoxidase, Protein A-peroxidase complex + */ + _0100, + /** + * Immunoassay + */ + _0101, + /** + * Immunoassay, qualitative, multiple step + */ + _0102, + /** + * Immunoassay, qualitative, single step + */ + _0103, + /** + * Immunoassay, Radioimmunoassay + */ + _0104, + /** + * Immunoassay, semi-quantitative, multiple step + */ + _0105, + /** + * Immunoassay, semi-quantitative, single step + */ + _0106, + /** + * Microscopy + */ + _0107, + /** + * Microscopy, Darkfield + */ + _0108, + /** + * Microscopy, Electron + */ + _0109, + /** + * Microscopy, Electron microscopy tomography + */ + _0110, + /** + * Microscopy, Electron, negative stain + */ + _0111, + /** + * Microscopy, Electron, thick section transmission + */ + _0112, + /** + * Microscopy, Electron, thin section transmission + */ + _0113, + /** + * Microscopy, Light + */ + _0114, + /** + * Microscopy, Polarized light + */ + _0115, + /** + * Microscopy, Scanning electron + */ + _0116, + /** + * Microscopy, Transmission electron + */ + _0117, + /** + * Microscopy, Transparent tape direct examination + */ + _0118, + /** + * Molecular, 3 Self-Sustaining Sequence Replication + */ + _0119, + /** + * Molecular, Branched Chain DNA + */ + _0120, + /** + * Molecular, Hybridization Protection Assay + */ + _0121, + /** + * Molecular, Immune blot + */ + _0122, + /** + * Molecular, In-situ hybridization + */ + _0123, + /** + * Molecular, Ligase Chain Reaction + */ + _0124, + /** + * Molecular, Ligation Activated Transcription + */ + _0125, + /** + * Molecular, Nucleic Acid Probe + */ + _0126, + /** + * Molecular, Nucleic acid probe with amplification + + + + Rationale: Duplicate of code 0126. Use code 0126 instead. + */ + _0128, + /** + * Molecular, Nucleic acid probe with target amplification + */ + _0129, + /** + * Molecular, Nucleic acid reverse transcription + */ + _0130, + /** + * Molecular, Nucleic Acid Sequence Based Analysis + */ + _0131, + /** + * Molecular, Polymerase chain reaction + */ + _0132, + /** + * Molecular, Q-Beta Replicase or probe amplification category method + */ + _0133, + /** + * Molecular, Restriction Fragment Length Polymorphism + */ + _0134, + /** + * Molecular, Southern Blot + */ + _0135, + /** + * Molecular, Strand Displacement Amplification + */ + _0136, + /** + * Molecular, Transcription Mediated Amplification + */ + _0137, + /** + * Molecular, Western Blot + */ + _0138, + /** + * Precipitation, Flocculation + */ + _0139, + /** + * Precipitation, Immune precipitation + */ + _0140, + /** + * Precipitation, Milk ring test + */ + _0141, + /** + * Precipitation, Precipitin + */ + _0142, + /** + * Stain, Acid fast + */ + _0143, + /** + * Stain, Acid fast, fluorochrome + */ + _0144, + /** + * Stain, Acid fast, Kinyoun's cold carbolfuchsin + */ + _0145, + /** + * Stain, Acid fast, Ziehl-Neelsen + */ + _0146, + /** + * Stain, Acid phosphatase + */ + _0147, + /** + * Stain, Acridine orange + */ + _0148, + /** + * Stain, Active brilliant orange KH + */ + _0149, + /** + * Stain, Alazarin red S + */ + _0150, + /** + * Stain, Alcian blue + */ + _0151, + /** + * Stain, Alcian blue with Periodic acid Schiff + */ + _0152, + /** + * Stain, Argentaffin + */ + _0153, + /** + * Stain, Argentaffin silver + */ + _0154, + /** + * Stain, Azure-eosin + */ + _0155, + /** + * Stain, Basic Fuschin + */ + _0156, + /** + * Stain, Bennhold + */ + _0157, + /** + * Stain, Bennhold's Congo red + */ + _0158, + /** + * Stain, Bielschowsky + */ + _0159, + /** + * Stain, Bielschowsky's silver + */ + _0160, + /** + * Stain, Bleach + */ + _0161, + /** + * Stain, Bodian + */ + _0162, + /** + * Stain, Brown-Brenn + */ + _0163, + /** + * Stain, Butyrate-esterase + */ + _0164, + /** + * Stain, Calcofluor white fluorescent + */ + _0165, + /** + * Stain, Carbol-fuchsin + */ + _0166, + /** + * Stain, Carmine + */ + _0167, + /** + * Stain, Churukian-Schenk + */ + _0168, + /** + * Stain, Congo red + */ + _0169, + /** + * Stain, Cresyl echt violet + */ + _0170, + /** + * Stain, Crystal violet + */ + _0171, + /** + * Stain, De Galantha + */ + _0172, + /** + * Stain, Dieterle silver impregnation + */ + _0173, + /** + * Stain, Fite-Farco + */ + _0174, + /** + * Stain, Fontana-Masson silver + */ + _0175, + /** + * Stain, Fouchet + */ + _0176, + /** + * Stain, Gomori + */ + _0177, + /** + * Stain, Gomori methenamine silver + */ + _0178, + /** + * Stain, Gomori-Wheatly trichrome + */ + _0179, + /** + * Stain, Gridley + */ + _0180, + /** + * Stain, Grimelius silver + */ + _0181, + /** + * Stain, Grocott + */ + _0182, + /** + * Stain, Grocott methenamine silver + */ + _0183, + /** + * Stain, Hale's colloidal ferric oxide + */ + _0184, + /** + * Stain, Hale's colloidal iron + */ + _0185, + /** + * Stain, Hansel + */ + _0186, + /** + * Stain, Harris regressive hematoxylin and eosin + */ + _0187, + /** + * Stain, Hematoxylin and eosin + */ + _0188, + /** + * Stain, Highman + */ + _0189, + /** + * Stain, Holzer + */ + _0190, + /** + * Stain, Iron hematoxylin + */ + _0191, + /** + * Stain, Jones + */ + _0192, + /** + * Stain, Jones methenamine silver + */ + _0193, + /** + * Stain, Kossa + */ + _0194, + /** + * Stain, Lawson-Van Gieson + */ + _0195, + /** + * Stain, Loeffler methylene blue + */ + _0196, + /** + * Stain, Luxol fast blue with cresyl violet + */ + _0197, + /** + * Stain, Luxol fast blue with Periodic acid-Schiff + */ + _0198, + /** + * Stain, MacNeal's tetrachrome blood + */ + _0199, + /** + * Stain, Mallory-Heidenhain + */ + _0200, + /** + * Stain, Masson trichrome + */ + _0201, + /** + * Stain, Mayer mucicarmine + */ + _0202, + /** + * Stain, Mayers progressive hematoxylin and eosin + */ + _0203, + /** + * Stain, May-Grunwald Giemsa + */ + _0204, + /** + * Stain, Methyl green + */ + _0205, + /** + * Stain, Methyl green pyronin + */ + _0206, + /** + * Stain, Modified Gomori-Wheatly trichrome + */ + _0207, + /** + * Stain, Modified Masson trichrome + */ + _0208, + /** + * Stain, Modified trichrome + */ + _0209, + /** + * Stain, Movat pentachrome + */ + _0210, + /** + * Stain, Mucicarmine + */ + _0211, + /** + * Stain, Neutral red + */ + _0212, + /** + * Stain, Night blue + */ + _0213, + /** + * Stain, Non-specific esterase + */ + _0214, + /** + * Stain, Oil red-O + */ + _0215, + /** + * Stain, Orcein + */ + _0216, + /** + * Stain, Perls' + */ + _0217, + /** + * Stain, Phosphotungstic acid-hematoxylin + */ + _0218, + /** + * Stain, Potassium ferrocyanide + */ + _0219, + /** + * Stain, Prussian blue + */ + _0220, + /** + * Stain, Putchler modified Bennhold + */ + _0221, + /** + * Stain, Quinacrine fluorescent + */ + _0222, + /** + * Stain, Reticulin + */ + _0223, + /** + * Stain, Rhodamine + */ + _0224, + /** + * Stain, Safranin + */ + _0225, + /** + * Stain, Schmorl + */ + _0226, + /** + * Stain, Seiver-Munger + */ + _0227, + /** + * Stain, Silver + */ + _0228, + /** + * Stain, Specific esterase + */ + _0229, + /** + * Stain, Steiner silver + */ + _0230, + /** + * Stain, Sudan III + */ + _0231, + /** + * Stain, Sudan IVI + */ + _0232, + /** + * Stain, Sulfated alcian blue + */ + _0233, + /** + * Stain, Supravital + */ + _0234, + /** + * Stain, Thioflavine-S + */ + _0235, + /** + * Stain, Three micron Giemsa + */ + _0236, + /** + * Stain, Vassar-Culling + */ + _0237, + /** + * Stain, Vital + */ + _0238, + /** + * Stain, von Kossa + */ + _0239, + /** + * Susceptibility, Minimum bactericidal concentration, macrodilution + */ + _0243, + /** + * Susceptibility, Minimum bactericidal concentration, microdilution + */ + _0244, + /** + * Turbidometric + */ + _0247, + /** + * Turbidometric, Refractometric + */ + _0248, + /** + * Chromatography, Thin Layer + */ + _0249, + /** + * Immunoassay, enzyme-multiplied technique (EMIT) + */ + _0250, + /** + * Flow Cytometry + */ + _0251, + /** + * Radial Immunodiffusion + */ + _0252, + /** + * Immunoassay, Fluorescence Polarization + */ + _0253, + /** + * Electrophoresis, Immunofixation + */ + _0254, + /** + * Dialysis, Direct Equilibrium + */ + _0255, + /** + * Acid Elution, Kleihauer-Betke Method + */ + _0256, + /** + * Immunofluorescence, Anti-Complement + */ + _0257, + /** + * Gas Chromatography/Mass Spectroscopy + */ + _0258, + /** + * Light Scatter, Nephelometry + */ + _0259, + /** + * Immunoassay, IgE Antibody Test + */ + _0260, + /** + * Lymphocyte Microcytotoxicity Assay + */ + _0261, + /** + * Spectrophotometry + */ + _0262, + /** + * Spectrophotometry, Atomic Absorption + */ + _0263, + /** + * Electrochemical, Ion Selective Electrode + */ + _0264, + /** + * Chromatography, Gas + */ + _0265, + /** + * Isoelectric Focusing + */ + _0266, + /** + * Immunoassay, Chemiluminescent + */ + _0267, + /** + * Immunoassay, Microparticle Enzyme + */ + _0268, + /** + * Inductively-Coupled Plasma/Mass Spectrometry + */ + _0269, + /** + * Immunoassay, Immunoradiometric Assay + */ + _0270, + /** + * Coagulation, Photo Optical Clot Detection + */ + _0271, + /** + * Test methods designed to determine a microorganismaTMs susceptibility to being killed by an antibiotic. + */ + _0280, + /** + * Susceptibility, Antibiotic sensitivity, disk + */ + _0240, + /** + * Susceptibility, BACTEC susceptibility test + */ + _0241, + /** + * Susceptibility, Disk dilution + */ + _0242, + /** + * Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited. + */ + _0272, + /** + * Susceptibility, Minimum Inhibitory concentration, macrodilution + */ + _0245, + /** + * Susceptibility, Minimum Inhibitory concentration, microdilution + */ + _0246, + /** + * Viral Genotype Susceptibility + */ + _0273, + /** + * Viral Phenotype Susceptibility + */ + _0274, + /** + * Gradient Strip + */ + _0275, + /** + * Minimum Lethal Concentration (MLC) + */ + _0275A, + /** + * Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited. + */ + _0276, + /** + * Serum bactericidal titer + */ + _0277, + /** + * Agar screen + */ + _0278, + /** + * Disk induction + */ + _0279, + /** + * Molecular, Nucleic acid probe + */ + _0127, + /** + * added to help the parsers + */ + NULL; + public static V3ObservationMethod fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DecisionObservationMethod".equals(codeString)) + return _DECISIONOBSERVATIONMETHOD; + if ("ALGM".equals(codeString)) + return ALGM; + if ("BYCL".equals(codeString)) + return BYCL; + if ("GINT".equals(codeString)) + return GINT; + if ("_GeneticObservationMethod".equals(codeString)) + return _GENETICOBSERVATIONMETHOD; + if ("PCR".equals(codeString)) + return PCR; + if ("_ObservationMethodAggregate".equals(codeString)) + return _OBSERVATIONMETHODAGGREGATE; + if ("AVERAGE".equals(codeString)) + return AVERAGE; + if ("COUNT".equals(codeString)) + return COUNT; + if ("MAX".equals(codeString)) + return MAX; + if ("MEDIAN".equals(codeString)) + return MEDIAN; + if ("MIN".equals(codeString)) + return MIN; + if ("MODE".equals(codeString)) + return MODE; + if ("STDEV.P".equals(codeString)) + return STDEV_P; + if ("STDEV.S".equals(codeString)) + return STDEV_S; + if ("SUM".equals(codeString)) + return SUM; + if ("VARIANCE.P".equals(codeString)) + return VARIANCE_P; + if ("VARIANCE.S".equals(codeString)) + return VARIANCE_S; + if ("_VerificationMethod".equals(codeString)) + return _VERIFICATIONMETHOD; + if ("VDOC".equals(codeString)) + return VDOC; + if ("VREG".equals(codeString)) + return VREG; + if ("VTOKEN".equals(codeString)) + return VTOKEN; + if ("VVOICE".equals(codeString)) + return VVOICE; + if ("0001".equals(codeString)) + return _0001; + if ("0002".equals(codeString)) + return _0002; + if ("0003".equals(codeString)) + return _0003; + if ("0004".equals(codeString)) + return _0004; + if ("0005".equals(codeString)) + return _0005; + if ("0006".equals(codeString)) + return _0006; + if ("0007".equals(codeString)) + return _0007; + if ("0008".equals(codeString)) + return _0008; + if ("0009".equals(codeString)) + return _0009; + if ("0010".equals(codeString)) + return _0010; + if ("0011".equals(codeString)) + return _0011; + if ("0012".equals(codeString)) + return _0012; + if ("0013".equals(codeString)) + return _0013; + if ("0014".equals(codeString)) + return _0014; + if ("0015".equals(codeString)) + return _0015; + if ("0016".equals(codeString)) + return _0016; + if ("0017".equals(codeString)) + return _0017; + if ("0018".equals(codeString)) + return _0018; + if ("0019".equals(codeString)) + return _0019; + if ("0020".equals(codeString)) + return _0020; + if ("0021".equals(codeString)) + return _0021; + if ("0022".equals(codeString)) + return _0022; + if ("0023".equals(codeString)) + return _0023; + if ("0024".equals(codeString)) + return _0024; + if ("0025".equals(codeString)) + return _0025; + if ("0026".equals(codeString)) + return _0026; + if ("0027".equals(codeString)) + return _0027; + if ("0028".equals(codeString)) + return _0028; + if ("0029".equals(codeString)) + return _0029; + if ("0030".equals(codeString)) + return _0030; + if ("0031".equals(codeString)) + return _0031; + if ("0032".equals(codeString)) + return _0032; + if ("0033".equals(codeString)) + return _0033; + if ("0034".equals(codeString)) + return _0034; + if ("0035".equals(codeString)) + return _0035; + if ("0036".equals(codeString)) + return _0036; + if ("0037".equals(codeString)) + return _0037; + if ("0038".equals(codeString)) + return _0038; + if ("0039".equals(codeString)) + return _0039; + if ("0040".equals(codeString)) + return _0040; + if ("0041".equals(codeString)) + return _0041; + if ("0042".equals(codeString)) + return _0042; + if ("0043".equals(codeString)) + return _0043; + if ("0044".equals(codeString)) + return _0044; + if ("0045".equals(codeString)) + return _0045; + if ("0046".equals(codeString)) + return _0046; + if ("0047".equals(codeString)) + return _0047; + if ("0048".equals(codeString)) + return _0048; + if ("0049".equals(codeString)) + return _0049; + if ("0050".equals(codeString)) + return _0050; + if ("0051".equals(codeString)) + return _0051; + if ("0052".equals(codeString)) + return _0052; + if ("0053".equals(codeString)) + return _0053; + if ("0054".equals(codeString)) + return _0054; + if ("0055".equals(codeString)) + return _0055; + if ("0056".equals(codeString)) + return _0056; + if ("0057".equals(codeString)) + return _0057; + if ("0058".equals(codeString)) + return _0058; + if ("0059".equals(codeString)) + return _0059; + if ("0060".equals(codeString)) + return _0060; + if ("0061".equals(codeString)) + return _0061; + if ("0062".equals(codeString)) + return _0062; + if ("0063".equals(codeString)) + return _0063; + if ("0064".equals(codeString)) + return _0064; + if ("0065".equals(codeString)) + return _0065; + if ("0066".equals(codeString)) + return _0066; + if ("0067".equals(codeString)) + return _0067; + if ("0068".equals(codeString)) + return _0068; + if ("0069".equals(codeString)) + return _0069; + if ("0070".equals(codeString)) + return _0070; + if ("0071".equals(codeString)) + return _0071; + if ("0072".equals(codeString)) + return _0072; + if ("0073".equals(codeString)) + return _0073; + if ("0074".equals(codeString)) + return _0074; + if ("0075".equals(codeString)) + return _0075; + if ("0076".equals(codeString)) + return _0076; + if ("0077".equals(codeString)) + return _0077; + if ("0078".equals(codeString)) + return _0078; + if ("0079".equals(codeString)) + return _0079; + if ("0080".equals(codeString)) + return _0080; + if ("0081".equals(codeString)) + return _0081; + if ("0082".equals(codeString)) + return _0082; + if ("0083".equals(codeString)) + return _0083; + if ("0084".equals(codeString)) + return _0084; + if ("0085".equals(codeString)) + return _0085; + if ("0086".equals(codeString)) + return _0086; + if ("0087".equals(codeString)) + return _0087; + if ("0088".equals(codeString)) + return _0088; + if ("0089".equals(codeString)) + return _0089; + if ("0090".equals(codeString)) + return _0090; + if ("0091".equals(codeString)) + return _0091; + if ("0092".equals(codeString)) + return _0092; + if ("0093".equals(codeString)) + return _0093; + if ("0094".equals(codeString)) + return _0094; + if ("0095".equals(codeString)) + return _0095; + if ("0096".equals(codeString)) + return _0096; + if ("0097".equals(codeString)) + return _0097; + if ("0098".equals(codeString)) + return _0098; + if ("0099".equals(codeString)) + return _0099; + if ("0100".equals(codeString)) + return _0100; + if ("0101".equals(codeString)) + return _0101; + if ("0102".equals(codeString)) + return _0102; + if ("0103".equals(codeString)) + return _0103; + if ("0104".equals(codeString)) + return _0104; + if ("0105".equals(codeString)) + return _0105; + if ("0106".equals(codeString)) + return _0106; + if ("0107".equals(codeString)) + return _0107; + if ("0108".equals(codeString)) + return _0108; + if ("0109".equals(codeString)) + return _0109; + if ("0110".equals(codeString)) + return _0110; + if ("0111".equals(codeString)) + return _0111; + if ("0112".equals(codeString)) + return _0112; + if ("0113".equals(codeString)) + return _0113; + if ("0114".equals(codeString)) + return _0114; + if ("0115".equals(codeString)) + return _0115; + if ("0116".equals(codeString)) + return _0116; + if ("0117".equals(codeString)) + return _0117; + if ("0118".equals(codeString)) + return _0118; + if ("0119".equals(codeString)) + return _0119; + if ("0120".equals(codeString)) + return _0120; + if ("0121".equals(codeString)) + return _0121; + if ("0122".equals(codeString)) + return _0122; + if ("0123".equals(codeString)) + return _0123; + if ("0124".equals(codeString)) + return _0124; + if ("0125".equals(codeString)) + return _0125; + if ("0126".equals(codeString)) + return _0126; + if ("0128".equals(codeString)) + return _0128; + if ("0129".equals(codeString)) + return _0129; + if ("0130".equals(codeString)) + return _0130; + if ("0131".equals(codeString)) + return _0131; + if ("0132".equals(codeString)) + return _0132; + if ("0133".equals(codeString)) + return _0133; + if ("0134".equals(codeString)) + return _0134; + if ("0135".equals(codeString)) + return _0135; + if ("0136".equals(codeString)) + return _0136; + if ("0137".equals(codeString)) + return _0137; + if ("0138".equals(codeString)) + return _0138; + if ("0139".equals(codeString)) + return _0139; + if ("0140".equals(codeString)) + return _0140; + if ("0141".equals(codeString)) + return _0141; + if ("0142".equals(codeString)) + return _0142; + if ("0143".equals(codeString)) + return _0143; + if ("0144".equals(codeString)) + return _0144; + if ("0145".equals(codeString)) + return _0145; + if ("0146".equals(codeString)) + return _0146; + if ("0147".equals(codeString)) + return _0147; + if ("0148".equals(codeString)) + return _0148; + if ("0149".equals(codeString)) + return _0149; + if ("0150".equals(codeString)) + return _0150; + if ("0151".equals(codeString)) + return _0151; + if ("0152".equals(codeString)) + return _0152; + if ("0153".equals(codeString)) + return _0153; + if ("0154".equals(codeString)) + return _0154; + if ("0155".equals(codeString)) + return _0155; + if ("0156".equals(codeString)) + return _0156; + if ("0157".equals(codeString)) + return _0157; + if ("0158".equals(codeString)) + return _0158; + if ("0159".equals(codeString)) + return _0159; + if ("0160".equals(codeString)) + return _0160; + if ("0161".equals(codeString)) + return _0161; + if ("0162".equals(codeString)) + return _0162; + if ("0163".equals(codeString)) + return _0163; + if ("0164".equals(codeString)) + return _0164; + if ("0165".equals(codeString)) + return _0165; + if ("0166".equals(codeString)) + return _0166; + if ("0167".equals(codeString)) + return _0167; + if ("0168".equals(codeString)) + return _0168; + if ("0169".equals(codeString)) + return _0169; + if ("0170".equals(codeString)) + return _0170; + if ("0171".equals(codeString)) + return _0171; + if ("0172".equals(codeString)) + return _0172; + if ("0173".equals(codeString)) + return _0173; + if ("0174".equals(codeString)) + return _0174; + if ("0175".equals(codeString)) + return _0175; + if ("0176".equals(codeString)) + return _0176; + if ("0177".equals(codeString)) + return _0177; + if ("0178".equals(codeString)) + return _0178; + if ("0179".equals(codeString)) + return _0179; + if ("0180".equals(codeString)) + return _0180; + if ("0181".equals(codeString)) + return _0181; + if ("0182".equals(codeString)) + return _0182; + if ("0183".equals(codeString)) + return _0183; + if ("0184".equals(codeString)) + return _0184; + if ("0185".equals(codeString)) + return _0185; + if ("0186".equals(codeString)) + return _0186; + if ("0187".equals(codeString)) + return _0187; + if ("0188".equals(codeString)) + return _0188; + if ("0189".equals(codeString)) + return _0189; + if ("0190".equals(codeString)) + return _0190; + if ("0191".equals(codeString)) + return _0191; + if ("0192".equals(codeString)) + return _0192; + if ("0193".equals(codeString)) + return _0193; + if ("0194".equals(codeString)) + return _0194; + if ("0195".equals(codeString)) + return _0195; + if ("0196".equals(codeString)) + return _0196; + if ("0197".equals(codeString)) + return _0197; + if ("0198".equals(codeString)) + return _0198; + if ("0199".equals(codeString)) + return _0199; + if ("0200".equals(codeString)) + return _0200; + if ("0201".equals(codeString)) + return _0201; + if ("0202".equals(codeString)) + return _0202; + if ("0203".equals(codeString)) + return _0203; + if ("0204".equals(codeString)) + return _0204; + if ("0205".equals(codeString)) + return _0205; + if ("0206".equals(codeString)) + return _0206; + if ("0207".equals(codeString)) + return _0207; + if ("0208".equals(codeString)) + return _0208; + if ("0209".equals(codeString)) + return _0209; + if ("0210".equals(codeString)) + return _0210; + if ("0211".equals(codeString)) + return _0211; + if ("0212".equals(codeString)) + return _0212; + if ("0213".equals(codeString)) + return _0213; + if ("0214".equals(codeString)) + return _0214; + if ("0215".equals(codeString)) + return _0215; + if ("0216".equals(codeString)) + return _0216; + if ("0217".equals(codeString)) + return _0217; + if ("0218".equals(codeString)) + return _0218; + if ("0219".equals(codeString)) + return _0219; + if ("0220".equals(codeString)) + return _0220; + if ("0221".equals(codeString)) + return _0221; + if ("0222".equals(codeString)) + return _0222; + if ("0223".equals(codeString)) + return _0223; + if ("0224".equals(codeString)) + return _0224; + if ("0225".equals(codeString)) + return _0225; + if ("0226".equals(codeString)) + return _0226; + if ("0227".equals(codeString)) + return _0227; + if ("0228".equals(codeString)) + return _0228; + if ("0229".equals(codeString)) + return _0229; + if ("0230".equals(codeString)) + return _0230; + if ("0231".equals(codeString)) + return _0231; + if ("0232".equals(codeString)) + return _0232; + if ("0233".equals(codeString)) + return _0233; + if ("0234".equals(codeString)) + return _0234; + if ("0235".equals(codeString)) + return _0235; + if ("0236".equals(codeString)) + return _0236; + if ("0237".equals(codeString)) + return _0237; + if ("0238".equals(codeString)) + return _0238; + if ("0239".equals(codeString)) + return _0239; + if ("0243".equals(codeString)) + return _0243; + if ("0244".equals(codeString)) + return _0244; + if ("0247".equals(codeString)) + return _0247; + if ("0248".equals(codeString)) + return _0248; + if ("0249".equals(codeString)) + return _0249; + if ("0250".equals(codeString)) + return _0250; + if ("0251".equals(codeString)) + return _0251; + if ("0252".equals(codeString)) + return _0252; + if ("0253".equals(codeString)) + return _0253; + if ("0254".equals(codeString)) + return _0254; + if ("0255".equals(codeString)) + return _0255; + if ("0256".equals(codeString)) + return _0256; + if ("0257".equals(codeString)) + return _0257; + if ("0258".equals(codeString)) + return _0258; + if ("0259".equals(codeString)) + return _0259; + if ("0260".equals(codeString)) + return _0260; + if ("0261".equals(codeString)) + return _0261; + if ("0262".equals(codeString)) + return _0262; + if ("0263".equals(codeString)) + return _0263; + if ("0264".equals(codeString)) + return _0264; + if ("0265".equals(codeString)) + return _0265; + if ("0266".equals(codeString)) + return _0266; + if ("0267".equals(codeString)) + return _0267; + if ("0268".equals(codeString)) + return _0268; + if ("0269".equals(codeString)) + return _0269; + if ("0270".equals(codeString)) + return _0270; + if ("0271".equals(codeString)) + return _0271; + if ("0280".equals(codeString)) + return _0280; + if ("0240".equals(codeString)) + return _0240; + if ("0241".equals(codeString)) + return _0241; + if ("0242".equals(codeString)) + return _0242; + if ("0272".equals(codeString)) + return _0272; + if ("0245".equals(codeString)) + return _0245; + if ("0246".equals(codeString)) + return _0246; + if ("0273".equals(codeString)) + return _0273; + if ("0274".equals(codeString)) + return _0274; + if ("0275".equals(codeString)) + return _0275; + if ("0275a".equals(codeString)) + return _0275A; + if ("0276".equals(codeString)) + return _0276; + if ("0277".equals(codeString)) + return _0277; + if ("0278".equals(codeString)) + return _0278; + if ("0279".equals(codeString)) + return _0279; + if ("0127".equals(codeString)) + return _0127; + throw new FHIRException("Unknown V3ObservationMethod code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _DECISIONOBSERVATIONMETHOD: return "_DecisionObservationMethod"; + case ALGM: return "ALGM"; + case BYCL: return "BYCL"; + case GINT: return "GINT"; + case _GENETICOBSERVATIONMETHOD: return "_GeneticObservationMethod"; + case PCR: return "PCR"; + case _OBSERVATIONMETHODAGGREGATE: return "_ObservationMethodAggregate"; + case AVERAGE: return "AVERAGE"; + case COUNT: return "COUNT"; + case MAX: return "MAX"; + case MEDIAN: return "MEDIAN"; + case MIN: return "MIN"; + case MODE: return "MODE"; + case STDEV_P: return "STDEV.P"; + case STDEV_S: return "STDEV.S"; + case SUM: return "SUM"; + case VARIANCE_P: return "VARIANCE.P"; + case VARIANCE_S: return "VARIANCE.S"; + case _VERIFICATIONMETHOD: return "_VerificationMethod"; + case VDOC: return "VDOC"; + case VREG: return "VREG"; + case VTOKEN: return "VTOKEN"; + case VVOICE: return "VVOICE"; + case _0001: return "0001"; + case _0002: return "0002"; + case _0003: return "0003"; + case _0004: return "0004"; + case _0005: return "0005"; + case _0006: return "0006"; + case _0007: return "0007"; + case _0008: return "0008"; + case _0009: return "0009"; + case _0010: return "0010"; + case _0011: return "0011"; + case _0012: return "0012"; + case _0013: return "0013"; + case _0014: return "0014"; + case _0015: return "0015"; + case _0016: return "0016"; + case _0017: return "0017"; + case _0018: return "0018"; + case _0019: return "0019"; + case _0020: return "0020"; + case _0021: return "0021"; + case _0022: return "0022"; + case _0023: return "0023"; + case _0024: return "0024"; + case _0025: return "0025"; + case _0026: return "0026"; + case _0027: return "0027"; + case _0028: return "0028"; + case _0029: return "0029"; + case _0030: return "0030"; + case _0031: return "0031"; + case _0032: return "0032"; + case _0033: return "0033"; + case _0034: return "0034"; + case _0035: return "0035"; + case _0036: return "0036"; + case _0037: return "0037"; + case _0038: return "0038"; + case _0039: return "0039"; + case _0040: return "0040"; + case _0041: return "0041"; + case _0042: return "0042"; + case _0043: return "0043"; + case _0044: return "0044"; + case _0045: return "0045"; + case _0046: return "0046"; + case _0047: return "0047"; + case _0048: return "0048"; + case _0049: return "0049"; + case _0050: return "0050"; + case _0051: return "0051"; + case _0052: return "0052"; + case _0053: return "0053"; + case _0054: return "0054"; + case _0055: return "0055"; + case _0056: return "0056"; + case _0057: return "0057"; + case _0058: return "0058"; + case _0059: return "0059"; + case _0060: return "0060"; + case _0061: return "0061"; + case _0062: return "0062"; + case _0063: return "0063"; + case _0064: return "0064"; + case _0065: return "0065"; + case _0066: return "0066"; + case _0067: return "0067"; + case _0068: return "0068"; + case _0069: return "0069"; + case _0070: return "0070"; + case _0071: return "0071"; + case _0072: return "0072"; + case _0073: return "0073"; + case _0074: return "0074"; + case _0075: return "0075"; + case _0076: return "0076"; + case _0077: return "0077"; + case _0078: return "0078"; + case _0079: return "0079"; + case _0080: return "0080"; + case _0081: return "0081"; + case _0082: return "0082"; + case _0083: return "0083"; + case _0084: return "0084"; + case _0085: return "0085"; + case _0086: return "0086"; + case _0087: return "0087"; + case _0088: return "0088"; + case _0089: return "0089"; + case _0090: return "0090"; + case _0091: return "0091"; + case _0092: return "0092"; + case _0093: return "0093"; + case _0094: return "0094"; + case _0095: return "0095"; + case _0096: return "0096"; + case _0097: return "0097"; + case _0098: return "0098"; + case _0099: return "0099"; + case _0100: return "0100"; + case _0101: return "0101"; + case _0102: return "0102"; + case _0103: return "0103"; + case _0104: return "0104"; + case _0105: return "0105"; + case _0106: return "0106"; + case _0107: return "0107"; + case _0108: return "0108"; + case _0109: return "0109"; + case _0110: return "0110"; + case _0111: return "0111"; + case _0112: return "0112"; + case _0113: return "0113"; + case _0114: return "0114"; + case _0115: return "0115"; + case _0116: return "0116"; + case _0117: return "0117"; + case _0118: return "0118"; + case _0119: return "0119"; + case _0120: return "0120"; + case _0121: return "0121"; + case _0122: return "0122"; + case _0123: return "0123"; + case _0124: return "0124"; + case _0125: return "0125"; + case _0126: return "0126"; + case _0128: return "0128"; + case _0129: return "0129"; + case _0130: return "0130"; + case _0131: return "0131"; + case _0132: return "0132"; + case _0133: return "0133"; + case _0134: return "0134"; + case _0135: return "0135"; + case _0136: return "0136"; + case _0137: return "0137"; + case _0138: return "0138"; + case _0139: return "0139"; + case _0140: return "0140"; + case _0141: return "0141"; + case _0142: return "0142"; + case _0143: return "0143"; + case _0144: return "0144"; + case _0145: return "0145"; + case _0146: return "0146"; + case _0147: return "0147"; + case _0148: return "0148"; + case _0149: return "0149"; + case _0150: return "0150"; + case _0151: return "0151"; + case _0152: return "0152"; + case _0153: return "0153"; + case _0154: return "0154"; + case _0155: return "0155"; + case _0156: return "0156"; + case _0157: return "0157"; + case _0158: return "0158"; + case _0159: return "0159"; + case _0160: return "0160"; + case _0161: return "0161"; + case _0162: return "0162"; + case _0163: return "0163"; + case _0164: return "0164"; + case _0165: return "0165"; + case _0166: return "0166"; + case _0167: return "0167"; + case _0168: return "0168"; + case _0169: return "0169"; + case _0170: return "0170"; + case _0171: return "0171"; + case _0172: return "0172"; + case _0173: return "0173"; + case _0174: return "0174"; + case _0175: return "0175"; + case _0176: return "0176"; + case _0177: return "0177"; + case _0178: return "0178"; + case _0179: return "0179"; + case _0180: return "0180"; + case _0181: return "0181"; + case _0182: return "0182"; + case _0183: return "0183"; + case _0184: return "0184"; + case _0185: return "0185"; + case _0186: return "0186"; + case _0187: return "0187"; + case _0188: return "0188"; + case _0189: return "0189"; + case _0190: return "0190"; + case _0191: return "0191"; + case _0192: return "0192"; + case _0193: return "0193"; + case _0194: return "0194"; + case _0195: return "0195"; + case _0196: return "0196"; + case _0197: return "0197"; + case _0198: return "0198"; + case _0199: return "0199"; + case _0200: return "0200"; + case _0201: return "0201"; + case _0202: return "0202"; + case _0203: return "0203"; + case _0204: return "0204"; + case _0205: return "0205"; + case _0206: return "0206"; + case _0207: return "0207"; + case _0208: return "0208"; + case _0209: return "0209"; + case _0210: return "0210"; + case _0211: return "0211"; + case _0212: return "0212"; + case _0213: return "0213"; + case _0214: return "0214"; + case _0215: return "0215"; + case _0216: return "0216"; + case _0217: return "0217"; + case _0218: return "0218"; + case _0219: return "0219"; + case _0220: return "0220"; + case _0221: return "0221"; + case _0222: return "0222"; + case _0223: return "0223"; + case _0224: return "0224"; + case _0225: return "0225"; + case _0226: return "0226"; + case _0227: return "0227"; + case _0228: return "0228"; + case _0229: return "0229"; + case _0230: return "0230"; + case _0231: return "0231"; + case _0232: return "0232"; + case _0233: return "0233"; + case _0234: return "0234"; + case _0235: return "0235"; + case _0236: return "0236"; + case _0237: return "0237"; + case _0238: return "0238"; + case _0239: return "0239"; + case _0243: return "0243"; + case _0244: return "0244"; + case _0247: return "0247"; + case _0248: return "0248"; + case _0249: return "0249"; + case _0250: return "0250"; + case _0251: return "0251"; + case _0252: return "0252"; + case _0253: return "0253"; + case _0254: return "0254"; + case _0255: return "0255"; + case _0256: return "0256"; + case _0257: return "0257"; + case _0258: return "0258"; + case _0259: return "0259"; + case _0260: return "0260"; + case _0261: return "0261"; + case _0262: return "0262"; + case _0263: return "0263"; + case _0264: return "0264"; + case _0265: return "0265"; + case _0266: return "0266"; + case _0267: return "0267"; + case _0268: return "0268"; + case _0269: return "0269"; + case _0270: return "0270"; + case _0271: return "0271"; + case _0280: return "0280"; + case _0240: return "0240"; + case _0241: return "0241"; + case _0242: return "0242"; + case _0272: return "0272"; + case _0245: return "0245"; + case _0246: return "0246"; + case _0273: return "0273"; + case _0274: return "0274"; + case _0275: return "0275"; + case _0275A: return "0275a"; + case _0276: return "0276"; + case _0277: return "0277"; + case _0278: return "0278"; + case _0279: return "0279"; + case _0127: return "0127"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ObservationMethod"; + } + public String getDefinition() { + switch (this) { + case _DECISIONOBSERVATIONMETHOD: return "Provides codes for decision methods, initially for assessing the causality of events."; + case ALGM: return "Reaching a decision through the application of an algorithm designed to weigh the different factors involved."; + case BYCL: return "Reaching a decision through the use of Bayesian statistical analysis."; + case GINT: return "Reaching a decision by consideration of the totality of factors involved in order to reach a judgement."; + case _GENETICOBSERVATIONMETHOD: return "A code that provides additional detail about the means or technique used to ascertain the genetic analysis. Example, PCR, Micro Array"; + case PCR: return "Description: Polymerase Chain Reaction"; + case _OBSERVATIONMETHODAGGREGATE: return "Provides additional detail about the aggregation methods used to compute the aggregated values for an observation. This is an abstract code."; + case AVERAGE: return "Average of non-null values in the referenced set of values"; + case COUNT: return "Count of non-null values in the referenced set of values"; + case MAX: return "Largest of all non-null values in the referenced set of values."; + case MEDIAN: return "The median of all non-null values in the referenced set of values."; + case MIN: return "Smallest of all non-null values in the referenced set of values."; + case MODE: return "The most common value of all non-null values in the referenced set of values."; + case STDEV_P: return "Standard Deviation of the values in the referenced set of values, computed over the population."; + case STDEV_S: return "Standard Deviation of the values in the referenced set of values, computed over a sample of the population."; + case SUM: return "Sum of non-null values in the referenced set of values"; + case VARIANCE_P: return "Variance of the values in the referenced set of values, computed over the population."; + case VARIANCE_S: return "Variance of the values in the referenced set of values, computed over a sample of the population."; + case _VERIFICATIONMETHOD: return "VerificationMethod"; + case VDOC: return "Verification by means of document.\r\n\n \n Example: Fax, letter, attachment to e-mail."; + case VREG: return "verification by means of a response to an electronic query\r\n\n \n Example: query message to a Covered Party registry application or Coverage Administrator."; + case VTOKEN: return "Verification by means of electronic token.\r\n\n \n Example: smartcard, magnetic swipe card, RFID device."; + case VVOICE: return "Verification by means of voice.\r\n\n \n Example: By speaking with or calling the Coverage Administrator or Covered Party"; + case _0001: return "Complement fixation"; + case _0002: return "Computed axial tomography"; + case _0003: return "Susceptibility, High Level Aminoglycoside Resistance agar test"; + case _0004: return "Visual, Macroscopic observation"; + case _0005: return "Computed, Magnetic resonance"; + case _0006: return "Computed, Morphometry"; + case _0007: return "Computed, Positron emission tomography"; + case _0008: return "SAMHSA drug assay confirmation"; + case _0009: return "SAMHSA drug assay screening"; + case _0010: return "Serum Neutralization"; + case _0011: return "Titration"; + case _0012: return "Ultrasound"; + case _0013: return "X-ray crystallography"; + case _0014: return "Agglutination"; + case _0015: return "Agglutination, Buffered acidified plate"; + case _0016: return "Agglutination, Card"; + case _0017: return "Agglutination, Hemagglutination"; + case _0018: return "Agglutination, Hemagglutination inhibition"; + case _0019: return "Agglutination, Latex"; + case _0020: return "Agglutination, Plate"; + case _0021: return "Agglutination, Rapid Plate"; + case _0022: return "Agglutination, RBC"; + case _0023: return "Agglutination, Rivanol"; + case _0024: return "Agglutination, Tube"; + case _0025: return "Bioassay"; + case _0026: return "Bioassay, Animal Inoculation"; + case _0027: return "Bioassay, Cytotoxicity"; + case _0028: return "Bioassay, Embryo Infective Dose 50"; + case _0029: return "Bioassay, Embryo Lethal Dose 50"; + case _0030: return "Bioassay, Mouse intercerebral inoculation"; + case _0031: return "Bioassay, qualitative"; + case _0032: return "Bioassay, quantitative"; + case _0033: return "Chemical"; + case _0034: return "Chemical, Differential light absorption"; + case _0035: return "Chemical, Dipstick"; + case _0036: return "Chemical, Dipstick colorimetric laboratory test"; + case _0037: return "Chemical, Test strip"; + case _0038: return "Chromatography"; + case _0039: return "Chromatography, Affinity"; + case _0040: return "Chromatography, Gas liquid"; + case _0041: return "Chromatography, High performance liquid"; + case _0042: return "Chromatography, Liquid"; + case _0043: return "Chromatography, Protein A affinity"; + case _0044: return "Coagulation"; + case _0045: return "Coagulation, Tilt tube"; + case _0046: return "Coagulation, Tilt tube reptilase induced"; + case _0047: return "Count, Automated"; + case _0048: return "Count, Manual"; + case _0049: return "Count, Platelet, Rees-Ecker"; + case _0050: return "Culture, Aerobic"; + case _0051: return "Culture, Anaerobic"; + case _0052: return "Culture, Chicken Embryo"; + case _0053: return "Culture, Delayed secondary enrichment"; + case _0054: return "Culture, Microaerophilic"; + case _0055: return "Culture, Quantitative microbial, cup"; + case _0056: return "Culture, Quantitative microbial, droplet"; + case _0057: return "Culture, Quantitative microbial, filter paper"; + case _0058: return "Culture, Quantitative microbial, pad"; + case _0059: return "Culture, Quantitative microbial, pour plate"; + case _0060: return "Culture, Quantitative microbial, surface streak"; + case _0061: return "Culture, Somatic Cell"; + case _0062: return "Diffusion, Agar"; + case _0063: return "Diffusion, Agar Gel Immunodiffusion"; + case _0064: return "Electrophoresis"; + case _0065: return "Electrophoresis, Agaorse gel"; + case _0066: return "Electrophoresis, citrate agar"; + case _0067: return "Electrophoresis, Immuno"; + case _0068: return "Electrophoresis, Polyacrylamide gel"; + case _0069: return "Electrophoresis, Starch gel"; + case _0070: return "ELISA"; + case _0071: return "ELISA, antigen capture"; + case _0072: return "ELISA, avidin biotin peroxidase complex"; + case _0073: return "ELISA, Kinetic"; + case _0074: return "ELISA, peroxidase-antiperoxidase"; + case _0075: return "Identification, API 20 Strep"; + case _0076: return "Identification, API 20A"; + case _0077: return "Identification, API 20C AUX"; + case _0078: return "Identification, API 20E"; + case _0079: return "Identification, API 20NE"; + case _0080: return "Identification, API 50 CH"; + case _0081: return "Identification, API An-IDENT"; + case _0082: return "Identification, API Coryne"; + case _0083: return "Identification, API Rapid 20E"; + case _0084: return "Identification, API Staph"; + case _0085: return "Identification, API ZYM"; + case _0086: return "Identification, Bacterial"; + case _0087: return "Identification, mini VIDAS"; + case _0088: return "Identification, Phage susceptibility typing"; + case _0089: return "Identification, Quad-FERM+"; + case _0090: return "Identification, RAPIDEC Staph"; + case _0091: return "Identification, Staphaurex"; + case _0092: return "Identification, VIDAS"; + case _0093: return "Identification, Vitek"; + case _0094: return "Identification, VITEK 2"; + case _0095: return "Immune stain"; + case _0096: return "Immune stain, Immunofluorescent antibody, direct"; + case _0097: return "Immune stain, Immunofluorescent antibody, indirect"; + case _0098: return "Immune stain, Immunoperoxidase, Avidin-Biotin Complex"; + case _0099: return "Immune stain, Immunoperoxidase, Peroxidase anti-peroxidase complex"; + case _0100: return "Immune stain, Immunoperoxidase, Protein A-peroxidase complex"; + case _0101: return "Immunoassay"; + case _0102: return "Immunoassay, qualitative, multiple step"; + case _0103: return "Immunoassay, qualitative, single step"; + case _0104: return "Immunoassay, Radioimmunoassay"; + case _0105: return "Immunoassay, semi-quantitative, multiple step"; + case _0106: return "Immunoassay, semi-quantitative, single step"; + case _0107: return "Microscopy"; + case _0108: return "Microscopy, Darkfield"; + case _0109: return "Microscopy, Electron"; + case _0110: return "Microscopy, Electron microscopy tomography"; + case _0111: return "Microscopy, Electron, negative stain"; + case _0112: return "Microscopy, Electron, thick section transmission"; + case _0113: return "Microscopy, Electron, thin section transmission"; + case _0114: return "Microscopy, Light"; + case _0115: return "Microscopy, Polarized light"; + case _0116: return "Microscopy, Scanning electron"; + case _0117: return "Microscopy, Transmission electron"; + case _0118: return "Microscopy, Transparent tape direct examination"; + case _0119: return "Molecular, 3 Self-Sustaining Sequence Replication"; + case _0120: return "Molecular, Branched Chain DNA"; + case _0121: return "Molecular, Hybridization Protection Assay"; + case _0122: return "Molecular, Immune blot"; + case _0123: return "Molecular, In-situ hybridization"; + case _0124: return "Molecular, Ligase Chain Reaction"; + case _0125: return "Molecular, Ligation Activated Transcription"; + case _0126: return "Molecular, Nucleic Acid Probe"; + case _0128: return "Molecular, Nucleic acid probe with amplification\r\n\n \r\n\n Rationale: Duplicate of code 0126. Use code 0126 instead."; + case _0129: return "Molecular, Nucleic acid probe with target amplification"; + case _0130: return "Molecular, Nucleic acid reverse transcription"; + case _0131: return "Molecular, Nucleic Acid Sequence Based Analysis"; + case _0132: return "Molecular, Polymerase chain reaction"; + case _0133: return "Molecular, Q-Beta Replicase or probe amplification category method"; + case _0134: return "Molecular, Restriction Fragment Length Polymorphism"; + case _0135: return "Molecular, Southern Blot"; + case _0136: return "Molecular, Strand Displacement Amplification"; + case _0137: return "Molecular, Transcription Mediated Amplification"; + case _0138: return "Molecular, Western Blot"; + case _0139: return "Precipitation, Flocculation"; + case _0140: return "Precipitation, Immune precipitation"; + case _0141: return "Precipitation, Milk ring test"; + case _0142: return "Precipitation, Precipitin"; + case _0143: return "Stain, Acid fast"; + case _0144: return "Stain, Acid fast, fluorochrome"; + case _0145: return "Stain, Acid fast, Kinyoun's cold carbolfuchsin"; + case _0146: return "Stain, Acid fast, Ziehl-Neelsen"; + case _0147: return "Stain, Acid phosphatase"; + case _0148: return "Stain, Acridine orange"; + case _0149: return "Stain, Active brilliant orange KH"; + case _0150: return "Stain, Alazarin red S"; + case _0151: return "Stain, Alcian blue"; + case _0152: return "Stain, Alcian blue with Periodic acid Schiff"; + case _0153: return "Stain, Argentaffin"; + case _0154: return "Stain, Argentaffin silver"; + case _0155: return "Stain, Azure-eosin"; + case _0156: return "Stain, Basic Fuschin"; + case _0157: return "Stain, Bennhold"; + case _0158: return "Stain, Bennhold's Congo red"; + case _0159: return "Stain, Bielschowsky"; + case _0160: return "Stain, Bielschowsky's silver"; + case _0161: return "Stain, Bleach"; + case _0162: return "Stain, Bodian"; + case _0163: return "Stain, Brown-Brenn"; + case _0164: return "Stain, Butyrate-esterase"; + case _0165: return "Stain, Calcofluor white fluorescent"; + case _0166: return "Stain, Carbol-fuchsin"; + case _0167: return "Stain, Carmine"; + case _0168: return "Stain, Churukian-Schenk"; + case _0169: return "Stain, Congo red"; + case _0170: return "Stain, Cresyl echt violet"; + case _0171: return "Stain, Crystal violet"; + case _0172: return "Stain, De Galantha"; + case _0173: return "Stain, Dieterle silver impregnation"; + case _0174: return "Stain, Fite-Farco"; + case _0175: return "Stain, Fontana-Masson silver"; + case _0176: return "Stain, Fouchet"; + case _0177: return "Stain, Gomori"; + case _0178: return "Stain, Gomori methenamine silver"; + case _0179: return "Stain, Gomori-Wheatly trichrome"; + case _0180: return "Stain, Gridley"; + case _0181: return "Stain, Grimelius silver"; + case _0182: return "Stain, Grocott"; + case _0183: return "Stain, Grocott methenamine silver"; + case _0184: return "Stain, Hale's colloidal ferric oxide"; + case _0185: return "Stain, Hale's colloidal iron"; + case _0186: return "Stain, Hansel"; + case _0187: return "Stain, Harris regressive hematoxylin and eosin"; + case _0188: return "Stain, Hematoxylin and eosin"; + case _0189: return "Stain, Highman"; + case _0190: return "Stain, Holzer"; + case _0191: return "Stain, Iron hematoxylin"; + case _0192: return "Stain, Jones"; + case _0193: return "Stain, Jones methenamine silver"; + case _0194: return "Stain, Kossa"; + case _0195: return "Stain, Lawson-Van Gieson"; + case _0196: return "Stain, Loeffler methylene blue"; + case _0197: return "Stain, Luxol fast blue with cresyl violet"; + case _0198: return "Stain, Luxol fast blue with Periodic acid-Schiff"; + case _0199: return "Stain, MacNeal's tetrachrome blood"; + case _0200: return "Stain, Mallory-Heidenhain"; + case _0201: return "Stain, Masson trichrome"; + case _0202: return "Stain, Mayer mucicarmine"; + case _0203: return "Stain, Mayers progressive hematoxylin and eosin"; + case _0204: return "Stain, May-Grunwald Giemsa"; + case _0205: return "Stain, Methyl green"; + case _0206: return "Stain, Methyl green pyronin"; + case _0207: return "Stain, Modified Gomori-Wheatly trichrome"; + case _0208: return "Stain, Modified Masson trichrome"; + case _0209: return "Stain, Modified trichrome"; + case _0210: return "Stain, Movat pentachrome"; + case _0211: return "Stain, Mucicarmine"; + case _0212: return "Stain, Neutral red"; + case _0213: return "Stain, Night blue"; + case _0214: return "Stain, Non-specific esterase"; + case _0215: return "Stain, Oil red-O"; + case _0216: return "Stain, Orcein"; + case _0217: return "Stain, Perls'"; + case _0218: return "Stain, Phosphotungstic acid-hematoxylin"; + case _0219: return "Stain, Potassium ferrocyanide"; + case _0220: return "Stain, Prussian blue"; + case _0221: return "Stain, Putchler modified Bennhold"; + case _0222: return "Stain, Quinacrine fluorescent"; + case _0223: return "Stain, Reticulin"; + case _0224: return "Stain, Rhodamine"; + case _0225: return "Stain, Safranin"; + case _0226: return "Stain, Schmorl"; + case _0227: return "Stain, Seiver-Munger"; + case _0228: return "Stain, Silver"; + case _0229: return "Stain, Specific esterase"; + case _0230: return "Stain, Steiner silver"; + case _0231: return "Stain, Sudan III"; + case _0232: return "Stain, Sudan IVI"; + case _0233: return "Stain, Sulfated alcian blue"; + case _0234: return "Stain, Supravital"; + case _0235: return "Stain, Thioflavine-S"; + case _0236: return "Stain, Three micron Giemsa"; + case _0237: return "Stain, Vassar-Culling"; + case _0238: return "Stain, Vital"; + case _0239: return "Stain, von Kossa"; + case _0243: return "Susceptibility, Minimum bactericidal concentration, macrodilution"; + case _0244: return "Susceptibility, Minimum bactericidal concentration, microdilution"; + case _0247: return "Turbidometric"; + case _0248: return "Turbidometric, Refractometric"; + case _0249: return "Chromatography, Thin Layer"; + case _0250: return "Immunoassay, enzyme-multiplied technique (EMIT)"; + case _0251: return "Flow Cytometry"; + case _0252: return "Radial Immunodiffusion"; + case _0253: return "Immunoassay, Fluorescence Polarization"; + case _0254: return "Electrophoresis, Immunofixation"; + case _0255: return "Dialysis, Direct Equilibrium"; + case _0256: return "Acid Elution, Kleihauer-Betke Method"; + case _0257: return "Immunofluorescence, Anti-Complement"; + case _0258: return "Gas Chromatography/Mass Spectroscopy"; + case _0259: return "Light Scatter, Nephelometry"; + case _0260: return "Immunoassay, IgE Antibody Test"; + case _0261: return "Lymphocyte Microcytotoxicity Assay"; + case _0262: return "Spectrophotometry"; + case _0263: return "Spectrophotometry, Atomic Absorption"; + case _0264: return "Electrochemical, Ion Selective Electrode"; + case _0265: return "Chromatography, Gas"; + case _0266: return "Isoelectric Focusing"; + case _0267: return "Immunoassay, Chemiluminescent"; + case _0268: return "Immunoassay, Microparticle Enzyme"; + case _0269: return "Inductively-Coupled Plasma/Mass Spectrometry"; + case _0270: return "Immunoassay, Immunoradiometric Assay"; + case _0271: return "Coagulation, Photo Optical Clot Detection"; + case _0280: return "Test methods designed to determine a microorganismaTMs susceptibility to being killed by an antibiotic."; + case _0240: return "Susceptibility, Antibiotic sensitivity, disk"; + case _0241: return "Susceptibility, BACTEC susceptibility test"; + case _0242: return "Susceptibility, Disk dilution"; + case _0272: return "Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited."; + case _0245: return "Susceptibility, Minimum Inhibitory concentration, macrodilution"; + case _0246: return "Susceptibility, Minimum Inhibitory concentration, microdilution"; + case _0273: return "Viral Genotype Susceptibility"; + case _0274: return "Viral Phenotype Susceptibility"; + case _0275: return "Gradient Strip"; + case _0275A: return "Minimum Lethal Concentration (MLC)"; + case _0276: return "Testing to measure the minimum concentration of the antibacterial agent in a given culture medium below which bacterial growth is not inhibited."; + case _0277: return "Serum bactericidal titer"; + case _0278: return "Agar screen"; + case _0279: return "Disk induction"; + case _0127: return "Molecular, Nucleic acid probe"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _DECISIONOBSERVATIONMETHOD: return "DecisionObservationMethod"; + case ALGM: return "algorithm"; + case BYCL: return "bayesian calculation"; + case GINT: return "global introspection"; + case _GENETICOBSERVATIONMETHOD: return "GeneticObservationMethod"; + case PCR: return "PCR"; + case _OBSERVATIONMETHODAGGREGATE: return "observation method aggregate"; + case AVERAGE: return "average"; + case COUNT: return "count"; + case MAX: return "maxima"; + case MEDIAN: return "median"; + case MIN: return "minima"; + case MODE: return "mode"; + case STDEV_P: return "population standard deviation"; + case STDEV_S: return "sample standard deviation"; + case SUM: return "sum"; + case VARIANCE_P: return "population variance"; + case VARIANCE_S: return "sample variance"; + case _VERIFICATIONMETHOD: return "VerificationMethod"; + case VDOC: return "document verification"; + case VREG: return "registry verification"; + case VTOKEN: return "electronic token verification"; + case VVOICE: return "voice-based verification"; + case _0001: return "Complement fixation"; + case _0002: return "Computed axial tomography"; + case _0003: return "HLAR agar test"; + case _0004: return "Macroscopic observation"; + case _0005: return "Magnetic resonance"; + case _0006: return "Morphometry"; + case _0007: return "Positron emission tomography"; + case _0008: return "SAMHSA confirmation"; + case _0009: return "SAMHSA screening"; + case _0010: return "Serum Neutralization"; + case _0011: return "Titration"; + case _0012: return "Ultrasound"; + case _0013: return "X-ray crystallography"; + case _0014: return "Agglutination"; + case _0015: return "Buffered acidified plate agglutination"; + case _0016: return "Card agglutination"; + case _0017: return "Hemagglutination"; + case _0018: return "Hemagglutination inhibition"; + case _0019: return "Latex agglutination"; + case _0020: return "Plate agglutination"; + case _0021: return "Rapid agglutination"; + case _0022: return "RBC agglutination"; + case _0023: return "Rivanol agglutination"; + case _0024: return "Tube agglutination"; + case _0025: return "Bioassay"; + case _0026: return "Animal Inoculation"; + case _0027: return "Cytotoxicity"; + case _0028: return "Embryo infective dose 50"; + case _0029: return "Embryo lethal dose 50"; + case _0030: return "Mouse intercerebral inoculation"; + case _0031: return "Bioassay, qualitative"; + case _0032: return "Bioassay, quantitative"; + case _0033: return "Chemical method"; + case _0034: return "Differential light absorption chemical test"; + case _0035: return "Dipstick"; + case _0036: return "Dipstick colorimetric laboratory test"; + case _0037: return "Test strip"; + case _0038: return "Chromatography"; + case _0039: return "Affinity chromatography"; + case _0040: return "Gas liquid chromatography"; + case _0041: return "High performance liquid chromatography"; + case _0042: return "Liquid Chromatography"; + case _0043: return "Protein A affinity chromatography"; + case _0044: return "Coagulation"; + case _0045: return "Tilt tube coagulation time"; + case _0046: return "Tilt tube reptilase induced coagulation"; + case _0047: return "Automated count"; + case _0048: return "Manual cell count"; + case _0049: return "Platelet count, Rees-Ecker"; + case _0050: return "Aerobic Culture"; + case _0051: return "Anaerobic Culture"; + case _0052: return "Chicken embryo culture"; + case _0053: return "Delayed secondary enrichment"; + case _0054: return "Microaerophilic Culture"; + case _0055: return "Quantitative microbial culture, cup"; + case _0056: return "Quantitative microbial culture, droplet"; + case _0057: return "Quantitative microbial culture, filter paper"; + case _0058: return "Quantitative microbial culture, pad culture"; + case _0059: return "Quantitative microbial culture, pour plate"; + case _0060: return "Quantitative microbial culture, surface streak"; + case _0061: return "Somatic Cell culture"; + case _0062: return "Agar diffusion"; + case _0063: return "Agar Gel Immunodiffusion"; + case _0064: return "Electrophoresis"; + case _0065: return "Agaorse gel electrophoresis"; + case _0066: return "Electrophoresis, citrate agar"; + case _0067: return "Immunoelectrophoresis"; + case _0068: return "Polyacrylamide gel electrophoresis"; + case _0069: return "Starch gel electrophoresis"; + case _0070: return "ELISA"; + case _0071: return "ELISA, antigen capture"; + case _0072: return "ELISA, avidin biotin peroxidase complex"; + case _0073: return "Kinetic ELISA"; + case _0074: return "ELISA, peroxidase-antiperoxidase"; + case _0075: return "API 20 Strep"; + case _0076: return "API 20A"; + case _0077: return "API 20C AUX"; + case _0078: return "API 20E"; + case _0079: return "API 20NE"; + case _0080: return "API 50 CH"; + case _0081: return "API An-IDENT"; + case _0082: return "API Coryne"; + case _0083: return "API Rapid 20E"; + case _0084: return "API Staph"; + case _0085: return "API ZYM"; + case _0086: return "Bacterial identification"; + case _0087: return "mini VIDAS"; + case _0088: return "Phage susceptibility typing"; + case _0089: return "Quad-FERM+"; + case _0090: return "RAPIDEC Staph"; + case _0091: return "Staphaurex"; + case _0092: return "VIDAS"; + case _0093: return "Vitek"; + case _0094: return "VITEK 2"; + case _0095: return "Immune stain"; + case _0096: return "Immunofluorescent antibody, direct"; + case _0097: return "Immunofluorescent antibody, indirect"; + case _0098: return "Immunoperoxidase, Avidin-Biotin Complex"; + case _0099: return "Immunoperoxidase, Peroxidase anti-peroxidase complex"; + case _0100: return "Immunoperoxidase, Protein A-peroxidase complex"; + case _0101: return "Immunoassay"; + case _0102: return "Immunoassay, qualitative, multiple step"; + case _0103: return "Immunoassay, qualitative, single step"; + case _0104: return "Radioimmunoassay"; + case _0105: return "Immunoassay, semi-quantitative, multiple step"; + case _0106: return "Immunoassay, semi-quantitative, single step"; + case _0107: return "Microscopy"; + case _0108: return "Darkfield microscopy"; + case _0109: return "Electron microscopy"; + case _0110: return "Electron microscopy tomography"; + case _0111: return "Electron microscopy, negative stain"; + case _0112: return "Electron microscopy, thick section"; + case _0113: return "Electron microscopy, thin section"; + case _0114: return "Microscopy, Light"; + case _0115: return "Polarizing light microscopy"; + case _0116: return "Scanning electron microscopy"; + case _0117: return "Transmission electron microscopy"; + case _0118: return "Transparent tape direct examination"; + case _0119: return "3 Self-Sustaining Sequence Replication"; + case _0120: return "Branched Chain DNA"; + case _0121: return "Hybridization Protection Assay"; + case _0122: return "Immune blot"; + case _0123: return "In-situ hybridization"; + case _0124: return "Ligase Chain Reaction"; + case _0125: return "Ligation Activated Transcription"; + case _0126: return "Nucleic Acid Probe"; + case _0128: return "Nucleic acid probe with amplification"; + case _0129: return "Nucleic acid probe with target amplification"; + case _0130: return "Nucleic acid reverse transcription"; + case _0131: return "Nucleic Acid Sequence Based Analysis"; + case _0132: return "Polymerase chain reaction"; + case _0133: return "Q-Beta Replicase or probe amplification category method"; + case _0134: return "Restriction Fragment Length Polymorphism"; + case _0135: return "Southern Blot"; + case _0136: return "Strand Displacement Amplification"; + case _0137: return "Transcription Mediated Amplification"; + case _0138: return "Western Blot"; + case _0139: return "Flocculation"; + case _0140: return "Immune precipitation"; + case _0141: return "Milk ring test"; + case _0142: return "Precipitin"; + case _0143: return "Acid fast stain"; + case _0144: return "Acid fast stain, fluorochrome"; + case _0145: return "Acid fast stain, Kinyoun's cold carbolfuchsin"; + case _0146: return "Acid fast stain, Ziehl-Neelsen"; + case _0147: return "Acid phosphatase stain"; + case _0148: return "Acridine orange stain"; + case _0149: return "Active brilliant orange KH stain"; + case _0150: return "Alazarin red S stain"; + case _0151: return "Alcian blue stain"; + case _0152: return "Alcian blue with Periodic acid Schiff stain"; + case _0153: return "Argentaffin stain"; + case _0154: return "Argentaffin silver stain"; + case _0155: return "Azure-eosin stain"; + case _0156: return "Basic Fuschin stain"; + case _0157: return "Bennhold stain"; + case _0158: return "Bennhold's Congo red stain"; + case _0159: return "Bielschowsky stain"; + case _0160: return "Bielschowsky's silver stain"; + case _0161: return "Bleach stain"; + case _0162: return "Bodian stain"; + case _0163: return "Brown-Brenn stain"; + case _0164: return "Butyrate-esterase stain"; + case _0165: return "Calcofluor white fluorescent stain"; + case _0166: return "Carbol-fuchsin stain"; + case _0167: return "Carmine stain"; + case _0168: return "Churukian-Schenk stain"; + case _0169: return "Congo red stain"; + case _0170: return "Cresyl echt violet stain"; + case _0171: return "Crystal violet stain"; + case _0172: return "De Galantha stain"; + case _0173: return "Dieterle silver impregnation stain"; + case _0174: return "Fite-Farco stain"; + case _0175: return "Fontana-Masson silver stain"; + case _0176: return "Fouchet stain"; + case _0177: return "Gomori stain"; + case _0178: return "Gomori methenamine silver stain"; + case _0179: return "Gomori-Wheatly trichrome stain"; + case _0180: return "Gridley stain"; + case _0181: return "Grimelius silver stain"; + case _0182: return "Grocott stain"; + case _0183: return "Grocott methenamine silver stain"; + case _0184: return "Hale's colloidal ferric oxide stain"; + case _0185: return "Hale's colloidal iron stain"; + case _0186: return "Hansel stain"; + case _0187: return "Harris regressive hematoxylin and eosin stain"; + case _0188: return "Hematoxylin and eosin stain"; + case _0189: return "Highman stain"; + case _0190: return "Holzer stain"; + case _0191: return "Iron hematoxylin stain"; + case _0192: return "Jones stain"; + case _0193: return "Jones methenamine silver stain"; + case _0194: return "Kossa stain"; + case _0195: return "Lawson-Van Gieson stain"; + case _0196: return "Loeffler methylene blue stain"; + case _0197: return "Luxol fast blue with cresyl violet stain"; + case _0198: return "Luxol fast blue with Periodic acid-Schiff stain"; + case _0199: return "MacNeal's tetrachrome blood stain"; + case _0200: return "Mallory-Heidenhain stain"; + case _0201: return "Masson trichrome stain"; + case _0202: return "Mayer mucicarmine stain"; + case _0203: return "Mayers progressive hematoxylin and eosin stain"; + case _0204: return "May-Grunwald Giemsa stain"; + case _0205: return "Methyl green stain"; + case _0206: return "Methyl green pyronin stain"; + case _0207: return "Modified Gomori-Wheatly trichrome stain"; + case _0208: return "Modified Masson trichrome stain"; + case _0209: return "Modified trichrome stain"; + case _0210: return "Movat pentachrome stain"; + case _0211: return "Mucicarmine stain"; + case _0212: return "Neutral red stain"; + case _0213: return "Night blue stain"; + case _0214: return "Non-specific esterase stain"; + case _0215: return "Oil red-O stain"; + case _0216: return "Orcein stain"; + case _0217: return "Perls' stain"; + case _0218: return "Phosphotungstic acid-hematoxylin stain"; + case _0219: return "Potassium ferrocyanide stain"; + case _0220: return "Prussian blue stain"; + case _0221: return "Putchler modified Bennhold stain"; + case _0222: return "Quinacrine fluorescent stain"; + case _0223: return "Reticulin stain"; + case _0224: return "Rhodamine stain"; + case _0225: return "Safranin stain"; + case _0226: return "Schmorl stain"; + case _0227: return "Seiver-Munger stain"; + case _0228: return "Silver stain"; + case _0229: return "Specific esterase stain"; + case _0230: return "Steiner silver stain"; + case _0231: return "Sudan III stain"; + case _0232: return "Sudan IVI stain"; + case _0233: return "Sulfated alcian blue stain"; + case _0234: return "Supravital stain"; + case _0235: return "Thioflavine-S stain"; + case _0236: return "Three micron Giemsa stain"; + case _0237: return "Vassar-Culling stain"; + case _0238: return "Vital Stain"; + case _0239: return "von Kossa stain"; + case _0243: return "Minimum bactericidal concentration test, macrodilution"; + case _0244: return "Minimum bactericidal concentration test, microdilution"; + case _0247: return "Turbidometric"; + case _0248: return "Refractometric"; + case _0249: return "Thin layer chromatography (TLC)"; + case _0250: return "EMIT"; + case _0251: return "Flow cytometry (FC)"; + case _0252: return "Radial immunodiffusion (RID)"; + case _0253: return "Fluorescence polarization immunoassay (FPIA)"; + case _0254: return "Immunofixation electrophoresis (IFE)"; + case _0255: return "Equilibrium dialysis"; + case _0256: return "Kleihauer-Betke acid elution"; + case _0257: return "Anti-complement immunofluorescence (ACIF)"; + case _0258: return "GC/MS"; + case _0259: return "Nephelometry"; + case _0260: return "IgE immunoassay antibody"; + case _0261: return "Lymphocyte Microcytotoxicity Assay"; + case _0262: return "Spectrophotometry"; + case _0263: return "Atomic absorption spectrophotometry (AAS)"; + case _0264: return "Ion selective electrode (ISE)"; + case _0265: return "Gas chromatography (GC)"; + case _0266: return "Isoelectric focusing (IEF)"; + case _0267: return "Immunochemiluminescence"; + case _0268: return "Microparticle enzyme immunoassay (MEIA)"; + case _0269: return "ICP/MS"; + case _0270: return "Immunoradiometric assay (IRMA)"; + case _0271: return "Photo optical clot detection"; + case _0280: return "Susceptibility Testing"; + case _0240: return "Antibiotic sensitivity, disk"; + case _0241: return "BACTEC susceptibility test"; + case _0242: return "Disk dilution"; + case _0272: return "Minimum Inhibitory Concentration"; + case _0245: return "Minimum Inhibitory Concentration, macrodilution"; + case _0246: return "Minimum Inhibitory Concentration, microdilution"; + case _0273: return "Viral Genotype Susceptibility"; + case _0274: return "Viral Phenotype Susceptibility"; + case _0275: return "Gradient Strip"; + case _0275A: return "Minimum Lethal Concentration (MLC)"; + case _0276: return "Slow Mycobacteria Susceptibility"; + case _0277: return "Serum bactericidal titer"; + case _0278: return "Agar screen"; + case _0279: return "Disk induction"; + case _0127: return "Nucleic acid probe"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationMethodEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationMethodEnumFactory.java new file mode 100644 index 00000000000..16f0dd181c7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationMethodEnumFactory.java @@ -0,0 +1,1270 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ObservationMethodEnumFactory implements EnumFactory { + + public V3ObservationMethod fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DecisionObservationMethod".equals(codeString)) + return V3ObservationMethod._DECISIONOBSERVATIONMETHOD; + if ("ALGM".equals(codeString)) + return V3ObservationMethod.ALGM; + if ("BYCL".equals(codeString)) + return V3ObservationMethod.BYCL; + if ("GINT".equals(codeString)) + return V3ObservationMethod.GINT; + if ("_GeneticObservationMethod".equals(codeString)) + return V3ObservationMethod._GENETICOBSERVATIONMETHOD; + if ("PCR".equals(codeString)) + return V3ObservationMethod.PCR; + if ("_ObservationMethodAggregate".equals(codeString)) + return V3ObservationMethod._OBSERVATIONMETHODAGGREGATE; + if ("AVERAGE".equals(codeString)) + return V3ObservationMethod.AVERAGE; + if ("COUNT".equals(codeString)) + return V3ObservationMethod.COUNT; + if ("MAX".equals(codeString)) + return V3ObservationMethod.MAX; + if ("MEDIAN".equals(codeString)) + return V3ObservationMethod.MEDIAN; + if ("MIN".equals(codeString)) + return V3ObservationMethod.MIN; + if ("MODE".equals(codeString)) + return V3ObservationMethod.MODE; + if ("STDEV.P".equals(codeString)) + return V3ObservationMethod.STDEV_P; + if ("STDEV.S".equals(codeString)) + return V3ObservationMethod.STDEV_S; + if ("SUM".equals(codeString)) + return V3ObservationMethod.SUM; + if ("VARIANCE.P".equals(codeString)) + return V3ObservationMethod.VARIANCE_P; + if ("VARIANCE.S".equals(codeString)) + return V3ObservationMethod.VARIANCE_S; + if ("_VerificationMethod".equals(codeString)) + return V3ObservationMethod._VERIFICATIONMETHOD; + if ("VDOC".equals(codeString)) + return V3ObservationMethod.VDOC; + if ("VREG".equals(codeString)) + return V3ObservationMethod.VREG; + if ("VTOKEN".equals(codeString)) + return V3ObservationMethod.VTOKEN; + if ("VVOICE".equals(codeString)) + return V3ObservationMethod.VVOICE; + if ("0001".equals(codeString)) + return V3ObservationMethod._0001; + if ("0002".equals(codeString)) + return V3ObservationMethod._0002; + if ("0003".equals(codeString)) + return V3ObservationMethod._0003; + if ("0004".equals(codeString)) + return V3ObservationMethod._0004; + if ("0005".equals(codeString)) + return V3ObservationMethod._0005; + if ("0006".equals(codeString)) + return V3ObservationMethod._0006; + if ("0007".equals(codeString)) + return V3ObservationMethod._0007; + if ("0008".equals(codeString)) + return V3ObservationMethod._0008; + if ("0009".equals(codeString)) + return V3ObservationMethod._0009; + if ("0010".equals(codeString)) + return V3ObservationMethod._0010; + if ("0011".equals(codeString)) + return V3ObservationMethod._0011; + if ("0012".equals(codeString)) + return V3ObservationMethod._0012; + if ("0013".equals(codeString)) + return V3ObservationMethod._0013; + if ("0014".equals(codeString)) + return V3ObservationMethod._0014; + if ("0015".equals(codeString)) + return V3ObservationMethod._0015; + if ("0016".equals(codeString)) + return V3ObservationMethod._0016; + if ("0017".equals(codeString)) + return V3ObservationMethod._0017; + if ("0018".equals(codeString)) + return V3ObservationMethod._0018; + if ("0019".equals(codeString)) + return V3ObservationMethod._0019; + if ("0020".equals(codeString)) + return V3ObservationMethod._0020; + if ("0021".equals(codeString)) + return V3ObservationMethod._0021; + if ("0022".equals(codeString)) + return V3ObservationMethod._0022; + if ("0023".equals(codeString)) + return V3ObservationMethod._0023; + if ("0024".equals(codeString)) + return V3ObservationMethod._0024; + if ("0025".equals(codeString)) + return V3ObservationMethod._0025; + if ("0026".equals(codeString)) + return V3ObservationMethod._0026; + if ("0027".equals(codeString)) + return V3ObservationMethod._0027; + if ("0028".equals(codeString)) + return V3ObservationMethod._0028; + if ("0029".equals(codeString)) + return V3ObservationMethod._0029; + if ("0030".equals(codeString)) + return V3ObservationMethod._0030; + if ("0031".equals(codeString)) + return V3ObservationMethod._0031; + if ("0032".equals(codeString)) + return V3ObservationMethod._0032; + if ("0033".equals(codeString)) + return V3ObservationMethod._0033; + if ("0034".equals(codeString)) + return V3ObservationMethod._0034; + if ("0035".equals(codeString)) + return V3ObservationMethod._0035; + if ("0036".equals(codeString)) + return V3ObservationMethod._0036; + if ("0037".equals(codeString)) + return V3ObservationMethod._0037; + if ("0038".equals(codeString)) + return V3ObservationMethod._0038; + if ("0039".equals(codeString)) + return V3ObservationMethod._0039; + if ("0040".equals(codeString)) + return V3ObservationMethod._0040; + if ("0041".equals(codeString)) + return V3ObservationMethod._0041; + if ("0042".equals(codeString)) + return V3ObservationMethod._0042; + if ("0043".equals(codeString)) + return V3ObservationMethod._0043; + if ("0044".equals(codeString)) + return V3ObservationMethod._0044; + if ("0045".equals(codeString)) + return V3ObservationMethod._0045; + if ("0046".equals(codeString)) + return V3ObservationMethod._0046; + if ("0047".equals(codeString)) + return V3ObservationMethod._0047; + if ("0048".equals(codeString)) + return V3ObservationMethod._0048; + if ("0049".equals(codeString)) + return V3ObservationMethod._0049; + if ("0050".equals(codeString)) + return V3ObservationMethod._0050; + if ("0051".equals(codeString)) + return V3ObservationMethod._0051; + if ("0052".equals(codeString)) + return V3ObservationMethod._0052; + if ("0053".equals(codeString)) + return V3ObservationMethod._0053; + if ("0054".equals(codeString)) + return V3ObservationMethod._0054; + if ("0055".equals(codeString)) + return V3ObservationMethod._0055; + if ("0056".equals(codeString)) + return V3ObservationMethod._0056; + if ("0057".equals(codeString)) + return V3ObservationMethod._0057; + if ("0058".equals(codeString)) + return V3ObservationMethod._0058; + if ("0059".equals(codeString)) + return V3ObservationMethod._0059; + if ("0060".equals(codeString)) + return V3ObservationMethod._0060; + if ("0061".equals(codeString)) + return V3ObservationMethod._0061; + if ("0062".equals(codeString)) + return V3ObservationMethod._0062; + if ("0063".equals(codeString)) + return V3ObservationMethod._0063; + if ("0064".equals(codeString)) + return V3ObservationMethod._0064; + if ("0065".equals(codeString)) + return V3ObservationMethod._0065; + if ("0066".equals(codeString)) + return V3ObservationMethod._0066; + if ("0067".equals(codeString)) + return V3ObservationMethod._0067; + if ("0068".equals(codeString)) + return V3ObservationMethod._0068; + if ("0069".equals(codeString)) + return V3ObservationMethod._0069; + if ("0070".equals(codeString)) + return V3ObservationMethod._0070; + if ("0071".equals(codeString)) + return V3ObservationMethod._0071; + if ("0072".equals(codeString)) + return V3ObservationMethod._0072; + if ("0073".equals(codeString)) + return V3ObservationMethod._0073; + if ("0074".equals(codeString)) + return V3ObservationMethod._0074; + if ("0075".equals(codeString)) + return V3ObservationMethod._0075; + if ("0076".equals(codeString)) + return V3ObservationMethod._0076; + if ("0077".equals(codeString)) + return V3ObservationMethod._0077; + if ("0078".equals(codeString)) + return V3ObservationMethod._0078; + if ("0079".equals(codeString)) + return V3ObservationMethod._0079; + if ("0080".equals(codeString)) + return V3ObservationMethod._0080; + if ("0081".equals(codeString)) + return V3ObservationMethod._0081; + if ("0082".equals(codeString)) + return V3ObservationMethod._0082; + if ("0083".equals(codeString)) + return V3ObservationMethod._0083; + if ("0084".equals(codeString)) + return V3ObservationMethod._0084; + if ("0085".equals(codeString)) + return V3ObservationMethod._0085; + if ("0086".equals(codeString)) + return V3ObservationMethod._0086; + if ("0087".equals(codeString)) + return V3ObservationMethod._0087; + if ("0088".equals(codeString)) + return V3ObservationMethod._0088; + if ("0089".equals(codeString)) + return V3ObservationMethod._0089; + if ("0090".equals(codeString)) + return V3ObservationMethod._0090; + if ("0091".equals(codeString)) + return V3ObservationMethod._0091; + if ("0092".equals(codeString)) + return V3ObservationMethod._0092; + if ("0093".equals(codeString)) + return V3ObservationMethod._0093; + if ("0094".equals(codeString)) + return V3ObservationMethod._0094; + if ("0095".equals(codeString)) + return V3ObservationMethod._0095; + if ("0096".equals(codeString)) + return V3ObservationMethod._0096; + if ("0097".equals(codeString)) + return V3ObservationMethod._0097; + if ("0098".equals(codeString)) + return V3ObservationMethod._0098; + if ("0099".equals(codeString)) + return V3ObservationMethod._0099; + if ("0100".equals(codeString)) + return V3ObservationMethod._0100; + if ("0101".equals(codeString)) + return V3ObservationMethod._0101; + if ("0102".equals(codeString)) + return V3ObservationMethod._0102; + if ("0103".equals(codeString)) + return V3ObservationMethod._0103; + if ("0104".equals(codeString)) + return V3ObservationMethod._0104; + if ("0105".equals(codeString)) + return V3ObservationMethod._0105; + if ("0106".equals(codeString)) + return V3ObservationMethod._0106; + if ("0107".equals(codeString)) + return V3ObservationMethod._0107; + if ("0108".equals(codeString)) + return V3ObservationMethod._0108; + if ("0109".equals(codeString)) + return V3ObservationMethod._0109; + if ("0110".equals(codeString)) + return V3ObservationMethod._0110; + if ("0111".equals(codeString)) + return V3ObservationMethod._0111; + if ("0112".equals(codeString)) + return V3ObservationMethod._0112; + if ("0113".equals(codeString)) + return V3ObservationMethod._0113; + if ("0114".equals(codeString)) + return V3ObservationMethod._0114; + if ("0115".equals(codeString)) + return V3ObservationMethod._0115; + if ("0116".equals(codeString)) + return V3ObservationMethod._0116; + if ("0117".equals(codeString)) + return V3ObservationMethod._0117; + if ("0118".equals(codeString)) + return V3ObservationMethod._0118; + if ("0119".equals(codeString)) + return V3ObservationMethod._0119; + if ("0120".equals(codeString)) + return V3ObservationMethod._0120; + if ("0121".equals(codeString)) + return V3ObservationMethod._0121; + if ("0122".equals(codeString)) + return V3ObservationMethod._0122; + if ("0123".equals(codeString)) + return V3ObservationMethod._0123; + if ("0124".equals(codeString)) + return V3ObservationMethod._0124; + if ("0125".equals(codeString)) + return V3ObservationMethod._0125; + if ("0126".equals(codeString)) + return V3ObservationMethod._0126; + if ("0128".equals(codeString)) + return V3ObservationMethod._0128; + if ("0129".equals(codeString)) + return V3ObservationMethod._0129; + if ("0130".equals(codeString)) + return V3ObservationMethod._0130; + if ("0131".equals(codeString)) + return V3ObservationMethod._0131; + if ("0132".equals(codeString)) + return V3ObservationMethod._0132; + if ("0133".equals(codeString)) + return V3ObservationMethod._0133; + if ("0134".equals(codeString)) + return V3ObservationMethod._0134; + if ("0135".equals(codeString)) + return V3ObservationMethod._0135; + if ("0136".equals(codeString)) + return V3ObservationMethod._0136; + if ("0137".equals(codeString)) + return V3ObservationMethod._0137; + if ("0138".equals(codeString)) + return V3ObservationMethod._0138; + if ("0139".equals(codeString)) + return V3ObservationMethod._0139; + if ("0140".equals(codeString)) + return V3ObservationMethod._0140; + if ("0141".equals(codeString)) + return V3ObservationMethod._0141; + if ("0142".equals(codeString)) + return V3ObservationMethod._0142; + if ("0143".equals(codeString)) + return V3ObservationMethod._0143; + if ("0144".equals(codeString)) + return V3ObservationMethod._0144; + if ("0145".equals(codeString)) + return V3ObservationMethod._0145; + if ("0146".equals(codeString)) + return V3ObservationMethod._0146; + if ("0147".equals(codeString)) + return V3ObservationMethod._0147; + if ("0148".equals(codeString)) + return V3ObservationMethod._0148; + if ("0149".equals(codeString)) + return V3ObservationMethod._0149; + if ("0150".equals(codeString)) + return V3ObservationMethod._0150; + if ("0151".equals(codeString)) + return V3ObservationMethod._0151; + if ("0152".equals(codeString)) + return V3ObservationMethod._0152; + if ("0153".equals(codeString)) + return V3ObservationMethod._0153; + if ("0154".equals(codeString)) + return V3ObservationMethod._0154; + if ("0155".equals(codeString)) + return V3ObservationMethod._0155; + if ("0156".equals(codeString)) + return V3ObservationMethod._0156; + if ("0157".equals(codeString)) + return V3ObservationMethod._0157; + if ("0158".equals(codeString)) + return V3ObservationMethod._0158; + if ("0159".equals(codeString)) + return V3ObservationMethod._0159; + if ("0160".equals(codeString)) + return V3ObservationMethod._0160; + if ("0161".equals(codeString)) + return V3ObservationMethod._0161; + if ("0162".equals(codeString)) + return V3ObservationMethod._0162; + if ("0163".equals(codeString)) + return V3ObservationMethod._0163; + if ("0164".equals(codeString)) + return V3ObservationMethod._0164; + if ("0165".equals(codeString)) + return V3ObservationMethod._0165; + if ("0166".equals(codeString)) + return V3ObservationMethod._0166; + if ("0167".equals(codeString)) + return V3ObservationMethod._0167; + if ("0168".equals(codeString)) + return V3ObservationMethod._0168; + if ("0169".equals(codeString)) + return V3ObservationMethod._0169; + if ("0170".equals(codeString)) + return V3ObservationMethod._0170; + if ("0171".equals(codeString)) + return V3ObservationMethod._0171; + if ("0172".equals(codeString)) + return V3ObservationMethod._0172; + if ("0173".equals(codeString)) + return V3ObservationMethod._0173; + if ("0174".equals(codeString)) + return V3ObservationMethod._0174; + if ("0175".equals(codeString)) + return V3ObservationMethod._0175; + if ("0176".equals(codeString)) + return V3ObservationMethod._0176; + if ("0177".equals(codeString)) + return V3ObservationMethod._0177; + if ("0178".equals(codeString)) + return V3ObservationMethod._0178; + if ("0179".equals(codeString)) + return V3ObservationMethod._0179; + if ("0180".equals(codeString)) + return V3ObservationMethod._0180; + if ("0181".equals(codeString)) + return V3ObservationMethod._0181; + if ("0182".equals(codeString)) + return V3ObservationMethod._0182; + if ("0183".equals(codeString)) + return V3ObservationMethod._0183; + if ("0184".equals(codeString)) + return V3ObservationMethod._0184; + if ("0185".equals(codeString)) + return V3ObservationMethod._0185; + if ("0186".equals(codeString)) + return V3ObservationMethod._0186; + if ("0187".equals(codeString)) + return V3ObservationMethod._0187; + if ("0188".equals(codeString)) + return V3ObservationMethod._0188; + if ("0189".equals(codeString)) + return V3ObservationMethod._0189; + if ("0190".equals(codeString)) + return V3ObservationMethod._0190; + if ("0191".equals(codeString)) + return V3ObservationMethod._0191; + if ("0192".equals(codeString)) + return V3ObservationMethod._0192; + if ("0193".equals(codeString)) + return V3ObservationMethod._0193; + if ("0194".equals(codeString)) + return V3ObservationMethod._0194; + if ("0195".equals(codeString)) + return V3ObservationMethod._0195; + if ("0196".equals(codeString)) + return V3ObservationMethod._0196; + if ("0197".equals(codeString)) + return V3ObservationMethod._0197; + if ("0198".equals(codeString)) + return V3ObservationMethod._0198; + if ("0199".equals(codeString)) + return V3ObservationMethod._0199; + if ("0200".equals(codeString)) + return V3ObservationMethod._0200; + if ("0201".equals(codeString)) + return V3ObservationMethod._0201; + if ("0202".equals(codeString)) + return V3ObservationMethod._0202; + if ("0203".equals(codeString)) + return V3ObservationMethod._0203; + if ("0204".equals(codeString)) + return V3ObservationMethod._0204; + if ("0205".equals(codeString)) + return V3ObservationMethod._0205; + if ("0206".equals(codeString)) + return V3ObservationMethod._0206; + if ("0207".equals(codeString)) + return V3ObservationMethod._0207; + if ("0208".equals(codeString)) + return V3ObservationMethod._0208; + if ("0209".equals(codeString)) + return V3ObservationMethod._0209; + if ("0210".equals(codeString)) + return V3ObservationMethod._0210; + if ("0211".equals(codeString)) + return V3ObservationMethod._0211; + if ("0212".equals(codeString)) + return V3ObservationMethod._0212; + if ("0213".equals(codeString)) + return V3ObservationMethod._0213; + if ("0214".equals(codeString)) + return V3ObservationMethod._0214; + if ("0215".equals(codeString)) + return V3ObservationMethod._0215; + if ("0216".equals(codeString)) + return V3ObservationMethod._0216; + if ("0217".equals(codeString)) + return V3ObservationMethod._0217; + if ("0218".equals(codeString)) + return V3ObservationMethod._0218; + if ("0219".equals(codeString)) + return V3ObservationMethod._0219; + if ("0220".equals(codeString)) + return V3ObservationMethod._0220; + if ("0221".equals(codeString)) + return V3ObservationMethod._0221; + if ("0222".equals(codeString)) + return V3ObservationMethod._0222; + if ("0223".equals(codeString)) + return V3ObservationMethod._0223; + if ("0224".equals(codeString)) + return V3ObservationMethod._0224; + if ("0225".equals(codeString)) + return V3ObservationMethod._0225; + if ("0226".equals(codeString)) + return V3ObservationMethod._0226; + if ("0227".equals(codeString)) + return V3ObservationMethod._0227; + if ("0228".equals(codeString)) + return V3ObservationMethod._0228; + if ("0229".equals(codeString)) + return V3ObservationMethod._0229; + if ("0230".equals(codeString)) + return V3ObservationMethod._0230; + if ("0231".equals(codeString)) + return V3ObservationMethod._0231; + if ("0232".equals(codeString)) + return V3ObservationMethod._0232; + if ("0233".equals(codeString)) + return V3ObservationMethod._0233; + if ("0234".equals(codeString)) + return V3ObservationMethod._0234; + if ("0235".equals(codeString)) + return V3ObservationMethod._0235; + if ("0236".equals(codeString)) + return V3ObservationMethod._0236; + if ("0237".equals(codeString)) + return V3ObservationMethod._0237; + if ("0238".equals(codeString)) + return V3ObservationMethod._0238; + if ("0239".equals(codeString)) + return V3ObservationMethod._0239; + if ("0243".equals(codeString)) + return V3ObservationMethod._0243; + if ("0244".equals(codeString)) + return V3ObservationMethod._0244; + if ("0247".equals(codeString)) + return V3ObservationMethod._0247; + if ("0248".equals(codeString)) + return V3ObservationMethod._0248; + if ("0249".equals(codeString)) + return V3ObservationMethod._0249; + if ("0250".equals(codeString)) + return V3ObservationMethod._0250; + if ("0251".equals(codeString)) + return V3ObservationMethod._0251; + if ("0252".equals(codeString)) + return V3ObservationMethod._0252; + if ("0253".equals(codeString)) + return V3ObservationMethod._0253; + if ("0254".equals(codeString)) + return V3ObservationMethod._0254; + if ("0255".equals(codeString)) + return V3ObservationMethod._0255; + if ("0256".equals(codeString)) + return V3ObservationMethod._0256; + if ("0257".equals(codeString)) + return V3ObservationMethod._0257; + if ("0258".equals(codeString)) + return V3ObservationMethod._0258; + if ("0259".equals(codeString)) + return V3ObservationMethod._0259; + if ("0260".equals(codeString)) + return V3ObservationMethod._0260; + if ("0261".equals(codeString)) + return V3ObservationMethod._0261; + if ("0262".equals(codeString)) + return V3ObservationMethod._0262; + if ("0263".equals(codeString)) + return V3ObservationMethod._0263; + if ("0264".equals(codeString)) + return V3ObservationMethod._0264; + if ("0265".equals(codeString)) + return V3ObservationMethod._0265; + if ("0266".equals(codeString)) + return V3ObservationMethod._0266; + if ("0267".equals(codeString)) + return V3ObservationMethod._0267; + if ("0268".equals(codeString)) + return V3ObservationMethod._0268; + if ("0269".equals(codeString)) + return V3ObservationMethod._0269; + if ("0270".equals(codeString)) + return V3ObservationMethod._0270; + if ("0271".equals(codeString)) + return V3ObservationMethod._0271; + if ("0280".equals(codeString)) + return V3ObservationMethod._0280; + if ("0240".equals(codeString)) + return V3ObservationMethod._0240; + if ("0241".equals(codeString)) + return V3ObservationMethod._0241; + if ("0242".equals(codeString)) + return V3ObservationMethod._0242; + if ("0272".equals(codeString)) + return V3ObservationMethod._0272; + if ("0245".equals(codeString)) + return V3ObservationMethod._0245; + if ("0246".equals(codeString)) + return V3ObservationMethod._0246; + if ("0273".equals(codeString)) + return V3ObservationMethod._0273; + if ("0274".equals(codeString)) + return V3ObservationMethod._0274; + if ("0275".equals(codeString)) + return V3ObservationMethod._0275; + if ("0275a".equals(codeString)) + return V3ObservationMethod._0275A; + if ("0276".equals(codeString)) + return V3ObservationMethod._0276; + if ("0277".equals(codeString)) + return V3ObservationMethod._0277; + if ("0278".equals(codeString)) + return V3ObservationMethod._0278; + if ("0279".equals(codeString)) + return V3ObservationMethod._0279; + if ("0127".equals(codeString)) + return V3ObservationMethod._0127; + throw new IllegalArgumentException("Unknown V3ObservationMethod code '"+codeString+"'"); + } + + public String toCode(V3ObservationMethod code) { + if (code == V3ObservationMethod._DECISIONOBSERVATIONMETHOD) + return "_DecisionObservationMethod"; + if (code == V3ObservationMethod.ALGM) + return "ALGM"; + if (code == V3ObservationMethod.BYCL) + return "BYCL"; + if (code == V3ObservationMethod.GINT) + return "GINT"; + if (code == V3ObservationMethod._GENETICOBSERVATIONMETHOD) + return "_GeneticObservationMethod"; + if (code == V3ObservationMethod.PCR) + return "PCR"; + if (code == V3ObservationMethod._OBSERVATIONMETHODAGGREGATE) + return "_ObservationMethodAggregate"; + if (code == V3ObservationMethod.AVERAGE) + return "AVERAGE"; + if (code == V3ObservationMethod.COUNT) + return "COUNT"; + if (code == V3ObservationMethod.MAX) + return "MAX"; + if (code == V3ObservationMethod.MEDIAN) + return "MEDIAN"; + if (code == V3ObservationMethod.MIN) + return "MIN"; + if (code == V3ObservationMethod.MODE) + return "MODE"; + if (code == V3ObservationMethod.STDEV_P) + return "STDEV.P"; + if (code == V3ObservationMethod.STDEV_S) + return "STDEV.S"; + if (code == V3ObservationMethod.SUM) + return "SUM"; + if (code == V3ObservationMethod.VARIANCE_P) + return "VARIANCE.P"; + if (code == V3ObservationMethod.VARIANCE_S) + return "VARIANCE.S"; + if (code == V3ObservationMethod._VERIFICATIONMETHOD) + return "_VerificationMethod"; + if (code == V3ObservationMethod.VDOC) + return "VDOC"; + if (code == V3ObservationMethod.VREG) + return "VREG"; + if (code == V3ObservationMethod.VTOKEN) + return "VTOKEN"; + if (code == V3ObservationMethod.VVOICE) + return "VVOICE"; + if (code == V3ObservationMethod._0001) + return "0001"; + if (code == V3ObservationMethod._0002) + return "0002"; + if (code == V3ObservationMethod._0003) + return "0003"; + if (code == V3ObservationMethod._0004) + return "0004"; + if (code == V3ObservationMethod._0005) + return "0005"; + if (code == V3ObservationMethod._0006) + return "0006"; + if (code == V3ObservationMethod._0007) + return "0007"; + if (code == V3ObservationMethod._0008) + return "0008"; + if (code == V3ObservationMethod._0009) + return "0009"; + if (code == V3ObservationMethod._0010) + return "0010"; + if (code == V3ObservationMethod._0011) + return "0011"; + if (code == V3ObservationMethod._0012) + return "0012"; + if (code == V3ObservationMethod._0013) + return "0013"; + if (code == V3ObservationMethod._0014) + return "0014"; + if (code == V3ObservationMethod._0015) + return "0015"; + if (code == V3ObservationMethod._0016) + return "0016"; + if (code == V3ObservationMethod._0017) + return "0017"; + if (code == V3ObservationMethod._0018) + return "0018"; + if (code == V3ObservationMethod._0019) + return "0019"; + if (code == V3ObservationMethod._0020) + return "0020"; + if (code == V3ObservationMethod._0021) + return "0021"; + if (code == V3ObservationMethod._0022) + return "0022"; + if (code == V3ObservationMethod._0023) + return "0023"; + if (code == V3ObservationMethod._0024) + return "0024"; + if (code == V3ObservationMethod._0025) + return "0025"; + if (code == V3ObservationMethod._0026) + return "0026"; + if (code == V3ObservationMethod._0027) + return "0027"; + if (code == V3ObservationMethod._0028) + return "0028"; + if (code == V3ObservationMethod._0029) + return "0029"; + if (code == V3ObservationMethod._0030) + return "0030"; + if (code == V3ObservationMethod._0031) + return "0031"; + if (code == V3ObservationMethod._0032) + return "0032"; + if (code == V3ObservationMethod._0033) + return "0033"; + if (code == V3ObservationMethod._0034) + return "0034"; + if (code == V3ObservationMethod._0035) + return "0035"; + if (code == V3ObservationMethod._0036) + return "0036"; + if (code == V3ObservationMethod._0037) + return "0037"; + if (code == V3ObservationMethod._0038) + return "0038"; + if (code == V3ObservationMethod._0039) + return "0039"; + if (code == V3ObservationMethod._0040) + return "0040"; + if (code == V3ObservationMethod._0041) + return "0041"; + if (code == V3ObservationMethod._0042) + return "0042"; + if (code == V3ObservationMethod._0043) + return "0043"; + if (code == V3ObservationMethod._0044) + return "0044"; + if (code == V3ObservationMethod._0045) + return "0045"; + if (code == V3ObservationMethod._0046) + return "0046"; + if (code == V3ObservationMethod._0047) + return "0047"; + if (code == V3ObservationMethod._0048) + return "0048"; + if (code == V3ObservationMethod._0049) + return "0049"; + if (code == V3ObservationMethod._0050) + return "0050"; + if (code == V3ObservationMethod._0051) + return "0051"; + if (code == V3ObservationMethod._0052) + return "0052"; + if (code == V3ObservationMethod._0053) + return "0053"; + if (code == V3ObservationMethod._0054) + return "0054"; + if (code == V3ObservationMethod._0055) + return "0055"; + if (code == V3ObservationMethod._0056) + return "0056"; + if (code == V3ObservationMethod._0057) + return "0057"; + if (code == V3ObservationMethod._0058) + return "0058"; + if (code == V3ObservationMethod._0059) + return "0059"; + if (code == V3ObservationMethod._0060) + return "0060"; + if (code == V3ObservationMethod._0061) + return "0061"; + if (code == V3ObservationMethod._0062) + return "0062"; + if (code == V3ObservationMethod._0063) + return "0063"; + if (code == V3ObservationMethod._0064) + return "0064"; + if (code == V3ObservationMethod._0065) + return "0065"; + if (code == V3ObservationMethod._0066) + return "0066"; + if (code == V3ObservationMethod._0067) + return "0067"; + if (code == V3ObservationMethod._0068) + return "0068"; + if (code == V3ObservationMethod._0069) + return "0069"; + if (code == V3ObservationMethod._0070) + return "0070"; + if (code == V3ObservationMethod._0071) + return "0071"; + if (code == V3ObservationMethod._0072) + return "0072"; + if (code == V3ObservationMethod._0073) + return "0073"; + if (code == V3ObservationMethod._0074) + return "0074"; + if (code == V3ObservationMethod._0075) + return "0075"; + if (code == V3ObservationMethod._0076) + return "0076"; + if (code == V3ObservationMethod._0077) + return "0077"; + if (code == V3ObservationMethod._0078) + return "0078"; + if (code == V3ObservationMethod._0079) + return "0079"; + if (code == V3ObservationMethod._0080) + return "0080"; + if (code == V3ObservationMethod._0081) + return "0081"; + if (code == V3ObservationMethod._0082) + return "0082"; + if (code == V3ObservationMethod._0083) + return "0083"; + if (code == V3ObservationMethod._0084) + return "0084"; + if (code == V3ObservationMethod._0085) + return "0085"; + if (code == V3ObservationMethod._0086) + return "0086"; + if (code == V3ObservationMethod._0087) + return "0087"; + if (code == V3ObservationMethod._0088) + return "0088"; + if (code == V3ObservationMethod._0089) + return "0089"; + if (code == V3ObservationMethod._0090) + return "0090"; + if (code == V3ObservationMethod._0091) + return "0091"; + if (code == V3ObservationMethod._0092) + return "0092"; + if (code == V3ObservationMethod._0093) + return "0093"; + if (code == V3ObservationMethod._0094) + return "0094"; + if (code == V3ObservationMethod._0095) + return "0095"; + if (code == V3ObservationMethod._0096) + return "0096"; + if (code == V3ObservationMethod._0097) + return "0097"; + if (code == V3ObservationMethod._0098) + return "0098"; + if (code == V3ObservationMethod._0099) + return "0099"; + if (code == V3ObservationMethod._0100) + return "0100"; + if (code == V3ObservationMethod._0101) + return "0101"; + if (code == V3ObservationMethod._0102) + return "0102"; + if (code == V3ObservationMethod._0103) + return "0103"; + if (code == V3ObservationMethod._0104) + return "0104"; + if (code == V3ObservationMethod._0105) + return "0105"; + if (code == V3ObservationMethod._0106) + return "0106"; + if (code == V3ObservationMethod._0107) + return "0107"; + if (code == V3ObservationMethod._0108) + return "0108"; + if (code == V3ObservationMethod._0109) + return "0109"; + if (code == V3ObservationMethod._0110) + return "0110"; + if (code == V3ObservationMethod._0111) + return "0111"; + if (code == V3ObservationMethod._0112) + return "0112"; + if (code == V3ObservationMethod._0113) + return "0113"; + if (code == V3ObservationMethod._0114) + return "0114"; + if (code == V3ObservationMethod._0115) + return "0115"; + if (code == V3ObservationMethod._0116) + return "0116"; + if (code == V3ObservationMethod._0117) + return "0117"; + if (code == V3ObservationMethod._0118) + return "0118"; + if (code == V3ObservationMethod._0119) + return "0119"; + if (code == V3ObservationMethod._0120) + return "0120"; + if (code == V3ObservationMethod._0121) + return "0121"; + if (code == V3ObservationMethod._0122) + return "0122"; + if (code == V3ObservationMethod._0123) + return "0123"; + if (code == V3ObservationMethod._0124) + return "0124"; + if (code == V3ObservationMethod._0125) + return "0125"; + if (code == V3ObservationMethod._0126) + return "0126"; + if (code == V3ObservationMethod._0128) + return "0128"; + if (code == V3ObservationMethod._0129) + return "0129"; + if (code == V3ObservationMethod._0130) + return "0130"; + if (code == V3ObservationMethod._0131) + return "0131"; + if (code == V3ObservationMethod._0132) + return "0132"; + if (code == V3ObservationMethod._0133) + return "0133"; + if (code == V3ObservationMethod._0134) + return "0134"; + if (code == V3ObservationMethod._0135) + return "0135"; + if (code == V3ObservationMethod._0136) + return "0136"; + if (code == V3ObservationMethod._0137) + return "0137"; + if (code == V3ObservationMethod._0138) + return "0138"; + if (code == V3ObservationMethod._0139) + return "0139"; + if (code == V3ObservationMethod._0140) + return "0140"; + if (code == V3ObservationMethod._0141) + return "0141"; + if (code == V3ObservationMethod._0142) + return "0142"; + if (code == V3ObservationMethod._0143) + return "0143"; + if (code == V3ObservationMethod._0144) + return "0144"; + if (code == V3ObservationMethod._0145) + return "0145"; + if (code == V3ObservationMethod._0146) + return "0146"; + if (code == V3ObservationMethod._0147) + return "0147"; + if (code == V3ObservationMethod._0148) + return "0148"; + if (code == V3ObservationMethod._0149) + return "0149"; + if (code == V3ObservationMethod._0150) + return "0150"; + if (code == V3ObservationMethod._0151) + return "0151"; + if (code == V3ObservationMethod._0152) + return "0152"; + if (code == V3ObservationMethod._0153) + return "0153"; + if (code == V3ObservationMethod._0154) + return "0154"; + if (code == V3ObservationMethod._0155) + return "0155"; + if (code == V3ObservationMethod._0156) + return "0156"; + if (code == V3ObservationMethod._0157) + return "0157"; + if (code == V3ObservationMethod._0158) + return "0158"; + if (code == V3ObservationMethod._0159) + return "0159"; + if (code == V3ObservationMethod._0160) + return "0160"; + if (code == V3ObservationMethod._0161) + return "0161"; + if (code == V3ObservationMethod._0162) + return "0162"; + if (code == V3ObservationMethod._0163) + return "0163"; + if (code == V3ObservationMethod._0164) + return "0164"; + if (code == V3ObservationMethod._0165) + return "0165"; + if (code == V3ObservationMethod._0166) + return "0166"; + if (code == V3ObservationMethod._0167) + return "0167"; + if (code == V3ObservationMethod._0168) + return "0168"; + if (code == V3ObservationMethod._0169) + return "0169"; + if (code == V3ObservationMethod._0170) + return "0170"; + if (code == V3ObservationMethod._0171) + return "0171"; + if (code == V3ObservationMethod._0172) + return "0172"; + if (code == V3ObservationMethod._0173) + return "0173"; + if (code == V3ObservationMethod._0174) + return "0174"; + if (code == V3ObservationMethod._0175) + return "0175"; + if (code == V3ObservationMethod._0176) + return "0176"; + if (code == V3ObservationMethod._0177) + return "0177"; + if (code == V3ObservationMethod._0178) + return "0178"; + if (code == V3ObservationMethod._0179) + return "0179"; + if (code == V3ObservationMethod._0180) + return "0180"; + if (code == V3ObservationMethod._0181) + return "0181"; + if (code == V3ObservationMethod._0182) + return "0182"; + if (code == V3ObservationMethod._0183) + return "0183"; + if (code == V3ObservationMethod._0184) + return "0184"; + if (code == V3ObservationMethod._0185) + return "0185"; + if (code == V3ObservationMethod._0186) + return "0186"; + if (code == V3ObservationMethod._0187) + return "0187"; + if (code == V3ObservationMethod._0188) + return "0188"; + if (code == V3ObservationMethod._0189) + return "0189"; + if (code == V3ObservationMethod._0190) + return "0190"; + if (code == V3ObservationMethod._0191) + return "0191"; + if (code == V3ObservationMethod._0192) + return "0192"; + if (code == V3ObservationMethod._0193) + return "0193"; + if (code == V3ObservationMethod._0194) + return "0194"; + if (code == V3ObservationMethod._0195) + return "0195"; + if (code == V3ObservationMethod._0196) + return "0196"; + if (code == V3ObservationMethod._0197) + return "0197"; + if (code == V3ObservationMethod._0198) + return "0198"; + if (code == V3ObservationMethod._0199) + return "0199"; + if (code == V3ObservationMethod._0200) + return "0200"; + if (code == V3ObservationMethod._0201) + return "0201"; + if (code == V3ObservationMethod._0202) + return "0202"; + if (code == V3ObservationMethod._0203) + return "0203"; + if (code == V3ObservationMethod._0204) + return "0204"; + if (code == V3ObservationMethod._0205) + return "0205"; + if (code == V3ObservationMethod._0206) + return "0206"; + if (code == V3ObservationMethod._0207) + return "0207"; + if (code == V3ObservationMethod._0208) + return "0208"; + if (code == V3ObservationMethod._0209) + return "0209"; + if (code == V3ObservationMethod._0210) + return "0210"; + if (code == V3ObservationMethod._0211) + return "0211"; + if (code == V3ObservationMethod._0212) + return "0212"; + if (code == V3ObservationMethod._0213) + return "0213"; + if (code == V3ObservationMethod._0214) + return "0214"; + if (code == V3ObservationMethod._0215) + return "0215"; + if (code == V3ObservationMethod._0216) + return "0216"; + if (code == V3ObservationMethod._0217) + return "0217"; + if (code == V3ObservationMethod._0218) + return "0218"; + if (code == V3ObservationMethod._0219) + return "0219"; + if (code == V3ObservationMethod._0220) + return "0220"; + if (code == V3ObservationMethod._0221) + return "0221"; + if (code == V3ObservationMethod._0222) + return "0222"; + if (code == V3ObservationMethod._0223) + return "0223"; + if (code == V3ObservationMethod._0224) + return "0224"; + if (code == V3ObservationMethod._0225) + return "0225"; + if (code == V3ObservationMethod._0226) + return "0226"; + if (code == V3ObservationMethod._0227) + return "0227"; + if (code == V3ObservationMethod._0228) + return "0228"; + if (code == V3ObservationMethod._0229) + return "0229"; + if (code == V3ObservationMethod._0230) + return "0230"; + if (code == V3ObservationMethod._0231) + return "0231"; + if (code == V3ObservationMethod._0232) + return "0232"; + if (code == V3ObservationMethod._0233) + return "0233"; + if (code == V3ObservationMethod._0234) + return "0234"; + if (code == V3ObservationMethod._0235) + return "0235"; + if (code == V3ObservationMethod._0236) + return "0236"; + if (code == V3ObservationMethod._0237) + return "0237"; + if (code == V3ObservationMethod._0238) + return "0238"; + if (code == V3ObservationMethod._0239) + return "0239"; + if (code == V3ObservationMethod._0243) + return "0243"; + if (code == V3ObservationMethod._0244) + return "0244"; + if (code == V3ObservationMethod._0247) + return "0247"; + if (code == V3ObservationMethod._0248) + return "0248"; + if (code == V3ObservationMethod._0249) + return "0249"; + if (code == V3ObservationMethod._0250) + return "0250"; + if (code == V3ObservationMethod._0251) + return "0251"; + if (code == V3ObservationMethod._0252) + return "0252"; + if (code == V3ObservationMethod._0253) + return "0253"; + if (code == V3ObservationMethod._0254) + return "0254"; + if (code == V3ObservationMethod._0255) + return "0255"; + if (code == V3ObservationMethod._0256) + return "0256"; + if (code == V3ObservationMethod._0257) + return "0257"; + if (code == V3ObservationMethod._0258) + return "0258"; + if (code == V3ObservationMethod._0259) + return "0259"; + if (code == V3ObservationMethod._0260) + return "0260"; + if (code == V3ObservationMethod._0261) + return "0261"; + if (code == V3ObservationMethod._0262) + return "0262"; + if (code == V3ObservationMethod._0263) + return "0263"; + if (code == V3ObservationMethod._0264) + return "0264"; + if (code == V3ObservationMethod._0265) + return "0265"; + if (code == V3ObservationMethod._0266) + return "0266"; + if (code == V3ObservationMethod._0267) + return "0267"; + if (code == V3ObservationMethod._0268) + return "0268"; + if (code == V3ObservationMethod._0269) + return "0269"; + if (code == V3ObservationMethod._0270) + return "0270"; + if (code == V3ObservationMethod._0271) + return "0271"; + if (code == V3ObservationMethod._0280) + return "0280"; + if (code == V3ObservationMethod._0240) + return "0240"; + if (code == V3ObservationMethod._0241) + return "0241"; + if (code == V3ObservationMethod._0242) + return "0242"; + if (code == V3ObservationMethod._0272) + return "0272"; + if (code == V3ObservationMethod._0245) + return "0245"; + if (code == V3ObservationMethod._0246) + return "0246"; + if (code == V3ObservationMethod._0273) + return "0273"; + if (code == V3ObservationMethod._0274) + return "0274"; + if (code == V3ObservationMethod._0275) + return "0275"; + if (code == V3ObservationMethod._0275A) + return "0275a"; + if (code == V3ObservationMethod._0276) + return "0276"; + if (code == V3ObservationMethod._0277) + return "0277"; + if (code == V3ObservationMethod._0278) + return "0278"; + if (code == V3ObservationMethod._0279) + return "0279"; + if (code == V3ObservationMethod._0127) + return "0127"; + return "?"; + } + + public String toSystem(V3ObservationMethod code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationValue.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationValue.java new file mode 100644 index 00000000000..5cad6eb0c03 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationValue.java @@ -0,0 +1,2315 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ObservationValue { + + /** + * Codes specify the category of observation, evidence, or document used to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. The type of evidence is coded as observation values. + */ + _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE, + /** + * Code specifying financial indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay stub; tax or income document; asset document; living expenses. + */ + _ACTFINANCIALSTATUSOBSERVATIONVALUE, + /** + * Codes specifying asset indicators used to assess or establish eligibility for coverage under a policy or program. + */ + ASSET, + /** + * Indicator of annuity ownership or status as beneficiary. + */ + ANNUITY, + /** + * Indicator of real property ownership, e.g., deed or real estate contract. + */ + PROP, + /** + * Indicator of retirement investment account ownership. + */ + RETACCT, + /** + * Indicator of status as trust beneficiary. + */ + TRUST, + /** + * Code specifying income indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay or pension check, child support payments received or provided, and taxes paid. + */ + INCOME, + /** + * Indicator of child support payments received or provided. + */ + CHILD, + /** + * Indicator of disability income replacement payment. + */ + DISABL, + /** + * Indicator of investment income, e.g., dividend check, annuity payment; real estate rent, investment divestiture proceeds; trust or endowment check. + */ + INVEST, + /** + * Indicator of paid employment, e.g., letter of hire, contract, employer letter; copy of pay check or pay stub. + */ + PAY, + /** + * Indicator of retirement payment, e.g., pension check. + */ + RETIRE, + /** + * Indicator of spousal or partner support payments received or provided; e.g., alimony payment; support stipulations in a divorce settlement. + */ + SPOUSAL, + /** + * Indicator of income supplement, e.g., gifting, parental income support; stipend, or grant. + */ + SUPPLE, + /** + * Indicator of tax obligation or payment, e.g., statement of taxable income. + */ + TAX, + /** + * Codes specifying living expense indicators used to assess or establish eligibility for coverage under a policy or program. + */ + LIVEXP, + /** + * Indicator of clothing expenses. + */ + CLOTH, + /** + * Indicator of transportation expenses. + */ + FOOD, + /** + * Indicator of health expenses; including medication costs, health service costs, financial participations, and health coverage premiums. + */ + HEALTH, + /** + * Indicator of housing expense, e.g., household appliances, fixtures, furnishings, and maintenance and repairs. + */ + HOUSE, + /** + * Indicator of legal expenses. + */ + LEGAL, + /** + * Indicator of mortgage amount, interest, and payments. + */ + MORTG, + /** + * Indicator of rental or lease payments. + */ + RENT, + /** + * Indicator of transportation expenses. + */ + SUNDRY, + /** + * Indicator of transportation expenses, e.g., vehicle payments, vehicle insurance, vehicle fuel, and vehicle maintenance and repairs. + */ + TRANS, + /** + * Indicator of transportation expenses. + */ + UTIL, + /** + * Code specifying eligibility indicators used to assess or establish eligibility for coverage under a policy or program eligibility status, e.g., certificates of creditable coverage; student enrollment; adoption, marriage or birth certificate. + */ + ELSTAT, + /** + * Indicator of adoption. + */ + ADOPT, + /** + * Indicator of birth. + */ + BTHCERT, + /** + * Indicator of creditable coverage. + */ + CCOC, + /** + * Indicator of driving status. + */ + DRLIC, + /** + * Indicator of foster child status. + */ + FOSTER, + /** + * Indicator of status as covered member under a policy or program, e.g., member id card or coverage document. + */ + MEMBER, + /** + * Indicator of military status. + */ + MIL, + /** + * Indicator of marriage status. + */ + MRGCERT, + /** + * Indicator of citizenship. + */ + PASSPORT, + /** + * Indicator of student status. + */ + STUDENRL, + /** + * Code specifying non-clinical indicators related to health status used to assess or establish eligibility for coverage under a policy or program, e.g., pregnancy, disability, drug use, mental health issues. + */ + HLSTAT, + /** + * Indication of disability. + */ + DISABLE, + /** + * Indication of drug use. + */ + DRUG, + /** + * Indication of IV drug use . + */ + IVDRG, + /** + * Non-clinical report of pregnancy. + */ + PGNT, + /** + * Code specifying observations related to living dependency, such as dependent upon spouse for activities of daily living. + */ + LIVDEP, + /** + * Continued living in private residence requires functional and health care assistance from one or more relatives. + */ + RELDEP, + /** + * Continued living in private residence requires functional and health care assistance from spouse or life partner. + */ + SPSDEP, + /** + * Continued living in private residence requires functional and health care assistance from one or more unrelated persons. + */ + URELDEP, + /** + * Code specifying observations related to living situation for a person in a private residence. + */ + LIVSIT, + /** + * Living alone. Maps to PD1-2 Living arrangement (IS) 00742 [A] + */ + ALONE, + /** + * Living with one or more dependent children requiring moderate supervision. + */ + DEPCHD, + /** + * Living with disabled spouse requiring functional and health care assistance + */ + DEPSPS, + /** + * Living with one or more dependent children requiring intensive supervision + */ + DEPYGCHD, + /** + * Living with family. Maps to PD1-2 Living arrangement (IS) 00742 [F] + */ + FAM, + /** + * Living with one or more relatives. Maps to PD1-2 Living arrangement (IS) 00742 [R] + */ + RELAT, + /** + * Living only with spouse or life partner. Maps to PD1-2 Living arrangement (IS) 00742 [S] + */ + SPS, + /** + * Living with one or more unrelated persons. + */ + UNREL, + /** + * Code specifying observations or indicators related to socio-economic status used to assess to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. + */ + SOECSTAT, + /** + * Indication of abuse victim. + */ + ABUSE, + /** + * Indication of status as homeless. + */ + HMLESS, + /** + * Indication of status as illegal immigrant. + */ + ILGIM, + /** + * Indication of status as incarcerated. + */ + INCAR, + /** + * Indication of probation status. + */ + PROB, + /** + * Indication of refugee status. + */ + REFUG, + /** + * Indication of unemployed status. + */ + UNEMPL, + /** + * Indicates the result of a particular allergy test. E.g. Negative, Mild, Moderate, Severe + */ + _ALLERGYTESTVALUE, + /** + * Description:Patient exhibits no reaction to the challenge agent. + */ + A0, + /** + * Description:Patient exhibits a minimal reaction to the challenge agent. + */ + A1, + /** + * Description:Patient exhibits a mild reaction to the challenge agent. + */ + A2, + /** + * Description:Patient exhibits moderate reaction to the challenge agent. + */ + A3, + /** + * Description:Patient exhibits a severe reaction to the challenge agent. + */ + A4, + /** + * Observation values that communicate the method used in a quality measure to combine the component measure results included in an composite measure. + */ + _COMPOSITEMEASURESCORING, + /** + * Code specifying that the measure uses all-or-nothing scoring. All-or-nothing scoring places an individual in the numerator of the composite measure if and only if they are in the numerator of all component measures in which they are in the denominator. + */ + ALLORNONESCR, + /** + * Code specifying that the measure uses linear scoring. Linear scoring computes the fraction of component measures in which the individual appears in the numerator, giving equal weight to each component measure. + */ + LINEARSCR, + /** + * Code specifying that the measure uses opportunity-based scoring. In opportunity-based scoring the measure score is determined by combining the denominator and numerator of each component measure to determine an overall composite score. + */ + OPPORSCR, + /** + * Code specifying that the measure uses weighted scoring. Weighted scoring assigns a factor to each component measure to weight that measure's contribution to the overall score. + */ + WEIGHTSCR, + /** + * Description:Coded observation values for coverage limitations, for e.g., types of claims or types of parties covered under a policy or program. + */ + _COVERAGELIMITOBSERVATIONVALUE, + /** + * Description:Coded observation values for types of covered parties under a policy or program based on their personal relationships or employment status. + */ + _COVERAGELEVELOBSERVATIONVALUE, + /** + * Description:Child over an age as specified by coverage policy or program, e.g., student, differently abled, and income dependent. + */ + ADC, + /** + * Description:Dependent biological, adopted, foster child as specified by coverage policy or program. + */ + CHD, + /** + * Description:Person requiring functional and/or financial assistance from another person as specified by coverage policy or program. + */ + DEP, + /** + * Description:Persons registered as a family unit in a domestic partner registry as specified by law and by coverage policy or program. + */ + DP, + /** + * Description:An individual employed by an employer who receive remuneration in wages, salary, commission, tips, piece-rates, or pay-in-kind through the employeraTMs payment system (i.e., not a contractor) as specified by coverage policy or program. + */ + ECH, + /** + * Description:As specified by coverage policy or program. + */ + FLY, + /** + * Description:Person as specified by coverage policy or program. + */ + IND, + /** + * Description:A pair of people of the same gender who live together as a family as specified by coverage policy or program, e.g., Naomi and Ruth from the Book of Ruth; Socrates and Alcibiades + */ + SSP, + /** + * A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality. + */ + _CRITICALITYOBSERVATIONVALUE, + /** + * Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure. + */ + CRITH, + /** + * Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure. + */ + CRITL, + /** + * Unable to assess the worst case result of a future exposure. + */ + CRITU, + /** + * Description: The domain contains genetic analysis specific observation values, e.g. Homozygote, Heterozygote, etc. + */ + _GENETICOBSERVATIONVALUE, + /** + * Description: An individual having different alleles at one or more loci regarding a specific character + */ + HOMOZYGOTE, + /** + * Observation values used to indicate the type of scoring (e.g. proportion, ratio) used by a health quality measure. + */ + _OBSERVATIONMEASURESCORING, + /** + * A measure in which either short-term cross-section or long-term longitudinal analysis is performed over a group of subjects defined by a set of common properties or defining characteristics (e.g., Male smokers between the ages of 40 and 50 years, exposure to treatment, exposure duration). + */ + COHORT, + /** + * A measure score in which each individual value for the measure can fall anywhere along a continuous scale (e.g., mean time to thrombolytics which aggregates the time in minutes from a case presenting with chest pain to the time of administration of thrombolytics). + */ + CONTVAR, + /** + * A score derived by dividing the number of cases that meet a criterion for quality (the numerator) by the number of eligible cases within a given time frame (the denominator) where the numerator cases are a subset of the denominator cases (e.g., percentage of eligible women with a mammogram performed in the last year). + */ + PROPOR, + /** + * A score that may have a value of zero or greater that is derived by dividing a count of one type of data by a count of another type of data (e.g., the number of patients with central lines who develop infection divided by the number of central line days). + */ + RATIO, + /** + * Observation values used to indicate what kind of health quality measure is used. + */ + _OBSERVATIONMEASURETYPE, + /** + * A measure that is composed from one or more other measures and indicates an overall summary of those measures. + */ + COMPOSITE, + /** + * A measure related to the efficiency of medical treatment. + */ + EFFICIENCY, + /** + * A measure related to the level of patient engagement or patient experience of care. + */ + EXPERIENCE, + /** + * A measure that indicates the result of the performance (or non-performance) of a function or process. + */ + OUTCOME, + /** + * A measure that evaluates the change over time of a physiologic state observable that is associated with a specific long-term health outcome. + */ + INTERMOM, + /** + * A measure that is a comparison of patient reported outcomes for a single or multiple patients collected via an instrument specifically designed to obtain input directly from patients. + */ + PROPM, + /** + * A measure which focuses on a process which leads to a certain outcome, meaning that a scientific basis exists for believing that the process, when executed well, will increase the probability of achieving a desired outcome. + */ + PROCESS, + /** + * A measure that assesses the use of one or more processes where the expected health benefit exceeds the expected negative consequences. + */ + APPROPRIATE, + /** + * A measure related to the extent of use of clinical resources or cost of care. + */ + RESOURCE, + /** + * A measure related to the structure of patient care. + */ + STRUCTURE, + /** + * Observation values used to assert various populations that a subject falls into. + */ + _OBSERVATIONPOPULATIONINCLUSION, + /** + * Patients who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator. + */ + DENEX, + /** + * Denominator exceptions are those conditions that should remove a patient, procedure or unit of measurement from the denominator only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories: + + + Medical reasons + Patient reasons + System reasons + */ + DENEXCEP, + /** + * It can be the same as the initial patient population or a subset of the initial patient population to further constrain the population for the purpose of the eMeasure. Different measures within an eMeasure set may have different Denominators. Continuous Variable eMeasures do not have a Denominator, but instead define a Measure Population. + */ + DENOM, + /** + * The initial population refers to all entities to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs. + */ + IP, + /** + * The initial patient population refers to all patients to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs. Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods. + */ + IPP, + /** + * Measure population is used only in continuous variable eMeasures. It is a narrative description of the eMeasure population. +(e.g., all patients seen in the Emergency Department during the measurement period). + */ + MSRPOPL, + /** + * Numerators are used in proportion and ratio eMeasures. In proportion measures the numerator criteria are the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator. In ratio measures the numerator is related, but not directly derived from the denominator (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period). + */ + NUMER, + /** + * Numerator Exclusions are used only in ratio eMeasures to define instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion.) + */ + NUMEX, + /** + * PartialCompletionScale + */ + _PARTIALCOMPLETIONSCALE, + /** + * Value for Act.partialCompletionCode attribute that implies 81-99% completion + */ + G, + /** + * Value for Act.partialCompletionCode attribute that implies 61-80% completion + */ + LE, + /** + * Value for Act.partialCompletionCode attribute that implies 41-60% completion + */ + ME, + /** + * Value for Act.partialCompletionCode attribute that implies 1-20% completion + */ + MI, + /** + * Value for Act.partialCompletionCode attribute that implies 0% completion + */ + N, + /** + * Value for Act.partialCompletionCode attribute that implies 21-40% completion + */ + S, + /** + * Observation values used to indicate security observation metadata. + */ + _SECURITYOBSERVATIONVALUE, + /** + * Abstract security observation values used to indicate security integrity metadata. + + + Examples: Codes conveying integrity status, integrity confidence, and provenance. + */ + _SECINTOBV, + /** + * Abstract security metadata observation values used to indicate mechanism used for authorized alteration of an IT resource (data, information object, service, or system capability) + */ + _SECALTINTOBV, + /** + * Security metadata observation values used to indicate the use of a more abstract version of the content, e.g., replacing exact value of an age or date field with a range, or remove the left digits of a credit card number or SSN. + */ + ABSTRED, + /** + * Security metadata observation values used to indicate the use of an algorithmic combination of actual values with the result of an aggregate function, e.g., average, sum, or count in order to limit disclosure of an IT resource (data, information object, service, or system capability) to the minimum necessary. + */ + AGGRED, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by used to indicate the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. No key to relink the data is retained. + */ + ANONYED, + /** + * Security metadata observation value used to indicate that the IT resource semantic content has been transformed from one encoding to another. + + + Usage Note: "MAP" code does not indicate the semantic fidelity of the transformed content. + + To indicate semantic fidelity for maps of HL7 to other code systems, this security alteration integrity observation may be further specified using an Act valued with Value Set: MapRelationship (2.16.840.1.113883.1.11.11052). + + Semantic fidelity of the mapped IT Resource may also be indicated using a SecurityIntegrityConfidenceObservation. + */ + MAPPED, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by indicating the mechanism by which software systems can make data unintelligible (that is, as unreadable and unusable by algorithmically transforming plaintext into ciphertext) such that it can only be accessed or used by authorized users. An authorized user may be provided a key to decrypt per license or "shared secret". + + + Usage Note: "MASKED" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has been further encrypted, and may be accessed only by an authorized user or receiver to which a decryption key is provided. + */ + MASKED, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability), by indicating the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject. + + + Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.,for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization + */ + PSEUDED, + /** + * Security metadata observation value used to indicate the mechanism by which software systems can filter an IT resource (data, information object, service, or system capability) to remove any portion of the resource that is not authorized to be access, used, or disclosed. + + + Usage Note: "REDACTED" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has filtered and not included in the content accessed or received. + */ + REDACTED, + /** + * Metadata observation used to indicate that some information has been removed from the source object when the view this object contains was constructed because of configuration options when the view was created. The content may not be suitable for use as the basis of a record update + + + Usage Note: This is not suitable to be used when information is removed for security reasons - see the code REDACTED for this use. + */ + SUBSETTED, + /** + * Security metadata observation value used to indicate that the IT resource syntax has been transformed from one syntactical representation to another. + + + Usage Note: "SYNTAC" code does not indicate the syntactical correctness of the syntactically transformed IT resource. + */ + SYNTAC, + /** + * Security metadata observation value used to indicate that the IT resource has been translated from one human language to another. + + + Usage Note: "TRSLT" does not indicate the fidelity of the translation or the languages translated. + + The fidelity of the IT Resource translation may be indicated using a SecurityIntegrityConfidenceObservation. + + To indicate languages, use the Value Set:HumanLanguage (2.16.840.1.113883.1.11.11526) + */ + TRSLT, + /** + * Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) which indicates that the resource only retains versions of an IT resource for access and use per applicable policy + + + Usage Note: When this code is used, expectation is that the system has removed historical versions of the data that falls outside the time period deemed to be the effective time of the applicable version. + */ + VERSIONED, + /** + * Abstract security observation values used to indicate data integrity metadata. + + + Examples: Codes conveying the mechanism used to preserve the accuracy and consistency of an IT resource such as a digital signature and a cryptographic hash function. + */ + _SECDATINTOBV, + /** + * Security metadata observation value used to indicate the mechanism by which software systems can establish that data was not modified in transit. + + + Rationale: This definition is intended to align with the ISO 22600-2 3.3.19 definition of cryptographic checkvalue: Information which is derived by performing a cryptographic transformation (see cryptography) on the data unit. The derivation of the checkvalue may be performed in one or more steps and is a result of a mathematical function of the key and a data unit. It is usually used to check the integrity of a data unit. + + + Examples: + + + + SHA-1 + SHA-2 (Secure Hash Algorithm) + */ + CRYTOHASH, + /** + * Security metadata observation value used to indicate the mechanism by which software systems use digital signature to establish that data has not been modified. + + + Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g., by the recipient. + */ + DIGSIG, + /** + * Abstract security observation value used to indicate integrity confidence metadata. + + + Examples: Codes conveying the level of reliability and trustworthiness of an IT resource. + */ + _SECINTCONOBV, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be very high. + */ + HRELIABLE, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be adequate. + */ + RELIABLE, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be uncertain. + */ + UNCERTREL, + /** + * Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be inadequate. + */ + UNRELIABLE, + /** + * Abstract security metadata observation value used to indicate the provenance of an IT resource (data, information object, service, or system capability). + + + Examples: Codes conveying the provenance metadata about the entity reporting an IT resource. + */ + _SECINTPRVOBV, + /** + * Abstract security provenance metadata observation value used to indicate the entity that asserted an IT resource (data, information object, service, or system capability). + + + Examples: Codes conveying the provenance metadata about the entity asserting the resource. + */ + _SECINTPRVABOBV, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a clinician. + */ + CLINAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a device. + */ + DEVAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a healthcare professional. + */ + HCPAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient acquaintance. + */ + PACQAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient. + */ + PATAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a payer. + */ + PAYAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a professional. + */ + PROAST, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a substitute decision maker. + */ + SDMAST, + /** + * Abstract security provenance metadata observation value used to indicate the entity that reported the resource (data, information object, service, or system capability). + + + Examples: Codes conveying the provenance metadata about the entity reporting an IT resource. + */ + _SECINTPRVRBOBV, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a clinician. + */ + CLINRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a device. + */ + DEVRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a healthcare professional. + */ + HCPRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient acquaintance. + */ + PACQRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient. + */ + PATRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a payer. + */ + PAYRPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a professional. + */ + PRORPT, + /** + * Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a substitute decision maker. + */ + SDMRPT, + /** + * Observation value used to indicate aspects of trust applicable to an IT resource (data, information object, service, or system capability). + */ + SECTRSTOBV, + /** + * Values for security trust accreditation metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework. + */ + TRSTACCRDOBV, + /** + * Values for security trust agreement metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1] +[ISO IEC 10181-1] + */ + TRSTAGREOBV, + /** + * Values for security trust certificate metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1] + + For example, a Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. A particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. Another example is Cross Certification with Federal Bridge. + */ + TRSTCERTOBV, + /** + * Values for security trust assurance metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol. + */ + TRSTLOAOBV, + /** + * The value assigned as the indicator of the digital quality or reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + For example, the degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + */ + LOAAN, + /** + * Indicator of low digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + Low authentication level of assurance indicates that the relying party may have little or no confidence in the asserted identity's validity. Level 1 requires little or no confidence in the asserted identity. No identity proofing is required at this level, but the authentication mechanism should provide some assurance that the same claimant is accessing the protected transaction or data. A wide range of available authentication technologies can be employed and any of the token methods of Levels 2, 3, or 4, including Personal Identification Numbers (PINs), may be used. To be authenticated, the claimant must prove control of the token through a secure authentication protocol. At Level 1, long-term shared authentication secrets may be revealed to verifiers. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN1, + /** + * Indicator of basic digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + Basic authentication level of assurance indicates that the relying party may have some confidence in the asserted identity's validity. Level 2 requires confidence that the asserted identity is accurate. Level 2 provides for single-factor remote network authentication, including identity-proofing requirements for presentation of identifying materials or information. A wide range of available authentication technologies can be employed, including any of the token methods of Levels 3 or 4, as well as passwords. Successful authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, and online guessing attacks are prevented. +Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are required. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN2, + /** + * Indicator of medium digital quality or reliability of the digital reliability of verification and validation of the process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + Medium authentication level of assurance indicates that the relying party may have high confidence in the asserted identity's validity. Level 3 is appropriate for transactions that need high confidence in the accuracy of the asserted identity. Level 3 provides multifactor remote network authentication. At this level, identity-proofing procedures require verification of identifying materials and information. Authentication is based on proof of possession of a key or password through a cryptographic protocol. Cryptographic strength mechanisms should protect the primary authentication token (a cryptographic key) against compromise by the protocol threats, including eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks. A minimum of two authentication factors is required. Three kinds of tokens may be used: + + + "soft" cryptographic token, which has the key stored on a general-purpose computer, + "hard" cryptographic token, which has the key stored on a special hardware device, and + "one-time password" device token, which has symmetric key stored on a personal hardware device that is a cryptographic module validated at FIPS 140-2 Level 1 or higher. Validation testing of cryptographic modules and algorithms for conformance to Federal Information Processing Standard (FIPS) 140-2, Security Requirements for Cryptographic Modules, is managed by NIST. + + Authentication requires that the claimant prove control of the token through a secure authentication protocol. The token must be unlocked with a password or biometric representation, or a password must be used in a secure authentication protocol, to establish two-factor authentication. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are used for all operations. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN3, + /** + * Indicator of high digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] + + The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] + + High authentication level of assurance indicates that the relying party may have very high confidence in the asserted identity's validity. Level 4 is for transactions that need very high confidence in the accuracy of the asserted identity. Level 4 provides the highest practical assurance of remote network authentication. Authentication is based on proof of possession of a key through a cryptographic protocol. This level is similar to Level 3 except that only “hard� cryptographic tokens are allowed, cryptographic module validation requirements are strengthened, and subsequent critical data transfers must be authenticated via a key that is bound to the authentication process. The token should be a hardware cryptographic module validated at FIPS 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. This level requires a physical token, which cannot readily be copied, and operator authentication at Level 2 and higher, and ensures good, two-factor remote authentication. + + Level 4 requires strong cryptographic authentication of all parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks are prevented. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Strong approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAN4, + /** + * The value assigned as the indicator of the digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + */ + LOAAP, + /** + * Indicator of the low digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + Low authentication process level of assurance indicates that (1) long-term shared authentication secrets may be revealed to verifiers; and (2) assertions and assertion references require protection from manufacture/modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAP1, + /** + * Indicator of the basic digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + Basic authentication process level of assurance indicates that long-term shared authentication secrets are never revealed to any other party except Credential Service Provider (CSP). Sessions (temporary) shared secrets may be provided to independent verifiers by CSP. Long-term shared authentication secrets, if used, are never revealed to any other party except Verifiers operated by the Credential Service Provider (CSP); however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 1 requirements, assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAP2, + /** + * Indicator of the medium digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + Medium authentication process level of assurance indicates that the token can be unlocked with password, biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication. Long-term shared authentication secrets are never revealed to any party except the Claimant and Credential Service Provider (CSP). + + Authentication requires that the Claimant prove, through a secure authentication protocol, that he or she controls the token. The Claimant unlocks the token with a password or biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication (through proof of possession of a physical or software token in combination with some memorized secret knowledge). Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 2 requirements, assertions are protected against repudiation by the Verifier. + */ + LOAAP3, + /** + * Indicator of the high digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2] + + High authentication process level of assurance indicates all sensitive data transfer are cryptographically authenticated using keys bound to the authentication process. Level 4 requires strong cryptographic authentication of all communicating parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the Claimant prove through a secure authentication protocol that he or she controls the token. All protocol threats at Level 3 are required to be prevented at Level 4. Protocols shall also be strongly resistant to man-in-the-middle attacks. Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. Approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAP4, + /** + * The value assigned as the indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + */ + LOAAS, + /** + * Indicator of the low quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Assertions and assertion references require protection from modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS1, + /** + * Indicator of the basic quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required for all assertion protocols. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS2, + /** + * Indicator of the medium quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Assertions are protected against repudiation by the verifier. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS3, + /** + * Indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes. + + Strongly resistant to man-in-the-middle attacks. "Bearer" assertions are not used. "Holder-of-key" assertions may be used. RP maintains records of the assertions. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.] + */ + LOAAS4, + /** + * Indicator of the digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM, + /** + * Indicator of the low digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Little or no confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include weak identity binding to tokens and plaintext passwords or secrets not transmitted across a network. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM1, + /** + * Indicator of the basic digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Some confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verification must prove claimant controls the token; token resists online guessing, replay, session hijacking, and eavesdropping attacks; and token is at least weakly resistant to man-in-the middle attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM2, + /** + * Indicator of the medium digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. High confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Ownership of token verifiable through security authentication protocol and credential management protects against verifier impersonation attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM3, + /** + * Indicator of the high digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. Very high confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verifier can prove control of token through a secure protocol; credential management supports strong cryptographic authentication of all communication parties. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOACM4, + /** + * Indicator of the quality or reliability in the process of ascertaining that an individual is who he or she claims to be. + */ + LOAID, + /** + * Indicator of low digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires that a continuity of identity be maintained but does not require identity proofing. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID1, + /** + * Indicator of some digital quality or reliability in the process of ascertaining that that an individual is who he or she claims to be. Requires identity proofing via presentation of identifying material or information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID2, + /** + * Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID3, + /** + * Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOAID4, + /** + * Indicator of the digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR, + /** + * Indicator of low digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR1, + /** + * Indicator of basic digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR2, + /** + * Indicator of medium digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR3, + /** + * Indicator of high digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2] + */ + LOANR4, + /** + * Indicator of the digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA, + /** + * Indicator of low digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA1, + /** + * Indicator of basic digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA2, + /** + * Indicator of medium digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2] + */ + LOARA3, + /** + * Indicator of high digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization's security controls. [Based on NIST SP 800-63-2] + */ + LOARA4, + /** + * Indicator of the digital quality or reliability of single and multi-token authentication. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK, + /** + * Indicator of the low digital quality or reliability of single and multi-token authentication. Permits the use of any of the token methods of Levels 2, 3, or 4. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK1, + /** + * Indicator of the basic digital quality or reliability of single and multi-token authentication. Requires single factor authentication using memorized secret tokens, pre-registered knowledge tokens, look-up secret tokens, out of band tokens, or single factor one-time password devices. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK2, + /** + * Indicator of the medium digital quality or reliability of single and multi-token authentication. Requires two authentication factors. Provides multi-factor remote network authentication. Permits multi-factor software cryptographic token. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK3, + /** + * Indicator of the high digital quality or reliability of single and multi-token authentication. Requires token that is a hardware cryptographic module validated at validated at Federal Information Processing Standard (FIPS) 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. Level 4 token requirements can be met by using the PIV authentication key of a FIPS 201 compliant Personal Identity Verification (PIV) Card. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011] + */ + LOATK4, + /** + * Values for security trust mechanism metadata observation made about a security architecture system component that supports enforcement of security policies. + */ + TRSTMECOBV, + /** + * Potential values for observations of severity. + */ + _SEVERITYOBSERVATION, + /** + * Indicates the condition may be life-threatening or has the potential to cause permanent injury. + */ + H, + /** + * Indicates the condition may result in some adverse consequences but is unlikely to substantially affect the situation of the subject. + */ + L, + /** + * Indicates the condition may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury. + */ + M, + /** + * Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted. + */ + _SUBJECTBODYPOSITION, + /** + * Lying on the left side. + */ + LLD, + /** + * Lying with the front or ventral surface downward; lying face down. + */ + PRN, + /** + * Lying on the right side. + */ + RLD, + /** + * A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees. + */ + SFWL, + /** + * Resting the body on the buttocks, typically with upper torso erect or semi erect. + */ + SIT, + /** + * To be stationary, upright, vertical, on one's legs. + */ + STN, + /** + * supine + */ + SUP, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered. + */ + RTRD, + /** + * Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised. + */ + TRD, + /** + * Values for observations of verification act results + + + Examples: Verified, not verified, verified with warning. + */ + _VERIFICATIONOUTCOMEVALUE, + /** + * Definition: Coverage is in effect for healthcare service(s) and/or product(s). + */ + ACT, + /** + * Definition: Coverage is in effect for healthcare service(s) and/or product(s) - Pending Investigation + */ + ACTPEND, + /** + * Definition: Coverage is in effect for healthcare service(s) and/or product(s). + */ + ELG, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s). + */ + INACT, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Investigation. + */ + INPNDINV, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Eligibility Update. + */ + INPNDUPD, + /** + * Definition: Coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility. + */ + NELG, + /** + * AnnotationValue + */ + _ANNOTATIONVALUE, + /** + * Description:Used in a patient care message to value simple clinical (non-lab) observations. + */ + _COMMONCLINICALOBSERVATIONVALUE, + /** + * This domain is established as a parent to a variety of value domains being defined to support the communication of Individual Case Safety Reports to regulatory bodies. Arguably, this aggregation is not taxonomically pure, but the grouping will facilitate the management of these domains. + */ + _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS, + /** + * Indicates the specific observation result which is the reason for the action (prescription, lab test, etc.). E.g. Headache, Ear infection, planned diagnostic image (requiring contrast agent), etc. + */ + _INDICATIONVALUE, + /** + * added to help the parsers + */ + NULL; + public static V3ObservationValue fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActCoverageAssessmentObservationValue".equals(codeString)) + return _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE; + if ("_ActFinancialStatusObservationValue".equals(codeString)) + return _ACTFINANCIALSTATUSOBSERVATIONVALUE; + if ("ASSET".equals(codeString)) + return ASSET; + if ("ANNUITY".equals(codeString)) + return ANNUITY; + if ("PROP".equals(codeString)) + return PROP; + if ("RETACCT".equals(codeString)) + return RETACCT; + if ("TRUST".equals(codeString)) + return TRUST; + if ("INCOME".equals(codeString)) + return INCOME; + if ("CHILD".equals(codeString)) + return CHILD; + if ("DISABL".equals(codeString)) + return DISABL; + if ("INVEST".equals(codeString)) + return INVEST; + if ("PAY".equals(codeString)) + return PAY; + if ("RETIRE".equals(codeString)) + return RETIRE; + if ("SPOUSAL".equals(codeString)) + return SPOUSAL; + if ("SUPPLE".equals(codeString)) + return SUPPLE; + if ("TAX".equals(codeString)) + return TAX; + if ("LIVEXP".equals(codeString)) + return LIVEXP; + if ("CLOTH".equals(codeString)) + return CLOTH; + if ("FOOD".equals(codeString)) + return FOOD; + if ("HEALTH".equals(codeString)) + return HEALTH; + if ("HOUSE".equals(codeString)) + return HOUSE; + if ("LEGAL".equals(codeString)) + return LEGAL; + if ("MORTG".equals(codeString)) + return MORTG; + if ("RENT".equals(codeString)) + return RENT; + if ("SUNDRY".equals(codeString)) + return SUNDRY; + if ("TRANS".equals(codeString)) + return TRANS; + if ("UTIL".equals(codeString)) + return UTIL; + if ("ELSTAT".equals(codeString)) + return ELSTAT; + if ("ADOPT".equals(codeString)) + return ADOPT; + if ("BTHCERT".equals(codeString)) + return BTHCERT; + if ("CCOC".equals(codeString)) + return CCOC; + if ("DRLIC".equals(codeString)) + return DRLIC; + if ("FOSTER".equals(codeString)) + return FOSTER; + if ("MEMBER".equals(codeString)) + return MEMBER; + if ("MIL".equals(codeString)) + return MIL; + if ("MRGCERT".equals(codeString)) + return MRGCERT; + if ("PASSPORT".equals(codeString)) + return PASSPORT; + if ("STUDENRL".equals(codeString)) + return STUDENRL; + if ("HLSTAT".equals(codeString)) + return HLSTAT; + if ("DISABLE".equals(codeString)) + return DISABLE; + if ("DRUG".equals(codeString)) + return DRUG; + if ("IVDRG".equals(codeString)) + return IVDRG; + if ("PGNT".equals(codeString)) + return PGNT; + if ("LIVDEP".equals(codeString)) + return LIVDEP; + if ("RELDEP".equals(codeString)) + return RELDEP; + if ("SPSDEP".equals(codeString)) + return SPSDEP; + if ("URELDEP".equals(codeString)) + return URELDEP; + if ("LIVSIT".equals(codeString)) + return LIVSIT; + if ("ALONE".equals(codeString)) + return ALONE; + if ("DEPCHD".equals(codeString)) + return DEPCHD; + if ("DEPSPS".equals(codeString)) + return DEPSPS; + if ("DEPYGCHD".equals(codeString)) + return DEPYGCHD; + if ("FAM".equals(codeString)) + return FAM; + if ("RELAT".equals(codeString)) + return RELAT; + if ("SPS".equals(codeString)) + return SPS; + if ("UNREL".equals(codeString)) + return UNREL; + if ("SOECSTAT".equals(codeString)) + return SOECSTAT; + if ("ABUSE".equals(codeString)) + return ABUSE; + if ("HMLESS".equals(codeString)) + return HMLESS; + if ("ILGIM".equals(codeString)) + return ILGIM; + if ("INCAR".equals(codeString)) + return INCAR; + if ("PROB".equals(codeString)) + return PROB; + if ("REFUG".equals(codeString)) + return REFUG; + if ("UNEMPL".equals(codeString)) + return UNEMPL; + if ("_AllergyTestValue".equals(codeString)) + return _ALLERGYTESTVALUE; + if ("A0".equals(codeString)) + return A0; + if ("A1".equals(codeString)) + return A1; + if ("A2".equals(codeString)) + return A2; + if ("A3".equals(codeString)) + return A3; + if ("A4".equals(codeString)) + return A4; + if ("_CompositeMeasureScoring".equals(codeString)) + return _COMPOSITEMEASURESCORING; + if ("ALLORNONESCR".equals(codeString)) + return ALLORNONESCR; + if ("LINEARSCR".equals(codeString)) + return LINEARSCR; + if ("OPPORSCR".equals(codeString)) + return OPPORSCR; + if ("WEIGHTSCR".equals(codeString)) + return WEIGHTSCR; + if ("_CoverageLimitObservationValue".equals(codeString)) + return _COVERAGELIMITOBSERVATIONVALUE; + if ("_CoverageLevelObservationValue".equals(codeString)) + return _COVERAGELEVELOBSERVATIONVALUE; + if ("ADC".equals(codeString)) + return ADC; + if ("CHD".equals(codeString)) + return CHD; + if ("DEP".equals(codeString)) + return DEP; + if ("DP".equals(codeString)) + return DP; + if ("ECH".equals(codeString)) + return ECH; + if ("FLY".equals(codeString)) + return FLY; + if ("IND".equals(codeString)) + return IND; + if ("SSP".equals(codeString)) + return SSP; + if ("_CriticalityObservationValue".equals(codeString)) + return _CRITICALITYOBSERVATIONVALUE; + if ("CRITH".equals(codeString)) + return CRITH; + if ("CRITL".equals(codeString)) + return CRITL; + if ("CRITU".equals(codeString)) + return CRITU; + if ("_GeneticObservationValue".equals(codeString)) + return _GENETICOBSERVATIONVALUE; + if ("Homozygote".equals(codeString)) + return HOMOZYGOTE; + if ("_ObservationMeasureScoring".equals(codeString)) + return _OBSERVATIONMEASURESCORING; + if ("COHORT".equals(codeString)) + return COHORT; + if ("CONTVAR".equals(codeString)) + return CONTVAR; + if ("PROPOR".equals(codeString)) + return PROPOR; + if ("RATIO".equals(codeString)) + return RATIO; + if ("_ObservationMeasureType".equals(codeString)) + return _OBSERVATIONMEASURETYPE; + if ("COMPOSITE".equals(codeString)) + return COMPOSITE; + if ("EFFICIENCY".equals(codeString)) + return EFFICIENCY; + if ("EXPERIENCE".equals(codeString)) + return EXPERIENCE; + if ("OUTCOME".equals(codeString)) + return OUTCOME; + if ("INTERM-OM".equals(codeString)) + return INTERMOM; + if ("PRO-PM".equals(codeString)) + return PROPM; + if ("PROCESS".equals(codeString)) + return PROCESS; + if ("APPROPRIATE".equals(codeString)) + return APPROPRIATE; + if ("RESOURCE".equals(codeString)) + return RESOURCE; + if ("STRUCTURE".equals(codeString)) + return STRUCTURE; + if ("_ObservationPopulationInclusion".equals(codeString)) + return _OBSERVATIONPOPULATIONINCLUSION; + if ("DENEX".equals(codeString)) + return DENEX; + if ("DENEXCEP".equals(codeString)) + return DENEXCEP; + if ("DENOM".equals(codeString)) + return DENOM; + if ("IP".equals(codeString)) + return IP; + if ("IPP".equals(codeString)) + return IPP; + if ("MSRPOPL".equals(codeString)) + return MSRPOPL; + if ("NUMER".equals(codeString)) + return NUMER; + if ("NUMEX".equals(codeString)) + return NUMEX; + if ("_PartialCompletionScale".equals(codeString)) + return _PARTIALCOMPLETIONSCALE; + if ("G".equals(codeString)) + return G; + if ("LE".equals(codeString)) + return LE; + if ("ME".equals(codeString)) + return ME; + if ("MI".equals(codeString)) + return MI; + if ("N".equals(codeString)) + return N; + if ("S".equals(codeString)) + return S; + if ("_SecurityObservationValue".equals(codeString)) + return _SECURITYOBSERVATIONVALUE; + if ("_SECINTOBV".equals(codeString)) + return _SECINTOBV; + if ("_SECALTINTOBV".equals(codeString)) + return _SECALTINTOBV; + if ("ABSTRED".equals(codeString)) + return ABSTRED; + if ("AGGRED".equals(codeString)) + return AGGRED; + if ("ANONYED".equals(codeString)) + return ANONYED; + if ("MAPPED".equals(codeString)) + return MAPPED; + if ("MASKED".equals(codeString)) + return MASKED; + if ("PSEUDED".equals(codeString)) + return PSEUDED; + if ("REDACTED".equals(codeString)) + return REDACTED; + if ("SUBSETTED".equals(codeString)) + return SUBSETTED; + if ("SYNTAC".equals(codeString)) + return SYNTAC; + if ("TRSLT".equals(codeString)) + return TRSLT; + if ("VERSIONED".equals(codeString)) + return VERSIONED; + if ("_SECDATINTOBV".equals(codeString)) + return _SECDATINTOBV; + if ("CRYTOHASH".equals(codeString)) + return CRYTOHASH; + if ("DIGSIG".equals(codeString)) + return DIGSIG; + if ("_SECINTCONOBV".equals(codeString)) + return _SECINTCONOBV; + if ("HRELIABLE".equals(codeString)) + return HRELIABLE; + if ("RELIABLE".equals(codeString)) + return RELIABLE; + if ("UNCERTREL".equals(codeString)) + return UNCERTREL; + if ("UNRELIABLE".equals(codeString)) + return UNRELIABLE; + if ("_SECINTPRVOBV".equals(codeString)) + return _SECINTPRVOBV; + if ("_SECINTPRVABOBV".equals(codeString)) + return _SECINTPRVABOBV; + if ("CLINAST".equals(codeString)) + return CLINAST; + if ("DEVAST".equals(codeString)) + return DEVAST; + if ("HCPAST".equals(codeString)) + return HCPAST; + if ("PACQAST".equals(codeString)) + return PACQAST; + if ("PATAST".equals(codeString)) + return PATAST; + if ("PAYAST".equals(codeString)) + return PAYAST; + if ("PROAST".equals(codeString)) + return PROAST; + if ("SDMAST".equals(codeString)) + return SDMAST; + if ("_SECINTPRVRBOBV".equals(codeString)) + return _SECINTPRVRBOBV; + if ("CLINRPT".equals(codeString)) + return CLINRPT; + if ("DEVRPT".equals(codeString)) + return DEVRPT; + if ("HCPRPT".equals(codeString)) + return HCPRPT; + if ("PACQRPT".equals(codeString)) + return PACQRPT; + if ("PATRPT".equals(codeString)) + return PATRPT; + if ("PAYRPT".equals(codeString)) + return PAYRPT; + if ("PRORPT".equals(codeString)) + return PRORPT; + if ("SDMRPT".equals(codeString)) + return SDMRPT; + if ("SECTRSTOBV".equals(codeString)) + return SECTRSTOBV; + if ("TRSTACCRDOBV".equals(codeString)) + return TRSTACCRDOBV; + if ("TRSTAGREOBV".equals(codeString)) + return TRSTAGREOBV; + if ("TRSTCERTOBV".equals(codeString)) + return TRSTCERTOBV; + if ("TRSTLOAOBV".equals(codeString)) + return TRSTLOAOBV; + if ("LOAAN".equals(codeString)) + return LOAAN; + if ("LOAAN1".equals(codeString)) + return LOAAN1; + if ("LOAAN2".equals(codeString)) + return LOAAN2; + if ("LOAAN3".equals(codeString)) + return LOAAN3; + if ("LOAAN4".equals(codeString)) + return LOAAN4; + if ("LOAAP".equals(codeString)) + return LOAAP; + if ("LOAAP1".equals(codeString)) + return LOAAP1; + if ("LOAAP2".equals(codeString)) + return LOAAP2; + if ("LOAAP3".equals(codeString)) + return LOAAP3; + if ("LOAAP4".equals(codeString)) + return LOAAP4; + if ("LOAAS".equals(codeString)) + return LOAAS; + if ("LOAAS1".equals(codeString)) + return LOAAS1; + if ("LOAAS2".equals(codeString)) + return LOAAS2; + if ("LOAAS3".equals(codeString)) + return LOAAS3; + if ("LOAAS4".equals(codeString)) + return LOAAS4; + if ("LOACM".equals(codeString)) + return LOACM; + if ("LOACM1".equals(codeString)) + return LOACM1; + if ("LOACM2".equals(codeString)) + return LOACM2; + if ("LOACM3".equals(codeString)) + return LOACM3; + if ("LOACM4".equals(codeString)) + return LOACM4; + if ("LOAID".equals(codeString)) + return LOAID; + if ("LOAID1".equals(codeString)) + return LOAID1; + if ("LOAID2".equals(codeString)) + return LOAID2; + if ("LOAID3".equals(codeString)) + return LOAID3; + if ("LOAID4".equals(codeString)) + return LOAID4; + if ("LOANR".equals(codeString)) + return LOANR; + if ("LOANR1".equals(codeString)) + return LOANR1; + if ("LOANR2".equals(codeString)) + return LOANR2; + if ("LOANR3".equals(codeString)) + return LOANR3; + if ("LOANR4".equals(codeString)) + return LOANR4; + if ("LOARA".equals(codeString)) + return LOARA; + if ("LOARA1".equals(codeString)) + return LOARA1; + if ("LOARA2".equals(codeString)) + return LOARA2; + if ("LOARA3".equals(codeString)) + return LOARA3; + if ("LOARA4".equals(codeString)) + return LOARA4; + if ("LOATK".equals(codeString)) + return LOATK; + if ("LOATK1".equals(codeString)) + return LOATK1; + if ("LOATK2".equals(codeString)) + return LOATK2; + if ("LOATK3".equals(codeString)) + return LOATK3; + if ("LOATK4".equals(codeString)) + return LOATK4; + if ("TRSTMECOBV".equals(codeString)) + return TRSTMECOBV; + if ("_SeverityObservation".equals(codeString)) + return _SEVERITYOBSERVATION; + if ("H".equals(codeString)) + return H; + if ("L".equals(codeString)) + return L; + if ("M".equals(codeString)) + return M; + if ("_SubjectBodyPosition".equals(codeString)) + return _SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return LLD; + if ("PRN".equals(codeString)) + return PRN; + if ("RLD".equals(codeString)) + return RLD; + if ("SFWL".equals(codeString)) + return SFWL; + if ("SIT".equals(codeString)) + return SIT; + if ("STN".equals(codeString)) + return STN; + if ("SUP".equals(codeString)) + return SUP; + if ("RTRD".equals(codeString)) + return RTRD; + if ("TRD".equals(codeString)) + return TRD; + if ("_VerificationOutcomeValue".equals(codeString)) + return _VERIFICATIONOUTCOMEVALUE; + if ("ACT".equals(codeString)) + return ACT; + if ("ACTPEND".equals(codeString)) + return ACTPEND; + if ("ELG".equals(codeString)) + return ELG; + if ("INACT".equals(codeString)) + return INACT; + if ("INPNDINV".equals(codeString)) + return INPNDINV; + if ("INPNDUPD".equals(codeString)) + return INPNDUPD; + if ("NELG".equals(codeString)) + return NELG; + if ("_AnnotationValue".equals(codeString)) + return _ANNOTATIONVALUE; + if ("_CommonClinicalObservationValue".equals(codeString)) + return _COMMONCLINICALOBSERVATIONVALUE; + if ("_IndividualCaseSafetyReportValueDomains".equals(codeString)) + return _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS; + if ("_IndicationValue".equals(codeString)) + return _INDICATIONVALUE; + throw new FHIRException("Unknown V3ObservationValue code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE: return "_ActCoverageAssessmentObservationValue"; + case _ACTFINANCIALSTATUSOBSERVATIONVALUE: return "_ActFinancialStatusObservationValue"; + case ASSET: return "ASSET"; + case ANNUITY: return "ANNUITY"; + case PROP: return "PROP"; + case RETACCT: return "RETACCT"; + case TRUST: return "TRUST"; + case INCOME: return "INCOME"; + case CHILD: return "CHILD"; + case DISABL: return "DISABL"; + case INVEST: return "INVEST"; + case PAY: return "PAY"; + case RETIRE: return "RETIRE"; + case SPOUSAL: return "SPOUSAL"; + case SUPPLE: return "SUPPLE"; + case TAX: return "TAX"; + case LIVEXP: return "LIVEXP"; + case CLOTH: return "CLOTH"; + case FOOD: return "FOOD"; + case HEALTH: return "HEALTH"; + case HOUSE: return "HOUSE"; + case LEGAL: return "LEGAL"; + case MORTG: return "MORTG"; + case RENT: return "RENT"; + case SUNDRY: return "SUNDRY"; + case TRANS: return "TRANS"; + case UTIL: return "UTIL"; + case ELSTAT: return "ELSTAT"; + case ADOPT: return "ADOPT"; + case BTHCERT: return "BTHCERT"; + case CCOC: return "CCOC"; + case DRLIC: return "DRLIC"; + case FOSTER: return "FOSTER"; + case MEMBER: return "MEMBER"; + case MIL: return "MIL"; + case MRGCERT: return "MRGCERT"; + case PASSPORT: return "PASSPORT"; + case STUDENRL: return "STUDENRL"; + case HLSTAT: return "HLSTAT"; + case DISABLE: return "DISABLE"; + case DRUG: return "DRUG"; + case IVDRG: return "IVDRG"; + case PGNT: return "PGNT"; + case LIVDEP: return "LIVDEP"; + case RELDEP: return "RELDEP"; + case SPSDEP: return "SPSDEP"; + case URELDEP: return "URELDEP"; + case LIVSIT: return "LIVSIT"; + case ALONE: return "ALONE"; + case DEPCHD: return "DEPCHD"; + case DEPSPS: return "DEPSPS"; + case DEPYGCHD: return "DEPYGCHD"; + case FAM: return "FAM"; + case RELAT: return "RELAT"; + case SPS: return "SPS"; + case UNREL: return "UNREL"; + case SOECSTAT: return "SOECSTAT"; + case ABUSE: return "ABUSE"; + case HMLESS: return "HMLESS"; + case ILGIM: return "ILGIM"; + case INCAR: return "INCAR"; + case PROB: return "PROB"; + case REFUG: return "REFUG"; + case UNEMPL: return "UNEMPL"; + case _ALLERGYTESTVALUE: return "_AllergyTestValue"; + case A0: return "A0"; + case A1: return "A1"; + case A2: return "A2"; + case A3: return "A3"; + case A4: return "A4"; + case _COMPOSITEMEASURESCORING: return "_CompositeMeasureScoring"; + case ALLORNONESCR: return "ALLORNONESCR"; + case LINEARSCR: return "LINEARSCR"; + case OPPORSCR: return "OPPORSCR"; + case WEIGHTSCR: return "WEIGHTSCR"; + case _COVERAGELIMITOBSERVATIONVALUE: return "_CoverageLimitObservationValue"; + case _COVERAGELEVELOBSERVATIONVALUE: return "_CoverageLevelObservationValue"; + case ADC: return "ADC"; + case CHD: return "CHD"; + case DEP: return "DEP"; + case DP: return "DP"; + case ECH: return "ECH"; + case FLY: return "FLY"; + case IND: return "IND"; + case SSP: return "SSP"; + case _CRITICALITYOBSERVATIONVALUE: return "_CriticalityObservationValue"; + case CRITH: return "CRITH"; + case CRITL: return "CRITL"; + case CRITU: return "CRITU"; + case _GENETICOBSERVATIONVALUE: return "_GeneticObservationValue"; + case HOMOZYGOTE: return "Homozygote"; + case _OBSERVATIONMEASURESCORING: return "_ObservationMeasureScoring"; + case COHORT: return "COHORT"; + case CONTVAR: return "CONTVAR"; + case PROPOR: return "PROPOR"; + case RATIO: return "RATIO"; + case _OBSERVATIONMEASURETYPE: return "_ObservationMeasureType"; + case COMPOSITE: return "COMPOSITE"; + case EFFICIENCY: return "EFFICIENCY"; + case EXPERIENCE: return "EXPERIENCE"; + case OUTCOME: return "OUTCOME"; + case INTERMOM: return "INTERM-OM"; + case PROPM: return "PRO-PM"; + case PROCESS: return "PROCESS"; + case APPROPRIATE: return "APPROPRIATE"; + case RESOURCE: return "RESOURCE"; + case STRUCTURE: return "STRUCTURE"; + case _OBSERVATIONPOPULATIONINCLUSION: return "_ObservationPopulationInclusion"; + case DENEX: return "DENEX"; + case DENEXCEP: return "DENEXCEP"; + case DENOM: return "DENOM"; + case IP: return "IP"; + case IPP: return "IPP"; + case MSRPOPL: return "MSRPOPL"; + case NUMER: return "NUMER"; + case NUMEX: return "NUMEX"; + case _PARTIALCOMPLETIONSCALE: return "_PartialCompletionScale"; + case G: return "G"; + case LE: return "LE"; + case ME: return "ME"; + case MI: return "MI"; + case N: return "N"; + case S: return "S"; + case _SECURITYOBSERVATIONVALUE: return "_SecurityObservationValue"; + case _SECINTOBV: return "_SECINTOBV"; + case _SECALTINTOBV: return "_SECALTINTOBV"; + case ABSTRED: return "ABSTRED"; + case AGGRED: return "AGGRED"; + case ANONYED: return "ANONYED"; + case MAPPED: return "MAPPED"; + case MASKED: return "MASKED"; + case PSEUDED: return "PSEUDED"; + case REDACTED: return "REDACTED"; + case SUBSETTED: return "SUBSETTED"; + case SYNTAC: return "SYNTAC"; + case TRSLT: return "TRSLT"; + case VERSIONED: return "VERSIONED"; + case _SECDATINTOBV: return "_SECDATINTOBV"; + case CRYTOHASH: return "CRYTOHASH"; + case DIGSIG: return "DIGSIG"; + case _SECINTCONOBV: return "_SECINTCONOBV"; + case HRELIABLE: return "HRELIABLE"; + case RELIABLE: return "RELIABLE"; + case UNCERTREL: return "UNCERTREL"; + case UNRELIABLE: return "UNRELIABLE"; + case _SECINTPRVOBV: return "_SECINTPRVOBV"; + case _SECINTPRVABOBV: return "_SECINTPRVABOBV"; + case CLINAST: return "CLINAST"; + case DEVAST: return "DEVAST"; + case HCPAST: return "HCPAST"; + case PACQAST: return "PACQAST"; + case PATAST: return "PATAST"; + case PAYAST: return "PAYAST"; + case PROAST: return "PROAST"; + case SDMAST: return "SDMAST"; + case _SECINTPRVRBOBV: return "_SECINTPRVRBOBV"; + case CLINRPT: return "CLINRPT"; + case DEVRPT: return "DEVRPT"; + case HCPRPT: return "HCPRPT"; + case PACQRPT: return "PACQRPT"; + case PATRPT: return "PATRPT"; + case PAYRPT: return "PAYRPT"; + case PRORPT: return "PRORPT"; + case SDMRPT: return "SDMRPT"; + case SECTRSTOBV: return "SECTRSTOBV"; + case TRSTACCRDOBV: return "TRSTACCRDOBV"; + case TRSTAGREOBV: return "TRSTAGREOBV"; + case TRSTCERTOBV: return "TRSTCERTOBV"; + case TRSTLOAOBV: return "TRSTLOAOBV"; + case LOAAN: return "LOAAN"; + case LOAAN1: return "LOAAN1"; + case LOAAN2: return "LOAAN2"; + case LOAAN3: return "LOAAN3"; + case LOAAN4: return "LOAAN4"; + case LOAAP: return "LOAAP"; + case LOAAP1: return "LOAAP1"; + case LOAAP2: return "LOAAP2"; + case LOAAP3: return "LOAAP3"; + case LOAAP4: return "LOAAP4"; + case LOAAS: return "LOAAS"; + case LOAAS1: return "LOAAS1"; + case LOAAS2: return "LOAAS2"; + case LOAAS3: return "LOAAS3"; + case LOAAS4: return "LOAAS4"; + case LOACM: return "LOACM"; + case LOACM1: return "LOACM1"; + case LOACM2: return "LOACM2"; + case LOACM3: return "LOACM3"; + case LOACM4: return "LOACM4"; + case LOAID: return "LOAID"; + case LOAID1: return "LOAID1"; + case LOAID2: return "LOAID2"; + case LOAID3: return "LOAID3"; + case LOAID4: return "LOAID4"; + case LOANR: return "LOANR"; + case LOANR1: return "LOANR1"; + case LOANR2: return "LOANR2"; + case LOANR3: return "LOANR3"; + case LOANR4: return "LOANR4"; + case LOARA: return "LOARA"; + case LOARA1: return "LOARA1"; + case LOARA2: return "LOARA2"; + case LOARA3: return "LOARA3"; + case LOARA4: return "LOARA4"; + case LOATK: return "LOATK"; + case LOATK1: return "LOATK1"; + case LOATK2: return "LOATK2"; + case LOATK3: return "LOATK3"; + case LOATK4: return "LOATK4"; + case TRSTMECOBV: return "TRSTMECOBV"; + case _SEVERITYOBSERVATION: return "_SeverityObservation"; + case H: return "H"; + case L: return "L"; + case M: return "M"; + case _SUBJECTBODYPOSITION: return "_SubjectBodyPosition"; + case LLD: return "LLD"; + case PRN: return "PRN"; + case RLD: return "RLD"; + case SFWL: return "SFWL"; + case SIT: return "SIT"; + case STN: return "STN"; + case SUP: return "SUP"; + case RTRD: return "RTRD"; + case TRD: return "TRD"; + case _VERIFICATIONOUTCOMEVALUE: return "_VerificationOutcomeValue"; + case ACT: return "ACT"; + case ACTPEND: return "ACTPEND"; + case ELG: return "ELG"; + case INACT: return "INACT"; + case INPNDINV: return "INPNDINV"; + case INPNDUPD: return "INPNDUPD"; + case NELG: return "NELG"; + case _ANNOTATIONVALUE: return "_AnnotationValue"; + case _COMMONCLINICALOBSERVATIONVALUE: return "_CommonClinicalObservationValue"; + case _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS: return "_IndividualCaseSafetyReportValueDomains"; + case _INDICATIONVALUE: return "_IndicationValue"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ObservationValue"; + } + public String getDefinition() { + switch (this) { + case _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE: return "Codes specify the category of observation, evidence, or document used to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program. The type of evidence is coded as observation values."; + case _ACTFINANCIALSTATUSOBSERVATIONVALUE: return "Code specifying financial indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay stub; tax or income document; asset document; living expenses."; + case ASSET: return "Codes specifying asset indicators used to assess or establish eligibility for coverage under a policy or program."; + case ANNUITY: return "Indicator of annuity ownership or status as beneficiary."; + case PROP: return "Indicator of real property ownership, e.g., deed or real estate contract."; + case RETACCT: return "Indicator of retirement investment account ownership."; + case TRUST: return "Indicator of status as trust beneficiary."; + case INCOME: return "Code specifying income indicators used to assess or establish eligibility for coverage under a policy or program; e.g., pay or pension check, child support payments received or provided, and taxes paid."; + case CHILD: return "Indicator of child support payments received or provided."; + case DISABL: return "Indicator of disability income replacement payment."; + case INVEST: return "Indicator of investment income, e.g., dividend check, annuity payment; real estate rent, investment divestiture proceeds; trust or endowment check."; + case PAY: return "Indicator of paid employment, e.g., letter of hire, contract, employer letter; copy of pay check or pay stub."; + case RETIRE: return "Indicator of retirement payment, e.g., pension check."; + case SPOUSAL: return "Indicator of spousal or partner support payments received or provided; e.g., alimony payment; support stipulations in a divorce settlement."; + case SUPPLE: return "Indicator of income supplement, e.g., gifting, parental income support; stipend, or grant."; + case TAX: return "Indicator of tax obligation or payment, e.g., statement of taxable income."; + case LIVEXP: return "Codes specifying living expense indicators used to assess or establish eligibility for coverage under a policy or program."; + case CLOTH: return "Indicator of clothing expenses."; + case FOOD: return "Indicator of transportation expenses."; + case HEALTH: return "Indicator of health expenses; including medication costs, health service costs, financial participations, and health coverage premiums."; + case HOUSE: return "Indicator of housing expense, e.g., household appliances, fixtures, furnishings, and maintenance and repairs."; + case LEGAL: return "Indicator of legal expenses."; + case MORTG: return "Indicator of mortgage amount, interest, and payments."; + case RENT: return "Indicator of rental or lease payments."; + case SUNDRY: return "Indicator of transportation expenses."; + case TRANS: return "Indicator of transportation expenses, e.g., vehicle payments, vehicle insurance, vehicle fuel, and vehicle maintenance and repairs."; + case UTIL: return "Indicator of transportation expenses."; + case ELSTAT: return "Code specifying eligibility indicators used to assess or establish eligibility for coverage under a policy or program eligibility status, e.g., certificates of creditable coverage; student enrollment; adoption, marriage or birth certificate."; + case ADOPT: return "Indicator of adoption."; + case BTHCERT: return "Indicator of birth."; + case CCOC: return "Indicator of creditable coverage."; + case DRLIC: return "Indicator of driving status."; + case FOSTER: return "Indicator of foster child status."; + case MEMBER: return "Indicator of status as covered member under a policy or program, e.g., member id card or coverage document."; + case MIL: return "Indicator of military status."; + case MRGCERT: return "Indicator of marriage status."; + case PASSPORT: return "Indicator of citizenship."; + case STUDENRL: return "Indicator of student status."; + case HLSTAT: return "Code specifying non-clinical indicators related to health status used to assess or establish eligibility for coverage under a policy or program, e.g., pregnancy, disability, drug use, mental health issues."; + case DISABLE: return "Indication of disability."; + case DRUG: return "Indication of drug use."; + case IVDRG: return "Indication of IV drug use ."; + case PGNT: return "Non-clinical report of pregnancy."; + case LIVDEP: return "Code specifying observations related to living dependency, such as dependent upon spouse for activities of daily living."; + case RELDEP: return "Continued living in private residence requires functional and health care assistance from one or more relatives."; + case SPSDEP: return "Continued living in private residence requires functional and health care assistance from spouse or life partner."; + case URELDEP: return "Continued living in private residence requires functional and health care assistance from one or more unrelated persons."; + case LIVSIT: return "Code specifying observations related to living situation for a person in a private residence."; + case ALONE: return "Living alone. Maps to PD1-2 Living arrangement (IS) 00742 [A]"; + case DEPCHD: return "Living with one or more dependent children requiring moderate supervision."; + case DEPSPS: return "Living with disabled spouse requiring functional and health care assistance"; + case DEPYGCHD: return "Living with one or more dependent children requiring intensive supervision"; + case FAM: return "Living with family. Maps to PD1-2 Living arrangement (IS) 00742 [F]"; + case RELAT: return "Living with one or more relatives. Maps to PD1-2 Living arrangement (IS) 00742 [R]"; + case SPS: return "Living only with spouse or life partner. Maps to PD1-2 Living arrangement (IS) 00742 [S]"; + case UNREL: return "Living with one or more unrelated persons."; + case SOECSTAT: return "Code specifying observations or indicators related to socio-economic status used to assess to assess for services, e.g., discharge planning, or to establish eligibility for coverage under a policy or program."; + case ABUSE: return "Indication of abuse victim."; + case HMLESS: return "Indication of status as homeless."; + case ILGIM: return "Indication of status as illegal immigrant."; + case INCAR: return "Indication of status as incarcerated."; + case PROB: return "Indication of probation status."; + case REFUG: return "Indication of refugee status."; + case UNEMPL: return "Indication of unemployed status."; + case _ALLERGYTESTVALUE: return "Indicates the result of a particular allergy test. E.g. Negative, Mild, Moderate, Severe"; + case A0: return "Description:Patient exhibits no reaction to the challenge agent."; + case A1: return "Description:Patient exhibits a minimal reaction to the challenge agent."; + case A2: return "Description:Patient exhibits a mild reaction to the challenge agent."; + case A3: return "Description:Patient exhibits moderate reaction to the challenge agent."; + case A4: return "Description:Patient exhibits a severe reaction to the challenge agent."; + case _COMPOSITEMEASURESCORING: return "Observation values that communicate the method used in a quality measure to combine the component measure results included in an composite measure."; + case ALLORNONESCR: return "Code specifying that the measure uses all-or-nothing scoring. All-or-nothing scoring places an individual in the numerator of the composite measure if and only if they are in the numerator of all component measures in which they are in the denominator."; + case LINEARSCR: return "Code specifying that the measure uses linear scoring. Linear scoring computes the fraction of component measures in which the individual appears in the numerator, giving equal weight to each component measure."; + case OPPORSCR: return "Code specifying that the measure uses opportunity-based scoring. In opportunity-based scoring the measure score is determined by combining the denominator and numerator of each component measure to determine an overall composite score."; + case WEIGHTSCR: return "Code specifying that the measure uses weighted scoring. Weighted scoring assigns a factor to each component measure to weight that measure's contribution to the overall score."; + case _COVERAGELIMITOBSERVATIONVALUE: return "Description:Coded observation values for coverage limitations, for e.g., types of claims or types of parties covered under a policy or program."; + case _COVERAGELEVELOBSERVATIONVALUE: return "Description:Coded observation values for types of covered parties under a policy or program based on their personal relationships or employment status."; + case ADC: return "Description:Child over an age as specified by coverage policy or program, e.g., student, differently abled, and income dependent."; + case CHD: return "Description:Dependent biological, adopted, foster child as specified by coverage policy or program."; + case DEP: return "Description:Person requiring functional and/or financial assistance from another person as specified by coverage policy or program."; + case DP: return "Description:Persons registered as a family unit in a domestic partner registry as specified by law and by coverage policy or program."; + case ECH: return "Description:An individual employed by an employer who receive remuneration in wages, salary, commission, tips, piece-rates, or pay-in-kind through the employeraTMs payment system (i.e., not a contractor) as specified by coverage policy or program."; + case FLY: return "Description:As specified by coverage policy or program."; + case IND: return "Description:Person as specified by coverage policy or program."; + case SSP: return "Description:A pair of people of the same gender who live together as a family as specified by coverage policy or program, e.g., Naomi and Ruth from the Book of Ruth; Socrates and Alcibiades"; + case _CRITICALITYOBSERVATIONVALUE: return "A clinical judgment as to the worst case result of a future exposure (including substance administration). When the worst case result is assessed to have a life-threatening or organ system threatening potential, it is considered to be of high criticality."; + case CRITH: return "Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure."; + case CRITL: return "Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure."; + case CRITU: return "Unable to assess the worst case result of a future exposure."; + case _GENETICOBSERVATIONVALUE: return "Description: The domain contains genetic analysis specific observation values, e.g. Homozygote, Heterozygote, etc."; + case HOMOZYGOTE: return "Description: An individual having different alleles at one or more loci regarding a specific character"; + case _OBSERVATIONMEASURESCORING: return "Observation values used to indicate the type of scoring (e.g. proportion, ratio) used by a health quality measure."; + case COHORT: return "A measure in which either short-term cross-section or long-term longitudinal analysis is performed over a group of subjects defined by a set of common properties or defining characteristics (e.g., Male smokers between the ages of 40 and 50 years, exposure to treatment, exposure duration)."; + case CONTVAR: return "A measure score in which each individual value for the measure can fall anywhere along a continuous scale (e.g., mean time to thrombolytics which aggregates the time in minutes from a case presenting with chest pain to the time of administration of thrombolytics)."; + case PROPOR: return "A score derived by dividing the number of cases that meet a criterion for quality (the numerator) by the number of eligible cases within a given time frame (the denominator) where the numerator cases are a subset of the denominator cases (e.g., percentage of eligible women with a mammogram performed in the last year)."; + case RATIO: return "A score that may have a value of zero or greater that is derived by dividing a count of one type of data by a count of another type of data (e.g., the number of patients with central lines who develop infection divided by the number of central line days)."; + case _OBSERVATIONMEASURETYPE: return "Observation values used to indicate what kind of health quality measure is used."; + case COMPOSITE: return "A measure that is composed from one or more other measures and indicates an overall summary of those measures."; + case EFFICIENCY: return "A measure related to the efficiency of medical treatment."; + case EXPERIENCE: return "A measure related to the level of patient engagement or patient experience of care."; + case OUTCOME: return "A measure that indicates the result of the performance (or non-performance) of a function or process."; + case INTERMOM: return "A measure that evaluates the change over time of a physiologic state observable that is associated with a specific long-term health outcome."; + case PROPM: return "A measure that is a comparison of patient reported outcomes for a single or multiple patients collected via an instrument specifically designed to obtain input directly from patients."; + case PROCESS: return "A measure which focuses on a process which leads to a certain outcome, meaning that a scientific basis exists for believing that the process, when executed well, will increase the probability of achieving a desired outcome."; + case APPROPRIATE: return "A measure that assesses the use of one or more processes where the expected health benefit exceeds the expected negative consequences."; + case RESOURCE: return "A measure related to the extent of use of clinical resources or cost of care."; + case STRUCTURE: return "A measure related to the structure of patient care."; + case _OBSERVATIONPOPULATIONINCLUSION: return "Observation values used to assert various populations that a subject falls into."; + case DENEX: return "Patients who should be removed from the eMeasure population and denominator before determining if numerator criteria are met. Denominator exclusions are used in proportion and ratio measures to help narrow the denominator."; + case DENEXCEP: return "Denominator exceptions are those conditions that should remove a patient, procedure or unit of measurement from the denominator only if the numerator criteria are not met. Denominator exceptions allow for adjustment of the calculated score for those providers with higher risk populations. Denominator exceptions are used only in proportion eMeasures. They are not appropriate for ratio or continuous variable eMeasures. Denominator exceptions allow for the exercise of clinical judgment and should be specifically defined where capturing the information in a structured manner fits the clinical workflow. Generic denominator exception reasons used in proportion eMeasures fall into three general categories:\r\n\n \n Medical reasons\n Patient reasons\n System reasons"; + case DENOM: return "It can be the same as the initial patient population or a subset of the initial patient population to further constrain the population for the purpose of the eMeasure. Different measures within an eMeasure set may have different Denominators. Continuous Variable eMeasures do not have a Denominator, but instead define a Measure Population."; + case IP: return "The initial population refers to all entities to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs."; + case IPP: return "The initial patient population refers to all patients to be evaluated by a specific quality measure who share a common set of specified characteristics within a specific measurement set to which a given measure belongs. Details often include information based upon specific age groups, diagnoses, diagnostic and procedure codes, and enrollment periods."; + case MSRPOPL: return "Measure population is used only in continuous variable eMeasures. It is a narrative description of the eMeasure population. \n(e.g., all patients seen in the Emergency Department during the measurement period)."; + case NUMER: return "Numerators are used in proportion and ratio eMeasures. In proportion measures the numerator criteria are the processes or outcomes expected for each patient, procedure, or other unit of measurement defined in the denominator. In ratio measures the numerator is related, but not directly derived from the denominator (e.g., a numerator listing the number of central line blood stream infections and a denominator indicating the days per thousand of central line usage in a specific time period)."; + case NUMEX: return "Numerator Exclusions are used only in ratio eMeasures to define instances that should not be included in the numerator data. (e.g., if the number of central line blood stream infections per 1000 catheter days were to exclude infections with a specific bacterium, that bacterium would be listed as a numerator exclusion.)"; + case _PARTIALCOMPLETIONSCALE: return "PartialCompletionScale"; + case G: return "Value for Act.partialCompletionCode attribute that implies 81-99% completion"; + case LE: return "Value for Act.partialCompletionCode attribute that implies 61-80% completion"; + case ME: return "Value for Act.partialCompletionCode attribute that implies 41-60% completion"; + case MI: return "Value for Act.partialCompletionCode attribute that implies 1-20% completion"; + case N: return "Value for Act.partialCompletionCode attribute that implies 0% completion"; + case S: return "Value for Act.partialCompletionCode attribute that implies 21-40% completion"; + case _SECURITYOBSERVATIONVALUE: return "Observation values used to indicate security observation metadata."; + case _SECINTOBV: return "Abstract security observation values used to indicate security integrity metadata.\r\n\n \n Examples: Codes conveying integrity status, integrity confidence, and provenance."; + case _SECALTINTOBV: return "Abstract security metadata observation values used to indicate mechanism used for authorized alteration of an IT resource (data, information object, service, or system capability)"; + case ABSTRED: return "Security metadata observation values used to indicate the use of a more abstract version of the content, e.g., replacing exact value of an age or date field with a range, or remove the left digits of a credit card number or SSN."; + case AGGRED: return "Security metadata observation values used to indicate the use of an algorithmic combination of actual values with the result of an aggregate function, e.g., average, sum, or count in order to limit disclosure of an IT resource (data, information object, service, or system capability) to the minimum necessary."; + case ANONYED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by used to indicate the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. No key to relink the data is retained."; + case MAPPED: return "Security metadata observation value used to indicate that the IT resource semantic content has been transformed from one encoding to another.\r\n\n \n Usage Note: \"MAP\" code does not indicate the semantic fidelity of the transformed content.\r\n\n To indicate semantic fidelity for maps of HL7 to other code systems, this security alteration integrity observation may be further specified using an Act valued with Value Set: MapRelationship (2.16.840.1.113883.1.11.11052).\r\n\n Semantic fidelity of the mapped IT Resource may also be indicated using a SecurityIntegrityConfidenceObservation."; + case MASKED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) by indicating the mechanism by which software systems can make data unintelligible (that is, as unreadable and unusable by algorithmically transforming plaintext into ciphertext) such that it can only be accessed or used by authorized users. An authorized user may be provided a key to decrypt per license or \"shared secret\".\r\n\n \n Usage Note: \"MASKED\" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has been further encrypted, and may be accessed only by an authorized user or receiver to which a decryption key is provided."; + case PSEUDED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability), by indicating the mechanism by which software systems can strip portions of the resource that could allow the identification of the source of the information or the information subject. Custodian may retain a key to relink data necessary to reidentify the information subject.\r\n\n \n Rationale: Personal data which has been processed to make it impossible to know whose data it is. Used particularly for secondary use of health data. In some cases, it may be possible for authorized individuals to restore the identity of the individual, e.g.,for public health case management. Based on ISO/TS 25237:2008 Health informatics—Pseudonymization"; + case REDACTED: return "Security metadata observation value used to indicate the mechanism by which software systems can filter an IT resource (data, information object, service, or system capability) to remove any portion of the resource that is not authorized to be access, used, or disclosed.\r\n\n \n Usage Note: \"REDACTED\" may be used, per applicable policy, as a flag to indicate to a user or receiver that some portion of an IT resource has filtered and not included in the content accessed or received."; + case SUBSETTED: return "Metadata observation used to indicate that some information has been removed from the source object when the view this object contains was constructed because of configuration options when the view was created. The content may not be suitable for use as the basis of a record update\r\n\n \n Usage Note: This is not suitable to be used when information is removed for security reasons - see the code REDACTED for this use."; + case SYNTAC: return "Security metadata observation value used to indicate that the IT resource syntax has been transformed from one syntactical representation to another. \r\n\n \n Usage Note: \"SYNTAC\" code does not indicate the syntactical correctness of the syntactically transformed IT resource."; + case TRSLT: return "Security metadata observation value used to indicate that the IT resource has been translated from one human language to another. \r\n\n \n Usage Note: \"TRSLT\" does not indicate the fidelity of the translation or the languages translated.\r\n\n The fidelity of the IT Resource translation may be indicated using a SecurityIntegrityConfidenceObservation.\r\n\n To indicate languages, use the Value Set:HumanLanguage (2.16.840.1.113883.1.11.11526)"; + case VERSIONED: return "Security metadata observation value conveying the alteration integrity of an IT resource (data, information object, service, or system capability) which indicates that the resource only retains versions of an IT resource for access and use per applicable policy\r\n\n \n Usage Note: When this code is used, expectation is that the system has removed historical versions of the data that falls outside the time period deemed to be the effective time of the applicable version."; + case _SECDATINTOBV: return "Abstract security observation values used to indicate data integrity metadata.\r\n\n \n Examples: Codes conveying the mechanism used to preserve the accuracy and consistency of an IT resource such as a digital signature and a cryptographic hash function."; + case CRYTOHASH: return "Security metadata observation value used to indicate the mechanism by which software systems can establish that data was not modified in transit.\r\n\n \n Rationale: This definition is intended to align with the ISO 22600-2 3.3.19 definition of cryptographic checkvalue: Information which is derived by performing a cryptographic transformation (see cryptography) on the data unit. The derivation of the checkvalue may be performed in one or more steps and is a result of a mathematical function of the key and a data unit. It is usually used to check the integrity of a data unit.\r\n\n \n Examples: \n \r\n\n \n SHA-1\n SHA-2 (Secure Hash Algorithm)"; + case DIGSIG: return "Security metadata observation value used to indicate the mechanism by which software systems use digital signature to establish that data has not been modified. \r\n\n \n Rationale: This definition is intended to align with the ISO 22600-2 3.3.26 definition of digital signature: Data appended to, or a cryptographic transformation (see cryptography) of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery e.g., by the recipient."; + case _SECINTCONOBV: return "Abstract security observation value used to indicate integrity confidence metadata.\r\n\n \n Examples: Codes conveying the level of reliability and trustworthiness of an IT resource."; + case HRELIABLE: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be very high."; + case RELIABLE: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be adequate."; + case UNCERTREL: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be uncertain."; + case UNRELIABLE: return "Security metadata observation value used to indicate that the veracity or trustworthiness of an IT resource (data, information object, service, or system capability) for a specified purpose of use is perceived to be or deemed by policy to be inadequate."; + case _SECINTPRVOBV: return "Abstract security metadata observation value used to indicate the provenance of an IT resource (data, information object, service, or system capability).\r\n\n \n Examples: Codes conveying the provenance metadata about the entity reporting an IT resource."; + case _SECINTPRVABOBV: return "Abstract security provenance metadata observation value used to indicate the entity that asserted an IT resource (data, information object, service, or system capability).\r\n\n \n Examples: Codes conveying the provenance metadata about the entity asserting the resource."; + case CLINAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a clinician."; + case DEVAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a device."; + case HCPAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a healthcare professional."; + case PACQAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient acquaintance."; + case PATAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a patient."; + case PAYAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a payer."; + case PROAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a professional."; + case SDMAST: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was asserted by a substitute decision maker."; + case _SECINTPRVRBOBV: return "Abstract security provenance metadata observation value used to indicate the entity that reported the resource (data, information object, service, or system capability).\r\n\n \n Examples: Codes conveying the provenance metadata about the entity reporting an IT resource."; + case CLINRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a clinician."; + case DEVRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a device."; + case HCPRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a healthcare professional."; + case PACQRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient acquaintance."; + case PATRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a patient."; + case PAYRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a payer."; + case PRORPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a professional."; + case SDMRPT: return "Security provenance metadata observation value used to indicate that an IT resource (data, information object, service, or system capability) was reported by a substitute decision maker."; + case SECTRSTOBV: return "Observation value used to indicate aspects of trust applicable to an IT resource (data, information object, service, or system capability)."; + case TRSTACCRDOBV: return "Values for security trust accreditation metadata observation made about the formal declaration by an authority or neutral third party that validates the technical, security, trust, and business practice conformance of Trust Agents to facilitate security, interoperability, and trust among participants within a security domain or trust framework."; + case TRSTAGREOBV: return "Values for security trust agreement metadata observation made about privacy and security requirements with which a security domain must comply. [ISO IEC 10181-1]\n[ISO IEC 10181-1]"; + case TRSTCERTOBV: return "Values for security trust certificate metadata observation made about a set of security-relevant data issued by a security authority or trusted third party, together with security information which is used to provide the integrity and data origin authentication services for an IT resource (data, information object, service, or system capability). [Based on ISO IEC 10181-1]\r\n\n For example, a Certificate Policy (CP), which is a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. A particular Certificate Policy might indicate the applicability of a type of certificate to the authentication of electronic data interchange transactions for the trading of goods within a given price range. Another example is Cross Certification with Federal Bridge."; + case TRSTLOAOBV: return "Values for security trust assurance metadata observation made about the digital quality or reliability of a trust assertion, activity, capability, information exchange, mechanism, process, or protocol."; + case LOAAN: return "The value assigned as the indicator of the digital quality or reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2]\r\n\n For example, the degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies]"; + case LOAAN1: return "Indicator of low digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] \r\n\n Low authentication level of assurance indicates that the relying party may have little or no confidence in the asserted identity's validity. Level 1 requires little or no confidence in the asserted identity. No identity proofing is required at this level, but the authentication mechanism should provide some assurance that the same claimant is accessing the protected transaction or data. A wide range of available authentication technologies can be employed and any of the token methods of Levels 2, 3, or 4, including Personal Identification Numbers (PINs), may be used. To be authenticated, the claimant must prove control of the token through a secure authentication protocol. At Level 1, long-term shared authentication secrets may be revealed to verifiers. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAN2: return "Indicator of basic digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies]\r\n\n Basic authentication level of assurance indicates that the relying party may have some confidence in the asserted identity's validity. Level 2 requires confidence that the asserted identity is accurate. Level 2 provides for single-factor remote network authentication, including identity-proofing requirements for presentation of identifying materials or information. A wide range of available authentication technologies can be employed, including any of the token methods of Levels 3 or 4, as well as passwords. Successful authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, and online guessing attacks are prevented. \nLong-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are required. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAN3: return "Indicator of medium digital quality or reliability of the digital reliability of verification and validation of the process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies] \r\n\n Medium authentication level of assurance indicates that the relying party may have high confidence in the asserted identity's validity. Level 3 is appropriate for transactions that need high confidence in the accuracy of the asserted identity. Level 3 provides multifactor remote network authentication. At this level, identity-proofing procedures require verification of identifying materials and information. Authentication is based on proof of possession of a key or password through a cryptographic protocol. Cryptographic strength mechanisms should protect the primary authentication token (a cryptographic key) against compromise by the protocol threats, including eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks. A minimum of two authentication factors is required. Three kinds of tokens may be used:\r\n\n \n \"soft\" cryptographic token, which has the key stored on a general-purpose computer, \n \"hard\" cryptographic token, which has the key stored on a special hardware device, and \n \"one-time password\" device token, which has symmetric key stored on a personal hardware device that is a cryptographic module validated at FIPS 140-2 Level 1 or higher. Validation testing of cryptographic modules and algorithms for conformance to Federal Information Processing Standard (FIPS) 140-2, Security Requirements for Cryptographic Modules, is managed by NIST.\n \n Authentication requires that the claimant prove control of the token through a secure authentication protocol. The token must be unlocked with a password or biometric representation, or a password must be used in a secure authentication protocol, to establish two-factor authentication. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Approved cryptographic techniques are used for all operations. Assertions issued about claimants as a result of a successful authentication are either cryptographically authenticated by relying parties (using approved methods) or are obtained directly from a trusted party via a secure authentication protocol. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAN4: return "Indicator of high digital quality or reliability of the digital reliability of the verification and validation process used to verify the claimed identity of an entity by securely associating an identifier and its authenticator. [Based on ISO 7498-2] \r\n\n The degree of confidence in the vetting process used to establish the identity of the individual to whom the credential was issued, and 2) the degree of confidence that the individual who uses the credential is the individual to whom the credential was issued. [OMB M-04-04 E-Authentication Guidance for Federal Agencies]\r\n\n High authentication level of assurance indicates that the relying party may have very high confidence in the asserted identity's validity. Level 4 is for transactions that need very high confidence in the accuracy of the asserted identity. Level 4 provides the highest practical assurance of remote network authentication. Authentication is based on proof of possession of a key through a cryptographic protocol. This level is similar to Level 3 except that only “hard� cryptographic tokens are allowed, cryptographic module validation requirements are strengthened, and subsequent critical data transfers must be authenticated via a key that is bound to the authentication process. The token should be a hardware cryptographic module validated at FIPS 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. This level requires a physical token, which cannot readily be copied, and operator authentication at Level 2 and higher, and ensures good, two-factor remote authentication.\r\n\n Level 4 requires strong cryptographic authentication of all parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the claimant prove through a secure authentication protocol that the claimant controls the token. Eavesdropper, replay, online guessing, verifier impersonation, and man-in-the-middle attacks are prevented. Long-term shared authentication secrets, if used, are never revealed to any party except the claimant and verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent verifiers by the CSP. Strong approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAP: return "The value assigned as the indicator of the digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]"; + case LOAAP1: return "Indicator of the low digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n Low authentication process level of assurance indicates that (1) long-term shared authentication secrets may be revealed to verifiers; and (2) assertions and assertion references require protection from manufacture/modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAP2: return "Indicator of the basic digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n Basic authentication process level of assurance indicates that long-term shared authentication secrets are never revealed to any other party except Credential Service Provider (CSP). Sessions (temporary) shared secrets may be provided to independent verifiers by CSP. Long-term shared authentication secrets, if used, are never revealed to any other party except Verifiers operated by the Credential Service Provider (CSP); however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 1 requirements, assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAP3: return "Indicator of the medium digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n Medium authentication process level of assurance indicates that the token can be unlocked with password, biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication. Long-term shared authentication secrets are never revealed to any party except the Claimant and Credential Service Provider (CSP).\r\n\n Authentication requires that the Claimant prove, through a secure authentication protocol, that he or she controls the token. The Claimant unlocks the token with a password or biometric, or uses a secure multi-token authentication protocol to establish two-factor authentication (through proof of possession of a physical or software token in combination with some memorized secret knowledge). Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. In addition to Level 2 requirements, assertions are protected against repudiation by the Verifier."; + case LOAAP4: return "Indicator of the high digital quality or reliability of a defined sequence of messages between a Claimant and a Verifier that demonstrates that the Claimant has possession and control of a valid token to establish his/her identity, and optionally, demonstrates to the Claimant that he or she is communicating with the intended Verifier. [Based on NIST SP 800-63-2]\r\n\n High authentication process level of assurance indicates all sensitive data transfer are cryptographically authenticated using keys bound to the authentication process. Level 4 requires strong cryptographic authentication of all communicating parties and all sensitive data transfers between the parties. Either public key or symmetric key technology may be used. Authentication requires that the Claimant prove through a secure authentication protocol that he or she controls the token. All protocol threats at Level 3 are required to be prevented at Level 4. Protocols shall also be strongly resistant to man-in-the-middle attacks. Long-term shared authentication secrets, if used, are never revealed to any party except the Claimant and Verifiers operated directly by the CSP; however, session (temporary) shared secrets may be provided to independent Verifiers by the CSP. Approved cryptographic techniques are used for all operations. All sensitive data transfers are cryptographically authenticated using keys bound to the authentication process. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS: return "The value assigned as the indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes."; + case LOAAS1: return "Indicator of the low quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Assertions and assertion references require protection from modification and reuse attacks. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS2: return "Indicator of the basic quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Assertions are resistant to disclosure, redirection, capture and substitution attacks. Approved cryptographic techniques are required for all assertion protocols. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS3: return "Indicator of the medium quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Assertions are protected against repudiation by the verifier. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOAAS4: return "Indicator of the high quality or reliability of the statement from a Verifier to a Relying Party (RP) that contains identity information about a Subscriber. Assertions may also contain verified attributes.\r\n\n Strongly resistant to man-in-the-middle attacks. \"Bearer\" assertions are not used. \"Holder-of-key\" assertions may be used. RP maintains records of the assertions. [Summary of the technical requirements specified in NIST SP 800-63 for the four levels of assurance defined by the December 2003, the Office of Management and Budget (OMB) issued Memorandum M-04-04, E-Authentication Guidance for Federal Agencies.]"; + case LOACM: return "Indicator of the digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM1: return "Indicator of the low digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Little or no confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include weak identity binding to tokens and plaintext passwords or secrets not transmitted across a network. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM2: return "Indicator of the basic digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and its binding to an identity. Some confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verification must prove claimant controls the token; token resists online guessing, replay, session hijacking, and eavesdropping attacks; and token is at least weakly resistant to man-in-the middle attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM3: return "Indicator of the medium digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. High confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Ownership of token verifiable through security authentication protocol and credential management protects against verifier impersonation attacks. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOACM4: return "Indicator of the high digital quality or reliability of the activities performed by the Credential Service Provider (CSP) subsequent to electronic authentication registration, identity proofing and issuance activities to manage and safeguard the integrity of an issued credential and it’s binding to an identity. Very high confidence that an individual has maintained control over a token that has been entrusted to him or her and that that token has not been compromised. Characteristics include: Verifier can prove control of token through a secure protocol; credential management supports strong cryptographic authentication of all communication parties. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID: return "Indicator of the quality or reliability in the process of ascertaining that an individual is who he or she claims to be."; + case LOAID1: return "Indicator of low digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires that a continuity of identity be maintained but does not require identity proofing. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID2: return "Indicator of some digital quality or reliability in the process of ascertaining that that an individual is who he or she claims to be. Requires identity proofing via presentation of identifying material or information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID3: return "Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOAID4: return "Indicator of high digital quality or reliability in the process of ascertaining that an individual is who he or she claims to be. Requires identity proofing procedures for verification of identifying materials and information. [Based on Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOANR: return "Indicator of the digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR1: return "Indicator of low digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR2: return "Indicator of basic digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR3: return "Indicator of medium digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOANR4: return "Indicator of high digital quality or reliability in the process of establishing proof of delivery and proof of origin. [Based on ISO 7498-2]"; + case LOARA: return "Indicator of the digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA1: return "Indicator of low digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA2: return "Indicator of basic digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA3: return "Indicator of medium digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization’s security controls. [Based on NIST SP 800-63-2]"; + case LOARA4: return "Indicator of high digital quality or reliability of the information exchange between network-connected devices where the information cannot be reliably protected end-to-end by a single organization's security controls. [Based on NIST SP 800-63-2]"; + case LOATK: return "Indicator of the digital quality or reliability of single and multi-token authentication. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK1: return "Indicator of the low digital quality or reliability of single and multi-token authentication. Permits the use of any of the token methods of Levels 2, 3, or 4. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK2: return "Indicator of the basic digital quality or reliability of single and multi-token authentication. Requires single factor authentication using memorized secret tokens, pre-registered knowledge tokens, look-up secret tokens, out of band tokens, or single factor one-time password devices. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK3: return "Indicator of the medium digital quality or reliability of single and multi-token authentication. Requires two authentication factors. Provides multi-factor remote network authentication. Permits multi-factor software cryptographic token. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case LOATK4: return "Indicator of the high digital quality or reliability of single and multi-token authentication. Requires token that is a hardware cryptographic module validated at validated at Federal Information Processing Standard (FIPS) 140-2 Level 2 or higher overall with at least FIPS 140-2 Level 3 physical security. Level 4 token requirements can be met by using the PIV authentication key of a FIPS 201 compliant Personal Identity Verification (PIV) Card. [Electronic Authentication Guideline - Recommendations of the National Institute of Standards and Technology, NIST Special Publication 800-63-1, Dec 2011]"; + case TRSTMECOBV: return "Values for security trust mechanism metadata observation made about a security architecture system component that supports enforcement of security policies."; + case _SEVERITYOBSERVATION: return "Potential values for observations of severity."; + case H: return "Indicates the condition may be life-threatening or has the potential to cause permanent injury."; + case L: return "Indicates the condition may result in some adverse consequences but is unlikely to substantially affect the situation of the subject."; + case M: return "Indicates the condition may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury."; + case _SUBJECTBODYPOSITION: return "Contains codes for defining the observed, physical position of a subject, such as during an observation, assessment, collection of a specimen, etc. ECG waveforms and vital signs, such as blood pressure, are two examples where a general, observed position typically needs to be noted."; + case LLD: return "Lying on the left side."; + case PRN: return "Lying with the front or ventral surface downward; lying face down."; + case RLD: return "Lying on the right side."; + case SFWL: return "A semi-sitting position in bed with the head of the bed elevated approximately 45 degrees."; + case SIT: return "Resting the body on the buttocks, typically with upper torso erect or semi erect."; + case STN: return "To be stationary, upright, vertical, on one's legs."; + case SUP: return "supine"; + case RTRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees with head raised and feet lowered."; + case TRD: return "Lying on the back, on an inclined plane, typically about 30-45 degrees, with head lowered and feet raised."; + case _VERIFICATIONOUTCOMEVALUE: return "Values for observations of verification act results\r\n\n \n Examples: Verified, not verified, verified with warning."; + case ACT: return "Definition: Coverage is in effect for healthcare service(s) and/or product(s)."; + case ACTPEND: return "Definition: Coverage is in effect for healthcare service(s) and/or product(s) - Pending Investigation"; + case ELG: return "Definition: Coverage is in effect for healthcare service(s) and/or product(s)."; + case INACT: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s)."; + case INPNDINV: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Investigation."; + case INPNDUPD: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s) - Pending Eligibility Update."; + case NELG: return "Definition: Coverage is not in effect for healthcare service(s) and/or product(s). May optionally include reasons for the ineligibility."; + case _ANNOTATIONVALUE: return "AnnotationValue"; + case _COMMONCLINICALOBSERVATIONVALUE: return "Description:Used in a patient care message to value simple clinical (non-lab) observations."; + case _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS: return "This domain is established as a parent to a variety of value domains being defined to support the communication of Individual Case Safety Reports to regulatory bodies. Arguably, this aggregation is not taxonomically pure, but the grouping will facilitate the management of these domains."; + case _INDICATIONVALUE: return "Indicates the specific observation result which is the reason for the action (prescription, lab test, etc.). E.g. Headache, Ear infection, planned diagnostic image (requiring contrast agent), etc."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTCOVERAGEASSESSMENTOBSERVATIONVALUE: return "ActCoverageAssessmentObservationValue"; + case _ACTFINANCIALSTATUSOBSERVATIONVALUE: return "ActFinancialStatusObservationValue"; + case ASSET: return "asset"; + case ANNUITY: return "annuity"; + case PROP: return "real property"; + case RETACCT: return "retirement investment account"; + case TRUST: return "trust"; + case INCOME: return "income"; + case CHILD: return "child support"; + case DISABL: return "disability pay"; + case INVEST: return "investment income"; + case PAY: return "paid employment"; + case RETIRE: return "retirement pay"; + case SPOUSAL: return "spousal or partner support"; + case SUPPLE: return "income supplement"; + case TAX: return "tax obligation"; + case LIVEXP: return "living expense"; + case CLOTH: return "clothing expense"; + case FOOD: return "food expense"; + case HEALTH: return "health expense"; + case HOUSE: return "household expense"; + case LEGAL: return "legal expense"; + case MORTG: return "mortgage"; + case RENT: return "rent"; + case SUNDRY: return "sundry expense"; + case TRANS: return "transportation expense"; + case UTIL: return "utility expense"; + case ELSTAT: return "eligibility indicator"; + case ADOPT: return "adoption document"; + case BTHCERT: return "birth certificate"; + case CCOC: return "creditable coverage document"; + case DRLIC: return "driver license"; + case FOSTER: return "foster child document"; + case MEMBER: return "program or policy member"; + case MIL: return "military identification"; + case MRGCERT: return "marriage certificate"; + case PASSPORT: return "passport"; + case STUDENRL: return "student enrollment"; + case HLSTAT: return "health status"; + case DISABLE: return "disabled"; + case DRUG: return "drug use"; + case IVDRG: return "IV drug use"; + case PGNT: return "pregnant"; + case LIVDEP: return "living dependency"; + case RELDEP: return "relative dependent"; + case SPSDEP: return "spouse dependent"; + case URELDEP: return "unrelated person dependent"; + case LIVSIT: return "living situation"; + case ALONE: return "alone"; + case DEPCHD: return "dependent children"; + case DEPSPS: return "dependent spouse"; + case DEPYGCHD: return "dependent young children"; + case FAM: return "live with family"; + case RELAT: return "relative"; + case SPS: return "spouse only"; + case UNREL: return "unrelated person"; + case SOECSTAT: return "socio economic status"; + case ABUSE: return "abuse victim"; + case HMLESS: return "homeless"; + case ILGIM: return "illegal immigrant"; + case INCAR: return "incarcerated"; + case PROB: return "probation"; + case REFUG: return "refugee"; + case UNEMPL: return "unemployed"; + case _ALLERGYTESTVALUE: return "AllergyTestValue"; + case A0: return "no reaction"; + case A1: return "minimal reaction"; + case A2: return "mild reaction"; + case A3: return "moderate reaction"; + case A4: return "severe reaction"; + case _COMPOSITEMEASURESCORING: return "CompositeMeasureScoring"; + case ALLORNONESCR: return "All-or-nothing Scoring"; + case LINEARSCR: return "Linear Scoring"; + case OPPORSCR: return "Opportunity Scoring"; + case WEIGHTSCR: return "Weighted Scoring"; + case _COVERAGELIMITOBSERVATIONVALUE: return "CoverageLimitObservationValue"; + case _COVERAGELEVELOBSERVATIONVALUE: return "CoverageLevelObservationValue"; + case ADC: return "adult child"; + case CHD: return "child"; + case DEP: return "dependent"; + case DP: return "domestic partner"; + case ECH: return "employee"; + case FLY: return "family coverage"; + case IND: return "individual"; + case SSP: return "same sex partner"; + case _CRITICALITYOBSERVATIONVALUE: return "CriticalityObservationValue"; + case CRITH: return "high criticality"; + case CRITL: return "low criticality"; + case CRITU: return "unable to assess criticality"; + case _GENETICOBSERVATIONVALUE: return "GeneticObservationValue"; + case HOMOZYGOTE: return "HOMO"; + case _OBSERVATIONMEASURESCORING: return "ObservationMeasureScoring"; + case COHORT: return "cohort measure scoring"; + case CONTVAR: return "continuous variable measure scoring"; + case PROPOR: return "proportion measure scoring"; + case RATIO: return "ratio measure scoring"; + case _OBSERVATIONMEASURETYPE: return "ObservationMeasureType"; + case COMPOSITE: return "composite measure type"; + case EFFICIENCY: return "efficiency measure type"; + case EXPERIENCE: return "experience measure type"; + case OUTCOME: return "outcome measure type"; + case INTERMOM: return "intermediate clinical outcome measure"; + case PROPM: return "intermediate clinical outcome measure"; + case PROCESS: return "process measure type"; + case APPROPRIATE: return "appropriate use process measure"; + case RESOURCE: return "resource use measure type"; + case STRUCTURE: return "structure measure type"; + case _OBSERVATIONPOPULATIONINCLUSION: return "ObservationPopulationInclusion"; + case DENEX: return "denominator exclusions"; + case DENEXCEP: return "denominator exceptions"; + case DENOM: return "denominator"; + case IP: return "initial population"; + case IPP: return "initial patient population"; + case MSRPOPL: return "measure population"; + case NUMER: return "numerator"; + case NUMEX: return "numerator exclusions"; + case _PARTIALCOMPLETIONSCALE: return "PartialCompletionScale"; + case G: return "Great extent"; + case LE: return "Large extent"; + case ME: return "Medium extent"; + case MI: return "Minimal extent"; + case N: return "None"; + case S: return "Some extent"; + case _SECURITYOBSERVATIONVALUE: return "SecurityObservationValue"; + case _SECINTOBV: return "security integrity"; + case _SECALTINTOBV: return "alteration integrity"; + case ABSTRED: return "abstracted"; + case AGGRED: return "aggregated"; + case ANONYED: return "anonymized"; + case MAPPED: return "mapped"; + case MASKED: return "masked"; + case PSEUDED: return "pseudonymized"; + case REDACTED: return "redacted"; + case SUBSETTED: return "subsetted"; + case SYNTAC: return "syntactic transform"; + case TRSLT: return "translated"; + case VERSIONED: return "versioned"; + case _SECDATINTOBV: return "data integrity"; + case CRYTOHASH: return "cryptographic hash function"; + case DIGSIG: return "digital signature"; + case _SECINTCONOBV: return "integrity confidence"; + case HRELIABLE: return "highly reliable"; + case RELIABLE: return "reliable"; + case UNCERTREL: return "uncertain reliability"; + case UNRELIABLE: return "unreliable"; + case _SECINTPRVOBV: return "provenance"; + case _SECINTPRVABOBV: return "provenance asserted by"; + case CLINAST: return "clinician asserted"; + case DEVAST: return "device asserted"; + case HCPAST: return "healthcare professional asserted"; + case PACQAST: return "patient acquaintance asserted"; + case PATAST: return "patient asserted"; + case PAYAST: return "payer asserted"; + case PROAST: return "professional asserted"; + case SDMAST: return "substitute decision maker asserted"; + case _SECINTPRVRBOBV: return "provenance reported by"; + case CLINRPT: return "clinician reported"; + case DEVRPT: return "device reported"; + case HCPRPT: return "healthcare professional reported"; + case PACQRPT: return "patient acquaintance reported"; + case PATRPT: return "patient reported"; + case PAYRPT: return "payer reported"; + case PRORPT: return "professional reported"; + case SDMRPT: return "substitute decision maker reported"; + case SECTRSTOBV: return "security trust observation"; + case TRSTACCRDOBV: return "trust accreditation observation"; + case TRSTAGREOBV: return "trust agreement observation"; + case TRSTCERTOBV: return "trust certificate observation"; + case TRSTLOAOBV: return "trust assurance observation"; + case LOAAN: return "authentication level of assurance value"; + case LOAAN1: return "low authentication level of assurance"; + case LOAAN2: return "basic authentication level of assurance"; + case LOAAN3: return "medium authentication level of assurance"; + case LOAAN4: return "high authentication level of assurance"; + case LOAAP: return "authentication process level of assurance value"; + case LOAAP1: return "low authentication process level of assurance"; + case LOAAP2: return "basic authentication process level of assurance"; + case LOAAP3: return "medium authentication process level of assurance"; + case LOAAP4: return "high authentication process level of assurance"; + case LOAAS: return "assertion level of assurance value"; + case LOAAS1: return "low assertion level of assurance"; + case LOAAS2: return "basic assertion level of assurance"; + case LOAAS3: return "medium assertion level of assurance"; + case LOAAS4: return "high assertion level of assurance"; + case LOACM: return "token and credential management level of assurance value)"; + case LOACM1: return "low token and credential management level of assurance"; + case LOACM2: return "basic token and credential management level of assurance"; + case LOACM3: return "medium token and credential management level of assurance"; + case LOACM4: return "high token and credential management level of assurance"; + case LOAID: return "identity proofing level of assurance"; + case LOAID1: return "low identity proofing level of assurance"; + case LOAID2: return "basic identity proofing level of assurance"; + case LOAID3: return "medium identity proofing level of assurance"; + case LOAID4: return "high identity proofing level of assurance"; + case LOANR: return "non-repudiation level of assurance value"; + case LOANR1: return "low non-repudiation level of assurance"; + case LOANR2: return "basic non-repudiation level of assurance"; + case LOANR3: return "medium non-repudiation level of assurance"; + case LOANR4: return "high non-repudiation level of assurance"; + case LOARA: return "remote access level of assurance value"; + case LOARA1: return "low remote access level of assurance"; + case LOARA2: return "basic remote access level of assurance"; + case LOARA3: return "medium remote access level of assurance"; + case LOARA4: return "high remote access level of assurance"; + case LOATK: return "token level of assurance value"; + case LOATK1: return "low token level of assurance"; + case LOATK2: return "basic token level of assurance"; + case LOATK3: return "medium token level of assurance"; + case LOATK4: return "high token level of assurance"; + case TRSTMECOBV: return "none supplied 6"; + case _SEVERITYOBSERVATION: return "SeverityObservation"; + case H: return "High"; + case L: return "Low"; + case M: return "Moderate"; + case _SUBJECTBODYPOSITION: return "_SubjectBodyPosition"; + case LLD: return "left lateral decubitus"; + case PRN: return "prone"; + case RLD: return "right lateral decubitus"; + case SFWL: return "Semi-Fowler's"; + case SIT: return "sitting"; + case STN: return "standing"; + case SUP: return "supine"; + case RTRD: return "reverse trendelenburg"; + case TRD: return "trendelenburg"; + case _VERIFICATIONOUTCOMEVALUE: return "verification outcome"; + case ACT: return "active coverage"; + case ACTPEND: return "active - pending investigation"; + case ELG: return "eligible"; + case INACT: return "inactive"; + case INPNDINV: return "inactive - pending investigation"; + case INPNDUPD: return "inactive - pending eligibility update"; + case NELG: return "not eligible"; + case _ANNOTATIONVALUE: return "AnnotationValue"; + case _COMMONCLINICALOBSERVATIONVALUE: return "common clinical observation"; + case _INDIVIDUALCASESAFETYREPORTVALUEDOMAINS: return "Individual Case Safety Report Value Domains"; + case _INDICATIONVALUE: return "IndicationValue"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationValueEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationValueEnumFactory.java new file mode 100644 index 00000000000..dcf0da4293b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ObservationValueEnumFactory.java @@ -0,0 +1,998 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ObservationValueEnumFactory implements EnumFactory { + + public V3ObservationValue fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActCoverageAssessmentObservationValue".equals(codeString)) + return V3ObservationValue._ACTCOVERAGEASSESSMENTOBSERVATIONVALUE; + if ("_ActFinancialStatusObservationValue".equals(codeString)) + return V3ObservationValue._ACTFINANCIALSTATUSOBSERVATIONVALUE; + if ("ASSET".equals(codeString)) + return V3ObservationValue.ASSET; + if ("ANNUITY".equals(codeString)) + return V3ObservationValue.ANNUITY; + if ("PROP".equals(codeString)) + return V3ObservationValue.PROP; + if ("RETACCT".equals(codeString)) + return V3ObservationValue.RETACCT; + if ("TRUST".equals(codeString)) + return V3ObservationValue.TRUST; + if ("INCOME".equals(codeString)) + return V3ObservationValue.INCOME; + if ("CHILD".equals(codeString)) + return V3ObservationValue.CHILD; + if ("DISABL".equals(codeString)) + return V3ObservationValue.DISABL; + if ("INVEST".equals(codeString)) + return V3ObservationValue.INVEST; + if ("PAY".equals(codeString)) + return V3ObservationValue.PAY; + if ("RETIRE".equals(codeString)) + return V3ObservationValue.RETIRE; + if ("SPOUSAL".equals(codeString)) + return V3ObservationValue.SPOUSAL; + if ("SUPPLE".equals(codeString)) + return V3ObservationValue.SUPPLE; + if ("TAX".equals(codeString)) + return V3ObservationValue.TAX; + if ("LIVEXP".equals(codeString)) + return V3ObservationValue.LIVEXP; + if ("CLOTH".equals(codeString)) + return V3ObservationValue.CLOTH; + if ("FOOD".equals(codeString)) + return V3ObservationValue.FOOD; + if ("HEALTH".equals(codeString)) + return V3ObservationValue.HEALTH; + if ("HOUSE".equals(codeString)) + return V3ObservationValue.HOUSE; + if ("LEGAL".equals(codeString)) + return V3ObservationValue.LEGAL; + if ("MORTG".equals(codeString)) + return V3ObservationValue.MORTG; + if ("RENT".equals(codeString)) + return V3ObservationValue.RENT; + if ("SUNDRY".equals(codeString)) + return V3ObservationValue.SUNDRY; + if ("TRANS".equals(codeString)) + return V3ObservationValue.TRANS; + if ("UTIL".equals(codeString)) + return V3ObservationValue.UTIL; + if ("ELSTAT".equals(codeString)) + return V3ObservationValue.ELSTAT; + if ("ADOPT".equals(codeString)) + return V3ObservationValue.ADOPT; + if ("BTHCERT".equals(codeString)) + return V3ObservationValue.BTHCERT; + if ("CCOC".equals(codeString)) + return V3ObservationValue.CCOC; + if ("DRLIC".equals(codeString)) + return V3ObservationValue.DRLIC; + if ("FOSTER".equals(codeString)) + return V3ObservationValue.FOSTER; + if ("MEMBER".equals(codeString)) + return V3ObservationValue.MEMBER; + if ("MIL".equals(codeString)) + return V3ObservationValue.MIL; + if ("MRGCERT".equals(codeString)) + return V3ObservationValue.MRGCERT; + if ("PASSPORT".equals(codeString)) + return V3ObservationValue.PASSPORT; + if ("STUDENRL".equals(codeString)) + return V3ObservationValue.STUDENRL; + if ("HLSTAT".equals(codeString)) + return V3ObservationValue.HLSTAT; + if ("DISABLE".equals(codeString)) + return V3ObservationValue.DISABLE; + if ("DRUG".equals(codeString)) + return V3ObservationValue.DRUG; + if ("IVDRG".equals(codeString)) + return V3ObservationValue.IVDRG; + if ("PGNT".equals(codeString)) + return V3ObservationValue.PGNT; + if ("LIVDEP".equals(codeString)) + return V3ObservationValue.LIVDEP; + if ("RELDEP".equals(codeString)) + return V3ObservationValue.RELDEP; + if ("SPSDEP".equals(codeString)) + return V3ObservationValue.SPSDEP; + if ("URELDEP".equals(codeString)) + return V3ObservationValue.URELDEP; + if ("LIVSIT".equals(codeString)) + return V3ObservationValue.LIVSIT; + if ("ALONE".equals(codeString)) + return V3ObservationValue.ALONE; + if ("DEPCHD".equals(codeString)) + return V3ObservationValue.DEPCHD; + if ("DEPSPS".equals(codeString)) + return V3ObservationValue.DEPSPS; + if ("DEPYGCHD".equals(codeString)) + return V3ObservationValue.DEPYGCHD; + if ("FAM".equals(codeString)) + return V3ObservationValue.FAM; + if ("RELAT".equals(codeString)) + return V3ObservationValue.RELAT; + if ("SPS".equals(codeString)) + return V3ObservationValue.SPS; + if ("UNREL".equals(codeString)) + return V3ObservationValue.UNREL; + if ("SOECSTAT".equals(codeString)) + return V3ObservationValue.SOECSTAT; + if ("ABUSE".equals(codeString)) + return V3ObservationValue.ABUSE; + if ("HMLESS".equals(codeString)) + return V3ObservationValue.HMLESS; + if ("ILGIM".equals(codeString)) + return V3ObservationValue.ILGIM; + if ("INCAR".equals(codeString)) + return V3ObservationValue.INCAR; + if ("PROB".equals(codeString)) + return V3ObservationValue.PROB; + if ("REFUG".equals(codeString)) + return V3ObservationValue.REFUG; + if ("UNEMPL".equals(codeString)) + return V3ObservationValue.UNEMPL; + if ("_AllergyTestValue".equals(codeString)) + return V3ObservationValue._ALLERGYTESTVALUE; + if ("A0".equals(codeString)) + return V3ObservationValue.A0; + if ("A1".equals(codeString)) + return V3ObservationValue.A1; + if ("A2".equals(codeString)) + return V3ObservationValue.A2; + if ("A3".equals(codeString)) + return V3ObservationValue.A3; + if ("A4".equals(codeString)) + return V3ObservationValue.A4; + if ("_CompositeMeasureScoring".equals(codeString)) + return V3ObservationValue._COMPOSITEMEASURESCORING; + if ("ALLORNONESCR".equals(codeString)) + return V3ObservationValue.ALLORNONESCR; + if ("LINEARSCR".equals(codeString)) + return V3ObservationValue.LINEARSCR; + if ("OPPORSCR".equals(codeString)) + return V3ObservationValue.OPPORSCR; + if ("WEIGHTSCR".equals(codeString)) + return V3ObservationValue.WEIGHTSCR; + if ("_CoverageLimitObservationValue".equals(codeString)) + return V3ObservationValue._COVERAGELIMITOBSERVATIONVALUE; + if ("_CoverageLevelObservationValue".equals(codeString)) + return V3ObservationValue._COVERAGELEVELOBSERVATIONVALUE; + if ("ADC".equals(codeString)) + return V3ObservationValue.ADC; + if ("CHD".equals(codeString)) + return V3ObservationValue.CHD; + if ("DEP".equals(codeString)) + return V3ObservationValue.DEP; + if ("DP".equals(codeString)) + return V3ObservationValue.DP; + if ("ECH".equals(codeString)) + return V3ObservationValue.ECH; + if ("FLY".equals(codeString)) + return V3ObservationValue.FLY; + if ("IND".equals(codeString)) + return V3ObservationValue.IND; + if ("SSP".equals(codeString)) + return V3ObservationValue.SSP; + if ("_CriticalityObservationValue".equals(codeString)) + return V3ObservationValue._CRITICALITYOBSERVATIONVALUE; + if ("CRITH".equals(codeString)) + return V3ObservationValue.CRITH; + if ("CRITL".equals(codeString)) + return V3ObservationValue.CRITL; + if ("CRITU".equals(codeString)) + return V3ObservationValue.CRITU; + if ("_GeneticObservationValue".equals(codeString)) + return V3ObservationValue._GENETICOBSERVATIONVALUE; + if ("Homozygote".equals(codeString)) + return V3ObservationValue.HOMOZYGOTE; + if ("_ObservationMeasureScoring".equals(codeString)) + return V3ObservationValue._OBSERVATIONMEASURESCORING; + if ("COHORT".equals(codeString)) + return V3ObservationValue.COHORT; + if ("CONTVAR".equals(codeString)) + return V3ObservationValue.CONTVAR; + if ("PROPOR".equals(codeString)) + return V3ObservationValue.PROPOR; + if ("RATIO".equals(codeString)) + return V3ObservationValue.RATIO; + if ("_ObservationMeasureType".equals(codeString)) + return V3ObservationValue._OBSERVATIONMEASURETYPE; + if ("COMPOSITE".equals(codeString)) + return V3ObservationValue.COMPOSITE; + if ("EFFICIENCY".equals(codeString)) + return V3ObservationValue.EFFICIENCY; + if ("EXPERIENCE".equals(codeString)) + return V3ObservationValue.EXPERIENCE; + if ("OUTCOME".equals(codeString)) + return V3ObservationValue.OUTCOME; + if ("INTERM-OM".equals(codeString)) + return V3ObservationValue.INTERMOM; + if ("PRO-PM".equals(codeString)) + return V3ObservationValue.PROPM; + if ("PROCESS".equals(codeString)) + return V3ObservationValue.PROCESS; + if ("APPROPRIATE".equals(codeString)) + return V3ObservationValue.APPROPRIATE; + if ("RESOURCE".equals(codeString)) + return V3ObservationValue.RESOURCE; + if ("STRUCTURE".equals(codeString)) + return V3ObservationValue.STRUCTURE; + if ("_ObservationPopulationInclusion".equals(codeString)) + return V3ObservationValue._OBSERVATIONPOPULATIONINCLUSION; + if ("DENEX".equals(codeString)) + return V3ObservationValue.DENEX; + if ("DENEXCEP".equals(codeString)) + return V3ObservationValue.DENEXCEP; + if ("DENOM".equals(codeString)) + return V3ObservationValue.DENOM; + if ("IP".equals(codeString)) + return V3ObservationValue.IP; + if ("IPP".equals(codeString)) + return V3ObservationValue.IPP; + if ("MSRPOPL".equals(codeString)) + return V3ObservationValue.MSRPOPL; + if ("NUMER".equals(codeString)) + return V3ObservationValue.NUMER; + if ("NUMEX".equals(codeString)) + return V3ObservationValue.NUMEX; + if ("_PartialCompletionScale".equals(codeString)) + return V3ObservationValue._PARTIALCOMPLETIONSCALE; + if ("G".equals(codeString)) + return V3ObservationValue.G; + if ("LE".equals(codeString)) + return V3ObservationValue.LE; + if ("ME".equals(codeString)) + return V3ObservationValue.ME; + if ("MI".equals(codeString)) + return V3ObservationValue.MI; + if ("N".equals(codeString)) + return V3ObservationValue.N; + if ("S".equals(codeString)) + return V3ObservationValue.S; + if ("_SecurityObservationValue".equals(codeString)) + return V3ObservationValue._SECURITYOBSERVATIONVALUE; + if ("_SECINTOBV".equals(codeString)) + return V3ObservationValue._SECINTOBV; + if ("_SECALTINTOBV".equals(codeString)) + return V3ObservationValue._SECALTINTOBV; + if ("ABSTRED".equals(codeString)) + return V3ObservationValue.ABSTRED; + if ("AGGRED".equals(codeString)) + return V3ObservationValue.AGGRED; + if ("ANONYED".equals(codeString)) + return V3ObservationValue.ANONYED; + if ("MAPPED".equals(codeString)) + return V3ObservationValue.MAPPED; + if ("MASKED".equals(codeString)) + return V3ObservationValue.MASKED; + if ("PSEUDED".equals(codeString)) + return V3ObservationValue.PSEUDED; + if ("REDACTED".equals(codeString)) + return V3ObservationValue.REDACTED; + if ("SUBSETTED".equals(codeString)) + return V3ObservationValue.SUBSETTED; + if ("SYNTAC".equals(codeString)) + return V3ObservationValue.SYNTAC; + if ("TRSLT".equals(codeString)) + return V3ObservationValue.TRSLT; + if ("VERSIONED".equals(codeString)) + return V3ObservationValue.VERSIONED; + if ("_SECDATINTOBV".equals(codeString)) + return V3ObservationValue._SECDATINTOBV; + if ("CRYTOHASH".equals(codeString)) + return V3ObservationValue.CRYTOHASH; + if ("DIGSIG".equals(codeString)) + return V3ObservationValue.DIGSIG; + if ("_SECINTCONOBV".equals(codeString)) + return V3ObservationValue._SECINTCONOBV; + if ("HRELIABLE".equals(codeString)) + return V3ObservationValue.HRELIABLE; + if ("RELIABLE".equals(codeString)) + return V3ObservationValue.RELIABLE; + if ("UNCERTREL".equals(codeString)) + return V3ObservationValue.UNCERTREL; + if ("UNRELIABLE".equals(codeString)) + return V3ObservationValue.UNRELIABLE; + if ("_SECINTPRVOBV".equals(codeString)) + return V3ObservationValue._SECINTPRVOBV; + if ("_SECINTPRVABOBV".equals(codeString)) + return V3ObservationValue._SECINTPRVABOBV; + if ("CLINAST".equals(codeString)) + return V3ObservationValue.CLINAST; + if ("DEVAST".equals(codeString)) + return V3ObservationValue.DEVAST; + if ("HCPAST".equals(codeString)) + return V3ObservationValue.HCPAST; + if ("PACQAST".equals(codeString)) + return V3ObservationValue.PACQAST; + if ("PATAST".equals(codeString)) + return V3ObservationValue.PATAST; + if ("PAYAST".equals(codeString)) + return V3ObservationValue.PAYAST; + if ("PROAST".equals(codeString)) + return V3ObservationValue.PROAST; + if ("SDMAST".equals(codeString)) + return V3ObservationValue.SDMAST; + if ("_SECINTPRVRBOBV".equals(codeString)) + return V3ObservationValue._SECINTPRVRBOBV; + if ("CLINRPT".equals(codeString)) + return V3ObservationValue.CLINRPT; + if ("DEVRPT".equals(codeString)) + return V3ObservationValue.DEVRPT; + if ("HCPRPT".equals(codeString)) + return V3ObservationValue.HCPRPT; + if ("PACQRPT".equals(codeString)) + return V3ObservationValue.PACQRPT; + if ("PATRPT".equals(codeString)) + return V3ObservationValue.PATRPT; + if ("PAYRPT".equals(codeString)) + return V3ObservationValue.PAYRPT; + if ("PRORPT".equals(codeString)) + return V3ObservationValue.PRORPT; + if ("SDMRPT".equals(codeString)) + return V3ObservationValue.SDMRPT; + if ("SECTRSTOBV".equals(codeString)) + return V3ObservationValue.SECTRSTOBV; + if ("TRSTACCRDOBV".equals(codeString)) + return V3ObservationValue.TRSTACCRDOBV; + if ("TRSTAGREOBV".equals(codeString)) + return V3ObservationValue.TRSTAGREOBV; + if ("TRSTCERTOBV".equals(codeString)) + return V3ObservationValue.TRSTCERTOBV; + if ("TRSTLOAOBV".equals(codeString)) + return V3ObservationValue.TRSTLOAOBV; + if ("LOAAN".equals(codeString)) + return V3ObservationValue.LOAAN; + if ("LOAAN1".equals(codeString)) + return V3ObservationValue.LOAAN1; + if ("LOAAN2".equals(codeString)) + return V3ObservationValue.LOAAN2; + if ("LOAAN3".equals(codeString)) + return V3ObservationValue.LOAAN3; + if ("LOAAN4".equals(codeString)) + return V3ObservationValue.LOAAN4; + if ("LOAAP".equals(codeString)) + return V3ObservationValue.LOAAP; + if ("LOAAP1".equals(codeString)) + return V3ObservationValue.LOAAP1; + if ("LOAAP2".equals(codeString)) + return V3ObservationValue.LOAAP2; + if ("LOAAP3".equals(codeString)) + return V3ObservationValue.LOAAP3; + if ("LOAAP4".equals(codeString)) + return V3ObservationValue.LOAAP4; + if ("LOAAS".equals(codeString)) + return V3ObservationValue.LOAAS; + if ("LOAAS1".equals(codeString)) + return V3ObservationValue.LOAAS1; + if ("LOAAS2".equals(codeString)) + return V3ObservationValue.LOAAS2; + if ("LOAAS3".equals(codeString)) + return V3ObservationValue.LOAAS3; + if ("LOAAS4".equals(codeString)) + return V3ObservationValue.LOAAS4; + if ("LOACM".equals(codeString)) + return V3ObservationValue.LOACM; + if ("LOACM1".equals(codeString)) + return V3ObservationValue.LOACM1; + if ("LOACM2".equals(codeString)) + return V3ObservationValue.LOACM2; + if ("LOACM3".equals(codeString)) + return V3ObservationValue.LOACM3; + if ("LOACM4".equals(codeString)) + return V3ObservationValue.LOACM4; + if ("LOAID".equals(codeString)) + return V3ObservationValue.LOAID; + if ("LOAID1".equals(codeString)) + return V3ObservationValue.LOAID1; + if ("LOAID2".equals(codeString)) + return V3ObservationValue.LOAID2; + if ("LOAID3".equals(codeString)) + return V3ObservationValue.LOAID3; + if ("LOAID4".equals(codeString)) + return V3ObservationValue.LOAID4; + if ("LOANR".equals(codeString)) + return V3ObservationValue.LOANR; + if ("LOANR1".equals(codeString)) + return V3ObservationValue.LOANR1; + if ("LOANR2".equals(codeString)) + return V3ObservationValue.LOANR2; + if ("LOANR3".equals(codeString)) + return V3ObservationValue.LOANR3; + if ("LOANR4".equals(codeString)) + return V3ObservationValue.LOANR4; + if ("LOARA".equals(codeString)) + return V3ObservationValue.LOARA; + if ("LOARA1".equals(codeString)) + return V3ObservationValue.LOARA1; + if ("LOARA2".equals(codeString)) + return V3ObservationValue.LOARA2; + if ("LOARA3".equals(codeString)) + return V3ObservationValue.LOARA3; + if ("LOARA4".equals(codeString)) + return V3ObservationValue.LOARA4; + if ("LOATK".equals(codeString)) + return V3ObservationValue.LOATK; + if ("LOATK1".equals(codeString)) + return V3ObservationValue.LOATK1; + if ("LOATK2".equals(codeString)) + return V3ObservationValue.LOATK2; + if ("LOATK3".equals(codeString)) + return V3ObservationValue.LOATK3; + if ("LOATK4".equals(codeString)) + return V3ObservationValue.LOATK4; + if ("TRSTMECOBV".equals(codeString)) + return V3ObservationValue.TRSTMECOBV; + if ("_SeverityObservation".equals(codeString)) + return V3ObservationValue._SEVERITYOBSERVATION; + if ("H".equals(codeString)) + return V3ObservationValue.H; + if ("L".equals(codeString)) + return V3ObservationValue.L; + if ("M".equals(codeString)) + return V3ObservationValue.M; + if ("_SubjectBodyPosition".equals(codeString)) + return V3ObservationValue._SUBJECTBODYPOSITION; + if ("LLD".equals(codeString)) + return V3ObservationValue.LLD; + if ("PRN".equals(codeString)) + return V3ObservationValue.PRN; + if ("RLD".equals(codeString)) + return V3ObservationValue.RLD; + if ("SFWL".equals(codeString)) + return V3ObservationValue.SFWL; + if ("SIT".equals(codeString)) + return V3ObservationValue.SIT; + if ("STN".equals(codeString)) + return V3ObservationValue.STN; + if ("SUP".equals(codeString)) + return V3ObservationValue.SUP; + if ("RTRD".equals(codeString)) + return V3ObservationValue.RTRD; + if ("TRD".equals(codeString)) + return V3ObservationValue.TRD; + if ("_VerificationOutcomeValue".equals(codeString)) + return V3ObservationValue._VERIFICATIONOUTCOMEVALUE; + if ("ACT".equals(codeString)) + return V3ObservationValue.ACT; + if ("ACTPEND".equals(codeString)) + return V3ObservationValue.ACTPEND; + if ("ELG".equals(codeString)) + return V3ObservationValue.ELG; + if ("INACT".equals(codeString)) + return V3ObservationValue.INACT; + if ("INPNDINV".equals(codeString)) + return V3ObservationValue.INPNDINV; + if ("INPNDUPD".equals(codeString)) + return V3ObservationValue.INPNDUPD; + if ("NELG".equals(codeString)) + return V3ObservationValue.NELG; + if ("_AnnotationValue".equals(codeString)) + return V3ObservationValue._ANNOTATIONVALUE; + if ("_CommonClinicalObservationValue".equals(codeString)) + return V3ObservationValue._COMMONCLINICALOBSERVATIONVALUE; + if ("_IndividualCaseSafetyReportValueDomains".equals(codeString)) + return V3ObservationValue._INDIVIDUALCASESAFETYREPORTVALUEDOMAINS; + if ("_IndicationValue".equals(codeString)) + return V3ObservationValue._INDICATIONVALUE; + throw new IllegalArgumentException("Unknown V3ObservationValue code '"+codeString+"'"); + } + + public String toCode(V3ObservationValue code) { + if (code == V3ObservationValue._ACTCOVERAGEASSESSMENTOBSERVATIONVALUE) + return "_ActCoverageAssessmentObservationValue"; + if (code == V3ObservationValue._ACTFINANCIALSTATUSOBSERVATIONVALUE) + return "_ActFinancialStatusObservationValue"; + if (code == V3ObservationValue.ASSET) + return "ASSET"; + if (code == V3ObservationValue.ANNUITY) + return "ANNUITY"; + if (code == V3ObservationValue.PROP) + return "PROP"; + if (code == V3ObservationValue.RETACCT) + return "RETACCT"; + if (code == V3ObservationValue.TRUST) + return "TRUST"; + if (code == V3ObservationValue.INCOME) + return "INCOME"; + if (code == V3ObservationValue.CHILD) + return "CHILD"; + if (code == V3ObservationValue.DISABL) + return "DISABL"; + if (code == V3ObservationValue.INVEST) + return "INVEST"; + if (code == V3ObservationValue.PAY) + return "PAY"; + if (code == V3ObservationValue.RETIRE) + return "RETIRE"; + if (code == V3ObservationValue.SPOUSAL) + return "SPOUSAL"; + if (code == V3ObservationValue.SUPPLE) + return "SUPPLE"; + if (code == V3ObservationValue.TAX) + return "TAX"; + if (code == V3ObservationValue.LIVEXP) + return "LIVEXP"; + if (code == V3ObservationValue.CLOTH) + return "CLOTH"; + if (code == V3ObservationValue.FOOD) + return "FOOD"; + if (code == V3ObservationValue.HEALTH) + return "HEALTH"; + if (code == V3ObservationValue.HOUSE) + return "HOUSE"; + if (code == V3ObservationValue.LEGAL) + return "LEGAL"; + if (code == V3ObservationValue.MORTG) + return "MORTG"; + if (code == V3ObservationValue.RENT) + return "RENT"; + if (code == V3ObservationValue.SUNDRY) + return "SUNDRY"; + if (code == V3ObservationValue.TRANS) + return "TRANS"; + if (code == V3ObservationValue.UTIL) + return "UTIL"; + if (code == V3ObservationValue.ELSTAT) + return "ELSTAT"; + if (code == V3ObservationValue.ADOPT) + return "ADOPT"; + if (code == V3ObservationValue.BTHCERT) + return "BTHCERT"; + if (code == V3ObservationValue.CCOC) + return "CCOC"; + if (code == V3ObservationValue.DRLIC) + return "DRLIC"; + if (code == V3ObservationValue.FOSTER) + return "FOSTER"; + if (code == V3ObservationValue.MEMBER) + return "MEMBER"; + if (code == V3ObservationValue.MIL) + return "MIL"; + if (code == V3ObservationValue.MRGCERT) + return "MRGCERT"; + if (code == V3ObservationValue.PASSPORT) + return "PASSPORT"; + if (code == V3ObservationValue.STUDENRL) + return "STUDENRL"; + if (code == V3ObservationValue.HLSTAT) + return "HLSTAT"; + if (code == V3ObservationValue.DISABLE) + return "DISABLE"; + if (code == V3ObservationValue.DRUG) + return "DRUG"; + if (code == V3ObservationValue.IVDRG) + return "IVDRG"; + if (code == V3ObservationValue.PGNT) + return "PGNT"; + if (code == V3ObservationValue.LIVDEP) + return "LIVDEP"; + if (code == V3ObservationValue.RELDEP) + return "RELDEP"; + if (code == V3ObservationValue.SPSDEP) + return "SPSDEP"; + if (code == V3ObservationValue.URELDEP) + return "URELDEP"; + if (code == V3ObservationValue.LIVSIT) + return "LIVSIT"; + if (code == V3ObservationValue.ALONE) + return "ALONE"; + if (code == V3ObservationValue.DEPCHD) + return "DEPCHD"; + if (code == V3ObservationValue.DEPSPS) + return "DEPSPS"; + if (code == V3ObservationValue.DEPYGCHD) + return "DEPYGCHD"; + if (code == V3ObservationValue.FAM) + return "FAM"; + if (code == V3ObservationValue.RELAT) + return "RELAT"; + if (code == V3ObservationValue.SPS) + return "SPS"; + if (code == V3ObservationValue.UNREL) + return "UNREL"; + if (code == V3ObservationValue.SOECSTAT) + return "SOECSTAT"; + if (code == V3ObservationValue.ABUSE) + return "ABUSE"; + if (code == V3ObservationValue.HMLESS) + return "HMLESS"; + if (code == V3ObservationValue.ILGIM) + return "ILGIM"; + if (code == V3ObservationValue.INCAR) + return "INCAR"; + if (code == V3ObservationValue.PROB) + return "PROB"; + if (code == V3ObservationValue.REFUG) + return "REFUG"; + if (code == V3ObservationValue.UNEMPL) + return "UNEMPL"; + if (code == V3ObservationValue._ALLERGYTESTVALUE) + return "_AllergyTestValue"; + if (code == V3ObservationValue.A0) + return "A0"; + if (code == V3ObservationValue.A1) + return "A1"; + if (code == V3ObservationValue.A2) + return "A2"; + if (code == V3ObservationValue.A3) + return "A3"; + if (code == V3ObservationValue.A4) + return "A4"; + if (code == V3ObservationValue._COMPOSITEMEASURESCORING) + return "_CompositeMeasureScoring"; + if (code == V3ObservationValue.ALLORNONESCR) + return "ALLORNONESCR"; + if (code == V3ObservationValue.LINEARSCR) + return "LINEARSCR"; + if (code == V3ObservationValue.OPPORSCR) + return "OPPORSCR"; + if (code == V3ObservationValue.WEIGHTSCR) + return "WEIGHTSCR"; + if (code == V3ObservationValue._COVERAGELIMITOBSERVATIONVALUE) + return "_CoverageLimitObservationValue"; + if (code == V3ObservationValue._COVERAGELEVELOBSERVATIONVALUE) + return "_CoverageLevelObservationValue"; + if (code == V3ObservationValue.ADC) + return "ADC"; + if (code == V3ObservationValue.CHD) + return "CHD"; + if (code == V3ObservationValue.DEP) + return "DEP"; + if (code == V3ObservationValue.DP) + return "DP"; + if (code == V3ObservationValue.ECH) + return "ECH"; + if (code == V3ObservationValue.FLY) + return "FLY"; + if (code == V3ObservationValue.IND) + return "IND"; + if (code == V3ObservationValue.SSP) + return "SSP"; + if (code == V3ObservationValue._CRITICALITYOBSERVATIONVALUE) + return "_CriticalityObservationValue"; + if (code == V3ObservationValue.CRITH) + return "CRITH"; + if (code == V3ObservationValue.CRITL) + return "CRITL"; + if (code == V3ObservationValue.CRITU) + return "CRITU"; + if (code == V3ObservationValue._GENETICOBSERVATIONVALUE) + return "_GeneticObservationValue"; + if (code == V3ObservationValue.HOMOZYGOTE) + return "Homozygote"; + if (code == V3ObservationValue._OBSERVATIONMEASURESCORING) + return "_ObservationMeasureScoring"; + if (code == V3ObservationValue.COHORT) + return "COHORT"; + if (code == V3ObservationValue.CONTVAR) + return "CONTVAR"; + if (code == V3ObservationValue.PROPOR) + return "PROPOR"; + if (code == V3ObservationValue.RATIO) + return "RATIO"; + if (code == V3ObservationValue._OBSERVATIONMEASURETYPE) + return "_ObservationMeasureType"; + if (code == V3ObservationValue.COMPOSITE) + return "COMPOSITE"; + if (code == V3ObservationValue.EFFICIENCY) + return "EFFICIENCY"; + if (code == V3ObservationValue.EXPERIENCE) + return "EXPERIENCE"; + if (code == V3ObservationValue.OUTCOME) + return "OUTCOME"; + if (code == V3ObservationValue.INTERMOM) + return "INTERM-OM"; + if (code == V3ObservationValue.PROPM) + return "PRO-PM"; + if (code == V3ObservationValue.PROCESS) + return "PROCESS"; + if (code == V3ObservationValue.APPROPRIATE) + return "APPROPRIATE"; + if (code == V3ObservationValue.RESOURCE) + return "RESOURCE"; + if (code == V3ObservationValue.STRUCTURE) + return "STRUCTURE"; + if (code == V3ObservationValue._OBSERVATIONPOPULATIONINCLUSION) + return "_ObservationPopulationInclusion"; + if (code == V3ObservationValue.DENEX) + return "DENEX"; + if (code == V3ObservationValue.DENEXCEP) + return "DENEXCEP"; + if (code == V3ObservationValue.DENOM) + return "DENOM"; + if (code == V3ObservationValue.IP) + return "IP"; + if (code == V3ObservationValue.IPP) + return "IPP"; + if (code == V3ObservationValue.MSRPOPL) + return "MSRPOPL"; + if (code == V3ObservationValue.NUMER) + return "NUMER"; + if (code == V3ObservationValue.NUMEX) + return "NUMEX"; + if (code == V3ObservationValue._PARTIALCOMPLETIONSCALE) + return "_PartialCompletionScale"; + if (code == V3ObservationValue.G) + return "G"; + if (code == V3ObservationValue.LE) + return "LE"; + if (code == V3ObservationValue.ME) + return "ME"; + if (code == V3ObservationValue.MI) + return "MI"; + if (code == V3ObservationValue.N) + return "N"; + if (code == V3ObservationValue.S) + return "S"; + if (code == V3ObservationValue._SECURITYOBSERVATIONVALUE) + return "_SecurityObservationValue"; + if (code == V3ObservationValue._SECINTOBV) + return "_SECINTOBV"; + if (code == V3ObservationValue._SECALTINTOBV) + return "_SECALTINTOBV"; + if (code == V3ObservationValue.ABSTRED) + return "ABSTRED"; + if (code == V3ObservationValue.AGGRED) + return "AGGRED"; + if (code == V3ObservationValue.ANONYED) + return "ANONYED"; + if (code == V3ObservationValue.MAPPED) + return "MAPPED"; + if (code == V3ObservationValue.MASKED) + return "MASKED"; + if (code == V3ObservationValue.PSEUDED) + return "PSEUDED"; + if (code == V3ObservationValue.REDACTED) + return "REDACTED"; + if (code == V3ObservationValue.SUBSETTED) + return "SUBSETTED"; + if (code == V3ObservationValue.SYNTAC) + return "SYNTAC"; + if (code == V3ObservationValue.TRSLT) + return "TRSLT"; + if (code == V3ObservationValue.VERSIONED) + return "VERSIONED"; + if (code == V3ObservationValue._SECDATINTOBV) + return "_SECDATINTOBV"; + if (code == V3ObservationValue.CRYTOHASH) + return "CRYTOHASH"; + if (code == V3ObservationValue.DIGSIG) + return "DIGSIG"; + if (code == V3ObservationValue._SECINTCONOBV) + return "_SECINTCONOBV"; + if (code == V3ObservationValue.HRELIABLE) + return "HRELIABLE"; + if (code == V3ObservationValue.RELIABLE) + return "RELIABLE"; + if (code == V3ObservationValue.UNCERTREL) + return "UNCERTREL"; + if (code == V3ObservationValue.UNRELIABLE) + return "UNRELIABLE"; + if (code == V3ObservationValue._SECINTPRVOBV) + return "_SECINTPRVOBV"; + if (code == V3ObservationValue._SECINTPRVABOBV) + return "_SECINTPRVABOBV"; + if (code == V3ObservationValue.CLINAST) + return "CLINAST"; + if (code == V3ObservationValue.DEVAST) + return "DEVAST"; + if (code == V3ObservationValue.HCPAST) + return "HCPAST"; + if (code == V3ObservationValue.PACQAST) + return "PACQAST"; + if (code == V3ObservationValue.PATAST) + return "PATAST"; + if (code == V3ObservationValue.PAYAST) + return "PAYAST"; + if (code == V3ObservationValue.PROAST) + return "PROAST"; + if (code == V3ObservationValue.SDMAST) + return "SDMAST"; + if (code == V3ObservationValue._SECINTPRVRBOBV) + return "_SECINTPRVRBOBV"; + if (code == V3ObservationValue.CLINRPT) + return "CLINRPT"; + if (code == V3ObservationValue.DEVRPT) + return "DEVRPT"; + if (code == V3ObservationValue.HCPRPT) + return "HCPRPT"; + if (code == V3ObservationValue.PACQRPT) + return "PACQRPT"; + if (code == V3ObservationValue.PATRPT) + return "PATRPT"; + if (code == V3ObservationValue.PAYRPT) + return "PAYRPT"; + if (code == V3ObservationValue.PRORPT) + return "PRORPT"; + if (code == V3ObservationValue.SDMRPT) + return "SDMRPT"; + if (code == V3ObservationValue.SECTRSTOBV) + return "SECTRSTOBV"; + if (code == V3ObservationValue.TRSTACCRDOBV) + return "TRSTACCRDOBV"; + if (code == V3ObservationValue.TRSTAGREOBV) + return "TRSTAGREOBV"; + if (code == V3ObservationValue.TRSTCERTOBV) + return "TRSTCERTOBV"; + if (code == V3ObservationValue.TRSTLOAOBV) + return "TRSTLOAOBV"; + if (code == V3ObservationValue.LOAAN) + return "LOAAN"; + if (code == V3ObservationValue.LOAAN1) + return "LOAAN1"; + if (code == V3ObservationValue.LOAAN2) + return "LOAAN2"; + if (code == V3ObservationValue.LOAAN3) + return "LOAAN3"; + if (code == V3ObservationValue.LOAAN4) + return "LOAAN4"; + if (code == V3ObservationValue.LOAAP) + return "LOAAP"; + if (code == V3ObservationValue.LOAAP1) + return "LOAAP1"; + if (code == V3ObservationValue.LOAAP2) + return "LOAAP2"; + if (code == V3ObservationValue.LOAAP3) + return "LOAAP3"; + if (code == V3ObservationValue.LOAAP4) + return "LOAAP4"; + if (code == V3ObservationValue.LOAAS) + return "LOAAS"; + if (code == V3ObservationValue.LOAAS1) + return "LOAAS1"; + if (code == V3ObservationValue.LOAAS2) + return "LOAAS2"; + if (code == V3ObservationValue.LOAAS3) + return "LOAAS3"; + if (code == V3ObservationValue.LOAAS4) + return "LOAAS4"; + if (code == V3ObservationValue.LOACM) + return "LOACM"; + if (code == V3ObservationValue.LOACM1) + return "LOACM1"; + if (code == V3ObservationValue.LOACM2) + return "LOACM2"; + if (code == V3ObservationValue.LOACM3) + return "LOACM3"; + if (code == V3ObservationValue.LOACM4) + return "LOACM4"; + if (code == V3ObservationValue.LOAID) + return "LOAID"; + if (code == V3ObservationValue.LOAID1) + return "LOAID1"; + if (code == V3ObservationValue.LOAID2) + return "LOAID2"; + if (code == V3ObservationValue.LOAID3) + return "LOAID3"; + if (code == V3ObservationValue.LOAID4) + return "LOAID4"; + if (code == V3ObservationValue.LOANR) + return "LOANR"; + if (code == V3ObservationValue.LOANR1) + return "LOANR1"; + if (code == V3ObservationValue.LOANR2) + return "LOANR2"; + if (code == V3ObservationValue.LOANR3) + return "LOANR3"; + if (code == V3ObservationValue.LOANR4) + return "LOANR4"; + if (code == V3ObservationValue.LOARA) + return "LOARA"; + if (code == V3ObservationValue.LOARA1) + return "LOARA1"; + if (code == V3ObservationValue.LOARA2) + return "LOARA2"; + if (code == V3ObservationValue.LOARA3) + return "LOARA3"; + if (code == V3ObservationValue.LOARA4) + return "LOARA4"; + if (code == V3ObservationValue.LOATK) + return "LOATK"; + if (code == V3ObservationValue.LOATK1) + return "LOATK1"; + if (code == V3ObservationValue.LOATK2) + return "LOATK2"; + if (code == V3ObservationValue.LOATK3) + return "LOATK3"; + if (code == V3ObservationValue.LOATK4) + return "LOATK4"; + if (code == V3ObservationValue.TRSTMECOBV) + return "TRSTMECOBV"; + if (code == V3ObservationValue._SEVERITYOBSERVATION) + return "_SeverityObservation"; + if (code == V3ObservationValue.H) + return "H"; + if (code == V3ObservationValue.L) + return "L"; + if (code == V3ObservationValue.M) + return "M"; + if (code == V3ObservationValue._SUBJECTBODYPOSITION) + return "_SubjectBodyPosition"; + if (code == V3ObservationValue.LLD) + return "LLD"; + if (code == V3ObservationValue.PRN) + return "PRN"; + if (code == V3ObservationValue.RLD) + return "RLD"; + if (code == V3ObservationValue.SFWL) + return "SFWL"; + if (code == V3ObservationValue.SIT) + return "SIT"; + if (code == V3ObservationValue.STN) + return "STN"; + if (code == V3ObservationValue.SUP) + return "SUP"; + if (code == V3ObservationValue.RTRD) + return "RTRD"; + if (code == V3ObservationValue.TRD) + return "TRD"; + if (code == V3ObservationValue._VERIFICATIONOUTCOMEVALUE) + return "_VerificationOutcomeValue"; + if (code == V3ObservationValue.ACT) + return "ACT"; + if (code == V3ObservationValue.ACTPEND) + return "ACTPEND"; + if (code == V3ObservationValue.ELG) + return "ELG"; + if (code == V3ObservationValue.INACT) + return "INACT"; + if (code == V3ObservationValue.INPNDINV) + return "INPNDINV"; + if (code == V3ObservationValue.INPNDUPD) + return "INPNDUPD"; + if (code == V3ObservationValue.NELG) + return "NELG"; + if (code == V3ObservationValue._ANNOTATIONVALUE) + return "_AnnotationValue"; + if (code == V3ObservationValue._COMMONCLINICALOBSERVATIONVALUE) + return "_CommonClinicalObservationValue"; + if (code == V3ObservationValue._INDIVIDUALCASESAFETYREPORTVALUEDOMAINS) + return "_IndividualCaseSafetyReportValueDomains"; + if (code == V3ObservationValue._INDICATIONVALUE) + return "_IndicationValue"; + return "?"; + } + + public String toSystem(V3ObservationValue code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3OrderableDrugForm.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3OrderableDrugForm.java new file mode 100644 index 00000000000..4eb3e04053c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3OrderableDrugForm.java @@ -0,0 +1,1518 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3OrderableDrugForm { + + /** + * AdministrableDrugForm + */ + _ADMINISTRABLEDRUGFORM, + /** + * Applicatorful + */ + APPFUL, + /** + * Drops + */ + DROP, + /** + * Nasal Drops + */ + NDROP, + /** + * Ophthalmic Drops + */ + OPDROP, + /** + * Oral Drops + */ + ORDROP, + /** + * Otic Drops + */ + OTDROP, + /** + * Puff + */ + PUFF, + /** + * Scoops + */ + SCOOP, + /** + * Sprays + */ + SPRY, + /** + * DispensableDrugForm + */ + _DISPENSABLEDRUGFORM, + /** + * Any elastic aeriform fluid in which the molecules are separated from one another and have free paths. + */ + _GASDRUGFORM, + /** + * Gas for Inhalation + */ + GASINHL, + /** + * GasLiquidMixture + */ + _GASLIQUIDMIXTURE, + /** + * Aerosol + */ + AER, + /** + * Breath Activated Inhaler + */ + BAINHL, + /** + * Inhalant Solution + */ + INHLSOL, + /** + * Metered Dose Inhaler + */ + MDINHL, + /** + * Nasal Spray + */ + NASSPRY, + /** + * Dermal Spray + */ + DERMSPRY, + /** + * Foam + */ + FOAM, + /** + * Foam with Applicator + */ + FOAMAPL, + /** + * Rectal foam + */ + RECFORM, + /** + * Vaginal foam + */ + VAGFOAM, + /** + * Vaginal foam with applicator + */ + VAGFOAMAPL, + /** + * Rectal Spray + */ + RECSPRY, + /** + * Vaginal Spray + */ + VAGSPRY, + /** + * GasSolidSpray + */ + _GASSOLIDSPRAY, + /** + * Inhalant + */ + INHL, + /** + * Breath Activated Powder Inhaler + */ + BAINHLPWD, + /** + * Inhalant Powder + */ + INHLPWD, + /** + * Metered Dose Powder Inhaler + */ + MDINHLPWD, + /** + * Nasal Inhalant + */ + NASINHL, + /** + * Oral Inhalant + */ + ORINHL, + /** + * Powder Spray + */ + PWDSPRY, + /** + * Spray with Adaptor + */ + SPRYADAPT, + /** + * A state of substance that is an intermediate one entered into as matter goes from solid to gas; liquids are also intermediate in that they have neither the orderliness of a crystal nor the randomness of a gas. (Note: This term should not be used to describe solutions, only pure chemicals in their liquid state.) + */ + _LIQUID, + /** + * Liquid Cleanser + */ + LIQCLN, + /** + * Medicated Liquid Soap + */ + LIQSOAP, + /** + * A liquid soap or detergent used to clean the hair and scalp and is often used as a vehicle for dermatologic agents. + */ + SHMP, + /** + * An unctuous, combustible substance which is liquid, or easily liquefiable, on warming, and is soluble in ether but insoluble in water. Such substances, depending on their origin, are classified as animal, mineral, or vegetable oils. + */ + OIL, + /** + * Topical Oil + */ + TOPOIL, + /** + * A liquid preparation that contains one or more chemical substances dissolved, i.e., molecularly dispersed, in a suitable solvent or mixture of mutually miscible solvents. + */ + SOL, + /** + * Intraperitoneal Solution + */ + IPSOL, + /** + * A sterile solution intended to bathe or flush open wounds or body cavities; they're used topically, never parenterally. + */ + IRSOL, + /** + * A liquid preparation, intended for the irrigative cleansing of the vagina, that is prepared from powders, liquid solutions, or liquid concentrates and contains one or more chemical substances dissolved in a suitable solvent or mutually miscible solvents. + */ + DOUCHE, + /** + * A rectal preparation for therapeutic, diagnostic, or nutritive purposes. + */ + ENEMA, + /** + * Ophthalmic Irrigation Solution + */ + OPIRSOL, + /** + * Intravenous Solution + */ + IVSOL, + /** + * Oral Solution + */ + ORALSOL, + /** + * A clear, pleasantly flavored, sweetened hydroalcoholic liquid containing dissolved medicinal agents; it is intended for oral use. + */ + ELIXIR, + /** + * An aqueous solution which is most often used for its deodorant, refreshing, or antiseptic effect. + */ + RINSE, + /** + * An oral solution containing high concentrations of sucrose or other sugars; the term has also been used to include any other liquid dosage form prepared in a sweet and viscid vehicle, including oral suspensions. + */ + SYRUP, + /** + * Rectal Solution + */ + RECSOL, + /** + * Topical Solution + */ + TOPSOL, + /** + * A solution or mixture of various substances in oil, alcoholic solutions of soap, or emulsions intended for external application. + */ + LIN, + /** + * Mucous Membrane Topical Solution + */ + MUCTOPSOL, + /** + * Tincture + */ + TINC, + /** + * A two-phase system in which one liquid is dispersed throughout another liquid in the form of small droplets. + */ + _LIQUIDLIQUIDEMULSION, + /** + * A semisolid dosage form containing one or more drug substances dissolved or dispersed in a suitable base; more recently, the term has been restricted to products consisting of oil-in-water emulsions or aqueous microcrystalline dispersions of long chain fatty acids or alcohols that are water washable and more cosmetically and aesthetically acceptable. + */ + CRM, + /** + * Nasal Cream + */ + NASCRM, + /** + * Ophthalmic Cream + */ + OPCRM, + /** + * Oral Cream + */ + ORCRM, + /** + * Otic Cream + */ + OTCRM, + /** + * Rectal Cream + */ + RECCRM, + /** + * Topical Cream + */ + TOPCRM, + /** + * Vaginal Cream + */ + VAGCRM, + /** + * Vaginal Cream with Applicator + */ + VAGCRMAPL, + /** + * The term "lotion" has been used to categorize many topical suspensions, solutions and emulsions intended for application to the skin. + */ + LTN, + /** + * Topical Lotion + */ + TOPLTN, + /** + * A semisolid preparation intended for external application to the skin or mucous membranes. + */ + OINT, + /** + * Nasal Ointment + */ + NASOINT, + /** + * Ointment with Applicator + */ + OINTAPL, + /** + * Ophthalmic Ointment + */ + OPOINT, + /** + * Otic Ointment + */ + OTOINT, + /** + * Rectal Ointment + */ + RECOINT, + /** + * Topical Ointment + */ + TOPOINT, + /** + * Vaginal Ointment + */ + VAGOINT, + /** + * Vaginal Ointment with Applicator + */ + VAGOINTAPL, + /** + * A liquid preparation which consists of solid particles dispersed throughout a liquid phase in which the particles are not soluble. + */ + _LIQUIDSOLIDSUSPENSION, + /** + * A semisolid system consisting of either suspensions made up of small inorganic particles or large organic molecules interpenetrated by a liquid. + */ + GEL, + /** + * Gel with Applicator + */ + GELAPL, + /** + * Nasal Gel + */ + NASGEL, + /** + * Ophthalmic Gel + */ + OPGEL, + /** + * Otic Gel + */ + OTGEL, + /** + * Topical Gel + */ + TOPGEL, + /** + * Urethral Gel + */ + URETHGEL, + /** + * Vaginal Gel + */ + VAGGEL, + /** + * Vaginal Gel with Applicator + */ + VGELAPL, + /** + * A semisolid dosage form that contains one or more drug substances intended for topical application. + */ + PASTE, + /** + * Pudding + */ + PUD, + /** + * A paste formulation intended to clean and/or polish the teeth, and which may contain certain additional agents. + */ + TPASTE, + /** + * Suspension + */ + SUSP, + /** + * Intrathecal Suspension + */ + ITSUSP, + /** + * Ophthalmic Suspension + */ + OPSUSP, + /** + * Oral Suspension + */ + ORSUSP, + /** + * Extended-Release Suspension + */ + ERSUSP, + /** + * 12 Hour Extended-Release Suspension + */ + ERSUSP12, + /** + * 24 Hour Extended Release Suspension + */ + ERSUSP24, + /** + * Otic Suspension + */ + OTSUSP, + /** + * Rectal Suspension + */ + RECSUSP, + /** + * SolidDrugForm + */ + _SOLIDDRUGFORM, + /** + * Bar + */ + BAR, + /** + * Bar Soap + */ + BARSOAP, + /** + * Medicated Bar Soap + */ + MEDBAR, + /** + * A solid dosage form usually in the form of a rectangle that is meant to be chewed. + */ + CHEWBAR, + /** + * A solid dosage form in the shape of a small ball. + */ + BEAD, + /** + * Cake + */ + CAKE, + /** + * A substance that serves to produce solid union between two surfaces. + */ + CEMENT, + /** + * A naturally produced angular solid of definite form in which the ultimate units from which it is built up are systematically arranged; they are usually evenly spaced on a regular space lattice. + */ + CRYS, + /** + * A circular plate-like organ or structure. + */ + DISK, + /** + * Flakes + */ + FLAKE, + /** + * A small particle or grain. + */ + GRAN, + /** + * A sweetened and flavored insoluble plastic material of various shapes which when chewed, releases a drug substance into the oral cavity. + */ + GUM, + /** + * Pad + */ + PAD, + /** + * Medicated Pad + */ + MEDPAD, + /** + * A drug delivery system that contains an adhesived backing and that permits its ingredients to diffuse from some portion of it (e.g., the backing itself, a reservoir, the adhesive, or some other component) into the body from the external site where it is applied. + */ + PATCH, + /** + * Transdermal Patch + */ + TPATCH, + /** + * 16 Hour Transdermal Patch + */ + TPATH16, + /** + * 24 Hour Transdermal Patch + */ + TPATH24, + /** + * Biweekly Transdermal Patch + */ + TPATH2WK, + /** + * 72 Hour Transdermal Patch + */ + TPATH72, + /** + * Weekly Transdermal Patch + */ + TPATHWK, + /** + * A small sterile solid mass consisting of a highly purified drug (with or without excipients) made by the formation of granules, or by compression and molding. + */ + PELLET, + /** + * A small, round solid dosage form containing a medicinal agent intended for oral administration. + */ + PILL, + /** + * A solid dosage form in which the drug is enclosed within either a hard or soft soluble container or "shell" made from a suitable form of gelatin. + */ + CAP, + /** + * Oral Capsule + */ + ORCAP, + /** + * Enteric Coated Capsule + */ + ENTCAP, + /** + * Extended Release Enteric Coated Capsule + */ + ERENTCAP, + /** + * A solid dosage form in which the drug is enclosed within either a hard or soft soluble container made from a suitable form of gelatin, and which releases a drug (or drugs) in such a manner to allow a reduction in dosing frequency as compared to that drug (or drugs) presented as a conventional dosage form. + */ + ERCAP, + /** + * 12 Hour Extended Release Capsule + */ + ERCAP12, + /** + * 24 Hour Extended Release Capsule + */ + ERCAP24, + /** + * Rationale: Duplicate of code ERENTCAP. Use code ERENTCAP instead. + */ + ERECCAP, + /** + * A solid dosage form containing medicinal substances with or without suitable diluents. + */ + TAB, + /** + * Oral Tablet + */ + ORTAB, + /** + * Buccal Tablet + */ + BUCTAB, + /** + * Sustained Release Buccal Tablet + */ + SRBUCTAB, + /** + * Caplet + */ + CAPLET, + /** + * A solid dosage form containing medicinal substances with or without suitable diluents that is intended to be chewed, producing a pleasant tasting residue in the oral cavity that is easily swallowed and does not leave a bitter or unpleasant after-taste. + */ + CHEWTAB, + /** + * Coated Particles Tablet + */ + CPTAB, + /** + * A solid dosage form containing medicinal substances which disintegrates rapidly, usually within a matter of seconds, when placed upon the tongue. + */ + DISINTAB, + /** + * Delayed Release Tablet + */ + DRTAB, + /** + * Enteric Coated Tablet + */ + ECTAB, + /** + * Extended Release Enteric Coated Tablet + */ + ERECTAB, + /** + * A solid dosage form containing a drug which allows at least a reduction in dosing frequency as compared to that drug presented in conventional dosage form. + */ + ERTAB, + /** + * 12 Hour Extended Release Tablet + */ + ERTAB12, + /** + * 24 Hour Extended Release Tablet + */ + ERTAB24, + /** + * A solid preparation containing one or more medicaments, usually in a flavored, sweetened base which is intended to dissolve or disintegrate slowly in the mouth. + */ + ORTROCHE, + /** + * Sublingual Tablet + */ + SLTAB, + /** + * Vaginal Tablet + */ + VAGTAB, + /** + * An intimate mixture of dry, finely divided drugs and/or chemicals that may be intended for internal or external use. + */ + POWD, + /** + * Topical Powder + */ + TOPPWD, + /** + * Rectal Powder + */ + RECPWD, + /** + * Vaginal Powder + */ + VAGPWD, + /** + * A solid body of various weights and shapes, adapted for introduction into the rectal, vaginal, or urethral orifice of the human body; they usually melt, soften, or dissolve at body temperature. + */ + SUPP, + /** + * Rectal Suppository + */ + RECSUPP, + /** + * Urethral suppository + */ + URETHSUPP, + /** + * Vaginal Suppository + */ + VAGSUPP, + /** + * A wad of absorbent material usually wound around one end of a small stick and used for applying medication or for removing material from an area. + */ + SWAB, + /** + * Medicated swab + */ + MEDSWAB, + /** + * A thin slice of material containing a medicinal agent. + */ + WAFER, + /** + * added to help the parsers + */ + NULL; + public static V3OrderableDrugForm fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AdministrableDrugForm".equals(codeString)) + return _ADMINISTRABLEDRUGFORM; + if ("APPFUL".equals(codeString)) + return APPFUL; + if ("DROP".equals(codeString)) + return DROP; + if ("NDROP".equals(codeString)) + return NDROP; + if ("OPDROP".equals(codeString)) + return OPDROP; + if ("ORDROP".equals(codeString)) + return ORDROP; + if ("OTDROP".equals(codeString)) + return OTDROP; + if ("PUFF".equals(codeString)) + return PUFF; + if ("SCOOP".equals(codeString)) + return SCOOP; + if ("SPRY".equals(codeString)) + return SPRY; + if ("_DispensableDrugForm".equals(codeString)) + return _DISPENSABLEDRUGFORM; + if ("_GasDrugForm".equals(codeString)) + return _GASDRUGFORM; + if ("GASINHL".equals(codeString)) + return GASINHL; + if ("_GasLiquidMixture".equals(codeString)) + return _GASLIQUIDMIXTURE; + if ("AER".equals(codeString)) + return AER; + if ("BAINHL".equals(codeString)) + return BAINHL; + if ("INHLSOL".equals(codeString)) + return INHLSOL; + if ("MDINHL".equals(codeString)) + return MDINHL; + if ("NASSPRY".equals(codeString)) + return NASSPRY; + if ("DERMSPRY".equals(codeString)) + return DERMSPRY; + if ("FOAM".equals(codeString)) + return FOAM; + if ("FOAMAPL".equals(codeString)) + return FOAMAPL; + if ("RECFORM".equals(codeString)) + return RECFORM; + if ("VAGFOAM".equals(codeString)) + return VAGFOAM; + if ("VAGFOAMAPL".equals(codeString)) + return VAGFOAMAPL; + if ("RECSPRY".equals(codeString)) + return RECSPRY; + if ("VAGSPRY".equals(codeString)) + return VAGSPRY; + if ("_GasSolidSpray".equals(codeString)) + return _GASSOLIDSPRAY; + if ("INHL".equals(codeString)) + return INHL; + if ("BAINHLPWD".equals(codeString)) + return BAINHLPWD; + if ("INHLPWD".equals(codeString)) + return INHLPWD; + if ("MDINHLPWD".equals(codeString)) + return MDINHLPWD; + if ("NASINHL".equals(codeString)) + return NASINHL; + if ("ORINHL".equals(codeString)) + return ORINHL; + if ("PWDSPRY".equals(codeString)) + return PWDSPRY; + if ("SPRYADAPT".equals(codeString)) + return SPRYADAPT; + if ("_Liquid".equals(codeString)) + return _LIQUID; + if ("LIQCLN".equals(codeString)) + return LIQCLN; + if ("LIQSOAP".equals(codeString)) + return LIQSOAP; + if ("SHMP".equals(codeString)) + return SHMP; + if ("OIL".equals(codeString)) + return OIL; + if ("TOPOIL".equals(codeString)) + return TOPOIL; + if ("SOL".equals(codeString)) + return SOL; + if ("IPSOL".equals(codeString)) + return IPSOL; + if ("IRSOL".equals(codeString)) + return IRSOL; + if ("DOUCHE".equals(codeString)) + return DOUCHE; + if ("ENEMA".equals(codeString)) + return ENEMA; + if ("OPIRSOL".equals(codeString)) + return OPIRSOL; + if ("IVSOL".equals(codeString)) + return IVSOL; + if ("ORALSOL".equals(codeString)) + return ORALSOL; + if ("ELIXIR".equals(codeString)) + return ELIXIR; + if ("RINSE".equals(codeString)) + return RINSE; + if ("SYRUP".equals(codeString)) + return SYRUP; + if ("RECSOL".equals(codeString)) + return RECSOL; + if ("TOPSOL".equals(codeString)) + return TOPSOL; + if ("LIN".equals(codeString)) + return LIN; + if ("MUCTOPSOL".equals(codeString)) + return MUCTOPSOL; + if ("TINC".equals(codeString)) + return TINC; + if ("_LiquidLiquidEmulsion".equals(codeString)) + return _LIQUIDLIQUIDEMULSION; + if ("CRM".equals(codeString)) + return CRM; + if ("NASCRM".equals(codeString)) + return NASCRM; + if ("OPCRM".equals(codeString)) + return OPCRM; + if ("ORCRM".equals(codeString)) + return ORCRM; + if ("OTCRM".equals(codeString)) + return OTCRM; + if ("RECCRM".equals(codeString)) + return RECCRM; + if ("TOPCRM".equals(codeString)) + return TOPCRM; + if ("VAGCRM".equals(codeString)) + return VAGCRM; + if ("VAGCRMAPL".equals(codeString)) + return VAGCRMAPL; + if ("LTN".equals(codeString)) + return LTN; + if ("TOPLTN".equals(codeString)) + return TOPLTN; + if ("OINT".equals(codeString)) + return OINT; + if ("NASOINT".equals(codeString)) + return NASOINT; + if ("OINTAPL".equals(codeString)) + return OINTAPL; + if ("OPOINT".equals(codeString)) + return OPOINT; + if ("OTOINT".equals(codeString)) + return OTOINT; + if ("RECOINT".equals(codeString)) + return RECOINT; + if ("TOPOINT".equals(codeString)) + return TOPOINT; + if ("VAGOINT".equals(codeString)) + return VAGOINT; + if ("VAGOINTAPL".equals(codeString)) + return VAGOINTAPL; + if ("_LiquidSolidSuspension".equals(codeString)) + return _LIQUIDSOLIDSUSPENSION; + if ("GEL".equals(codeString)) + return GEL; + if ("GELAPL".equals(codeString)) + return GELAPL; + if ("NASGEL".equals(codeString)) + return NASGEL; + if ("OPGEL".equals(codeString)) + return OPGEL; + if ("OTGEL".equals(codeString)) + return OTGEL; + if ("TOPGEL".equals(codeString)) + return TOPGEL; + if ("URETHGEL".equals(codeString)) + return URETHGEL; + if ("VAGGEL".equals(codeString)) + return VAGGEL; + if ("VGELAPL".equals(codeString)) + return VGELAPL; + if ("PASTE".equals(codeString)) + return PASTE; + if ("PUD".equals(codeString)) + return PUD; + if ("TPASTE".equals(codeString)) + return TPASTE; + if ("SUSP".equals(codeString)) + return SUSP; + if ("ITSUSP".equals(codeString)) + return ITSUSP; + if ("OPSUSP".equals(codeString)) + return OPSUSP; + if ("ORSUSP".equals(codeString)) + return ORSUSP; + if ("ERSUSP".equals(codeString)) + return ERSUSP; + if ("ERSUSP12".equals(codeString)) + return ERSUSP12; + if ("ERSUSP24".equals(codeString)) + return ERSUSP24; + if ("OTSUSP".equals(codeString)) + return OTSUSP; + if ("RECSUSP".equals(codeString)) + return RECSUSP; + if ("_SolidDrugForm".equals(codeString)) + return _SOLIDDRUGFORM; + if ("BAR".equals(codeString)) + return BAR; + if ("BARSOAP".equals(codeString)) + return BARSOAP; + if ("MEDBAR".equals(codeString)) + return MEDBAR; + if ("CHEWBAR".equals(codeString)) + return CHEWBAR; + if ("BEAD".equals(codeString)) + return BEAD; + if ("CAKE".equals(codeString)) + return CAKE; + if ("CEMENT".equals(codeString)) + return CEMENT; + if ("CRYS".equals(codeString)) + return CRYS; + if ("DISK".equals(codeString)) + return DISK; + if ("FLAKE".equals(codeString)) + return FLAKE; + if ("GRAN".equals(codeString)) + return GRAN; + if ("GUM".equals(codeString)) + return GUM; + if ("PAD".equals(codeString)) + return PAD; + if ("MEDPAD".equals(codeString)) + return MEDPAD; + if ("PATCH".equals(codeString)) + return PATCH; + if ("TPATCH".equals(codeString)) + return TPATCH; + if ("TPATH16".equals(codeString)) + return TPATH16; + if ("TPATH24".equals(codeString)) + return TPATH24; + if ("TPATH2WK".equals(codeString)) + return TPATH2WK; + if ("TPATH72".equals(codeString)) + return TPATH72; + if ("TPATHWK".equals(codeString)) + return TPATHWK; + if ("PELLET".equals(codeString)) + return PELLET; + if ("PILL".equals(codeString)) + return PILL; + if ("CAP".equals(codeString)) + return CAP; + if ("ORCAP".equals(codeString)) + return ORCAP; + if ("ENTCAP".equals(codeString)) + return ENTCAP; + if ("ERENTCAP".equals(codeString)) + return ERENTCAP; + if ("ERCAP".equals(codeString)) + return ERCAP; + if ("ERCAP12".equals(codeString)) + return ERCAP12; + if ("ERCAP24".equals(codeString)) + return ERCAP24; + if ("ERECCAP".equals(codeString)) + return ERECCAP; + if ("TAB".equals(codeString)) + return TAB; + if ("ORTAB".equals(codeString)) + return ORTAB; + if ("BUCTAB".equals(codeString)) + return BUCTAB; + if ("SRBUCTAB".equals(codeString)) + return SRBUCTAB; + if ("CAPLET".equals(codeString)) + return CAPLET; + if ("CHEWTAB".equals(codeString)) + return CHEWTAB; + if ("CPTAB".equals(codeString)) + return CPTAB; + if ("DISINTAB".equals(codeString)) + return DISINTAB; + if ("DRTAB".equals(codeString)) + return DRTAB; + if ("ECTAB".equals(codeString)) + return ECTAB; + if ("ERECTAB".equals(codeString)) + return ERECTAB; + if ("ERTAB".equals(codeString)) + return ERTAB; + if ("ERTAB12".equals(codeString)) + return ERTAB12; + if ("ERTAB24".equals(codeString)) + return ERTAB24; + if ("ORTROCHE".equals(codeString)) + return ORTROCHE; + if ("SLTAB".equals(codeString)) + return SLTAB; + if ("VAGTAB".equals(codeString)) + return VAGTAB; + if ("POWD".equals(codeString)) + return POWD; + if ("TOPPWD".equals(codeString)) + return TOPPWD; + if ("RECPWD".equals(codeString)) + return RECPWD; + if ("VAGPWD".equals(codeString)) + return VAGPWD; + if ("SUPP".equals(codeString)) + return SUPP; + if ("RECSUPP".equals(codeString)) + return RECSUPP; + if ("URETHSUPP".equals(codeString)) + return URETHSUPP; + if ("VAGSUPP".equals(codeString)) + return VAGSUPP; + if ("SWAB".equals(codeString)) + return SWAB; + if ("MEDSWAB".equals(codeString)) + return MEDSWAB; + if ("WAFER".equals(codeString)) + return WAFER; + throw new FHIRException("Unknown V3OrderableDrugForm code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ADMINISTRABLEDRUGFORM: return "_AdministrableDrugForm"; + case APPFUL: return "APPFUL"; + case DROP: return "DROP"; + case NDROP: return "NDROP"; + case OPDROP: return "OPDROP"; + case ORDROP: return "ORDROP"; + case OTDROP: return "OTDROP"; + case PUFF: return "PUFF"; + case SCOOP: return "SCOOP"; + case SPRY: return "SPRY"; + case _DISPENSABLEDRUGFORM: return "_DispensableDrugForm"; + case _GASDRUGFORM: return "_GasDrugForm"; + case GASINHL: return "GASINHL"; + case _GASLIQUIDMIXTURE: return "_GasLiquidMixture"; + case AER: return "AER"; + case BAINHL: return "BAINHL"; + case INHLSOL: return "INHLSOL"; + case MDINHL: return "MDINHL"; + case NASSPRY: return "NASSPRY"; + case DERMSPRY: return "DERMSPRY"; + case FOAM: return "FOAM"; + case FOAMAPL: return "FOAMAPL"; + case RECFORM: return "RECFORM"; + case VAGFOAM: return "VAGFOAM"; + case VAGFOAMAPL: return "VAGFOAMAPL"; + case RECSPRY: return "RECSPRY"; + case VAGSPRY: return "VAGSPRY"; + case _GASSOLIDSPRAY: return "_GasSolidSpray"; + case INHL: return "INHL"; + case BAINHLPWD: return "BAINHLPWD"; + case INHLPWD: return "INHLPWD"; + case MDINHLPWD: return "MDINHLPWD"; + case NASINHL: return "NASINHL"; + case ORINHL: return "ORINHL"; + case PWDSPRY: return "PWDSPRY"; + case SPRYADAPT: return "SPRYADAPT"; + case _LIQUID: return "_Liquid"; + case LIQCLN: return "LIQCLN"; + case LIQSOAP: return "LIQSOAP"; + case SHMP: return "SHMP"; + case OIL: return "OIL"; + case TOPOIL: return "TOPOIL"; + case SOL: return "SOL"; + case IPSOL: return "IPSOL"; + case IRSOL: return "IRSOL"; + case DOUCHE: return "DOUCHE"; + case ENEMA: return "ENEMA"; + case OPIRSOL: return "OPIRSOL"; + case IVSOL: return "IVSOL"; + case ORALSOL: return "ORALSOL"; + case ELIXIR: return "ELIXIR"; + case RINSE: return "RINSE"; + case SYRUP: return "SYRUP"; + case RECSOL: return "RECSOL"; + case TOPSOL: return "TOPSOL"; + case LIN: return "LIN"; + case MUCTOPSOL: return "MUCTOPSOL"; + case TINC: return "TINC"; + case _LIQUIDLIQUIDEMULSION: return "_LiquidLiquidEmulsion"; + case CRM: return "CRM"; + case NASCRM: return "NASCRM"; + case OPCRM: return "OPCRM"; + case ORCRM: return "ORCRM"; + case OTCRM: return "OTCRM"; + case RECCRM: return "RECCRM"; + case TOPCRM: return "TOPCRM"; + case VAGCRM: return "VAGCRM"; + case VAGCRMAPL: return "VAGCRMAPL"; + case LTN: return "LTN"; + case TOPLTN: return "TOPLTN"; + case OINT: return "OINT"; + case NASOINT: return "NASOINT"; + case OINTAPL: return "OINTAPL"; + case OPOINT: return "OPOINT"; + case OTOINT: return "OTOINT"; + case RECOINT: return "RECOINT"; + case TOPOINT: return "TOPOINT"; + case VAGOINT: return "VAGOINT"; + case VAGOINTAPL: return "VAGOINTAPL"; + case _LIQUIDSOLIDSUSPENSION: return "_LiquidSolidSuspension"; + case GEL: return "GEL"; + case GELAPL: return "GELAPL"; + case NASGEL: return "NASGEL"; + case OPGEL: return "OPGEL"; + case OTGEL: return "OTGEL"; + case TOPGEL: return "TOPGEL"; + case URETHGEL: return "URETHGEL"; + case VAGGEL: return "VAGGEL"; + case VGELAPL: return "VGELAPL"; + case PASTE: return "PASTE"; + case PUD: return "PUD"; + case TPASTE: return "TPASTE"; + case SUSP: return "SUSP"; + case ITSUSP: return "ITSUSP"; + case OPSUSP: return "OPSUSP"; + case ORSUSP: return "ORSUSP"; + case ERSUSP: return "ERSUSP"; + case ERSUSP12: return "ERSUSP12"; + case ERSUSP24: return "ERSUSP24"; + case OTSUSP: return "OTSUSP"; + case RECSUSP: return "RECSUSP"; + case _SOLIDDRUGFORM: return "_SolidDrugForm"; + case BAR: return "BAR"; + case BARSOAP: return "BARSOAP"; + case MEDBAR: return "MEDBAR"; + case CHEWBAR: return "CHEWBAR"; + case BEAD: return "BEAD"; + case CAKE: return "CAKE"; + case CEMENT: return "CEMENT"; + case CRYS: return "CRYS"; + case DISK: return "DISK"; + case FLAKE: return "FLAKE"; + case GRAN: return "GRAN"; + case GUM: return "GUM"; + case PAD: return "PAD"; + case MEDPAD: return "MEDPAD"; + case PATCH: return "PATCH"; + case TPATCH: return "TPATCH"; + case TPATH16: return "TPATH16"; + case TPATH24: return "TPATH24"; + case TPATH2WK: return "TPATH2WK"; + case TPATH72: return "TPATH72"; + case TPATHWK: return "TPATHWK"; + case PELLET: return "PELLET"; + case PILL: return "PILL"; + case CAP: return "CAP"; + case ORCAP: return "ORCAP"; + case ENTCAP: return "ENTCAP"; + case ERENTCAP: return "ERENTCAP"; + case ERCAP: return "ERCAP"; + case ERCAP12: return "ERCAP12"; + case ERCAP24: return "ERCAP24"; + case ERECCAP: return "ERECCAP"; + case TAB: return "TAB"; + case ORTAB: return "ORTAB"; + case BUCTAB: return "BUCTAB"; + case SRBUCTAB: return "SRBUCTAB"; + case CAPLET: return "CAPLET"; + case CHEWTAB: return "CHEWTAB"; + case CPTAB: return "CPTAB"; + case DISINTAB: return "DISINTAB"; + case DRTAB: return "DRTAB"; + case ECTAB: return "ECTAB"; + case ERECTAB: return "ERECTAB"; + case ERTAB: return "ERTAB"; + case ERTAB12: return "ERTAB12"; + case ERTAB24: return "ERTAB24"; + case ORTROCHE: return "ORTROCHE"; + case SLTAB: return "SLTAB"; + case VAGTAB: return "VAGTAB"; + case POWD: return "POWD"; + case TOPPWD: return "TOPPWD"; + case RECPWD: return "RECPWD"; + case VAGPWD: return "VAGPWD"; + case SUPP: return "SUPP"; + case RECSUPP: return "RECSUPP"; + case URETHSUPP: return "URETHSUPP"; + case VAGSUPP: return "VAGSUPP"; + case SWAB: return "SWAB"; + case MEDSWAB: return "MEDSWAB"; + case WAFER: return "WAFER"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/orderableDrugForm"; + } + public String getDefinition() { + switch (this) { + case _ADMINISTRABLEDRUGFORM: return "AdministrableDrugForm"; + case APPFUL: return "Applicatorful"; + case DROP: return "Drops"; + case NDROP: return "Nasal Drops"; + case OPDROP: return "Ophthalmic Drops"; + case ORDROP: return "Oral Drops"; + case OTDROP: return "Otic Drops"; + case PUFF: return "Puff"; + case SCOOP: return "Scoops"; + case SPRY: return "Sprays"; + case _DISPENSABLEDRUGFORM: return "DispensableDrugForm"; + case _GASDRUGFORM: return "Any elastic aeriform fluid in which the molecules are separated from one another and have free paths."; + case GASINHL: return "Gas for Inhalation"; + case _GASLIQUIDMIXTURE: return "GasLiquidMixture"; + case AER: return "Aerosol"; + case BAINHL: return "Breath Activated Inhaler"; + case INHLSOL: return "Inhalant Solution"; + case MDINHL: return "Metered Dose Inhaler"; + case NASSPRY: return "Nasal Spray"; + case DERMSPRY: return "Dermal Spray"; + case FOAM: return "Foam"; + case FOAMAPL: return "Foam with Applicator"; + case RECFORM: return "Rectal foam"; + case VAGFOAM: return "Vaginal foam"; + case VAGFOAMAPL: return "Vaginal foam with applicator"; + case RECSPRY: return "Rectal Spray"; + case VAGSPRY: return "Vaginal Spray"; + case _GASSOLIDSPRAY: return "GasSolidSpray"; + case INHL: return "Inhalant"; + case BAINHLPWD: return "Breath Activated Powder Inhaler"; + case INHLPWD: return "Inhalant Powder"; + case MDINHLPWD: return "Metered Dose Powder Inhaler"; + case NASINHL: return "Nasal Inhalant"; + case ORINHL: return "Oral Inhalant"; + case PWDSPRY: return "Powder Spray"; + case SPRYADAPT: return "Spray with Adaptor"; + case _LIQUID: return "A state of substance that is an intermediate one entered into as matter goes from solid to gas; liquids are also intermediate in that they have neither the orderliness of a crystal nor the randomness of a gas. (Note: This term should not be used to describe solutions, only pure chemicals in their liquid state.)"; + case LIQCLN: return "Liquid Cleanser"; + case LIQSOAP: return "Medicated Liquid Soap"; + case SHMP: return "A liquid soap or detergent used to clean the hair and scalp and is often used as a vehicle for dermatologic agents."; + case OIL: return "An unctuous, combustible substance which is liquid, or easily liquefiable, on warming, and is soluble in ether but insoluble in water. Such substances, depending on their origin, are classified as animal, mineral, or vegetable oils."; + case TOPOIL: return "Topical Oil"; + case SOL: return "A liquid preparation that contains one or more chemical substances dissolved, i.e., molecularly dispersed, in a suitable solvent or mixture of mutually miscible solvents."; + case IPSOL: return "Intraperitoneal Solution"; + case IRSOL: return "A sterile solution intended to bathe or flush open wounds or body cavities; they're used topically, never parenterally."; + case DOUCHE: return "A liquid preparation, intended for the irrigative cleansing of the vagina, that is prepared from powders, liquid solutions, or liquid concentrates and contains one or more chemical substances dissolved in a suitable solvent or mutually miscible solvents."; + case ENEMA: return "A rectal preparation for therapeutic, diagnostic, or nutritive purposes."; + case OPIRSOL: return "Ophthalmic Irrigation Solution"; + case IVSOL: return "Intravenous Solution"; + case ORALSOL: return "Oral Solution"; + case ELIXIR: return "A clear, pleasantly flavored, sweetened hydroalcoholic liquid containing dissolved medicinal agents; it is intended for oral use."; + case RINSE: return "An aqueous solution which is most often used for its deodorant, refreshing, or antiseptic effect."; + case SYRUP: return "An oral solution containing high concentrations of sucrose or other sugars; the term has also been used to include any other liquid dosage form prepared in a sweet and viscid vehicle, including oral suspensions."; + case RECSOL: return "Rectal Solution"; + case TOPSOL: return "Topical Solution"; + case LIN: return "A solution or mixture of various substances in oil, alcoholic solutions of soap, or emulsions intended for external application."; + case MUCTOPSOL: return "Mucous Membrane Topical Solution"; + case TINC: return "Tincture"; + case _LIQUIDLIQUIDEMULSION: return "A two-phase system in which one liquid is dispersed throughout another liquid in the form of small droplets."; + case CRM: return "A semisolid dosage form containing one or more drug substances dissolved or dispersed in a suitable base; more recently, the term has been restricted to products consisting of oil-in-water emulsions or aqueous microcrystalline dispersions of long chain fatty acids or alcohols that are water washable and more cosmetically and aesthetically acceptable."; + case NASCRM: return "Nasal Cream"; + case OPCRM: return "Ophthalmic Cream"; + case ORCRM: return "Oral Cream"; + case OTCRM: return "Otic Cream"; + case RECCRM: return "Rectal Cream"; + case TOPCRM: return "Topical Cream"; + case VAGCRM: return "Vaginal Cream"; + case VAGCRMAPL: return "Vaginal Cream with Applicator"; + case LTN: return "The term \"lotion\" has been used to categorize many topical suspensions, solutions and emulsions intended for application to the skin."; + case TOPLTN: return "Topical Lotion"; + case OINT: return "A semisolid preparation intended for external application to the skin or mucous membranes."; + case NASOINT: return "Nasal Ointment"; + case OINTAPL: return "Ointment with Applicator"; + case OPOINT: return "Ophthalmic Ointment"; + case OTOINT: return "Otic Ointment"; + case RECOINT: return "Rectal Ointment"; + case TOPOINT: return "Topical Ointment"; + case VAGOINT: return "Vaginal Ointment"; + case VAGOINTAPL: return "Vaginal Ointment with Applicator"; + case _LIQUIDSOLIDSUSPENSION: return "A liquid preparation which consists of solid particles dispersed throughout a liquid phase in which the particles are not soluble."; + case GEL: return "A semisolid system consisting of either suspensions made up of small inorganic particles or large organic molecules interpenetrated by a liquid."; + case GELAPL: return "Gel with Applicator"; + case NASGEL: return "Nasal Gel"; + case OPGEL: return "Ophthalmic Gel"; + case OTGEL: return "Otic Gel"; + case TOPGEL: return "Topical Gel"; + case URETHGEL: return "Urethral Gel"; + case VAGGEL: return "Vaginal Gel"; + case VGELAPL: return "Vaginal Gel with Applicator"; + case PASTE: return "A semisolid dosage form that contains one or more drug substances intended for topical application."; + case PUD: return "Pudding"; + case TPASTE: return "A paste formulation intended to clean and/or polish the teeth, and which may contain certain additional agents."; + case SUSP: return "Suspension"; + case ITSUSP: return "Intrathecal Suspension"; + case OPSUSP: return "Ophthalmic Suspension"; + case ORSUSP: return "Oral Suspension"; + case ERSUSP: return "Extended-Release Suspension"; + case ERSUSP12: return "12 Hour Extended-Release Suspension"; + case ERSUSP24: return "24 Hour Extended Release Suspension"; + case OTSUSP: return "Otic Suspension"; + case RECSUSP: return "Rectal Suspension"; + case _SOLIDDRUGFORM: return "SolidDrugForm"; + case BAR: return "Bar"; + case BARSOAP: return "Bar Soap"; + case MEDBAR: return "Medicated Bar Soap"; + case CHEWBAR: return "A solid dosage form usually in the form of a rectangle that is meant to be chewed."; + case BEAD: return "A solid dosage form in the shape of a small ball."; + case CAKE: return "Cake"; + case CEMENT: return "A substance that serves to produce solid union between two surfaces."; + case CRYS: return "A naturally produced angular solid of definite form in which the ultimate units from which it is built up are systematically arranged; they are usually evenly spaced on a regular space lattice."; + case DISK: return "A circular plate-like organ or structure."; + case FLAKE: return "Flakes"; + case GRAN: return "A small particle or grain."; + case GUM: return "A sweetened and flavored insoluble plastic material of various shapes which when chewed, releases a drug substance into the oral cavity."; + case PAD: return "Pad"; + case MEDPAD: return "Medicated Pad"; + case PATCH: return "A drug delivery system that contains an adhesived backing and that permits its ingredients to diffuse from some portion of it (e.g., the backing itself, a reservoir, the adhesive, or some other component) into the body from the external site where it is applied."; + case TPATCH: return "Transdermal Patch"; + case TPATH16: return "16 Hour Transdermal Patch"; + case TPATH24: return "24 Hour Transdermal Patch"; + case TPATH2WK: return "Biweekly Transdermal Patch"; + case TPATH72: return "72 Hour Transdermal Patch"; + case TPATHWK: return "Weekly Transdermal Patch"; + case PELLET: return "A small sterile solid mass consisting of a highly purified drug (with or without excipients) made by the formation of granules, or by compression and molding."; + case PILL: return "A small, round solid dosage form containing a medicinal agent intended for oral administration."; + case CAP: return "A solid dosage form in which the drug is enclosed within either a hard or soft soluble container or \"shell\" made from a suitable form of gelatin."; + case ORCAP: return "Oral Capsule"; + case ENTCAP: return "Enteric Coated Capsule"; + case ERENTCAP: return "Extended Release Enteric Coated Capsule"; + case ERCAP: return "A solid dosage form in which the drug is enclosed within either a hard or soft soluble container made from a suitable form of gelatin, and which releases a drug (or drugs) in such a manner to allow a reduction in dosing frequency as compared to that drug (or drugs) presented as a conventional dosage form."; + case ERCAP12: return "12 Hour Extended Release Capsule"; + case ERCAP24: return "24 Hour Extended Release Capsule"; + case ERECCAP: return "Rationale: Duplicate of code ERENTCAP. Use code ERENTCAP instead."; + case TAB: return "A solid dosage form containing medicinal substances with or without suitable diluents."; + case ORTAB: return "Oral Tablet"; + case BUCTAB: return "Buccal Tablet"; + case SRBUCTAB: return "Sustained Release Buccal Tablet"; + case CAPLET: return "Caplet"; + case CHEWTAB: return "A solid dosage form containing medicinal substances with or without suitable diluents that is intended to be chewed, producing a pleasant tasting residue in the oral cavity that is easily swallowed and does not leave a bitter or unpleasant after-taste."; + case CPTAB: return "Coated Particles Tablet"; + case DISINTAB: return "A solid dosage form containing medicinal substances which disintegrates rapidly, usually within a matter of seconds, when placed upon the tongue."; + case DRTAB: return "Delayed Release Tablet"; + case ECTAB: return "Enteric Coated Tablet"; + case ERECTAB: return "Extended Release Enteric Coated Tablet"; + case ERTAB: return "A solid dosage form containing a drug which allows at least a reduction in dosing frequency as compared to that drug presented in conventional dosage form."; + case ERTAB12: return "12 Hour Extended Release Tablet"; + case ERTAB24: return "24 Hour Extended Release Tablet"; + case ORTROCHE: return "A solid preparation containing one or more medicaments, usually in a flavored, sweetened base which is intended to dissolve or disintegrate slowly in the mouth."; + case SLTAB: return "Sublingual Tablet"; + case VAGTAB: return "Vaginal Tablet"; + case POWD: return "An intimate mixture of dry, finely divided drugs and/or chemicals that may be intended for internal or external use."; + case TOPPWD: return "Topical Powder"; + case RECPWD: return "Rectal Powder"; + case VAGPWD: return "Vaginal Powder"; + case SUPP: return "A solid body of various weights and shapes, adapted for introduction into the rectal, vaginal, or urethral orifice of the human body; they usually melt, soften, or dissolve at body temperature."; + case RECSUPP: return "Rectal Suppository"; + case URETHSUPP: return "Urethral suppository"; + case VAGSUPP: return "Vaginal Suppository"; + case SWAB: return "A wad of absorbent material usually wound around one end of a small stick and used for applying medication or for removing material from an area."; + case MEDSWAB: return "Medicated swab"; + case WAFER: return "A thin slice of material containing a medicinal agent."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ADMINISTRABLEDRUGFORM: return "AdministrableDrugForm"; + case APPFUL: return "Applicatorful"; + case DROP: return "Drops"; + case NDROP: return "Nasal Drops"; + case OPDROP: return "Ophthalmic Drops"; + case ORDROP: return "Oral Drops"; + case OTDROP: return "Otic Drops"; + case PUFF: return "Puff"; + case SCOOP: return "Scoops"; + case SPRY: return "Sprays"; + case _DISPENSABLEDRUGFORM: return "DispensableDrugForm"; + case _GASDRUGFORM: return "GasDrugForm"; + case GASINHL: return "Gas for Inhalation"; + case _GASLIQUIDMIXTURE: return "GasLiquidMixture"; + case AER: return "Aerosol"; + case BAINHL: return "Breath Activated Inhaler"; + case INHLSOL: return "Inhalant Solution"; + case MDINHL: return "Metered Dose Inhaler"; + case NASSPRY: return "Nasal Spray"; + case DERMSPRY: return "Dermal Spray"; + case FOAM: return "Foam"; + case FOAMAPL: return "Foam with Applicator"; + case RECFORM: return "Rectal foam"; + case VAGFOAM: return "Vaginal foam"; + case VAGFOAMAPL: return "Vaginal foam with applicator"; + case RECSPRY: return "Rectal Spray"; + case VAGSPRY: return "Vaginal Spray"; + case _GASSOLIDSPRAY: return "GasSolidSpray"; + case INHL: return "Inhalant"; + case BAINHLPWD: return "Breath Activated Powder Inhaler"; + case INHLPWD: return "Inhalant Powder"; + case MDINHLPWD: return "Metered Dose Powder Inhaler"; + case NASINHL: return "Nasal Inhalant"; + case ORINHL: return "Oral Inhalant"; + case PWDSPRY: return "Powder Spray"; + case SPRYADAPT: return "Spray with Adaptor"; + case _LIQUID: return "Liquid"; + case LIQCLN: return "Liquid Cleanser"; + case LIQSOAP: return "Medicated Liquid Soap"; + case SHMP: return "Shampoo"; + case OIL: return "Oil"; + case TOPOIL: return "Topical Oil"; + case SOL: return "Solution"; + case IPSOL: return "Intraperitoneal Solution"; + case IRSOL: return "Irrigation Solution"; + case DOUCHE: return "Douche"; + case ENEMA: return "Enema"; + case OPIRSOL: return "Ophthalmic Irrigation Solution"; + case IVSOL: return "Intravenous Solution"; + case ORALSOL: return "Oral Solution"; + case ELIXIR: return "Elixir"; + case RINSE: return "Mouthwash/Rinse"; + case SYRUP: return "Syrup"; + case RECSOL: return "Rectal Solution"; + case TOPSOL: return "Topical Solution"; + case LIN: return "Liniment"; + case MUCTOPSOL: return "Mucous Membrane Topical Solution"; + case TINC: return "Tincture"; + case _LIQUIDLIQUIDEMULSION: return "LiquidLiquidEmulsion"; + case CRM: return "Cream"; + case NASCRM: return "Nasal Cream"; + case OPCRM: return "Ophthalmic Cream"; + case ORCRM: return "Oral Cream"; + case OTCRM: return "Otic Cream"; + case RECCRM: return "Rectal Cream"; + case TOPCRM: return "Topical Cream"; + case VAGCRM: return "Vaginal Cream"; + case VAGCRMAPL: return "Vaginal Cream with Applicator"; + case LTN: return "Lotion"; + case TOPLTN: return "Topical Lotion"; + case OINT: return "Ointment"; + case NASOINT: return "Nasal Ointment"; + case OINTAPL: return "Ointment with Applicator"; + case OPOINT: return "Ophthalmic Ointment"; + case OTOINT: return "Otic Ointment"; + case RECOINT: return "Rectal Ointment"; + case TOPOINT: return "Topical Ointment"; + case VAGOINT: return "Vaginal Ointment"; + case VAGOINTAPL: return "Vaginal Ointment with Applicator"; + case _LIQUIDSOLIDSUSPENSION: return "LiquidSolidSuspension"; + case GEL: return "Gel"; + case GELAPL: return "Gel with Applicator"; + case NASGEL: return "Nasal Gel"; + case OPGEL: return "Ophthalmic Gel"; + case OTGEL: return "Otic Gel"; + case TOPGEL: return "Topical Gel"; + case URETHGEL: return "Urethral Gel"; + case VAGGEL: return "Vaginal Gel"; + case VGELAPL: return "Vaginal Gel with Applicator"; + case PASTE: return "Paste"; + case PUD: return "Pudding"; + case TPASTE: return "Toothpaste"; + case SUSP: return "Suspension"; + case ITSUSP: return "Intrathecal Suspension"; + case OPSUSP: return "Ophthalmic Suspension"; + case ORSUSP: return "Oral Suspension"; + case ERSUSP: return "Extended-Release Suspension"; + case ERSUSP12: return "12 Hour Extended-Release Suspension"; + case ERSUSP24: return "24 Hour Extended Release Suspension"; + case OTSUSP: return "Otic Suspension"; + case RECSUSP: return "Rectal Suspension"; + case _SOLIDDRUGFORM: return "SolidDrugForm"; + case BAR: return "Bar"; + case BARSOAP: return "Bar Soap"; + case MEDBAR: return "Medicated Bar Soap"; + case CHEWBAR: return "Chewable Bar"; + case BEAD: return "Beads"; + case CAKE: return "Cake"; + case CEMENT: return "Cement"; + case CRYS: return "Crystals"; + case DISK: return "Disk"; + case FLAKE: return "Flakes"; + case GRAN: return "Granules"; + case GUM: return "ChewingGum"; + case PAD: return "Pad"; + case MEDPAD: return "Medicated Pad"; + case PATCH: return "Patch"; + case TPATCH: return "Transdermal Patch"; + case TPATH16: return "16 Hour Transdermal Patch"; + case TPATH24: return "24 Hour Transdermal Patch"; + case TPATH2WK: return "Biweekly Transdermal Patch"; + case TPATH72: return "72 Hour Transdermal Patch"; + case TPATHWK: return "Weekly Transdermal Patch"; + case PELLET: return "Pellet"; + case PILL: return "Pill"; + case CAP: return "Capsule"; + case ORCAP: return "Oral Capsule"; + case ENTCAP: return "Enteric Coated Capsule"; + case ERENTCAP: return "Extended Release Enteric Coated Capsule"; + case ERCAP: return "Extended Release Capsule"; + case ERCAP12: return "12 Hour Extended Release Capsule"; + case ERCAP24: return "24 Hour Extended Release Capsule"; + case ERECCAP: return "Extended Release Enteric Coated Capsule"; + case TAB: return "Tablet"; + case ORTAB: return "Oral Tablet"; + case BUCTAB: return "Buccal Tablet"; + case SRBUCTAB: return "Sustained Release Buccal Tablet"; + case CAPLET: return "Caplet"; + case CHEWTAB: return "Chewable Tablet"; + case CPTAB: return "Coated Particles Tablet"; + case DISINTAB: return "Disintegrating Tablet"; + case DRTAB: return "Delayed Release Tablet"; + case ECTAB: return "Enteric Coated Tablet"; + case ERECTAB: return "Extended Release Enteric Coated Tablet"; + case ERTAB: return "Extended Release Tablet"; + case ERTAB12: return "12 Hour Extended Release Tablet"; + case ERTAB24: return "24 Hour Extended Release Tablet"; + case ORTROCHE: return "Lozenge/Oral Troche"; + case SLTAB: return "Sublingual Tablet"; + case VAGTAB: return "Vaginal Tablet"; + case POWD: return "Powder"; + case TOPPWD: return "Topical Powder"; + case RECPWD: return "Rectal Powder"; + case VAGPWD: return "Vaginal Powder"; + case SUPP: return "Suppository"; + case RECSUPP: return "Rectal Suppository"; + case URETHSUPP: return "Urethral suppository"; + case VAGSUPP: return "Vaginal Suppository"; + case SWAB: return "Swab"; + case MEDSWAB: return "Medicated swab"; + case WAFER: return "Wafer"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3OrderableDrugFormEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3OrderableDrugFormEnumFactory.java new file mode 100644 index 00000000000..8fae6716e9f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3OrderableDrugFormEnumFactory.java @@ -0,0 +1,698 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3OrderableDrugFormEnumFactory implements EnumFactory { + + public V3OrderableDrugForm fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AdministrableDrugForm".equals(codeString)) + return V3OrderableDrugForm._ADMINISTRABLEDRUGFORM; + if ("APPFUL".equals(codeString)) + return V3OrderableDrugForm.APPFUL; + if ("DROP".equals(codeString)) + return V3OrderableDrugForm.DROP; + if ("NDROP".equals(codeString)) + return V3OrderableDrugForm.NDROP; + if ("OPDROP".equals(codeString)) + return V3OrderableDrugForm.OPDROP; + if ("ORDROP".equals(codeString)) + return V3OrderableDrugForm.ORDROP; + if ("OTDROP".equals(codeString)) + return V3OrderableDrugForm.OTDROP; + if ("PUFF".equals(codeString)) + return V3OrderableDrugForm.PUFF; + if ("SCOOP".equals(codeString)) + return V3OrderableDrugForm.SCOOP; + if ("SPRY".equals(codeString)) + return V3OrderableDrugForm.SPRY; + if ("_DispensableDrugForm".equals(codeString)) + return V3OrderableDrugForm._DISPENSABLEDRUGFORM; + if ("_GasDrugForm".equals(codeString)) + return V3OrderableDrugForm._GASDRUGFORM; + if ("GASINHL".equals(codeString)) + return V3OrderableDrugForm.GASINHL; + if ("_GasLiquidMixture".equals(codeString)) + return V3OrderableDrugForm._GASLIQUIDMIXTURE; + if ("AER".equals(codeString)) + return V3OrderableDrugForm.AER; + if ("BAINHL".equals(codeString)) + return V3OrderableDrugForm.BAINHL; + if ("INHLSOL".equals(codeString)) + return V3OrderableDrugForm.INHLSOL; + if ("MDINHL".equals(codeString)) + return V3OrderableDrugForm.MDINHL; + if ("NASSPRY".equals(codeString)) + return V3OrderableDrugForm.NASSPRY; + if ("DERMSPRY".equals(codeString)) + return V3OrderableDrugForm.DERMSPRY; + if ("FOAM".equals(codeString)) + return V3OrderableDrugForm.FOAM; + if ("FOAMAPL".equals(codeString)) + return V3OrderableDrugForm.FOAMAPL; + if ("RECFORM".equals(codeString)) + return V3OrderableDrugForm.RECFORM; + if ("VAGFOAM".equals(codeString)) + return V3OrderableDrugForm.VAGFOAM; + if ("VAGFOAMAPL".equals(codeString)) + return V3OrderableDrugForm.VAGFOAMAPL; + if ("RECSPRY".equals(codeString)) + return V3OrderableDrugForm.RECSPRY; + if ("VAGSPRY".equals(codeString)) + return V3OrderableDrugForm.VAGSPRY; + if ("_GasSolidSpray".equals(codeString)) + return V3OrderableDrugForm._GASSOLIDSPRAY; + if ("INHL".equals(codeString)) + return V3OrderableDrugForm.INHL; + if ("BAINHLPWD".equals(codeString)) + return V3OrderableDrugForm.BAINHLPWD; + if ("INHLPWD".equals(codeString)) + return V3OrderableDrugForm.INHLPWD; + if ("MDINHLPWD".equals(codeString)) + return V3OrderableDrugForm.MDINHLPWD; + if ("NASINHL".equals(codeString)) + return V3OrderableDrugForm.NASINHL; + if ("ORINHL".equals(codeString)) + return V3OrderableDrugForm.ORINHL; + if ("PWDSPRY".equals(codeString)) + return V3OrderableDrugForm.PWDSPRY; + if ("SPRYADAPT".equals(codeString)) + return V3OrderableDrugForm.SPRYADAPT; + if ("_Liquid".equals(codeString)) + return V3OrderableDrugForm._LIQUID; + if ("LIQCLN".equals(codeString)) + return V3OrderableDrugForm.LIQCLN; + if ("LIQSOAP".equals(codeString)) + return V3OrderableDrugForm.LIQSOAP; + if ("SHMP".equals(codeString)) + return V3OrderableDrugForm.SHMP; + if ("OIL".equals(codeString)) + return V3OrderableDrugForm.OIL; + if ("TOPOIL".equals(codeString)) + return V3OrderableDrugForm.TOPOIL; + if ("SOL".equals(codeString)) + return V3OrderableDrugForm.SOL; + if ("IPSOL".equals(codeString)) + return V3OrderableDrugForm.IPSOL; + if ("IRSOL".equals(codeString)) + return V3OrderableDrugForm.IRSOL; + if ("DOUCHE".equals(codeString)) + return V3OrderableDrugForm.DOUCHE; + if ("ENEMA".equals(codeString)) + return V3OrderableDrugForm.ENEMA; + if ("OPIRSOL".equals(codeString)) + return V3OrderableDrugForm.OPIRSOL; + if ("IVSOL".equals(codeString)) + return V3OrderableDrugForm.IVSOL; + if ("ORALSOL".equals(codeString)) + return V3OrderableDrugForm.ORALSOL; + if ("ELIXIR".equals(codeString)) + return V3OrderableDrugForm.ELIXIR; + if ("RINSE".equals(codeString)) + return V3OrderableDrugForm.RINSE; + if ("SYRUP".equals(codeString)) + return V3OrderableDrugForm.SYRUP; + if ("RECSOL".equals(codeString)) + return V3OrderableDrugForm.RECSOL; + if ("TOPSOL".equals(codeString)) + return V3OrderableDrugForm.TOPSOL; + if ("LIN".equals(codeString)) + return V3OrderableDrugForm.LIN; + if ("MUCTOPSOL".equals(codeString)) + return V3OrderableDrugForm.MUCTOPSOL; + if ("TINC".equals(codeString)) + return V3OrderableDrugForm.TINC; + if ("_LiquidLiquidEmulsion".equals(codeString)) + return V3OrderableDrugForm._LIQUIDLIQUIDEMULSION; + if ("CRM".equals(codeString)) + return V3OrderableDrugForm.CRM; + if ("NASCRM".equals(codeString)) + return V3OrderableDrugForm.NASCRM; + if ("OPCRM".equals(codeString)) + return V3OrderableDrugForm.OPCRM; + if ("ORCRM".equals(codeString)) + return V3OrderableDrugForm.ORCRM; + if ("OTCRM".equals(codeString)) + return V3OrderableDrugForm.OTCRM; + if ("RECCRM".equals(codeString)) + return V3OrderableDrugForm.RECCRM; + if ("TOPCRM".equals(codeString)) + return V3OrderableDrugForm.TOPCRM; + if ("VAGCRM".equals(codeString)) + return V3OrderableDrugForm.VAGCRM; + if ("VAGCRMAPL".equals(codeString)) + return V3OrderableDrugForm.VAGCRMAPL; + if ("LTN".equals(codeString)) + return V3OrderableDrugForm.LTN; + if ("TOPLTN".equals(codeString)) + return V3OrderableDrugForm.TOPLTN; + if ("OINT".equals(codeString)) + return V3OrderableDrugForm.OINT; + if ("NASOINT".equals(codeString)) + return V3OrderableDrugForm.NASOINT; + if ("OINTAPL".equals(codeString)) + return V3OrderableDrugForm.OINTAPL; + if ("OPOINT".equals(codeString)) + return V3OrderableDrugForm.OPOINT; + if ("OTOINT".equals(codeString)) + return V3OrderableDrugForm.OTOINT; + if ("RECOINT".equals(codeString)) + return V3OrderableDrugForm.RECOINT; + if ("TOPOINT".equals(codeString)) + return V3OrderableDrugForm.TOPOINT; + if ("VAGOINT".equals(codeString)) + return V3OrderableDrugForm.VAGOINT; + if ("VAGOINTAPL".equals(codeString)) + return V3OrderableDrugForm.VAGOINTAPL; + if ("_LiquidSolidSuspension".equals(codeString)) + return V3OrderableDrugForm._LIQUIDSOLIDSUSPENSION; + if ("GEL".equals(codeString)) + return V3OrderableDrugForm.GEL; + if ("GELAPL".equals(codeString)) + return V3OrderableDrugForm.GELAPL; + if ("NASGEL".equals(codeString)) + return V3OrderableDrugForm.NASGEL; + if ("OPGEL".equals(codeString)) + return V3OrderableDrugForm.OPGEL; + if ("OTGEL".equals(codeString)) + return V3OrderableDrugForm.OTGEL; + if ("TOPGEL".equals(codeString)) + return V3OrderableDrugForm.TOPGEL; + if ("URETHGEL".equals(codeString)) + return V3OrderableDrugForm.URETHGEL; + if ("VAGGEL".equals(codeString)) + return V3OrderableDrugForm.VAGGEL; + if ("VGELAPL".equals(codeString)) + return V3OrderableDrugForm.VGELAPL; + if ("PASTE".equals(codeString)) + return V3OrderableDrugForm.PASTE; + if ("PUD".equals(codeString)) + return V3OrderableDrugForm.PUD; + if ("TPASTE".equals(codeString)) + return V3OrderableDrugForm.TPASTE; + if ("SUSP".equals(codeString)) + return V3OrderableDrugForm.SUSP; + if ("ITSUSP".equals(codeString)) + return V3OrderableDrugForm.ITSUSP; + if ("OPSUSP".equals(codeString)) + return V3OrderableDrugForm.OPSUSP; + if ("ORSUSP".equals(codeString)) + return V3OrderableDrugForm.ORSUSP; + if ("ERSUSP".equals(codeString)) + return V3OrderableDrugForm.ERSUSP; + if ("ERSUSP12".equals(codeString)) + return V3OrderableDrugForm.ERSUSP12; + if ("ERSUSP24".equals(codeString)) + return V3OrderableDrugForm.ERSUSP24; + if ("OTSUSP".equals(codeString)) + return V3OrderableDrugForm.OTSUSP; + if ("RECSUSP".equals(codeString)) + return V3OrderableDrugForm.RECSUSP; + if ("_SolidDrugForm".equals(codeString)) + return V3OrderableDrugForm._SOLIDDRUGFORM; + if ("BAR".equals(codeString)) + return V3OrderableDrugForm.BAR; + if ("BARSOAP".equals(codeString)) + return V3OrderableDrugForm.BARSOAP; + if ("MEDBAR".equals(codeString)) + return V3OrderableDrugForm.MEDBAR; + if ("CHEWBAR".equals(codeString)) + return V3OrderableDrugForm.CHEWBAR; + if ("BEAD".equals(codeString)) + return V3OrderableDrugForm.BEAD; + if ("CAKE".equals(codeString)) + return V3OrderableDrugForm.CAKE; + if ("CEMENT".equals(codeString)) + return V3OrderableDrugForm.CEMENT; + if ("CRYS".equals(codeString)) + return V3OrderableDrugForm.CRYS; + if ("DISK".equals(codeString)) + return V3OrderableDrugForm.DISK; + if ("FLAKE".equals(codeString)) + return V3OrderableDrugForm.FLAKE; + if ("GRAN".equals(codeString)) + return V3OrderableDrugForm.GRAN; + if ("GUM".equals(codeString)) + return V3OrderableDrugForm.GUM; + if ("PAD".equals(codeString)) + return V3OrderableDrugForm.PAD; + if ("MEDPAD".equals(codeString)) + return V3OrderableDrugForm.MEDPAD; + if ("PATCH".equals(codeString)) + return V3OrderableDrugForm.PATCH; + if ("TPATCH".equals(codeString)) + return V3OrderableDrugForm.TPATCH; + if ("TPATH16".equals(codeString)) + return V3OrderableDrugForm.TPATH16; + if ("TPATH24".equals(codeString)) + return V3OrderableDrugForm.TPATH24; + if ("TPATH2WK".equals(codeString)) + return V3OrderableDrugForm.TPATH2WK; + if ("TPATH72".equals(codeString)) + return V3OrderableDrugForm.TPATH72; + if ("TPATHWK".equals(codeString)) + return V3OrderableDrugForm.TPATHWK; + if ("PELLET".equals(codeString)) + return V3OrderableDrugForm.PELLET; + if ("PILL".equals(codeString)) + return V3OrderableDrugForm.PILL; + if ("CAP".equals(codeString)) + return V3OrderableDrugForm.CAP; + if ("ORCAP".equals(codeString)) + return V3OrderableDrugForm.ORCAP; + if ("ENTCAP".equals(codeString)) + return V3OrderableDrugForm.ENTCAP; + if ("ERENTCAP".equals(codeString)) + return V3OrderableDrugForm.ERENTCAP; + if ("ERCAP".equals(codeString)) + return V3OrderableDrugForm.ERCAP; + if ("ERCAP12".equals(codeString)) + return V3OrderableDrugForm.ERCAP12; + if ("ERCAP24".equals(codeString)) + return V3OrderableDrugForm.ERCAP24; + if ("ERECCAP".equals(codeString)) + return V3OrderableDrugForm.ERECCAP; + if ("TAB".equals(codeString)) + return V3OrderableDrugForm.TAB; + if ("ORTAB".equals(codeString)) + return V3OrderableDrugForm.ORTAB; + if ("BUCTAB".equals(codeString)) + return V3OrderableDrugForm.BUCTAB; + if ("SRBUCTAB".equals(codeString)) + return V3OrderableDrugForm.SRBUCTAB; + if ("CAPLET".equals(codeString)) + return V3OrderableDrugForm.CAPLET; + if ("CHEWTAB".equals(codeString)) + return V3OrderableDrugForm.CHEWTAB; + if ("CPTAB".equals(codeString)) + return V3OrderableDrugForm.CPTAB; + if ("DISINTAB".equals(codeString)) + return V3OrderableDrugForm.DISINTAB; + if ("DRTAB".equals(codeString)) + return V3OrderableDrugForm.DRTAB; + if ("ECTAB".equals(codeString)) + return V3OrderableDrugForm.ECTAB; + if ("ERECTAB".equals(codeString)) + return V3OrderableDrugForm.ERECTAB; + if ("ERTAB".equals(codeString)) + return V3OrderableDrugForm.ERTAB; + if ("ERTAB12".equals(codeString)) + return V3OrderableDrugForm.ERTAB12; + if ("ERTAB24".equals(codeString)) + return V3OrderableDrugForm.ERTAB24; + if ("ORTROCHE".equals(codeString)) + return V3OrderableDrugForm.ORTROCHE; + if ("SLTAB".equals(codeString)) + return V3OrderableDrugForm.SLTAB; + if ("VAGTAB".equals(codeString)) + return V3OrderableDrugForm.VAGTAB; + if ("POWD".equals(codeString)) + return V3OrderableDrugForm.POWD; + if ("TOPPWD".equals(codeString)) + return V3OrderableDrugForm.TOPPWD; + if ("RECPWD".equals(codeString)) + return V3OrderableDrugForm.RECPWD; + if ("VAGPWD".equals(codeString)) + return V3OrderableDrugForm.VAGPWD; + if ("SUPP".equals(codeString)) + return V3OrderableDrugForm.SUPP; + if ("RECSUPP".equals(codeString)) + return V3OrderableDrugForm.RECSUPP; + if ("URETHSUPP".equals(codeString)) + return V3OrderableDrugForm.URETHSUPP; + if ("VAGSUPP".equals(codeString)) + return V3OrderableDrugForm.VAGSUPP; + if ("SWAB".equals(codeString)) + return V3OrderableDrugForm.SWAB; + if ("MEDSWAB".equals(codeString)) + return V3OrderableDrugForm.MEDSWAB; + if ("WAFER".equals(codeString)) + return V3OrderableDrugForm.WAFER; + throw new IllegalArgumentException("Unknown V3OrderableDrugForm code '"+codeString+"'"); + } + + public String toCode(V3OrderableDrugForm code) { + if (code == V3OrderableDrugForm._ADMINISTRABLEDRUGFORM) + return "_AdministrableDrugForm"; + if (code == V3OrderableDrugForm.APPFUL) + return "APPFUL"; + if (code == V3OrderableDrugForm.DROP) + return "DROP"; + if (code == V3OrderableDrugForm.NDROP) + return "NDROP"; + if (code == V3OrderableDrugForm.OPDROP) + return "OPDROP"; + if (code == V3OrderableDrugForm.ORDROP) + return "ORDROP"; + if (code == V3OrderableDrugForm.OTDROP) + return "OTDROP"; + if (code == V3OrderableDrugForm.PUFF) + return "PUFF"; + if (code == V3OrderableDrugForm.SCOOP) + return "SCOOP"; + if (code == V3OrderableDrugForm.SPRY) + return "SPRY"; + if (code == V3OrderableDrugForm._DISPENSABLEDRUGFORM) + return "_DispensableDrugForm"; + if (code == V3OrderableDrugForm._GASDRUGFORM) + return "_GasDrugForm"; + if (code == V3OrderableDrugForm.GASINHL) + return "GASINHL"; + if (code == V3OrderableDrugForm._GASLIQUIDMIXTURE) + return "_GasLiquidMixture"; + if (code == V3OrderableDrugForm.AER) + return "AER"; + if (code == V3OrderableDrugForm.BAINHL) + return "BAINHL"; + if (code == V3OrderableDrugForm.INHLSOL) + return "INHLSOL"; + if (code == V3OrderableDrugForm.MDINHL) + return "MDINHL"; + if (code == V3OrderableDrugForm.NASSPRY) + return "NASSPRY"; + if (code == V3OrderableDrugForm.DERMSPRY) + return "DERMSPRY"; + if (code == V3OrderableDrugForm.FOAM) + return "FOAM"; + if (code == V3OrderableDrugForm.FOAMAPL) + return "FOAMAPL"; + if (code == V3OrderableDrugForm.RECFORM) + return "RECFORM"; + if (code == V3OrderableDrugForm.VAGFOAM) + return "VAGFOAM"; + if (code == V3OrderableDrugForm.VAGFOAMAPL) + return "VAGFOAMAPL"; + if (code == V3OrderableDrugForm.RECSPRY) + return "RECSPRY"; + if (code == V3OrderableDrugForm.VAGSPRY) + return "VAGSPRY"; + if (code == V3OrderableDrugForm._GASSOLIDSPRAY) + return "_GasSolidSpray"; + if (code == V3OrderableDrugForm.INHL) + return "INHL"; + if (code == V3OrderableDrugForm.BAINHLPWD) + return "BAINHLPWD"; + if (code == V3OrderableDrugForm.INHLPWD) + return "INHLPWD"; + if (code == V3OrderableDrugForm.MDINHLPWD) + return "MDINHLPWD"; + if (code == V3OrderableDrugForm.NASINHL) + return "NASINHL"; + if (code == V3OrderableDrugForm.ORINHL) + return "ORINHL"; + if (code == V3OrderableDrugForm.PWDSPRY) + return "PWDSPRY"; + if (code == V3OrderableDrugForm.SPRYADAPT) + return "SPRYADAPT"; + if (code == V3OrderableDrugForm._LIQUID) + return "_Liquid"; + if (code == V3OrderableDrugForm.LIQCLN) + return "LIQCLN"; + if (code == V3OrderableDrugForm.LIQSOAP) + return "LIQSOAP"; + if (code == V3OrderableDrugForm.SHMP) + return "SHMP"; + if (code == V3OrderableDrugForm.OIL) + return "OIL"; + if (code == V3OrderableDrugForm.TOPOIL) + return "TOPOIL"; + if (code == V3OrderableDrugForm.SOL) + return "SOL"; + if (code == V3OrderableDrugForm.IPSOL) + return "IPSOL"; + if (code == V3OrderableDrugForm.IRSOL) + return "IRSOL"; + if (code == V3OrderableDrugForm.DOUCHE) + return "DOUCHE"; + if (code == V3OrderableDrugForm.ENEMA) + return "ENEMA"; + if (code == V3OrderableDrugForm.OPIRSOL) + return "OPIRSOL"; + if (code == V3OrderableDrugForm.IVSOL) + return "IVSOL"; + if (code == V3OrderableDrugForm.ORALSOL) + return "ORALSOL"; + if (code == V3OrderableDrugForm.ELIXIR) + return "ELIXIR"; + if (code == V3OrderableDrugForm.RINSE) + return "RINSE"; + if (code == V3OrderableDrugForm.SYRUP) + return "SYRUP"; + if (code == V3OrderableDrugForm.RECSOL) + return "RECSOL"; + if (code == V3OrderableDrugForm.TOPSOL) + return "TOPSOL"; + if (code == V3OrderableDrugForm.LIN) + return "LIN"; + if (code == V3OrderableDrugForm.MUCTOPSOL) + return "MUCTOPSOL"; + if (code == V3OrderableDrugForm.TINC) + return "TINC"; + if (code == V3OrderableDrugForm._LIQUIDLIQUIDEMULSION) + return "_LiquidLiquidEmulsion"; + if (code == V3OrderableDrugForm.CRM) + return "CRM"; + if (code == V3OrderableDrugForm.NASCRM) + return "NASCRM"; + if (code == V3OrderableDrugForm.OPCRM) + return "OPCRM"; + if (code == V3OrderableDrugForm.ORCRM) + return "ORCRM"; + if (code == V3OrderableDrugForm.OTCRM) + return "OTCRM"; + if (code == V3OrderableDrugForm.RECCRM) + return "RECCRM"; + if (code == V3OrderableDrugForm.TOPCRM) + return "TOPCRM"; + if (code == V3OrderableDrugForm.VAGCRM) + return "VAGCRM"; + if (code == V3OrderableDrugForm.VAGCRMAPL) + return "VAGCRMAPL"; + if (code == V3OrderableDrugForm.LTN) + return "LTN"; + if (code == V3OrderableDrugForm.TOPLTN) + return "TOPLTN"; + if (code == V3OrderableDrugForm.OINT) + return "OINT"; + if (code == V3OrderableDrugForm.NASOINT) + return "NASOINT"; + if (code == V3OrderableDrugForm.OINTAPL) + return "OINTAPL"; + if (code == V3OrderableDrugForm.OPOINT) + return "OPOINT"; + if (code == V3OrderableDrugForm.OTOINT) + return "OTOINT"; + if (code == V3OrderableDrugForm.RECOINT) + return "RECOINT"; + if (code == V3OrderableDrugForm.TOPOINT) + return "TOPOINT"; + if (code == V3OrderableDrugForm.VAGOINT) + return "VAGOINT"; + if (code == V3OrderableDrugForm.VAGOINTAPL) + return "VAGOINTAPL"; + if (code == V3OrderableDrugForm._LIQUIDSOLIDSUSPENSION) + return "_LiquidSolidSuspension"; + if (code == V3OrderableDrugForm.GEL) + return "GEL"; + if (code == V3OrderableDrugForm.GELAPL) + return "GELAPL"; + if (code == V3OrderableDrugForm.NASGEL) + return "NASGEL"; + if (code == V3OrderableDrugForm.OPGEL) + return "OPGEL"; + if (code == V3OrderableDrugForm.OTGEL) + return "OTGEL"; + if (code == V3OrderableDrugForm.TOPGEL) + return "TOPGEL"; + if (code == V3OrderableDrugForm.URETHGEL) + return "URETHGEL"; + if (code == V3OrderableDrugForm.VAGGEL) + return "VAGGEL"; + if (code == V3OrderableDrugForm.VGELAPL) + return "VGELAPL"; + if (code == V3OrderableDrugForm.PASTE) + return "PASTE"; + if (code == V3OrderableDrugForm.PUD) + return "PUD"; + if (code == V3OrderableDrugForm.TPASTE) + return "TPASTE"; + if (code == V3OrderableDrugForm.SUSP) + return "SUSP"; + if (code == V3OrderableDrugForm.ITSUSP) + return "ITSUSP"; + if (code == V3OrderableDrugForm.OPSUSP) + return "OPSUSP"; + if (code == V3OrderableDrugForm.ORSUSP) + return "ORSUSP"; + if (code == V3OrderableDrugForm.ERSUSP) + return "ERSUSP"; + if (code == V3OrderableDrugForm.ERSUSP12) + return "ERSUSP12"; + if (code == V3OrderableDrugForm.ERSUSP24) + return "ERSUSP24"; + if (code == V3OrderableDrugForm.OTSUSP) + return "OTSUSP"; + if (code == V3OrderableDrugForm.RECSUSP) + return "RECSUSP"; + if (code == V3OrderableDrugForm._SOLIDDRUGFORM) + return "_SolidDrugForm"; + if (code == V3OrderableDrugForm.BAR) + return "BAR"; + if (code == V3OrderableDrugForm.BARSOAP) + return "BARSOAP"; + if (code == V3OrderableDrugForm.MEDBAR) + return "MEDBAR"; + if (code == V3OrderableDrugForm.CHEWBAR) + return "CHEWBAR"; + if (code == V3OrderableDrugForm.BEAD) + return "BEAD"; + if (code == V3OrderableDrugForm.CAKE) + return "CAKE"; + if (code == V3OrderableDrugForm.CEMENT) + return "CEMENT"; + if (code == V3OrderableDrugForm.CRYS) + return "CRYS"; + if (code == V3OrderableDrugForm.DISK) + return "DISK"; + if (code == V3OrderableDrugForm.FLAKE) + return "FLAKE"; + if (code == V3OrderableDrugForm.GRAN) + return "GRAN"; + if (code == V3OrderableDrugForm.GUM) + return "GUM"; + if (code == V3OrderableDrugForm.PAD) + return "PAD"; + if (code == V3OrderableDrugForm.MEDPAD) + return "MEDPAD"; + if (code == V3OrderableDrugForm.PATCH) + return "PATCH"; + if (code == V3OrderableDrugForm.TPATCH) + return "TPATCH"; + if (code == V3OrderableDrugForm.TPATH16) + return "TPATH16"; + if (code == V3OrderableDrugForm.TPATH24) + return "TPATH24"; + if (code == V3OrderableDrugForm.TPATH2WK) + return "TPATH2WK"; + if (code == V3OrderableDrugForm.TPATH72) + return "TPATH72"; + if (code == V3OrderableDrugForm.TPATHWK) + return "TPATHWK"; + if (code == V3OrderableDrugForm.PELLET) + return "PELLET"; + if (code == V3OrderableDrugForm.PILL) + return "PILL"; + if (code == V3OrderableDrugForm.CAP) + return "CAP"; + if (code == V3OrderableDrugForm.ORCAP) + return "ORCAP"; + if (code == V3OrderableDrugForm.ENTCAP) + return "ENTCAP"; + if (code == V3OrderableDrugForm.ERENTCAP) + return "ERENTCAP"; + if (code == V3OrderableDrugForm.ERCAP) + return "ERCAP"; + if (code == V3OrderableDrugForm.ERCAP12) + return "ERCAP12"; + if (code == V3OrderableDrugForm.ERCAP24) + return "ERCAP24"; + if (code == V3OrderableDrugForm.ERECCAP) + return "ERECCAP"; + if (code == V3OrderableDrugForm.TAB) + return "TAB"; + if (code == V3OrderableDrugForm.ORTAB) + return "ORTAB"; + if (code == V3OrderableDrugForm.BUCTAB) + return "BUCTAB"; + if (code == V3OrderableDrugForm.SRBUCTAB) + return "SRBUCTAB"; + if (code == V3OrderableDrugForm.CAPLET) + return "CAPLET"; + if (code == V3OrderableDrugForm.CHEWTAB) + return "CHEWTAB"; + if (code == V3OrderableDrugForm.CPTAB) + return "CPTAB"; + if (code == V3OrderableDrugForm.DISINTAB) + return "DISINTAB"; + if (code == V3OrderableDrugForm.DRTAB) + return "DRTAB"; + if (code == V3OrderableDrugForm.ECTAB) + return "ECTAB"; + if (code == V3OrderableDrugForm.ERECTAB) + return "ERECTAB"; + if (code == V3OrderableDrugForm.ERTAB) + return "ERTAB"; + if (code == V3OrderableDrugForm.ERTAB12) + return "ERTAB12"; + if (code == V3OrderableDrugForm.ERTAB24) + return "ERTAB24"; + if (code == V3OrderableDrugForm.ORTROCHE) + return "ORTROCHE"; + if (code == V3OrderableDrugForm.SLTAB) + return "SLTAB"; + if (code == V3OrderableDrugForm.VAGTAB) + return "VAGTAB"; + if (code == V3OrderableDrugForm.POWD) + return "POWD"; + if (code == V3OrderableDrugForm.TOPPWD) + return "TOPPWD"; + if (code == V3OrderableDrugForm.RECPWD) + return "RECPWD"; + if (code == V3OrderableDrugForm.VAGPWD) + return "VAGPWD"; + if (code == V3OrderableDrugForm.SUPP) + return "SUPP"; + if (code == V3OrderableDrugForm.RECSUPP) + return "RECSUPP"; + if (code == V3OrderableDrugForm.URETHSUPP) + return "URETHSUPP"; + if (code == V3OrderableDrugForm.VAGSUPP) + return "VAGSUPP"; + if (code == V3OrderableDrugForm.SWAB) + return "SWAB"; + if (code == V3OrderableDrugForm.MEDSWAB) + return "MEDSWAB"; + if (code == V3OrderableDrugForm.WAFER) + return "WAFER"; + return "?"; + } + + public String toSystem(V3OrderableDrugForm code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationFunction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationFunction.java new file mode 100644 index 00000000000..6fc7c96fa8c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationFunction.java @@ -0,0 +1,520 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationFunction { + + /** + * This code is used to specify the exact function an actor is authorized to have in a service in all necessary detail. + */ + _AUTHORIZEDPARTICIPATIONFUNCTION, + /** + * This code is used to specify the exact function an actor is authorized to have as a receiver of information that is the subject of a consent directive or consent override. + */ + _AUTHORIZEDRECEIVERPARTICIPATIONFUNCTION, + /** + * Description:Caregiver authorized to receive patient health information. + */ + AUCG, + /** + * Description:Provider with legitimate relationship authorized to receive patient health information. + */ + AULR, + /** + * Description:Member of care team authorized to receive patient health information. + */ + AUTM, + /** + * Description:Entities within specified work area authorized to receive patient health information. + */ + AUWA, + /** + * This code is used to specify the exact function an actor is authorized to have in authoring a consent directive. + */ + _CONSENTERPARTICIPATIONFUNCTION, + /** + * Description:Legal guardian of the subject of consent authorized to author a consent directive for the subject of consent. + */ + GRDCON, + /** + * Description:Person authorized with healthcare power of attorney to author a consent directive for the subject of consent. + */ + POACON, + /** + * Description:Personal representative of the subject of consent authorized to author a consent directive for the subject of consent. + */ + PRCON, + /** + * Definition:Provider authorized to mask information to protect the patient, a third party, or to ensure that the provider has consulted with the patient prior to release of this information. + */ + PROMSK, + /** + * Description:Subject of consent authorized to author a consent directive. + */ + SUBCON, + /** + * This code is used to specify the exact function an actor is authorized to have in authoring a consent override. + */ + _OVERRIDERPARTICIPATIONFUNCTION, + /** + * Description:Entity authorized to override a consent directive. + */ + AUCOV, + /** + * Description:Entity authorized to override a consent directive or privacy policy in an emergency. + */ + AUEMROV, + /** + * Definition: Set of codes indicating the manner in which sponsors, underwriters, and payers participate in a policy or program. + */ + _COVERAGEPARTICIPATIONFUNCTION, + /** + * Definition: Set of codes indicating the manner in which payors participate in a policy or program. { + + public V3ParticipationFunction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AuthorizedParticipationFunction".equals(codeString)) + return V3ParticipationFunction._AUTHORIZEDPARTICIPATIONFUNCTION; + if ("_AuthorizedReceiverParticipationFunction".equals(codeString)) + return V3ParticipationFunction._AUTHORIZEDRECEIVERPARTICIPATIONFUNCTION; + if ("AUCG".equals(codeString)) + return V3ParticipationFunction.AUCG; + if ("AULR".equals(codeString)) + return V3ParticipationFunction.AULR; + if ("AUTM".equals(codeString)) + return V3ParticipationFunction.AUTM; + if ("AUWA".equals(codeString)) + return V3ParticipationFunction.AUWA; + if ("_ConsenterParticipationFunction".equals(codeString)) + return V3ParticipationFunction._CONSENTERPARTICIPATIONFUNCTION; + if ("GRDCON".equals(codeString)) + return V3ParticipationFunction.GRDCON; + if ("POACON".equals(codeString)) + return V3ParticipationFunction.POACON; + if ("PRCON".equals(codeString)) + return V3ParticipationFunction.PRCON; + if ("PROMSK".equals(codeString)) + return V3ParticipationFunction.PROMSK; + if ("SUBCON".equals(codeString)) + return V3ParticipationFunction.SUBCON; + if ("_OverriderParticipationFunction".equals(codeString)) + return V3ParticipationFunction._OVERRIDERPARTICIPATIONFUNCTION; + if ("AUCOV".equals(codeString)) + return V3ParticipationFunction.AUCOV; + if ("AUEMROV".equals(codeString)) + return V3ParticipationFunction.AUEMROV; + if ("_CoverageParticipationFunction".equals(codeString)) + return V3ParticipationFunction._COVERAGEPARTICIPATIONFUNCTION; + if ("_PayorParticipationFunction".equals(codeString)) + return V3ParticipationFunction._PAYORPARTICIPATIONFUNCTION; + if ("CLMADJ".equals(codeString)) + return V3ParticipationFunction.CLMADJ; + if ("ENROLL".equals(codeString)) + return V3ParticipationFunction.ENROLL; + if ("FFSMGT".equals(codeString)) + return V3ParticipationFunction.FFSMGT; + if ("MCMGT".equals(codeString)) + return V3ParticipationFunction.MCMGT; + if ("PROVMGT".equals(codeString)) + return V3ParticipationFunction.PROVMGT; + if ("UMGT".equals(codeString)) + return V3ParticipationFunction.UMGT; + if ("_SponsorParticipationFunction".equals(codeString)) + return V3ParticipationFunction._SPONSORPARTICIPATIONFUNCTION; + if ("FULINRD".equals(codeString)) + return V3ParticipationFunction.FULINRD; + if ("SELFINRD".equals(codeString)) + return V3ParticipationFunction.SELFINRD; + if ("_UnderwriterParticipationFunction".equals(codeString)) + return V3ParticipationFunction._UNDERWRITERPARTICIPATIONFUNCTION; + if ("PAYORCNTR".equals(codeString)) + return V3ParticipationFunction.PAYORCNTR; + if ("REINS".equals(codeString)) + return V3ParticipationFunction.REINS; + if ("RETROCES".equals(codeString)) + return V3ParticipationFunction.RETROCES; + if ("SUBCTRT".equals(codeString)) + return V3ParticipationFunction.SUBCTRT; + if ("UNDERWRTNG".equals(codeString)) + return V3ParticipationFunction.UNDERWRTNG; + if ("ADMPHYS".equals(codeString)) + return V3ParticipationFunction.ADMPHYS; + if ("ANEST".equals(codeString)) + return V3ParticipationFunction.ANEST; + if ("ANRS".equals(codeString)) + return V3ParticipationFunction.ANRS; + if ("ASSEMBLER".equals(codeString)) + return V3ParticipationFunction.ASSEMBLER; + if ("ATTPHYS".equals(codeString)) + return V3ParticipationFunction.ATTPHYS; + if ("COMPOSER".equals(codeString)) + return V3ParticipationFunction.COMPOSER; + if ("DISPHYS".equals(codeString)) + return V3ParticipationFunction.DISPHYS; + if ("FASST".equals(codeString)) + return V3ParticipationFunction.FASST; + if ("MDWF".equals(codeString)) + return V3ParticipationFunction.MDWF; + if ("NASST".equals(codeString)) + return V3ParticipationFunction.NASST; + if ("PCP".equals(codeString)) + return V3ParticipationFunction.PCP; + if ("PRISURG".equals(codeString)) + return V3ParticipationFunction.PRISURG; + if ("REVIEWER".equals(codeString)) + return V3ParticipationFunction.REVIEWER; + if ("RNDPHYS".equals(codeString)) + return V3ParticipationFunction.RNDPHYS; + if ("SASST".equals(codeString)) + return V3ParticipationFunction.SASST; + if ("SNRS".equals(codeString)) + return V3ParticipationFunction.SNRS; + if ("TASST".equals(codeString)) + return V3ParticipationFunction.TASST; + throw new IllegalArgumentException("Unknown V3ParticipationFunction code '"+codeString+"'"); + } + + public String toCode(V3ParticipationFunction code) { + if (code == V3ParticipationFunction._AUTHORIZEDPARTICIPATIONFUNCTION) + return "_AuthorizedParticipationFunction"; + if (code == V3ParticipationFunction._AUTHORIZEDRECEIVERPARTICIPATIONFUNCTION) + return "_AuthorizedReceiverParticipationFunction"; + if (code == V3ParticipationFunction.AUCG) + return "AUCG"; + if (code == V3ParticipationFunction.AULR) + return "AULR"; + if (code == V3ParticipationFunction.AUTM) + return "AUTM"; + if (code == V3ParticipationFunction.AUWA) + return "AUWA"; + if (code == V3ParticipationFunction._CONSENTERPARTICIPATIONFUNCTION) + return "_ConsenterParticipationFunction"; + if (code == V3ParticipationFunction.GRDCON) + return "GRDCON"; + if (code == V3ParticipationFunction.POACON) + return "POACON"; + if (code == V3ParticipationFunction.PRCON) + return "PRCON"; + if (code == V3ParticipationFunction.PROMSK) + return "PROMSK"; + if (code == V3ParticipationFunction.SUBCON) + return "SUBCON"; + if (code == V3ParticipationFunction._OVERRIDERPARTICIPATIONFUNCTION) + return "_OverriderParticipationFunction"; + if (code == V3ParticipationFunction.AUCOV) + return "AUCOV"; + if (code == V3ParticipationFunction.AUEMROV) + return "AUEMROV"; + if (code == V3ParticipationFunction._COVERAGEPARTICIPATIONFUNCTION) + return "_CoverageParticipationFunction"; + if (code == V3ParticipationFunction._PAYORPARTICIPATIONFUNCTION) + return "_PayorParticipationFunction"; + if (code == V3ParticipationFunction.CLMADJ) + return "CLMADJ"; + if (code == V3ParticipationFunction.ENROLL) + return "ENROLL"; + if (code == V3ParticipationFunction.FFSMGT) + return "FFSMGT"; + if (code == V3ParticipationFunction.MCMGT) + return "MCMGT"; + if (code == V3ParticipationFunction.PROVMGT) + return "PROVMGT"; + if (code == V3ParticipationFunction.UMGT) + return "UMGT"; + if (code == V3ParticipationFunction._SPONSORPARTICIPATIONFUNCTION) + return "_SponsorParticipationFunction"; + if (code == V3ParticipationFunction.FULINRD) + return "FULINRD"; + if (code == V3ParticipationFunction.SELFINRD) + return "SELFINRD"; + if (code == V3ParticipationFunction._UNDERWRITERPARTICIPATIONFUNCTION) + return "_UnderwriterParticipationFunction"; + if (code == V3ParticipationFunction.PAYORCNTR) + return "PAYORCNTR"; + if (code == V3ParticipationFunction.REINS) + return "REINS"; + if (code == V3ParticipationFunction.RETROCES) + return "RETROCES"; + if (code == V3ParticipationFunction.SUBCTRT) + return "SUBCTRT"; + if (code == V3ParticipationFunction.UNDERWRTNG) + return "UNDERWRTNG"; + if (code == V3ParticipationFunction.ADMPHYS) + return "ADMPHYS"; + if (code == V3ParticipationFunction.ANEST) + return "ANEST"; + if (code == V3ParticipationFunction.ANRS) + return "ANRS"; + if (code == V3ParticipationFunction.ASSEMBLER) + return "ASSEMBLER"; + if (code == V3ParticipationFunction.ATTPHYS) + return "ATTPHYS"; + if (code == V3ParticipationFunction.COMPOSER) + return "COMPOSER"; + if (code == V3ParticipationFunction.DISPHYS) + return "DISPHYS"; + if (code == V3ParticipationFunction.FASST) + return "FASST"; + if (code == V3ParticipationFunction.MDWF) + return "MDWF"; + if (code == V3ParticipationFunction.NASST) + return "NASST"; + if (code == V3ParticipationFunction.PCP) + return "PCP"; + if (code == V3ParticipationFunction.PRISURG) + return "PRISURG"; + if (code == V3ParticipationFunction.REVIEWER) + return "REVIEWER"; + if (code == V3ParticipationFunction.RNDPHYS) + return "RNDPHYS"; + if (code == V3ParticipationFunction.SASST) + return "SASST"; + if (code == V3ParticipationFunction.SNRS) + return "SNRS"; + if (code == V3ParticipationFunction.TASST) + return "TASST"; + return "?"; + } + + public String toSystem(V3ParticipationFunction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationMode.java new file mode 100644 index 00000000000..9a73e61bd59 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationMode.java @@ -0,0 +1,204 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationMode { + + /** + * Participation by non-human-languaged based electronic signal + */ + ELECTRONIC, + /** + * Participation by direct action where subject and actor are in the same location. (The participation involves more than communication.) + */ + PHYSICAL, + /** + * Participation by direct action where subject and actor are in separate locations, and the actions of the actor are transmitted by electronic or mechanical means. (The participation involves more than communication.) + */ + REMOTE, + /** + * Participation by voice communication + */ + VERBAL, + /** + * Participation by pre-recorded voice. Communication is limited to one direction (from the recorder to recipient). + */ + DICTATE, + /** + * Participation by voice communication where parties speak to each other directly. + */ + FACE, + /** + * Participation by voice communication where the voices of the communicating parties are transported over an electronic medium + */ + PHONE, + /** + * Participation by voice and visual communication where the voices and images of the communicating parties are transported over an electronic medium + */ + VIDEOCONF, + /** + * Participation by human language recorded on a physical material + */ + WRITTEN, + /** + * Participation by text or diagrams printed on paper that have been transmitted over a fax device + */ + FAXWRIT, + /** + * Participation by text or diagrams printed on paper or other recording medium + */ + HANDWRIT, + /** + * Participation by text or diagrams printed on paper transmitted physically (e.g. by courier service, postal service). + */ + MAILWRIT, + /** + * Participation by text or diagrams submitted by computer network, e.g. online survey. + */ + ONLINEWRIT, + /** + * Participation by text or diagrams transmitted over an electronic mail system. + */ + EMAILWRIT, + /** + * Participation by text or diagrams printed on paper or other recording medium where the recording was performed using a typewriter, typesetter, computer or similar mechanism. + */ + TYPEWRIT, + /** + * added to help the parsers + */ + NULL; + public static V3ParticipationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ELECTRONIC".equals(codeString)) + return ELECTRONIC; + if ("PHYSICAL".equals(codeString)) + return PHYSICAL; + if ("REMOTE".equals(codeString)) + return REMOTE; + if ("VERBAL".equals(codeString)) + return VERBAL; + if ("DICTATE".equals(codeString)) + return DICTATE; + if ("FACE".equals(codeString)) + return FACE; + if ("PHONE".equals(codeString)) + return PHONE; + if ("VIDEOCONF".equals(codeString)) + return VIDEOCONF; + if ("WRITTEN".equals(codeString)) + return WRITTEN; + if ("FAXWRIT".equals(codeString)) + return FAXWRIT; + if ("HANDWRIT".equals(codeString)) + return HANDWRIT; + if ("MAILWRIT".equals(codeString)) + return MAILWRIT; + if ("ONLINEWRIT".equals(codeString)) + return ONLINEWRIT; + if ("EMAILWRIT".equals(codeString)) + return EMAILWRIT; + if ("TYPEWRIT".equals(codeString)) + return TYPEWRIT; + throw new FHIRException("Unknown V3ParticipationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ELECTRONIC: return "ELECTRONIC"; + case PHYSICAL: return "PHYSICAL"; + case REMOTE: return "REMOTE"; + case VERBAL: return "VERBAL"; + case DICTATE: return "DICTATE"; + case FACE: return "FACE"; + case PHONE: return "PHONE"; + case VIDEOCONF: return "VIDEOCONF"; + case WRITTEN: return "WRITTEN"; + case FAXWRIT: return "FAXWRIT"; + case HANDWRIT: return "HANDWRIT"; + case MAILWRIT: return "MAILWRIT"; + case ONLINEWRIT: return "ONLINEWRIT"; + case EMAILWRIT: return "EMAILWRIT"; + case TYPEWRIT: return "TYPEWRIT"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ParticipationMode"; + } + public String getDefinition() { + switch (this) { + case ELECTRONIC: return "Participation by non-human-languaged based electronic signal"; + case PHYSICAL: return "Participation by direct action where subject and actor are in the same location. (The participation involves more than communication.)"; + case REMOTE: return "Participation by direct action where subject and actor are in separate locations, and the actions of the actor are transmitted by electronic or mechanical means. (The participation involves more than communication.)"; + case VERBAL: return "Participation by voice communication"; + case DICTATE: return "Participation by pre-recorded voice. Communication is limited to one direction (from the recorder to recipient)."; + case FACE: return "Participation by voice communication where parties speak to each other directly."; + case PHONE: return "Participation by voice communication where the voices of the communicating parties are transported over an electronic medium"; + case VIDEOCONF: return "Participation by voice and visual communication where the voices and images of the communicating parties are transported over an electronic medium"; + case WRITTEN: return "Participation by human language recorded on a physical material"; + case FAXWRIT: return "Participation by text or diagrams printed on paper that have been transmitted over a fax device"; + case HANDWRIT: return "Participation by text or diagrams printed on paper or other recording medium"; + case MAILWRIT: return "Participation by text or diagrams printed on paper transmitted physically (e.g. by courier service, postal service)."; + case ONLINEWRIT: return "Participation by text or diagrams submitted by computer network, e.g. online survey."; + case EMAILWRIT: return "Participation by text or diagrams transmitted over an electronic mail system."; + case TYPEWRIT: return "Participation by text or diagrams printed on paper or other recording medium where the recording was performed using a typewriter, typesetter, computer or similar mechanism."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ELECTRONIC: return "electronic data"; + case PHYSICAL: return "physical presence"; + case REMOTE: return "remote presence"; + case VERBAL: return "verbal"; + case DICTATE: return "dictated"; + case FACE: return "face-to-face"; + case PHONE: return "telephone"; + case VIDEOCONF: return "videoconferencing"; + case WRITTEN: return "written"; + case FAXWRIT: return "telefax"; + case HANDWRIT: return "handwritten"; + case MAILWRIT: return "mail"; + case ONLINEWRIT: return "online written"; + case EMAILWRIT: return "email"; + case TYPEWRIT: return "typewritten"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationModeEnumFactory.java new file mode 100644 index 00000000000..0f02ed3698f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationModeEnumFactory.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ParticipationModeEnumFactory implements EnumFactory { + + public V3ParticipationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ELECTRONIC".equals(codeString)) + return V3ParticipationMode.ELECTRONIC; + if ("PHYSICAL".equals(codeString)) + return V3ParticipationMode.PHYSICAL; + if ("REMOTE".equals(codeString)) + return V3ParticipationMode.REMOTE; + if ("VERBAL".equals(codeString)) + return V3ParticipationMode.VERBAL; + if ("DICTATE".equals(codeString)) + return V3ParticipationMode.DICTATE; + if ("FACE".equals(codeString)) + return V3ParticipationMode.FACE; + if ("PHONE".equals(codeString)) + return V3ParticipationMode.PHONE; + if ("VIDEOCONF".equals(codeString)) + return V3ParticipationMode.VIDEOCONF; + if ("WRITTEN".equals(codeString)) + return V3ParticipationMode.WRITTEN; + if ("FAXWRIT".equals(codeString)) + return V3ParticipationMode.FAXWRIT; + if ("HANDWRIT".equals(codeString)) + return V3ParticipationMode.HANDWRIT; + if ("MAILWRIT".equals(codeString)) + return V3ParticipationMode.MAILWRIT; + if ("ONLINEWRIT".equals(codeString)) + return V3ParticipationMode.ONLINEWRIT; + if ("EMAILWRIT".equals(codeString)) + return V3ParticipationMode.EMAILWRIT; + if ("TYPEWRIT".equals(codeString)) + return V3ParticipationMode.TYPEWRIT; + throw new IllegalArgumentException("Unknown V3ParticipationMode code '"+codeString+"'"); + } + + public String toCode(V3ParticipationMode code) { + if (code == V3ParticipationMode.ELECTRONIC) + return "ELECTRONIC"; + if (code == V3ParticipationMode.PHYSICAL) + return "PHYSICAL"; + if (code == V3ParticipationMode.REMOTE) + return "REMOTE"; + if (code == V3ParticipationMode.VERBAL) + return "VERBAL"; + if (code == V3ParticipationMode.DICTATE) + return "DICTATE"; + if (code == V3ParticipationMode.FACE) + return "FACE"; + if (code == V3ParticipationMode.PHONE) + return "PHONE"; + if (code == V3ParticipationMode.VIDEOCONF) + return "VIDEOCONF"; + if (code == V3ParticipationMode.WRITTEN) + return "WRITTEN"; + if (code == V3ParticipationMode.FAXWRIT) + return "FAXWRIT"; + if (code == V3ParticipationMode.HANDWRIT) + return "HANDWRIT"; + if (code == V3ParticipationMode.MAILWRIT) + return "MAILWRIT"; + if (code == V3ParticipationMode.ONLINEWRIT) + return "ONLINEWRIT"; + if (code == V3ParticipationMode.EMAILWRIT) + return "EMAILWRIT"; + if (code == V3ParticipationMode.TYPEWRIT) + return "TYPEWRIT"; + return "?"; + } + + public String toSystem(V3ParticipationMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationSignature.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationSignature.java new file mode 100644 index 00000000000..b37d6c0a458 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationSignature.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationSignature { + + /** + * The particpant intends to provide a signature. + */ + I, + /** + * Signature has been affixed, either written on file, or electronic (incl. digital) signature in Participation.signatureText. + */ + S, + /** + * A signature for the service is required of this actor. + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ParticipationSignature fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return I; + if ("S".equals(codeString)) + return S; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ParticipationSignature code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case I: return "I"; + case S: return "S"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ParticipationSignature"; + } + public String getDefinition() { + switch (this) { + case I: return "The particpant intends to provide a signature."; + case S: return "Signature has been affixed, either written on file, or electronic (incl. digital) signature in Participation.signatureText."; + case X: return "A signature for the service is required of this actor."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case I: return "intended"; + case S: return "signed"; + case X: return "required"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationSignatureEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationSignatureEnumFactory.java new file mode 100644 index 00000000000..986b6014def --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationSignatureEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ParticipationSignatureEnumFactory implements EnumFactory { + + public V3ParticipationSignature fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("I".equals(codeString)) + return V3ParticipationSignature.I; + if ("S".equals(codeString)) + return V3ParticipationSignature.S; + if ("X".equals(codeString)) + return V3ParticipationSignature.X; + throw new IllegalArgumentException("Unknown V3ParticipationSignature code '"+codeString+"'"); + } + + public String toCode(V3ParticipationSignature code) { + if (code == V3ParticipationSignature.I) + return "I"; + if (code == V3ParticipationSignature.S) + return "S"; + if (code == V3ParticipationSignature.X) + return "X"; + return "?"; + } + + public String toSystem(V3ParticipationSignature code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationType.java new file mode 100644 index 00000000000..6b986a73a5e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationType.java @@ -0,0 +1,668 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ParticipationType { + + /** + * Indicates that the target of the participation is involved in some manner in the act, but does not qualify how. + */ + PART, + /** + * Participations related, but not primary to an act. The Referring, Admitting, and Discharging practitioners must be the same person as those authoring the ControlAct event for their respective trigger events. + */ + _PARTICIPATIONANCILLARY, + /** + * The practitioner who is responsible for admitting a patient to a patient encounter. + */ + ADM, + /** + * The practitioner that has responsibility for overseeing a patient's care during a patient encounter. + */ + ATND, + /** + * A person or organization who should be contacted for follow-up questions about the act in place of the author. + */ + CALLBCK, + /** + * An advisor participating in the service by performing evaluations and making recommendations. + */ + CON, + /** + * The practitioner who is responsible for the discharge of a patient from a patient encounter. + */ + DIS, + /** + * Only with Transportation services. A person who escorts the patient. + */ + ESC, + /** + * A person having referred the subject of the service to the performer (referring physician). Typically, a referring physician will receive a report. + */ + REF, + /** + * Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g., consultant), information that the Act itself seeks to reveal (e.g., informant of clinical history), or information about what Act was performed (e.g., informant witness). + */ + _PARTICIPATIONINFORMATIONGENERATOR, + /** + * Definition: A party that originates the Act and therefore has responsibility for the information given in the Act and ownership of this Act. + + + Example: the report writer, the person writing the act definition, the guideline author, the placer of an order, the EKG cart (device) creating a report etc. Every Act should have an author. Authorship is regardless of mood always actual authorship. + + Examples of such policies might include: + + + + The author and anyone they explicitly delegate may update the report; + + + + All administrators within the same clinic may cancel and reschedule appointments created by other administrators within that clinic; + + + + A party that is neither an author nor a party who is extended authorship maintenance rights by policy, may only amend, reverse, override, replace, or follow up in other ways on this Act, whereby the Act remains intact and is linked to another Act authored by that other party. + */ + AUT, + /** + * A source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject. + */ + INF, + /** + * An entity entering the data into the originating system. The data entry entity is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text transcribed into electronic form. + */ + TRANS, + /** + * A person entering the data into the originating system. The data entry person is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text. + */ + ENT, + /** + * Only with service events. A person witnessing the action happening without doing anything. A witness is not necessarily aware, much less approves of anything stated in the service event. Example for a witness is students watching an operation or an advanced directive witness. + */ + WIT, + /** + * An entity (person, organization or device) that is in charge of maintaining the information of this act (e.g., who maintains the report or the master service catalog item, etc.). + */ + CST, + /** + * Target participant that is substantially present in the act and which is directly involved in the action (includes consumed material, devices, etc.). + */ + DIR, + /** + * The target of an Observation action. Links an observation to a Role whose player is the substance or most specific component entity (material, micro-organism, etc.) being measured within the subject. + + + Examples: A "plasma porcelain substance concentration" has analyte a Role with player substance Entity "porcelain". + + + UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured. E.g., for "plasma porcelain" the scoper could be "Plasma". + */ + ALY, + /** + * In an obstetric service, the baby. + */ + BBY, + /** + * The catalyst of a chemical reaction, such as an enzyme or a platinum surface. In biochemical reactions, connects the enzyme with the molecular interaction + */ + CAT, + /** + * Participant material that is taken up, diminished, altered, or disappears in the act. + */ + CSM, + /** + * Something incorporated in the subject of a therapy service to achieve a physiologic effect (e.g., heal, relieve, provoke a condition, etc.) on the subject. In an administration service the therapeutic agent is a consumable, in a preparation or dispense service, it is a product. Thus, consumable or product must be specified in accordance with the kind of service. + */ + TPA, + /** + * Participant used in performing the act without being substantially affected by the act (i.e. durable or inert with respect to that particular service). + + + Examples: monitoring equipment, tools, but also access/drainage lines, prostheses, pace maker, etc. + */ + DEV, + /** + * A device that changes ownership due to the service, e.g., a pacemaker, a prosthesis, an insulin injection equipment (pen), etc. Such material may need to be restocked after he service. + */ + NRD, + /** + * A device that does not change ownership due to the service, i.e., a surgical instrument or tool or an endoscope. The distinction between reuseable and non-reuseable must be made in order to know whether material must be re-stocked. + */ + RDV, + /** + * In some organ transplantation services and rarely in transfusion services a donor will be a target participant in the service. However, in most cases transplantation is decomposed in three services: explantation, transport, and implantation. The identity of the donor (recipient) is often irrelevant for the explantation (implantation) service. + */ + DON, + /** + * Description: The entity playing the associated role is the physical (including energy), chemical or biological substance that is participating in the exposure. For example in communicable diseases, the associated playing entity is the disease causing pathogen. + */ + EXPAGNT, + /** + * Description:Direct participation in an exposure act where it is unknown that the participant is the source or subject of the exposure. If the participant is known to be the contact of an exposure then the SBJ participation type should be used. If the participant is known to be the source then the EXSRC participation type should be used. + */ + EXPART, + /** + * Description: The entity playing the associated role is the target (contact) of exposure. + */ + EXPTRGT, + /** + * Description:The entity playing the associated role is the source of exposure. + */ + EXSRC, + /** + * Participant material that is brought forth (produced) in the act (e.g., specimen in a specimen collection, access or drainage in a placement service, medication package in a dispense service). It does not matter whether the material produced had existence prior to the service, or whether it is created in the service (e.g., in supply services the product is taken from a stock). + */ + PRD, + /** + * The principle target on which the action happens. + + + Examples: The patient in physical examination, a specimen in a lab observation. May also be a patient's family member (teaching) or a device or room (cleaning, disinfecting, housekeeping). + + + UsageNotes: Not all direct targets are subjects. Consumables and devices used as tools for an act are not subjects. However, a device may be a subject of a maintenance action. + */ + SBJ, + /** + * The subject of non-clinical (e.g. laboratory) observation services is a specimen. + */ + SPC, + /** + * Target that is not substantially present in the act and which is not directly affected by the act, but which will be a focus of the record or documentation of the act. + */ + IND, + /** + * Target on behalf of whom the service happens, but that is not necessarily present in the service. Can occur together with direct target to indicate that a target is both, as in the case where the patient is the indirect beneficiary of a service rendered to a family member, e.g. counseling or given home care instructions. This concept includes a participant, such as a covered party, who derives benefits from a service act covered by a coverage act. + + Note that the semantic role of the intended recipient who benefits from the happening denoted by the verb in the clause. Thus, a patient who has no coverage under a policy or program may be a beneficiary of a health service while not being the beneficiary of coverage for that service. + */ + BEN, + /** + * Definition: A factor, such as a microorganism, chemical substance, or form of radiation, whose presence, excessive presence, or (in deficiency diseases) relative absence is essential, in whole or in part, for the occurrence of a condition. + + Constraint: The use of this participation is limited to observations. + */ + CAGNT, + /** + * The target participation for an individual in a health care coverage act in which the target role is either the policy holder of the coverage, or a covered party under the coverage. + */ + COV, + /** + * The target person or organization contractually recognized by the issuer as a participant who has assumed fiscal responsibility for another personaTMs financial obligations by guaranteeing to pay for amounts owed to a particular account + + + Example:The subscriber of the patientaTMs health insurance policy signs a contract with the provider to be fiscally responsible for the patient billing account balance amount owed. + */ + GUAR, + /** + * Participant who posses an instrument such as a financial contract (insurance policy) usually based on some agreement with the author. + */ + HLD, + /** + * The record target indicates whose medical record holds the documentation of this act. This is especially important when the subject of a service is not the patient himself. + */ + RCT, + /** + * The person (or organization) who receives the product of an Act. + */ + RCV, + /** + * A party, who may or should receive or who has recieved the Act or subsequent or derivative information of that Act. Information recipient is inert, i.e., independent of mood." Rationale: this is a generalization of a too diverse family that the definition can't be any more specific, and the concept is abstract so one of the specializations should be used. + */ + IRCP, + /** + * An information recipient to notify for urgent matters about this Act. (e.g., in a laboratory order, critical results are being called by phone right away, this is the contact to call; or for an inpatient encounter, a next of kin to notify when the patient becomes critically ill). + */ + NOT, + /** + * Information recipient to whom an act statement is primarily directed. E.g., a primary care provider receiving a discharge letter from a hospitalist, a health department receiving information on a suspected case of infectious disease. Multiple of these participations may exist on the same act without requiring that recipients be ranked as primary vs. secondary. + */ + PRCP, + /** + * A participant (e.g. provider) who has referred the subject of an act (e.g. patient). + + Typically, a referred by participant will provide a report (e.g. referral). + */ + REFB, + /** + * The person who receives the patient + */ + REFT, + /** + * A secondary information recipient, who receives copies (e.g., a primary care provider receiving copies of results as ordered by specialist). + */ + TRC, + /** + * The facility where the service is done. May be a static building (or room therein) or a moving location (e.g., ambulance, helicopter, aircraft, train, truck, ship, etc.) + */ + LOC, + /** + * The destination for services. May be a static building (or room therein) or a movable facility (e.g., ship). + */ + DST, + /** + * A location where data about an Act was entered. + */ + ELOC, + /** + * The location of origin for services. May be a static building (or room therein) or a movable facility (e.g., ship). + */ + ORG, + /** + * Some services take place at multiple concurrent locations (e.g., telemedicine, telephone consultation). The location where the principal performing actor is located is taken as the primary location (LOC) while the other location(s) are considered "remote." + */ + RML, + /** + * For services, an intermediate location that specifies a path between origin an destination. + */ + VIA, + /** + * Definition: A person, non-person living subject, organization or device that who actually and principally carries out the action. Device should only be assigned as a performer in circumstances where the device is performing independent of human intervention. Need not be the principal responsible actor. + + + Exampe: A surgery resident operating under supervision of attending surgeon, a search and rescue dog locating survivors, an electronic laboratory analyzer or the laboratory discipline requested to perform a laboratory test. The performer may also be the patient in self-care, e.g. fingerstick blood sugar. The traditional order filler is a performer. This information should accompany every service event. + + + Note: that existing HL7 designs assign an organization as the playing entity of the Role that is the performer. These designs should be revised in subsequent releases to make this the scooping entity for the role involved. + */ + PRF, + /** + * Distributes material used in or generated during the act. + */ + DIST, + /** + * The principal or primary performer of the act. + */ + PPRF, + /** + * A person assisting in an act through his substantial presence and involvement This includes: assistants, technicians, associates, or whatever the job titles may be. + */ + SPRF, + /** + * The person or organization that has primary responsibility for the act. The responsible party is not necessarily present in an action, but is accountable for the action through the power to delegate, and the duty to review actions with the performing actor after the fact. This responsibility may be ethical, legal, contractual, fiscal, or fiduciary in nature. + + + Example: A person who is the head of a biochemical laboratory; a sponsor for a policy or government program. + */ + RESP, + /** + * A person who verifies the correctness and appropriateness of the service (plan, order, event, etc.) and hence takes on accountability. + */ + VRF, + /** + * A verifier who attests to the accuracy of an act, but who does not have privileges to legally authenticate the act. An example would be a resident physician who sees a patient and dictates a note, then later signs it. Their signature constitutes an authentication. + */ + AUTHEN, + /** + * A verifier who legally authenticates the accuracy of an act. An example would be a staff physician who sees a patient and dictates a note, then later signs it. Their signature constitutes a legal authentication. + */ + LA, + /** + * added to help the parsers + */ + NULL; + public static V3ParticipationType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PART".equals(codeString)) + return PART; + if ("_ParticipationAncillary".equals(codeString)) + return _PARTICIPATIONANCILLARY; + if ("ADM".equals(codeString)) + return ADM; + if ("ATND".equals(codeString)) + return ATND; + if ("CALLBCK".equals(codeString)) + return CALLBCK; + if ("CON".equals(codeString)) + return CON; + if ("DIS".equals(codeString)) + return DIS; + if ("ESC".equals(codeString)) + return ESC; + if ("REF".equals(codeString)) + return REF; + if ("_ParticipationInformationGenerator".equals(codeString)) + return _PARTICIPATIONINFORMATIONGENERATOR; + if ("AUT".equals(codeString)) + return AUT; + if ("INF".equals(codeString)) + return INF; + if ("TRANS".equals(codeString)) + return TRANS; + if ("ENT".equals(codeString)) + return ENT; + if ("WIT".equals(codeString)) + return WIT; + if ("CST".equals(codeString)) + return CST; + if ("DIR".equals(codeString)) + return DIR; + if ("ALY".equals(codeString)) + return ALY; + if ("BBY".equals(codeString)) + return BBY; + if ("CAT".equals(codeString)) + return CAT; + if ("CSM".equals(codeString)) + return CSM; + if ("TPA".equals(codeString)) + return TPA; + if ("DEV".equals(codeString)) + return DEV; + if ("NRD".equals(codeString)) + return NRD; + if ("RDV".equals(codeString)) + return RDV; + if ("DON".equals(codeString)) + return DON; + if ("EXPAGNT".equals(codeString)) + return EXPAGNT; + if ("EXPART".equals(codeString)) + return EXPART; + if ("EXPTRGT".equals(codeString)) + return EXPTRGT; + if ("EXSRC".equals(codeString)) + return EXSRC; + if ("PRD".equals(codeString)) + return PRD; + if ("SBJ".equals(codeString)) + return SBJ; + if ("SPC".equals(codeString)) + return SPC; + if ("IND".equals(codeString)) + return IND; + if ("BEN".equals(codeString)) + return BEN; + if ("CAGNT".equals(codeString)) + return CAGNT; + if ("COV".equals(codeString)) + return COV; + if ("GUAR".equals(codeString)) + return GUAR; + if ("HLD".equals(codeString)) + return HLD; + if ("RCT".equals(codeString)) + return RCT; + if ("RCV".equals(codeString)) + return RCV; + if ("IRCP".equals(codeString)) + return IRCP; + if ("NOT".equals(codeString)) + return NOT; + if ("PRCP".equals(codeString)) + return PRCP; + if ("REFB".equals(codeString)) + return REFB; + if ("REFT".equals(codeString)) + return REFT; + if ("TRC".equals(codeString)) + return TRC; + if ("LOC".equals(codeString)) + return LOC; + if ("DST".equals(codeString)) + return DST; + if ("ELOC".equals(codeString)) + return ELOC; + if ("ORG".equals(codeString)) + return ORG; + if ("RML".equals(codeString)) + return RML; + if ("VIA".equals(codeString)) + return VIA; + if ("PRF".equals(codeString)) + return PRF; + if ("DIST".equals(codeString)) + return DIST; + if ("PPRF".equals(codeString)) + return PPRF; + if ("SPRF".equals(codeString)) + return SPRF; + if ("RESP".equals(codeString)) + return RESP; + if ("VRF".equals(codeString)) + return VRF; + if ("AUTHEN".equals(codeString)) + return AUTHEN; + if ("LA".equals(codeString)) + return LA; + throw new FHIRException("Unknown V3ParticipationType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PART: return "PART"; + case _PARTICIPATIONANCILLARY: return "_ParticipationAncillary"; + case ADM: return "ADM"; + case ATND: return "ATND"; + case CALLBCK: return "CALLBCK"; + case CON: return "CON"; + case DIS: return "DIS"; + case ESC: return "ESC"; + case REF: return "REF"; + case _PARTICIPATIONINFORMATIONGENERATOR: return "_ParticipationInformationGenerator"; + case AUT: return "AUT"; + case INF: return "INF"; + case TRANS: return "TRANS"; + case ENT: return "ENT"; + case WIT: return "WIT"; + case CST: return "CST"; + case DIR: return "DIR"; + case ALY: return "ALY"; + case BBY: return "BBY"; + case CAT: return "CAT"; + case CSM: return "CSM"; + case TPA: return "TPA"; + case DEV: return "DEV"; + case NRD: return "NRD"; + case RDV: return "RDV"; + case DON: return "DON"; + case EXPAGNT: return "EXPAGNT"; + case EXPART: return "EXPART"; + case EXPTRGT: return "EXPTRGT"; + case EXSRC: return "EXSRC"; + case PRD: return "PRD"; + case SBJ: return "SBJ"; + case SPC: return "SPC"; + case IND: return "IND"; + case BEN: return "BEN"; + case CAGNT: return "CAGNT"; + case COV: return "COV"; + case GUAR: return "GUAR"; + case HLD: return "HLD"; + case RCT: return "RCT"; + case RCV: return "RCV"; + case IRCP: return "IRCP"; + case NOT: return "NOT"; + case PRCP: return "PRCP"; + case REFB: return "REFB"; + case REFT: return "REFT"; + case TRC: return "TRC"; + case LOC: return "LOC"; + case DST: return "DST"; + case ELOC: return "ELOC"; + case ORG: return "ORG"; + case RML: return "RML"; + case VIA: return "VIA"; + case PRF: return "PRF"; + case DIST: return "DIST"; + case PPRF: return "PPRF"; + case SPRF: return "SPRF"; + case RESP: return "RESP"; + case VRF: return "VRF"; + case AUTHEN: return "AUTHEN"; + case LA: return "LA"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ParticipationType"; + } + public String getDefinition() { + switch (this) { + case PART: return "Indicates that the target of the participation is involved in some manner in the act, but does not qualify how."; + case _PARTICIPATIONANCILLARY: return "Participations related, but not primary to an act. The Referring, Admitting, and Discharging practitioners must be the same person as those authoring the ControlAct event for their respective trigger events."; + case ADM: return "The practitioner who is responsible for admitting a patient to a patient encounter."; + case ATND: return "The practitioner that has responsibility for overseeing a patient's care during a patient encounter."; + case CALLBCK: return "A person or organization who should be contacted for follow-up questions about the act in place of the author."; + case CON: return "An advisor participating in the service by performing evaluations and making recommendations."; + case DIS: return "The practitioner who is responsible for the discharge of a patient from a patient encounter."; + case ESC: return "Only with Transportation services. A person who escorts the patient."; + case REF: return "A person having referred the subject of the service to the performer (referring physician). Typically, a referring physician will receive a report."; + case _PARTICIPATIONINFORMATIONGENERATOR: return "Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g., consultant), information that the Act itself seeks to reveal (e.g., informant of clinical history), or information about what Act was performed (e.g., informant witness)."; + case AUT: return "Definition: A party that originates the Act and therefore has responsibility for the information given in the Act and ownership of this Act.\r\n\n \n Example: the report writer, the person writing the act definition, the guideline author, the placer of an order, the EKG cart (device) creating a report etc. Every Act should have an author. Authorship is regardless of mood always actual authorship. \r\n\n Examples of such policies might include:\r\n\n \n \n The author and anyone they explicitly delegate may update the report;\r\n\n \n \n All administrators within the same clinic may cancel and reschedule appointments created by other administrators within that clinic;\r\n\n \n \n A party that is neither an author nor a party who is extended authorship maintenance rights by policy, may only amend, reverse, override, replace, or follow up in other ways on this Act, whereby the Act remains intact and is linked to another Act authored by that other party."; + case INF: return "A source of reported information (e.g., a next of kin who answers questions about the patient's history). For history questions, the patient is logically an informant, yet the informant of history questions is implicitly the subject."; + case TRANS: return "An entity entering the data into the originating system. The data entry entity is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text transcribed into electronic form."; + case ENT: return "A person entering the data into the originating system. The data entry person is collected optionally for internal quality control purposes. This includes the transcriptionist for dictated text."; + case WIT: return "Only with service events. A person witnessing the action happening without doing anything. A witness is not necessarily aware, much less approves of anything stated in the service event. Example for a witness is students watching an operation or an advanced directive witness."; + case CST: return "An entity (person, organization or device) that is in charge of maintaining the information of this act (e.g., who maintains the report or the master service catalog item, etc.)."; + case DIR: return "Target participant that is substantially present in the act and which is directly involved in the action (includes consumed material, devices, etc.)."; + case ALY: return "The target of an Observation action. Links an observation to a Role whose player is the substance or most specific component entity (material, micro-organism, etc.) being measured within the subject.\r\n\n \n Examples: A \"plasma porcelain substance concentration\" has analyte a Role with player substance Entity \"porcelain\".\r\n\n \n UsageNotes: The Role that this participation connects to may be any Role whose player is that substance measured. Very often, the scoper may indicate the system in which the component is being measured. E.g., for \"plasma porcelain\" the scoper could be \"Plasma\"."; + case BBY: return "In an obstetric service, the baby."; + case CAT: return "The catalyst of a chemical reaction, such as an enzyme or a platinum surface. In biochemical reactions, connects the enzyme with the molecular interaction"; + case CSM: return "Participant material that is taken up, diminished, altered, or disappears in the act."; + case TPA: return "Something incorporated in the subject of a therapy service to achieve a physiologic effect (e.g., heal, relieve, provoke a condition, etc.) on the subject. In an administration service the therapeutic agent is a consumable, in a preparation or dispense service, it is a product. Thus, consumable or product must be specified in accordance with the kind of service."; + case DEV: return "Participant used in performing the act without being substantially affected by the act (i.e. durable or inert with respect to that particular service).\r\n\n \n Examples: monitoring equipment, tools, but also access/drainage lines, prostheses, pace maker, etc."; + case NRD: return "A device that changes ownership due to the service, e.g., a pacemaker, a prosthesis, an insulin injection equipment (pen), etc. Such material may need to be restocked after he service."; + case RDV: return "A device that does not change ownership due to the service, i.e., a surgical instrument or tool or an endoscope. The distinction between reuseable and non-reuseable must be made in order to know whether material must be re-stocked."; + case DON: return "In some organ transplantation services and rarely in transfusion services a donor will be a target participant in the service. However, in most cases transplantation is decomposed in three services: explantation, transport, and implantation. The identity of the donor (recipient) is often irrelevant for the explantation (implantation) service."; + case EXPAGNT: return "Description: The entity playing the associated role is the physical (including energy), chemical or biological substance that is participating in the exposure. For example in communicable diseases, the associated playing entity is the disease causing pathogen."; + case EXPART: return "Description:Direct participation in an exposure act where it is unknown that the participant is the source or subject of the exposure. If the participant is known to be the contact of an exposure then the SBJ participation type should be used. If the participant is known to be the source then the EXSRC participation type should be used."; + case EXPTRGT: return "Description: The entity playing the associated role is the target (contact) of exposure."; + case EXSRC: return "Description:The entity playing the associated role is the source of exposure."; + case PRD: return "Participant material that is brought forth (produced) in the act (e.g., specimen in a specimen collection, access or drainage in a placement service, medication package in a dispense service). It does not matter whether the material produced had existence prior to the service, or whether it is created in the service (e.g., in supply services the product is taken from a stock)."; + case SBJ: return "The principle target on which the action happens.\r\n\n \n Examples: The patient in physical examination, a specimen in a lab observation. May also be a patient's family member (teaching) or a device or room (cleaning, disinfecting, housekeeping). \r\n\n \n UsageNotes: Not all direct targets are subjects. Consumables and devices used as tools for an act are not subjects. However, a device may be a subject of a maintenance action."; + case SPC: return "The subject of non-clinical (e.g. laboratory) observation services is a specimen."; + case IND: return "Target that is not substantially present in the act and which is not directly affected by the act, but which will be a focus of the record or documentation of the act."; + case BEN: return "Target on behalf of whom the service happens, but that is not necessarily present in the service. Can occur together with direct target to indicate that a target is both, as in the case where the patient is the indirect beneficiary of a service rendered to a family member, e.g. counseling or given home care instructions. This concept includes a participant, such as a covered party, who derives benefits from a service act covered by a coverage act.\r\n\n Note that the semantic role of the intended recipient who benefits from the happening denoted by the verb in the clause. Thus, a patient who has no coverage under a policy or program may be a beneficiary of a health service while not being the beneficiary of coverage for that service."; + case CAGNT: return "Definition: A factor, such as a microorganism, chemical substance, or form of radiation, whose presence, excessive presence, or (in deficiency diseases) relative absence is essential, in whole or in part, for the occurrence of a condition.\r\n\n Constraint: The use of this participation is limited to observations."; + case COV: return "The target participation for an individual in a health care coverage act in which the target role is either the policy holder of the coverage, or a covered party under the coverage."; + case GUAR: return "The target person or organization contractually recognized by the issuer as a participant who has assumed fiscal responsibility for another personaTMs financial obligations by guaranteeing to pay for amounts owed to a particular account\r\n\n \n Example:The subscriber of the patientaTMs health insurance policy signs a contract with the provider to be fiscally responsible for the patient billing account balance amount owed."; + case HLD: return "Participant who posses an instrument such as a financial contract (insurance policy) usually based on some agreement with the author."; + case RCT: return "The record target indicates whose medical record holds the documentation of this act. This is especially important when the subject of a service is not the patient himself."; + case RCV: return "The person (or organization) who receives the product of an Act."; + case IRCP: return "A party, who may or should receive or who has recieved the Act or subsequent or derivative information of that Act. Information recipient is inert, i.e., independent of mood.\" Rationale: this is a generalization of a too diverse family that the definition can't be any more specific, and the concept is abstract so one of the specializations should be used."; + case NOT: return "An information recipient to notify for urgent matters about this Act. (e.g., in a laboratory order, critical results are being called by phone right away, this is the contact to call; or for an inpatient encounter, a next of kin to notify when the patient becomes critically ill)."; + case PRCP: return "Information recipient to whom an act statement is primarily directed. E.g., a primary care provider receiving a discharge letter from a hospitalist, a health department receiving information on a suspected case of infectious disease. Multiple of these participations may exist on the same act without requiring that recipients be ranked as primary vs. secondary."; + case REFB: return "A participant (e.g. provider) who has referred the subject of an act (e.g. patient).\r\n\n Typically, a referred by participant will provide a report (e.g. referral)."; + case REFT: return "The person who receives the patient"; + case TRC: return "A secondary information recipient, who receives copies (e.g., a primary care provider receiving copies of results as ordered by specialist)."; + case LOC: return "The facility where the service is done. May be a static building (or room therein) or a moving location (e.g., ambulance, helicopter, aircraft, train, truck, ship, etc.)"; + case DST: return "The destination for services. May be a static building (or room therein) or a movable facility (e.g., ship)."; + case ELOC: return "A location where data about an Act was entered."; + case ORG: return "The location of origin for services. May be a static building (or room therein) or a movable facility (e.g., ship)."; + case RML: return "Some services take place at multiple concurrent locations (e.g., telemedicine, telephone consultation). The location where the principal performing actor is located is taken as the primary location (LOC) while the other location(s) are considered \"remote.\""; + case VIA: return "For services, an intermediate location that specifies a path between origin an destination."; + case PRF: return "Definition: A person, non-person living subject, organization or device that who actually and principally carries out the action. Device should only be assigned as a performer in circumstances where the device is performing independent of human intervention. Need not be the principal responsible actor.\r\n\n \n Exampe: A surgery resident operating under supervision of attending surgeon, a search and rescue dog locating survivors, an electronic laboratory analyzer or the laboratory discipline requested to perform a laboratory test. The performer may also be the patient in self-care, e.g. fingerstick blood sugar. The traditional order filler is a performer. This information should accompany every service event.\r\n\n \n Note: that existing HL7 designs assign an organization as the playing entity of the Role that is the performer. These designs should be revised in subsequent releases to make this the scooping entity for the role involved."; + case DIST: return "Distributes material used in or generated during the act."; + case PPRF: return "The principal or primary performer of the act."; + case SPRF: return "A person assisting in an act through his substantial presence and involvement This includes: assistants, technicians, associates, or whatever the job titles may be."; + case RESP: return "The person or organization that has primary responsibility for the act. The responsible party is not necessarily present in an action, but is accountable for the action through the power to delegate, and the duty to review actions with the performing actor after the fact. This responsibility may be ethical, legal, contractual, fiscal, or fiduciary in nature.\r\n\n \n Example: A person who is the head of a biochemical laboratory; a sponsor for a policy or government program."; + case VRF: return "A person who verifies the correctness and appropriateness of the service (plan, order, event, etc.) and hence takes on accountability."; + case AUTHEN: return "A verifier who attests to the accuracy of an act, but who does not have privileges to legally authenticate the act. An example would be a resident physician who sees a patient and dictates a note, then later signs it. Their signature constitutes an authentication."; + case LA: return "A verifier who legally authenticates the accuracy of an act. An example would be a staff physician who sees a patient and dictates a note, then later signs it. Their signature constitutes a legal authentication."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PART: return "Participation"; + case _PARTICIPATIONANCILLARY: return "ParticipationAncillary"; + case ADM: return "admitter"; + case ATND: return "attender"; + case CALLBCK: return "callback contact"; + case CON: return "consultant"; + case DIS: return "discharger"; + case ESC: return "escort"; + case REF: return "referrer"; + case _PARTICIPATIONINFORMATIONGENERATOR: return "ParticipationInformationGenerator"; + case AUT: return "author (originator)"; + case INF: return "informant"; + case TRANS: return "Transcriber"; + case ENT: return "data entry person"; + case WIT: return "witness"; + case CST: return "custodian"; + case DIR: return "direct target"; + case ALY: return "analyte"; + case BBY: return "baby"; + case CAT: return "catalyst"; + case CSM: return "consumable"; + case TPA: return "therapeutic agent"; + case DEV: return "device"; + case NRD: return "non-reuseable device"; + case RDV: return "reusable device"; + case DON: return "donor"; + case EXPAGNT: return "ExposureAgent"; + case EXPART: return "ExposureParticipation"; + case EXPTRGT: return "ExposureTarget"; + case EXSRC: return "ExposureSource"; + case PRD: return "product"; + case SBJ: return "subject"; + case SPC: return "specimen"; + case IND: return "indirect target"; + case BEN: return "beneficiary"; + case CAGNT: return "causative agent"; + case COV: return "coverage target"; + case GUAR: return "guarantor party"; + case HLD: return "holder"; + case RCT: return "record target"; + case RCV: return "receiver"; + case IRCP: return "information recipient"; + case NOT: return "ugent notification contact"; + case PRCP: return "primary information recipient"; + case REFB: return "Referred By"; + case REFT: return "Referred to"; + case TRC: return "tracker"; + case LOC: return "location"; + case DST: return "destination"; + case ELOC: return "entry location"; + case ORG: return "origin"; + case RML: return "remote"; + case VIA: return "via"; + case PRF: return "performer"; + case DIST: return "distributor"; + case PPRF: return "primary performer"; + case SPRF: return "secondary performer"; + case RESP: return "responsible party"; + case VRF: return "verifier"; + case AUTHEN: return "authenticator"; + case LA: return "legal authenticator"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationTypeEnumFactory.java new file mode 100644 index 00000000000..111e7fa16f8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ParticipationTypeEnumFactory.java @@ -0,0 +1,298 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ParticipationTypeEnumFactory implements EnumFactory { + + public V3ParticipationType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("PART".equals(codeString)) + return V3ParticipationType.PART; + if ("_ParticipationAncillary".equals(codeString)) + return V3ParticipationType._PARTICIPATIONANCILLARY; + if ("ADM".equals(codeString)) + return V3ParticipationType.ADM; + if ("ATND".equals(codeString)) + return V3ParticipationType.ATND; + if ("CALLBCK".equals(codeString)) + return V3ParticipationType.CALLBCK; + if ("CON".equals(codeString)) + return V3ParticipationType.CON; + if ("DIS".equals(codeString)) + return V3ParticipationType.DIS; + if ("ESC".equals(codeString)) + return V3ParticipationType.ESC; + if ("REF".equals(codeString)) + return V3ParticipationType.REF; + if ("_ParticipationInformationGenerator".equals(codeString)) + return V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR; + if ("AUT".equals(codeString)) + return V3ParticipationType.AUT; + if ("INF".equals(codeString)) + return V3ParticipationType.INF; + if ("TRANS".equals(codeString)) + return V3ParticipationType.TRANS; + if ("ENT".equals(codeString)) + return V3ParticipationType.ENT; + if ("WIT".equals(codeString)) + return V3ParticipationType.WIT; + if ("CST".equals(codeString)) + return V3ParticipationType.CST; + if ("DIR".equals(codeString)) + return V3ParticipationType.DIR; + if ("ALY".equals(codeString)) + return V3ParticipationType.ALY; + if ("BBY".equals(codeString)) + return V3ParticipationType.BBY; + if ("CAT".equals(codeString)) + return V3ParticipationType.CAT; + if ("CSM".equals(codeString)) + return V3ParticipationType.CSM; + if ("TPA".equals(codeString)) + return V3ParticipationType.TPA; + if ("DEV".equals(codeString)) + return V3ParticipationType.DEV; + if ("NRD".equals(codeString)) + return V3ParticipationType.NRD; + if ("RDV".equals(codeString)) + return V3ParticipationType.RDV; + if ("DON".equals(codeString)) + return V3ParticipationType.DON; + if ("EXPAGNT".equals(codeString)) + return V3ParticipationType.EXPAGNT; + if ("EXPART".equals(codeString)) + return V3ParticipationType.EXPART; + if ("EXPTRGT".equals(codeString)) + return V3ParticipationType.EXPTRGT; + if ("EXSRC".equals(codeString)) + return V3ParticipationType.EXSRC; + if ("PRD".equals(codeString)) + return V3ParticipationType.PRD; + if ("SBJ".equals(codeString)) + return V3ParticipationType.SBJ; + if ("SPC".equals(codeString)) + return V3ParticipationType.SPC; + if ("IND".equals(codeString)) + return V3ParticipationType.IND; + if ("BEN".equals(codeString)) + return V3ParticipationType.BEN; + if ("CAGNT".equals(codeString)) + return V3ParticipationType.CAGNT; + if ("COV".equals(codeString)) + return V3ParticipationType.COV; + if ("GUAR".equals(codeString)) + return V3ParticipationType.GUAR; + if ("HLD".equals(codeString)) + return V3ParticipationType.HLD; + if ("RCT".equals(codeString)) + return V3ParticipationType.RCT; + if ("RCV".equals(codeString)) + return V3ParticipationType.RCV; + if ("IRCP".equals(codeString)) + return V3ParticipationType.IRCP; + if ("NOT".equals(codeString)) + return V3ParticipationType.NOT; + if ("PRCP".equals(codeString)) + return V3ParticipationType.PRCP; + if ("REFB".equals(codeString)) + return V3ParticipationType.REFB; + if ("REFT".equals(codeString)) + return V3ParticipationType.REFT; + if ("TRC".equals(codeString)) + return V3ParticipationType.TRC; + if ("LOC".equals(codeString)) + return V3ParticipationType.LOC; + if ("DST".equals(codeString)) + return V3ParticipationType.DST; + if ("ELOC".equals(codeString)) + return V3ParticipationType.ELOC; + if ("ORG".equals(codeString)) + return V3ParticipationType.ORG; + if ("RML".equals(codeString)) + return V3ParticipationType.RML; + if ("VIA".equals(codeString)) + return V3ParticipationType.VIA; + if ("PRF".equals(codeString)) + return V3ParticipationType.PRF; + if ("DIST".equals(codeString)) + return V3ParticipationType.DIST; + if ("PPRF".equals(codeString)) + return V3ParticipationType.PPRF; + if ("SPRF".equals(codeString)) + return V3ParticipationType.SPRF; + if ("RESP".equals(codeString)) + return V3ParticipationType.RESP; + if ("VRF".equals(codeString)) + return V3ParticipationType.VRF; + if ("AUTHEN".equals(codeString)) + return V3ParticipationType.AUTHEN; + if ("LA".equals(codeString)) + return V3ParticipationType.LA; + throw new IllegalArgumentException("Unknown V3ParticipationType code '"+codeString+"'"); + } + + public String toCode(V3ParticipationType code) { + if (code == V3ParticipationType.PART) + return "PART"; + if (code == V3ParticipationType._PARTICIPATIONANCILLARY) + return "_ParticipationAncillary"; + if (code == V3ParticipationType.ADM) + return "ADM"; + if (code == V3ParticipationType.ATND) + return "ATND"; + if (code == V3ParticipationType.CALLBCK) + return "CALLBCK"; + if (code == V3ParticipationType.CON) + return "CON"; + if (code == V3ParticipationType.DIS) + return "DIS"; + if (code == V3ParticipationType.ESC) + return "ESC"; + if (code == V3ParticipationType.REF) + return "REF"; + if (code == V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR) + return "_ParticipationInformationGenerator"; + if (code == V3ParticipationType.AUT) + return "AUT"; + if (code == V3ParticipationType.INF) + return "INF"; + if (code == V3ParticipationType.TRANS) + return "TRANS"; + if (code == V3ParticipationType.ENT) + return "ENT"; + if (code == V3ParticipationType.WIT) + return "WIT"; + if (code == V3ParticipationType.CST) + return "CST"; + if (code == V3ParticipationType.DIR) + return "DIR"; + if (code == V3ParticipationType.ALY) + return "ALY"; + if (code == V3ParticipationType.BBY) + return "BBY"; + if (code == V3ParticipationType.CAT) + return "CAT"; + if (code == V3ParticipationType.CSM) + return "CSM"; + if (code == V3ParticipationType.TPA) + return "TPA"; + if (code == V3ParticipationType.DEV) + return "DEV"; + if (code == V3ParticipationType.NRD) + return "NRD"; + if (code == V3ParticipationType.RDV) + return "RDV"; + if (code == V3ParticipationType.DON) + return "DON"; + if (code == V3ParticipationType.EXPAGNT) + return "EXPAGNT"; + if (code == V3ParticipationType.EXPART) + return "EXPART"; + if (code == V3ParticipationType.EXPTRGT) + return "EXPTRGT"; + if (code == V3ParticipationType.EXSRC) + return "EXSRC"; + if (code == V3ParticipationType.PRD) + return "PRD"; + if (code == V3ParticipationType.SBJ) + return "SBJ"; + if (code == V3ParticipationType.SPC) + return "SPC"; + if (code == V3ParticipationType.IND) + return "IND"; + if (code == V3ParticipationType.BEN) + return "BEN"; + if (code == V3ParticipationType.CAGNT) + return "CAGNT"; + if (code == V3ParticipationType.COV) + return "COV"; + if (code == V3ParticipationType.GUAR) + return "GUAR"; + if (code == V3ParticipationType.HLD) + return "HLD"; + if (code == V3ParticipationType.RCT) + return "RCT"; + if (code == V3ParticipationType.RCV) + return "RCV"; + if (code == V3ParticipationType.IRCP) + return "IRCP"; + if (code == V3ParticipationType.NOT) + return "NOT"; + if (code == V3ParticipationType.PRCP) + return "PRCP"; + if (code == V3ParticipationType.REFB) + return "REFB"; + if (code == V3ParticipationType.REFT) + return "REFT"; + if (code == V3ParticipationType.TRC) + return "TRC"; + if (code == V3ParticipationType.LOC) + return "LOC"; + if (code == V3ParticipationType.DST) + return "DST"; + if (code == V3ParticipationType.ELOC) + return "ELOC"; + if (code == V3ParticipationType.ORG) + return "ORG"; + if (code == V3ParticipationType.RML) + return "RML"; + if (code == V3ParticipationType.VIA) + return "VIA"; + if (code == V3ParticipationType.PRF) + return "PRF"; + if (code == V3ParticipationType.DIST) + return "DIST"; + if (code == V3ParticipationType.PPRF) + return "PPRF"; + if (code == V3ParticipationType.SPRF) + return "SPRF"; + if (code == V3ParticipationType.RESP) + return "RESP"; + if (code == V3ParticipationType.VRF) + return "VRF"; + if (code == V3ParticipationType.AUTHEN) + return "AUTHEN"; + if (code == V3ParticipationType.LA) + return "LA"; + return "?"; + } + + public String toSystem(V3ParticipationType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PatientImportance.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PatientImportance.java new file mode 100644 index 00000000000..aefd6b44559 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PatientImportance.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3PatientImportance { + + /** + * Board member of health care organization + */ + BM, + /** + * Family member of staff physician + */ + DFM, + /** + * Member of the health care organization physician staff + */ + DR, + /** + * Financial donor to the health care organization + */ + FD, + /** + * Foreign citizen dignitary of interest to the health care organization + */ + FOR, + /** + * Government dignitary of interest to the organization + */ + GOVT, + /** + * Family member of staff member + */ + SFM, + /** + * Staff member of the health care organization + */ + STF, + /** + * Very important person of interest to the health care organization + */ + VIP, + /** + * added to help the parsers + */ + NULL; + public static V3PatientImportance fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BM".equals(codeString)) + return BM; + if ("DFM".equals(codeString)) + return DFM; + if ("DR".equals(codeString)) + return DR; + if ("FD".equals(codeString)) + return FD; + if ("FOR".equals(codeString)) + return FOR; + if ("GOVT".equals(codeString)) + return GOVT; + if ("SFM".equals(codeString)) + return SFM; + if ("STF".equals(codeString)) + return STF; + if ("VIP".equals(codeString)) + return VIP; + throw new FHIRException("Unknown V3PatientImportance code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BM: return "BM"; + case DFM: return "DFM"; + case DR: return "DR"; + case FD: return "FD"; + case FOR: return "FOR"; + case GOVT: return "GOVT"; + case SFM: return "SFM"; + case STF: return "STF"; + case VIP: return "VIP"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/PatientImportance"; + } + public String getDefinition() { + switch (this) { + case BM: return "Board member of health care organization"; + case DFM: return "Family member of staff physician"; + case DR: return "Member of the health care organization physician staff"; + case FD: return "Financial donor to the health care organization"; + case FOR: return "Foreign citizen dignitary of interest to the health care organization"; + case GOVT: return "Government dignitary of interest to the organization"; + case SFM: return "Family member of staff member"; + case STF: return "Staff member of the health care organization"; + case VIP: return "Very important person of interest to the health care organization"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BM: return "Board Member"; + case DFM: return "Physician Family Member"; + case DR: return "Staff Physician"; + case FD: return "Financial Donor"; + case FOR: return "Foreign Dignitary"; + case GOVT: return "Government Dignitary"; + case SFM: return "Staff Family Member"; + case STF: return "Staff Member"; + case VIP: return "Very Important Person"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PatientImportanceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PatientImportanceEnumFactory.java new file mode 100644 index 00000000000..2733e7bc603 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PatientImportanceEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3PatientImportanceEnumFactory implements EnumFactory { + + public V3PatientImportance fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("BM".equals(codeString)) + return V3PatientImportance.BM; + if ("DFM".equals(codeString)) + return V3PatientImportance.DFM; + if ("DR".equals(codeString)) + return V3PatientImportance.DR; + if ("FD".equals(codeString)) + return V3PatientImportance.FD; + if ("FOR".equals(codeString)) + return V3PatientImportance.FOR; + if ("GOVT".equals(codeString)) + return V3PatientImportance.GOVT; + if ("SFM".equals(codeString)) + return V3PatientImportance.SFM; + if ("STF".equals(codeString)) + return V3PatientImportance.STF; + if ("VIP".equals(codeString)) + return V3PatientImportance.VIP; + throw new IllegalArgumentException("Unknown V3PatientImportance code '"+codeString+"'"); + } + + public String toCode(V3PatientImportance code) { + if (code == V3PatientImportance.BM) + return "BM"; + if (code == V3PatientImportance.DFM) + return "DFM"; + if (code == V3PatientImportance.DR) + return "DR"; + if (code == V3PatientImportance.FD) + return "FD"; + if (code == V3PatientImportance.FOR) + return "FOR"; + if (code == V3PatientImportance.GOVT) + return "GOVT"; + if (code == V3PatientImportance.SFM) + return "SFM"; + if (code == V3PatientImportance.STF) + return "STF"; + if (code == V3PatientImportance.VIP) + return "VIP"; + return "?"; + } + + public String toSystem(V3PatientImportance code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PaymentTerms.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PaymentTerms.java new file mode 100644 index 00000000000..1ac6f777a2e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PaymentTerms.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3PaymentTerms { + + /** + * Payment in full for products and/or services is required as soon as the service is performed or goods delivered. + */ + COD, + /** + * Payment in full for products and/or services is required 30 days from the time the service is performed or goods delivered. + */ + N30, + /** + * Payment in full for products and/or services is required 60 days from the time the service is performed or goods delivered. + */ + N60, + /** + * Payment in full for products and/or services is required 90 days from the time the service is performed or goods delivered. + */ + N90, + /** + * added to help the parsers + */ + NULL; + public static V3PaymentTerms fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("COD".equals(codeString)) + return COD; + if ("N30".equals(codeString)) + return N30; + if ("N60".equals(codeString)) + return N60; + if ("N90".equals(codeString)) + return N90; + throw new FHIRException("Unknown V3PaymentTerms code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COD: return "COD"; + case N30: return "N30"; + case N60: return "N60"; + case N90: return "N90"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/PaymentTerms"; + } + public String getDefinition() { + switch (this) { + case COD: return "Payment in full for products and/or services is required as soon as the service is performed or goods delivered."; + case N30: return "Payment in full for products and/or services is required 30 days from the time the service is performed or goods delivered."; + case N60: return "Payment in full for products and/or services is required 60 days from the time the service is performed or goods delivered."; + case N90: return "Payment in full for products and/or services is required 90 days from the time the service is performed or goods delivered."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COD: return "Cash on Delivery"; + case N30: return "Net 30 days"; + case N60: return "Net 60 days"; + case N90: return "Net 90 days"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PaymentTermsEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PaymentTermsEnumFactory.java new file mode 100644 index 00000000000..b1bf9bd673a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PaymentTermsEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3PaymentTermsEnumFactory implements EnumFactory { + + public V3PaymentTerms fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("COD".equals(codeString)) + return V3PaymentTerms.COD; + if ("N30".equals(codeString)) + return V3PaymentTerms.N30; + if ("N60".equals(codeString)) + return V3PaymentTerms.N60; + if ("N90".equals(codeString)) + return V3PaymentTerms.N90; + throw new IllegalArgumentException("Unknown V3PaymentTerms code '"+codeString+"'"); + } + + public String toCode(V3PaymentTerms code) { + if (code == V3PaymentTerms.COD) + return "COD"; + if (code == V3PaymentTerms.N30) + return "N30"; + if (code == V3PaymentTerms.N60) + return "N60"; + if (code == V3PaymentTerms.N90) + return "N90"; + return "?"; + } + + public String toSystem(V3PaymentTerms code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PersonDisabilityType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PersonDisabilityType.java new file mode 100644 index 00000000000..211b7effea1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PersonDisabilityType.java @@ -0,0 +1,159 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3PersonDisabilityType { + + /** + * Vision impaired + */ + _1, + /** + * Hearing impaired + */ + _2, + /** + * Speech impaired + */ + _3, + /** + * Mentally impaired + */ + _4, + /** + * Mobility impaired + */ + _5, + /** + * A crib is required to move the person + */ + CB, + /** + * Person requires crutches to ambulate + */ + CR, + /** + * A gurney is required to move the person + */ + G, + /** + * Person requires a wheelchair to be ambulatory + */ + WC, + /** + * Person requires a walker to ambulate + */ + WK, + /** + * added to help the parsers + */ + NULL; + public static V3PersonDisabilityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return _1; + if ("2".equals(codeString)) + return _2; + if ("3".equals(codeString)) + return _3; + if ("4".equals(codeString)) + return _4; + if ("5".equals(codeString)) + return _5; + if ("CB".equals(codeString)) + return CB; + if ("CR".equals(codeString)) + return CR; + if ("G".equals(codeString)) + return G; + if ("WC".equals(codeString)) + return WC; + if ("WK".equals(codeString)) + return WK; + throw new FHIRException("Unknown V3PersonDisabilityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1: return "1"; + case _2: return "2"; + case _3: return "3"; + case _4: return "4"; + case _5: return "5"; + case CB: return "CB"; + case CR: return "CR"; + case G: return "G"; + case WC: return "WC"; + case WK: return "WK"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/PersonDisabilityType"; + } + public String getDefinition() { + switch (this) { + case _1: return "Vision impaired"; + case _2: return "Hearing impaired"; + case _3: return "Speech impaired"; + case _4: return "Mentally impaired"; + case _5: return "Mobility impaired"; + case CB: return "A crib is required to move the person"; + case CR: return "Person requires crutches to ambulate"; + case G: return "A gurney is required to move the person"; + case WC: return "Person requires a wheelchair to be ambulatory"; + case WK: return "Person requires a walker to ambulate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1: return "Vision impaired"; + case _2: return "Hearing impaired"; + case _3: return "Speech impaired"; + case _4: return "Mentally impaired"; + case _5: return "Mobility impaired"; + case CB: return "Requires crib"; + case CR: return "Requires crutches"; + case G: return "Requires gurney"; + case WC: return "Requires wheelchair"; + case WK: return "Requires walker"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PersonDisabilityTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PersonDisabilityTypeEnumFactory.java new file mode 100644 index 00000000000..20002a2d245 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3PersonDisabilityTypeEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3PersonDisabilityTypeEnumFactory implements EnumFactory { + + public V3PersonDisabilityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1".equals(codeString)) + return V3PersonDisabilityType._1; + if ("2".equals(codeString)) + return V3PersonDisabilityType._2; + if ("3".equals(codeString)) + return V3PersonDisabilityType._3; + if ("4".equals(codeString)) + return V3PersonDisabilityType._4; + if ("5".equals(codeString)) + return V3PersonDisabilityType._5; + if ("CB".equals(codeString)) + return V3PersonDisabilityType.CB; + if ("CR".equals(codeString)) + return V3PersonDisabilityType.CR; + if ("G".equals(codeString)) + return V3PersonDisabilityType.G; + if ("WC".equals(codeString)) + return V3PersonDisabilityType.WC; + if ("WK".equals(codeString)) + return V3PersonDisabilityType.WK; + throw new IllegalArgumentException("Unknown V3PersonDisabilityType code '"+codeString+"'"); + } + + public String toCode(V3PersonDisabilityType code) { + if (code == V3PersonDisabilityType._1) + return "1"; + if (code == V3PersonDisabilityType._2) + return "2"; + if (code == V3PersonDisabilityType._3) + return "3"; + if (code == V3PersonDisabilityType._4) + return "4"; + if (code == V3PersonDisabilityType._5) + return "5"; + if (code == V3PersonDisabilityType.CB) + return "CB"; + if (code == V3PersonDisabilityType.CR) + return "CR"; + if (code == V3PersonDisabilityType.G) + return "G"; + if (code == V3PersonDisabilityType.WC) + return "WC"; + if (code == V3PersonDisabilityType.WK) + return "WK"; + return "?"; + } + + public String toSystem(V3PersonDisabilityType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProbabilityDistributionType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProbabilityDistributionType.java new file mode 100644 index 00000000000..76fa2a9a22c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProbabilityDistributionType.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ProbabilityDistributionType { + + /** + * The beta-distribution is used for data that is bounded on both sides and may or may not be skewed (e.g., occurs when probabilities are estimated.) Two parameters a and b are available to adjust the curve. The mean m and variance s2 relate as follows: m = a/ (a + b) and s2 = ab/((a + b)2 (a + b + 1)). + */ + B, + /** + * Used for data that describes extinction. The exponential distribution is a special form of g-distribution where a = 1, hence, the relationship to mean m and variance s2 are m = b and s2 = b2. + */ + E, + /** + * Used to describe the quotient of two c2 random variables. The F-distribution has two parameters n1 and n2, which are the numbers of degrees of freedom of the numerator and denominator variable respectively. The relationship to mean m and variance s2 are: m = n2 / (n2 - 2) and s2 = (2 n2 (n2 + n1 - 2)) / (n1 (n2 - 2)2 (n2 - 4)). + */ + F, + /** + * The gamma-distribution used for data that is skewed and bounded to the right, i.e. where the maximum of the distribution curve is located near the origin. The g-distribution has a two parameters a and b. The relationship to mean m and variance s2 is m = a b and s2 = a b2. + */ + G, + /** + * The logarithmic normal distribution is used to transform skewed random variable X into a normally distributed random variable U = log X. The log-normal distribution can be specified with the properties mean m and standard deviation s. Note however that mean m and standard deviation s are the parameters of the raw value distribution, not the transformed parameters of the lognormal distribution that are conventionally referred to by the same letters. Those log-normal parameters mlog and slog relate to the mean m and standard deviation s of the data value through slog2 = log (s2/m2 + 1) and mlog = log m - slog2/2. + */ + LN, + /** + * This is the well-known bell-shaped normal distribution. Because of the central limit theorem, the normal distribution is the distribution of choice for an unbounded random variable that is an outcome of a combination of many stochastic processes. Even for values bounded on a single side (i.e. greater than 0) the normal distribution may be accurate enough if the mean is "far away" from the bound of the scale measured in terms of standard deviations. + */ + N, + /** + * Used to describe the quotient of a normal random variable and the square root of a c2 random variable. The t-distribution has one parameter n, the number of degrees of freedom. The relationship to mean m and variance s2 are: m = 0 and s2 = n / (n - 2) + */ + T, + /** + * The uniform distribution assigns a constant probability over the entire interval of possible outcomes, while all outcomes outside this interval are assumed to have zero probability. The width of this interval is 2s sqrt(3). Thus, the uniform distribution assigns the probability densities f(x) = sqrt(2 s sqrt(3)) to values m - s sqrt(3) >= x <= m + s sqrt(3) and f(x) = 0 otherwise. + */ + U, + /** + * Used to describe the sum of squares of random variables which occurs when a variance is estimated (rather than presumed) from the sample. The only parameter of the c2-distribution is n, so called the number of degrees of freedom (which is the number of independent parts in the sum). The c2-distribution is a special type of g-distribution with parameter a = n /2 and b = 2. Hence, m = n and s2 = 2 n. + */ + X2, + /** + * added to help the parsers + */ + NULL; + public static V3ProbabilityDistributionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return B; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("G".equals(codeString)) + return G; + if ("LN".equals(codeString)) + return LN; + if ("N".equals(codeString)) + return N; + if ("T".equals(codeString)) + return T; + if ("U".equals(codeString)) + return U; + if ("X2".equals(codeString)) + return X2; + throw new FHIRException("Unknown V3ProbabilityDistributionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case B: return "B"; + case E: return "E"; + case F: return "F"; + case G: return "G"; + case LN: return "LN"; + case N: return "N"; + case T: return "T"; + case U: return "U"; + case X2: return "X2"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ProbabilityDistributionType"; + } + public String getDefinition() { + switch (this) { + case B: return "The beta-distribution is used for data that is bounded on both sides and may or may not be skewed (e.g., occurs when probabilities are estimated.) Two parameters a and b are available to adjust the curve. The mean m and variance s2 relate as follows: m = a/ (a + b) and s2 = ab/((a + b)2 (a + b + 1))."; + case E: return "Used for data that describes extinction. The exponential distribution is a special form of g-distribution where a = 1, hence, the relationship to mean m and variance s2 are m = b and s2 = b2."; + case F: return "Used to describe the quotient of two c2 random variables. The F-distribution has two parameters n1 and n2, which are the numbers of degrees of freedom of the numerator and denominator variable respectively. The relationship to mean m and variance s2 are: m = n2 / (n2 - 2) and s2 = (2 n2 (n2 + n1 - 2)) / (n1 (n2 - 2)2 (n2 - 4))."; + case G: return "The gamma-distribution used for data that is skewed and bounded to the right, i.e. where the maximum of the distribution curve is located near the origin. The g-distribution has a two parameters a and b. The relationship to mean m and variance s2 is m = a b and s2 = a b2."; + case LN: return "The logarithmic normal distribution is used to transform skewed random variable X into a normally distributed random variable U = log X. The log-normal distribution can be specified with the properties mean m and standard deviation s. Note however that mean m and standard deviation s are the parameters of the raw value distribution, not the transformed parameters of the lognormal distribution that are conventionally referred to by the same letters. Those log-normal parameters mlog and slog relate to the mean m and standard deviation s of the data value through slog2 = log (s2/m2 + 1) and mlog = log m - slog2/2."; + case N: return "This is the well-known bell-shaped normal distribution. Because of the central limit theorem, the normal distribution is the distribution of choice for an unbounded random variable that is an outcome of a combination of many stochastic processes. Even for values bounded on a single side (i.e. greater than 0) the normal distribution may be accurate enough if the mean is \"far away\" from the bound of the scale measured in terms of standard deviations."; + case T: return "Used to describe the quotient of a normal random variable and the square root of a c2 random variable. The t-distribution has one parameter n, the number of degrees of freedom. The relationship to mean m and variance s2 are: m = 0 and s2 = n / (n - 2)"; + case U: return "The uniform distribution assigns a constant probability over the entire interval of possible outcomes, while all outcomes outside this interval are assumed to have zero probability. The width of this interval is 2s sqrt(3). Thus, the uniform distribution assigns the probability densities f(x) = sqrt(2 s sqrt(3)) to values m - s sqrt(3) >= x <= m + s sqrt(3) and f(x) = 0 otherwise."; + case X2: return "Used to describe the sum of squares of random variables which occurs when a variance is estimated (rather than presumed) from the sample. The only parameter of the c2-distribution is n, so called the number of degrees of freedom (which is the number of independent parts in the sum). The c2-distribution is a special type of g-distribution with parameter a = n /2 and b = 2. Hence, m = n and s2 = 2 n."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case B: return "beta"; + case E: return "exponential"; + case F: return "F"; + case G: return "(gamma)"; + case LN: return "log-normal"; + case N: return "normal (Gaussian)"; + case T: return "T"; + case U: return "uniform"; + case X2: return "chi square"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProbabilityDistributionTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProbabilityDistributionTypeEnumFactory.java new file mode 100644 index 00000000000..73a1b84eb29 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProbabilityDistributionTypeEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ProbabilityDistributionTypeEnumFactory implements EnumFactory { + + public V3ProbabilityDistributionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return V3ProbabilityDistributionType.B; + if ("E".equals(codeString)) + return V3ProbabilityDistributionType.E; + if ("F".equals(codeString)) + return V3ProbabilityDistributionType.F; + if ("G".equals(codeString)) + return V3ProbabilityDistributionType.G; + if ("LN".equals(codeString)) + return V3ProbabilityDistributionType.LN; + if ("N".equals(codeString)) + return V3ProbabilityDistributionType.N; + if ("T".equals(codeString)) + return V3ProbabilityDistributionType.T; + if ("U".equals(codeString)) + return V3ProbabilityDistributionType.U; + if ("X2".equals(codeString)) + return V3ProbabilityDistributionType.X2; + throw new IllegalArgumentException("Unknown V3ProbabilityDistributionType code '"+codeString+"'"); + } + + public String toCode(V3ProbabilityDistributionType code) { + if (code == V3ProbabilityDistributionType.B) + return "B"; + if (code == V3ProbabilityDistributionType.E) + return "E"; + if (code == V3ProbabilityDistributionType.F) + return "F"; + if (code == V3ProbabilityDistributionType.G) + return "G"; + if (code == V3ProbabilityDistributionType.LN) + return "LN"; + if (code == V3ProbabilityDistributionType.N) + return "N"; + if (code == V3ProbabilityDistributionType.T) + return "T"; + if (code == V3ProbabilityDistributionType.U) + return "U"; + if (code == V3ProbabilityDistributionType.X2) + return "X2"; + return "?"; + } + + public String toSystem(V3ProbabilityDistributionType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingID.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingID.java new file mode 100644 index 00000000000..019a313d952 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingID.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ProcessingID { + + /** + * Identifies debugging type of processing. + */ + D, + /** + * Identifies production type of processing. + */ + P, + /** + * Identifies training type of processing. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3ProcessingID fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("P".equals(codeString)) + return P; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3ProcessingID code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case P: return "P"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ProcessingID"; + } + public String getDefinition() { + switch (this) { + case D: return "Identifies debugging type of processing."; + case P: return "Identifies production type of processing."; + case T: return "Identifies training type of processing."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "Debugging"; + case P: return "Production"; + case T: return "Training"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingIDEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingIDEnumFactory.java new file mode 100644 index 00000000000..4882df1291b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingIDEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ProcessingIDEnumFactory implements EnumFactory { + + public V3ProcessingID fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3ProcessingID.D; + if ("P".equals(codeString)) + return V3ProcessingID.P; + if ("T".equals(codeString)) + return V3ProcessingID.T; + throw new IllegalArgumentException("Unknown V3ProcessingID code '"+codeString+"'"); + } + + public String toCode(V3ProcessingID code) { + if (code == V3ProcessingID.D) + return "D"; + if (code == V3ProcessingID.P) + return "P"; + if (code == V3ProcessingID.T) + return "T"; + return "?"; + } + + public String toSystem(V3ProcessingID code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingMode.java new file mode 100644 index 00000000000..ac16142e9e8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingMode.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ProcessingMode { + + /** + * Identifies archive mode of processing. + */ + A, + /** + * Identifies initial load mode of processing. + */ + I, + /** + * Identifies restore mode of processing. + */ + R, + /** + * Identifies on-line mode of processing. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3ProcessingMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("I".equals(codeString)) + return I; + if ("R".equals(codeString)) + return R; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3ProcessingMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case I: return "I"; + case R: return "R"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ProcessingMode"; + } + public String getDefinition() { + switch (this) { + case A: return "Identifies archive mode of processing."; + case I: return "Identifies initial load mode of processing."; + case R: return "Identifies restore mode of processing."; + case T: return "Identifies on-line mode of processing."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Archive"; + case I: return "Initial load"; + case R: return "Restore from archive"; + case T: return "Current processing"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingModeEnumFactory.java new file mode 100644 index 00000000000..90fa6f54d06 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ProcessingModeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ProcessingModeEnumFactory implements EnumFactory { + + public V3ProcessingMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3ProcessingMode.A; + if ("I".equals(codeString)) + return V3ProcessingMode.I; + if ("R".equals(codeString)) + return V3ProcessingMode.R; + if ("T".equals(codeString)) + return V3ProcessingMode.T; + throw new IllegalArgumentException("Unknown V3ProcessingMode code '"+codeString+"'"); + } + + public String toCode(V3ProcessingMode code) { + if (code == V3ProcessingMode.A) + return "A"; + if (code == V3ProcessingMode.I) + return "I"; + if (code == V3ProcessingMode.R) + return "R"; + if (code == V3ProcessingMode.T) + return "T"; + return "?"; + } + + public String toSystem(V3ProcessingMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryParameterValue.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryParameterValue.java new file mode 100644 index 00000000000..a50f6db1f24 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryParameterValue.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryParameterValue { + + /** + * Description:Filter codes used to manage volume of dispenses returned by a parameter-based queries. + */ + _DISPENSEQUERYFILTERCODE, + /** + * Description:Returns all dispenses to date for a prescription. + */ + ALLDISP, + /** + * Description:Returns the most recent dispense for a prescription. + */ + LASTDISP, + /** + * Description:Returns no dispense for a prescription. + */ + NODISP, + /** + * Filter codes used to manage types of orders being returned by a parameter-based query. + */ + _ORDERFILTERCODE, + /** + * Return all orders. + */ + AO, + /** + * Return only those orders that do not have results. + */ + ONR, + /** + * Return only those orders that have results. + */ + OWR, + /** + * A "helper" vocabulary used to construct complex query filters based on how and whether a prescription has been dispensed. + */ + _PRESCRIPTIONDISPENSEFILTERCODE, + /** + * Filter to only include SubstanceAdministration orders which have no remaining quantity authorized to be dispensed. + */ + C, + /** + * Filter to only include SubstanceAdministration orders which have no fulfilling supply events performed. + */ + N, + /** + * Filter to only include SubstanceAdministration orders which have had at least one fulfilling supply event, but which still have outstanding quantity remaining to be authorized. + */ + R, + /** + * Description:Indicates how result sets should be filtered based on whether they have associated issues. + */ + _QUERYPARAMETERVALUE, + /** + * Description:Result set should not be filtered based on the presence of issues. + */ + ISSFA, + /** + * Description:Result set should be filtered to only include records with associated issues. + */ + ISSFI, + /** + * Description:Result set should be filtered to only include records with associated unmanaged issues. + */ + ISSFU, + /** + * added to help the parsers + */ + NULL; + public static V3QueryParameterValue fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DispenseQueryFilterCode".equals(codeString)) + return _DISPENSEQUERYFILTERCODE; + if ("ALLDISP".equals(codeString)) + return ALLDISP; + if ("LASTDISP".equals(codeString)) + return LASTDISP; + if ("NODISP".equals(codeString)) + return NODISP; + if ("_OrderFilterCode".equals(codeString)) + return _ORDERFILTERCODE; + if ("AO".equals(codeString)) + return AO; + if ("ONR".equals(codeString)) + return ONR; + if ("OWR".equals(codeString)) + return OWR; + if ("_PrescriptionDispenseFilterCode".equals(codeString)) + return _PRESCRIPTIONDISPENSEFILTERCODE; + if ("C".equals(codeString)) + return C; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("_QueryParameterValue".equals(codeString)) + return _QUERYPARAMETERVALUE; + if ("ISSFA".equals(codeString)) + return ISSFA; + if ("ISSFI".equals(codeString)) + return ISSFI; + if ("ISSFU".equals(codeString)) + return ISSFU; + throw new FHIRException("Unknown V3QueryParameterValue code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _DISPENSEQUERYFILTERCODE: return "_DispenseQueryFilterCode"; + case ALLDISP: return "ALLDISP"; + case LASTDISP: return "LASTDISP"; + case NODISP: return "NODISP"; + case _ORDERFILTERCODE: return "_OrderFilterCode"; + case AO: return "AO"; + case ONR: return "ONR"; + case OWR: return "OWR"; + case _PRESCRIPTIONDISPENSEFILTERCODE: return "_PrescriptionDispenseFilterCode"; + case C: return "C"; + case N: return "N"; + case R: return "R"; + case _QUERYPARAMETERVALUE: return "_QueryParameterValue"; + case ISSFA: return "ISSFA"; + case ISSFI: return "ISSFI"; + case ISSFU: return "ISSFU"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryParameterValue"; + } + public String getDefinition() { + switch (this) { + case _DISPENSEQUERYFILTERCODE: return "Description:Filter codes used to manage volume of dispenses returned by a parameter-based queries."; + case ALLDISP: return "Description:Returns all dispenses to date for a prescription."; + case LASTDISP: return "Description:Returns the most recent dispense for a prescription."; + case NODISP: return "Description:Returns no dispense for a prescription."; + case _ORDERFILTERCODE: return "Filter codes used to manage types of orders being returned by a parameter-based query."; + case AO: return "Return all orders."; + case ONR: return "Return only those orders that do not have results."; + case OWR: return "Return only those orders that have results."; + case _PRESCRIPTIONDISPENSEFILTERCODE: return "A \"helper\" vocabulary used to construct complex query filters based on how and whether a prescription has been dispensed."; + case C: return "Filter to only include SubstanceAdministration orders which have no remaining quantity authorized to be dispensed."; + case N: return "Filter to only include SubstanceAdministration orders which have no fulfilling supply events performed."; + case R: return "Filter to only include SubstanceAdministration orders which have had at least one fulfilling supply event, but which still have outstanding quantity remaining to be authorized."; + case _QUERYPARAMETERVALUE: return "Description:Indicates how result sets should be filtered based on whether they have associated issues."; + case ISSFA: return "Description:Result set should not be filtered based on the presence of issues."; + case ISSFI: return "Description:Result set should be filtered to only include records with associated issues."; + case ISSFU: return "Description:Result set should be filtered to only include records with associated unmanaged issues."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _DISPENSEQUERYFILTERCODE: return "dispense query filter code"; + case ALLDISP: return "all dispenses"; + case LASTDISP: return "last dispense"; + case NODISP: return "no dispense"; + case _ORDERFILTERCODE: return "_OrderFilterCode"; + case AO: return "all orders"; + case ONR: return "orders without results"; + case OWR: return "orders with results"; + case _PRESCRIPTIONDISPENSEFILTERCODE: return "Prescription Dispense Filter Code"; + case C: return "Completely dispensed"; + case N: return "Never Dispensed"; + case R: return "Dispensed with remaining fills"; + case _QUERYPARAMETERVALUE: return "QueryParameterValue"; + case ISSFA: return "all"; + case ISSFI: return "with issues"; + case ISSFU: return "with unmanaged issues"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryParameterValueEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryParameterValueEnumFactory.java new file mode 100644 index 00000000000..5886888fca4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryParameterValueEnumFactory.java @@ -0,0 +1,118 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3QueryParameterValueEnumFactory implements EnumFactory { + + public V3QueryParameterValue fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_DispenseQueryFilterCode".equals(codeString)) + return V3QueryParameterValue._DISPENSEQUERYFILTERCODE; + if ("ALLDISP".equals(codeString)) + return V3QueryParameterValue.ALLDISP; + if ("LASTDISP".equals(codeString)) + return V3QueryParameterValue.LASTDISP; + if ("NODISP".equals(codeString)) + return V3QueryParameterValue.NODISP; + if ("_OrderFilterCode".equals(codeString)) + return V3QueryParameterValue._ORDERFILTERCODE; + if ("AO".equals(codeString)) + return V3QueryParameterValue.AO; + if ("ONR".equals(codeString)) + return V3QueryParameterValue.ONR; + if ("OWR".equals(codeString)) + return V3QueryParameterValue.OWR; + if ("_PrescriptionDispenseFilterCode".equals(codeString)) + return V3QueryParameterValue._PRESCRIPTIONDISPENSEFILTERCODE; + if ("C".equals(codeString)) + return V3QueryParameterValue.C; + if ("N".equals(codeString)) + return V3QueryParameterValue.N; + if ("R".equals(codeString)) + return V3QueryParameterValue.R; + if ("_QueryParameterValue".equals(codeString)) + return V3QueryParameterValue._QUERYPARAMETERVALUE; + if ("ISSFA".equals(codeString)) + return V3QueryParameterValue.ISSFA; + if ("ISSFI".equals(codeString)) + return V3QueryParameterValue.ISSFI; + if ("ISSFU".equals(codeString)) + return V3QueryParameterValue.ISSFU; + throw new IllegalArgumentException("Unknown V3QueryParameterValue code '"+codeString+"'"); + } + + public String toCode(V3QueryParameterValue code) { + if (code == V3QueryParameterValue._DISPENSEQUERYFILTERCODE) + return "_DispenseQueryFilterCode"; + if (code == V3QueryParameterValue.ALLDISP) + return "ALLDISP"; + if (code == V3QueryParameterValue.LASTDISP) + return "LASTDISP"; + if (code == V3QueryParameterValue.NODISP) + return "NODISP"; + if (code == V3QueryParameterValue._ORDERFILTERCODE) + return "_OrderFilterCode"; + if (code == V3QueryParameterValue.AO) + return "AO"; + if (code == V3QueryParameterValue.ONR) + return "ONR"; + if (code == V3QueryParameterValue.OWR) + return "OWR"; + if (code == V3QueryParameterValue._PRESCRIPTIONDISPENSEFILTERCODE) + return "_PrescriptionDispenseFilterCode"; + if (code == V3QueryParameterValue.C) + return "C"; + if (code == V3QueryParameterValue.N) + return "N"; + if (code == V3QueryParameterValue.R) + return "R"; + if (code == V3QueryParameterValue._QUERYPARAMETERVALUE) + return "_QueryParameterValue"; + if (code == V3QueryParameterValue.ISSFA) + return "ISSFA"; + if (code == V3QueryParameterValue.ISSFI) + return "ISSFI"; + if (code == V3QueryParameterValue.ISSFU) + return "ISSFU"; + return "?"; + } + + public String toSystem(V3QueryParameterValue code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryPriority.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryPriority.java new file mode 100644 index 00000000000..83cd0f8a799 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryPriority.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryPriority { + + /** + * Query response is deferred. + */ + D, + /** + * Query response is immediate. + */ + I, + /** + * added to help the parsers + */ + NULL; + public static V3QueryPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + throw new FHIRException("Unknown V3QueryPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case I: return "I"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryPriority"; + } + public String getDefinition() { + switch (this) { + case D: return "Query response is deferred."; + case I: return "Query response is immediate."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "Deferred"; + case I: return "Immediate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryPriorityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryPriorityEnumFactory.java new file mode 100644 index 00000000000..a3afbe1de76 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryPriorityEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3QueryPriorityEnumFactory implements EnumFactory { + + public V3QueryPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3QueryPriority.D; + if ("I".equals(codeString)) + return V3QueryPriority.I; + throw new IllegalArgumentException("Unknown V3QueryPriority code '"+codeString+"'"); + } + + public String toCode(V3QueryPriority code) { + if (code == V3QueryPriority.D) + return "D"; + if (code == V3QueryPriority.I) + return "I"; + return "?"; + } + + public String toSystem(V3QueryPriority code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryRequestLimit.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryRequestLimit.java new file mode 100644 index 00000000000..799db5a5bc6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryRequestLimit.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryRequestLimit { + + /** + * Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document. + */ + _QUERYREQUESTLIMIT, + /** + * Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document. + */ + RD, + /** + * added to help the parsers + */ + NULL; + public static V3QueryRequestLimit fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_QueryRequestLimit".equals(codeString)) + return _QUERYREQUESTLIMIT; + if ("RD".equals(codeString)) + return RD; + throw new FHIRException("Unknown V3QueryRequestLimit code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _QUERYREQUESTLIMIT: return "_QueryRequestLimit"; + case RD: return "RD"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryRequestLimit"; + } + public String getDefinition() { + switch (this) { + case _QUERYREQUESTLIMIT: return "Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document."; + case RD: return "Definition: The number of matching instances (number of focal classes). The document header class is the focal class of a document, a record would therefore be equal to a document."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _QUERYREQUESTLIMIT: return "QueryRequestLimit"; + case RD: return "record"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryRequestLimitEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryRequestLimitEnumFactory.java new file mode 100644 index 00000000000..298430842c8 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryRequestLimitEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3QueryRequestLimitEnumFactory implements EnumFactory { + + public V3QueryRequestLimit fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_QueryRequestLimit".equals(codeString)) + return V3QueryRequestLimit._QUERYREQUESTLIMIT; + if ("RD".equals(codeString)) + return V3QueryRequestLimit.RD; + throw new IllegalArgumentException("Unknown V3QueryRequestLimit code '"+codeString+"'"); + } + + public String toCode(V3QueryRequestLimit code) { + if (code == V3QueryRequestLimit._QUERYREQUESTLIMIT) + return "_QueryRequestLimit"; + if (code == V3QueryRequestLimit.RD) + return "RD"; + return "?"; + } + + public String toSystem(V3QueryRequestLimit code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryResponse.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryResponse.java new file mode 100644 index 00000000000..1d381733f66 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryResponse.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryResponse { + + /** + * Query Error. Application Error. + */ + AE, + /** + * No errors, but no data was found matching the query request specification. + */ + NF, + /** + * Query reponse data found for 1 or more result sets matching the query request specification. + */ + OK, + /** + * QueryError. Problem with input ParmetersError + */ + QE, + /** + * added to help the parsers + */ + NULL; + public static V3QueryResponse fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AE".equals(codeString)) + return AE; + if ("NF".equals(codeString)) + return NF; + if ("OK".equals(codeString)) + return OK; + if ("QE".equals(codeString)) + return QE; + throw new FHIRException("Unknown V3QueryResponse code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AE: return "AE"; + case NF: return "NF"; + case OK: return "OK"; + case QE: return "QE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryResponse"; + } + public String getDefinition() { + switch (this) { + case AE: return "Query Error. Application Error."; + case NF: return "No errors, but no data was found matching the query request specification."; + case OK: return "Query reponse data found for 1 or more result sets matching the query request specification."; + case QE: return "QueryError. Problem with input ParmetersError"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AE: return "ApplicationError"; + case NF: return "No data found"; + case OK: return "Data found"; + case QE: return "QueryParameterError"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryResponseEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryResponseEnumFactory.java new file mode 100644 index 00000000000..c959fc4ab9c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryResponseEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3QueryResponseEnumFactory implements EnumFactory { + + public V3QueryResponse fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AE".equals(codeString)) + return V3QueryResponse.AE; + if ("NF".equals(codeString)) + return V3QueryResponse.NF; + if ("OK".equals(codeString)) + return V3QueryResponse.OK; + if ("QE".equals(codeString)) + return V3QueryResponse.QE; + throw new IllegalArgumentException("Unknown V3QueryResponse code '"+codeString+"'"); + } + + public String toCode(V3QueryResponse code) { + if (code == V3QueryResponse.AE) + return "AE"; + if (code == V3QueryResponse.NF) + return "NF"; + if (code == V3QueryResponse.OK) + return "OK"; + if (code == V3QueryResponse.QE) + return "QE"; + return "?"; + } + + public String toSystem(V3QueryResponse code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryStatusCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryStatusCode.java new file mode 100644 index 00000000000..b96cb4e8063 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryStatusCode.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3QueryStatusCode { + + /** + * Query status aborted + */ + ABORTED, + /** + * Query Status delivered response + */ + DELIVEREDRESPONSE, + /** + * Query Status executing + */ + EXECUTING, + /** + * Query Status new + */ + NEW, + /** + * Query Status wait continued + */ + WAITCONTINUEDQUERYRESPONSE, + /** + * added to help the parsers + */ + NULL; + public static V3QueryStatusCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aborted".equals(codeString)) + return ABORTED; + if ("deliveredResponse".equals(codeString)) + return DELIVEREDRESPONSE; + if ("executing".equals(codeString)) + return EXECUTING; + if ("new".equals(codeString)) + return NEW; + if ("waitContinuedQueryResponse".equals(codeString)) + return WAITCONTINUEDQUERYRESPONSE; + throw new FHIRException("Unknown V3QueryStatusCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ABORTED: return "aborted"; + case DELIVEREDRESPONSE: return "deliveredResponse"; + case EXECUTING: return "executing"; + case NEW: return "new"; + case WAITCONTINUEDQUERYRESPONSE: return "waitContinuedQueryResponse"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/QueryStatusCode"; + } + public String getDefinition() { + switch (this) { + case ABORTED: return "Query status aborted"; + case DELIVEREDRESPONSE: return "Query Status delivered response"; + case EXECUTING: return "Query Status executing"; + case NEW: return "Query Status new"; + case WAITCONTINUEDQUERYRESPONSE: return "Query Status wait continued"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ABORTED: return "aborted"; + case DELIVEREDRESPONSE: return "deliveredResponse"; + case EXECUTING: return "executing"; + case NEW: return "new"; + case WAITCONTINUEDQUERYRESPONSE: return "waitContinuedQueryResponse"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryStatusCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryStatusCodeEnumFactory.java new file mode 100644 index 00000000000..81d181fd026 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3QueryStatusCodeEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3QueryStatusCodeEnumFactory implements EnumFactory { + + public V3QueryStatusCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("aborted".equals(codeString)) + return V3QueryStatusCode.ABORTED; + if ("deliveredResponse".equals(codeString)) + return V3QueryStatusCode.DELIVEREDRESPONSE; + if ("executing".equals(codeString)) + return V3QueryStatusCode.EXECUTING; + if ("new".equals(codeString)) + return V3QueryStatusCode.NEW; + if ("waitContinuedQueryResponse".equals(codeString)) + return V3QueryStatusCode.WAITCONTINUEDQUERYRESPONSE; + throw new IllegalArgumentException("Unknown V3QueryStatusCode code '"+codeString+"'"); + } + + public String toCode(V3QueryStatusCode code) { + if (code == V3QueryStatusCode.ABORTED) + return "aborted"; + if (code == V3QueryStatusCode.DELIVEREDRESPONSE) + return "deliveredResponse"; + if (code == V3QueryStatusCode.EXECUTING) + return "executing"; + if (code == V3QueryStatusCode.NEW) + return "new"; + if (code == V3QueryStatusCode.WAITCONTINUEDQUERYRESPONSE) + return "waitContinuedQueryResponse"; + return "?"; + } + + public String toSystem(V3QueryStatusCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Race.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Race.java new file mode 100644 index 00000000000..cb7a4eb92fe --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Race.java @@ -0,0 +1,8358 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Race { + + /** + * American Indian or Alaska Native + */ + _10025, + /** + * American Indian + */ + _10041, + /** + * Abenaki + */ + _10066, + /** + * Algonquian + */ + _10082, + /** + * Apache + */ + _10108, + /** + * Chiricahua + */ + _10116, + /** + * Fort Sill Apache + */ + _10124, + /** + * Jicarilla Apache + */ + _10132, + /** + * Lipan Apache + */ + _10140, + /** + * Mescalero Apache + */ + _10157, + /** + * Oklahoma Apache + */ + _10165, + /** + * Payson Apache + */ + _10173, + /** + * San Carlos Apache + */ + _10181, + /** + * White Mountain Apache + */ + _10199, + /** + * Arapaho + */ + _10215, + /** + * Northern Arapaho + */ + _10223, + /** + * Southern Arapaho + */ + _10231, + /** + * Wind River Arapaho + */ + _10249, + /** + * Arikara + */ + _10264, + /** + * Assiniboine + */ + _10280, + /** + * Assiniboine Sioux + */ + _10306, + /** + * Fort Peck Assiniboine Sioux + */ + _10314, + /** + * Bannock + */ + _10330, + /** + * Blackfeet + */ + _10355, + /** + * Brotherton + */ + _10371, + /** + * Burt Lake Band + */ + _10397, + /** + * Caddo + */ + _10413, + /** + * Oklahoma Cado + */ + _10421, + /** + * Cahuilla + */ + _10447, + /** + * Agua Caliente Cahuilla + */ + _10454, + /** + * Augustine + */ + _10462, + /** + * Cabazon + */ + _10470, + /** + * Los Coyotes + */ + _10488, + /** + * Morongo + */ + _10496, + /** + * Santa Rosa Cahuilla + */ + _10504, + /** + * Torres-Martinez + */ + _10512, + /** + * California Tribes + */ + _10538, + /** + * Cahto + */ + _10546, + /** + * Chimariko + */ + _10553, + /** + * Coast Miwok + */ + _10561, + /** + * Digger + */ + _10579, + /** + * Kawaiisu + */ + _10587, + /** + * Kern River + */ + _10595, + /** + * Mattole + */ + _10603, + /** + * Red Wood + */ + _10611, + /** + * Santa Rosa + */ + _10629, + /** + * Takelma + */ + _10637, + /** + * Wappo + */ + _10645, + /** + * Yana + */ + _10652, + /** + * Yuki + */ + _10660, + /** + * Canadian and Latin American Indian + */ + _10686, + /** + * Canadian Indian + */ + _10694, + /** + * Central American Indian + */ + _10702, + /** + * French American Indian + */ + _10710, + /** + * Mexican American Indian + */ + _10728, + /** + * South American Indian + */ + _10736, + /** + * Spanish American Indian + */ + _10744, + /** + * Catawba + */ + _10769, + /** + * Alatna + */ + _17418, + /** + * Alexander + */ + _17426, + /** + * Allakaket + */ + _17434, + /** + * Alanvik + */ + _17442, + /** + * Anvik + */ + _17459, + /** + * Arctic + */ + _17467, + /** + * Beaver + */ + _17475, + /** + * Birch Creek + */ + _17483, + /** + * Cantwell + */ + _17491, + /** + * Chalkyitsik + */ + _17509, + /** + * Chickaloon + */ + _17517, + /** + * Chistochina + */ + _17525, + /** + * Chitina + */ + _17533, + /** + * Circle + */ + _17541, + /** + * Cook Inlet + */ + _17558, + /** + * Copper Center + */ + _17566, + /** + * Copper River + */ + _17574, + /** + * Dot Lake + */ + _17582, + /** + * Doyon + */ + _17590, + /** + * Eagle + */ + _17608, + /** + * Eklutna + */ + _17616, + /** + * Evansville + */ + _17624, + /** + * Fort Yukon + */ + _17632, + /** + * Gakona + */ + _17640, + /** + * Galena + */ + _17657, + /** + * Grayling + */ + _17665, + /** + * Gulkana + */ + _17673, + /** + * Healy Lake + */ + _17681, + /** + * Holy Cross + */ + _17699, + /** + * Hughes + */ + _17707, + /** + * Huslia + */ + _17715, + /** + * Iliamna + */ + _17723, + /** + * Kaltag + */ + _17731, + /** + * Kluti Kaah + */ + _17749, + /** + * Knik + */ + _17756, + /** + * Koyukuk + */ + _17764, + /** + * Lake Minchumina + */ + _17772, + /** + * Lime + */ + _17780, + /** + * Mcgrath + */ + _17798, + /** + * Manley Hot Springs + */ + _17806, + /** + * Mentasta Lake + */ + _17814, + /** + * Minto + */ + _17822, + /** + * Nenana + */ + _17830, + /** + * Nikolai + */ + _17848, + /** + * Ninilchik + */ + _17855, + /** + * Nondalton + */ + _17863, + /** + * Northway + */ + _17871, + /** + * Nulato + */ + _17889, + /** + * Pedro Bay + */ + _17897, + /** + * Rampart + */ + _17905, + /** + * Ruby + */ + _17913, + /** + * Salamatof + */ + _17921, + /** + * Seldovia + */ + _17939, + /** + * Slana + */ + _17947, + /** + * Shageluk + */ + _17954, + /** + * Stevens + */ + _17962, + /** + * Stony River + */ + _17970, + /** + * Takotna + */ + _17988, + /** + * Tanacross + */ + _17996, + /** + * Tanaina + */ + _18002, + /** + * Tanana + */ + _18010, + /** + * Tanana Chiefs + */ + _18028, + /** + * Tazlina + */ + _18036, + /** + * Telida + */ + _18044, + /** + * Tetlin + */ + _18051, + /** + * Tok + */ + _18069, + /** + * Tyonek + */ + _18077, + /** + * Venetie + */ + _18085, + /** + * Wiseman + */ + _18093, + /** + * Cayuse + */ + _10785, + /** + * Chehalis + */ + _10801, + /** + * Chemakuan + */ + _10827, + /** + * Hoh + */ + _10835, + /** + * Quileute + */ + _10843, + /** + * Chemehuevi + */ + _10868, + /** + * Cherokee + */ + _10884, + /** + * Cherokee Alabama + */ + _10892, + /** + * Cherokees of Northeast Alabama + */ + _10900, + /** + * Cherokees of Southeast Alabama + */ + _10918, + /** + * Eastern Cherokee + */ + _10926, + /** + * Echota Cherokee + */ + _10934, + /** + * Etowah Cherokee + */ + _10942, + /** + * Northern Cherokee + */ + _10959, + /** + * Tuscola + */ + _10967, + /** + * United Keetowah Band of Cherokee + */ + _10975, + /** + * Western Cherokee + */ + _10983, + /** + * Cherokee Shawnee + */ + _11007, + /** + * Cheyenne + */ + _11023, + /** + * Northern Cheyenne + */ + _11031, + /** + * Southern Cheyenne + */ + _11049, + /** + * Cheyenne-Arapaho + */ + _11064, + /** + * Chickahominy + */ + _11080, + /** + * Eastern Chickahominy + */ + _11098, + /** + * Western Chickahominy + */ + _11106, + /** + * Chickasaw + */ + _11122, + /** + * Chinook + */ + _11148, + /** + * Clatsop + */ + _11155, + /** + * Columbia River Chinook + */ + _11163, + /** + * Kathlamet + */ + _11171, + /** + * Upper Chinook + */ + _11189, + /** + * Wakiakum Chinook + */ + _11197, + /** + * Willapa Chinook + */ + _11205, + /** + * Wishram + */ + _11213, + /** + * Chippewa + */ + _11239, + /** + * Bad River + */ + _11247, + /** + * Bay Mills Chippewa + */ + _11254, + /** + * Bois Forte + */ + _11262, + /** + * Burt Lake Chippewa + */ + _11270, + /** + * Fond du Lac + */ + _11288, + /** + * Grand Portage + */ + _11296, + /** + * Grand Traverse Band of Ottawa-Chippewa + */ + _11304, + /** + * Keweenaw + */ + _11312, + /** + * Lac Courte Oreilles + */ + _11320, + /** + * Lac du Flambeau + */ + _11338, + /** + * Lac Vieux Desert Chippewa + */ + _11346, + /** + * Lake Superior + */ + _11353, + /** + * Leech Lake + */ + _11361, + /** + * Little Shell Chippewa + */ + _11379, + /** + * Mille Lacs + */ + _11387, + /** + * Minnesota Chippewa + */ + _11395, + /** + * Ontonagon + */ + _11403, + /** + * Red Cliff Chippewa + */ + _11411, + /** + * Red Lake Chippewa + */ + _11429, + /** + * Saginaw Chippewa + */ + _11437, + /** + * St. Croix Chippewa + */ + _11445, + /** + * Sault Ste. Marie Chippewa + */ + _11452, + /** + * Sokoagon Chippewa + */ + _11460, + /** + * Turtle Mountain + */ + _11478, + /** + * White Earth + */ + _11486, + /** + * Chippewa Cree + */ + _11502, + /** + * Rocky Boy's Chippewa Cree + */ + _11510, + /** + * Chitimacha + */ + _11536, + /** + * Choctaw + */ + _11551, + /** + * Clifton Choctaw + */ + _11569, + /** + * Jena Choctaw + */ + _11577, + /** + * Mississippi Choctaw + */ + _11585, + /** + * Mowa Band of Choctaw + */ + _11593, + /** + * Oklahoma Choctaw + */ + _11601, + /** + * Chumash + */ + _11627, + /** + * Santa Ynez + */ + _11635, + /** + * Clear Lake + */ + _11650, + /** + * Coeur D'Alene + */ + _11676, + /** + * Coharie + */ + _11692, + /** + * Colorado River + */ + _11718, + /** + * Colville + */ + _11734, + /** + * Comanche + */ + _11759, + /** + * Oklahoma Comanche + */ + _11767, + /** + * Coos, Lower Umpqua, Siuslaw + */ + _11783, + /** + * Coos + */ + _11809, + /** + * Coquilles + */ + _11825, + /** + * Costanoan + */ + _11841, + /** + * Coushatta + */ + _11866, + /** + * Alabama Coushatta + */ + _11874, + /** + * Cowlitz + */ + _11890, + /** + * Cree + */ + _11916, + /** + * Creek + */ + _11932, + /** + * Alabama Creek + */ + _11940, + /** + * Alabama Quassarte + */ + _11957, + /** + * Eastern Creek + */ + _11965, + /** + * Eastern Muscogee + */ + _11973, + /** + * Kialegee + */ + _11981, + /** + * Lower Muscogee + */ + _11999, + /** + * Machis Lower Creek Indian + */ + _12005, + /** + * Poarch Band + */ + _12013, + /** + * Principal Creek Indian Nation + */ + _12021, + /** + * Star Clan of Muscogee Creeks + */ + _12039, + /** + * Thlopthlocco + */ + _12047, + /** + * Tuckabachee + */ + _12054, + /** + * Croatan + */ + _12070, + /** + * Crow + */ + _12096, + /** + * Cupeno + */ + _12112, + /** + * Agua Caliente + */ + _12120, + /** + * Delaware + */ + _12146, + /** + * Eastern Delaware + */ + _12153, + /** + * Lenni-Lenape + */ + _12161, + /** + * Munsee + */ + _12179, + /** + * Oklahoma Delaware + */ + _12187, + /** + * Rampough Mountain + */ + _12195, + /** + * Sand Hill + */ + _12203, + /** + * Diegueno + */ + _12229, + /** + * Campo + */ + _12237, + /** + * Capitan Grande + */ + _12245, + /** + * Cuyapaipe + */ + _12252, + /** + * La Posta + */ + _12260, + /** + * Manzanita + */ + _12278, + /** + * Mesa Grande + */ + _12286, + /** + * San Pasqual + */ + _12294, + /** + * Santa Ysabel + */ + _12302, + /** + * Sycuan + */ + _12310, + /** + * Eastern Tribes + */ + _12336, + /** + * Attacapa + */ + _12344, + /** + * Biloxi + */ + _12351, + /** + * Georgetown + */ + _12369, + /** + * Moor + */ + _12377, + /** + * Nansemond + */ + _12385, + /** + * Natchez + */ + _12393, + /** + * Nausu Waiwash + */ + _12401, + /** + * Nipmuc + */ + _12419, + /** + * Paugussett + */ + _12427, + /** + * Pocomoke Acohonock + */ + _12435, + /** + * Southeastern Indians + */ + _12443, + /** + * Susquehanock + */ + _12450, + /** + * Tunica Biloxi + */ + _12468, + /** + * Waccamaw-Siousan + */ + _12476, + /** + * Wicomico + */ + _12484, + /** + * Esselen + */ + _12500, + /** + * Fort Belknap + */ + _12526, + /** + * Fort Berthold + */ + _12542, + /** + * Fort Mcdowell + */ + _12567, + /** + * Fort Hall + */ + _12583, + /** + * Gabrieleno + */ + _12609, + /** + * Grand Ronde + */ + _12625, + /** + * Gros Ventres + */ + _12641, + /** + * Atsina + */ + _12658, + /** + * Haliwa + */ + _12674, + /** + * Hidatsa + */ + _12690, + /** + * Hoopa + */ + _12716, + /** + * Trinity + */ + _12724, + /** + * Whilkut + */ + _12732, + /** + * Hoopa Extension + */ + _12757, + /** + * Houma + */ + _12773, + /** + * Inaja-Cosmit + */ + _12799, + /** + * Iowa + */ + _12815, + /** + * Iowa of Kansas-Nebraska + */ + _12823, + /** + * Iowa of Oklahoma + */ + _12831, + /** + * Iroquois + */ + _12856, + /** + * Cayuga + */ + _12864, + /** + * Mohawk + */ + _12872, + /** + * Oneida + */ + _12880, + /** + * Onondaga + */ + _12898, + /** + * Seneca + */ + _12906, + /** + * Seneca Nation + */ + _12914, + /** + * Seneca-Cayuga + */ + _12922, + /** + * Tonawanda Seneca + */ + _12930, + /** + * Tuscarora + */ + _12948, + /** + * Wyandotte + */ + _12955, + /** + * Juaneno + */ + _12971, + /** + * Kalispel + */ + _12997, + /** + * Karuk + */ + _13011, + /** + * Kaw + */ + _13037, + /** + * Kickapoo + */ + _13052, + /** + * Oklahoma Kickapoo + */ + _13060, + /** + * Texas Kickapoo + */ + _13078, + /** + * Kiowa + */ + _13094, + /** + * Oklahoma Kiowa + */ + _13102, + /** + * Klallam + */ + _13128, + /** + * Jamestown + */ + _13136, + /** + * Lower Elwha + */ + _13144, + /** + * Port Gamble Klallam + */ + _13151, + /** + * Klamath + */ + _13177, + /** + * Konkow + */ + _13193, + /** + * Kootenai + */ + _13219, + /** + * Lassik + */ + _13235, + /** + * Long Island + */ + _13250, + /** + * Matinecock + */ + _13268, + /** + * Montauk + */ + _13276, + /** + * Poospatuck + */ + _13284, + /** + * Setauket + */ + _13292, + /** + * Luiseno + */ + _13318, + /** + * La Jolla + */ + _13326, + /** + * Pala + */ + _13334, + /** + * Pauma + */ + _13342, + /** + * Pechanga + */ + _13359, + /** + * Soboba + */ + _13367, + /** + * Twenty-Nine Palms + */ + _13375, + /** + * Temecula + */ + _13383, + /** + * Lumbee + */ + _13409, + /** + * Lummi + */ + _13425, + /** + * Maidu + */ + _13441, + /** + * Mountain Maidu + */ + _13458, + /** + * Nishinam + */ + _13466, + /** + * Makah + */ + _13482, + /** + * Maliseet + */ + _13508, + /** + * Mandan + */ + _13524, + /** + * Mattaponi + */ + _13540, + /** + * Menominee + */ + _13565, + /** + * Miami + */ + _13581, + /** + * Illinois Miami + */ + _13599, + /** + * Indiana Miami + */ + _13607, + /** + * Oklahoma Miami + */ + _13615, + /** + * Miccosukee + */ + _13631, + /** + * Micmac + */ + _13656, + /** + * Aroostook + */ + _13664, + /** + * Mission Indians + */ + _13680, + /** + * Miwok + */ + _13706, + /** + * Modoc + */ + _13722, + /** + * Mohegan + */ + _13748, + /** + * Mono + */ + _13763, + /** + * Nanticoke + */ + _13789, + /** + * Narragansett + */ + _13805, + /** + * Navajo + */ + _13821, + /** + * Alamo Navajo + */ + _13839, + /** + * Canoncito Navajo + */ + _13847, + /** + * Ramah Navajo + */ + _13854, + /** + * Nez Perce + */ + _13870, + /** + * Nomalaki + */ + _13896, + /** + * Northwest Tribes + */ + _13912, + /** + * Alsea + */ + _13920, + /** + * Celilo + */ + _13938, + /** + * Columbia + */ + _13946, + /** + * Kalapuya + */ + _13953, + /** + * Molala + */ + _13961, + /** + * Talakamish + */ + _13979, + /** + * Tenino + */ + _13987, + /** + * Tillamook + */ + _13995, + /** + * Wenatchee + */ + _14001, + /** + * Yahooskin + */ + _14019, + /** + * Omaha + */ + _14035, + /** + * Oregon Athabaskan + */ + _14050, + /** + * Osage + */ + _14076, + /** + * Otoe-Missouria + */ + _14092, + /** + * Ottawa + */ + _14118, + /** + * Burt Lake Ottawa + */ + _14126, + /** + * Michigan Ottawa + */ + _14134, + /** + * Oklahoma Ottawa + */ + _14142, + /** + * Paiute + */ + _14167, + /** + * Bishop + */ + _14175, + /** + * Bridgeport + */ + _14183, + /** + * Burns Paiute + */ + _14191, + /** + * Cedarville + */ + _14209, + /** + * Fort Bidwell + */ + _14217, + /** + * Fort Independence + */ + _14225, + /** + * Kaibab + */ + _14233, + /** + * Las Vegas + */ + _14241, + /** + * Lone Pine + */ + _14258, + /** + * Lovelock + */ + _14266, + /** + * Malheur Paiute + */ + _14274, + /** + * Moapa + */ + _14282, + /** + * Northern Paiute + */ + _14290, + /** + * Owens Valley + */ + _14308, + /** + * Pyramid Lake + */ + _14316, + /** + * San Juan Southern Paiute + */ + _14324, + /** + * Southern Paiute + */ + _14332, + /** + * Summit Lake + */ + _14340, + /** + * Utu Utu Gwaitu Paiute + */ + _14357, + /** + * Walker River + */ + _14365, + /** + * Yerington Paiute + */ + _14373, + /** + * Pamunkey + */ + _14399, + /** + * Passamaquoddy + */ + _14415, + /** + * Indian Township + */ + _14423, + /** + * Pleasant Point Passamaquoddy + */ + _14431, + /** + * Pawnee + */ + _14456, + /** + * Oklahoma Pawnee + */ + _14464, + /** + * Penobscot + */ + _14480, + /** + * Peoria + */ + _14506, + /** + * Oklahoma Peoria + */ + _14514, + /** + * Pequot + */ + _14530, + /** + * Marshantucket Pequot + */ + _14548, + /** + * Pima + */ + _14563, + /** + * Gila River Pima-Maricopa + */ + _14571, + /** + * Salt River Pima-Maricopa + */ + _14589, + /** + * Piscataway + */ + _14605, + /** + * Pit River + */ + _14621, + /** + * Pomo + */ + _14647, + /** + * Central Pomo + */ + _14654, + /** + * Dry Creek + */ + _14662, + /** + * Eastern Pomo + */ + _14670, + /** + * Kashia + */ + _14688, + /** + * Northern Pomo + */ + _14696, + /** + * Scotts Valley + */ + _14704, + /** + * Stonyford + */ + _14712, + /** + * Sulphur Bank + */ + _14720, + /** + * Ponca + */ + _14746, + /** + * Nebraska Ponca + */ + _14753, + /** + * Oklahoma Ponca + */ + _14761, + /** + * Potawatomi + */ + _14787, + /** + * Citizen Band Potawatomi + */ + _14795, + /** + * Forest County + */ + _14803, + /** + * Hannahville + */ + _14811, + /** + * Huron Potawatomi + */ + _14829, + /** + * Pokagon Potawatomi + */ + _14837, + /** + * Prairie Band + */ + _14845, + /** + * Wisconsin Potawatomi + */ + _14852, + /** + * Powhatan + */ + _14878, + /** + * Pueblo + */ + _14894, + /** + * Acoma + */ + _14902, + /** + * Arizona Tewa + */ + _14910, + /** + * Cochiti + */ + _14928, + /** + * Hopi + */ + _14936, + /** + * Isleta + */ + _14944, + /** + * Jemez + */ + _14951, + /** + * Keres + */ + _14969, + /** + * Laguna + */ + _14977, + /** + * Nambe + */ + _14985, + /** + * Picuris + */ + _14993, + /** + * Piro + */ + _15008, + /** + * Pojoaque + */ + _15016, + /** + * San Felipe + */ + _15024, + /** + * San Ildefonso + */ + _15032, + /** + * San Juan Pueblo + */ + _15040, + /** + * San Juan De + */ + _15057, + /** + * San Juan + */ + _15065, + /** + * Sandia + */ + _15073, + /** + * Santa Ana + */ + _15081, + /** + * Santa Clara + */ + _15099, + /** + * Santo Domingo + */ + _15107, + /** + * Taos + */ + _15115, + /** + * Tesuque + */ + _15123, + /** + * Tewa + */ + _15131, + /** + * Tigua + */ + _15149, + /** + * Zia + */ + _15156, + /** + * Zuni + */ + _15164, + /** + * Puget Sound Salish + */ + _15180, + /** + * Duwamish + */ + _15198, + /** + * Kikiallus + */ + _15206, + /** + * Lower Skagit + */ + _15214, + /** + * Muckleshoot + */ + _15222, + /** + * Nisqually + */ + _15230, + /** + * Nooksack + */ + _15248, + /** + * Port Madison + */ + _15255, + /** + * Puyallup + */ + _15263, + /** + * Samish + */ + _15271, + /** + * Sauk-Suiattle + */ + _15289, + /** + * Skokomish + */ + _15297, + /** + * Skykomish + */ + _15305, + /** + * Snohomish + */ + _15313, + /** + * Snoqualmie + */ + _15321, + /** + * Squaxin Island + */ + _15339, + /** + * Steilacoom + */ + _15347, + /** + * Stillaguamish + */ + _15354, + /** + * Suquamish + */ + _15362, + /** + * Swinomish + */ + _15370, + /** + * Tulalip + */ + _15388, + /** + * Upper Skagit + */ + _15396, + /** + * Quapaw + */ + _15412, + /** + * Quinault + */ + _15438, + /** + * Rappahannock + */ + _15453, + /** + * Reno-Sparks + */ + _15479, + /** + * Round Valley + */ + _15495, + /** + * Sac and Fox + */ + _15511, + /** + * Iowa Sac and Fox + */ + _15529, + /** + * Missouri Sac and Fox + */ + _15537, + /** + * Oklahoma Sac and Fox + */ + _15545, + /** + * Salinan + */ + _15560, + /** + * Salish + */ + _15586, + /** + * Salish and Kootenai + */ + _15602, + /** + * Schaghticoke + */ + _15628, + /** + * Scott Valley + */ + _15644, + /** + * Seminole + */ + _15669, + /** + * Big Cypress + */ + _15677, + /** + * Brighton + */ + _15685, + /** + * Florida Seminole + */ + _15693, + /** + * Hollywood Seminole + */ + _15701, + /** + * Oklahoma Seminole + */ + _15719, + /** + * Serrano + */ + _15735, + /** + * San Manual + */ + _15743, + /** + * Shasta + */ + _15768, + /** + * Shawnee + */ + _15784, + /** + * Absentee Shawnee + */ + _15792, + /** + * Eastern Shawnee + */ + _15800, + /** + * Shinnecock + */ + _15826, + /** + * Shoalwater Bay + */ + _15842, + /** + * Shoshone + */ + _15867, + /** + * Battle Mountain + */ + _15875, + /** + * Duckwater + */ + _15883, + /** + * Elko + */ + _15891, + /** + * Ely + */ + _15909, + /** + * Goshute + */ + _15917, + /** + * Panamint + */ + _15925, + /** + * Ruby Valley + */ + _15933, + /** + * Skull Valley + */ + _15941, + /** + * South Fork Shoshone + */ + _15958, + /** + * Te-Moak Western Shoshone + */ + _15966, + /** + * Timbi-Sha Shoshone + */ + _15974, + /** + * Washakie + */ + _15982, + /** + * Wind River Shoshone + */ + _15990, + /** + * Yomba + */ + _16006, + /** + * Shoshone Paiute + */ + _16022, + /** + * Duck Valley + */ + _16030, + /** + * Fallon + */ + _16048, + /** + * Fort McDermitt + */ + _16055, + /** + * Siletz + */ + _16071, + /** + * Sioux + */ + _16097, + /** + * Blackfoot Sioux + */ + _16105, + /** + * Brule Sioux + */ + _16113, + /** + * Cheyenne River Sioux + */ + _16121, + /** + * Crow Creek Sioux + */ + _16139, + /** + * Dakota Sioux + */ + _16147, + /** + * Flandreau Santee + */ + _16154, + /** + * Fort Peck + */ + _16162, + /** + * Lake Traverse Sioux + */ + _16170, + /** + * Lower Brule Sioux + */ + _16188, + /** + * Lower Sioux + */ + _16196, + /** + * Mdewakanton Sioux + */ + _16204, + /** + * Miniconjou + */ + _16212, + /** + * Oglala Sioux + */ + _16220, + /** + * Pine Ridge Sioux + */ + _16238, + /** + * Pipestone Sioux + */ + _16246, + /** + * Prairie Island Sioux + */ + _16253, + /** + * Prior Lake Sioux + */ + _16261, + /** + * Rosebud Sioux + */ + _16279, + /** + * Sans Arc Sioux + */ + _16287, + /** + * Santee Sioux + */ + _16295, + /** + * Sisseton-Wahpeton + */ + _16303, + /** + * Sisseton Sioux + */ + _16311, + /** + * Spirit Lake Sioux + */ + _16329, + /** + * Standing Rock Sioux + */ + _16337, + /** + * Teton Sioux + */ + _16345, + /** + * Two Kettle Sioux + */ + _16352, + /** + * Upper Sioux + */ + _16360, + /** + * Wahpekute Sioux + */ + _16378, + /** + * Wahpeton Sioux + */ + _16386, + /** + * Wazhaza Sioux + */ + _16394, + /** + * Yankton Sioux + */ + _16402, + /** + * Yanktonai Sioux + */ + _16410, + /** + * Siuslaw + */ + _16436, + /** + * Spokane + */ + _16451, + /** + * Stewart + */ + _16477, + /** + * Stockbridge + */ + _16493, + /** + * Susanville + */ + _16519, + /** + * Tohono O'Odham + */ + _16535, + /** + * Ak-Chin + */ + _16543, + /** + * Gila Bend + */ + _16550, + /** + * San Xavier + */ + _16568, + /** + * Sells + */ + _16576, + /** + * Tolowa + */ + _16592, + /** + * Tonkawa + */ + _16618, + /** + * Tygh + */ + _16634, + /** + * Umatilla + */ + _16659, + /** + * Umpqua + */ + _16675, + /** + * Cow Creek Umpqua + */ + _16683, + /** + * Ute + */ + _16709, + /** + * Allen Canyon + */ + _16717, + /** + * Uintah Ute + */ + _16725, + /** + * Ute Mountain Ute + */ + _16733, + /** + * Wailaki + */ + _16758, + /** + * Walla-Walla + */ + _16774, + /** + * Wampanoag + */ + _16790, + /** + * Gay Head Wampanoag + */ + _16808, + /** + * Mashpee Wampanoag + */ + _16816, + /** + * Warm Springs + */ + _16832, + /** + * Wascopum + */ + _16857, + /** + * Washoe + */ + _16873, + /** + * Alpine + */ + _16881, + /** + * Carson + */ + _16899, + /** + * Dresslerville + */ + _16907, + /** + * Wichita + */ + _16923, + /** + * Wind River + */ + _16949, + /** + * Winnebago + */ + _16964, + /** + * Ho-chunk + */ + _16972, + /** + * Nebraska Winnebago + */ + _16980, + /** + * Winnemucca + */ + _17004, + /** + * Wintun + */ + _17020, + /** + * Wiyot + */ + _17046, + /** + * Table Bluff + */ + _17053, + /** + * Yakama + */ + _17079, + /** + * Yakama Cowlitz + */ + _17095, + /** + * Yaqui + */ + _17111, + /** + * Barrio Libre + */ + _17129, + /** + * Pascua Yaqui + */ + _17137, + /** + * Yavapai Apache + */ + _17152, + /** + * Yokuts + */ + _17178, + /** + * Chukchansi + */ + _17186, + /** + * Tachi + */ + _17194, + /** + * Tule River + */ + _17202, + /** + * Yuchi + */ + _17228, + /** + * Yuman + */ + _17244, + /** + * Cocopah + */ + _17251, + /** + * Havasupai + */ + _17269, + /** + * Hualapai + */ + _17277, + /** + * Maricopa + */ + _17285, + /** + * Mohave + */ + _17293, + /** + * Quechan + */ + _17301, + /** + * Yavapai + */ + _17319, + /** + * Yurok + */ + _17327, + /** + * Coast Yurok + */ + _17335, + /** + * Alaska Native + */ + _17350, + /** + * Alaska Indian + */ + _17376, + /** + * Alaskan Athabascan + */ + _17392, + /** + * Ahtna + */ + _17400, + /** + * Southeast Alaska + */ + _18119, + /** + * Tlingit-Haida + */ + _18135, + /** + * Angoon + */ + _18143, + /** + * Central Council of Tlingit and Haida Tribes + */ + _18150, + /** + * Chilkat + */ + _18168, + /** + * Chilkoot + */ + _18176, + /** + * Craig + */ + _18184, + /** + * Douglas + */ + _18192, + /** + * Haida + */ + _18200, + /** + * Hoonah + */ + _18218, + /** + * Hydaburg + */ + _18226, + /** + * Kake + */ + _18234, + /** + * Kasaan + */ + _18242, + /** + * Kenaitze + */ + _18259, + /** + * Ketchikan + */ + _18267, + /** + * Klawock + */ + _18275, + /** + * Pelican + */ + _18283, + /** + * Petersburg + */ + _18291, + /** + * Saxman + */ + _18309, + /** + * Sitka + */ + _18317, + /** + * Tenakee Springs + */ + _18325, + /** + * Tlingit + */ + _18333, + /** + * Wrangell + */ + _18341, + /** + * Yakutat + */ + _18358, + /** + * Tsimshian + */ + _18374, + /** + * Metlakatla + */ + _18382, + /** + * Eskimo + */ + _18408, + /** + * Greenland Eskimo + */ + _18424, + /** + * Inupiat Eskimo + */ + _18440, + /** + * Ambler + */ + _18457, + /** + * Anaktuvuk + */ + _18465, + /** + * Anaktuvuk Pass + */ + _18473, + /** + * Arctic Slope Inupiat + */ + _18481, + /** + * Arctic Slope Corporation + */ + _18499, + /** + * Atqasuk + */ + _18507, + /** + * Barrow + */ + _18515, + /** + * Bering Straits Inupiat + */ + _18523, + /** + * Brevig Mission + */ + _18531, + /** + * Buckland + */ + _18549, + /** + * Chinik + */ + _18556, + /** + * Council + */ + _18564, + /** + * Deering + */ + _18572, + /** + * Elim + */ + _18580, + /** + * Golovin + */ + _18598, + /** + * Inalik Diomede + */ + _18606, + /** + * Inupiaq + */ + _18614, + /** + * Kaktovik + */ + _18622, + /** + * Kawerak + */ + _18630, + /** + * Kiana + */ + _18648, + /** + * Kivalina + */ + _18655, + /** + * Kobuk + */ + _18663, + /** + * Kotzebue + */ + _18671, + /** + * Koyuk + */ + _18689, + /** + * Kwiguk + */ + _18697, + /** + * Mauneluk Inupiat + */ + _18705, + /** + * Nana Inupiat + */ + _18713, + /** + * Noatak + */ + _18721, + /** + * Nome + */ + _18739, + /** + * Noorvik + */ + _18747, + /** + * Nuiqsut + */ + _18754, + /** + * Point Hope + */ + _18762, + /** + * Point Lay + */ + _18770, + /** + * Selawik + */ + _18788, + /** + * Shaktoolik + */ + _18796, + /** + * Shishmaref + */ + _18804, + /** + * Shungnak + */ + _18812, + /** + * Solomon + */ + _18820, + /** + * Teller + */ + _18838, + /** + * Unalakleet + */ + _18846, + /** + * Wainwright + */ + _18853, + /** + * Wales + */ + _18861, + /** + * White Mountain + */ + _18879, + /** + * White Mountain Inupiat + */ + _18887, + /** + * Mary's Igloo + */ + _18895, + /** + * Siberian Eskimo + */ + _18911, + /** + * Gambell + */ + _18929, + /** + * Savoonga + */ + _18937, + /** + * Siberian Yupik + */ + _18945, + /** + * Yupik Eskimo + */ + _18960, + /** + * Akiachak + */ + _18978, + /** + * Akiak + */ + _18986, + /** + * Alakanuk + */ + _18994, + /** + * Aleknagik + */ + _19000, + /** + * Andreafsky + */ + _19018, + /** + * Aniak + */ + _19026, + /** + * Atmautluak + */ + _19034, + /** + * Bethel + */ + _19042, + /** + * Bill Moore's Slough + */ + _19059, + /** + * Bristol Bay Yupik + */ + _19067, + /** + * Calista Yupik + */ + _19075, + /** + * Chefornak + */ + _19083, + /** + * Chevak + */ + _19091, + /** + * Chuathbaluk + */ + _19109, + /** + * Clark's Point + */ + _19117, + /** + * Crooked Creek + */ + _19125, + /** + * Dillingham + */ + _19133, + /** + * Eek + */ + _19141, + /** + * Ekuk + */ + _19158, + /** + * Ekwok + */ + _19166, + /** + * Emmonak + */ + _19174, + /** + * Goodnews Bay + */ + _19182, + /** + * Hooper Bay + */ + _19190, + /** + * Iqurmuit (Russian Mission) + */ + _19208, + /** + * Kalskag + */ + _19216, + /** + * Kasigluk + */ + _19224, + /** + * Kipnuk + */ + _19232, + /** + * Koliganek + */ + _19240, + /** + * Kongiganak + */ + _19257, + /** + * Kotlik + */ + _19265, + /** + * Kwethluk + */ + _19273, + /** + * Kwigillingok + */ + _19281, + /** + * Levelock + */ + _19299, + /** + * Lower Kalskag + */ + _19307, + /** + * Manokotak + */ + _19315, + /** + * Marshall + */ + _19323, + /** + * Mekoryuk + */ + _19331, + /** + * Mountain Village + */ + _19349, + /** + * Naknek + */ + _19356, + /** + * Napaumute + */ + _19364, + /** + * Napakiak + */ + _19372, + /** + * Napaskiak + */ + _19380, + /** + * Newhalen + */ + _19398, + /** + * New Stuyahok + */ + _19406, + /** + * Newtok + */ + _19414, + /** + * Nightmute + */ + _19422, + /** + * Nunapitchukv + */ + _19430, + /** + * Oscarville + */ + _19448, + /** + * Pilot Station + */ + _19455, + /** + * Pitkas Point + */ + _19463, + /** + * Platinum + */ + _19471, + /** + * Portage Creek + */ + _19489, + /** + * Quinhagak + */ + _19497, + /** + * Red Devil + */ + _19505, + /** + * St. Michael + */ + _19513, + /** + * Scammon Bay + */ + _19521, + /** + * Sheldon's Point + */ + _19539, + /** + * Sleetmute + */ + _19547, + /** + * Stebbins + */ + _19554, + /** + * Togiak + */ + _19562, + /** + * Toksook + */ + _19570, + /** + * Tulukskak + */ + _19588, + /** + * Tuntutuliak + */ + _19596, + /** + * Tununak + */ + _19604, + /** + * Twin Hills + */ + _19612, + /** + * Georgetown + */ + _19620, + /** + * St. Mary's + */ + _19638, + /** + * Umkumiate + */ + _19646, + /** + * Aleut + */ + _19661, + /** + * Alutiiq Aleut + */ + _19687, + /** + * Tatitlek + */ + _19695, + /** + * Ugashik + */ + _19703, + /** + * Bristol Bay Aleut + */ + _19729, + /** + * Chignik + */ + _19737, + /** + * Chignik Lake + */ + _19745, + /** + * Egegik + */ + _19752, + /** + * Igiugig + */ + _19760, + /** + * Ivanof Bay + */ + _19778, + /** + * King Salmon + */ + _19786, + /** + * Kokhanok + */ + _19794, + /** + * Perryville + */ + _19802, + /** + * Pilot Point + */ + _19810, + /** + * Port Heiden + */ + _19828, + /** + * Chugach Aleut + */ + _19844, + /** + * Chenega + */ + _19851, + /** + * Chugach Corporation + */ + _19869, + /** + * English Bay + */ + _19877, + /** + * Port Graham + */ + _19885, + /** + * Eyak + */ + _19901, + /** + * Koniag Aleut + */ + _19927, + /** + * Akhiok + */ + _19935, + /** + * Agdaagux + */ + _19943, + /** + * Karluk + */ + _19950, + /** + * Kodiak + */ + _19968, + /** + * Larsen Bay + */ + _19976, + /** + * Old Harbor + */ + _19984, + /** + * Ouzinkie + */ + _19992, + /** + * Port Lions + */ + _20008, + /** + * Sugpiaq + */ + _20024, + /** + * Suqpigaq + */ + _20040, + /** + * Unangan Aleut + */ + _20065, + /** + * Akutan + */ + _20073, + /** + * Aleut Corporation + */ + _20081, + /** + * Aleutian + */ + _20099, + /** + * Aleutian Islander + */ + _20107, + /** + * Atka + */ + _20115, + /** + * Belkofski + */ + _20123, + /** + * Chignik Lagoon + */ + _20131, + /** + * King Cove + */ + _20149, + /** + * False Pass + */ + _20156, + /** + * Nelson Lagoon + */ + _20164, + /** + * Nikolski + */ + _20172, + /** + * Pauloff Harbor + */ + _20180, + /** + * Qagan Toyagungin + */ + _20198, + /** + * Qawalangin + */ + _20206, + /** + * St. George + */ + _20214, + /** + * St. Paul + */ + _20222, + /** + * Sand Point + */ + _20230, + /** + * South Naknek + */ + _20248, + /** + * Unalaska + */ + _20255, + /** + * Unga + */ + _20263, + /** + * Asian + */ + _20289, + /** + * Asian Indian + */ + _20297, + /** + * Bangladeshi + */ + _20305, + /** + * Bhutanese + */ + _20313, + /** + * Burmese + */ + _20321, + /** + * Cambodian + */ + _20339, + /** + * Chinese + */ + _20347, + /** + * Taiwanese + */ + _20354, + /** + * Filipino + */ + _20362, + /** + * Hmong + */ + _20370, + /** + * Indonesian + */ + _20388, + /** + * Japanese + */ + _20396, + /** + * Korean + */ + _20404, + /** + * Laotian + */ + _20412, + /** + * Malaysian + */ + _20420, + /** + * Okinawan + */ + _20438, + /** + * Pakistani + */ + _20446, + /** + * Sri Lankan + */ + _20453, + /** + * Thai + */ + _20461, + /** + * Vietnamese + */ + _20479, + /** + * Iwo Jiman + */ + _20487, + /** + * Maldivian + */ + _20495, + /** + * Nepalese + */ + _20503, + /** + * Singaporean + */ + _20511, + /** + * Madagascar + */ + _20529, + /** + * Black or African American + */ + _20545, + /** + * Black + */ + _20560, + /** + * African American + */ + _20586, + /** + * African + */ + _20602, + /** + * Botswanan + */ + _20610, + /** + * Ethiopian + */ + _20628, + /** + * Liberian + */ + _20636, + /** + * Namibian + */ + _20644, + /** + * Nigerian + */ + _20651, + /** + * Zairean + */ + _20669, + /** + * Bahamian + */ + _20677, + /** + * Barbadian + */ + _20685, + /** + * Dominican + */ + _20693, + /** + * Dominica Islander + */ + _20701, + /** + * Haitian + */ + _20719, + /** + * Jamaican + */ + _20727, + /** + * Tobagoan + */ + _20735, + /** + * Trinidadian + */ + _20743, + /** + * West Indian + */ + _20750, + /** + * Native Hawaiian or Other Pacific Islander + */ + _20768, + /** + * Polynesian + */ + _20784, + /** + * Native Hawaiian + */ + _20792, + /** + * Samoan + */ + _20800, + /** + * Tahitian + */ + _20818, + /** + * Tongan + */ + _20826, + /** + * Tokelauan + */ + _20834, + /** + * Micronesian + */ + _20859, + /** + * Guamanian or Chamorro + */ + _20867, + /** + * Guamanian + */ + _20875, + /** + * Chamorro + */ + _20883, + /** + * Mariana Islander + */ + _20891, + /** + * Marshallese + */ + _20909, + /** + * Palauan + */ + _20917, + /** + * Carolinian + */ + _20925, + /** + * Kosraean + */ + _20933, + /** + * Pohnpeian + */ + _20941, + /** + * Saipanese + */ + _20958, + /** + * Kiribati + */ + _20966, + /** + * Chuukese + */ + _20974, + /** + * Yapese + */ + _20982, + /** + * Melanesian + */ + _21006, + /** + * Fijian + */ + _21014, + /** + * Papua New Guinean + */ + _21022, + /** + * Solomon Islander + */ + _21030, + /** + * New Hebrides + */ + _21048, + /** + * Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated. + */ + _25007, + /** + * White + */ + _21063, + /** + * European + */ + _21089, + /** + * Armenian + */ + _21097, + /** + * English + */ + _21105, + /** + * French + */ + _21113, + /** + * German + */ + _21121, + /** + * Irish + */ + _21139, + /** + * Italian + */ + _21147, + /** + * Polish + */ + _21154, + /** + * Scottish + */ + _21162, + /** + * Middle Eastern or North African + */ + _21188, + /** + * Assyrian + */ + _21196, + /** + * Egyptian + */ + _21204, + /** + * Iranian + */ + _21212, + /** + * Iraqi + */ + _21220, + /** + * Lebanese + */ + _21238, + /** + * Palestinian + */ + _21246, + /** + * Syrian + */ + _21253, + /** + * Afghanistani + */ + _21261, + /** + * Israeili + */ + _21279, + /** + * Arab + */ + _21295, + /** + * Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated. + */ + _21311, + /** + * added to help the parsers + */ + NULL; + public static V3Race fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1002-5".equals(codeString)) + return _10025; + if ("1004-1".equals(codeString)) + return _10041; + if ("1006-6".equals(codeString)) + return _10066; + if ("1008-2".equals(codeString)) + return _10082; + if ("1010-8".equals(codeString)) + return _10108; + if ("1011-6".equals(codeString)) + return _10116; + if ("1012-4".equals(codeString)) + return _10124; + if ("1013-2".equals(codeString)) + return _10132; + if ("1014-0".equals(codeString)) + return _10140; + if ("1015-7".equals(codeString)) + return _10157; + if ("1016-5".equals(codeString)) + return _10165; + if ("1017-3".equals(codeString)) + return _10173; + if ("1018-1".equals(codeString)) + return _10181; + if ("1019-9".equals(codeString)) + return _10199; + if ("1021-5".equals(codeString)) + return _10215; + if ("1022-3".equals(codeString)) + return _10223; + if ("1023-1".equals(codeString)) + return _10231; + if ("1024-9".equals(codeString)) + return _10249; + if ("1026-4".equals(codeString)) + return _10264; + if ("1028-0".equals(codeString)) + return _10280; + if ("1030-6".equals(codeString)) + return _10306; + if ("1031-4".equals(codeString)) + return _10314; + if ("1033-0".equals(codeString)) + return _10330; + if ("1035-5".equals(codeString)) + return _10355; + if ("1037-1".equals(codeString)) + return _10371; + if ("1039-7".equals(codeString)) + return _10397; + if ("1041-3".equals(codeString)) + return _10413; + if ("1042-1".equals(codeString)) + return _10421; + if ("1044-7".equals(codeString)) + return _10447; + if ("1045-4".equals(codeString)) + return _10454; + if ("1046-2".equals(codeString)) + return _10462; + if ("1047-0".equals(codeString)) + return _10470; + if ("1048-8".equals(codeString)) + return _10488; + if ("1049-6".equals(codeString)) + return _10496; + if ("1050-4".equals(codeString)) + return _10504; + if ("1051-2".equals(codeString)) + return _10512; + if ("1053-8".equals(codeString)) + return _10538; + if ("1054-6".equals(codeString)) + return _10546; + if ("1055-3".equals(codeString)) + return _10553; + if ("1056-1".equals(codeString)) + return _10561; + if ("1057-9".equals(codeString)) + return _10579; + if ("1058-7".equals(codeString)) + return _10587; + if ("1059-5".equals(codeString)) + return _10595; + if ("1060-3".equals(codeString)) + return _10603; + if ("1061-1".equals(codeString)) + return _10611; + if ("1062-9".equals(codeString)) + return _10629; + if ("1063-7".equals(codeString)) + return _10637; + if ("1064-5".equals(codeString)) + return _10645; + if ("1065-2".equals(codeString)) + return _10652; + if ("1066-0".equals(codeString)) + return _10660; + if ("1068-6".equals(codeString)) + return _10686; + if ("1069-4".equals(codeString)) + return _10694; + if ("1070-2".equals(codeString)) + return _10702; + if ("1071-0".equals(codeString)) + return _10710; + if ("1072-8".equals(codeString)) + return _10728; + if ("1073-6".equals(codeString)) + return _10736; + if ("1074-4".equals(codeString)) + return _10744; + if ("1076-9".equals(codeString)) + return _10769; + if ("1741-8".equals(codeString)) + return _17418; + if ("1742-6".equals(codeString)) + return _17426; + if ("1743-4".equals(codeString)) + return _17434; + if ("1744-2".equals(codeString)) + return _17442; + if ("1745-9".equals(codeString)) + return _17459; + if ("1746-7".equals(codeString)) + return _17467; + if ("1747-5".equals(codeString)) + return _17475; + if ("1748-3".equals(codeString)) + return _17483; + if ("1749-1".equals(codeString)) + return _17491; + if ("1750-9".equals(codeString)) + return _17509; + if ("1751-7".equals(codeString)) + return _17517; + if ("1752-5".equals(codeString)) + return _17525; + if ("1753-3".equals(codeString)) + return _17533; + if ("1754-1".equals(codeString)) + return _17541; + if ("1755-8".equals(codeString)) + return _17558; + if ("1756-6".equals(codeString)) + return _17566; + if ("1757-4".equals(codeString)) + return _17574; + if ("1758-2".equals(codeString)) + return _17582; + if ("1759-0".equals(codeString)) + return _17590; + if ("1760-8".equals(codeString)) + return _17608; + if ("1761-6".equals(codeString)) + return _17616; + if ("1762-4".equals(codeString)) + return _17624; + if ("1763-2".equals(codeString)) + return _17632; + if ("1764-0".equals(codeString)) + return _17640; + if ("1765-7".equals(codeString)) + return _17657; + if ("1766-5".equals(codeString)) + return _17665; + if ("1767-3".equals(codeString)) + return _17673; + if ("1768-1".equals(codeString)) + return _17681; + if ("1769-9".equals(codeString)) + return _17699; + if ("1770-7".equals(codeString)) + return _17707; + if ("1771-5".equals(codeString)) + return _17715; + if ("1772-3".equals(codeString)) + return _17723; + if ("1773-1".equals(codeString)) + return _17731; + if ("1774-9".equals(codeString)) + return _17749; + if ("1775-6".equals(codeString)) + return _17756; + if ("1776-4".equals(codeString)) + return _17764; + if ("1777-2".equals(codeString)) + return _17772; + if ("1778-0".equals(codeString)) + return _17780; + if ("1779-8".equals(codeString)) + return _17798; + if ("1780-6".equals(codeString)) + return _17806; + if ("1781-4".equals(codeString)) + return _17814; + if ("1782-2".equals(codeString)) + return _17822; + if ("1783-0".equals(codeString)) + return _17830; + if ("1784-8".equals(codeString)) + return _17848; + if ("1785-5".equals(codeString)) + return _17855; + if ("1786-3".equals(codeString)) + return _17863; + if ("1787-1".equals(codeString)) + return _17871; + if ("1788-9".equals(codeString)) + return _17889; + if ("1789-7".equals(codeString)) + return _17897; + if ("1790-5".equals(codeString)) + return _17905; + if ("1791-3".equals(codeString)) + return _17913; + if ("1792-1".equals(codeString)) + return _17921; + if ("1793-9".equals(codeString)) + return _17939; + if ("1794-7".equals(codeString)) + return _17947; + if ("1795-4".equals(codeString)) + return _17954; + if ("1796-2".equals(codeString)) + return _17962; + if ("1797-0".equals(codeString)) + return _17970; + if ("1798-8".equals(codeString)) + return _17988; + if ("1799-6".equals(codeString)) + return _17996; + if ("1800-2".equals(codeString)) + return _18002; + if ("1801-0".equals(codeString)) + return _18010; + if ("1802-8".equals(codeString)) + return _18028; + if ("1803-6".equals(codeString)) + return _18036; + if ("1804-4".equals(codeString)) + return _18044; + if ("1805-1".equals(codeString)) + return _18051; + if ("1806-9".equals(codeString)) + return _18069; + if ("1807-7".equals(codeString)) + return _18077; + if ("1808-5".equals(codeString)) + return _18085; + if ("1809-3".equals(codeString)) + return _18093; + if ("1078-5".equals(codeString)) + return _10785; + if ("1080-1".equals(codeString)) + return _10801; + if ("1082-7".equals(codeString)) + return _10827; + if ("1083-5".equals(codeString)) + return _10835; + if ("1084-3".equals(codeString)) + return _10843; + if ("1086-8".equals(codeString)) + return _10868; + if ("1088-4".equals(codeString)) + return _10884; + if ("1089-2".equals(codeString)) + return _10892; + if ("1090-0".equals(codeString)) + return _10900; + if ("1091-8".equals(codeString)) + return _10918; + if ("1092-6".equals(codeString)) + return _10926; + if ("1093-4".equals(codeString)) + return _10934; + if ("1094-2".equals(codeString)) + return _10942; + if ("1095-9".equals(codeString)) + return _10959; + if ("1096-7".equals(codeString)) + return _10967; + if ("1097-5".equals(codeString)) + return _10975; + if ("1098-3".equals(codeString)) + return _10983; + if ("1100-7".equals(codeString)) + return _11007; + if ("1102-3".equals(codeString)) + return _11023; + if ("1103-1".equals(codeString)) + return _11031; + if ("1104-9".equals(codeString)) + return _11049; + if ("1106-4".equals(codeString)) + return _11064; + if ("1108-0".equals(codeString)) + return _11080; + if ("1109-8".equals(codeString)) + return _11098; + if ("1110-6".equals(codeString)) + return _11106; + if ("1112-2".equals(codeString)) + return _11122; + if ("1114-8".equals(codeString)) + return _11148; + if ("1115-5".equals(codeString)) + return _11155; + if ("1116-3".equals(codeString)) + return _11163; + if ("1117-1".equals(codeString)) + return _11171; + if ("1118-9".equals(codeString)) + return _11189; + if ("1119-7".equals(codeString)) + return _11197; + if ("1120-5".equals(codeString)) + return _11205; + if ("1121-3".equals(codeString)) + return _11213; + if ("1123-9".equals(codeString)) + return _11239; + if ("1124-7".equals(codeString)) + return _11247; + if ("1125-4".equals(codeString)) + return _11254; + if ("1126-2".equals(codeString)) + return _11262; + if ("1127-0".equals(codeString)) + return _11270; + if ("1128-8".equals(codeString)) + return _11288; + if ("1129-6".equals(codeString)) + return _11296; + if ("1130-4".equals(codeString)) + return _11304; + if ("1131-2".equals(codeString)) + return _11312; + if ("1132-0".equals(codeString)) + return _11320; + if ("1133-8".equals(codeString)) + return _11338; + if ("1134-6".equals(codeString)) + return _11346; + if ("1135-3".equals(codeString)) + return _11353; + if ("1136-1".equals(codeString)) + return _11361; + if ("1137-9".equals(codeString)) + return _11379; + if ("1138-7".equals(codeString)) + return _11387; + if ("1139-5".equals(codeString)) + return _11395; + if ("1140-3".equals(codeString)) + return _11403; + if ("1141-1".equals(codeString)) + return _11411; + if ("1142-9".equals(codeString)) + return _11429; + if ("1143-7".equals(codeString)) + return _11437; + if ("1144-5".equals(codeString)) + return _11445; + if ("1145-2".equals(codeString)) + return _11452; + if ("1146-0".equals(codeString)) + return _11460; + if ("1147-8".equals(codeString)) + return _11478; + if ("1148-6".equals(codeString)) + return _11486; + if ("1150-2".equals(codeString)) + return _11502; + if ("1151-0".equals(codeString)) + return _11510; + if ("1153-6".equals(codeString)) + return _11536; + if ("1155-1".equals(codeString)) + return _11551; + if ("1156-9".equals(codeString)) + return _11569; + if ("1157-7".equals(codeString)) + return _11577; + if ("1158-5".equals(codeString)) + return _11585; + if ("1159-3".equals(codeString)) + return _11593; + if ("1160-1".equals(codeString)) + return _11601; + if ("1162-7".equals(codeString)) + return _11627; + if ("1163-5".equals(codeString)) + return _11635; + if ("1165-0".equals(codeString)) + return _11650; + if ("1167-6".equals(codeString)) + return _11676; + if ("1169-2".equals(codeString)) + return _11692; + if ("1171-8".equals(codeString)) + return _11718; + if ("1173-4".equals(codeString)) + return _11734; + if ("1175-9".equals(codeString)) + return _11759; + if ("1176-7".equals(codeString)) + return _11767; + if ("1178-3".equals(codeString)) + return _11783; + if ("1180-9".equals(codeString)) + return _11809; + if ("1182-5".equals(codeString)) + return _11825; + if ("1184-1".equals(codeString)) + return _11841; + if ("1186-6".equals(codeString)) + return _11866; + if ("1187-4".equals(codeString)) + return _11874; + if ("1189-0".equals(codeString)) + return _11890; + if ("1191-6".equals(codeString)) + return _11916; + if ("1193-2".equals(codeString)) + return _11932; + if ("1194-0".equals(codeString)) + return _11940; + if ("1195-7".equals(codeString)) + return _11957; + if ("1196-5".equals(codeString)) + return _11965; + if ("1197-3".equals(codeString)) + return _11973; + if ("1198-1".equals(codeString)) + return _11981; + if ("1199-9".equals(codeString)) + return _11999; + if ("1200-5".equals(codeString)) + return _12005; + if ("1201-3".equals(codeString)) + return _12013; + if ("1202-1".equals(codeString)) + return _12021; + if ("1203-9".equals(codeString)) + return _12039; + if ("1204-7".equals(codeString)) + return _12047; + if ("1205-4".equals(codeString)) + return _12054; + if ("1207-0".equals(codeString)) + return _12070; + if ("1209-6".equals(codeString)) + return _12096; + if ("1211-2".equals(codeString)) + return _12112; + if ("1212-0".equals(codeString)) + return _12120; + if ("1214-6".equals(codeString)) + return _12146; + if ("1215-3".equals(codeString)) + return _12153; + if ("1216-1".equals(codeString)) + return _12161; + if ("1217-9".equals(codeString)) + return _12179; + if ("1218-7".equals(codeString)) + return _12187; + if ("1219-5".equals(codeString)) + return _12195; + if ("1220-3".equals(codeString)) + return _12203; + if ("1222-9".equals(codeString)) + return _12229; + if ("1223-7".equals(codeString)) + return _12237; + if ("1224-5".equals(codeString)) + return _12245; + if ("1225-2".equals(codeString)) + return _12252; + if ("1226-0".equals(codeString)) + return _12260; + if ("1227-8".equals(codeString)) + return _12278; + if ("1228-6".equals(codeString)) + return _12286; + if ("1229-4".equals(codeString)) + return _12294; + if ("1230-2".equals(codeString)) + return _12302; + if ("1231-0".equals(codeString)) + return _12310; + if ("1233-6".equals(codeString)) + return _12336; + if ("1234-4".equals(codeString)) + return _12344; + if ("1235-1".equals(codeString)) + return _12351; + if ("1236-9".equals(codeString)) + return _12369; + if ("1237-7".equals(codeString)) + return _12377; + if ("1238-5".equals(codeString)) + return _12385; + if ("1239-3".equals(codeString)) + return _12393; + if ("1240-1".equals(codeString)) + return _12401; + if ("1241-9".equals(codeString)) + return _12419; + if ("1242-7".equals(codeString)) + return _12427; + if ("1243-5".equals(codeString)) + return _12435; + if ("1244-3".equals(codeString)) + return _12443; + if ("1245-0".equals(codeString)) + return _12450; + if ("1246-8".equals(codeString)) + return _12468; + if ("1247-6".equals(codeString)) + return _12476; + if ("1248-4".equals(codeString)) + return _12484; + if ("1250-0".equals(codeString)) + return _12500; + if ("1252-6".equals(codeString)) + return _12526; + if ("1254-2".equals(codeString)) + return _12542; + if ("1256-7".equals(codeString)) + return _12567; + if ("1258-3".equals(codeString)) + return _12583; + if ("1260-9".equals(codeString)) + return _12609; + if ("1262-5".equals(codeString)) + return _12625; + if ("1264-1".equals(codeString)) + return _12641; + if ("1265-8".equals(codeString)) + return _12658; + if ("1267-4".equals(codeString)) + return _12674; + if ("1269-0".equals(codeString)) + return _12690; + if ("1271-6".equals(codeString)) + return _12716; + if ("1272-4".equals(codeString)) + return _12724; + if ("1273-2".equals(codeString)) + return _12732; + if ("1275-7".equals(codeString)) + return _12757; + if ("1277-3".equals(codeString)) + return _12773; + if ("1279-9".equals(codeString)) + return _12799; + if ("1281-5".equals(codeString)) + return _12815; + if ("1282-3".equals(codeString)) + return _12823; + if ("1283-1".equals(codeString)) + return _12831; + if ("1285-6".equals(codeString)) + return _12856; + if ("1286-4".equals(codeString)) + return _12864; + if ("1287-2".equals(codeString)) + return _12872; + if ("1288-0".equals(codeString)) + return _12880; + if ("1289-8".equals(codeString)) + return _12898; + if ("1290-6".equals(codeString)) + return _12906; + if ("1291-4".equals(codeString)) + return _12914; + if ("1292-2".equals(codeString)) + return _12922; + if ("1293-0".equals(codeString)) + return _12930; + if ("1294-8".equals(codeString)) + return _12948; + if ("1295-5".equals(codeString)) + return _12955; + if ("1297-1".equals(codeString)) + return _12971; + if ("1299-7".equals(codeString)) + return _12997; + if ("1301-1".equals(codeString)) + return _13011; + if ("1303-7".equals(codeString)) + return _13037; + if ("1305-2".equals(codeString)) + return _13052; + if ("1306-0".equals(codeString)) + return _13060; + if ("1307-8".equals(codeString)) + return _13078; + if ("1309-4".equals(codeString)) + return _13094; + if ("1310-2".equals(codeString)) + return _13102; + if ("1312-8".equals(codeString)) + return _13128; + if ("1313-6".equals(codeString)) + return _13136; + if ("1314-4".equals(codeString)) + return _13144; + if ("1315-1".equals(codeString)) + return _13151; + if ("1317-7".equals(codeString)) + return _13177; + if ("1319-3".equals(codeString)) + return _13193; + if ("1321-9".equals(codeString)) + return _13219; + if ("1323-5".equals(codeString)) + return _13235; + if ("1325-0".equals(codeString)) + return _13250; + if ("1326-8".equals(codeString)) + return _13268; + if ("1327-6".equals(codeString)) + return _13276; + if ("1328-4".equals(codeString)) + return _13284; + if ("1329-2".equals(codeString)) + return _13292; + if ("1331-8".equals(codeString)) + return _13318; + if ("1332-6".equals(codeString)) + return _13326; + if ("1333-4".equals(codeString)) + return _13334; + if ("1334-2".equals(codeString)) + return _13342; + if ("1335-9".equals(codeString)) + return _13359; + if ("1336-7".equals(codeString)) + return _13367; + if ("1337-5".equals(codeString)) + return _13375; + if ("1338-3".equals(codeString)) + return _13383; + if ("1340-9".equals(codeString)) + return _13409; + if ("1342-5".equals(codeString)) + return _13425; + if ("1344-1".equals(codeString)) + return _13441; + if ("1345-8".equals(codeString)) + return _13458; + if ("1346-6".equals(codeString)) + return _13466; + if ("1348-2".equals(codeString)) + return _13482; + if ("1350-8".equals(codeString)) + return _13508; + if ("1352-4".equals(codeString)) + return _13524; + if ("1354-0".equals(codeString)) + return _13540; + if ("1356-5".equals(codeString)) + return _13565; + if ("1358-1".equals(codeString)) + return _13581; + if ("1359-9".equals(codeString)) + return _13599; + if ("1360-7".equals(codeString)) + return _13607; + if ("1361-5".equals(codeString)) + return _13615; + if ("1363-1".equals(codeString)) + return _13631; + if ("1365-6".equals(codeString)) + return _13656; + if ("1366-4".equals(codeString)) + return _13664; + if ("1368-0".equals(codeString)) + return _13680; + if ("1370-6".equals(codeString)) + return _13706; + if ("1372-2".equals(codeString)) + return _13722; + if ("1374-8".equals(codeString)) + return _13748; + if ("1376-3".equals(codeString)) + return _13763; + if ("1378-9".equals(codeString)) + return _13789; + if ("1380-5".equals(codeString)) + return _13805; + if ("1382-1".equals(codeString)) + return _13821; + if ("1383-9".equals(codeString)) + return _13839; + if ("1384-7".equals(codeString)) + return _13847; + if ("1385-4".equals(codeString)) + return _13854; + if ("1387-0".equals(codeString)) + return _13870; + if ("1389-6".equals(codeString)) + return _13896; + if ("1391-2".equals(codeString)) + return _13912; + if ("1392-0".equals(codeString)) + return _13920; + if ("1393-8".equals(codeString)) + return _13938; + if ("1394-6".equals(codeString)) + return _13946; + if ("1395-3".equals(codeString)) + return _13953; + if ("1396-1".equals(codeString)) + return _13961; + if ("1397-9".equals(codeString)) + return _13979; + if ("1398-7".equals(codeString)) + return _13987; + if ("1399-5".equals(codeString)) + return _13995; + if ("1400-1".equals(codeString)) + return _14001; + if ("1401-9".equals(codeString)) + return _14019; + if ("1403-5".equals(codeString)) + return _14035; + if ("1405-0".equals(codeString)) + return _14050; + if ("1407-6".equals(codeString)) + return _14076; + if ("1409-2".equals(codeString)) + return _14092; + if ("1411-8".equals(codeString)) + return _14118; + if ("1412-6".equals(codeString)) + return _14126; + if ("1413-4".equals(codeString)) + return _14134; + if ("1414-2".equals(codeString)) + return _14142; + if ("1416-7".equals(codeString)) + return _14167; + if ("1417-5".equals(codeString)) + return _14175; + if ("1418-3".equals(codeString)) + return _14183; + if ("1419-1".equals(codeString)) + return _14191; + if ("1420-9".equals(codeString)) + return _14209; + if ("1421-7".equals(codeString)) + return _14217; + if ("1422-5".equals(codeString)) + return _14225; + if ("1423-3".equals(codeString)) + return _14233; + if ("1424-1".equals(codeString)) + return _14241; + if ("1425-8".equals(codeString)) + return _14258; + if ("1426-6".equals(codeString)) + return _14266; + if ("1427-4".equals(codeString)) + return _14274; + if ("1428-2".equals(codeString)) + return _14282; + if ("1429-0".equals(codeString)) + return _14290; + if ("1430-8".equals(codeString)) + return _14308; + if ("1431-6".equals(codeString)) + return _14316; + if ("1432-4".equals(codeString)) + return _14324; + if ("1433-2".equals(codeString)) + return _14332; + if ("1434-0".equals(codeString)) + return _14340; + if ("1435-7".equals(codeString)) + return _14357; + if ("1436-5".equals(codeString)) + return _14365; + if ("1437-3".equals(codeString)) + return _14373; + if ("1439-9".equals(codeString)) + return _14399; + if ("1441-5".equals(codeString)) + return _14415; + if ("1442-3".equals(codeString)) + return _14423; + if ("1443-1".equals(codeString)) + return _14431; + if ("1445-6".equals(codeString)) + return _14456; + if ("1446-4".equals(codeString)) + return _14464; + if ("1448-0".equals(codeString)) + return _14480; + if ("1450-6".equals(codeString)) + return _14506; + if ("1451-4".equals(codeString)) + return _14514; + if ("1453-0".equals(codeString)) + return _14530; + if ("1454-8".equals(codeString)) + return _14548; + if ("1456-3".equals(codeString)) + return _14563; + if ("1457-1".equals(codeString)) + return _14571; + if ("1458-9".equals(codeString)) + return _14589; + if ("1460-5".equals(codeString)) + return _14605; + if ("1462-1".equals(codeString)) + return _14621; + if ("1464-7".equals(codeString)) + return _14647; + if ("1465-4".equals(codeString)) + return _14654; + if ("1466-2".equals(codeString)) + return _14662; + if ("1467-0".equals(codeString)) + return _14670; + if ("1468-8".equals(codeString)) + return _14688; + if ("1469-6".equals(codeString)) + return _14696; + if ("1470-4".equals(codeString)) + return _14704; + if ("1471-2".equals(codeString)) + return _14712; + if ("1472-0".equals(codeString)) + return _14720; + if ("1474-6".equals(codeString)) + return _14746; + if ("1475-3".equals(codeString)) + return _14753; + if ("1476-1".equals(codeString)) + return _14761; + if ("1478-7".equals(codeString)) + return _14787; + if ("1479-5".equals(codeString)) + return _14795; + if ("1480-3".equals(codeString)) + return _14803; + if ("1481-1".equals(codeString)) + return _14811; + if ("1482-9".equals(codeString)) + return _14829; + if ("1483-7".equals(codeString)) + return _14837; + if ("1484-5".equals(codeString)) + return _14845; + if ("1485-2".equals(codeString)) + return _14852; + if ("1487-8".equals(codeString)) + return _14878; + if ("1489-4".equals(codeString)) + return _14894; + if ("1490-2".equals(codeString)) + return _14902; + if ("1491-0".equals(codeString)) + return _14910; + if ("1492-8".equals(codeString)) + return _14928; + if ("1493-6".equals(codeString)) + return _14936; + if ("1494-4".equals(codeString)) + return _14944; + if ("1495-1".equals(codeString)) + return _14951; + if ("1496-9".equals(codeString)) + return _14969; + if ("1497-7".equals(codeString)) + return _14977; + if ("1498-5".equals(codeString)) + return _14985; + if ("1499-3".equals(codeString)) + return _14993; + if ("1500-8".equals(codeString)) + return _15008; + if ("1501-6".equals(codeString)) + return _15016; + if ("1502-4".equals(codeString)) + return _15024; + if ("1503-2".equals(codeString)) + return _15032; + if ("1504-0".equals(codeString)) + return _15040; + if ("1505-7".equals(codeString)) + return _15057; + if ("1506-5".equals(codeString)) + return _15065; + if ("1507-3".equals(codeString)) + return _15073; + if ("1508-1".equals(codeString)) + return _15081; + if ("1509-9".equals(codeString)) + return _15099; + if ("1510-7".equals(codeString)) + return _15107; + if ("1511-5".equals(codeString)) + return _15115; + if ("1512-3".equals(codeString)) + return _15123; + if ("1513-1".equals(codeString)) + return _15131; + if ("1514-9".equals(codeString)) + return _15149; + if ("1515-6".equals(codeString)) + return _15156; + if ("1516-4".equals(codeString)) + return _15164; + if ("1518-0".equals(codeString)) + return _15180; + if ("1519-8".equals(codeString)) + return _15198; + if ("1520-6".equals(codeString)) + return _15206; + if ("1521-4".equals(codeString)) + return _15214; + if ("1522-2".equals(codeString)) + return _15222; + if ("1523-0".equals(codeString)) + return _15230; + if ("1524-8".equals(codeString)) + return _15248; + if ("1525-5".equals(codeString)) + return _15255; + if ("1526-3".equals(codeString)) + return _15263; + if ("1527-1".equals(codeString)) + return _15271; + if ("1528-9".equals(codeString)) + return _15289; + if ("1529-7".equals(codeString)) + return _15297; + if ("1530-5".equals(codeString)) + return _15305; + if ("1531-3".equals(codeString)) + return _15313; + if ("1532-1".equals(codeString)) + return _15321; + if ("1533-9".equals(codeString)) + return _15339; + if ("1534-7".equals(codeString)) + return _15347; + if ("1535-4".equals(codeString)) + return _15354; + if ("1536-2".equals(codeString)) + return _15362; + if ("1537-0".equals(codeString)) + return _15370; + if ("1538-8".equals(codeString)) + return _15388; + if ("1539-6".equals(codeString)) + return _15396; + if ("1541-2".equals(codeString)) + return _15412; + if ("1543-8".equals(codeString)) + return _15438; + if ("1545-3".equals(codeString)) + return _15453; + if ("1547-9".equals(codeString)) + return _15479; + if ("1549-5".equals(codeString)) + return _15495; + if ("1551-1".equals(codeString)) + return _15511; + if ("1552-9".equals(codeString)) + return _15529; + if ("1553-7".equals(codeString)) + return _15537; + if ("1554-5".equals(codeString)) + return _15545; + if ("1556-0".equals(codeString)) + return _15560; + if ("1558-6".equals(codeString)) + return _15586; + if ("1560-2".equals(codeString)) + return _15602; + if ("1562-8".equals(codeString)) + return _15628; + if ("1564-4".equals(codeString)) + return _15644; + if ("1566-9".equals(codeString)) + return _15669; + if ("1567-7".equals(codeString)) + return _15677; + if ("1568-5".equals(codeString)) + return _15685; + if ("1569-3".equals(codeString)) + return _15693; + if ("1570-1".equals(codeString)) + return _15701; + if ("1571-9".equals(codeString)) + return _15719; + if ("1573-5".equals(codeString)) + return _15735; + if ("1574-3".equals(codeString)) + return _15743; + if ("1576-8".equals(codeString)) + return _15768; + if ("1578-4".equals(codeString)) + return _15784; + if ("1579-2".equals(codeString)) + return _15792; + if ("1580-0".equals(codeString)) + return _15800; + if ("1582-6".equals(codeString)) + return _15826; + if ("1584-2".equals(codeString)) + return _15842; + if ("1586-7".equals(codeString)) + return _15867; + if ("1587-5".equals(codeString)) + return _15875; + if ("1588-3".equals(codeString)) + return _15883; + if ("1589-1".equals(codeString)) + return _15891; + if ("1590-9".equals(codeString)) + return _15909; + if ("1591-7".equals(codeString)) + return _15917; + if ("1592-5".equals(codeString)) + return _15925; + if ("1593-3".equals(codeString)) + return _15933; + if ("1594-1".equals(codeString)) + return _15941; + if ("1595-8".equals(codeString)) + return _15958; + if ("1596-6".equals(codeString)) + return _15966; + if ("1597-4".equals(codeString)) + return _15974; + if ("1598-2".equals(codeString)) + return _15982; + if ("1599-0".equals(codeString)) + return _15990; + if ("1600-6".equals(codeString)) + return _16006; + if ("1602-2".equals(codeString)) + return _16022; + if ("1603-0".equals(codeString)) + return _16030; + if ("1604-8".equals(codeString)) + return _16048; + if ("1605-5".equals(codeString)) + return _16055; + if ("1607-1".equals(codeString)) + return _16071; + if ("1609-7".equals(codeString)) + return _16097; + if ("1610-5".equals(codeString)) + return _16105; + if ("1611-3".equals(codeString)) + return _16113; + if ("1612-1".equals(codeString)) + return _16121; + if ("1613-9".equals(codeString)) + return _16139; + if ("1614-7".equals(codeString)) + return _16147; + if ("1615-4".equals(codeString)) + return _16154; + if ("1616-2".equals(codeString)) + return _16162; + if ("1617-0".equals(codeString)) + return _16170; + if ("1618-8".equals(codeString)) + return _16188; + if ("1619-6".equals(codeString)) + return _16196; + if ("1620-4".equals(codeString)) + return _16204; + if ("1621-2".equals(codeString)) + return _16212; + if ("1622-0".equals(codeString)) + return _16220; + if ("1623-8".equals(codeString)) + return _16238; + if ("1624-6".equals(codeString)) + return _16246; + if ("1625-3".equals(codeString)) + return _16253; + if ("1626-1".equals(codeString)) + return _16261; + if ("1627-9".equals(codeString)) + return _16279; + if ("1628-7".equals(codeString)) + return _16287; + if ("1629-5".equals(codeString)) + return _16295; + if ("1630-3".equals(codeString)) + return _16303; + if ("1631-1".equals(codeString)) + return _16311; + if ("1632-9".equals(codeString)) + return _16329; + if ("1633-7".equals(codeString)) + return _16337; + if ("1634-5".equals(codeString)) + return _16345; + if ("1635-2".equals(codeString)) + return _16352; + if ("1636-0".equals(codeString)) + return _16360; + if ("1637-8".equals(codeString)) + return _16378; + if ("1638-6".equals(codeString)) + return _16386; + if ("1639-4".equals(codeString)) + return _16394; + if ("1640-2".equals(codeString)) + return _16402; + if ("1641-0".equals(codeString)) + return _16410; + if ("1643-6".equals(codeString)) + return _16436; + if ("1645-1".equals(codeString)) + return _16451; + if ("1647-7".equals(codeString)) + return _16477; + if ("1649-3".equals(codeString)) + return _16493; + if ("1651-9".equals(codeString)) + return _16519; + if ("1653-5".equals(codeString)) + return _16535; + if ("1654-3".equals(codeString)) + return _16543; + if ("1655-0".equals(codeString)) + return _16550; + if ("1656-8".equals(codeString)) + return _16568; + if ("1657-6".equals(codeString)) + return _16576; + if ("1659-2".equals(codeString)) + return _16592; + if ("1661-8".equals(codeString)) + return _16618; + if ("1663-4".equals(codeString)) + return _16634; + if ("1665-9".equals(codeString)) + return _16659; + if ("1667-5".equals(codeString)) + return _16675; + if ("1668-3".equals(codeString)) + return _16683; + if ("1670-9".equals(codeString)) + return _16709; + if ("1671-7".equals(codeString)) + return _16717; + if ("1672-5".equals(codeString)) + return _16725; + if ("1673-3".equals(codeString)) + return _16733; + if ("1675-8".equals(codeString)) + return _16758; + if ("1677-4".equals(codeString)) + return _16774; + if ("1679-0".equals(codeString)) + return _16790; + if ("1680-8".equals(codeString)) + return _16808; + if ("1681-6".equals(codeString)) + return _16816; + if ("1683-2".equals(codeString)) + return _16832; + if ("1685-7".equals(codeString)) + return _16857; + if ("1687-3".equals(codeString)) + return _16873; + if ("1688-1".equals(codeString)) + return _16881; + if ("1689-9".equals(codeString)) + return _16899; + if ("1690-7".equals(codeString)) + return _16907; + if ("1692-3".equals(codeString)) + return _16923; + if ("1694-9".equals(codeString)) + return _16949; + if ("1696-4".equals(codeString)) + return _16964; + if ("1697-2".equals(codeString)) + return _16972; + if ("1698-0".equals(codeString)) + return _16980; + if ("1700-4".equals(codeString)) + return _17004; + if ("1702-0".equals(codeString)) + return _17020; + if ("1704-6".equals(codeString)) + return _17046; + if ("1705-3".equals(codeString)) + return _17053; + if ("1707-9".equals(codeString)) + return _17079; + if ("1709-5".equals(codeString)) + return _17095; + if ("1711-1".equals(codeString)) + return _17111; + if ("1712-9".equals(codeString)) + return _17129; + if ("1713-7".equals(codeString)) + return _17137; + if ("1715-2".equals(codeString)) + return _17152; + if ("1717-8".equals(codeString)) + return _17178; + if ("1718-6".equals(codeString)) + return _17186; + if ("1719-4".equals(codeString)) + return _17194; + if ("1720-2".equals(codeString)) + return _17202; + if ("1722-8".equals(codeString)) + return _17228; + if ("1724-4".equals(codeString)) + return _17244; + if ("1725-1".equals(codeString)) + return _17251; + if ("1726-9".equals(codeString)) + return _17269; + if ("1727-7".equals(codeString)) + return _17277; + if ("1728-5".equals(codeString)) + return _17285; + if ("1729-3".equals(codeString)) + return _17293; + if ("1730-1".equals(codeString)) + return _17301; + if ("1731-9".equals(codeString)) + return _17319; + if ("1732-7".equals(codeString)) + return _17327; + if ("1733-5".equals(codeString)) + return _17335; + if ("1735-0".equals(codeString)) + return _17350; + if ("1737-6".equals(codeString)) + return _17376; + if ("1739-2".equals(codeString)) + return _17392; + if ("1740-0".equals(codeString)) + return _17400; + if ("1811-9".equals(codeString)) + return _18119; + if ("1813-5".equals(codeString)) + return _18135; + if ("1814-3".equals(codeString)) + return _18143; + if ("1815-0".equals(codeString)) + return _18150; + if ("1816-8".equals(codeString)) + return _18168; + if ("1817-6".equals(codeString)) + return _18176; + if ("1818-4".equals(codeString)) + return _18184; + if ("1819-2".equals(codeString)) + return _18192; + if ("1820-0".equals(codeString)) + return _18200; + if ("1821-8".equals(codeString)) + return _18218; + if ("1822-6".equals(codeString)) + return _18226; + if ("1823-4".equals(codeString)) + return _18234; + if ("1824-2".equals(codeString)) + return _18242; + if ("1825-9".equals(codeString)) + return _18259; + if ("1826-7".equals(codeString)) + return _18267; + if ("1827-5".equals(codeString)) + return _18275; + if ("1828-3".equals(codeString)) + return _18283; + if ("1829-1".equals(codeString)) + return _18291; + if ("1830-9".equals(codeString)) + return _18309; + if ("1831-7".equals(codeString)) + return _18317; + if ("1832-5".equals(codeString)) + return _18325; + if ("1833-3".equals(codeString)) + return _18333; + if ("1834-1".equals(codeString)) + return _18341; + if ("1835-8".equals(codeString)) + return _18358; + if ("1837-4".equals(codeString)) + return _18374; + if ("1838-2".equals(codeString)) + return _18382; + if ("1840-8".equals(codeString)) + return _18408; + if ("1842-4".equals(codeString)) + return _18424; + if ("1844-0".equals(codeString)) + return _18440; + if ("1845-7".equals(codeString)) + return _18457; + if ("1846-5".equals(codeString)) + return _18465; + if ("1847-3".equals(codeString)) + return _18473; + if ("1848-1".equals(codeString)) + return _18481; + if ("1849-9".equals(codeString)) + return _18499; + if ("1850-7".equals(codeString)) + return _18507; + if ("1851-5".equals(codeString)) + return _18515; + if ("1852-3".equals(codeString)) + return _18523; + if ("1853-1".equals(codeString)) + return _18531; + if ("1854-9".equals(codeString)) + return _18549; + if ("1855-6".equals(codeString)) + return _18556; + if ("1856-4".equals(codeString)) + return _18564; + if ("1857-2".equals(codeString)) + return _18572; + if ("1858-0".equals(codeString)) + return _18580; + if ("1859-8".equals(codeString)) + return _18598; + if ("1860-6".equals(codeString)) + return _18606; + if ("1861-4".equals(codeString)) + return _18614; + if ("1862-2".equals(codeString)) + return _18622; + if ("1863-0".equals(codeString)) + return _18630; + if ("1864-8".equals(codeString)) + return _18648; + if ("1865-5".equals(codeString)) + return _18655; + if ("1866-3".equals(codeString)) + return _18663; + if ("1867-1".equals(codeString)) + return _18671; + if ("1868-9".equals(codeString)) + return _18689; + if ("1869-7".equals(codeString)) + return _18697; + if ("1870-5".equals(codeString)) + return _18705; + if ("1871-3".equals(codeString)) + return _18713; + if ("1872-1".equals(codeString)) + return _18721; + if ("1873-9".equals(codeString)) + return _18739; + if ("1874-7".equals(codeString)) + return _18747; + if ("1875-4".equals(codeString)) + return _18754; + if ("1876-2".equals(codeString)) + return _18762; + if ("1877-0".equals(codeString)) + return _18770; + if ("1878-8".equals(codeString)) + return _18788; + if ("1879-6".equals(codeString)) + return _18796; + if ("1880-4".equals(codeString)) + return _18804; + if ("1881-2".equals(codeString)) + return _18812; + if ("1882-0".equals(codeString)) + return _18820; + if ("1883-8".equals(codeString)) + return _18838; + if ("1884-6".equals(codeString)) + return _18846; + if ("1885-3".equals(codeString)) + return _18853; + if ("1886-1".equals(codeString)) + return _18861; + if ("1887-9".equals(codeString)) + return _18879; + if ("1888-7".equals(codeString)) + return _18887; + if ("1889-5".equals(codeString)) + return _18895; + if ("1891-1".equals(codeString)) + return _18911; + if ("1892-9".equals(codeString)) + return _18929; + if ("1893-7".equals(codeString)) + return _18937; + if ("1894-5".equals(codeString)) + return _18945; + if ("1896-0".equals(codeString)) + return _18960; + if ("1897-8".equals(codeString)) + return _18978; + if ("1898-6".equals(codeString)) + return _18986; + if ("1899-4".equals(codeString)) + return _18994; + if ("1900-0".equals(codeString)) + return _19000; + if ("1901-8".equals(codeString)) + return _19018; + if ("1902-6".equals(codeString)) + return _19026; + if ("1903-4".equals(codeString)) + return _19034; + if ("1904-2".equals(codeString)) + return _19042; + if ("1905-9".equals(codeString)) + return _19059; + if ("1906-7".equals(codeString)) + return _19067; + if ("1907-5".equals(codeString)) + return _19075; + if ("1908-3".equals(codeString)) + return _19083; + if ("1909-1".equals(codeString)) + return _19091; + if ("1910-9".equals(codeString)) + return _19109; + if ("1911-7".equals(codeString)) + return _19117; + if ("1912-5".equals(codeString)) + return _19125; + if ("1913-3".equals(codeString)) + return _19133; + if ("1914-1".equals(codeString)) + return _19141; + if ("1915-8".equals(codeString)) + return _19158; + if ("1916-6".equals(codeString)) + return _19166; + if ("1917-4".equals(codeString)) + return _19174; + if ("1918-2".equals(codeString)) + return _19182; + if ("1919-0".equals(codeString)) + return _19190; + if ("1920-8".equals(codeString)) + return _19208; + if ("1921-6".equals(codeString)) + return _19216; + if ("1922-4".equals(codeString)) + return _19224; + if ("1923-2".equals(codeString)) + return _19232; + if ("1924-0".equals(codeString)) + return _19240; + if ("1925-7".equals(codeString)) + return _19257; + if ("1926-5".equals(codeString)) + return _19265; + if ("1927-3".equals(codeString)) + return _19273; + if ("1928-1".equals(codeString)) + return _19281; + if ("1929-9".equals(codeString)) + return _19299; + if ("1930-7".equals(codeString)) + return _19307; + if ("1931-5".equals(codeString)) + return _19315; + if ("1932-3".equals(codeString)) + return _19323; + if ("1933-1".equals(codeString)) + return _19331; + if ("1934-9".equals(codeString)) + return _19349; + if ("1935-6".equals(codeString)) + return _19356; + if ("1936-4".equals(codeString)) + return _19364; + if ("1937-2".equals(codeString)) + return _19372; + if ("1938-0".equals(codeString)) + return _19380; + if ("1939-8".equals(codeString)) + return _19398; + if ("1940-6".equals(codeString)) + return _19406; + if ("1941-4".equals(codeString)) + return _19414; + if ("1942-2".equals(codeString)) + return _19422; + if ("1943-0".equals(codeString)) + return _19430; + if ("1944-8".equals(codeString)) + return _19448; + if ("1945-5".equals(codeString)) + return _19455; + if ("1946-3".equals(codeString)) + return _19463; + if ("1947-1".equals(codeString)) + return _19471; + if ("1948-9".equals(codeString)) + return _19489; + if ("1949-7".equals(codeString)) + return _19497; + if ("1950-5".equals(codeString)) + return _19505; + if ("1951-3".equals(codeString)) + return _19513; + if ("1952-1".equals(codeString)) + return _19521; + if ("1953-9".equals(codeString)) + return _19539; + if ("1954-7".equals(codeString)) + return _19547; + if ("1955-4".equals(codeString)) + return _19554; + if ("1956-2".equals(codeString)) + return _19562; + if ("1957-0".equals(codeString)) + return _19570; + if ("1958-8".equals(codeString)) + return _19588; + if ("1959-6".equals(codeString)) + return _19596; + if ("1960-4".equals(codeString)) + return _19604; + if ("1961-2".equals(codeString)) + return _19612; + if ("1962-0".equals(codeString)) + return _19620; + if ("1963-8".equals(codeString)) + return _19638; + if ("1964-6".equals(codeString)) + return _19646; + if ("1966-1".equals(codeString)) + return _19661; + if ("1968-7".equals(codeString)) + return _19687; + if ("1969-5".equals(codeString)) + return _19695; + if ("1970-3".equals(codeString)) + return _19703; + if ("1972-9".equals(codeString)) + return _19729; + if ("1973-7".equals(codeString)) + return _19737; + if ("1974-5".equals(codeString)) + return _19745; + if ("1975-2".equals(codeString)) + return _19752; + if ("1976-0".equals(codeString)) + return _19760; + if ("1977-8".equals(codeString)) + return _19778; + if ("1978-6".equals(codeString)) + return _19786; + if ("1979-4".equals(codeString)) + return _19794; + if ("1980-2".equals(codeString)) + return _19802; + if ("1981-0".equals(codeString)) + return _19810; + if ("1982-8".equals(codeString)) + return _19828; + if ("1984-4".equals(codeString)) + return _19844; + if ("1985-1".equals(codeString)) + return _19851; + if ("1986-9".equals(codeString)) + return _19869; + if ("1987-7".equals(codeString)) + return _19877; + if ("1988-5".equals(codeString)) + return _19885; + if ("1990-1".equals(codeString)) + return _19901; + if ("1992-7".equals(codeString)) + return _19927; + if ("1993-5".equals(codeString)) + return _19935; + if ("1994-3".equals(codeString)) + return _19943; + if ("1995-0".equals(codeString)) + return _19950; + if ("1996-8".equals(codeString)) + return _19968; + if ("1997-6".equals(codeString)) + return _19976; + if ("1998-4".equals(codeString)) + return _19984; + if ("1999-2".equals(codeString)) + return _19992; + if ("2000-8".equals(codeString)) + return _20008; + if ("2002-4".equals(codeString)) + return _20024; + if ("2004-0".equals(codeString)) + return _20040; + if ("2006-5".equals(codeString)) + return _20065; + if ("2007-3".equals(codeString)) + return _20073; + if ("2008-1".equals(codeString)) + return _20081; + if ("2009-9".equals(codeString)) + return _20099; + if ("2010-7".equals(codeString)) + return _20107; + if ("2011-5".equals(codeString)) + return _20115; + if ("2012-3".equals(codeString)) + return _20123; + if ("2013-1".equals(codeString)) + return _20131; + if ("2014-9".equals(codeString)) + return _20149; + if ("2015-6".equals(codeString)) + return _20156; + if ("2016-4".equals(codeString)) + return _20164; + if ("2017-2".equals(codeString)) + return _20172; + if ("2018-0".equals(codeString)) + return _20180; + if ("2019-8".equals(codeString)) + return _20198; + if ("2020-6".equals(codeString)) + return _20206; + if ("2021-4".equals(codeString)) + return _20214; + if ("2022-2".equals(codeString)) + return _20222; + if ("2023-0".equals(codeString)) + return _20230; + if ("2024-8".equals(codeString)) + return _20248; + if ("2025-5".equals(codeString)) + return _20255; + if ("2026-3".equals(codeString)) + return _20263; + if ("2028-9".equals(codeString)) + return _20289; + if ("2029-7".equals(codeString)) + return _20297; + if ("2030-5".equals(codeString)) + return _20305; + if ("2031-3".equals(codeString)) + return _20313; + if ("2032-1".equals(codeString)) + return _20321; + if ("2033-9".equals(codeString)) + return _20339; + if ("2034-7".equals(codeString)) + return _20347; + if ("2035-4".equals(codeString)) + return _20354; + if ("2036-2".equals(codeString)) + return _20362; + if ("2037-0".equals(codeString)) + return _20370; + if ("2038-8".equals(codeString)) + return _20388; + if ("2039-6".equals(codeString)) + return _20396; + if ("2040-4".equals(codeString)) + return _20404; + if ("2041-2".equals(codeString)) + return _20412; + if ("2042-0".equals(codeString)) + return _20420; + if ("2043-8".equals(codeString)) + return _20438; + if ("2044-6".equals(codeString)) + return _20446; + if ("2045-3".equals(codeString)) + return _20453; + if ("2046-1".equals(codeString)) + return _20461; + if ("2047-9".equals(codeString)) + return _20479; + if ("2048-7".equals(codeString)) + return _20487; + if ("2049-5".equals(codeString)) + return _20495; + if ("2050-3".equals(codeString)) + return _20503; + if ("2051-1".equals(codeString)) + return _20511; + if ("2052-9".equals(codeString)) + return _20529; + if ("2054-5".equals(codeString)) + return _20545; + if ("2056-0".equals(codeString)) + return _20560; + if ("2058-6".equals(codeString)) + return _20586; + if ("2060-2".equals(codeString)) + return _20602; + if ("2061-0".equals(codeString)) + return _20610; + if ("2062-8".equals(codeString)) + return _20628; + if ("2063-6".equals(codeString)) + return _20636; + if ("2064-4".equals(codeString)) + return _20644; + if ("2065-1".equals(codeString)) + return _20651; + if ("2066-9".equals(codeString)) + return _20669; + if ("2067-7".equals(codeString)) + return _20677; + if ("2068-5".equals(codeString)) + return _20685; + if ("2069-3".equals(codeString)) + return _20693; + if ("2070-1".equals(codeString)) + return _20701; + if ("2071-9".equals(codeString)) + return _20719; + if ("2072-7".equals(codeString)) + return _20727; + if ("2073-5".equals(codeString)) + return _20735; + if ("2074-3".equals(codeString)) + return _20743; + if ("2075-0".equals(codeString)) + return _20750; + if ("2076-8".equals(codeString)) + return _20768; + if ("2078-4".equals(codeString)) + return _20784; + if ("2079-2".equals(codeString)) + return _20792; + if ("2080-0".equals(codeString)) + return _20800; + if ("2081-8".equals(codeString)) + return _20818; + if ("2082-6".equals(codeString)) + return _20826; + if ("2083-4".equals(codeString)) + return _20834; + if ("2085-9".equals(codeString)) + return _20859; + if ("2086-7".equals(codeString)) + return _20867; + if ("2087-5".equals(codeString)) + return _20875; + if ("2088-3".equals(codeString)) + return _20883; + if ("2089-1".equals(codeString)) + return _20891; + if ("2090-9".equals(codeString)) + return _20909; + if ("2091-7".equals(codeString)) + return _20917; + if ("2092-5".equals(codeString)) + return _20925; + if ("2093-3".equals(codeString)) + return _20933; + if ("2094-1".equals(codeString)) + return _20941; + if ("2095-8".equals(codeString)) + return _20958; + if ("2096-6".equals(codeString)) + return _20966; + if ("2097-4".equals(codeString)) + return _20974; + if ("2098-2".equals(codeString)) + return _20982; + if ("2100-6".equals(codeString)) + return _21006; + if ("2101-4".equals(codeString)) + return _21014; + if ("2102-2".equals(codeString)) + return _21022; + if ("2103-0".equals(codeString)) + return _21030; + if ("2104-8".equals(codeString)) + return _21048; + if ("2500-7".equals(codeString)) + return _25007; + if ("2106-3".equals(codeString)) + return _21063; + if ("2108-9".equals(codeString)) + return _21089; + if ("2109-7".equals(codeString)) + return _21097; + if ("2110-5".equals(codeString)) + return _21105; + if ("2111-3".equals(codeString)) + return _21113; + if ("2112-1".equals(codeString)) + return _21121; + if ("2113-9".equals(codeString)) + return _21139; + if ("2114-7".equals(codeString)) + return _21147; + if ("2115-4".equals(codeString)) + return _21154; + if ("2116-2".equals(codeString)) + return _21162; + if ("2118-8".equals(codeString)) + return _21188; + if ("2119-6".equals(codeString)) + return _21196; + if ("2120-4".equals(codeString)) + return _21204; + if ("2121-2".equals(codeString)) + return _21212; + if ("2122-0".equals(codeString)) + return _21220; + if ("2123-8".equals(codeString)) + return _21238; + if ("2124-6".equals(codeString)) + return _21246; + if ("2125-3".equals(codeString)) + return _21253; + if ("2126-1".equals(codeString)) + return _21261; + if ("2127-9".equals(codeString)) + return _21279; + if ("2129-5".equals(codeString)) + return _21295; + if ("2131-1".equals(codeString)) + return _21311; + throw new FHIRException("Unknown V3Race code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _10025: return "1002-5"; + case _10041: return "1004-1"; + case _10066: return "1006-6"; + case _10082: return "1008-2"; + case _10108: return "1010-8"; + case _10116: return "1011-6"; + case _10124: return "1012-4"; + case _10132: return "1013-2"; + case _10140: return "1014-0"; + case _10157: return "1015-7"; + case _10165: return "1016-5"; + case _10173: return "1017-3"; + case _10181: return "1018-1"; + case _10199: return "1019-9"; + case _10215: return "1021-5"; + case _10223: return "1022-3"; + case _10231: return "1023-1"; + case _10249: return "1024-9"; + case _10264: return "1026-4"; + case _10280: return "1028-0"; + case _10306: return "1030-6"; + case _10314: return "1031-4"; + case _10330: return "1033-0"; + case _10355: return "1035-5"; + case _10371: return "1037-1"; + case _10397: return "1039-7"; + case _10413: return "1041-3"; + case _10421: return "1042-1"; + case _10447: return "1044-7"; + case _10454: return "1045-4"; + case _10462: return "1046-2"; + case _10470: return "1047-0"; + case _10488: return "1048-8"; + case _10496: return "1049-6"; + case _10504: return "1050-4"; + case _10512: return "1051-2"; + case _10538: return "1053-8"; + case _10546: return "1054-6"; + case _10553: return "1055-3"; + case _10561: return "1056-1"; + case _10579: return "1057-9"; + case _10587: return "1058-7"; + case _10595: return "1059-5"; + case _10603: return "1060-3"; + case _10611: return "1061-1"; + case _10629: return "1062-9"; + case _10637: return "1063-7"; + case _10645: return "1064-5"; + case _10652: return "1065-2"; + case _10660: return "1066-0"; + case _10686: return "1068-6"; + case _10694: return "1069-4"; + case _10702: return "1070-2"; + case _10710: return "1071-0"; + case _10728: return "1072-8"; + case _10736: return "1073-6"; + case _10744: return "1074-4"; + case _10769: return "1076-9"; + case _17418: return "1741-8"; + case _17426: return "1742-6"; + case _17434: return "1743-4"; + case _17442: return "1744-2"; + case _17459: return "1745-9"; + case _17467: return "1746-7"; + case _17475: return "1747-5"; + case _17483: return "1748-3"; + case _17491: return "1749-1"; + case _17509: return "1750-9"; + case _17517: return "1751-7"; + case _17525: return "1752-5"; + case _17533: return "1753-3"; + case _17541: return "1754-1"; + case _17558: return "1755-8"; + case _17566: return "1756-6"; + case _17574: return "1757-4"; + case _17582: return "1758-2"; + case _17590: return "1759-0"; + case _17608: return "1760-8"; + case _17616: return "1761-6"; + case _17624: return "1762-4"; + case _17632: return "1763-2"; + case _17640: return "1764-0"; + case _17657: return "1765-7"; + case _17665: return "1766-5"; + case _17673: return "1767-3"; + case _17681: return "1768-1"; + case _17699: return "1769-9"; + case _17707: return "1770-7"; + case _17715: return "1771-5"; + case _17723: return "1772-3"; + case _17731: return "1773-1"; + case _17749: return "1774-9"; + case _17756: return "1775-6"; + case _17764: return "1776-4"; + case _17772: return "1777-2"; + case _17780: return "1778-0"; + case _17798: return "1779-8"; + case _17806: return "1780-6"; + case _17814: return "1781-4"; + case _17822: return "1782-2"; + case _17830: return "1783-0"; + case _17848: return "1784-8"; + case _17855: return "1785-5"; + case _17863: return "1786-3"; + case _17871: return "1787-1"; + case _17889: return "1788-9"; + case _17897: return "1789-7"; + case _17905: return "1790-5"; + case _17913: return "1791-3"; + case _17921: return "1792-1"; + case _17939: return "1793-9"; + case _17947: return "1794-7"; + case _17954: return "1795-4"; + case _17962: return "1796-2"; + case _17970: return "1797-0"; + case _17988: return "1798-8"; + case _17996: return "1799-6"; + case _18002: return "1800-2"; + case _18010: return "1801-0"; + case _18028: return "1802-8"; + case _18036: return "1803-6"; + case _18044: return "1804-4"; + case _18051: return "1805-1"; + case _18069: return "1806-9"; + case _18077: return "1807-7"; + case _18085: return "1808-5"; + case _18093: return "1809-3"; + case _10785: return "1078-5"; + case _10801: return "1080-1"; + case _10827: return "1082-7"; + case _10835: return "1083-5"; + case _10843: return "1084-3"; + case _10868: return "1086-8"; + case _10884: return "1088-4"; + case _10892: return "1089-2"; + case _10900: return "1090-0"; + case _10918: return "1091-8"; + case _10926: return "1092-6"; + case _10934: return "1093-4"; + case _10942: return "1094-2"; + case _10959: return "1095-9"; + case _10967: return "1096-7"; + case _10975: return "1097-5"; + case _10983: return "1098-3"; + case _11007: return "1100-7"; + case _11023: return "1102-3"; + case _11031: return "1103-1"; + case _11049: return "1104-9"; + case _11064: return "1106-4"; + case _11080: return "1108-0"; + case _11098: return "1109-8"; + case _11106: return "1110-6"; + case _11122: return "1112-2"; + case _11148: return "1114-8"; + case _11155: return "1115-5"; + case _11163: return "1116-3"; + case _11171: return "1117-1"; + case _11189: return "1118-9"; + case _11197: return "1119-7"; + case _11205: return "1120-5"; + case _11213: return "1121-3"; + case _11239: return "1123-9"; + case _11247: return "1124-7"; + case _11254: return "1125-4"; + case _11262: return "1126-2"; + case _11270: return "1127-0"; + case _11288: return "1128-8"; + case _11296: return "1129-6"; + case _11304: return "1130-4"; + case _11312: return "1131-2"; + case _11320: return "1132-0"; + case _11338: return "1133-8"; + case _11346: return "1134-6"; + case _11353: return "1135-3"; + case _11361: return "1136-1"; + case _11379: return "1137-9"; + case _11387: return "1138-7"; + case _11395: return "1139-5"; + case _11403: return "1140-3"; + case _11411: return "1141-1"; + case _11429: return "1142-9"; + case _11437: return "1143-7"; + case _11445: return "1144-5"; + case _11452: return "1145-2"; + case _11460: return "1146-0"; + case _11478: return "1147-8"; + case _11486: return "1148-6"; + case _11502: return "1150-2"; + case _11510: return "1151-0"; + case _11536: return "1153-6"; + case _11551: return "1155-1"; + case _11569: return "1156-9"; + case _11577: return "1157-7"; + case _11585: return "1158-5"; + case _11593: return "1159-3"; + case _11601: return "1160-1"; + case _11627: return "1162-7"; + case _11635: return "1163-5"; + case _11650: return "1165-0"; + case _11676: return "1167-6"; + case _11692: return "1169-2"; + case _11718: return "1171-8"; + case _11734: return "1173-4"; + case _11759: return "1175-9"; + case _11767: return "1176-7"; + case _11783: return "1178-3"; + case _11809: return "1180-9"; + case _11825: return "1182-5"; + case _11841: return "1184-1"; + case _11866: return "1186-6"; + case _11874: return "1187-4"; + case _11890: return "1189-0"; + case _11916: return "1191-6"; + case _11932: return "1193-2"; + case _11940: return "1194-0"; + case _11957: return "1195-7"; + case _11965: return "1196-5"; + case _11973: return "1197-3"; + case _11981: return "1198-1"; + case _11999: return "1199-9"; + case _12005: return "1200-5"; + case _12013: return "1201-3"; + case _12021: return "1202-1"; + case _12039: return "1203-9"; + case _12047: return "1204-7"; + case _12054: return "1205-4"; + case _12070: return "1207-0"; + case _12096: return "1209-6"; + case _12112: return "1211-2"; + case _12120: return "1212-0"; + case _12146: return "1214-6"; + case _12153: return "1215-3"; + case _12161: return "1216-1"; + case _12179: return "1217-9"; + case _12187: return "1218-7"; + case _12195: return "1219-5"; + case _12203: return "1220-3"; + case _12229: return "1222-9"; + case _12237: return "1223-7"; + case _12245: return "1224-5"; + case _12252: return "1225-2"; + case _12260: return "1226-0"; + case _12278: return "1227-8"; + case _12286: return "1228-6"; + case _12294: return "1229-4"; + case _12302: return "1230-2"; + case _12310: return "1231-0"; + case _12336: return "1233-6"; + case _12344: return "1234-4"; + case _12351: return "1235-1"; + case _12369: return "1236-9"; + case _12377: return "1237-7"; + case _12385: return "1238-5"; + case _12393: return "1239-3"; + case _12401: return "1240-1"; + case _12419: return "1241-9"; + case _12427: return "1242-7"; + case _12435: return "1243-5"; + case _12443: return "1244-3"; + case _12450: return "1245-0"; + case _12468: return "1246-8"; + case _12476: return "1247-6"; + case _12484: return "1248-4"; + case _12500: return "1250-0"; + case _12526: return "1252-6"; + case _12542: return "1254-2"; + case _12567: return "1256-7"; + case _12583: return "1258-3"; + case _12609: return "1260-9"; + case _12625: return "1262-5"; + case _12641: return "1264-1"; + case _12658: return "1265-8"; + case _12674: return "1267-4"; + case _12690: return "1269-0"; + case _12716: return "1271-6"; + case _12724: return "1272-4"; + case _12732: return "1273-2"; + case _12757: return "1275-7"; + case _12773: return "1277-3"; + case _12799: return "1279-9"; + case _12815: return "1281-5"; + case _12823: return "1282-3"; + case _12831: return "1283-1"; + case _12856: return "1285-6"; + case _12864: return "1286-4"; + case _12872: return "1287-2"; + case _12880: return "1288-0"; + case _12898: return "1289-8"; + case _12906: return "1290-6"; + case _12914: return "1291-4"; + case _12922: return "1292-2"; + case _12930: return "1293-0"; + case _12948: return "1294-8"; + case _12955: return "1295-5"; + case _12971: return "1297-1"; + case _12997: return "1299-7"; + case _13011: return "1301-1"; + case _13037: return "1303-7"; + case _13052: return "1305-2"; + case _13060: return "1306-0"; + case _13078: return "1307-8"; + case _13094: return "1309-4"; + case _13102: return "1310-2"; + case _13128: return "1312-8"; + case _13136: return "1313-6"; + case _13144: return "1314-4"; + case _13151: return "1315-1"; + case _13177: return "1317-7"; + case _13193: return "1319-3"; + case _13219: return "1321-9"; + case _13235: return "1323-5"; + case _13250: return "1325-0"; + case _13268: return "1326-8"; + case _13276: return "1327-6"; + case _13284: return "1328-4"; + case _13292: return "1329-2"; + case _13318: return "1331-8"; + case _13326: return "1332-6"; + case _13334: return "1333-4"; + case _13342: return "1334-2"; + case _13359: return "1335-9"; + case _13367: return "1336-7"; + case _13375: return "1337-5"; + case _13383: return "1338-3"; + case _13409: return "1340-9"; + case _13425: return "1342-5"; + case _13441: return "1344-1"; + case _13458: return "1345-8"; + case _13466: return "1346-6"; + case _13482: return "1348-2"; + case _13508: return "1350-8"; + case _13524: return "1352-4"; + case _13540: return "1354-0"; + case _13565: return "1356-5"; + case _13581: return "1358-1"; + case _13599: return "1359-9"; + case _13607: return "1360-7"; + case _13615: return "1361-5"; + case _13631: return "1363-1"; + case _13656: return "1365-6"; + case _13664: return "1366-4"; + case _13680: return "1368-0"; + case _13706: return "1370-6"; + case _13722: return "1372-2"; + case _13748: return "1374-8"; + case _13763: return "1376-3"; + case _13789: return "1378-9"; + case _13805: return "1380-5"; + case _13821: return "1382-1"; + case _13839: return "1383-9"; + case _13847: return "1384-7"; + case _13854: return "1385-4"; + case _13870: return "1387-0"; + case _13896: return "1389-6"; + case _13912: return "1391-2"; + case _13920: return "1392-0"; + case _13938: return "1393-8"; + case _13946: return "1394-6"; + case _13953: return "1395-3"; + case _13961: return "1396-1"; + case _13979: return "1397-9"; + case _13987: return "1398-7"; + case _13995: return "1399-5"; + case _14001: return "1400-1"; + case _14019: return "1401-9"; + case _14035: return "1403-5"; + case _14050: return "1405-0"; + case _14076: return "1407-6"; + case _14092: return "1409-2"; + case _14118: return "1411-8"; + case _14126: return "1412-6"; + case _14134: return "1413-4"; + case _14142: return "1414-2"; + case _14167: return "1416-7"; + case _14175: return "1417-5"; + case _14183: return "1418-3"; + case _14191: return "1419-1"; + case _14209: return "1420-9"; + case _14217: return "1421-7"; + case _14225: return "1422-5"; + case _14233: return "1423-3"; + case _14241: return "1424-1"; + case _14258: return "1425-8"; + case _14266: return "1426-6"; + case _14274: return "1427-4"; + case _14282: return "1428-2"; + case _14290: return "1429-0"; + case _14308: return "1430-8"; + case _14316: return "1431-6"; + case _14324: return "1432-4"; + case _14332: return "1433-2"; + case _14340: return "1434-0"; + case _14357: return "1435-7"; + case _14365: return "1436-5"; + case _14373: return "1437-3"; + case _14399: return "1439-9"; + case _14415: return "1441-5"; + case _14423: return "1442-3"; + case _14431: return "1443-1"; + case _14456: return "1445-6"; + case _14464: return "1446-4"; + case _14480: return "1448-0"; + case _14506: return "1450-6"; + case _14514: return "1451-4"; + case _14530: return "1453-0"; + case _14548: return "1454-8"; + case _14563: return "1456-3"; + case _14571: return "1457-1"; + case _14589: return "1458-9"; + case _14605: return "1460-5"; + case _14621: return "1462-1"; + case _14647: return "1464-7"; + case _14654: return "1465-4"; + case _14662: return "1466-2"; + case _14670: return "1467-0"; + case _14688: return "1468-8"; + case _14696: return "1469-6"; + case _14704: return "1470-4"; + case _14712: return "1471-2"; + case _14720: return "1472-0"; + case _14746: return "1474-6"; + case _14753: return "1475-3"; + case _14761: return "1476-1"; + case _14787: return "1478-7"; + case _14795: return "1479-5"; + case _14803: return "1480-3"; + case _14811: return "1481-1"; + case _14829: return "1482-9"; + case _14837: return "1483-7"; + case _14845: return "1484-5"; + case _14852: return "1485-2"; + case _14878: return "1487-8"; + case _14894: return "1489-4"; + case _14902: return "1490-2"; + case _14910: return "1491-0"; + case _14928: return "1492-8"; + case _14936: return "1493-6"; + case _14944: return "1494-4"; + case _14951: return "1495-1"; + case _14969: return "1496-9"; + case _14977: return "1497-7"; + case _14985: return "1498-5"; + case _14993: return "1499-3"; + case _15008: return "1500-8"; + case _15016: return "1501-6"; + case _15024: return "1502-4"; + case _15032: return "1503-2"; + case _15040: return "1504-0"; + case _15057: return "1505-7"; + case _15065: return "1506-5"; + case _15073: return "1507-3"; + case _15081: return "1508-1"; + case _15099: return "1509-9"; + case _15107: return "1510-7"; + case _15115: return "1511-5"; + case _15123: return "1512-3"; + case _15131: return "1513-1"; + case _15149: return "1514-9"; + case _15156: return "1515-6"; + case _15164: return "1516-4"; + case _15180: return "1518-0"; + case _15198: return "1519-8"; + case _15206: return "1520-6"; + case _15214: return "1521-4"; + case _15222: return "1522-2"; + case _15230: return "1523-0"; + case _15248: return "1524-8"; + case _15255: return "1525-5"; + case _15263: return "1526-3"; + case _15271: return "1527-1"; + case _15289: return "1528-9"; + case _15297: return "1529-7"; + case _15305: return "1530-5"; + case _15313: return "1531-3"; + case _15321: return "1532-1"; + case _15339: return "1533-9"; + case _15347: return "1534-7"; + case _15354: return "1535-4"; + case _15362: return "1536-2"; + case _15370: return "1537-0"; + case _15388: return "1538-8"; + case _15396: return "1539-6"; + case _15412: return "1541-2"; + case _15438: return "1543-8"; + case _15453: return "1545-3"; + case _15479: return "1547-9"; + case _15495: return "1549-5"; + case _15511: return "1551-1"; + case _15529: return "1552-9"; + case _15537: return "1553-7"; + case _15545: return "1554-5"; + case _15560: return "1556-0"; + case _15586: return "1558-6"; + case _15602: return "1560-2"; + case _15628: return "1562-8"; + case _15644: return "1564-4"; + case _15669: return "1566-9"; + case _15677: return "1567-7"; + case _15685: return "1568-5"; + case _15693: return "1569-3"; + case _15701: return "1570-1"; + case _15719: return "1571-9"; + case _15735: return "1573-5"; + case _15743: return "1574-3"; + case _15768: return "1576-8"; + case _15784: return "1578-4"; + case _15792: return "1579-2"; + case _15800: return "1580-0"; + case _15826: return "1582-6"; + case _15842: return "1584-2"; + case _15867: return "1586-7"; + case _15875: return "1587-5"; + case _15883: return "1588-3"; + case _15891: return "1589-1"; + case _15909: return "1590-9"; + case _15917: return "1591-7"; + case _15925: return "1592-5"; + case _15933: return "1593-3"; + case _15941: return "1594-1"; + case _15958: return "1595-8"; + case _15966: return "1596-6"; + case _15974: return "1597-4"; + case _15982: return "1598-2"; + case _15990: return "1599-0"; + case _16006: return "1600-6"; + case _16022: return "1602-2"; + case _16030: return "1603-0"; + case _16048: return "1604-8"; + case _16055: return "1605-5"; + case _16071: return "1607-1"; + case _16097: return "1609-7"; + case _16105: return "1610-5"; + case _16113: return "1611-3"; + case _16121: return "1612-1"; + case _16139: return "1613-9"; + case _16147: return "1614-7"; + case _16154: return "1615-4"; + case _16162: return "1616-2"; + case _16170: return "1617-0"; + case _16188: return "1618-8"; + case _16196: return "1619-6"; + case _16204: return "1620-4"; + case _16212: return "1621-2"; + case _16220: return "1622-0"; + case _16238: return "1623-8"; + case _16246: return "1624-6"; + case _16253: return "1625-3"; + case _16261: return "1626-1"; + case _16279: return "1627-9"; + case _16287: return "1628-7"; + case _16295: return "1629-5"; + case _16303: return "1630-3"; + case _16311: return "1631-1"; + case _16329: return "1632-9"; + case _16337: return "1633-7"; + case _16345: return "1634-5"; + case _16352: return "1635-2"; + case _16360: return "1636-0"; + case _16378: return "1637-8"; + case _16386: return "1638-6"; + case _16394: return "1639-4"; + case _16402: return "1640-2"; + case _16410: return "1641-0"; + case _16436: return "1643-6"; + case _16451: return "1645-1"; + case _16477: return "1647-7"; + case _16493: return "1649-3"; + case _16519: return "1651-9"; + case _16535: return "1653-5"; + case _16543: return "1654-3"; + case _16550: return "1655-0"; + case _16568: return "1656-8"; + case _16576: return "1657-6"; + case _16592: return "1659-2"; + case _16618: return "1661-8"; + case _16634: return "1663-4"; + case _16659: return "1665-9"; + case _16675: return "1667-5"; + case _16683: return "1668-3"; + case _16709: return "1670-9"; + case _16717: return "1671-7"; + case _16725: return "1672-5"; + case _16733: return "1673-3"; + case _16758: return "1675-8"; + case _16774: return "1677-4"; + case _16790: return "1679-0"; + case _16808: return "1680-8"; + case _16816: return "1681-6"; + case _16832: return "1683-2"; + case _16857: return "1685-7"; + case _16873: return "1687-3"; + case _16881: return "1688-1"; + case _16899: return "1689-9"; + case _16907: return "1690-7"; + case _16923: return "1692-3"; + case _16949: return "1694-9"; + case _16964: return "1696-4"; + case _16972: return "1697-2"; + case _16980: return "1698-0"; + case _17004: return "1700-4"; + case _17020: return "1702-0"; + case _17046: return "1704-6"; + case _17053: return "1705-3"; + case _17079: return "1707-9"; + case _17095: return "1709-5"; + case _17111: return "1711-1"; + case _17129: return "1712-9"; + case _17137: return "1713-7"; + case _17152: return "1715-2"; + case _17178: return "1717-8"; + case _17186: return "1718-6"; + case _17194: return "1719-4"; + case _17202: return "1720-2"; + case _17228: return "1722-8"; + case _17244: return "1724-4"; + case _17251: return "1725-1"; + case _17269: return "1726-9"; + case _17277: return "1727-7"; + case _17285: return "1728-5"; + case _17293: return "1729-3"; + case _17301: return "1730-1"; + case _17319: return "1731-9"; + case _17327: return "1732-7"; + case _17335: return "1733-5"; + case _17350: return "1735-0"; + case _17376: return "1737-6"; + case _17392: return "1739-2"; + case _17400: return "1740-0"; + case _18119: return "1811-9"; + case _18135: return "1813-5"; + case _18143: return "1814-3"; + case _18150: return "1815-0"; + case _18168: return "1816-8"; + case _18176: return "1817-6"; + case _18184: return "1818-4"; + case _18192: return "1819-2"; + case _18200: return "1820-0"; + case _18218: return "1821-8"; + case _18226: return "1822-6"; + case _18234: return "1823-4"; + case _18242: return "1824-2"; + case _18259: return "1825-9"; + case _18267: return "1826-7"; + case _18275: return "1827-5"; + case _18283: return "1828-3"; + case _18291: return "1829-1"; + case _18309: return "1830-9"; + case _18317: return "1831-7"; + case _18325: return "1832-5"; + case _18333: return "1833-3"; + case _18341: return "1834-1"; + case _18358: return "1835-8"; + case _18374: return "1837-4"; + case _18382: return "1838-2"; + case _18408: return "1840-8"; + case _18424: return "1842-4"; + case _18440: return "1844-0"; + case _18457: return "1845-7"; + case _18465: return "1846-5"; + case _18473: return "1847-3"; + case _18481: return "1848-1"; + case _18499: return "1849-9"; + case _18507: return "1850-7"; + case _18515: return "1851-5"; + case _18523: return "1852-3"; + case _18531: return "1853-1"; + case _18549: return "1854-9"; + case _18556: return "1855-6"; + case _18564: return "1856-4"; + case _18572: return "1857-2"; + case _18580: return "1858-0"; + case _18598: return "1859-8"; + case _18606: return "1860-6"; + case _18614: return "1861-4"; + case _18622: return "1862-2"; + case _18630: return "1863-0"; + case _18648: return "1864-8"; + case _18655: return "1865-5"; + case _18663: return "1866-3"; + case _18671: return "1867-1"; + case _18689: return "1868-9"; + case _18697: return "1869-7"; + case _18705: return "1870-5"; + case _18713: return "1871-3"; + case _18721: return "1872-1"; + case _18739: return "1873-9"; + case _18747: return "1874-7"; + case _18754: return "1875-4"; + case _18762: return "1876-2"; + case _18770: return "1877-0"; + case _18788: return "1878-8"; + case _18796: return "1879-6"; + case _18804: return "1880-4"; + case _18812: return "1881-2"; + case _18820: return "1882-0"; + case _18838: return "1883-8"; + case _18846: return "1884-6"; + case _18853: return "1885-3"; + case _18861: return "1886-1"; + case _18879: return "1887-9"; + case _18887: return "1888-7"; + case _18895: return "1889-5"; + case _18911: return "1891-1"; + case _18929: return "1892-9"; + case _18937: return "1893-7"; + case _18945: return "1894-5"; + case _18960: return "1896-0"; + case _18978: return "1897-8"; + case _18986: return "1898-6"; + case _18994: return "1899-4"; + case _19000: return "1900-0"; + case _19018: return "1901-8"; + case _19026: return "1902-6"; + case _19034: return "1903-4"; + case _19042: return "1904-2"; + case _19059: return "1905-9"; + case _19067: return "1906-7"; + case _19075: return "1907-5"; + case _19083: return "1908-3"; + case _19091: return "1909-1"; + case _19109: return "1910-9"; + case _19117: return "1911-7"; + case _19125: return "1912-5"; + case _19133: return "1913-3"; + case _19141: return "1914-1"; + case _19158: return "1915-8"; + case _19166: return "1916-6"; + case _19174: return "1917-4"; + case _19182: return "1918-2"; + case _19190: return "1919-0"; + case _19208: return "1920-8"; + case _19216: return "1921-6"; + case _19224: return "1922-4"; + case _19232: return "1923-2"; + case _19240: return "1924-0"; + case _19257: return "1925-7"; + case _19265: return "1926-5"; + case _19273: return "1927-3"; + case _19281: return "1928-1"; + case _19299: return "1929-9"; + case _19307: return "1930-7"; + case _19315: return "1931-5"; + case _19323: return "1932-3"; + case _19331: return "1933-1"; + case _19349: return "1934-9"; + case _19356: return "1935-6"; + case _19364: return "1936-4"; + case _19372: return "1937-2"; + case _19380: return "1938-0"; + case _19398: return "1939-8"; + case _19406: return "1940-6"; + case _19414: return "1941-4"; + case _19422: return "1942-2"; + case _19430: return "1943-0"; + case _19448: return "1944-8"; + case _19455: return "1945-5"; + case _19463: return "1946-3"; + case _19471: return "1947-1"; + case _19489: return "1948-9"; + case _19497: return "1949-7"; + case _19505: return "1950-5"; + case _19513: return "1951-3"; + case _19521: return "1952-1"; + case _19539: return "1953-9"; + case _19547: return "1954-7"; + case _19554: return "1955-4"; + case _19562: return "1956-2"; + case _19570: return "1957-0"; + case _19588: return "1958-8"; + case _19596: return "1959-6"; + case _19604: return "1960-4"; + case _19612: return "1961-2"; + case _19620: return "1962-0"; + case _19638: return "1963-8"; + case _19646: return "1964-6"; + case _19661: return "1966-1"; + case _19687: return "1968-7"; + case _19695: return "1969-5"; + case _19703: return "1970-3"; + case _19729: return "1972-9"; + case _19737: return "1973-7"; + case _19745: return "1974-5"; + case _19752: return "1975-2"; + case _19760: return "1976-0"; + case _19778: return "1977-8"; + case _19786: return "1978-6"; + case _19794: return "1979-4"; + case _19802: return "1980-2"; + case _19810: return "1981-0"; + case _19828: return "1982-8"; + case _19844: return "1984-4"; + case _19851: return "1985-1"; + case _19869: return "1986-9"; + case _19877: return "1987-7"; + case _19885: return "1988-5"; + case _19901: return "1990-1"; + case _19927: return "1992-7"; + case _19935: return "1993-5"; + case _19943: return "1994-3"; + case _19950: return "1995-0"; + case _19968: return "1996-8"; + case _19976: return "1997-6"; + case _19984: return "1998-4"; + case _19992: return "1999-2"; + case _20008: return "2000-8"; + case _20024: return "2002-4"; + case _20040: return "2004-0"; + case _20065: return "2006-5"; + case _20073: return "2007-3"; + case _20081: return "2008-1"; + case _20099: return "2009-9"; + case _20107: return "2010-7"; + case _20115: return "2011-5"; + case _20123: return "2012-3"; + case _20131: return "2013-1"; + case _20149: return "2014-9"; + case _20156: return "2015-6"; + case _20164: return "2016-4"; + case _20172: return "2017-2"; + case _20180: return "2018-0"; + case _20198: return "2019-8"; + case _20206: return "2020-6"; + case _20214: return "2021-4"; + case _20222: return "2022-2"; + case _20230: return "2023-0"; + case _20248: return "2024-8"; + case _20255: return "2025-5"; + case _20263: return "2026-3"; + case _20289: return "2028-9"; + case _20297: return "2029-7"; + case _20305: return "2030-5"; + case _20313: return "2031-3"; + case _20321: return "2032-1"; + case _20339: return "2033-9"; + case _20347: return "2034-7"; + case _20354: return "2035-4"; + case _20362: return "2036-2"; + case _20370: return "2037-0"; + case _20388: return "2038-8"; + case _20396: return "2039-6"; + case _20404: return "2040-4"; + case _20412: return "2041-2"; + case _20420: return "2042-0"; + case _20438: return "2043-8"; + case _20446: return "2044-6"; + case _20453: return "2045-3"; + case _20461: return "2046-1"; + case _20479: return "2047-9"; + case _20487: return "2048-7"; + case _20495: return "2049-5"; + case _20503: return "2050-3"; + case _20511: return "2051-1"; + case _20529: return "2052-9"; + case _20545: return "2054-5"; + case _20560: return "2056-0"; + case _20586: return "2058-6"; + case _20602: return "2060-2"; + case _20610: return "2061-0"; + case _20628: return "2062-8"; + case _20636: return "2063-6"; + case _20644: return "2064-4"; + case _20651: return "2065-1"; + case _20669: return "2066-9"; + case _20677: return "2067-7"; + case _20685: return "2068-5"; + case _20693: return "2069-3"; + case _20701: return "2070-1"; + case _20719: return "2071-9"; + case _20727: return "2072-7"; + case _20735: return "2073-5"; + case _20743: return "2074-3"; + case _20750: return "2075-0"; + case _20768: return "2076-8"; + case _20784: return "2078-4"; + case _20792: return "2079-2"; + case _20800: return "2080-0"; + case _20818: return "2081-8"; + case _20826: return "2082-6"; + case _20834: return "2083-4"; + case _20859: return "2085-9"; + case _20867: return "2086-7"; + case _20875: return "2087-5"; + case _20883: return "2088-3"; + case _20891: return "2089-1"; + case _20909: return "2090-9"; + case _20917: return "2091-7"; + case _20925: return "2092-5"; + case _20933: return "2093-3"; + case _20941: return "2094-1"; + case _20958: return "2095-8"; + case _20966: return "2096-6"; + case _20974: return "2097-4"; + case _20982: return "2098-2"; + case _21006: return "2100-6"; + case _21014: return "2101-4"; + case _21022: return "2102-2"; + case _21030: return "2103-0"; + case _21048: return "2104-8"; + case _25007: return "2500-7"; + case _21063: return "2106-3"; + case _21089: return "2108-9"; + case _21097: return "2109-7"; + case _21105: return "2110-5"; + case _21113: return "2111-3"; + case _21121: return "2112-1"; + case _21139: return "2113-9"; + case _21147: return "2114-7"; + case _21154: return "2115-4"; + case _21162: return "2116-2"; + case _21188: return "2118-8"; + case _21196: return "2119-6"; + case _21204: return "2120-4"; + case _21212: return "2121-2"; + case _21220: return "2122-0"; + case _21238: return "2123-8"; + case _21246: return "2124-6"; + case _21253: return "2125-3"; + case _21261: return "2126-1"; + case _21279: return "2127-9"; + case _21295: return "2129-5"; + case _21311: return "2131-1"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Race"; + } + public String getDefinition() { + switch (this) { + case _10025: return "American Indian or Alaska Native"; + case _10041: return "American Indian"; + case _10066: return "Abenaki"; + case _10082: return "Algonquian"; + case _10108: return "Apache"; + case _10116: return "Chiricahua"; + case _10124: return "Fort Sill Apache"; + case _10132: return "Jicarilla Apache"; + case _10140: return "Lipan Apache"; + case _10157: return "Mescalero Apache"; + case _10165: return "Oklahoma Apache"; + case _10173: return "Payson Apache"; + case _10181: return "San Carlos Apache"; + case _10199: return "White Mountain Apache"; + case _10215: return "Arapaho"; + case _10223: return "Northern Arapaho"; + case _10231: return "Southern Arapaho"; + case _10249: return "Wind River Arapaho"; + case _10264: return "Arikara"; + case _10280: return "Assiniboine"; + case _10306: return "Assiniboine Sioux"; + case _10314: return "Fort Peck Assiniboine Sioux"; + case _10330: return "Bannock"; + case _10355: return "Blackfeet"; + case _10371: return "Brotherton"; + case _10397: return "Burt Lake Band"; + case _10413: return "Caddo"; + case _10421: return "Oklahoma Cado"; + case _10447: return "Cahuilla"; + case _10454: return "Agua Caliente Cahuilla"; + case _10462: return "Augustine"; + case _10470: return "Cabazon"; + case _10488: return "Los Coyotes"; + case _10496: return "Morongo"; + case _10504: return "Santa Rosa Cahuilla"; + case _10512: return "Torres-Martinez"; + case _10538: return "California Tribes"; + case _10546: return "Cahto"; + case _10553: return "Chimariko"; + case _10561: return "Coast Miwok"; + case _10579: return "Digger"; + case _10587: return "Kawaiisu"; + case _10595: return "Kern River"; + case _10603: return "Mattole"; + case _10611: return "Red Wood"; + case _10629: return "Santa Rosa"; + case _10637: return "Takelma"; + case _10645: return "Wappo"; + case _10652: return "Yana"; + case _10660: return "Yuki"; + case _10686: return "Canadian and Latin American Indian"; + case _10694: return "Canadian Indian"; + case _10702: return "Central American Indian"; + case _10710: return "French American Indian"; + case _10728: return "Mexican American Indian"; + case _10736: return "South American Indian"; + case _10744: return "Spanish American Indian"; + case _10769: return "Catawba"; + case _17418: return "Alatna"; + case _17426: return "Alexander"; + case _17434: return "Allakaket"; + case _17442: return "Alanvik"; + case _17459: return "Anvik"; + case _17467: return "Arctic"; + case _17475: return "Beaver"; + case _17483: return "Birch Creek"; + case _17491: return "Cantwell"; + case _17509: return "Chalkyitsik"; + case _17517: return "Chickaloon"; + case _17525: return "Chistochina"; + case _17533: return "Chitina"; + case _17541: return "Circle"; + case _17558: return "Cook Inlet"; + case _17566: return "Copper Center"; + case _17574: return "Copper River"; + case _17582: return "Dot Lake"; + case _17590: return "Doyon"; + case _17608: return "Eagle"; + case _17616: return "Eklutna"; + case _17624: return "Evansville"; + case _17632: return "Fort Yukon"; + case _17640: return "Gakona"; + case _17657: return "Galena"; + case _17665: return "Grayling"; + case _17673: return "Gulkana"; + case _17681: return "Healy Lake"; + case _17699: return "Holy Cross"; + case _17707: return "Hughes"; + case _17715: return "Huslia"; + case _17723: return "Iliamna"; + case _17731: return "Kaltag"; + case _17749: return "Kluti Kaah"; + case _17756: return "Knik"; + case _17764: return "Koyukuk"; + case _17772: return "Lake Minchumina"; + case _17780: return "Lime"; + case _17798: return "Mcgrath"; + case _17806: return "Manley Hot Springs"; + case _17814: return "Mentasta Lake"; + case _17822: return "Minto"; + case _17830: return "Nenana"; + case _17848: return "Nikolai"; + case _17855: return "Ninilchik"; + case _17863: return "Nondalton"; + case _17871: return "Northway"; + case _17889: return "Nulato"; + case _17897: return "Pedro Bay"; + case _17905: return "Rampart"; + case _17913: return "Ruby"; + case _17921: return "Salamatof"; + case _17939: return "Seldovia"; + case _17947: return "Slana"; + case _17954: return "Shageluk"; + case _17962: return "Stevens"; + case _17970: return "Stony River"; + case _17988: return "Takotna"; + case _17996: return "Tanacross"; + case _18002: return "Tanaina"; + case _18010: return "Tanana"; + case _18028: return "Tanana Chiefs"; + case _18036: return "Tazlina"; + case _18044: return "Telida"; + case _18051: return "Tetlin"; + case _18069: return "Tok"; + case _18077: return "Tyonek"; + case _18085: return "Venetie"; + case _18093: return "Wiseman"; + case _10785: return "Cayuse"; + case _10801: return "Chehalis"; + case _10827: return "Chemakuan"; + case _10835: return "Hoh"; + case _10843: return "Quileute"; + case _10868: return "Chemehuevi"; + case _10884: return "Cherokee"; + case _10892: return "Cherokee Alabama"; + case _10900: return "Cherokees of Northeast Alabama"; + case _10918: return "Cherokees of Southeast Alabama"; + case _10926: return "Eastern Cherokee"; + case _10934: return "Echota Cherokee"; + case _10942: return "Etowah Cherokee"; + case _10959: return "Northern Cherokee"; + case _10967: return "Tuscola"; + case _10975: return "United Keetowah Band of Cherokee"; + case _10983: return "Western Cherokee"; + case _11007: return "Cherokee Shawnee"; + case _11023: return "Cheyenne"; + case _11031: return "Northern Cheyenne"; + case _11049: return "Southern Cheyenne"; + case _11064: return "Cheyenne-Arapaho"; + case _11080: return "Chickahominy"; + case _11098: return "Eastern Chickahominy"; + case _11106: return "Western Chickahominy"; + case _11122: return "Chickasaw"; + case _11148: return "Chinook"; + case _11155: return "Clatsop"; + case _11163: return "Columbia River Chinook"; + case _11171: return "Kathlamet"; + case _11189: return "Upper Chinook"; + case _11197: return "Wakiakum Chinook"; + case _11205: return "Willapa Chinook"; + case _11213: return "Wishram"; + case _11239: return "Chippewa"; + case _11247: return "Bad River"; + case _11254: return "Bay Mills Chippewa"; + case _11262: return "Bois Forte"; + case _11270: return "Burt Lake Chippewa"; + case _11288: return "Fond du Lac"; + case _11296: return "Grand Portage"; + case _11304: return "Grand Traverse Band of Ottawa-Chippewa"; + case _11312: return "Keweenaw"; + case _11320: return "Lac Courte Oreilles"; + case _11338: return "Lac du Flambeau"; + case _11346: return "Lac Vieux Desert Chippewa"; + case _11353: return "Lake Superior"; + case _11361: return "Leech Lake"; + case _11379: return "Little Shell Chippewa"; + case _11387: return "Mille Lacs"; + case _11395: return "Minnesota Chippewa"; + case _11403: return "Ontonagon"; + case _11411: return "Red Cliff Chippewa"; + case _11429: return "Red Lake Chippewa"; + case _11437: return "Saginaw Chippewa"; + case _11445: return "St. Croix Chippewa"; + case _11452: return "Sault Ste. Marie Chippewa"; + case _11460: return "Sokoagon Chippewa"; + case _11478: return "Turtle Mountain"; + case _11486: return "White Earth"; + case _11502: return "Chippewa Cree"; + case _11510: return "Rocky Boy's Chippewa Cree"; + case _11536: return "Chitimacha"; + case _11551: return "Choctaw"; + case _11569: return "Clifton Choctaw"; + case _11577: return "Jena Choctaw"; + case _11585: return "Mississippi Choctaw"; + case _11593: return "Mowa Band of Choctaw"; + case _11601: return "Oklahoma Choctaw"; + case _11627: return "Chumash"; + case _11635: return "Santa Ynez"; + case _11650: return "Clear Lake"; + case _11676: return "Coeur D'Alene"; + case _11692: return "Coharie"; + case _11718: return "Colorado River"; + case _11734: return "Colville"; + case _11759: return "Comanche"; + case _11767: return "Oklahoma Comanche"; + case _11783: return "Coos, Lower Umpqua, Siuslaw"; + case _11809: return "Coos"; + case _11825: return "Coquilles"; + case _11841: return "Costanoan"; + case _11866: return "Coushatta"; + case _11874: return "Alabama Coushatta"; + case _11890: return "Cowlitz"; + case _11916: return "Cree"; + case _11932: return "Creek"; + case _11940: return "Alabama Creek"; + case _11957: return "Alabama Quassarte"; + case _11965: return "Eastern Creek"; + case _11973: return "Eastern Muscogee"; + case _11981: return "Kialegee"; + case _11999: return "Lower Muscogee"; + case _12005: return "Machis Lower Creek Indian"; + case _12013: return "Poarch Band"; + case _12021: return "Principal Creek Indian Nation"; + case _12039: return "Star Clan of Muscogee Creeks"; + case _12047: return "Thlopthlocco"; + case _12054: return "Tuckabachee"; + case _12070: return "Croatan"; + case _12096: return "Crow"; + case _12112: return "Cupeno"; + case _12120: return "Agua Caliente"; + case _12146: return "Delaware"; + case _12153: return "Eastern Delaware"; + case _12161: return "Lenni-Lenape"; + case _12179: return "Munsee"; + case _12187: return "Oklahoma Delaware"; + case _12195: return "Rampough Mountain"; + case _12203: return "Sand Hill"; + case _12229: return "Diegueno"; + case _12237: return "Campo"; + case _12245: return "Capitan Grande"; + case _12252: return "Cuyapaipe"; + case _12260: return "La Posta"; + case _12278: return "Manzanita"; + case _12286: return "Mesa Grande"; + case _12294: return "San Pasqual"; + case _12302: return "Santa Ysabel"; + case _12310: return "Sycuan"; + case _12336: return "Eastern Tribes"; + case _12344: return "Attacapa"; + case _12351: return "Biloxi"; + case _12369: return "Georgetown"; + case _12377: return "Moor"; + case _12385: return "Nansemond"; + case _12393: return "Natchez"; + case _12401: return "Nausu Waiwash"; + case _12419: return "Nipmuc"; + case _12427: return "Paugussett"; + case _12435: return "Pocomoke Acohonock"; + case _12443: return "Southeastern Indians"; + case _12450: return "Susquehanock"; + case _12468: return "Tunica Biloxi"; + case _12476: return "Waccamaw-Siousan"; + case _12484: return "Wicomico"; + case _12500: return "Esselen"; + case _12526: return "Fort Belknap"; + case _12542: return "Fort Berthold"; + case _12567: return "Fort Mcdowell"; + case _12583: return "Fort Hall"; + case _12609: return "Gabrieleno"; + case _12625: return "Grand Ronde"; + case _12641: return "Gros Ventres"; + case _12658: return "Atsina"; + case _12674: return "Haliwa"; + case _12690: return "Hidatsa"; + case _12716: return "Hoopa"; + case _12724: return "Trinity"; + case _12732: return "Whilkut"; + case _12757: return "Hoopa Extension"; + case _12773: return "Houma"; + case _12799: return "Inaja-Cosmit"; + case _12815: return "Iowa"; + case _12823: return "Iowa of Kansas-Nebraska"; + case _12831: return "Iowa of Oklahoma"; + case _12856: return "Iroquois"; + case _12864: return "Cayuga"; + case _12872: return "Mohawk"; + case _12880: return "Oneida"; + case _12898: return "Onondaga"; + case _12906: return "Seneca"; + case _12914: return "Seneca Nation"; + case _12922: return "Seneca-Cayuga"; + case _12930: return "Tonawanda Seneca"; + case _12948: return "Tuscarora"; + case _12955: return "Wyandotte"; + case _12971: return "Juaneno"; + case _12997: return "Kalispel"; + case _13011: return "Karuk"; + case _13037: return "Kaw"; + case _13052: return "Kickapoo"; + case _13060: return "Oklahoma Kickapoo"; + case _13078: return "Texas Kickapoo"; + case _13094: return "Kiowa"; + case _13102: return "Oklahoma Kiowa"; + case _13128: return "Klallam"; + case _13136: return "Jamestown"; + case _13144: return "Lower Elwha"; + case _13151: return "Port Gamble Klallam"; + case _13177: return "Klamath"; + case _13193: return "Konkow"; + case _13219: return "Kootenai"; + case _13235: return "Lassik"; + case _13250: return "Long Island"; + case _13268: return "Matinecock"; + case _13276: return "Montauk"; + case _13284: return "Poospatuck"; + case _13292: return "Setauket"; + case _13318: return "Luiseno"; + case _13326: return "La Jolla"; + case _13334: return "Pala"; + case _13342: return "Pauma"; + case _13359: return "Pechanga"; + case _13367: return "Soboba"; + case _13375: return "Twenty-Nine Palms"; + case _13383: return "Temecula"; + case _13409: return "Lumbee"; + case _13425: return "Lummi"; + case _13441: return "Maidu"; + case _13458: return "Mountain Maidu"; + case _13466: return "Nishinam"; + case _13482: return "Makah"; + case _13508: return "Maliseet"; + case _13524: return "Mandan"; + case _13540: return "Mattaponi"; + case _13565: return "Menominee"; + case _13581: return "Miami"; + case _13599: return "Illinois Miami"; + case _13607: return "Indiana Miami"; + case _13615: return "Oklahoma Miami"; + case _13631: return "Miccosukee"; + case _13656: return "Micmac"; + case _13664: return "Aroostook"; + case _13680: return "Mission Indians"; + case _13706: return "Miwok"; + case _13722: return "Modoc"; + case _13748: return "Mohegan"; + case _13763: return "Mono"; + case _13789: return "Nanticoke"; + case _13805: return "Narragansett"; + case _13821: return "Navajo"; + case _13839: return "Alamo Navajo"; + case _13847: return "Canoncito Navajo"; + case _13854: return "Ramah Navajo"; + case _13870: return "Nez Perce"; + case _13896: return "Nomalaki"; + case _13912: return "Northwest Tribes"; + case _13920: return "Alsea"; + case _13938: return "Celilo"; + case _13946: return "Columbia"; + case _13953: return "Kalapuya"; + case _13961: return "Molala"; + case _13979: return "Talakamish"; + case _13987: return "Tenino"; + case _13995: return "Tillamook"; + case _14001: return "Wenatchee"; + case _14019: return "Yahooskin"; + case _14035: return "Omaha"; + case _14050: return "Oregon Athabaskan"; + case _14076: return "Osage"; + case _14092: return "Otoe-Missouria"; + case _14118: return "Ottawa"; + case _14126: return "Burt Lake Ottawa"; + case _14134: return "Michigan Ottawa"; + case _14142: return "Oklahoma Ottawa"; + case _14167: return "Paiute"; + case _14175: return "Bishop"; + case _14183: return "Bridgeport"; + case _14191: return "Burns Paiute"; + case _14209: return "Cedarville"; + case _14217: return "Fort Bidwell"; + case _14225: return "Fort Independence"; + case _14233: return "Kaibab"; + case _14241: return "Las Vegas"; + case _14258: return "Lone Pine"; + case _14266: return "Lovelock"; + case _14274: return "Malheur Paiute"; + case _14282: return "Moapa"; + case _14290: return "Northern Paiute"; + case _14308: return "Owens Valley"; + case _14316: return "Pyramid Lake"; + case _14324: return "San Juan Southern Paiute"; + case _14332: return "Southern Paiute"; + case _14340: return "Summit Lake"; + case _14357: return "Utu Utu Gwaitu Paiute"; + case _14365: return "Walker River"; + case _14373: return "Yerington Paiute"; + case _14399: return "Pamunkey"; + case _14415: return "Passamaquoddy"; + case _14423: return "Indian Township"; + case _14431: return "Pleasant Point Passamaquoddy"; + case _14456: return "Pawnee"; + case _14464: return "Oklahoma Pawnee"; + case _14480: return "Penobscot"; + case _14506: return "Peoria"; + case _14514: return "Oklahoma Peoria"; + case _14530: return "Pequot"; + case _14548: return "Marshantucket Pequot"; + case _14563: return "Pima"; + case _14571: return "Gila River Pima-Maricopa"; + case _14589: return "Salt River Pima-Maricopa"; + case _14605: return "Piscataway"; + case _14621: return "Pit River"; + case _14647: return "Pomo"; + case _14654: return "Central Pomo"; + case _14662: return "Dry Creek"; + case _14670: return "Eastern Pomo"; + case _14688: return "Kashia"; + case _14696: return "Northern Pomo"; + case _14704: return "Scotts Valley"; + case _14712: return "Stonyford"; + case _14720: return "Sulphur Bank"; + case _14746: return "Ponca"; + case _14753: return "Nebraska Ponca"; + case _14761: return "Oklahoma Ponca"; + case _14787: return "Potawatomi"; + case _14795: return "Citizen Band Potawatomi"; + case _14803: return "Forest County"; + case _14811: return "Hannahville"; + case _14829: return "Huron Potawatomi"; + case _14837: return "Pokagon Potawatomi"; + case _14845: return "Prairie Band"; + case _14852: return "Wisconsin Potawatomi"; + case _14878: return "Powhatan"; + case _14894: return "Pueblo"; + case _14902: return "Acoma"; + case _14910: return "Arizona Tewa"; + case _14928: return "Cochiti"; + case _14936: return "Hopi"; + case _14944: return "Isleta"; + case _14951: return "Jemez"; + case _14969: return "Keres"; + case _14977: return "Laguna"; + case _14985: return "Nambe"; + case _14993: return "Picuris"; + case _15008: return "Piro"; + case _15016: return "Pojoaque"; + case _15024: return "San Felipe"; + case _15032: return "San Ildefonso"; + case _15040: return "San Juan Pueblo"; + case _15057: return "San Juan De"; + case _15065: return "San Juan"; + case _15073: return "Sandia"; + case _15081: return "Santa Ana"; + case _15099: return "Santa Clara"; + case _15107: return "Santo Domingo"; + case _15115: return "Taos"; + case _15123: return "Tesuque"; + case _15131: return "Tewa"; + case _15149: return "Tigua"; + case _15156: return "Zia"; + case _15164: return "Zuni"; + case _15180: return "Puget Sound Salish"; + case _15198: return "Duwamish"; + case _15206: return "Kikiallus"; + case _15214: return "Lower Skagit"; + case _15222: return "Muckleshoot"; + case _15230: return "Nisqually"; + case _15248: return "Nooksack"; + case _15255: return "Port Madison"; + case _15263: return "Puyallup"; + case _15271: return "Samish"; + case _15289: return "Sauk-Suiattle"; + case _15297: return "Skokomish"; + case _15305: return "Skykomish"; + case _15313: return "Snohomish"; + case _15321: return "Snoqualmie"; + case _15339: return "Squaxin Island"; + case _15347: return "Steilacoom"; + case _15354: return "Stillaguamish"; + case _15362: return "Suquamish"; + case _15370: return "Swinomish"; + case _15388: return "Tulalip"; + case _15396: return "Upper Skagit"; + case _15412: return "Quapaw"; + case _15438: return "Quinault"; + case _15453: return "Rappahannock"; + case _15479: return "Reno-Sparks"; + case _15495: return "Round Valley"; + case _15511: return "Sac and Fox"; + case _15529: return "Iowa Sac and Fox"; + case _15537: return "Missouri Sac and Fox"; + case _15545: return "Oklahoma Sac and Fox"; + case _15560: return "Salinan"; + case _15586: return "Salish"; + case _15602: return "Salish and Kootenai"; + case _15628: return "Schaghticoke"; + case _15644: return "Scott Valley"; + case _15669: return "Seminole"; + case _15677: return "Big Cypress"; + case _15685: return "Brighton"; + case _15693: return "Florida Seminole"; + case _15701: return "Hollywood Seminole"; + case _15719: return "Oklahoma Seminole"; + case _15735: return "Serrano"; + case _15743: return "San Manual"; + case _15768: return "Shasta"; + case _15784: return "Shawnee"; + case _15792: return "Absentee Shawnee"; + case _15800: return "Eastern Shawnee"; + case _15826: return "Shinnecock"; + case _15842: return "Shoalwater Bay"; + case _15867: return "Shoshone"; + case _15875: return "Battle Mountain"; + case _15883: return "Duckwater"; + case _15891: return "Elko"; + case _15909: return "Ely"; + case _15917: return "Goshute"; + case _15925: return "Panamint"; + case _15933: return "Ruby Valley"; + case _15941: return "Skull Valley"; + case _15958: return "South Fork Shoshone"; + case _15966: return "Te-Moak Western Shoshone"; + case _15974: return "Timbi-Sha Shoshone"; + case _15982: return "Washakie"; + case _15990: return "Wind River Shoshone"; + case _16006: return "Yomba"; + case _16022: return "Shoshone Paiute"; + case _16030: return "Duck Valley"; + case _16048: return "Fallon"; + case _16055: return "Fort McDermitt"; + case _16071: return "Siletz"; + case _16097: return "Sioux"; + case _16105: return "Blackfoot Sioux"; + case _16113: return "Brule Sioux"; + case _16121: return "Cheyenne River Sioux"; + case _16139: return "Crow Creek Sioux"; + case _16147: return "Dakota Sioux"; + case _16154: return "Flandreau Santee"; + case _16162: return "Fort Peck"; + case _16170: return "Lake Traverse Sioux"; + case _16188: return "Lower Brule Sioux"; + case _16196: return "Lower Sioux"; + case _16204: return "Mdewakanton Sioux"; + case _16212: return "Miniconjou"; + case _16220: return "Oglala Sioux"; + case _16238: return "Pine Ridge Sioux"; + case _16246: return "Pipestone Sioux"; + case _16253: return "Prairie Island Sioux"; + case _16261: return "Prior Lake Sioux"; + case _16279: return "Rosebud Sioux"; + case _16287: return "Sans Arc Sioux"; + case _16295: return "Santee Sioux"; + case _16303: return "Sisseton-Wahpeton"; + case _16311: return "Sisseton Sioux"; + case _16329: return "Spirit Lake Sioux"; + case _16337: return "Standing Rock Sioux"; + case _16345: return "Teton Sioux"; + case _16352: return "Two Kettle Sioux"; + case _16360: return "Upper Sioux"; + case _16378: return "Wahpekute Sioux"; + case _16386: return "Wahpeton Sioux"; + case _16394: return "Wazhaza Sioux"; + case _16402: return "Yankton Sioux"; + case _16410: return "Yanktonai Sioux"; + case _16436: return "Siuslaw"; + case _16451: return "Spokane"; + case _16477: return "Stewart"; + case _16493: return "Stockbridge"; + case _16519: return "Susanville"; + case _16535: return "Tohono O'Odham"; + case _16543: return "Ak-Chin"; + case _16550: return "Gila Bend"; + case _16568: return "San Xavier"; + case _16576: return "Sells"; + case _16592: return "Tolowa"; + case _16618: return "Tonkawa"; + case _16634: return "Tygh"; + case _16659: return "Umatilla"; + case _16675: return "Umpqua"; + case _16683: return "Cow Creek Umpqua"; + case _16709: return "Ute"; + case _16717: return "Allen Canyon"; + case _16725: return "Uintah Ute"; + case _16733: return "Ute Mountain Ute"; + case _16758: return "Wailaki"; + case _16774: return "Walla-Walla"; + case _16790: return "Wampanoag"; + case _16808: return "Gay Head Wampanoag"; + case _16816: return "Mashpee Wampanoag"; + case _16832: return "Warm Springs"; + case _16857: return "Wascopum"; + case _16873: return "Washoe"; + case _16881: return "Alpine"; + case _16899: return "Carson"; + case _16907: return "Dresslerville"; + case _16923: return "Wichita"; + case _16949: return "Wind River"; + case _16964: return "Winnebago"; + case _16972: return "Ho-chunk"; + case _16980: return "Nebraska Winnebago"; + case _17004: return "Winnemucca"; + case _17020: return "Wintun"; + case _17046: return "Wiyot"; + case _17053: return "Table Bluff"; + case _17079: return "Yakama"; + case _17095: return "Yakama Cowlitz"; + case _17111: return "Yaqui"; + case _17129: return "Barrio Libre"; + case _17137: return "Pascua Yaqui"; + case _17152: return "Yavapai Apache"; + case _17178: return "Yokuts"; + case _17186: return "Chukchansi"; + case _17194: return "Tachi"; + case _17202: return "Tule River"; + case _17228: return "Yuchi"; + case _17244: return "Yuman"; + case _17251: return "Cocopah"; + case _17269: return "Havasupai"; + case _17277: return "Hualapai"; + case _17285: return "Maricopa"; + case _17293: return "Mohave"; + case _17301: return "Quechan"; + case _17319: return "Yavapai"; + case _17327: return "Yurok"; + case _17335: return "Coast Yurok"; + case _17350: return "Alaska Native"; + case _17376: return "Alaska Indian"; + case _17392: return "Alaskan Athabascan"; + case _17400: return "Ahtna"; + case _18119: return "Southeast Alaska"; + case _18135: return "Tlingit-Haida"; + case _18143: return "Angoon"; + case _18150: return "Central Council of Tlingit and Haida Tribes"; + case _18168: return "Chilkat"; + case _18176: return "Chilkoot"; + case _18184: return "Craig"; + case _18192: return "Douglas"; + case _18200: return "Haida"; + case _18218: return "Hoonah"; + case _18226: return "Hydaburg"; + case _18234: return "Kake"; + case _18242: return "Kasaan"; + case _18259: return "Kenaitze"; + case _18267: return "Ketchikan"; + case _18275: return "Klawock"; + case _18283: return "Pelican"; + case _18291: return "Petersburg"; + case _18309: return "Saxman"; + case _18317: return "Sitka"; + case _18325: return "Tenakee Springs"; + case _18333: return "Tlingit"; + case _18341: return "Wrangell"; + case _18358: return "Yakutat"; + case _18374: return "Tsimshian"; + case _18382: return "Metlakatla"; + case _18408: return "Eskimo"; + case _18424: return "Greenland Eskimo"; + case _18440: return "Inupiat Eskimo"; + case _18457: return "Ambler"; + case _18465: return "Anaktuvuk"; + case _18473: return "Anaktuvuk Pass"; + case _18481: return "Arctic Slope Inupiat"; + case _18499: return "Arctic Slope Corporation"; + case _18507: return "Atqasuk"; + case _18515: return "Barrow"; + case _18523: return "Bering Straits Inupiat"; + case _18531: return "Brevig Mission"; + case _18549: return "Buckland"; + case _18556: return "Chinik"; + case _18564: return "Council"; + case _18572: return "Deering"; + case _18580: return "Elim"; + case _18598: return "Golovin"; + case _18606: return "Inalik Diomede"; + case _18614: return "Inupiaq"; + case _18622: return "Kaktovik"; + case _18630: return "Kawerak"; + case _18648: return "Kiana"; + case _18655: return "Kivalina"; + case _18663: return "Kobuk"; + case _18671: return "Kotzebue"; + case _18689: return "Koyuk"; + case _18697: return "Kwiguk"; + case _18705: return "Mauneluk Inupiat"; + case _18713: return "Nana Inupiat"; + case _18721: return "Noatak"; + case _18739: return "Nome"; + case _18747: return "Noorvik"; + case _18754: return "Nuiqsut"; + case _18762: return "Point Hope"; + case _18770: return "Point Lay"; + case _18788: return "Selawik"; + case _18796: return "Shaktoolik"; + case _18804: return "Shishmaref"; + case _18812: return "Shungnak"; + case _18820: return "Solomon"; + case _18838: return "Teller"; + case _18846: return "Unalakleet"; + case _18853: return "Wainwright"; + case _18861: return "Wales"; + case _18879: return "White Mountain"; + case _18887: return "White Mountain Inupiat"; + case _18895: return "Mary's Igloo"; + case _18911: return "Siberian Eskimo"; + case _18929: return "Gambell"; + case _18937: return "Savoonga"; + case _18945: return "Siberian Yupik"; + case _18960: return "Yupik Eskimo"; + case _18978: return "Akiachak"; + case _18986: return "Akiak"; + case _18994: return "Alakanuk"; + case _19000: return "Aleknagik"; + case _19018: return "Andreafsky"; + case _19026: return "Aniak"; + case _19034: return "Atmautluak"; + case _19042: return "Bethel"; + case _19059: return "Bill Moore's Slough"; + case _19067: return "Bristol Bay Yupik"; + case _19075: return "Calista Yupik"; + case _19083: return "Chefornak"; + case _19091: return "Chevak"; + case _19109: return "Chuathbaluk"; + case _19117: return "Clark's Point"; + case _19125: return "Crooked Creek"; + case _19133: return "Dillingham"; + case _19141: return "Eek"; + case _19158: return "Ekuk"; + case _19166: return "Ekwok"; + case _19174: return "Emmonak"; + case _19182: return "Goodnews Bay"; + case _19190: return "Hooper Bay"; + case _19208: return "Iqurmuit (Russian Mission)"; + case _19216: return "Kalskag"; + case _19224: return "Kasigluk"; + case _19232: return "Kipnuk"; + case _19240: return "Koliganek"; + case _19257: return "Kongiganak"; + case _19265: return "Kotlik"; + case _19273: return "Kwethluk"; + case _19281: return "Kwigillingok"; + case _19299: return "Levelock"; + case _19307: return "Lower Kalskag"; + case _19315: return "Manokotak"; + case _19323: return "Marshall"; + case _19331: return "Mekoryuk"; + case _19349: return "Mountain Village"; + case _19356: return "Naknek"; + case _19364: return "Napaumute"; + case _19372: return "Napakiak"; + case _19380: return "Napaskiak"; + case _19398: return "Newhalen"; + case _19406: return "New Stuyahok"; + case _19414: return "Newtok"; + case _19422: return "Nightmute"; + case _19430: return "Nunapitchukv"; + case _19448: return "Oscarville"; + case _19455: return "Pilot Station"; + case _19463: return "Pitkas Point"; + case _19471: return "Platinum"; + case _19489: return "Portage Creek"; + case _19497: return "Quinhagak"; + case _19505: return "Red Devil"; + case _19513: return "St. Michael"; + case _19521: return "Scammon Bay"; + case _19539: return "Sheldon's Point"; + case _19547: return "Sleetmute"; + case _19554: return "Stebbins"; + case _19562: return "Togiak"; + case _19570: return "Toksook"; + case _19588: return "Tulukskak"; + case _19596: return "Tuntutuliak"; + case _19604: return "Tununak"; + case _19612: return "Twin Hills"; + case _19620: return "Georgetown"; + case _19638: return "St. Mary's"; + case _19646: return "Umkumiate"; + case _19661: return "Aleut"; + case _19687: return "Alutiiq Aleut"; + case _19695: return "Tatitlek"; + case _19703: return "Ugashik"; + case _19729: return "Bristol Bay Aleut"; + case _19737: return "Chignik"; + case _19745: return "Chignik Lake"; + case _19752: return "Egegik"; + case _19760: return "Igiugig"; + case _19778: return "Ivanof Bay"; + case _19786: return "King Salmon"; + case _19794: return "Kokhanok"; + case _19802: return "Perryville"; + case _19810: return "Pilot Point"; + case _19828: return "Port Heiden"; + case _19844: return "Chugach Aleut"; + case _19851: return "Chenega"; + case _19869: return "Chugach Corporation"; + case _19877: return "English Bay"; + case _19885: return "Port Graham"; + case _19901: return "Eyak"; + case _19927: return "Koniag Aleut"; + case _19935: return "Akhiok"; + case _19943: return "Agdaagux"; + case _19950: return "Karluk"; + case _19968: return "Kodiak"; + case _19976: return "Larsen Bay"; + case _19984: return "Old Harbor"; + case _19992: return "Ouzinkie"; + case _20008: return "Port Lions"; + case _20024: return "Sugpiaq"; + case _20040: return "Suqpigaq"; + case _20065: return "Unangan Aleut"; + case _20073: return "Akutan"; + case _20081: return "Aleut Corporation"; + case _20099: return "Aleutian"; + case _20107: return "Aleutian Islander"; + case _20115: return "Atka"; + case _20123: return "Belkofski"; + case _20131: return "Chignik Lagoon"; + case _20149: return "King Cove"; + case _20156: return "False Pass"; + case _20164: return "Nelson Lagoon"; + case _20172: return "Nikolski"; + case _20180: return "Pauloff Harbor"; + case _20198: return "Qagan Toyagungin"; + case _20206: return "Qawalangin"; + case _20214: return "St. George"; + case _20222: return "St. Paul"; + case _20230: return "Sand Point"; + case _20248: return "South Naknek"; + case _20255: return "Unalaska"; + case _20263: return "Unga"; + case _20289: return "Asian"; + case _20297: return "Asian Indian"; + case _20305: return "Bangladeshi"; + case _20313: return "Bhutanese"; + case _20321: return "Burmese"; + case _20339: return "Cambodian"; + case _20347: return "Chinese"; + case _20354: return "Taiwanese"; + case _20362: return "Filipino"; + case _20370: return "Hmong"; + case _20388: return "Indonesian"; + case _20396: return "Japanese"; + case _20404: return "Korean"; + case _20412: return "Laotian"; + case _20420: return "Malaysian"; + case _20438: return "Okinawan"; + case _20446: return "Pakistani"; + case _20453: return "Sri Lankan"; + case _20461: return "Thai"; + case _20479: return "Vietnamese"; + case _20487: return "Iwo Jiman"; + case _20495: return "Maldivian"; + case _20503: return "Nepalese"; + case _20511: return "Singaporean"; + case _20529: return "Madagascar"; + case _20545: return "Black or African American"; + case _20560: return "Black"; + case _20586: return "African American"; + case _20602: return "African"; + case _20610: return "Botswanan"; + case _20628: return "Ethiopian"; + case _20636: return "Liberian"; + case _20644: return "Namibian"; + case _20651: return "Nigerian"; + case _20669: return "Zairean"; + case _20677: return "Bahamian"; + case _20685: return "Barbadian"; + case _20693: return "Dominican"; + case _20701: return "Dominica Islander"; + case _20719: return "Haitian"; + case _20727: return "Jamaican"; + case _20735: return "Tobagoan"; + case _20743: return "Trinidadian"; + case _20750: return "West Indian"; + case _20768: return "Native Hawaiian or Other Pacific Islander"; + case _20784: return "Polynesian"; + case _20792: return "Native Hawaiian"; + case _20800: return "Samoan"; + case _20818: return "Tahitian"; + case _20826: return "Tongan"; + case _20834: return "Tokelauan"; + case _20859: return "Micronesian"; + case _20867: return "Guamanian or Chamorro"; + case _20875: return "Guamanian"; + case _20883: return "Chamorro"; + case _20891: return "Mariana Islander"; + case _20909: return "Marshallese"; + case _20917: return "Palauan"; + case _20925: return "Carolinian"; + case _20933: return "Kosraean"; + case _20941: return "Pohnpeian"; + case _20958: return "Saipanese"; + case _20966: return "Kiribati"; + case _20974: return "Chuukese"; + case _20982: return "Yapese"; + case _21006: return "Melanesian"; + case _21014: return "Fijian"; + case _21022: return "Papua New Guinean"; + case _21030: return "Solomon Islander"; + case _21048: return "New Hebrides"; + case _25007: return "Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated."; + case _21063: return "White"; + case _21089: return "European"; + case _21097: return "Armenian"; + case _21105: return "English"; + case _21113: return "French"; + case _21121: return "German"; + case _21139: return "Irish"; + case _21147: return "Italian"; + case _21154: return "Polish"; + case _21162: return "Scottish"; + case _21188: return "Middle Eastern or North African"; + case _21196: return "Assyrian"; + case _21204: return "Egyptian"; + case _21212: return "Iranian"; + case _21220: return "Iraqi"; + case _21238: return "Lebanese"; + case _21246: return "Palestinian"; + case _21253: return "Syrian"; + case _21261: return "Afghanistani"; + case _21279: return "Israeili"; + case _21295: return "Arab"; + case _21311: return "Note that this term remains in the table for completeness, even though within HL7, the notion of Other code is deprecated."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _10025: return "American Indian or Alaska Native"; + case _10041: return "American Indian"; + case _10066: return "Abenaki"; + case _10082: return "Algonquian"; + case _10108: return "Apache"; + case _10116: return "Chiricahua"; + case _10124: return "Fort Sill Apache"; + case _10132: return "Jicarilla Apache"; + case _10140: return "Lipan Apache"; + case _10157: return "Mescalero Apache"; + case _10165: return "Oklahoma Apache"; + case _10173: return "Payson Apache"; + case _10181: return "San Carlos Apache"; + case _10199: return "White Mountain Apache"; + case _10215: return "Arapaho"; + case _10223: return "Northern Arapaho"; + case _10231: return "Southern Arapaho"; + case _10249: return "Wind River Arapaho"; + case _10264: return "Arikara"; + case _10280: return "Assiniboine"; + case _10306: return "Assiniboine Sioux"; + case _10314: return "Fort Peck Assiniboine Sioux"; + case _10330: return "Bannock"; + case _10355: return "Blackfeet"; + case _10371: return "Brotherton"; + case _10397: return "Burt Lake Band"; + case _10413: return "Caddo"; + case _10421: return "Oklahoma Cado"; + case _10447: return "Cahuilla"; + case _10454: return "Agua Caliente Cahuilla"; + case _10462: return "Augustine"; + case _10470: return "Cabazon"; + case _10488: return "Los Coyotes"; + case _10496: return "Morongo"; + case _10504: return "Santa Rosa Cahuilla"; + case _10512: return "Torres-Martinez"; + case _10538: return "California Tribes"; + case _10546: return "Cahto"; + case _10553: return "Chimariko"; + case _10561: return "Coast Miwok"; + case _10579: return "Digger"; + case _10587: return "Kawaiisu"; + case _10595: return "Kern River"; + case _10603: return "Mattole"; + case _10611: return "Red Wood"; + case _10629: return "Santa Rosa"; + case _10637: return "Takelma"; + case _10645: return "Wappo"; + case _10652: return "Yana"; + case _10660: return "Yuki"; + case _10686: return "Canadian and Latin American Indian"; + case _10694: return "Canadian Indian"; + case _10702: return "Central American Indian"; + case _10710: return "French American Indian"; + case _10728: return "Mexican American Indian"; + case _10736: return "South American Indian"; + case _10744: return "Spanish American Indian"; + case _10769: return "Catawba"; + case _17418: return "Alatna"; + case _17426: return "Alexander"; + case _17434: return "Allakaket"; + case _17442: return "Alanvik"; + case _17459: return "Anvik"; + case _17467: return "Arctic"; + case _17475: return "Beaver"; + case _17483: return "Birch Creek"; + case _17491: return "Cantwell"; + case _17509: return "Chalkyitsik"; + case _17517: return "Chickaloon"; + case _17525: return "Chistochina"; + case _17533: return "Chitina"; + case _17541: return "Circle"; + case _17558: return "Cook Inlet"; + case _17566: return "Copper Center"; + case _17574: return "Copper River"; + case _17582: return "Dot Lake"; + case _17590: return "Doyon"; + case _17608: return "Eagle"; + case _17616: return "Eklutna"; + case _17624: return "Evansville"; + case _17632: return "Fort Yukon"; + case _17640: return "Gakona"; + case _17657: return "Galena"; + case _17665: return "Grayling"; + case _17673: return "Gulkana"; + case _17681: return "Healy Lake"; + case _17699: return "Holy Cross"; + case _17707: return "Hughes"; + case _17715: return "Huslia"; + case _17723: return "Iliamna"; + case _17731: return "Kaltag"; + case _17749: return "Kluti Kaah"; + case _17756: return "Knik"; + case _17764: return "Koyukuk"; + case _17772: return "Lake Minchumina"; + case _17780: return "Lime"; + case _17798: return "Mcgrath"; + case _17806: return "Manley Hot Springs"; + case _17814: return "Mentasta Lake"; + case _17822: return "Minto"; + case _17830: return "Nenana"; + case _17848: return "Nikolai"; + case _17855: return "Ninilchik"; + case _17863: return "Nondalton"; + case _17871: return "Northway"; + case _17889: return "Nulato"; + case _17897: return "Pedro Bay"; + case _17905: return "Rampart"; + case _17913: return "Ruby"; + case _17921: return "Salamatof"; + case _17939: return "Seldovia"; + case _17947: return "Slana"; + case _17954: return "Shageluk"; + case _17962: return "Stevens"; + case _17970: return "Stony River"; + case _17988: return "Takotna"; + case _17996: return "Tanacross"; + case _18002: return "Tanaina"; + case _18010: return "Tanana"; + case _18028: return "Tanana Chiefs"; + case _18036: return "Tazlina"; + case _18044: return "Telida"; + case _18051: return "Tetlin"; + case _18069: return "Tok"; + case _18077: return "Tyonek"; + case _18085: return "Venetie"; + case _18093: return "Wiseman"; + case _10785: return "Cayuse"; + case _10801: return "Chehalis"; + case _10827: return "Chemakuan"; + case _10835: return "Hoh"; + case _10843: return "Quileute"; + case _10868: return "Chemehuevi"; + case _10884: return "Cherokee"; + case _10892: return "Cherokee Alabama"; + case _10900: return "Cherokees of Northeast Alabama"; + case _10918: return "Cherokees of Southeast Alabama"; + case _10926: return "Eastern Cherokee"; + case _10934: return "Echota Cherokee"; + case _10942: return "Etowah Cherokee"; + case _10959: return "Northern Cherokee"; + case _10967: return "Tuscola"; + case _10975: return "United Keetowah Band of Cherokee"; + case _10983: return "Western Cherokee"; + case _11007: return "Cherokee Shawnee"; + case _11023: return "Cheyenne"; + case _11031: return "Northern Cheyenne"; + case _11049: return "Southern Cheyenne"; + case _11064: return "Cheyenne-Arapaho"; + case _11080: return "Chickahominy"; + case _11098: return "Eastern Chickahominy"; + case _11106: return "Western Chickahominy"; + case _11122: return "Chickasaw"; + case _11148: return "Chinook"; + case _11155: return "Clatsop"; + case _11163: return "Columbia River Chinook"; + case _11171: return "Kathlamet"; + case _11189: return "Upper Chinook"; + case _11197: return "Wakiakum Chinook"; + case _11205: return "Willapa Chinook"; + case _11213: return "Wishram"; + case _11239: return "Chippewa"; + case _11247: return "Bad River"; + case _11254: return "Bay Mills Chippewa"; + case _11262: return "Bois Forte"; + case _11270: return "Burt Lake Chippewa"; + case _11288: return "Fond du Lac"; + case _11296: return "Grand Portage"; + case _11304: return "Grand Traverse Band of Ottawa-Chippewa"; + case _11312: return "Keweenaw"; + case _11320: return "Lac Courte Oreilles"; + case _11338: return "Lac du Flambeau"; + case _11346: return "Lac Vieux Desert Chippewa"; + case _11353: return "Lake Superior"; + case _11361: return "Leech Lake"; + case _11379: return "Little Shell Chippewa"; + case _11387: return "Mille Lacs"; + case _11395: return "Minnesota Chippewa"; + case _11403: return "Ontonagon"; + case _11411: return "Red Cliff Chippewa"; + case _11429: return "Red Lake Chippewa"; + case _11437: return "Saginaw Chippewa"; + case _11445: return "St. Croix Chippewa"; + case _11452: return "Sault Ste. Marie Chippewa"; + case _11460: return "Sokoagon Chippewa"; + case _11478: return "Turtle Mountain"; + case _11486: return "White Earth"; + case _11502: return "Chippewa Cree"; + case _11510: return "Rocky Boy's Chippewa Cree"; + case _11536: return "Chitimacha"; + case _11551: return "Choctaw"; + case _11569: return "Clifton Choctaw"; + case _11577: return "Jena Choctaw"; + case _11585: return "Mississippi Choctaw"; + case _11593: return "Mowa Band of Choctaw"; + case _11601: return "Oklahoma Choctaw"; + case _11627: return "Chumash"; + case _11635: return "Santa Ynez"; + case _11650: return "Clear Lake"; + case _11676: return "Coeur D'Alene"; + case _11692: return "Coharie"; + case _11718: return "Colorado River"; + case _11734: return "Colville"; + case _11759: return "Comanche"; + case _11767: return "Oklahoma Comanche"; + case _11783: return "Coos, Lower Umpqua, Siuslaw"; + case _11809: return "Coos"; + case _11825: return "Coquilles"; + case _11841: return "Costanoan"; + case _11866: return "Coushatta"; + case _11874: return "Alabama Coushatta"; + case _11890: return "Cowlitz"; + case _11916: return "Cree"; + case _11932: return "Creek"; + case _11940: return "Alabama Creek"; + case _11957: return "Alabama Quassarte"; + case _11965: return "Eastern Creek"; + case _11973: return "Eastern Muscogee"; + case _11981: return "Kialegee"; + case _11999: return "Lower Muscogee"; + case _12005: return "Machis Lower Creek Indian"; + case _12013: return "Poarch Band"; + case _12021: return "Principal Creek Indian Nation"; + case _12039: return "Star Clan of Muscogee Creeks"; + case _12047: return "Thlopthlocco"; + case _12054: return "Tuckabachee"; + case _12070: return "Croatan"; + case _12096: return "Crow"; + case _12112: return "Cupeno"; + case _12120: return "Agua Caliente"; + case _12146: return "Delaware"; + case _12153: return "Eastern Delaware"; + case _12161: return "Lenni-Lenape"; + case _12179: return "Munsee"; + case _12187: return "Oklahoma Delaware"; + case _12195: return "Rampough Mountain"; + case _12203: return "Sand Hill"; + case _12229: return "Diegueno"; + case _12237: return "Campo"; + case _12245: return "Capitan Grande"; + case _12252: return "Cuyapaipe"; + case _12260: return "La Posta"; + case _12278: return "Manzanita"; + case _12286: return "Mesa Grande"; + case _12294: return "San Pasqual"; + case _12302: return "Santa Ysabel"; + case _12310: return "Sycuan"; + case _12336: return "Eastern Tribes"; + case _12344: return "Attacapa"; + case _12351: return "Biloxi"; + case _12369: return "Georgetown"; + case _12377: return "Moor"; + case _12385: return "Nansemond"; + case _12393: return "Natchez"; + case _12401: return "Nausu Waiwash"; + case _12419: return "Nipmuc"; + case _12427: return "Paugussett"; + case _12435: return "Pocomoke Acohonock"; + case _12443: return "Southeastern Indians"; + case _12450: return "Susquehanock"; + case _12468: return "Tunica Biloxi"; + case _12476: return "Waccamaw-Siousan"; + case _12484: return "Wicomico"; + case _12500: return "Esselen"; + case _12526: return "Fort Belknap"; + case _12542: return "Fort Berthold"; + case _12567: return "Fort Mcdowell"; + case _12583: return "Fort Hall"; + case _12609: return "Gabrieleno"; + case _12625: return "Grand Ronde"; + case _12641: return "Gros Ventres"; + case _12658: return "Atsina"; + case _12674: return "Haliwa"; + case _12690: return "Hidatsa"; + case _12716: return "Hoopa"; + case _12724: return "Trinity"; + case _12732: return "Whilkut"; + case _12757: return "Hoopa Extension"; + case _12773: return "Houma"; + case _12799: return "Inaja-Cosmit"; + case _12815: return "Iowa"; + case _12823: return "Iowa of Kansas-Nebraska"; + case _12831: return "Iowa of Oklahoma"; + case _12856: return "Iroquois"; + case _12864: return "Cayuga"; + case _12872: return "Mohawk"; + case _12880: return "Oneida"; + case _12898: return "Onondaga"; + case _12906: return "Seneca"; + case _12914: return "Seneca Nation"; + case _12922: return "Seneca-Cayuga"; + case _12930: return "Tonawanda Seneca"; + case _12948: return "Tuscarora"; + case _12955: return "Wyandotte"; + case _12971: return "Juaneno"; + case _12997: return "Kalispel"; + case _13011: return "Karuk"; + case _13037: return "Kaw"; + case _13052: return "Kickapoo"; + case _13060: return "Oklahoma Kickapoo"; + case _13078: return "Texas Kickapoo"; + case _13094: return "Kiowa"; + case _13102: return "Oklahoma Kiowa"; + case _13128: return "Klallam"; + case _13136: return "Jamestown"; + case _13144: return "Lower Elwha"; + case _13151: return "Port Gamble Klallam"; + case _13177: return "Klamath"; + case _13193: return "Konkow"; + case _13219: return "Kootenai"; + case _13235: return "Lassik"; + case _13250: return "Long Island"; + case _13268: return "Matinecock"; + case _13276: return "Montauk"; + case _13284: return "Poospatuck"; + case _13292: return "Setauket"; + case _13318: return "Luiseno"; + case _13326: return "La Jolla"; + case _13334: return "Pala"; + case _13342: return "Pauma"; + case _13359: return "Pechanga"; + case _13367: return "Soboba"; + case _13375: return "Twenty-Nine Palms"; + case _13383: return "Temecula"; + case _13409: return "Lumbee"; + case _13425: return "Lummi"; + case _13441: return "Maidu"; + case _13458: return "Mountain Maidu"; + case _13466: return "Nishinam"; + case _13482: return "Makah"; + case _13508: return "Maliseet"; + case _13524: return "Mandan"; + case _13540: return "Mattaponi"; + case _13565: return "Menominee"; + case _13581: return "Miami"; + case _13599: return "Illinois Miami"; + case _13607: return "Indiana Miami"; + case _13615: return "Oklahoma Miami"; + case _13631: return "Miccosukee"; + case _13656: return "Micmac"; + case _13664: return "Aroostook"; + case _13680: return "Mission Indians"; + case _13706: return "Miwok"; + case _13722: return "Modoc"; + case _13748: return "Mohegan"; + case _13763: return "Mono"; + case _13789: return "Nanticoke"; + case _13805: return "Narragansett"; + case _13821: return "Navajo"; + case _13839: return "Alamo Navajo"; + case _13847: return "Canoncito Navajo"; + case _13854: return "Ramah Navajo"; + case _13870: return "Nez Perce"; + case _13896: return "Nomalaki"; + case _13912: return "Northwest Tribes"; + case _13920: return "Alsea"; + case _13938: return "Celilo"; + case _13946: return "Columbia"; + case _13953: return "Kalapuya"; + case _13961: return "Molala"; + case _13979: return "Talakamish"; + case _13987: return "Tenino"; + case _13995: return "Tillamook"; + case _14001: return "Wenatchee"; + case _14019: return "Yahooskin"; + case _14035: return "Omaha"; + case _14050: return "Oregon Athabaskan"; + case _14076: return "Osage"; + case _14092: return "Otoe-Missouria"; + case _14118: return "Ottawa"; + case _14126: return "Burt Lake Ottawa"; + case _14134: return "Michigan Ottawa"; + case _14142: return "Oklahoma Ottawa"; + case _14167: return "Paiute"; + case _14175: return "Bishop"; + case _14183: return "Bridgeport"; + case _14191: return "Burns Paiute"; + case _14209: return "Cedarville"; + case _14217: return "Fort Bidwell"; + case _14225: return "Fort Independence"; + case _14233: return "Kaibab"; + case _14241: return "Las Vegas"; + case _14258: return "Lone Pine"; + case _14266: return "Lovelock"; + case _14274: return "Malheur Paiute"; + case _14282: return "Moapa"; + case _14290: return "Northern Paiute"; + case _14308: return "Owens Valley"; + case _14316: return "Pyramid Lake"; + case _14324: return "San Juan Southern Paiute"; + case _14332: return "Southern Paiute"; + case _14340: return "Summit Lake"; + case _14357: return "Utu Utu Gwaitu Paiute"; + case _14365: return "Walker River"; + case _14373: return "Yerington Paiute"; + case _14399: return "Pamunkey"; + case _14415: return "Passamaquoddy"; + case _14423: return "Indian Township"; + case _14431: return "Pleasant Point Passamaquoddy"; + case _14456: return "Pawnee"; + case _14464: return "Oklahoma Pawnee"; + case _14480: return "Penobscot"; + case _14506: return "Peoria"; + case _14514: return "Oklahoma Peoria"; + case _14530: return "Pequot"; + case _14548: return "Marshantucket Pequot"; + case _14563: return "Pima"; + case _14571: return "Gila River Pima-Maricopa"; + case _14589: return "Salt River Pima-Maricopa"; + case _14605: return "Piscataway"; + case _14621: return "Pit River"; + case _14647: return "Pomo"; + case _14654: return "Central Pomo"; + case _14662: return "Dry Creek"; + case _14670: return "Eastern Pomo"; + case _14688: return "Kashia"; + case _14696: return "Northern Pomo"; + case _14704: return "Scotts Valley"; + case _14712: return "Stonyford"; + case _14720: return "Sulphur Bank"; + case _14746: return "Ponca"; + case _14753: return "Nebraska Ponca"; + case _14761: return "Oklahoma Ponca"; + case _14787: return "Potawatomi"; + case _14795: return "Citizen Band Potawatomi"; + case _14803: return "Forest County"; + case _14811: return "Hannahville"; + case _14829: return "Huron Potawatomi"; + case _14837: return "Pokagon Potawatomi"; + case _14845: return "Prairie Band"; + case _14852: return "Wisconsin Potawatomi"; + case _14878: return "Powhatan"; + case _14894: return "Pueblo"; + case _14902: return "Acoma"; + case _14910: return "Arizona Tewa"; + case _14928: return "Cochiti"; + case _14936: return "Hopi"; + case _14944: return "Isleta"; + case _14951: return "Jemez"; + case _14969: return "Keres"; + case _14977: return "Laguna"; + case _14985: return "Nambe"; + case _14993: return "Picuris"; + case _15008: return "Piro"; + case _15016: return "Pojoaque"; + case _15024: return "San Felipe"; + case _15032: return "San Ildefonso"; + case _15040: return "San Juan Pueblo"; + case _15057: return "San Juan De"; + case _15065: return "San Juan"; + case _15073: return "Sandia"; + case _15081: return "Santa Ana"; + case _15099: return "Santa Clara"; + case _15107: return "Santo Domingo"; + case _15115: return "Taos"; + case _15123: return "Tesuque"; + case _15131: return "Tewa"; + case _15149: return "Tigua"; + case _15156: return "Zia"; + case _15164: return "Zuni"; + case _15180: return "Puget Sound Salish"; + case _15198: return "Duwamish"; + case _15206: return "Kikiallus"; + case _15214: return "Lower Skagit"; + case _15222: return "Muckleshoot"; + case _15230: return "Nisqually"; + case _15248: return "Nooksack"; + case _15255: return "Port Madison"; + case _15263: return "Puyallup"; + case _15271: return "Samish"; + case _15289: return "Sauk-Suiattle"; + case _15297: return "Skokomish"; + case _15305: return "Skykomish"; + case _15313: return "Snohomish"; + case _15321: return "Snoqualmie"; + case _15339: return "Squaxin Island"; + case _15347: return "Steilacoom"; + case _15354: return "Stillaguamish"; + case _15362: return "Suquamish"; + case _15370: return "Swinomish"; + case _15388: return "Tulalip"; + case _15396: return "Upper Skagit"; + case _15412: return "Quapaw"; + case _15438: return "Quinault"; + case _15453: return "Rappahannock"; + case _15479: return "Reno-Sparks"; + case _15495: return "Round Valley"; + case _15511: return "Sac and Fox"; + case _15529: return "Iowa Sac and Fox"; + case _15537: return "Missouri Sac and Fox"; + case _15545: return "Oklahoma Sac and Fox"; + case _15560: return "Salinan"; + case _15586: return "Salish"; + case _15602: return "Salish and Kootenai"; + case _15628: return "Schaghticoke"; + case _15644: return "Scott Valley"; + case _15669: return "Seminole"; + case _15677: return "Big Cypress"; + case _15685: return "Brighton"; + case _15693: return "Florida Seminole"; + case _15701: return "Hollywood Seminole"; + case _15719: return "Oklahoma Seminole"; + case _15735: return "Serrano"; + case _15743: return "San Manual"; + case _15768: return "Shasta"; + case _15784: return "Shawnee"; + case _15792: return "Absentee Shawnee"; + case _15800: return "Eastern Shawnee"; + case _15826: return "Shinnecock"; + case _15842: return "Shoalwater Bay"; + case _15867: return "Shoshone"; + case _15875: return "Battle Mountain"; + case _15883: return "Duckwater"; + case _15891: return "Elko"; + case _15909: return "Ely"; + case _15917: return "Goshute"; + case _15925: return "Panamint"; + case _15933: return "Ruby Valley"; + case _15941: return "Skull Valley"; + case _15958: return "South Fork Shoshone"; + case _15966: return "Te-Moak Western Shoshone"; + case _15974: return "Timbi-Sha Shoshone"; + case _15982: return "Washakie"; + case _15990: return "Wind River Shoshone"; + case _16006: return "Yomba"; + case _16022: return "Shoshone Paiute"; + case _16030: return "Duck Valley"; + case _16048: return "Fallon"; + case _16055: return "Fort McDermitt"; + case _16071: return "Siletz"; + case _16097: return "Sioux"; + case _16105: return "Blackfoot Sioux"; + case _16113: return "Brule Sioux"; + case _16121: return "Cheyenne River Sioux"; + case _16139: return "Crow Creek Sioux"; + case _16147: return "Dakota Sioux"; + case _16154: return "Flandreau Santee"; + case _16162: return "Fort Peck"; + case _16170: return "Lake Traverse Sioux"; + case _16188: return "Lower Brule Sioux"; + case _16196: return "Lower Sioux"; + case _16204: return "Mdewakanton Sioux"; + case _16212: return "Miniconjou"; + case _16220: return "Oglala Sioux"; + case _16238: return "Pine Ridge Sioux"; + case _16246: return "Pipestone Sioux"; + case _16253: return "Prairie Island Sioux"; + case _16261: return "Prior Lake Sioux"; + case _16279: return "Rosebud Sioux"; + case _16287: return "Sans Arc Sioux"; + case _16295: return "Santee Sioux"; + case _16303: return "Sisseton-Wahpeton"; + case _16311: return "Sisseton Sioux"; + case _16329: return "Spirit Lake Sioux"; + case _16337: return "Standing Rock Sioux"; + case _16345: return "Teton Sioux"; + case _16352: return "Two Kettle Sioux"; + case _16360: return "Upper Sioux"; + case _16378: return "Wahpekute Sioux"; + case _16386: return "Wahpeton Sioux"; + case _16394: return "Wazhaza Sioux"; + case _16402: return "Yankton Sioux"; + case _16410: return "Yanktonai Sioux"; + case _16436: return "Siuslaw"; + case _16451: return "Spokane"; + case _16477: return "Stewart"; + case _16493: return "Stockbridge"; + case _16519: return "Susanville"; + case _16535: return "Tohono O'Odham"; + case _16543: return "Ak-Chin"; + case _16550: return "Gila Bend"; + case _16568: return "San Xavier"; + case _16576: return "Sells"; + case _16592: return "Tolowa"; + case _16618: return "Tonkawa"; + case _16634: return "Tygh"; + case _16659: return "Umatilla"; + case _16675: return "Umpqua"; + case _16683: return "Cow Creek Umpqua"; + case _16709: return "Ute"; + case _16717: return "Allen Canyon"; + case _16725: return "Uintah Ute"; + case _16733: return "Ute Mountain Ute"; + case _16758: return "Wailaki"; + case _16774: return "Walla-Walla"; + case _16790: return "Wampanoag"; + case _16808: return "Gay Head Wampanoag"; + case _16816: return "Mashpee Wampanoag"; + case _16832: return "Warm Springs"; + case _16857: return "Wascopum"; + case _16873: return "Washoe"; + case _16881: return "Alpine"; + case _16899: return "Carson"; + case _16907: return "Dresslerville"; + case _16923: return "Wichita"; + case _16949: return "Wind River"; + case _16964: return "Winnebago"; + case _16972: return "Ho-chunk"; + case _16980: return "Nebraska Winnebago"; + case _17004: return "Winnemucca"; + case _17020: return "Wintun"; + case _17046: return "Wiyot"; + case _17053: return "Table Bluff"; + case _17079: return "Yakama"; + case _17095: return "Yakama Cowlitz"; + case _17111: return "Yaqui"; + case _17129: return "Barrio Libre"; + case _17137: return "Pascua Yaqui"; + case _17152: return "Yavapai Apache"; + case _17178: return "Yokuts"; + case _17186: return "Chukchansi"; + case _17194: return "Tachi"; + case _17202: return "Tule River"; + case _17228: return "Yuchi"; + case _17244: return "Yuman"; + case _17251: return "Cocopah"; + case _17269: return "Havasupai"; + case _17277: return "Hualapai"; + case _17285: return "Maricopa"; + case _17293: return "Mohave"; + case _17301: return "Quechan"; + case _17319: return "Yavapai"; + case _17327: return "Yurok"; + case _17335: return "Coast Yurok"; + case _17350: return "Alaska Native"; + case _17376: return "Alaska Indian"; + case _17392: return "Alaskan Athabascan"; + case _17400: return "Ahtna"; + case _18119: return "Southeast Alaska"; + case _18135: return "Tlingit-Haida"; + case _18143: return "Angoon"; + case _18150: return "Central Council of Tlingit and Haida Tribes"; + case _18168: return "Chilkat"; + case _18176: return "Chilkoot"; + case _18184: return "Craig"; + case _18192: return "Douglas"; + case _18200: return "Haida"; + case _18218: return "Hoonah"; + case _18226: return "Hydaburg"; + case _18234: return "Kake"; + case _18242: return "Kasaan"; + case _18259: return "Kenaitze"; + case _18267: return "Ketchikan"; + case _18275: return "Klawock"; + case _18283: return "Pelican"; + case _18291: return "Petersburg"; + case _18309: return "Saxman"; + case _18317: return "Sitka"; + case _18325: return "Tenakee Springs"; + case _18333: return "Tlingit"; + case _18341: return "Wrangell"; + case _18358: return "Yakutat"; + case _18374: return "Tsimshian"; + case _18382: return "Metlakatla"; + case _18408: return "Eskimo"; + case _18424: return "Greenland Eskimo"; + case _18440: return "Inupiat Eskimo"; + case _18457: return "Ambler"; + case _18465: return "Anaktuvuk"; + case _18473: return "Anaktuvuk Pass"; + case _18481: return "Arctic Slope Inupiat"; + case _18499: return "Arctic Slope Corporation"; + case _18507: return "Atqasuk"; + case _18515: return "Barrow"; + case _18523: return "Bering Straits Inupiat"; + case _18531: return "Brevig Mission"; + case _18549: return "Buckland"; + case _18556: return "Chinik"; + case _18564: return "Council"; + case _18572: return "Deering"; + case _18580: return "Elim"; + case _18598: return "Golovin"; + case _18606: return "Inalik Diomede"; + case _18614: return "Inupiaq"; + case _18622: return "Kaktovik"; + case _18630: return "Kawerak"; + case _18648: return "Kiana"; + case _18655: return "Kivalina"; + case _18663: return "Kobuk"; + case _18671: return "Kotzebue"; + case _18689: return "Koyuk"; + case _18697: return "Kwiguk"; + case _18705: return "Mauneluk Inupiat"; + case _18713: return "Nana Inupiat"; + case _18721: return "Noatak"; + case _18739: return "Nome"; + case _18747: return "Noorvik"; + case _18754: return "Nuiqsut"; + case _18762: return "Point Hope"; + case _18770: return "Point Lay"; + case _18788: return "Selawik"; + case _18796: return "Shaktoolik"; + case _18804: return "Shishmaref"; + case _18812: return "Shungnak"; + case _18820: return "Solomon"; + case _18838: return "Teller"; + case _18846: return "Unalakleet"; + case _18853: return "Wainwright"; + case _18861: return "Wales"; + case _18879: return "White Mountain"; + case _18887: return "White Mountain Inupiat"; + case _18895: return "Mary's Igloo"; + case _18911: return "Siberian Eskimo"; + case _18929: return "Gambell"; + case _18937: return "Savoonga"; + case _18945: return "Siberian Yupik"; + case _18960: return "Yupik Eskimo"; + case _18978: return "Akiachak"; + case _18986: return "Akiak"; + case _18994: return "Alakanuk"; + case _19000: return "Aleknagik"; + case _19018: return "Andreafsky"; + case _19026: return "Aniak"; + case _19034: return "Atmautluak"; + case _19042: return "Bethel"; + case _19059: return "Bill Moore's Slough"; + case _19067: return "Bristol Bay Yupik"; + case _19075: return "Calista Yupik"; + case _19083: return "Chefornak"; + case _19091: return "Chevak"; + case _19109: return "Chuathbaluk"; + case _19117: return "Clark's Point"; + case _19125: return "Crooked Creek"; + case _19133: return "Dillingham"; + case _19141: return "Eek"; + case _19158: return "Ekuk"; + case _19166: return "Ekwok"; + case _19174: return "Emmonak"; + case _19182: return "Goodnews Bay"; + case _19190: return "Hooper Bay"; + case _19208: return "Iqurmuit (Russian Mission)"; + case _19216: return "Kalskag"; + case _19224: return "Kasigluk"; + case _19232: return "Kipnuk"; + case _19240: return "Koliganek"; + case _19257: return "Kongiganak"; + case _19265: return "Kotlik"; + case _19273: return "Kwethluk"; + case _19281: return "Kwigillingok"; + case _19299: return "Levelock"; + case _19307: return "Lower Kalskag"; + case _19315: return "Manokotak"; + case _19323: return "Marshall"; + case _19331: return "Mekoryuk"; + case _19349: return "Mountain Village"; + case _19356: return "Naknek"; + case _19364: return "Napaumute"; + case _19372: return "Napakiak"; + case _19380: return "Napaskiak"; + case _19398: return "Newhalen"; + case _19406: return "New Stuyahok"; + case _19414: return "Newtok"; + case _19422: return "Nightmute"; + case _19430: return "Nunapitchukv"; + case _19448: return "Oscarville"; + case _19455: return "Pilot Station"; + case _19463: return "Pitkas Point"; + case _19471: return "Platinum"; + case _19489: return "Portage Creek"; + case _19497: return "Quinhagak"; + case _19505: return "Red Devil"; + case _19513: return "St. Michael"; + case _19521: return "Scammon Bay"; + case _19539: return "Sheldon's Point"; + case _19547: return "Sleetmute"; + case _19554: return "Stebbins"; + case _19562: return "Togiak"; + case _19570: return "Toksook"; + case _19588: return "Tulukskak"; + case _19596: return "Tuntutuliak"; + case _19604: return "Tununak"; + case _19612: return "Twin Hills"; + case _19620: return "Georgetown"; + case _19638: return "St. Mary's"; + case _19646: return "Umkumiate"; + case _19661: return "Aleut"; + case _19687: return "Alutiiq Aleut"; + case _19695: return "Tatitlek"; + case _19703: return "Ugashik"; + case _19729: return "Bristol Bay Aleut"; + case _19737: return "Chignik"; + case _19745: return "Chignik Lake"; + case _19752: return "Egegik"; + case _19760: return "Igiugig"; + case _19778: return "Ivanof Bay"; + case _19786: return "King Salmon"; + case _19794: return "Kokhanok"; + case _19802: return "Perryville"; + case _19810: return "Pilot Point"; + case _19828: return "Port Heiden"; + case _19844: return "Chugach Aleut"; + case _19851: return "Chenega"; + case _19869: return "Chugach Corporation"; + case _19877: return "English Bay"; + case _19885: return "Port Graham"; + case _19901: return "Eyak"; + case _19927: return "Koniag Aleut"; + case _19935: return "Akhiok"; + case _19943: return "Agdaagux"; + case _19950: return "Karluk"; + case _19968: return "Kodiak"; + case _19976: return "Larsen Bay"; + case _19984: return "Old Harbor"; + case _19992: return "Ouzinkie"; + case _20008: return "Port Lions"; + case _20024: return "Sugpiaq"; + case _20040: return "Suqpigaq"; + case _20065: return "Unangan Aleut"; + case _20073: return "Akutan"; + case _20081: return "Aleut Corporation"; + case _20099: return "Aleutian"; + case _20107: return "Aleutian Islander"; + case _20115: return "Atka"; + case _20123: return "Belkofski"; + case _20131: return "Chignik Lagoon"; + case _20149: return "King Cove"; + case _20156: return "False Pass"; + case _20164: return "Nelson Lagoon"; + case _20172: return "Nikolski"; + case _20180: return "Pauloff Harbor"; + case _20198: return "Qagan Toyagungin"; + case _20206: return "Qawalangin"; + case _20214: return "St. George"; + case _20222: return "St. Paul"; + case _20230: return "Sand Point"; + case _20248: return "South Naknek"; + case _20255: return "Unalaska"; + case _20263: return "Unga"; + case _20289: return "Asian"; + case _20297: return "Asian Indian"; + case _20305: return "Bangladeshi"; + case _20313: return "Bhutanese"; + case _20321: return "Burmese"; + case _20339: return "Cambodian"; + case _20347: return "Chinese"; + case _20354: return "Taiwanese"; + case _20362: return "Filipino"; + case _20370: return "Hmong"; + case _20388: return "Indonesian"; + case _20396: return "Japanese"; + case _20404: return "Korean"; + case _20412: return "Laotian"; + case _20420: return "Malaysian"; + case _20438: return "Okinawan"; + case _20446: return "Pakistani"; + case _20453: return "Sri Lankan"; + case _20461: return "Thai"; + case _20479: return "Vietnamese"; + case _20487: return "Iwo Jiman"; + case _20495: return "Maldivian"; + case _20503: return "Nepalese"; + case _20511: return "Singaporean"; + case _20529: return "Madagascar"; + case _20545: return "Black or African American"; + case _20560: return "Black"; + case _20586: return "African American"; + case _20602: return "African"; + case _20610: return "Botswanan"; + case _20628: return "Ethiopian"; + case _20636: return "Liberian"; + case _20644: return "Namibian"; + case _20651: return "Nigerian"; + case _20669: return "Zairean"; + case _20677: return "Bahamian"; + case _20685: return "Barbadian"; + case _20693: return "Dominican"; + case _20701: return "Dominica Islander"; + case _20719: return "Haitian"; + case _20727: return "Jamaican"; + case _20735: return "Tobagoan"; + case _20743: return "Trinidadian"; + case _20750: return "West Indian"; + case _20768: return "Native Hawaiian or Other Pacific Islander"; + case _20784: return "Polynesian"; + case _20792: return "Native Hawaiian"; + case _20800: return "Samoan"; + case _20818: return "Tahitian"; + case _20826: return "Tongan"; + case _20834: return "Tokelauan"; + case _20859: return "Micronesian"; + case _20867: return "Guamanian or Chamorro"; + case _20875: return "Guamanian"; + case _20883: return "Chamorro"; + case _20891: return "Mariana Islander"; + case _20909: return "Marshallese"; + case _20917: return "Palauan"; + case _20925: return "Carolinian"; + case _20933: return "Kosraean"; + case _20941: return "Pohnpeian"; + case _20958: return "Saipanese"; + case _20966: return "Kiribati"; + case _20974: return "Chuukese"; + case _20982: return "Yapese"; + case _21006: return "Melanesian"; + case _21014: return "Fijian"; + case _21022: return "Papua New Guinean"; + case _21030: return "Solomon Islander"; + case _21048: return "New Hebrides"; + case _25007: return "Other Pacific Islander"; + case _21063: return "White"; + case _21089: return "European"; + case _21097: return "Armenian"; + case _21105: return "English"; + case _21113: return "French"; + case _21121: return "German"; + case _21139: return "Irish"; + case _21147: return "Italian"; + case _21154: return "Polish"; + case _21162: return "Scottish"; + case _21188: return "Middle Eastern or North African"; + case _21196: return "Assyrian"; + case _21204: return "Egyptian"; + case _21212: return "Iranian"; + case _21220: return "Iraqi"; + case _21238: return "Lebanese"; + case _21246: return "Palestinian"; + case _21253: return "Syrian"; + case _21261: return "Afghanistani"; + case _21279: return "Israeili"; + case _21295: return "Arab"; + case _21311: return "Other Race"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RaceEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RaceEnumFactory.java new file mode 100644 index 00000000000..9e51a5b6f31 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RaceEnumFactory.java @@ -0,0 +1,3738 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RaceEnumFactory implements EnumFactory { + + public V3Race fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1002-5".equals(codeString)) + return V3Race._10025; + if ("1004-1".equals(codeString)) + return V3Race._10041; + if ("1006-6".equals(codeString)) + return V3Race._10066; + if ("1008-2".equals(codeString)) + return V3Race._10082; + if ("1010-8".equals(codeString)) + return V3Race._10108; + if ("1011-6".equals(codeString)) + return V3Race._10116; + if ("1012-4".equals(codeString)) + return V3Race._10124; + if ("1013-2".equals(codeString)) + return V3Race._10132; + if ("1014-0".equals(codeString)) + return V3Race._10140; + if ("1015-7".equals(codeString)) + return V3Race._10157; + if ("1016-5".equals(codeString)) + return V3Race._10165; + if ("1017-3".equals(codeString)) + return V3Race._10173; + if ("1018-1".equals(codeString)) + return V3Race._10181; + if ("1019-9".equals(codeString)) + return V3Race._10199; + if ("1021-5".equals(codeString)) + return V3Race._10215; + if ("1022-3".equals(codeString)) + return V3Race._10223; + if ("1023-1".equals(codeString)) + return V3Race._10231; + if ("1024-9".equals(codeString)) + return V3Race._10249; + if ("1026-4".equals(codeString)) + return V3Race._10264; + if ("1028-0".equals(codeString)) + return V3Race._10280; + if ("1030-6".equals(codeString)) + return V3Race._10306; + if ("1031-4".equals(codeString)) + return V3Race._10314; + if ("1033-0".equals(codeString)) + return V3Race._10330; + if ("1035-5".equals(codeString)) + return V3Race._10355; + if ("1037-1".equals(codeString)) + return V3Race._10371; + if ("1039-7".equals(codeString)) + return V3Race._10397; + if ("1041-3".equals(codeString)) + return V3Race._10413; + if ("1042-1".equals(codeString)) + return V3Race._10421; + if ("1044-7".equals(codeString)) + return V3Race._10447; + if ("1045-4".equals(codeString)) + return V3Race._10454; + if ("1046-2".equals(codeString)) + return V3Race._10462; + if ("1047-0".equals(codeString)) + return V3Race._10470; + if ("1048-8".equals(codeString)) + return V3Race._10488; + if ("1049-6".equals(codeString)) + return V3Race._10496; + if ("1050-4".equals(codeString)) + return V3Race._10504; + if ("1051-2".equals(codeString)) + return V3Race._10512; + if ("1053-8".equals(codeString)) + return V3Race._10538; + if ("1054-6".equals(codeString)) + return V3Race._10546; + if ("1055-3".equals(codeString)) + return V3Race._10553; + if ("1056-1".equals(codeString)) + return V3Race._10561; + if ("1057-9".equals(codeString)) + return V3Race._10579; + if ("1058-7".equals(codeString)) + return V3Race._10587; + if ("1059-5".equals(codeString)) + return V3Race._10595; + if ("1060-3".equals(codeString)) + return V3Race._10603; + if ("1061-1".equals(codeString)) + return V3Race._10611; + if ("1062-9".equals(codeString)) + return V3Race._10629; + if ("1063-7".equals(codeString)) + return V3Race._10637; + if ("1064-5".equals(codeString)) + return V3Race._10645; + if ("1065-2".equals(codeString)) + return V3Race._10652; + if ("1066-0".equals(codeString)) + return V3Race._10660; + if ("1068-6".equals(codeString)) + return V3Race._10686; + if ("1069-4".equals(codeString)) + return V3Race._10694; + if ("1070-2".equals(codeString)) + return V3Race._10702; + if ("1071-0".equals(codeString)) + return V3Race._10710; + if ("1072-8".equals(codeString)) + return V3Race._10728; + if ("1073-6".equals(codeString)) + return V3Race._10736; + if ("1074-4".equals(codeString)) + return V3Race._10744; + if ("1076-9".equals(codeString)) + return V3Race._10769; + if ("1741-8".equals(codeString)) + return V3Race._17418; + if ("1742-6".equals(codeString)) + return V3Race._17426; + if ("1743-4".equals(codeString)) + return V3Race._17434; + if ("1744-2".equals(codeString)) + return V3Race._17442; + if ("1745-9".equals(codeString)) + return V3Race._17459; + if ("1746-7".equals(codeString)) + return V3Race._17467; + if ("1747-5".equals(codeString)) + return V3Race._17475; + if ("1748-3".equals(codeString)) + return V3Race._17483; + if ("1749-1".equals(codeString)) + return V3Race._17491; + if ("1750-9".equals(codeString)) + return V3Race._17509; + if ("1751-7".equals(codeString)) + return V3Race._17517; + if ("1752-5".equals(codeString)) + return V3Race._17525; + if ("1753-3".equals(codeString)) + return V3Race._17533; + if ("1754-1".equals(codeString)) + return V3Race._17541; + if ("1755-8".equals(codeString)) + return V3Race._17558; + if ("1756-6".equals(codeString)) + return V3Race._17566; + if ("1757-4".equals(codeString)) + return V3Race._17574; + if ("1758-2".equals(codeString)) + return V3Race._17582; + if ("1759-0".equals(codeString)) + return V3Race._17590; + if ("1760-8".equals(codeString)) + return V3Race._17608; + if ("1761-6".equals(codeString)) + return V3Race._17616; + if ("1762-4".equals(codeString)) + return V3Race._17624; + if ("1763-2".equals(codeString)) + return V3Race._17632; + if ("1764-0".equals(codeString)) + return V3Race._17640; + if ("1765-7".equals(codeString)) + return V3Race._17657; + if ("1766-5".equals(codeString)) + return V3Race._17665; + if ("1767-3".equals(codeString)) + return V3Race._17673; + if ("1768-1".equals(codeString)) + return V3Race._17681; + if ("1769-9".equals(codeString)) + return V3Race._17699; + if ("1770-7".equals(codeString)) + return V3Race._17707; + if ("1771-5".equals(codeString)) + return V3Race._17715; + if ("1772-3".equals(codeString)) + return V3Race._17723; + if ("1773-1".equals(codeString)) + return V3Race._17731; + if ("1774-9".equals(codeString)) + return V3Race._17749; + if ("1775-6".equals(codeString)) + return V3Race._17756; + if ("1776-4".equals(codeString)) + return V3Race._17764; + if ("1777-2".equals(codeString)) + return V3Race._17772; + if ("1778-0".equals(codeString)) + return V3Race._17780; + if ("1779-8".equals(codeString)) + return V3Race._17798; + if ("1780-6".equals(codeString)) + return V3Race._17806; + if ("1781-4".equals(codeString)) + return V3Race._17814; + if ("1782-2".equals(codeString)) + return V3Race._17822; + if ("1783-0".equals(codeString)) + return V3Race._17830; + if ("1784-8".equals(codeString)) + return V3Race._17848; + if ("1785-5".equals(codeString)) + return V3Race._17855; + if ("1786-3".equals(codeString)) + return V3Race._17863; + if ("1787-1".equals(codeString)) + return V3Race._17871; + if ("1788-9".equals(codeString)) + return V3Race._17889; + if ("1789-7".equals(codeString)) + return V3Race._17897; + if ("1790-5".equals(codeString)) + return V3Race._17905; + if ("1791-3".equals(codeString)) + return V3Race._17913; + if ("1792-1".equals(codeString)) + return V3Race._17921; + if ("1793-9".equals(codeString)) + return V3Race._17939; + if ("1794-7".equals(codeString)) + return V3Race._17947; + if ("1795-4".equals(codeString)) + return V3Race._17954; + if ("1796-2".equals(codeString)) + return V3Race._17962; + if ("1797-0".equals(codeString)) + return V3Race._17970; + if ("1798-8".equals(codeString)) + return V3Race._17988; + if ("1799-6".equals(codeString)) + return V3Race._17996; + if ("1800-2".equals(codeString)) + return V3Race._18002; + if ("1801-0".equals(codeString)) + return V3Race._18010; + if ("1802-8".equals(codeString)) + return V3Race._18028; + if ("1803-6".equals(codeString)) + return V3Race._18036; + if ("1804-4".equals(codeString)) + return V3Race._18044; + if ("1805-1".equals(codeString)) + return V3Race._18051; + if ("1806-9".equals(codeString)) + return V3Race._18069; + if ("1807-7".equals(codeString)) + return V3Race._18077; + if ("1808-5".equals(codeString)) + return V3Race._18085; + if ("1809-3".equals(codeString)) + return V3Race._18093; + if ("1078-5".equals(codeString)) + return V3Race._10785; + if ("1080-1".equals(codeString)) + return V3Race._10801; + if ("1082-7".equals(codeString)) + return V3Race._10827; + if ("1083-5".equals(codeString)) + return V3Race._10835; + if ("1084-3".equals(codeString)) + return V3Race._10843; + if ("1086-8".equals(codeString)) + return V3Race._10868; + if ("1088-4".equals(codeString)) + return V3Race._10884; + if ("1089-2".equals(codeString)) + return V3Race._10892; + if ("1090-0".equals(codeString)) + return V3Race._10900; + if ("1091-8".equals(codeString)) + return V3Race._10918; + if ("1092-6".equals(codeString)) + return V3Race._10926; + if ("1093-4".equals(codeString)) + return V3Race._10934; + if ("1094-2".equals(codeString)) + return V3Race._10942; + if ("1095-9".equals(codeString)) + return V3Race._10959; + if ("1096-7".equals(codeString)) + return V3Race._10967; + if ("1097-5".equals(codeString)) + return V3Race._10975; + if ("1098-3".equals(codeString)) + return V3Race._10983; + if ("1100-7".equals(codeString)) + return V3Race._11007; + if ("1102-3".equals(codeString)) + return V3Race._11023; + if ("1103-1".equals(codeString)) + return V3Race._11031; + if ("1104-9".equals(codeString)) + return V3Race._11049; + if ("1106-4".equals(codeString)) + return V3Race._11064; + if ("1108-0".equals(codeString)) + return V3Race._11080; + if ("1109-8".equals(codeString)) + return V3Race._11098; + if ("1110-6".equals(codeString)) + return V3Race._11106; + if ("1112-2".equals(codeString)) + return V3Race._11122; + if ("1114-8".equals(codeString)) + return V3Race._11148; + if ("1115-5".equals(codeString)) + return V3Race._11155; + if ("1116-3".equals(codeString)) + return V3Race._11163; + if ("1117-1".equals(codeString)) + return V3Race._11171; + if ("1118-9".equals(codeString)) + return V3Race._11189; + if ("1119-7".equals(codeString)) + return V3Race._11197; + if ("1120-5".equals(codeString)) + return V3Race._11205; + if ("1121-3".equals(codeString)) + return V3Race._11213; + if ("1123-9".equals(codeString)) + return V3Race._11239; + if ("1124-7".equals(codeString)) + return V3Race._11247; + if ("1125-4".equals(codeString)) + return V3Race._11254; + if ("1126-2".equals(codeString)) + return V3Race._11262; + if ("1127-0".equals(codeString)) + return V3Race._11270; + if ("1128-8".equals(codeString)) + return V3Race._11288; + if ("1129-6".equals(codeString)) + return V3Race._11296; + if ("1130-4".equals(codeString)) + return V3Race._11304; + if ("1131-2".equals(codeString)) + return V3Race._11312; + if ("1132-0".equals(codeString)) + return V3Race._11320; + if ("1133-8".equals(codeString)) + return V3Race._11338; + if ("1134-6".equals(codeString)) + return V3Race._11346; + if ("1135-3".equals(codeString)) + return V3Race._11353; + if ("1136-1".equals(codeString)) + return V3Race._11361; + if ("1137-9".equals(codeString)) + return V3Race._11379; + if ("1138-7".equals(codeString)) + return V3Race._11387; + if ("1139-5".equals(codeString)) + return V3Race._11395; + if ("1140-3".equals(codeString)) + return V3Race._11403; + if ("1141-1".equals(codeString)) + return V3Race._11411; + if ("1142-9".equals(codeString)) + return V3Race._11429; + if ("1143-7".equals(codeString)) + return V3Race._11437; + if ("1144-5".equals(codeString)) + return V3Race._11445; + if ("1145-2".equals(codeString)) + return V3Race._11452; + if ("1146-0".equals(codeString)) + return V3Race._11460; + if ("1147-8".equals(codeString)) + return V3Race._11478; + if ("1148-6".equals(codeString)) + return V3Race._11486; + if ("1150-2".equals(codeString)) + return V3Race._11502; + if ("1151-0".equals(codeString)) + return V3Race._11510; + if ("1153-6".equals(codeString)) + return V3Race._11536; + if ("1155-1".equals(codeString)) + return V3Race._11551; + if ("1156-9".equals(codeString)) + return V3Race._11569; + if ("1157-7".equals(codeString)) + return V3Race._11577; + if ("1158-5".equals(codeString)) + return V3Race._11585; + if ("1159-3".equals(codeString)) + return V3Race._11593; + if ("1160-1".equals(codeString)) + return V3Race._11601; + if ("1162-7".equals(codeString)) + return V3Race._11627; + if ("1163-5".equals(codeString)) + return V3Race._11635; + if ("1165-0".equals(codeString)) + return V3Race._11650; + if ("1167-6".equals(codeString)) + return V3Race._11676; + if ("1169-2".equals(codeString)) + return V3Race._11692; + if ("1171-8".equals(codeString)) + return V3Race._11718; + if ("1173-4".equals(codeString)) + return V3Race._11734; + if ("1175-9".equals(codeString)) + return V3Race._11759; + if ("1176-7".equals(codeString)) + return V3Race._11767; + if ("1178-3".equals(codeString)) + return V3Race._11783; + if ("1180-9".equals(codeString)) + return V3Race._11809; + if ("1182-5".equals(codeString)) + return V3Race._11825; + if ("1184-1".equals(codeString)) + return V3Race._11841; + if ("1186-6".equals(codeString)) + return V3Race._11866; + if ("1187-4".equals(codeString)) + return V3Race._11874; + if ("1189-0".equals(codeString)) + return V3Race._11890; + if ("1191-6".equals(codeString)) + return V3Race._11916; + if ("1193-2".equals(codeString)) + return V3Race._11932; + if ("1194-0".equals(codeString)) + return V3Race._11940; + if ("1195-7".equals(codeString)) + return V3Race._11957; + if ("1196-5".equals(codeString)) + return V3Race._11965; + if ("1197-3".equals(codeString)) + return V3Race._11973; + if ("1198-1".equals(codeString)) + return V3Race._11981; + if ("1199-9".equals(codeString)) + return V3Race._11999; + if ("1200-5".equals(codeString)) + return V3Race._12005; + if ("1201-3".equals(codeString)) + return V3Race._12013; + if ("1202-1".equals(codeString)) + return V3Race._12021; + if ("1203-9".equals(codeString)) + return V3Race._12039; + if ("1204-7".equals(codeString)) + return V3Race._12047; + if ("1205-4".equals(codeString)) + return V3Race._12054; + if ("1207-0".equals(codeString)) + return V3Race._12070; + if ("1209-6".equals(codeString)) + return V3Race._12096; + if ("1211-2".equals(codeString)) + return V3Race._12112; + if ("1212-0".equals(codeString)) + return V3Race._12120; + if ("1214-6".equals(codeString)) + return V3Race._12146; + if ("1215-3".equals(codeString)) + return V3Race._12153; + if ("1216-1".equals(codeString)) + return V3Race._12161; + if ("1217-9".equals(codeString)) + return V3Race._12179; + if ("1218-7".equals(codeString)) + return V3Race._12187; + if ("1219-5".equals(codeString)) + return V3Race._12195; + if ("1220-3".equals(codeString)) + return V3Race._12203; + if ("1222-9".equals(codeString)) + return V3Race._12229; + if ("1223-7".equals(codeString)) + return V3Race._12237; + if ("1224-5".equals(codeString)) + return V3Race._12245; + if ("1225-2".equals(codeString)) + return V3Race._12252; + if ("1226-0".equals(codeString)) + return V3Race._12260; + if ("1227-8".equals(codeString)) + return V3Race._12278; + if ("1228-6".equals(codeString)) + return V3Race._12286; + if ("1229-4".equals(codeString)) + return V3Race._12294; + if ("1230-2".equals(codeString)) + return V3Race._12302; + if ("1231-0".equals(codeString)) + return V3Race._12310; + if ("1233-6".equals(codeString)) + return V3Race._12336; + if ("1234-4".equals(codeString)) + return V3Race._12344; + if ("1235-1".equals(codeString)) + return V3Race._12351; + if ("1236-9".equals(codeString)) + return V3Race._12369; + if ("1237-7".equals(codeString)) + return V3Race._12377; + if ("1238-5".equals(codeString)) + return V3Race._12385; + if ("1239-3".equals(codeString)) + return V3Race._12393; + if ("1240-1".equals(codeString)) + return V3Race._12401; + if ("1241-9".equals(codeString)) + return V3Race._12419; + if ("1242-7".equals(codeString)) + return V3Race._12427; + if ("1243-5".equals(codeString)) + return V3Race._12435; + if ("1244-3".equals(codeString)) + return V3Race._12443; + if ("1245-0".equals(codeString)) + return V3Race._12450; + if ("1246-8".equals(codeString)) + return V3Race._12468; + if ("1247-6".equals(codeString)) + return V3Race._12476; + if ("1248-4".equals(codeString)) + return V3Race._12484; + if ("1250-0".equals(codeString)) + return V3Race._12500; + if ("1252-6".equals(codeString)) + return V3Race._12526; + if ("1254-2".equals(codeString)) + return V3Race._12542; + if ("1256-7".equals(codeString)) + return V3Race._12567; + if ("1258-3".equals(codeString)) + return V3Race._12583; + if ("1260-9".equals(codeString)) + return V3Race._12609; + if ("1262-5".equals(codeString)) + return V3Race._12625; + if ("1264-1".equals(codeString)) + return V3Race._12641; + if ("1265-8".equals(codeString)) + return V3Race._12658; + if ("1267-4".equals(codeString)) + return V3Race._12674; + if ("1269-0".equals(codeString)) + return V3Race._12690; + if ("1271-6".equals(codeString)) + return V3Race._12716; + if ("1272-4".equals(codeString)) + return V3Race._12724; + if ("1273-2".equals(codeString)) + return V3Race._12732; + if ("1275-7".equals(codeString)) + return V3Race._12757; + if ("1277-3".equals(codeString)) + return V3Race._12773; + if ("1279-9".equals(codeString)) + return V3Race._12799; + if ("1281-5".equals(codeString)) + return V3Race._12815; + if ("1282-3".equals(codeString)) + return V3Race._12823; + if ("1283-1".equals(codeString)) + return V3Race._12831; + if ("1285-6".equals(codeString)) + return V3Race._12856; + if ("1286-4".equals(codeString)) + return V3Race._12864; + if ("1287-2".equals(codeString)) + return V3Race._12872; + if ("1288-0".equals(codeString)) + return V3Race._12880; + if ("1289-8".equals(codeString)) + return V3Race._12898; + if ("1290-6".equals(codeString)) + return V3Race._12906; + if ("1291-4".equals(codeString)) + return V3Race._12914; + if ("1292-2".equals(codeString)) + return V3Race._12922; + if ("1293-0".equals(codeString)) + return V3Race._12930; + if ("1294-8".equals(codeString)) + return V3Race._12948; + if ("1295-5".equals(codeString)) + return V3Race._12955; + if ("1297-1".equals(codeString)) + return V3Race._12971; + if ("1299-7".equals(codeString)) + return V3Race._12997; + if ("1301-1".equals(codeString)) + return V3Race._13011; + if ("1303-7".equals(codeString)) + return V3Race._13037; + if ("1305-2".equals(codeString)) + return V3Race._13052; + if ("1306-0".equals(codeString)) + return V3Race._13060; + if ("1307-8".equals(codeString)) + return V3Race._13078; + if ("1309-4".equals(codeString)) + return V3Race._13094; + if ("1310-2".equals(codeString)) + return V3Race._13102; + if ("1312-8".equals(codeString)) + return V3Race._13128; + if ("1313-6".equals(codeString)) + return V3Race._13136; + if ("1314-4".equals(codeString)) + return V3Race._13144; + if ("1315-1".equals(codeString)) + return V3Race._13151; + if ("1317-7".equals(codeString)) + return V3Race._13177; + if ("1319-3".equals(codeString)) + return V3Race._13193; + if ("1321-9".equals(codeString)) + return V3Race._13219; + if ("1323-5".equals(codeString)) + return V3Race._13235; + if ("1325-0".equals(codeString)) + return V3Race._13250; + if ("1326-8".equals(codeString)) + return V3Race._13268; + if ("1327-6".equals(codeString)) + return V3Race._13276; + if ("1328-4".equals(codeString)) + return V3Race._13284; + if ("1329-2".equals(codeString)) + return V3Race._13292; + if ("1331-8".equals(codeString)) + return V3Race._13318; + if ("1332-6".equals(codeString)) + return V3Race._13326; + if ("1333-4".equals(codeString)) + return V3Race._13334; + if ("1334-2".equals(codeString)) + return V3Race._13342; + if ("1335-9".equals(codeString)) + return V3Race._13359; + if ("1336-7".equals(codeString)) + return V3Race._13367; + if ("1337-5".equals(codeString)) + return V3Race._13375; + if ("1338-3".equals(codeString)) + return V3Race._13383; + if ("1340-9".equals(codeString)) + return V3Race._13409; + if ("1342-5".equals(codeString)) + return V3Race._13425; + if ("1344-1".equals(codeString)) + return V3Race._13441; + if ("1345-8".equals(codeString)) + return V3Race._13458; + if ("1346-6".equals(codeString)) + return V3Race._13466; + if ("1348-2".equals(codeString)) + return V3Race._13482; + if ("1350-8".equals(codeString)) + return V3Race._13508; + if ("1352-4".equals(codeString)) + return V3Race._13524; + if ("1354-0".equals(codeString)) + return V3Race._13540; + if ("1356-5".equals(codeString)) + return V3Race._13565; + if ("1358-1".equals(codeString)) + return V3Race._13581; + if ("1359-9".equals(codeString)) + return V3Race._13599; + if ("1360-7".equals(codeString)) + return V3Race._13607; + if ("1361-5".equals(codeString)) + return V3Race._13615; + if ("1363-1".equals(codeString)) + return V3Race._13631; + if ("1365-6".equals(codeString)) + return V3Race._13656; + if ("1366-4".equals(codeString)) + return V3Race._13664; + if ("1368-0".equals(codeString)) + return V3Race._13680; + if ("1370-6".equals(codeString)) + return V3Race._13706; + if ("1372-2".equals(codeString)) + return V3Race._13722; + if ("1374-8".equals(codeString)) + return V3Race._13748; + if ("1376-3".equals(codeString)) + return V3Race._13763; + if ("1378-9".equals(codeString)) + return V3Race._13789; + if ("1380-5".equals(codeString)) + return V3Race._13805; + if ("1382-1".equals(codeString)) + return V3Race._13821; + if ("1383-9".equals(codeString)) + return V3Race._13839; + if ("1384-7".equals(codeString)) + return V3Race._13847; + if ("1385-4".equals(codeString)) + return V3Race._13854; + if ("1387-0".equals(codeString)) + return V3Race._13870; + if ("1389-6".equals(codeString)) + return V3Race._13896; + if ("1391-2".equals(codeString)) + return V3Race._13912; + if ("1392-0".equals(codeString)) + return V3Race._13920; + if ("1393-8".equals(codeString)) + return V3Race._13938; + if ("1394-6".equals(codeString)) + return V3Race._13946; + if ("1395-3".equals(codeString)) + return V3Race._13953; + if ("1396-1".equals(codeString)) + return V3Race._13961; + if ("1397-9".equals(codeString)) + return V3Race._13979; + if ("1398-7".equals(codeString)) + return V3Race._13987; + if ("1399-5".equals(codeString)) + return V3Race._13995; + if ("1400-1".equals(codeString)) + return V3Race._14001; + if ("1401-9".equals(codeString)) + return V3Race._14019; + if ("1403-5".equals(codeString)) + return V3Race._14035; + if ("1405-0".equals(codeString)) + return V3Race._14050; + if ("1407-6".equals(codeString)) + return V3Race._14076; + if ("1409-2".equals(codeString)) + return V3Race._14092; + if ("1411-8".equals(codeString)) + return V3Race._14118; + if ("1412-6".equals(codeString)) + return V3Race._14126; + if ("1413-4".equals(codeString)) + return V3Race._14134; + if ("1414-2".equals(codeString)) + return V3Race._14142; + if ("1416-7".equals(codeString)) + return V3Race._14167; + if ("1417-5".equals(codeString)) + return V3Race._14175; + if ("1418-3".equals(codeString)) + return V3Race._14183; + if ("1419-1".equals(codeString)) + return V3Race._14191; + if ("1420-9".equals(codeString)) + return V3Race._14209; + if ("1421-7".equals(codeString)) + return V3Race._14217; + if ("1422-5".equals(codeString)) + return V3Race._14225; + if ("1423-3".equals(codeString)) + return V3Race._14233; + if ("1424-1".equals(codeString)) + return V3Race._14241; + if ("1425-8".equals(codeString)) + return V3Race._14258; + if ("1426-6".equals(codeString)) + return V3Race._14266; + if ("1427-4".equals(codeString)) + return V3Race._14274; + if ("1428-2".equals(codeString)) + return V3Race._14282; + if ("1429-0".equals(codeString)) + return V3Race._14290; + if ("1430-8".equals(codeString)) + return V3Race._14308; + if ("1431-6".equals(codeString)) + return V3Race._14316; + if ("1432-4".equals(codeString)) + return V3Race._14324; + if ("1433-2".equals(codeString)) + return V3Race._14332; + if ("1434-0".equals(codeString)) + return V3Race._14340; + if ("1435-7".equals(codeString)) + return V3Race._14357; + if ("1436-5".equals(codeString)) + return V3Race._14365; + if ("1437-3".equals(codeString)) + return V3Race._14373; + if ("1439-9".equals(codeString)) + return V3Race._14399; + if ("1441-5".equals(codeString)) + return V3Race._14415; + if ("1442-3".equals(codeString)) + return V3Race._14423; + if ("1443-1".equals(codeString)) + return V3Race._14431; + if ("1445-6".equals(codeString)) + return V3Race._14456; + if ("1446-4".equals(codeString)) + return V3Race._14464; + if ("1448-0".equals(codeString)) + return V3Race._14480; + if ("1450-6".equals(codeString)) + return V3Race._14506; + if ("1451-4".equals(codeString)) + return V3Race._14514; + if ("1453-0".equals(codeString)) + return V3Race._14530; + if ("1454-8".equals(codeString)) + return V3Race._14548; + if ("1456-3".equals(codeString)) + return V3Race._14563; + if ("1457-1".equals(codeString)) + return V3Race._14571; + if ("1458-9".equals(codeString)) + return V3Race._14589; + if ("1460-5".equals(codeString)) + return V3Race._14605; + if ("1462-1".equals(codeString)) + return V3Race._14621; + if ("1464-7".equals(codeString)) + return V3Race._14647; + if ("1465-4".equals(codeString)) + return V3Race._14654; + if ("1466-2".equals(codeString)) + return V3Race._14662; + if ("1467-0".equals(codeString)) + return V3Race._14670; + if ("1468-8".equals(codeString)) + return V3Race._14688; + if ("1469-6".equals(codeString)) + return V3Race._14696; + if ("1470-4".equals(codeString)) + return V3Race._14704; + if ("1471-2".equals(codeString)) + return V3Race._14712; + if ("1472-0".equals(codeString)) + return V3Race._14720; + if ("1474-6".equals(codeString)) + return V3Race._14746; + if ("1475-3".equals(codeString)) + return V3Race._14753; + if ("1476-1".equals(codeString)) + return V3Race._14761; + if ("1478-7".equals(codeString)) + return V3Race._14787; + if ("1479-5".equals(codeString)) + return V3Race._14795; + if ("1480-3".equals(codeString)) + return V3Race._14803; + if ("1481-1".equals(codeString)) + return V3Race._14811; + if ("1482-9".equals(codeString)) + return V3Race._14829; + if ("1483-7".equals(codeString)) + return V3Race._14837; + if ("1484-5".equals(codeString)) + return V3Race._14845; + if ("1485-2".equals(codeString)) + return V3Race._14852; + if ("1487-8".equals(codeString)) + return V3Race._14878; + if ("1489-4".equals(codeString)) + return V3Race._14894; + if ("1490-2".equals(codeString)) + return V3Race._14902; + if ("1491-0".equals(codeString)) + return V3Race._14910; + if ("1492-8".equals(codeString)) + return V3Race._14928; + if ("1493-6".equals(codeString)) + return V3Race._14936; + if ("1494-4".equals(codeString)) + return V3Race._14944; + if ("1495-1".equals(codeString)) + return V3Race._14951; + if ("1496-9".equals(codeString)) + return V3Race._14969; + if ("1497-7".equals(codeString)) + return V3Race._14977; + if ("1498-5".equals(codeString)) + return V3Race._14985; + if ("1499-3".equals(codeString)) + return V3Race._14993; + if ("1500-8".equals(codeString)) + return V3Race._15008; + if ("1501-6".equals(codeString)) + return V3Race._15016; + if ("1502-4".equals(codeString)) + return V3Race._15024; + if ("1503-2".equals(codeString)) + return V3Race._15032; + if ("1504-0".equals(codeString)) + return V3Race._15040; + if ("1505-7".equals(codeString)) + return V3Race._15057; + if ("1506-5".equals(codeString)) + return V3Race._15065; + if ("1507-3".equals(codeString)) + return V3Race._15073; + if ("1508-1".equals(codeString)) + return V3Race._15081; + if ("1509-9".equals(codeString)) + return V3Race._15099; + if ("1510-7".equals(codeString)) + return V3Race._15107; + if ("1511-5".equals(codeString)) + return V3Race._15115; + if ("1512-3".equals(codeString)) + return V3Race._15123; + if ("1513-1".equals(codeString)) + return V3Race._15131; + if ("1514-9".equals(codeString)) + return V3Race._15149; + if ("1515-6".equals(codeString)) + return V3Race._15156; + if ("1516-4".equals(codeString)) + return V3Race._15164; + if ("1518-0".equals(codeString)) + return V3Race._15180; + if ("1519-8".equals(codeString)) + return V3Race._15198; + if ("1520-6".equals(codeString)) + return V3Race._15206; + if ("1521-4".equals(codeString)) + return V3Race._15214; + if ("1522-2".equals(codeString)) + return V3Race._15222; + if ("1523-0".equals(codeString)) + return V3Race._15230; + if ("1524-8".equals(codeString)) + return V3Race._15248; + if ("1525-5".equals(codeString)) + return V3Race._15255; + if ("1526-3".equals(codeString)) + return V3Race._15263; + if ("1527-1".equals(codeString)) + return V3Race._15271; + if ("1528-9".equals(codeString)) + return V3Race._15289; + if ("1529-7".equals(codeString)) + return V3Race._15297; + if ("1530-5".equals(codeString)) + return V3Race._15305; + if ("1531-3".equals(codeString)) + return V3Race._15313; + if ("1532-1".equals(codeString)) + return V3Race._15321; + if ("1533-9".equals(codeString)) + return V3Race._15339; + if ("1534-7".equals(codeString)) + return V3Race._15347; + if ("1535-4".equals(codeString)) + return V3Race._15354; + if ("1536-2".equals(codeString)) + return V3Race._15362; + if ("1537-0".equals(codeString)) + return V3Race._15370; + if ("1538-8".equals(codeString)) + return V3Race._15388; + if ("1539-6".equals(codeString)) + return V3Race._15396; + if ("1541-2".equals(codeString)) + return V3Race._15412; + if ("1543-8".equals(codeString)) + return V3Race._15438; + if ("1545-3".equals(codeString)) + return V3Race._15453; + if ("1547-9".equals(codeString)) + return V3Race._15479; + if ("1549-5".equals(codeString)) + return V3Race._15495; + if ("1551-1".equals(codeString)) + return V3Race._15511; + if ("1552-9".equals(codeString)) + return V3Race._15529; + if ("1553-7".equals(codeString)) + return V3Race._15537; + if ("1554-5".equals(codeString)) + return V3Race._15545; + if ("1556-0".equals(codeString)) + return V3Race._15560; + if ("1558-6".equals(codeString)) + return V3Race._15586; + if ("1560-2".equals(codeString)) + return V3Race._15602; + if ("1562-8".equals(codeString)) + return V3Race._15628; + if ("1564-4".equals(codeString)) + return V3Race._15644; + if ("1566-9".equals(codeString)) + return V3Race._15669; + if ("1567-7".equals(codeString)) + return V3Race._15677; + if ("1568-5".equals(codeString)) + return V3Race._15685; + if ("1569-3".equals(codeString)) + return V3Race._15693; + if ("1570-1".equals(codeString)) + return V3Race._15701; + if ("1571-9".equals(codeString)) + return V3Race._15719; + if ("1573-5".equals(codeString)) + return V3Race._15735; + if ("1574-3".equals(codeString)) + return V3Race._15743; + if ("1576-8".equals(codeString)) + return V3Race._15768; + if ("1578-4".equals(codeString)) + return V3Race._15784; + if ("1579-2".equals(codeString)) + return V3Race._15792; + if ("1580-0".equals(codeString)) + return V3Race._15800; + if ("1582-6".equals(codeString)) + return V3Race._15826; + if ("1584-2".equals(codeString)) + return V3Race._15842; + if ("1586-7".equals(codeString)) + return V3Race._15867; + if ("1587-5".equals(codeString)) + return V3Race._15875; + if ("1588-3".equals(codeString)) + return V3Race._15883; + if ("1589-1".equals(codeString)) + return V3Race._15891; + if ("1590-9".equals(codeString)) + return V3Race._15909; + if ("1591-7".equals(codeString)) + return V3Race._15917; + if ("1592-5".equals(codeString)) + return V3Race._15925; + if ("1593-3".equals(codeString)) + return V3Race._15933; + if ("1594-1".equals(codeString)) + return V3Race._15941; + if ("1595-8".equals(codeString)) + return V3Race._15958; + if ("1596-6".equals(codeString)) + return V3Race._15966; + if ("1597-4".equals(codeString)) + return V3Race._15974; + if ("1598-2".equals(codeString)) + return V3Race._15982; + if ("1599-0".equals(codeString)) + return V3Race._15990; + if ("1600-6".equals(codeString)) + return V3Race._16006; + if ("1602-2".equals(codeString)) + return V3Race._16022; + if ("1603-0".equals(codeString)) + return V3Race._16030; + if ("1604-8".equals(codeString)) + return V3Race._16048; + if ("1605-5".equals(codeString)) + return V3Race._16055; + if ("1607-1".equals(codeString)) + return V3Race._16071; + if ("1609-7".equals(codeString)) + return V3Race._16097; + if ("1610-5".equals(codeString)) + return V3Race._16105; + if ("1611-3".equals(codeString)) + return V3Race._16113; + if ("1612-1".equals(codeString)) + return V3Race._16121; + if ("1613-9".equals(codeString)) + return V3Race._16139; + if ("1614-7".equals(codeString)) + return V3Race._16147; + if ("1615-4".equals(codeString)) + return V3Race._16154; + if ("1616-2".equals(codeString)) + return V3Race._16162; + if ("1617-0".equals(codeString)) + return V3Race._16170; + if ("1618-8".equals(codeString)) + return V3Race._16188; + if ("1619-6".equals(codeString)) + return V3Race._16196; + if ("1620-4".equals(codeString)) + return V3Race._16204; + if ("1621-2".equals(codeString)) + return V3Race._16212; + if ("1622-0".equals(codeString)) + return V3Race._16220; + if ("1623-8".equals(codeString)) + return V3Race._16238; + if ("1624-6".equals(codeString)) + return V3Race._16246; + if ("1625-3".equals(codeString)) + return V3Race._16253; + if ("1626-1".equals(codeString)) + return V3Race._16261; + if ("1627-9".equals(codeString)) + return V3Race._16279; + if ("1628-7".equals(codeString)) + return V3Race._16287; + if ("1629-5".equals(codeString)) + return V3Race._16295; + if ("1630-3".equals(codeString)) + return V3Race._16303; + if ("1631-1".equals(codeString)) + return V3Race._16311; + if ("1632-9".equals(codeString)) + return V3Race._16329; + if ("1633-7".equals(codeString)) + return V3Race._16337; + if ("1634-5".equals(codeString)) + return V3Race._16345; + if ("1635-2".equals(codeString)) + return V3Race._16352; + if ("1636-0".equals(codeString)) + return V3Race._16360; + if ("1637-8".equals(codeString)) + return V3Race._16378; + if ("1638-6".equals(codeString)) + return V3Race._16386; + if ("1639-4".equals(codeString)) + return V3Race._16394; + if ("1640-2".equals(codeString)) + return V3Race._16402; + if ("1641-0".equals(codeString)) + return V3Race._16410; + if ("1643-6".equals(codeString)) + return V3Race._16436; + if ("1645-1".equals(codeString)) + return V3Race._16451; + if ("1647-7".equals(codeString)) + return V3Race._16477; + if ("1649-3".equals(codeString)) + return V3Race._16493; + if ("1651-9".equals(codeString)) + return V3Race._16519; + if ("1653-5".equals(codeString)) + return V3Race._16535; + if ("1654-3".equals(codeString)) + return V3Race._16543; + if ("1655-0".equals(codeString)) + return V3Race._16550; + if ("1656-8".equals(codeString)) + return V3Race._16568; + if ("1657-6".equals(codeString)) + return V3Race._16576; + if ("1659-2".equals(codeString)) + return V3Race._16592; + if ("1661-8".equals(codeString)) + return V3Race._16618; + if ("1663-4".equals(codeString)) + return V3Race._16634; + if ("1665-9".equals(codeString)) + return V3Race._16659; + if ("1667-5".equals(codeString)) + return V3Race._16675; + if ("1668-3".equals(codeString)) + return V3Race._16683; + if ("1670-9".equals(codeString)) + return V3Race._16709; + if ("1671-7".equals(codeString)) + return V3Race._16717; + if ("1672-5".equals(codeString)) + return V3Race._16725; + if ("1673-3".equals(codeString)) + return V3Race._16733; + if ("1675-8".equals(codeString)) + return V3Race._16758; + if ("1677-4".equals(codeString)) + return V3Race._16774; + if ("1679-0".equals(codeString)) + return V3Race._16790; + if ("1680-8".equals(codeString)) + return V3Race._16808; + if ("1681-6".equals(codeString)) + return V3Race._16816; + if ("1683-2".equals(codeString)) + return V3Race._16832; + if ("1685-7".equals(codeString)) + return V3Race._16857; + if ("1687-3".equals(codeString)) + return V3Race._16873; + if ("1688-1".equals(codeString)) + return V3Race._16881; + if ("1689-9".equals(codeString)) + return V3Race._16899; + if ("1690-7".equals(codeString)) + return V3Race._16907; + if ("1692-3".equals(codeString)) + return V3Race._16923; + if ("1694-9".equals(codeString)) + return V3Race._16949; + if ("1696-4".equals(codeString)) + return V3Race._16964; + if ("1697-2".equals(codeString)) + return V3Race._16972; + if ("1698-0".equals(codeString)) + return V3Race._16980; + if ("1700-4".equals(codeString)) + return V3Race._17004; + if ("1702-0".equals(codeString)) + return V3Race._17020; + if ("1704-6".equals(codeString)) + return V3Race._17046; + if ("1705-3".equals(codeString)) + return V3Race._17053; + if ("1707-9".equals(codeString)) + return V3Race._17079; + if ("1709-5".equals(codeString)) + return V3Race._17095; + if ("1711-1".equals(codeString)) + return V3Race._17111; + if ("1712-9".equals(codeString)) + return V3Race._17129; + if ("1713-7".equals(codeString)) + return V3Race._17137; + if ("1715-2".equals(codeString)) + return V3Race._17152; + if ("1717-8".equals(codeString)) + return V3Race._17178; + if ("1718-6".equals(codeString)) + return V3Race._17186; + if ("1719-4".equals(codeString)) + return V3Race._17194; + if ("1720-2".equals(codeString)) + return V3Race._17202; + if ("1722-8".equals(codeString)) + return V3Race._17228; + if ("1724-4".equals(codeString)) + return V3Race._17244; + if ("1725-1".equals(codeString)) + return V3Race._17251; + if ("1726-9".equals(codeString)) + return V3Race._17269; + if ("1727-7".equals(codeString)) + return V3Race._17277; + if ("1728-5".equals(codeString)) + return V3Race._17285; + if ("1729-3".equals(codeString)) + return V3Race._17293; + if ("1730-1".equals(codeString)) + return V3Race._17301; + if ("1731-9".equals(codeString)) + return V3Race._17319; + if ("1732-7".equals(codeString)) + return V3Race._17327; + if ("1733-5".equals(codeString)) + return V3Race._17335; + if ("1735-0".equals(codeString)) + return V3Race._17350; + if ("1737-6".equals(codeString)) + return V3Race._17376; + if ("1739-2".equals(codeString)) + return V3Race._17392; + if ("1740-0".equals(codeString)) + return V3Race._17400; + if ("1811-9".equals(codeString)) + return V3Race._18119; + if ("1813-5".equals(codeString)) + return V3Race._18135; + if ("1814-3".equals(codeString)) + return V3Race._18143; + if ("1815-0".equals(codeString)) + return V3Race._18150; + if ("1816-8".equals(codeString)) + return V3Race._18168; + if ("1817-6".equals(codeString)) + return V3Race._18176; + if ("1818-4".equals(codeString)) + return V3Race._18184; + if ("1819-2".equals(codeString)) + return V3Race._18192; + if ("1820-0".equals(codeString)) + return V3Race._18200; + if ("1821-8".equals(codeString)) + return V3Race._18218; + if ("1822-6".equals(codeString)) + return V3Race._18226; + if ("1823-4".equals(codeString)) + return V3Race._18234; + if ("1824-2".equals(codeString)) + return V3Race._18242; + if ("1825-9".equals(codeString)) + return V3Race._18259; + if ("1826-7".equals(codeString)) + return V3Race._18267; + if ("1827-5".equals(codeString)) + return V3Race._18275; + if ("1828-3".equals(codeString)) + return V3Race._18283; + if ("1829-1".equals(codeString)) + return V3Race._18291; + if ("1830-9".equals(codeString)) + return V3Race._18309; + if ("1831-7".equals(codeString)) + return V3Race._18317; + if ("1832-5".equals(codeString)) + return V3Race._18325; + if ("1833-3".equals(codeString)) + return V3Race._18333; + if ("1834-1".equals(codeString)) + return V3Race._18341; + if ("1835-8".equals(codeString)) + return V3Race._18358; + if ("1837-4".equals(codeString)) + return V3Race._18374; + if ("1838-2".equals(codeString)) + return V3Race._18382; + if ("1840-8".equals(codeString)) + return V3Race._18408; + if ("1842-4".equals(codeString)) + return V3Race._18424; + if ("1844-0".equals(codeString)) + return V3Race._18440; + if ("1845-7".equals(codeString)) + return V3Race._18457; + if ("1846-5".equals(codeString)) + return V3Race._18465; + if ("1847-3".equals(codeString)) + return V3Race._18473; + if ("1848-1".equals(codeString)) + return V3Race._18481; + if ("1849-9".equals(codeString)) + return V3Race._18499; + if ("1850-7".equals(codeString)) + return V3Race._18507; + if ("1851-5".equals(codeString)) + return V3Race._18515; + if ("1852-3".equals(codeString)) + return V3Race._18523; + if ("1853-1".equals(codeString)) + return V3Race._18531; + if ("1854-9".equals(codeString)) + return V3Race._18549; + if ("1855-6".equals(codeString)) + return V3Race._18556; + if ("1856-4".equals(codeString)) + return V3Race._18564; + if ("1857-2".equals(codeString)) + return V3Race._18572; + if ("1858-0".equals(codeString)) + return V3Race._18580; + if ("1859-8".equals(codeString)) + return V3Race._18598; + if ("1860-6".equals(codeString)) + return V3Race._18606; + if ("1861-4".equals(codeString)) + return V3Race._18614; + if ("1862-2".equals(codeString)) + return V3Race._18622; + if ("1863-0".equals(codeString)) + return V3Race._18630; + if ("1864-8".equals(codeString)) + return V3Race._18648; + if ("1865-5".equals(codeString)) + return V3Race._18655; + if ("1866-3".equals(codeString)) + return V3Race._18663; + if ("1867-1".equals(codeString)) + return V3Race._18671; + if ("1868-9".equals(codeString)) + return V3Race._18689; + if ("1869-7".equals(codeString)) + return V3Race._18697; + if ("1870-5".equals(codeString)) + return V3Race._18705; + if ("1871-3".equals(codeString)) + return V3Race._18713; + if ("1872-1".equals(codeString)) + return V3Race._18721; + if ("1873-9".equals(codeString)) + return V3Race._18739; + if ("1874-7".equals(codeString)) + return V3Race._18747; + if ("1875-4".equals(codeString)) + return V3Race._18754; + if ("1876-2".equals(codeString)) + return V3Race._18762; + if ("1877-0".equals(codeString)) + return V3Race._18770; + if ("1878-8".equals(codeString)) + return V3Race._18788; + if ("1879-6".equals(codeString)) + return V3Race._18796; + if ("1880-4".equals(codeString)) + return V3Race._18804; + if ("1881-2".equals(codeString)) + return V3Race._18812; + if ("1882-0".equals(codeString)) + return V3Race._18820; + if ("1883-8".equals(codeString)) + return V3Race._18838; + if ("1884-6".equals(codeString)) + return V3Race._18846; + if ("1885-3".equals(codeString)) + return V3Race._18853; + if ("1886-1".equals(codeString)) + return V3Race._18861; + if ("1887-9".equals(codeString)) + return V3Race._18879; + if ("1888-7".equals(codeString)) + return V3Race._18887; + if ("1889-5".equals(codeString)) + return V3Race._18895; + if ("1891-1".equals(codeString)) + return V3Race._18911; + if ("1892-9".equals(codeString)) + return V3Race._18929; + if ("1893-7".equals(codeString)) + return V3Race._18937; + if ("1894-5".equals(codeString)) + return V3Race._18945; + if ("1896-0".equals(codeString)) + return V3Race._18960; + if ("1897-8".equals(codeString)) + return V3Race._18978; + if ("1898-6".equals(codeString)) + return V3Race._18986; + if ("1899-4".equals(codeString)) + return V3Race._18994; + if ("1900-0".equals(codeString)) + return V3Race._19000; + if ("1901-8".equals(codeString)) + return V3Race._19018; + if ("1902-6".equals(codeString)) + return V3Race._19026; + if ("1903-4".equals(codeString)) + return V3Race._19034; + if ("1904-2".equals(codeString)) + return V3Race._19042; + if ("1905-9".equals(codeString)) + return V3Race._19059; + if ("1906-7".equals(codeString)) + return V3Race._19067; + if ("1907-5".equals(codeString)) + return V3Race._19075; + if ("1908-3".equals(codeString)) + return V3Race._19083; + if ("1909-1".equals(codeString)) + return V3Race._19091; + if ("1910-9".equals(codeString)) + return V3Race._19109; + if ("1911-7".equals(codeString)) + return V3Race._19117; + if ("1912-5".equals(codeString)) + return V3Race._19125; + if ("1913-3".equals(codeString)) + return V3Race._19133; + if ("1914-1".equals(codeString)) + return V3Race._19141; + if ("1915-8".equals(codeString)) + return V3Race._19158; + if ("1916-6".equals(codeString)) + return V3Race._19166; + if ("1917-4".equals(codeString)) + return V3Race._19174; + if ("1918-2".equals(codeString)) + return V3Race._19182; + if ("1919-0".equals(codeString)) + return V3Race._19190; + if ("1920-8".equals(codeString)) + return V3Race._19208; + if ("1921-6".equals(codeString)) + return V3Race._19216; + if ("1922-4".equals(codeString)) + return V3Race._19224; + if ("1923-2".equals(codeString)) + return V3Race._19232; + if ("1924-0".equals(codeString)) + return V3Race._19240; + if ("1925-7".equals(codeString)) + return V3Race._19257; + if ("1926-5".equals(codeString)) + return V3Race._19265; + if ("1927-3".equals(codeString)) + return V3Race._19273; + if ("1928-1".equals(codeString)) + return V3Race._19281; + if ("1929-9".equals(codeString)) + return V3Race._19299; + if ("1930-7".equals(codeString)) + return V3Race._19307; + if ("1931-5".equals(codeString)) + return V3Race._19315; + if ("1932-3".equals(codeString)) + return V3Race._19323; + if ("1933-1".equals(codeString)) + return V3Race._19331; + if ("1934-9".equals(codeString)) + return V3Race._19349; + if ("1935-6".equals(codeString)) + return V3Race._19356; + if ("1936-4".equals(codeString)) + return V3Race._19364; + if ("1937-2".equals(codeString)) + return V3Race._19372; + if ("1938-0".equals(codeString)) + return V3Race._19380; + if ("1939-8".equals(codeString)) + return V3Race._19398; + if ("1940-6".equals(codeString)) + return V3Race._19406; + if ("1941-4".equals(codeString)) + return V3Race._19414; + if ("1942-2".equals(codeString)) + return V3Race._19422; + if ("1943-0".equals(codeString)) + return V3Race._19430; + if ("1944-8".equals(codeString)) + return V3Race._19448; + if ("1945-5".equals(codeString)) + return V3Race._19455; + if ("1946-3".equals(codeString)) + return V3Race._19463; + if ("1947-1".equals(codeString)) + return V3Race._19471; + if ("1948-9".equals(codeString)) + return V3Race._19489; + if ("1949-7".equals(codeString)) + return V3Race._19497; + if ("1950-5".equals(codeString)) + return V3Race._19505; + if ("1951-3".equals(codeString)) + return V3Race._19513; + if ("1952-1".equals(codeString)) + return V3Race._19521; + if ("1953-9".equals(codeString)) + return V3Race._19539; + if ("1954-7".equals(codeString)) + return V3Race._19547; + if ("1955-4".equals(codeString)) + return V3Race._19554; + if ("1956-2".equals(codeString)) + return V3Race._19562; + if ("1957-0".equals(codeString)) + return V3Race._19570; + if ("1958-8".equals(codeString)) + return V3Race._19588; + if ("1959-6".equals(codeString)) + return V3Race._19596; + if ("1960-4".equals(codeString)) + return V3Race._19604; + if ("1961-2".equals(codeString)) + return V3Race._19612; + if ("1962-0".equals(codeString)) + return V3Race._19620; + if ("1963-8".equals(codeString)) + return V3Race._19638; + if ("1964-6".equals(codeString)) + return V3Race._19646; + if ("1966-1".equals(codeString)) + return V3Race._19661; + if ("1968-7".equals(codeString)) + return V3Race._19687; + if ("1969-5".equals(codeString)) + return V3Race._19695; + if ("1970-3".equals(codeString)) + return V3Race._19703; + if ("1972-9".equals(codeString)) + return V3Race._19729; + if ("1973-7".equals(codeString)) + return V3Race._19737; + if ("1974-5".equals(codeString)) + return V3Race._19745; + if ("1975-2".equals(codeString)) + return V3Race._19752; + if ("1976-0".equals(codeString)) + return V3Race._19760; + if ("1977-8".equals(codeString)) + return V3Race._19778; + if ("1978-6".equals(codeString)) + return V3Race._19786; + if ("1979-4".equals(codeString)) + return V3Race._19794; + if ("1980-2".equals(codeString)) + return V3Race._19802; + if ("1981-0".equals(codeString)) + return V3Race._19810; + if ("1982-8".equals(codeString)) + return V3Race._19828; + if ("1984-4".equals(codeString)) + return V3Race._19844; + if ("1985-1".equals(codeString)) + return V3Race._19851; + if ("1986-9".equals(codeString)) + return V3Race._19869; + if ("1987-7".equals(codeString)) + return V3Race._19877; + if ("1988-5".equals(codeString)) + return V3Race._19885; + if ("1990-1".equals(codeString)) + return V3Race._19901; + if ("1992-7".equals(codeString)) + return V3Race._19927; + if ("1993-5".equals(codeString)) + return V3Race._19935; + if ("1994-3".equals(codeString)) + return V3Race._19943; + if ("1995-0".equals(codeString)) + return V3Race._19950; + if ("1996-8".equals(codeString)) + return V3Race._19968; + if ("1997-6".equals(codeString)) + return V3Race._19976; + if ("1998-4".equals(codeString)) + return V3Race._19984; + if ("1999-2".equals(codeString)) + return V3Race._19992; + if ("2000-8".equals(codeString)) + return V3Race._20008; + if ("2002-4".equals(codeString)) + return V3Race._20024; + if ("2004-0".equals(codeString)) + return V3Race._20040; + if ("2006-5".equals(codeString)) + return V3Race._20065; + if ("2007-3".equals(codeString)) + return V3Race._20073; + if ("2008-1".equals(codeString)) + return V3Race._20081; + if ("2009-9".equals(codeString)) + return V3Race._20099; + if ("2010-7".equals(codeString)) + return V3Race._20107; + if ("2011-5".equals(codeString)) + return V3Race._20115; + if ("2012-3".equals(codeString)) + return V3Race._20123; + if ("2013-1".equals(codeString)) + return V3Race._20131; + if ("2014-9".equals(codeString)) + return V3Race._20149; + if ("2015-6".equals(codeString)) + return V3Race._20156; + if ("2016-4".equals(codeString)) + return V3Race._20164; + if ("2017-2".equals(codeString)) + return V3Race._20172; + if ("2018-0".equals(codeString)) + return V3Race._20180; + if ("2019-8".equals(codeString)) + return V3Race._20198; + if ("2020-6".equals(codeString)) + return V3Race._20206; + if ("2021-4".equals(codeString)) + return V3Race._20214; + if ("2022-2".equals(codeString)) + return V3Race._20222; + if ("2023-0".equals(codeString)) + return V3Race._20230; + if ("2024-8".equals(codeString)) + return V3Race._20248; + if ("2025-5".equals(codeString)) + return V3Race._20255; + if ("2026-3".equals(codeString)) + return V3Race._20263; + if ("2028-9".equals(codeString)) + return V3Race._20289; + if ("2029-7".equals(codeString)) + return V3Race._20297; + if ("2030-5".equals(codeString)) + return V3Race._20305; + if ("2031-3".equals(codeString)) + return V3Race._20313; + if ("2032-1".equals(codeString)) + return V3Race._20321; + if ("2033-9".equals(codeString)) + return V3Race._20339; + if ("2034-7".equals(codeString)) + return V3Race._20347; + if ("2035-4".equals(codeString)) + return V3Race._20354; + if ("2036-2".equals(codeString)) + return V3Race._20362; + if ("2037-0".equals(codeString)) + return V3Race._20370; + if ("2038-8".equals(codeString)) + return V3Race._20388; + if ("2039-6".equals(codeString)) + return V3Race._20396; + if ("2040-4".equals(codeString)) + return V3Race._20404; + if ("2041-2".equals(codeString)) + return V3Race._20412; + if ("2042-0".equals(codeString)) + return V3Race._20420; + if ("2043-8".equals(codeString)) + return V3Race._20438; + if ("2044-6".equals(codeString)) + return V3Race._20446; + if ("2045-3".equals(codeString)) + return V3Race._20453; + if ("2046-1".equals(codeString)) + return V3Race._20461; + if ("2047-9".equals(codeString)) + return V3Race._20479; + if ("2048-7".equals(codeString)) + return V3Race._20487; + if ("2049-5".equals(codeString)) + return V3Race._20495; + if ("2050-3".equals(codeString)) + return V3Race._20503; + if ("2051-1".equals(codeString)) + return V3Race._20511; + if ("2052-9".equals(codeString)) + return V3Race._20529; + if ("2054-5".equals(codeString)) + return V3Race._20545; + if ("2056-0".equals(codeString)) + return V3Race._20560; + if ("2058-6".equals(codeString)) + return V3Race._20586; + if ("2060-2".equals(codeString)) + return V3Race._20602; + if ("2061-0".equals(codeString)) + return V3Race._20610; + if ("2062-8".equals(codeString)) + return V3Race._20628; + if ("2063-6".equals(codeString)) + return V3Race._20636; + if ("2064-4".equals(codeString)) + return V3Race._20644; + if ("2065-1".equals(codeString)) + return V3Race._20651; + if ("2066-9".equals(codeString)) + return V3Race._20669; + if ("2067-7".equals(codeString)) + return V3Race._20677; + if ("2068-5".equals(codeString)) + return V3Race._20685; + if ("2069-3".equals(codeString)) + return V3Race._20693; + if ("2070-1".equals(codeString)) + return V3Race._20701; + if ("2071-9".equals(codeString)) + return V3Race._20719; + if ("2072-7".equals(codeString)) + return V3Race._20727; + if ("2073-5".equals(codeString)) + return V3Race._20735; + if ("2074-3".equals(codeString)) + return V3Race._20743; + if ("2075-0".equals(codeString)) + return V3Race._20750; + if ("2076-8".equals(codeString)) + return V3Race._20768; + if ("2078-4".equals(codeString)) + return V3Race._20784; + if ("2079-2".equals(codeString)) + return V3Race._20792; + if ("2080-0".equals(codeString)) + return V3Race._20800; + if ("2081-8".equals(codeString)) + return V3Race._20818; + if ("2082-6".equals(codeString)) + return V3Race._20826; + if ("2083-4".equals(codeString)) + return V3Race._20834; + if ("2085-9".equals(codeString)) + return V3Race._20859; + if ("2086-7".equals(codeString)) + return V3Race._20867; + if ("2087-5".equals(codeString)) + return V3Race._20875; + if ("2088-3".equals(codeString)) + return V3Race._20883; + if ("2089-1".equals(codeString)) + return V3Race._20891; + if ("2090-9".equals(codeString)) + return V3Race._20909; + if ("2091-7".equals(codeString)) + return V3Race._20917; + if ("2092-5".equals(codeString)) + return V3Race._20925; + if ("2093-3".equals(codeString)) + return V3Race._20933; + if ("2094-1".equals(codeString)) + return V3Race._20941; + if ("2095-8".equals(codeString)) + return V3Race._20958; + if ("2096-6".equals(codeString)) + return V3Race._20966; + if ("2097-4".equals(codeString)) + return V3Race._20974; + if ("2098-2".equals(codeString)) + return V3Race._20982; + if ("2100-6".equals(codeString)) + return V3Race._21006; + if ("2101-4".equals(codeString)) + return V3Race._21014; + if ("2102-2".equals(codeString)) + return V3Race._21022; + if ("2103-0".equals(codeString)) + return V3Race._21030; + if ("2104-8".equals(codeString)) + return V3Race._21048; + if ("2500-7".equals(codeString)) + return V3Race._25007; + if ("2106-3".equals(codeString)) + return V3Race._21063; + if ("2108-9".equals(codeString)) + return V3Race._21089; + if ("2109-7".equals(codeString)) + return V3Race._21097; + if ("2110-5".equals(codeString)) + return V3Race._21105; + if ("2111-3".equals(codeString)) + return V3Race._21113; + if ("2112-1".equals(codeString)) + return V3Race._21121; + if ("2113-9".equals(codeString)) + return V3Race._21139; + if ("2114-7".equals(codeString)) + return V3Race._21147; + if ("2115-4".equals(codeString)) + return V3Race._21154; + if ("2116-2".equals(codeString)) + return V3Race._21162; + if ("2118-8".equals(codeString)) + return V3Race._21188; + if ("2119-6".equals(codeString)) + return V3Race._21196; + if ("2120-4".equals(codeString)) + return V3Race._21204; + if ("2121-2".equals(codeString)) + return V3Race._21212; + if ("2122-0".equals(codeString)) + return V3Race._21220; + if ("2123-8".equals(codeString)) + return V3Race._21238; + if ("2124-6".equals(codeString)) + return V3Race._21246; + if ("2125-3".equals(codeString)) + return V3Race._21253; + if ("2126-1".equals(codeString)) + return V3Race._21261; + if ("2127-9".equals(codeString)) + return V3Race._21279; + if ("2129-5".equals(codeString)) + return V3Race._21295; + if ("2131-1".equals(codeString)) + return V3Race._21311; + throw new IllegalArgumentException("Unknown V3Race code '"+codeString+"'"); + } + + public String toCode(V3Race code) { + if (code == V3Race._10025) + return "1002-5"; + if (code == V3Race._10041) + return "1004-1"; + if (code == V3Race._10066) + return "1006-6"; + if (code == V3Race._10082) + return "1008-2"; + if (code == V3Race._10108) + return "1010-8"; + if (code == V3Race._10116) + return "1011-6"; + if (code == V3Race._10124) + return "1012-4"; + if (code == V3Race._10132) + return "1013-2"; + if (code == V3Race._10140) + return "1014-0"; + if (code == V3Race._10157) + return "1015-7"; + if (code == V3Race._10165) + return "1016-5"; + if (code == V3Race._10173) + return "1017-3"; + if (code == V3Race._10181) + return "1018-1"; + if (code == V3Race._10199) + return "1019-9"; + if (code == V3Race._10215) + return "1021-5"; + if (code == V3Race._10223) + return "1022-3"; + if (code == V3Race._10231) + return "1023-1"; + if (code == V3Race._10249) + return "1024-9"; + if (code == V3Race._10264) + return "1026-4"; + if (code == V3Race._10280) + return "1028-0"; + if (code == V3Race._10306) + return "1030-6"; + if (code == V3Race._10314) + return "1031-4"; + if (code == V3Race._10330) + return "1033-0"; + if (code == V3Race._10355) + return "1035-5"; + if (code == V3Race._10371) + return "1037-1"; + if (code == V3Race._10397) + return "1039-7"; + if (code == V3Race._10413) + return "1041-3"; + if (code == V3Race._10421) + return "1042-1"; + if (code == V3Race._10447) + return "1044-7"; + if (code == V3Race._10454) + return "1045-4"; + if (code == V3Race._10462) + return "1046-2"; + if (code == V3Race._10470) + return "1047-0"; + if (code == V3Race._10488) + return "1048-8"; + if (code == V3Race._10496) + return "1049-6"; + if (code == V3Race._10504) + return "1050-4"; + if (code == V3Race._10512) + return "1051-2"; + if (code == V3Race._10538) + return "1053-8"; + if (code == V3Race._10546) + return "1054-6"; + if (code == V3Race._10553) + return "1055-3"; + if (code == V3Race._10561) + return "1056-1"; + if (code == V3Race._10579) + return "1057-9"; + if (code == V3Race._10587) + return "1058-7"; + if (code == V3Race._10595) + return "1059-5"; + if (code == V3Race._10603) + return "1060-3"; + if (code == V3Race._10611) + return "1061-1"; + if (code == V3Race._10629) + return "1062-9"; + if (code == V3Race._10637) + return "1063-7"; + if (code == V3Race._10645) + return "1064-5"; + if (code == V3Race._10652) + return "1065-2"; + if (code == V3Race._10660) + return "1066-0"; + if (code == V3Race._10686) + return "1068-6"; + if (code == V3Race._10694) + return "1069-4"; + if (code == V3Race._10702) + return "1070-2"; + if (code == V3Race._10710) + return "1071-0"; + if (code == V3Race._10728) + return "1072-8"; + if (code == V3Race._10736) + return "1073-6"; + if (code == V3Race._10744) + return "1074-4"; + if (code == V3Race._10769) + return "1076-9"; + if (code == V3Race._17418) + return "1741-8"; + if (code == V3Race._17426) + return "1742-6"; + if (code == V3Race._17434) + return "1743-4"; + if (code == V3Race._17442) + return "1744-2"; + if (code == V3Race._17459) + return "1745-9"; + if (code == V3Race._17467) + return "1746-7"; + if (code == V3Race._17475) + return "1747-5"; + if (code == V3Race._17483) + return "1748-3"; + if (code == V3Race._17491) + return "1749-1"; + if (code == V3Race._17509) + return "1750-9"; + if (code == V3Race._17517) + return "1751-7"; + if (code == V3Race._17525) + return "1752-5"; + if (code == V3Race._17533) + return "1753-3"; + if (code == V3Race._17541) + return "1754-1"; + if (code == V3Race._17558) + return "1755-8"; + if (code == V3Race._17566) + return "1756-6"; + if (code == V3Race._17574) + return "1757-4"; + if (code == V3Race._17582) + return "1758-2"; + if (code == V3Race._17590) + return "1759-0"; + if (code == V3Race._17608) + return "1760-8"; + if (code == V3Race._17616) + return "1761-6"; + if (code == V3Race._17624) + return "1762-4"; + if (code == V3Race._17632) + return "1763-2"; + if (code == V3Race._17640) + return "1764-0"; + if (code == V3Race._17657) + return "1765-7"; + if (code == V3Race._17665) + return "1766-5"; + if (code == V3Race._17673) + return "1767-3"; + if (code == V3Race._17681) + return "1768-1"; + if (code == V3Race._17699) + return "1769-9"; + if (code == V3Race._17707) + return "1770-7"; + if (code == V3Race._17715) + return "1771-5"; + if (code == V3Race._17723) + return "1772-3"; + if (code == V3Race._17731) + return "1773-1"; + if (code == V3Race._17749) + return "1774-9"; + if (code == V3Race._17756) + return "1775-6"; + if (code == V3Race._17764) + return "1776-4"; + if (code == V3Race._17772) + return "1777-2"; + if (code == V3Race._17780) + return "1778-0"; + if (code == V3Race._17798) + return "1779-8"; + if (code == V3Race._17806) + return "1780-6"; + if (code == V3Race._17814) + return "1781-4"; + if (code == V3Race._17822) + return "1782-2"; + if (code == V3Race._17830) + return "1783-0"; + if (code == V3Race._17848) + return "1784-8"; + if (code == V3Race._17855) + return "1785-5"; + if (code == V3Race._17863) + return "1786-3"; + if (code == V3Race._17871) + return "1787-1"; + if (code == V3Race._17889) + return "1788-9"; + if (code == V3Race._17897) + return "1789-7"; + if (code == V3Race._17905) + return "1790-5"; + if (code == V3Race._17913) + return "1791-3"; + if (code == V3Race._17921) + return "1792-1"; + if (code == V3Race._17939) + return "1793-9"; + if (code == V3Race._17947) + return "1794-7"; + if (code == V3Race._17954) + return "1795-4"; + if (code == V3Race._17962) + return "1796-2"; + if (code == V3Race._17970) + return "1797-0"; + if (code == V3Race._17988) + return "1798-8"; + if (code == V3Race._17996) + return "1799-6"; + if (code == V3Race._18002) + return "1800-2"; + if (code == V3Race._18010) + return "1801-0"; + if (code == V3Race._18028) + return "1802-8"; + if (code == V3Race._18036) + return "1803-6"; + if (code == V3Race._18044) + return "1804-4"; + if (code == V3Race._18051) + return "1805-1"; + if (code == V3Race._18069) + return "1806-9"; + if (code == V3Race._18077) + return "1807-7"; + if (code == V3Race._18085) + return "1808-5"; + if (code == V3Race._18093) + return "1809-3"; + if (code == V3Race._10785) + return "1078-5"; + if (code == V3Race._10801) + return "1080-1"; + if (code == V3Race._10827) + return "1082-7"; + if (code == V3Race._10835) + return "1083-5"; + if (code == V3Race._10843) + return "1084-3"; + if (code == V3Race._10868) + return "1086-8"; + if (code == V3Race._10884) + return "1088-4"; + if (code == V3Race._10892) + return "1089-2"; + if (code == V3Race._10900) + return "1090-0"; + if (code == V3Race._10918) + return "1091-8"; + if (code == V3Race._10926) + return "1092-6"; + if (code == V3Race._10934) + return "1093-4"; + if (code == V3Race._10942) + return "1094-2"; + if (code == V3Race._10959) + return "1095-9"; + if (code == V3Race._10967) + return "1096-7"; + if (code == V3Race._10975) + return "1097-5"; + if (code == V3Race._10983) + return "1098-3"; + if (code == V3Race._11007) + return "1100-7"; + if (code == V3Race._11023) + return "1102-3"; + if (code == V3Race._11031) + return "1103-1"; + if (code == V3Race._11049) + return "1104-9"; + if (code == V3Race._11064) + return "1106-4"; + if (code == V3Race._11080) + return "1108-0"; + if (code == V3Race._11098) + return "1109-8"; + if (code == V3Race._11106) + return "1110-6"; + if (code == V3Race._11122) + return "1112-2"; + if (code == V3Race._11148) + return "1114-8"; + if (code == V3Race._11155) + return "1115-5"; + if (code == V3Race._11163) + return "1116-3"; + if (code == V3Race._11171) + return "1117-1"; + if (code == V3Race._11189) + return "1118-9"; + if (code == V3Race._11197) + return "1119-7"; + if (code == V3Race._11205) + return "1120-5"; + if (code == V3Race._11213) + return "1121-3"; + if (code == V3Race._11239) + return "1123-9"; + if (code == V3Race._11247) + return "1124-7"; + if (code == V3Race._11254) + return "1125-4"; + if (code == V3Race._11262) + return "1126-2"; + if (code == V3Race._11270) + return "1127-0"; + if (code == V3Race._11288) + return "1128-8"; + if (code == V3Race._11296) + return "1129-6"; + if (code == V3Race._11304) + return "1130-4"; + if (code == V3Race._11312) + return "1131-2"; + if (code == V3Race._11320) + return "1132-0"; + if (code == V3Race._11338) + return "1133-8"; + if (code == V3Race._11346) + return "1134-6"; + if (code == V3Race._11353) + return "1135-3"; + if (code == V3Race._11361) + return "1136-1"; + if (code == V3Race._11379) + return "1137-9"; + if (code == V3Race._11387) + return "1138-7"; + if (code == V3Race._11395) + return "1139-5"; + if (code == V3Race._11403) + return "1140-3"; + if (code == V3Race._11411) + return "1141-1"; + if (code == V3Race._11429) + return "1142-9"; + if (code == V3Race._11437) + return "1143-7"; + if (code == V3Race._11445) + return "1144-5"; + if (code == V3Race._11452) + return "1145-2"; + if (code == V3Race._11460) + return "1146-0"; + if (code == V3Race._11478) + return "1147-8"; + if (code == V3Race._11486) + return "1148-6"; + if (code == V3Race._11502) + return "1150-2"; + if (code == V3Race._11510) + return "1151-0"; + if (code == V3Race._11536) + return "1153-6"; + if (code == V3Race._11551) + return "1155-1"; + if (code == V3Race._11569) + return "1156-9"; + if (code == V3Race._11577) + return "1157-7"; + if (code == V3Race._11585) + return "1158-5"; + if (code == V3Race._11593) + return "1159-3"; + if (code == V3Race._11601) + return "1160-1"; + if (code == V3Race._11627) + return "1162-7"; + if (code == V3Race._11635) + return "1163-5"; + if (code == V3Race._11650) + return "1165-0"; + if (code == V3Race._11676) + return "1167-6"; + if (code == V3Race._11692) + return "1169-2"; + if (code == V3Race._11718) + return "1171-8"; + if (code == V3Race._11734) + return "1173-4"; + if (code == V3Race._11759) + return "1175-9"; + if (code == V3Race._11767) + return "1176-7"; + if (code == V3Race._11783) + return "1178-3"; + if (code == V3Race._11809) + return "1180-9"; + if (code == V3Race._11825) + return "1182-5"; + if (code == V3Race._11841) + return "1184-1"; + if (code == V3Race._11866) + return "1186-6"; + if (code == V3Race._11874) + return "1187-4"; + if (code == V3Race._11890) + return "1189-0"; + if (code == V3Race._11916) + return "1191-6"; + if (code == V3Race._11932) + return "1193-2"; + if (code == V3Race._11940) + return "1194-0"; + if (code == V3Race._11957) + return "1195-7"; + if (code == V3Race._11965) + return "1196-5"; + if (code == V3Race._11973) + return "1197-3"; + if (code == V3Race._11981) + return "1198-1"; + if (code == V3Race._11999) + return "1199-9"; + if (code == V3Race._12005) + return "1200-5"; + if (code == V3Race._12013) + return "1201-3"; + if (code == V3Race._12021) + return "1202-1"; + if (code == V3Race._12039) + return "1203-9"; + if (code == V3Race._12047) + return "1204-7"; + if (code == V3Race._12054) + return "1205-4"; + if (code == V3Race._12070) + return "1207-0"; + if (code == V3Race._12096) + return "1209-6"; + if (code == V3Race._12112) + return "1211-2"; + if (code == V3Race._12120) + return "1212-0"; + if (code == V3Race._12146) + return "1214-6"; + if (code == V3Race._12153) + return "1215-3"; + if (code == V3Race._12161) + return "1216-1"; + if (code == V3Race._12179) + return "1217-9"; + if (code == V3Race._12187) + return "1218-7"; + if (code == V3Race._12195) + return "1219-5"; + if (code == V3Race._12203) + return "1220-3"; + if (code == V3Race._12229) + return "1222-9"; + if (code == V3Race._12237) + return "1223-7"; + if (code == V3Race._12245) + return "1224-5"; + if (code == V3Race._12252) + return "1225-2"; + if (code == V3Race._12260) + return "1226-0"; + if (code == V3Race._12278) + return "1227-8"; + if (code == V3Race._12286) + return "1228-6"; + if (code == V3Race._12294) + return "1229-4"; + if (code == V3Race._12302) + return "1230-2"; + if (code == V3Race._12310) + return "1231-0"; + if (code == V3Race._12336) + return "1233-6"; + if (code == V3Race._12344) + return "1234-4"; + if (code == V3Race._12351) + return "1235-1"; + if (code == V3Race._12369) + return "1236-9"; + if (code == V3Race._12377) + return "1237-7"; + if (code == V3Race._12385) + return "1238-5"; + if (code == V3Race._12393) + return "1239-3"; + if (code == V3Race._12401) + return "1240-1"; + if (code == V3Race._12419) + return "1241-9"; + if (code == V3Race._12427) + return "1242-7"; + if (code == V3Race._12435) + return "1243-5"; + if (code == V3Race._12443) + return "1244-3"; + if (code == V3Race._12450) + return "1245-0"; + if (code == V3Race._12468) + return "1246-8"; + if (code == V3Race._12476) + return "1247-6"; + if (code == V3Race._12484) + return "1248-4"; + if (code == V3Race._12500) + return "1250-0"; + if (code == V3Race._12526) + return "1252-6"; + if (code == V3Race._12542) + return "1254-2"; + if (code == V3Race._12567) + return "1256-7"; + if (code == V3Race._12583) + return "1258-3"; + if (code == V3Race._12609) + return "1260-9"; + if (code == V3Race._12625) + return "1262-5"; + if (code == V3Race._12641) + return "1264-1"; + if (code == V3Race._12658) + return "1265-8"; + if (code == V3Race._12674) + return "1267-4"; + if (code == V3Race._12690) + return "1269-0"; + if (code == V3Race._12716) + return "1271-6"; + if (code == V3Race._12724) + return "1272-4"; + if (code == V3Race._12732) + return "1273-2"; + if (code == V3Race._12757) + return "1275-7"; + if (code == V3Race._12773) + return "1277-3"; + if (code == V3Race._12799) + return "1279-9"; + if (code == V3Race._12815) + return "1281-5"; + if (code == V3Race._12823) + return "1282-3"; + if (code == V3Race._12831) + return "1283-1"; + if (code == V3Race._12856) + return "1285-6"; + if (code == V3Race._12864) + return "1286-4"; + if (code == V3Race._12872) + return "1287-2"; + if (code == V3Race._12880) + return "1288-0"; + if (code == V3Race._12898) + return "1289-8"; + if (code == V3Race._12906) + return "1290-6"; + if (code == V3Race._12914) + return "1291-4"; + if (code == V3Race._12922) + return "1292-2"; + if (code == V3Race._12930) + return "1293-0"; + if (code == V3Race._12948) + return "1294-8"; + if (code == V3Race._12955) + return "1295-5"; + if (code == V3Race._12971) + return "1297-1"; + if (code == V3Race._12997) + return "1299-7"; + if (code == V3Race._13011) + return "1301-1"; + if (code == V3Race._13037) + return "1303-7"; + if (code == V3Race._13052) + return "1305-2"; + if (code == V3Race._13060) + return "1306-0"; + if (code == V3Race._13078) + return "1307-8"; + if (code == V3Race._13094) + return "1309-4"; + if (code == V3Race._13102) + return "1310-2"; + if (code == V3Race._13128) + return "1312-8"; + if (code == V3Race._13136) + return "1313-6"; + if (code == V3Race._13144) + return "1314-4"; + if (code == V3Race._13151) + return "1315-1"; + if (code == V3Race._13177) + return "1317-7"; + if (code == V3Race._13193) + return "1319-3"; + if (code == V3Race._13219) + return "1321-9"; + if (code == V3Race._13235) + return "1323-5"; + if (code == V3Race._13250) + return "1325-0"; + if (code == V3Race._13268) + return "1326-8"; + if (code == V3Race._13276) + return "1327-6"; + if (code == V3Race._13284) + return "1328-4"; + if (code == V3Race._13292) + return "1329-2"; + if (code == V3Race._13318) + return "1331-8"; + if (code == V3Race._13326) + return "1332-6"; + if (code == V3Race._13334) + return "1333-4"; + if (code == V3Race._13342) + return "1334-2"; + if (code == V3Race._13359) + return "1335-9"; + if (code == V3Race._13367) + return "1336-7"; + if (code == V3Race._13375) + return "1337-5"; + if (code == V3Race._13383) + return "1338-3"; + if (code == V3Race._13409) + return "1340-9"; + if (code == V3Race._13425) + return "1342-5"; + if (code == V3Race._13441) + return "1344-1"; + if (code == V3Race._13458) + return "1345-8"; + if (code == V3Race._13466) + return "1346-6"; + if (code == V3Race._13482) + return "1348-2"; + if (code == V3Race._13508) + return "1350-8"; + if (code == V3Race._13524) + return "1352-4"; + if (code == V3Race._13540) + return "1354-0"; + if (code == V3Race._13565) + return "1356-5"; + if (code == V3Race._13581) + return "1358-1"; + if (code == V3Race._13599) + return "1359-9"; + if (code == V3Race._13607) + return "1360-7"; + if (code == V3Race._13615) + return "1361-5"; + if (code == V3Race._13631) + return "1363-1"; + if (code == V3Race._13656) + return "1365-6"; + if (code == V3Race._13664) + return "1366-4"; + if (code == V3Race._13680) + return "1368-0"; + if (code == V3Race._13706) + return "1370-6"; + if (code == V3Race._13722) + return "1372-2"; + if (code == V3Race._13748) + return "1374-8"; + if (code == V3Race._13763) + return "1376-3"; + if (code == V3Race._13789) + return "1378-9"; + if (code == V3Race._13805) + return "1380-5"; + if (code == V3Race._13821) + return "1382-1"; + if (code == V3Race._13839) + return "1383-9"; + if (code == V3Race._13847) + return "1384-7"; + if (code == V3Race._13854) + return "1385-4"; + if (code == V3Race._13870) + return "1387-0"; + if (code == V3Race._13896) + return "1389-6"; + if (code == V3Race._13912) + return "1391-2"; + if (code == V3Race._13920) + return "1392-0"; + if (code == V3Race._13938) + return "1393-8"; + if (code == V3Race._13946) + return "1394-6"; + if (code == V3Race._13953) + return "1395-3"; + if (code == V3Race._13961) + return "1396-1"; + if (code == V3Race._13979) + return "1397-9"; + if (code == V3Race._13987) + return "1398-7"; + if (code == V3Race._13995) + return "1399-5"; + if (code == V3Race._14001) + return "1400-1"; + if (code == V3Race._14019) + return "1401-9"; + if (code == V3Race._14035) + return "1403-5"; + if (code == V3Race._14050) + return "1405-0"; + if (code == V3Race._14076) + return "1407-6"; + if (code == V3Race._14092) + return "1409-2"; + if (code == V3Race._14118) + return "1411-8"; + if (code == V3Race._14126) + return "1412-6"; + if (code == V3Race._14134) + return "1413-4"; + if (code == V3Race._14142) + return "1414-2"; + if (code == V3Race._14167) + return "1416-7"; + if (code == V3Race._14175) + return "1417-5"; + if (code == V3Race._14183) + return "1418-3"; + if (code == V3Race._14191) + return "1419-1"; + if (code == V3Race._14209) + return "1420-9"; + if (code == V3Race._14217) + return "1421-7"; + if (code == V3Race._14225) + return "1422-5"; + if (code == V3Race._14233) + return "1423-3"; + if (code == V3Race._14241) + return "1424-1"; + if (code == V3Race._14258) + return "1425-8"; + if (code == V3Race._14266) + return "1426-6"; + if (code == V3Race._14274) + return "1427-4"; + if (code == V3Race._14282) + return "1428-2"; + if (code == V3Race._14290) + return "1429-0"; + if (code == V3Race._14308) + return "1430-8"; + if (code == V3Race._14316) + return "1431-6"; + if (code == V3Race._14324) + return "1432-4"; + if (code == V3Race._14332) + return "1433-2"; + if (code == V3Race._14340) + return "1434-0"; + if (code == V3Race._14357) + return "1435-7"; + if (code == V3Race._14365) + return "1436-5"; + if (code == V3Race._14373) + return "1437-3"; + if (code == V3Race._14399) + return "1439-9"; + if (code == V3Race._14415) + return "1441-5"; + if (code == V3Race._14423) + return "1442-3"; + if (code == V3Race._14431) + return "1443-1"; + if (code == V3Race._14456) + return "1445-6"; + if (code == V3Race._14464) + return "1446-4"; + if (code == V3Race._14480) + return "1448-0"; + if (code == V3Race._14506) + return "1450-6"; + if (code == V3Race._14514) + return "1451-4"; + if (code == V3Race._14530) + return "1453-0"; + if (code == V3Race._14548) + return "1454-8"; + if (code == V3Race._14563) + return "1456-3"; + if (code == V3Race._14571) + return "1457-1"; + if (code == V3Race._14589) + return "1458-9"; + if (code == V3Race._14605) + return "1460-5"; + if (code == V3Race._14621) + return "1462-1"; + if (code == V3Race._14647) + return "1464-7"; + if (code == V3Race._14654) + return "1465-4"; + if (code == V3Race._14662) + return "1466-2"; + if (code == V3Race._14670) + return "1467-0"; + if (code == V3Race._14688) + return "1468-8"; + if (code == V3Race._14696) + return "1469-6"; + if (code == V3Race._14704) + return "1470-4"; + if (code == V3Race._14712) + return "1471-2"; + if (code == V3Race._14720) + return "1472-0"; + if (code == V3Race._14746) + return "1474-6"; + if (code == V3Race._14753) + return "1475-3"; + if (code == V3Race._14761) + return "1476-1"; + if (code == V3Race._14787) + return "1478-7"; + if (code == V3Race._14795) + return "1479-5"; + if (code == V3Race._14803) + return "1480-3"; + if (code == V3Race._14811) + return "1481-1"; + if (code == V3Race._14829) + return "1482-9"; + if (code == V3Race._14837) + return "1483-7"; + if (code == V3Race._14845) + return "1484-5"; + if (code == V3Race._14852) + return "1485-2"; + if (code == V3Race._14878) + return "1487-8"; + if (code == V3Race._14894) + return "1489-4"; + if (code == V3Race._14902) + return "1490-2"; + if (code == V3Race._14910) + return "1491-0"; + if (code == V3Race._14928) + return "1492-8"; + if (code == V3Race._14936) + return "1493-6"; + if (code == V3Race._14944) + return "1494-4"; + if (code == V3Race._14951) + return "1495-1"; + if (code == V3Race._14969) + return "1496-9"; + if (code == V3Race._14977) + return "1497-7"; + if (code == V3Race._14985) + return "1498-5"; + if (code == V3Race._14993) + return "1499-3"; + if (code == V3Race._15008) + return "1500-8"; + if (code == V3Race._15016) + return "1501-6"; + if (code == V3Race._15024) + return "1502-4"; + if (code == V3Race._15032) + return "1503-2"; + if (code == V3Race._15040) + return "1504-0"; + if (code == V3Race._15057) + return "1505-7"; + if (code == V3Race._15065) + return "1506-5"; + if (code == V3Race._15073) + return "1507-3"; + if (code == V3Race._15081) + return "1508-1"; + if (code == V3Race._15099) + return "1509-9"; + if (code == V3Race._15107) + return "1510-7"; + if (code == V3Race._15115) + return "1511-5"; + if (code == V3Race._15123) + return "1512-3"; + if (code == V3Race._15131) + return "1513-1"; + if (code == V3Race._15149) + return "1514-9"; + if (code == V3Race._15156) + return "1515-6"; + if (code == V3Race._15164) + return "1516-4"; + if (code == V3Race._15180) + return "1518-0"; + if (code == V3Race._15198) + return "1519-8"; + if (code == V3Race._15206) + return "1520-6"; + if (code == V3Race._15214) + return "1521-4"; + if (code == V3Race._15222) + return "1522-2"; + if (code == V3Race._15230) + return "1523-0"; + if (code == V3Race._15248) + return "1524-8"; + if (code == V3Race._15255) + return "1525-5"; + if (code == V3Race._15263) + return "1526-3"; + if (code == V3Race._15271) + return "1527-1"; + if (code == V3Race._15289) + return "1528-9"; + if (code == V3Race._15297) + return "1529-7"; + if (code == V3Race._15305) + return "1530-5"; + if (code == V3Race._15313) + return "1531-3"; + if (code == V3Race._15321) + return "1532-1"; + if (code == V3Race._15339) + return "1533-9"; + if (code == V3Race._15347) + return "1534-7"; + if (code == V3Race._15354) + return "1535-4"; + if (code == V3Race._15362) + return "1536-2"; + if (code == V3Race._15370) + return "1537-0"; + if (code == V3Race._15388) + return "1538-8"; + if (code == V3Race._15396) + return "1539-6"; + if (code == V3Race._15412) + return "1541-2"; + if (code == V3Race._15438) + return "1543-8"; + if (code == V3Race._15453) + return "1545-3"; + if (code == V3Race._15479) + return "1547-9"; + if (code == V3Race._15495) + return "1549-5"; + if (code == V3Race._15511) + return "1551-1"; + if (code == V3Race._15529) + return "1552-9"; + if (code == V3Race._15537) + return "1553-7"; + if (code == V3Race._15545) + return "1554-5"; + if (code == V3Race._15560) + return "1556-0"; + if (code == V3Race._15586) + return "1558-6"; + if (code == V3Race._15602) + return "1560-2"; + if (code == V3Race._15628) + return "1562-8"; + if (code == V3Race._15644) + return "1564-4"; + if (code == V3Race._15669) + return "1566-9"; + if (code == V3Race._15677) + return "1567-7"; + if (code == V3Race._15685) + return "1568-5"; + if (code == V3Race._15693) + return "1569-3"; + if (code == V3Race._15701) + return "1570-1"; + if (code == V3Race._15719) + return "1571-9"; + if (code == V3Race._15735) + return "1573-5"; + if (code == V3Race._15743) + return "1574-3"; + if (code == V3Race._15768) + return "1576-8"; + if (code == V3Race._15784) + return "1578-4"; + if (code == V3Race._15792) + return "1579-2"; + if (code == V3Race._15800) + return "1580-0"; + if (code == V3Race._15826) + return "1582-6"; + if (code == V3Race._15842) + return "1584-2"; + if (code == V3Race._15867) + return "1586-7"; + if (code == V3Race._15875) + return "1587-5"; + if (code == V3Race._15883) + return "1588-3"; + if (code == V3Race._15891) + return "1589-1"; + if (code == V3Race._15909) + return "1590-9"; + if (code == V3Race._15917) + return "1591-7"; + if (code == V3Race._15925) + return "1592-5"; + if (code == V3Race._15933) + return "1593-3"; + if (code == V3Race._15941) + return "1594-1"; + if (code == V3Race._15958) + return "1595-8"; + if (code == V3Race._15966) + return "1596-6"; + if (code == V3Race._15974) + return "1597-4"; + if (code == V3Race._15982) + return "1598-2"; + if (code == V3Race._15990) + return "1599-0"; + if (code == V3Race._16006) + return "1600-6"; + if (code == V3Race._16022) + return "1602-2"; + if (code == V3Race._16030) + return "1603-0"; + if (code == V3Race._16048) + return "1604-8"; + if (code == V3Race._16055) + return "1605-5"; + if (code == V3Race._16071) + return "1607-1"; + if (code == V3Race._16097) + return "1609-7"; + if (code == V3Race._16105) + return "1610-5"; + if (code == V3Race._16113) + return "1611-3"; + if (code == V3Race._16121) + return "1612-1"; + if (code == V3Race._16139) + return "1613-9"; + if (code == V3Race._16147) + return "1614-7"; + if (code == V3Race._16154) + return "1615-4"; + if (code == V3Race._16162) + return "1616-2"; + if (code == V3Race._16170) + return "1617-0"; + if (code == V3Race._16188) + return "1618-8"; + if (code == V3Race._16196) + return "1619-6"; + if (code == V3Race._16204) + return "1620-4"; + if (code == V3Race._16212) + return "1621-2"; + if (code == V3Race._16220) + return "1622-0"; + if (code == V3Race._16238) + return "1623-8"; + if (code == V3Race._16246) + return "1624-6"; + if (code == V3Race._16253) + return "1625-3"; + if (code == V3Race._16261) + return "1626-1"; + if (code == V3Race._16279) + return "1627-9"; + if (code == V3Race._16287) + return "1628-7"; + if (code == V3Race._16295) + return "1629-5"; + if (code == V3Race._16303) + return "1630-3"; + if (code == V3Race._16311) + return "1631-1"; + if (code == V3Race._16329) + return "1632-9"; + if (code == V3Race._16337) + return "1633-7"; + if (code == V3Race._16345) + return "1634-5"; + if (code == V3Race._16352) + return "1635-2"; + if (code == V3Race._16360) + return "1636-0"; + if (code == V3Race._16378) + return "1637-8"; + if (code == V3Race._16386) + return "1638-6"; + if (code == V3Race._16394) + return "1639-4"; + if (code == V3Race._16402) + return "1640-2"; + if (code == V3Race._16410) + return "1641-0"; + if (code == V3Race._16436) + return "1643-6"; + if (code == V3Race._16451) + return "1645-1"; + if (code == V3Race._16477) + return "1647-7"; + if (code == V3Race._16493) + return "1649-3"; + if (code == V3Race._16519) + return "1651-9"; + if (code == V3Race._16535) + return "1653-5"; + if (code == V3Race._16543) + return "1654-3"; + if (code == V3Race._16550) + return "1655-0"; + if (code == V3Race._16568) + return "1656-8"; + if (code == V3Race._16576) + return "1657-6"; + if (code == V3Race._16592) + return "1659-2"; + if (code == V3Race._16618) + return "1661-8"; + if (code == V3Race._16634) + return "1663-4"; + if (code == V3Race._16659) + return "1665-9"; + if (code == V3Race._16675) + return "1667-5"; + if (code == V3Race._16683) + return "1668-3"; + if (code == V3Race._16709) + return "1670-9"; + if (code == V3Race._16717) + return "1671-7"; + if (code == V3Race._16725) + return "1672-5"; + if (code == V3Race._16733) + return "1673-3"; + if (code == V3Race._16758) + return "1675-8"; + if (code == V3Race._16774) + return "1677-4"; + if (code == V3Race._16790) + return "1679-0"; + if (code == V3Race._16808) + return "1680-8"; + if (code == V3Race._16816) + return "1681-6"; + if (code == V3Race._16832) + return "1683-2"; + if (code == V3Race._16857) + return "1685-7"; + if (code == V3Race._16873) + return "1687-3"; + if (code == V3Race._16881) + return "1688-1"; + if (code == V3Race._16899) + return "1689-9"; + if (code == V3Race._16907) + return "1690-7"; + if (code == V3Race._16923) + return "1692-3"; + if (code == V3Race._16949) + return "1694-9"; + if (code == V3Race._16964) + return "1696-4"; + if (code == V3Race._16972) + return "1697-2"; + if (code == V3Race._16980) + return "1698-0"; + if (code == V3Race._17004) + return "1700-4"; + if (code == V3Race._17020) + return "1702-0"; + if (code == V3Race._17046) + return "1704-6"; + if (code == V3Race._17053) + return "1705-3"; + if (code == V3Race._17079) + return "1707-9"; + if (code == V3Race._17095) + return "1709-5"; + if (code == V3Race._17111) + return "1711-1"; + if (code == V3Race._17129) + return "1712-9"; + if (code == V3Race._17137) + return "1713-7"; + if (code == V3Race._17152) + return "1715-2"; + if (code == V3Race._17178) + return "1717-8"; + if (code == V3Race._17186) + return "1718-6"; + if (code == V3Race._17194) + return "1719-4"; + if (code == V3Race._17202) + return "1720-2"; + if (code == V3Race._17228) + return "1722-8"; + if (code == V3Race._17244) + return "1724-4"; + if (code == V3Race._17251) + return "1725-1"; + if (code == V3Race._17269) + return "1726-9"; + if (code == V3Race._17277) + return "1727-7"; + if (code == V3Race._17285) + return "1728-5"; + if (code == V3Race._17293) + return "1729-3"; + if (code == V3Race._17301) + return "1730-1"; + if (code == V3Race._17319) + return "1731-9"; + if (code == V3Race._17327) + return "1732-7"; + if (code == V3Race._17335) + return "1733-5"; + if (code == V3Race._17350) + return "1735-0"; + if (code == V3Race._17376) + return "1737-6"; + if (code == V3Race._17392) + return "1739-2"; + if (code == V3Race._17400) + return "1740-0"; + if (code == V3Race._18119) + return "1811-9"; + if (code == V3Race._18135) + return "1813-5"; + if (code == V3Race._18143) + return "1814-3"; + if (code == V3Race._18150) + return "1815-0"; + if (code == V3Race._18168) + return "1816-8"; + if (code == V3Race._18176) + return "1817-6"; + if (code == V3Race._18184) + return "1818-4"; + if (code == V3Race._18192) + return "1819-2"; + if (code == V3Race._18200) + return "1820-0"; + if (code == V3Race._18218) + return "1821-8"; + if (code == V3Race._18226) + return "1822-6"; + if (code == V3Race._18234) + return "1823-4"; + if (code == V3Race._18242) + return "1824-2"; + if (code == V3Race._18259) + return "1825-9"; + if (code == V3Race._18267) + return "1826-7"; + if (code == V3Race._18275) + return "1827-5"; + if (code == V3Race._18283) + return "1828-3"; + if (code == V3Race._18291) + return "1829-1"; + if (code == V3Race._18309) + return "1830-9"; + if (code == V3Race._18317) + return "1831-7"; + if (code == V3Race._18325) + return "1832-5"; + if (code == V3Race._18333) + return "1833-3"; + if (code == V3Race._18341) + return "1834-1"; + if (code == V3Race._18358) + return "1835-8"; + if (code == V3Race._18374) + return "1837-4"; + if (code == V3Race._18382) + return "1838-2"; + if (code == V3Race._18408) + return "1840-8"; + if (code == V3Race._18424) + return "1842-4"; + if (code == V3Race._18440) + return "1844-0"; + if (code == V3Race._18457) + return "1845-7"; + if (code == V3Race._18465) + return "1846-5"; + if (code == V3Race._18473) + return "1847-3"; + if (code == V3Race._18481) + return "1848-1"; + if (code == V3Race._18499) + return "1849-9"; + if (code == V3Race._18507) + return "1850-7"; + if (code == V3Race._18515) + return "1851-5"; + if (code == V3Race._18523) + return "1852-3"; + if (code == V3Race._18531) + return "1853-1"; + if (code == V3Race._18549) + return "1854-9"; + if (code == V3Race._18556) + return "1855-6"; + if (code == V3Race._18564) + return "1856-4"; + if (code == V3Race._18572) + return "1857-2"; + if (code == V3Race._18580) + return "1858-0"; + if (code == V3Race._18598) + return "1859-8"; + if (code == V3Race._18606) + return "1860-6"; + if (code == V3Race._18614) + return "1861-4"; + if (code == V3Race._18622) + return "1862-2"; + if (code == V3Race._18630) + return "1863-0"; + if (code == V3Race._18648) + return "1864-8"; + if (code == V3Race._18655) + return "1865-5"; + if (code == V3Race._18663) + return "1866-3"; + if (code == V3Race._18671) + return "1867-1"; + if (code == V3Race._18689) + return "1868-9"; + if (code == V3Race._18697) + return "1869-7"; + if (code == V3Race._18705) + return "1870-5"; + if (code == V3Race._18713) + return "1871-3"; + if (code == V3Race._18721) + return "1872-1"; + if (code == V3Race._18739) + return "1873-9"; + if (code == V3Race._18747) + return "1874-7"; + if (code == V3Race._18754) + return "1875-4"; + if (code == V3Race._18762) + return "1876-2"; + if (code == V3Race._18770) + return "1877-0"; + if (code == V3Race._18788) + return "1878-8"; + if (code == V3Race._18796) + return "1879-6"; + if (code == V3Race._18804) + return "1880-4"; + if (code == V3Race._18812) + return "1881-2"; + if (code == V3Race._18820) + return "1882-0"; + if (code == V3Race._18838) + return "1883-8"; + if (code == V3Race._18846) + return "1884-6"; + if (code == V3Race._18853) + return "1885-3"; + if (code == V3Race._18861) + return "1886-1"; + if (code == V3Race._18879) + return "1887-9"; + if (code == V3Race._18887) + return "1888-7"; + if (code == V3Race._18895) + return "1889-5"; + if (code == V3Race._18911) + return "1891-1"; + if (code == V3Race._18929) + return "1892-9"; + if (code == V3Race._18937) + return "1893-7"; + if (code == V3Race._18945) + return "1894-5"; + if (code == V3Race._18960) + return "1896-0"; + if (code == V3Race._18978) + return "1897-8"; + if (code == V3Race._18986) + return "1898-6"; + if (code == V3Race._18994) + return "1899-4"; + if (code == V3Race._19000) + return "1900-0"; + if (code == V3Race._19018) + return "1901-8"; + if (code == V3Race._19026) + return "1902-6"; + if (code == V3Race._19034) + return "1903-4"; + if (code == V3Race._19042) + return "1904-2"; + if (code == V3Race._19059) + return "1905-9"; + if (code == V3Race._19067) + return "1906-7"; + if (code == V3Race._19075) + return "1907-5"; + if (code == V3Race._19083) + return "1908-3"; + if (code == V3Race._19091) + return "1909-1"; + if (code == V3Race._19109) + return "1910-9"; + if (code == V3Race._19117) + return "1911-7"; + if (code == V3Race._19125) + return "1912-5"; + if (code == V3Race._19133) + return "1913-3"; + if (code == V3Race._19141) + return "1914-1"; + if (code == V3Race._19158) + return "1915-8"; + if (code == V3Race._19166) + return "1916-6"; + if (code == V3Race._19174) + return "1917-4"; + if (code == V3Race._19182) + return "1918-2"; + if (code == V3Race._19190) + return "1919-0"; + if (code == V3Race._19208) + return "1920-8"; + if (code == V3Race._19216) + return "1921-6"; + if (code == V3Race._19224) + return "1922-4"; + if (code == V3Race._19232) + return "1923-2"; + if (code == V3Race._19240) + return "1924-0"; + if (code == V3Race._19257) + return "1925-7"; + if (code == V3Race._19265) + return "1926-5"; + if (code == V3Race._19273) + return "1927-3"; + if (code == V3Race._19281) + return "1928-1"; + if (code == V3Race._19299) + return "1929-9"; + if (code == V3Race._19307) + return "1930-7"; + if (code == V3Race._19315) + return "1931-5"; + if (code == V3Race._19323) + return "1932-3"; + if (code == V3Race._19331) + return "1933-1"; + if (code == V3Race._19349) + return "1934-9"; + if (code == V3Race._19356) + return "1935-6"; + if (code == V3Race._19364) + return "1936-4"; + if (code == V3Race._19372) + return "1937-2"; + if (code == V3Race._19380) + return "1938-0"; + if (code == V3Race._19398) + return "1939-8"; + if (code == V3Race._19406) + return "1940-6"; + if (code == V3Race._19414) + return "1941-4"; + if (code == V3Race._19422) + return "1942-2"; + if (code == V3Race._19430) + return "1943-0"; + if (code == V3Race._19448) + return "1944-8"; + if (code == V3Race._19455) + return "1945-5"; + if (code == V3Race._19463) + return "1946-3"; + if (code == V3Race._19471) + return "1947-1"; + if (code == V3Race._19489) + return "1948-9"; + if (code == V3Race._19497) + return "1949-7"; + if (code == V3Race._19505) + return "1950-5"; + if (code == V3Race._19513) + return "1951-3"; + if (code == V3Race._19521) + return "1952-1"; + if (code == V3Race._19539) + return "1953-9"; + if (code == V3Race._19547) + return "1954-7"; + if (code == V3Race._19554) + return "1955-4"; + if (code == V3Race._19562) + return "1956-2"; + if (code == V3Race._19570) + return "1957-0"; + if (code == V3Race._19588) + return "1958-8"; + if (code == V3Race._19596) + return "1959-6"; + if (code == V3Race._19604) + return "1960-4"; + if (code == V3Race._19612) + return "1961-2"; + if (code == V3Race._19620) + return "1962-0"; + if (code == V3Race._19638) + return "1963-8"; + if (code == V3Race._19646) + return "1964-6"; + if (code == V3Race._19661) + return "1966-1"; + if (code == V3Race._19687) + return "1968-7"; + if (code == V3Race._19695) + return "1969-5"; + if (code == V3Race._19703) + return "1970-3"; + if (code == V3Race._19729) + return "1972-9"; + if (code == V3Race._19737) + return "1973-7"; + if (code == V3Race._19745) + return "1974-5"; + if (code == V3Race._19752) + return "1975-2"; + if (code == V3Race._19760) + return "1976-0"; + if (code == V3Race._19778) + return "1977-8"; + if (code == V3Race._19786) + return "1978-6"; + if (code == V3Race._19794) + return "1979-4"; + if (code == V3Race._19802) + return "1980-2"; + if (code == V3Race._19810) + return "1981-0"; + if (code == V3Race._19828) + return "1982-8"; + if (code == V3Race._19844) + return "1984-4"; + if (code == V3Race._19851) + return "1985-1"; + if (code == V3Race._19869) + return "1986-9"; + if (code == V3Race._19877) + return "1987-7"; + if (code == V3Race._19885) + return "1988-5"; + if (code == V3Race._19901) + return "1990-1"; + if (code == V3Race._19927) + return "1992-7"; + if (code == V3Race._19935) + return "1993-5"; + if (code == V3Race._19943) + return "1994-3"; + if (code == V3Race._19950) + return "1995-0"; + if (code == V3Race._19968) + return "1996-8"; + if (code == V3Race._19976) + return "1997-6"; + if (code == V3Race._19984) + return "1998-4"; + if (code == V3Race._19992) + return "1999-2"; + if (code == V3Race._20008) + return "2000-8"; + if (code == V3Race._20024) + return "2002-4"; + if (code == V3Race._20040) + return "2004-0"; + if (code == V3Race._20065) + return "2006-5"; + if (code == V3Race._20073) + return "2007-3"; + if (code == V3Race._20081) + return "2008-1"; + if (code == V3Race._20099) + return "2009-9"; + if (code == V3Race._20107) + return "2010-7"; + if (code == V3Race._20115) + return "2011-5"; + if (code == V3Race._20123) + return "2012-3"; + if (code == V3Race._20131) + return "2013-1"; + if (code == V3Race._20149) + return "2014-9"; + if (code == V3Race._20156) + return "2015-6"; + if (code == V3Race._20164) + return "2016-4"; + if (code == V3Race._20172) + return "2017-2"; + if (code == V3Race._20180) + return "2018-0"; + if (code == V3Race._20198) + return "2019-8"; + if (code == V3Race._20206) + return "2020-6"; + if (code == V3Race._20214) + return "2021-4"; + if (code == V3Race._20222) + return "2022-2"; + if (code == V3Race._20230) + return "2023-0"; + if (code == V3Race._20248) + return "2024-8"; + if (code == V3Race._20255) + return "2025-5"; + if (code == V3Race._20263) + return "2026-3"; + if (code == V3Race._20289) + return "2028-9"; + if (code == V3Race._20297) + return "2029-7"; + if (code == V3Race._20305) + return "2030-5"; + if (code == V3Race._20313) + return "2031-3"; + if (code == V3Race._20321) + return "2032-1"; + if (code == V3Race._20339) + return "2033-9"; + if (code == V3Race._20347) + return "2034-7"; + if (code == V3Race._20354) + return "2035-4"; + if (code == V3Race._20362) + return "2036-2"; + if (code == V3Race._20370) + return "2037-0"; + if (code == V3Race._20388) + return "2038-8"; + if (code == V3Race._20396) + return "2039-6"; + if (code == V3Race._20404) + return "2040-4"; + if (code == V3Race._20412) + return "2041-2"; + if (code == V3Race._20420) + return "2042-0"; + if (code == V3Race._20438) + return "2043-8"; + if (code == V3Race._20446) + return "2044-6"; + if (code == V3Race._20453) + return "2045-3"; + if (code == V3Race._20461) + return "2046-1"; + if (code == V3Race._20479) + return "2047-9"; + if (code == V3Race._20487) + return "2048-7"; + if (code == V3Race._20495) + return "2049-5"; + if (code == V3Race._20503) + return "2050-3"; + if (code == V3Race._20511) + return "2051-1"; + if (code == V3Race._20529) + return "2052-9"; + if (code == V3Race._20545) + return "2054-5"; + if (code == V3Race._20560) + return "2056-0"; + if (code == V3Race._20586) + return "2058-6"; + if (code == V3Race._20602) + return "2060-2"; + if (code == V3Race._20610) + return "2061-0"; + if (code == V3Race._20628) + return "2062-8"; + if (code == V3Race._20636) + return "2063-6"; + if (code == V3Race._20644) + return "2064-4"; + if (code == V3Race._20651) + return "2065-1"; + if (code == V3Race._20669) + return "2066-9"; + if (code == V3Race._20677) + return "2067-7"; + if (code == V3Race._20685) + return "2068-5"; + if (code == V3Race._20693) + return "2069-3"; + if (code == V3Race._20701) + return "2070-1"; + if (code == V3Race._20719) + return "2071-9"; + if (code == V3Race._20727) + return "2072-7"; + if (code == V3Race._20735) + return "2073-5"; + if (code == V3Race._20743) + return "2074-3"; + if (code == V3Race._20750) + return "2075-0"; + if (code == V3Race._20768) + return "2076-8"; + if (code == V3Race._20784) + return "2078-4"; + if (code == V3Race._20792) + return "2079-2"; + if (code == V3Race._20800) + return "2080-0"; + if (code == V3Race._20818) + return "2081-8"; + if (code == V3Race._20826) + return "2082-6"; + if (code == V3Race._20834) + return "2083-4"; + if (code == V3Race._20859) + return "2085-9"; + if (code == V3Race._20867) + return "2086-7"; + if (code == V3Race._20875) + return "2087-5"; + if (code == V3Race._20883) + return "2088-3"; + if (code == V3Race._20891) + return "2089-1"; + if (code == V3Race._20909) + return "2090-9"; + if (code == V3Race._20917) + return "2091-7"; + if (code == V3Race._20925) + return "2092-5"; + if (code == V3Race._20933) + return "2093-3"; + if (code == V3Race._20941) + return "2094-1"; + if (code == V3Race._20958) + return "2095-8"; + if (code == V3Race._20966) + return "2096-6"; + if (code == V3Race._20974) + return "2097-4"; + if (code == V3Race._20982) + return "2098-2"; + if (code == V3Race._21006) + return "2100-6"; + if (code == V3Race._21014) + return "2101-4"; + if (code == V3Race._21022) + return "2102-2"; + if (code == V3Race._21030) + return "2103-0"; + if (code == V3Race._21048) + return "2104-8"; + if (code == V3Race._25007) + return "2500-7"; + if (code == V3Race._21063) + return "2106-3"; + if (code == V3Race._21089) + return "2108-9"; + if (code == V3Race._21097) + return "2109-7"; + if (code == V3Race._21105) + return "2110-5"; + if (code == V3Race._21113) + return "2111-3"; + if (code == V3Race._21121) + return "2112-1"; + if (code == V3Race._21139) + return "2113-9"; + if (code == V3Race._21147) + return "2114-7"; + if (code == V3Race._21154) + return "2115-4"; + if (code == V3Race._21162) + return "2116-2"; + if (code == V3Race._21188) + return "2118-8"; + if (code == V3Race._21196) + return "2119-6"; + if (code == V3Race._21204) + return "2120-4"; + if (code == V3Race._21212) + return "2121-2"; + if (code == V3Race._21220) + return "2122-0"; + if (code == V3Race._21238) + return "2123-8"; + if (code == V3Race._21246) + return "2124-6"; + if (code == V3Race._21253) + return "2125-3"; + if (code == V3Race._21261) + return "2126-1"; + if (code == V3Race._21279) + return "2127-9"; + if (code == V3Race._21295) + return "2129-5"; + if (code == V3Race._21311) + return "2131-1"; + return "?"; + } + + public String toSystem(V3Race code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperator.java new file mode 100644 index 00000000000..4d9ed101ddf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperator.java @@ -0,0 +1,141 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RelationalOperator { + + /** + * Specified set of things includes value being evaluated. + */ + CT, + /** + * Equal condition applied to comparisons. + */ + EQ, + /** + * Greater than or equal condition applied to comparisons. + */ + GE, + /** + * A generic comparison selects a record for inclusion in the response if the beginning of the designated element value matches the select string. + */ + GN, + /** + * Greater than condition applied to comparisons. + */ + GT, + /** + * Less than or equal condition applied to comparisons. + */ + LE, + /** + * Less than condition applied to comparisons. + */ + LT, + /** + * Not equal condition applied to comparisons. + */ + NE, + /** + * added to help the parsers + */ + NULL; + public static V3RelationalOperator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("CT".equals(codeString)) + return CT; + if ("EQ".equals(codeString)) + return EQ; + if ("GE".equals(codeString)) + return GE; + if ("GN".equals(codeString)) + return GN; + if ("GT".equals(codeString)) + return GT; + if ("LE".equals(codeString)) + return LE; + if ("LT".equals(codeString)) + return LT; + if ("NE".equals(codeString)) + return NE; + throw new FHIRException("Unknown V3RelationalOperator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CT: return "CT"; + case EQ: return "EQ"; + case GE: return "GE"; + case GN: return "GN"; + case GT: return "GT"; + case LE: return "LE"; + case LT: return "LT"; + case NE: return "NE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RelationalOperator"; + } + public String getDefinition() { + switch (this) { + case CT: return "Specified set of things includes value being evaluated."; + case EQ: return "Equal condition applied to comparisons."; + case GE: return "Greater than or equal condition applied to comparisons."; + case GN: return "A generic comparison selects a record for inclusion in the response if the beginning of the designated element value matches the select string."; + case GT: return "Greater than condition applied to comparisons."; + case LE: return "Less than or equal condition applied to comparisons."; + case LT: return "Less than condition applied to comparisons."; + case NE: return "Not equal condition applied to comparisons."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CT: return "Contains"; + case EQ: return "Equal"; + case GE: return "Greater than or equal"; + case GN: return "Generic"; + case GT: return "Greater than"; + case LE: return "Less than or equal"; + case LT: return "Less than"; + case NE: return "Not Equal"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperatorEnumFactory.java new file mode 100644 index 00000000000..9d68b9ed5ea --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperatorEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RelationalOperatorEnumFactory implements EnumFactory { + + public V3RelationalOperator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("CT".equals(codeString)) + return V3RelationalOperator.CT; + if ("EQ".equals(codeString)) + return V3RelationalOperator.EQ; + if ("GE".equals(codeString)) + return V3RelationalOperator.GE; + if ("GN".equals(codeString)) + return V3RelationalOperator.GN; + if ("GT".equals(codeString)) + return V3RelationalOperator.GT; + if ("LE".equals(codeString)) + return V3RelationalOperator.LE; + if ("LT".equals(codeString)) + return V3RelationalOperator.LT; + if ("NE".equals(codeString)) + return V3RelationalOperator.NE; + throw new IllegalArgumentException("Unknown V3RelationalOperator code '"+codeString+"'"); + } + + public String toCode(V3RelationalOperator code) { + if (code == V3RelationalOperator.CT) + return "CT"; + if (code == V3RelationalOperator.EQ) + return "EQ"; + if (code == V3RelationalOperator.GE) + return "GE"; + if (code == V3RelationalOperator.GN) + return "GN"; + if (code == V3RelationalOperator.GT) + return "GT"; + if (code == V3RelationalOperator.LE) + return "LE"; + if (code == V3RelationalOperator.LT) + return "LT"; + if (code == V3RelationalOperator.NE) + return "NE"; + return "?"; + } + + public String toSystem(V3RelationalOperator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationshipConjunction.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationshipConjunction.java new file mode 100644 index 00000000000..3fe58a58b54 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationshipConjunction.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RelationshipConjunction { + + /** + * This condition must be true. + */ + AND, + /** + * At least one of the condition among all OR conditions must be true. + */ + OR, + /** + * One and only one of the XOR conditions must be true. + */ + XOR, + /** + * added to help the parsers + */ + NULL; + public static V3RelationshipConjunction fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AND".equals(codeString)) + return AND; + if ("OR".equals(codeString)) + return OR; + if ("XOR".equals(codeString)) + return XOR; + throw new FHIRException("Unknown V3RelationshipConjunction code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AND: return "AND"; + case OR: return "OR"; + case XOR: return "XOR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RelationshipConjunction"; + } + public String getDefinition() { + switch (this) { + case AND: return "This condition must be true."; + case OR: return "At least one of the condition among all OR conditions must be true."; + case XOR: return "One and only one of the XOR conditions must be true."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AND: return "and"; + case OR: return "or"; + case XOR: return "exclusive or"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationshipConjunctionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationshipConjunctionEnumFactory.java new file mode 100644 index 00000000000..cfb43b8d13a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationshipConjunctionEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RelationshipConjunctionEnumFactory implements EnumFactory { + + public V3RelationshipConjunction fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AND".equals(codeString)) + return V3RelationshipConjunction.AND; + if ("OR".equals(codeString)) + return V3RelationshipConjunction.OR; + if ("XOR".equals(codeString)) + return V3RelationshipConjunction.XOR; + throw new IllegalArgumentException("Unknown V3RelationshipConjunction code '"+codeString+"'"); + } + + public String toCode(V3RelationshipConjunction code) { + if (code == V3RelationshipConjunction.AND) + return "AND"; + if (code == V3RelationshipConjunction.OR) + return "OR"; + if (code == V3RelationshipConjunction.XOR) + return "XOR"; + return "?"; + } + + public String toSystem(V3RelationshipConjunction code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ReligiousAffiliation.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ReligiousAffiliation.java new file mode 100644 index 00000000000..06d4236e338 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ReligiousAffiliation.java @@ -0,0 +1,807 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ReligiousAffiliation { + + /** + * Adventist + */ + _1001, + /** + * African Religions + */ + _1002, + /** + * Afro-Caribbean Religions + */ + _1003, + /** + * Agnosticism + */ + _1004, + /** + * Anglican + */ + _1005, + /** + * Animism + */ + _1006, + /** + * Atheism + */ + _1007, + /** + * Babi & Baha'I faiths + */ + _1008, + /** + * Baptist + */ + _1009, + /** + * Bon + */ + _1010, + /** + * Cao Dai + */ + _1011, + /** + * Celticism + */ + _1012, + /** + * Christian (non-Catholic, non-specific) + */ + _1013, + /** + * Confucianism + */ + _1014, + /** + * Cyberculture Religions + */ + _1015, + /** + * Divination + */ + _1016, + /** + * Fourth Way + */ + _1017, + /** + * Free Daism + */ + _1018, + /** + * Gnosis + */ + _1019, + /** + * Hinduism + */ + _1020, + /** + * Humanism + */ + _1021, + /** + * Independent + */ + _1022, + /** + * Islam + */ + _1023, + /** + * Jainism + */ + _1024, + /** + * Jehovah's Witnesses + */ + _1025, + /** + * Judaism + */ + _1026, + /** + * Latter Day Saints + */ + _1027, + /** + * Lutheran + */ + _1028, + /** + * Mahayana + */ + _1029, + /** + * Meditation + */ + _1030, + /** + * Messianic Judaism + */ + _1031, + /** + * Mitraism + */ + _1032, + /** + * New Age + */ + _1033, + /** + * non-Roman Catholic + */ + _1034, + /** + * Occult + */ + _1035, + /** + * Orthodox + */ + _1036, + /** + * Paganism + */ + _1037, + /** + * Pentecostal + */ + _1038, + /** + * Process, The + */ + _1039, + /** + * Reformed/Presbyterian + */ + _1040, + /** + * Roman Catholic Church + */ + _1041, + /** + * Satanism + */ + _1042, + /** + * Scientology + */ + _1043, + /** + * Shamanism + */ + _1044, + /** + * Shiite (Islam) + */ + _1045, + /** + * Shinto + */ + _1046, + /** + * Sikism + */ + _1047, + /** + * Spiritualism + */ + _1048, + /** + * Sunni (Islam) + */ + _1049, + /** + * Taoism + */ + _1050, + /** + * Theravada + */ + _1051, + /** + * Unitarian-Universalism + */ + _1052, + /** + * Universal Life Church + */ + _1053, + /** + * Vajrayana (Tibetan) + */ + _1054, + /** + * Veda + */ + _1055, + /** + * Voodoo + */ + _1056, + /** + * Wicca + */ + _1057, + /** + * Yaohushua + */ + _1058, + /** + * Zen Buddhism + */ + _1059, + /** + * Zoroastrianism + */ + _1060, + /** + * Assembly of God + */ + _1061, + /** + * Brethren + */ + _1062, + /** + * Christian Scientist + */ + _1063, + /** + * Church of Christ + */ + _1064, + /** + * Church of God + */ + _1065, + /** + * Congregational + */ + _1066, + /** + * Disciples of Christ + */ + _1067, + /** + * Eastern Orthodox + */ + _1068, + /** + * Episcopalian + */ + _1069, + /** + * Evangelical Covenant + */ + _1070, + /** + * Friends + */ + _1071, + /** + * Full Gospel + */ + _1072, + /** + * Methodist + */ + _1073, + /** + * Native American + */ + _1074, + /** + * Nazarene + */ + _1075, + /** + * Presbyterian + */ + _1076, + /** + * Protestant + */ + _1077, + /** + * Protestant, No Denomination + */ + _1078, + /** + * Reformed + */ + _1079, + /** + * Salvation Army + */ + _1080, + /** + * Unitarian Universalist + */ + _1081, + /** + * United Church of Christ + */ + _1082, + /** + * added to help the parsers + */ + NULL; + public static V3ReligiousAffiliation fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1001".equals(codeString)) + return _1001; + if ("1002".equals(codeString)) + return _1002; + if ("1003".equals(codeString)) + return _1003; + if ("1004".equals(codeString)) + return _1004; + if ("1005".equals(codeString)) + return _1005; + if ("1006".equals(codeString)) + return _1006; + if ("1007".equals(codeString)) + return _1007; + if ("1008".equals(codeString)) + return _1008; + if ("1009".equals(codeString)) + return _1009; + if ("1010".equals(codeString)) + return _1010; + if ("1011".equals(codeString)) + return _1011; + if ("1012".equals(codeString)) + return _1012; + if ("1013".equals(codeString)) + return _1013; + if ("1014".equals(codeString)) + return _1014; + if ("1015".equals(codeString)) + return _1015; + if ("1016".equals(codeString)) + return _1016; + if ("1017".equals(codeString)) + return _1017; + if ("1018".equals(codeString)) + return _1018; + if ("1019".equals(codeString)) + return _1019; + if ("1020".equals(codeString)) + return _1020; + if ("1021".equals(codeString)) + return _1021; + if ("1022".equals(codeString)) + return _1022; + if ("1023".equals(codeString)) + return _1023; + if ("1024".equals(codeString)) + return _1024; + if ("1025".equals(codeString)) + return _1025; + if ("1026".equals(codeString)) + return _1026; + if ("1027".equals(codeString)) + return _1027; + if ("1028".equals(codeString)) + return _1028; + if ("1029".equals(codeString)) + return _1029; + if ("1030".equals(codeString)) + return _1030; + if ("1031".equals(codeString)) + return _1031; + if ("1032".equals(codeString)) + return _1032; + if ("1033".equals(codeString)) + return _1033; + if ("1034".equals(codeString)) + return _1034; + if ("1035".equals(codeString)) + return _1035; + if ("1036".equals(codeString)) + return _1036; + if ("1037".equals(codeString)) + return _1037; + if ("1038".equals(codeString)) + return _1038; + if ("1039".equals(codeString)) + return _1039; + if ("1040".equals(codeString)) + return _1040; + if ("1041".equals(codeString)) + return _1041; + if ("1042".equals(codeString)) + return _1042; + if ("1043".equals(codeString)) + return _1043; + if ("1044".equals(codeString)) + return _1044; + if ("1045".equals(codeString)) + return _1045; + if ("1046".equals(codeString)) + return _1046; + if ("1047".equals(codeString)) + return _1047; + if ("1048".equals(codeString)) + return _1048; + if ("1049".equals(codeString)) + return _1049; + if ("1050".equals(codeString)) + return _1050; + if ("1051".equals(codeString)) + return _1051; + if ("1052".equals(codeString)) + return _1052; + if ("1053".equals(codeString)) + return _1053; + if ("1054".equals(codeString)) + return _1054; + if ("1055".equals(codeString)) + return _1055; + if ("1056".equals(codeString)) + return _1056; + if ("1057".equals(codeString)) + return _1057; + if ("1058".equals(codeString)) + return _1058; + if ("1059".equals(codeString)) + return _1059; + if ("1060".equals(codeString)) + return _1060; + if ("1061".equals(codeString)) + return _1061; + if ("1062".equals(codeString)) + return _1062; + if ("1063".equals(codeString)) + return _1063; + if ("1064".equals(codeString)) + return _1064; + if ("1065".equals(codeString)) + return _1065; + if ("1066".equals(codeString)) + return _1066; + if ("1067".equals(codeString)) + return _1067; + if ("1068".equals(codeString)) + return _1068; + if ("1069".equals(codeString)) + return _1069; + if ("1070".equals(codeString)) + return _1070; + if ("1071".equals(codeString)) + return _1071; + if ("1072".equals(codeString)) + return _1072; + if ("1073".equals(codeString)) + return _1073; + if ("1074".equals(codeString)) + return _1074; + if ("1075".equals(codeString)) + return _1075; + if ("1076".equals(codeString)) + return _1076; + if ("1077".equals(codeString)) + return _1077; + if ("1078".equals(codeString)) + return _1078; + if ("1079".equals(codeString)) + return _1079; + if ("1080".equals(codeString)) + return _1080; + if ("1081".equals(codeString)) + return _1081; + if ("1082".equals(codeString)) + return _1082; + throw new FHIRException("Unknown V3ReligiousAffiliation code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _1001: return "1001"; + case _1002: return "1002"; + case _1003: return "1003"; + case _1004: return "1004"; + case _1005: return "1005"; + case _1006: return "1006"; + case _1007: return "1007"; + case _1008: return "1008"; + case _1009: return "1009"; + case _1010: return "1010"; + case _1011: return "1011"; + case _1012: return "1012"; + case _1013: return "1013"; + case _1014: return "1014"; + case _1015: return "1015"; + case _1016: return "1016"; + case _1017: return "1017"; + case _1018: return "1018"; + case _1019: return "1019"; + case _1020: return "1020"; + case _1021: return "1021"; + case _1022: return "1022"; + case _1023: return "1023"; + case _1024: return "1024"; + case _1025: return "1025"; + case _1026: return "1026"; + case _1027: return "1027"; + case _1028: return "1028"; + case _1029: return "1029"; + case _1030: return "1030"; + case _1031: return "1031"; + case _1032: return "1032"; + case _1033: return "1033"; + case _1034: return "1034"; + case _1035: return "1035"; + case _1036: return "1036"; + case _1037: return "1037"; + case _1038: return "1038"; + case _1039: return "1039"; + case _1040: return "1040"; + case _1041: return "1041"; + case _1042: return "1042"; + case _1043: return "1043"; + case _1044: return "1044"; + case _1045: return "1045"; + case _1046: return "1046"; + case _1047: return "1047"; + case _1048: return "1048"; + case _1049: return "1049"; + case _1050: return "1050"; + case _1051: return "1051"; + case _1052: return "1052"; + case _1053: return "1053"; + case _1054: return "1054"; + case _1055: return "1055"; + case _1056: return "1056"; + case _1057: return "1057"; + case _1058: return "1058"; + case _1059: return "1059"; + case _1060: return "1060"; + case _1061: return "1061"; + case _1062: return "1062"; + case _1063: return "1063"; + case _1064: return "1064"; + case _1065: return "1065"; + case _1066: return "1066"; + case _1067: return "1067"; + case _1068: return "1068"; + case _1069: return "1069"; + case _1070: return "1070"; + case _1071: return "1071"; + case _1072: return "1072"; + case _1073: return "1073"; + case _1074: return "1074"; + case _1075: return "1075"; + case _1076: return "1076"; + case _1077: return "1077"; + case _1078: return "1078"; + case _1079: return "1079"; + case _1080: return "1080"; + case _1081: return "1081"; + case _1082: return "1082"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ReligiousAffiliation"; + } + public String getDefinition() { + switch (this) { + case _1001: return "Adventist"; + case _1002: return "African Religions"; + case _1003: return "Afro-Caribbean Religions"; + case _1004: return "Agnosticism"; + case _1005: return "Anglican"; + case _1006: return "Animism"; + case _1007: return "Atheism"; + case _1008: return "Babi & Baha'I faiths"; + case _1009: return "Baptist"; + case _1010: return "Bon"; + case _1011: return "Cao Dai"; + case _1012: return "Celticism"; + case _1013: return "Christian (non-Catholic, non-specific)"; + case _1014: return "Confucianism"; + case _1015: return "Cyberculture Religions"; + case _1016: return "Divination"; + case _1017: return "Fourth Way"; + case _1018: return "Free Daism"; + case _1019: return "Gnosis"; + case _1020: return "Hinduism"; + case _1021: return "Humanism"; + case _1022: return "Independent"; + case _1023: return "Islam"; + case _1024: return "Jainism"; + case _1025: return "Jehovah's Witnesses"; + case _1026: return "Judaism"; + case _1027: return "Latter Day Saints"; + case _1028: return "Lutheran"; + case _1029: return "Mahayana"; + case _1030: return "Meditation"; + case _1031: return "Messianic Judaism"; + case _1032: return "Mitraism"; + case _1033: return "New Age"; + case _1034: return "non-Roman Catholic"; + case _1035: return "Occult"; + case _1036: return "Orthodox"; + case _1037: return "Paganism"; + case _1038: return "Pentecostal"; + case _1039: return "Process, The"; + case _1040: return "Reformed/Presbyterian"; + case _1041: return "Roman Catholic Church"; + case _1042: return "Satanism"; + case _1043: return "Scientology"; + case _1044: return "Shamanism"; + case _1045: return "Shiite (Islam)"; + case _1046: return "Shinto"; + case _1047: return "Sikism"; + case _1048: return "Spiritualism"; + case _1049: return "Sunni (Islam)"; + case _1050: return "Taoism"; + case _1051: return "Theravada"; + case _1052: return "Unitarian-Universalism"; + case _1053: return "Universal Life Church"; + case _1054: return "Vajrayana (Tibetan)"; + case _1055: return "Veda"; + case _1056: return "Voodoo"; + case _1057: return "Wicca"; + case _1058: return "Yaohushua"; + case _1059: return "Zen Buddhism"; + case _1060: return "Zoroastrianism"; + case _1061: return "Assembly of God"; + case _1062: return "Brethren"; + case _1063: return "Christian Scientist"; + case _1064: return "Church of Christ"; + case _1065: return "Church of God"; + case _1066: return "Congregational"; + case _1067: return "Disciples of Christ"; + case _1068: return "Eastern Orthodox"; + case _1069: return "Episcopalian"; + case _1070: return "Evangelical Covenant"; + case _1071: return "Friends"; + case _1072: return "Full Gospel"; + case _1073: return "Methodist"; + case _1074: return "Native American"; + case _1075: return "Nazarene"; + case _1076: return "Presbyterian"; + case _1077: return "Protestant"; + case _1078: return "Protestant, No Denomination"; + case _1079: return "Reformed"; + case _1080: return "Salvation Army"; + case _1081: return "Unitarian Universalist"; + case _1082: return "United Church of Christ"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _1001: return "Adventist"; + case _1002: return "African Religions"; + case _1003: return "Afro-Caribbean Religions"; + case _1004: return "Agnosticism"; + case _1005: return "Anglican"; + case _1006: return "Animism"; + case _1007: return "Atheism"; + case _1008: return "Babi & Baha'I faiths"; + case _1009: return "Baptist"; + case _1010: return "Bon"; + case _1011: return "Cao Dai"; + case _1012: return "Celticism"; + case _1013: return "Christian (non-Catholic, non-specific)"; + case _1014: return "Confucianism"; + case _1015: return "Cyberculture Religions"; + case _1016: return "Divination"; + case _1017: return "Fourth Way"; + case _1018: return "Free Daism"; + case _1019: return "Gnosis"; + case _1020: return "Hinduism"; + case _1021: return "Humanism"; + case _1022: return "Independent"; + case _1023: return "Islam"; + case _1024: return "Jainism"; + case _1025: return "Jehovah's Witnesses"; + case _1026: return "Judaism"; + case _1027: return "Latter Day Saints"; + case _1028: return "Lutheran"; + case _1029: return "Mahayana"; + case _1030: return "Meditation"; + case _1031: return "Messianic Judaism"; + case _1032: return "Mitraism"; + case _1033: return "New Age"; + case _1034: return "non-Roman Catholic"; + case _1035: return "Occult"; + case _1036: return "Orthodox"; + case _1037: return "Paganism"; + case _1038: return "Pentecostal"; + case _1039: return "Process, The"; + case _1040: return "Reformed/Presbyterian"; + case _1041: return "Roman Catholic Church"; + case _1042: return "Satanism"; + case _1043: return "Scientology"; + case _1044: return "Shamanism"; + case _1045: return "Shiite (Islam)"; + case _1046: return "Shinto"; + case _1047: return "Sikism"; + case _1048: return "Spiritualism"; + case _1049: return "Sunni (Islam)"; + case _1050: return "Taoism"; + case _1051: return "Theravada"; + case _1052: return "Unitarian-Universalism"; + case _1053: return "Universal Life Church"; + case _1054: return "Vajrayana (Tibetan)"; + case _1055: return "Veda"; + case _1056: return "Voodoo"; + case _1057: return "Wicca"; + case _1058: return "Yaohushua"; + case _1059: return "Zen Buddhism"; + case _1060: return "Zoroastrianism"; + case _1061: return "Assembly of God"; + case _1062: return "Brethren"; + case _1063: return "Christian Scientist"; + case _1064: return "Church of Christ"; + case _1065: return "Church of God"; + case _1066: return "Congregational"; + case _1067: return "Disciples of Christ"; + case _1068: return "Eastern Orthodox"; + case _1069: return "Episcopalian"; + case _1070: return "Evangelical Covenant"; + case _1071: return "Friends"; + case _1072: return "Full Gospel"; + case _1073: return "Methodist"; + case _1074: return "Native American"; + case _1075: return "Nazarene"; + case _1076: return "Presbyterian"; + case _1077: return "Protestant"; + case _1078: return "Protestant, No Denomination"; + case _1079: return "Reformed"; + case _1080: return "Salvation Army"; + case _1081: return "Unitarian Universalist"; + case _1082: return "United Church of Christ"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ReligiousAffiliationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ReligiousAffiliationEnumFactory.java new file mode 100644 index 00000000000..083e4087e73 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ReligiousAffiliationEnumFactory.java @@ -0,0 +1,382 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ReligiousAffiliationEnumFactory implements EnumFactory { + + public V3ReligiousAffiliation fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("1001".equals(codeString)) + return V3ReligiousAffiliation._1001; + if ("1002".equals(codeString)) + return V3ReligiousAffiliation._1002; + if ("1003".equals(codeString)) + return V3ReligiousAffiliation._1003; + if ("1004".equals(codeString)) + return V3ReligiousAffiliation._1004; + if ("1005".equals(codeString)) + return V3ReligiousAffiliation._1005; + if ("1006".equals(codeString)) + return V3ReligiousAffiliation._1006; + if ("1007".equals(codeString)) + return V3ReligiousAffiliation._1007; + if ("1008".equals(codeString)) + return V3ReligiousAffiliation._1008; + if ("1009".equals(codeString)) + return V3ReligiousAffiliation._1009; + if ("1010".equals(codeString)) + return V3ReligiousAffiliation._1010; + if ("1011".equals(codeString)) + return V3ReligiousAffiliation._1011; + if ("1012".equals(codeString)) + return V3ReligiousAffiliation._1012; + if ("1013".equals(codeString)) + return V3ReligiousAffiliation._1013; + if ("1014".equals(codeString)) + return V3ReligiousAffiliation._1014; + if ("1015".equals(codeString)) + return V3ReligiousAffiliation._1015; + if ("1016".equals(codeString)) + return V3ReligiousAffiliation._1016; + if ("1017".equals(codeString)) + return V3ReligiousAffiliation._1017; + if ("1018".equals(codeString)) + return V3ReligiousAffiliation._1018; + if ("1019".equals(codeString)) + return V3ReligiousAffiliation._1019; + if ("1020".equals(codeString)) + return V3ReligiousAffiliation._1020; + if ("1021".equals(codeString)) + return V3ReligiousAffiliation._1021; + if ("1022".equals(codeString)) + return V3ReligiousAffiliation._1022; + if ("1023".equals(codeString)) + return V3ReligiousAffiliation._1023; + if ("1024".equals(codeString)) + return V3ReligiousAffiliation._1024; + if ("1025".equals(codeString)) + return V3ReligiousAffiliation._1025; + if ("1026".equals(codeString)) + return V3ReligiousAffiliation._1026; + if ("1027".equals(codeString)) + return V3ReligiousAffiliation._1027; + if ("1028".equals(codeString)) + return V3ReligiousAffiliation._1028; + if ("1029".equals(codeString)) + return V3ReligiousAffiliation._1029; + if ("1030".equals(codeString)) + return V3ReligiousAffiliation._1030; + if ("1031".equals(codeString)) + return V3ReligiousAffiliation._1031; + if ("1032".equals(codeString)) + return V3ReligiousAffiliation._1032; + if ("1033".equals(codeString)) + return V3ReligiousAffiliation._1033; + if ("1034".equals(codeString)) + return V3ReligiousAffiliation._1034; + if ("1035".equals(codeString)) + return V3ReligiousAffiliation._1035; + if ("1036".equals(codeString)) + return V3ReligiousAffiliation._1036; + if ("1037".equals(codeString)) + return V3ReligiousAffiliation._1037; + if ("1038".equals(codeString)) + return V3ReligiousAffiliation._1038; + if ("1039".equals(codeString)) + return V3ReligiousAffiliation._1039; + if ("1040".equals(codeString)) + return V3ReligiousAffiliation._1040; + if ("1041".equals(codeString)) + return V3ReligiousAffiliation._1041; + if ("1042".equals(codeString)) + return V3ReligiousAffiliation._1042; + if ("1043".equals(codeString)) + return V3ReligiousAffiliation._1043; + if ("1044".equals(codeString)) + return V3ReligiousAffiliation._1044; + if ("1045".equals(codeString)) + return V3ReligiousAffiliation._1045; + if ("1046".equals(codeString)) + return V3ReligiousAffiliation._1046; + if ("1047".equals(codeString)) + return V3ReligiousAffiliation._1047; + if ("1048".equals(codeString)) + return V3ReligiousAffiliation._1048; + if ("1049".equals(codeString)) + return V3ReligiousAffiliation._1049; + if ("1050".equals(codeString)) + return V3ReligiousAffiliation._1050; + if ("1051".equals(codeString)) + return V3ReligiousAffiliation._1051; + if ("1052".equals(codeString)) + return V3ReligiousAffiliation._1052; + if ("1053".equals(codeString)) + return V3ReligiousAffiliation._1053; + if ("1054".equals(codeString)) + return V3ReligiousAffiliation._1054; + if ("1055".equals(codeString)) + return V3ReligiousAffiliation._1055; + if ("1056".equals(codeString)) + return V3ReligiousAffiliation._1056; + if ("1057".equals(codeString)) + return V3ReligiousAffiliation._1057; + if ("1058".equals(codeString)) + return V3ReligiousAffiliation._1058; + if ("1059".equals(codeString)) + return V3ReligiousAffiliation._1059; + if ("1060".equals(codeString)) + return V3ReligiousAffiliation._1060; + if ("1061".equals(codeString)) + return V3ReligiousAffiliation._1061; + if ("1062".equals(codeString)) + return V3ReligiousAffiliation._1062; + if ("1063".equals(codeString)) + return V3ReligiousAffiliation._1063; + if ("1064".equals(codeString)) + return V3ReligiousAffiliation._1064; + if ("1065".equals(codeString)) + return V3ReligiousAffiliation._1065; + if ("1066".equals(codeString)) + return V3ReligiousAffiliation._1066; + if ("1067".equals(codeString)) + return V3ReligiousAffiliation._1067; + if ("1068".equals(codeString)) + return V3ReligiousAffiliation._1068; + if ("1069".equals(codeString)) + return V3ReligiousAffiliation._1069; + if ("1070".equals(codeString)) + return V3ReligiousAffiliation._1070; + if ("1071".equals(codeString)) + return V3ReligiousAffiliation._1071; + if ("1072".equals(codeString)) + return V3ReligiousAffiliation._1072; + if ("1073".equals(codeString)) + return V3ReligiousAffiliation._1073; + if ("1074".equals(codeString)) + return V3ReligiousAffiliation._1074; + if ("1075".equals(codeString)) + return V3ReligiousAffiliation._1075; + if ("1076".equals(codeString)) + return V3ReligiousAffiliation._1076; + if ("1077".equals(codeString)) + return V3ReligiousAffiliation._1077; + if ("1078".equals(codeString)) + return V3ReligiousAffiliation._1078; + if ("1079".equals(codeString)) + return V3ReligiousAffiliation._1079; + if ("1080".equals(codeString)) + return V3ReligiousAffiliation._1080; + if ("1081".equals(codeString)) + return V3ReligiousAffiliation._1081; + if ("1082".equals(codeString)) + return V3ReligiousAffiliation._1082; + throw new IllegalArgumentException("Unknown V3ReligiousAffiliation code '"+codeString+"'"); + } + + public String toCode(V3ReligiousAffiliation code) { + if (code == V3ReligiousAffiliation._1001) + return "1001"; + if (code == V3ReligiousAffiliation._1002) + return "1002"; + if (code == V3ReligiousAffiliation._1003) + return "1003"; + if (code == V3ReligiousAffiliation._1004) + return "1004"; + if (code == V3ReligiousAffiliation._1005) + return "1005"; + if (code == V3ReligiousAffiliation._1006) + return "1006"; + if (code == V3ReligiousAffiliation._1007) + return "1007"; + if (code == V3ReligiousAffiliation._1008) + return "1008"; + if (code == V3ReligiousAffiliation._1009) + return "1009"; + if (code == V3ReligiousAffiliation._1010) + return "1010"; + if (code == V3ReligiousAffiliation._1011) + return "1011"; + if (code == V3ReligiousAffiliation._1012) + return "1012"; + if (code == V3ReligiousAffiliation._1013) + return "1013"; + if (code == V3ReligiousAffiliation._1014) + return "1014"; + if (code == V3ReligiousAffiliation._1015) + return "1015"; + if (code == V3ReligiousAffiliation._1016) + return "1016"; + if (code == V3ReligiousAffiliation._1017) + return "1017"; + if (code == V3ReligiousAffiliation._1018) + return "1018"; + if (code == V3ReligiousAffiliation._1019) + return "1019"; + if (code == V3ReligiousAffiliation._1020) + return "1020"; + if (code == V3ReligiousAffiliation._1021) + return "1021"; + if (code == V3ReligiousAffiliation._1022) + return "1022"; + if (code == V3ReligiousAffiliation._1023) + return "1023"; + if (code == V3ReligiousAffiliation._1024) + return "1024"; + if (code == V3ReligiousAffiliation._1025) + return "1025"; + if (code == V3ReligiousAffiliation._1026) + return "1026"; + if (code == V3ReligiousAffiliation._1027) + return "1027"; + if (code == V3ReligiousAffiliation._1028) + return "1028"; + if (code == V3ReligiousAffiliation._1029) + return "1029"; + if (code == V3ReligiousAffiliation._1030) + return "1030"; + if (code == V3ReligiousAffiliation._1031) + return "1031"; + if (code == V3ReligiousAffiliation._1032) + return "1032"; + if (code == V3ReligiousAffiliation._1033) + return "1033"; + if (code == V3ReligiousAffiliation._1034) + return "1034"; + if (code == V3ReligiousAffiliation._1035) + return "1035"; + if (code == V3ReligiousAffiliation._1036) + return "1036"; + if (code == V3ReligiousAffiliation._1037) + return "1037"; + if (code == V3ReligiousAffiliation._1038) + return "1038"; + if (code == V3ReligiousAffiliation._1039) + return "1039"; + if (code == V3ReligiousAffiliation._1040) + return "1040"; + if (code == V3ReligiousAffiliation._1041) + return "1041"; + if (code == V3ReligiousAffiliation._1042) + return "1042"; + if (code == V3ReligiousAffiliation._1043) + return "1043"; + if (code == V3ReligiousAffiliation._1044) + return "1044"; + if (code == V3ReligiousAffiliation._1045) + return "1045"; + if (code == V3ReligiousAffiliation._1046) + return "1046"; + if (code == V3ReligiousAffiliation._1047) + return "1047"; + if (code == V3ReligiousAffiliation._1048) + return "1048"; + if (code == V3ReligiousAffiliation._1049) + return "1049"; + if (code == V3ReligiousAffiliation._1050) + return "1050"; + if (code == V3ReligiousAffiliation._1051) + return "1051"; + if (code == V3ReligiousAffiliation._1052) + return "1052"; + if (code == V3ReligiousAffiliation._1053) + return "1053"; + if (code == V3ReligiousAffiliation._1054) + return "1054"; + if (code == V3ReligiousAffiliation._1055) + return "1055"; + if (code == V3ReligiousAffiliation._1056) + return "1056"; + if (code == V3ReligiousAffiliation._1057) + return "1057"; + if (code == V3ReligiousAffiliation._1058) + return "1058"; + if (code == V3ReligiousAffiliation._1059) + return "1059"; + if (code == V3ReligiousAffiliation._1060) + return "1060"; + if (code == V3ReligiousAffiliation._1061) + return "1061"; + if (code == V3ReligiousAffiliation._1062) + return "1062"; + if (code == V3ReligiousAffiliation._1063) + return "1063"; + if (code == V3ReligiousAffiliation._1064) + return "1064"; + if (code == V3ReligiousAffiliation._1065) + return "1065"; + if (code == V3ReligiousAffiliation._1066) + return "1066"; + if (code == V3ReligiousAffiliation._1067) + return "1067"; + if (code == V3ReligiousAffiliation._1068) + return "1068"; + if (code == V3ReligiousAffiliation._1069) + return "1069"; + if (code == V3ReligiousAffiliation._1070) + return "1070"; + if (code == V3ReligiousAffiliation._1071) + return "1071"; + if (code == V3ReligiousAffiliation._1072) + return "1072"; + if (code == V3ReligiousAffiliation._1073) + return "1073"; + if (code == V3ReligiousAffiliation._1074) + return "1074"; + if (code == V3ReligiousAffiliation._1075) + return "1075"; + if (code == V3ReligiousAffiliation._1076) + return "1076"; + if (code == V3ReligiousAffiliation._1077) + return "1077"; + if (code == V3ReligiousAffiliation._1078) + return "1078"; + if (code == V3ReligiousAffiliation._1079) + return "1079"; + if (code == V3ReligiousAffiliation._1080) + return "1080"; + if (code == V3ReligiousAffiliation._1081) + return "1081"; + if (code == V3ReligiousAffiliation._1082) + return "1082"; + return "?"; + } + + public String toSystem(V3ReligiousAffiliation code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseLevel.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseLevel.java new file mode 100644 index 00000000000..facf2cd2d9c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseLevel.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ResponseLevel { + + /** + * Respond with exceptions and a notification of completion + */ + C, + /** + * Respond with exceptions, completion, modifications and include more detail information (if applicable) + */ + D, + /** + * Respond with exceptions only + */ + E, + /** + * Respond with exceptions, completion, and modification with detail (as above), and send positive confirmations even if no modifications are being made. + */ + F, + /** + * Respond only with message level acknowledgements, i.e., only notify acceptance or rejection of the message, do not include any application-level detail + */ + N, + /** + * Respond with exceptions, completions and modifications or revisions done before completion + */ + R, + /** + * Do not send any kind of response + */ + X, + /** + * added to help the parsers + */ + NULL; + public static V3ResponseLevel fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return C; + if ("D".equals(codeString)) + return D; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("N".equals(codeString)) + return N; + if ("R".equals(codeString)) + return R; + if ("X".equals(codeString)) + return X; + throw new FHIRException("Unknown V3ResponseLevel code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case C: return "C"; + case D: return "D"; + case E: return "E"; + case F: return "F"; + case N: return "N"; + case R: return "R"; + case X: return "X"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ResponseLevel"; + } + public String getDefinition() { + switch (this) { + case C: return "Respond with exceptions and a notification of completion"; + case D: return "Respond with exceptions, completion, modifications and include more detail information (if applicable)"; + case E: return "Respond with exceptions only"; + case F: return "Respond with exceptions, completion, and modification with detail (as above), and send positive confirmations even if no modifications are being made."; + case N: return "Respond only with message level acknowledgements, i.e., only notify acceptance or rejection of the message, do not include any application-level detail"; + case R: return "Respond with exceptions, completions and modifications or revisions done before completion"; + case X: return "Do not send any kind of response"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case C: return "completion"; + case D: return "detail"; + case E: return "exception"; + case F: return "confirmation"; + case N: return "message-control"; + case R: return "modification"; + case X: return "none"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseLevelEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseLevelEnumFactory.java new file mode 100644 index 00000000000..3eceb49e692 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseLevelEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ResponseLevelEnumFactory implements EnumFactory { + + public V3ResponseLevel fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("C".equals(codeString)) + return V3ResponseLevel.C; + if ("D".equals(codeString)) + return V3ResponseLevel.D; + if ("E".equals(codeString)) + return V3ResponseLevel.E; + if ("F".equals(codeString)) + return V3ResponseLevel.F; + if ("N".equals(codeString)) + return V3ResponseLevel.N; + if ("R".equals(codeString)) + return V3ResponseLevel.R; + if ("X".equals(codeString)) + return V3ResponseLevel.X; + throw new IllegalArgumentException("Unknown V3ResponseLevel code '"+codeString+"'"); + } + + public String toCode(V3ResponseLevel code) { + if (code == V3ResponseLevel.C) + return "C"; + if (code == V3ResponseLevel.D) + return "D"; + if (code == V3ResponseLevel.E) + return "E"; + if (code == V3ResponseLevel.F) + return "F"; + if (code == V3ResponseLevel.N) + return "N"; + if (code == V3ResponseLevel.R) + return "R"; + if (code == V3ResponseLevel.X) + return "X"; + return "?"; + } + + public String toSystem(V3ResponseLevel code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModality.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModality.java new file mode 100644 index 00000000000..ef614a6d39a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModality.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ResponseModality { + + /** + * Query response to be sent as an HL7 Batch. + */ + B, + /** + * Query response to occur in real time. + */ + R, + /** + * Query response to sent as a series of responses at the same time without the use of batch formatting. + */ + T, + /** + * added to help the parsers + */ + NULL; + public static V3ResponseModality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return B; + if ("R".equals(codeString)) + return R; + if ("T".equals(codeString)) + return T; + throw new FHIRException("Unknown V3ResponseModality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case B: return "B"; + case R: return "R"; + case T: return "T"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ResponseModality"; + } + public String getDefinition() { + switch (this) { + case B: return "Query response to be sent as an HL7 Batch."; + case R: return "Query response to occur in real time."; + case T: return "Query response to sent as a series of responses at the same time without the use of batch formatting."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case B: return "Batch"; + case R: return "Real Time"; + case T: return "Bolus"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModalityEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModalityEnumFactory.java new file mode 100644 index 00000000000..04bfd7e2700 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModalityEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ResponseModalityEnumFactory implements EnumFactory { + + public V3ResponseModality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("B".equals(codeString)) + return V3ResponseModality.B; + if ("R".equals(codeString)) + return V3ResponseModality.R; + if ("T".equals(codeString)) + return V3ResponseModality.T; + throw new IllegalArgumentException("Unknown V3ResponseModality code '"+codeString+"'"); + } + + public String toCode(V3ResponseModality code) { + if (code == V3ResponseModality.B) + return "B"; + if (code == V3ResponseModality.R) + return "R"; + if (code == V3ResponseModality.T) + return "T"; + return "?"; + } + + public String toSystem(V3ResponseModality code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseMode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseMode.java new file mode 100644 index 00000000000..5b4dab737e9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseMode.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3ResponseMode { + + /** + * The receiver may respond in a non-immediate manner. Note: this will be the default value. + */ + D, + /** + * The receiver is required to assume that the sender is blocking and behave appropriately by sending an immediate response. + */ + I, + /** + * The receiver shall keep any application responses in a queue until such time as the queue is polled. + */ + Q, + /** + * added to help the parsers + */ + NULL; + public static V3ResponseMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("I".equals(codeString)) + return I; + if ("Q".equals(codeString)) + return Q; + throw new FHIRException("Unknown V3ResponseMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case I: return "I"; + case Q: return "Q"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/ResponseMode"; + } + public String getDefinition() { + switch (this) { + case D: return "The receiver may respond in a non-immediate manner. Note: this will be the default value."; + case I: return "The receiver is required to assume that the sender is blocking and behave appropriately by sending an immediate response."; + case Q: return "The receiver shall keep any application responses in a queue until such time as the queue is polled."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "deferred"; + case I: return "immediate"; + case Q: return "queue"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModeEnumFactory.java new file mode 100644 index 00000000000..a067146268a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3ResponseModeEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3ResponseModeEnumFactory implements EnumFactory { + + public V3ResponseMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3ResponseMode.D; + if ("I".equals(codeString)) + return V3ResponseMode.I; + if ("Q".equals(codeString)) + return V3ResponseMode.Q; + throw new IllegalArgumentException("Unknown V3ResponseMode code '"+codeString+"'"); + } + + public String toCode(V3ResponseMode code) { + if (code == V3ResponseMode.D) + return "D"; + if (code == V3ResponseMode.I) + return "I"; + if (code == V3ResponseMode.Q) + return "Q"; + return "?"; + } + + public String toSystem(V3ResponseMode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleClass.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleClass.java new file mode 100644 index 00000000000..9a5359602f1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleClass.java @@ -0,0 +1,1278 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleClass { + + /** + * Corresponds to the Role class + */ + ROL, + /** + * A general association between two entities that is neither partitive nor ontological. + */ + _ROLECLASSASSOCIATIVE, + /** + * A relationship that is based on mutual behavior of the two Entities as being related. The basis of such relationship may be agreements (e.g., spouses, contract parties) or they may be de facto behavior (e.g. friends) or may be an incidental involvement with each other (e.g. parties over a dispute, siblings, children). + */ + _ROLECLASSMUTUALRELATIONSHIP, + /** + * A relationship between two entities that is formally recognized, frequently by a contract or similar agreement. + */ + _ROLECLASSRELATIONSHIPFORMAL, + /** + * Player of the Affiliate role has a business/professional relationship with scoper. Player and scoper may be persons or organization. The Affiliate relationship does not imply membership in a group, nor does it exist for resource scheduling purposes. + + + Example: A healthcare provider is affiliated with another provider as a business associate. + */ + AFFL, + /** + * An entity (player) that acts or is authorized to act on behalf of another entity (scoper). + */ + AGNT, + /** + * An agent role in which the agent is an Entity acting in the employ of an organization. The focus is on functional role on behalf of the organization, unlike the Employee role where the focus is on the 'Human Resources' relationship between the employee and the organization. + */ + ASSIGNED, + /** + * An Entity that is authorized to issue or instantiate permissions, privileges, credentials or other formal/legal authorizations. + */ + COMPAR, + /** + * The role of a person (player) who is the officer or signature authority for of a scoping entity, usually an organization (scoper). + */ + SGNOFF, + /** + * A person or an organization (player) which provides or receives information regarding another entity (scoper). Examples; patient NOK and emergency contacts; guarantor contact; employer contact. + */ + CON, + /** + * An entity to be contacted in the event of an emergency. + */ + ECON, + /** + * An individual designated for notification as the next of kin for a given entity. + */ + NOK, + /** + * Guardian of a ward + */ + GUARD, + /** + * Citizen of apolitical entity + */ + CIT, + /** + * A role class played by a person who receives benefit coverage under the terms of a particular insurance policy. The underwriter of that policy is the scoping entity. The covered party receives coverage because of some contractual or other relationship with the holder of that policy. + + + Discussion:This reason for coverage is captured in 'Role.code' and a relationship link with type code of indirect authority should be included using the policy holder role as the source, and the covered party role as the target. + + Note that a particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder. + */ + COVPTY, + /** + * Description: A role played by a party making a claim for coverage under a policy or program. A claimant must be either a person or organization, or a group of persons or organizations. A claimant is not a named insured or a program eligible. + + + Discussion: With respect to liability insurance such as property and casualty insurance, a claimant must file a claim requesting indemnification for a loss that the claimant considers covered under the policy of a named insured. The claims adjuster for the policy underwriter will review the claim to determine whether the loss meets the benefit coverage criteria under a policy, and base any indemnification or coverage payment on that review. If a third party is liable in whole or part for the loss, the underwriter may pursue third party liability recovery. A claimant may be involved in civil or criminal legal proceedings involving claims against a defendant party that is indemnified by an insurance policy or to protest the finding of a claims adjustor. With respect to life insurance, a beneficiary designated by a named insured becomes a claimant of the proceeds of coverage, as in the case of a life insurance policy. However, a claimant for coverage under life insurance is not necessarily a designated beneficiary. + + + Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g., an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + + In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that either a named insured or an individual insured has filed a claim for a loss. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. + + + Example: A claimant under automobile policy that is not the named insured. + */ + CLAIM, + /** + * Description: A role played by a party to an insurance policy to which the insurer agrees to indemnify for losses, provides benefits for, or renders services. A named insured may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations. + + + Discussion: The coded concept NAMED should not be used where a more specific child concept in this Specializable value set applies. In some cases, the named insured may not be the policy holder, e.g., where a policy holder purchases life insurance policy in which another party is the named insured and the policy holder is the beneficiary of the policy. + + + Note: The party playing the role of a named insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy e.g., if injured in an automobile accident and there is no liable third party. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that a named insured has filed a claim for a loss. + + + Example: The named insured under a comprehensive automobile, disability, or property and casualty policy that is the named insured and may or may not be the policy holder. + */ + NAMED, + /** + * Description: A role played by a person covered under a policy or program based on an association with a subscriber, which is recognized by the policy holder. + + + Note: The party playing the role of a dependent is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a dependent may make a claim under a policy, e.g., a dependent under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a dependent making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the dependent has filed a claim for services covered under the health insurance policy. + + + Example: The dependent has an association with the subscriber such as a financial dependency or personal relationship such as that of a spouse, or a natural or adopted child. The policy holder may be required by law to recognize certain associations or may have discretion about the associations. For example, a policy holder may dictate the criteria for the dependent status of adult children who are students, such as requiring full time enrollment, or may recognize domestic partners as dependents. Under certain circumstances, the dependent may be under the indirect authority of a responsible party acting as a surrogate for the subscriber, for example, if the subscriber is differently abled or deceased, a guardian ad Lidem or estate executor may be appointed to assume the subscriberaTMs legal standing in the relationship with the dependent. + */ + DEPEN, + /** + * Description: A role played by a party covered under a policy as the policy holder. An individual may be either a person or an organization. + + + Note: The party playing the role of an individual insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy if injured in an automobile accident and there is no liable third party. In the case of an individual insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that an individual insured has filed a claim for a loss. + + + Example: The individual insured under a comprehensive automobile, disability, or property and casualty policy that is the policy holder. + */ + INDIV, + /** + * Description: A role played by a person covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage. + + + Discussion: The policy holder holds the contract with the policy or program underwriter. The subscriber holds a certificate of coverage under the contract. In legal proceedings concerning the policy or program, the terms of the contract takes precedence over the terms of the certificate of coverage if there are any inconsistencies. + + + Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g., a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy. + + + Example: An employee or a member of an association. + */ + SUBSCR, + /** + * Description: A role played by a party that meets the eligibility criteria for coverage under a program. A program eligible may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations. + + + Discussion: A program as typically government administered coverage for parties determined eligible under the terms of the program. + + + Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants. + + In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a "claim" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits. + + + Example: A party meeting eligibility criteria related to health or financial status, e.g., in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid. + */ + PROG, + /** + * A role played by a provider, always a person, who has agency authority from a Clinical Research Sponsor to direct the conduct of a clinical research trial or study on behalf of the sponsor. + */ + CRINV, + /** + * A role played by an entity, usually an organization, that is the sponsor of a clinical research trial or study. The sponsor commissions the study, bears the expenses, is responsible for satisfying all legal requirements concerning subject safety and privacy, and is generally responsible for collection, storage and analysis of the data generated during the trial. No scoper is necessary, as a clinical research sponsor undertakes the role on its own authority and declaration. Clinical research sponsors are usually educational or other research organizations, government agencies or biopharmaceutical companies. + */ + CRSPNSR, + /** + * A relationship between a person or organization and a person or organization formed for the purpose of exchanging work for compensation. The purpose of the role is to identify the type of relationship the employee has to the employer, rather than the nature of the work actually performed. (Contrast with AssignedEntity.) + */ + EMP, + /** + * A role played by a member of a military service. Scoper is the military service (e.g. Army, Navy, Air Force, etc.) or, more specifically, the unit (e.g. Company C, 3rd Battalion, 4th Division, etc.) + */ + MIL, + /** + * A person or organization (player) that serves as a financial guarantor for another person or organization (scoper). + */ + GUAR, + /** + * An entity that is the subject of an investigation. This role is scoped by the party responsible for the investigation. + */ + INVSBJ, + /** + * A person, non-person living subject, or place that is the subject of an investigation related to a notifiable condition (health circumstance that is reportable within the applicable public health jurisdiction) + */ + CASEBJ, + /** + * Definition:Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established. + + + Examples: Screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the experimental portion of the design. + */ + RESBJ, + /** + * A relationship in which the scoper certifies the player ( e. g. a medical care giver, a medical device or a provider organization) to perform certain activities that fall under the jurisdiction of the scoper (e.g., a health authority licensing healthcare providers, a medical quality authority certifying healthcare professionals). + */ + LIC, + /** + * notary public + */ + NOT, + /** + * An Entity (player) that is authorized to provide health care services by some authorizing agency (scoper). + */ + PROV, + /** + * A Role of a LivingSubject (player) as an actual or potential recipient of health care services from a healthcare provider organization (scoper). + + + Usage Note: Communication about relationships between patients and specific healthcare practitioners (people) is not done via scoper. Instead this is generally done using the CareProvision act. This allows linkage between patient and a particular healthcare practitioner role and also allows description of the type of care involved in the relationship. + */ + PAT, + /** + * The role of an organization or individual designated to receive payment for a claim against a particular coverage. The scoping entity is the organization that is the submitter of the invoice in question. + */ + PAYEE, + /** + * The role of an organization that undertakes to accept claims invoices, assess the coverage or payments due for those invoices and pay to the designated payees for those invoices. This role may be either the underwriter or a third-party organization authorized by the underwriter. The scoping entity is the organization that underwrites the claimed coverage. + */ + PAYOR, + /** + * A role played by a person or organization that holds an insurance policy. The underwriter of that policy is the scoping entity. + + + Discussion:The identifier of the policy is captured in 'Role.id' when the Role is a policy holder. + + A particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder. + */ + POLHOLD, + /** + * An entity (player) that has been recognized as having certain training/experience or other characteristics that would make said entity an appropriate performer for a certain activity. The scoper is an organization that educates or qualifies entities. + */ + QUAL, + /** + * A role played by an entity, usually an organization that is the sponsor of an insurance plan or a health program. A sponsor is the party that is ultimately accountable for the coverage by employment contract or by law. A sponsor can be an employer, union, government agency, or association. Fully insured sponsors establish the terms of the plan and contract with health insurance plans to assume the risk and to administer the plan. Self-insured sponsors delegate coverage administration, but not risk, to third-party administrators. Program sponsors designate services to be covered in accordance with statute. Program sponsors may administer the coverage themselves, delegate coverage administration, but not risk to third-party administrators, or contract with health insurance plans to assume the risk and administrator a program. Sponsors qualify individuals who may become + + + + a policy holder of the plan; + + + + where the sponsor is the policy holder, who may become a subscriber or a dependent to a policy under the plan; or + + + + where the sponsor is a government agency, who may become program eligibles under a program. + + + + The sponsor role may be further qualified by the SponsorRole.code. Entities playing the sponsor role may also play the role of a Coverage Administrator. + + + Example: An employer, union, government agency, or association. + */ + SPNSR, + /** + * A role played by an individual who is a student of a school, which is the scoping entity. + */ + STD, + /** + * A role played by a person or an organization. It is the party that + + + + accepts fiscal responsibility for insurance plans and the policies created under those plans; + + + + administers and accepts fiscal responsibility for a program that provides coverage for services to eligible individuals; and/or + + + + has the responsibility to assess the merits of each risk and decide a suitable premium for accepting all or part of the risk. If played by an organization, this role may be further specified by an appropriate RoleCode. + + + + + Example: + + + + + A health insurer; + + + + Medicaid Program; + + + + Lloyd's of London + */ + UNDWRT, + /** + * A person responsible for the primary care of a patient at home. + */ + CAREGIVER, + /** + * Links two entities with classCode PSN (person) in a personal relationship. The character of the relationship must be defined by a PersonalRelationshipRoleType code. The player and scoper are determined by PersonalRelationshipRoleType code as well. + */ + PRS, + /** + * The "same" roleclass asserts an identity between playing and scoping entities: that they are in fact instances of the same entity and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error. + + + Usage: + + + playing and scoping entities must have same classcode, but need not have identical attributes or values. + + + Example: + + + a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual. + */ + SELF, + /** + * An association for a playing Entity that is used, known, treated, handled, built, or destroyed, etc. under the auspices of the scoping Entity. The playing Entity is passive in these roles (even though it may be active in other roles), in the sense that the kinds of things done to it in this role happen without an agreement from the playing Entity. + */ + _ROLECLASSPASSIVE, + /** + * A role in which the playing entity (material) provides access to another entity. The principal use case is intravenous (or other bodily) access lines that preexist and need to be referred to for medication routing instructions. + */ + ACCESS, + /** + * A physical association whereby two Entities are in some (even lose) spatial relationship with each other such that they touch each other in some way. + + + Examples: the colon is connected (and therefore adjacent) to the jejunum; the colon is adjacent to the liver (even if not actually connected.) + + + UsageConstraints: Adjacency is in principle a symmetrical connection, but scoper and player of the role should, where applicable, be assigned to have scoper be the larger, more central Entity and player the smaller, more distant, appendage. + */ + ADJY, + /** + * An adjacency of two Entities held together by a bond which attaches to each of the two entities. + + + Examples: biceps brachii muscle connected to the radius bone, port 3 on a network switch connected to port 5 on a patch panel. + + + UsageConstraints: See Adjacency for the assignment of scoper (larger, more central) and player (smaller, more distant). + */ + CONC, + /** + * A connection between two atoms of a molecule. + + + Examples: double bond between first and second C in ethane, peptide bond between two amino-acid, disulfide bridge between two proteins, chelate and ion associations, even the much weaker van-der-Waals bonds can be considered molecular bonds. + + + UsageConstraints: See connection and adjacency for the assignment of player and scoper. + */ + BOND, + /** + * A connection between two regional parts. + + + Examples: the connection between ascending aorta and the aortic arc, connection between descending colon and sigmoid. + + + UsageConstraints: See connection and adjacency for the assignment of player and scoper. + */ + CONY, + /** + * A material (player) that can be administered to an Entity (scoper). + */ + ADMM, + /** + * Relates a place (playing Entity) as the location where a living subject (scoping Entity) was born. + */ + BIRTHPL, + /** + * Definition: Relates a place (playing Entity) as the location where a living subject (scoping Entity) died. + */ + DEATHPLC, + /** + * A material (player) distributed by a distributor (scoper) who functions between a manufacturer and a buyer or retailer. + */ + DST, + /** + * Material (player) sold by a retailer (scoper), who also give advice to prospective buyers. + */ + RET, + /** + * A role played by a place at which the location of an event may be recorded. + */ + EXLOC, + /** + * A role played by a place at which services may be provided. + */ + SDLOC, + /** + * A role of a place (player) that is intended to house the provision of services. Scoper is the Entity (typically Organization) that provides these services. This is not synonymous with "ownership." + */ + DSDLOC, + /** + * A role played by a place at which health care services may be provided without prior designation or authorization. + */ + ISDLOC, + /** + * A role played by an entity that has been exposed to a person or animal suffering a contagious disease, or with a location from which a toxin has been distributed. The player of the role is normally a person or animal, but it is possible that other entity types could become exposed. The role is scoped by the source of the exposure, and it is quite possible for a person playing the role of exposed party to also become the scoper a role played by another person. That is to say, once a person has become infected, it is possible, perhaps likely, for that person to infect others. + + Management of exposures and tracking exposed parties is a key function within public health, and within most public health contexts - exposed parties are known as "contacts." + */ + EXPR, + /** + * Entity that is currently in the possession of a holder (scoper), who holds, or uses it, usually based on some agreement with the owner. + */ + HLD, + /** + * The role of a material (player) that is the physical health chart belonging to an organization (scoper). + */ + HLTHCHRT, + /** + * A role in which the scoping entity designates an identifier for a playing entity. + */ + IDENT, + /** + * Scoped by the manufacturer + */ + MANU, + /** + * A manufactured material (player) that is used for its therapeutic properties. The manufacturer is the scoper. + */ + THER, + /** + * An entity (player) that is maintained by another entity (scoper). This is typical role held by durable equipment. The scoper assumes responsibility for proper operation, quality, and safety. + */ + MNT, + /** + * An Entity (player) for which someone (scoper) is granted by law the right to call the material (player) his own. This entitles the scoper to make decisions about the disposition of that material. + */ + OWN, + /** + * A product regulated by some governmentatl orgnization. The role is played by Material and scoped by Organization. + + Rationale: To support an entity clone used to identify the NDC number for a drug product. + */ + RGPR, + /** + * Relates a place entity (player) as the region over which the scoper (typically an Organization) has certain authority (jurisdiction). For example, the Calgary Regional Health Authority (scoper) has authority over the territory "Region 4 of Alberta" (player) in matters of health. + */ + TERR, + /** + * Description:An entity (player) that is used by another entity (scoper) + */ + USED, + /** + * A role a product plays when a guarantee is given to the purchaser by the seller (scoping entity) stating that the product is reliable and free from known defects and that the seller will repair or replace defective parts within a given time limit and under certain conditions. + */ + WRTE, + /** + * A relationship in which the scoping Entity defines or specifies what the playing Entity is. Thus, the player's "being" (Greek: ontos) is specified. + */ + _ROLECLASSONTOLOGICAL, + /** + * Description: Specifies the player Entity (the equivalent Entity) as an Entity that is considered to be equivalent to a reference Entity (scoper). The equivalence is in principle a symmetric relationship, however, it is expected that the scoper is a reference entity which serves as reference entity for multiple different equivalent entities. + + + Examples: An innovator's medicine formulation is the reference for "generics", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g., metoprolol succinate specified in terms of metoprolol tartrate.) + */ + EQUIV, + /** + * The "same" role asserts an identity between playing and scoping entities, i.e., that they are in fact two records of the same entity instance, and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error. + + + Usage: + + + playing and scoping entities must have same classCode, but need not have identical attributes or values. + + + Example: + + + a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual. + */ + SAME, + /** + * Relates a prevailing record of an Entity (scoper) with another record (player) that it subsumes. + + + Examples: Show a correct new Person object (scoper) that subsumes one or more duplicate Person objects that had accidentally been created for the same physical person. + + + Constraints: Both the player and scoper must have the same classCode. + */ + SUBY, + /** + * Relates a specialized material concept (player) to its generalization (scoper). + */ + GEN, + /** + * A special link between pharmaceuticals indicating that the target (scoper) is a generic for the source (player). + */ + GRIC, + /** + * An individual piece of material (player) instantiating a class of material (scoper). + */ + INST, + /** + * An entity that subsumes the identity of another. Used in the context of merging documented entity instances. Both the player and scoper must have the same classCode. + + The use of this code is deprecated in favor of the term SUBY which is its inverse and is more ontologically correct. + */ + SUBS, + /** + * An association between two Entities where the playing Entity is considered in some way "part" of the scoping Entity, e.g., as a member, component, ingredient, or content. Being "part" in the broadest sense of the word can mean anything from being an integral structural component to a mere incidental temporary association of a playing Entity with a (generally larger) scoping Entity. + */ + _ROLECLASSPARTITIVE, + /** + * Relates a material as the content (player) to a container (scoper). Unlike ingredients, the content and a container remain separate (not mixed) and the content can be removed from the container. A content is not part of an empty container. + */ + CONT, + /** + * An exposure agent carrier is an entity that is capable of conveying an exposure agent from one entity to another. The scoper of the role must be the exposure agent (e.g., pathogen). + */ + EXPAGTCAR, + /** + * Description: A vector is a living subject that carries an exposure agent. The vector does not cause the disease itself, but exposes targets to the exposure agent. A mosquito carrying malaria is an example of a vector. The scoper of the role must be the exposure agent (e.g., pathogen). + */ + EXPVECTOR, + /** + * Description: A fomite is a non-living entity that is capable of conveying exposure agent from one entity to another. A doorknob contaminated with a Norovirus is an example of a fomite. Anyone touching the doorknob would be exposed to the virus. The scoper of the role must be the exposure agent (e.g., pathogen). + */ + FOMITE, + /** + * Relates a component (player) to a mixture (scoper). E.g., Glucose and Water are ingredients of D5W, latex may be an ingredient in a tracheal tube. + */ + INGR, + /** + * Definition: a therapeutically active ingredient (player) in a mixture (scoper), where the mixture is typically a manufactured pharmaceutical. It is unknown if the quantity of such an ingredient is expressed precisely in terms of the playing ingredient substance, or, if it is specified in terms of a closely related substance (active moiety or reference substance). + */ + ACTI, + /** + * Description: Active ingredient, where the ingredient substance (player) is itself the "basis of strength", i.e., where the Role.quantity specifies exactly the quantity of the player substance in the medicine formulation. + + + Examples: Lopressor 50 mg actually contains 50 mg of metoprolol succinate, even though the active moiety is metoprolol, but also: Tenormin 50 mg contain 50 mg of atenolol, as free base, i.e., where the active ingredient atenolol is also the active moiety. + */ + ACTIB, + /** + * Description: Active ingredient, where not the ingredient substance (player), but itaTMs active moiety is the "basis of strength", i.e., where the Role.quantity specifies the quantity of the player substance's active moiety in the medicine formulation. + + + Examples: 1 mL of Betopic 5mg/mL eye drops contains 5.6 mg betaxolol hydrochloride equivalent to betaxolol base 5 mg. + */ + ACTIM, + /** + * Description: Active ingredient, where not the ingredient substance (player) but another reference substance with the same active moiety, is the "basis of strength", i.e., where the Role.quantity specifies the quantity of a reference substance, similar but different from the player substance's in the medicine formulation. + + + Examples: Toprol-XL 50 mg contains 47.5 mg of metoprolol succinate equivalent to 50 mg of metoprolol tartrate. + */ + ACTIR, + /** + * A component (player) added to enhance the action of an active ingredient (scoper) (in the manner of a catalyst) but which has no active effect in and of itself. Such ingredients are significant in defining equivalence of products in a way that inactive ingredients are not. + */ + ADJV, + /** + * An ingredient (player) that is added to a base (scoper), that amounts to a minor part of the overall mixture. + */ + ADTV, + /** + * A base ingredient (player) is what comprises the major part of a mixture (scoper). E.g., Water in most i.v. solutions, or Vaseline in salves. Among all ingredients of a material, there should be only one base. A base substance can, in turn, be a mixture. + */ + BASE, + /** + * An ingredient whose presence is not intended but may not be reasonably avoided given the circumstances of the mixture's nature or origin. + */ + CNTM, + /** + * An ingredient which is not considered therapeutically active, e.g., colors, flavors, stabilizers, or preservatives, fillers, or structural components added to an active ingredient in order to facilitate administration of the active ingredient but without being considered therapeutically active. An inactive ingredient need not be biologically inert, e.g., might be active as an allergen or might have a pleasant taste, but is not an essential constituent delivering the therapeutic effect. + */ + IACT, + /** + * A substance (player) influencing the optical aspect of material (scoper). + */ + COLR, + /** + * A substance (player) added to a mixture (scoper) to make it taste a certain way. In food the use is obvious, in pharmaceuticals flavors can hide disgusting taste of the active ingredient (important in pediatric treatments). + */ + FLVR, + /** + * A substance (player) added to a mixture (scoper) to prevent microorganisms (fungi, bacteria) to spoil the mixture. + */ + PRSV, + /** + * A stabilizer (player) added to a mixture (scoper) in order to prevent the molecular disintegration of the main substance. + */ + STBL, + /** + * An ingredient (player) of a medication (scoper) that is inseparable from the active ingredients, but has no intended chemical or pharmaceutical effect itself, but which may have some systemic effect on the patient. + + An example is a collagen matrix used as a base for transplanting skin cells. The collagen matrix can be left permanently in the graft site. Because it is of bovine origin, the patient may exhibit allergies or may have cultural objections to its use. + */ + MECH, + /** + * Relates an entity (player) to a location (scoper) at which it is present in some way. This presence may be limited in time. + */ + LOCE, + /** + * Relates an entity (player) (e.g. a device) to a location (scoper) at which it is normally found or stored when not used. + */ + STOR, + /** + * A role played by an entity that is a member of a group. The group provides the scope for this role. + + Among other uses, groups as used in insurance (groups of covered individuals) and in scheduling where resources may be grouped for scheduling and logistical purposes. + */ + MBR, + /** + * Definition: an association between two Entities where the playing Entity (the part) is a component of the whole (scoper) in the sense of an integral structural component, that is distinct from other parts in the same whole, has a distinct function in the whole, and, as an effect, the full integrity of the whole depends (to some degree) on the presence of this part, even though the part may often be separable from the whole. + + + Discussion: Part is defined in opposition to (a) ingredient (not separable), (b) content (not a functional component), and (c) member (not functionally distinct from other members). + */ + PART, + /** + * The molecule or ion that is responsible for the intended pharmacological action of the drug substance, excluding those appended or associated parts of the molecule that make the molecule an ester, salt (including a salt with hydrogen or coordination bonds), or other noncovalent derivative (such as a complex, chelate, or clathrate). + + Examples: heparin-sodium and heparin-potassium have the same active moiety, heparin; the active moiety of morphine-hydrochloride is morphine. + */ + ACTM, + /** + * A role played by a material entity that is a specimen for an act. It is scoped by the source of the specimen. + */ + SPEC, + /** + * A portion (player) of an original or source specimen (scoper) used for testing or transportation. + */ + ALQT, + /** + * A microorganism that has been isolated from other microorganisms or a source matrix. + */ + ISLT, + /** + * The player of the role is a child of the scoping entity, in a generic sense. + */ + CHILD, + /** + * A role played by an entity that receives credentials from the scoping entity. + */ + CRED, + /** + * nurse practitioner + */ + NURPRAC, + /** + * nurse + */ + NURS, + /** + * physician assistant + */ + PA, + /** + * physician + */ + PHYS, + /** + * added to help the parsers + */ + NULL; + public static V3RoleClass fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ROL".equals(codeString)) + return ROL; + if ("_RoleClassAssociative".equals(codeString)) + return _ROLECLASSASSOCIATIVE; + if ("_RoleClassMutualRelationship".equals(codeString)) + return _ROLECLASSMUTUALRELATIONSHIP; + if ("_RoleClassRelationshipFormal".equals(codeString)) + return _ROLECLASSRELATIONSHIPFORMAL; + if ("AFFL".equals(codeString)) + return AFFL; + if ("AGNT".equals(codeString)) + return AGNT; + if ("ASSIGNED".equals(codeString)) + return ASSIGNED; + if ("COMPAR".equals(codeString)) + return COMPAR; + if ("SGNOFF".equals(codeString)) + return SGNOFF; + if ("CON".equals(codeString)) + return CON; + if ("ECON".equals(codeString)) + return ECON; + if ("NOK".equals(codeString)) + return NOK; + if ("GUARD".equals(codeString)) + return GUARD; + if ("CIT".equals(codeString)) + return CIT; + if ("COVPTY".equals(codeString)) + return COVPTY; + if ("CLAIM".equals(codeString)) + return CLAIM; + if ("NAMED".equals(codeString)) + return NAMED; + if ("DEPEN".equals(codeString)) + return DEPEN; + if ("INDIV".equals(codeString)) + return INDIV; + if ("SUBSCR".equals(codeString)) + return SUBSCR; + if ("PROG".equals(codeString)) + return PROG; + if ("CRINV".equals(codeString)) + return CRINV; + if ("CRSPNSR".equals(codeString)) + return CRSPNSR; + if ("EMP".equals(codeString)) + return EMP; + if ("MIL".equals(codeString)) + return MIL; + if ("GUAR".equals(codeString)) + return GUAR; + if ("INVSBJ".equals(codeString)) + return INVSBJ; + if ("CASEBJ".equals(codeString)) + return CASEBJ; + if ("RESBJ".equals(codeString)) + return RESBJ; + if ("LIC".equals(codeString)) + return LIC; + if ("NOT".equals(codeString)) + return NOT; + if ("PROV".equals(codeString)) + return PROV; + if ("PAT".equals(codeString)) + return PAT; + if ("PAYEE".equals(codeString)) + return PAYEE; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("POLHOLD".equals(codeString)) + return POLHOLD; + if ("QUAL".equals(codeString)) + return QUAL; + if ("SPNSR".equals(codeString)) + return SPNSR; + if ("STD".equals(codeString)) + return STD; + if ("UNDWRT".equals(codeString)) + return UNDWRT; + if ("CAREGIVER".equals(codeString)) + return CAREGIVER; + if ("PRS".equals(codeString)) + return PRS; + if ("SELF".equals(codeString)) + return SELF; + if ("_RoleClassPassive".equals(codeString)) + return _ROLECLASSPASSIVE; + if ("ACCESS".equals(codeString)) + return ACCESS; + if ("ADJY".equals(codeString)) + return ADJY; + if ("CONC".equals(codeString)) + return CONC; + if ("BOND".equals(codeString)) + return BOND; + if ("CONY".equals(codeString)) + return CONY; + if ("ADMM".equals(codeString)) + return ADMM; + if ("BIRTHPL".equals(codeString)) + return BIRTHPL; + if ("DEATHPLC".equals(codeString)) + return DEATHPLC; + if ("DST".equals(codeString)) + return DST; + if ("RET".equals(codeString)) + return RET; + if ("EXLOC".equals(codeString)) + return EXLOC; + if ("SDLOC".equals(codeString)) + return SDLOC; + if ("DSDLOC".equals(codeString)) + return DSDLOC; + if ("ISDLOC".equals(codeString)) + return ISDLOC; + if ("EXPR".equals(codeString)) + return EXPR; + if ("HLD".equals(codeString)) + return HLD; + if ("HLTHCHRT".equals(codeString)) + return HLTHCHRT; + if ("IDENT".equals(codeString)) + return IDENT; + if ("MANU".equals(codeString)) + return MANU; + if ("THER".equals(codeString)) + return THER; + if ("MNT".equals(codeString)) + return MNT; + if ("OWN".equals(codeString)) + return OWN; + if ("RGPR".equals(codeString)) + return RGPR; + if ("TERR".equals(codeString)) + return TERR; + if ("USED".equals(codeString)) + return USED; + if ("WRTE".equals(codeString)) + return WRTE; + if ("_RoleClassOntological".equals(codeString)) + return _ROLECLASSONTOLOGICAL; + if ("EQUIV".equals(codeString)) + return EQUIV; + if ("SAME".equals(codeString)) + return SAME; + if ("SUBY".equals(codeString)) + return SUBY; + if ("GEN".equals(codeString)) + return GEN; + if ("GRIC".equals(codeString)) + return GRIC; + if ("INST".equals(codeString)) + return INST; + if ("SUBS".equals(codeString)) + return SUBS; + if ("_RoleClassPartitive".equals(codeString)) + return _ROLECLASSPARTITIVE; + if ("CONT".equals(codeString)) + return CONT; + if ("EXPAGTCAR".equals(codeString)) + return EXPAGTCAR; + if ("EXPVECTOR".equals(codeString)) + return EXPVECTOR; + if ("FOMITE".equals(codeString)) + return FOMITE; + if ("INGR".equals(codeString)) + return INGR; + if ("ACTI".equals(codeString)) + return ACTI; + if ("ACTIB".equals(codeString)) + return ACTIB; + if ("ACTIM".equals(codeString)) + return ACTIM; + if ("ACTIR".equals(codeString)) + return ACTIR; + if ("ADJV".equals(codeString)) + return ADJV; + if ("ADTV".equals(codeString)) + return ADTV; + if ("BASE".equals(codeString)) + return BASE; + if ("CNTM".equals(codeString)) + return CNTM; + if ("IACT".equals(codeString)) + return IACT; + if ("COLR".equals(codeString)) + return COLR; + if ("FLVR".equals(codeString)) + return FLVR; + if ("PRSV".equals(codeString)) + return PRSV; + if ("STBL".equals(codeString)) + return STBL; + if ("MECH".equals(codeString)) + return MECH; + if ("LOCE".equals(codeString)) + return LOCE; + if ("STOR".equals(codeString)) + return STOR; + if ("MBR".equals(codeString)) + return MBR; + if ("PART".equals(codeString)) + return PART; + if ("ACTM".equals(codeString)) + return ACTM; + if ("SPEC".equals(codeString)) + return SPEC; + if ("ALQT".equals(codeString)) + return ALQT; + if ("ISLT".equals(codeString)) + return ISLT; + if ("CHILD".equals(codeString)) + return CHILD; + if ("CRED".equals(codeString)) + return CRED; + if ("NURPRAC".equals(codeString)) + return NURPRAC; + if ("NURS".equals(codeString)) + return NURS; + if ("PA".equals(codeString)) + return PA; + if ("PHYS".equals(codeString)) + return PHYS; + throw new FHIRException("Unknown V3RoleClass code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ROL: return "ROL"; + case _ROLECLASSASSOCIATIVE: return "_RoleClassAssociative"; + case _ROLECLASSMUTUALRELATIONSHIP: return "_RoleClassMutualRelationship"; + case _ROLECLASSRELATIONSHIPFORMAL: return "_RoleClassRelationshipFormal"; + case AFFL: return "AFFL"; + case AGNT: return "AGNT"; + case ASSIGNED: return "ASSIGNED"; + case COMPAR: return "COMPAR"; + case SGNOFF: return "SGNOFF"; + case CON: return "CON"; + case ECON: return "ECON"; + case NOK: return "NOK"; + case GUARD: return "GUARD"; + case CIT: return "CIT"; + case COVPTY: return "COVPTY"; + case CLAIM: return "CLAIM"; + case NAMED: return "NAMED"; + case DEPEN: return "DEPEN"; + case INDIV: return "INDIV"; + case SUBSCR: return "SUBSCR"; + case PROG: return "PROG"; + case CRINV: return "CRINV"; + case CRSPNSR: return "CRSPNSR"; + case EMP: return "EMP"; + case MIL: return "MIL"; + case GUAR: return "GUAR"; + case INVSBJ: return "INVSBJ"; + case CASEBJ: return "CASEBJ"; + case RESBJ: return "RESBJ"; + case LIC: return "LIC"; + case NOT: return "NOT"; + case PROV: return "PROV"; + case PAT: return "PAT"; + case PAYEE: return "PAYEE"; + case PAYOR: return "PAYOR"; + case POLHOLD: return "POLHOLD"; + case QUAL: return "QUAL"; + case SPNSR: return "SPNSR"; + case STD: return "STD"; + case UNDWRT: return "UNDWRT"; + case CAREGIVER: return "CAREGIVER"; + case PRS: return "PRS"; + case SELF: return "SELF"; + case _ROLECLASSPASSIVE: return "_RoleClassPassive"; + case ACCESS: return "ACCESS"; + case ADJY: return "ADJY"; + case CONC: return "CONC"; + case BOND: return "BOND"; + case CONY: return "CONY"; + case ADMM: return "ADMM"; + case BIRTHPL: return "BIRTHPL"; + case DEATHPLC: return "DEATHPLC"; + case DST: return "DST"; + case RET: return "RET"; + case EXLOC: return "EXLOC"; + case SDLOC: return "SDLOC"; + case DSDLOC: return "DSDLOC"; + case ISDLOC: return "ISDLOC"; + case EXPR: return "EXPR"; + case HLD: return "HLD"; + case HLTHCHRT: return "HLTHCHRT"; + case IDENT: return "IDENT"; + case MANU: return "MANU"; + case THER: return "THER"; + case MNT: return "MNT"; + case OWN: return "OWN"; + case RGPR: return "RGPR"; + case TERR: return "TERR"; + case USED: return "USED"; + case WRTE: return "WRTE"; + case _ROLECLASSONTOLOGICAL: return "_RoleClassOntological"; + case EQUIV: return "EQUIV"; + case SAME: return "SAME"; + case SUBY: return "SUBY"; + case GEN: return "GEN"; + case GRIC: return "GRIC"; + case INST: return "INST"; + case SUBS: return "SUBS"; + case _ROLECLASSPARTITIVE: return "_RoleClassPartitive"; + case CONT: return "CONT"; + case EXPAGTCAR: return "EXPAGTCAR"; + case EXPVECTOR: return "EXPVECTOR"; + case FOMITE: return "FOMITE"; + case INGR: return "INGR"; + case ACTI: return "ACTI"; + case ACTIB: return "ACTIB"; + case ACTIM: return "ACTIM"; + case ACTIR: return "ACTIR"; + case ADJV: return "ADJV"; + case ADTV: return "ADTV"; + case BASE: return "BASE"; + case CNTM: return "CNTM"; + case IACT: return "IACT"; + case COLR: return "COLR"; + case FLVR: return "FLVR"; + case PRSV: return "PRSV"; + case STBL: return "STBL"; + case MECH: return "MECH"; + case LOCE: return "LOCE"; + case STOR: return "STOR"; + case MBR: return "MBR"; + case PART: return "PART"; + case ACTM: return "ACTM"; + case SPEC: return "SPEC"; + case ALQT: return "ALQT"; + case ISLT: return "ISLT"; + case CHILD: return "CHILD"; + case CRED: return "CRED"; + case NURPRAC: return "NURPRAC"; + case NURS: return "NURS"; + case PA: return "PA"; + case PHYS: return "PHYS"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleClass"; + } + public String getDefinition() { + switch (this) { + case ROL: return "Corresponds to the Role class"; + case _ROLECLASSASSOCIATIVE: return "A general association between two entities that is neither partitive nor ontological."; + case _ROLECLASSMUTUALRELATIONSHIP: return "A relationship that is based on mutual behavior of the two Entities as being related. The basis of such relationship may be agreements (e.g., spouses, contract parties) or they may be de facto behavior (e.g. friends) or may be an incidental involvement with each other (e.g. parties over a dispute, siblings, children)."; + case _ROLECLASSRELATIONSHIPFORMAL: return "A relationship between two entities that is formally recognized, frequently by a contract or similar agreement."; + case AFFL: return "Player of the Affiliate role has a business/professional relationship with scoper. Player and scoper may be persons or organization. The Affiliate relationship does not imply membership in a group, nor does it exist for resource scheduling purposes.\r\n\n \n Example: A healthcare provider is affiliated with another provider as a business associate."; + case AGNT: return "An entity (player) that acts or is authorized to act on behalf of another entity (scoper)."; + case ASSIGNED: return "An agent role in which the agent is an Entity acting in the employ of an organization. The focus is on functional role on behalf of the organization, unlike the Employee role where the focus is on the 'Human Resources' relationship between the employee and the organization."; + case COMPAR: return "An Entity that is authorized to issue or instantiate permissions, privileges, credentials or other formal/legal authorizations."; + case SGNOFF: return "The role of a person (player) who is the officer or signature authority for of a scoping entity, usually an organization (scoper)."; + case CON: return "A person or an organization (player) which provides or receives information regarding another entity (scoper). Examples; patient NOK and emergency contacts; guarantor contact; employer contact."; + case ECON: return "An entity to be contacted in the event of an emergency."; + case NOK: return "An individual designated for notification as the next of kin for a given entity."; + case GUARD: return "Guardian of a ward"; + case CIT: return "Citizen of apolitical entity"; + case COVPTY: return "A role class played by a person who receives benefit coverage under the terms of a particular insurance policy. The underwriter of that policy is the scoping entity. The covered party receives coverage because of some contractual or other relationship with the holder of that policy.\r\n\n \n Discussion:This reason for coverage is captured in 'Role.code' and a relationship link with type code of indirect authority should be included using the policy holder role as the source, and the covered party role as the target.\r\n\n Note that a particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder."; + case CLAIM: return "Description: A role played by a party making a claim for coverage under a policy or program. A claimant must be either a person or organization, or a group of persons or organizations. A claimant is not a named insured or a program eligible.\r\n\n \n Discussion: With respect to liability insurance such as property and casualty insurance, a claimant must file a claim requesting indemnification for a loss that the claimant considers covered under the policy of a named insured. The claims adjuster for the policy underwriter will review the claim to determine whether the loss meets the benefit coverage criteria under a policy, and base any indemnification or coverage payment on that review. If a third party is liable in whole or part for the loss, the underwriter may pursue third party liability recovery. A claimant may be involved in civil or criminal legal proceedings involving claims against a defendant party that is indemnified by an insurance policy or to protest the finding of a claims adjustor. With respect to life insurance, a beneficiary designated by a named insured becomes a claimant of the proceeds of coverage, as in the case of a life insurance policy. However, a claimant for coverage under life insurance is not necessarily a designated beneficiary.\r\n\n \n Note: A claimant is not a named insured. However, a named insured may make a claim under a policy, e.g., an insured driver may make a claim for an injury under his or her comprehensive automobile insurance policy. Similarly, a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants.\r\n\n In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that either a named insured or an individual insured has filed a claim for a loss. In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a \"claim\" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits.\r\n\n \n Example: A claimant under automobile policy that is not the named insured."; + case NAMED: return "Description: A role played by a party to an insurance policy to which the insurer agrees to indemnify for losses, provides benefits for, or renders services. A named insured may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations.\r\n\n \n Discussion: The coded concept NAMED should not be used where a more specific child concept in this Specializable value set applies. In some cases, the named insured may not be the policy holder, e.g., where a policy holder purchases life insurance policy in which another party is the named insured and the policy holder is the beneficiary of the policy.\r\n\n \n Note: The party playing the role of a named insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy e.g., if injured in an automobile accident and there is no liable third party. In the case of a named insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that a named insured has filed a claim for a loss.\r\n\n \n Example: The named insured under a comprehensive automobile, disability, or property and casualty policy that is the named insured and may or may not be the policy holder."; + case DEPEN: return "Description: A role played by a person covered under a policy or program based on an association with a subscriber, which is recognized by the policy holder.\r\n\n \n Note: The party playing the role of a dependent is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a dependent may make a claim under a policy, e.g., a dependent under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a dependent making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the dependent has filed a claim for services covered under the health insurance policy.\r\n\n \n Example: The dependent has an association with the subscriber such as a financial dependency or personal relationship such as that of a spouse, or a natural or adopted child. The policy holder may be required by law to recognize certain associations or may have discretion about the associations. For example, a policy holder may dictate the criteria for the dependent status of adult children who are students, such as requiring full time enrollment, or may recognize domestic partners as dependents. Under certain circumstances, the dependent may be under the indirect authority of a responsible party acting as a surrogate for the subscriber, for example, if the subscriber is differently abled or deceased, a guardian ad Lidem or estate executor may be appointed to assume the subscriberaTMs legal standing in the relationship with the dependent."; + case INDIV: return "Description: A role played by a party covered under a policy as the policy holder. An individual may be either a person or an organization.\r\n\n \n Note: The party playing the role of an individual insured is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a named insured may make a claim under a policy, e.g., a party that is the named insured and policy holder under a comprehensive automobile insurance policy may become the claimant for coverage under that policy if injured in an automobile accident and there is no liable third party. In the case of an individual insured making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that an individual insured has filed a claim for a loss.\r\n\n \n Example: The individual insured under a comprehensive automobile, disability, or property and casualty policy that is the policy holder."; + case SUBSCR: return "Description: A role played by a person covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage.\r\n\n \n Discussion: The policy holder holds the contract with the policy or program underwriter. The subscriber holds a certificate of coverage under the contract. In legal proceedings concerning the policy or program, the terms of the contract takes precedence over the terms of the certificate of coverage if there are any inconsistencies.\r\n\n \n Note: The party playing the role of a subscriber is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However, a subscriber may make a claim under a policy, e.g., a subscriber under a health insurance policy may become the claimant for coverage under that policy for wellness examines or if injured and there is no liable third party. In the case of a subscriber making a claim, a role type code INSCLM (insured claimant) subtypes the class to indicate that the subscriber has filed a claim for services covered under the health insurance policy.\r\n\n \n Example: An employee or a member of an association."; + case PROG: return "Description: A role played by a party that meets the eligibility criteria for coverage under a program. A program eligible may be either a person, non-person living subject, or an organization, or a group of persons, non-person living subjects, or organizations.\r\n\n \n Discussion: A program as typically government administered coverage for parties determined eligible under the terms of the program.\r\n\n \n Note: The party playing a program eligible is not a claimant in the sense conveyed by the RoleClassCoveredParty CLAIM (claimant). However a program eligible may make a claim under program, e.g., an unemployed worker may claim benefits under an unemployment insurance program, but parties playing these covered party role classes are not, for purposes of this vocabulary and in an effort to clearly distinguish role classes, considered claimants.\r\n\n In the case of a program eligible, a role type code INJWKR (injured worker) subtypes the class to indicate that the covered party in a workers compensation program is an injured worker, and as such, has filed a \"claim\" under the program for benefits. Likewise, a covered role type code UNEMP (unemployed worker) subtypes the program eligible class to indicate that the covered party in an unemployment insurance program has filed a claim for unemployment benefits.\r\n\n \n Example: A party meeting eligibility criteria related to health or financial status, e.g., in the U.S., persons meeting health, demographic, or financial criteria established by state and federal law are eligible for Medicaid."; + case CRINV: return "A role played by a provider, always a person, who has agency authority from a Clinical Research Sponsor to direct the conduct of a clinical research trial or study on behalf of the sponsor."; + case CRSPNSR: return "A role played by an entity, usually an organization, that is the sponsor of a clinical research trial or study. The sponsor commissions the study, bears the expenses, is responsible for satisfying all legal requirements concerning subject safety and privacy, and is generally responsible for collection, storage and analysis of the data generated during the trial. No scoper is necessary, as a clinical research sponsor undertakes the role on its own authority and declaration. Clinical research sponsors are usually educational or other research organizations, government agencies or biopharmaceutical companies."; + case EMP: return "A relationship between a person or organization and a person or organization formed for the purpose of exchanging work for compensation. The purpose of the role is to identify the type of relationship the employee has to the employer, rather than the nature of the work actually performed. (Contrast with AssignedEntity.)"; + case MIL: return "A role played by a member of a military service. Scoper is the military service (e.g. Army, Navy, Air Force, etc.) or, more specifically, the unit (e.g. Company C, 3rd Battalion, 4th Division, etc.)"; + case GUAR: return "A person or organization (player) that serves as a financial guarantor for another person or organization (scoper)."; + case INVSBJ: return "An entity that is the subject of an investigation. This role is scoped by the party responsible for the investigation."; + case CASEBJ: return "A person, non-person living subject, or place that is the subject of an investigation related to a notifiable condition (health circumstance that is reportable within the applicable public health jurisdiction)"; + case RESBJ: return "Definition:Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established.\r\n\n \n Examples: Screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the experimental portion of the design."; + case LIC: return "A relationship in which the scoper certifies the player ( e. g. a medical care giver, a medical device or a provider organization) to perform certain activities that fall under the jurisdiction of the scoper (e.g., a health authority licensing healthcare providers, a medical quality authority certifying healthcare professionals)."; + case NOT: return "notary public"; + case PROV: return "An Entity (player) that is authorized to provide health care services by some authorizing agency (scoper)."; + case PAT: return "A Role of a LivingSubject (player) as an actual or potential recipient of health care services from a healthcare provider organization (scoper).\r\n\n \n Usage Note: Communication about relationships between patients and specific healthcare practitioners (people) is not done via scoper. Instead this is generally done using the CareProvision act. This allows linkage between patient and a particular healthcare practitioner role and also allows description of the type of care involved in the relationship."; + case PAYEE: return "The role of an organization or individual designated to receive payment for a claim against a particular coverage. The scoping entity is the organization that is the submitter of the invoice in question."; + case PAYOR: return "The role of an organization that undertakes to accept claims invoices, assess the coverage or payments due for those invoices and pay to the designated payees for those invoices. This role may be either the underwriter or a third-party organization authorized by the underwriter. The scoping entity is the organization that underwrites the claimed coverage."; + case POLHOLD: return "A role played by a person or organization that holds an insurance policy. The underwriter of that policy is the scoping entity.\r\n\n \n Discussion:The identifier of the policy is captured in 'Role.id' when the Role is a policy holder.\r\n\n A particular policy may cover several individuals one of whom may be, but need not be, the policy holder. Thus the notion of covered party is a role that is distinct from that of the policy holder."; + case QUAL: return "An entity (player) that has been recognized as having certain training/experience or other characteristics that would make said entity an appropriate performer for a certain activity. The scoper is an organization that educates or qualifies entities."; + case SPNSR: return "A role played by an entity, usually an organization that is the sponsor of an insurance plan or a health program. A sponsor is the party that is ultimately accountable for the coverage by employment contract or by law. A sponsor can be an employer, union, government agency, or association. Fully insured sponsors establish the terms of the plan and contract with health insurance plans to assume the risk and to administer the plan. Self-insured sponsors delegate coverage administration, but not risk, to third-party administrators. Program sponsors designate services to be covered in accordance with statute. Program sponsors may administer the coverage themselves, delegate coverage administration, but not risk to third-party administrators, or contract with health insurance plans to assume the risk and administrator a program. Sponsors qualify individuals who may become \r\n\n \n \n a policy holder of the plan;\r\n\n \n \n where the sponsor is the policy holder, who may become a subscriber or a dependent to a policy under the plan; or\r\n\n \n \n where the sponsor is a government agency, who may become program eligibles under a program. \r\n\n \n \n The sponsor role may be further qualified by the SponsorRole.code. Entities playing the sponsor role may also play the role of a Coverage Administrator.\r\n\n \n Example: An employer, union, government agency, or association."; + case STD: return "A role played by an individual who is a student of a school, which is the scoping entity."; + case UNDWRT: return "A role played by a person or an organization. It is the party that \r\n\n \n \n accepts fiscal responsibility for insurance plans and the policies created under those plans;\r\n\n \n \n administers and accepts fiscal responsibility for a program that provides coverage for services to eligible individuals; and/or\r\n\n \n \n has the responsibility to assess the merits of each risk and decide a suitable premium for accepting all or part of the risk. If played by an organization, this role may be further specified by an appropriate RoleCode.\r\n\n \n \n \n Example:\n \r\n\n \n \n A health insurer; \r\n\n \n \n Medicaid Program;\r\n\n \n \n Lloyd's of London"; + case CAREGIVER: return "A person responsible for the primary care of a patient at home."; + case PRS: return "Links two entities with classCode PSN (person) in a personal relationship. The character of the relationship must be defined by a PersonalRelationshipRoleType code. The player and scoper are determined by PersonalRelationshipRoleType code as well."; + case SELF: return "The \"same\" roleclass asserts an identity between playing and scoping entities: that they are in fact instances of the same entity and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error.\r\n\n \n Usage:\n \r\n\n playing and scoping entities must have same classcode, but need not have identical attributes or values. \r\n\n \n Example: \n \r\n\n a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual."; + case _ROLECLASSPASSIVE: return "An association for a playing Entity that is used, known, treated, handled, built, or destroyed, etc. under the auspices of the scoping Entity. The playing Entity is passive in these roles (even though it may be active in other roles), in the sense that the kinds of things done to it in this role happen without an agreement from the playing Entity."; + case ACCESS: return "A role in which the playing entity (material) provides access to another entity. The principal use case is intravenous (or other bodily) access lines that preexist and need to be referred to for medication routing instructions."; + case ADJY: return "A physical association whereby two Entities are in some (even lose) spatial relationship with each other such that they touch each other in some way.\r\n\n \n Examples: the colon is connected (and therefore adjacent) to the jejunum; the colon is adjacent to the liver (even if not actually connected.)\r\n\n \n UsageConstraints: Adjacency is in principle a symmetrical connection, but scoper and player of the role should, where applicable, be assigned to have scoper be the larger, more central Entity and player the smaller, more distant, appendage."; + case CONC: return "An adjacency of two Entities held together by a bond which attaches to each of the two entities. \r\n\n \n Examples: biceps brachii muscle connected to the radius bone, port 3 on a network switch connected to port 5 on a patch panel.\r\n\n \n UsageConstraints: See Adjacency for the assignment of scoper (larger, more central) and player (smaller, more distant)."; + case BOND: return "A connection between two atoms of a molecule.\r\n\n \n Examples: double bond between first and second C in ethane, peptide bond between two amino-acid, disulfide bridge between two proteins, chelate and ion associations, even the much weaker van-der-Waals bonds can be considered molecular bonds.\r\n\n \n UsageConstraints: See connection and adjacency for the assignment of player and scoper."; + case CONY: return "A connection between two regional parts.\r\n\n \n Examples: the connection between ascending aorta and the aortic arc, connection between descending colon and sigmoid.\r\n\n \n UsageConstraints: See connection and adjacency for the assignment of player and scoper."; + case ADMM: return "A material (player) that can be administered to an Entity (scoper)."; + case BIRTHPL: return "Relates a place (playing Entity) as the location where a living subject (scoping Entity) was born."; + case DEATHPLC: return "Definition: Relates a place (playing Entity) as the location where a living subject (scoping Entity) died."; + case DST: return "A material (player) distributed by a distributor (scoper) who functions between a manufacturer and a buyer or retailer."; + case RET: return "Material (player) sold by a retailer (scoper), who also give advice to prospective buyers."; + case EXLOC: return "A role played by a place at which the location of an event may be recorded."; + case SDLOC: return "A role played by a place at which services may be provided."; + case DSDLOC: return "A role of a place (player) that is intended to house the provision of services. Scoper is the Entity (typically Organization) that provides these services. This is not synonymous with \"ownership.\""; + case ISDLOC: return "A role played by a place at which health care services may be provided without prior designation or authorization."; + case EXPR: return "A role played by an entity that has been exposed to a person or animal suffering a contagious disease, or with a location from which a toxin has been distributed. The player of the role is normally a person or animal, but it is possible that other entity types could become exposed. The role is scoped by the source of the exposure, and it is quite possible for a person playing the role of exposed party to also become the scoper a role played by another person. That is to say, once a person has become infected, it is possible, perhaps likely, for that person to infect others.\r\n\n Management of exposures and tracking exposed parties is a key function within public health, and within most public health contexts - exposed parties are known as \"contacts.\""; + case HLD: return "Entity that is currently in the possession of a holder (scoper), who holds, or uses it, usually based on some agreement with the owner."; + case HLTHCHRT: return "The role of a material (player) that is the physical health chart belonging to an organization (scoper)."; + case IDENT: return "A role in which the scoping entity designates an identifier for a playing entity."; + case MANU: return "Scoped by the manufacturer"; + case THER: return "A manufactured material (player) that is used for its therapeutic properties. The manufacturer is the scoper."; + case MNT: return "An entity (player) that is maintained by another entity (scoper). This is typical role held by durable equipment. The scoper assumes responsibility for proper operation, quality, and safety."; + case OWN: return "An Entity (player) for which someone (scoper) is granted by law the right to call the material (player) his own. This entitles the scoper to make decisions about the disposition of that material."; + case RGPR: return "A product regulated by some governmentatl orgnization. The role is played by Material and scoped by Organization.\r\n\n Rationale: To support an entity clone used to identify the NDC number for a drug product."; + case TERR: return "Relates a place entity (player) as the region over which the scoper (typically an Organization) has certain authority (jurisdiction). For example, the Calgary Regional Health Authority (scoper) has authority over the territory \"Region 4 of Alberta\" (player) in matters of health."; + case USED: return "Description:An entity (player) that is used by another entity (scoper)"; + case WRTE: return "A role a product plays when a guarantee is given to the purchaser by the seller (scoping entity) stating that the product is reliable and free from known defects and that the seller will repair or replace defective parts within a given time limit and under certain conditions."; + case _ROLECLASSONTOLOGICAL: return "A relationship in which the scoping Entity defines or specifies what the playing Entity is. Thus, the player's \"being\" (Greek: ontos) is specified."; + case EQUIV: return "Description: Specifies the player Entity (the equivalent Entity) as an Entity that is considered to be equivalent to a reference Entity (scoper). The equivalence is in principle a symmetric relationship, however, it is expected that the scoper is a reference entity which serves as reference entity for multiple different equivalent entities. \r\n\n \n Examples: An innovator's medicine formulation is the reference for \"generics\", i.e., formulations manufactured differently but having been proven to be biologically equivalent to the reference medicine. Another example is a reference ingredient that serves as basis for quantity specifications (basis of strength, e.g., metoprolol succinate specified in terms of metoprolol tartrate.)"; + case SAME: return "The \"same\" role asserts an identity between playing and scoping entities, i.e., that they are in fact two records of the same entity instance, and, in the case of discrepancies (e.g different DOB, gender), that one or both are in error.\r\n\n \n Usage:\n \r\n\n playing and scoping entities must have same classCode, but need not have identical attributes or values.\r\n\n \n Example: \n \r\n\n a provider registry maintains sets of conflicting demographic data for what is reported to be the same individual."; + case SUBY: return "Relates a prevailing record of an Entity (scoper) with another record (player) that it subsumes.\r\n\n \n Examples: Show a correct new Person object (scoper) that subsumes one or more duplicate Person objects that had accidentally been created for the same physical person.\r\n\n \n Constraints: Both the player and scoper must have the same classCode."; + case GEN: return "Relates a specialized material concept (player) to its generalization (scoper)."; + case GRIC: return "A special link between pharmaceuticals indicating that the target (scoper) is a generic for the source (player)."; + case INST: return "An individual piece of material (player) instantiating a class of material (scoper)."; + case SUBS: return "An entity that subsumes the identity of another. Used in the context of merging documented entity instances. Both the player and scoper must have the same classCode.\r\n\n The use of this code is deprecated in favor of the term SUBY which is its inverse and is more ontologically correct."; + case _ROLECLASSPARTITIVE: return "An association between two Entities where the playing Entity is considered in some way \"part\" of the scoping Entity, e.g., as a member, component, ingredient, or content. Being \"part\" in the broadest sense of the word can mean anything from being an integral structural component to a mere incidental temporary association of a playing Entity with a (generally larger) scoping Entity."; + case CONT: return "Relates a material as the content (player) to a container (scoper). Unlike ingredients, the content and a container remain separate (not mixed) and the content can be removed from the container. A content is not part of an empty container."; + case EXPAGTCAR: return "An exposure agent carrier is an entity that is capable of conveying an exposure agent from one entity to another. The scoper of the role must be the exposure agent (e.g., pathogen)."; + case EXPVECTOR: return "Description: A vector is a living subject that carries an exposure agent. The vector does not cause the disease itself, but exposes targets to the exposure agent. A mosquito carrying malaria is an example of a vector. The scoper of the role must be the exposure agent (e.g., pathogen)."; + case FOMITE: return "Description: A fomite is a non-living entity that is capable of conveying exposure agent from one entity to another. A doorknob contaminated with a Norovirus is an example of a fomite. Anyone touching the doorknob would be exposed to the virus. The scoper of the role must be the exposure agent (e.g., pathogen)."; + case INGR: return "Relates a component (player) to a mixture (scoper). E.g., Glucose and Water are ingredients of D5W, latex may be an ingredient in a tracheal tube."; + case ACTI: return "Definition: a therapeutically active ingredient (player) in a mixture (scoper), where the mixture is typically a manufactured pharmaceutical. It is unknown if the quantity of such an ingredient is expressed precisely in terms of the playing ingredient substance, or, if it is specified in terms of a closely related substance (active moiety or reference substance)."; + case ACTIB: return "Description: Active ingredient, where the ingredient substance (player) is itself the \"basis of strength\", i.e., where the Role.quantity specifies exactly the quantity of the player substance in the medicine formulation. \r\n\n \n Examples: Lopressor 50 mg actually contains 50 mg of metoprolol succinate, even though the active moiety is metoprolol, but also: Tenormin 50 mg contain 50 mg of atenolol, as free base, i.e., where the active ingredient atenolol is also the active moiety."; + case ACTIM: return "Description: Active ingredient, where not the ingredient substance (player), but itaTMs active moiety is the \"basis of strength\", i.e., where the Role.quantity specifies the quantity of the player substance's active moiety in the medicine formulation.\r\n\n \n Examples: 1 mL of Betopic 5mg/mL eye drops contains 5.6 mg betaxolol hydrochloride equivalent to betaxolol base 5 mg."; + case ACTIR: return "Description: Active ingredient, where not the ingredient substance (player) but another reference substance with the same active moiety, is the \"basis of strength\", i.e., where the Role.quantity specifies the quantity of a reference substance, similar but different from the player substance's in the medicine formulation.\r\n\n \n Examples: Toprol-XL 50 mg contains 47.5 mg of metoprolol succinate equivalent to 50 mg of metoprolol tartrate."; + case ADJV: return "A component (player) added to enhance the action of an active ingredient (scoper) (in the manner of a catalyst) but which has no active effect in and of itself. Such ingredients are significant in defining equivalence of products in a way that inactive ingredients are not."; + case ADTV: return "An ingredient (player) that is added to a base (scoper), that amounts to a minor part of the overall mixture."; + case BASE: return "A base ingredient (player) is what comprises the major part of a mixture (scoper). E.g., Water in most i.v. solutions, or Vaseline in salves. Among all ingredients of a material, there should be only one base. A base substance can, in turn, be a mixture."; + case CNTM: return "An ingredient whose presence is not intended but may not be reasonably avoided given the circumstances of the mixture's nature or origin."; + case IACT: return "An ingredient which is not considered therapeutically active, e.g., colors, flavors, stabilizers, or preservatives, fillers, or structural components added to an active ingredient in order to facilitate administration of the active ingredient but without being considered therapeutically active. An inactive ingredient need not be biologically inert, e.g., might be active as an allergen or might have a pleasant taste, but is not an essential constituent delivering the therapeutic effect."; + case COLR: return "A substance (player) influencing the optical aspect of material (scoper)."; + case FLVR: return "A substance (player) added to a mixture (scoper) to make it taste a certain way. In food the use is obvious, in pharmaceuticals flavors can hide disgusting taste of the active ingredient (important in pediatric treatments)."; + case PRSV: return "A substance (player) added to a mixture (scoper) to prevent microorganisms (fungi, bacteria) to spoil the mixture."; + case STBL: return "A stabilizer (player) added to a mixture (scoper) in order to prevent the molecular disintegration of the main substance."; + case MECH: return "An ingredient (player) of a medication (scoper) that is inseparable from the active ingredients, but has no intended chemical or pharmaceutical effect itself, but which may have some systemic effect on the patient.\r\n\n An example is a collagen matrix used as a base for transplanting skin cells. The collagen matrix can be left permanently in the graft site. Because it is of bovine origin, the patient may exhibit allergies or may have cultural objections to its use."; + case LOCE: return "Relates an entity (player) to a location (scoper) at which it is present in some way. This presence may be limited in time."; + case STOR: return "Relates an entity (player) (e.g. a device) to a location (scoper) at which it is normally found or stored when not used."; + case MBR: return "A role played by an entity that is a member of a group. The group provides the scope for this role.\r\n\n Among other uses, groups as used in insurance (groups of covered individuals) and in scheduling where resources may be grouped for scheduling and logistical purposes."; + case PART: return "Definition: an association between two Entities where the playing Entity (the part) is a component of the whole (scoper) in the sense of an integral structural component, that is distinct from other parts in the same whole, has a distinct function in the whole, and, as an effect, the full integrity of the whole depends (to some degree) on the presence of this part, even though the part may often be separable from the whole.\r\n\n \n Discussion: Part is defined in opposition to (a) ingredient (not separable), (b) content (not a functional component), and (c) member (not functionally distinct from other members)."; + case ACTM: return "The molecule or ion that is responsible for the intended pharmacological action of the drug substance, excluding those appended or associated parts of the molecule that make the molecule an ester, salt (including a salt with hydrogen or coordination bonds), or other noncovalent derivative (such as a complex, chelate, or clathrate).\r\n\n Examples: heparin-sodium and heparin-potassium have the same active moiety, heparin; the active moiety of morphine-hydrochloride is morphine."; + case SPEC: return "A role played by a material entity that is a specimen for an act. It is scoped by the source of the specimen."; + case ALQT: return "A portion (player) of an original or source specimen (scoper) used for testing or transportation."; + case ISLT: return "A microorganism that has been isolated from other microorganisms or a source matrix."; + case CHILD: return "The player of the role is a child of the scoping entity, in a generic sense."; + case CRED: return "A role played by an entity that receives credentials from the scoping entity."; + case NURPRAC: return "nurse practitioner"; + case NURS: return "nurse"; + case PA: return "physician assistant"; + case PHYS: return "physician"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ROL: return "role"; + case _ROLECLASSASSOCIATIVE: return "RoleClassAssociative"; + case _ROLECLASSMUTUALRELATIONSHIP: return "RoleClassMutualRelationship"; + case _ROLECLASSRELATIONSHIPFORMAL: return "RoleClassRelationshipFormal"; + case AFFL: return "affiliate"; + case AGNT: return "agent"; + case ASSIGNED: return "assigned entity"; + case COMPAR: return "commissioning party"; + case SGNOFF: return "signing authority or officer"; + case CON: return "contact"; + case ECON: return "emergency contact"; + case NOK: return "next of kin"; + case GUARD: return "guardian"; + case CIT: return "citizen"; + case COVPTY: return "covered party"; + case CLAIM: return "claimant"; + case NAMED: return "named insured"; + case DEPEN: return "dependent"; + case INDIV: return "individual"; + case SUBSCR: return "subscriber"; + case PROG: return "program eligible"; + case CRINV: return "clinical research investigator"; + case CRSPNSR: return "clinical research sponsor"; + case EMP: return "employee"; + case MIL: return "military person"; + case GUAR: return "guarantor"; + case INVSBJ: return "Investigation Subject"; + case CASEBJ: return "Case Subject"; + case RESBJ: return "research subject"; + case LIC: return "licensed entity"; + case NOT: return "notary public"; + case PROV: return "healthcare provider"; + case PAT: return "patient"; + case PAYEE: return "payee"; + case PAYOR: return "invoice payor"; + case POLHOLD: return "policy holder"; + case QUAL: return "qualified entity"; + case SPNSR: return "coverage sponsor"; + case STD: return "student"; + case UNDWRT: return "underwriter"; + case CAREGIVER: return "caregiver"; + case PRS: return "personal relationship"; + case SELF: return "self"; + case _ROLECLASSPASSIVE: return "RoleClassPassive"; + case ACCESS: return "access"; + case ADJY: return "adjacency"; + case CONC: return "connection"; + case BOND: return "molecular bond"; + case CONY: return "continuity"; + case ADMM: return "Administerable Material"; + case BIRTHPL: return "birthplace"; + case DEATHPLC: return "place of death"; + case DST: return "distributed material"; + case RET: return "retailed material"; + case EXLOC: return "event location"; + case SDLOC: return "service delivery location"; + case DSDLOC: return "dedicated service delivery location"; + case ISDLOC: return "incidental service delivery location"; + case EXPR: return "exposed entity"; + case HLD: return "held entity"; + case HLTHCHRT: return "health chart"; + case IDENT: return "identified entity"; + case MANU: return "manufactured product"; + case THER: return "therapeutic agent"; + case MNT: return "maintained entity"; + case OWN: return "owned entity"; + case RGPR: return "regulated product"; + case TERR: return "territory of authority"; + case USED: return "used entity"; + case WRTE: return "warranted product"; + case _ROLECLASSONTOLOGICAL: return "RoleClassOntological"; + case EQUIV: return "equivalent entity"; + case SAME: return "same"; + case SUBY: return "subsumed by"; + case GEN: return "has generalization"; + case GRIC: return "has generic"; + case INST: return "instance"; + case SUBS: return "subsumer"; + case _ROLECLASSPARTITIVE: return "RoleClassPartitive"; + case CONT: return "content"; + case EXPAGTCAR: return "exposure agent carrier"; + case EXPVECTOR: return "exposure vector"; + case FOMITE: return "fomite"; + case INGR: return "ingredient"; + case ACTI: return "active ingredient"; + case ACTIB: return "active ingredient - basis of strength"; + case ACTIM: return "active ingredient - moiety is basis of strength"; + case ACTIR: return "active ingredient - reference substance is basis of strength"; + case ADJV: return "adjuvant"; + case ADTV: return "additive"; + case BASE: return "base"; + case CNTM: return "contaminant ingredient"; + case IACT: return "inactive ingredient"; + case COLR: return "color additive"; + case FLVR: return "flavor additive"; + case PRSV: return "preservative"; + case STBL: return "stabilizer"; + case MECH: return "mechanical ingredient"; + case LOCE: return "located entity"; + case STOR: return "stored entity"; + case MBR: return "member"; + case PART: return "part"; + case ACTM: return "active moiety"; + case SPEC: return "specimen"; + case ALQT: return "aliquot"; + case ISLT: return "isolate"; + case CHILD: return "child"; + case CRED: return "credentialed entity"; + case NURPRAC: return "nurse practitioner"; + case NURS: return "nurse"; + case PA: return "physician assistant"; + case PHYS: return "physician"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleClassEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleClassEnumFactory.java new file mode 100644 index 00000000000..dce40a5b982 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleClassEnumFactory.java @@ -0,0 +1,502 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RoleClassEnumFactory implements EnumFactory { + + public V3RoleClass fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ROL".equals(codeString)) + return V3RoleClass.ROL; + if ("_RoleClassAssociative".equals(codeString)) + return V3RoleClass._ROLECLASSASSOCIATIVE; + if ("_RoleClassMutualRelationship".equals(codeString)) + return V3RoleClass._ROLECLASSMUTUALRELATIONSHIP; + if ("_RoleClassRelationshipFormal".equals(codeString)) + return V3RoleClass._ROLECLASSRELATIONSHIPFORMAL; + if ("AFFL".equals(codeString)) + return V3RoleClass.AFFL; + if ("AGNT".equals(codeString)) + return V3RoleClass.AGNT; + if ("ASSIGNED".equals(codeString)) + return V3RoleClass.ASSIGNED; + if ("COMPAR".equals(codeString)) + return V3RoleClass.COMPAR; + if ("SGNOFF".equals(codeString)) + return V3RoleClass.SGNOFF; + if ("CON".equals(codeString)) + return V3RoleClass.CON; + if ("ECON".equals(codeString)) + return V3RoleClass.ECON; + if ("NOK".equals(codeString)) + return V3RoleClass.NOK; + if ("GUARD".equals(codeString)) + return V3RoleClass.GUARD; + if ("CIT".equals(codeString)) + return V3RoleClass.CIT; + if ("COVPTY".equals(codeString)) + return V3RoleClass.COVPTY; + if ("CLAIM".equals(codeString)) + return V3RoleClass.CLAIM; + if ("NAMED".equals(codeString)) + return V3RoleClass.NAMED; + if ("DEPEN".equals(codeString)) + return V3RoleClass.DEPEN; + if ("INDIV".equals(codeString)) + return V3RoleClass.INDIV; + if ("SUBSCR".equals(codeString)) + return V3RoleClass.SUBSCR; + if ("PROG".equals(codeString)) + return V3RoleClass.PROG; + if ("CRINV".equals(codeString)) + return V3RoleClass.CRINV; + if ("CRSPNSR".equals(codeString)) + return V3RoleClass.CRSPNSR; + if ("EMP".equals(codeString)) + return V3RoleClass.EMP; + if ("MIL".equals(codeString)) + return V3RoleClass.MIL; + if ("GUAR".equals(codeString)) + return V3RoleClass.GUAR; + if ("INVSBJ".equals(codeString)) + return V3RoleClass.INVSBJ; + if ("CASEBJ".equals(codeString)) + return V3RoleClass.CASEBJ; + if ("RESBJ".equals(codeString)) + return V3RoleClass.RESBJ; + if ("LIC".equals(codeString)) + return V3RoleClass.LIC; + if ("NOT".equals(codeString)) + return V3RoleClass.NOT; + if ("PROV".equals(codeString)) + return V3RoleClass.PROV; + if ("PAT".equals(codeString)) + return V3RoleClass.PAT; + if ("PAYEE".equals(codeString)) + return V3RoleClass.PAYEE; + if ("PAYOR".equals(codeString)) + return V3RoleClass.PAYOR; + if ("POLHOLD".equals(codeString)) + return V3RoleClass.POLHOLD; + if ("QUAL".equals(codeString)) + return V3RoleClass.QUAL; + if ("SPNSR".equals(codeString)) + return V3RoleClass.SPNSR; + if ("STD".equals(codeString)) + return V3RoleClass.STD; + if ("UNDWRT".equals(codeString)) + return V3RoleClass.UNDWRT; + if ("CAREGIVER".equals(codeString)) + return V3RoleClass.CAREGIVER; + if ("PRS".equals(codeString)) + return V3RoleClass.PRS; + if ("SELF".equals(codeString)) + return V3RoleClass.SELF; + if ("_RoleClassPassive".equals(codeString)) + return V3RoleClass._ROLECLASSPASSIVE; + if ("ACCESS".equals(codeString)) + return V3RoleClass.ACCESS; + if ("ADJY".equals(codeString)) + return V3RoleClass.ADJY; + if ("CONC".equals(codeString)) + return V3RoleClass.CONC; + if ("BOND".equals(codeString)) + return V3RoleClass.BOND; + if ("CONY".equals(codeString)) + return V3RoleClass.CONY; + if ("ADMM".equals(codeString)) + return V3RoleClass.ADMM; + if ("BIRTHPL".equals(codeString)) + return V3RoleClass.BIRTHPL; + if ("DEATHPLC".equals(codeString)) + return V3RoleClass.DEATHPLC; + if ("DST".equals(codeString)) + return V3RoleClass.DST; + if ("RET".equals(codeString)) + return V3RoleClass.RET; + if ("EXLOC".equals(codeString)) + return V3RoleClass.EXLOC; + if ("SDLOC".equals(codeString)) + return V3RoleClass.SDLOC; + if ("DSDLOC".equals(codeString)) + return V3RoleClass.DSDLOC; + if ("ISDLOC".equals(codeString)) + return V3RoleClass.ISDLOC; + if ("EXPR".equals(codeString)) + return V3RoleClass.EXPR; + if ("HLD".equals(codeString)) + return V3RoleClass.HLD; + if ("HLTHCHRT".equals(codeString)) + return V3RoleClass.HLTHCHRT; + if ("IDENT".equals(codeString)) + return V3RoleClass.IDENT; + if ("MANU".equals(codeString)) + return V3RoleClass.MANU; + if ("THER".equals(codeString)) + return V3RoleClass.THER; + if ("MNT".equals(codeString)) + return V3RoleClass.MNT; + if ("OWN".equals(codeString)) + return V3RoleClass.OWN; + if ("RGPR".equals(codeString)) + return V3RoleClass.RGPR; + if ("TERR".equals(codeString)) + return V3RoleClass.TERR; + if ("USED".equals(codeString)) + return V3RoleClass.USED; + if ("WRTE".equals(codeString)) + return V3RoleClass.WRTE; + if ("_RoleClassOntological".equals(codeString)) + return V3RoleClass._ROLECLASSONTOLOGICAL; + if ("EQUIV".equals(codeString)) + return V3RoleClass.EQUIV; + if ("SAME".equals(codeString)) + return V3RoleClass.SAME; + if ("SUBY".equals(codeString)) + return V3RoleClass.SUBY; + if ("GEN".equals(codeString)) + return V3RoleClass.GEN; + if ("GRIC".equals(codeString)) + return V3RoleClass.GRIC; + if ("INST".equals(codeString)) + return V3RoleClass.INST; + if ("SUBS".equals(codeString)) + return V3RoleClass.SUBS; + if ("_RoleClassPartitive".equals(codeString)) + return V3RoleClass._ROLECLASSPARTITIVE; + if ("CONT".equals(codeString)) + return V3RoleClass.CONT; + if ("EXPAGTCAR".equals(codeString)) + return V3RoleClass.EXPAGTCAR; + if ("EXPVECTOR".equals(codeString)) + return V3RoleClass.EXPVECTOR; + if ("FOMITE".equals(codeString)) + return V3RoleClass.FOMITE; + if ("INGR".equals(codeString)) + return V3RoleClass.INGR; + if ("ACTI".equals(codeString)) + return V3RoleClass.ACTI; + if ("ACTIB".equals(codeString)) + return V3RoleClass.ACTIB; + if ("ACTIM".equals(codeString)) + return V3RoleClass.ACTIM; + if ("ACTIR".equals(codeString)) + return V3RoleClass.ACTIR; + if ("ADJV".equals(codeString)) + return V3RoleClass.ADJV; + if ("ADTV".equals(codeString)) + return V3RoleClass.ADTV; + if ("BASE".equals(codeString)) + return V3RoleClass.BASE; + if ("CNTM".equals(codeString)) + return V3RoleClass.CNTM; + if ("IACT".equals(codeString)) + return V3RoleClass.IACT; + if ("COLR".equals(codeString)) + return V3RoleClass.COLR; + if ("FLVR".equals(codeString)) + return V3RoleClass.FLVR; + if ("PRSV".equals(codeString)) + return V3RoleClass.PRSV; + if ("STBL".equals(codeString)) + return V3RoleClass.STBL; + if ("MECH".equals(codeString)) + return V3RoleClass.MECH; + if ("LOCE".equals(codeString)) + return V3RoleClass.LOCE; + if ("STOR".equals(codeString)) + return V3RoleClass.STOR; + if ("MBR".equals(codeString)) + return V3RoleClass.MBR; + if ("PART".equals(codeString)) + return V3RoleClass.PART; + if ("ACTM".equals(codeString)) + return V3RoleClass.ACTM; + if ("SPEC".equals(codeString)) + return V3RoleClass.SPEC; + if ("ALQT".equals(codeString)) + return V3RoleClass.ALQT; + if ("ISLT".equals(codeString)) + return V3RoleClass.ISLT; + if ("CHILD".equals(codeString)) + return V3RoleClass.CHILD; + if ("CRED".equals(codeString)) + return V3RoleClass.CRED; + if ("NURPRAC".equals(codeString)) + return V3RoleClass.NURPRAC; + if ("NURS".equals(codeString)) + return V3RoleClass.NURS; + if ("PA".equals(codeString)) + return V3RoleClass.PA; + if ("PHYS".equals(codeString)) + return V3RoleClass.PHYS; + throw new IllegalArgumentException("Unknown V3RoleClass code '"+codeString+"'"); + } + + public String toCode(V3RoleClass code) { + if (code == V3RoleClass.ROL) + return "ROL"; + if (code == V3RoleClass._ROLECLASSASSOCIATIVE) + return "_RoleClassAssociative"; + if (code == V3RoleClass._ROLECLASSMUTUALRELATIONSHIP) + return "_RoleClassMutualRelationship"; + if (code == V3RoleClass._ROLECLASSRELATIONSHIPFORMAL) + return "_RoleClassRelationshipFormal"; + if (code == V3RoleClass.AFFL) + return "AFFL"; + if (code == V3RoleClass.AGNT) + return "AGNT"; + if (code == V3RoleClass.ASSIGNED) + return "ASSIGNED"; + if (code == V3RoleClass.COMPAR) + return "COMPAR"; + if (code == V3RoleClass.SGNOFF) + return "SGNOFF"; + if (code == V3RoleClass.CON) + return "CON"; + if (code == V3RoleClass.ECON) + return "ECON"; + if (code == V3RoleClass.NOK) + return "NOK"; + if (code == V3RoleClass.GUARD) + return "GUARD"; + if (code == V3RoleClass.CIT) + return "CIT"; + if (code == V3RoleClass.COVPTY) + return "COVPTY"; + if (code == V3RoleClass.CLAIM) + return "CLAIM"; + if (code == V3RoleClass.NAMED) + return "NAMED"; + if (code == V3RoleClass.DEPEN) + return "DEPEN"; + if (code == V3RoleClass.INDIV) + return "INDIV"; + if (code == V3RoleClass.SUBSCR) + return "SUBSCR"; + if (code == V3RoleClass.PROG) + return "PROG"; + if (code == V3RoleClass.CRINV) + return "CRINV"; + if (code == V3RoleClass.CRSPNSR) + return "CRSPNSR"; + if (code == V3RoleClass.EMP) + return "EMP"; + if (code == V3RoleClass.MIL) + return "MIL"; + if (code == V3RoleClass.GUAR) + return "GUAR"; + if (code == V3RoleClass.INVSBJ) + return "INVSBJ"; + if (code == V3RoleClass.CASEBJ) + return "CASEBJ"; + if (code == V3RoleClass.RESBJ) + return "RESBJ"; + if (code == V3RoleClass.LIC) + return "LIC"; + if (code == V3RoleClass.NOT) + return "NOT"; + if (code == V3RoleClass.PROV) + return "PROV"; + if (code == V3RoleClass.PAT) + return "PAT"; + if (code == V3RoleClass.PAYEE) + return "PAYEE"; + if (code == V3RoleClass.PAYOR) + return "PAYOR"; + if (code == V3RoleClass.POLHOLD) + return "POLHOLD"; + if (code == V3RoleClass.QUAL) + return "QUAL"; + if (code == V3RoleClass.SPNSR) + return "SPNSR"; + if (code == V3RoleClass.STD) + return "STD"; + if (code == V3RoleClass.UNDWRT) + return "UNDWRT"; + if (code == V3RoleClass.CAREGIVER) + return "CAREGIVER"; + if (code == V3RoleClass.PRS) + return "PRS"; + if (code == V3RoleClass.SELF) + return "SELF"; + if (code == V3RoleClass._ROLECLASSPASSIVE) + return "_RoleClassPassive"; + if (code == V3RoleClass.ACCESS) + return "ACCESS"; + if (code == V3RoleClass.ADJY) + return "ADJY"; + if (code == V3RoleClass.CONC) + return "CONC"; + if (code == V3RoleClass.BOND) + return "BOND"; + if (code == V3RoleClass.CONY) + return "CONY"; + if (code == V3RoleClass.ADMM) + return "ADMM"; + if (code == V3RoleClass.BIRTHPL) + return "BIRTHPL"; + if (code == V3RoleClass.DEATHPLC) + return "DEATHPLC"; + if (code == V3RoleClass.DST) + return "DST"; + if (code == V3RoleClass.RET) + return "RET"; + if (code == V3RoleClass.EXLOC) + return "EXLOC"; + if (code == V3RoleClass.SDLOC) + return "SDLOC"; + if (code == V3RoleClass.DSDLOC) + return "DSDLOC"; + if (code == V3RoleClass.ISDLOC) + return "ISDLOC"; + if (code == V3RoleClass.EXPR) + return "EXPR"; + if (code == V3RoleClass.HLD) + return "HLD"; + if (code == V3RoleClass.HLTHCHRT) + return "HLTHCHRT"; + if (code == V3RoleClass.IDENT) + return "IDENT"; + if (code == V3RoleClass.MANU) + return "MANU"; + if (code == V3RoleClass.THER) + return "THER"; + if (code == V3RoleClass.MNT) + return "MNT"; + if (code == V3RoleClass.OWN) + return "OWN"; + if (code == V3RoleClass.RGPR) + return "RGPR"; + if (code == V3RoleClass.TERR) + return "TERR"; + if (code == V3RoleClass.USED) + return "USED"; + if (code == V3RoleClass.WRTE) + return "WRTE"; + if (code == V3RoleClass._ROLECLASSONTOLOGICAL) + return "_RoleClassOntological"; + if (code == V3RoleClass.EQUIV) + return "EQUIV"; + if (code == V3RoleClass.SAME) + return "SAME"; + if (code == V3RoleClass.SUBY) + return "SUBY"; + if (code == V3RoleClass.GEN) + return "GEN"; + if (code == V3RoleClass.GRIC) + return "GRIC"; + if (code == V3RoleClass.INST) + return "INST"; + if (code == V3RoleClass.SUBS) + return "SUBS"; + if (code == V3RoleClass._ROLECLASSPARTITIVE) + return "_RoleClassPartitive"; + if (code == V3RoleClass.CONT) + return "CONT"; + if (code == V3RoleClass.EXPAGTCAR) + return "EXPAGTCAR"; + if (code == V3RoleClass.EXPVECTOR) + return "EXPVECTOR"; + if (code == V3RoleClass.FOMITE) + return "FOMITE"; + if (code == V3RoleClass.INGR) + return "INGR"; + if (code == V3RoleClass.ACTI) + return "ACTI"; + if (code == V3RoleClass.ACTIB) + return "ACTIB"; + if (code == V3RoleClass.ACTIM) + return "ACTIM"; + if (code == V3RoleClass.ACTIR) + return "ACTIR"; + if (code == V3RoleClass.ADJV) + return "ADJV"; + if (code == V3RoleClass.ADTV) + return "ADTV"; + if (code == V3RoleClass.BASE) + return "BASE"; + if (code == V3RoleClass.CNTM) + return "CNTM"; + if (code == V3RoleClass.IACT) + return "IACT"; + if (code == V3RoleClass.COLR) + return "COLR"; + if (code == V3RoleClass.FLVR) + return "FLVR"; + if (code == V3RoleClass.PRSV) + return "PRSV"; + if (code == V3RoleClass.STBL) + return "STBL"; + if (code == V3RoleClass.MECH) + return "MECH"; + if (code == V3RoleClass.LOCE) + return "LOCE"; + if (code == V3RoleClass.STOR) + return "STOR"; + if (code == V3RoleClass.MBR) + return "MBR"; + if (code == V3RoleClass.PART) + return "PART"; + if (code == V3RoleClass.ACTM) + return "ACTM"; + if (code == V3RoleClass.SPEC) + return "SPEC"; + if (code == V3RoleClass.ALQT) + return "ALQT"; + if (code == V3RoleClass.ISLT) + return "ISLT"; + if (code == V3RoleClass.CHILD) + return "CHILD"; + if (code == V3RoleClass.CRED) + return "CRED"; + if (code == V3RoleClass.NURPRAC) + return "NURPRAC"; + if (code == V3RoleClass.NURS) + return "NURS"; + if (code == V3RoleClass.PA) + return "PA"; + if (code == V3RoleClass.PHYS) + return "PHYS"; + return "?"; + } + + public String toSystem(V3RoleClass code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleCode.java new file mode 100644 index 00000000000..0418f71c351 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleCode.java @@ -0,0 +1,3740 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleCode { + + /** + * Concepts characterizing the type of association formed by player and scoper when there is a recognized Affiliate role by which the two parties are related. + + + Examples: Business Partner, Business Associate, Colleague + */ + _AFFILIATIONROLETYPE, + /** + * Parties that may or should contribute or have contributed to an Act. + */ + _AGENTROLETYPE, + /** + * An entity which corrected, edited, or amended pre-existing information. + */ + AMENDER, + /** + * An individual authorized to assign an original classification to information, including compilations of unclassified information, based on a determination that the information requires protection against unauthorized disclosure. The individual marks the information with immutable, computable, and human readable security labels in accordance with applicable security labeling policies. The labeling policies provide instructions on whether and if so how the security labels may be later reclassified [i.e., upgraded, downgraded, used in derivative classification, or declassified] in a manner that preserves the overridden original classification binding and provenance. + */ + CLASSIFIER, + /** + * An entity or an entity's delegatee who is the grantee in an agreement such as a consent for services, advanced directive, or a privacy consent directive in accordance with jurisdictional, organizational, or patient policy. + */ + CONSENTER, + /** + * An entity which has witnessed and attests to observing another entity being counseled about an agreement such as a consent for services, advanced directive, or a privacy consent directive. + */ + CONSWIT, + /** + * An entity which participates in the generation of and attest to veracity of content, but is not an author or coauthor. For example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report. + */ + COPART, + /** + * An individual which is authorized to declassify information based on a determination that the information no longer requires protection against unauthorized disclosure. The individual marks the information being declassified using computable and human readable security labels indicating that this is copy of previously classified information is unclassified in accordance with applicable security labeling policies. The labeling policies provide instructions on whether and if so how the security labels may be later reclassified [i.e., upgraded or used in derivative classification] in a manner that preserves the overridden original classification binding and provenance. + */ + DECLASSIFIER, + /** + * A party to whom some right or authority is granted by a delegator. + */ + DELEGATEE, + /** + * A party that grants all or some portion its right or authority to another party. + */ + DELEGATOR, + /** + * An individual authorized to lower the classification level of labeled content and provide rationale for doing so as directed by a classification guide. + */ + DOWNGRDER, + /** + * An individual who is only authorized to classify reproduced, extracted, or summarized classified information, or compile classified and unclassified information by applying classification markings derived from source material or as directed by a classification guide. + */ + DRIVCLASSIFIER, + /** + * An entity which accepts certain rights or authority from a grantor. + */ + GRANTEE, + /** + * An entity which agrees to confer certain rights or authority to a grantee. + */ + GRANTOR, + /** + * An entity which converts spoken or written language into the language of key participants in an event such as when a provider is obtaining a patient's consent to treatment or permission to disclose information. + */ + INTPRTER, + /** + * An entity authorized to filter information according to approved criteria. + */ + REVIEWER, + /** + * An entity authorized to validate information for inclusion in a record. + */ + VALIDATOR, + /** + * Description:Codes that indicate a specific type of sponsor. Used when the sponsor's role is only either as a fully insured sponsor or only as a self-insured sponsor. NOTE: Where a sponsor may be either, use the SponsorParticipationFunction.code (fully insured or self insured) to indicate the type of responsibility. (CO6-0057) + */ + _COVERAGESPONSORROLETYPE, + /** + * Description:An employer or organization that contracts with an underwriter to assumes the financial risk and administrative responsibility for coverage of health services for covered parties. + */ + FULLINS, + /** + * Description:An employer or organization that assumes the financial risk and administrative responsibility for coverage of health services for covered parties. + */ + SELFINS, + /** + * Description:PayorRoleType for a particular type of policy or program benefit package or plan where more detail about the coverage administration role of the Payor is required. The functions performed by a Payor qualified by a PayorRoleType may be specified by the PayorParticpationFunction value set. + + + Examples:A Payor that is a TPA may administer a managed care plan without underwriting the risk. + */ + _PAYORROLETYPE, + /** + * Description:A payor that is responsible for functions related to the enrollment of covered parties. + */ + ENROLBKR, + /** + * Description:Third party administrator (TPA) is a payor organization that processes health care claims without carrying insurance risk. Third party administrators are prominent players in the managed care industry and have the expertise and capability to administer all or a portion of the claims process. They are normally contracted by a health insurer or self-insuring companies to administer services, including claims administration, premium collection, enrollment and other administrative activities. + + Self-insured employers often contract with third party administrator to handle their insurance functions. Insurance companies oftentimes outsource the claims, utilization review or membership functions to a TPA. Sometimes TPAs only manage provider networks, only claims or only utilization review. + + While some third-party administrators may operate as units of insurance companies, they are often independent. However, hospitals or provider organizations desiring to set up their own health plans will often outsource certain responsibilities to TPAs. TPAs may perform one or several payor functions, specified by the PayorParticipationFunction value set, such as provider management, enrollment, utilization management, and fee for service claims adjudication management. + */ + TPA, + /** + * Description:A payor that is responsible for review and case management of health services covered under a policy or program. + */ + UMO, + /** + * The role played by a party who has legal responsibility for another party. + */ + RESPRSN, + /** + * The role played by a person acting as the estate executor for a deceased subscriber or policyholder who was the responsible party + */ + EXCEST, + /** + * The role played by a person appointed by the court to look out for the best interests of a minor child during the course of legal proceedings. + */ + GUADLTM, + /** + * The role played by a person or institution legally empowered with responsibility for the care of a ward. + */ + GUARD, + /** + * A relationship between two people in which one person authorizes another to act for him in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts. + */ + POWATT, + /** + * A relationship between two people in which one person authorizes another, usually a family member or relative, to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned. Unlike ordinary powers of attorney, durable powers can survive for long periods of time, and again, unlike standard powers of attorney, durable powers can continue after incompetency. + */ + DPOWATT, + /** + * A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that continues (by its terms) to be effective even though the grantor has become mentally incompetent after signing the document. + */ + HPOWATT, + /** + * A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned. + */ + SPOWATT, + /** + * AssignedRoleType + */ + _ASSIGNEDROLETYPE, + /** + * Description:A role type that is used to further qualify a non-person subject playing a role where the role class attribute is set to RoleClass AssignedEntity + */ + _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE, + /** + * Description:Dogs trained to assist the ill or physically challenged. + */ + ASSIST, + /** + * Description:Animals, including fish and insects, and microorganisms which may participate as assigned entities in biotherapies. + */ + BIOTH, + /** + * Description:Non-person living subject used as antibiotic. + + + Examples:Bacteriophage, is a virus that infects bacteria. + */ + ANTIBIOT, + /** + * Description:Maggots raised for biodebridement. + + + Discussion: Maggot Debridement Therapy is the medical use of live maggots for cleaning non-healing wounds. + + + Examples:Removal of burnt skin. + */ + DEBR, + /** + * Description:Companion animals, such as dogs, cats, and rabbits, which may be provided to patients to improve general mood, decrease depression and loneliness, and distract from stress-inducing concerns to improve quality of life. + */ + CCO, + /** + * Description:Dogs trained to assist persons who are seeing impaired or blind. + */ + SEE, + /** + * Description:Dogs trained or having the ability to detect imminent seizures or cancers in humans, probably as a result of volatile chemical (odors) given off by the malignancy of the host. + */ + SNIFF, + /** + * Defines types of certifications for all entities + */ + _CERTIFIEDENTITYTYPE, + /** + * A role type used to qualify a person's legal status within a country or nation. + */ + _CITIZENROLETYPE, + /** + * A person who has fled his or her home country to find a safe place elsewhere. + */ + CAS, + /** + * A person who is someone of below legal age who has fled his or her home country, without his or her parents, to find a safe place elsewhere at time of categorization. + */ + CASM, + /** + * A person who is legally recognized as a member of a nation or country, with associated rights and obligations. + */ + CN, + /** + * A foreigner who is present in a country (which is foreign to him/her) unlawfully or without the country's authorization (may be called an illegal alien). + */ + CNRP, + /** + * A person who is below legal age present in a country, without his or her parents, (which is foreign to him/her) unlawfully or without the country's authorization. + */ + CNRPM, + /** + * A non-country member admitted to the territory of a nation or country as a non-resident for an explicit purpose. + */ + CPCA, + /** + * A foreigner who is a resident of the country but does not have citizenship. + */ + CRP, + /** + * A person who is a resident below legal age of the country without his or her parents and does not have citizenship. + */ + CRPM, + /** + * Types of contact for Role code "CON" + */ + _CONTACTROLETYPE, + /** + * A contact role used for business and/or administrative purposes. + */ + _ADMINISTRATIVECONTACTROLETYPE, + /** + * A contact role used to identify a person within a Provider organization that can be contacted for billing purposes (e.g. about the content of the Invoice). + */ + BILL, + /** + * A contact for an organization for administrative purposes. Contact role specifies a person acting as a liason for the organization. + + Example: HR Department representative. + */ + ORG, + /** + * A contact role used to identify a person within a Payor organization to whom this communication is addressed. + */ + PAYOR, + /** + * A contact designated for contact in emergent situations. + */ + ECON, + /** + * Played by an individual who is designated as the next of kin for another individual which scopes the role. + */ + NOK, + /** + * Definition: A code representing the type of identifier that has been assigned to the identified entity (IDENT). + + + Examples: Example values include Social Insurance Number, Product Catalog ID, Product Model Number. + */ + _IDENTIFIEDENTITYTYPE, + /** + * Description:Describes types of identifiers other than the primary location registry identifier for a service delivery location. Identifiers may be assigned by a local service delivery organization, a formal body capable of accrediting the location for the capability to provide specific services or the identifier may be assigned at a jurisdictional level. + */ + _LOCATIONIDENTIFIEDENTITYROLECODE, + /** + * Description:Identifier assigned to a location by the organization responsible for accrediting the location. + */ + ACHFID, + /** + * Description:Identifier assigned to a location by a jurisdiction. + */ + JURID, + /** + * Description:Identifier assigned to a location by a local party (which could be the facility itself or organization overseeing a group of facilities). + */ + LOCHFID, + /** + * Code indicating the primary use for which a living subject is bred or grown + */ + _LIVINGSUBJECTPRODUCTIONCLASS, + /** + * Cattle used for meat production + */ + BF, + /** + * Chickens raised for meat + */ + BL, + /** + * Breeding/genetic stock + */ + BR, + /** + * Companion animals + */ + CO, + /** + * Milk production + */ + DA, + /** + * Draft animals + */ + DR, + /** + * Dual purpose. Defined purposes based on species and breed + */ + DU, + /** + * Animals raised for their fur, hair or skins + */ + FI, + /** + * Chickens raised for egg production + */ + LY, + /** + * Animals raised for meat production + */ + MT, + /** + * Poultry flocks used for chick/poult production + */ + MU, + /** + * Animals rasied for recreation + */ + PL, + /** + * Animals raised for racing perfomance + */ + RC, + /** + * Animals raised for shows + */ + SH, + /** + * Cattle raised for veal meat production. Implicit is the husbandry method. + */ + VL, + /** + * Sheep, goats and other mammals raised for their fiber + */ + WL, + /** + * Animals used to perform work + */ + WO, + /** + * Identifies the specific hierarchical relationship between the playing and scoping medications. + + + Examples: Generic, Generic Formulation, Therapeutic Class, etc. + */ + _MEDICATIONGENERALIZATIONROLETYPE, + /** + * Description:A categorization of medicinal products by their therapeutic properties and/or main therapeutic use. + */ + DC, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients independent of strength, and form. + + The scoping entity identifies a unique combination of medicine ingredients; sometimes referred to as "ingredient set". + */ + GD, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients and dose form, independent of strength of the ingredients. The scoping entity identifies a unique combination of medicine ingredients in a specific dose form. + */ + GDF, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of is ingredients with their strength. The scoping entity identifies a unique combination of medicine ingredients with their strength. + */ + GDS, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form. + */ + GDSF, + /** + * Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form. + */ + MGDSF, + /** + * Types of membership for Role code "MBR" + */ + _MEMBERROLETYPE, + /** + * A person who is a member of a tribe. + */ + TRB, + /** + * PersonalRelationshipRoleType + */ + _PERSONALRELATIONSHIPROLETYPE, + /** + * A relationship between two people characterizing their "familial" relationship + */ + FAMMEMB, + /** + * The player of the role is a child of the scoping entity. + */ + CHILD, + /** + * The player of the role is a child taken into a family through legal means and raised by the scoping person (parent) as his or her own child. + */ + CHLDADOPT, + /** + * The player of the role is a female child taken into a family through legal means and raised by the scoping person (parent) as his or her own child. + */ + DAUADOPT, + /** + * The player of the role is a male child taken into a family through legal means and raised by the scoping person (parent) as his or her own child. + */ + SONADOPT, + /** + * The player of the role is a child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties. + */ + CHLDFOST, + /** + * The player of the role is a female child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties. + */ + DAUFOST, + /** + * The player of the role is a male child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties. + */ + SONFOST, + /** + * Description: The player of the role is a female child (of any type) of scoping entity (parent) + */ + DAUC, + /** + * The player of the role is a female offspring of the scoping entity (parent). + */ + DAU, + /** + * The player of the role is a daughter of the scoping person's spouse by a previous union. + */ + STPDAU, + /** + * The player of the role is an offspring of the scoping entity as determined by birth. + */ + NCHILD, + /** + * The player of the role is a male offspring of the scoping entity (parent). + */ + SON, + /** + * Description: The player of the role is a male child (of any type) of scoping entity (parent) + */ + SONC, + /** + * The player of the role is a son of the scoping person's spouse by a previous union. + */ + STPSON, + /** + * The player of the role is a child of the scoping person's spouse by a previous union. + */ + STPCHLD, + /** + * Description: A family member not having an immediate genetic or legal relationship e.g. Aunt, cousin, great grandparent, grandchild, grandparent, niece, nephew or uncle. + */ + EXT, + /** + * The player of the role is a sister of the scoping person's mother or father. + */ + AUNT, + /** + * Description:The player of the role is a biological sister of the scoping person's biological mother. + */ + MAUNT, + /** + * Description:The player of the role is a biological sister of the scoping person's biological father. + */ + PAUNT, + /** + * The player of the role is a relative of the scoping person descended from a common ancestor, such as a grandparent, by two or more steps in a diverging line. + */ + COUSN, + /** + * Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's mother's side, such as a grandparent, by two or more steps in a diverging line. + */ + MCOUSN, + /** + * Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's father's side, such as a grandparent, by two or more steps in a diverging line. + */ + PCOUSN, + /** + * The player of the role is a parent of the scoping person's grandparent. + */ + GGRPRN, + /** + * The player of the role is the father of the scoping person's grandparent. + */ + GGRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological mother's parent. + */ + MGGRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological father's parent. + */ + PGGRFTH, + /** + * The player of the role is the mother of the scoping person's grandparent. + */ + GGRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological mother's parent. + */ + MGGRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological father's parent. + */ + PGGRMTH, + /** + * Description:The player of the role is a biological parent of the scoping person's biological mother's parent. + */ + MGGRPRN, + /** + * Description:The player of the role is a biological parent of the scoping person's biological father's parent. + */ + PGGRPRN, + /** + * The player of the role is a child of the scoping person's son or daughter. + */ + GRNDCHILD, + /** + * The player of the role is a daughter of the scoping person's son or daughter. + */ + GRNDDAU, + /** + * The player of the role is a son of the scoping person's son or daughter. + */ + GRNDSON, + /** + * The player of the role is a parent of the scoping person's mother or father. + */ + GRPRN, + /** + * The player of the role is the father of the scoping person's mother or father. + */ + GRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological mother. + */ + MGRFTH, + /** + * Description:The player of the role is the biological father of the scoping person's biological father. + */ + PGRFTH, + /** + * The player of the role is the mother of the scoping person's mother or father. + */ + GRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological mother. + */ + MGRMTH, + /** + * Description:The player of the role is the biological mother of the scoping person's biological father. + */ + PGRMTH, + /** + * Description:The player of the role is the biological parent of the scoping person's biological mother. + */ + MGRPRN, + /** + * Description:The player of the role is the biological parent of the scoping person's biological father. + */ + PGRPRN, + /** + * A relationship between an individual and a member of their spousal partner's immediate family. + */ + INLAW, + /** + * The player of the role is the spouse of scoping person's child. + */ + CHLDINLAW, + /** + * The player of the role is the wife of scoping person's son. + */ + DAUINLAW, + /** + * The player of the role is the husband of scoping person's daughter. + */ + SONINLAW, + /** + * The player of the role is the parent of scoping person's husband or wife. + */ + PRNINLAW, + /** + * The player of the role is the father of the scoping person's husband or wife. + */ + FTHINLAW, + /** + * The player of the role is the mother of the scoping person's husband or wife. + */ + MTHINLAW, + /** + * The player of the role is: (1) a sibling of the scoping person's spouse, or (2) the spouse of the scoping person's sibling, or (3) the spouse of a sibling of the scoping person's spouse. + */ + SIBINLAW, + /** + * The player of the role is: (1) a brother of the scoping person's spouse, or (2) the husband of the scoping person's sister, or (3) the husband of a sister of the scoping person's spouse. + */ + BROINLAW, + /** + * The player of the role is: (1) a sister of the scoping person's spouse, or (2) the wife of the scoping person's brother, or (3) the wife of a brother of the scoping person's spouse. + */ + SISINLAW, + /** + * The player of the role is a child of scoping person's brother or sister or of the brother or sister of the scoping person's spouse. + */ + NIENEPH, + /** + * The player of the role is a son of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse. + */ + NEPHEW, + /** + * The player of the role is a daughter of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse. + */ + NIECE, + /** + * The player of the role is a brother of the scoping person's mother or father. + */ + UNCLE, + /** + * Description:The player of the role is a biological brother of the scoping person's biological mother. + */ + MUNCLE, + /** + * Description:The player of the role is a biological brother of the scoping person's biological father. + */ + PUNCLE, + /** + * The player of the role is one who begets, gives birth to, or nurtures and raises the scoping entity (child). + */ + PRN, + /** + * The player of the role (parent) has taken the scoper (child) into their family through legal means and raises them as his or her own child. + */ + ADOPTP, + /** + * The player of the role (father) is a male who has taken the scoper (child) into their family through legal means and raises them as his own child. + */ + ADOPTF, + /** + * The player of the role (father) is a female who has taken the scoper (child) into their family through legal means and raises them as her own child. + */ + ADOPTM, + /** + * The player of the role is a male who begets or raises or nurtures the scoping entity (child). + */ + FTH, + /** + * The player of the role (parent) who is a male state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary. + + The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child. + */ + FTHFOST, + /** + * The player of the role is a male who begets the scoping entity (child). + */ + NFTH, + /** + * Indicates the biologic male parent of a fetus. + */ + NFTHF, + /** + * The player of the role is the husband of scoping person's mother and not the scoping person's natural father. + */ + STPFTH, + /** + * The player of the role is a female who conceives, gives birth to, or raises and nurtures the scoping entity (child). + */ + MTH, + /** + * The player is a female whose womb carries the fetus of the scoper. Generally used when the gestational mother and natural mother are not the same. + */ + GESTM, + /** + * The player of the role (parent) who is a female state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary. + + The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child. + */ + MTHFOST, + /** + * The player of the role is a female who conceives or gives birth to the scoping entity (child). + */ + NMTH, + /** + * The player is the biologic female parent of the scoping fetus. + */ + NMTHF, + /** + * The player of the role is the wife of scoping person's father and not the scoping person's natural mother. + */ + STPMTH, + /** + * natural parent + */ + NPRN, + /** + * The player of the role (parent) who is a state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary. + + The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child. + */ + PRNFOST, + /** + * The player of the role is the spouse of the scoping person's parent and not the scoping person's natural parent. + */ + STPPRN, + /** + * The player of the role shares one or both parents in common with the scoping entity. + */ + SIB, + /** + * The player of the role is a male sharing one or both parents in common with the scoping entity. + */ + BRO, + /** + * The player of the role is a male related to the scoping entity by sharing only one biological parent. + */ + HBRO, + /** + * The player of the role is a male having the same biological parents as the scoping entity. + */ + NBRO, + /** + * The scoper was carried in the same womb as the male player and shares common biological parents. + */ + TWINBRO, + /** + * The scoper was carried in the same womb as the male player and shares common biological parents but is the product of a distinct egg/sperm pair. + */ + FTWINBRO, + /** + * The male scoper is an offspring of the same egg-sperm pair as the male player. + */ + ITWINBRO, + /** + * The player of the role is a son of the scoping person's stepparent. + */ + STPBRO, + /** + * The player of the role is related to the scoping entity by sharing only one biological parent. + */ + HSIB, + /** + * The player of the role is a female related to the scoping entity by sharing only one biological parent. + */ + HSIS, + /** + * The player of the role has both biological parents in common with the scoping entity. + */ + NSIB, + /** + * The player of the role is a female having the same biological parents as the scoping entity. + */ + NSIS, + /** + * The scoper was carried in the same womb as the female player and shares common biological parents. + */ + TWINSIS, + /** + * The scoper was carried in the same womb as the female player and shares common biological parents but is the product of a distinct egg/sperm pair. + */ + FTWINSIS, + /** + * The female scoper is an offspring of the same egg-sperm pair as the female player. + */ + ITWINSIS, + /** + * The scoper and player were carried in the same womb and shared common biological parents. + */ + TWIN, + /** + * The scoper and player were carried in the same womb and share common biological parents but are the product of distinct egg/sperm pairs. + */ + FTWIN, + /** + * The scoper and player are offspring of the same egg-sperm pair. + */ + ITWIN, + /** + * The player of the role is a female sharing one or both parents in common with the scoping entity. + */ + SIS, + /** + * The player of the role is a daughter of the scoping person's stepparent. + */ + STPSIS, + /** + * The player of the role is a child of the scoping person's stepparent. + */ + STPSIB, + /** + * A person who is important to one's well being; especially a spouse or one in a similar relationship. (The player is the one who is important) + */ + SIGOTHR, + /** + * The player of the role cohabits with the scoping person but is not the scoping person's spouse. + */ + DOMPART, + /** + * Player of the role was previously joined to the scoping person in marriage and this marriage is now dissolved and inactive. + + + Usage Note: This is significant to indicate as some jurisdictions have different legal requirements for former spouse to access the patient's record, from a general friend. + */ + FMRSPS, + /** + * The player of the role is a marriage partner of the scoping person. + */ + SPS, + /** + * The player of the role is a man joined to a woman (scoping person) in marriage. + */ + HUSB, + /** + * The player of the role is a woman joined to a man (scoping person) in marriage. + */ + WIFE, + /** + * The player of the role is a person who is known, liked, and trusted by the scoping person. + */ + FRND, + /** + * The player of the role lives near or next to the scoping person. + */ + NBOR, + /** + * The relationship that a person has with his or her self. + */ + ONESELF, + /** + * One who shares living quarters with the subject. + */ + ROOM, + /** + * Description: A role recognized through the eligibility of an identified party for benefits covered under an insurance policy or a program based on meeting eligibility criteria. + + Eligibility as a covered party may be conditioned on the party meeting criteria to qualify for coverage under a policy or program, which may be mandated by law. These criteria may be: + + + + The sole basis for coverage, e.g., being differently abled may qualify a person for disability coverage + + + + May more fully qualify a covered party role e.g, being differently abled may qualify an adult child as a dependent + + + + May impact the level of coverage for a covered party under a policy or program, e.g., being differently abled may qualify a program eligible for additional benefits. + + + + + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g., the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead. + + In summary, the coded concepts in the Abstract Value Set "CoveredPartyRoleType" can be "post-coordinated" with the "RoleClassCoveredParty" Abstract Value Set. Decoupling these concepts is intended to support an expansive range of covered party concepts and their semantic comparability. + */ + _POLICYORPROGRAMCOVERAGEROLETYPE, + /** + * Role recognized through the issuance of insurance coverage to an identified covered party who has this relationship with the policy holder such as the policy holder themselves (self), spouse, child, etc + */ + _COVERAGEROLETYPE, + /** + * The player of the role is dependent of the scoping entity. + */ + FAMDEP, + /** + * Covered party is a dependent of the policy holder with a physical or mental disability causing a disadvantage that makes independent achievement unusually difficult. + */ + HANDIC, + /** + * Covered party is an injured party with a legal claim for compensation against a policy holder under an insurance policy. + */ + INJ, + /** + * Covered party is the policy holder. Also known as the subscriber. + */ + SELF, + /** + * Covered party is an individual that the policy holder has assumed responsibility for, such as foster child or legal ward. + */ + SPON, + /** + * Covered party to an insurance policy has coverage through full-time or part-time attendance at a recognized educational institution as defined by a particular insurance policy. + */ + STUD, + /** + * Covered party to an insurance policy has coverage through full-time attendance at a recognized educational institution as defined by a particular insurance policy. + */ + FSTUD, + /** + * Covered party to an insurance policy has coverage through part-time attendance at a recognized educational institution as defined by a particular insurance policy. + */ + PSTUD, + /** + * A child taken into one's family through legal means and raised as one's own child. + */ + ADOPT, + /** + * A child of one's son or daughter. + */ + GCHILD, + /** + * parent of a parent of the subject. + */ + GPARNT, + /** + * A child as determined by birth. + */ + NAT, + /** + * A child of one's brother or sister or of the brother or sister of one's spouse. + */ + NIENE, + /** + * One that begets or brings forth offspring or a person who brings up and cares for for another (Webster's Collegiate Dictionary) + */ + PARNT, + /** + * A marriage partner; a husband or wife. + */ + SPSE, + /** + * A child receiving parental care and nurture from a person who is related to them through marriage to their parent. + */ + STEP, + /** + * A role recognized through the eligibility of an identified living subject for benefits covered under an insurance policy or a program. Eligibility as a covered party may be conditioned on a relationship with (1) the policy holder such as the policy holder who is covered as an individual under a poliy or as a party sponsored for coverage by the policy holder. + + + Example:An employee as a subscriber; or (2) on being scoped another covered party such as the subscriber, as in the case of a dependent. + + + Discussion: The Abstract Value Set "CoverageRoleType", which was developed for use in the Canadian realm "pre-coordinate" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., "handicapped dependent". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be "post-coordinated" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts. + */ + _COVEREDPARTYROLETYPE, + /** + * DescriptionA role recognized through the eligibility of a party play a claimant for benefits covered or provided under an insurance policy. + */ + _CLAIMANTCOVEREDPARTYROLETYPE, + /** + * Description: A person playing the role of program eligible under a program based on allegations of being the victim of a crime. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is "program eligible" and the person's status as a crime victim meets jurisdictional or program criteria. + */ + CRIMEVIC, + /** + * Description: A person playing the role of program eligible under a workers compensation program based on the filing of work-related injury claim. + + + Discussion: This CoveredPartyRoleType.code is used when the CoveredPartyRole class code is either "program eligible", a "named insured", and "individual insured", or "dependent", and the person's status as differently abled or "handicapped" meets jurisdictional, policy, or program criteria. + */ + INJWKR, + /** + * Description: A role recognized through the eligibility of a party to play a dependent for benefits covered or provided under a health insurance policy because of an association with the subscriber that is recognized by the policy underwriter. + */ + _DEPENDENTCOVEREDPARTYROLETYPE, + /** + * Description: A person playing the role of an individual insured with continuity of coverage under a policy which is being terminated based on loss of original status that was the basis for coverage. Criteria for qualifying for continuity of coverage may be set by law. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a continuity of coverage beneficiary meets jurisdictional or policy criteria. + */ + COCBEN, + /** + * Description: A person playing the role of program eligible under a program based on meeting criteria for health or functional limitation set by law or by the program. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible", "named insured", "individual insured", or "dependent", and the person's status as differently abled meets jurisdictional, policy, or program criteria. + */ + DIFFABL, + /** + * Description: A person, who is a minor or is deemed incompetent, who plays the role of a program eligible where eligibility for coverage is based on meeting program eligibility criteria for status as a ward of a court or jurisdiction. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a "claimant", "program eligible", a "named insured", an "individual Insured" or a "dependent", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g., if the ward is suffering from neglect or abuse, or has been in trouble with the law. + */ + WARD, + /** + * A role recognized through the eligibility of a party to play an individual insured for benefits covered or provided under an insurance policy where the party is also the policy holder. + */ + _INDIVIDUALINSUREDPARTYROLETYPE, + /** + * Description: A person playing the role of an individual insured under a policy based on meeting criteria for the employment status of retired set by law or the policy. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a retiree meets jurisdictional or policy criteria. + */ + RETIREE, + /** + * Description:A role recognized through the eligibility of a party to play a program eligible for benefits covered or provided under a program. + */ + _PROGRAMELIGIBLEPARTYROLETYPE, + /** + * Description: A person playing the role of program eligible under a program based on aboriginal ancestry or as a member of an aboriginal community. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is "program eligible" and the person's status as a member of an indigenous people meets jurisdictional or program criteria. + */ + INDIG, + /** + * Definition: A person playing the role of program eligible under a program based on military status. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the person's status as a member of the military meets jurisdictional or program criteria + */ + MIL, + /** + * Description: A person playing the role of program eligible under a program based on active military status. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the persons status as active duty military meets jurisdictional or program criteria. + */ + ACTMIL, + /** + * Description: A person playing the role of program eligible under a program based on retired military status. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the persons status as retired military meets jurisdictional or program criteria. + */ + RETMIL, + /** + * Description: A person playing the role of program eligible under a program based on status as a military veteran. + + + Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either "program eligible" or "subscriber" and the persons status as a veteran meets jurisdictional or program criteria. + */ + VET, + /** + * Description: A role recognized through the eligibility of a party to play a subscriber for benefits covered or provided under a health insurance policy. + */ + _SUBSCRIBERCOVEREDPARTYROLETYPE, + /** + * Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established. Examples: screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the active treatment portion of the design. + */ + _RESEARCHSUBJECTROLEBASIS, + /** + * Definition:The specific role being played by a research subject participating in the active treatment or primary data collection portion of a research study. + */ + ERL, + /** + * Definition:The specific role being played by a research subject participating in the pre-enrollment evaluation portion of a research study. + */ + SCN, + /** + * A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered. + */ + _SERVICEDELIVERYLOCATIONROLETYPE, + /** + * A role of a place that further classifies a setting that is intended to house the provision of services. + */ + _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE, + /** + * A role of a place that further classifies the clinical setting (e.g., cardiology clinic, primary care clinic, rehabilitation hospital, skilled nursing facility) in which care is delivered during an encounter. + */ + _DEDICATEDCLINICALLOCATIONROLETYPE, + /** + * A practice setting where diagnostic procedures or therapeutic interventions are performed + */ + DX, + /** + * A practice setting where cardiovascular diagnostic procedures or therapeutic interventions are performed (e.g., cardiac catheterization lab, echocardiography suite) + */ + CVDX, + /** + * Cardiac catheterization lab + */ + CATH, + /** + * Echocardiography lab + */ + ECHO, + /** + * A practice setting where GI procedures (such as endoscopies) are performed + */ + GIDX, + /** + * (X12N 261QD0000N) + */ + ENDOS, + /** + * A practice setting where radiology services (diagnostic or therapeutic) are provided (X12N 261QR0200N) + */ + RADDX, + /** + * (X12N 261QX0203N) + */ + RADO, + /** + * Neuroradiology unit + */ + RNEU, + /** + * An acute care institution that provides medical, surgical, or psychiatric care and treatment for the sick or the injured. + */ + HOSP, + /** + * (1) A hospital including a physical plant and personnel that provides multidisciplinary diagnosis and treatment for diseases that have one or more of the following characteristics: is permanent; leaves residual disability; is caused by nonreversible pathological alteration; requires special training of the patient for rehabilitation; and/or may be expected to require a long period of supervision or care. In addition, patients require the safety, security, and shelter of these specialized inpatient or partial hospitalization settings. (2) A hospital that provides medical and skilled nursing services to patients with long-term illnesses who are not in an acute phase but who require an intensity of services not available in nursing homes + */ + CHR, + /** + * (X12N 282N00000N) + */ + GACH, + /** + * A health care facility operated by the Department of Defense or other military operation. + */ + MHSP, + /** + * Healthcare facility that cares for patients with psychiatric illness(s). + */ + PSYCHF, + /** + * (X12N 283X00000N) + */ + RH, + /** + * Description: A location that plays the role of delivering services which may include life training and/or social support to people with addictions. + */ + RHAT, + /** + * Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with intellectual and/or pervasive development disorders such as autism or severe behaviour disorder. + */ + RHII, + /** + * Description: A location that plays the role of delivering services which may social support services for adolescents who are pregnant or have child and are experiencing adaptation issues/difficulties in their current or eventual parenting role. + */ + RHMAD, + /** + * Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with physical impairments. + */ + RHPI, + /** + * Description: A location that plays the role of delivering services for people with hearing impairments. + */ + RHPIH, + /** + * Description: A location that plays the role of delivering services for people with motor skill impairments. + */ + RHPIMS, + /** + * Description: A location that plays the role of delivering services for people with visual skill impairments. + */ + RHPIVS, + /** + * Description: A location that plays the role of delivering services which may include life training and/or social support services for the adaption, rehabilitation and social integration of youths with adjustment difficulties. + */ + RHYAD, + /** + * Hospital unit + */ + HU, + /** + * Bone marrow transplant unit + */ + BMTU, + /** + * Coronary care unit + */ + CCU, + /** + * A specialty unit in hospital that focuses on chronic respirator patients and pulmonary failure + */ + CHEST, + /** + * Epilepsy unit + */ + EPIL, + /** + * The section of a health care facility for providing rapid treatment to victims of sudden illness or trauma. + */ + ER, + /** + * Emergency trauma unit + */ + ETU, + /** + * Hemodialysis unit + */ + HD, + /** + * Description: A location that plays the role of delivering services which may include tests done based on clinical specimens to get health information about a patient as pertaining to the diagnosis, treatment and prevention of disease. Hospital laboratories may be further divided into specialized units such as Anatomic Pathology, Microbiology, and Biochemistry. + */ + HLAB, + /** + * Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for a hospital visit longer than one day. + */ + INLAB, + /** + * Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for same day visits. + */ + OUTLAB, + /** + * Description: A location that plays the role of delivering services which may include the branch of medicine that uses ionizing and non-ionizing radiation to diagnose and treat diseases. The radiology unit may be further divided into subspecialties such as Imaging, Cardiovascular, Thoracic, and Ultrasound. + */ + HRAD, + /** + * Description: A location that plays the role of delivering services which may include collecting specimens and/or samples from patients for laboratory testing purposes, but does not perform any tests or analysis functions. + */ + HUSCS, + /** + * Intensive care unit + */ + ICU, + /** + * Pediatric intensive care unit + */ + PEDICU, + /** + * Pediatric neonatal intensive care unit + */ + PEDNICU, + /** + * Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for visits longer than one day. The distinction between inpatient pharmacies and retail (or outpatient) pharmacies is that they are part of a patient's continuity of care while staying in the hospital. + */ + INPHARM, + /** + * Description: A location that plays the role of delivering services which include biochemistry, hematology, microbiology, immunochemistry, and toxicology. + */ + MBL, + /** + * Neurology critical care and stroke unit + */ + NCCS, + /** + * Neurosurgery unit + */ + NS, + /** + * Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for outpatient visits and may also be used for discharge prescriptions. + */ + OUTPHARM, + /** + * Pediatric unit + */ + PEDU, + /** + * (X12N 273R00000N) + */ + PHU, + /** + * Rehabilitation hospital unit + */ + RHU, + /** + * (X12N 261QA1200N) + */ + SLEEP, + /** + * Nursing or custodial care facility + */ + NCCF, + /** + * (X12N 314000000N) + */ + SNF, + /** + * Outpatient facility + */ + OF, + /** + * Allergy clinic + */ + ALL, + /** + * Amputee clinic + */ + AMPUT, + /** + * Bone marrow transplant clinic + */ + BMTC, + /** + * Breast clinic + */ + BREAST, + /** + * Child and adolescent neurology clinic + */ + CANC, + /** + * Child and adolescent psychiatry clinic + */ + CAPC, + /** + * Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities + */ + CARD, + /** + * Pediatric cardiology clinic + */ + PEDCARD, + /** + * Coagulation clinic + */ + COAG, + /** + * Colon and rectal surgery clinic + */ + CRS, + /** + * Dermatology clinic + */ + DERM, + /** + * Endocrinology clinic + */ + ENDO, + /** + * Pediatric endocrinology clinic + */ + PEDE, + /** + * Otorhinolaryngology clinic + */ + ENT, + /** + * Family medicine clinic + */ + FMC, + /** + * Gastroenterology clinic + */ + GI, + /** + * Pediatric gastroenterology clinic + */ + PEDGI, + /** + * General internal medicine clinic + */ + GIM, + /** + * Gynecology clinic + */ + GYN, + /** + * Hematology clinic + */ + HEM, + /** + * Pediatric hematology clinic + */ + PEDHEM, + /** + * Hypertension clinic + */ + HTN, + /** + * Focuses on assessing disability + */ + IEC, + /** + * Infectious disease clinic + */ + INFD, + /** + * Pediatric infectious disease clinic + */ + PEDID, + /** + * Infertility clinic + */ + INV, + /** + * Lympedema clinic + */ + LYMPH, + /** + * Medical genetics clinic + */ + MGEN, + /** + * Nephrology clinic + */ + NEPH, + /** + * Pediatric nephrology clinic + */ + PEDNEPH, + /** + * Neurology clinic + */ + NEUR, + /** + * Obstetrics clinic + */ + OB, + /** + * Oral and maxillofacial surgery clinic + */ + OMS, + /** + * Medical oncology clinic + */ + ONCL, + /** + * Pediatric oncology clinic + */ + PEDHO, + /** + * Opthalmology clinic + */ + OPH, + /** + * Description: A location that plays the role of delivering services which may include examination, diagnosis, treatment, management, and prevention of diseases and disorders of the eye as well as prescribing and fitting appropriate corrective lenses (glasses or contact lenses) as needed. Optometry clinics may also provide tests for visual field screening, measuring intra-ocular pressure and ophthalmoscopy, as and when required. + */ + OPTC, + /** + * Orthopedics clinic + */ + ORTHO, + /** + * Hand clinic + */ + HAND, + /** + * (X12N 261QP3300N) + */ + PAINCL, + /** + * (X12N 261QP2300N) + */ + PC, + /** + * Pediatrics clinic + */ + PEDC, + /** + * Pediatric rheumatology clinic + */ + PEDRHEUM, + /** + * (X12N 261QP1100N) + */ + POD, + /** + * Preventive medicine clinic + */ + PREV, + /** + * Proctology clinic + */ + PROCTO, + /** + * Location where healthcare service was delivered, identified as the healthcare provider's practice office. + */ + PROFF, + /** + * Prosthodontics clinic + */ + PROS, + /** + * Psychology clinic + */ + PSI, + /** + * Psychiatry clinic + */ + PSY, + /** + * Rheumatology clinic + */ + RHEUM, + /** + * Sports medicine clinic + */ + SPMED, + /** + * Surgery clinic + */ + SU, + /** + * Plastic surgery clinic + */ + PLS, + /** + * Urology clinic + */ + URO, + /** + * Transplant clinic + */ + TR, + /** + * Travel and geographic medicine clinic + */ + TRAVEL, + /** + * Wound clinic + */ + WND, + /** + * Residential treatment facility + */ + RTF, + /** + * Pain rehabilitation center + */ + PRC, + /** + * (X12N 324500000N) + */ + SURF, + /** + * A role of a place that further classifies a setting that is intended to house the provision of non-clinical services. + */ + _DEDICATEDNONCLINICALLOCATIONROLETYPE, + /** + * Location address where medical supplies were transported to for use. + */ + DADDR, + /** + * Location (mobile) where healthcare service was delivered. + */ + MOBL, + /** + * Location (mobile) where healthcare service was delivered, identified specifically as an ambulance. + */ + AMB, + /** + * Location where healthcare service was delivered, identified as a pharmacy. + */ + PHARM, + /** + * IncidentalServiceDeliveryLocationRoleType + */ + _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE, + /** + * Location of an accident where healthcare service was delivered, such as a roadside. + */ + ACC, + /** + * Community location where healthcare is delivered. + */ + COMM, + /** + * Description: A location that plays the role of delivering services which may include providing front-line services to the population of a defined geographic area such as: healthcare services and social services, preventive or curative, rehabilitation or reintegration. + */ + CSC, + /** + * location where healthcare was delivered which is the residence of the Patient. + */ + PTRES, + /** + * Location where healthcare service was delivered, identified as a school or educational facility. + */ + SCHOOL, + /** + * Description: A location that plays the role of delivering services which may include: social emergency services required for a young person as required under any jurisdictional youth laws, child placement, and family mediation in the defined geographical area the SDL is responsible for. It may provide expertise in a judiciary setting on child custody, adoption and biological history research. + */ + UPC, + /** + * Location where healthcare service was delivered, identified as a work place. + */ + WORK, + /** + * SpecimenRoleType + */ + _SPECIMENROLETYPE, + /** + * A specimen used for initial calibration settings of an instrument + */ + C, + /** + * A set of patient samples in which the individuals of the group may or may not be identified. + */ + G, + /** + * Aliquots of individual specimens combined to form a single specimen representing all of the included individuals. + */ + L, + /** + * A specimen that has been collected from a patient. + */ + P, + /** + * A specimen specifically used to verify the sensitivity, specificity, accuracy or other perfomance parameter of a diagnostic test. + */ + Q, + /** + * Quality Control specimen submitted to the lab whose identity and composition is not known to the lab. + */ + B, + /** + * An electronically simulated QC specimen + */ + E, + /** + * Specimen used for testing proficiency of an organization performing testing (how does this differ from O?) + */ + F, + /** + * A specimen used for evaluation of operator proficiency (operator in what context?) + */ + O, + /** + * A specimen used for periodic calibration checks of instruments + */ + V, + /** + * A portion of an original patent sample that is tested at the same time as the original sample + */ + R, + /** + * A party that makes a claim for coverage under a policy. + */ + CLAIM, + /** + * Community Laboratory + */ + COMMUNITYLABORATORY, + /** + * An individual or organization that makes or gives a promise, assurance, pledge to pay or has paid the healthcare service provider. + */ + GT, + /** + * Home Health + */ + HOMEHEALTH, + /** + * Laboratory + */ + LABORATORY, + /** + * Pathologist + */ + PATHOLOGIST, + /** + * Policy holder for the insurance policy. + */ + PH, + /** + * Phlebotomist + */ + PHLEBOTOMIST, + /** + * A party that meets the eligibility criteria for coverage under a program. + */ + PROG, + /** + * The recipient for the service(s) and/or product(s) when they are not the covered party. + */ + PT, + /** + * Self + */ + SUBJECT, + /** + * Third Party + */ + THIRDPARTY, + /** + * null + */ + DEP, + /** + * A party covered under a policy based on association with a subscriber. + */ + DEPEN, + /** + * A member of the covered party's family. This could be the spouse, a parent, a grand parent, a sibling, etc. + */ + FM, + /** + * A party covered under a policy as the policyholder. + */ + INDIV, + /** + * A party to an insurance policy to whom the insurer agrees to indemnify for losses, provides benefits for, or renders services. + */ + NAMED, + /** + * null + */ + PSYCHCF, + /** + * A party covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage + */ + SUBSCR, + /** + * added to help the parsers + */ + NULL; + public static V3RoleCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AffiliationRoleType".equals(codeString)) + return _AFFILIATIONROLETYPE; + if ("_AgentRoleType".equals(codeString)) + return _AGENTROLETYPE; + if ("AMENDER".equals(codeString)) + return AMENDER; + if ("CLASSIFIER".equals(codeString)) + return CLASSIFIER; + if ("CONSENTER".equals(codeString)) + return CONSENTER; + if ("CONSWIT".equals(codeString)) + return CONSWIT; + if ("COPART".equals(codeString)) + return COPART; + if ("DECLASSIFIER".equals(codeString)) + return DECLASSIFIER; + if ("DELEGATEE".equals(codeString)) + return DELEGATEE; + if ("DELEGATOR".equals(codeString)) + return DELEGATOR; + if ("DOWNGRDER".equals(codeString)) + return DOWNGRDER; + if ("DRIVCLASSIFIER".equals(codeString)) + return DRIVCLASSIFIER; + if ("GRANTEE".equals(codeString)) + return GRANTEE; + if ("GRANTOR".equals(codeString)) + return GRANTOR; + if ("INTPRTER".equals(codeString)) + return INTPRTER; + if ("REVIEWER".equals(codeString)) + return REVIEWER; + if ("VALIDATOR".equals(codeString)) + return VALIDATOR; + if ("_CoverageSponsorRoleType".equals(codeString)) + return _COVERAGESPONSORROLETYPE; + if ("FULLINS".equals(codeString)) + return FULLINS; + if ("SELFINS".equals(codeString)) + return SELFINS; + if ("_PayorRoleType".equals(codeString)) + return _PAYORROLETYPE; + if ("ENROLBKR".equals(codeString)) + return ENROLBKR; + if ("TPA".equals(codeString)) + return TPA; + if ("UMO".equals(codeString)) + return UMO; + if ("RESPRSN".equals(codeString)) + return RESPRSN; + if ("EXCEST".equals(codeString)) + return EXCEST; + if ("GUADLTM".equals(codeString)) + return GUADLTM; + if ("GUARD".equals(codeString)) + return GUARD; + if ("POWATT".equals(codeString)) + return POWATT; + if ("DPOWATT".equals(codeString)) + return DPOWATT; + if ("HPOWATT".equals(codeString)) + return HPOWATT; + if ("SPOWATT".equals(codeString)) + return SPOWATT; + if ("_AssignedRoleType".equals(codeString)) + return _ASSIGNEDROLETYPE; + if ("_AssignedNonPersonLivingSubjectRoleType".equals(codeString)) + return _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE; + if ("ASSIST".equals(codeString)) + return ASSIST; + if ("BIOTH".equals(codeString)) + return BIOTH; + if ("ANTIBIOT".equals(codeString)) + return ANTIBIOT; + if ("DEBR".equals(codeString)) + return DEBR; + if ("CCO".equals(codeString)) + return CCO; + if ("SEE".equals(codeString)) + return SEE; + if ("SNIFF".equals(codeString)) + return SNIFF; + if ("_CertifiedEntityType".equals(codeString)) + return _CERTIFIEDENTITYTYPE; + if ("_CitizenRoleType".equals(codeString)) + return _CITIZENROLETYPE; + if ("CAS".equals(codeString)) + return CAS; + if ("CASM".equals(codeString)) + return CASM; + if ("CN".equals(codeString)) + return CN; + if ("CNRP".equals(codeString)) + return CNRP; + if ("CNRPM".equals(codeString)) + return CNRPM; + if ("CPCA".equals(codeString)) + return CPCA; + if ("CRP".equals(codeString)) + return CRP; + if ("CRPM".equals(codeString)) + return CRPM; + if ("_ContactRoleType".equals(codeString)) + return _CONTACTROLETYPE; + if ("_AdministrativeContactRoleType".equals(codeString)) + return _ADMINISTRATIVECONTACTROLETYPE; + if ("BILL".equals(codeString)) + return BILL; + if ("ORG".equals(codeString)) + return ORG; + if ("PAYOR".equals(codeString)) + return PAYOR; + if ("ECON".equals(codeString)) + return ECON; + if ("NOK".equals(codeString)) + return NOK; + if ("_IdentifiedEntityType".equals(codeString)) + return _IDENTIFIEDENTITYTYPE; + if ("_LocationIdentifiedEntityRoleCode".equals(codeString)) + return _LOCATIONIDENTIFIEDENTITYROLECODE; + if ("ACHFID".equals(codeString)) + return ACHFID; + if ("JURID".equals(codeString)) + return JURID; + if ("LOCHFID".equals(codeString)) + return LOCHFID; + if ("_LivingSubjectProductionClass".equals(codeString)) + return _LIVINGSUBJECTPRODUCTIONCLASS; + if ("BF".equals(codeString)) + return BF; + if ("BL".equals(codeString)) + return BL; + if ("BR".equals(codeString)) + return BR; + if ("CO".equals(codeString)) + return CO; + if ("DA".equals(codeString)) + return DA; + if ("DR".equals(codeString)) + return DR; + if ("DU".equals(codeString)) + return DU; + if ("FI".equals(codeString)) + return FI; + if ("LY".equals(codeString)) + return LY; + if ("MT".equals(codeString)) + return MT; + if ("MU".equals(codeString)) + return MU; + if ("PL".equals(codeString)) + return PL; + if ("RC".equals(codeString)) + return RC; + if ("SH".equals(codeString)) + return SH; + if ("VL".equals(codeString)) + return VL; + if ("WL".equals(codeString)) + return WL; + if ("WO".equals(codeString)) + return WO; + if ("_MedicationGeneralizationRoleType".equals(codeString)) + return _MEDICATIONGENERALIZATIONROLETYPE; + if ("DC".equals(codeString)) + return DC; + if ("GD".equals(codeString)) + return GD; + if ("GDF".equals(codeString)) + return GDF; + if ("GDS".equals(codeString)) + return GDS; + if ("GDSF".equals(codeString)) + return GDSF; + if ("MGDSF".equals(codeString)) + return MGDSF; + if ("_MemberRoleType".equals(codeString)) + return _MEMBERROLETYPE; + if ("TRB".equals(codeString)) + return TRB; + if ("_PersonalRelationshipRoleType".equals(codeString)) + return _PERSONALRELATIONSHIPROLETYPE; + if ("FAMMEMB".equals(codeString)) + return FAMMEMB; + if ("CHILD".equals(codeString)) + return CHILD; + if ("CHLDADOPT".equals(codeString)) + return CHLDADOPT; + if ("DAUADOPT".equals(codeString)) + return DAUADOPT; + if ("SONADOPT".equals(codeString)) + return SONADOPT; + if ("CHLDFOST".equals(codeString)) + return CHLDFOST; + if ("DAUFOST".equals(codeString)) + return DAUFOST; + if ("SONFOST".equals(codeString)) + return SONFOST; + if ("DAUC".equals(codeString)) + return DAUC; + if ("DAU".equals(codeString)) + return DAU; + if ("STPDAU".equals(codeString)) + return STPDAU; + if ("NCHILD".equals(codeString)) + return NCHILD; + if ("SON".equals(codeString)) + return SON; + if ("SONC".equals(codeString)) + return SONC; + if ("STPSON".equals(codeString)) + return STPSON; + if ("STPCHLD".equals(codeString)) + return STPCHLD; + if ("EXT".equals(codeString)) + return EXT; + if ("AUNT".equals(codeString)) + return AUNT; + if ("MAUNT".equals(codeString)) + return MAUNT; + if ("PAUNT".equals(codeString)) + return PAUNT; + if ("COUSN".equals(codeString)) + return COUSN; + if ("MCOUSN".equals(codeString)) + return MCOUSN; + if ("PCOUSN".equals(codeString)) + return PCOUSN; + if ("GGRPRN".equals(codeString)) + return GGRPRN; + if ("GGRFTH".equals(codeString)) + return GGRFTH; + if ("MGGRFTH".equals(codeString)) + return MGGRFTH; + if ("PGGRFTH".equals(codeString)) + return PGGRFTH; + if ("GGRMTH".equals(codeString)) + return GGRMTH; + if ("MGGRMTH".equals(codeString)) + return MGGRMTH; + if ("PGGRMTH".equals(codeString)) + return PGGRMTH; + if ("MGGRPRN".equals(codeString)) + return MGGRPRN; + if ("PGGRPRN".equals(codeString)) + return PGGRPRN; + if ("GRNDCHILD".equals(codeString)) + return GRNDCHILD; + if ("GRNDDAU".equals(codeString)) + return GRNDDAU; + if ("GRNDSON".equals(codeString)) + return GRNDSON; + if ("GRPRN".equals(codeString)) + return GRPRN; + if ("GRFTH".equals(codeString)) + return GRFTH; + if ("MGRFTH".equals(codeString)) + return MGRFTH; + if ("PGRFTH".equals(codeString)) + return PGRFTH; + if ("GRMTH".equals(codeString)) + return GRMTH; + if ("MGRMTH".equals(codeString)) + return MGRMTH; + if ("PGRMTH".equals(codeString)) + return PGRMTH; + if ("MGRPRN".equals(codeString)) + return MGRPRN; + if ("PGRPRN".equals(codeString)) + return PGRPRN; + if ("INLAW".equals(codeString)) + return INLAW; + if ("CHLDINLAW".equals(codeString)) + return CHLDINLAW; + if ("DAUINLAW".equals(codeString)) + return DAUINLAW; + if ("SONINLAW".equals(codeString)) + return SONINLAW; + if ("PRNINLAW".equals(codeString)) + return PRNINLAW; + if ("FTHINLAW".equals(codeString)) + return FTHINLAW; + if ("MTHINLAW".equals(codeString)) + return MTHINLAW; + if ("SIBINLAW".equals(codeString)) + return SIBINLAW; + if ("BROINLAW".equals(codeString)) + return BROINLAW; + if ("SISINLAW".equals(codeString)) + return SISINLAW; + if ("NIENEPH".equals(codeString)) + return NIENEPH; + if ("NEPHEW".equals(codeString)) + return NEPHEW; + if ("NIECE".equals(codeString)) + return NIECE; + if ("UNCLE".equals(codeString)) + return UNCLE; + if ("MUNCLE".equals(codeString)) + return MUNCLE; + if ("PUNCLE".equals(codeString)) + return PUNCLE; + if ("PRN".equals(codeString)) + return PRN; + if ("ADOPTP".equals(codeString)) + return ADOPTP; + if ("ADOPTF".equals(codeString)) + return ADOPTF; + if ("ADOPTM".equals(codeString)) + return ADOPTM; + if ("FTH".equals(codeString)) + return FTH; + if ("FTHFOST".equals(codeString)) + return FTHFOST; + if ("NFTH".equals(codeString)) + return NFTH; + if ("NFTHF".equals(codeString)) + return NFTHF; + if ("STPFTH".equals(codeString)) + return STPFTH; + if ("MTH".equals(codeString)) + return MTH; + if ("GESTM".equals(codeString)) + return GESTM; + if ("MTHFOST".equals(codeString)) + return MTHFOST; + if ("NMTH".equals(codeString)) + return NMTH; + if ("NMTHF".equals(codeString)) + return NMTHF; + if ("STPMTH".equals(codeString)) + return STPMTH; + if ("NPRN".equals(codeString)) + return NPRN; + if ("PRNFOST".equals(codeString)) + return PRNFOST; + if ("STPPRN".equals(codeString)) + return STPPRN; + if ("SIB".equals(codeString)) + return SIB; + if ("BRO".equals(codeString)) + return BRO; + if ("HBRO".equals(codeString)) + return HBRO; + if ("NBRO".equals(codeString)) + return NBRO; + if ("TWINBRO".equals(codeString)) + return TWINBRO; + if ("FTWINBRO".equals(codeString)) + return FTWINBRO; + if ("ITWINBRO".equals(codeString)) + return ITWINBRO; + if ("STPBRO".equals(codeString)) + return STPBRO; + if ("HSIB".equals(codeString)) + return HSIB; + if ("HSIS".equals(codeString)) + return HSIS; + if ("NSIB".equals(codeString)) + return NSIB; + if ("NSIS".equals(codeString)) + return NSIS; + if ("TWINSIS".equals(codeString)) + return TWINSIS; + if ("FTWINSIS".equals(codeString)) + return FTWINSIS; + if ("ITWINSIS".equals(codeString)) + return ITWINSIS; + if ("TWIN".equals(codeString)) + return TWIN; + if ("FTWIN".equals(codeString)) + return FTWIN; + if ("ITWIN".equals(codeString)) + return ITWIN; + if ("SIS".equals(codeString)) + return SIS; + if ("STPSIS".equals(codeString)) + return STPSIS; + if ("STPSIB".equals(codeString)) + return STPSIB; + if ("SIGOTHR".equals(codeString)) + return SIGOTHR; + if ("DOMPART".equals(codeString)) + return DOMPART; + if ("FMRSPS".equals(codeString)) + return FMRSPS; + if ("SPS".equals(codeString)) + return SPS; + if ("HUSB".equals(codeString)) + return HUSB; + if ("WIFE".equals(codeString)) + return WIFE; + if ("FRND".equals(codeString)) + return FRND; + if ("NBOR".equals(codeString)) + return NBOR; + if ("ONESELF".equals(codeString)) + return ONESELF; + if ("ROOM".equals(codeString)) + return ROOM; + if ("_PolicyOrProgramCoverageRoleType".equals(codeString)) + return _POLICYORPROGRAMCOVERAGEROLETYPE; + if ("_CoverageRoleType".equals(codeString)) + return _COVERAGEROLETYPE; + if ("FAMDEP".equals(codeString)) + return FAMDEP; + if ("HANDIC".equals(codeString)) + return HANDIC; + if ("INJ".equals(codeString)) + return INJ; + if ("SELF".equals(codeString)) + return SELF; + if ("SPON".equals(codeString)) + return SPON; + if ("STUD".equals(codeString)) + return STUD; + if ("FSTUD".equals(codeString)) + return FSTUD; + if ("PSTUD".equals(codeString)) + return PSTUD; + if ("ADOPT".equals(codeString)) + return ADOPT; + if ("GCHILD".equals(codeString)) + return GCHILD; + if ("GPARNT".equals(codeString)) + return GPARNT; + if ("NAT".equals(codeString)) + return NAT; + if ("NIENE".equals(codeString)) + return NIENE; + if ("PARNT".equals(codeString)) + return PARNT; + if ("SPSE".equals(codeString)) + return SPSE; + if ("STEP".equals(codeString)) + return STEP; + if ("_CoveredPartyRoleType".equals(codeString)) + return _COVEREDPARTYROLETYPE; + if ("_ClaimantCoveredPartyRoleType".equals(codeString)) + return _CLAIMANTCOVEREDPARTYROLETYPE; + if ("CRIMEVIC".equals(codeString)) + return CRIMEVIC; + if ("INJWKR".equals(codeString)) + return INJWKR; + if ("_DependentCoveredPartyRoleType".equals(codeString)) + return _DEPENDENTCOVEREDPARTYROLETYPE; + if ("COCBEN".equals(codeString)) + return COCBEN; + if ("DIFFABL".equals(codeString)) + return DIFFABL; + if ("WARD".equals(codeString)) + return WARD; + if ("_IndividualInsuredPartyRoleType".equals(codeString)) + return _INDIVIDUALINSUREDPARTYROLETYPE; + if ("RETIREE".equals(codeString)) + return RETIREE; + if ("_ProgramEligiblePartyRoleType".equals(codeString)) + return _PROGRAMELIGIBLEPARTYROLETYPE; + if ("INDIG".equals(codeString)) + return INDIG; + if ("MIL".equals(codeString)) + return MIL; + if ("ACTMIL".equals(codeString)) + return ACTMIL; + if ("RETMIL".equals(codeString)) + return RETMIL; + if ("VET".equals(codeString)) + return VET; + if ("_SubscriberCoveredPartyRoleType".equals(codeString)) + return _SUBSCRIBERCOVEREDPARTYROLETYPE; + if ("_ResearchSubjectRoleBasis".equals(codeString)) + return _RESEARCHSUBJECTROLEBASIS; + if ("ERL".equals(codeString)) + return ERL; + if ("SCN".equals(codeString)) + return SCN; + if ("_ServiceDeliveryLocationRoleType".equals(codeString)) + return _SERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedServiceDeliveryLocationRoleType".equals(codeString)) + return _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedClinicalLocationRoleType".equals(codeString)) + return _DEDICATEDCLINICALLOCATIONROLETYPE; + if ("DX".equals(codeString)) + return DX; + if ("CVDX".equals(codeString)) + return CVDX; + if ("CATH".equals(codeString)) + return CATH; + if ("ECHO".equals(codeString)) + return ECHO; + if ("GIDX".equals(codeString)) + return GIDX; + if ("ENDOS".equals(codeString)) + return ENDOS; + if ("RADDX".equals(codeString)) + return RADDX; + if ("RADO".equals(codeString)) + return RADO; + if ("RNEU".equals(codeString)) + return RNEU; + if ("HOSP".equals(codeString)) + return HOSP; + if ("CHR".equals(codeString)) + return CHR; + if ("GACH".equals(codeString)) + return GACH; + if ("MHSP".equals(codeString)) + return MHSP; + if ("PSYCHF".equals(codeString)) + return PSYCHF; + if ("RH".equals(codeString)) + return RH; + if ("RHAT".equals(codeString)) + return RHAT; + if ("RHII".equals(codeString)) + return RHII; + if ("RHMAD".equals(codeString)) + return RHMAD; + if ("RHPI".equals(codeString)) + return RHPI; + if ("RHPIH".equals(codeString)) + return RHPIH; + if ("RHPIMS".equals(codeString)) + return RHPIMS; + if ("RHPIVS".equals(codeString)) + return RHPIVS; + if ("RHYAD".equals(codeString)) + return RHYAD; + if ("HU".equals(codeString)) + return HU; + if ("BMTU".equals(codeString)) + return BMTU; + if ("CCU".equals(codeString)) + return CCU; + if ("CHEST".equals(codeString)) + return CHEST; + if ("EPIL".equals(codeString)) + return EPIL; + if ("ER".equals(codeString)) + return ER; + if ("ETU".equals(codeString)) + return ETU; + if ("HD".equals(codeString)) + return HD; + if ("HLAB".equals(codeString)) + return HLAB; + if ("INLAB".equals(codeString)) + return INLAB; + if ("OUTLAB".equals(codeString)) + return OUTLAB; + if ("HRAD".equals(codeString)) + return HRAD; + if ("HUSCS".equals(codeString)) + return HUSCS; + if ("ICU".equals(codeString)) + return ICU; + if ("PEDICU".equals(codeString)) + return PEDICU; + if ("PEDNICU".equals(codeString)) + return PEDNICU; + if ("INPHARM".equals(codeString)) + return INPHARM; + if ("MBL".equals(codeString)) + return MBL; + if ("NCCS".equals(codeString)) + return NCCS; + if ("NS".equals(codeString)) + return NS; + if ("OUTPHARM".equals(codeString)) + return OUTPHARM; + if ("PEDU".equals(codeString)) + return PEDU; + if ("PHU".equals(codeString)) + return PHU; + if ("RHU".equals(codeString)) + return RHU; + if ("SLEEP".equals(codeString)) + return SLEEP; + if ("NCCF".equals(codeString)) + return NCCF; + if ("SNF".equals(codeString)) + return SNF; + if ("OF".equals(codeString)) + return OF; + if ("ALL".equals(codeString)) + return ALL; + if ("AMPUT".equals(codeString)) + return AMPUT; + if ("BMTC".equals(codeString)) + return BMTC; + if ("BREAST".equals(codeString)) + return BREAST; + if ("CANC".equals(codeString)) + return CANC; + if ("CAPC".equals(codeString)) + return CAPC; + if ("CARD".equals(codeString)) + return CARD; + if ("PEDCARD".equals(codeString)) + return PEDCARD; + if ("COAG".equals(codeString)) + return COAG; + if ("CRS".equals(codeString)) + return CRS; + if ("DERM".equals(codeString)) + return DERM; + if ("ENDO".equals(codeString)) + return ENDO; + if ("PEDE".equals(codeString)) + return PEDE; + if ("ENT".equals(codeString)) + return ENT; + if ("FMC".equals(codeString)) + return FMC; + if ("GI".equals(codeString)) + return GI; + if ("PEDGI".equals(codeString)) + return PEDGI; + if ("GIM".equals(codeString)) + return GIM; + if ("GYN".equals(codeString)) + return GYN; + if ("HEM".equals(codeString)) + return HEM; + if ("PEDHEM".equals(codeString)) + return PEDHEM; + if ("HTN".equals(codeString)) + return HTN; + if ("IEC".equals(codeString)) + return IEC; + if ("INFD".equals(codeString)) + return INFD; + if ("PEDID".equals(codeString)) + return PEDID; + if ("INV".equals(codeString)) + return INV; + if ("LYMPH".equals(codeString)) + return LYMPH; + if ("MGEN".equals(codeString)) + return MGEN; + if ("NEPH".equals(codeString)) + return NEPH; + if ("PEDNEPH".equals(codeString)) + return PEDNEPH; + if ("NEUR".equals(codeString)) + return NEUR; + if ("OB".equals(codeString)) + return OB; + if ("OMS".equals(codeString)) + return OMS; + if ("ONCL".equals(codeString)) + return ONCL; + if ("PEDHO".equals(codeString)) + return PEDHO; + if ("OPH".equals(codeString)) + return OPH; + if ("OPTC".equals(codeString)) + return OPTC; + if ("ORTHO".equals(codeString)) + return ORTHO; + if ("HAND".equals(codeString)) + return HAND; + if ("PAINCL".equals(codeString)) + return PAINCL; + if ("PC".equals(codeString)) + return PC; + if ("PEDC".equals(codeString)) + return PEDC; + if ("PEDRHEUM".equals(codeString)) + return PEDRHEUM; + if ("POD".equals(codeString)) + return POD; + if ("PREV".equals(codeString)) + return PREV; + if ("PROCTO".equals(codeString)) + return PROCTO; + if ("PROFF".equals(codeString)) + return PROFF; + if ("PROS".equals(codeString)) + return PROS; + if ("PSI".equals(codeString)) + return PSI; + if ("PSY".equals(codeString)) + return PSY; + if ("RHEUM".equals(codeString)) + return RHEUM; + if ("SPMED".equals(codeString)) + return SPMED; + if ("SU".equals(codeString)) + return SU; + if ("PLS".equals(codeString)) + return PLS; + if ("URO".equals(codeString)) + return URO; + if ("TR".equals(codeString)) + return TR; + if ("TRAVEL".equals(codeString)) + return TRAVEL; + if ("WND".equals(codeString)) + return WND; + if ("RTF".equals(codeString)) + return RTF; + if ("PRC".equals(codeString)) + return PRC; + if ("SURF".equals(codeString)) + return SURF; + if ("_DedicatedNonClinicalLocationRoleType".equals(codeString)) + return _DEDICATEDNONCLINICALLOCATIONROLETYPE; + if ("DADDR".equals(codeString)) + return DADDR; + if ("MOBL".equals(codeString)) + return MOBL; + if ("AMB".equals(codeString)) + return AMB; + if ("PHARM".equals(codeString)) + return PHARM; + if ("_IncidentalServiceDeliveryLocationRoleType".equals(codeString)) + return _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE; + if ("ACC".equals(codeString)) + return ACC; + if ("COMM".equals(codeString)) + return COMM; + if ("CSC".equals(codeString)) + return CSC; + if ("PTRES".equals(codeString)) + return PTRES; + if ("SCHOOL".equals(codeString)) + return SCHOOL; + if ("UPC".equals(codeString)) + return UPC; + if ("WORK".equals(codeString)) + return WORK; + if ("_SpecimenRoleType".equals(codeString)) + return _SPECIMENROLETYPE; + if ("C".equals(codeString)) + return C; + if ("G".equals(codeString)) + return G; + if ("L".equals(codeString)) + return L; + if ("P".equals(codeString)) + return P; + if ("Q".equals(codeString)) + return Q; + if ("B".equals(codeString)) + return B; + if ("E".equals(codeString)) + return E; + if ("F".equals(codeString)) + return F; + if ("O".equals(codeString)) + return O; + if ("V".equals(codeString)) + return V; + if ("R".equals(codeString)) + return R; + if ("CLAIM".equals(codeString)) + return CLAIM; + if ("communityLaboratory".equals(codeString)) + return COMMUNITYLABORATORY; + if ("GT".equals(codeString)) + return GT; + if ("homeHealth".equals(codeString)) + return HOMEHEALTH; + if ("laboratory".equals(codeString)) + return LABORATORY; + if ("pathologist".equals(codeString)) + return PATHOLOGIST; + if ("PH".equals(codeString)) + return PH; + if ("phlebotomist".equals(codeString)) + return PHLEBOTOMIST; + if ("PROG".equals(codeString)) + return PROG; + if ("PT".equals(codeString)) + return PT; + if ("subject".equals(codeString)) + return SUBJECT; + if ("thirdParty".equals(codeString)) + return THIRDPARTY; + if ("DEP".equals(codeString)) + return DEP; + if ("DEPEN".equals(codeString)) + return DEPEN; + if ("FM".equals(codeString)) + return FM; + if ("INDIV".equals(codeString)) + return INDIV; + if ("NAMED".equals(codeString)) + return NAMED; + if ("PSYCHCF".equals(codeString)) + return PSYCHCF; + if ("SUBSCR".equals(codeString)) + return SUBSCR; + throw new FHIRException("Unknown V3RoleCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _AFFILIATIONROLETYPE: return "_AffiliationRoleType"; + case _AGENTROLETYPE: return "_AgentRoleType"; + case AMENDER: return "AMENDER"; + case CLASSIFIER: return "CLASSIFIER"; + case CONSENTER: return "CONSENTER"; + case CONSWIT: return "CONSWIT"; + case COPART: return "COPART"; + case DECLASSIFIER: return "DECLASSIFIER"; + case DELEGATEE: return "DELEGATEE"; + case DELEGATOR: return "DELEGATOR"; + case DOWNGRDER: return "DOWNGRDER"; + case DRIVCLASSIFIER: return "DRIVCLASSIFIER"; + case GRANTEE: return "GRANTEE"; + case GRANTOR: return "GRANTOR"; + case INTPRTER: return "INTPRTER"; + case REVIEWER: return "REVIEWER"; + case VALIDATOR: return "VALIDATOR"; + case _COVERAGESPONSORROLETYPE: return "_CoverageSponsorRoleType"; + case FULLINS: return "FULLINS"; + case SELFINS: return "SELFINS"; + case _PAYORROLETYPE: return "_PayorRoleType"; + case ENROLBKR: return "ENROLBKR"; + case TPA: return "TPA"; + case UMO: return "UMO"; + case RESPRSN: return "RESPRSN"; + case EXCEST: return "EXCEST"; + case GUADLTM: return "GUADLTM"; + case GUARD: return "GUARD"; + case POWATT: return "POWATT"; + case DPOWATT: return "DPOWATT"; + case HPOWATT: return "HPOWATT"; + case SPOWATT: return "SPOWATT"; + case _ASSIGNEDROLETYPE: return "_AssignedRoleType"; + case _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE: return "_AssignedNonPersonLivingSubjectRoleType"; + case ASSIST: return "ASSIST"; + case BIOTH: return "BIOTH"; + case ANTIBIOT: return "ANTIBIOT"; + case DEBR: return "DEBR"; + case CCO: return "CCO"; + case SEE: return "SEE"; + case SNIFF: return "SNIFF"; + case _CERTIFIEDENTITYTYPE: return "_CertifiedEntityType"; + case _CITIZENROLETYPE: return "_CitizenRoleType"; + case CAS: return "CAS"; + case CASM: return "CASM"; + case CN: return "CN"; + case CNRP: return "CNRP"; + case CNRPM: return "CNRPM"; + case CPCA: return "CPCA"; + case CRP: return "CRP"; + case CRPM: return "CRPM"; + case _CONTACTROLETYPE: return "_ContactRoleType"; + case _ADMINISTRATIVECONTACTROLETYPE: return "_AdministrativeContactRoleType"; + case BILL: return "BILL"; + case ORG: return "ORG"; + case PAYOR: return "PAYOR"; + case ECON: return "ECON"; + case NOK: return "NOK"; + case _IDENTIFIEDENTITYTYPE: return "_IdentifiedEntityType"; + case _LOCATIONIDENTIFIEDENTITYROLECODE: return "_LocationIdentifiedEntityRoleCode"; + case ACHFID: return "ACHFID"; + case JURID: return "JURID"; + case LOCHFID: return "LOCHFID"; + case _LIVINGSUBJECTPRODUCTIONCLASS: return "_LivingSubjectProductionClass"; + case BF: return "BF"; + case BL: return "BL"; + case BR: return "BR"; + case CO: return "CO"; + case DA: return "DA"; + case DR: return "DR"; + case DU: return "DU"; + case FI: return "FI"; + case LY: return "LY"; + case MT: return "MT"; + case MU: return "MU"; + case PL: return "PL"; + case RC: return "RC"; + case SH: return "SH"; + case VL: return "VL"; + case WL: return "WL"; + case WO: return "WO"; + case _MEDICATIONGENERALIZATIONROLETYPE: return "_MedicationGeneralizationRoleType"; + case DC: return "DC"; + case GD: return "GD"; + case GDF: return "GDF"; + case GDS: return "GDS"; + case GDSF: return "GDSF"; + case MGDSF: return "MGDSF"; + case _MEMBERROLETYPE: return "_MemberRoleType"; + case TRB: return "TRB"; + case _PERSONALRELATIONSHIPROLETYPE: return "_PersonalRelationshipRoleType"; + case FAMMEMB: return "FAMMEMB"; + case CHILD: return "CHILD"; + case CHLDADOPT: return "CHLDADOPT"; + case DAUADOPT: return "DAUADOPT"; + case SONADOPT: return "SONADOPT"; + case CHLDFOST: return "CHLDFOST"; + case DAUFOST: return "DAUFOST"; + case SONFOST: return "SONFOST"; + case DAUC: return "DAUC"; + case DAU: return "DAU"; + case STPDAU: return "STPDAU"; + case NCHILD: return "NCHILD"; + case SON: return "SON"; + case SONC: return "SONC"; + case STPSON: return "STPSON"; + case STPCHLD: return "STPCHLD"; + case EXT: return "EXT"; + case AUNT: return "AUNT"; + case MAUNT: return "MAUNT"; + case PAUNT: return "PAUNT"; + case COUSN: return "COUSN"; + case MCOUSN: return "MCOUSN"; + case PCOUSN: return "PCOUSN"; + case GGRPRN: return "GGRPRN"; + case GGRFTH: return "GGRFTH"; + case MGGRFTH: return "MGGRFTH"; + case PGGRFTH: return "PGGRFTH"; + case GGRMTH: return "GGRMTH"; + case MGGRMTH: return "MGGRMTH"; + case PGGRMTH: return "PGGRMTH"; + case MGGRPRN: return "MGGRPRN"; + case PGGRPRN: return "PGGRPRN"; + case GRNDCHILD: return "GRNDCHILD"; + case GRNDDAU: return "GRNDDAU"; + case GRNDSON: return "GRNDSON"; + case GRPRN: return "GRPRN"; + case GRFTH: return "GRFTH"; + case MGRFTH: return "MGRFTH"; + case PGRFTH: return "PGRFTH"; + case GRMTH: return "GRMTH"; + case MGRMTH: return "MGRMTH"; + case PGRMTH: return "PGRMTH"; + case MGRPRN: return "MGRPRN"; + case PGRPRN: return "PGRPRN"; + case INLAW: return "INLAW"; + case CHLDINLAW: return "CHLDINLAW"; + case DAUINLAW: return "DAUINLAW"; + case SONINLAW: return "SONINLAW"; + case PRNINLAW: return "PRNINLAW"; + case FTHINLAW: return "FTHINLAW"; + case MTHINLAW: return "MTHINLAW"; + case SIBINLAW: return "SIBINLAW"; + case BROINLAW: return "BROINLAW"; + case SISINLAW: return "SISINLAW"; + case NIENEPH: return "NIENEPH"; + case NEPHEW: return "NEPHEW"; + case NIECE: return "NIECE"; + case UNCLE: return "UNCLE"; + case MUNCLE: return "MUNCLE"; + case PUNCLE: return "PUNCLE"; + case PRN: return "PRN"; + case ADOPTP: return "ADOPTP"; + case ADOPTF: return "ADOPTF"; + case ADOPTM: return "ADOPTM"; + case FTH: return "FTH"; + case FTHFOST: return "FTHFOST"; + case NFTH: return "NFTH"; + case NFTHF: return "NFTHF"; + case STPFTH: return "STPFTH"; + case MTH: return "MTH"; + case GESTM: return "GESTM"; + case MTHFOST: return "MTHFOST"; + case NMTH: return "NMTH"; + case NMTHF: return "NMTHF"; + case STPMTH: return "STPMTH"; + case NPRN: return "NPRN"; + case PRNFOST: return "PRNFOST"; + case STPPRN: return "STPPRN"; + case SIB: return "SIB"; + case BRO: return "BRO"; + case HBRO: return "HBRO"; + case NBRO: return "NBRO"; + case TWINBRO: return "TWINBRO"; + case FTWINBRO: return "FTWINBRO"; + case ITWINBRO: return "ITWINBRO"; + case STPBRO: return "STPBRO"; + case HSIB: return "HSIB"; + case HSIS: return "HSIS"; + case NSIB: return "NSIB"; + case NSIS: return "NSIS"; + case TWINSIS: return "TWINSIS"; + case FTWINSIS: return "FTWINSIS"; + case ITWINSIS: return "ITWINSIS"; + case TWIN: return "TWIN"; + case FTWIN: return "FTWIN"; + case ITWIN: return "ITWIN"; + case SIS: return "SIS"; + case STPSIS: return "STPSIS"; + case STPSIB: return "STPSIB"; + case SIGOTHR: return "SIGOTHR"; + case DOMPART: return "DOMPART"; + case FMRSPS: return "FMRSPS"; + case SPS: return "SPS"; + case HUSB: return "HUSB"; + case WIFE: return "WIFE"; + case FRND: return "FRND"; + case NBOR: return "NBOR"; + case ONESELF: return "ONESELF"; + case ROOM: return "ROOM"; + case _POLICYORPROGRAMCOVERAGEROLETYPE: return "_PolicyOrProgramCoverageRoleType"; + case _COVERAGEROLETYPE: return "_CoverageRoleType"; + case FAMDEP: return "FAMDEP"; + case HANDIC: return "HANDIC"; + case INJ: return "INJ"; + case SELF: return "SELF"; + case SPON: return "SPON"; + case STUD: return "STUD"; + case FSTUD: return "FSTUD"; + case PSTUD: return "PSTUD"; + case ADOPT: return "ADOPT"; + case GCHILD: return "GCHILD"; + case GPARNT: return "GPARNT"; + case NAT: return "NAT"; + case NIENE: return "NIENE"; + case PARNT: return "PARNT"; + case SPSE: return "SPSE"; + case STEP: return "STEP"; + case _COVEREDPARTYROLETYPE: return "_CoveredPartyRoleType"; + case _CLAIMANTCOVEREDPARTYROLETYPE: return "_ClaimantCoveredPartyRoleType"; + case CRIMEVIC: return "CRIMEVIC"; + case INJWKR: return "INJWKR"; + case _DEPENDENTCOVEREDPARTYROLETYPE: return "_DependentCoveredPartyRoleType"; + case COCBEN: return "COCBEN"; + case DIFFABL: return "DIFFABL"; + case WARD: return "WARD"; + case _INDIVIDUALINSUREDPARTYROLETYPE: return "_IndividualInsuredPartyRoleType"; + case RETIREE: return "RETIREE"; + case _PROGRAMELIGIBLEPARTYROLETYPE: return "_ProgramEligiblePartyRoleType"; + case INDIG: return "INDIG"; + case MIL: return "MIL"; + case ACTMIL: return "ACTMIL"; + case RETMIL: return "RETMIL"; + case VET: return "VET"; + case _SUBSCRIBERCOVEREDPARTYROLETYPE: return "_SubscriberCoveredPartyRoleType"; + case _RESEARCHSUBJECTROLEBASIS: return "_ResearchSubjectRoleBasis"; + case ERL: return "ERL"; + case SCN: return "SCN"; + case _SERVICEDELIVERYLOCATIONROLETYPE: return "_ServiceDeliveryLocationRoleType"; + case _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE: return "_DedicatedServiceDeliveryLocationRoleType"; + case _DEDICATEDCLINICALLOCATIONROLETYPE: return "_DedicatedClinicalLocationRoleType"; + case DX: return "DX"; + case CVDX: return "CVDX"; + case CATH: return "CATH"; + case ECHO: return "ECHO"; + case GIDX: return "GIDX"; + case ENDOS: return "ENDOS"; + case RADDX: return "RADDX"; + case RADO: return "RADO"; + case RNEU: return "RNEU"; + case HOSP: return "HOSP"; + case CHR: return "CHR"; + case GACH: return "GACH"; + case MHSP: return "MHSP"; + case PSYCHF: return "PSYCHF"; + case RH: return "RH"; + case RHAT: return "RHAT"; + case RHII: return "RHII"; + case RHMAD: return "RHMAD"; + case RHPI: return "RHPI"; + case RHPIH: return "RHPIH"; + case RHPIMS: return "RHPIMS"; + case RHPIVS: return "RHPIVS"; + case RHYAD: return "RHYAD"; + case HU: return "HU"; + case BMTU: return "BMTU"; + case CCU: return "CCU"; + case CHEST: return "CHEST"; + case EPIL: return "EPIL"; + case ER: return "ER"; + case ETU: return "ETU"; + case HD: return "HD"; + case HLAB: return "HLAB"; + case INLAB: return "INLAB"; + case OUTLAB: return "OUTLAB"; + case HRAD: return "HRAD"; + case HUSCS: return "HUSCS"; + case ICU: return "ICU"; + case PEDICU: return "PEDICU"; + case PEDNICU: return "PEDNICU"; + case INPHARM: return "INPHARM"; + case MBL: return "MBL"; + case NCCS: return "NCCS"; + case NS: return "NS"; + case OUTPHARM: return "OUTPHARM"; + case PEDU: return "PEDU"; + case PHU: return "PHU"; + case RHU: return "RHU"; + case SLEEP: return "SLEEP"; + case NCCF: return "NCCF"; + case SNF: return "SNF"; + case OF: return "OF"; + case ALL: return "ALL"; + case AMPUT: return "AMPUT"; + case BMTC: return "BMTC"; + case BREAST: return "BREAST"; + case CANC: return "CANC"; + case CAPC: return "CAPC"; + case CARD: return "CARD"; + case PEDCARD: return "PEDCARD"; + case COAG: return "COAG"; + case CRS: return "CRS"; + case DERM: return "DERM"; + case ENDO: return "ENDO"; + case PEDE: return "PEDE"; + case ENT: return "ENT"; + case FMC: return "FMC"; + case GI: return "GI"; + case PEDGI: return "PEDGI"; + case GIM: return "GIM"; + case GYN: return "GYN"; + case HEM: return "HEM"; + case PEDHEM: return "PEDHEM"; + case HTN: return "HTN"; + case IEC: return "IEC"; + case INFD: return "INFD"; + case PEDID: return "PEDID"; + case INV: return "INV"; + case LYMPH: return "LYMPH"; + case MGEN: return "MGEN"; + case NEPH: return "NEPH"; + case PEDNEPH: return "PEDNEPH"; + case NEUR: return "NEUR"; + case OB: return "OB"; + case OMS: return "OMS"; + case ONCL: return "ONCL"; + case PEDHO: return "PEDHO"; + case OPH: return "OPH"; + case OPTC: return "OPTC"; + case ORTHO: return "ORTHO"; + case HAND: return "HAND"; + case PAINCL: return "PAINCL"; + case PC: return "PC"; + case PEDC: return "PEDC"; + case PEDRHEUM: return "PEDRHEUM"; + case POD: return "POD"; + case PREV: return "PREV"; + case PROCTO: return "PROCTO"; + case PROFF: return "PROFF"; + case PROS: return "PROS"; + case PSI: return "PSI"; + case PSY: return "PSY"; + case RHEUM: return "RHEUM"; + case SPMED: return "SPMED"; + case SU: return "SU"; + case PLS: return "PLS"; + case URO: return "URO"; + case TR: return "TR"; + case TRAVEL: return "TRAVEL"; + case WND: return "WND"; + case RTF: return "RTF"; + case PRC: return "PRC"; + case SURF: return "SURF"; + case _DEDICATEDNONCLINICALLOCATIONROLETYPE: return "_DedicatedNonClinicalLocationRoleType"; + case DADDR: return "DADDR"; + case MOBL: return "MOBL"; + case AMB: return "AMB"; + case PHARM: return "PHARM"; + case _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE: return "_IncidentalServiceDeliveryLocationRoleType"; + case ACC: return "ACC"; + case COMM: return "COMM"; + case CSC: return "CSC"; + case PTRES: return "PTRES"; + case SCHOOL: return "SCHOOL"; + case UPC: return "UPC"; + case WORK: return "WORK"; + case _SPECIMENROLETYPE: return "_SpecimenRoleType"; + case C: return "C"; + case G: return "G"; + case L: return "L"; + case P: return "P"; + case Q: return "Q"; + case B: return "B"; + case E: return "E"; + case F: return "F"; + case O: return "O"; + case V: return "V"; + case R: return "R"; + case CLAIM: return "CLAIM"; + case COMMUNITYLABORATORY: return "communityLaboratory"; + case GT: return "GT"; + case HOMEHEALTH: return "homeHealth"; + case LABORATORY: return "laboratory"; + case PATHOLOGIST: return "pathologist"; + case PH: return "PH"; + case PHLEBOTOMIST: return "phlebotomist"; + case PROG: return "PROG"; + case PT: return "PT"; + case SUBJECT: return "subject"; + case THIRDPARTY: return "thirdParty"; + case DEP: return "DEP"; + case DEPEN: return "DEPEN"; + case FM: return "FM"; + case INDIV: return "INDIV"; + case NAMED: return "NAMED"; + case PSYCHCF: return "PSYCHCF"; + case SUBSCR: return "SUBSCR"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleCode"; + } + public String getDefinition() { + switch (this) { + case _AFFILIATIONROLETYPE: return "Concepts characterizing the type of association formed by player and scoper when there is a recognized Affiliate role by which the two parties are related.\r\n\n \n Examples: Business Partner, Business Associate, Colleague"; + case _AGENTROLETYPE: return "Parties that may or should contribute or have contributed to an Act."; + case AMENDER: return "An entity which corrected, edited, or amended pre-existing information."; + case CLASSIFIER: return "An individual authorized to assign an original classification to information, including compilations of unclassified information, based on a determination that the information requires protection against unauthorized disclosure. The individual marks the information with immutable, computable, and human readable security labels in accordance with applicable security labeling policies. The labeling policies provide instructions on whether and if so how the security labels may be later reclassified [i.e., upgraded, downgraded, used in derivative classification, or declassified] in a manner that preserves the overridden original classification binding and provenance."; + case CONSENTER: return "An entity or an entity's delegatee who is the grantee in an agreement such as a consent for services, advanced directive, or a privacy consent directive in accordance with jurisdictional, organizational, or patient policy."; + case CONSWIT: return "An entity which has witnessed and attests to observing another entity being counseled about an agreement such as a consent for services, advanced directive, or a privacy consent directive."; + case COPART: return "An entity which participates in the generation of and attest to veracity of content, but is not an author or coauthor. For example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report."; + case DECLASSIFIER: return "An individual which is authorized to declassify information based on a determination that the information no longer requires protection against unauthorized disclosure. The individual marks the information being declassified using computable and human readable security labels indicating that this is copy of previously classified information is unclassified in accordance with applicable security labeling policies. The labeling policies provide instructions on whether and if so how the security labels may be later reclassified [i.e., upgraded or used in derivative classification] in a manner that preserves the overridden original classification binding and provenance."; + case DELEGATEE: return "A party to whom some right or authority is granted by a delegator."; + case DELEGATOR: return "A party that grants all or some portion its right or authority to another party."; + case DOWNGRDER: return "An individual authorized to lower the classification level of labeled content and provide rationale for doing so as directed by a classification guide."; + case DRIVCLASSIFIER: return "An individual who is only authorized to classify reproduced, extracted, or summarized classified information, or compile classified and unclassified information by applying classification markings derived from source material or as directed by a classification guide."; + case GRANTEE: return "An entity which accepts certain rights or authority from a grantor."; + case GRANTOR: return "An entity which agrees to confer certain rights or authority to a grantee."; + case INTPRTER: return "An entity which converts spoken or written language into the language of key participants in an event such as when a provider is obtaining a patient's consent to treatment or permission to disclose information."; + case REVIEWER: return "An entity authorized to filter information according to approved criteria."; + case VALIDATOR: return "An entity authorized to validate information for inclusion in a record."; + case _COVERAGESPONSORROLETYPE: return "Description:Codes that indicate a specific type of sponsor. Used when the sponsor's role is only either as a fully insured sponsor or only as a self-insured sponsor. NOTE: Where a sponsor may be either, use the SponsorParticipationFunction.code (fully insured or self insured) to indicate the type of responsibility. (CO6-0057)"; + case FULLINS: return "Description:An employer or organization that contracts with an underwriter to assumes the financial risk and administrative responsibility for coverage of health services for covered parties."; + case SELFINS: return "Description:An employer or organization that assumes the financial risk and administrative responsibility for coverage of health services for covered parties."; + case _PAYORROLETYPE: return "Description:PayorRoleType for a particular type of policy or program benefit package or plan where more detail about the coverage administration role of the Payor is required. The functions performed by a Payor qualified by a PayorRoleType may be specified by the PayorParticpationFunction value set.\r\n\n \n Examples:A Payor that is a TPA may administer a managed care plan without underwriting the risk."; + case ENROLBKR: return "Description:A payor that is responsible for functions related to the enrollment of covered parties."; + case TPA: return "Description:Third party administrator (TPA) is a payor organization that processes health care claims without carrying insurance risk. Third party administrators are prominent players in the managed care industry and have the expertise and capability to administer all or a portion of the claims process. They are normally contracted by a health insurer or self-insuring companies to administer services, including claims administration, premium collection, enrollment and other administrative activities.\r\n\n Self-insured employers often contract with third party administrator to handle their insurance functions. Insurance companies oftentimes outsource the claims, utilization review or membership functions to a TPA. Sometimes TPAs only manage provider networks, only claims or only utilization review.\r\n\n While some third-party administrators may operate as units of insurance companies, they are often independent. However, hospitals or provider organizations desiring to set up their own health plans will often outsource certain responsibilities to TPAs. TPAs may perform one or several payor functions, specified by the PayorParticipationFunction value set, such as provider management, enrollment, utilization management, and fee for service claims adjudication management."; + case UMO: return "Description:A payor that is responsible for review and case management of health services covered under a policy or program."; + case RESPRSN: return "The role played by a party who has legal responsibility for another party."; + case EXCEST: return "The role played by a person acting as the estate executor for a deceased subscriber or policyholder who was the responsible party"; + case GUADLTM: return "The role played by a person appointed by the court to look out for the best interests of a minor child during the course of legal proceedings."; + case GUARD: return "The role played by a person or institution legally empowered with responsibility for the care of a ward."; + case POWATT: return "A relationship between two people in which one person authorizes another to act for him in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts."; + case DPOWATT: return "A relationship between two people in which one person authorizes another, usually a family member or relative, to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned. Unlike ordinary powers of attorney, durable powers can survive for long periods of time, and again, unlike standard powers of attorney, durable powers can continue after incompetency."; + case HPOWATT: return "A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that continues (by its terms) to be effective even though the grantor has become mentally incompetent after signing the document."; + case SPOWATT: return "A relationship between two people in which one person authorizes another to act for him or her in a manner which is a legally binding upon the person giving such authority as if he or she personally were to do the acts that is often limited in the kinds of powers that can be assigned."; + case _ASSIGNEDROLETYPE: return "AssignedRoleType"; + case _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE: return "Description:A role type that is used to further qualify a non-person subject playing a role where the role class attribute is set to RoleClass AssignedEntity"; + case ASSIST: return "Description:Dogs trained to assist the ill or physically challenged."; + case BIOTH: return "Description:Animals, including fish and insects, and microorganisms which may participate as assigned entities in biotherapies."; + case ANTIBIOT: return "Description:Non-person living subject used as antibiotic.\r\n\n \n Examples:Bacteriophage, is a virus that infects bacteria."; + case DEBR: return "Description:Maggots raised for biodebridement.\r\n\n \n Discussion: Maggot Debridement Therapy is the medical use of live maggots for cleaning non-healing wounds.\r\n\n \n Examples:Removal of burnt skin."; + case CCO: return "Description:Companion animals, such as dogs, cats, and rabbits, which may be provided to patients to improve general mood, decrease depression and loneliness, and distract from stress-inducing concerns to improve quality of life."; + case SEE: return "Description:Dogs trained to assist persons who are seeing impaired or blind."; + case SNIFF: return "Description:Dogs trained or having the ability to detect imminent seizures or cancers in humans, probably as a result of volatile chemical (odors) given off by the malignancy of the host."; + case _CERTIFIEDENTITYTYPE: return "Defines types of certifications for all entities"; + case _CITIZENROLETYPE: return "A role type used to qualify a person's legal status within a country or nation."; + case CAS: return "A person who has fled his or her home country to find a safe place elsewhere."; + case CASM: return "A person who is someone of below legal age who has fled his or her home country, without his or her parents, to find a safe place elsewhere at time of categorization."; + case CN: return "A person who is legally recognized as a member of a nation or country, with associated rights and obligations."; + case CNRP: return "A foreigner who is present in a country (which is foreign to him/her) unlawfully or without the country's authorization (may be called an illegal alien)."; + case CNRPM: return "A person who is below legal age present in a country, without his or her parents, (which is foreign to him/her) unlawfully or without the country's authorization."; + case CPCA: return "A non-country member admitted to the territory of a nation or country as a non-resident for an explicit purpose."; + case CRP: return "A foreigner who is a resident of the country but does not have citizenship."; + case CRPM: return "A person who is a resident below legal age of the country without his or her parents and does not have citizenship."; + case _CONTACTROLETYPE: return "Types of contact for Role code \"CON\""; + case _ADMINISTRATIVECONTACTROLETYPE: return "A contact role used for business and/or administrative purposes."; + case BILL: return "A contact role used to identify a person within a Provider organization that can be contacted for billing purposes (e.g. about the content of the Invoice)."; + case ORG: return "A contact for an organization for administrative purposes. Contact role specifies a person acting as a liason for the organization.\r\n\n Example: HR Department representative."; + case PAYOR: return "A contact role used to identify a person within a Payor organization to whom this communication is addressed."; + case ECON: return "A contact designated for contact in emergent situations."; + case NOK: return "Played by an individual who is designated as the next of kin for another individual which scopes the role."; + case _IDENTIFIEDENTITYTYPE: return "Definition: A code representing the type of identifier that has been assigned to the identified entity (IDENT).\r\n\n \n Examples: Example values include Social Insurance Number, Product Catalog ID, Product Model Number."; + case _LOCATIONIDENTIFIEDENTITYROLECODE: return "Description:Describes types of identifiers other than the primary location registry identifier for a service delivery location. Identifiers may be assigned by a local service delivery organization, a formal body capable of accrediting the location for the capability to provide specific services or the identifier may be assigned at a jurisdictional level."; + case ACHFID: return "Description:Identifier assigned to a location by the organization responsible for accrediting the location."; + case JURID: return "Description:Identifier assigned to a location by a jurisdiction."; + case LOCHFID: return "Description:Identifier assigned to a location by a local party (which could be the facility itself or organization overseeing a group of facilities)."; + case _LIVINGSUBJECTPRODUCTIONCLASS: return "Code indicating the primary use for which a living subject is bred or grown"; + case BF: return "Cattle used for meat production"; + case BL: return "Chickens raised for meat"; + case BR: return "Breeding/genetic stock"; + case CO: return "Companion animals"; + case DA: return "Milk production"; + case DR: return "Draft animals"; + case DU: return "Dual purpose. Defined purposes based on species and breed"; + case FI: return "Animals raised for their fur, hair or skins"; + case LY: return "Chickens raised for egg production"; + case MT: return "Animals raised for meat production"; + case MU: return "Poultry flocks used for chick/poult production"; + case PL: return "Animals rasied for recreation"; + case RC: return "Animals raised for racing perfomance"; + case SH: return "Animals raised for shows"; + case VL: return "Cattle raised for veal meat production. Implicit is the husbandry method."; + case WL: return "Sheep, goats and other mammals raised for their fiber"; + case WO: return "Animals used to perform work"; + case _MEDICATIONGENERALIZATIONROLETYPE: return "Identifies the specific hierarchical relationship between the playing and scoping medications. \r\n\n \n Examples: Generic, Generic Formulation, Therapeutic Class, etc."; + case DC: return "Description:A categorization of medicinal products by their therapeutic properties and/or main therapeutic use."; + case GD: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients independent of strength, and form.\r\n\n The scoping entity identifies a unique combination of medicine ingredients; sometimes referred to as \"ingredient set\"."; + case GDF: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients and dose form, independent of strength of the ingredients. The scoping entity identifies a unique combination of medicine ingredients in a specific dose form."; + case GDS: return "Relates a manufactured drug product to the non-proprietary (generic) representation of is ingredients with their strength. The scoping entity identifies a unique combination of medicine ingredients with their strength."; + case GDSF: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form."; + case MGDSF: return "Relates a manufactured drug product to the non-proprietary (generic) representation of its ingredients with their strength in a specific dose form. The scoping entity identifies a unique combination of medicine ingredients with their strength in a single dose form."; + case _MEMBERROLETYPE: return "Types of membership for Role code \"MBR\""; + case TRB: return "A person who is a member of a tribe."; + case _PERSONALRELATIONSHIPROLETYPE: return "PersonalRelationshipRoleType"; + case FAMMEMB: return "A relationship between two people characterizing their \"familial\" relationship"; + case CHILD: return "The player of the role is a child of the scoping entity."; + case CHLDADOPT: return "The player of the role is a child taken into a family through legal means and raised by the scoping person (parent) as his or her own child."; + case DAUADOPT: return "The player of the role is a female child taken into a family through legal means and raised by the scoping person (parent) as his or her own child."; + case SONADOPT: return "The player of the role is a male child taken into a family through legal means and raised by the scoping person (parent) as his or her own child."; + case CHLDFOST: return "The player of the role is a child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties."; + case DAUFOST: return "The player of the role is a female child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties."; + case SONFOST: return "The player of the role is a male child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties."; + case DAUC: return "Description: The player of the role is a female child (of any type) of scoping entity (parent)"; + case DAU: return "The player of the role is a female offspring of the scoping entity (parent)."; + case STPDAU: return "The player of the role is a daughter of the scoping person's spouse by a previous union."; + case NCHILD: return "The player of the role is an offspring of the scoping entity as determined by birth."; + case SON: return "The player of the role is a male offspring of the scoping entity (parent)."; + case SONC: return "Description: The player of the role is a male child (of any type) of scoping entity (parent)"; + case STPSON: return "The player of the role is a son of the scoping person's spouse by a previous union."; + case STPCHLD: return "The player of the role is a child of the scoping person's spouse by a previous union."; + case EXT: return "Description: A family member not having an immediate genetic or legal relationship e.g. Aunt, cousin, great grandparent, grandchild, grandparent, niece, nephew or uncle."; + case AUNT: return "The player of the role is a sister of the scoping person's mother or father."; + case MAUNT: return "Description:The player of the role is a biological sister of the scoping person's biological mother."; + case PAUNT: return "Description:The player of the role is a biological sister of the scoping person's biological father."; + case COUSN: return "The player of the role is a relative of the scoping person descended from a common ancestor, such as a grandparent, by two or more steps in a diverging line."; + case MCOUSN: return "Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's mother's side, such as a grandparent, by two or more steps in a diverging line."; + case PCOUSN: return "Description:The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's father's side, such as a grandparent, by two or more steps in a diverging line."; + case GGRPRN: return "The player of the role is a parent of the scoping person's grandparent."; + case GGRFTH: return "The player of the role is the father of the scoping person's grandparent."; + case MGGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological mother's parent."; + case PGGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological father's parent."; + case GGRMTH: return "The player of the role is the mother of the scoping person's grandparent."; + case MGGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological mother's parent."; + case PGGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological father's parent."; + case MGGRPRN: return "Description:The player of the role is a biological parent of the scoping person's biological mother's parent."; + case PGGRPRN: return "Description:The player of the role is a biological parent of the scoping person's biological father's parent."; + case GRNDCHILD: return "The player of the role is a child of the scoping person's son or daughter."; + case GRNDDAU: return "The player of the role is a daughter of the scoping person's son or daughter."; + case GRNDSON: return "The player of the role is a son of the scoping person's son or daughter."; + case GRPRN: return "The player of the role is a parent of the scoping person's mother or father."; + case GRFTH: return "The player of the role is the father of the scoping person's mother or father."; + case MGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological mother."; + case PGRFTH: return "Description:The player of the role is the biological father of the scoping person's biological father."; + case GRMTH: return "The player of the role is the mother of the scoping person's mother or father."; + case MGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological mother."; + case PGRMTH: return "Description:The player of the role is the biological mother of the scoping person's biological father."; + case MGRPRN: return "Description:The player of the role is the biological parent of the scoping person's biological mother."; + case PGRPRN: return "Description:The player of the role is the biological parent of the scoping person's biological father."; + case INLAW: return "A relationship between an individual and a member of their spousal partner's immediate family."; + case CHLDINLAW: return "The player of the role is the spouse of scoping person's child."; + case DAUINLAW: return "The player of the role is the wife of scoping person's son."; + case SONINLAW: return "The player of the role is the husband of scoping person's daughter."; + case PRNINLAW: return "The player of the role is the parent of scoping person's husband or wife."; + case FTHINLAW: return "The player of the role is the father of the scoping person's husband or wife."; + case MTHINLAW: return "The player of the role is the mother of the scoping person's husband or wife."; + case SIBINLAW: return "The player of the role is: (1) a sibling of the scoping person's spouse, or (2) the spouse of the scoping person's sibling, or (3) the spouse of a sibling of the scoping person's spouse."; + case BROINLAW: return "The player of the role is: (1) a brother of the scoping person's spouse, or (2) the husband of the scoping person's sister, or (3) the husband of a sister of the scoping person's spouse."; + case SISINLAW: return "The player of the role is: (1) a sister of the scoping person's spouse, or (2) the wife of the scoping person's brother, or (3) the wife of a brother of the scoping person's spouse."; + case NIENEPH: return "The player of the role is a child of scoping person's brother or sister or of the brother or sister of the scoping person's spouse."; + case NEPHEW: return "The player of the role is a son of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse."; + case NIECE: return "The player of the role is a daughter of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse."; + case UNCLE: return "The player of the role is a brother of the scoping person's mother or father."; + case MUNCLE: return "Description:The player of the role is a biological brother of the scoping person's biological mother."; + case PUNCLE: return "Description:The player of the role is a biological brother of the scoping person's biological father."; + case PRN: return "The player of the role is one who begets, gives birth to, or nurtures and raises the scoping entity (child)."; + case ADOPTP: return "The player of the role (parent) has taken the scoper (child) into their family through legal means and raises them as his or her own child."; + case ADOPTF: return "The player of the role (father) is a male who has taken the scoper (child) into their family through legal means and raises them as his own child."; + case ADOPTM: return "The player of the role (father) is a female who has taken the scoper (child) into their family through legal means and raises them as her own child."; + case FTH: return "The player of the role is a male who begets or raises or nurtures the scoping entity (child)."; + case FTHFOST: return "The player of the role (parent) who is a male state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.\r\n\n The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child."; + case NFTH: return "The player of the role is a male who begets the scoping entity (child)."; + case NFTHF: return "Indicates the biologic male parent of a fetus."; + case STPFTH: return "The player of the role is the husband of scoping person's mother and not the scoping person's natural father."; + case MTH: return "The player of the role is a female who conceives, gives birth to, or raises and nurtures the scoping entity (child)."; + case GESTM: return "The player is a female whose womb carries the fetus of the scoper. Generally used when the gestational mother and natural mother are not the same."; + case MTHFOST: return "The player of the role (parent) who is a female state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.\r\n\n The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child."; + case NMTH: return "The player of the role is a female who conceives or gives birth to the scoping entity (child)."; + case NMTHF: return "The player is the biologic female parent of the scoping fetus."; + case STPMTH: return "The player of the role is the wife of scoping person's father and not the scoping person's natural mother."; + case NPRN: return "natural parent"; + case PRNFOST: return "The player of the role (parent) who is a state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.\r\n\n The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child."; + case STPPRN: return "The player of the role is the spouse of the scoping person's parent and not the scoping person's natural parent."; + case SIB: return "The player of the role shares one or both parents in common with the scoping entity."; + case BRO: return "The player of the role is a male sharing one or both parents in common with the scoping entity."; + case HBRO: return "The player of the role is a male related to the scoping entity by sharing only one biological parent."; + case NBRO: return "The player of the role is a male having the same biological parents as the scoping entity."; + case TWINBRO: return "The scoper was carried in the same womb as the male player and shares common biological parents."; + case FTWINBRO: return "The scoper was carried in the same womb as the male player and shares common biological parents but is the product of a distinct egg/sperm pair."; + case ITWINBRO: return "The male scoper is an offspring of the same egg-sperm pair as the male player."; + case STPBRO: return "The player of the role is a son of the scoping person's stepparent."; + case HSIB: return "The player of the role is related to the scoping entity by sharing only one biological parent."; + case HSIS: return "The player of the role is a female related to the scoping entity by sharing only one biological parent."; + case NSIB: return "The player of the role has both biological parents in common with the scoping entity."; + case NSIS: return "The player of the role is a female having the same biological parents as the scoping entity."; + case TWINSIS: return "The scoper was carried in the same womb as the female player and shares common biological parents."; + case FTWINSIS: return "The scoper was carried in the same womb as the female player and shares common biological parents but is the product of a distinct egg/sperm pair."; + case ITWINSIS: return "The female scoper is an offspring of the same egg-sperm pair as the female player."; + case TWIN: return "The scoper and player were carried in the same womb and shared common biological parents."; + case FTWIN: return "The scoper and player were carried in the same womb and share common biological parents but are the product of distinct egg/sperm pairs."; + case ITWIN: return "The scoper and player are offspring of the same egg-sperm pair."; + case SIS: return "The player of the role is a female sharing one or both parents in common with the scoping entity."; + case STPSIS: return "The player of the role is a daughter of the scoping person's stepparent."; + case STPSIB: return "The player of the role is a child of the scoping person's stepparent."; + case SIGOTHR: return "A person who is important to one's well being; especially a spouse or one in a similar relationship. (The player is the one who is important)"; + case DOMPART: return "The player of the role cohabits with the scoping person but is not the scoping person's spouse."; + case FMRSPS: return "Player of the role was previously joined to the scoping person in marriage and this marriage is now dissolved and inactive.\r\n\n \n Usage Note: This is significant to indicate as some jurisdictions have different legal requirements for former spouse to access the patient's record, from a general friend."; + case SPS: return "The player of the role is a marriage partner of the scoping person."; + case HUSB: return "The player of the role is a man joined to a woman (scoping person) in marriage."; + case WIFE: return "The player of the role is a woman joined to a man (scoping person) in marriage."; + case FRND: return "The player of the role is a person who is known, liked, and trusted by the scoping person."; + case NBOR: return "The player of the role lives near or next to the scoping person."; + case ONESELF: return "The relationship that a person has with his or her self."; + case ROOM: return "One who shares living quarters with the subject."; + case _POLICYORPROGRAMCOVERAGEROLETYPE: return "Description: A role recognized through the eligibility of an identified party for benefits covered under an insurance policy or a program based on meeting eligibility criteria.\r\n\n Eligibility as a covered party may be conditioned on the party meeting criteria to qualify for coverage under a policy or program, which may be mandated by law. These criteria may be: \r\n\n \n \n The sole basis for coverage, e.g., being differently abled may qualify a person for disability coverage\r\n\n \n \n May more fully qualify a covered party role e.g, being differently abled may qualify an adult child as a dependent\r\n\n \n \n May impact the level of coverage for a covered party under a policy or program, e.g., being differently abled may qualify a program eligible for additional benefits.\r\n\n \n \n \n Discussion: The Abstract Value Set \"CoverageRoleType\", which was developed for use in the Canadian realm \"pre-coordinate\" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., \"handicapped dependent\". These role.codes may only be used with COVPTY to avoid overlapping concepts that would result from using them to specify the specializations of COVPTY, e.g., the role.class DEPEN should not be used with the role.code family dependent because that relationship has overlapping concepts due to the role.code precoodination and is conveyed in FICO with the personal relationship role that has a PART role link to the covered party role. For the same reasons, the role.class DEPEN should not be used with the role.code HANDIC (handicapped dependent); the role.code DIFFABLE (differently abled) should be used instead.\r\n\n In summary, the coded concepts in the Abstract Value Set \"CoveredPartyRoleType\" can be \"post-coordinated\" with the \"RoleClassCoveredParty\" Abstract Value Set. Decoupling these concepts is intended to support an expansive range of covered party concepts and their semantic comparability."; + case _COVERAGEROLETYPE: return "Role recognized through the issuance of insurance coverage to an identified covered party who has this relationship with the policy holder such as the policy holder themselves (self), spouse, child, etc"; + case FAMDEP: return "The player of the role is dependent of the scoping entity."; + case HANDIC: return "Covered party is a dependent of the policy holder with a physical or mental disability causing a disadvantage that makes independent achievement unusually difficult."; + case INJ: return "Covered party is an injured party with a legal claim for compensation against a policy holder under an insurance policy."; + case SELF: return "Covered party is the policy holder. Also known as the subscriber."; + case SPON: return "Covered party is an individual that the policy holder has assumed responsibility for, such as foster child or legal ward."; + case STUD: return "Covered party to an insurance policy has coverage through full-time or part-time attendance at a recognized educational institution as defined by a particular insurance policy."; + case FSTUD: return "Covered party to an insurance policy has coverage through full-time attendance at a recognized educational institution as defined by a particular insurance policy."; + case PSTUD: return "Covered party to an insurance policy has coverage through part-time attendance at a recognized educational institution as defined by a particular insurance policy."; + case ADOPT: return "A child taken into one's family through legal means and raised as one's own child."; + case GCHILD: return "A child of one's son or daughter."; + case GPARNT: return "parent of a parent of the subject."; + case NAT: return "A child as determined by birth."; + case NIENE: return "A child of one's brother or sister or of the brother or sister of one's spouse."; + case PARNT: return "One that begets or brings forth offspring or a person who brings up and cares for for another (Webster's Collegiate Dictionary)"; + case SPSE: return "A marriage partner; a husband or wife."; + case STEP: return "A child receiving parental care and nurture from a person who is related to them through marriage to their parent."; + case _COVEREDPARTYROLETYPE: return "A role recognized through the eligibility of an identified living subject for benefits covered under an insurance policy or a program. Eligibility as a covered party may be conditioned on a relationship with (1) the policy holder such as the policy holder who is covered as an individual under a poliy or as a party sponsored for coverage by the policy holder.\r\n\n \n Example:An employee as a subscriber; or (2) on being scoped another covered party such as the subscriber, as in the case of a dependent. \r\n\n \n Discussion: The Abstract Value Set \"CoverageRoleType\", which was developed for use in the Canadian realm \"pre-coordinate\" coverage roles with other roles that a covered party must play in order to be eligible for coverage, e.g., \"handicapped dependent\". Other codes in the Abstract Value Set CoveredPartyRoleType domain can be \"post-coordinated\" with the EligiblePartyRoleType codes to denote comparable concepts. Decoupling the concepts is intended to support a wider range of concepts and semantic comparability of coded concepts."; + case _CLAIMANTCOVEREDPARTYROLETYPE: return "DescriptionA role recognized through the eligibility of a party play a claimant for benefits covered or provided under an insurance policy."; + case CRIMEVIC: return "Description: A person playing the role of program eligible under a program based on allegations of being the victim of a crime.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is \"program eligible\" and the person's status as a crime victim meets jurisdictional or program criteria."; + case INJWKR: return "Description: A person playing the role of program eligible under a workers compensation program based on the filing of work-related injury claim.\r\n\n \n Discussion: This CoveredPartyRoleType.code is used when the CoveredPartyRole class code is either \"program eligible\", a \"named insured\", and \"individual insured\", or \"dependent\", and the person's status as differently abled or \"handicapped\" meets jurisdictional, policy, or program criteria."; + case _DEPENDENTCOVEREDPARTYROLETYPE: return "Description: A role recognized through the eligibility of a party to play a dependent for benefits covered or provided under a health insurance policy because of an association with the subscriber that is recognized by the policy underwriter."; + case COCBEN: return "Description: A person playing the role of an individual insured with continuity of coverage under a policy which is being terminated based on loss of original status that was the basis for coverage. Criteria for qualifying for continuity of coverage may be set by law.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the person's status as a continuity of coverage beneficiary meets jurisdictional or policy criteria."; + case DIFFABL: return "Description: A person playing the role of program eligible under a program based on meeting criteria for health or functional limitation set by law or by the program.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\", \"named insured\", \"individual insured\", or \"dependent\", and the person's status as differently abled meets jurisdictional, policy, or program criteria."; + case WARD: return "Description: A person, who is a minor or is deemed incompetent, who plays the role of a program eligible where eligibility for coverage is based on meeting program eligibility criteria for status as a ward of a court or jurisdiction.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is a \"claimant\", \"program eligible\", a \"named insured\", an \"individual Insured\" or a \"dependent\", and the person's status as a ward meets program or policy criteria. In the case of a ward covered under a program providing financial or health benefits, a governmental agency may take temporary custody of a minor or incompetent for his/her protection and care, e.g., if the ward is suffering from neglect or abuse, or has been in trouble with the law."; + case _INDIVIDUALINSUREDPARTYROLETYPE: return "A role recognized through the eligibility of a party to play an individual insured for benefits covered or provided under an insurance policy where the party is also the policy holder."; + case RETIREE: return "Description: A person playing the role of an individual insured under a policy based on meeting criteria for the employment status of retired set by law or the policy.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the person's status as a retiree meets jurisdictional or policy criteria."; + case _PROGRAMELIGIBLEPARTYROLETYPE: return "Description:A role recognized through the eligibility of a party to play a program eligible for benefits covered or provided under a program."; + case INDIG: return "Description: A person playing the role of program eligible under a program based on aboriginal ancestry or as a member of an aboriginal community.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is \"program eligible\" and the person's status as a member of an indigenous people meets jurisdictional or program criteria."; + case MIL: return "Definition: A person playing the role of program eligible under a program based on military status.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the person's status as a member of the military meets jurisdictional or program criteria"; + case ACTMIL: return "Description: A person playing the role of program eligible under a program based on active military status.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the persons status as active duty military meets jurisdictional or program criteria."; + case RETMIL: return "Description: A person playing the role of program eligible under a program based on retired military status.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the persons status as retired military meets jurisdictional or program criteria."; + case VET: return "Description: A person playing the role of program eligible under a program based on status as a military veteran.\r\n\n \n Discussion: This CoveredPartyRoleType.code is typically used when the CoveredPartyRole class code is either \"program eligible\" or \"subscriber\" and the persons status as a veteran meets jurisdictional or program criteria."; + case _SUBSCRIBERCOVEREDPARTYROLETYPE: return "Description: A role recognized through the eligibility of a party to play a subscriber for benefits covered or provided under a health insurance policy."; + case _RESEARCHSUBJECTROLEBASIS: return "Specifies the administrative functionality within a formal experimental design for which the ResearchSubject role was established. Examples: screening - role is used for pre-enrollment evaluation portion of the design; enrolled - role is used for subjects admitted to the active treatment portion of the design."; + case ERL: return "Definition:The specific role being played by a research subject participating in the active treatment or primary data collection portion of a research study."; + case SCN: return "Definition:The specific role being played by a research subject participating in the pre-enrollment evaluation portion of a research study."; + case _SERVICEDELIVERYLOCATIONROLETYPE: return "A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered."; + case _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE: return "A role of a place that further classifies a setting that is intended to house the provision of services."; + case _DEDICATEDCLINICALLOCATIONROLETYPE: return "A role of a place that further classifies the clinical setting (e.g., cardiology clinic, primary care clinic, rehabilitation hospital, skilled nursing facility) in which care is delivered during an encounter."; + case DX: return "A practice setting where diagnostic procedures or therapeutic interventions are performed"; + case CVDX: return "A practice setting where cardiovascular diagnostic procedures or therapeutic interventions are performed (e.g., cardiac catheterization lab, echocardiography suite)"; + case CATH: return "Cardiac catheterization lab"; + case ECHO: return "Echocardiography lab"; + case GIDX: return "A practice setting where GI procedures (such as endoscopies) are performed"; + case ENDOS: return "(X12N 261QD0000N)"; + case RADDX: return "A practice setting where radiology services (diagnostic or therapeutic) are provided (X12N 261QR0200N)"; + case RADO: return "(X12N 261QX0203N)"; + case RNEU: return "Neuroradiology unit"; + case HOSP: return "An acute care institution that provides medical, surgical, or psychiatric care and treatment for the sick or the injured."; + case CHR: return "(1) A hospital including a physical plant and personnel that provides multidisciplinary diagnosis and treatment for diseases that have one or more of the following characteristics: is permanent; leaves residual disability; is caused by nonreversible pathological alteration; requires special training of the patient for rehabilitation; and/or may be expected to require a long period of supervision or care. In addition, patients require the safety, security, and shelter of these specialized inpatient or partial hospitalization settings. (2) A hospital that provides medical and skilled nursing services to patients with long-term illnesses who are not in an acute phase but who require an intensity of services not available in nursing homes"; + case GACH: return "(X12N 282N00000N)"; + case MHSP: return "A health care facility operated by the Department of Defense or other military operation."; + case PSYCHF: return "Healthcare facility that cares for patients with psychiatric illness(s)."; + case RH: return "(X12N 283X00000N)"; + case RHAT: return "Description: A location that plays the role of delivering services which may include life training and/or social support to people with addictions."; + case RHII: return "Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with intellectual and/or pervasive development disorders such as autism or severe behaviour disorder."; + case RHMAD: return "Description: A location that plays the role of delivering services which may social support services for adolescents who are pregnant or have child and are experiencing adaptation issues/difficulties in their current or eventual parenting role."; + case RHPI: return "Description: A location that plays the role of delivering services which may include adaptation, rehabilitation and social integration services for people with physical impairments."; + case RHPIH: return "Description: A location that plays the role of delivering services for people with hearing impairments."; + case RHPIMS: return "Description: A location that plays the role of delivering services for people with motor skill impairments."; + case RHPIVS: return "Description: A location that plays the role of delivering services for people with visual skill impairments."; + case RHYAD: return "Description: A location that plays the role of delivering services which may include life training and/or social support services for the adaption, rehabilitation and social integration of youths with adjustment difficulties."; + case HU: return "Hospital unit"; + case BMTU: return "Bone marrow transplant unit"; + case CCU: return "Coronary care unit"; + case CHEST: return "A specialty unit in hospital that focuses on chronic respirator patients and pulmonary failure"; + case EPIL: return "Epilepsy unit"; + case ER: return "The section of a health care facility for providing rapid treatment to victims of sudden illness or trauma."; + case ETU: return "Emergency trauma unit"; + case HD: return "Hemodialysis unit"; + case HLAB: return "Description: A location that plays the role of delivering services which may include tests done based on clinical specimens to get health information about a patient as pertaining to the diagnosis, treatment and prevention of disease. Hospital laboratories may be further divided into specialized units such as Anatomic Pathology, Microbiology, and Biochemistry."; + case INLAB: return "Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for a hospital visit longer than one day."; + case OUTLAB: return "Description: A location that plays the role of delivering services which may include tests are done on clinical specimens to get health information about a patient pertaining to the diagnosis, treatment, and prevention of disease for same day visits."; + case HRAD: return "Description: A location that plays the role of delivering services which may include the branch of medicine that uses ionizing and non-ionizing radiation to diagnose and treat diseases. The radiology unit may be further divided into subspecialties such as Imaging, Cardiovascular, Thoracic, and Ultrasound."; + case HUSCS: return "Description: A location that plays the role of delivering services which may include collecting specimens and/or samples from patients for laboratory testing purposes, but does not perform any tests or analysis functions."; + case ICU: return "Intensive care unit"; + case PEDICU: return "Pediatric intensive care unit"; + case PEDNICU: return "Pediatric neonatal intensive care unit"; + case INPHARM: return "Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for visits longer than one day. The distinction between inpatient pharmacies and retail (or outpatient) pharmacies is that they are part of a patient's continuity of care while staying in the hospital."; + case MBL: return "Description: A location that plays the role of delivering services which include biochemistry, hematology, microbiology, immunochemistry, and toxicology."; + case NCCS: return "Neurology critical care and stroke unit"; + case NS: return "Neurosurgery unit"; + case OUTPHARM: return "Description: A location that plays the role of delivering services which may include providing judicious, safe, efficacious, appropriate and cost effective use of medicines for treatment of patients for outpatient visits and may also be used for discharge prescriptions."; + case PEDU: return "Pediatric unit"; + case PHU: return "(X12N 273R00000N)"; + case RHU: return "Rehabilitation hospital unit"; + case SLEEP: return "(X12N 261QA1200N)"; + case NCCF: return "Nursing or custodial care facility"; + case SNF: return "(X12N 314000000N)"; + case OF: return "Outpatient facility"; + case ALL: return "Allergy clinic"; + case AMPUT: return "Amputee clinic"; + case BMTC: return "Bone marrow transplant clinic"; + case BREAST: return "Breast clinic"; + case CANC: return "Child and adolescent neurology clinic"; + case CAPC: return "Child and adolescent psychiatry clinic"; + case CARD: return "Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities"; + case PEDCARD: return "Pediatric cardiology clinic"; + case COAG: return "Coagulation clinic"; + case CRS: return "Colon and rectal surgery clinic"; + case DERM: return "Dermatology clinic"; + case ENDO: return "Endocrinology clinic"; + case PEDE: return "Pediatric endocrinology clinic"; + case ENT: return "Otorhinolaryngology clinic"; + case FMC: return "Family medicine clinic"; + case GI: return "Gastroenterology clinic"; + case PEDGI: return "Pediatric gastroenterology clinic"; + case GIM: return "General internal medicine clinic"; + case GYN: return "Gynecology clinic"; + case HEM: return "Hematology clinic"; + case PEDHEM: return "Pediatric hematology clinic"; + case HTN: return "Hypertension clinic"; + case IEC: return "Focuses on assessing disability"; + case INFD: return "Infectious disease clinic"; + case PEDID: return "Pediatric infectious disease clinic"; + case INV: return "Infertility clinic"; + case LYMPH: return "Lympedema clinic"; + case MGEN: return "Medical genetics clinic"; + case NEPH: return "Nephrology clinic"; + case PEDNEPH: return "Pediatric nephrology clinic"; + case NEUR: return "Neurology clinic"; + case OB: return "Obstetrics clinic"; + case OMS: return "Oral and maxillofacial surgery clinic"; + case ONCL: return "Medical oncology clinic"; + case PEDHO: return "Pediatric oncology clinic"; + case OPH: return "Opthalmology clinic"; + case OPTC: return "Description: A location that plays the role of delivering services which may include examination, diagnosis, treatment, management, and prevention of diseases and disorders of the eye as well as prescribing and fitting appropriate corrective lenses (glasses or contact lenses) as needed. Optometry clinics may also provide tests for visual field screening, measuring intra-ocular pressure and ophthalmoscopy, as and when required."; + case ORTHO: return "Orthopedics clinic"; + case HAND: return "Hand clinic"; + case PAINCL: return "(X12N 261QP3300N)"; + case PC: return "(X12N 261QP2300N)"; + case PEDC: return "Pediatrics clinic"; + case PEDRHEUM: return "Pediatric rheumatology clinic"; + case POD: return "(X12N 261QP1100N)"; + case PREV: return "Preventive medicine clinic"; + case PROCTO: return "Proctology clinic"; + case PROFF: return "Location where healthcare service was delivered, identified as the healthcare provider's practice office."; + case PROS: return "Prosthodontics clinic"; + case PSI: return "Psychology clinic"; + case PSY: return "Psychiatry clinic"; + case RHEUM: return "Rheumatology clinic"; + case SPMED: return "Sports medicine clinic"; + case SU: return "Surgery clinic"; + case PLS: return "Plastic surgery clinic"; + case URO: return "Urology clinic"; + case TR: return "Transplant clinic"; + case TRAVEL: return "Travel and geographic medicine clinic"; + case WND: return "Wound clinic"; + case RTF: return "Residential treatment facility"; + case PRC: return "Pain rehabilitation center"; + case SURF: return "(X12N 324500000N)"; + case _DEDICATEDNONCLINICALLOCATIONROLETYPE: return "A role of a place that further classifies a setting that is intended to house the provision of non-clinical services."; + case DADDR: return "Location address where medical supplies were transported to for use."; + case MOBL: return "Location (mobile) where healthcare service was delivered."; + case AMB: return "Location (mobile) where healthcare service was delivered, identified specifically as an ambulance."; + case PHARM: return "Location where healthcare service was delivered, identified as a pharmacy."; + case _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE: return "IncidentalServiceDeliveryLocationRoleType"; + case ACC: return "Location of an accident where healthcare service was delivered, such as a roadside."; + case COMM: return "Community location where healthcare is delivered."; + case CSC: return "Description: A location that plays the role of delivering services which may include providing front-line services to the population of a defined geographic area such as: healthcare services and social services, preventive or curative, rehabilitation or reintegration."; + case PTRES: return "location where healthcare was delivered which is the residence of the Patient."; + case SCHOOL: return "Location where healthcare service was delivered, identified as a school or educational facility."; + case UPC: return "Description: A location that plays the role of delivering services which may include: social emergency services required for a young person as required under any jurisdictional youth laws, child placement, and family mediation in the defined geographical area the SDL is responsible for. It may provide expertise in a judiciary setting on child custody, adoption and biological history research."; + case WORK: return "Location where healthcare service was delivered, identified as a work place."; + case _SPECIMENROLETYPE: return "SpecimenRoleType"; + case C: return "A specimen used for initial calibration settings of an instrument"; + case G: return "A set of patient samples in which the individuals of the group may or may not be identified."; + case L: return "Aliquots of individual specimens combined to form a single specimen representing all of the included individuals."; + case P: return "A specimen that has been collected from a patient."; + case Q: return "A specimen specifically used to verify the sensitivity, specificity, accuracy or other perfomance parameter of a diagnostic test."; + case B: return "Quality Control specimen submitted to the lab whose identity and composition is not known to the lab."; + case E: return "An electronically simulated QC specimen"; + case F: return "Specimen used for testing proficiency of an organization performing testing (how does this differ from O?)"; + case O: return "A specimen used for evaluation of operator proficiency (operator in what context?)"; + case V: return "A specimen used for periodic calibration checks of instruments"; + case R: return "A portion of an original patent sample that is tested at the same time as the original sample"; + case CLAIM: return "A party that makes a claim for coverage under a policy."; + case COMMUNITYLABORATORY: return "Community Laboratory"; + case GT: return "An individual or organization that makes or gives a promise, assurance, pledge to pay or has paid the healthcare service provider."; + case HOMEHEALTH: return "Home Health"; + case LABORATORY: return "Laboratory"; + case PATHOLOGIST: return "Pathologist"; + case PH: return "Policy holder for the insurance policy."; + case PHLEBOTOMIST: return "Phlebotomist"; + case PROG: return "A party that meets the eligibility criteria for coverage under a program."; + case PT: return "The recipient for the service(s) and/or product(s) when they are not the covered party."; + case SUBJECT: return "Self"; + case THIRDPARTY: return "Third Party"; + case DEP: return ""; + case DEPEN: return "A party covered under a policy based on association with a subscriber."; + case FM: return "A member of the covered party's family. This could be the spouse, a parent, a grand parent, a sibling, etc."; + case INDIV: return "A party covered under a policy as the policyholder."; + case NAMED: return "A party to an insurance policy to whom the insurer agrees to indemnify for losses, provides benefits for, or renders services."; + case PSYCHCF: return ""; + case SUBSCR: return "A party covered under a policy based on association with a sponsor who is the policy holder, and whose association may provide for the eligibility of dependents for coverage"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _AFFILIATIONROLETYPE: return "AffiliationRoleType"; + case _AGENTROLETYPE: return "AgentRoleType"; + case AMENDER: return "amender"; + case CLASSIFIER: return "classifier"; + case CONSENTER: return "consenter"; + case CONSWIT: return "consent witness"; + case COPART: return "co-participant"; + case DECLASSIFIER: return "declassifier"; + case DELEGATEE: return "delegatee"; + case DELEGATOR: return "delegator"; + case DOWNGRDER: return "downgrader"; + case DRIVCLASSIFIER: return "derivative classifier"; + case GRANTEE: return "grantee"; + case GRANTOR: return "grantor"; + case INTPRTER: return "interpreter"; + case REVIEWER: return "reviewer"; + case VALIDATOR: return "validator"; + case _COVERAGESPONSORROLETYPE: return "CoverageSponsorRoleType"; + case FULLINS: return "Fully insured coverage sponsor"; + case SELFINS: return "Self insured coverage sponsor"; + case _PAYORROLETYPE: return "PayorRoleType"; + case ENROLBKR: return "Enrollment Broker"; + case TPA: return "Third party administrator"; + case UMO: return "Utilization management organization"; + case RESPRSN: return "responsible party"; + case EXCEST: return "executor of estate"; + case GUADLTM: return "guardian ad lidem"; + case GUARD: return "guardian"; + case POWATT: return "power of attorney"; + case DPOWATT: return "durable power of attorney"; + case HPOWATT: return "healthcare power of attorney"; + case SPOWATT: return "special power of attorney"; + case _ASSIGNEDROLETYPE: return "AssignedRoleType"; + case _ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE: return "AssignedNonPersonLivingSubjectRoleType"; + case ASSIST: return "Assistive non-person living subject"; + case BIOTH: return "Biotherapeutic non-person living subject"; + case ANTIBIOT: return "Antibiotic"; + case DEBR: return "Debridement"; + case CCO: return "Clinical Companion"; + case SEE: return "Seeing"; + case SNIFF: return "Sniffing"; + case _CERTIFIEDENTITYTYPE: return "CertifiedEntityType"; + case _CITIZENROLETYPE: return "CitizenRoleType"; + case CAS: return "asylum seeker"; + case CASM: return "single minor asylum seeker"; + case CN: return "national"; + case CNRP: return "non-country member without residence permit"; + case CNRPM: return "non-country member minor without residence permit"; + case CPCA: return "permit card applicant"; + case CRP: return "non-country member with residence permit"; + case CRPM: return "non-country member minor with residence permit"; + case _CONTACTROLETYPE: return "ContactRoleType"; + case _ADMINISTRATIVECONTACTROLETYPE: return "AdministrativeContactRoleType"; + case BILL: return "Billing Contact"; + case ORG: return "organizational contact"; + case PAYOR: return "Payor Contact"; + case ECON: return "emergency contact"; + case NOK: return "next of kin"; + case _IDENTIFIEDENTITYTYPE: return "IdentifiedEntityType"; + case _LOCATIONIDENTIFIEDENTITYROLECODE: return "LocationIdentifiedEntityRoleCode"; + case ACHFID: return "accreditation location identifier"; + case JURID: return "jurisdiction location identifier"; + case LOCHFID: return "local location identifier"; + case _LIVINGSUBJECTPRODUCTIONCLASS: return "LivingSubjectProductionClass"; + case BF: return "Beef"; + case BL: return "Broiler"; + case BR: return "Breeder"; + case CO: return "Companion"; + case DA: return "Dairy"; + case DR: return "Draft"; + case DU: return "Dual"; + case FI: return "Fiber"; + case LY: return "Layer"; + case MT: return "Meat"; + case MU: return "Multiplier"; + case PL: return "Pleasure"; + case RC: return "Racing"; + case SH: return "Show"; + case VL: return "Veal"; + case WL: return "Wool"; + case WO: return "Working"; + case _MEDICATIONGENERALIZATIONROLETYPE: return "MedicationGeneralizationRoleType"; + case DC: return "therapeutic class"; + case GD: return "generic drug"; + case GDF: return "generic drug form"; + case GDS: return "generic drug strength"; + case GDSF: return "generic drug strength form"; + case MGDSF: return "manufactured drug strength form"; + case _MEMBERROLETYPE: return "MemberRoleType"; + case TRB: return "Tribal Member"; + case _PERSONALRELATIONSHIPROLETYPE: return "PersonalRelationshipRoleType"; + case FAMMEMB: return "family member"; + case CHILD: return "child"; + case CHLDADOPT: return "adopted child"; + case DAUADOPT: return "adopted daughter"; + case SONADOPT: return "adopted son"; + case CHLDFOST: return "foster child"; + case DAUFOST: return "foster daughter"; + case SONFOST: return "foster son"; + case DAUC: return "daughter"; + case DAU: return "natural daughter"; + case STPDAU: return "stepdaughter"; + case NCHILD: return "natural child"; + case SON: return "natural son"; + case SONC: return "son"; + case STPSON: return "stepson"; + case STPCHLD: return "step child"; + case EXT: return "extended family member"; + case AUNT: return "aunt"; + case MAUNT: return "maternal aunt"; + case PAUNT: return "paternal aunt"; + case COUSN: return "cousin"; + case MCOUSN: return "maternal cousin"; + case PCOUSN: return "paternal cousin"; + case GGRPRN: return "great grandparent"; + case GGRFTH: return "great grandfather"; + case MGGRFTH: return "maternal great-grandfather"; + case PGGRFTH: return "paternal great-grandfather"; + case GGRMTH: return "great grandmother"; + case MGGRMTH: return "maternal great-grandmother"; + case PGGRMTH: return "paternal great-grandmother"; + case MGGRPRN: return "maternal great-grandparent"; + case PGGRPRN: return "paternal great-grandparent"; + case GRNDCHILD: return "grandchild"; + case GRNDDAU: return "granddaughter"; + case GRNDSON: return "grandson"; + case GRPRN: return "grandparent"; + case GRFTH: return "grandfather"; + case MGRFTH: return "maternal grandfather"; + case PGRFTH: return "paternal grandfather"; + case GRMTH: return "grandmother"; + case MGRMTH: return "maternal grandmother"; + case PGRMTH: return "paternal grandmother"; + case MGRPRN: return "maternal grandparent"; + case PGRPRN: return "paternal grandparent"; + case INLAW: return "inlaw"; + case CHLDINLAW: return "child-in-law"; + case DAUINLAW: return "daughter in-law"; + case SONINLAW: return "son in-law"; + case PRNINLAW: return "parent in-law"; + case FTHINLAW: return "father-in-law"; + case MTHINLAW: return "mother-in-law"; + case SIBINLAW: return "sibling in-law"; + case BROINLAW: return "brother-in-law"; + case SISINLAW: return "sister-in-law"; + case NIENEPH: return "niece/nephew"; + case NEPHEW: return "nephew"; + case NIECE: return "niece"; + case UNCLE: return "uncle"; + case MUNCLE: return "maternal uncle"; + case PUNCLE: return "paternal uncle"; + case PRN: return "parent"; + case ADOPTP: return "adoptive parent"; + case ADOPTF: return "adoptive father"; + case ADOPTM: return "adoptive mother"; + case FTH: return "father"; + case FTHFOST: return "foster father"; + case NFTH: return "natural father"; + case NFTHF: return "natural father of fetus"; + case STPFTH: return "stepfather"; + case MTH: return "mother"; + case GESTM: return "gestational mother"; + case MTHFOST: return "foster mother"; + case NMTH: return "natural mother"; + case NMTHF: return "natural mother of fetus"; + case STPMTH: return "stepmother"; + case NPRN: return "natural parent"; + case PRNFOST: return "foster parent"; + case STPPRN: return "step parent"; + case SIB: return "sibling"; + case BRO: return "brother"; + case HBRO: return "half-brother"; + case NBRO: return "natural brother"; + case TWINBRO: return "twin brother"; + case FTWINBRO: return "fraternal twin brother"; + case ITWINBRO: return "identical twin brother"; + case STPBRO: return "stepbrother"; + case HSIB: return "half-sibling"; + case HSIS: return "half-sister"; + case NSIB: return "natural sibling"; + case NSIS: return "natural sister"; + case TWINSIS: return "twin sister"; + case FTWINSIS: return "fraternal twin sister"; + case ITWINSIS: return "identical twin sister"; + case TWIN: return "twin"; + case FTWIN: return "fraternal twin"; + case ITWIN: return "identical twin"; + case SIS: return "sister"; + case STPSIS: return "stepsister"; + case STPSIB: return "step sibling"; + case SIGOTHR: return "significant other"; + case DOMPART: return "domestic partner"; + case FMRSPS: return "former spouse"; + case SPS: return "spouse"; + case HUSB: return "husband"; + case WIFE: return "wife"; + case FRND: return "unrelated friend"; + case NBOR: return "neighbor"; + case ONESELF: return "self"; + case ROOM: return "Roommate"; + case _POLICYORPROGRAMCOVERAGEROLETYPE: return "PolicyOrProgramCoverageRoleType"; + case _COVERAGEROLETYPE: return "CoverageRoleType"; + case FAMDEP: return "family dependent"; + case HANDIC: return "handicapped dependent"; + case INJ: return "injured plaintiff"; + case SELF: return "self"; + case SPON: return "sponsored dependent"; + case STUD: return "student"; + case FSTUD: return "full-time student"; + case PSTUD: return "part-time student"; + case ADOPT: return "adopted child"; + case GCHILD: return "grandchild"; + case GPARNT: return "grandparent"; + case NAT: return "natural child"; + case NIENE: return "niece/nephew"; + case PARNT: return "parent"; + case SPSE: return "spouse"; + case STEP: return "step child"; + case _COVEREDPARTYROLETYPE: return "covered party role type"; + case _CLAIMANTCOVEREDPARTYROLETYPE: return "ClaimantCoveredPartyRoleType"; + case CRIMEVIC: return "crime victim"; + case INJWKR: return "injured worker"; + case _DEPENDENTCOVEREDPARTYROLETYPE: return "DependentCoveredPartyRoleType"; + case COCBEN: return "continuity of coverage beneficiary"; + case DIFFABL: return "differently abled"; + case WARD: return "ward"; + case _INDIVIDUALINSUREDPARTYROLETYPE: return "IndividualInsuredPartyRoleType"; + case RETIREE: return "retiree"; + case _PROGRAMELIGIBLEPARTYROLETYPE: return "ProgramEligiblePartyRoleType"; + case INDIG: return "member of an indigenous people"; + case MIL: return "military"; + case ACTMIL: return "active duty military"; + case RETMIL: return "retired military"; + case VET: return "veteran"; + case _SUBSCRIBERCOVEREDPARTYROLETYPE: return "SubscriberCoveredPartyRoleType"; + case _RESEARCHSUBJECTROLEBASIS: return "ResearchSubjectRoleBasis"; + case ERL: return "enrollment"; + case SCN: return "screening"; + case _SERVICEDELIVERYLOCATIONROLETYPE: return "ServiceDeliveryLocationRoleType"; + case _DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE: return "DedicatedServiceDeliveryLocationRoleType"; + case _DEDICATEDCLINICALLOCATIONROLETYPE: return "DedicatedClinicalLocationRoleType"; + case DX: return "Diagnostics or therapeutics unit"; + case CVDX: return "Cardiovascular diagnostics or therapeutics unit"; + case CATH: return "Cardiac catheterization lab"; + case ECHO: return "Echocardiography lab"; + case GIDX: return "Gastroenterology diagnostics or therapeutics lab"; + case ENDOS: return "Endoscopy lab"; + case RADDX: return "Radiology diagnostics or therapeutics unit"; + case RADO: return "Radiation oncology unit"; + case RNEU: return "Neuroradiology unit"; + case HOSP: return "Hospital"; + case CHR: return "Chronic Care Facility"; + case GACH: return "Hospitals; General Acute Care Hospital"; + case MHSP: return "Military Hospital"; + case PSYCHF: return "Psychatric Care Facility"; + case RH: return "Rehabilitation hospital"; + case RHAT: return "addiction treatment center"; + case RHII: return "intellectual impairment center"; + case RHMAD: return "parents with adjustment difficulties center"; + case RHPI: return "physical impairment center"; + case RHPIH: return "physical impairment - hearing center"; + case RHPIMS: return "physical impairment - motor skills center"; + case RHPIVS: return "physical impairment - visual skills center"; + case RHYAD: return "youths with adjustment difficulties center"; + case HU: return "Hospital unit"; + case BMTU: return "Bone marrow transplant unit"; + case CCU: return "Coronary care unit"; + case CHEST: return "Chest unit"; + case EPIL: return "Epilepsy unit"; + case ER: return "Emergency room"; + case ETU: return "Emergency trauma unit"; + case HD: return "Hemodialysis unit"; + case HLAB: return "hospital laboratory"; + case INLAB: return "inpatient laboratory"; + case OUTLAB: return "outpatient laboratory"; + case HRAD: return "radiology unit"; + case HUSCS: return "specimen collection site"; + case ICU: return "Intensive care unit"; + case PEDICU: return "Pediatric intensive care unit"; + case PEDNICU: return "Pediatric neonatal intensive care unit"; + case INPHARM: return "inpatient pharmacy"; + case MBL: return "medical laboratory"; + case NCCS: return "Neurology critical care and stroke unit"; + case NS: return "Neurosurgery unit"; + case OUTPHARM: return "outpatient pharmacy"; + case PEDU: return "Pediatric unit"; + case PHU: return "Psychiatric hospital unit"; + case RHU: return "Rehabilitation hospital unit"; + case SLEEP: return "Sleep disorders unit"; + case NCCF: return "Nursing or custodial care facility"; + case SNF: return "Skilled nursing facility"; + case OF: return "Outpatient facility"; + case ALL: return "Allergy clinic"; + case AMPUT: return "Amputee clinic"; + case BMTC: return "Bone marrow transplant clinic"; + case BREAST: return "Breast clinic"; + case CANC: return "Child and adolescent neurology clinic"; + case CAPC: return "Child and adolescent psychiatry clinic"; + case CARD: return "Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities"; + case PEDCARD: return "Pediatric cardiology clinic"; + case COAG: return "Coagulation clinic"; + case CRS: return "Colon and rectal surgery clinic"; + case DERM: return "Dermatology clinic"; + case ENDO: return "Endocrinology clinic"; + case PEDE: return "Pediatric endocrinology clinic"; + case ENT: return "Otorhinolaryngology clinic"; + case FMC: return "Family medicine clinic"; + case GI: return "Gastroenterology clinic"; + case PEDGI: return "Pediatric gastroenterology clinic"; + case GIM: return "General internal medicine clinic"; + case GYN: return "Gynecology clinic"; + case HEM: return "Hematology clinic"; + case PEDHEM: return "Pediatric hematology clinic"; + case HTN: return "Hypertension clinic"; + case IEC: return "Impairment evaluation center"; + case INFD: return "Infectious disease clinic"; + case PEDID: return "Pediatric infectious disease clinic"; + case INV: return "Infertility clinic"; + case LYMPH: return "Lympedema clinic"; + case MGEN: return "Medical genetics clinic"; + case NEPH: return "Nephrology clinic"; + case PEDNEPH: return "Pediatric nephrology clinic"; + case NEUR: return "Neurology clinic"; + case OB: return "Obstetrics clinic"; + case OMS: return "Oral and maxillofacial surgery clinic"; + case ONCL: return "Medical oncology clinic"; + case PEDHO: return "Pediatric oncology clinic"; + case OPH: return "Opthalmology clinic"; + case OPTC: return "optometry clinic"; + case ORTHO: return "Orthopedics clinic"; + case HAND: return "Hand clinic"; + case PAINCL: return "Pain clinic"; + case PC: return "Primary care clinic"; + case PEDC: return "Pediatrics clinic"; + case PEDRHEUM: return "Pediatric rheumatology clinic"; + case POD: return "Podiatry clinic"; + case PREV: return "Preventive medicine clinic"; + case PROCTO: return "Proctology clinic"; + case PROFF: return "Provider's Office"; + case PROS: return "Prosthodontics clinic"; + case PSI: return "Psychology clinic"; + case PSY: return "Psychiatry clinic"; + case RHEUM: return "Rheumatology clinic"; + case SPMED: return "Sports medicine clinic"; + case SU: return "Surgery clinic"; + case PLS: return "Plastic surgery clinic"; + case URO: return "Urology clinic"; + case TR: return "Transplant clinic"; + case TRAVEL: return "Travel and geographic medicine clinic"; + case WND: return "Wound clinic"; + case RTF: return "Residential treatment facility"; + case PRC: return "Pain rehabilitation center"; + case SURF: return "Substance use rehabilitation facility"; + case _DEDICATEDNONCLINICALLOCATIONROLETYPE: return "DedicatedNonClinicalLocationRoleType"; + case DADDR: return "Delivery Address"; + case MOBL: return "Mobile Unit"; + case AMB: return "Ambulance"; + case PHARM: return "Pharmacy"; + case _INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE: return "IncidentalServiceDeliveryLocationRoleType"; + case ACC: return "accident site"; + case COMM: return "Community Location"; + case CSC: return "community service center"; + case PTRES: return "Patient's Residence"; + case SCHOOL: return "school"; + case UPC: return "underage protection center"; + case WORK: return "work site"; + case _SPECIMENROLETYPE: return "SpecimenRoleType"; + case C: return "Calibrator"; + case G: return "Group"; + case L: return "Pool"; + case P: return "Patient"; + case Q: return "Quality Control"; + case B: return "Blind"; + case E: return "Electronic QC"; + case F: return "Filler Proficiency"; + case O: return "Operator Proficiency"; + case V: return "Verifying"; + case R: return "Replicate"; + case CLAIM: return "claimant"; + case COMMUNITYLABORATORY: return "Community Laboratory"; + case GT: return "Guarantor"; + case HOMEHEALTH: return "Home Health"; + case LABORATORY: return "Laboratory"; + case PATHOLOGIST: return "Pathologist"; + case PH: return "Policy Holder"; + case PHLEBOTOMIST: return "Phlebotomist"; + case PROG: return "program eligible"; + case PT: return "Patient"; + case SUBJECT: return "Self"; + case THIRDPARTY: return "Third Party"; + case DEP: return "DEP"; + case DEPEN: return "dependent"; + case FM: return "Family Member"; + case INDIV: return "individual"; + case NAMED: return "named insured"; + case PSYCHCF: return "PSYCHCF"; + case SUBSCR: return "subscriber"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleCodeEnumFactory.java new file mode 100644 index 00000000000..c2f73d2787d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleCodeEnumFactory.java @@ -0,0 +1,1642 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RoleCodeEnumFactory implements EnumFactory { + + public V3RoleCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_AffiliationRoleType".equals(codeString)) + return V3RoleCode._AFFILIATIONROLETYPE; + if ("_AgentRoleType".equals(codeString)) + return V3RoleCode._AGENTROLETYPE; + if ("AMENDER".equals(codeString)) + return V3RoleCode.AMENDER; + if ("CLASSIFIER".equals(codeString)) + return V3RoleCode.CLASSIFIER; + if ("CONSENTER".equals(codeString)) + return V3RoleCode.CONSENTER; + if ("CONSWIT".equals(codeString)) + return V3RoleCode.CONSWIT; + if ("COPART".equals(codeString)) + return V3RoleCode.COPART; + if ("DECLASSIFIER".equals(codeString)) + return V3RoleCode.DECLASSIFIER; + if ("DELEGATEE".equals(codeString)) + return V3RoleCode.DELEGATEE; + if ("DELEGATOR".equals(codeString)) + return V3RoleCode.DELEGATOR; + if ("DOWNGRDER".equals(codeString)) + return V3RoleCode.DOWNGRDER; + if ("DRIVCLASSIFIER".equals(codeString)) + return V3RoleCode.DRIVCLASSIFIER; + if ("GRANTEE".equals(codeString)) + return V3RoleCode.GRANTEE; + if ("GRANTOR".equals(codeString)) + return V3RoleCode.GRANTOR; + if ("INTPRTER".equals(codeString)) + return V3RoleCode.INTPRTER; + if ("REVIEWER".equals(codeString)) + return V3RoleCode.REVIEWER; + if ("VALIDATOR".equals(codeString)) + return V3RoleCode.VALIDATOR; + if ("_CoverageSponsorRoleType".equals(codeString)) + return V3RoleCode._COVERAGESPONSORROLETYPE; + if ("FULLINS".equals(codeString)) + return V3RoleCode.FULLINS; + if ("SELFINS".equals(codeString)) + return V3RoleCode.SELFINS; + if ("_PayorRoleType".equals(codeString)) + return V3RoleCode._PAYORROLETYPE; + if ("ENROLBKR".equals(codeString)) + return V3RoleCode.ENROLBKR; + if ("TPA".equals(codeString)) + return V3RoleCode.TPA; + if ("UMO".equals(codeString)) + return V3RoleCode.UMO; + if ("RESPRSN".equals(codeString)) + return V3RoleCode.RESPRSN; + if ("EXCEST".equals(codeString)) + return V3RoleCode.EXCEST; + if ("GUADLTM".equals(codeString)) + return V3RoleCode.GUADLTM; + if ("GUARD".equals(codeString)) + return V3RoleCode.GUARD; + if ("POWATT".equals(codeString)) + return V3RoleCode.POWATT; + if ("DPOWATT".equals(codeString)) + return V3RoleCode.DPOWATT; + if ("HPOWATT".equals(codeString)) + return V3RoleCode.HPOWATT; + if ("SPOWATT".equals(codeString)) + return V3RoleCode.SPOWATT; + if ("_AssignedRoleType".equals(codeString)) + return V3RoleCode._ASSIGNEDROLETYPE; + if ("_AssignedNonPersonLivingSubjectRoleType".equals(codeString)) + return V3RoleCode._ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE; + if ("ASSIST".equals(codeString)) + return V3RoleCode.ASSIST; + if ("BIOTH".equals(codeString)) + return V3RoleCode.BIOTH; + if ("ANTIBIOT".equals(codeString)) + return V3RoleCode.ANTIBIOT; + if ("DEBR".equals(codeString)) + return V3RoleCode.DEBR; + if ("CCO".equals(codeString)) + return V3RoleCode.CCO; + if ("SEE".equals(codeString)) + return V3RoleCode.SEE; + if ("SNIFF".equals(codeString)) + return V3RoleCode.SNIFF; + if ("_CertifiedEntityType".equals(codeString)) + return V3RoleCode._CERTIFIEDENTITYTYPE; + if ("_CitizenRoleType".equals(codeString)) + return V3RoleCode._CITIZENROLETYPE; + if ("CAS".equals(codeString)) + return V3RoleCode.CAS; + if ("CASM".equals(codeString)) + return V3RoleCode.CASM; + if ("CN".equals(codeString)) + return V3RoleCode.CN; + if ("CNRP".equals(codeString)) + return V3RoleCode.CNRP; + if ("CNRPM".equals(codeString)) + return V3RoleCode.CNRPM; + if ("CPCA".equals(codeString)) + return V3RoleCode.CPCA; + if ("CRP".equals(codeString)) + return V3RoleCode.CRP; + if ("CRPM".equals(codeString)) + return V3RoleCode.CRPM; + if ("_ContactRoleType".equals(codeString)) + return V3RoleCode._CONTACTROLETYPE; + if ("_AdministrativeContactRoleType".equals(codeString)) + return V3RoleCode._ADMINISTRATIVECONTACTROLETYPE; + if ("BILL".equals(codeString)) + return V3RoleCode.BILL; + if ("ORG".equals(codeString)) + return V3RoleCode.ORG; + if ("PAYOR".equals(codeString)) + return V3RoleCode.PAYOR; + if ("ECON".equals(codeString)) + return V3RoleCode.ECON; + if ("NOK".equals(codeString)) + return V3RoleCode.NOK; + if ("_IdentifiedEntityType".equals(codeString)) + return V3RoleCode._IDENTIFIEDENTITYTYPE; + if ("_LocationIdentifiedEntityRoleCode".equals(codeString)) + return V3RoleCode._LOCATIONIDENTIFIEDENTITYROLECODE; + if ("ACHFID".equals(codeString)) + return V3RoleCode.ACHFID; + if ("JURID".equals(codeString)) + return V3RoleCode.JURID; + if ("LOCHFID".equals(codeString)) + return V3RoleCode.LOCHFID; + if ("_LivingSubjectProductionClass".equals(codeString)) + return V3RoleCode._LIVINGSUBJECTPRODUCTIONCLASS; + if ("BF".equals(codeString)) + return V3RoleCode.BF; + if ("BL".equals(codeString)) + return V3RoleCode.BL; + if ("BR".equals(codeString)) + return V3RoleCode.BR; + if ("CO".equals(codeString)) + return V3RoleCode.CO; + if ("DA".equals(codeString)) + return V3RoleCode.DA; + if ("DR".equals(codeString)) + return V3RoleCode.DR; + if ("DU".equals(codeString)) + return V3RoleCode.DU; + if ("FI".equals(codeString)) + return V3RoleCode.FI; + if ("LY".equals(codeString)) + return V3RoleCode.LY; + if ("MT".equals(codeString)) + return V3RoleCode.MT; + if ("MU".equals(codeString)) + return V3RoleCode.MU; + if ("PL".equals(codeString)) + return V3RoleCode.PL; + if ("RC".equals(codeString)) + return V3RoleCode.RC; + if ("SH".equals(codeString)) + return V3RoleCode.SH; + if ("VL".equals(codeString)) + return V3RoleCode.VL; + if ("WL".equals(codeString)) + return V3RoleCode.WL; + if ("WO".equals(codeString)) + return V3RoleCode.WO; + if ("_MedicationGeneralizationRoleType".equals(codeString)) + return V3RoleCode._MEDICATIONGENERALIZATIONROLETYPE; + if ("DC".equals(codeString)) + return V3RoleCode.DC; + if ("GD".equals(codeString)) + return V3RoleCode.GD; + if ("GDF".equals(codeString)) + return V3RoleCode.GDF; + if ("GDS".equals(codeString)) + return V3RoleCode.GDS; + if ("GDSF".equals(codeString)) + return V3RoleCode.GDSF; + if ("MGDSF".equals(codeString)) + return V3RoleCode.MGDSF; + if ("_MemberRoleType".equals(codeString)) + return V3RoleCode._MEMBERROLETYPE; + if ("TRB".equals(codeString)) + return V3RoleCode.TRB; + if ("_PersonalRelationshipRoleType".equals(codeString)) + return V3RoleCode._PERSONALRELATIONSHIPROLETYPE; + if ("FAMMEMB".equals(codeString)) + return V3RoleCode.FAMMEMB; + if ("CHILD".equals(codeString)) + return V3RoleCode.CHILD; + if ("CHLDADOPT".equals(codeString)) + return V3RoleCode.CHLDADOPT; + if ("DAUADOPT".equals(codeString)) + return V3RoleCode.DAUADOPT; + if ("SONADOPT".equals(codeString)) + return V3RoleCode.SONADOPT; + if ("CHLDFOST".equals(codeString)) + return V3RoleCode.CHLDFOST; + if ("DAUFOST".equals(codeString)) + return V3RoleCode.DAUFOST; + if ("SONFOST".equals(codeString)) + return V3RoleCode.SONFOST; + if ("DAUC".equals(codeString)) + return V3RoleCode.DAUC; + if ("DAU".equals(codeString)) + return V3RoleCode.DAU; + if ("STPDAU".equals(codeString)) + return V3RoleCode.STPDAU; + if ("NCHILD".equals(codeString)) + return V3RoleCode.NCHILD; + if ("SON".equals(codeString)) + return V3RoleCode.SON; + if ("SONC".equals(codeString)) + return V3RoleCode.SONC; + if ("STPSON".equals(codeString)) + return V3RoleCode.STPSON; + if ("STPCHLD".equals(codeString)) + return V3RoleCode.STPCHLD; + if ("EXT".equals(codeString)) + return V3RoleCode.EXT; + if ("AUNT".equals(codeString)) + return V3RoleCode.AUNT; + if ("MAUNT".equals(codeString)) + return V3RoleCode.MAUNT; + if ("PAUNT".equals(codeString)) + return V3RoleCode.PAUNT; + if ("COUSN".equals(codeString)) + return V3RoleCode.COUSN; + if ("MCOUSN".equals(codeString)) + return V3RoleCode.MCOUSN; + if ("PCOUSN".equals(codeString)) + return V3RoleCode.PCOUSN; + if ("GGRPRN".equals(codeString)) + return V3RoleCode.GGRPRN; + if ("GGRFTH".equals(codeString)) + return V3RoleCode.GGRFTH; + if ("MGGRFTH".equals(codeString)) + return V3RoleCode.MGGRFTH; + if ("PGGRFTH".equals(codeString)) + return V3RoleCode.PGGRFTH; + if ("GGRMTH".equals(codeString)) + return V3RoleCode.GGRMTH; + if ("MGGRMTH".equals(codeString)) + return V3RoleCode.MGGRMTH; + if ("PGGRMTH".equals(codeString)) + return V3RoleCode.PGGRMTH; + if ("MGGRPRN".equals(codeString)) + return V3RoleCode.MGGRPRN; + if ("PGGRPRN".equals(codeString)) + return V3RoleCode.PGGRPRN; + if ("GRNDCHILD".equals(codeString)) + return V3RoleCode.GRNDCHILD; + if ("GRNDDAU".equals(codeString)) + return V3RoleCode.GRNDDAU; + if ("GRNDSON".equals(codeString)) + return V3RoleCode.GRNDSON; + if ("GRPRN".equals(codeString)) + return V3RoleCode.GRPRN; + if ("GRFTH".equals(codeString)) + return V3RoleCode.GRFTH; + if ("MGRFTH".equals(codeString)) + return V3RoleCode.MGRFTH; + if ("PGRFTH".equals(codeString)) + return V3RoleCode.PGRFTH; + if ("GRMTH".equals(codeString)) + return V3RoleCode.GRMTH; + if ("MGRMTH".equals(codeString)) + return V3RoleCode.MGRMTH; + if ("PGRMTH".equals(codeString)) + return V3RoleCode.PGRMTH; + if ("MGRPRN".equals(codeString)) + return V3RoleCode.MGRPRN; + if ("PGRPRN".equals(codeString)) + return V3RoleCode.PGRPRN; + if ("INLAW".equals(codeString)) + return V3RoleCode.INLAW; + if ("CHLDINLAW".equals(codeString)) + return V3RoleCode.CHLDINLAW; + if ("DAUINLAW".equals(codeString)) + return V3RoleCode.DAUINLAW; + if ("SONINLAW".equals(codeString)) + return V3RoleCode.SONINLAW; + if ("PRNINLAW".equals(codeString)) + return V3RoleCode.PRNINLAW; + if ("FTHINLAW".equals(codeString)) + return V3RoleCode.FTHINLAW; + if ("MTHINLAW".equals(codeString)) + return V3RoleCode.MTHINLAW; + if ("SIBINLAW".equals(codeString)) + return V3RoleCode.SIBINLAW; + if ("BROINLAW".equals(codeString)) + return V3RoleCode.BROINLAW; + if ("SISINLAW".equals(codeString)) + return V3RoleCode.SISINLAW; + if ("NIENEPH".equals(codeString)) + return V3RoleCode.NIENEPH; + if ("NEPHEW".equals(codeString)) + return V3RoleCode.NEPHEW; + if ("NIECE".equals(codeString)) + return V3RoleCode.NIECE; + if ("UNCLE".equals(codeString)) + return V3RoleCode.UNCLE; + if ("MUNCLE".equals(codeString)) + return V3RoleCode.MUNCLE; + if ("PUNCLE".equals(codeString)) + return V3RoleCode.PUNCLE; + if ("PRN".equals(codeString)) + return V3RoleCode.PRN; + if ("ADOPTP".equals(codeString)) + return V3RoleCode.ADOPTP; + if ("ADOPTF".equals(codeString)) + return V3RoleCode.ADOPTF; + if ("ADOPTM".equals(codeString)) + return V3RoleCode.ADOPTM; + if ("FTH".equals(codeString)) + return V3RoleCode.FTH; + if ("FTHFOST".equals(codeString)) + return V3RoleCode.FTHFOST; + if ("NFTH".equals(codeString)) + return V3RoleCode.NFTH; + if ("NFTHF".equals(codeString)) + return V3RoleCode.NFTHF; + if ("STPFTH".equals(codeString)) + return V3RoleCode.STPFTH; + if ("MTH".equals(codeString)) + return V3RoleCode.MTH; + if ("GESTM".equals(codeString)) + return V3RoleCode.GESTM; + if ("MTHFOST".equals(codeString)) + return V3RoleCode.MTHFOST; + if ("NMTH".equals(codeString)) + return V3RoleCode.NMTH; + if ("NMTHF".equals(codeString)) + return V3RoleCode.NMTHF; + if ("STPMTH".equals(codeString)) + return V3RoleCode.STPMTH; + if ("NPRN".equals(codeString)) + return V3RoleCode.NPRN; + if ("PRNFOST".equals(codeString)) + return V3RoleCode.PRNFOST; + if ("STPPRN".equals(codeString)) + return V3RoleCode.STPPRN; + if ("SIB".equals(codeString)) + return V3RoleCode.SIB; + if ("BRO".equals(codeString)) + return V3RoleCode.BRO; + if ("HBRO".equals(codeString)) + return V3RoleCode.HBRO; + if ("NBRO".equals(codeString)) + return V3RoleCode.NBRO; + if ("TWINBRO".equals(codeString)) + return V3RoleCode.TWINBRO; + if ("FTWINBRO".equals(codeString)) + return V3RoleCode.FTWINBRO; + if ("ITWINBRO".equals(codeString)) + return V3RoleCode.ITWINBRO; + if ("STPBRO".equals(codeString)) + return V3RoleCode.STPBRO; + if ("HSIB".equals(codeString)) + return V3RoleCode.HSIB; + if ("HSIS".equals(codeString)) + return V3RoleCode.HSIS; + if ("NSIB".equals(codeString)) + return V3RoleCode.NSIB; + if ("NSIS".equals(codeString)) + return V3RoleCode.NSIS; + if ("TWINSIS".equals(codeString)) + return V3RoleCode.TWINSIS; + if ("FTWINSIS".equals(codeString)) + return V3RoleCode.FTWINSIS; + if ("ITWINSIS".equals(codeString)) + return V3RoleCode.ITWINSIS; + if ("TWIN".equals(codeString)) + return V3RoleCode.TWIN; + if ("FTWIN".equals(codeString)) + return V3RoleCode.FTWIN; + if ("ITWIN".equals(codeString)) + return V3RoleCode.ITWIN; + if ("SIS".equals(codeString)) + return V3RoleCode.SIS; + if ("STPSIS".equals(codeString)) + return V3RoleCode.STPSIS; + if ("STPSIB".equals(codeString)) + return V3RoleCode.STPSIB; + if ("SIGOTHR".equals(codeString)) + return V3RoleCode.SIGOTHR; + if ("DOMPART".equals(codeString)) + return V3RoleCode.DOMPART; + if ("FMRSPS".equals(codeString)) + return V3RoleCode.FMRSPS; + if ("SPS".equals(codeString)) + return V3RoleCode.SPS; + if ("HUSB".equals(codeString)) + return V3RoleCode.HUSB; + if ("WIFE".equals(codeString)) + return V3RoleCode.WIFE; + if ("FRND".equals(codeString)) + return V3RoleCode.FRND; + if ("NBOR".equals(codeString)) + return V3RoleCode.NBOR; + if ("ONESELF".equals(codeString)) + return V3RoleCode.ONESELF; + if ("ROOM".equals(codeString)) + return V3RoleCode.ROOM; + if ("_PolicyOrProgramCoverageRoleType".equals(codeString)) + return V3RoleCode._POLICYORPROGRAMCOVERAGEROLETYPE; + if ("_CoverageRoleType".equals(codeString)) + return V3RoleCode._COVERAGEROLETYPE; + if ("FAMDEP".equals(codeString)) + return V3RoleCode.FAMDEP; + if ("HANDIC".equals(codeString)) + return V3RoleCode.HANDIC; + if ("INJ".equals(codeString)) + return V3RoleCode.INJ; + if ("SELF".equals(codeString)) + return V3RoleCode.SELF; + if ("SPON".equals(codeString)) + return V3RoleCode.SPON; + if ("STUD".equals(codeString)) + return V3RoleCode.STUD; + if ("FSTUD".equals(codeString)) + return V3RoleCode.FSTUD; + if ("PSTUD".equals(codeString)) + return V3RoleCode.PSTUD; + if ("ADOPT".equals(codeString)) + return V3RoleCode.ADOPT; + if ("GCHILD".equals(codeString)) + return V3RoleCode.GCHILD; + if ("GPARNT".equals(codeString)) + return V3RoleCode.GPARNT; + if ("NAT".equals(codeString)) + return V3RoleCode.NAT; + if ("NIENE".equals(codeString)) + return V3RoleCode.NIENE; + if ("PARNT".equals(codeString)) + return V3RoleCode.PARNT; + if ("SPSE".equals(codeString)) + return V3RoleCode.SPSE; + if ("STEP".equals(codeString)) + return V3RoleCode.STEP; + if ("_CoveredPartyRoleType".equals(codeString)) + return V3RoleCode._COVEREDPARTYROLETYPE; + if ("_ClaimantCoveredPartyRoleType".equals(codeString)) + return V3RoleCode._CLAIMANTCOVEREDPARTYROLETYPE; + if ("CRIMEVIC".equals(codeString)) + return V3RoleCode.CRIMEVIC; + if ("INJWKR".equals(codeString)) + return V3RoleCode.INJWKR; + if ("_DependentCoveredPartyRoleType".equals(codeString)) + return V3RoleCode._DEPENDENTCOVEREDPARTYROLETYPE; + if ("COCBEN".equals(codeString)) + return V3RoleCode.COCBEN; + if ("DIFFABL".equals(codeString)) + return V3RoleCode.DIFFABL; + if ("WARD".equals(codeString)) + return V3RoleCode.WARD; + if ("_IndividualInsuredPartyRoleType".equals(codeString)) + return V3RoleCode._INDIVIDUALINSUREDPARTYROLETYPE; + if ("RETIREE".equals(codeString)) + return V3RoleCode.RETIREE; + if ("_ProgramEligiblePartyRoleType".equals(codeString)) + return V3RoleCode._PROGRAMELIGIBLEPARTYROLETYPE; + if ("INDIG".equals(codeString)) + return V3RoleCode.INDIG; + if ("MIL".equals(codeString)) + return V3RoleCode.MIL; + if ("ACTMIL".equals(codeString)) + return V3RoleCode.ACTMIL; + if ("RETMIL".equals(codeString)) + return V3RoleCode.RETMIL; + if ("VET".equals(codeString)) + return V3RoleCode.VET; + if ("_SubscriberCoveredPartyRoleType".equals(codeString)) + return V3RoleCode._SUBSCRIBERCOVEREDPARTYROLETYPE; + if ("_ResearchSubjectRoleBasis".equals(codeString)) + return V3RoleCode._RESEARCHSUBJECTROLEBASIS; + if ("ERL".equals(codeString)) + return V3RoleCode.ERL; + if ("SCN".equals(codeString)) + return V3RoleCode.SCN; + if ("_ServiceDeliveryLocationRoleType".equals(codeString)) + return V3RoleCode._SERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedServiceDeliveryLocationRoleType".equals(codeString)) + return V3RoleCode._DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE; + if ("_DedicatedClinicalLocationRoleType".equals(codeString)) + return V3RoleCode._DEDICATEDCLINICALLOCATIONROLETYPE; + if ("DX".equals(codeString)) + return V3RoleCode.DX; + if ("CVDX".equals(codeString)) + return V3RoleCode.CVDX; + if ("CATH".equals(codeString)) + return V3RoleCode.CATH; + if ("ECHO".equals(codeString)) + return V3RoleCode.ECHO; + if ("GIDX".equals(codeString)) + return V3RoleCode.GIDX; + if ("ENDOS".equals(codeString)) + return V3RoleCode.ENDOS; + if ("RADDX".equals(codeString)) + return V3RoleCode.RADDX; + if ("RADO".equals(codeString)) + return V3RoleCode.RADO; + if ("RNEU".equals(codeString)) + return V3RoleCode.RNEU; + if ("HOSP".equals(codeString)) + return V3RoleCode.HOSP; + if ("CHR".equals(codeString)) + return V3RoleCode.CHR; + if ("GACH".equals(codeString)) + return V3RoleCode.GACH; + if ("MHSP".equals(codeString)) + return V3RoleCode.MHSP; + if ("PSYCHF".equals(codeString)) + return V3RoleCode.PSYCHF; + if ("RH".equals(codeString)) + return V3RoleCode.RH; + if ("RHAT".equals(codeString)) + return V3RoleCode.RHAT; + if ("RHII".equals(codeString)) + return V3RoleCode.RHII; + if ("RHMAD".equals(codeString)) + return V3RoleCode.RHMAD; + if ("RHPI".equals(codeString)) + return V3RoleCode.RHPI; + if ("RHPIH".equals(codeString)) + return V3RoleCode.RHPIH; + if ("RHPIMS".equals(codeString)) + return V3RoleCode.RHPIMS; + if ("RHPIVS".equals(codeString)) + return V3RoleCode.RHPIVS; + if ("RHYAD".equals(codeString)) + return V3RoleCode.RHYAD; + if ("HU".equals(codeString)) + return V3RoleCode.HU; + if ("BMTU".equals(codeString)) + return V3RoleCode.BMTU; + if ("CCU".equals(codeString)) + return V3RoleCode.CCU; + if ("CHEST".equals(codeString)) + return V3RoleCode.CHEST; + if ("EPIL".equals(codeString)) + return V3RoleCode.EPIL; + if ("ER".equals(codeString)) + return V3RoleCode.ER; + if ("ETU".equals(codeString)) + return V3RoleCode.ETU; + if ("HD".equals(codeString)) + return V3RoleCode.HD; + if ("HLAB".equals(codeString)) + return V3RoleCode.HLAB; + if ("INLAB".equals(codeString)) + return V3RoleCode.INLAB; + if ("OUTLAB".equals(codeString)) + return V3RoleCode.OUTLAB; + if ("HRAD".equals(codeString)) + return V3RoleCode.HRAD; + if ("HUSCS".equals(codeString)) + return V3RoleCode.HUSCS; + if ("ICU".equals(codeString)) + return V3RoleCode.ICU; + if ("PEDICU".equals(codeString)) + return V3RoleCode.PEDICU; + if ("PEDNICU".equals(codeString)) + return V3RoleCode.PEDNICU; + if ("INPHARM".equals(codeString)) + return V3RoleCode.INPHARM; + if ("MBL".equals(codeString)) + return V3RoleCode.MBL; + if ("NCCS".equals(codeString)) + return V3RoleCode.NCCS; + if ("NS".equals(codeString)) + return V3RoleCode.NS; + if ("OUTPHARM".equals(codeString)) + return V3RoleCode.OUTPHARM; + if ("PEDU".equals(codeString)) + return V3RoleCode.PEDU; + if ("PHU".equals(codeString)) + return V3RoleCode.PHU; + if ("RHU".equals(codeString)) + return V3RoleCode.RHU; + if ("SLEEP".equals(codeString)) + return V3RoleCode.SLEEP; + if ("NCCF".equals(codeString)) + return V3RoleCode.NCCF; + if ("SNF".equals(codeString)) + return V3RoleCode.SNF; + if ("OF".equals(codeString)) + return V3RoleCode.OF; + if ("ALL".equals(codeString)) + return V3RoleCode.ALL; + if ("AMPUT".equals(codeString)) + return V3RoleCode.AMPUT; + if ("BMTC".equals(codeString)) + return V3RoleCode.BMTC; + if ("BREAST".equals(codeString)) + return V3RoleCode.BREAST; + if ("CANC".equals(codeString)) + return V3RoleCode.CANC; + if ("CAPC".equals(codeString)) + return V3RoleCode.CAPC; + if ("CARD".equals(codeString)) + return V3RoleCode.CARD; + if ("PEDCARD".equals(codeString)) + return V3RoleCode.PEDCARD; + if ("COAG".equals(codeString)) + return V3RoleCode.COAG; + if ("CRS".equals(codeString)) + return V3RoleCode.CRS; + if ("DERM".equals(codeString)) + return V3RoleCode.DERM; + if ("ENDO".equals(codeString)) + return V3RoleCode.ENDO; + if ("PEDE".equals(codeString)) + return V3RoleCode.PEDE; + if ("ENT".equals(codeString)) + return V3RoleCode.ENT; + if ("FMC".equals(codeString)) + return V3RoleCode.FMC; + if ("GI".equals(codeString)) + return V3RoleCode.GI; + if ("PEDGI".equals(codeString)) + return V3RoleCode.PEDGI; + if ("GIM".equals(codeString)) + return V3RoleCode.GIM; + if ("GYN".equals(codeString)) + return V3RoleCode.GYN; + if ("HEM".equals(codeString)) + return V3RoleCode.HEM; + if ("PEDHEM".equals(codeString)) + return V3RoleCode.PEDHEM; + if ("HTN".equals(codeString)) + return V3RoleCode.HTN; + if ("IEC".equals(codeString)) + return V3RoleCode.IEC; + if ("INFD".equals(codeString)) + return V3RoleCode.INFD; + if ("PEDID".equals(codeString)) + return V3RoleCode.PEDID; + if ("INV".equals(codeString)) + return V3RoleCode.INV; + if ("LYMPH".equals(codeString)) + return V3RoleCode.LYMPH; + if ("MGEN".equals(codeString)) + return V3RoleCode.MGEN; + if ("NEPH".equals(codeString)) + return V3RoleCode.NEPH; + if ("PEDNEPH".equals(codeString)) + return V3RoleCode.PEDNEPH; + if ("NEUR".equals(codeString)) + return V3RoleCode.NEUR; + if ("OB".equals(codeString)) + return V3RoleCode.OB; + if ("OMS".equals(codeString)) + return V3RoleCode.OMS; + if ("ONCL".equals(codeString)) + return V3RoleCode.ONCL; + if ("PEDHO".equals(codeString)) + return V3RoleCode.PEDHO; + if ("OPH".equals(codeString)) + return V3RoleCode.OPH; + if ("OPTC".equals(codeString)) + return V3RoleCode.OPTC; + if ("ORTHO".equals(codeString)) + return V3RoleCode.ORTHO; + if ("HAND".equals(codeString)) + return V3RoleCode.HAND; + if ("PAINCL".equals(codeString)) + return V3RoleCode.PAINCL; + if ("PC".equals(codeString)) + return V3RoleCode.PC; + if ("PEDC".equals(codeString)) + return V3RoleCode.PEDC; + if ("PEDRHEUM".equals(codeString)) + return V3RoleCode.PEDRHEUM; + if ("POD".equals(codeString)) + return V3RoleCode.POD; + if ("PREV".equals(codeString)) + return V3RoleCode.PREV; + if ("PROCTO".equals(codeString)) + return V3RoleCode.PROCTO; + if ("PROFF".equals(codeString)) + return V3RoleCode.PROFF; + if ("PROS".equals(codeString)) + return V3RoleCode.PROS; + if ("PSI".equals(codeString)) + return V3RoleCode.PSI; + if ("PSY".equals(codeString)) + return V3RoleCode.PSY; + if ("RHEUM".equals(codeString)) + return V3RoleCode.RHEUM; + if ("SPMED".equals(codeString)) + return V3RoleCode.SPMED; + if ("SU".equals(codeString)) + return V3RoleCode.SU; + if ("PLS".equals(codeString)) + return V3RoleCode.PLS; + if ("URO".equals(codeString)) + return V3RoleCode.URO; + if ("TR".equals(codeString)) + return V3RoleCode.TR; + if ("TRAVEL".equals(codeString)) + return V3RoleCode.TRAVEL; + if ("WND".equals(codeString)) + return V3RoleCode.WND; + if ("RTF".equals(codeString)) + return V3RoleCode.RTF; + if ("PRC".equals(codeString)) + return V3RoleCode.PRC; + if ("SURF".equals(codeString)) + return V3RoleCode.SURF; + if ("_DedicatedNonClinicalLocationRoleType".equals(codeString)) + return V3RoleCode._DEDICATEDNONCLINICALLOCATIONROLETYPE; + if ("DADDR".equals(codeString)) + return V3RoleCode.DADDR; + if ("MOBL".equals(codeString)) + return V3RoleCode.MOBL; + if ("AMB".equals(codeString)) + return V3RoleCode.AMB; + if ("PHARM".equals(codeString)) + return V3RoleCode.PHARM; + if ("_IncidentalServiceDeliveryLocationRoleType".equals(codeString)) + return V3RoleCode._INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE; + if ("ACC".equals(codeString)) + return V3RoleCode.ACC; + if ("COMM".equals(codeString)) + return V3RoleCode.COMM; + if ("CSC".equals(codeString)) + return V3RoleCode.CSC; + if ("PTRES".equals(codeString)) + return V3RoleCode.PTRES; + if ("SCHOOL".equals(codeString)) + return V3RoleCode.SCHOOL; + if ("UPC".equals(codeString)) + return V3RoleCode.UPC; + if ("WORK".equals(codeString)) + return V3RoleCode.WORK; + if ("_SpecimenRoleType".equals(codeString)) + return V3RoleCode._SPECIMENROLETYPE; + if ("C".equals(codeString)) + return V3RoleCode.C; + if ("G".equals(codeString)) + return V3RoleCode.G; + if ("L".equals(codeString)) + return V3RoleCode.L; + if ("P".equals(codeString)) + return V3RoleCode.P; + if ("Q".equals(codeString)) + return V3RoleCode.Q; + if ("B".equals(codeString)) + return V3RoleCode.B; + if ("E".equals(codeString)) + return V3RoleCode.E; + if ("F".equals(codeString)) + return V3RoleCode.F; + if ("O".equals(codeString)) + return V3RoleCode.O; + if ("V".equals(codeString)) + return V3RoleCode.V; + if ("R".equals(codeString)) + return V3RoleCode.R; + if ("CLAIM".equals(codeString)) + return V3RoleCode.CLAIM; + if ("communityLaboratory".equals(codeString)) + return V3RoleCode.COMMUNITYLABORATORY; + if ("GT".equals(codeString)) + return V3RoleCode.GT; + if ("homeHealth".equals(codeString)) + return V3RoleCode.HOMEHEALTH; + if ("laboratory".equals(codeString)) + return V3RoleCode.LABORATORY; + if ("pathologist".equals(codeString)) + return V3RoleCode.PATHOLOGIST; + if ("PH".equals(codeString)) + return V3RoleCode.PH; + if ("phlebotomist".equals(codeString)) + return V3RoleCode.PHLEBOTOMIST; + if ("PROG".equals(codeString)) + return V3RoleCode.PROG; + if ("PT".equals(codeString)) + return V3RoleCode.PT; + if ("subject".equals(codeString)) + return V3RoleCode.SUBJECT; + if ("thirdParty".equals(codeString)) + return V3RoleCode.THIRDPARTY; + if ("DEP".equals(codeString)) + return V3RoleCode.DEP; + if ("DEPEN".equals(codeString)) + return V3RoleCode.DEPEN; + if ("FM".equals(codeString)) + return V3RoleCode.FM; + if ("INDIV".equals(codeString)) + return V3RoleCode.INDIV; + if ("NAMED".equals(codeString)) + return V3RoleCode.NAMED; + if ("PSYCHCF".equals(codeString)) + return V3RoleCode.PSYCHCF; + if ("SUBSCR".equals(codeString)) + return V3RoleCode.SUBSCR; + throw new IllegalArgumentException("Unknown V3RoleCode code '"+codeString+"'"); + } + + public String toCode(V3RoleCode code) { + if (code == V3RoleCode._AFFILIATIONROLETYPE) + return "_AffiliationRoleType"; + if (code == V3RoleCode._AGENTROLETYPE) + return "_AgentRoleType"; + if (code == V3RoleCode.AMENDER) + return "AMENDER"; + if (code == V3RoleCode.CLASSIFIER) + return "CLASSIFIER"; + if (code == V3RoleCode.CONSENTER) + return "CONSENTER"; + if (code == V3RoleCode.CONSWIT) + return "CONSWIT"; + if (code == V3RoleCode.COPART) + return "COPART"; + if (code == V3RoleCode.DECLASSIFIER) + return "DECLASSIFIER"; + if (code == V3RoleCode.DELEGATEE) + return "DELEGATEE"; + if (code == V3RoleCode.DELEGATOR) + return "DELEGATOR"; + if (code == V3RoleCode.DOWNGRDER) + return "DOWNGRDER"; + if (code == V3RoleCode.DRIVCLASSIFIER) + return "DRIVCLASSIFIER"; + if (code == V3RoleCode.GRANTEE) + return "GRANTEE"; + if (code == V3RoleCode.GRANTOR) + return "GRANTOR"; + if (code == V3RoleCode.INTPRTER) + return "INTPRTER"; + if (code == V3RoleCode.REVIEWER) + return "REVIEWER"; + if (code == V3RoleCode.VALIDATOR) + return "VALIDATOR"; + if (code == V3RoleCode._COVERAGESPONSORROLETYPE) + return "_CoverageSponsorRoleType"; + if (code == V3RoleCode.FULLINS) + return "FULLINS"; + if (code == V3RoleCode.SELFINS) + return "SELFINS"; + if (code == V3RoleCode._PAYORROLETYPE) + return "_PayorRoleType"; + if (code == V3RoleCode.ENROLBKR) + return "ENROLBKR"; + if (code == V3RoleCode.TPA) + return "TPA"; + if (code == V3RoleCode.UMO) + return "UMO"; + if (code == V3RoleCode.RESPRSN) + return "RESPRSN"; + if (code == V3RoleCode.EXCEST) + return "EXCEST"; + if (code == V3RoleCode.GUADLTM) + return "GUADLTM"; + if (code == V3RoleCode.GUARD) + return "GUARD"; + if (code == V3RoleCode.POWATT) + return "POWATT"; + if (code == V3RoleCode.DPOWATT) + return "DPOWATT"; + if (code == V3RoleCode.HPOWATT) + return "HPOWATT"; + if (code == V3RoleCode.SPOWATT) + return "SPOWATT"; + if (code == V3RoleCode._ASSIGNEDROLETYPE) + return "_AssignedRoleType"; + if (code == V3RoleCode._ASSIGNEDNONPERSONLIVINGSUBJECTROLETYPE) + return "_AssignedNonPersonLivingSubjectRoleType"; + if (code == V3RoleCode.ASSIST) + return "ASSIST"; + if (code == V3RoleCode.BIOTH) + return "BIOTH"; + if (code == V3RoleCode.ANTIBIOT) + return "ANTIBIOT"; + if (code == V3RoleCode.DEBR) + return "DEBR"; + if (code == V3RoleCode.CCO) + return "CCO"; + if (code == V3RoleCode.SEE) + return "SEE"; + if (code == V3RoleCode.SNIFF) + return "SNIFF"; + if (code == V3RoleCode._CERTIFIEDENTITYTYPE) + return "_CertifiedEntityType"; + if (code == V3RoleCode._CITIZENROLETYPE) + return "_CitizenRoleType"; + if (code == V3RoleCode.CAS) + return "CAS"; + if (code == V3RoleCode.CASM) + return "CASM"; + if (code == V3RoleCode.CN) + return "CN"; + if (code == V3RoleCode.CNRP) + return "CNRP"; + if (code == V3RoleCode.CNRPM) + return "CNRPM"; + if (code == V3RoleCode.CPCA) + return "CPCA"; + if (code == V3RoleCode.CRP) + return "CRP"; + if (code == V3RoleCode.CRPM) + return "CRPM"; + if (code == V3RoleCode._CONTACTROLETYPE) + return "_ContactRoleType"; + if (code == V3RoleCode._ADMINISTRATIVECONTACTROLETYPE) + return "_AdministrativeContactRoleType"; + if (code == V3RoleCode.BILL) + return "BILL"; + if (code == V3RoleCode.ORG) + return "ORG"; + if (code == V3RoleCode.PAYOR) + return "PAYOR"; + if (code == V3RoleCode.ECON) + return "ECON"; + if (code == V3RoleCode.NOK) + return "NOK"; + if (code == V3RoleCode._IDENTIFIEDENTITYTYPE) + return "_IdentifiedEntityType"; + if (code == V3RoleCode._LOCATIONIDENTIFIEDENTITYROLECODE) + return "_LocationIdentifiedEntityRoleCode"; + if (code == V3RoleCode.ACHFID) + return "ACHFID"; + if (code == V3RoleCode.JURID) + return "JURID"; + if (code == V3RoleCode.LOCHFID) + return "LOCHFID"; + if (code == V3RoleCode._LIVINGSUBJECTPRODUCTIONCLASS) + return "_LivingSubjectProductionClass"; + if (code == V3RoleCode.BF) + return "BF"; + if (code == V3RoleCode.BL) + return "BL"; + if (code == V3RoleCode.BR) + return "BR"; + if (code == V3RoleCode.CO) + return "CO"; + if (code == V3RoleCode.DA) + return "DA"; + if (code == V3RoleCode.DR) + return "DR"; + if (code == V3RoleCode.DU) + return "DU"; + if (code == V3RoleCode.FI) + return "FI"; + if (code == V3RoleCode.LY) + return "LY"; + if (code == V3RoleCode.MT) + return "MT"; + if (code == V3RoleCode.MU) + return "MU"; + if (code == V3RoleCode.PL) + return "PL"; + if (code == V3RoleCode.RC) + return "RC"; + if (code == V3RoleCode.SH) + return "SH"; + if (code == V3RoleCode.VL) + return "VL"; + if (code == V3RoleCode.WL) + return "WL"; + if (code == V3RoleCode.WO) + return "WO"; + if (code == V3RoleCode._MEDICATIONGENERALIZATIONROLETYPE) + return "_MedicationGeneralizationRoleType"; + if (code == V3RoleCode.DC) + return "DC"; + if (code == V3RoleCode.GD) + return "GD"; + if (code == V3RoleCode.GDF) + return "GDF"; + if (code == V3RoleCode.GDS) + return "GDS"; + if (code == V3RoleCode.GDSF) + return "GDSF"; + if (code == V3RoleCode.MGDSF) + return "MGDSF"; + if (code == V3RoleCode._MEMBERROLETYPE) + return "_MemberRoleType"; + if (code == V3RoleCode.TRB) + return "TRB"; + if (code == V3RoleCode._PERSONALRELATIONSHIPROLETYPE) + return "_PersonalRelationshipRoleType"; + if (code == V3RoleCode.FAMMEMB) + return "FAMMEMB"; + if (code == V3RoleCode.CHILD) + return "CHILD"; + if (code == V3RoleCode.CHLDADOPT) + return "CHLDADOPT"; + if (code == V3RoleCode.DAUADOPT) + return "DAUADOPT"; + if (code == V3RoleCode.SONADOPT) + return "SONADOPT"; + if (code == V3RoleCode.CHLDFOST) + return "CHLDFOST"; + if (code == V3RoleCode.DAUFOST) + return "DAUFOST"; + if (code == V3RoleCode.SONFOST) + return "SONFOST"; + if (code == V3RoleCode.DAUC) + return "DAUC"; + if (code == V3RoleCode.DAU) + return "DAU"; + if (code == V3RoleCode.STPDAU) + return "STPDAU"; + if (code == V3RoleCode.NCHILD) + return "NCHILD"; + if (code == V3RoleCode.SON) + return "SON"; + if (code == V3RoleCode.SONC) + return "SONC"; + if (code == V3RoleCode.STPSON) + return "STPSON"; + if (code == V3RoleCode.STPCHLD) + return "STPCHLD"; + if (code == V3RoleCode.EXT) + return "EXT"; + if (code == V3RoleCode.AUNT) + return "AUNT"; + if (code == V3RoleCode.MAUNT) + return "MAUNT"; + if (code == V3RoleCode.PAUNT) + return "PAUNT"; + if (code == V3RoleCode.COUSN) + return "COUSN"; + if (code == V3RoleCode.MCOUSN) + return "MCOUSN"; + if (code == V3RoleCode.PCOUSN) + return "PCOUSN"; + if (code == V3RoleCode.GGRPRN) + return "GGRPRN"; + if (code == V3RoleCode.GGRFTH) + return "GGRFTH"; + if (code == V3RoleCode.MGGRFTH) + return "MGGRFTH"; + if (code == V3RoleCode.PGGRFTH) + return "PGGRFTH"; + if (code == V3RoleCode.GGRMTH) + return "GGRMTH"; + if (code == V3RoleCode.MGGRMTH) + return "MGGRMTH"; + if (code == V3RoleCode.PGGRMTH) + return "PGGRMTH"; + if (code == V3RoleCode.MGGRPRN) + return "MGGRPRN"; + if (code == V3RoleCode.PGGRPRN) + return "PGGRPRN"; + if (code == V3RoleCode.GRNDCHILD) + return "GRNDCHILD"; + if (code == V3RoleCode.GRNDDAU) + return "GRNDDAU"; + if (code == V3RoleCode.GRNDSON) + return "GRNDSON"; + if (code == V3RoleCode.GRPRN) + return "GRPRN"; + if (code == V3RoleCode.GRFTH) + return "GRFTH"; + if (code == V3RoleCode.MGRFTH) + return "MGRFTH"; + if (code == V3RoleCode.PGRFTH) + return "PGRFTH"; + if (code == V3RoleCode.GRMTH) + return "GRMTH"; + if (code == V3RoleCode.MGRMTH) + return "MGRMTH"; + if (code == V3RoleCode.PGRMTH) + return "PGRMTH"; + if (code == V3RoleCode.MGRPRN) + return "MGRPRN"; + if (code == V3RoleCode.PGRPRN) + return "PGRPRN"; + if (code == V3RoleCode.INLAW) + return "INLAW"; + if (code == V3RoleCode.CHLDINLAW) + return "CHLDINLAW"; + if (code == V3RoleCode.DAUINLAW) + return "DAUINLAW"; + if (code == V3RoleCode.SONINLAW) + return "SONINLAW"; + if (code == V3RoleCode.PRNINLAW) + return "PRNINLAW"; + if (code == V3RoleCode.FTHINLAW) + return "FTHINLAW"; + if (code == V3RoleCode.MTHINLAW) + return "MTHINLAW"; + if (code == V3RoleCode.SIBINLAW) + return "SIBINLAW"; + if (code == V3RoleCode.BROINLAW) + return "BROINLAW"; + if (code == V3RoleCode.SISINLAW) + return "SISINLAW"; + if (code == V3RoleCode.NIENEPH) + return "NIENEPH"; + if (code == V3RoleCode.NEPHEW) + return "NEPHEW"; + if (code == V3RoleCode.NIECE) + return "NIECE"; + if (code == V3RoleCode.UNCLE) + return "UNCLE"; + if (code == V3RoleCode.MUNCLE) + return "MUNCLE"; + if (code == V3RoleCode.PUNCLE) + return "PUNCLE"; + if (code == V3RoleCode.PRN) + return "PRN"; + if (code == V3RoleCode.ADOPTP) + return "ADOPTP"; + if (code == V3RoleCode.ADOPTF) + return "ADOPTF"; + if (code == V3RoleCode.ADOPTM) + return "ADOPTM"; + if (code == V3RoleCode.FTH) + return "FTH"; + if (code == V3RoleCode.FTHFOST) + return "FTHFOST"; + if (code == V3RoleCode.NFTH) + return "NFTH"; + if (code == V3RoleCode.NFTHF) + return "NFTHF"; + if (code == V3RoleCode.STPFTH) + return "STPFTH"; + if (code == V3RoleCode.MTH) + return "MTH"; + if (code == V3RoleCode.GESTM) + return "GESTM"; + if (code == V3RoleCode.MTHFOST) + return "MTHFOST"; + if (code == V3RoleCode.NMTH) + return "NMTH"; + if (code == V3RoleCode.NMTHF) + return "NMTHF"; + if (code == V3RoleCode.STPMTH) + return "STPMTH"; + if (code == V3RoleCode.NPRN) + return "NPRN"; + if (code == V3RoleCode.PRNFOST) + return "PRNFOST"; + if (code == V3RoleCode.STPPRN) + return "STPPRN"; + if (code == V3RoleCode.SIB) + return "SIB"; + if (code == V3RoleCode.BRO) + return "BRO"; + if (code == V3RoleCode.HBRO) + return "HBRO"; + if (code == V3RoleCode.NBRO) + return "NBRO"; + if (code == V3RoleCode.TWINBRO) + return "TWINBRO"; + if (code == V3RoleCode.FTWINBRO) + return "FTWINBRO"; + if (code == V3RoleCode.ITWINBRO) + return "ITWINBRO"; + if (code == V3RoleCode.STPBRO) + return "STPBRO"; + if (code == V3RoleCode.HSIB) + return "HSIB"; + if (code == V3RoleCode.HSIS) + return "HSIS"; + if (code == V3RoleCode.NSIB) + return "NSIB"; + if (code == V3RoleCode.NSIS) + return "NSIS"; + if (code == V3RoleCode.TWINSIS) + return "TWINSIS"; + if (code == V3RoleCode.FTWINSIS) + return "FTWINSIS"; + if (code == V3RoleCode.ITWINSIS) + return "ITWINSIS"; + if (code == V3RoleCode.TWIN) + return "TWIN"; + if (code == V3RoleCode.FTWIN) + return "FTWIN"; + if (code == V3RoleCode.ITWIN) + return "ITWIN"; + if (code == V3RoleCode.SIS) + return "SIS"; + if (code == V3RoleCode.STPSIS) + return "STPSIS"; + if (code == V3RoleCode.STPSIB) + return "STPSIB"; + if (code == V3RoleCode.SIGOTHR) + return "SIGOTHR"; + if (code == V3RoleCode.DOMPART) + return "DOMPART"; + if (code == V3RoleCode.FMRSPS) + return "FMRSPS"; + if (code == V3RoleCode.SPS) + return "SPS"; + if (code == V3RoleCode.HUSB) + return "HUSB"; + if (code == V3RoleCode.WIFE) + return "WIFE"; + if (code == V3RoleCode.FRND) + return "FRND"; + if (code == V3RoleCode.NBOR) + return "NBOR"; + if (code == V3RoleCode.ONESELF) + return "ONESELF"; + if (code == V3RoleCode.ROOM) + return "ROOM"; + if (code == V3RoleCode._POLICYORPROGRAMCOVERAGEROLETYPE) + return "_PolicyOrProgramCoverageRoleType"; + if (code == V3RoleCode._COVERAGEROLETYPE) + return "_CoverageRoleType"; + if (code == V3RoleCode.FAMDEP) + return "FAMDEP"; + if (code == V3RoleCode.HANDIC) + return "HANDIC"; + if (code == V3RoleCode.INJ) + return "INJ"; + if (code == V3RoleCode.SELF) + return "SELF"; + if (code == V3RoleCode.SPON) + return "SPON"; + if (code == V3RoleCode.STUD) + return "STUD"; + if (code == V3RoleCode.FSTUD) + return "FSTUD"; + if (code == V3RoleCode.PSTUD) + return "PSTUD"; + if (code == V3RoleCode.ADOPT) + return "ADOPT"; + if (code == V3RoleCode.GCHILD) + return "GCHILD"; + if (code == V3RoleCode.GPARNT) + return "GPARNT"; + if (code == V3RoleCode.NAT) + return "NAT"; + if (code == V3RoleCode.NIENE) + return "NIENE"; + if (code == V3RoleCode.PARNT) + return "PARNT"; + if (code == V3RoleCode.SPSE) + return "SPSE"; + if (code == V3RoleCode.STEP) + return "STEP"; + if (code == V3RoleCode._COVEREDPARTYROLETYPE) + return "_CoveredPartyRoleType"; + if (code == V3RoleCode._CLAIMANTCOVEREDPARTYROLETYPE) + return "_ClaimantCoveredPartyRoleType"; + if (code == V3RoleCode.CRIMEVIC) + return "CRIMEVIC"; + if (code == V3RoleCode.INJWKR) + return "INJWKR"; + if (code == V3RoleCode._DEPENDENTCOVEREDPARTYROLETYPE) + return "_DependentCoveredPartyRoleType"; + if (code == V3RoleCode.COCBEN) + return "COCBEN"; + if (code == V3RoleCode.DIFFABL) + return "DIFFABL"; + if (code == V3RoleCode.WARD) + return "WARD"; + if (code == V3RoleCode._INDIVIDUALINSUREDPARTYROLETYPE) + return "_IndividualInsuredPartyRoleType"; + if (code == V3RoleCode.RETIREE) + return "RETIREE"; + if (code == V3RoleCode._PROGRAMELIGIBLEPARTYROLETYPE) + return "_ProgramEligiblePartyRoleType"; + if (code == V3RoleCode.INDIG) + return "INDIG"; + if (code == V3RoleCode.MIL) + return "MIL"; + if (code == V3RoleCode.ACTMIL) + return "ACTMIL"; + if (code == V3RoleCode.RETMIL) + return "RETMIL"; + if (code == V3RoleCode.VET) + return "VET"; + if (code == V3RoleCode._SUBSCRIBERCOVEREDPARTYROLETYPE) + return "_SubscriberCoveredPartyRoleType"; + if (code == V3RoleCode._RESEARCHSUBJECTROLEBASIS) + return "_ResearchSubjectRoleBasis"; + if (code == V3RoleCode.ERL) + return "ERL"; + if (code == V3RoleCode.SCN) + return "SCN"; + if (code == V3RoleCode._SERVICEDELIVERYLOCATIONROLETYPE) + return "_ServiceDeliveryLocationRoleType"; + if (code == V3RoleCode._DEDICATEDSERVICEDELIVERYLOCATIONROLETYPE) + return "_DedicatedServiceDeliveryLocationRoleType"; + if (code == V3RoleCode._DEDICATEDCLINICALLOCATIONROLETYPE) + return "_DedicatedClinicalLocationRoleType"; + if (code == V3RoleCode.DX) + return "DX"; + if (code == V3RoleCode.CVDX) + return "CVDX"; + if (code == V3RoleCode.CATH) + return "CATH"; + if (code == V3RoleCode.ECHO) + return "ECHO"; + if (code == V3RoleCode.GIDX) + return "GIDX"; + if (code == V3RoleCode.ENDOS) + return "ENDOS"; + if (code == V3RoleCode.RADDX) + return "RADDX"; + if (code == V3RoleCode.RADO) + return "RADO"; + if (code == V3RoleCode.RNEU) + return "RNEU"; + if (code == V3RoleCode.HOSP) + return "HOSP"; + if (code == V3RoleCode.CHR) + return "CHR"; + if (code == V3RoleCode.GACH) + return "GACH"; + if (code == V3RoleCode.MHSP) + return "MHSP"; + if (code == V3RoleCode.PSYCHF) + return "PSYCHF"; + if (code == V3RoleCode.RH) + return "RH"; + if (code == V3RoleCode.RHAT) + return "RHAT"; + if (code == V3RoleCode.RHII) + return "RHII"; + if (code == V3RoleCode.RHMAD) + return "RHMAD"; + if (code == V3RoleCode.RHPI) + return "RHPI"; + if (code == V3RoleCode.RHPIH) + return "RHPIH"; + if (code == V3RoleCode.RHPIMS) + return "RHPIMS"; + if (code == V3RoleCode.RHPIVS) + return "RHPIVS"; + if (code == V3RoleCode.RHYAD) + return "RHYAD"; + if (code == V3RoleCode.HU) + return "HU"; + if (code == V3RoleCode.BMTU) + return "BMTU"; + if (code == V3RoleCode.CCU) + return "CCU"; + if (code == V3RoleCode.CHEST) + return "CHEST"; + if (code == V3RoleCode.EPIL) + return "EPIL"; + if (code == V3RoleCode.ER) + return "ER"; + if (code == V3RoleCode.ETU) + return "ETU"; + if (code == V3RoleCode.HD) + return "HD"; + if (code == V3RoleCode.HLAB) + return "HLAB"; + if (code == V3RoleCode.INLAB) + return "INLAB"; + if (code == V3RoleCode.OUTLAB) + return "OUTLAB"; + if (code == V3RoleCode.HRAD) + return "HRAD"; + if (code == V3RoleCode.HUSCS) + return "HUSCS"; + if (code == V3RoleCode.ICU) + return "ICU"; + if (code == V3RoleCode.PEDICU) + return "PEDICU"; + if (code == V3RoleCode.PEDNICU) + return "PEDNICU"; + if (code == V3RoleCode.INPHARM) + return "INPHARM"; + if (code == V3RoleCode.MBL) + return "MBL"; + if (code == V3RoleCode.NCCS) + return "NCCS"; + if (code == V3RoleCode.NS) + return "NS"; + if (code == V3RoleCode.OUTPHARM) + return "OUTPHARM"; + if (code == V3RoleCode.PEDU) + return "PEDU"; + if (code == V3RoleCode.PHU) + return "PHU"; + if (code == V3RoleCode.RHU) + return "RHU"; + if (code == V3RoleCode.SLEEP) + return "SLEEP"; + if (code == V3RoleCode.NCCF) + return "NCCF"; + if (code == V3RoleCode.SNF) + return "SNF"; + if (code == V3RoleCode.OF) + return "OF"; + if (code == V3RoleCode.ALL) + return "ALL"; + if (code == V3RoleCode.AMPUT) + return "AMPUT"; + if (code == V3RoleCode.BMTC) + return "BMTC"; + if (code == V3RoleCode.BREAST) + return "BREAST"; + if (code == V3RoleCode.CANC) + return "CANC"; + if (code == V3RoleCode.CAPC) + return "CAPC"; + if (code == V3RoleCode.CARD) + return "CARD"; + if (code == V3RoleCode.PEDCARD) + return "PEDCARD"; + if (code == V3RoleCode.COAG) + return "COAG"; + if (code == V3RoleCode.CRS) + return "CRS"; + if (code == V3RoleCode.DERM) + return "DERM"; + if (code == V3RoleCode.ENDO) + return "ENDO"; + if (code == V3RoleCode.PEDE) + return "PEDE"; + if (code == V3RoleCode.ENT) + return "ENT"; + if (code == V3RoleCode.FMC) + return "FMC"; + if (code == V3RoleCode.GI) + return "GI"; + if (code == V3RoleCode.PEDGI) + return "PEDGI"; + if (code == V3RoleCode.GIM) + return "GIM"; + if (code == V3RoleCode.GYN) + return "GYN"; + if (code == V3RoleCode.HEM) + return "HEM"; + if (code == V3RoleCode.PEDHEM) + return "PEDHEM"; + if (code == V3RoleCode.HTN) + return "HTN"; + if (code == V3RoleCode.IEC) + return "IEC"; + if (code == V3RoleCode.INFD) + return "INFD"; + if (code == V3RoleCode.PEDID) + return "PEDID"; + if (code == V3RoleCode.INV) + return "INV"; + if (code == V3RoleCode.LYMPH) + return "LYMPH"; + if (code == V3RoleCode.MGEN) + return "MGEN"; + if (code == V3RoleCode.NEPH) + return "NEPH"; + if (code == V3RoleCode.PEDNEPH) + return "PEDNEPH"; + if (code == V3RoleCode.NEUR) + return "NEUR"; + if (code == V3RoleCode.OB) + return "OB"; + if (code == V3RoleCode.OMS) + return "OMS"; + if (code == V3RoleCode.ONCL) + return "ONCL"; + if (code == V3RoleCode.PEDHO) + return "PEDHO"; + if (code == V3RoleCode.OPH) + return "OPH"; + if (code == V3RoleCode.OPTC) + return "OPTC"; + if (code == V3RoleCode.ORTHO) + return "ORTHO"; + if (code == V3RoleCode.HAND) + return "HAND"; + if (code == V3RoleCode.PAINCL) + return "PAINCL"; + if (code == V3RoleCode.PC) + return "PC"; + if (code == V3RoleCode.PEDC) + return "PEDC"; + if (code == V3RoleCode.PEDRHEUM) + return "PEDRHEUM"; + if (code == V3RoleCode.POD) + return "POD"; + if (code == V3RoleCode.PREV) + return "PREV"; + if (code == V3RoleCode.PROCTO) + return "PROCTO"; + if (code == V3RoleCode.PROFF) + return "PROFF"; + if (code == V3RoleCode.PROS) + return "PROS"; + if (code == V3RoleCode.PSI) + return "PSI"; + if (code == V3RoleCode.PSY) + return "PSY"; + if (code == V3RoleCode.RHEUM) + return "RHEUM"; + if (code == V3RoleCode.SPMED) + return "SPMED"; + if (code == V3RoleCode.SU) + return "SU"; + if (code == V3RoleCode.PLS) + return "PLS"; + if (code == V3RoleCode.URO) + return "URO"; + if (code == V3RoleCode.TR) + return "TR"; + if (code == V3RoleCode.TRAVEL) + return "TRAVEL"; + if (code == V3RoleCode.WND) + return "WND"; + if (code == V3RoleCode.RTF) + return "RTF"; + if (code == V3RoleCode.PRC) + return "PRC"; + if (code == V3RoleCode.SURF) + return "SURF"; + if (code == V3RoleCode._DEDICATEDNONCLINICALLOCATIONROLETYPE) + return "_DedicatedNonClinicalLocationRoleType"; + if (code == V3RoleCode.DADDR) + return "DADDR"; + if (code == V3RoleCode.MOBL) + return "MOBL"; + if (code == V3RoleCode.AMB) + return "AMB"; + if (code == V3RoleCode.PHARM) + return "PHARM"; + if (code == V3RoleCode._INCIDENTALSERVICEDELIVERYLOCATIONROLETYPE) + return "_IncidentalServiceDeliveryLocationRoleType"; + if (code == V3RoleCode.ACC) + return "ACC"; + if (code == V3RoleCode.COMM) + return "COMM"; + if (code == V3RoleCode.CSC) + return "CSC"; + if (code == V3RoleCode.PTRES) + return "PTRES"; + if (code == V3RoleCode.SCHOOL) + return "SCHOOL"; + if (code == V3RoleCode.UPC) + return "UPC"; + if (code == V3RoleCode.WORK) + return "WORK"; + if (code == V3RoleCode._SPECIMENROLETYPE) + return "_SpecimenRoleType"; + if (code == V3RoleCode.C) + return "C"; + if (code == V3RoleCode.G) + return "G"; + if (code == V3RoleCode.L) + return "L"; + if (code == V3RoleCode.P) + return "P"; + if (code == V3RoleCode.Q) + return "Q"; + if (code == V3RoleCode.B) + return "B"; + if (code == V3RoleCode.E) + return "E"; + if (code == V3RoleCode.F) + return "F"; + if (code == V3RoleCode.O) + return "O"; + if (code == V3RoleCode.V) + return "V"; + if (code == V3RoleCode.R) + return "R"; + if (code == V3RoleCode.CLAIM) + return "CLAIM"; + if (code == V3RoleCode.COMMUNITYLABORATORY) + return "communityLaboratory"; + if (code == V3RoleCode.GT) + return "GT"; + if (code == V3RoleCode.HOMEHEALTH) + return "homeHealth"; + if (code == V3RoleCode.LABORATORY) + return "laboratory"; + if (code == V3RoleCode.PATHOLOGIST) + return "pathologist"; + if (code == V3RoleCode.PH) + return "PH"; + if (code == V3RoleCode.PHLEBOTOMIST) + return "phlebotomist"; + if (code == V3RoleCode.PROG) + return "PROG"; + if (code == V3RoleCode.PT) + return "PT"; + if (code == V3RoleCode.SUBJECT) + return "subject"; + if (code == V3RoleCode.THIRDPARTY) + return "thirdParty"; + if (code == V3RoleCode.DEP) + return "DEP"; + if (code == V3RoleCode.DEPEN) + return "DEPEN"; + if (code == V3RoleCode.FM) + return "FM"; + if (code == V3RoleCode.INDIV) + return "INDIV"; + if (code == V3RoleCode.NAMED) + return "NAMED"; + if (code == V3RoleCode.PSYCHCF) + return "PSYCHCF"; + if (code == V3RoleCode.SUBSCR) + return "SUBSCR"; + return "?"; + } + + public String toSystem(V3RoleCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkStatus.java new file mode 100644 index 00000000000..2092220d8cb --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkStatus.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleLinkStatus { + + /** + * Description: The 'typical' state. Excludes "nullified" which represents the termination state of a RoleLink instance that was created in error. + */ + NORMAL, + /** + * Description: The state indicates the RoleLink is in progress. + */ + ACTIVE, + /** + * Description: The terminal state resulting from abandoning the RoleLink prior to or after activation. + */ + CANCELLED, + /** + * Description: The terminal state representing the successful completion of the RoleLink. + */ + COMPLETED, + /** + * Description: The state indicates the RoleLink has not yet become active. + */ + PENDING, + /** + * Description: The state representing the termination of a RoleLink instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3RoleLinkStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NORMAL".equals(codeString)) + return NORMAL; + if ("ACTIVE".equals(codeString)) + return ACTIVE; + if ("CANCELLED".equals(codeString)) + return CANCELLED; + if ("COMPLETED".equals(codeString)) + return COMPLETED; + if ("PENDING".equals(codeString)) + return PENDING; + if ("NULLIFIED".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3RoleLinkStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "NORMAL"; + case ACTIVE: return "ACTIVE"; + case CANCELLED: return "CANCELLED"; + case COMPLETED: return "COMPLETED"; + case PENDING: return "PENDING"; + case NULLIFIED: return "NULLIFIED"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleLinkStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "Description: The 'typical' state. Excludes \"nullified\" which represents the termination state of a RoleLink instance that was created in error."; + case ACTIVE: return "Description: The state indicates the RoleLink is in progress."; + case CANCELLED: return "Description: The terminal state resulting from abandoning the RoleLink prior to or after activation."; + case COMPLETED: return "Description: The terminal state representing the successful completion of the RoleLink."; + case PENDING: return "Description: The state indicates the RoleLink has not yet become active."; + case NULLIFIED: return "Description: The state representing the termination of a RoleLink instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case COMPLETED: return "completed"; + case PENDING: return "pending"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkStatusEnumFactory.java new file mode 100644 index 00000000000..d8d2c4af616 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkStatusEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RoleLinkStatusEnumFactory implements EnumFactory { + + public V3RoleLinkStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("NORMAL".equals(codeString)) + return V3RoleLinkStatus.NORMAL; + if ("ACTIVE".equals(codeString)) + return V3RoleLinkStatus.ACTIVE; + if ("CANCELLED".equals(codeString)) + return V3RoleLinkStatus.CANCELLED; + if ("COMPLETED".equals(codeString)) + return V3RoleLinkStatus.COMPLETED; + if ("PENDING".equals(codeString)) + return V3RoleLinkStatus.PENDING; + if ("NULLIFIED".equals(codeString)) + return V3RoleLinkStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3RoleLinkStatus code '"+codeString+"'"); + } + + public String toCode(V3RoleLinkStatus code) { + if (code == V3RoleLinkStatus.NORMAL) + return "NORMAL"; + if (code == V3RoleLinkStatus.ACTIVE) + return "ACTIVE"; + if (code == V3RoleLinkStatus.CANCELLED) + return "CANCELLED"; + if (code == V3RoleLinkStatus.COMPLETED) + return "COMPLETED"; + if (code == V3RoleLinkStatus.PENDING) + return "PENDING"; + if (code == V3RoleLinkStatus.NULLIFIED) + return "NULLIFIED"; + return "?"; + } + + public String toSystem(V3RoleLinkStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkType.java new file mode 100644 index 00000000000..38a9d819a90 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkType.java @@ -0,0 +1,143 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleLinkType { + + /** + * An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable. + + Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples: + */ + REL, + /** + * This relationship indicates the source Role is available to the target Role as a backup. An entity in a backup role will be available as a substitute or replacement in the event that the entity assigned the role is unavailable. In medical roles where it is critical that the function be performed and there is a possibility that the individual assigned may be ill or otherwise indisposed, another individual is assigned to cover for the individual originally assigned the role. A backup may be required to be identified, but unless the backup is actually used, he/she would not assume the assigned entity role. + */ + BACKUP, + /** + * This relationship indicates the target Role provides or receives information regarding the target role. For example, AssignedEntity is a contact for a ServiceDeliveryLocation. + */ + CONT, + /** + * The source Role has direct authority over the target role in a chain of authority. + */ + DIRAUTH, + /** + * Description: The source role provides identification for the target role. The source role must be IDENT. The player entity of the source role is constrained to be the same as (i.e. the equivalent of, or equal to) the player of the target role if present. If the player is absent from the source role, then it is assumed to be the same as the player of the target role. + */ + IDENT, + /** + * The source Role has indirect authority over the target role in a chain of authority. + */ + INDAUTH, + /** + * The target Role is part of the Source Role. + */ + PART, + /** + * This relationship indicates that the source Role replaces (or subsumes) the target Role. Allows for new identifiers and/or new effective time for a registry entry or a certification, etc. + */ + REPL, + /** + * added to help the parsers + */ + NULL; + public static V3RoleLinkType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("REL".equals(codeString)) + return REL; + if ("BACKUP".equals(codeString)) + return BACKUP; + if ("CONT".equals(codeString)) + return CONT; + if ("DIRAUTH".equals(codeString)) + return DIRAUTH; + if ("IDENT".equals(codeString)) + return IDENT; + if ("INDAUTH".equals(codeString)) + return INDAUTH; + if ("PART".equals(codeString)) + return PART; + if ("REPL".equals(codeString)) + return REPL; + throw new FHIRException("Unknown V3RoleLinkType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case REL: return "REL"; + case BACKUP: return "BACKUP"; + case CONT: return "CONT"; + case DIRAUTH: return "DIRAUTH"; + case IDENT: return "IDENT"; + case INDAUTH: return "INDAUTH"; + case PART: return "PART"; + case REPL: return "REPL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleLinkType"; + } + public String getDefinition() { + switch (this) { + case REL: return "An action taken with respect to a subject Entity by a regulatory or authoritative body with supervisory capacity over that entity. The action is taken in response to behavior by the subject Entity that body finds to be undesirable.\r\n\n Suspension, license restrictions, monetary fine, letter of reprimand, mandated training, mandated supervision, etc.Examples:"; + case BACKUP: return "This relationship indicates the source Role is available to the target Role as a backup. An entity in a backup role will be available as a substitute or replacement in the event that the entity assigned the role is unavailable. In medical roles where it is critical that the function be performed and there is a possibility that the individual assigned may be ill or otherwise indisposed, another individual is assigned to cover for the individual originally assigned the role. A backup may be required to be identified, but unless the backup is actually used, he/she would not assume the assigned entity role."; + case CONT: return "This relationship indicates the target Role provides or receives information regarding the target role. For example, AssignedEntity is a contact for a ServiceDeliveryLocation."; + case DIRAUTH: return "The source Role has direct authority over the target role in a chain of authority."; + case IDENT: return "Description: The source role provides identification for the target role. The source role must be IDENT. The player entity of the source role is constrained to be the same as (i.e. the equivalent of, or equal to) the player of the target role if present. If the player is absent from the source role, then it is assumed to be the same as the player of the target role."; + case INDAUTH: return "The source Role has indirect authority over the target role in a chain of authority."; + case PART: return "The target Role is part of the Source Role."; + case REPL: return "This relationship indicates that the source Role replaces (or subsumes) the target Role. Allows for new identifiers and/or new effective time for a registry entry or a certification, etc."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case REL: return "related"; + case BACKUP: return "is backup for"; + case CONT: return "has contact"; + case DIRAUTH: return "has direct authority over"; + case IDENT: return "Identification"; + case INDAUTH: return "has indirect authority over"; + case PART: return "has part"; + case REPL: return "replaces"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkTypeEnumFactory.java new file mode 100644 index 00000000000..6fe8a9c63f9 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleLinkTypeEnumFactory.java @@ -0,0 +1,86 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RoleLinkTypeEnumFactory implements EnumFactory { + + public V3RoleLinkType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("REL".equals(codeString)) + return V3RoleLinkType.REL; + if ("BACKUP".equals(codeString)) + return V3RoleLinkType.BACKUP; + if ("CONT".equals(codeString)) + return V3RoleLinkType.CONT; + if ("DIRAUTH".equals(codeString)) + return V3RoleLinkType.DIRAUTH; + if ("IDENT".equals(codeString)) + return V3RoleLinkType.IDENT; + if ("INDAUTH".equals(codeString)) + return V3RoleLinkType.INDAUTH; + if ("PART".equals(codeString)) + return V3RoleLinkType.PART; + if ("REPL".equals(codeString)) + return V3RoleLinkType.REPL; + throw new IllegalArgumentException("Unknown V3RoleLinkType code '"+codeString+"'"); + } + + public String toCode(V3RoleLinkType code) { + if (code == V3RoleLinkType.REL) + return "REL"; + if (code == V3RoleLinkType.BACKUP) + return "BACKUP"; + if (code == V3RoleLinkType.CONT) + return "CONT"; + if (code == V3RoleLinkType.DIRAUTH) + return "DIRAUTH"; + if (code == V3RoleLinkType.IDENT) + return "IDENT"; + if (code == V3RoleLinkType.INDAUTH) + return "INDAUTH"; + if (code == V3RoleLinkType.PART) + return "PART"; + if (code == V3RoleLinkType.REPL) + return "REPL"; + return "?"; + } + + public String toSystem(V3RoleLinkType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleStatus.java new file mode 100644 index 00000000000..f75a36a963b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleStatus.java @@ -0,0 +1,132 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RoleStatus { + + /** + * The 'typical' state. Excludes "nullified" which represents the termination state of a Role instance that was created in error. + */ + NORMAL, + /** + * The state representing the fact that the Entity is currently active in the Role. + */ + ACTIVE, + /** + * The terminal state resulting from cancellation of the role prior to activation. + */ + CANCELLED, + /** + * The state representing that fact that the role has not yet become active. + */ + PENDING, + /** + * The state that represents a suspension of the Entity playing the Role. This state is arrived at from the "active" state. + */ + SUSPENDED, + /** + * The state representing the successful termination of the Role. + */ + TERMINATED, + /** + * The state representing the termination of a Role instance that was created in error. + */ + NULLIFIED, + /** + * added to help the parsers + */ + NULL; + public static V3RoleStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return NORMAL; + if ("active".equals(codeString)) + return ACTIVE; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("pending".equals(codeString)) + return PENDING; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("terminated".equals(codeString)) + return TERMINATED; + if ("nullified".equals(codeString)) + return NULLIFIED; + throw new FHIRException("Unknown V3RoleStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case PENDING: return "pending"; + case SUSPENDED: return "suspended"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RoleStatus"; + } + public String getDefinition() { + switch (this) { + case NORMAL: return "The 'typical' state. Excludes \"nullified\" which represents the termination state of a Role instance that was created in error."; + case ACTIVE: return "The state representing the fact that the Entity is currently active in the Role."; + case CANCELLED: return "The terminal state resulting from cancellation of the role prior to activation."; + case PENDING: return "The state representing that fact that the role has not yet become active."; + case SUSPENDED: return "The state that represents a suspension of the Entity playing the Role. This state is arrived at from the \"active\" state."; + case TERMINATED: return "The state representing the successful termination of the Role."; + case NULLIFIED: return "The state representing the termination of a Role instance that was created in error."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NORMAL: return "normal"; + case ACTIVE: return "active"; + case CANCELLED: return "cancelled"; + case PENDING: return "pending"; + case SUSPENDED: return "suspended"; + case TERMINATED: return "terminated"; + case NULLIFIED: return "nullified"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleStatusEnumFactory.java new file mode 100644 index 00000000000..8427fd191a7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RoleStatusEnumFactory.java @@ -0,0 +1,82 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RoleStatusEnumFactory implements EnumFactory { + + public V3RoleStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("normal".equals(codeString)) + return V3RoleStatus.NORMAL; + if ("active".equals(codeString)) + return V3RoleStatus.ACTIVE; + if ("cancelled".equals(codeString)) + return V3RoleStatus.CANCELLED; + if ("pending".equals(codeString)) + return V3RoleStatus.PENDING; + if ("suspended".equals(codeString)) + return V3RoleStatus.SUSPENDED; + if ("terminated".equals(codeString)) + return V3RoleStatus.TERMINATED; + if ("nullified".equals(codeString)) + return V3RoleStatus.NULLIFIED; + throw new IllegalArgumentException("Unknown V3RoleStatus code '"+codeString+"'"); + } + + public String toCode(V3RoleStatus code) { + if (code == V3RoleStatus.NORMAL) + return "normal"; + if (code == V3RoleStatus.ACTIVE) + return "active"; + if (code == V3RoleStatus.CANCELLED) + return "cancelled"; + if (code == V3RoleStatus.PENDING) + return "pending"; + if (code == V3RoleStatus.SUSPENDED) + return "suspended"; + if (code == V3RoleStatus.TERMINATED) + return "terminated"; + if (code == V3RoleStatus.NULLIFIED) + return "nullified"; + return "?"; + } + + public String toSystem(V3RoleStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RouteOfAdministration.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RouteOfAdministration.java new file mode 100644 index 00000000000..0e2bab7c5b5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RouteOfAdministration.java @@ -0,0 +1,3543 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3RouteOfAdministration { + + /** + * Route of substance administration classified by administration method. + */ + _ROUTEBYMETHOD, + /** + * Immersion (soak) + */ + SOAK, + /** + * Shampoo + */ + SHAMPOO, + /** + * Translingual + */ + TRNSLING, + /** + * Swallow, oral + */ + PO, + /** + * Gargle + */ + GARGLE, + /** + * Suck, oromucosal + */ + SUCK, + /** + * Chew + */ + _CHEW, + /** + * Chew, oral + */ + CHEW, + /** + * Diffusion + */ + _DIFFUSION, + /** + * Diffusion, extracorporeal + */ + EXTCORPDIF, + /** + * Diffusion, hemodialysis + */ + HEMODIFF, + /** + * Diffusion, transdermal + */ + TRNSDERMD, + /** + * Dissolve + */ + _DISSOLVE, + /** + * Dissolve, oral + */ + DISSOLVE, + /** + * Dissolve, sublingual + */ + SL, + /** + * Douche + */ + _DOUCHE, + /** + * Douche, vaginal + */ + DOUCHE, + /** + * Electro-osmosis + */ + _ELECTROOSMOSISROUTE, + /** + * Electro-osmosis + */ + ELECTOSMOS, + /** + * Enema + */ + _ENEMA, + /** + * Enema, rectal + */ + ENEMA, + /** + * Enema, rectal retention + */ + RETENEMA, + /** + * Flush + */ + _FLUSH, + /** + * Flush, intravenous catheter + */ + IVFLUSH, + /** + * Implantation + */ + _IMPLANTATION, + /** + * Implantation, intradermal + */ + IDIMPLNT, + /** + * Implantation, intravitreal + */ + IVITIMPLNT, + /** + * Implantation, subcutaneous + */ + SQIMPLNT, + /** + * Infusion + */ + _INFUSION, + /** + * Infusion, epidural + */ + EPI, + /** + * Infusion, intraarterial catheter + */ + IA, + /** + * Infusion, intracardiac + */ + IC, + /** + * Infusion, intracoronary + */ + ICOR, + /** + * Infusion, intraosseous, continuous + */ + IOSSC, + /** + * Infusion, intrathecal + */ + IT, + /** + * Infusion, intravenous + */ + IV, + /** + * Infusion, intravenous catheter + */ + IVC, + /** + * Infusion, intravenous catheter, continuous + */ + IVCC, + /** + * Infusion, intravenous catheter, intermittent + */ + IVCI, + /** + * Infusion, intravenous catheter, pca pump + */ + PCA, + /** + * Infusion, intravascular + */ + IVASCINFUS, + /** + * Infusion, subcutaneous + */ + SQINFUS, + /** + * Inhalation + */ + _INHALATION, + /** + * Inhalation, oral + */ + IPINHL, + /** + * Inhalation, oral intermittent flow + */ + ORIFINHL, + /** + * Inhalation, oral rebreather mask + */ + REBREATH, + /** + * Inhalation, intermittent positive pressure breathing (ippb) + */ + IPPB, + /** + * Inhalation, nasal + */ + NASINHL, + /** + * Inhalation, nasal, prongs + */ + NASINHLC, + /** + * Inhalation, nebulization + */ + NEB, + /** + * Inhalation, nebulization, nasal + */ + NASNEB, + /** + * Inhalation, nebulization, oral + */ + ORNEB, + /** + * Inhalation, tracheostomy + */ + TRACH, + /** + * Inhalation, ventilator + */ + VENT, + /** + * Inhalation, ventimask + */ + VENTMASK, + /** + * Injection + */ + _INJECTION, + /** + * Injection, amniotic fluid + */ + AMNINJ, + /** + * Injection, biliary tract + */ + BILINJ, + /** + * Injection, for cholangiography + */ + CHOLINJ, + /** + * Injection, cervical + */ + CERVINJ, + /** + * Injection, epidural + */ + EPIDURINJ, + /** + * Injection, epidural, push + */ + EPIINJ, + /** + * Injection, epidural, slow push + */ + EPINJSP, + /** + * Injection, extra-amniotic + */ + EXTRAMNINJ, + /** + * Injection, extracorporeal + */ + EXTCORPINJ, + /** + * Injection, gastric button + */ + GBINJ, + /** + * Injection, gingival + */ + GINGINJ, + /** + * Injection, urinary bladder + */ + BLADINJ, + /** + * Injection, endosinusial + */ + ENDOSININJ, + /** + * Injection, hemodialysis port + */ + HEMOPORT, + /** + * Injection, intra-abdominal + */ + IABDINJ, + /** + * Injection, intraarterial + */ + IAINJ, + /** + * Injection, intraarterial, push + */ + IAINJP, + /** + * Injection, intraarterial, slow push + */ + IAINJSP, + /** + * Injection, intraarticular + */ + IARTINJ, + /** + * Injection, intrabursal + */ + IBURSINJ, + /** + * Injection, intracardiac + */ + ICARDINJ, + /** + * Injection, intracardiac, rapid push + */ + ICARDINJRP, + /** + * Injection, intracardiac, slow push + */ + ICARDINJSP, + /** + * Injection, intracardiac, push + */ + ICARINJP, + /** + * Injection, intracartilaginous + */ + ICARTINJ, + /** + * Injection, intracaudal + */ + ICAUDINJ, + /** + * Injection, intracavernous + */ + ICAVINJ, + /** + * Injection, intracavitary + */ + ICAVITINJ, + /** + * Injection, intracerebral + */ + ICEREBINJ, + /** + * Injection, intracisternal + */ + ICISTERNINJ, + /** + * Injection, intracoronary + */ + ICORONINJ, + /** + * Injection, intracoronary, push + */ + ICORONINJP, + /** + * Injection, intracorpus cavernosum + */ + ICORPCAVINJ, + /** + * Injection, intradermal + */ + IDINJ, + /** + * Injection, intradiscal + */ + IDISCINJ, + /** + * Injection, intraductal + */ + IDUCTINJ, + /** + * Injection, intradural + */ + IDURINJ, + /** + * Injection, intraepidermal + */ + IEPIDINJ, + /** + * Injection, intraepithelial + */ + IEPITHINJ, + /** + * Injection, intralesional + */ + ILESINJ, + /** + * Injection, intraluminal + */ + ILUMINJ, + /** + * Injection, intralymphatic + */ + ILYMPJINJ, + /** + * Injection, intramuscular + */ + IM, + /** + * Injection, intramuscular, deep + */ + IMD, + /** + * Injection, intramuscular, z track + */ + IMZ, + /** + * Injection, intramedullary + */ + IMEDULINJ, + /** + * Injection, interameningeal + */ + INTERMENINJ, + /** + * Injection, interstitial + */ + INTERSTITINJ, + /** + * Injection, intraocular + */ + IOINJ, + /** + * Injection, intraosseous + */ + IOSSINJ, + /** + * Injection, intraovarian + */ + IOVARINJ, + /** + * Injection, intrapericardial + */ + IPCARDINJ, + /** + * Injection, intraperitoneal + */ + IPERINJ, + /** + * Injection, intrapulmonary + */ + IPINJ, + /** + * Injection, intrapleural + */ + IPLRINJ, + /** + * Injection, intraprostatic + */ + IPROSTINJ, + /** + * Injection, insulin pump + */ + IPUMPINJ, + /** + * Injection, intraspinal + */ + ISINJ, + /** + * Injection, intrasternal + */ + ISTERINJ, + /** + * Injection, intrasynovial + */ + ISYNINJ, + /** + * Injection, intratendinous + */ + ITENDINJ, + /** + * Injection, intratesticular + */ + ITESTINJ, + /** + * Injection, intrathoracic + */ + ITHORINJ, + /** + * Injection, intrathecal + */ + ITINJ, + /** + * Injection, intratubular + */ + ITUBINJ, + /** + * Injection, intratumor + */ + ITUMINJ, + /** + * Injection, intratympanic + */ + ITYMPINJ, + /** + * Injection, intracervical (uterus) + */ + IUINJ, + /** + * Injection, intracervical (uterus) + */ + IUINJC, + /** + * Injection, intraureteral, retrograde + */ + IURETINJ, + /** + * Injection, intravascular + */ + IVASCINJ, + /** + * Injection, intraventricular (heart) + */ + IVENTINJ, + /** + * Injection, intravesicle + */ + IVESINJ, + /** + * Injection, intravenous + */ + IVINJ, + /** + * Injection, intravenous, bolus + */ + IVINJBOL, + /** + * Injection, intravenous, push + */ + IVPUSH, + /** + * Injection, intravenous, rapid push + */ + IVRPUSH, + /** + * Injection, intravenous, slow push + */ + IVSPUSH, + /** + * Injection, intravitreal + */ + IVITINJ, + /** + * Injection, periarticular + */ + PAINJ, + /** + * Injection, parenteral + */ + PARENTINJ, + /** + * Injection, periodontal + */ + PDONTINJ, + /** + * Injection, peritoneal dialysis port + */ + PDPINJ, + /** + * Injection, peridural + */ + PDURINJ, + /** + * Injection, perineural + */ + PNINJ, + /** + * Injection, paranasal sinuses + */ + PNSINJ, + /** + * Injection, retrobulbar + */ + RBINJ, + /** + * Injection, subconjunctival + */ + SCINJ, + /** + * Injection, sublesional + */ + SLESINJ, + /** + * Injection, soft tissue + */ + SOFTISINJ, + /** + * Injection, subcutaneous + */ + SQ, + /** + * Injection, subarachnoid + */ + SUBARACHINJ, + /** + * Injection, submucosal + */ + SUBMUCINJ, + /** + * Injection, transplacental + */ + TRPLACINJ, + /** + * Injection, transtracheal + */ + TRTRACHINJ, + /** + * Injection, urethral + */ + URETHINJ, + /** + * Injection, ureteral + */ + URETINJ, + /** + * Insertion + */ + _INSERTION, + /** + * Insertion, cervical (uterine) + */ + CERVINS, + /** + * Insertion, intraocular, surgical + */ + IOSURGINS, + /** + * Insertion, intrauterine + */ + IU, + /** + * Insertion, lacrimal puncta + */ + LPINS, + /** + * Insertion, rectal + */ + PR, + /** + * Insertion, subcutaneous, surgical + */ + SQSURGINS, + /** + * Insertion, urethral + */ + URETHINS, + /** + * Insertion, vaginal + */ + VAGINSI, + /** + * Instillation + */ + _INSTILLATION, + /** + * Instillation, cecostomy + */ + CECINSTL, + /** + * Instillation, enteral feeding tube + */ + EFT, + /** + * Instillation, enteral + */ + ENTINSTL, + /** + * Instillation, gastrostomy tube + */ + GT, + /** + * Instillation, nasogastric tube + */ + NGT, + /** + * Instillation, orogastric tube + */ + OGT, + /** + * Instillation, urinary catheter + */ + BLADINSTL, + /** + * Instillation, continuous ambulatory peritoneal dialysis port + */ + CAPDINSTL, + /** + * Instillation, chest tube + */ + CTINSTL, + /** + * Instillation, endotracheal tube + */ + ETINSTL, + /** + * Instillation, gastro-jejunostomy tube + */ + GJT, + /** + * Instillation, intrabronchial + */ + IBRONCHINSTIL, + /** + * Instillation, intraduodenal + */ + IDUODINSTIL, + /** + * Instillation, intraesophageal + */ + IESOPHINSTIL, + /** + * Instillation, intragastric + */ + IGASTINSTIL, + /** + * Instillation, intraileal + */ + IILEALINJ, + /** + * Instillation, intraocular + */ + IOINSTL, + /** + * Instillation, intrasinal + */ + ISININSTIL, + /** + * Instillation, intratracheal + */ + ITRACHINSTIL, + /** + * Instillation, intrauterine + */ + IUINSTL, + /** + * Instillation, jejunostomy tube + */ + JJTINSTL, + /** + * Instillation, laryngeal + */ + LARYNGINSTIL, + /** + * Instillation, nasal + */ + NASALINSTIL, + /** + * Instillation, nasogastric + */ + NASOGASINSTIL, + /** + * Instillation, nasotracheal tube + */ + NTT, + /** + * Instillation, orojejunum tube + */ + OJJ, + /** + * Instillation, otic + */ + OT, + /** + * Instillation, peritoneal dialysis port + */ + PDPINSTL, + /** + * Instillation, paranasal sinuses + */ + PNSINSTL, + /** + * Instillation, rectal + */ + RECINSTL, + /** + * Instillation, rectal tube + */ + RECTINSTL, + /** + * Instillation, sinus, unspecified + */ + SININSTIL, + /** + * Instillation, soft tissue + */ + SOFTISINSTIL, + /** + * Instillation, tracheostomy + */ + TRACHINSTL, + /** + * Instillation, transtympanic + */ + TRTYMPINSTIL, + /** + * Instillation, urethral + */ + URETHINSTL, + /** + * Iontophoresis + */ + _IONTOPHORESISROUTE, + /** + * Topical application, iontophoresis + */ + IONTO, + /** + * Irrigation + */ + _IRRIGATION, + /** + * Irrigation, genitourinary + */ + GUIRR, + /** + * Irrigation, intragastric + */ + IGASTIRR, + /** + * Irrigation, intralesional + */ + ILESIRR, + /** + * Irrigation, intraocular + */ + IOIRR, + /** + * Irrigation, urinary bladder + */ + BLADIRR, + /** + * Irrigation, urinary bladder, continuous + */ + BLADIRRC, + /** + * Irrigation, urinary bladder, tidal + */ + BLADIRRT, + /** + * Irrigation, rectal + */ + RECIRR, + /** + * Lavage + */ + _LAVAGEROUTE, + /** + * Lavage, intragastric + */ + IGASTLAV, + /** + * Mucosal absorption + */ + _MUCOSALABSORPTIONROUTE, + /** + * Mucosal absorption, intraduodenal + */ + IDOUDMAB, + /** + * Mucosal absorption, intratracheal + */ + ITRACHMAB, + /** + * Mucosal absorption, submucosal + */ + SMUCMAB, + /** + * Nebulization + */ + _NEBULIZATION, + /** + * Nebulization, endotracheal tube + */ + ETNEB, + /** + * Rinse + */ + _RINSE, + /** + * Rinse, dental + */ + DENRINSE, + /** + * Rinse, oral + */ + ORRINSE, + /** + * Suppository + */ + _SUPPOSITORYROUTE, + /** + * Suppository, urethral + */ + URETHSUP, + /** + * Swish + */ + _SWISH, + /** + * Swish and spit out, oromucosal + */ + SWISHSPIT, + /** + * Swish and swallow, oromucosal + */ + SWISHSWAL, + /** + * Topical absorption + */ + _TOPICALABSORPTIONROUTE, + /** + * Topical absorption, transtympanic + */ + TTYMPTABSORP, + /** + * Topical application + */ + _TOPICALAPPLICATION, + /** + * Topical application, soaked dressing + */ + DRESS, + /** + * Topical application, swab + */ + SWAB, + /** + * Topical + */ + TOPICAL, + /** + * Topical application, buccal + */ + BUC, + /** + * Topical application, cervical + */ + CERV, + /** + * Topical application, dental + */ + DEN, + /** + * Topical application, gingival + */ + GIN, + /** + * Topical application, hair + */ + HAIR, + /** + * Topical application, intracorneal + */ + ICORNTA, + /** + * Topical application, intracoronal (dental) + */ + ICORONTA, + /** + * Topical application, intraesophageal + */ + IESOPHTA, + /** + * Topical application, intraileal + */ + IILEALTA, + /** + * Topical application, intralesional + */ + ILTOP, + /** + * Topical application, intraluminal + */ + ILUMTA, + /** + * Topical application, intraocular + */ + IOTOP, + /** + * Topical application, laryngeal + */ + LARYNGTA, + /** + * Topical application, mucous membrane + */ + MUC, + /** + * Topical application, nail + */ + NAIL, + /** + * Topical application, nasal + */ + NASAL, + /** + * Topical application, ophthalmic + */ + OPTHALTA, + /** + * Topical application, oral + */ + ORALTA, + /** + * Topical application, oromucosal + */ + ORMUC, + /** + * Topical application, oropharyngeal + */ + OROPHARTA, + /** + * Topical application, perianal + */ + PERIANAL, + /** + * Topical application, perineal + */ + PERINEAL, + /** + * Topical application, periodontal + */ + PDONTTA, + /** + * Topical application, rectal + */ + RECTAL, + /** + * Topical application, scalp + */ + SCALP, + /** + * Occlusive dressing technique + */ + OCDRESTA, + /** + * Topical application, skin + */ + SKIN, + /** + * Subconjunctival + */ + SUBCONJTA, + /** + * Topical application, transmucosal + */ + TMUCTA, + /** + * Insertion, vaginal + */ + VAGINS, + /** + * Insufflation + */ + INSUF, + /** + * Transdermal + */ + TRNSDERM, + /** + * Route of substance administration classified by site. + */ + _ROUTEBYSITE, + /** + * Amniotic fluid sac + */ + _AMNIOTICFLUIDSACROUTE, + /** + * Biliary tract + */ + _BILIARYROUTE, + /** + * Body surface + */ + _BODYSURFACEROUTE, + /** + * Buccal mucosa + */ + _BUCCALMUCOSAROUTE, + /** + * Cecostomy + */ + _CECOSTOMYROUTE, + /** + * Cervix of the uterus + */ + _CERVICALROUTE, + /** + * Endocervical + */ + _ENDOCERVICALROUTE, + /** + * Enteral + */ + _ENTERALROUTE, + /** + * Epidural + */ + _EPIDURALROUTE, + /** + * Extra-amniotic + */ + _EXTRAAMNIOTICROUTE, + /** + * Extracorporeal circulation + */ + _EXTRACORPOREALCIRCULATIONROUTE, + /** + * Gastric + */ + _GASTRICROUTE, + /** + * Genitourinary + */ + _GENITOURINARYROUTE, + /** + * Gingival + */ + _GINGIVALROUTE, + /** + * Hair + */ + _HAIRROUTE, + /** + * Interameningeal + */ + _INTERAMENINGEALROUTE, + /** + * Interstitial + */ + _INTERSTITIALROUTE, + /** + * Intra-abdominal + */ + _INTRAABDOMINALROUTE, + /** + * Intra-arterial + */ + _INTRAARTERIALROUTE, + /** + * Intraarticular + */ + _INTRAARTICULARROUTE, + /** + * Intrabronchial + */ + _INTRABRONCHIALROUTE, + /** + * Intrabursal + */ + _INTRABURSALROUTE, + /** + * Intracardiac + */ + _INTRACARDIACROUTE, + /** + * Intracartilaginous + */ + _INTRACARTILAGINOUSROUTE, + /** + * Intracaudal + */ + _INTRACAUDALROUTE, + /** + * Intracavernosal + */ + _INTRACAVERNOSALROUTE, + /** + * Intracavitary + */ + _INTRACAVITARYROUTE, + /** + * Intracerebral + */ + _INTRACEREBRALROUTE, + /** + * Intracervical + */ + _INTRACERVICALROUTE, + /** + * Intracisternal + */ + _INTRACISTERNALROUTE, + /** + * Intracorneal + */ + _INTRACORNEALROUTE, + /** + * Intracoronal (dental) + */ + _INTRACORONALROUTE, + /** + * Intracoronary + */ + _INTRACORONARYROUTE, + /** + * Intracorpus cavernosum + */ + _INTRACORPUSCAVERNOSUMROUTE, + /** + * Intradermal + */ + _INTRADERMALROUTE, + /** + * Intradiscal + */ + _INTRADISCALROUTE, + /** + * Intraductal + */ + _INTRADUCTALROUTE, + /** + * Intraduodenal + */ + _INTRADUODENALROUTE, + /** + * Intradural + */ + _INTRADURALROUTE, + /** + * Intraepidermal + */ + _INTRAEPIDERMALROUTE, + /** + * Intraepithelial + */ + _INTRAEPITHELIALROUTE, + /** + * Intraesophageal + */ + _INTRAESOPHAGEALROUTE, + /** + * Intragastric + */ + _INTRAGASTRICROUTE, + /** + * Intraileal + */ + _INTRAILEALROUTE, + /** + * Intralesional + */ + _INTRALESIONALROUTE, + /** + * Intraluminal + */ + _INTRALUMINALROUTE, + /** + * Intralymphatic + */ + _INTRALYMPHATICROUTE, + /** + * Intramedullary + */ + _INTRAMEDULLARYROUTE, + /** + * Intramuscular + */ + _INTRAMUSCULARROUTE, + /** + * Intraocular + */ + _INTRAOCULARROUTE, + /** + * Intraosseous + */ + _INTRAOSSEOUSROUTE, + /** + * Intraovarian + */ + _INTRAOVARIANROUTE, + /** + * Intrapericardial + */ + _INTRAPERICARDIALROUTE, + /** + * Intraperitoneal + */ + _INTRAPERITONEALROUTE, + /** + * Intrapleural + */ + _INTRAPLEURALROUTE, + /** + * Intraprostatic + */ + _INTRAPROSTATICROUTE, + /** + * Intrapulmonary + */ + _INTRAPULMONARYROUTE, + /** + * Intrasinal + */ + _INTRASINALROUTE, + /** + * Intraspinal + */ + _INTRASPINALROUTE, + /** + * Intrasternal + */ + _INTRASTERNALROUTE, + /** + * Intrasynovial + */ + _INTRASYNOVIALROUTE, + /** + * Intratendinous + */ + _INTRATENDINOUSROUTE, + /** + * Intratesticular + */ + _INTRATESTICULARROUTE, + /** + * Intrathecal + */ + _INTRATHECALROUTE, + /** + * Intrathoracic + */ + _INTRATHORACICROUTE, + /** + * Intratracheal + */ + _INTRATRACHEALROUTE, + /** + * Intratubular + */ + _INTRATUBULARROUTE, + /** + * Intratumor + */ + _INTRATUMORROUTE, + /** + * Intratympanic + */ + _INTRATYMPANICROUTE, + /** + * Intrauterine + */ + _INTRAUTERINEROUTE, + /** + * Intravascular + */ + _INTRAVASCULARROUTE, + /** + * Intravenous + */ + _INTRAVENOUSROUTE, + /** + * Intraventricular + */ + _INTRAVENTRICULARROUTE, + /** + * Intravesicle + */ + _INTRAVESICLEROUTE, + /** + * Intravitreal + */ + _INTRAVITREALROUTE, + /** + * Jejunum + */ + _JEJUNUMROUTE, + /** + * Lacrimal puncta + */ + _LACRIMALPUNCTAROUTE, + /** + * Laryngeal + */ + _LARYNGEALROUTE, + /** + * Lingual + */ + _LINGUALROUTE, + /** + * Mucous membrane + */ + _MUCOUSMEMBRANEROUTE, + /** + * Nail + */ + _NAILROUTE, + /** + * Nasal + */ + _NASALROUTE, + /** + * Ophthalmic + */ + _OPHTHALMICROUTE, + /** + * Oral + */ + _ORALROUTE, + /** + * Oromucosal + */ + _OROMUCOSALROUTE, + /** + * Oropharyngeal + */ + _OROPHARYNGEALROUTE, + /** + * Otic + */ + _OTICROUTE, + /** + * Paranasal sinuses + */ + _PARANASALSINUSESROUTE, + /** + * Parenteral + */ + _PARENTERALROUTE, + /** + * Perianal + */ + _PERIANALROUTE, + /** + * Periarticular + */ + _PERIARTICULARROUTE, + /** + * Peridural + */ + _PERIDURALROUTE, + /** + * Perineal + */ + _PERINEALROUTE, + /** + * Perineural + */ + _PERINEURALROUTE, + /** + * Periodontal + */ + _PERIODONTALROUTE, + /** + * Pulmonary + */ + _PULMONARYROUTE, + /** + * Rectal + */ + _RECTALROUTE, + /** + * Respiratory tract + */ + _RESPIRATORYTRACTROUTE, + /** + * Retrobulbar + */ + _RETROBULBARROUTE, + /** + * Scalp + */ + _SCALPROUTE, + /** + * Sinus, unspecified + */ + _SINUSUNSPECIFIEDROUTE, + /** + * Skin + */ + _SKINROUTE, + /** + * Soft tissue + */ + _SOFTTISSUEROUTE, + /** + * Subarachnoid + */ + _SUBARACHNOIDROUTE, + /** + * Subconjunctival + */ + _SUBCONJUNCTIVALROUTE, + /** + * Subcutaneous + */ + _SUBCUTANEOUSROUTE, + /** + * Sublesional + */ + _SUBLESIONALROUTE, + /** + * Sublingual + */ + _SUBLINGUALROUTE, + /** + * Submucosal + */ + _SUBMUCOSALROUTE, + /** + * Tracheostomy + */ + _TRACHEOSTOMYROUTE, + /** + * Transmucosal + */ + _TRANSMUCOSALROUTE, + /** + * Transplacental + */ + _TRANSPLACENTALROUTE, + /** + * Transtracheal + */ + _TRANSTRACHEALROUTE, + /** + * Transtympanic + */ + _TRANSTYMPANICROUTE, + /** + * Ureteral + */ + _URETERALROUTE, + /** + * Urethral + */ + _URETHRALROUTE, + /** + * Urinary bladder + */ + _URINARYBLADDERROUTE, + /** + * Urinary tract + */ + _URINARYTRACTROUTE, + /** + * Vaginal + */ + _VAGINALROUTE, + /** + * Vitreous humour + */ + _VITREOUSHUMOURROUTE, + /** + * added to help the parsers + */ + NULL; + public static V3RouteOfAdministration fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_RouteByMethod".equals(codeString)) + return _ROUTEBYMETHOD; + if ("SOAK".equals(codeString)) + return SOAK; + if ("SHAMPOO".equals(codeString)) + return SHAMPOO; + if ("TRNSLING".equals(codeString)) + return TRNSLING; + if ("PO".equals(codeString)) + return PO; + if ("GARGLE".equals(codeString)) + return GARGLE; + if ("SUCK".equals(codeString)) + return SUCK; + if ("_Chew".equals(codeString)) + return _CHEW; + if ("CHEW".equals(codeString)) + return CHEW; + if ("_Diffusion".equals(codeString)) + return _DIFFUSION; + if ("EXTCORPDIF".equals(codeString)) + return EXTCORPDIF; + if ("HEMODIFF".equals(codeString)) + return HEMODIFF; + if ("TRNSDERMD".equals(codeString)) + return TRNSDERMD; + if ("_Dissolve".equals(codeString)) + return _DISSOLVE; + if ("DISSOLVE".equals(codeString)) + return DISSOLVE; + if ("SL".equals(codeString)) + return SL; + if ("_Douche".equals(codeString)) + return _DOUCHE; + if ("DOUCHE".equals(codeString)) + return DOUCHE; + if ("_ElectroOsmosisRoute".equals(codeString)) + return _ELECTROOSMOSISROUTE; + if ("ELECTOSMOS".equals(codeString)) + return ELECTOSMOS; + if ("_Enema".equals(codeString)) + return _ENEMA; + if ("ENEMA".equals(codeString)) + return ENEMA; + if ("RETENEMA".equals(codeString)) + return RETENEMA; + if ("_Flush".equals(codeString)) + return _FLUSH; + if ("IVFLUSH".equals(codeString)) + return IVFLUSH; + if ("_Implantation".equals(codeString)) + return _IMPLANTATION; + if ("IDIMPLNT".equals(codeString)) + return IDIMPLNT; + if ("IVITIMPLNT".equals(codeString)) + return IVITIMPLNT; + if ("SQIMPLNT".equals(codeString)) + return SQIMPLNT; + if ("_Infusion".equals(codeString)) + return _INFUSION; + if ("EPI".equals(codeString)) + return EPI; + if ("IA".equals(codeString)) + return IA; + if ("IC".equals(codeString)) + return IC; + if ("ICOR".equals(codeString)) + return ICOR; + if ("IOSSC".equals(codeString)) + return IOSSC; + if ("IT".equals(codeString)) + return IT; + if ("IV".equals(codeString)) + return IV; + if ("IVC".equals(codeString)) + return IVC; + if ("IVCC".equals(codeString)) + return IVCC; + if ("IVCI".equals(codeString)) + return IVCI; + if ("PCA".equals(codeString)) + return PCA; + if ("IVASCINFUS".equals(codeString)) + return IVASCINFUS; + if ("SQINFUS".equals(codeString)) + return SQINFUS; + if ("_Inhalation".equals(codeString)) + return _INHALATION; + if ("IPINHL".equals(codeString)) + return IPINHL; + if ("ORIFINHL".equals(codeString)) + return ORIFINHL; + if ("REBREATH".equals(codeString)) + return REBREATH; + if ("IPPB".equals(codeString)) + return IPPB; + if ("NASINHL".equals(codeString)) + return NASINHL; + if ("NASINHLC".equals(codeString)) + return NASINHLC; + if ("NEB".equals(codeString)) + return NEB; + if ("NASNEB".equals(codeString)) + return NASNEB; + if ("ORNEB".equals(codeString)) + return ORNEB; + if ("TRACH".equals(codeString)) + return TRACH; + if ("VENT".equals(codeString)) + return VENT; + if ("VENTMASK".equals(codeString)) + return VENTMASK; + if ("_Injection".equals(codeString)) + return _INJECTION; + if ("AMNINJ".equals(codeString)) + return AMNINJ; + if ("BILINJ".equals(codeString)) + return BILINJ; + if ("CHOLINJ".equals(codeString)) + return CHOLINJ; + if ("CERVINJ".equals(codeString)) + return CERVINJ; + if ("EPIDURINJ".equals(codeString)) + return EPIDURINJ; + if ("EPIINJ".equals(codeString)) + return EPIINJ; + if ("EPINJSP".equals(codeString)) + return EPINJSP; + if ("EXTRAMNINJ".equals(codeString)) + return EXTRAMNINJ; + if ("EXTCORPINJ".equals(codeString)) + return EXTCORPINJ; + if ("GBINJ".equals(codeString)) + return GBINJ; + if ("GINGINJ".equals(codeString)) + return GINGINJ; + if ("BLADINJ".equals(codeString)) + return BLADINJ; + if ("ENDOSININJ".equals(codeString)) + return ENDOSININJ; + if ("HEMOPORT".equals(codeString)) + return HEMOPORT; + if ("IABDINJ".equals(codeString)) + return IABDINJ; + if ("IAINJ".equals(codeString)) + return IAINJ; + if ("IAINJP".equals(codeString)) + return IAINJP; + if ("IAINJSP".equals(codeString)) + return IAINJSP; + if ("IARTINJ".equals(codeString)) + return IARTINJ; + if ("IBURSINJ".equals(codeString)) + return IBURSINJ; + if ("ICARDINJ".equals(codeString)) + return ICARDINJ; + if ("ICARDINJRP".equals(codeString)) + return ICARDINJRP; + if ("ICARDINJSP".equals(codeString)) + return ICARDINJSP; + if ("ICARINJP".equals(codeString)) + return ICARINJP; + if ("ICARTINJ".equals(codeString)) + return ICARTINJ; + if ("ICAUDINJ".equals(codeString)) + return ICAUDINJ; + if ("ICAVINJ".equals(codeString)) + return ICAVINJ; + if ("ICAVITINJ".equals(codeString)) + return ICAVITINJ; + if ("ICEREBINJ".equals(codeString)) + return ICEREBINJ; + if ("ICISTERNINJ".equals(codeString)) + return ICISTERNINJ; + if ("ICORONINJ".equals(codeString)) + return ICORONINJ; + if ("ICORONINJP".equals(codeString)) + return ICORONINJP; + if ("ICORPCAVINJ".equals(codeString)) + return ICORPCAVINJ; + if ("IDINJ".equals(codeString)) + return IDINJ; + if ("IDISCINJ".equals(codeString)) + return IDISCINJ; + if ("IDUCTINJ".equals(codeString)) + return IDUCTINJ; + if ("IDURINJ".equals(codeString)) + return IDURINJ; + if ("IEPIDINJ".equals(codeString)) + return IEPIDINJ; + if ("IEPITHINJ".equals(codeString)) + return IEPITHINJ; + if ("ILESINJ".equals(codeString)) + return ILESINJ; + if ("ILUMINJ".equals(codeString)) + return ILUMINJ; + if ("ILYMPJINJ".equals(codeString)) + return ILYMPJINJ; + if ("IM".equals(codeString)) + return IM; + if ("IMD".equals(codeString)) + return IMD; + if ("IMZ".equals(codeString)) + return IMZ; + if ("IMEDULINJ".equals(codeString)) + return IMEDULINJ; + if ("INTERMENINJ".equals(codeString)) + return INTERMENINJ; + if ("INTERSTITINJ".equals(codeString)) + return INTERSTITINJ; + if ("IOINJ".equals(codeString)) + return IOINJ; + if ("IOSSINJ".equals(codeString)) + return IOSSINJ; + if ("IOVARINJ".equals(codeString)) + return IOVARINJ; + if ("IPCARDINJ".equals(codeString)) + return IPCARDINJ; + if ("IPERINJ".equals(codeString)) + return IPERINJ; + if ("IPINJ".equals(codeString)) + return IPINJ; + if ("IPLRINJ".equals(codeString)) + return IPLRINJ; + if ("IPROSTINJ".equals(codeString)) + return IPROSTINJ; + if ("IPUMPINJ".equals(codeString)) + return IPUMPINJ; + if ("ISINJ".equals(codeString)) + return ISINJ; + if ("ISTERINJ".equals(codeString)) + return ISTERINJ; + if ("ISYNINJ".equals(codeString)) + return ISYNINJ; + if ("ITENDINJ".equals(codeString)) + return ITENDINJ; + if ("ITESTINJ".equals(codeString)) + return ITESTINJ; + if ("ITHORINJ".equals(codeString)) + return ITHORINJ; + if ("ITINJ".equals(codeString)) + return ITINJ; + if ("ITUBINJ".equals(codeString)) + return ITUBINJ; + if ("ITUMINJ".equals(codeString)) + return ITUMINJ; + if ("ITYMPINJ".equals(codeString)) + return ITYMPINJ; + if ("IUINJ".equals(codeString)) + return IUINJ; + if ("IUINJC".equals(codeString)) + return IUINJC; + if ("IURETINJ".equals(codeString)) + return IURETINJ; + if ("IVASCINJ".equals(codeString)) + return IVASCINJ; + if ("IVENTINJ".equals(codeString)) + return IVENTINJ; + if ("IVESINJ".equals(codeString)) + return IVESINJ; + if ("IVINJ".equals(codeString)) + return IVINJ; + if ("IVINJBOL".equals(codeString)) + return IVINJBOL; + if ("IVPUSH".equals(codeString)) + return IVPUSH; + if ("IVRPUSH".equals(codeString)) + return IVRPUSH; + if ("IVSPUSH".equals(codeString)) + return IVSPUSH; + if ("IVITINJ".equals(codeString)) + return IVITINJ; + if ("PAINJ".equals(codeString)) + return PAINJ; + if ("PARENTINJ".equals(codeString)) + return PARENTINJ; + if ("PDONTINJ".equals(codeString)) + return PDONTINJ; + if ("PDPINJ".equals(codeString)) + return PDPINJ; + if ("PDURINJ".equals(codeString)) + return PDURINJ; + if ("PNINJ".equals(codeString)) + return PNINJ; + if ("PNSINJ".equals(codeString)) + return PNSINJ; + if ("RBINJ".equals(codeString)) + return RBINJ; + if ("SCINJ".equals(codeString)) + return SCINJ; + if ("SLESINJ".equals(codeString)) + return SLESINJ; + if ("SOFTISINJ".equals(codeString)) + return SOFTISINJ; + if ("SQ".equals(codeString)) + return SQ; + if ("SUBARACHINJ".equals(codeString)) + return SUBARACHINJ; + if ("SUBMUCINJ".equals(codeString)) + return SUBMUCINJ; + if ("TRPLACINJ".equals(codeString)) + return TRPLACINJ; + if ("TRTRACHINJ".equals(codeString)) + return TRTRACHINJ; + if ("URETHINJ".equals(codeString)) + return URETHINJ; + if ("URETINJ".equals(codeString)) + return URETINJ; + if ("_Insertion".equals(codeString)) + return _INSERTION; + if ("CERVINS".equals(codeString)) + return CERVINS; + if ("IOSURGINS".equals(codeString)) + return IOSURGINS; + if ("IU".equals(codeString)) + return IU; + if ("LPINS".equals(codeString)) + return LPINS; + if ("PR".equals(codeString)) + return PR; + if ("SQSURGINS".equals(codeString)) + return SQSURGINS; + if ("URETHINS".equals(codeString)) + return URETHINS; + if ("VAGINSI".equals(codeString)) + return VAGINSI; + if ("_Instillation".equals(codeString)) + return _INSTILLATION; + if ("CECINSTL".equals(codeString)) + return CECINSTL; + if ("EFT".equals(codeString)) + return EFT; + if ("ENTINSTL".equals(codeString)) + return ENTINSTL; + if ("GT".equals(codeString)) + return GT; + if ("NGT".equals(codeString)) + return NGT; + if ("OGT".equals(codeString)) + return OGT; + if ("BLADINSTL".equals(codeString)) + return BLADINSTL; + if ("CAPDINSTL".equals(codeString)) + return CAPDINSTL; + if ("CTINSTL".equals(codeString)) + return CTINSTL; + if ("ETINSTL".equals(codeString)) + return ETINSTL; + if ("GJT".equals(codeString)) + return GJT; + if ("IBRONCHINSTIL".equals(codeString)) + return IBRONCHINSTIL; + if ("IDUODINSTIL".equals(codeString)) + return IDUODINSTIL; + if ("IESOPHINSTIL".equals(codeString)) + return IESOPHINSTIL; + if ("IGASTINSTIL".equals(codeString)) + return IGASTINSTIL; + if ("IILEALINJ".equals(codeString)) + return IILEALINJ; + if ("IOINSTL".equals(codeString)) + return IOINSTL; + if ("ISININSTIL".equals(codeString)) + return ISININSTIL; + if ("ITRACHINSTIL".equals(codeString)) + return ITRACHINSTIL; + if ("IUINSTL".equals(codeString)) + return IUINSTL; + if ("JJTINSTL".equals(codeString)) + return JJTINSTL; + if ("LARYNGINSTIL".equals(codeString)) + return LARYNGINSTIL; + if ("NASALINSTIL".equals(codeString)) + return NASALINSTIL; + if ("NASOGASINSTIL".equals(codeString)) + return NASOGASINSTIL; + if ("NTT".equals(codeString)) + return NTT; + if ("OJJ".equals(codeString)) + return OJJ; + if ("OT".equals(codeString)) + return OT; + if ("PDPINSTL".equals(codeString)) + return PDPINSTL; + if ("PNSINSTL".equals(codeString)) + return PNSINSTL; + if ("RECINSTL".equals(codeString)) + return RECINSTL; + if ("RECTINSTL".equals(codeString)) + return RECTINSTL; + if ("SININSTIL".equals(codeString)) + return SININSTIL; + if ("SOFTISINSTIL".equals(codeString)) + return SOFTISINSTIL; + if ("TRACHINSTL".equals(codeString)) + return TRACHINSTL; + if ("TRTYMPINSTIL".equals(codeString)) + return TRTYMPINSTIL; + if ("URETHINSTL".equals(codeString)) + return URETHINSTL; + if ("_IontophoresisRoute".equals(codeString)) + return _IONTOPHORESISROUTE; + if ("IONTO".equals(codeString)) + return IONTO; + if ("_Irrigation".equals(codeString)) + return _IRRIGATION; + if ("GUIRR".equals(codeString)) + return GUIRR; + if ("IGASTIRR".equals(codeString)) + return IGASTIRR; + if ("ILESIRR".equals(codeString)) + return ILESIRR; + if ("IOIRR".equals(codeString)) + return IOIRR; + if ("BLADIRR".equals(codeString)) + return BLADIRR; + if ("BLADIRRC".equals(codeString)) + return BLADIRRC; + if ("BLADIRRT".equals(codeString)) + return BLADIRRT; + if ("RECIRR".equals(codeString)) + return RECIRR; + if ("_LavageRoute".equals(codeString)) + return _LAVAGEROUTE; + if ("IGASTLAV".equals(codeString)) + return IGASTLAV; + if ("_MucosalAbsorptionRoute".equals(codeString)) + return _MUCOSALABSORPTIONROUTE; + if ("IDOUDMAB".equals(codeString)) + return IDOUDMAB; + if ("ITRACHMAB".equals(codeString)) + return ITRACHMAB; + if ("SMUCMAB".equals(codeString)) + return SMUCMAB; + if ("_Nebulization".equals(codeString)) + return _NEBULIZATION; + if ("ETNEB".equals(codeString)) + return ETNEB; + if ("_Rinse".equals(codeString)) + return _RINSE; + if ("DENRINSE".equals(codeString)) + return DENRINSE; + if ("ORRINSE".equals(codeString)) + return ORRINSE; + if ("_SuppositoryRoute".equals(codeString)) + return _SUPPOSITORYROUTE; + if ("URETHSUP".equals(codeString)) + return URETHSUP; + if ("_Swish".equals(codeString)) + return _SWISH; + if ("SWISHSPIT".equals(codeString)) + return SWISHSPIT; + if ("SWISHSWAL".equals(codeString)) + return SWISHSWAL; + if ("_TopicalAbsorptionRoute".equals(codeString)) + return _TOPICALABSORPTIONROUTE; + if ("TTYMPTABSORP".equals(codeString)) + return TTYMPTABSORP; + if ("_TopicalApplication".equals(codeString)) + return _TOPICALAPPLICATION; + if ("DRESS".equals(codeString)) + return DRESS; + if ("SWAB".equals(codeString)) + return SWAB; + if ("TOPICAL".equals(codeString)) + return TOPICAL; + if ("BUC".equals(codeString)) + return BUC; + if ("CERV".equals(codeString)) + return CERV; + if ("DEN".equals(codeString)) + return DEN; + if ("GIN".equals(codeString)) + return GIN; + if ("HAIR".equals(codeString)) + return HAIR; + if ("ICORNTA".equals(codeString)) + return ICORNTA; + if ("ICORONTA".equals(codeString)) + return ICORONTA; + if ("IESOPHTA".equals(codeString)) + return IESOPHTA; + if ("IILEALTA".equals(codeString)) + return IILEALTA; + if ("ILTOP".equals(codeString)) + return ILTOP; + if ("ILUMTA".equals(codeString)) + return ILUMTA; + if ("IOTOP".equals(codeString)) + return IOTOP; + if ("LARYNGTA".equals(codeString)) + return LARYNGTA; + if ("MUC".equals(codeString)) + return MUC; + if ("NAIL".equals(codeString)) + return NAIL; + if ("NASAL".equals(codeString)) + return NASAL; + if ("OPTHALTA".equals(codeString)) + return OPTHALTA; + if ("ORALTA".equals(codeString)) + return ORALTA; + if ("ORMUC".equals(codeString)) + return ORMUC; + if ("OROPHARTA".equals(codeString)) + return OROPHARTA; + if ("PERIANAL".equals(codeString)) + return PERIANAL; + if ("PERINEAL".equals(codeString)) + return PERINEAL; + if ("PDONTTA".equals(codeString)) + return PDONTTA; + if ("RECTAL".equals(codeString)) + return RECTAL; + if ("SCALP".equals(codeString)) + return SCALP; + if ("OCDRESTA".equals(codeString)) + return OCDRESTA; + if ("SKIN".equals(codeString)) + return SKIN; + if ("SUBCONJTA".equals(codeString)) + return SUBCONJTA; + if ("TMUCTA".equals(codeString)) + return TMUCTA; + if ("VAGINS".equals(codeString)) + return VAGINS; + if ("INSUF".equals(codeString)) + return INSUF; + if ("TRNSDERM".equals(codeString)) + return TRNSDERM; + if ("_RouteBySite".equals(codeString)) + return _ROUTEBYSITE; + if ("_AmnioticFluidSacRoute".equals(codeString)) + return _AMNIOTICFLUIDSACROUTE; + if ("_BiliaryRoute".equals(codeString)) + return _BILIARYROUTE; + if ("_BodySurfaceRoute".equals(codeString)) + return _BODYSURFACEROUTE; + if ("_BuccalMucosaRoute".equals(codeString)) + return _BUCCALMUCOSAROUTE; + if ("_CecostomyRoute".equals(codeString)) + return _CECOSTOMYROUTE; + if ("_CervicalRoute".equals(codeString)) + return _CERVICALROUTE; + if ("_EndocervicalRoute".equals(codeString)) + return _ENDOCERVICALROUTE; + if ("_EnteralRoute".equals(codeString)) + return _ENTERALROUTE; + if ("_EpiduralRoute".equals(codeString)) + return _EPIDURALROUTE; + if ("_ExtraAmnioticRoute".equals(codeString)) + return _EXTRAAMNIOTICROUTE; + if ("_ExtracorporealCirculationRoute".equals(codeString)) + return _EXTRACORPOREALCIRCULATIONROUTE; + if ("_GastricRoute".equals(codeString)) + return _GASTRICROUTE; + if ("_GenitourinaryRoute".equals(codeString)) + return _GENITOURINARYROUTE; + if ("_GingivalRoute".equals(codeString)) + return _GINGIVALROUTE; + if ("_HairRoute".equals(codeString)) + return _HAIRROUTE; + if ("_InterameningealRoute".equals(codeString)) + return _INTERAMENINGEALROUTE; + if ("_InterstitialRoute".equals(codeString)) + return _INTERSTITIALROUTE; + if ("_IntraabdominalRoute".equals(codeString)) + return _INTRAABDOMINALROUTE; + if ("_IntraarterialRoute".equals(codeString)) + return _INTRAARTERIALROUTE; + if ("_IntraarticularRoute".equals(codeString)) + return _INTRAARTICULARROUTE; + if ("_IntrabronchialRoute".equals(codeString)) + return _INTRABRONCHIALROUTE; + if ("_IntrabursalRoute".equals(codeString)) + return _INTRABURSALROUTE; + if ("_IntracardiacRoute".equals(codeString)) + return _INTRACARDIACROUTE; + if ("_IntracartilaginousRoute".equals(codeString)) + return _INTRACARTILAGINOUSROUTE; + if ("_IntracaudalRoute".equals(codeString)) + return _INTRACAUDALROUTE; + if ("_IntracavernosalRoute".equals(codeString)) + return _INTRACAVERNOSALROUTE; + if ("_IntracavitaryRoute".equals(codeString)) + return _INTRACAVITARYROUTE; + if ("_IntracerebralRoute".equals(codeString)) + return _INTRACEREBRALROUTE; + if ("_IntracervicalRoute".equals(codeString)) + return _INTRACERVICALROUTE; + if ("_IntracisternalRoute".equals(codeString)) + return _INTRACISTERNALROUTE; + if ("_IntracornealRoute".equals(codeString)) + return _INTRACORNEALROUTE; + if ("_IntracoronalRoute".equals(codeString)) + return _INTRACORONALROUTE; + if ("_IntracoronaryRoute".equals(codeString)) + return _INTRACORONARYROUTE; + if ("_IntracorpusCavernosumRoute".equals(codeString)) + return _INTRACORPUSCAVERNOSUMROUTE; + if ("_IntradermalRoute".equals(codeString)) + return _INTRADERMALROUTE; + if ("_IntradiscalRoute".equals(codeString)) + return _INTRADISCALROUTE; + if ("_IntraductalRoute".equals(codeString)) + return _INTRADUCTALROUTE; + if ("_IntraduodenalRoute".equals(codeString)) + return _INTRADUODENALROUTE; + if ("_IntraduralRoute".equals(codeString)) + return _INTRADURALROUTE; + if ("_IntraepidermalRoute".equals(codeString)) + return _INTRAEPIDERMALROUTE; + if ("_IntraepithelialRoute".equals(codeString)) + return _INTRAEPITHELIALROUTE; + if ("_IntraesophagealRoute".equals(codeString)) + return _INTRAESOPHAGEALROUTE; + if ("_IntragastricRoute".equals(codeString)) + return _INTRAGASTRICROUTE; + if ("_IntrailealRoute".equals(codeString)) + return _INTRAILEALROUTE; + if ("_IntralesionalRoute".equals(codeString)) + return _INTRALESIONALROUTE; + if ("_IntraluminalRoute".equals(codeString)) + return _INTRALUMINALROUTE; + if ("_IntralymphaticRoute".equals(codeString)) + return _INTRALYMPHATICROUTE; + if ("_IntramedullaryRoute".equals(codeString)) + return _INTRAMEDULLARYROUTE; + if ("_IntramuscularRoute".equals(codeString)) + return _INTRAMUSCULARROUTE; + if ("_IntraocularRoute".equals(codeString)) + return _INTRAOCULARROUTE; + if ("_IntraosseousRoute".equals(codeString)) + return _INTRAOSSEOUSROUTE; + if ("_IntraovarianRoute".equals(codeString)) + return _INTRAOVARIANROUTE; + if ("_IntrapericardialRoute".equals(codeString)) + return _INTRAPERICARDIALROUTE; + if ("_IntraperitonealRoute".equals(codeString)) + return _INTRAPERITONEALROUTE; + if ("_IntrapleuralRoute".equals(codeString)) + return _INTRAPLEURALROUTE; + if ("_IntraprostaticRoute".equals(codeString)) + return _INTRAPROSTATICROUTE; + if ("_IntrapulmonaryRoute".equals(codeString)) + return _INTRAPULMONARYROUTE; + if ("_IntrasinalRoute".equals(codeString)) + return _INTRASINALROUTE; + if ("_IntraspinalRoute".equals(codeString)) + return _INTRASPINALROUTE; + if ("_IntrasternalRoute".equals(codeString)) + return _INTRASTERNALROUTE; + if ("_IntrasynovialRoute".equals(codeString)) + return _INTRASYNOVIALROUTE; + if ("_IntratendinousRoute".equals(codeString)) + return _INTRATENDINOUSROUTE; + if ("_IntratesticularRoute".equals(codeString)) + return _INTRATESTICULARROUTE; + if ("_IntrathecalRoute".equals(codeString)) + return _INTRATHECALROUTE; + if ("_IntrathoracicRoute".equals(codeString)) + return _INTRATHORACICROUTE; + if ("_IntratrachealRoute".equals(codeString)) + return _INTRATRACHEALROUTE; + if ("_IntratubularRoute".equals(codeString)) + return _INTRATUBULARROUTE; + if ("_IntratumorRoute".equals(codeString)) + return _INTRATUMORROUTE; + if ("_IntratympanicRoute".equals(codeString)) + return _INTRATYMPANICROUTE; + if ("_IntrauterineRoute".equals(codeString)) + return _INTRAUTERINEROUTE; + if ("_IntravascularRoute".equals(codeString)) + return _INTRAVASCULARROUTE; + if ("_IntravenousRoute".equals(codeString)) + return _INTRAVENOUSROUTE; + if ("_IntraventricularRoute".equals(codeString)) + return _INTRAVENTRICULARROUTE; + if ("_IntravesicleRoute".equals(codeString)) + return _INTRAVESICLEROUTE; + if ("_IntravitrealRoute".equals(codeString)) + return _INTRAVITREALROUTE; + if ("_JejunumRoute".equals(codeString)) + return _JEJUNUMROUTE; + if ("_LacrimalPunctaRoute".equals(codeString)) + return _LACRIMALPUNCTAROUTE; + if ("_LaryngealRoute".equals(codeString)) + return _LARYNGEALROUTE; + if ("_LingualRoute".equals(codeString)) + return _LINGUALROUTE; + if ("_MucousMembraneRoute".equals(codeString)) + return _MUCOUSMEMBRANEROUTE; + if ("_NailRoute".equals(codeString)) + return _NAILROUTE; + if ("_NasalRoute".equals(codeString)) + return _NASALROUTE; + if ("_OphthalmicRoute".equals(codeString)) + return _OPHTHALMICROUTE; + if ("_OralRoute".equals(codeString)) + return _ORALROUTE; + if ("_OromucosalRoute".equals(codeString)) + return _OROMUCOSALROUTE; + if ("_OropharyngealRoute".equals(codeString)) + return _OROPHARYNGEALROUTE; + if ("_OticRoute".equals(codeString)) + return _OTICROUTE; + if ("_ParanasalSinusesRoute".equals(codeString)) + return _PARANASALSINUSESROUTE; + if ("_ParenteralRoute".equals(codeString)) + return _PARENTERALROUTE; + if ("_PerianalRoute".equals(codeString)) + return _PERIANALROUTE; + if ("_PeriarticularRoute".equals(codeString)) + return _PERIARTICULARROUTE; + if ("_PeriduralRoute".equals(codeString)) + return _PERIDURALROUTE; + if ("_PerinealRoute".equals(codeString)) + return _PERINEALROUTE; + if ("_PerineuralRoute".equals(codeString)) + return _PERINEURALROUTE; + if ("_PeriodontalRoute".equals(codeString)) + return _PERIODONTALROUTE; + if ("_PulmonaryRoute".equals(codeString)) + return _PULMONARYROUTE; + if ("_RectalRoute".equals(codeString)) + return _RECTALROUTE; + if ("_RespiratoryTractRoute".equals(codeString)) + return _RESPIRATORYTRACTROUTE; + if ("_RetrobulbarRoute".equals(codeString)) + return _RETROBULBARROUTE; + if ("_ScalpRoute".equals(codeString)) + return _SCALPROUTE; + if ("_SinusUnspecifiedRoute".equals(codeString)) + return _SINUSUNSPECIFIEDROUTE; + if ("_SkinRoute".equals(codeString)) + return _SKINROUTE; + if ("_SoftTissueRoute".equals(codeString)) + return _SOFTTISSUEROUTE; + if ("_SubarachnoidRoute".equals(codeString)) + return _SUBARACHNOIDROUTE; + if ("_SubconjunctivalRoute".equals(codeString)) + return _SUBCONJUNCTIVALROUTE; + if ("_SubcutaneousRoute".equals(codeString)) + return _SUBCUTANEOUSROUTE; + if ("_SublesionalRoute".equals(codeString)) + return _SUBLESIONALROUTE; + if ("_SublingualRoute".equals(codeString)) + return _SUBLINGUALROUTE; + if ("_SubmucosalRoute".equals(codeString)) + return _SUBMUCOSALROUTE; + if ("_TracheostomyRoute".equals(codeString)) + return _TRACHEOSTOMYROUTE; + if ("_TransmucosalRoute".equals(codeString)) + return _TRANSMUCOSALROUTE; + if ("_TransplacentalRoute".equals(codeString)) + return _TRANSPLACENTALROUTE; + if ("_TranstrachealRoute".equals(codeString)) + return _TRANSTRACHEALROUTE; + if ("_TranstympanicRoute".equals(codeString)) + return _TRANSTYMPANICROUTE; + if ("_UreteralRoute".equals(codeString)) + return _URETERALROUTE; + if ("_UrethralRoute".equals(codeString)) + return _URETHRALROUTE; + if ("_UrinaryBladderRoute".equals(codeString)) + return _URINARYBLADDERROUTE; + if ("_UrinaryTractRoute".equals(codeString)) + return _URINARYTRACTROUTE; + if ("_VaginalRoute".equals(codeString)) + return _VAGINALROUTE; + if ("_VitreousHumourRoute".equals(codeString)) + return _VITREOUSHUMOURROUTE; + throw new FHIRException("Unknown V3RouteOfAdministration code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ROUTEBYMETHOD: return "_RouteByMethod"; + case SOAK: return "SOAK"; + case SHAMPOO: return "SHAMPOO"; + case TRNSLING: return "TRNSLING"; + case PO: return "PO"; + case GARGLE: return "GARGLE"; + case SUCK: return "SUCK"; + case _CHEW: return "_Chew"; + case CHEW: return "CHEW"; + case _DIFFUSION: return "_Diffusion"; + case EXTCORPDIF: return "EXTCORPDIF"; + case HEMODIFF: return "HEMODIFF"; + case TRNSDERMD: return "TRNSDERMD"; + case _DISSOLVE: return "_Dissolve"; + case DISSOLVE: return "DISSOLVE"; + case SL: return "SL"; + case _DOUCHE: return "_Douche"; + case DOUCHE: return "DOUCHE"; + case _ELECTROOSMOSISROUTE: return "_ElectroOsmosisRoute"; + case ELECTOSMOS: return "ELECTOSMOS"; + case _ENEMA: return "_Enema"; + case ENEMA: return "ENEMA"; + case RETENEMA: return "RETENEMA"; + case _FLUSH: return "_Flush"; + case IVFLUSH: return "IVFLUSH"; + case _IMPLANTATION: return "_Implantation"; + case IDIMPLNT: return "IDIMPLNT"; + case IVITIMPLNT: return "IVITIMPLNT"; + case SQIMPLNT: return "SQIMPLNT"; + case _INFUSION: return "_Infusion"; + case EPI: return "EPI"; + case IA: return "IA"; + case IC: return "IC"; + case ICOR: return "ICOR"; + case IOSSC: return "IOSSC"; + case IT: return "IT"; + case IV: return "IV"; + case IVC: return "IVC"; + case IVCC: return "IVCC"; + case IVCI: return "IVCI"; + case PCA: return "PCA"; + case IVASCINFUS: return "IVASCINFUS"; + case SQINFUS: return "SQINFUS"; + case _INHALATION: return "_Inhalation"; + case IPINHL: return "IPINHL"; + case ORIFINHL: return "ORIFINHL"; + case REBREATH: return "REBREATH"; + case IPPB: return "IPPB"; + case NASINHL: return "NASINHL"; + case NASINHLC: return "NASINHLC"; + case NEB: return "NEB"; + case NASNEB: return "NASNEB"; + case ORNEB: return "ORNEB"; + case TRACH: return "TRACH"; + case VENT: return "VENT"; + case VENTMASK: return "VENTMASK"; + case _INJECTION: return "_Injection"; + case AMNINJ: return "AMNINJ"; + case BILINJ: return "BILINJ"; + case CHOLINJ: return "CHOLINJ"; + case CERVINJ: return "CERVINJ"; + case EPIDURINJ: return "EPIDURINJ"; + case EPIINJ: return "EPIINJ"; + case EPINJSP: return "EPINJSP"; + case EXTRAMNINJ: return "EXTRAMNINJ"; + case EXTCORPINJ: return "EXTCORPINJ"; + case GBINJ: return "GBINJ"; + case GINGINJ: return "GINGINJ"; + case BLADINJ: return "BLADINJ"; + case ENDOSININJ: return "ENDOSININJ"; + case HEMOPORT: return "HEMOPORT"; + case IABDINJ: return "IABDINJ"; + case IAINJ: return "IAINJ"; + case IAINJP: return "IAINJP"; + case IAINJSP: return "IAINJSP"; + case IARTINJ: return "IARTINJ"; + case IBURSINJ: return "IBURSINJ"; + case ICARDINJ: return "ICARDINJ"; + case ICARDINJRP: return "ICARDINJRP"; + case ICARDINJSP: return "ICARDINJSP"; + case ICARINJP: return "ICARINJP"; + case ICARTINJ: return "ICARTINJ"; + case ICAUDINJ: return "ICAUDINJ"; + case ICAVINJ: return "ICAVINJ"; + case ICAVITINJ: return "ICAVITINJ"; + case ICEREBINJ: return "ICEREBINJ"; + case ICISTERNINJ: return "ICISTERNINJ"; + case ICORONINJ: return "ICORONINJ"; + case ICORONINJP: return "ICORONINJP"; + case ICORPCAVINJ: return "ICORPCAVINJ"; + case IDINJ: return "IDINJ"; + case IDISCINJ: return "IDISCINJ"; + case IDUCTINJ: return "IDUCTINJ"; + case IDURINJ: return "IDURINJ"; + case IEPIDINJ: return "IEPIDINJ"; + case IEPITHINJ: return "IEPITHINJ"; + case ILESINJ: return "ILESINJ"; + case ILUMINJ: return "ILUMINJ"; + case ILYMPJINJ: return "ILYMPJINJ"; + case IM: return "IM"; + case IMD: return "IMD"; + case IMZ: return "IMZ"; + case IMEDULINJ: return "IMEDULINJ"; + case INTERMENINJ: return "INTERMENINJ"; + case INTERSTITINJ: return "INTERSTITINJ"; + case IOINJ: return "IOINJ"; + case IOSSINJ: return "IOSSINJ"; + case IOVARINJ: return "IOVARINJ"; + case IPCARDINJ: return "IPCARDINJ"; + case IPERINJ: return "IPERINJ"; + case IPINJ: return "IPINJ"; + case IPLRINJ: return "IPLRINJ"; + case IPROSTINJ: return "IPROSTINJ"; + case IPUMPINJ: return "IPUMPINJ"; + case ISINJ: return "ISINJ"; + case ISTERINJ: return "ISTERINJ"; + case ISYNINJ: return "ISYNINJ"; + case ITENDINJ: return "ITENDINJ"; + case ITESTINJ: return "ITESTINJ"; + case ITHORINJ: return "ITHORINJ"; + case ITINJ: return "ITINJ"; + case ITUBINJ: return "ITUBINJ"; + case ITUMINJ: return "ITUMINJ"; + case ITYMPINJ: return "ITYMPINJ"; + case IUINJ: return "IUINJ"; + case IUINJC: return "IUINJC"; + case IURETINJ: return "IURETINJ"; + case IVASCINJ: return "IVASCINJ"; + case IVENTINJ: return "IVENTINJ"; + case IVESINJ: return "IVESINJ"; + case IVINJ: return "IVINJ"; + case IVINJBOL: return "IVINJBOL"; + case IVPUSH: return "IVPUSH"; + case IVRPUSH: return "IVRPUSH"; + case IVSPUSH: return "IVSPUSH"; + case IVITINJ: return "IVITINJ"; + case PAINJ: return "PAINJ"; + case PARENTINJ: return "PARENTINJ"; + case PDONTINJ: return "PDONTINJ"; + case PDPINJ: return "PDPINJ"; + case PDURINJ: return "PDURINJ"; + case PNINJ: return "PNINJ"; + case PNSINJ: return "PNSINJ"; + case RBINJ: return "RBINJ"; + case SCINJ: return "SCINJ"; + case SLESINJ: return "SLESINJ"; + case SOFTISINJ: return "SOFTISINJ"; + case SQ: return "SQ"; + case SUBARACHINJ: return "SUBARACHINJ"; + case SUBMUCINJ: return "SUBMUCINJ"; + case TRPLACINJ: return "TRPLACINJ"; + case TRTRACHINJ: return "TRTRACHINJ"; + case URETHINJ: return "URETHINJ"; + case URETINJ: return "URETINJ"; + case _INSERTION: return "_Insertion"; + case CERVINS: return "CERVINS"; + case IOSURGINS: return "IOSURGINS"; + case IU: return "IU"; + case LPINS: return "LPINS"; + case PR: return "PR"; + case SQSURGINS: return "SQSURGINS"; + case URETHINS: return "URETHINS"; + case VAGINSI: return "VAGINSI"; + case _INSTILLATION: return "_Instillation"; + case CECINSTL: return "CECINSTL"; + case EFT: return "EFT"; + case ENTINSTL: return "ENTINSTL"; + case GT: return "GT"; + case NGT: return "NGT"; + case OGT: return "OGT"; + case BLADINSTL: return "BLADINSTL"; + case CAPDINSTL: return "CAPDINSTL"; + case CTINSTL: return "CTINSTL"; + case ETINSTL: return "ETINSTL"; + case GJT: return "GJT"; + case IBRONCHINSTIL: return "IBRONCHINSTIL"; + case IDUODINSTIL: return "IDUODINSTIL"; + case IESOPHINSTIL: return "IESOPHINSTIL"; + case IGASTINSTIL: return "IGASTINSTIL"; + case IILEALINJ: return "IILEALINJ"; + case IOINSTL: return "IOINSTL"; + case ISININSTIL: return "ISININSTIL"; + case ITRACHINSTIL: return "ITRACHINSTIL"; + case IUINSTL: return "IUINSTL"; + case JJTINSTL: return "JJTINSTL"; + case LARYNGINSTIL: return "LARYNGINSTIL"; + case NASALINSTIL: return "NASALINSTIL"; + case NASOGASINSTIL: return "NASOGASINSTIL"; + case NTT: return "NTT"; + case OJJ: return "OJJ"; + case OT: return "OT"; + case PDPINSTL: return "PDPINSTL"; + case PNSINSTL: return "PNSINSTL"; + case RECINSTL: return "RECINSTL"; + case RECTINSTL: return "RECTINSTL"; + case SININSTIL: return "SININSTIL"; + case SOFTISINSTIL: return "SOFTISINSTIL"; + case TRACHINSTL: return "TRACHINSTL"; + case TRTYMPINSTIL: return "TRTYMPINSTIL"; + case URETHINSTL: return "URETHINSTL"; + case _IONTOPHORESISROUTE: return "_IontophoresisRoute"; + case IONTO: return "IONTO"; + case _IRRIGATION: return "_Irrigation"; + case GUIRR: return "GUIRR"; + case IGASTIRR: return "IGASTIRR"; + case ILESIRR: return "ILESIRR"; + case IOIRR: return "IOIRR"; + case BLADIRR: return "BLADIRR"; + case BLADIRRC: return "BLADIRRC"; + case BLADIRRT: return "BLADIRRT"; + case RECIRR: return "RECIRR"; + case _LAVAGEROUTE: return "_LavageRoute"; + case IGASTLAV: return "IGASTLAV"; + case _MUCOSALABSORPTIONROUTE: return "_MucosalAbsorptionRoute"; + case IDOUDMAB: return "IDOUDMAB"; + case ITRACHMAB: return "ITRACHMAB"; + case SMUCMAB: return "SMUCMAB"; + case _NEBULIZATION: return "_Nebulization"; + case ETNEB: return "ETNEB"; + case _RINSE: return "_Rinse"; + case DENRINSE: return "DENRINSE"; + case ORRINSE: return "ORRINSE"; + case _SUPPOSITORYROUTE: return "_SuppositoryRoute"; + case URETHSUP: return "URETHSUP"; + case _SWISH: return "_Swish"; + case SWISHSPIT: return "SWISHSPIT"; + case SWISHSWAL: return "SWISHSWAL"; + case _TOPICALABSORPTIONROUTE: return "_TopicalAbsorptionRoute"; + case TTYMPTABSORP: return "TTYMPTABSORP"; + case _TOPICALAPPLICATION: return "_TopicalApplication"; + case DRESS: return "DRESS"; + case SWAB: return "SWAB"; + case TOPICAL: return "TOPICAL"; + case BUC: return "BUC"; + case CERV: return "CERV"; + case DEN: return "DEN"; + case GIN: return "GIN"; + case HAIR: return "HAIR"; + case ICORNTA: return "ICORNTA"; + case ICORONTA: return "ICORONTA"; + case IESOPHTA: return "IESOPHTA"; + case IILEALTA: return "IILEALTA"; + case ILTOP: return "ILTOP"; + case ILUMTA: return "ILUMTA"; + case IOTOP: return "IOTOP"; + case LARYNGTA: return "LARYNGTA"; + case MUC: return "MUC"; + case NAIL: return "NAIL"; + case NASAL: return "NASAL"; + case OPTHALTA: return "OPTHALTA"; + case ORALTA: return "ORALTA"; + case ORMUC: return "ORMUC"; + case OROPHARTA: return "OROPHARTA"; + case PERIANAL: return "PERIANAL"; + case PERINEAL: return "PERINEAL"; + case PDONTTA: return "PDONTTA"; + case RECTAL: return "RECTAL"; + case SCALP: return "SCALP"; + case OCDRESTA: return "OCDRESTA"; + case SKIN: return "SKIN"; + case SUBCONJTA: return "SUBCONJTA"; + case TMUCTA: return "TMUCTA"; + case VAGINS: return "VAGINS"; + case INSUF: return "INSUF"; + case TRNSDERM: return "TRNSDERM"; + case _ROUTEBYSITE: return "_RouteBySite"; + case _AMNIOTICFLUIDSACROUTE: return "_AmnioticFluidSacRoute"; + case _BILIARYROUTE: return "_BiliaryRoute"; + case _BODYSURFACEROUTE: return "_BodySurfaceRoute"; + case _BUCCALMUCOSAROUTE: return "_BuccalMucosaRoute"; + case _CECOSTOMYROUTE: return "_CecostomyRoute"; + case _CERVICALROUTE: return "_CervicalRoute"; + case _ENDOCERVICALROUTE: return "_EndocervicalRoute"; + case _ENTERALROUTE: return "_EnteralRoute"; + case _EPIDURALROUTE: return "_EpiduralRoute"; + case _EXTRAAMNIOTICROUTE: return "_ExtraAmnioticRoute"; + case _EXTRACORPOREALCIRCULATIONROUTE: return "_ExtracorporealCirculationRoute"; + case _GASTRICROUTE: return "_GastricRoute"; + case _GENITOURINARYROUTE: return "_GenitourinaryRoute"; + case _GINGIVALROUTE: return "_GingivalRoute"; + case _HAIRROUTE: return "_HairRoute"; + case _INTERAMENINGEALROUTE: return "_InterameningealRoute"; + case _INTERSTITIALROUTE: return "_InterstitialRoute"; + case _INTRAABDOMINALROUTE: return "_IntraabdominalRoute"; + case _INTRAARTERIALROUTE: return "_IntraarterialRoute"; + case _INTRAARTICULARROUTE: return "_IntraarticularRoute"; + case _INTRABRONCHIALROUTE: return "_IntrabronchialRoute"; + case _INTRABURSALROUTE: return "_IntrabursalRoute"; + case _INTRACARDIACROUTE: return "_IntracardiacRoute"; + case _INTRACARTILAGINOUSROUTE: return "_IntracartilaginousRoute"; + case _INTRACAUDALROUTE: return "_IntracaudalRoute"; + case _INTRACAVERNOSALROUTE: return "_IntracavernosalRoute"; + case _INTRACAVITARYROUTE: return "_IntracavitaryRoute"; + case _INTRACEREBRALROUTE: return "_IntracerebralRoute"; + case _INTRACERVICALROUTE: return "_IntracervicalRoute"; + case _INTRACISTERNALROUTE: return "_IntracisternalRoute"; + case _INTRACORNEALROUTE: return "_IntracornealRoute"; + case _INTRACORONALROUTE: return "_IntracoronalRoute"; + case _INTRACORONARYROUTE: return "_IntracoronaryRoute"; + case _INTRACORPUSCAVERNOSUMROUTE: return "_IntracorpusCavernosumRoute"; + case _INTRADERMALROUTE: return "_IntradermalRoute"; + case _INTRADISCALROUTE: return "_IntradiscalRoute"; + case _INTRADUCTALROUTE: return "_IntraductalRoute"; + case _INTRADUODENALROUTE: return "_IntraduodenalRoute"; + case _INTRADURALROUTE: return "_IntraduralRoute"; + case _INTRAEPIDERMALROUTE: return "_IntraepidermalRoute"; + case _INTRAEPITHELIALROUTE: return "_IntraepithelialRoute"; + case _INTRAESOPHAGEALROUTE: return "_IntraesophagealRoute"; + case _INTRAGASTRICROUTE: return "_IntragastricRoute"; + case _INTRAILEALROUTE: return "_IntrailealRoute"; + case _INTRALESIONALROUTE: return "_IntralesionalRoute"; + case _INTRALUMINALROUTE: return "_IntraluminalRoute"; + case _INTRALYMPHATICROUTE: return "_IntralymphaticRoute"; + case _INTRAMEDULLARYROUTE: return "_IntramedullaryRoute"; + case _INTRAMUSCULARROUTE: return "_IntramuscularRoute"; + case _INTRAOCULARROUTE: return "_IntraocularRoute"; + case _INTRAOSSEOUSROUTE: return "_IntraosseousRoute"; + case _INTRAOVARIANROUTE: return "_IntraovarianRoute"; + case _INTRAPERICARDIALROUTE: return "_IntrapericardialRoute"; + case _INTRAPERITONEALROUTE: return "_IntraperitonealRoute"; + case _INTRAPLEURALROUTE: return "_IntrapleuralRoute"; + case _INTRAPROSTATICROUTE: return "_IntraprostaticRoute"; + case _INTRAPULMONARYROUTE: return "_IntrapulmonaryRoute"; + case _INTRASINALROUTE: return "_IntrasinalRoute"; + case _INTRASPINALROUTE: return "_IntraspinalRoute"; + case _INTRASTERNALROUTE: return "_IntrasternalRoute"; + case _INTRASYNOVIALROUTE: return "_IntrasynovialRoute"; + case _INTRATENDINOUSROUTE: return "_IntratendinousRoute"; + case _INTRATESTICULARROUTE: return "_IntratesticularRoute"; + case _INTRATHECALROUTE: return "_IntrathecalRoute"; + case _INTRATHORACICROUTE: return "_IntrathoracicRoute"; + case _INTRATRACHEALROUTE: return "_IntratrachealRoute"; + case _INTRATUBULARROUTE: return "_IntratubularRoute"; + case _INTRATUMORROUTE: return "_IntratumorRoute"; + case _INTRATYMPANICROUTE: return "_IntratympanicRoute"; + case _INTRAUTERINEROUTE: return "_IntrauterineRoute"; + case _INTRAVASCULARROUTE: return "_IntravascularRoute"; + case _INTRAVENOUSROUTE: return "_IntravenousRoute"; + case _INTRAVENTRICULARROUTE: return "_IntraventricularRoute"; + case _INTRAVESICLEROUTE: return "_IntravesicleRoute"; + case _INTRAVITREALROUTE: return "_IntravitrealRoute"; + case _JEJUNUMROUTE: return "_JejunumRoute"; + case _LACRIMALPUNCTAROUTE: return "_LacrimalPunctaRoute"; + case _LARYNGEALROUTE: return "_LaryngealRoute"; + case _LINGUALROUTE: return "_LingualRoute"; + case _MUCOUSMEMBRANEROUTE: return "_MucousMembraneRoute"; + case _NAILROUTE: return "_NailRoute"; + case _NASALROUTE: return "_NasalRoute"; + case _OPHTHALMICROUTE: return "_OphthalmicRoute"; + case _ORALROUTE: return "_OralRoute"; + case _OROMUCOSALROUTE: return "_OromucosalRoute"; + case _OROPHARYNGEALROUTE: return "_OropharyngealRoute"; + case _OTICROUTE: return "_OticRoute"; + case _PARANASALSINUSESROUTE: return "_ParanasalSinusesRoute"; + case _PARENTERALROUTE: return "_ParenteralRoute"; + case _PERIANALROUTE: return "_PerianalRoute"; + case _PERIARTICULARROUTE: return "_PeriarticularRoute"; + case _PERIDURALROUTE: return "_PeriduralRoute"; + case _PERINEALROUTE: return "_PerinealRoute"; + case _PERINEURALROUTE: return "_PerineuralRoute"; + case _PERIODONTALROUTE: return "_PeriodontalRoute"; + case _PULMONARYROUTE: return "_PulmonaryRoute"; + case _RECTALROUTE: return "_RectalRoute"; + case _RESPIRATORYTRACTROUTE: return "_RespiratoryTractRoute"; + case _RETROBULBARROUTE: return "_RetrobulbarRoute"; + case _SCALPROUTE: return "_ScalpRoute"; + case _SINUSUNSPECIFIEDROUTE: return "_SinusUnspecifiedRoute"; + case _SKINROUTE: return "_SkinRoute"; + case _SOFTTISSUEROUTE: return "_SoftTissueRoute"; + case _SUBARACHNOIDROUTE: return "_SubarachnoidRoute"; + case _SUBCONJUNCTIVALROUTE: return "_SubconjunctivalRoute"; + case _SUBCUTANEOUSROUTE: return "_SubcutaneousRoute"; + case _SUBLESIONALROUTE: return "_SublesionalRoute"; + case _SUBLINGUALROUTE: return "_SublingualRoute"; + case _SUBMUCOSALROUTE: return "_SubmucosalRoute"; + case _TRACHEOSTOMYROUTE: return "_TracheostomyRoute"; + case _TRANSMUCOSALROUTE: return "_TransmucosalRoute"; + case _TRANSPLACENTALROUTE: return "_TransplacentalRoute"; + case _TRANSTRACHEALROUTE: return "_TranstrachealRoute"; + case _TRANSTYMPANICROUTE: return "_TranstympanicRoute"; + case _URETERALROUTE: return "_UreteralRoute"; + case _URETHRALROUTE: return "_UrethralRoute"; + case _URINARYBLADDERROUTE: return "_UrinaryBladderRoute"; + case _URINARYTRACTROUTE: return "_UrinaryTractRoute"; + case _VAGINALROUTE: return "_VaginalRoute"; + case _VITREOUSHUMOURROUTE: return "_VitreousHumourRoute"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/RouteOfAdministration"; + } + public String getDefinition() { + switch (this) { + case _ROUTEBYMETHOD: return "Route of substance administration classified by administration method."; + case SOAK: return "Immersion (soak)"; + case SHAMPOO: return "Shampoo"; + case TRNSLING: return "Translingual"; + case PO: return "Swallow, oral"; + case GARGLE: return "Gargle"; + case SUCK: return "Suck, oromucosal"; + case _CHEW: return "Chew"; + case CHEW: return "Chew, oral"; + case _DIFFUSION: return "Diffusion"; + case EXTCORPDIF: return "Diffusion, extracorporeal"; + case HEMODIFF: return "Diffusion, hemodialysis"; + case TRNSDERMD: return "Diffusion, transdermal"; + case _DISSOLVE: return "Dissolve"; + case DISSOLVE: return "Dissolve, oral"; + case SL: return "Dissolve, sublingual"; + case _DOUCHE: return "Douche"; + case DOUCHE: return "Douche, vaginal"; + case _ELECTROOSMOSISROUTE: return "Electro-osmosis"; + case ELECTOSMOS: return "Electro-osmosis"; + case _ENEMA: return "Enema"; + case ENEMA: return "Enema, rectal"; + case RETENEMA: return "Enema, rectal retention"; + case _FLUSH: return "Flush"; + case IVFLUSH: return "Flush, intravenous catheter"; + case _IMPLANTATION: return "Implantation"; + case IDIMPLNT: return "Implantation, intradermal"; + case IVITIMPLNT: return "Implantation, intravitreal"; + case SQIMPLNT: return "Implantation, subcutaneous"; + case _INFUSION: return "Infusion"; + case EPI: return "Infusion, epidural"; + case IA: return "Infusion, intraarterial catheter"; + case IC: return "Infusion, intracardiac"; + case ICOR: return "Infusion, intracoronary"; + case IOSSC: return "Infusion, intraosseous, continuous"; + case IT: return "Infusion, intrathecal"; + case IV: return "Infusion, intravenous"; + case IVC: return "Infusion, intravenous catheter"; + case IVCC: return "Infusion, intravenous catheter, continuous"; + case IVCI: return "Infusion, intravenous catheter, intermittent"; + case PCA: return "Infusion, intravenous catheter, pca pump"; + case IVASCINFUS: return "Infusion, intravascular"; + case SQINFUS: return "Infusion, subcutaneous"; + case _INHALATION: return "Inhalation"; + case IPINHL: return "Inhalation, oral"; + case ORIFINHL: return "Inhalation, oral intermittent flow"; + case REBREATH: return "Inhalation, oral rebreather mask"; + case IPPB: return "Inhalation, intermittent positive pressure breathing (ippb)"; + case NASINHL: return "Inhalation, nasal"; + case NASINHLC: return "Inhalation, nasal, prongs"; + case NEB: return "Inhalation, nebulization"; + case NASNEB: return "Inhalation, nebulization, nasal"; + case ORNEB: return "Inhalation, nebulization, oral"; + case TRACH: return "Inhalation, tracheostomy"; + case VENT: return "Inhalation, ventilator"; + case VENTMASK: return "Inhalation, ventimask"; + case _INJECTION: return "Injection"; + case AMNINJ: return "Injection, amniotic fluid"; + case BILINJ: return "Injection, biliary tract"; + case CHOLINJ: return "Injection, for cholangiography"; + case CERVINJ: return "Injection, cervical"; + case EPIDURINJ: return "Injection, epidural"; + case EPIINJ: return "Injection, epidural, push"; + case EPINJSP: return "Injection, epidural, slow push"; + case EXTRAMNINJ: return "Injection, extra-amniotic"; + case EXTCORPINJ: return "Injection, extracorporeal"; + case GBINJ: return "Injection, gastric button"; + case GINGINJ: return "Injection, gingival"; + case BLADINJ: return "Injection, urinary bladder"; + case ENDOSININJ: return "Injection, endosinusial"; + case HEMOPORT: return "Injection, hemodialysis port"; + case IABDINJ: return "Injection, intra-abdominal"; + case IAINJ: return "Injection, intraarterial"; + case IAINJP: return "Injection, intraarterial, push"; + case IAINJSP: return "Injection, intraarterial, slow push"; + case IARTINJ: return "Injection, intraarticular"; + case IBURSINJ: return "Injection, intrabursal"; + case ICARDINJ: return "Injection, intracardiac"; + case ICARDINJRP: return "Injection, intracardiac, rapid push"; + case ICARDINJSP: return "Injection, intracardiac, slow push"; + case ICARINJP: return "Injection, intracardiac, push"; + case ICARTINJ: return "Injection, intracartilaginous"; + case ICAUDINJ: return "Injection, intracaudal"; + case ICAVINJ: return "Injection, intracavernous"; + case ICAVITINJ: return "Injection, intracavitary"; + case ICEREBINJ: return "Injection, intracerebral"; + case ICISTERNINJ: return "Injection, intracisternal"; + case ICORONINJ: return "Injection, intracoronary"; + case ICORONINJP: return "Injection, intracoronary, push"; + case ICORPCAVINJ: return "Injection, intracorpus cavernosum"; + case IDINJ: return "Injection, intradermal"; + case IDISCINJ: return "Injection, intradiscal"; + case IDUCTINJ: return "Injection, intraductal"; + case IDURINJ: return "Injection, intradural"; + case IEPIDINJ: return "Injection, intraepidermal"; + case IEPITHINJ: return "Injection, intraepithelial"; + case ILESINJ: return "Injection, intralesional"; + case ILUMINJ: return "Injection, intraluminal"; + case ILYMPJINJ: return "Injection, intralymphatic"; + case IM: return "Injection, intramuscular"; + case IMD: return "Injection, intramuscular, deep"; + case IMZ: return "Injection, intramuscular, z track"; + case IMEDULINJ: return "Injection, intramedullary"; + case INTERMENINJ: return "Injection, interameningeal"; + case INTERSTITINJ: return "Injection, interstitial"; + case IOINJ: return "Injection, intraocular"; + case IOSSINJ: return "Injection, intraosseous"; + case IOVARINJ: return "Injection, intraovarian"; + case IPCARDINJ: return "Injection, intrapericardial"; + case IPERINJ: return "Injection, intraperitoneal"; + case IPINJ: return "Injection, intrapulmonary"; + case IPLRINJ: return "Injection, intrapleural"; + case IPROSTINJ: return "Injection, intraprostatic"; + case IPUMPINJ: return "Injection, insulin pump"; + case ISINJ: return "Injection, intraspinal"; + case ISTERINJ: return "Injection, intrasternal"; + case ISYNINJ: return "Injection, intrasynovial"; + case ITENDINJ: return "Injection, intratendinous"; + case ITESTINJ: return "Injection, intratesticular"; + case ITHORINJ: return "Injection, intrathoracic"; + case ITINJ: return "Injection, intrathecal"; + case ITUBINJ: return "Injection, intratubular"; + case ITUMINJ: return "Injection, intratumor"; + case ITYMPINJ: return "Injection, intratympanic"; + case IUINJ: return "Injection, intracervical (uterus)"; + case IUINJC: return "Injection, intracervical (uterus)"; + case IURETINJ: return "Injection, intraureteral, retrograde"; + case IVASCINJ: return "Injection, intravascular"; + case IVENTINJ: return "Injection, intraventricular (heart)"; + case IVESINJ: return "Injection, intravesicle"; + case IVINJ: return "Injection, intravenous"; + case IVINJBOL: return "Injection, intravenous, bolus"; + case IVPUSH: return "Injection, intravenous, push"; + case IVRPUSH: return "Injection, intravenous, rapid push"; + case IVSPUSH: return "Injection, intravenous, slow push"; + case IVITINJ: return "Injection, intravitreal"; + case PAINJ: return "Injection, periarticular"; + case PARENTINJ: return "Injection, parenteral"; + case PDONTINJ: return "Injection, periodontal"; + case PDPINJ: return "Injection, peritoneal dialysis port"; + case PDURINJ: return "Injection, peridural"; + case PNINJ: return "Injection, perineural"; + case PNSINJ: return "Injection, paranasal sinuses"; + case RBINJ: return "Injection, retrobulbar"; + case SCINJ: return "Injection, subconjunctival"; + case SLESINJ: return "Injection, sublesional"; + case SOFTISINJ: return "Injection, soft tissue"; + case SQ: return "Injection, subcutaneous"; + case SUBARACHINJ: return "Injection, subarachnoid"; + case SUBMUCINJ: return "Injection, submucosal"; + case TRPLACINJ: return "Injection, transplacental"; + case TRTRACHINJ: return "Injection, transtracheal"; + case URETHINJ: return "Injection, urethral"; + case URETINJ: return "Injection, ureteral"; + case _INSERTION: return "Insertion"; + case CERVINS: return "Insertion, cervical (uterine)"; + case IOSURGINS: return "Insertion, intraocular, surgical"; + case IU: return "Insertion, intrauterine"; + case LPINS: return "Insertion, lacrimal puncta"; + case PR: return "Insertion, rectal"; + case SQSURGINS: return "Insertion, subcutaneous, surgical"; + case URETHINS: return "Insertion, urethral"; + case VAGINSI: return "Insertion, vaginal"; + case _INSTILLATION: return "Instillation"; + case CECINSTL: return "Instillation, cecostomy"; + case EFT: return "Instillation, enteral feeding tube"; + case ENTINSTL: return "Instillation, enteral"; + case GT: return "Instillation, gastrostomy tube"; + case NGT: return "Instillation, nasogastric tube"; + case OGT: return "Instillation, orogastric tube"; + case BLADINSTL: return "Instillation, urinary catheter"; + case CAPDINSTL: return "Instillation, continuous ambulatory peritoneal dialysis port"; + case CTINSTL: return "Instillation, chest tube"; + case ETINSTL: return "Instillation, endotracheal tube"; + case GJT: return "Instillation, gastro-jejunostomy tube"; + case IBRONCHINSTIL: return "Instillation, intrabronchial"; + case IDUODINSTIL: return "Instillation, intraduodenal"; + case IESOPHINSTIL: return "Instillation, intraesophageal"; + case IGASTINSTIL: return "Instillation, intragastric"; + case IILEALINJ: return "Instillation, intraileal"; + case IOINSTL: return "Instillation, intraocular"; + case ISININSTIL: return "Instillation, intrasinal"; + case ITRACHINSTIL: return "Instillation, intratracheal"; + case IUINSTL: return "Instillation, intrauterine"; + case JJTINSTL: return "Instillation, jejunostomy tube"; + case LARYNGINSTIL: return "Instillation, laryngeal"; + case NASALINSTIL: return "Instillation, nasal"; + case NASOGASINSTIL: return "Instillation, nasogastric"; + case NTT: return "Instillation, nasotracheal tube"; + case OJJ: return "Instillation, orojejunum tube"; + case OT: return "Instillation, otic"; + case PDPINSTL: return "Instillation, peritoneal dialysis port"; + case PNSINSTL: return "Instillation, paranasal sinuses"; + case RECINSTL: return "Instillation, rectal"; + case RECTINSTL: return "Instillation, rectal tube"; + case SININSTIL: return "Instillation, sinus, unspecified"; + case SOFTISINSTIL: return "Instillation, soft tissue"; + case TRACHINSTL: return "Instillation, tracheostomy"; + case TRTYMPINSTIL: return "Instillation, transtympanic"; + case URETHINSTL: return "Instillation, urethral"; + case _IONTOPHORESISROUTE: return "Iontophoresis"; + case IONTO: return "Topical application, iontophoresis"; + case _IRRIGATION: return "Irrigation"; + case GUIRR: return "Irrigation, genitourinary"; + case IGASTIRR: return "Irrigation, intragastric"; + case ILESIRR: return "Irrigation, intralesional"; + case IOIRR: return "Irrigation, intraocular"; + case BLADIRR: return "Irrigation, urinary bladder"; + case BLADIRRC: return "Irrigation, urinary bladder, continuous"; + case BLADIRRT: return "Irrigation, urinary bladder, tidal"; + case RECIRR: return "Irrigation, rectal"; + case _LAVAGEROUTE: return "Lavage"; + case IGASTLAV: return "Lavage, intragastric"; + case _MUCOSALABSORPTIONROUTE: return "Mucosal absorption"; + case IDOUDMAB: return "Mucosal absorption, intraduodenal"; + case ITRACHMAB: return "Mucosal absorption, intratracheal"; + case SMUCMAB: return "Mucosal absorption, submucosal"; + case _NEBULIZATION: return "Nebulization"; + case ETNEB: return "Nebulization, endotracheal tube"; + case _RINSE: return "Rinse"; + case DENRINSE: return "Rinse, dental"; + case ORRINSE: return "Rinse, oral"; + case _SUPPOSITORYROUTE: return "Suppository"; + case URETHSUP: return "Suppository, urethral"; + case _SWISH: return "Swish"; + case SWISHSPIT: return "Swish and spit out, oromucosal"; + case SWISHSWAL: return "Swish and swallow, oromucosal"; + case _TOPICALABSORPTIONROUTE: return "Topical absorption"; + case TTYMPTABSORP: return "Topical absorption, transtympanic"; + case _TOPICALAPPLICATION: return "Topical application"; + case DRESS: return "Topical application, soaked dressing"; + case SWAB: return "Topical application, swab"; + case TOPICAL: return "Topical"; + case BUC: return "Topical application, buccal"; + case CERV: return "Topical application, cervical"; + case DEN: return "Topical application, dental"; + case GIN: return "Topical application, gingival"; + case HAIR: return "Topical application, hair"; + case ICORNTA: return "Topical application, intracorneal"; + case ICORONTA: return "Topical application, intracoronal (dental)"; + case IESOPHTA: return "Topical application, intraesophageal"; + case IILEALTA: return "Topical application, intraileal"; + case ILTOP: return "Topical application, intralesional"; + case ILUMTA: return "Topical application, intraluminal"; + case IOTOP: return "Topical application, intraocular"; + case LARYNGTA: return "Topical application, laryngeal"; + case MUC: return "Topical application, mucous membrane"; + case NAIL: return "Topical application, nail"; + case NASAL: return "Topical application, nasal"; + case OPTHALTA: return "Topical application, ophthalmic"; + case ORALTA: return "Topical application, oral"; + case ORMUC: return "Topical application, oromucosal"; + case OROPHARTA: return "Topical application, oropharyngeal"; + case PERIANAL: return "Topical application, perianal"; + case PERINEAL: return "Topical application, perineal"; + case PDONTTA: return "Topical application, periodontal"; + case RECTAL: return "Topical application, rectal"; + case SCALP: return "Topical application, scalp"; + case OCDRESTA: return "Occlusive dressing technique"; + case SKIN: return "Topical application, skin"; + case SUBCONJTA: return "Subconjunctival"; + case TMUCTA: return "Topical application, transmucosal"; + case VAGINS: return "Insertion, vaginal"; + case INSUF: return "Insufflation"; + case TRNSDERM: return "Transdermal"; + case _ROUTEBYSITE: return "Route of substance administration classified by site."; + case _AMNIOTICFLUIDSACROUTE: return "Amniotic fluid sac"; + case _BILIARYROUTE: return "Biliary tract"; + case _BODYSURFACEROUTE: return "Body surface"; + case _BUCCALMUCOSAROUTE: return "Buccal mucosa"; + case _CECOSTOMYROUTE: return "Cecostomy"; + case _CERVICALROUTE: return "Cervix of the uterus"; + case _ENDOCERVICALROUTE: return "Endocervical"; + case _ENTERALROUTE: return "Enteral"; + case _EPIDURALROUTE: return "Epidural"; + case _EXTRAAMNIOTICROUTE: return "Extra-amniotic"; + case _EXTRACORPOREALCIRCULATIONROUTE: return "Extracorporeal circulation"; + case _GASTRICROUTE: return "Gastric"; + case _GENITOURINARYROUTE: return "Genitourinary"; + case _GINGIVALROUTE: return "Gingival"; + case _HAIRROUTE: return "Hair"; + case _INTERAMENINGEALROUTE: return "Interameningeal"; + case _INTERSTITIALROUTE: return "Interstitial"; + case _INTRAABDOMINALROUTE: return "Intra-abdominal"; + case _INTRAARTERIALROUTE: return "Intra-arterial"; + case _INTRAARTICULARROUTE: return "Intraarticular"; + case _INTRABRONCHIALROUTE: return "Intrabronchial"; + case _INTRABURSALROUTE: return "Intrabursal"; + case _INTRACARDIACROUTE: return "Intracardiac"; + case _INTRACARTILAGINOUSROUTE: return "Intracartilaginous"; + case _INTRACAUDALROUTE: return "Intracaudal"; + case _INTRACAVERNOSALROUTE: return "Intracavernosal"; + case _INTRACAVITARYROUTE: return "Intracavitary"; + case _INTRACEREBRALROUTE: return "Intracerebral"; + case _INTRACERVICALROUTE: return "Intracervical"; + case _INTRACISTERNALROUTE: return "Intracisternal"; + case _INTRACORNEALROUTE: return "Intracorneal"; + case _INTRACORONALROUTE: return "Intracoronal (dental)"; + case _INTRACORONARYROUTE: return "Intracoronary"; + case _INTRACORPUSCAVERNOSUMROUTE: return "Intracorpus cavernosum"; + case _INTRADERMALROUTE: return "Intradermal"; + case _INTRADISCALROUTE: return "Intradiscal"; + case _INTRADUCTALROUTE: return "Intraductal"; + case _INTRADUODENALROUTE: return "Intraduodenal"; + case _INTRADURALROUTE: return "Intradural"; + case _INTRAEPIDERMALROUTE: return "Intraepidermal"; + case _INTRAEPITHELIALROUTE: return "Intraepithelial"; + case _INTRAESOPHAGEALROUTE: return "Intraesophageal"; + case _INTRAGASTRICROUTE: return "Intragastric"; + case _INTRAILEALROUTE: return "Intraileal"; + case _INTRALESIONALROUTE: return "Intralesional"; + case _INTRALUMINALROUTE: return "Intraluminal"; + case _INTRALYMPHATICROUTE: return "Intralymphatic"; + case _INTRAMEDULLARYROUTE: return "Intramedullary"; + case _INTRAMUSCULARROUTE: return "Intramuscular"; + case _INTRAOCULARROUTE: return "Intraocular"; + case _INTRAOSSEOUSROUTE: return "Intraosseous"; + case _INTRAOVARIANROUTE: return "Intraovarian"; + case _INTRAPERICARDIALROUTE: return "Intrapericardial"; + case _INTRAPERITONEALROUTE: return "Intraperitoneal"; + case _INTRAPLEURALROUTE: return "Intrapleural"; + case _INTRAPROSTATICROUTE: return "Intraprostatic"; + case _INTRAPULMONARYROUTE: return "Intrapulmonary"; + case _INTRASINALROUTE: return "Intrasinal"; + case _INTRASPINALROUTE: return "Intraspinal"; + case _INTRASTERNALROUTE: return "Intrasternal"; + case _INTRASYNOVIALROUTE: return "Intrasynovial"; + case _INTRATENDINOUSROUTE: return "Intratendinous"; + case _INTRATESTICULARROUTE: return "Intratesticular"; + case _INTRATHECALROUTE: return "Intrathecal"; + case _INTRATHORACICROUTE: return "Intrathoracic"; + case _INTRATRACHEALROUTE: return "Intratracheal"; + case _INTRATUBULARROUTE: return "Intratubular"; + case _INTRATUMORROUTE: return "Intratumor"; + case _INTRATYMPANICROUTE: return "Intratympanic"; + case _INTRAUTERINEROUTE: return "Intrauterine"; + case _INTRAVASCULARROUTE: return "Intravascular"; + case _INTRAVENOUSROUTE: return "Intravenous"; + case _INTRAVENTRICULARROUTE: return "Intraventricular"; + case _INTRAVESICLEROUTE: return "Intravesicle"; + case _INTRAVITREALROUTE: return "Intravitreal"; + case _JEJUNUMROUTE: return "Jejunum"; + case _LACRIMALPUNCTAROUTE: return "Lacrimal puncta"; + case _LARYNGEALROUTE: return "Laryngeal"; + case _LINGUALROUTE: return "Lingual"; + case _MUCOUSMEMBRANEROUTE: return "Mucous membrane"; + case _NAILROUTE: return "Nail"; + case _NASALROUTE: return "Nasal"; + case _OPHTHALMICROUTE: return "Ophthalmic"; + case _ORALROUTE: return "Oral"; + case _OROMUCOSALROUTE: return "Oromucosal"; + case _OROPHARYNGEALROUTE: return "Oropharyngeal"; + case _OTICROUTE: return "Otic"; + case _PARANASALSINUSESROUTE: return "Paranasal sinuses"; + case _PARENTERALROUTE: return "Parenteral"; + case _PERIANALROUTE: return "Perianal"; + case _PERIARTICULARROUTE: return "Periarticular"; + case _PERIDURALROUTE: return "Peridural"; + case _PERINEALROUTE: return "Perineal"; + case _PERINEURALROUTE: return "Perineural"; + case _PERIODONTALROUTE: return "Periodontal"; + case _PULMONARYROUTE: return "Pulmonary"; + case _RECTALROUTE: return "Rectal"; + case _RESPIRATORYTRACTROUTE: return "Respiratory tract"; + case _RETROBULBARROUTE: return "Retrobulbar"; + case _SCALPROUTE: return "Scalp"; + case _SINUSUNSPECIFIEDROUTE: return "Sinus, unspecified"; + case _SKINROUTE: return "Skin"; + case _SOFTTISSUEROUTE: return "Soft tissue"; + case _SUBARACHNOIDROUTE: return "Subarachnoid"; + case _SUBCONJUNCTIVALROUTE: return "Subconjunctival"; + case _SUBCUTANEOUSROUTE: return "Subcutaneous"; + case _SUBLESIONALROUTE: return "Sublesional"; + case _SUBLINGUALROUTE: return "Sublingual"; + case _SUBMUCOSALROUTE: return "Submucosal"; + case _TRACHEOSTOMYROUTE: return "Tracheostomy"; + case _TRANSMUCOSALROUTE: return "Transmucosal"; + case _TRANSPLACENTALROUTE: return "Transplacental"; + case _TRANSTRACHEALROUTE: return "Transtracheal"; + case _TRANSTYMPANICROUTE: return "Transtympanic"; + case _URETERALROUTE: return "Ureteral"; + case _URETHRALROUTE: return "Urethral"; + case _URINARYBLADDERROUTE: return "Urinary bladder"; + case _URINARYTRACTROUTE: return "Urinary tract"; + case _VAGINALROUTE: return "Vaginal"; + case _VITREOUSHUMOURROUTE: return "Vitreous humour"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ROUTEBYMETHOD: return "RouteByMethod"; + case SOAK: return "Immersion (soak)"; + case SHAMPOO: return "Shampoo"; + case TRNSLING: return "Translingual"; + case PO: return "Swallow, oral"; + case GARGLE: return "Gargle"; + case SUCK: return "Suck, oromucosal"; + case _CHEW: return "Chew"; + case CHEW: return "Chew, oral"; + case _DIFFUSION: return "Diffusion"; + case EXTCORPDIF: return "Diffusion, extracorporeal"; + case HEMODIFF: return "Diffusion, hemodialysis"; + case TRNSDERMD: return "Diffusion, transdermal"; + case _DISSOLVE: return "Dissolve"; + case DISSOLVE: return "Dissolve, oral"; + case SL: return "Dissolve, sublingual"; + case _DOUCHE: return "Douche"; + case DOUCHE: return "Douche, vaginal"; + case _ELECTROOSMOSISROUTE: return "ElectroOsmosisRoute"; + case ELECTOSMOS: return "Electro-osmosis"; + case _ENEMA: return "Enema"; + case ENEMA: return "Enema, rectal"; + case RETENEMA: return "Enema, rectal retention"; + case _FLUSH: return "Flush"; + case IVFLUSH: return "Flush, intravenous catheter"; + case _IMPLANTATION: return "Implantation"; + case IDIMPLNT: return "Implantation, intradermal"; + case IVITIMPLNT: return "Implantation, intravitreal"; + case SQIMPLNT: return "Implantation, subcutaneous"; + case _INFUSION: return "Infusion"; + case EPI: return "Infusion, epidural"; + case IA: return "Infusion, intraarterial catheter"; + case IC: return "Infusion, intracardiac"; + case ICOR: return "Infusion, intracoronary"; + case IOSSC: return "Infusion, intraosseous, continuous"; + case IT: return "Infusion, intrathecal"; + case IV: return "Infusion, intravenous"; + case IVC: return "Infusion, intravenous catheter"; + case IVCC: return "Infusion, intravenous catheter, continuous"; + case IVCI: return "Infusion, intravenous catheter, intermittent"; + case PCA: return "Infusion, intravenous catheter, pca pump"; + case IVASCINFUS: return "Infusion, intravascular"; + case SQINFUS: return "Infusion, subcutaneous"; + case _INHALATION: return "Inhalation"; + case IPINHL: return "Inhalation, respiratory"; + case ORIFINHL: return "Inhalation, oral intermittent flow"; + case REBREATH: return "Inhalation, oral rebreather mask"; + case IPPB: return "Inhalation, intermittent positive pressure breathing (ippb)"; + case NASINHL: return "Inhalation, nasal"; + case NASINHLC: return "Inhalation, nasal cannula"; + case NEB: return "Inhalation, nebulization"; + case NASNEB: return "Inhalation, nebulization, nasal"; + case ORNEB: return "Inhalation, nebulization, oral"; + case TRACH: return "Inhalation, tracheostomy"; + case VENT: return "Inhalation, ventilator"; + case VENTMASK: return "Inhalation, ventimask"; + case _INJECTION: return "Injection"; + case AMNINJ: return "Injection, amniotic fluid"; + case BILINJ: return "Injection, biliary tract"; + case CHOLINJ: return "Injection, for cholangiography"; + case CERVINJ: return "Injection, cervical"; + case EPIDURINJ: return "Injection, epidural"; + case EPIINJ: return "Injection, epidural, push"; + case EPINJSP: return "Injection, epidural, slow push"; + case EXTRAMNINJ: return "Injection, extra-amniotic"; + case EXTCORPINJ: return "Injection, extracorporeal"; + case GBINJ: return "Injection, gastric button"; + case GINGINJ: return "Injection, gingival"; + case BLADINJ: return "Injection, urinary bladder"; + case ENDOSININJ: return "Injection, endosinusial"; + case HEMOPORT: return "Injection, hemodialysis port"; + case IABDINJ: return "Injection, intra-abdominal"; + case IAINJ: return "Injection, intraarterial"; + case IAINJP: return "Injection, intraarterial, push"; + case IAINJSP: return "Injection, intraarterial, slow push"; + case IARTINJ: return "Injection, intraarticular"; + case IBURSINJ: return "Injection, intrabursal"; + case ICARDINJ: return "Injection, intracardiac"; + case ICARDINJRP: return "Injection, intracardiac, rapid push"; + case ICARDINJSP: return "Injection, intracardiac, slow push"; + case ICARINJP: return "Injection, intracardiac, push"; + case ICARTINJ: return "Injection, intracartilaginous"; + case ICAUDINJ: return "Injection, intracaudal"; + case ICAVINJ: return "Injection, intracavernous"; + case ICAVITINJ: return "Injection, intracavitary"; + case ICEREBINJ: return "Injection, intracerebral"; + case ICISTERNINJ: return "Injection, intracisternal"; + case ICORONINJ: return "Injection, intracoronary"; + case ICORONINJP: return "Injection, intracoronary, push"; + case ICORPCAVINJ: return "Injection, intracorpus cavernosum"; + case IDINJ: return "Injection, intradermal"; + case IDISCINJ: return "Injection, intradiscal"; + case IDUCTINJ: return "Injection, intraductal"; + case IDURINJ: return "Injection, intradural"; + case IEPIDINJ: return "Injection, intraepidermal"; + case IEPITHINJ: return "Injection, intraepithelial"; + case ILESINJ: return "Injection, intralesional"; + case ILUMINJ: return "Injection, intraluminal"; + case ILYMPJINJ: return "Injection, intralymphatic"; + case IM: return "Injection, intramuscular"; + case IMD: return "Injection, intramuscular, deep"; + case IMZ: return "Injection, intramuscular, z track"; + case IMEDULINJ: return "Injection, intramedullary"; + case INTERMENINJ: return "Injection, interameningeal"; + case INTERSTITINJ: return "Injection, interstitial"; + case IOINJ: return "Injection, intraocular"; + case IOSSINJ: return "Injection, intraosseous"; + case IOVARINJ: return "Injection, intraovarian"; + case IPCARDINJ: return "Injection, intrapericardial"; + case IPERINJ: return "Injection, intraperitoneal"; + case IPINJ: return "Injection, intrapulmonary"; + case IPLRINJ: return "Injection, intrapleural"; + case IPROSTINJ: return "Injection, intraprostatic"; + case IPUMPINJ: return "Injection, insulin pump"; + case ISINJ: return "Injection, intraspinal"; + case ISTERINJ: return "Injection, intrasternal"; + case ISYNINJ: return "Injection, intrasynovial"; + case ITENDINJ: return "Injection, intratendinous"; + case ITESTINJ: return "Injection, intratesticular"; + case ITHORINJ: return "Injection, intrathoracic"; + case ITINJ: return "Injection, intrathecal"; + case ITUBINJ: return "Injection, intratubular"; + case ITUMINJ: return "Injection, intratumor"; + case ITYMPINJ: return "Injection, intratympanic"; + case IUINJ: return "Injection, intrauterine"; + case IUINJC: return "Injection, intracervical (uterus)"; + case IURETINJ: return "Injection, intraureteral, retrograde"; + case IVASCINJ: return "Injection, intravascular"; + case IVENTINJ: return "Injection, intraventricular (heart)"; + case IVESINJ: return "Injection, intravesicle"; + case IVINJ: return "Injection, intravenous"; + case IVINJBOL: return "Injection, intravenous, bolus"; + case IVPUSH: return "Injection, intravenous, push"; + case IVRPUSH: return "Injection, intravenous, rapid push"; + case IVSPUSH: return "Injection, intravenous, slow push"; + case IVITINJ: return "Injection, intravitreal"; + case PAINJ: return "Injection, periarticular"; + case PARENTINJ: return "Injection, parenteral"; + case PDONTINJ: return "Injection, periodontal"; + case PDPINJ: return "Injection, peritoneal dialysis port"; + case PDURINJ: return "Injection, peridural"; + case PNINJ: return "Injection, perineural"; + case PNSINJ: return "Injection, paranasal sinuses"; + case RBINJ: return "Injection, retrobulbar"; + case SCINJ: return "Injection, subconjunctival"; + case SLESINJ: return "Injection, sublesional"; + case SOFTISINJ: return "Injection, soft tissue"; + case SQ: return "Injection, subcutaneous"; + case SUBARACHINJ: return "Injection, subarachnoid"; + case SUBMUCINJ: return "Injection, submucosal"; + case TRPLACINJ: return "Injection, transplacental"; + case TRTRACHINJ: return "Injection, transtracheal"; + case URETHINJ: return "Injection, urethral"; + case URETINJ: return "Injection, ureteral"; + case _INSERTION: return "Insertion"; + case CERVINS: return "Insertion, cervical (uterine)"; + case IOSURGINS: return "Insertion, intraocular, surgical"; + case IU: return "Insertion, intrauterine"; + case LPINS: return "Insertion, lacrimal puncta"; + case PR: return "Insertion, rectal"; + case SQSURGINS: return "Insertion, subcutaneous, surgical"; + case URETHINS: return "Insertion, urethral"; + case VAGINSI: return "Insertion, vaginal"; + case _INSTILLATION: return "Instillation"; + case CECINSTL: return "Instillation, cecostomy"; + case EFT: return "Instillation, enteral feeding tube"; + case ENTINSTL: return "Instillation, enteral"; + case GT: return "Instillation, gastrostomy tube"; + case NGT: return "Instillation, nasogastric tube"; + case OGT: return "Instillation, orogastric tube"; + case BLADINSTL: return "Instillation, urinary catheter"; + case CAPDINSTL: return "Instillation, continuous ambulatory peritoneal dialysis port"; + case CTINSTL: return "Instillation, chest tube"; + case ETINSTL: return "Instillation, endotracheal tube"; + case GJT: return "Instillation, gastro-jejunostomy tube"; + case IBRONCHINSTIL: return "Instillation, intrabronchial"; + case IDUODINSTIL: return "Instillation, intraduodenal"; + case IESOPHINSTIL: return "Instillation, intraesophageal"; + case IGASTINSTIL: return "Instillation, intragastric"; + case IILEALINJ: return "Instillation, intraileal"; + case IOINSTL: return "Instillation, intraocular"; + case ISININSTIL: return "Instillation, intrasinal"; + case ITRACHINSTIL: return "Instillation, intratracheal"; + case IUINSTL: return "Instillation, intrauterine"; + case JJTINSTL: return "Instillation, jejunostomy tube"; + case LARYNGINSTIL: return "Instillation, laryngeal"; + case NASALINSTIL: return "Instillation, nasal"; + case NASOGASINSTIL: return "Instillation, nasogastric"; + case NTT: return "Instillation, nasotracheal tube"; + case OJJ: return "Instillation, orojejunum tube"; + case OT: return "Instillation, otic"; + case PDPINSTL: return "Instillation, peritoneal dialysis port"; + case PNSINSTL: return "Instillation, paranasal sinuses"; + case RECINSTL: return "Instillation, rectal"; + case RECTINSTL: return "Instillation, rectal tube"; + case SININSTIL: return "Instillation, sinus, unspecified"; + case SOFTISINSTIL: return "Instillation, soft tissue"; + case TRACHINSTL: return "Instillation, tracheostomy"; + case TRTYMPINSTIL: return "Instillation, transtympanic"; + case URETHINSTL: return "instillation, urethral"; + case _IONTOPHORESISROUTE: return "IontophoresisRoute"; + case IONTO: return "Topical application, iontophoresis"; + case _IRRIGATION: return "Irrigation"; + case GUIRR: return "Irrigation, genitourinary"; + case IGASTIRR: return "Irrigation, intragastric"; + case ILESIRR: return "Irrigation, intralesional"; + case IOIRR: return "Irrigation, intraocular"; + case BLADIRR: return "Irrigation, urinary bladder"; + case BLADIRRC: return "Irrigation, urinary bladder, continuous"; + case BLADIRRT: return "Irrigation, urinary bladder, tidal"; + case RECIRR: return "Irrigation, rectal"; + case _LAVAGEROUTE: return "LavageRoute"; + case IGASTLAV: return "Lavage, intragastric"; + case _MUCOSALABSORPTIONROUTE: return "MucosalAbsorptionRoute"; + case IDOUDMAB: return "Mucosal absorption, intraduodenal"; + case ITRACHMAB: return "Mucosal absorption, intratracheal"; + case SMUCMAB: return "Mucosal absorption, submucosal"; + case _NEBULIZATION: return "Nebulization"; + case ETNEB: return "Nebulization, endotracheal tube"; + case _RINSE: return "Rinse"; + case DENRINSE: return "Rinse, dental"; + case ORRINSE: return "Rinse, oral"; + case _SUPPOSITORYROUTE: return "SuppositoryRoute"; + case URETHSUP: return "Suppository, urethral"; + case _SWISH: return "Swish"; + case SWISHSPIT: return "Swish and spit out, oromucosal"; + case SWISHSWAL: return "Swish and swallow, oromucosal"; + case _TOPICALABSORPTIONROUTE: return "TopicalAbsorptionRoute"; + case TTYMPTABSORP: return "Topical absorption, transtympanic"; + case _TOPICALAPPLICATION: return "TopicalApplication"; + case DRESS: return "Topical application, soaked dressing"; + case SWAB: return "Topical application, swab"; + case TOPICAL: return "Topical"; + case BUC: return "Topical application, buccal"; + case CERV: return "Topical application, cervical"; + case DEN: return "Topical application, dental"; + case GIN: return "Topical application, gingival"; + case HAIR: return "Topical application, hair"; + case ICORNTA: return "Topical application, intracorneal"; + case ICORONTA: return "Topical application, intracoronal (dental)"; + case IESOPHTA: return "Topical application, intraesophageal"; + case IILEALTA: return "Topical application, intraileal"; + case ILTOP: return "Topical application, intralesional"; + case ILUMTA: return "Topical application, intraluminal"; + case IOTOP: return "Topical application, intraocular"; + case LARYNGTA: return "Topical application, laryngeal"; + case MUC: return "Topical application, mucous membrane"; + case NAIL: return "Topical application, nail"; + case NASAL: return "Topical application, nasal"; + case OPTHALTA: return "Topical application, ophthalmic"; + case ORALTA: return "Topical application, oral"; + case ORMUC: return "Topical application, oromucosal"; + case OROPHARTA: return "Topical application, oropharyngeal"; + case PERIANAL: return "Topical application, perianal"; + case PERINEAL: return "Topical application, perineal"; + case PDONTTA: return "Topical application, periodontal"; + case RECTAL: return "Topical application, rectal"; + case SCALP: return "Topical application, scalp"; + case OCDRESTA: return "Occlusive dressing technique"; + case SKIN: return "Topical application, skin"; + case SUBCONJTA: return "Subconjunctival"; + case TMUCTA: return "Topical application, transmucosal"; + case VAGINS: return "Topical application, vaginal"; + case INSUF: return "Insufflation"; + case TRNSDERM: return "Transdermal"; + case _ROUTEBYSITE: return "RouteBySite"; + case _AMNIOTICFLUIDSACROUTE: return "AmnioticFluidSacRoute"; + case _BILIARYROUTE: return "BiliaryRoute"; + case _BODYSURFACEROUTE: return "BodySurfaceRoute"; + case _BUCCALMUCOSAROUTE: return "BuccalMucosaRoute"; + case _CECOSTOMYROUTE: return "CecostomyRoute"; + case _CERVICALROUTE: return "CervicalRoute"; + case _ENDOCERVICALROUTE: return "EndocervicalRoute"; + case _ENTERALROUTE: return "EnteralRoute"; + case _EPIDURALROUTE: return "EpiduralRoute"; + case _EXTRAAMNIOTICROUTE: return "ExtraAmnioticRoute"; + case _EXTRACORPOREALCIRCULATIONROUTE: return "ExtracorporealCirculationRoute"; + case _GASTRICROUTE: return "GastricRoute"; + case _GENITOURINARYROUTE: return "GenitourinaryRoute"; + case _GINGIVALROUTE: return "GingivalRoute"; + case _HAIRROUTE: return "HairRoute"; + case _INTERAMENINGEALROUTE: return "InterameningealRoute"; + case _INTERSTITIALROUTE: return "InterstitialRoute"; + case _INTRAABDOMINALROUTE: return "IntraabdominalRoute"; + case _INTRAARTERIALROUTE: return "IntraarterialRoute"; + case _INTRAARTICULARROUTE: return "IntraarticularRoute"; + case _INTRABRONCHIALROUTE: return "IntrabronchialRoute"; + case _INTRABURSALROUTE: return "IntrabursalRoute"; + case _INTRACARDIACROUTE: return "IntracardiacRoute"; + case _INTRACARTILAGINOUSROUTE: return "IntracartilaginousRoute"; + case _INTRACAUDALROUTE: return "IntracaudalRoute"; + case _INTRACAVERNOSALROUTE: return "IntracavernosalRoute"; + case _INTRACAVITARYROUTE: return "IntracavitaryRoute"; + case _INTRACEREBRALROUTE: return "IntracerebralRoute"; + case _INTRACERVICALROUTE: return "IntracervicalRoute"; + case _INTRACISTERNALROUTE: return "IntracisternalRoute"; + case _INTRACORNEALROUTE: return "IntracornealRoute"; + case _INTRACORONALROUTE: return "IntracoronalRoute"; + case _INTRACORONARYROUTE: return "IntracoronaryRoute"; + case _INTRACORPUSCAVERNOSUMROUTE: return "IntracorpusCavernosumRoute"; + case _INTRADERMALROUTE: return "IntradermalRoute"; + case _INTRADISCALROUTE: return "IntradiscalRoute"; + case _INTRADUCTALROUTE: return "IntraductalRoute"; + case _INTRADUODENALROUTE: return "IntraduodenalRoute"; + case _INTRADURALROUTE: return "IntraduralRoute"; + case _INTRAEPIDERMALROUTE: return "IntraepidermalRoute"; + case _INTRAEPITHELIALROUTE: return "IntraepithelialRoute"; + case _INTRAESOPHAGEALROUTE: return "IntraesophagealRoute"; + case _INTRAGASTRICROUTE: return "IntragastricRoute"; + case _INTRAILEALROUTE: return "IntrailealRoute"; + case _INTRALESIONALROUTE: return "IntralesionalRoute"; + case _INTRALUMINALROUTE: return "IntraluminalRoute"; + case _INTRALYMPHATICROUTE: return "IntralymphaticRoute"; + case _INTRAMEDULLARYROUTE: return "IntramedullaryRoute"; + case _INTRAMUSCULARROUTE: return "IntramuscularRoute"; + case _INTRAOCULARROUTE: return "IntraocularRoute"; + case _INTRAOSSEOUSROUTE: return "IntraosseousRoute"; + case _INTRAOVARIANROUTE: return "IntraovarianRoute"; + case _INTRAPERICARDIALROUTE: return "IntrapericardialRoute"; + case _INTRAPERITONEALROUTE: return "IntraperitonealRoute"; + case _INTRAPLEURALROUTE: return "IntrapleuralRoute"; + case _INTRAPROSTATICROUTE: return "IntraprostaticRoute"; + case _INTRAPULMONARYROUTE: return "IntrapulmonaryRoute"; + case _INTRASINALROUTE: return "IntrasinalRoute"; + case _INTRASPINALROUTE: return "IntraspinalRoute"; + case _INTRASTERNALROUTE: return "IntrasternalRoute"; + case _INTRASYNOVIALROUTE: return "IntrasynovialRoute"; + case _INTRATENDINOUSROUTE: return "IntratendinousRoute"; + case _INTRATESTICULARROUTE: return "IntratesticularRoute"; + case _INTRATHECALROUTE: return "IntrathecalRoute"; + case _INTRATHORACICROUTE: return "IntrathoracicRoute"; + case _INTRATRACHEALROUTE: return "IntratrachealRoute"; + case _INTRATUBULARROUTE: return "IntratubularRoute"; + case _INTRATUMORROUTE: return "IntratumorRoute"; + case _INTRATYMPANICROUTE: return "IntratympanicRoute"; + case _INTRAUTERINEROUTE: return "IntrauterineRoute"; + case _INTRAVASCULARROUTE: return "IntravascularRoute"; + case _INTRAVENOUSROUTE: return "IntravenousRoute"; + case _INTRAVENTRICULARROUTE: return "IntraventricularRoute"; + case _INTRAVESICLEROUTE: return "IntravesicleRoute"; + case _INTRAVITREALROUTE: return "IntravitrealRoute"; + case _JEJUNUMROUTE: return "JejunumRoute"; + case _LACRIMALPUNCTAROUTE: return "LacrimalPunctaRoute"; + case _LARYNGEALROUTE: return "LaryngealRoute"; + case _LINGUALROUTE: return "LingualRoute"; + case _MUCOUSMEMBRANEROUTE: return "MucousMembraneRoute"; + case _NAILROUTE: return "NailRoute"; + case _NASALROUTE: return "NasalRoute"; + case _OPHTHALMICROUTE: return "OphthalmicRoute"; + case _ORALROUTE: return "OralRoute"; + case _OROMUCOSALROUTE: return "OromucosalRoute"; + case _OROPHARYNGEALROUTE: return "OropharyngealRoute"; + case _OTICROUTE: return "OticRoute"; + case _PARANASALSINUSESROUTE: return "ParanasalSinusesRoute"; + case _PARENTERALROUTE: return "ParenteralRoute"; + case _PERIANALROUTE: return "PerianalRoute"; + case _PERIARTICULARROUTE: return "PeriarticularRoute"; + case _PERIDURALROUTE: return "PeriduralRoute"; + case _PERINEALROUTE: return "PerinealRoute"; + case _PERINEURALROUTE: return "PerineuralRoute"; + case _PERIODONTALROUTE: return "PeriodontalRoute"; + case _PULMONARYROUTE: return "PulmonaryRoute"; + case _RECTALROUTE: return "RectalRoute"; + case _RESPIRATORYTRACTROUTE: return "RespiratoryTractRoute"; + case _RETROBULBARROUTE: return "RetrobulbarRoute"; + case _SCALPROUTE: return "ScalpRoute"; + case _SINUSUNSPECIFIEDROUTE: return "SinusUnspecifiedRoute"; + case _SKINROUTE: return "SkinRoute"; + case _SOFTTISSUEROUTE: return "SoftTissueRoute"; + case _SUBARACHNOIDROUTE: return "SubarachnoidRoute"; + case _SUBCONJUNCTIVALROUTE: return "SubconjunctivalRoute"; + case _SUBCUTANEOUSROUTE: return "SubcutaneousRoute"; + case _SUBLESIONALROUTE: return "SublesionalRoute"; + case _SUBLINGUALROUTE: return "SublingualRoute"; + case _SUBMUCOSALROUTE: return "SubmucosalRoute"; + case _TRACHEOSTOMYROUTE: return "TracheostomyRoute"; + case _TRANSMUCOSALROUTE: return "TransmucosalRoute"; + case _TRANSPLACENTALROUTE: return "TransplacentalRoute"; + case _TRANSTRACHEALROUTE: return "TranstrachealRoute"; + case _TRANSTYMPANICROUTE: return "TranstympanicRoute"; + case _URETERALROUTE: return "UreteralRoute"; + case _URETHRALROUTE: return "UrethralRoute"; + case _URINARYBLADDERROUTE: return "UrinaryBladderRoute"; + case _URINARYTRACTROUTE: return "UrinaryTractRoute"; + case _VAGINALROUTE: return "VaginalRoute"; + case _VITREOUSHUMOURROUTE: return "VitreousHumourRoute"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RouteOfAdministrationEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RouteOfAdministrationEnumFactory.java new file mode 100644 index 00000000000..b03af5dae61 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RouteOfAdministrationEnumFactory.java @@ -0,0 +1,1598 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3RouteOfAdministrationEnumFactory implements EnumFactory { + + public V3RouteOfAdministration fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_RouteByMethod".equals(codeString)) + return V3RouteOfAdministration._ROUTEBYMETHOD; + if ("SOAK".equals(codeString)) + return V3RouteOfAdministration.SOAK; + if ("SHAMPOO".equals(codeString)) + return V3RouteOfAdministration.SHAMPOO; + if ("TRNSLING".equals(codeString)) + return V3RouteOfAdministration.TRNSLING; + if ("PO".equals(codeString)) + return V3RouteOfAdministration.PO; + if ("GARGLE".equals(codeString)) + return V3RouteOfAdministration.GARGLE; + if ("SUCK".equals(codeString)) + return V3RouteOfAdministration.SUCK; + if ("_Chew".equals(codeString)) + return V3RouteOfAdministration._CHEW; + if ("CHEW".equals(codeString)) + return V3RouteOfAdministration.CHEW; + if ("_Diffusion".equals(codeString)) + return V3RouteOfAdministration._DIFFUSION; + if ("EXTCORPDIF".equals(codeString)) + return V3RouteOfAdministration.EXTCORPDIF; + if ("HEMODIFF".equals(codeString)) + return V3RouteOfAdministration.HEMODIFF; + if ("TRNSDERMD".equals(codeString)) + return V3RouteOfAdministration.TRNSDERMD; + if ("_Dissolve".equals(codeString)) + return V3RouteOfAdministration._DISSOLVE; + if ("DISSOLVE".equals(codeString)) + return V3RouteOfAdministration.DISSOLVE; + if ("SL".equals(codeString)) + return V3RouteOfAdministration.SL; + if ("_Douche".equals(codeString)) + return V3RouteOfAdministration._DOUCHE; + if ("DOUCHE".equals(codeString)) + return V3RouteOfAdministration.DOUCHE; + if ("_ElectroOsmosisRoute".equals(codeString)) + return V3RouteOfAdministration._ELECTROOSMOSISROUTE; + if ("ELECTOSMOS".equals(codeString)) + return V3RouteOfAdministration.ELECTOSMOS; + if ("_Enema".equals(codeString)) + return V3RouteOfAdministration._ENEMA; + if ("ENEMA".equals(codeString)) + return V3RouteOfAdministration.ENEMA; + if ("RETENEMA".equals(codeString)) + return V3RouteOfAdministration.RETENEMA; + if ("_Flush".equals(codeString)) + return V3RouteOfAdministration._FLUSH; + if ("IVFLUSH".equals(codeString)) + return V3RouteOfAdministration.IVFLUSH; + if ("_Implantation".equals(codeString)) + return V3RouteOfAdministration._IMPLANTATION; + if ("IDIMPLNT".equals(codeString)) + return V3RouteOfAdministration.IDIMPLNT; + if ("IVITIMPLNT".equals(codeString)) + return V3RouteOfAdministration.IVITIMPLNT; + if ("SQIMPLNT".equals(codeString)) + return V3RouteOfAdministration.SQIMPLNT; + if ("_Infusion".equals(codeString)) + return V3RouteOfAdministration._INFUSION; + if ("EPI".equals(codeString)) + return V3RouteOfAdministration.EPI; + if ("IA".equals(codeString)) + return V3RouteOfAdministration.IA; + if ("IC".equals(codeString)) + return V3RouteOfAdministration.IC; + if ("ICOR".equals(codeString)) + return V3RouteOfAdministration.ICOR; + if ("IOSSC".equals(codeString)) + return V3RouteOfAdministration.IOSSC; + if ("IT".equals(codeString)) + return V3RouteOfAdministration.IT; + if ("IV".equals(codeString)) + return V3RouteOfAdministration.IV; + if ("IVC".equals(codeString)) + return V3RouteOfAdministration.IVC; + if ("IVCC".equals(codeString)) + return V3RouteOfAdministration.IVCC; + if ("IVCI".equals(codeString)) + return V3RouteOfAdministration.IVCI; + if ("PCA".equals(codeString)) + return V3RouteOfAdministration.PCA; + if ("IVASCINFUS".equals(codeString)) + return V3RouteOfAdministration.IVASCINFUS; + if ("SQINFUS".equals(codeString)) + return V3RouteOfAdministration.SQINFUS; + if ("_Inhalation".equals(codeString)) + return V3RouteOfAdministration._INHALATION; + if ("IPINHL".equals(codeString)) + return V3RouteOfAdministration.IPINHL; + if ("ORIFINHL".equals(codeString)) + return V3RouteOfAdministration.ORIFINHL; + if ("REBREATH".equals(codeString)) + return V3RouteOfAdministration.REBREATH; + if ("IPPB".equals(codeString)) + return V3RouteOfAdministration.IPPB; + if ("NASINHL".equals(codeString)) + return V3RouteOfAdministration.NASINHL; + if ("NASINHLC".equals(codeString)) + return V3RouteOfAdministration.NASINHLC; + if ("NEB".equals(codeString)) + return V3RouteOfAdministration.NEB; + if ("NASNEB".equals(codeString)) + return V3RouteOfAdministration.NASNEB; + if ("ORNEB".equals(codeString)) + return V3RouteOfAdministration.ORNEB; + if ("TRACH".equals(codeString)) + return V3RouteOfAdministration.TRACH; + if ("VENT".equals(codeString)) + return V3RouteOfAdministration.VENT; + if ("VENTMASK".equals(codeString)) + return V3RouteOfAdministration.VENTMASK; + if ("_Injection".equals(codeString)) + return V3RouteOfAdministration._INJECTION; + if ("AMNINJ".equals(codeString)) + return V3RouteOfAdministration.AMNINJ; + if ("BILINJ".equals(codeString)) + return V3RouteOfAdministration.BILINJ; + if ("CHOLINJ".equals(codeString)) + return V3RouteOfAdministration.CHOLINJ; + if ("CERVINJ".equals(codeString)) + return V3RouteOfAdministration.CERVINJ; + if ("EPIDURINJ".equals(codeString)) + return V3RouteOfAdministration.EPIDURINJ; + if ("EPIINJ".equals(codeString)) + return V3RouteOfAdministration.EPIINJ; + if ("EPINJSP".equals(codeString)) + return V3RouteOfAdministration.EPINJSP; + if ("EXTRAMNINJ".equals(codeString)) + return V3RouteOfAdministration.EXTRAMNINJ; + if ("EXTCORPINJ".equals(codeString)) + return V3RouteOfAdministration.EXTCORPINJ; + if ("GBINJ".equals(codeString)) + return V3RouteOfAdministration.GBINJ; + if ("GINGINJ".equals(codeString)) + return V3RouteOfAdministration.GINGINJ; + if ("BLADINJ".equals(codeString)) + return V3RouteOfAdministration.BLADINJ; + if ("ENDOSININJ".equals(codeString)) + return V3RouteOfAdministration.ENDOSININJ; + if ("HEMOPORT".equals(codeString)) + return V3RouteOfAdministration.HEMOPORT; + if ("IABDINJ".equals(codeString)) + return V3RouteOfAdministration.IABDINJ; + if ("IAINJ".equals(codeString)) + return V3RouteOfAdministration.IAINJ; + if ("IAINJP".equals(codeString)) + return V3RouteOfAdministration.IAINJP; + if ("IAINJSP".equals(codeString)) + return V3RouteOfAdministration.IAINJSP; + if ("IARTINJ".equals(codeString)) + return V3RouteOfAdministration.IARTINJ; + if ("IBURSINJ".equals(codeString)) + return V3RouteOfAdministration.IBURSINJ; + if ("ICARDINJ".equals(codeString)) + return V3RouteOfAdministration.ICARDINJ; + if ("ICARDINJRP".equals(codeString)) + return V3RouteOfAdministration.ICARDINJRP; + if ("ICARDINJSP".equals(codeString)) + return V3RouteOfAdministration.ICARDINJSP; + if ("ICARINJP".equals(codeString)) + return V3RouteOfAdministration.ICARINJP; + if ("ICARTINJ".equals(codeString)) + return V3RouteOfAdministration.ICARTINJ; + if ("ICAUDINJ".equals(codeString)) + return V3RouteOfAdministration.ICAUDINJ; + if ("ICAVINJ".equals(codeString)) + return V3RouteOfAdministration.ICAVINJ; + if ("ICAVITINJ".equals(codeString)) + return V3RouteOfAdministration.ICAVITINJ; + if ("ICEREBINJ".equals(codeString)) + return V3RouteOfAdministration.ICEREBINJ; + if ("ICISTERNINJ".equals(codeString)) + return V3RouteOfAdministration.ICISTERNINJ; + if ("ICORONINJ".equals(codeString)) + return V3RouteOfAdministration.ICORONINJ; + if ("ICORONINJP".equals(codeString)) + return V3RouteOfAdministration.ICORONINJP; + if ("ICORPCAVINJ".equals(codeString)) + return V3RouteOfAdministration.ICORPCAVINJ; + if ("IDINJ".equals(codeString)) + return V3RouteOfAdministration.IDINJ; + if ("IDISCINJ".equals(codeString)) + return V3RouteOfAdministration.IDISCINJ; + if ("IDUCTINJ".equals(codeString)) + return V3RouteOfAdministration.IDUCTINJ; + if ("IDURINJ".equals(codeString)) + return V3RouteOfAdministration.IDURINJ; + if ("IEPIDINJ".equals(codeString)) + return V3RouteOfAdministration.IEPIDINJ; + if ("IEPITHINJ".equals(codeString)) + return V3RouteOfAdministration.IEPITHINJ; + if ("ILESINJ".equals(codeString)) + return V3RouteOfAdministration.ILESINJ; + if ("ILUMINJ".equals(codeString)) + return V3RouteOfAdministration.ILUMINJ; + if ("ILYMPJINJ".equals(codeString)) + return V3RouteOfAdministration.ILYMPJINJ; + if ("IM".equals(codeString)) + return V3RouteOfAdministration.IM; + if ("IMD".equals(codeString)) + return V3RouteOfAdministration.IMD; + if ("IMZ".equals(codeString)) + return V3RouteOfAdministration.IMZ; + if ("IMEDULINJ".equals(codeString)) + return V3RouteOfAdministration.IMEDULINJ; + if ("INTERMENINJ".equals(codeString)) + return V3RouteOfAdministration.INTERMENINJ; + if ("INTERSTITINJ".equals(codeString)) + return V3RouteOfAdministration.INTERSTITINJ; + if ("IOINJ".equals(codeString)) + return V3RouteOfAdministration.IOINJ; + if ("IOSSINJ".equals(codeString)) + return V3RouteOfAdministration.IOSSINJ; + if ("IOVARINJ".equals(codeString)) + return V3RouteOfAdministration.IOVARINJ; + if ("IPCARDINJ".equals(codeString)) + return V3RouteOfAdministration.IPCARDINJ; + if ("IPERINJ".equals(codeString)) + return V3RouteOfAdministration.IPERINJ; + if ("IPINJ".equals(codeString)) + return V3RouteOfAdministration.IPINJ; + if ("IPLRINJ".equals(codeString)) + return V3RouteOfAdministration.IPLRINJ; + if ("IPROSTINJ".equals(codeString)) + return V3RouteOfAdministration.IPROSTINJ; + if ("IPUMPINJ".equals(codeString)) + return V3RouteOfAdministration.IPUMPINJ; + if ("ISINJ".equals(codeString)) + return V3RouteOfAdministration.ISINJ; + if ("ISTERINJ".equals(codeString)) + return V3RouteOfAdministration.ISTERINJ; + if ("ISYNINJ".equals(codeString)) + return V3RouteOfAdministration.ISYNINJ; + if ("ITENDINJ".equals(codeString)) + return V3RouteOfAdministration.ITENDINJ; + if ("ITESTINJ".equals(codeString)) + return V3RouteOfAdministration.ITESTINJ; + if ("ITHORINJ".equals(codeString)) + return V3RouteOfAdministration.ITHORINJ; + if ("ITINJ".equals(codeString)) + return V3RouteOfAdministration.ITINJ; + if ("ITUBINJ".equals(codeString)) + return V3RouteOfAdministration.ITUBINJ; + if ("ITUMINJ".equals(codeString)) + return V3RouteOfAdministration.ITUMINJ; + if ("ITYMPINJ".equals(codeString)) + return V3RouteOfAdministration.ITYMPINJ; + if ("IUINJ".equals(codeString)) + return V3RouteOfAdministration.IUINJ; + if ("IUINJC".equals(codeString)) + return V3RouteOfAdministration.IUINJC; + if ("IURETINJ".equals(codeString)) + return V3RouteOfAdministration.IURETINJ; + if ("IVASCINJ".equals(codeString)) + return V3RouteOfAdministration.IVASCINJ; + if ("IVENTINJ".equals(codeString)) + return V3RouteOfAdministration.IVENTINJ; + if ("IVESINJ".equals(codeString)) + return V3RouteOfAdministration.IVESINJ; + if ("IVINJ".equals(codeString)) + return V3RouteOfAdministration.IVINJ; + if ("IVINJBOL".equals(codeString)) + return V3RouteOfAdministration.IVINJBOL; + if ("IVPUSH".equals(codeString)) + return V3RouteOfAdministration.IVPUSH; + if ("IVRPUSH".equals(codeString)) + return V3RouteOfAdministration.IVRPUSH; + if ("IVSPUSH".equals(codeString)) + return V3RouteOfAdministration.IVSPUSH; + if ("IVITINJ".equals(codeString)) + return V3RouteOfAdministration.IVITINJ; + if ("PAINJ".equals(codeString)) + return V3RouteOfAdministration.PAINJ; + if ("PARENTINJ".equals(codeString)) + return V3RouteOfAdministration.PARENTINJ; + if ("PDONTINJ".equals(codeString)) + return V3RouteOfAdministration.PDONTINJ; + if ("PDPINJ".equals(codeString)) + return V3RouteOfAdministration.PDPINJ; + if ("PDURINJ".equals(codeString)) + return V3RouteOfAdministration.PDURINJ; + if ("PNINJ".equals(codeString)) + return V3RouteOfAdministration.PNINJ; + if ("PNSINJ".equals(codeString)) + return V3RouteOfAdministration.PNSINJ; + if ("RBINJ".equals(codeString)) + return V3RouteOfAdministration.RBINJ; + if ("SCINJ".equals(codeString)) + return V3RouteOfAdministration.SCINJ; + if ("SLESINJ".equals(codeString)) + return V3RouteOfAdministration.SLESINJ; + if ("SOFTISINJ".equals(codeString)) + return V3RouteOfAdministration.SOFTISINJ; + if ("SQ".equals(codeString)) + return V3RouteOfAdministration.SQ; + if ("SUBARACHINJ".equals(codeString)) + return V3RouteOfAdministration.SUBARACHINJ; + if ("SUBMUCINJ".equals(codeString)) + return V3RouteOfAdministration.SUBMUCINJ; + if ("TRPLACINJ".equals(codeString)) + return V3RouteOfAdministration.TRPLACINJ; + if ("TRTRACHINJ".equals(codeString)) + return V3RouteOfAdministration.TRTRACHINJ; + if ("URETHINJ".equals(codeString)) + return V3RouteOfAdministration.URETHINJ; + if ("URETINJ".equals(codeString)) + return V3RouteOfAdministration.URETINJ; + if ("_Insertion".equals(codeString)) + return V3RouteOfAdministration._INSERTION; + if ("CERVINS".equals(codeString)) + return V3RouteOfAdministration.CERVINS; + if ("IOSURGINS".equals(codeString)) + return V3RouteOfAdministration.IOSURGINS; + if ("IU".equals(codeString)) + return V3RouteOfAdministration.IU; + if ("LPINS".equals(codeString)) + return V3RouteOfAdministration.LPINS; + if ("PR".equals(codeString)) + return V3RouteOfAdministration.PR; + if ("SQSURGINS".equals(codeString)) + return V3RouteOfAdministration.SQSURGINS; + if ("URETHINS".equals(codeString)) + return V3RouteOfAdministration.URETHINS; + if ("VAGINSI".equals(codeString)) + return V3RouteOfAdministration.VAGINSI; + if ("_Instillation".equals(codeString)) + return V3RouteOfAdministration._INSTILLATION; + if ("CECINSTL".equals(codeString)) + return V3RouteOfAdministration.CECINSTL; + if ("EFT".equals(codeString)) + return V3RouteOfAdministration.EFT; + if ("ENTINSTL".equals(codeString)) + return V3RouteOfAdministration.ENTINSTL; + if ("GT".equals(codeString)) + return V3RouteOfAdministration.GT; + if ("NGT".equals(codeString)) + return V3RouteOfAdministration.NGT; + if ("OGT".equals(codeString)) + return V3RouteOfAdministration.OGT; + if ("BLADINSTL".equals(codeString)) + return V3RouteOfAdministration.BLADINSTL; + if ("CAPDINSTL".equals(codeString)) + return V3RouteOfAdministration.CAPDINSTL; + if ("CTINSTL".equals(codeString)) + return V3RouteOfAdministration.CTINSTL; + if ("ETINSTL".equals(codeString)) + return V3RouteOfAdministration.ETINSTL; + if ("GJT".equals(codeString)) + return V3RouteOfAdministration.GJT; + if ("IBRONCHINSTIL".equals(codeString)) + return V3RouteOfAdministration.IBRONCHINSTIL; + if ("IDUODINSTIL".equals(codeString)) + return V3RouteOfAdministration.IDUODINSTIL; + if ("IESOPHINSTIL".equals(codeString)) + return V3RouteOfAdministration.IESOPHINSTIL; + if ("IGASTINSTIL".equals(codeString)) + return V3RouteOfAdministration.IGASTINSTIL; + if ("IILEALINJ".equals(codeString)) + return V3RouteOfAdministration.IILEALINJ; + if ("IOINSTL".equals(codeString)) + return V3RouteOfAdministration.IOINSTL; + if ("ISININSTIL".equals(codeString)) + return V3RouteOfAdministration.ISININSTIL; + if ("ITRACHINSTIL".equals(codeString)) + return V3RouteOfAdministration.ITRACHINSTIL; + if ("IUINSTL".equals(codeString)) + return V3RouteOfAdministration.IUINSTL; + if ("JJTINSTL".equals(codeString)) + return V3RouteOfAdministration.JJTINSTL; + if ("LARYNGINSTIL".equals(codeString)) + return V3RouteOfAdministration.LARYNGINSTIL; + if ("NASALINSTIL".equals(codeString)) + return V3RouteOfAdministration.NASALINSTIL; + if ("NASOGASINSTIL".equals(codeString)) + return V3RouteOfAdministration.NASOGASINSTIL; + if ("NTT".equals(codeString)) + return V3RouteOfAdministration.NTT; + if ("OJJ".equals(codeString)) + return V3RouteOfAdministration.OJJ; + if ("OT".equals(codeString)) + return V3RouteOfAdministration.OT; + if ("PDPINSTL".equals(codeString)) + return V3RouteOfAdministration.PDPINSTL; + if ("PNSINSTL".equals(codeString)) + return V3RouteOfAdministration.PNSINSTL; + if ("RECINSTL".equals(codeString)) + return V3RouteOfAdministration.RECINSTL; + if ("RECTINSTL".equals(codeString)) + return V3RouteOfAdministration.RECTINSTL; + if ("SININSTIL".equals(codeString)) + return V3RouteOfAdministration.SININSTIL; + if ("SOFTISINSTIL".equals(codeString)) + return V3RouteOfAdministration.SOFTISINSTIL; + if ("TRACHINSTL".equals(codeString)) + return V3RouteOfAdministration.TRACHINSTL; + if ("TRTYMPINSTIL".equals(codeString)) + return V3RouteOfAdministration.TRTYMPINSTIL; + if ("URETHINSTL".equals(codeString)) + return V3RouteOfAdministration.URETHINSTL; + if ("_IontophoresisRoute".equals(codeString)) + return V3RouteOfAdministration._IONTOPHORESISROUTE; + if ("IONTO".equals(codeString)) + return V3RouteOfAdministration.IONTO; + if ("_Irrigation".equals(codeString)) + return V3RouteOfAdministration._IRRIGATION; + if ("GUIRR".equals(codeString)) + return V3RouteOfAdministration.GUIRR; + if ("IGASTIRR".equals(codeString)) + return V3RouteOfAdministration.IGASTIRR; + if ("ILESIRR".equals(codeString)) + return V3RouteOfAdministration.ILESIRR; + if ("IOIRR".equals(codeString)) + return V3RouteOfAdministration.IOIRR; + if ("BLADIRR".equals(codeString)) + return V3RouteOfAdministration.BLADIRR; + if ("BLADIRRC".equals(codeString)) + return V3RouteOfAdministration.BLADIRRC; + if ("BLADIRRT".equals(codeString)) + return V3RouteOfAdministration.BLADIRRT; + if ("RECIRR".equals(codeString)) + return V3RouteOfAdministration.RECIRR; + if ("_LavageRoute".equals(codeString)) + return V3RouteOfAdministration._LAVAGEROUTE; + if ("IGASTLAV".equals(codeString)) + return V3RouteOfAdministration.IGASTLAV; + if ("_MucosalAbsorptionRoute".equals(codeString)) + return V3RouteOfAdministration._MUCOSALABSORPTIONROUTE; + if ("IDOUDMAB".equals(codeString)) + return V3RouteOfAdministration.IDOUDMAB; + if ("ITRACHMAB".equals(codeString)) + return V3RouteOfAdministration.ITRACHMAB; + if ("SMUCMAB".equals(codeString)) + return V3RouteOfAdministration.SMUCMAB; + if ("_Nebulization".equals(codeString)) + return V3RouteOfAdministration._NEBULIZATION; + if ("ETNEB".equals(codeString)) + return V3RouteOfAdministration.ETNEB; + if ("_Rinse".equals(codeString)) + return V3RouteOfAdministration._RINSE; + if ("DENRINSE".equals(codeString)) + return V3RouteOfAdministration.DENRINSE; + if ("ORRINSE".equals(codeString)) + return V3RouteOfAdministration.ORRINSE; + if ("_SuppositoryRoute".equals(codeString)) + return V3RouteOfAdministration._SUPPOSITORYROUTE; + if ("URETHSUP".equals(codeString)) + return V3RouteOfAdministration.URETHSUP; + if ("_Swish".equals(codeString)) + return V3RouteOfAdministration._SWISH; + if ("SWISHSPIT".equals(codeString)) + return V3RouteOfAdministration.SWISHSPIT; + if ("SWISHSWAL".equals(codeString)) + return V3RouteOfAdministration.SWISHSWAL; + if ("_TopicalAbsorptionRoute".equals(codeString)) + return V3RouteOfAdministration._TOPICALABSORPTIONROUTE; + if ("TTYMPTABSORP".equals(codeString)) + return V3RouteOfAdministration.TTYMPTABSORP; + if ("_TopicalApplication".equals(codeString)) + return V3RouteOfAdministration._TOPICALAPPLICATION; + if ("DRESS".equals(codeString)) + return V3RouteOfAdministration.DRESS; + if ("SWAB".equals(codeString)) + return V3RouteOfAdministration.SWAB; + if ("TOPICAL".equals(codeString)) + return V3RouteOfAdministration.TOPICAL; + if ("BUC".equals(codeString)) + return V3RouteOfAdministration.BUC; + if ("CERV".equals(codeString)) + return V3RouteOfAdministration.CERV; + if ("DEN".equals(codeString)) + return V3RouteOfAdministration.DEN; + if ("GIN".equals(codeString)) + return V3RouteOfAdministration.GIN; + if ("HAIR".equals(codeString)) + return V3RouteOfAdministration.HAIR; + if ("ICORNTA".equals(codeString)) + return V3RouteOfAdministration.ICORNTA; + if ("ICORONTA".equals(codeString)) + return V3RouteOfAdministration.ICORONTA; + if ("IESOPHTA".equals(codeString)) + return V3RouteOfAdministration.IESOPHTA; + if ("IILEALTA".equals(codeString)) + return V3RouteOfAdministration.IILEALTA; + if ("ILTOP".equals(codeString)) + return V3RouteOfAdministration.ILTOP; + if ("ILUMTA".equals(codeString)) + return V3RouteOfAdministration.ILUMTA; + if ("IOTOP".equals(codeString)) + return V3RouteOfAdministration.IOTOP; + if ("LARYNGTA".equals(codeString)) + return V3RouteOfAdministration.LARYNGTA; + if ("MUC".equals(codeString)) + return V3RouteOfAdministration.MUC; + if ("NAIL".equals(codeString)) + return V3RouteOfAdministration.NAIL; + if ("NASAL".equals(codeString)) + return V3RouteOfAdministration.NASAL; + if ("OPTHALTA".equals(codeString)) + return V3RouteOfAdministration.OPTHALTA; + if ("ORALTA".equals(codeString)) + return V3RouteOfAdministration.ORALTA; + if ("ORMUC".equals(codeString)) + return V3RouteOfAdministration.ORMUC; + if ("OROPHARTA".equals(codeString)) + return V3RouteOfAdministration.OROPHARTA; + if ("PERIANAL".equals(codeString)) + return V3RouteOfAdministration.PERIANAL; + if ("PERINEAL".equals(codeString)) + return V3RouteOfAdministration.PERINEAL; + if ("PDONTTA".equals(codeString)) + return V3RouteOfAdministration.PDONTTA; + if ("RECTAL".equals(codeString)) + return V3RouteOfAdministration.RECTAL; + if ("SCALP".equals(codeString)) + return V3RouteOfAdministration.SCALP; + if ("OCDRESTA".equals(codeString)) + return V3RouteOfAdministration.OCDRESTA; + if ("SKIN".equals(codeString)) + return V3RouteOfAdministration.SKIN; + if ("SUBCONJTA".equals(codeString)) + return V3RouteOfAdministration.SUBCONJTA; + if ("TMUCTA".equals(codeString)) + return V3RouteOfAdministration.TMUCTA; + if ("VAGINS".equals(codeString)) + return V3RouteOfAdministration.VAGINS; + if ("INSUF".equals(codeString)) + return V3RouteOfAdministration.INSUF; + if ("TRNSDERM".equals(codeString)) + return V3RouteOfAdministration.TRNSDERM; + if ("_RouteBySite".equals(codeString)) + return V3RouteOfAdministration._ROUTEBYSITE; + if ("_AmnioticFluidSacRoute".equals(codeString)) + return V3RouteOfAdministration._AMNIOTICFLUIDSACROUTE; + if ("_BiliaryRoute".equals(codeString)) + return V3RouteOfAdministration._BILIARYROUTE; + if ("_BodySurfaceRoute".equals(codeString)) + return V3RouteOfAdministration._BODYSURFACEROUTE; + if ("_BuccalMucosaRoute".equals(codeString)) + return V3RouteOfAdministration._BUCCALMUCOSAROUTE; + if ("_CecostomyRoute".equals(codeString)) + return V3RouteOfAdministration._CECOSTOMYROUTE; + if ("_CervicalRoute".equals(codeString)) + return V3RouteOfAdministration._CERVICALROUTE; + if ("_EndocervicalRoute".equals(codeString)) + return V3RouteOfAdministration._ENDOCERVICALROUTE; + if ("_EnteralRoute".equals(codeString)) + return V3RouteOfAdministration._ENTERALROUTE; + if ("_EpiduralRoute".equals(codeString)) + return V3RouteOfAdministration._EPIDURALROUTE; + if ("_ExtraAmnioticRoute".equals(codeString)) + return V3RouteOfAdministration._EXTRAAMNIOTICROUTE; + if ("_ExtracorporealCirculationRoute".equals(codeString)) + return V3RouteOfAdministration._EXTRACORPOREALCIRCULATIONROUTE; + if ("_GastricRoute".equals(codeString)) + return V3RouteOfAdministration._GASTRICROUTE; + if ("_GenitourinaryRoute".equals(codeString)) + return V3RouteOfAdministration._GENITOURINARYROUTE; + if ("_GingivalRoute".equals(codeString)) + return V3RouteOfAdministration._GINGIVALROUTE; + if ("_HairRoute".equals(codeString)) + return V3RouteOfAdministration._HAIRROUTE; + if ("_InterameningealRoute".equals(codeString)) + return V3RouteOfAdministration._INTERAMENINGEALROUTE; + if ("_InterstitialRoute".equals(codeString)) + return V3RouteOfAdministration._INTERSTITIALROUTE; + if ("_IntraabdominalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAABDOMINALROUTE; + if ("_IntraarterialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAARTERIALROUTE; + if ("_IntraarticularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAARTICULARROUTE; + if ("_IntrabronchialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRABRONCHIALROUTE; + if ("_IntrabursalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRABURSALROUTE; + if ("_IntracardiacRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACARDIACROUTE; + if ("_IntracartilaginousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACARTILAGINOUSROUTE; + if ("_IntracaudalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACAUDALROUTE; + if ("_IntracavernosalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACAVERNOSALROUTE; + if ("_IntracavitaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACAVITARYROUTE; + if ("_IntracerebralRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACEREBRALROUTE; + if ("_IntracervicalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACERVICALROUTE; + if ("_IntracisternalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACISTERNALROUTE; + if ("_IntracornealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORNEALROUTE; + if ("_IntracoronalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORONALROUTE; + if ("_IntracoronaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORONARYROUTE; + if ("_IntracorpusCavernosumRoute".equals(codeString)) + return V3RouteOfAdministration._INTRACORPUSCAVERNOSUMROUTE; + if ("_IntradermalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADERMALROUTE; + if ("_IntradiscalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADISCALROUTE; + if ("_IntraductalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADUCTALROUTE; + if ("_IntraduodenalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADUODENALROUTE; + if ("_IntraduralRoute".equals(codeString)) + return V3RouteOfAdministration._INTRADURALROUTE; + if ("_IntraepidermalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAEPIDERMALROUTE; + if ("_IntraepithelialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAEPITHELIALROUTE; + if ("_IntraesophagealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAESOPHAGEALROUTE; + if ("_IntragastricRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAGASTRICROUTE; + if ("_IntrailealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAILEALROUTE; + if ("_IntralesionalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRALESIONALROUTE; + if ("_IntraluminalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRALUMINALROUTE; + if ("_IntralymphaticRoute".equals(codeString)) + return V3RouteOfAdministration._INTRALYMPHATICROUTE; + if ("_IntramedullaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAMEDULLARYROUTE; + if ("_IntramuscularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAMUSCULARROUTE; + if ("_IntraocularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAOCULARROUTE; + if ("_IntraosseousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAOSSEOUSROUTE; + if ("_IntraovarianRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAOVARIANROUTE; + if ("_IntrapericardialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPERICARDIALROUTE; + if ("_IntraperitonealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPERITONEALROUTE; + if ("_IntrapleuralRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPLEURALROUTE; + if ("_IntraprostaticRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPROSTATICROUTE; + if ("_IntrapulmonaryRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAPULMONARYROUTE; + if ("_IntrasinalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASINALROUTE; + if ("_IntraspinalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASPINALROUTE; + if ("_IntrasternalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASTERNALROUTE; + if ("_IntrasynovialRoute".equals(codeString)) + return V3RouteOfAdministration._INTRASYNOVIALROUTE; + if ("_IntratendinousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATENDINOUSROUTE; + if ("_IntratesticularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATESTICULARROUTE; + if ("_IntrathecalRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATHECALROUTE; + if ("_IntrathoracicRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATHORACICROUTE; + if ("_IntratrachealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATRACHEALROUTE; + if ("_IntratubularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATUBULARROUTE; + if ("_IntratumorRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATUMORROUTE; + if ("_IntratympanicRoute".equals(codeString)) + return V3RouteOfAdministration._INTRATYMPANICROUTE; + if ("_IntrauterineRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAUTERINEROUTE; + if ("_IntravascularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVASCULARROUTE; + if ("_IntravenousRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVENOUSROUTE; + if ("_IntraventricularRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVENTRICULARROUTE; + if ("_IntravesicleRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVESICLEROUTE; + if ("_IntravitrealRoute".equals(codeString)) + return V3RouteOfAdministration._INTRAVITREALROUTE; + if ("_JejunumRoute".equals(codeString)) + return V3RouteOfAdministration._JEJUNUMROUTE; + if ("_LacrimalPunctaRoute".equals(codeString)) + return V3RouteOfAdministration._LACRIMALPUNCTAROUTE; + if ("_LaryngealRoute".equals(codeString)) + return V3RouteOfAdministration._LARYNGEALROUTE; + if ("_LingualRoute".equals(codeString)) + return V3RouteOfAdministration._LINGUALROUTE; + if ("_MucousMembraneRoute".equals(codeString)) + return V3RouteOfAdministration._MUCOUSMEMBRANEROUTE; + if ("_NailRoute".equals(codeString)) + return V3RouteOfAdministration._NAILROUTE; + if ("_NasalRoute".equals(codeString)) + return V3RouteOfAdministration._NASALROUTE; + if ("_OphthalmicRoute".equals(codeString)) + return V3RouteOfAdministration._OPHTHALMICROUTE; + if ("_OralRoute".equals(codeString)) + return V3RouteOfAdministration._ORALROUTE; + if ("_OromucosalRoute".equals(codeString)) + return V3RouteOfAdministration._OROMUCOSALROUTE; + if ("_OropharyngealRoute".equals(codeString)) + return V3RouteOfAdministration._OROPHARYNGEALROUTE; + if ("_OticRoute".equals(codeString)) + return V3RouteOfAdministration._OTICROUTE; + if ("_ParanasalSinusesRoute".equals(codeString)) + return V3RouteOfAdministration._PARANASALSINUSESROUTE; + if ("_ParenteralRoute".equals(codeString)) + return V3RouteOfAdministration._PARENTERALROUTE; + if ("_PerianalRoute".equals(codeString)) + return V3RouteOfAdministration._PERIANALROUTE; + if ("_PeriarticularRoute".equals(codeString)) + return V3RouteOfAdministration._PERIARTICULARROUTE; + if ("_PeriduralRoute".equals(codeString)) + return V3RouteOfAdministration._PERIDURALROUTE; + if ("_PerinealRoute".equals(codeString)) + return V3RouteOfAdministration._PERINEALROUTE; + if ("_PerineuralRoute".equals(codeString)) + return V3RouteOfAdministration._PERINEURALROUTE; + if ("_PeriodontalRoute".equals(codeString)) + return V3RouteOfAdministration._PERIODONTALROUTE; + if ("_PulmonaryRoute".equals(codeString)) + return V3RouteOfAdministration._PULMONARYROUTE; + if ("_RectalRoute".equals(codeString)) + return V3RouteOfAdministration._RECTALROUTE; + if ("_RespiratoryTractRoute".equals(codeString)) + return V3RouteOfAdministration._RESPIRATORYTRACTROUTE; + if ("_RetrobulbarRoute".equals(codeString)) + return V3RouteOfAdministration._RETROBULBARROUTE; + if ("_ScalpRoute".equals(codeString)) + return V3RouteOfAdministration._SCALPROUTE; + if ("_SinusUnspecifiedRoute".equals(codeString)) + return V3RouteOfAdministration._SINUSUNSPECIFIEDROUTE; + if ("_SkinRoute".equals(codeString)) + return V3RouteOfAdministration._SKINROUTE; + if ("_SoftTissueRoute".equals(codeString)) + return V3RouteOfAdministration._SOFTTISSUEROUTE; + if ("_SubarachnoidRoute".equals(codeString)) + return V3RouteOfAdministration._SUBARACHNOIDROUTE; + if ("_SubconjunctivalRoute".equals(codeString)) + return V3RouteOfAdministration._SUBCONJUNCTIVALROUTE; + if ("_SubcutaneousRoute".equals(codeString)) + return V3RouteOfAdministration._SUBCUTANEOUSROUTE; + if ("_SublesionalRoute".equals(codeString)) + return V3RouteOfAdministration._SUBLESIONALROUTE; + if ("_SublingualRoute".equals(codeString)) + return V3RouteOfAdministration._SUBLINGUALROUTE; + if ("_SubmucosalRoute".equals(codeString)) + return V3RouteOfAdministration._SUBMUCOSALROUTE; + if ("_TracheostomyRoute".equals(codeString)) + return V3RouteOfAdministration._TRACHEOSTOMYROUTE; + if ("_TransmucosalRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSMUCOSALROUTE; + if ("_TransplacentalRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSPLACENTALROUTE; + if ("_TranstrachealRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSTRACHEALROUTE; + if ("_TranstympanicRoute".equals(codeString)) + return V3RouteOfAdministration._TRANSTYMPANICROUTE; + if ("_UreteralRoute".equals(codeString)) + return V3RouteOfAdministration._URETERALROUTE; + if ("_UrethralRoute".equals(codeString)) + return V3RouteOfAdministration._URETHRALROUTE; + if ("_UrinaryBladderRoute".equals(codeString)) + return V3RouteOfAdministration._URINARYBLADDERROUTE; + if ("_UrinaryTractRoute".equals(codeString)) + return V3RouteOfAdministration._URINARYTRACTROUTE; + if ("_VaginalRoute".equals(codeString)) + return V3RouteOfAdministration._VAGINALROUTE; + if ("_VitreousHumourRoute".equals(codeString)) + return V3RouteOfAdministration._VITREOUSHUMOURROUTE; + throw new IllegalArgumentException("Unknown V3RouteOfAdministration code '"+codeString+"'"); + } + + public String toCode(V3RouteOfAdministration code) { + if (code == V3RouteOfAdministration._ROUTEBYMETHOD) + return "_RouteByMethod"; + if (code == V3RouteOfAdministration.SOAK) + return "SOAK"; + if (code == V3RouteOfAdministration.SHAMPOO) + return "SHAMPOO"; + if (code == V3RouteOfAdministration.TRNSLING) + return "TRNSLING"; + if (code == V3RouteOfAdministration.PO) + return "PO"; + if (code == V3RouteOfAdministration.GARGLE) + return "GARGLE"; + if (code == V3RouteOfAdministration.SUCK) + return "SUCK"; + if (code == V3RouteOfAdministration._CHEW) + return "_Chew"; + if (code == V3RouteOfAdministration.CHEW) + return "CHEW"; + if (code == V3RouteOfAdministration._DIFFUSION) + return "_Diffusion"; + if (code == V3RouteOfAdministration.EXTCORPDIF) + return "EXTCORPDIF"; + if (code == V3RouteOfAdministration.HEMODIFF) + return "HEMODIFF"; + if (code == V3RouteOfAdministration.TRNSDERMD) + return "TRNSDERMD"; + if (code == V3RouteOfAdministration._DISSOLVE) + return "_Dissolve"; + if (code == V3RouteOfAdministration.DISSOLVE) + return "DISSOLVE"; + if (code == V3RouteOfAdministration.SL) + return "SL"; + if (code == V3RouteOfAdministration._DOUCHE) + return "_Douche"; + if (code == V3RouteOfAdministration.DOUCHE) + return "DOUCHE"; + if (code == V3RouteOfAdministration._ELECTROOSMOSISROUTE) + return "_ElectroOsmosisRoute"; + if (code == V3RouteOfAdministration.ELECTOSMOS) + return "ELECTOSMOS"; + if (code == V3RouteOfAdministration._ENEMA) + return "_Enema"; + if (code == V3RouteOfAdministration.ENEMA) + return "ENEMA"; + if (code == V3RouteOfAdministration.RETENEMA) + return "RETENEMA"; + if (code == V3RouteOfAdministration._FLUSH) + return "_Flush"; + if (code == V3RouteOfAdministration.IVFLUSH) + return "IVFLUSH"; + if (code == V3RouteOfAdministration._IMPLANTATION) + return "_Implantation"; + if (code == V3RouteOfAdministration.IDIMPLNT) + return "IDIMPLNT"; + if (code == V3RouteOfAdministration.IVITIMPLNT) + return "IVITIMPLNT"; + if (code == V3RouteOfAdministration.SQIMPLNT) + return "SQIMPLNT"; + if (code == V3RouteOfAdministration._INFUSION) + return "_Infusion"; + if (code == V3RouteOfAdministration.EPI) + return "EPI"; + if (code == V3RouteOfAdministration.IA) + return "IA"; + if (code == V3RouteOfAdministration.IC) + return "IC"; + if (code == V3RouteOfAdministration.ICOR) + return "ICOR"; + if (code == V3RouteOfAdministration.IOSSC) + return "IOSSC"; + if (code == V3RouteOfAdministration.IT) + return "IT"; + if (code == V3RouteOfAdministration.IV) + return "IV"; + if (code == V3RouteOfAdministration.IVC) + return "IVC"; + if (code == V3RouteOfAdministration.IVCC) + return "IVCC"; + if (code == V3RouteOfAdministration.IVCI) + return "IVCI"; + if (code == V3RouteOfAdministration.PCA) + return "PCA"; + if (code == V3RouteOfAdministration.IVASCINFUS) + return "IVASCINFUS"; + if (code == V3RouteOfAdministration.SQINFUS) + return "SQINFUS"; + if (code == V3RouteOfAdministration._INHALATION) + return "_Inhalation"; + if (code == V3RouteOfAdministration.IPINHL) + return "IPINHL"; + if (code == V3RouteOfAdministration.ORIFINHL) + return "ORIFINHL"; + if (code == V3RouteOfAdministration.REBREATH) + return "REBREATH"; + if (code == V3RouteOfAdministration.IPPB) + return "IPPB"; + if (code == V3RouteOfAdministration.NASINHL) + return "NASINHL"; + if (code == V3RouteOfAdministration.NASINHLC) + return "NASINHLC"; + if (code == V3RouteOfAdministration.NEB) + return "NEB"; + if (code == V3RouteOfAdministration.NASNEB) + return "NASNEB"; + if (code == V3RouteOfAdministration.ORNEB) + return "ORNEB"; + if (code == V3RouteOfAdministration.TRACH) + return "TRACH"; + if (code == V3RouteOfAdministration.VENT) + return "VENT"; + if (code == V3RouteOfAdministration.VENTMASK) + return "VENTMASK"; + if (code == V3RouteOfAdministration._INJECTION) + return "_Injection"; + if (code == V3RouteOfAdministration.AMNINJ) + return "AMNINJ"; + if (code == V3RouteOfAdministration.BILINJ) + return "BILINJ"; + if (code == V3RouteOfAdministration.CHOLINJ) + return "CHOLINJ"; + if (code == V3RouteOfAdministration.CERVINJ) + return "CERVINJ"; + if (code == V3RouteOfAdministration.EPIDURINJ) + return "EPIDURINJ"; + if (code == V3RouteOfAdministration.EPIINJ) + return "EPIINJ"; + if (code == V3RouteOfAdministration.EPINJSP) + return "EPINJSP"; + if (code == V3RouteOfAdministration.EXTRAMNINJ) + return "EXTRAMNINJ"; + if (code == V3RouteOfAdministration.EXTCORPINJ) + return "EXTCORPINJ"; + if (code == V3RouteOfAdministration.GBINJ) + return "GBINJ"; + if (code == V3RouteOfAdministration.GINGINJ) + return "GINGINJ"; + if (code == V3RouteOfAdministration.BLADINJ) + return "BLADINJ"; + if (code == V3RouteOfAdministration.ENDOSININJ) + return "ENDOSININJ"; + if (code == V3RouteOfAdministration.HEMOPORT) + return "HEMOPORT"; + if (code == V3RouteOfAdministration.IABDINJ) + return "IABDINJ"; + if (code == V3RouteOfAdministration.IAINJ) + return "IAINJ"; + if (code == V3RouteOfAdministration.IAINJP) + return "IAINJP"; + if (code == V3RouteOfAdministration.IAINJSP) + return "IAINJSP"; + if (code == V3RouteOfAdministration.IARTINJ) + return "IARTINJ"; + if (code == V3RouteOfAdministration.IBURSINJ) + return "IBURSINJ"; + if (code == V3RouteOfAdministration.ICARDINJ) + return "ICARDINJ"; + if (code == V3RouteOfAdministration.ICARDINJRP) + return "ICARDINJRP"; + if (code == V3RouteOfAdministration.ICARDINJSP) + return "ICARDINJSP"; + if (code == V3RouteOfAdministration.ICARINJP) + return "ICARINJP"; + if (code == V3RouteOfAdministration.ICARTINJ) + return "ICARTINJ"; + if (code == V3RouteOfAdministration.ICAUDINJ) + return "ICAUDINJ"; + if (code == V3RouteOfAdministration.ICAVINJ) + return "ICAVINJ"; + if (code == V3RouteOfAdministration.ICAVITINJ) + return "ICAVITINJ"; + if (code == V3RouteOfAdministration.ICEREBINJ) + return "ICEREBINJ"; + if (code == V3RouteOfAdministration.ICISTERNINJ) + return "ICISTERNINJ"; + if (code == V3RouteOfAdministration.ICORONINJ) + return "ICORONINJ"; + if (code == V3RouteOfAdministration.ICORONINJP) + return "ICORONINJP"; + if (code == V3RouteOfAdministration.ICORPCAVINJ) + return "ICORPCAVINJ"; + if (code == V3RouteOfAdministration.IDINJ) + return "IDINJ"; + if (code == V3RouteOfAdministration.IDISCINJ) + return "IDISCINJ"; + if (code == V3RouteOfAdministration.IDUCTINJ) + return "IDUCTINJ"; + if (code == V3RouteOfAdministration.IDURINJ) + return "IDURINJ"; + if (code == V3RouteOfAdministration.IEPIDINJ) + return "IEPIDINJ"; + if (code == V3RouteOfAdministration.IEPITHINJ) + return "IEPITHINJ"; + if (code == V3RouteOfAdministration.ILESINJ) + return "ILESINJ"; + if (code == V3RouteOfAdministration.ILUMINJ) + return "ILUMINJ"; + if (code == V3RouteOfAdministration.ILYMPJINJ) + return "ILYMPJINJ"; + if (code == V3RouteOfAdministration.IM) + return "IM"; + if (code == V3RouteOfAdministration.IMD) + return "IMD"; + if (code == V3RouteOfAdministration.IMZ) + return "IMZ"; + if (code == V3RouteOfAdministration.IMEDULINJ) + return "IMEDULINJ"; + if (code == V3RouteOfAdministration.INTERMENINJ) + return "INTERMENINJ"; + if (code == V3RouteOfAdministration.INTERSTITINJ) + return "INTERSTITINJ"; + if (code == V3RouteOfAdministration.IOINJ) + return "IOINJ"; + if (code == V3RouteOfAdministration.IOSSINJ) + return "IOSSINJ"; + if (code == V3RouteOfAdministration.IOVARINJ) + return "IOVARINJ"; + if (code == V3RouteOfAdministration.IPCARDINJ) + return "IPCARDINJ"; + if (code == V3RouteOfAdministration.IPERINJ) + return "IPERINJ"; + if (code == V3RouteOfAdministration.IPINJ) + return "IPINJ"; + if (code == V3RouteOfAdministration.IPLRINJ) + return "IPLRINJ"; + if (code == V3RouteOfAdministration.IPROSTINJ) + return "IPROSTINJ"; + if (code == V3RouteOfAdministration.IPUMPINJ) + return "IPUMPINJ"; + if (code == V3RouteOfAdministration.ISINJ) + return "ISINJ"; + if (code == V3RouteOfAdministration.ISTERINJ) + return "ISTERINJ"; + if (code == V3RouteOfAdministration.ISYNINJ) + return "ISYNINJ"; + if (code == V3RouteOfAdministration.ITENDINJ) + return "ITENDINJ"; + if (code == V3RouteOfAdministration.ITESTINJ) + return "ITESTINJ"; + if (code == V3RouteOfAdministration.ITHORINJ) + return "ITHORINJ"; + if (code == V3RouteOfAdministration.ITINJ) + return "ITINJ"; + if (code == V3RouteOfAdministration.ITUBINJ) + return "ITUBINJ"; + if (code == V3RouteOfAdministration.ITUMINJ) + return "ITUMINJ"; + if (code == V3RouteOfAdministration.ITYMPINJ) + return "ITYMPINJ"; + if (code == V3RouteOfAdministration.IUINJ) + return "IUINJ"; + if (code == V3RouteOfAdministration.IUINJC) + return "IUINJC"; + if (code == V3RouteOfAdministration.IURETINJ) + return "IURETINJ"; + if (code == V3RouteOfAdministration.IVASCINJ) + return "IVASCINJ"; + if (code == V3RouteOfAdministration.IVENTINJ) + return "IVENTINJ"; + if (code == V3RouteOfAdministration.IVESINJ) + return "IVESINJ"; + if (code == V3RouteOfAdministration.IVINJ) + return "IVINJ"; + if (code == V3RouteOfAdministration.IVINJBOL) + return "IVINJBOL"; + if (code == V3RouteOfAdministration.IVPUSH) + return "IVPUSH"; + if (code == V3RouteOfAdministration.IVRPUSH) + return "IVRPUSH"; + if (code == V3RouteOfAdministration.IVSPUSH) + return "IVSPUSH"; + if (code == V3RouteOfAdministration.IVITINJ) + return "IVITINJ"; + if (code == V3RouteOfAdministration.PAINJ) + return "PAINJ"; + if (code == V3RouteOfAdministration.PARENTINJ) + return "PARENTINJ"; + if (code == V3RouteOfAdministration.PDONTINJ) + return "PDONTINJ"; + if (code == V3RouteOfAdministration.PDPINJ) + return "PDPINJ"; + if (code == V3RouteOfAdministration.PDURINJ) + return "PDURINJ"; + if (code == V3RouteOfAdministration.PNINJ) + return "PNINJ"; + if (code == V3RouteOfAdministration.PNSINJ) + return "PNSINJ"; + if (code == V3RouteOfAdministration.RBINJ) + return "RBINJ"; + if (code == V3RouteOfAdministration.SCINJ) + return "SCINJ"; + if (code == V3RouteOfAdministration.SLESINJ) + return "SLESINJ"; + if (code == V3RouteOfAdministration.SOFTISINJ) + return "SOFTISINJ"; + if (code == V3RouteOfAdministration.SQ) + return "SQ"; + if (code == V3RouteOfAdministration.SUBARACHINJ) + return "SUBARACHINJ"; + if (code == V3RouteOfAdministration.SUBMUCINJ) + return "SUBMUCINJ"; + if (code == V3RouteOfAdministration.TRPLACINJ) + return "TRPLACINJ"; + if (code == V3RouteOfAdministration.TRTRACHINJ) + return "TRTRACHINJ"; + if (code == V3RouteOfAdministration.URETHINJ) + return "URETHINJ"; + if (code == V3RouteOfAdministration.URETINJ) + return "URETINJ"; + if (code == V3RouteOfAdministration._INSERTION) + return "_Insertion"; + if (code == V3RouteOfAdministration.CERVINS) + return "CERVINS"; + if (code == V3RouteOfAdministration.IOSURGINS) + return "IOSURGINS"; + if (code == V3RouteOfAdministration.IU) + return "IU"; + if (code == V3RouteOfAdministration.LPINS) + return "LPINS"; + if (code == V3RouteOfAdministration.PR) + return "PR"; + if (code == V3RouteOfAdministration.SQSURGINS) + return "SQSURGINS"; + if (code == V3RouteOfAdministration.URETHINS) + return "URETHINS"; + if (code == V3RouteOfAdministration.VAGINSI) + return "VAGINSI"; + if (code == V3RouteOfAdministration._INSTILLATION) + return "_Instillation"; + if (code == V3RouteOfAdministration.CECINSTL) + return "CECINSTL"; + if (code == V3RouteOfAdministration.EFT) + return "EFT"; + if (code == V3RouteOfAdministration.ENTINSTL) + return "ENTINSTL"; + if (code == V3RouteOfAdministration.GT) + return "GT"; + if (code == V3RouteOfAdministration.NGT) + return "NGT"; + if (code == V3RouteOfAdministration.OGT) + return "OGT"; + if (code == V3RouteOfAdministration.BLADINSTL) + return "BLADINSTL"; + if (code == V3RouteOfAdministration.CAPDINSTL) + return "CAPDINSTL"; + if (code == V3RouteOfAdministration.CTINSTL) + return "CTINSTL"; + if (code == V3RouteOfAdministration.ETINSTL) + return "ETINSTL"; + if (code == V3RouteOfAdministration.GJT) + return "GJT"; + if (code == V3RouteOfAdministration.IBRONCHINSTIL) + return "IBRONCHINSTIL"; + if (code == V3RouteOfAdministration.IDUODINSTIL) + return "IDUODINSTIL"; + if (code == V3RouteOfAdministration.IESOPHINSTIL) + return "IESOPHINSTIL"; + if (code == V3RouteOfAdministration.IGASTINSTIL) + return "IGASTINSTIL"; + if (code == V3RouteOfAdministration.IILEALINJ) + return "IILEALINJ"; + if (code == V3RouteOfAdministration.IOINSTL) + return "IOINSTL"; + if (code == V3RouteOfAdministration.ISININSTIL) + return "ISININSTIL"; + if (code == V3RouteOfAdministration.ITRACHINSTIL) + return "ITRACHINSTIL"; + if (code == V3RouteOfAdministration.IUINSTL) + return "IUINSTL"; + if (code == V3RouteOfAdministration.JJTINSTL) + return "JJTINSTL"; + if (code == V3RouteOfAdministration.LARYNGINSTIL) + return "LARYNGINSTIL"; + if (code == V3RouteOfAdministration.NASALINSTIL) + return "NASALINSTIL"; + if (code == V3RouteOfAdministration.NASOGASINSTIL) + return "NASOGASINSTIL"; + if (code == V3RouteOfAdministration.NTT) + return "NTT"; + if (code == V3RouteOfAdministration.OJJ) + return "OJJ"; + if (code == V3RouteOfAdministration.OT) + return "OT"; + if (code == V3RouteOfAdministration.PDPINSTL) + return "PDPINSTL"; + if (code == V3RouteOfAdministration.PNSINSTL) + return "PNSINSTL"; + if (code == V3RouteOfAdministration.RECINSTL) + return "RECINSTL"; + if (code == V3RouteOfAdministration.RECTINSTL) + return "RECTINSTL"; + if (code == V3RouteOfAdministration.SININSTIL) + return "SININSTIL"; + if (code == V3RouteOfAdministration.SOFTISINSTIL) + return "SOFTISINSTIL"; + if (code == V3RouteOfAdministration.TRACHINSTL) + return "TRACHINSTL"; + if (code == V3RouteOfAdministration.TRTYMPINSTIL) + return "TRTYMPINSTIL"; + if (code == V3RouteOfAdministration.URETHINSTL) + return "URETHINSTL"; + if (code == V3RouteOfAdministration._IONTOPHORESISROUTE) + return "_IontophoresisRoute"; + if (code == V3RouteOfAdministration.IONTO) + return "IONTO"; + if (code == V3RouteOfAdministration._IRRIGATION) + return "_Irrigation"; + if (code == V3RouteOfAdministration.GUIRR) + return "GUIRR"; + if (code == V3RouteOfAdministration.IGASTIRR) + return "IGASTIRR"; + if (code == V3RouteOfAdministration.ILESIRR) + return "ILESIRR"; + if (code == V3RouteOfAdministration.IOIRR) + return "IOIRR"; + if (code == V3RouteOfAdministration.BLADIRR) + return "BLADIRR"; + if (code == V3RouteOfAdministration.BLADIRRC) + return "BLADIRRC"; + if (code == V3RouteOfAdministration.BLADIRRT) + return "BLADIRRT"; + if (code == V3RouteOfAdministration.RECIRR) + return "RECIRR"; + if (code == V3RouteOfAdministration._LAVAGEROUTE) + return "_LavageRoute"; + if (code == V3RouteOfAdministration.IGASTLAV) + return "IGASTLAV"; + if (code == V3RouteOfAdministration._MUCOSALABSORPTIONROUTE) + return "_MucosalAbsorptionRoute"; + if (code == V3RouteOfAdministration.IDOUDMAB) + return "IDOUDMAB"; + if (code == V3RouteOfAdministration.ITRACHMAB) + return "ITRACHMAB"; + if (code == V3RouteOfAdministration.SMUCMAB) + return "SMUCMAB"; + if (code == V3RouteOfAdministration._NEBULIZATION) + return "_Nebulization"; + if (code == V3RouteOfAdministration.ETNEB) + return "ETNEB"; + if (code == V3RouteOfAdministration._RINSE) + return "_Rinse"; + if (code == V3RouteOfAdministration.DENRINSE) + return "DENRINSE"; + if (code == V3RouteOfAdministration.ORRINSE) + return "ORRINSE"; + if (code == V3RouteOfAdministration._SUPPOSITORYROUTE) + return "_SuppositoryRoute"; + if (code == V3RouteOfAdministration.URETHSUP) + return "URETHSUP"; + if (code == V3RouteOfAdministration._SWISH) + return "_Swish"; + if (code == V3RouteOfAdministration.SWISHSPIT) + return "SWISHSPIT"; + if (code == V3RouteOfAdministration.SWISHSWAL) + return "SWISHSWAL"; + if (code == V3RouteOfAdministration._TOPICALABSORPTIONROUTE) + return "_TopicalAbsorptionRoute"; + if (code == V3RouteOfAdministration.TTYMPTABSORP) + return "TTYMPTABSORP"; + if (code == V3RouteOfAdministration._TOPICALAPPLICATION) + return "_TopicalApplication"; + if (code == V3RouteOfAdministration.DRESS) + return "DRESS"; + if (code == V3RouteOfAdministration.SWAB) + return "SWAB"; + if (code == V3RouteOfAdministration.TOPICAL) + return "TOPICAL"; + if (code == V3RouteOfAdministration.BUC) + return "BUC"; + if (code == V3RouteOfAdministration.CERV) + return "CERV"; + if (code == V3RouteOfAdministration.DEN) + return "DEN"; + if (code == V3RouteOfAdministration.GIN) + return "GIN"; + if (code == V3RouteOfAdministration.HAIR) + return "HAIR"; + if (code == V3RouteOfAdministration.ICORNTA) + return "ICORNTA"; + if (code == V3RouteOfAdministration.ICORONTA) + return "ICORONTA"; + if (code == V3RouteOfAdministration.IESOPHTA) + return "IESOPHTA"; + if (code == V3RouteOfAdministration.IILEALTA) + return "IILEALTA"; + if (code == V3RouteOfAdministration.ILTOP) + return "ILTOP"; + if (code == V3RouteOfAdministration.ILUMTA) + return "ILUMTA"; + if (code == V3RouteOfAdministration.IOTOP) + return "IOTOP"; + if (code == V3RouteOfAdministration.LARYNGTA) + return "LARYNGTA"; + if (code == V3RouteOfAdministration.MUC) + return "MUC"; + if (code == V3RouteOfAdministration.NAIL) + return "NAIL"; + if (code == V3RouteOfAdministration.NASAL) + return "NASAL"; + if (code == V3RouteOfAdministration.OPTHALTA) + return "OPTHALTA"; + if (code == V3RouteOfAdministration.ORALTA) + return "ORALTA"; + if (code == V3RouteOfAdministration.ORMUC) + return "ORMUC"; + if (code == V3RouteOfAdministration.OROPHARTA) + return "OROPHARTA"; + if (code == V3RouteOfAdministration.PERIANAL) + return "PERIANAL"; + if (code == V3RouteOfAdministration.PERINEAL) + return "PERINEAL"; + if (code == V3RouteOfAdministration.PDONTTA) + return "PDONTTA"; + if (code == V3RouteOfAdministration.RECTAL) + return "RECTAL"; + if (code == V3RouteOfAdministration.SCALP) + return "SCALP"; + if (code == V3RouteOfAdministration.OCDRESTA) + return "OCDRESTA"; + if (code == V3RouteOfAdministration.SKIN) + return "SKIN"; + if (code == V3RouteOfAdministration.SUBCONJTA) + return "SUBCONJTA"; + if (code == V3RouteOfAdministration.TMUCTA) + return "TMUCTA"; + if (code == V3RouteOfAdministration.VAGINS) + return "VAGINS"; + if (code == V3RouteOfAdministration.INSUF) + return "INSUF"; + if (code == V3RouteOfAdministration.TRNSDERM) + return "TRNSDERM"; + if (code == V3RouteOfAdministration._ROUTEBYSITE) + return "_RouteBySite"; + if (code == V3RouteOfAdministration._AMNIOTICFLUIDSACROUTE) + return "_AmnioticFluidSacRoute"; + if (code == V3RouteOfAdministration._BILIARYROUTE) + return "_BiliaryRoute"; + if (code == V3RouteOfAdministration._BODYSURFACEROUTE) + return "_BodySurfaceRoute"; + if (code == V3RouteOfAdministration._BUCCALMUCOSAROUTE) + return "_BuccalMucosaRoute"; + if (code == V3RouteOfAdministration._CECOSTOMYROUTE) + return "_CecostomyRoute"; + if (code == V3RouteOfAdministration._CERVICALROUTE) + return "_CervicalRoute"; + if (code == V3RouteOfAdministration._ENDOCERVICALROUTE) + return "_EndocervicalRoute"; + if (code == V3RouteOfAdministration._ENTERALROUTE) + return "_EnteralRoute"; + if (code == V3RouteOfAdministration._EPIDURALROUTE) + return "_EpiduralRoute"; + if (code == V3RouteOfAdministration._EXTRAAMNIOTICROUTE) + return "_ExtraAmnioticRoute"; + if (code == V3RouteOfAdministration._EXTRACORPOREALCIRCULATIONROUTE) + return "_ExtracorporealCirculationRoute"; + if (code == V3RouteOfAdministration._GASTRICROUTE) + return "_GastricRoute"; + if (code == V3RouteOfAdministration._GENITOURINARYROUTE) + return "_GenitourinaryRoute"; + if (code == V3RouteOfAdministration._GINGIVALROUTE) + return "_GingivalRoute"; + if (code == V3RouteOfAdministration._HAIRROUTE) + return "_HairRoute"; + if (code == V3RouteOfAdministration._INTERAMENINGEALROUTE) + return "_InterameningealRoute"; + if (code == V3RouteOfAdministration._INTERSTITIALROUTE) + return "_InterstitialRoute"; + if (code == V3RouteOfAdministration._INTRAABDOMINALROUTE) + return "_IntraabdominalRoute"; + if (code == V3RouteOfAdministration._INTRAARTERIALROUTE) + return "_IntraarterialRoute"; + if (code == V3RouteOfAdministration._INTRAARTICULARROUTE) + return "_IntraarticularRoute"; + if (code == V3RouteOfAdministration._INTRABRONCHIALROUTE) + return "_IntrabronchialRoute"; + if (code == V3RouteOfAdministration._INTRABURSALROUTE) + return "_IntrabursalRoute"; + if (code == V3RouteOfAdministration._INTRACARDIACROUTE) + return "_IntracardiacRoute"; + if (code == V3RouteOfAdministration._INTRACARTILAGINOUSROUTE) + return "_IntracartilaginousRoute"; + if (code == V3RouteOfAdministration._INTRACAUDALROUTE) + return "_IntracaudalRoute"; + if (code == V3RouteOfAdministration._INTRACAVERNOSALROUTE) + return "_IntracavernosalRoute"; + if (code == V3RouteOfAdministration._INTRACAVITARYROUTE) + return "_IntracavitaryRoute"; + if (code == V3RouteOfAdministration._INTRACEREBRALROUTE) + return "_IntracerebralRoute"; + if (code == V3RouteOfAdministration._INTRACERVICALROUTE) + return "_IntracervicalRoute"; + if (code == V3RouteOfAdministration._INTRACISTERNALROUTE) + return "_IntracisternalRoute"; + if (code == V3RouteOfAdministration._INTRACORNEALROUTE) + return "_IntracornealRoute"; + if (code == V3RouteOfAdministration._INTRACORONALROUTE) + return "_IntracoronalRoute"; + if (code == V3RouteOfAdministration._INTRACORONARYROUTE) + return "_IntracoronaryRoute"; + if (code == V3RouteOfAdministration._INTRACORPUSCAVERNOSUMROUTE) + return "_IntracorpusCavernosumRoute"; + if (code == V3RouteOfAdministration._INTRADERMALROUTE) + return "_IntradermalRoute"; + if (code == V3RouteOfAdministration._INTRADISCALROUTE) + return "_IntradiscalRoute"; + if (code == V3RouteOfAdministration._INTRADUCTALROUTE) + return "_IntraductalRoute"; + if (code == V3RouteOfAdministration._INTRADUODENALROUTE) + return "_IntraduodenalRoute"; + if (code == V3RouteOfAdministration._INTRADURALROUTE) + return "_IntraduralRoute"; + if (code == V3RouteOfAdministration._INTRAEPIDERMALROUTE) + return "_IntraepidermalRoute"; + if (code == V3RouteOfAdministration._INTRAEPITHELIALROUTE) + return "_IntraepithelialRoute"; + if (code == V3RouteOfAdministration._INTRAESOPHAGEALROUTE) + return "_IntraesophagealRoute"; + if (code == V3RouteOfAdministration._INTRAGASTRICROUTE) + return "_IntragastricRoute"; + if (code == V3RouteOfAdministration._INTRAILEALROUTE) + return "_IntrailealRoute"; + if (code == V3RouteOfAdministration._INTRALESIONALROUTE) + return "_IntralesionalRoute"; + if (code == V3RouteOfAdministration._INTRALUMINALROUTE) + return "_IntraluminalRoute"; + if (code == V3RouteOfAdministration._INTRALYMPHATICROUTE) + return "_IntralymphaticRoute"; + if (code == V3RouteOfAdministration._INTRAMEDULLARYROUTE) + return "_IntramedullaryRoute"; + if (code == V3RouteOfAdministration._INTRAMUSCULARROUTE) + return "_IntramuscularRoute"; + if (code == V3RouteOfAdministration._INTRAOCULARROUTE) + return "_IntraocularRoute"; + if (code == V3RouteOfAdministration._INTRAOSSEOUSROUTE) + return "_IntraosseousRoute"; + if (code == V3RouteOfAdministration._INTRAOVARIANROUTE) + return "_IntraovarianRoute"; + if (code == V3RouteOfAdministration._INTRAPERICARDIALROUTE) + return "_IntrapericardialRoute"; + if (code == V3RouteOfAdministration._INTRAPERITONEALROUTE) + return "_IntraperitonealRoute"; + if (code == V3RouteOfAdministration._INTRAPLEURALROUTE) + return "_IntrapleuralRoute"; + if (code == V3RouteOfAdministration._INTRAPROSTATICROUTE) + return "_IntraprostaticRoute"; + if (code == V3RouteOfAdministration._INTRAPULMONARYROUTE) + return "_IntrapulmonaryRoute"; + if (code == V3RouteOfAdministration._INTRASINALROUTE) + return "_IntrasinalRoute"; + if (code == V3RouteOfAdministration._INTRASPINALROUTE) + return "_IntraspinalRoute"; + if (code == V3RouteOfAdministration._INTRASTERNALROUTE) + return "_IntrasternalRoute"; + if (code == V3RouteOfAdministration._INTRASYNOVIALROUTE) + return "_IntrasynovialRoute"; + if (code == V3RouteOfAdministration._INTRATENDINOUSROUTE) + return "_IntratendinousRoute"; + if (code == V3RouteOfAdministration._INTRATESTICULARROUTE) + return "_IntratesticularRoute"; + if (code == V3RouteOfAdministration._INTRATHECALROUTE) + return "_IntrathecalRoute"; + if (code == V3RouteOfAdministration._INTRATHORACICROUTE) + return "_IntrathoracicRoute"; + if (code == V3RouteOfAdministration._INTRATRACHEALROUTE) + return "_IntratrachealRoute"; + if (code == V3RouteOfAdministration._INTRATUBULARROUTE) + return "_IntratubularRoute"; + if (code == V3RouteOfAdministration._INTRATUMORROUTE) + return "_IntratumorRoute"; + if (code == V3RouteOfAdministration._INTRATYMPANICROUTE) + return "_IntratympanicRoute"; + if (code == V3RouteOfAdministration._INTRAUTERINEROUTE) + return "_IntrauterineRoute"; + if (code == V3RouteOfAdministration._INTRAVASCULARROUTE) + return "_IntravascularRoute"; + if (code == V3RouteOfAdministration._INTRAVENOUSROUTE) + return "_IntravenousRoute"; + if (code == V3RouteOfAdministration._INTRAVENTRICULARROUTE) + return "_IntraventricularRoute"; + if (code == V3RouteOfAdministration._INTRAVESICLEROUTE) + return "_IntravesicleRoute"; + if (code == V3RouteOfAdministration._INTRAVITREALROUTE) + return "_IntravitrealRoute"; + if (code == V3RouteOfAdministration._JEJUNUMROUTE) + return "_JejunumRoute"; + if (code == V3RouteOfAdministration._LACRIMALPUNCTAROUTE) + return "_LacrimalPunctaRoute"; + if (code == V3RouteOfAdministration._LARYNGEALROUTE) + return "_LaryngealRoute"; + if (code == V3RouteOfAdministration._LINGUALROUTE) + return "_LingualRoute"; + if (code == V3RouteOfAdministration._MUCOUSMEMBRANEROUTE) + return "_MucousMembraneRoute"; + if (code == V3RouteOfAdministration._NAILROUTE) + return "_NailRoute"; + if (code == V3RouteOfAdministration._NASALROUTE) + return "_NasalRoute"; + if (code == V3RouteOfAdministration._OPHTHALMICROUTE) + return "_OphthalmicRoute"; + if (code == V3RouteOfAdministration._ORALROUTE) + return "_OralRoute"; + if (code == V3RouteOfAdministration._OROMUCOSALROUTE) + return "_OromucosalRoute"; + if (code == V3RouteOfAdministration._OROPHARYNGEALROUTE) + return "_OropharyngealRoute"; + if (code == V3RouteOfAdministration._OTICROUTE) + return "_OticRoute"; + if (code == V3RouteOfAdministration._PARANASALSINUSESROUTE) + return "_ParanasalSinusesRoute"; + if (code == V3RouteOfAdministration._PARENTERALROUTE) + return "_ParenteralRoute"; + if (code == V3RouteOfAdministration._PERIANALROUTE) + return "_PerianalRoute"; + if (code == V3RouteOfAdministration._PERIARTICULARROUTE) + return "_PeriarticularRoute"; + if (code == V3RouteOfAdministration._PERIDURALROUTE) + return "_PeriduralRoute"; + if (code == V3RouteOfAdministration._PERINEALROUTE) + return "_PerinealRoute"; + if (code == V3RouteOfAdministration._PERINEURALROUTE) + return "_PerineuralRoute"; + if (code == V3RouteOfAdministration._PERIODONTALROUTE) + return "_PeriodontalRoute"; + if (code == V3RouteOfAdministration._PULMONARYROUTE) + return "_PulmonaryRoute"; + if (code == V3RouteOfAdministration._RECTALROUTE) + return "_RectalRoute"; + if (code == V3RouteOfAdministration._RESPIRATORYTRACTROUTE) + return "_RespiratoryTractRoute"; + if (code == V3RouteOfAdministration._RETROBULBARROUTE) + return "_RetrobulbarRoute"; + if (code == V3RouteOfAdministration._SCALPROUTE) + return "_ScalpRoute"; + if (code == V3RouteOfAdministration._SINUSUNSPECIFIEDROUTE) + return "_SinusUnspecifiedRoute"; + if (code == V3RouteOfAdministration._SKINROUTE) + return "_SkinRoute"; + if (code == V3RouteOfAdministration._SOFTTISSUEROUTE) + return "_SoftTissueRoute"; + if (code == V3RouteOfAdministration._SUBARACHNOIDROUTE) + return "_SubarachnoidRoute"; + if (code == V3RouteOfAdministration._SUBCONJUNCTIVALROUTE) + return "_SubconjunctivalRoute"; + if (code == V3RouteOfAdministration._SUBCUTANEOUSROUTE) + return "_SubcutaneousRoute"; + if (code == V3RouteOfAdministration._SUBLESIONALROUTE) + return "_SublesionalRoute"; + if (code == V3RouteOfAdministration._SUBLINGUALROUTE) + return "_SublingualRoute"; + if (code == V3RouteOfAdministration._SUBMUCOSALROUTE) + return "_SubmucosalRoute"; + if (code == V3RouteOfAdministration._TRACHEOSTOMYROUTE) + return "_TracheostomyRoute"; + if (code == V3RouteOfAdministration._TRANSMUCOSALROUTE) + return "_TransmucosalRoute"; + if (code == V3RouteOfAdministration._TRANSPLACENTALROUTE) + return "_TransplacentalRoute"; + if (code == V3RouteOfAdministration._TRANSTRACHEALROUTE) + return "_TranstrachealRoute"; + if (code == V3RouteOfAdministration._TRANSTYMPANICROUTE) + return "_TranstympanicRoute"; + if (code == V3RouteOfAdministration._URETERALROUTE) + return "_UreteralRoute"; + if (code == V3RouteOfAdministration._URETHRALROUTE) + return "_UrethralRoute"; + if (code == V3RouteOfAdministration._URINARYBLADDERROUTE) + return "_UrinaryBladderRoute"; + if (code == V3RouteOfAdministration._URINARYTRACTROUTE) + return "_UrinaryTractRoute"; + if (code == V3RouteOfAdministration._VAGINALROUTE) + return "_VaginalRoute"; + if (code == V3RouteOfAdministration._VITREOUSHUMOURROUTE) + return "_VitreousHumourRoute"; + return "?"; + } + + public String toSystem(V3RouteOfAdministration code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Sequencing.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Sequencing.java new file mode 100644 index 00000000000..45a60184215 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3Sequencing.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3Sequencing { + + /** + * Ascending sequence order. + */ + A, + /** + * Descending sequence order. + */ + D, + /** + * No enforced sequence order. + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3Sequencing fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return A; + if ("D".equals(codeString)) + return D; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3Sequencing code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case A: return "A"; + case D: return "D"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/Sequencing"; + } + public String getDefinition() { + switch (this) { + case A: return "Ascending sequence order."; + case D: return "Descending sequence order."; + case N: return "No enforced sequence order."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case A: return "Ascending"; + case D: return "Descending"; + case N: return "None"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SequencingEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SequencingEnumFactory.java new file mode 100644 index 00000000000..2aa5a32b1ae --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SequencingEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3SequencingEnumFactory implements EnumFactory { + + public V3Sequencing fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("A".equals(codeString)) + return V3Sequencing.A; + if ("D".equals(codeString)) + return V3Sequencing.D; + if ("N".equals(codeString)) + return V3Sequencing.N; + throw new IllegalArgumentException("Unknown V3Sequencing code '"+codeString+"'"); + } + + public String toCode(V3Sequencing code) { + if (code == V3Sequencing.A) + return "A"; + if (code == V3Sequencing.D) + return "D"; + if (code == V3Sequencing.N) + return "N"; + return "?"; + } + + public String toSystem(V3Sequencing code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SetOperator.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SetOperator.java new file mode 100644 index 00000000000..896e15d174c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SetOperator.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SetOperator { + + /** + * Operations that can be used to associate concepts in a terminology. + */ + _VALUESETOPERATOR, + /** + * Form the set-difference with this value, i.e., exclude this element or set from the resulting set. + */ + E, + /** + * Form the union with this value, i.e., include this element or set in the resulting set. + */ + I, + /** + * Form the intersection with the value. + */ + A, + /** + * Form the convex hull with the value. The convex hull is defined over ordered domains and is the smallest contiguous superset (interval) that of all the operand sets. + */ + H, + /** + * Form the periodic hull with the value. The periodic hull is defined over ordered domains and is the periodic set that contains all contiguous supersets of pairs of intervals generated by the operand periodic intervals. + */ + P, + /** + * added to help the parsers + */ + NULL; + public static V3SetOperator fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ValueSetOperator".equals(codeString)) + return _VALUESETOPERATOR; + if ("E".equals(codeString)) + return E; + if ("I".equals(codeString)) + return I; + if ("A".equals(codeString)) + return A; + if ("H".equals(codeString)) + return H; + if ("P".equals(codeString)) + return P; + throw new FHIRException("Unknown V3SetOperator code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _VALUESETOPERATOR: return "_ValueSetOperator"; + case E: return "E"; + case I: return "I"; + case A: return "A"; + case H: return "H"; + case P: return "P"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/SetOperator"; + } + public String getDefinition() { + switch (this) { + case _VALUESETOPERATOR: return "Operations that can be used to associate concepts in a terminology."; + case E: return "Form the set-difference with this value, i.e., exclude this element or set from the resulting set."; + case I: return "Form the union with this value, i.e., include this element or set in the resulting set."; + case A: return "Form the intersection with the value."; + case H: return "Form the convex hull with the value. The convex hull is defined over ordered domains and is the smallest contiguous superset (interval) that of all the operand sets."; + case P: return "Form the periodic hull with the value. The periodic hull is defined over ordered domains and is the periodic set that contains all contiguous supersets of pairs of intervals generated by the operand periodic intervals."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _VALUESETOPERATOR: return "ValueSetOperator"; + case E: return "exclude"; + case I: return "include"; + case A: return "intersect"; + case H: return "convex hull"; + case P: return "periodic hull"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SetOperatorEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SetOperatorEnumFactory.java new file mode 100644 index 00000000000..ae88e89164f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SetOperatorEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3SetOperatorEnumFactory implements EnumFactory { + + public V3SetOperator fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ValueSetOperator".equals(codeString)) + return V3SetOperator._VALUESETOPERATOR; + if ("E".equals(codeString)) + return V3SetOperator.E; + if ("I".equals(codeString)) + return V3SetOperator.I; + if ("A".equals(codeString)) + return V3SetOperator.A; + if ("H".equals(codeString)) + return V3SetOperator.H; + if ("P".equals(codeString)) + return V3SetOperator.P; + throw new IllegalArgumentException("Unknown V3SetOperator code '"+codeString+"'"); + } + + public String toCode(V3SetOperator code) { + if (code == V3SetOperator._VALUESETOPERATOR) + return "_ValueSetOperator"; + if (code == V3SetOperator.E) + return "E"; + if (code == V3SetOperator.I) + return "I"; + if (code == V3SetOperator.A) + return "A"; + if (code == V3SetOperator.H) + return "H"; + if (code == V3SetOperator.P) + return "P"; + return "?"; + } + + public String toSystem(V3SetOperator code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SpecimenType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SpecimenType.java new file mode 100644 index 00000000000..bfd36fc325d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SpecimenType.java @@ -0,0 +1,1185 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SpecimenType { + + /** + * SpecimenEntityType + */ + _SPECIMENENTITYTYPE, + /** + * Abcess + */ + ABS, + /** + * Amniotic fluid + */ + AMN, + /** + * Aspirate + */ + ASP, + /** + * Blood bag + */ + BBL, + /** + * Whole body + */ + BDY, + /** + * Bile fluid + */ + BIFL, + /** + * Whole blood + */ + BLD, + /** + * Blood arterial + */ + BLDA, + /** + * Blood capillary + */ + BLDC, + /** + * Blood - cord + */ + BLDCO, + /** + * Blood venous + */ + BLDV, + /** + * Bone + */ + BON, + /** + * Basophils + */ + BPH, + /** + * Blood product unit + */ + BPU, + /** + * Burn + */ + BRN, + /** + * Bronchial + */ + BRO, + /** + * Exhaled gas (=breath) + */ + BRTH, + /** + * Calculus (=Stone) + */ + CALC, + /** + * Cardiac muscle + */ + CDM, + /** + * Conjunctiva + */ + CNJT, + /** + * Cannula + */ + CNL, + /** + * Colostrum + */ + COL, + /** + * Cornea + */ + CRN, + /** + * Cerebral spinal fluid + */ + CSF, + /** + * Catheter tip + */ + CTP, + /** + * Curettage + */ + CUR, + /** + * Cervical mucus + */ + CVM, + /** + * Cervix + */ + CVX, + /** + * Cyst + */ + CYST, + /** + * Dialysis fluid + */ + DIAF, + /** + * Dose med or substance + */ + DOSE, + /** + * Drain + */ + DRN, + /** + * Duodenal fluid + */ + DUFL, + /** + * Ear + */ + EAR, + /** + * Ear wax (cerumen) + */ + EARW, + /** + * Electrode + */ + ELT, + /** + * Endocardium + */ + ENDC, + /** + * Endometrium + */ + ENDM, + /** + * Eosinophils + */ + EOS, + /** + * Eye + */ + EYE, + /** + * Fibroblasts + */ + FIB, + /** + * Fistula + */ + FIST, + /** + * Filter + */ + FLT, + /** + * Body fluid, unsp + */ + FLU, + /** + * Food sample + */ + FOOD, + /** + * Gas + */ + GAS, + /** + * Gastric fluid/contents + */ + GAST, + /** + * Genital + */ + GEN, + /** + * Genital cervix + */ + GENC, + /** + * Genital fluid + */ + GENF, + /** + * Genital lochia + */ + GENL, + /** + * Genital vaginal + */ + GENV, + /** + * Hair + */ + HAR, + /** + * Inhaled Gas + */ + IHG, + /** + * Isolate + */ + ISLT, + /** + * Intubation tube + */ + IT, + /** + * Lamella + */ + LAM, + /** + * Liquid NOS + */ + LIQ, + /** + * Line + */ + LN, + /** + * Line arterial + */ + LNA, + /** + * Line venous + */ + LNV, + /** + * Lymphocytes + */ + LYM, + /** + * Macrophages + */ + MAC, + /** + * Marrow (bone) + */ + MAR, + /** + * Menstrual blood + */ + MBLD, + /** + * Meconium + */ + MEC, + /** + * Breast milk + */ + MILK, + /** + * Milk + */ + MLK, + /** + * Nail + */ + NAIL, + /** + * Nose (nasal passage) + */ + NOS, + /** + * Pancreatic fluid + */ + PAFL, + /** + * Patient + */ + PAT, + /** + * Plasma + */ + PLAS, + /** + * Plasma bag + */ + PLB, + /** + * Placenta + */ + PLC, + /** + * Pleural fluid (thoracentesis fld) + */ + PLR, + /** + * Polymorphonuclear neutrophils + */ + PMN, + /** + * Platelet poor plasma + */ + PPP, + /** + * Platelet rich plasma + */ + PRP, + /** + * Peritoneal fluid /ascites + */ + PRT, + /** + * Pus + */ + PUS, + /** + * Erythrocytes + */ + RBC, + /** + * Saliva + */ + SAL, + /** + * Serum + */ + SER, + /** + * Skeletal muscle + */ + SKM, + /** + * Skin + */ + SKN, + /** + * Seminal fluid + */ + SMN, + /** + * Seminal plasma + */ + SMPLS, + /** + * Synovial fluid (Joint fluid) + */ + SNV, + /** + * Spermatozoa + */ + SPRM, + /** + * Sputum + */ + SPT, + /** + * Sputum - coughed + */ + SPTC, + /** + * Sputum - tracheal aspirate + */ + SPTT, + /** + * Stool = Fecal + */ + STL, + /** + * Sweat + */ + SWT, + /** + * Tears + */ + TEAR, + /** + * Thrombocyte (platelet) + */ + THRB, + /** + * Throat + */ + THRT, + /** + * Tissue gall bladder + */ + TISG, + /** + * Tissue placenta + */ + TISPL, + /** + * Tissue, unspecified + */ + TISS, + /** + * Tissue ulcer + */ + TISU, + /** + * Tissue large intestine + */ + TLGI, + /** + * Tissue lung + */ + TLNG, + /** + * Tissue small intestine Tissue ulcer + */ + TSMI, + /** + * Tube, unspecified + */ + TUB, + /** + * Ulcer + */ + ULC, + /** + * Umbilical blood + */ + UMB, + /** + * Unknown medicine + */ + UMED, + /** + * Urine + */ + UR, + /** + * Urine clean catch + */ + URC, + /** + * Urine sediment + */ + URNS, + /** + * Urine catheter + */ + URT, + /** + * Urethra + */ + URTH, + /** + * Unknown substance + */ + USUB, + /** + * Vomitus + */ + VOM, + /** + * Water + */ + WAT, + /** + * Leukocytes + */ + WBC, + /** + * Wick + */ + WICK, + /** + * Wound + */ + WND, + /** + * Wound abscess + */ + WNDA, + /** + * Wound drainage + */ + WNDD, + /** + * Wound exudate + */ + WNDE, + /** + * added to help the parsers + */ + NULL; + public static V3SpecimenType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_SpecimenEntityType".equals(codeString)) + return _SPECIMENENTITYTYPE; + if ("ABS".equals(codeString)) + return ABS; + if ("AMN".equals(codeString)) + return AMN; + if ("ASP".equals(codeString)) + return ASP; + if ("BBL".equals(codeString)) + return BBL; + if ("BDY".equals(codeString)) + return BDY; + if ("BIFL".equals(codeString)) + return BIFL; + if ("BLD".equals(codeString)) + return BLD; + if ("BLDA".equals(codeString)) + return BLDA; + if ("BLDC".equals(codeString)) + return BLDC; + if ("BLDCO".equals(codeString)) + return BLDCO; + if ("BLDV".equals(codeString)) + return BLDV; + if ("BON".equals(codeString)) + return BON; + if ("BPH".equals(codeString)) + return BPH; + if ("BPU".equals(codeString)) + return BPU; + if ("BRN".equals(codeString)) + return BRN; + if ("BRO".equals(codeString)) + return BRO; + if ("BRTH".equals(codeString)) + return BRTH; + if ("CALC".equals(codeString)) + return CALC; + if ("CDM".equals(codeString)) + return CDM; + if ("CNJT".equals(codeString)) + return CNJT; + if ("CNL".equals(codeString)) + return CNL; + if ("COL".equals(codeString)) + return COL; + if ("CRN".equals(codeString)) + return CRN; + if ("CSF".equals(codeString)) + return CSF; + if ("CTP".equals(codeString)) + return CTP; + if ("CUR".equals(codeString)) + return CUR; + if ("CVM".equals(codeString)) + return CVM; + if ("CVX".equals(codeString)) + return CVX; + if ("CYST".equals(codeString)) + return CYST; + if ("DIAF".equals(codeString)) + return DIAF; + if ("DOSE".equals(codeString)) + return DOSE; + if ("DRN".equals(codeString)) + return DRN; + if ("DUFL".equals(codeString)) + return DUFL; + if ("EAR".equals(codeString)) + return EAR; + if ("EARW".equals(codeString)) + return EARW; + if ("ELT".equals(codeString)) + return ELT; + if ("ENDC".equals(codeString)) + return ENDC; + if ("ENDM".equals(codeString)) + return ENDM; + if ("EOS".equals(codeString)) + return EOS; + if ("EYE".equals(codeString)) + return EYE; + if ("FIB".equals(codeString)) + return FIB; + if ("FIST".equals(codeString)) + return FIST; + if ("FLT".equals(codeString)) + return FLT; + if ("FLU".equals(codeString)) + return FLU; + if ("FOOD".equals(codeString)) + return FOOD; + if ("GAS".equals(codeString)) + return GAS; + if ("GAST".equals(codeString)) + return GAST; + if ("GEN".equals(codeString)) + return GEN; + if ("GENC".equals(codeString)) + return GENC; + if ("GENF".equals(codeString)) + return GENF; + if ("GENL".equals(codeString)) + return GENL; + if ("GENV".equals(codeString)) + return GENV; + if ("HAR".equals(codeString)) + return HAR; + if ("IHG".equals(codeString)) + return IHG; + if ("ISLT".equals(codeString)) + return ISLT; + if ("IT".equals(codeString)) + return IT; + if ("LAM".equals(codeString)) + return LAM; + if ("LIQ".equals(codeString)) + return LIQ; + if ("LN".equals(codeString)) + return LN; + if ("LNA".equals(codeString)) + return LNA; + if ("LNV".equals(codeString)) + return LNV; + if ("LYM".equals(codeString)) + return LYM; + if ("MAC".equals(codeString)) + return MAC; + if ("MAR".equals(codeString)) + return MAR; + if ("MBLD".equals(codeString)) + return MBLD; + if ("MEC".equals(codeString)) + return MEC; + if ("MILK".equals(codeString)) + return MILK; + if ("MLK".equals(codeString)) + return MLK; + if ("NAIL".equals(codeString)) + return NAIL; + if ("NOS".equals(codeString)) + return NOS; + if ("PAFL".equals(codeString)) + return PAFL; + if ("PAT".equals(codeString)) + return PAT; + if ("PLAS".equals(codeString)) + return PLAS; + if ("PLB".equals(codeString)) + return PLB; + if ("PLC".equals(codeString)) + return PLC; + if ("PLR".equals(codeString)) + return PLR; + if ("PMN".equals(codeString)) + return PMN; + if ("PPP".equals(codeString)) + return PPP; + if ("PRP".equals(codeString)) + return PRP; + if ("PRT".equals(codeString)) + return PRT; + if ("PUS".equals(codeString)) + return PUS; + if ("RBC".equals(codeString)) + return RBC; + if ("SAL".equals(codeString)) + return SAL; + if ("SER".equals(codeString)) + return SER; + if ("SKM".equals(codeString)) + return SKM; + if ("SKN".equals(codeString)) + return SKN; + if ("SMN".equals(codeString)) + return SMN; + if ("SMPLS".equals(codeString)) + return SMPLS; + if ("SNV".equals(codeString)) + return SNV; + if ("SPRM".equals(codeString)) + return SPRM; + if ("SPT".equals(codeString)) + return SPT; + if ("SPTC".equals(codeString)) + return SPTC; + if ("SPTT".equals(codeString)) + return SPTT; + if ("STL".equals(codeString)) + return STL; + if ("SWT".equals(codeString)) + return SWT; + if ("TEAR".equals(codeString)) + return TEAR; + if ("THRB".equals(codeString)) + return THRB; + if ("THRT".equals(codeString)) + return THRT; + if ("TISG".equals(codeString)) + return TISG; + if ("TISPL".equals(codeString)) + return TISPL; + if ("TISS".equals(codeString)) + return TISS; + if ("TISU".equals(codeString)) + return TISU; + if ("TLGI".equals(codeString)) + return TLGI; + if ("TLNG".equals(codeString)) + return TLNG; + if ("TSMI".equals(codeString)) + return TSMI; + if ("TUB".equals(codeString)) + return TUB; + if ("ULC".equals(codeString)) + return ULC; + if ("UMB".equals(codeString)) + return UMB; + if ("UMED".equals(codeString)) + return UMED; + if ("UR".equals(codeString)) + return UR; + if ("URC".equals(codeString)) + return URC; + if ("URNS".equals(codeString)) + return URNS; + if ("URT".equals(codeString)) + return URT; + if ("URTH".equals(codeString)) + return URTH; + if ("USUB".equals(codeString)) + return USUB; + if ("VOM".equals(codeString)) + return VOM; + if ("WAT".equals(codeString)) + return WAT; + if ("WBC".equals(codeString)) + return WBC; + if ("WICK".equals(codeString)) + return WICK; + if ("WND".equals(codeString)) + return WND; + if ("WNDA".equals(codeString)) + return WNDA; + if ("WNDD".equals(codeString)) + return WNDD; + if ("WNDE".equals(codeString)) + return WNDE; + throw new FHIRException("Unknown V3SpecimenType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _SPECIMENENTITYTYPE: return "_SpecimenEntityType"; + case ABS: return "ABS"; + case AMN: return "AMN"; + case ASP: return "ASP"; + case BBL: return "BBL"; + case BDY: return "BDY"; + case BIFL: return "BIFL"; + case BLD: return "BLD"; + case BLDA: return "BLDA"; + case BLDC: return "BLDC"; + case BLDCO: return "BLDCO"; + case BLDV: return "BLDV"; + case BON: return "BON"; + case BPH: return "BPH"; + case BPU: return "BPU"; + case BRN: return "BRN"; + case BRO: return "BRO"; + case BRTH: return "BRTH"; + case CALC: return "CALC"; + case CDM: return "CDM"; + case CNJT: return "CNJT"; + case CNL: return "CNL"; + case COL: return "COL"; + case CRN: return "CRN"; + case CSF: return "CSF"; + case CTP: return "CTP"; + case CUR: return "CUR"; + case CVM: return "CVM"; + case CVX: return "CVX"; + case CYST: return "CYST"; + case DIAF: return "DIAF"; + case DOSE: return "DOSE"; + case DRN: return "DRN"; + case DUFL: return "DUFL"; + case EAR: return "EAR"; + case EARW: return "EARW"; + case ELT: return "ELT"; + case ENDC: return "ENDC"; + case ENDM: return "ENDM"; + case EOS: return "EOS"; + case EYE: return "EYE"; + case FIB: return "FIB"; + case FIST: return "FIST"; + case FLT: return "FLT"; + case FLU: return "FLU"; + case FOOD: return "FOOD"; + case GAS: return "GAS"; + case GAST: return "GAST"; + case GEN: return "GEN"; + case GENC: return "GENC"; + case GENF: return "GENF"; + case GENL: return "GENL"; + case GENV: return "GENV"; + case HAR: return "HAR"; + case IHG: return "IHG"; + case ISLT: return "ISLT"; + case IT: return "IT"; + case LAM: return "LAM"; + case LIQ: return "LIQ"; + case LN: return "LN"; + case LNA: return "LNA"; + case LNV: return "LNV"; + case LYM: return "LYM"; + case MAC: return "MAC"; + case MAR: return "MAR"; + case MBLD: return "MBLD"; + case MEC: return "MEC"; + case MILK: return "MILK"; + case MLK: return "MLK"; + case NAIL: return "NAIL"; + case NOS: return "NOS"; + case PAFL: return "PAFL"; + case PAT: return "PAT"; + case PLAS: return "PLAS"; + case PLB: return "PLB"; + case PLC: return "PLC"; + case PLR: return "PLR"; + case PMN: return "PMN"; + case PPP: return "PPP"; + case PRP: return "PRP"; + case PRT: return "PRT"; + case PUS: return "PUS"; + case RBC: return "RBC"; + case SAL: return "SAL"; + case SER: return "SER"; + case SKM: return "SKM"; + case SKN: return "SKN"; + case SMN: return "SMN"; + case SMPLS: return "SMPLS"; + case SNV: return "SNV"; + case SPRM: return "SPRM"; + case SPT: return "SPT"; + case SPTC: return "SPTC"; + case SPTT: return "SPTT"; + case STL: return "STL"; + case SWT: return "SWT"; + case TEAR: return "TEAR"; + case THRB: return "THRB"; + case THRT: return "THRT"; + case TISG: return "TISG"; + case TISPL: return "TISPL"; + case TISS: return "TISS"; + case TISU: return "TISU"; + case TLGI: return "TLGI"; + case TLNG: return "TLNG"; + case TSMI: return "TSMI"; + case TUB: return "TUB"; + case ULC: return "ULC"; + case UMB: return "UMB"; + case UMED: return "UMED"; + case UR: return "UR"; + case URC: return "URC"; + case URNS: return "URNS"; + case URT: return "URT"; + case URTH: return "URTH"; + case USUB: return "USUB"; + case VOM: return "VOM"; + case WAT: return "WAT"; + case WBC: return "WBC"; + case WICK: return "WICK"; + case WND: return "WND"; + case WNDA: return "WNDA"; + case WNDD: return "WNDD"; + case WNDE: return "WNDE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/SpecimenType"; + } + public String getDefinition() { + switch (this) { + case _SPECIMENENTITYTYPE: return "SpecimenEntityType"; + case ABS: return "Abcess"; + case AMN: return "Amniotic fluid"; + case ASP: return "Aspirate"; + case BBL: return "Blood bag"; + case BDY: return "Whole body"; + case BIFL: return "Bile fluid"; + case BLD: return "Whole blood"; + case BLDA: return "Blood arterial"; + case BLDC: return "Blood capillary"; + case BLDCO: return "Blood - cord"; + case BLDV: return "Blood venous"; + case BON: return "Bone"; + case BPH: return "Basophils"; + case BPU: return "Blood product unit"; + case BRN: return "Burn"; + case BRO: return "Bronchial"; + case BRTH: return "Exhaled gas (=breath)"; + case CALC: return "Calculus (=Stone)"; + case CDM: return "Cardiac muscle"; + case CNJT: return "Conjunctiva"; + case CNL: return "Cannula"; + case COL: return "Colostrum"; + case CRN: return "Cornea"; + case CSF: return "Cerebral spinal fluid"; + case CTP: return "Catheter tip"; + case CUR: return "Curettage"; + case CVM: return "Cervical mucus"; + case CVX: return "Cervix"; + case CYST: return "Cyst"; + case DIAF: return "Dialysis fluid"; + case DOSE: return "Dose med or substance"; + case DRN: return "Drain"; + case DUFL: return "Duodenal fluid"; + case EAR: return "Ear"; + case EARW: return "Ear wax (cerumen)"; + case ELT: return "Electrode"; + case ENDC: return "Endocardium"; + case ENDM: return "Endometrium"; + case EOS: return "Eosinophils"; + case EYE: return "Eye"; + case FIB: return "Fibroblasts"; + case FIST: return "Fistula"; + case FLT: return "Filter"; + case FLU: return "Body fluid, unsp"; + case FOOD: return "Food sample"; + case GAS: return "Gas"; + case GAST: return "Gastric fluid/contents"; + case GEN: return "Genital"; + case GENC: return "Genital cervix"; + case GENF: return "Genital fluid"; + case GENL: return "Genital lochia"; + case GENV: return "Genital vaginal"; + case HAR: return "Hair"; + case IHG: return "Inhaled Gas"; + case ISLT: return "Isolate"; + case IT: return "Intubation tube"; + case LAM: return "Lamella"; + case LIQ: return "Liquid NOS"; + case LN: return "Line"; + case LNA: return "Line arterial"; + case LNV: return "Line venous"; + case LYM: return "Lymphocytes"; + case MAC: return "Macrophages"; + case MAR: return "Marrow (bone)"; + case MBLD: return "Menstrual blood"; + case MEC: return "Meconium"; + case MILK: return "Breast milk"; + case MLK: return "Milk"; + case NAIL: return "Nail"; + case NOS: return "Nose (nasal passage)"; + case PAFL: return "Pancreatic fluid"; + case PAT: return "Patient"; + case PLAS: return "Plasma"; + case PLB: return "Plasma bag"; + case PLC: return "Placenta"; + case PLR: return "Pleural fluid (thoracentesis fld)"; + case PMN: return "Polymorphonuclear neutrophils"; + case PPP: return "Platelet poor plasma"; + case PRP: return "Platelet rich plasma"; + case PRT: return "Peritoneal fluid /ascites"; + case PUS: return "Pus"; + case RBC: return "Erythrocytes"; + case SAL: return "Saliva"; + case SER: return "Serum"; + case SKM: return "Skeletal muscle"; + case SKN: return "Skin"; + case SMN: return "Seminal fluid"; + case SMPLS: return "Seminal plasma"; + case SNV: return "Synovial fluid (Joint fluid)"; + case SPRM: return "Spermatozoa"; + case SPT: return "Sputum"; + case SPTC: return "Sputum - coughed"; + case SPTT: return "Sputum - tracheal aspirate"; + case STL: return "Stool = Fecal"; + case SWT: return "Sweat"; + case TEAR: return "Tears"; + case THRB: return "Thrombocyte (platelet)"; + case THRT: return "Throat"; + case TISG: return "Tissue gall bladder"; + case TISPL: return "Tissue placenta"; + case TISS: return "Tissue, unspecified"; + case TISU: return "Tissue ulcer"; + case TLGI: return "Tissue large intestine"; + case TLNG: return "Tissue lung"; + case TSMI: return "Tissue small intestine Tissue ulcer"; + case TUB: return "Tube, unspecified"; + case ULC: return "Ulcer"; + case UMB: return "Umbilical blood"; + case UMED: return "Unknown medicine"; + case UR: return "Urine"; + case URC: return "Urine clean catch"; + case URNS: return "Urine sediment"; + case URT: return "Urine catheter"; + case URTH: return "Urethra"; + case USUB: return "Unknown substance"; + case VOM: return "Vomitus"; + case WAT: return "Water"; + case WBC: return "Leukocytes"; + case WICK: return "Wick"; + case WND: return "Wound"; + case WNDA: return "Wound abscess"; + case WNDD: return "Wound drainage"; + case WNDE: return "Wound exudate"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _SPECIMENENTITYTYPE: return "SpecimenEntityType"; + case ABS: return "Abcess"; + case AMN: return "Amniotic fluid"; + case ASP: return "Aspirate"; + case BBL: return "Blood bag"; + case BDY: return "Whole body"; + case BIFL: return "Bile fluid"; + case BLD: return "Whole blood"; + case BLDA: return "Blood arterial"; + case BLDC: return "Blood capillary"; + case BLDCO: return "Blood - cord"; + case BLDV: return "Blood venous"; + case BON: return "Bone"; + case BPH: return "Basophils"; + case BPU: return "Blood product unit"; + case BRN: return "Burn"; + case BRO: return "Bronchial"; + case BRTH: return "Exhaled gas (=breath)"; + case CALC: return "Calculus (=Stone)"; + case CDM: return "Cardiac muscle"; + case CNJT: return "Conjunctiva"; + case CNL: return "Cannula"; + case COL: return "Colostrum"; + case CRN: return "Cornea"; + case CSF: return "Cerebral spinal fluid"; + case CTP: return "Catheter tip"; + case CUR: return "Curettage"; + case CVM: return "Cervical mucus"; + case CVX: return "Cervix"; + case CYST: return "Cyst"; + case DIAF: return "Dialysis fluid"; + case DOSE: return "Dose med or substance"; + case DRN: return "Drain"; + case DUFL: return "Duodenal fluid"; + case EAR: return "Ear"; + case EARW: return "Ear wax (cerumen)"; + case ELT: return "Electrode"; + case ENDC: return "Endocardium"; + case ENDM: return "Endometrium"; + case EOS: return "Eosinophils"; + case EYE: return "Eye"; + case FIB: return "Fibroblasts"; + case FIST: return "Fistula"; + case FLT: return "Filter"; + case FLU: return "Body fluid, unsp"; + case FOOD: return "Food sample"; + case GAS: return "Gas"; + case GAST: return "Gastric fluid/contents"; + case GEN: return "Genital"; + case GENC: return "Genital cervix"; + case GENF: return "Genital fluid"; + case GENL: return "Genital lochia"; + case GENV: return "Genital vaginal"; + case HAR: return "Hair"; + case IHG: return "Inhaled Gas"; + case ISLT: return "Isolate"; + case IT: return "Intubation tube"; + case LAM: return "Lamella"; + case LIQ: return "Liquid NOS"; + case LN: return "Line"; + case LNA: return "Line arterial"; + case LNV: return "Line venous"; + case LYM: return "Lymphocytes"; + case MAC: return "Macrophages"; + case MAR: return "Marrow (bone)"; + case MBLD: return "Menstrual blood"; + case MEC: return "Meconium"; + case MILK: return "Breast milk"; + case MLK: return "Milk"; + case NAIL: return "Nail"; + case NOS: return "Nose (nasal passage)"; + case PAFL: return "Pancreatic fluid"; + case PAT: return "Patient"; + case PLAS: return "Plasma"; + case PLB: return "Plasma bag"; + case PLC: return "Placenta"; + case PLR: return "Pleural fluid (thoracentesis fld)"; + case PMN: return "Polymorphonuclear neutrophils"; + case PPP: return "Platelet poor plasma"; + case PRP: return "Platelet rich plasma"; + case PRT: return "Peritoneal fluid /ascites"; + case PUS: return "Pus"; + case RBC: return "Erythrocytes"; + case SAL: return "Saliva"; + case SER: return "Serum"; + case SKM: return "Skeletal muscle"; + case SKN: return "Skin"; + case SMN: return "Seminal fluid"; + case SMPLS: return "Seminal plasma"; + case SNV: return "Synovial fluid (Joint fluid)"; + case SPRM: return "Spermatozoa"; + case SPT: return "Sputum"; + case SPTC: return "Sputum - coughed"; + case SPTT: return "Sputum - tracheal aspirate"; + case STL: return "Stool = Fecal"; + case SWT: return "Sweat"; + case TEAR: return "Tears"; + case THRB: return "Thrombocyte (platelet)"; + case THRT: return "Throat"; + case TISG: return "Tissue gall bladder"; + case TISPL: return "Tissue placenta"; + case TISS: return "Tissue, unspecified"; + case TISU: return "Tissue ulcer"; + case TLGI: return "Tissue large intestine"; + case TLNG: return "Tissue lung"; + case TSMI: return "Tissue small intestine Tissue ulcer"; + case TUB: return "Tube, unspecified"; + case ULC: return "Ulcer"; + case UMB: return "Umbilical blood"; + case UMED: return "Unknown medicine"; + case UR: return "Urine"; + case URC: return "Urine clean catch"; + case URNS: return "Urine sediment"; + case URT: return "Urine catheter"; + case URTH: return "Urethra"; + case USUB: return "Unknown substance"; + case VOM: return "Vomitus"; + case WAT: return "Water"; + case WBC: return "Leukocytes"; + case WICK: return "Wick"; + case WND: return "Wound"; + case WNDA: return "Wound abscess"; + case WNDD: return "Wound drainage"; + case WNDE: return "Wound exudate"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SpecimenTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SpecimenTypeEnumFactory.java new file mode 100644 index 00000000000..1e2be86c80b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SpecimenTypeEnumFactory.java @@ -0,0 +1,550 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3SpecimenTypeEnumFactory implements EnumFactory { + + public V3SpecimenType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_SpecimenEntityType".equals(codeString)) + return V3SpecimenType._SPECIMENENTITYTYPE; + if ("ABS".equals(codeString)) + return V3SpecimenType.ABS; + if ("AMN".equals(codeString)) + return V3SpecimenType.AMN; + if ("ASP".equals(codeString)) + return V3SpecimenType.ASP; + if ("BBL".equals(codeString)) + return V3SpecimenType.BBL; + if ("BDY".equals(codeString)) + return V3SpecimenType.BDY; + if ("BIFL".equals(codeString)) + return V3SpecimenType.BIFL; + if ("BLD".equals(codeString)) + return V3SpecimenType.BLD; + if ("BLDA".equals(codeString)) + return V3SpecimenType.BLDA; + if ("BLDC".equals(codeString)) + return V3SpecimenType.BLDC; + if ("BLDCO".equals(codeString)) + return V3SpecimenType.BLDCO; + if ("BLDV".equals(codeString)) + return V3SpecimenType.BLDV; + if ("BON".equals(codeString)) + return V3SpecimenType.BON; + if ("BPH".equals(codeString)) + return V3SpecimenType.BPH; + if ("BPU".equals(codeString)) + return V3SpecimenType.BPU; + if ("BRN".equals(codeString)) + return V3SpecimenType.BRN; + if ("BRO".equals(codeString)) + return V3SpecimenType.BRO; + if ("BRTH".equals(codeString)) + return V3SpecimenType.BRTH; + if ("CALC".equals(codeString)) + return V3SpecimenType.CALC; + if ("CDM".equals(codeString)) + return V3SpecimenType.CDM; + if ("CNJT".equals(codeString)) + return V3SpecimenType.CNJT; + if ("CNL".equals(codeString)) + return V3SpecimenType.CNL; + if ("COL".equals(codeString)) + return V3SpecimenType.COL; + if ("CRN".equals(codeString)) + return V3SpecimenType.CRN; + if ("CSF".equals(codeString)) + return V3SpecimenType.CSF; + if ("CTP".equals(codeString)) + return V3SpecimenType.CTP; + if ("CUR".equals(codeString)) + return V3SpecimenType.CUR; + if ("CVM".equals(codeString)) + return V3SpecimenType.CVM; + if ("CVX".equals(codeString)) + return V3SpecimenType.CVX; + if ("CYST".equals(codeString)) + return V3SpecimenType.CYST; + if ("DIAF".equals(codeString)) + return V3SpecimenType.DIAF; + if ("DOSE".equals(codeString)) + return V3SpecimenType.DOSE; + if ("DRN".equals(codeString)) + return V3SpecimenType.DRN; + if ("DUFL".equals(codeString)) + return V3SpecimenType.DUFL; + if ("EAR".equals(codeString)) + return V3SpecimenType.EAR; + if ("EARW".equals(codeString)) + return V3SpecimenType.EARW; + if ("ELT".equals(codeString)) + return V3SpecimenType.ELT; + if ("ENDC".equals(codeString)) + return V3SpecimenType.ENDC; + if ("ENDM".equals(codeString)) + return V3SpecimenType.ENDM; + if ("EOS".equals(codeString)) + return V3SpecimenType.EOS; + if ("EYE".equals(codeString)) + return V3SpecimenType.EYE; + if ("FIB".equals(codeString)) + return V3SpecimenType.FIB; + if ("FIST".equals(codeString)) + return V3SpecimenType.FIST; + if ("FLT".equals(codeString)) + return V3SpecimenType.FLT; + if ("FLU".equals(codeString)) + return V3SpecimenType.FLU; + if ("FOOD".equals(codeString)) + return V3SpecimenType.FOOD; + if ("GAS".equals(codeString)) + return V3SpecimenType.GAS; + if ("GAST".equals(codeString)) + return V3SpecimenType.GAST; + if ("GEN".equals(codeString)) + return V3SpecimenType.GEN; + if ("GENC".equals(codeString)) + return V3SpecimenType.GENC; + if ("GENF".equals(codeString)) + return V3SpecimenType.GENF; + if ("GENL".equals(codeString)) + return V3SpecimenType.GENL; + if ("GENV".equals(codeString)) + return V3SpecimenType.GENV; + if ("HAR".equals(codeString)) + return V3SpecimenType.HAR; + if ("IHG".equals(codeString)) + return V3SpecimenType.IHG; + if ("ISLT".equals(codeString)) + return V3SpecimenType.ISLT; + if ("IT".equals(codeString)) + return V3SpecimenType.IT; + if ("LAM".equals(codeString)) + return V3SpecimenType.LAM; + if ("LIQ".equals(codeString)) + return V3SpecimenType.LIQ; + if ("LN".equals(codeString)) + return V3SpecimenType.LN; + if ("LNA".equals(codeString)) + return V3SpecimenType.LNA; + if ("LNV".equals(codeString)) + return V3SpecimenType.LNV; + if ("LYM".equals(codeString)) + return V3SpecimenType.LYM; + if ("MAC".equals(codeString)) + return V3SpecimenType.MAC; + if ("MAR".equals(codeString)) + return V3SpecimenType.MAR; + if ("MBLD".equals(codeString)) + return V3SpecimenType.MBLD; + if ("MEC".equals(codeString)) + return V3SpecimenType.MEC; + if ("MILK".equals(codeString)) + return V3SpecimenType.MILK; + if ("MLK".equals(codeString)) + return V3SpecimenType.MLK; + if ("NAIL".equals(codeString)) + return V3SpecimenType.NAIL; + if ("NOS".equals(codeString)) + return V3SpecimenType.NOS; + if ("PAFL".equals(codeString)) + return V3SpecimenType.PAFL; + if ("PAT".equals(codeString)) + return V3SpecimenType.PAT; + if ("PLAS".equals(codeString)) + return V3SpecimenType.PLAS; + if ("PLB".equals(codeString)) + return V3SpecimenType.PLB; + if ("PLC".equals(codeString)) + return V3SpecimenType.PLC; + if ("PLR".equals(codeString)) + return V3SpecimenType.PLR; + if ("PMN".equals(codeString)) + return V3SpecimenType.PMN; + if ("PPP".equals(codeString)) + return V3SpecimenType.PPP; + if ("PRP".equals(codeString)) + return V3SpecimenType.PRP; + if ("PRT".equals(codeString)) + return V3SpecimenType.PRT; + if ("PUS".equals(codeString)) + return V3SpecimenType.PUS; + if ("RBC".equals(codeString)) + return V3SpecimenType.RBC; + if ("SAL".equals(codeString)) + return V3SpecimenType.SAL; + if ("SER".equals(codeString)) + return V3SpecimenType.SER; + if ("SKM".equals(codeString)) + return V3SpecimenType.SKM; + if ("SKN".equals(codeString)) + return V3SpecimenType.SKN; + if ("SMN".equals(codeString)) + return V3SpecimenType.SMN; + if ("SMPLS".equals(codeString)) + return V3SpecimenType.SMPLS; + if ("SNV".equals(codeString)) + return V3SpecimenType.SNV; + if ("SPRM".equals(codeString)) + return V3SpecimenType.SPRM; + if ("SPT".equals(codeString)) + return V3SpecimenType.SPT; + if ("SPTC".equals(codeString)) + return V3SpecimenType.SPTC; + if ("SPTT".equals(codeString)) + return V3SpecimenType.SPTT; + if ("STL".equals(codeString)) + return V3SpecimenType.STL; + if ("SWT".equals(codeString)) + return V3SpecimenType.SWT; + if ("TEAR".equals(codeString)) + return V3SpecimenType.TEAR; + if ("THRB".equals(codeString)) + return V3SpecimenType.THRB; + if ("THRT".equals(codeString)) + return V3SpecimenType.THRT; + if ("TISG".equals(codeString)) + return V3SpecimenType.TISG; + if ("TISPL".equals(codeString)) + return V3SpecimenType.TISPL; + if ("TISS".equals(codeString)) + return V3SpecimenType.TISS; + if ("TISU".equals(codeString)) + return V3SpecimenType.TISU; + if ("TLGI".equals(codeString)) + return V3SpecimenType.TLGI; + if ("TLNG".equals(codeString)) + return V3SpecimenType.TLNG; + if ("TSMI".equals(codeString)) + return V3SpecimenType.TSMI; + if ("TUB".equals(codeString)) + return V3SpecimenType.TUB; + if ("ULC".equals(codeString)) + return V3SpecimenType.ULC; + if ("UMB".equals(codeString)) + return V3SpecimenType.UMB; + if ("UMED".equals(codeString)) + return V3SpecimenType.UMED; + if ("UR".equals(codeString)) + return V3SpecimenType.UR; + if ("URC".equals(codeString)) + return V3SpecimenType.URC; + if ("URNS".equals(codeString)) + return V3SpecimenType.URNS; + if ("URT".equals(codeString)) + return V3SpecimenType.URT; + if ("URTH".equals(codeString)) + return V3SpecimenType.URTH; + if ("USUB".equals(codeString)) + return V3SpecimenType.USUB; + if ("VOM".equals(codeString)) + return V3SpecimenType.VOM; + if ("WAT".equals(codeString)) + return V3SpecimenType.WAT; + if ("WBC".equals(codeString)) + return V3SpecimenType.WBC; + if ("WICK".equals(codeString)) + return V3SpecimenType.WICK; + if ("WND".equals(codeString)) + return V3SpecimenType.WND; + if ("WNDA".equals(codeString)) + return V3SpecimenType.WNDA; + if ("WNDD".equals(codeString)) + return V3SpecimenType.WNDD; + if ("WNDE".equals(codeString)) + return V3SpecimenType.WNDE; + throw new IllegalArgumentException("Unknown V3SpecimenType code '"+codeString+"'"); + } + + public String toCode(V3SpecimenType code) { + if (code == V3SpecimenType._SPECIMENENTITYTYPE) + return "_SpecimenEntityType"; + if (code == V3SpecimenType.ABS) + return "ABS"; + if (code == V3SpecimenType.AMN) + return "AMN"; + if (code == V3SpecimenType.ASP) + return "ASP"; + if (code == V3SpecimenType.BBL) + return "BBL"; + if (code == V3SpecimenType.BDY) + return "BDY"; + if (code == V3SpecimenType.BIFL) + return "BIFL"; + if (code == V3SpecimenType.BLD) + return "BLD"; + if (code == V3SpecimenType.BLDA) + return "BLDA"; + if (code == V3SpecimenType.BLDC) + return "BLDC"; + if (code == V3SpecimenType.BLDCO) + return "BLDCO"; + if (code == V3SpecimenType.BLDV) + return "BLDV"; + if (code == V3SpecimenType.BON) + return "BON"; + if (code == V3SpecimenType.BPH) + return "BPH"; + if (code == V3SpecimenType.BPU) + return "BPU"; + if (code == V3SpecimenType.BRN) + return "BRN"; + if (code == V3SpecimenType.BRO) + return "BRO"; + if (code == V3SpecimenType.BRTH) + return "BRTH"; + if (code == V3SpecimenType.CALC) + return "CALC"; + if (code == V3SpecimenType.CDM) + return "CDM"; + if (code == V3SpecimenType.CNJT) + return "CNJT"; + if (code == V3SpecimenType.CNL) + return "CNL"; + if (code == V3SpecimenType.COL) + return "COL"; + if (code == V3SpecimenType.CRN) + return "CRN"; + if (code == V3SpecimenType.CSF) + return "CSF"; + if (code == V3SpecimenType.CTP) + return "CTP"; + if (code == V3SpecimenType.CUR) + return "CUR"; + if (code == V3SpecimenType.CVM) + return "CVM"; + if (code == V3SpecimenType.CVX) + return "CVX"; + if (code == V3SpecimenType.CYST) + return "CYST"; + if (code == V3SpecimenType.DIAF) + return "DIAF"; + if (code == V3SpecimenType.DOSE) + return "DOSE"; + if (code == V3SpecimenType.DRN) + return "DRN"; + if (code == V3SpecimenType.DUFL) + return "DUFL"; + if (code == V3SpecimenType.EAR) + return "EAR"; + if (code == V3SpecimenType.EARW) + return "EARW"; + if (code == V3SpecimenType.ELT) + return "ELT"; + if (code == V3SpecimenType.ENDC) + return "ENDC"; + if (code == V3SpecimenType.ENDM) + return "ENDM"; + if (code == V3SpecimenType.EOS) + return "EOS"; + if (code == V3SpecimenType.EYE) + return "EYE"; + if (code == V3SpecimenType.FIB) + return "FIB"; + if (code == V3SpecimenType.FIST) + return "FIST"; + if (code == V3SpecimenType.FLT) + return "FLT"; + if (code == V3SpecimenType.FLU) + return "FLU"; + if (code == V3SpecimenType.FOOD) + return "FOOD"; + if (code == V3SpecimenType.GAS) + return "GAS"; + if (code == V3SpecimenType.GAST) + return "GAST"; + if (code == V3SpecimenType.GEN) + return "GEN"; + if (code == V3SpecimenType.GENC) + return "GENC"; + if (code == V3SpecimenType.GENF) + return "GENF"; + if (code == V3SpecimenType.GENL) + return "GENL"; + if (code == V3SpecimenType.GENV) + return "GENV"; + if (code == V3SpecimenType.HAR) + return "HAR"; + if (code == V3SpecimenType.IHG) + return "IHG"; + if (code == V3SpecimenType.ISLT) + return "ISLT"; + if (code == V3SpecimenType.IT) + return "IT"; + if (code == V3SpecimenType.LAM) + return "LAM"; + if (code == V3SpecimenType.LIQ) + return "LIQ"; + if (code == V3SpecimenType.LN) + return "LN"; + if (code == V3SpecimenType.LNA) + return "LNA"; + if (code == V3SpecimenType.LNV) + return "LNV"; + if (code == V3SpecimenType.LYM) + return "LYM"; + if (code == V3SpecimenType.MAC) + return "MAC"; + if (code == V3SpecimenType.MAR) + return "MAR"; + if (code == V3SpecimenType.MBLD) + return "MBLD"; + if (code == V3SpecimenType.MEC) + return "MEC"; + if (code == V3SpecimenType.MILK) + return "MILK"; + if (code == V3SpecimenType.MLK) + return "MLK"; + if (code == V3SpecimenType.NAIL) + return "NAIL"; + if (code == V3SpecimenType.NOS) + return "NOS"; + if (code == V3SpecimenType.PAFL) + return "PAFL"; + if (code == V3SpecimenType.PAT) + return "PAT"; + if (code == V3SpecimenType.PLAS) + return "PLAS"; + if (code == V3SpecimenType.PLB) + return "PLB"; + if (code == V3SpecimenType.PLC) + return "PLC"; + if (code == V3SpecimenType.PLR) + return "PLR"; + if (code == V3SpecimenType.PMN) + return "PMN"; + if (code == V3SpecimenType.PPP) + return "PPP"; + if (code == V3SpecimenType.PRP) + return "PRP"; + if (code == V3SpecimenType.PRT) + return "PRT"; + if (code == V3SpecimenType.PUS) + return "PUS"; + if (code == V3SpecimenType.RBC) + return "RBC"; + if (code == V3SpecimenType.SAL) + return "SAL"; + if (code == V3SpecimenType.SER) + return "SER"; + if (code == V3SpecimenType.SKM) + return "SKM"; + if (code == V3SpecimenType.SKN) + return "SKN"; + if (code == V3SpecimenType.SMN) + return "SMN"; + if (code == V3SpecimenType.SMPLS) + return "SMPLS"; + if (code == V3SpecimenType.SNV) + return "SNV"; + if (code == V3SpecimenType.SPRM) + return "SPRM"; + if (code == V3SpecimenType.SPT) + return "SPT"; + if (code == V3SpecimenType.SPTC) + return "SPTC"; + if (code == V3SpecimenType.SPTT) + return "SPTT"; + if (code == V3SpecimenType.STL) + return "STL"; + if (code == V3SpecimenType.SWT) + return "SWT"; + if (code == V3SpecimenType.TEAR) + return "TEAR"; + if (code == V3SpecimenType.THRB) + return "THRB"; + if (code == V3SpecimenType.THRT) + return "THRT"; + if (code == V3SpecimenType.TISG) + return "TISG"; + if (code == V3SpecimenType.TISPL) + return "TISPL"; + if (code == V3SpecimenType.TISS) + return "TISS"; + if (code == V3SpecimenType.TISU) + return "TISU"; + if (code == V3SpecimenType.TLGI) + return "TLGI"; + if (code == V3SpecimenType.TLNG) + return "TLNG"; + if (code == V3SpecimenType.TSMI) + return "TSMI"; + if (code == V3SpecimenType.TUB) + return "TUB"; + if (code == V3SpecimenType.ULC) + return "ULC"; + if (code == V3SpecimenType.UMB) + return "UMB"; + if (code == V3SpecimenType.UMED) + return "UMED"; + if (code == V3SpecimenType.UR) + return "UR"; + if (code == V3SpecimenType.URC) + return "URC"; + if (code == V3SpecimenType.URNS) + return "URNS"; + if (code == V3SpecimenType.URT) + return "URT"; + if (code == V3SpecimenType.URTH) + return "URTH"; + if (code == V3SpecimenType.USUB) + return "USUB"; + if (code == V3SpecimenType.VOM) + return "VOM"; + if (code == V3SpecimenType.WAT) + return "WAT"; + if (code == V3SpecimenType.WBC) + return "WBC"; + if (code == V3SpecimenType.WICK) + return "WICK"; + if (code == V3SpecimenType.WND) + return "WND"; + if (code == V3SpecimenType.WNDA) + return "WNDA"; + if (code == V3SpecimenType.WNDD) + return "WNDD"; + if (code == V3SpecimenType.WNDE) + return "WNDE"; + return "?"; + } + + public String toSystem(V3SpecimenType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstanceAdminSubstitution.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstanceAdminSubstitution.java new file mode 100644 index 00000000000..5953074976d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstanceAdminSubstitution.java @@ -0,0 +1,213 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SubstanceAdminSubstitution { + + /** + * Description: Substitution occurred or is permitted with another product that may potentially have different ingredients, but having the same biological and therapeutic effects. + */ + _ACTSUBSTANCEADMINSUBSTITUTIONCODE, + /** + * Description: Substitution occurred or is permitted with another bioequivalent and therapeutically equivalent product. + */ + E, + /** + * Description: + + + Substitution occurred or is permitted with another product that is a: + + + pharmaceutical alternative containing the same active ingredient but is formulated with different salt, ester + pharmaceutical equivalent that has the same active ingredient, strength, dosage form and route of administration + + + Examples: + + + + + Pharmaceutical alternative: Erythromycin Ethylsuccinate for Erythromycin Stearate + + Pharmaceutical equivalent: Lisonpril for Zestril + */ + EC, + /** + * Description: + + + Substitution occurred or is permitted between equivalent Brands but not Generics + + + Examples: + + + + Zestril for Prinivil + Coumadin for Jantoven + */ + BC, + /** + * Description: Substitution occurred or is permitted between equivalent Generics but not Brands + + + Examples: + + + + Lisnopril (Lupin Corp) for Lisnopril (Wockhardt Corp) + */ + G, + /** + * Description: Substitution occurred or is permitted with another product having the same therapeutic objective and safety profile. + + + Examples: + + + + ranitidine for Tagamet + */ + TE, + /** + * Description: Substitution occurred or is permitted between therapeutically equivalent Brands but not Generics +> + Examples: + + + + Zantac for Tagamet + */ + TB, + /** + * Description: Substitution occurred or is permitted between therapeutically equivalent Generics but not Brands +> + Examples: + + + + Ranitidine for cimetidine + */ + TG, + /** + * Description: This substitution was performed or is permitted based on formulary guidelines. + */ + F, + /** + * No substitution occurred or is permitted. + */ + N, + /** + * added to help the parsers + */ + NULL; + public static V3SubstanceAdminSubstitution fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActSubstanceAdminSubstitutionCode".equals(codeString)) + return _ACTSUBSTANCEADMINSUBSTITUTIONCODE; + if ("E".equals(codeString)) + return E; + if ("EC".equals(codeString)) + return EC; + if ("BC".equals(codeString)) + return BC; + if ("G".equals(codeString)) + return G; + if ("TE".equals(codeString)) + return TE; + if ("TB".equals(codeString)) + return TB; + if ("TG".equals(codeString)) + return TG; + if ("F".equals(codeString)) + return F; + if ("N".equals(codeString)) + return N; + throw new FHIRException("Unknown V3SubstanceAdminSubstitution code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _ACTSUBSTANCEADMINSUBSTITUTIONCODE: return "_ActSubstanceAdminSubstitutionCode"; + case E: return "E"; + case EC: return "EC"; + case BC: return "BC"; + case G: return "G"; + case TE: return "TE"; + case TB: return "TB"; + case TG: return "TG"; + case F: return "F"; + case N: return "N"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/substanceAdminSubstitution"; + } + public String getDefinition() { + switch (this) { + case _ACTSUBSTANCEADMINSUBSTITUTIONCODE: return "Description: Substitution occurred or is permitted with another product that may potentially have different ingredients, but having the same biological and therapeutic effects."; + case E: return "Description: Substitution occurred or is permitted with another bioequivalent and therapeutically equivalent product."; + case EC: return "Description: \n \r\n\n Substitution occurred or is permitted with another product that is a:\r\n\n \n pharmaceutical alternative containing the same active ingredient but is formulated with different salt, ester\n pharmaceutical equivalent that has the same active ingredient, strength, dosage form and route of administration\n \n \n Examples: \n \r\n\n \n \n Pharmaceutical alternative: Erythromycin Ethylsuccinate for Erythromycin Stearate\n \n Pharmaceutical equivalent: Lisonpril for Zestril"; + case BC: return "Description: \n \r\n\n Substitution occurred or is permitted between equivalent Brands but not Generics\r\n\n \n Examples: \n \r\n\n \n Zestril for Prinivil\n Coumadin for Jantoven"; + case G: return "Description: Substitution occurred or is permitted between equivalent Generics but not Brands\r\n\n \n Examples: \n \r\n\n \n Lisnopril (Lupin Corp) for Lisnopril (Wockhardt Corp)"; + case TE: return "Description: Substitution occurred or is permitted with another product having the same therapeutic objective and safety profile.\r\n\n \n Examples: \n \r\n\n \n ranitidine for Tagamet"; + case TB: return "Description: Substitution occurred or is permitted between therapeutically equivalent Brands but not Generics\r\n>\n Examples: \n \r\n\n \n Zantac for Tagamet"; + case TG: return "Description: Substitution occurred or is permitted between therapeutically equivalent Generics but not Brands\r\n>\n Examples: \n \r\n\n \n Ranitidine for cimetidine"; + case F: return "Description: This substitution was performed or is permitted based on formulary guidelines."; + case N: return "No substitution occurred or is permitted."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _ACTSUBSTANCEADMINSUBSTITUTIONCODE: return "ActSubstanceAdminSubstitutionCode"; + case E: return "equivalent"; + case EC: return "equivalent composition"; + case BC: return "brand composition"; + case G: return "generic composition"; + case TE: return "therapeutic alternative"; + case TB: return "therapeutic brand"; + case TG: return "therapeutic generic"; + case F: return "formulary"; + case N: return "none"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstanceAdminSubstitutionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstanceAdminSubstitutionEnumFactory.java new file mode 100644 index 00000000000..6678f5c77e0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstanceAdminSubstitutionEnumFactory.java @@ -0,0 +1,94 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3SubstanceAdminSubstitutionEnumFactory implements EnumFactory { + + public V3SubstanceAdminSubstitution fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_ActSubstanceAdminSubstitutionCode".equals(codeString)) + return V3SubstanceAdminSubstitution._ACTSUBSTANCEADMINSUBSTITUTIONCODE; + if ("E".equals(codeString)) + return V3SubstanceAdminSubstitution.E; + if ("EC".equals(codeString)) + return V3SubstanceAdminSubstitution.EC; + if ("BC".equals(codeString)) + return V3SubstanceAdminSubstitution.BC; + if ("G".equals(codeString)) + return V3SubstanceAdminSubstitution.G; + if ("TE".equals(codeString)) + return V3SubstanceAdminSubstitution.TE; + if ("TB".equals(codeString)) + return V3SubstanceAdminSubstitution.TB; + if ("TG".equals(codeString)) + return V3SubstanceAdminSubstitution.TG; + if ("F".equals(codeString)) + return V3SubstanceAdminSubstitution.F; + if ("N".equals(codeString)) + return V3SubstanceAdminSubstitution.N; + throw new IllegalArgumentException("Unknown V3SubstanceAdminSubstitution code '"+codeString+"'"); + } + + public String toCode(V3SubstanceAdminSubstitution code) { + if (code == V3SubstanceAdminSubstitution._ACTSUBSTANCEADMINSUBSTITUTIONCODE) + return "_ActSubstanceAdminSubstitutionCode"; + if (code == V3SubstanceAdminSubstitution.E) + return "E"; + if (code == V3SubstanceAdminSubstitution.EC) + return "EC"; + if (code == V3SubstanceAdminSubstitution.BC) + return "BC"; + if (code == V3SubstanceAdminSubstitution.G) + return "G"; + if (code == V3SubstanceAdminSubstitution.TE) + return "TE"; + if (code == V3SubstanceAdminSubstitution.TB) + return "TB"; + if (code == V3SubstanceAdminSubstitution.TG) + return "TG"; + if (code == V3SubstanceAdminSubstitution.F) + return "F"; + if (code == V3SubstanceAdminSubstitution.N) + return "N"; + return "?"; + } + + public String toSystem(V3SubstanceAdminSubstitution code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstitutionCondition.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstitutionCondition.java new file mode 100644 index 00000000000..70e89a95177 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstitutionCondition.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3SubstitutionCondition { + + /** + * Some conditions may be attached to an allowable substitution. An allowable substitution is based on a match to any other attributes that may be specified. + */ + _CONDITIONAL, + /** + * Confirmation with Contact Person prior to making any substitutions has or will occur. + */ + CONFIRM, + /** + * Notification to the Contact Person, prior to substitution and through normal institutional procedures, has or will be made. + */ + NOTIFY, + /** + * Substitution is not permitted. + */ + NOSUB, + /** + * No conditions are required. + */ + UNCOND, + /** + * added to help the parsers + */ + NULL; + public static V3SubstitutionCondition fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Conditional".equals(codeString)) + return _CONDITIONAL; + if ("CONFIRM".equals(codeString)) + return CONFIRM; + if ("NOTIFY".equals(codeString)) + return NOTIFY; + if ("NOSUB".equals(codeString)) + return NOSUB; + if ("UNCOND".equals(codeString)) + return UNCOND; + throw new FHIRException("Unknown V3SubstitutionCondition code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _CONDITIONAL: return "_Conditional"; + case CONFIRM: return "CONFIRM"; + case NOTIFY: return "NOTIFY"; + case NOSUB: return "NOSUB"; + case UNCOND: return "UNCOND"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/SubstitutionCondition"; + } + public String getDefinition() { + switch (this) { + case _CONDITIONAL: return "Some conditions may be attached to an allowable substitution. An allowable substitution is based on a match to any other attributes that may be specified."; + case CONFIRM: return "Confirmation with Contact Person prior to making any substitutions has or will occur."; + case NOTIFY: return "Notification to the Contact Person, prior to substitution and through normal institutional procedures, has or will be made."; + case NOSUB: return "Substitution is not permitted."; + case UNCOND: return "No conditions are required."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _CONDITIONAL: return "Conditional"; + case CONFIRM: return "Confirm first"; + case NOTIFY: return "Notify first"; + case NOSUB: return "No substitution"; + case UNCOND: return "Unconditional"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstitutionConditionEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstitutionConditionEnumFactory.java new file mode 100644 index 00000000000..403d0ee4499 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3SubstitutionConditionEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3SubstitutionConditionEnumFactory implements EnumFactory { + + public V3SubstitutionCondition fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_Conditional".equals(codeString)) + return V3SubstitutionCondition._CONDITIONAL; + if ("CONFIRM".equals(codeString)) + return V3SubstitutionCondition.CONFIRM; + if ("NOTIFY".equals(codeString)) + return V3SubstitutionCondition.NOTIFY; + if ("NOSUB".equals(codeString)) + return V3SubstitutionCondition.NOSUB; + if ("UNCOND".equals(codeString)) + return V3SubstitutionCondition.UNCOND; + throw new IllegalArgumentException("Unknown V3SubstitutionCondition code '"+codeString+"'"); + } + + public String toCode(V3SubstitutionCondition code) { + if (code == V3SubstitutionCondition._CONDITIONAL) + return "_Conditional"; + if (code == V3SubstitutionCondition.CONFIRM) + return "CONFIRM"; + if (code == V3SubstitutionCondition.NOTIFY) + return "NOTIFY"; + if (code == V3SubstitutionCondition.NOSUB) + return "NOSUB"; + if (code == V3SubstitutionCondition.UNCOND) + return "UNCOND"; + return "?"; + } + + public String toSystem(V3SubstitutionCondition code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellHorizontalAlign.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellHorizontalAlign.java new file mode 100644 index 00000000000..b1ab20c0db4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellHorizontalAlign.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableCellHorizontalAlign { + + /** + * center + */ + CENTER, + /** + * char + */ + CHAR, + /** + * justify + */ + JUSTIFY, + /** + * left + */ + LEFT, + /** + * right + */ + RIGHT, + /** + * added to help the parsers + */ + NULL; + public static V3TableCellHorizontalAlign fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("center".equals(codeString)) + return CENTER; + if ("char".equals(codeString)) + return CHAR; + if ("justify".equals(codeString)) + return JUSTIFY; + if ("left".equals(codeString)) + return LEFT; + if ("right".equals(codeString)) + return RIGHT; + throw new FHIRException("Unknown V3TableCellHorizontalAlign code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CENTER: return "center"; + case CHAR: return "char"; + case JUSTIFY: return "justify"; + case LEFT: return "left"; + case RIGHT: return "right"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableCellHorizontalAlign"; + } + public String getDefinition() { + switch (this) { + case CENTER: return "center"; + case CHAR: return "char"; + case JUSTIFY: return "justify"; + case LEFT: return "left"; + case RIGHT: return "right"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CENTER: return "center"; + case CHAR: return "char"; + case JUSTIFY: return "justify"; + case LEFT: return "left"; + case RIGHT: return "right"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellHorizontalAlignEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellHorizontalAlignEnumFactory.java new file mode 100644 index 00000000000..d4b85f100cc --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellHorizontalAlignEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TableCellHorizontalAlignEnumFactory implements EnumFactory { + + public V3TableCellHorizontalAlign fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("center".equals(codeString)) + return V3TableCellHorizontalAlign.CENTER; + if ("char".equals(codeString)) + return V3TableCellHorizontalAlign.CHAR; + if ("justify".equals(codeString)) + return V3TableCellHorizontalAlign.JUSTIFY; + if ("left".equals(codeString)) + return V3TableCellHorizontalAlign.LEFT; + if ("right".equals(codeString)) + return V3TableCellHorizontalAlign.RIGHT; + throw new IllegalArgumentException("Unknown V3TableCellHorizontalAlign code '"+codeString+"'"); + } + + public String toCode(V3TableCellHorizontalAlign code) { + if (code == V3TableCellHorizontalAlign.CENTER) + return "center"; + if (code == V3TableCellHorizontalAlign.CHAR) + return "char"; + if (code == V3TableCellHorizontalAlign.JUSTIFY) + return "justify"; + if (code == V3TableCellHorizontalAlign.LEFT) + return "left"; + if (code == V3TableCellHorizontalAlign.RIGHT) + return "right"; + return "?"; + } + + public String toSystem(V3TableCellHorizontalAlign code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellScope.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellScope.java new file mode 100644 index 00000000000..17cbeaeb9ba --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellScope.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableCellScope { + + /** + * col + */ + COL, + /** + * colgroup + */ + COLGROUP, + /** + * row + */ + ROW, + /** + * rowgroup + */ + ROWGROUP, + /** + * added to help the parsers + */ + NULL; + public static V3TableCellScope fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("col".equals(codeString)) + return COL; + if ("colgroup".equals(codeString)) + return COLGROUP; + if ("row".equals(codeString)) + return ROW; + if ("rowgroup".equals(codeString)) + return ROWGROUP; + throw new FHIRException("Unknown V3TableCellScope code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COL: return "col"; + case COLGROUP: return "colgroup"; + case ROW: return "row"; + case ROWGROUP: return "rowgroup"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableCellScope"; + } + public String getDefinition() { + switch (this) { + case COL: return "col"; + case COLGROUP: return "colgroup"; + case ROW: return "row"; + case ROWGROUP: return "rowgroup"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COL: return "col"; + case COLGROUP: return "colgroup"; + case ROW: return "row"; + case ROWGROUP: return "rowgroup"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellScopeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellScopeEnumFactory.java new file mode 100644 index 00000000000..1fae21af491 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellScopeEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TableCellScopeEnumFactory implements EnumFactory { + + public V3TableCellScope fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("col".equals(codeString)) + return V3TableCellScope.COL; + if ("colgroup".equals(codeString)) + return V3TableCellScope.COLGROUP; + if ("row".equals(codeString)) + return V3TableCellScope.ROW; + if ("rowgroup".equals(codeString)) + return V3TableCellScope.ROWGROUP; + throw new IllegalArgumentException("Unknown V3TableCellScope code '"+codeString+"'"); + } + + public String toCode(V3TableCellScope code) { + if (code == V3TableCellScope.COL) + return "col"; + if (code == V3TableCellScope.COLGROUP) + return "colgroup"; + if (code == V3TableCellScope.ROW) + return "row"; + if (code == V3TableCellScope.ROWGROUP) + return "rowgroup"; + return "?"; + } + + public String toSystem(V3TableCellScope code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellVerticalAlign.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellVerticalAlign.java new file mode 100644 index 00000000000..b1db62459e3 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellVerticalAlign.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableCellVerticalAlign { + + /** + * baseline + */ + BASELINE, + /** + * bottom + */ + BOTTOM, + /** + * middle + */ + MIDDLE, + /** + * top + */ + TOP, + /** + * added to help the parsers + */ + NULL; + public static V3TableCellVerticalAlign fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("baseline".equals(codeString)) + return BASELINE; + if ("bottom".equals(codeString)) + return BOTTOM; + if ("middle".equals(codeString)) + return MIDDLE; + if ("top".equals(codeString)) + return TOP; + throw new FHIRException("Unknown V3TableCellVerticalAlign code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BASELINE: return "baseline"; + case BOTTOM: return "bottom"; + case MIDDLE: return "middle"; + case TOP: return "top"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableCellVerticalAlign"; + } + public String getDefinition() { + switch (this) { + case BASELINE: return "baseline"; + case BOTTOM: return "bottom"; + case MIDDLE: return "middle"; + case TOP: return "top"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BASELINE: return "baseline"; + case BOTTOM: return "bottom"; + case MIDDLE: return "middle"; + case TOP: return "top"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellVerticalAlignEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellVerticalAlignEnumFactory.java new file mode 100644 index 00000000000..05ef464afad --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableCellVerticalAlignEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TableCellVerticalAlignEnumFactory implements EnumFactory { + + public V3TableCellVerticalAlign fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("baseline".equals(codeString)) + return V3TableCellVerticalAlign.BASELINE; + if ("bottom".equals(codeString)) + return V3TableCellVerticalAlign.BOTTOM; + if ("middle".equals(codeString)) + return V3TableCellVerticalAlign.MIDDLE; + if ("top".equals(codeString)) + return V3TableCellVerticalAlign.TOP; + throw new IllegalArgumentException("Unknown V3TableCellVerticalAlign code '"+codeString+"'"); + } + + public String toCode(V3TableCellVerticalAlign code) { + if (code == V3TableCellVerticalAlign.BASELINE) + return "baseline"; + if (code == V3TableCellVerticalAlign.BOTTOM) + return "bottom"; + if (code == V3TableCellVerticalAlign.MIDDLE) + return "middle"; + if (code == V3TableCellVerticalAlign.TOP) + return "top"; + return "?"; + } + + public String toSystem(V3TableCellVerticalAlign code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableFrame.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableFrame.java new file mode 100644 index 00000000000..ac67aa72da7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableFrame.java @@ -0,0 +1,150 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableFrame { + + /** + * above + */ + ABOVE, + /** + * below + */ + BELOW, + /** + * border + */ + BORDER, + /** + * box + */ + BOX, + /** + * hsides + */ + HSIDES, + /** + * lhs + */ + LHS, + /** + * rhs + */ + RHS, + /** + * void + */ + VOID, + /** + * vsides + */ + VSIDES, + /** + * added to help the parsers + */ + NULL; + public static V3TableFrame fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("above".equals(codeString)) + return ABOVE; + if ("below".equals(codeString)) + return BELOW; + if ("border".equals(codeString)) + return BORDER; + if ("box".equals(codeString)) + return BOX; + if ("hsides".equals(codeString)) + return HSIDES; + if ("lhs".equals(codeString)) + return LHS; + if ("rhs".equals(codeString)) + return RHS; + if ("void".equals(codeString)) + return VOID; + if ("vsides".equals(codeString)) + return VSIDES; + throw new FHIRException("Unknown V3TableFrame code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ABOVE: return "above"; + case BELOW: return "below"; + case BORDER: return "border"; + case BOX: return "box"; + case HSIDES: return "hsides"; + case LHS: return "lhs"; + case RHS: return "rhs"; + case VOID: return "void"; + case VSIDES: return "vsides"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableFrame"; + } + public String getDefinition() { + switch (this) { + case ABOVE: return "above"; + case BELOW: return "below"; + case BORDER: return "border"; + case BOX: return "box"; + case HSIDES: return "hsides"; + case LHS: return "lhs"; + case RHS: return "rhs"; + case VOID: return "void"; + case VSIDES: return "vsides"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ABOVE: return "above"; + case BELOW: return "below"; + case BORDER: return "border"; + case BOX: return "box"; + case HSIDES: return "hsides"; + case LHS: return "lhs"; + case RHS: return "rhs"; + case VOID: return "void"; + case VSIDES: return "vsides"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableFrameEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableFrameEnumFactory.java new file mode 100644 index 00000000000..eed0afda71f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableFrameEnumFactory.java @@ -0,0 +1,90 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TableFrameEnumFactory implements EnumFactory { + + public V3TableFrame fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("above".equals(codeString)) + return V3TableFrame.ABOVE; + if ("below".equals(codeString)) + return V3TableFrame.BELOW; + if ("border".equals(codeString)) + return V3TableFrame.BORDER; + if ("box".equals(codeString)) + return V3TableFrame.BOX; + if ("hsides".equals(codeString)) + return V3TableFrame.HSIDES; + if ("lhs".equals(codeString)) + return V3TableFrame.LHS; + if ("rhs".equals(codeString)) + return V3TableFrame.RHS; + if ("void".equals(codeString)) + return V3TableFrame.VOID; + if ("vsides".equals(codeString)) + return V3TableFrame.VSIDES; + throw new IllegalArgumentException("Unknown V3TableFrame code '"+codeString+"'"); + } + + public String toCode(V3TableFrame code) { + if (code == V3TableFrame.ABOVE) + return "above"; + if (code == V3TableFrame.BELOW) + return "below"; + if (code == V3TableFrame.BORDER) + return "border"; + if (code == V3TableFrame.BOX) + return "box"; + if (code == V3TableFrame.HSIDES) + return "hsides"; + if (code == V3TableFrame.LHS) + return "lhs"; + if (code == V3TableFrame.RHS) + return "rhs"; + if (code == V3TableFrame.VOID) + return "void"; + if (code == V3TableFrame.VSIDES) + return "vsides"; + return "?"; + } + + public String toSystem(V3TableFrame code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableRules.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableRules.java new file mode 100644 index 00000000000..46e4a66e269 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableRules.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TableRules { + + /** + * all + */ + ALL, + /** + * cols + */ + COLS, + /** + * groups + */ + GROUPS, + /** + * none + */ + NONE, + /** + * rows + */ + ROWS, + /** + * added to help the parsers + */ + NULL; + public static V3TableRules fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return ALL; + if ("cols".equals(codeString)) + return COLS; + if ("groups".equals(codeString)) + return GROUPS; + if ("none".equals(codeString)) + return NONE; + if ("rows".equals(codeString)) + return ROWS; + throw new FHIRException("Unknown V3TableRules code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ALL: return "all"; + case COLS: return "cols"; + case GROUPS: return "groups"; + case NONE: return "none"; + case ROWS: return "rows"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TableRules"; + } + public String getDefinition() { + switch (this) { + case ALL: return "all"; + case COLS: return "cols"; + case GROUPS: return "groups"; + case NONE: return "none"; + case ROWS: return "rows"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ALL: return "all"; + case COLS: return "cols"; + case GROUPS: return "groups"; + case NONE: return "none"; + case ROWS: return "rows"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableRulesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableRulesEnumFactory.java new file mode 100644 index 00000000000..e7d5fc49c75 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TableRulesEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TableRulesEnumFactory implements EnumFactory { + + public V3TableRules fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("all".equals(codeString)) + return V3TableRules.ALL; + if ("cols".equals(codeString)) + return V3TableRules.COLS; + if ("groups".equals(codeString)) + return V3TableRules.GROUPS; + if ("none".equals(codeString)) + return V3TableRules.NONE; + if ("rows".equals(codeString)) + return V3TableRules.ROWS; + throw new IllegalArgumentException("Unknown V3TableRules code '"+codeString+"'"); + } + + public String toCode(V3TableRules code) { + if (code == V3TableRules.ALL) + return "all"; + if (code == V3TableRules.COLS) + return "cols"; + if (code == V3TableRules.GROUPS) + return "groups"; + if (code == V3TableRules.NONE) + return "none"; + if (code == V3TableRules.ROWS) + return "rows"; + return "?"; + } + + public String toSystem(V3TableRules code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TargetAwareness.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TargetAwareness.java new file mode 100644 index 00000000000..916218c8c34 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TargetAwareness.java @@ -0,0 +1,123 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TargetAwareness { + + /** + * Target person has been informed about the issue but currently denies it. + */ + D, + /** + * Target person is fully aware of the issue. + */ + F, + /** + * Target person is not capable of comprehending the issue. + */ + I, + /** + * Target person is marginally aware of the issue. + */ + M, + /** + * Target person is partially aware of the issue. + */ + P, + /** + * Target person has not yet been informed of the issue. + */ + U, + /** + * added to help the parsers + */ + NULL; + public static V3TargetAwareness fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return D; + if ("F".equals(codeString)) + return F; + if ("I".equals(codeString)) + return I; + if ("M".equals(codeString)) + return M; + if ("P".equals(codeString)) + return P; + if ("U".equals(codeString)) + return U; + throw new FHIRException("Unknown V3TargetAwareness code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case D: return "D"; + case F: return "F"; + case I: return "I"; + case M: return "M"; + case P: return "P"; + case U: return "U"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TargetAwareness"; + } + public String getDefinition() { + switch (this) { + case D: return "Target person has been informed about the issue but currently denies it."; + case F: return "Target person is fully aware of the issue."; + case I: return "Target person is not capable of comprehending the issue."; + case M: return "Target person is marginally aware of the issue."; + case P: return "Target person is partially aware of the issue."; + case U: return "Target person has not yet been informed of the issue."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case D: return "denying"; + case F: return "full awareness"; + case I: return "incapable"; + case M: return "marginal"; + case P: return "partial"; + case U: return "uninformed"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TargetAwarenessEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TargetAwarenessEnumFactory.java new file mode 100644 index 00000000000..b61516d42a7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TargetAwarenessEnumFactory.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TargetAwarenessEnumFactory implements EnumFactory { + + public V3TargetAwareness fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("D".equals(codeString)) + return V3TargetAwareness.D; + if ("F".equals(codeString)) + return V3TargetAwareness.F; + if ("I".equals(codeString)) + return V3TargetAwareness.I; + if ("M".equals(codeString)) + return V3TargetAwareness.M; + if ("P".equals(codeString)) + return V3TargetAwareness.P; + if ("U".equals(codeString)) + return V3TargetAwareness.U; + throw new IllegalArgumentException("Unknown V3TargetAwareness code '"+codeString+"'"); + } + + public String toCode(V3TargetAwareness code) { + if (code == V3TargetAwareness.D) + return "D"; + if (code == V3TargetAwareness.F) + return "F"; + if (code == V3TargetAwareness.I) + return "I"; + if (code == V3TargetAwareness.M) + return "M"; + if (code == V3TargetAwareness.P) + return "P"; + if (code == V3TargetAwareness.U) + return "U"; + return "?"; + } + + public String toSystem(V3TargetAwareness code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TelecommunicationCapabilities.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TelecommunicationCapabilities.java new file mode 100644 index 00000000000..b399efd8490 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TelecommunicationCapabilities.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TelecommunicationCapabilities { + + /** + * Description: This device can receive data calls (i.e. modem). + */ + DATA, + /** + * Description: This device can receive faxes. + */ + FAX, + /** + * Description: This device can receive SMS messages. + */ + SMS, + /** + * Description: This device is a text telephone. + */ + TTY, + /** + * Description: This device can receive voice calls (i.e. talking to another person, or a recording device, or a voice activated computer). + */ + VOICE, + /** + * added to help the parsers + */ + NULL; + public static V3TelecommunicationCapabilities fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("data".equals(codeString)) + return DATA; + if ("fax".equals(codeString)) + return FAX; + if ("sms".equals(codeString)) + return SMS; + if ("tty".equals(codeString)) + return TTY; + if ("voice".equals(codeString)) + return VOICE; + throw new FHIRException("Unknown V3TelecommunicationCapabilities code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DATA: return "data"; + case FAX: return "fax"; + case SMS: return "sms"; + case TTY: return "tty"; + case VOICE: return "voice"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TelecommunicationCapabilities"; + } + public String getDefinition() { + switch (this) { + case DATA: return "Description: This device can receive data calls (i.e. modem)."; + case FAX: return "Description: This device can receive faxes."; + case SMS: return "Description: This device can receive SMS messages."; + case TTY: return "Description: This device is a text telephone."; + case VOICE: return "Description: This device can receive voice calls (i.e. talking to another person, or a recording device, or a voice activated computer)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DATA: return "data"; + case FAX: return "fax"; + case SMS: return "sms"; + case TTY: return "text"; + case VOICE: return "voice"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TelecommunicationCapabilitiesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TelecommunicationCapabilitiesEnumFactory.java new file mode 100644 index 00000000000..b84b8b11703 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TelecommunicationCapabilitiesEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TelecommunicationCapabilitiesEnumFactory implements EnumFactory { + + public V3TelecommunicationCapabilities fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("data".equals(codeString)) + return V3TelecommunicationCapabilities.DATA; + if ("fax".equals(codeString)) + return V3TelecommunicationCapabilities.FAX; + if ("sms".equals(codeString)) + return V3TelecommunicationCapabilities.SMS; + if ("tty".equals(codeString)) + return V3TelecommunicationCapabilities.TTY; + if ("voice".equals(codeString)) + return V3TelecommunicationCapabilities.VOICE; + throw new IllegalArgumentException("Unknown V3TelecommunicationCapabilities code '"+codeString+"'"); + } + + public String toCode(V3TelecommunicationCapabilities code) { + if (code == V3TelecommunicationCapabilities.DATA) + return "data"; + if (code == V3TelecommunicationCapabilities.FAX) + return "fax"; + if (code == V3TelecommunicationCapabilities.SMS) + return "sms"; + if (code == V3TelecommunicationCapabilities.TTY) + return "tty"; + if (code == V3TelecommunicationCapabilities.VOICE) + return "voice"; + return "?"; + } + + public String toSystem(V3TelecommunicationCapabilities code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TimingEvent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TimingEvent.java new file mode 100644 index 00000000000..bf309346844 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TimingEvent.java @@ -0,0 +1,240 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TimingEvent { + + /** + * before meal (from lat. ante cibus) + */ + AC, + /** + * before lunch (from lat. ante cibus diurnus) + */ + ACD, + /** + * before breakfast (from lat. ante cibus matutinus) + */ + ACM, + /** + * before dinner (from lat. ante cibus vespertinus) + */ + ACV, + /** + * Description: meal (from lat. ante cibus) + */ + C, + /** + * Description: lunch (from lat. cibus diurnus) + */ + CD, + /** + * Description: breakfast (from lat. cibus matutinus) + */ + CM, + /** + * Description: dinner (from lat. cibus vespertinus) + */ + CV, + /** + * Description: Prior to beginning a regular period of extended sleep (this would exclude naps). Note that this might occur at different times of day depending on a person's regular sleep schedule. + */ + HS, + /** + * between meals (from lat. inter cibus) + */ + IC, + /** + * between lunch and dinner + */ + ICD, + /** + * between breakfast and lunch + */ + ICM, + /** + * between dinner and the hour of sleep + */ + ICV, + /** + * after meal (from lat. post cibus) + */ + PC, + /** + * after lunch (from lat. post cibus diurnus) + */ + PCD, + /** + * after breakfast (from lat. post cibus matutinus) + */ + PCM, + /** + * after dinner (from lat. post cibus vespertinus) + */ + PCV, + /** + * Description: Upon waking up from a regular period of sleep, in order to start regular activities (this would exclude waking up from a nap or temporarily waking up during a period of sleep) + + + Usage Notes: e.g. + + Take pulse rate on waking in management of thyrotoxicosis. + + Take BP on waking in management of hypertension + + Take basal body temperature on waking in establishing date of ovulation + */ + WAKE, + /** + * added to help the parsers + */ + NULL; + public static V3TimingEvent fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return AC; + if ("ACD".equals(codeString)) + return ACD; + if ("ACM".equals(codeString)) + return ACM; + if ("ACV".equals(codeString)) + return ACV; + if ("C".equals(codeString)) + return C; + if ("CD".equals(codeString)) + return CD; + if ("CM".equals(codeString)) + return CM; + if ("CV".equals(codeString)) + return CV; + if ("HS".equals(codeString)) + return HS; + if ("IC".equals(codeString)) + return IC; + if ("ICD".equals(codeString)) + return ICD; + if ("ICM".equals(codeString)) + return ICM; + if ("ICV".equals(codeString)) + return ICV; + if ("PC".equals(codeString)) + return PC; + if ("PCD".equals(codeString)) + return PCD; + if ("PCM".equals(codeString)) + return PCM; + if ("PCV".equals(codeString)) + return PCV; + if ("WAKE".equals(codeString)) + return WAKE; + throw new FHIRException("Unknown V3TimingEvent code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AC: return "AC"; + case ACD: return "ACD"; + case ACM: return "ACM"; + case ACV: return "ACV"; + case C: return "C"; + case CD: return "CD"; + case CM: return "CM"; + case CV: return "CV"; + case HS: return "HS"; + case IC: return "IC"; + case ICD: return "ICD"; + case ICM: return "ICM"; + case ICV: return "ICV"; + case PC: return "PC"; + case PCD: return "PCD"; + case PCM: return "PCM"; + case PCV: return "PCV"; + case WAKE: return "WAKE"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TimingEvent"; + } + public String getDefinition() { + switch (this) { + case AC: return "before meal (from lat. ante cibus)"; + case ACD: return "before lunch (from lat. ante cibus diurnus)"; + case ACM: return "before breakfast (from lat. ante cibus matutinus)"; + case ACV: return "before dinner (from lat. ante cibus vespertinus)"; + case C: return "Description: meal (from lat. ante cibus)"; + case CD: return "Description: lunch (from lat. cibus diurnus)"; + case CM: return "Description: breakfast (from lat. cibus matutinus)"; + case CV: return "Description: dinner (from lat. cibus vespertinus)"; + case HS: return "Description: Prior to beginning a regular period of extended sleep (this would exclude naps). Note that this might occur at different times of day depending on a person's regular sleep schedule."; + case IC: return "between meals (from lat. inter cibus)"; + case ICD: return "between lunch and dinner"; + case ICM: return "between breakfast and lunch"; + case ICV: return "between dinner and the hour of sleep"; + case PC: return "after meal (from lat. post cibus)"; + case PCD: return "after lunch (from lat. post cibus diurnus)"; + case PCM: return "after breakfast (from lat. post cibus matutinus)"; + case PCV: return "after dinner (from lat. post cibus vespertinus)"; + case WAKE: return "Description: Upon waking up from a regular period of sleep, in order to start regular activities (this would exclude waking up from a nap or temporarily waking up during a period of sleep)\r\n\n \n Usage Notes: e.g.\r\n\n Take pulse rate on waking in management of thyrotoxicosis.\r\n\n Take BP on waking in management of hypertension\r\n\n Take basal body temperature on waking in establishing date of ovulation"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AC: return "AC"; + case ACD: return "ACD"; + case ACM: return "ACM"; + case ACV: return "ACV"; + case C: return "C"; + case CD: return "CD"; + case CM: return "CM"; + case CV: return "CV"; + case HS: return "HS"; + case IC: return "IC"; + case ICD: return "ICD"; + case ICM: return "ICM"; + case ICV: return "ICV"; + case PC: return "PC"; + case PCD: return "PCD"; + case PCM: return "PCM"; + case PCV: return "PCV"; + case WAKE: return "WAKE"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TimingEventEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TimingEventEnumFactory.java new file mode 100644 index 00000000000..7221fd4fa0b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TimingEventEnumFactory.java @@ -0,0 +1,126 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TimingEventEnumFactory implements EnumFactory { + + public V3TimingEvent fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AC".equals(codeString)) + return V3TimingEvent.AC; + if ("ACD".equals(codeString)) + return V3TimingEvent.ACD; + if ("ACM".equals(codeString)) + return V3TimingEvent.ACM; + if ("ACV".equals(codeString)) + return V3TimingEvent.ACV; + if ("C".equals(codeString)) + return V3TimingEvent.C; + if ("CD".equals(codeString)) + return V3TimingEvent.CD; + if ("CM".equals(codeString)) + return V3TimingEvent.CM; + if ("CV".equals(codeString)) + return V3TimingEvent.CV; + if ("HS".equals(codeString)) + return V3TimingEvent.HS; + if ("IC".equals(codeString)) + return V3TimingEvent.IC; + if ("ICD".equals(codeString)) + return V3TimingEvent.ICD; + if ("ICM".equals(codeString)) + return V3TimingEvent.ICM; + if ("ICV".equals(codeString)) + return V3TimingEvent.ICV; + if ("PC".equals(codeString)) + return V3TimingEvent.PC; + if ("PCD".equals(codeString)) + return V3TimingEvent.PCD; + if ("PCM".equals(codeString)) + return V3TimingEvent.PCM; + if ("PCV".equals(codeString)) + return V3TimingEvent.PCV; + if ("WAKE".equals(codeString)) + return V3TimingEvent.WAKE; + throw new IllegalArgumentException("Unknown V3TimingEvent code '"+codeString+"'"); + } + + public String toCode(V3TimingEvent code) { + if (code == V3TimingEvent.AC) + return "AC"; + if (code == V3TimingEvent.ACD) + return "ACD"; + if (code == V3TimingEvent.ACM) + return "ACM"; + if (code == V3TimingEvent.ACV) + return "ACV"; + if (code == V3TimingEvent.C) + return "C"; + if (code == V3TimingEvent.CD) + return "CD"; + if (code == V3TimingEvent.CM) + return "CM"; + if (code == V3TimingEvent.CV) + return "CV"; + if (code == V3TimingEvent.HS) + return "HS"; + if (code == V3TimingEvent.IC) + return "IC"; + if (code == V3TimingEvent.ICD) + return "ICD"; + if (code == V3TimingEvent.ICM) + return "ICM"; + if (code == V3TimingEvent.ICV) + return "ICV"; + if (code == V3TimingEvent.PC) + return "PC"; + if (code == V3TimingEvent.PCD) + return "PCD"; + if (code == V3TimingEvent.PCM) + return "PCM"; + if (code == V3TimingEvent.PCV) + return "PCV"; + if (code == V3TimingEvent.WAKE) + return "WAKE"; + return "?"; + } + + public String toSystem(V3TimingEvent code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TransmissionRelationshipTypeCode.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TransmissionRelationshipTypeCode.java new file mode 100644 index 00000000000..5033ef373a0 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TransmissionRelationshipTypeCode.java @@ -0,0 +1,78 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TransmissionRelationshipTypeCode { + + /** + * Description:A transmission relationship indicating that the source transmission follows the target transmission. + */ + SEQL, + /** + * added to help the parsers + */ + NULL; + public static V3TransmissionRelationshipTypeCode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return SEQL; + throw new FHIRException("Unknown V3TransmissionRelationshipTypeCode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SEQL: return "SEQL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TransmissionRelationshipTypeCode"; + } + public String getDefinition() { + switch (this) { + case SEQL: return "Description:A transmission relationship indicating that the source transmission follows the target transmission."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SEQL: return "sequence"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TransmissionRelationshipTypeCodeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TransmissionRelationshipTypeCodeEnumFactory.java new file mode 100644 index 00000000000..f02dfd1f194 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TransmissionRelationshipTypeCodeEnumFactory.java @@ -0,0 +1,58 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TransmissionRelationshipTypeCodeEnumFactory implements EnumFactory { + + public V3TransmissionRelationshipTypeCode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("SEQL".equals(codeString)) + return V3TransmissionRelationshipTypeCode.SEQL; + throw new IllegalArgumentException("Unknown V3TransmissionRelationshipTypeCode code '"+codeString+"'"); + } + + public String toCode(V3TransmissionRelationshipTypeCode code) { + if (code == V3TransmissionRelationshipTypeCode.SEQL) + return "SEQL"; + return "?"; + } + + public String toSystem(V3TransmissionRelationshipTypeCode code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TribalEntityUS.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TribalEntityUS.java new file mode 100644 index 00000000000..356d68b840d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TribalEntityUS.java @@ -0,0 +1,5181 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3TribalEntityUS { + + /** + * NATIVE ENTITIES WITHIN THE STATE OF ALASKA RECOGNIZED AND ELIGIBLE TO RECEIVE SERVICES FROM THE UNITED STATES BUREAU OF INDIAN AFFAIRS + */ + _NATIVEENTITYALASKA, + /** + * Village of Afognak + */ + _338, + /** + * Agdaagux Tribe of King Cove + */ + _339, + /** + * Native Village of Akhiok + */ + _340, + /** + * Akiachak Native Community + */ + _341, + /** + * Akiak Native Community + */ + _342, + /** + * Native Village of Akutan + */ + _343, + /** + * Village of Alakanuk + */ + _344, + /** + * Alatna Village + */ + _345, + /** + * Native Village of Aleknagik + */ + _346, + /** + * Algaaciq Native Village (St. Mary's) + */ + _347, + /** + * Allakaket Village + */ + _348, + /** + * Native Village of Ambler + */ + _349, + /** + * Village of Anaktuvuk Pass + */ + _350, + /** + * Yupiit of Andreafski + */ + _351, + /** + * Angoon Community Association + */ + _352, + /** + * Village of Aniak + */ + _353, + /** + * Anvik Village + */ + _354, + /** + * Arctic Village (See Native Village of Venetie Trib + */ + _355, + /** + * Asa carsarmiut Tribe (formerly Native Village of M + */ + _356, + /** + * Native Village of Atka + */ + _357, + /** + * Village of Atmautluak + */ + _358, + /** + * Atqasuk Village (Atkasook) + */ + _359, + /** + * Native Village of Barrow Inupiat Traditional Gover + */ + _360, + /** + * Beaver Village + */ + _361, + /** + * Native Village of Belkofski + */ + _362, + /** + * Village of Bill Moore's Slough + */ + _363, + /** + * Birch Creek Tribe + */ + _364, + /** + * Native Village of Brevig Mission + */ + _365, + /** + * Native Village of Buckland + */ + _366, + /** + * Native Village of Cantwell + */ + _367, + /** + * Native Village of Chanega (aka Chenega) + */ + _368, + /** + * Chalkyitsik Village + */ + _369, + /** + * Village of Chefornak + */ + _370, + /** + * Chevak Native Village + */ + _371, + /** + * Chickaloon Native Village + */ + _372, + /** + * Native Village of Chignik + */ + _373, + /** + * Native Village of Chignik Lagoon + */ + _374, + /** + * Chignik Lake Village + */ + _375, + /** + * Chilkat Indian Village (Klukwan) + */ + _376, + /** + * Chilkoot Indian Association (Haines) + */ + _377, + /** + * Chinik Eskimo Community (Golovin) + */ + _378, + /** + * Native Village of Chistochina + */ + _379, + /** + * Native Village of Chitina + */ + _380, + /** + * Native Village of Chuathbaluk (Russian Mission, Ku + */ + _381, + /** + * Chuloonawick Native Village + */ + _382, + /** + * Circle Native Community + */ + _383, + /** + * Village of Clark's Point + */ + _384, + /** + * Native Village of Council + */ + _385, + /** + * Craig Community Association + */ + _386, + /** + * Village of Crooked Creek + */ + _387, + /** + * Curyung Tribal Council (formerly Native Village of + */ + _388, + /** + * Native Village of Deering + */ + _389, + /** + * Native Village of Diomede (aka Inalik) + */ + _390, + /** + * Village of Dot Lake + */ + _391, + /** + * Douglas Indian Association + */ + _392, + /** + * Native Village of Eagle + */ + _393, + /** + * Native Village of Eek + */ + _394, + /** + * Egegik Village + */ + _395, + /** + * Eklutna Native Village + */ + _396, + /** + * Native Village of Ekuk + */ + _397, + /** + * Ekwok Village + */ + _398, + /** + * Native Village of Elim + */ + _399, + /** + * Emmonak Village + */ + _400, + /** + * Evansville Village (aka Bettles Field) + */ + _401, + /** + * Native Village of Eyak (Cordova) + */ + _402, + /** + * Native Village of False Pass + */ + _403, + /** + * Native Village of Fort Yukon + */ + _404, + /** + * Native Village of Gakona + */ + _405, + /** + * Galena Village (aka Louden Village) + */ + _406, + /** + * Native Village of Gambell + */ + _407, + /** + * Native Village of Georgetown + */ + _408, + /** + * Native Village of Goodnews Bay + */ + _409, + /** + * Organized Village of Grayling (aka Holikachuk) + */ + _410, + /** + * Gulkana Village + */ + _411, + /** + * Native Village of Hamilton + */ + _412, + /** + * Healy Lake Village + */ + _413, + /** + * Holy Cross Village + */ + _414, + /** + * Hoonah Indian Association + */ + _415, + /** + * Native Village of Hooper Bay + */ + _416, + /** + * Hughes Village + */ + _417, + /** + * Huslia Village + */ + _418, + /** + * Hydaburg Cooperative Association + */ + _419, + /** + * Igiugig Village + */ + _420, + /** + * Village of Iliamna + */ + _421, + /** + * Inupiat Community of the Arctic Slope + */ + _422, + /** + * Iqurmuit Traditional Council (formerly Native Vill + */ + _423, + /** + * Ivanoff Bay Village + */ + _424, + /** + * Kaguyak Village + */ + _425, + /** + * Organized Village of Kake + */ + _426, + /** + * Kaktovik Village (aka Barter Island) + */ + _427, + /** + * Village of Kalskag + */ + _428, + /** + * Village of Kaltag + */ + _429, + /** + * Native Village of Kanatak + */ + _430, + /** + * Native Village of Karluk + */ + _431, + /** + * Organized Village of Kasaan + */ + _432, + /** + * Native Village of Kasigluk + */ + _433, + /** + * Kenaitze Indian Tribe + */ + _434, + /** + * Ketchikan Indian Corporation + */ + _435, + /** + * Native Village of Kiana + */ + _436, + /** + * King Island Native Community + */ + _437, + /** + * King Salmon Tribe + */ + _438, + /** + * Native Village of Kipnuk + */ + _439, + /** + * Native Village of Kivalina + */ + _440, + /** + * Klawock Cooperative Association + */ + _441, + /** + * Native Village of Kluti Kaah (aka Copper Center) + */ + _442, + /** + * Knik Tribe + */ + _443, + /** + * Native Village of Kobuk + */ + _444, + /** + * Kokhanok Village + */ + _445, + /** + * Native Village of Kongiganak + */ + _446, + /** + * Village of Kotlik + */ + _447, + /** + * Native Village of Kotzebue + */ + _448, + /** + * Native Village of Koyuk + */ + _449, + /** + * Koyukuk Native Village + */ + _450, + /** + * Organized Village of Kwethluk + */ + _451, + /** + * Native Village of Kwigillingok + */ + _452, + /** + * Native Village of Kwinhagak (aka Quinhagak) + */ + _453, + /** + * Native Village of Larsen Bay + */ + _454, + /** + * Levelock Village + */ + _455, + /** + * Lesnoi Village (aka Woody Island) + */ + _456, + /** + * Lime Village + */ + _457, + /** + * Village of Lower Kalskag + */ + _458, + /** + * Manley Hot Springs Village + */ + _459, + /** + * Manokotak Village + */ + _460, + /** + * Native Village of Marshall (aka Fortuna Ledge) + */ + _461, + /** + * Native Village of Mary's Igloo + */ + _462, + /** + * McGrath Native Village + */ + _463, + /** + * Native Village of Mekoryuk + */ + _464, + /** + * Mentasta Traditional Council + */ + _465, + /** + * Metlakatla Indian Community, Annette Island Reserv + */ + _466, + /** + * Native Village of Minto + */ + _467, + /** + * Naknek Native Village + */ + _468, + /** + * Native Village of Nanwalek (aka English Bay) + */ + _469, + /** + * Native Village of Napaimute + */ + _470, + /** + * Native Village of Napakiak + */ + _471, + /** + * Native Village of Napaskiak + */ + _472, + /** + * Native Village of Nelson Lagoon + */ + _473, + /** + * Nenana Native Association + */ + _474, + /** + * New Koliganek Village Council (formerly Koliganek + */ + _475, + /** + * New Stuyahok Village + */ + _476, + /** + * Newhalen Village + */ + _477, + /** + * Newtok Village + */ + _478, + /** + * Native Village of Nightmute + */ + _479, + /** + * Nikolai Village + */ + _480, + /** + * Native Village of Nikolski + */ + _481, + /** + * Ninilchik Village + */ + _482, + /** + * Native Village of Noatak + */ + _483, + /** + * Nome Eskimo Community + */ + _484, + /** + * Nondalton Village + */ + _485, + /** + * Noorvik Native Community + */ + _486, + /** + * Northway Village + */ + _487, + /** + * Native Village of Nuiqsut (aka Nooiksut) + */ + _488, + /** + * Nulato Village + */ + _489, + /** + * Nunakauyarmiut Tribe (formerly Native Village of T + */ + _490, + /** + * Native Village of Nunapitchuk + */ + _491, + /** + * Village of Ohogamiut + */ + _492, + /** + * Village of Old Harbor + */ + _493, + /** + * Orutsararmuit Native Village (aka Bethel) + */ + _494, + /** + * Oscarville Traditional Village + */ + _495, + /** + * Native Village of Ouzinkie + */ + _496, + /** + * Native Village of Paimiut + */ + _497, + /** + * Pauloff Harbor Village + */ + _498, + /** + * Pedro Bay Village + */ + _499, + /** + * Native Village of Perryville + */ + _500, + /** + * Petersburg Indian Association + */ + _501, + /** + * Native Village of Pilot Point + */ + _502, + /** + * Pilot Station Traditional Village + */ + _503, + /** + * Native Village of Pitka's Point + */ + _504, + /** + * Platinum Traditional Village + */ + _505, + /** + * Native Village of Point Hope + */ + _506, + /** + * Native Village of Point Lay + */ + _507, + /** + * Native Village of Port Graham + */ + _508, + /** + * Native Village of Port Heiden + */ + _509, + /** + * Native Village of Port Lions + */ + _510, + /** + * Portage Creek Village (aka Ohgsenakale) + */ + _511, + /** + * Pribilof Islands Aleut Communities of St. Paul & S + */ + _512, + /** + * Qagan Tayagungin Tribe of Sand Point Village + */ + _513, + /** + * Qawalangin Tribe of Unalaska + */ + _514, + /** + * Rampart Village + */ + _515, + /** + * Village of Red Devil + */ + _516, + /** + * Native Village of Ruby + */ + _517, + /** + * Saint George Island(See Pribilof Islands Aleut Com + */ + _518, + /** + * Native Village of Saint Michael + */ + _519, + /** + * Saint Paul Island (See Pribilof Islands Aleut Comm + */ + _520, + /** + * Village of Salamatoff + */ + _521, + /** + * Native Village of Savoonga + */ + _522, + /** + * Organized Village of Saxman + */ + _523, + /** + * Native Village of Scammon Bay + */ + _524, + /** + * Native Village of Selawik + */ + _525, + /** + * Seldovia Village Tribe + */ + _526, + /** + * Shageluk Native Village + */ + _527, + /** + * Native Village of Shaktoolik + */ + _528, + /** + * Native Village of Sheldon's Point + */ + _529, + /** + * Native Village of Shishmaref + */ + _530, + /** + * Shoonaq Tribe of Kodiak + */ + _531, + /** + * Native Village of Shungnak + */ + _532, + /** + * Sitka Tribe of Alaska + */ + _533, + /** + * Skagway Village + */ + _534, + /** + * Village of Sleetmute + */ + _535, + /** + * Village of Solomon + */ + _536, + /** + * South Naknek Village + */ + _537, + /** + * Stebbins Community Association + */ + _538, + /** + * Native Village of Stevens + */ + _539, + /** + * Village of Stony River + */ + _540, + /** + * Takotna Village + */ + _541, + /** + * Native Village of Tanacross + */ + _542, + /** + * Native Village of Tanana + */ + _543, + /** + * Native Village of Tatitlek + */ + _544, + /** + * Native Village of Tazlina + */ + _545, + /** + * Telida Village + */ + _546, + /** + * Native Village of Teller + */ + _547, + /** + * Native Village of Tetlin + */ + _548, + /** + * Central Council of the Tlingit and Haida Indian Tb + */ + _549, + /** + * Traditional Village of Togiak + */ + _550, + /** + * Tuluksak Native Community + */ + _551, + /** + * Native Village of Tuntutuliak + */ + _552, + /** + * Native Village of Tununak + */ + _553, + /** + * Twin Hills Village + */ + _554, + /** + * Native Village of Tyonek + */ + _555, + /** + * Ugashik Village + */ + _556, + /** + * Umkumiute Native Village + */ + _557, + /** + * Native Village of Unalakleet + */ + _558, + /** + * Native Village of Unga + */ + _559, + /** + * Village of Venetie (See Native Village of Venetie + */ + _560, + /** + * Native Village of Venetie Tribal Government (Arcti + */ + _561, + /** + * Village of Wainwright + */ + _562, + /** + * Native Village of Wales + */ + _563, + /** + * Native Village of White Mountain + */ + _564, + /** + * Wrangell Cooperative Association + */ + _565, + /** + * Yakutat Tlingit Tribe + */ + _566, + /** + * NATIVE ENTITIES WITHIN THE CONTIGUOUS 48 STATES + */ + _NATIVEENTITYCONTIGUOUS, + /** + * Absentee-Shawnee Tribe of Indians of Oklahoma + */ + _1, + /** + * Assiniboine and Sioux Tribes of the Fort Peck Indi + */ + _10, + /** + * Havasupai Tribe of the Havasupai Reservation, Ariz + */ + _100, + /** + * Ho-Chunk Nation of Wisconsin (formerly known as th + */ + _101, + /** + * Hoh Indian Tribe of the Hoh Indian Reservation, Wa + */ + _102, + /** + * Hoopa Valley Tribe, California + */ + _103, + /** + * Hopi Tribe of Arizona + */ + _104, + /** + * Hopland Band of Pomo Indians of the Hopland Ranche + */ + _105, + /** + * Houlton Band of Maliseet Indians of Maine + */ + _106, + /** + * Hualapai Indian Tribe of the Hualapai Indian Reser + */ + _107, + /** + * Huron Potawatomi, Inc., Michigan + */ + _108, + /** + * Inaja Band of Diegueno Mission Indians of the Inaj + */ + _109, + /** + * Augustine Band of Cahuilla Mission Indians of the + */ + _11, + /** + * Ione Band of Miwok Indians of California + */ + _110, + /** + * Iowa Tribe of Kansas and Nebraska + */ + _111, + /** + * Iowa Tribe of Oklahoma + */ + _112, + /** + * Jackson Rancheria of Me-Wuk Indians of California + */ + _113, + /** + * Jamestown S'Klallam Tribe of Washington + */ + _114, + /** + * Jamul Indian Village of California + */ + _115, + /** + * Jena Band of Choctaw Indians, Louisiana + */ + _116, + /** + * Jicarilla Apache Tribe of the Jicarilla Apache Ind + */ + _117, + /** + * Kaibab Band of Paiute Indians of the Kaibab Indian + */ + _118, + /** + * Kalispel Indian Community of the Kalispel Reservat + */ + _119, + /** + * Bad River Band of the Lake Superior Tribe of Chipp + */ + _12, + /** + * Karuk Tribe of California + */ + _120, + /** + * Kashia Band of Pomo Indians of the Stewarts Point + */ + _121, + /** + * Kaw Nation, Oklahoma + */ + _122, + /** + * Keweenaw Bay Indian Community of L'Anse and Ontona + */ + _123, + /** + * Kialegee Tribal Town, Oklahoma + */ + _124, + /** + * Kickapoo Tribe of Indians of the Kickapoo Reservat + */ + _125, + /** + * Kickapoo Tribe of Oklahoma + */ + _126, + /** + * Kickapoo Traditional Tribe of Texas + */ + _127, + /** + * Kiowa Indian Tribe of Oklahoma + */ + _128, + /** + * Klamath Indian Tribe of Oregon + */ + _129, + /** + * Bay Mills Indian Community of the Sault Ste. Marie + */ + _13, + /** + * Kootenai Tribe of Idaho + */ + _130, + /** + * La Jolla Band of Luiseno Mission Indians of the La + */ + _131, + /** + * La Posta Band of Diegueno Mission Indians of the L + */ + _132, + /** + * Lac Courte Oreilles Band of Lake Superior Chippewa + */ + _133, + /** + * Lac du Flambeau Band of Lake Superior Chippewa Ind + */ + _134, + /** + * Lac Vieux Desert Band of Lake Superior Chippewa In + */ + _135, + /** + * Las Vegas Tribe of Paiute Indians of the Las Vegas + */ + _136, + /** + * Little River Band of Ottawa Indians of Michigan + */ + _137, + /** + * Little Traverse Bay Bands of Odawa Indians of Mich + */ + _138, + /** + * Lower Lake Rancheria, California + */ + _139, + /** + * Bear River Band of the Rohnerville Rancheria, Cali + */ + _14, + /** + * Los Coyotes Band of Cahuilla Mission Indians of th + */ + _140, + /** + * Lovelock Paiute Tribe of the Lovelock Indian Colon + */ + _141, + /** + * Lower Brule Sioux Tribe of the Lower Brule Reserva + */ + _142, + /** + * Lower Elwha Tribal Community of the Lower Elwha Re + */ + _143, + /** + * Lower Sioux Indian Community of Minnesota Mdewakan + */ + _144, + /** + * Lummi Tribe of the Lummi Reservation, Washington + */ + _145, + /** + * Lytton Rancheria of California + */ + _146, + /** + * Makah Indian Tribe of the Makah Indian Reservation + */ + _147, + /** + * Manchester Band of Pomo Indians of the Manchester- + */ + _148, + /** + * Manzanita Band of Diegueno Mission Indians of the + */ + _149, + /** + * Berry Creek Rancheria of Maidu Indians of Californ + */ + _15, + /** + * Mashantucket Pequot Tribe of Connecticut + */ + _150, + /** + * Match-e-be-nash-she-wish Band of Pottawatomi India + */ + _151, + /** + * Mechoopda Indian Tribe of Chico Rancheria, Califor + */ + _152, + /** + * Menominee Indian Tribe of Wisconsin + */ + _153, + /** + * Mesa Grande Band of Diegueno Mission Indians of th + */ + _154, + /** + * Mescalero Apache Tribe of the Mescalero Reservatio + */ + _155, + /** + * Miami Tribe of Oklahoma + */ + _156, + /** + * Miccosukee Tribe of Indians of Florida + */ + _157, + /** + * Middletown Rancheria of Pomo Indians of California + */ + _158, + /** + * Minnesota Chippewa Tribe, Minnesota (Six component + */ + _159, + /** + * Big Lagoon Rancheria, California + */ + _16, + /** + * Bois Forte Band (Nett Lake); Fond du Lac Band; Gra + */ + _160, + /** + * Mississippi Band of Choctaw Indians, Mississippi + */ + _161, + /** + * Moapa Band of Paiute Indians of the Moapa River In + */ + _162, + /** + * Modoc Tribe of Oklahoma + */ + _163, + /** + * Mohegan Indian Tribe of Connecticut + */ + _164, + /** + * Mooretown Rancheria of Maidu Indians of California + */ + _165, + /** + * Morongo Band of Cahuilla Mission Indians of the Mo + */ + _166, + /** + * Muckleshoot Indian Tribe of the Muckleshoot Reserv + */ + _167, + /** + * Muscogee (Creek) Nation, Oklahoma + */ + _168, + /** + * Narragansett Indian Tribe of Rhode Island + */ + _169, + /** + * Big Pine Band of Owens Valley Paiute Shoshone Indi + */ + _17, + /** + * Navajo Nation, Arizona, New Mexico & Utah + */ + _170, + /** + * Nez Perce Tribe of Idaho + */ + _171, + /** + * Nisqually Indian Tribe of the Nisqually Reservatio + */ + _172, + /** + * Nooksack Indian Tribe of Washington + */ + _173, + /** + * Northern Cheyenne Tribe of the Northern Cheyenne I + */ + _174, + /** + * Northfork Rancheria of Mono Indians of California + */ + _175, + /** + * Northwestern Band of Shoshoni Nation of Utah (Wash + */ + _176, + /** + * Oglala Sioux Tribe of the Pine Ridge Reservation, + */ + _177, + /** + * Omaha Tribe of Nebraska + */ + _178, + /** + * Oneida Nation of New York + */ + _179, + /** + * Big Sandy Rancheria of Mono Indians of California + */ + _18, + /** + * Oneida Tribe of Wisconsin + */ + _180, + /** + * Onondaga Nation of New York + */ + _181, + /** + * Osage Tribe, Oklahoma + */ + _182, + /** + * Ottawa Tribe of Oklahoma + */ + _183, + /** + * Otoe-Missouria Tribe of Indians, Oklahoma + */ + _184, + /** + * Paiute Indian Tribe of Utah + */ + _185, + /** + * Paiute-Shoshone Indians of the Bishop Community of + */ + _186, + /** + * Paiute-Shoshone Tribe of the Fallon Reservation an + */ + _187, + /** + * Paiute-Shoshone Indians of the Lone Pine Community + */ + _188, + /** + * Pala Band of Luiseno Mission Indians of the Pala R + */ + _189, + /** + * Big Valley Band of Pomo Indians of the Big Valley + */ + _19, + /** + * Pascua Yaqui Tribe of Arizona + */ + _190, + /** + * Paskenta Band of Nomlaki Indians of California + */ + _191, + /** + * Passamaquoddy Tribe of Maine + */ + _192, + /** + * Pauma Band of Luiseno Mission Indians of the Pauma + */ + _193, + /** + * Pawnee Nation of Oklahoma + */ + _194, + /** + * Pechanga Band of Luiseno Mission Indians of the Pe + */ + _195, + /** + * Penobscot Tribe of Maine + */ + _196, + /** + * Peoria Tribe of Indians of Oklahoma + */ + _197, + /** + * Picayune Rancheria of Chukchansi Indians of Califo + */ + _198, + /** + * Pinoleville Rancheria of Pomo Indians of Californi + */ + _199, + /** + * Agua Caliente Band of Cahuilla Indians of the Agua + */ + _2, + /** + * Blackfeet Tribe of the Blackfeet Indian Reservatio + */ + _20, + /** + * Pit River Tribe, California (includes Big Bend, Lo + */ + _200, + /** + * Poarch Band of Creek Indians of Alabama + */ + _201, + /** + * Pokagon Band of Potawatomi Indians of Michigan + */ + _202, + /** + * Ponca Tribe of Indians of Oklahoma + */ + _203, + /** + * Ponca Tribe of Nebraska + */ + _204, + /** + * Port Gamble Indian Community of the Port Gamble Re + */ + _205, + /** + * Potter Valley Rancheria of Pomo Indians of Califor + */ + _206, + /** + * Prairie Band of Potawatomi Indians, Kansas + */ + _207, + /** + * Prairie Island Indian Community of Minnesota Mdewa + */ + _208, + /** + * Pueblo of Acoma, New Mexico + */ + _209, + /** + * Blue Lake Rancheria, California + */ + _21, + /** + * Pueblo of Cochiti, New Mexico + */ + _210, + /** + * Pueblo of Jemez, New Mexico + */ + _211, + /** + * Pueblo of Isleta, New Mexico + */ + _212, + /** + * Pueblo of Laguna, New Mexico + */ + _213, + /** + * Pueblo of Nambe, New Mexico + */ + _214, + /** + * Pueblo of Picuris, New Mexico + */ + _215, + /** + * Pueblo of Pojoaque, New Mexico + */ + _216, + /** + * Pueblo of San Felipe, New Mexico + */ + _217, + /** + * Pueblo of San Juan, New Mexico + */ + _218, + /** + * Pueblo of San Ildefonso, New Mexico + */ + _219, + /** + * Bridgeport Paiute Indian Colony of California + */ + _22, + /** + * Pueblo of Sandia, New Mexico + */ + _220, + /** + * Pueblo of Santa Ana, New Mexico + */ + _221, + /** + * Pueblo of Santa Clara, New Mexico + */ + _222, + /** + * Pueblo of Santo Domingo, New Mexico + */ + _223, + /** + * Pueblo of Taos, New Mexico + */ + _224, + /** + * Pueblo of Tesuque, New Mexico + */ + _225, + /** + * Pueblo of Zia, New Mexico + */ + _226, + /** + * Puyallup Tribe of the Puyallup Reservation, Washin + */ + _227, + /** + * Pyramid Lake Paiute Tribe of the Pyramid Lake Rese + */ + _228, + /** + * Quapaw Tribe of Indians, Oklahoma + */ + _229, + /** + * Buena Vista Rancheria of Me-Wuk Indians of Califor + */ + _23, + /** + * Quartz Valley Indian Community of the Quartz Valle + */ + _230, + /** + * Quechan Tribe of the Fort Yuma Indian Reservation, + */ + _231, + /** + * Quileute Tribe of the Quileute Reservation, Washin + */ + _232, + /** + * Quinault Tribe of the Quinault Reservation, Washin + */ + _233, + /** + * Ramona Band or Village of Cahuilla Mission Indians + */ + _234, + /** + * Red Cliff Band of Lake Superior Chippewa Indians o + */ + _235, + /** + * Red Lake Band of Chippewa Indians of the Red Lake + */ + _236, + /** + * Redding Rancheria, California + */ + _237, + /** + * Redwood Valley Rancheria of Pomo Indians of Califo + */ + _238, + /** + * Reno-Sparks Indian Colony, Nevada + */ + _239, + /** + * Burns Paiute Tribe of the Burns Paiute Indian Colo + */ + _24, + /** + * Resighini Rancheria, California (formerly known as + */ + _240, + /** + * Rincon Band of Luiseno Mission Indians of the Rinc + */ + _241, + /** + * Robinson Rancheria of Pomo Indians of California + */ + _242, + /** + * Rosebud Sioux Tribe of the Rosebud Indian Reservat + */ + _243, + /** + * Round Valley Indian Tribes of the Round Valley Res + */ + _244, + /** + * Rumsey Indian Rancheria of Wintun Indians of Calif + */ + _245, + /** + * Sac and Fox Tribe of the Mississippi in Iowa + */ + _246, + /** + * Sac and Fox Nation of Missouri in Kansas and Nebra + */ + _247, + /** + * Sac and Fox Nation, Oklahoma + */ + _248, + /** + * Saginaw Chippewa Indian Tribe of Michigan, Isabell + */ + _249, + /** + * Cabazon Band of Cahuilla Mission Indians of the Ca + */ + _25, + /** + * Salt River Pima-Maricopa Indian Community of the S + */ + _250, + /** + * Samish Indian Tribe, Washington + */ + _251, + /** + * San Carlos Apache Tribe of the San Carlos Reservat + */ + _252, + /** + * San Juan Southern Paiute Tribe of Arizona + */ + _253, + /** + * San Manual Band of Serrano Mission Indians of the + */ + _254, + /** + * San Pasqual Band of Diegueno Mission Indians of Ca + */ + _255, + /** + * Santa Rosa Indian Community of the Santa Rosa Ranc + */ + _256, + /** + * Santa Rosa Band of Cahuilla Mission Indians of the + */ + _257, + /** + * Santa Ynez Band of Chumash Mission Indians of the + */ + _258, + /** + * Santa Ysabel Band of Diegueno Mission Indians of t + */ + _259, + /** + * Cachil DeHe Band of Wintun Indians of the Colusa I + */ + _26, + /** + * Santee Sioux Tribe of the Santee Reservation of Ne + */ + _260, + /** + * Sauk-Suiattle Indian Tribe of Washington + */ + _261, + /** + * Sault Ste. Marie Tribe of Chippewa Indians of Mich + */ + _262, + /** + * Scotts Valley Band of Pomo Indians of California + */ + _263, + /** + * Seminole Nation of Oklahoma + */ + _264, + /** + * Seminole Tribe of Florida, Dania, Big Cypress, Bri + */ + _265, + /** + * Seneca Nation of New York + */ + _266, + /** + * Seneca-Cayuga Tribe of Oklahoma + */ + _267, + /** + * Shakopee Mdewakanton Sioux Community of Minnesota + */ + _268, + /** + * Shawnee Tribe, Oklahoma + */ + _269, + /** + * Caddo Indian Tribe of Oklahoma + */ + _27, + /** + * Sherwood Valley Rancheria of Pomo Indians of Calif + */ + _270, + /** + * Shingle Springs Band of Miwok Indians, Shingle Spr + */ + _271, + /** + * Shoalwater Bay Tribe of the Shoalwater Bay Indian + */ + _272, + /** + * Shoshone Tribe of the Wind River Reservation, Wyom + */ + _273, + /** + * Shoshone-Bannock Tribes of the Fort Hall Reservati + */ + _274, + /** + * Shoshone-Paiute Tribes of the Duck Valley Reservat + */ + _275, + /** + * Sisseton-Wahpeton Sioux Tribe of the Lake Traverse + */ + _276, + /** + * Skokomish Indian Tribe of the Skokomish Reservatio + */ + _277, + /** + * Skull Valley Band of Goshute Indians of Utah + */ + _278, + /** + * Smith River Rancheria, California + */ + _279, + /** + * Cahuilla Band of Mission Indians of the Cahuilla R + */ + _28, + /** + * Snoqualmie Tribe, Washington + */ + _280, + /** + * Soboba Band of Luiseno Indians, California (former + */ + _281, + /** + * Sokaogon Chippewa Community of the Mole Lake Band + */ + _282, + /** + * Southern Ute Indian Tribe of the Southern Ute Rese + */ + _283, + /** + * Spirit Lake Tribe, North Dakota (formerly known as + */ + _284, + /** + * Spokane Tribe of the Spokane Reservation, Washingt + */ + _285, + /** + * Squaxin Island Tribe of the Squaxin Island Reserva + */ + _286, + /** + * St. Croix Chippewa Indians of Wisconsin, St. Croix + */ + _287, + /** + * St. Regis Band of Mohawk Indians of New York + */ + _288, + /** + * Standing Rock Sioux Tribe of North & South Dakota + */ + _289, + /** + * Cahto Indian Tribe of the Laytonville Rancheria, C + */ + _29, + /** + * Stockbridge-Munsee Community of Mohican Indians of + */ + _290, + /** + * Stillaguamish Tribe of Washington + */ + _291, + /** + * Summit Lake Paiute Tribe of Nevada + */ + _292, + /** + * Suquamish Indian Tribe of the Port Madison Reserva + */ + _293, + /** + * Susanville Indian Rancheria, California + */ + _294, + /** + * Swinomish Indians of the Swinomish Reservation, Wa + */ + _295, + /** + * Sycuan Band of Diegueno Mission Indians of Califor + */ + _296, + /** + * Table Bluff Reservation - Wiyot Tribe, California + */ + _297, + /** + * Table Mountain Rancheria of California + */ + _298, + /** + * Te-Moak Tribe of Western Shoshone Indians of Nevad + */ + _299, + /** + * Ak Chin Indian Community of the Maricopa (Ak Chin) + */ + _3, + /** + * California Valley Miwok Tribe, California (formerl + */ + _30, + /** + * Thlopthlocco Tribal Town, Oklahoma + */ + _300, + /** + * Three Affiliated Tribes of the Fort Berthold Reser + */ + _301, + /** + * Tohono O'odham Nation of Arizona + */ + _302, + /** + * Tonawanda Band of Seneca Indians of New York + */ + _303, + /** + * Tonkawa Tribe of Indians of Oklahoma + */ + _304, + /** + * Tonto Apache Tribe of Arizona + */ + _305, + /** + * Torres-Martinez Band of Cahuilla Mission Indians o + */ + _306, + /** + * Tule River Indian Tribe of the Tule River Reservat + */ + _307, + /** + * Tulalip Tribes of the Tulalip Reservation, Washing + */ + _308, + /** + * Tunica-Biloxi Indian Tribe of Louisiana + */ + _309, + /** + * Campo Band of Diegueno Mission Indians of the Camp + */ + _31, + /** + * Tuolumne Band of Me-Wuk Indians of the Tuolumne Ra + */ + _310, + /** + * Turtle Mountain Band of Chippewa Indians of North + */ + _311, + /** + * Tuscarora Nation of New York + */ + _312, + /** + * Twenty-Nine Palms Band of Mission Indians of Calif + */ + _313, + /** + * United Auburn Indian Community of the Auburn Ranch + */ + _314, + /** + * United Keetoowah Band of Cherokee Indians of Oklah + */ + _315, + /** + * Upper Lake Band of Pomo Indians of Upper Lake Ranc + */ + _316, + /** + * Upper Sioux Indian Community of the Upper Sioux Re + */ + _317, + /** + * Upper Skagit Indian Tribe of Washington + */ + _318, + /** + * Ute Indian Tribe of the Uintah & Ouray Reservation + */ + _319, + /** + * Capitan Grande Band of Diegueno Mission Indians of + */ + _32, + /** + * Ute Mountain Tribe of the Ute Mountain Reservation + */ + _320, + /** + * Utu Utu Gwaitu Paiute Tribe of the Benton Paiute R + */ + _321, + /** + * Walker River Paiute Tribe of the Walker River Rese + */ + _322, + /** + * Wampanoag Tribe of Gay Head (Aquinnah) of Massachu + */ + _323, + /** + * Washoe Tribe of Nevada & California (Carson Colony + */ + _324, + /** + * White Mountain Apache Tribe of the Fort Apache Res + */ + _325, + /** + * Wichita and Affiliated Tribes (Wichita, Keechi, Wa + */ + _326, + /** + * Winnebago Tribe of Nebraska + */ + _327, + /** + * Winnemucca Indian Colony of Nevada + */ + _328, + /** + * Wyandotte Tribe of Oklahoma + */ + _329, + /** + * Barona Group of Capitan Grande Band of Mission Ind + */ + _33, + /** + * Yankton Sioux Tribe of South Dakota + */ + _330, + /** + * Yavapai-Apache Nation of the Camp Verde Indian Res + */ + _331, + /** + * Yavapai-Prescott Tribe of the Yavapai Reservation, + */ + _332, + /** + * Yerington Paiute Tribe of the Yerington Colony & C + */ + _333, + /** + * Yomba Shoshone Tribe of the Yomba Reservation, Nev + */ + _334, + /** + * Ysleta Del Sur Pueblo of Texas + */ + _335, + /** + * Yurok Tribe of the Yurok Reservation, California + */ + _336, + /** + * Zuni Tribe of the Zuni Reservation, New Mexico + */ + _337, + /** + * Viejas (Baron Long) Group of Capitan Grande Band o + */ + _34, + /** + * Catawba Indian Nation (aka Catawba Tribe of South + */ + _35, + /** + * Cayuga Nation of New York + */ + _36, + /** + * Cedarville Rancheria, California + */ + _37, + /** + * Chemehuevi Indian Tribe of the Chemehuevi Reservat + */ + _38, + /** + * Cher-Ae Heights Indian Community of the Trinidad R + */ + _39, + /** + * Alabama-Coushatta Tribes of Texas + */ + _4, + /** + * Cherokee Nation, Oklahoma + */ + _40, + /** + * Cheyenne-Arapaho Tribes of Oklahoma + */ + _41, + /** + * Cheyenne River Sioux Tribe of the Cheyenne River R + */ + _42, + /** + * Chickasaw Nation, Oklahoma + */ + _43, + /** + * Chicken Ranch Rancheria of Me-Wuk Indians of Calif + */ + _44, + /** + * Chippewa-Cree Indians of the Rocky Boy's Reservati + */ + _45, + /** + * Chitimacha Tribe of Louisiana + */ + _46, + /** + * Choctaw Nation of Oklahoma + */ + _47, + /** + * Citizen Potawatomi Nation, Oklahoma + */ + _48, + /** + * Cloverdale Rancheria of Pomo Indians of California + */ + _49, + /** + * Alabama-Quassarte Tribal Town, Oklahoma + */ + _5, + /** + * Cocopah Tribe of Arizona + */ + _50, + /** + * Coeur D'Alene Tribe of the Coeur D'Alene Reservati + */ + _51, + /** + * Cold Springs Rancheria of Mono Indians of Californ + */ + _52, + /** + * Colorado River Indian Tribes of the Colorado River + */ + _53, + /** + * Comanche Indian Tribe, Oklahoma + */ + _54, + /** + * Confederated Salish & Kootenai Tribes of the Flath + */ + _55, + /** + * Confederated Tribes of the Chehalis Reservation, W + */ + _56, + /** + * Confederated Tribes of the Colville Reservation, W + */ + _57, + /** + * Confederated Tribes of the Coos, Lower Umpqua and + */ + _58, + /** + * Confederated Tribes of the Goshute Reservation, Ne + */ + _59, + /** + * Alturas Indian Rancheria, California + */ + _6, + /** + * Confederated Tribes of the Grand Ronde Community o + */ + _60, + /** + * Confederated Tribes of the Siletz Reservation, Ore + */ + _61, + /** + * Confederated Tribes of the Umatilla Reservation, O + */ + _62, + /** + * Confederated Tribes of the Warm Springs Reservatio + */ + _63, + /** + * Confederated Tribes and Bands of the Yakama Indian + */ + _64, + /** + * Coquille Tribe of Oregon + */ + _65, + /** + * Cortina Indian Rancheria of Wintun Indians of Cali + */ + _66, + /** + * Coushatta Tribe of Louisiana + */ + _67, + /** + * Cow Creek Band of Umpqua Indians of Oregon + */ + _68, + /** + * Coyote Valley Band of Pomo Indians of California + */ + _69, + /** + * Apache Tribe of Oklahoma + */ + _7, + /** + * Crow Tribe of Montana + */ + _70, + /** + * Crow Creek Sioux Tribe of the Crow Creek Reservati + */ + _71, + /** + * Cuyapaipe Community of Diegueno Mission Indians of + */ + _72, + /** + * Death Valley Timbi-Sha Shoshone Band of California + */ + _73, + /** + * Delaware Nation, Oklahoma (formerly Delaware Tribe + */ + _74, + /** + * Delaware Tribe of Indians, Oklahoma + */ + _75, + /** + * Dry Creek Rancheria of Pomo Indians of California + */ + _76, + /** + * Duckwater Shoshone Tribe of the Duckwater Reservat + */ + _77, + /** + * Eastern Band of Cherokee Indians of North Carolina + */ + _78, + /** + * Eastern Shawnee Tribe of Oklahoma + */ + _79, + /** + * Arapahoe Tribe of the Wind River Reservation, Wyom + */ + _8, + /** + * Elem Indian Colony of Pomo Indians of the Sulphur + */ + _80, + /** + * Elk Valley Rancheria, California + */ + _81, + /** + * Ely Shoshone Tribe of Nevada + */ + _82, + /** + * Enterprise Rancheria of Maidu Indians of Californi + */ + _83, + /** + * Flandreau Santee Sioux Tribe of South Dakota + */ + _84, + /** + * Forest County Potawatomi Community of Wisconsin Po + */ + _85, + /** + * Fort Belknap Indian Community of the Fort Belknap + */ + _86, + /** + * Fort Bidwell Indian Community of the Fort Bidwell + */ + _87, + /** + * Fort Independence Indian Community of Paiute India + */ + _88, + /** + * Fort McDermitt Paiute and Shoshone Tribes of the F + */ + _89, + /** + * Aroostook Band of Micmac Indians of Maine + */ + _9, + /** + * Fort McDowell Yavapai Nation, Arizona (formerly th + */ + _90, + /** + * Fort Mojave Indian Tribe of Arizona, California + */ + _91, + /** + * Fort Sill Apache Tribe of Oklahoma + */ + _92, + /** + * Gila River Indian Community of the Gila River Indi + */ + _93, + /** + * Grand Traverse Band of Ottawa & Chippewa Indians o + */ + _94, + /** + * Graton Rancheria, California + */ + _95, + /** + * Greenville Rancheria of Maidu Indians of Californi + */ + _96, + /** + * Grindstone Indian Rancheria of Wintun-Wailaki Indi + */ + _97, + /** + * Guidiville Rancheria of California + */ + _98, + /** + * Hannahville Indian Community of Wisconsin Potawato + */ + _99, + /** + * added to help the parsers + */ + NULL; + public static V3TribalEntityUS fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NativeEntityAlaska".equals(codeString)) + return _NATIVEENTITYALASKA; + if ("338".equals(codeString)) + return _338; + if ("339".equals(codeString)) + return _339; + if ("340".equals(codeString)) + return _340; + if ("341".equals(codeString)) + return _341; + if ("342".equals(codeString)) + return _342; + if ("343".equals(codeString)) + return _343; + if ("344".equals(codeString)) + return _344; + if ("345".equals(codeString)) + return _345; + if ("346".equals(codeString)) + return _346; + if ("347".equals(codeString)) + return _347; + if ("348".equals(codeString)) + return _348; + if ("349".equals(codeString)) + return _349; + if ("350".equals(codeString)) + return _350; + if ("351".equals(codeString)) + return _351; + if ("352".equals(codeString)) + return _352; + if ("353".equals(codeString)) + return _353; + if ("354".equals(codeString)) + return _354; + if ("355".equals(codeString)) + return _355; + if ("356".equals(codeString)) + return _356; + if ("357".equals(codeString)) + return _357; + if ("358".equals(codeString)) + return _358; + if ("359".equals(codeString)) + return _359; + if ("360".equals(codeString)) + return _360; + if ("361".equals(codeString)) + return _361; + if ("362".equals(codeString)) + return _362; + if ("363".equals(codeString)) + return _363; + if ("364".equals(codeString)) + return _364; + if ("365".equals(codeString)) + return _365; + if ("366".equals(codeString)) + return _366; + if ("367".equals(codeString)) + return _367; + if ("368".equals(codeString)) + return _368; + if ("369".equals(codeString)) + return _369; + if ("370".equals(codeString)) + return _370; + if ("371".equals(codeString)) + return _371; + if ("372".equals(codeString)) + return _372; + if ("373".equals(codeString)) + return _373; + if ("374".equals(codeString)) + return _374; + if ("375".equals(codeString)) + return _375; + if ("376".equals(codeString)) + return _376; + if ("377".equals(codeString)) + return _377; + if ("378".equals(codeString)) + return _378; + if ("379".equals(codeString)) + return _379; + if ("380".equals(codeString)) + return _380; + if ("381".equals(codeString)) + return _381; + if ("382".equals(codeString)) + return _382; + if ("383".equals(codeString)) + return _383; + if ("384".equals(codeString)) + return _384; + if ("385".equals(codeString)) + return _385; + if ("386".equals(codeString)) + return _386; + if ("387".equals(codeString)) + return _387; + if ("388".equals(codeString)) + return _388; + if ("389".equals(codeString)) + return _389; + if ("390".equals(codeString)) + return _390; + if ("391".equals(codeString)) + return _391; + if ("392".equals(codeString)) + return _392; + if ("393".equals(codeString)) + return _393; + if ("394".equals(codeString)) + return _394; + if ("395".equals(codeString)) + return _395; + if ("396".equals(codeString)) + return _396; + if ("397".equals(codeString)) + return _397; + if ("398".equals(codeString)) + return _398; + if ("399".equals(codeString)) + return _399; + if ("400".equals(codeString)) + return _400; + if ("401".equals(codeString)) + return _401; + if ("402".equals(codeString)) + return _402; + if ("403".equals(codeString)) + return _403; + if ("404".equals(codeString)) + return _404; + if ("405".equals(codeString)) + return _405; + if ("406".equals(codeString)) + return _406; + if ("407".equals(codeString)) + return _407; + if ("408".equals(codeString)) + return _408; + if ("409".equals(codeString)) + return _409; + if ("410".equals(codeString)) + return _410; + if ("411".equals(codeString)) + return _411; + if ("412".equals(codeString)) + return _412; + if ("413".equals(codeString)) + return _413; + if ("414".equals(codeString)) + return _414; + if ("415".equals(codeString)) + return _415; + if ("416".equals(codeString)) + return _416; + if ("417".equals(codeString)) + return _417; + if ("418".equals(codeString)) + return _418; + if ("419".equals(codeString)) + return _419; + if ("420".equals(codeString)) + return _420; + if ("421".equals(codeString)) + return _421; + if ("422".equals(codeString)) + return _422; + if ("423".equals(codeString)) + return _423; + if ("424".equals(codeString)) + return _424; + if ("425".equals(codeString)) + return _425; + if ("426".equals(codeString)) + return _426; + if ("427".equals(codeString)) + return _427; + if ("428".equals(codeString)) + return _428; + if ("429".equals(codeString)) + return _429; + if ("430".equals(codeString)) + return _430; + if ("431".equals(codeString)) + return _431; + if ("432".equals(codeString)) + return _432; + if ("433".equals(codeString)) + return _433; + if ("434".equals(codeString)) + return _434; + if ("435".equals(codeString)) + return _435; + if ("436".equals(codeString)) + return _436; + if ("437".equals(codeString)) + return _437; + if ("438".equals(codeString)) + return _438; + if ("439".equals(codeString)) + return _439; + if ("440".equals(codeString)) + return _440; + if ("441".equals(codeString)) + return _441; + if ("442".equals(codeString)) + return _442; + if ("443".equals(codeString)) + return _443; + if ("444".equals(codeString)) + return _444; + if ("445".equals(codeString)) + return _445; + if ("446".equals(codeString)) + return _446; + if ("447".equals(codeString)) + return _447; + if ("448".equals(codeString)) + return _448; + if ("449".equals(codeString)) + return _449; + if ("450".equals(codeString)) + return _450; + if ("451".equals(codeString)) + return _451; + if ("452".equals(codeString)) + return _452; + if ("453".equals(codeString)) + return _453; + if ("454".equals(codeString)) + return _454; + if ("455".equals(codeString)) + return _455; + if ("456".equals(codeString)) + return _456; + if ("457".equals(codeString)) + return _457; + if ("458".equals(codeString)) + return _458; + if ("459".equals(codeString)) + return _459; + if ("460".equals(codeString)) + return _460; + if ("461".equals(codeString)) + return _461; + if ("462".equals(codeString)) + return _462; + if ("463".equals(codeString)) + return _463; + if ("464".equals(codeString)) + return _464; + if ("465".equals(codeString)) + return _465; + if ("466".equals(codeString)) + return _466; + if ("467".equals(codeString)) + return _467; + if ("468".equals(codeString)) + return _468; + if ("469".equals(codeString)) + return _469; + if ("470".equals(codeString)) + return _470; + if ("471".equals(codeString)) + return _471; + if ("472".equals(codeString)) + return _472; + if ("473".equals(codeString)) + return _473; + if ("474".equals(codeString)) + return _474; + if ("475".equals(codeString)) + return _475; + if ("476".equals(codeString)) + return _476; + if ("477".equals(codeString)) + return _477; + if ("478".equals(codeString)) + return _478; + if ("479".equals(codeString)) + return _479; + if ("480".equals(codeString)) + return _480; + if ("481".equals(codeString)) + return _481; + if ("482".equals(codeString)) + return _482; + if ("483".equals(codeString)) + return _483; + if ("484".equals(codeString)) + return _484; + if ("485".equals(codeString)) + return _485; + if ("486".equals(codeString)) + return _486; + if ("487".equals(codeString)) + return _487; + if ("488".equals(codeString)) + return _488; + if ("489".equals(codeString)) + return _489; + if ("490".equals(codeString)) + return _490; + if ("491".equals(codeString)) + return _491; + if ("492".equals(codeString)) + return _492; + if ("493".equals(codeString)) + return _493; + if ("494".equals(codeString)) + return _494; + if ("495".equals(codeString)) + return _495; + if ("496".equals(codeString)) + return _496; + if ("497".equals(codeString)) + return _497; + if ("498".equals(codeString)) + return _498; + if ("499".equals(codeString)) + return _499; + if ("500".equals(codeString)) + return _500; + if ("501".equals(codeString)) + return _501; + if ("502".equals(codeString)) + return _502; + if ("503".equals(codeString)) + return _503; + if ("504".equals(codeString)) + return _504; + if ("505".equals(codeString)) + return _505; + if ("506".equals(codeString)) + return _506; + if ("507".equals(codeString)) + return _507; + if ("508".equals(codeString)) + return _508; + if ("509".equals(codeString)) + return _509; + if ("510".equals(codeString)) + return _510; + if ("511".equals(codeString)) + return _511; + if ("512".equals(codeString)) + return _512; + if ("513".equals(codeString)) + return _513; + if ("514".equals(codeString)) + return _514; + if ("515".equals(codeString)) + return _515; + if ("516".equals(codeString)) + return _516; + if ("517".equals(codeString)) + return _517; + if ("518".equals(codeString)) + return _518; + if ("519".equals(codeString)) + return _519; + if ("520".equals(codeString)) + return _520; + if ("521".equals(codeString)) + return _521; + if ("522".equals(codeString)) + return _522; + if ("523".equals(codeString)) + return _523; + if ("524".equals(codeString)) + return _524; + if ("525".equals(codeString)) + return _525; + if ("526".equals(codeString)) + return _526; + if ("527".equals(codeString)) + return _527; + if ("528".equals(codeString)) + return _528; + if ("529".equals(codeString)) + return _529; + if ("530".equals(codeString)) + return _530; + if ("531".equals(codeString)) + return _531; + if ("532".equals(codeString)) + return _532; + if ("533".equals(codeString)) + return _533; + if ("534".equals(codeString)) + return _534; + if ("535".equals(codeString)) + return _535; + if ("536".equals(codeString)) + return _536; + if ("537".equals(codeString)) + return _537; + if ("538".equals(codeString)) + return _538; + if ("539".equals(codeString)) + return _539; + if ("540".equals(codeString)) + return _540; + if ("541".equals(codeString)) + return _541; + if ("542".equals(codeString)) + return _542; + if ("543".equals(codeString)) + return _543; + if ("544".equals(codeString)) + return _544; + if ("545".equals(codeString)) + return _545; + if ("546".equals(codeString)) + return _546; + if ("547".equals(codeString)) + return _547; + if ("548".equals(codeString)) + return _548; + if ("549".equals(codeString)) + return _549; + if ("550".equals(codeString)) + return _550; + if ("551".equals(codeString)) + return _551; + if ("552".equals(codeString)) + return _552; + if ("553".equals(codeString)) + return _553; + if ("554".equals(codeString)) + return _554; + if ("555".equals(codeString)) + return _555; + if ("556".equals(codeString)) + return _556; + if ("557".equals(codeString)) + return _557; + if ("558".equals(codeString)) + return _558; + if ("559".equals(codeString)) + return _559; + if ("560".equals(codeString)) + return _560; + if ("561".equals(codeString)) + return _561; + if ("562".equals(codeString)) + return _562; + if ("563".equals(codeString)) + return _563; + if ("564".equals(codeString)) + return _564; + if ("565".equals(codeString)) + return _565; + if ("566".equals(codeString)) + return _566; + if ("_NativeEntityContiguous".equals(codeString)) + return _NATIVEENTITYCONTIGUOUS; + if ("1".equals(codeString)) + return _1; + if ("10".equals(codeString)) + return _10; + if ("100".equals(codeString)) + return _100; + if ("101".equals(codeString)) + return _101; + if ("102".equals(codeString)) + return _102; + if ("103".equals(codeString)) + return _103; + if ("104".equals(codeString)) + return _104; + if ("105".equals(codeString)) + return _105; + if ("106".equals(codeString)) + return _106; + if ("107".equals(codeString)) + return _107; + if ("108".equals(codeString)) + return _108; + if ("109".equals(codeString)) + return _109; + if ("11".equals(codeString)) + return _11; + if ("110".equals(codeString)) + return _110; + if ("111".equals(codeString)) + return _111; + if ("112".equals(codeString)) + return _112; + if ("113".equals(codeString)) + return _113; + if ("114".equals(codeString)) + return _114; + if ("115".equals(codeString)) + return _115; + if ("116".equals(codeString)) + return _116; + if ("117".equals(codeString)) + return _117; + if ("118".equals(codeString)) + return _118; + if ("119".equals(codeString)) + return _119; + if ("12".equals(codeString)) + return _12; + if ("120".equals(codeString)) + return _120; + if ("121".equals(codeString)) + return _121; + if ("122".equals(codeString)) + return _122; + if ("123".equals(codeString)) + return _123; + if ("124".equals(codeString)) + return _124; + if ("125".equals(codeString)) + return _125; + if ("126".equals(codeString)) + return _126; + if ("127".equals(codeString)) + return _127; + if ("128".equals(codeString)) + return _128; + if ("129".equals(codeString)) + return _129; + if ("13".equals(codeString)) + return _13; + if ("130".equals(codeString)) + return _130; + if ("131".equals(codeString)) + return _131; + if ("132".equals(codeString)) + return _132; + if ("133".equals(codeString)) + return _133; + if ("134".equals(codeString)) + return _134; + if ("135".equals(codeString)) + return _135; + if ("136".equals(codeString)) + return _136; + if ("137".equals(codeString)) + return _137; + if ("138".equals(codeString)) + return _138; + if ("139".equals(codeString)) + return _139; + if ("14".equals(codeString)) + return _14; + if ("140".equals(codeString)) + return _140; + if ("141".equals(codeString)) + return _141; + if ("142".equals(codeString)) + return _142; + if ("143".equals(codeString)) + return _143; + if ("144".equals(codeString)) + return _144; + if ("145".equals(codeString)) + return _145; + if ("146".equals(codeString)) + return _146; + if ("147".equals(codeString)) + return _147; + if ("148".equals(codeString)) + return _148; + if ("149".equals(codeString)) + return _149; + if ("15".equals(codeString)) + return _15; + if ("150".equals(codeString)) + return _150; + if ("151".equals(codeString)) + return _151; + if ("152".equals(codeString)) + return _152; + if ("153".equals(codeString)) + return _153; + if ("154".equals(codeString)) + return _154; + if ("155".equals(codeString)) + return _155; + if ("156".equals(codeString)) + return _156; + if ("157".equals(codeString)) + return _157; + if ("158".equals(codeString)) + return _158; + if ("159".equals(codeString)) + return _159; + if ("16".equals(codeString)) + return _16; + if ("160".equals(codeString)) + return _160; + if ("161".equals(codeString)) + return _161; + if ("162".equals(codeString)) + return _162; + if ("163".equals(codeString)) + return _163; + if ("164".equals(codeString)) + return _164; + if ("165".equals(codeString)) + return _165; + if ("166".equals(codeString)) + return _166; + if ("167".equals(codeString)) + return _167; + if ("168".equals(codeString)) + return _168; + if ("169".equals(codeString)) + return _169; + if ("17".equals(codeString)) + return _17; + if ("170".equals(codeString)) + return _170; + if ("171".equals(codeString)) + return _171; + if ("172".equals(codeString)) + return _172; + if ("173".equals(codeString)) + return _173; + if ("174".equals(codeString)) + return _174; + if ("175".equals(codeString)) + return _175; + if ("176".equals(codeString)) + return _176; + if ("177".equals(codeString)) + return _177; + if ("178".equals(codeString)) + return _178; + if ("179".equals(codeString)) + return _179; + if ("18".equals(codeString)) + return _18; + if ("180".equals(codeString)) + return _180; + if ("181".equals(codeString)) + return _181; + if ("182".equals(codeString)) + return _182; + if ("183".equals(codeString)) + return _183; + if ("184".equals(codeString)) + return _184; + if ("185".equals(codeString)) + return _185; + if ("186".equals(codeString)) + return _186; + if ("187".equals(codeString)) + return _187; + if ("188".equals(codeString)) + return _188; + if ("189".equals(codeString)) + return _189; + if ("19".equals(codeString)) + return _19; + if ("190".equals(codeString)) + return _190; + if ("191".equals(codeString)) + return _191; + if ("192".equals(codeString)) + return _192; + if ("193".equals(codeString)) + return _193; + if ("194".equals(codeString)) + return _194; + if ("195".equals(codeString)) + return _195; + if ("196".equals(codeString)) + return _196; + if ("197".equals(codeString)) + return _197; + if ("198".equals(codeString)) + return _198; + if ("199".equals(codeString)) + return _199; + if ("2".equals(codeString)) + return _2; + if ("20".equals(codeString)) + return _20; + if ("200".equals(codeString)) + return _200; + if ("201".equals(codeString)) + return _201; + if ("202".equals(codeString)) + return _202; + if ("203".equals(codeString)) + return _203; + if ("204".equals(codeString)) + return _204; + if ("205".equals(codeString)) + return _205; + if ("206".equals(codeString)) + return _206; + if ("207".equals(codeString)) + return _207; + if ("208".equals(codeString)) + return _208; + if ("209".equals(codeString)) + return _209; + if ("21".equals(codeString)) + return _21; + if ("210".equals(codeString)) + return _210; + if ("211".equals(codeString)) + return _211; + if ("212".equals(codeString)) + return _212; + if ("213".equals(codeString)) + return _213; + if ("214".equals(codeString)) + return _214; + if ("215".equals(codeString)) + return _215; + if ("216".equals(codeString)) + return _216; + if ("217".equals(codeString)) + return _217; + if ("218".equals(codeString)) + return _218; + if ("219".equals(codeString)) + return _219; + if ("22".equals(codeString)) + return _22; + if ("220".equals(codeString)) + return _220; + if ("221".equals(codeString)) + return _221; + if ("222".equals(codeString)) + return _222; + if ("223".equals(codeString)) + return _223; + if ("224".equals(codeString)) + return _224; + if ("225".equals(codeString)) + return _225; + if ("226".equals(codeString)) + return _226; + if ("227".equals(codeString)) + return _227; + if ("228".equals(codeString)) + return _228; + if ("229".equals(codeString)) + return _229; + if ("23".equals(codeString)) + return _23; + if ("230".equals(codeString)) + return _230; + if ("231".equals(codeString)) + return _231; + if ("232".equals(codeString)) + return _232; + if ("233".equals(codeString)) + return _233; + if ("234".equals(codeString)) + return _234; + if ("235".equals(codeString)) + return _235; + if ("236".equals(codeString)) + return _236; + if ("237".equals(codeString)) + return _237; + if ("238".equals(codeString)) + return _238; + if ("239".equals(codeString)) + return _239; + if ("24".equals(codeString)) + return _24; + if ("240".equals(codeString)) + return _240; + if ("241".equals(codeString)) + return _241; + if ("242".equals(codeString)) + return _242; + if ("243".equals(codeString)) + return _243; + if ("244".equals(codeString)) + return _244; + if ("245".equals(codeString)) + return _245; + if ("246".equals(codeString)) + return _246; + if ("247".equals(codeString)) + return _247; + if ("248".equals(codeString)) + return _248; + if ("249".equals(codeString)) + return _249; + if ("25".equals(codeString)) + return _25; + if ("250".equals(codeString)) + return _250; + if ("251".equals(codeString)) + return _251; + if ("252".equals(codeString)) + return _252; + if ("253".equals(codeString)) + return _253; + if ("254".equals(codeString)) + return _254; + if ("255".equals(codeString)) + return _255; + if ("256".equals(codeString)) + return _256; + if ("257".equals(codeString)) + return _257; + if ("258".equals(codeString)) + return _258; + if ("259".equals(codeString)) + return _259; + if ("26".equals(codeString)) + return _26; + if ("260".equals(codeString)) + return _260; + if ("261".equals(codeString)) + return _261; + if ("262".equals(codeString)) + return _262; + if ("263".equals(codeString)) + return _263; + if ("264".equals(codeString)) + return _264; + if ("265".equals(codeString)) + return _265; + if ("266".equals(codeString)) + return _266; + if ("267".equals(codeString)) + return _267; + if ("268".equals(codeString)) + return _268; + if ("269".equals(codeString)) + return _269; + if ("27".equals(codeString)) + return _27; + if ("270".equals(codeString)) + return _270; + if ("271".equals(codeString)) + return _271; + if ("272".equals(codeString)) + return _272; + if ("273".equals(codeString)) + return _273; + if ("274".equals(codeString)) + return _274; + if ("275".equals(codeString)) + return _275; + if ("276".equals(codeString)) + return _276; + if ("277".equals(codeString)) + return _277; + if ("278".equals(codeString)) + return _278; + if ("279".equals(codeString)) + return _279; + if ("28".equals(codeString)) + return _28; + if ("280".equals(codeString)) + return _280; + if ("281".equals(codeString)) + return _281; + if ("282".equals(codeString)) + return _282; + if ("283".equals(codeString)) + return _283; + if ("284".equals(codeString)) + return _284; + if ("285".equals(codeString)) + return _285; + if ("286".equals(codeString)) + return _286; + if ("287".equals(codeString)) + return _287; + if ("288".equals(codeString)) + return _288; + if ("289".equals(codeString)) + return _289; + if ("29".equals(codeString)) + return _29; + if ("290".equals(codeString)) + return _290; + if ("291".equals(codeString)) + return _291; + if ("292".equals(codeString)) + return _292; + if ("293".equals(codeString)) + return _293; + if ("294".equals(codeString)) + return _294; + if ("295".equals(codeString)) + return _295; + if ("296".equals(codeString)) + return _296; + if ("297".equals(codeString)) + return _297; + if ("298".equals(codeString)) + return _298; + if ("299".equals(codeString)) + return _299; + if ("3".equals(codeString)) + return _3; + if ("30".equals(codeString)) + return _30; + if ("300".equals(codeString)) + return _300; + if ("301".equals(codeString)) + return _301; + if ("302".equals(codeString)) + return _302; + if ("303".equals(codeString)) + return _303; + if ("304".equals(codeString)) + return _304; + if ("305".equals(codeString)) + return _305; + if ("306".equals(codeString)) + return _306; + if ("307".equals(codeString)) + return _307; + if ("308".equals(codeString)) + return _308; + if ("309".equals(codeString)) + return _309; + if ("31".equals(codeString)) + return _31; + if ("310".equals(codeString)) + return _310; + if ("311".equals(codeString)) + return _311; + if ("312".equals(codeString)) + return _312; + if ("313".equals(codeString)) + return _313; + if ("314".equals(codeString)) + return _314; + if ("315".equals(codeString)) + return _315; + if ("316".equals(codeString)) + return _316; + if ("317".equals(codeString)) + return _317; + if ("318".equals(codeString)) + return _318; + if ("319".equals(codeString)) + return _319; + if ("32".equals(codeString)) + return _32; + if ("320".equals(codeString)) + return _320; + if ("321".equals(codeString)) + return _321; + if ("322".equals(codeString)) + return _322; + if ("323".equals(codeString)) + return _323; + if ("324".equals(codeString)) + return _324; + if ("325".equals(codeString)) + return _325; + if ("326".equals(codeString)) + return _326; + if ("327".equals(codeString)) + return _327; + if ("328".equals(codeString)) + return _328; + if ("329".equals(codeString)) + return _329; + if ("33".equals(codeString)) + return _33; + if ("330".equals(codeString)) + return _330; + if ("331".equals(codeString)) + return _331; + if ("332".equals(codeString)) + return _332; + if ("333".equals(codeString)) + return _333; + if ("334".equals(codeString)) + return _334; + if ("335".equals(codeString)) + return _335; + if ("336".equals(codeString)) + return _336; + if ("337".equals(codeString)) + return _337; + if ("34".equals(codeString)) + return _34; + if ("35".equals(codeString)) + return _35; + if ("36".equals(codeString)) + return _36; + if ("37".equals(codeString)) + return _37; + if ("38".equals(codeString)) + return _38; + if ("39".equals(codeString)) + return _39; + if ("4".equals(codeString)) + return _4; + if ("40".equals(codeString)) + return _40; + if ("41".equals(codeString)) + return _41; + if ("42".equals(codeString)) + return _42; + if ("43".equals(codeString)) + return _43; + if ("44".equals(codeString)) + return _44; + if ("45".equals(codeString)) + return _45; + if ("46".equals(codeString)) + return _46; + if ("47".equals(codeString)) + return _47; + if ("48".equals(codeString)) + return _48; + if ("49".equals(codeString)) + return _49; + if ("5".equals(codeString)) + return _5; + if ("50".equals(codeString)) + return _50; + if ("51".equals(codeString)) + return _51; + if ("52".equals(codeString)) + return _52; + if ("53".equals(codeString)) + return _53; + if ("54".equals(codeString)) + return _54; + if ("55".equals(codeString)) + return _55; + if ("56".equals(codeString)) + return _56; + if ("57".equals(codeString)) + return _57; + if ("58".equals(codeString)) + return _58; + if ("59".equals(codeString)) + return _59; + if ("6".equals(codeString)) + return _6; + if ("60".equals(codeString)) + return _60; + if ("61".equals(codeString)) + return _61; + if ("62".equals(codeString)) + return _62; + if ("63".equals(codeString)) + return _63; + if ("64".equals(codeString)) + return _64; + if ("65".equals(codeString)) + return _65; + if ("66".equals(codeString)) + return _66; + if ("67".equals(codeString)) + return _67; + if ("68".equals(codeString)) + return _68; + if ("69".equals(codeString)) + return _69; + if ("7".equals(codeString)) + return _7; + if ("70".equals(codeString)) + return _70; + if ("71".equals(codeString)) + return _71; + if ("72".equals(codeString)) + return _72; + if ("73".equals(codeString)) + return _73; + if ("74".equals(codeString)) + return _74; + if ("75".equals(codeString)) + return _75; + if ("76".equals(codeString)) + return _76; + if ("77".equals(codeString)) + return _77; + if ("78".equals(codeString)) + return _78; + if ("79".equals(codeString)) + return _79; + if ("8".equals(codeString)) + return _8; + if ("80".equals(codeString)) + return _80; + if ("81".equals(codeString)) + return _81; + if ("82".equals(codeString)) + return _82; + if ("83".equals(codeString)) + return _83; + if ("84".equals(codeString)) + return _84; + if ("85".equals(codeString)) + return _85; + if ("86".equals(codeString)) + return _86; + if ("87".equals(codeString)) + return _87; + if ("88".equals(codeString)) + return _88; + if ("89".equals(codeString)) + return _89; + if ("9".equals(codeString)) + return _9; + if ("90".equals(codeString)) + return _90; + if ("91".equals(codeString)) + return _91; + if ("92".equals(codeString)) + return _92; + if ("93".equals(codeString)) + return _93; + if ("94".equals(codeString)) + return _94; + if ("95".equals(codeString)) + return _95; + if ("96".equals(codeString)) + return _96; + if ("97".equals(codeString)) + return _97; + if ("98".equals(codeString)) + return _98; + if ("99".equals(codeString)) + return _99; + throw new FHIRException("Unknown V3TribalEntityUS code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case _NATIVEENTITYALASKA: return "_NativeEntityAlaska"; + case _338: return "338"; + case _339: return "339"; + case _340: return "340"; + case _341: return "341"; + case _342: return "342"; + case _343: return "343"; + case _344: return "344"; + case _345: return "345"; + case _346: return "346"; + case _347: return "347"; + case _348: return "348"; + case _349: return "349"; + case _350: return "350"; + case _351: return "351"; + case _352: return "352"; + case _353: return "353"; + case _354: return "354"; + case _355: return "355"; + case _356: return "356"; + case _357: return "357"; + case _358: return "358"; + case _359: return "359"; + case _360: return "360"; + case _361: return "361"; + case _362: return "362"; + case _363: return "363"; + case _364: return "364"; + case _365: return "365"; + case _366: return "366"; + case _367: return "367"; + case _368: return "368"; + case _369: return "369"; + case _370: return "370"; + case _371: return "371"; + case _372: return "372"; + case _373: return "373"; + case _374: return "374"; + case _375: return "375"; + case _376: return "376"; + case _377: return "377"; + case _378: return "378"; + case _379: return "379"; + case _380: return "380"; + case _381: return "381"; + case _382: return "382"; + case _383: return "383"; + case _384: return "384"; + case _385: return "385"; + case _386: return "386"; + case _387: return "387"; + case _388: return "388"; + case _389: return "389"; + case _390: return "390"; + case _391: return "391"; + case _392: return "392"; + case _393: return "393"; + case _394: return "394"; + case _395: return "395"; + case _396: return "396"; + case _397: return "397"; + case _398: return "398"; + case _399: return "399"; + case _400: return "400"; + case _401: return "401"; + case _402: return "402"; + case _403: return "403"; + case _404: return "404"; + case _405: return "405"; + case _406: return "406"; + case _407: return "407"; + case _408: return "408"; + case _409: return "409"; + case _410: return "410"; + case _411: return "411"; + case _412: return "412"; + case _413: return "413"; + case _414: return "414"; + case _415: return "415"; + case _416: return "416"; + case _417: return "417"; + case _418: return "418"; + case _419: return "419"; + case _420: return "420"; + case _421: return "421"; + case _422: return "422"; + case _423: return "423"; + case _424: return "424"; + case _425: return "425"; + case _426: return "426"; + case _427: return "427"; + case _428: return "428"; + case _429: return "429"; + case _430: return "430"; + case _431: return "431"; + case _432: return "432"; + case _433: return "433"; + case _434: return "434"; + case _435: return "435"; + case _436: return "436"; + case _437: return "437"; + case _438: return "438"; + case _439: return "439"; + case _440: return "440"; + case _441: return "441"; + case _442: return "442"; + case _443: return "443"; + case _444: return "444"; + case _445: return "445"; + case _446: return "446"; + case _447: return "447"; + case _448: return "448"; + case _449: return "449"; + case _450: return "450"; + case _451: return "451"; + case _452: return "452"; + case _453: return "453"; + case _454: return "454"; + case _455: return "455"; + case _456: return "456"; + case _457: return "457"; + case _458: return "458"; + case _459: return "459"; + case _460: return "460"; + case _461: return "461"; + case _462: return "462"; + case _463: return "463"; + case _464: return "464"; + case _465: return "465"; + case _466: return "466"; + case _467: return "467"; + case _468: return "468"; + case _469: return "469"; + case _470: return "470"; + case _471: return "471"; + case _472: return "472"; + case _473: return "473"; + case _474: return "474"; + case _475: return "475"; + case _476: return "476"; + case _477: return "477"; + case _478: return "478"; + case _479: return "479"; + case _480: return "480"; + case _481: return "481"; + case _482: return "482"; + case _483: return "483"; + case _484: return "484"; + case _485: return "485"; + case _486: return "486"; + case _487: return "487"; + case _488: return "488"; + case _489: return "489"; + case _490: return "490"; + case _491: return "491"; + case _492: return "492"; + case _493: return "493"; + case _494: return "494"; + case _495: return "495"; + case _496: return "496"; + case _497: return "497"; + case _498: return "498"; + case _499: return "499"; + case _500: return "500"; + case _501: return "501"; + case _502: return "502"; + case _503: return "503"; + case _504: return "504"; + case _505: return "505"; + case _506: return "506"; + case _507: return "507"; + case _508: return "508"; + case _509: return "509"; + case _510: return "510"; + case _511: return "511"; + case _512: return "512"; + case _513: return "513"; + case _514: return "514"; + case _515: return "515"; + case _516: return "516"; + case _517: return "517"; + case _518: return "518"; + case _519: return "519"; + case _520: return "520"; + case _521: return "521"; + case _522: return "522"; + case _523: return "523"; + case _524: return "524"; + case _525: return "525"; + case _526: return "526"; + case _527: return "527"; + case _528: return "528"; + case _529: return "529"; + case _530: return "530"; + case _531: return "531"; + case _532: return "532"; + case _533: return "533"; + case _534: return "534"; + case _535: return "535"; + case _536: return "536"; + case _537: return "537"; + case _538: return "538"; + case _539: return "539"; + case _540: return "540"; + case _541: return "541"; + case _542: return "542"; + case _543: return "543"; + case _544: return "544"; + case _545: return "545"; + case _546: return "546"; + case _547: return "547"; + case _548: return "548"; + case _549: return "549"; + case _550: return "550"; + case _551: return "551"; + case _552: return "552"; + case _553: return "553"; + case _554: return "554"; + case _555: return "555"; + case _556: return "556"; + case _557: return "557"; + case _558: return "558"; + case _559: return "559"; + case _560: return "560"; + case _561: return "561"; + case _562: return "562"; + case _563: return "563"; + case _564: return "564"; + case _565: return "565"; + case _566: return "566"; + case _NATIVEENTITYCONTIGUOUS: return "_NativeEntityContiguous"; + case _1: return "1"; + case _10: return "10"; + case _100: return "100"; + case _101: return "101"; + case _102: return "102"; + case _103: return "103"; + case _104: return "104"; + case _105: return "105"; + case _106: return "106"; + case _107: return "107"; + case _108: return "108"; + case _109: return "109"; + case _11: return "11"; + case _110: return "110"; + case _111: return "111"; + case _112: return "112"; + case _113: return "113"; + case _114: return "114"; + case _115: return "115"; + case _116: return "116"; + case _117: return "117"; + case _118: return "118"; + case _119: return "119"; + case _12: return "12"; + case _120: return "120"; + case _121: return "121"; + case _122: return "122"; + case _123: return "123"; + case _124: return "124"; + case _125: return "125"; + case _126: return "126"; + case _127: return "127"; + case _128: return "128"; + case _129: return "129"; + case _13: return "13"; + case _130: return "130"; + case _131: return "131"; + case _132: return "132"; + case _133: return "133"; + case _134: return "134"; + case _135: return "135"; + case _136: return "136"; + case _137: return "137"; + case _138: return "138"; + case _139: return "139"; + case _14: return "14"; + case _140: return "140"; + case _141: return "141"; + case _142: return "142"; + case _143: return "143"; + case _144: return "144"; + case _145: return "145"; + case _146: return "146"; + case _147: return "147"; + case _148: return "148"; + case _149: return "149"; + case _15: return "15"; + case _150: return "150"; + case _151: return "151"; + case _152: return "152"; + case _153: return "153"; + case _154: return "154"; + case _155: return "155"; + case _156: return "156"; + case _157: return "157"; + case _158: return "158"; + case _159: return "159"; + case _16: return "16"; + case _160: return "160"; + case _161: return "161"; + case _162: return "162"; + case _163: return "163"; + case _164: return "164"; + case _165: return "165"; + case _166: return "166"; + case _167: return "167"; + case _168: return "168"; + case _169: return "169"; + case _17: return "17"; + case _170: return "170"; + case _171: return "171"; + case _172: return "172"; + case _173: return "173"; + case _174: return "174"; + case _175: return "175"; + case _176: return "176"; + case _177: return "177"; + case _178: return "178"; + case _179: return "179"; + case _18: return "18"; + case _180: return "180"; + case _181: return "181"; + case _182: return "182"; + case _183: return "183"; + case _184: return "184"; + case _185: return "185"; + case _186: return "186"; + case _187: return "187"; + case _188: return "188"; + case _189: return "189"; + case _19: return "19"; + case _190: return "190"; + case _191: return "191"; + case _192: return "192"; + case _193: return "193"; + case _194: return "194"; + case _195: return "195"; + case _196: return "196"; + case _197: return "197"; + case _198: return "198"; + case _199: return "199"; + case _2: return "2"; + case _20: return "20"; + case _200: return "200"; + case _201: return "201"; + case _202: return "202"; + case _203: return "203"; + case _204: return "204"; + case _205: return "205"; + case _206: return "206"; + case _207: return "207"; + case _208: return "208"; + case _209: return "209"; + case _21: return "21"; + case _210: return "210"; + case _211: return "211"; + case _212: return "212"; + case _213: return "213"; + case _214: return "214"; + case _215: return "215"; + case _216: return "216"; + case _217: return "217"; + case _218: return "218"; + case _219: return "219"; + case _22: return "22"; + case _220: return "220"; + case _221: return "221"; + case _222: return "222"; + case _223: return "223"; + case _224: return "224"; + case _225: return "225"; + case _226: return "226"; + case _227: return "227"; + case _228: return "228"; + case _229: return "229"; + case _23: return "23"; + case _230: return "230"; + case _231: return "231"; + case _232: return "232"; + case _233: return "233"; + case _234: return "234"; + case _235: return "235"; + case _236: return "236"; + case _237: return "237"; + case _238: return "238"; + case _239: return "239"; + case _24: return "24"; + case _240: return "240"; + case _241: return "241"; + case _242: return "242"; + case _243: return "243"; + case _244: return "244"; + case _245: return "245"; + case _246: return "246"; + case _247: return "247"; + case _248: return "248"; + case _249: return "249"; + case _25: return "25"; + case _250: return "250"; + case _251: return "251"; + case _252: return "252"; + case _253: return "253"; + case _254: return "254"; + case _255: return "255"; + case _256: return "256"; + case _257: return "257"; + case _258: return "258"; + case _259: return "259"; + case _26: return "26"; + case _260: return "260"; + case _261: return "261"; + case _262: return "262"; + case _263: return "263"; + case _264: return "264"; + case _265: return "265"; + case _266: return "266"; + case _267: return "267"; + case _268: return "268"; + case _269: return "269"; + case _27: return "27"; + case _270: return "270"; + case _271: return "271"; + case _272: return "272"; + case _273: return "273"; + case _274: return "274"; + case _275: return "275"; + case _276: return "276"; + case _277: return "277"; + case _278: return "278"; + case _279: return "279"; + case _28: return "28"; + case _280: return "280"; + case _281: return "281"; + case _282: return "282"; + case _283: return "283"; + case _284: return "284"; + case _285: return "285"; + case _286: return "286"; + case _287: return "287"; + case _288: return "288"; + case _289: return "289"; + case _29: return "29"; + case _290: return "290"; + case _291: return "291"; + case _292: return "292"; + case _293: return "293"; + case _294: return "294"; + case _295: return "295"; + case _296: return "296"; + case _297: return "297"; + case _298: return "298"; + case _299: return "299"; + case _3: return "3"; + case _30: return "30"; + case _300: return "300"; + case _301: return "301"; + case _302: return "302"; + case _303: return "303"; + case _304: return "304"; + case _305: return "305"; + case _306: return "306"; + case _307: return "307"; + case _308: return "308"; + case _309: return "309"; + case _31: return "31"; + case _310: return "310"; + case _311: return "311"; + case _312: return "312"; + case _313: return "313"; + case _314: return "314"; + case _315: return "315"; + case _316: return "316"; + case _317: return "317"; + case _318: return "318"; + case _319: return "319"; + case _32: return "32"; + case _320: return "320"; + case _321: return "321"; + case _322: return "322"; + case _323: return "323"; + case _324: return "324"; + case _325: return "325"; + case _326: return "326"; + case _327: return "327"; + case _328: return "328"; + case _329: return "329"; + case _33: return "33"; + case _330: return "330"; + case _331: return "331"; + case _332: return "332"; + case _333: return "333"; + case _334: return "334"; + case _335: return "335"; + case _336: return "336"; + case _337: return "337"; + case _34: return "34"; + case _35: return "35"; + case _36: return "36"; + case _37: return "37"; + case _38: return "38"; + case _39: return "39"; + case _4: return "4"; + case _40: return "40"; + case _41: return "41"; + case _42: return "42"; + case _43: return "43"; + case _44: return "44"; + case _45: return "45"; + case _46: return "46"; + case _47: return "47"; + case _48: return "48"; + case _49: return "49"; + case _5: return "5"; + case _50: return "50"; + case _51: return "51"; + case _52: return "52"; + case _53: return "53"; + case _54: return "54"; + case _55: return "55"; + case _56: return "56"; + case _57: return "57"; + case _58: return "58"; + case _59: return "59"; + case _6: return "6"; + case _60: return "60"; + case _61: return "61"; + case _62: return "62"; + case _63: return "63"; + case _64: return "64"; + case _65: return "65"; + case _66: return "66"; + case _67: return "67"; + case _68: return "68"; + case _69: return "69"; + case _7: return "7"; + case _70: return "70"; + case _71: return "71"; + case _72: return "72"; + case _73: return "73"; + case _74: return "74"; + case _75: return "75"; + case _76: return "76"; + case _77: return "77"; + case _78: return "78"; + case _79: return "79"; + case _8: return "8"; + case _80: return "80"; + case _81: return "81"; + case _82: return "82"; + case _83: return "83"; + case _84: return "84"; + case _85: return "85"; + case _86: return "86"; + case _87: return "87"; + case _88: return "88"; + case _89: return "89"; + case _9: return "9"; + case _90: return "90"; + case _91: return "91"; + case _92: return "92"; + case _93: return "93"; + case _94: return "94"; + case _95: return "95"; + case _96: return "96"; + case _97: return "97"; + case _98: return "98"; + case _99: return "99"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/TribalEntityUS"; + } + public String getDefinition() { + switch (this) { + case _NATIVEENTITYALASKA: return "NATIVE ENTITIES WITHIN THE STATE OF ALASKA RECOGNIZED AND ELIGIBLE TO RECEIVE SERVICES FROM THE UNITED STATES BUREAU OF INDIAN AFFAIRS"; + case _338: return "Village of Afognak"; + case _339: return "Agdaagux Tribe of King Cove"; + case _340: return "Native Village of Akhiok"; + case _341: return "Akiachak Native Community"; + case _342: return "Akiak Native Community"; + case _343: return "Native Village of Akutan"; + case _344: return "Village of Alakanuk"; + case _345: return "Alatna Village"; + case _346: return "Native Village of Aleknagik"; + case _347: return "Algaaciq Native Village (St. Mary's)"; + case _348: return "Allakaket Village"; + case _349: return "Native Village of Ambler"; + case _350: return "Village of Anaktuvuk Pass"; + case _351: return "Yupiit of Andreafski"; + case _352: return "Angoon Community Association"; + case _353: return "Village of Aniak"; + case _354: return "Anvik Village"; + case _355: return "Arctic Village (See Native Village of Venetie Trib"; + case _356: return "Asa carsarmiut Tribe (formerly Native Village of M"; + case _357: return "Native Village of Atka"; + case _358: return "Village of Atmautluak"; + case _359: return "Atqasuk Village (Atkasook)"; + case _360: return "Native Village of Barrow Inupiat Traditional Gover"; + case _361: return "Beaver Village"; + case _362: return "Native Village of Belkofski"; + case _363: return "Village of Bill Moore's Slough"; + case _364: return "Birch Creek Tribe"; + case _365: return "Native Village of Brevig Mission"; + case _366: return "Native Village of Buckland"; + case _367: return "Native Village of Cantwell"; + case _368: return "Native Village of Chanega (aka Chenega)"; + case _369: return "Chalkyitsik Village"; + case _370: return "Village of Chefornak"; + case _371: return "Chevak Native Village"; + case _372: return "Chickaloon Native Village"; + case _373: return "Native Village of Chignik"; + case _374: return "Native Village of Chignik Lagoon"; + case _375: return "Chignik Lake Village"; + case _376: return "Chilkat Indian Village (Klukwan)"; + case _377: return "Chilkoot Indian Association (Haines)"; + case _378: return "Chinik Eskimo Community (Golovin)"; + case _379: return "Native Village of Chistochina"; + case _380: return "Native Village of Chitina"; + case _381: return "Native Village of Chuathbaluk (Russian Mission, Ku"; + case _382: return "Chuloonawick Native Village"; + case _383: return "Circle Native Community"; + case _384: return "Village of Clark's Point"; + case _385: return "Native Village of Council"; + case _386: return "Craig Community Association"; + case _387: return "Village of Crooked Creek"; + case _388: return "Curyung Tribal Council (formerly Native Village of"; + case _389: return "Native Village of Deering"; + case _390: return "Native Village of Diomede (aka Inalik)"; + case _391: return "Village of Dot Lake"; + case _392: return "Douglas Indian Association"; + case _393: return "Native Village of Eagle"; + case _394: return "Native Village of Eek"; + case _395: return "Egegik Village"; + case _396: return "Eklutna Native Village"; + case _397: return "Native Village of Ekuk"; + case _398: return "Ekwok Village"; + case _399: return "Native Village of Elim"; + case _400: return "Emmonak Village"; + case _401: return "Evansville Village (aka Bettles Field)"; + case _402: return "Native Village of Eyak (Cordova)"; + case _403: return "Native Village of False Pass"; + case _404: return "Native Village of Fort Yukon"; + case _405: return "Native Village of Gakona"; + case _406: return "Galena Village (aka Louden Village)"; + case _407: return "Native Village of Gambell"; + case _408: return "Native Village of Georgetown"; + case _409: return "Native Village of Goodnews Bay"; + case _410: return "Organized Village of Grayling (aka Holikachuk)"; + case _411: return "Gulkana Village"; + case _412: return "Native Village of Hamilton"; + case _413: return "Healy Lake Village"; + case _414: return "Holy Cross Village"; + case _415: return "Hoonah Indian Association"; + case _416: return "Native Village of Hooper Bay"; + case _417: return "Hughes Village"; + case _418: return "Huslia Village"; + case _419: return "Hydaburg Cooperative Association"; + case _420: return "Igiugig Village"; + case _421: return "Village of Iliamna"; + case _422: return "Inupiat Community of the Arctic Slope"; + case _423: return "Iqurmuit Traditional Council (formerly Native Vill"; + case _424: return "Ivanoff Bay Village"; + case _425: return "Kaguyak Village"; + case _426: return "Organized Village of Kake"; + case _427: return "Kaktovik Village (aka Barter Island)"; + case _428: return "Village of Kalskag"; + case _429: return "Village of Kaltag"; + case _430: return "Native Village of Kanatak"; + case _431: return "Native Village of Karluk"; + case _432: return "Organized Village of Kasaan"; + case _433: return "Native Village of Kasigluk"; + case _434: return "Kenaitze Indian Tribe"; + case _435: return "Ketchikan Indian Corporation"; + case _436: return "Native Village of Kiana"; + case _437: return "King Island Native Community"; + case _438: return "King Salmon Tribe"; + case _439: return "Native Village of Kipnuk"; + case _440: return "Native Village of Kivalina"; + case _441: return "Klawock Cooperative Association"; + case _442: return "Native Village of Kluti Kaah (aka Copper Center)"; + case _443: return "Knik Tribe"; + case _444: return "Native Village of Kobuk"; + case _445: return "Kokhanok Village"; + case _446: return "Native Village of Kongiganak"; + case _447: return "Village of Kotlik"; + case _448: return "Native Village of Kotzebue"; + case _449: return "Native Village of Koyuk"; + case _450: return "Koyukuk Native Village"; + case _451: return "Organized Village of Kwethluk"; + case _452: return "Native Village of Kwigillingok"; + case _453: return "Native Village of Kwinhagak (aka Quinhagak)"; + case _454: return "Native Village of Larsen Bay"; + case _455: return "Levelock Village"; + case _456: return "Lesnoi Village (aka Woody Island)"; + case _457: return "Lime Village"; + case _458: return "Village of Lower Kalskag"; + case _459: return "Manley Hot Springs Village"; + case _460: return "Manokotak Village"; + case _461: return "Native Village of Marshall (aka Fortuna Ledge)"; + case _462: return "Native Village of Mary's Igloo"; + case _463: return "McGrath Native Village"; + case _464: return "Native Village of Mekoryuk"; + case _465: return "Mentasta Traditional Council"; + case _466: return "Metlakatla Indian Community, Annette Island Reserv"; + case _467: return "Native Village of Minto"; + case _468: return "Naknek Native Village"; + case _469: return "Native Village of Nanwalek (aka English Bay)"; + case _470: return "Native Village of Napaimute"; + case _471: return "Native Village of Napakiak"; + case _472: return "Native Village of Napaskiak"; + case _473: return "Native Village of Nelson Lagoon"; + case _474: return "Nenana Native Association"; + case _475: return "New Koliganek Village Council (formerly Koliganek"; + case _476: return "New Stuyahok Village"; + case _477: return "Newhalen Village"; + case _478: return "Newtok Village"; + case _479: return "Native Village of Nightmute"; + case _480: return "Nikolai Village"; + case _481: return "Native Village of Nikolski"; + case _482: return "Ninilchik Village"; + case _483: return "Native Village of Noatak"; + case _484: return "Nome Eskimo Community"; + case _485: return "Nondalton Village"; + case _486: return "Noorvik Native Community"; + case _487: return "Northway Village"; + case _488: return "Native Village of Nuiqsut (aka Nooiksut)"; + case _489: return "Nulato Village"; + case _490: return "Nunakauyarmiut Tribe (formerly Native Village of T"; + case _491: return "Native Village of Nunapitchuk"; + case _492: return "Village of Ohogamiut"; + case _493: return "Village of Old Harbor"; + case _494: return "Orutsararmuit Native Village (aka Bethel)"; + case _495: return "Oscarville Traditional Village"; + case _496: return "Native Village of Ouzinkie"; + case _497: return "Native Village of Paimiut"; + case _498: return "Pauloff Harbor Village"; + case _499: return "Pedro Bay Village"; + case _500: return "Native Village of Perryville"; + case _501: return "Petersburg Indian Association"; + case _502: return "Native Village of Pilot Point"; + case _503: return "Pilot Station Traditional Village"; + case _504: return "Native Village of Pitka's Point"; + case _505: return "Platinum Traditional Village"; + case _506: return "Native Village of Point Hope"; + case _507: return "Native Village of Point Lay"; + case _508: return "Native Village of Port Graham"; + case _509: return "Native Village of Port Heiden"; + case _510: return "Native Village of Port Lions"; + case _511: return "Portage Creek Village (aka Ohgsenakale)"; + case _512: return "Pribilof Islands Aleut Communities of St. Paul & S"; + case _513: return "Qagan Tayagungin Tribe of Sand Point Village"; + case _514: return "Qawalangin Tribe of Unalaska"; + case _515: return "Rampart Village"; + case _516: return "Village of Red Devil"; + case _517: return "Native Village of Ruby"; + case _518: return "Saint George Island(See Pribilof Islands Aleut Com"; + case _519: return "Native Village of Saint Michael"; + case _520: return "Saint Paul Island (See Pribilof Islands Aleut Comm"; + case _521: return "Village of Salamatoff"; + case _522: return "Native Village of Savoonga"; + case _523: return "Organized Village of Saxman"; + case _524: return "Native Village of Scammon Bay"; + case _525: return "Native Village of Selawik"; + case _526: return "Seldovia Village Tribe"; + case _527: return "Shageluk Native Village"; + case _528: return "Native Village of Shaktoolik"; + case _529: return "Native Village of Sheldon's Point"; + case _530: return "Native Village of Shishmaref"; + case _531: return "Shoonaq Tribe of Kodiak"; + case _532: return "Native Village of Shungnak"; + case _533: return "Sitka Tribe of Alaska"; + case _534: return "Skagway Village"; + case _535: return "Village of Sleetmute"; + case _536: return "Village of Solomon"; + case _537: return "South Naknek Village"; + case _538: return "Stebbins Community Association"; + case _539: return "Native Village of Stevens"; + case _540: return "Village of Stony River"; + case _541: return "Takotna Village"; + case _542: return "Native Village of Tanacross"; + case _543: return "Native Village of Tanana"; + case _544: return "Native Village of Tatitlek"; + case _545: return "Native Village of Tazlina"; + case _546: return "Telida Village"; + case _547: return "Native Village of Teller"; + case _548: return "Native Village of Tetlin"; + case _549: return "Central Council of the Tlingit and Haida Indian Tb"; + case _550: return "Traditional Village of Togiak"; + case _551: return "Tuluksak Native Community"; + case _552: return "Native Village of Tuntutuliak"; + case _553: return "Native Village of Tununak"; + case _554: return "Twin Hills Village"; + case _555: return "Native Village of Tyonek"; + case _556: return "Ugashik Village"; + case _557: return "Umkumiute Native Village"; + case _558: return "Native Village of Unalakleet"; + case _559: return "Native Village of Unga"; + case _560: return "Village of Venetie (See Native Village of Venetie"; + case _561: return "Native Village of Venetie Tribal Government (Arcti"; + case _562: return "Village of Wainwright"; + case _563: return "Native Village of Wales"; + case _564: return "Native Village of White Mountain"; + case _565: return "Wrangell Cooperative Association"; + case _566: return "Yakutat Tlingit Tribe"; + case _NATIVEENTITYCONTIGUOUS: return "NATIVE ENTITIES WITHIN THE CONTIGUOUS 48 STATES"; + case _1: return "Absentee-Shawnee Tribe of Indians of Oklahoma"; + case _10: return "Assiniboine and Sioux Tribes of the Fort Peck Indi"; + case _100: return "Havasupai Tribe of the Havasupai Reservation, Ariz"; + case _101: return "Ho-Chunk Nation of Wisconsin (formerly known as th"; + case _102: return "Hoh Indian Tribe of the Hoh Indian Reservation, Wa"; + case _103: return "Hoopa Valley Tribe, California"; + case _104: return "Hopi Tribe of Arizona"; + case _105: return "Hopland Band of Pomo Indians of the Hopland Ranche"; + case _106: return "Houlton Band of Maliseet Indians of Maine"; + case _107: return "Hualapai Indian Tribe of the Hualapai Indian Reser"; + case _108: return "Huron Potawatomi, Inc., Michigan"; + case _109: return "Inaja Band of Diegueno Mission Indians of the Inaj"; + case _11: return "Augustine Band of Cahuilla Mission Indians of the"; + case _110: return "Ione Band of Miwok Indians of California"; + case _111: return "Iowa Tribe of Kansas and Nebraska"; + case _112: return "Iowa Tribe of Oklahoma"; + case _113: return "Jackson Rancheria of Me-Wuk Indians of California"; + case _114: return "Jamestown S'Klallam Tribe of Washington"; + case _115: return "Jamul Indian Village of California"; + case _116: return "Jena Band of Choctaw Indians, Louisiana"; + case _117: return "Jicarilla Apache Tribe of the Jicarilla Apache Ind"; + case _118: return "Kaibab Band of Paiute Indians of the Kaibab Indian"; + case _119: return "Kalispel Indian Community of the Kalispel Reservat"; + case _12: return "Bad River Band of the Lake Superior Tribe of Chipp"; + case _120: return "Karuk Tribe of California"; + case _121: return "Kashia Band of Pomo Indians of the Stewarts Point"; + case _122: return "Kaw Nation, Oklahoma"; + case _123: return "Keweenaw Bay Indian Community of L'Anse and Ontona"; + case _124: return "Kialegee Tribal Town, Oklahoma"; + case _125: return "Kickapoo Tribe of Indians of the Kickapoo Reservat"; + case _126: return "Kickapoo Tribe of Oklahoma"; + case _127: return "Kickapoo Traditional Tribe of Texas"; + case _128: return "Kiowa Indian Tribe of Oklahoma"; + case _129: return "Klamath Indian Tribe of Oregon"; + case _13: return "Bay Mills Indian Community of the Sault Ste. Marie"; + case _130: return "Kootenai Tribe of Idaho"; + case _131: return "La Jolla Band of Luiseno Mission Indians of the La"; + case _132: return "La Posta Band of Diegueno Mission Indians of the L"; + case _133: return "Lac Courte Oreilles Band of Lake Superior Chippewa"; + case _134: return "Lac du Flambeau Band of Lake Superior Chippewa Ind"; + case _135: return "Lac Vieux Desert Band of Lake Superior Chippewa In"; + case _136: return "Las Vegas Tribe of Paiute Indians of the Las Vegas"; + case _137: return "Little River Band of Ottawa Indians of Michigan"; + case _138: return "Little Traverse Bay Bands of Odawa Indians of Mich"; + case _139: return "Lower Lake Rancheria, California"; + case _14: return "Bear River Band of the Rohnerville Rancheria, Cali"; + case _140: return "Los Coyotes Band of Cahuilla Mission Indians of th"; + case _141: return "Lovelock Paiute Tribe of the Lovelock Indian Colon"; + case _142: return "Lower Brule Sioux Tribe of the Lower Brule Reserva"; + case _143: return "Lower Elwha Tribal Community of the Lower Elwha Re"; + case _144: return "Lower Sioux Indian Community of Minnesota Mdewakan"; + case _145: return "Lummi Tribe of the Lummi Reservation, Washington"; + case _146: return "Lytton Rancheria of California"; + case _147: return "Makah Indian Tribe of the Makah Indian Reservation"; + case _148: return "Manchester Band of Pomo Indians of the Manchester-"; + case _149: return "Manzanita Band of Diegueno Mission Indians of the"; + case _15: return "Berry Creek Rancheria of Maidu Indians of Californ"; + case _150: return "Mashantucket Pequot Tribe of Connecticut"; + case _151: return "Match-e-be-nash-she-wish Band of Pottawatomi India"; + case _152: return "Mechoopda Indian Tribe of Chico Rancheria, Califor"; + case _153: return "Menominee Indian Tribe of Wisconsin"; + case _154: return "Mesa Grande Band of Diegueno Mission Indians of th"; + case _155: return "Mescalero Apache Tribe of the Mescalero Reservatio"; + case _156: return "Miami Tribe of Oklahoma"; + case _157: return "Miccosukee Tribe of Indians of Florida"; + case _158: return "Middletown Rancheria of Pomo Indians of California"; + case _159: return "Minnesota Chippewa Tribe, Minnesota (Six component"; + case _16: return "Big Lagoon Rancheria, California"; + case _160: return "Bois Forte Band (Nett Lake); Fond du Lac Band; Gra"; + case _161: return "Mississippi Band of Choctaw Indians, Mississippi"; + case _162: return "Moapa Band of Paiute Indians of the Moapa River In"; + case _163: return "Modoc Tribe of Oklahoma"; + case _164: return "Mohegan Indian Tribe of Connecticut"; + case _165: return "Mooretown Rancheria of Maidu Indians of California"; + case _166: return "Morongo Band of Cahuilla Mission Indians of the Mo"; + case _167: return "Muckleshoot Indian Tribe of the Muckleshoot Reserv"; + case _168: return "Muscogee (Creek) Nation, Oklahoma"; + case _169: return "Narragansett Indian Tribe of Rhode Island"; + case _17: return "Big Pine Band of Owens Valley Paiute Shoshone Indi"; + case _170: return "Navajo Nation, Arizona, New Mexico & Utah"; + case _171: return "Nez Perce Tribe of Idaho"; + case _172: return "Nisqually Indian Tribe of the Nisqually Reservatio"; + case _173: return "Nooksack Indian Tribe of Washington"; + case _174: return "Northern Cheyenne Tribe of the Northern Cheyenne I"; + case _175: return "Northfork Rancheria of Mono Indians of California"; + case _176: return "Northwestern Band of Shoshoni Nation of Utah (Wash"; + case _177: return "Oglala Sioux Tribe of the Pine Ridge Reservation,"; + case _178: return "Omaha Tribe of Nebraska"; + case _179: return "Oneida Nation of New York"; + case _18: return "Big Sandy Rancheria of Mono Indians of California"; + case _180: return "Oneida Tribe of Wisconsin"; + case _181: return "Onondaga Nation of New York"; + case _182: return "Osage Tribe, Oklahoma"; + case _183: return "Ottawa Tribe of Oklahoma"; + case _184: return "Otoe-Missouria Tribe of Indians, Oklahoma"; + case _185: return "Paiute Indian Tribe of Utah"; + case _186: return "Paiute-Shoshone Indians of the Bishop Community of"; + case _187: return "Paiute-Shoshone Tribe of the Fallon Reservation an"; + case _188: return "Paiute-Shoshone Indians of the Lone Pine Community"; + case _189: return "Pala Band of Luiseno Mission Indians of the Pala R"; + case _19: return "Big Valley Band of Pomo Indians of the Big Valley"; + case _190: return "Pascua Yaqui Tribe of Arizona"; + case _191: return "Paskenta Band of Nomlaki Indians of California"; + case _192: return "Passamaquoddy Tribe of Maine"; + case _193: return "Pauma Band of Luiseno Mission Indians of the Pauma"; + case _194: return "Pawnee Nation of Oklahoma"; + case _195: return "Pechanga Band of Luiseno Mission Indians of the Pe"; + case _196: return "Penobscot Tribe of Maine"; + case _197: return "Peoria Tribe of Indians of Oklahoma"; + case _198: return "Picayune Rancheria of Chukchansi Indians of Califo"; + case _199: return "Pinoleville Rancheria of Pomo Indians of Californi"; + case _2: return "Agua Caliente Band of Cahuilla Indians of the Agua"; + case _20: return "Blackfeet Tribe of the Blackfeet Indian Reservatio"; + case _200: return "Pit River Tribe, California (includes Big Bend, Lo"; + case _201: return "Poarch Band of Creek Indians of Alabama"; + case _202: return "Pokagon Band of Potawatomi Indians of Michigan"; + case _203: return "Ponca Tribe of Indians of Oklahoma"; + case _204: return "Ponca Tribe of Nebraska"; + case _205: return "Port Gamble Indian Community of the Port Gamble Re"; + case _206: return "Potter Valley Rancheria of Pomo Indians of Califor"; + case _207: return "Prairie Band of Potawatomi Indians, Kansas"; + case _208: return "Prairie Island Indian Community of Minnesota Mdewa"; + case _209: return "Pueblo of Acoma, New Mexico"; + case _21: return "Blue Lake Rancheria, California"; + case _210: return "Pueblo of Cochiti, New Mexico"; + case _211: return "Pueblo of Jemez, New Mexico"; + case _212: return "Pueblo of Isleta, New Mexico"; + case _213: return "Pueblo of Laguna, New Mexico"; + case _214: return "Pueblo of Nambe, New Mexico"; + case _215: return "Pueblo of Picuris, New Mexico"; + case _216: return "Pueblo of Pojoaque, New Mexico"; + case _217: return "Pueblo of San Felipe, New Mexico"; + case _218: return "Pueblo of San Juan, New Mexico"; + case _219: return "Pueblo of San Ildefonso, New Mexico"; + case _22: return "Bridgeport Paiute Indian Colony of California"; + case _220: return "Pueblo of Sandia, New Mexico"; + case _221: return "Pueblo of Santa Ana, New Mexico"; + case _222: return "Pueblo of Santa Clara, New Mexico"; + case _223: return "Pueblo of Santo Domingo, New Mexico"; + case _224: return "Pueblo of Taos, New Mexico"; + case _225: return "Pueblo of Tesuque, New Mexico"; + case _226: return "Pueblo of Zia, New Mexico"; + case _227: return "Puyallup Tribe of the Puyallup Reservation, Washin"; + case _228: return "Pyramid Lake Paiute Tribe of the Pyramid Lake Rese"; + case _229: return "Quapaw Tribe of Indians, Oklahoma"; + case _23: return "Buena Vista Rancheria of Me-Wuk Indians of Califor"; + case _230: return "Quartz Valley Indian Community of the Quartz Valle"; + case _231: return "Quechan Tribe of the Fort Yuma Indian Reservation,"; + case _232: return "Quileute Tribe of the Quileute Reservation, Washin"; + case _233: return "Quinault Tribe of the Quinault Reservation, Washin"; + case _234: return "Ramona Band or Village of Cahuilla Mission Indians"; + case _235: return "Red Cliff Band of Lake Superior Chippewa Indians o"; + case _236: return "Red Lake Band of Chippewa Indians of the Red Lake"; + case _237: return "Redding Rancheria, California"; + case _238: return "Redwood Valley Rancheria of Pomo Indians of Califo"; + case _239: return "Reno-Sparks Indian Colony, Nevada"; + case _24: return "Burns Paiute Tribe of the Burns Paiute Indian Colo"; + case _240: return "Resighini Rancheria, California (formerly known as"; + case _241: return "Rincon Band of Luiseno Mission Indians of the Rinc"; + case _242: return "Robinson Rancheria of Pomo Indians of California"; + case _243: return "Rosebud Sioux Tribe of the Rosebud Indian Reservat"; + case _244: return "Round Valley Indian Tribes of the Round Valley Res"; + case _245: return "Rumsey Indian Rancheria of Wintun Indians of Calif"; + case _246: return "Sac and Fox Tribe of the Mississippi in Iowa"; + case _247: return "Sac and Fox Nation of Missouri in Kansas and Nebra"; + case _248: return "Sac and Fox Nation, Oklahoma"; + case _249: return "Saginaw Chippewa Indian Tribe of Michigan, Isabell"; + case _25: return "Cabazon Band of Cahuilla Mission Indians of the Ca"; + case _250: return "Salt River Pima-Maricopa Indian Community of the S"; + case _251: return "Samish Indian Tribe, Washington"; + case _252: return "San Carlos Apache Tribe of the San Carlos Reservat"; + case _253: return "San Juan Southern Paiute Tribe of Arizona"; + case _254: return "San Manual Band of Serrano Mission Indians of the"; + case _255: return "San Pasqual Band of Diegueno Mission Indians of Ca"; + case _256: return "Santa Rosa Indian Community of the Santa Rosa Ranc"; + case _257: return "Santa Rosa Band of Cahuilla Mission Indians of the"; + case _258: return "Santa Ynez Band of Chumash Mission Indians of the"; + case _259: return "Santa Ysabel Band of Diegueno Mission Indians of t"; + case _26: return "Cachil DeHe Band of Wintun Indians of the Colusa I"; + case _260: return "Santee Sioux Tribe of the Santee Reservation of Ne"; + case _261: return "Sauk-Suiattle Indian Tribe of Washington"; + case _262: return "Sault Ste. Marie Tribe of Chippewa Indians of Mich"; + case _263: return "Scotts Valley Band of Pomo Indians of California"; + case _264: return "Seminole Nation of Oklahoma"; + case _265: return "Seminole Tribe of Florida, Dania, Big Cypress, Bri"; + case _266: return "Seneca Nation of New York"; + case _267: return "Seneca-Cayuga Tribe of Oklahoma"; + case _268: return "Shakopee Mdewakanton Sioux Community of Minnesota"; + case _269: return "Shawnee Tribe, Oklahoma"; + case _27: return "Caddo Indian Tribe of Oklahoma"; + case _270: return "Sherwood Valley Rancheria of Pomo Indians of Calif"; + case _271: return "Shingle Springs Band of Miwok Indians, Shingle Spr"; + case _272: return "Shoalwater Bay Tribe of the Shoalwater Bay Indian"; + case _273: return "Shoshone Tribe of the Wind River Reservation, Wyom"; + case _274: return "Shoshone-Bannock Tribes of the Fort Hall Reservati"; + case _275: return "Shoshone-Paiute Tribes of the Duck Valley Reservat"; + case _276: return "Sisseton-Wahpeton Sioux Tribe of the Lake Traverse"; + case _277: return "Skokomish Indian Tribe of the Skokomish Reservatio"; + case _278: return "Skull Valley Band of Goshute Indians of Utah"; + case _279: return "Smith River Rancheria, California"; + case _28: return "Cahuilla Band of Mission Indians of the Cahuilla R"; + case _280: return "Snoqualmie Tribe, Washington"; + case _281: return "Soboba Band of Luiseno Indians, California (former"; + case _282: return "Sokaogon Chippewa Community of the Mole Lake Band"; + case _283: return "Southern Ute Indian Tribe of the Southern Ute Rese"; + case _284: return "Spirit Lake Tribe, North Dakota (formerly known as"; + case _285: return "Spokane Tribe of the Spokane Reservation, Washingt"; + case _286: return "Squaxin Island Tribe of the Squaxin Island Reserva"; + case _287: return "St. Croix Chippewa Indians of Wisconsin, St. Croix"; + case _288: return "St. Regis Band of Mohawk Indians of New York"; + case _289: return "Standing Rock Sioux Tribe of North & South Dakota"; + case _29: return "Cahto Indian Tribe of the Laytonville Rancheria, C"; + case _290: return "Stockbridge-Munsee Community of Mohican Indians of"; + case _291: return "Stillaguamish Tribe of Washington"; + case _292: return "Summit Lake Paiute Tribe of Nevada"; + case _293: return "Suquamish Indian Tribe of the Port Madison Reserva"; + case _294: return "Susanville Indian Rancheria, California"; + case _295: return "Swinomish Indians of the Swinomish Reservation, Wa"; + case _296: return "Sycuan Band of Diegueno Mission Indians of Califor"; + case _297: return "Table Bluff Reservation - Wiyot Tribe, California"; + case _298: return "Table Mountain Rancheria of California"; + case _299: return "Te-Moak Tribe of Western Shoshone Indians of Nevad"; + case _3: return "Ak Chin Indian Community of the Maricopa (Ak Chin)"; + case _30: return "California Valley Miwok Tribe, California (formerl"; + case _300: return "Thlopthlocco Tribal Town, Oklahoma"; + case _301: return "Three Affiliated Tribes of the Fort Berthold Reser"; + case _302: return "Tohono O'odham Nation of Arizona"; + case _303: return "Tonawanda Band of Seneca Indians of New York"; + case _304: return "Tonkawa Tribe of Indians of Oklahoma"; + case _305: return "Tonto Apache Tribe of Arizona"; + case _306: return "Torres-Martinez Band of Cahuilla Mission Indians o"; + case _307: return "Tule River Indian Tribe of the Tule River Reservat"; + case _308: return "Tulalip Tribes of the Tulalip Reservation, Washing"; + case _309: return "Tunica-Biloxi Indian Tribe of Louisiana"; + case _31: return "Campo Band of Diegueno Mission Indians of the Camp"; + case _310: return "Tuolumne Band of Me-Wuk Indians of the Tuolumne Ra"; + case _311: return "Turtle Mountain Band of Chippewa Indians of North"; + case _312: return "Tuscarora Nation of New York"; + case _313: return "Twenty-Nine Palms Band of Mission Indians of Calif"; + case _314: return "United Auburn Indian Community of the Auburn Ranch"; + case _315: return "United Keetoowah Band of Cherokee Indians of Oklah"; + case _316: return "Upper Lake Band of Pomo Indians of Upper Lake Ranc"; + case _317: return "Upper Sioux Indian Community of the Upper Sioux Re"; + case _318: return "Upper Skagit Indian Tribe of Washington"; + case _319: return "Ute Indian Tribe of the Uintah & Ouray Reservation"; + case _32: return "Capitan Grande Band of Diegueno Mission Indians of"; + case _320: return "Ute Mountain Tribe of the Ute Mountain Reservation"; + case _321: return "Utu Utu Gwaitu Paiute Tribe of the Benton Paiute R"; + case _322: return "Walker River Paiute Tribe of the Walker River Rese"; + case _323: return "Wampanoag Tribe of Gay Head (Aquinnah) of Massachu"; + case _324: return "Washoe Tribe of Nevada & California (Carson Colony"; + case _325: return "White Mountain Apache Tribe of the Fort Apache Res"; + case _326: return "Wichita and Affiliated Tribes (Wichita, Keechi, Wa"; + case _327: return "Winnebago Tribe of Nebraska"; + case _328: return "Winnemucca Indian Colony of Nevada"; + case _329: return "Wyandotte Tribe of Oklahoma"; + case _33: return "Barona Group of Capitan Grande Band of Mission Ind"; + case _330: return "Yankton Sioux Tribe of South Dakota"; + case _331: return "Yavapai-Apache Nation of the Camp Verde Indian Res"; + case _332: return "Yavapai-Prescott Tribe of the Yavapai Reservation,"; + case _333: return "Yerington Paiute Tribe of the Yerington Colony & C"; + case _334: return "Yomba Shoshone Tribe of the Yomba Reservation, Nev"; + case _335: return "Ysleta Del Sur Pueblo of Texas"; + case _336: return "Yurok Tribe of the Yurok Reservation, California"; + case _337: return "Zuni Tribe of the Zuni Reservation, New Mexico"; + case _34: return "Viejas (Baron Long) Group of Capitan Grande Band o"; + case _35: return "Catawba Indian Nation (aka Catawba Tribe of South"; + case _36: return "Cayuga Nation of New York"; + case _37: return "Cedarville Rancheria, California"; + case _38: return "Chemehuevi Indian Tribe of the Chemehuevi Reservat"; + case _39: return "Cher-Ae Heights Indian Community of the Trinidad R"; + case _4: return "Alabama-Coushatta Tribes of Texas"; + case _40: return "Cherokee Nation, Oklahoma"; + case _41: return "Cheyenne-Arapaho Tribes of Oklahoma"; + case _42: return "Cheyenne River Sioux Tribe of the Cheyenne River R"; + case _43: return "Chickasaw Nation, Oklahoma"; + case _44: return "Chicken Ranch Rancheria of Me-Wuk Indians of Calif"; + case _45: return "Chippewa-Cree Indians of the Rocky Boy's Reservati"; + case _46: return "Chitimacha Tribe of Louisiana"; + case _47: return "Choctaw Nation of Oklahoma"; + case _48: return "Citizen Potawatomi Nation, Oklahoma"; + case _49: return "Cloverdale Rancheria of Pomo Indians of California"; + case _5: return "Alabama-Quassarte Tribal Town, Oklahoma"; + case _50: return "Cocopah Tribe of Arizona"; + case _51: return "Coeur D'Alene Tribe of the Coeur D'Alene Reservati"; + case _52: return "Cold Springs Rancheria of Mono Indians of Californ"; + case _53: return "Colorado River Indian Tribes of the Colorado River"; + case _54: return "Comanche Indian Tribe, Oklahoma"; + case _55: return "Confederated Salish & Kootenai Tribes of the Flath"; + case _56: return "Confederated Tribes of the Chehalis Reservation, W"; + case _57: return "Confederated Tribes of the Colville Reservation, W"; + case _58: return "Confederated Tribes of the Coos, Lower Umpqua and"; + case _59: return "Confederated Tribes of the Goshute Reservation, Ne"; + case _6: return "Alturas Indian Rancheria, California"; + case _60: return "Confederated Tribes of the Grand Ronde Community o"; + case _61: return "Confederated Tribes of the Siletz Reservation, Ore"; + case _62: return "Confederated Tribes of the Umatilla Reservation, O"; + case _63: return "Confederated Tribes of the Warm Springs Reservatio"; + case _64: return "Confederated Tribes and Bands of the Yakama Indian"; + case _65: return "Coquille Tribe of Oregon"; + case _66: return "Cortina Indian Rancheria of Wintun Indians of Cali"; + case _67: return "Coushatta Tribe of Louisiana"; + case _68: return "Cow Creek Band of Umpqua Indians of Oregon"; + case _69: return "Coyote Valley Band of Pomo Indians of California"; + case _7: return "Apache Tribe of Oklahoma"; + case _70: return "Crow Tribe of Montana"; + case _71: return "Crow Creek Sioux Tribe of the Crow Creek Reservati"; + case _72: return "Cuyapaipe Community of Diegueno Mission Indians of"; + case _73: return "Death Valley Timbi-Sha Shoshone Band of California"; + case _74: return "Delaware Nation, Oklahoma (formerly Delaware Tribe"; + case _75: return "Delaware Tribe of Indians, Oklahoma"; + case _76: return "Dry Creek Rancheria of Pomo Indians of California"; + case _77: return "Duckwater Shoshone Tribe of the Duckwater Reservat"; + case _78: return "Eastern Band of Cherokee Indians of North Carolina"; + case _79: return "Eastern Shawnee Tribe of Oklahoma"; + case _8: return "Arapahoe Tribe of the Wind River Reservation, Wyom"; + case _80: return "Elem Indian Colony of Pomo Indians of the Sulphur"; + case _81: return "Elk Valley Rancheria, California"; + case _82: return "Ely Shoshone Tribe of Nevada"; + case _83: return "Enterprise Rancheria of Maidu Indians of Californi"; + case _84: return "Flandreau Santee Sioux Tribe of South Dakota"; + case _85: return "Forest County Potawatomi Community of Wisconsin Po"; + case _86: return "Fort Belknap Indian Community of the Fort Belknap"; + case _87: return "Fort Bidwell Indian Community of the Fort Bidwell"; + case _88: return "Fort Independence Indian Community of Paiute India"; + case _89: return "Fort McDermitt Paiute and Shoshone Tribes of the F"; + case _9: return "Aroostook Band of Micmac Indians of Maine"; + case _90: return "Fort McDowell Yavapai Nation, Arizona (formerly th"; + case _91: return "Fort Mojave Indian Tribe of Arizona, California"; + case _92: return "Fort Sill Apache Tribe of Oklahoma"; + case _93: return "Gila River Indian Community of the Gila River Indi"; + case _94: return "Grand Traverse Band of Ottawa & Chippewa Indians o"; + case _95: return "Graton Rancheria, California"; + case _96: return "Greenville Rancheria of Maidu Indians of Californi"; + case _97: return "Grindstone Indian Rancheria of Wintun-Wailaki Indi"; + case _98: return "Guidiville Rancheria of California"; + case _99: return "Hannahville Indian Community of Wisconsin Potawato"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case _NATIVEENTITYALASKA: return "NativeEntityAlaska"; + case _338: return "Village of Afognak"; + case _339: return "Agdaagux Tribe of King Cove"; + case _340: return "Native Village of Akhiok"; + case _341: return "Akiachak Native Community"; + case _342: return "Akiak Native Community"; + case _343: return "Native Village of Akutan"; + case _344: return "Village of Alakanuk"; + case _345: return "Alatna Village"; + case _346: return "Native Village of Aleknagik"; + case _347: return "Algaaciq Native Village (St. Mary's)"; + case _348: return "Allakaket Village"; + case _349: return "Native Village of Ambler"; + case _350: return "Village of Anaktuvuk Pass"; + case _351: return "Yupiit of Andreafski"; + case _352: return "Angoon Community Association"; + case _353: return "Village of Aniak"; + case _354: return "Anvik Village"; + case _355: return "Arctic Village (See Native Village of Venetie Trib"; + case _356: return "Asa carsarmiut Tribe (formerly Native Village of M"; + case _357: return "Native Village of Atka"; + case _358: return "Village of Atmautluak"; + case _359: return "Atqasuk Village (Atkasook)"; + case _360: return "Native Village of Barrow Inupiat Traditional Gover"; + case _361: return "Beaver Village"; + case _362: return "Native Village of Belkofski"; + case _363: return "Village of Bill Moore's Slough"; + case _364: return "Birch Creek Tribe"; + case _365: return "Native Village of Brevig Mission"; + case _366: return "Native Village of Buckland"; + case _367: return "Native Village of Cantwell"; + case _368: return "Native Village of Chanega (aka Chenega)"; + case _369: return "Chalkyitsik Village"; + case _370: return "Village of Chefornak"; + case _371: return "Chevak Native Village"; + case _372: return "Chickaloon Native Village"; + case _373: return "Native Village of Chignik"; + case _374: return "Native Village of Chignik Lagoon"; + case _375: return "Chignik Lake Village"; + case _376: return "Chilkat Indian Village (Klukwan)"; + case _377: return "Chilkoot Indian Association (Haines)"; + case _378: return "Chinik Eskimo Community (Golovin)"; + case _379: return "Native Village of Chistochina"; + case _380: return "Native Village of Chitina"; + case _381: return "Native Village of Chuathbaluk (Russian Mission, Ku"; + case _382: return "Chuloonawick Native Village"; + case _383: return "Circle Native Community"; + case _384: return "Village of Clark's Point"; + case _385: return "Native Village of Council"; + case _386: return "Craig Community Association"; + case _387: return "Village of Crooked Creek"; + case _388: return "Curyung Tribal Council (formerly Native Village of"; + case _389: return "Native Village of Deering"; + case _390: return "Native Village of Diomede (aka Inalik)"; + case _391: return "Village of Dot Lake"; + case _392: return "Douglas Indian Association"; + case _393: return "Native Village of Eagle"; + case _394: return "Native Village of Eek"; + case _395: return "Egegik Village"; + case _396: return "Eklutna Native Village"; + case _397: return "Native Village of Ekuk"; + case _398: return "Ekwok Village"; + case _399: return "Native Village of Elim"; + case _400: return "Emmonak Village"; + case _401: return "Evansville Village (aka Bettles Field)"; + case _402: return "Native Village of Eyak (Cordova)"; + case _403: return "Native Village of False Pass"; + case _404: return "Native Village of Fort Yukon"; + case _405: return "Native Village of Gakona"; + case _406: return "Galena Village (aka Louden Village)"; + case _407: return "Native Village of Gambell"; + case _408: return "Native Village of Georgetown"; + case _409: return "Native Village of Goodnews Bay"; + case _410: return "Organized Village of Grayling (aka Holikachuk)"; + case _411: return "Gulkana Village"; + case _412: return "Native Village of Hamilton"; + case _413: return "Healy Lake Village"; + case _414: return "Holy Cross Village"; + case _415: return "Hoonah Indian Association"; + case _416: return "Native Village of Hooper Bay"; + case _417: return "Hughes Village"; + case _418: return "Huslia Village"; + case _419: return "Hydaburg Cooperative Association"; + case _420: return "Igiugig Village"; + case _421: return "Village of Iliamna"; + case _422: return "Inupiat Community of the Arctic Slope"; + case _423: return "Iqurmuit Traditional Council (formerly Native Vill"; + case _424: return "Ivanoff Bay Village"; + case _425: return "Kaguyak Village"; + case _426: return "Organized Village of Kake"; + case _427: return "Kaktovik Village (aka Barter Island)"; + case _428: return "Village of Kalskag"; + case _429: return "Village of Kaltag"; + case _430: return "Native Village of Kanatak"; + case _431: return "Native Village of Karluk"; + case _432: return "Organized Village of Kasaan"; + case _433: return "Native Village of Kasigluk"; + case _434: return "Kenaitze Indian Tribe"; + case _435: return "Ketchikan Indian Corporation"; + case _436: return "Native Village of Kiana"; + case _437: return "King Island Native Community"; + case _438: return "King Salmon Tribe"; + case _439: return "Native Village of Kipnuk"; + case _440: return "Native Village of Kivalina"; + case _441: return "Klawock Cooperative Association"; + case _442: return "Native Village of Kluti Kaah (aka Copper Center)"; + case _443: return "Knik Tribe"; + case _444: return "Native Village of Kobuk"; + case _445: return "Kokhanok Village"; + case _446: return "Native Village of Kongiganak"; + case _447: return "Village of Kotlik"; + case _448: return "Native Village of Kotzebue"; + case _449: return "Native Village of Koyuk"; + case _450: return "Koyukuk Native Village"; + case _451: return "Organized Village of Kwethluk"; + case _452: return "Native Village of Kwigillingok"; + case _453: return "Native Village of Kwinhagak (aka Quinhagak)"; + case _454: return "Native Village of Larsen Bay"; + case _455: return "Levelock Village"; + case _456: return "Lesnoi Village (aka Woody Island)"; + case _457: return "Lime Village"; + case _458: return "Village of Lower Kalskag"; + case _459: return "Manley Hot Springs Village"; + case _460: return "Manokotak Village"; + case _461: return "Native Village of Marshall (aka Fortuna Ledge)"; + case _462: return "Native Village of Mary's Igloo"; + case _463: return "McGrath Native Village"; + case _464: return "Native Village of Mekoryuk"; + case _465: return "Mentasta Traditional Council"; + case _466: return "Metlakatla Indian Community, Annette Island Reserv"; + case _467: return "Native Village of Minto"; + case _468: return "Naknek Native Village"; + case _469: return "Native Village of Nanwalek (aka English Bay)"; + case _470: return "Native Village of Napaimute"; + case _471: return "Native Village of Napakiak"; + case _472: return "Native Village of Napaskiak"; + case _473: return "Native Village of Nelson Lagoon"; + case _474: return "Nenana Native Association"; + case _475: return "New Koliganek Village Council (formerly Koliganek"; + case _476: return "New Stuyahok Village"; + case _477: return "Newhalen Village"; + case _478: return "Newtok Village"; + case _479: return "Native Village of Nightmute"; + case _480: return "Nikolai Village"; + case _481: return "Native Village of Nikolski"; + case _482: return "Ninilchik Village"; + case _483: return "Native Village of Noatak"; + case _484: return "Nome Eskimo Community"; + case _485: return "Nondalton Village"; + case _486: return "Noorvik Native Community"; + case _487: return "Northway Village"; + case _488: return "Native Village of Nuiqsut (aka Nooiksut)"; + case _489: return "Nulato Village"; + case _490: return "Nunakauyarmiut Tribe (formerly Native Village of T"; + case _491: return "Native Village of Nunapitchuk"; + case _492: return "Village of Ohogamiut"; + case _493: return "Village of Old Harbor"; + case _494: return "Orutsararmuit Native Village (aka Bethel)"; + case _495: return "Oscarville Traditional Village"; + case _496: return "Native Village of Ouzinkie"; + case _497: return "Native Village of Paimiut"; + case _498: return "Pauloff Harbor Village"; + case _499: return "Pedro Bay Village"; + case _500: return "Native Village of Perryville"; + case _501: return "Petersburg Indian Association"; + case _502: return "Native Village of Pilot Point"; + case _503: return "Pilot Station Traditional Village"; + case _504: return "Native Village of Pitka's Point"; + case _505: return "Platinum Traditional Village"; + case _506: return "Native Village of Point Hope"; + case _507: return "Native Village of Point Lay"; + case _508: return "Native Village of Port Graham"; + case _509: return "Native Village of Port Heiden"; + case _510: return "Native Village of Port Lions"; + case _511: return "Portage Creek Village (aka Ohgsenakale)"; + case _512: return "Pribilof Islands Aleut Communities of St. Paul & S"; + case _513: return "Qagan Tayagungin Tribe of Sand Point Village"; + case _514: return "Qawalangin Tribe of Unalaska"; + case _515: return "Rampart Village"; + case _516: return "Village of Red Devil"; + case _517: return "Native Village of Ruby"; + case _518: return "Saint George Island(See Pribilof Islands Aleut Com"; + case _519: return "Native Village of Saint Michael"; + case _520: return "Saint Paul Island (See Pribilof Islands Aleut Comm"; + case _521: return "Village of Salamatoff"; + case _522: return "Native Village of Savoonga"; + case _523: return "Organized Village of Saxman"; + case _524: return "Native Village of Scammon Bay"; + case _525: return "Native Village of Selawik"; + case _526: return "Seldovia Village Tribe"; + case _527: return "Shageluk Native Village"; + case _528: return "Native Village of Shaktoolik"; + case _529: return "Native Village of Sheldon's Point"; + case _530: return "Native Village of Shishmaref"; + case _531: return "Shoonaq Tribe of Kodiak"; + case _532: return "Native Village of Shungnak"; + case _533: return "Sitka Tribe of Alaska"; + case _534: return "Skagway Village"; + case _535: return "Village of Sleetmute"; + case _536: return "Village of Solomon"; + case _537: return "South Naknek Village"; + case _538: return "Stebbins Community Association"; + case _539: return "Native Village of Stevens"; + case _540: return "Village of Stony River"; + case _541: return "Takotna Village"; + case _542: return "Native Village of Tanacross"; + case _543: return "Native Village of Tanana"; + case _544: return "Native Village of Tatitlek"; + case _545: return "Native Village of Tazlina"; + case _546: return "Telida Village"; + case _547: return "Native Village of Teller"; + case _548: return "Native Village of Tetlin"; + case _549: return "Central Council of the Tlingit and Haida Indian Tb"; + case _550: return "Traditional Village of Togiak"; + case _551: return "Tuluksak Native Community"; + case _552: return "Native Village of Tuntutuliak"; + case _553: return "Native Village of Tununak"; + case _554: return "Twin Hills Village"; + case _555: return "Native Village of Tyonek"; + case _556: return "Ugashik Village"; + case _557: return "Umkumiute Native Village"; + case _558: return "Native Village of Unalakleet"; + case _559: return "Native Village of Unga"; + case _560: return "Village of Venetie (See Native Village of Venetie"; + case _561: return "Native Village of Venetie Tribal Government (Arcti"; + case _562: return "Village of Wainwright"; + case _563: return "Native Village of Wales"; + case _564: return "Native Village of White Mountain"; + case _565: return "Wrangell Cooperative Association"; + case _566: return "Yakutat Tlingit Tribe"; + case _NATIVEENTITYCONTIGUOUS: return "NativeEntityContiguous"; + case _1: return "Absentee-Shawnee Tribe of Indians of Oklahoma"; + case _10: return "Assiniboine and Sioux Tribes of the Fort Peck Indi"; + case _100: return "Havasupai Tribe of the Havasupai Reservation, Ariz"; + case _101: return "Ho-Chunk Nation of Wisconsin (formerly known as th"; + case _102: return "Hoh Indian Tribe of the Hoh Indian Reservation, Wa"; + case _103: return "Hoopa Valley Tribe, California"; + case _104: return "Hopi Tribe of Arizona"; + case _105: return "Hopland Band of Pomo Indians of the Hopland Ranche"; + case _106: return "Houlton Band of Maliseet Indians of Maine"; + case _107: return "Hualapai Indian Tribe of the Hualapai Indian Reser"; + case _108: return "Huron Potawatomi, Inc., Michigan"; + case _109: return "Inaja Band of Diegueno Mission Indians of the Inaj"; + case _11: return "Augustine Band of Cahuilla Mission Indians of the"; + case _110: return "Ione Band of Miwok Indians of California"; + case _111: return "Iowa Tribe of Kansas and Nebraska"; + case _112: return "Iowa Tribe of Oklahoma"; + case _113: return "Jackson Rancheria of Me-Wuk Indians of California"; + case _114: return "Jamestown S'Klallam Tribe of Washington"; + case _115: return "Jamul Indian Village of California"; + case _116: return "Jena Band of Choctaw Indians, Louisiana"; + case _117: return "Jicarilla Apache Tribe of the Jicarilla Apache Ind"; + case _118: return "Kaibab Band of Paiute Indians of the Kaibab Indian"; + case _119: return "Kalispel Indian Community of the Kalispel Reservat"; + case _12: return "Bad River Band of the Lake Superior Tribe of Chipp"; + case _120: return "Karuk Tribe of California"; + case _121: return "Kashia Band of Pomo Indians of the Stewarts Point"; + case _122: return "Kaw Nation, Oklahoma"; + case _123: return "Keweenaw Bay Indian Community of L'Anse and Ontona"; + case _124: return "Kialegee Tribal Town, Oklahoma"; + case _125: return "Kickapoo Tribe of Indians of the Kickapoo Reservat"; + case _126: return "Kickapoo Tribe of Oklahoma"; + case _127: return "Kickapoo Traditional Tribe of Texas"; + case _128: return "Kiowa Indian Tribe of Oklahoma"; + case _129: return "Klamath Indian Tribe of Oregon"; + case _13: return "Bay Mills Indian Community of the Sault Ste. Marie"; + case _130: return "Kootenai Tribe of Idaho"; + case _131: return "La Jolla Band of Luiseno Mission Indians of the La"; + case _132: return "La Posta Band of Diegueno Mission Indians of the L"; + case _133: return "Lac Courte Oreilles Band of Lake Superior Chippewa"; + case _134: return "Lac du Flambeau Band of Lake Superior Chippewa Ind"; + case _135: return "Lac Vieux Desert Band of Lake Superior Chippewa In"; + case _136: return "Las Vegas Tribe of Paiute Indians of the Las Vegas"; + case _137: return "Little River Band of Ottawa Indians of Michigan"; + case _138: return "Little Traverse Bay Bands of Odawa Indians of Mich"; + case _139: return "Lower Lake Rancheria, California"; + case _14: return "Bear River Band of the Rohnerville Rancheria, Cali"; + case _140: return "Los Coyotes Band of Cahuilla Mission Indians of th"; + case _141: return "Lovelock Paiute Tribe of the Lovelock Indian Colon"; + case _142: return "Lower Brule Sioux Tribe of the Lower Brule Reserva"; + case _143: return "Lower Elwha Tribal Community of the Lower Elwha Re"; + case _144: return "Lower Sioux Indian Community of Minnesota Mdewakan"; + case _145: return "Lummi Tribe of the Lummi Reservation, Washington"; + case _146: return "Lytton Rancheria of California"; + case _147: return "Makah Indian Tribe of the Makah Indian Reservation"; + case _148: return "Manchester Band of Pomo Indians of the Manchester-"; + case _149: return "Manzanita Band of Diegueno Mission Indians of the"; + case _15: return "Berry Creek Rancheria of Maidu Indians of Californ"; + case _150: return "Mashantucket Pequot Tribe of Connecticut"; + case _151: return "Match-e-be-nash-she-wish Band of Pottawatomi India"; + case _152: return "Mechoopda Indian Tribe of Chico Rancheria, Califor"; + case _153: return "Menominee Indian Tribe of Wisconsin"; + case _154: return "Mesa Grande Band of Diegueno Mission Indians of th"; + case _155: return "Mescalero Apache Tribe of the Mescalero Reservatio"; + case _156: return "Miami Tribe of Oklahoma"; + case _157: return "Miccosukee Tribe of Indians of Florida"; + case _158: return "Middletown Rancheria of Pomo Indians of California"; + case _159: return "Minnesota Chippewa Tribe, Minnesota (Six component"; + case _16: return "Big Lagoon Rancheria, California"; + case _160: return "Bois Forte Band (Nett Lake); Fond du Lac Band; Gra"; + case _161: return "Mississippi Band of Choctaw Indians, Mississippi"; + case _162: return "Moapa Band of Paiute Indians of the Moapa River In"; + case _163: return "Modoc Tribe of Oklahoma"; + case _164: return "Mohegan Indian Tribe of Connecticut"; + case _165: return "Mooretown Rancheria of Maidu Indians of California"; + case _166: return "Morongo Band of Cahuilla Mission Indians of the Mo"; + case _167: return "Muckleshoot Indian Tribe of the Muckleshoot Reserv"; + case _168: return "Muscogee (Creek) Nation, Oklahoma"; + case _169: return "Narragansett Indian Tribe of Rhode Island"; + case _17: return "Big Pine Band of Owens Valley Paiute Shoshone Indi"; + case _170: return "Navajo Nation, Arizona, New Mexico & Utah"; + case _171: return "Nez Perce Tribe of Idaho"; + case _172: return "Nisqually Indian Tribe of the Nisqually Reservatio"; + case _173: return "Nooksack Indian Tribe of Washington"; + case _174: return "Northern Cheyenne Tribe of the Northern Cheyenne I"; + case _175: return "Northfork Rancheria of Mono Indians of California"; + case _176: return "Northwestern Band of Shoshoni Nation of Utah (Wash"; + case _177: return "Oglala Sioux Tribe of the Pine Ridge Reservation,"; + case _178: return "Omaha Tribe of Nebraska"; + case _179: return "Oneida Nation of New York"; + case _18: return "Big Sandy Rancheria of Mono Indians of California"; + case _180: return "Oneida Tribe of Wisconsin"; + case _181: return "Onondaga Nation of New York"; + case _182: return "Osage Tribe, Oklahoma"; + case _183: return "Ottawa Tribe of Oklahoma"; + case _184: return "Otoe-Missouria Tribe of Indians, Oklahoma"; + case _185: return "Paiute Indian Tribe of Utah"; + case _186: return "Paiute-Shoshone Indians of the Bishop Community of"; + case _187: return "Paiute-Shoshone Tribe of the Fallon Reservation an"; + case _188: return "Paiute-Shoshone Indians of the Lone Pine Community"; + case _189: return "Pala Band of Luiseno Mission Indians of the Pala R"; + case _19: return "Big Valley Band of Pomo Indians of the Big Valley"; + case _190: return "Pascua Yaqui Tribe of Arizona"; + case _191: return "Paskenta Band of Nomlaki Indians of California"; + case _192: return "Passamaquoddy Tribe of Maine"; + case _193: return "Pauma Band of Luiseno Mission Indians of the Pauma"; + case _194: return "Pawnee Nation of Oklahoma"; + case _195: return "Pechanga Band of Luiseno Mission Indians of the Pe"; + case _196: return "Penobscot Tribe of Maine"; + case _197: return "Peoria Tribe of Indians of Oklahoma"; + case _198: return "Picayune Rancheria of Chukchansi Indians of Califo"; + case _199: return "Pinoleville Rancheria of Pomo Indians of Californi"; + case _2: return "Agua Caliente Band of Cahuilla Indians of the Agua"; + case _20: return "Blackfeet Tribe of the Blackfeet Indian Reservatio"; + case _200: return "Pit River Tribe, California (includes Big Bend, Lo"; + case _201: return "Poarch Band of Creek Indians of Alabama"; + case _202: return "Pokagon Band of Potawatomi Indians of Michigan"; + case _203: return "Ponca Tribe of Indians of Oklahoma"; + case _204: return "Ponca Tribe of Nebraska"; + case _205: return "Port Gamble Indian Community of the Port Gamble Re"; + case _206: return "Potter Valley Rancheria of Pomo Indians of Califor"; + case _207: return "Prairie Band of Potawatomi Indians, Kansas"; + case _208: return "Prairie Island Indian Community of Minnesota Mdewa"; + case _209: return "Pueblo of Acoma, New Mexico"; + case _21: return "Blue Lake Rancheria, California"; + case _210: return "Pueblo of Cochiti, New Mexico"; + case _211: return "Pueblo of Jemez, New Mexico"; + case _212: return "Pueblo of Isleta, New Mexico"; + case _213: return "Pueblo of Laguna, New Mexico"; + case _214: return "Pueblo of Nambe, New Mexico"; + case _215: return "Pueblo of Picuris, New Mexico"; + case _216: return "Pueblo of Pojoaque, New Mexico"; + case _217: return "Pueblo of San Felipe, New Mexico"; + case _218: return "Pueblo of San Juan, New Mexico"; + case _219: return "Pueblo of San Ildefonso, New Mexico"; + case _22: return "Bridgeport Paiute Indian Colony of California"; + case _220: return "Pueblo of Sandia, New Mexico"; + case _221: return "Pueblo of Santa Ana, New Mexico"; + case _222: return "Pueblo of Santa Clara, New Mexico"; + case _223: return "Pueblo of Santo Domingo, New Mexico"; + case _224: return "Pueblo of Taos, New Mexico"; + case _225: return "Pueblo of Tesuque, New Mexico"; + case _226: return "Pueblo of Zia, New Mexico"; + case _227: return "Puyallup Tribe of the Puyallup Reservation, Washin"; + case _228: return "Pyramid Lake Paiute Tribe of the Pyramid Lake Rese"; + case _229: return "Quapaw Tribe of Indians, Oklahoma"; + case _23: return "Buena Vista Rancheria of Me-Wuk Indians of Califor"; + case _230: return "Quartz Valley Indian Community of the Quartz Valle"; + case _231: return "Quechan Tribe of the Fort Yuma Indian Reservation,"; + case _232: return "Quileute Tribe of the Quileute Reservation, Washin"; + case _233: return "Quinault Tribe of the Quinault Reservation, Washin"; + case _234: return "Ramona Band or Village of Cahuilla Mission Indians"; + case _235: return "Red Cliff Band of Lake Superior Chippewa Indians o"; + case _236: return "Red Lake Band of Chippewa Indians of the Red Lake"; + case _237: return "Redding Rancheria, California"; + case _238: return "Redwood Valley Rancheria of Pomo Indians of Califo"; + case _239: return "Reno-Sparks Indian Colony, Nevada"; + case _24: return "Burns Paiute Tribe of the Burns Paiute Indian Colo"; + case _240: return "Resighini Rancheria, California (formerly known as"; + case _241: return "Rincon Band of Luiseno Mission Indians of the Rinc"; + case _242: return "Robinson Rancheria of Pomo Indians of California"; + case _243: return "Rosebud Sioux Tribe of the Rosebud Indian Reservat"; + case _244: return "Round Valley Indian Tribes of the Round Valley Res"; + case _245: return "Rumsey Indian Rancheria of Wintun Indians of Calif"; + case _246: return "Sac and Fox Tribe of the Mississippi in Iowa"; + case _247: return "Sac and Fox Nation of Missouri in Kansas and Nebra"; + case _248: return "Sac and Fox Nation, Oklahoma"; + case _249: return "Saginaw Chippewa Indian Tribe of Michigan, Isabell"; + case _25: return "Cabazon Band of Cahuilla Mission Indians of the Ca"; + case _250: return "Salt River Pima-Maricopa Indian Community of the S"; + case _251: return "Samish Indian Tribe, Washington"; + case _252: return "San Carlos Apache Tribe of the San Carlos Reservat"; + case _253: return "San Juan Southern Paiute Tribe of Arizona"; + case _254: return "San Manual Band of Serrano Mission Indians of the"; + case _255: return "San Pasqual Band of Diegueno Mission Indians of Ca"; + case _256: return "Santa Rosa Indian Community of the Santa Rosa Ranc"; + case _257: return "Santa Rosa Band of Cahuilla Mission Indians of the"; + case _258: return "Santa Ynez Band of Chumash Mission Indians of the"; + case _259: return "Santa Ysabel Band of Diegueno Mission Indians of t"; + case _26: return "Cachil DeHe Band of Wintun Indians of the Colusa I"; + case _260: return "Santee Sioux Tribe of the Santee Reservation of Ne"; + case _261: return "Sauk-Suiattle Indian Tribe of Washington"; + case _262: return "Sault Ste. Marie Tribe of Chippewa Indians of Mich"; + case _263: return "Scotts Valley Band of Pomo Indians of California"; + case _264: return "Seminole Nation of Oklahoma"; + case _265: return "Seminole Tribe of Florida, Dania, Big Cypress, Bri"; + case _266: return "Seneca Nation of New York"; + case _267: return "Seneca-Cayuga Tribe of Oklahoma"; + case _268: return "Shakopee Mdewakanton Sioux Community of Minnesota"; + case _269: return "Shawnee Tribe, Oklahoma"; + case _27: return "Caddo Indian Tribe of Oklahoma"; + case _270: return "Sherwood Valley Rancheria of Pomo Indians of Calif"; + case _271: return "Shingle Springs Band of Miwok Indians, Shingle Spr"; + case _272: return "Shoalwater Bay Tribe of the Shoalwater Bay Indian"; + case _273: return "Shoshone Tribe of the Wind River Reservation, Wyom"; + case _274: return "Shoshone-Bannock Tribes of the Fort Hall Reservati"; + case _275: return "Shoshone-Paiute Tribes of the Duck Valley Reservat"; + case _276: return "Sisseton-Wahpeton Sioux Tribe of the Lake Traverse"; + case _277: return "Skokomish Indian Tribe of the Skokomish Reservatio"; + case _278: return "Skull Valley Band of Goshute Indians of Utah"; + case _279: return "Smith River Rancheria, California"; + case _28: return "Cahuilla Band of Mission Indians of the Cahuilla R"; + case _280: return "Snoqualmie Tribe, Washington"; + case _281: return "Soboba Band of Luiseno Indians, California (former"; + case _282: return "Sokaogon Chippewa Community of the Mole Lake Band"; + case _283: return "Southern Ute Indian Tribe of the Southern Ute Rese"; + case _284: return "Spirit Lake Tribe, North Dakota (formerly known as"; + case _285: return "Spokane Tribe of the Spokane Reservation, Washingt"; + case _286: return "Squaxin Island Tribe of the Squaxin Island Reserva"; + case _287: return "St. Croix Chippewa Indians of Wisconsin, St. Croix"; + case _288: return "St. Regis Band of Mohawk Indians of New York"; + case _289: return "Standing Rock Sioux Tribe of North & South Dakota"; + case _29: return "Cahto Indian Tribe of the Laytonville Rancheria, C"; + case _290: return "Stockbridge-Munsee Community of Mohican Indians of"; + case _291: return "Stillaguamish Tribe of Washington"; + case _292: return "Summit Lake Paiute Tribe of Nevada"; + case _293: return "Suquamish Indian Tribe of the Port Madison Reserva"; + case _294: return "Susanville Indian Rancheria, California"; + case _295: return "Swinomish Indians of the Swinomish Reservation, Wa"; + case _296: return "Sycuan Band of Diegueno Mission Indians of Califor"; + case _297: return "Table Bluff Reservation - Wiyot Tribe, California"; + case _298: return "Table Mountain Rancheria of California"; + case _299: return "Te-Moak Tribe of Western Shoshone Indians of Nevad"; + case _3: return "Ak Chin Indian Community of the Maricopa (Ak Chin)"; + case _30: return "California Valley Miwok Tribe, California (formerl"; + case _300: return "Thlopthlocco Tribal Town, Oklahoma"; + case _301: return "Three Affiliated Tribes of the Fort Berthold Reser"; + case _302: return "Tohono O'odham Nation of Arizona"; + case _303: return "Tonawanda Band of Seneca Indians of New York"; + case _304: return "Tonkawa Tribe of Indians of Oklahoma"; + case _305: return "Tonto Apache Tribe of Arizona"; + case _306: return "Torres-Martinez Band of Cahuilla Mission Indians o"; + case _307: return "Tule River Indian Tribe of the Tule River Reservat"; + case _308: return "Tulalip Tribes of the Tulalip Reservation, Washing"; + case _309: return "Tunica-Biloxi Indian Tribe of Louisiana"; + case _31: return "Campo Band of Diegueno Mission Indians of the Camp"; + case _310: return "Tuolumne Band of Me-Wuk Indians of the Tuolumne Ra"; + case _311: return "Turtle Mountain Band of Chippewa Indians of North"; + case _312: return "Tuscarora Nation of New York"; + case _313: return "Twenty-Nine Palms Band of Mission Indians of Calif"; + case _314: return "United Auburn Indian Community of the Auburn Ranch"; + case _315: return "United Keetoowah Band of Cherokee Indians of Oklah"; + case _316: return "Upper Lake Band of Pomo Indians of Upper Lake Ranc"; + case _317: return "Upper Sioux Indian Community of the Upper Sioux Re"; + case _318: return "Upper Skagit Indian Tribe of Washington"; + case _319: return "Ute Indian Tribe of the Uintah & Ouray Reservation"; + case _32: return "Capitan Grande Band of Diegueno Mission Indians of"; + case _320: return "Ute Mountain Tribe of the Ute Mountain Reservation"; + case _321: return "Utu Utu Gwaitu Paiute Tribe of the Benton Paiute R"; + case _322: return "Walker River Paiute Tribe of the Walker River Rese"; + case _323: return "Wampanoag Tribe of Gay Head (Aquinnah) of Massachu"; + case _324: return "Washoe Tribe of Nevada & California (Carson Colony"; + case _325: return "White Mountain Apache Tribe of the Fort Apache Res"; + case _326: return "Wichita and Affiliated Tribes (Wichita, Keechi, Wa"; + case _327: return "Winnebago Tribe of Nebraska"; + case _328: return "Winnemucca Indian Colony of Nevada"; + case _329: return "Wyandotte Tribe of Oklahoma"; + case _33: return "Barona Group of Capitan Grande Band of Mission Ind"; + case _330: return "Yankton Sioux Tribe of South Dakota"; + case _331: return "Yavapai-Apache Nation of the Camp Verde Indian Res"; + case _332: return "Yavapai-Prescott Tribe of the Yavapai Reservation,"; + case _333: return "Yerington Paiute Tribe of the Yerington Colony & C"; + case _334: return "Yomba Shoshone Tribe of the Yomba Reservation, Nev"; + case _335: return "Ysleta Del Sur Pueblo of Texas"; + case _336: return "Yurok Tribe of the Yurok Reservation, California"; + case _337: return "Zuni Tribe of the Zuni Reservation, New Mexico"; + case _34: return "Viejas (Baron Long) Group of Capitan Grande Band o"; + case _35: return "Catawba Indian Nation (aka Catawba Tribe of South"; + case _36: return "Cayuga Nation of New York"; + case _37: return "Cedarville Rancheria, California"; + case _38: return "Chemehuevi Indian Tribe of the Chemehuevi Reservat"; + case _39: return "Cher-Ae Heights Indian Community of the Trinidad R"; + case _4: return "Alabama-Coushatta Tribes of Texas"; + case _40: return "Cherokee Nation, Oklahoma"; + case _41: return "Cheyenne-Arapaho Tribes of Oklahoma"; + case _42: return "Cheyenne River Sioux Tribe of the Cheyenne River R"; + case _43: return "Chickasaw Nation, Oklahoma"; + case _44: return "Chicken Ranch Rancheria of Me-Wuk Indians of Calif"; + case _45: return "Chippewa-Cree Indians of the Rocky Boy's Reservati"; + case _46: return "Chitimacha Tribe of Louisiana"; + case _47: return "Choctaw Nation of Oklahoma"; + case _48: return "Citizen Potawatomi Nation, Oklahoma"; + case _49: return "Cloverdale Rancheria of Pomo Indians of California"; + case _5: return "Alabama-Quassarte Tribal Town, Oklahoma"; + case _50: return "Cocopah Tribe of Arizona"; + case _51: return "Coeur D'Alene Tribe of the Coeur D'Alene Reservati"; + case _52: return "Cold Springs Rancheria of Mono Indians of Californ"; + case _53: return "Colorado River Indian Tribes of the Colorado River"; + case _54: return "Comanche Indian Tribe, Oklahoma"; + case _55: return "Confederated Salish & Kootenai Tribes of the Flath"; + case _56: return "Confederated Tribes of the Chehalis Reservation, W"; + case _57: return "Confederated Tribes of the Colville Reservation, W"; + case _58: return "Confederated Tribes of the Coos, Lower Umpqua and"; + case _59: return "Confederated Tribes of the Goshute Reservation, Ne"; + case _6: return "Alturas Indian Rancheria, California"; + case _60: return "Confederated Tribes of the Grand Ronde Community o"; + case _61: return "Confederated Tribes of the Siletz Reservation, Ore"; + case _62: return "Confederated Tribes of the Umatilla Reservation, O"; + case _63: return "Confederated Tribes of the Warm Springs Reservatio"; + case _64: return "Confederated Tribes and Bands of the Yakama Indian"; + case _65: return "Coquille Tribe of Oregon"; + case _66: return "Cortina Indian Rancheria of Wintun Indians of Cali"; + case _67: return "Coushatta Tribe of Louisiana"; + case _68: return "Cow Creek Band of Umpqua Indians of Oregon"; + case _69: return "Coyote Valley Band of Pomo Indians of California"; + case _7: return "Apache Tribe of Oklahoma"; + case _70: return "Crow Tribe of Montana"; + case _71: return "Crow Creek Sioux Tribe of the Crow Creek Reservati"; + case _72: return "Cuyapaipe Community of Diegueno Mission Indians of"; + case _73: return "Death Valley Timbi-Sha Shoshone Band of California"; + case _74: return "Delaware Nation, Oklahoma (formerly Delaware Tribe"; + case _75: return "Delaware Tribe of Indians, Oklahoma"; + case _76: return "Dry Creek Rancheria of Pomo Indians of California"; + case _77: return "Duckwater Shoshone Tribe of the Duckwater Reservat"; + case _78: return "Eastern Band of Cherokee Indians of North Carolina"; + case _79: return "Eastern Shawnee Tribe of Oklahoma"; + case _8: return "Arapahoe Tribe of the Wind River Reservation, Wyom"; + case _80: return "Elem Indian Colony of Pomo Indians of the Sulphur"; + case _81: return "Elk Valley Rancheria, California"; + case _82: return "Ely Shoshone Tribe of Nevada"; + case _83: return "Enterprise Rancheria of Maidu Indians of Californi"; + case _84: return "Flandreau Santee Sioux Tribe of South Dakota"; + case _85: return "Forest County Potawatomi Community of Wisconsin Po"; + case _86: return "Fort Belknap Indian Community of the Fort Belknap"; + case _87: return "Fort Bidwell Indian Community of the Fort Bidwell"; + case _88: return "Fort Independence Indian Community of Paiute India"; + case _89: return "Fort McDermitt Paiute and Shoshone Tribes of the F"; + case _9: return "Aroostook Band of Micmac Indians of Maine"; + case _90: return "Fort McDowell Yavapai Nation, Arizona (formerly th"; + case _91: return "Fort Mojave Indian Tribe of Arizona, California"; + case _92: return "Fort Sill Apache Tribe of Oklahoma"; + case _93: return "Gila River Indian Community of the Gila River Indi"; + case _94: return "Grand Traverse Band of Ottawa & Chippewa Indians o"; + case _95: return "Graton Rancheria, California"; + case _96: return "Greenville Rancheria of Maidu Indians of Californi"; + case _97: return "Grindstone Indian Rancheria of Wintun-Wailaki Indi"; + case _98: return "Guidiville Rancheria of California"; + case _99: return "Hannahville Indian Community of Wisconsin Potawato"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TribalEntityUSEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TribalEntityUSEnumFactory.java new file mode 100644 index 00000000000..0be9a6b4f0d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3TribalEntityUSEnumFactory.java @@ -0,0 +1,2326 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3TribalEntityUSEnumFactory implements EnumFactory { + + public V3TribalEntityUS fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("_NativeEntityAlaska".equals(codeString)) + return V3TribalEntityUS._NATIVEENTITYALASKA; + if ("338".equals(codeString)) + return V3TribalEntityUS._338; + if ("339".equals(codeString)) + return V3TribalEntityUS._339; + if ("340".equals(codeString)) + return V3TribalEntityUS._340; + if ("341".equals(codeString)) + return V3TribalEntityUS._341; + if ("342".equals(codeString)) + return V3TribalEntityUS._342; + if ("343".equals(codeString)) + return V3TribalEntityUS._343; + if ("344".equals(codeString)) + return V3TribalEntityUS._344; + if ("345".equals(codeString)) + return V3TribalEntityUS._345; + if ("346".equals(codeString)) + return V3TribalEntityUS._346; + if ("347".equals(codeString)) + return V3TribalEntityUS._347; + if ("348".equals(codeString)) + return V3TribalEntityUS._348; + if ("349".equals(codeString)) + return V3TribalEntityUS._349; + if ("350".equals(codeString)) + return V3TribalEntityUS._350; + if ("351".equals(codeString)) + return V3TribalEntityUS._351; + if ("352".equals(codeString)) + return V3TribalEntityUS._352; + if ("353".equals(codeString)) + return V3TribalEntityUS._353; + if ("354".equals(codeString)) + return V3TribalEntityUS._354; + if ("355".equals(codeString)) + return V3TribalEntityUS._355; + if ("356".equals(codeString)) + return V3TribalEntityUS._356; + if ("357".equals(codeString)) + return V3TribalEntityUS._357; + if ("358".equals(codeString)) + return V3TribalEntityUS._358; + if ("359".equals(codeString)) + return V3TribalEntityUS._359; + if ("360".equals(codeString)) + return V3TribalEntityUS._360; + if ("361".equals(codeString)) + return V3TribalEntityUS._361; + if ("362".equals(codeString)) + return V3TribalEntityUS._362; + if ("363".equals(codeString)) + return V3TribalEntityUS._363; + if ("364".equals(codeString)) + return V3TribalEntityUS._364; + if ("365".equals(codeString)) + return V3TribalEntityUS._365; + if ("366".equals(codeString)) + return V3TribalEntityUS._366; + if ("367".equals(codeString)) + return V3TribalEntityUS._367; + if ("368".equals(codeString)) + return V3TribalEntityUS._368; + if ("369".equals(codeString)) + return V3TribalEntityUS._369; + if ("370".equals(codeString)) + return V3TribalEntityUS._370; + if ("371".equals(codeString)) + return V3TribalEntityUS._371; + if ("372".equals(codeString)) + return V3TribalEntityUS._372; + if ("373".equals(codeString)) + return V3TribalEntityUS._373; + if ("374".equals(codeString)) + return V3TribalEntityUS._374; + if ("375".equals(codeString)) + return V3TribalEntityUS._375; + if ("376".equals(codeString)) + return V3TribalEntityUS._376; + if ("377".equals(codeString)) + return V3TribalEntityUS._377; + if ("378".equals(codeString)) + return V3TribalEntityUS._378; + if ("379".equals(codeString)) + return V3TribalEntityUS._379; + if ("380".equals(codeString)) + return V3TribalEntityUS._380; + if ("381".equals(codeString)) + return V3TribalEntityUS._381; + if ("382".equals(codeString)) + return V3TribalEntityUS._382; + if ("383".equals(codeString)) + return V3TribalEntityUS._383; + if ("384".equals(codeString)) + return V3TribalEntityUS._384; + if ("385".equals(codeString)) + return V3TribalEntityUS._385; + if ("386".equals(codeString)) + return V3TribalEntityUS._386; + if ("387".equals(codeString)) + return V3TribalEntityUS._387; + if ("388".equals(codeString)) + return V3TribalEntityUS._388; + if ("389".equals(codeString)) + return V3TribalEntityUS._389; + if ("390".equals(codeString)) + return V3TribalEntityUS._390; + if ("391".equals(codeString)) + return V3TribalEntityUS._391; + if ("392".equals(codeString)) + return V3TribalEntityUS._392; + if ("393".equals(codeString)) + return V3TribalEntityUS._393; + if ("394".equals(codeString)) + return V3TribalEntityUS._394; + if ("395".equals(codeString)) + return V3TribalEntityUS._395; + if ("396".equals(codeString)) + return V3TribalEntityUS._396; + if ("397".equals(codeString)) + return V3TribalEntityUS._397; + if ("398".equals(codeString)) + return V3TribalEntityUS._398; + if ("399".equals(codeString)) + return V3TribalEntityUS._399; + if ("400".equals(codeString)) + return V3TribalEntityUS._400; + if ("401".equals(codeString)) + return V3TribalEntityUS._401; + if ("402".equals(codeString)) + return V3TribalEntityUS._402; + if ("403".equals(codeString)) + return V3TribalEntityUS._403; + if ("404".equals(codeString)) + return V3TribalEntityUS._404; + if ("405".equals(codeString)) + return V3TribalEntityUS._405; + if ("406".equals(codeString)) + return V3TribalEntityUS._406; + if ("407".equals(codeString)) + return V3TribalEntityUS._407; + if ("408".equals(codeString)) + return V3TribalEntityUS._408; + if ("409".equals(codeString)) + return V3TribalEntityUS._409; + if ("410".equals(codeString)) + return V3TribalEntityUS._410; + if ("411".equals(codeString)) + return V3TribalEntityUS._411; + if ("412".equals(codeString)) + return V3TribalEntityUS._412; + if ("413".equals(codeString)) + return V3TribalEntityUS._413; + if ("414".equals(codeString)) + return V3TribalEntityUS._414; + if ("415".equals(codeString)) + return V3TribalEntityUS._415; + if ("416".equals(codeString)) + return V3TribalEntityUS._416; + if ("417".equals(codeString)) + return V3TribalEntityUS._417; + if ("418".equals(codeString)) + return V3TribalEntityUS._418; + if ("419".equals(codeString)) + return V3TribalEntityUS._419; + if ("420".equals(codeString)) + return V3TribalEntityUS._420; + if ("421".equals(codeString)) + return V3TribalEntityUS._421; + if ("422".equals(codeString)) + return V3TribalEntityUS._422; + if ("423".equals(codeString)) + return V3TribalEntityUS._423; + if ("424".equals(codeString)) + return V3TribalEntityUS._424; + if ("425".equals(codeString)) + return V3TribalEntityUS._425; + if ("426".equals(codeString)) + return V3TribalEntityUS._426; + if ("427".equals(codeString)) + return V3TribalEntityUS._427; + if ("428".equals(codeString)) + return V3TribalEntityUS._428; + if ("429".equals(codeString)) + return V3TribalEntityUS._429; + if ("430".equals(codeString)) + return V3TribalEntityUS._430; + if ("431".equals(codeString)) + return V3TribalEntityUS._431; + if ("432".equals(codeString)) + return V3TribalEntityUS._432; + if ("433".equals(codeString)) + return V3TribalEntityUS._433; + if ("434".equals(codeString)) + return V3TribalEntityUS._434; + if ("435".equals(codeString)) + return V3TribalEntityUS._435; + if ("436".equals(codeString)) + return V3TribalEntityUS._436; + if ("437".equals(codeString)) + return V3TribalEntityUS._437; + if ("438".equals(codeString)) + return V3TribalEntityUS._438; + if ("439".equals(codeString)) + return V3TribalEntityUS._439; + if ("440".equals(codeString)) + return V3TribalEntityUS._440; + if ("441".equals(codeString)) + return V3TribalEntityUS._441; + if ("442".equals(codeString)) + return V3TribalEntityUS._442; + if ("443".equals(codeString)) + return V3TribalEntityUS._443; + if ("444".equals(codeString)) + return V3TribalEntityUS._444; + if ("445".equals(codeString)) + return V3TribalEntityUS._445; + if ("446".equals(codeString)) + return V3TribalEntityUS._446; + if ("447".equals(codeString)) + return V3TribalEntityUS._447; + if ("448".equals(codeString)) + return V3TribalEntityUS._448; + if ("449".equals(codeString)) + return V3TribalEntityUS._449; + if ("450".equals(codeString)) + return V3TribalEntityUS._450; + if ("451".equals(codeString)) + return V3TribalEntityUS._451; + if ("452".equals(codeString)) + return V3TribalEntityUS._452; + if ("453".equals(codeString)) + return V3TribalEntityUS._453; + if ("454".equals(codeString)) + return V3TribalEntityUS._454; + if ("455".equals(codeString)) + return V3TribalEntityUS._455; + if ("456".equals(codeString)) + return V3TribalEntityUS._456; + if ("457".equals(codeString)) + return V3TribalEntityUS._457; + if ("458".equals(codeString)) + return V3TribalEntityUS._458; + if ("459".equals(codeString)) + return V3TribalEntityUS._459; + if ("460".equals(codeString)) + return V3TribalEntityUS._460; + if ("461".equals(codeString)) + return V3TribalEntityUS._461; + if ("462".equals(codeString)) + return V3TribalEntityUS._462; + if ("463".equals(codeString)) + return V3TribalEntityUS._463; + if ("464".equals(codeString)) + return V3TribalEntityUS._464; + if ("465".equals(codeString)) + return V3TribalEntityUS._465; + if ("466".equals(codeString)) + return V3TribalEntityUS._466; + if ("467".equals(codeString)) + return V3TribalEntityUS._467; + if ("468".equals(codeString)) + return V3TribalEntityUS._468; + if ("469".equals(codeString)) + return V3TribalEntityUS._469; + if ("470".equals(codeString)) + return V3TribalEntityUS._470; + if ("471".equals(codeString)) + return V3TribalEntityUS._471; + if ("472".equals(codeString)) + return V3TribalEntityUS._472; + if ("473".equals(codeString)) + return V3TribalEntityUS._473; + if ("474".equals(codeString)) + return V3TribalEntityUS._474; + if ("475".equals(codeString)) + return V3TribalEntityUS._475; + if ("476".equals(codeString)) + return V3TribalEntityUS._476; + if ("477".equals(codeString)) + return V3TribalEntityUS._477; + if ("478".equals(codeString)) + return V3TribalEntityUS._478; + if ("479".equals(codeString)) + return V3TribalEntityUS._479; + if ("480".equals(codeString)) + return V3TribalEntityUS._480; + if ("481".equals(codeString)) + return V3TribalEntityUS._481; + if ("482".equals(codeString)) + return V3TribalEntityUS._482; + if ("483".equals(codeString)) + return V3TribalEntityUS._483; + if ("484".equals(codeString)) + return V3TribalEntityUS._484; + if ("485".equals(codeString)) + return V3TribalEntityUS._485; + if ("486".equals(codeString)) + return V3TribalEntityUS._486; + if ("487".equals(codeString)) + return V3TribalEntityUS._487; + if ("488".equals(codeString)) + return V3TribalEntityUS._488; + if ("489".equals(codeString)) + return V3TribalEntityUS._489; + if ("490".equals(codeString)) + return V3TribalEntityUS._490; + if ("491".equals(codeString)) + return V3TribalEntityUS._491; + if ("492".equals(codeString)) + return V3TribalEntityUS._492; + if ("493".equals(codeString)) + return V3TribalEntityUS._493; + if ("494".equals(codeString)) + return V3TribalEntityUS._494; + if ("495".equals(codeString)) + return V3TribalEntityUS._495; + if ("496".equals(codeString)) + return V3TribalEntityUS._496; + if ("497".equals(codeString)) + return V3TribalEntityUS._497; + if ("498".equals(codeString)) + return V3TribalEntityUS._498; + if ("499".equals(codeString)) + return V3TribalEntityUS._499; + if ("500".equals(codeString)) + return V3TribalEntityUS._500; + if ("501".equals(codeString)) + return V3TribalEntityUS._501; + if ("502".equals(codeString)) + return V3TribalEntityUS._502; + if ("503".equals(codeString)) + return V3TribalEntityUS._503; + if ("504".equals(codeString)) + return V3TribalEntityUS._504; + if ("505".equals(codeString)) + return V3TribalEntityUS._505; + if ("506".equals(codeString)) + return V3TribalEntityUS._506; + if ("507".equals(codeString)) + return V3TribalEntityUS._507; + if ("508".equals(codeString)) + return V3TribalEntityUS._508; + if ("509".equals(codeString)) + return V3TribalEntityUS._509; + if ("510".equals(codeString)) + return V3TribalEntityUS._510; + if ("511".equals(codeString)) + return V3TribalEntityUS._511; + if ("512".equals(codeString)) + return V3TribalEntityUS._512; + if ("513".equals(codeString)) + return V3TribalEntityUS._513; + if ("514".equals(codeString)) + return V3TribalEntityUS._514; + if ("515".equals(codeString)) + return V3TribalEntityUS._515; + if ("516".equals(codeString)) + return V3TribalEntityUS._516; + if ("517".equals(codeString)) + return V3TribalEntityUS._517; + if ("518".equals(codeString)) + return V3TribalEntityUS._518; + if ("519".equals(codeString)) + return V3TribalEntityUS._519; + if ("520".equals(codeString)) + return V3TribalEntityUS._520; + if ("521".equals(codeString)) + return V3TribalEntityUS._521; + if ("522".equals(codeString)) + return V3TribalEntityUS._522; + if ("523".equals(codeString)) + return V3TribalEntityUS._523; + if ("524".equals(codeString)) + return V3TribalEntityUS._524; + if ("525".equals(codeString)) + return V3TribalEntityUS._525; + if ("526".equals(codeString)) + return V3TribalEntityUS._526; + if ("527".equals(codeString)) + return V3TribalEntityUS._527; + if ("528".equals(codeString)) + return V3TribalEntityUS._528; + if ("529".equals(codeString)) + return V3TribalEntityUS._529; + if ("530".equals(codeString)) + return V3TribalEntityUS._530; + if ("531".equals(codeString)) + return V3TribalEntityUS._531; + if ("532".equals(codeString)) + return V3TribalEntityUS._532; + if ("533".equals(codeString)) + return V3TribalEntityUS._533; + if ("534".equals(codeString)) + return V3TribalEntityUS._534; + if ("535".equals(codeString)) + return V3TribalEntityUS._535; + if ("536".equals(codeString)) + return V3TribalEntityUS._536; + if ("537".equals(codeString)) + return V3TribalEntityUS._537; + if ("538".equals(codeString)) + return V3TribalEntityUS._538; + if ("539".equals(codeString)) + return V3TribalEntityUS._539; + if ("540".equals(codeString)) + return V3TribalEntityUS._540; + if ("541".equals(codeString)) + return V3TribalEntityUS._541; + if ("542".equals(codeString)) + return V3TribalEntityUS._542; + if ("543".equals(codeString)) + return V3TribalEntityUS._543; + if ("544".equals(codeString)) + return V3TribalEntityUS._544; + if ("545".equals(codeString)) + return V3TribalEntityUS._545; + if ("546".equals(codeString)) + return V3TribalEntityUS._546; + if ("547".equals(codeString)) + return V3TribalEntityUS._547; + if ("548".equals(codeString)) + return V3TribalEntityUS._548; + if ("549".equals(codeString)) + return V3TribalEntityUS._549; + if ("550".equals(codeString)) + return V3TribalEntityUS._550; + if ("551".equals(codeString)) + return V3TribalEntityUS._551; + if ("552".equals(codeString)) + return V3TribalEntityUS._552; + if ("553".equals(codeString)) + return V3TribalEntityUS._553; + if ("554".equals(codeString)) + return V3TribalEntityUS._554; + if ("555".equals(codeString)) + return V3TribalEntityUS._555; + if ("556".equals(codeString)) + return V3TribalEntityUS._556; + if ("557".equals(codeString)) + return V3TribalEntityUS._557; + if ("558".equals(codeString)) + return V3TribalEntityUS._558; + if ("559".equals(codeString)) + return V3TribalEntityUS._559; + if ("560".equals(codeString)) + return V3TribalEntityUS._560; + if ("561".equals(codeString)) + return V3TribalEntityUS._561; + if ("562".equals(codeString)) + return V3TribalEntityUS._562; + if ("563".equals(codeString)) + return V3TribalEntityUS._563; + if ("564".equals(codeString)) + return V3TribalEntityUS._564; + if ("565".equals(codeString)) + return V3TribalEntityUS._565; + if ("566".equals(codeString)) + return V3TribalEntityUS._566; + if ("_NativeEntityContiguous".equals(codeString)) + return V3TribalEntityUS._NATIVEENTITYCONTIGUOUS; + if ("1".equals(codeString)) + return V3TribalEntityUS._1; + if ("10".equals(codeString)) + return V3TribalEntityUS._10; + if ("100".equals(codeString)) + return V3TribalEntityUS._100; + if ("101".equals(codeString)) + return V3TribalEntityUS._101; + if ("102".equals(codeString)) + return V3TribalEntityUS._102; + if ("103".equals(codeString)) + return V3TribalEntityUS._103; + if ("104".equals(codeString)) + return V3TribalEntityUS._104; + if ("105".equals(codeString)) + return V3TribalEntityUS._105; + if ("106".equals(codeString)) + return V3TribalEntityUS._106; + if ("107".equals(codeString)) + return V3TribalEntityUS._107; + if ("108".equals(codeString)) + return V3TribalEntityUS._108; + if ("109".equals(codeString)) + return V3TribalEntityUS._109; + if ("11".equals(codeString)) + return V3TribalEntityUS._11; + if ("110".equals(codeString)) + return V3TribalEntityUS._110; + if ("111".equals(codeString)) + return V3TribalEntityUS._111; + if ("112".equals(codeString)) + return V3TribalEntityUS._112; + if ("113".equals(codeString)) + return V3TribalEntityUS._113; + if ("114".equals(codeString)) + return V3TribalEntityUS._114; + if ("115".equals(codeString)) + return V3TribalEntityUS._115; + if ("116".equals(codeString)) + return V3TribalEntityUS._116; + if ("117".equals(codeString)) + return V3TribalEntityUS._117; + if ("118".equals(codeString)) + return V3TribalEntityUS._118; + if ("119".equals(codeString)) + return V3TribalEntityUS._119; + if ("12".equals(codeString)) + return V3TribalEntityUS._12; + if ("120".equals(codeString)) + return V3TribalEntityUS._120; + if ("121".equals(codeString)) + return V3TribalEntityUS._121; + if ("122".equals(codeString)) + return V3TribalEntityUS._122; + if ("123".equals(codeString)) + return V3TribalEntityUS._123; + if ("124".equals(codeString)) + return V3TribalEntityUS._124; + if ("125".equals(codeString)) + return V3TribalEntityUS._125; + if ("126".equals(codeString)) + return V3TribalEntityUS._126; + if ("127".equals(codeString)) + return V3TribalEntityUS._127; + if ("128".equals(codeString)) + return V3TribalEntityUS._128; + if ("129".equals(codeString)) + return V3TribalEntityUS._129; + if ("13".equals(codeString)) + return V3TribalEntityUS._13; + if ("130".equals(codeString)) + return V3TribalEntityUS._130; + if ("131".equals(codeString)) + return V3TribalEntityUS._131; + if ("132".equals(codeString)) + return V3TribalEntityUS._132; + if ("133".equals(codeString)) + return V3TribalEntityUS._133; + if ("134".equals(codeString)) + return V3TribalEntityUS._134; + if ("135".equals(codeString)) + return V3TribalEntityUS._135; + if ("136".equals(codeString)) + return V3TribalEntityUS._136; + if ("137".equals(codeString)) + return V3TribalEntityUS._137; + if ("138".equals(codeString)) + return V3TribalEntityUS._138; + if ("139".equals(codeString)) + return V3TribalEntityUS._139; + if ("14".equals(codeString)) + return V3TribalEntityUS._14; + if ("140".equals(codeString)) + return V3TribalEntityUS._140; + if ("141".equals(codeString)) + return V3TribalEntityUS._141; + if ("142".equals(codeString)) + return V3TribalEntityUS._142; + if ("143".equals(codeString)) + return V3TribalEntityUS._143; + if ("144".equals(codeString)) + return V3TribalEntityUS._144; + if ("145".equals(codeString)) + return V3TribalEntityUS._145; + if ("146".equals(codeString)) + return V3TribalEntityUS._146; + if ("147".equals(codeString)) + return V3TribalEntityUS._147; + if ("148".equals(codeString)) + return V3TribalEntityUS._148; + if ("149".equals(codeString)) + return V3TribalEntityUS._149; + if ("15".equals(codeString)) + return V3TribalEntityUS._15; + if ("150".equals(codeString)) + return V3TribalEntityUS._150; + if ("151".equals(codeString)) + return V3TribalEntityUS._151; + if ("152".equals(codeString)) + return V3TribalEntityUS._152; + if ("153".equals(codeString)) + return V3TribalEntityUS._153; + if ("154".equals(codeString)) + return V3TribalEntityUS._154; + if ("155".equals(codeString)) + return V3TribalEntityUS._155; + if ("156".equals(codeString)) + return V3TribalEntityUS._156; + if ("157".equals(codeString)) + return V3TribalEntityUS._157; + if ("158".equals(codeString)) + return V3TribalEntityUS._158; + if ("159".equals(codeString)) + return V3TribalEntityUS._159; + if ("16".equals(codeString)) + return V3TribalEntityUS._16; + if ("160".equals(codeString)) + return V3TribalEntityUS._160; + if ("161".equals(codeString)) + return V3TribalEntityUS._161; + if ("162".equals(codeString)) + return V3TribalEntityUS._162; + if ("163".equals(codeString)) + return V3TribalEntityUS._163; + if ("164".equals(codeString)) + return V3TribalEntityUS._164; + if ("165".equals(codeString)) + return V3TribalEntityUS._165; + if ("166".equals(codeString)) + return V3TribalEntityUS._166; + if ("167".equals(codeString)) + return V3TribalEntityUS._167; + if ("168".equals(codeString)) + return V3TribalEntityUS._168; + if ("169".equals(codeString)) + return V3TribalEntityUS._169; + if ("17".equals(codeString)) + return V3TribalEntityUS._17; + if ("170".equals(codeString)) + return V3TribalEntityUS._170; + if ("171".equals(codeString)) + return V3TribalEntityUS._171; + if ("172".equals(codeString)) + return V3TribalEntityUS._172; + if ("173".equals(codeString)) + return V3TribalEntityUS._173; + if ("174".equals(codeString)) + return V3TribalEntityUS._174; + if ("175".equals(codeString)) + return V3TribalEntityUS._175; + if ("176".equals(codeString)) + return V3TribalEntityUS._176; + if ("177".equals(codeString)) + return V3TribalEntityUS._177; + if ("178".equals(codeString)) + return V3TribalEntityUS._178; + if ("179".equals(codeString)) + return V3TribalEntityUS._179; + if ("18".equals(codeString)) + return V3TribalEntityUS._18; + if ("180".equals(codeString)) + return V3TribalEntityUS._180; + if ("181".equals(codeString)) + return V3TribalEntityUS._181; + if ("182".equals(codeString)) + return V3TribalEntityUS._182; + if ("183".equals(codeString)) + return V3TribalEntityUS._183; + if ("184".equals(codeString)) + return V3TribalEntityUS._184; + if ("185".equals(codeString)) + return V3TribalEntityUS._185; + if ("186".equals(codeString)) + return V3TribalEntityUS._186; + if ("187".equals(codeString)) + return V3TribalEntityUS._187; + if ("188".equals(codeString)) + return V3TribalEntityUS._188; + if ("189".equals(codeString)) + return V3TribalEntityUS._189; + if ("19".equals(codeString)) + return V3TribalEntityUS._19; + if ("190".equals(codeString)) + return V3TribalEntityUS._190; + if ("191".equals(codeString)) + return V3TribalEntityUS._191; + if ("192".equals(codeString)) + return V3TribalEntityUS._192; + if ("193".equals(codeString)) + return V3TribalEntityUS._193; + if ("194".equals(codeString)) + return V3TribalEntityUS._194; + if ("195".equals(codeString)) + return V3TribalEntityUS._195; + if ("196".equals(codeString)) + return V3TribalEntityUS._196; + if ("197".equals(codeString)) + return V3TribalEntityUS._197; + if ("198".equals(codeString)) + return V3TribalEntityUS._198; + if ("199".equals(codeString)) + return V3TribalEntityUS._199; + if ("2".equals(codeString)) + return V3TribalEntityUS._2; + if ("20".equals(codeString)) + return V3TribalEntityUS._20; + if ("200".equals(codeString)) + return V3TribalEntityUS._200; + if ("201".equals(codeString)) + return V3TribalEntityUS._201; + if ("202".equals(codeString)) + return V3TribalEntityUS._202; + if ("203".equals(codeString)) + return V3TribalEntityUS._203; + if ("204".equals(codeString)) + return V3TribalEntityUS._204; + if ("205".equals(codeString)) + return V3TribalEntityUS._205; + if ("206".equals(codeString)) + return V3TribalEntityUS._206; + if ("207".equals(codeString)) + return V3TribalEntityUS._207; + if ("208".equals(codeString)) + return V3TribalEntityUS._208; + if ("209".equals(codeString)) + return V3TribalEntityUS._209; + if ("21".equals(codeString)) + return V3TribalEntityUS._21; + if ("210".equals(codeString)) + return V3TribalEntityUS._210; + if ("211".equals(codeString)) + return V3TribalEntityUS._211; + if ("212".equals(codeString)) + return V3TribalEntityUS._212; + if ("213".equals(codeString)) + return V3TribalEntityUS._213; + if ("214".equals(codeString)) + return V3TribalEntityUS._214; + if ("215".equals(codeString)) + return V3TribalEntityUS._215; + if ("216".equals(codeString)) + return V3TribalEntityUS._216; + if ("217".equals(codeString)) + return V3TribalEntityUS._217; + if ("218".equals(codeString)) + return V3TribalEntityUS._218; + if ("219".equals(codeString)) + return V3TribalEntityUS._219; + if ("22".equals(codeString)) + return V3TribalEntityUS._22; + if ("220".equals(codeString)) + return V3TribalEntityUS._220; + if ("221".equals(codeString)) + return V3TribalEntityUS._221; + if ("222".equals(codeString)) + return V3TribalEntityUS._222; + if ("223".equals(codeString)) + return V3TribalEntityUS._223; + if ("224".equals(codeString)) + return V3TribalEntityUS._224; + if ("225".equals(codeString)) + return V3TribalEntityUS._225; + if ("226".equals(codeString)) + return V3TribalEntityUS._226; + if ("227".equals(codeString)) + return V3TribalEntityUS._227; + if ("228".equals(codeString)) + return V3TribalEntityUS._228; + if ("229".equals(codeString)) + return V3TribalEntityUS._229; + if ("23".equals(codeString)) + return V3TribalEntityUS._23; + if ("230".equals(codeString)) + return V3TribalEntityUS._230; + if ("231".equals(codeString)) + return V3TribalEntityUS._231; + if ("232".equals(codeString)) + return V3TribalEntityUS._232; + if ("233".equals(codeString)) + return V3TribalEntityUS._233; + if ("234".equals(codeString)) + return V3TribalEntityUS._234; + if ("235".equals(codeString)) + return V3TribalEntityUS._235; + if ("236".equals(codeString)) + return V3TribalEntityUS._236; + if ("237".equals(codeString)) + return V3TribalEntityUS._237; + if ("238".equals(codeString)) + return V3TribalEntityUS._238; + if ("239".equals(codeString)) + return V3TribalEntityUS._239; + if ("24".equals(codeString)) + return V3TribalEntityUS._24; + if ("240".equals(codeString)) + return V3TribalEntityUS._240; + if ("241".equals(codeString)) + return V3TribalEntityUS._241; + if ("242".equals(codeString)) + return V3TribalEntityUS._242; + if ("243".equals(codeString)) + return V3TribalEntityUS._243; + if ("244".equals(codeString)) + return V3TribalEntityUS._244; + if ("245".equals(codeString)) + return V3TribalEntityUS._245; + if ("246".equals(codeString)) + return V3TribalEntityUS._246; + if ("247".equals(codeString)) + return V3TribalEntityUS._247; + if ("248".equals(codeString)) + return V3TribalEntityUS._248; + if ("249".equals(codeString)) + return V3TribalEntityUS._249; + if ("25".equals(codeString)) + return V3TribalEntityUS._25; + if ("250".equals(codeString)) + return V3TribalEntityUS._250; + if ("251".equals(codeString)) + return V3TribalEntityUS._251; + if ("252".equals(codeString)) + return V3TribalEntityUS._252; + if ("253".equals(codeString)) + return V3TribalEntityUS._253; + if ("254".equals(codeString)) + return V3TribalEntityUS._254; + if ("255".equals(codeString)) + return V3TribalEntityUS._255; + if ("256".equals(codeString)) + return V3TribalEntityUS._256; + if ("257".equals(codeString)) + return V3TribalEntityUS._257; + if ("258".equals(codeString)) + return V3TribalEntityUS._258; + if ("259".equals(codeString)) + return V3TribalEntityUS._259; + if ("26".equals(codeString)) + return V3TribalEntityUS._26; + if ("260".equals(codeString)) + return V3TribalEntityUS._260; + if ("261".equals(codeString)) + return V3TribalEntityUS._261; + if ("262".equals(codeString)) + return V3TribalEntityUS._262; + if ("263".equals(codeString)) + return V3TribalEntityUS._263; + if ("264".equals(codeString)) + return V3TribalEntityUS._264; + if ("265".equals(codeString)) + return V3TribalEntityUS._265; + if ("266".equals(codeString)) + return V3TribalEntityUS._266; + if ("267".equals(codeString)) + return V3TribalEntityUS._267; + if ("268".equals(codeString)) + return V3TribalEntityUS._268; + if ("269".equals(codeString)) + return V3TribalEntityUS._269; + if ("27".equals(codeString)) + return V3TribalEntityUS._27; + if ("270".equals(codeString)) + return V3TribalEntityUS._270; + if ("271".equals(codeString)) + return V3TribalEntityUS._271; + if ("272".equals(codeString)) + return V3TribalEntityUS._272; + if ("273".equals(codeString)) + return V3TribalEntityUS._273; + if ("274".equals(codeString)) + return V3TribalEntityUS._274; + if ("275".equals(codeString)) + return V3TribalEntityUS._275; + if ("276".equals(codeString)) + return V3TribalEntityUS._276; + if ("277".equals(codeString)) + return V3TribalEntityUS._277; + if ("278".equals(codeString)) + return V3TribalEntityUS._278; + if ("279".equals(codeString)) + return V3TribalEntityUS._279; + if ("28".equals(codeString)) + return V3TribalEntityUS._28; + if ("280".equals(codeString)) + return V3TribalEntityUS._280; + if ("281".equals(codeString)) + return V3TribalEntityUS._281; + if ("282".equals(codeString)) + return V3TribalEntityUS._282; + if ("283".equals(codeString)) + return V3TribalEntityUS._283; + if ("284".equals(codeString)) + return V3TribalEntityUS._284; + if ("285".equals(codeString)) + return V3TribalEntityUS._285; + if ("286".equals(codeString)) + return V3TribalEntityUS._286; + if ("287".equals(codeString)) + return V3TribalEntityUS._287; + if ("288".equals(codeString)) + return V3TribalEntityUS._288; + if ("289".equals(codeString)) + return V3TribalEntityUS._289; + if ("29".equals(codeString)) + return V3TribalEntityUS._29; + if ("290".equals(codeString)) + return V3TribalEntityUS._290; + if ("291".equals(codeString)) + return V3TribalEntityUS._291; + if ("292".equals(codeString)) + return V3TribalEntityUS._292; + if ("293".equals(codeString)) + return V3TribalEntityUS._293; + if ("294".equals(codeString)) + return V3TribalEntityUS._294; + if ("295".equals(codeString)) + return V3TribalEntityUS._295; + if ("296".equals(codeString)) + return V3TribalEntityUS._296; + if ("297".equals(codeString)) + return V3TribalEntityUS._297; + if ("298".equals(codeString)) + return V3TribalEntityUS._298; + if ("299".equals(codeString)) + return V3TribalEntityUS._299; + if ("3".equals(codeString)) + return V3TribalEntityUS._3; + if ("30".equals(codeString)) + return V3TribalEntityUS._30; + if ("300".equals(codeString)) + return V3TribalEntityUS._300; + if ("301".equals(codeString)) + return V3TribalEntityUS._301; + if ("302".equals(codeString)) + return V3TribalEntityUS._302; + if ("303".equals(codeString)) + return V3TribalEntityUS._303; + if ("304".equals(codeString)) + return V3TribalEntityUS._304; + if ("305".equals(codeString)) + return V3TribalEntityUS._305; + if ("306".equals(codeString)) + return V3TribalEntityUS._306; + if ("307".equals(codeString)) + return V3TribalEntityUS._307; + if ("308".equals(codeString)) + return V3TribalEntityUS._308; + if ("309".equals(codeString)) + return V3TribalEntityUS._309; + if ("31".equals(codeString)) + return V3TribalEntityUS._31; + if ("310".equals(codeString)) + return V3TribalEntityUS._310; + if ("311".equals(codeString)) + return V3TribalEntityUS._311; + if ("312".equals(codeString)) + return V3TribalEntityUS._312; + if ("313".equals(codeString)) + return V3TribalEntityUS._313; + if ("314".equals(codeString)) + return V3TribalEntityUS._314; + if ("315".equals(codeString)) + return V3TribalEntityUS._315; + if ("316".equals(codeString)) + return V3TribalEntityUS._316; + if ("317".equals(codeString)) + return V3TribalEntityUS._317; + if ("318".equals(codeString)) + return V3TribalEntityUS._318; + if ("319".equals(codeString)) + return V3TribalEntityUS._319; + if ("32".equals(codeString)) + return V3TribalEntityUS._32; + if ("320".equals(codeString)) + return V3TribalEntityUS._320; + if ("321".equals(codeString)) + return V3TribalEntityUS._321; + if ("322".equals(codeString)) + return V3TribalEntityUS._322; + if ("323".equals(codeString)) + return V3TribalEntityUS._323; + if ("324".equals(codeString)) + return V3TribalEntityUS._324; + if ("325".equals(codeString)) + return V3TribalEntityUS._325; + if ("326".equals(codeString)) + return V3TribalEntityUS._326; + if ("327".equals(codeString)) + return V3TribalEntityUS._327; + if ("328".equals(codeString)) + return V3TribalEntityUS._328; + if ("329".equals(codeString)) + return V3TribalEntityUS._329; + if ("33".equals(codeString)) + return V3TribalEntityUS._33; + if ("330".equals(codeString)) + return V3TribalEntityUS._330; + if ("331".equals(codeString)) + return V3TribalEntityUS._331; + if ("332".equals(codeString)) + return V3TribalEntityUS._332; + if ("333".equals(codeString)) + return V3TribalEntityUS._333; + if ("334".equals(codeString)) + return V3TribalEntityUS._334; + if ("335".equals(codeString)) + return V3TribalEntityUS._335; + if ("336".equals(codeString)) + return V3TribalEntityUS._336; + if ("337".equals(codeString)) + return V3TribalEntityUS._337; + if ("34".equals(codeString)) + return V3TribalEntityUS._34; + if ("35".equals(codeString)) + return V3TribalEntityUS._35; + if ("36".equals(codeString)) + return V3TribalEntityUS._36; + if ("37".equals(codeString)) + return V3TribalEntityUS._37; + if ("38".equals(codeString)) + return V3TribalEntityUS._38; + if ("39".equals(codeString)) + return V3TribalEntityUS._39; + if ("4".equals(codeString)) + return V3TribalEntityUS._4; + if ("40".equals(codeString)) + return V3TribalEntityUS._40; + if ("41".equals(codeString)) + return V3TribalEntityUS._41; + if ("42".equals(codeString)) + return V3TribalEntityUS._42; + if ("43".equals(codeString)) + return V3TribalEntityUS._43; + if ("44".equals(codeString)) + return V3TribalEntityUS._44; + if ("45".equals(codeString)) + return V3TribalEntityUS._45; + if ("46".equals(codeString)) + return V3TribalEntityUS._46; + if ("47".equals(codeString)) + return V3TribalEntityUS._47; + if ("48".equals(codeString)) + return V3TribalEntityUS._48; + if ("49".equals(codeString)) + return V3TribalEntityUS._49; + if ("5".equals(codeString)) + return V3TribalEntityUS._5; + if ("50".equals(codeString)) + return V3TribalEntityUS._50; + if ("51".equals(codeString)) + return V3TribalEntityUS._51; + if ("52".equals(codeString)) + return V3TribalEntityUS._52; + if ("53".equals(codeString)) + return V3TribalEntityUS._53; + if ("54".equals(codeString)) + return V3TribalEntityUS._54; + if ("55".equals(codeString)) + return V3TribalEntityUS._55; + if ("56".equals(codeString)) + return V3TribalEntityUS._56; + if ("57".equals(codeString)) + return V3TribalEntityUS._57; + if ("58".equals(codeString)) + return V3TribalEntityUS._58; + if ("59".equals(codeString)) + return V3TribalEntityUS._59; + if ("6".equals(codeString)) + return V3TribalEntityUS._6; + if ("60".equals(codeString)) + return V3TribalEntityUS._60; + if ("61".equals(codeString)) + return V3TribalEntityUS._61; + if ("62".equals(codeString)) + return V3TribalEntityUS._62; + if ("63".equals(codeString)) + return V3TribalEntityUS._63; + if ("64".equals(codeString)) + return V3TribalEntityUS._64; + if ("65".equals(codeString)) + return V3TribalEntityUS._65; + if ("66".equals(codeString)) + return V3TribalEntityUS._66; + if ("67".equals(codeString)) + return V3TribalEntityUS._67; + if ("68".equals(codeString)) + return V3TribalEntityUS._68; + if ("69".equals(codeString)) + return V3TribalEntityUS._69; + if ("7".equals(codeString)) + return V3TribalEntityUS._7; + if ("70".equals(codeString)) + return V3TribalEntityUS._70; + if ("71".equals(codeString)) + return V3TribalEntityUS._71; + if ("72".equals(codeString)) + return V3TribalEntityUS._72; + if ("73".equals(codeString)) + return V3TribalEntityUS._73; + if ("74".equals(codeString)) + return V3TribalEntityUS._74; + if ("75".equals(codeString)) + return V3TribalEntityUS._75; + if ("76".equals(codeString)) + return V3TribalEntityUS._76; + if ("77".equals(codeString)) + return V3TribalEntityUS._77; + if ("78".equals(codeString)) + return V3TribalEntityUS._78; + if ("79".equals(codeString)) + return V3TribalEntityUS._79; + if ("8".equals(codeString)) + return V3TribalEntityUS._8; + if ("80".equals(codeString)) + return V3TribalEntityUS._80; + if ("81".equals(codeString)) + return V3TribalEntityUS._81; + if ("82".equals(codeString)) + return V3TribalEntityUS._82; + if ("83".equals(codeString)) + return V3TribalEntityUS._83; + if ("84".equals(codeString)) + return V3TribalEntityUS._84; + if ("85".equals(codeString)) + return V3TribalEntityUS._85; + if ("86".equals(codeString)) + return V3TribalEntityUS._86; + if ("87".equals(codeString)) + return V3TribalEntityUS._87; + if ("88".equals(codeString)) + return V3TribalEntityUS._88; + if ("89".equals(codeString)) + return V3TribalEntityUS._89; + if ("9".equals(codeString)) + return V3TribalEntityUS._9; + if ("90".equals(codeString)) + return V3TribalEntityUS._90; + if ("91".equals(codeString)) + return V3TribalEntityUS._91; + if ("92".equals(codeString)) + return V3TribalEntityUS._92; + if ("93".equals(codeString)) + return V3TribalEntityUS._93; + if ("94".equals(codeString)) + return V3TribalEntityUS._94; + if ("95".equals(codeString)) + return V3TribalEntityUS._95; + if ("96".equals(codeString)) + return V3TribalEntityUS._96; + if ("97".equals(codeString)) + return V3TribalEntityUS._97; + if ("98".equals(codeString)) + return V3TribalEntityUS._98; + if ("99".equals(codeString)) + return V3TribalEntityUS._99; + throw new IllegalArgumentException("Unknown V3TribalEntityUS code '"+codeString+"'"); + } + + public String toCode(V3TribalEntityUS code) { + if (code == V3TribalEntityUS._NATIVEENTITYALASKA) + return "_NativeEntityAlaska"; + if (code == V3TribalEntityUS._338) + return "338"; + if (code == V3TribalEntityUS._339) + return "339"; + if (code == V3TribalEntityUS._340) + return "340"; + if (code == V3TribalEntityUS._341) + return "341"; + if (code == V3TribalEntityUS._342) + return "342"; + if (code == V3TribalEntityUS._343) + return "343"; + if (code == V3TribalEntityUS._344) + return "344"; + if (code == V3TribalEntityUS._345) + return "345"; + if (code == V3TribalEntityUS._346) + return "346"; + if (code == V3TribalEntityUS._347) + return "347"; + if (code == V3TribalEntityUS._348) + return "348"; + if (code == V3TribalEntityUS._349) + return "349"; + if (code == V3TribalEntityUS._350) + return "350"; + if (code == V3TribalEntityUS._351) + return "351"; + if (code == V3TribalEntityUS._352) + return "352"; + if (code == V3TribalEntityUS._353) + return "353"; + if (code == V3TribalEntityUS._354) + return "354"; + if (code == V3TribalEntityUS._355) + return "355"; + if (code == V3TribalEntityUS._356) + return "356"; + if (code == V3TribalEntityUS._357) + return "357"; + if (code == V3TribalEntityUS._358) + return "358"; + if (code == V3TribalEntityUS._359) + return "359"; + if (code == V3TribalEntityUS._360) + return "360"; + if (code == V3TribalEntityUS._361) + return "361"; + if (code == V3TribalEntityUS._362) + return "362"; + if (code == V3TribalEntityUS._363) + return "363"; + if (code == V3TribalEntityUS._364) + return "364"; + if (code == V3TribalEntityUS._365) + return "365"; + if (code == V3TribalEntityUS._366) + return "366"; + if (code == V3TribalEntityUS._367) + return "367"; + if (code == V3TribalEntityUS._368) + return "368"; + if (code == V3TribalEntityUS._369) + return "369"; + if (code == V3TribalEntityUS._370) + return "370"; + if (code == V3TribalEntityUS._371) + return "371"; + if (code == V3TribalEntityUS._372) + return "372"; + if (code == V3TribalEntityUS._373) + return "373"; + if (code == V3TribalEntityUS._374) + return "374"; + if (code == V3TribalEntityUS._375) + return "375"; + if (code == V3TribalEntityUS._376) + return "376"; + if (code == V3TribalEntityUS._377) + return "377"; + if (code == V3TribalEntityUS._378) + return "378"; + if (code == V3TribalEntityUS._379) + return "379"; + if (code == V3TribalEntityUS._380) + return "380"; + if (code == V3TribalEntityUS._381) + return "381"; + if (code == V3TribalEntityUS._382) + return "382"; + if (code == V3TribalEntityUS._383) + return "383"; + if (code == V3TribalEntityUS._384) + return "384"; + if (code == V3TribalEntityUS._385) + return "385"; + if (code == V3TribalEntityUS._386) + return "386"; + if (code == V3TribalEntityUS._387) + return "387"; + if (code == V3TribalEntityUS._388) + return "388"; + if (code == V3TribalEntityUS._389) + return "389"; + if (code == V3TribalEntityUS._390) + return "390"; + if (code == V3TribalEntityUS._391) + return "391"; + if (code == V3TribalEntityUS._392) + return "392"; + if (code == V3TribalEntityUS._393) + return "393"; + if (code == V3TribalEntityUS._394) + return "394"; + if (code == V3TribalEntityUS._395) + return "395"; + if (code == V3TribalEntityUS._396) + return "396"; + if (code == V3TribalEntityUS._397) + return "397"; + if (code == V3TribalEntityUS._398) + return "398"; + if (code == V3TribalEntityUS._399) + return "399"; + if (code == V3TribalEntityUS._400) + return "400"; + if (code == V3TribalEntityUS._401) + return "401"; + if (code == V3TribalEntityUS._402) + return "402"; + if (code == V3TribalEntityUS._403) + return "403"; + if (code == V3TribalEntityUS._404) + return "404"; + if (code == V3TribalEntityUS._405) + return "405"; + if (code == V3TribalEntityUS._406) + return "406"; + if (code == V3TribalEntityUS._407) + return "407"; + if (code == V3TribalEntityUS._408) + return "408"; + if (code == V3TribalEntityUS._409) + return "409"; + if (code == V3TribalEntityUS._410) + return "410"; + if (code == V3TribalEntityUS._411) + return "411"; + if (code == V3TribalEntityUS._412) + return "412"; + if (code == V3TribalEntityUS._413) + return "413"; + if (code == V3TribalEntityUS._414) + return "414"; + if (code == V3TribalEntityUS._415) + return "415"; + if (code == V3TribalEntityUS._416) + return "416"; + if (code == V3TribalEntityUS._417) + return "417"; + if (code == V3TribalEntityUS._418) + return "418"; + if (code == V3TribalEntityUS._419) + return "419"; + if (code == V3TribalEntityUS._420) + return "420"; + if (code == V3TribalEntityUS._421) + return "421"; + if (code == V3TribalEntityUS._422) + return "422"; + if (code == V3TribalEntityUS._423) + return "423"; + if (code == V3TribalEntityUS._424) + return "424"; + if (code == V3TribalEntityUS._425) + return "425"; + if (code == V3TribalEntityUS._426) + return "426"; + if (code == V3TribalEntityUS._427) + return "427"; + if (code == V3TribalEntityUS._428) + return "428"; + if (code == V3TribalEntityUS._429) + return "429"; + if (code == V3TribalEntityUS._430) + return "430"; + if (code == V3TribalEntityUS._431) + return "431"; + if (code == V3TribalEntityUS._432) + return "432"; + if (code == V3TribalEntityUS._433) + return "433"; + if (code == V3TribalEntityUS._434) + return "434"; + if (code == V3TribalEntityUS._435) + return "435"; + if (code == V3TribalEntityUS._436) + return "436"; + if (code == V3TribalEntityUS._437) + return "437"; + if (code == V3TribalEntityUS._438) + return "438"; + if (code == V3TribalEntityUS._439) + return "439"; + if (code == V3TribalEntityUS._440) + return "440"; + if (code == V3TribalEntityUS._441) + return "441"; + if (code == V3TribalEntityUS._442) + return "442"; + if (code == V3TribalEntityUS._443) + return "443"; + if (code == V3TribalEntityUS._444) + return "444"; + if (code == V3TribalEntityUS._445) + return "445"; + if (code == V3TribalEntityUS._446) + return "446"; + if (code == V3TribalEntityUS._447) + return "447"; + if (code == V3TribalEntityUS._448) + return "448"; + if (code == V3TribalEntityUS._449) + return "449"; + if (code == V3TribalEntityUS._450) + return "450"; + if (code == V3TribalEntityUS._451) + return "451"; + if (code == V3TribalEntityUS._452) + return "452"; + if (code == V3TribalEntityUS._453) + return "453"; + if (code == V3TribalEntityUS._454) + return "454"; + if (code == V3TribalEntityUS._455) + return "455"; + if (code == V3TribalEntityUS._456) + return "456"; + if (code == V3TribalEntityUS._457) + return "457"; + if (code == V3TribalEntityUS._458) + return "458"; + if (code == V3TribalEntityUS._459) + return "459"; + if (code == V3TribalEntityUS._460) + return "460"; + if (code == V3TribalEntityUS._461) + return "461"; + if (code == V3TribalEntityUS._462) + return "462"; + if (code == V3TribalEntityUS._463) + return "463"; + if (code == V3TribalEntityUS._464) + return "464"; + if (code == V3TribalEntityUS._465) + return "465"; + if (code == V3TribalEntityUS._466) + return "466"; + if (code == V3TribalEntityUS._467) + return "467"; + if (code == V3TribalEntityUS._468) + return "468"; + if (code == V3TribalEntityUS._469) + return "469"; + if (code == V3TribalEntityUS._470) + return "470"; + if (code == V3TribalEntityUS._471) + return "471"; + if (code == V3TribalEntityUS._472) + return "472"; + if (code == V3TribalEntityUS._473) + return "473"; + if (code == V3TribalEntityUS._474) + return "474"; + if (code == V3TribalEntityUS._475) + return "475"; + if (code == V3TribalEntityUS._476) + return "476"; + if (code == V3TribalEntityUS._477) + return "477"; + if (code == V3TribalEntityUS._478) + return "478"; + if (code == V3TribalEntityUS._479) + return "479"; + if (code == V3TribalEntityUS._480) + return "480"; + if (code == V3TribalEntityUS._481) + return "481"; + if (code == V3TribalEntityUS._482) + return "482"; + if (code == V3TribalEntityUS._483) + return "483"; + if (code == V3TribalEntityUS._484) + return "484"; + if (code == V3TribalEntityUS._485) + return "485"; + if (code == V3TribalEntityUS._486) + return "486"; + if (code == V3TribalEntityUS._487) + return "487"; + if (code == V3TribalEntityUS._488) + return "488"; + if (code == V3TribalEntityUS._489) + return "489"; + if (code == V3TribalEntityUS._490) + return "490"; + if (code == V3TribalEntityUS._491) + return "491"; + if (code == V3TribalEntityUS._492) + return "492"; + if (code == V3TribalEntityUS._493) + return "493"; + if (code == V3TribalEntityUS._494) + return "494"; + if (code == V3TribalEntityUS._495) + return "495"; + if (code == V3TribalEntityUS._496) + return "496"; + if (code == V3TribalEntityUS._497) + return "497"; + if (code == V3TribalEntityUS._498) + return "498"; + if (code == V3TribalEntityUS._499) + return "499"; + if (code == V3TribalEntityUS._500) + return "500"; + if (code == V3TribalEntityUS._501) + return "501"; + if (code == V3TribalEntityUS._502) + return "502"; + if (code == V3TribalEntityUS._503) + return "503"; + if (code == V3TribalEntityUS._504) + return "504"; + if (code == V3TribalEntityUS._505) + return "505"; + if (code == V3TribalEntityUS._506) + return "506"; + if (code == V3TribalEntityUS._507) + return "507"; + if (code == V3TribalEntityUS._508) + return "508"; + if (code == V3TribalEntityUS._509) + return "509"; + if (code == V3TribalEntityUS._510) + return "510"; + if (code == V3TribalEntityUS._511) + return "511"; + if (code == V3TribalEntityUS._512) + return "512"; + if (code == V3TribalEntityUS._513) + return "513"; + if (code == V3TribalEntityUS._514) + return "514"; + if (code == V3TribalEntityUS._515) + return "515"; + if (code == V3TribalEntityUS._516) + return "516"; + if (code == V3TribalEntityUS._517) + return "517"; + if (code == V3TribalEntityUS._518) + return "518"; + if (code == V3TribalEntityUS._519) + return "519"; + if (code == V3TribalEntityUS._520) + return "520"; + if (code == V3TribalEntityUS._521) + return "521"; + if (code == V3TribalEntityUS._522) + return "522"; + if (code == V3TribalEntityUS._523) + return "523"; + if (code == V3TribalEntityUS._524) + return "524"; + if (code == V3TribalEntityUS._525) + return "525"; + if (code == V3TribalEntityUS._526) + return "526"; + if (code == V3TribalEntityUS._527) + return "527"; + if (code == V3TribalEntityUS._528) + return "528"; + if (code == V3TribalEntityUS._529) + return "529"; + if (code == V3TribalEntityUS._530) + return "530"; + if (code == V3TribalEntityUS._531) + return "531"; + if (code == V3TribalEntityUS._532) + return "532"; + if (code == V3TribalEntityUS._533) + return "533"; + if (code == V3TribalEntityUS._534) + return "534"; + if (code == V3TribalEntityUS._535) + return "535"; + if (code == V3TribalEntityUS._536) + return "536"; + if (code == V3TribalEntityUS._537) + return "537"; + if (code == V3TribalEntityUS._538) + return "538"; + if (code == V3TribalEntityUS._539) + return "539"; + if (code == V3TribalEntityUS._540) + return "540"; + if (code == V3TribalEntityUS._541) + return "541"; + if (code == V3TribalEntityUS._542) + return "542"; + if (code == V3TribalEntityUS._543) + return "543"; + if (code == V3TribalEntityUS._544) + return "544"; + if (code == V3TribalEntityUS._545) + return "545"; + if (code == V3TribalEntityUS._546) + return "546"; + if (code == V3TribalEntityUS._547) + return "547"; + if (code == V3TribalEntityUS._548) + return "548"; + if (code == V3TribalEntityUS._549) + return "549"; + if (code == V3TribalEntityUS._550) + return "550"; + if (code == V3TribalEntityUS._551) + return "551"; + if (code == V3TribalEntityUS._552) + return "552"; + if (code == V3TribalEntityUS._553) + return "553"; + if (code == V3TribalEntityUS._554) + return "554"; + if (code == V3TribalEntityUS._555) + return "555"; + if (code == V3TribalEntityUS._556) + return "556"; + if (code == V3TribalEntityUS._557) + return "557"; + if (code == V3TribalEntityUS._558) + return "558"; + if (code == V3TribalEntityUS._559) + return "559"; + if (code == V3TribalEntityUS._560) + return "560"; + if (code == V3TribalEntityUS._561) + return "561"; + if (code == V3TribalEntityUS._562) + return "562"; + if (code == V3TribalEntityUS._563) + return "563"; + if (code == V3TribalEntityUS._564) + return "564"; + if (code == V3TribalEntityUS._565) + return "565"; + if (code == V3TribalEntityUS._566) + return "566"; + if (code == V3TribalEntityUS._NATIVEENTITYCONTIGUOUS) + return "_NativeEntityContiguous"; + if (code == V3TribalEntityUS._1) + return "1"; + if (code == V3TribalEntityUS._10) + return "10"; + if (code == V3TribalEntityUS._100) + return "100"; + if (code == V3TribalEntityUS._101) + return "101"; + if (code == V3TribalEntityUS._102) + return "102"; + if (code == V3TribalEntityUS._103) + return "103"; + if (code == V3TribalEntityUS._104) + return "104"; + if (code == V3TribalEntityUS._105) + return "105"; + if (code == V3TribalEntityUS._106) + return "106"; + if (code == V3TribalEntityUS._107) + return "107"; + if (code == V3TribalEntityUS._108) + return "108"; + if (code == V3TribalEntityUS._109) + return "109"; + if (code == V3TribalEntityUS._11) + return "11"; + if (code == V3TribalEntityUS._110) + return "110"; + if (code == V3TribalEntityUS._111) + return "111"; + if (code == V3TribalEntityUS._112) + return "112"; + if (code == V3TribalEntityUS._113) + return "113"; + if (code == V3TribalEntityUS._114) + return "114"; + if (code == V3TribalEntityUS._115) + return "115"; + if (code == V3TribalEntityUS._116) + return "116"; + if (code == V3TribalEntityUS._117) + return "117"; + if (code == V3TribalEntityUS._118) + return "118"; + if (code == V3TribalEntityUS._119) + return "119"; + if (code == V3TribalEntityUS._12) + return "12"; + if (code == V3TribalEntityUS._120) + return "120"; + if (code == V3TribalEntityUS._121) + return "121"; + if (code == V3TribalEntityUS._122) + return "122"; + if (code == V3TribalEntityUS._123) + return "123"; + if (code == V3TribalEntityUS._124) + return "124"; + if (code == V3TribalEntityUS._125) + return "125"; + if (code == V3TribalEntityUS._126) + return "126"; + if (code == V3TribalEntityUS._127) + return "127"; + if (code == V3TribalEntityUS._128) + return "128"; + if (code == V3TribalEntityUS._129) + return "129"; + if (code == V3TribalEntityUS._13) + return "13"; + if (code == V3TribalEntityUS._130) + return "130"; + if (code == V3TribalEntityUS._131) + return "131"; + if (code == V3TribalEntityUS._132) + return "132"; + if (code == V3TribalEntityUS._133) + return "133"; + if (code == V3TribalEntityUS._134) + return "134"; + if (code == V3TribalEntityUS._135) + return "135"; + if (code == V3TribalEntityUS._136) + return "136"; + if (code == V3TribalEntityUS._137) + return "137"; + if (code == V3TribalEntityUS._138) + return "138"; + if (code == V3TribalEntityUS._139) + return "139"; + if (code == V3TribalEntityUS._14) + return "14"; + if (code == V3TribalEntityUS._140) + return "140"; + if (code == V3TribalEntityUS._141) + return "141"; + if (code == V3TribalEntityUS._142) + return "142"; + if (code == V3TribalEntityUS._143) + return "143"; + if (code == V3TribalEntityUS._144) + return "144"; + if (code == V3TribalEntityUS._145) + return "145"; + if (code == V3TribalEntityUS._146) + return "146"; + if (code == V3TribalEntityUS._147) + return "147"; + if (code == V3TribalEntityUS._148) + return "148"; + if (code == V3TribalEntityUS._149) + return "149"; + if (code == V3TribalEntityUS._15) + return "15"; + if (code == V3TribalEntityUS._150) + return "150"; + if (code == V3TribalEntityUS._151) + return "151"; + if (code == V3TribalEntityUS._152) + return "152"; + if (code == V3TribalEntityUS._153) + return "153"; + if (code == V3TribalEntityUS._154) + return "154"; + if (code == V3TribalEntityUS._155) + return "155"; + if (code == V3TribalEntityUS._156) + return "156"; + if (code == V3TribalEntityUS._157) + return "157"; + if (code == V3TribalEntityUS._158) + return "158"; + if (code == V3TribalEntityUS._159) + return "159"; + if (code == V3TribalEntityUS._16) + return "16"; + if (code == V3TribalEntityUS._160) + return "160"; + if (code == V3TribalEntityUS._161) + return "161"; + if (code == V3TribalEntityUS._162) + return "162"; + if (code == V3TribalEntityUS._163) + return "163"; + if (code == V3TribalEntityUS._164) + return "164"; + if (code == V3TribalEntityUS._165) + return "165"; + if (code == V3TribalEntityUS._166) + return "166"; + if (code == V3TribalEntityUS._167) + return "167"; + if (code == V3TribalEntityUS._168) + return "168"; + if (code == V3TribalEntityUS._169) + return "169"; + if (code == V3TribalEntityUS._17) + return "17"; + if (code == V3TribalEntityUS._170) + return "170"; + if (code == V3TribalEntityUS._171) + return "171"; + if (code == V3TribalEntityUS._172) + return "172"; + if (code == V3TribalEntityUS._173) + return "173"; + if (code == V3TribalEntityUS._174) + return "174"; + if (code == V3TribalEntityUS._175) + return "175"; + if (code == V3TribalEntityUS._176) + return "176"; + if (code == V3TribalEntityUS._177) + return "177"; + if (code == V3TribalEntityUS._178) + return "178"; + if (code == V3TribalEntityUS._179) + return "179"; + if (code == V3TribalEntityUS._18) + return "18"; + if (code == V3TribalEntityUS._180) + return "180"; + if (code == V3TribalEntityUS._181) + return "181"; + if (code == V3TribalEntityUS._182) + return "182"; + if (code == V3TribalEntityUS._183) + return "183"; + if (code == V3TribalEntityUS._184) + return "184"; + if (code == V3TribalEntityUS._185) + return "185"; + if (code == V3TribalEntityUS._186) + return "186"; + if (code == V3TribalEntityUS._187) + return "187"; + if (code == V3TribalEntityUS._188) + return "188"; + if (code == V3TribalEntityUS._189) + return "189"; + if (code == V3TribalEntityUS._19) + return "19"; + if (code == V3TribalEntityUS._190) + return "190"; + if (code == V3TribalEntityUS._191) + return "191"; + if (code == V3TribalEntityUS._192) + return "192"; + if (code == V3TribalEntityUS._193) + return "193"; + if (code == V3TribalEntityUS._194) + return "194"; + if (code == V3TribalEntityUS._195) + return "195"; + if (code == V3TribalEntityUS._196) + return "196"; + if (code == V3TribalEntityUS._197) + return "197"; + if (code == V3TribalEntityUS._198) + return "198"; + if (code == V3TribalEntityUS._199) + return "199"; + if (code == V3TribalEntityUS._2) + return "2"; + if (code == V3TribalEntityUS._20) + return "20"; + if (code == V3TribalEntityUS._200) + return "200"; + if (code == V3TribalEntityUS._201) + return "201"; + if (code == V3TribalEntityUS._202) + return "202"; + if (code == V3TribalEntityUS._203) + return "203"; + if (code == V3TribalEntityUS._204) + return "204"; + if (code == V3TribalEntityUS._205) + return "205"; + if (code == V3TribalEntityUS._206) + return "206"; + if (code == V3TribalEntityUS._207) + return "207"; + if (code == V3TribalEntityUS._208) + return "208"; + if (code == V3TribalEntityUS._209) + return "209"; + if (code == V3TribalEntityUS._21) + return "21"; + if (code == V3TribalEntityUS._210) + return "210"; + if (code == V3TribalEntityUS._211) + return "211"; + if (code == V3TribalEntityUS._212) + return "212"; + if (code == V3TribalEntityUS._213) + return "213"; + if (code == V3TribalEntityUS._214) + return "214"; + if (code == V3TribalEntityUS._215) + return "215"; + if (code == V3TribalEntityUS._216) + return "216"; + if (code == V3TribalEntityUS._217) + return "217"; + if (code == V3TribalEntityUS._218) + return "218"; + if (code == V3TribalEntityUS._219) + return "219"; + if (code == V3TribalEntityUS._22) + return "22"; + if (code == V3TribalEntityUS._220) + return "220"; + if (code == V3TribalEntityUS._221) + return "221"; + if (code == V3TribalEntityUS._222) + return "222"; + if (code == V3TribalEntityUS._223) + return "223"; + if (code == V3TribalEntityUS._224) + return "224"; + if (code == V3TribalEntityUS._225) + return "225"; + if (code == V3TribalEntityUS._226) + return "226"; + if (code == V3TribalEntityUS._227) + return "227"; + if (code == V3TribalEntityUS._228) + return "228"; + if (code == V3TribalEntityUS._229) + return "229"; + if (code == V3TribalEntityUS._23) + return "23"; + if (code == V3TribalEntityUS._230) + return "230"; + if (code == V3TribalEntityUS._231) + return "231"; + if (code == V3TribalEntityUS._232) + return "232"; + if (code == V3TribalEntityUS._233) + return "233"; + if (code == V3TribalEntityUS._234) + return "234"; + if (code == V3TribalEntityUS._235) + return "235"; + if (code == V3TribalEntityUS._236) + return "236"; + if (code == V3TribalEntityUS._237) + return "237"; + if (code == V3TribalEntityUS._238) + return "238"; + if (code == V3TribalEntityUS._239) + return "239"; + if (code == V3TribalEntityUS._24) + return "24"; + if (code == V3TribalEntityUS._240) + return "240"; + if (code == V3TribalEntityUS._241) + return "241"; + if (code == V3TribalEntityUS._242) + return "242"; + if (code == V3TribalEntityUS._243) + return "243"; + if (code == V3TribalEntityUS._244) + return "244"; + if (code == V3TribalEntityUS._245) + return "245"; + if (code == V3TribalEntityUS._246) + return "246"; + if (code == V3TribalEntityUS._247) + return "247"; + if (code == V3TribalEntityUS._248) + return "248"; + if (code == V3TribalEntityUS._249) + return "249"; + if (code == V3TribalEntityUS._25) + return "25"; + if (code == V3TribalEntityUS._250) + return "250"; + if (code == V3TribalEntityUS._251) + return "251"; + if (code == V3TribalEntityUS._252) + return "252"; + if (code == V3TribalEntityUS._253) + return "253"; + if (code == V3TribalEntityUS._254) + return "254"; + if (code == V3TribalEntityUS._255) + return "255"; + if (code == V3TribalEntityUS._256) + return "256"; + if (code == V3TribalEntityUS._257) + return "257"; + if (code == V3TribalEntityUS._258) + return "258"; + if (code == V3TribalEntityUS._259) + return "259"; + if (code == V3TribalEntityUS._26) + return "26"; + if (code == V3TribalEntityUS._260) + return "260"; + if (code == V3TribalEntityUS._261) + return "261"; + if (code == V3TribalEntityUS._262) + return "262"; + if (code == V3TribalEntityUS._263) + return "263"; + if (code == V3TribalEntityUS._264) + return "264"; + if (code == V3TribalEntityUS._265) + return "265"; + if (code == V3TribalEntityUS._266) + return "266"; + if (code == V3TribalEntityUS._267) + return "267"; + if (code == V3TribalEntityUS._268) + return "268"; + if (code == V3TribalEntityUS._269) + return "269"; + if (code == V3TribalEntityUS._27) + return "27"; + if (code == V3TribalEntityUS._270) + return "270"; + if (code == V3TribalEntityUS._271) + return "271"; + if (code == V3TribalEntityUS._272) + return "272"; + if (code == V3TribalEntityUS._273) + return "273"; + if (code == V3TribalEntityUS._274) + return "274"; + if (code == V3TribalEntityUS._275) + return "275"; + if (code == V3TribalEntityUS._276) + return "276"; + if (code == V3TribalEntityUS._277) + return "277"; + if (code == V3TribalEntityUS._278) + return "278"; + if (code == V3TribalEntityUS._279) + return "279"; + if (code == V3TribalEntityUS._28) + return "28"; + if (code == V3TribalEntityUS._280) + return "280"; + if (code == V3TribalEntityUS._281) + return "281"; + if (code == V3TribalEntityUS._282) + return "282"; + if (code == V3TribalEntityUS._283) + return "283"; + if (code == V3TribalEntityUS._284) + return "284"; + if (code == V3TribalEntityUS._285) + return "285"; + if (code == V3TribalEntityUS._286) + return "286"; + if (code == V3TribalEntityUS._287) + return "287"; + if (code == V3TribalEntityUS._288) + return "288"; + if (code == V3TribalEntityUS._289) + return "289"; + if (code == V3TribalEntityUS._29) + return "29"; + if (code == V3TribalEntityUS._290) + return "290"; + if (code == V3TribalEntityUS._291) + return "291"; + if (code == V3TribalEntityUS._292) + return "292"; + if (code == V3TribalEntityUS._293) + return "293"; + if (code == V3TribalEntityUS._294) + return "294"; + if (code == V3TribalEntityUS._295) + return "295"; + if (code == V3TribalEntityUS._296) + return "296"; + if (code == V3TribalEntityUS._297) + return "297"; + if (code == V3TribalEntityUS._298) + return "298"; + if (code == V3TribalEntityUS._299) + return "299"; + if (code == V3TribalEntityUS._3) + return "3"; + if (code == V3TribalEntityUS._30) + return "30"; + if (code == V3TribalEntityUS._300) + return "300"; + if (code == V3TribalEntityUS._301) + return "301"; + if (code == V3TribalEntityUS._302) + return "302"; + if (code == V3TribalEntityUS._303) + return "303"; + if (code == V3TribalEntityUS._304) + return "304"; + if (code == V3TribalEntityUS._305) + return "305"; + if (code == V3TribalEntityUS._306) + return "306"; + if (code == V3TribalEntityUS._307) + return "307"; + if (code == V3TribalEntityUS._308) + return "308"; + if (code == V3TribalEntityUS._309) + return "309"; + if (code == V3TribalEntityUS._31) + return "31"; + if (code == V3TribalEntityUS._310) + return "310"; + if (code == V3TribalEntityUS._311) + return "311"; + if (code == V3TribalEntityUS._312) + return "312"; + if (code == V3TribalEntityUS._313) + return "313"; + if (code == V3TribalEntityUS._314) + return "314"; + if (code == V3TribalEntityUS._315) + return "315"; + if (code == V3TribalEntityUS._316) + return "316"; + if (code == V3TribalEntityUS._317) + return "317"; + if (code == V3TribalEntityUS._318) + return "318"; + if (code == V3TribalEntityUS._319) + return "319"; + if (code == V3TribalEntityUS._32) + return "32"; + if (code == V3TribalEntityUS._320) + return "320"; + if (code == V3TribalEntityUS._321) + return "321"; + if (code == V3TribalEntityUS._322) + return "322"; + if (code == V3TribalEntityUS._323) + return "323"; + if (code == V3TribalEntityUS._324) + return "324"; + if (code == V3TribalEntityUS._325) + return "325"; + if (code == V3TribalEntityUS._326) + return "326"; + if (code == V3TribalEntityUS._327) + return "327"; + if (code == V3TribalEntityUS._328) + return "328"; + if (code == V3TribalEntityUS._329) + return "329"; + if (code == V3TribalEntityUS._33) + return "33"; + if (code == V3TribalEntityUS._330) + return "330"; + if (code == V3TribalEntityUS._331) + return "331"; + if (code == V3TribalEntityUS._332) + return "332"; + if (code == V3TribalEntityUS._333) + return "333"; + if (code == V3TribalEntityUS._334) + return "334"; + if (code == V3TribalEntityUS._335) + return "335"; + if (code == V3TribalEntityUS._336) + return "336"; + if (code == V3TribalEntityUS._337) + return "337"; + if (code == V3TribalEntityUS._34) + return "34"; + if (code == V3TribalEntityUS._35) + return "35"; + if (code == V3TribalEntityUS._36) + return "36"; + if (code == V3TribalEntityUS._37) + return "37"; + if (code == V3TribalEntityUS._38) + return "38"; + if (code == V3TribalEntityUS._39) + return "39"; + if (code == V3TribalEntityUS._4) + return "4"; + if (code == V3TribalEntityUS._40) + return "40"; + if (code == V3TribalEntityUS._41) + return "41"; + if (code == V3TribalEntityUS._42) + return "42"; + if (code == V3TribalEntityUS._43) + return "43"; + if (code == V3TribalEntityUS._44) + return "44"; + if (code == V3TribalEntityUS._45) + return "45"; + if (code == V3TribalEntityUS._46) + return "46"; + if (code == V3TribalEntityUS._47) + return "47"; + if (code == V3TribalEntityUS._48) + return "48"; + if (code == V3TribalEntityUS._49) + return "49"; + if (code == V3TribalEntityUS._5) + return "5"; + if (code == V3TribalEntityUS._50) + return "50"; + if (code == V3TribalEntityUS._51) + return "51"; + if (code == V3TribalEntityUS._52) + return "52"; + if (code == V3TribalEntityUS._53) + return "53"; + if (code == V3TribalEntityUS._54) + return "54"; + if (code == V3TribalEntityUS._55) + return "55"; + if (code == V3TribalEntityUS._56) + return "56"; + if (code == V3TribalEntityUS._57) + return "57"; + if (code == V3TribalEntityUS._58) + return "58"; + if (code == V3TribalEntityUS._59) + return "59"; + if (code == V3TribalEntityUS._6) + return "6"; + if (code == V3TribalEntityUS._60) + return "60"; + if (code == V3TribalEntityUS._61) + return "61"; + if (code == V3TribalEntityUS._62) + return "62"; + if (code == V3TribalEntityUS._63) + return "63"; + if (code == V3TribalEntityUS._64) + return "64"; + if (code == V3TribalEntityUS._65) + return "65"; + if (code == V3TribalEntityUS._66) + return "66"; + if (code == V3TribalEntityUS._67) + return "67"; + if (code == V3TribalEntityUS._68) + return "68"; + if (code == V3TribalEntityUS._69) + return "69"; + if (code == V3TribalEntityUS._7) + return "7"; + if (code == V3TribalEntityUS._70) + return "70"; + if (code == V3TribalEntityUS._71) + return "71"; + if (code == V3TribalEntityUS._72) + return "72"; + if (code == V3TribalEntityUS._73) + return "73"; + if (code == V3TribalEntityUS._74) + return "74"; + if (code == V3TribalEntityUS._75) + return "75"; + if (code == V3TribalEntityUS._76) + return "76"; + if (code == V3TribalEntityUS._77) + return "77"; + if (code == V3TribalEntityUS._78) + return "78"; + if (code == V3TribalEntityUS._79) + return "79"; + if (code == V3TribalEntityUS._8) + return "8"; + if (code == V3TribalEntityUS._80) + return "80"; + if (code == V3TribalEntityUS._81) + return "81"; + if (code == V3TribalEntityUS._82) + return "82"; + if (code == V3TribalEntityUS._83) + return "83"; + if (code == V3TribalEntityUS._84) + return "84"; + if (code == V3TribalEntityUS._85) + return "85"; + if (code == V3TribalEntityUS._86) + return "86"; + if (code == V3TribalEntityUS._87) + return "87"; + if (code == V3TribalEntityUS._88) + return "88"; + if (code == V3TribalEntityUS._89) + return "89"; + if (code == V3TribalEntityUS._9) + return "9"; + if (code == V3TribalEntityUS._90) + return "90"; + if (code == V3TribalEntityUS._91) + return "91"; + if (code == V3TribalEntityUS._92) + return "92"; + if (code == V3TribalEntityUS._93) + return "93"; + if (code == V3TribalEntityUS._94) + return "94"; + if (code == V3TribalEntityUS._95) + return "95"; + if (code == V3TribalEntityUS._96) + return "96"; + if (code == V3TribalEntityUS._97) + return "97"; + if (code == V3TribalEntityUS._98) + return "98"; + if (code == V3TribalEntityUS._99) + return "99"; + return "?"; + } + + public String toSystem(V3TribalEntityUS code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3VaccineManufacturer.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3VaccineManufacturer.java new file mode 100644 index 00000000000..95feee57fde --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3VaccineManufacturer.java @@ -0,0 +1,429 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum V3VaccineManufacturer { + + /** + * Abbott Laboratories (includes Ross Products Division) + */ + AB, + /** + * Adams Laboratories + */ + AD, + /** + * Alpha Therapeutic Corporation + */ + ALP, + /** + * Armour [Inactive-use CEN] + */ + AR, + /** + * Aviron + */ + AVI, + /** + * Baxter Healthcare Corporation + */ + BA, + /** + * Bayer Corporation (includes Miles, Inc. and Cutter Laboratories) + */ + BAY, + /** + * Berna Products [Inactive-use BPC] + */ + BP, + /** + * Berna Products Corporation (includes Swiss Serum and Vaccine Institute Berne) + */ + BPC, + /** + * Centeon L.L.C. (includes Armour Pharmaceutical Company) + */ + CEN, + /** + * Chiron Corporation + */ + CHI, + /** + * Connaught [Inactive-use PMC] + */ + CON, + /** + * Evans Medical Limited (an affiliate of Medeva Pharmaceuticals, Inc.) + */ + EVN, + /** + * Greer Laboratories, Inc. + */ + GRE, + /** + * Immuno International AG + */ + IAG, + /** + * Merieux [Inactive-use PMC] + */ + IM, + /** + * Immuno-U.S., Inc. + */ + IUS, + /** + * The Research Foundation for Microbial Diseases of Osaka University (BIKEN) + */ + JPN, + /** + * Korea Green Cross Corporation + */ + KGC, + /** + * Lederle [Inactive-use WAL] + */ + LED, + /** + * Massachusetts Public Health Biologic Laboratories + */ + MA, + /** + * MedImmune, Inc. + */ + MED, + /** + * Miles [Inactive-use BAY] + */ + MIL, + /** + * Bioport Corporation (formerly Michigan Biologic Products Institute) + */ + MIP, + /** + * Merck & Co., Inc. + */ + MSD, + /** + * NABI (formerly North American Biologicals, Inc.) + */ + NAB, + /** + * North American Vaccine, Inc. + */ + NAV, + /** + * Novartis Pharmaceutical Corporation (includes Ciba-Geigy Limited and Sandoz Limited) + */ + NOV, + /** + * New York Blood Center + */ + NYB, + /** + * Ortho Diagnostic Systems, Inc. + */ + ORT, + /** + * Organon Teknika Corporation + */ + OTC, + /** + * Parkedale Pharmaceuticals (formerly Parke-Davis) + */ + PD, + /** + * Aventis Pasteur Inc. (formerly Pasteur Merieux Connaught; includes Connaught Laboratories and Pasteur Merieux) + */ + PMC, + /** + * Praxis Biologics [Inactive-use WAL] + */ + PRX, + /** + * Sclavo, Inc. + */ + SCL, + /** + * Swiss Serum and Vaccine Inst. [Inactive-use BPC] + */ + SI, + /** + * SmithKline Beecham + */ + SKB, + /** + * United States Army Medical Research and Materiel Command + */ + USA, + /** + * Wyeth-Ayerst [Inactive-use WAL] + */ + WA, + /** + * Wyeth-Ayerst (includes Wyeth-Lederle Vaccines and Pediatrics, Wyeth Laboratories, Lederle Laboratories, and Praxis Biologics) + */ + WAL, + /** + * added to help the parsers + */ + NULL; + public static V3VaccineManufacturer fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AB".equals(codeString)) + return AB; + if ("AD".equals(codeString)) + return AD; + if ("ALP".equals(codeString)) + return ALP; + if ("AR".equals(codeString)) + return AR; + if ("AVI".equals(codeString)) + return AVI; + if ("BA".equals(codeString)) + return BA; + if ("BAY".equals(codeString)) + return BAY; + if ("BP".equals(codeString)) + return BP; + if ("BPC".equals(codeString)) + return BPC; + if ("CEN".equals(codeString)) + return CEN; + if ("CHI".equals(codeString)) + return CHI; + if ("CON".equals(codeString)) + return CON; + if ("EVN".equals(codeString)) + return EVN; + if ("GRE".equals(codeString)) + return GRE; + if ("IAG".equals(codeString)) + return IAG; + if ("IM".equals(codeString)) + return IM; + if ("IUS".equals(codeString)) + return IUS; + if ("JPN".equals(codeString)) + return JPN; + if ("KGC".equals(codeString)) + return KGC; + if ("LED".equals(codeString)) + return LED; + if ("MA".equals(codeString)) + return MA; + if ("MED".equals(codeString)) + return MED; + if ("MIL".equals(codeString)) + return MIL; + if ("MIP".equals(codeString)) + return MIP; + if ("MSD".equals(codeString)) + return MSD; + if ("NAB".equals(codeString)) + return NAB; + if ("NAV".equals(codeString)) + return NAV; + if ("NOV".equals(codeString)) + return NOV; + if ("NYB".equals(codeString)) + return NYB; + if ("ORT".equals(codeString)) + return ORT; + if ("OTC".equals(codeString)) + return OTC; + if ("PD".equals(codeString)) + return PD; + if ("PMC".equals(codeString)) + return PMC; + if ("PRX".equals(codeString)) + return PRX; + if ("SCL".equals(codeString)) + return SCL; + if ("SI".equals(codeString)) + return SI; + if ("SKB".equals(codeString)) + return SKB; + if ("USA".equals(codeString)) + return USA; + if ("WA".equals(codeString)) + return WA; + if ("WAL".equals(codeString)) + return WAL; + throw new FHIRException("Unknown V3VaccineManufacturer code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case AB: return "AB"; + case AD: return "AD"; + case ALP: return "ALP"; + case AR: return "AR"; + case AVI: return "AVI"; + case BA: return "BA"; + case BAY: return "BAY"; + case BP: return "BP"; + case BPC: return "BPC"; + case CEN: return "CEN"; + case CHI: return "CHI"; + case CON: return "CON"; + case EVN: return "EVN"; + case GRE: return "GRE"; + case IAG: return "IAG"; + case IM: return "IM"; + case IUS: return "IUS"; + case JPN: return "JPN"; + case KGC: return "KGC"; + case LED: return "LED"; + case MA: return "MA"; + case MED: return "MED"; + case MIL: return "MIL"; + case MIP: return "MIP"; + case MSD: return "MSD"; + case NAB: return "NAB"; + case NAV: return "NAV"; + case NOV: return "NOV"; + case NYB: return "NYB"; + case ORT: return "ORT"; + case OTC: return "OTC"; + case PD: return "PD"; + case PMC: return "PMC"; + case PRX: return "PRX"; + case SCL: return "SCL"; + case SI: return "SI"; + case SKB: return "SKB"; + case USA: return "USA"; + case WA: return "WA"; + case WAL: return "WAL"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/v3/VaccineManufacturer"; + } + public String getDefinition() { + switch (this) { + case AB: return "Abbott Laboratories (includes Ross Products Division)"; + case AD: return "Adams Laboratories"; + case ALP: return "Alpha Therapeutic Corporation"; + case AR: return "Armour [Inactive-use CEN]"; + case AVI: return "Aviron"; + case BA: return "Baxter Healthcare Corporation"; + case BAY: return "Bayer Corporation (includes Miles, Inc. and Cutter Laboratories)"; + case BP: return "Berna Products [Inactive-use BPC]"; + case BPC: return "Berna Products Corporation (includes Swiss Serum and Vaccine Institute Berne)"; + case CEN: return "Centeon L.L.C. (includes Armour Pharmaceutical Company)"; + case CHI: return "Chiron Corporation"; + case CON: return "Connaught [Inactive-use PMC]"; + case EVN: return "Evans Medical Limited (an affiliate of Medeva Pharmaceuticals, Inc.)"; + case GRE: return "Greer Laboratories, Inc."; + case IAG: return "Immuno International AG"; + case IM: return "Merieux [Inactive-use PMC]"; + case IUS: return "Immuno-U.S., Inc."; + case JPN: return "The Research Foundation for Microbial Diseases of Osaka University (BIKEN)"; + case KGC: return "Korea Green Cross Corporation"; + case LED: return "Lederle [Inactive-use WAL]"; + case MA: return "Massachusetts Public Health Biologic Laboratories"; + case MED: return "MedImmune, Inc."; + case MIL: return "Miles [Inactive-use BAY]"; + case MIP: return "Bioport Corporation (formerly Michigan Biologic Products Institute)"; + case MSD: return "Merck & Co., Inc."; + case NAB: return "NABI (formerly North American Biologicals, Inc.)"; + case NAV: return "North American Vaccine, Inc."; + case NOV: return "Novartis Pharmaceutical Corporation (includes Ciba-Geigy Limited and Sandoz Limited)"; + case NYB: return "New York Blood Center"; + case ORT: return "Ortho Diagnostic Systems, Inc."; + case OTC: return "Organon Teknika Corporation"; + case PD: return "Parkedale Pharmaceuticals (formerly Parke-Davis)"; + case PMC: return "Aventis Pasteur Inc. (formerly Pasteur Merieux Connaught; includes Connaught Laboratories and Pasteur Merieux)"; + case PRX: return "Praxis Biologics [Inactive-use WAL]"; + case SCL: return "Sclavo, Inc."; + case SI: return "Swiss Serum and Vaccine Inst. [Inactive-use BPC]"; + case SKB: return "SmithKline Beecham"; + case USA: return "United States Army Medical Research and Materiel Command"; + case WA: return "Wyeth-Ayerst [Inactive-use WAL]"; + case WAL: return "Wyeth-Ayerst (includes Wyeth-Lederle Vaccines and Pediatrics, Wyeth Laboratories, Lederle Laboratories, and Praxis Biologics)"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case AB: return "Abbott Laboratories (includes Ross Products Division)"; + case AD: return "Adams Laboratories"; + case ALP: return "Alpha Therapeutic Corporation"; + case AR: return "Armour [Inactive - use CEN]"; + case AVI: return "Aviron"; + case BA: return "Baxter Healthcare Corporation"; + case BAY: return "Bayer Corporation (includes Miles, Inc. and Cutter Laboratories)"; + case BP: return "Berna Products [Inactive - use BPC]"; + case BPC: return "Berna Products Corporation (includes Swiss Serum and Vaccine Institute Berne)"; + case CEN: return "Centeon L.L.C. (includes Armour Pharmaceutical Company)"; + case CHI: return "Chiron Corporation"; + case CON: return "Connaught [Inactive - use PMC]"; + case EVN: return "Evans Medical Limited (an affiliate of Medeva Pharmaceuticals, Inc.)"; + case GRE: return "Greer Laboratories, Inc."; + case IAG: return "Immuno International AG"; + case IM: return "Merieux [Inactive - use PMC]"; + case IUS: return "Immuno-U.S., Inc."; + case JPN: return "The Research Foundation for Microbial Diseases of Osaka University (BIKEN)"; + case KGC: return "Korea Green Cross Corporation"; + case LED: return "Lederle [Inactive - use WAL]"; + case MA: return "Massachusetts Public Health Biologic Laboratories"; + case MED: return "MedImmune, Inc."; + case MIL: return "Miles [Inactive - use BAY]"; + case MIP: return "Bioport Corporation (formerly Michigan Biologic Products Institute)"; + case MSD: return "Merck and Co., Inc."; + case NAB: return "NABI (formerly North American Biologicals, Inc.)"; + case NAV: return "North American Vaccine, Inc."; + case NOV: return "Novartis Pharmaceutical Corporation (includes Ciba-Geigy Limited and Sandoz Limited)"; + case NYB: return "New York Blood Center"; + case ORT: return "Ortho Diagnostic Systems, Inc."; + case OTC: return "Organon Teknika Corporation"; + case PD: return "Parkedale Pharmaceuticals (formerly Parke-Davis)"; + case PMC: return "Aventis Pasteur Inc. (formerly Pasteur Merieux Connaught; includes Connaught Laboratories and Pasteur Merieux)"; + case PRX: return "Praxis Biologics [Inactive - use WAL]"; + case SCL: return "Sclavo, Inc."; + case SI: return "Swiss Serum and Vaccine Inst. [Inactive - use BPC]"; + case SKB: return "SmithKline Beecham"; + case USA: return "United States Army Medical Research and Materiel Command"; + case WA: return "Wyeth-Ayerst [Inactive - use WAL]"; + case WAL: return "Wyeth-Ayerst (includes Wyeth-Lederle Vaccines and Pediatrics, Wyeth Laboratories, Lederle Laboratories, and Praxis Biologics)"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3VaccineManufacturerEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3VaccineManufacturerEnumFactory.java new file mode 100644 index 00000000000..be218fb48c6 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3VaccineManufacturerEnumFactory.java @@ -0,0 +1,214 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class V3VaccineManufacturerEnumFactory implements EnumFactory { + + public V3VaccineManufacturer fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("AB".equals(codeString)) + return V3VaccineManufacturer.AB; + if ("AD".equals(codeString)) + return V3VaccineManufacturer.AD; + if ("ALP".equals(codeString)) + return V3VaccineManufacturer.ALP; + if ("AR".equals(codeString)) + return V3VaccineManufacturer.AR; + if ("AVI".equals(codeString)) + return V3VaccineManufacturer.AVI; + if ("BA".equals(codeString)) + return V3VaccineManufacturer.BA; + if ("BAY".equals(codeString)) + return V3VaccineManufacturer.BAY; + if ("BP".equals(codeString)) + return V3VaccineManufacturer.BP; + if ("BPC".equals(codeString)) + return V3VaccineManufacturer.BPC; + if ("CEN".equals(codeString)) + return V3VaccineManufacturer.CEN; + if ("CHI".equals(codeString)) + return V3VaccineManufacturer.CHI; + if ("CON".equals(codeString)) + return V3VaccineManufacturer.CON; + if ("EVN".equals(codeString)) + return V3VaccineManufacturer.EVN; + if ("GRE".equals(codeString)) + return V3VaccineManufacturer.GRE; + if ("IAG".equals(codeString)) + return V3VaccineManufacturer.IAG; + if ("IM".equals(codeString)) + return V3VaccineManufacturer.IM; + if ("IUS".equals(codeString)) + return V3VaccineManufacturer.IUS; + if ("JPN".equals(codeString)) + return V3VaccineManufacturer.JPN; + if ("KGC".equals(codeString)) + return V3VaccineManufacturer.KGC; + if ("LED".equals(codeString)) + return V3VaccineManufacturer.LED; + if ("MA".equals(codeString)) + return V3VaccineManufacturer.MA; + if ("MED".equals(codeString)) + return V3VaccineManufacturer.MED; + if ("MIL".equals(codeString)) + return V3VaccineManufacturer.MIL; + if ("MIP".equals(codeString)) + return V3VaccineManufacturer.MIP; + if ("MSD".equals(codeString)) + return V3VaccineManufacturer.MSD; + if ("NAB".equals(codeString)) + return V3VaccineManufacturer.NAB; + if ("NAV".equals(codeString)) + return V3VaccineManufacturer.NAV; + if ("NOV".equals(codeString)) + return V3VaccineManufacturer.NOV; + if ("NYB".equals(codeString)) + return V3VaccineManufacturer.NYB; + if ("ORT".equals(codeString)) + return V3VaccineManufacturer.ORT; + if ("OTC".equals(codeString)) + return V3VaccineManufacturer.OTC; + if ("PD".equals(codeString)) + return V3VaccineManufacturer.PD; + if ("PMC".equals(codeString)) + return V3VaccineManufacturer.PMC; + if ("PRX".equals(codeString)) + return V3VaccineManufacturer.PRX; + if ("SCL".equals(codeString)) + return V3VaccineManufacturer.SCL; + if ("SI".equals(codeString)) + return V3VaccineManufacturer.SI; + if ("SKB".equals(codeString)) + return V3VaccineManufacturer.SKB; + if ("USA".equals(codeString)) + return V3VaccineManufacturer.USA; + if ("WA".equals(codeString)) + return V3VaccineManufacturer.WA; + if ("WAL".equals(codeString)) + return V3VaccineManufacturer.WAL; + throw new IllegalArgumentException("Unknown V3VaccineManufacturer code '"+codeString+"'"); + } + + public String toCode(V3VaccineManufacturer code) { + if (code == V3VaccineManufacturer.AB) + return "AB"; + if (code == V3VaccineManufacturer.AD) + return "AD"; + if (code == V3VaccineManufacturer.ALP) + return "ALP"; + if (code == V3VaccineManufacturer.AR) + return "AR"; + if (code == V3VaccineManufacturer.AVI) + return "AVI"; + if (code == V3VaccineManufacturer.BA) + return "BA"; + if (code == V3VaccineManufacturer.BAY) + return "BAY"; + if (code == V3VaccineManufacturer.BP) + return "BP"; + if (code == V3VaccineManufacturer.BPC) + return "BPC"; + if (code == V3VaccineManufacturer.CEN) + return "CEN"; + if (code == V3VaccineManufacturer.CHI) + return "CHI"; + if (code == V3VaccineManufacturer.CON) + return "CON"; + if (code == V3VaccineManufacturer.EVN) + return "EVN"; + if (code == V3VaccineManufacturer.GRE) + return "GRE"; + if (code == V3VaccineManufacturer.IAG) + return "IAG"; + if (code == V3VaccineManufacturer.IM) + return "IM"; + if (code == V3VaccineManufacturer.IUS) + return "IUS"; + if (code == V3VaccineManufacturer.JPN) + return "JPN"; + if (code == V3VaccineManufacturer.KGC) + return "KGC"; + if (code == V3VaccineManufacturer.LED) + return "LED"; + if (code == V3VaccineManufacturer.MA) + return "MA"; + if (code == V3VaccineManufacturer.MED) + return "MED"; + if (code == V3VaccineManufacturer.MIL) + return "MIL"; + if (code == V3VaccineManufacturer.MIP) + return "MIP"; + if (code == V3VaccineManufacturer.MSD) + return "MSD"; + if (code == V3VaccineManufacturer.NAB) + return "NAB"; + if (code == V3VaccineManufacturer.NAV) + return "NAV"; + if (code == V3VaccineManufacturer.NOV) + return "NOV"; + if (code == V3VaccineManufacturer.NYB) + return "NYB"; + if (code == V3VaccineManufacturer.ORT) + return "ORT"; + if (code == V3VaccineManufacturer.OTC) + return "OTC"; + if (code == V3VaccineManufacturer.PD) + return "PD"; + if (code == V3VaccineManufacturer.PMC) + return "PMC"; + if (code == V3VaccineManufacturer.PRX) + return "PRX"; + if (code == V3VaccineManufacturer.SCL) + return "SCL"; + if (code == V3VaccineManufacturer.SI) + return "SI"; + if (code == V3VaccineManufacturer.SKB) + return "SKB"; + if (code == V3VaccineManufacturer.USA) + return "USA"; + if (code == V3VaccineManufacturer.WA) + return "WA"; + if (code == V3VaccineManufacturer.WAL) + return "WAL"; + return "?"; + } + + public String toSystem(V3VaccineManufacturer code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatus.java new file mode 100644 index 00000000000..764800a84f7 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatus.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VaccinationProtocolDoseStatus { + + /** + * The dose counts toward fulfilling a path to immunity for a patient, providing protection against the target disease. + */ + COUNT, + /** + * The dose does not count toward fulfilling a path to immunity for a patient. + */ + NOCOUNT, + /** + * added to help the parsers + */ + NULL; + public static VaccinationProtocolDoseStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("count".equals(codeString)) + return COUNT; + if ("nocount".equals(codeString)) + return NOCOUNT; + throw new FHIRException("Unknown VaccinationProtocolDoseStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COUNT: return "count"; + case NOCOUNT: return "nocount"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/vaccination-protocol-dose-status"; + } + public String getDefinition() { + switch (this) { + case COUNT: return "The dose counts toward fulfilling a path to immunity for a patient, providing protection against the target disease."; + case NOCOUNT: return "The dose does not count toward fulfilling a path to immunity for a patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COUNT: return "Counts"; + case NOCOUNT: return "Does not Count"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusEnumFactory.java new file mode 100644 index 00000000000..a8e1ccc7219 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VaccinationProtocolDoseStatusEnumFactory implements EnumFactory { + + public VaccinationProtocolDoseStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("count".equals(codeString)) + return VaccinationProtocolDoseStatus.COUNT; + if ("nocount".equals(codeString)) + return VaccinationProtocolDoseStatus.NOCOUNT; + throw new IllegalArgumentException("Unknown VaccinationProtocolDoseStatus code '"+codeString+"'"); + } + + public String toCode(VaccinationProtocolDoseStatus code) { + if (code == VaccinationProtocolDoseStatus.COUNT) + return "count"; + if (code == VaccinationProtocolDoseStatus.NOCOUNT) + return "nocount"; + return "?"; + } + + public String toSystem(VaccinationProtocolDoseStatus code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusReason.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusReason.java new file mode 100644 index 00000000000..9bfaffccd1d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusReason.java @@ -0,0 +1,114 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VaccinationProtocolDoseStatusReason { + + /** + * The product was stored in a manner inconsistent with manufacturer guidelines potentially reducing the effectiveness of the product. + */ + ADVSTORAGE, + /** + * The product was stored at a temperature inconsistent with manufacturer guidelines potentially reducing the effectiveness of the product. + */ + COLDCHBRK, + /** + * The product was administered after the expiration date associated with lot of vaccine. + */ + EXPLOT, + /** + * The product was administered at a time inconsistent with the documented schedule. + */ + OUTSIDESCHED, + /** + * The product administered has been recalled by the manufacturer. + */ + PRODRECALL, + /** + * added to help the parsers + */ + NULL; + public static VaccinationProtocolDoseStatusReason fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("advstorage".equals(codeString)) + return ADVSTORAGE; + if ("coldchbrk".equals(codeString)) + return COLDCHBRK; + if ("explot".equals(codeString)) + return EXPLOT; + if ("outsidesched".equals(codeString)) + return OUTSIDESCHED; + if ("prodrecall".equals(codeString)) + return PRODRECALL; + throw new FHIRException("Unknown VaccinationProtocolDoseStatusReason code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ADVSTORAGE: return "advstorage"; + case COLDCHBRK: return "coldchbrk"; + case EXPLOT: return "explot"; + case OUTSIDESCHED: return "outsidesched"; + case PRODRECALL: return "prodrecall"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/vaccination-protocol-dose-status-reason"; + } + public String getDefinition() { + switch (this) { + case ADVSTORAGE: return "The product was stored in a manner inconsistent with manufacturer guidelines potentially reducing the effectiveness of the product."; + case COLDCHBRK: return "The product was stored at a temperature inconsistent with manufacturer guidelines potentially reducing the effectiveness of the product."; + case EXPLOT: return "The product was administered after the expiration date associated with lot of vaccine."; + case OUTSIDESCHED: return "The product was administered at a time inconsistent with the documented schedule."; + case PRODRECALL: return "The product administered has been recalled by the manufacturer."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ADVSTORAGE: return "Adverse storage condition"; + case COLDCHBRK: return "Cold chain break"; + case EXPLOT: return "Expired lot"; + case OUTSIDESCHED: return "Administered outside recommended schedule"; + case PRODRECALL: return "Product recall"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusReasonEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusReasonEnumFactory.java new file mode 100644 index 00000000000..f5e3144af00 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VaccinationProtocolDoseStatusReasonEnumFactory.java @@ -0,0 +1,74 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VaccinationProtocolDoseStatusReasonEnumFactory implements EnumFactory { + + public VaccinationProtocolDoseStatusReason fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("advstorage".equals(codeString)) + return VaccinationProtocolDoseStatusReason.ADVSTORAGE; + if ("coldchbrk".equals(codeString)) + return VaccinationProtocolDoseStatusReason.COLDCHBRK; + if ("explot".equals(codeString)) + return VaccinationProtocolDoseStatusReason.EXPLOT; + if ("outsidesched".equals(codeString)) + return VaccinationProtocolDoseStatusReason.OUTSIDESCHED; + if ("prodrecall".equals(codeString)) + return VaccinationProtocolDoseStatusReason.PRODRECALL; + throw new IllegalArgumentException("Unknown VaccinationProtocolDoseStatusReason code '"+codeString+"'"); + } + + public String toCode(VaccinationProtocolDoseStatusReason code) { + if (code == VaccinationProtocolDoseStatusReason.ADVSTORAGE) + return "advstorage"; + if (code == VaccinationProtocolDoseStatusReason.COLDCHBRK) + return "coldchbrk"; + if (code == VaccinationProtocolDoseStatusReason.EXPLOT) + return "explot"; + if (code == VaccinationProtocolDoseStatusReason.OUTSIDESCHED) + return "outsidesched"; + if (code == VaccinationProtocolDoseStatusReason.PRODRECALL) + return "prodrecall"; + return "?"; + } + + public String toSystem(VaccinationProtocolDoseStatusReason code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VariantState.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VariantState.java new file mode 100644 index 00000000000..6705fa2c65c --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VariantState.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VariantState { + + /** + * the variant is detected + */ + POSITIVE, + /** + * no variant is detected + */ + NEGATIVE, + /** + * result of the variant is missing + */ + ABSENT, + /** + * added to help the parsers + */ + NULL; + public static VariantState fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("positive".equals(codeString)) + return POSITIVE; + if ("negative".equals(codeString)) + return NEGATIVE; + if ("absent".equals(codeString)) + return ABSENT; + throw new FHIRException("Unknown VariantState code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case POSITIVE: return "positive"; + case NEGATIVE: return "negative"; + case ABSENT: return "absent"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/variant-state"; + } + public String getDefinition() { + switch (this) { + case POSITIVE: return "the variant is detected"; + case NEGATIVE: return "no variant is detected"; + case ABSENT: return "result of the variant is missing"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case POSITIVE: return "positive"; + case NEGATIVE: return "negative"; + case ABSENT: return "absent"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VariantStateEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VariantStateEnumFactory.java new file mode 100644 index 00000000000..30b0a12fb2a --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VariantStateEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VariantStateEnumFactory implements EnumFactory { + + public VariantState fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("positive".equals(codeString)) + return VariantState.POSITIVE; + if ("negative".equals(codeString)) + return VariantState.NEGATIVE; + if ("absent".equals(codeString)) + return VariantState.ABSENT; + throw new IllegalArgumentException("Unknown VariantState code '"+codeString+"'"); + } + + public String toCode(VariantState code) { + if (code == VariantState.POSITIVE) + return "positive"; + if (code == VariantState.NEGATIVE) + return "negative"; + if (code == VariantState.ABSENT) + return "absent"; + return "?"; + } + + public String toSystem(VariantState code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VersioningPolicy.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VersioningPolicy.java new file mode 100644 index 00000000000..f2ea022d36b --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VersioningPolicy.java @@ -0,0 +1,96 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VersioningPolicy { + + /** + * VersionId meta-property is not supported (server) or used (client). + */ + NOVERSION, + /** + * VersionId meta-property is supported (server) or used (client). + */ + VERSIONED, + /** + * VersionId must be correct for updates (server) or will be specified (If-match header) for updates (client). + */ + VERSIONEDUPDATE, + /** + * added to help the parsers + */ + NULL; + public static VersioningPolicy fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("no-version".equals(codeString)) + return NOVERSION; + if ("versioned".equals(codeString)) + return VERSIONED; + if ("versioned-update".equals(codeString)) + return VERSIONEDUPDATE; + throw new FHIRException("Unknown VersioningPolicy code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NOVERSION: return "no-version"; + case VERSIONED: return "versioned"; + case VERSIONEDUPDATE: return "versioned-update"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/versioning-policy"; + } + public String getDefinition() { + switch (this) { + case NOVERSION: return "VersionId meta-property is not supported (server) or used (client)."; + case VERSIONED: return "VersionId meta-property is supported (server) or used (client)."; + case VERSIONEDUPDATE: return "VersionId must be correct for updates (server) or will be specified (If-match header) for updates (client)."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NOVERSION: return "No VersionId Support"; + case VERSIONED: return "Versioned"; + case VERSIONEDUPDATE: return "VersionId tracked fully"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VersioningPolicyEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VersioningPolicyEnumFactory.java new file mode 100644 index 00000000000..7bfaa76a872 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VersioningPolicyEnumFactory.java @@ -0,0 +1,66 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VersioningPolicyEnumFactory implements EnumFactory { + + public VersioningPolicy fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("no-version".equals(codeString)) + return VersioningPolicy.NOVERSION; + if ("versioned".equals(codeString)) + return VersioningPolicy.VERSIONED; + if ("versioned-update".equals(codeString)) + return VersioningPolicy.VERSIONEDUPDATE; + throw new IllegalArgumentException("Unknown VersioningPolicy code '"+codeString+"'"); + } + + public String toCode(VersioningPolicy code) { + if (code == VersioningPolicy.NOVERSION) + return "no-version"; + if (code == VersioningPolicy.VERSIONED) + return "versioned"; + if (code == VersioningPolicy.VERSIONEDUPDATE) + return "versioned-update"; + return "?"; + } + + public String toSystem(VersioningPolicy code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionBaseCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionBaseCodes.java new file mode 100644 index 00000000000..58bd668807f --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionBaseCodes.java @@ -0,0 +1,105 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VisionBaseCodes { + + /** + * top + */ + UP, + /** + * bottom + */ + DOWN, + /** + * inner edge + */ + IN, + /** + * outer edge + */ + OUT, + /** + * added to help the parsers + */ + NULL; + public static VisionBaseCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("up".equals(codeString)) + return UP; + if ("down".equals(codeString)) + return DOWN; + if ("in".equals(codeString)) + return IN; + if ("out".equals(codeString)) + return OUT; + throw new FHIRException("Unknown VisionBaseCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case UP: return "up"; + case DOWN: return "down"; + case IN: return "in"; + case OUT: return "out"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/vision-base-codes"; + } + public String getDefinition() { + switch (this) { + case UP: return "top"; + case DOWN: return "bottom"; + case IN: return "inner edge"; + case OUT: return "outer edge"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case UP: return "Up"; + case DOWN: return "Down"; + case IN: return "In"; + case OUT: return "Out"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionBaseCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionBaseCodesEnumFactory.java new file mode 100644 index 00000000000..76ee290fc29 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionBaseCodesEnumFactory.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VisionBaseCodesEnumFactory implements EnumFactory { + + public VisionBaseCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("up".equals(codeString)) + return VisionBaseCodes.UP; + if ("down".equals(codeString)) + return VisionBaseCodes.DOWN; + if ("in".equals(codeString)) + return VisionBaseCodes.IN; + if ("out".equals(codeString)) + return VisionBaseCodes.OUT; + throw new IllegalArgumentException("Unknown VisionBaseCodes code '"+codeString+"'"); + } + + public String toCode(VisionBaseCodes code) { + if (code == VisionBaseCodes.UP) + return "up"; + if (code == VisionBaseCodes.DOWN) + return "down"; + if (code == VisionBaseCodes.IN) + return "in"; + if (code == VisionBaseCodes.OUT) + return "out"; + return "?"; + } + + public String toSystem(VisionBaseCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionEyeCodes.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionEyeCodes.java new file mode 100644 index 00000000000..280c51c1daf --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionEyeCodes.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VisionEyeCodes { + + /** + * Right Eye + */ + RIGHT, + /** + * Left Eye + */ + LEFT, + /** + * added to help the parsers + */ + NULL; + public static VisionEyeCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("right".equals(codeString)) + return RIGHT; + if ("left".equals(codeString)) + return LEFT; + throw new FHIRException("Unknown VisionEyeCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case RIGHT: return "right"; + case LEFT: return "left"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/vision-eye-codes"; + } + public String getDefinition() { + switch (this) { + case RIGHT: return "Right Eye"; + case LEFT: return "Left Eye"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case RIGHT: return "Right Eye"; + case LEFT: return "Left Eye"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionEyeCodesEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionEyeCodesEnumFactory.java new file mode 100644 index 00000000000..0ede6ad0fc5 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionEyeCodesEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VisionEyeCodesEnumFactory implements EnumFactory { + + public VisionEyeCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("right".equals(codeString)) + return VisionEyeCodes.RIGHT; + if ("left".equals(codeString)) + return VisionEyeCodes.LEFT; + throw new IllegalArgumentException("Unknown VisionEyeCodes code '"+codeString+"'"); + } + + public String toCode(VisionEyeCodes code) { + if (code == VisionEyeCodes.RIGHT) + return "right"; + if (code == VisionEyeCodes.LEFT) + return "left"; + return "?"; + } + + public String toSystem(VisionEyeCodes code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionProduct.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionProduct.java new file mode 100644 index 00000000000..f4f1216bb4e --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionProduct.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum VisionProduct { + + /** + * A lens to be fitted to a frame to comprise a pair of glasses. + */ + LENS, + /** + * A lens to be fitted for wearing directly on an eye. + */ + CONTACT, + /** + * added to help the parsers + */ + NULL; + public static VisionProduct fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lens".equals(codeString)) + return LENS; + if ("contact".equals(codeString)) + return CONTACT; + throw new FHIRException("Unknown VisionProduct code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LENS: return "lens"; + case CONTACT: return "contact"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/ex-visionprescriptionproduct"; + } + public String getDefinition() { + switch (this) { + case LENS: return "A lens to be fitted to a frame to comprise a pair of glasses."; + case CONTACT: return "A lens to be fitted for wearing directly on an eye."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LENS: return "Lens"; + case CONTACT: return "Contact Lens"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionProductEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionProductEnumFactory.java new file mode 100644 index 00000000000..6d5a2cccd05 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/VisionProductEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class VisionProductEnumFactory implements EnumFactory { + + public VisionProduct fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("lens".equals(codeString)) + return VisionProduct.LENS; + if ("contact".equals(codeString)) + return VisionProduct.CONTACT; + throw new IllegalArgumentException("Unknown VisionProduct code '"+codeString+"'"); + } + + public String toCode(VisionProduct code) { + if (code == VisionProduct.LENS) + return "lens"; + if (code == VisionProduct.CONTACT) + return "contact"; + return "?"; + } + + public String toSystem(VisionProduct code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/W3cProvenanceActivityType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/W3cProvenanceActivityType.java new file mode 100644 index 00000000000..11ffb9c1137 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/W3cProvenanceActivityType.java @@ -0,0 +1,177 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum W3cProvenanceActivityType { + + /** + * The completion of production of a new entity by an activity. This entity did not exist before generation and becomes available for usage after this generation. Given that a generation is the completion of production of an entity, it is instantaneous. + */ + GENERATION, + /** + * the beginning of utilizing an entity by an activity. Before usage, the activity had not begun to utilize this entity and could not have been affected by the entity. (Note: This definition is formulated for a given usage; it is permitted for an activity to have used a same entity multiple times.) Given that a usage is the beginning of utilizing an entity, it is instantaneous. + */ + USAGE, + /** + * The exchange of some unspecified entity by two activities, one activity using some entity generated by the other. A communication implies that activity a2 is dependent on another activity, a1, by way of some unspecified entity that is generated by a1 and used by a2. + */ + COMMUNICATION, + /** + * When an activity is deemed to have been started by an entity, known as trigger. The activity did not exist before its start. Any usage, generation, or invalidation involving an activity follows the activity's start. A start may refer to a trigger entity that set off the activity, or to an activity, known as starter, that generated the trigger. Given that a start is when an activity is deemed to have started, it is instantaneous. + */ + START, + /** + * When an activity is deemed to have been ended by an entity, known as trigger. The activity no longer exists after its end. Any usage, generation, or invalidation involving an activity precedes the activity's end. An end may refer to a trigger entity that terminated the activity, or to an activity, known as ender that generated the trigger. + */ + END, + /** + * The start of the destruction, cessation, or expiry of an existing entity by an activity. The entity is no longer available for use (or further invalidation) after invalidation. Any generation or usage of an entity precedes its invalidation. Given that an invalidation is the start of destruction, cessation, or expiry, it is instantaneous. + */ + INVALIDATION, + /** + * A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a pre-existing entity. For an entity to be transformed from, created from, or resulting from an update to another, there must be some underpinning activity or activities performing the necessary action(s) resulting in such a derivation. A derivation can be described at various levels of precision. In its simplest form, derivation relates two entities. Optionally, attributes can be added to represent further information about the derivation. If the derivation is the result of a single known activity, then this activity can also be optionally expressed. To provide a completely accurate description of the derivation, the generation and usage of the generated and used entities, respectively, can be provided, so as to make the derivation path, through usage, activity, and generation, explicit. Optional information such as activity, generation, and usage can be linked to derivations to aid analysis of provenance and to facilitate provenance-based reproducibility. + */ + DERIVATION, + /** + * A derivation for which the resulting entity is a revised version of some original. The implication here is that the resulting entity contains substantial content from the original. A revision relation is a kind of derivation relation from a revised entity to a preceding entity. + */ + REVISION, + /** + * The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author. A quotation relation is a kind of derivation relation, for which an entity was derived from a preceding entity by copying, or 'quoting', some or all of it. + */ + QUOTATION, + /** + * Refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. Because of the directness of primary sources, they 'speak for themselves' in ways that cannot be captured through the filter of secondary sources. As such, it is important for secondary sources to reference those primary sources from which they were derived, so that their reliability can be investigated. It is also important to note that a given entity might be a primary source for one entity but not another. It is the reason why Primary Source is defined as a relation as opposed to a subtype of Entity. + */ + PRIMARYSOURCE, + /** + * Ascribing of an entity (object/document) to an agent. + */ + ATTRIBUTION, + /** + * An aggregating activity that results in composition of an entity, which provides a structure to some constituents that must themselves be entities. These constituents are said to be member of the collections. + */ + COLLECTION, + /** + * added to help the parsers + */ + NULL; + public static W3cProvenanceActivityType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Generation".equals(codeString)) + return GENERATION; + if ("Usage".equals(codeString)) + return USAGE; + if ("Communication".equals(codeString)) + return COMMUNICATION; + if ("Start".equals(codeString)) + return START; + if ("End".equals(codeString)) + return END; + if ("Invalidation".equals(codeString)) + return INVALIDATION; + if ("Derivation".equals(codeString)) + return DERIVATION; + if ("Revision".equals(codeString)) + return REVISION; + if ("Quotation".equals(codeString)) + return QUOTATION; + if ("Primary-Source".equals(codeString)) + return PRIMARYSOURCE; + if ("Attribution".equals(codeString)) + return ATTRIBUTION; + if ("Collection".equals(codeString)) + return COLLECTION; + throw new FHIRException("Unknown W3cProvenanceActivityType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case GENERATION: return "Generation"; + case USAGE: return "Usage"; + case COMMUNICATION: return "Communication"; + case START: return "Start"; + case END: return "End"; + case INVALIDATION: return "Invalidation"; + case DERIVATION: return "Derivation"; + case REVISION: return "Revision"; + case QUOTATION: return "Quotation"; + case PRIMARYSOURCE: return "Primary-Source"; + case ATTRIBUTION: return "Attribution"; + case COLLECTION: return "Collection"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/w3c-provenance-activity-type"; + } + public String getDefinition() { + switch (this) { + case GENERATION: return "The completion of production of a new entity by an activity. This entity did not exist before generation and becomes available for usage after this generation. Given that a generation is the completion of production of an entity, it is instantaneous."; + case USAGE: return "the beginning of utilizing an entity by an activity. Before usage, the activity had not begun to utilize this entity and could not have been affected by the entity. (Note: This definition is formulated for a given usage; it is permitted for an activity to have used a same entity multiple times.) Given that a usage is the beginning of utilizing an entity, it is instantaneous."; + case COMMUNICATION: return "The exchange of some unspecified entity by two activities, one activity using some entity generated by the other. A communication implies that activity a2 is dependent on another activity, a1, by way of some unspecified entity that is generated by a1 and used by a2."; + case START: return "When an activity is deemed to have been started by an entity, known as trigger. The activity did not exist before its start. Any usage, generation, or invalidation involving an activity follows the activity's start. A start may refer to a trigger entity that set off the activity, or to an activity, known as starter, that generated the trigger. Given that a start is when an activity is deemed to have started, it is instantaneous."; + case END: return "When an activity is deemed to have been ended by an entity, known as trigger. The activity no longer exists after its end. Any usage, generation, or invalidation involving an activity precedes the activity's end. An end may refer to a trigger entity that terminated the activity, or to an activity, known as ender that generated the trigger."; + case INVALIDATION: return "The start of the destruction, cessation, or expiry of an existing entity by an activity. The entity is no longer available for use (or further invalidation) after invalidation. Any generation or usage of an entity precedes its invalidation. Given that an invalidation is the start of destruction, cessation, or expiry, it is instantaneous."; + case DERIVATION: return "A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a pre-existing entity. For an entity to be transformed from, created from, or resulting from an update to another, there must be some underpinning activity or activities performing the necessary action(s) resulting in such a derivation. A derivation can be described at various levels of precision. In its simplest form, derivation relates two entities. Optionally, attributes can be added to represent further information about the derivation. If the derivation is the result of a single known activity, then this activity can also be optionally expressed. To provide a completely accurate description of the derivation, the generation and usage of the generated and used entities, respectively, can be provided, so as to make the derivation path, through usage, activity, and generation, explicit. Optional information such as activity, generation, and usage can be linked to derivations to aid analysis of provenance and to facilitate provenance-based reproducibility."; + case REVISION: return "A derivation for which the resulting entity is a revised version of some original. The implication here is that the resulting entity contains substantial content from the original. A revision relation is a kind of derivation relation from a revised entity to a preceding entity."; + case QUOTATION: return "The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author. A quotation relation is a kind of derivation relation, for which an entity was derived from a preceding entity by copying, or 'quoting', some or all of it."; + case PRIMARYSOURCE: return "Refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. Because of the directness of primary sources, they 'speak for themselves' in ways that cannot be captured through the filter of secondary sources. As such, it is important for secondary sources to reference those primary sources from which they were derived, so that their reliability can be investigated. It is also important to note that a given entity might be a primary source for one entity but not another. It is the reason why Primary Source is defined as a relation as opposed to a subtype of Entity."; + case ATTRIBUTION: return "Ascribing of an entity (object/document) to an agent."; + case COLLECTION: return " An aggregating activity that results in composition of an entity, which provides a structure to some constituents that must themselves be entities. These constituents are said to be member of the collections."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case GENERATION: return "wasGeneratedBy"; + case USAGE: return "used"; + case COMMUNICATION: return "wasInformedBy"; + case START: return "wasStartedBy"; + case END: return "wasEndedBy"; + case INVALIDATION: return "wasInvalidatedBy"; + case DERIVATION: return "wasDerivedFrom"; + case REVISION: return "wasRevisionOf"; + case QUOTATION: return "wasQuotedFrom"; + case PRIMARYSOURCE: return "wasPrimarySourceOf"; + case ATTRIBUTION: return "wasAttributedTo"; + case COLLECTION: return "isCollectionOf"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/W3cProvenanceActivityTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/W3cProvenanceActivityTypeEnumFactory.java new file mode 100644 index 00000000000..9d898225d95 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/W3cProvenanceActivityTypeEnumFactory.java @@ -0,0 +1,102 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Sat, Sep 23, 2017 17:56-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class W3cProvenanceActivityTypeEnumFactory implements EnumFactory { + + public W3cProvenanceActivityType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Generation".equals(codeString)) + return W3cProvenanceActivityType.GENERATION; + if ("Usage".equals(codeString)) + return W3cProvenanceActivityType.USAGE; + if ("Communication".equals(codeString)) + return W3cProvenanceActivityType.COMMUNICATION; + if ("Start".equals(codeString)) + return W3cProvenanceActivityType.START; + if ("End".equals(codeString)) + return W3cProvenanceActivityType.END; + if ("Invalidation".equals(codeString)) + return W3cProvenanceActivityType.INVALIDATION; + if ("Derivation".equals(codeString)) + return W3cProvenanceActivityType.DERIVATION; + if ("Revision".equals(codeString)) + return W3cProvenanceActivityType.REVISION; + if ("Quotation".equals(codeString)) + return W3cProvenanceActivityType.QUOTATION; + if ("Primary-Source".equals(codeString)) + return W3cProvenanceActivityType.PRIMARYSOURCE; + if ("Attribution".equals(codeString)) + return W3cProvenanceActivityType.ATTRIBUTION; + if ("Collection".equals(codeString)) + return W3cProvenanceActivityType.COLLECTION; + throw new IllegalArgumentException("Unknown W3cProvenanceActivityType code '"+codeString+"'"); + } + + public String toCode(W3cProvenanceActivityType code) { + if (code == W3cProvenanceActivityType.GENERATION) + return "Generation"; + if (code == W3cProvenanceActivityType.USAGE) + return "Usage"; + if (code == W3cProvenanceActivityType.COMMUNICATION) + return "Communication"; + if (code == W3cProvenanceActivityType.START) + return "Start"; + if (code == W3cProvenanceActivityType.END) + return "End"; + if (code == W3cProvenanceActivityType.INVALIDATION) + return "Invalidation"; + if (code == W3cProvenanceActivityType.DERIVATION) + return "Derivation"; + if (code == W3cProvenanceActivityType.REVISION) + return "Revision"; + if (code == W3cProvenanceActivityType.QUOTATION) + return "Quotation"; + if (code == W3cProvenanceActivityType.PRIMARYSOURCE) + return "Primary-Source"; + if (code == W3cProvenanceActivityType.ATTRIBUTION) + return "Attribution"; + if (code == W3cProvenanceActivityType.COLLECTION) + return "Collection"; + return "?"; + } + + public String toSystem(W3cProvenanceActivityType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/WorkflowexampleActorType.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/WorkflowexampleActorType.java new file mode 100644 index 00000000000..7be7848b625 --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/WorkflowexampleActorType.java @@ -0,0 +1,87 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Tue, Aug 29, 2017 20:18-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.exceptions.FHIRException; + +public enum WorkflowexampleActorType { + + /** + * A person + */ + PERSON, + /** + * A system + */ + ENTITY, + /** + * added to help the parsers + */ + NULL; + public static WorkflowexampleActorType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return PERSON; + if ("entity".equals(codeString)) + return ENTITY; + throw new FHIRException("Unknown WorkflowexampleActorType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PERSON: return "person"; + case ENTITY: return "entity"; + default: return "?"; + } + } + public String getSystem() { + return "http://hl7.org/fhir/workflowexample-actor-type"; + } + public String getDefinition() { + switch (this) { + case PERSON: return "A person"; + case ENTITY: return "A system"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PERSON: return "Person"; + case ENTITY: return "System"; + default: return "?"; + } + } + + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/WorkflowexampleActorTypeEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/WorkflowexampleActorTypeEnumFactory.java new file mode 100644 index 00000000000..e7af03ccf1d --- /dev/null +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/WorkflowexampleActorTypeEnumFactory.java @@ -0,0 +1,62 @@ +package org.hl7.fhir.r4.model.codesystems; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Tue, Aug 29, 2017 20:18-0400 for FHIR v3.1.0 + + +import org.hl7.fhir.r4.model.EnumFactory; + +public class WorkflowexampleActorTypeEnumFactory implements EnumFactory { + + public WorkflowexampleActorType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + return null; + if ("person".equals(codeString)) + return WorkflowexampleActorType.PERSON; + if ("entity".equals(codeString)) + return WorkflowexampleActorType.ENTITY; + throw new IllegalArgumentException("Unknown WorkflowexampleActorType code '"+codeString+"'"); + } + + public String toCode(WorkflowexampleActorType code) { + if (code == WorkflowexampleActorType.PERSON) + return "person"; + if (code == WorkflowexampleActorType.ENTITY) + return "entity"; + return "?"; + } + + public String toSystem(WorkflowexampleActorType code) { + return code.getSystem(); + } + +} + diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/CodeSystemUtilities.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/CodeSystemUtilities.java index b72c6cca1bf..4cec27a7481 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/CodeSystemUtilities.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/CodeSystemUtilities.java @@ -12,6 +12,7 @@ import org.hl7.fhir.r4.utils.ToolingExtensions; import org.hl7.fhir.r4.model.DateTimeType; import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Meta; +import org.hl7.fhir.r4.model.Type; import org.hl7.fhir.r4.model.UriType; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.utilities.Utilities; @@ -175,4 +176,11 @@ public class CodeSystemUtilities { return -1; } + public static Type readProperty(ConceptDefinitionComponent concept, String code) { + for (ConceptPropertyComponent p : concept.getProperty()) + if (p.getCode().equals(code)) + return p.getValue(); + return null; + } + } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/ValueSetExpanderSimple.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/ValueSetExpanderSimple.java index df814290188..74dc378b65c 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/ValueSetExpanderSimple.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/terminologies/ValueSetExpanderSimple.java @@ -166,7 +166,7 @@ public class ValueSetExpanderSimple implements ValueSetExpander { private void addCodeAndDescendents(CodeSystem cs, String system, ConceptDefinitionComponent def, ValueSetExpansionContainsComponent parent, ExpansionProfile profile, List filters) throws FHIRException { -// def.checkNoModifiers("Code in Code System", "expanding"); + //def.checkNoModifiers("Code in Code System", "expanding"); if (!CodeSystemUtilities.isDeprecated(cs, def)) { ValueSetExpansionContainsComponent np = null; boolean abs = CodeSystemUtilities.isNotSelectable(cs, def); @@ -398,9 +398,8 @@ public class ValueSetExpanderSimple implements ValueSetExpander { throw new TerminologyServiceException("unable to find code system " + inc.getSystem().toString()); } cs.checkNoModifiers("Code System", "expanding"); -// if (cs.getContent() != CodeSystemContentMode.COMPLETE) -// throw new TerminologyServiceException("Code system " + inc.getSystem().toString() + " is incomplete"); - + if (cs.getContent() != CodeSystemContentMode.COMPLETE) + throw new TerminologyServiceException("Code system " + inc.getSystem().toString() + " is incomplete"); if (cs.hasVersion()) if (!existsInParams(params, "version", new UriType(cs.getUrl() + "|" + cs.getVersion()))) params.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(cs.getUrl() + "|" + cs.getVersion()))); diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java index edceebf132f..df0e5b5c9fb 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java @@ -1,2941 +1,2900 @@ -package org.hl7.fhir.r4.utils; - -import java.math.BigDecimal; -import java.util.*; - -import org.hl7.fhir.exceptions.*; -import org.hl7.fhir.r4.conformance.ProfileUtilities; -import org.hl7.fhir.r4.context.IWorkerContext; -import org.hl7.fhir.r4.model.*; -import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent; -import org.hl7.fhir.r4.model.ExpressionNode.*; -import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; -import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; -import org.hl7.fhir.r4.model.TypeDetails.ProfiledType; -import org.hl7.fhir.r4.utils.FHIRLexer.FHIRLexerException; -import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext.FunctionDetails; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.utilities.ucum.Decimal; - -import ca.uhn.fhir.model.api.TemporalPrecisionEnum; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.util.ElementUtil; - -/** - * - * @author Grahame Grieve - * - */ -public class FHIRPathEngine { - private IWorkerContext worker; - private IEvaluationContext hostServices; - private StringBuilder log = new StringBuilder(); - private Set primitiveTypes = new HashSet(); - private Map allTypes = new HashMap(); - - // if the fhir path expressions are allowed to use constants beyond those defined in the specification - // the application can implement them by providing a constant resolver - public interface IEvaluationContext { - public class FunctionDetails { - private String description; - private int minParameters; - private int maxParameters; - public FunctionDetails(String description, int minParameters, int maxParameters) { - super(); - this.description = description; - this.minParameters = minParameters; - this.maxParameters = maxParameters; - } - public String getDescription() { - return description; - } - public int getMinParameters() { - return minParameters; - } - public int getMaxParameters() { - return maxParameters; - } - - } - - /** - * A constant reference - e.g. a reference to a name that must be resolved in context. - * The % will be removed from the constant name before this is invoked. - * - * This will also be called if the host invokes the FluentPath engine with a context of null - * - * @param appContext - content passed into the fluent path engine - * @param name - name reference to resolve - * @return the value of the reference (or null, if it's not valid, though can throw an exception if desired) - */ - public Base resolveConstant(Object appContext, String name) throws PathEngineException; - public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException; - - /** - * when the .log() function is called - * - * @param argument - * @param focus - * @return - */ - public boolean log(String argument, List focus); - - // extensibility for functions - /** - * - * @param functionName - * @return null if the function is not known - */ - public FunctionDetails resolveFunction(String functionName); - - /** - * Check the function parameters, and throw an error if they are incorrect, or return the type for the function - * @param functionName - * @param parameters - * @return - */ - public TypeDetails checkFunction(Object appContext, String functionName, List parameters) throws PathEngineException; - - /** - * @param appContext - * @param functionName - * @param parameters - * @return - */ - public List executeFunction(Object appContext, String functionName, List> parameters); - - /** - * Implementation of resolve() function. Passed a string, return matching resource, if one is known - else null - * @param appInfo - * @param url - * @return - */ - public Base resolveReference(Object appContext, String url); - - } - - - /** - * @param worker - used when validating paths (@check), and used doing value set membership when executing tests (once that's defined) - */ - public FHIRPathEngine(IWorkerContext worker) { - super(); - this.worker = worker; - for (StructureDefinition sd : worker.allStructures()) { - if (sd.getDerivation() == TypeDerivationRule.SPECIALIZATION && sd.getKind() != StructureDefinitionKind.LOGICAL) - allTypes.put(sd.getName(), sd); - if (sd.getDerivation() == TypeDerivationRule.SPECIALIZATION && sd.getKind() == StructureDefinitionKind.PRIMITIVETYPE) { - primitiveTypes.add(sd.getName()); - } - } - } - - - // --- 3 methods to override in children ------------------------------------------------------- - // if you don't override, it falls through to the using the base reference implementation - // HAPI overrides to these to support extending the base model - - public IEvaluationContext getHostServices() { - return hostServices; - } - - - public void setHostServices(IEvaluationContext constantResolver) { - this.hostServices = constantResolver; - } - - - /** - * Given an item, return all the children that conform to the pattern described in name - * - * Possible patterns: - * - a simple name (which may be the base of a name with [] e.g. value[x]) - * - a name with a type replacement e.g. valueCodeableConcept - * - * which means all children - * - ** which means all descendants - * - * @param item - * @param name - * @param result - * @throws FHIRException - */ - protected void getChildrenByName(Base item, String name, List result) throws FHIRException { - Base[] list = item.listChildrenByName(name, false); - if (list != null) - for (Base v : list) - if (v != null) - result.add(v); - } - - // --- public API ------------------------------------------------------- - /** - * Parse a path for later use using execute - * - * @param path - * @return - * @throws PathEngineException - * @throws Exception - */ - public ExpressionNode parse(String path) throws FHIRLexerException { - FHIRLexer lexer = new FHIRLexer(path); - if (lexer.done()) - throw lexer.error("Path cannot be empty"); - ExpressionNode result = parseExpression(lexer, true); - if (!lexer.done()) - throw lexer.error("Premature ExpressionNode termination at unexpected token \""+lexer.getCurrent()+"\""); - result.check(); - return result; - } - - /** - * Parse a path that is part of some other syntax - * - * @param path - * @return - * @throws PathEngineException - * @throws Exception - */ - public ExpressionNode parse(FHIRLexer lexer) throws FHIRLexerException { - ExpressionNode result = parseExpression(lexer, true); - result.check(); - return result; - } - - /** - * check that paths referred to in the ExpressionNode are valid - * - * xPathStartsWithValueRef is a hack work around for the fact that FHIR Path sometimes needs a different starting point than the xpath - * - * returns a list of the possible types that might be returned by executing the ExpressionNode against a particular context - * - * @param context - the logical type against which this path is applied - * @param path - the FHIR Path statement to check - * @throws DefinitionException - * @throws PathEngineException - * @if the path is not valid - */ - public TypeDetails check(Object appContext, String resourceType, String context, ExpressionNode expr) throws FHIRLexerException, PathEngineException, DefinitionException { - // if context is a path that refers to a type, do that conversion now - TypeDetails types; - if (context == null) { - types = null; // this is a special case; the first path reference will have to resolve to something in the context - } else if (!context.contains(".")) { - StructureDefinition sd = worker.fetchResource(StructureDefinition.class, context); - types = new TypeDetails(CollectionStatus.SINGLETON, sd.getUrl()); - } else { - String ctxt = context.substring(0, context.indexOf('.')); - if (Utilities.isAbsoluteUrl(resourceType)) { - ctxt = resourceType.substring(0, resourceType.lastIndexOf("/")+1)+ctxt; - } - StructureDefinition sd = worker.fetchResource(StructureDefinition.class, ctxt); - if (sd == null) - throw new PathEngineException("Unknown context "+context); - ElementDefinitionMatch ed = getElementDefinition(sd, context, true); - if (ed == null) - throw new PathEngineException("Unknown context element "+context); - if (ed.fixedType != null) - types = new TypeDetails(CollectionStatus.SINGLETON, ed.fixedType); - else if (ed.getDefinition().getType().isEmpty() || isAbstractType(ed.getDefinition().getType())) - types = new TypeDetails(CollectionStatus.SINGLETON, ctxt+"#"+context); - else { - types = new TypeDetails(CollectionStatus.SINGLETON); - for (TypeRefComponent t : ed.getDefinition().getType()) - types.addType(t.getCode()); - } - } - - return executeType(new ExecutionTypeContext(appContext, resourceType, context, types), types, expr, true); - } - - public TypeDetails check(Object appContext, StructureDefinition sd, String context, ExpressionNode expr) throws FHIRLexerException, PathEngineException, DefinitionException { - // if context is a path that refers to a type, do that conversion now - TypeDetails types; - if (!context.contains(".")) { - types = new TypeDetails(CollectionStatus.SINGLETON, sd.getUrl()); - } else { - ElementDefinitionMatch ed = getElementDefinition(sd, context, true); - if (ed == null) - throw new PathEngineException("Unknown context element "+context); - if (ed.fixedType != null) - types = new TypeDetails(CollectionStatus.SINGLETON, ed.fixedType); - else if (ed.getDefinition().getType().isEmpty() || isAbstractType(ed.getDefinition().getType())) - types = new TypeDetails(CollectionStatus.SINGLETON, sd.getUrl()+"#"+context); - else { - types = new TypeDetails(CollectionStatus.SINGLETON); - for (TypeRefComponent t : ed.getDefinition().getType()) - types.addType(t.getCode()); - } - } - - return executeType(new ExecutionTypeContext(appContext, sd.getUrl(), context, types), types, expr, true); - } - - public TypeDetails check(Object appContext, StructureDefinition sd, ExpressionNode expr) throws FHIRLexerException, PathEngineException, DefinitionException { - // if context is a path that refers to a type, do that conversion now - TypeDetails types = null; // this is a special case; the first path reference will have to resolve to something in the context - return executeType(new ExecutionTypeContext(appContext, sd == null ? null : sd.getUrl(), null, types), types, expr, true); - } - - public TypeDetails check(Object appContext, String resourceType, String context, String expr) throws FHIRLexerException, PathEngineException, DefinitionException { - return check(appContext, resourceType, context, parse(expr)); - } - - - /** - * evaluate a path and return the matching elements - * - * @param base - the object against which the path is being evaluated - * @param ExpressionNode - the parsed ExpressionNode statement to use - * @return - * @throws FHIRException - * @ - */ - public List evaluate(Base base, ExpressionNode ExpressionNode) throws FHIRException { - List list = new ArrayList(); - if (base != null) - list.add(base); - log = new StringBuilder(); - return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base, null, base), list, ExpressionNode, true); - } - - /** - * evaluate a path and return the matching elements - * - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public List evaluate(Base base, String path) throws FHIRException { - ExpressionNode exp = parse(path); - List list = new ArrayList(); - if (base != null) - list.add(base); - log = new StringBuilder(); - return execute(new ExecutionContext(null, base.isResource() ? base : null, base, null, base), list, exp, true); - } - - /** - * evaluate a path and return the matching elements - * - * @param base - the object against which the path is being evaluated - * @param ExpressionNode - the parsed ExpressionNode statement to use - * @return - * @throws FHIRException - * @ - */ - public List evaluate(Object appContext, Resource resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { - List list = new ArrayList(); - if (base != null) - list.add(base); - log = new StringBuilder(); - return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); - } - - /** - * evaluate a path and return the matching elements - * - * @param base - the object against which the path is being evaluated - * @param ExpressionNode - the parsed ExpressionNode statement to use - * @return - * @throws FHIRException - * @ - */ - public List evaluate(Object appContext, Base resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { - List list = new ArrayList(); - if (base != null) - list.add(base); - log = new StringBuilder(); - return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); - } - - /** - * evaluate a path and return the matching elements - * - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public List evaluate(Object appContext, Resource resource, Base base, String path) throws FHIRException { - ExpressionNode exp = parse(path); - List list = new ArrayList(); - if (base != null) - list.add(base); - log = new StringBuilder(); - return execute(new ExecutionContext(appContext, resource, base, null, base), list, exp, true); - } - - /** - * evaluate a path and return true or false (e.g. for an invariant) - * - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public boolean evaluateToBoolean(Resource resource, Base base, String path) throws FHIRException { - return convertToBoolean(evaluate(null, resource, base, path)); - } - - /** - * evaluate a path and return true or false (e.g. for an invariant) - * - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public boolean evaluateToBoolean(Resource resource, Base base, ExpressionNode node) throws FHIRException { - return convertToBoolean(evaluate(null, resource, base, node)); - } - - /** - * evaluate a path and return true or false (e.g. for an invariant) - * - * @param appinfo - application context - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public boolean evaluateToBoolean(Object appInfo, Base resource, Base base, ExpressionNode node) throws FHIRException { - return convertToBoolean(evaluate(appInfo, resource, base, node)); - } - - /** - * evaluate a path and return true or false (e.g. for an invariant) - * - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public boolean evaluateToBoolean(Base resource, Base base, ExpressionNode node) throws FHIRException { - return convertToBoolean(evaluate(null, resource, base, node)); - } - - /** - * evaluate a path and a string containing the outcome (for display) - * - * @param base - the object against which the path is being evaluated - * @param path - the FHIR Path statement to use - * @return - * @throws FHIRException - * @ - */ - public String evaluateToString(Base base, String path) throws FHIRException { - return convertToString(evaluate(base, path)); - } - - public String evaluateToString(Object appInfo, Base resource, Base base, ExpressionNode node) throws FHIRException { - return convertToString(evaluate(appInfo, resource, base, node)); - } - - /** - * worker routine for converting a set of objects to a string representation - * - * @param items - result from @evaluate - * @return - */ - public String convertToString(List items) { - StringBuilder b = new StringBuilder(); - boolean first = true; - for (Base item : items) { - if (first) - first = false; - else - b.append(','); - - b.append(convertToString(item)); - } - return b.toString(); - } - - private String convertToString(Base item) { - if (item.isPrimitive()) - return item.primitiveValue(); - else - return item.toString(); - } - - /** - * worker routine for converting a set of objects to a boolean representation (for invariants) - * - * @param items - result from @evaluate - * @return - */ - public boolean convertToBoolean(List items) { - if (items == null) - return false; - else if (items.size() == 1 && items.get(0) instanceof BooleanType) - return ((BooleanType) items.get(0)).getValue(); - else - return items.size() > 0; - } - - - private void log(String name, List contents) { - if (hostServices == null || !hostServices.log(name, contents)) { - if (log.length() > 0) - log.append("; "); - log.append(name); - log.append(": "); - boolean first = true; - for (Base b : contents) { - if (first) - first = false; - else - log.append(","); - log.append(convertToString(b)); - } - } - } - - public String forLog() { - if (log.length() > 0) - return " ("+log.toString()+")"; - else - return ""; - } - - private class ExecutionContext { - private Object appInfo; - private Base resource; - private Base context; - private Base thisItem; - private Map aliases; - - public ExecutionContext(Object appInfo, Base resource, Base context, Map aliases, Base thisItem) { - this.appInfo = appInfo; - this.context = context; - this.resource = resource; - this.aliases = aliases; - this.thisItem = thisItem; - } - public Base getResource() { - return resource; - } - public Base getThisItem() { - return thisItem; - } - public void addAlias(String name, List focus) throws FHIRException { - if (aliases == null) - aliases = new HashMap(); - else - aliases = new HashMap(aliases); // clone it, since it's going to change - if (focus.size() > 1) - throw new FHIRException("Attempt to alias a collection, not a singleton"); - aliases.put(name, focus.size() == 0 ? null : focus.get(0)); - } - public Base getAlias(String name) { - return aliases == null ? null : aliases.get(name); - } - } - - private class ExecutionTypeContext { - private Object appInfo; - private String resource; - private String context; - private TypeDetails thisItem; - - - public ExecutionTypeContext(Object appInfo, String resource, String context, TypeDetails thisItem) { - super(); - this.appInfo = appInfo; - this.resource = resource; - this.context = context; - this.thisItem = thisItem; - - } - public String getResource() { - return resource; - } - public TypeDetails getThisItem() { - return thisItem; - } - } - - private ExpressionNode parseExpression(FHIRLexer lexer, boolean proximal) throws FHIRLexerException { - ExpressionNode result = new ExpressionNode(lexer.nextId()); - SourceLocation c = lexer.getCurrentStartLocation(); - result.setStart(lexer.getCurrentLocation()); - // special: - if (lexer.getCurrent().equals("-")) { - lexer.take(); - lexer.setCurrent("-"+lexer.getCurrent()); - } - if (lexer.getCurrent().equals("+")) { - lexer.take(); - lexer.setCurrent("+"+lexer.getCurrent()); - } - if (lexer.isConstant(false)) { - checkConstant(lexer.getCurrent(), lexer); - result.setConstant(lexer.take()); - result.setKind(Kind.Constant); - result.setEnd(lexer.getCurrentLocation()); - } else if ("(".equals(lexer.getCurrent())) { - lexer.next(); - result.setKind(Kind.Group); - result.setGroup(parseExpression(lexer, true)); - if (!")".equals(lexer.getCurrent())) - throw lexer.error("Found "+lexer.getCurrent()+" expecting a \")\""); - result.setEnd(lexer.getCurrentLocation()); - lexer.next(); - } else { - if (!lexer.isToken() && !lexer.getCurrent().startsWith("\"")) - throw lexer.error("Found "+lexer.getCurrent()+" expecting a token name"); - if (lexer.getCurrent().startsWith("\"")) - result.setName(lexer.readConstant("Path Name")); - else - result.setName(lexer.take()); - result.setEnd(lexer.getCurrentLocation()); - if (!result.checkName()) - throw lexer.error("Found "+result.getName()+" expecting a valid token name"); - if ("(".equals(lexer.getCurrent())) { - Function f = Function.fromCode(result.getName()); - FunctionDetails details = null; - if (f == null) { - if (hostServices != null) - details = hostServices.resolveFunction(result.getName()); - if (details == null) - throw lexer.error("The name "+result.getName()+" is not a valid function name"); - f = Function.Custom; - } - result.setKind(Kind.Function); - result.setFunction(f); - lexer.next(); - while (!")".equals(lexer.getCurrent())) { - result.getParameters().add(parseExpression(lexer, true)); - if (",".equals(lexer.getCurrent())) - lexer.next(); - else if (!")".equals(lexer.getCurrent())) - throw lexer.error("The token "+lexer.getCurrent()+" is not expected here - either a \",\" or a \")\" expected"); - } - result.setEnd(lexer.getCurrentLocation()); - lexer.next(); - checkParameters(lexer, c, result, details); - } else - result.setKind(Kind.Name); - } - ExpressionNode focus = result; - if ("[".equals(lexer.getCurrent())) { - lexer.next(); - ExpressionNode item = new ExpressionNode(lexer.nextId()); - item.setKind(Kind.Function); - item.setFunction(ExpressionNode.Function.Item); - item.getParameters().add(parseExpression(lexer, true)); - if (!lexer.getCurrent().equals("]")) - throw lexer.error("The token "+lexer.getCurrent()+" is not expected here - a \"]\" expected"); - lexer.next(); - result.setInner(item); - focus = item; - } - if (".".equals(lexer.getCurrent())) { - lexer.next(); - focus.setInner(parseExpression(lexer, false)); - } - result.setProximal(proximal); - if (proximal) { - while (lexer.isOp()) { - focus.setOperation(ExpressionNode.Operation.fromCode(lexer.getCurrent())); - focus.setOpStart(lexer.getCurrentStartLocation()); - focus.setOpEnd(lexer.getCurrentLocation()); - lexer.next(); - focus.setOpNext(parseExpression(lexer, false)); - focus = focus.getOpNext(); - } - result = organisePrecedence(lexer, result); - } - return result; - } - - private ExpressionNode organisePrecedence(FHIRLexer lexer, ExpressionNode node) { - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Times, Operation.DivideBy, Operation.Div, Operation.Mod)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Plus, Operation.Minus, Operation.Concatenate)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Union)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.LessThen, Operation.Greater, Operation.LessOrEqual, Operation.GreaterOrEqual)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Is)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Equals, Operation.Equivalent, Operation.NotEquals, Operation.NotEquivalent)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.And)); - node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Xor, Operation.Or)); - // last: implies - return node; - } - - private ExpressionNode gatherPrecedence(FHIRLexer lexer, ExpressionNode start, EnumSet ops) { - // work : boolean; - // focus, node, group : ExpressionNode; - - assert(start.isProximal()); - - // is there anything to do? - boolean work = false; - ExpressionNode focus = start.getOpNext(); - if (ops.contains(start.getOperation())) { - while (focus != null && focus.getOperation() != null) { - work = work || !ops.contains(focus.getOperation()); - focus = focus.getOpNext(); - } - } else { - while (focus != null && focus.getOperation() != null) { - work = work || ops.contains(focus.getOperation()); - focus = focus.getOpNext(); - } - } - if (!work) - return start; - - // entry point: tricky - ExpressionNode group; - if (ops.contains(start.getOperation())) { - group = newGroup(lexer, start); - group.setProximal(true); - focus = start; - start = group; - } else { - ExpressionNode node = start; - - focus = node.getOpNext(); - while (!ops.contains(focus.getOperation())) { - node = focus; - focus = focus.getOpNext(); - } - group = newGroup(lexer, focus); - node.setOpNext(group); - } - - // now, at this point: - // group is the group we are adding to, it already has a .group property filled out. - // focus points at the group.group - do { - // run until we find the end of the sequence - while (ops.contains(focus.getOperation())) - focus = focus.getOpNext(); - if (focus.getOperation() != null) { - group.setOperation(focus.getOperation()); - group.setOpNext(focus.getOpNext()); - focus.setOperation(null); - focus.setOpNext(null); - // now look for another sequence, and start it - ExpressionNode node = group; - focus = group.getOpNext(); - if (focus != null) { - while (focus != null && !ops.contains(focus.getOperation())) { - node = focus; - focus = focus.getOpNext(); - } - if (focus != null) { // && (focus.Operation in Ops) - must be true - group = newGroup(lexer, focus); - node.setOpNext(group); - } - } - } - } - while (focus != null && focus.getOperation() != null); - return start; - } - - - private ExpressionNode newGroup(FHIRLexer lexer, ExpressionNode next) { - ExpressionNode result = new ExpressionNode(lexer.nextId()); - result.setKind(Kind.Group); - result.setGroup(next); - result.getGroup().setProximal(true); - return result; - } - - private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { - if (s.startsWith("\'") && s.endsWith("\'")) { - int i = 1; - while (i < s.length()-1) { - char ch = s.charAt(i); - if (ch == '\\') { - switch (ch) { - case 't': - case 'r': - case 'n': - case 'f': - case '\'': - case '\\': - case '/': - i++; - break; - case 'u': - if (!Utilities.isHex("0x"+s.substring(i, i+4))) - throw lexer.error("Improper unicode escape \\u"+s.substring(i, i+4)); - break; - default: - throw lexer.error("Unknown character escape \\"+ch); - } - } else - i++; - } - } - } - - // procedure CheckParamCount(c : integer); - // begin - // if exp.Parameters.Count <> c then - // raise lexer.error('The function "'+exp.name+'" requires '+inttostr(c)+' parameters', offset); - // end; - - private boolean checkParamCount(FHIRLexer lexer, SourceLocation location, ExpressionNode exp, int count) throws FHIRLexerException { - if (exp.getParameters().size() != count) - throw lexer.error("The function \""+exp.getName()+"\" requires "+Integer.toString(count)+" parameters", location.toString()); - return true; - } - - private boolean checkParamCount(FHIRLexer lexer, SourceLocation location, ExpressionNode exp, int countMin, int countMax) throws FHIRLexerException { - if (exp.getParameters().size() < countMin || exp.getParameters().size() > countMax) - throw lexer.error("The function \""+exp.getName()+"\" requires between "+Integer.toString(countMin)+" and "+Integer.toString(countMax)+" parameters", location.toString()); - return true; - } - - private boolean checkParameters(FHIRLexer lexer, SourceLocation location, ExpressionNode exp, FunctionDetails details) throws FHIRLexerException { - switch (exp.getFunction()) { - case Empty: return checkParamCount(lexer, location, exp, 0); - case Not: return checkParamCount(lexer, location, exp, 0); - case Exists: return checkParamCount(lexer, location, exp, 0); - case SubsetOf: return checkParamCount(lexer, location, exp, 1); - case SupersetOf: return checkParamCount(lexer, location, exp, 1); - case IsDistinct: return checkParamCount(lexer, location, exp, 0); - case Distinct: return checkParamCount(lexer, location, exp, 0); - case Count: return checkParamCount(lexer, location, exp, 0); - case Where: return checkParamCount(lexer, location, exp, 1); - case Select: return checkParamCount(lexer, location, exp, 1); - case All: return checkParamCount(lexer, location, exp, 0, 1); - case Repeat: return checkParamCount(lexer, location, exp, 1); - case Item: return checkParamCount(lexer, location, exp, 1); - case As: return checkParamCount(lexer, location, exp, 1); - case Is: return checkParamCount(lexer, location, exp, 1); - case Single: return checkParamCount(lexer, location, exp, 0); - case First: return checkParamCount(lexer, location, exp, 0); - case Last: return checkParamCount(lexer, location, exp, 0); - case Tail: return checkParamCount(lexer, location, exp, 0); - case Skip: return checkParamCount(lexer, location, exp, 1); - case Take: return checkParamCount(lexer, location, exp, 1); - case Iif: return checkParamCount(lexer, location, exp, 2,3); - case ToInteger: return checkParamCount(lexer, location, exp, 0); - case ToDecimal: return checkParamCount(lexer, location, exp, 0); - case ToString: return checkParamCount(lexer, location, exp, 0); - case Substring: return checkParamCount(lexer, location, exp, 1, 2); - case StartsWith: return checkParamCount(lexer, location, exp, 1); - case EndsWith: return checkParamCount(lexer, location, exp, 1); - case Matches: return checkParamCount(lexer, location, exp, 1); - case ReplaceMatches: return checkParamCount(lexer, location, exp, 2); - case Contains: return checkParamCount(lexer, location, exp, 1); - case Replace: return checkParamCount(lexer, location, exp, 2); - case Length: return checkParamCount(lexer, location, exp, 0); - case Children: return checkParamCount(lexer, location, exp, 0); - case Descendants: return checkParamCount(lexer, location, exp, 0); - case MemberOf: return checkParamCount(lexer, location, exp, 1); - case Trace: return checkParamCount(lexer, location, exp, 1); - case Today: return checkParamCount(lexer, location, exp, 0); - case Now: return checkParamCount(lexer, location, exp, 0); - case Resolve: return checkParamCount(lexer, location, exp, 0); - case Extension: return checkParamCount(lexer, location, exp, 1); - case HasValue: return checkParamCount(lexer, location, exp, 0); - case Alias: return checkParamCount(lexer, location, exp, 1); - case AliasAs: return checkParamCount(lexer, location, exp, 1); - case Custom: return checkParamCount(lexer, location, exp, details.getMinParameters(), details.getMaxParameters()); - } - return false; - } - - private List execute(ExecutionContext context, List focus, ExpressionNode exp, boolean atEntry) throws FHIRException { -// System.out.println("Evaluate {'"+exp.toString()+"'} on "+focus.toString()); - List work = new ArrayList(); - switch (exp.getKind()) { - case Name: - if (atEntry && exp.getName().equals("$this")) - work.add(context.getThisItem()); - else - for (Base item : focus) { - List outcome = execute(context, item, exp, atEntry); - for (Base base : outcome) - if (base != null) - work.add(base); - } - break; - case Function: - List work2 = evaluateFunction(context, focus, exp); - work.addAll(work2); - break; - case Constant: - Base b = processConstant(context, exp.getConstant()); - if (b != null) - work.add(b); - break; - case Group: - work2 = execute(context, focus, exp.getGroup(), atEntry); - work.addAll(work2); - } - - if (exp.getInner() != null) - work = execute(context, work, exp.getInner(), false); - - if (exp.isProximal() && exp.getOperation() != null) { - ExpressionNode next = exp.getOpNext(); - ExpressionNode last = exp; - while (next != null) { - List work2 = preOperate(work, last.getOperation()); - if (work2 != null) - work = work2; - else if (last.getOperation() == Operation.Is || last.getOperation() == Operation.As) { - work2 = executeTypeName(context, focus, next, false); - work = operate(work, last.getOperation(), work2); - } else { - work2 = execute(context, focus, next, true); - work = operate(work, last.getOperation(), work2); -// System.out.println("Result of {'"+last.toString()+" "+last.getOperation().toCode()+" "+next.toString()+"'}: "+focus.toString()); - } - last = next; - next = next.getOpNext(); - } - } -// System.out.println("Result of {'"+exp.toString()+"'}: "+work.toString()); - return work; - } - - private List executeTypeName(ExecutionContext context, List focus, ExpressionNode next, boolean atEntry) { - List result = new ArrayList(); - result.add(new StringType(next.getName())); - return result; - } - - - private List preOperate(List left, Operation operation) { - switch (operation) { - case And: - return isBoolean(left, false) ? makeBoolean(false) : null; - case Or: - return isBoolean(left, true) ? makeBoolean(true) : null; - case Implies: - return convertToBoolean(left) ? null : makeBoolean(true); - default: - return null; - } - } - - private List makeBoolean(boolean b) { - List res = new ArrayList(); - res.add(new BooleanType(b)); - return res; - } - - private TypeDetails executeTypeName(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { - return new TypeDetails(CollectionStatus.SINGLETON, exp.getName()); - } - - private TypeDetails executeType(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { - TypeDetails result = new TypeDetails(null); - switch (exp.getKind()) { - case Name: - if (atEntry && exp.getName().equals("$this")) - result.update(context.getThisItem()); - else if (atEntry && focus == null) - result.update(executeContextType(context, exp.getName())); - else { - for (String s : focus.getTypes()) { - result.update(executeType(s, exp, atEntry)); - } - if (result.hasNoTypes()) - throw new PathEngineException("The name "+exp.getName()+" is not valid for any of the possible types: "+focus.describe()); - } - break; - case Function: - result.update(evaluateFunctionType(context, focus, exp)); - break; - case Constant: - result.update(readConstantType(context, exp.getConstant())); - break; - case Group: - result.update(executeType(context, focus, exp.getGroup(), atEntry)); - } - exp.setTypes(result); - - if (exp.getInner() != null) { - result = executeType(context, result, exp.getInner(), false); - } - - if (exp.isProximal() && exp.getOperation() != null) { - ExpressionNode next = exp.getOpNext(); - ExpressionNode last = exp; - while (next != null) { - TypeDetails work; - if (last.getOperation() == Operation.Is || last.getOperation() == Operation.As) - work = executeTypeName(context, focus, next, atEntry); - else - work = executeType(context, focus, next, atEntry); - result = operateTypes(result, last.getOperation(), work); - last = next; - next = next.getOpNext(); - } - exp.setOpTypes(result); - } - return result; - } - - private Base processConstant(ExecutionContext context, String constant) throws PathEngineException { - if (constant.equals("true")) { - return new BooleanType(true); - } else if (constant.equals("false")) { - return new BooleanType(false); - } else if (constant.equals("{}")) { - return null; - } else if (Utilities.isInteger(constant)) { - return new IntegerType(constant); - } else if (Utilities.isDecimal(constant)) { - return new DecimalType(constant); - } else if (constant.startsWith("\'")) { - return new StringType(processConstantString(constant)); - } else if (constant.startsWith("%")) { - return resolveConstant(context, constant); - } else if (constant.startsWith("@")) { - return processDateConstant(context.appInfo, constant.substring(1)); - } else { - return new StringType(constant); - } - } - - private Base processDateConstant(Object appInfo, String value) throws PathEngineException { - if (value.startsWith("T")) - return new TimeType(value.substring(1)); - String v = value; - if (v.length() > 10) { - int i = v.substring(10).indexOf("-"); - if (i == -1) - i = v.substring(10).indexOf("+"); - if (i == -1) - i = v.substring(10).indexOf("Z"); - v = i == -1 ? value : v.substring(0, 10+i); - } - if (v.length() > 10) - return new DateTimeType(value); - else - return new DateType(value); - } - - - private Base resolveConstant(ExecutionContext context, String s) throws PathEngineException { - if (s.equals("%sct")) - return new StringType("http://snomed.info/sct"); - else if (s.equals("%loinc")) - return new StringType("http://loinc.org"); - else if (s.equals("%ucum")) - return new StringType("http://unitsofmeasure.org"); - else if (s.equals("%resource")) { - if (context.resource == null) - throw new PathEngineException("Cannot use %resource in this context"); - return context.resource; - } else if (s.equals("%context")) { - return context.context; - } else if (s.equals("%us-zip")) - return new StringType("[0-9]{5}(-[0-9]{4}){0,1}"); - else if (s.startsWith("%\"vs-")) - return new StringType("http://hl7.org/fhir/ValueSet/"+s.substring(5, s.length()-1)+""); - else if (s.startsWith("%\"cs-")) - return new StringType("http://hl7.org/fhir/"+s.substring(5, s.length()-1)+""); - else if (s.startsWith("%\"ext-")) - return new StringType("http://hl7.org/fhir/StructureDefinition/"+s.substring(6, s.length()-1)); - else if (hostServices == null) - throw new PathEngineException("Unknown fixed constant '"+s+"'"); - else - return hostServices.resolveConstant(context.appInfo, s.substring(1)); - } - - - private String processConstantString(String s) throws PathEngineException { - StringBuilder b = new StringBuilder(); - int i = 1; - while (i < s.length()-1) { - char ch = s.charAt(i); - if (ch == '\\') { - i++; - switch (s.charAt(i)) { - case 't': - b.append('\t'); - break; - case 'r': - b.append('\r'); - break; - case 'n': - b.append('\n'); - break; - case 'f': - b.append('\f'); - break; - case '\'': - b.append('\''); - break; - case '\\': - b.append('\\'); - break; - case '/': - b.append('/'); - break; - case 'u': - i++; - int uc = Integer.parseInt(s.substring(i, i+4), 16); - b.append((char) uc); - i = i + 3; - break; - default: - throw new PathEngineException("Unknown character escape \\"+s.charAt(i)); - } - i++; - } else { - b.append(ch); - i++; - } - } - return b.toString(); - } - - - private List operate(List left, Operation operation, List right) throws FHIRException { - switch (operation) { - case Equals: return opEquals(left, right); - case Equivalent: return opEquivalent(left, right); - case NotEquals: return opNotEquals(left, right); - case NotEquivalent: return opNotEquivalent(left, right); - case LessThen: return opLessThen(left, right); - case Greater: return opGreater(left, right); - case LessOrEqual: return opLessOrEqual(left, right); - case GreaterOrEqual: return opGreaterOrEqual(left, right); - case Union: return opUnion(left, right); - case In: return opIn(left, right); - case MemberOf: return opMemberOf(left, right); - case Contains: return opContains(left, right); - case Or: return opOr(left, right); - case And: return opAnd(left, right); - case Xor: return opXor(left, right); - case Implies: return opImplies(left, right); - case Plus: return opPlus(left, right); - case Times: return opTimes(left, right); - case Minus: return opMinus(left, right); - case Concatenate: return opConcatenate(left, right); - case DivideBy: return opDivideBy(left, right); - case Div: return opDiv(left, right); - case Mod: return opMod(left, right); - case Is: return opIs(left, right); - case As: return opAs(left, right); - default: - throw new Error("Not Done Yet: "+operation.toCode()); - } - } - - private List opAs(List left, List right) { - List result = new ArrayList(); - if (left.size() != 1 || right.size() != 1) - return result; - else { - String tn = convertToString(right); - if (tn.equals(left.get(0).fhirType())) - result.add(left.get(0)); - } - return result; - } - - - private List opIs(List left, List right) { - List result = new ArrayList(); - if (left.size() != 1 || right.size() != 1) - result.add(new BooleanType(false)); - else { - String tn = convertToString(right); - result.add(new BooleanType(left.get(0).hasType(tn))); - } - return result; - } - - - private TypeDetails operateTypes(TypeDetails left, Operation operation, TypeDetails right) { - switch (operation) { - case Equals: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Equivalent: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case NotEquals: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case NotEquivalent: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case LessThen: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Greater: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case LessOrEqual: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case GreaterOrEqual: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Is: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case As: return new TypeDetails(CollectionStatus.SINGLETON, right.getTypes()); - case Union: return left.union(right); - case Or: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case And: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Xor: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Implies : return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Times: - TypeDetails result = new TypeDetails(CollectionStatus.SINGLETON); - if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) - result.addType("integer"); - else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) - result.addType("decimal"); - return result; - case DivideBy: - result = new TypeDetails(CollectionStatus.SINGLETON); - if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) - result.addType("decimal"); - else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) - result.addType("decimal"); - return result; - case Concatenate: - result = new TypeDetails(CollectionStatus.SINGLETON, ""); - case Plus: - result = new TypeDetails(CollectionStatus.SINGLETON); - if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) - result.addType("integer"); - else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) - result.addType("decimal"); - else if (left.hasType(worker, "string", "id", "code", "uri") && right.hasType(worker, "string", "id", "code", "uri")) - result.addType("string"); - return result; - case Minus: - result = new TypeDetails(CollectionStatus.SINGLETON); - if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) - result.addType("integer"); - else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) - result.addType("decimal"); - return result; - case Div: - case Mod: - result = new TypeDetails(CollectionStatus.SINGLETON); - if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) - result.addType("integer"); - else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) - result.addType("decimal"); - return result; - case In: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case MemberOf: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Contains: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - default: - return null; - } - } - - - private List opEquals(List left, List right) { - if (left.size() != right.size()) - return makeBoolean(false); - - boolean res = true; - for (int i = 0; i < left.size(); i++) { - if (!doEquals(left.get(i), right.get(i))) { - res = false; - break; - } - } - return makeBoolean(res); - } - - private List opNotEquals(List left, List right) { - if (left.size() != right.size()) - return makeBoolean(true); - - boolean res = true; - for (int i = 0; i < left.size(); i++) { - if (!doEquals(left.get(i), right.get(i))) { - res = false; - break; - } - } - return makeBoolean(!res); - } - - private boolean doEquals(Base left, Base right) { - if (left.isPrimitive() && right.isPrimitive()) - return Base.equals(left.primitiveValue(), right.primitiveValue()); - else - return Base.compareDeep(left, right, false); - } - - private boolean doEquivalent(Base left, Base right) throws PathEngineException { - if (left.hasType("integer") && right.hasType("integer")) - return doEquals(left, right); - if (left.hasType("boolean") && right.hasType("boolean")) - return doEquals(left, right); - if (left.hasType("integer", "decimal", "unsignedInt", "positiveInt") && right.hasType("integer", "decimal", "unsignedInt", "positiveInt")) - return Utilities.equivalentNumber(left.primitiveValue(), right.primitiveValue()); - if (left.hasType("date", "dateTime", "time", "instant") && right.hasType("date", "dateTime", "time", "instant")) - return Utilities.equivalentNumber(left.primitiveValue(), right.primitiveValue()); - if (left.hasType("string", "id", "code", "uri") && right.hasType("string", "id", "code", "uri")) - return Utilities.equivalent(convertToString(left), convertToString(right)); - - throw new PathEngineException(String.format("Unable to determine equivalence between %s and %s", left.fhirType(), right.fhirType())); - } - - private List opEquivalent(List left, List right) throws PathEngineException { - if (left.size() != right.size()) - return makeBoolean(false); - - boolean res = true; - for (int i = 0; i < left.size(); i++) { - boolean found = false; - for (int j = 0; j < right.size(); j++) { - if (doEquivalent(left.get(i), right.get(j))) { - found = true; - break; - } - } - if (!found) { - res = false; - break; - } - } - return makeBoolean(res); - } - - private List opNotEquivalent(List left, List right) throws PathEngineException { - if (left.size() != right.size()) - return makeBoolean(true); - - boolean res = true; - for (int i = 0; i < left.size(); i++) { - boolean found = false; - for (int j = 0; j < right.size(); j++) { - if (doEquivalent(left.get(i), right.get(j))) { - found = true; - break; - } - } - if (!found) { - res = false; - break; - } - } - return makeBoolean(!res); - } - - private List opLessThen(List left, List right) throws FHIRException { - if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { - Base l = left.get(0); - Base r = right.get(0); - if (l.hasType("string") && r.hasType("string")) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) < 0); - else if ((l.hasType("integer") || l.hasType("decimal")) && (r.hasType("integer") || r.hasType("decimal"))) - return makeBoolean(new Double(l.primitiveValue()) < new Double(r.primitiveValue())); - else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) < 0); - else if ((l.hasType("time")) && (r.hasType("time"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) < 0); - } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { - List lUnit = left.get(0).listChildrenByName("unit"); - List rUnit = right.get(0).listChildrenByName("unit"); - if (Base.compareDeep(lUnit, rUnit, true)) { - return opLessThen(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); - } else { - throw new InternalErrorException("Canonical Comparison isn't done yet"); - } - } - return new ArrayList(); - } - - private List opGreater(List left, List right) throws FHIRException { - if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { - Base l = left.get(0); - Base r = right.get(0); - if (l.hasType("string") && r.hasType("string")) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) > 0); - else if ((l.hasType("integer", "decimal", "unsignedInt", "positiveInt")) && (r.hasType("integer", "decimal", "unsignedInt", "positiveInt"))) - return makeBoolean(new Double(l.primitiveValue()) > new Double(r.primitiveValue())); - else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) > 0); - else if ((l.hasType("time")) && (r.hasType("time"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) > 0); - } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { - List lUnit = left.get(0).listChildrenByName("unit"); - List rUnit = right.get(0).listChildrenByName("unit"); - if (Base.compareDeep(lUnit, rUnit, true)) { - return opGreater(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); - } else { - throw new InternalErrorException("Canonical Comparison isn't done yet"); - } - } - return new ArrayList(); - } - - private List opLessOrEqual(List left, List right) throws FHIRException { - if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { - Base l = left.get(0); - Base r = right.get(0); - if (l.hasType("string") && r.hasType("string")) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) <= 0); - else if ((l.hasType("integer", "decimal", "unsignedInt", "positiveInt")) && (r.hasType("integer", "decimal", "unsignedInt", "positiveInt"))) - return makeBoolean(new Double(l.primitiveValue()) <= new Double(r.primitiveValue())); - else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) <= 0); - else if ((l.hasType("time")) && (r.hasType("time"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) <= 0); - } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { - List lUnits = left.get(0).listChildrenByName("unit"); - String lunit = lUnits.size() == 1 ? lUnits.get(0).primitiveValue() : null; - List rUnits = right.get(0).listChildrenByName("unit"); - String runit = rUnits.size() == 1 ? rUnits.get(0).primitiveValue() : null; - if ((lunit == null && runit == null) || lunit.equals(runit)) { - return opLessOrEqual(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); - } else { - throw new InternalErrorException("Canonical Comparison isn't done yet"); - } - } - return new ArrayList(); - } - - private List opGreaterOrEqual(List left, List right) throws FHIRException { - if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { - Base l = left.get(0); - Base r = right.get(0); - if (l.hasType("string") && r.hasType("string")) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) >= 0); - else if ((l.hasType("integer", "decimal", "unsignedInt", "positiveInt")) && (r.hasType("integer", "decimal", "unsignedInt", "positiveInt"))) - return makeBoolean(new Double(l.primitiveValue()) >= new Double(r.primitiveValue())); - else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) >= 0); - else if ((l.hasType("time")) && (r.hasType("time"))) - return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) >= 0); - } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { - List lUnit = left.get(0).listChildrenByName("unit"); - List rUnit = right.get(0).listChildrenByName("unit"); - if (Base.compareDeep(lUnit, rUnit, true)) { - return opGreaterOrEqual(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); - } else { - throw new InternalErrorException("Canonical Comparison isn't done yet"); - } - } - return new ArrayList(); - } - - private List opMemberOf(List left, List right) throws FHIRException { - boolean ans = false; - ValueSet vs = worker.fetchResource(ValueSet.class, right.get(0).primitiveValue()); - if (vs != null) { - for (Base l : left) { - if (l.fhirType().equals("code")) { - if (worker.validateCode(l.castToCoding(l), vs).isOk()) - ans = true; - } else if (l.fhirType().equals("Coding")) { - if (worker.validateCode(l.castToCoding(l), vs).isOk()) - ans = true; - } else if (l.fhirType().equals("CodeableConcept")) { - if (worker.validateCode(l.castToCodeableConcept(l), vs).isOk()) - ans = true; - } - } - } - return makeBoolean(ans); - } - - private List opIn(List left, List right) throws FHIRException { - boolean ans = true; - for (Base l : left) { - boolean f = false; - for (Base r : right) - if (doEquals(l, r)) { - f = true; - break; - } - if (!f) { - ans = false; - break; - } - } - return makeBoolean(ans); - } - - private List opContains(List left, List right) { - boolean ans = true; - for (Base r : right) { - boolean f = false; - for (Base l : left) - if (doEquals(l, r)) { - f = true; - break; - } - if (!f) { - ans = false; - break; - } - } - return makeBoolean(ans); - } - - private List opPlus(List left, List right) throws PathEngineException { - if (left.size() == 0) - throw new PathEngineException("Error performing +: left operand has no value"); - if (left.size() > 1) - throw new PathEngineException("Error performing +: left operand has more than one value"); - if (!left.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing +: left operand has the wrong type (%s)", left.get(0).fhirType())); - if (right.size() == 0) - throw new PathEngineException("Error performing +: right operand has no value"); - if (right.size() > 1) - throw new PathEngineException("Error performing +: right operand has more than one value"); - if (!right.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing +: right operand has the wrong type (%s)", right.get(0).fhirType())); - - List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - if (l.hasType("string", "id", "code", "uri") && r.hasType("string", "id", "code", "uri")) - result.add(new StringType(l.primitiveValue() + r.primitiveValue())); - else if (l.hasType("integer") && r.hasType("integer")) - result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) + Integer.parseInt(r.primitiveValue()))); - else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) - result.add(new DecimalType(new BigDecimal(l.primitiveValue()).add(new BigDecimal(r.primitiveValue())))); - else - throw new PathEngineException(String.format("Error performing +: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); - return result; - } - - private List opTimes(List left, List right) throws PathEngineException { - if (left.size() == 0) - throw new PathEngineException("Error performing *: left operand has no value"); - if (left.size() > 1) - throw new PathEngineException("Error performing *: left operand has more than one value"); - if (!left.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing +: left operand has the wrong type (%s)", left.get(0).fhirType())); - if (right.size() == 0) - throw new PathEngineException("Error performing *: right operand has no value"); - if (right.size() > 1) - throw new PathEngineException("Error performing *: right operand has more than one value"); - if (!right.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing *: right operand has the wrong type (%s)", right.get(0).fhirType())); - - List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - - if (l.hasType("integer") && r.hasType("integer")) - result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) * Integer.parseInt(r.primitiveValue()))); - else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) - result.add(new DecimalType(new BigDecimal(l.primitiveValue()).multiply(new BigDecimal(r.primitiveValue())))); - else - throw new PathEngineException(String.format("Error performing *: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); - return result; - } - - private List opConcatenate(List left, List right) { - List result = new ArrayList(); - result.add(new StringType(convertToString(left) + convertToString((right)))); - return result; - } - - private List opUnion(List left, List right) { - List result = new ArrayList(); - for (Base item : left) { - if (!doContains(result, item)) - result.add(item); - } - for (Base item : right) { - if (!doContains(result, item)) - result.add(item); - } - return result; - } - - private boolean doContains(List list, Base item) { - for (Base test : list) - if (doEquals(test, item)) - return true; - return false; - } - - - private List opAnd(List left, List right) { - if (left.isEmpty() && right.isEmpty()) - return new ArrayList(); - else if (isBoolean(left, false) || isBoolean(right, false)) - return makeBoolean(false); - else if (left.isEmpty() || right.isEmpty()) - return new ArrayList(); - else if (convertToBoolean(left) && convertToBoolean(right)) - return makeBoolean(true); - else - return makeBoolean(false); - } - - private boolean isBoolean(List list, boolean b) { - return list.size() == 1 && list.get(0) instanceof BooleanType && ((BooleanType) list.get(0)).booleanValue() == b; - } - - private List opOr(List left, List right) { - if (left.isEmpty() && right.isEmpty()) - return new ArrayList(); - else if (convertToBoolean(left) || convertToBoolean(right)) - return makeBoolean(true); - else if (left.isEmpty() || right.isEmpty()) - return new ArrayList(); - else - return makeBoolean(false); - } - - private List opXor(List left, List right) { - if (left.isEmpty() || right.isEmpty()) - return new ArrayList(); - else - return makeBoolean(convertToBoolean(left) ^ convertToBoolean(right)); - } - - private List opImplies(List left, List right) { - if (!convertToBoolean(left)) - return makeBoolean(true); - else if (right.size() == 0) - return new ArrayList(); - else - return makeBoolean(convertToBoolean(right)); - } - - - private List opMinus(List left, List right) throws PathEngineException { - if (left.size() == 0) - throw new PathEngineException("Error performing -: left operand has no value"); - if (left.size() > 1) - throw new PathEngineException("Error performing -: left operand has more than one value"); - if (!left.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing -: left operand has the wrong type (%s)", left.get(0).fhirType())); - if (right.size() == 0) - throw new PathEngineException("Error performing -: right operand has no value"); - if (right.size() > 1) - throw new PathEngineException("Error performing -: right operand has more than one value"); - if (!right.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing -: right operand has the wrong type (%s)", right.get(0).fhirType())); - - List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - - if (l.hasType("integer") && r.hasType("integer")) - result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) - Integer.parseInt(r.primitiveValue()))); - else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) - result.add(new DecimalType(new BigDecimal(l.primitiveValue()).subtract(new BigDecimal(r.primitiveValue())))); - else - throw new PathEngineException(String.format("Error performing -: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); - return result; - } - - private List opDivideBy(List left, List right) throws PathEngineException { - if (left.size() == 0) - throw new PathEngineException("Error performing /: left operand has no value"); - if (left.size() > 1) - throw new PathEngineException("Error performing /: left operand has more than one value"); - if (!left.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing -: left operand has the wrong type (%s)", left.get(0).fhirType())); - if (right.size() == 0) - throw new PathEngineException("Error performing /: right operand has no value"); - if (right.size() > 1) - throw new PathEngineException("Error performing /: right operand has more than one value"); - if (!right.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing /: right operand has the wrong type (%s)", right.get(0).fhirType())); - - List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - - if (l.hasType("integer", "decimal", "unsignedInt", "positiveInt") && r.hasType("integer", "decimal", "unsignedInt", "positiveInt")) { - Decimal d1; - try { - d1 = new Decimal(l.primitiveValue()); - Decimal d2 = new Decimal(r.primitiveValue()); - result.add(new DecimalType(d1.divide(d2).asDecimal())); - } catch (UcumException e) { - throw new PathEngineException(e); - } - } - else - throw new PathEngineException(String.format("Error performing /: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); - return result; - } - - private List opDiv(List left, List right) throws PathEngineException { - if (left.size() == 0) - throw new PathEngineException("Error performing div: left operand has no value"); - if (left.size() > 1) - throw new PathEngineException("Error performing div: left operand has more than one value"); - if (!left.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing div: left operand has the wrong type (%s)", left.get(0).fhirType())); - if (right.size() == 0) - throw new PathEngineException("Error performing div: right operand has no value"); - if (right.size() > 1) - throw new PathEngineException("Error performing div: right operand has more than one value"); - if (!right.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing div: right operand has the wrong type (%s)", right.get(0).fhirType())); - - List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - - if (l.hasType("integer") && r.hasType("integer")) - result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) / Integer.parseInt(r.primitiveValue()))); - else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) { - Decimal d1; - try { - d1 = new Decimal(l.primitiveValue()); - Decimal d2 = new Decimal(r.primitiveValue()); - result.add(new IntegerType(d1.divInt(d2).asDecimal())); - } catch (UcumException e) { - throw new PathEngineException(e); - } - } - else - throw new PathEngineException(String.format("Error performing div: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); - return result; - } - - private List opMod(List left, List right) throws PathEngineException { - if (left.size() == 0) - throw new PathEngineException("Error performing mod: left operand has no value"); - if (left.size() > 1) - throw new PathEngineException("Error performing mod: left operand has more than one value"); - if (!left.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing mod: left operand has the wrong type (%s)", left.get(0).fhirType())); - if (right.size() == 0) - throw new PathEngineException("Error performing mod: right operand has no value"); - if (right.size() > 1) - throw new PathEngineException("Error performing mod: right operand has more than one value"); - if (!right.get(0).isPrimitive()) - throw new PathEngineException(String.format("Error performing mod: right operand has the wrong type (%s)", right.get(0).fhirType())); - - List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - - if (l.hasType("integer") && r.hasType("integer")) - result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) % Integer.parseInt(r.primitiveValue()))); - else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) { - Decimal d1; - try { - d1 = new Decimal(l.primitiveValue()); - Decimal d2 = new Decimal(r.primitiveValue()); - result.add(new DecimalType(d1.modulo(d2).asDecimal())); - } catch (UcumException e) { - throw new PathEngineException(e); - } - } - else - throw new PathEngineException(String.format("Error performing mod: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); - return result; - } - - - private TypeDetails readConstantType(ExecutionTypeContext context, String constant) throws PathEngineException { - if (constant.equals("true")) - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - else if (constant.equals("false")) - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - else if (Utilities.isInteger(constant)) - return new TypeDetails(CollectionStatus.SINGLETON, "integer"); - else if (Utilities.isDecimal(constant)) - return new TypeDetails(CollectionStatus.SINGLETON, "decimal"); - else if (constant.startsWith("%")) - return resolveConstantType(context, constant); - else - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - } - - private TypeDetails resolveConstantType(ExecutionTypeContext context, String s) throws PathEngineException { - if (s.equals("%sct")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.equals("%loinc")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.equals("%ucum")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.equals("%resource")) { - if (context.resource == null) - throw new PathEngineException("%resource cannot be used in this context"); - return new TypeDetails(CollectionStatus.SINGLETON, context.resource); - } else if (s.equals("%context")) { - return new TypeDetails(CollectionStatus.SINGLETON, context.context); - } else if (s.equals("%map-codes")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.equals("%us-zip")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.startsWith("%\"vs-")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.startsWith("%\"cs-")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (s.startsWith("%\"ext-")) - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - else if (hostServices == null) - throw new PathEngineException("Unknown fixed constant type for '"+s+"'"); - else - return hostServices.resolveConstantType(context.appInfo, s); - } - - private List execute(ExecutionContext context, Base item, ExpressionNode exp, boolean atEntry) throws FHIRException { - List result = new ArrayList(); - if (atEntry && Character.isUpperCase(exp.getName().charAt(0))) {// special case for start up - if (item.isResource() && item.fhirType().equals(exp.getName())) - result.add(item); - } else - getChildrenByName(item, exp.getName(), result); - if (result.size() == 0 && atEntry && context.appInfo != null) { - Base temp = hostServices.resolveConstant(context.appInfo, exp.getName()); - if (temp != null) { - result.add(temp); - } - } - return result; - } - - private TypeDetails executeContextType(ExecutionTypeContext context, String name) throws PathEngineException, DefinitionException { - if (hostServices == null) - throw new PathEngineException("Unable to resolve context reference since no host services are provided"); - return hostServices.resolveConstantType(context.appInfo, name); - } - - private TypeDetails executeType(String type, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { - if (atEntry && Character.isUpperCase(exp.getName().charAt(0)) && hashTail(type).equals(exp.getName())) // special case for start up - return new TypeDetails(CollectionStatus.SINGLETON, type); - TypeDetails result = new TypeDetails(null); - getChildTypesByName(type, exp.getName(), result); - return result; - } - - - private String hashTail(String type) { - return type.contains("#") ? "" : type.substring(type.lastIndexOf("/")+1); - } - - - @SuppressWarnings("unchecked") - private TypeDetails evaluateFunctionType(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp) throws PathEngineException, DefinitionException { - List paramTypes = new ArrayList(); - if (exp.getFunction() == Function.Is || exp.getFunction() == Function.As) - paramTypes.add(new TypeDetails(CollectionStatus.SINGLETON, "string")); - else - for (ExpressionNode expr : exp.getParameters()) { - if (exp.getFunction() == Function.Where || exp.getFunction() == Function.Select || exp.getFunction() == Function.Repeat) - paramTypes.add(executeType(changeThis(context, focus), focus, expr, true)); - else - paramTypes.add(executeType(context, focus, expr, true)); - } - switch (exp.getFunction()) { - case Empty : - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Not : - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Exists : - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case SubsetOf : { - checkParamTypes(exp.getFunction().toCode(), paramTypes, focus); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case SupersetOf : { - checkParamTypes(exp.getFunction().toCode(), paramTypes, focus); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case IsDistinct : - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Distinct : - return focus; - case Count : - return new TypeDetails(CollectionStatus.SINGLETON, "integer"); - case Where : - return focus; - case Select : - return anything(focus.getCollectionStatus()); - case All : - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Repeat : - return anything(focus.getCollectionStatus()); - case Item : { - checkOrdered(focus, "item"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer")); - return focus; - } - case As : { - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, exp.getParameters().get(0).getName()); - } - case Is : { - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case Single : - return focus.toSingleton(); - case First : { - checkOrdered(focus, "first"); - return focus.toSingleton(); - } - case Last : { - checkOrdered(focus, "last"); - return focus.toSingleton(); - } - case Tail : { - checkOrdered(focus, "tail"); - return focus; - } - case Skip : { - checkOrdered(focus, "skip"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer")); - return focus; - } - case Take : { - checkOrdered(focus, "take"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer")); - return focus; - } - case Iif : { - TypeDetails types = new TypeDetails(null); - types.update(paramTypes.get(0)); - if (paramTypes.size() > 1) - types.update(paramTypes.get(1)); - return types; - } - case ToInteger : { - checkContextPrimitive(focus, "toInteger"); - return new TypeDetails(CollectionStatus.SINGLETON, "integer"); - } - case ToDecimal : { - checkContextPrimitive(focus, "toDecimal"); - return new TypeDetails(CollectionStatus.SINGLETON, "decimal"); - } - case ToString : { - checkContextPrimitive(focus, "toString"); - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - } - case Substring : { - checkContextString(focus, "subString"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer"), new TypeDetails(CollectionStatus.SINGLETON, "integer")); - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - } - case StartsWith : { - checkContextString(focus, "startsWith"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case EndsWith : { - checkContextString(focus, "endsWith"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case Matches : { - checkContextString(focus, "matches"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case ReplaceMatches : { - checkContextString(focus, "replaceMatches"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string"), new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - } - case Contains : { - checkContextString(focus, "contains"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case Replace : { - checkContextString(focus, "replace"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string"), new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "string"); - } - case Length : { - checkContextPrimitive(focus, "length"); - return new TypeDetails(CollectionStatus.SINGLETON, "integer"); - } - case Children : - return childTypes(focus, "*"); - case Descendants : - return childTypes(focus, "**"); - case MemberOf : { - checkContextCoded(focus, "memberOf"); - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - } - case Trace : { - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return focus; - } - case Today : - return new TypeDetails(CollectionStatus.SINGLETON, "date"); - case Now : - return new TypeDetails(CollectionStatus.SINGLETON, "dateTime"); - case Resolve : { - checkContextReference(focus, "resolve"); - return new TypeDetails(CollectionStatus.SINGLETON, "DomainResource"); - } - case Extension : { - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return new TypeDetails(CollectionStatus.SINGLETON, "Extension"); - } - case HasValue : - return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); - case Alias : - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return anything(CollectionStatus.SINGLETON); - case AliasAs : - checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); - return focus; - case Custom : { - return hostServices.checkFunction(context.appInfo, exp.getName(), paramTypes); - } - default: - break; - } - throw new Error("not Implemented yet"); - } - - - private void checkParamTypes(String funcName, List paramTypes, TypeDetails... typeSet) throws PathEngineException { - int i = 0; - for (TypeDetails pt : typeSet) { - if (i == paramTypes.size()) - return; - TypeDetails actual = paramTypes.get(i); - i++; - for (String a : actual.getTypes()) { - if (!pt.hasType(worker, a)) - throw new PathEngineException("The parameter type '"+a+"' is not legal for "+funcName+" parameter "+Integer.toString(i)+". expecting "+pt.toString()); - } - } - } - - private void checkOrdered(TypeDetails focus, String name) throws PathEngineException { - if (focus.getCollectionStatus() == CollectionStatus.UNORDERED) - throw new PathEngineException("The function '"+name+"'() can only be used on ordered collections"); - } - - private void checkContextReference(TypeDetails focus, String name) throws PathEngineException { - if (!focus.hasType(worker, "string") && !focus.hasType(worker, "uri") && !focus.hasType(worker, "Reference")) - throw new PathEngineException("The function '"+name+"'() can only be used on string, uri, Reference"); - } - - - private void checkContextCoded(TypeDetails focus, String name) throws PathEngineException { - if (!focus.hasType(worker, "string") && !focus.hasType(worker, "code") && !focus.hasType(worker, "uri") && !focus.hasType(worker, "Coding") && !focus.hasType(worker, "CodeableConcept")) - throw new PathEngineException("The function '"+name+"'() can only be used on string, code, uri, Coding, CodeableConcept"); - } - - - private void checkContextString(TypeDetails focus, String name) throws PathEngineException { - if (!focus.hasType(worker, "string") && !focus.hasType(worker, "code") && !focus.hasType(worker, "uri") && !focus.hasType(worker, "id")) - throw new PathEngineException("The function '"+name+"'() can only be used on string, uri, code, id, but found "+focus.describe()); - } - - - private void checkContextPrimitive(TypeDetails focus, String name) throws PathEngineException { - if (!focus.hasType(primitiveTypes)) - throw new PathEngineException("The function '"+name+"'() can only be used on "+primitiveTypes.toString()); - } - - - private TypeDetails childTypes(TypeDetails focus, String mask) throws PathEngineException, DefinitionException { - TypeDetails result = new TypeDetails(CollectionStatus.UNORDERED); - for (String f : focus.getTypes()) - getChildTypesByName(f, mask, result); - return result; - } - - private TypeDetails anything(CollectionStatus status) { - return new TypeDetails(status, allTypes.keySet()); - } - - // private boolean isPrimitiveType(String s) { - // return s.equals("boolean") || s.equals("integer") || s.equals("decimal") || s.equals("base64Binary") || s.equals("instant") || s.equals("string") || s.equals("uri") || s.equals("date") || s.equals("dateTime") || s.equals("time") || s.equals("code") || s.equals("oid") || s.equals("id") || s.equals("unsignedInt") || s.equals("positiveInt") || s.equals("markdown"); - // } - - private List evaluateFunction(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - switch (exp.getFunction()) { - case Empty : return funcEmpty(context, focus, exp); - case Not : return funcNot(context, focus, exp); - case Exists : return funcExists(context, focus, exp); - case SubsetOf : return funcSubsetOf(context, focus, exp); - case SupersetOf : return funcSupersetOf(context, focus, exp); - case IsDistinct : return funcIsDistinct(context, focus, exp); - case Distinct : return funcDistinct(context, focus, exp); - case Count : return funcCount(context, focus, exp); - case Where : return funcWhere(context, focus, exp); - case Select : return funcSelect(context, focus, exp); - case All : return funcAll(context, focus, exp); - case Repeat : return funcRepeat(context, focus, exp); - case Item : return funcItem(context, focus, exp); - case As : return funcAs(context, focus, exp); - case Is : return funcIs(context, focus, exp); - case Single : return funcSingle(context, focus, exp); - case First : return funcFirst(context, focus, exp); - case Last : return funcLast(context, focus, exp); - case Tail : return funcTail(context, focus, exp); - case Skip : return funcSkip(context, focus, exp); - case Take : return funcTake(context, focus, exp); - case Iif : return funcIif(context, focus, exp); - case ToInteger : return funcToInteger(context, focus, exp); - case ToDecimal : return funcToDecimal(context, focus, exp); - case ToString : return funcToString(context, focus, exp); - case Substring : return funcSubstring(context, focus, exp); - case StartsWith : return funcStartsWith(context, focus, exp); - case EndsWith : return funcEndsWith(context, focus, exp); - case Matches : return funcMatches(context, focus, exp); - case ReplaceMatches : return funcReplaceMatches(context, focus, exp); - case Contains : return funcContains(context, focus, exp); - case Replace : return funcReplace(context, focus, exp); - case Length : return funcLength(context, focus, exp); - case Children : return funcChildren(context, focus, exp); - case Descendants : return funcDescendants(context, focus, exp); - case MemberOf : return funcMemberOf(context, focus, exp); - case Trace : return funcTrace(context, focus, exp); - case Today : return funcToday(context, focus, exp); - case Now : return funcNow(context, focus, exp); - case Resolve : return funcResolve(context, focus, exp); - case Extension : return funcExtension(context, focus, exp); - case HasValue : return funcHasValue(context, focus, exp); - case AliasAs : return funcAliasAs(context, focus, exp); - case Alias : return funcAlias(context, focus, exp); - case Custom: { - List> params = new ArrayList>(); - for (ExpressionNode p : exp.getParameters()) - params.add(execute(context, focus, p, true)); - return hostServices.executeFunction(context.appInfo, exp.getName(), params); - } - default: - throw new Error("not Implemented yet"); - } - } - - private List funcAliasAs(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List nl = execute(context, focus, exp.getParameters().get(0), true); - String name = nl.get(0).primitiveValue(); - context.addAlias(name, focus); - return focus; - } - - private List funcAlias(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List nl = execute(context, focus, exp.getParameters().get(0), true); - String name = nl.get(0).primitiveValue(); - List res = new ArrayList(); - Base b = context.getAlias(name); - if (b != null) - res.add(b); - return res; - - } - - private List funcAll(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - if (exp.getParameters().size() == 1) { - List result = new ArrayList(); - List pc = new ArrayList(); - boolean all = true; - for (Base item : focus) { - pc.clear(); - pc.add(item); - if (!convertToBoolean(execute(changeThis(context, item), pc, exp.getParameters().get(0), true))) { - all = false; - break; - } - } - result.add(new BooleanType(all)); - return result; - } else {// (exp.getParameters().size() == 0) { - List result = new ArrayList(); - boolean all = true; - for (Base item : focus) { - boolean v = false; - if (item instanceof BooleanType) { - v = ((BooleanType) item).booleanValue(); - } else - v = item != null; - if (!v) { - all = false; - break; - } - } - result.add(new BooleanType(all)); - return result; - } - } - - - private ExecutionContext changeThis(ExecutionContext context, Base newThis) { - return new ExecutionContext(context.appInfo, context.resource, context.context, context.aliases, newThis); - } - - private ExecutionTypeContext changeThis(ExecutionTypeContext context, TypeDetails newThis) { - return new ExecutionTypeContext(context.appInfo, context.resource, context.context, newThis); - } - - - private List funcNow(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - result.add(DateTimeType.now()); - return result; - } - - - private List funcToday(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - result.add(new DateType(new Date(), TemporalPrecisionEnum.DAY)); - return result; - } - - - private List funcMemberOf(ExecutionContext context, List focus, ExpressionNode exp) { - throw new Error("not Implemented yet"); - } - - - private List funcDescendants(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - List current = new ArrayList(); - current.addAll(focus); - List added = new ArrayList(); - boolean more = true; - while (more) { - added.clear(); - for (Base item : current) { - getChildrenByName(item, "*", added); - } - more = !added.isEmpty(); - result.addAll(added); - current.clear(); - current.addAll(added); - } - return result; - } - - - private List funcChildren(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - for (Base b : focus) - getChildrenByName(b, "*", result); - return result; - } - - - private List funcReplace(ExecutionContext context, List focus, ExpressionNode exp) { - throw new Error("not Implemented yet"); - } - - - private List funcReplaceMatches(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); - - if (focus.size() == 1 && !Utilities.noString(sw)) - result.add(new BooleanType(convertToString(focus.get(0)).contains(sw))); - else - result.add(new BooleanType(false)); - return result; - } - - - private List funcEndsWith(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); - - if (focus.size() == 1 && !Utilities.noString(sw)) - result.add(new BooleanType(convertToString(focus.get(0)).endsWith(sw))); - else - result.add(new BooleanType(false)); - return result; - } - - - private List funcToString(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - result.add(new StringType(convertToString(focus))); - return result; - } - - - private List funcToDecimal(ExecutionContext context, List focus, ExpressionNode exp) { - String s = convertToString(focus); - List result = new ArrayList(); - if (Utilities.isDecimal(s)) - result.add(new DecimalType(s)); - return result; - } - - - private List funcIif(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List n1 = execute(context, focus, exp.getParameters().get(0), true); - Boolean v = convertToBoolean(n1); - - if (v) - return execute(context, focus, exp.getParameters().get(1), true); - else if (exp.getParameters().size() < 3) - return new ArrayList(); - else - return execute(context, focus, exp.getParameters().get(2), true); - } - - - private List funcTake(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List n1 = execute(context, focus, exp.getParameters().get(0), true); - int i1 = Integer.parseInt(n1.get(0).primitiveValue()); - - List result = new ArrayList(); - for (int i = 0; i < Math.min(focus.size(), i1); i++) - result.add(focus.get(i)); - return result; - } - - - private List funcSingle(ExecutionContext context, List focus, ExpressionNode exp) throws PathEngineException { - if (focus.size() == 1) - return focus; - throw new PathEngineException(String.format("Single() : checking for 1 item but found %d items", focus.size())); - } - - - private List funcIs(ExecutionContext context, List focus, ExpressionNode exp) throws PathEngineException { - List result = new ArrayList(); - if (focus.size() == 0 || focus.size() > 1) - result.add(new BooleanType(false)); - else { - String tn = exp.getParameters().get(0).getName(); - result.add(new BooleanType(focus.get(0).hasType(tn))); - } - return result; - } - - - private List funcAs(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - String tn = exp.getParameters().get(0).getName(); - for (Base b : focus) - if (b.hasType(tn)) - result.add(b); - return result; - } - - - private List funcRepeat(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - List current = new ArrayList(); - current.addAll(focus); - List added = new ArrayList(); - boolean more = true; - while (more) { - added.clear(); - List pc = new ArrayList(); - for (Base item : current) { - pc.clear(); - pc.add(item); - added.addAll(execute(changeThis(context, item), pc, exp.getParameters().get(0), false)); - } - more = !added.isEmpty(); - result.addAll(added); - current.clear(); - current.addAll(added); - } - return result; - } - - - - private List funcIsDistinct(ExecutionContext context, List focus, ExpressionNode exp) { - if (focus.size() <= 1) - return makeBoolean(true); - - boolean distinct = true; - for (int i = 0; i < focus.size(); i++) { - for (int j = i+1; j < focus.size(); j++) { - if (doEquals(focus.get(j), focus.get(i))) { - distinct = false; - break; - } - } - } - return makeBoolean(distinct); - } - - - private List funcSupersetOf(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List target = execute(context, focus, exp.getParameters().get(0), true); - - boolean valid = true; - for (Base item : target) { - boolean found = false; - for (Base t : focus) { - if (Base.compareDeep(item, t, false)) { - found = true; - break; - } - } - if (!found) { - valid = false; - break; - } - } - List result = new ArrayList(); - result.add(new BooleanType(valid)); - return result; - } - - - private List funcSubsetOf(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List target = execute(context, focus, exp.getParameters().get(0), true); - - boolean valid = true; - for (Base item : focus) { - boolean found = false; - for (Base t : target) { - if (Base.compareDeep(item, t, false)) { - found = true; - break; - } - } - if (!found) { - valid = false; - break; - } - } - List result = new ArrayList(); - result.add(new BooleanType(valid)); - return result; - } - - - private List funcExists(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - result.add(new BooleanType(!ElementUtil.isEmpty(focus))); - return result; - } - - - private List funcResolve(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - for (Base item : focus) { - if (hostServices != null) { - String s = convertToString(item); - if (item.fhirType().equals("Reference")) { - Property p = item.getChildByName("reference"); - if (p != null && p.hasValues()) - s = convertToString(p.getValues().get(0)); - else - s = null; // a reference without any valid actual reference (just identifier or display, but we can't resolve it) - } - if (s != null) { - Base res = null; - if (s.startsWith("#")) { - String id = s.substring(1); - Property p = context.resource.getChildByName("contained"); - for (Base c : p.getValues()) { - if (id.equals(c.getIdBase())) { - res = c; - break; - } - } - } else - res = hostServices.resolveReference(context.appInfo, s); - if (res != null) - result.add(res); - } - } - } - return result; - } - - private List funcExtension(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - List nl = execute(context, focus, exp.getParameters().get(0), true); - String url = nl.get(0).primitiveValue(); - - for (Base item : focus) { - List ext = new ArrayList(); - getChildrenByName(item, "extension", ext); - getChildrenByName(item, "modifierExtension", ext); - for (Base ex : ext) { - List vl = new ArrayList(); - getChildrenByName(ex, "url", vl); - if (convertToString(vl).equals(url)) - result.add(ex); - } - } - return result; - } - - private List funcTrace(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List nl = execute(context, focus, exp.getParameters().get(0), true); - String name = nl.get(0).primitiveValue(); - - log(name, focus); - return focus; - } - - private List funcDistinct(ExecutionContext context, List focus, ExpressionNode exp) { - if (focus.size() <= 1) - return focus; - - List result = new ArrayList(); - for (int i = 0; i < focus.size(); i++) { - boolean found = false; - for (int j = i+1; j < focus.size(); j++) { - if (doEquals(focus.get(j), focus.get(i))) { - found = true; - break; - } - } - if (!found) - result.add(focus.get(i)); - } - return result; - } - - private List funcMatches(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); - - if (focus.size() == 1 && !Utilities.noString(sw)) { - String st = convertToString(focus.get(0)); - if (Utilities.noString(st)) - result.add(new BooleanType(false)); - else - result.add(new BooleanType(st.matches(sw))); - } else - result.add(new BooleanType(false)); - return result; - } - - private List funcContains(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); - - if (focus.size() == 1 && !Utilities.noString(sw)) { - String st = convertToString(focus.get(0)); - if (Utilities.noString(st)) - result.add(new BooleanType(false)); - else - result.add(new BooleanType(st.contains(sw))); - } else - result.add(new BooleanType(false)); - return result; - } - - private List funcLength(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - if (focus.size() == 1) { - String s = convertToString(focus.get(0)); - result.add(new IntegerType(s.length())); - } - return result; - } - - private List funcHasValue(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - if (focus.size() == 1) { - String s = convertToString(focus.get(0)); - result.add(new BooleanType(!Utilities.noString(s))); - } - return result; - } - - private List funcStartsWith(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); - - if (focus.size() == 1 && !Utilities.noString(sw)) - result.add(new BooleanType(convertToString(focus.get(0)).startsWith(sw))); - else - result.add(new BooleanType(false)); - return result; - } - - private List funcSubstring(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - List n1 = execute(context, focus, exp.getParameters().get(0), true); - int i1 = Integer.parseInt(n1.get(0).primitiveValue()); - int i2 = -1; - if (exp.parameterCount() == 2) { - List n2 = execute(context, focus, exp.getParameters().get(1), true); - i2 = Integer.parseInt(n2.get(0).primitiveValue()); - } - - if (focus.size() == 1) { - String sw = convertToString(focus.get(0)); - String s; - if (i1 < 0 || i1 >= sw.length()) - return new ArrayList(); - if (exp.parameterCount() == 2) - s = sw.substring(i1, Math.min(sw.length(), i1+i2)); - else - s = sw.substring(i1); - if (!Utilities.noString(s)) - result.add(new StringType(s)); - } - return result; - } - - private List funcToInteger(ExecutionContext context, List focus, ExpressionNode exp) { - String s = convertToString(focus); - List result = new ArrayList(); - if (Utilities.isInteger(s)) - result.add(new IntegerType(s)); - return result; - } - - private List funcCount(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - result.add(new IntegerType(focus.size())); - return result; - } - - private List funcSkip(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List n1 = execute(context, focus, exp.getParameters().get(0), true); - int i1 = Integer.parseInt(n1.get(0).primitiveValue()); - - List result = new ArrayList(); - for (int i = i1; i < focus.size(); i++) - result.add(focus.get(i)); - return result; - } - - private List funcTail(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - for (int i = 1; i < focus.size(); i++) - result.add(focus.get(i)); - return result; - } - - private List funcLast(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - if (focus.size() > 0) - result.add(focus.get(focus.size()-1)); - return result; - } - - private List funcFirst(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - if (focus.size() > 0) - result.add(focus.get(0)); - return result; - } - - - private List funcWhere(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - List pc = new ArrayList(); - for (Base item : focus) { - pc.clear(); - pc.add(item); - if (convertToBoolean(execute(changeThis(context, item), pc, exp.getParameters().get(0), true))) - result.add(item); - } - return result; - } - - private List funcSelect(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - List pc = new ArrayList(); - for (Base item : focus) { - pc.clear(); - pc.add(item); - result.addAll(execute(changeThis(context, item), pc, exp.getParameters().get(0), true)); - } - return result; - } - - - private List funcItem(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { - List result = new ArrayList(); - String s = convertToString(execute(context, focus, exp.getParameters().get(0), true)); - if (Utilities.isInteger(s) && Integer.parseInt(s) < focus.size()) - result.add(focus.get(Integer.parseInt(s))); - return result; - } - - private List funcEmpty(ExecutionContext context, List focus, ExpressionNode exp) { - List result = new ArrayList(); - result.add(new BooleanType(ElementUtil.isEmpty(focus))); - return result; - } - - private List funcNot(ExecutionContext context, List focus, ExpressionNode exp) { - return makeBoolean(!convertToBoolean(focus)); - } - - public class ElementDefinitionMatch { - private ElementDefinition definition; - private String fixedType; - public ElementDefinitionMatch(ElementDefinition definition, String fixedType) { - super(); - this.definition = definition; - this.fixedType = fixedType; - } - public ElementDefinition getDefinition() { - return definition; - } - public String getFixedType() { - return fixedType; - } - - } - - private void getChildTypesByName(String type, String name, TypeDetails result) throws PathEngineException, DefinitionException { - if (Utilities.noString(type)) - throw new PathEngineException("No type provided in BuildToolPathEvaluator.getChildTypesByName"); - if (type.equals("http://hl7.org/fhir/StructureDefinition/xhtml")) - return; - String url = null; - if (type.contains("#")) { - url = type.substring(0, type.indexOf("#")); - } else { - url = type; - } - String tail = ""; - StructureDefinition sd = worker.fetchResource(StructureDefinition.class, url); - if (sd == null) - throw new DefinitionException("Unknown type "+type); // this really is an error, because we can only get to here if the internal infrastrucgture is wrong - List sdl = new ArrayList(); - ElementDefinitionMatch m = null; - if (type.contains("#")) - m = getElementDefinition(sd, type.substring(type.indexOf("#")+1), false); - if (m != null && hasDataType(m.definition)) { - if (m.fixedType != null) - { - StructureDefinition dt = worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+m.fixedType); - if (dt == null) - throw new DefinitionException("unknown data type "+m.fixedType); - sdl.add(dt); - } else - for (TypeRefComponent t : m.definition.getType()) { - StructureDefinition dt = worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+t.getCode()); - if (dt == null) - throw new DefinitionException("unknown data type "+t.getCode()); - sdl.add(dt); - } - } else { - sdl.add(sd); - if (type.contains("#")) { - tail = type.substring(type.indexOf("#")+1); - tail = tail.substring(tail.indexOf(".")); - } - } - - for (StructureDefinition sdi : sdl) { - String path = sdi.getSnapshot().getElement().get(0).getPath()+tail+"."; - if (name.equals("**")) { - assert(result.getCollectionStatus() == CollectionStatus.UNORDERED); - for (ElementDefinition ed : sdi.getSnapshot().getElement()) { - if (ed.getPath().startsWith(path)) - for (TypeRefComponent t : ed.getType()) { - if (t.hasCode() && t.getCodeElement().hasValue()) { - String tn = null; - if (t.getCode().equals("Element") || t.getCode().equals("BackboneElement")) - tn = sdi.getType()+"#"+ed.getPath(); - else - tn = t.getCode(); - if (t.getCode().equals("Resource")) { - for (String rn : worker.getResourceNames()) { - if (!result.hasType(worker, rn)) { - getChildTypesByName(result.addType(rn), "**", result); - } - } - } else if (!result.hasType(worker, tn)) { - getChildTypesByName(result.addType(tn), "**", result); - } - } - } - } - } else if (name.equals("*")) { - assert(result.getCollectionStatus() == CollectionStatus.UNORDERED); - for (ElementDefinition ed : sdi.getSnapshot().getElement()) { - if (ed.getPath().startsWith(path) && !ed.getPath().substring(path.length()).contains(".")) - for (TypeRefComponent t : ed.getType()) { - if (t.getCode().equals("Element") || t.getCode().equals("BackboneElement")) - result.addType(sdi.getType()+"#"+ed.getPath()); - else if (t.getCode().equals("Resource")) - result.addTypes(worker.getResourceNames()); - else - result.addType(t.getCode()); - } - } - } else { - path = sdi.getSnapshot().getElement().get(0).getPath()+tail+"."+name; - - ElementDefinitionMatch ed = getElementDefinition(sdi, path, false); - if (ed != null) { - if (!Utilities.noString(ed.getFixedType())) - result.addType(ed.getFixedType()); - else - for (TypeRefComponent t : ed.getDefinition().getType()) { - if (Utilities.noString(t.getCode())) - break; // throw new PathEngineException("Illegal reference to primitive value attribute @ "+path); - - ProfiledType pt = null; - if (t.getCode().equals("Element") || t.getCode().equals("BackboneElement")) - pt = new ProfiledType(sdi.getUrl()+"#"+path); - else if (t.getCode().equals("Resource")) - result.addTypes(worker.getResourceNames()); - else - pt = new ProfiledType(t.getCode()); - if (pt != null) { - if (t.hasProfile()) - pt.addProfile(t.getProfile()); - if (ed.getDefinition().hasBinding()) - pt.addBinding(ed.getDefinition().getBinding()); - result.addType(pt); - } - } - } - } - } - } - - private ElementDefinitionMatch getElementDefinition(StructureDefinition sd, String path, boolean allowTypedName) throws PathEngineException { - for (ElementDefinition ed : sd.getSnapshot().getElement()) { - if (ed.getPath().equals(path)) { - if (ed.hasContentReference()) { - return getElementDefinitionById(sd, ed.getContentReference()); - } else - return new ElementDefinitionMatch(ed, null); - } - if (ed.getPath().endsWith("[x]") && path.startsWith(ed.getPath().substring(0, ed.getPath().length()-3)) && path.length() == ed.getPath().length()-3) - return new ElementDefinitionMatch(ed, null); - if (allowTypedName && ed.getPath().endsWith("[x]") && path.startsWith(ed.getPath().substring(0, ed.getPath().length()-3)) && path.length() > ed.getPath().length()-3) { - String s = Utilities.uncapitalize(path.substring(ed.getPath().length()-3)); - if (primitiveTypes.contains(s)) - return new ElementDefinitionMatch(ed, s); - else - return new ElementDefinitionMatch(ed, path.substring(ed.getPath().length()-3)); - } - if (ed.getPath().contains(".") && path.startsWith(ed.getPath()+".") && (ed.getType().size() > 0) && !isAbstractType(ed.getType())) { - // now we walk into the type. - if (ed.getType().size() > 1) // if there's more than one type, the test above would fail this - throw new PathEngineException("Internal typing issue...."); - StructureDefinition nsd = worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+ed.getType().get(0).getCode()); - if (nsd == null) - throw new PathEngineException("Unknown type "+ed.getType().get(0).getCode()); - return getElementDefinition(nsd, nsd.getId()+path.substring(ed.getPath().length()), allowTypedName); - } - if (ed.hasContentReference() && path.startsWith(ed.getPath()+".")) { - ElementDefinitionMatch m = getElementDefinitionById(sd, ed.getContentReference()); - return getElementDefinition(sd, m.definition.getPath()+path.substring(ed.getPath().length()), allowTypedName); - } - } - return null; - } - - private boolean isAbstractType(List list) { - return list.size() != 1 ? true : Utilities.existsInList(list.get(0).getCode(), "Element", "BackboneElement", "Resource", "DomainResource"); -} - - - private boolean hasType(ElementDefinition ed, String s) { - for (TypeRefComponent t : ed.getType()) - if (s.equalsIgnoreCase(t.getCode())) - return true; - return false; - } - - private boolean hasDataType(ElementDefinition ed) { - return ed.hasType() && !(ed.getType().get(0).getCode().equals("Element") || ed.getType().get(0).getCode().equals("BackboneElement")); - } - - private ElementDefinitionMatch getElementDefinitionById(StructureDefinition sd, String ref) { - for (ElementDefinition ed : sd.getSnapshot().getElement()) { - if (ref.equals("#"+ed.getId())) - return new ElementDefinitionMatch(ed, null); - } - return null; - } - - - public boolean hasLog() { - return log != null && log.length() > 0; - } - - - public String takeLog() { - if (!hasLog()) - return ""; - String s = log.toString(); - log = new StringBuilder(); - return s; - } - - - /** given an element definition in a profile, what element contains the differentiating fixed - * for the element, given the differentiating expresssion. The expression is only allowed to - * use a subset of FHIRPath - * - * @param profile - * @param element - * @return - * @throws PathEngineException - * @throws DefinitionException - */ - public ElementDefinition evaluateDefinition(ExpressionNode expr, StructureDefinition profile, ElementDefinition element) throws DefinitionException { - StructureDefinition sd = profile; - ElementDefinition focus = null; - - if (expr.getKind() == Kind.Name) { - List childDefinitions; - childDefinitions = ProfileUtilities.getChildMap(sd, element); - // if that's empty, get the children of the type - if (childDefinitions.isEmpty()) { - sd = fetchStructureByType(element); - if (sd == null) - throw new DefinitionException("Problem with use of resolve() - profile '"+element.getType().get(0).getProfile()+"' on "+element.getId()+" could not be resolved"); - childDefinitions = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElementFirstRep()); - } - for (ElementDefinition t : childDefinitions) { - if (tailMatches(t, expr.getName())) { - focus = t; - break; - } - } - } else if (expr.getKind() == Kind.Function) { - if ("resolve".equals(expr.getName())) { - if (!element.hasType()) - throw new DefinitionException("illegal use of resolve() in discriminator - no type on element "+element.getId()); - if (element.getType().size() > 1) - throw new DefinitionException("illegal use of resolve() in discriminator - Multiple possible types on "+element.getId()); - if (!"Reference".equals(element.getType().get(0).getCode())) - throw new DefinitionException("illegal use of resolve() in discriminator - type on "+element.getId()+" is not Reference ("+element.getType().get(0).getCode()+")"); - sd = worker.fetchResource(StructureDefinition.class, element.getType().get(0).getTargetProfile()); - if (sd == null) - throw new DefinitionException("Problem with use of resolve() - profile '"+element.getType().get(0).getTargetProfile()+"' on "+element.getId()+" could not be resolved"); - focus = sd.getSnapshot().getElementFirstRep(); - } else if ("extension".equals(expr.getName())) - throw new DefinitionException("Not supported yet"); - else - throw new DefinitionException("illegal function name "+expr.getName()+"() in discriminator"); - } else if (expr.getKind() == Kind.Group) { - throw new DefinitionException("illegal expression syntax in discriminator (group)"); - } else if (expr.getKind() == Kind.Constant) { - throw new DefinitionException("illegal expression syntax in discriminator (const)"); - } - - if (focus == null) - throw new DefinitionException("Unable to resolve discriminator"); - else if (expr.getInner() == null) - return focus; - else - return evaluateDefinition(expr.getInner(), sd, focus); - } - - private StructureDefinition fetchStructureByType(ElementDefinition ed) throws DefinitionException { - if (ed.getType().size() == 0) - throw new DefinitionException("Error in discriminator at "+ed.getId()+": no children, no type"); - if (ed.getType().size() > 1) - throw new DefinitionException("Error in discriminator at "+ed.getId()+": no children, multiple types"); - if (ed.hasSlicing()) - throw new DefinitionException("Error in discriminator at "+ed.getId()+": slicing found"); - if (ed.getType().get(0).hasProfile()) - return worker.fetchResource(StructureDefinition.class, ed.getType().get(0).getProfile()); - else - return worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + ed.getType().get(0).getCode()); - } - - - private boolean tailMatches(ElementDefinition t, String d) { - String tail = tailDot(t.getPath()); - if (d.contains("[")) - return tail.startsWith(d.substring(0, d.indexOf('['))); - else - return tail.equals(d); - } - - private String tailDot(String path) { - return path.substring(path.lastIndexOf(".") + 1); - } - -} +package org.hl7.fhir.r4.utils; + +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.util.ElementUtil; +import org.fhir.ucum.Decimal; +import org.fhir.ucum.UcumException; +import org.hl7.fhir.exceptions.DefinitionException; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.exceptions.PathEngineException; +import org.hl7.fhir.r4.conformance.ProfileUtilities; +import org.hl7.fhir.r4.context.IWorkerContext; +import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent; +import org.hl7.fhir.r4.model.ExpressionNode.*; +import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; +import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; +import org.hl7.fhir.r4.model.TypeDetails.ProfiledType; +import org.hl7.fhir.r4.utils.FHIRLexer.FHIRLexerException; +import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext.FunctionDetails; +import org.hl7.fhir.utilities.Utilities; + +import java.math.BigDecimal; +import java.util.*; + +/** + * + * @author Grahame Grieve + * + */ +public class FHIRPathEngine { + private IWorkerContext worker; + private IEvaluationContext hostServices; + private StringBuilder log = new StringBuilder(); + private Set primitiveTypes = new HashSet(); + private Map allTypes = new HashMap(); + + /** + * @param worker - used when validating paths (@check), and used doing value set membership when executing tests (once that's defined) + */ + public FHIRPathEngine(IWorkerContext worker) { + super(); + this.worker = worker; + for (StructureDefinition sd : worker.allStructures()) { + if (sd.getDerivation() == TypeDerivationRule.SPECIALIZATION && sd.getKind() != StructureDefinitionKind.LOGICAL) + allTypes.put(sd.getName(), sd); + if (sd.getDerivation() == TypeDerivationRule.SPECIALIZATION && sd.getKind() == StructureDefinitionKind.PRIMITIVETYPE) { + primitiveTypes.add(sd.getName()); + } + } + } + + private TypeDetails anything(CollectionStatus status) { + return new TypeDetails(status, allTypes.keySet()); + } + + + // --- 3 methods to override in children ------------------------------------------------------- + // if you don't override, it falls through to the using the base reference implementation + // HAPI overrides to these to support extending the base model + + private ExecutionContext changeThis(ExecutionContext context, Base newThis) { + return new ExecutionContext(context.appInfo, context.resource, context.context, context.aliases, newThis); + } + + private ExecutionTypeContext changeThis(ExecutionTypeContext context, TypeDetails newThis) { + return new ExecutionTypeContext(context.appInfo, context.resource, context.context, newThis); + } + + /** + * check that paths referred to in the ExpressionNode are valid + * + * xPathStartsWithValueRef is a hack work around for the fact that FHIR Path sometimes needs a different starting point than the xpath + * + * returns a list of the possible types that might be returned by executing the ExpressionNode against a particular context + * + * @param context - the logical type against which this path is applied + * @param path - the FHIR Path statement to check + * @throws DefinitionException + * @throws PathEngineException + * @if the path is not valid + */ + public TypeDetails check(Object appContext, String resourceType, String context, ExpressionNode expr) throws FHIRLexerException, PathEngineException, DefinitionException { + // if context is a path that refers to a type, do that conversion now + TypeDetails types; + if (context == null) { + types = null; // this is a special case; the first path reference will have to resolve to something in the context + } else if (!context.contains(".")) { + StructureDefinition sd = worker.fetchResource(StructureDefinition.class, context); + types = new TypeDetails(CollectionStatus.SINGLETON, sd.getUrl()); + } else { + String ctxt = context.substring(0, context.indexOf('.')); + if (Utilities.isAbsoluteUrl(resourceType)) { + ctxt = resourceType.substring(0, resourceType.lastIndexOf("/")+1)+ctxt; + } + StructureDefinition sd = worker.fetchResource(StructureDefinition.class, ctxt); + if (sd == null) + throw new PathEngineException("Unknown context "+context); + ElementDefinitionMatch ed = getElementDefinition(sd, context, true); + if (ed == null) + throw new PathEngineException("Unknown context element "+context); + if (ed.fixedType != null) + types = new TypeDetails(CollectionStatus.SINGLETON, ed.fixedType); + else if (ed.getDefinition().getType().isEmpty() || isAbstractType(ed.getDefinition().getType())) + types = new TypeDetails(CollectionStatus.SINGLETON, ctxt+"#"+context); + else { + types = new TypeDetails(CollectionStatus.SINGLETON); + for (TypeRefComponent t : ed.getDefinition().getType()) + types.addType(t.getCode()); + } + } + + return executeType(new ExecutionTypeContext(appContext, resourceType, context, types), types, expr, true); + } + + // --- public API ------------------------------------------------------- + + public TypeDetails check(Object appContext, StructureDefinition sd, String context, ExpressionNode expr) throws FHIRLexerException, PathEngineException, DefinitionException { + // if context is a path that refers to a type, do that conversion now + TypeDetails types; + if (!context.contains(".")) { + types = new TypeDetails(CollectionStatus.SINGLETON, sd.getUrl()); + } else { + ElementDefinitionMatch ed = getElementDefinition(sd, context, true); + if (ed == null) + throw new PathEngineException("Unknown context element "+context); + if (ed.fixedType != null) + types = new TypeDetails(CollectionStatus.SINGLETON, ed.fixedType); + else if (ed.getDefinition().getType().isEmpty() || isAbstractType(ed.getDefinition().getType())) + types = new TypeDetails(CollectionStatus.SINGLETON, sd.getUrl()+"#"+context); + else { + types = new TypeDetails(CollectionStatus.SINGLETON); + for (TypeRefComponent t : ed.getDefinition().getType()) + types.addType(t.getCode()); + } + } + + return executeType(new ExecutionTypeContext(appContext, sd.getUrl(), context, types), types, expr, true); + } + + public TypeDetails check(Object appContext, StructureDefinition sd, ExpressionNode expr) throws FHIRLexerException, PathEngineException, DefinitionException { + // if context is a path that refers to a type, do that conversion now + TypeDetails types = null; // this is a special case; the first path reference will have to resolve to something in the context + return executeType(new ExecutionTypeContext(appContext, sd == null ? null : sd.getUrl(), null, types), types, expr, true); + } + + public TypeDetails check(Object appContext, String resourceType, String context, String expr) throws FHIRLexerException, PathEngineException, DefinitionException { + return check(appContext, resourceType, context, parse(expr)); + } + + private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { + if (s.startsWith("\'") && s.endsWith("\'")) { + int i = 1; + while (i < s.length()-1) { + char ch = s.charAt(i); + if (ch == '\\') { + switch (ch) { + case 't': + case 'r': + case 'n': + case 'f': + case '\'': + case '\\': + case '/': + i++; + break; + case 'u': + if (!Utilities.isHex("0x"+s.substring(i, i+4))) + throw lexer.error("Improper unicode escape \\u"+s.substring(i, i+4)); + break; + default: + throw lexer.error("Unknown character escape \\"+ch); + } + } else + i++; + } + } + } + + private void checkContextCoded(TypeDetails focus, String name) throws PathEngineException { + if (!focus.hasType(worker, "string") && !focus.hasType(worker, "code") && !focus.hasType(worker, "uri") && !focus.hasType(worker, "Coding") && !focus.hasType(worker, "CodeableConcept")) + throw new PathEngineException("The function '"+name+"'() can only be used on string, code, uri, Coding, CodeableConcept"); + } + + private void checkContextPrimitive(TypeDetails focus, String name) throws PathEngineException { + if (!focus.hasType(primitiveTypes)) + throw new PathEngineException("The function '"+name+"'() can only be used on "+primitiveTypes.toString()); + } + + private void checkContextReference(TypeDetails focus, String name) throws PathEngineException { + if (!focus.hasType(worker, "string") && !focus.hasType(worker, "uri") && !focus.hasType(worker, "Reference")) + throw new PathEngineException("The function '"+name+"'() can only be used on string, uri, Reference"); + } + + private void checkContextString(TypeDetails focus, String name) throws PathEngineException { + if (!focus.hasType(worker, "string") && !focus.hasType(worker, "code") && !focus.hasType(worker, "uri") && !focus.hasType(worker, "id")) + throw new PathEngineException("The function '"+name+"'() can only be used on string, uri, code, id, but found "+focus.describe()); + } + + private void checkOrdered(TypeDetails focus, String name) throws PathEngineException { + if (focus.getCollectionStatus() == CollectionStatus.UNORDERED) + throw new PathEngineException("The function '"+name+"'() can only be used on ordered collections"); + } + + private boolean checkParamCount(FHIRLexer lexer, SourceLocation location, ExpressionNode exp, int count) throws FHIRLexerException { + if (exp.getParameters().size() != count) + throw lexer.error("The function \""+exp.getName()+"\" requires "+Integer.toString(count)+" parameters", location.toString()); + return true; + } + + private boolean checkParamCount(FHIRLexer lexer, SourceLocation location, ExpressionNode exp, int countMin, int countMax) throws FHIRLexerException { + if (exp.getParameters().size() < countMin || exp.getParameters().size() > countMax) + throw lexer.error("The function \""+exp.getName()+"\" requires between "+Integer.toString(countMin)+" and "+Integer.toString(countMax)+" parameters", location.toString()); + return true; + } + + private void checkParamTypes(String funcName, List paramTypes, TypeDetails... typeSet) throws PathEngineException { + int i = 0; + for (TypeDetails pt : typeSet) { + if (i == paramTypes.size()) + return; + TypeDetails actual = paramTypes.get(i); + i++; + for (String a : actual.getTypes()) { + if (!pt.hasType(worker, a)) + throw new PathEngineException("The parameter type '"+a+"' is not legal for "+funcName+" parameter "+Integer.toString(i)+". expecting "+pt.toString()); + } + } + } + + private boolean checkParameters(FHIRLexer lexer, SourceLocation location, ExpressionNode exp, FunctionDetails details) throws FHIRLexerException { + switch (exp.getFunction()) { + case Empty: return checkParamCount(lexer, location, exp, 0); + case Not: return checkParamCount(lexer, location, exp, 0); + case Exists: return checkParamCount(lexer, location, exp, 0); + case SubsetOf: return checkParamCount(lexer, location, exp, 1); + case SupersetOf: return checkParamCount(lexer, location, exp, 1); + case IsDistinct: return checkParamCount(lexer, location, exp, 0); + case Distinct: return checkParamCount(lexer, location, exp, 0); + case Count: return checkParamCount(lexer, location, exp, 0); + case Where: return checkParamCount(lexer, location, exp, 1); + case Select: return checkParamCount(lexer, location, exp, 1); + case All: return checkParamCount(lexer, location, exp, 0, 1); + case Repeat: return checkParamCount(lexer, location, exp, 1); + case Item: return checkParamCount(lexer, location, exp, 1); + case As: return checkParamCount(lexer, location, exp, 1); + case Is: return checkParamCount(lexer, location, exp, 1); + case Single: return checkParamCount(lexer, location, exp, 0); + case First: return checkParamCount(lexer, location, exp, 0); + case Last: return checkParamCount(lexer, location, exp, 0); + case Tail: return checkParamCount(lexer, location, exp, 0); + case Skip: return checkParamCount(lexer, location, exp, 1); + case Take: return checkParamCount(lexer, location, exp, 1); + case Iif: return checkParamCount(lexer, location, exp, 2,3); + case ToInteger: return checkParamCount(lexer, location, exp, 0); + case ToDecimal: return checkParamCount(lexer, location, exp, 0); + case ToString: return checkParamCount(lexer, location, exp, 0); + case Substring: return checkParamCount(lexer, location, exp, 1, 2); + case StartsWith: return checkParamCount(lexer, location, exp, 1); + case EndsWith: return checkParamCount(lexer, location, exp, 1); + case Matches: return checkParamCount(lexer, location, exp, 1); + case ReplaceMatches: return checkParamCount(lexer, location, exp, 2); + case Contains: return checkParamCount(lexer, location, exp, 1); + case Replace: return checkParamCount(lexer, location, exp, 2); + case Length: return checkParamCount(lexer, location, exp, 0); + case Children: return checkParamCount(lexer, location, exp, 0); + case Descendants: return checkParamCount(lexer, location, exp, 0); + case MemberOf: return checkParamCount(lexer, location, exp, 1); + case Trace: return checkParamCount(lexer, location, exp, 1); + case Today: return checkParamCount(lexer, location, exp, 0); + case Now: return checkParamCount(lexer, location, exp, 0); + case Resolve: return checkParamCount(lexer, location, exp, 0); + case Extension: return checkParamCount(lexer, location, exp, 1); + case HasValue: return checkParamCount(lexer, location, exp, 0); + case Alias: return checkParamCount(lexer, location, exp, 1); + case AliasAs: return checkParamCount(lexer, location, exp, 1); + case Custom: return checkParamCount(lexer, location, exp, details.getMinParameters(), details.getMaxParameters()); + } + return false; + } + + private TypeDetails childTypes(TypeDetails focus, String mask) throws PathEngineException, DefinitionException { + TypeDetails result = new TypeDetails(CollectionStatus.UNORDERED); + for (String f : focus.getTypes()) + getChildTypesByName(f, mask, result); + return result; + } + + /** + * worker routine for converting a set of objects to a boolean representation (for invariants) + * + * @param items - result from @evaluate + * @return + */ + public boolean convertToBoolean(List items) { + if (items == null) + return false; + else if (items.size() == 1 && items.get(0) instanceof BooleanType) + return ((BooleanType) items.get(0)).getValue(); + else + return items.size() > 0; + } + + /** + * worker routine for converting a set of objects to a string representation + * + * @param items - result from @evaluate + * @return + */ + public String convertToString(List items) { + StringBuilder b = new StringBuilder(); + boolean first = true; + for (Base item : items) { + if (first) + first = false; + else + b.append(','); + + b.append(convertToString(item)); + } + return b.toString(); + } + + private String convertToString(Base item) { + if (item.isPrimitive()) + return item.primitiveValue(); + else + return item.toString(); + } + + private boolean doContains(List list, Base item) { + for (Base test : list) + if (doEquals(test, item)) + return true; + return false; + } + + private boolean doEquals(Base left, Base right) { + if (left.isPrimitive() && right.isPrimitive()) + return Base.equals(left.primitiveValue(), right.primitiveValue()); + else + return Base.compareDeep(left, right, false); + } + + private boolean doEquivalent(Base left, Base right) throws PathEngineException { + if (left.hasType("integer") && right.hasType("integer")) + return doEquals(left, right); + if (left.hasType("boolean") && right.hasType("boolean")) + return doEquals(left, right); + if (left.hasType("integer", "decimal", "unsignedInt", "positiveInt") && right.hasType("integer", "decimal", "unsignedInt", "positiveInt")) + return Utilities.equivalentNumber(left.primitiveValue(), right.primitiveValue()); + if (left.hasType("date", "dateTime", "time", "instant") && right.hasType("date", "dateTime", "time", "instant")) + return Utilities.equivalentNumber(left.primitiveValue(), right.primitiveValue()); + if (left.hasType("string", "id", "code", "uri") && right.hasType("string", "id", "code", "uri")) + return Utilities.equivalent(convertToString(left), convertToString(right)); + + throw new PathEngineException(String.format("Unable to determine equivalence between %s and %s", left.fhirType(), right.fhirType())); + } + + /** + * evaluate a path and return the matching elements + * + * @param base - the object against which the path is being evaluated + * @param ExpressionNode - the parsed ExpressionNode statement to use + * @return + * @throws FHIRException + * @ + */ + public List evaluate(Base base, ExpressionNode ExpressionNode) throws FHIRException { + List list = new ArrayList(); + if (base != null) + list.add(base); + log = new StringBuilder(); + return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base, null, base), list, ExpressionNode, true); + } + + /** + * evaluate a path and return the matching elements + * + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public List evaluate(Base base, String path) throws FHIRException { + ExpressionNode exp = parse(path); + List list = new ArrayList(); + if (base != null) + list.add(base); + log = new StringBuilder(); + return execute(new ExecutionContext(null, base.isResource() ? base : null, base, null, base), list, exp, true); + } + + /** + * evaluate a path and return the matching elements + * + * @param base - the object against which the path is being evaluated + * @param ExpressionNode - the parsed ExpressionNode statement to use + * @return + * @throws FHIRException + * @ + */ + public List evaluate(Object appContext, Resource resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { + List list = new ArrayList(); + if (base != null) + list.add(base); + log = new StringBuilder(); + return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); + } + + /** + * evaluate a path and return the matching elements + * + * @param base - the object against which the path is being evaluated + * @param ExpressionNode - the parsed ExpressionNode statement to use + * @return + * @throws FHIRException + * @ + */ + public List evaluate(Object appContext, Base resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { + List list = new ArrayList(); + if (base != null) + list.add(base); + log = new StringBuilder(); + return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); + } + + /** + * evaluate a path and return the matching elements + * + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public List evaluate(Object appContext, Resource resource, Base base, String path) throws FHIRException { + ExpressionNode exp = parse(path); + List list = new ArrayList(); + if (base != null) + list.add(base); + log = new StringBuilder(); + return execute(new ExecutionContext(appContext, resource, base, null, base), list, exp, true); + } + + /** given an element definition in a profile, what element contains the differentiating fixed + * for the element, given the differentiating expresssion. The expression is only allowed to + * use a subset of FHIRPath + * + * @param profile + * @param element + * @return + * @throws PathEngineException + * @throws DefinitionException + */ + public ElementDefinition evaluateDefinition(ExpressionNode expr, StructureDefinition profile, ElementDefinition element) throws DefinitionException { + StructureDefinition sd = profile; + ElementDefinition focus = null; + + if (expr.getKind() == Kind.Name) { + List childDefinitions; + childDefinitions = ProfileUtilities.getChildMap(sd, element); + // if that's empty, get the children of the type + if (childDefinitions.isEmpty()) { + sd = fetchStructureByType(element); + if (sd == null) + throw new DefinitionException("Problem with use of resolve() - profile '"+element.getType().get(0).getProfile()+"' on "+element.getId()+" could not be resolved"); + childDefinitions = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElementFirstRep()); + } + for (ElementDefinition t : childDefinitions) { + if (tailMatches(t, expr.getName())) { + focus = t; + break; + } + } + } else if (expr.getKind() == Kind.Function) { + if ("resolve".equals(expr.getName())) { + if (!element.hasType()) + throw new DefinitionException("illegal use of resolve() in discriminator - no type on element "+element.getId()); + if (element.getType().size() > 1) + throw new DefinitionException("illegal use of resolve() in discriminator - Multiple possible types on "+element.getId()); + if (!"Reference".equals(element.getType().get(0).getCode())) + throw new DefinitionException("illegal use of resolve() in discriminator - type on "+element.getId()+" is not Reference ("+element.getType().get(0).getCode()+")"); + sd = worker.fetchResource(StructureDefinition.class, element.getType().get(0).getTargetProfile()); + if (sd == null) + throw new DefinitionException("Problem with use of resolve() - profile '"+element.getType().get(0).getTargetProfile()+"' on "+element.getId()+" could not be resolved"); + focus = sd.getSnapshot().getElementFirstRep(); + } else if ("extension".equals(expr.getName())) + throw new DefinitionException("Not supported yet"); + else + throw new DefinitionException("illegal function name "+expr.getName()+"() in discriminator"); + } else if (expr.getKind() == Kind.Group) { + throw new DefinitionException("illegal expression syntax in discriminator (group)"); + } else if (expr.getKind() == Kind.Constant) { + throw new DefinitionException("illegal expression syntax in discriminator (const)"); + } + + if (focus == null) + throw new DefinitionException("Unable to resolve discriminator"); + else if (expr.getInner() == null) + return focus; + else + return evaluateDefinition(expr.getInner(), sd, focus); + } + + private List evaluateFunction(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + switch (exp.getFunction()) { + case Empty : return funcEmpty(context, focus, exp); + case Not : return funcNot(context, focus, exp); + case Exists : return funcExists(context, focus, exp); + case SubsetOf : return funcSubsetOf(context, focus, exp); + case SupersetOf : return funcSupersetOf(context, focus, exp); + case IsDistinct : return funcIsDistinct(context, focus, exp); + case Distinct : return funcDistinct(context, focus, exp); + case Count : return funcCount(context, focus, exp); + case Where : return funcWhere(context, focus, exp); + case Select : return funcSelect(context, focus, exp); + case All : return funcAll(context, focus, exp); + case Repeat : return funcRepeat(context, focus, exp); + case Item : return funcItem(context, focus, exp); + case As : return funcAs(context, focus, exp); + case Is : return funcIs(context, focus, exp); + case Single : return funcSingle(context, focus, exp); + case First : return funcFirst(context, focus, exp); + case Last : return funcLast(context, focus, exp); + case Tail : return funcTail(context, focus, exp); + case Skip : return funcSkip(context, focus, exp); + case Take : return funcTake(context, focus, exp); + case Iif : return funcIif(context, focus, exp); + case ToInteger : return funcToInteger(context, focus, exp); + case ToDecimal : return funcToDecimal(context, focus, exp); + case ToString : return funcToString(context, focus, exp); + case Substring : return funcSubstring(context, focus, exp); + case StartsWith : return funcStartsWith(context, focus, exp); + case EndsWith : return funcEndsWith(context, focus, exp); + case Matches : return funcMatches(context, focus, exp); + case ReplaceMatches : return funcReplaceMatches(context, focus, exp); + case Contains : return funcContains(context, focus, exp); + case Replace : return funcReplace(context, focus, exp); + case Length : return funcLength(context, focus, exp); + case Children : return funcChildren(context, focus, exp); + case Descendants : return funcDescendants(context, focus, exp); + case MemberOf : return funcMemberOf(context, focus, exp); + case Trace : return funcTrace(context, focus, exp); + case Today : return funcToday(context, focus, exp); + case Now : return funcNow(context, focus, exp); + case Resolve : return funcResolve(context, focus, exp); + case Extension : return funcExtension(context, focus, exp); + case HasValue : return funcHasValue(context, focus, exp); + case AliasAs : return funcAliasAs(context, focus, exp); + case Alias : return funcAlias(context, focus, exp); + case Custom: { + List> params = new ArrayList>(); + for (ExpressionNode p : exp.getParameters()) + params.add(execute(context, focus, p, true)); + return hostServices.executeFunction(context.appInfo, exp.getName(), params); + } + default: + throw new Error("not Implemented yet"); + } + } + + @SuppressWarnings("unchecked") + private TypeDetails evaluateFunctionType(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp) throws PathEngineException, DefinitionException { + List paramTypes = new ArrayList(); + if (exp.getFunction() == Function.Is || exp.getFunction() == Function.As) + paramTypes.add(new TypeDetails(CollectionStatus.SINGLETON, "string")); + else + for (ExpressionNode expr : exp.getParameters()) { + if (exp.getFunction() == Function.Where || exp.getFunction() == Function.Select || exp.getFunction() == Function.Repeat) + paramTypes.add(executeType(changeThis(context, focus), focus, expr, true)); + else + paramTypes.add(executeType(context, focus, expr, true)); + } + switch (exp.getFunction()) { + case Empty : + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Not : + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Exists : + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case SubsetOf : { + checkParamTypes(exp.getFunction().toCode(), paramTypes, focus); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case SupersetOf : { + checkParamTypes(exp.getFunction().toCode(), paramTypes, focus); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case IsDistinct : + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Distinct : + return focus; + case Count : + return new TypeDetails(CollectionStatus.SINGLETON, "integer"); + case Where : + return focus; + case Select : + return anything(focus.getCollectionStatus()); + case All : + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Repeat : + return anything(focus.getCollectionStatus()); + case Item : { + checkOrdered(focus, "item"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer")); + return focus; + } + case As : { + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, exp.getParameters().get(0).getName()); + } + case Is : { + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case Single : + return focus.toSingleton(); + case First : { + checkOrdered(focus, "first"); + return focus.toSingleton(); + } + case Last : { + checkOrdered(focus, "last"); + return focus.toSingleton(); + } + case Tail : { + checkOrdered(focus, "tail"); + return focus; + } + case Skip : { + checkOrdered(focus, "skip"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer")); + return focus; + } + case Take : { + checkOrdered(focus, "take"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer")); + return focus; + } + case Iif : { + TypeDetails types = new TypeDetails(null); + types.update(paramTypes.get(0)); + if (paramTypes.size() > 1) + types.update(paramTypes.get(1)); + return types; + } + case ToInteger : { + checkContextPrimitive(focus, "toInteger"); + return new TypeDetails(CollectionStatus.SINGLETON, "integer"); + } + case ToDecimal : { + checkContextPrimitive(focus, "toDecimal"); + return new TypeDetails(CollectionStatus.SINGLETON, "decimal"); + } + case ToString : { + checkContextPrimitive(focus, "toString"); + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + } + case Substring : { + checkContextString(focus, "subString"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "integer"), new TypeDetails(CollectionStatus.SINGLETON, "integer")); + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + } + case StartsWith : { + checkContextString(focus, "startsWith"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case EndsWith : { + checkContextString(focus, "endsWith"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case Matches : { + checkContextString(focus, "matches"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case ReplaceMatches : { + checkContextString(focus, "replaceMatches"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string"), new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + } + case Contains : { + checkContextString(focus, "contains"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case Replace : { + checkContextString(focus, "replace"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string"), new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + } + case Length : { + checkContextPrimitive(focus, "length"); + return new TypeDetails(CollectionStatus.SINGLETON, "integer"); + } + case Children : + return childTypes(focus, "*"); + case Descendants : + return childTypes(focus, "**"); + case MemberOf : { + checkContextCoded(focus, "memberOf"); + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + } + case Trace : { + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return focus; + } + case Today : + return new TypeDetails(CollectionStatus.SINGLETON, "date"); + case Now : + return new TypeDetails(CollectionStatus.SINGLETON, "dateTime"); + case Resolve : { + checkContextReference(focus, "resolve"); + return new TypeDetails(CollectionStatus.SINGLETON, "DomainResource"); + } + case Extension : { + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return new TypeDetails(CollectionStatus.SINGLETON, "Extension"); + } + case HasValue : + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Alias : + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return anything(CollectionStatus.SINGLETON); + case AliasAs : + checkParamTypes(exp.getFunction().toCode(), paramTypes, new TypeDetails(CollectionStatus.SINGLETON, "string")); + return focus; + case Custom : { + return hostServices.checkFunction(context.appInfo, exp.getName(), paramTypes); + } + default: + break; + } + throw new Error("not Implemented yet"); + } + + /** + * evaluate a path and return true or false (e.g. for an invariant) + * + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public boolean evaluateToBoolean(Resource resource, Base base, String path) throws FHIRException { + return convertToBoolean(evaluate(null, resource, base, path)); + } + + // procedure CheckParamCount(c : integer); + // begin + // if exp.Parameters.Count <> c then + // raise lexer.error('The function "'+exp.name+'" requires '+inttostr(c)+' parameters', offset); + // end; + + /** + * evaluate a path and return true or false (e.g. for an invariant) + * + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public boolean evaluateToBoolean(Resource resource, Base base, ExpressionNode node) throws FHIRException { + return convertToBoolean(evaluate(null, resource, base, node)); + } + + /** + * evaluate a path and return true or false (e.g. for an invariant) + * + * @param appinfo - application context + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public boolean evaluateToBoolean(Object appInfo, Base resource, Base base, ExpressionNode node) throws FHIRException { + return convertToBoolean(evaluate(appInfo, resource, base, node)); + } + + /** + * evaluate a path and return true or false (e.g. for an invariant) + * + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public boolean evaluateToBoolean(Base resource, Base base, ExpressionNode node) throws FHIRException { + return convertToBoolean(evaluate(null, resource, base, node)); + } + + /** + * evaluate a path and a string containing the outcome (for display) + * + * @param base - the object against which the path is being evaluated + * @param path - the FHIR Path statement to use + * @return + * @throws FHIRException + * @ + */ + public String evaluateToString(Base base, String path) throws FHIRException { + return convertToString(evaluate(base, path)); + } + + public String evaluateToString(Object appInfo, Base resource, Base base, ExpressionNode node) throws FHIRException { + return convertToString(evaluate(appInfo, resource, base, node)); + } + + private List execute(ExecutionContext context, List focus, ExpressionNode exp, boolean atEntry) throws FHIRException { +// System.out.println("Evaluate {'"+exp.toString()+"'} on "+focus.toString()); + List work = new ArrayList(); + switch (exp.getKind()) { + case Name: + if (atEntry && exp.getName().equals("$this")) + work.add(context.getThisItem()); + else + for (Base item : focus) { + List outcome = execute(context, item, exp, atEntry); + for (Base base : outcome) + if (base != null) + work.add(base); + } + break; + case Function: + List work2 = evaluateFunction(context, focus, exp); + work.addAll(work2); + break; + case Constant: + Base b = processConstant(context, exp.getConstant()); + if (b != null) + work.add(b); + break; + case Group: + work2 = execute(context, focus, exp.getGroup(), atEntry); + work.addAll(work2); + } + + if (exp.getInner() != null) + work = execute(context, work, exp.getInner(), false); + + if (exp.isProximal() && exp.getOperation() != null) { + ExpressionNode next = exp.getOpNext(); + ExpressionNode last = exp; + while (next != null) { + List work2 = preOperate(work, last.getOperation()); + if (work2 != null) + work = work2; + else if (last.getOperation() == Operation.Is || last.getOperation() == Operation.As) { + work2 = executeTypeName(context, focus, next, false); + work = operate(work, last.getOperation(), work2); + } else { + work2 = execute(context, focus, next, true); + work = operate(work, last.getOperation(), work2); +// System.out.println("Result of {'"+last.toString()+" "+last.getOperation().toCode()+" "+next.toString()+"'}: "+focus.toString()); + } + last = next; + next = next.getOpNext(); + } + } +// System.out.println("Result of {'"+exp.toString()+"'}: "+work.toString()); + return work; + } + + private List execute(ExecutionContext context, Base item, ExpressionNode exp, boolean atEntry) throws FHIRException { + List result = new ArrayList(); + if (atEntry && Character.isUpperCase(exp.getName().charAt(0))) {// special case for start up + if (item.isResource() && item.fhirType().equals(exp.getName())) + result.add(item); + } else + getChildrenByName(item, exp.getName(), result); + if (result.size() == 0 && atEntry && context.appInfo != null) { + Base temp = hostServices.resolveConstant(context.appInfo, exp.getName()); + if (temp != null) { + result.add(temp); + } + } + return result; + } + + private TypeDetails executeContextType(ExecutionTypeContext context, String name) throws PathEngineException, DefinitionException { + if (hostServices == null) + throw new PathEngineException("Unable to resolve context reference since no host services are provided"); + return hostServices.resolveConstantType(context.appInfo, name); + } + + private TypeDetails executeType(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { + TypeDetails result = new TypeDetails(null); + switch (exp.getKind()) { + case Name: + if (atEntry && exp.getName().equals("$this")) + result.update(context.getThisItem()); + else if (atEntry && focus == null) + result.update(executeContextType(context, exp.getName())); + else { + for (String s : focus.getTypes()) { + result.update(executeType(s, exp, atEntry)); + } + if (result.hasNoTypes()) + throw new PathEngineException("The name "+exp.getName()+" is not valid for any of the possible types: "+focus.describe()); + } + break; + case Function: + result.update(evaluateFunctionType(context, focus, exp)); + break; + case Constant: + result.update(readConstantType(context, exp.getConstant())); + break; + case Group: + result.update(executeType(context, focus, exp.getGroup(), atEntry)); + } + exp.setTypes(result); + + if (exp.getInner() != null) { + result = executeType(context, result, exp.getInner(), false); + } + + if (exp.isProximal() && exp.getOperation() != null) { + ExpressionNode next = exp.getOpNext(); + ExpressionNode last = exp; + while (next != null) { + TypeDetails work; + if (last.getOperation() == Operation.Is || last.getOperation() == Operation.As) + work = executeTypeName(context, focus, next, atEntry); + else + work = executeType(context, focus, next, atEntry); + result = operateTypes(result, last.getOperation(), work); + last = next; + next = next.getOpNext(); + } + exp.setOpTypes(result); + } + return result; + } + + private TypeDetails executeType(String type, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { + if (atEntry && Character.isUpperCase(exp.getName().charAt(0)) && hashTail(type).equals(exp.getName())) // special case for start up + return new TypeDetails(CollectionStatus.SINGLETON, type); + TypeDetails result = new TypeDetails(null); + getChildTypesByName(type, exp.getName(), result); + return result; + } + + private List executeTypeName(ExecutionContext context, List focus, ExpressionNode next, boolean atEntry) { + List result = new ArrayList(); + result.add(new StringType(next.getName())); + return result; + } + + private TypeDetails executeTypeName(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { + return new TypeDetails(CollectionStatus.SINGLETON, exp.getName()); + } + + private StructureDefinition fetchStructureByType(ElementDefinition ed) throws DefinitionException { + if (ed.getType().size() == 0) + throw new DefinitionException("Error in discriminator at "+ed.getId()+": no children, no type"); + if (ed.getType().size() > 1) + throw new DefinitionException("Error in discriminator at "+ed.getId()+": no children, multiple types"); + if (ed.hasSlicing()) + throw new DefinitionException("Error in discriminator at "+ed.getId()+": slicing found"); + if (ed.getType().get(0).hasProfile()) + return worker.fetchResource(StructureDefinition.class, ed.getType().get(0).getProfile()); + else + return worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + ed.getType().get(0).getCode()); + } + + public String forLog() { + if (log.length() > 0) + return " ("+log.toString()+")"; + else + return ""; + } + + private List funcAlias(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List nl = execute(context, focus, exp.getParameters().get(0), true); + String name = nl.get(0).primitiveValue(); + List res = new ArrayList(); + Base b = context.getAlias(name); + if (b != null) + res.add(b); + return res; + + } + + private List funcAliasAs(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List nl = execute(context, focus, exp.getParameters().get(0), true); + String name = nl.get(0).primitiveValue(); + context.addAlias(name, focus); + return focus; + } + + private List funcAll(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + if (exp.getParameters().size() == 1) { + List result = new ArrayList(); + List pc = new ArrayList(); + boolean all = true; + for (Base item : focus) { + pc.clear(); + pc.add(item); + if (!convertToBoolean(execute(changeThis(context, item), pc, exp.getParameters().get(0), true))) { + all = false; + break; + } + } + result.add(new BooleanType(all)); + return result; + } else {// (exp.getParameters().size() == 0) { + List result = new ArrayList(); + boolean all = true; + for (Base item : focus) { + boolean v = false; + if (item instanceof BooleanType) { + v = ((BooleanType) item).booleanValue(); + } else + v = item != null; + if (!v) { + all = false; + break; + } + } + result.add(new BooleanType(all)); + return result; + } + } + + private List funcAs(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + String tn = exp.getParameters().get(0).getName(); + for (Base b : focus) + if (b.hasType(tn)) + result.add(b); + return result; + } + + private List funcChildren(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + for (Base b : focus) + getChildrenByName(b, "*", result); + return result; + } + + private List funcContains(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); + + if (focus.size() == 1 && !Utilities.noString(sw)) { + String st = convertToString(focus.get(0)); + if (Utilities.noString(st)) + result.add(new BooleanType(false)); + else + result.add(new BooleanType(st.contains(sw))); + } else + result.add(new BooleanType(false)); + return result; + } + + private List funcCount(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + result.add(new IntegerType(focus.size())); + return result; + } + + private List funcDescendants(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + List current = new ArrayList(); + current.addAll(focus); + List added = new ArrayList(); + boolean more = true; + while (more) { + added.clear(); + for (Base item : current) { + getChildrenByName(item, "*", added); + } + more = !added.isEmpty(); + result.addAll(added); + current.clear(); + current.addAll(added); + } + return result; + } + + private List funcDistinct(ExecutionContext context, List focus, ExpressionNode exp) { + if (focus.size() <= 1) + return focus; + + List result = new ArrayList(); + for (int i = 0; i < focus.size(); i++) { + boolean found = false; + for (int j = i+1; j < focus.size(); j++) { + if (doEquals(focus.get(j), focus.get(i))) { + found = true; + break; + } + } + if (!found) + result.add(focus.get(i)); + } + return result; + } + + private List funcEmpty(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + result.add(new BooleanType(ElementUtil.isEmpty(focus))); + return result; + } + + private List funcEndsWith(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); + + if (focus.size() == 1 && !Utilities.noString(sw)) + result.add(new BooleanType(convertToString(focus.get(0)).endsWith(sw))); + else + result.add(new BooleanType(false)); + return result; + } + + private List funcExists(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + result.add(new BooleanType(!ElementUtil.isEmpty(focus))); + return result; + } + + private List funcExtension(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + List nl = execute(context, focus, exp.getParameters().get(0), true); + String url = nl.get(0).primitiveValue(); + + for (Base item : focus) { + List ext = new ArrayList(); + getChildrenByName(item, "extension", ext); + getChildrenByName(item, "modifierExtension", ext); + for (Base ex : ext) { + List vl = new ArrayList(); + getChildrenByName(ex, "url", vl); + if (convertToString(vl).equals(url)) + result.add(ex); + } + } + return result; + } + + private List funcFirst(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + if (focus.size() > 0) + result.add(focus.get(0)); + return result; + } + + private List funcHasValue(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + if (focus.size() == 1) { + String s = convertToString(focus.get(0)); + result.add(new BooleanType(!Utilities.noString(s))); + } + return result; + } + + private List funcIif(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List n1 = execute(context, focus, exp.getParameters().get(0), true); + Boolean v = convertToBoolean(n1); + + if (v) + return execute(context, focus, exp.getParameters().get(1), true); + else if (exp.getParameters().size() < 3) + return new ArrayList(); + else + return execute(context, focus, exp.getParameters().get(2), true); + } + + private List funcIs(ExecutionContext context, List focus, ExpressionNode exp) throws PathEngineException { + List result = new ArrayList(); + if (focus.size() == 0 || focus.size() > 1) + result.add(new BooleanType(false)); + else { + String tn = exp.getParameters().get(0).getName(); + result.add(new BooleanType(focus.get(0).hasType(tn))); + } + return result; + } + + private List funcIsDistinct(ExecutionContext context, List focus, ExpressionNode exp) { + if (focus.size() <= 1) + return makeBoolean(true); + + boolean distinct = true; + for (int i = 0; i < focus.size(); i++) { + for (int j = i+1; j < focus.size(); j++) { + if (doEquals(focus.get(j), focus.get(i))) { + distinct = false; + break; + } + } + } + return makeBoolean(distinct); + } + + private List funcItem(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + String s = convertToString(execute(context, focus, exp.getParameters().get(0), true)); + if (Utilities.isInteger(s) && Integer.parseInt(s) < focus.size()) + result.add(focus.get(Integer.parseInt(s))); + return result; + } + + private List funcLast(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + if (focus.size() > 0) + result.add(focus.get(focus.size()-1)); + return result; + } + + private List funcLength(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + if (focus.size() == 1) { + String s = convertToString(focus.get(0)); + result.add(new IntegerType(s.length())); + } + return result; + } + + private List funcMatches(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); + + if (focus.size() == 1 && !Utilities.noString(sw)) { + String st = convertToString(focus.get(0)); + if (Utilities.noString(st)) + result.add(new BooleanType(false)); + else + result.add(new BooleanType(st.matches(sw))); + } else + result.add(new BooleanType(false)); + return result; + } + + private List funcMemberOf(ExecutionContext context, List focus, ExpressionNode exp) { + throw new Error("not Implemented yet"); + } + + private List funcNot(ExecutionContext context, List focus, ExpressionNode exp) { + return makeBoolean(!convertToBoolean(focus)); + } + + private List funcNow(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + result.add(DateTimeType.now()); + return result; + } + + private List funcRepeat(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + List current = new ArrayList(); + current.addAll(focus); + List added = new ArrayList(); + boolean more = true; + while (more) { + added.clear(); + List pc = new ArrayList(); + for (Base item : current) { + pc.clear(); + pc.add(item); + added.addAll(execute(changeThis(context, item), pc, exp.getParameters().get(0), false)); + } + more = !added.isEmpty(); + result.addAll(added); + current.clear(); + current.addAll(added); + } + return result; + } + + private List funcReplace(ExecutionContext context, List focus, ExpressionNode exp) { + throw new Error("not Implemented yet"); + } + + private List funcReplaceMatches(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); + + if (focus.size() == 1 && !Utilities.noString(sw)) + result.add(new BooleanType(convertToString(focus.get(0)).contains(sw))); + else + result.add(new BooleanType(false)); + return result; + } + + private List funcResolve(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + for (Base item : focus) { + if (hostServices != null) { + String s = convertToString(item); + if (item.fhirType().equals("Reference")) { + Property p = item.getChildByName("reference"); + if (p != null && p.hasValues()) + s = convertToString(p.getValues().get(0)); + else + s = null; // a reference without any valid actual reference (just identifier or display, but we can't resolve it) + } + if (s != null) { + Base res = null; + if (s.startsWith("#")) { + String id = s.substring(1); + Property p = context.resource.getChildByName("contained"); + for (Base c : p.getValues()) { + if (id.equals(c.getIdBase())) { + res = c; + break; + } + } + } else + res = hostServices.resolveReference(context.appInfo, s); + if (res != null) + result.add(res); + } + } + } + return result; + } + + private List funcSelect(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + List pc = new ArrayList(); + for (Base item : focus) { + pc.clear(); + pc.add(item); + result.addAll(execute(changeThis(context, item), pc, exp.getParameters().get(0), true)); + } + return result; + } + + private List funcSingle(ExecutionContext context, List focus, ExpressionNode exp) throws PathEngineException { + if (focus.size() == 1) + return focus; + throw new PathEngineException(String.format("Single() : checking for 1 item but found %d items", focus.size())); + } + + private List funcSkip(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List n1 = execute(context, focus, exp.getParameters().get(0), true); + int i1 = Integer.parseInt(n1.get(0).primitiveValue()); + + List result = new ArrayList(); + for (int i = i1; i < focus.size(); i++) + result.add(focus.get(i)); + return result; + } + + private List funcStartsWith(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + String sw = convertToString(execute(context, focus, exp.getParameters().get(0), true)); + + if (focus.size() == 1 && !Utilities.noString(sw)) + result.add(new BooleanType(convertToString(focus.get(0)).startsWith(sw))); + else + result.add(new BooleanType(false)); + return result; + } + + private List funcSubsetOf(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List target = execute(context, focus, exp.getParameters().get(0), true); + + boolean valid = true; + for (Base item : focus) { + boolean found = false; + for (Base t : target) { + if (Base.compareDeep(item, t, false)) { + found = true; + break; + } + } + if (!found) { + valid = false; + break; + } + } + List result = new ArrayList(); + result.add(new BooleanType(valid)); + return result; + } + + private List funcSubstring(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + List n1 = execute(context, focus, exp.getParameters().get(0), true); + int i1 = Integer.parseInt(n1.get(0).primitiveValue()); + int i2 = -1; + if (exp.parameterCount() == 2) { + List n2 = execute(context, focus, exp.getParameters().get(1), true); + i2 = Integer.parseInt(n2.get(0).primitiveValue()); + } + + if (focus.size() == 1) { + String sw = convertToString(focus.get(0)); + String s; + if (i1 < 0 || i1 >= sw.length()) + return new ArrayList(); + if (exp.parameterCount() == 2) + s = sw.substring(i1, Math.min(sw.length(), i1+i2)); + else + s = sw.substring(i1); + if (!Utilities.noString(s)) + result.add(new StringType(s)); + } + return result; + } + + private List funcSupersetOf(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List target = execute(context, focus, exp.getParameters().get(0), true); + + boolean valid = true; + for (Base item : target) { + boolean found = false; + for (Base t : focus) { + if (Base.compareDeep(item, t, false)) { + found = true; + break; + } + } + if (!found) { + valid = false; + break; + } + } + List result = new ArrayList(); + result.add(new BooleanType(valid)); + return result; + } + + private List funcTail(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + for (int i = 1; i < focus.size(); i++) + result.add(focus.get(i)); + return result; + } + + private List funcTake(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List n1 = execute(context, focus, exp.getParameters().get(0), true); + int i1 = Integer.parseInt(n1.get(0).primitiveValue()); + + List result = new ArrayList(); + for (int i = 0; i < Math.min(focus.size(), i1); i++) + result.add(focus.get(i)); + return result; + } + + private List funcToDecimal(ExecutionContext context, List focus, ExpressionNode exp) { + String s = convertToString(focus); + List result = new ArrayList(); + if (Utilities.isDecimal(s)) + result.add(new DecimalType(s)); + return result; + } + + private List funcToInteger(ExecutionContext context, List focus, ExpressionNode exp) { + String s = convertToString(focus); + List result = new ArrayList(); + if (Utilities.isInteger(s)) + result.add(new IntegerType(s)); + return result; + } + + private List funcToString(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + result.add(new StringType(convertToString(focus))); + return result; + } + + private List funcToday(ExecutionContext context, List focus, ExpressionNode exp) { + List result = new ArrayList(); + result.add(new DateType(new Date(), TemporalPrecisionEnum.DAY)); + return result; + } + + private List funcTrace(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List nl = execute(context, focus, exp.getParameters().get(0), true); + String name = nl.get(0).primitiveValue(); + + log(name, focus); + return focus; + } + + private List funcWhere(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); + List pc = new ArrayList(); + for (Base item : focus) { + pc.clear(); + pc.add(item); + if (convertToBoolean(execute(changeThis(context, item), pc, exp.getParameters().get(0), true))) + result.add(item); + } + return result; + } + + private ExpressionNode gatherPrecedence(FHIRLexer lexer, ExpressionNode start, EnumSet ops) { + // work : boolean; + // focus, node, group : ExpressionNode; + + assert(start.isProximal()); + + // is there anything to do? + boolean work = false; + ExpressionNode focus = start.getOpNext(); + if (ops.contains(start.getOperation())) { + while (focus != null && focus.getOperation() != null) { + work = work || !ops.contains(focus.getOperation()); + focus = focus.getOpNext(); + } + } else { + while (focus != null && focus.getOperation() != null) { + work = work || ops.contains(focus.getOperation()); + focus = focus.getOpNext(); + } + } + if (!work) + return start; + + // entry point: tricky + ExpressionNode group; + if (ops.contains(start.getOperation())) { + group = newGroup(lexer, start); + group.setProximal(true); + focus = start; + start = group; + } else { + ExpressionNode node = start; + + focus = node.getOpNext(); + while (!ops.contains(focus.getOperation())) { + node = focus; + focus = focus.getOpNext(); + } + group = newGroup(lexer, focus); + node.setOpNext(group); + } + + // now, at this point: + // group is the group we are adding to, it already has a .group property filled out. + // focus points at the group.group + do { + // run until we find the end of the sequence + while (ops.contains(focus.getOperation())) + focus = focus.getOpNext(); + if (focus.getOperation() != null) { + group.setOperation(focus.getOperation()); + group.setOpNext(focus.getOpNext()); + focus.setOperation(null); + focus.setOpNext(null); + // now look for another sequence, and start it + ExpressionNode node = group; + focus = group.getOpNext(); + if (focus != null) { + while (focus != null && !ops.contains(focus.getOperation())) { + node = focus; + focus = focus.getOpNext(); + } + if (focus != null) { // && (focus.Operation in Ops) - must be true + group = newGroup(lexer, focus); + node.setOpNext(group); + } + } + } + } + while (focus != null && focus.getOperation() != null); + return start; + } + + // private boolean isPrimitiveType(String s) { + // return s.equals("boolean") || s.equals("integer") || s.equals("decimal") || s.equals("base64Binary") || s.equals("instant") || s.equals("string") || s.equals("uri") || s.equals("date") || s.equals("dateTime") || s.equals("time") || s.equals("code") || s.equals("oid") || s.equals("id") || s.equals("unsignedInt") || s.equals("positiveInt") || s.equals("markdown"); + // } + + private void getChildTypesByName(String type, String name, TypeDetails result) throws PathEngineException, DefinitionException { + if (Utilities.noString(type)) + throw new PathEngineException("No type provided in BuildToolPathEvaluator.getChildTypesByName"); + if (type.equals("http://hl7.org/fhir/StructureDefinition/xhtml")) + return; + String url = null; + if (type.contains("#")) { + url = type.substring(0, type.indexOf("#")); + } else { + url = type; + } + String tail = ""; + StructureDefinition sd = worker.fetchResource(StructureDefinition.class, url); + if (sd == null) + throw new DefinitionException("Unknown type "+type); // this really is an error, because we can only get to here if the internal infrastrucgture is wrong + List sdl = new ArrayList(); + ElementDefinitionMatch m = null; + if (type.contains("#")) + m = getElementDefinition(sd, type.substring(type.indexOf("#")+1), false); + if (m != null && hasDataType(m.definition)) { + if (m.fixedType != null) + { + StructureDefinition dt = worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+m.fixedType); + if (dt == null) + throw new DefinitionException("unknown data type "+m.fixedType); + sdl.add(dt); + } else + for (TypeRefComponent t : m.definition.getType()) { + StructureDefinition dt = worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+t.getCode()); + if (dt == null) + throw new DefinitionException("unknown data type "+t.getCode()); + sdl.add(dt); + } + } else { + sdl.add(sd); + if (type.contains("#")) { + tail = type.substring(type.indexOf("#")+1); + tail = tail.substring(tail.indexOf(".")); + } + } + + for (StructureDefinition sdi : sdl) { + String path = sdi.getSnapshot().getElement().get(0).getPath()+tail+"."; + if (name.equals("**")) { + assert(result.getCollectionStatus() == CollectionStatus.UNORDERED); + for (ElementDefinition ed : sdi.getSnapshot().getElement()) { + if (ed.getPath().startsWith(path)) + for (TypeRefComponent t : ed.getType()) { + if (t.hasCode() && t.getCodeElement().hasValue()) { + String tn = null; + if (t.getCode().equals("Element") || t.getCode().equals("BackboneElement")) + tn = sdi.getType()+"#"+ed.getPath(); + else + tn = t.getCode(); + if (t.getCode().equals("Resource")) { + for (String rn : worker.getResourceNames()) { + if (!result.hasType(worker, rn)) { + getChildTypesByName(result.addType(rn), "**", result); + } + } + } else if (!result.hasType(worker, tn)) { + getChildTypesByName(result.addType(tn), "**", result); + } + } + } + } + } else if (name.equals("*")) { + assert(result.getCollectionStatus() == CollectionStatus.UNORDERED); + for (ElementDefinition ed : sdi.getSnapshot().getElement()) { + if (ed.getPath().startsWith(path) && !ed.getPath().substring(path.length()).contains(".")) + for (TypeRefComponent t : ed.getType()) { + if (t.getCode().equals("Element") || t.getCode().equals("BackboneElement")) + result.addType(sdi.getType()+"#"+ed.getPath()); + else if (t.getCode().equals("Resource")) + result.addTypes(worker.getResourceNames()); + else + result.addType(t.getCode()); + } + } + } else { + path = sdi.getSnapshot().getElement().get(0).getPath()+tail+"."+name; + + ElementDefinitionMatch ed = getElementDefinition(sdi, path, false); + if (ed != null) { + if (!Utilities.noString(ed.getFixedType())) + result.addType(ed.getFixedType()); + else + for (TypeRefComponent t : ed.getDefinition().getType()) { + if (Utilities.noString(t.getCode())) + break; // throw new PathEngineException("Illegal reference to primitive value attribute @ "+path); + + ProfiledType pt = null; + if (t.getCode().equals("Element") || t.getCode().equals("BackboneElement")) + pt = new ProfiledType(sdi.getUrl()+"#"+path); + else if (t.getCode().equals("Resource")) + result.addTypes(worker.getResourceNames()); + else + pt = new ProfiledType(t.getCode()); + if (pt != null) { + if (t.hasProfile()) + pt.addProfile(t.getProfile()); + if (ed.getDefinition().hasBinding()) + pt.addBinding(ed.getDefinition().getBinding()); + result.addType(pt); + } + } + } + } + } + } + + /** + * Given an item, return all the children that conform to the pattern described in name + * + * Possible patterns: + * - a simple name (which may be the base of a name with [] e.g. value[x]) + * - a name with a type replacement e.g. valueCodeableConcept + * - * which means all children + * - ** which means all descendants + * + * @param item + * @param name + * @param result + * @throws FHIRException + */ + protected void getChildrenByName(Base item, String name, List result) throws FHIRException { + Base[] list = item.listChildrenByName(name, false); + if (list != null) + for (Base v : list) + if (v != null) + result.add(v); + } + + private ElementDefinitionMatch getElementDefinition(StructureDefinition sd, String path, boolean allowTypedName) throws PathEngineException { + for (ElementDefinition ed : sd.getSnapshot().getElement()) { + if (ed.getPath().equals(path)) { + if (ed.hasContentReference()) { + return getElementDefinitionById(sd, ed.getContentReference()); + } else + return new ElementDefinitionMatch(ed, null); + } + if (ed.getPath().endsWith("[x]") && path.startsWith(ed.getPath().substring(0, ed.getPath().length()-3)) && path.length() == ed.getPath().length()-3) + return new ElementDefinitionMatch(ed, null); + if (allowTypedName && ed.getPath().endsWith("[x]") && path.startsWith(ed.getPath().substring(0, ed.getPath().length()-3)) && path.length() > ed.getPath().length()-3) { + String s = Utilities.uncapitalize(path.substring(ed.getPath().length()-3)); + if (primitiveTypes.contains(s)) + return new ElementDefinitionMatch(ed, s); + else + return new ElementDefinitionMatch(ed, path.substring(ed.getPath().length()-3)); + } + if (ed.getPath().contains(".") && path.startsWith(ed.getPath()+".") && (ed.getType().size() > 0) && !isAbstractType(ed.getType())) { + // now we walk into the type. + if (ed.getType().size() > 1) // if there's more than one type, the test above would fail this + throw new PathEngineException("Internal typing issue...."); + StructureDefinition nsd = worker.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+ed.getType().get(0).getCode()); + if (nsd == null) + throw new PathEngineException("Unknown type "+ed.getType().get(0).getCode()); + return getElementDefinition(nsd, nsd.getId()+path.substring(ed.getPath().length()), allowTypedName); + } + if (ed.hasContentReference() && path.startsWith(ed.getPath()+".")) { + ElementDefinitionMatch m = getElementDefinitionById(sd, ed.getContentReference()); + return getElementDefinition(sd, m.definition.getPath()+path.substring(ed.getPath().length()), allowTypedName); + } + } + return null; + } + + private ElementDefinitionMatch getElementDefinitionById(StructureDefinition sd, String ref) { + for (ElementDefinition ed : sd.getSnapshot().getElement()) { + if (ref.equals("#"+ed.getId())) + return new ElementDefinitionMatch(ed, null); + } + return null; + } + + public IEvaluationContext getHostServices() { + return hostServices; + } + + public void setHostServices(IEvaluationContext constantResolver) { + this.hostServices = constantResolver; + } + + private boolean hasDataType(ElementDefinition ed) { + return ed.hasType() && !(ed.getType().get(0).getCode().equals("Element") || ed.getType().get(0).getCode().equals("BackboneElement")); + } + + public boolean hasLog() { + return log != null && log.length() > 0; + } + + private boolean hasType(ElementDefinition ed, String s) { + for (TypeRefComponent t : ed.getType()) + if (s.equalsIgnoreCase(t.getCode())) + return true; + return false; + } + + private String hashTail(String type) { + return type.contains("#") ? "" : type.substring(type.lastIndexOf("/")+1); + } + + private boolean isAbstractType(List list) { + return list.size() != 1 ? true : Utilities.existsInList(list.get(0).getCode(), "Element", "BackboneElement", "Resource", "DomainResource"); +} + + private boolean isBoolean(List list, boolean b) { + return list.size() == 1 && list.get(0) instanceof BooleanType && ((BooleanType) list.get(0)).booleanValue() == b; + } + + private void log(String name, List contents) { + if (hostServices == null || !hostServices.log(name, contents)) { + if (log.length() > 0) + log.append("; "); + log.append(name); + log.append(": "); + boolean first = true; + for (Base b : contents) { + if (first) + first = false; + else + log.append(","); + log.append(convertToString(b)); + } + } + } + + private List makeBoolean(boolean b) { + List res = new ArrayList(); + res.add(new BooleanType(b)); + return res; + } + + private ExpressionNode newGroup(FHIRLexer lexer, ExpressionNode next) { + ExpressionNode result = new ExpressionNode(lexer.nextId()); + result.setKind(Kind.Group); + result.setGroup(next); + result.getGroup().setProximal(true); + return result; + } + + private List opAnd(List left, List right) { + if (left.isEmpty() && right.isEmpty()) + return new ArrayList(); + else if (isBoolean(left, false) || isBoolean(right, false)) + return makeBoolean(false); + else if (left.isEmpty() || right.isEmpty()) + return new ArrayList(); + else if (convertToBoolean(left) && convertToBoolean(right)) + return makeBoolean(true); + else + return makeBoolean(false); + } + + private List opAs(List left, List right) { + List result = new ArrayList(); + if (left.size() != 1 || right.size() != 1) + return result; + else { + String tn = convertToString(right); + if (tn.equals(left.get(0).fhirType())) + result.add(left.get(0)); + } + return result; + } + + private List opConcatenate(List left, List right) { + List result = new ArrayList(); + result.add(new StringType(convertToString(left) + convertToString((right)))); + return result; + } + + private List opContains(List left, List right) { + boolean ans = true; + for (Base r : right) { + boolean f = false; + for (Base l : left) + if (doEquals(l, r)) { + f = true; + break; + } + if (!f) { + ans = false; + break; + } + } + return makeBoolean(ans); + } + + private List opDiv(List left, List right) throws PathEngineException { + if (left.size() == 0) + throw new PathEngineException("Error performing div: left operand has no value"); + if (left.size() > 1) + throw new PathEngineException("Error performing div: left operand has more than one value"); + if (!left.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing div: left operand has the wrong type (%s)", left.get(0).fhirType())); + if (right.size() == 0) + throw new PathEngineException("Error performing div: right operand has no value"); + if (right.size() > 1) + throw new PathEngineException("Error performing div: right operand has more than one value"); + if (!right.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing div: right operand has the wrong type (%s)", right.get(0).fhirType())); + + List result = new ArrayList(); + Base l = left.get(0); + Base r = right.get(0); + + if (l.hasType("integer") && r.hasType("integer")) + result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) / Integer.parseInt(r.primitiveValue()))); + else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) { + Decimal d1; + try { + d1 = new Decimal(l.primitiveValue()); + Decimal d2 = new Decimal(r.primitiveValue()); + result.add(new IntegerType(d1.divInt(d2).asDecimal())); + } catch (UcumException e) { + throw new PathEngineException(e); + } + } + else + throw new PathEngineException(String.format("Error performing div: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); + return result; + } + + private List opDivideBy(List left, List right) throws PathEngineException { + if (left.size() == 0) + throw new PathEngineException("Error performing /: left operand has no value"); + if (left.size() > 1) + throw new PathEngineException("Error performing /: left operand has more than one value"); + if (!left.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing -: left operand has the wrong type (%s)", left.get(0).fhirType())); + if (right.size() == 0) + throw new PathEngineException("Error performing /: right operand has no value"); + if (right.size() > 1) + throw new PathEngineException("Error performing /: right operand has more than one value"); + if (!right.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing /: right operand has the wrong type (%s)", right.get(0).fhirType())); + + List result = new ArrayList(); + Base l = left.get(0); + Base r = right.get(0); + + if (l.hasType("integer", "decimal", "unsignedInt", "positiveInt") && r.hasType("integer", "decimal", "unsignedInt", "positiveInt")) { + Decimal d1; + try { + d1 = new Decimal(l.primitiveValue()); + Decimal d2 = new Decimal(r.primitiveValue()); + result.add(new DecimalType(d1.divide(d2).asDecimal())); + } catch (UcumException e) { + throw new PathEngineException(e); + } + } + else + throw new PathEngineException(String.format("Error performing /: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); + return result; + } + + private List opEquals(List left, List right) { + if (left.size() != right.size()) + return makeBoolean(false); + + boolean res = true; + for (int i = 0; i < left.size(); i++) { + if (!doEquals(left.get(i), right.get(i))) { + res = false; + break; + } + } + return makeBoolean(res); + } + + private List opEquivalent(List left, List right) throws PathEngineException { + if (left.size() != right.size()) + return makeBoolean(false); + + boolean res = true; + for (int i = 0; i < left.size(); i++) { + boolean found = false; + for (int j = 0; j < right.size(); j++) { + if (doEquivalent(left.get(i), right.get(j))) { + found = true; + break; + } + } + if (!found) { + res = false; + break; + } + } + return makeBoolean(res); + } + + private List opGreater(List left, List right) throws FHIRException { + if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { + Base l = left.get(0); + Base r = right.get(0); + if (l.hasType("string") && r.hasType("string")) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) > 0); + else if ((l.hasType("integer", "decimal", "unsignedInt", "positiveInt")) && (r.hasType("integer", "decimal", "unsignedInt", "positiveInt"))) + return makeBoolean(new Double(l.primitiveValue()) > new Double(r.primitiveValue())); + else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) > 0); + else if ((l.hasType("time")) && (r.hasType("time"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) > 0); + } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { + List lUnit = left.get(0).listChildrenByName("unit"); + List rUnit = right.get(0).listChildrenByName("unit"); + if (Base.compareDeep(lUnit, rUnit, true)) { + return opGreater(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); + } else { + throw new InternalErrorException("Canonical Comparison isn't done yet"); + } + } + return new ArrayList(); + } + + private List opGreaterOrEqual(List left, List right) throws FHIRException { + if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { + Base l = left.get(0); + Base r = right.get(0); + if (l.hasType("string") && r.hasType("string")) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) >= 0); + else if ((l.hasType("integer", "decimal", "unsignedInt", "positiveInt")) && (r.hasType("integer", "decimal", "unsignedInt", "positiveInt"))) + return makeBoolean(new Double(l.primitiveValue()) >= new Double(r.primitiveValue())); + else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) >= 0); + else if ((l.hasType("time")) && (r.hasType("time"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) >= 0); + } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { + List lUnit = left.get(0).listChildrenByName("unit"); + List rUnit = right.get(0).listChildrenByName("unit"); + if (Base.compareDeep(lUnit, rUnit, true)) { + return opGreaterOrEqual(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); + } else { + throw new InternalErrorException("Canonical Comparison isn't done yet"); + } + } + return new ArrayList(); + } + + private List opImplies(List left, List right) { + if (!convertToBoolean(left)) + return makeBoolean(true); + else if (right.size() == 0) + return new ArrayList(); + else + return makeBoolean(convertToBoolean(right)); + } + + private List opIn(List left, List right) throws FHIRException { + boolean ans = true; + for (Base l : left) { + boolean f = false; + for (Base r : right) + if (doEquals(l, r)) { + f = true; + break; + } + if (!f) { + ans = false; + break; + } + } + return makeBoolean(ans); + } + + private List opIs(List left, List right) { + List result = new ArrayList(); + if (left.size() != 1 || right.size() != 1) + result.add(new BooleanType(false)); + else { + String tn = convertToString(right); + result.add(new BooleanType(left.get(0).hasType(tn))); + } + return result; + } + + private List opLessOrEqual(List left, List right) throws FHIRException { + if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { + Base l = left.get(0); + Base r = right.get(0); + if (l.hasType("string") && r.hasType("string")) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) <= 0); + else if ((l.hasType("integer", "decimal", "unsignedInt", "positiveInt")) && (r.hasType("integer", "decimal", "unsignedInt", "positiveInt"))) + return makeBoolean(new Double(l.primitiveValue()) <= new Double(r.primitiveValue())); + else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) <= 0); + else if ((l.hasType("time")) && (r.hasType("time"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) <= 0); + } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { + List lUnits = left.get(0).listChildrenByName("unit"); + String lunit = lUnits.size() == 1 ? lUnits.get(0).primitiveValue() : null; + List rUnits = right.get(0).listChildrenByName("unit"); + String runit = rUnits.size() == 1 ? rUnits.get(0).primitiveValue() : null; + if ((lunit == null && runit == null) || lunit.equals(runit)) { + return opLessOrEqual(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); + } else { + throw new InternalErrorException("Canonical Comparison isn't done yet"); + } + } + return new ArrayList(); + } + + private List opLessThen(List left, List right) throws FHIRException { + if (left.size() == 1 && right.size() == 1 && left.get(0).isPrimitive() && right.get(0).isPrimitive()) { + Base l = left.get(0); + Base r = right.get(0); + if (l.hasType("string") && r.hasType("string")) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) < 0); + else if ((l.hasType("integer") || l.hasType("decimal")) && (r.hasType("integer") || r.hasType("decimal"))) + return makeBoolean(new Double(l.primitiveValue()) < new Double(r.primitiveValue())); + else if ((l.hasType("date", "dateTime", "instant")) && (r.hasType("date", "dateTime", "instant"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) < 0); + else if ((l.hasType("time")) && (r.hasType("time"))) + return makeBoolean(l.primitiveValue().compareTo(r.primitiveValue()) < 0); + } else if (left.size() == 1 && right.size() == 1 && left.get(0).fhirType().equals("Quantity") && right.get(0).fhirType().equals("Quantity") ) { + List lUnit = left.get(0).listChildrenByName("unit"); + List rUnit = right.get(0).listChildrenByName("unit"); + if (Base.compareDeep(lUnit, rUnit, true)) { + return opLessThen(left.get(0).listChildrenByName("value"), right.get(0).listChildrenByName("value")); + } else { + throw new InternalErrorException("Canonical Comparison isn't done yet"); + } + } + return new ArrayList(); + } + + private List opMemberOf(List left, List right) throws FHIRException { + boolean ans = false; + ValueSet vs = worker.fetchResource(ValueSet.class, right.get(0).primitiveValue()); + if (vs != null) { + for (Base l : left) { + if (l.fhirType().equals("code")) { + if (worker.validateCode(l.castToCoding(l), vs).isOk()) + ans = true; + } else if (l.fhirType().equals("Coding")) { + if (worker.validateCode(l.castToCoding(l), vs).isOk()) + ans = true; + } else if (l.fhirType().equals("CodeableConcept")) { + if (worker.validateCode(l.castToCodeableConcept(l), vs).isOk()) + ans = true; + } + } + } + return makeBoolean(ans); + } + + private List opMinus(List left, List right) throws PathEngineException { + if (left.size() == 0) + throw new PathEngineException("Error performing -: left operand has no value"); + if (left.size() > 1) + throw new PathEngineException("Error performing -: left operand has more than one value"); + if (!left.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing -: left operand has the wrong type (%s)", left.get(0).fhirType())); + if (right.size() == 0) + throw new PathEngineException("Error performing -: right operand has no value"); + if (right.size() > 1) + throw new PathEngineException("Error performing -: right operand has more than one value"); + if (!right.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing -: right operand has the wrong type (%s)", right.get(0).fhirType())); + + List result = new ArrayList(); + Base l = left.get(0); + Base r = right.get(0); + + if (l.hasType("integer") && r.hasType("integer")) + result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) - Integer.parseInt(r.primitiveValue()))); + else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) + result.add(new DecimalType(new BigDecimal(l.primitiveValue()).subtract(new BigDecimal(r.primitiveValue())))); + else + throw new PathEngineException(String.format("Error performing -: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); + return result; + } + + private List opMod(List left, List right) throws PathEngineException { + if (left.size() == 0) + throw new PathEngineException("Error performing mod: left operand has no value"); + if (left.size() > 1) + throw new PathEngineException("Error performing mod: left operand has more than one value"); + if (!left.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing mod: left operand has the wrong type (%s)", left.get(0).fhirType())); + if (right.size() == 0) + throw new PathEngineException("Error performing mod: right operand has no value"); + if (right.size() > 1) + throw new PathEngineException("Error performing mod: right operand has more than one value"); + if (!right.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing mod: right operand has the wrong type (%s)", right.get(0).fhirType())); + + List result = new ArrayList(); + Base l = left.get(0); + Base r = right.get(0); + + if (l.hasType("integer") && r.hasType("integer")) + result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) % Integer.parseInt(r.primitiveValue()))); + else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) { + Decimal d1; + try { + d1 = new Decimal(l.primitiveValue()); + Decimal d2 = new Decimal(r.primitiveValue()); + result.add(new DecimalType(d1.modulo(d2).asDecimal())); + } catch (UcumException e) { + throw new PathEngineException(e); + } + } + else + throw new PathEngineException(String.format("Error performing mod: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); + return result; + } + + private List opNotEquals(List left, List right) { + if (left.size() != right.size()) + return makeBoolean(true); + + boolean res = true; + for (int i = 0; i < left.size(); i++) { + if (!doEquals(left.get(i), right.get(i))) { + res = false; + break; + } + } + return makeBoolean(!res); + } + + private List opNotEquivalent(List left, List right) throws PathEngineException { + if (left.size() != right.size()) + return makeBoolean(true); + + boolean res = true; + for (int i = 0; i < left.size(); i++) { + boolean found = false; + for (int j = 0; j < right.size(); j++) { + if (doEquivalent(left.get(i), right.get(j))) { + found = true; + break; + } + } + if (!found) { + res = false; + break; + } + } + return makeBoolean(!res); + } + + private List opOr(List left, List right) { + if (left.isEmpty() && right.isEmpty()) + return new ArrayList(); + else if (convertToBoolean(left) || convertToBoolean(right)) + return makeBoolean(true); + else if (left.isEmpty() || right.isEmpty()) + return new ArrayList(); + else + return makeBoolean(false); + } + + private List opPlus(List left, List right) throws PathEngineException { + if (left.size() == 0) + throw new PathEngineException("Error performing +: left operand has no value"); + if (left.size() > 1) + throw new PathEngineException("Error performing +: left operand has more than one value"); + if (!left.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing +: left operand has the wrong type (%s)", left.get(0).fhirType())); + if (right.size() == 0) + throw new PathEngineException("Error performing +: right operand has no value"); + if (right.size() > 1) + throw new PathEngineException("Error performing +: right operand has more than one value"); + if (!right.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing +: right operand has the wrong type (%s)", right.get(0).fhirType())); + + List result = new ArrayList(); + Base l = left.get(0); + Base r = right.get(0); + if (l.hasType("string", "id", "code", "uri") && r.hasType("string", "id", "code", "uri")) + result.add(new StringType(l.primitiveValue() + r.primitiveValue())); + else if (l.hasType("integer") && r.hasType("integer")) + result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) + Integer.parseInt(r.primitiveValue()))); + else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) + result.add(new DecimalType(new BigDecimal(l.primitiveValue()).add(new BigDecimal(r.primitiveValue())))); + else + throw new PathEngineException(String.format("Error performing +: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); + return result; + } + + private List opTimes(List left, List right) throws PathEngineException { + if (left.size() == 0) + throw new PathEngineException("Error performing *: left operand has no value"); + if (left.size() > 1) + throw new PathEngineException("Error performing *: left operand has more than one value"); + if (!left.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing +: left operand has the wrong type (%s)", left.get(0).fhirType())); + if (right.size() == 0) + throw new PathEngineException("Error performing *: right operand has no value"); + if (right.size() > 1) + throw new PathEngineException("Error performing *: right operand has more than one value"); + if (!right.get(0).isPrimitive()) + throw new PathEngineException(String.format("Error performing *: right operand has the wrong type (%s)", right.get(0).fhirType())); + + List result = new ArrayList(); + Base l = left.get(0); + Base r = right.get(0); + + if (l.hasType("integer") && r.hasType("integer")) + result.add(new IntegerType(Integer.parseInt(l.primitiveValue()) * Integer.parseInt(r.primitiveValue()))); + else if (l.hasType("decimal", "integer") && r.hasType("decimal", "integer")) + result.add(new DecimalType(new BigDecimal(l.primitiveValue()).multiply(new BigDecimal(r.primitiveValue())))); + else + throw new PathEngineException(String.format("Error performing *: left and right operand have incompatible or illegal types (%s, %s)", left.get(0).fhirType(), right.get(0).fhirType())); + return result; + } + + private List opUnion(List left, List right) { + List result = new ArrayList(); + for (Base item : left) { + if (!doContains(result, item)) + result.add(item); + } + for (Base item : right) { + if (!doContains(result, item)) + result.add(item); + } + return result; + } + + private List opXor(List left, List right) { + if (left.isEmpty() || right.isEmpty()) + return new ArrayList(); + else + return makeBoolean(convertToBoolean(left) ^ convertToBoolean(right)); + } + + private List operate(List left, Operation operation, List right) throws FHIRException { + switch (operation) { + case Equals: return opEquals(left, right); + case Equivalent: return opEquivalent(left, right); + case NotEquals: return opNotEquals(left, right); + case NotEquivalent: return opNotEquivalent(left, right); + case LessThen: return opLessThen(left, right); + case Greater: return opGreater(left, right); + case LessOrEqual: return opLessOrEqual(left, right); + case GreaterOrEqual: return opGreaterOrEqual(left, right); + case Union: return opUnion(left, right); + case In: return opIn(left, right); + case MemberOf: return opMemberOf(left, right); + case Contains: return opContains(left, right); + case Or: return opOr(left, right); + case And: return opAnd(left, right); + case Xor: return opXor(left, right); + case Implies: return opImplies(left, right); + case Plus: return opPlus(left, right); + case Times: return opTimes(left, right); + case Minus: return opMinus(left, right); + case Concatenate: return opConcatenate(left, right); + case DivideBy: return opDivideBy(left, right); + case Div: return opDiv(left, right); + case Mod: return opMod(left, right); + case Is: return opIs(left, right); + case As: return opAs(left, right); + default: + throw new Error("Not Done Yet: "+operation.toCode()); + } + } + + private TypeDetails operateTypes(TypeDetails left, Operation operation, TypeDetails right) { + switch (operation) { + case Equals: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Equivalent: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case NotEquals: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case NotEquivalent: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case LessThen: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Greater: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case LessOrEqual: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case GreaterOrEqual: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Is: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case As: return new TypeDetails(CollectionStatus.SINGLETON, right.getTypes()); + case Union: return left.union(right); + case Or: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case And: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Xor: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Implies : return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Times: + TypeDetails result = new TypeDetails(CollectionStatus.SINGLETON); + if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) + result.addType("integer"); + else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) + result.addType("decimal"); + return result; + case DivideBy: + result = new TypeDetails(CollectionStatus.SINGLETON); + if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) + result.addType("decimal"); + else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) + result.addType("decimal"); + return result; + case Concatenate: + result = new TypeDetails(CollectionStatus.SINGLETON, ""); + case Plus: + result = new TypeDetails(CollectionStatus.SINGLETON); + if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) + result.addType("integer"); + else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) + result.addType("decimal"); + else if (left.hasType(worker, "string", "id", "code", "uri") && right.hasType(worker, "string", "id", "code", "uri")) + result.addType("string"); + return result; + case Minus: + result = new TypeDetails(CollectionStatus.SINGLETON); + if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) + result.addType("integer"); + else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) + result.addType("decimal"); + return result; + case Div: + case Mod: + result = new TypeDetails(CollectionStatus.SINGLETON); + if (left.hasType(worker, "integer") && right.hasType(worker, "integer")) + result.addType("integer"); + else if (left.hasType(worker, "integer", "decimal") && right.hasType(worker, "integer", "decimal")) + result.addType("decimal"); + return result; + case In: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case MemberOf: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + case Contains: return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + default: + return null; + } + } + + private ExpressionNode organisePrecedence(FHIRLexer lexer, ExpressionNode node) { + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Times, Operation.DivideBy, Operation.Div, Operation.Mod)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Plus, Operation.Minus, Operation.Concatenate)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Union)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.LessThen, Operation.Greater, Operation.LessOrEqual, Operation.GreaterOrEqual)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Is)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Equals, Operation.Equivalent, Operation.NotEquals, Operation.NotEquivalent)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.And)); + node = gatherPrecedence(lexer, node, EnumSet.of(Operation.Xor, Operation.Or)); + // last: implies + return node; + } + + /** + * Parse a path for later use using execute + * + * @param path + * @return + * @throws PathEngineException + * @throws Exception + */ + public ExpressionNode parse(String path) throws FHIRLexerException { + FHIRLexer lexer = new FHIRLexer(path); + if (lexer.done()) + throw lexer.error("Path cannot be empty"); + ExpressionNode result = parseExpression(lexer, true); + if (!lexer.done()) + throw lexer.error("Premature ExpressionNode termination at unexpected token \""+lexer.getCurrent()+"\""); + result.check(); + return result; + } + + /** + * Parse a path that is part of some other syntax + * + * @param path + * @return + * @throws PathEngineException + * @throws Exception + */ + public ExpressionNode parse(FHIRLexer lexer) throws FHIRLexerException { + ExpressionNode result = parseExpression(lexer, true); + result.check(); + return result; + } + + private ExpressionNode parseExpression(FHIRLexer lexer, boolean proximal) throws FHIRLexerException { + ExpressionNode result = new ExpressionNode(lexer.nextId()); + SourceLocation c = lexer.getCurrentStartLocation(); + result.setStart(lexer.getCurrentLocation()); + // special: + if (lexer.getCurrent().equals("-")) { + lexer.take(); + lexer.setCurrent("-"+lexer.getCurrent()); + } + if (lexer.getCurrent().equals("+")) { + lexer.take(); + lexer.setCurrent("+"+lexer.getCurrent()); + } + if (lexer.isConstant(false)) { + checkConstant(lexer.getCurrent(), lexer); + result.setConstant(lexer.take()); + result.setKind(Kind.Constant); + result.setEnd(lexer.getCurrentLocation()); + } else if ("(".equals(lexer.getCurrent())) { + lexer.next(); + result.setKind(Kind.Group); + result.setGroup(parseExpression(lexer, true)); + if (!")".equals(lexer.getCurrent())) + throw lexer.error("Found "+lexer.getCurrent()+" expecting a \")\""); + result.setEnd(lexer.getCurrentLocation()); + lexer.next(); + } else { + if (!lexer.isToken() && !lexer.getCurrent().startsWith("\"")) + throw lexer.error("Found "+lexer.getCurrent()+" expecting a token name"); + if (lexer.getCurrent().startsWith("\"")) + result.setName(lexer.readConstant("Path Name")); + else + result.setName(lexer.take()); + result.setEnd(lexer.getCurrentLocation()); + if (!result.checkName()) + throw lexer.error("Found "+result.getName()+" expecting a valid token name"); + if ("(".equals(lexer.getCurrent())) { + Function f = Function.fromCode(result.getName()); + FunctionDetails details = null; + if (f == null) { + if (hostServices != null) + details = hostServices.resolveFunction(result.getName()); + if (details == null) + throw lexer.error("The name "+result.getName()+" is not a valid function name"); + f = Function.Custom; + } + result.setKind(Kind.Function); + result.setFunction(f); + lexer.next(); + while (!")".equals(lexer.getCurrent())) { + result.getParameters().add(parseExpression(lexer, true)); + if (",".equals(lexer.getCurrent())) + lexer.next(); + else if (!")".equals(lexer.getCurrent())) + throw lexer.error("The token "+lexer.getCurrent()+" is not expected here - either a \",\" or a \")\" expected"); + } + result.setEnd(lexer.getCurrentLocation()); + lexer.next(); + checkParameters(lexer, c, result, details); + } else + result.setKind(Kind.Name); + } + ExpressionNode focus = result; + if ("[".equals(lexer.getCurrent())) { + lexer.next(); + ExpressionNode item = new ExpressionNode(lexer.nextId()); + item.setKind(Kind.Function); + item.setFunction(ExpressionNode.Function.Item); + item.getParameters().add(parseExpression(lexer, true)); + if (!lexer.getCurrent().equals("]")) + throw lexer.error("The token "+lexer.getCurrent()+" is not expected here - a \"]\" expected"); + lexer.next(); + result.setInner(item); + focus = item; + } + if (".".equals(lexer.getCurrent())) { + lexer.next(); + focus.setInner(parseExpression(lexer, false)); + } + result.setProximal(proximal); + if (proximal) { + while (lexer.isOp()) { + focus.setOperation(ExpressionNode.Operation.fromCode(lexer.getCurrent())); + focus.setOpStart(lexer.getCurrentStartLocation()); + focus.setOpEnd(lexer.getCurrentLocation()); + lexer.next(); + focus.setOpNext(parseExpression(lexer, false)); + focus = focus.getOpNext(); + } + result = organisePrecedence(lexer, result); + } + return result; + } + + private List preOperate(List left, Operation operation) { + switch (operation) { + case And: + return isBoolean(left, false) ? makeBoolean(false) : null; + case Or: + return isBoolean(left, true) ? makeBoolean(true) : null; + case Implies: + return convertToBoolean(left) ? null : makeBoolean(true); + default: + return null; + } + } + + private Base processConstant(ExecutionContext context, String constant) throws PathEngineException { + if (constant.equals("true")) { + return new BooleanType(true); + } else if (constant.equals("false")) { + return new BooleanType(false); + } else if (constant.equals("{}")) { + return null; + } else if (Utilities.isInteger(constant)) { + return new IntegerType(constant); + } else if (Utilities.isDecimal(constant)) { + return new DecimalType(constant); + } else if (constant.startsWith("\'")) { + return new StringType(processConstantString(constant)); + } else if (constant.startsWith("%")) { + return resolveConstant(context, constant); + } else if (constant.startsWith("@")) { + return processDateConstant(context.appInfo, constant.substring(1)); + } else { + return new StringType(constant); + } + } + + private String processConstantString(String s) throws PathEngineException { + StringBuilder b = new StringBuilder(); + int i = 1; + while (i < s.length()-1) { + char ch = s.charAt(i); + if (ch == '\\') { + i++; + switch (s.charAt(i)) { + case 't': + b.append('\t'); + break; + case 'r': + b.append('\r'); + break; + case 'n': + b.append('\n'); + break; + case 'f': + b.append('\f'); + break; + case '\'': + b.append('\''); + break; + case '\\': + b.append('\\'); + break; + case '/': + b.append('/'); + break; + case 'u': + i++; + int uc = Integer.parseInt(s.substring(i, i+4), 16); + b.append((char) uc); + i = i + 3; + break; + default: + throw new PathEngineException("Unknown character escape \\"+s.charAt(i)); + } + i++; + } else { + b.append(ch); + i++; + } + } + return b.toString(); + } + + private Base processDateConstant(Object appInfo, String value) throws PathEngineException { + if (value.startsWith("T")) + return new TimeType(value.substring(1)); + String v = value; + if (v.length() > 10) { + int i = v.substring(10).indexOf("-"); + if (i == -1) + i = v.substring(10).indexOf("+"); + if (i == -1) + i = v.substring(10).indexOf("Z"); + v = i == -1 ? value : v.substring(0, 10+i); + } + if (v.length() > 10) + return new DateTimeType(value); + else + return new DateType(value); + } + + private TypeDetails readConstantType(ExecutionTypeContext context, String constant) throws PathEngineException { + if (constant.equals("true")) + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + else if (constant.equals("false")) + return new TypeDetails(CollectionStatus.SINGLETON, "boolean"); + else if (Utilities.isInteger(constant)) + return new TypeDetails(CollectionStatus.SINGLETON, "integer"); + else if (Utilities.isDecimal(constant)) + return new TypeDetails(CollectionStatus.SINGLETON, "decimal"); + else if (constant.startsWith("%")) + return resolveConstantType(context, constant); + else + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + } + + private Base resolveConstant(ExecutionContext context, String s) throws PathEngineException { + if (s.equals("%sct")) + return new StringType("http://snomed.info/sct"); + else if (s.equals("%loinc")) + return new StringType("http://loinc.org"); + else if (s.equals("%ucum")) + return new StringType("http://unitsofmeasure.org"); + else if (s.equals("%resource")) { + if (context.resource == null) + throw new PathEngineException("Cannot use %resource in this context"); + return context.resource; + } else if (s.equals("%context")) { + return context.context; + } else if (s.equals("%us-zip")) + return new StringType("[0-9]{5}(-[0-9]{4}){0,1}"); + else if (s.startsWith("%\"vs-")) + return new StringType("http://hl7.org/fhir/ValueSet/"+s.substring(5, s.length()-1)+""); + else if (s.startsWith("%\"cs-")) + return new StringType("http://hl7.org/fhir/"+s.substring(5, s.length()-1)+""); + else if (s.startsWith("%\"ext-")) + return new StringType("http://hl7.org/fhir/StructureDefinition/"+s.substring(6, s.length()-1)); + else if (hostServices == null) + throw new PathEngineException("Unknown fixed constant '"+s+"'"); + else + return hostServices.resolveConstant(context.appInfo, s.substring(1)); + } + + private TypeDetails resolveConstantType(ExecutionTypeContext context, String s) throws PathEngineException { + if (s.equals("%sct")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.equals("%loinc")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.equals("%ucum")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.equals("%resource")) { + if (context.resource == null) + throw new PathEngineException("%resource cannot be used in this context"); + return new TypeDetails(CollectionStatus.SINGLETON, context.resource); + } else if (s.equals("%context")) { + return new TypeDetails(CollectionStatus.SINGLETON, context.context); + } else if (s.equals("%map-codes")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.equals("%us-zip")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.startsWith("%\"vs-")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.startsWith("%\"cs-")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (s.startsWith("%\"ext-")) + return new TypeDetails(CollectionStatus.SINGLETON, "string"); + else if (hostServices == null) + throw new PathEngineException("Unknown fixed constant type for '"+s+"'"); + else + return hostServices.resolveConstantType(context.appInfo, s); + } + + private String tailDot(String path) { + return path.substring(path.lastIndexOf(".") + 1); + } + + private boolean tailMatches(ElementDefinition t, String d) { + String tail = tailDot(t.getPath()); + if (d.contains("[")) + return tail.startsWith(d.substring(0, d.indexOf('['))); + else + return tail.equals(d); + } + + public String takeLog() { + if (!hasLog()) + return ""; + String s = log.toString(); + log = new StringBuilder(); + return s; + } + + + // if the fhir path expressions are allowed to use constants beyond those defined in the specification + // the application can implement them by providing a constant resolver + public interface IEvaluationContext { + /** + * Check the function parameters, and throw an error if they are incorrect, or return the type for the function + * @param functionName + * @param parameters + * @return + */ + public TypeDetails checkFunction(Object appContext, String functionName, List parameters) throws PathEngineException; + + /** + * @param appContext + * @param functionName + * @param parameters + * @return + */ + public List executeFunction(Object appContext, String functionName, List> parameters); + + /** + * when the .log() function is called + * + * @param argument + * @param focus + * @return + */ + public boolean log(String argument, List focus); + + /** + * A constant reference - e.g. a reference to a name that must be resolved in context. + * The % will be removed from the constant name before this is invoked. + * + * This will also be called if the host invokes the FluentPath engine with a context of null + * + * @param appContext - content passed into the fluent path engine + * @param name - name reference to resolve + * @return the value of the reference (or null, if it's not valid, though can throw an exception if desired) + */ + public Base resolveConstant(Object appContext, String name) throws PathEngineException; + + // extensibility for functions + + public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException; + + /** + * + * @param functionName + * @return null if the function is not known + */ + public FunctionDetails resolveFunction(String functionName); + + /** + * Implementation of resolve() function. Passed a string, return matching resource, if one is known - else null + * @param appInfo + * @param url + * @return + */ + public Base resolveReference(Object appContext, String url); + + public class FunctionDetails { + private String description; + private int minParameters; + private int maxParameters; + public FunctionDetails(String description, int minParameters, int maxParameters) { + super(); + this.description = description; + this.minParameters = minParameters; + this.maxParameters = maxParameters; + } + public String getDescription() { + return description; + } + + public int getMaxParameters() { + return maxParameters; + } + + public int getMinParameters() { + return minParameters; + } + + } + + } + + private class ExecutionContext { + private Object appInfo; + private Base resource; + private Base context; + private Base thisItem; + private Map aliases; + + public ExecutionContext(Object appInfo, Base resource, Base context, Map aliases, Base thisItem) { + this.appInfo = appInfo; + this.context = context; + this.resource = resource; + this.aliases = aliases; + this.thisItem = thisItem; + } + + public void addAlias(String name, List focus) throws FHIRException { + if (aliases == null) + aliases = new HashMap(); + else + aliases = new HashMap(aliases); // clone it, since it's going to change + if (focus.size() > 1) + throw new FHIRException("Attempt to alias a collection, not a singleton"); + aliases.put(name, focus.size() == 0 ? null : focus.get(0)); + } + + public Base getAlias(String name) { + return aliases == null ? null : aliases.get(name); + } + + public Base getResource() { + return resource; + } + + public Base getThisItem() { + return thisItem; + } + } + + private class ExecutionTypeContext { + private Object appInfo; + private String resource; + private String context; + private TypeDetails thisItem; + + + public ExecutionTypeContext(Object appInfo, String resource, String context, TypeDetails thisItem) { + super(); + this.appInfo = appInfo; + this.resource = resource; + this.context = context; + this.thisItem = thisItem; + + } + public String getResource() { + return resource; + } + public TypeDetails getThisItem() { + return thisItem; + } + } + + public class ElementDefinitionMatch { + private ElementDefinition definition; + private String fixedType; + public ElementDefinitionMatch(ElementDefinition definition, String fixedType) { + super(); + this.definition = definition; + this.fixedType = fixedType; + } + public ElementDefinition getDefinition() { + return definition; + } + public String getFixedType() { + return fixedType; + } + + } + +} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java index d0e03a10ee0..969ccd4bb64 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java @@ -4,19 +4,19 @@ package org.hl7.fhir.r4.utils.client; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to + * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. @@ -27,18 +27,20 @@ package org.hl7.fhir.r4.utils.client; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ + + */ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URI; import java.net.URLConnection; +import java.nio.charset.StandardCharsets; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; @@ -46,7 +48,9 @@ import java.util.Date; import java.util.List; import java.util.Map; +import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.CharSet; import org.apache.commons.lang3.StringUtils; import org.apache.http.Header; import org.apache.http.HttpEntity; @@ -85,397 +89,447 @@ import org.hl7.fhir.r4.utils.ResourceUtilities; * @author Claude Nanjo */ public class ClientUtils { - - public static String DEFAULT_CHARSET = "UTF-8"; - public static final String HEADER_LOCATION = "location"; - - public static ResourceRequest issueOptionsRequest(URI optionsUri, String resourceFormat, HttpHost proxy, int timeout) { - HttpOptions options = new HttpOptions(optionsUri); - return issueResourceRequest(resourceFormat, options, proxy, timeout); - } - - public static ResourceRequest issueGetResourceRequest(URI resourceUri, String resourceFormat, HttpHost proxy, int timeout) { - HttpGet httpget = new HttpGet(resourceUri); - return issueResourceRequest(resourceFormat, httpget, proxy, timeout); - } - - public static ResourceRequest issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat, List
headers, HttpHost proxy, int timeout) { - HttpPut httpPut = new HttpPut(resourceUri); - return issueResourceRequest(resourceFormat, httpPut, payload, headers, proxy, timeout); - } - - public static ResourceRequest issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat, HttpHost proxy, int timeout) { - HttpPut httpPut = new HttpPut(resourceUri); - return issueResourceRequest(resourceFormat, httpPut, payload, null, proxy, timeout); - } - - public static ResourceRequest issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, List
headers, HttpHost proxy, int timeout) { - HttpPost httpPost = new HttpPost(resourceUri); - return issueResourceRequest(resourceFormat, httpPost, payload, headers, proxy, timeout); - } - - - public static ResourceRequest issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, HttpHost proxy, int timeout) { - return issuePostRequest(resourceUri, payload, resourceFormat, null, proxy, timeout); - } - - public static Bundle issueGetFeedRequest(URI resourceUri, String resourceFormat, HttpHost proxy, int timeout) { - HttpGet httpget = new HttpGet(resourceUri); - configureFhirRequest(httpget, resourceFormat); - HttpResponse response = sendRequest(httpget, proxy, timeout); - return unmarshalReference(response, resourceFormat); - } - - public static Bundle postBatchRequest(URI resourceUri, byte[] payload, String resourceFormat, HttpHost proxy) { - HttpPost httpPost = new HttpPost(resourceUri); - configureFhirRequest(httpPost, resourceFormat); - HttpResponse response = sendPayload(httpPost, payload, proxy); - return unmarshalFeed(response, resourceFormat); - } - - public static boolean issueDeleteRequest(URI resourceUri, HttpHost proxy, int timeout) { - HttpDelete deleteRequest = new HttpDelete(resourceUri); - HttpResponse response = sendRequest(deleteRequest, proxy, timeout); - int responseStatusCode = response.getStatusLine().getStatusCode(); - boolean deletionSuccessful = false; - if(responseStatusCode == 204) { - deletionSuccessful = true; - } - return deletionSuccessful; - } - - /*********************************************************** - * Request/Response Helper methods - ***********************************************************/ - - protected static ResourceRequest issueResourceRequest(String resourceFormat, HttpUriRequest request, HttpHost proxy, int timeout) { - return issueResourceRequest(resourceFormat, request, null, proxy, timeout); - } - - /** - * @param resourceFormat - * @param options - * @return - */ - protected static ResourceRequest issueResourceRequest(String resourceFormat, HttpUriRequest request, byte[] payload, HttpHost proxy, int timeout) { - return issueResourceRequest(resourceFormat, request, payload, null, proxy, timeout); - } - - /** - * @param resourceFormat - * @param options - * @return - */ - protected static ResourceRequest issueResourceRequest(String resourceFormat, HttpUriRequest request, byte[] payload, List
headers, HttpHost proxy, int timeout) { - configureFhirRequest(request, resourceFormat, headers); - HttpResponse response = null; - if(request instanceof HttpEntityEnclosingRequest && payload != null) { - response = sendPayload((HttpEntityEnclosingRequestBase)request, payload, proxy); - } else if (request instanceof HttpEntityEnclosingRequest && payload == null){ - throw new EFhirClientException("PUT and POST requests require a non-null payload"); - } else { - response = sendRequest(request, proxy, timeout); - } - T resource = unmarshalReference(response, resourceFormat); - return new ResourceRequest(resource, response.getStatusLine().getStatusCode(), ClientUtils.getLocationHeader(response)); - } - - - /** - * Method adds required request headers. - * TODO handle JSON request as well. - * - * @param request - */ - protected static void configureFhirRequest(HttpRequest request, String format) { - configureFhirRequest(request, format, null); - } - - /** - * Method adds required request headers. - * TODO handle JSON request as well. - * - * @param request - */ - protected static void configureFhirRequest(HttpRequest request, String format, List
headers) { - request.addHeader("User-Agent", "Java FHIR Client for FHIR"); - if (format != null) { - request.addHeader("Accept",format); - request.addHeader("Content-Type", format + ";charset=" + DEFAULT_CHARSET); - } - request.addHeader("Accept-Charset", DEFAULT_CHARSET); - if(headers != null) { - for(Header header : headers) { - request.addHeader(header); - } - } - } - - /** - * Method posts request payload - * - * @param request - * @param payload - * @return - */ - protected static HttpResponse sendPayload(HttpEntityEnclosingRequestBase request, byte[] payload, HttpHost proxy) { - HttpResponse response = null; - try { - HttpClient httpclient = new DefaultHttpClient(); - if(proxy != null) { - httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); - } - request.setEntity(new ByteArrayEntity(payload)); - response = httpclient.execute(request); - } catch(IOException ioe) { - throw new EFhirClientException("Error sending HTTP Post/Put Payload", ioe); - } - return response; - } - - /** - * - * @param request - * @param payload - * @return - */ - protected static HttpResponse sendRequest(HttpUriRequest request, HttpHost proxy, int timeout) { - HttpResponse response = null; - try { - HttpClient httpclient = new DefaultHttpClient(); - - HttpParams params = httpclient.getParams(); - HttpConnectionParams.setConnectionTimeout(params, timeout); - HttpConnectionParams.setSoTimeout(params, timeout); - if(proxy != null) { - httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); - } - response = httpclient.execute(request); - } catch(IOException ioe) { - throw new EFhirClientException("Error sending Http Request: "+ioe.getMessage(), ioe); - } - return response; - } - - /** - * Unmarshals a resource from the response stream. - * - * @param response - * @return - */ - @SuppressWarnings("unchecked") - protected static T unmarshalReference(HttpResponse response, String format) { - T resource = null; - OperationOutcome error = null; - InputStream instream = null; - HttpEntity entity = response.getEntity(); - if (entity != null && entity.getContentLength() > 0) { - try { - instream = entity.getContent(); -// System.out.println(writeInputStreamAsString(instream)); - resource = (T)getParser(format).parse(instream); - if (resource instanceof OperationOutcome && hasError((OperationOutcome)resource)) { - error = (OperationOutcome) resource; - } - } catch(IOException ioe) { - throw new EFhirClientException("Error unmarshalling entity from Http Response", ioe); - } catch(Exception e) { - throw new EFhirClientException("Error parsing response message", e); - } finally { - try{instream.close();}catch(IOException ioe){/* TODO log error */} - } - } - if(error != null) { - throw new EFhirClientException("Error unmarshalling resource: "+ResourceUtilities.getErrorDescription(error), error); - } - return resource; - } - - /** - * Unmarshals Bundle from response stream. - * - * @param response - * @return - */ - protected static Bundle unmarshalFeed(HttpResponse response, String format) { - Bundle feed = null; - InputStream instream = null; - HttpEntity entity = response.getEntity(); - String contentType = response.getHeaders("Content-Type")[0].getValue(); - OperationOutcome error = null; - try { - if (entity != null) { - instream = entity.getContent(); - if(contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains("text/xml+fhir")) { -// error = (OperationOutcome)getParser(ResourceFormat.RESOURCE_XML.getHeader()).parse(instream); -// } else { - Resource rf = getParser(format).parse(instream); - if (rf instanceof Bundle) - feed = (Bundle) rf; - else if (rf instanceof OperationOutcome && hasError((OperationOutcome) rf)) { - error = (OperationOutcome) rf; - } else { - throw new EFhirClientException("Error unmarshalling feed from Http Response: a resource was returned instead"); - } - } - instream.close(); - } - } catch(IOException ioe) { - throw new EFhirClientException("Error unmarshalling feed from Http Response", ioe); - } catch(Exception e) { - throw new EFhirClientException("Error parsing response message", e); - } finally { - try{instream.close();}catch(IOException ioe){/* TODO log error */} - } - if(error != null) { - throw new EFhirClientException("Error unmarshalling feed: "+ResourceUtilities.getErrorDescription(error), error); - } - return feed; - } - - private static boolean hasError(OperationOutcome oo) { - for (OperationOutcomeIssueComponent t : oo.getIssue()) - if (t.getSeverity() == IssueSeverity.ERROR || t.getSeverity() == IssueSeverity.FATAL) - return true; - return false; + public static final String DEFAULT_CHARSET = "UTF-8"; + public static final String HEADER_LOCATION = "location"; + + private HttpHost proxy; + private int timeout = 5000; + private String username; + private String password; + + + public HttpHost getProxy() { + return proxy; } - protected static String getLocationHeader(HttpResponse response) { - String location = null; - if(response.getHeaders("location").length > 0) {//TODO Distinguish between both cases if necessary - location = response.getHeaders("location")[0].getValue(); - } else if(response.getHeaders("content-location").length > 0) { - location = response.getHeaders("content-location")[0].getValue(); - } - return location; - } - - - /***************************************************************** - * Client connection methods - * ***************************************************************/ - - public static HttpURLConnection buildConnection(URI baseServiceUri, String tail) { - try { - HttpURLConnection client = (HttpURLConnection) baseServiceUri.resolve(tail).toURL().openConnection(); - return client; - } catch(MalformedURLException mue) { - throw new EFhirClientException("Invalid Service URL", mue); - } catch(IOException ioe) { - throw new EFhirClientException("Unable to establish connection to server: " + baseServiceUri.toString() + tail, ioe); - } - } - - public static HttpURLConnection buildConnection(URI baseServiceUri, ResourceType resourceType, String id) { - return buildConnection(baseServiceUri, ResourceAddress.buildRelativePathFromResourceType(resourceType, id)); - } - - /****************************************************************** - * Other general helper methods - * ****************************************************************/ - - - public static byte[] getResourceAsByteArray(T resource, boolean pretty, boolean isJson) { - ByteArrayOutputStream baos = null; - byte[] byteArray = null; - try { - baos = new ByteArrayOutputStream(); - IParser parser = null; - if(isJson) { - parser = new JsonParser(); - } else { - parser = new XmlParser(); - } + public void setProxy(HttpHost proxy) { + this.proxy = proxy; + } + + public int getTimeout() { + return timeout; + } + + public void setTimeout(int timeout) { + this.timeout = timeout; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public ResourceRequest issueOptionsRequest(URI optionsUri, String resourceFormat) { + HttpOptions options = new HttpOptions(optionsUri); + return issueResourceRequest(resourceFormat, options); + } + + public ResourceRequest issueGetResourceRequest(URI resourceUri, String resourceFormat) { + HttpGet httpget = new HttpGet(resourceUri); + return issueResourceRequest(resourceFormat, httpget); + } + + public ResourceRequest issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat, List
headers) { + HttpPut httpPut = new HttpPut(resourceUri); + return issueResourceRequest(resourceFormat, httpPut, payload, headers); + } + + public ResourceRequest issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat) { + HttpPut httpPut = new HttpPut(resourceUri); + return issueResourceRequest(resourceFormat, httpPut, payload, null); + } + + public ResourceRequest issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, List
headers) { + HttpPost httpPost = new HttpPost(resourceUri); + return issueResourceRequest(resourceFormat, httpPost, payload, headers); + } + + + public ResourceRequest issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat) { + return issuePostRequest(resourceUri, payload, resourceFormat, null); + } + + public Bundle issueGetFeedRequest(URI resourceUri, String resourceFormat) { + HttpGet httpget = new HttpGet(resourceUri); + configureFhirRequest(httpget, resourceFormat); + HttpResponse response = sendRequest(httpget); + return unmarshalReference(response, resourceFormat); + } + + private void setAuth(HttpRequest httpget) { + if (password != null) { + try { + byte[] b = Base64.encodeBase64((username+":"+password).getBytes("ASCII")); + String b64 = new String(b, StandardCharsets.US_ASCII); + httpget.setHeader("Authorization", "Basic " + b64); + } catch (UnsupportedEncodingException e) { + } + } + } + + public Bundle postBatchRequest(URI resourceUri, byte[] payload, String resourceFormat) { + HttpPost httpPost = new HttpPost(resourceUri); + configureFhirRequest(httpPost, resourceFormat); + HttpResponse response = sendPayload(httpPost, payload, proxy); + return unmarshalFeed(response, resourceFormat); + } + + public boolean issueDeleteRequest(URI resourceUri) { + HttpDelete deleteRequest = new HttpDelete(resourceUri); + HttpResponse response = sendRequest(deleteRequest); + int responseStatusCode = response.getStatusLine().getStatusCode(); + boolean deletionSuccessful = false; + if(responseStatusCode == 204) { + deletionSuccessful = true; + } + return deletionSuccessful; + } + + /*********************************************************** + * Request/Response Helper methods + ***********************************************************/ + + protected ResourceRequest issueResourceRequest(String resourceFormat, HttpUriRequest request) { + return issueResourceRequest(resourceFormat, request, null); + } + + /** + * @param resourceFormat + * @param options + * @return + */ + protected ResourceRequest issueResourceRequest(String resourceFormat, HttpUriRequest request, byte[] payload) { + return issueResourceRequest(resourceFormat, request, payload, null); + } + + /** + * @param resourceFormat + * @param options + * @return + */ + protected ResourceRequest issueResourceRequest(String resourceFormat, HttpUriRequest request, byte[] payload, List
headers) { + configureFhirRequest(request, resourceFormat, headers); + HttpResponse response = null; + if(request instanceof HttpEntityEnclosingRequest && payload != null) { + response = sendPayload((HttpEntityEnclosingRequestBase)request, payload, proxy); + } else if (request instanceof HttpEntityEnclosingRequest && payload == null){ + throw new EFhirClientException("PUT and POST requests require a non-null payload"); + } else { + response = sendRequest(request); + } + T resource = unmarshalReference(response, resourceFormat); + return new ResourceRequest(resource, response.getStatusLine().getStatusCode(), getLocationHeader(response)); + } + + + /** + * Method adds required request headers. + * TODO handle JSON request as well. + * + * @param request + */ + protected void configureFhirRequest(HttpRequest request, String format) { + configureFhirRequest(request, format, null); + } + + /** + * Method adds required request headers. + * TODO handle JSON request as well. + * + * @param request + */ + protected void configureFhirRequest(HttpRequest request, String format, List
headers) { + request.addHeader("User-Agent", "Java FHIR Client for FHIR"); + + if (format != null) { + request.addHeader("Accept",format); + request.addHeader("Content-Type", format + ";charset=" + DEFAULT_CHARSET); + } + request.addHeader("Accept-Charset", DEFAULT_CHARSET); + if(headers != null) { + for(Header header : headers) { + request.addHeader(header); + } + } + setAuth(request); + } + + /** + * Method posts request payload + * + * @param request + * @param payload + * @return + */ + protected HttpResponse sendPayload(HttpEntityEnclosingRequestBase request, byte[] payload, HttpHost proxy) { + HttpResponse response = null; + try { + HttpClient httpclient = new DefaultHttpClient(); + if(proxy != null) { + httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); + } + request.setEntity(new ByteArrayEntity(payload)); + response = httpclient.execute(request); + } catch(IOException ioe) { + throw new EFhirClientException("Error sending HTTP Post/Put Payload", ioe); + } + return response; + } + + /** + * + * @param request + * @param payload + * @return + */ + protected HttpResponse sendRequest(HttpUriRequest request) { + HttpResponse response = null; + try { + HttpClient httpclient = new DefaultHttpClient(); + + HttpParams params = httpclient.getParams(); + HttpConnectionParams.setConnectionTimeout(params, timeout); + HttpConnectionParams.setSoTimeout(params, timeout); + if(proxy != null) { + httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); + } + response = httpclient.execute(request); + } catch(IOException ioe) { + throw new EFhirClientException("Error sending Http Request: "+ioe.getMessage(), ioe); + } + return response; + } + + /** + * Unmarshals a resource from the response stream. + * + * @param response + * @return + */ + @SuppressWarnings("unchecked") + protected T unmarshalReference(HttpResponse response, String format) { + T resource = null; + OperationOutcome error = null; + InputStream instream = null; + HttpEntity entity = response.getEntity(); + if (entity != null && entity.getContentLength() > 0) { + try { + instream = entity.getContent(); + // System.out.println(writeInputStreamAsString(instream)); + resource = (T)getParser(format).parse(instream); + if (resource instanceof OperationOutcome && hasError((OperationOutcome)resource)) { + error = (OperationOutcome) resource; + } + } catch(IOException ioe) { + throw new EFhirClientException("Error unmarshalling entity from Http Response", ioe); + } catch(Exception e) { + throw new EFhirClientException("Error parsing response message", e); + } finally { + try{instream.close();}catch(IOException ioe){/* TODO log error */} + } + } + if(error != null) { + throw new EFhirClientException("Error unmarshalling resource: "+ResourceUtilities.getErrorDescription(error), error); + } + return resource; + } + + /** + * Unmarshals Bundle from response stream. + * + * @param response + * @return + */ + protected Bundle unmarshalFeed(HttpResponse response, String format) { + Bundle feed = null; + InputStream instream = null; + HttpEntity entity = response.getEntity(); + String contentType = response.getHeaders("Content-Type")[0].getValue(); + OperationOutcome error = null; + try { + if (entity != null) { + instream = entity.getContent(); + if(contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains("text/xml+fhir")) { + // error = (OperationOutcome)getParser(ResourceFormat.RESOURCE_XML.getHeader()).parse(instream); + // } else { + Resource rf = getParser(format).parse(instream); + if (rf instanceof Bundle) + feed = (Bundle) rf; + else if (rf instanceof OperationOutcome && hasError((OperationOutcome) rf)) { + error = (OperationOutcome) rf; + } else { + throw new EFhirClientException("Error unmarshalling feed from Http Response: a resource was returned instead"); + } + } + instream.close(); + } + } catch(IOException ioe) { + throw new EFhirClientException("Error unmarshalling feed from Http Response", ioe); + } catch(Exception e) { + throw new EFhirClientException("Error parsing response message", e); + } finally { + try{instream.close();}catch(IOException ioe){/* TODO log error */} + } + if(error != null) { + throw new EFhirClientException("Error unmarshalling feed: "+ResourceUtilities.getErrorDescription(error), error); + } + return feed; + } + + private boolean hasError(OperationOutcome oo) { + for (OperationOutcomeIssueComponent t : oo.getIssue()) + if (t.getSeverity() == IssueSeverity.ERROR || t.getSeverity() == IssueSeverity.FATAL) + return true; + return false; + } + + protected String getLocationHeader(HttpResponse response) { + String location = null; + if(response.getHeaders("location").length > 0) {//TODO Distinguish between both cases if necessary + location = response.getHeaders("location")[0].getValue(); + } else if(response.getHeaders("content-location").length > 0) { + location = response.getHeaders("content-location")[0].getValue(); + } + return location; + } + + + /***************************************************************** + * Client connection methods + * ***************************************************************/ + + public HttpURLConnection buildConnection(URI baseServiceUri, String tail) { + try { + HttpURLConnection client = (HttpURLConnection) baseServiceUri.resolve(tail).toURL().openConnection(); + return client; + } catch(MalformedURLException mue) { + throw new EFhirClientException("Invalid Service URL", mue); + } catch(IOException ioe) { + throw new EFhirClientException("Unable to establish connection to server: " + baseServiceUri.toString() + tail, ioe); + } + } + + public HttpURLConnection buildConnection(URI baseServiceUri, ResourceType resourceType, String id) { + return buildConnection(baseServiceUri, ResourceAddress.buildRelativePathFromResourceType(resourceType, id)); + } + + /****************************************************************** + * Other general helper methods + * ****************************************************************/ + + + public byte[] getResourceAsByteArray(T resource, boolean pretty, boolean isJson) { + ByteArrayOutputStream baos = null; + byte[] byteArray = null; + try { + baos = new ByteArrayOutputStream(); + IParser parser = null; + if(isJson) { + parser = new JsonParser(); + } else { + parser = new XmlParser(); + } parser.setOutputStyle(pretty ? OutputStyle.PRETTY : OutputStyle.NORMAL); - parser.compose(baos, resource); - baos.close(); - byteArray = baos.toByteArray(); - baos.close(); - } catch (Exception e) { - try{ - baos.close(); - }catch(Exception ex) { - throw new EFhirClientException("Error closing output stream", ex); - } - throw new EFhirClientException("Error converting output stream to byte array", e); - } - return byteArray; - } - - public static byte[] getFeedAsByteArray(Bundle feed, boolean pretty, boolean isJson) { - ByteArrayOutputStream baos = null; - byte[] byteArray = null; - try { - baos = new ByteArrayOutputStream(); - IParser parser = null; - if(isJson) { - parser = new JsonParser(); - } else { - parser = new XmlParser(); - } + parser.compose(baos, resource); + baos.close(); + byteArray = baos.toByteArray(); + baos.close(); + } catch (Exception e) { + try{ + baos.close(); + }catch(Exception ex) { + throw new EFhirClientException("Error closing output stream", ex); + } + throw new EFhirClientException("Error converting output stream to byte array", e); + } + return byteArray; + } + + public byte[] getFeedAsByteArray(Bundle feed, boolean pretty, boolean isJson) { + ByteArrayOutputStream baos = null; + byte[] byteArray = null; + try { + baos = new ByteArrayOutputStream(); + IParser parser = null; + if(isJson) { + parser = new JsonParser(); + } else { + parser = new XmlParser(); + } parser.setOutputStyle(pretty ? OutputStyle.PRETTY : OutputStyle.NORMAL); - parser.compose(baos, feed); - baos.close(); - byteArray = baos.toByteArray(); - baos.close(); - } catch (Exception e) { - try{ - baos.close(); - }catch(Exception ex) { - throw new EFhirClientException("Error closing output stream", ex); - } - throw new EFhirClientException("Error converting output stream to byte array", e); - } - return byteArray; - } - - public static Calendar getLastModifiedResponseHeaderAsCalendarObject(URLConnection serverConnection) { - String dateTime = null; - try { - dateTime = serverConnection.getHeaderField("Last-Modified"); - SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); - Date lastModifiedTimestamp = format.parse(dateTime); - Calendar calendar=Calendar.getInstance(); - calendar.setTime(lastModifiedTimestamp); - return calendar; - } catch(ParseException pe) { - throw new EFhirClientException("Error parsing Last-Modified response header " + dateTime, pe); - } - } - - protected static IParser getParser(String format) { - if(StringUtils.isBlank(format)) { - format = ResourceFormat.RESOURCE_XML.getHeader(); - } - if(format.equalsIgnoreCase("json") || format.equalsIgnoreCase(ResourceFormat.RESOURCE_JSON.getHeader()) || format.equalsIgnoreCase(ResourceFormat.RESOURCE_JSON.getHeader())) { - return new JsonParser(); - } else if(format.equalsIgnoreCase("xml") || format.equalsIgnoreCase(ResourceFormat.RESOURCE_XML.getHeader()) || format.equalsIgnoreCase(ResourceFormat.RESOURCE_XML.getHeader())) { - return new XmlParser(); - } else { - throw new EFhirClientException("Invalid format: " + format); - } - } - - /** - * Used for debugging - * - * @param instream - * @return - */ - protected static String writeInputStreamAsString(InputStream instream) { - String value = null; - try { - value = IOUtils.toString(instream, "UTF-8"); - System.out.println(value); - - } catch(IOException ioe) { - //Do nothing - } - return value; - } - - public static Bundle issuePostFeedRequest(URI resourceUri, Map parameters, String resourceName, Resource resource, String resourceFormat) throws IOException { + parser.compose(baos, feed); + baos.close(); + byteArray = baos.toByteArray(); + baos.close(); + } catch (Exception e) { + try{ + baos.close(); + }catch(Exception ex) { + throw new EFhirClientException("Error closing output stream", ex); + } + throw new EFhirClientException("Error converting output stream to byte array", e); + } + return byteArray; + } + + public Calendar getLastModifiedResponseHeaderAsCalendarObject(URLConnection serverConnection) { + String dateTime = null; + try { + dateTime = serverConnection.getHeaderField("Last-Modified"); + SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); + Date lastModifiedTimestamp = format.parse(dateTime); + Calendar calendar=Calendar.getInstance(); + calendar.setTime(lastModifiedTimestamp); + return calendar; + } catch(ParseException pe) { + throw new EFhirClientException("Error parsing Last-Modified response header " + dateTime, pe); + } + } + + protected IParser getParser(String format) { + if(StringUtils.isBlank(format)) { + format = ResourceFormat.RESOURCE_XML.getHeader(); + } + if(format.equalsIgnoreCase("json") || format.equalsIgnoreCase(ResourceFormat.RESOURCE_JSON.getHeader()) || format.equalsIgnoreCase(ResourceFormat.RESOURCE_JSON.getHeader())) { + return new JsonParser(); + } else if(format.equalsIgnoreCase("xml") || format.equalsIgnoreCase(ResourceFormat.RESOURCE_XML.getHeader()) || format.equalsIgnoreCase(ResourceFormat.RESOURCE_XML.getHeader())) { + return new XmlParser(); + } else { + throw new EFhirClientException("Invalid format: " + format); + } + } + + /** + * Used for debugging + * + * @param instream + * @return + */ + protected String writeInputStreamAsString(InputStream instream) { + String value = null; + try { + value = IOUtils.toString(instream, "UTF-8"); + System.out.println(value); + + } catch(IOException ioe) { + //Do nothing + } + return value; + } + + public Bundle issuePostFeedRequest(URI resourceUri, Map parameters, String resourceName, Resource resource, String resourceFormat) throws IOException { HttpPost httppost = new HttpPost(resourceUri); String boundary = "----WebKitFormBoundarykbMUo6H8QaUnYtRy"; httppost.addHeader("Content-Type", "multipart/form-data; boundary="+boundary); @@ -484,8 +538,8 @@ public class ClientUtils { HttpResponse response = sendPayload(httppost, encodeFormSubmission(parameters, resourceName, resource, boundary)); return unmarshalFeed(response, resourceFormat); } - - private static byte[] encodeFormSubmission(Map parameters, String resourceName, Resource resource, String boundary) throws IOException { + + private byte[] encodeFormSubmission(Map parameters, String resourceName, Resource resource, String boundary) throws IOException { ByteArrayOutputStream b = new ByteArrayOutputStream(); OutputStreamWriter w = new OutputStreamWriter(b, "UTF-8"); for (String name : parameters.keySet()) { @@ -517,7 +571,7 @@ public class ClientUtils { * @param payload * @return */ - protected static HttpResponse sendPayload(HttpEntityEnclosingRequestBase request, byte[] payload) { + protected HttpResponse sendPayload(HttpEntityEnclosingRequestBase request, byte[] payload) { HttpResponse response = null; try { HttpClient httpclient = new DefaultHttpClient(); @@ -528,6 +582,6 @@ public class ClientUtils { } return response; } - + } diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/FHIRToolingClient.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/FHIRToolingClient.java index c995a373c3b..8cbe961ec98 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/FHIRToolingClient.java +++ b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/FHIRToolingClient.java @@ -89,20 +89,28 @@ public class FHIRToolingClient { private String base; private ResourceAddress resourceAddress; private ResourceFormat preferredResourceFormat; - private HttpHost proxy; private int maxResultSetSize = -1;//_count private CapabilityStatement capabilities; - private int timeout = 5000; + + private ClientUtils utils = new ClientUtils(); //Pass enpoint for client - URI - public FHIRToolingClient(String baseServiceUrl) throws URISyntaxException { - preferredResourceFormat = ResourceFormat.RESOURCE_XML; - detectProxy(); + public FHIRToolingClient(String baseServiceUrl) throws URISyntaxException { + preferredResourceFormat = ResourceFormat.RESOURCE_XML; + detectProxy(); initialize(baseServiceUrl); - } - + } + + public FHIRToolingClient(String baseServiceUrl, String username, String password) throws URISyntaxException { + preferredResourceFormat = ResourceFormat.RESOURCE_XML; + utils.setUsername(username); + utils.setPassword(password); + detectProxy(); + initialize(baseServiceUrl); + } + public void configureProxy(String proxyHost, int proxyPort) { - proxy = new HttpHost(proxyHost, proxyPort); + utils.setProxy(new HttpHost(proxyHost, proxyPort)); } public void detectProxy() { @@ -155,7 +163,7 @@ public class FHIRToolingClient { public CapabilityStatement getCapabilitiesStatement() { CapabilityStatement conformance = null; try { - conformance = (CapabilityStatement)ClientUtils.issueGetResourceRequest(resourceAddress.resolveMetadataUri(false), getPreferredResourceFormat(), proxy, timeout).getReference(); + conformance = (CapabilityStatement)utils.issueGetResourceRequest(resourceAddress.resolveMetadataUri(false), getPreferredResourceFormat()).getReference(); } catch(Exception e) { handleException("An error has occurred while trying to fetch the server's conformance statement", e); } @@ -166,7 +174,7 @@ public class FHIRToolingClient { if (capabilities != null) return capabilities; try { - capabilities = (CapabilityStatement)ClientUtils.issueGetResourceRequest(resourceAddress.resolveMetadataUri(true), getPreferredResourceFormat(), proxy, timeout).getReference(); + capabilities = (CapabilityStatement)utils.issueGetResourceRequest(resourceAddress.resolveMetadataUri(true), getPreferredResourceFormat()).getReference(); } catch(Exception e) { handleException("An error has occurred while trying to fetch the server's conformance statement", e); } @@ -176,7 +184,7 @@ public class FHIRToolingClient { public T read(Class resourceClass, String id) {//TODO Change this to AddressableResource ResourceRequest result = null; try { - result = ClientUtils.issueGetResourceRequest(resourceAddress.resolveGetUriFromResourceClassAndId(resourceClass, id), getPreferredResourceFormat(), proxy, timeout); + result = utils.issueGetResourceRequest(resourceAddress.resolveGetUriFromResourceClassAndId(resourceClass, id), getPreferredResourceFormat()); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addSuccessStatus(200);//Only one for now @@ -192,7 +200,7 @@ public class FHIRToolingClient { public T vread(Class resourceClass, String id, String version) { ResourceRequest result = null; try { - result = ClientUtils.issueGetResourceRequest(resourceAddress.resolveGetUriFromResourceClassAndIdAndVersion(resourceClass, id, version), getPreferredResourceFormat(), proxy, timeout); + result = utils.issueGetResourceRequest(resourceAddress.resolveGetUriFromResourceClassAndIdAndVersion(resourceClass, id, version), getPreferredResourceFormat()); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addErrorStatus(405);//unknown @@ -211,7 +219,7 @@ public class FHIRToolingClient { // ResourceRequest result = null; // try { // List
headers = null; -// result = ClientUtils.issuePutRequest(resourceAddress.resolveGetUriFromResourceClassAndId(resourceClass, id),ClientUtils.getResourceAsByteArray(resource, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy); +// result = utils.issuePutRequest(resourceAddress.resolveGetUriFromResourceClassAndId(resourceClass, id),utils.getResourceAsByteArray(resource, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy); // result.addErrorStatus(410);//gone // result.addErrorStatus(404);//unknown // result.addErrorStatus(405); @@ -239,7 +247,7 @@ public class FHIRToolingClient { // // public boolean delete(Class resourceClass, String id) { // try { -// return ClientUtils.issueDeleteRequest(resourceAddress.resolveGetUriFromResourceClassAndId(resourceClass, id), proxy); +// return utils.issueDeleteRequest(resourceAddress.resolveGetUriFromResourceClassAndId(resourceClass, id), proxy); // } catch(Exception e) { // throw new EFhirClientException("An error has occurred while trying to delete this resource", e); // } @@ -251,7 +259,7 @@ public class FHIRToolingClient { // ResourceRequest resourceRequest = null; // try { // List
headers = null; -// resourceRequest = ClientUtils.issuePostRequest(resourceAddress.resolveGetUriFromResourceClass(resourceClass),ClientUtils.getResourceAsByteArray(resource, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy); +// resourceRequest = utils.issuePostRequest(resourceAddress.resolveGetUriFromResourceClass(resourceClass),utils.getResourceAsByteArray(resource, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy); // resourceRequest.addSuccessStatus(201); // if(resourceRequest.isUnsuccessfulRequest()) { // throw new EFhirClientException("Server responded with HTTP error code " + resourceRequest.getHttpStatus(), (OperationOutcome)resourceRequest.getPayload()); @@ -284,7 +292,7 @@ public class FHIRToolingClient { // public Bundle history(Calendar lastUpdate, Class resourceClass, String id) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceId(resourceClass, id, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceId(resourceClass, id, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history information for this resource", e); // } @@ -295,7 +303,7 @@ public class FHIRToolingClient { // public Bundle history(Date lastUpdate, Class resourceClass, String id) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceId(resourceClass, id, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceId(resourceClass, id, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history information for this resource", e); // } @@ -306,7 +314,7 @@ public class FHIRToolingClient { // public Bundle history(Calendar lastUpdate, Class resourceClass) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceType(resourceClass, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceType(resourceClass, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history information for this resource type", e); // } @@ -317,7 +325,7 @@ public class FHIRToolingClient { // public Bundle history(Date lastUpdate, Class resourceClass) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceType(resourceClass, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceType(resourceClass, lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history information for this resource type", e); // } @@ -328,7 +336,7 @@ public class FHIRToolingClient { // public Bundle history(Class resourceClass) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceType(resourceClass, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceType(resourceClass, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history information for this resource type", e); // } @@ -339,7 +347,7 @@ public class FHIRToolingClient { // public Bundle history(Class resourceClass, String id) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceId(resourceClass, id, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForResourceId(resourceClass, id, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history information for this resource", e); // } @@ -350,7 +358,7 @@ public class FHIRToolingClient { // public Bundle history(Date lastUpdate) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForAllResources(lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForAllResources(lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history since last update",e); // } @@ -361,7 +369,7 @@ public class FHIRToolingClient { // public Bundle history(Calendar lastUpdate) { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForAllResources(lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForAllResources(lastUpdate, maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history since last update",e); // } @@ -372,7 +380,7 @@ public class FHIRToolingClient { // public Bundle history() { // Bundle history = null; // try { -// history = ClientUtils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForAllResources(maxResultSetSize), getPreferredResourceFormat(), proxy); +// history = utils.issueGetFeedRequest(resourceAddress.resolveGetHistoryForAllResources(maxResultSetSize), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("An error has occurred while trying to retrieve history since last update",e); // } @@ -383,7 +391,7 @@ public class FHIRToolingClient { // public Bundle search(Class resourceClass, Map parameters) { // Bundle searchResults = null; // try { -// searchResults = ClientUtils.issueGetFeedRequest(resourceAddress.resolveSearchUri(resourceClass, parameters), getPreferredResourceFormat(), proxy); +// searchResults = utils.issueGetFeedRequest(resourceAddress.resolveSearchUri(resourceClass, parameters), getPreferredResourceFormat(), proxy); // } catch (Exception e) { // handleException("Error performing search with parameters " + parameters, e); // } @@ -394,7 +402,7 @@ public class FHIRToolingClient { // public Bundle searchPost(Class resourceClass, T resource, Map parameters) { // Bundle searchResults = null; // try { -// searchResults = ClientUtils.issuePostFeedRequest(resourceAddress.resolveSearchUri(resourceClass, new HashMap()), parameters, "src", resource, getPreferredResourceFormat()); +// searchResults = utils.issuePostFeedRequest(resourceAddress.resolveSearchUri(resourceClass, new HashMap()), parameters, "src", resource, getPreferredResourceFormat()); // } catch (Exception e) { // handleException("Error performing search with parameters " + parameters, e); // } @@ -415,9 +423,9 @@ public class FHIRToolingClient { ps += p.getName() + "=" + Utilities.encodeUri(((PrimitiveType) p.getValue()).asStringValue())+"&"; ResourceRequest result; if (complex) - result = ClientUtils.issuePostRequest(resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps), ClientUtils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), proxy, timeout); + result = utils.issuePostRequest(resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps), utils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat()); else - result = ClientUtils.issueGetResourceRequest(resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps), getPreferredResourceFormat(), proxy, timeout); + result = utils.issueGetResourceRequest(resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps), getPreferredResourceFormat()); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addSuccessStatus(200);//Only one for now @@ -440,7 +448,7 @@ public class FHIRToolingClient { public Bundle transaction(Bundle batch) { Bundle transactionResult = null; try { - transactionResult = ClientUtils.postBatchRequest(resourceAddress.getBaseServiceUri(), ClientUtils.getFeedAsByteArray(batch, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), proxy); + transactionResult = utils.postBatchRequest(resourceAddress.getBaseServiceUri(), utils.getFeedAsByteArray(batch, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat()); } catch (Exception e) { handleException("An error occurred trying to process this transaction request", e); } @@ -452,7 +460,7 @@ public class FHIRToolingClient { public OperationOutcome validate(Class resourceClass, T resource, String id) { ResourceRequest result = null; try { - result = ClientUtils.issuePostRequest(resourceAddress.resolveValidateUri(resourceClass, id), ClientUtils.getResourceAsByteArray(resource, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), proxy, timeout); + result = utils.issuePostRequest(resourceAddress.resolveValidateUri(resourceClass, id), utils.getResourceAsByteArray(resource, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat()); result.addErrorStatus(400);//gone result.addErrorStatus(422);//Unprocessable Entity result.addSuccessStatus(200);//OK @@ -470,7 +478,7 @@ public class FHIRToolingClient { public List getAllTags() { TagListRequest result = null; try { - result = ClientUtils.issueGetRequestForTagList(resourceAddress.resolveGetAllTags(), getPreferredResourceFormat(), null, proxy); + result = utils.issueGetRequestForTagList(resourceAddress.resolveGetAllTags(), getPreferredResourceFormat(), null, proxy); } catch (Exception e) { handleException("An error has occurred while trying to retrieve all tags", e); } @@ -481,7 +489,7 @@ public class FHIRToolingClient { public List getAllTagsForResourceType(Class resourceClass) { TagListRequest result = null; try { - result = ClientUtils.issueGetRequestForTagList(resourceAddress.resolveGetAllTagsForResourceType(resourceClass), getPreferredResourceFormat(), null, proxy); + result = utils.issueGetRequestForTagList(resourceAddress.resolveGetAllTagsForResourceType(resourceClass), getPreferredResourceFormat(), null, proxy); } catch (Exception e) { handleException("An error has occurred while trying to retrieve tags for this resource type", e); } @@ -492,7 +500,7 @@ public class FHIRToolingClient { public List getTagsForReference(Class resource, String id) { TagListRequest result = null; try { - result = ClientUtils.issueGetRequestForTagList(resourceAddress.resolveGetTagsForReference(resource, id), getPreferredResourceFormat(), null, proxy); + result = utils.issueGetRequestForTagList(resourceAddress.resolveGetTagsForReference(resource, id), getPreferredResourceFormat(), null, proxy); } catch (Exception e) { handleException("An error has occurred while trying to retrieve tags for this resource", e); } @@ -503,7 +511,7 @@ public class FHIRToolingClient { public List getTagsForResourceVersion(Class resource, String id, String versionId) { TagListRequest result = null; try { - result = ClientUtils.issueGetRequestForTagList(resourceAddress.resolveGetTagsForResourceVersion(resource, id, versionId), getPreferredResourceFormat(), null, proxy); + result = utils.issueGetRequestForTagList(resourceAddress.resolveGetTagsForResourceVersion(resource, id, versionId), getPreferredResourceFormat(), null, proxy); } catch (Exception e) { handleException("An error has occurred while trying to retrieve tags for this resource version", e); } @@ -513,7 +521,7 @@ public class FHIRToolingClient { // // public boolean deleteTagsForReference(Class resourceClass, String id) { // try { -// return ClientUtils.issueDeleteRequest(resourceAddress.resolveGetTagsForReference(resourceClass, id), proxy); +// return utils.issueDeleteRequest(resourceAddress.resolveGetTagsForReference(resourceClass, id), proxy); // } catch(Exception e) { // handleException("An error has occurred while trying to retrieve tags for this resource version", e); // throw new EFhirClientException("An error has occurred while trying to delete this resource", e); @@ -524,7 +532,7 @@ public class FHIRToolingClient { // // public boolean deleteTagsForResourceVersion(Class resourceClass, String id, List tags, String version) { // try { -// return ClientUtils.issueDeleteRequest(resourceAddress.resolveGetTagsForResourceVersion(resourceClass, id, version), proxy); +// return utils.issueDeleteRequest(resourceAddress.resolveGetTagsForResourceVersion(resourceClass, id, version), proxy); // } catch(Exception e) { // handleException("An error has occurred while trying to retrieve tags for this resource version", e); // throw new EFhirClientException("An error has occurred while trying to delete this resource", e); @@ -535,7 +543,7 @@ public class FHIRToolingClient { public List createTags(List tags, Class resourceClass, String id) { TagListRequest request = null; try { - request = ClientUtils.issuePostRequestForTagList(resourceAddress.resolveGetTagsForReference(resourceClass, id),ClientUtils.getTagListAsByteArray(tags, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), null, proxy); + request = utils.issuePostRequestForTagList(resourceAddress.resolveGetTagsForReference(resourceClass, id),utils.getTagListAsByteArray(tags, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), null, proxy); request.addSuccessStatus(201); request.addSuccessStatus(200); if(request.isUnsuccessfulRequest()) { @@ -551,7 +559,7 @@ public class FHIRToolingClient { public List createTags(List tags, Class resourceClass, String id, String version) { TagListRequest request = null; try { - request = ClientUtils.issuePostRequestForTagList(resourceAddress.resolveGetTagsForResourceVersion(resourceClass, id, version),ClientUtils.getTagListAsByteArray(tags, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), null, proxy); + request = utils.issuePostRequestForTagList(resourceAddress.resolveGetTagsForResourceVersion(resourceClass, id, version),utils.getTagListAsByteArray(tags, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), null, proxy); request.addSuccessStatus(201); request.addSuccessStatus(200); if(request.isUnsuccessfulRequest()) { @@ -567,7 +575,7 @@ public class FHIRToolingClient { public List deleteTags(List tags, Class resourceClass, String id, String version) { TagListRequest request = null; try { - request = ClientUtils.issuePostRequestForTagList(resourceAddress.resolveDeleteTagsForResourceVersion(resourceClass, id, version),ClientUtils.getTagListAsByteArray(tags, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), null, proxy); + request = utils.issuePostRequestForTagList(resourceAddress.resolveDeleteTagsForResourceVersion(resourceClass, id, version),utils.getTagListAsByteArray(tags, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), null, proxy); request.addSuccessStatus(201); request.addSuccessStatus(200); if(request.isUnsuccessfulRequest()) { @@ -612,7 +620,7 @@ public class FHIRToolingClient { public Bundle fetchFeed(String url) { Bundle feed = null; try { - feed = ClientUtils.issueGetFeedRequest(new URI(url), getPreferredResourceFormat(), proxy, timeout); + feed = utils.issueGetFeedRequest(new URI(url), getPreferredResourceFormat()); } catch (Exception e) { handleException("An error has occurred while trying to retrieve history since last update",e); } @@ -625,8 +633,8 @@ public class FHIRToolingClient { p.addParameter().setName("valueSet").setResource(source); if (profile != null) p.addParameter().setName("profile").setResource(profile); - ResourceRequest result = ClientUtils.issuePostRequest(resourceAddress.resolveOperationUri(ValueSet.class, "expand"), - ClientUtils.getResourceAsByteArray(p, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy, timeout); + ResourceRequest result = utils.issuePostRequest(resourceAddress.resolveOperationUri(ValueSet.class, "expand"), + utils.getResourceAsByteArray(p, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addErrorStatus(405); @@ -641,7 +649,7 @@ public class FHIRToolingClient { public Parameters lookupCode(Map params) { - ResourceRequest result = ClientUtils.issueGetResourceRequest(resourceAddress.resolveOperationUri(CodeSystem.class, "lookup", params), getPreferredResourceFormat(), proxy, timeout); + ResourceRequest result = utils.issueGetResourceRequest(resourceAddress.resolveOperationUri(CodeSystem.class, "lookup", params), getPreferredResourceFormat()); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addErrorStatus(405); @@ -661,8 +669,8 @@ public class FHIRToolingClient { p.addParameter().setName("profile").setResource(profile); for (String n : params.keySet()) p.addParameter().setName(n).setValue(new StringType(params.get(n))); - ResourceRequest result = ClientUtils.issuePostRequest(resourceAddress.resolveOperationUri(ValueSet.class, "expand", params), - ClientUtils.getResourceAsByteArray(p, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy, timeout); + ResourceRequest result = utils.issuePostRequest(resourceAddress.resolveOperationUri(ValueSet.class, "expand", params), + utils.getResourceAsByteArray(p, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addErrorStatus(405); @@ -677,8 +685,8 @@ public class FHIRToolingClient { // public ValueSet expandValueset(ValueSet source, ExpansionProfile profile, Map params) { // List
headers = null; -// ResourceRequest result = ClientUtils.issuePostRequest(resourceAddress.resolveOperationUri(ValueSet.class, "expand", params), -// ClientUtils.getResourceAsByteArray(source, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy); +// ResourceRequest result = utils.issuePostRequest(resourceAddress.resolveOperationUri(ValueSet.class, "expand", params), +// utils.getResourceAsByteArray(source, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy); // result.addErrorStatus(410);//gone // result.addErrorStatus(404);//unknown // result.addErrorStatus(405); @@ -700,8 +708,8 @@ public class FHIRToolingClient { Parameters params = new Parameters(); params.addParameter().setName("name").setValue(new StringType(name)); List
headers = null; - ResourceRequest result = ClientUtils.issuePostRequest(resourceAddress.resolveOperationUri(null, "closure", new HashMap()), - ClientUtils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy, timeout); + ResourceRequest result = utils.issuePostRequest(resourceAddress.resolveOperationUri(null, "closure", new HashMap()), + utils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addErrorStatus(405); @@ -719,8 +727,8 @@ public class FHIRToolingClient { params.addParameter().setName("name").setValue(new StringType(name)); params.addParameter().setName("concept").setValue(coding); List
headers = null; - ResourceRequest result = ClientUtils.issuePostRequest(resourceAddress.resolveOperationUri(null, "closure", new HashMap()), - ClientUtils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, proxy, timeout); + ResourceRequest result = utils.issuePostRequest(resourceAddress.resolveOperationUri(null, "closure", new HashMap()), + utils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers); result.addErrorStatus(410);//gone result.addErrorStatus(404);//unknown result.addErrorStatus(405); @@ -734,11 +742,27 @@ public class FHIRToolingClient { } public int getTimeout() { - return timeout; + return utils.getTimeout(); } public void setTimeout(int timeout) { - this.timeout = timeout; + utils.setTimeout(timeout); + } + + public String getUsername() { + return utils.getUsername(); + } + + public void setUsername(String username) { + utils.setUsername(username); + } + + public String getPassword() { + return utils.getPassword(); + } + + public void setPassword(String password) { + utils.setPassword(password); } } diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/AllTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/AllTests.java new file mode 100644 index 00000000000..c09bf8c6c7c --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/AllTests.java @@ -0,0 +1,11 @@ +package org.hl7.fhir.r4.test; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ FluentPathTests.class, NarrativeGeneratorTests.class, /*ShexGeneratorTests.class, StructureMapTests.class, */ TurtleTests.class, GraphQLParserTests.class }) +public class AllTests { + +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/FluentPathTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/FluentPathTests.java new file mode 100644 index 00000000000..48138d27ff4 --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/FluentPathTests.java @@ -0,0 +1,135 @@ +package org.hl7.fhir.r4.test; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.parsers.ParserConfigurationException; + +import org.hl7.fhir.r4.context.SimpleWorkerContext; +import org.hl7.fhir.r4.formats.XmlParser; +import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.ExpressionNode; +import org.hl7.fhir.r4.model.PrimitiveType; +import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.r4.utils.FHIRPathEngine; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xml.XMLUtil; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.xml.sax.SAXException; + +import junit.framework.Assert; + +@RunWith(Parameterized.class) +public class FluentPathTests { + + private static FHIRPathEngine fp; + + @Parameters(name = "{index}: file {0}") + public static Iterable data() throws ParserConfigurationException, SAXException, IOException { + Document dom = XMLUtil.parseFileToDom(Utilities.path(TestingUtilities. home(), "tests", "resources", "tests-fhir-r4.xml")); + + List list = new ArrayList(); + List groups = new ArrayList(); + XMLUtil.getNamedChildren(dom.getDocumentElement(), "group", groups); + for (Element g : groups) { + XMLUtil.getNamedChildren(g, "test", list); + } + + List objects = new ArrayList(list.size()); + + for (Element e : list) { + objects.add(new Object[] { getName(e), e }); + } + + return objects; + } + + private static Object getName(Element e) { + String s = e.getAttribute("name"); + if (Utilities.noString(s)) { + Element p = (Element) e.getParentNode(); + int ndx = 0; + for (int i = 0; i < p.getChildNodes().getLength(); i++) { + Node c = p.getChildNodes().item(i); + if (c == e) + break; + else if (c instanceof Element) + ndx++; + } + s = p.getAttribute("name")+" - "+Integer.toString(ndx+1); + } + return s; + } + + private final Element test; + private final String name; + + public FluentPathTests(String name, Element e) { + this.name = name; + this.test = e; + } + + @SuppressWarnings("deprecation") + @Test + public void test() throws FileNotFoundException, IOException, FHIRException, org.hl7.fhir.exceptions.FHIRException { + if (TestingUtilities.context == null) + TestingUtilities.context = SimpleWorkerContext.fromPack(Utilities.path(TestingUtilities.home(), "publish", "definitions.xml.zip")); + if (fp == null) + fp = new FHIRPathEngine(TestingUtilities.context); + String input = test.getAttribute("inputfile"); + String expression = XMLUtil.getNamedChild(test, "expression").getTextContent(); + boolean fail = "true".equals(XMLUtil.getNamedChild(test, "expression").getAttribute("invalid")); + Resource res = null; + + List outcome = new ArrayList(); + + ExpressionNode node = fp.parse(expression); + try { + if (Utilities.noString(input)) + fp.check(null, null, node); + else { + res = new XmlParser().parse(new FileInputStream(Utilities.path(TestingUtilities.home(), "publish", input))); + fp.check(res, res.getResourceType().toString(), res.getResourceType().toString(), node); + } + outcome = fp.evaluate(res, node); + Assert.assertTrue(String.format("Expected exception parsing %s", expression), !fail); + } catch (Exception e) { + Assert.assertTrue(String.format("Unexpected exception parsing %s: "+e.getMessage(), expression), fail); + } + + if ("true".equals(test.getAttribute("predicate"))) { + boolean ok = fp.convertToBoolean(outcome); + outcome.clear(); + outcome.add(new BooleanType(ok)); + } + if (fp.hasLog()) + System.out.println(fp.takeLog()); + + List expected = new ArrayList(); + XMLUtil.getNamedChildren(test, "output", expected); + Assert.assertTrue(String.format("Expected %d objects but found %d", expected.size(), outcome.size()), outcome.size() == expected.size()); + for (int i = 0; i < Math.min(outcome.size(), expected.size()); i++) { + String tn = expected.get(i).getAttribute("type"); + if (!Utilities.noString(tn)) { + Assert.assertTrue(String.format("Outcome %d: Type should be %s but was %s", i, tn, outcome.get(i).fhirType()), tn.equals(outcome.get(i).fhirType())); + } + String v = expected.get(i).getTextContent(); + if (!Utilities.noString(v)) { + Assert.assertTrue(String.format("Outcome %d: Value should be a primitive type but was %s", i, outcome.get(i).fhirType()), outcome.get(i) instanceof PrimitiveType); + Assert.assertTrue(String.format("Outcome %d: Value should be %s but was %s", i, v, outcome.get(i).toString()), v.equals(((PrimitiveType)outcome.get(i)).asStringValue())); + } + } + } +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/GraphQLParserTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/GraphQLParserTests.java new file mode 100644 index 00000000000..2bb0aba384a --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/GraphQLParserTests.java @@ -0,0 +1,68 @@ +package org.hl7.fhir.r4.test; + +import static org.junit.Assert.*; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.parsers.ParserConfigurationException; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.utilities.TextFile; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.graphql.EGraphEngine; +import org.hl7.fhir.utilities.graphql.EGraphQLException; +import org.hl7.fhir.utilities.graphql.Package; +import org.hl7.fhir.utilities.graphql.Parser; +import org.hl7.fhir.utilities.xml.XMLUtil; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.xml.sax.SAXException; + +@RunWith(Parameterized.class) +public class GraphQLParserTests { + + @Parameters(name = "{index}: {0}") + public static Iterable data() throws FileNotFoundException, IOException { + String src = TextFile.fileToString(Utilities.path(TestingUtilities.home(), "tests", "graphql", "parser-tests.gql")); + String[] tests = src.split("###"); + int i = 0; + for (String s : tests) + if (!Utilities.noString(s.trim())) + i++; + List objects = new ArrayList(i); + i = 0; + for (String s : tests) { + if (!Utilities.noString(s.trim())) { + int l = s.indexOf('\r'); + objects.add(new Object[] { s.substring(0, l), s.substring(l+2).trim()}); + } + } + return objects; + } + + private final String test; + private final String name; + + public GraphQLParserTests(String name, String test) { + this.name = name; + this.test = test; + } + + @Test + public void test() throws IOException, EGraphQLException, EGraphEngine { + Package doc = Parser.parse(test); + Assert.assertTrue(doc != null); + } + + +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/NarrativeGeneratorTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/NarrativeGeneratorTests.java new file mode 100644 index 00000000000..2204b756416 --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/NarrativeGeneratorTests.java @@ -0,0 +1,52 @@ +package org.hl7.fhir.r4.test; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.hl7.fhir.r4.context.SimpleWorkerContext; +import org.hl7.fhir.r4.formats.XmlParser; +import org.hl7.fhir.r4.model.DomainResource; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.r4.utils.EOperationOutcome; +import org.hl7.fhir.r4.utils.NarrativeGenerator; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.exceptions.FHIRException; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.xmlpull.v1.XmlPullParserException; + +public class NarrativeGeneratorTests { + + private NarrativeGenerator gen; + + @Before + public void setUp() throws FileNotFoundException, IOException, FHIRException { + if (TestingUtilities.context == null) + TestingUtilities.context = SimpleWorkerContext.fromPack(Utilities.path(TestingUtilities.home(), "publish", "definitions.xml.zip")); + if (gen == null) + gen = new NarrativeGenerator("", null, TestingUtilities.context); + } + + @After + public void tearDown() { + } + + @Test + public void test() throws FileNotFoundException, IOException, XmlPullParserException, EOperationOutcome, FHIRException { + process(Utilities.path(TestingUtilities.home(), "source", "questionnaireresponse", "questionnaireresponse-example-f201-lifelines.xml")); + } + + private void process(String path) throws FileNotFoundException, IOException, XmlPullParserException, EOperationOutcome, FHIRException { + XmlParser p = new XmlParser(); + DomainResource r = (DomainResource) p.parse(new FileInputStream(path)); + gen.generate(r); + FileOutputStream s = new FileOutputStream(Utilities.path(TestingUtilities.temp(), "gen.xml")); + new XmlParser().compose(s, r, true); + s.close(); + + } + +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ProfileUtilitiesTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ProfileUtilitiesTests.java new file mode 100644 index 00000000000..eb93be56ff1 --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ProfileUtilitiesTests.java @@ -0,0 +1,940 @@ +package org.hl7.fhir.r4.test; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.hl7.fhir.r4.conformance.ProfileComparer; +import org.hl7.fhir.r4.conformance.ProfileComparer.ProfileComparison; +import org.hl7.fhir.r4.conformance.ProfileUtilities; +import org.hl7.fhir.r4.context.SimpleWorkerContext; +import org.hl7.fhir.r4.formats.IParser.OutputStyle; +import org.hl7.fhir.r4.formats.XmlParser; +import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.ElementDefinition; +import org.hl7.fhir.r4.model.ElementDefinition.DiscriminatorType; +import org.hl7.fhir.r4.model.ElementDefinition.SlicingRules; +import org.hl7.fhir.r4.model.Enumerations.BindingStrength; +import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.r4.utils.EOperationOutcome; +import org.hl7.fhir.exceptions.DefinitionException; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.exceptions.FHIRFormatError; +import org.hl7.fhir.utilities.CSFile; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.validation.ValidationMessage; +import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import static org.junit.Assert.*; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.utils.SnomedExpressions; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + + +public class ProfileUtilitiesTests { + +// private String root; +// private SimpleWorkerContext context; +// private ProfileComparer comp; +// +//// public ProfileUtilitiesTests(String root) { +//// super(); +//// this.root = root; +//// } +// +//// public ProfileUtilitiesTests() { +//// super(); +//// root = TestingUtilities.home(); +//// +//// } +// +// public static void main(String[] args) throws EOperationOutcome, Exception { +// // new ProfileUtilitiesTests().execute(args); +// ProfileUtilitiesTests put = new ProfileUtilitiesTests(); +// put.root = "C:\\work\\org.hl7.fhir\\build\\publish"; +// put.testSnapshotGeneration(); +// // StructureDefinition p = (StructureDefinition) new XmlParser().parse(new FileInputStream("C:\\work\\org.hl7.fhir\\build\\publish\\lipid-report-cholesterol.profile.xml")); +// // new ProfileUtilities(context, messages, null).generateSchematrons(new FileOutputStream("c:\\temp\\test.sch"), p); +// } +// +// public void execute(String[] args) throws FileNotFoundException, IOException, FHIRException { +// System.out.println("loading context"); +// context = SimpleWorkerContext.fromPack(Utilities.path(root, "validation.zip")); +// comp = new ProfileComparer(context); +// +// compare("patient-daf-dafpatient.profile.xml", "patient-qicore-qicore-patient.profile.xml"); +// compare("encounter-daf-dafencounter.profile.xml", "encounter-qicore-qicore-encounter.profile.xml"); +// compare("substance-daf-dafsubstance.profile.xml", "substance-qicore-qicore-substance.profile.xml"); +// compare("medication-daf-dafmedication.profile.xml", "medication-qicore-qicore-medication.profile.xml"); +// compare("procedure-daf-dafprocedure.profile.xml", "procedure-qicore-qicore-procedure.profile.xml"); +// compare("familymemberhistory-daf-daffamilymemberhistory.profile.xml", "familymemberhistory-qicore-qicore-familymemberhistory.profile.xml"); +// compare("immunization-daf-dafimmunization.profile.xml", "immunization-qicore-qicore-immunization.profile.xml"); +// compare("condition-daf-dafcondition.profile.xml", "condition-qicore-qicore-condition.profile.xml"); +// compare("allergyintolerance-daf-dafallergyintolerance.profile.xml", "allergyintolerance-qicore-qicore-allergyintolerance.profile.xml"); +// compare("medicationadministration-daf-dafmedicationadministration.profile.xml", "medicationadministration-qicore-qicore-medicationadministration.profile.xml"); +// compare("medicationdispense-daf-dafmedicationdispense.profile.xml", "medicationdispense-qicore-qicore-medicationdispense.profile.xml"); +// compare("medicationprescription-daf-dafmedicationprescription.profile.xml", "medicationprescription-qicore-qicore-medicationprescription.profile.xml"); +// compare("medicationstatement-daf-dafmedicationstatement.profile.xml", "medicationstatement-qicore-qicore-medicationstatement.profile.xml"); +// compare("observation-daf-smokingstatus-dafsmokingstatus.profile.xml", "observation-qicore-qicore-observation.profile.xml"); +// compare("observation-daf-vitalsigns-dafvitalsigns.profile.xml", "observation-qicore-qicore-observation.profile.xml"); +//// compare("observation-daf-results-dafresultobs.profile.xml", "observation-qicore-qicore-observation.profile.xml"); +//// compare("diagnosticorder-daf-dafdiagnosticorder.profile.xml", "diagnosticorder-qicore-qicore-diagnosticorder.profile.xml"); +//// compare("diagnosticreport-daf-dafdiagnosticreport.profile.xml", "diagnosticreport-qicore-qicore-diagnosticreport.profile.xml"); +// +// System.out.println("processing output"); +// for (ProfileComparison outcome : comp.getComparisons()) { +// if (outcome.getSubset() != null) +// new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream("C:\\temp\\intersection-"+outcome.getId()+".xml"), outcome.getSubset()); +// if (outcome.getSuperset() != null) +// new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream("C:\\temp\\union-"+outcome.getId()+".xml"), outcome.getSuperset()); +// +// System.out.println("\r\n"+outcome.getId()+": Comparison of "+outcome.getLeft().getUrl()+" and "+outcome.getRight().getUrl()); +// for (ValidationMessage vm : outcome.getMessages()) +// if (vm.getLevel() == IssueSeverity.INFORMATION) +// System.out.println(vm.summary()); +// for (ValidationMessage vm : outcome.getMessages()) +// if (vm.getLevel() == IssueSeverity.WARNING) +// System.out.println(vm.summary()); +// for (ValidationMessage vm : outcome.getMessages()) +// if (vm.getLevel() == IssueSeverity.ERROR) +// System.out.println(vm.summary()); +// for (ValidationMessage vm : outcome.getMessages()) +// if (vm.getLevel() == IssueSeverity.FATAL) +// System.out.println(vm.summary()); +// System.out.println("done. "+Integer.toString(outcome.getMessages().size())+" messages"); +// System.out.println("================================================================="); +// } +// } +// +// private void compare(String fn1, String fn2) throws FHIRFormatError, FileNotFoundException, IOException, DefinitionException { +// System.out.println("Compare "+fn1+" to "+fn2); +// System.out.println(" .. load"); +// StructureDefinition left = (StructureDefinition) new XmlParser().parse(new FileInputStream(Utilities.path(root, fn1))); +// StructureDefinition right = (StructureDefinition) new XmlParser().parse(new FileInputStream(Utilities.path(root, fn2))); +// System.out.println(" .. compare"); +// comp.compareProfiles(left, right); +// +// } +// +// public void testSnapshotGeneration() throws EOperationOutcome, Exception { +// System.out.println("Loading"); +// context = SimpleWorkerContext.fromPack(Utilities.path(root, "definitions.xml.zip")); +// System.out.println("Loaded "+Integer.toString(context.totalCount())+" resources"); +// +// // simple tests +// testSimple(); +// testSimple2(); +// testCardinalityChange(); +// testDocumentationAppend(); +// textTypeNarrowing1(); +// textTypeNarrowing2(); +// testMapping(); +// +// // ok, now we test walking into a new type: +// testTypeWalk(); +// // todo: testTypeWalk2(); +// +// // slicing tests +// testSlicingSimple(); +// testSlicingExtension(false); +// testSlicingExtension(true); +// testSlicingExtensionComplex(true); +// testSlicingExtensionComplex(false); +// testSlicingTask8742(); +// System.out.println("Success"); +// } +// +// /** +// * This is simple: we just create an empty differential, generate the snapshot, and then insist it must match the base +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ + @Test + public void testSimple() throws FHIRException, FileNotFoundException, IOException { + if (TestingUtilities.context == null) + TestingUtilities.context = SimpleWorkerContext.fromPack(Utilities.path(TestingUtilities.home(), "publish", "definitions.xml.zip")); + + StructureDefinition focus = new StructureDefinition(); + StructureDefinition base = TestingUtilities.context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); + focus.setUrl(Utilities.makeUuidUrn()); + focus.setBaseDefinition(base.getUrl()); + focus.setType("Patient"); + focus.setDerivation(TypeDerivationRule.CONSTRAINT); + List messages = new ArrayList(); + new ProfileUtilities(TestingUtilities.context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test"); + + boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); + for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { + ElementDefinition b = base.getSnapshot().getElement().get(i); + ElementDefinition f = focus.getSnapshot().getElement().get(i); + if (ok) { + if (!f.hasBase()) + ok = false; + else if (!b.getPath().equals(f.getPath())) + ok = false; + else { + b.setBase(null); + f.setBase(null); + ok = Base.compareDeep(b, f, true); + } + } + } + + if (!ok) { + compareXml(base, focus); + throw new FHIRException("Snap shot generation simple test failed"); + } else + System.out.println("Snap shot generation simple test passed"); + } + + +// +// /** +// * This is simple: we just create an empty differential, generate the snapshot, and then insist it must match the base. for a different resource with recursion +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ + @Test + public void testSimple2() throws EOperationOutcome, Exception { + if (TestingUtilities.context == null) + TestingUtilities.context = SimpleWorkerContext.fromPack(Utilities.path(TestingUtilities.home(), "publish", "definitions.xml.zip")); + + StructureDefinition focus = new StructureDefinition(); + StructureDefinition base = TestingUtilities.context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/ValueSet").copy(); + focus.setUrl(Utilities.makeUuidUrn()); + focus.setBaseDefinition(base.getUrl()); + focus.setType(base.getType()); + focus.setDerivation(TypeDerivationRule.CONSTRAINT); + List messages = new ArrayList(); + new ProfileUtilities(TestingUtilities.context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); + + boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); + for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { + if (ok) { + ElementDefinition b = base.getSnapshot().getElement().get(i); + ElementDefinition f = focus.getSnapshot().getElement().get(i); + if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) + ok = false; + else { + f.setBase(null); + ok = Base.compareDeep(b, f, true); + } + } + } + + if (!ok) { + compareXml(base, focus); + throw new FHIRException("Snap shot generation simple test failed"); + } else + System.out.println("Snap shot generation simple test passed"); + } + +// /** +// * Change one cardinality. +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void testCardinalityChange() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.setMin(1); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.identifier")) { +// ok = f.getMin() == 1; +// if (ok) +// f.setMin(0); +// } +// ok = ok && Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation chenge cardinality test failed"); +// } else +// System.out.println("Snap shot generation chenge cardinality test passed"); +// } +// +// /** +// * check that documentation appending is working +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void testDocumentationAppend() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.setDefinition("... some more doco"); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.identifier")) { +// ok = f.getDefinition().length() > b.getDefinition().length(); +// if (ok) { +// f.setDefinition(null); +// b.setDefinition(null); +// } +// } +// ok = ok && Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation documentation append failed"); +// } else +// System.out.println("Snap shot generation documentation append test passed"); +// } +// +// +// /** +// * check that narrowing types is working +// * this one doesn't rename the path +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void textTypeNarrowing1() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.deceased[x]"); +// id.addType().setCode("dateTime"); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.deceasedDateTime")) { +// ok = f.getType().size() == 1 && f.getType().get(0).getCode().equals("dateTime"); +// if (ok) { +// f.getType().clear(); +// b.getType().clear(); +// f.setPath(b.getPath()); +// } +// } +// ok = ok && Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation narrow type 1 failed"); +// } else +// System.out.println("Snap shot generation narrow type 1 test passed"); +// } +// +// /** +// * check that narrowing types is working +// * this one renames the path +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void textTypeNarrowing2() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.deceasedDateTime"); +// id.addType().setCode("dateTime"); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.deceasedDateTime")) { +// ok = f.getType().size() == 1 && f.getType().get(0).getCode().equals("dateTime"); +// if (ok) { +// f.getType().clear(); +// b.getType().clear(); +// f.setPath(b.getPath()); +// } +// } +// ok = ok && Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation narrow type 2 failed"); +// } else +// System.out.println("Snap shot generation narrow type 2 test passed"); +// } +// +// /** +// * check that mapping resolution is working +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void testMapping() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.addMapping().setIdentity("rim").setMap("test"); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size(); +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.identifier")) { +// ok = f.getMapping().size() > b.getMapping().size(); +// if (ok) { +// f.getMapping().clear(); +// b.getMapping().clear(); +// } +// } +// ok = ok && Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation mapping changes failed"); +// } else +// System.out.println("Snap shot generation mapping changes test passed"); +// } +// +// /** +// * Walking into a type +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void testTypeWalk() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.setMustSupport(true); +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier.system"); +// id.setMustSupport(true); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// // the derived should be 8 longer +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 8; +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i <= 9 ? i : i + 8); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.identifier")) { +// ok = f.getMustSupport() && !b.getMustSupport(); +// if (ok) { +// f.setMustSupportElement(null); +// } +// } +// ok = Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation simple test failed"); +// } else +// System.out.println("Snap shot generation simple test passed"); +// } +// +// /** +// * Walking into a type, without explicitly doing so +// * +// * note: this currently fails. +// * +// * @param context2 +// * @ +// * @throws EOperationOutcome +// */ +// private void testTypeWalk2() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier.system"); +// id.setMustSupport(true); +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// // the derived should be 8 longer +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 8; +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i <= 9 ? i : i + 8); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.identifier")) { +// ok = f.getMustSupport() && !b.getMustSupport(); +// if (ok) { +// f.setMustSupportElement(null); +// } +// } +// ok = Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation simple test failed"); +// } else +// System.out.println("Snap shot generation simple test passed"); +// } +// +// +// /** +// * we're going to slice Patient.identifier +// */ +// private void testSlicingSimple() throws EOperationOutcome, Exception { +// +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// +// // set the slice up +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.getSlicing().setOrdered(false).setRules(SlicingRules.OPEN).addDiscriminator().setPath("use").setType(DiscriminatorType.VALUE); +// +// // first slice: +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.setSliceName("name1"); +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier.use"); +// id.setFixed(new CodeType("usual")); +// +// // second slice: +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier"); +// id.setSliceName("name2"); +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.identifier.use"); +// id.setFixed(new CodeType("official")); +// +// +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// // 18 different: identifier + 8 inner children * 2 +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 18; +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i <= 9 ? i : i + 18); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.identifier")) { +// ok = f.hasSlicing(); +// if (ok) +// f.setSlicing(null); +// } +// ok = Base.compareDeep(b, f, true); +// } +// } +// } +// // now, check that the slices we skipped are correct: +// for (int i = 10; i <= 18; i++) { +// if (ok) { +// ElementDefinition d1 = focus.getSnapshot().getElement().get(i); +// ElementDefinition d2 = focus.getSnapshot().getElement().get(i+9); +// if (d1.getPath().equals("Patient.identifier.use")) { +// ok = d1.hasFixed() && d2.hasFixed() && !Base.compareDeep(d1.getFixed(), d2.getFixed(), true); +// if (ok) { +// d1.setFixed(null); +// d2.setFixed(null); +// } +// } +// if (d1.getPath().equals("Patient.identifier")) { +// ok = d1.hasSliceName() && d2.hasSliceName() && !Base.compareDeep(d1.getSliceNameElement(), d2.getSliceNameElement(), true); +// if (ok) { +// d1.setSliceName(null); +// d2.setSliceName(null); +// } +// } +// ok = Base.compareDeep(d1, d2, true); +// } +// } +// // for throughness, we could check against identifier too, but this is not done now. +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation slicing failed"); +// } else +// System.out.println("Snap shot generation slicing passed"); +// +// } +// +// /** +// * we're going to slice Patient.extension and refer to extension by profile +// * +// * implicit: whether to rely on implicit extension slicing +// */ +// private void testSlicingExtension(boolean implicit) throws EOperationOutcome, Exception { +// +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// +// // set the slice up +// ElementDefinition id; +// if (!implicit) { +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension"); +// id.getSlicing().setOrdered(false).setRules(SlicingRules.OPEN).addDiscriminator().setPath("url").setType(DiscriminatorType.VALUE); +// id.setMax("3"); +// } +// // first slice: +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension"); +// id.setSliceName("name1"); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/patient-birthTime"); +// id.setMin(1); +// +// // second slice: +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension"); +// id.setSliceName("name2"); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"); +// +// List messages = new ArrayList(); +// ProfileUtilities pu = new ProfileUtilities(context, messages, null); +// pu.generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// // 2 different: extension slices +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 2; +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i <= 7 ? i : i + 2); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.extension")) { +// ok = f.hasSlicing() && (implicit || f.getMax().equals("3")); +// if (ok) { +// f.setSlicing(null); +// f.setMaxElement(b.getMaxElement()); +// } +// } +// if (!f.getPath().equals("Patient.extension")) // no compare that because the definitions get overwritten +// ok = Base.compareDeep(b, f, true); +// } +// } +// } +// // now, check that the slices we skipped are correct: +// if (ok) { +// ElementDefinition d1 = focus.getSnapshot().getElement().get(8); +// ElementDefinition d2 = focus.getSnapshot().getElement().get(9); +// ok = d1.hasType() && d1.getType().get(0).hasProfile() && d2.hasType() && d2.getType().get(0).hasProfile() && !Base.compareDeep(d1.getType(), d2.getType(), true) && +// d1.getMin() == 1 && d2.getMin() == 0 && d1.getMax().equals("1") && d2.getMax().equals("1"); +// if (ok) { +// d1.getType().clear(); +// d2.getType().clear(); +// d1.setSliceName("x"); +// d2.setSliceName("x"); +// d1.setMin(0); +// } +// ok = Base.compareDeep(d1, d2, true); +// // for throughness, we could check against extension too, but this is not done now. +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation slicing extensions simple ("+(implicit ? "implicit" : "not implicit")+") failed"); +// } else +// System.out.println("Snap shot generation slicing extensions simple ("+(implicit ? "implicit" : "not implicit")+") passed"); +// } +// +// /** +// * we're going to slice Patient.extension and refer to extension by profile. one of the extensions is complex, and we're going to walk into +// * it and make it must support +// * +// * implicit: whether to rely on implicit extension slicing +// */ +// private void testSlicingExtensionComplex(boolean implicit) throws EOperationOutcome, Exception { +// +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Patient").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// +// // set the slice up +// ElementDefinition id; +// if (!implicit) { +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension"); +// id.getSlicing().setOrdered(false).setRules(SlicingRules.OPEN).addDiscriminator().setPath("url").setType(DiscriminatorType.VALUE); +// } +// // first slice - a simple one to get us going: +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension"); +// id.setSliceName("simple"); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/patient-birthTime"); +// +// // second slice - the complex one +// // we walk into this and fix properties on the inner extensions +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension"); +// id.setSliceName("complex"); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/patient-nationality"); +// if (!implicit) { +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension.extension"); +// id.getSlicing().setOrdered(false).setRules(SlicingRules.OPEN).addDiscriminator().setPath("url").setType(DiscriminatorType.VALUE); +// } +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension.extension"); +// id.setSliceName("code"); +// id.setMustSupport(true); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/patient-nationality#code"); +// +// id = focus.getDifferential().addElement(); +// id.setPath("Patient.extension.extension"); +// id.setSliceName("period"); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/patient-nationality#period"); +// id.setMax("0"); // prohibit this one.... +// +// List messages = new ArrayList(); +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// // ok, there's going to 1 (simple) + complex: 1 + id + extnesion.slice + extension.code + (4 inside from that) + extension.period + (4 inside from that) + value + url = 16 +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 16; +// +// // custom checks +// ok = ok && rule(focus.getSnapshot().getElement().get(7).getPath().equals("Patient.extension"), "element 7 (base) path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(7).hasSlicing(), "element 7 slicing"); +// ok = ok && rule(focus.getSnapshot().getElement().get(8).getPath().equals("Patient.extension"), "element 8 (1st slice) path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(8).getSliceName().equals("simple"), "element 8 (1st slice) name"); +// ok = ok && rule(focus.getSnapshot().getElement().get(8).getType().get(0).getProfile().equals("http://hl7.org/fhir/StructureDefinition/patient-birthTime"), "element 9 (2nd slice) profile name"); +// ok = ok && rule(focus.getSnapshot().getElement().get(9).getPath().equals("Patient.extension"), "element 9 (2nd slice) path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(9).getSliceName().equals("complex"), "element 8 (1st slice) name"); +// ok = ok && rule(focus.getSnapshot().getElement().get(9).getType().get(0).getProfile().equals("http://hl7.org/fhir/StructureDefinition/patient-nationality"), "element 9 (2nd slice) profile name"); +// ok = ok && rule(focus.getSnapshot().getElement().get(10).getPath().equals("Patient.extension.id"), "element 10 (2nd slice).id path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(11).getPath().equals("Patient.extension.extension"), "element 11 (2nd slice).extension path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(12).getPath().equals("Patient.extension.extension"), "element 12 (2nd slice).extension path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(12).getMustSupport(), "element 12 (2nd slice).extension must support"); +// ok = ok && rule(focus.getSnapshot().getElement().get(13).getPath().equals("Patient.extension.extension.id"), "element 13 (2nd slice).extension.id path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(14).getPath().equals("Patient.extension.extension.extension"), "element 14 (2nd slice).extension.extension path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(15).getPath().equals("Patient.extension.extension.url"), "element 15 (2nd slice).extension.url path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(16).getPath().equals("Patient.extension.extension.valueCodeableConcept"), "element 16 (2nd slice).extension.valueCodeableConcept path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(17).getPath().equals("Patient.extension.extension"), "element 17 (2nd slice).extension path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(17).getMax().equals("0"), "element 17 (2nd slice).extension cardinality"); +// ok = ok && rule(focus.getSnapshot().getElement().get(18).getPath().equals("Patient.extension.extension.id"), "element 18 (2nd slice).extension.id path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(19).getPath().equals("Patient.extension.extension.extension"), "element 19 (2nd slice).extension.extension path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(20).getPath().equals("Patient.extension.extension.url"), "element 20 (2nd slice).extension.url path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(21).getPath().equals("Patient.extension.extension.valuePeriod"), "element 21 (2nd slice).extension.valuePeriod path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(22).getPath().equals("Patient.extension.url"), "element 22 (2nd slice).url path"); +// ok = ok && rule(focus.getSnapshot().getElement().get(23).getPath().equals("Patient.extension.value[x]"), "element 23 (2nd slice).url path"); +// +// for (int i = 0; i < base.getSnapshot().getElement().size(); i++) { +// if (ok) { +// ElementDefinition b = base.getSnapshot().getElement().get(i); +// ElementDefinition f = focus.getSnapshot().getElement().get(i <= 7 ? i : i + 16); +// if (!f.hasBase() || !b.getPath().equals(f.getBase().getPath())) +// ok = false; +// else { +// f.setBase(null); +// if (f.getPath().equals("Patient.extension")) { +// ok = f.hasSlicing(); +// if (ok) +// f.setSlicing(null); +// } +// if (!f.getPath().equals("Patient.extension")) // no compare that because the definitions get overwritten +// ok = Base.compareDeep(b, f, true); +// } +// } +// } +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation slicing extensions complex ("+(implicit ? "implicit" : "not implicit")+") failed"); +// } else +// System.out.println("Snap shot generation slicing extensions complex ("+(implicit ? "implicit" : "not implicit")+") passed"); +// } +// +// private void testSlicingTask8742() throws EOperationOutcome, Exception { +// StructureDefinition focus = new StructureDefinition(); +// StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Organization").copy(); +// focus.setUrl(Utilities.makeUuidUrn()); +// focus.setBaseDefinition(base.getUrl()); +// focus.setType(base.getType()); +// focus.setDerivation(TypeDerivationRule.CONSTRAINT); +// +// ElementDefinition id = focus.getDifferential().addElement(); +// id.setPath("Organization.address"); +// id.setMin(1); +// id.setMax("1"); +// id.setMustSupport(true); +// +// id = focus.getDifferential().addElement(); +// id.setPath("Organization.address.extension"); +// id.setSliceName("USLabCountycodes"); +// id.getSlicing().setOrdered(false).setRules(SlicingRules.OPEN).addDiscriminator().setPath("url").setType(DiscriminatorType.VALUE); +// id.setShort("County/Parish FIPS codes"); +// id.setDefinition("County/Parish FIPS codes."); +// id.setRequirements("County/Parish Code SHALL use FIPS 6-4 ( INCITS 31:2009)."); +// id.setMin(0); +// id.setMax("1"); +// id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/us-core-county"); +// id.setMustSupport(true); +// id.getBinding().setStrength(BindingStrength.REQUIRED).setDescription("FIPS codes for US counties and county equivalent entities.").setValueSet(new Reference().setReference("http://hl7.org/fhir/ValueSet/fips-county")); +// List messages = new ArrayList(); +// +// new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test" ); +// +// // 14 for address with one sliced extension +// boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 13; +// +// if (!ok) { +// compareXml(base, focus); +// throw new FHIRException("Snap shot generation test 8742 failed"); +// } else +// System.out.println("Snap shot generation test 8742 passed"); +// } +// +// +// private boolean rule(boolean ok, String message) { +// if (!ok) +// System.out.println("Test failed: " + message); +// return ok; +// } +// + + private void compareXml(StructureDefinition base, StructureDefinition focus) throws FileNotFoundException, IOException { + base.setText(null); + focus.setText(null); + base.setDifferential(null); +// focus.setDifferential(null); + String f1 = Utilities.path("c:", "temp", "base.xml"); + String f2 = Utilities.path("c:", "temp", "derived.xml"); + new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(f1), base);; + new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(f2), focus);; + String diff = Utilities.path(System.getenv("ProgramFiles(X86)"), "WinMerge", "WinMergeU.exe"); + List command = new ArrayList(); + command.add("\"" + diff + "\" \"" + f1 + "\" \"" + f2 + "\""); + + ProcessBuilder builder = new ProcessBuilder(command); + builder.directory(new CSFile("c:\\temp")); + builder.start(); + } + + + +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java new file mode 100644 index 00000000000..980022e7fa2 --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java @@ -0,0 +1,39 @@ +package org.hl7.fhir.r4.test; + +import static org.junit.Assert.*; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.hl7.fhir.r4.context.IWorkerContext; +import org.hl7.fhir.r4.context.SimpleWorkerContext; +import org.hl7.fhir.r4.formats.IParser.OutputStyle; +import org.hl7.fhir.r4.formats.XmlParser; +import org.hl7.fhir.r4.model.DomainResource; +import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.r4.utils.EOperationOutcome; +import org.hl7.fhir.r4.utils.NarrativeGenerator; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.exceptions.FHIRException; +import org.junit.Before; +import org.junit.Test; + +public class ResourceRoundTripTests { + + @Before + public void setUp() throws Exception { + } + + @Test + public void test() throws FileNotFoundException, IOException, FHIRException, EOperationOutcome { + if (TestingUtilities.context == null) + TestingUtilities.context = SimpleWorkerContext.fromPack(Utilities.path(TestingUtilities.home(), "publish", "definitions.xml.zip")); + Resource res = new XmlParser().parse(new FileInputStream(Utilities.path(TestingUtilities.home(), "tests", "resources", "unicode.xml"))); + new NarrativeGenerator("", "", TestingUtilities.context).generate((DomainResource) res); + new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(TestingUtilities.home(), "tests", "resources","unicode.out.xml")), res); + } + +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ShexGeneratorTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ShexGeneratorTests.java new file mode 100644 index 00000000000..fe7fbca31ee --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/ShexGeneratorTests.java @@ -0,0 +1,85 @@ +package org.hl7.fhir.r4.test; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.nio.file.FileSystems; +import java.nio.file.Path; + +import org.hl7.fhir.r4.conformance.ShExGenerator; +import org.hl7.fhir.r4.conformance.ShExGenerator.HTMLLinkPolicy; +import org.hl7.fhir.r4.context.SimpleWorkerContext; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.TextFile; +import org.junit.Test; + +public class ShexGeneratorTests { + + private void doTest(String name) throws FileNotFoundException, IOException, FHIRException { + String workingDirectory = "C:\\work\\org.hl7.fhir\\build\\publish"; // FileSystems.getDefault().getPath(System.getProperty("user.dir"), "data").toString(); + // String workingDirectory = FileSystems.getDefault().getPath(System.getProperty("user.dir"), "..", "..", "..", "publish").toString(); + if (TestingUtilities.context == null) { + // For the time being, put the validation entry in org/hl7/fhir/r4/data + Path path = FileSystems.getDefault().getPath(workingDirectory, "definitions.xml.zip"); + TestingUtilities.context = SimpleWorkerContext.fromPack(path.toString()); + } + StructureDefinition sd = TestingUtilities.context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/"+name); + if(sd == null) { + throw new FHIRException("StructuredDefinition for " + name + "was null"); + } + Path outPath = FileSystems.getDefault().getPath(workingDirectory, name.toLowerCase()+".shex"); + TextFile.stringToFile(new ShExGenerator(TestingUtilities.context).generate(HTMLLinkPolicy.NONE, sd), outPath.toString()); + } + + @Test + public void testId() throws FHIRException, IOException { + doTest("id"); + } + + @Test + public void testUri() throws FHIRException, IOException { + doTest("uri"); + } + + + @Test + public void testObservation() throws FHIRException, IOException { + doTest("Observation"); + } + + @Test + public void testRef() throws FHIRException, IOException { + doTest("Reference"); + } + + @Test + public void testAccount() throws FHIRException, IOException { + doTest("Account"); + } + + @Test + public void testMedicationOrder() throws FHIRException, IOException { + doTest("MedicationOrder"); + } + + @Test + public void testAllergyIntolerance() throws FHIRException, IOException { + doTest("AllergyIntolerance"); + } + + @Test + public void testCoding() throws FHIRException, IOException { + doTest("Coding"); + } + + @Test + public void testTiming() throws FHIRException, IOException { + doTest("Timing"); + } + + @Test + public void testSignature() throws FHIRException, IOException { + doTest("Signature"); + } +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java new file mode 100644 index 00000000000..ce48cca0090 --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java @@ -0,0 +1,338 @@ +package org.hl7.fhir.r4.test; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.xml.parsers.ParserConfigurationException; + +import org.hl7.fhir.r4.conformance.ProfileUtilities; +import org.hl7.fhir.r4.context.SimpleWorkerContext; +import org.hl7.fhir.r4.formats.IParser.OutputStyle; +import org.hl7.fhir.r4.formats.XmlParser; +import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.ExpressionNode; +import org.hl7.fhir.r4.model.MetadataResource; +import org.hl7.fhir.r4.model.ExpressionNode.CollectionStatus; +import org.hl7.fhir.r4.model.PrimitiveType; +import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.model.StructureDefinition; +import org.hl7.fhir.r4.model.TestScript; +import org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent; +import org.hl7.fhir.r4.model.TestScript.SetupActionComponent; +import org.hl7.fhir.r4.model.TestScript.SetupActionOperationComponent; +import org.hl7.fhir.r4.model.TestScript.TestActionComponent; +import org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent; +import org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent; +import org.hl7.fhir.r4.model.TypeDetails; +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.r4.utils.CodingUtilities; +import org.hl7.fhir.r4.utils.FHIRPathEngine; +import org.hl7.fhir.r4.utils.FHIRPathEngine.IEvaluationContext; +import org.hl7.fhir.exceptions.DefinitionException; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.exceptions.FHIRFormatError; +import org.hl7.fhir.exceptions.PathEngineException; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xml.XMLUtil; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import junit.framework.Assert; + +@RunWith(Parameterized.class) +public class SnapShotGenerationTests { + + private static class SnapShotGenerationTestsContext implements IEvaluationContext { + private Map fixtures; + private Map snapshots = new HashMap(); + public TestScript tests; + + public void checkTestsDetails() { + if (!"http://hl7.org/fhir/tests/snapshotgeneration".equals(tests.getUrl())) + throw new Error("Wrong URL on test script"); + if (!tests.getSetup().isEmpty()) + throw new Error("Setup is not supported"); + if (!tests.getTeardown().isEmpty()) + throw new Error("Teardown is not supported"); + Set ids = new HashSet(); + Set urls = new HashSet(); + for (Resource r : tests.getContained()) { + if (ids.contains(r.getId())) + throw new Error("Unsupported: duplicate contained resource on fixture id "+r.getId()); + ids.add(r.getId()); + if (r instanceof MetadataResource) { + MetadataResource md = (MetadataResource) r; + if (urls.contains(md.getUrl())) + throw new Error("Unsupported: duplicate canonical url "+md.getUrl()+" on fixture id "+r.getId()); + urls.add(md.getUrl()); + } + } + for (TestScriptFixtureComponent r : tests.getFixture()) { + if (ids.contains(r.getId())) + throw new Error("Unsupported: duplicate contained resource or fixture id "+r.getId()); + ids.add(r.getId()); + } + Set names = new HashSet(); + for (TestScriptTestComponent test : tests.getTest()) { + if (names.contains(test.getName())) + throw new Error("Unsupported: duplicate name "+test.getName()); + names.add(test.getName()); + if (test.getAction().size() < 2) + throw new Error("Unsupported: multiple actions required"); + if (!test.getActionFirstRep().hasOperation()) + throw new Error("Unsupported: first action must be an operation"); + for (int i = 0; i < test.getAction().size(); i++) { +// if (!test.getAction().get(i).hasAssert()) +// throw new Error("Unsupported: following actions must be an asserts"); + TestActionComponent action = test.getAction().get(i); + if (action.hasOperation()) { + SetupActionOperationComponent op = test.getActionFirstRep().getOperation(); + if (!CodingUtilities.matches(op.getType(), "http://hl7.org/fhir/testscript-operation-codes", "snapshot") + && !CodingUtilities.matches(op.getType(), "http://hl7.org/fhir/testscript-operation-codes", "sortDifferential")) + throw new Error("Unsupported action operation type "+CodingUtilities.present(op.getType())); + if (!"StructureDefinition".equals(op.getResource())) + throw new Error("Unsupported action operation resource "+op.getResource()); + if (!op.hasResponseId()) + throw new Error("Unsupported action operation: no response id"); + if (!op.hasSourceId()) + throw new Error("Unsupported action operation: no source id"); + if (!hasSource(op.getSourceId())) + throw new Error("Unsupported action operation: source id could not be resolved"); + } else if (action.hasAssert()) { + SetupActionAssertComponent a = action.getAssert(); + if (!a.hasLabel()) + throw new Error("Unsupported: actions must have a label"); + if (!a.hasDescription()) + throw new Error("Unsupported: actions must have a description"); + if (!a.hasExpression()) + throw new Error("Unsupported: actions must have an expression"); + } else { + throw new Error("Unsupported: Unrecognized action type"); + } + } + } + } + + private boolean hasSource(String sourceId) { + for (TestScriptFixtureComponent ds : tests.getFixture()) { + if (sourceId.equals(ds.getId())) + return true; + } + for (Resource r : tests.getContained()) { + if (sourceId.equals(r.getId())) + return true; + } + return false; + } + + public Resource fetchFixture(String id) { + if (fixtures.containsKey(id)) + return fixtures.get(id); + + for (TestScriptFixtureComponent ds : tests.getFixture()) { + if (id.equals(ds.getId())) + throw new Error("not done yet"); + } + for (Resource r : tests.getContained()) { + if (id.equals(r.getId())) + return r; + } + return null; + } + + // FHIRPath methods + @Override + public Base resolveConstant(Object appContext, String name) throws PathEngineException { + return null; + } + + @Override + public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException { + return null; + } + + @Override + public boolean log(String argument, List focus) { + System.out.println(argument+": "+fp.convertToString(focus)); + return true; + } + + @Override + public FunctionDetails resolveFunction(String functionName) { + if ("fixture".equals(functionName)) + return new FunctionDetails("Access a fixture defined in the testing context", 0, 1); + return null; + } + + @Override + public TypeDetails checkFunction(Object appContext, String functionName, List parameters) throws PathEngineException { + if ("fixture".equals(functionName)) + return new TypeDetails(CollectionStatus.SINGLETON, TestingUtilities.context.getResourceNamesAsSet()); + return null; + } + + @Override + public List executeFunction(Object appContext, String functionName, List> parameters) { + if ("fixture".equals(functionName)) { + String id = fp.convertToString(parameters.get(0)); + Resource res = fetchFixture(id); + if (res != null) { + List list = new ArrayList(); + list.add(res); + return list; + } + } + return null; + } + + @Override + public Base resolveReference(Object appContext, String url) { + // TODO Auto-generated method stub + return null; + } + + } + + + private static FHIRPathEngine fp; + + @Parameters(name = "{index}: file {0}") + public static Iterable data() throws ParserConfigurationException, IOException, FHIRFormatError { + SnapShotGenerationTestsContext context = new SnapShotGenerationTestsContext(); + context.tests = (TestScript) new XmlParser().parse(new FileInputStream(Utilities.path(TestingUtilities.home(), "tests", "resources", "snapshot-generation-tests.xml"))); + + context.checkTestsDetails(); + + List objects = new ArrayList(context.tests.getTest().size()); + + for (TestScriptTestComponent e : context.tests.getTest()) { + objects.add(new Object[] { e.getName(), e, context }); + } + return objects; + } + + + private final TestScriptTestComponent test; + private final String name; + private SnapShotGenerationTestsContext context; + + public SnapShotGenerationTests(String name, TestScriptTestComponent e, SnapShotGenerationTestsContext context) { + this.name = name; + this.test = e; + this.context = context; + } + + @SuppressWarnings("deprecation") + @Test + public void test() throws FileNotFoundException, IOException, FHIRException, org.hl7.fhir.exceptions.FHIRException { + if (TestingUtilities.context == null) + TestingUtilities.context = SimpleWorkerContext.fromPack(Utilities.path(TestingUtilities.home(), "publish", "definitions.xml.zip")); + if (fp == null) + fp = new FHIRPathEngine(TestingUtilities.context); + fp.setHostServices(context); + + resolveFixtures(); + + for (int i = 0; i < test.getAction().size(); i++) { + TestActionComponent action = test.getAction().get(i); + if (action.hasOperation()) { + SetupActionOperationComponent op = action.getOperation(); + Coding opType = op.getType(); + if (opType.getSystem().equals("http://hl7.org/fhir/testscript-operation-codes") && opType.getCode().equals("snapshot")) { + StructureDefinition source = (StructureDefinition) context.fetchFixture(op.getSourceId()); + StructureDefinition base = getSD(source.getBaseDefinition()); + StructureDefinition output = source.copy(); + ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context, null, null); + pu.setIds(source, false); + if ("sort=true".equals(op.getParams())) { + List errors = new ArrayList(); + pu.sortDifferential(base, output, source.getName(), errors); + if (errors.size() > 0) + throw new FHIRException("Sort failed: "+errors.toString()); + } + pu.generateSnapshot(base, output, source.getUrl(), source.getName()); + context.fixtures.put(op.getResponseId(), output); + context.snapshots.put(output.getUrl(), output); + + new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(System.getProperty("java.io.tmpdir"), op.getResponseId()+".xml")), output); + + } else if (opType.getSystem().equals("http://hl7.org/fhir/testscript-operation-codes") && opType.getCode().equals("sortDifferential")) { + StructureDefinition source = (StructureDefinition) context.fetchFixture(op.getSourceId()); + StructureDefinition base = getSD(source.getBaseDefinition()); + StructureDefinition output = source.copy(); + ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context, null, null); + pu.setIds(source, false); + List errors = new ArrayList(); + pu.sortDifferential(base, output, output.getUrl(), errors); + if (!errors.isEmpty()) + throw new FHIRException(errors.get(0)); + context.fixtures.put(op.getResponseId(), output); + context.snapshots.put(output.getUrl(), output); + + new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(System.getProperty("java.io.tmpdir"), op.getResponseId()+".xml")), output); + + } else { + throw new Error("Unsupported operation: " + opType.getSystem() + " : " + opType.getCode()); + } + } else if (action.hasAssert()) { + SetupActionAssertComponent a = action.getAssert(); + Assert.assertTrue(a.getLabel()+": "+a.getDescription(), fp.evaluateToBoolean(new StructureDefinition(), new StructureDefinition(), a.getExpression())); + } + } + } + + + private StructureDefinition getSD(String url) throws DefinitionException, FHIRException { + StructureDefinition sd = TestingUtilities.context.fetchResource(StructureDefinition.class, url); + if (sd == null) + sd = context.snapshots.get(url); + if (sd == null) + sd = findContainedProfile(url); + return sd; + } + + private StructureDefinition findContainedProfile(String url) throws DefinitionException, FHIRException { + for (Resource r : context.tests.getContained()) { + if (r instanceof StructureDefinition) { + StructureDefinition sd = (StructureDefinition) r; + if (sd.getUrl().equals(url)) { + StructureDefinition p = sd.copy(); + ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context, null, null); + pu.setIds(p, false); + List errors = new ArrayList(); + pu.sortDifferential(getSD(p.getBaseDefinition()), p, url, errors); + if (!errors.isEmpty()) + throw new FHIRException(errors.get(0)); + pu.generateSnapshot(getSD(p.getBaseDefinition()), p, p.getUrl(), p.getName()); + return p; + } + } + } + return null; + } + + private void resolveFixtures() { + if (context.fixtures == null) { + context.fixtures = new HashMap(); + for (TestScriptFixtureComponent fd : context.tests.getFixture()) { + Resource r = TestingUtilities.context.fetchResource(Resource.class, fd.getResource().getReference()); + context.fixtures.put(fd.getId(), r); + } + } + + } +} diff --git a/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/TurtleTests.java b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/TurtleTests.java new file mode 100644 index 00000000000..88b99ac074c --- /dev/null +++ b/hapi-fhir-structures-r4/src/test/java/org/hl7/fhir/r4/test/TurtleTests.java @@ -0,0 +1,3552 @@ +package org.hl7.fhir.r4.test; + +import java.io.FileNotFoundException; +import java.io.IOException; + +import org.hl7.fhir.r4.test.support.TestingUtilities; +import org.hl7.fhir.r4.utils.formats.Turtle; +import org.hl7.fhir.utilities.TextFile; +import org.hl7.fhir.utilities.Utilities; +import org.junit.Test; + +import junit.framework.Assert; + +public class TurtleTests { + + + + private void doTest(String filename, boolean ok) throws Exception { + try { + String s = TextFile.fileToString(filename); + Turtle ttl = new Turtle(); + ttl.parse(s); + Assert.assertTrue(ok); + } catch (Exception e) { + Assert.assertTrue(e.getMessage(), !ok); + } + } + + @Test + public void test_double_lower_case_e1() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "double_lower_case_e.nt"), true); + } + @Test + public void test_double_lower_case_e2() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "double_lower_case_e.ttl"), true); + } + @Test + public void test_empty_collection1() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "empty_collection.nt"), true); + } + @Test + public void test_empty_collection2() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "empty_collection.ttl"), true); + } + @Test + public void test_first1() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "first.nt"), true); + } +// @Test +// public void test_first2() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "first.ttl"), true); +// } +// @Test + public void test_HYPHEN_MINUS_in_localNameNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "HYPHEN_MINUS_in_localName.nt"), true); + } + @Test + public void test_HYPHEN_MINUS_in_localName() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "HYPHEN_MINUS_in_localName.ttl"), true); + } + @Test + public void test_IRI_spoNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRI_spo.nt"), true); + } + @Test + public void test_IRI_subject() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRI_subject.ttl"), true); + } + @Test + public void test_IRI_with_all_punctuationNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRI_with_all_punctuation.nt"), true); + } + @Test + public void test_IRI_with_all_punctuation() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRI_with_all_punctuation.ttl"), true); + } + @Test + public void test_IRI_with_eight_digit_numeric_escape() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRI_with_eight_digit_numeric_escape.ttl"), true); + } + @Test + public void test_IRI_with_four_digit_numeric_escape() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRI_with_four_digit_numeric_escape.ttl"), true); + } + @Test + public void test_IRIREF_datatypeNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRIREF_datatype.nt"), true); + } + @Test + public void test_IRIREF_datatype() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "IRIREF_datatype.ttl"), true); + } + @Test + public void test_labeled_blank_node_objectNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_object.nt"), true); + } + @Test + public void test_labeled_blank_node_object() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_object.ttl"), true); + } + @Test + public void test_labeled_blank_node_subjectNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_subject.nt"), true); + } + @Test + public void test_labeled_blank_node_subject() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_subject.ttl"), true); + } + @Test + public void test_labeled_blank_node_with_leading_digit() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_with_leading_digit.ttl"), true); + } + @Test + public void test_labeled_blank_node_with_leading_underscore() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_with_leading_underscore.ttl"), true); + } + @Test + public void test_labeled_blank_node_with_non_leading_extras() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_with_non_leading_extras.ttl"), true); + } + @Test + public void test_labeled_blank_node_with_PN_CHARS_BASE_character_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.ttl"), false); + } + @Test + public void test_langtagged_LONG() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "langtagged_LONG.ttl"), true); + } + @Test + public void test_langtagged_LONG_with_subtagNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "langtagged_LONG_with_subtag.nt"), true); + } + @Test + public void test_langtagged_LONG_with_subtag() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "langtagged_LONG_with_subtag.ttl"), true); + } + @Test + public void test_langtagged_non_LONGNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "langtagged_non_LONG.nt"), true); + } + @Test + public void test_langtagged_non_LONG() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "langtagged_non_LONG.ttl"), true); + } + @Test + public void test_lantag_with_subtagNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "lantag_with_subtag.nt"), true); + } + @Test + public void test_lantag_with_subtag() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "lantag_with_subtag.ttl"), true); + } + @Test + public void test_lastNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "last.nt"), true); + } + @Test + public void test_last() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "last.ttl"), false); + } + @Test + public void test_literal_falseNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_false.nt"), true); + } + @Test + public void test_literal_false() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_false.ttl"), true); + } + @Test + public void test_LITERAL_LONG1() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1.ttl"), true); + } + @Test + public void test_LITERAL_LONG1_ascii_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_ascii_boundaries.nt"), false); + } + @Test + public void test_LITERAL_LONG1_ascii_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_ascii_boundaries.ttl"), true); + } + @Test + public void test_LITERAL_LONG1_with_1_squoteNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_with_1_squote.nt"), true); + } + @Test + public void test_LITERAL_LONG1_with_1_squote() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_with_1_squote.ttl"), true); + } + @Test + public void test_LITERAL_LONG1_with_2_squotesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_with_2_squotes.nt"), true); + } + @Test + public void test_LITERAL_LONG1_with_2_squotes() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_with_2_squotes.ttl"), true); + } + @Test + public void test_LITERAL_LONG1_with_UTF8_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG1_with_UTF8_boundaries.ttl"), true); + } + @Test + public void test_LITERAL_LONG2() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2.ttl"), true); + } + @Test + public void test_LITERAL_LONG2_ascii_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_ascii_boundaries.nt"), false); + } + @Test + public void test_LITERAL_LONG2_ascii_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_ascii_boundaries.ttl"), true); + } + @Test + public void test_LITERAL_LONG2_with_1_squoteNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_1_squote.nt"), true); + } + @Test + public void test_LITERAL_LONG2_with_1_squote() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_1_squote.ttl"), true); + } + @Test + public void test_LITERAL_LONG2_with_2_squotesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_2_squotes.nt"), true); + } + @Test + public void test_LITERAL_LONG2_with_2_squotes() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_2_squotes.ttl"), true); + } + @Test + public void test_LITERAL_LONG2_with_REVERSE_SOLIDUSNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_REVERSE_SOLIDUS.nt"), false); + } + @Test + public void test_LITERAL_LONG2_with_REVERSE_SOLIDUS() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl"), false); + } + @Test + public void test_LITERAL_LONG2_with_UTF8_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_LONG2_with_UTF8_boundaries.ttl"), true); + } + @Test + public void test_literal_trueNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_true.nt"), true); + } + @Test + public void test_literal_true() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_true.ttl"), true); + } + @Test + public void test_literal_with_BACKSPACENT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_BACKSPACE.nt"), false); + } + @Test + public void test_literal_with_BACKSPACE() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_BACKSPACE.ttl"), true); + } + @Test + public void test_literal_with_CARRIAGE_RETURNNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_CARRIAGE_RETURN.nt"), true); + } + @Test + public void test_literal_with_CARRIAGE_RETURN() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_CARRIAGE_RETURN.ttl"), true); + } + @Test + public void test_literal_with_CHARACTER_TABULATIONNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_CHARACTER_TABULATION.nt"), true); + } + @Test + public void test_literal_with_CHARACTER_TABULATION() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_CHARACTER_TABULATION.ttl"), true); + } + @Test + public void test_literal_with_escaped_BACKSPACE() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_escaped_BACKSPACE.ttl"), false); + } + @Test + public void test_literal_with_escaped_CARRIAGE_RETURN() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_escaped_CARRIAGE_RETURN.ttl"), true); + } + @Test + public void test_literal_with_escaped_CHARACTER_TABULATION() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_escaped_CHARACTER_TABULATION.ttl"), true); + } + @Test + public void test_literal_with_escaped_FORM_FEED() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_escaped_FORM_FEED.ttl"), true); + } + @Test + public void test_literal_with_escaped_LINE_FEED() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_escaped_LINE_FEED.ttl"), true); + } +// @Test +// public void test_literal_with_FORM_FEEDNT() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_FORM_FEED.nt"), true); +// } + @Test + public void test_literal_with_FORM_FEED() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_FORM_FEED.ttl"), true); + } + @Test + public void test_literal_with_LINE_FEEDNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_LINE_FEED.nt"), true); + } + @Test + public void test_literal_with_LINE_FEED() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_LINE_FEED.ttl"), true); + } + @Test + public void test_literal_with_numeric_escape4NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_numeric_escape4.nt"), true); + } + @Test + public void test_literal_with_numeric_escape4() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_numeric_escape4.ttl"), true); + } + @Test + public void test_literal_with_numeric_escape8() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_numeric_escape8.ttl"), true); + } + @Test + public void test_literal_with_REVERSE_SOLIDUSNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_REVERSE_SOLIDUS.nt"), false); + } + @Test + public void test_literal_with_REVERSE_SOLIDUS() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "literal_with_REVERSE_SOLIDUS.ttl"), true); + } + @Test + public void test_LITERAL_with_UTF8_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL_with_UTF8_boundaries.nt"), true); + } + @Test + public void test_LITERAL1NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1.nt"), true); + } + @Test + public void test_LITERAL1() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1.ttl"), true); + } + @Test + public void test_LITERAL1_all_controlsNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_all_controls.nt"), false); + } + @Test + public void test_LITERAL1_all_controls() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_all_controls.ttl"), true); + } + @Test + public void test_LITERAL1_all_punctuationNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_all_punctuation.nt"), true); + } + @Test + public void test_LITERAL1_all_punctuation() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_all_punctuation.ttl"), true); + } +// @Test +// public void test_LITERAL1_ascii_boundariesNT() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_ascii_boundaries.nt"), true); +// } + @Test + public void test_LITERAL1_ascii_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_ascii_boundaries.ttl"), true); + } + @Test + public void test_LITERAL1_with_UTF8_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL1_with_UTF8_boundaries.ttl"), true); + } + @Test + public void test_LITERAL2() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL2.ttl"), true); + } + @Test + public void test_LITERAL2_ascii_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL2_ascii_boundaries.nt"), false); + } + @Test + public void test_LITERAL2_ascii_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL2_ascii_boundaries.ttl"), true); + } + @Test + public void test_LITERAL2_with_UTF8_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "LITERAL2_with_UTF8_boundaries.ttl"), true); + } + @Test + public void test_localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries.nt"), true); + } + @Test + public void test_localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries.ttl"), true); + } + @Test + public void test_localName_with_assigned_nfc_PN_CHARS_BASE_character_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.nt"), true); + } + @Test + public void test_localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.ttl"), false); + } +// don't need to support property names with ':' +// @Test +// public void test_localname_with_COLONNT() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localname_with_COLON.nt"), true); +// } +// @Test +// public void test_localname_with_COLON() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localname_with_COLON.ttl"), true); +// } + @Test + public void test_localName_with_leading_digitNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_leading_digit.nt"), true); + } + @Test + public void test_localName_with_leading_digit() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_leading_digit.ttl"), true); + } + @Test + public void test_localName_with_leading_underscoreNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_leading_underscore.nt"), true); + } + @Test + public void test_localName_with_leading_underscore() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_leading_underscore.ttl"), true); + } + @Test + public void test_localName_with_nfc_PN_CHARS_BASE_character_boundariesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_nfc_PN_CHARS_BASE_character_boundaries.nt"), true); + } + @Test + public void test_localName_with_nfc_PN_CHARS_BASE_character_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_nfc_PN_CHARS_BASE_character_boundaries.ttl"), false); + } + @Test + public void test_localName_with_non_leading_extrasNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_non_leading_extras.nt"), true); + } + @Test + public void test_localName_with_non_leading_extras() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "localName_with_non_leading_extras.ttl"), true); + } + @Test + public void test_negative_numericNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "negative_numeric.nt"), true); + } + @Test + public void test_negative_numeric() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "negative_numeric.ttl"), true); + } + @Test + public void test_nested_blankNodePropertyListsNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "nested_blankNodePropertyLists.nt"), true); + } + @Test + public void test_nested_blankNodePropertyLists() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "nested_blankNodePropertyLists.ttl"), true); + } + @Test + public void test_nested_collectionNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "nested_collection.nt"), true); + } + @Test + public void test_nested_collection() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "nested_collection.ttl"), false); + } + @Test + public void test_number_sign_following_localNameNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "number_sign_following_localName.nt"), true); + } + @Test + public void test_number_sign_following_localName() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "number_sign_following_localName.ttl"), true); + } + @Test + public void test_number_sign_following_PNAME_NSNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "number_sign_following_PNAME_NS.nt"), true); + } +// @Test +// public void test_number_sign_following_PNAME_NS() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "number_sign_following_PNAME_NS.ttl"), true); +// } + @Test + public void test_numeric_with_leading_0NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "numeric_with_leading_0.nt"), true); + } + @Test + public void test_numeric_with_leading_0() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "numeric_with_leading_0.ttl"), true); + } + @Test + public void test_objectList_with_two_objectsNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "objectList_with_two_objects.nt"), true); + } + @Test + public void test_objectList_with_two_objects() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "objectList_with_two_objects.ttl"), true); + } + @Test + public void test_old_style_base() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "old_style_base.ttl"), true); + } + @Test + public void test_old_style_prefix() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "old_style_prefix.ttl"), true); + } + @Test + public void test_percent_escaped_localNameNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "percent_escaped_localName.nt"), true); + } +// @Test +// public void test_percent_escaped_localName() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "percent_escaped_localName.ttl"), true); +// } + @Test + public void test_positive_numericNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "positive_numeric.nt"), true); + } + @Test + public void test_positive_numeric() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "positive_numeric.ttl"), true); + } + @Test + public void test_predicateObjectList_with_two_objectListsNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "predicateObjectList_with_two_objectLists.nt"), true); + } + @Test + public void test_predicateObjectList_with_two_objectLists() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "predicateObjectList_with_two_objectLists.ttl"), true); + } +// @Test +// public void test_prefix_only_IRI() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefix_only_IRI.ttl"), true); +// } + @Test + public void test_prefix_reassigned_and_usedNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefix_reassigned_and_used.nt"), true); + } + @Test + public void test_prefix_reassigned_and_used() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefix_reassigned_and_used.ttl"), true); + } + @Test + public void test_prefix_with_non_leading_extras() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefix_with_non_leading_extras.ttl"), true); + } + @Test + public void test_prefix_with_PN_CHARS_BASE_character_boundaries() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefix_with_PN_CHARS_BASE_character_boundaries.ttl"), true); + } + @Test + public void test_prefixed_IRI_object() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefixed_IRI_object.ttl"), true); + } + @Test + public void test_prefixed_IRI_predicate() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefixed_IRI_predicate.ttl"), true); + } + @Test + public void test_prefixed_name_datatype() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "prefixed_name_datatype.ttl"), true); + } + @Test + public void test_repeated_semis_at_end() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "repeated_semis_at_end.ttl"), true); + } + @Test + public void test_repeated_semis_not_at_endNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "repeated_semis_not_at_end.nt"), true); + } + @Test + public void test_repeated_semis_not_at_end() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "repeated_semis_not_at_end.ttl"), true); + } + @Test + public void test_reserved_escaped_localNameNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "reserved_escaped_localName.nt"), true); + } +// @Test +// public void test_reserved_escaped_localName() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "reserved_escaped_localName.ttl"), true); +// } + @Test + public void test_sole_blankNodePropertyList() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "sole_blankNodePropertyList.ttl"), true); + } + @Test + public void test_SPARQL_style_base() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "SPARQL_style_base.ttl"), true); + } + @Test + public void test_SPARQL_style_prefix() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "SPARQL_style_prefix.ttl"), true); + } + @Test + public void test_turtle_eval_bad_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-bad-01.ttl"), false); + } + @Test + public void test_turtle_eval_bad_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-bad-02.ttl"), false); + } + @Test + public void test_turtle_eval_bad_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-bad-03.ttl"), false); + } +// @Test +// public void test_turtle_eval_bad_04() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-bad-04.ttl"), false); +// } + @Test + public void test_turtle_eval_struct_01NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-struct-01.nt"), true); + } + @Test + public void test_turtle_eval_struct_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-struct-01.ttl"), true); + } + @Test + public void test_turtle_eval_struct_02NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-struct-02.nt"), true); + } + @Test + public void test_turtle_eval_struct_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-eval-struct-02.ttl"), true); + } + @Test + public void test_turtle_subm_01NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-01.nt"), true); + } + @Test + public void test_turtle_subm_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-01.ttl"), true); + } + @Test + public void test_turtle_subm_02NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-02.nt"), true); + } + @Test + public void test_turtle_subm_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-02.ttl"), true); + } + @Test + public void test_turtle_subm_03NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-03.nt"), true); + } + @Test + public void test_turtle_subm_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-03.ttl"), false); + } + @Test + public void test_turtle_subm_04NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-04.nt"), true); + } + @Test + public void test_turtle_subm_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-04.ttl"), true); + } + @Test + public void test_turtle_subm_05NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-05.nt"), true); + } + @Test + public void test_turtle_subm_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-05.ttl"), true); + } + @Test + public void test_turtle_subm_06NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-06.nt"), true); + } + @Test + public void test_turtle_subm_06() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-06.ttl"), true); + } + @Test + public void test_turtle_subm_07NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-07.nt"), true); + } + @Test + public void test_turtle_subm_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-07.ttl"), false); + } + @Test + public void test_NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-08.nt"), true); + } + @Test + public void test_turtle_subm_08() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-08.ttl"), true); + } + @Test + public void test_turtle_subm_09NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-09.nt"), true); + } + @Test + public void test_turtle_subm_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-09.ttl"), true); + } + @Test + public void test_turtle_subm_10NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-10.nt"), true); + } + @Test + public void test_turtle_subm_10() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-10.ttl"), true); + } + @Test + public void test_turtle_subm_11NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-11.nt"), true); + } + @Test + public void test_turtle_subm_11() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-11.ttl"), true); + } + @Test + public void test_turtle_subm_12NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-12.nt"), true); + } + @Test + public void test_turtle_subm_12() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-12.ttl"), true); + } + @Test + public void test_turtle_subm_13NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-13.nt"), true); + } + @Test + public void test_turtle_subm_13() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-13.ttl"), true); + } + @Test + public void test_turtle_subm_14NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-14.nt"), true); + } + @Test + public void test_turtle_subm_14() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-14.ttl"), false); + } + @Test + public void test_turtle_subm_15NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-15.nt"), true); + } + @Test + public void test_turtle_subm_15() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-15.ttl"), true); + } + @Test + public void test_turtle_subm_16NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-16.nt"), true); + } + @Test + public void test_turtle_subm_16() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-16.ttl"), true); + } + @Test + public void test_turtle_subm_17NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-17.nt"), true); + } + @Test + public void test_turtle_subm_17() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-17.ttl"), true); + } + @Test + public void test_turtle_subm_18NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-18.nt"), false); + } + @Test + public void test_turtle_subm_18() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-18.ttl"), false); + } + @Test + public void test_turtle_subm_19NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-19.nt"), true); + } + @Test + public void test_turtle_subm_19() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-19.ttl"), true); + } + @Test + public void test_turtle_subm_20NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-20.nt"), true); + } + @Test + public void test_turtle_subm_20() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-20.ttl"), true); + } + @Test + public void test_turtle_subm_21NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-21.nt"), true); + } + @Test + public void test_turtle_subm_21() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-21.ttl"), true); + } + @Test + public void test_turtle_subm_22NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-22.nt"), true); + } + @Test + public void test_turtle_subm_22() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-22.ttl"), true); + } + @Test + public void test_turtle_subm_23NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-23.nt"), true); + } + @Test + public void test_turtle_subm_23() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-23.ttl"), false); + } + @Test + public void test_turtle_subm_24NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-24.nt"), true); + } + @Test + public void test_turtle_subm_24() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-24.ttl"), true); + } + @Test + public void test_turtle_subm_25NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-25.nt"), true); + } + @Test + public void test_turtle_subm_25() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-25.ttl"), true); + } + @Test + public void test_turtle_subm_26NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-26.nt"), true); + } + @Test + public void test_turtle_subm_26() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-26.ttl"), true); + } + @Test + public void test_turtle_subm_27NT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-27.nt"), true); + } + @Test + public void test_turtle_subm_27() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-subm-27.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_base_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-base-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_base_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-base-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_base_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-base-03.ttl"), false); + } +// @Test +// public void test_turtle_syntax_bad_blank_label_dot_end() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-blank-label-dot-end.ttl"), false); +// } + @Test + public void test_turtle_syntax_bad_esc_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-esc-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_esc_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-esc-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_esc_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-esc-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_esc_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-esc-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_kw_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-kw-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_kw_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-kw-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_kw_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-kw-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_kw_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-kw-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_kw_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-kw-05.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_lang_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-lang-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_LITERAL2_with_langtag_and_datatype() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_ln_dash_start() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-ln-dash-start.ttl"), true); + } + @Test + public void test_turtle_syntax_bad_ln_escape() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-ln-escape.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_ln_escape_start() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-ln-escape-start.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_missing_ns_dot_end() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-missing-ns-dot-end.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_missing_ns_dot_start() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-missing-ns-dot-start.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-05.ttl"), false); + } +// @Test +// public void test_turtle_syntax_bad_n3_extras_06() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-06.ttl"), false); +// } + @Test + public void test_turtle_syntax_bad_n3_extras_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-07.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_08() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-08.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-09.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_10() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-10.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_11() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-11.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_12() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-12.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_n3_extras_13() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-n3-extras-13.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_ns_dot_end() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-ns-dot-end.ttl"), true); + } + @Test + public void test_turtle_syntax_bad_ns_dot_start() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-ns-dot-start.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_num_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-num-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_num_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-num-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_num_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-num-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_num_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-num-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_num_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-num-05.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_number_dot_in_anon() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-number-dot-in-anon.ttl"), true); + } + @Test + public void test_turtle_syntax_bad_pname_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-pname-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_pname_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-pname-02.ttl"), false); + } +// @Test +// public void test_turtle_syntax_bad_pname_03() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-pname-03.ttl"), false); +// } + @Test + public void test_turtle_syntax_bad_prefix_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-prefix-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_prefix_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-prefix-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_prefix_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-prefix-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_prefix_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-prefix-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_prefix_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-prefix-05.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-05.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_06() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-06.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_string_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-string-07.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-01.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-03.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-04.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-05.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_06() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-06.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-07.ttl"), true); + } + @Test + public void test_turtle_syntax_bad_struct_08() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-08.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-09.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_10() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-10.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_11() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-11.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_12() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-12.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_13() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-13.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_14() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-14.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_15() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-15.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_16() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-16.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_struct_17() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-struct-17.ttl"), true); + } +// @Test +// public void test_turtle_syntax_bad_uri_01() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-uri-01.ttl"), false); +// } + @Test + public void test_turtle_syntax_bad_uri_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-uri-02.ttl"), false); + } + @Test + public void test_turtle_syntax_bad_uri_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-uri-03.ttl"), false); + } +// @Test +// public void test_turtle_syntax_bad_uri_04() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-uri-04.ttl"), false); +// } +// @Test +// public void test_turtle_syntax_bad_uri_05() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bad-uri-05.ttl"), false); +// } + @Test + public void test_turtle_syntax_base_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-base-01.ttl"), true); + } + @Test + public void test_turtle_syntax_base_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-base-02.ttl"), true); + } + @Test + public void test_turtle_syntax_base_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-base-03.ttl"), true); + } + @Test + public void test_turtle_syntax_base_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-base-04.ttl"), true); + } + @Test + public void test_turtle_syntax_blank_label() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-blank-label.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-01.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-02.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-03.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-04.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-05.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_06() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-06.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-07.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_08() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-08.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-09.ttl"), true); + } + @Test + public void test_turtle_syntax_bnode_10() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-bnode-10.ttl"), true); + } + @Test + public void test_turtle_syntax_datatypes_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-datatypes-01.ttl"), true); + } + @Test + public void test_turtle_syntax_datatypes_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-datatypes-02.ttl"), true); + } + @Test + public void test_turtle_syntax_file_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-file-01.ttl"), true); + } + @Test + public void test_turtle_syntax_file_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-file-02.ttl"), true); + } + @Test + public void test_turtle_syntax_file_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-file-03.ttl"), true); + } + @Test + public void test_turtle_syntax_kw_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-kw-01.ttl"), true); + } + @Test + public void test_turtle_syntax_kw_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-kw-02.ttl"), true); + } + @Test + public void test_turtle_syntax_kw_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-kw-03.ttl"), false); + } + @Test + public void test_turtle_syntax_lists_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-lists-01.ttl"), true); + } + @Test + public void test_turtle_syntax_lists_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-lists-02.ttl"), true); + } +// @Test +// public void test_turtle_syntax_lists_03() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-lists-03.ttl"), true); +// } +// @Test +// public void test_turtle_syntax_lists_04() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-lists-04.ttl"), true); +// } +// @Test +// public void test_turtle_syntax_lists_05() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-lists-05.ttl"), true); +// } +// @Test +// public void test_turtle_syntax_ln_colons() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-ln-colons.ttl"), true); +// } + @Test + public void test_turtle_syntax_ln_dots() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-ln-dots.ttl"), false); + } + @Test + public void test_turtle_syntax_ns_dots() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-ns-dots.ttl"), true); + } + @Test + public void test_turtle_syntax_number_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-01.ttl"), true); + } + @Test + public void test_turtle_syntax_number_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-02.ttl"), true); + } + @Test + public void test_turtle_syntax_number_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-03.ttl"), true); + } + @Test + public void test_turtle_syntax_number_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-04.ttl"), true); + } +// @Test +// public void test_turtle_syntax_number_05() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-05.ttl"), true); +// } + @Test + public void test_turtle_syntax_number_06() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-06.ttl"), true); + } + @Test + public void test_turtle_syntax_number_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-07.ttl"), true); + } +// @Test +// public void test_turtle_syntax_number_08() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-08.ttl"), true); +// } + @Test + public void test_turtle_syntax_number_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-09.ttl"), true); + } + @Test + public void test_turtle_syntax_number_10() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-10.ttl"), true); + } + @Test + public void test_turtle_syntax_number_11() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-number-11.ttl"), true); + } + @Test + public void test_turtle_syntax_pname_esc_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-pname-esc-01.ttl"), false); + } + @Test + public void test_turtle_syntax_pname_esc_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-pname-esc-02.ttl"), false); + } + @Test + public void test_turtle_syntax_pname_esc_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-pname-esc-03.ttl"), false); + } + @Test + public void test_turtle_syntax_prefix_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-01.ttl"), true); + } +// @Test +// public void test_turtle_syntax_prefix_02() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-02.ttl"), true); +// } + @Test + public void test_turtle_syntax_prefix_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-03.ttl"), true); + } + @Test + public void test_turtle_syntax_prefix_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-04.ttl"), true); + } +// @Test +// public void test_turtle_syntax_prefix_05() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-05.ttl"), true); +// } +// @Test +// public void test_turtle_syntax_prefix_06() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-06.ttl"), true); +// } + @Test + public void test_turtle_syntax_prefix_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-07.ttl"), true); + } + @Test + public void test_turtle_syntax_prefix_08() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-08.ttl"), true); + } + @Test + public void test_turtle_syntax_prefix_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-prefix-09.ttl"), true); + } + @Test + public void test_turtle_syntax_str_esc_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-str-esc-01.ttl"), true); + } + @Test + public void test_turtle_syntax_str_esc_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-str-esc-02.ttl"), true); + } + @Test + public void test_turtle_syntax_str_esc_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-str-esc-03.ttl"), true); + } + @Test + public void test_turtle_syntax_string_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-01.ttl"), true); + } + @Test + public void test_turtle_syntax_string_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-02.ttl"), true); + } + @Test + public void test_turtle_syntax_string_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-03.ttl"), true); + } + @Test + public void test_turtle_syntax_string_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-04.ttl"), true); + } + @Test + public void test_turtle_syntax_string_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-05.ttl"), true); + } + @Test + public void test_turtle_syntax_string_06() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-06.ttl"), true); + } + @Test + public void test_turtle_syntax_string_07() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-07.ttl"), true); + } + @Test + public void test_turtle_syntax_string_08() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-08.ttl"), true); + } + @Test + public void test_turtle_syntax_string_09() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-09.ttl"), true); + } + @Test + public void test_turtle_syntax_string_10() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-10.ttl"), true); + } + @Test + public void test_turtle_syntax_string_11() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-string-11.ttl"), true); + } + @Test + public void test_turtle_syntax_struct_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-struct-01.ttl"), true); + } + @Test + public void test_turtle_syntax_struct_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-struct-02.ttl"), true); + } + @Test + public void test_turtle_syntax_struct_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-struct-03.ttl"), true); + } + @Test + public void test_turtle_syntax_struct_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-struct-04.ttl"), true); + } + @Test + public void test_turtle_syntax_struct_05() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-struct-05.ttl"), true); + } + @Test + public void test_turtle_syntax_uri_01() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-uri-01.ttl"), true); + } + @Test + public void test_turtle_syntax_uri_02() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-uri-02.ttl"), true); + } + @Test + public void test_turtle_syntax_uri_03() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-uri-03.ttl"), true); + } + @Test + public void test_turtle_syntax_uri_04() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "turtle-syntax-uri-04.ttl"), true); + } + @Test + public void test_two_LITERAL_LONG2sNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "two_LITERAL_LONG2s.nt"), true); + } + @Test + public void test_two_LITERAL_LONG2s() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "two_LITERAL_LONG2s.ttl"), true); + } + @Test + public void test_underscore_in_localNameNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "underscore_in_localName.nt"), true); + } + @Test + public void test_underscore_in_localName() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "underscore_in_localName.ttl"), true); + } + @Test + public void test_anonymous_blank_node_object() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "anonymous_blank_node_object.ttl"), true); + } + @Test + public void test_anonymous_blank_node_subject() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "anonymous_blank_node_subject.ttl"), true); + } + @Test + public void test_bareword_a_predicateNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_a_predicate.nt"), true); + } + @Test + public void test_bareword_a_predicate() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_a_predicate.ttl"), true); + } + @Test + public void test_bareword_decimalNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_decimal.nt"), true); + } + @Test + public void test_bareword_decimal() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_decimal.ttl"), true); + } + @Test + public void test_bareword_doubleNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_double.nt"), true); + } + @Test + public void test_bareword_double() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_double.ttl"), true); + } + @Test + public void test_bareword_integer() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "bareword_integer.ttl"), true); + } + @Test + public void test_blankNodePropertyList_as_objectNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_as_object.nt"), true); + } + @Test + public void test_blankNodePropertyList_as_object() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_as_object.ttl"), true); + } + @Test + public void test_blankNodePropertyList_as_subjectNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_as_subject.nt"), true); + } +// @Test +// public void test_blankNodePropertyList_as_subject() throws Exception { +// doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_as_subject.ttl"), true); +// } + + @Test + public void test_blankNodePropertyList_containing_collectionNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_containing_collection.nt"), true); + } + @Test + public void test_blankNodePropertyList_containing_collection() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_containing_collection.ttl"), true); + } + @Test + public void test_blankNodePropertyList_with_multiple_triplesNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_with_multiple_triples.nt"), true); + } + @Test + public void test_blankNodePropertyList_with_multiple_triples() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "blankNodePropertyList_with_multiple_triples.ttl"), true); + } + @Test + public void test_collection_objectNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "collection_object.nt"), true); + } + @Test + public void test_collection_object() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "collection_object.ttl"), true); + } + @Test + public void test_collection_subjectNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "collection_subject.nt"), true); + } + @Test + public void test_collection_subject() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "collection_subject.ttl"), false); + } + @Test + public void test_comment_following_localName() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "comment_following_localName.ttl"), true); + } + @Test + public void test_comment_following_PNAME_NSNT() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "comment_following_PNAME_NS.nt"), true); + } + @Test + public void test_comment_following_PNAME_NS() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "comment_following_PNAME_NS.ttl"), false); + } + @Test + public void test__default_namespace_IRI() throws Exception { + doTest(Utilities.path(TestingUtilities.home(), "tests", "turtle", "default_namespace_IRI.ttl"), true); + } +// + + @Test + public void test_audit_event_example_pixQuery() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("audit-event-example-pixQuery.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "audit-event-example-pixQuery.ttl"))); + } + @Test + public void test_audit_event_example_media() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("audit-event-example-media.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "audit-event-example-media.ttl"))); + } + @Test + public void test_audit_event_example_logout() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("audit-event-example-logout.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "audit-event-example-logout.ttl"))); + } + @Test + public void test_audit_event_example_login() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("audit-event-example-login.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "audit-event-example-login.ttl"))); + } + @Test + public void test_appointmentresponse_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("appointmentresponse-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "appointmentresponse-example.ttl"))); + } + @Test + public void test_appointmentresponse_example_req() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("appointmentresponse-example-req.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "appointmentresponse-example-req.ttl"))); + } + @Test + public void test_appointment_example2doctors() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("appointment-example2doctors.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "appointment-example2doctors.ttl"))); + } + @Test + public void test_appointment_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("appointment-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "appointment-example.ttl"))); + } + @Test + public void test_appointment_example_request() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("appointment-example-request.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "appointment-example-request.ttl"))); + } + @Test + public void test_allergyintolerance_medication() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("allergyintolerance-medication.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "allergyintolerance-medication.ttl"))); + } + @Test + public void test_allergyintolerance_fishallergy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("allergyintolerance-fishallergy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "allergyintolerance-fishallergy.ttl"))); + } + @Test + public void test_allergyintolerance_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("allergyintolerance-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "allergyintolerance-example.ttl"))); + } + @Test + public void test_account_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("account-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "account-example.ttl"))); + } + @Test + public void test_xds_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("xds-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "xds-example.ttl"))); + } + @Test + public void test_visionprescription_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("visionprescription-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "visionprescription-example.ttl"))); + } + @Test + public void test_visionprescription_example_1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("visionprescription-example-1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "visionprescription-example-1.ttl"))); + } + @Test + public void test_valueset_ucum_common() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-ucum-common.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-ucum-common.ttl"))); + } + @Test + public void test_valueset_nhin_purposeofuse() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-nhin-purposeofuse.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-nhin-purposeofuse.ttl"))); + } + @Test + public void test_valueset_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-example.ttl"))); + } + @Test + public void test_valueset_example_yesnodontknow() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-example-yesnodontknow.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-example-yesnodontknow.ttl"))); + } + @Test + public void test_valueset_example_intensional() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-example-intensional.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-example-intensional.ttl"))); + } + @Test + public void test_valueset_example_expansion() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-example-expansion.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-example-expansion.ttl"))); + } + @Test + public void test_valueset_cpt_all() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("valueset-cpt-all.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "valueset-cpt-all.ttl"))); + } + @Test + public void test_testscript_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("testscript-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "testscript-example.ttl"))); + } + @Test + public void test_testscript_example_rule() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("testscript-example-rule.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "testscript-example-rule.ttl"))); + } + @Test + public void test_supplydelivery_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("supplydelivery-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "supplydelivery-example.ttl"))); + } + @Test + public void test_substance_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("substance-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "substance-example.ttl"))); + } + @Test + public void test_substance_example_silver_nitrate_product() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("substance-example-silver-nitrate-product.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "substance-example-silver-nitrate-product.ttl"))); + } + @Test + public void test_substance_example_f203_potassium() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("substance-example-f203-potassium.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "substance-example-f203-potassium.ttl"))); + } + @Test + public void test_substance_example_f202_staphylococcus() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("substance-example-f202-staphylococcus.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "substance-example-f202-staphylococcus.ttl"))); + } + @Test + public void test_substance_example_f201_dust() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("substance-example-f201-dust.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "substance-example-f201-dust.ttl"))); + } + @Test + public void test_substance_example_amoxicillin_clavulanate() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("substance-example-amoxicillin-clavulanate.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "substance-example-amoxicillin-clavulanate.ttl"))); + } + @Test + public void test_subscription_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("subscription-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "subscription-example.ttl"))); + } + @Test + public void test_subscription_example_error() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("subscription-example-error.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "subscription-example-error.ttl"))); + } + @Test + public void test_structuremap_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("structuremap-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "structuremap-example.ttl"))); + } + @Test + public void test_structuredefinition_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("structuredefinition-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "structuredefinition-example.ttl"))); + } + @Test + public void test_specimen_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("specimen-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "specimen-example.ttl"))); + } + @Test + public void test_specimen_example_urine() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("specimen-example-urine.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "specimen-example-urine.ttl"))); + } + @Test + public void test_specimen_example_isolate() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("specimen-example-isolate.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "specimen-example-isolate.ttl"))); + } + @Test + public void test_slot_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("slot-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "slot-example.ttl"))); + } + @Test + public void test_slot_example_unavailable() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("slot-example-unavailable.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "slot-example-unavailable.ttl"))); + } + @Test + public void test_slot_example_tentative() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("slot-example-tentative.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "slot-example-tentative.ttl"))); + } + @Test + public void test_slot_example_busy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("slot-example-busy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "slot-example-busy.ttl"))); + } + @Test + public void test_sequence_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("sequence-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "sequence-example.ttl"))); + } + @Test + public void test_searchparameter_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("searchparameter-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "searchparameter-example.ttl"))); + } + @Test + public void test_searchparameter_example_extension() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("searchparameter-example-extension.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "searchparameter-example-extension.ttl"))); + } + @Test + public void test_schedule_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("schedule-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "schedule-example.ttl"))); + } + @Test + public void test_riskassessment_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("riskassessment-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "riskassessment-example.ttl"))); + } + @Test + public void test_riskassessment_example_prognosis() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("riskassessment-example-prognosis.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "riskassessment-example-prognosis.ttl"))); + } + @Test + public void test_riskassessment_example_population() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("riskassessment-example-population.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "riskassessment-example-population.ttl"))); + } + @Test + public void test_riskassessment_example_cardiac() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("riskassessment-example-cardiac.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "riskassessment-example-cardiac.ttl"))); + } + @Test + public void test_relatedperson_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("relatedperson-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "relatedperson-example.ttl"))); + } + @Test + public void test_relatedperson_example_peter() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("relatedperson-example-peter.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "relatedperson-example-peter.ttl"))); + } + @Test + public void test_relatedperson_example_f002_ariadne() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("relatedperson-example-f002-ariadne.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "relatedperson-example-f002-ariadne.ttl"))); + } + @Test + public void test_relatedperson_example_f001_sarah() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("relatedperson-example-f001-sarah.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "relatedperson-example-f001-sarah.ttl"))); + } + @Test + public void test_provenance_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("provenance-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "provenance-example.ttl"))); + } + @Test + public void test_provenance_example_sig() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("provenance-example-sig.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "provenance-example-sig.ttl"))); + } + @Test + public void test_processresponse_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processresponse-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processresponse-example.ttl"))); + } + @Test + public void test_processrequest_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example.ttl"))); + } + @Test + public void test_processrequest_example_status() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-status.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-status.ttl"))); + } + @Test + public void test_processrequest_example_reverse() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-reverse.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-reverse.ttl"))); + } + @Test + public void test_processrequest_example_reprocess() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-reprocess.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-reprocess.ttl"))); + } + @Test + public void test_processrequest_example_poll_specific() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-poll-specific.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-poll-specific.ttl"))); + } + @Test + public void test_processrequest_example_poll_payrec() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-poll-payrec.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-poll-payrec.ttl"))); + } + @Test + public void test_processrequest_example_poll_inclusive() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-poll-inclusive.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-poll-inclusive.ttl"))); + } + @Test + public void test_processrequest_example_poll_exclusive() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-poll-exclusive.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-poll-exclusive.ttl"))); + } + @Test + public void test_processrequest_example_poll_eob() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("processrequest-example-poll-eob.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "processrequest-example-poll-eob.ttl"))); + } + @Test + public void test_procedurerequest_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedurerequest-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedurerequest-example.ttl"))); + } + @Test + public void test_procedure_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example.ttl"))); + } + @Test + public void test_procedure_example_implant() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-implant.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-implant.ttl"))); + } + @Test + public void test_procedure_example_f201_tpf() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-f201-tpf.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-f201-tpf.ttl"))); + } + @Test + public void test_procedure_example_f004_tracheotomy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-f004-tracheotomy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-f004-tracheotomy.ttl"))); + } + @Test + public void test_procedure_example_f003_abscess() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-f003-abscess.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-f003-abscess.ttl"))); + } + @Test + public void test_procedure_example_f002_lung() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-f002-lung.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-f002-lung.ttl"))); + } + @Test + public void test_procedure_example_f001_heart() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-f001-heart.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-f001-heart.ttl"))); + } + @Test + public void test_procedure_example_biopsy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("procedure-example-biopsy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "procedure-example-biopsy.ttl"))); + } + @Test + public void test_practitionerrole_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitionerrole-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitionerrole-example.ttl"))); + } + @Test + public void test_practitioner_examples_general() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-examples-general.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-examples-general.ttl"))); + } + @Test + public void test_practitioner_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example.ttl"))); + } + @Test + public void test_practitioner_example_xcda1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-xcda1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-xcda1.ttl"))); + } + @Test + public void test_practitioner_example_xcda_author() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-xcda-author.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-xcda-author.ttl"))); + } + @Test + public void test_practitioner_example_f204_ce() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f204-ce.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f204-ce.ttl"))); + } + @Test + public void test_practitioner_example_f203_jvg() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f203-jvg.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f203-jvg.ttl"))); + } + @Test + public void test_practitioner_example_f202_lm() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f202-lm.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f202-lm.ttl"))); + } + @Test + public void test_practitioner_example_f201_ab() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f201-ab.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f201-ab.ttl"))); + } + @Test + public void test_practitioner_example_f007_sh() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f007-sh.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f007-sh.ttl"))); + } + @Test + public void test_practitioner_example_f006_rvdb() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f006-rvdb.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f006-rvdb.ttl"))); + } + @Test + public void test_practitioner_example_f005_al() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f005-al.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f005-al.ttl"))); + } + @Test + public void test_practitioner_example_f004_rb() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f004-rb.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f004-rb.ttl"))); + } + @Test + public void test_practitioner_example_f003_mv() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f003-mv.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f003-mv.ttl"))); + } + @Test + public void test_practitioner_example_f002_pv() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f002-pv.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f002-pv.ttl"))); + } + @Test + public void test_practitioner_example_f001_evdb() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("practitioner-example-f001-evdb.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "practitioner-example-f001-evdb.ttl"))); + } + @Test + public void test_person_provider_directory() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("person-provider-directory.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "person-provider-directory.ttl"))); + } + @Test + public void test_person_patient_portal() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("person-patient-portal.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "person-patient-portal.ttl"))); + } + @Test + public void test_person_grahame() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("person-grahame.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "person-grahame.ttl"))); + } + @Test + public void test_person_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("person-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "person-example.ttl"))); + } + @Test + public void test_person_example_f002_ariadne() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("person-example-f002-ariadne.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "person-example-f002-ariadne.ttl"))); + } + @Test + public void test_paymentreconciliation_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("paymentreconciliation-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "paymentreconciliation-example.ttl"))); + } + @Test + public void test_paymentnotice_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("paymentnotice-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "paymentnotice-example.ttl"))); + } + @Test + public void test_patient_glossy_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-glossy-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-glossy-example.ttl"))); + } + @Test + public void test_patient_examples_general() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-examples-general.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-examples-general.ttl"))); + } + @Test + public void test_patient_examples_cypress_template() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-examples-cypress-template.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-examples-cypress-template.ttl"))); + } + @Test + public void test_patient_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example.ttl"))); + } + @Test + public void test_patient_example_xds() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-xds.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-xds.ttl"))); + } + @Test + public void test_patient_example_xcda() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-xcda.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-xcda.ttl"))); + } + @Test + public void test_patient_example_proband() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-proband.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-proband.ttl"))); + } + @Test + public void test_patient_example_ihe_pcd() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-ihe-pcd.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-ihe-pcd.ttl"))); + } + @Test + public void test_patient_example_f201_roel() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-f201-roel.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-f201-roel.ttl"))); + } + @Test + public void test_patient_example_f001_pieter() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-f001-pieter.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-f001-pieter.ttl"))); + } + @Test + public void test_patient_example_dicom() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-dicom.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-dicom.ttl"))); + } + @Test + public void test_patient_example_d() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-d.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-d.ttl"))); + } + @Test + public void test_patient_example_c() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-c.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-c.ttl"))); + } + @Test + public void test_patient_example_b() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-b.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-b.ttl"))); + } + @Test + public void test_patient_example_animal() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-animal.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-animal.ttl"))); + } + @Test + public void test_patient_example_a() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("patient-example-a.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "patient-example-a.ttl"))); + } + @Test + public void test_parameters_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("parameters-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "parameters-example.ttl"))); + } + @Test + public void test_organization_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example.ttl"))); + } + @Test + public void test_organization_example_lab() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-lab.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-lab.ttl"))); + } + @Test + public void test_organization_example_insurer() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-insurer.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-insurer.ttl"))); + } + @Test + public void test_organization_example_good_health_care() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-good-health-care.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-good-health-care.ttl"))); + } + @Test + public void test_organization_example_gastro() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-gastro.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-gastro.ttl"))); + } + @Test + public void test_organization_example_f203_bumc() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-f203-bumc.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-f203-bumc.ttl"))); + } + @Test + public void test_organization_example_f201_aumc() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-f201-aumc.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-f201-aumc.ttl"))); + } + @Test + public void test_organization_example_f003_burgers_ENT() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-f003-burgers-ENT.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-f003-burgers-ENT.ttl"))); + } + @Test + public void test_organization_example_f002_burgers_card() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-f002-burgers-card.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-f002-burgers-card.ttl"))); + } + @Test + public void test_organization_example_f001_burgers() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("organization-example-f001-burgers.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "organization-example-f001-burgers.ttl"))); + } + @Test + public void test_operationoutcome_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationoutcome-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationoutcome-example.ttl"))); + } + @Test + public void test_operationoutcome_example_validationfail() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationoutcome-example-validationfail.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationoutcome-example-validationfail.ttl"))); + } + @Test + public void test_operationoutcome_example_searchfail() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationoutcome-example-searchfail.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationoutcome-example-searchfail.ttl"))); + } + @Test + public void test_operationoutcome_example_exception() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationoutcome-example-exception.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationoutcome-example-exception.ttl"))); + } + @Test + public void test_operationoutcome_example_break_the_glass() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationoutcome-example-break-the-glass.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationoutcome-example-break-the-glass.ttl"))); + } + @Test + public void test_operationoutcome_example_allok() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationoutcome-example-allok.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationoutcome-example-allok.ttl"))); + } + @Test + public void test_operationdefinition_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("operationdefinition-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "operationdefinition-example.ttl"))); + } + @Test + public void test_observation_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example.ttl"))); + } + @Test + public void test_observation_example_unsat() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-unsat.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-unsat.ttl"))); + } + @Test + public void test_observation_example_satO2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-satO2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-satO2.ttl"))); + } + @Test + public void test_observation_example_sample_data() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-sample-data.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-sample-data.ttl"))); + } + @Test + public void test_observation_example_glasgow() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-glasgow.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-glasgow.ttl"))); + } + @Test + public void test_observation_example_glasgow_qa() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-glasgow-qa.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-glasgow-qa.ttl"))); + } + @Test + public void test_observation_example_genetics_5() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-genetics-5.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-genetics-5.ttl"))); + } + @Test + public void test_observation_example_genetics_4() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-genetics-4.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-genetics-4.ttl"))); + } + @Test + public void test_observation_example_genetics_3() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-genetics-3.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-genetics-3.ttl"))); + } + @Test + public void test_observation_example_genetics_2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-genetics-2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-genetics-2.ttl"))); + } + @Test + public void test_observation_example_genetics_1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-genetics-1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-genetics-1.ttl"))); + } + @Test + public void test_observation_example_f206_staphylococcus() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f206-staphylococcus.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f206-staphylococcus.ttl"))); + } + @Test + public void test_observation_example_f205_egfr() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f205-egfr.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f205-egfr.ttl"))); + } + @Test + public void test_observation_example_f204_creatinine() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f204-creatinine.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f204-creatinine.ttl"))); + } + @Test + public void test_observation_example_f203_bicarbonate() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f203-bicarbonate.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f203-bicarbonate.ttl"))); + } + @Test + public void test_observation_example_f202_temperature() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f202-temperature.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f202-temperature.ttl"))); + } + @Test + public void test_observation_example_f005_hemoglobin() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f005-hemoglobin.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f005-hemoglobin.ttl"))); + } + @Test + public void test_observation_example_f004_erythrocyte() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f004-erythrocyte.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f004-erythrocyte.ttl"))); + } + @Test + public void test_observation_example_f003_co2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f003-co2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f003-co2.ttl"))); + } + @Test + public void test_observation_example_f002_excess() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f002-excess.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f002-excess.ttl"))); + } + @Test + public void test_observation_example_f001_glucose() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-f001-glucose.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-f001-glucose.ttl"))); + } + @Test + public void test_observation_example_bloodpressure() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-bloodpressure.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-bloodpressure.ttl"))); + } + @Test + public void test_observation_example_bloodpressure_cancel() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("observation-example-bloodpressure-cancel.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "observation-example-bloodpressure-cancel.ttl"))); + } + @Test + public void test_nutritionorder_example_texture_modified() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-texture-modified.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-texture-modified.ttl"))); + } + @Test + public void test_nutritionorder_example_renaldiet() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-renaldiet.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-renaldiet.ttl"))); + } + @Test + public void test_nutritionorder_example_pureeddiet() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-pureeddiet.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-pureeddiet.ttl"))); + } + @Test + public void test_nutritionorder_example_pureeddiet_simple() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-pureeddiet-simple.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-pureeddiet-simple.ttl"))); + } + @Test + public void test_nutritionorder_example_proteinsupplement() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-proteinsupplement.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-proteinsupplement.ttl"))); + } + @Test + public void test_nutritionorder_example_infantenteral() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-infantenteral.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-infantenteral.ttl"))); + } + @Test + public void test_nutritionorder_example_fiberrestricteddiet() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-fiberrestricteddiet.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-fiberrestricteddiet.ttl"))); + } + @Test + public void test_nutritionorder_example_enteralcontinuous() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-enteralcontinuous.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-enteralcontinuous.ttl"))); + } + @Test + public void test_nutritionorder_example_enteralbolus() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-enteralbolus.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-enteralbolus.ttl"))); + } + @Test + public void test_nutritionorder_example_energysupplement() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-energysupplement.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-energysupplement.ttl"))); + } + @Test + public void test_nutritionorder_example_diabeticsupplement() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-diabeticsupplement.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-diabeticsupplement.ttl"))); + } + @Test + public void test_nutritionorder_example_diabeticdiet() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-diabeticdiet.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-diabeticdiet.ttl"))); + } + @Test + public void test_nutritionorder_example_cardiacdiet() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("nutritionorder-example-cardiacdiet.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "nutritionorder-example-cardiacdiet.ttl"))); + } + @Test + public void test_namingsystem_registry() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("namingsystem-registry.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "namingsystem-registry.ttl"))); + } + @Test + public void test_namingsystem_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("namingsystem-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "namingsystem-example.ttl"))); + } + @Test + public void test_namingsystem_example_replaced() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("namingsystem-example-replaced.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "namingsystem-example-replaced.ttl"))); + } + @Test + public void test_namingsystem_example_id() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("namingsystem-example-id.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "namingsystem-example-id.ttl"))); + } + @Test + public void test_messageheader_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("messageheader-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "messageheader-example.ttl"))); + } + @Test + public void test_message_response_link() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("message-response-link.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "message-response-link.ttl"))); + } + @Test + public void test_message_request_link() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("message-request-link.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "message-request-link.ttl"))); + } + @Test + public void test_medicationstatementexample7() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationstatementexample7.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationstatementexample7.ttl"))); + } + @Test + public void test_medicationstatementexample6() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationstatementexample6.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationstatementexample6.ttl"))); + } + @Test + public void test_medicationstatementexample5() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationstatementexample5.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationstatementexample5.ttl"))); + } + @Test + public void test_medicationstatementexample4() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationstatementexample4.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationstatementexample4.ttl"))); + } + @Test + public void test_medicationstatementexample2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationstatementexample2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationstatementexample2.ttl"))); + } + @Test + public void test_medicationstatementexample1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationstatementexample1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationstatementexample1.ttl"))); + } + @Test + public void test_medicationrequestexample2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationrequestexample2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationrequestexample2.ttl"))); + } + @Test + public void test_medicationrequestexample1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationrequestexample1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationrequestexample1.ttl"))); + } + @Test + public void test_medicationexample15() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationexample15.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationexample15.ttl"))); + } + @Test + public void test_medicationexample1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationexample1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationexample1.ttl"))); + } + @Test + public void test_medicationdispenseexample8() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationdispenseexample8.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationdispenseexample8.ttl"))); + } + @Test + public void test_medicationadministrationexample3() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationadministrationexample3.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationadministrationexample3.ttl"))); + } + @Test + public void test_medication_example_f203_paracetamol() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("medicationexample0312.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "medicationexample0312.ttl"))); + } + @Test + public void test_media_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("media-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "media-example.ttl"))); + } + @Test + public void test_media_example_sound() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("media-example-sound.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "media-example-sound.ttl"))); + } + @Test + public void test_media_example_dicom() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("media-example-dicom.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "media-example-dicom.ttl"))); + } + @Test + public void test_measurereport_cms146_cat3_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("measurereport-cms146-cat3-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "measurereport-cms146-cat3-example.ttl"))); + } + @Test + public void test_measurereport_cms146_cat2_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("measurereport-cms146-cat2-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "measurereport-cms146-cat2-example.ttl"))); + } + @Test + public void test_measurereport_cms146_cat1_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("measurereport-cms146-cat1-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "measurereport-cms146-cat1-example.ttl"))); + } + @Test + public void test_measure_exclusive_breastfeeding() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("measure-exclusive-breastfeeding.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "measure-exclusive-breastfeeding.ttl"))); + } + @Test + public void test_location_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("location-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "location-example.ttl"))); + } + @Test + public void test_location_example_ukpharmacy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("location-example-ukpharmacy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "location-example-ukpharmacy.ttl"))); + } + @Test + public void test_location_example_room() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("location-example-room.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "location-example-room.ttl"))); + } + @Test + public void test_location_example_patients_home() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("location-example-patients-home.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "location-example-patients-home.ttl"))); + } + @Test + public void test_location_example_hl7hq() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("location-example-hl7hq.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "location-example-hl7hq.ttl"))); + } + @Test + public void test_location_example_ambulance() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("location-example-ambulance.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "location-example-ambulance.ttl"))); + } + @Test + public void test_list_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("list-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "list-example.ttl"))); + } + @Test + public void test_list_example_medlist() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("list-example-medlist.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "list-example-medlist.ttl"))); + } + @Test + public void test_list_example_familyhistory_f201_roel() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("list-example-familyhistory-f201-roel.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "list-example-familyhistory-f201-roel.ttl"))); + } + @Test + public void test_list_example_empty() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("list-example-empty.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "list-example-empty.ttl"))); + } + @Test + public void test_list_example_allergies() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("list-example-allergies.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "list-example-allergies.ttl"))); + } + @Test + public void test_linkage_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("linkage-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "linkage-example.ttl"))); + } + @Test + public void test_library_exclusive_breastfeeding_cqm_logic() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("library-exclusive-breastfeeding-cqm-logic.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "library-exclusive-breastfeeding-cqm-logic.ttl"))); + } + @Test + public void test_library_exclusive_breastfeeding_cds_logic() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("library-exclusive-breastfeeding-cds-logic.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "library-exclusive-breastfeeding-cds-logic.ttl"))); + } + @Test + public void test_library_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("library-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "library-example.ttl"))); + } + @Test + public void test_library_cms146_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("library-cms146-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "library-cms146-example.ttl"))); + } + @Test + public void test_implementationguide_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("implementationguide-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "implementationguide-example.ttl"))); + } + @Test + public void test_immunizationrecommendation_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("immunizationrecommendation-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "immunizationrecommendation-example.ttl"))); + } + @Test + public void test_immunization_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("immunization-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "immunization-example.ttl"))); + } + @Test + public void test_immunization_example_refused() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("immunization-example-refused.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "immunization-example-refused.ttl"))); + } + @Test + public void test_imagingstudy_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("imagingstudy-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "imagingstudy-example.ttl"))); + } + @Test + public void test_healthcareservice_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("healthcareservice-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "healthcareservice-example.ttl"))); + } + @Test + public void test_guidanceresponse_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("guidanceresponse-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "guidanceresponse-example.ttl"))); + } + @Test + public void test_group_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("group-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "group-example.ttl"))); + } + @Test + public void test_group_example_member() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("group-example-member.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "group-example-member.ttl"))); + } + @Test + public void test_goal_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("goal-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "goal-example.ttl"))); + } + @Test + public void test_flag_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("flag-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "flag-example.ttl"))); + } + @Test + public void test_flag_example_encounter() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("flag-example-encounter.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "flag-example-encounter.ttl"))); + } + @Test + public void test_familymemberhistory_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("familymemberhistory-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "familymemberhistory-example.ttl"))); + } + @Test + public void test_familymemberhistory_example_mother() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("familymemberhistory-example-mother.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "familymemberhistory-example-mother.ttl"))); + } + @Test + public void test_explanationofbenefit_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("explanationofbenefit-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "explanationofbenefit-example.ttl"))); + } + @Test + public void test_episodeofcare_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("episodeofcare-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "episodeofcare-example.ttl"))); + } + @Test + public void test_enrollmentresponse_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("enrollmentresponse-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "enrollmentresponse-example.ttl"))); + } + @Test + public void test_enrollmentrequest_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("enrollmentrequest-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "enrollmentrequest-example.ttl"))); + } + @Test + public void test_endpoint_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("endpoint-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "endpoint-example.ttl"))); + } + @Test + public void test_encounter_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example.ttl"))); + } + @Test + public void test_encounter_example_xcda() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-xcda.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-xcda.ttl"))); + } + @Test + public void test_encounter_example_home() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-home.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-home.ttl"))); + } + @Test + public void test_encounter_example_f203_20130311() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-f203-20130311.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-f203-20130311.ttl"))); + } + @Test + public void test_encounter_example_f202_20130128() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-f202-20130128.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-f202-20130128.ttl"))); + } + @Test + public void test_encounter_example_f201_20130404() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-f201-20130404.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-f201-20130404.ttl"))); + } + @Test + public void test_encounter_example_f003_abscess() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-f003-abscess.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-f003-abscess.ttl"))); + } + @Test + public void test_encounter_example_f002_lung() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-f002-lung.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-f002-lung.ttl"))); + } + @Test + public void test_encounter_example_f001_heart() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("encounter-example-f001-heart.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "encounter-example-f001-heart.ttl"))); + } + @Test + public void test_eligibilityresponse_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("eligibilityresponse-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "eligibilityresponse-example.ttl"))); + } + @Test + public void test_eligibilityrequest_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("eligibilityrequest-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "eligibilityrequest-example.ttl"))); + } + @Test + public void test_documentreference_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("documentreference-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "documentreference-example.ttl"))); + } + @Test + public void test_documentmanifest_fm_attachment() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("documentmanifest-fm-attachment.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "documentmanifest-fm-attachment.ttl"))); + } + @Test + public void test_document_example_dischargesummary() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("document-example-dischargesummary.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "document-example-dischargesummary.ttl"))); + } + @Test + public void test_diagnosticreport_micro1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-micro1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-micro1.ttl"))); + } + @Test + public void test_diagnosticreport_hla_genetics_results_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-hla-genetics-results-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-hla-genetics-results-example.ttl"))); + } + + @Test + public void test_diagnosticreport_genetics_comprehensive_bone_marrow_report() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-genetics-comprehensive-bone-marrow-report.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-genetics-comprehensive-bone-marrow-report.ttl"))); + } + @Test + public void test_diagnosticreport_examples_general() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-examples-general.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-examples-general.ttl"))); + } + @Test + public void test_diagnosticreport_example_ultrasound() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-ultrasound.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-ultrasound.ttl"))); + } + @Test + public void test_diagnosticreport_example_lipids() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-lipids.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-lipids.ttl"))); + } + @Test + public void test_diagnosticreport_example_ghp() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-ghp.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-ghp.ttl"))); + } + @Test + public void test_diagnosticreport_example_f202_bloodculture() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-f202-bloodculture.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-f202-bloodculture.ttl"))); + } + @Test + public void test_diagnosticreport_example_f201_brainct() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-f201-brainct.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-f201-brainct.ttl"))); + } + @Test + public void test_diagnosticreport_example_f001_bloodexam() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-f001-bloodexam.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-f001-bloodexam.ttl"))); + } + @Test + public void test_diagnosticreport_example_dxa() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("diagnosticreport-example-dxa.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "diagnosticreport-example-dxa.ttl"))); + } + @Test + public void test_deviceusestatement_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("deviceusestatement-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "deviceusestatement-example.ttl"))); + } + @Test + public void test_devicemetric_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("devicemetric-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "devicemetric-example.ttl"))); + } + @Test + public void test_devicecomponent_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("devicecomponent-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "devicecomponent-example.ttl"))); + } + @Test + public void test_devicecomponent_example_prodspec() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("devicecomponent-example-prodspec.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "devicecomponent-example-prodspec.ttl"))); + } + @Test + public void test_device_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("device-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "device-example.ttl"))); + } + @Test + public void test_device_example_udi1() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("device-example-udi1.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "device-example-udi1.ttl"))); + } + @Test + public void test_device_example_software() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("device-example-software.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "device-example-software.ttl"))); + } + @Test + public void test_device_example_pacemaker() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("device-example-pacemaker.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "device-example-pacemaker.ttl"))); + } + @Test + public void test_device_example_ihe_pcd() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("device-example-ihe-pcd.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "device-example-ihe-pcd.ttl"))); + } + @Test + public void test_device_example_f001_feedingtube() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("device-example-f001-feedingtube.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "device-example-f001-feedingtube.ttl"))); + } + @Test + public void test_detectedissue_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("detectedissue-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "detectedissue-example.ttl"))); + } + @Test + public void test_detectedissue_example_lab() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("detectedissue-example-lab.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "detectedissue-example-lab.ttl"))); + } + @Test + public void test_detectedissue_example_dup() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("detectedissue-example-dup.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "detectedissue-example-dup.ttl"))); + } + @Test + public void test_detectedissue_example_allergy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("detectedissue-example-allergy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "detectedissue-example-allergy.ttl"))); + } + @Test + public void test_coverage_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("coverage-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "coverage-example.ttl"))); + } + @Test + public void test_coverage_example_2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("coverage-example-2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "coverage-example-2.ttl"))); + } + @Test + public void test_contract_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("contract-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "contract-example.ttl"))); + } + @Test + public void test_condition_example2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example2.ttl"))); + } + @Test + public void test_condition_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example.ttl"))); + } + @Test + public void test_condition_example_stroke() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-stroke.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-stroke.ttl"))); + } + @Test + public void test_condition_example_f205_infection() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f205-infection.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f205-infection.ttl"))); + } + @Test + public void test_condition_example_f204_renal() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f204-renal.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f204-renal.ttl"))); + } + @Test + public void test_condition_example_f203_sepsis() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f203-sepsis.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f203-sepsis.ttl"))); + } + @Test + public void test_condition_example_f202_malignancy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f202-malignancy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f202-malignancy.ttl"))); + } + @Test + public void test_condition_example_f201_fever() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f201-fever.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f201-fever.ttl"))); + } + @Test + public void test_condition_example_f003_abscess() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f003-abscess.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f003-abscess.ttl"))); + } + @Test + public void test_condition_example_f002_lung() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f002-lung.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f002-lung.ttl"))); + } + @Test + public void test_condition_example_f001_heart() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("condition-example-f001-heart.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "condition-example-f001-heart.ttl"))); + } + @Test + public void test_conceptmap_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("conceptmap-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "conceptmap-example.ttl"))); + } + @Test + public void test_conceptmap_example_specimen_type() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("conceptmap-example-specimen-type.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "conceptmap-example-specimen-type.ttl"))); + } + @Test + public void test_conceptmap_103() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("conceptmap-103.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "conceptmap-103.ttl"))); + } + @Test + public void test_composition_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("composition-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "composition-example.ttl"))); + } + @Test + public void test_communicationrequest_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("communicationrequest-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "communicationrequest-example.ttl"))); + } + @Test + public void test_communication_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("communication-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "communication-example.ttl"))); + } + @Test + public void test_codesystem_nhin_purposeofuse() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("codesystem-nhin-purposeofuse.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "codesystem-nhin-purposeofuse.ttl"))); + } + @Test + public void test_codesystem_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("codesystem-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "codesystem-example.ttl"))); + } + @Test + public void test_clinicalimpression_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("clinicalimpression-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "clinicalimpression-example.ttl"))); + } + @Test + public void test_claimresponse_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claimresponse-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claimresponse-example.ttl"))); + } + @Test + public void test_claim_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example.ttl"))); + } + @Test + public void test_claim_example_vision() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-vision.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-vision.ttl"))); + } + @Test + public void test_claim_example_vision_glasses() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-vision-glasses.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-vision-glasses.ttl"))); + } + @Test + public void test_claim_example_professional() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-professional.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-professional.ttl"))); + } + @Test + public void test_claim_example_pharmacy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-pharmacy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-pharmacy.ttl"))); + } + @Test + public void test_claim_example_oral_orthoplan() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-oral-orthoplan.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-oral-orthoplan.ttl"))); + } + @Test + public void test_claim_example_oral_identifier() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-oral-identifier.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-oral-identifier.ttl"))); + } + @Test + public void test_claim_example_oral_contained() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-oral-contained.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-oral-contained.ttl"))); + } + @Test + public void test_claim_example_oral_contained_identifier() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-oral-contained-identifier.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-oral-contained-identifier.ttl"))); + } + @Test + public void test_claim_example_oral_average() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-oral-average.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-oral-average.ttl"))); + } + @Test + public void test_claim_example_institutional() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("claim-example-institutional.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "claim-example-institutional.ttl"))); + } + @Test + public void test_careteam_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careteam-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careteam-example.ttl"))); + } + @Test + public void test_careplan_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example.ttl"))); + } + @Test + public void test_careplan_example_pregnancy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-pregnancy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-pregnancy.ttl"))); + } + @Test + public void test_careplan_example_integrated() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-integrated.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-integrated.ttl"))); + } + @Test + public void test_careplan_example_GPVisit() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-GPVisit.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-GPVisit.ttl"))); + } + @Test + public void test_careplan_example_f203_sepsis() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-f203-sepsis.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-f203-sepsis.ttl"))); + } + @Test + public void test_careplan_example_f202_malignancy() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-f202-malignancy.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-f202-malignancy.ttl"))); + } + @Test + public void test_careplan_example_f201_renal() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-f201-renal.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-f201-renal.ttl"))); + } + @Test + public void test_careplan_example_f003_pharynx() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-f003-pharynx.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-f003-pharynx.ttl"))); + } + @Test + public void test_careplan_example_f002_lung() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-f002-lung.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-f002-lung.ttl"))); + } + @Test + public void test_careplan_example_f001_heart() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("careplan-example-f001-heart.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "careplan-example-f001-heart.ttl"))); + } + @Test + public void test_bundle_transaction() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("bundle-transaction.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "bundle-transaction.ttl"))); + } + @Test + public void test_bundle_response() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("bundle-response.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "bundle-response.ttl"))); + } + @Test + public void test_bundle_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("bundle-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "bundle-example.ttl"))); + } + @Test + public void test_binary_f006() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("binary-f006.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "binary-f006.ttl"))); + } + @Test + public void test_binary_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("binary-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "binary-example.ttl"))); + } + @Test + public void test_basic_example2() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("basic-example2.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "basic-example2.ttl"))); + } + @Test + public void test_basic_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("basic-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "basic-example.ttl"))); + } + @Test + public void test_basic_example_narrative() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("basic-example-narrative.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "basic-example-narrative.ttl"))); + } + @Test + public void test_auditevent_example() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("auditevent-example.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "auditevent-example.ttl"))); + } + @Test + public void test_auditevent_example_disclosure() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("auditevent-example-disclosure.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "auditevent-example-disclosure.ttl"))); + } + @Test + public void test_audit_event_example_vread() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("audit-event-example-vread.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "audit-event-example-vread.ttl"))); + } + @Test + public void test_audit_event_example_search() throws FileNotFoundException, IOException, Exception { + if (!TestingUtilities.silent) + System.out.println("audit-event-example-search.ttl"); + new Turtle().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "publish", "audit-event-example-search.ttl"))); + } + + +} diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 43c632d2db0..7f360bd8875 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml diff --git a/hapi-fhir-utilities/pom.xml b/hapi-fhir-utilities/pom.xml index 5baab16be50..d065b0bb7ae 100644 --- a/hapi-fhir-utilities/pom.xml +++ b/hapi-fhir-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/BaseUnit.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/BaseUnit.java new file mode 100644 index 00000000000..300023a5ea1 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/BaseUnit.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class BaseUnit extends Unit { + + + /** + * abbrevation for property + */ + private char dim; + + /** + * @param code + * @param codeUC + */ + public BaseUnit(String code, String codeUC) { + super(ConceptKind.BASEUNIT, code, codeUC); + } + + /** + * @return the dim + */ + public char getDim() { + return dim; + } + + /** + * @param dim the dim to set + */ + public void setDim(char dim) { + this.dim = dim; + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Canonical.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Canonical.java new file mode 100644 index 00000000000..b4c7f51013f --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Canonical.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import java.util.ArrayList; +import java.util.List; + +public class Canonical { + + public static class CanonicalUnit { + private BaseUnit base; + private int exponent; + protected CanonicalUnit(BaseUnit base, int exponent) { + super(); + this.base = base; + this.exponent = exponent; + } + public BaseUnit getBase() { + return base; + } + public int getExponent() { + return exponent; + } + public void setExponent(int exponent) { + this.exponent = exponent; + } + + + } + + private Decimal value; + private List units = new ArrayList(); + + /** + * @param value + * @param unit + */ + public Canonical(Decimal value) { + super(); + this.value = value; + } + + /** + * @return the value + */ + public Decimal getValue() { + return value; + } + + /** + * @return the unit + */ + public List getUnits() { + return units; + } + + /** + * @param value the value to set + */ + public void setValue(Decimal value) { + this.value = value; + } + + public void multiplyValue(Decimal multiplicand) { + value = value.multiply(multiplicand); + } + + public void multiplyValue(int multiplicand) { + value = value.multiply(new Decimal(multiplicand)); + } + + + public void divideValue(Decimal divisor) throws UcumException { + value = value.divide(divisor); + } + + public void divideValue(int divisor) throws UcumException { + value = value.divide(new Decimal(divisor)); + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Component.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Component.java new file mode 100644 index 00000000000..5eb827d9084 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Component.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public abstract class Component { + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Concept.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Concept.java new file mode 100644 index 00000000000..fb2acd451c7 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Concept.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import java.util.ArrayList; +import java.util.List; + +public class Concept { + + private ConceptKind kind; + /** + * case sensitive code for this concept + */ + private String code; + + /** + * case insensitive code for this concept + */ + private String codeUC; + + /** + * print symbol for this code + */ + private String printSymbol; + + /** + * names for the concept + */ + private List names = new ArrayList(); + + + /** + * @param code + * @param codeUC + */ + public Concept(ConceptKind kind, String code, String codeUC) { + super(); + this.kind = kind; + this.code = code; + this.codeUC = codeUC; + } + + /** + * @return the code + */ + public String getCode() { + return code; + } + + /** + * @param code the code to set + */ + public void setCode(String code) { + this.code = code; + } + + /** + * @return the codeUC + */ + public String getCodeUC() { + return codeUC; + } + + /** + * @param codeUC the codeUC to set + */ + public void setCodeUC(String codeUC) { + this.codeUC = codeUC; + } + + /** + * @return the printSymbol + */ + public String getPrintSymbol() { + return printSymbol; + } + + /** + * @param printSymbol the printSymbol to set + */ + public void setPrintSymbol(String printSymbol) { + this.printSymbol = printSymbol; + } + + /** + * @return the name + */ + public List getNames() { + return names; + } + + /** + * @return the kind + */ + public ConceptKind getKind() { + return kind; + } + + public String getDescription() { + return kind.toString().toLowerCase()+" "+code+" ('"+names.get(0)+"')"; + } + + @Override + public String toString() { + return this.getCode() + " = " + getDescription(); + } +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ConceptKind.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ConceptKind.java new file mode 100644 index 00000000000..d9995835ea4 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ConceptKind.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public enum ConceptKind { + + PREFIX, + BASEUNIT, + UNIT; +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Converter.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Converter.java new file mode 100644 index 00000000000..e651a35c5cf --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Converter.java @@ -0,0 +1,164 @@ +package org.fhir.ucum; + +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +import java.util.Collections; +import java.util.Comparator; + +import org.fhir.ucum.Canonical.CanonicalUnit; +import org.fhir.ucum.special.Registry; + +public class Converter { + + private UcumModel model; + private Registry handlers; + + /** + * @param model + */ + public Converter(UcumModel model, Registry handlers) { + super(); + this.model = model; + this.handlers = handlers; + } + + + public Canonical convert(Term term) throws UcumException { + return normalise(" ", term); + } + + private Canonical normalise(String indent, Term term) throws UcumException { + Canonical result = new Canonical(new Decimal(1)); + + debug(indent, "canonicalise", term); + boolean div = false; + Term t = term; + while (t != null) { + if (t.getComp() instanceof Term) { + Canonical temp = normalise(indent+" ", (Term) t.getComp()); + if (div) { + result.divideValue(temp.getValue()); + for (CanonicalUnit c : temp.getUnits()) + c.setExponent(0-c.getExponent()); + } else { + result.multiplyValue(temp.getValue()); + } + result.getUnits().addAll(temp.getUnits()); + } else if (t.getComp() instanceof Factor) { + if (div) + result.divideValue(((Factor) t.getComp()).getValue()); + else + result.multiplyValue(((Factor) t.getComp()).getValue()); + } else if (t.getComp() instanceof Symbol) { + Symbol o = (Symbol) t.getComp(); + Canonical temp = normalise(indent, o); + if (div) { + result.divideValue(temp.getValue()); + for (CanonicalUnit c : temp.getUnits()) + c.setExponent(0-c.getExponent()); + } else { + result.multiplyValue(temp.getValue()); + } + result.getUnits().addAll(temp.getUnits()); + } + div = t.getOp() == Operator.DIVISION; + t = t.getTerm(); + } + + debug(indent, "collate", result); + + for (int i = result.getUnits().size()-1; i >= 0; i--) { + CanonicalUnit sf = result.getUnits().get(i); + for (int j = i-1; j >=0; j--) { + CanonicalUnit st = result.getUnits().get(j); + if (st.getBase() == sf.getBase()) { + st.setExponent(sf.getExponent()+st.getExponent()); + result.getUnits().remove(i); + break; + } + } + } + for (int i = result.getUnits().size()-1; i >= 0; i--) { + CanonicalUnit sf = result.getUnits().get(i); + if (sf.getExponent() == 0) + result.getUnits().remove(i); + } + + debug(indent, "sort", result); + Collections.sort(result.getUnits(), new Comparator(){ + @Override + public int compare(final CanonicalUnit lhs, CanonicalUnit rhs) { + return lhs.getBase().getCode().compareTo(rhs.getBase().getCode()); + } + }); + debug(indent, "done", result); + return result; + } + + private Canonical normalise(String indent, Symbol sym) throws UcumException { + Canonical result = new Canonical(new Decimal(1)); + + if (sym.getUnit() instanceof BaseUnit) { + result.getUnits().add(new CanonicalUnit((BaseUnit) sym.getUnit(), sym.getExponent())); + } else { + Canonical can = expandDefinedUnit(indent, (DefinedUnit) sym.getUnit()); + for (CanonicalUnit c : can.getUnits()) { + c.setExponent(c.getExponent() * sym.getExponent()); + } + result.getUnits().addAll(can.getUnits()); + if (sym.getExponent() > 0) + for (int i = 0; i < sym.getExponent(); i++) + result.multiplyValue(can.getValue()); + else + for (int i = 0; i > sym.getExponent(); i--) + result.divideValue(can.getValue()); + } + if (sym.getPrefix() != null) { + if (sym.getExponent() > 0) + for (int i = 0; i < sym.getExponent(); i++) + result.multiplyValue(sym.getPrefix().getValue()); + else + for (int i = 0; i > sym.getExponent(); i--) + result.divideValue(sym.getPrefix().getValue()); + } + return result; + } + + private Canonical expandDefinedUnit(String indent, DefinedUnit unit) throws UcumException { + String u = unit.getValue().getUnit(); + if (unit.isSpecial()) { + if (!handlers.exists(unit.getCode())) + throw new UcumException("Not handled yet (special unit)"); + else + u = handlers.get(unit.getCode()).getUnits(); + } + + Term t = new ExpressionParser(model).parse(u); + debug(indent, "now handle", t); + Canonical result = normalise(indent+" ", t); + result.multiplyValue(unit.getValue().getValue()); + return result; + } + + + private void debug(String indent, String state, Term unit) { +// System.out.println(indent+state+": "+new ExpressionComposer().compose(unit)); + } + + + private void debug(String indent, String state, Canonical can) { +// System.out.println(indent+state+": "+new ExpressionComposer().compose(can)); + } + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Decimal.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Decimal.java new file mode 100644 index 00000000000..ced804d0990 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Decimal.java @@ -0,0 +1,785 @@ +package org.fhir.ucum; + +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing & Health Intersections P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation (pascal) + * Health Intersections P/L - port to Java + *******************************************************************************/ + +/** + Precision aware Decimal implementation. Any size number with any number of significant digits is supported. + + Note that operations are precision aware operations. Note that whole numbers are assumed to have + unlimited precision. For example: + 2 x 2 = 4 + 2.0 x 2.0 = 4.0 + 2.00 x 2.0 = 4.0 + and + 10 / 3 = 3.33333333333333333333333333333333333333333333333 + 10.0 / 3 = 3.33 + 10.00 / 3 = 3.333 + 10.00 / 3.0 = 3.3 + 10 / 3.0 = 3.3 + + Addition + 2 + 0.001 = 2.001 + 2.0 + 0.001 = 2.0 + + Note that the string representation is precision limited, but the internal representation + is not. + + + * This class is defined to work around the limitations of Java Big Decimal + * + * @author Grahame + * + */ +public class Decimal { + + private int precision; + private boolean scientific; + private boolean negative; + private String digits; + private int decimal; + + private Decimal() { + super(); + } + + public Decimal(String value) throws UcumException { + super(); + value = value.toLowerCase(); + if (value.contains("e")) + setValueScientific(value); + else + setValueDecimal(value); + } + + /** + * There are a few circumstances where a simple value is known to be correct to a high + * precision. For instance, the unit prefix milli is not ~0.001, it is precisely 0.001 + * to whatever precision you want to specify. This constructor allows you to specify + * an alternative precision than the one implied by the stated string + * + * @param value - a string representation of the value + * @param precision - a + * @throws UcumException + * @ + */ + public Decimal(String value, int precision) throws UcumException { + super(); + value = value.toLowerCase(); + if (value.contains("e")) + setValueScientific(value); + else + setValueDecimal(value); + this.precision = precision; + } + + public Decimal(int i) { + super(); + try { + setValueDecimal(Integer.toString(i)); + } catch (Exception e) { + } + } + + private void setValueDecimal(String value) throws UcumException { + // var + // dec : integer; + // i : integer; + scientific = false; + int dec = -1; + negative = value.startsWith("-"); + if (negative) + value = value.substring(1); + + while (value.startsWith("0") && value.length() > 1) + value = value.substring(1); + + for (int i = 0; i < value.length(); i++) { + if (value.charAt(i) == '.' && dec == -1) + dec = i; + else if (!Character.isDigit(value.charAt(i))) + throw new UcumException("'"+value+"' is not a valid decimal"); + } + + if (dec == -1) { + precision = value.length(); + decimal = value.length(); + digits = value; + } else if (dec == value.length() -1) + throw new UcumException("'"+value+"' is not a valid decimal"); + else { + decimal = dec; + if (allZeros(value, 1)) + precision = value.length() - 1; + else + precision = countSignificants(value); + digits = delete(value, decimal, 1); + if (allZeros(digits, 0)) + precision++; + else + while (digits.charAt(0) == '0') { + digits = digits.substring(1); + decimal--; + } + } + } + + private boolean allZeros(String s, int start) { + boolean result = true; + for (int i = start; i < s.length(); i++) { + if (s.charAt(i) != '0') + result = false; + } + return result; + } + + private int countSignificants(String value) { + int i = value.indexOf("."); + if (i > -1) + value = delete(value, i, 1); + while (value.charAt(0) == '0') + value = value.substring(1); + return value.length(); + } + + private String delete(String value, int offset, int length) { + if (offset == 0) + return value.substring(length); + else + return value.substring(0, offset)+value.substring(offset+length); + } + + private void setValueScientific(String value) throws UcumException { + int i = value.indexOf("e"); + String s = value.substring(0, i); + String e = value.substring(i+1); + + if (Utilities.noString(s) || s.equals("-") || !Utilities.isDecimal(s)) + throw new UcumException("'"+value+"' is not a valid decimal (numeric)"); + if (Utilities.noString(e) || e.equals("-") || !Utilities.isInteger(e)) + throw new UcumException("'"+value+"' is not a valid decimal (exponent)"); + + setValueDecimal(s); + scientific = true; + + // now adjust for exponent + + if (e.charAt(0) == '-') + i = 1; + else + i = 0; + while (i < e.length()) { + if (!Character.isDigit(e.charAt(i))) + throw new UcumException(""+value+"' is not a valid decimal"); + i++; + } + i = Integer.parseInt(e); + decimal = decimal + i; + } + + private String stringMultiply(char c, int i) { + return Utilities.padLeft("", c, i); + } + + private String insert(String ins, String value, int offset) { + if (offset == 0) + return ins+value; + else + return value.substring(0, offset)+ins+value.substring(offset); + } + + @Override + public String toString() { + return asDecimal(); + } + + public Decimal copy() { + Decimal result = new Decimal(); + result.precision = precision; + result.scientific = scientific; + result.negative = negative; + result.digits = digits; + result.decimal = decimal; + return result; + } + + public static Decimal zero() { + try { + return new Decimal("0"); + } catch (Exception e) { + return null; // won't happen + } + } + + public boolean isZero() { + return allZeros(digits, 0); + } + + public static Decimal one() { + try { + return new Decimal("1"); + } catch (Exception e) { + return null; // won't happen + } + } + + public boolean isOne() { + Decimal one = one(); + return comparesTo(one) == 0; + } + + public boolean equals(Decimal other) { + return comparesTo(other) == 0; + } + + public int comparesTo(Decimal other) { + // s1, s2 : AnsiString; + if (other == null) + return 0; + + if (this.negative && !other.negative) + return -1; + else if (!this.negative && other.negative) + return 1; + else { + int max = Math.max(this.decimal, other.decimal); + String s1 = stringMultiply('0', max - this.decimal+1) + this.digits; + String s2 = stringMultiply('0', max - other.decimal+1) + other.digits; + if (s1.length() < s2.length()) + s1 = s1 + stringMultiply('0', s2.length() - s1.length()); + else if (s2.length() < s1.length()) + s2 = s2 + stringMultiply('0', s1.length() - s2.length()); + int result = s1.compareTo(s2); + if (this.negative) + result = -result; + return result; + } + } + + public boolean isWholeNumber() { + return !asDecimal().contains("."); + } + + public String asDecimal() { + String result = digits; + if (decimal != digits.length()) + if (decimal < 0) + result = "0."+stringMultiply('0', 0-decimal)+digits; + else if (decimal < result.length()) + if (decimal == 0) + result = "0."+result; + else + result = insert(".", result, decimal); + else + result = result + stringMultiply('0', decimal - result.length()); + if (negative && !allZeros(result, 0)) + result = "-" + result; + return result; + } + + public int asInteger() throws UcumException { + if (!isWholeNumber()) + throw new UcumException("Unable to represent "+toString()+" as an integer"); + if (comparesTo(new Decimal(Integer.MIN_VALUE)) < 0) + throw new UcumException("Unable to represent "+toString()+" as a signed 8 byte integer"); + if (comparesTo(new Decimal(Integer.MAX_VALUE)) > 0) + throw new UcumException("Unable to represent "+toString()+" as a signed 8 byte integer"); + return Integer.parseInt(asDecimal()); + } + + public String asScientific() { + String result = digits; + boolean zero = allZeros(result, 0); + if (zero) { + if (precision < 2) + result = "0e0"; + else + result = "0."+stringMultiply('0', precision-1)+"e0"; + } else { + if (digits.length() > 1) + result = insert(".", result, 1); + result = result + 'e'+Integer.toString(decimal - 1); + } + if (negative && !zero) + result = '-' + result; + return result; + } + + public Decimal trunc() { + if (decimal < 0) + return zero(); + + Decimal result = copy(); + if (result.digits.length() >= result.decimal) + result.digits = result.digits.substring(0, result.decimal); + if (Utilities.noString(result.digits)) { + result.digits = "0"; + result.decimal = 1; + result.negative = false; + } + return result; + } + + + public Decimal add(Decimal other) { + if (other == null) + return null; + + if (negative == other.negative) { + Decimal result = doAdd(other); + result.negative = negative; + return result; + } else if (negative) + return other.doSubtract(this); + else + return doSubtract(other); + } + + public Decimal subtract(Decimal other) { + if (other == null) + return null; + + Decimal result; + if (negative && !other.negative) { + result = doAdd(other); + result.negative = true; + } else if (!negative && other.negative) { + result = doAdd(other); + } else if (negative && other.negative) { + result = doSubtract(other); + result.negative = !result.negative; + } else { + result = other.doSubtract(this); + result.negative = !result.negative; + } + return result; + } + + + private Decimal doAdd(Decimal other) { + int max = Math.max(decimal, other.decimal); + String s1 = stringMultiply('0', max - decimal+1) + digits; + String s2 = stringMultiply('0', max - other.decimal+1) + other.digits; + if (s1.length() < s2.length()) + s1 = s1 + stringMultiply('0', s2.length() - s1.length()); + else if (s2.length() < s1.length()) + s2 = s2 + stringMultiply('0', s1.length() - s2.length()); + + String s3 = stringAddition(s1, s2); + + if (s3.charAt(0) == '1') + max++; + else + s3 = delete(s3, 0, 1); + + if (max != s3.length()) { + if (max < 0) + throw new Error("Unhandled"); + else if (max < s3.length()) + s3 = insert(".", s3, max); + else + throw new Error("Unhandled"); + } + + Decimal result = new Decimal(); + try { + result.setValueDecimal(s3); + } catch (Exception e) { + // won't happen + } + result.scientific = scientific || other.scientific; + // todo: the problem with this is you have to figure out the absolute precision and take the lower of the two, not the relative one + if (decimal < other.decimal) + result.precision = precision; + else if (other.decimal < decimal) + result.precision = other.precision; + else + result.precision = Math.min(precision, other.precision); + return result; + } + + private int dig(char c) { + return (c) - ('0'); + } + + private char cdig(int i) { + return (char) (i + ('0')); + } + + private Decimal doSubtract(Decimal other) { + int max = Math.max(decimal, other.decimal); + String s1 = stringMultiply('0', max - decimal+1) + digits; + String s2 = stringMultiply('0', max - other.decimal+1) + other.digits; + if (s1.length() < s2.length()) + s1 = s1 + stringMultiply('0', s2.length() - s1.length()); + else if (s2.length() < s1.length()) + s2 = s2 + stringMultiply('0', s1.length() - s2.length()); + + String s3; + boolean neg = (s1.compareTo(s2) < 0); + if (neg) { + s3 = s2; + s2 = s1; + s1 = s3; + } + + s3 = stringSubtraction(s1, s2); + + if (s3.charAt(0) == '1') + max++; + else + s3 = delete(s3, 0, 1); + if (max != s3.length()) { + if (max < 0) + throw new Error("Unhandled"); + else if (max < s3.length()) + s3 = insert(".", s3, max); + else + throw new Error("Unhandled"); + } + + Decimal result = new Decimal(); + try { + result.setValueDecimal(s3); + } catch (Exception e) { + // won't happen + } + result.negative = neg; + result.scientific = scientific || other.scientific; + if (decimal < other.decimal) + result.precision = precision; + else if (other.decimal < decimal) + result.precision = other.precision; + else + result.precision = Math.min(precision, other.precision); + return result; + } + + private String stringAddition(String s1, String s2) { + assert(s1.length() == s2.length()); + char[] result = new char[s2.length()]; + for (int i = 0; i < s2.length(); i++) + result[i] = '0'; + int c = 0; + for (int i = s1.length() - 1; i >= 0; i--) { + int t = c + dig(s1.charAt(i)) + dig(s2.charAt(i)); + result[i] = cdig(t % 10); + c = t / 10; + } + assert(c == 0); + return new String(result); + } + + private String stringSubtraction(String s1, String s2) { +// i, t, c : integer; + assert(s1.length() == s2.length()); + + char[] result = new char[s2.length()]; + for (int i = 0; i < s2.length(); i++) + result[i] = '0'; + + int c = 0; + for (int i = s1.length() - 1; i >= 0; i--) { + int t = c + (dig(s1.charAt(i)) - dig(s2.charAt(i))); + if (t < 0) { + t = t + 10; + if (i == 0) + throw new Error("internal logic error"); + else + s1 = replaceChar(s1, i-1, cdig(dig(s1.charAt(i-1))-1)); + } + result[i] = cdig(t); + } + assert(c == 0); + return new String(result); + } + + private String replaceChar(String s, int offset, char c) { + if (offset == 0) + return String.valueOf(c)+s.substring(1); + else + return s.substring(0, offset)+c+s.substring(offset+1); + } + + + public Decimal multiply(Decimal other) { + if (other == null) + return null; + + if (isZero() || other.isZero()) + return zero(); + + int max = Math.max(decimal, other.decimal); + String s1 = stringMultiply('0', max - decimal+1) + digits; + String s2 = stringMultiply('0', max - other.decimal+1) + other.digits; + if (s1.length() < s2.length()) + s1 = s1 + stringMultiply('0', s2.length() - s1.length()); + else if (s2.length() < s1.length()) + s2 = s2 + stringMultiply('0', s1.length() - s2.length()); + + if (s2.compareTo(s1) > 0) { + String s3 = s1; + s1 = s2; + s2 = s3; + } + String[] s = new String[s2.length()]; + + int t = 0; + for (int i = s2.length()-1; i >= 0; i--) { + s[i] = stringMultiply('0', s2.length()-(i+1)); + int c = 0; + for (int j = s1.length() - 1; j >= 0; j--) { + t = c + (dig(s1.charAt(j)) * dig(s2.charAt(i))); + s[i] = insert(String.valueOf(cdig(t % 10)), s[i], 0); + c = t / 10; + } + while (c > 0) { + s[i] = insert(String.valueOf(cdig(t % 10)), s[i], 0); + c = t / 10; + } + } + + t = 0; + for (String sv : s) + t = Math.max(t, sv.length()); + for (int i = 0; i < s.length; i++) + s[i] = stringMultiply('0', t-s[i].length())+s[i]; + + String res = ""; + int c = 0; + for (int i = t - 1; i>= 0; i--) { + for (int j = 0; j < s.length; j++) + c = c + dig(s[j].charAt(i)); + res = insert(String.valueOf(cdig(c %10)), res, 0); + c = c / 10; + } + + if (c > 0) { + throw new Error("internal logic error"); + // while.. + // s[i-1] = s[i-1] + cdig(t mod 10); + // c = t div 10; + } + + int dec = res.length() - ((s1.length() - (max+1))*2); + + while (!Utilities.noString(res) && !res.equals("0") && res.startsWith("0")) { + res = res.substring(1); + dec--; + } + + int prec = 0; + if (isWholeNumber() && other.isWholeNumber()) + // at least the specified precision, and possibly more + prec = Math.max(Math.max(digits.length(), other.digits.length()), Math.min(precision, other.precision)); + else if (isWholeNumber()) + prec = other.precision; + else if (other.isWholeNumber()) + prec = precision; + else + prec = Math.min(precision, other.precision); + while (res.length() > prec && res.charAt(res.length()-1) == '0') + res = delete(res, res.length()-1, 1); + + Decimal result = new Decimal(); + try { + result.setValueDecimal(res); + } catch (Exception e) { + // won't happen + } + result.precision = prec; + result.decimal = dec; + result.negative = negative != other.negative; + result.scientific = scientific || other.scientific; + return result; + } + + public Decimal divide(Decimal other) throws UcumException { + if (other == null) + return null; + + if (isZero()) + return zero(); + + if (other.isZero()) + throw new UcumException("Attempt to divide "+toString()+" by zero"); + + String s = "0"+other.digits; + int m = Math.max(digits.length(), other.digits.length()) + 40; // max loops we'll do + String[] tens = new String[10]; + tens[0] = stringAddition(stringMultiply('0', s.length()), s); + for (int i = 1; i < 10; i++) + tens[i] = stringAddition(tens[i-1], s); + String v = digits; + String r = ""; + int l = 0; + int d = (digits.length() - decimal + 1) - (other.digits.length() - other.decimal + 1); + + while (v.length() < tens[0].length()) { + v = v + "0"; + d++; + } + + String w; + int vi; + if (v.substring(0, other.digits.length()).compareTo(other.digits) < 0) { + if (v.length() == tens[0].length()) { + v = v + '0'; + d++; + } + w = v.substring(0, other.digits.length()+1); + vi = w.length(); + } else { + w = "0"+v.substring(0, other.digits.length()); + vi = w.length()-1; + } + + boolean handled = false; + boolean proc; + + while (!(handled && ((l > m) || ((vi >= v.length()) && ((Utilities.noString(w) || allZeros(w, 0))))))) { + l++; + handled = true; + proc = false; + for (int i = 8; i >= 0; i--) { + if (tens[i].compareTo(w) <= 0) { + proc = true; + r = r + cdig(i+1); + w = trimLeadingZeros(stringSubtraction(w, tens[i])); + if (!(handled && ((l > m) || ((vi >= v.length()) && ((Utilities.noString(w) || allZeros(w, 0))))))) { + if (vi < v.length()) { + w = w + v.charAt(vi); + vi++; + handled = false; + } else { + w = w + '0'; + d++; + } + while (w.length() < tens[0].length()) + w = '0'+w; + } + break; + } + } + if (!proc) { + assert(w.charAt(0) == '0'); + w = delete(w, 0, 1); + r = r + "0"; + if (!(handled && ((l > m) || ((vi >= v.length()) && ((Utilities.noString(w) || allZeros(w, 0))))))) { + if (vi < v.length()) { + w = w + v.charAt(vi); + vi++; + handled = false; + } else { + w = w + '0'; + d++; + } + while (w.length() < tens[0].length()) + w = '0'+w; + } + } + } + + int prec; + + if (isWholeNumber() && other.isWholeNumber() && (l < m)) { + for (int i = 0; i < d; i++) { + if (r.charAt(r.length()-1) == '0') { + r = delete(r, r.length()-1, 1); + d--; + } + } + prec = 100; + } else { + if (isWholeNumber() && other.isWholeNumber()) + prec = Math.max(digits.length(), other.digits.length()); + else if (isWholeNumber()) + prec = Math.max(other.precision, r.length() - d); + else if (other.isWholeNumber()) + prec = Math.max(precision, r.length() - d); + else + prec = Math.max(Math.min(precision, other.precision), r.length() - d); + while (r.length() > prec) { + boolean up = (r.charAt(r.length()-1) > '5'); + r = delete(r, r.length()-1, 1); + if (up) { + char[] rs = r.toCharArray(); + int i = r.length()-1; + while (up && i > 0) { + up = rs[i] == '9'; + if (up) + rs[i] = '0'; + else + rs[i] = cdig(dig(rs[i])+1); + i--; + } + if (up) { + r = '1'+new String(rs); + d++; + } else + r = new String(rs); + } + d--; + } + } + + Decimal result = new Decimal(); + result.setValueDecimal(r); + result.decimal = r.length() - d; + result.negative = negative != other.negative; + result.precision = prec; + result.scientific = scientific || other.scientific; + return result; + } + + + private String trimLeadingZeros(String s) { + if (s == null) + return null; + + int i = 0; + while (i < s.length() && s.charAt(i) == '0') + i++; + if (i == s.length()) + return "0"; + else + return s.substring(i); + } + + public Decimal divInt(Decimal other) throws UcumException { + if (other == null) + return null; + Decimal t = divide(other); + return t.trunc(); + } + + public Decimal modulo(Decimal other) throws UcumException { + if (other == null) + return null; + Decimal t = divInt(other); + Decimal t2 = t.multiply(other); + return subtract(t2); + } + + public boolean equals(Decimal value, Decimal maxDifference) { + Decimal diff = this.subtract(value).absolute(); + return diff.comparesTo(maxDifference) <= 0; + } + + private Decimal absolute() { + Decimal d = copy(); + d.negative = false; + return d; + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/DefinedUnit.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/DefinedUnit.java new file mode 100644 index 00000000000..ef06cbcf858 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/DefinedUnit.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + + +public class DefinedUnit extends Unit{ + + /** + * whether this is a metric unit or not + */ + private boolean metric; + + /** + * special means? + */ + private boolean isSpecial; + + /** + * The class of this unit + */ + private String class_; + + /** + * Value details + */ + private Value value; + + + + + /** + * @param code + * @param codeUC + */ + public DefinedUnit(String code, String codeUC) { + super(ConceptKind.UNIT, code, codeUC); + } + + + /** + * @return the metric + */ + public boolean isMetric() { + return metric; + } + + + /** + * @param metric the metric to set + */ + public void setMetric(boolean metric) { + this.metric = metric; + } + + + /** + * @return the isSpecial + */ + public boolean isSpecial() { + return isSpecial; + } + + + /** + * @param isSpecial the isSpecial to set + */ + public void setSpecial(boolean isSpecial) { + this.isSpecial = isSpecial; + } + + + /** + * @return the class_ + */ + public String getClass_() { + return class_; + } + + + /** + * @param class_ the class_ to set + */ + public void setClass_(String class_) { + this.class_ = class_; + } + + + /** + * @return the value + */ + public Value getValue() { + return value; + } + + + /** + * @param value the value to set + */ + public void setValue(Value value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.model.BaseUnit#getDescription() + */ + @Override + public String getDescription() { + return super.getDescription()+" = "+value.getDescription(); + } + + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/DefinitionParser.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/DefinitionParser.java new file mode 100644 index 00000000000..ef5360a90e6 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/DefinitionParser.java @@ -0,0 +1,185 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlPullParserFactory; + + +/** + * Parses the file ucum-essense.xml + * + * @author Grahame Grieve + * + */ + +public class DefinitionParser { + + public UcumModel parse(String filename) throws UcumException, XmlPullParserException, IOException, ParseException { + return parse(new FileInputStream(new File(filename))); + } + + public UcumModel parse(InputStream stream) throws XmlPullParserException, IOException, ParseException, UcumException { + XmlPullParserFactory factory = XmlPullParserFactory.newInstance( + System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); + factory.setNamespaceAware(true); + XmlPullParser xpp = factory.newPullParser(); + + xpp.setInput(stream, null); + + int eventType = xpp.next(); + if (eventType != XmlPullParser.START_TAG) + throw new XmlPullParserException("Unable to process XML document"); + if (!xpp.getName().equals("root")) + throw new XmlPullParserException("Unable to process XML document: expected 'root' but found '"+xpp.getName()+"'"); + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss' 'Z"); + Date date = fmt.parse(xpp.getAttributeValue(null, "revision-date").substring(7, 32)); + UcumModel root = new UcumModel(xpp.getAttributeValue(null, "version"), xpp.getAttributeValue(null, "revision"), date); + xpp.next(); + while (xpp.getEventType() != XmlPullParser.END_TAG) { + if (xpp.getEventType() == XmlPullParser.TEXT) { + if (Utilities.isWhitespace(xpp.getText())) + xpp.next(); + else + throw new XmlPullParserException("Unexpected text "+xpp.getText()); + } else if (xpp.getName().equals("prefix")) + root.getPrefixes().add(parsePrefix(xpp)); + else if (xpp.getName().equals("base-unit")) + root.getBaseUnits().add(parseBaseUnit(xpp)); + else if (xpp.getName().equals("unit")) + root.getDefinedUnits().add(parseUnit(xpp)); + else + throw new XmlPullParserException("unknown element name "+xpp.getName()); + } + return root; + } + + private DefinedUnit parseUnit(XmlPullParser xpp) throws XmlPullParserException, IOException, UcumException { + DefinedUnit unit = new DefinedUnit(xpp.getAttributeValue(null, "Code"), xpp.getAttributeValue(null, "CODE")); + unit.setMetric("yes".equals(xpp.getAttributeValue(null, "isMetric"))); + unit.setSpecial("yes".equals(xpp.getAttributeValue(null, "isSpecial"))); + unit.setClass_(xpp.getAttributeValue(null, "class")); + xpp.next(); + skipWhitespace(xpp); + while (xpp.getEventType() == XmlPullParser.START_TAG && "name".equals(xpp.getName())) + unit.getNames().add(readElement(xpp, "name", "unit "+unit.getCode(), false)); + if (xpp.getEventType() == XmlPullParser.START_TAG && "printSymbol".equals(xpp.getName())) + unit.setPrintSymbol(readElement(xpp, "printSymbol", "unit "+unit.getCode(), true)); + unit.setProperty(readElement(xpp, "property", "unit "+unit.getCode(), false)); + unit.setValue(parseValue(xpp, "unit "+unit.getCode())); + xpp.next(); + skipWhitespace(xpp); + return unit; + } + + private Value parseValue(XmlPullParser xpp, String context) throws XmlPullParserException, UcumException, IOException { + checkAtElement(xpp, "value", context); + Decimal val = null; + if (xpp.getAttributeValue(null, "value") != null) + try { + if (xpp.getAttributeValue(null, "value").contains(".")) + val = new Decimal(xpp.getAttributeValue(null, "value"), 24); // unlimited precision for these + else + val = new Decimal(xpp.getAttributeValue(null, "value")); + } catch (NumberFormatException e) { + throw new XmlPullParserException("Error reading "+context+": "+e.getMessage()); + } + Value value = new Value(xpp.getAttributeValue(null, "Unit"), xpp.getAttributeValue(null, "UNIT"), val); + value.setText(readElement(xpp, "value", context, true)); + return value; + } + + private BaseUnit parseBaseUnit(XmlPullParser xpp) throws XmlPullParserException, IOException { + BaseUnit base = new BaseUnit(xpp.getAttributeValue(null, "Code"), xpp.getAttributeValue(null, "CODE")); + base.setDim(xpp.getAttributeValue(null, "dim").charAt(0)); + xpp.next(); + skipWhitespace(xpp); + base.getNames().add(readElement(xpp, "name", "base-unit "+base.getCode(), false)); + base.setPrintSymbol(readElement(xpp, "printSymbol", "base-unit "+base.getCode(), false)); + base.setProperty(readElement(xpp, "property", "base-unit "+base.getCode(), false)); + xpp.next(); + skipWhitespace(xpp); + return base; + } + + private Prefix parsePrefix(XmlPullParser xpp) throws XmlPullParserException, IOException, UcumException { + Prefix prefix = new Prefix(xpp.getAttributeValue(null, "Code"), xpp.getAttributeValue(null, "CODE")); + xpp.next(); + skipWhitespace(xpp); + prefix.getNames().add(readElement(xpp, "name", "prefix "+prefix.getCode(), false)); + prefix.setPrintSymbol(readElement(xpp, "printSymbol", "prefix "+prefix.getCode(), false)); + checkAtElement(xpp, "value", "prefix "+prefix.getCode()); + prefix.setValue(new Decimal(xpp.getAttributeValue(null, "value"), 24)); + readElement(xpp, "value", "prefix "+prefix.getCode(), true); + xpp.next(); + skipWhitespace(xpp); + return prefix; + } + + private String readElement(XmlPullParser xpp, String name, String context, boolean complex) throws XmlPullParserException, IOException { + checkAtElement(xpp, name, context); + xpp.next(); + skipWhitespace(xpp); + String val = null; + if (complex) { + val = readText(xpp); + } else if (xpp.getEventType() == XmlPullParser.TEXT) { + val = xpp.getText(); + xpp.next(); + skipWhitespace(xpp); + } + if (xpp.getEventType() != XmlPullParser.END_TAG) { + throw new XmlPullParserException("Unexpected content reading "+context); + } + xpp.next(); + skipWhitespace(xpp); + return val; + } + + private String readText(XmlPullParser xpp) throws XmlPullParserException, IOException { + StringBuilder bldr = new StringBuilder(); + while (xpp.getEventType() != XmlPullParser.END_TAG) { + if (xpp.getEventType() == XmlPullParser.TEXT) { + bldr.append(xpp.getText()); + xpp.next(); + } else { + xpp.next(); + bldr.append(readText(xpp)); + xpp.next(); + skipWhitespace(xpp); + } + } + return bldr.toString(); + } + + private void skipWhitespace(XmlPullParser xpp) throws XmlPullParserException, IOException { + while (xpp.getEventType() == XmlPullParser.TEXT && Utilities.isWhitespace(xpp.getText())) + xpp.next(); + } + + private void checkAtElement(XmlPullParser xpp, String name, String context) throws XmlPullParserException { + if (xpp.getEventType() != XmlPullParser.START_TAG) + throw new XmlPullParserException("Unexpected state looking for "+name+": at "+Integer.toString(xpp.getEventType())+" reading "+context); + if (!xpp.getName().equals(name)) + throw new XmlPullParserException("Unexpected element looking for "+name+": found "+xpp.getName()+" reading "+context); + } +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Expression.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Expression.java new file mode 100644 index 00000000000..1ec0b6eca04 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Expression.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class Expression { + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ExpressionComposer.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ExpressionComposer.java new file mode 100644 index 00000000000..1fa6a2296ae --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ExpressionComposer.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import org.fhir.ucum.Canonical.CanonicalUnit; + +public class ExpressionComposer { + + + public String compose(Term term) { + if (term == null) + return "1"; + StringBuilder bldr = new StringBuilder(); + composeTerm(bldr, term); + return bldr.toString(); + } + + private void composeTerm(StringBuilder bldr, Term term) { + if (term.getComp() != null) + composeComp(bldr, term.getComp()); + if (term.getOp() != null) + composeOp(bldr, term.getOp()); + if (term.getTerm() != null) { + composeTerm(bldr, term.getTerm()); + } + } + + private void composeComp(StringBuilder bldr, Component comp) { + if (comp instanceof Factor) + composeFactor(bldr, (Factor)comp); + else if (comp instanceof Symbol) + composeSymbol(bldr, (Symbol)comp); + else if (comp instanceof Term) { + bldr.append('('); + composeTerm(bldr, (Term)comp); + bldr.append(')'); + } else + bldr.append('?'); + } + + private void composeSymbol(StringBuilder bldr, Symbol symbol) { + if (symbol.getPrefix() != null) { + bldr.append(symbol.getPrefix().getCode()); + } + bldr.append(symbol.getUnit().getCode()); + if (symbol.getExponent() != 1) { + bldr.append(symbol.getExponent()); + } + } + + private void composeFactor(StringBuilder bldr, Factor comp) { + bldr.append(comp.getValue()); + } + + private void composeOp(StringBuilder bldr, Operator op) { + if (op == Operator.DIVISION) + bldr.append("/"); + else + bldr.append("."); + } + + public String compose(Canonical can) { + return compose(can, true); + } + + public String compose(Canonical can, boolean value) { + StringBuilder b = new StringBuilder(); + if (value) + b.append(can.getValue().asDecimal()); + boolean first = true; + for (CanonicalUnit c : can.getUnits()) { + if (first) first = false; else b.append("."); + b.append(c.getBase().getCode()); + if (c.getExponent() != 1) + b.append(c.getExponent()); + } + return b.toString(); + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ExpressionParser.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ExpressionParser.java new file mode 100644 index 00000000000..2ca28843243 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/ExpressionParser.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class ExpressionParser { + + private UcumModel model; + + /** + * @param model + */ + public ExpressionParser(UcumModel model) { + super(); + this.model = model; + } + + public Term parse(String code) throws UcumException { + Lexer lexer = new Lexer(code); + Term res = parseTerm(lexer, true); + if (!lexer.finished()) + throw new UcumException("Expression was not parsed completely. Syntax Error?"); + return res; + } + + private Term parseTerm(Lexer lexer, boolean first) throws UcumException { + Term res = new Term(); + if (first && lexer.getType() == TokenType.NONE) { + res.setComp(new Factor(1)); + } else if (lexer.getType() == TokenType.SOLIDUS) { + res.setOp(Operator.DIVISION); + lexer.consume(); + res.setTerm(parseTerm(lexer, false)); + } else { + if (lexer.getType() == TokenType.ANNOTATION) { + res.setComp(new Factor(1)); // still lose the annotation + lexer.consume(); + } else + res.setComp(parseComp(lexer)); + if (lexer.getType() != TokenType.NONE && lexer.getType() != TokenType.CLOSE) { + if (lexer.getType() == TokenType.SOLIDUS) { + res.setOp(Operator.DIVISION); + lexer.consume(); + } else if (lexer.getType() == TokenType.PERIOD) { + res.setOp(Operator.MULTIPLICATION); + lexer.consume(); + } else if (lexer.getType() == TokenType.ANNOTATION) + res.setOp(Operator.MULTIPLICATION); // implicit + else + lexer.error("Expected '/' or '.'"); + res.setTerm(parseTerm(lexer, false)); + } + } + return res; + } + + private Component parseComp(Lexer lexer) throws UcumException { + if (lexer.getType() == TokenType.NUMBER) { + Factor fact = new Factor(lexer.getTokenAsInt()); + lexer.consume(); + return fact; + } else if (lexer.getType() == TokenType.SYMBOL) + return parseSymbol(lexer); + else if (lexer.getType() == TokenType.NONE) + lexer.error("unexpected end of expression looking for a symbol or a number"); + else if (lexer.getType() == TokenType.OPEN) { + lexer.consume(); + Term res = parseTerm(lexer, true); + if (lexer.getType() == TokenType.CLOSE) + lexer.consume(); + else + lexer.error("Unexpected Token Type '"+lexer.getType().toString()+"' looking for a close bracket"); + return res; + } else + lexer.error("unexpected token looking for a symbol or a number"); + return null; // we never get to here + } + + private Component parseSymbol(Lexer lexer) throws UcumException { + Symbol symbol = new Symbol(); + String sym = lexer.getToken(); + + // now, can we pick a prefix that leaves behind a metric unit? + Prefix selected = null; + Unit unit = null; + for (Prefix prefix : model.getPrefixes()) { + if (sym.startsWith(prefix.getCode())) { + unit = model.getUnit(sym.substring(prefix.getCode().length())); + if (unit != null && (unit.getKind() == ConceptKind.BASEUNIT || ((DefinedUnit) unit).isMetric())) { + selected = prefix; + break; + }; + } + } + + if (selected != null) { + symbol.setPrefix(selected); + symbol.setUnit(unit); + } else { + unit = model.getUnit(sym); + if (unit != null) + symbol.setUnit(unit); + else if (!sym.equals("1")) + lexer.error("The unit '"+sym+"' is unknown"); + } + + lexer.consume(); + if (lexer.getType() == TokenType.NUMBER) { + symbol.setExponent(lexer.getTokenAsInt()); + lexer.consume(); + } else + symbol.setExponent(1); + + return symbol; + } +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Factor.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Factor.java new file mode 100644 index 00000000000..8b673a2b16b --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Factor.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + + +public class Factor extends Component { + + private int value; + + /** + * + */ + public Factor() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @param value + */ + public Factor(int value) { + super(); + this.value = value; + } + + /** + * @return the value + */ + public int getValue() { + return value; + } + + /** + * @param value the value to set + */ + public void setValue(int value) { + this.value = value; + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/FormalStructureComposer.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/FormalStructureComposer.java new file mode 100644 index 00000000000..ee2fb412158 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/FormalStructureComposer.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class FormalStructureComposer { + + public String compose(Term term) { + StringBuilder bldr = new StringBuilder(); + composeTerm(bldr, term); + return bldr.toString(); + } + + private void composeTerm(StringBuilder bldr, Term term) { + if (term.getComp() != null) + composeComp(bldr, term.getComp()); + if (term.getOp() != null) + composeOp(bldr, term.getOp()); + if (term.getTerm() != null) { +// bldr.append('('); + composeTerm(bldr, term.getTerm()); +// bldr.append('}'); + } + } + + private void composeComp(StringBuilder bldr, Component comp) { + if (comp instanceof Factor) + composeFactor(bldr, (Factor)comp); + else if (comp instanceof Symbol) + composeSymbol(bldr, (Symbol)comp); + else if (comp instanceof Term) + composeTerm(bldr, (Term)comp); + else + bldr.append('?'); + } + + private void composeSymbol(StringBuilder bldr, Symbol symbol) { + bldr.append('('); + if (symbol.getPrefix() != null) { + bldr.append(symbol.getPrefix().getNames().get(0)); + } + bldr.append(symbol.getUnit().getNames().get(0)); + if (symbol.getExponent() != 1) { + bldr.append(" ^ "); + bldr.append(symbol.getExponent()); + } + bldr.append(')'); + } + + private void composeFactor(StringBuilder bldr, Factor comp) { + bldr.append(comp.getValue()); + } + + private void composeOp(StringBuilder bldr, Operator op) { + if (op == Operator.DIVISION) + bldr.append(" / "); + else + bldr.append(" * "); + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Lexer.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Lexer.java new file mode 100644 index 00000000000..fcd0dc9e7d5 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Lexer.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + + +public class Lexer { + + private static final char NO_CHAR = Character.UNASSIGNED; + private String source; + private int index; + + private String token; + private TokenType type; + private int start; + + /** + * @param source + * @throws UcumException + * @ + */ + public Lexer(String source) throws UcumException { + super(); + this.source = source; + if (source == null) + source = ""; + index = 0; + consume(); + } + + public void consume() throws UcumException { + token = null; + type = TokenType.NONE; + start = index; + if (index < source.length()) { + char ch = nextChar(); + if (!(checkSingle(ch, '/', TokenType.SOLIDUS) || + checkSingle(ch, '.', TokenType.PERIOD) || + checkSingle(ch, '(', TokenType.OPEN) || + checkSingle(ch, ')', TokenType.CLOSE) || + checkAnnotation(ch) || + checkNumber(ch) || + checkNumberOrSymbol(ch))) + throw new UcumException("Error processing unit '"+source+"': unexpected character '"+ch+"' at position "+Integer.toString(start)); + } + } + + private boolean checkNumber(char ch) throws UcumException { + if (ch == '+' || ch == '-') { + token = String.valueOf(ch); + ch = peekChar(); + while ((ch >= '0' && ch <= '9')) { + token = token + ch; + index++; + ch = peekChar(); + } + if (token.length() == 1) { + throw new UcumException("Error processing unit'"+source+"': unexpected character '"+ch+"' at position "+Integer.toString(start)+": a + or - must be followed by at least one digit"); + } + type = TokenType.NUMBER; + return true; + } else + return false; + } + + private boolean checkNumberOrSymbol(char ch) throws UcumException { + boolean isSymbol = false; + boolean inBrackets = false; + if (isValidSymbolChar(ch, true, false)) { + token = String.valueOf(ch); + isSymbol = isSymbol || !((ch >= '0' && ch <= '9')); + inBrackets = checkBrackets(ch, inBrackets); + ch = peekChar(); + inBrackets = checkBrackets(ch, inBrackets); + while (isValidSymbolChar(ch, !isSymbol || inBrackets, inBrackets)) { + token = token + ch; + isSymbol = isSymbol || ((ch != NO_CHAR) && !((ch >= '0' && ch <= '9'))); + index++; + ch = peekChar(); + inBrackets = checkBrackets(ch, inBrackets); + } + if (isSymbol) + type = TokenType.SYMBOL; + else + type = TokenType.NUMBER; + return true; + } else + return false; + } + + + private boolean checkBrackets(char ch, boolean inBrackets) throws UcumException { + if (ch == '[') + if (inBrackets) + error("Nested ["); + else + return true; + if (ch == ']') + if (!inBrackets) + error("] without ["); + else + return false; + return inBrackets; + } + + private boolean isValidSymbolChar(char ch, boolean allowDigits, boolean inBrackets) { + return (allowDigits && ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || + ch == '[' || ch == ']' || ch == '%' || ch == '*' || ch == '^' || ch == '\'' || + ch == '"' || ch == '_' || (inBrackets && ch == '.'); + } + + private boolean checkAnnotation(char ch) throws UcumException { + if (ch == '{') { + StringBuilder b = new StringBuilder(); + while (ch != '}') { + ch = nextChar(); + if (!Utilities.isAsciiChar(ch)) + throw new UcumException("Error processing unit'"+source+"': Annotation contains non-ascii characters"); + if (ch == 0) + throw new UcumException("Error processing unit'"+source+"': unterminated annotation"); + b.append(ch); + } + // got to the end of the annotation - need to do it again + token = b.toString(); + type = TokenType.ANNOTATION; + return true; + } else + return false; + } + + private boolean checkSingle(char ch, char test, TokenType type) { + if (ch == test) { + token = String.valueOf(ch); + this.type = type; + return true; + } + return false; + } + + private char nextChar() { + char res = index < source.length() ? source.charAt(index) : NO_CHAR; + index++; + return res; + } + + private char peekChar() { + return index < source.length() ? source.charAt(index) : NO_CHAR; + } + + /** + * @return the token + */ + public String getToken() { + return token; + } + + /** + * @return the type + */ + public TokenType getType() { + return type; + } + + public void error(String errMsg) throws UcumException { + throw new UcumException("Error processing unit '"+source+"': "+ errMsg +"' at position "+Integer.toString(start)); + + } + + public int getTokenAsInt() { + return token.charAt(0) == '+' ? Integer.parseInt(token.substring(1)) : Integer.parseInt(token); + } + + public boolean finished() { + return index == source.length(); + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Operator.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Operator.java new file mode 100644 index 00000000000..289b8da67f0 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Operator.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public enum Operator { + MULTIPLICATION, + DIVISION; +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Pair.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Pair.java new file mode 100644 index 00000000000..a858a44aa61 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Pair.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class Pair { + + private Decimal value; + private String code; + + + /** + * @param value + * @param code + */ + public Pair(Decimal value, String code) { + super(); + this.value = value; + this.code = code; + } + /** + * @return the value + */ + public Decimal getValue() { + return value; + } + /** + * @return the code + */ + public String getCode() { + return code; + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Prefix.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Prefix.java new file mode 100644 index 00000000000..b8a5145cd31 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Prefix.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + + +public class Prefix extends Concept { + + /** + * value for the prefix. + */ + private Decimal value; // 1^-24 through to 1^24 + + /** + * @param code + * @param codeUC + */ + public Prefix(String code, String codeUC) { + super(ConceptKind.PREFIX, code, codeUC); + } + + /** + * @return the index + */ + public Decimal getValue() { + return value; + } + + /** + * @param index the index to set + */ + public void setValue(Decimal index) { + this.value = index; + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.model.Concept#getDescription() + */ + @Override + public String getDescription() { + return super.getDescription()+" = "+value.toString(); + } + + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Search.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Search.java new file mode 100644 index 00000000000..ae046a8d950 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Search.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import java.util.ArrayList; +import java.util.List; + +public class Search { + + public List doSearch(UcumModel model, ConceptKind kind, String text, boolean isRegex) { + List concepts = new ArrayList(); + if (kind == null || kind == ConceptKind.PREFIX) + searchPrefixes(concepts, model.getPrefixes(), text, isRegex); + if (kind == null || kind == ConceptKind.BASEUNIT) + searchUnits(concepts, model.getBaseUnits(), text, isRegex); + if (kind == null || kind == ConceptKind.UNIT) + searchUnits(concepts, model.getDefinedUnits(), text, isRegex); + return concepts; + } + + private void searchUnits(List concepts, List units, String text, boolean isRegex) { + for (Unit unit : units) { + if (matchesUnit(unit, text, isRegex)) + concepts.add(unit); + } + } + + private boolean matchesUnit(Unit unit, String text, boolean isRegex) { + return matches(unit.getProperty(), text, isRegex) || matchesConcept(unit, text, isRegex); + } + + private void searchPrefixes(List concepts, List prefixes, String text, boolean isRegex) { + for (Concept concept : prefixes) { + if (matchesConcept(concept, text, isRegex)) + concepts.add(concept); + } + } + + private boolean matchesConcept(Concept concept, String text, boolean isRegex) { + for (String name : concept.getNames()) { + if (matches(name, text, isRegex)) + return true; + } + if (matches(concept.getCode(), text, isRegex)) + return true; + if (matches(concept.getCodeUC(), text, isRegex)) + return true; + if (matches(concept.getPrintSymbol(), text, isRegex)) + return true; + return false; + } + + private boolean matches(String value, String text, boolean isRegex) { + return (value != null) && ((isRegex && value.matches(text)) || (!isRegex && value.toLowerCase().contains(text.toLowerCase()))); + } + + +} + diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Symbol.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Symbol.java new file mode 100644 index 00000000000..8a518be3c0e --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Symbol.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + + +public class Symbol extends Component { + + private Unit unit; // may be Base Unit or DefinedUnit + private Prefix prefix; // only if unit is metric + private int exponent; + + + /** + * + */ + public Symbol() { + super(); + } + + + /** + * @param unit + * @param prefix + * @param exponent + */ + public Symbol(Unit unit, Prefix prefix, int exponent) { + super(); + this.unit = unit; + this.prefix = prefix; + this.exponent = exponent; + } + + + /** + * @return the unit + */ + public Unit getUnit() { + return unit; + } + + + /** + * @param unit the unit to set + */ + public void setUnit(Unit unit) { + this.unit = unit; + } + + + /** + * @return the prefix + */ + public Prefix getPrefix() { + return prefix; + } + + + /** + * @param prefix the prefix to set + */ + public void setPrefix(Prefix prefix) { + this.prefix = prefix; + } + + + /** + * @return the exponent + */ + public int getExponent() { + return exponent; + } + + + /** + * @param exponent the exponent to set + */ + public void setExponent(int exponent) { + this.exponent = exponent; + } + + public boolean hasPrefix() { + return prefix != null; + } + + + public void invertExponent() { + exponent = -exponent; + + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Term.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Term.java new file mode 100644 index 00000000000..f0395146dbb --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Term.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class Term extends Component { + + // op-term where op = / + // component + // component-op-term + private Component comp; + private Operator op; + private Term term; + /** + * + */ + public Term() { + super(); + } + /** + * @return the comp + */ + public Component getComp() { + return comp; + } + /** + * @param comp the comp to set + */ + public void setComp(Component comp) { + this.comp = comp; + } + /** + * @return the op + */ + public Operator getOp() { + return op; + } + /** + * @param op the op to set + */ + public void setOp(Operator op) { + this.op = op; + } + /** + * @return the term + */ + public Term getTerm() { + return term; + } + /** + * @param term the term to set + */ + public void setTerm(Term term) { + this.term = term; + } + + public boolean hasComp() { + return comp != null; + } + + public boolean hasOp() { + return op != null; + } + + public boolean hasTerm() { + return term != null; + } + public void setTermCheckOp(Term term) { + setTerm(term); + if (term == null) + setOp(null); + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/TokenType.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/TokenType.java new file mode 100644 index 00000000000..3bdc5da843f --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/TokenType.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public enum TokenType { + NONE, + NUMBER, + SYMBOL, + SOLIDUS, + PERIOD, + OPEN, + CLOSE, + ANNOTATION; + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumEssenceService.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumEssenceService.java new file mode 100644 index 00000000000..d7f292c840e --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumEssenceService.java @@ -0,0 +1,306 @@ +package org.fhir.ucum; + +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing & Health Intersections. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + * Health Intersections - ongoing maintenance + *******************************************************************************/ + +import java.io.File; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.fhir.ucum.special.Registry; + + +/** + * implements UCUM services. Applications must provide a copy of + * ucum-essence.xml as either a stream or a file name to create + * the services. + * + * the provided ucum-essence.xml must be released on 25 Apr 2008 + * or more recent. Note that if the ucum-essence.xml file does not + * contain a release date on an attribute of the root element, it + * is not more recent than this date (Gunther added it on this date for + * this usage, thanks) + * + * See UcumService for documentation concerning the services this class provides + * + * @author Grahame Grieve + * + */ +public class UcumEssenceService implements UcumService { + + public static final String UCUM_OID = "2.16.840.1.113883.6.8"; + + private UcumModel model; + private Registry handlers = new Registry(); + + /** + * Create an instance of Ucum services. Stream must point to a + * valid ucum-essence file (see class documentation) + * @throws UcumException + */ + public UcumEssenceService(InputStream stream) throws UcumException { + super(); + assert stream != null : paramError("factory", "stream", "must not be null"); + try { + model = new DefinitionParser().parse(stream); + } catch (Exception e) { + throw new UcumException(e); + } + } + + /** + * Create an instance of Ucum services. filename must point to a + * valid ucum-essence file (see class documentation) + * @throws UcumException + */ + public UcumEssenceService(String filename) throws UcumException { + super(); + assert new File(filename).exists() : paramError("factory", "file", "must exist"); + try { + model = new DefinitionParser().parse(filename); + } catch (Exception e) { + throw new UcumException(e); + } + } + + private String paramError(String method, String param, String msg) { + return getClass().getName()+"."+method+"."+param+" is not acceptable: "+msg; + } + + + @Override + public UcumVersionDetails ucumIdentification() { + return new UcumVersionDetails(model.getRevisionDate(), model.getVersion()); + } + + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#getModel() + */ + @Override + public UcumModel getModel() { + return model; + } + + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#search(org.eclipse.ohf.ucum.model.ConceptKind, java.lang.String, boolean) + */ + @Override + public List search(ConceptKind kind, String text, boolean isRegex) { + assert checkStringParam(text) : paramError("search", "text", "must not be null or empty"); + return new Search().doSearch(model, kind, text, isRegex); + } + + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#validateUCUM() + */ + @Override + public List validateUCUM() { + return new UcumValidator(model, handlers).validate(); + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#getProperties() + */ + @Override + public Set getProperties() { + Set result = new HashSet(); + for (DefinedUnit unit : model.getDefinedUnits()) { + result.add(unit.getProperty()); + } + return result; + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#validate(java.lang.String) + */ + @Override + public String validate(String unit) { + assert unit != null : paramError("validate", "unit", "must not be null"); + try { + new ExpressionParser(model).parse(unit); + return null; + } catch (Exception e) { + return e.getMessage(); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#validateInProperty(java.lang.String, java.lang.String) + */ + @Override + public String validateInProperty(String unit, String property) { + assert checkStringParam(unit) : paramError("validate", "unit", "must not be null or empty"); + assert checkStringParam(property) : paramError("validateInProperty", "property", "must not be null or empty"); + try { + Term term = new ExpressionParser(model).parse(unit); + Canonical can = new Converter(model, handlers).convert(term); + String cu = new ExpressionComposer().compose(can, false); + if (can.getUnits().size() == 1) { + if (property.equals(can.getUnits().get(0).getBase().getProperty())) + return null; + else + return "unit "+unit+" is of the property type "+can.getUnits().get(0).getBase().getProperty()+" ("+cu+"), not "+property+" as required."; + } + // defined special case + if ("concentration".equals(property) && ("g/L".equals(cu) || "mol/L".equals(cu))) + return null; + + return "unit "+unit+" has the base units "+cu+", and are not from the property "+property+" as required."; + } catch (Exception e) { + return e.getMessage(); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#validateCanonicalUnits(java.lang.String, java.lang.String) + */ + @Override + public String validateCanonicalUnits(String unit, String canonical) { + assert checkStringParam(unit) : paramError("validate", "unit", "must not be null or empty"); + assert checkStringParam(canonical) : paramError("validateCanonicalUnits", "canonical", "must not be null or empty"); + try { + Term term = new ExpressionParser(model).parse(unit); + Canonical can = new Converter(model, handlers).convert(term); + String cu = new ExpressionComposer().compose(can, false); + if (!canonical.equals(cu)) + return "unit "+unit+" has the base units "+cu+", not "+canonical+" as required."; + return null; + } catch (Exception e) { + return e.getMessage(); + } + } + + /** + * given a unit, return a formal description of what the units stand for using + * full names + * @param units the unit code + * @return formal description + * @throws UcumException + * @ + */ + @Override + public String analyse(String unit) throws UcumException { + if (Utilities.noString(unit)) + return "(unity)"; + assert checkStringParam(unit) : paramError("analyse", "unit", "must not be null or empty"); + Term term = new ExpressionParser(model).parse(unit); + return new FormalStructureComposer().compose(term); + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#getCanonicalUnits(java.lang.String) + */ + @Override + public String getCanonicalUnits(String unit) throws UcumException { + assert checkStringParam(unit) : paramError("getCanonicalUnits", "unit", "must not be null or empty"); + try { + Term term = new ExpressionParser(model).parse(unit); + return new ExpressionComposer().compose(new Converter(model, handlers).convert(term), false); + } catch (Exception e) { + throw new UcumException("Error processing "+unit+": "+e.getMessage(), e); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#getDefinedForms(java.lang.String) + */ + @Override + public List getDefinedForms(String code) throws UcumException { + assert checkStringParam(code) : paramError("getDefinedForms", "code", "must not be null or empty"); + List result = new ArrayList(); + BaseUnit base = model.getBaseUnit(code); + if (base != null) { + for (DefinedUnit unit : model.getDefinedUnits()) { + if (!unit.isSpecial() && code.equals(getCanonicalUnits(unit.getCode()))) + result.add(unit); + } + } + return result; + } + + private boolean checkStringParam(String s) { + return s != null && !s.equals(""); + } + + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#getCanonicalForm(org.eclipse.ohf.ucum.UcumEssenceService.Pair) + */ + @Override + public Pair getCanonicalForm(Pair value) throws UcumException { + assert value != null : paramError("getCanonicalForm", "value", "must not be null"); + assert checkStringParam(value.getCode()) : paramError("getCanonicalForm", "value.code", "must not be null or empty"); + + Term term = new ExpressionParser(model).parse(value.getCode()); + Canonical c = new Converter(model, handlers).convert(term); + if (value.getValue() == null) + return new Pair(null, new ExpressionComposer().compose(c, false)); + else + return new Pair(value.getValue().multiply(c.getValue()), new ExpressionComposer().compose(c, false)); + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.UcumServiceEx#convert(java.math.BigDecimal, java.lang.String, java.lang.String) + */ + @Override + public Decimal convert(Decimal value, String sourceUnit, String destUnit) throws UcumException { + assert value != null : paramError("convert", "value", "must not be null"); + assert checkStringParam(sourceUnit) : paramError("convert", "sourceUnit", "must not be null or empty"); + assert checkStringParam(destUnit) : paramError("convert", "destUnit", "must not be null or empty"); + + if (sourceUnit.equals(destUnit)) + return value; + + Canonical src = new Converter(model, handlers).convert(new ExpressionParser(model).parse(sourceUnit)); + Canonical dst = new Converter(model, handlers).convert(new ExpressionParser(model).parse(destUnit)); + String s = new ExpressionComposer().compose(src, false); + String d = new ExpressionComposer().compose(dst, false); + if (!s.equals(d)) + throw new UcumException("Unable to convert between units "+sourceUnit+" and "+destUnit+" as they do not have matching canonical forms ("+s+" and "+d+" respectively)"); + Decimal canValue = value.multiply(src.getValue()); +// System.out.println(value.toPlainString()+sourceUnit+" =("+src.getValue().toPlainString()+")= "+ +// canValue.toPlainString()+s+" =("+dst.getValue().toPlainString()+")= "+ +// canValue.divide(dst.getValue())+destUnit); + return canValue.divide(dst.getValue()); + } + + @Override + public Pair multiply(Pair o1, Pair o2) throws UcumException { + Pair res = new Pair(o1.getValue().multiply(o2.getValue()), o1.getCode() +"."+o2.getCode()); + return getCanonicalForm(res); + } + + @Override + public String getCommonDisplay(String code) { + //TODO: improvements + return code.replace("[", "").replace("]", ""); + } + + @Override + public boolean isComparable(String units1, String units2) throws UcumException { + if (units1 == null) + return false; + if (units2 == null) + return false; + + String u1 = getCanonicalUnits(units1); + String u2 = getCanonicalUnits(units2); + return u1.equals(u2); + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumException.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumException.java new file mode 100644 index 00000000000..97f77051b2f --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumException.java @@ -0,0 +1,40 @@ + +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing & Health Intersections. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + * Health Intersections - ongoing maintenance + *******************************************************************************/ + +package org.fhir.ucum; + +public class UcumException extends Exception { + + public UcumException() { + super(); + } + + public UcumException(String arg0, Throwable arg1, boolean arg2, boolean arg3) { + super(arg0, arg1, arg2, arg3); + } + + public UcumException(String arg0, Throwable arg1) { + super(arg0, arg1); + } + + public UcumException(String arg0) { + super(arg0); + } + + public UcumException(Throwable arg0) { + super(arg0); + } + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumModel.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumModel.java new file mode 100644 index 00000000000..65e8f70304a --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumModel.java @@ -0,0 +1,126 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class UcumModel { + + /** + * version="1.7" + */ + private String version; + + /** + * revision="$Revision: 1.1 $" + */ + private String revision; + + /** + * date this revision was made public + */ + private Date revisionDate; + + private List prefixes = new ArrayList(); + private List baseUnits = new ArrayList(); + private List definedUnits = new ArrayList(); + + + /** + * @param revision + * @param revisionDate + */ + public UcumModel(String version, String revision, Date revisionDate) { + super(); + this.version = version; + this.revision = revision; + this.revisionDate = revisionDate; + } + /** + * @return the prefixes + */ + public List getPrefixes() { + return prefixes; + } + /** + * @return the baseUnits + */ + public List getBaseUnits() { + return baseUnits; + } + /** + * @return the units + */ + public List getDefinedUnits() { + return definedUnits; + } + /** + * @return the revision + */ + public String getRevision() { + return revision; + } + /** + * @param revision the revision to set + */ + public void setRevision(String revision) { + this.revision = revision; + } + /** + * @return the revisionDate + */ + public Date getRevisionDate() { + return revisionDate; + } + /** + * @param revisionDate the revisionDate to set + */ + public void setRevisionDate(Date revisionDate) { + this.revisionDate = revisionDate; + } + /** + * @return the version + */ + public String getVersion() { + return version; + } + /** + * @param version the version to set + */ + public void setVersion(String version) { + this.version = version; + } + + public Unit getUnit(String code) { + for (Unit unit : getBaseUnits()) { + if (unit.getCode().equals(code)) + return unit; + } + for (Unit unit : getDefinedUnits()) { + if (unit.getCode().equals(code)) + return unit; + } + return null; + } + + public BaseUnit getBaseUnit(String code) { + for (BaseUnit unit : getBaseUnits()) { + if (unit.getCode().equals(code)) + return unit; + } + return null; + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumService.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumService.java new file mode 100644 index 00000000000..6faffff3253 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumService.java @@ -0,0 +1,220 @@ +package org.fhir.ucum; + +/******************************************************************************* + * Crown Copyright (c) 2006+, Copyright (c) 2006 - 2014 Kestral Computing & Health Intersections. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + * Health Intersections - ongoing maintenance + *******************************************************************************/ + +import java.util.Date; +import java.util.List; +import java.util.Set; + + +/** + * General Ucum Service + * + * UCUM functionality that is useful for applications that make use of UCUM codes + * + * @author Grahame Grieve + * + */ +public interface UcumService { + + /** + * provided for various utility/QA uses. Should not be used + * for general use + * + * @return the model + */ + public abstract UcumModel getModel(); + + public class UcumVersionDetails { + private Date releaseDate; + private String version; + /** + * @param releaseDate + * @param version + */ + public UcumVersionDetails(Date releaseDate, String version) { + super(); + this.releaseDate = releaseDate; + this.version = version; + } + /** + * @return the releaseDate + */ + public Date getReleaseDate() { + return releaseDate; + } + /** + * @return the version + */ + public String getVersion() { + return version; + } + + } + + /** + * return Ucum Identification details for the version in use + */ + public abstract UcumVersionDetails ucumIdentification(); + + + /** + * Check UCUM. Note that this stands as a test of the service + * more than UCUM itself (for version 1.7, there are no known + * semantic errors in UCUM). But you should always run this test at least + * once with the version of UCUM you are using to ensure that + * the service implementation correctly understands the UCUM data + * to which it is bound + * + * @return a list of internal errors in the UCUM spec. + * + */ + public abstract List validateUCUM(); + + /** + * Search through the UCUM concepts for any concept containing matching text. + * Search will be limited to the kind of concept defined by kind, or all if kind + * is null + * + * @param kind - can be null. scope of search + * @param text - required + * @param isRegex + * @return + */ + public abstract List search(ConceptKind kind, String text, boolean isRegex); + + /** + * return a list of the defined types of units in this UCUM version + * + * @return + */ + public abstract Set getProperties(); + + /** + * validate whether a unit code are valid UCUM units + * + * @param units - the unit code to check + * @return nil if valid, or an error message describing the problem + */ + public abstract String validate(String unit); + + /** + * given a unit, return a formal description of what the units stand for using + * full names + * @param units the unit code + * @return formal description + * @throws UcumException + * @throws OHFException + */ + public String analyse(String unit) throws UcumException ; + + /** + * validate whether a units are valid UCUM units and additionally require that the + * units from a particular property + * + * @param units - the unit code to check + * @return nil if valid, or an error message describing the problem + */ + public abstract String validateInProperty(String unit, String property); + + /** + * validate whether a units are valid UCUM units and additionally require that the + * units match a particular base canonical unit + * + * @param units - the unit code to check + * @return nil if valid, or an error message describing the problem + */ + public abstract String validateCanonicalUnits(String unit, String canonical); + + /** + * given a set of units, return their canonical form + * @param unit + * @return the canonical form + * @throws UcumException + * @throws OHFException + */ + public abstract String getCanonicalUnits(String unit) throws UcumException ; + + /** + * given two pairs of units, return true if they sahre the same canonical base + * + * @param units1 + * @param units2 + * @return + * @throws UcumException + * @ + */ + public abstract boolean isComparable(String units1, String units2) throws UcumException ; + + /** + * for a given canonical unit, return all the defined units that have the + * same canonical unit. + * + * @param code + * @return + * @throws UcumException + * @throws OHFException + */ + public abstract List getDefinedForms(String code) throws UcumException ; + + /** + * given a value/unit pair, return the canonical form as a value/unit pair + * + * 1 mm -> 1e-3 m + * @param value + * @return + * @throws UcumException + * @throws OHFException + */ + public abstract Pair getCanonicalForm(Pair value) throws UcumException ; + + /** + * given a value and source unit, return the value in the given dest unit + * an exception is thrown if the conversion is not possible + * + * @param value + * @param sourceUnit + * @param destUnit + * @return the value if a conversion is possible + * @throws UcumException + * @throws OHFException + */ + public abstract Decimal convert(Decimal value, String sourceUnit, String destUnit) throws UcumException ; + + /** + * multiply two value/units pairs together and return the result in canonical units + * + * Note: since the units returned are canonical, + * @param o1 + * @param o2 + * @return + * @throws UcumException + * @ + */ + public abstract Pair multiply(Pair o1, Pair o2) throws UcumException ; + + + /** + * given a set of UCUM units, return a likely preferred human dense form + * + * SI units - as is. + * Other units - improved by manual fixes, or the removal of [] + * + * @param code + * @return the preferred human display form + */ + public abstract String getCommonDisplay(String code); + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumValidator.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumValidator.java new file mode 100644 index 00000000000..44c37b0e74d --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/UcumValidator.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +import java.util.ArrayList; +import java.util.List; + +import org.fhir.ucum.special.Registry; + + + +public class UcumValidator { + + private UcumModel model; + private List result; + private Registry handlers; + + public UcumValidator(UcumModel model, Registry handlers) { + super(); + this.model = model; + this.handlers = handlers; + } + + public List validate() { + result = new ArrayList(); + checkCodes(); + checkUnits(); + return result; + } + + private void checkCodes() { + for (Unit unit : model.getBaseUnits()) { + checkUnitCode(unit.getCode(), true); + } + for (Unit unit : model.getDefinedUnits()) { + checkUnitCode(unit.getCode(), true); + } + } + + private void checkUnits() { + for (DefinedUnit unit : model.getDefinedUnits()) { + if (!unit.isSpecial()) + checkUnitCode(unit.getValue().getUnit(), false); + else if (!handlers.exists(unit.getCode())) + result.add("No Handler for "+unit.getCode().toString()); + } + } + + private void checkUnitCode(String code, boolean primary) { + try { + Term term = new ExpressionParser(model).parse(code); + String c = new ExpressionComposer().compose(term); + if (!c.equals(code)) + result.add("Round trip failed: "+code+" -> "+c); + new Converter(model, handlers).convert(term); + } catch (Exception e) { + result.add(code+": "+e.getMessage()); + } + if (primary) + try { + // there can't be any codes that have digits in them that aren't inside [] + boolean inBrack = false; + boolean nonDigits = false; + for (int i = 0; i < code.length(); i++) { + char ch = code.charAt(i); + if (ch == '[') + if (inBrack) + throw new Exception("nested ["); + else + inBrack = true; + if (ch == ']') + if (!inBrack) + throw new Exception("] without ["); + else + inBrack = false; + nonDigits = nonDigits || !(ch >= '0' && ch <= '9'); + if (ch >= '0' && ch <= '9' && !inBrack && nonDigits) { + throw new Exception("code "+code+" is ambiguous because it has digits outside []"); + } + } + } catch (Exception e) { + result.add(e.getMessage()); + } + + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Unit.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Unit.java new file mode 100644 index 00000000000..3a53717fdb3 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Unit.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + + +public abstract class Unit extends Concept { + + /** + * kind of thing this base unit represents + */ + private String property; + + public Unit(ConceptKind kind, String code, String codeUC) { + super(kind, code, codeUC); + } + + /** + * @return the property + */ + public String getProperty() { + return property; + } + + /** + * @param property the property to set + */ + public void setProperty(String property) { + this.property = property; + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.model.Concept#getDescription() + */ + @Override + public String getDescription() { + return super.getDescription()+" ("+property+")"; + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Utilities.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Utilities.java new file mode 100644 index 00000000000..695e9ca6d3d --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Utilities.java @@ -0,0 +1,73 @@ + +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing & Health Intersections. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + * Health Intersections - ongoing maintenance + *******************************************************************************/ + +package org.fhir.ucum; + +public class Utilities { + public static boolean isWhitespace(String s) { + boolean ok = true; + for (int i = 0; i < s.length(); i++) + ok = ok && Character.isWhitespace(s.charAt(i)); + return ok; + + } + + public static boolean isDecimal(String string) { + if (Utilities.noString(string)) + return false; + try { + float r = Float.parseFloat(string); + return r != r + 1; // just to suppress the hint + } catch (Exception e) { + return false; + } + } + + public static boolean isInteger(String string) { + try { + int i = Integer.parseInt(string); + return i != i+1; + } catch (Exception e) { + return false; + } + } + + public static boolean isHex(String string) { + try { + int i = Integer.parseInt(string, 16); + return i != i+1; + } catch (Exception e) { + return false; + } + } + + + public static boolean noString(String v) { + return v == null || v.equals(""); + } + + public static String padLeft(String src, char c, int len) { + StringBuilder s = new StringBuilder(); + for (int i = 0; i < len - src.length(); i++) + s.append(c); + s.append(src); + return s.toString(); + } + + public static boolean isAsciiChar(char ch) { + return ch >= ' ' && ch <= '~'; + } + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Value.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Value.java new file mode 100644 index 00000000000..94536ee8afb --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/Value.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum; + +public class Value { + + private String unit; + + private String unitUC; + + private Decimal value; + + private String text; + + /** + * @param unit + * @param unitUC + * @param value + */ + public Value(String unit, String unitUC, Decimal value) { + super(); + this.unit = unit; + this.unitUC = unitUC; + this.value = value; + } + + /** + * @return the unit + */ + public String getUnit() { + return unit; + } + + /** + * @param unit the unit to set + */ + public void setUnit(String unit) { + this.unit = unit; + } + + /** + * @return the unitUC + */ + public String getUnitUC() { + return unitUC; + } + + /** + * @param unitUC the unitUC to set + */ + public void setUnitUC(String unitUC) { + this.unitUC = unitUC; + } + + /** + * @return the value + */ + public Decimal getValue() { + return value; + } + + /** + * @param value the value to set + */ + public void setValue(Decimal value) { + this.value = value; + } + + /** + * @return the text + */ + public String getText() { + return text; + } + + /** + * @param text the text to set + */ + public void setText(String text) { + this.text = text; + } + + public String getDescription() { + if (value == null) + return unit; + return value.toString()+unit; + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/CelsiusHandler.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/CelsiusHandler.java new file mode 100644 index 00000000000..68ec226641a --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/CelsiusHandler.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum.special; + +import org.fhir.ucum.Decimal; + +public class CelsiusHandler extends SpecialUnitHandler { + + @Override + public String getCode() { + return "Cel"; + } + + @Override + public String getUnits() { + return "K"; + } + + @Override + public Decimal getValue() { + return Decimal.one(); + } + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/FahrenheitHandler.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/FahrenheitHandler.java new file mode 100644 index 00000000000..f0ada0874b1 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/FahrenheitHandler.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum.special; + +import org.fhir.ucum.Decimal; + +public class FahrenheitHandler extends SpecialUnitHandler { + + @Override + public String getCode() { + return "[degF]"; + } + + @Override + public String getUnits() { + return "K"; + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.special.SpecialUnitHandler#getValue() + */ + @Override + public Decimal getValue() { + try { + return new Decimal(5).divide(new Decimal(9)); + } catch (Exception e) { + // won't happen + return null; + } + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/HoldingHandler.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/HoldingHandler.java new file mode 100644 index 00000000000..7691fe08422 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/HoldingHandler.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum.special; + +import org.fhir.ucum.Decimal; + +/** + * If you want to actually use one of these units, then you'll + * have to figure out how to implement them + * + * @author Grahame Grieve + * + */ +public class HoldingHandler extends SpecialUnitHandler { + + private String code; + private String units; + private Decimal value = Decimal.one(); + + + /** + * @param code + * @param units + */ + public HoldingHandler(String code, String units) { + super(); + this.code = code; + this.units = units; + } + + public HoldingHandler(String code, String units, Decimal value) { + super(); + this.code = code; + this.units = units; + this.value = value; + } + + @Override + public String getCode() { + return code; + } + + @Override + public String getUnits() { + return units; + } + + /* (non-Javadoc) + * @see org.eclipse.ohf.ucum.special.SpecialUnitHandler#getValue() + */ + @Override + public Decimal getValue() { + return value; + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/Registry.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/Registry.java new file mode 100644 index 00000000000..8c0f293d5d8 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/Registry.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum.special; + +import java.util.HashMap; +import java.util.Map; + +import org.fhir.ucum.Decimal; + +public class Registry { + + Map handlers = new HashMap(); + + public Registry() { + super(); + init(); + } + + private void register(SpecialUnitHandler handler) { + handlers.put(handler.getCode(), handler); + } + + private void init() { + register(new CelsiusHandler()); + register(new FahrenheitHandler()); + register(new HoldingHandler("[p'diop]", "deg")); + register(new HoldingHandler("%[slope]", "deg")); + register(new HoldingHandler("[hp_X]", "1")); + register(new HoldingHandler("[hp_C]", "1")); + register(new HoldingHandler("[pH]", "mol/l")); + register(new HoldingHandler("Np", "1")); + register(new HoldingHandler("B", "1")); + register(new HoldingHandler("B[SPL]", "10*-5.Pa", new Decimal(2))); + register(new HoldingHandler("B[V]", "V")); + register(new HoldingHandler("B[mV]", "mV")); + register(new HoldingHandler("B[uV]", "uV")); + register(new HoldingHandler("B[W]", "W")); + register(new HoldingHandler("B[kW]", "kW")); + register(new HoldingHandler("bit_s", "1")); + } + + public boolean exists(String code) { + return handlers.containsKey(code); + } + + public SpecialUnitHandler get(String code) { + return handlers.get(code); + } + + + + +} diff --git a/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/SpecialUnitHandler.java b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/SpecialUnitHandler.java new file mode 100644 index 00000000000..4f815d354ee --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/fhir/ucum/special/SpecialUnitHandler.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Kestral Computing P/L - initial implementation + *******************************************************************************/ + +package org.fhir.ucum.special; + +import org.fhir.ucum.Decimal; + +public abstract class SpecialUnitHandler { + + /** + * Used to connect this handler with the case sensitive unit + * @return + */ + public abstract String getCode(); + + /** + * the alternate units to convert to + * + * @return + */ + public abstract String getUnits(); + + /** + * get the conversion value + * + * @return + */ + public abstract Decimal getValue(); + +} diff --git a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java index d060b88d6de..c788594d8f8 100644 --- a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java +++ b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java @@ -48,6 +48,40 @@ public class CSVReader extends InputStreamReader { super(in, "UTF-8"); } + private String[] cols; + private String[] cells; + + public void readHeaders() throws IOException, FHIRException { + cols = parseLine(); + } + + + public boolean line() throws IOException, FHIRException { + if (ready()) { + cells = parseLine(); + return true; + } else + return false; + } + + public boolean has(String name) { + return cell(name) != null; + } + + public String cell(String name) { + int index = -1; + for (int i = 0; i < cols.length; i++) { + if (name.equals(cols[i])) + index = i; + } + if (index == -1) + throw new Error("no cell "+name); + String s = cells.length >= index ? cells[index] : null; + if (Utilities.noString(s)) + return null; + return s; + } + protected boolean parseBoolean(String column) { if (column == null) return false; @@ -135,4 +169,5 @@ public class CSVReader extends InputStreamReader { pc = (char) i; } + } diff --git a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVWriter.java b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVWriter.java new file mode 100644 index 00000000000..acd9cb87387 --- /dev/null +++ b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVWriter.java @@ -0,0 +1,38 @@ +package org.hl7.fhir.utilities; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; + +public class CSVWriter extends TextStreamWriter { + + public CSVWriter(OutputStream out) throws UnsupportedEncodingException { + super(out); + } + + protected String csvEscape(String s) { + if (s==null) + return ""; + else if (s.contains("\"")) + return s.substring(0,s.indexOf("\"")) + "\"" + csvEscape(s.substring(s.indexOf("\"")+1)); + else if (s.contains(",")) + return "\""+s+"\""; + else + return s; + } + + + public void line(String... fields) throws IOException { + StringBuilder b = new StringBuilder(); + boolean first = true; + for (String s : fields) { + if (first) + first = false; + else + b.append(","); + b.append(csvEscape(s)); + } + ln(b.toString()); + } + +} diff --git a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java index 61652fde425..cc35928bd8b 100644 --- a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java +++ b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java @@ -1,968 +1,909 @@ -/* -Copyright (c) 2011+, HL7, Inc -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - */ -package org.hl7.fhir.utilities; - -import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.channels.FileChannel; -import java.util.*; - - -import org.apache.commons.io.FileUtils; -import org.hl7.fhir.exceptions.FHIRException; - -public class Utilities { - -// private static final String TOKEN_REGEX = "^a-z[A-Za-z0-9]*$"; - - - private static final String OID_REGEX = "[0-2](\\.(0|[1-9]([0-9])*))*"; - - /** - * Returns the plural form of the word in the string. - * - * Examples: - * - *
-     *   inflector.pluralize("post")               #=> "posts"
-     *   inflector.pluralize("octopus")            #=> "octopi"
-     *   inflector.pluralize("sheep")              #=> "sheep"
-     *   inflector.pluralize("words")              #=> "words"
-     *   inflector.pluralize("the blue mailman")   #=> "the blue mailmen"
-     *   inflector.pluralize("CamelOctopus")       #=> "CamelOctopi"
-     * 
- * - * - * - * Note that if the {@link Object#toString()} is called on the supplied object, so this method works for non-strings, too. - * - * - * @param word the word that is to be pluralized. - * @return the pluralized form of the word, or the word itself if it could not be pluralized - * @see #singularize(Object) - */ - public static String pluralizeMe( String word ) { - Inflector inf = new Inflector(); - return inf.pluralize(word); - } - - public static String pluralize(String word, int count) { - if (count == 1) - return word; - Inflector inf = new Inflector(); - return inf.pluralize(word); - } - - - public static boolean isInteger(String string) { - try { - int i = Integer.parseInt(string); - return i != i+1; - } catch (Exception e) { - return false; - } - } - - public static boolean isHex(String string) { - try { - int i = Integer.parseInt(string, 16); - return i != i+1; - } catch (Exception e) { - return false; - } - } - - public static boolean isDecimal(String string) { - if (Utilities.noString(string)) - return false; - try { - float r = Float.parseFloat(string); - return r != r + 1; // just to suppress the hint - } catch (Exception e) { - return false; - } - } - - public static String camelCase(String value) { - return new Inflector().camelCase(value.trim().replace(" ", "_"), false); - } - - public static String escapeXml(String doco) { - if (doco == null) - return ""; - - StringBuilder b = new StringBuilder(); - for (char c : doco.toCharArray()) { - if (c == '<') - b.append("<"); - else if (c == '>') - b.append(">"); - else if (c == '&') - b.append("&"); - else if (c == '"') - b.append("""); - else - b.append(c); - } - return b.toString(); - } - - public static String titleize(String s) { - StringBuilder b = new StringBuilder(); - boolean up = true; - for (char c : s.toCharArray()) { - if (up) - b.append(Character.toUpperCase(c)); - else - b.append(c); - up = c == ' '; - } - return b.toString(); - } - - public static String capitalize(String s) - { - if( s == null ) return null; - if( s.length() == 0 ) return s; - if( s.length() == 1 ) return s.toUpperCase(); - - return s.substring(0, 1).toUpperCase() + s.substring(1); - } - - public static void copyDirectory(String sourceFolder, String destFolder, FileNotifier notifier) throws IOException, FHIRException { - CSFile src = new CSFile(sourceFolder); - if (!src.exists()) - throw new FHIRException("Folder " +sourceFolder+" not found"); - createDirectory(destFolder); - - String[] files = src.list(); - for (String f : files) { - if (new CSFile(sourceFolder+File.separator+f).isDirectory()) { - if (!f.startsWith(".")) // ignore .svn... - copyDirectory(sourceFolder+File.separator+f, destFolder+File.separator+f, notifier); - } else { - if (notifier != null) - notifier.copyFile(sourceFolder+File.separator+f, destFolder+File.separator+f); - copyFile(new CSFile(sourceFolder+File.separator+f), new CSFile(destFolder+File.separator+f)); - } - } - } - - public static void copyFile(String source, String dest) throws IOException { - copyFile(new File(source), new File(dest)); - } - - public static void copyFile(File sourceFile, File destFile) throws IOException { - if(!destFile.exists()) { - if (!new CSFile(destFile.getParent()).exists()) { - createDirectory(destFile.getParent()); - } - destFile.createNewFile(); - } - - FileChannel source = null; - FileChannel destination = null; - - try { - source = new FileInputStream(sourceFile).getChannel(); - destination = new FileOutputStream(destFile).getChannel(); - destination.transferFrom(source, 0, source.size()); - } - finally { - if(source != null) { - source.close(); - } - if(destination != null) { - destination.close(); - } - } - } - - public static boolean checkFolder(String dir, List errors) - throws IOException - { - if (!new CSFile(dir).exists()) { - errors.add("Unable to find directory "+dir); - return false; - } else { - return true; - } - } - - public static boolean checkFile(String purpose, String dir, String file, List errors) - throws IOException - { - if (!new CSFile(dir+file).exists()) { - errors.add("Unable to find "+purpose+" file "+file+" in "+dir); - return false; - } else { - return true; - } - } - - public static String asCSV(List strings) { - StringBuilder s = new StringBuilder(); - boolean first = true; - for (String n : strings) { - if (!first) - s.append(","); - s.append(n); - first = false; - } - return s.toString(); - } - - public static String asHtmlBr(String prefix, List strings) { - StringBuilder s = new StringBuilder(); - boolean first = true; - for (String n : strings) { - if (!first) - s.append("
"); - s.append(prefix); - s.append(n); - first = false; - } - return s.toString(); - } - - public static void clearDirectory(String folder) throws IOException { - File dir = new File(folder); - if (dir.exists()) - FileUtils.cleanDirectory(dir); -// String[] files = new CSFile(folder).list(); -// if (files != null) { -// for (String f : files) { -// File fh = new CSFile(folder+File.separatorChar+f); -// if (fh.isDirectory()) -// clearDirectory(fh.getAbsolutePath()); -// fh.delete(); -// } -// } - } - - public static void createDirectory(String path) throws IOException{ - new CSFile(path).mkdirs(); - } - - public static String changeFileExt(String name, String ext) { - if (name.lastIndexOf('.') > -1) - return name.substring(0, name.lastIndexOf('.')) + ext; - else - return name+ext; - } - - public static String cleanupTextString( String contents ) - { - if( contents == null || contents.trim().equals("") ) - return null; - else - return contents.trim(); - } - - - public static boolean noString(String v) { - return v == null || v.equals(""); - } - - public static void bytesToFile(byte[] content, String filename) throws IOException { - FileOutputStream out = new FileOutputStream(filename); - out.write(content); - out.close(); - - } - - - - public static String appendSlash(String definitions) { - return definitions.endsWith(File.separator) ? definitions : definitions+File.separator; - } - - public static String appendForwardSlash(String definitions) { - return definitions.endsWith("/") ? definitions : definitions+"/"; - } - - - public static String fileTitle(String file) { - if (file == null) - return null; - String s = new File(file).getName(); - return s.indexOf(".") == -1? s : s.substring(0, s.indexOf(".")); - } - - - public static String systemEol() - { - return System.getProperty("line.separator"); - } - - public static String normaliseEolns(String value) { - return value.replace("\r\n", "\r").replace("\n", "\r").replace("\r", "\r\n"); - } - - - public static String unescapeXml(String xml) throws FHIRException { - if (xml == null) - return null; - - StringBuilder b = new StringBuilder(); - int i = 0; - while (i < xml.length()) { - if (xml.charAt(i) == '&') { - StringBuilder e = new StringBuilder(); - i++; - while (xml.charAt(i) != ';') { - e.append(xml.charAt(i)); - i++; - } - if (e.toString().equals("lt")) - b.append("<"); - else if (e.toString().equals("gt")) - b.append(">"); - else if (e.toString().equals("amp")) - b.append("&"); - else if (e.toString().equals("quot")) - b.append("\""); - else if (e.toString().equals("mu")) - b.append((char)956); - else - throw new FHIRException("unknown XML entity \""+e.toString()+"\""); - } else - b.append(xml.charAt(i)); - i++; - } - return b.toString(); - } - - - public static boolean isPlural(String word) { - word = word.toLowerCase(); - if ("restricts".equals(word) || "contains".equals(word) || "data".equals(word) || "specimen".equals(word) || "replaces".equals(word) || "addresses".equals(word) - || "supplementalData".equals(word) || "instantiates".equals(word)) - return false; - Inflector inf = new Inflector(); - return !inf.singularize(word).equals(word); - } - - - public static String padRight(String src, char c, int len) { - StringBuilder s = new StringBuilder(); - s.append(src); - for (int i = 0; i < len - src.length(); i++) - s.append(c); - return s.toString(); - } - - - public static String padLeft(String src, char c, int len) { - StringBuilder s = new StringBuilder(); - for (int i = 0; i < len - src.length(); i++) - s.append(c); - s.append(src); - return s.toString(); - } - - - public static String path(String... args) throws IOException { - StringBuilder s = new StringBuilder(); - boolean d = false; - for(String arg: args) { - if (!d) - d = !noString(arg); - else if (!s.toString().endsWith(File.separator)) - s.append(File.separator); - String a = arg; - a = a.replace("\\", File.separator); - a = a.replace("/", File.separator); - if (s.length() > 0 && a.startsWith(File.separator)) - a = a.substring(File.separator.length()); - - while (a.startsWith(".."+File.separator)) { - String p = s.toString().substring(0, s.length()-1); - if (!p.contains(File.separator)) { - s = new StringBuilder(); - } else { - s = new StringBuilder(p.substring(0, p.lastIndexOf(File.separator))+File.separator); - } - a = a.substring(3); - } - if ("..".equals(a)) { - int i = s.substring(0, s.length()-1).lastIndexOf(File.separator); - s = new StringBuilder(s.substring(0, i+1)); - } else - s.append(a); - } - return s.toString(); - } - - public static String pathURL(String... args) { - StringBuilder s = new StringBuilder(); - boolean d = false; - for(String arg: args) { - if (!d) - d = !noString(arg); - else if (!s.toString().endsWith("/")) - s.append("/"); - s.append(arg); - } - return s.toString(); - } - - - -// public static void checkCase(String filename) { -// File f = new CSFile(filename); -// if (!f.getName().equals(filename)) -// throw new FHIRException("Filename ") -// -// } - - public static String nmtokenize(String cs) { - if (cs == null) - return ""; - StringBuilder s = new StringBuilder(); - for (int i = 0; i < cs.length(); i++) { - char c = cs.charAt(i); - if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_') - s.append(c); - else if (c != ' ') - s.append("."+Integer.toString(c)); - } - return s.toString(); - } - - - public static boolean isToken(String tail) { - if (tail == null || tail.length() == 0) - return false; - boolean result = isAlphabetic(tail.charAt(0)); - for (int i = 1; i < tail.length(); i++) { - result = result && (isAlphabetic(tail.charAt(i)) || isDigit(tail.charAt(i)) || (tail.charAt(i) == '_') || (tail.charAt(i) == '[') || (tail.charAt(i) == ']')); - } - return result; - } - - - private static boolean isDigit(char c) { - return (c >= '0') && (c <= '9'); - } - - - private static boolean isAlphabetic(char c) { - return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')); - } - - - public static String getDirectoryForFile(String filepath) { - File f = new File(filepath); - return f.getParent(); - } - - public static String appendPeriod(String s) { - if (Utilities.noString(s)) - return s; - s = s.trim(); - if (s.endsWith(".") || s.endsWith("?")) - return s; - return s+"."; - } - - - public static String removePeriod(String s) { - if (Utilities.noString(s)) - return s; - if (s.endsWith(".")) - return s.substring(0, s.length()-1); - return s; - } - - - public static String stripBOM(String string) { - return string.replace("\uFEFF", ""); - } - - - public static String oidTail(String id) { - if (id == null || !id.contains(".")) - return id; - return id.substring(id.lastIndexOf(".")+1); - } - - - public static String oidRoot(String id) { - if (id == null || !id.contains(".")) - return id; - return id.substring(0, id.indexOf(".")); - } - - public static String escapeJava(String doco) { - if (doco == null) - return ""; - - StringBuilder b = new StringBuilder(); - for (char c : doco.toCharArray()) { - if (c == '\r') - b.append("\\r"); - else if (c == '\n') - b.append("\\n"); - else if (c == '"') - b.append("\\\""); - else if (c == '\\') - b.append("\\\\"); - else - b.append(c); - } - return b.toString(); - } - - - public static String[] splitByCamelCase(String name) { - List parts = new ArrayList(); - StringBuilder b = new StringBuilder(); - for (int i = 0; i < name.length(); i++) { - if (i > 0 && Character.isUpperCase(name.charAt(i))) { - parts.add(b.toString()); - b = new StringBuilder(); - } - b.append(Character.toLowerCase(name.charAt(i))); - } - parts.add(b.toString()); - return parts.toArray(new String[] {} ); - } - - - public static String encodeUri(String v) { - return v.replace(" ", "%20").replace("?", "%3F").replace("=", "%3D"); - } - - - - public static String normalize(String s) { - if (noString(s)) - return null; - StringBuilder b = new StringBuilder(); - boolean isWhitespace = false; - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (!Character.isWhitespace(c)) { - b.append(Character.toLowerCase(c)); - isWhitespace = false; - } else if (!isWhitespace) { - b.append(' '); - isWhitespace = true; - } - } - return b.toString().trim(); - } - - public static String normalizeSameCase(String s) { - if (noString(s)) - return null; - StringBuilder b = new StringBuilder(); - boolean isWhitespace = false; - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (!Character.isWhitespace(c)) { - b.append(c); - isWhitespace = false; - } else if (!isWhitespace) { - b.append(' '); - isWhitespace = true; - } - } - return b.toString().trim(); - } - - - public static void copyFileToDirectory(File source, File destDir) throws IOException { - copyFile(source, new File(path(destDir.getAbsolutePath(), source.getName()))); - } - - - public static boolean isWhitespace(String s) { - boolean ok = true; - for (int i = 0; i < s.length(); i++) - ok = ok && Character.isWhitespace(s.charAt(i)); - return ok; - - } - - - public static String URLEncode(String string) { - try { - return URLEncoder.encode(string, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new Error(e.getMessage()); - } - } - - - public static boolean charInSet(char value, char... array) { - for (int i : array) - if (value == i) - return true; - return false; - } - - - public static boolean charInRange(char ch, char a, char z) { - return ch >= a && ch <= z; - } - - public static boolean existsInList(String value, String... array) { - if (value == null) - return false; - for (String s : array) - if (value.equals(s)) - return true; - return false; - } - - public static boolean existsInList(int value, int... array) { - for (int i : array) - if (value == i) - return true; - return false; - } - - public static boolean existsInListNC(String value, String... array) { - for (String s : array) - if (value.equalsIgnoreCase(s)) - return true; - return false; - } - - - public static String getFileNameForName(String name) { - return name.toLowerCase(); - } - - public static void deleteTempFiles() throws IOException { - File file = createTempFile("test", "test"); - String folder = getDirectoryForFile(file.getAbsolutePath()); - String[] list = new File(folder).list(new FilenameFilter() { - public boolean accept(File dir, String name) { - return name.startsWith("ohfu-"); - } - }); - if (list != null) { - for (String n : list) { - new File(path(folder, n)).delete(); - } - } - } - - public static File createTempFile(String prefix, String suffix) throws IOException { - // this allows use to eaily identify all our dtemp files and delete them, since delete on Exit doesn't really work. - File file = File.createTempFile("ohfu-"+prefix, suffix); - file.deleteOnExit(); - return file; - } - - - public static boolean isAsciiChar(char ch) { - return ch >= ' ' && ch <= '~'; - } - - - public static String makeUuidUrn() { - return "urn:uuid:"+UUID.randomUUID().toString().toLowerCase(); - } - - public static boolean isURL(String s) { - boolean ok = s.matches("^http(s{0,1})://[a-zA-Z0-9_/\\-\\.]+\\.([A-Za-z/]{2,5})[a-zA-Z0-9_/\\&\\?\\=\\-\\.\\~\\%]*"); - return ok; - } - - - public static String escapeJson(String value) { - if (value == null) - return ""; - - StringBuilder b = new StringBuilder(); - for (char c : value.toCharArray()) { - if (c == '\r') - b.append("\\r"); - else if (c == '\n') - b.append("\\n"); - else if (c == '"') - b.append("\\\""); - else if (c == '\'') - b.append("\\'"); - else if (c == '\\') - b.append("\\\\"); - else - b.append(c); - } - return b.toString(); - } - - public static String humanize(String code) { - StringBuilder b = new StringBuilder(); - boolean lastBreak = true; - for (char c : code.toCharArray()) { - if (Character.isLetter(c)) { - if (lastBreak) - b.append(Character.toUpperCase(c)); - else { - if (Character.isUpperCase(c)) - b.append(" "); - b.append(c); - } - lastBreak = false; - } else { - b.append(" "); - lastBreak = true; - } - } - if (b.length() == 0) - return code; - else - return b.toString(); - } - - - public static String uncapitalize(String s) { - if( s == null ) return null; - if( s.length() == 0 ) return s; - if( s.length() == 1 ) return s.toLowerCase(); - - return s.substring(0, 1).toLowerCase() + s.substring(1); - } - - - public static int charCount(String s, char c) { - int res = 0; - for (char ch : s.toCharArray()) - if (ch == c) - res++; - return res; - } - - - public static boolean isOid(String cc) { - return cc.matches(OID_REGEX) && cc.lastIndexOf('.') > 5; - } - - - public static boolean equals(String one, String two) { - if (one == null && two == null) - return true; - if (one == null || two == null) - return false; - return one.equals(two); - } - - - public static void deleteAllFiles(String folder, String type) { - File src = new File(folder); - String[] files = src.list(); - for (String f : files) { - if (new File(folder+File.separator+f).isDirectory()) { - deleteAllFiles(folder+File.separator+f, type); - } else if (f.endsWith(type)) { - new File(folder+File.separator+f).delete(); - } - } - - } - - public static boolean compareIgnoreWhitespace(File f1, File f2) throws IOException { - InputStream in1 = null; - InputStream in2 = null; - try { - in1 = new BufferedInputStream(new FileInputStream(f1)); - in2 = new BufferedInputStream(new FileInputStream(f2)); - - int expectedByte = in1.read(); - while (expectedByte != -1) { - boolean w1 = isWhitespace(expectedByte); - if (w1) - while (isWhitespace(expectedByte)) - expectedByte = in1.read(); - int foundByte = in2.read(); - if (w1) { - if (!isWhitespace(foundByte)) - return false; - while (isWhitespace(foundByte)) - foundByte = in2.read(); - } - if (expectedByte != foundByte) - return false; - expectedByte = in1.read(); - } - if (in2.read() != -1) { - return false; - } - return true; - } finally { - if (in1 != null) { - try { - in1.close(); - } catch (IOException e) {} - } - if (in2 != null) { - try { - in2.close(); - } catch (IOException e) {} - } - } - } - - private static boolean isWhitespace(int b) { - return b == 9 || b == 10 || b == 13 || b == 32; - } - - - public static boolean compareIgnoreWhitespace(String fn1, String fn2) throws IOException { - return compareIgnoreWhitespace(new File(fn1), new File(fn2)); - } - - - public static boolean isAbsoluteUrl(String ref) { - return ref != null && ref.startsWith("http:") || ref.startsWith("https:") || ref.startsWith("urn:uuid:") || ref.startsWith("urn:oid:") ; - } - - - public static boolean equivalent(String l, String r) { - if (Utilities.noString(l) && Utilities.noString(r)) - return true; - if (Utilities.noString(l) || Utilities.noString(r)) - return false; - return l.toLowerCase().equals(r.toLowerCase()); - } - - - public static boolean equivalentNumber(String l, String r) { - if (Utilities.noString(l) && Utilities.noString(r)) - return true; - if (Utilities.noString(l) || Utilities.noString(r)) - return false; - l = l.toLowerCase().trim(); - r = r.toLowerCase().trim(); // not that this should make any difference - return l.startsWith(r) || r.startsWith(l); - } - - - public static String getFileExtension(String fn) { - return fn.contains(".") ? fn.substring(fn.lastIndexOf(".")+1) : ""; - } - - - public static String unCamelCase(String name) { - StringBuilder b = new StringBuilder(); - boolean first = true; - for (char c : name.toCharArray()) { - if (Character.isUpperCase(c)) { - if (!first) - b.append(" "); - b.append(Character.toLowerCase(c)); - } else - b.append(c); - first = false; - } - return b.toString(); - } - - - public static boolean isAbsoluteFileName(String source) { - if (isWindows()) - return (source.length() > 2 && source.charAt(1) == ':') || source.startsWith("\\\\"); - else - return source.startsWith("//"); - } - - - private static boolean isWindows() { - return System.getProperty("os.name").startsWith("Windows"); - } - - - public static String splitLineForLength(String line, int prefixLength, int indent, int allowedLength) { - List list = new ArrayList(); - while (prefixLength + line.length() > allowedLength) { - int i = allowedLength - (list.size() == 0 ? prefixLength : indent); - while (i > 0 && line.charAt(i) != ' ') - i--; - if (i == 0) - break; - list.add(line.substring(0, i)); - line = line.substring(i+1); - } - list.add(line); - StringBuilder b = new StringBuilder(); - boolean first = true; - for (String s : list) { - if (first) - first = false; - else - b.append("\r\n"+padLeft("", ' ', indent)); - b.append(s); - } - return b.toString(); - } - - - public static int countFilesInDirectory(String dirName) { - File dir = new File(dirName); - int i = 0; - for (File f : dir.listFiles()) - if (!f.isDirectory()) - i++; - return i; - } - - public static String makeId(String name) { - StringBuilder b = new StringBuilder(); - for (char ch : name.toCharArray()) { - if (ch >= 'a' && ch <= 'z') - b.append(ch); - else if (ch >= 'A' && ch <= 'Z') - b.append(ch); - else if (ch >= '0' && ch <= '9') - b.append(ch); - else if (ch == '-' || ch == '.') - b.append(ch); - } - return b.toString(); - } - - - - -} +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + */ +package org.hl7.fhir.utilities; + +import org.apache.commons.io.FileUtils; +import org.hl7.fhir.exceptions.FHIRException; + +import java.io.*; +import java.net.URLEncoder; +import java.nio.channels.FileChannel; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +public class Utilities { + +// private static final String TOKEN_REGEX = "^a-z[A-Za-z0-9]*$"; + + + private static final String OID_REGEX = "[0-2](\\.(0|[1-9]([0-9])*))*"; + + public static String URLEncode(String string) { + try { + return URLEncoder.encode(string, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new Error(e.getMessage()); + } + } + + public static String appendForwardSlash(String definitions) { + return definitions.endsWith("/") ? definitions : definitions+"/"; + } + + public static String appendPeriod(String s) { + if (Utilities.noString(s)) + return s; + s = s.trim(); + if (s.endsWith(".") || s.endsWith("?")) + return s; + return s+"."; + } + + public static String appendSlash(String definitions) { + return definitions.endsWith(File.separator) ? definitions : definitions+File.separator; + } + + public static String asCSV(List strings) { + StringBuilder s = new StringBuilder(); + boolean first = true; + for (String n : strings) { + if (!first) + s.append(","); + s.append(n); + first = false; + } + return s.toString(); + } + + public static String asHtmlBr(String prefix, List strings) { + StringBuilder s = new StringBuilder(); + boolean first = true; + for (String n : strings) { + if (!first) + s.append("
"); + s.append(prefix); + s.append(n); + first = false; + } + return s.toString(); + } + + public static String camelCase(String value) { + return new Inflector().camelCase(value.trim().replace(" ", "_"), false); + } + + public static String capitalize(String s) + { + if( s == null ) return null; + if( s.length() == 0 ) return s; + if( s.length() == 1 ) return s.toUpperCase(); + + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + + public static String changeFileExt(String name, String ext) { + if (name.lastIndexOf('.') > -1) + return name.substring(0, name.lastIndexOf('.')) + ext; + else + return name+ext; + } + + public static int charCount(String s, char c) { + int res = 0; + for (char ch : s.toCharArray()) + if (ch == c) + res++; + return res; + } + + public static boolean charInRange(char ch, char a, char z) { + return ch >= a && ch <= z; + } + + public static boolean charInSet(char value, char... array) { + for (int i : array) + if (value == i) + return true; + return false; + } + + public static boolean checkFile(String purpose, String dir, String file, List errors) + throws IOException + { + if (!new CSFile(dir+file).exists()) { + errors.add("Unable to find "+purpose+" file "+file+" in "+dir); + return false; + } else { + return true; + } + } + + public static boolean checkFolder(String dir, List errors) + throws IOException + { + if (!new CSFile(dir).exists()) { + errors.add("Unable to find directory "+dir); + return false; + } else { + return true; + } + } + + public static String cleanupTextString( String contents ) + { + if( contents == null || contents.trim().equals("") ) + return null; + else + return contents.trim(); + } + + public static void clearDirectory(String folder) throws IOException { + File dir = new File(folder); + if (dir.exists()) + FileUtils.cleanDirectory(dir); +// String[] files = new CSFile(folder).list(); +// if (files != null) { +// for (String f : files) { +// File fh = new CSFile(folder+File.separatorChar+f); +// if (fh.isDirectory()) +// clearDirectory(fh.getAbsolutePath()); +// fh.delete(); +// } +// } + } + + public static boolean compareIgnoreWhitespace(File f1, File f2) throws IOException { + InputStream in1 = null; + InputStream in2 = null; + try { + in1 = new BufferedInputStream(new FileInputStream(f1)); + in2 = new BufferedInputStream(new FileInputStream(f2)); + + int expectedByte = in1.read(); + while (expectedByte != -1) { + boolean w1 = isWhitespace(expectedByte); + if (w1) + while (isWhitespace(expectedByte)) + expectedByte = in1.read(); + int foundByte = in2.read(); + if (w1) { + if (!isWhitespace(foundByte)) + return false; + while (isWhitespace(foundByte)) + foundByte = in2.read(); + } + if (expectedByte != foundByte) + return false; + expectedByte = in1.read(); + } + if (in2.read() != -1) { + return false; + } + return true; + } finally { + if (in1 != null) { + try { + in1.close(); + } catch (IOException e) {} + } + if (in2 != null) { + try { + in2.close(); + } catch (IOException e) {} + } + } + } + + public static boolean compareIgnoreWhitespace(String fn1, String fn2) throws IOException { + return compareIgnoreWhitespace(new File(fn1), new File(fn2)); + } + + public static void copyDirectory(String sourceFolder, String destFolder, FileNotifier notifier) throws IOException, FHIRException { + CSFile src = new CSFile(sourceFolder); + if (!src.exists()) + throw new FHIRException("Folder " +sourceFolder+" not found"); + createDirectory(destFolder); + + String[] files = src.list(); + for (String f : files) { + if (new CSFile(sourceFolder+File.separator+f).isDirectory()) { + if (!f.startsWith(".")) // ignore .svn... + copyDirectory(sourceFolder+File.separator+f, destFolder+File.separator+f, notifier); + } else { + if (notifier != null) + notifier.copyFile(sourceFolder+File.separator+f, destFolder+File.separator+f); + copyFile(new CSFile(sourceFolder+File.separator+f), new CSFile(destFolder+File.separator+f)); + } + } + } + + public static void copyFile(String source, String dest) throws IOException { + copyFile(new File(source), new File(dest)); + } + + public static void copyFile(File sourceFile, File destFile) throws IOException { + if(!destFile.exists()) { + if (!new CSFile(destFile.getParent()).exists()) { + createDirectory(destFile.getParent()); + } + destFile.createNewFile(); + } + + FileChannel source = null; + FileChannel destination = null; + + try { + source = new FileInputStream(sourceFile).getChannel(); + destination = new FileOutputStream(destFile).getChannel(); + destination.transferFrom(source, 0, source.size()); + } + finally { + if(source != null) { + source.close(); + } + if(destination != null) { + destination.close(); + } + } + } + + public static void copyFileToDirectory(File source, File destDir) throws IOException { + copyFile(source, new File(path(destDir.getAbsolutePath(), source.getName()))); + } + + public static int countFilesInDirectory(String dirName) { + File dir = new File(dirName); + int i = 0; + for (File f : dir.listFiles()) + if (!f.isDirectory()) + i++; + return i; + } + + public static void createDirectory(String path) throws IOException{ + new CSFile(path).mkdirs(); + } + + public static File createTempFile(String prefix, String suffix) throws IOException { + // this allows use to eaily identify all our dtemp files and delete them, since delete on Exit doesn't really work. + File file = File.createTempFile("ohfu-"+prefix, suffix); + file.deleteOnExit(); + return file; + } + + public static void deleteAllFiles(String folder, String type) { + File src = new File(folder); + String[] files = src.list(); + for (String f : files) { + if (new File(folder+File.separator+f).isDirectory()) { + deleteAllFiles(folder+File.separator+f, type); + } else if (f.endsWith(type)) { + new File(folder+File.separator+f).delete(); + } + } + + } + + public static void deleteTempFiles() throws IOException { + File file = createTempFile("test", "test"); + String folder = getDirectoryForFile(file.getAbsolutePath()); + String[] list = new File(folder).list(new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.startsWith("ohfu-"); + } + }); + if (list != null) { + for (String n : list) { + new File(path(folder, n)).delete(); + } + } + } + + public static String encodeUri(String v) { + return v.replace(" ", "%20").replace("?", "%3F").replace("=", "%3D"); + } + + public static boolean equals(String one, String two) { + if (one == null && two == null) + return true; + if (one == null || two == null) + return false; + return one.equals(two); + } + + public static boolean equivalent(String l, String r) { + if (Utilities.noString(l) && Utilities.noString(r)) + return true; + if (Utilities.noString(l) || Utilities.noString(r)) + return false; + return l.toLowerCase().equals(r.toLowerCase()); + } + + public static boolean equivalentNumber(String l, String r) { + if (Utilities.noString(l) && Utilities.noString(r)) + return true; + if (Utilities.noString(l) || Utilities.noString(r)) + return false; + l = l.toLowerCase().trim(); + r = r.toLowerCase().trim(); // not that this should make any difference + return l.startsWith(r) || r.startsWith(l); + } + + public static String escapeJava(String doco) { + if (doco == null) + return ""; + + StringBuilder b = new StringBuilder(); + for (char c : doco.toCharArray()) { + if (c == '\r') + b.append("\\r"); + else if (c == '\n') + b.append("\\n"); + else if (c == '"') + b.append("\\\""); + else if (c == '\\') + b.append("\\\\"); + else + b.append(c); + } + return b.toString(); + } + + + +// public static void checkCase(String filename) { +// File f = new CSFile(filename); +// if (!f.getName().equals(filename)) +// throw new FHIRException("Filename ") +// +// } + + public static String escapeJson(String value) { + if (value == null) + return ""; + + StringBuilder b = new StringBuilder(); + for (char c : value.toCharArray()) { + if (c == '\r') + b.append("\\r"); + else if (c == '\n') + b.append("\\n"); + else if (c == '"') + b.append("\\\""); + else if (c == '\'') + b.append("\\'"); + else if (c == '\\') + b.append("\\\\"); + else + b.append(c); + } + return b.toString(); + } + + public static String escapeXml(String doco) { + if (doco == null) + return ""; + + StringBuilder b = new StringBuilder(); + for (char c : doco.toCharArray()) { + if (c == '<') + b.append("<"); + else if (c == '>') + b.append(">"); + else if (c == '&') + b.append("&"); + else if (c == '"') + b.append("""); + else + b.append(c); + } + return b.toString(); + } + + public static boolean existsInList(String value, String... array) { + if (value == null) + return false; + for (String s : array) + if (value.equals(s)) + return true; + return false; + } + + public static boolean existsInList(int value, int... array) { + for (int i : array) + if (value == i) + return true; + return false; + } + + public static boolean existsInListNC(String value, String... array) { + for (String s : array) + if (value.equalsIgnoreCase(s)) + return true; + return false; + } + + public static String fileTitle(String file) { + if (file == null) + return null; + String s = new File(file).getName(); + return s.indexOf(".") == -1? s : s.substring(0, s.indexOf(".")); + } + + public static String getDirectoryForFile(String filepath) { + File f = new File(filepath); + return f.getParent(); + } + + public static String getFileExtension(String fn) { + return fn.contains(".") ? fn.substring(fn.lastIndexOf(".")+1) : ""; + } + + public static String getFileNameForName(String name) { + return name.toLowerCase(); + } + + public static String humanize(String code) { + StringBuilder b = new StringBuilder(); + boolean lastBreak = true; + for (char c : code.toCharArray()) { + if (Character.isLetter(c)) { + if (lastBreak) + b.append(Character.toUpperCase(c)); + else { + if (Character.isUpperCase(c)) + b.append(" "); + b.append(c); + } + lastBreak = false; + } else { + b.append(" "); + lastBreak = true; + } + } + if (b.length() == 0) + return code; + else + return b.toString(); + } + + public static boolean isAbsoluteFileName(String source) { + if (isWindows()) + return (source.length() > 2 && source.charAt(1) == ':') || source.startsWith("\\\\"); + else + return source.startsWith("//"); + } + + public static boolean isAbsoluteUrl(String ref) { + return ref != null && ref.startsWith("http:") || ref.startsWith("https:") || ref.startsWith("urn:uuid:") || ref.startsWith("urn:oid:") ; + } + + private static boolean isAlphabetic(char c) { + return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')); + } + + public static boolean isAsciiChar(char ch) { + return ch >= ' ' && ch <= '~'; + } + + public static boolean isDecimal(String string) { + if (Utilities.noString(string)) + return false; + try { + float r = Float.parseFloat(string); + return r != r + 1; // just to suppress the hint + } catch (Exception e) { + return false; + } + } + + private static boolean isDigit(char c) { + return (c >= '0') && (c <= '9'); + } + + public static boolean isHex(String string) { + try { + int i = Integer.parseInt(string, 16); + return i != i+1; + } catch (Exception e) { + return false; + } + } + + public static boolean isInteger(String string) { + try { + int i = Integer.parseInt(string); + return i != i+1; + } catch (Exception e) { + return false; + } + } + + public static boolean isOid(String cc) { + return cc.matches(OID_REGEX) && cc.lastIndexOf('.') > 5; + } + + public static boolean isPlural(String word) { + word = word.toLowerCase(); + if ("restricts".equals(word) || "contains".equals(word) || "data".equals(word) || "specimen".equals(word) || "replaces".equals(word) || "addresses".equals(word) + || "supplementalData".equals(word) || "instantiates".equals(word)) + return false; + Inflector inf = new Inflector(); + return !inf.singularize(word).equals(word); + } + + public static boolean isToken(String tail) { + if (tail == null || tail.length() == 0) + return false; + boolean result = isAlphabetic(tail.charAt(0)); + for (int i = 1; i < tail.length(); i++) { + result = result && (isAlphabetic(tail.charAt(i)) || isDigit(tail.charAt(i)) || (tail.charAt(i) == '_') || (tail.charAt(i) == '[') || (tail.charAt(i) == ']')); + } + return result; + } + + public static boolean isURL(String s) { + boolean ok = s.matches("^http(s{0,1})://[a-zA-Z0-9_/\\-\\.]+\\.([A-Za-z/]{2,5})[a-zA-Z0-9_/\\&\\?\\=\\-\\.\\~\\%]*"); + return ok; + } + + public static boolean isWhitespace(String s) { + boolean ok = true; + for (int i = 0; i < s.length(); i++) + ok = ok && Character.isWhitespace(s.charAt(i)); + return ok; + + } + + private static boolean isWhitespace(int b) { + return b == 9 || b == 10 || b == 13 || b == 32; + } + + private static boolean isWindows() { + return System.getProperty("os.name").startsWith("Windows"); + } + + public static String makeId(String name) { + StringBuilder b = new StringBuilder(); + for (char ch : name.toCharArray()) { + if (ch >= 'a' && ch <= 'z') + b.append(ch); + else if (ch >= 'A' && ch <= 'Z') + b.append(ch); + else if (ch >= '0' && ch <= '9') + b.append(ch); + else if (ch == '-' || ch == '.') + b.append(ch); + } + return b.toString(); + } + + public static String makeUuidUrn() { + return "urn:uuid:"+UUID.randomUUID().toString().toLowerCase(); + } + + public static String nmtokenize(String cs) { + if (cs == null) + return ""; + StringBuilder s = new StringBuilder(); + for (int i = 0; i < cs.length(); i++) { + char c = cs.charAt(i); + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_') + s.append(c); + else if (c != ' ') + s.append("."+Integer.toString(c)); + } + return s.toString(); + } + + public static boolean noString(String v) { + return v == null || v.equals(""); + } + + public static String normaliseEolns(String value) { + return value.replace("\r\n", "\r").replace("\n", "\r").replace("\r", "\r\n"); + } + + public static String normalize(String s) { + if (noString(s)) + return null; + StringBuilder b = new StringBuilder(); + boolean isWhitespace = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (!Character.isWhitespace(c)) { + b.append(Character.toLowerCase(c)); + isWhitespace = false; + } else if (!isWhitespace) { + b.append(' '); + isWhitespace = true; + } + } + return b.toString().trim(); + } + + public static String normalizeSameCase(String s) { + if (noString(s)) + return null; + StringBuilder b = new StringBuilder(); + boolean isWhitespace = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (!Character.isWhitespace(c)) { + b.append(c); + isWhitespace = false; + } else if (!isWhitespace) { + b.append(' '); + isWhitespace = true; + } + } + return b.toString().trim(); + } + + public static String oidRoot(String id) { + if (id == null || !id.contains(".")) + return id; + return id.substring(0, id.indexOf(".")); + } + + public static String oidTail(String id) { + if (id == null || !id.contains(".")) + return id; + return id.substring(id.lastIndexOf(".")+1); + } + + public static String padLeft(String src, char c, int len) { + StringBuilder s = new StringBuilder(); + for (int i = 0; i < len - src.length(); i++) + s.append(c); + s.append(src); + return s.toString(); + } + + public static String padRight(String src, char c, int len) { + StringBuilder s = new StringBuilder(); + s.append(src); + for (int i = 0; i < len - src.length(); i++) + s.append(c); + return s.toString(); + } + + public static String path(String... args) throws IOException { + StringBuilder s = new StringBuilder(); + boolean d = false; + boolean first = true; + for(String arg: args) { + if (first && arg == null) + continue; + first = false; + if (!d) + d = !noString(arg); + else if (!s.toString().endsWith(File.separator)) + s.append(File.separator); + String a = arg; + a = a.replace("\\", File.separator); + a = a.replace("/", File.separator); + if (s.length() > 0 && a.startsWith(File.separator)) + a = a.substring(File.separator.length()); + + while (a.startsWith(".."+File.separator)) { + String p = s.toString().substring(0, s.length()-1); + if (!p.contains(File.separator)) { + s = new StringBuilder(); + } else { + s = new StringBuilder(p.substring(0, p.lastIndexOf(File.separator))+File.separator); + } + a = a.substring(3); + } + if ("..".equals(a)) { + int i = s.substring(0, s.length()-1).lastIndexOf(File.separator); + s = new StringBuilder(s.substring(0, i+1)); + } else + s.append(a); + } + return s.toString(); + } + + public static String pathURL(String... args) { + StringBuilder s = new StringBuilder(); + boolean d = false; + for(String arg: args) { + if (!d) + d = !noString(arg); + else if (!s.toString().endsWith("/")) + s.append("/"); + s.append(arg); + } + return s.toString(); + } + + public static String pluralize(String word, int count) { + if (count == 1) + return word; + Inflector inf = new Inflector(); + return inf.pluralize(word); + } + + /** + * Returns the plural form of the word in the string. + * + * Examples: + * + *
+     *   inflector.pluralize("post")               #=> "posts"
+     *   inflector.pluralize("octopus")            #=> "octopi"
+     *   inflector.pluralize("sheep")              #=> "sheep"
+     *   inflector.pluralize("words")              #=> "words"
+     *   inflector.pluralize("the blue mailman")   #=> "the blue mailmen"
+     *   inflector.pluralize("CamelOctopus")       #=> "CamelOctopi"
+     * 
+ * + * + * + * Note that if the {@link Object#toString()} is called on the supplied object, so this method works for non-strings, too. + * + * + * @param word the word that is to be pluralized. + * @return the pluralized form of the word, or the word itself if it could not be pluralized + * @see #singularize(Object) + */ + public static String pluralizeMe( String word ) { + Inflector inf = new Inflector(); + return inf.pluralize(word); + } + + public static String removePeriod(String s) { + if (Utilities.noString(s)) + return s; + if (s.endsWith(".")) + return s.substring(0, s.length()-1); + return s; + } + + public static String[] splitByCamelCase(String name) { + List parts = new ArrayList(); + StringBuilder b = new StringBuilder(); + for (int i = 0; i < name.length(); i++) { + if (i > 0 && Character.isUpperCase(name.charAt(i))) { + parts.add(b.toString()); + b = new StringBuilder(); + } + b.append(Character.toLowerCase(name.charAt(i))); + } + parts.add(b.toString()); + return parts.toArray(new String[] {} ); + } + + public static String splitLineForLength(String line, int prefixLength, int indent, int allowedLength) { + List list = new ArrayList(); + while (prefixLength + line.length() > allowedLength) { + int i = allowedLength - (list.size() == 0 ? prefixLength : indent); + while (i > 0 && line.charAt(i) != ' ') + i--; + if (i == 0) + break; + list.add(line.substring(0, i)); + line = line.substring(i+1); + } + list.add(line); + StringBuilder b = new StringBuilder(); + boolean first = true; + for (String s : list) { + if (first) + first = false; + else + b.append("\r\n"+padLeft("", ' ', indent)); + b.append(s); + } + return b.toString(); + } + + public static String stripBOM(String string) { + return string.replace("\uFEFF", ""); + } + + public static String systemEol() + { + return System.getProperty("line.separator"); + } + + public static String titleize(String s) { + StringBuilder b = new StringBuilder(); + boolean up = true; + for (char c : s.toCharArray()) { + if (up) + b.append(Character.toUpperCase(c)); + else + b.append(c); + up = c == ' '; + } + return b.toString(); + } + + public static String unCamelCase(String name) { + StringBuilder b = new StringBuilder(); + boolean first = true; + for (char c : name.toCharArray()) { + if (Character.isUpperCase(c)) { + if (!first) + b.append(" "); + b.append(Character.toLowerCase(c)); + } else + b.append(c); + first = false; + } + return b.toString(); + } + + public static String uncapitalize(String s) { + if( s == null ) return null; + if( s.length() == 0 ) return s; + if( s.length() == 1 ) return s.toLowerCase(); + + return s.substring(0, 1).toLowerCase() + s.substring(1); + } + + public static String unescapeXml(String xml) throws FHIRException { + if (xml == null) + return null; + + StringBuilder b = new StringBuilder(); + int i = 0; + while (i < xml.length()) { + if (xml.charAt(i) == '&') { + StringBuilder e = new StringBuilder(); + i++; + while (xml.charAt(i) != ';') { + e.append(xml.charAt(i)); + i++; + } + if (e.toString().equals("lt")) + b.append("<"); + else if (e.toString().equals("gt")) + b.append(">"); + else if (e.toString().equals("amp")) + b.append("&"); + else if (e.toString().equals("quot")) + b.append("\""); + else if (e.toString().equals("mu")) + b.append((char)956); + else + throw new FHIRException("unknown XML entity \""+e.toString()+"\""); + } else + b.append(xml.charAt(i)); + i++; + } + return b.toString(); + } + + + + +} diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/ResourceDef.java b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/tests/XhtmlParserTests.java similarity index 68% rename from hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/ResourceDef.java rename to hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/tests/XhtmlParserTests.java index 855a27fad33..b11a25767a1 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/ResourceDef.java +++ b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/tests/XhtmlParserTests.java @@ -1,59 +1,57 @@ -package org.hl7.fhir.r4.model.annotations; - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Class annotation which indicates a resource definition class - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(value= {ElementType.TYPE}) -public @interface ResourceDef { - - /** - * The name of the resource (e.g. "Patient" or "DiagnosticReport") - */ - String name(); - - /** - * Not currently used - */ - String id() default ""; - - /** - * The URL indicating the profile for this resource definition, if known - */ - String profile() default ""; - -} +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.tests; + +import org.hl7.fhir.utilities.xhtml.XhtmlParser; + +// todo: I should use JUnit - in a hurry, do it later + +public class XhtmlParserTests { + + /** + * @param args + */ + public static void main(String[] args) { + new XhtmlParserTests().runTests(); + + } + + public final static String IMPROPER_AMPERSAND = ""; + + public void runTests() { + try { + new XhtmlParser().parse(IMPROPER_AMPERSAND, "html"); + System.out.println("ok"); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } +} diff --git a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationMessage.java b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationMessage.java index 0f7834f3aa6..b13ca286302 100644 --- a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationMessage.java +++ b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationMessage.java @@ -466,10 +466,6 @@ public class ValidationMessage implements Comparator, Compara // nothing } - public ValidationMessage(Source source, IssueType type, String message, IssueSeverity level) { - this(source, type, null, message, level); -} - public ValidationMessage(Source source, IssueType type, String path, String message, IssueSeverity level) { super(); this.line = -1; @@ -554,8 +550,7 @@ public class ValidationMessage implements Comparator, Compara // throw new Error("A type must be provided"); // } - -private IssueSeverity determineLevel(String path) { + private IssueSeverity determineLevel(String path) { if (isGrandfathered(path)) return IssueSeverity.WARNING; else diff --git a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java index 5f34c038771..f0944cef7fd 100644 --- a/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java +++ b/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java @@ -840,7 +840,9 @@ private boolean elementIsOk(String name) throws FHIRFormatError { else if (c.equals("amp")) s.append('&'); else if (c.equals("rsquo")) - s.append((char) 8217); + s.append((char) 8217); // right single quotation, U+2019 ISOnum + //s.append((char)0x60); // right single quote + //s.append('’'); else if (c.equals("gt")) s.append('>'); else if (c.equals("lt")) diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Block.java b/hapi-fhir-utilities/src/test/java/org/hl7/fhir/utilities/tests/XhtmlParserTests.java similarity index 68% rename from hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Block.java rename to hapi-fhir-utilities/src/test/java/org/hl7/fhir/utilities/tests/XhtmlParserTests.java index 5ec2a0ca28b..b11a25767a1 100644 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/annotations/Block.java +++ b/hapi-fhir-utilities/src/test/java/org/hl7/fhir/utilities/tests/XhtmlParserTests.java @@ -1,55 +1,57 @@ -package org.hl7.fhir.r4.model.annotations; - -/* -Copyright (c) 2011+, HL7, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Class annotation used to indicate a class which is a "block"/"component" type. A block - * is a nested group of fields within a resource definition and can contain other blocks as - * well as data types. - *

- * An example of a block would be Patient.contact - *

- */ -@Retention(RetentionPolicy.RUNTIME) -@Target(value= {ElementType.TYPE}) -public @interface Block { - - /** - * @deprecated Do not use, will be removed - */ - @Deprecated - String name() default ""; - -} +/* +Copyright (c) 2011+, HL7, Inc +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ +package org.hl7.fhir.utilities.tests; + +import org.hl7.fhir.utilities.xhtml.XhtmlParser; + +// todo: I should use JUnit - in a hurry, do it later + +public class XhtmlParserTests { + + /** + * @param args + */ + public static void main(String[] args) { + new XhtmlParserTests().runTests(); + + } + + public final static String IMPROPER_AMPERSAND = ""; + + public void runTests() { + try { + new XhtmlParser().parse(IMPROPER_AMPERSAND, "html"); + System.out.println("ok"); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } +} diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 4877a8d94aa..2f52df1e482 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index ba8e8538950..1508e6ef809 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/valueset/valuesets.xml b/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/valueset/valuesets.xml index 9c8877b9b5f..c759424d76a 100644 --- a/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/valueset/valuesets.xml +++ b/hapi-fhir-validation-resources-dstu2/src/main/resources/org/hl7/fhir/instance/model/valueset/valuesets.xml @@ -17,10 +17,10 @@ for this example, we use a real URI, since this example does have a canonical address at which it's posted. Alternatively, We could have used an OID, or a UUID. - Mote that this isn't the identifier for the LOINC codes themeselves - they belong to LOINC, and +Mote that this isn't the identifier for the LOINC codes themeselves - they belong to LOINC, and it has it's own identifier. This is the identifier for this set of codes, and that doesn't change the codes. - --> +--> @@ -29,8 +29,8 @@ +arbitrary - whatever is here is what people use to refer to the version. +Could also be a UUID too --> @@ -50,15 +50,15 @@ we could specify it implicitly by specifying the locked date for the value set So we show this example here, but it's not actually necessary since we also - have LOINC version. Note: if you do what this example does, and specify both, +have LOINC version. Note: if you do what this example does, and specify both, you better get it right, and specify the current version of LOINC at the time - --> +--> +one code system, or include codes with different modes. we don't, in this case --> @@ -123,8 +123,8 @@ +arbitrary - whatever is here is what people use to refer to the version. +Could also be a UUID too --> @@ -160,8 +160,8 @@ are redefined --> +it can be the cause of operational or clinical safety problems. +So FHIR requires that it always be specified. --> +arbitrary - whatever is here is what people use to refer to the version. +Could also be a UUID too --> @@ -248,7 +248,7 @@ @@ -256,7 +256,7 @@ +all the metadata. But this one, intended for persistence, does --> @@ -327,7 +327,7 @@ +--> @@ -24230,41 +24230,41 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --> @@ -56844,7 +56844,7 @@ - --> +--> @@ -57010,9 +57010,9 @@ + + +
--> @@ -78688,7 +78688,7 @@ +--> @@ -95888,9 +95888,9 @@ + + +--> @@ -96034,7 +96034,7 @@ +--> @@ -97136,9 +97136,9 @@ + + +--> diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index c33b9f11229..bc35193b147 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index 820bb57a160..3d6f7444434 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-others.xml b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-others.xml index b6acc4350ed..cfa2eb69ed0 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-others.xml +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-others.xml @@ -1,7 +1,7 @@ - + @@ -4547,7 +4547,7 @@ - + @@ -7974,9 +7974,9 @@
- + - + @@ -8021,9 +8021,9 @@ - + - + @@ -8039,6 +8039,14 @@ + + + + + + + + @@ -8299,7 +8307,7 @@ - + @@ -10591,7 +10599,7 @@ - + @@ -11632,6 +11640,12 @@ + + + + + + @@ -12282,182 +12296,11 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + @@ -12491,7 +12334,7 @@ - + @@ -12521,114 +12364,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -12662,7 +12402,7 @@ - + @@ -12692,74 +12432,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -12794,6 +12466,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13130,7 +12973,7 @@ - + @@ -13146,6 +12989,9 @@ + + + @@ -13264,6 +13110,9 @@ + + + @@ -14178,6 +14027,12 @@ + + + + + + @@ -14327,72 +14182,11 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + @@ -14404,7 +14198,7 @@ - + @@ -14412,48 +14206,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -14465,7 +14222,7 @@ - + @@ -14473,30 +14230,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -14509,6 +14242,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -15157,7 +14951,7 @@ - + @@ -18058,7 +17852,7 @@ - + @@ -20702,7 +20496,7 @@ - + @@ -23331,7 +23125,7 @@ - + @@ -25960,7 +25754,7 @@ - + @@ -28604,7 +28398,7 @@ - + @@ -31248,7 +31042,7 @@ - + @@ -33892,7 +33686,7 @@ - + @@ -36536,7 +36330,7 @@ - + @@ -39165,7 +38959,7 @@ - + @@ -41794,7 +41588,7 @@ - + @@ -46261,7 +46055,7 @@ - + @@ -49897,7 +49691,7 @@ - + @@ -49913,6 +49707,9 @@ + + + @@ -50647,7 +50444,7 @@ - + @@ -51153,6 +50950,12 @@ + + + + + + @@ -52110,7 +51913,7 @@ - + @@ -52126,6 +51929,9 @@ + + + @@ -53135,6 +52941,12 @@ + + + + + + @@ -54037,7 +53849,7 @@ - + @@ -54053,6 +53865,9 @@ + + + @@ -54561,7 +54376,7 @@ - + @@ -55093,6 +54908,12 @@ + + + + + + @@ -55995,7 +55816,7 @@ - + @@ -56011,6 +55832,9 @@ + + + @@ -56544,7 +56368,7 @@ - + @@ -57050,6 +56874,12 @@ + + + + + + @@ -57687,6 +57517,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -58528,6 +58392,18 @@ + + + + + + + + + + + + @@ -60357,6 +60233,10 @@ + + + + @@ -60626,6 +60506,10 @@ + + + + @@ -61688,13 +61572,10 @@ - - - - - + + - + @@ -61703,10 +61584,6 @@ - - - - @@ -61796,13 +61673,10 @@ - - - - - + + - + @@ -61811,10 +61685,6 @@ - - - - @@ -65103,6 +64973,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -65371,6 +65273,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -65392,7 +65339,7 @@ - + @@ -65400,7 +65347,7 @@ - + @@ -65431,6 +65378,10 @@ + + + + @@ -66557,6 +66508,7 @@ + @@ -66713,19 +66665,22 @@ - - + + - - + + - + + + + @@ -67186,21 +67141,24 @@ - - + + - + + + + @@ -67319,7 +67277,7 @@ - + @@ -67361,7 +67319,7 @@ - + @@ -67500,11 +67458,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -67515,12 +67512,11 @@ - - + @@ -67528,16 +67524,12 @@ - + - - - - @@ -67557,6 +67549,10 @@ + + + + @@ -67602,6 +67598,10 @@ + + + + @@ -67624,39 +67624,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -67883,8 +67850,8 @@ - - + + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-resources.xml b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-resources.xml index 914f09d3919..0fab29ab100 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-resources.xml +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-resources.xml @@ -1,7 +1,7 @@ - + @@ -10,14 +10,14 @@ - + - + - + @@ -1663,6 +1663,49 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3770,12 +3813,12 @@ + - + - @@ -3789,6 +3832,7 @@ + @@ -4449,9 +4493,9 @@ - + + - @@ -4461,30 +4505,30 @@ + + + + + + + + + + + + - - - - - - - - - - - - @@ -4576,22 +4620,34 @@ + - + + + + + + + + + + + + @@ -4682,18 +4738,6 @@ - - - - - - - - - - - - @@ -4712,6 +4756,12 @@ + + + + + + @@ -5679,6 +5729,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8512,6 +8665,7 @@ + @@ -8586,6 +8740,12 @@ + + + + + + @@ -8827,7 +8987,7 @@ - + @@ -9602,7 +9762,7 @@ - + @@ -9774,11 +9934,11 @@ - + + - @@ -9804,6 +9964,7 @@ + @@ -10020,13 +10181,13 @@ + - + - @@ -10065,6 +10226,7 @@ + @@ -10504,7 +10666,6 @@ - @@ -10869,14 +11030,14 @@ + - + - @@ -10904,6 +11065,7 @@ + @@ -11090,6 +11252,14 @@ + + + + + + + + @@ -11718,6 +11888,12 @@ + + + + + + @@ -11736,18 +11912,6 @@ - - - - - - - - - - - - @@ -11766,6 +11930,12 @@ + + + + + + @@ -12061,6 +12231,7 @@ + @@ -12092,9 +12263,9 @@ - + - + @@ -12102,6 +12273,7 @@ + @@ -12279,6 +12451,12 @@ + + + + + + @@ -13299,6 +13477,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14607,6 +14846,12 @@ + + + + + + @@ -14779,14 +15024,14 @@ - + - + - + @@ -14835,13 +15080,13 @@ - + - + @@ -14898,6 +15143,9 @@ + + + @@ -14981,12 +15229,12 @@ - + - + @@ -15012,6 +15260,9 @@ + + + @@ -15207,6 +15458,9 @@ + + + @@ -15250,13 +15504,13 @@ - + - + @@ -15309,6 +15563,9 @@ + + + @@ -15383,6 +15640,7 @@ + @@ -15413,6 +15671,9 @@ + + + @@ -15599,6 +15860,9 @@ + + + @@ -15642,13 +15906,13 @@ - + - + @@ -15718,6 +15982,9 @@ + + + @@ -15812,13 +16079,12 @@ - + - @@ -15848,6 +16114,9 @@ + + + @@ -16069,6 +16338,9 @@ + + + @@ -16114,13 +16386,13 @@ - + - + @@ -16183,6 +16455,9 @@ + + + @@ -16270,13 +16545,13 @@ - + - + @@ -16309,6 +16584,9 @@ + + + @@ -16529,6 +16807,9 @@ + + + @@ -16575,13 +16856,13 @@ - + - + @@ -16641,6 +16922,9 @@ + + + @@ -16719,11 +17003,11 @@ - + - + @@ -16750,6 +17034,9 @@ + + + @@ -16942,6 +17229,9 @@ + + + @@ -16985,13 +17275,13 @@ - + - + @@ -17111,13 +17401,13 @@ - + - + @@ -17153,13 +17443,13 @@ - + - + @@ -17235,13 +17525,13 @@ - + - + @@ -17301,13 +17591,13 @@ - + - + @@ -17352,19 +17642,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -17538,13 +17877,13 @@ - + - + @@ -17745,13 +18084,13 @@ - + - + @@ -17834,13 +18173,13 @@ - + - + @@ -17876,13 +18215,13 @@ - + - + @@ -17941,13 +18280,13 @@ - + - + @@ -18139,13 +18478,13 @@ - + - + @@ -18181,13 +18520,13 @@ - + - + @@ -18231,13 +18570,13 @@ - + - + @@ -18281,13 +18620,13 @@ - + - + @@ -18339,13 +18678,13 @@ - + - + @@ -18446,13 +18785,13 @@ - + - + @@ -18512,13 +18851,13 @@ - + - + @@ -18530,7 +18869,7 @@ - + @@ -18562,13 +18901,13 @@ - + - + @@ -18684,13 +19023,13 @@ - + - + @@ -18742,13 +19081,13 @@ - + - + @@ -18808,13 +19147,13 @@ - + - + @@ -18934,13 +19273,13 @@ - + - + @@ -18976,13 +19315,13 @@ - + - + @@ -19077,13 +19416,13 @@ - + - + @@ -19170,13 +19509,13 @@ - + - + @@ -19263,13 +19602,13 @@ - + - + @@ -19305,13 +19644,13 @@ - + - + @@ -19355,13 +19694,13 @@ - + - + @@ -19405,13 +19744,13 @@ - + - + @@ -19477,13 +19816,13 @@ - + - + @@ -19527,13 +19866,13 @@ - + - + @@ -19716,13 +20055,13 @@ - + - + @@ -19791,13 +20130,13 @@ - + - + @@ -19849,13 +20188,13 @@ - + - + @@ -20019,13 +20358,13 @@ - + - + @@ -20172,7 +20511,7 @@ - + @@ -20183,7 +20522,7 @@ - + @@ -20372,7 +20711,7 @@ - + @@ -20383,7 +20722,7 @@ - + @@ -21517,7 +21856,7 @@ - + @@ -21528,7 +21867,7 @@ - + @@ -23728,7 +24067,7 @@ - + @@ -23739,7 +24078,7 @@ - + @@ -24105,7 +24444,7 @@ - + @@ -24714,7 +25053,7 @@ - + @@ -25061,7 +25400,7 @@ - + @@ -25072,7 +25411,7 @@ - + @@ -26621,7 +26960,7 @@ - + @@ -26632,7 +26971,7 @@ - + @@ -28243,7 +28582,7 @@ - + @@ -28254,7 +28593,7 @@ - + @@ -28982,7 +29321,7 @@ - + @@ -28993,7 +29332,7 @@ - + @@ -29380,6 +29719,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -29620,6 +29986,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -29635,7 +30041,7 @@ - + @@ -29643,7 +30049,7 @@ - + @@ -29669,6 +30075,10 @@ + + + + @@ -30654,6 +31064,7 @@ + @@ -30795,14 +31206,17 @@ - - + + - - + + + + + @@ -30947,6 +31361,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -31112,6 +31553,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -31127,7 +31608,7 @@ - + @@ -31135,7 +31616,7 @@ - + @@ -31161,6 +31642,10 @@ + + + + @@ -31921,6 +32406,7 @@ + @@ -31987,14 +32473,17 @@ - - + + - - + + + + + @@ -32021,7 +32510,7 @@ - + @@ -32032,7 +32521,7 @@ - + @@ -32571,7 +33060,7 @@ - + @@ -32582,7 +33071,7 @@ - + @@ -32838,7 +33327,7 @@ - + @@ -32849,7 +33338,7 @@ - + @@ -33579,7 +34068,7 @@ - + @@ -33590,7 +34079,7 @@ - + @@ -34951,7 +35440,7 @@ - + @@ -34962,7 +35451,7 @@ - + @@ -39188,7 +39677,7 @@ - + @@ -39199,7 +39688,7 @@ - + @@ -40232,30 +40721,26 @@ - - - - + + + + - + - + - - + + - + - - - - @@ -41285,30 +41770,26 @@ - - - - + + + + - + - + - - + + - + - - - - @@ -41719,7 +42200,7 @@ - + @@ -41730,7 +42211,7 @@ - + @@ -42750,13 +43231,835 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -42767,7 +44070,7 @@ - + @@ -44446,7 +45749,7 @@ - + @@ -44457,7 +45760,7 @@ - + @@ -44785,7 +46088,7 @@ - + @@ -46148,6 +47451,25 @@ + + + + + + + + + + + + + + + + + + + @@ -46306,7 +47628,7 @@ - + @@ -47343,7 +48665,7 @@ - + @@ -48181,6 +49503,25 @@ + + + + + + + + + + + + + + + + + + + @@ -48264,7 +49605,7 @@ - + @@ -49007,7 +50348,7 @@ - + @@ -49018,7 +50359,7 @@ - + @@ -49446,17 +50787,17 @@ - + - + - + @@ -50683,7 +52024,7 @@ - + @@ -51094,17 +52435,17 @@ - + - + - + @@ -51731,7 +53072,7 @@ - + @@ -51903,7 +53244,7 @@ - + @@ -51914,7 +53255,7 @@ - + @@ -53302,7 +54643,7 @@ - + @@ -53313,7 +54654,7 @@ - + @@ -55343,7 +56684,7 @@ - + @@ -55354,7 +56695,7 @@ - + @@ -56764,7 +58105,7 @@ - + @@ -56775,7 +58116,7 @@ - + @@ -58388,7 +59729,7 @@ - + @@ -58399,7 +59740,7 @@ - + @@ -59376,7 +60717,7 @@ - + @@ -59387,7 +60728,7 @@ - + @@ -59876,6 +61217,10 @@ + + + + @@ -60115,6 +61460,10 @@ + + + + @@ -61026,6 +62375,10 @@ + + + + @@ -61190,6 +62543,10 @@ + + + + @@ -61647,7 +63004,7 @@ - + @@ -61658,7 +63015,7 @@ - + @@ -63538,7 +64895,7 @@ - + @@ -63549,7 +64906,7 @@ - + @@ -65431,7 +66788,7 @@ - + @@ -65442,7 +66799,7 @@ - + @@ -65453,7 +66810,7 @@ - + @@ -66095,16 +67452,26 @@ - - + + - + + + + + + + + + + + @@ -66233,7 +67600,7 @@ - + @@ -66248,13 +67615,6 @@ - - - - - - - @@ -66527,8 +67887,8 @@ - - + + @@ -66553,7 +67913,7 @@ - + @@ -67086,16 +68446,26 @@ - - + + - + + + + + + + + + + + @@ -67149,20 +68519,13 @@ - + - - - - - - - @@ -67293,8 +68656,8 @@ - - + + @@ -67319,7 +68682,7 @@ - + @@ -67463,7 +68826,7 @@ - + @@ -67474,7 +68837,7 @@ - + @@ -71073,7 +72436,7 @@ - + @@ -71084,7 +72447,7 @@ - + @@ -72770,7 +74133,7 @@ - + @@ -72781,7 +74144,7 @@ - + @@ -73876,7 +75239,7 @@ - + @@ -73887,7 +75250,7 @@ - + @@ -74736,7 +76099,7 @@ - + @@ -75270,7 +76633,7 @@ - + @@ -75290,7 +76653,7 @@ - + @@ -75301,7 +76664,7 @@ - + @@ -75561,10 +76924,10 @@ - - - - + + + + @@ -75859,6 +77222,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -75875,10 +77375,10 @@ - - - - + + + + @@ -76098,6 +77598,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -76108,7 +77670,7 @@ - + @@ -76119,7 +77681,7 @@ - + @@ -76379,10 +77941,11 @@ - - - - + + + + + @@ -76697,10 +78260,11 @@ - - - - + + + + + @@ -76934,7 +78498,7 @@ - + @@ -76945,7 +78509,7 @@ - + @@ -78847,7 +80411,7 @@ - + @@ -78858,7 +80422,7 @@ - + @@ -79621,7 +81185,7 @@ - + @@ -79632,7 +81196,7 @@ - + @@ -81236,7 +82800,7 @@ - + @@ -81247,7 +82811,7 @@ - + @@ -81620,7 +83184,7 @@ - + @@ -81685,7 +83249,6 @@ - @@ -81699,17 +83262,141 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -81735,10 +83422,6 @@ - - - - @@ -81755,6 +83438,10 @@ + + + + @@ -81763,7 +83450,6 @@ - @@ -81786,7 +83472,6 @@ - @@ -81819,109 +83504,16 @@ - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -81949,7 +83541,6 @@ - @@ -82032,7 +83623,6 @@ - @@ -82045,7 +83635,6 @@ - @@ -82166,7 +83755,7 @@ - + @@ -82231,7 +83820,6 @@ - @@ -82245,17 +83833,66 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -82281,10 +83918,6 @@ - - - - @@ -82301,6 +83934,10 @@ + + + + @@ -82309,7 +83946,6 @@ - @@ -82332,7 +83968,6 @@ - @@ -82365,34 +84000,16 @@ - - + + + + - - - - - - - - - - - - - - - - - - - - @@ -82412,7 +84029,6 @@ - @@ -82428,7 +84044,6 @@ - @@ -82441,7 +84056,6 @@ - @@ -82453,7 +84067,7 @@ - + @@ -82464,7 +84078,7 @@ - + @@ -82827,7 +84441,7 @@ - + @@ -82873,7 +84487,7 @@ - + @@ -82987,12 +84601,12 @@ + - @@ -83001,21 +84615,17 @@ - - - - - - + + - + @@ -83027,24 +84637,152 @@ - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -83070,14 +84808,6 @@ - - - - - - - - @@ -83094,7 +84824,6 @@ - @@ -83116,14 +84845,13 @@ - + - @@ -83578,7 +85306,6 @@ - @@ -83598,7 +85325,6 @@ - @@ -83646,7 +85372,6 @@ - @@ -83677,7 +85402,6 @@ - @@ -83707,7 +85431,6 @@ - @@ -83735,7 +85458,6 @@ - @@ -83822,7 +85544,6 @@ - @@ -83839,7 +85560,6 @@ - @@ -83954,7 +85674,7 @@ - + @@ -84000,7 +85720,7 @@ - + @@ -84114,12 +85834,12 @@ + - @@ -84128,21 +85848,17 @@ - - - - - - + + - + @@ -84154,24 +85870,77 @@ - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -84197,14 +85966,6 @@ - - - - - - - - @@ -84221,7 +85982,6 @@ - @@ -84243,14 +86003,13 @@ - + - @@ -84480,7 +86239,6 @@ - @@ -84500,7 +86258,6 @@ - @@ -84548,7 +86305,6 @@ - @@ -84579,7 +86335,6 @@ - @@ -84609,7 +86364,6 @@ - @@ -84629,7 +86383,6 @@ - @@ -84649,7 +86402,6 @@ - @@ -84666,7 +86418,6 @@ - @@ -84682,7 +86433,7 @@ - + @@ -84693,7 +86444,7 @@ - + @@ -85073,7 +86824,7 @@ - + @@ -85084,7 +86835,7 @@ - + @@ -85970,7 +87721,7 @@ - + @@ -85981,7 +87732,7 @@ - + @@ -86383,7 +88134,7 @@ - + @@ -87185,7 +88936,7 @@ - + @@ -87549,7 +89300,7 @@ - + @@ -87560,7 +89311,7 @@ - + @@ -90275,7 +92026,7 @@ - + @@ -90286,7 +92037,7 @@ - + @@ -91030,7 +92781,7 @@ - + @@ -91041,7 +92792,7 @@ - + @@ -91564,7 +93315,7 @@ - + @@ -91575,7 +93326,7 @@ - + @@ -91892,7 +93643,7 @@ - + @@ -92037,7 +93788,7 @@ - + @@ -92124,7 +93875,7 @@ - + @@ -92135,7 +93886,7 @@ - + @@ -93097,7 +94848,7 @@ - + @@ -93108,7 +94859,7 @@ - + @@ -93815,8 +95566,8 @@ - - + + @@ -94270,10 +96021,2375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -94286,7 +98402,7 @@ - + @@ -94297,7 +98413,7 @@ - + @@ -96331,7 +100447,7 @@ - + @@ -96342,7 +100458,7 @@ - + @@ -96664,7 +100780,7 @@ - + @@ -96894,13 +101010,13 @@ - + - + @@ -98160,7 +102276,7 @@ - + @@ -98890,27 +103006,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -99208,26 +103303,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -99949,7 +104024,7 @@ - + @@ -100430,7 +104505,7 @@ - + @@ -100660,13 +104735,13 @@ - + - + @@ -101326,7 +105401,7 @@ - + @@ -101831,27 +105906,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -102074,26 +106128,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -102590,7 +106624,7 @@ - + @@ -102863,7 +106897,7 @@ - + @@ -102874,7 +106908,7 @@ - + @@ -104287,7 +108321,7 @@ - + @@ -104298,7 +108332,7 @@ - + @@ -104616,8 +108650,9 @@ + - + @@ -104857,8 +108892,9 @@ + - + @@ -105034,7 +109070,7 @@ - + @@ -105045,7 +109081,7 @@ - + @@ -106305,7 +110341,7 @@ - + @@ -106316,7 +110352,7 @@ - + @@ -106916,9 +110952,9 @@ - - - + + + @@ -106968,7 +111004,7 @@ - + @@ -107072,6 +111108,17 @@ + + + + + + + + + + + @@ -107167,6 +111214,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -107507,9 +111575,9 @@ - - - + + + @@ -107559,7 +111627,7 @@ - + @@ -107588,6 +111656,17 @@ + + + + + + + + + + + @@ -107608,6 +111687,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -107686,7 +111786,7 @@ - + @@ -107697,7 +111797,7 @@ - + @@ -108783,7 +112883,7 @@ - + @@ -108794,7 +112894,7 @@ - + @@ -109488,7 +113588,7 @@ - + @@ -109499,7 +113599,7 @@ - + @@ -111021,7 +115121,7 @@ - + @@ -111032,7 +115132,7 @@ - + @@ -112308,7 +116408,7 @@ - + @@ -112319,7 +116419,7 @@ - + @@ -114452,7 +118552,7 @@ - + @@ -114463,7 +118563,7 @@ - + @@ -116784,7 +120884,7 @@ - + @@ -116795,7 +120895,7 @@ - + @@ -118089,7 +122189,7 @@ - + @@ -118100,7 +122200,7 @@ - + @@ -119899,7 +123999,7 @@ - + @@ -119910,7 +124010,7 @@ - + @@ -121247,7 +125347,7 @@ - + @@ -121258,7 +125358,7 @@ - + @@ -121801,7 +125901,7 @@ - + @@ -121812,7 +125912,7 @@ - + @@ -123001,7 +127101,7 @@ - + @@ -123012,7 +127112,7 @@ - + @@ -124087,7 +128187,7 @@ - + @@ -124098,7 +128198,7 @@ - + @@ -126348,7 +130448,7 @@ - + @@ -126359,7 +130459,7 @@ - + @@ -127821,7 +131921,7 @@ - + @@ -127832,7 +131932,7 @@ - + @@ -129098,7 +133198,7 @@ - + @@ -129109,7 +133209,7 @@ - + @@ -129388,7 +133488,7 @@ - + @@ -130140,7 +134240,7 @@ - + @@ -130577,7 +134677,7 @@ - + @@ -130588,7 +134688,7 @@ - + @@ -132539,7 +136639,7 @@ - + @@ -132550,7 +136650,7 @@ - + @@ -133578,6 +137678,7 @@ + @@ -134272,6 +138373,7 @@ + @@ -134352,7 +138454,7 @@ - + @@ -134363,7 +138465,7 @@ - + @@ -134792,9 +138894,9 @@ - + - + @@ -134828,9 +138930,10 @@ - + + - + @@ -134838,8 +138941,8 @@ - - + + @@ -135776,6 +139879,7 @@ + @@ -135980,9 +140084,9 @@ - + - + @@ -136016,9 +140120,10 @@ - + + - + @@ -136026,8 +140131,8 @@ - - + + @@ -136739,6 +140844,7 @@ + @@ -136783,7 +140889,7 @@ - + @@ -136794,7 +140900,7 @@ - + @@ -136808,7 +140914,7 @@ - + @@ -136839,7 +140945,7 @@ - + @@ -137194,7 +141300,7 @@ - + @@ -137294,8 +141400,8 @@ - - + + @@ -137572,7 +141678,7 @@ - + @@ -137713,7 +141819,7 @@ - + @@ -137813,8 +141919,8 @@ - - + + @@ -138096,7 +142202,7 @@ - + @@ -138107,7 +142213,7 @@ - + @@ -138690,27 +142796,14 @@ - - - + + + - + - - - - - - - - - - - - - @@ -139328,27 +143421,14 @@ - - - + + + - + - - - - - - - - - - - - - @@ -139502,7 +143582,7 @@ - + @@ -139513,7 +143593,7 @@ - + @@ -140561,6 +144641,22 @@ + + + + + + + + + + + + + + + + @@ -141134,6 +145230,22 @@ + + + + + + + + + + + + + + + + @@ -141144,7 +145256,7 @@ - + @@ -141155,7 +145267,7 @@ - + @@ -142183,7 +146295,7 @@ - + @@ -142194,7 +146306,7 @@ - + @@ -144667,7 +148779,7 @@ - + @@ -144678,7 +148790,7 @@ - + @@ -145269,7 +149381,7 @@ - + @@ -145280,6 +149392,9 @@ + + + @@ -145383,6 +149498,9 @@ + + + @@ -146197,6 +150315,12 @@ + + + + + + @@ -146650,7 +150774,7 @@ - + @@ -146661,6 +150785,9 @@ + + + @@ -146764,6 +150891,9 @@ + + + @@ -147353,6 +151483,12 @@ + + + + + + @@ -147490,7 +151626,7 @@ - + @@ -147501,7 +151637,7 @@ - + @@ -148153,7 +152289,7 @@ - + @@ -149031,7 +153167,7 @@ - + @@ -149300,7 +153436,7 @@ - + @@ -149311,7 +153447,7 @@ - + @@ -150027,7 +154163,7 @@ - + @@ -150038,7 +154174,7 @@ - + @@ -151129,7 +155265,7 @@ - + @@ -151140,7 +155276,7 @@ - + @@ -151741,7 +155877,7 @@ - + @@ -151752,7 +155888,7 @@ - + @@ -154106,7 +158242,7 @@ - + @@ -154117,7 +158253,7 @@ - + @@ -154900,7 +159036,7 @@ - + @@ -154911,7 +159047,7 @@ - + @@ -155308,7 +159444,7 @@ - + @@ -155672,7 +159808,7 @@ - + @@ -155845,7 +159981,7 @@ - + @@ -156059,7 +160195,7 @@ - + @@ -156099,7 +160235,7 @@ - + @@ -156110,7 +160246,7 @@ - + @@ -157003,7 +161139,7 @@ - + @@ -157014,7 +161150,7 @@ - + @@ -158171,10 +162307,10 @@ - - - - + + + + @@ -159670,10 +163806,10 @@ - - - - + + + + @@ -160205,7 +164341,7 @@ - + @@ -160216,7 +164352,7 @@ - + @@ -161300,7 +165436,7 @@ - + @@ -161311,7 +165447,7 @@ - + @@ -162568,7 +166704,7 @@ - + @@ -162579,7 +166715,7 @@ - + @@ -164715,7 +168851,7 @@ - + @@ -164726,7 +168862,7 @@ - + @@ -165910,9 +170046,9 @@ - + - + @@ -165952,9 +170088,9 @@ - + - + @@ -165965,6 +170101,14 @@ + + + + + + + + @@ -167008,9 +171152,9 @@ - + - + @@ -167050,9 +171194,9 @@ - + - + @@ -167063,6 +171207,14 @@ + + + + + + + + @@ -167271,7 +171423,7 @@ - + @@ -167282,7 +171434,7 @@ - + @@ -168151,7 +172303,7 @@ - + @@ -168162,7 +172314,7 @@ - + @@ -168545,13 +172697,13 @@ - + - + @@ -168717,7 +172869,7 @@ - + @@ -168910,13 +173062,13 @@ - + - + @@ -169007,7 +173159,7 @@ - + @@ -169081,7 +173233,7 @@ - + @@ -169092,7 +173244,7 @@ - + @@ -169400,8 +173552,8 @@ - - + + @@ -169410,6 +173562,9 @@ + + + @@ -169504,7 +173659,7 @@ - + @@ -169540,7 +173695,7 @@ - + @@ -169672,22 +173827,55 @@ - - - - - + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -169695,16 +173883,12 @@ - + - - - - @@ -169719,6 +173903,10 @@ + + + + @@ -169758,6 +173946,10 @@ + + + + @@ -169779,34 +173971,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -170050,8 +174214,8 @@ - - + + @@ -170060,6 +174224,9 @@ + + + @@ -170154,7 +174321,7 @@ - + @@ -170190,7 +174357,7 @@ - + @@ -170247,22 +174414,55 @@ - - - - - + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -170270,16 +174470,12 @@ - + - - - - @@ -170294,6 +174490,10 @@ + + + + @@ -170333,6 +174533,10 @@ + + + + @@ -170354,34 +174558,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -170506,7 +174682,7 @@ - + @@ -170517,7 +174693,7 @@ - + @@ -172983,7 +177159,7 @@ - + @@ -172994,7 +177170,7 @@ - + @@ -174327,7 +178503,7 @@ - + @@ -174338,7 +178514,7 @@ - + @@ -175128,7 +179304,7 @@ - + @@ -175139,7 +179315,7 @@ - + @@ -175590,6 +179766,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -175677,22 +179873,37 @@ - - - - + + + + - + + + + + + + + + + + + + + + + - + @@ -175805,10 +180016,10 @@ - - - - + + + + @@ -176541,6 +180752,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -176628,22 +180859,37 @@ - - - - + + + + - + + + + + + + + + + + + + + + + - + @@ -176681,10 +180927,10 @@ - - - - + + + + @@ -177075,19 +181321,19 @@ - + - + - - + + @@ -178339,19 +182585,19 @@ - + - + - - + + @@ -178899,7 +183145,7 @@ - + @@ -178910,7 +183156,7 @@ - + @@ -180288,7 +184534,7 @@ - + @@ -180299,7 +184545,7 @@ - + @@ -180986,7 +185232,7 @@ - + @@ -180997,7 +185243,7 @@ - + @@ -182278,7 +186524,7 @@ - + @@ -182289,7 +186535,7 @@ - + @@ -183310,6 +187556,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -183495,6 +187904,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -184047,6 +188791,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -184157,6 +188989,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -184167,7 +189109,7 @@ - + @@ -184178,7 +189120,7 @@ - + @@ -185398,7 +190340,7 @@ - + @@ -185409,7 +190351,7 @@ - + @@ -186126,7 +191068,7 @@ - + @@ -186137,7 +191079,7 @@ - + @@ -187861,13 +192803,1464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -187878,7 +194271,7 @@ - + @@ -189871,7 +196264,7 @@ - + @@ -189882,7 +196275,7 @@ - + @@ -192689,7 +199082,7 @@ - + @@ -192700,7 +199093,7 @@ - + @@ -193441,7 +199834,7 @@ - + @@ -193452,7 +199845,7 @@ - + @@ -194401,7 +200794,7 @@ - + @@ -194412,7 +200805,7 @@ - + @@ -195401,7 +201794,7 @@ - + @@ -195412,7 +201805,7 @@ - + @@ -196868,7 +203261,7 @@ - + @@ -196879,7 +203272,7 @@ - + @@ -197835,8 +204228,8 @@ - - + + @@ -197865,6 +204258,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -199170,8 +205587,8 @@ - - + + @@ -199200,6 +205617,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -199658,7 +206099,7 @@ - + @@ -199669,7 +206110,7 @@ - + @@ -201477,7 +207918,7 @@ - + @@ -201488,7 +207929,7 @@ - + @@ -207107,7 +213548,7 @@ - + @@ -207118,7 +213559,7 @@ - + @@ -209768,7 +216209,7 @@ - + @@ -209779,7 +216220,7 @@ - + @@ -211064,7 +217505,7 @@ - + @@ -211072,7 +217513,7 @@ - + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-types.xml b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-types.xml index 7719bc34712..e1fbea9d796 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-types.xml +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile/profiles-types.xml @@ -1,7 +1,7 @@ - + @@ -10,12 +10,12 @@ - + - + @@ -164,12 +164,12 @@ - + - + @@ -323,12 +323,12 @@ - + - + @@ -458,12 +458,12 @@ - + - + @@ -591,12 +591,12 @@ - + - + @@ -740,12 +740,12 @@ - + - + @@ -820,7 +820,7 @@ - + @@ -854,7 +854,7 @@ - + @@ -879,12 +879,12 @@ - + - + @@ -959,7 +959,7 @@ - + @@ -993,7 +993,7 @@ - + @@ -1018,12 +1018,12 @@ - + - + @@ -1159,12 +1159,12 @@ - + - + @@ -1310,12 +1310,12 @@ - + - + @@ -1445,12 +1445,12 @@ - + - + @@ -1590,12 +1590,12 @@ - + - + @@ -1735,12 +1735,12 @@ - + - + @@ -1886,12 +1886,12 @@ - + - + @@ -2035,12 +2035,12 @@ - + - + @@ -2172,12 +2172,12 @@ - + - + @@ -2311,12 +2311,12 @@ - + - + @@ -2460,12 +2460,12 @@ - + - + @@ -2595,12 +2595,12 @@ - + - + @@ -2746,12 +2746,12 @@ - + - + @@ -2875,12 +2875,12 @@ - + - + @@ -3664,12 +3664,12 @@ - + - + @@ -3954,12 +3954,12 @@ - + - + @@ -4228,12 +4228,12 @@ - + - + @@ -4763,12 +4763,12 @@ - + - + @@ -5021,12 +5021,12 @@ - + - + @@ -5423,12 +5423,12 @@ - + - + @@ -5585,12 +5585,12 @@ - + - + @@ -6025,12 +6025,12 @@ - + - + @@ -6227,12 +6227,12 @@ - + - + @@ -6519,12 +6519,12 @@ - + - + @@ -6664,7 +6664,7 @@ - + @@ -6734,6 +6734,7 @@ + @@ -6744,11 +6745,11 @@ - + - + @@ -6756,21 +6757,10 @@ - - + + - - - - - - - - - - - - + @@ -6778,21 +6768,10 @@ - - - - - - - - - - - - + @@ -6862,6 +6841,7 @@ + @@ -6944,7 +6924,7 @@ - + @@ -6956,6 +6936,7 @@ + @@ -6966,11 +6947,11 @@ - + - + @@ -6978,21 +6959,10 @@ - - + + - - - - - - - - - - - - + @@ -7000,21 +6970,10 @@ - - - - - - - - - - - - + @@ -7026,6 +6985,7 @@ + @@ -7060,12 +7020,12 @@ - + - + @@ -7350,12 +7310,12 @@ - + - + @@ -7470,7 +7430,7 @@ - + @@ -7484,9 +7444,10 @@ - - - + + + + @@ -7726,7 +7687,7 @@ - + @@ -7779,7 +7740,7 @@ - + @@ -7793,9 +7754,10 @@ - - - + + + + @@ -8035,7 +7997,7 @@ - + @@ -8065,12 +8027,12 @@ - + - + @@ -8355,12 +8317,12 @@ - + - + @@ -13022,12 +12984,12 @@ - + - + @@ -13442,12 +13404,12 @@ - + - + @@ -13948,12 +13910,12 @@ - + - + @@ -14438,12 +14400,12 @@ - + - + @@ -14727,12 +14689,12 @@ - + - + @@ -15017,12 +14979,12 @@ - + - + @@ -15246,12 +15208,12 @@ - + - + @@ -15563,12 +15525,12 @@ - + - + @@ -15801,12 +15763,12 @@ - + - + @@ -16192,12 +16154,12 @@ - + - + @@ -16433,12 +16395,12 @@ - + - + @@ -16644,12 +16606,12 @@ - + - + @@ -16887,12 +16849,12 @@ - + - + @@ -17165,12 +17127,12 @@ - + - + @@ -17520,12 +17482,12 @@ - + - + @@ -17549,9 +17511,9 @@ - + - + @@ -17724,7 +17686,7 @@ - + @@ -17745,7 +17707,7 @@ - + @@ -17758,9 +17720,9 @@ - + - + @@ -17870,7 +17832,7 @@ - + @@ -17891,7 +17853,7 @@ - + @@ -17910,12 +17872,12 @@ - + - + @@ -18911,12 +18873,12 @@ - + - + @@ -18924,7 +18886,7 @@ - + @@ -18940,7 +18902,8 @@ - + + @@ -18952,6 +18915,20 @@ + + + + + + + + + + + + + + @@ -19009,7 +18986,7 @@ - + @@ -19028,21 +19005,22 @@ - - - - + + + + + - + - - + + - + @@ -19060,10 +19038,11 @@ - - + + + @@ -19071,11 +19050,11 @@ - - + + - + @@ -19092,8 +19071,8 @@ - - + + @@ -19112,8 +19091,8 @@ - - + + @@ -19142,8 +19121,8 @@ - - + + @@ -19153,23 +19132,33 @@ - - - + + + - + - + + + + + + + + + + + - - + + - - + + @@ -19181,13 +19170,28 @@ - + + + + + + + + + + + + + + + + - + @@ -19206,21 +19210,22 @@ - - - - + + + + + - + - - + + - + @@ -19238,10 +19243,11 @@ - - + + + @@ -19249,11 +19255,11 @@ - - + + - + @@ -19262,8 +19268,8 @@ - - + + @@ -19273,23 +19279,33 @@ - - - + + + - + - + + + + + + + + + + + - - + + - - + + @@ -19306,12 +19322,12 @@ - + - + @@ -19518,12 +19534,12 @@ - + - + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/auditevent.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/auditevent.sch index 0eacb9bd19b..20bbf5b38d3 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/auditevent.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/auditevent.sch @@ -37,6 +37,9 @@ txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes txt-2: The narrative SHALL have some non-whitespace content + + per-1: If present, start SHALL have a lower value than end + ref-1: SHALL have a contained resource if a local reference is provided diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/catalogentry.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/catalogentry.sch new file mode 100644 index 00000000000..5faa513d9be --- /dev/null +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/catalogentry.sch @@ -0,0 +1,80 @@ + + + + + + + Global + + ext-1: Must have either extensions or value[x], not both + + + ext-1: Must have either extensions or value[x], not both + + + + Global 1 + + global-1: All FHIR elements must have a @value or children + + + + CatalogEntry + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/consent.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/consent.sch index 0ba93e1f130..94ec496135f 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/consent.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/consent.sch @@ -98,9 +98,6 @@ ref-1: SHALL have a contained resource if a local reference is provided - - ppc-2: No Provision.Type at root - per-1: If present, start SHALL have a lower value than end diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/devicecomponent.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/devicecomponent.sch index 7635e2e4047..fb199282dc3 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/devicecomponent.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/devicecomponent.sch @@ -67,5 +67,8 @@ ref-1: SHALL have a contained resource if a local reference is provided + + qty-3: If a code for the unit is present, the system SHALL also be present + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentmanifest.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentmanifest.sch index 82b653309ba..5e9bd9dd617 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentmanifest.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentmanifest.sch @@ -58,13 +58,13 @@ ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided @@ -76,16 +76,13 @@ ref-1: SHALL have a contained resource if a local reference is provided - - att-1: It the Attachment has data, it SHALL have a contentType - - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentreference.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentreference.sch index 683fcd903e3..1d8f5b93910 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentreference.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/documentreference.sch @@ -58,13 +58,13 @@ ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/eventdefinition.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/eventdefinition.sch index e1ee1ec0c60..a388595e970 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/eventdefinition.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/eventdefinition.sch @@ -82,7 +82,11 @@ ref-1: SHALL have a contained resource if a local reference is provided - + + trd-2: A condition only if there is a data requirement + trd-1: Either timing, or a data requirement, but not both + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) tim-5: period SHALL be a non-negative value tim-6: If there's a periodMax, there must be a period @@ -93,43 +97,43 @@ tim-2: if there's a period, there needs to be period units tim-4: duration SHALL be a non-negative value - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. - + rng-2: If present, low SHALL have a lower value than high - + qty-3: If a code for the unit is present, the system SHALL also be present - + qty-3: If a code for the unit is present, the system SHALL also be present - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/examplescenario.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/examplescenario.sch new file mode 100644 index 00000000000..9e931243cdf --- /dev/null +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/examplescenario.sch @@ -0,0 +1,74 @@ + + + + + + + Global + + ext-1: Must have either extensions or value[x], not both + + + ext-1: Must have either extensions or value[x], not both + + + + Global 1 + + global-1: All FHIR elements must have a @value or children + + + + ExampleScenario + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + cpt-2: A system is required if a value is provided. + + + per-1: If present, start SHALL have a lower value than end + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-invariants.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-invariants.sch index 4cfb1800a85..e4eb154dd95 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-invariants.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-invariants.sch @@ -164,6 +164,58 @@ per-1: If present, start SHALL have a lower value than end + + CatalogEntry + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + EventDefinition @@ -221,7 +273,11 @@ ref-1: SHALL have a contained resource if a local reference is provided - + + trd-2: A condition only if there is a data requirement + trd-1: Either timing, or a data requirement, but not both + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) tim-5: period SHALL be a non-negative value tim-6: If there's a periodMax, there must be a period @@ -232,43 +288,43 @@ tim-2: if there's a period, there needs to be period units tim-4: duration SHALL be a non-negative value - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. - + rng-2: If present, low SHALL have a lower value than high - + qty-3: If a code for the unit is present, the system SHALL also be present - + qty-3: If a code for the unit is present, the system SHALL also be present - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. @@ -305,13 +361,13 @@ ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided @@ -323,16 +379,13 @@ ref-1: SHALL have a contained resource if a local reference is provided - - att-1: It the Attachment has data, it SHALL have a contentType - - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided @@ -692,9 +745,6 @@ ref-1: SHALL have a contained resource if a local reference is provided - - ppc-2: No Provision.Type at root - per-1: If present, start SHALL have a lower value than end @@ -1077,13 +1127,13 @@ ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided @@ -2576,6 +2626,9 @@ ref-1: SHALL have a contained resource if a local reference is provided + + qty-3: If a code for the unit is present, the system SHALL also be present + FamilyMemberHistory @@ -3134,7 +3187,11 @@ ref-1: SHALL have a contained resource if a local reference is provided - + + trd-2: A condition only if there is a data requirement + trd-1: Either timing, or a data requirement, but not both + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) tim-5: period SHALL be a non-negative value tim-6: If there's a periodMax, there must be a period @@ -3145,43 +3202,43 @@ tim-2: if there's a period, there needs to be period units tim-4: duration SHALL be a non-negative value - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. - + rng-2: If present, low SHALL have a lower value than high - + qty-3: If a code for the unit is present, the system SHALL also be present - + qty-3: If a code for the unit is present, the system SHALL also be present - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. @@ -4192,7 +4249,7 @@ ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end @@ -4365,6 +4422,15 @@ ref-1: SHALL have a contained resource if a local reference is provided + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + ref-1: SHALL have a contained resource if a local reference is provided @@ -7411,6 +7477,32 @@ per-1: If present, start SHALL have a lower value than end + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) + tim-5: period SHALL be a non-negative value + tim-6: If there's a periodMax, there must be a period + tim-7: If there's a durationMax, there must be a duration + tim-8: If there's a countMax, there must be a count + tim-1: if there's a duration, there needs to be duration units + tim-10: If there's a timeOfDay, there cannot be be a when, or vice versa + tim-2: if there's a period, there needs to be period units + tim-4: duration SHALL be a non-negative value + + + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + per-1: If present, start SHALL have a lower value than end + ref-1: SHALL have a contained resource if a local reference is provided @@ -9192,6 +9284,9 @@ txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes txt-2: The narrative SHALL have some non-whitespace content + + per-1: If present, start SHALL have a lower value than end + ref-1: SHALL have a contained resource if a local reference is provided @@ -9452,6 +9547,55 @@ ref-1: SHALL have a contained resource if a local reference is provided + + SpecimenDefinition + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. + + Composition @@ -10059,6 +10203,52 @@ ref-1: SHALL have a contained resource if a local reference is provided + + ExampleScenario + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + cpt-2: A system is required if a value is provided. + + + per-1: If present, start SHALL have a lower value than end + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + Schedule @@ -10421,7 +10611,11 @@ ref-1: SHALL have a contained resource if a local reference is provided - + + trd-2: A condition only if there is a data requirement + trd-1: Either timing, or a data requirement, but not both + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) tim-5: period SHALL be a non-negative value tim-6: If there's a periodMax, there must be a period @@ -10432,43 +10626,43 @@ tim-2: if there's a period, there needs to be period units tim-4: duration SHALL be a non-negative value - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. - + rng-2: If present, low SHALL have a lower value than high - + qty-3: If a code for the unit is present, the system SHALL also be present - + qty-3: If a code for the unit is present, the system SHALL also be present - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-single.xsd b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-single.xsd index c8b0c562f8c..622552f06a4 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-single.xsd +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/fhir-single.xsd @@ -27,7 +27,7 @@ POSSIBILITY OF SUCH DAMAGE. - Generated on Mon, Jul 24, 2017 06:02-0400 for FHIR v3.1.0 + Generated on Sat, Sep 23, 2017 17:33-0400 for FHIR v3.1.0 --> @@ -336,6 +336,7 @@ + @@ -367,6 +368,7 @@ + @@ -426,6 +428,7 @@ + @@ -992,7 +995,7 @@ - A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. + A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc. @@ -1298,7 +1301,7 @@ - A description of a triggering event. + A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions @@ -1309,26 +1312,26 @@ The type of triggering event. - + - The name of the event (if this is a named-event trigger). + A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context. - The timing of the event (if this is a period trigger). + The timing of the event (if this is a periodic trigger). - - - - + + + + - + The triggering data of the event (if this is a data trigger). - + A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires. @@ -1337,9 +1340,9 @@ - + - A description of a triggering event. + A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions @@ -1350,12 +1353,12 @@ A brief, natural language description of the condition that effectively communicates the intended semantics. - + The media type of the language for the expression. - + An expression that returns true or false, indicating whether or not the condition is satisfied. @@ -1376,6 +1379,11 @@ Periodic + + + Data Changed + + Data Added @@ -1383,7 +1391,7 @@ - Data Modified + Data Updated @@ -1414,6 +1422,31 @@ + + + + + CQL + + + + + FHIRPath + + + + + + + The media type of the expression language + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers. @@ -1501,12 +1534,12 @@ - Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. + Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed. - Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. + Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed. @@ -1528,24 +1561,14 @@ - The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. + The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. - + - + - The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. - - - - - The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings. - - - - - The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts. + The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes. @@ -1597,7 +1620,7 @@ - Supplemental instruction - e.g. "with meals". + Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps"). @@ -4026,6 +4049,11 @@ A coverage may only be resposible for specific types of charges, and the sequenc CareTeam + + + CatalogEntry + + ChargeItem @@ -4186,6 +4214,11 @@ A coverage may only be resposible for specific types of charges, and the sequenc EventDefinition + + + ExampleScenario + + ExpansionProfile @@ -4491,6 +4524,11 @@ A coverage may only be resposible for specific types of charges, and the sequenc Specimen + + + SpecimenDefinition + + StructureDefinition @@ -5509,6 +5547,11 @@ A coverage may only be resposible for specific types of charges, and the sequenc Indicator for type of action performed during the event that generated the audit. + + + The period during which the activity occurred. + + The time when the event occurred on the source. @@ -5555,6 +5598,11 @@ A coverage may only be resposible for specific types of charges, and the sequenc + + + Specification of the participation type the user plays when performing the event. + + The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context. @@ -5734,11 +5782,13 @@ A coverage may only be resposible for specific types of charges, and the sequenc The type of extra detail provided in the value. - + - The details, base64 encoded. Used to carry bulk information. - - + The details value. + + + + @@ -7515,9 +7565,9 @@ A coverage may only be resposible for specific types of charges, and the sequenc - + - High-level categorization of the type of activity in a care plan. + A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. @@ -7604,6 +7654,61 @@ A coverage may only be resposible for specific types of charges, and the sequenc + + + + + Appointment + + + + + CommunicationRequest + + + + + DeviceRequest + + + + + MedicationRequest + + + + + NutritionOrder + + + + + Task + + + + + ProcedureRequest + + + + + VisionPrescription + + + + + + + Resource types defined as part of FHIR that can be represented as in-line definitions of a care plan activity. + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + @@ -7897,6 +8002,109 @@ A coverage may only be resposible for specific types of charges, and the sequenc + + + Catalog entries are wrappers that contextualize items included in a catalog. + + + + + Catalog entries are wrappers that contextualize items included in a catalog. + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + The type of item - medication, device, service, protocol or other. + + + + + Whether the entry represents an orderable item, or other. + + + + + Content of the catalog. + + + + + Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code. + + + + + Used in supporting related concepts, e.g. NDC to RxNorm. + + + + + Classes of devices, or ATC for medication. + + + + + Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable. + + + + + The time period in which this catalog entry is expected to be active. + + + + + Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. + + + + + Used for examplefor Out of Formulary, or any specifics. + + + + + User for example for ATC classification, or. + + + + + Used for example, to point to a substance, or to a device used to administer a medication. + + + + + + + + + Catalog entries are wrappers that contextualize items included in a catalog. + + + + + + + The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc. + + + + + The type of related item. + + + + + The reference to the related item. + + + + + + The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. @@ -11632,9 +11840,9 @@ A coverage may only be resposible for specific types of charges, and the sequenc The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law. - + - A referece to the specific computable policy. + A reference to the specific base computable policy. @@ -11727,7 +11935,7 @@ A coverage may only be resposible for specific types of charges, and the sequenc - A set of security labels that define which resources are controlled by this rule. If more than one label is specified, all resources must have all the specified labels. + A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception. @@ -13058,9 +13266,9 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. - + - The locally assigned unique identification by the software. For example: handle ID. + Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. @@ -13108,6 +13316,11 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US. + + + Other device properties expressed as a `type` which identifies the property and a value(s) either as a quantity or a code. + + @@ -13138,6 +13351,32 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. + + + The characteristics, operational status and capabilities of a medical-related component of a medical device. + + + + + + + The code for the device property identifying the property being reported such as 'time capability'. + + + + + The property value when the property being reported is a quantity such as the resolution of a real time clock. + + + + + The property value when the property being reported is a code, such as the code indicating that the device supports a real time clock using absolute time. + + + + + + @@ -13221,9 +13460,9 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. - + - Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device. + Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID. @@ -14002,9 +14241,9 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). - + - Identifies who is responsible for creating the manifest, and adding documents to it. + An actor taking an active role in the manifest. @@ -14022,9 +14261,9 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. Human-readable description of the source document. This is sometimes known as the "title". - + - The list of Documents included in the manifest. + The list of Resources that consist of the parts of this manifest. @@ -14036,20 +14275,23 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. - + A collection of documents compiled for a purpose together with metadata that applies to the collection. - + - The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed. - - - - + Specification of the participation type the agent played. + + + + + Identifies who is the agent. Such as the author of the manifest, and adding documents to it. + + @@ -14108,7 +14350,7 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. The status of the underlying document. - + Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced. @@ -14128,14 +14370,14 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. When the document was created. - + When the document reference was created. - + - Identifies who is responsible for adding the information to the document. + An actor taking an active role in the document. @@ -14177,6 +14419,27 @@ http://hl7.org/fhir/NamingSystem/iccbba-other-di. + + + A reference to a document. + + + + + + + Specification of the participation type the agent played. + + + + + Identifies who is responsible for adding the information to the document. + + + + + + A reference to a document. @@ -15519,7 +15782,7 @@ This would be used for a case where an admission starts of as an emergency encou Related resources such as additional documentation, justification, or bibliographic references. - + The trigger element defines when the event occurs. @@ -15528,6 +15791,432 @@ This would be used for a case where an admission starts of as an emergency encou + + + Example of workflow instance. + + + + + Example of workflow instance. + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this example scenario is (or will be) published. The URL SHOULD include the major version of the example scenario. For more information see [Technical and Business Versions](resource.html#versions). + + + + + A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance. + + + + + The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. + + + + + A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation. + + + + + The name of the example as showin in the title page. + + + + + The status of this example scenario. Enables tracking the life-cycle of the content. + + + + + A boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + + + + + The date (and optionally time) when the example scenario was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition'). + + + + + The name of the individual or organization that published the example scenario. + + + + + Contact details to assist a user in finding and communicating with the publisher. + + + + + The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate example scenario instances. + + + + + A legal or geographic region in which the example scenario is intended to be used. + + + + + A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario. + + + + + Description of behaviour of the workflow example. + + + + + What is the example supposed to resolve. + + + + + Actor participating in the resource. + + + + + Each resource and each version that is present in the workflow. + + + + + Each major process - a group of operations. + + + + + Another nested workflow. + + + + + + + + + Example of workflow instance. + + + + + + + ID or acronym of actor. + + + + + The type of actor - person or system. + + + + + The name of the actor as shown in the page. + + + + + The description of the actor. + + + + + + + + + Example of workflow instance. + + + + + + + The id of the resource for referencing. + + + + + The type of the resource. + + + + + A short name for the resource instance. + + + + + Human-friendly description of the resource instance. + + + + + A specific version of the resource. + + + + + Resources contained in the instance (e.g. the observations contained in a bundle). + + + + + + + + + Example of workflow instance. + + + + + + + The identifier of a specific version of a resource. + + + + + The description of the resource version. + + + + + + + + + Example of workflow instance. + + + + + + + Each resource contained in the instance. + + + + + A specific version of a resource contained in the instance. + + + + + + + + + Example of workflow instance. + + + + + + + The diagram title of the group of operations. + + + + + A longer description of the group of operations. + + + + + Description of initial status before the process starts. + + + + + Description of final status after the process ends. + + + + + Each step of the process. + + + + + + + + + Example of workflow instance. + + + + + + + Nested process. + + + + + If there is a pause in the flow. + + + + + Each interaction or action. + + + + + Each interaction in the workflow. + + + + + + + + + Example of workflow instance. + + + + + + + The sequential number of the interaction. + + + + + The type of operation - CRUD. + + + + + The human-friendly name of the interaction. + + + + + Who starts the transaction. + + + + + Who receives the transaction. + + + + + A comment to be inserted in the diagram. + + + + + Whether the initiator is deactivated right after the transaction. + + + + + Whether the receiver is deactivated right after the transaction. + + + + + Each resource instance used by the initiator. + + + + + Each resource instance used by the responder. + + + + + + + + + Example of workflow instance. + + + + + + + The name of each alternative. + + + + + Each of the possible options in an alternative. + + + + + + + + + Example of workflow instance. + + + + + + + A human-readable description of each option. + + + + + What happens in each alternative option. + + + + + If there is a pause in the flow. + + + + + + + + + + + Person + + + + + System + + + + + + + The type of actor - system or human + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + Resource to define constraints on the Expansion of a FHIR ValueSet. @@ -17427,9 +18116,9 @@ This would be used for a case where an admission starts of as an emergency encou - + - Path in the resource that contains the link. + A FHIR expression that identifies one of FHIR References to other resources. @@ -17452,7 +18141,7 @@ This would be used for a case where an admission starts of as an emergency encou Information about why this link is of interest in this graph definition. - + Potential target for the link. @@ -17473,6 +18162,11 @@ This would be used for a case where an admission starts of as an emergency encou Type of resource this link refers to. + + + A set of parameters to look up. + + Profile for the target resource. @@ -17499,6 +18193,11 @@ This would be used for a case where an admission starts of as an emergency encou + + + Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed. + + Identifies the compartment. @@ -17523,6 +18222,31 @@ This would be used for a case where an admission starts of as an emergency encou + + + + + Condition + + + + + Requirement + + + + + + + Defines how a compartment rule is used + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + @@ -21213,9 +21937,9 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions Whether the request is a proposal, plan, or an original order. - + - Indicates the type of medication order and where the medication is expected to be consumed or administered. + Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient) or the type of treatment (i.e. chemotherapy or endocrine). @@ -21504,6 +22228,11 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions Instance Order + + + Option + + @@ -21569,7 +22298,7 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions - The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true). + The interval of time during which it is being asserted that the patient is/was/will be taking the medication ( or was not taking, when the MedicationStatement.taken element is No). @@ -21816,9 +22545,9 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions A MessageDefinition that is superseded by this definition. - + - A coded identifier of a supported messaging event. + Link to the defined event type. @@ -21965,6 +22694,11 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions The actual data of the message - a reference to the root/focus class of the event. + + + Permanent link to the MessageDefinition for this message. + + @@ -22674,6 +23408,7 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions + @@ -22693,6 +23428,7 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions + @@ -22836,6 +23572,8 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions + + @@ -23487,6 +24225,11 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions CareTeam + + + CatalogEntry + + ChargeItem @@ -23647,6 +24390,11 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions EventDefinition + + + ExampleScenario + + ExpansionProfile @@ -23952,6 +24700,11 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions Specimen + + + SpecimenDefinition + + StructureDefinition @@ -25358,9 +26111,9 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions - + - A user-visible label for the action. + A user-visible prefix for the action. @@ -26811,11 +27564,13 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity. - + The period during which the activity occurred. - - + + + + The instant of time at which the activity was recorded. @@ -26831,12 +27586,12 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions Where the activity occurred, if relevant. - + The reason that the activity was taking place. - + An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities. @@ -26867,6 +27622,11 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions + + + The participation the agent had with respect to the activity. + + The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity. @@ -26886,11 +27646,6 @@ The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions - - - The type of relationship between agents. - - @@ -27658,6 +28413,11 @@ Any information provided in these elements on a Questionnaire Item overrides the Indicates how quickly the request should be addressed with respect to other requests. + + + A code that identifies what the overall request group is. + + The subject for which the request group was created. @@ -27678,13 +28438,16 @@ Any information provided in these elements on a Questionnaire Item overrides the Provides a reference to the author of the request group. - + - Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response. - - - - + Describes the reason for the request group in coded or textual form. + + + + + Indicates another resource whose existence justifies this request group. + + Provides a mechanism to communicate additional information about the response. @@ -27706,9 +28469,9 @@ Any information provided in these elements on a Questionnaire Item overrides the - + - A user-visible label for the action. + A user-visible prefix for the action. @@ -29670,6 +30433,218 @@ Any information provided in these elements on a Questionnaire Item overrides the + + + A kind of specimen with associated set of requirements. + + + + + A kind of specimen with associated set of requirements. + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + A business identifier associated with the kind of specimen. + + + + + The kind of material to be collected. + + + + + Preparation of the patient for specimen collection. + + + + + Time aspect of specimen collection (duration or offset). + + + + + The action to be performed for collecting the specimen. + + + + + Specimen conditioned in a container as expected by the testing laboratory. + + + + + + + + + A kind of specimen with associated set of requirements. + + + + + + + Primary of secondary specimen. + + + + + The kind of specimen conditioned for testing expected by lab. + + + + + The preference for this type of conditioned specimen. + + + + + The type of material of the container. + + + + + The type of container used to contain this kind of specimen. + + + + + Color of container cap. + + + + + The textual description of the kind of container. + + + + + The capacity (volume or other measure) of this kind of container. + + + + + The minimum volume to be conditioned in the container. + + + + + Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA. + + + + + Special processing that should be applied to the container for this kind of specimen. + + + + + Requirements for delivery and special handling of this kind of conditioned specimen. + + + + + The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing. + + + + + Criterion for rejection of the specimen in its container by the laboratory. + + + + + Set of instructions for conservation/transport of the specimen at a defined temperature interval, prior the testing process. + + + + + + + + + A kind of specimen with associated set of requirements. + + + + + + + Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA. + + + + + + + + + + + A kind of specimen with associated set of requirements. + + + + + + + Code representing the set of handling instructions. + + + + + The temperature interval for this set of handling instructions. + + + + + The maximum time interval of conservation of the specimen with these conditions. + + + + + Textual instructions regarding the light exposure of the specimen prior testing. + + + + + Additional textual instructions for the conservation or transport of the specimen. + + + + + + + + + + + Preferred + + + + + Alternate + + + + + + + Degree of preference of a type of conditioned specimen + If the element is present, it must have either a @value, an @id, or extensions + + + + + + + A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. @@ -31436,11 +32411,16 @@ Any information provided in these elements on a Questionnaire Item overrides the Individual organization or Device currently responsible for task execution. - + A description or code indicating why this task needs to be performed. + + + A resource reference indicating why this task needs to be performed. + + Free-text information captured about the task as it progresses. @@ -33386,6 +34366,11 @@ Any information provided in these elements on a Questionnaire Item overrides the CareTeam + + + CatalogEntry + + ChargeItem @@ -33546,6 +34531,11 @@ Any information provided in these elements on a Questionnaire Item overrides the EventDefinition + + + ExampleScenario + + ExpansionProfile @@ -33851,6 +34841,11 @@ Any information provided in these elements on a Questionnaire Item overrides the Specimen + + + SpecimenDefinition + + StructureDefinition diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/observation.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/observation.sch index 0028b4a3ac6..1ad6fa7f7a1 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/observation.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/observation.sch @@ -75,6 +75,32 @@ per-1: If present, start SHALL have a lower value than end + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) + tim-5: period SHALL be a non-negative value + tim-6: If there's a periodMax, there must be a period + tim-7: If there's a durationMax, there must be a duration + tim-8: If there's a countMax, there must be a count + tim-1: if there's a duration, there needs to be duration units + tim-10: If there's a timeOfDay, there cannot be be a when, or vice versa + tim-2: if there's a period, there needs to be period units + tim-4: duration SHALL be a non-negative value + + + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + per-1: If present, start SHALL have a lower value than end + ref-1: SHALL have a contained resource if a local reference is provided diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/plandefinition.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/plandefinition.sch index d2c3cfb37fe..0b58ab92142 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/plandefinition.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/plandefinition.sch @@ -130,7 +130,11 @@ ref-1: SHALL have a contained resource if a local reference is provided - + + trd-2: A condition only if there is a data requirement + trd-1: Either timing, or a data requirement, but not both + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) tim-5: period SHALL be a non-negative value tim-6: If there's a periodMax, there must be a period @@ -141,43 +145,43 @@ tim-2: if there's a period, there needs to be period units tim-4: duration SHALL be a non-negative value - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. - + rng-2: If present, low SHALL have a lower value than high - + qty-3: If a code for the unit is present, the system SHALL also be present - + qty-3: If a code for the unit is present, the system SHALL also be present - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/provenance.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/provenance.sch index 9d116c1312f..851d016db99 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/provenance.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/provenance.sch @@ -46,7 +46,7 @@ ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/servicedefinition.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/servicedefinition.sch index eda4d9cb00c..868ee2cc6b6 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/servicedefinition.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/servicedefinition.sch @@ -82,7 +82,11 @@ ref-1: SHALL have a contained resource if a local reference is provided - + + trd-2: A condition only if there is a data requirement + trd-1: Either timing, or a data requirement, but not both + + tim-9: If there's an offset, there must be a when (and not C, CM, CD, CV) tim-5: period SHALL be a non-negative value tim-6: If there's a periodMax, there must be a period @@ -93,43 +97,43 @@ tim-2: if there's a period, there needs to be period units tim-4: duration SHALL be a non-negative value - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. - + rng-2: If present, low SHALL have a lower value than high - + qty-3: If a code for the unit is present, the system SHALL also be present - + qty-3: If a code for the unit is present, the system SHALL also be present - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + ref-1: SHALL have a contained resource if a local reference is provided - + per-1: If present, start SHALL have a lower value than end - + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/specimendefinition.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/specimendefinition.sch new file mode 100644 index 00000000000..a445ea31524 --- /dev/null +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/specimendefinition.sch @@ -0,0 +1,77 @@ + + + + + + + Global + + ext-1: Must have either extensions or value[x], not both + + + ext-1: Must have either extensions or value[x], not both + + + + Global 1 + + global-1: All FHIR elements must have a @value or children + + + + SpecimenDefinition + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + drt-1: There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. + + + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/task.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/task.sch index 3198619fc77..d8ca6d17e70 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/task.sch +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/task.sch @@ -134,6 +134,15 @@ ref-1: SHALL have a contained resource if a local reference is provided + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + ref-1: SHALL have a contained resource if a local reference is provided diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/workflowexample.sch b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/workflowexample.sch new file mode 100644 index 00000000000..cae904c2406 --- /dev/null +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/schema/workflowexample.sch @@ -0,0 +1,74 @@ + + + + + + + Global + + ext-1: Must have either extensions or value[x], not both + + + ext-1: Must have either extensions or value[x], not both + + + + Global 1 + + global-1: All FHIR elements must have a @value or children + + + + WorkflowExample + + dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources + dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative + dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated + dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource + + + txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, <a> elements (either name or href), images and internally contained style attributes + txt-2: The narrative SHALL have some non-whitespace content + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + cpt-2: A system is required if a value is provided. + + + per-1: If present, start SHALL have a lower value than end + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + rng-2: If present, low SHALL have a lower value than high + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + qty-3: If a code for the unit is present, the system SHALL also be present + + + ref-1: SHALL have a contained resource if a local reference is provided + + + per-1: If present, start SHALL have a lower value than end + + + ref-1: SHALL have a contained resource if a local reference is provided + + + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v2-tables.xml b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v2-tables.xml index 14d6a67a328..35e9e039398 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v2-tables.xml +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v2-tables.xml @@ -1,7 +1,7 @@ - + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml index 202256a4581..df20882e6a3 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/v3-codesystems.xml @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -24,11 +24,11 @@ - + - + @@ -52,7 +52,7 @@ - + @@ -66,11 +66,11 @@ - + - + @@ -94,7 +94,7 @@ - + @@ -104,7 +104,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -189,7 +189,7 @@ - + @@ -203,11 +203,11 @@ - + - + @@ -231,7 +231,7 @@ - + @@ -293,7 +293,7 @@ - + @@ -348,7 +348,7 @@ - + @@ -362,11 +362,11 @@ - + - + @@ -390,7 +390,7 @@ - + @@ -436,7 +436,7 @@ - + @@ -450,11 +450,11 @@ - + - + @@ -478,7 +478,7 @@ - + @@ -524,7 +524,7 @@ - + @@ -570,7 +570,7 @@ - + @@ -616,7 +616,7 @@ - + @@ -630,11 +630,11 @@ - + - + @@ -658,7 +658,7 @@ - + @@ -671,11 +671,11 @@ - + - + @@ -699,7 +699,7 @@ - + @@ -713,11 +713,11 @@ - + - + @@ -741,7 +741,7 @@ - + @@ -751,11 +751,11 @@ - + - + @@ -779,7 +779,7 @@ - + @@ -793,11 +793,11 @@ - + - + @@ -821,7 +821,7 @@ - + @@ -835,11 +835,11 @@ - + - + @@ -863,7 +863,7 @@ - + @@ -909,7 +909,7 @@ - + @@ -961,7 +961,7 @@ - + @@ -971,11 +971,11 @@ - + - + @@ -999,7 +999,7 @@ - + @@ -1009,11 +1009,11 @@ - + - + @@ -1037,7 +1037,7 @@ - + @@ -1051,11 +1051,11 @@ - + - + @@ -1079,7 +1079,7 @@ - + @@ -1092,11 +1092,11 @@ - + - + @@ -1120,7 +1120,7 @@ - + @@ -1166,7 +1166,7 @@ - + @@ -1180,11 +1180,11 @@ - + - + @@ -1208,7 +1208,7 @@ - + @@ -1222,11 +1222,11 @@ - + - + @@ -1250,7 +1250,7 @@ - + @@ -1264,11 +1264,11 @@ - + - + @@ -1292,7 +1292,7 @@ - + @@ -1302,11 +1302,11 @@ - + - + @@ -1330,7 +1330,7 @@ - + @@ -1376,7 +1376,7 @@ - + @@ -1422,7 +1422,7 @@ - + @@ -1468,7 +1468,7 @@ - + @@ -1482,11 +1482,11 @@ - + - + @@ -1510,7 +1510,7 @@ - + @@ -1520,11 +1520,11 @@ - + - + @@ -1548,7 +1548,7 @@ - + @@ -1562,11 +1562,11 @@ - + - + @@ -1590,7 +1590,7 @@ - + @@ -1600,11 +1600,11 @@ - + - + @@ -1628,7 +1628,7 @@ - + @@ -1642,11 +1642,11 @@ - + - + @@ -1670,7 +1670,7 @@ - + @@ -1684,11 +1684,11 @@ - + - + @@ -1712,7 +1712,7 @@ - + @@ -1758,7 +1758,7 @@ - + @@ -1810,7 +1810,7 @@ - + @@ -1862,7 +1862,7 @@ - + @@ -1872,11 +1872,11 @@ - + - + @@ -1900,7 +1900,7 @@ - + @@ -1955,7 +1955,7 @@ - + @@ -2014,7 +2014,7 @@ - + @@ -2028,11 +2028,11 @@ - + - + @@ -2056,7 +2056,7 @@ - + @@ -2108,7 +2108,7 @@ - + @@ -2154,7 +2154,7 @@ - + @@ -2168,11 +2168,11 @@ - + - + @@ -2196,7 +2196,7 @@ - + @@ -2206,11 +2206,11 @@ - + - + @@ -2234,7 +2234,7 @@ - + @@ -2244,11 +2244,11 @@ - + - + @@ -2272,7 +2272,7 @@ - + @@ -2282,11 +2282,11 @@ - + - + @@ -2310,7 +2310,7 @@ - + @@ -2366,7 +2366,7 @@ - + @@ -2380,11 +2380,11 @@ - + - + @@ -2408,7 +2408,7 @@ - + @@ -2418,11 +2418,11 @@ - + - + @@ -2446,7 +2446,7 @@ - + @@ -2501,7 +2501,7 @@ - + @@ -2515,11 +2515,11 @@ - + - + @@ -2543,7 +2543,7 @@ - + @@ -2595,7 +2595,7 @@ - + @@ -2609,11 +2609,11 @@ - + - + @@ -2637,7 +2637,7 @@ - + @@ -2683,7 +2683,7 @@ - + @@ -2697,11 +2697,11 @@ - + - + @@ -2725,7 +2725,7 @@ - + @@ -2771,7 +2771,7 @@ - + @@ -2781,11 +2781,11 @@ - + - + @@ -2809,7 +2809,7 @@ - + @@ -2823,11 +2823,11 @@ - + - + @@ -2851,7 +2851,7 @@ - + @@ -2865,11 +2865,11 @@ - + - + @@ -2893,7 +2893,7 @@ - + @@ -2907,11 +2907,11 @@ - + - + @@ -2935,7 +2935,7 @@ - + @@ -2949,11 +2949,11 @@ - + - + @@ -2977,7 +2977,7 @@ - + @@ -3023,7 +3023,7 @@ - + @@ -3064,7 +3064,7 @@ - + @@ -3110,7 +3110,7 @@ - + @@ -3124,11 +3124,11 @@ - + - + @@ -3152,7 +3152,7 @@ - + @@ -3166,11 +3166,11 @@ - + - + @@ -3194,7 +3194,7 @@ - + @@ -3204,11 +3204,11 @@ - + - + @@ -3232,7 +3232,7 @@ - + @@ -3242,11 +3242,11 @@ - + - + @@ -3270,7 +3270,7 @@ - + @@ -3284,11 +3284,11 @@ - + - + @@ -3312,7 +3312,7 @@ - + @@ -3322,11 +3322,11 @@ - + - + @@ -3350,7 +3350,7 @@ - + @@ -3364,11 +3364,11 @@ - + - + @@ -3392,7 +3392,7 @@ - + @@ -3406,11 +3406,11 @@ - + - + @@ -3434,7 +3434,7 @@ - + @@ -3480,7 +3480,7 @@ - + @@ -3494,11 +3494,11 @@ - + - + @@ -3522,7 +3522,7 @@ - + @@ -3568,7 +3568,7 @@ - + @@ -3614,7 +3614,7 @@ - + @@ -3624,11 +3624,11 @@ - + - + @@ -3652,7 +3652,7 @@ - + @@ -3701,7 +3701,7 @@ - + @@ -3715,11 +3715,11 @@ - + - + @@ -3743,7 +3743,7 @@ - + @@ -3756,11 +3756,11 @@ - + - + @@ -3784,7 +3784,7 @@ - + @@ -3830,7 +3830,7 @@ - + @@ -3871,7 +3871,7 @@ - + @@ -3881,11 +3881,11 @@ - + - + @@ -3909,7 +3909,7 @@ - + @@ -3955,7 +3955,7 @@ - + @@ -3969,11 +3969,11 @@ - + - + @@ -3997,7 +3997,7 @@ - + @@ -4043,7 +4043,7 @@ - + @@ -4057,11 +4057,11 @@ - + - + @@ -4085,7 +4085,7 @@ - + @@ -4129,7 +4129,7 @@ - + @@ -4175,7 +4175,7 @@ - + @@ -4185,11 +4185,11 @@ - + - + @@ -4213,7 +4213,7 @@ - + @@ -4227,11 +4227,11 @@ - + - + @@ -4255,7 +4255,7 @@ - + @@ -4265,11 +4265,11 @@ - + - + @@ -4293,7 +4293,7 @@ - + @@ -4307,11 +4307,11 @@ - + - + @@ -4335,7 +4335,7 @@ - + @@ -4349,11 +4349,11 @@ - + - + @@ -4377,7 +4377,7 @@ - + @@ -4429,7 +4429,7 @@ - + @@ -4443,11 +4443,11 @@ - + - + @@ -4471,7 +4471,7 @@ - + @@ -4481,11 +4481,11 @@ - + - + @@ -4509,7 +4509,7 @@ - + @@ -4559,7 +4559,7 @@ - + @@ -4569,11 +4569,11 @@ - + - + @@ -4597,7 +4597,7 @@ - + @@ -4607,11 +4607,11 @@ - + - + @@ -4635,7 +4635,7 @@ - + @@ -4681,7 +4681,7 @@ - + @@ -4727,7 +4727,7 @@ - + @@ -4741,11 +4741,11 @@ - + - + @@ -4769,7 +4769,7 @@ - + @@ -4783,11 +4783,11 @@ - + - + @@ -4811,7 +4811,7 @@ - + @@ -4863,7 +4863,7 @@ - + @@ -4909,7 +4909,7 @@ - + @@ -4919,11 +4919,11 @@ - + - + @@ -4947,7 +4947,7 @@ - + @@ -4961,11 +4961,11 @@ - + - + @@ -4989,7 +4989,7 @@ - + @@ -5003,11 +5003,11 @@ - + - + @@ -5031,7 +5031,7 @@ - + @@ -5045,11 +5045,11 @@ - + - + @@ -5073,7 +5073,7 @@ - + @@ -5087,11 +5087,11 @@ - + - + @@ -5115,7 +5115,7 @@ - + @@ -5129,11 +5129,11 @@ - + - + @@ -5157,7 +5157,7 @@ - + @@ -5171,11 +5171,11 @@ - + - + @@ -5199,7 +5199,7 @@ - + @@ -5252,7 +5252,7 @@ - + @@ -5304,7 +5304,7 @@ - + @@ -5318,11 +5318,11 @@ - + - + @@ -5346,7 +5346,7 @@ - + @@ -5360,11 +5360,11 @@ - + - + @@ -5388,7 +5388,7 @@ - + @@ -5402,11 +5402,11 @@ - + - + @@ -5430,7 +5430,7 @@ - + @@ -5444,11 +5444,11 @@ - + - + @@ -5472,7 +5472,7 @@ - + @@ -5518,7 +5518,7 @@ - + @@ -5570,7 +5570,7 @@ - + @@ -5583,11 +5583,11 @@ - + - + @@ -5611,7 +5611,7 @@ - + @@ -5621,11 +5621,11 @@ - + - + @@ -5649,7 +5649,7 @@ - + @@ -5695,7 +5695,7 @@ - + @@ -5709,11 +5709,11 @@ - + - + @@ -5737,7 +5737,7 @@ - + @@ -5747,11 +5747,11 @@ - + - + @@ -5775,7 +5775,7 @@ - + @@ -5789,11 +5789,11 @@ - + - + @@ -5817,7 +5817,7 @@ - + @@ -5863,7 +5863,7 @@ - + @@ -5877,11 +5877,11 @@ - + - + @@ -5905,7 +5905,7 @@ - + @@ -5957,7 +5957,7 @@ - + @@ -5971,11 +5971,11 @@ - + - + @@ -5999,7 +5999,7 @@ - + @@ -6009,11 +6009,11 @@ - + - + @@ -6037,7 +6037,7 @@ - + @@ -6083,7 +6083,7 @@ - + @@ -6097,11 +6097,11 @@ - + - + @@ -6125,7 +6125,7 @@ - + @@ -6139,11 +6139,11 @@ - + - + @@ -6167,7 +6167,7 @@ - + @@ -6181,11 +6181,11 @@ - + - + @@ -6209,7 +6209,7 @@ - + @@ -6223,11 +6223,11 @@ - + - + @@ -6251,7 +6251,7 @@ - + @@ -6265,11 +6265,11 @@ - + - + @@ -6293,7 +6293,7 @@ - + @@ -6307,11 +6307,11 @@ - + - + @@ -6335,7 +6335,7 @@ - + @@ -6349,11 +6349,11 @@ - + - + @@ -6377,7 +6377,7 @@ - + @@ -6432,7 +6432,7 @@ - + @@ -6446,11 +6446,11 @@ - + - + @@ -6474,7 +6474,7 @@ - + @@ -6484,11 +6484,11 @@ - + - + @@ -6512,7 +6512,7 @@ - + @@ -6526,11 +6526,11 @@ - + - + @@ -6554,7 +6554,7 @@ - + @@ -6564,11 +6564,11 @@ - + - + @@ -6592,7 +6592,7 @@ - + @@ -6606,11 +6606,11 @@ - + - + @@ -6634,7 +6634,7 @@ - + @@ -6648,11 +6648,11 @@ - + - + @@ -6676,7 +6676,7 @@ - + @@ -6690,11 +6690,11 @@ - + - + @@ -6718,7 +6718,7 @@ - + @@ -6770,7 +6770,7 @@ - + @@ -6784,11 +6784,11 @@ - + - + @@ -6812,7 +6812,7 @@ - + @@ -6861,7 +6861,7 @@ - + @@ -6871,11 +6871,11 @@ - + - + @@ -6899,7 +6899,7 @@ - + @@ -6945,7 +6945,7 @@ - + @@ -6959,11 +6959,11 @@ - + - + @@ -6987,7 +6987,7 @@ - + @@ -7033,7 +7033,7 @@ - + @@ -7088,7 +7088,7 @@ - + @@ -7102,11 +7102,11 @@ - + - + @@ -7130,7 +7130,7 @@ - + @@ -7144,11 +7144,11 @@ - + - + @@ -7172,17 +7172,14 @@ - + - - - - + @@ -7227,7 +7224,7 @@ - + @@ -7273,7 +7270,7 @@ - + @@ -7341,7 +7338,7 @@ - + @@ -7387,7 +7384,7 @@ - + @@ -7433,7 +7430,7 @@ - + @@ -7447,11 +7444,11 @@ - + - + @@ -7475,7 +7472,7 @@ - + @@ -7521,7 +7518,7 @@ - + @@ -7570,7 +7567,7 @@ - + @@ -7584,11 +7581,11 @@ - + - + @@ -7612,7 +7609,7 @@ - + @@ -7626,11 +7623,11 @@ - + - + @@ -7654,7 +7651,7 @@ - + @@ -7668,11 +7665,11 @@ - + - + @@ -7696,7 +7693,7 @@ - + @@ -7748,7 +7745,7 @@ - + @@ -7758,11 +7755,11 @@ - + - + @@ -7786,7 +7783,7 @@ - + @@ -7800,11 +7797,11 @@ - + - + @@ -7828,7 +7825,7 @@ - + @@ -7842,11 +7839,11 @@ - + - + @@ -7870,7 +7867,7 @@ - + @@ -7884,11 +7881,11 @@ - + - + @@ -7912,7 +7909,7 @@ - + @@ -7926,11 +7923,11 @@ - + - + @@ -7954,7 +7951,7 @@ - + @@ -7968,11 +7965,11 @@ - + - + @@ -7996,7 +7993,7 @@ - + @@ -8006,11 +8003,11 @@ - + - + @@ -8034,7 +8031,7 @@ - + @@ -8080,7 +8077,7 @@ - + @@ -8126,7 +8123,7 @@ - + @@ -8140,11 +8137,11 @@ - + - + @@ -8168,7 +8165,7 @@ - + @@ -8182,11 +8179,11 @@ - + - + @@ -8210,7 +8207,7 @@ - + @@ -8224,11 +8221,11 @@ - + - + @@ -8252,7 +8249,7 @@ - + @@ -8266,11 +8263,11 @@ - + - + @@ -8294,7 +8291,7 @@ - + @@ -8308,11 +8305,11 @@ - + - + @@ -8336,7 +8333,7 @@ - + @@ -8350,11 +8347,11 @@ - + - + @@ -8378,7 +8375,7 @@ - + @@ -8392,11 +8389,11 @@ - + - + @@ -8420,7 +8417,7 @@ - + @@ -8466,7 +8463,7 @@ - + @@ -8521,7 +8518,7 @@ - + @@ -8535,11 +8532,11 @@ - + - + @@ -8563,28 +8560,25 @@ - + - - - - + - + - + @@ -8608,7 +8602,7 @@ - + @@ -8618,11 +8612,11 @@ - + - + @@ -8646,7 +8640,7 @@ - + @@ -8660,11 +8654,11 @@ - + - + @@ -8688,7 +8682,7 @@ - + @@ -8701,11 +8695,11 @@ - + - + @@ -8777,7 +8771,7 @@ - + @@ -8790,11 +8784,11 @@ - + - + @@ -8856,7 +8850,7 @@ - + @@ -8869,11 +8863,11 @@ - + - + @@ -8905,7 +8899,7 @@ - + @@ -8918,11 +8912,11 @@ - + - + @@ -8979,7 +8973,7 @@ - + @@ -8992,11 +8986,11 @@ - + - + @@ -9038,7 +9032,7 @@ - + @@ -9051,11 +9045,11 @@ - + - + @@ -9087,7 +9081,7 @@ - + @@ -9100,11 +9094,11 @@ - + - + @@ -9176,7 +9170,7 @@ - + @@ -9189,11 +9183,11 @@ - + - + @@ -9235,7 +9229,7 @@ - + @@ -9248,11 +9242,11 @@ - + - + @@ -10143,7 +10137,7 @@ - + @@ -10156,11 +10150,11 @@ - + - + @@ -10202,7 +10196,7 @@ - + @@ -10215,11 +10209,11 @@ - + - + @@ -10266,7 +10260,7 @@ - + @@ -10279,11 +10273,11 @@ - + - + @@ -11857,7 +11851,7 @@ - + @@ -11870,11 +11864,11 @@ - + - + @@ -12120,7 +12114,7 @@ - + @@ -12133,11 +12127,11 @@ - + - + @@ -12797,7 +12791,7 @@ - + @@ -12810,11 +12804,11 @@ - + - + @@ -12971,7 +12965,7 @@ - + @@ -12984,11 +12978,11 @@ - + - + @@ -13160,7 +13154,7 @@ - + @@ -13173,11 +13167,11 @@ - + - + @@ -13204,7 +13198,7 @@ - + @@ -13217,11 +13211,11 @@ - + - + @@ -13253,7 +13247,7 @@ - + @@ -13266,11 +13260,11 @@ - + - + @@ -13307,7 +13301,7 @@ - + @@ -13320,11 +13314,11 @@ - + - + @@ -13448,7 +13442,7 @@ - + @@ -13461,11 +13455,11 @@ - + - + @@ -13522,7 +13516,7 @@ - + @@ -13535,11 +13529,11 @@ - + - + @@ -13621,7 +13615,7 @@ - + @@ -13634,11 +13628,11 @@ - + - + @@ -13680,7 +13674,7 @@ - + @@ -13693,11 +13687,11 @@ - + - + @@ -15384,7 +15378,7 @@ - + @@ -15397,11 +15391,11 @@ - + - + @@ -15438,7 +15432,7 @@ - + @@ -15451,11 +15445,11 @@ - + - + @@ -15887,7 +15881,7 @@ - + @@ -15900,11 +15894,11 @@ - + - + @@ -15968,7 +15962,7 @@ - + @@ -15981,11 +15975,11 @@ - + - + @@ -16027,7 +16021,7 @@ - + @@ -16040,11 +16034,11 @@ - + - + @@ -16111,7 +16105,7 @@ - + @@ -16124,11 +16118,11 @@ - + - + @@ -16200,7 +16194,7 @@ - + @@ -16213,11 +16207,11 @@ - + - + @@ -16299,7 +16293,7 @@ - + @@ -16312,11 +16306,11 @@ - + - + @@ -16538,7 +16532,7 @@ - + @@ -16551,11 +16545,11 @@ - + - + @@ -21182,7 +21176,7 @@ - + @@ -21195,11 +21189,11 @@ - + - + @@ -21251,7 +21245,7 @@ - + @@ -21264,11 +21258,11 @@ - + - + @@ -24144,7 +24138,7 @@ - + @@ -24157,11 +24151,11 @@ - + - + @@ -24198,7 +24192,7 @@ - + @@ -24211,11 +24205,11 @@ - + - + @@ -24262,7 +24256,7 @@ - + @@ -24275,11 +24269,11 @@ - + - + @@ -25136,27 +25130,24 @@ - + - - - - + - + - + @@ -25218,7 +25209,7 @@ - + @@ -25231,11 +25222,11 @@ - + - + @@ -25262,7 +25253,7 @@ - + @@ -25275,11 +25266,11 @@ - + - + @@ -25341,7 +25332,7 @@ - + @@ -25354,11 +25345,11 @@ - + - + @@ -25470,7 +25461,7 @@ - + @@ -25483,11 +25474,11 @@ - + - + @@ -25564,7 +25555,7 @@ - + @@ -25577,11 +25568,11 @@ - + - + @@ -25618,7 +25609,7 @@ - + @@ -25631,11 +25622,11 @@ - + - + @@ -25863,7 +25854,7 @@ - + @@ -25876,11 +25867,11 @@ - + - + @@ -25912,7 +25903,7 @@ - + @@ -25925,11 +25916,11 @@ - + - + @@ -26079,7 +26070,7 @@ - + @@ -26092,11 +26083,11 @@ - + - + @@ -26133,7 +26124,7 @@ - + @@ -26146,11 +26137,11 @@ - + - + @@ -28524,7 +28515,7 @@ - + @@ -28537,11 +28528,11 @@ - + - + @@ -28588,7 +28579,7 @@ - + @@ -28601,11 +28592,11 @@ - + - + @@ -28642,7 +28633,7 @@ - + @@ -28655,11 +28646,11 @@ - + - + @@ -28696,7 +28687,7 @@ - + @@ -28709,11 +28700,11 @@ - + - + @@ -28984,7 +28975,7 @@ - + @@ -28997,11 +28988,11 @@ - + - + @@ -29068,7 +29059,7 @@ - + @@ -29081,11 +29072,11 @@ - + - + @@ -29249,7 +29240,7 @@ - + @@ -29262,11 +29253,11 @@ - + - + @@ -29308,7 +29299,7 @@ - + @@ -29321,11 +29312,11 @@ - + - + @@ -29581,7 +29572,7 @@ - + @@ -29597,11 +29588,11 @@ - + - + @@ -29698,7 +29689,7 @@ - + @@ -29711,11 +29702,11 @@ - + - + @@ -29964,7 +29955,7 @@ - + @@ -29977,11 +29968,11 @@ - + - + @@ -30033,7 +30024,7 @@ - + @@ -30046,11 +30037,11 @@ - + - + @@ -33245,7 +33236,7 @@ - + @@ -33258,11 +33249,11 @@ - + - + @@ -33299,7 +33290,7 @@ - + @@ -33312,11 +33303,11 @@ - + - + @@ -33412,7 +33403,7 @@ - + @@ -33425,11 +33416,11 @@ - + - + @@ -33549,7 +33540,7 @@ - + @@ -33562,11 +33553,11 @@ - + - + @@ -33608,7 +33599,7 @@ - + @@ -33621,11 +33612,11 @@ - + - + @@ -33677,7 +33668,7 @@ - + @@ -33690,11 +33681,11 @@ - + - + @@ -33766,7 +33757,7 @@ - + @@ -33779,11 +33770,11 @@ - + - + @@ -33954,7 +33945,7 @@ - + @@ -33967,11 +33958,11 @@ - + - + @@ -34018,7 +34009,7 @@ - + @@ -34031,11 +34022,11 @@ - + - + @@ -34436,7 +34427,7 @@ - + @@ -34449,11 +34440,11 @@ - + - + @@ -34490,7 +34481,7 @@ - + @@ -34503,11 +34494,11 @@ - + - + @@ -34549,7 +34540,7 @@ - + @@ -34562,11 +34553,11 @@ - + - + @@ -34623,7 +34614,7 @@ - + @@ -34636,11 +34627,11 @@ - + - + @@ -35430,7 +35421,7 @@ - + @@ -35443,11 +35434,11 @@ - + - + @@ -35489,7 +35480,7 @@ - + @@ -35502,11 +35493,11 @@ - + - + @@ -35743,7 +35734,7 @@ - + @@ -35759,11 +35750,11 @@ - + - + @@ -35860,7 +35851,7 @@ - + @@ -35873,11 +35864,11 @@ - + - + @@ -35909,7 +35900,7 @@ - + @@ -35922,11 +35913,11 @@ - + - + @@ -35978,7 +35969,7 @@ - + @@ -35991,11 +35982,11 @@ - + - + @@ -36032,7 +36023,7 @@ - + @@ -36045,11 +36036,11 @@ - + - + @@ -36623,11 +36614,26 @@ + + + + + + + + + + + + + + + @@ -37450,7 +37456,7 @@ - + @@ -37463,11 +37469,11 @@ - + - + @@ -37534,7 +37540,7 @@ - + @@ -37547,11 +37553,11 @@ - + - + @@ -37608,7 +37614,7 @@ - + @@ -37621,11 +37627,11 @@ - + - + @@ -37692,7 +37698,7 @@ - + @@ -37705,11 +37711,11 @@ - + - + @@ -37776,7 +37782,7 @@ - + @@ -37789,11 +37795,11 @@ - + - + @@ -37825,7 +37831,7 @@ - + @@ -37838,11 +37844,11 @@ - + - + @@ -37894,7 +37900,7 @@ - + @@ -37907,11 +37913,11 @@ - + - + @@ -38262,7 +38268,7 @@ - + @@ -38275,11 +38281,11 @@ - + - + @@ -38306,7 +38312,7 @@ - + @@ -38319,11 +38325,11 @@ - + - + @@ -38375,7 +38381,7 @@ - + @@ -38388,11 +38394,11 @@ - + - + @@ -38527,7 +38533,7 @@ - + @@ -38540,11 +38546,11 @@ - + - + @@ -38576,7 +38582,7 @@ - + @@ -38589,11 +38595,11 @@ - + - + @@ -38810,7 +38816,7 @@ - + @@ -38823,11 +38829,11 @@ - + - + @@ -39132,7 +39138,7 @@ - + @@ -39145,11 +39151,11 @@ - + - + @@ -39196,7 +39202,7 @@ - + @@ -39209,11 +39215,11 @@ - + - + @@ -39865,7 +39871,7 @@ - + @@ -39878,11 +39884,11 @@ - + - + @@ -39979,7 +39985,7 @@ - + @@ -39992,11 +39998,11 @@ - + - + @@ -40122,7 +40128,7 @@ - + @@ -40135,11 +40141,11 @@ - + - + @@ -40445,7 +40451,7 @@ - + @@ -40458,11 +40464,11 @@ - + - + @@ -40509,7 +40515,7 @@ - + @@ -40522,11 +40528,11 @@ - + - + @@ -40638,7 +40644,7 @@ - + @@ -40651,11 +40657,11 @@ - + - + @@ -40697,7 +40703,7 @@ - + @@ -40710,11 +40716,11 @@ - + - + @@ -40821,7 +40827,7 @@ - + @@ -40834,11 +40840,11 @@ - + - + @@ -40880,7 +40886,7 @@ - + @@ -40893,11 +40899,11 @@ - + - + @@ -41019,7 +41025,7 @@ - + @@ -41032,11 +41038,11 @@ - + - + @@ -41073,7 +41079,7 @@ - + @@ -41086,11 +41092,11 @@ - + - + @@ -41132,7 +41138,7 @@ - + @@ -41145,11 +41151,11 @@ - + - + @@ -41251,7 +41257,7 @@ - + @@ -41264,11 +41270,11 @@ - + - + @@ -41335,7 +41341,7 @@ - + @@ -41348,11 +41354,11 @@ - + - + @@ -41384,7 +41390,7 @@ - + @@ -41397,11 +41403,11 @@ - + - + @@ -41443,7 +41449,7 @@ - + @@ -41456,11 +41462,11 @@ - + - + @@ -41497,7 +41503,7 @@ - + @@ -41510,11 +41516,11 @@ - + - + @@ -41556,7 +41562,7 @@ - + @@ -41572,11 +41578,11 @@ - + - + @@ -41765,6 +41771,11 @@ + + + + + @@ -41853,12 +41864,27 @@ + + + + + + + + + + + + + + + @@ -41879,6 +41905,16 @@ + + + + + + + + + + @@ -41918,6 +41954,11 @@ + + + + + @@ -41928,11 +41969,46 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43146,7 +43222,7 @@ - + @@ -43159,11 +43235,11 @@ - + - + @@ -43215,7 +43291,7 @@ - + @@ -43228,11 +43304,11 @@ - + - + @@ -43284,7 +43360,7 @@ - + @@ -43297,11 +43373,11 @@ - + - + @@ -43353,7 +43429,7 @@ - + @@ -43366,11 +43442,11 @@ - + - + @@ -44208,7 +44284,7 @@ - + @@ -44221,11 +44297,11 @@ - + - + @@ -44257,7 +44333,7 @@ - + @@ -44270,11 +44346,11 @@ - + - + @@ -44306,7 +44382,7 @@ - + @@ -44319,11 +44395,11 @@ - + - + @@ -44380,7 +44456,7 @@ - + @@ -44393,11 +44469,11 @@ - + - + @@ -44439,7 +44515,7 @@ - + @@ -44452,11 +44528,11 @@ - + - + @@ -44547,7 +44623,7 @@ - + @@ -44563,11 +44639,11 @@ - + - + @@ -48179,11 +48255,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -50762,7 +50863,7 @@ - + @@ -50775,11 +50876,11 @@ - + - + @@ -50826,7 +50927,7 @@ - + @@ -50839,11 +50940,11 @@ - + - + @@ -50923,7 +51024,7 @@ - + @@ -50936,11 +51037,11 @@ - + - + diff --git a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/valuesets.xml b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/valuesets.xml index bf105ce911e..30a635d607b 100644 --- a/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/valuesets.xml +++ b/hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset/valuesets.xml @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -722,7 +722,7 @@ - + @@ -768,7 +768,7 @@ - + @@ -788,7 +788,7 @@ - + @@ -828,7 +828,7 @@ - + @@ -845,7 +845,7 @@ - + @@ -890,7 +890,7 @@ - + @@ -1032,7 +1032,7 @@ - + @@ -1061,7 +1061,7 @@ - + @@ -1114,7 +1114,7 @@ - + @@ -1134,7 +1134,7 @@ - + @@ -1179,7 +1179,7 @@ - + @@ -1255,7 +1255,7 @@ - + @@ -1306,7 +1306,7 @@ - + @@ -1323,7 +1323,7 @@ - + @@ -1353,7 +1353,7 @@ - + @@ -1405,7 +1405,7 @@ - + @@ -1425,7 +1425,7 @@ - + @@ -1475,7 +1475,7 @@ - + @@ -1492,7 +1492,7 @@ - + @@ -1542,7 +1542,7 @@ - + @@ -1604,7 +1604,7 @@ - + @@ -1624,7 +1624,7 @@ - + @@ -1679,7 +1679,7 @@ - + @@ -1699,7 +1699,7 @@ - + @@ -1744,7 +1744,7 @@ - + @@ -1764,7 +1764,7 @@ - + @@ -1799,7 +1799,7 @@ - + @@ -1865,7 +1865,7 @@ - + @@ -1885,7 +1885,7 @@ - + @@ -1935,7 +1935,7 @@ - + @@ -1955,7 +1955,7 @@ - + @@ -2000,7 +2000,7 @@ - + @@ -2020,7 +2020,7 @@ - + @@ -2060,7 +2060,7 @@ - + @@ -2080,7 +2080,7 @@ - + @@ -2115,7 +2115,7 @@ - + @@ -2135,7 +2135,7 @@ - + @@ -2175,7 +2175,7 @@ - + @@ -2195,7 +2195,7 @@ - + @@ -2250,7 +2250,7 @@ - + @@ -2270,7 +2270,7 @@ - + @@ -2325,7 +2325,7 @@ - + @@ -2382,7 +2382,7 @@ - + @@ -2402,7 +2402,7 @@ - + @@ -2462,7 +2462,7 @@ - + @@ -2479,7 +2479,7 @@ - + @@ -2524,7 +2524,7 @@ - + @@ -2573,7 +2573,7 @@ - + @@ -2593,7 +2593,7 @@ - + @@ -2633,7 +2633,7 @@ - + @@ -2711,7 +2711,7 @@ - + @@ -2763,7 +2763,7 @@ - + @@ -2994,7 +2994,7 @@ - + @@ -3014,7 +3014,7 @@ - + @@ -3054,7 +3054,7 @@ - + @@ -3074,7 +3074,7 @@ - + @@ -3139,7 +3139,7 @@ - + @@ -3159,7 +3159,7 @@ - + @@ -3194,7 +3194,7 @@ - + @@ -3253,7 +3253,7 @@ - + @@ -3270,7 +3270,7 @@ - + @@ -3311,7 +3311,7 @@ - + @@ -3331,7 +3331,7 @@ - + @@ -3370,13 +3370,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -3468,7 +3523,7 @@ - + @@ -3488,7 +3543,7 @@ - + @@ -3528,7 +3583,7 @@ - + @@ -3548,7 +3603,7 @@ - + @@ -3633,7 +3688,7 @@ - + @@ -3714,7 +3769,7 @@ - + @@ -3816,7 +3871,7 @@ - + @@ -3885,7 +3940,7 @@ - + @@ -3936,7 +3991,7 @@ - + @@ -3956,7 +4011,7 @@ - + @@ -4026,7 +4081,7 @@ - + @@ -4046,7 +4101,7 @@ - + @@ -4096,7 +4151,7 @@ - + @@ -4116,7 +4171,7 @@ - + @@ -4156,7 +4211,7 @@ - + @@ -4176,7 +4231,7 @@ - + @@ -4236,7 +4291,7 @@ - + @@ -4304,7 +4359,7 @@ - + @@ -4375,7 +4430,7 @@ - + @@ -4424,7 +4479,7 @@ - + @@ -4444,7 +4499,7 @@ - + @@ -4489,7 +4544,7 @@ - + @@ -4505,7 +4560,7 @@ - + @@ -4591,6 +4646,11 @@ + + + + + @@ -4751,6 +4811,11 @@ + + + + + @@ -4879,7 +4944,7 @@ - + @@ -5056,6 +5121,11 @@ + + + + + @@ -5120,7 +5190,7 @@ - + @@ -5140,7 +5210,7 @@ - + @@ -5175,7 +5245,7 @@ - + @@ -5195,7 +5265,7 @@ - + @@ -5240,7 +5310,7 @@ - + @@ -5257,7 +5327,7 @@ - + @@ -5297,7 +5367,7 @@ - + @@ -5317,7 +5387,7 @@ - + @@ -5357,7 +5427,7 @@ - + @@ -5377,7 +5447,7 @@ - + @@ -5423,7 +5493,7 @@ - + @@ -5443,7 +5513,7 @@ - + @@ -5483,7 +5553,7 @@ - + @@ -5523,7 +5593,7 @@ - + @@ -5575,7 +5645,7 @@ - + @@ -5595,7 +5665,7 @@ - + @@ -5640,7 +5710,7 @@ - + @@ -5822,7 +5892,7 @@ - + @@ -5842,7 +5912,7 @@ - + @@ -5902,7 +5972,7 @@ - + @@ -5922,7 +5992,7 @@ - + @@ -5987,7 +6057,7 @@ - + @@ -6035,7 +6105,7 @@ - + @@ -6055,7 +6125,7 @@ - + @@ -6095,7 +6165,7 @@ - + @@ -6178,7 +6248,7 @@ - + @@ -6195,7 +6265,7 @@ - + @@ -6245,7 +6315,7 @@ - + @@ -6265,7 +6335,7 @@ - + @@ -6322,7 +6392,7 @@ - + @@ -6342,7 +6412,7 @@ - + @@ -6377,7 +6447,7 @@ - + @@ -6423,7 +6493,7 @@ - + @@ -6443,7 +6513,7 @@ - + @@ -6483,7 +6553,7 @@ - + @@ -6503,7 +6573,7 @@ - + @@ -6563,7 +6633,7 @@ - + @@ -6583,7 +6653,7 @@ - + @@ -6638,7 +6708,7 @@ - + @@ -6658,7 +6728,7 @@ - + @@ -6703,7 +6773,7 @@ - + @@ -6723,7 +6793,7 @@ - + @@ -6768,7 +6838,7 @@ - + @@ -6859,7 +6929,7 @@ - + @@ -6911,7 +6981,7 @@ - + @@ -6963,7 +7033,7 @@ - + @@ -6983,7 +7053,7 @@ - + @@ -7017,7 +7087,7 @@ - + @@ -7037,7 +7107,7 @@ - + @@ -7087,7 +7157,7 @@ - + @@ -7107,7 +7177,7 @@ - + @@ -7152,7 +7222,7 @@ - + @@ -7172,7 +7242,7 @@ - + @@ -7217,7 +7287,7 @@ - + @@ -7268,7 +7338,7 @@ - + @@ -7319,7 +7389,7 @@ - + @@ -7381,7 +7451,7 @@ - + @@ -7438,7 +7508,7 @@ - + @@ -7455,7 +7525,7 @@ - + @@ -7500,7 +7570,7 @@ - + @@ -7520,7 +7590,7 @@ - + @@ -7590,7 +7660,7 @@ - + @@ -7686,7 +7756,7 @@ - + @@ -7706,7 +7776,7 @@ - + @@ -7746,7 +7816,7 @@ - + @@ -7775,7 +7845,7 @@ - + @@ -7803,7 +7873,7 @@ - + @@ -7823,7 +7893,7 @@ - + @@ -7863,7 +7933,7 @@ - + @@ -7883,7 +7953,7 @@ - + @@ -7928,7 +7998,7 @@ - + @@ -7948,7 +8018,7 @@ - + @@ -7993,7 +8063,7 @@ - + @@ -8062,7 +8132,7 @@ - + @@ -8082,7 +8152,7 @@ - + @@ -8127,7 +8197,7 @@ - + @@ -8196,7 +8266,7 @@ - + @@ -8216,7 +8286,7 @@ - + @@ -8281,7 +8351,7 @@ - + @@ -8342,14 +8412,14 @@ - + - + @@ -8399,7 +8469,7 @@ - + @@ -8471,7 +8541,7 @@ - + @@ -8491,7 +8561,7 @@ - + @@ -8531,7 +8601,7 @@ - + @@ -8551,7 +8621,7 @@ - + @@ -8596,7 +8666,7 @@ - + @@ -8616,7 +8686,7 @@ - + @@ -8661,7 +8731,7 @@ - + @@ -8713,7 +8783,7 @@ - + @@ -8757,7 +8827,7 @@ - + @@ -8777,7 +8847,7 @@ - + @@ -8817,7 +8887,7 @@ - + @@ -8869,7 +8939,7 @@ - + @@ -8882,7 +8952,7 @@ - + @@ -9070,7 +9140,7 @@ - + @@ -9179,7 +9249,7 @@ - + @@ -9231,7 +9301,7 @@ - + @@ -9251,7 +9321,7 @@ - + @@ -9301,7 +9371,7 @@ - + @@ -9310,7 +9380,7 @@ - + @@ -9321,7 +9391,7 @@ - + @@ -9376,7 +9446,7 @@ - + @@ -9428,7 +9498,7 @@ - + @@ -9448,7 +9518,7 @@ - + @@ -9493,7 +9563,7 @@ - + @@ -9529,12 +9599,12 @@ - + - + @@ -9545,7 +9615,7 @@ - + @@ -9642,7 +9712,7 @@ - + @@ -9694,7 +9764,7 @@ - + @@ -9714,7 +9784,7 @@ - + @@ -9733,27 +9803,32 @@ - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -9774,7 +9849,7 @@ - + @@ -9836,7 +9911,7 @@ - + @@ -9922,7 +9997,7 @@ - + @@ -9942,7 +10017,7 @@ - + @@ -10001,13 +10076,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -10027,7 +10157,7 @@ - + @@ -10092,7 +10222,7 @@ - + @@ -10291,7 +10421,7 @@ - + @@ -10353,7 +10483,7 @@ - + @@ -10464,7 +10594,7 @@ - + @@ -10484,7 +10614,7 @@ - + @@ -10534,7 +10664,7 @@ - + @@ -10554,7 +10684,7 @@ - + @@ -10609,7 +10739,7 @@ - + @@ -10675,7 +10805,7 @@ - + @@ -10695,7 +10825,7 @@ - + @@ -10735,7 +10865,7 @@ - + @@ -10755,7 +10885,7 @@ - + @@ -10795,7 +10925,7 @@ - + @@ -10852,14 +10982,14 @@ - + - + @@ -10909,7 +11039,7 @@ - + @@ -10929,7 +11059,7 @@ - + @@ -10969,7 +11099,7 @@ - + @@ -10989,7 +11119,7 @@ - + @@ -11029,7 +11159,7 @@ - + @@ -11085,7 +11215,7 @@ - + @@ -11172,7 +11302,7 @@ - + @@ -11192,7 +11322,7 @@ - + @@ -11237,7 +11367,7 @@ - + @@ -11387,7 +11517,7 @@ - + @@ -11407,7 +11537,7 @@ - + @@ -11447,7 +11577,7 @@ - + @@ -11503,7 +11633,7 @@ - + @@ -11520,7 +11650,7 @@ - + @@ -11565,7 +11695,7 @@ - + @@ -11622,7 +11752,7 @@ - + @@ -11674,7 +11804,7 @@ - + @@ -11694,7 +11824,7 @@ - + @@ -11729,7 +11859,7 @@ - + @@ -11749,7 +11879,7 @@ - + @@ -11778,7 +11908,7 @@ - + @@ -11844,7 +11974,7 @@ - + @@ -11864,7 +11994,7 @@ - + @@ -11914,7 +12044,7 @@ - + @@ -11934,7 +12064,7 @@ - + @@ -11969,7 +12099,7 @@ - + @@ -11989,7 +12119,7 @@ - + @@ -12024,7 +12154,7 @@ - + @@ -12044,7 +12174,7 @@ - + @@ -12104,7 +12234,7 @@ - + @@ -12410,7 +12540,7 @@ - + @@ -12476,7 +12606,7 @@ - + @@ -12567,7 +12697,7 @@ - + @@ -12587,7 +12717,7 @@ - + @@ -12627,7 +12757,7 @@ - + @@ -12647,7 +12777,7 @@ - + @@ -12712,7 +12842,7 @@ - + @@ -12732,7 +12862,7 @@ - + @@ -12772,7 +12902,7 @@ - + @@ -12792,7 +12922,7 @@ - + @@ -12835,7 +12965,7 @@ - + @@ -12855,7 +12985,7 @@ - + @@ -12900,7 +13030,7 @@ - + @@ -12951,7 +13081,7 @@ - + @@ -12971,7 +13101,7 @@ - + @@ -13021,7 +13151,7 @@ - + @@ -13041,7 +13171,7 @@ - + @@ -13091,7 +13221,7 @@ - + @@ -13111,7 +13241,7 @@ - + @@ -13156,7 +13286,7 @@ - + @@ -13232,7 +13362,7 @@ - + @@ -13252,7 +13382,7 @@ - + @@ -13289,7 +13419,7 @@ - + @@ -13309,7 +13439,7 @@ - + @@ -13342,7 +13472,7 @@ - + @@ -13362,7 +13492,7 @@ - + @@ -13427,7 +13557,7 @@ - + @@ -13447,7 +13577,7 @@ - + @@ -13555,7 +13685,7 @@ - + @@ -13567,7 +13697,7 @@ - + @@ -13587,7 +13717,7 @@ - + @@ -13627,7 +13757,7 @@ - + @@ -13647,7 +13777,7 @@ - + @@ -13757,7 +13887,7 @@ - + @@ -13777,7 +13907,7 @@ - + @@ -13817,7 +13947,7 @@ - + @@ -13837,7 +13967,7 @@ - + @@ -13882,7 +14012,7 @@ - + @@ -13902,7 +14032,7 @@ - + @@ -13942,7 +14072,7 @@ - + @@ -13962,7 +14092,7 @@ - + @@ -14027,7 +14157,7 @@ - + @@ -14047,7 +14177,7 @@ - + @@ -14092,7 +14222,7 @@ - + @@ -14112,7 +14242,7 @@ - + @@ -14147,7 +14277,7 @@ - + @@ -14208,7 +14338,7 @@ - + @@ -14228,7 +14358,7 @@ - + @@ -14288,7 +14418,7 @@ - + @@ -14305,7 +14435,7 @@ - + @@ -14350,7 +14480,7 @@ - + @@ -14370,7 +14500,7 @@ - + @@ -14405,7 +14535,7 @@ - + @@ -14425,7 +14555,7 @@ - + @@ -14475,7 +14605,7 @@ - + @@ -14495,7 +14625,7 @@ - + @@ -14535,7 +14665,7 @@ - + @@ -14555,7 +14685,7 @@ - + @@ -14590,7 +14720,7 @@ - + @@ -14636,6 +14766,11 @@ + + + + + @@ -14645,7 +14780,7 @@ - + @@ -14654,7 +14789,7 @@ - + @@ -14665,7 +14800,7 @@ - + @@ -14720,7 +14855,7 @@ - + @@ -14792,7 +14927,7 @@ - + @@ -14812,7 +14947,7 @@ - + @@ -14857,7 +14992,7 @@ - + @@ -14873,7 +15008,7 @@ - + @@ -14958,7 +15093,7 @@ - + @@ -14978,7 +15113,7 @@ - + @@ -15043,7 +15178,7 @@ - + @@ -15093,7 +15228,7 @@ - + @@ -15113,7 +15248,7 @@ - + @@ -15203,7 +15338,7 @@ - + @@ -15260,7 +15395,7 @@ - + @@ -15326,7 +15461,7 @@ - + @@ -15388,7 +15523,7 @@ - + @@ -15408,7 +15543,7 @@ - + @@ -15453,7 +15588,7 @@ - + @@ -15555,7 +15690,7 @@ - + @@ -15575,7 +15710,7 @@ - + @@ -15620,7 +15755,7 @@ - + @@ -15640,7 +15775,7 @@ - + @@ -15685,7 +15820,7 @@ - + @@ -15705,7 +15840,7 @@ - + @@ -15780,7 +15915,7 @@ - + @@ -15800,7 +15935,7 @@ - + @@ -15865,7 +16000,7 @@ - + @@ -15882,7 +16017,7 @@ - + @@ -15917,7 +16052,7 @@ - + @@ -15968,7 +16103,7 @@ - + @@ -15988,7 +16123,7 @@ - + @@ -16033,7 +16168,7 @@ - + @@ -16073,13 +16208,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -16099,7 +16304,7 @@ - + @@ -16149,7 +16354,7 @@ - + @@ -16166,7 +16371,7 @@ - + @@ -16206,7 +16411,7 @@ - + @@ -16226,7 +16431,7 @@ - + @@ -16281,7 +16486,7 @@ - + @@ -16301,7 +16506,7 @@ - + @@ -16356,7 +16561,7 @@ - + @@ -16410,7 +16615,7 @@ - + @@ -16430,7 +16635,7 @@ - + @@ -16485,7 +16690,7 @@ - + @@ -16505,7 +16710,7 @@ - + @@ -16545,7 +16750,7 @@ - + @@ -16665,7 +16870,7 @@ - + @@ -16685,7 +16890,7 @@ - + @@ -16725,7 +16930,7 @@ - + @@ -16745,7 +16950,7 @@ - + @@ -16774,7 +16979,7 @@ - + @@ -16840,7 +17045,7 @@ - + @@ -16860,7 +17065,7 @@ - + @@ -16895,7 +17100,7 @@ - + @@ -16966,7 +17171,7 @@ - + @@ -17041,7 +17246,7 @@ - + @@ -17061,7 +17266,7 @@ - + @@ -17146,7 +17351,7 @@ - + @@ -17217,7 +17422,7 @@ - + @@ -17237,7 +17442,7 @@ - + @@ -17277,7 +17482,7 @@ - + @@ -17524,7 +17729,7 @@ - + @@ -17544,7 +17749,7 @@ - + @@ -17589,7 +17794,7 @@ - + @@ -20610,7 +20815,7 @@ - + @@ -20630,7 +20835,7 @@ - + @@ -20700,7 +20905,7 @@ - + @@ -20717,7 +20922,7 @@ - + @@ -20757,7 +20962,7 @@ - + @@ -20777,7 +20982,7 @@ - + @@ -20817,7 +21022,7 @@ - + @@ -20837,7 +21042,7 @@ - + @@ -20897,7 +21102,7 @@ - + @@ -20974,7 +21179,7 @@ - + @@ -22383,7 +22588,7 @@ - + @@ -22403,7 +22608,7 @@ - + @@ -22448,7 +22653,7 @@ - + @@ -22468,7 +22673,7 @@ - + @@ -22513,7 +22718,7 @@ - + @@ -22533,7 +22738,7 @@ - + @@ -22570,7 +22775,7 @@ - + @@ -22590,7 +22795,7 @@ - + @@ -22630,7 +22835,7 @@ - + @@ -22647,7 +22852,7 @@ - + @@ -22687,7 +22892,7 @@ - + @@ -22707,7 +22912,7 @@ - + @@ -22747,7 +22952,7 @@ - + @@ -22808,13 +23013,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -22831,7 +23096,7 @@ - + @@ -22971,7 +23236,7 @@ - + @@ -22991,7 +23256,7 @@ - + @@ -23046,7 +23311,7 @@ - + @@ -23066,7 +23331,7 @@ - + @@ -23116,7 +23381,7 @@ - + @@ -23136,7 +23401,7 @@ - + @@ -23206,7 +23471,7 @@ - + @@ -23275,7 +23540,7 @@ - + @@ -23290,7 +23555,7 @@ - + @@ -23405,7 +23670,7 @@ - + @@ -23425,7 +23690,7 @@ - + @@ -23495,7 +23760,7 @@ - + @@ -23515,7 +23780,7 @@ - + @@ -23560,7 +23825,7 @@ - + @@ -23580,7 +23845,7 @@ - + @@ -23620,7 +23885,7 @@ - + @@ -23691,7 +23956,7 @@ - + @@ -23711,7 +23976,7 @@ - + @@ -23756,7 +24021,7 @@ - + @@ -23832,7 +24097,7 @@ - + @@ -23852,7 +24117,7 @@ - + @@ -23912,7 +24177,7 @@ - + @@ -24024,7 +24289,7 @@ - + @@ -24044,7 +24309,7 @@ - + @@ -24089,7 +24354,7 @@ - + @@ -24109,7 +24374,7 @@ - + @@ -24164,7 +24429,7 @@ - + @@ -24232,7 +24497,7 @@ - + @@ -24289,7 +24554,7 @@ - + @@ -24346,7 +24611,7 @@ - + @@ -24366,7 +24631,7 @@ - + @@ -24431,7 +24696,7 @@ - + @@ -24451,7 +24716,7 @@ - + @@ -24515,7 +24780,7 @@ - + @@ -24535,7 +24800,7 @@ - + @@ -24605,7 +24870,7 @@ - + @@ -24672,7 +24937,7 @@ - + @@ -24689,7 +24954,7 @@ - + @@ -24724,7 +24989,7 @@ - + @@ -24744,7 +25009,7 @@ - + @@ -24889,7 +25154,7 @@ - + @@ -24909,7 +25174,7 @@ - + @@ -24969,7 +25234,7 @@ - + @@ -24989,7 +25254,7 @@ - + @@ -25034,7 +25299,7 @@ - + @@ -25091,7 +25356,7 @@ - + @@ -25108,7 +25373,7 @@ - + @@ -25143,7 +25408,7 @@ - + @@ -25201,7 +25466,7 @@ - + @@ -25221,7 +25486,7 @@ - + @@ -25264,13 +25529,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -25327,7 +25672,7 @@ - + @@ -25347,7 +25692,7 @@ - + @@ -25387,7 +25732,7 @@ - + @@ -25468,7 +25813,7 @@ - + @@ -25488,7 +25833,7 @@ - + @@ -25528,7 +25873,7 @@ - + @@ -25609,7 +25954,7 @@ - + @@ -25629,7 +25974,7 @@ - + @@ -25674,7 +26019,7 @@ - + @@ -25694,7 +26039,7 @@ - + @@ -25759,7 +26104,7 @@ - + @@ -25779,7 +26124,7 @@ - + @@ -25829,7 +26174,7 @@ - + @@ -25849,7 +26194,7 @@ - + @@ -25899,7 +26244,7 @@ - + @@ -25919,7 +26264,7 @@ - + @@ -25969,7 +26314,7 @@ - + @@ -25989,7 +26334,7 @@ - + @@ -26025,6 +26370,11 @@ + + + + + @@ -26034,7 +26384,7 @@ - + @@ -26054,7 +26404,7 @@ - + @@ -26099,7 +26449,7 @@ - + @@ -26119,7 +26469,7 @@ - + @@ -26184,7 +26534,7 @@ - + @@ -26204,7 +26554,7 @@ - + @@ -26244,7 +26594,7 @@ - + @@ -26264,7 +26614,7 @@ - + @@ -26319,7 +26669,7 @@ - + @@ -26440,7 +26790,7 @@ - + @@ -26460,7 +26810,7 @@ - + @@ -26505,7 +26855,7 @@ - + @@ -26525,7 +26875,7 @@ - + @@ -26605,7 +26955,7 @@ - + @@ -26686,7 +27036,7 @@ - + @@ -26748,7 +27098,7 @@ - + @@ -26765,7 +27115,7 @@ - + @@ -26810,7 +27160,7 @@ - + @@ -26876,7 +27226,7 @@ - + @@ -27125,7 +27475,7 @@ - + @@ -27152,7 +27502,7 @@ - + @@ -27330,7 +27680,7 @@ - + @@ -27350,7 +27700,7 @@ - + @@ -27400,7 +27750,7 @@ - + @@ -27452,7 +27802,7 @@ - + @@ -27472,7 +27822,7 @@ - + @@ -27522,7 +27872,7 @@ - + @@ -27608,7 +27958,7 @@ - + @@ -27732,7 +28082,7 @@ - + @@ -27749,7 +28099,7 @@ - + @@ -27794,7 +28144,7 @@ - + @@ -27814,7 +28164,7 @@ - + @@ -27889,7 +28239,7 @@ - + @@ -27941,7 +28291,7 @@ - + @@ -27961,7 +28311,7 @@ - + @@ -27996,7 +28346,7 @@ - + @@ -28016,7 +28366,7 @@ - + @@ -28061,7 +28411,7 @@ - + @@ -28081,7 +28431,7 @@ - + @@ -28116,7 +28466,7 @@ - + @@ -28133,7 +28483,7 @@ - + @@ -28178,7 +28528,7 @@ - + @@ -28310,7 +28660,7 @@ - + @@ -28360,7 +28710,7 @@ - + @@ -28380,7 +28730,7 @@ - + @@ -28440,7 +28790,7 @@ - + @@ -28460,7 +28810,7 @@ - + @@ -28505,7 +28855,7 @@ - + @@ -28616,7 +28966,7 @@ - + @@ -28633,7 +28983,7 @@ - + @@ -28706,7 +29056,7 @@ - + @@ -28723,7 +29073,7 @@ - + @@ -28773,7 +29123,7 @@ - + @@ -28790,7 +29140,7 @@ - + @@ -28830,7 +29180,7 @@ - + @@ -28850,7 +29200,7 @@ - + @@ -28895,7 +29245,7 @@ - + @@ -28935,7 +29285,7 @@ - + @@ -28952,6 +29302,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -28961,7 +29336,7 @@ - + @@ -28981,7 +29356,7 @@ - + @@ -29021,7 +29396,7 @@ - + @@ -29041,7 +29416,7 @@ - + @@ -29076,7 +29451,7 @@ - + @@ -29089,7 +29464,7 @@ - + @@ -29124,7 +29499,7 @@ - + @@ -29281,94 +29656,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -29388,7 +29682,7 @@ - + @@ -29412,7 +29706,7 @@ - + @@ -29433,7 +29727,7 @@ - + @@ -29453,7 +29747,7 @@ - + @@ -29498,7 +29792,7 @@ - + @@ -29518,7 +29812,7 @@ - + @@ -29572,7 +29866,7 @@ - + @@ -29592,7 +29886,7 @@ - + @@ -29637,7 +29931,7 @@ - + @@ -29657,7 +29951,7 @@ - + @@ -29712,7 +30006,7 @@ - + @@ -29732,7 +30026,7 @@ - + @@ -29767,7 +30061,7 @@ - + @@ -29816,7 +30110,7 @@ - + @@ -29836,7 +30130,7 @@ - + @@ -29896,7 +30190,7 @@ - + @@ -29916,7 +30210,7 @@ - + @@ -29951,7 +30245,7 @@ - + @@ -30018,7 +30312,7 @@ - + @@ -30038,7 +30332,7 @@ - + @@ -30078,7 +30372,7 @@ - + @@ -30098,7 +30392,7 @@ - + @@ -30143,7 +30437,7 @@ - + @@ -30163,7 +30457,7 @@ - + @@ -30233,7 +30527,7 @@ - + @@ -30253,7 +30547,7 @@ - + @@ -30323,13 +30617,13 @@ - + - + @@ -30343,7 +30637,7 @@ - + @@ -30355,7 +30649,7 @@ - + @@ -30383,7 +30677,7 @@ - + @@ -30441,7 +30735,7 @@ - + @@ -30461,7 +30755,7 @@ - + @@ -30521,7 +30815,7 @@ - + @@ -30541,7 +30835,7 @@ - + @@ -30586,7 +30880,7 @@ - + @@ -30606,7 +30900,7 @@ - + @@ -30651,7 +30945,7 @@ - + @@ -30695,7 +30989,7 @@ - + @@ -30712,7 +31006,7 @@ - + @@ -30757,7 +31051,7 @@ - + @@ -30809,7 +31103,7 @@ - + @@ -30860,7 +31154,7 @@ - + @@ -30902,7 +31196,7 @@ - + @@ -30922,7 +31216,7 @@ - + @@ -30972,7 +31266,7 @@ - + @@ -30992,7 +31286,7 @@ - + @@ -31131,13 +31425,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -31157,7 +31506,7 @@ - + @@ -31202,7 +31551,7 @@ - + @@ -31222,7 +31571,7 @@ - + @@ -31262,7 +31611,7 @@ - + @@ -31314,7 +31663,7 @@ - + @@ -48465,7 +48814,7 @@ - + @@ -48645,7 +48994,7 @@ - + @@ -48665,7 +49014,7 @@ - + @@ -48710,7 +49059,7 @@ - + @@ -48739,7 +49088,7 @@ - + @@ -48767,7 +49116,7 @@ - + @@ -48787,7 +49136,7 @@ - + @@ -48842,7 +49191,7 @@ - + @@ -48906,7 +49255,7 @@ - + @@ -48926,7 +49275,7 @@ - + @@ -48966,7 +49315,7 @@ - + @@ -48986,7 +49335,7 @@ - + @@ -49031,7 +49380,7 @@ - + @@ -49051,7 +49400,7 @@ - + @@ -49109,7 +49458,7 @@ - + @@ -49129,7 +49478,7 @@ - + @@ -49169,7 +49518,7 @@ - + @@ -49186,7 +49535,7 @@ - + @@ -49226,7 +49575,7 @@ - + @@ -49246,7 +49595,7 @@ - + @@ -49286,7 +49635,7 @@ - + @@ -49306,7 +49655,7 @@ - + @@ -49356,7 +49705,7 @@ - + @@ -49376,7 +49725,7 @@ - + @@ -49421,7 +49770,7 @@ - + @@ -49441,7 +49790,7 @@ - + @@ -49476,7 +49825,7 @@ - + @@ -49496,7 +49845,7 @@ - + @@ -49666,7 +50015,7 @@ - + @@ -49793,7 +50142,7 @@ - + @@ -49813,7 +50162,7 @@ - + @@ -49858,7 +50207,7 @@ - + @@ -49878,7 +50227,7 @@ - + @@ -49928,7 +50277,7 @@ - + @@ -49948,7 +50297,7 @@ - + @@ -49988,7 +50337,7 @@ - + @@ -50008,7 +50357,7 @@ - + @@ -50048,7 +50397,7 @@ - + @@ -50068,7 +50417,7 @@ - + @@ -50123,7 +50472,7 @@ - + @@ -50218,7 +50567,7 @@ - + @@ -50235,7 +50584,7 @@ - + @@ -50365,7 +50714,7 @@ - + @@ -50426,7 +50775,7 @@ - + @@ -50488,7 +50837,7 @@ - + @@ -50505,7 +50854,7 @@ - + @@ -50550,7 +50899,7 @@ - + @@ -50570,7 +50919,7 @@ - + @@ -50625,7 +50974,7 @@ - + @@ -50645,7 +50994,7 @@ - + @@ -50685,7 +51034,7 @@ - + @@ -50705,7 +51054,7 @@ - + @@ -50740,7 +51089,7 @@ - + @@ -50760,7 +51109,7 @@ - + @@ -50834,13 +51183,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -50860,7 +51264,7 @@ - + @@ -50895,7 +51299,7 @@ - + @@ -50915,7 +51319,7 @@ - + @@ -50955,7 +51359,7 @@ - + @@ -50975,7 +51379,7 @@ - + @@ -51020,7 +51424,7 @@ - + @@ -51072,7 +51476,7 @@ - + @@ -51092,7 +51496,7 @@ - + @@ -51173,7 +51577,7 @@ - + @@ -51227,7 +51631,7 @@ - + @@ -51247,7 +51651,7 @@ - + @@ -51302,7 +51706,7 @@ - + @@ -51364,7 +51768,7 @@ - + @@ -51419,7 +51823,7 @@ - + @@ -51531,7 +51935,7 @@ - + @@ -57020,7 +57424,7 @@ - + @@ -57048,7 +57452,7 @@ - + @@ -57096,7 +57500,7 @@ - + @@ -57148,7 +57552,7 @@ - + @@ -57333,7 +57737,7 @@ - + @@ -57396,7 +57800,7 @@ - + @@ -57417,7 +57821,7 @@ - + @@ -57441,7 +57845,7 @@ - + @@ -57462,7 +57866,7 @@ - + @@ -57471,7 +57875,7 @@ - + @@ -57495,7 +57899,7 @@ - + @@ -57516,7 +57920,7 @@ - + @@ -57526,7 +57930,7 @@ - + @@ -57552,7 +57956,7 @@ - + @@ -57573,7 +57977,7 @@ - + @@ -57597,7 +58001,7 @@ - + @@ -57618,7 +58022,7 @@ - + @@ -57627,7 +58031,7 @@ - + @@ -57661,7 +58065,7 @@ - + @@ -57682,7 +58086,7 @@ - + @@ -57706,7 +58110,7 @@ - + @@ -57727,7 +58131,7 @@ - + @@ -57755,7 +58159,7 @@ - + @@ -57773,7 +58177,7 @@ - + @@ -57801,7 +58205,7 @@ - + @@ -57822,7 +58226,7 @@ - + @@ -57852,7 +58256,7 @@ - + @@ -57873,7 +58277,7 @@ - + @@ -57902,7 +58306,7 @@ - + @@ -57923,7 +58327,7 @@ - + @@ -57951,7 +58355,7 @@ - + @@ -57972,7 +58376,7 @@ - + @@ -58000,7 +58404,7 @@ - + @@ -58021,7 +58425,7 @@ - + @@ -58045,7 +58449,7 @@ - + @@ -58066,7 +58470,7 @@ - + @@ -58094,7 +58498,7 @@ - + @@ -58115,7 +58519,7 @@ - + @@ -58140,7 +58544,7 @@ - + @@ -58161,7 +58565,7 @@ - + @@ -58189,7 +58593,7 @@ - + @@ -58210,7 +58614,7 @@ - + @@ -58234,7 +58638,7 @@ - + @@ -58255,7 +58659,7 @@ - + @@ -58283,7 +58687,7 @@ - + @@ -58304,7 +58708,7 @@ - + @@ -58332,7 +58736,7 @@ - + @@ -58350,7 +58754,7 @@ - + @@ -58375,7 +58779,7 @@ - + @@ -58396,7 +58800,7 @@ - + @@ -58420,7 +58824,7 @@ - + @@ -58441,7 +58845,7 @@ - + @@ -58469,7 +58873,7 @@ - + @@ -58490,7 +58894,7 @@ - + @@ -58515,7 +58919,7 @@ - + @@ -58536,7 +58940,7 @@ - + @@ -58564,7 +58968,7 @@ - + @@ -58585,7 +58989,7 @@ - + @@ -58613,7 +59017,7 @@ - + @@ -58634,7 +59038,7 @@ - + @@ -58662,7 +59066,7 @@ - + @@ -58680,7 +59084,7 @@ - + @@ -58708,7 +59112,7 @@ - + @@ -58726,7 +59130,7 @@ - + @@ -58754,7 +59158,7 @@ - + @@ -58775,7 +59179,7 @@ - + @@ -58784,7 +59188,7 @@ - + @@ -58804,7 +59208,7 @@ - + @@ -58825,7 +59229,7 @@ - + @@ -58849,7 +59253,7 @@ - + @@ -58870,7 +59274,7 @@ - + @@ -58879,7 +59283,7 @@ - + @@ -58907,7 +59311,7 @@ - + @@ -58928,7 +59332,7 @@ - + @@ -58956,7 +59360,7 @@ - + @@ -58974,7 +59378,7 @@ - + @@ -59002,7 +59406,7 @@ - + @@ -59023,7 +59427,7 @@ - + @@ -59051,7 +59455,7 @@ - + @@ -59072,7 +59476,7 @@ - + @@ -59100,7 +59504,7 @@ - + @@ -59121,7 +59525,7 @@ - + @@ -59149,7 +59553,7 @@ - + @@ -59170,7 +59574,7 @@ - + @@ -59198,7 +59602,7 @@ - + @@ -59219,7 +59623,7 @@ - + @@ -59248,7 +59652,7 @@ - + @@ -59269,7 +59673,7 @@ - + @@ -59297,7 +59701,7 @@ - + @@ -59318,7 +59722,7 @@ - + @@ -59346,7 +59750,7 @@ - + @@ -59367,7 +59771,7 @@ - + @@ -59392,7 +59796,7 @@ - + @@ -59402,7 +59806,7 @@ - + @@ -59413,7 +59817,7 @@ - + @@ -59441,7 +59845,7 @@ - + @@ -59462,7 +59866,7 @@ - + @@ -59490,7 +59894,7 @@ - + @@ -59511,7 +59915,7 @@ - + @@ -59535,7 +59939,7 @@ - + @@ -59556,7 +59960,7 @@ - + @@ -59584,7 +59988,7 @@ - + @@ -59605,7 +60009,7 @@ - + @@ -59633,7 +60037,7 @@ - + @@ -59654,7 +60058,7 @@ - + @@ -59682,7 +60086,7 @@ - + @@ -59703,7 +60107,7 @@ - + @@ -59731,7 +60135,7 @@ - + @@ -59752,7 +60156,7 @@ - + @@ -59777,7 +60181,7 @@ - + @@ -59798,7 +60202,7 @@ - + @@ -59826,7 +60230,7 @@ - + @@ -59847,7 +60251,7 @@ - + @@ -59872,7 +60276,7 @@ - + @@ -59893,7 +60297,7 @@ - + @@ -59921,7 +60325,7 @@ - + @@ -59942,7 +60346,7 @@ - + @@ -59970,7 +60374,7 @@ - + @@ -59988,7 +60392,7 @@ - + @@ -60016,7 +60420,7 @@ - + @@ -60037,7 +60441,7 @@ - + @@ -60065,7 +60469,7 @@ - + @@ -60086,7 +60490,7 @@ - + @@ -60114,7 +60518,7 @@ - + @@ -60135,7 +60539,7 @@ - + @@ -60164,7 +60568,7 @@ - + @@ -60185,7 +60589,7 @@ - + @@ -60210,7 +60614,7 @@ - + @@ -60231,7 +60635,7 @@ - + @@ -60259,7 +60663,7 @@ - + @@ -60280,7 +60684,7 @@ - + @@ -60308,7 +60712,7 @@ - + @@ -60329,7 +60733,7 @@ - + @@ -60357,7 +60761,7 @@ - + @@ -60378,7 +60782,7 @@ - + @@ -86010,7 +86414,7 @@ - + @@ -86031,7 +86435,7 @@ - + @@ -86059,7 +86463,7 @@ - + @@ -86077,7 +86481,7 @@ - + @@ -86101,7 +86505,7 @@ - + @@ -86122,7 +86526,7 @@ - + @@ -86150,7 +86554,7 @@ - + @@ -86168,7 +86572,7 @@ - + @@ -86193,7 +86597,7 @@ - + @@ -86214,7 +86618,7 @@ - + @@ -86239,7 +86643,7 @@ - + @@ -86260,7 +86664,7 @@ - + @@ -86288,7 +86692,7 @@ - + @@ -86309,7 +86713,7 @@ - + @@ -86333,7 +86737,7 @@ - + @@ -86351,7 +86755,7 @@ - + @@ -86379,7 +86783,7 @@ - + @@ -86397,7 +86801,7 @@ - + @@ -86425,7 +86829,7 @@ - + @@ -86446,7 +86850,7 @@ - + @@ -86470,7 +86874,7 @@ - + @@ -86491,7 +86895,7 @@ - + @@ -86519,7 +86923,7 @@ - + @@ -86540,7 +86944,7 @@ - + @@ -86565,7 +86969,7 @@ - + @@ -86586,7 +86990,7 @@ - + @@ -86611,7 +87015,7 @@ - + @@ -86629,7 +87033,7 @@ - + @@ -86638,7 +87042,7 @@ - + @@ -86659,7 +87063,7 @@ - + @@ -86680,7 +87084,7 @@ - + @@ -86709,7 +87113,7 @@ - + @@ -86730,7 +87134,7 @@ - + @@ -86758,7 +87162,7 @@ - + @@ -86776,7 +87180,7 @@ - + @@ -86859,7 +87263,7 @@ - + @@ -86877,7 +87281,7 @@ - + @@ -86901,7 +87305,7 @@ - + @@ -86922,7 +87326,7 @@ - + @@ -86950,7 +87354,7 @@ - + @@ -86971,7 +87375,7 @@ - + @@ -86993,13 +87397,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -87017,7 +87470,7 @@ - + @@ -87125,13 +87578,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -87152,7 +87673,7 @@ - + @@ -87180,7 +87701,7 @@ - + @@ -87201,7 +87722,7 @@ - + @@ -87214,7 +87735,7 @@ - + @@ -87697,7 +88218,7 @@ - + @@ -87718,7 +88239,7 @@ - + @@ -87746,7 +88267,7 @@ - + @@ -87844,7 +88365,7 @@ - + @@ -87865,7 +88386,7 @@ - + @@ -87893,7 +88414,7 @@ - + @@ -87914,7 +88435,7 @@ - + @@ -87942,7 +88463,7 @@ - + @@ -87963,7 +88484,7 @@ - + @@ -87988,7 +88509,7 @@ - + @@ -88009,7 +88530,7 @@ - + @@ -88018,7 +88539,7 @@ - + @@ -88063,7 +88584,7 @@ - + @@ -88084,7 +88605,7 @@ - + @@ -88112,7 +88633,7 @@ - + @@ -88133,7 +88654,7 @@ - + @@ -88161,7 +88682,7 @@ - + @@ -88182,7 +88703,7 @@ - + @@ -88210,7 +88731,7 @@ - + @@ -88231,7 +88752,7 @@ - + @@ -88240,7 +88761,7 @@ - + @@ -88264,7 +88785,7 @@ - + @@ -88282,7 +88803,7 @@ - + @@ -88307,7 +88828,7 @@ - + @@ -88328,7 +88849,7 @@ - + @@ -88337,7 +88858,7 @@ - + @@ -88365,7 +88886,7 @@ - + @@ -88386,7 +88907,7 @@ - + @@ -88414,7 +88935,7 @@ - + @@ -88435,7 +88956,7 @@ - + @@ -88463,7 +88984,7 @@ - + @@ -88484,7 +89005,7 @@ - + @@ -88493,7 +89014,7 @@ - + @@ -88520,7 +89041,7 @@ - + @@ -88541,7 +89062,7 @@ - + @@ -88569,7 +89090,7 @@ - + @@ -88590,7 +89111,7 @@ - + @@ -88599,7 +89120,7 @@ - + @@ -88619,7 +89140,7 @@ - + @@ -88640,7 +89161,7 @@ - + @@ -88649,7 +89170,7 @@ - + @@ -88669,7 +89190,7 @@ - + @@ -88690,7 +89211,7 @@ - + @@ -88718,7 +89239,7 @@ - + @@ -88736,7 +89257,7 @@ - + @@ -88760,7 +89281,7 @@ - + @@ -88781,7 +89302,7 @@ - + @@ -88809,7 +89330,7 @@ - + @@ -88857,7 +89378,7 @@ - + @@ -88875,7 +89396,7 @@ - + @@ -88958,7 +89479,7 @@ - + @@ -88976,7 +89497,7 @@ - + @@ -89004,7 +89525,7 @@ - + @@ -89025,7 +89546,7 @@ - + @@ -89053,7 +89574,7 @@ - + @@ -89074,7 +89595,7 @@ - + @@ -89098,7 +89619,7 @@ - + @@ -89119,7 +89640,7 @@ - + @@ -89143,7 +89664,7 @@ - + @@ -89164,7 +89685,7 @@ - + @@ -89173,7 +89694,7 @@ - + @@ -89196,7 +89717,7 @@ - + @@ -89217,7 +89738,7 @@ - + @@ -89241,7 +89762,7 @@ - + @@ -89262,7 +89783,7 @@ - + @@ -89290,7 +89811,7 @@ - + @@ -89311,7 +89832,7 @@ - + @@ -89339,7 +89860,7 @@ - + @@ -89360,7 +89881,7 @@ - + @@ -89388,7 +89909,7 @@ - + @@ -89406,7 +89927,7 @@ - + @@ -89434,7 +89955,7 @@ - + @@ -89455,7 +89976,7 @@ - + @@ -89650,7 +90171,7 @@ - + @@ -89671,7 +90192,7 @@ - + @@ -89696,7 +90217,7 @@ - + @@ -89714,7 +90235,7 @@ - + @@ -89723,7 +90244,7 @@ - + @@ -89743,7 +90264,7 @@ - + @@ -89764,7 +90285,7 @@ - + @@ -89869,7 +90390,7 @@ - + @@ -89890,7 +90411,7 @@ - + @@ -89918,7 +90439,7 @@ - + @@ -89936,7 +90457,7 @@ - + @@ -90013,7 +90534,7 @@ - + @@ -90031,7 +90552,7 @@ - + @@ -90079,7 +90600,7 @@ - + @@ -90100,7 +90621,7 @@ - + @@ -90128,7 +90649,7 @@ - + @@ -90149,7 +90670,7 @@ - + @@ -90158,7 +90679,7 @@ - + @@ -90229,7 +90750,7 @@ - + @@ -90247,7 +90768,7 @@ - + @@ -90272,7 +90793,7 @@ - + @@ -90293,7 +90814,7 @@ - + @@ -90321,7 +90842,7 @@ - + @@ -90339,7 +90860,7 @@ - + @@ -90363,7 +90884,7 @@ - + @@ -90384,7 +90905,7 @@ - + @@ -90412,7 +90933,7 @@ - + @@ -90433,7 +90954,7 @@ - + @@ -90458,7 +90979,7 @@ - + @@ -90476,7 +90997,7 @@ - + @@ -90504,7 +91025,7 @@ - + @@ -90525,7 +91046,7 @@ - + @@ -90554,7 +91075,7 @@ - + @@ -90572,7 +91093,7 @@ - + @@ -90597,7 +91118,7 @@ - + @@ -90618,7 +91139,7 @@ - + @@ -90646,7 +91167,7 @@ - + @@ -90664,7 +91185,7 @@ - + @@ -90688,7 +91209,7 @@ - + @@ -90709,7 +91230,7 @@ - + @@ -90737,7 +91258,7 @@ - + @@ -90758,7 +91279,7 @@ - + @@ -90782,7 +91303,7 @@ - + @@ -90800,7 +91321,7 @@ - + @@ -90828,7 +91349,7 @@ - + @@ -90849,7 +91370,7 @@ - + @@ -90867,13 +91388,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -90891,7 +91461,7 @@ - + @@ -90919,7 +91489,7 @@ - + @@ -90940,7 +91510,7 @@ - + @@ -90968,7 +91538,7 @@ - + @@ -90986,7 +91556,7 @@ - + @@ -91022,7 +91592,7 @@ - + @@ -91040,7 +91610,7 @@ - + @@ -91065,7 +91635,7 @@ - + @@ -91086,7 +91656,7 @@ - + @@ -91111,7 +91681,7 @@ - + @@ -91132,7 +91702,7 @@ - + @@ -91145,7 +91715,7 @@ - + @@ -91476,7 +92046,7 @@ - + @@ -91497,7 +92067,7 @@ - + @@ -91525,7 +92095,7 @@ - + @@ -91543,7 +92113,7 @@ - + @@ -91571,7 +92141,7 @@ - + @@ -91592,7 +92162,7 @@ - + @@ -91616,7 +92186,7 @@ - + @@ -91637,7 +92207,7 @@ - + @@ -91665,7 +92235,7 @@ - + @@ -91686,7 +92256,7 @@ - + @@ -91714,7 +92284,7 @@ - + @@ -91735,7 +92305,7 @@ - + @@ -91763,7 +92333,7 @@ - + @@ -91828,7 +92398,7 @@ - + @@ -91846,7 +92416,7 @@ - + @@ -91881,7 +92451,7 @@ - + @@ -91902,7 +92472,7 @@ - + @@ -91927,7 +92497,7 @@ - + @@ -91948,7 +92518,7 @@ - + @@ -91976,7 +92546,7 @@ - + @@ -92080,7 +92650,7 @@ - + @@ -92101,7 +92671,7 @@ - + @@ -92125,7 +92695,7 @@ - + @@ -92143,7 +92713,7 @@ - + @@ -92189,7 +92759,7 @@ - + @@ -92210,7 +92780,7 @@ - + @@ -92238,7 +92808,7 @@ - + @@ -92259,7 +92829,7 @@ - + @@ -92284,7 +92854,7 @@ - + @@ -92305,7 +92875,7 @@ - + @@ -92333,7 +92903,7 @@ - + @@ -92354,7 +92924,7 @@ - + @@ -92382,7 +92952,7 @@ - + @@ -92403,7 +92973,7 @@ - + @@ -92431,7 +93001,7 @@ - + @@ -92452,7 +93022,7 @@ - + @@ -92480,7 +93050,7 @@ - + @@ -92501,7 +93071,7 @@ - + @@ -92709,7 +93279,7 @@ - + @@ -92730,7 +93300,7 @@ - + @@ -92751,13 +93321,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -92778,7 +93446,7 @@ - + @@ -92806,7 +93474,7 @@ - + @@ -92827,7 +93495,7 @@ - + @@ -92856,7 +93524,7 @@ - + @@ -92877,7 +93545,7 @@ - + @@ -92905,7 +93573,7 @@ - + @@ -92926,7 +93594,7 @@ - + @@ -92951,7 +93619,7 @@ - + @@ -92972,7 +93640,7 @@ - + @@ -93000,7 +93668,7 @@ - + @@ -93053,7 +93721,7 @@ - + @@ -93074,7 +93742,7 @@ - + @@ -93103,7 +93771,7 @@ - + @@ -93124,7 +93792,7 @@ - + @@ -93152,7 +93820,7 @@ - + @@ -93173,7 +93841,7 @@ - + @@ -93197,7 +93865,7 @@ - + @@ -93249,62 +93917,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -93325,7 +93944,7 @@ - + @@ -93347,13 +93966,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -93374,7 +94048,7 @@ - + @@ -93402,7 +94076,7 @@ - + @@ -93423,7 +94097,7 @@ - + @@ -93451,7 +94125,7 @@ - + @@ -93472,7 +94146,7 @@ - + @@ -93481,7 +94155,7 @@ - + @@ -93513,7 +94187,7 @@ - + @@ -93534,7 +94208,7 @@ - + @@ -93562,7 +94236,7 @@ - + @@ -93583,7 +94257,7 @@ - + @@ -93611,7 +94285,7 @@ - + @@ -93632,7 +94306,7 @@ - + @@ -93656,7 +94330,7 @@ - + @@ -93677,7 +94351,7 @@ - + @@ -93705,7 +94379,7 @@ - + @@ -93730,7 +94404,7 @@ - + @@ -93754,7 +94428,7 @@ - + @@ -93775,7 +94449,7 @@ - + @@ -93801,7 +94475,7 @@ - + @@ -93822,7 +94496,7 @@ - + @@ -93850,7 +94524,7 @@ - + @@ -93871,7 +94545,7 @@ - + @@ -93896,7 +94570,7 @@ - + @@ -93914,7 +94588,7 @@ - + @@ -93942,7 +94616,7 @@ - + @@ -93963,7 +94637,7 @@ - + @@ -94015,7 +94689,7 @@ - + @@ -94033,7 +94707,7 @@ - + @@ -94058,7 +94732,7 @@ - + @@ -94076,7 +94750,7 @@ - + @@ -94100,7 +94774,7 @@ - + @@ -94121,7 +94795,7 @@ - + @@ -94149,7 +94823,7 @@ - + @@ -94170,7 +94844,7 @@ - + @@ -94198,7 +94872,7 @@ - + @@ -94219,7 +94893,7 @@ - + @@ -94244,7 +94918,7 @@ - + @@ -94265,7 +94939,7 @@ - + @@ -94290,7 +94964,7 @@ - + @@ -94360,7 +95034,7 @@ - + @@ -94381,7 +95055,7 @@ - + @@ -94471,7 +95145,7 @@ - + @@ -94492,7 +95166,7 @@ - + @@ -94520,7 +95194,7 @@ - + @@ -94541,7 +95215,7 @@ - + @@ -94569,7 +95243,7 @@ - + @@ -94590,7 +95264,7 @@ - + @@ -94618,7 +95292,7 @@ - + @@ -94642,7 +95316,7 @@ - + @@ -94655,7 +95329,7 @@ - + @@ -94675,7 +95349,7 @@ - + @@ -94697,7 +95371,7 @@ - + @@ -94722,7 +95396,7 @@ - + @@ -94743,7 +95417,7 @@ - + @@ -94771,7 +95445,7 @@ - + @@ -94792,7 +95466,7 @@ - + @@ -94820,7 +95494,7 @@ - + @@ -94841,7 +95515,7 @@ - + @@ -94865,7 +95539,7 @@ - + @@ -94886,7 +95560,7 @@ - + @@ -94936,7 +95610,7 @@ - + @@ -94957,7 +95631,7 @@ - + @@ -94966,7 +95640,7 @@ - + @@ -95036,7 +95710,7 @@ - + @@ -95057,7 +95731,7 @@ - + @@ -95066,7 +95740,7 @@ - + @@ -95086,7 +95760,7 @@ - + @@ -95107,7 +95781,7 @@ - + @@ -95135,7 +95809,7 @@ - + @@ -95156,7 +95830,7 @@ - + @@ -95184,7 +95858,7 @@ - + @@ -95202,7 +95876,7 @@ - + @@ -95238,7 +95912,7 @@ - + @@ -95259,7 +95933,7 @@ - + @@ -95284,7 +95958,7 @@ - + @@ -95305,7 +95979,7 @@ - + @@ -95333,7 +96007,7 @@ - + @@ -95354,7 +96028,7 @@ - + @@ -95382,7 +96056,7 @@ - + @@ -95403,7 +96077,7 @@ - + @@ -95428,7 +96102,7 @@ - + @@ -95449,7 +96123,7 @@ - + @@ -95477,7 +96151,7 @@ - + @@ -95498,7 +96172,7 @@ - + @@ -95526,7 +96200,7 @@ - + @@ -95547,7 +96221,7 @@ - + @@ -95556,7 +96230,7 @@ - + @@ -95584,7 +96258,7 @@ - + @@ -95605,7 +96279,7 @@ - + @@ -95633,7 +96307,7 @@ - + @@ -95654,7 +96328,7 @@ - + @@ -95663,7 +96337,7 @@ - + @@ -95698,7 +96372,7 @@ - + @@ -95719,7 +96393,7 @@ - + @@ -95747,7 +96421,7 @@ - + @@ -95768,7 +96442,7 @@ - + @@ -95798,7 +96472,7 @@ - + @@ -95819,7 +96493,7 @@ - + @@ -95847,7 +96521,7 @@ - + @@ -95868,7 +96542,7 @@ - + @@ -95896,7 +96570,7 @@ - + @@ -95917,7 +96591,7 @@ - + @@ -95945,7 +96619,7 @@ - + @@ -95963,7 +96637,7 @@ - + @@ -95972,7 +96646,7 @@ - + @@ -95993,7 +96667,7 @@ - + @@ -96014,7 +96688,7 @@ - + @@ -96039,7 +96713,7 @@ - + @@ -96060,7 +96734,7 @@ - + @@ -96069,7 +96743,7 @@ - + @@ -96089,7 +96763,7 @@ - + @@ -96110,7 +96784,7 @@ - + @@ -96138,7 +96812,7 @@ - + @@ -96159,7 +96833,7 @@ - + @@ -96183,7 +96857,7 @@ - + @@ -96201,7 +96875,7 @@ - + @@ -96229,7 +96903,7 @@ - + @@ -96247,7 +96921,7 @@ - + @@ -109451,7 +110125,7 @@ - + @@ -109472,7 +110146,7 @@ - + @@ -109500,7 +110174,7 @@ - + @@ -109521,7 +110195,7 @@ - + @@ -109549,7 +110223,7 @@ - + @@ -109570,7 +110244,7 @@ - + @@ -109594,7 +110268,7 @@ - + @@ -109615,7 +110289,7 @@ - + @@ -109643,7 +110317,7 @@ - + @@ -109664,7 +110338,7 @@ - + @@ -109673,7 +110347,7 @@ - + @@ -109693,7 +110367,7 @@ - + @@ -109714,7 +110388,7 @@ - + @@ -109742,7 +110416,7 @@ - + @@ -109763,7 +110437,7 @@ - + @@ -109791,7 +110465,7 @@ - + @@ -109812,7 +110486,7 @@ - + @@ -109840,7 +110514,7 @@ - + @@ -109861,7 +110535,7 @@ - + @@ -109889,7 +110563,7 @@ - + @@ -109910,7 +110584,7 @@ - + @@ -109938,7 +110612,7 @@ - + @@ -109959,7 +110633,7 @@ - + @@ -109987,7 +110661,7 @@ - + @@ -110008,7 +110682,7 @@ - + @@ -110035,7 +110709,7 @@ - + @@ -110056,7 +110730,7 @@ - + @@ -110084,7 +110758,7 @@ - + @@ -110105,7 +110779,7 @@ - + @@ -110114,7 +110788,7 @@ - + @@ -110310,7 +110984,7 @@ - + @@ -110331,7 +111005,7 @@ - + @@ -110362,7 +111036,7 @@ - + @@ -110383,7 +111057,7 @@ - + @@ -110429,7 +111103,7 @@ - + @@ -110450,7 +111124,7 @@ - + @@ -110459,7 +111133,7 @@ - + @@ -110479,7 +111153,7 @@ - + @@ -110500,7 +111174,7 @@ - + @@ -110528,7 +111202,7 @@ - + @@ -110549,7 +111223,7 @@ - + @@ -110596,7 +111270,7 @@ - + @@ -110617,7 +111291,7 @@ - + @@ -110626,7 +111300,7 @@ - + @@ -110653,7 +111327,7 @@ - + @@ -110674,7 +111348,7 @@ - + @@ -110702,7 +111376,7 @@ - + @@ -110723,7 +111397,7 @@ - + @@ -110751,7 +111425,7 @@ - + @@ -110772,7 +111446,7 @@ - + @@ -110800,7 +111474,7 @@ - + @@ -110821,7 +111495,7 @@ - + @@ -110846,7 +111520,7 @@ - + @@ -110867,7 +111541,7 @@ - + @@ -110907,7 +111581,7 @@ - + @@ -110928,7 +111602,7 @@ - + @@ -110952,7 +111626,7 @@ - + @@ -110973,7 +111647,7 @@ - + @@ -111001,7 +111675,7 @@ - + @@ -111019,7 +111693,7 @@ - + @@ -111028,7 +111702,7 @@ - + @@ -111063,7 +111737,7 @@ - + @@ -111084,7 +111758,7 @@ - + @@ -111112,7 +111786,7 @@ - + @@ -111133,7 +111807,7 @@ - + @@ -111161,7 +111835,7 @@ - + @@ -111182,7 +111856,7 @@ - + @@ -111207,7 +111881,7 @@ - + @@ -111228,7 +111902,7 @@ - + @@ -111237,7 +111911,7 @@ - + @@ -111273,7 +111947,7 @@ - + @@ -111294,7 +111968,7 @@ - + @@ -111322,7 +111996,7 @@ - + @@ -111340,7 +112014,7 @@ - + @@ -111363,7 +112037,7 @@ - + @@ -111384,7 +112058,7 @@ - + @@ -111393,7 +112067,7 @@ - + @@ -111456,7 +112130,7 @@ - + @@ -111474,7 +112148,7 @@ - + @@ -111498,7 +112172,7 @@ - + @@ -111519,7 +112193,7 @@ - + @@ -111559,7 +112233,7 @@ - + @@ -111580,7 +112254,7 @@ - + @@ -111589,7 +112263,7 @@ - + @@ -111609,7 +112283,7 @@ - + @@ -111630,7 +112304,7 @@ - + @@ -111654,7 +112328,7 @@ - + @@ -111675,7 +112349,7 @@ - + @@ -111684,7 +112358,7 @@ - + @@ -111704,7 +112378,7 @@ - + @@ -111725,7 +112399,7 @@ - + @@ -111753,7 +112427,7 @@ - + @@ -111774,7 +112448,7 @@ - + @@ -111801,7 +112475,7 @@ - + @@ -111822,7 +112496,7 @@ - + @@ -111850,7 +112524,7 @@ - + @@ -111871,7 +112545,7 @@ - + @@ -111880,7 +112554,7 @@ - + @@ -111900,7 +112574,7 @@ - + @@ -111921,7 +112595,7 @@ - + @@ -111938,13 +112612,9 @@ - - - - - + @@ -111954,10 +112624,6 @@ - - - - @@ -111978,10 +112644,6 @@ - - - - @@ -111991,7 +112653,7 @@ - + @@ -112046,6 +112708,10 @@ + + + + @@ -112054,6 +112720,14 @@ + + + + + + + + @@ -112067,12 +112741,8 @@ - - - - - - + + @@ -112245,7 +112915,7 @@ - + @@ -112266,7 +112936,7 @@ - + @@ -112275,7 +112945,7 @@ - + @@ -112295,7 +112965,7 @@ - + @@ -112316,7 +112986,7 @@ - + @@ -112344,7 +113014,7 @@ - + @@ -112365,7 +113035,7 @@ - + @@ -112374,7 +113044,7 @@ - + @@ -121863,13 +122533,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -121887,7 +122724,7 @@ - + @@ -122035,7 +122872,7 @@ - + @@ -122056,7 +122893,7 @@ - + @@ -122081,7 +122918,7 @@ - + @@ -122099,7 +122936,7 @@ - + @@ -122137,7 +122974,7 @@ - + @@ -122158,7 +122995,7 @@ - + @@ -122182,7 +123019,7 @@ - + @@ -122203,7 +123040,7 @@ - + @@ -122231,7 +123068,7 @@ - + @@ -122252,7 +123089,7 @@ - + @@ -122280,7 +123117,7 @@ - + @@ -122301,7 +123138,7 @@ - + @@ -122329,7 +123166,7 @@ - + @@ -122347,7 +123184,7 @@ - + @@ -122437,7 +123274,7 @@ - + @@ -122458,7 +123295,7 @@ - + @@ -122483,7 +123320,7 @@ - + @@ -122504,7 +123341,7 @@ - + @@ -122526,13 +123363,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -122553,7 +123439,7 @@ - + @@ -122581,7 +123467,7 @@ - + @@ -122602,7 +123488,7 @@ - + @@ -122630,7 +123516,7 @@ - + @@ -122651,7 +123537,7 @@ - + @@ -122676,7 +123562,7 @@ - + @@ -122697,7 +123583,7 @@ - + @@ -122725,7 +123611,7 @@ - + @@ -122746,7 +123632,7 @@ - + @@ -122771,7 +123657,7 @@ - + @@ -122792,7 +123678,7 @@ - + @@ -122816,7 +123702,7 @@ - + @@ -122837,7 +123723,7 @@ - + @@ -122861,7 +123747,7 @@ - + @@ -122882,7 +123768,7 @@ - + @@ -122910,7 +123796,7 @@ - + @@ -122931,7 +123817,7 @@ - + @@ -122959,7 +123845,7 @@ - + @@ -122980,7 +123866,7 @@ - + @@ -122989,7 +123875,7 @@ - + @@ -123031,7 +123917,7 @@ - + @@ -123052,7 +123938,7 @@ - + @@ -123091,7 +123977,7 @@ - + @@ -123112,7 +123998,7 @@ - + @@ -123140,7 +124026,7 @@ - + @@ -123153,32 +124039,51 @@ + + + + - - + + - - + + + - - + + + + - - - - - - + + + + + + + + + + + + + + + + + + @@ -123190,7 +124095,7 @@ - + @@ -123211,7 +124116,7 @@ - + @@ -123236,7 +124141,7 @@ - + @@ -123257,7 +124162,7 @@ - + @@ -123266,7 +124171,7 @@ - + @@ -123286,7 +124191,7 @@ - + @@ -123307,7 +124212,7 @@ - + @@ -123331,7 +124236,7 @@ - + @@ -123352,7 +124257,7 @@ - + @@ -123380,7 +124285,7 @@ - + @@ -123401,7 +124306,7 @@ - + @@ -123429,7 +124334,7 @@ - + @@ -123450,7 +124355,7 @@ - + @@ -123478,7 +124383,7 @@ - + @@ -123496,7 +124401,7 @@ - + @@ -123520,7 +124425,7 @@ - + @@ -123541,7 +124446,7 @@ - + @@ -123569,7 +124474,7 @@ - + @@ -123590,7 +124495,7 @@ - + @@ -123618,7 +124523,7 @@ - + @@ -123636,7 +124541,7 @@ - + @@ -123661,7 +124566,7 @@ - + @@ -123682,7 +124587,7 @@ - + @@ -123838,7 +124743,7 @@ - + @@ -123859,7 +124764,7 @@ - + @@ -123887,7 +124792,7 @@ - + @@ -123908,7 +124813,7 @@ - + @@ -123936,7 +124841,7 @@ - + @@ -123954,7 +124859,7 @@ - + @@ -123978,7 +124883,7 @@ - + @@ -123999,7 +124904,7 @@ - + @@ -124027,7 +124932,7 @@ - + @@ -124048,7 +124953,7 @@ - + @@ -124072,7 +124977,7 @@ - + @@ -124093,7 +124998,7 @@ - + @@ -124102,7 +125007,7 @@ - + @@ -124122,7 +125027,7 @@ - + @@ -124143,7 +125048,7 @@ - + @@ -124167,7 +125072,7 @@ - + @@ -124185,7 +125090,7 @@ - + @@ -124209,7 +125114,7 @@ - + @@ -124230,7 +125135,7 @@ - + @@ -124255,7 +125160,7 @@ - + @@ -124276,7 +125181,7 @@ - + @@ -124326,7 +125231,7 @@ - + @@ -124341,13 +125246,13 @@ - + - + @@ -124376,7 +125281,7 @@ - + @@ -124397,7 +125302,7 @@ - + @@ -124425,7 +125330,7 @@ - + @@ -124446,7 +125351,7 @@ - + @@ -124476,7 +125381,7 @@ - + @@ -124494,7 +125399,7 @@ - + @@ -124503,7 +125408,7 @@ - + @@ -124518,7 +125423,7 @@ - + @@ -124539,7 +125444,7 @@ - + @@ -124567,7 +125472,7 @@ - + @@ -124588,7 +125493,7 @@ - + @@ -124616,7 +125521,7 @@ - + @@ -124637,7 +125542,7 @@ - + @@ -124662,7 +125567,7 @@ - + @@ -124683,7 +125588,7 @@ - + @@ -124707,7 +125612,7 @@ - + @@ -124728,7 +125633,7 @@ - + @@ -124756,7 +125661,7 @@ - + @@ -124777,7 +125682,7 @@ - + @@ -124805,7 +125710,7 @@ - + @@ -124826,7 +125731,7 @@ - + @@ -124850,7 +125755,7 @@ - + @@ -124868,7 +125773,7 @@ - + @@ -124896,7 +125801,7 @@ - + @@ -124917,7 +125822,7 @@ - + @@ -124945,7 +125850,7 @@ - + @@ -124966,7 +125871,7 @@ - + @@ -124994,7 +125899,7 @@ - + @@ -125015,7 +125920,7 @@ - + @@ -125043,7 +125948,7 @@ - + @@ -125064,7 +125969,7 @@ - + @@ -125074,7 +125979,7 @@ - + @@ -125094,7 +125999,7 @@ - + @@ -125115,7 +126020,7 @@ - + @@ -125143,7 +126048,7 @@ - + @@ -125164,7 +126069,7 @@ - + @@ -125192,7 +126097,7 @@ - + @@ -125213,7 +126118,7 @@ - + @@ -125241,7 +126146,7 @@ - + @@ -125262,7 +126167,7 @@ - + @@ -125334,7 +126239,7 @@ - + @@ -125355,7 +126260,7 @@ - + @@ -125383,7 +126288,7 @@ - + @@ -125404,7 +126309,7 @@ - + @@ -125413,7 +126318,7 @@ - + @@ -125446,7 +126351,7 @@ - + @@ -125467,7 +126372,7 @@ - + @@ -125495,7 +126400,7 @@ - + @@ -125516,7 +126421,7 @@ - + @@ -125525,7 +126430,7 @@ - + @@ -125540,7 +126445,7 @@ - + @@ -125561,7 +126466,7 @@ - + @@ -125589,7 +126494,7 @@ - + @@ -125610,7 +126515,7 @@ - + @@ -125638,7 +126543,7 @@ - + @@ -125659,7 +126564,7 @@ - + @@ -125684,7 +126589,7 @@ - + @@ -125705,7 +126610,7 @@ - + @@ -125733,7 +126638,7 @@ - + @@ -125754,7 +126659,7 @@ - + @@ -125778,7 +126683,7 @@ - + @@ -125799,7 +126704,7 @@ - + @@ -125827,7 +126732,7 @@ - + @@ -125906,7 +126811,7 @@ - + @@ -125927,7 +126832,7 @@ - + @@ -125958,7 +126863,7 @@ - + @@ -125976,7 +126881,7 @@ - + @@ -126042,7 +126947,7 @@ - + @@ -126063,7 +126968,7 @@ - + @@ -126087,14 +126992,14 @@ - + - + @@ -126108,7 +127013,7 @@ - + @@ -126133,7 +127038,7 @@ - + @@ -126154,7 +127059,7 @@ - + @@ -126182,7 +127087,7 @@ - + @@ -126203,7 +127108,7 @@ - + @@ -126231,7 +127136,7 @@ - + @@ -126252,7 +127157,7 @@ - + @@ -126280,7 +127185,7 @@ - + @@ -126301,7 +127206,7 @@ - + @@ -126325,7 +127230,7 @@ - + @@ -126346,7 +127251,7 @@ - + @@ -126374,7 +127279,7 @@ - + @@ -126395,7 +127300,7 @@ - + @@ -126423,7 +127328,7 @@ - + @@ -126444,7 +127349,7 @@ - + @@ -126469,7 +127374,7 @@ - + @@ -126490,7 +127395,7 @@ - + @@ -126513,7 +127418,7 @@ - + @@ -126534,7 +127439,7 @@ - + @@ -126543,7 +127448,7 @@ - + @@ -126563,7 +127468,7 @@ - + @@ -126584,7 +127489,7 @@ - + @@ -126612,7 +127517,7 @@ - + @@ -126633,7 +127538,7 @@ - + @@ -126661,7 +127566,7 @@ - + @@ -126682,7 +127587,7 @@ - + @@ -126710,7 +127615,7 @@ - + @@ -126734,7 +127639,7 @@ - + @@ -126797,7 +127702,7 @@ - + @@ -126818,7 +127723,7 @@ - + @@ -126827,7 +127732,7 @@ - + @@ -126899,7 +127804,7 @@ - + @@ -126920,7 +127825,7 @@ - + @@ -126948,7 +127853,7 @@ - + @@ -126969,7 +127874,7 @@ - + @@ -126994,7 +127899,7 @@ - + @@ -127012,7 +127917,7 @@ - + @@ -127037,7 +127942,7 @@ - + @@ -127058,7 +127963,7 @@ - + @@ -127086,7 +127991,7 @@ - + @@ -127107,7 +128012,7 @@ - + @@ -127116,7 +128021,7 @@ - + @@ -127192,14 +128097,14 @@ - + - + @@ -127213,7 +128118,7 @@ - + @@ -127225,7 +128130,7 @@ - + @@ -127241,7 +128146,7 @@ - + @@ -127290,7 +128195,7 @@ - + @@ -127311,7 +128216,7 @@ - + @@ -127339,7 +128244,7 @@ - + @@ -127357,7 +128262,7 @@ - + @@ -127621,7 +128526,7 @@ - + @@ -127642,7 +128547,7 @@ - + @@ -127670,7 +128575,7 @@ - + @@ -127691,7 +128596,7 @@ - + @@ -127719,7 +128624,7 @@ - + @@ -127740,7 +128645,7 @@ - + @@ -127768,7 +128673,7 @@ - + @@ -127789,7 +128694,7 @@ - + @@ -127798,7 +128703,7 @@ - + @@ -127834,7 +128739,7 @@ - + @@ -127852,7 +128757,7 @@ - + @@ -127904,7 +128809,7 @@ - + @@ -127925,7 +128830,7 @@ - + @@ -127953,7 +128858,7 @@ - + @@ -127974,7 +128879,7 @@ - + @@ -128002,7 +128907,7 @@ - + @@ -128023,7 +128928,7 @@ - + @@ -128051,7 +128956,7 @@ - + @@ -128072,7 +128977,7 @@ - + @@ -128126,7 +129031,7 @@ - + @@ -128147,7 +129052,7 @@ - + @@ -128156,7 +129061,7 @@ - + @@ -128177,7 +129082,7 @@ - + @@ -128198,7 +129103,7 @@ - + @@ -128207,7 +129112,7 @@ - + @@ -128227,7 +129132,7 @@ - + @@ -128248,7 +129153,7 @@ - + @@ -128272,7 +129177,7 @@ - + @@ -128293,7 +129198,7 @@ - + @@ -128323,7 +129228,7 @@ - + @@ -128344,7 +129249,7 @@ - + @@ -128372,7 +129277,7 @@ - + @@ -128393,7 +129298,7 @@ - + @@ -128415,13 +129320,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -128439,7 +129393,7 @@ - + @@ -128464,7 +129418,7 @@ - + @@ -128513,7 +129467,7 @@ - + @@ -128534,7 +129488,7 @@ - + @@ -128568,7 +129522,7 @@ - + @@ -128589,7 +129543,7 @@ - + @@ -128621,7 +129575,7 @@ - + @@ -128642,7 +129596,7 @@ - + @@ -128670,7 +129624,7 @@ - + @@ -128691,7 +129645,7 @@ - + @@ -128719,7 +129673,7 @@ - + @@ -128740,7 +129694,7 @@ - + @@ -128768,7 +129722,7 @@ - + @@ -128786,7 +129740,7 @@ - + @@ -128814,7 +129768,7 @@ - + @@ -128835,7 +129789,7 @@ - + @@ -128863,7 +129817,7 @@ - + @@ -128884,7 +129838,7 @@ - + @@ -128897,6 +129851,15 @@ + + + + + + + + + @@ -128907,7 +129870,7 @@ - + @@ -128928,7 +129891,7 @@ - + @@ -128953,7 +129916,7 @@ - + @@ -128971,7 +129934,7 @@ - + @@ -128999,7 +129962,7 @@ - + @@ -129020,7 +129983,7 @@ - + @@ -129044,7 +130007,7 @@ - + @@ -129054,7 +130017,7 @@ - + @@ -129065,7 +130028,7 @@ - + @@ -129093,7 +130056,7 @@ - + @@ -129114,7 +130077,7 @@ - + @@ -129142,7 +130105,7 @@ - + @@ -129263,7 +130226,7 @@ - + @@ -129284,7 +130247,7 @@ - + @@ -129312,7 +130275,7 @@ - + @@ -129333,7 +130296,7 @@ - + @@ -129361,7 +130324,7 @@ - + @@ -129379,7 +130342,7 @@ - + @@ -129407,7 +130370,7 @@ - + @@ -129428,7 +130391,7 @@ - + @@ -129457,7 +130420,7 @@ - + @@ -129478,12 +130441,12 @@ - + - + @@ -129652,7 +130615,7 @@ - + @@ -129673,7 +130636,7 @@ - + @@ -129701,7 +130664,7 @@ - + @@ -129719,7 +130682,7 @@ - + @@ -129747,7 +130710,7 @@ - + @@ -131275,7 +132238,7 @@ - + @@ -131296,7 +132259,7 @@ - + @@ -131321,7 +132284,7 @@ - + @@ -131342,7 +132305,7 @@ - + @@ -131370,7 +132333,7 @@ - + @@ -131388,7 +132351,7 @@ - + @@ -131414,7 +132377,7 @@ - + @@ -131435,7 +132398,7 @@ - + @@ -131444,7 +132407,7 @@ - + @@ -131464,7 +132427,7 @@ - + @@ -131485,7 +132448,7 @@ - + @@ -131513,7 +132476,7 @@ - + @@ -131534,7 +132497,7 @@ - + @@ -131559,7 +132522,7 @@ - + @@ -131580,7 +132543,7 @@ - + @@ -131608,7 +132571,7 @@ - + @@ -131629,7 +132592,7 @@ - + @@ -131657,14 +132620,14 @@ - + - + @@ -131678,7 +132641,7 @@ - + @@ -131703,7 +132666,7 @@ - + @@ -131724,7 +132687,7 @@ - + @@ -131752,7 +132715,7 @@ - + @@ -131773,7 +132736,7 @@ - + @@ -131802,7 +132765,7 @@ - + @@ -131823,7 +132786,7 @@ - + @@ -131851,7 +132814,7 @@ - + @@ -131869,7 +132832,7 @@ - + @@ -131897,7 +132860,7 @@ - + @@ -131918,7 +132881,7 @@ - + @@ -131946,7 +132909,7 @@ - + @@ -131967,7 +132930,7 @@ - + @@ -131976,7 +132939,7 @@ - + @@ -132018,7 +132981,7 @@ - + @@ -132033,13 +132996,13 @@ - + - + @@ -132067,7 +133030,7 @@ - + @@ -132088,7 +133051,7 @@ - + @@ -132116,7 +133079,7 @@ - + @@ -132137,7 +133100,7 @@ - + @@ -132165,7 +133128,7 @@ - + @@ -132186,7 +133149,7 @@ - + @@ -132215,7 +133178,7 @@ - + @@ -132236,7 +133199,7 @@ - + @@ -132269,7 +133232,7 @@ - + @@ -132290,7 +133253,7 @@ - + @@ -132314,7 +133277,7 @@ - + @@ -132335,7 +133298,7 @@ - + @@ -132359,7 +133322,7 @@ - + @@ -132380,7 +133343,7 @@ - + @@ -132404,7 +133367,7 @@ - + @@ -132425,7 +133388,7 @@ - + @@ -132449,7 +133412,7 @@ - + @@ -132470,7 +133433,7 @@ - + @@ -132494,7 +133457,7 @@ - + @@ -132515,7 +133478,7 @@ - + @@ -132539,7 +133502,7 @@ - + @@ -132560,7 +133523,7 @@ - + @@ -132584,7 +133547,7 @@ - + @@ -132605,7 +133568,7 @@ - + @@ -132630,7 +133593,7 @@ - + @@ -132651,7 +133614,7 @@ - + @@ -132687,7 +133650,7 @@ - + @@ -132708,7 +133671,7 @@ - + @@ -132736,7 +133699,7 @@ - + @@ -132757,7 +133720,7 @@ - + @@ -132781,7 +133744,7 @@ - + @@ -132802,7 +133765,7 @@ - + @@ -132830,7 +133793,7 @@ - + @@ -132851,7 +133814,7 @@ - + @@ -132895,7 +133858,7 @@ - + @@ -132916,7 +133879,7 @@ - + @@ -132944,7 +133907,7 @@ - + @@ -132965,7 +133928,7 @@ - + @@ -132993,7 +133956,7 @@ - + @@ -133014,7 +133977,7 @@ - + @@ -133042,7 +134005,7 @@ - + @@ -133063,7 +134026,7 @@ - + @@ -133091,7 +134054,7 @@ - + @@ -133112,7 +134075,7 @@ - + @@ -133121,7 +134084,7 @@ - + @@ -133152,7 +134115,7 @@ - + @@ -133173,7 +134136,7 @@ - + @@ -133198,7 +134161,7 @@ - + @@ -133219,7 +134182,7 @@ - + @@ -133248,7 +134211,7 @@ - + @@ -133266,7 +134229,7 @@ - + @@ -133291,7 +134254,7 @@ - + @@ -133312,7 +134275,7 @@ - + @@ -133340,7 +134303,7 @@ - + @@ -133361,7 +134324,7 @@ - + @@ -133388,7 +134351,7 @@ - + @@ -133409,7 +134372,7 @@ - + @@ -133437,7 +134400,7 @@ - + @@ -133455,7 +134418,7 @@ - + @@ -133464,7 +134427,7 @@ - + @@ -133479,7 +134442,7 @@ - + @@ -133500,7 +134463,7 @@ - + @@ -133528,7 +134491,7 @@ - + @@ -133549,7 +134512,7 @@ - + @@ -133577,7 +134540,7 @@ - + @@ -133598,7 +134561,7 @@ - + @@ -133626,7 +134589,7 @@ - + @@ -133647,7 +134610,7 @@ - + @@ -133675,7 +134638,7 @@ - + @@ -133696,7 +134659,7 @@ - + @@ -133705,7 +134668,7 @@ - + @@ -133740,7 +134703,7 @@ - + @@ -133758,7 +134721,7 @@ - + @@ -133786,7 +134749,7 @@ - + @@ -133807,7 +134770,7 @@ - + @@ -133859,7 +134822,7 @@ - + @@ -133880,7 +134843,7 @@ - + @@ -133904,7 +134867,7 @@ - + @@ -133925,7 +134888,7 @@ - + @@ -133935,7 +134898,7 @@ - + @@ -133990,7 +134953,7 @@ - + @@ -134011,7 +134974,7 @@ - + @@ -134036,7 +134999,7 @@ - + @@ -134057,7 +135020,7 @@ - + @@ -134081,7 +135044,7 @@ - + @@ -134099,7 +135062,7 @@ - + @@ -134108,7 +135071,7 @@ - + @@ -134141,7 +135104,7 @@ - + @@ -134162,7 +135125,7 @@ - + @@ -134190,7 +135153,7 @@ - + @@ -134211,7 +135174,7 @@ - + @@ -134326,7 +135289,7 @@ - + @@ -134344,7 +135307,7 @@ - + @@ -134372,7 +135335,7 @@ - + @@ -134431,7 +135394,7 @@ - + @@ -134452,7 +135415,7 @@ - + @@ -134471,13 +135434,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -134498,7 +135726,7 @@ - + @@ -134523,7 +135751,7 @@ - + @@ -134544,7 +135772,7 @@ - + @@ -134552,8 +135780,8 @@ - - + + @@ -134573,7 +135801,7 @@ - + @@ -134595,7 +135823,7 @@ - + @@ -134911,7 +136139,7 @@ - + @@ -134932,7 +136160,7 @@ - + @@ -134960,7 +136188,7 @@ - + @@ -134981,7 +136209,7 @@ - + @@ -134990,7 +136218,7 @@ - + @@ -135010,7 +136238,7 @@ - + @@ -135031,7 +136259,7 @@ - + @@ -135059,7 +136287,7 @@ - + @@ -135077,7 +136305,7 @@ - + @@ -135105,7 +136333,7 @@ - + @@ -135126,7 +136354,7 @@ - + @@ -135139,7 +136367,7 @@ - + @@ -135175,7 +136403,7 @@ - + @@ -135196,7 +136424,7 @@ - + @@ -135220,7 +136448,7 @@ - + @@ -135238,7 +136466,7 @@ - + @@ -135266,7 +136494,7 @@ - + @@ -135287,7 +136515,7 @@ - + @@ -135310,7 +136538,7 @@ - + @@ -135331,7 +136559,7 @@ - + @@ -135340,7 +136568,7 @@ - + @@ -135411,7 +136639,7 @@ - + @@ -135429,7 +136657,7 @@ - + @@ -135453,7 +136681,7 @@ - + @@ -135474,7 +136702,7 @@ - + @@ -135502,7 +136730,7 @@ - + @@ -135523,7 +136751,7 @@ - + @@ -135532,7 +136760,7 @@ - + @@ -135692,7 +136920,7 @@ - + @@ -135713,7 +136941,7 @@ - + @@ -135738,7 +136966,7 @@ - + @@ -135759,7 +136987,7 @@ - + @@ -135787,7 +137015,7 @@ - + @@ -135808,7 +137036,7 @@ - + @@ -135833,7 +137061,7 @@ - + @@ -135851,7 +137079,7 @@ - + @@ -135886,7 +137114,7 @@ - + @@ -135907,7 +137135,7 @@ - + @@ -135930,7 +137158,7 @@ - + @@ -135948,7 +137176,7 @@ - + @@ -135976,7 +137204,7 @@ - + @@ -135997,7 +137225,7 @@ - + @@ -136021,7 +137249,7 @@ - + @@ -136042,7 +137270,7 @@ - + @@ -136070,7 +137298,7 @@ - + @@ -136091,7 +137319,7 @@ - + @@ -136119,7 +137347,7 @@ - + @@ -136140,7 +137368,7 @@ - + @@ -136164,7 +137392,7 @@ - + @@ -136185,7 +137413,7 @@ - + @@ -136213,7 +137441,7 @@ - + @@ -136234,7 +137462,7 @@ - + @@ -136278,7 +137506,7 @@ - + @@ -136299,7 +137527,7 @@ - + @@ -136327,23 +137555,23 @@ - + - + - + - + @@ -136587,7 +137815,7 @@ - + @@ -136635,7 +137863,7 @@ - + @@ -136653,7 +137881,7 @@ - + @@ -136681,7 +137909,7 @@ - + @@ -136699,7 +137927,7 @@ - + diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 64f6d4fb97a..12b0823f40d 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 3.0.0-SNAPSHOT + 3.0.0 ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/InstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/InstanceValidator.java index aa760b2e8d8..823c3e90827 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/InstanceValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/InstanceValidator.java @@ -292,12 +292,6 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat source = Source.InstanceValidator; } - public InstanceValidator(ValidationEngine engine) { - super(); - this.context = engine.getContext(); - fpe = engine.getFpe(); - source = Source.InstanceValidator; - } @Override diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/ValidationEngine.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/ValidationEngine.java deleted file mode 100644 index 58d581f11f3..00000000000 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/ValidationEngine.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.hl7.fhir.dstu3.validation; - -import org.hl7.fhir.dstu3.context.IWorkerContext; -import org.hl7.fhir.dstu3.utils.FHIRPathEngine; - -/** - * Placeholder class, do not use - */ -public class ValidationEngine { - - public IWorkerContext getContext() { - throw new UnsupportedOperationException(); - } - - public FHIRPathEngine getFpe() { - throw new UnsupportedOperationException(); - } - - -} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/XmlValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/XmlValidator.java index 568a575f77d..c6ead06e937 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/XmlValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/XmlValidator.java @@ -1,208 +1,208 @@ -package org.hl7.fhir.dstu3.validation; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.XMLConstants; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.stream.StreamSource; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.utilities.*; -import org.hl7.fhir.utilities.Logger.LogMessageType; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; -import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType; -import org.hl7.fhir.utilities.validation.ValidationMessage.Source; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.w3c.dom.ls.LSInput; -import org.w3c.dom.ls.LSResourceResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -public class XmlValidator { - - private Schema schema; - private Map schemas; - private Map transforms; - private List errors; - private Logger logger; - - public class MyErrorHandler implements ErrorHandler { - - private List errors = new ArrayList(); - private List list; - private String path; - - public MyErrorHandler(List list, String path) { - this.list = list; - this.path = path; - } - - @Override - public void error(SAXParseException arg0) throws SAXException { - if (list != null) - list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.ERROR)); - if (logger != null) - logger.log("error: " + arg0.toString(), LogMessageType.Error); - errors.add(arg0.toString()); - } - - @Override - public void fatalError(SAXParseException arg0) throws SAXException { - if (list != null) - list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.FATAL)); - if (logger != null) - logger.log("fatal error: " + arg0.toString(), LogMessageType.Error); - } - - @Override - public void warning(SAXParseException arg0) throws SAXException { - if (list != null) - list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.WARNING)); - } - - public List getErrors() { - return errors; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - } - - public class MyResourceResolver implements LSResourceResolver { - - @Override - public LSInput resolveResource(final String type, final String namespaceURI, final String publicId, String systemId, final String baseURI) { - try { - if (!schemas.containsKey(systemId)) - return null; - return new SchemaInputSource(new ByteArrayInputStream(schemas.get(systemId)), publicId, systemId, namespaceURI); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - } - - public XmlValidator(List errors, Map schemas, Map transforms) throws FileNotFoundException, IOException, SAXException { - this.errors = errors; - this.schemas = schemas; - this.transforms = transforms; - load(); - } - - private void load() throws SAXException { - int c = 0; - for (String s : schemas.keySet()) - if (s.endsWith(".xsd")) - c++; - StreamSource[] sources = new StreamSource[c]; - int i = 0; - for (String s : schemas.keySet()) { - if (s.endsWith(".xsd")) { - sources[i] = new StreamSource(new ByteArrayInputStream(schemas.get(s)), s); - i++; - } - } - SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); - schemaFactory.setErrorHandler(new MyErrorHandler(errors, null)); - schemaFactory.setResourceResolver(new MyResourceResolver()); - schema = schemaFactory.newSchema(sources); - } - - public XmlValidator(List validationErrors, String srcDir, String xsltDir, String[] schemaNames) throws FileNotFoundException, IOException, SAXException { - loadTransforms(xsltDir); - loadSchemas(srcDir, schemaNames); - load(); - } - - private void loadTransforms(String xsltDir) throws FileNotFoundException, IOException { - Map res = new HashMap(); - for (String s : new File(xsltDir).list()) { - if (s.endsWith(".xslt")) - res.put(s, TextFile.fileToBytes(Utilities.path(xsltDir, s))); - } - this.transforms = res; - } - - private void loadSchemas(String dir, String[] names) throws FileNotFoundException, IOException { - Map res = new HashMap(); - for (String s : new File(dir).list()) { - if (s.endsWith(".sch")) - res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); - boolean ok = false; - for (String b : names) - ok = ok || b.equals(s); - if (ok) - res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); - } - this.schemas = res; - } - - public Element checkBySchema(String fileToCheck, boolean wantThrow) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException, FHIRException { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - factory.setValidating(false); - factory.setSchema(schema); - DocumentBuilder builder = factory.newDocumentBuilder(); - MyErrorHandler err = new MyErrorHandler(errors, fileToCheck); - builder.setErrorHandler(err); - CSFileInputStream f = new CSFileInputStream(new CSFile(fileToCheck)); - Document doc = builder.parse(f); - if (wantThrow && err.getErrors().size() > 0) - throw new FHIRException("File " + fileToCheck + " failed schema validation"); - return doc.getDocumentElement(); - } - - public void checkBySchematron(String filename, String sch, boolean wantThrow) throws IOException, ParserConfigurationException, SAXException, FileNotFoundException, FHIRException { - DocumentBuilderFactory factory; - DocumentBuilder builder; - Document doc; - byte[] out = null; - try { - out = SaxonUtilities.saxonTransform(transforms, schemas.get(sch), transforms.get("iso_svrl_for_xslt2.xsl")); - out = SaxonUtilities.saxonTransform(transforms, TextFile.fileToBytes(filename), out); - } catch (Throwable e) { - errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+sch, e.getMessage(), IssueSeverity.ERROR)); - if (wantThrow) - throw new FHIRException("Error validating " + filename + " with schematrons", e); - } - - factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - builder = factory.newDocumentBuilder(); - doc = builder.parse(new ByteArrayInputStream(out)); - NodeList nl = doc.getDocumentElement().getElementsByTagNameNS("http://purl.oclc.org/dsdl/svrl", "failed-assert"); - if (nl.getLength() > 0) { - logger.log("Schematron Validation Failed for " + filename, LogMessageType.Error); - for (int i = 0; i < nl.getLength(); i++) { - Element e = (Element) nl.item(i); - logger.log(" @" + e.getAttribute("location") + ": " + e.getTextContent(), LogMessageType.Error); - errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+e.getAttribute("location"), e.getTextContent(), IssueSeverity.ERROR)); - } - if (wantThrow) - throw new FHIRException("Schematron Validation Failed for " + filename); - } - } - - -} +package org.hl7.fhir.dstu3.validation; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.*; +import org.hl7.fhir.utilities.Logger.LogMessageType; +import org.hl7.fhir.utilities.validation.ValidationMessage; +import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType; +import org.hl7.fhir.utilities.validation.ValidationMessage.Source; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSResourceResolver; +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +public class XmlValidator { + + private Schema schema; + private Map schemas; + private Map transforms; + private List errors; + private Logger logger; + + public class MyErrorHandler implements ErrorHandler { + + private List errors = new ArrayList(); + private List list; + private String path; + + public MyErrorHandler(List list, String path) { + this.list = list; + this.path = path; + } + + @Override + public void error(SAXParseException arg0) throws SAXException { + if (list != null) + list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.ERROR)); + if (logger != null) + logger.log("error: " + arg0.toString(), LogMessageType.Error); + errors.add(arg0.toString()); + } + + @Override + public void fatalError(SAXParseException arg0) throws SAXException { + if (list != null) + list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.FATAL)); + if (logger != null) + logger.log("fatal error: " + arg0.toString(), LogMessageType.Error); + } + + @Override + public void warning(SAXParseException arg0) throws SAXException { + if (list != null) + list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.WARNING)); + } + + public List getErrors() { + return errors; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + } + + public class MyResourceResolver implements LSResourceResolver { + + @Override + public LSInput resolveResource(final String type, final String namespaceURI, final String publicId, String systemId, final String baseURI) { + try { + if (!schemas.containsKey(systemId)) + return null; + return new SchemaInputSource(new ByteArrayInputStream(schemas.get(systemId)), publicId, systemId, namespaceURI); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + } + + public XmlValidator(List errors, Map schemas, Map transforms) throws FileNotFoundException, IOException, SAXException { + this.errors = errors; + this.schemas = schemas; + this.transforms = transforms; + load(); + } + + private void load() throws SAXException { + int c = 0; + for (String s : schemas.keySet()) + if (s.endsWith(".xsd")) + c++; + StreamSource[] sources = new StreamSource[c]; + int i = 0; + for (String s : schemas.keySet()) { + if (s.endsWith(".xsd")) { + sources[i] = new StreamSource(new ByteArrayInputStream(schemas.get(s)), s); + i++; + } + } + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + schemaFactory.setErrorHandler(new MyErrorHandler(errors, null)); + schemaFactory.setResourceResolver(new MyResourceResolver()); + schema = schemaFactory.newSchema(sources); + } + + public XmlValidator(List validationErrors, String srcDir, String xsltDir, String[] schemaNames) throws FileNotFoundException, IOException, SAXException { + loadTransforms(xsltDir); + loadSchemas(srcDir, schemaNames); + load(); + } + + private void loadTransforms(String xsltDir) throws FileNotFoundException, IOException { + Map res = new HashMap(); + for (String s : new File(xsltDir).list()) { + if (s.endsWith(".xslt")) + res.put(s, TextFile.fileToBytes(Utilities.path(xsltDir, s))); + } + this.transforms = res; + } + + private void loadSchemas(String dir, String[] names) throws FileNotFoundException, IOException { + Map res = new HashMap(); + for (String s : new File(dir).list()) { + if (s.endsWith(".sch")) + res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); + boolean ok = false; + for (String b : names) + ok = ok || b.equals(s); + if (ok) + res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); + } + this.schemas = res; + } + + public Element checkBySchema(String fileToCheck, boolean wantThrow) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException, FHIRException { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setValidating(false); + factory.setSchema(schema); + DocumentBuilder builder = factory.newDocumentBuilder(); + MyErrorHandler err = new MyErrorHandler(errors, fileToCheck); + builder.setErrorHandler(err); + CSFileInputStream f = new CSFileInputStream(new CSFile(fileToCheck)); + Document doc = builder.parse(f); + if (wantThrow && err.getErrors().size() > 0) + throw new FHIRException("File " + fileToCheck + " failed schema validation"); + return doc.getDocumentElement(); + } + + public void checkBySchematron(String filename, String sch, boolean wantThrow) throws IOException, ParserConfigurationException, SAXException, FileNotFoundException, FHIRException { + DocumentBuilderFactory factory; + DocumentBuilder builder; + Document doc; + byte[] out = null; + try { + out = SaxonUtilities.saxonTransform(transforms, schemas.get(sch), transforms.get("iso_svrl_for_xslt2.xsl")); + out = SaxonUtilities.saxonTransform(transforms, TextFile.fileToBytes(filename), out); + } catch (Throwable e) { + errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+sch, e.getMessage(), IssueSeverity.ERROR)); + if (wantThrow) + throw new FHIRException("Error validating " + filename + " with schematrons", e); + } + + factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + builder = factory.newDocumentBuilder(); + doc = builder.parse(new ByteArrayInputStream(out)); + NodeList nl = doc.getDocumentElement().getElementsByTagNameNS("http://purl.oclc.org/dsdl/svrl", "failed-assert"); + if (nl.getLength() > 0) { + logger.log("Schematron Validation Failed for " + filename, LogMessageType.Error); + for (int i = 0; i < nl.getLength(); i++) { + Element e = (Element) nl.item(i); + logger.log(" @" + e.getAttribute("location") + ": " + e.getTextContent(), LogMessageType.Error); + errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+e.getAttribute("location"), e.getTextContent(), IssueSeverity.ERROR)); + } + if (wantThrow) + throw new FHIRException("Schematron Validation Failed for " + filename); + } + } + + +} diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirQuestionnaireResponseValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirQuestionnaireResponseValidator.java index 154f538ca1f..ff91ddce284 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirQuestionnaireResponseValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/hapi/validation/FhirQuestionnaireResponseValidator.java @@ -112,12 +112,15 @@ public class FhirQuestionnaireResponseValidator extends BaseValidatorBridge impl newResources.add(resource); } else if (resource == null) { theMessages.add(new ValidationMessage(Source.QuestionnaireResponseValidator, - IssueType.INVALID, - "Invalid reference '" + nextRef.getValue() + "' - No contained resource with this ID found", IssueSeverity.FATAL)); + IssueType.INVALID, + "", + "Invalid reference '" + nextRef.getValue() + "' - No contained resource with this ID found", + IssueSeverity.FATAL)); } } else if (isBlank(resourceType)) { theMessages.add(new ValidationMessage(Source.QuestionnaireResponseValidator, IssueType.INVALID, + "", "Invalid reference '" + nextRef.getValue() + "' - Does not identify resource type", IssueSeverity.FATAL)); } else if ("ValueSet".equals(resourceType)) { if (!theWorkerCtx.getValueSets().containsKey(nextRef.getValue())) { diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java index 1f6aaac352c..d5b84337ae9 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/InstanceValidator.java @@ -658,11 +658,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat } return false; } - } else if (system.startsWith("http://loinc.org")) { - return true; - } else if (system.startsWith("http://unitsofmeasure.org")) { - return true; - } else if (system.startsWith("http://snomed.info/sct") || system.startsWith("http://loinc.org")) { + } else if (context.isNoTerminologyServer() && Utilities.existsInList(system, "http://loinc.org", "http://unitsofmeasure.org", "http://snomed.info/sct", "http://www.nlm.nih.gov/research/umls/rxnorm")) { + return true; // no checks in this case + } else if (startsWithButIsNot(system, "http://snomed.info/sct", "http://loinc.org", "http://unitsofmeasure.org", "http://www.nlm.nih.gov/research/umls/rxnorm")) { rule(errors, IssueType.CODEINVALID, element.line(), element.col(), path, false, "Invalid System URI: "+system); return false; } else { @@ -679,6 +677,13 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat } } + private boolean startsWithButIsNot(String system, String... uri) { + for (String s : uri) + if (!system.equals(s) && system.startsWith(s)) + return true; + return false; + } + private void checkCodeableConcept(List errors, String path, Element focus, CodeableConcept fixed) { checkFixedValue(errors, path + ".text", focus.getNamedChild("text"), fixed.getTextElement(), "text", focus); List codings = new ArrayList(); diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/XmlValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/XmlValidator.java index ac6cfe5e473..965bfb69879 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/XmlValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/XmlValidator.java @@ -1,194 +1,194 @@ -package org.hl7.fhir.r4.validation; - -import java.io.*; -import java.util.*; - -import javax.xml.XMLConstants; -import javax.xml.parsers.*; -import javax.xml.transform.stream.StreamSource; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.utilities.*; -import org.hl7.fhir.utilities.Logger.LogMessageType; -import org.hl7.fhir.utilities.validation.ValidationMessage; -import org.hl7.fhir.utilities.validation.ValidationMessage.*; -import org.w3c.dom.*; -import org.w3c.dom.ls.LSInput; -import org.w3c.dom.ls.LSResourceResolver; -import org.xml.sax.*; - -public class XmlValidator { - - private Schema schema; - private Map schemas; - private Map transforms; - private List errors; - private Logger logger; - - public class MyErrorHandler implements ErrorHandler { - - private List errors = new ArrayList(); - private List list; - private String path; - - public MyErrorHandler(List list, String path) { - this.list = list; - this.path = path; - } - - @Override - public void error(SAXParseException arg0) throws SAXException { - if (list != null) - list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.ERROR)); - if (logger != null) - logger.log("error: " + arg0.toString(), LogMessageType.Error); - errors.add(arg0.toString()); - } - - @Override - public void fatalError(SAXParseException arg0) throws SAXException { - if (list != null) - list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.FATAL)); - if (logger != null) - logger.log("fatal error: " + arg0.toString(), LogMessageType.Error); - } - - @Override - public void warning(SAXParseException arg0) throws SAXException { - if (list != null) - list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.WARNING)); - } - - public List getErrors() { - return errors; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - } - - public class MyResourceResolver implements LSResourceResolver { - - @Override - public LSInput resolveResource(final String type, final String namespaceURI, final String publicId, String systemId, final String baseURI) { - try { - if (!schemas.containsKey(systemId)) - return null; - return new SchemaInputSource(new ByteArrayInputStream(schemas.get(systemId)), publicId, systemId, namespaceURI); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - } - - public XmlValidator(List errors, Map schemas, Map transforms) throws FileNotFoundException, IOException, SAXException { - this.errors = errors; - this.schemas = schemas; - this.transforms = transforms; - load(); - } - - private void load() throws SAXException { - int c = 0; - for (String s : schemas.keySet()) - if (s.endsWith(".xsd")) - c++; - StreamSource[] sources = new StreamSource[c]; - int i = 0; - for (String s : schemas.keySet()) { - if (s.endsWith(".xsd")) { - sources[i] = new StreamSource(new ByteArrayInputStream(schemas.get(s)), s); - i++; - } - } - SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); - schemaFactory.setErrorHandler(new MyErrorHandler(errors, null)); - schemaFactory.setResourceResolver(new MyResourceResolver()); - schema = schemaFactory.newSchema(sources); - } - - public XmlValidator(List validationErrors, String srcDir, String xsltDir, String[] schemaNames) throws FileNotFoundException, IOException, SAXException { - loadTransforms(xsltDir); - loadSchemas(srcDir, schemaNames); - load(); - } - - private void loadTransforms(String xsltDir) throws FileNotFoundException, IOException { - Map res = new HashMap(); - for (String s : new File(xsltDir).list()) { - if (s.endsWith(".xslt")) - res.put(s, TextFile.fileToBytes(Utilities.path(xsltDir, s))); - } - this.transforms = res; - } - - private void loadSchemas(String dir, String[] names) throws FileNotFoundException, IOException { - Map res = new HashMap(); - for (String s : new File(dir).list()) { - if (s.endsWith(".sch")) - res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); - boolean ok = false; - for (String b : names) - ok = ok || b.equals(s); - if (ok) - res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); - } - this.schemas = res; - } - - public Element checkBySchema(String fileToCheck, boolean wantThrow) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException, FHIRException { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - factory.setValidating(false); - factory.setSchema(schema); - DocumentBuilder builder = factory.newDocumentBuilder(); - MyErrorHandler err = new MyErrorHandler(errors, fileToCheck); - builder.setErrorHandler(err); - CSFileInputStream f = new CSFileInputStream(new CSFile(fileToCheck)); - Document doc = builder.parse(f); - if (wantThrow && err.getErrors().size() > 0) - throw new FHIRException("File " + fileToCheck + " failed schema validation"); - return doc.getDocumentElement(); - } - - public void checkBySchematron(String filename, String sch, boolean wantThrow) throws IOException, ParserConfigurationException, SAXException, FileNotFoundException, FHIRException { - DocumentBuilderFactory factory; - DocumentBuilder builder; - Document doc; - byte[] out = null; - try { - out = SaxonUtilities.saxonTransform(transforms, schemas.get(sch), transforms.get("iso_svrl_for_xslt2.xsl")); - out = SaxonUtilities.saxonTransform(transforms, TextFile.fileToBytes(filename), out); - } catch (Throwable e) { - errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+sch, e.getMessage(), IssueSeverity.ERROR)); - if (wantThrow) - throw new FHIRException("Error validating " + filename + " with schematrons", e); - } - - factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - builder = factory.newDocumentBuilder(); - doc = builder.parse(new ByteArrayInputStream(out)); - NodeList nl = doc.getDocumentElement().getElementsByTagNameNS("http://purl.oclc.org/dsdl/svrl", "failed-assert"); - if (nl.getLength() > 0) { - logger.log("Schematron Validation Failed for " + filename, LogMessageType.Error); - for (int i = 0; i < nl.getLength(); i++) { - Element e = (Element) nl.item(i); - logger.log(" @" + e.getAttribute("location") + ": " + e.getTextContent(), LogMessageType.Error); - errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+e.getAttribute("location"), e.getTextContent(), IssueSeverity.ERROR)); - } - if (wantThrow) - throw new FHIRException("Schematron Validation Failed for " + filename); - } - } - - -} +package org.hl7.fhir.r4.validation; + +import java.io.*; +import java.util.*; + +import javax.xml.XMLConstants; +import javax.xml.parsers.*; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.utilities.*; +import org.hl7.fhir.utilities.Logger.LogMessageType; +import org.hl7.fhir.utilities.validation.ValidationMessage; +import org.hl7.fhir.utilities.validation.ValidationMessage.*; +import org.w3c.dom.*; +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSResourceResolver; +import org.xml.sax.*; + +public class XmlValidator { + + private Schema schema; + private Map schemas; + private Map transforms; + private List errors; + private Logger logger; + + public class MyErrorHandler implements ErrorHandler { + + private List errors = new ArrayList(); + private List list; + private String path; + + public MyErrorHandler(List list, String path) { + this.list = list; + this.path = path; + } + + @Override + public void error(SAXParseException arg0) throws SAXException { + if (list != null) + list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.ERROR)); + if (logger != null) + logger.log("error: " + arg0.toString(), LogMessageType.Error); + errors.add(arg0.toString()); + } + + @Override + public void fatalError(SAXParseException arg0) throws SAXException { + if (list != null) + list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.FATAL)); + if (logger != null) + logger.log("fatal error: " + arg0.toString(), LogMessageType.Error); + } + + @Override + public void warning(SAXParseException arg0) throws SAXException { + if (list != null) + list.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, arg0.getLineNumber(), arg0.getColumnNumber(), path == null ? arg0.getSystemId() : path, arg0.getMessage(), IssueSeverity.WARNING)); + } + + public List getErrors() { + return errors; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + } + + public class MyResourceResolver implements LSResourceResolver { + + @Override + public LSInput resolveResource(final String type, final String namespaceURI, final String publicId, String systemId, final String baseURI) { + try { + if (!schemas.containsKey(systemId)) + return null; + return new SchemaInputSource(new ByteArrayInputStream(schemas.get(systemId)), publicId, systemId, namespaceURI); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + } + + public XmlValidator(List errors, Map schemas, Map transforms) throws FileNotFoundException, IOException, SAXException { + this.errors = errors; + this.schemas = schemas; + this.transforms = transforms; + load(); + } + + private void load() throws SAXException { + int c = 0; + for (String s : schemas.keySet()) + if (s.endsWith(".xsd")) + c++; + StreamSource[] sources = new StreamSource[c]; + int i = 0; + for (String s : schemas.keySet()) { + if (s.endsWith(".xsd")) { + sources[i] = new StreamSource(new ByteArrayInputStream(schemas.get(s)), s); + i++; + } + } + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + schemaFactory.setErrorHandler(new MyErrorHandler(errors, null)); + schemaFactory.setResourceResolver(new MyResourceResolver()); + schema = schemaFactory.newSchema(sources); + } + + public XmlValidator(List validationErrors, String srcDir, String xsltDir, String[] schemaNames) throws FileNotFoundException, IOException, SAXException { + loadTransforms(xsltDir); + loadSchemas(srcDir, schemaNames); + load(); + } + + private void loadTransforms(String xsltDir) throws FileNotFoundException, IOException { + Map res = new HashMap(); + for (String s : new File(xsltDir).list()) { + if (s.endsWith(".xslt")) + res.put(s, TextFile.fileToBytes(Utilities.path(xsltDir, s))); + } + this.transforms = res; + } + + private void loadSchemas(String dir, String[] names) throws FileNotFoundException, IOException { + Map res = new HashMap(); + for (String s : new File(dir).list()) { + if (s.endsWith(".sch")) + res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); + boolean ok = false; + for (String b : names) + ok = ok || b.equals(s); + if (ok) + res.put(s, TextFile.fileToBytes(Utilities.path(dir, s))); + } + this.schemas = res; + } + + public Element checkBySchema(String fileToCheck, boolean wantThrow) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException, FHIRException { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setValidating(false); + factory.setSchema(schema); + DocumentBuilder builder = factory.newDocumentBuilder(); + MyErrorHandler err = new MyErrorHandler(errors, fileToCheck); + builder.setErrorHandler(err); + CSFileInputStream f = new CSFileInputStream(new CSFile(fileToCheck)); + Document doc = builder.parse(f); + if (wantThrow && err.getErrors().size() > 0) + throw new FHIRException("File " + fileToCheck + " failed schema validation"); + return doc.getDocumentElement(); + } + + public void checkBySchematron(String filename, String sch, boolean wantThrow) throws IOException, ParserConfigurationException, SAXException, FileNotFoundException, FHIRException { + DocumentBuilderFactory factory; + DocumentBuilder builder; + Document doc; + byte[] out = null; + try { + out = SaxonUtilities.saxonTransform(transforms, schemas.get(sch), transforms.get("iso_svrl_for_xslt2.xsl")); + out = SaxonUtilities.saxonTransform(transforms, TextFile.fileToBytes(filename), out); + } catch (Throwable e) { + errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+sch, e.getMessage(), IssueSeverity.ERROR)); + if (wantThrow) + throw new FHIRException("Error validating " + filename + " with schematrons", e); + } + + factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + builder = factory.newDocumentBuilder(); + doc = builder.parse(new ByteArrayInputStream(out)); + NodeList nl = doc.getDocumentElement().getElementsByTagNameNS("http://purl.oclc.org/dsdl/svrl", "failed-assert"); + if (nl.getLength() > 0) { + logger.log("Schematron Validation Failed for " + filename, LogMessageType.Error); + for (int i = 0; i < nl.getLength(); i++) { + Element e = (Element) nl.item(i); + logger.log(" @" + e.getAttribute("location") + ": " + e.getTextContent(), LogMessageType.Error); + errors.add(new ValidationMessage(Source.InstanceValidator, IssueType.STRUCTURE, -1, -1, filename+":"+e.getAttribute("location"), e.getTextContent(), IssueSeverity.ERROR)); + } + if (wantThrow) + throw new FHIRException("Schematron Validation Failed for " + filename); + } + } + + +} diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index d3b1abbb8af..65b80bf4925 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml @@ -38,17 +38,6 @@ for the structures a version behind the main library. This is weird, but it works. --> - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu - 2.2 - - - ca.uhn.hapi.fhir - hapi-fhir-base - - - ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java deleted file mode 100644 index 58cad302068..00000000000 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java +++ /dev/null @@ -1,125 +0,0 @@ -package ca.uhn.fhir.model.primitive; - -/* - * #%L - * HAPI FHIR Structures - DSTU (FHIR 0.80) - * %% - * Copyright (C) 2014 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import static org.apache.commons.lang3.StringUtils.defaultString; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import ca.uhn.fhir.model.api.IBoundCodeableConcept; -import ca.uhn.fhir.model.api.IValueSetEnumBinder; -import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; -import ca.uhn.fhir.model.dstu.composite.CodingDt; - -@DatatypeDef(name = "CodeableConcept", isSpecialization = true) -public class BoundCodeableConceptDt> extends CodeableConceptDt implements IBoundCodeableConcept { - - private IValueSetEnumBinder myBinder; - - /** - * Constructor - */ - public BoundCodeableConceptDt(IValueSetEnumBinder theBinder) { - myBinder = theBinder; - } - - /** - * Constructor - */ - public BoundCodeableConceptDt(IValueSetEnumBinder theBinder, T theValue) { - myBinder = theBinder; - setValueAsEnum(theValue); - } - - /** - * Constructor - */ - public BoundCodeableConceptDt(IValueSetEnumBinder theBinder, Collection theValues) { - myBinder = theBinder; - setValueAsEnum(theValues); - } - - /** - * Sets the {@link #getCoding()} to contain a coding with the code and - * system defined by the given enumerated types, AND clearing any existing - * codings first. If theValue is null, existing codings are cleared and no - * codings are added. - * - * @param theValue - * The value to add, or null - */ - public void setValueAsEnum(Collection theValues) { - getCoding().clear(); - if (theValues != null) { - for (T next : theValues) { - getCoding().add(new CodingDt(myBinder.toSystemString(next), myBinder.toCodeString(next))); - } - } - } - - /** - * Sets the {@link #getCoding()} to contain a coding with the code and - * system defined by the given enumerated type, AND clearing any existing - * codings first. If theValue is null, existing codings are cleared and no - * codings are added. - * - * @param theValue - * The value to add, or null - */ - public void setValueAsEnum(T theValue) { - getCoding().clear(); - if (theValue == null) { - return; - } - getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeString(theValue))); - } - - /** - * Loops through the {@link #getCoding() codings} in this codeable concept - * and returns the first bound enumerated type that matches. Use - * caution using this method, see the return description for more - * information. - * - * @return Returns the bound enumerated type, or null if none - * are found. Note that a null return value doesn't neccesarily - * imply that this Codeable Concept has no codes, only that it has - * no codes that match the enum. - */ - public Set getValueAsEnum() { - Set retVal = new HashSet(); - for (CodingDt next : getCoding()) { - if (next == null) { - continue; - } - T nextT = myBinder.fromCodeString(defaultString(next.getCode().getValue()), defaultString(next.getSystem().getValueAsString())); - if (nextT != null) { - retVal.add(nextT); - } else { - // TODO: throw special exception type? - } - } - return retVal; - } - -} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/AbstractGenerator.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/AbstractGenerator.java index 95ea0dd0e7e..03a07b0fc26 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/AbstractGenerator.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/AbstractGenerator.java @@ -19,28 +19,19 @@ package ca.uhn.fhir.tinder; * #L% */ -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.TreeSet; - -import org.apache.maven.plugin.MojoFailureException; - import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.tinder.GeneratorContext.ProfileFileDefinition; import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; -import ca.uhn.fhir.tinder.parser.ProfileParser; import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; +import java.io.IOException; +import java.util.*; + public abstract class AbstractGenerator { - protected abstract void logInfo (String message); protected abstract void logDebug (String message); + + protected abstract void logInfo (String message); public void prepare (GeneratorContext context) throws ExecutionException, FailureException { @@ -114,7 +105,6 @@ public abstract class AbstractGenerator { */ ValueSetGenerator vsp = null; DatatypeGeneratorUsingSpreadsheet dtp = null; - ProfileParser pp = null; Map datatypeLocalImports = new HashMap(); vsp = new ValueSetGenerator(context.getVersion()); @@ -166,28 +156,6 @@ public abstract class AbstractGenerator { rp.combineContentMaps(dtp); dtp.combineContentMaps(rp); - if (context.getProfileFiles() != null) { - logInfo("Loading profiles..."); - pp = new ProfileParser(context.getVersion(), context.getBaseDir()); - context.setProfileParser(pp); - for (ProfileFileDefinition next : context.getProfileFiles()) { - logInfo("Parsing file: "+next.profileFile); - try { - pp.parseSingleProfile(new File(next.profileFile), next.profileSourceUrl); - } catch (MojoFailureException e) { - throw new FailureException(e); - } - } - - pp.bindValueSets(vsp); - pp.markResourcesForImports(); - pp.getLocalImports().putAll(datatypeLocalImports); - datatypeLocalImports.putAll(pp.getLocalImports()); - - pp.combineContentMaps(rp); - pp.combineContentMaps(dtp); - dtp.combineContentMaps(pp); - } } public class FailureException extends Exception { diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/GeneratorContext.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/GeneratorContext.java index 1574445bc54..a3b1621d0f4 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/GeneratorContext.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/GeneratorContext.java @@ -19,14 +19,12 @@ package ca.uhn.fhir.tinder; * #L% */ -import java.util.List; - -import org.apache.maven.plugins.annotations.Parameter; - import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; -import ca.uhn.fhir.tinder.parser.ProfileParser; import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; +import org.apache.maven.plugins.annotations.Parameter; + +import java.util.List; /** * @author Bill.Denton @@ -39,76 +37,78 @@ public class GeneratorContext { private List includeResources; private List excludeResources; private List valueSetFiles; - private List profileFiles; private ResourceGeneratorUsingSpreadsheet resourceGenerator = null; private ValueSetGenerator valueSetGenerator = null; private DatatypeGeneratorUsingSpreadsheet datatypeGenerator = null; - private ProfileParser profileParser = null; - public String getVersion() { - return version; - } - public void setVersion(String version) { - this.version = version; - } - public String getPackageSuffix() { - return packageSuffix; - } - public void setPackageSuffix(String packageSuffix) { - this.packageSuffix = packageSuffix; - } + public String getBaseDir() { return baseDir; } + public void setBaseDir(String baseDir) { this.baseDir = baseDir; } + + public DatatypeGeneratorUsingSpreadsheet getDatatypeGenerator() { + return datatypeGenerator; + } + + public void setDatatypeGenerator(DatatypeGeneratorUsingSpreadsheet datatypeGenerator) { + this.datatypeGenerator = datatypeGenerator; + } + + public List getExcludeResources() { + return excludeResources; + } + + public void setExcludeResources(List excludeResources) { + this.excludeResources = excludeResources; + } + public List getIncludeResources() { return includeResources; } public void setIncludeResources(List includeResources) { this.includeResources = includeResources; } - public List getExcludeResources() { - return excludeResources; + + public String getPackageSuffix() { + return packageSuffix; } - public void setExcludeResources(List excludeResources) { - this.excludeResources = excludeResources; - } - public List getValueSetFiles() { - return valueSetFiles; - } - public void setValueSetFiles(List valueSetFiles) { - this.valueSetFiles = valueSetFiles; - } - public List getProfileFiles() { - return profileFiles; - } - public void setProfileFiles(List profileFiles) { - this.profileFiles = profileFiles; + + public void setPackageSuffix(String packageSuffix) { + this.packageSuffix = packageSuffix; } + public ResourceGeneratorUsingSpreadsheet getResourceGenerator() { return resourceGenerator; } + public void setResourceGenerator(ResourceGeneratorUsingSpreadsheet resourceGenerator) { this.resourceGenerator = resourceGenerator; } + + public List getValueSetFiles() { + return valueSetFiles; + } + + public void setValueSetFiles(List valueSetFiles) { + this.valueSetFiles = valueSetFiles; + } + public ValueSetGenerator getValueSetGenerator() { return valueSetGenerator; } public void setValueSetGenerator(ValueSetGenerator valueSetGenerator) { this.valueSetGenerator = valueSetGenerator; } - public DatatypeGeneratorUsingSpreadsheet getDatatypeGenerator() { - return datatypeGenerator; + + public String getVersion() { + return version; } - public void setDatatypeGenerator(DatatypeGeneratorUsingSpreadsheet datatypeGenerator) { - this.datatypeGenerator = datatypeGenerator; - } - public ProfileParser getProfileParser() { - return profileParser; - } - public void setProfileParser(ProfileParser profileParser) { - this.profileParser = profileParser; + + public void setVersion(String version) { + this.version = version; } public static class ProfileFileDefinition { diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderClientMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderClientMojo.java deleted file mode 100644 index b32c42d58e8..00000000000 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderClientMojo.java +++ /dev/null @@ -1,204 +0,0 @@ -package ca.uhn.fhir.tinder; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.tools.generic.EscapeTool; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu.resource.Conformance; -import ca.uhn.fhir.model.dstu.resource.Conformance.Rest; -import ca.uhn.fhir.model.dstu.resource.Conformance.RestResource; -import ca.uhn.fhir.model.dstu.resource.Profile; -import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; -import ca.uhn.fhir.rest.client.api.IBasicClient; -import ca.uhn.fhir.tinder.model.BaseRootType; -import ca.uhn.fhir.tinder.model.RestResourceTm; -import ca.uhn.fhir.tinder.model.SearchParameter; -import ca.uhn.fhir.tinder.parser.ProfileParser; -import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; - -@Mojo(name = "generate-client", defaultPhase = LifecyclePhase.GENERATE_SOURCES) -public class TinderClientMojo extends AbstractMojo { - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TinderClientMojo.class); - - @Parameter(required = true) - private String serverBaseHref; - - @Parameter(required = true) - private String clientClassName; - - @Parameter(required = true, defaultValue = "${project.build.directory}/generated-sources/tinder") - private File targetDirectory; - - @Parameter(required = true, defaultValue = "false") - private boolean generateSearchForAllParams; - - @Parameter(alias = "version", required = true, defaultValue="dstu") - private String version = "dstu"; - - @Parameter(required = true, defaultValue = "${project.build.directory}/..") - private String baseDir; - - private List myResources = new ArrayList(); - private String myPackageBase; - private File myDirectoryBase; - private String myClientClassSimpleName; - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - determinePaths(); - - // - // try { - // ProfileParser pp = new ProfileParser(); - // Profile prof=(Profile) new FhirContext(Profile.class).newXmlParser().parseResource(IOUtils.toString(new FileReader("src/test/resources/profile.xml"))); - // pp.parseSingleProfile(prof, "http://foo"); - // File resourceDir = new File(myDirectoryBase, "resource"); - // resourceDir.mkdirs(); - // pp.writeAll(resourceDir, myPackageBase); - // } catch (Exception e) { - // throw new MojoFailureException("Failed to load resource profile: ",e); - // } - // if (true) { - // return; - // } - - FhirContext ctx = new FhirContext(Conformance.class); - IBasicClient client = ctx.newRestfulClient(IBasicClient.class, serverBaseHref); - - Conformance conformance = (Conformance)client.getServerConformanceStatement(); - - if (conformance.getRest().size() != 1) { - throw new MojoFailureException("Found " + conformance.getRest().size() + " rest definitions in Conformance resource. Need exactly 1."); - } - - Rest rest = conformance.getRest().get(0); - if (rest.getMode().getValueAsEnum() != RestfulConformanceModeEnum.SERVER) { - throw new MojoFailureException("Conformance mode is not server, found: " + rest.getMode().getValue()); - } - - ProfileParser pp = new ProfileParser(version,baseDir ); - for (RestResource nextResource : rest.getResource()) { - if (StringUtils.isBlank(nextResource.getProfile().getReference().getValue())) { - continue; - } - - RestResourceTm nextTmResource = new RestResourceTm(nextResource); - myResources.add(nextTmResource); - - Profile profile; - try { - ourLog.info("Loading Profile: {}", nextResource.getProfile().getReference().getValue()); - profile = (Profile) nextResource.getProfile().loadResource(client); - } catch (Exception e) { - throw new MojoFailureException("Failed to load resource profile: " + nextResource.getProfile().getReference().getValue(), e); - } - - BaseRootType resourceModel; - try { - resourceModel = pp.parseSingleProfile(profile, nextResource.getProfile().getReference().getValue()); - } catch (Exception e) { - throw new MojoFailureException("Failed to load resource profile: " + nextResource.getProfile().getReference().getValue(), e); - } - - if (generateSearchForAllParams) { - for (SearchParameter next : resourceModel.getSearchParameters()) { - nextTmResource.getSearchParams().add(next); - } - } - } - - File resourceDir = new File(myDirectoryBase, "resource"); - resourceDir.mkdirs(); - pp.markResourcesForImports(); - pp.writeAll(resourceDir, null,myPackageBase); - - try { - write(); - } catch (IOException e) { - throw new MojoFailureException("Failed to write", e); - } - - } - - private void determinePaths() { - myPackageBase = ""; - myDirectoryBase = targetDirectory; - myClientClassSimpleName = clientClassName; - if (clientClassName.lastIndexOf('.') > -1) { - myPackageBase = clientClassName.substring(0, clientClassName.lastIndexOf('.')); - myDirectoryBase = new File(myDirectoryBase, myPackageBase.replace(".", File.separatorChar + "")); - myClientClassSimpleName = clientClassName.substring(clientClassName.lastIndexOf('.') + 1); - } - - myDirectoryBase.mkdirs(); - } - - private void write() throws IOException { - File file = new File(myDirectoryBase, myClientClassSimpleName + ".java"); - OutputStreamWriter w = new OutputStreamWriter(new FileOutputStream(file, false), "UTF-8"); - - - ourLog.debug("Writing file: {}", file.getAbsolutePath()); - - VelocityContext ctx = new VelocityContext(); - ctx.put("packageBase", myPackageBase); - ctx.put("className", myClientClassSimpleName); - ctx.put("resources", myResources); - ctx.put("esc", new EscapeTool()); - - VelocityEngine v = new VelocityEngine(); - v.setProperty("resource.loader", "cp"); - v.setProperty("cp.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); - v.setProperty("runtime.references.strict", Boolean.TRUE); - - InputStream templateIs = ResourceGeneratorUsingSpreadsheet.class.getResourceAsStream("/vm/client.vm"); - InputStreamReader templateReader = new InputStreamReader(templateIs); - v.evaluate(ctx, w, "", templateReader); - - w.close(); - } - - public static void main(String[] args) throws IOException, MojoFailureException, MojoExecutionException { - - // PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); - // HttpClientBuilder builder = HttpClientBuilder.create(); - // builder.setConnectionManager(connectionManager); - // CloseableHttpClient client = builder.build(); - // - // HttpGet get = new HttpGet("http://fhir.healthintersections.com.au/open/metadata"); - // CloseableHttpResponse response = client.execute(get); - // - // String metadataString = EntityUtils.toString(response.getEntity()); - // - // ourLog.info("Metadata String: {}", metadataString); - - // String metadataString = IOUtils.toString(new FileInputStream("src/test/resources/healthintersections-metadata.xml")); - // Conformance conformance = new FhirContext(Conformance.class).newXmlParser().parseResource(Conformance.class, metadataString); - - TinderClientMojo mojo = new TinderClientMojo(); - mojo.clientClassName = "ca.uhn.test.ClientClass"; - mojo.targetDirectory = new File("target/gen"); - mojo.serverBaseHref = "http://fhir.healthintersections.com.au/open"; - mojo.generateSearchForAllParams = true; - mojo.execute(); - } - -} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericMultiFileMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericMultiFileMojo.java index fbe9319e95f..f4088cd4a26 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericMultiFileMojo.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericMultiFileMojo.java @@ -1,21 +1,25 @@ package ca.uhn.fhir.tinder; +import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException; +import ca.uhn.fhir.tinder.AbstractGenerator.FailureException; +import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; +import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.TargetType; +import org.apache.maven.model.Resource; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.project.MavenProject; + import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.maven.model.Resource; -import org.apache.maven.plugin.*; -import org.apache.maven.plugins.annotations.*; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.project.MavenProject; - -import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException; -import ca.uhn.fhir.tinder.AbstractGenerator.FailureException; -import ca.uhn.fhir.tinder.GeneratorContext.ProfileFileDefinition; -import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; -import ca.uhn.fhir.tinder.parser.*; - /** * Generate files from FHIR resource/composite metadata using Velocity templates. *

@@ -208,9 +212,6 @@ public class TinderGenericMultiFileMojo extends AbstractMojo { @Parameter(required = false, defaultValue = "false") private boolean generateValueSets; - @Parameter(required = false, defaultValue = "false") - private boolean generateProfiles; - @Parameter(required = false) private File targetSourceDirectory; @@ -248,9 +249,6 @@ public class TinderGenericMultiFileMojo extends AbstractMojo { @Parameter(required = false) private List valueSetFiles; - @Parameter(required = false) - private List profileFiles; - @Component private MavenProject myProject; @@ -263,8 +261,7 @@ public class TinderGenericMultiFileMojo extends AbstractMojo { context.setIncludeResources(includeResources); context.setExcludeResources(excludeResources); context.setValueSetFiles(valueSetFiles); - context.setProfileFiles(profileFiles); - + Generator generator = new Generator(); try { generator.prepare(context); @@ -353,21 +350,6 @@ public class TinderGenericMultiFileMojo extends AbstractMojo { vsp.writeMarkedValueSets(targetType, targetDirectory, targetPackage); } - /* - * Write profiles - */ - ProfileParser pp = context.getProfileParser(); - if (generateProfiles && pp != null) { - ourLog.info("Writing Profiles..."); - pp.setFilenamePrefix(filenamePrefix); - pp.setFilenameSuffix(filenameSuffix); - pp.setTemplate(template); - pp.setTemplateFile(templateFile); - pp.setVelocityPath(velocityPath); - pp.setVelocityProperties(velocityProperties); - pp.writeAll(targetType, targetDirectory, null, targetPackage); - } - switch (targetType) { case SOURCE: { myProject.addCompileSourceRoot(targetSourceDirectory.getAbsolutePath()); @@ -416,13 +398,14 @@ public class TinderGenericMultiFileMojo extends AbstractMojo { } class Generator extends AbstractGenerator { - @Override - protected void logInfo(String message) { - ourLog.info(message); - } @Override protected void logDebug(String message) { ourLog.debug(message); } + + @Override + protected void logInfo(String message) { + ourLog.info(message); + } } } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericSingleFileMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericSingleFileMojo.java index 855317892cf..5b2137f22d3 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericSingleFileMojo.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderGenericSingleFileMojo.java @@ -1,23 +1,28 @@ package ca.uhn.fhir.tinder; -import java.io.*; -import java.util.List; - +import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException; +import ca.uhn.fhir.tinder.AbstractGenerator.FailureException; +import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; +import ca.uhn.fhir.tinder.parser.BaseStructureSpreadsheetParser; +import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.TargetType; import org.apache.commons.lang.WordUtils; import org.apache.maven.model.Resource; -import org.apache.maven.plugin.*; -import org.apache.maven.plugins.annotations.*; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.tools.generic.EscapeTool; -import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException; -import ca.uhn.fhir.tinder.AbstractGenerator.FailureException; -import ca.uhn.fhir.tinder.GeneratorContext.ProfileFileDefinition; -import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; -import ca.uhn.fhir.tinder.parser.*; +import java.io.*; +import java.util.List; /** * Generate a single file based on resource or composite type metadata. @@ -231,9 +236,6 @@ public class TinderGenericSingleFileMojo extends AbstractMojo { @Parameter(required = false) private List valueSetFiles; - @Parameter(required = false) - private List profileFiles; - @Component private MavenProject myProject; @@ -246,8 +248,7 @@ public class TinderGenericSingleFileMojo extends AbstractMojo { context.setIncludeResources(includeResources); context.setExcludeResources(excludeResources); context.setValueSetFiles(valueSetFiles); - context.setProfileFiles(profileFiles); - + Generator generator = new Generator(); try { generator.prepare(context); @@ -418,13 +419,14 @@ public class TinderGenericSingleFileMojo extends AbstractMojo { } class Generator extends AbstractGenerator { - @Override - protected void logInfo(String message) { - ourLog.info(message); - } @Override protected void logDebug(String message) { ourLog.debug(message); } + + @Override + protected void logInfo(String message) { + ourLog.info(message); + } } } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderStructuresMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderStructuresMojo.java index b52666dc707..6e087eaf075 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderStructuresMojo.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/TinderStructuresMojo.java @@ -1,11 +1,7 @@ package ca.uhn.fhir.tinder; -import java.io.File; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; import org.apache.commons.lang3.StringUtils; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; @@ -16,9 +12,11 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; -import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; -import ca.uhn.fhir.tinder.parser.ProfileParser; -import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; +import java.io.File; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; @Mojo(name = "generate-structures", defaultPhase = LifecyclePhase.GENERATE_SOURCES) public class TinderStructuresMojo extends AbstractMojo { @@ -40,9 +38,6 @@ public class TinderStructuresMojo extends AbstractMojo { @Parameter(alias = "version", required = true, defaultValue="dstu") private String version = "dstu"; - @Parameter(required = false) - private List resourceProfileFiles; - @Parameter(required = false) private List resourceValueSetFiles; @@ -128,29 +123,9 @@ public class TinderStructuresMojo extends AbstractMojo { rp.writeAll(resSubDirectoryBase, resDirectoryBase, packageName); } - ProfileParser pp = new ProfileParser(version, baseDir); - if (resourceProfileFiles != null) { - ourLog.info("Loading profiles..."); - for (ProfileFileDefinition next : resourceProfileFiles) { - ourLog.info("Parsing file: {}", next.profileFile); - pp.parseSingleProfile(new File(next.profileFile), next.profileSourceUrl); - } - - pp.bindValueSets(vsp); - pp.markResourcesForImports(); - pp.getLocalImports().putAll(datatypeLocalImports); - datatypeLocalImports.putAll(pp.getLocalImports()); - - pp.combineContentMaps(rp); - pp.combineContentMaps(dtp); - pp.writeAll(new File(directoryBase, "resource"), resDirectoryBase, packageName); - } - - if (dtp != null) { ourLog.info("Writing Composite Datatypes..."); - dtp.combineContentMaps(pp); dtp.combineContentMaps(rp); dtp.writeAll(new File(directoryBase, "composite"), resDirectoryBase, packageName); } @@ -165,50 +140,42 @@ public class TinderStructuresMojo extends AbstractMojo { return baseResourceNames; } - public String getPackageName() { - return packageName; - } - - public List getResourceProfileFiles() { - return resourceProfileFiles; - } - - public List getResourceValueSetFiles() { - return resourceValueSetFiles; - } - - public String getTargetDirectory() { - return targetDirectory; - } - - public boolean isBuildDatatypes() { - return buildDatatypes; - } - public void setBaseResourceNames(List theBaseResourceNames) { baseResourceNames = theBaseResourceNames; } - public void setBuildDatatypes(boolean theBuildDatatypes) { - buildDatatypes = theBuildDatatypes; + public String getPackageName() { + return packageName; } public void setPackageName(String thePackageName) { packageName = thePackageName; } - public void setResourceProfileFiles(List theResourceProfileFiles) { - resourceProfileFiles = theResourceProfileFiles; + public List getResourceValueSetFiles() { + return resourceValueSetFiles; } public void setResourceValueSetFiles(List theResourceValueSetFiles) { resourceValueSetFiles = theResourceValueSetFiles; } + public String getTargetDirectory() { + return targetDirectory; + } + public void setTargetDirectory(String theTargetDirectory) { targetDirectory = theTargetDirectory; } + public boolean isBuildDatatypes() { + return buildDatatypes; + } + + public void setBuildDatatypes(boolean theBuildDatatypes) { + buildDatatypes = theBuildDatatypes; + } + public static void main(String[] args) throws Exception { diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ValueSetGenerator.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ValueSetGenerator.java index f7fc6f83b1b..42a5d6411a7 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ValueSetGenerator.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ValueSetGenerator.java @@ -1,9 +1,16 @@ package ca.uhn.fhir.tinder; -import java.io.*; -import java.nio.charset.Charset; -import java.util.*; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; +import ca.uhn.fhir.model.dstu2.resource.ValueSet; +import ca.uhn.fhir.model.dstu2.resource.ValueSet.CodeSystem; +import ca.uhn.fhir.model.dstu2.resource.ValueSet.CodeSystemConcept; +import ca.uhn.fhir.model.dstu2.resource.ValueSet.ComposeIncludeConcept; +import ca.uhn.fhir.parser.IParser; +import ca.uhn.fhir.parser.LenientErrorHandler; +import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; +import ca.uhn.fhir.tinder.model.ValueSetTm; +import ca.uhn.fhir.tinder.parser.TargetType; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; @@ -12,19 +19,9 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.tools.generic.EscapeTool; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu.resource.ValueSet; -import ca.uhn.fhir.model.dstu.resource.ValueSet.ComposeInclude; -import ca.uhn.fhir.model.dstu.resource.ValueSet.Define; -import ca.uhn.fhir.model.dstu.resource.ValueSet.DefineConcept; -import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry; -import ca.uhn.fhir.model.dstu2.resource.ValueSet.*; -import ca.uhn.fhir.model.primitive.CodeDt; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.parser.LenientErrorHandler; -import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; -import ca.uhn.fhir.tinder.model.ValueSetTm; -import ca.uhn.fhir.tinder.parser.TargetType; +import java.io.*; +import java.nio.charset.Charset; +import java.util.*; public class ValueSetGenerator { @@ -56,15 +53,6 @@ public class ValueSetGenerator { } } - private void addDefinedConcept(ValueSetTm vs, String system, DefineConcept nextConcept) { - String nextCodeValue = nextConcept.getCode().getValue(); - String nextCodeDisplay = StringUtils.defaultString(nextConcept.getDisplay().getValue()); - String nextCodeDefinition = StringUtils.defaultString(nextConcept.getDefinition().getValue()); - vs.addConcept(system, nextCodeValue, nextCodeDisplay, nextCodeDefinition); - for (DefineConcept nextChild : nextConcept.getConcept()) { - addDefinedConcept(vs, system, nextChild); - } - } public String getClassForValueSetIdAndMarkAsNeeded(String theId) { ValueSetTm vs = myValueSets.get(theId); @@ -207,59 +195,34 @@ public class ValueSetGenerator { return vs; } - private ValueSetTm parseValueSet(ValueSet nextVs) { - myConceptCount += nextVs.getDefine().getConcept().size(); - ourLog.debug("Parsing ValueSetTm #{} - {} - {} concepts total", myValueSetCount++, nextVs.getName().getValue(), myConceptCount); - // output.addConcept(next.getCode().getValue(), - // next.getDisplay().getValue(), next.getDefinition()); + public void setFilenamePrefix(String theFilenamePrefix) { + myFilenamePrefix = theFilenamePrefix; + } - ValueSetTm vs = new ValueSetTm(); - - vs.setName(nextVs.getName().getValue()); - vs.setDescription(nextVs.getDescription().getValue()); - vs.setId(nextVs.getIdentifier().getValue()); - vs.setClassName(toClassName(nextVs.getName().getValue())); - - { - Define define = nextVs.getDefine(); - String system = define.getSystem().getValueAsString(); - for (DefineConcept nextConcept : define.getConcept()) { - addDefinedConcept(vs, system, nextConcept); - } - } - - for (ComposeInclude nextInclude : nextVs.getCompose().getInclude()) { - String system = nextInclude.getSystem().getValueAsString(); - for (CodeDt nextConcept : nextInclude.getCode()) { - String nextCodeValue = nextConcept.getValue(); - vs.addConcept(system, nextCodeValue, null, null); - } - } - -// if (vs.getCodes().isEmpty()) { -// ourLog.info("ValueSet " + nextVs.getName() + " has no codes, not going to generate any code for it"); -// return null; -// } - - if (myValueSets.containsKey(vs.getName())) { - ourLog.warn("Duplicate Name: " + vs.getName()); - } else { - myValueSets.put(vs.getName(), vs); - } - - // This is hackish, but deals with "Administrative Gender Codes" vs "AdministrativeGender" - if (vs.getName().endsWith(" Codes")) { - myValueSets.put(vs.getName().substring(0, vs.getName().length() - 6).replace(" ", ""), vs); - } - myValueSets.put(vs.getName().replace(" ", ""), vs); - - return vs; + public void setFilenameSuffix(String theFilenameSuffix) { + myFilenameSuffix = theFilenameSuffix; } public void setResourceValueSetFiles(List theResourceValueSetFiles) { myResourceValueSetFiles = theResourceValueSetFiles; } + public void setTemplate(String theTemplate) { + myTemplate = theTemplate; + } + + public void setTemplateFile (File theTemplateFile) { + myTemplateFile = theTemplateFile; + } + + public void setVelocityPath(String theVelocityPath) { + myVelocityPath = theVelocityPath; + } + + public void setVelocityProperties(String theVelocityProperties) { + myVelocityProperties = theVelocityProperties; + } + private String toClassName(String theValue) { StringBuilder b = new StringBuilder(); for (String next : theValue.split("\\s+")) { @@ -284,30 +247,6 @@ public class ValueSetGenerator { return b.toString(); } - public void setFilenamePrefix(String theFilenamePrefix) { - myFilenamePrefix = theFilenamePrefix; - } - - public void setFilenameSuffix(String theFilenameSuffix) { - myFilenameSuffix = theFilenameSuffix; - } - - public void setTemplate(String theTemplate) { - myTemplate = theTemplate; - } - - public void setTemplateFile (File theTemplateFile) { - myTemplateFile = theTemplateFile; - } - - public void setVelocityPath(String theVelocityPath) { - myVelocityPath = theVelocityPath; - } - - public void setVelocityProperties(String theVelocityProperties) { - myVelocityProperties = theVelocityProperties; - } - public void write(Collection theValueSets, File theOutputDirectory, String thePackageBase) throws IOException { write(TargetType.SOURCE, theValueSets, theOutputDirectory, thePackageBase); } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ant/TinderGeneratorTask.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ant/TinderGeneratorTask.java index d71a7db5af1..057b279f289 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ant/TinderGeneratorTask.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ant/TinderGeneratorTask.java @@ -19,16 +19,18 @@ package ca.uhn.fhir.tinder.ant; * #L% */ -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.tinder.AbstractGenerator; +import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException; +import ca.uhn.fhir.tinder.AbstractGenerator.FailureException; +import ca.uhn.fhir.tinder.GeneratorContext; +import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; +import ca.uhn.fhir.tinder.ValueSetGenerator; +import ca.uhn.fhir.tinder.VelocityHelper; +import ca.uhn.fhir.tinder.parser.BaseStructureSpreadsheetParser; +import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; +import ca.uhn.fhir.tinder.parser.TargetType; import org.apache.commons.lang.WordUtils; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; @@ -36,20 +38,10 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.tools.generic.EscapeTool; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.tinder.AbstractGenerator; -import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException; -import ca.uhn.fhir.tinder.AbstractGenerator.FailureException; -import ca.uhn.fhir.tinder.GeneratorContext; -import ca.uhn.fhir.tinder.GeneratorContext.ProfileFileDefinition; -import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition; -import ca.uhn.fhir.tinder.ValueSetGenerator; -import ca.uhn.fhir.tinder.VelocityHelper; -import ca.uhn.fhir.tinder.parser.BaseStructureSpreadsheetParser; -import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet; -import ca.uhn.fhir.tinder.parser.ProfileParser; -import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingSpreadsheet; -import ca.uhn.fhir.tinder.parser.TargetType; +import java.io.*; +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; /** /** @@ -291,8 +283,6 @@ public class TinderGeneratorTask extends Task { private List valueSetFiles; - private List profileFiles; - private boolean verbose; private FhirContext fhirContext; // set from version in validateAttributes @@ -304,19 +294,21 @@ public class TinderGeneratorTask extends Task { super(); } + protected void cleanup () { + } + @Override public void execute () throws BuildException { validateAttributes(); - + GeneratorContext context = new GeneratorContext(); context.setVersion(version); context.setBaseDir(projectHome); context.setIncludeResources(includeResources); context.setExcludeResources(excludeResources); context.setValueSetFiles(valueSetFiles); - context.setProfileFiles(profileFiles); - + Generator generator = new Generator(); try { generator.prepare(context); @@ -325,7 +317,7 @@ public class TinderGeneratorTask extends Task { } catch (FailureException e) { throw new BuildException(e.getMessage(), e.getCause()); } - + /* * Deal with the generation target */ @@ -359,7 +351,7 @@ public class TinderGeneratorTask extends Task { } targetDirectory.mkdirs(); log(" * Output ["+targetType.toString()+"] Directory: " + targetDirectory.getAbsolutePath()); - + try { /* * Single file with all elements @@ -384,7 +376,7 @@ public class TinderGeneratorTask extends Task { templateIs = this.getClass().getResourceAsStream(template); } InputStreamReader templateReader = new InputStreamReader(templateIs); - + /* * build new Velocity Context */ @@ -411,13 +403,13 @@ public class TinderGeneratorTask extends Task { } else { ctx.put("resourcePackage", "ca.uhn.fhir.model." + version + ".resource"); } - + String capitalize = WordUtils.capitalize(version); if ("Dstu".equals(capitalize)) { capitalize="Dstu1"; } ctx.put("versionCapitalized", capitalize); - + /* * Write resources if selected */ @@ -485,21 +477,7 @@ public class TinderGeneratorTask extends Task { vsp.setVelocityProperties(velocityProperties); vsp.writeMarkedValueSets(targetType, targetDirectory, targetPackage); } - - /* - * Write profiles - */ - ProfileParser pp = context.getProfileParser(); - if (generateProfiles && pp != null) { - log("Writing Profiles..."); - pp.setFilenamePrefix(filenamePrefix); - pp.setFilenameSuffix(filenameSuffix); - pp.setTemplate(template); - pp.setTemplateFile(templateFile); - pp.setVelocityPath(velocityPath); - pp.setVelocityProperties(velocityProperties); - pp.writeAll(targetType, targetDirectory, null, targetPackage); - } + } } catch (Exception e) { @@ -511,7 +489,124 @@ public class TinderGeneratorTask extends Task { throw new BuildException("Error processing "+getTaskName()+" task.", e); } finally { cleanup(); - } + } + } + + public void setExcludeResources(String names) { + if (null == this.excludeResources) { + this.excludeResources = new ArrayList(); + } + if (names != null) { + StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken(); + this.excludeResources.add(token.trim()); + } + } + } + + public void setFilenamePrefix(String filenamePrefix) { + this.filenamePrefix = filenamePrefix; + } + + public void setFilenameSuffix(String filenameSuffix) { + this.filenameSuffix = filenameSuffix; + } + + public void setGenerateDatatypes(boolean generateDatatypes) { + this.generateDatatypes = generateDatatypes; + } + + public void setGenerateProfiles(boolean generateProfiles) { + this.generateProfiles = generateProfiles; + } + + public void setGenerateResources(boolean generateResources) { + this.generateResources = generateResources; + } + + public void setGenerateValueSets(boolean generateValueSets) { + this.generateValueSets = generateValueSets; + } + + public void setIncludeResources(String names) { + if (null == this.includeResources) { + this.includeResources = new ArrayList(); + } + if (names != null) { + StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken(); + this.includeResources.add(token.trim()); + } + } + } + + public void setPackageBase(String packageBase) { + this.packageBase = packageBase; + } + + public void setProjectHome(String projectHome) { + this.projectHome = projectHome; + } + + public void setTargetFile(String targetFile) { + this.targetFile = targetFile; + } + + public void setTargetFolder(String targetFolder) { + this.targetFolder = targetFolder; + } + + public void setTargetPackage(String targetPackage) { + this.targetPackage = targetPackage; + } + + public void setTargetResourceDirectory(File targetResourceDirectory) { + this.targetResourceDirectory = targetResourceDirectory; + } + + public void setTargetSourceDirectory(File targetSourceDirectory) { + this.targetSourceDirectory = targetSourceDirectory; + } + + public void setTemplate(String template) { + this.template = template; + } + + public void setTemplateFile(File templateFile) { + this.templateFile = templateFile; + } + + public void setValueSetFiles(String names) { + if (null == this.valueSetFiles) { + this.valueSetFiles = new ArrayList(); + } + if (names != null) { + StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken(); + ValueSetFileDefinition def = new ValueSetFileDefinition(); + def.setValueSetFile(token.trim()); + this.valueSetFiles.add(def); + } + } + } + + public void setVelocityPath(String velocityPath) { + this.velocityPath = velocityPath; + } + + public void setVelocityProperties(String velocityProperties) { + this.velocityProperties = velocityProperties; + } + + public void setVerbose(boolean verbose) { + this.verbose = verbose; + } + + public void setVersion(String version) { + this.version = version; } protected void validateAttributes () throws BuildException { @@ -538,160 +633,18 @@ public class TinderGeneratorTask extends Task { } } - protected void cleanup () { - } - - - public void setVersion(String version) { - this.version = version; - } - - public void setProjectHome(String projectHome) { - this.projectHome = projectHome; - } - - public void setGenerateResources(boolean generateResources) { - this.generateResources = generateResources; - } - - public void setGenerateDatatypes(boolean generateDatatypes) { - this.generateDatatypes = generateDatatypes; - } - - public void setGenerateValueSets(boolean generateValueSets) { - this.generateValueSets = generateValueSets; - } - - public void setGenerateProfiles(boolean generateProfiles) { - this.generateProfiles = generateProfiles; - } - - public void setTargetSourceDirectory(File targetSourceDirectory) { - this.targetSourceDirectory = targetSourceDirectory; - } - - public void setTargetPackage(String targetPackage) { - this.targetPackage = targetPackage; - } - - public void setPackageBase(String packageBase) { - this.packageBase = packageBase; - } - - public void setTargetFile(String targetFile) { - this.targetFile = targetFile; - } - - public void setFilenamePrefix(String filenamePrefix) { - this.filenamePrefix = filenamePrefix; - } - - public void setFilenameSuffix(String filenameSuffix) { - this.filenameSuffix = filenameSuffix; - } - - public void setTargetResourceDirectory(File targetResourceDirectory) { - this.targetResourceDirectory = targetResourceDirectory; - } - - public void setTargetFolder(String targetFolder) { - this.targetFolder = targetFolder; - } - - public void setTemplate(String template) { - this.template = template; - } - - public void setTemplateFile(File templateFile) { - this.templateFile = templateFile; - } - - public void setVelocityPath(String velocityPath) { - this.velocityPath = velocityPath; - } - - public void setVelocityProperties(String velocityProperties) { - this.velocityProperties = velocityProperties; - } - - public void setIncludeResources(String names) { - if (null == this.includeResources) { - this.includeResources = new ArrayList(); - } - if (names != null) { - StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); - while (tokens.hasMoreTokens()) { - String token = tokens.nextToken(); - this.includeResources.add(token.trim()); - } - } - } - - public void setExcludeResources(String names) { - if (null == this.excludeResources) { - this.excludeResources = new ArrayList(); - } - if (names != null) { - StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); - while (tokens.hasMoreTokens()) { - String token = tokens.nextToken(); - this.excludeResources.add(token.trim()); - } - } - } - - public void setValueSetFiles(String names) { - if (null == this.valueSetFiles) { - this.valueSetFiles = new ArrayList(); - } - if (names != null) { - StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); - while (tokens.hasMoreTokens()) { - String token = tokens.nextToken(); - ValueSetFileDefinition def = new ValueSetFileDefinition(); - def.setValueSetFile(token.trim()); - this.valueSetFiles.add(def); - } - } - } - - public void setProfileFiles(String names) { - if (null == this.profileFiles) { - this.profileFiles = new ArrayList(); - } - if (names != null) { - StringTokenizer tokens = new StringTokenizer(names, ", \t\r\n"); - while (tokens.hasMoreTokens()) { - String token = tokens.nextToken(); - ProfileFileDefinition def = new ProfileFileDefinition(); - int ix = token.indexOf('{'); - if (ix >= 0) { - int end = token.indexOf('}'); - String url = token.substring(ix+1, end); - token = token.substring(end+1); - def.setProfileSourceUrl(url); - } - def.setProfileFile(token.trim()); - this.profileFiles.add(def); - } - } - } - - public void setVerbose(boolean verbose) { - this.verbose = verbose; - } - class Generator extends AbstractGenerator { - @Override - protected void logInfo(String message) { - log(message); - } @Override protected void logDebug(String message) { if (verbose) { log(message); } } + + @Override + protected void logInfo(String message) { + log(message); + } } } diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/Child.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/Child.java index 9afa6778434..2ee2dcdc301 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/Child.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/Child.java @@ -1,5 +1,11 @@ package ca.uhn.fhir.tinder.model; +import ca.uhn.fhir.model.api.BasePrimitive; +import ca.uhn.fhir.model.api.IDatatype; +import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.primitive.IdDt; +import org.apache.commons.lang3.StringUtils; + import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; @@ -7,13 +13,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.apache.commons.lang3.StringUtils; - -import ca.uhn.fhir.model.api.BasePrimitive; -import ca.uhn.fhir.model.api.IDatatype; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.primitive.IdDt; - public abstract class Child extends BaseElement { private List mySimpleStters = new ArrayList(); diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/RestResourceOperationTm.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/RestResourceOperationTm.java deleted file mode 100644 index 8ca7b5620b1..00000000000 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/RestResourceOperationTm.java +++ /dev/null @@ -1,38 +0,0 @@ -package ca.uhn.fhir.tinder.model; - -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.WordUtils; - -import ca.uhn.fhir.model.dstu.resource.Conformance.RestResourceOperation; - -public class RestResourceOperationTm { - - private String myName; - private String myDocumentation; - - public RestResourceOperationTm(RestResourceOperation theOp) { - myName = theOp.getCode().getValue(); - myDocumentation = theOp.getDocumentation().getValue(); - } - - public String getName() { - return myName; - } - - public boolean isHasDocumentation() { - return StringUtils.isNotBlank(myDocumentation); - } - - public String getNameCapitalized() { - return WordUtils.capitalize(myName); - } - - public String getDocumentation() { - return myDocumentation; - } - - public void setName(String theName) { - myName = theName; - } - -} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/RestResourceTm.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/RestResourceTm.java deleted file mode 100644 index 9548d213625..00000000000 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/model/RestResourceTm.java +++ /dev/null @@ -1,64 +0,0 @@ -package ca.uhn.fhir.tinder.model; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang.Validate; - -import ca.uhn.fhir.model.dstu.resource.Conformance.RestResource; -import ca.uhn.fhir.model.dstu.resource.Conformance.RestResourceOperation; -import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; - -public class RestResourceTm { - - private String myResourceType; - private Map mySupportedOperations = new HashMap(); - private ArrayList mySearchParams; - - public RestResourceTm(RestResource theResource) { - myResourceType = theResource.getType().getValue(); - Validate.notNull(myResourceType, "Found a resource definition in Conformance resource with no type (or an invalid type) specified: " + theResource.getType().getValue()); - - for (RestResourceOperation next : theResource.getOperation()) { - mySupportedOperations.put(next.getCode().getValueAsEnum(), new RestResourceOperationTm(next)); - } - } - - public RestResourceOperationTm getReadOperation() { - return mySupportedOperations.get(RestfulOperationTypeEnum.READ); - } - - public RestResourceOperationTm getVReadOperation() { - return mySupportedOperations.get(RestfulOperationTypeEnum.VREAD); - } - - public RestResourceOperationTm getSearchOperation() { - return mySupportedOperations.get(RestfulOperationTypeEnum.SEARCH_TYPE); - } - - public boolean isHasReadOperation() { - return mySupportedOperations.containsKey(RestfulOperationTypeEnum.READ); - } - - public boolean isHasVReadOperation() { - return mySupportedOperations.containsKey(RestfulOperationTypeEnum.VREAD); - } - - public boolean isHasSearchOperation() { - return mySupportedOperations.containsKey(RestfulOperationTypeEnum.SEARCH_TYPE); - } - - public String getResourceType() { - return myResourceType; - } - - public List getSearchParams() { - if (mySearchParams == null) { - mySearchParams = new ArrayList(); - } - return mySearchParams; - } - -} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java index 02221b8a56a..f01ada1bc59 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java @@ -1,26 +1,18 @@ package ca.uhn.fhir.tinder.parser; -import static org.apache.commons.lang.StringUtils.defaultString; -import static org.apache.commons.lang.StringUtils.isNotBlank; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.lang.annotation.Annotation; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; -import java.util.TreeSet; - +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.model.api.ExtensionDt; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.annotation.SimpleSetter; +import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu2.resource.Binary; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.tinder.TinderStructuresMojo; +import ca.uhn.fhir.tinder.ValueSetGenerator; +import ca.uhn.fhir.tinder.VelocityHelper; +import ca.uhn.fhir.tinder.model.*; +import ca.uhn.fhir.tinder.model.SimpleSetter.Parameter; import org.apache.commons.lang.WordUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -32,31 +24,18 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.model.api.ExtensionDt; -import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.annotation.SimpleSetter; -import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; -import ca.uhn.fhir.model.dstu.resource.Binary; -import ca.uhn.fhir.model.primitive.BoundCodeDt; -import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt; -import ca.uhn.fhir.tinder.TinderStructuresMojo; -import ca.uhn.fhir.tinder.ValueSetGenerator; -import ca.uhn.fhir.tinder.VelocityHelper; -import ca.uhn.fhir.tinder.model.BaseElement; -import ca.uhn.fhir.tinder.model.BaseRootType; -import ca.uhn.fhir.tinder.model.Child; -import ca.uhn.fhir.tinder.model.Composite; -import ca.uhn.fhir.tinder.model.Extension; -import ca.uhn.fhir.tinder.model.Resource; -import ca.uhn.fhir.tinder.model.ResourceBlock; -import ca.uhn.fhir.tinder.model.SimpleChild; -import ca.uhn.fhir.tinder.model.SimpleSetter.Parameter; +import java.io.*; +import java.lang.annotation.Annotation; +import java.lang.reflect.Constructor; +import java.util.*; + +import static org.apache.commons.lang.StringUtils.defaultString; +import static org.apache.commons.lang.StringUtils.isNotBlank; public abstract class BaseStructureParser { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseStructureParser.class); + protected List myResources = new ArrayList(); private String myBaseDir; private ArrayList myExtensions; private TreeSet myImports = new TreeSet(); @@ -65,7 +44,6 @@ public abstract class BaseStructureParser { private TreeMap myNameToDatatypeClass = new TreeMap(); private TreeMap myNameToResourceClass = new TreeMap(); private String myPackageBase; - protected List myResources = new ArrayList(); private String myVersion; private boolean myIsRi; private FhirContext myCtx; @@ -90,14 +68,6 @@ public abstract class BaseStructureParser { } } - public FhirContext getCtx() { - return myCtx; - } - - public String getVersion() { - return myVersion; - } - private void addImport(String bindingClass) { myImports.add(bindingClass); } @@ -137,117 +107,8 @@ public abstract class BaseStructureParser { theStructureParser.myNameToDatatypeClass.putAll(myNameToDatatypeClass); } - private ca.uhn.fhir.model.api.annotation.SimpleSetter.Parameter findAnnotation(Class theBase, Annotation[] theAnnotations, Class theClass) { - for (Annotation next : theAnnotations) { - if (theClass.equals(next.annotationType())) { - return (ca.uhn.fhir.model.api.annotation.SimpleSetter.Parameter) next; - } - } - throw new IllegalArgumentException(theBase.getCanonicalName() + " has @" + SimpleSetter.class.getCanonicalName() + " constructor with no/invalid parameter annotation"); - } - - /** - * Example: Encounter has an internal block class named "Location", but it also has a reference to the Location - * resource type, so we need to use the fully qualified name for that resource reference - */ - private void fixResourceReferenceClassNames(BaseElement theNext, String thePackageBase) { - for (BaseElement next : theNext.getChildren()) { - fixResourceReferenceClassNames(next, thePackageBase); - } - - if (theNext.isResourceRef()) { - for (int i = 0; i < theNext.getType().size(); i++) { - String nextTypeName = theNext.getType().get(i); - if ("Any".equals(nextTypeName)) { - continue; - } - // if ("Location".equals(nextTypeName)) { - // ourLog.info("***** Checking for Location"); - // ourLog.info("***** Imports are: {}", new - // TreeSet(myImports)); - // } - boolean found = false; - for (String nextImport : myImports) { - if (nextImport.endsWith(".resource." + nextTypeName)) { - // ourLog.info("***** Found match " + nextImport); - theNext.getType().set(i, nextImport); - found = true; - } - } - if (!found) { - theNext.getType().set(i, thePackageBase + ".resource." + nextTypeName); - } - } - } - } - - protected String getFilenamePrefix() { - return myFilenamePrefix != null ? myFilenamePrefix : ""; - } - - protected String getFilenameSuffix() { - return myFilenameSuffix != null ? myFilenameSuffix : ""; - } - - public Map getLocalImports() { - return myLocallyDefinedClassNames; - } - - public TreeMap getNameToDatatypeClass() { - return myNameToDatatypeClass; - } - - public List getResources() { - return myResources; - } - - protected String getTemplate() { - return myTemplate; - } - - protected File getTemplateFile() { - return myTemplateFile; - } - - protected String getVelocityPath() { - return myVelocityPath; - } - - protected boolean isSpreadsheet(String theFileName) { - return true; - } - - public void markResourcesForImports() { - for (BaseRootType next : myResources) { - if (next instanceof Resource) { - myLocallyDefinedClassNames.put(next.getName(), "resource"); - } else if (next instanceof Composite) { - myLocallyDefinedClassNames.put(next.getName() + "Dt", "composite"); - } else { - throw new IllegalStateException(next.getClass() + ""); - } - } - } - - private void scanForCorrections(BaseRootType theNext) { - if (theNext.getElementName().equals("ResourceReference")) { - for (BaseElement next : theNext.getChildren()) { - if (next.getElementName().equals("reference")) { - next.clearTypes(); - next.setTypeFromString("id"); - scanForSimpleSetters((Child) next); - } - } - } - } - - private String scanForImportNamesAndReturnFqn(String theNextType) throws MojoFailureException { - String retVal = doScanForImportNamesAndReturnFqn(theNextType); - if (myVersion.equals("dstu2")) { - retVal = retVal.replace(".dev.", ".dstu2."); - } - - return retVal; + protected FhirVersionEnum determineVersionEnum() throws MojoFailureException { + return determineVersionEnum(myVersion); } private String doScanForImportNamesAndReturnFqn(String theNextType) throws MojoFailureException { @@ -354,6 +215,147 @@ public abstract class BaseStructureParser { } } + private ca.uhn.fhir.model.api.annotation.SimpleSetter.Parameter findAnnotation(Class theBase, Annotation[] theAnnotations, Class theClass) { + for (Annotation next : theAnnotations) { + if (theClass.equals(next.annotationType())) { + return (ca.uhn.fhir.model.api.annotation.SimpleSetter.Parameter) next; + } + } + throw new IllegalArgumentException(theBase.getCanonicalName() + " has @" + SimpleSetter.class.getCanonicalName() + " constructor with no/invalid parameter annotation"); + } + + /** + * Example: Encounter has an internal block class named "Location", but it also has a reference to the Location + * resource type, so we need to use the fully qualified name for that resource reference + */ + private void fixResourceReferenceClassNames(BaseElement theNext, String thePackageBase) { + for (BaseElement next : theNext.getChildren()) { + fixResourceReferenceClassNames(next, thePackageBase); + } + + if (theNext.isResourceRef()) { + for (int i = 0; i < theNext.getType().size(); i++) { + String nextTypeName = theNext.getType().get(i); + if ("Any".equals(nextTypeName)) { + continue; + } + // if ("Location".equals(nextTypeName)) { + // ourLog.info("***** Checking for Location"); + // ourLog.info("***** Imports are: {}", new + // TreeSet(myImports)); + // } + boolean found = false; + for (String nextImport : myImports) { + if (nextImport.endsWith(".resource." + nextTypeName)) { + // ourLog.info("***** Found match " + nextImport); + theNext.getType().set(i, nextImport); + found = true; + } + } + if (!found) { + theNext.getType().set(i, thePackageBase + ".resource." + nextTypeName); + } + } + } + } + + public FhirContext getCtx() { + return myCtx; + } + + protected String getFilenamePrefix() { + return myFilenamePrefix != null ? myFilenamePrefix : ""; + } + + public void setFilenamePrefix(String theFilenamePrefix) { + myFilenamePrefix = theFilenamePrefix; + } + + protected String getFilenameSuffix() { + return myFilenameSuffix != null ? myFilenameSuffix : ""; + } + + public void setFilenameSuffix(String theFilenameSuffix) { + myFilenameSuffix = theFilenameSuffix; + } + + public Map getLocalImports() { + return myLocallyDefinedClassNames; + } + + public TreeMap getNameToDatatypeClass() { + return myNameToDatatypeClass; + } + + public List getResources() { + return myResources; + } + + protected String getTemplate() { + return myTemplate; + } + + public void setTemplate(String theTemplate) { + myTemplate = theTemplate; + } + + protected File getTemplateFile() { + return myTemplateFile; + } + + public void setTemplateFile (File theTemplateFile) { + myTemplateFile = theTemplateFile; + } + + protected String getVelocityPath() { + return myVelocityPath; + } + + public void setVelocityPath(String theVelocityPath) { + myVelocityPath = theVelocityPath; + } + + public String getVersion() { + return myVersion; + } + + protected boolean isSpreadsheet(String theFileName) { + return true; + } + + public void markResourcesForImports() { + for (BaseRootType next : myResources) { + if (next instanceof Resource) { + myLocallyDefinedClassNames.put(next.getName(), "resource"); + } else if (next instanceof Composite) { + myLocallyDefinedClassNames.put(next.getName() + "Dt", "composite"); + } else { + throw new IllegalStateException(next.getClass() + ""); + } + } + } + + private void scanForCorrections(BaseRootType theNext) { + if (theNext.getElementName().equals("ResourceReference")) { + for (BaseElement next : theNext.getChildren()) { + if (next.getElementName().equals("reference")) { + next.clearTypes(); + next.setTypeFromString("id"); + scanForSimpleSetters((Child) next); + } + } + } + } + + private String scanForImportNamesAndReturnFqn(String theNextType) throws MojoFailureException { + String retVal = doScanForImportNamesAndReturnFqn(theNextType); + if (myVersion.equals("dstu2")) { + retVal = retVal.replace(".dev.", ".dstu2."); + } + + return retVal; + } + private void scanForImportsNames(BaseElement theNext) throws MojoFailureException { for (BaseElement next : theNext.getChildren()) { ourLog.debug("Element Name: {}", next.getName()); @@ -457,26 +459,6 @@ public abstract class BaseStructureParser { myExtensions = theExts; } - public void setFilenamePrefix(String theFilenamePrefix) { - myFilenamePrefix = theFilenamePrefix; - } - - public void setFilenameSuffix(String theFilenameSuffix) { - myFilenameSuffix = theFilenameSuffix; - } - - public void setTemplate(String theTemplate) { - myTemplate = theTemplate; - } - - public void setTemplateFile (File theTemplateFile) { - myTemplateFile = theTemplateFile; - } - - public void setVelocityPath(String theVelocityPath) { - myVelocityPath = theVelocityPath; - } - public void setVelocityProperties(String theVelocityProperties) { myVelocityProperties = theVelocityProperties; } @@ -558,11 +540,11 @@ public abstract class BaseStructureParser { w.close(); fos.close(); } - + public void writeAll(File theOutputDirectory, File theResourceOutputDirectory, String thePackageBase) throws MojoFailureException { writeAll(TargetType.SOURCE, theOutputDirectory, theResourceOutputDirectory, thePackageBase); } - + public void writeAll(TargetType theTarget, File theOutputDirectory, File theResourceOutputDirectory, String thePackageBase) throws MojoFailureException { myPackageBase = thePackageBase; @@ -609,7 +591,7 @@ public abstract class BaseStructureParser { } String fileName = prefix + elementName + suffix; int ix = fileName.lastIndexOf('.'); - String className = ix < 0 ? fileName : fileName.substring(0, ix); + String className = ix < 0 ? fileName : fileName.substring(0, ix); File f = new File(theOutputDirectory, fileName); try { write(next, f, thePackageBase); @@ -678,24 +660,6 @@ public abstract class BaseStructureParser { } } - protected FhirVersionEnum determineVersionEnum() throws MojoFailureException { - return determineVersionEnum(myVersion); - } - - public static FhirVersionEnum determineVersionEnum(String version) throws MojoFailureException { - FhirVersionEnum versionEnum; - if ("dstu2".equals(version)) { - versionEnum = FhirVersionEnum.DSTU2; - } else if ("dstu3".equals(version)) { - versionEnum = FhirVersionEnum.DSTU3; - } else if ("r4".equals(version)) { - versionEnum = FhirVersionEnum.R4; - } else { - throw new MojoFailureException("Unknown version: " + version); - } - return versionEnum; - } - static String cellValue(Node theRowXml, int theCellIndex) { NodeList cells = ((Element) theRowXml).getElementsByTagName("Cell"); @@ -723,6 +687,20 @@ public abstract class BaseStructureParser { return null; } + public static FhirVersionEnum determineVersionEnum(String version) throws MojoFailureException { + FhirVersionEnum versionEnum; + if ("dstu2".equals(version)) { + versionEnum = FhirVersionEnum.DSTU2; + } else if ("dstu3".equals(version)) { + versionEnum = FhirVersionEnum.DSTU3; + } else if ("r4".equals(version)) { + versionEnum = FhirVersionEnum.R4; + } else { + throw new MojoFailureException("Unknown version: " + version); + } + return versionEnum; + } + public static void main(String[] args) throws Exception { String base = "/home/t3903uhn/workspace/uhn-fhir-service/"; TinderStructuresMojo m = new TinderStructuresMojo(); diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/ProfileParser.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/ProfileParser.java deleted file mode 100644 index 594657f8338..00000000000 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/ProfileParser.java +++ /dev/null @@ -1,331 +0,0 @@ -package ca.uhn.fhir.tinder.parser; - -import static org.apache.commons.lang.StringUtils.capitalize; -import static org.apache.commons.lang.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.*; - -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.maven.plugin.MojoFailureException; - -import ca.uhn.fhir.context.ConfigurationException; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu.resource.Profile; -import ca.uhn.fhir.model.dstu.resource.Profile.ExtensionDefn; -import ca.uhn.fhir.model.dstu.resource.Profile.Structure; -import ca.uhn.fhir.model.dstu.resource.Profile.StructureElement; -import ca.uhn.fhir.model.dstu.resource.Profile.StructureElementDefinition; -import ca.uhn.fhir.model.dstu.resource.Profile.StructureElementDefinitionType; -import ca.uhn.fhir.model.dstu.resource.Profile.StructureSearchParam; -import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.tinder.model.AnyChild; -import ca.uhn.fhir.tinder.model.BaseElement; -import ca.uhn.fhir.tinder.model.BaseRootType; -import ca.uhn.fhir.tinder.model.Child; -import ca.uhn.fhir.tinder.model.Resource; -import ca.uhn.fhir.tinder.model.ResourceBlock; -import ca.uhn.fhir.tinder.model.SearchParameter; -import ca.uhn.fhir.tinder.model.SimpleChild; -import ca.uhn.fhir.tinder.model.Slicing; - -public class ProfileParser extends BaseStructureParser { - - public ProfileParser(String theVersion, String theBaseDir) { - super(theVersion, theBaseDir); - super.setFilenameSuffix(""); - } - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ProfileParser.class); - - private ExtensionDefn findExtension(Profile theProfile, String theCode) { - for (ExtensionDefn next : theProfile.getExtensionDefn()) { - if (theCode.equals(next.getCode().getValue())) { - return next; - } - } - return null; - } - - @Override - protected String getTemplate() { - String template = super.getTemplate(); - if (template != null) { - return template; - } - return "dstu".equals(getVersion()) ? "/vm/resource_dstu.vm" : "/vm/resource.vm"; - } - - @Override - protected File getTemplateFile() { - return null; - } - - public void parseSingleProfile(File theProfile, String theHttpUrl) throws MojoFailureException { - String profileString; - try { - profileString = IOUtils.toString(new FileReader(theProfile)); - } catch (IOException e) { - throw new MojoFailureException("Failed to load: " + theProfile, e); - } - - FhirContext ctx = new FhirContext(Profile.class); - Profile profile = ctx.newXmlParser().parseResource(Profile.class, profileString); - try { - parseSingleProfile(profile, theHttpUrl); - } catch (Exception e) { - throw new MojoFailureException("Failed to parse profile", e); - } - } - - - public void parseBaseResources(List theBaseResourceNames, String theHttpUrl) throws MojoFailureException { - FhirContext fhirContext = new FhirContext(Profile.class); - - for (String nextFileName : theBaseResourceNames) { - ourLog.info("Parsing file: {}", nextFileName); - - Profile profile; - try { - profile = (Profile) fhirContext.newXmlParser().parseResource(IOUtils.toString(new FileReader(nextFileName))); - } catch (Exception e) { - throw new MojoFailureException("Failed to load or parse file: " + nextFileName, e); - } - - try { - parseSingleProfile(profile, theHttpUrl); - } catch (Exception e) { - throw new MojoFailureException("Failed to process file: " + nextFileName, e); - } - } - - // for (int i = 0; i < theBaseResourceNames.size(); i++) { - // theBaseResourceNames.set(i, - // theBaseResourceNames.get(i).toLowerCase()); - // } - // - // try { - // - // Bundle bundle = - // fhirContext.newXmlParser().parseBundle(IOUtils.toString(getClass().getResourceAsStream("/prof/allprofiles.xml"))); - // TreeSet allProfiles = new TreeSet(); - // for (BundleEntry nextResource : bundle.getEntries() ) { - // Profile nextProfile = (Profile) nextResource.getResource(); - // allProfiles.add(nextProfile.getName().getValue()); - // if - // (theBaseResourceNames.contains(nextProfile.getName().getValue().toLowerCase())){ - // parseSingleProfile(nextProfile, - // bundle.getLinkBase().getValueNotNull()); - // } - // } - // - // ourLog.info("Base profiles found: {}", allProfiles); - // - // } catch (Exception e) { - // throw new MojoFailureException("Failed to load base resources", e); - // } - } - - public BaseRootType parseSingleProfile(Profile theProfile, String theUrlTOThisProfile) throws Exception { - BaseRootType retVal = null; - for (Structure nextStructure : theProfile.getStructure()) { - - int elemIdx = 0; - Map elements = new HashMap(); - for (StructureElement next : nextStructure.getElement()) { - - BaseElement elem; - if (elemIdx == 0) { - retVal = new Resource(); - retVal.setProfile(theProfile.getIdentifier().getValue()); - if (retVal.getProfile() == null) { - retVal.setProfile(theUrlTOThisProfile); - } - - for (StructureSearchParam nextParam : nextStructure.getSearchParam()) { - SearchParameter param = new SearchParameter(getVersion(), retVal.getName()); - param.setName(nextParam.getName().getValue()); - - String path = defaultString(nextParam.getXpath().getValue()); - path=path.replace("/f:", ".").replace("f:", ""); - param.setPath(path); - - param.setType(nextParam.getType().getValue()); - param.setDescription(nextParam.getDocumentation().getValue()); - retVal.addSearchParameter(param); - } - - addResource(retVal); - elem = retVal; - // below StringUtils.isBlank(type) || type.startsWith("=") - } else { - if (next.getDefinition().getType().isEmpty()) { - elem = new ResourceBlock(); - // } else if (type.startsWith("@")) { - // elem = new ResourceBlockCopy(); - } else if (next.getDefinition().getType().get(0).getCode().getValue().equals("*")) { - elem = new AnyChild(); -// } else if (next.getDefinition().getType().get(0).getCode().getValue().equals("Extension")) { -// elem = new UndeclaredExtensionChild(); - } else { - elem = new SimpleChild(); - } - - } - - boolean allResourceReferences = next.getDefinition().getType().size() > 0; - for (StructureElementDefinitionType nextType : next.getDefinition().getType()) { - if (nextType.getCode().getValueAsEnum() != DataTypeEnum.RESOURCEREFERENCE) { - allResourceReferences = false; - } - } - - populateNewElement(next, elem, allResourceReferences); - - StructureElementDefinition definition = next.getDefinition(); - - BaseElement parentElement = elements.get(elem.getElementParentName()); - if (next.getSlicing().getDiscriminator().getValue() != null) { - Slicing slicing = new Slicing(); - slicing.setDiscriminator(next.getSlicing().getDiscriminator().getValue()); - if (parentElement.getChildElementNameToSlicing().get(elem.getName()) != null) { - throw new ConfigurationException("Found multiple slicing definitions for path: " + next.getPath().getValue()); - } - parentElement.getChildElementNameToSlicing().put(elem.getName(), slicing); - continue; - } - - Slicing childIsSliced = parentElement != null ? parentElement.getChildElementNameToSlicing().get(elem.getName()) : null; - - /* - * Profiles come with a number of standard elements which are generally ignored because they are boilerplate, unless the definition is somehow changing their behaviour (e.g. through - * slices) - */ - if (next.getPath().getValue().endsWith(".contained")) { - continue; - } - if (next.getPath().getValue().endsWith(".text")) { - continue; - } - if (next.getPath().getValue().endsWith(".extension")) { - if (childIsSliced != null) { - if (!"url".equals(childIsSliced.getDiscriminator())) { - throw new ConfigurationException("Extensions must be sliced on 'url' discriminator. Found: " + next.getSlicing().getDiscriminator().getValue()); - } - if (next.getDefinition().getType().size() != 1 || next.getDefinition().getType().get(0).getCode().getValueAsEnum() != DataTypeEnum.EXTENSION) { - throw new ConfigurationException("Extension slices must have a single type with a code of 'Extension'"); - } - - String name = next.getName().getValue(); - if (StringUtils.isBlank(name)) { - throw new ConfigurationException("Extension slices must have a 'name' defined, none found at path: " + next.getPath()); - } - elem.setName(name); - elem.setElementName(name); - -// elem = new Extension(); -// populateNewElement(next, elem, allResourceReferences); - - String profile = next.getDefinition().getType().get(0).getProfile().getValueAsString(); - if (isBlank(profile)) { - throw new ConfigurationException("Extension slice for " + next.getPath().getValue() + " has no profile specified in its type"); - } - if (profile.startsWith("#")) { - Profile.ExtensionDefn extension = findExtension(theProfile, profile.substring(1)); - if (extension == null) { - throw new ConfigurationException("Unknown local extension reference: " + profile); - } - ourLog.info("Element at path {} is using extension {}", next.getPath(), profile); - definition = extension.getDefinition(); - String extensionUrl = theUrlTOThisProfile + profile; - elem.setExtensionUrl(extensionUrl); - } else { - // TODO: implement this - throw new ConfigurationException("Extensions specified outside of the given profile are not yet supported"); - } - } else { - continue; - } - } - if (next.getPath().getValue().endsWith(".modifierExtension")) { - continue; - } - - for (StructureElementDefinitionType nextType : definition.getType()) { - if (nextType.getCode().getValueAsEnum() == DataTypeEnum.RESOURCEREFERENCE) { - if (nextType.getProfile().getValueAsString().startsWith("http://hl7.org/fhir/profiles/")) { - elem.getType().add(capitalize(nextType.getProfile().getValueAsString().substring("http://hl7.org/fhir/profiles/".length()))); - } else { - // TODO: implement this.. we need to be able to - // reference other profiles - throw new ConfigurationException("Profile type not yet supported"); - } - } else { - elem.getType().add(capitalize(nextType.getCode().getValue()) + "Dt"); - } - - } - - elem.setBinding(definition.getBinding().getName().getValue()); - elem.setShortName(definition.getShort().getValue()); - elem.setDefinition(definition.getFormal().getValue()); - elem.setRequirement(definition.getRequirements().getValue()); - elem.setCardMin(definition.getMin().getValueAsString()); - elem.setCardMax(definition.getMax().getValue()); - - if (elem instanceof Child) { - Child child = (Child) elem; - elements.put(elem.getName(), elem); - if (parentElement == null) { - throw new Exception("Can't find element " + elem.getElementParentName() + " - Valid values are: " + elements.keySet()); - } - parentElement.addChild(child); - - /* - * Find simple setters - */ - scanForSimpleSetters(child); - } else { - BaseRootType res = (BaseRootType) elem; - elements.put(res.getName(), res); - } - - elemIdx++; - } - - } - - return retVal; - } - - private void populateNewElement(StructureElement next, BaseElement elem, boolean allResourceReferences) { - elem.setName(next.getPath().getValue()); - elem.setElementNameAndDeriveParentElementName(next.getPath().getValue()); - elem.setResourceRef(allResourceReferences); - } - - public static void main(String[] args) throws Exception { - IParser parser = new FhirContext(Profile.class).newXmlParser(); - ProfileParser pp = new ProfileParser("dev","."); - - String str = IOUtils.toString(new FileReader("../hapi-tinder-test/src/test/resources/profile/organization.xml")); - Profile prof = parser.parseResource(Profile.class, str); - pp.parseSingleProfile(prof, "http://foo"); - - str = IOUtils.toString(new FileReader("../hapi-tinder-test/src/test/resources/profile/patient.xml")); - prof = parser.parseResource(Profile.class, str); - pp.parseSingleProfile(prof, "http://foo"); - - pp.markResourcesForImports(); - pp.writeAll(new File("target/gen/test/resource"), null,"test"); - - } - -} diff --git a/hapi-tinder-plugin/src/main/resources/res/r4/auditevent-spreadsheet.xml b/hapi-tinder-plugin/src/main/resources/res/r4/auditevent-spreadsheet.xml index ba4dda390df..ff469775b45 100644 --- a/hapi-tinder-plugin/src/main/resources/res/r4/auditevent-spreadsheet.xml +++ b/hapi-tinder-plugin/src/main/resources/res/r4/auditevent-spreadsheet.xml @@ -9,19 +9,18 @@ Grahame John Moehrke 2012-03-19T11:12:07Z - 2017-03-11T19:13:25Z + 2017-09-07T13:52:03Z 16.00 - 7668 - 17268 + 9732 + 23040 0 0 - 8 - 7 + 7 False False @@ -48,31 +47,37 @@ + - - - - + - - - - + - - + - + - - + - - - + - + - + - + - - - - + - - + - - - - + - + - - - + - + + + + + + + + - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FHIR Resource-authoring Spreadsheet + + + This spreadsheet is used to support the definition of resources or data types (structures). A complete set of instructions on the various tabs, columns and rules associated with populating this spreadsheet can be found here: + + + http://wiki.hl7.org?title=FHIR_Spreadsheet_Authoring + +
+ + +

+